diff --git a/sgx-jvm/.gitignore b/sgx-jvm/.gitignore deleted file mode 100644 index 2d9cc6c751..0000000000 --- a/sgx-jvm/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.idea/ -.vscode/ -obj/ -build/ -log/ -tags diff --git a/sgx-jvm/Makefile b/sgx-jvm/Makefile deleted file mode 100644 index 79ff685f51..0000000000 --- a/sgx-jvm/Makefile +++ /dev/null @@ -1,93 +0,0 @@ -MAKEFILE_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) -SHELL=/bin/bash - -JDK_IMAGE=$(MAKEFILE_DIR)/jdk8u/build/linux-x86_64-normal-server-release/images/j2re-image - -.PHONY: all - -all: \ - jvm-enclave/standalone/build/standalone_sgx_verify \ - linux-sgx-driver/isgx.ko - -# === JVM Enclave === - -jvm-enclave/standalone/build/standalone_sgx_verify: \ - avian linux-sgx/build/linux/aesm_service - JAVA_HOME=$(JAVA_HOME) JDK_IMAGE=$(JDK_IMAGE) $(MAKE) -C jvm-enclave - -# === Avian with SGX Support === - -AVIAN_EXTRA_CFLAGS="-I/usr/include -I/usr/include/x86_64-linux-gnu" -AVIAN_EXTRA_LDFLAGS="-L/usr/lib -L/usr/lib/x86_64-linux-gnu -ldl -lpthread -lz" -.PHONY: avian -avian: | $(JDK_IMAGE) - PATH=/usr/bin:$(PATH) $(MAKE) -C avian \ - build-lflags=$(AVIAN_EXTRA_LDFLAGS) \ - extra-lflags=$(AVIAN_EXTRA_LDFLAGS) \ - extra-build-cflags+=$(AVIAN_EXTRA_CFLAGS) \ - extra-cflags+=$(AVIAN_EXTRA_CFLAGS) \ - mode=debug \ - openjdk=$(JAVA_HOME) \ - openjdk-src=$(MAKEFILE_DIR)/jdk8u/jdk/src \ - openjdk-image=$(JDK_IMAGE) \ - system=sgx - -# === Deterministic JDK === - -jdk8u: - git clone -b deterministic-jvm8 --single-branch https://github.com/corda/openjdk $@ - -$(JDK_IMAGE): jdk8u - cd jdk8u && \ - ALSA_NOT_NEEDED=yes CUPS_NOT_NEEDED=yes FREETYPE_NOT_NEEDED=yes \ - PULSE_NOT_NEEDED=yes X11_NOT_NEEDED=yes $(SHELL) ./configure && \ - $(MAKE) JOBS=2 images docs - -# === SGX SDK === - -# Poor man's up-to-date check (they don't have one in the SDK) -LINUX_SGX_SOURCES=$(shell find linux-sgx \ - \( \ - -name '*.c' -o \ - -name '*.cpp' -o \ - -name '*.h' -o \ - -name '*.edl' \ - \) ! \( \ - -name '*_u.?' -o \ - -name '*_t.?' -o \ - -name '*.pb.h' -o \ - -path 'linux-sgx/sdk/cpprt/linux/libunwind/*' -o \ - -path 'linux-sgx/external/rdrand/src/config.h' \ - \)) -linux-sgx/build/linux/aesm_service: \ - $(LINUX_SGX_SOURCES) \ - linux-sgx/external/ippcp_internal/inc - $(MAKE) -C linux-sgx DEBUG=1 - -linux-sgx/external/ippcp_internal/inc: - cd linux-sgx && $(SHELL) ./download_prebuilt.sh - -# === SGX Driver === - -linux-sgx-driver/isgx.ko: - $(MAKE) -C linux-sgx-driver - -# === Directories and Clean === - -build: - mkdir -p $@ - -.PHONY: clean -clean: - $(MAKE) -C jvm-enclave clean - $(MAKE) -C linux-sgx clean - $(MAKE) -C linux-sgx-driver clean - [ ! -d jdk8u ] || $(MAKE) -C jdk8u clean - ../gradlew -p .. verify-enclave:clean - $(MAKE) -C avian clean - -.PHONY: distclean -distclean: clean - $(RM) -r jdk8u - $(RM) -r linux-sgx/external/{ippcp_internal,libirc,libm} - diff --git a/sgx-jvm/README.md b/sgx-jvm/README.md deleted file mode 100644 index 3c6c439b36..0000000000 --- a/sgx-jvm/README.md +++ /dev/null @@ -1,84 +0,0 @@ -The build -========= - -Prerequisites -------------- - -* Install gcc/g++(6), autoconf, automake, ocaml, opendjk(8), libtool, python(2.7) -* Make sure JAVA_HOME points to your OpenJDK 8 installation -* Make sure CXX points to g++ (the project does NOT compile with other compilers like clang!) -* If your hardware supports SGX and you want to use it directly you need to install and load the sgx kernel module (verify by running `lsmod | grep isgx`) and have the sgx service running (on a systemd setup verify by running `systemctl status aesmd`). Note that this is only required for actually running the binary, the build should work fine without. -* The SGX SDK has a simulation mode that doesn't require hardware support. To use this edit `sgx-jvm/jvm-enclave/common/CMakeLists.txt` and change `set(SGX_USE_HARDWARE TRUE)` to `FALSE` - -Toplevel Makefile targets -------------------------- - -* `make` will download all other dependencies and build the sgx\_standalone\_verify binary, residing at `sgx-jvm/jvm-enclave/standalone/build/sgx\_standalone\_verify`, as well as a JNI .so residing at `sgx-jvm/jvm-enclave/jni/build/untrusted_corda_sgx.so` -* `make clean` will clean all build targets. -* `make distclean` will clean all build targets and downloaded dependencies. Ordinarily you shouldn't need to run this. - -Each project has its own build that may be run individually (check the toplevel Makefile to see how to invoke these) - -At this point I suggest running `make` before reading further, it takes a while to download all dependencies. - -Some reading -============ - -Before delving into the code it's strongly recommended to read up on SGX. Some links: - -* Short high-level paper on the attestation design: https://software.intel.com/sites/default/files/article/413939/hasp-2013-innovative-technology-for-attestation-and-sealing.pdf -* Medium length description of an example attestation protocol: https://software.intel.com/en-us/articles/intel-software-guard-extensions-remote-attestation-end-to-end-example -* Lengthy programmer's reference including description of SGX specific instructions: https://software.intel.com/sites/default/files/managed/48/88/329298-002.pdf -* Lengthy low-level paper disecting the SGX design, going into hardware details: https://eprint.iacr.org/2016/086.pdf -* Lengthy SDK reference: https://download.01.org/intel-sgx/linux-1.7/docs/Intel_SGX_SDK_Developer_Reference_Linux_1.7_Open_Source.pdf - - -Corda SGX -========= - -The high level goal of the SGX work in Corda is to provide a secure way of verifying transactions. In order to do this we need to be able to run a JVM inside an enclave capable of running contract code. The design decision that contract verification code is without side-effects is imperative here. - -The dream is to have a functioning JVM running inside SGX with as few limitations as possible. Clients would then be able to connect to the enclave, the TCB would attest that it is running the JVM image on secure hardware, after which the client can safely submit signed JARs for execution. - -Corda would then be able to use this to submit contract code and transactions to run the contract code on. - -This is the first iteration of the work, with a lot of limitations. The current JVM is based on Avian which can produce a standalone statically linked binary. The build statically links the enclavelet JAR into the static enclave binary (`sgx-jvm/jvm-enclave/build/enclave/cordaenclave.so`) which is then loaded and run by `jvm/jvm-enclave/build/sgx\_experiments`. - -Breakdown of the build -====================== - -The current SGX work in Corda is based on 4 semi-distinct projects: - -* The Avian JVM (in the `sgx-jvm/avian` subtree. Note this is our own fork) -* The SGX linux sdk (in the `sgx-jvm/linux-sgx` subtree. Note this is our own fork) -* The JVM enclave code itself, residing in `sgx-jvm/jvm-enclave`. This includes the untrusted and trusted part of the SGXified JVM, mostly C++. -* Finally the Corda enclavelet. This is the JAR that will be loaded and run inside the enclave. (built by `./gradlew verify-enclave:jar` - -Avian ------ - -Avian has a code layout perfectly suited for SGX hacking. Each target platform (originally `posix` or `windows`) needs to implement a fairly straight-forward `System` interface providing OS-specific functionality like threading/synchronisation/memory/filesystem primitives. Check `sgx-jvm/avian/src/system` for code. We use this to implement an SGX "platform", which is basically a stripped down OS environment. Some additional #ifndef-ing was needed to strip some non-os-specific avian functionality that assumed the existence of a filesystem or networking. This work is maintained in a private fork, it is instructive to read through the diff, see https://bitbucket.org/R3-CEV/avian-sgx/. - -SGX SDK -------- - -There are some modifications in the upstream SGX SDK that we require to run the JVM. An example would be the ability to make the heap executable for JIT compilation, or exposing hooks into malloc to detect OOM conditions. All of these should be mergeable, but we maintain a fork to speed up development on our side. - -Corda Enclavelet ----------------- - -This is the JAR that will be run inside the enclave. Check `verify-enclave/src/../Enclavelet.kt` for the code. - -Currently the JAR is not loaded at runtime, but is rather embedded statically into the enclave itself using Avian's binaryToObject utility. This basically does an objcopy and lets the linker do the embedding later. This will later be changed to dynamic loading of signed JARs. - -The JVM enclave ---------------- - -This consists of two parts: the untrusted code that loads the enclave and provides the OCALLs (see `sgx-jvm/jvm-enclave/main.cpp`), and the trusted enclave that constructs the JVM using JNI and runs the enclavelet class. (see `sgx-jvm/jvm-enclave/enclave/enclave.cpp`). - -Dynamic loading, linkage ------------------------- - -Avian by default loads some JVM specific code dynamically, and looks up these symbols at runtime. We link these symbols statically and provide a simple binary search lookup at runtime to find the symbols corresponding to symbol name strings. To see how this is done check `sgx-jvm/jvm-enclave/enclave/gen_dispatch_table.py`. - -Avian also statically links against system libraries providing usual OS functionality. We deal with this by stubbing all of the undefined symbols and implementing/mocking them as needed. The stub generation simply greps for undefined symbols when running make, check `sgx-jvm/jvm-enclave/enclave/gen-stubsyms.sh` for this. The implemented/mocked OS functions reside in `sgx-jvm/jvm-enclave/enclave/os_support.cpp` diff --git a/sgx-jvm/avian/.clang-format b/sgx-jvm/avian/.clang-format deleted file mode 100644 index 910160fcbe..0000000000 --- a/sgx-jvm/avian/.clang-format +++ /dev/null @@ -1,7 +0,0 @@ ---- -BasedOnStyle: Chromium -IndentCaseLabels: false -BreakBeforeBraces: Stroustrup -AllowShortFunctionsOnASingleLine: false -BreakBeforeBinaryOperators: true -... diff --git a/sgx-jvm/avian/.gitignore b/sgx-jvm/avian/.gitignore deleted file mode 100644 index 6767701eae..0000000000 --- a/sgx-jvm/avian/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -.gdb_history -/build -*~ -.classpath -.project -.settings -bin -/lib -/distrib -*.pdb -*.swp -/.gradle -/*.sublime-* -workspace/ -src/.cproject -/cmake-build -/cmake-build -.idea/* diff --git a/sgx-jvm/avian/.mailmap b/sgx-jvm/avian/.mailmap deleted file mode 100644 index 12fd7d9627..0000000000 --- a/sgx-jvm/avian/.mailmap +++ /dev/null @@ -1,27 +0,0 @@ -Carsten Elton Sørensen -Carsten Elton Sørensen -Dain Darnell -Dain Darnell -Edison Guo -Jason Treadwell -Jason Treadwell -Jason Treadwell -Jason Treadwell -Jason Treadwell -Jason Treadwell -Jason Treadwell -Jason Treadwell -Jason Treadwell -Joel Dice -Joel Dice -Joel Dice -Joel Dice -Anonymous -Joshua Warner -Matt Weaver -Mike Jensen -Mike Jensen -Mike Jensen -Terek Campbell -Thiago Bedin Frustaci -Zsombor Gegesy diff --git a/sgx-jvm/avian/.travis.yml b/sgx-jvm/avian/.travis.yml deleted file mode 100644 index 42265efb47..0000000000 --- a/sgx-jvm/avian/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: cpp -cache: apt - -os: - - linux - - osx - -env: - matrix: - - BUILD_STEP="" -# disabled until/unless jfrog.org credentials are updated and someone -# decides they care about published artifacts: -# - BUILD_STEP="PUBLISH" - global: - - TERM=dumb - - secure: rh1utD4shKmYtokItuRYEF9WsfTnvZO5XqnTU4DHTS7quHHgLihtOO2/3+B+2W2hEd5Obr2or8zx+zmzWcNUyLokZ0j/FRLWSScNkLzTtm12pupLrncY+/g1NIdfbhn+OLRIzBz6zB6m6a2qWFEJ+bScUNGD/7wZVtzkujqlDEE= - - secure: j9DOzZMCYk/BzhKK9u4XMKpCzyGOsvP2cLTp6cXE7/tkWDAPVv6BFmeqNbiLTEqk0aGX+HYbY/2YVtpRZmDzfeWtnBFF5mL1Y1tgzx1Kf155C+P6rZgt5PiQTUdXlp2umuRifY1BbXAPc3DZ2UOPUjWKnLHVbZLQRgO1zimmMx8= - -matrix: - fast_finish: true - exclude: - - os: osx - env: BUILD_STEP="" - -script: ./test/ci.sh ${BUILD_STEP} diff --git a/sgx-jvm/avian/.utility/push-javadoc-to-gh-pages.sh b/sgx-jvm/avian/.utility/push-javadoc-to-gh-pages.sh deleted file mode 100755 index c3690b49de..0000000000 --- a/sgx-jvm/avian/.utility/push-javadoc-to-gh-pages.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -# This script was originally written by maxiaohao in the aws-mock GitHub project. -# https://github.com/treelogic-swe/aws-mock/ - -if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then - - echo "Start to publish lastest Javadoc to gh-pages..." - - cd build/ - - if test -d gh-pages/avian-web - then - cd gh-pages/avian-web - git pull - else - git clone --quiet https://${GH_TOKEN}@github.com/ReadyTalk/readytalk.github.io gh-pages > /dev/null - cd gh-pages/avian-web - git config user.email "travis@travis-ci.org" - git config user.name "travis-ci" - fi - - git rm -rf ./javadoc - cp -Rf ../javadoc ./javadoc - git add -f . - git commit -m "Latest javadoc on successful Travis build $TRAVIS_BUILD_NUMBER auto-pushed to readytalk.github.io" - if ! git push -fq origin master &> /dev/null; then - echo "Error pushing gh-pages to origin. Bad GH_TOKEN? GitHub down?" - else - echo "Done magic with auto publishment to readytalk.github.io." - fi -fi diff --git a/sgx-jvm/avian/CMakeLists.txt b/sgx-jvm/avian/CMakeLists.txt deleted file mode 100644 index 19c4b900b6..0000000000 --- a/sgx-jvm/avian/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -# NOTE that this CMake file doesn't current build all of avian. -# It only builds what's required for example/kaleidoscope. - -cmake_minimum_required (VERSION 2.6) -project (avian) - -include_directories (include src) - -add_definitions ( - -DAVIAN_TARGET_FORMAT=AVIAN_FORMAT_MACHO - - -DAVIAN_TARGET_ARCH=AVIAN_ARCH_X86_64 - - -DTARGET_BYTES_PER_WORD=8 - -D__STDC_LIMIT_MACROS - -D__STDC_CONSTANT_MACROS -) - -include ("cmake/Platform.cmake") - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CXX_FLAGS}") - -include (CTest) - -# Sadly, we can't use the 'test' target, as that's coopted by ctest -add_custom_target(check ${CMAKE_CTEST_COMMAND} -V) - -add_subdirectory (src) -add_subdirectory (unittest) diff --git a/sgx-jvm/avian/LICENSE.txt b/sgx-jvm/avian/LICENSE.txt deleted file mode 100644 index 71731a35a9..0000000000 --- a/sgx-jvm/avian/LICENSE.txt +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2008-2015, Avian Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/sgx-jvm/avian/README.md b/sgx-jvm/avian/README.md deleted file mode 100644 index 80434004dc..0000000000 --- a/sgx-jvm/avian/README.md +++ /dev/null @@ -1,750 +0,0 @@ -Avian - A lightweight Java Virtual Machine (JVM) -================================================ - -[![Build Status](https://travis-ci.org/ReadyTalk/avian.png?branch=master)](https://travis-ci.org/ReadyTalk/avian) - -Quick Start ------------ - -These are examples of building Avian on various operating systems for -the x86_64 architecture. You may need to modify JAVA_HOME according -to where the JDK is installed on your system. In all cases, be sure -to use forward slashes in the path. - -#### on Linux: - $ export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 - $ make - $ build/linux-x86_64/avian -cp build/linux-x86_64/test Hello - -#### on Mac OS X: - $ export JAVA_HOME=$(/usr/libexec/java_home) - $ make - $ build/macosx-x86_64/avian -cp build/macosx-x86_64/test Hello - -#### on Windows (Cygwin): - $ git clone git@github.com:ReadyTalk/win64.git ../win64 - $ export JAVA_HOME="/cygdrive/c/Program Files/Java/jdk1.7.0_45" - $ make - $ build/windows-x86_64/avian -cp build/windows-x86_64/test Hello - -#### on FreeBSD: - $ export JAVA_HOME=/usr/local/openjdk7 - $ gmake - $ build/freebsd-x86_64/avian -cp build/freebsd-x86_64/test Hello - - -Introduction ------------- - -Avian is a lightweight virtual machine and class library designed to -provide a useful subset of Java's features, suitable for building -self-contained applications. More information is available at the -project [web site](http://readytalk.github.io/avian). - -If you have any trouble building, running, or embedding Avian, please -post a message to our [discussion group](http://groups.google.com/group/avian). - -That's also the place for any other questions, comments, or -suggestions you might have. - - -Supported Platforms -------------------- - -Avian can currently target the following platforms: - - * Linux (i386, x86_64, ARM, and ARM64) - * Windows (i386 and x86_64) - * Mac OS X (i386 and x86_64) - * Apple iOS (i386, x86_64, ARM, and ARM64) - * FreeBSD (i386, x86_64) - - -Building --------- - -Build requirements include: - - * GNU make 3.80 or later - * GCC 4.6 or later - or LLVM Clang 3.1 or later (see use-clang option below) - * JDK 1.6 or later - * MinGW 3.4 or later (only if compiling for Windows) - * zlib 1.2.3 or later - -Earlier versions of some of these packages may also work but have not -been tested. - -The build is directed by a single makefile and may be influenced via -certain flags described below, all of which are optional. - - $ make \ - platform={linux,windows,macosx,ios,freebsd} \ - arch={i386,x86_64,arm,arm64} \ - process={compile,interpret} \ - mode={debug,debug-fast,fast,small} \ - lzma= \ - bootimage={true,false} \ - tails={true,false} \ - continuations={true,false} \ - use-clang={true,false} \ - openjdk= \ - openjdk-src= \ - android= - - * `platform` - the target platform - * _default:_ output of $(uname -s | tr [:upper:] [:lower:]), -normalized in some cases (e.g. CYGWIN_NT-5.1 -> windows) - - * `arch` - the target architecture - * _default:_ output of $(uname -m), normalized in some cases -(e.g. i686 -> i386) - - * `process` - choice between pure interpreter or JIT compiler - * _default:_ compile - - * `mode` - which set of compilation flags to use to determine -optimization level, debug symbols, and whether to enable -assertions - * _default:_ fast - - * `lzma` - if set, support use of LZMA to compress embedded JARs and -boot images. The value of this option should be a directory -containing a recent LZMA SDK (available [here](http://www.7-zip.org/sdk.html)). Currently, only version 9.20 of -the SDK has been tested, but other versions might work. - * _default:_ not set - - * `armv6` - if true, don't use any instructions newer than armv6. By -default, we assume the target is armv7 or later, and thus requires explicit -memory barrier instructions to ensure cache coherency - - * `bootimage` - if true, create a boot image containing the pre-parsed -class library and ahead-of-time compiled methods. This option is -only valid for process=compile builds. Note that you may need to -specify both build-arch=x86_64 and arch=x86_64 on 64-bit systems -where "uname -m" prints "i386". - * _default:_ false - - * `tails` - if true, optimize each tail call by replacing the caller's -stack frame with the callee's. This convention ensures proper -tail recursion, suitable for languages such as Scheme. This -option is only valid for process=compile builds. - * _default:_ false - - * `continuations` - if true, support continuations via the -avian.Continuations methods callWithCurrentContinuation and -dynamicWind. See Continuations.java for details. This option is -only valid for process=compile builds. - * _default:_ false - - * `use-clang` - if true, use LLVM's clang instead of GCC to build. -Note that this does not currently affect cross compiles, only -native builds. - * _default:_ false - - * `openjdk` - if set, use the OpenJDK class library instead of the -default Avian class library. See "Building with the OpenJDK Class -Library" below for details. - * _default:_ not set - - * `openjdk-src` - if this and the openjdk option above are both set, -build an embeddable VM using the OpenJDK class library. The JNI -components of the OpenJDK class library will be built from the -sources found under the specified directory. See "Building with -the OpenJDK Class Library" below for details. - * _default:_ not set - - * `android` - if set, use the Android class library instead of the -default Avian class library. See "Building with the Android Class -Library" below for details. - * _default:_ not set - -These flags determine the name of the directory used for the build. -The name always starts with _${platform}-${arch}_, and each non-default -build option is appended to the name. For example, a debug build with -bootimage enabled on Linux/x86_64 would be built in -_build/linux-x86_64-debug-bootimage_. This allows you to build with -several different sets of options independently and even -simultaneously without doing a clean build each time. - -Note that not all combinations of these flags are valid. For instance, -non-jailbroken iOS devices do not allow JIT compilation, so only -process=interpret or bootimage=true builds will run on such -devices. See [here](https://github.com/ReadyTalk/hello-ios) for an -example of an Xcode project for iOS which uses Avian. - -If you are compiling for Windows, you may either cross-compile using -MinGW or build natively on Windows under Cygwin. - -#### Installing Cygwin: - - __1.__ Download and run setup.exe from [cygwin's website](http://www.cygwin.com), installing the base - system and these packages: make, gcc-mingw-g++, - mingw64-i686-gcc-g++, mingw64-x86_64-gcc-g++, and (optionally) git. - -You may also find our win32 repository useful: (run this from the -directory containing the avian directory) - - $ git clone git@github.com:ReadyTalk/win32.git - -This gives you the Windows JNI headers, zlib headers and library, and -a few other useful libraries like OpenSSL, libjpeg, and libpng. -There's also a win64 repository for 64-bit builds: - - $ git clone git@github.com:ReadyTalk/win64.git - - -Building with the Microsoft Visual C++ Compiler ------------------------------------------------ - -You can also build using the MSVC compiler, which makes debugging with -tools like WinDbg and Visual Studio much easier. Note that you will -still need to have GCC installed - MSVC is only used to compile the -C++ portions of the VM, while the assembly code and helper tools are -built using GCC. - -*Note that the MSVC build isn't tested regularly, so is fairly likely to be broken.* - -Avian targets MSVC 11 and above (it uses c++ features not available in older versions). - -To build with MSVC, install Cygwin as described above and set the -following environment variables: - - $ export PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Program Files/Microsoft Visual Studio 11.0/Common7/IDE:/cygdrive/c/Program Files/Microsoft Visual Studio 11.0/VC/BIN:/cygdrive/c/Program Files/Microsoft Visual Studio 11.0/Common7/Tools:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v3.5:/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727:/cygdrive/c/Program Files/Microsoft Visual Studio 11.0/VC/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v6.0A/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem" - $ export LIBPATH="C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 11.0\VC\LIB;" - $ export VCINSTALLDIR="C:\Program Files\Microsoft Visual Studio 11.0\VC" - $ export LIB="C:\Program Files\Microsoft Visual Studio 11.0\VC\LIB;C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib;" - $ export INCLUDE="C:\Program Files\Microsoft Visual Studio 11.0\VC\INCLUDE;C:\Program Files\Microsoft SDKs\Windows\v6.0A\include;" - -Adjust these definitions as necessary according to your MSVC -installation. - -Finally, build with the msvc flag set to the MSVC tool directory: - - $ make msvc="/cygdrive/c/Program Files/Microsoft Visual Studio 11.0/VC" - - -Building with the OpenJDK Class Library ---------------------------------------- - -By default, Avian uses its own lightweight class library. However, -that library only contains a relatively small subset of the classes -and methods included in the JRE. If your application requires -features beyond that subset, you may want to tell Avian to use -OpenJDK's class library instead. To do so, specify the directory -where OpenJDK is installed, e.g.: - - $ make openjdk=/usr/lib/jvm/java-7-openjdk - -This will build Avian as a conventional JVM (e.g. libjvm.so) which -loads its boot class library and native libraries (e.g. libjava.so) -from _/usr/lib/jvm/java-7-openjdk/jre_ at runtime. Note that you must -use an absolute path here, or else the result will not work when run -from other directories. In this configuration, OpenJDK needs to -remain installed for Avian to work, and you can run applications like -this: - - $ build/linux-x86_64-openjdk/avian-dynamic -cp /path/to/my/application \ - com.example.MyApplication - -Alternatively, you can enable a stand-alone build using OpenJDK by -specifying the location of the OpenJDK source code, e.g.: - - $ make openjdk=$(pwd)/../jdk7/build/linux-amd64/j2sdk-image \ - openjdk-src=$(pwd)/../jdk7/jdk/src - -You must ensure that the path specified for openjdk-src does not have -any spaces in it; make gets confused when dependency paths include -spaces, and we haven't found away around that except to avoid paths -with spaces entirely. - -The result of such a build is a self-contained binary which does not -depend on external libraries, jars, or other files. In this case, the -specified paths are used only at build time; anything needed at -runtime is embedded in the binary. Thus, the process of running an -application is simplified: - - $ build/linux-x86_64-openjdk-src/avian -cp /path/to/my/application \ - com.example.MyApplication - -Note that the resulting binary will be very large due to the size of -OpenJDK's class library. This can be mitigated using UPX, preferably -an LZMA-enabled version: - - $ upx --lzma --best build/linux-x86_64-openjdk-src/avian - -You can reduce the size futher for embedded builds by using ProGuard -and the supplied openjdk.pro configuration file (see "Embedding with -ProGuard and a Boot Image" below). Note that you'll still need to use -vm.pro in that case -- openjdk.pro just adds additional constraints -specific to the OpenJDK port. Also see -[app.mk](https://github.com/ReadyTalk/avian-swt-examples/blob/master/app.mk) -in the _avian-swt-examples_ project for an example of using Avian, -OpenJDK, ProGuard, and UPX in concert. - -Here are some examples of how to install OpenJDK and build Avian with -it on various OSes: - -#### Debian-based Linux: -_Conventional build:_ - - $ apt-get install openjdk-7-jdk - $ make openjdk=/usr/lib/jvm/java-7-openjdk test - -_Stand-alone build:_ - - $ apt-get install openjdk-7-jdk - $ apt-get source openjdk-7-jdk - $ apt-get build-dep openjdk-7-jdk - $ (cd openjdk-7-7~b147-2.0 && dpkg-buildpackage) - $ make openjdk=/usr/lib/jvm/java-7-openjdk \ - openjdk-src=$(pwd)/openjdk-7-7~b147-2.0/build/openjdk/jdk/src \ - test - -####Mac OS X: -_Prerequisite:_ Build OpenJDK 7 according to [this site](https://wikis.oracle.com/display/OpenJDK/Mac+OS+X+Port). - -_Conventional build:_ - - $ make openjdk=$(pwd)/../jdk7u-dev/build/macosx-amd64/j2sdk-image test - -_Stand-alone build:_ - - $ make openjdk=$(pwd)/../jdk7u-dev/build/macosx-amd64/j2sdk-image \ - openjdk-src=$(pwd)/../p/jdk7u-dev/jdk/src test - -####Windows (Cygwin): -_Prerequisite:_ Build OpenJDK 7 according to [this site](http://weblogs.java.net/blog/simonis/archive/2011/10/28/yaojowbi-yet-another-openjdk-windows-build-instruction). Alternatively, use https://github.com/alexkasko/openjdk-unofficial-builds. - -_Conventional build:_ - - $ make openjdk=$(pwd)/../jdk7u-dev/build/windows-i586/j2sdk-image test - -_Stand-alone build:_ - - $ make openjdk=$(pwd)/../jdk7u-dev/build/windows-i586/j2sdk-image \ - openjdk-src=$(pwd)/../p/jdk7u-dev/jdk/src test - -Currently, only OpenJDK 7 is supported. Later versions might work, -but have not yet been tested. - - -Building with the Android Class Library ---------------------------------------- -As an alternative to both the Avian and OpenJDK class libaries, you -can also build with the Android class library. Now it should work on Linux, OS X and Windows. - -The simpliest way to build Avian with Android classpath is to use `avian-pack` project: https://github.com/bigfatbrowncat/avian-pack - -Avian-pack consists of Avian itself with some Android components (such as libcore and icu4c). - -Note that we use the upstream OpenSSL repository and apply the -Android patches to it. This is because it is not clear how to build -the Android fork of OpenSSL directly without checking out and building -the entire platform. As of this writing, the patches apply cleanly -against OpenSSL 1.0.1h, so that's the tag we check out, but this may -change in the future when the Android fork rebases against a new -OpenSSL version. - -Installing ----------- - -Installing Avian is as simple as copying the executable to the desired -directory: - - $ cp build/${platform}-${arch}/avian ~/bin/ - - -Embedding ---------- - -The following series of commands illustrates how to produce a -stand-alone executable out of a Java application using Avian. - -Note: if you are building on Cygwin, prepend "x86_64-w64-mingw32-" or -"i686-w64-mingw32-" to the ar, g++, gcc, strip, and dlltool commands -below (e.g. x86_64-w64-mingw32-gcc). - -__1.__ Build Avian, create a new directory, and populate it with the -VM object files and bootstrap classpath jar. - - $ make - $ mkdir hello - $ cd hello - $ ar x ../build/${platform}-${arch}/libavian.a - $ cp ../build/${platform}-${arch}/classpath.jar boot.jar - -__2.__ Build the Java code and add it to the jar. - - $ cat >Hello.java <embedded-jar-main.cpp <("-Xbootclasspath:[bootJar]"); - - JavaVM* vm; - void* env; - JNI_CreateJavaVM(&vm, &env, &vmArgs); - JNIEnv* e = static_cast(env); - - jclass c = e->FindClass("Hello"); - if (not e->ExceptionCheck()) { - jmethodID m = e->GetStaticMethodID(c, "main", "([Ljava/lang/String;)V"); - if (not e->ExceptionCheck()) { - jclass stringClass = e->FindClass("java/lang/String"); - if (not e->ExceptionCheck()) { - jobjectArray a = e->NewObjectArray(ac-1, stringClass, 0); - if (not e->ExceptionCheck()) { - for (int i = 1; i < ac; ++i) { - e->SetObjectArrayElement(a, i-1, e->NewStringUTF(av[i])); - } - - e->CallStaticVoidMethod(c, m, a); - } - } - } - } - - int exitCode = 0; - if (e->ExceptionCheck()) { - exitCode = -1; - e->ExceptionDescribe(); - } - - vm->DestroyJavaVM(); - - return exitCode; - } - EOF - -__on Linux:__ - - $ g++ -I$JAVA_HOME/include -I$JAVA_HOME/include/linux \ - -D_JNI_IMPLEMENTATION_ -c embedded-jar-main.cpp -o main.o - -__on Mac OS X:__ - - $ g++ -I$JAVA_HOME/include -I$JAVA_HOME/include/darwin \ - -D_JNI_IMPLEMENTATION_ -c embedded-jar-main.cpp -o main.o - -__on Windows:__ - - $ g++ -fno-exceptions -fno-rtti -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/win32" \ - -D_JNI_IMPLEMENTATION_ -c embedded-jar-main.cpp -o main.o - -__5.__ Link the objects produced above to produce the final -executable, and optionally strip its symbols. - -__on Linux:__ - - $ g++ -rdynamic *.o -ldl -lpthread -lz -o hello - $ strip --strip-all hello - -__on Mac OS X:__ - - $ g++ -rdynamic *.o -ldl -lpthread -lz -o hello -framework CoreFoundation - $ strip -S -x hello - -__on Windows:__ - - $ dlltool -z hello.def *.o - $ dlltool -d hello.def -e hello.exp - $ gcc hello.exp *.o -L../../win32/lib -lmingwthrd -lm -lz -lws2_32 \ - -lIphlpapi -mwindows -mconsole -o hello.exe - $ strip --strip-all hello.exe - -Embedding with ProGuard and a Boot Image ----------------------------------------- - -The following illustrates how to embed an application as above, except -this time we preprocess the code using ProGuard and build a boot image -from it for quicker startup. The pros and cons of using ProGuard are -as follow: - - * Pros: ProGuard will eliminate unused code, optimize the rest, and - obfuscate it as well for maximum space savings - - * Cons: increased build time, especially for large applications, and - extra effort needed to configure it for applications which rely - heavily on reflection and/or calls to Java from native code - -For boot image builds: - - * Pros: the boot image build pre-parses all the classes and compiles - all the methods, obviating the need for JIT compilation at runtime. - This also makes garbage collection faster, since the pre-parsed - classes are never visited. - - * Cons: the pre-parsed classes and AOT-compiled methods take up more - space in the executable than the equivalent class files. In - practice, this can make the executable 30-50% larger. Also, AOT - compilation does not yet yield significantly faster or smaller code - than JIT compilation. Finally, floating point code may be slower - on 32-bit x86 since the compiler cannot assume SSE2 support will be - available at runtime, and the x87 FPU is not supported except via - out-of-line helper functions. - -Note you can use ProGuard without using a boot image and vice-versa, -as desired. - -The following instructions assume we are building for Linux/x86_64. -Please refer to the previous example for guidance on other platforms. - -__1.__ Build Avian, create a new directory, and populate it with the -VM object files. - - $ make bootimage=true - $ mkdir hello - $ cd hello - $ ar x ../build/linux-x86_64-bootimage/libavian.a - -__2.__ Create a stage1 directory and extract the contents of the -class library jar into it. - - $ mkdir stage1 - $ (cd stage1 && jar xf ../../build/linux-x86_64-bootimage/classpath.jar) - -__3.__ Build the Java code and add it to stage1. - - $ cat >Hello.java <hello.pro <bootimage-main.cpp <("-Davian.bootimage=bootimageBin"); - - options[1].optionString - = const_cast("-Davian.codeimage=codeimageBin"); - - JavaVM* vm; - void* env; - JNI_CreateJavaVM(&vm, &env, &vmArgs); - JNIEnv* e = static_cast(env); - - jclass c = e->FindClass("Hello"); - if (not e->ExceptionCheck()) { - jmethodID m = e->GetStaticMethodID(c, "main", "([Ljava/lang/String;)V"); - if (not e->ExceptionCheck()) { - jclass stringClass = e->FindClass("java/lang/String"); - if (not e->ExceptionCheck()) { - jobjectArray a = e->NewObjectArray(ac-1, stringClass, 0); - if (not e->ExceptionCheck()) { - for (int i = 1; i < ac; ++i) { - e->SetObjectArrayElement(a, i-1, e->NewStringUTF(av[i])); - } - - e->CallStaticVoidMethod(c, m, a); - } - } - } - } - - int exitCode = 0; - if (e->ExceptionCheck()) { - exitCode = -1; - e->ExceptionDescribe(); - } - - vm->DestroyJavaVM(); - - return exitCode; - } - EOF - - $ g++ -I$JAVA_HOME/include -I$JAVA_HOME/include/linux \ - -D_JNI_IMPLEMENTATION_ -c bootimage-main.cpp -o main.o - -__8.__ Link the objects produced above to produce the final - executable, and optionally strip its symbols. - - $ g++ -rdynamic *.o -ldl -lpthread -lz -o hello - $ strip --strip-all hello - - -Trademarks ----------- - -Oracle and Java are registered trademarks of Oracle and/or its -affiliates. Other names may be trademarks of their respective owners. - -The Avian project is not affiliated with Oracle. diff --git a/sgx-jvm/avian/android.pro b/sgx-jvm/avian/android.pro deleted file mode 100644 index 00941ff874..0000000000 --- a/sgx-jvm/avian/android.pro +++ /dev/null @@ -1,89 +0,0 @@ -# these are referenced in JniConstants.cpp: - --keep class java.text.Bidi$Run --keep class java.math.BigDecimal --keep class java.lang.Boolean --keep class java.lang.Byte --keep class java.nio.charset.CharsetICU { - CharsetICU(java.lang.String, java.lang.String, java.lang.String[]); - } --keep class java.lang.reflect.Constructor --keep class java.util.zip.Deflater --keep class java.lang.Double --keep class libcore.io.ErrnoException --keep class java.lang.reflect.Field --keep class libcore.icu.NativeDecimalFormat$FieldPositionIterator { - void setData(int[]); - } --keep class java.io.FileDescriptor --keep class libcore.io.GaiException --keep class java.net.Inet6Address --keep class java.net.InetAddress --keep class java.net.InetSocketAddress --keep class java.net.InetUnixAddress --keep class java.util.zip.Inflater --keep class java.lang.Integer --keep class libcore.icu.LocaleData --keep class java.lang.Long --keep class java.lang.reflect.Method --keep class libcore.util.MutableInt --keep class libcore.util.MutableLong --keep class java.text.ParsePosition --keep class java.util.regex.PatternSyntaxException --keep class java.lang.RealToString --keep class java.net.Socket --keep class java.net.SocketImpl --keep class java.lang.String --keep class libcore.io.StructAddrinfo { - ; - } --keep class libcore.io.StructFlock --keep class libcore.io.StructGroupReq --keep class libcore.io.StructLinger --keep class libcore.io.StructPasswd { - StructPasswd(java.lang.String, int, int, java.lang.String, java.lang.String); - } --keep class libcore.io.StructPollfd --keep class libcore.io.StructStat { - StructStat(long, long, int, long, int, int, long, long, long, long, long, long, long); - } --keep class libcore.io.StructStatFs --keep class libcore.io.StructTimeval --keep class libcore.io.StructUtsname { - StructUtsname(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String); - } --keep class libcore.io.StructUcred - -# referenced from libcore native code - --keep class libcore.icu.LocaleData { - ; - } - --keep class org.conscrypt.OpenSSLBIOInputStream { - ; - } - --keep class java.util.Calendar { - void set(int, int, int, int, int, int); - } - -# called from the VM - --keep class java.lang.Thread { - Thread(java.lang.ThreadGroup, java.lang.String, int, boolean); - } - --keep class avian.Classes { - java.lang.Class forName(java.lang.String, boolean, java.lang.ClassLoader); - int findField(avian.VMClass, java.lang.String); - int findMethod(avian.VMClass, java.lang.String, java.lang.Class[]); - java.lang.annotation.Annotation getAnnotation(java.lang.ClassLoader, java.lang.Object[]); - } - --keep class java.lang.VMThread { - VMThread(java.lang.Thread); - } - -# loaded reflectively to handle embedded resources: --keep class avian.avianvmresource.Handler diff --git a/sgx-jvm/avian/build.gradle b/sgx-jvm/avian/build.gradle deleted file mode 100644 index 7c49e302bc..0000000000 --- a/sgx-jvm/avian/build.gradle +++ /dev/null @@ -1,323 +0,0 @@ -buildscript { - repositories { - jcenter() - } - - dependencies { - classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:2.2.4' - } -} - -apply plugin: 'native-component' -apply plugin: 'ivy-publish' -apply plugin: 'java' -apply plugin: 'artifactory-publish' - -enum SupportedOS implements OperatingSystem { - LINUX, WINDOWS, MACOSX; - - public static final SupportedOS CURRENT; - - static { - String p = System.properties['os.name'] - switch(p.replaceAll(' ', '').toLowerCase()) { - case ~/.*linux.*/: CURRENT = LINUX; break; - case ~/.*darwin.*/: CURRENT = MACOSX; break; - case ~/.*osx.*/: CURRENT = MACOSX; break; - case ~/.*win.*/: CURRENT = WINDOWS; break; - default: - String m = "SupportedOS: unrecognized platform: ${p}" - println(m) - throw new IllegalArgumentException(m) - } - } - - public String getName() { - return toString().toLowerCase() - } - - public String getDisplayName() { - return getName() - } - public boolean isCurrent() { return this == CURRENT } - public boolean isFreeBSD() { return false } - public boolean isLinux() { return this == LINUX } - public boolean isMacOsX() { return this == MACOSX } - public boolean isSolaris() { return false } - public boolean isWindows() { return this == WINDOWS } - -} - -public String adjustArch(String arch) { - switch(arch) { - case ~/.*64.*/: return 'x86_64' - default: return 'i386' - } -} - -ext { - currentPlatform = SupportedOS.CURRENT.getName() - currentArch = adjustArch(System.properties['os.arch']) - currentPlatformArch = "${currentPlatform}-${currentArch}" - - platform = project.hasProperty('platform') ? platform : currentPlatform - arch = project.hasProperty('arch') ? arch : currentArch - platformArch = "${platform}-${arch}" - - java_home = System.properties.'java.home' - if(java_home.endsWith("/jre")) { - java_home = java_home.substring(0, java_home.length() - "/jre".length()) - } - java_home = java_home - - libDir = "${buildDir}/lib" - lzmaDir = "${libDir}/lzma" - - buildOptions = ['', '-lzma'] -} - -repositories { - ivy { - name "ivyLocal" - url "${System.env.HOME}/.ivy2/local" - layout 'maven' - } - - ivy { - name "jcenter" - if(version.contains("SNAPSHOT")) { - url "http://oss.jfrog.org/artifactory/oss-snapshot-local" - } else { - url "http://oss.jfrog.org/artifactory/oss-release-local" - } - layout 'maven' - } -} - -configurations { - create('windows-i386') - create('windows-x86_64') -} - -dependencies { - 'windows-i386' "com.readytalk:win32:1.0.0-SNAPSHOT" - 'windows-x86_64' "com.readytalk:win64:1.0.0-SNAPSHOT" -} - -model { - platforms { - create(platformArch) { - operatingSystem SupportedOS.valueOf(platform.toUpperCase()) - architecture "${arch}" - } - } - - tasks { - buildOptions.each { buildOption -> - platforms.each { platform -> - if(platform.operatingSystem.name == "windows") { - def artifactName = platform.architecture.name == "i386" ? 'win32' : 'win64' - - task "extract${platform.name}${buildOption}"(type: Copy) { - from { - tarTree(configurations."${platform.name}".find { it.name =~ artifactName }) - } - into "${libDir}/tools" - } - } - - task "build${platform.name}${buildOption}"(type: Exec) { - executable "make" - args "platform=${platform.operatingSystem.name}", - "arch=${platform.architecture.name}" - - if(buildOption == "-lzma") { - dependsOn 'extractLzma' - args "lzma=${lzmaDir}" - } - - if(platform.operatingSystem.name == "windows") { - dependsOn "extract${platform.name}${buildOption}" - args "win32=${libDir}/tools/win32", - "win64=${libDir}/tools/win64" - } - environment JAVA_HOME: java_home - } - - assemble { - dependsOn "build${platform.name}${buildOption}" - } - } - } - } -} - -tasks.withType(JavaCompile) { - sourceCompatibility = "1.6" - targetCompatibility = "1.6" - - options.with { - encoding = "UTF-8" - bootClasspath = sourceSets.main.output.classesDir - } -} - -sourceSets { - main { - java { - srcDir 'classpath' - } - } -} - -javadoc { - title = "Avian v${version} Class Library API" -} - -task javadocJar(type: Jar) { - dependsOn javadoc - classifier = 'javadoc' - from { - javadoc.destinationDir - } -} - -jar { - baseName "classpath-avian" -} - -task downloadLzma(type: Exec) { - commandLine "curl" - args "--create-dirs", "-o", "${lzmaDir}/lzma920.tar.bz2", "-f", "http://oss.readytalk.com/avian-web/lzma920.tar.bz2" -} - -task extractLzma(type: Copy) { - dependsOn downloadLzma - from { - tarTree(resources.bzip2("${lzmaDir}/lzma920.tar.bz2")) - } - into lzmaDir -} - -task install { - dependsOn assemble, publish -} - -publishing { - repositories { - add(project.repositories."ivyLocal") - } - - publications { - - ivy(IvyPublication) { - from components.java - - artifact(javadocJar) - - artifact("vm.pro") { - name "vm" - type "proguard" - extension "pro" - } - - module "classpath-avian" - } - - create("tools-avian-${currentPlatformArch}", IvyPublication) { - module "tools-avian-${currentPlatformArch}" - - def publishBinSuffix = currentPlatform == "windows" ? "exe" : "bin" - def binSuffix = currentPlatform == "windows" ? ".exe" : "" - artifact("${buildDir}/${currentPlatform}-${currentArch}/binaryToObject/binaryToObject${binSuffix}") { - name "binaryToObject" - type publishBinSuffix - extension publishBinSuffix - } - } - - buildOptions.each { buildOption -> - platforms.each { platform -> - def binSuffix="" - def publishBinSuffix="bin" - - create("${platform.name}${buildOption}", IvyPublication) { - def nativeBuildDir = "${buildDir}/${platform.operatingSystem.name}-${platform.architecture.name}${buildOption}" - - if(platform.operatingSystem.name == "windows") { - publishBinSuffix = "exe" - binSuffix = ".${publishBinSuffix}" - } - - module "runtime-avian${buildOption}-${platform.name}" - - artifact("${nativeBuildDir}/avian${binSuffix}") { - name "avian" - type publishBinSuffix - extension publishBinSuffix - } - - artifact("${nativeBuildDir}/libavian.a") { - name "libavian" - type "a" - extension "a" - } - - if (buildOption == "-lzma") { - artifact("${nativeBuildDir}/libavian-lzma.a") { - name "libavian-lzma" - type "a" - extension "a" - } - - artifact("${nativeBuildDir}/lzma/lzma${binSuffix}") { - name "lzma" - type publishBinSuffix - extension publishBinSuffix - } - } - } - } - } - } -} - -artifactoryPublish { - onlyIf { - // TRAVIS_BRANCH reports master if it is a master build or a PR going to master - // TRAVIS_PULL_REQUEST reports false if not a pull request and the PR number if it is - System.env.'TRAVIS_BRANCH' == "master" && System.env.'TRAVIS_PULL_REQUEST' == "false" - } - dependsOn assemble -} - -artifactory { - contextUrl = "http://oss.jfrog.org" - - resolve { - repository { - repoKey = 'libs-releases' - } - } - - publish { - repository { - repoKey = 'oss-snapshot-local' - username = System.env.BINTRAY_USER - password = System.env.BINTRAY_API_KEY - ivy { - ivyLayout = "[organisation]/[module]/[revision]/ivy-[revision].xml" - } - } - - defaults { - platforms.each { - publications it.name - } - } - } -} - -task wrapper(type: Wrapper) { - distributionUrl = 'http://services.gradle.org/distributions/gradle-2.0-bin.zip' -} diff --git a/sgx-jvm/avian/classpath/avian/Addendum.java b/sgx-jvm/avian/classpath/avian/Addendum.java deleted file mode 100644 index 79c9a75577..0000000000 --- a/sgx-jvm/avian/classpath/avian/Addendum.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class Addendum { - public Singleton pool; - public Object annotationTable; - public Object signature; -} diff --git a/sgx-jvm/avian/classpath/avian/AnnotationInvocationHandler.java b/sgx-jvm/avian/classpath/avian/AnnotationInvocationHandler.java deleted file mode 100644 index a15e716f2e..0000000000 --- a/sgx-jvm/avian/classpath/avian/AnnotationInvocationHandler.java +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.lang.reflect.Method; -import java.lang.reflect.InvocationHandler; - -public class AnnotationInvocationHandler implements InvocationHandler { - private Object[] data; - - public AnnotationInvocationHandler(Object[] data) { - this.data = data; - } - - public Object invoke(Object proxy, Method method, Object[] arguments) { - String name = method.getName(); - for (int i = 2; i < data.length; i += 2) { - if (name.equals(data[i])) { - return data[i + 1]; - } - } - return method.getDefaultValue(); - } -} diff --git a/sgx-jvm/avian/classpath/avian/Assembler.java b/sgx-jvm/avian/classpath/avian/Assembler.java deleted file mode 100644 index 64a06fdf81..0000000000 --- a/sgx-jvm/avian/classpath/avian/Assembler.java +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import static avian.Stream.write1; -import static avian.Stream.write2; -import static avian.Stream.write4; - -import avian.ConstantPool.PoolEntry; - -import java.util.List; -import java.io.OutputStream; -import java.io.IOException; - -public class Assembler { - public static final int ACC_PUBLIC = 1 << 0; - public static final int ACC_STATIC = 1 << 3; - - public static final int aaload = 0x32; - public static final int aastore = 0x53; - public static final int aload = 0x19; - public static final int aload_0 = 0x2a; - public static final int aload_1 = 0x2b; - public static final int astore_0 = 0x4b; - public static final int anewarray = 0xbd; - public static final int areturn = 0xb0; - public static final int dload = 0x18; - public static final int dreturn = 0xaf; - public static final int dup = 0x59; - public static final int fload = 0x17; - public static final int freturn = 0xae; - public static final int getfield = 0xb4; - public static final int goto_ = 0xa7; - public static final int iload = 0x15; - public static final int invokeinterface = 0xb9; - public static final int invokespecial = 0xb7; - public static final int invokestatic = 0xb8; - public static final int invokevirtual = 0xb6; - public static final int ireturn = 0xac; - public static final int jsr = 0xa8; - public static final int ldc_w = 0x13; - public static final int lload = 0x16; - public static final int lreturn = 0xad; - public static final int new_ = 0xbb; - public static final int pop = 0x57; - public static final int putfield = 0xb5; - public static final int ret = 0xa9; - public static final int return_ = 0xb1; - - public static void writeClass(OutputStream out, - List pool, - int name, - int super_, - int[] interfaces, - FieldData[] fields, - MethodData[] methods) - throws IOException - { - int codeAttributeName = ConstantPool.addUtf8(pool, "Code"); - - write4(out, 0xCAFEBABE); - write2(out, 0); // minor version - write2(out, 50); // major version - - write2(out, pool.size() + 1); - for (PoolEntry e: pool) { - e.writeTo(out); - } - - write2(out, ACC_PUBLIC); // flags - write2(out, name + 1); - write2(out, super_ + 1); - - write2(out, interfaces.length); - for (int i: interfaces) { - write2(out, i + 1); - } - - write2(out, fields.length); - for (FieldData f: fields) { - write2(out, f.flags); - write2(out, f.nameIndex + 1); - write2(out, f.specIndex + 1); - write2(out, 0); // attribute count - } - - write2(out, methods.length); - for (MethodData m: methods) { - write2(out, m.flags); - write2(out, m.nameIndex + 1); - write2(out, m.specIndex + 1); - - write2(out, 1); // attribute count - write2(out, codeAttributeName + 1); - write4(out, m.code.length); - out.write(m.code); - } - - write2(out, 0); // attribute count - } - - public static class MethodData { - public final int flags; - public final int nameIndex; - public final int specIndex; - public final byte[] code; - - public MethodData(int flags, int nameIndex, int specIndex, byte[] code) { - this.flags = flags; - this.nameIndex = nameIndex; - this.specIndex = specIndex; - this.code = code; - } - } - - public static class FieldData { - public final int flags; - public final int nameIndex; - public final int specIndex; - - public FieldData(int flags, int nameIndex, int specIndex) { - this.flags = flags; - this.nameIndex = nameIndex; - this.specIndex = specIndex; - } - } -} diff --git a/sgx-jvm/avian/classpath/avian/Atomic.java b/sgx-jvm/avian/classpath/avian/Atomic.java deleted file mode 100644 index 53b52da665..0000000000 --- a/sgx-jvm/avian/classpath/avian/Atomic.java +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.lang.reflect.Field; - -public class Atomic { - public static native long getOffset(Field field); - - public static native boolean compareAndSwapObject - (Object o, long offset, Object old, Object new_); -} diff --git a/sgx-jvm/avian/classpath/avian/Callback.java b/sgx-jvm/avian/classpath/avian/Callback.java deleted file mode 100644 index 57c0976452..0000000000 --- a/sgx-jvm/avian/classpath/avian/Callback.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public interface Callback { - public void handleResult(T result); - public void handleException(Throwable exception); -} diff --git a/sgx-jvm/avian/classpath/avian/Cell.java b/sgx-jvm/avian/classpath/avian/Cell.java deleted file mode 100644 index 1425955fec..0000000000 --- a/sgx-jvm/avian/classpath/avian/Cell.java +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class Cell { - public T value; - public Cell next; - - public Cell(T value, Cell next) { - this.value = value; - this.next = next; - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("("); - for (Cell c = this; c != null; c = c.next) { - sb.append(value); - if (c.next != null) { - sb.append(" "); - } - } - sb.append(")"); - return sb.toString(); - } - - public static Cell cons(Car car, Cell cdr) { - return new Cell(car, cdr); - } - - public static boolean equal(T a, T b) { - return (a == null && b == null) || (a != null && a.equals(b)); - } - - public static boolean equal(Cell a, Cell b) { - while (a != null) { - if (b == null || (! equal(a.value, b.value))) { - return false; - } - a = a.next; - b = b.next; - } - - return b == null; - } -} diff --git a/sgx-jvm/avian/classpath/avian/ClassAddendum.java b/sgx-jvm/avian/classpath/avian/ClassAddendum.java deleted file mode 100644 index ef558b59c4..0000000000 --- a/sgx-jvm/avian/classpath/avian/ClassAddendum.java +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class ClassAddendum extends Addendum { - public Object[] interfaceTable; - public InnerClassReference[] innerClassTable; - /** - * If this value is negative, all the methods in VMClass.methodTable - * were declared in that class. Otherwise, only the first - * declaredMethodCount methods in that table were declared in that - * class, while the rest were declared in interfaces implemented or - * extended by that class. - */ - public int declaredMethodCount; - - public byte[] enclosingClass; - - public Pair enclosingMethod; - - public VMMethod[] bootstrapMethodTable; - - public VMMethod[] bootstrapLambdaTable; -} diff --git a/sgx-jvm/avian/classpath/avian/Classes.java b/sgx-jvm/avian/classpath/avian/Classes.java deleted file mode 100644 index b827ab2c71..0000000000 --- a/sgx-jvm/avian/classpath/avian/Classes.java +++ /dev/null @@ -1,602 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import static avian.Stream.read1; -import static avian.Stream.read2; - -import java.net.URL; -import java.net.MalformedURLException; -import java.security.CodeSource; -import java.security.AllPermission; -import java.security.Permissions; -import java.security.ProtectionDomain; -import java.security.cert.Certificate; -import java.lang.reflect.Modifier; -import java.lang.reflect.Method; -import java.lang.reflect.Field; -import java.lang.reflect.Proxy; -import java.lang.annotation.Annotation; -import java.io.InputStream; -import java.io.ByteArrayInputStream; -import java.io.IOException; - -public class Classes { - private static final int LinkFlag = 1 << 8; - - public static native VMClass defineVMClass - (ClassLoader loader, byte[] b, int offset, int length); - - public static native VMClass primitiveClass(char name); - - public static native void initialize(VMClass vmClass); - - public static native boolean isAssignableFrom(VMClass a, VMClass b); - - public static native VMClass toVMClass(Class c); - - public static native VMMethod toVMMethod(Method m); - - private static native VMClass resolveVMClass(ClassLoader loader, byte[] spec) - throws ClassNotFoundException; - - public static VMClass loadVMClass(ClassLoader loader, - byte[] nameBytes, int offset, int length) - { - byte[] spec = new byte[length + 1]; - System.arraycopy(nameBytes, offset, spec, 0, length); - - try { - VMClass c = resolveVMClass(loader, spec); - if (c == null) { - throw new NoClassDefFoundError(); - } - return c; - } catch (ClassNotFoundException e) { - NoClassDefFoundError error = new NoClassDefFoundError - (new String(nameBytes, offset, length)); - error.initCause(e); - throw error; - } - } - - private static Object parseAnnotationValue(ClassLoader loader, - Object pool, - InputStream in) - throws IOException - { - switch (read1(in)) { - case 'Z': - return Boolean.valueOf(Singleton.getInt(pool, read2(in) - 1) != 0); - - case 'B': - return Byte.valueOf((byte) Singleton.getInt(pool, read2(in) - 1)); - - case 'C': - return Character.valueOf((char) Singleton.getInt(pool, read2(in) - 1)); - - case 'S': - return Short.valueOf((short) Singleton.getInt(pool, read2(in) - 1)); - - case 'I': - return Integer.valueOf(Singleton.getInt(pool, read2(in) - 1)); - - case 'F': - return Float.valueOf - (Float.intBitsToFloat(Singleton.getInt(pool, read2(in) - 1))); - - case 'J': { - return Long.valueOf(Singleton.getLong(pool, read2(in) - 1)); - } - - case 'D': { - return Double.valueOf - (Double.longBitsToDouble(Singleton.getLong(pool, read2(in) - 1))); - } - - case 's': { - byte[] data = (byte[]) Singleton.getObject(pool, read2(in) - 1); - - return new String(data, 0, data.length - 1); - } - - case 'e': { - byte[] typeName = (byte[]) Singleton.getObject(pool, read2(in) - 1); - byte[] name = (byte[]) Singleton.getObject(pool, read2(in) - 1); - - return Enum.valueOf - (SystemClassLoader.getClass - (loadVMClass(loader, typeName, 1, typeName.length - 3)), - new String(name, 0, name.length - 1)); - } - - case 'c':{ - byte[] name = (byte[]) Singleton.getObject(pool, read2(in) - 1); - - return SystemClassLoader.getClass - (loadVMClass(loader, name, 1, name.length - 3)); - } - - case '@': - return getAnnotation(loader, parseAnnotation(loader, pool, in)); - - case '[': { - Object[] array = new Object[read2(in)]; - for (int i = 0; i < array.length; ++i) { - array[i] = parseAnnotationValue(loader, pool, in); - } - return array; - } - - default: throw new AssertionError(); - } - } - - private static Object[] parseAnnotation(ClassLoader loader, - Object pool, - InputStream in) - throws IOException - { - byte[] typeName = (byte[]) Singleton.getObject(pool, read2(in) - 1); - Object[] annotation = new Object[(read2(in) + 1) * 2]; - annotation[1] = SystemClassLoader.getClass - (loadVMClass(loader, typeName, 1, typeName.length - 3)); - - for (int i = 2; i < annotation.length; i += 2) { - byte[] name = (byte[]) Singleton.getObject(pool, read2(in) - 1); - annotation[i] = new String(name, 0, name.length - 1); - annotation[i + 1] = parseAnnotationValue(loader, pool, in); - } - - return annotation; - } - - private static Object[] parseAnnotationTable(ClassLoader loader, - Object pool, - InputStream in) - throws IOException - { - Object[] table = new Object[read2(in)]; - for (int i = 0; i < table.length; ++i) { - table[i] = parseAnnotation(loader, pool, in); - } - return table; - } - - private static void parseAnnotationTable(ClassLoader loader, - Addendum addendum) - { - if (addendum != null && addendum.annotationTable instanceof byte[]) { - try { - addendum.annotationTable = parseAnnotationTable - (loader, addendum.pool, new ByteArrayInputStream - ((byte[]) addendum.annotationTable)); - } catch (IOException e) { - AssertionError error = new AssertionError(); - error.initCause(e); - throw error; - } - } - } - - private static int resolveSpec(ClassLoader loader, byte[] spec, int start) { - int result; - int end; - switch (spec[start]) { - case 'L': - ++ start; - end = start; - while (spec[end] != ';') ++ end; - result = end + 1; - break; - - case '[': - end = start + 1; - while (spec[end] == '[') ++ end; - switch (spec[end]) { - case 'L': - ++ end; - while (spec[end] != ';') ++ end; - ++ end; - break; - - default: - ++ end; - } - result = end; - break; - - default: - return start + 1; - } - - loadVMClass(loader, spec, start, end - start); - - return result; - } - - private static int declaredMethodCount(VMClass c) { - ClassAddendum a = c.addendum; - if (a != null) { - int count = a.declaredMethodCount; - if (count >= 0) { - return count; - } - } - VMMethod[] table = c.methodTable; - return table == null ? 0 : table.length; - } - - public static void link(VMClass c, ClassLoader loader) { - acquireClassLock(); - try { - if ((c.vmFlags & LinkFlag) == 0) { - if (c.super_ != null) { - link(c.super_, loader); - } - - parseAnnotationTable(loader, c.addendum); - - if (c.interfaceTable != null) { - int stride = ((c.flags & Modifier.INTERFACE) != 0 ? 1 : 2); - for (int i = 0; i < c.interfaceTable.length; i += stride) { - link((VMClass) c.interfaceTable[i], loader); - } - } - - VMMethod[] methodTable = c.methodTable; - if (methodTable != null) { - for (int i = 0; i < methodTable.length; ++i) { - VMMethod m = methodTable[i]; - - for (int j = 1; j < m.spec.length;) { - j = resolveSpec(loader, m.spec, j); - } - - parseAnnotationTable(loader, m.addendum); - } - } - - if (c.fieldTable != null) { - for (int i = 0; i < c.fieldTable.length; ++i) { - VMField f = c.fieldTable[i]; - - resolveSpec(loader, f.spec, 0); - - parseAnnotationTable(loader, f.addendum); - } - } - - c.vmFlags |= LinkFlag; - } - } finally { - releaseClassLock(); - } - } - - public static void link(VMClass c) { - link(c, c.loader); - } - - public static Class forName(String name, boolean initialize, - ClassLoader loader) - throws ClassNotFoundException - { - if (loader == null) { - loader = Class.class.getClassLoader(); - } - Class c = loader.loadClass(name.replace('/', '.')); - VMClass vmc = SystemClassLoader.vmClass(c); - link(vmc, loader); - if (initialize) { - initialize(vmc); - } - return c; - } - - public static Class forCanonicalName(String name) { - return forCanonicalName(null, name); - } - - public static Class forCanonicalName(ClassLoader loader, String name) { - try { - if (name.startsWith("[")) { - return forName(name, true, loader); - } else if (name.startsWith("L")) { - return forName(name.substring(1, name.length() - 1), true, loader); - } else { - if (name.length() == 1) { - return SystemClassLoader.getClass - (primitiveClass(name.charAt(0))); - } else { - throw new ClassNotFoundException(name); - } - } - } catch (ClassNotFoundException e) { - throw new RuntimeException(e); - } - } - - private static int next(char c, String s, int start) { - for (int i = start; i < s.length(); ++i) { - if (s.charAt(i) == c) return i; - } - throw new RuntimeException(); - } - - public static Class[] getParameterTypes(VMMethod vmMethod) { - int count = vmMethod.parameterCount; - - Class[] types = new Class[count]; - int index = 0; - - String spec = new String - (vmMethod.spec, 1, vmMethod.spec.length - 2); - - try { - for (int i = 0; i < spec.length(); ++i) { - char c = spec.charAt(i); - if (c == ')') { - break; - } else if (c == 'L') { - int start = i + 1; - i = next(';', spec, start); - String name = spec.substring(start, i).replace('/', '.'); - types[index++] = Class.forName(name, true, vmMethod.class_.loader); - } else if (c == '[') { - int start = i; - while (spec.charAt(i) == '[') ++i; - - if (spec.charAt(i) == 'L') { - i = next(';', spec, i + 1); - String name = spec.substring(start, i).replace('/', '.'); - types[index++] = Class.forName - (name, true, vmMethod.class_.loader); - } else { - String name = spec.substring(start, i + 1); - types[index++] = forCanonicalName(vmMethod.class_.loader, name); - } - } else { - String name = spec.substring(i, i + 1); - types[index++] = forCanonicalName(vmMethod.class_.loader, name); - } - } - } catch (ClassNotFoundException e) { - throw new RuntimeException(e); - } - - return types; - } - - public static int findField(VMClass vmClass, String name) { - if (vmClass.fieldTable != null) { - link(vmClass); - - for (int i = 0; i < vmClass.fieldTable.length; ++i) { - if (toString(vmClass.fieldTable[i].name).equals(name)) { - return i; - } - } - } - return -1; - } - - public static String toString(byte[] array) { - return new String(array, 0, array.length - 1); - } - - private static boolean match(VMClass a, VMClass b) { - // TODO: in theory we should be able to just do an == comparison - // here instead of recursively comparing array element types. - // However, the VM currently can create multiple array classes for - // the same element type. We should fix that so that there's only - // ever one of each per classloader, eliminating the need for a - // recursive comparison. See also the native implementation of - // isAssignableFrom. - if (a.arrayDimensions > 0) { - return match(a.arrayElementClass, b.arrayElementClass); - } else { - return a == b; - } - } - - public static boolean match(Class[] a, Class[] b) { - if (a.length == b.length) { - for (int i = 0; i < a.length; ++i) { - if (! match(toVMClass(a[i]), toVMClass(b[i]))) { - return false; - } - } - return true; - } else { - return false; - } - } - - public static VMMethod findMethod(ClassLoader loader, - String class_, - String name, - String spec) - throws ClassNotFoundException - { - VMClass c = SystemClassLoader.vmClass(loader.loadClass(class_)); - VMMethod[] methodTable = c.methodTable; - if (methodTable != null) { - link(c); - - for (int i = 0; i < methodTable.length; ++i) { - VMMethod m = methodTable[i]; - if (toString(m.name).equals(name) && toString(m.spec).equals(spec)) { - return m; - } - } - } - return null; - } - - public static int findMethod(VMClass vmClass, String name, - Class[] parameterTypes) - { - VMMethod[] methodTable = vmClass.methodTable; - if (methodTable != null) { - link(vmClass); - - if (parameterTypes == null) { - parameterTypes = new Class[0]; - } - - for (int i = 0; i < methodTable.length; ++i) { - VMMethod m = methodTable[i]; - if (toString(m.name).equals(name) - && match(parameterTypes, getParameterTypes(m))) - { - return i; - } - } - } - return -1; - } - - public static int countMethods(VMClass vmClass, boolean publicOnly) { - int count = 0; - VMMethod[] methodTable = vmClass.methodTable; - if (methodTable != null) { - for (int i = 0, j = declaredMethodCount(vmClass); i < j; ++i) { - VMMethod m = methodTable[i]; - if (((! publicOnly) || ((m.flags & Modifier.PUBLIC)) != 0) - && (! toString(m.name).startsWith("<"))) - { - ++ count; - } - } - } - return count; - } - - public static Method[] getMethods(VMClass vmClass, boolean publicOnly) { - Method[] array = new Method[countMethods(vmClass, publicOnly)]; - VMMethod[] methodTable = vmClass.methodTable; - if (methodTable != null) { - link(vmClass); - - int ai = 0; - for (int i = 0, j = declaredMethodCount(vmClass); i < j; ++i) { - VMMethod m = methodTable[i]; - if (((! publicOnly) || ((m.flags & Modifier.PUBLIC) != 0)) - && ! toString(m.name).startsWith("<")) - { - array[ai++] = makeMethod(SystemClassLoader.getClass(vmClass), i); - } - } - } - - return array; - } - - public static int countFields(VMClass vmClass, boolean publicOnly) { - int count = 0; - if (vmClass.fieldTable != null) { - for (int i = 0; i < vmClass.fieldTable.length; ++i) { - if ((! publicOnly) - || ((vmClass.fieldTable[i].flags & Modifier.PUBLIC)) - != 0) - { - ++ count; - } - } - } - return count; - } - - public static Field[] getFields(VMClass vmClass, boolean publicOnly) { - Field[] array = new Field[countFields(vmClass, publicOnly)]; - if (vmClass.fieldTable != null) { - link(vmClass); - - int ai = 0; - for (int i = 0; i < vmClass.fieldTable.length; ++i) { - if (((vmClass.fieldTable[i].flags & Modifier.PUBLIC) != 0) - || (! publicOnly)) - { - array[ai++] = makeField(SystemClassLoader.getClass(vmClass), i); - } - } - } - - return array; - } - - public static Annotation getAnnotation(ClassLoader loader, Object[] a) { - if (a[0] == null) { - a[0] = Proxy.newProxyInstance - (loader, new Class[] { (Class) a[1] }, - new AnnotationInvocationHandler(a)); - } - return (Annotation) a[0]; - } - - public static Object getAnnotationDefaultValue(ClassLoader loader, - MethodAddendum addendum) { - if (addendum == null) { - return null; - } - byte[] annotationDefault = (byte[]) addendum.annotationDefault; - if (annotationDefault == null) { - return null; - } - try { - return parseAnnotationValue(loader, addendum.pool, - new ByteArrayInputStream(annotationDefault)); - } catch (IOException e) { - AssertionError error = new AssertionError(); - error.initCause(e); - throw error; - } - } - - private static int index(VMMethod m) { - VMMethod[] table = m.class_.methodTable; - for (int i = 0; i < table.length; ++i) { - if (m == table[i]) return i; - } - throw new AssertionError(); - } - - public static Method makeMethod(VMMethod m) { - return makeMethod(SystemClassLoader.getClass(m.class_), index(m)); - } - - public static ProtectionDomain getProtectionDomain(VMClass c) { - CodeSource source = null; - if (c.source != null) { - try { - source = new CodeSource - (new URL(new String(c.source, 0, c.source.length - 1)), - (Certificate[]) null); - } catch (MalformedURLException ignored) { } - } - - Permissions p = new Permissions(); - p.add(new AllPermission()); - - return new ProtectionDomain(source, p); - } - - public static native Method makeMethod(Class c, int slot); - - public static native Field makeField(Class c, int slot); - - private static native void acquireClassLock(); - - private static native void releaseClassLock(); - - public static native String makeString(byte[] array, int offset, int length); -} diff --git a/sgx-jvm/avian/classpath/avian/Code.java b/sgx-jvm/avian/classpath/avian/Code.java deleted file mode 100644 index 957099107d..0000000000 --- a/sgx-jvm/avian/classpath/avian/Code.java +++ /dev/null @@ -1,5 +0,0 @@ -package avian; - -abstract class Code { - // VM-visible fields in types.def -} diff --git a/sgx-jvm/avian/classpath/avian/ConstantPool.java b/sgx-jvm/avian/classpath/avian/ConstantPool.java deleted file mode 100644 index 61547ee38a..0000000000 --- a/sgx-jvm/avian/classpath/avian/ConstantPool.java +++ /dev/null @@ -1,279 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import static avian.Stream.write1; -import static avian.Stream.write2; -import static avian.Stream.write4; - -import java.util.List; -import java.io.OutputStream; -import java.io.IOException; - -public class ConstantPool { - private static final int CONSTANT_Integer = 3; - private static final int CONSTANT_Utf8 = 1; - private static final int CONSTANT_String = 8; - private static final int CONSTANT_Class = 7; - private static final int CONSTANT_NameAndType = 12; - private static final int CONSTANT_Fieldref = 9; - private static final int CONSTANT_Methodref = 10; - private static final int CONSTANT_InterfaceMethodref = 11; - - public static int add(List pool, PoolEntry e) { - int i = 0; - for (PoolEntry existing: pool) { - if (existing.equals(e)) { - return i; - } else { - ++i; - } - } - pool.add(e); - return pool.size() - 1; - } - - public static int addInteger(List pool, int value) { - return add(pool, new IntegerPoolEntry(value)); - } - - public static int addUtf8(List pool, String value) { - return add(pool, new Utf8PoolEntry(value)); - } - - public static int addString(List pool, String value) { - return add(pool, new StringPoolEntry(addUtf8(pool, value))); - } - - public static int addClass(List pool, String name) { - return add(pool, new ClassPoolEntry(addUtf8(pool, name))); - } - - public static int addNameAndType(List pool, - String name, - String type) - { - return add(pool, new NameAndTypePoolEntry - (addUtf8(pool, name), - addUtf8(pool, type))); - } - - public static int addFieldRef(List pool, - String className, - String name, - String spec) - { - return add(pool, new FieldRefPoolEntry - (addClass(pool, className), - addNameAndType(pool, name, spec))); - } - - public static int addMethodRef(List pool, - String className, - String name, - String spec) - { - return add(pool, new MethodRefPoolEntry - (addClass(pool, className), - addNameAndType(pool, name, spec))); - } - - public static int addInterfaceMethodRef(List pool, - String interfaceName, - String name, - String spec) - { - return add(pool, new InterfaceMethodRefPoolEntry - (addClass(pool, interfaceName), - addNameAndType(pool, name, spec))); - } - - public interface PoolEntry { - public void writeTo(OutputStream out) throws IOException; - } - - private static class IntegerPoolEntry implements PoolEntry { - private final int value; - - public IntegerPoolEntry(int value) { - this.value = value; - } - - public void writeTo(OutputStream out) throws IOException { - write1(out, CONSTANT_Integer); - write4(out, value); - } - - public boolean equals(Object o) { - return o instanceof IntegerPoolEntry - && ((IntegerPoolEntry) o).value == value; - } - } - - private static class Utf8PoolEntry implements PoolEntry { - private final String data; - - public Utf8PoolEntry(String data) { - this.data = data; - } - - public void writeTo(OutputStream out) throws IOException { - write1(out, CONSTANT_Utf8); - byte[] bytes = data.getBytes("UTF-8"); - write2(out, bytes.length); - out.write(bytes); - } - - public boolean equals(Object o) { - return o instanceof Utf8PoolEntry - && ((Utf8PoolEntry) o).data.equals(data); - } - } - - private static class StringPoolEntry implements PoolEntry { - private final int valueIndex; - - public StringPoolEntry(int valueIndex) { - this.valueIndex = valueIndex; - } - - public void writeTo(OutputStream out) throws IOException { - write1(out, CONSTANT_String); - write2(out, valueIndex + 1); - } - - public boolean equals(Object o) { - return o instanceof StringPoolEntry - && ((StringPoolEntry) o).valueIndex == valueIndex; - } - } - - private static class ClassPoolEntry implements PoolEntry { - private final int nameIndex; - - public ClassPoolEntry(int nameIndex) { - this.nameIndex = nameIndex; - } - - public void writeTo(OutputStream out) throws IOException { - write1(out, CONSTANT_Class); - write2(out, nameIndex + 1); - } - - public boolean equals(Object o) { - return o instanceof ClassPoolEntry - && ((ClassPoolEntry) o).nameIndex == nameIndex; - } - } - - private static class NameAndTypePoolEntry implements PoolEntry { - private final int nameIndex; - private final int typeIndex; - - public NameAndTypePoolEntry(int nameIndex, int typeIndex) { - this.nameIndex = nameIndex; - this.typeIndex = typeIndex; - } - - public void writeTo(OutputStream out) throws IOException { - write1(out, CONSTANT_NameAndType); - write2(out, nameIndex + 1); - write2(out, typeIndex + 1); - } - - public boolean equals(Object o) { - if (o instanceof NameAndTypePoolEntry) { - NameAndTypePoolEntry other = (NameAndTypePoolEntry) o; - return other.nameIndex == nameIndex && other.typeIndex == typeIndex; - } else { - return false; - } - } - } - - private static class FieldRefPoolEntry implements PoolEntry { - private final int classIndex; - private final int nameAndTypeIndex; - - public FieldRefPoolEntry(int classIndex, int nameAndTypeIndex) { - this.classIndex = classIndex; - this.nameAndTypeIndex = nameAndTypeIndex; - } - - public void writeTo(OutputStream out) throws IOException { - write1(out, CONSTANT_Fieldref); - write2(out, classIndex + 1); - write2(out, nameAndTypeIndex + 1); - } - - public boolean equals(Object o) { - if (o instanceof FieldRefPoolEntry) { - FieldRefPoolEntry other = (FieldRefPoolEntry) o; - return other.classIndex == classIndex - && other.nameAndTypeIndex == nameAndTypeIndex; - } else { - return false; - } - } - } - - private static class MethodRefPoolEntry implements PoolEntry { - private final int classIndex; - private final int nameAndTypeIndex; - - public MethodRefPoolEntry(int classIndex, int nameAndTypeIndex) { - this.classIndex = classIndex; - this.nameAndTypeIndex = nameAndTypeIndex; - } - - public void writeTo(OutputStream out) throws IOException { - write1(out, CONSTANT_Methodref); - write2(out, classIndex + 1); - write2(out, nameAndTypeIndex + 1); - } - - public boolean equals(Object o) { - if (o instanceof MethodRefPoolEntry) { - MethodRefPoolEntry other = (MethodRefPoolEntry) o; - return other.classIndex == classIndex - && other.nameAndTypeIndex == nameAndTypeIndex; - } else { - return false; - } - } - } - - private static class InterfaceMethodRefPoolEntry implements PoolEntry { - private final int classIndex; - private final int nameAndTypeIndex; - - public InterfaceMethodRefPoolEntry(int classIndex, int nameAndTypeIndex) { - this.classIndex = classIndex; - this.nameAndTypeIndex = nameAndTypeIndex; - } - - public void writeTo(OutputStream out) throws IOException { - write1(out, CONSTANT_InterfaceMethodref); - write2(out, classIndex + 1); - write2(out, nameAndTypeIndex + 1); - } - - public boolean equals(Object o) { - if (o instanceof InterfaceMethodRefPoolEntry) { - InterfaceMethodRefPoolEntry other = (InterfaceMethodRefPoolEntry) o; - return other.classIndex == classIndex - && other.nameAndTypeIndex == nameAndTypeIndex; - } else { - return false; - } - } - } -} diff --git a/sgx-jvm/avian/classpath/avian/Continuations.java b/sgx-jvm/avian/classpath/avian/Continuations.java deleted file mode 100644 index 2c930970b0..0000000000 --- a/sgx-jvm/avian/classpath/avian/Continuations.java +++ /dev/null @@ -1,327 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.util.concurrent.Callable; - -/** - * This class provides methods to capture continuations and manage - * control flow when calling continuations. - * - *

A continuation is a snapshot of a thread's call stack which can - * be captured via callWithCurrentContinuation and later - * restored any number of times. The program may restore this - * snapshot by either feeding it a result (to be returned by - * callWithCurrentContinuation) or feeding it an - * exception (to be thrown by - * callWithCurrentContinuation). Continuations may be - * used to implement features such as coroutines, generators, and - * cooperative multitasking. - * - *

This class provides two static methods, - * callWithCurrentContinuation and - * dynamicWind, with similar semantics to the Scheme - * functions call-with-current-continuation and - * dynamic-wind, respectively. In addition, we define - * how continuations work with respect to native code, exceptions, - * try/finally blocks, synchronized blocks, and multithreading. - * - *

Continuations and Continuation Contexts

- * - *

A continuation can be thought of as a singly-linked list of - * stack frames representing the call trace, where the head of the - * list is the frame of the method most recently called (i.e. the top - * of the stack). However, this trace only extends as far as the most - * recent chain of Java frames - it ends just prior to the most recent - * native frame in the stack. The reason for this is that the VM - * cannot, in general, safely capture and restore native frames. - * Therefore, each call from native code to Java (including the - * original invocation of main(String[]) or - * Thread.run()) represents a new continuation context in - * which continuations may be captured, and these will only contain - * frames from within that context. - * - *

Calling a continuation (i.e. feeding it a result or exception) - * causes the current continuation to be replaced with the called - * continuation. When the last method in this new continuation - * returns, it returns to the native frame which created the current - * context, which may or may not be the same as the context in which - * that continuation was created. - * - *

We define the return type of a continuation context as the - * return type of the first method called in that context. A - * continuation may be called from a different context than the one in - * which it was created, provided the return type of the latter is - * compatible with the current context. - * - *

Given a thread executing in context "A" which wants to call a - * continuation created in context "B", the following rules apply: - * - *

    - * - *
  • If the return type of "A" is void, the return - * type of "B" may be anything, including void
  • - * - *
  • If the return type of "A" is a primitive type, the return - * type of "B" must match exactly
  • - * - *
  • If the return type of "A" is an object type, that type must - * be assignable from the return type of "B" (i.e. the latter must - * either be the same as the former or a superclass or - * superinterface of it)
  • - * - *
- * - *

A thread may call a continuation created by a different thread - * provided the return types are compatible. Multiple threads may - * safely call the same continuation simultaneously without - * synchronization. Any attempt to call a continuation from a context - * with an incompatible return type will throw an {@link - * avian.IncompatibleContinuationException}. - * - *

Winding, Unwinding, and Rewinding

- * - *

Traditionally, Java provides one way to wind the execution stack - * (method calls) and two ways to unwind it (normal returns and - * exception unwinding). With continuations, we add a new way to - * rewind the stack and a new way to unwind it. - * - *

The call stack of a continuation may share frames with other - * continuations - in which case they share a common history. When - * calling a continuation "B" from the current continuation "A", the - * VM must unwind past any frames which are in "A" but not in "B" and - * rewind past any frames in "B" but not in "A". During this - * unwinding and rewinding, control may pass through synchronized and - * try/finally blocks while going down the old stack and up the new - * stack. - * - *

However, unlike the traditional processes of winding and - * unwinding, the VM will ignore these blocks - monitors will not be - * released or acquired and finally blocks will not execute. This is - * by design. The purpose of such a block is to acquire a resource, - * such as a file handle or monitor, once before executing a task and - * release it after the task is finished, regardless of how often the - * task might temporarily yield control to other continuations. - * - *

Alternatively, one might wish to acquire and release a resource - * each time control (re)winds to or unwinds from a continuation, - * respectively. In this case, one may use dynamicWind - * to register functions which will run every time that frame is - * passed, regardless of how the stack is wound or unwound. - */ -public class Continuations { - private Continuations() { } - - private static final ThreadLocal latestReset = new ThreadLocal(); - - /** - * Captures the current continuation, passing a reference to the - * specified receiver. - * - *

This method will either return the result returned by - * receiver.call(Callback), propagate the exception - * thrown by that method, return the result passed to the - * handleResult(T) method of the continuation, or throw the - * exception passed to the handleException(Throwable) method of the - * continuation. - */ - public static native T callWithCurrentContinuation - (Function,T> receiver) throws Exception; - - /** - * Calls the specified "before" and "after" tasks each time a - * continuation containing the call is wound or unwound, - * respectively. - * - *

This method first calls before.run(), then - * thunk.call(), and finally after.run(), - * returning the result of the second call. If - * before.run() does not return normally, the second - * and third calls will not happen. If thunk.call() - * throws an exception, after.run(), will be called - * before the exception is propagated. - * - *

If thunk.call() calls a continuation (directly or - * via a subroutine) which does not include the current call to - * dynamicWind, after.run() will be called - * before control passes to that continuation. If this call throws - * an exception, the exception will propagate to the current caller - * of dynamicWind. - * - *

If thunk.call() creates a continuation which is - * later called from a continuation which does not include the - * current call to dynamicWind, - * before.run() will be called before control passes to - * that continuation. As above, if this call throws an exception, - * the exception will propagate to the current caller of - * dynamicWind. - */ - public static T dynamicWind(Runnable before, - Callable thunk, - Runnable after) - throws Exception - { - UnwindResult result = dynamicWind2(before, thunk, after); - if (result.continuation != null) { - after.run(); - if (result.exception != null) { - result.continuation.handleException(result.exception); - } else { - result.continuation.handleResult(result.result); - } - throw new AssertionError(); - } else { - return (T) result.result; - } - } - - public static C reset(final Callable thunk) throws Exception { - final Reset reset = new Reset(latestReset.get()); - latestReset.set(reset); - try { - Object result = callWithCurrentContinuation - (new Function,Object>() { - public Object call(Callback continuation) throws Exception { - reset.continuation = continuation; - return thunk.call(); - } - }); - - while (true) { - Cell shift = reset.shifts; - if (shift != null) { - reset.shifts = shift.next; - result = shift.value.call(result); - } else { - return (C) result; - } - } - } finally { - latestReset.set(reset.next); - } - } - - public static A shift - (final Function,C> receiver) - throws Exception - { - return (A) callWithCurrentContinuation - (new Function,Object>() { - public Object call(final Callback continuation) { - final Reset reset = latestReset.get(); - reset.shifts = new Cell(new Function() { - public Object call(Object ignored) throws Exception { - return receiver.call - (new Function() { - public Object call(final Object argument) - throws Exception - { - return callWithCurrentContinuation - (new Function,Object>() { - public Object call - (final Callback shiftContinuation) - throws Exception - { - reset.shifts = new Cell - (new Function() { - public Object call(Object result) - throws Exception - { - shiftContinuation.handleResult(result); - throw new AssertionError(); - } - }, - reset.shifts); - - continuation.handleResult(argument); - throw new AssertionError(); - } - }); - } - }); - } - - public void handleException(Throwable exception) { - throw new AssertionError(); - } - }, reset.shifts); - - reset.continuation.handleResult(null); - throw new AssertionError(); - } - }); - } - - private static native UnwindResult dynamicWind2(Runnable before, - Callable thunk, - Runnable after) - throws Exception; - - private static UnwindResult wind(Runnable before, - Callable thunk, - Runnable after) - throws Exception - { - before.run(); - - try { - return new UnwindResult(null, thunk.call(), null); - } finally { - after.run(); - } - } - - private static void rewind(Runnable before, - Callback continuation, - Object result, - Throwable exception) - throws Exception - { - before.run(); - - if (exception != null) { - continuation.handleException(exception); - } else { - continuation.handleResult(result); - } - - throw new AssertionError(); - } - - private static class Continuation implements Callback { - public native void handleResult(T result); - public native void handleException(Throwable exception); - } - - private static class UnwindResult { - public final Continuation continuation; - public final Object result; - public final Throwable exception; - - public UnwindResult(Continuation continuation, Object result, - Throwable exception) - { - this.continuation = continuation; - this.result = result; - this.exception = exception; - } - } - - private static class Reset { - public Callback continuation; - public final Reset next; - public Cell shifts; - - public Reset(Reset next) { - this.next = next; - } - } -} diff --git a/sgx-jvm/avian/classpath/avian/Data.java b/sgx-jvm/avian/classpath/avian/Data.java deleted file mode 100644 index 0914362e83..0000000000 --- a/sgx-jvm/avian/classpath/avian/Data.java +++ /dev/null @@ -1,310 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.util.Map; -import java.util.Map.Entry; -import java.util.AbstractSet; -import java.util.Collection; -import java.util.Iterator; -import java.util.Collections; - -public class Data { - public static int nextPowerOfTwo(int n) { - int r = 1; - while (r < n) r <<= 1; - return r; - } - - public static boolean equal(V a, V b) { - return a == null ? b == null : a.equals(b); - } - - public static T[] toArray(Collection collection, T[] array) { - Class c = array.getClass().getComponentType(); - - if (array.length < collection.size()) { - array = (T[]) java.lang.reflect.Array.newInstance(c, collection.size()); - } - - int i = 0; - for (Object o: collection) { - if (c.isInstance(o)) { - array[i++] = (T) o; - } else { - throw new ArrayStoreException(); - } - } - - return array; - } - - public static String toString(Collection c) { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (Iterator it = c.iterator(); it.hasNext();) { - sb.append(it.next()); - if (it.hasNext()) { - sb.append(","); - } - } - sb.append("]"); - return sb.toString(); - } - - public static String toString(Map m) { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - for (Iterator it = m.entrySet().iterator(); it.hasNext();) { - Entry e = it.next(); - sb.append(e.getKey()) - .append("=") - .append(e.getValue()); - if (it.hasNext()) { - sb.append(","); - } - } - sb.append("}"); - return sb.toString(); - } - - public interface EntryMap { - public int size(); - - public Entry find(Object key); - - public Entry remove(Object key); - - public void clear(); - - public Iterator> iterator(); - } - - public static class EntrySet extends AbstractSet> { - private final EntryMap map; - - public EntrySet(EntryMap map) { - this.map = map; - } - - public int size() { - return map.size(); - } - - public boolean isEmpty() { - return map.size() == 0; - } - - public boolean contains(Object o) { - return (o instanceof Entry) - && map.find(((Entry)o).getKey()) != null; - } - - public boolean add(Entry e) { - throw new UnsupportedOperationException(); - } - - public boolean remove(Object o) { - return (o instanceof Entry) - && map.remove(((Entry) o).getKey()) != null; - } - - public boolean remove(Entry e) { - return map.remove(e.getKey()) != null; - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - return Data.toArray(this, array); - } - - public void clear() { - map.clear(); - } - - public Iterator> iterator() { - return map.iterator(); - } - } - - public static class KeySet extends AbstractSet { - private final EntryMap map; - - public KeySet(EntryMap map) { - this.map = map; - } - - public int size() { - return map.size(); - } - - public boolean isEmpty() { - return map.size() == 0; - } - - public boolean contains(Object key) { - return map.find(key) != null; - } - - public boolean add(K key) { - throw new UnsupportedOperationException(); - } - - public boolean remove(Object key) { - return map.remove(key) != null; - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - return Data.toArray(this, array); - } - - public void clear() { - map.clear(); - } - - public Iterator iterator() { - return new KeyIterator(map.iterator()); - } - } - - public static class Values implements Collection { - private final EntryMap map; - - public Values(EntryMap map) { - this.map = map; - } - - public int size() { - return map.size(); - } - - public boolean isEmpty() { - return map.size() == 0; - } - - public boolean contains(Object value) { - for (Iterator> it = map.iterator(); it.hasNext();) { - if (equal(it.next().getValue(), value)) { - return true; - } - } - return false; - } - - public boolean containsAll(Collection c) { - if (c == null) { - throw new NullPointerException("collection is null"); - } - - for (Iterator it = c.iterator(); it.hasNext();) { - if (! contains(it.next())) { - return false; - } - } - - return true; - } - - public boolean add(V value) { - throw new UnsupportedOperationException(); - } - - public boolean addAll(Collection collection) { - throw new UnsupportedOperationException(); - } - - public boolean remove(Object value) { - for (Iterator> it = map.iterator(); - it.hasNext();) - { - if (equal(it.next().getValue(), value)) { - it.remove(); - return true; - } - } - return false; - } - - public boolean removeAll(Collection c) { - boolean changed = false; - for (Iterator> it = map.iterator(); it.hasNext();) { - if (c.contains(it.next().getValue())) { - it.remove(); - changed = true; - } - } - return changed; - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - return Data.toArray(this, array); - } - - public void clear() { - map.clear(); - } - - public Iterator iterator() { - return new ValueIterator(map.iterator()); - } - } - - public static class KeyIterator implements Iterator { - private final Iterator> it; - - public KeyIterator(Iterator> it) { - this.it = it; - } - - public K next() { - return it.next().getKey(); - } - - public boolean hasNext() { - return it.hasNext(); - } - - public void remove() { - it.remove(); - } - } - - public static class ValueIterator implements Iterator { - private final Iterator> it; - - public ValueIterator(Iterator> it) { - this.it = it; - } - - public V next() { - return it.next().getValue(); - } - - public boolean hasNext() { - return it.hasNext(); - } - - public void remove() { - it.remove(); - } - } -} diff --git a/sgx-jvm/avian/classpath/avian/FieldAddendum.java b/sgx-jvm/avian/classpath/avian/FieldAddendum.java deleted file mode 100644 index 525dfc6f3c..0000000000 --- a/sgx-jvm/avian/classpath/avian/FieldAddendum.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class FieldAddendum extends Addendum { } diff --git a/sgx-jvm/avian/classpath/avian/FormatString.java b/sgx-jvm/avian/classpath/avian/FormatString.java deleted file mode 100644 index a66c3cfa9e..0000000000 --- a/sgx-jvm/avian/classpath/avian/FormatString.java +++ /dev/null @@ -1,992 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.IllegalFormatException; -import java.util.List; - -// ------------------------------------------------------------------------- // -// things that must be done in order to call this semi-complete: -// ------------------------------------------------------------------------- // -// * get the date formatter working for individual fields at a minimum -// ------------------------------------------------------------------------- // - -/** - * A Java flavored printf for classpath-challenged JVMs. - * - * Each instance of this class is a threadsafe pre-parsed format pattern. Refer - * to the very detailed class description of java.util.Formatter in the OpenJDK - * API documentation for an explanation of the supported formats. - * - * Should be easily portable to other Java runtimes that do not include the - * printf functionality that was introduced in Java 5. - * - * Aims to be lightweight and reasonably fast, and provide reasonably complete - * API compatibility with the OpenJDK implementation. To clarify what - * "reasonably complete" means in this context, this implementation should - * accept any valid format string that the OpenJDK version accepts. However, - * it should not be relied upon to throw an Exception for every format pattern - * that the OpenJDK implementation does. - * - * If your program's behavior relies on the side effects from an Exception - * being thrown for an invalid format string, this might not be for you. - * - * Perhaps more troubling is the fact that the correct localization of numbers - * and temporal values is barely even attempted, even though the parser accepts - * the flags without even a warning. However, now you have been warned. - * - * @author bcg - */ -public final class FormatString { - - /** Parses a format string and returns a compiled representation of it. */ - public static final FormatString compile(String fmt) { - return new FormatString(fmt); - } - - /** The original string value that was parsed */ - public String source() { - return _source; - } - - /** Processes the supplied arguments through the compiled format string - and returns the result as a String. */ - public final String format(Object... args) { - final StringBuilder bldr = new StringBuilder(); - try { - format(bldr, args); - return bldr.toString(); - } catch (IOException e) { - throw new IllegalStateException( - "Should not get IOException when writing to StringBuilder", e - ); - } - } - - /** Processes the supplied arguments through the compiled format string - and writes the result of each component directly to an Appendable */ - public final void format(final Appendable a, Object... fmt_args) - throws IOException { - final Object[] args = fmt_args != null ? fmt_args : new Object[0]; - int cntr = 0; - for (final FmtCmpnt cmp : _components) { - if (cmp._conversion == CONV_LITRL) { - a.append(cmp._source); - continue; - } - final Object arg; - if (!acceptsArgument(cmp._conversion)) { - arg = null; - } else { - final int index = cmp._argument_index; - switch (index) { - case AIDX_NONE: - if ((cntr) >= args.length) { - throw new IllegalFormatException( - "Format specified at least " + (cntr+1) + - " arguments, but " + cntr + " were supplied." - ); - } - arg = args[cntr++]; - break; - case AIDX_PREV: - arg = args[cntr]; - break; - default: - if (index < 1) { - throw new IllegalArgumentException(); - } else if (index > args.length) { - throw new IllegalArgumentException(); - } else { - arg = args[index - 1]; - } - } - } - convert(a, arg, cmp._conversion, cmp._flags, cmp._width, cmp._precision); - } - } - - //- conversions - static final byte CONV_LITRL = 0x0; - static final byte CONV_NLINE = 0x1; - static final byte CONV_PRCNT = 0x2; - static final byte CONV_BOOLN = 0x3; - static final byte CONV_DTIME = 0x4; - static final byte CONV_STRNG = 0x5; - static final byte CONV_HCODE = 0x6; - static final byte CONV_CHRCT = 0x7; - static final byte CONV_DECML = 0x8; - static final byte CONV_OCTAL = 0x9; - static final byte CONV_HXDEC = 0xA; - static final byte CONV_CPSCI = 0xB; - static final byte CONV_GNSCI = 0xC; - static final byte CONV_FLOAT = 0xD; - static final byte CONV_HXEXP = 0xE; - - //- format component flags - static final byte FLAG_FORCE_UPPER_CASE = (byte)(1<<7); - static final byte FLAG_NEGATIVES_IN_PARENS = (byte)(1<<6); // ('(') - static final byte FLAG_GROUPING_SEPARATORS = (byte)(1<<5); // (',') - static final byte FLAG_LEADING_ZERO_PADDED = (byte)(1<<4); // ('0') - static final byte FLAG_LEADING_SPACE_PADDED = (byte)(1<<3); // (' ') - static final byte FLAG_ALWAYS_INCLUDES_SIGN = (byte)(1<<2); // ('+') - static final byte FLAG_ALTERNATE_FORM = (byte)(1<<1); // ('#') - static final byte FLAG_LEFT_JUSTIFIED = (byte)(1<<0); // ('-') - - //- conversion capability flags - static final byte CFLG_WDTH_SUPPRT = CONV_PRCNT; - static final byte CFLG_ACCEPTS_ARG = CONV_BOOLN; - static final byte CFLG_NUMERIC_VAL = CONV_DECML; - static final byte CFLG_PREC_SUPPRT = CONV_STRNG; - - //- special argument indices - static final int AIDX_PREV = -1; - static final int AIDX_NONE = 0; - - /** the original serialized format string */ - private final String _source; - - /** array of components parsed from the source string */ - private final FmtCmpnt[] _components; - - /*/ keeping this private for now to encourage access through the static - compile method, which might allow caching format string instances if it - turns out there is an advantage to that. /*/ - /** Constructor */ - private FormatString(final String fmt) { - this._source = fmt; - final List cmps = new ArrayList(); - for ( int i = 0; (i = next(fmt, cmps, i)) > -1; ); - this._components = cmps.toArray(new FmtCmpnt[cmps.size()]); - } - - /** Iterates over the tokens in an input string to extract the components */ - private static final int next( - final String fmt, final List cmps, final int startIndex) { - final int strln = fmt.length(); - if (startIndex >= strln) { - return -1; - } - final char c = fmt.charAt(startIndex); - if (c == '%') { - // this is the start of a specifier - final FmtSpecBldr bldr = new FmtSpecBldr(); - for (int i = startIndex + 1; i < strln; i++) { - final char ch = fmt.charAt(i); - final FmtCmpnt cmp = bldr.append(ch); - if (cmp != null) { - cmps.add(cmp); - return (i+1); - } - } - throw new IllegalFormatException("Incomplete specifier at end of fmt"); - } else { - // this is the start of a literal - final StringBuilder literal = new StringBuilder(); - literal.append(c); - for (int i = startIndex + 1; i < strln; i++) { - final char ch = fmt.charAt(i); - // write the current buffer if the next character starts a specifier - if (ch == '%') { - final FmtCmpnt cmp = new FmtCmpnt(literal.toString()); - cmps.add(cmp); - return i; - } - literal.append(ch); - } - // write the current buffer if the end of the format has been reached - final FmtCmpnt cmp = new FmtCmpnt(literal.toString()); - cmps.add(cmp); - return -1; - } - } - - /** Checks a flag byte to see if a given flag is set. Only FLAG_* constants - from the enclosing class should be passed in for toCheck... otherwise the - behavior is undefined. */ - static final boolean checkFlag(final byte flags, final byte toCheck) { - return (flags & toCheck) != 0; - } - - /** Checks if a given conversion accepts(requires) an argument. Only the CONV_ - flags from the enclosing class should be passed in, otherwise the result - of this method is undefined as should not be used. */ - static final boolean acceptsArgument(final byte conversion) { - return conversion >= CFLG_ACCEPTS_ARG; - } - - /** Checks if a given conversion allows specifying a precision. Only the CONV_ - flags from the enclosing class should be passed in, otherwise the result - of this method is undefined as should not be used. */ - static final boolean precisionSupported(final byte conversion) { - return conversion >= CFLG_PREC_SUPPRT; - } - - /** Checks if a given conversion allows specifying a width. Only the CONV_ - flags from the enclosing class should be passed in, otherwise the result - of this method is undefined and should not be trusted. */ - static final boolean widthSupported(final byte conversion) { - return conversion >= CFLG_WDTH_SUPPRT; - } - - /** Checks if a given conversion expects a numeric value. Only the CONV_ - flags from the enclosing class should be passed in, otherwise the result - of this method is undefined and should not be trusted. */ - static final boolean isNumeric(final byte conversion) { - return conversion >= CFLG_NUMERIC_VAL; - } - - /** The newline character for the current platform. */ - static final String NEWLINE = System.getProperty("line.separator"); - - /** Performs conversion on the supplied argument */ - static final void convert( - final Appendable appendable, - final Object arg, - final byte conversion, - final byte flags, - final int width, - final int precision) throws IOException { - int radix = 0; - switch (conversion) { - case CONV_LITRL: - throw new IllegalArgumentException("cannot convert a literal"); - case CONV_NLINE: - appendable.append(NEWLINE); - return; - case CONV_PRCNT: - convertPercent(appendable, arg, flags, width, precision); - return; - case CONV_BOOLN: - convertBoolean(appendable, arg, flags, width, precision); - return; - case CONV_DTIME: - convertDate(appendable, arg, flags, width, precision); - return; - case CONV_STRNG: - convertString(appendable, arg, flags, width, precision); - return; - case CONV_HCODE: - convertHashcode(appendable, arg, flags, width, precision); - return; - case CONV_CHRCT: - convertChar(appendable, arg, flags, width, precision); - return; - case CONV_DECML: if (radix == 0) { radix = 10; }; - case CONV_OCTAL: if (radix == 0) { radix = 8; }; - case CONV_HXDEC: if (radix == 0) { radix = 16; }; - if (arg instanceof Long) { - convertLong(appendable, (Long) arg, flags, width, precision, radix); - } else { - convertInteger(appendable, arg, flags, width, precision, radix); - } - return; - case CONV_CPSCI: - case CONV_GNSCI: - case CONV_FLOAT: - case CONV_HXEXP: - convertFloat(appendable, arg, flags, width, precision, 10); - return; - } - throw new IllegalStateException("not implemented: " + conversion); - } - - static void convertPercent( - final Appendable a, - final Object arg, - final byte flags, - final int width, - final int precision) throws IOException { - final String val = "%"; - appendify(a, val, flags, width, precision); - } - - static void convertDate( - final Appendable a, - final Object arg, - final byte flags, - final int width, - final int precision) throws IOException { - final String val = (arg == null) ? "null" : arg.toString(); - appendify(a, val, flags, width, precision); - } - - static void convertString( - final Appendable a, - final Object arg, - final byte flags, - final int width, - final int precision) throws IOException { - final String val = (arg == null) ? "null" : arg.toString(); - appendify(a, val, flags, width, precision); - } - - static void convertHashcode( - final Appendable a, - final Object arg, - final byte flags, - final int width, - final int precision) throws IOException { - final String val = (arg == null) - ? "null" - : Integer.toHexString(arg.hashCode()); - appendify(a, val, flags, width, precision); - } - - static void convertBoolean( - final Appendable a, - final Object arg, - final byte flags, - final int width, - final int precision) throws IOException { - final String val; - if (arg == null) { - val = "false"; - } else if (arg instanceof Boolean) { - val = String.valueOf(arg); - } else { - val = "true"; - } - appendify(a, val, flags, width, precision); - } - - static void convertChar( - final Appendable a, - final Object arg, - final byte flags, - final int width, - final int precision) throws IOException { - final String val; - if (arg instanceof Character) { - val = ((Character) arg).toString(); - } else if ( arg instanceof Byte || - arg instanceof Short || - arg instanceof Integer ){ - final int codePoint = ((Number) arg).intValue(); - if (codePoint >= 0 && codePoint <= 0x10FFFF) { //<-- isValidCodePoint()? - val = new String(Character.toChars(codePoint)); - } else { - throw new IllegalFormatException("Invalid code point: " + arg); - } - } else { - throw new IllegalFormatException("Cannot do char conversion: " + arg); - } - appendify(a, val, flags, width, precision); - } - - // FIXME: this is broken for octal formats with negative values - static void convertLong( - final Appendable a, - final Long arg, - final byte flags, - final int width, - final int precision, - final int radix) throws IOException { - final String val; - final Long n = arg; - final long longValue = n.longValue(); - if (radix == 10 || longValue > -1) { - val = Long.toString(longValue, radix); - } else { - final long upper = 0xFFFFFFFFL&(longValue>>31); - final long lower = 0xFFFFFFFFL&(longValue); - val = Long.toString(upper, radix) + Long.toString(lower, radix); - } - appendify(a, val, flags, width, precision); - } - - static void convertInteger( - final Appendable a, - final Object arg, - final byte flags, - final int width, - final int precision, - final int radix) throws IOException { - final String val; - final Number n = (Number) arg; - final long longValue = n.longValue(); - final long modifier; - if (arg instanceof Integer) modifier = 0xFFFFFFFFL+1; else - if (arg instanceof Short) modifier = 0xFFFFL+1; else - if (arg instanceof Byte) modifier = 0xFFL+1; - else throw new IllegalFormatException( - "not an integer number: " + (arg != null ? arg.getClass() : null) - ); - if (radix != 10 && longValue < 0) { - val = Long.toString(longValue + modifier, radix); - } else { - val = Long.toString(longValue, radix); - } - appendify(a, val, flags, width, precision); - } - - // FIXME: I'm lazy, so hexidecimal exponential isn't implemented, sorry - bcg - static void convertFloat( - final Appendable a, - final Object arg, - final byte flags, - final int width, - final int precision, - final int radix) throws IOException { - final String val; - final Number n = (Number) arg; - if (arg instanceof Float) { - val = Float.toString(n.floatValue()); - } else if (arg instanceof Double) { - val = Double.toString(n.doubleValue()); - } else { - throw new IllegalFormatException( - "not a floating point number: " + (arg != null ? arg.getClass() : null) - ); - } - appendify(a, val, flags, width, precision); - } - - static void appendify( - final Appendable a, - final String val, - final byte flags, - final int width, - final int precision) throws IOException { - String result = val; - if (checkFlag(flags, FLAG_FORCE_UPPER_CASE)) { - result = result.toUpperCase(); - } - // TODO: implement other flags - // (+) always include sign - // (,) grouping separators - // (() negatives in parentheses - if (precision > 0) { - // FIXME: this behavior should be different for floating point numbers - final int difference = result.length() - precision; - if (difference > 0) { - result = result.substring(0, precision); - a.append(result); - return; - } - } - if (width > 0) { - final int difference = width - result.length(); - final boolean leftJustified = checkFlag(flags, FLAG_LEFT_JUSTIFIED); - if (!leftJustified && difference > 0) { - char fill = checkFlag(flags, FLAG_LEADING_ZERO_PADDED) ? '0' : ' '; - fill(a, difference, fill); - } - a.append(result); - if (leftJustified && difference > 0) { - fill(a, difference, ' '); - } - return; - } - a.append(result); - } - - private static void fill(Appendable a, int num, char c) throws IOException { - while (num > 0) { - a.append(c); - num--; - } - } - - /** Represents a single chunk of the format string, either a literal or one of - the specifiers documented in OpenJDK's javadoc for java.util.Formatter. - This struct is immutable so can be safely shared across threads. */ - private static final class FmtCmpnt { - - private final String _source; - private final byte _conversion; - private final int _argument_index; - private final int _width; - private final int _precision; - private final byte _flags; - - private FmtCmpnt(final String literal) { - this(literal, CONV_LITRL, 0, 0, 0, (byte)0); - } - private FmtCmpnt( - final String src, - final byte conversion, - final int argumentIndex, - final int width, - final int precision, - final byte flags) { - this._source = src; - this._conversion = conversion; - this._argument_index = argumentIndex; - this._width = width; - this._precision = precision; - this._flags = flags; - } - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{ ") - .append("source = '").append(_source).append("', ") - .append("conversion = ").append(_conversion).append(", ") - .append("flags = ").append(Byte.toString(_flags, 2)).append(", ") - .append("arg_index = ").append(_argument_index).append(", ") - .append("width = ").append(_width).append(", ") - .append("precision = ").append(_precision).append(", ") - .append("}"); - return sb.toString(); - } - } - - /** - * Helper class for parsing a stream of characters into FmtCmpnt objects. - */ - private static final class FmtSpecBldr { - - private StringBuilder _source; - private byte _conversion; - private int _argument_index; - private int _width; - private int _precision; - private byte _flags; - - private FmtSpecBldr() { - this.init(); - } - - private final void init() { - _argument_index = - _width = - _precision = - _conversion = - _flags = 0; - _source = null; - } - - private final FmtCmpnt build() { - final FmtCmpnt result = new FmtCmpnt( - _source.toString(), - _conversion, - _argument_index, - _width, - _precision, - _flags - ); - init(); - return result; - } - - private final FmtCmpnt append(char c) { - - if (_source == null) { - _source = new StringBuilder(); - } - _source.append(c); - - // FIXME: none of these date formats are implemented, because lazy - // if a datetime is specified, after the conversion character a time - // format specifier is expected. This is the only case where a character - // is allowed after the conversion character. - if (_conversion == CONV_DTIME) switch (c) { - - // Hour of the day for the 24-hour clock, formatted as two digits with a - // leading zero as necessary i.e. 00 - 23. - case 'H': - - // Hour for the 12-hour clock, formatted as two digits with a leading - // zero as necessary, i.e. 01 - 12. - case 'I': - - // Hour of the day for the 24-hour clock, i.e. 0 - 23. - case 'k': - - // Hour for the 12-hour clock, i.e. 1 - 12. - case 'l': - - // Minute within the hour formatted as two digits with a leading zero - // as necessary, i.e. 00 - 59. - case 'M': - - // Seconds within the minute, formatted as two digits with a leading - // zero as necessary, i.e. 00 - 60 ("60" is a special value required to - // support leap seconds). - case 'S': - - // Millisecond within the second formatted as three digits with leading - // zeros as necessary, i.e. 000 - 999. - case 'L': - - // Nanosecond within the second, formatted as nine digits with leading - // zeros as necessary, i.e. 000000000 - 999999999. - case 'N': - - // Locale-specific morning or afternoon marker in lower case, - // e.g."am" or "pm". Use of the conversion prefix 'T' forces this - // output to upper case. - case 'p': - - // RFC 822 style numeric time zone offset from GMT, e.g. -0800. - case 'z': - - // A string representing the abbreviation for the time zone. The - // Formatter's locale will supersede the locale of the argument - // (if any). - case 'Z': - - // Seconds since the beginning of the epoch - // starting at 1 January 1970 00:00:00 UTC, - // i.e. Long.MIN_VALUE/1000 to Long.MAX_VALUE/1000. - case 's': - - // Milliseconds since the beginning of the epoch - // starting at 1 January 1970 00:00:00 UTC, - // i.e. Long.MIN_VALUE to Long.MAX_VALUE. - case 'Q': - - // ------------------------------------------------------------------ - // The following conversion characters are used for formatting dates: - // ------------------------------------------------------------------ - - // Locale-specific full month name, e.g. "January", "February". - case 'B': - - // Locale-specific abbreviated month name, e.g. "Jan", "Feb". - case 'b': - - // Same as 'b'. - case 'h': - - // Locale-specific full name of the day of the week, e.g. "Sunday" - case 'A': - - // Locale-specific short name of the day of the week, e.g. "Sun" - case 'a': - - // Four-digit year divided by 100, formatted as two digits with leading - // zero as necessary, i.e. 00 - 99 - case 'C': - - // Year, formatted as at least four digits with leading zeros - // as necessary, e.g. 0092 equals 92 CE for the Gregorian calendar. - case 'Y': - - // Last two digits of the year, formatted with leading zeros - // as necessary, i.e. 00 - 99. - case 'y': - - // Day of year, formatted as three digits with leading zeros - // as necessary, e.g. 001 - 366 for the Gregorian calendar. - case 'j': - - // Month, formatted as two digits with leading zeros as necessary, - // i.e. 01 - 13. - case 'm': - - // Day of month, formatted as two digits with leading zeros as - // necessary, i.e. 01 - 31 - case 'd': - - // Day of month, formatted as two digits, i.e. 1 - 31. - case 'e': - - // ------------------------------------------------------------------- - // The following conversion characters are used for formatting common - // date/time compositions. - // ------------------------------------------------------------------- - - // Time formatted for the 24-hour clock as "%tH:%tM" - case 'R': - - // Time formatted for the 24-hour clock as "%tH:%tM:%tS". - case 'T': - - // Time formatted for the 12-hour clock as "%tI:%tM:%tS %Tp". The location - // of the morning or afternoon marker ('%Tp') may be locale-dependent. - case 'r': - - // Date formatted as "%tm/%td/%ty". - case 'D': - - // ISO 8601 complete date formatted as "%tY-%tm-%td". - case 'F': - - // Date and time formatted as "%ta %tb %td %tT %tZ %tY", e.g. - // "Sun Jul 20 16:17:00 EDT 1969". - case 'c': - return seal(CONV_DTIME); - - default: - throw new IllegalFormatException("Illegal date/time modifier: " + c); - } - - // -- Flags and Switches ----------------------------------------------- - // these are the possible characters for flags, width, etc. if the input - // is not one of these characters, it needs to be a valid conversion char. - // because the possible flags can vary based on the type of conversion, - // it is easiest to just buffer the flags, argument index, etc. until a - // conversion character has been reached. The seal() method will then - // work out if the specified flags are valid for the given conversion. - switch (c) { - case '$': - case '<': - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - case '+': - case '\'': - case ' ': - case '#': - case ',': - case '.': - case '(': - return null; - // -- End of Flags and Switches ---------------------------------------- - - // -- Conversion characters -------------------------------------------- - // If this point is reached, then the current character must be a valid - // conversion character. If it is not, it should fall through the rest - // of the switch statement below and throw an IllegalFormatException - - // string conversion - case 'S': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 's': - return seal(CONV_STRNG); - - // newline conversion - case 'n': - return seal(CONV_NLINE); - - // percent conversion - case '%': - return seal(CONV_PRCNT); - - // decimal numeric conversion - case 'd': - return seal(CONV_DECML); - - // hexidecimal numeric conversion - case 'X': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 'x': - return seal(CONV_HXDEC); - - // datetime conversion - case 'T': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 't': - _conversion = CONV_DTIME; - return null; - - // boolean conversion - case 'B': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 'b': - return seal(CONV_BOOLN); - - // hashcode conversion - case 'H': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 'h': - return seal(CONV_HCODE); - - // character conversion - case 'C': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 'c': - return seal(CONV_CHRCT); - - // octal numeric conversion - case 'o': - return seal(CONV_OCTAL); - - // computerized scientific conversion - case 'E': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 'e': - return seal(CONV_CPSCI); - - // floating point conversion - case 'f': - return seal(CONV_FLOAT); - - // general scientific floating point conversion - case 'G': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 'g': - return seal(CONV_GNSCI); - - // hexidecimal exponential floating point conversion - case 'A': - setFlagTrue(FLAG_FORCE_UPPER_CASE); - case 'a': - return seal(CONV_HXEXP); - // -- End of Conversion characters -------------------------------------- - - default: - throw new IllegalFormatException( - "Invalid character encountered while parsing specifier: " + c); - } - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{ ") - .append("source = '").append(_source).append("', ") - .append("conversion = ").append(_conversion).append(", ") - .append("flags = ").append(Byte.toString(_flags, 2)).append(", ") - .append("arg_index = ").append(_argument_index).append(", ") - .append("width = ").append(_width).append(", ") - .append("precision = ").append(_precision).append(", ") - .append("}"); - return sb.toString(); - } - - private final FmtCmpnt seal(final byte conversion) { - - // throwing IllegalStateException instead of IllegalFormatException - // because this should only occur if there is a bug in the append() - // method. In that case I'd prefer to fail fast even if the user is - // explicitly trying to catch IllegalFormatException. - if (conversion < 0 || conversion > 0xE) { - throw new IllegalArgumentException(); - } - - this._conversion = conversion; - - // if the length is less than 2, it must mean that only the conversion - // character was specified. Since a conversion character by itself is a - // valid pattern, just build and return - if (_source.length() < 2) { - return build(); - } - - // --------------------------------------------------------------------- - // spec format: [argument_index$][flags][width][.precision] - // --------------------------------------------------------------------- - // the last character of the spec is the conversion character which has - // already been translated the appropriate byte by the append() method, - // so the last character gets chopped off before processing - final String spec = _source.substring(0, _source.length() - 1); - - // if argument index is supported, it should be followed by a '$' and be - // comprised only of digit characters, or it should be a single '<' char - final int dollarIndex = spec.indexOf('$'); - if (dollarIndex > -1) { - if (acceptsArgument(conversion)) { - if (spec.charAt(dollarIndex - 1) == '<') { - _argument_index = AIDX_PREV; - } else { - _argument_index = Integer.valueOf(spec.substring(0, dollarIndex)); - } - } else { - throw new IllegalFormatException( - "Formats that do not accept arguments cannot specify an index." - ); - } - } - if (dollarIndex == (spec.length() - 1)) { - return build(); - } - - // if precision is supported, look for the first period and assume that - // everything before is the width and everything after is the precision - final int dotIndex = spec.indexOf('.'); - if (dotIndex > -1) { - if (precisionSupported(conversion)) { - _precision = Integer.valueOf(spec.substring(dotIndex + 1)); - } else { - throw new IllegalFormatException( - "Precision is not supported for " + conversion - ); - } - } - - // Now loop over the remaining characters to get the width as well as any - // applicable flags. Note: 0 is a valid flag so must be handled carefully - final String remaining = spec.substring( - Math.max(dollarIndex, 0), dotIndex > -1 ? dotIndex : spec.length() - ); - int flagsEnd = -1; - for (int i = 0, n = remaining.length(); i < n && (flagsEnd == -1); i++) { - final char c = remaining.charAt(i); - switch (c) { - case '-': - ensureLeftJustifySupported(); - setFlagTrue(FLAG_LEFT_JUSTIFIED); - break; - case '#': - ensureNumeric(c); - setFlagTrue(FLAG_ALTERNATE_FORM); - break; - case '+': - ensureNumeric(c); - setFlagTrue(FLAG_ALWAYS_INCLUDES_SIGN); - break; - case ' ': - ensureNumeric(c); - setFlagTrue(FLAG_LEADING_SPACE_PADDED); - break; - case ',': - ensureNumeric(c); - setFlagTrue(FLAG_GROUPING_SEPARATORS); - break; - case '(': - ensureNumeric(c); - setFlagTrue(FLAG_NEGATIVES_IN_PARENS); - break; - case '0': - ensureNumeric(c); - setFlagTrue(FLAG_LEADING_ZERO_PADDED); - break; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - flagsEnd = i; - _width = Integer.valueOf(remaining.substring(flagsEnd)); - return build(); - } - } - throw new IllegalStateException(); - } - private final void ensureLeftJustifySupported() { - if (!widthSupported(_conversion)) { - throw new IllegalFormatException( - "Conversion must support width if specifying left justified." - ); - } - } - private final void ensureNumeric(final char c) { - if (!isNumeric(_conversion)) { - throw new IllegalFormatException( - "flag " + c + " only supported on numeric specifiers." - ); - } - } - private final void setFlagTrue(final byte flag) { - _flags |= flag; - }/* - final void setFlagFalse(final byte flag) { - _flags &= ~flag; - }*/ - } -} diff --git a/sgx-jvm/avian/classpath/avian/Function.java b/sgx-jvm/avian/classpath/avian/Function.java deleted file mode 100644 index 246a3ae512..0000000000 --- a/sgx-jvm/avian/classpath/avian/Function.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public interface Function { - public B call(A argument) throws Exception; -} diff --git a/sgx-jvm/avian/classpath/avian/IncompatibleContinuationException.java b/sgx-jvm/avian/classpath/avian/IncompatibleContinuationException.java deleted file mode 100644 index 15007c0fc0..0000000000 --- a/sgx-jvm/avian/classpath/avian/IncompatibleContinuationException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class IncompatibleContinuationException extends Exception { - public IncompatibleContinuationException(String message) { - super(message); - } - - public IncompatibleContinuationException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/avian/InnerClassReference.java b/sgx-jvm/avian/classpath/avian/InnerClassReference.java deleted file mode 100644 index 614a4da93a..0000000000 --- a/sgx-jvm/avian/classpath/avian/InnerClassReference.java +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class InnerClassReference { - public byte[] inner; - public byte[] outer; - public byte[] name; - public short flags; -} diff --git a/sgx-jvm/avian/classpath/avian/Iso88591.java b/sgx-jvm/avian/classpath/avian/Iso88591.java deleted file mode 100644 index dcdb7baf6a..0000000000 --- a/sgx-jvm/avian/classpath/avian/Iso88591.java +++ /dev/null @@ -1,26 +0,0 @@ - -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.io.ByteArrayOutputStream; - -public class Iso88591 { - - public static byte[] encode(char[] s16, int offset, int length) { - ByteArrayOutputStream buf = new ByteArrayOutputStream(); - for (int i = offset; i < offset+length; ++i) { - // ISO-88591-1/Latin-1 is the same as UTF-16 under 0x100 - buf.write(s16[i]); - } - return buf.toByteArray(); - } -} diff --git a/sgx-jvm/avian/classpath/avian/LegacyObjectInputStream.java b/sgx-jvm/avian/classpath/avian/LegacyObjectInputStream.java deleted file mode 100644 index 8738048dd7..0000000000 --- a/sgx-jvm/avian/classpath/avian/LegacyObjectInputStream.java +++ /dev/null @@ -1,240 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import avian.VMClass; - -import java.util.HashMap; -import java.io.EOFException; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.PushbackReader; -import java.io.StreamCorruptedException; -import java.lang.reflect.Array; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; - -public class LegacyObjectInputStream extends InputStream { - private final InputStream in; - private final PushbackReader r; - - public LegacyObjectInputStream(InputStream in) { - this.in = in; - this.r = new PushbackReader(new InputStreamReader(in)); - } - - public int read() throws IOException { - return in.read(); - } - - public int read(byte[] b, int offset, int length) throws IOException { - return in.read(b, offset, length); - } - - public void close() throws IOException { - in.close(); - } - - public Object readObject() throws IOException, ClassNotFoundException { - return readObject(new HashMap()); - } - - public boolean readBoolean() throws IOException { - read('z'); - return readLongToken() != 0; - } - - public byte readByte() throws IOException { - read('b'); - return (byte) readLongToken(); - } - - public char readChar() throws IOException { - read('c'); - return (char) readLongToken(); - } - - public short readShort() throws IOException { - read('s'); - return (short) readLongToken(); - } - - public int readInt() throws IOException { - read('i'); - return (int) readLongToken(); - } - - public long readLong() throws IOException { - read('j'); - return readLongToken(); - } - - public float readFloat() throws IOException { - read('f'); - return (float) readDoubleToken(); - } - - public double readDouble() throws IOException { - read('d'); - return readDoubleToken(); - } - - public void defaultReadObject() throws IOException { - throw new UnsupportedOperationException(); - } - - private void skipSpace() throws IOException { - int c; - while ((c = r.read()) != -1 && Character.isWhitespace((char) c)); - if (c != -1) { - r.unread(c); - } - } - - private void read(char v) throws IOException { - skipSpace(); - - int c = r.read(); - if (c != v) { - if (c == -1) { - throw new EOFException(); - } else { - throw new StreamCorruptedException(); - } - } - } - - private String readStringToken() throws IOException { - skipSpace(); - - StringBuilder sb = new StringBuilder(); - int c; - while ((c = r.read()) != -1 && ! Character.isWhitespace((char) c) && c != ')') { - sb.append((char) c); - } - if (c != -1) { - r.unread(c); - } - return sb.toString(); - } - - private long readLongToken() throws IOException { - return Long.parseLong(readStringToken()); - } - - private double readDoubleToken() throws IOException { - return Double.parseDouble(readStringToken()); - } - - private Object readObject(HashMap map) - throws IOException, ClassNotFoundException - { - skipSpace(); - switch (r.read()) { - case 'a': - return deserializeArray(map); - case 'l': - return deserializeObject(map); - case 'n': - return null; - case -1: - throw new EOFException(); - default: - throw new StreamCorruptedException(); - } - } - - private Object deserialize(HashMap map) - throws IOException, ClassNotFoundException - { - skipSpace(); - switch (r.read()) { - case 'a': - return deserializeArray(map); - case 'l': - return deserializeObject(map); - case 'r': - return map.get((int) readLongToken()); - case 'n': - return null; - case 'z': - return (readLongToken() != 0); - case 'b': - return (byte) readLongToken(); - case 'c': - return (char) readLongToken(); - case 's': - return (short) readLongToken(); - case 'i': - return (int) readLongToken(); - case 'j': - return readLongToken(); - case 'f': - return (float) readDoubleToken(); - case 'd': - return readDoubleToken(); - case -1: - throw new EOFException(); - default: - throw new StreamCorruptedException(); - } - } - - private Object deserializeArray(HashMap map) - throws IOException, ClassNotFoundException - { - read('('); - int id = (int) readLongToken(); - Class c = Class.forName(readStringToken()); - int length = (int) readLongToken(); - Class t = c.getComponentType(); - Object o = Array.newInstance(t, length); - - map.put(id, o); - - for (int i = 0; i < length; ++i) { - Array.set(o, i, deserialize(map)); - } - - read(')'); - - return o; - } - - private static native Object makeInstance(VMClass c); - - private Object deserializeObject(HashMap map) - throws IOException, ClassNotFoundException - { - read('('); - int id = (int) readLongToken(); - Class c = Class.forName(readStringToken()); - Object o = makeInstance(c.vmClass); - - map.put(id, o); - - for (Field f: c.getAllFields()) { - int modifiers = f.getModifiers(); - if ((modifiers & (Modifier.TRANSIENT | Modifier.STATIC)) == 0) { - try { - f.set(o, deserialize(map)); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - } - - read(')'); - - return o; - } -} diff --git a/sgx-jvm/avian/classpath/avian/LegacyObjectOutputStream.java b/sgx-jvm/avian/classpath/avian/LegacyObjectOutputStream.java deleted file mode 100644 index a55c18230e..0000000000 --- a/sgx-jvm/avian/classpath/avian/LegacyObjectOutputStream.java +++ /dev/null @@ -1,211 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.util.IdentityHashMap; -import java.lang.reflect.Array; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.io.IOException; -import java.io.OutputStream; -import java.io.PrintStream; -import java.io.Serializable; -import java.io.NotSerializableException; - -public class LegacyObjectOutputStream extends OutputStream { - private final PrintStream out; - - public LegacyObjectOutputStream(OutputStream out) { - this.out = new PrintStream(out); - } - - public void write(int c) throws IOException { - out.write(c); - } - - public void write(byte[] b, int offset, int length) throws IOException { - out.write(b, offset, length); - } - - public void flush() throws IOException { - out.flush(); - } - - public void close() throws IOException { - out.close(); - } - - public void writeObject(Object o) throws IOException { - writeObject(o, new IdentityHashMap(), new int[] {0}); - } - - public void writeBoolean(boolean v) { - out.print("z"); - out.print((v ? 1 : 0)); - } - - public void writeByte(byte v) { - out.print("b"); - out.print((int) v); - } - - public void writeChar(char v) { - out.print("c"); - out.print((int) v); - } - - public void writeShort(short v) { - out.print("s"); - out.print((int) v); - } - - public void writeInt(int v) { - out.print("i"); - out.print(v); - } - - public void writeLong(long v) { - out.print("j"); - out.print(v); - } - - public void writeFloat(float v) { - out.print("f"); - out.print(v); - } - - public void writeDouble(double v) { - out.print("d"); - out.print(v); - } - - public void defaultWriteObject() throws IOException { - throw new UnsupportedOperationException(); - } - - private void writeObject(Object o, IdentityHashMap map, - int[] nextId) - throws IOException - { - if (o == null) { - out.print("n"); - } else { - Integer id = map.get(o); - if (id == null) { - map.put(o, nextId[0]); - - Class c = o.getClass(); - if (c.isArray()) { - serializeArray(o, map, nextId); - } else if (Serializable.class.isAssignableFrom(c)) { - serializeObject(o, map, nextId); - } else { - throw new NotSerializableException(c.getName()); - } - } else { - out.print("r"); - out.print(id.intValue()); - } - } - } - - private void serializeArray(Object o, IdentityHashMap map, - int[] nextId) - throws IOException - { - Class c = o.getClass(); - Class t = c.getComponentType(); - int length = Array.getLength(o); - - out.print("a("); - out.print(nextId[0]++); - out.print(" "); - out.print(c.getName()); - out.print(" "); - out.print(length); - - for (int i = 0; i < length; ++i) { - out.print(" "); - Object v = Array.get(o, i); - if (t.equals(boolean.class)) { - writeBoolean((Boolean) v); - } else if (t.equals(byte.class)) { - writeByte((Byte) v); - } else if (t.equals(char.class)) { - writeChar((Character) v); - } else if (t.equals(short.class)) { - writeShort((Short) v); - } else if (t.equals(int.class)) { - writeInt((Integer) v); - } else if (t.equals(long.class)) { - writeLong((Long) v); - } else if (t.equals(float.class)) { - writeFloat((Float) v); - } else if (t.equals(double.class)) { - writeDouble((Double) v); - } else { - writeObject(v, map, nextId); - } - } - - out.print(")"); - } - - private void serializeObject(Object o, IdentityHashMap map, - int[] nextId) - throws IOException - { - Class c = o.getClass(); - - out.print("l("); - out.print(nextId[0]++); - out.print(" "); - out.print(c.getName()); - - for (Field f: c.getAllFields()) { - int modifiers = f.getModifiers(); - if ((modifiers & (Modifier.TRANSIENT | Modifier.STATIC)) == 0) { - out.print(" "); - Object v; - - try { - v = f.get(o); - } catch (Exception e) { - throw new RuntimeException(e); - } - - Class t = f.getType(); - if (t.equals(boolean.class)) { - writeBoolean((Boolean) v); - } else if (t.equals(byte.class)) { - writeByte((Byte) v); - } else if (t.equals(char.class)) { - writeChar((Character) v); - } else if (t.equals(short.class)) { - writeShort((Short) v); - } else if (t.equals(int.class)) { - writeInt((Integer) v); - } else if (t.equals(long.class)) { - writeLong((Long) v); - } else if (t.equals(float.class)) { - writeFloat((Float) v); - } else if (t.equals(double.class)) { - writeDouble((Double) v); - } else { - writeObject(v, map, nextId); - } - } - } - - out.print(")"); - } - -} diff --git a/sgx-jvm/avian/classpath/avian/Machine.java b/sgx-jvm/avian/classpath/avian/Machine.java deleted file mode 100644 index 00c6ea2f15..0000000000 --- a/sgx-jvm/avian/classpath/avian/Machine.java +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -public abstract class Machine { - - private static final Unsafe unsafe; - - static { - Unsafe u; - try { - Field f = Unsafe.class.getDeclaredField("theUnsafe"); - f.setAccessible(true); - u = (Unsafe)f.get(null); - } catch (Exception e) { - u = null; - } - unsafe = u; - } - - public static native void dumpHeap(String outputFile); - - public static Unsafe getUnsafe() { - return unsafe; - } - - /** - * Short version: Don't use this function -- it's evil. - * - * Long version: This is kind of a poor man's, cross-platform - * version of Microsoft's Structured Exception Handling. The idea - * is that you can call a native function with the specified - * argument such that any OS signals raised (e.g. SIGSEGV, SIGBUS, - * SIGFPE, EXC_ACCESS_VIOLATION, etc.) prior to the function - * returning are converted into the appropriate Java exception - * (e.g. NullPointerException, ArithmeticException, etc.) and thrown - * from this method. This may be useful in very specific - * circumstances, e.g. to work around a bug in a library that would - * otherwise crash your app. On the other hand, you'd be much - * better off just fixing the library if possible. - * - * Caveats: The specified function should return quickly without - * blocking, since it will block critical VM features such as - * garbage collection. The implementation is equivalent to using - * setjmp/longjmp to achieve a non-local return from the signal - * handler, meaning C++ destructors and other cleanup code might not - * be run if a signal is raised. It might melt your keyboard and - * burn your fingertips. Caveat lector. - * - * @param function a function pointer of type int64_t (*)(int64_t) - * @param argument the argument to pass to the function - * @return the return value of the function - */ - public static native long tryNative(long function, long argument); - -} diff --git a/sgx-jvm/avian/classpath/avian/MethodAddendum.java b/sgx-jvm/avian/classpath/avian/MethodAddendum.java deleted file mode 100644 index 11f6b9ff15..0000000000 --- a/sgx-jvm/avian/classpath/avian/MethodAddendum.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class MethodAddendum extends Addendum { - public Object exceptionTable; - public Object annotationDefault; - public Object parameterAnnotationTable; -} diff --git a/sgx-jvm/avian/classpath/avian/Pair.java b/sgx-jvm/avian/classpath/avian/Pair.java deleted file mode 100644 index dff3313542..0000000000 --- a/sgx-jvm/avian/classpath/avian/Pair.java +++ /dev/null @@ -1,5 +0,0 @@ -package avian; - -abstract class Pair { - // VM-visible fields in types.def -} diff --git a/sgx-jvm/avian/classpath/avian/PersistentSet.java b/sgx-jvm/avian/classpath/avian/PersistentSet.java deleted file mode 100644 index c257807ade..0000000000 --- a/sgx-jvm/avian/classpath/avian/PersistentSet.java +++ /dev/null @@ -1,594 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.util.Comparator; - -public class PersistentSet implements Iterable { - private static final Node NullNode = new Node(null); - - static { - NullNode.left = NullNode; - NullNode.right = NullNode; - } - - private final Node root; - private final Comparator comparator; - private final int size; - - public PersistentSet() { - this(NullNode, new Comparator() { - public int compare(T a, T b) { - return ((Comparable) a).compareTo(b); - } - }, 0); - } - - public PersistentSet(Comparator comparator) { - this(NullNode, comparator, 0); - } - - private PersistentSet(Node root, Comparator comparator, int size) { - this.root = root; - this.comparator = comparator; - this.size = size; - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("{"); - for (java.util.Iterator it = iterator(); it.hasNext();) { - sb.append(it.next()); - if (it.hasNext()) { - sb.append(","); - } - } - sb.append("}"); - return sb.toString(); - } - - public Comparator comparator() { - return comparator; - } - - public PersistentSet add(T value) { - return add(value, false); - } - - public int size() { - return size; - } - - public PersistentSet add(T value, boolean replaceExisting) { - Path p = find(value); - if (! p.fresh) { - if (replaceExisting) { - return p.replaceWith(value); - } else { - return this; - } - } - - return add(p); - } - - private PersistentSet add(Path p) { - if (! p.fresh) throw new IllegalArgumentException(); - - Node new_ = p.node; - Node newRoot = p.root.root; - Cell> ancestors = p.ancestors; - - // rebalance - new_.red = true; - while (ancestors != null && ancestors.value.red) { - if (ancestors.value == ancestors.next.value.left) { - if (ancestors.next.value.right.red) { - ancestors.value.red = false; - ancestors.next.value.right = new Node(ancestors.next.value.right); - ancestors.next.value.right.red = false; - ancestors.next.value.red = true; - new_ = ancestors.next.value; - ancestors = ancestors.next.next; - } else { - if (new_ == ancestors.value.right) { - new_ = ancestors.value; - ancestors = ancestors.next; - - Node n = leftRotate(new_); - if (ancestors.value.right == new_) { - ancestors.value.right = n; - } else { - ancestors.value.left = n; - } - ancestors = new Cell(n, ancestors); - } - ancestors.value.red = false; - ancestors.next.value.red = true; - - Node n = rightRotate(ancestors.next.value); - if (ancestors.next.next == null) { - newRoot = n; - } else if (ancestors.next.next.value.right == ancestors.next.value) { - ancestors.next.next.value.right = n; - } else { - ancestors.next.next.value.left = n; - } - // done - } - } else { - if (ancestors.next.value.left.red) { - ancestors.value.red = false; - ancestors.next.value.left = new Node(ancestors.next.value.left); - ancestors.next.value.left.red = false; - ancestors.next.value.red = true; - new_ = ancestors.next.value; - ancestors = ancestors.next.next; - } else { - if (new_ == ancestors.value.left) { - new_ = ancestors.value; - ancestors = ancestors.next; - - Node n = rightRotate(new_); - if (ancestors.value.right == new_) { - ancestors.value.right = n; - } else { - ancestors.value.left = n; - } - ancestors = new Cell(n, ancestors); - } - ancestors.value.red = false; - ancestors.next.value.red = true; - - Node n = leftRotate(ancestors.next.value); - if (ancestors.next.next == null) { - newRoot = n; - } else if (ancestors.next.next.value.right == ancestors.next.value) { - ancestors.next.next.value.right = n; - } else { - ancestors.next.next.value.left = n; - } - // done - } - } - } - - newRoot.red = false; - - return new PersistentSet(newRoot, comparator, size + 1); - } - - private static Node leftRotate(Node n) { - Node child = new Node(n.right); - n.right = child.left; - child.left = n; - return child; - } - - private static Node rightRotate(Node n) { - Node child = new Node(n.left); - n.left = child.right; - child.right = n; - return child; - } - - public PersistentSet remove(T value) { - Path p = find(value); - if (! p.fresh) { - return remove(p); - } - - return this; - } - - private PersistentSet remove(Path p) { - if (size == 1) { - if (p.node != root) { - throw new IllegalArgumentException(); - } - return new PersistentSet(NullNode, comparator, 0); - } - - Node new_ = p.node; - Node newRoot = p.root.root; - Cell> ancestors = p.ancestors; - - Node dead; - if (new_.left == NullNode || new_.right == NullNode) { - dead = new_; - } else { - Cell> path = successor(new_, ancestors); - dead = path.value; - ancestors = path.next; - } - - Node child; - if (dead.left != NullNode) { - child = new Node(dead.left); - } else if (dead.right != NullNode) { - child = new Node(dead.right); - } else { - child = NullNode; - } - - if (ancestors == null) { - child.red = false; - return new PersistentSet(child, comparator, 1); - } else if (dead == ancestors.value.left) { - ancestors.value.left = child; - } else { - ancestors.value.right = child; - } - - if (dead != new_) { - new_.value = dead.value; - } - - if (! dead.red) { - // rebalance - while (ancestors != null && ! child.red) { - if (child == ancestors.value.left) { - Node sibling = ancestors.value.right - = new Node(ancestors.value.right); - if (sibling.red) { - sibling.red = false; - ancestors.value.red = true; - - Node n = leftRotate(ancestors.value); - if (ancestors.next == null) { - newRoot = n; - } else if (ancestors.next.value.right == ancestors.value) { - ancestors.next.value.right = n; - } else { - ancestors.next.value.left = n; - } - ancestors.next = new Cell(n, ancestors.next); - - sibling = ancestors.value.right = new Node(ancestors.value.right); - } - - if (! (sibling.left.red || sibling.right.red)) { - sibling.red = true; - child = ancestors.value; - ancestors = ancestors.next; - } else { - if (! sibling.right.red) { - sibling.left = new Node(sibling.left); - sibling.left.red = false; - - sibling.red = true; - sibling = ancestors.value.right = rightRotate(sibling); - } - - sibling.red = ancestors.value.red; - ancestors.value.red = false; - - sibling.right = new Node(sibling.right); - sibling.right.red = false; - - Node n = leftRotate(ancestors.value); - if (ancestors.next == null) { - newRoot = n; - } else if (ancestors.next.value.right == ancestors.value) { - ancestors.next.value.right = n; - } else { - ancestors.next.value.left = n; - } - - child = newRoot; - ancestors = null; - } - } else { - Node sibling = ancestors.value.left - = new Node(ancestors.value.left); - if (sibling.red) { - sibling.red = false; - ancestors.value.red = true; - - Node n = rightRotate(ancestors.value); - if (ancestors.next == null) { - newRoot = n; - } else if (ancestors.next.value.left == ancestors.value) { - ancestors.next.value.left = n; - } else { - ancestors.next.value.right = n; - } - ancestors.next = new Cell(n, ancestors.next); - - sibling = ancestors.value.left = new Node(ancestors.value.left); - } - - if (! (sibling.right.red || sibling.left.red)) { - sibling.red = true; - child = ancestors.value; - ancestors = ancestors.next; - } else { - if (! sibling.left.red) { - sibling.right = new Node(sibling.right); - sibling.right.red = false; - - sibling.red = true; - sibling = ancestors.value.left = leftRotate(sibling); - } - - sibling.red = ancestors.value.red; - ancestors.value.red = false; - - sibling.left = new Node(sibling.left); - sibling.left.red = false; - - Node n = rightRotate(ancestors.value); - if (ancestors.next == null) { - newRoot = n; - } else if (ancestors.next.value.left == ancestors.value) { - ancestors.next.value.left = n; - } else { - ancestors.next.value.right = n; - } - - child = newRoot; - ancestors = null; - } - } - } - - child.red = false; - } - - return new PersistentSet(newRoot, comparator, size - 1); - } - - private static Cell> minimum(Node n, - Cell> ancestors) - { - while (n.left != NullNode) { - n.left = new Node(n.left); - ancestors = new Cell(n, ancestors); - n = n.left; - } - - return new Cell(n, ancestors); - } - - private static Cell> maximum(Node n, - Cell> ancestors) - { - while (n.right != NullNode) { - n.right = new Node(n.right); - ancestors = new Cell(n, ancestors); - n = n.right; - } - - return new Cell(n, ancestors); - } - - private static Cell> successor(Node n, - Cell> ancestors) - { - if (n.right != NullNode) { - n.right = new Node(n.right); - return minimum(n.right, new Cell(n, ancestors)); - } - - while (ancestors != null && n == ancestors.value.right) { - n = ancestors.value; - ancestors = ancestors.next; - } - - return ancestors; - } - - private static Cell> predecessor(Node n, - Cell> ancestors) - { - if (n.left != NullNode) { - n.left = new Node(n.left); - return maximum(n.left, new Cell(n, ancestors)); - } - - while (ancestors != null && n == ancestors.value.left) { - n = ancestors.value; - ancestors = ancestors.next; - } - - return ancestors; - } - - public Path find(T value) { - Node newRoot = new Node(root); - Cell> ancestors = null; - - Node old = root; - Node new_ = newRoot; - while (old != NullNode) { - ancestors = new Cell(new_, ancestors); - - int difference = comparator.compare(value, old.value); - if (difference < 0) { - old = old.left; - new_ = new_.left = new Node(old); - } else if (difference > 0) { - old = old.right; - new_ = new_.right = new Node(old); - } else { - return new Path(false, new_, - new PersistentSet(newRoot, comparator, size), - ancestors.next); - } - } - - new_.value = value; - return new Path(true, new_, - new PersistentSet(newRoot, comparator, size), - ancestors); - } - - public Path first() { - if (root == NullNode) return null; - - Node newRoot = new Node(root); - Cell> ancestors = null; - - Node old = root; - Node new_ = newRoot; - while (old.left != NullNode) { - ancestors = new Cell(new_, ancestors); - - old = old.left; - new_ = new_.left = new Node(old); - } - - return new Path(true, new_, - new PersistentSet(newRoot, comparator, size), - ancestors); - } - - public Path last() { - if (root == NullNode) return null; - - Node newRoot = new Node(root); - Cell> ancestors = null; - - Node old = root; - Node new_ = newRoot; - while (old.right != NullNode) { - ancestors = new Cell(new_, ancestors); - - old = old.right; - new_ = new_.right = new Node(old); - } - - return new Path(true, new_, - new PersistentSet(newRoot, comparator, size), - ancestors); - } - - public java.util.Iterator iterator() { - return new Iterator(first()); - } - - private Path successor(Path p) { - Cell> s = successor(p.node, p.ancestors); - if (s == null) { - return null; - } else { - return new Path(false, s.value, p.root, s.next); - } - } - - private Path predecessor(Path p) { - Cell> s = predecessor(p.node, p.ancestors); - if (s == null) { - return null; - } else { - return new Path(false, s.value, p.root, s.next); - } - } - - private static class Node { - public T value; - public Node left; - public Node right; - public boolean red; - - public Node(Node basis) { - if (basis != null) { - value = basis.value; - left = basis.left; - right = basis.right; - red = basis.red; - } - } - } - - public static class Path { - private final boolean fresh; - private final Node node; - private final PersistentSet root; - private final Cell> ancestors; - - public Path(boolean fresh, Node node, PersistentSet root, - Cell> ancestors) - { - this.fresh = fresh; - this.node = node; - this.root = root; - this.ancestors = ancestors; - } - - public T value() { - return node.value; - } - - public boolean fresh() { - return fresh; - } - - public PersistentSet root() { - return root; - } - - public Path successor() { - return root.successor(this); - } - - public Path predecessor() { - return root.predecessor(this); - } - - public PersistentSet remove() { - if (fresh) throw new IllegalStateException(); - - return root.remove(this); - } - - public PersistentSet add() { - if (! fresh) throw new IllegalStateException(); - - return root.add(this); - } - - public PersistentSet replaceWith(T value) { - if (fresh) throw new IllegalStateException(); - if (root.comparator.compare(node.value, value) != 0) - throw new IllegalArgumentException(); - - node.value = value; - return root; - } - } - - public class Iterator implements java.util.Iterator { - private PersistentSet.Path path; - - private Iterator(PersistentSet.Path path) { - this.path = path; - } - - private Iterator(Iterator start) { - path = start.path; - } - - public boolean hasNext() { - return path != null; - } - - public T next() { - PersistentSet.Path p = path; - path = path.successor(); - return p.value(); - } - - public void remove() { - throw new UnsupportedOperationException(); - } - } -} diff --git a/sgx-jvm/avian/classpath/avian/Singleton.java b/sgx-jvm/avian/classpath/avian/Singleton.java deleted file mode 100644 index c866169b6e..0000000000 --- a/sgx-jvm/avian/classpath/avian/Singleton.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public abstract class Singleton { - public static native int getInt(Object singleton, int offset); - public static native long getLong(Object singleton, int offset); - public static native Object getObject(Object singleton, int offset); - - // Fields in types.def -} diff --git a/sgx-jvm/avian/classpath/avian/Stream.java b/sgx-jvm/avian/classpath/avian/Stream.java deleted file mode 100644 index eb2859d432..0000000000 --- a/sgx-jvm/avian/classpath/avian/Stream.java +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.io.InputStream; -import java.io.OutputStream; -import java.io.IOException; -import java.io.EOFException; - -public abstract class Stream { - public static void write1(OutputStream out, int v) throws IOException { - out.write(v & 0xFF); - } - - public static int read1(InputStream in) throws IOException { - return in.read(); - } - - public static void write2(OutputStream out, int v) throws IOException { - out.write((v >>> 8) & 0xFF); - out.write((v ) & 0xFF); - } - - public static int read2(InputStream in) throws IOException { - int b1 = in.read(); - int b2 = in.read(); - if (b2 == -1) throw new EOFException(); - return ((b1 << 8) | (b2 & 0xFF)); - } - - public static void write4(OutputStream out, int v) throws IOException { - out.write((v >>> 24) & 0xFF); - out.write((v >>> 16) & 0xFF); - out.write((v >>> 8) & 0xFF); - out.write((v ) & 0xFF); - } - - public static int read4(InputStream in) throws IOException { - int b1 = in.read(); - int b2 = in.read(); - int b3 = in.read(); - int b4 = in.read(); - if (b4 == -1) throw new EOFException(); - return ((b1 << 24) | (b2 << 16) | (b3 << 8) | (b4)); - } - - public static void write8(OutputStream out, long v) throws IOException { - write4(out, (int) (v >>> 32) & 0xFFFFFFFF); - write4(out, (int) (v ) & 0xFFFFFFFF); - } - - public static long read8(InputStream in) throws IOException { - long b1 = in.read(); - long b2 = in.read(); - long b3 = in.read(); - long b4 = in.read(); - long b5 = in.read(); - long b6 = in.read(); - long b7 = in.read(); - long b8 = in.read(); - if (b8 == -1) throw new EOFException(); - return ((b1 << 56) | (b2 << 48) | (b3 << 40) | (b4 << 32) | - (b5 << 24) | (b6 << 16) | (b7 << 8) | (b8)); - } - - public static void set4(byte[] array, int offset, int v) { - array[offset ] = (byte) ((v >>> 24) & 0xFF); - array[offset + 1] = (byte) ((v >>> 16) & 0xFF); - array[offset + 2] = (byte) ((v >>> 8) & 0xFF); - array[offset + 3] = (byte) ((v ) & 0xFF); - } -} diff --git a/sgx-jvm/avian/classpath/avian/SystemClassLoader.java b/sgx-jvm/avian/classpath/avian/SystemClassLoader.java deleted file mode 100644 index 9727e61173..0000000000 --- a/sgx-jvm/avian/classpath/avian/SystemClassLoader.java +++ /dev/null @@ -1,210 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.net.URL; -import java.net.MalformedURLException; -import java.io.IOException; -import java.util.Collection; -import java.util.Collections; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.NoSuchElementException; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.regex.Pattern; - -public class SystemClassLoader extends ClassLoader { - public static native ClassLoader appLoader(); - - private native VMClass findVMClass(String name) - throws ClassNotFoundException; - - @Override - protected Class findClass(String name) throws ClassNotFoundException { - return getClass(findVMClass(name)); - } - - public static native Class getClass(VMClass vmClass); - - public static native VMClass vmClass(Class jClass); - - private native VMClass findLoadedVMClass(String name); - - private static native void startBlacklisting0(Thread t); - - public void startBlacklisting(Thread t) { - if (isForbidden("java/util/regex/Pattern$Test")) { - throw new IllegalStateException("Impossible!"); - } - startBlacklisting0(t); - } - - private static final Set BLACKLIST = Collections.unmodifiableSet(setOf( - Pattern.compile("^java/lang/reflect/"), - Pattern.compile("^java/lang/invoke/"), - Pattern.compile("^java/io/File"), - Pattern.compile("^java/net/"), - Pattern.compile("^java/.*Random$"), - Pattern.compile("^java/util/concurrent/"), - Pattern.compile("^java/lang/ClassLoader$"), - Pattern.compile("^java/lang/(Inheritable)?ThreadLocal$"), - Pattern.compile("^java/lang/Thread$"), - Pattern.compile("^com/sun/"), - Pattern.compile("^sun/") - )); - - private static Set setOf(T... items) { - Set set = new LinkedHashSet(); - Collections.addAll(set, items); - return set; - } - - /* - * Invoked via JNI, so uses the specification - * rather than the class name. - */ - private static boolean isForbidden(String spec) { - for (Pattern bad : BLACKLIST) { - if (bad.matcher(spec).find()) { - return true; - } - } - return false; - } - - protected Class reallyFindLoadedClass(String name){ - VMClass c = findLoadedVMClass(name); - return c == null ? null : getClass(c); - } - - @Override - protected Class loadClass(String name, boolean resolve) - throws ClassNotFoundException - { - Class c = findLoadedClass(name); - if (c == null) { - ClassLoader parent = getParent(); - if (parent != null) { - try { - c = parent.loadClass(name); - } catch (ClassNotFoundException ok) { } - } - - if (c == null) { - c = findClass(name); - } - } - - if (resolve) { - resolveClass(c); - } - - return c; - } - - private native String resourceURLPrefix(String name); - - protected URL findResource(String name) { - String prefix = resourceURLPrefix(name); - if (prefix != null) { - try { - return new URL(prefix + name); - } catch (MalformedURLException ignored) { } - } - return null; - } - - protected static native String getPackageSource(String name); - - // OpenJDK's java.lang.ClassLoader.getResource makes use of - // sun.misc.Launcher to load bootstrap resources, which is not - // appropriate for the Avian build, so we override it to ensure we - // get the behavior we want. This implementation is the same as - // that of Avian's java.lang.ClassLoader.getResource. - @Override - public URL getResource(String path) { - URL url = null; - ClassLoader parent = getParent(); - if (parent != null) { - url = parent.getResource(path); - } - - if (url == null) { - url = findResource(path); - } - - return url; - } - - // As above, we override this method to avoid inappropriate behavior - // in OpenJDK's java.lang.ClassLoader.getResources. - @Override - public Enumeration getResources(String name) throws IOException { - Collection urls = new ArrayList(5); - - ClassLoader parent = getParent(); - if (parent != null) { - for (Enumeration e = parent.getResources(name); - e.hasMoreElements();) - { - urls.add(e.nextElement()); - } - } - - Enumeration urls2 = findResources(name); - while (urls2.hasMoreElements()) { - urls.add(urls2.nextElement()); - } - - return Collections.enumeration(urls); - } - - private class ResourceEnumeration implements Enumeration { - private long[] finderElementPtrPtr; - private String name, urlPrefix; - - public ResourceEnumeration(String name) { - this.name = name; - finderElementPtrPtr = new long[1]; - urlPrefix = nextResourceURLPrefix(); - } - - private native String nextResourceURLPrefix(SystemClassLoader loader, - String name, long[] finderElementPtrPtr); - - private String nextResourceURLPrefix() { - return nextResourceURLPrefix(SystemClassLoader.this, name, - finderElementPtrPtr); - } - - public boolean hasMoreElements() { - return urlPrefix != null; - } - - public URL nextElement() { - if (urlPrefix == null) throw new NoSuchElementException(); - URL result; - try { - result = new URL(urlPrefix + name); - } catch (MalformedURLException ignored) { - result = null; - } - if (finderElementPtrPtr[0] == 0l) urlPrefix = null; - else urlPrefix = nextResourceURLPrefix(); - return result; - } - } - - protected Enumeration findResources(String name) { - return new ResourceEnumeration(name); - } -} diff --git a/sgx-jvm/avian/classpath/avian/Utf8.java b/sgx-jvm/avian/classpath/avian/Utf8.java deleted file mode 100644 index 2c32fec9de..0000000000 --- a/sgx-jvm/avian/classpath/avian/Utf8.java +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -import java.io.ByteArrayOutputStream; - -public class Utf8 { - public static boolean test(Object data) { - if (!(data instanceof byte[])) return false; - byte[] b = (byte[])data; - for (int i = 0; i < b.length; ++i) { - if (((int)b[i] & 0x080) != 0) return true; - } - return false; - } - - public static byte[] encode(char[] s16, int offset, int length) { - ByteArrayOutputStream buf = new ByteArrayOutputStream(); - for (int i = offset; i < offset+length; ++i) { - char c = s16[i]; - if (c == '\u0000') { // null char - buf.write(0); - buf.write(0); - } else if (c < 0x080) { // 1 byte char - buf.write(c); - } else if (c < 0x0800) { // 2 byte char - buf.write(0x0c0 | (c >>> 6)); - buf.write(0x080 | (c & 0x03f)); - } else { // 3 byte char - buf.write(0x0e0 | ((c >>> 12) & 0x0f)); - buf.write(0x080 | ((c >>> 6) & 0x03f)); - buf.write(0x080 | (c & 0x03f)); - } - } - return buf.toByteArray(); - } - - public static Object decode(byte[] s8, int offset, int length) { - Object buf = new byte[length]; - boolean isMultiByte = false; - int i=offset, j=0; - while (i < offset+length) { - int x = s8[i++]; - if ((x & 0x080) == 0x0) { // 1 byte char - if (x == 0) { // 2 byte null char - if (i == offset + length) { - return null; - } - ++ i; - } - cram(buf, j++, x); - } else if ((x & 0x0e0) == 0x0c0) { // 2 byte char - if (i == offset + length) { - return null; - } - - if (!isMultiByte) { - buf = widen(buf, j, length-1); - isMultiByte = true; - } - int y = s8[i++]; - cram(buf, j++, ((x & 0x1f) << 6) | (y & 0x3f)); - } else if ((x & 0x0f0) == 0x0e0) { // 3 byte char - if (i + 1 >= offset + length) { - return null; - } - - if (!isMultiByte) { - buf = widen(buf, j, length-2); - isMultiByte = true; - } - int y = s8[i++]; int z = s8[i++]; - cram(buf, j++, ((x & 0xf) << 12) | ((y & 0x3f) << 6) | (z & 0x3f)); - } - } - - return trim(buf, j); - } - - public static char[] decode16(byte[] s8, int offset, int length) { - Object decoded = decode(s8, offset, length); - if (decoded == null) { - return null; - } else if (decoded instanceof char[]) { - return (char[])decoded; - } else { - return (char[])widen(decoded, length, length); - } - } - - private static void cram(Object data, int index, int val) { - if (data instanceof byte[]) ((byte[])data)[index] = (byte)val; - else ((char[])data)[index] = (char)val; - } - - private static Object widen(Object data, int length, int capacity) { - byte[] src = (byte[])data; - char[] result = new char[capacity]; - for (int i = 0; i < length; ++i) result[i] = (char)((int)src[i] & 0x0ff); - return result; - } - - private static Object trim(Object data, int length) { - if (data instanceof byte[]) return data; - if (((char[])data).length == length) return data; - char[] result = new char[length]; - System.arraycopy(data, 0, result, 0, length); - return result; - } -} diff --git a/sgx-jvm/avian/classpath/avian/VMClass.java b/sgx-jvm/avian/classpath/avian/VMClass.java deleted file mode 100644 index 8960670775..0000000000 --- a/sgx-jvm/avian/classpath/avian/VMClass.java +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class VMClass { - public short flags; - public short vmFlags; - public short fixedSize; - public byte arrayElementSize; - public byte arrayDimensions; - public VMClass arrayElementClass; - public int runtimeDataIndex; - public int[] objectMask; - public byte[] name; - public byte[] sourceFile; - public VMClass super_; - public Object[] interfaceTable; - public VMMethod[] virtualTable; - public VMField[] fieldTable; - /** - * Methods declared in this class, plus any abstract virtual methods - * inherited from implemented or extended interfaces. If addendum - * is non-null and addendum.declaredMethodCount is non-negative, - * then the first addendum.declaredMethodCount methods are declared - * methods, while the rest are abstract virtual methods. If - * addendum is null or addendum.declaredMethodCount is negative, all - * are declared methods. - */ - public VMMethod[] methodTable; - public ClassAddendum addendum; - public Singleton staticTable; - public ClassLoader loader; - public byte[] source; -} diff --git a/sgx-jvm/avian/classpath/avian/VMField.java b/sgx-jvm/avian/classpath/avian/VMField.java deleted file mode 100644 index 2f2715d121..0000000000 --- a/sgx-jvm/avian/classpath/avian/VMField.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class VMField { - public byte vmFlags; - public byte code; - public short flags; - public short offset; - public int nativeID; - public byte[] name; - public byte[] spec; - public FieldAddendum addendum; - public VMClass class_; -} diff --git a/sgx-jvm/avian/classpath/avian/VMMethod.java b/sgx-jvm/avian/classpath/avian/VMMethod.java deleted file mode 100644 index 53af6e9c80..0000000000 --- a/sgx-jvm/avian/classpath/avian/VMMethod.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian; - -public class VMMethod { - public byte vmFlags; - public byte returnCode; - public byte parameterCount; - public byte parameterFootprint; - public short flags; - public short offset; - public int nativeID; - public int runtimeDataIndex; - public byte[] name; - public byte[] spec; - public MethodAddendum addendum; - public VMClass class_; - public Code code; - - public boolean hasAnnotations() { - return addendum != null && addendum.annotationTable != null; - } -} diff --git a/sgx-jvm/avian/classpath/avian/avianvmresource/Handler.java b/sgx-jvm/avian/classpath/avian/avianvmresource/Handler.java deleted file mode 100644 index 2e25a6bafc..0000000000 --- a/sgx-jvm/avian/classpath/avian/avianvmresource/Handler.java +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian.avianvmresource; - -import java.net.URL; -import java.net.URLStreamHandler; -import java.net.URLConnection; -import java.io.IOException; -import java.io.FileNotFoundException; -import java.io.InputStream; - -public class Handler extends URLStreamHandler { - protected URLConnection openConnection(URL url) { - return new ResourceConnection(url); - } - - private static class ResourceConnection extends URLConnection { - public ResourceConnection(URL url) { - super(url); - } - - public int getContentLength() { - return ResourceInputStream.getContentLength(url.getFile()); - } - - public InputStream getInputStream() throws IOException { - return new ResourceInputStream(url.getFile()); - } - - public void connect() { - // ignore - } - } - - private static class ResourceInputStream extends InputStream { - private long peer; - private int position; - - public ResourceInputStream(String path) throws IOException { - peer = open(path); - if (peer == 0) { - throw new FileNotFoundException(path); - } - } - - private static native int getContentLength(String path); - - private static native long open(String path) throws IOException; - - private static native int read(long peer, int position) throws IOException; - - private static native int read(long peer, int position, - byte[] b, int offset, int length) - throws IOException; - - public static native void close(long peer) throws IOException; - - public static native int available(long peer, int position); - - public int available() { - return available(peer, position); - } - - public int read() throws IOException { - if (peer != 0) { - int c = read(peer, position); - if (c >= 0) { - ++ position; - } - return c; - } else { - throw new IOException(); - } - } - - public int read(byte[] b, int offset, int length) throws IOException { - if (peer != 0) { - if (b == null) { - throw new NullPointerException(); - } - - if (offset < 0 || offset + length > b.length) { - throw new ArrayIndexOutOfBoundsException(); - } - - int c = read(peer, position, b, offset, length); - if (c >= 0) { - position += c; - } - return c; - } else { - throw new IOException(); - } - } - - public void close() throws IOException { - if (peer != 0) { - close(peer); - peer = 0; - } - } - } -} diff --git a/sgx-jvm/avian/classpath/avian/file/Handler.java b/sgx-jvm/avian/classpath/avian/file/Handler.java deleted file mode 100644 index 2ac476ff65..0000000000 --- a/sgx-jvm/avian/classpath/avian/file/Handler.java +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian.file; - -import java.net.URL; -import java.net.URLStreamHandler; -import java.net.URLConnection; -import java.io.IOException; -import java.io.FileNotFoundException; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; - -public class Handler extends URLStreamHandler { - protected URLConnection openConnection(URL url) { - return new FileURLConnection(url); - } - - private static class FileURLConnection extends URLConnection { - public FileURLConnection(URL url) { - super(url); - } - - public int getContentLength() { - return (int) new File(url.getFile()).length(); - } - - public InputStream getInputStream() throws IOException { - return new FileInputStream(new File(url.getFile())); - } - - public void connect() { - // ignore - } - } -} diff --git a/sgx-jvm/avian/classpath/avian/jar/Handler.java b/sgx-jvm/avian/classpath/avian/jar/Handler.java deleted file mode 100644 index b4a24de288..0000000000 --- a/sgx-jvm/avian/classpath/avian/jar/Handler.java +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package avian.jar; - -import java.net.URL; -import java.net.MalformedURLException; -import java.net.URLStreamHandler; -import java.net.JarURLConnection; -import java.net.URLConnection; -import java.io.IOException; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.util.jar.JarFile; -import java.util.jar.JarEntry; - -public class Handler extends URLStreamHandler { - protected URLConnection openConnection(URL url) { - return new MyJarURLConnection(url); - } - - protected void parseURL(URL url, String s, int start, int end) - throws MalformedURLException - { - // skip "jar:" - s = s.toString().substring(4); - int index = s.indexOf("!/"); - if (index < 0) { - throw new MalformedURLException(); - } - - URL file = new URL(s.substring(0, index)); - if (! "file".equals(file.getProtocol())) { - throw new RuntimeException - ("protocol " + file.getProtocol() + " not yet supported"); - } - - url.set("jar", null, -1, s, null); - } - - private static class MyJarURLConnection extends JarURLConnection { - private final JarFile file; - private final JarEntry entry; - - public MyJarURLConnection(URL url) { - super(url); - - String s = url.getFile(); - int index = s.indexOf("!/"); - - try { - this.file = new JarFile(new URL(s.substring(0, index)).getFile()); - this.entry = this.file.getJarEntry(s.substring(index + 2)); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public JarFile getJarFile() throws IOException { - return file; - } - - public int getContentLength() { - return (int)entry.getSize(); - } - - public InputStream getInputStream() throws IOException { - return file.getInputStream(entry); - } - - public void connect() { - // ignore - } - } -} diff --git a/sgx-jvm/avian/classpath/dalvik/system/BaseDexClassLoader.java b/sgx-jvm/avian/classpath/dalvik/system/BaseDexClassLoader.java deleted file mode 100644 index 27049cea21..0000000000 --- a/sgx-jvm/avian/classpath/dalvik/system/BaseDexClassLoader.java +++ /dev/null @@ -1,5 +0,0 @@ -package dalvik.system; - -public class BaseDexClassLoader extends ClassLoader { - public native String getLdLibraryPath(); -} diff --git a/sgx-jvm/avian/classpath/java-io.cpp b/sgx-jvm/avian/classpath/java-io.cpp deleted file mode 100644 index 2cf264efbd..0000000000 --- a/sgx-jvm/avian/classpath/java-io.cpp +++ /dev/null @@ -1,935 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include -#include -#include -#include - -#include "jni.h" -#include "jni-util.h" - -#ifdef PLATFORM_WINDOWS - -#define UNICODE - -#include -#include -#include -#include - -#define ACCESS _waccess -#define CLOSE _close -#define READ _read -#define WRITE _write -#define STAT _wstat -#define STRUCT_STAT struct _stat -#define MKDIR(path, mode) _wmkdir(path) -#define CHMOD(path, mode) _wchmod(path, mode) -#define REMOVE _wremove -#define RENAME _wrename -#define OPEN_MASK O_BINARY - -#define CHECK_X_OK R_OK - -#ifdef _MSC_VER -#define S_ISREG(x) ((x)&_S_IFREG) -#define S_ISDIR(x) ((x)&_S_IFDIR) -#define S_IRUSR _S_IREAD -#define S_IWUSR _S_IWRITE -#define W_OK 2 -#define R_OK 4 -#else -#define OPEN _wopen -#endif - -#define GET_CHARS GetStringChars -#define RELEASE_CHARS(path, chars) \ - ReleaseStringChars(path, reinterpret_cast(chars)) - -typedef wchar_t char_t; - -#if defined(WINAPI_FAMILY) -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - -#include "avian-interop.h" -#define SKIP_OPERATOR_NEW - -#endif -#endif - -#else // not PLATFORM_WINDOWS - -#include -#include -#include "sys/mman.h" - -#define ACCESS access -#define OPEN open -#define CLOSE close -#define READ read -#define WRITE write -#define STAT stat -#define STRUCT_STAT struct stat -#define MKDIR mkdir -#define CHMOD chmod -#define REMOVE remove -#define RENAME rename -#define OPEN_MASK 0 - -#define CHECK_X_OK X_OK - -#define GET_CHARS GetStringUTFChars -#define RELEASE_CHARS ReleaseStringUTFChars - -typedef char char_t; - -#endif // not PLATFORM_WINDOWS - -#ifndef WINAPI_FAMILY -#ifndef WINAPI_PARTITION_DESKTOP -#define WINAPI_PARTITION_DESKTOP 1 -#endif - -#ifndef WINAPI_FAMILY_PARTITION -#define WINAPI_FAMILY_PARTITION(x) (x) -#endif -#endif // WINAPI_FAMILY - -#if !defined(SKIP_OPERATOR_NEW) -inline void* operator new(size_t, void* p) throw() -{ - return p; -} -#endif - -typedef const char_t* string_t; - -namespace { - -#ifdef _MSC_VER -inline int OPEN(string_t path, int mask, int mode) -{ - int fd; - if (_wsopen_s(&fd, path, mask, _SH_DENYNO, mode) == 0) { - return fd; - } else { - return -1; - } -} -#endif - -inline bool exists(string_t path) -{ -#ifdef PLATFORM_WINDOWS - return GetFileAttributesW(path) != INVALID_FILE_ATTRIBUTES; -#else - STRUCT_STAT s; - return STAT(path, &s) == 0; -#endif -} - -inline int doOpen(JNIEnv* e, string_t path, int mask) -{ - int fd = OPEN(path, mask | OPEN_MASK, S_IRUSR | S_IWUSR); - if (fd == -1) { - if (errno == ENOENT) { - throwNewErrno(e, "java/io/FileNotFoundException"); - } else { - throwNewErrno(e, "java/io/IOException"); - } - } - return fd; -} - -inline void doClose(JNIEnv* e, jint fd) -{ - int r = CLOSE(fd); - if (r == -1) { - throwNewErrno(e, "java/io/IOException"); - } -} - -inline int doRead(JNIEnv* e, jint fd, jbyte* data, jint length) -{ - int r = READ(fd, data, length); - if (r > 0) { - return r; - } else if (r == 0) { - return -1; - } else { - throwNewErrno(e, "java/io/IOException"); - return 0; - } -} - -inline void doWrite(JNIEnv* e, jint fd, const jbyte* data, jint length) -{ - int r = WRITE(fd, data, length); - if (r != length) { - throwNewErrno(e, "java/io/IOException"); - } -} - -#ifdef PLATFORM_WINDOWS - -class Directory { - public: - Directory() : handle(0), findNext(false) - { - } - - virtual string_t next() - { - if (handle and handle != INVALID_HANDLE_VALUE) { - if (findNext) { - if (FindNextFileW(handle, &data)) { - return data.cFileName; - } - } else { - findNext = true; - return data.cFileName; - } - } - return 0; - } - - virtual void dispose() - { - if (handle and handle != INVALID_HANDLE_VALUE) { - FindClose(handle); - } - free(this); - } - - HANDLE handle; - WIN32_FIND_DATAW data; - bool findNext; -}; - -#else // not PLATFORM_WINDOWS - -#endif // not PLATFORM_WINDOWS - -} // namespace - -static inline string_t getChars(JNIEnv* e, jstring path) -{ - return reinterpret_cast(e->GET_CHARS(path, 0)); -} - -static inline void releaseChars(JNIEnv* e, jstring path, string_t chars) -{ - e->RELEASE_CHARS(path, chars); -} - -#ifndef SGX - -extern "C" JNIEXPORT jstring JNICALL - Java_java_io_File_toCanonicalPath(JNIEnv* /*e*/, jclass, jstring path) -{ - // todo - return path; -} - -extern "C" JNIEXPORT jstring JNICALL - Java_java_io_File_toAbsolutePath(JNIEnv* e UNUSED, jclass, jstring path) -{ -#ifdef PLATFORM_WINDOWS -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - string_t chars = getChars(e, path); - if (chars) { - const unsigned BufferSize = MAX_PATH; - char_t buffer[BufferSize]; - DWORD success = GetFullPathNameW(chars, BufferSize, buffer, 0); - releaseChars(e, path, chars); - - if (success) { - return e->NewString(reinterpret_cast(buffer), - wcslen(buffer)); - } - } - - return path; -#else - string_t chars = getChars(e, path); - if (chars) { - std::wstring partialPath = chars; - releaseChars(e, path, chars); - - std::wstring fullPath = AvianInterop::GetFullPath(partialPath); - - return e->NewString(reinterpret_cast(fullPath.c_str()), - fullPath.length()); - } - return path; -#endif -#else - jstring result = path; - string_t chars = getChars(e, path); - if (chars) { - if (chars[0] != '/') { - char* cwd = getcwd(NULL, 0); - if (cwd) { - unsigned size = strlen(cwd) + strlen(chars) + 2; - RUNTIME_ARRAY(char, buffer, size); - snprintf(RUNTIME_ARRAY_BODY(buffer), size, "%s/%s", cwd, chars); - result = e->NewStringUTF(RUNTIME_ARRAY_BODY(buffer)); - free(cwd); - } - } - releaseChars(e, path, chars); - } - return result; -#endif -} - -extern "C" JNIEXPORT jlong JNICALL - Java_java_io_File_length(JNIEnv* e, jclass, jstring path) -{ -#ifdef PLATFORM_WINDOWS - // Option: without opening file - // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364946(v=vs.85).aspx - string_t chars = getChars(e, path); - if (chars) { - LARGE_INTEGER fileSize; -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - HANDLE file = CreateFileW( - chars, FILE_READ_DATA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); -#else - HANDLE file = CreateFile2( - chars, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, nullptr); -#endif - releaseChars(e, path, chars); - if (file == INVALID_HANDLE_VALUE) - return 0; -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - if (!GetFileSizeEx(file, &fileSize)) { - CloseHandle(file); - return 0; - } -#else - FILE_STANDARD_INFO info; - if (!GetFileInformationByHandleEx( - file, FileStandardInfo, &info, sizeof(info))) { - CloseHandle(file); - return 0; - } - fileSize = info.EndOfFile; -#endif - - CloseHandle(file); - return static_cast(fileSize.QuadPart); - } -#else - - string_t chars = getChars(e, path); - if (chars) { - STRUCT_STAT s; - int r = STAT(chars, &s); - releaseChars(e, path, chars); - if (r == 0) { - return s.st_size; - } - } - -#endif - - return 0; -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_io_File_canRead(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - int r = ACCESS(chars, R_OK); - releaseChars(e, path, chars); - return (r == 0); - } - return false; -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_io_File_canWrite(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - int r = ACCESS(chars, W_OK); - releaseChars(e, path, chars); - return (r == 0); - } - return false; -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_io_File_canExecute(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - int r = ACCESS(chars, CHECK_X_OK); - releaseChars(e, path, chars); - return (r == 0); - } - return false; -} - -#ifndef PLATFORM_WINDOWS -extern "C" JNIEXPORT jboolean JNICALL - Java_java_io_File_setExecutable(JNIEnv* e, - jclass, - jstring path, - jboolean executable, - jboolean ownerOnly) -{ - string_t chars = getChars(e, path); - if (chars) { - jboolean v; - int mask; - if (ownerOnly) { - mask = S_IXUSR; - } else { - mask = S_IXUSR | S_IXGRP | S_IXOTH; - } - - STRUCT_STAT s; - int r = STAT(chars, &s); - if (r == 0) { - int mode = s.st_mode; - if (executable) { - mode |= mask; - } else { - mode &= ~mask; - } - if (CHMOD(chars, mode) != 0) { - v = false; - } else { - v = true; - } - } else { - v = false; - } - releaseChars(e, path, chars); - return v; - } - return false; -} - -#else // ifndef PLATFORM_WINDOWS - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_io_File_setExecutable(JNIEnv*, - jclass, - jstring, - jboolean executable, - jboolean) -{ - return executable; -} - -#endif - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_io_File_isDirectory(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - STRUCT_STAT s; - int r = STAT(chars, &s); - bool v = (r == 0 and S_ISDIR(s.st_mode)); - releaseChars(e, path, chars); - return v; - } else { - return false; - } -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_io_File_isFile(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - STRUCT_STAT s; - int r = STAT(chars, &s); - bool v = (r == 0 and S_ISREG(s.st_mode)); - releaseChars(e, path, chars); - return v; - } else { - return false; - } -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_io_File_exists(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - bool v = exists(chars); - releaseChars(e, path, chars); - return v; - } else { - return false; - } -} - -extern "C" JNIEXPORT jlong JNICALL - Java_java_io_File_lastModified(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { -#ifdef PLATFORM_WINDOWS -// Option: without opening file -// http://msdn.microsoft.com/en-us/library/windows/desktop/aa364946(v=vs.85).aspx -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - HANDLE hFile = CreateFileW( - chars, FILE_READ_DATA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0); -#else - HANDLE hFile = CreateFile2( - chars, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, nullptr); -#endif - releaseChars(e, path, chars); - if (hFile == INVALID_HANDLE_VALUE) - return 0; - LARGE_INTEGER fileDate, filetimeToUnixEpochAdjustment; - filetimeToUnixEpochAdjustment.QuadPart = 11644473600000L * 10000L; -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - FILETIME fileLastWriteTime; - if (!GetFileTime(hFile, 0, 0, &fileLastWriteTime)) { - CloseHandle(hFile); - return 0; - } - fileDate.HighPart = fileLastWriteTime.dwHighDateTime; - fileDate.LowPart = fileLastWriteTime.dwLowDateTime; -#else - FILE_BASIC_INFO fileInfo; - if (!GetFileInformationByHandleEx( - hFile, FileBasicInfo, &fileInfo, sizeof(fileInfo))) { - CloseHandle(hFile); - return 0; - } - fileDate = fileInfo.ChangeTime; -#endif - CloseHandle(hFile); - fileDate.QuadPart -= filetimeToUnixEpochAdjustment.QuadPart; - return fileDate.QuadPart / 10000000L; -#else - struct stat fileStat; - int res = stat(chars, &fileStat); - releaseChars(e, path, chars); - - if (res == -1) { - return 0; - } -#ifdef __APPLE__ -#define MTIME st_mtimespec -#else -#define MTIME st_mtim -#endif - return (static_cast(fileStat.MTIME.tv_sec) * 1000) - + (static_cast(fileStat.MTIME.tv_nsec) / (1000 * 1000)); -#endif - } - - return 0; -} - -#ifdef PLATFORM_WINDOWS - -extern "C" JNIEXPORT jlong JNICALL - Java_java_io_File_openDir(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - unsigned length = wcslen(chars); - unsigned size = length * sizeof(char_t); - - RUNTIME_ARRAY(char_t, buffer, length + 3); - memcpy(RUNTIME_ARRAY_BODY(buffer), chars, size); - memcpy(RUNTIME_ARRAY_BODY(buffer) + length, L"\\*", 6); - - releaseChars(e, path, chars); - - Directory* d = new (malloc(sizeof(Directory))) Directory; -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - d->handle = FindFirstFileW(RUNTIME_ARRAY_BODY(buffer), &(d->data)); -#else - d->handle = FindFirstFileExW(RUNTIME_ARRAY_BODY(buffer), - FindExInfoStandard, - &(d->data), - FindExSearchNameMatch, - NULL, - 0); -#endif - if (d->handle == INVALID_HANDLE_VALUE) { - d->dispose(); - d = 0; - } - - return reinterpret_cast(d); - } else { - return 0; - } -} - -extern "C" JNIEXPORT jstring JNICALL - Java_java_io_File_readDir(JNIEnv* e, jclass, jlong handle) -{ - Directory* d = reinterpret_cast(handle); - - while (true) { - string_t s = d->next(); - if (s) { - if (wcscmp(s, L".") == 0 || wcscmp(s, L"..") == 0) { - // skip . or .. and try again - } else { - return e->NewString(reinterpret_cast(s), wcslen(s)); - } - } else { - return 0; - } - } -} - -extern "C" JNIEXPORT void JNICALL - Java_java_io_File_closeDir(JNIEnv*, jclass, jlong handle) -{ - reinterpret_cast(handle)->dispose(); -} - -#else // not PLATFORM_WINDOWS - -extern "C" JNIEXPORT jlong JNICALL - Java_java_io_File_openDir(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - jlong handle = reinterpret_cast(opendir(chars)); - releaseChars(e, path, chars); - return handle; - } else { - return 0; - } -} - -extern "C" JNIEXPORT jstring JNICALL - Java_java_io_File_readDir(JNIEnv* e, jclass, jlong handle) -{ - struct dirent* directoryEntry; - - if (handle != 0) { - while (true) { - directoryEntry = readdir(reinterpret_cast(handle)); - if (directoryEntry == NULL) { - return NULL; - } else if (strcmp(directoryEntry->d_name, ".") == 0 - || strcmp(directoryEntry->d_name, "..") == 0) { - // skip . or .. and try again - } else { - return e->NewStringUTF(directoryEntry->d_name); - } - } - } - return NULL; -} - -extern "C" JNIEXPORT void JNICALL - Java_java_io_File_closeDir(JNIEnv*, jclass, jlong handle) -{ - if (handle != 0) { - closedir(reinterpret_cast(handle)); - } -} - -#endif // not PLATFORM_WINDOWS - -extern "C" JNIEXPORT jint JNICALL - Java_java_io_FileInputStream_open(JNIEnv* e, jclass, jstring path) -{ - string_t chars = getChars(e, path); - if (chars) { - int fd = doOpen(e, chars, O_RDONLY); - releaseChars(e, path, chars); - return fd; - } else { - return -1; - } -} - -extern "C" JNIEXPORT jint JNICALL - Java_java_io_FileInputStream_read__I(JNIEnv* e, jclass, jint fd) -{ - jbyte data; - int r = doRead(e, fd, &data, 1); - if (r <= 0) { - return -1; - } else { - return data & 0xff; - } -} - -extern "C" JNIEXPORT jint JNICALL - Java_java_io_FileInputStream_read__I_3BII(JNIEnv* e, - jclass, - jint fd, - jbyteArray b, - jint offset, - jint length) -{ - jbyte* data = static_cast(malloc(length)); - if (data == 0) { - throwNew(e, "java/lang/OutOfMemoryError", 0); - return 0; - } - - int r = doRead(e, fd, data, length); - - e->SetByteArrayRegion(b, offset, length, data); - - free(data); - - return r; -} - -extern "C" JNIEXPORT void JNICALL - Java_java_io_FileInputStream_close(JNIEnv* e, jclass, jint fd) -{ - doClose(e, fd); -} - -extern "C" JNIEXPORT jint JNICALL - Java_java_io_FileOutputStream_open(JNIEnv* e, - jclass, - jstring path, - jboolean append) -{ - string_t chars = getChars(e, path); - if (chars) { - int fd = doOpen(e, - chars, - append ? (O_WRONLY | O_CREAT | O_APPEND) - : (O_WRONLY | O_CREAT | O_TRUNC)); - releaseChars(e, path, chars); - return fd; - } else { - return -1; - } -} - -#endif // !SGX - -extern "C" JNIEXPORT void JNICALL - Java_java_io_FileOutputStream_write__II(JNIEnv* e, jclass, jint fd, jint c) -{ - jbyte data = c; - doWrite(e, fd, &data, 1); -} - -extern "C" JNIEXPORT void JNICALL - Java_java_io_FileOutputStream_write__I_3BII(JNIEnv* e, - jclass, - jint fd, - jbyteArray b, - jint offset, - jint length) -{ - jbyte* data = static_cast(malloc(length)); - - if (data == 0) { - throwNew(e, "java/lang/OutOfMemoryError", 0); - return; - } - - e->GetByteArrayRegion(b, offset, length, data); - if (not e->ExceptionCheck()) { - doWrite(e, fd, data, length); - } - - free(data); -} - -extern "C" JNIEXPORT void JNICALL - Java_java_io_FileOutputStream_close(JNIEnv* e, jclass, jint fd) -{ - doClose(e, fd); -} - -#ifndef SGX - -extern "C" JNIEXPORT void JNICALL - Java_java_io_RandomAccessFile_open(JNIEnv* e, - jclass, - jstring path, - jboolean allowWrite, - jlongArray result) -{ - string_t chars = getChars(e, path); - if (chars) { - jlong peer = 0; - jlong length = 0; - int flags = (allowWrite ? O_RDWR | O_CREAT : O_RDONLY) | OPEN_MASK; -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -#if defined(PLATFORM_WINDOWS) - int fd = ::_wopen(chars, flags); -#else - int fd = ::open((const char*)chars, flags, 0666); -#endif - releaseChars(e, path, chars); - if (fd == -1) { - throwNewErrno(e, "java/io/IOException"); - return; - } - struct ::stat fileStats; - if (::fstat(fd, &fileStats) == -1) { - ::close(fd); - throwNewErrno(e, "java/io/IOException"); - return; - } - peer = fd; - length = fileStats.st_size; -#else - HANDLE hFile = CreateFile2( - chars, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, nullptr); - if (hFile == INVALID_HANDLE_VALUE) { - throwNewErrno(e, "java/io/IOException"); - return; - } - - FILE_STANDARD_INFO info; - if (!GetFileInformationByHandleEx( - hFile, FileStandardInfo, &info, sizeof(info))) { - CloseHandle(hFile); - throwNewErrno(e, "java/io/IOException"); - return; - } - - peer = (jlong)hFile; - length = info.EndOfFile.QuadPart; -#endif - - e->SetLongArrayRegion(result, 0, 1, &peer); - e->SetLongArrayRegion(result, 1, 1, &length); - } -} - -extern "C" JNIEXPORT jint JNICALL - Java_java_io_RandomAccessFile_readBytes(JNIEnv* e, - jclass, - jlong peer, - jlong position, - jbyteArray buffer, - int offset, - int length) -{ -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - int fd = (int)peer; - if (::lseek(fd, position, SEEK_SET) == -1) { - throwNewErrno(e, "java/io/IOException"); - return -1; - } - - uint8_t* dst - = reinterpret_cast(e->GetPrimitiveArrayCritical(buffer, 0)); - - int64_t bytesRead = ::read(fd, dst + offset, length); - e->ReleasePrimitiveArrayCritical(buffer, dst, 0); - - if (bytesRead == -1) { - throwNewErrno(e, "java/io/IOException"); - return -1; - } -#else - HANDLE hFile = (HANDLE)peer; - LARGE_INTEGER lPos; - lPos.QuadPart = position; - if (!SetFilePointerEx(hFile, lPos, nullptr, FILE_BEGIN)) { - throwNewErrno(e, "java/io/IOException"); - return -1; - } - - uint8_t* dst - = reinterpret_cast(e->GetPrimitiveArrayCritical(buffer, 0)); - - DWORD bytesRead = 0; - if (!ReadFile(hFile, dst + offset, length, &bytesRead, nullptr)) { - e->ReleasePrimitiveArrayCritical(buffer, dst, 0); - throwNewErrno(e, "java/io/IOException"); - return -1; - } - e->ReleasePrimitiveArrayCritical(buffer, dst, 0); -#endif - - return (jint)bytesRead; -} - -extern "C" JNIEXPORT jint JNICALL - Java_java_io_RandomAccessFile_writeBytes(JNIEnv* e, - jclass, - jlong peer, - jlong position, - jbyteArray buffer, - int offset, - int length) -{ -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - int fd = (int)peer; - if (::lseek(fd, position, SEEK_SET) == -1) { - throwNewErrno(e, "java/io/IOException"); - return -1; - } - - uint8_t* dst - = reinterpret_cast(e->GetPrimitiveArrayCritical(buffer, 0)); - - int64_t bytesWritten = ::write(fd, dst + offset, length); - e->ReleasePrimitiveArrayCritical(buffer, dst, 0); - - if (bytesWritten == -1) { - throwNewErrno(e, "java/io/IOException"); - return -1; - } -#else - HANDLE hFile = (HANDLE)peer; - LARGE_INTEGER lPos; - lPos.QuadPart = position; - if (!SetFilePointerEx(hFile, lPos, nullptr, FILE_BEGIN)) { - throwNewErrno(e, "java/io/IOException"); - return -1; - } - - uint8_t* dst - = reinterpret_cast(e->GetPrimitiveArrayCritical(buffer, 0)); - - DWORD bytesWritten = 0; - if (!WriteFile(hFile, dst + offset, length, &bytesWritten, nullptr)) { - e->ReleasePrimitiveArrayCritical(buffer, dst, 0); - throwNewErrno(e, "java/io/IOException"); - return -1; - } - e->ReleasePrimitiveArrayCritical(buffer, dst, 0); -#endif - - return (jint)bytesWritten; -} - -extern "C" JNIEXPORT void JNICALL - Java_java_io_RandomAccessFile_close(JNIEnv* /* e*/, jclass, jlong peer) -{ -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - int fd = (int)peer; - ::close(fd); -#else - HANDLE hFile = (HANDLE)peer; - CloseHandle(hFile); -#endif -} - -#endif // !SGX \ No newline at end of file diff --git a/sgx-jvm/avian/classpath/java-lang.cpp b/sgx-jvm/avian/classpath/java-lang.cpp deleted file mode 100644 index 631b6b1742..0000000000 --- a/sgx-jvm/avian/classpath/java-lang.cpp +++ /dev/null @@ -1,1102 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "stdlib.h" -#include "time.h" -#include "string.h" -#include "stdio.h" -#include "jni.h" -#include "jni-util.h" -#include "errno.h" -#include "fcntl.h" -#include "ctype.h" - -// Make sure M_* constants (in particular M_E) are exposed in math.h. -// This was a problem on the default mingw install on ubuntu precise -#undef __STRICT_ANSI__ -#include "math.h" - -#ifdef PLATFORM_WINDOWS - -#include "windows.h" -#include "winbase.h" -#include "io.h" -#include "tchar.h" -#include "float.h" -#include "sys/types.h" -#include "sys/timeb.h" -#define SO_PREFIX "" -#define SO_SUFFIX ".dll" - -#ifdef _MSC_VER -#define snprintf sprintf_s -#define isnan _isnan -#define isfinite _finite -#define strtof strtod -#endif - -#else // not PLATFORM_WINDOWS - -#define SO_PREFIX "lib" -#ifdef __APPLE__ -#define SO_SUFFIX ".dylib" -#include -#if !TARGET_IPHONE_SIMULATOR && !TARGET_OS_IPHONE -#include -#endif -#else -#define SO_SUFFIX ".so" -#endif -#include "unistd.h" -#include "limits.h" -#include "signal.h" -#include "sys/time.h" -#include "sys/types.h" -#ifndef __ANDROID__ -#include "sys/sysctl.h" -#endif -#include "sys/utsname.h" -#include "sys/wait.h" - -#endif // not PLATFORM_WINDOWS - -#ifndef WINAPI_FAMILY -#ifndef WINAPI_PARTITION_DESKTOP -#define WINAPI_PARTITION_DESKTOP 1 -#endif - -#ifndef WINAPI_FAMILY_PARTITION -#define WINAPI_FAMILY_PARTITION(x) (x) -#endif -#else -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - -#include "avian-interop.h" - -#endif -#endif // WINAPI_FAMILY - -#ifndef M_E -// in new C++-11 standard math.h doesn't have M_E, at least on MinGW, so define it manually -#define M_E 2.7182818284590452354 -#endif // M_E - -namespace { - -void add(JNIEnv* e, jobjectArray array, unsigned index, const char* format, ...) -{ - int size = 256; - while (true) { - va_list a; - va_start(a, format); - RUNTIME_ARRAY(char, buffer, size); - int r = vsnprintf(RUNTIME_ARRAY_BODY(buffer), size - 1, format, a); - va_end(a); - if (r >= 0 and r < size - 1) { - e->SetObjectArrayElement( - array, index++, e->NewStringUTF(RUNTIME_ARRAY_BODY(buffer))); - return; - } - - size *= 2; - } -} - -#ifdef PLATFORM_WINDOWS - -void add(JNIEnv* e, - jobjectArray array, - unsigned index, - const WCHAR* format, - ...) -{ - int size = 256; - while (true) { - va_list a; - va_start(a, format); - RUNTIME_ARRAY(WCHAR, buffer, size); - int r = _vsnwprintf(RUNTIME_ARRAY_BODY(buffer), size - 1, format, a); - va_end(a); - if (r >= 0 and r < size - 1) { - e->SetObjectArrayElement( - array, - index++, - e->NewString(reinterpret_cast(RUNTIME_ARRAY_BODY(buffer)), - r)); - return; - } - - size *= 2; - } -} - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -char* getErrorStr(DWORD err) -{ - LPSTR errorStr = 0; - if (!FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, - 0, - err, - LANG_SYSTEM_DEFAULT, - (LPSTR)&errorStr, - 0, - 0)) { - char* errStr = (char*)malloc(9 * sizeof(char)); - snprintf(errStr, 9, "%d", (int)err); - return errStr; - } - char* errStr = strdup(errorStr); - LocalFree(errorStr); - return errStr; -} -#else -char* getErrorStr(DWORD err) -{ - LPSTR errorStr = (LPSTR)malloc(4096); // NOTE: something constant - if (!FormatMessageA( - FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, - 0, - err, - LANG_SYSTEM_DEFAULT, - errorStr, - 0, - 0)) { - free(errorStr); - - char* errStr = (char*)malloc(9 * sizeof(char)); - snprintf(errStr, 9, "%d", (int)err); - return errStr; - } - char* errStr = strdup(errorStr); - free(errorStr); - return errStr; -} -#endif - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -void makePipe(JNIEnv* e, HANDLE p[2]) -{ - SECURITY_ATTRIBUTES sa; - sa.nLength = sizeof(sa); - sa.bInheritHandle = 1; - sa.lpSecurityDescriptor = 0; - - BOOL success = CreatePipe(p, p + 1, &sa, 0); - if (not success) { - throwNew(e, "java/io/IOException", getErrorStr(GetLastError())); - } -} -#endif - -int descriptor(JNIEnv* e, HANDLE h) -{ - int fd = _open_osfhandle(reinterpret_cast(h), 0); - if (fd == -1) { - throwNewErrno(e, "java/io/IOException"); - } - return fd; -} -#else -void makePipe(JNIEnv* e, int p[2]) -{ - if (pipe(p) != 0) { - throwNewErrno(e, "java/io/IOException"); - } -} - -void safeClose(int& fd) -{ - if (fd != -1) - close(fd); - fd = -1; -} - -void close(int p[2]) -{ - ::close(p[0]); - ::close(p[1]); -} - -void clean(JNIEnv* e, jobjectArray command, char** p) -{ - int i = 0; - for (char** x = p; *x; ++x, ++i) { - jstring element = (jstring)e->GetObjectArrayElement(command, i); - e->ReleaseStringUTFChars(element, *x); - } - free(p); -} -#endif -} - -class Locale { // represents an ISO two-char language/country pair - static const unsigned FIELDLEN = 2; - static const unsigned FIELDSIZE = FIELDLEN + 1; - - static const char* DEFAULT_LANGUAGE; - static const char* DEFAULT_REGION; - - char language[FIELDSIZE]; - char region[FIELDSIZE]; - - bool isLanguage(const char* language) - { - if (!language) - return false; - unsigned len = strlen(language); - if (len != FIELDLEN) - return false; - const char* p = language - 1; - while (islower(*++p)) - ; - if (*p != '\0') - return false; - return true; - } - - bool isRegion(const char* region) - { - if (!region) - return false; - unsigned len = strlen(region); - if (len != FIELDLEN) - return false; - const char* p = region - 1; - while (isupper(*++p)) - ; - if (*p != '\0') - return false; - return true; - } - - public: - Locale(const char* language = "") - { - Locale l(language, ""); - *this = l; - } - - Locale(const char* language, const char* region) - { - language = isLanguage(language) ? language : DEFAULT_LANGUAGE; - region = isRegion(region) ? region : DEFAULT_REGION; - memcpy(this->language, language, FIELDSIZE); - memcpy(this->region, region, FIELDSIZE); - } - - Locale& operator=(const Locale& l) - { - memcpy(language, l.language, FIELDSIZE); - memcpy(region, l.region, FIELDSIZE); - return *this; - } - - const char* getLanguage() - { - return reinterpret_cast(language); - } - const char* getRegion() - { - return reinterpret_cast(region); - } -}; -const char* Locale::DEFAULT_LANGUAGE = "en"; -const char* Locale::DEFAULT_REGION = ""; - -#ifdef PLATFORM_WINDOWS - -void appendN(char** dest, char ch, size_t length) -{ - for (size_t i = 0; i < length; i++) { - *((*dest)++) = ch; - } -} - -bool needsEscape(const char* src, size_t length) -{ - const char* end = src + length; - for (const char* ptr = src; ptr < end; ptr++) { - switch (*ptr) { - case ' ': - case '\t': - case '\n': - case '\v': - case '"': - return true; - } - } - - return false; -} - -void copyAndEscape(char** dest, const char* src, size_t length) -{ - char* destp = *dest; - const char* end = src + length; - - if (length != 0 && !needsEscape(src, length)) { - for (const char* ptr = src; ptr < end; ptr++) { - *(destp++) = *ptr; - } - } else { - *(destp++) = '"'; - - for (const char* ptr = src;; ptr++) { - unsigned numBackslashes = 0; - - while (ptr < end && *ptr == '\\') { - ptr++; - numBackslashes++; - } - - if (ptr == end) { - appendN(&destp, '\\', 2 * numBackslashes); - break; - } else if (*ptr == '"') { - appendN(&destp, '\\', 2 * numBackslashes + 1); - *(destp++) = *ptr; - } else { - appendN(&destp, '\\', numBackslashes); - *(destp++) = *ptr; - } - } - - *(destp++) = '"'; - } - - *dest = destp; -} - -extern "C" JNIEXPORT jint JNICALL - Java_java_lang_Runtime_waitFor(JNIEnv* e, jclass, jlong pid, jlong tid) -{ -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - DWORD exitCode; - WaitForSingleObject(reinterpret_cast(pid), INFINITE); - BOOL success = GetExitCodeProcess(reinterpret_cast(pid), &exitCode); - if (not success) { - throwNew(e, "java/lang/Exception", getErrorStr(GetLastError())); - } - - CloseHandle(reinterpret_cast(pid)); - CloseHandle(reinterpret_cast(tid)); - - return exitCode; -#else - throwNew(e, "java/io/Exception", strdup("Not supported on WinRT/WinPhone8")); - return -1; -#endif -} - -extern "C" JNIEXPORT void JNICALL - Java_java_lang_Runtime_kill(JNIEnv* e UNUSED, jclass, jlong pid) -{ -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - TerminateProcess(reinterpret_cast(pid), 1); -#else - throwNew(e, "java/io/Exception", strdup("Not supported on WinRT/WinPhone8")); -#endif -} - -Locale getLocale() -{ -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - const char* lang = ""; - const char* reg = ""; - unsigned langid = GetUserDefaultUILanguage(); - unsigned prilang = langid & 0x3ff; - unsigned sublang = langid >> 10; - - switch (prilang) { - case 0x004: { - lang = "zh"; - switch (sublang) { - case 0x01: - reg = "CN"; - break; - case 0x02: - reg = "TW"; - break; - case 0x03: - reg = "HK"; - break; - case 0x04: - reg = "SG"; - break; - } - } break; - case 0x006: - lang = "da"; - reg = "DK"; - break; - case 0x007: - lang = "de"; - reg = "DE"; - break; - case 0x009: { - lang = "en"; - switch (sublang) { - case 0x01: - reg = "US"; - break; - case 0x02: - reg = "GB"; - break; - case 0x03: - reg = "AU"; - break; - case 0x04: - reg = "CA"; - break; - case 0x05: - reg = "NZ"; - break; - case 0x06: - reg = "IE"; - break; - case 0x07: - reg = "ZA"; - break; - case 0x10: - reg = "IN"; - break; - } - } break; - case 0x00a: { - lang = "es"; - switch (sublang) { - case 0x01: - case 0x03: - reg = "ES"; - break; - case 0x02: - reg = "MX"; - break; - } - } break; - case 0x00c: { - lang = "fr"; - switch (sublang) { - case 0x01: - reg = "FR"; - break; - case 0x02: - reg = "BE"; - break; - case 0x03: - reg = "CA"; - break; - } - } break; - case 0x010: - lang = "it"; - reg = "IT"; - break; - case 0x011: - lang = "ja"; - reg = "JP"; - break; - case 0x012: - lang = "ko"; - reg = "KR"; - break; - case 0x013: { - lang = "nl"; - switch (sublang) { - case 0x01: - reg = "NL"; - break; - case 0x02: - reg = "BE"; - break; - } - } break; - case 0x014: - lang = "no"; - reg = "NO"; - break; - case 0x015: - lang = "pl"; - reg = "PL"; - break; - case 0x016: { - lang = "pt"; - switch (sublang) { - case 0x01: - reg = "BR"; - break; - case 0x02: - reg = "PT"; - break; - } - } break; - case 0x018: - lang = "ro"; - reg = "RO"; - break; - case 0x019: - lang = "ru"; - reg = "RU"; - break; - case 0x01d: - lang = "sv"; - reg = "SE"; - break; - default: - lang = "en"; - } - - return Locale(lang, reg); -#else - std::wstring culture = AvianInterop::GetCurrentUICulture(); - char* cultureName - = strdup(std::string(culture.begin(), culture.end()).c_str()); - char* delimiter = strchr(cultureName, '-'); - if (!delimiter) { - free(cultureName); - return Locale("en", "US"); - } - const char* lang = cultureName; - const char* reg = delimiter + 1; - *delimiter = 0; - Locale locale(lang, reg); - free(cultureName); - return locale; -#endif -} -#else -extern "C" JNIEXPORT void JNICALL - Java_java_lang_Runtime_exec(JNIEnv* e, - jclass, - jobjectArray command, - jlongArray process) -{ - char** argv = static_cast( - malloc((e->GetArrayLength(command) + 1) * sizeof(char*))); - int i; - for (i = 0; i < e->GetArrayLength(command); i++) { - jstring element = (jstring)e->GetObjectArrayElement(command, i); - char* s = const_cast(e->GetStringUTFChars(element, 0)); - argv[i] = s; - } - argv[i] = 0; - - int in[] = {-1, -1}; - int out[] = {-1, -1}; - int err[] = {-1, -1}; - int msg[] = {-1, -1}; - - makePipe(e, in); - if (e->ExceptionCheck()) - return; - jlong inDescriptor = static_cast(in[0]); - e->SetLongArrayRegion(process, 2, 1, &inDescriptor); - makePipe(e, out); - if (e->ExceptionCheck()) - return; - jlong outDescriptor = static_cast(out[1]); - e->SetLongArrayRegion(process, 3, 1, &outDescriptor); - makePipe(e, err); - if (e->ExceptionCheck()) - return; - jlong errDescriptor = static_cast(err[0]); - e->SetLongArrayRegion(process, 4, 1, &errDescriptor); - makePipe(e, msg); - if (e->ExceptionCheck()) - return; - if (fcntl(msg[1], F_SETFD, FD_CLOEXEC) != 0) { - throwNewErrno(e, "java/io/IOException"); - return; - } - -#ifdef __QNX__ - // fork(2) doesn't work in multithreaded QNX programs. See - // http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html - pid_t pid = vfork(); -#else - // We might be able to just use vfork on all UNIX-style systems, but - // the manual makes it sound dangerous due to the shared - // parent/child address space, so we use fork if we can. - pid_t pid = fork(); -#endif - switch (pid) { - case -1: // error - throwNewErrno(e, "java/io/IOException"); - return; - case 0: { // child - // Setup stdin, stdout and stderr - dup2(in[1], 1); - close(in); - dup2(out[0], 0); - close(out); - dup2(err[1], 2); - close(err); - close(msg[0]); - - execvp(argv[0], argv); - - // Error if here - int val = errno; - ssize_t rv UNUSED = write(msg[1], &val, sizeof(val)); - exit(127); - } break; - - default: { // parent - jlong JNIPid = static_cast(pid); - e->SetLongArrayRegion(process, 0, 1, &JNIPid); - - safeClose(in[1]); - safeClose(out[0]); - safeClose(err[1]); - safeClose(msg[1]); - - int val; - int r = read(msg[0], &val, sizeof(val)); - if (r == -1) { - throwNewErrno(e, "java/io/IOException"); - return; - } else if (r) { - errno = val; - throwNewErrno(e, "java/io/IOException"); - return; - } - } break; - } - - safeClose(msg[0]); - clean(e, command, argv); - - fcntl(in[0], F_SETFD, FD_CLOEXEC); - fcntl(out[1], F_SETFD, FD_CLOEXEC); - fcntl(err[0], F_SETFD, FD_CLOEXEC); -} - -extern "C" JNIEXPORT jint JNICALL - Java_java_lang_Runtime_waitFor(JNIEnv*, jclass, jlong pid, jlong) -{ - bool finished = false; - int status; - int exitCode; - while (!finished) { - waitpid(pid, &status, 0); - if (WIFEXITED(status)) { - finished = true; - exitCode = WEXITSTATUS(status); - } else if (WIFSIGNALED(status)) { - finished = true; - exitCode = -1; - } - } - - return exitCode; -} - -extern "C" JNIEXPORT void JNICALL - Java_java_lang_Runtime_kill(JNIEnv*, jclass, jlong pid) -{ - kill((pid_t)pid, SIGTERM); -} - -Locale getLocale() -{ - Locale fallback; - - const char* LANG = getenv("LANG"); - if (!LANG || strcmp(LANG, "C") == 0) - return fallback; - - int len = strlen(LANG); - char buf[len + 1]; // + 1 for the '\0' char - memcpy(buf, LANG, len + 1); - - char* tracer = buf; - const char* reg; - - while (*tracer && *tracer != '_') - ++tracer; - if (!*tracer) - return fallback; - *tracer = '\0'; - reg = ++tracer; - - while (*tracer && *tracer != '.') - ++tracer; - if (tracer == reg) - return fallback; - *tracer = '\0'; - - Locale locale(buf, reg); - return locale; -} -#endif - -extern "C" JNIEXPORT jobjectArray JNICALL - Java_java_lang_System_getNativeProperties(JNIEnv* e, jclass) -{ - jobjectArray array - = e->NewObjectArray(32, e->FindClass("java/lang/String"), 0); - - unsigned index = 0; - -#ifdef ARCH_x86_32 - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.arch=x86")); - -#elif defined ARCH_x86_64 - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.arch=x86_64")); - -#elif defined ARCH_arm - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.arch=arm")); - -#elif defined ARCH_arm64 - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.arch=arm64")); - -#else -#error "unknown architecture" - -#endif - -#ifdef PLATFORM_WINDOWS - e->SetObjectArrayElement( - array, index++, e->NewStringUTF("line.separator=\r\n")); - - e->SetObjectArrayElement( - array, index++, e->NewStringUTF("file.separator=\\")); - - e->SetObjectArrayElement(array, index++, e->NewStringUTF("path.separator=;")); - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.name=Windows")); - -#elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE) - e->SetObjectArrayElement( - array, index++, e->NewStringUTF("os.name=Windows Phone")); - -#else - e->SetObjectArrayElement( - array, index++, e->NewStringUTF("os.name=Windows RT")); - -#endif - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - { - OSVERSIONINFO OSversion; - OSversion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - ::GetVersionEx(&OSversion); - - add(e, - array, - index++, - "os.version=%i.%i", - static_cast(OSversion.dwMajorVersion), - static_cast(OSversion.dwMinorVersion)); - } - -#else - // Currently there is no alternative on WinRT/WP8 - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.version=8.0")); - -#endif - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - { - WCHAR buffer[MAX_PATH]; - GetTempPathW(MAX_PATH, buffer); - add(e, array, index++, L"java.io.tmpdir=%ls", buffer); - } - -#else - add(e, - array, - index++, - L"java.io.tmpdir=%ls", - AvianInterop::GetTemporaryFolder().c_str()); - -#endif - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - { - WCHAR buffer[MAX_PATH]; - GetCurrentDirectoryW(MAX_PATH, buffer); - add(e, array, index++, L"user.dir=%ls", buffer); - } - -#else - add(e, - array, - index++, - L"user.dir=%ls", - AvianInterop::GetInstalledLocation().c_str()); - -#endif - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -#ifdef _MSC_VER - { - WCHAR buffer[MAX_PATH]; - size_t needed; - if (_wgetenv_s(&needed, buffer, MAX_PATH, L"USERPROFILE") == 0) { - add(e, array, index++, L"user.home=%ls", buffer); - } - } - -#else - add(e, array, index++, L"user.home=%ls", _wgetenv(L"USERPROFILE")); - -#endif -#else - add(e, - array, - index++, - L"user.home=%ls", - AvianInterop::GetDocumentsLibraryLocation().c_str()); - -#endif - -#else // not Windows - e->SetObjectArrayElement( - array, index++, e->NewStringUTF("line.separator=\n")); - - e->SetObjectArrayElement(array, index++, e->NewStringUTF("file.separator=/")); - - e->SetObjectArrayElement(array, index++, e->NewStringUTF("path.separator=:")); - -#ifdef __APPLE__ - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.name=Mac OS X")); - -#elif defined __FreeBSD__ - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.name=FreeBSD")); - -#else - e->SetObjectArrayElement(array, index++, e->NewStringUTF("os.name=Linux")); - -#endif - { - struct utsname system_id; - uname(&system_id); - add(e, array, index++, "os.version=%s", system_id.release); - } - - e->SetObjectArrayElement( - array, index++, e->NewStringUTF("java.io.tmpdir=/tmp")); - - { - char buffer[PATH_MAX]; - add(e, array, index++, "user.dir=%s", getcwd(buffer, PATH_MAX)); - } - - add(e, array, index++, "user.home=%s", getenv("HOME")); - -#endif // not Windows - - { - Locale locale = getLocale(); - add(e, array, index++, "user.language=%s", locale.getLanguage()); - add(e, array, index++, "user.region=%s", locale.getRegion()); - } - - return array; -} - -extern "C" JNIEXPORT jstring JNICALL - Java_java_lang_System_doMapLibraryName(JNIEnv* e, jclass, jstring name) -{ - jstring r = 0; - const char* chars = e->GetStringUTFChars(name, 0); - if (chars) { - unsigned nameLength = strlen(chars); - unsigned size = sizeof(SO_PREFIX) + nameLength + sizeof(SO_SUFFIX); - RUNTIME_ARRAY(char, buffer, size); - snprintf(RUNTIME_ARRAY_BODY(buffer), size, SO_PREFIX "%s" SO_SUFFIX, chars); - r = e->NewStringUTF(RUNTIME_ARRAY_BODY(buffer)); - - e->ReleaseStringUTFChars(name, chars); - } - return r; -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_lang_Double_isInfinite(JNIEnv*, jclass, jdouble val) -{ - return !isfinite(val); -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_lang_Double_isNaN(JNIEnv*, jclass, jdouble val) -{ - return isnan(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Double_doubleFromString(JNIEnv* e, - jclass, - jstring s, - jintArray numDoublesRead) -{ - const char* chars = e->GetStringUTFChars(s, 0); - double d = 0.0; - jint numRead = 0; - - if (chars) { - char* lastRead; - d = strtod(chars, &lastRead); - if ((lastRead != chars) && ((chars + strlen(chars)) == lastRead)) { - numRead = 1; - } - e->ReleaseStringUTFChars(s, chars); - } - e->SetIntArrayRegion(numDoublesRead, 0, 1, &numRead); - return d; -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_lang_Float_isInfinite(JNIEnv*, jclass, jfloat val) -{ - return !isfinite(val); -} - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_lang_Float_isNaN(JNIEnv*, jclass, jfloat val) -{ - return isnan(val); -} - -extern "C" JNIEXPORT jfloat JNICALL - Java_java_lang_Float_floatFromString(JNIEnv* e, - jclass, - jstring s, - jintArray numFloatsRead) -{ - const char* chars = e->GetStringUTFChars(s, 0); - float f = 0.0; - jint numRead = 0; - - if (chars) { - char* lastRead; - f = strtof(chars, &lastRead); - if ((lastRead != chars) && ((chars + strlen(chars)) == lastRead)) { - numRead = 1; - } - e->ReleaseStringUTFChars(s, chars); - } - e->SetIntArrayRegion(numFloatsRead, 0, 1, &numRead); - return f; -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_sin(JNIEnv*, jclass, jdouble val) -{ - return sin(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_cos(JNIEnv*, jclass, jdouble val) -{ - return cos(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_tan(JNIEnv*, jclass, jdouble val) -{ - return tan(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_asin(JNIEnv*, jclass, jdouble val) -{ - return asin(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_acos(JNIEnv*, jclass, jdouble val) -{ - return acos(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_atan(JNIEnv*, jclass, jdouble val) -{ - return atan(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_atan2(JNIEnv*, jclass, jdouble y, jdouble x) -{ - return atan2(y, x); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_sinh(JNIEnv*, jclass, jdouble val) -{ - return sinh(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_cosh(JNIEnv*, jclass, jdouble val) -{ - return cosh(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_tanh(JNIEnv*, jclass, jdouble val) -{ - return tanh(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_sqrt(JNIEnv*, jclass, jdouble val) -{ - return sqrt(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_pow(JNIEnv*, jclass, jdouble val, jdouble exp) -{ - return pow(val, exp); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_log(JNIEnv*, jclass, jdouble val) -{ - return log(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_floor(JNIEnv*, jclass, jdouble val) -{ - return floor(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_ceil(JNIEnv*, jclass, jdouble val) -{ - return ceil(val); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_java_lang_Math_exp(JNIEnv*, jclass, jdouble exp) -{ - return pow(M_E, exp); -} - -extern "C" JNIEXPORT jint JNICALL - Java_java_lang_Double_fillBufferWithDouble(JNIEnv* e, - jclass, - jdouble val, - jbyteArray buffer, - jint bufferSize) -{ - jboolean isCopy; - jbyte* buf = e->GetByteArrayElements(buffer, &isCopy); - jint count = snprintf(reinterpret_cast(buf), bufferSize, "%g", val); - e->ReleaseByteArrayElements(buffer, buf, 0); - return count; -} diff --git a/sgx-jvm/avian/classpath/java-nio.cpp b/sgx-jvm/avian/classpath/java-nio.cpp deleted file mode 100644 index a384ea2315..0000000000 --- a/sgx-jvm/avian/classpath/java-nio.cpp +++ /dev/null @@ -1,236 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef SGX - -#include -#include -#include -#include - -#include "jni.h" -#include "jni-util.h" - -#ifdef PLATFORM_WINDOWS -#include -#include -#include -#ifdef _MSC_VER -#define snprintf sprintf_s -#else -#include -#endif -#else -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#endif - -#define java_nio_channels_SelectionKey_OP_READ 1L -#define java_nio_channels_SelectionKey_OP_WRITE 4L -#define java_nio_channels_SelectionKey_OP_CONNECT 8L -#define java_nio_channels_SelectionKey_OP_ACCEPT 16L - -#ifdef PLATFORM_WINDOWS -typedef int socklen_t; -#endif - -inline void* operator new(size_t, void* p) throw() -{ - return p; -} - -namespace { - -inline jbyteArray charsToArray(JNIEnv* e, const char* s) -{ - unsigned length = strlen(s); - jbyteArray a = e->NewByteArray(length + 1); - e->SetByteArrayRegion(a, 0, length + 1, reinterpret_cast(s)); - return a; -} - -inline void doClose(int socket) -{ -#ifdef PLATFORM_WINDOWS - closesocket(socket); -#else - close(socket); -#endif -} - -inline jbyteArray errorString(JNIEnv* e, int n) -{ -#ifdef _MSC_VER - const unsigned size = 128; - char buffer[size]; - strerror_s(buffer, size, n); - return charsToArray(e, buffer); -#else - return charsToArray(e, strerror(n)); -#endif -} - -inline jbyteArray errorString(JNIEnv* e) -{ -#ifdef PLATFORM_WINDOWS - const unsigned size = 64; - char buffer[size]; - snprintf(buffer, size, "wsa code: %d", WSAGetLastError()); - return charsToArray(e, buffer); -#else - return errorString(e, errno); -#endif -} - -void throwIOException(JNIEnv* e, const char* s) -{ - throwNew(e, "java/io/IOException", s); -} - -void throwIOException(JNIEnv* e, jbyteArray a) -{ - size_t length = e->GetArrayLength(a); - uint8_t* buf = static_cast(allocate(e, length)); - if (buf) { - e->GetByteArrayRegion(a, 0, length, reinterpret_cast(buf)); - throwIOException(e, reinterpret_cast(buf)); - free(buf); - } else { - return; - } -} - -void throwIOException(JNIEnv* e) -{ - throwIOException(e, errorString(e)); -} - -inline bool einProgress(int error) -{ -#ifdef PLATFORM_WINDOWS - return error == WSAEINPROGRESS or error == WSAEWOULDBLOCK; -#else - return error == EINPROGRESS; -#endif -} - -bool setBlocking(JNIEnv* e, int d, bool blocking) -{ -#ifdef PLATFORM_WINDOWS - u_long a = (blocking ? 0 : 1); - int r = ioctlsocket(d, FIONBIO, &a); - if (r != 0) { - throwIOException(e); - return false; - } -#else - int r = fcntl(d, - F_SETFL, - (blocking ? (fcntl(d, F_GETFL) & (~O_NONBLOCK)) - : (fcntl(d, F_GETFL) | O_NONBLOCK))); - if (r < 0) { - throwIOException(e); - return false; - } -#endif - return true; -} - -inline bool einProgress() -{ -#ifdef PLATFORM_WINDOWS - return WSAGetLastError() == WSAEINPROGRESS - or WSAGetLastError() == WSAEWOULDBLOCK; -#else - return errno == EINPROGRESS; -#endif -} - -inline bool eagain() -{ -#ifdef PLATFORM_WINDOWS - return WSAGetLastError() == WSAEINPROGRESS - or WSAGetLastError() == WSAEWOULDBLOCK; -#else - return errno == EAGAIN; -#endif -} - -} // namespace - -namespace { - -class Pipe { - public: - Pipe(JNIEnv* e) - { - if (::pipe(pipe) != 0) { - throwIOException(e); - return; - } - - if (setBlocking(e, pipe[0], false)) { - setBlocking(e, pipe[1], false); - } - - open_ = true; - } - - void dispose() - { - ::doClose(pipe[0]); - ::doClose(pipe[1]); - open_ = false; - } - - bool connected() - { - return open_; - } - - int reader() - { - return pipe[0]; - } - - int writer() - { - return pipe[1]; - } - - private: - int pipe[2]; - bool open_; -}; - -} // namespace - -extern "C" JNIEXPORT jboolean JNICALL - Java_java_nio_ByteOrder_isNativeBigEndian(JNIEnv*, jclass) -{ - union { - uint32_t i; - char c[4]; - } u = {0x01020304}; - - if (u.c[0] == 1) - return JNI_TRUE; - return JNI_FALSE; -} - -#endif // !SGX diff --git a/sgx-jvm/avian/classpath/java-util-zip.cpp b/sgx-jvm/avian/classpath/java-util-zip.cpp deleted file mode 100644 index 0839d181e0..0000000000 --- a/sgx-jvm/avian/classpath/java-util-zip.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "stdlib.h" -#include "string.h" -#include "avian/zlib-custom.h" - -#include "jni.h" -#include "jni-util.h" - -extern "C" JNIEXPORT jlong JNICALL - Java_java_util_zip_Inflater_make(JNIEnv* e, jclass, jboolean nowrap) -{ - z_stream* s = static_cast(malloc(sizeof(z_stream))); - if (s == 0) { - throwNew(e, "java/lang/OutOfMemoryError", 0); - return 0; - } - - memset(s, 0, sizeof(z_stream)); - - int r = inflateInit2(s, (nowrap ? -15 : 15)); - if (r != Z_OK) { - free(s); - throwNew(e, "java/lang/RuntimeException", zError(r)); - return 0; - } - - return reinterpret_cast(s); -} - -extern "C" JNIEXPORT void JNICALL - Java_java_util_zip_Inflater_dispose(JNIEnv*, jclass, jlong peer) -{ - z_stream* s = reinterpret_cast(peer); - inflateEnd(s); - free(s); -} - -extern "C" JNIEXPORT void JNICALL - Java_java_util_zip_Inflater_inflate(JNIEnv* e, - jclass, - jlong peer, - jbyteArray input, - jint inputOffset, - jint inputLength, - jbyteArray output, - jint outputOffset, - jint outputLength, - jintArray results) -{ - z_stream* s = reinterpret_cast(peer); - - jbyte* in = static_cast(malloc(inputLength)); - if (in == 0) { - throwNew(e, "java/lang/OutOfMemoryError", 0); - return; - } - - jbyte* out = static_cast(malloc(outputLength)); - if (out == 0) { - free(in); - throwNew(e, "java/lang/OutOfMemoryError", 0); - return; - } - - e->GetByteArrayRegion(input, inputOffset, inputLength, in); - - s->next_in = reinterpret_cast(in); - s->avail_in = inputLength; - s->next_out = reinterpret_cast(out); - s->avail_out = outputLength; - - int r = inflate(s, Z_SYNC_FLUSH); - jint resultArray[3] = {r, - static_cast(inputLength - s->avail_in), - static_cast(outputLength - s->avail_out)}; - - free(in); - - e->SetByteArrayRegion(output, outputOffset, resultArray[2], out); - free(out); - - e->SetIntArrayRegion(results, 0, 3, resultArray); -} - -extern "C" JNIEXPORT jlong JNICALL - Java_java_util_zip_Deflater_make(JNIEnv* e, - jclass, - jboolean nowrap, - jint level) -{ - z_stream* s = static_cast(malloc(sizeof(z_stream))); - if (s == 0) { - throwNew(e, "java/lang/OutOfMemoryError", 0); - return 0; - } - - memset(s, 0, sizeof(z_stream)); - - int r = deflateInit2(s, level, (nowrap ? -15 : 15)); - if (r != Z_OK) { - free(s); - throwNew(e, "java/lang/RuntimeException", zError(r)); - return 0; - } - - return reinterpret_cast(s); -} - -extern "C" JNIEXPORT void JNICALL - Java_java_util_zip_Deflater_dispose(JNIEnv*, jclass, jlong peer) -{ - z_stream* s = reinterpret_cast(peer); - deflateEnd(s); - free(s); -} - -extern "C" JNIEXPORT void JNICALL - Java_java_util_zip_Deflater_deflate(JNIEnv* e, - jclass, - jlong peer, - jbyteArray input, - jint inputOffset, - jint inputLength, - jbyteArray output, - jint outputOffset, - jint outputLength, - jboolean finish, - jintArray results) -{ - z_stream* s = reinterpret_cast(peer); - - jbyte* in = static_cast(malloc(inputLength)); - if (in == 0) { - throwNew(e, "java/lang/OutOfMemoryError", 0); - return; - } - - jbyte* out = static_cast(malloc(outputLength)); - if (out == 0) { - free(in); - throwNew(e, "java/lang/OutOfMemoryError", 0); - return; - } - - e->GetByteArrayRegion(input, inputOffset, inputLength, in); - - s->next_in = reinterpret_cast(in); - s->avail_in = inputLength; - s->next_out = reinterpret_cast(out); - s->avail_out = outputLength; - - int r = deflate(s, finish ? Z_FINISH : Z_NO_FLUSH); - jint resultArray[3] = {r, - static_cast(inputLength - s->avail_in), - static_cast(outputLength - s->avail_out)}; - - free(in); - - e->SetByteArrayRegion(output, outputOffset, resultArray[2], out); - free(out); - - e->SetIntArrayRegion(results, 0, 3, resultArray); -} diff --git a/sgx-jvm/avian/classpath/java-util.cpp b/sgx-jvm/avian/classpath/java-util.cpp deleted file mode 100644 index bb36df86f8..0000000000 --- a/sgx-jvm/avian/classpath/java-util.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "time.h" -#include "jni.h" -#include "jni-util.h" - -namespace { - -#if (!defined PLATFORM_WINDOWS) || (defined _MSC_VER) - -void removeNewline(char* s) -{ - for (; s; ++s) { - if (*s == '\n') { - *s = 0; - break; - } - } -} - -#endif - -} // namespace - -extern "C" JNIEXPORT jstring JNICALL - Java_java_util_Date_toString(JNIEnv* e, jclass c UNUSED, jlong when) -{ - const unsigned BufferSize UNUSED = 27; - - time_t time = when / 1000; - -#ifdef PLATFORM_WINDOWS - e->MonitorEnter(c); -#ifdef _MSC_VER - char buffer[BufferSize]; - ctime_s(buffer, BufferSize, &time); - removeNewline(buffer); -#else - char* buffer = ctime(&time); -#endif - jstring r = e->NewStringUTF(buffer); - e->MonitorExit(c); - return r; -#else - char buffer[BufferSize]; - ctime_r(&time, buffer); - removeNewline(buffer); - return e->NewStringUTF(buffer); -#endif -} diff --git a/sgx-jvm/avian/classpath/java/io/BufferedInputStream.java b/sgx-jvm/avian/classpath/java/io/BufferedInputStream.java deleted file mode 100644 index 25a7441304..0000000000 --- a/sgx-jvm/avian/classpath/java/io/BufferedInputStream.java +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ -package java.io; - -import java.io.IOException; -import java.io.InputStream; - -public class BufferedInputStream extends InputStream { - private final InputStream in; - private final byte[] buffer; - private int position; - private int limit; - - public BufferedInputStream(InputStream in, int size) { - this.in = in; - this.buffer = new byte[size]; - } - - public BufferedInputStream(InputStream in) { - this(in, 4096); - } - - private int fill() throws IOException { - position = 0; - limit = in.read(buffer); - - return limit; - } - - public int read() throws IOException { - if (position >= limit && fill() == -1) { - return -1; - } - - return buffer[position++] & 0xFF; - } - - public int read(byte[] b, int offset, int length) throws IOException { - int count = 0; - if (position >= limit && fill() == -1) { - return -1; - } - if (position < limit) { - int remaining = limit - position; - if (remaining > length) { - remaining = length; - } - - System.arraycopy(buffer, position, b, offset, remaining); - - count += remaining; - position += remaining; - offset += remaining; - length -= remaining; - } - while (length > 0 && in.available() > 0) - { - int c = in.read(b, offset, length); - if (c == -1) { - if (count == 0) { - count = -1; - } - break; - } else { - offset += c; - count += c; - length -= c; - } - } - return count; - } - - public int available() throws IOException { - return in.available() + (limit - position); - } - - public void close() throws IOException { - in.close(); - } -} - diff --git a/sgx-jvm/avian/classpath/java/io/BufferedOutputStream.java b/sgx-jvm/avian/classpath/java/io/BufferedOutputStream.java deleted file mode 100644 index 165ebc2cca..0000000000 --- a/sgx-jvm/avian/classpath/java/io/BufferedOutputStream.java +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class BufferedOutputStream extends OutputStream { - private final OutputStream out; - private final byte[] buffer; - private int position; - - public BufferedOutputStream(OutputStream out, int size) { - this.out = out; - this.buffer = new byte[size]; - } - - public BufferedOutputStream(OutputStream out) { - this(out, 4096); - } - - private void drain() throws IOException { - if (position > 0) { - out.write(buffer, 0, position); - position = 0; - } - } - - public void write(int c) throws IOException { - if (position >= buffer.length) { - drain(); - } - - buffer[position++] = (byte) (c & 0xFF); - } - - public void write(byte[] b, int offset, int length) throws IOException { - if (length > buffer.length - position) { - drain(); - out.write(b, offset, length); - } else { - System.arraycopy(b, offset, buffer, position, length); - position += length; - } - } - - public void flush() throws IOException { - drain(); - out.flush(); - } - - public void close() throws IOException { - flush(); - out.close(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/BufferedReader.java b/sgx-jvm/avian/classpath/java/io/BufferedReader.java deleted file mode 100644 index 8d5a69b884..0000000000 --- a/sgx-jvm/avian/classpath/java/io/BufferedReader.java +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class BufferedReader extends Reader { - private final Reader in; - private final char[] buffer; - private int position; - private int limit; - - public BufferedReader(Reader in, int bufferSize) { - this.in = in; - this.buffer = new char[bufferSize]; - } - - public BufferedReader(Reader in) { - this(in, 32); - } - - private void fill() throws IOException { - position = 0; - limit = in.read(buffer); - } - - public String readLine() throws IOException { - StringBuilder sb = new StringBuilder(); - while (true) { - if (position >= limit) { - fill(); - } - - if (position >= limit) { - return sb.length() == 0 ? null : sb.toString(); - } - - for (int i = position; i < limit; ++i) { - if(buffer[i] == '\r') { - sb.append(buffer, position, i - position); - position = i + 1; - if(i+1 < limit && buffer[i+1] == '\n') { - position = i + 2; - } - return sb.toString(); - } else if (buffer[i] == '\n') { - sb.append(buffer, position, i - position); - position = i + 1; - return sb.toString(); - } - } - sb.append(buffer, position, limit-position); - position = limit; - } - } - - public int read(char[] b, int offset, int length) throws IOException { - int count = 0; - - if (position >= limit && length < buffer.length) { - fill(); - } - - if (position < limit) { - int remaining = limit - position; - if (remaining > length) { - remaining = length; - } - - System.arraycopy(buffer, position, b, offset, remaining); - - count += remaining; - position += remaining; - offset += remaining; - length -= remaining; - } - - if (length > 0) { - int c = in.read(b, offset, length); - if (c == -1) { - if (count == 0) { - count = -1; - } - } else { - count += c; - } - } - - return count; - } - - public void close() throws IOException { - in.close(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/BufferedWriter.java b/sgx-jvm/avian/classpath/java/io/BufferedWriter.java deleted file mode 100644 index e1c4e71b18..0000000000 --- a/sgx-jvm/avian/classpath/java/io/BufferedWriter.java +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class BufferedWriter extends Writer { - private final Writer out; - private final char[] buffer; - private int position; - - public BufferedWriter(Writer out, int size) { - this.out = out; - this.buffer = new char[size]; - } - - public BufferedWriter(Writer out) { - this(out, 4096); - } - - private void drain() throws IOException { - if (position > 0) { - out.write(buffer, 0, position); - position = 0; - } - } - - public void write(char[] b, int offset, int length) throws IOException { - if (length > buffer.length - position) { - drain(); - out.write(b, offset, length); - } else { - System.arraycopy(b, offset, buffer, position, length); - position += length; - } - } - - public void flush() throws IOException { - drain(); - out.flush(); - } - - public void close() throws IOException { - flush(); - out.close(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/ByteArrayInputStream.java b/sgx-jvm/avian/classpath/java/io/ByteArrayInputStream.java deleted file mode 100644 index e5373b6a62..0000000000 --- a/sgx-jvm/avian/classpath/java/io/ByteArrayInputStream.java +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class ByteArrayInputStream extends InputStream { - private final byte[] array; - private int position; - private final int limit; - - public ByteArrayInputStream(byte[] array, int offset, int length) { - this.array = array; - position = offset; - this.limit = offset + length; - } - - public ByteArrayInputStream(byte[] array) { - this(array, 0, array.length); - } - - public int read() { - if (position < limit) { - return array[position++] & 0xff; - } else { - return -1; - } - } - - public int read(byte[] buffer, int offset, int bufferLength) { - if (bufferLength == 0) { - return 0; - } - if (position >= limit) { - return -1; - } - int remaining = limit-position; - if (remaining < bufferLength) { - bufferLength = remaining; - } - System.arraycopy(array, position, buffer, offset, bufferLength); - position += bufferLength; - return bufferLength; - } - - public int available() { - return limit - position; - } -} diff --git a/sgx-jvm/avian/classpath/java/io/ByteArrayOutputStream.java b/sgx-jvm/avian/classpath/java/io/ByteArrayOutputStream.java deleted file mode 100644 index 96b0cd584e..0000000000 --- a/sgx-jvm/avian/classpath/java/io/ByteArrayOutputStream.java +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class ByteArrayOutputStream extends OutputStream { - private static final int BufferSize = 32; - - private Cell firstCell; - private Cell curCell; - private int length; - private byte[] buffer; - private int position; - - public ByteArrayOutputStream(int capacity) { } - - public ByteArrayOutputStream() { - this(0); - } - - public void reset() { - firstCell = null; - curCell = null; - length = 0; - buffer = null; - position = 0; - } - - public int size() { - return length; - } - - public void write(int c) { - if (buffer == null) { - buffer = new byte[BufferSize]; - } else if (position >= buffer.length) { - flushBuffer(); - buffer = new byte[BufferSize]; - } - - buffer[position++] = (byte) (c & 0xFF); - ++ length; - } - - private byte[] copy(byte[] b, int offset, int length) { - byte[] array = new byte[length]; - System.arraycopy(b, offset, array, 0, length); - return array; - } - - public void write(byte[] b, int offset, int length) { - if (b == null) { - throw new NullPointerException(); - } - - if (offset < 0 || offset + length > b.length) { - throw new ArrayIndexOutOfBoundsException(); - } - - if (length == 0) return; - - if (buffer != null && length <= buffer.length - position) { - System.arraycopy(b, offset, buffer, position, length); - position += length; - } else { - flushBuffer(); - chainCell( new Cell(copy(b, offset, length), 0, length) ); - } - - this.length += length; - } - - private void chainCell(Cell cell){ - if (curCell == null){ - firstCell = cell; - curCell = cell; - }else{ - curCell.next = cell; - curCell = cell; - } - } - - private void flushBuffer() { - if (position > 0) { - byte[] b = buffer; - int p = position; - buffer = null; - position = 0; - - chainCell( new Cell(b, 0, p) ); - } - } - - public byte[] toByteArray() { - flushBuffer(); - - byte[] array = new byte[length]; - int pos = 0; - for (Cell c = firstCell; c != null; c = c.next) { - System.arraycopy(c.array, c.offset, array, pos, c.length); - pos += c.length; - } - return array; - } - - public synchronized void writeTo(OutputStream out) throws IOException { - if (length==0) return; - - if (out == null){ - throw new NullPointerException(); - } - - flushBuffer(); - - for (Cell c = firstCell; c != null; c = c.next) { - out.write(c.array, c.offset, c.length); - } - } - - @Override - public String toString() { - return new String(toByteArray()); - } - - public String toString(String encoding) throws UnsupportedEncodingException { - return new String(toByteArray(), encoding); - } - - private static class Cell { - public byte[] array; - public int offset; - public int length; - public Cell next = null; - - public Cell(byte[] array, int offset, int length) { - this.array = array; - this.offset = offset; - this.length = length; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/io/Closeable.java b/sgx-jvm/avian/classpath/java/io/Closeable.java deleted file mode 100644 index 5a04d7db63..0000000000 --- a/sgx-jvm/avian/classpath/java/io/Closeable.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface Closeable extends AutoCloseable { - void close() - throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/io/DataInput.java b/sgx-jvm/avian/classpath/java/io/DataInput.java deleted file mode 100644 index 4c9c25cf54..0000000000 --- a/sgx-jvm/avian/classpath/java/io/DataInput.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface DataInput { - boolean readBoolean() throws IOException; - byte readByte() throws IOException; - char readChar() throws IOException; - double readDouble() throws IOException; - float readFloat() throws IOException; - void readFully(byte[] b) throws IOException; - void readFully(byte[] b, int off, int len) throws IOException; - int readInt() throws IOException; - String readLine() throws IOException; - long readLong() throws IOException; - short readShort() throws IOException; - int readUnsignedByte() throws IOException; - int readUnsignedShort() throws IOException; - String readUTF() throws IOException; - int skipBytes(int n) throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/io/DataInputStream.java b/sgx-jvm/avian/classpath/java/io/DataInputStream.java deleted file mode 100644 index a80d93c5bc..0000000000 --- a/sgx-jvm/avian/classpath/java/io/DataInputStream.java +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class DataInputStream extends InputStream implements DataInput { - private InputStream in; - - public DataInputStream(InputStream in) { - this.in = in; - } - - public void close() throws IOException { - in.close(); - } - - public int read(byte[] buffer) throws IOException { - return in.read(buffer); - } - - public int read(byte[] buffer, int offset, int length) throws IOException { - return in.read(buffer, offset, length); - } - - public void readFully(byte[] b) throws IOException { - readFully(b, 0, b.length); - } - - public void readFully(byte[] b, int offset, int length) throws IOException { - while (length > 0) { - int count = read(b, offset, length); - if (count < 0) { - throw new EOFException("Reached EOF " + length + " bytes too early"); - } - offset += count; - length -= count; - } - } - - public int read() throws IOException { - return in.read(); - } - - private int read0() throws IOException { - int b = in.read(); - if (b < 0) { - throw new EOFException(); - } - return b; - } - - public boolean readBoolean() throws IOException { - return read0() != 0; - } - - public byte readByte() throws IOException { - return (byte)read0(); - } - - public short readShort() throws IOException { - return (short)((read0() << 8) | read0()); - } - - public int readInt() throws IOException { - return ((read0() << 24) | (read0() << 16) | (read0() << 8) | read0()); - } - - public float readFloat() throws IOException { - return Float.floatToIntBits(readInt()); - } - - public double readDouble() throws IOException { - return Double.doubleToLongBits(readLong()); - } - - public long readLong() throws IOException { - return ((readInt() & 0xffffffffl) << 32) | (readInt() & 0xffffffffl); - } - - public char readChar() throws IOException { - return (char)readShort(); - } - - public int readUnsignedByte() throws IOException { - return readByte() & 0xff; - } - - public int readUnsignedShort() throws IOException { - return readShort() & 0xffff; - } - - public String readUTF() throws IOException { - int length = readUnsignedShort(); - byte[] bytes = new byte[length]; - readFully(bytes); - return new String(bytes, "UTF-8"); - } - - @Deprecated - public String readLine() throws IOException { - int c = read(); - if (c < 0) { - return null; - } else if (c == '\n') { - return ""; - } - StringBuilder builder = new StringBuilder(); - for (;;) { - builder.append((char)c); - c = read(); - if (c < 0 || c == '\n') { - return builder.toString(); - } - } - } - - public int skipBytes(int n) throws IOException { - for (int count = 0; count < n; ++count) { - if (read() < 0) {; - return count; - } - } - return n; - } -} diff --git a/sgx-jvm/avian/classpath/java/io/DataOutput.java b/sgx-jvm/avian/classpath/java/io/DataOutput.java deleted file mode 100644 index 9365e6cd73..0000000000 --- a/sgx-jvm/avian/classpath/java/io/DataOutput.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface DataOutput { - void write(byte[] b) throws IOException; - void write(byte[] b, int off, int len) throws IOException; - void write(int b) throws IOException; - void writeBoolean(boolean v) throws IOException; - void writeByte(int v) throws IOException; - void writeBytes(String s) throws IOException; - void writeChar(int v) throws IOException; - void writeChars(String s) throws IOException; - void writeDouble(double v) throws IOException; - void writeFloat(float v) throws IOException; - void writeInt(int v) throws IOException; - void writeLong(long v) throws IOException; - void writeShort(int v) throws IOException; - void writeUTF(String s) throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/io/DataOutputStream.java b/sgx-jvm/avian/classpath/java/io/DataOutputStream.java deleted file mode 100644 index 0bec001a5f..0000000000 --- a/sgx-jvm/avian/classpath/java/io/DataOutputStream.java +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class DataOutputStream extends OutputStream implements DataOutput { - private OutputStream out; - - public DataOutputStream(OutputStream out) { - this.out = out; - } - - public void close() throws IOException { - out.close(); - } - - public void flush() throws IOException { - out.flush(); - } - - public void write(byte[] buffer) throws IOException { - out.write(buffer); - } - - public void write(byte[] buffer, int offset, int length) throws IOException { - out.write(buffer, offset, length); - } - - public void write(int b) throws IOException { - out.write(b); - } - - public void writeBoolean(boolean b) throws IOException { - writeByte(b ? 1 : 0); - } - - public void writeByte(int b) throws IOException { - out.write(b); - } - - public void writeShort(int s) throws IOException { - write((byte)(s >> 8)); - write((byte)s); - } - - public void writeInt(int i) throws IOException { - write((byte)(i >> 24)); - write((byte)(i >> 16)); - write((byte)(i >> 8)); - write((byte)i); - } - - public void writeFloat(float f) throws IOException { - writeInt(Float.floatToIntBits(f)); - } - - public void writeDouble(double d) throws IOException { - writeLong(Double.doubleToLongBits(d)); - } - - public void writeLong(long l) throws IOException { - write((byte)(l >> 56)); - write((byte)(l >> 48)); - write((byte)(l >> 40)); - write((byte)(l >> 32)); - write((byte)(l >> 24)); - write((byte)(l >> 16)); - write((byte)(l >> 8)); - write((byte)l); - } - - public void writeChar(int ch) throws IOException { - write((byte)(ch >> 8)); - write((byte)ch); - } - - public void writeChars(String s) throws IOException { - for (char ch : s.toCharArray()) { - writeChar(ch & 0xffff); - } - } - - public void writeBytes(String s) throws IOException { - out.write(s.getBytes()); - } - - public void writeUTF(String s) throws IOException { - byte[] bytes = s.getBytes("UTF-8"); - writeShort((short)bytes.length); - out.write(bytes); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/EOFException.java b/sgx-jvm/avian/classpath/java/io/EOFException.java deleted file mode 100644 index 78a9e995a2..0000000000 --- a/sgx-jvm/avian/classpath/java/io/EOFException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class EOFException extends IOException { - public EOFException(String message) { - super(message); - } - - public EOFException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/Externalizable.java b/sgx-jvm/avian/classpath/java/io/Externalizable.java deleted file mode 100644 index 48351db912..0000000000 --- a/sgx-jvm/avian/classpath/java/io/Externalizable.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface Externalizable { - public void readExternal(ObjectInput in); - public void writeExternal(ObjectOutput out); -} diff --git a/sgx-jvm/avian/classpath/java/io/File.java b/sgx-jvm/avian/classpath/java/io/File.java deleted file mode 100644 index fe73b433eb..0000000000 --- a/sgx-jvm/avian/classpath/java/io/File.java +++ /dev/null @@ -1,244 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class File implements Serializable { - private static final String FileSeparator - = System.getProperty("file.separator"); - - private static final boolean IsWindows - = System.getProperty("os.name").equals("Windows"); - - public static final String separator = FileSeparator; - - public static final char separatorChar = FileSeparator.charAt(0); - - private static final String PathSeparator - = System.getProperty("path.separator"); - - public static final String pathSeparator = PathSeparator; - - public static final char pathSeparatorChar = PathSeparator.charAt(0); - - // static { - // System.loadLibrary("natives"); - // } - - private final String path; - - public File(String path) { - if (path == null) throw new NullPointerException(); - this.path = normalize(path); - } - - public File(String parent, String child) { - this(parent + FileSeparator + child); - } - - public File(File parent, String child) { - this(parent.getPath() + FileSeparator + child); - } - - private static String stripSeparators(String p) { - while (p.length() > 1 && p.endsWith(FileSeparator)) { - p = p.substring(0, p.length() - 1); - } - return p; - } - - private static String normalize(String path) { - if(IsWindows - && path.length() > 2 - && path.charAt(0) == '/' - && path.charAt(2) == ':') - { - // remove a leading slash on Windows - path = path.substring(1); - } - return stripSeparators - ("\\".equals(FileSeparator) ? path.replace('/', '\\') : path); - } - - private static native boolean isDirectory(String path); - - public boolean isDirectory() { - return isDirectory(path); - } - - private static native boolean isFile(String path); - - public boolean isFile() { - return isFile(path); - } - - public boolean isAbsolute() { - return path.equals(toAbsolutePath(path)); - } - - private static native boolean canRead(String path); - - public boolean canRead() { - return canRead(path); - } - - private static native boolean canWrite(String path); - - public boolean canWrite() { - return canWrite(path); - } - - private static native boolean canExecute(String path); - - public boolean canExecute() { - return canExecute(path); - } - - public String getName() { - int index = path.lastIndexOf(FileSeparator); - if (index >= 0) { - return path.substring(index + 1); - } else { - return path; - } - } - - public String toString() { - return getPath(); - } - - public String getPath() { - return path; - } - - public String getParent() { - int index = path.lastIndexOf(FileSeparator); - if (index > 0) { - return normalize(path.substring(0, index)); - } else if (index == 0) { - return normalize(path.substring(0, FileSeparator.length())); - } else { - return null; - } - } - - public File getParentFile() { - String s = getParent(); - return (s == null ? null : new File(s)); - } - - private static native String toCanonicalPath(String path); - - public String getCanonicalPath() { - return toCanonicalPath(path); - } - - public File getCanonicalFile() { - return new File(getCanonicalPath()); - } - - private static native String toAbsolutePath(String path); - - public String getAbsolutePath() { - return toAbsolutePath(path); - } - - public File getAbsoluteFile() { - return new File(getAbsolutePath()); - } - - private static native long length(String path); - - public long length() { - return length(path); - } - - private static native boolean exists(String path); - - public boolean exists() { - return exists(path); - } - - public File[] listFiles() { - return listFiles(null); - } - - public File[] listFiles(FilenameFilter filter) { - String[] list = list(filter); - if (list != null) { - File[] result = new File[list.length]; - for (int i = 0; i < list.length; ++i) { - result[i] = new File(this, list[i]); - } - return result; - } else { - return null; - } - } - - public String[] list() { - return list(null); - } - - public String[] list(FilenameFilter filter) { - long handle = 0; - try { - handle = openDir(path); - if (handle != 0) { - Pair list = null; - int count = 0; - for (String s = readDir(handle); s != null; s = readDir(handle)) { - if (filter == null || filter.accept(this, s)) { - list = new Pair(s, list); - ++ count; - } - } - - String[] result = new String[count]; - for (int i = count - 1; i >= 0; --i) { - result[i] = list.value; - list = list.next; - } - - return result; - } else { - return null; - } - } finally { - if (handle != 0) { - closeDir(handle); - } - } - } - - public long lastModified() { - return lastModified(path); - } - private static native long openDir(String path); - - private static native long lastModified(String path); - - private static native String readDir(long handle); - - private static native void closeDir(long handle); - - - - private static class Pair { - public final String value; - public final Pair next; - - public Pair(String value, Pair next) { - this.value = value; - this.next = next; - } - } - -} diff --git a/sgx-jvm/avian/classpath/java/io/FileDescriptor.java b/sgx-jvm/avian/classpath/java/io/FileDescriptor.java deleted file mode 100644 index 0c7d5f7201..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FileDescriptor.java +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class FileDescriptor { - public static final FileDescriptor in = new FileDescriptor(0); - public static final FileDescriptor out = new FileDescriptor(1); - public static final FileDescriptor err = new FileDescriptor(2); - - final int value; - - public FileDescriptor(int value) { - this.value = value; - } - - public FileDescriptor() { - this(-1); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/FileInputStream.java b/sgx-jvm/avian/classpath/java/io/FileInputStream.java deleted file mode 100644 index e2e7fa6e48..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FileInputStream.java +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class FileInputStream extends InputStream { - // static { - // System.loadLibrary("natives"); - // } - - private int fd; - private int remaining; - - public FileInputStream(FileDescriptor fd) { - this.fd = fd.value; - } - - public FileInputStream(String path) throws IOException { - fd = open(path); - remaining = (int) new File(path).length(); - } - - public FileInputStream(File file) throws IOException { - this(file.getPath()); - } - - public int available() throws IOException { - return remaining; - } - - private static native int open(String path) throws IOException; - - private static native int read(int fd) throws IOException; - - private static native int read(int fd, byte[] b, int offset, int length) - throws IOException; - - public static native void close(int fd) throws IOException; - - public int read() throws IOException { - int c = read(fd); - if (c >= 0 && remaining > 0) { - -- remaining; - } - return c; - } - - public int read(byte[] b, int offset, int length) throws IOException { - if (b == null) { - throw new NullPointerException(); - } - - if (offset < 0 || offset + length > b.length) { - throw new ArrayIndexOutOfBoundsException(); - } - - int c = read(fd, b, offset, length); - if (c > 0 && remaining > 0) { - remaining -= c; - } - return c; - } - - public void close() throws IOException { - if (fd != -1) { - close(fd); - fd = -1; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/io/FileNotFoundException.java b/sgx-jvm/avian/classpath/java/io/FileNotFoundException.java deleted file mode 100644 index 114595f470..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FileNotFoundException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class FileNotFoundException extends IOException { - public FileNotFoundException(String message) { - super(message); - } - - public FileNotFoundException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/FileOutputStream.java b/sgx-jvm/avian/classpath/java/io/FileOutputStream.java deleted file mode 100644 index 8732004e72..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FileOutputStream.java +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class FileOutputStream extends OutputStream { - // static { - // System.loadLibrary("natives"); - // } - - private int fd; - - public FileOutputStream(FileDescriptor fd) { - this.fd = fd.value; - } - - public FileOutputStream(String path) throws IOException { - this(path, false); - } - - public FileOutputStream(String path, boolean append) throws IOException { - fd = open(path, append); - } - - - public FileOutputStream(File file) throws IOException { - this(file.getPath()); - } - - private static native int open(String path, boolean append) throws IOException; - - private static native void write(int fd, int c) throws IOException; - - private static native void write(int fd, byte[] b, int offset, int length) - throws IOException; - - private static native void close(int fd) throws IOException; - - public void write(int c) throws IOException { - write(fd, c); - } - - public void write(byte[] b, int offset, int length) throws IOException { - if (b == null) { - throw new NullPointerException(); - } - - if (offset < 0 || offset + length > b.length) { - throw new ArrayIndexOutOfBoundsException(); - } - - write(fd, b, offset, length); - } - - public void close() throws IOException { - if (fd != -1) { - close(fd); - fd = -1; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/io/FileReader.java b/sgx-jvm/avian/classpath/java/io/FileReader.java deleted file mode 100644 index fa484720ae..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FileReader.java +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class FileReader extends Reader { - private final Reader in; - - public FileReader(FileInputStream in) { - this.in = new InputStreamReader(in); - } - - public FileReader(FileDescriptor fd) { - this(new FileInputStream(fd)); - } - - public FileReader(String path) throws IOException { - this(new FileInputStream(path)); - } - - public FileReader(File file) throws IOException { - this(new FileInputStream(file)); - } - - public int read(char[] b, int offset, int length) throws IOException { - return in.read(b, offset, length); - } - - public void close() throws IOException { - in.close(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/FileWriter.java b/sgx-jvm/avian/classpath/java/io/FileWriter.java deleted file mode 100644 index ca384b0af4..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FileWriter.java +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class FileWriter extends Writer { - private final Writer out; - - private FileWriter(FileOutputStream out) { - this.out = new OutputStreamWriter(out); - } - - public FileWriter(FileDescriptor fd) { - this(new FileOutputStream(fd)); - } - - public FileWriter(String path) throws IOException { - this(new FileOutputStream(path)); - } - - public FileWriter(File file) throws IOException { - this(new FileOutputStream(file)); - } - - public void write(char[] b, int offset, int length) throws IOException { - out.write(b, offset, length); - } - - public void flush() throws IOException { - out.flush(); - } - - public void close() throws IOException { - out.close(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/FilenameFilter.java b/sgx-jvm/avian/classpath/java/io/FilenameFilter.java deleted file mode 100644 index 8556e0ed8e..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FilenameFilter.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface FilenameFilter { - - boolean accept(File dir, String name); - -} diff --git a/sgx-jvm/avian/classpath/java/io/FilterInputStream.java b/sgx-jvm/avian/classpath/java/io/FilterInputStream.java deleted file mode 100644 index 76119ebb24..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FilterInputStream.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class FilterInputStream extends InputStream { - protected InputStream in; - - public FilterInputStream(InputStream in) { - this.in = in; - } - - public void close() throws IOException { - in.close(); - } - - public int read(byte[] b) throws IOException { - return in.read(b); - } - - public int read(byte[] b, int off, int len) throws IOException { - return in.read(b, off, len); - } - - public int read() throws IOException { - return in.read(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/FilterOutputStream.java b/sgx-jvm/avian/classpath/java/io/FilterOutputStream.java deleted file mode 100644 index ebab3b7cb2..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FilterOutputStream.java +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class FilterOutputStream extends OutputStream { - protected OutputStream out; - - public FilterOutputStream(OutputStream out) { - this.out = out; - } - - public void close() throws IOException { - out.close(); - } - - public void flush() throws IOException { - out.flush(); - } - - public void write(byte[] b) throws IOException { - out.write(b); - } - - public void write(byte[] b, int off, int len) throws IOException { - out.write(b, off, len); - } - - public void write(int b) throws IOException { - out.write(b); - } - -} diff --git a/sgx-jvm/avian/classpath/java/io/FilterReader.java b/sgx-jvm/avian/classpath/java/io/FilterReader.java deleted file mode 100644 index 13c8af3f98..0000000000 --- a/sgx-jvm/avian/classpath/java/io/FilterReader.java +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public abstract class FilterReader extends Reader { - protected Reader in; - - protected FilterReader(Reader in) { - this.in = in; - } - - public int read() throws IOException { - return in.read(); - } - - public int read(char[] buffer, int offset, int length) throws IOException { - return in.read(buffer, offset, length); - } - - public boolean ready() throws IOException { - throw new UnsupportedOperationException(); - } - - public long skip(long n) throws IOException { - throw new UnsupportedOperationException(); - } - - public void close() throws IOException { - in.close(); - } - - public boolean markSupported() { - return in.markSupported(); - } - - public void mark(int readAheadLimit) throws IOException { - in.mark(readAheadLimit); - } - - public void reset() throws IOException { - in.reset(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/Flushable.java b/sgx-jvm/avian/classpath/java/io/Flushable.java deleted file mode 100644 index a3dd445c15..0000000000 --- a/sgx-jvm/avian/classpath/java/io/Flushable.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface Flushable { - void flush() - throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/io/IOException.java b/sgx-jvm/avian/classpath/java/io/IOException.java deleted file mode 100644 index 6dc9d189f1..0000000000 --- a/sgx-jvm/avian/classpath/java/io/IOException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class IOException extends Exception { - public IOException(String message, Throwable cause) { - super(message, cause); - } - - public IOException(String message) { - this(message, null); - } - - public IOException(Throwable cause) { - this(null, cause); - } - - public IOException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/InputStream.java b/sgx-jvm/avian/classpath/java/io/InputStream.java deleted file mode 100644 index 8bac129287..0000000000 --- a/sgx-jvm/avian/classpath/java/io/InputStream.java +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public abstract class InputStream implements Closeable { - public abstract int read() throws IOException; - - public int read(byte[] buffer) throws IOException { - return read(buffer, 0, buffer.length); - } - - public int read(byte[] buffer, int offset, int length) throws IOException { - for (int i = 0; i < length; ++i) { - int c = read(); - if (c == -1) { - if (i == 0) { - return -1; - } else { - return i; - } - } else { - buffer[offset + i] = (byte) (c & 0xFF); - } - } - return length; - } - - public long skip(long count) throws IOException { - final long Max = 8 * 1024; - int size = (int) (count < Max ? count : Max); - byte[] buffer = new byte[size]; - long remaining = count; - int c; - while ((c = read(buffer, 0, (int) (size < remaining ? size : remaining))) - >= 0 - && remaining > 0) { - remaining -= c; - } - return count - remaining; - } - - public int available() throws IOException { - return 0; - } - - public void mark(int limit) { - // ignore - } - - public void reset() throws IOException { - throw new IOException("mark/reset not supported"); - } - - public boolean markSupported() { - return false; - } - - public void close() throws IOException { } -} diff --git a/sgx-jvm/avian/classpath/java/io/InputStreamReader.java b/sgx-jvm/avian/classpath/java/io/InputStreamReader.java deleted file mode 100644 index c7805a6f92..0000000000 --- a/sgx-jvm/avian/classpath/java/io/InputStreamReader.java +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -import avian.Utf8; - -public class InputStreamReader extends Reader { - private static final int MultibytePadding = 4; - - private final InputStream in; - - public InputStreamReader(InputStream in) { - this.in = in; - } - - public InputStreamReader(InputStream in, String encoding) - throws UnsupportedEncodingException - { - this(in); - - if (! encoding.equals("UTF-8")) { - throw new UnsupportedEncodingException(encoding); - } - } - - public int read(char[] b, int offset, int length) throws IOException { - if (length == 0) { - return 0; - } - - byte[] buffer = new byte[length + MultibytePadding]; - int bufferLength = length; - int bufferOffset = 0; - while (true) { - int c = in.read(buffer, bufferOffset, bufferLength); - - if (c <= 0) { - if (bufferOffset > 0) { - // if we've reached the end of the stream while trying to - // read a multibyte character, we still need to return any - // competely-decoded characters, plus \ufffd to indicate an - // unknown character - c = 1; - while (bufferOffset > 0) { - char[] buffer16 = Utf8.decode16(buffer, 0, bufferOffset); - - if (buffer16 != null) { - System.arraycopy(buffer16, 0, b, offset, buffer16.length); - - c = buffer16.length + 1; - break; - } else { - -- bufferOffset; - } - } - - b[offset + c - 1] = '\ufffd'; - } - - return c; - } - - bufferOffset += c; - - char[] buffer16 = Utf8.decode16(buffer, 0, bufferOffset); - - if (buffer16 != null) { - bufferOffset = 0; - - System.arraycopy(buffer16, 0, b, offset, buffer16.length); - - return buffer16.length; - } else { - // the buffer ended in an incomplete multibyte character, so - // we try to read a another byte at a time until it's complete - bufferLength = 1; - } - } - } - - public void close() throws IOException { - in.close(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/LineNumberReader.java b/sgx-jvm/avian/classpath/java/io/LineNumberReader.java deleted file mode 100644 index f8860f4987..0000000000 --- a/sgx-jvm/avian/classpath/java/io/LineNumberReader.java +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class LineNumberReader extends BufferedReader { - private int line; - - public LineNumberReader(Reader in, int bufferSize) { - super(in, bufferSize); - } - - public LineNumberReader(Reader in) { - super(in); - } - - public int getLineNumber() { - return line; - } - - public void setLineNumber(int v) { - line = v; - } - - public int read(char[] b, int offset, int length) throws IOException { - int c = super.read(b, offset, length); - for (int i = 0; i < c; ++i) { - if (b[i] == '\n') { - ++ line; - } - } - return c; - } -} diff --git a/sgx-jvm/avian/classpath/java/io/NotSerializableException.java b/sgx-jvm/avian/classpath/java/io/NotSerializableException.java deleted file mode 100644 index d34397817a..0000000000 --- a/sgx-jvm/avian/classpath/java/io/NotSerializableException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class NotSerializableException extends ObjectStreamException { - public NotSerializableException(String message) { - super(message); - } - - public NotSerializableException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/ObjectInput.java b/sgx-jvm/avian/classpath/java/io/ObjectInput.java deleted file mode 100644 index 640a4c16f6..0000000000 --- a/sgx-jvm/avian/classpath/java/io/ObjectInput.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface ObjectInput { - public int available(); - public void close(); - public void read(); - public void read(byte[] b); - public void read(byte[] b, int off, int len); - public Object readObject(); - public long skip(long n); -} diff --git a/sgx-jvm/avian/classpath/java/io/ObjectOutput.java b/sgx-jvm/avian/classpath/java/io/ObjectOutput.java deleted file mode 100644 index a93eec2bc4..0000000000 --- a/sgx-jvm/avian/classpath/java/io/ObjectOutput.java +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface ObjectOutput { - public void close(); - public void flush(); - public void write(byte[] b); - public void write(byte[] b, int off, int len); - public void write(int b); - public void writeObject(Object obj); -} diff --git a/sgx-jvm/avian/classpath/java/io/ObjectStreamException.java b/sgx-jvm/avian/classpath/java/io/ObjectStreamException.java deleted file mode 100644 index 2e78ce6289..0000000000 --- a/sgx-jvm/avian/classpath/java/io/ObjectStreamException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class ObjectStreamException extends IOException { - public ObjectStreamException(String message) { - super(message); - } - - public ObjectStreamException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/OutputStream.java b/sgx-jvm/avian/classpath/java/io/OutputStream.java deleted file mode 100644 index b81d0b71d0..0000000000 --- a/sgx-jvm/avian/classpath/java/io/OutputStream.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public abstract class OutputStream implements Closeable, Flushable { - public abstract void write(int c) throws IOException; - - public void write(byte[] buffer) throws IOException { - write(buffer, 0, buffer.length); - } - - public void write(byte[] buffer, int offset, int length) throws IOException { - for (int i = 0; i < length; ++i) { - write(buffer[offset + i]); - } - } - - public void flush() throws IOException { } - - public void close() throws IOException { } -} diff --git a/sgx-jvm/avian/classpath/java/io/OutputStreamWriter.java b/sgx-jvm/avian/classpath/java/io/OutputStreamWriter.java deleted file mode 100644 index 2a183d31d2..0000000000 --- a/sgx-jvm/avian/classpath/java/io/OutputStreamWriter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -import avian.Utf8; - -public class OutputStreamWriter extends Writer { - private final OutputStream out; - - public OutputStreamWriter(OutputStream out) { - this.out = out; - } - - public void write(char[] b, int offset, int length) throws IOException { - out.write(Utf8.encode(b, offset, length)); - } - - public void flush() throws IOException { - out.flush(); - } - - public void close() throws IOException { - out.close(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/PrintStream.java b/sgx-jvm/avian/classpath/java/io/PrintStream.java deleted file mode 100644 index eda3feac64..0000000000 --- a/sgx-jvm/avian/classpath/java/io/PrintStream.java +++ /dev/null @@ -1,170 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class PrintStream extends OutputStream { - private final OutputStream out; - private final boolean autoFlush; - - private static class Static { - private static final byte[] newline - = System.getProperty("line.separator").getBytes(); - } - - public PrintStream(OutputStream out, boolean autoFlush) { - this.out = out; - this.autoFlush = autoFlush; - } - - public PrintStream(OutputStream out, boolean autoFlush, String encoding) - throws UnsupportedEncodingException - { - this.out = out; - this.autoFlush = autoFlush; - - if (! (encoding.equals("UTF-8") || encoding.equals("ISO-8859-1"))) { - throw new UnsupportedEncodingException(encoding); - } - } - - public PrintStream(OutputStream out) { - this(out, false); - } - - public synchronized void print(String s) { - try { - out.write(s.getBytes()); - if (autoFlush) flush(); - } catch (IOException e) { } - } - - public void print(Object o) { - print(String.valueOf(o)); - } - - public void print(boolean v) { - print(String.valueOf(v)); - } - - public void print(char c) { - print(String.valueOf(c)); - } - - public void print(int v) { - print(String.valueOf(v)); - } - - public void print(long v) { - print(String.valueOf(v)); - } - - public void print(float v) { - print(String.valueOf(v)); - } - - public void print(double v) { - print(String.valueOf(v)); - } - - public void print(char[] s) { - print(String.valueOf(s)); - } - - public synchronized PrintStream printf(java.util.Locale locale, String format, Object... args) { - // should this be cached in an instance variable?? - final java.util.Formatter formatter = new java.util.Formatter(this); - formatter.format(locale, format, args); - return this; - } - - public synchronized PrintStream printf(String format, Object... args) { - final java.util.Formatter formatter = new java.util.Formatter(this); - formatter.format(format, args); - return this; - } - - public PrintStream format(String format, Object... args) { - return printf(format, args); - } - - public PrintStream format(java.util.Locale locale, String format, Object... args) { - return printf(locale, format, args); - } - - public synchronized void println(String s) { - try { - out.write(s.getBytes()); - out.write(Static.newline); - if (autoFlush) flush(); - } catch (IOException e) { } - } - - public synchronized void println() { - try { - out.write(Static.newline); - if (autoFlush) flush(); - } catch (IOException e) { } - } - - public void println(Object o) { - println(String.valueOf(o)); - } - - public void println(boolean v) { - println(String.valueOf(v)); - } - - public void println(char c) { - println(String.valueOf(c)); - } - - public void println(int v) { - println(String.valueOf(v)); - } - - public void println(long v) { - println(String.valueOf(v)); - } - - public void println(float v) { - println(String.valueOf(v)); - } - - public void println(double v) { - println(String.valueOf(v)); - } - - public void println(char[] s) { - println(String.valueOf(s)); - } - - public void write(int c) throws IOException { - out.write(c); - if (autoFlush && c == '\n') flush(); - } - - public void write(byte[] buffer, int offset, int length) throws IOException { - out.write(buffer, offset, length); - if (autoFlush) flush(); - } - - public void flush() { - try { - out.flush(); - } catch (IOException e) { } - } - - public void close() { - try { - out.close(); - } catch (IOException e) { } - } -} diff --git a/sgx-jvm/avian/classpath/java/io/PrintWriter.java b/sgx-jvm/avian/classpath/java/io/PrintWriter.java deleted file mode 100644 index 604368d2b5..0000000000 --- a/sgx-jvm/avian/classpath/java/io/PrintWriter.java +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class PrintWriter extends Writer { - private static final char[] newline - = System.getProperty("line.separator").toCharArray(); - - private final Writer out; - private final boolean autoFlush; - - public PrintWriter(Writer out, boolean autoFlush) { - this.out = out; - this.autoFlush = autoFlush; - } - - public PrintWriter(Writer out) { - this(out, false); - } - - public PrintWriter(OutputStream out, boolean autoFlush) { - this(new OutputStreamWriter(out), autoFlush); - } - - public PrintWriter(OutputStream out) { - this(out, false); - } - - public synchronized void print(String s) { - try { - out.write(s.toCharArray()); - } catch (IOException e) { } - } - - public void print(Object o) { - print(o.toString()); - } - - public void print(char c) { - print(String.valueOf(c)); - } - - public synchronized void println(String s) { - try { - out.write(s.toCharArray()); - out.write(newline); - if (autoFlush) flush(); - } catch (IOException e) { } - } - - public synchronized void println() { - try { - out.write(newline); - if (autoFlush) flush(); - } catch (IOException e) { } - } - - public void println(Object o) { - println(o.toString()); - } - - public void println(char c) { - println(String.valueOf(c)); - } - - public void write(char[] buffer, int offset, int length) throws IOException { - out.write(buffer, offset, length); - if (autoFlush) flush(); - } - - public void flush() { - try { - out.flush(); - } catch (IOException e) { } - } - - public void close() { - try { - out.close(); - } catch (IOException e) { } - } -} diff --git a/sgx-jvm/avian/classpath/java/io/PushbackReader.java b/sgx-jvm/avian/classpath/java/io/PushbackReader.java deleted file mode 100644 index 49acf98357..0000000000 --- a/sgx-jvm/avian/classpath/java/io/PushbackReader.java +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class PushbackReader extends Reader { - private final Reader in; - private char savedChar; - private boolean hasSavedChar; - - public PushbackReader(Reader in, int bufferSize) { - if (bufferSize > 1) { - throw new IllegalArgumentException(bufferSize + " > 1"); - } - this.in = in; - this.hasSavedChar = false; - } - - public PushbackReader(Reader in) { - this(in, 1); - } - - public int read(char[] b, int offset, int length) throws IOException { - int count = 0; - if (hasSavedChar && length > 0) { - length--; - b[offset++] = savedChar; - hasSavedChar = false; - count = 1; - } - if (length > 0) { - int c = in.read(b, offset, length); - if (c == -1) { - if (count == 0) { - count = -1; - } - } else { - count += c; - } - } - - return count; - } - - public void unread(char[] b, int offset, int length) throws IOException { - if (length != 1) { - throw new IOException("Can only push back 1 char, not " + length); - } else if (hasSavedChar) { - throw new IOException("Already have a saved char"); - } else { - hasSavedChar = true; - savedChar = b[offset]; - } - } - - public void unread(char[] b) throws IOException { - unread(b, 0, b.length); - } - - public void unread(int c) throws IOException { - unread(new char[] { (char) c }); - } - - public void close() throws IOException { - in.close(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/RandomAccessFile.java b/sgx-jvm/avian/classpath/java/io/RandomAccessFile.java deleted file mode 100644 index 3669aba4d5..0000000000 --- a/sgx-jvm/avian/classpath/java/io/RandomAccessFile.java +++ /dev/null @@ -1,231 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -import java.lang.IllegalArgumentException; -import java.nio.ByteBuffer; - -public class RandomAccessFile implements DataInput, Closeable { - - private long peer; - private File file; - private long position = 0; - private long length; - private boolean allowWrite; - - public RandomAccessFile(String name, String mode) - throws FileNotFoundException - { - this(new File(name), mode); - } - - public RandomAccessFile(File file, String mode) - throws FileNotFoundException - { - if (file == null) throw new NullPointerException(); - if (mode.equals("rw")) allowWrite = true; - else if (! mode.equals("r")) throw new IllegalArgumentException(); - this.file = file; - open(); - } - - private void open() throws FileNotFoundException { - long[] result = new long[2]; - open(file.getPath(), allowWrite, result); - peer = result[0]; - length = result[1]; - } - - private static native void open(String name, boolean allowWrite, long[] result) - throws FileNotFoundException; - - private void refresh() throws IOException { - if (file.length() != length) { - close(); - open(); - } - } - - public long length() throws IOException { - refresh(); - return length; - } - - public long getFilePointer() throws IOException { - return position; - } - - public void seek(long position) throws IOException { - if (position < 0 || (!allowWrite && position > length())) throw new IOException(); - - this.position = position; - } - - public int skipBytes(int count) throws IOException { - if (position + count > length()) throw new IOException(); - this.position = position + count; - return count; - } - - public int read(byte b[], int off, int len) throws IOException { - if(b == null) - throw new IllegalArgumentException(); - if (peer == 0) - throw new IOException(); - if(len == 0) - return 0; - if (position + len > this.length) - throw new EOFException(); - if (off < 0 || off + len > b.length) - throw new ArrayIndexOutOfBoundsException(); - int bytesRead = readBytes(peer, position, b, off, len); - position += bytesRead; - return bytesRead; - } - - public int read(byte b[]) throws IOException { - if(b == null) - throw new IllegalArgumentException(); - if (peer == 0) - throw new IOException(); - if(b.length == 0) - return 0; - if (position + b.length > this.length) - throw new EOFException(); - int bytesRead = readBytes(peer, position, b, 0, b.length); - position += bytesRead; - return bytesRead; - } - - public void readFully(byte b[], int off, int len) throws IOException { - if (b == null) - throw new IllegalArgumentException(); - if (peer == 0) - throw new IOException(); - if(len == 0) - return; - if (position + len > this.length) - throw new EOFException(); - if (off < 0 || off + len > b.length) - throw new ArrayIndexOutOfBoundsException(); - int n = 0; - do { - int count = readBytes(peer, position, b, off + n, len - n); - position += count; - if (count == 0) - throw new EOFException(); - n += count; - } while (n < len); - } - - public void readFully(byte b[]) throws IOException { - readFully(b, 0, b.length); - } - - private static native int readBytes(long peer, long position, byte[] buffer, - int offset, int length); - - public boolean readBoolean() throws IOException { - return readByte() != 0; - } - - public int read() throws IOException { - try { - return readByte() & 0xff; - } catch (final EOFException e) { - return -1; - } - } - - public byte readByte() throws IOException { - final byte[] buffer = new byte[1]; - readFully(buffer); - return buffer[0]; - } - - public short readShort() throws IOException { - final byte[] buffer = new byte[2]; - readFully(buffer); - return (short)((buffer[0] << 8) | buffer[1]); - } - - public int readInt() throws IOException { - byte[] buf = new byte[4]; - readFully(buf); - return ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]); - } - - public float readFloat() throws IOException { - return Float.floatToIntBits(readInt()); - } - - public double readDouble() throws IOException { - return Double.doubleToLongBits(readLong()); - } - - public long readLong() throws IOException { - return ((readInt() & 0xffffffffl) << 32) | (readInt() & 0xffffffffl); - } - - public char readChar() throws IOException { - return (char)readShort(); - } - - public int readUnsignedByte() throws IOException { - return readByte() & 0xff; - } - - public int readUnsignedShort() throws IOException { - return readShort() & 0xffff; - } - - public String readUTF() throws IOException { - int length = readUnsignedShort(); - byte[] bytes = new byte[length]; - readFully(bytes); - return new String(bytes, "UTF-8"); - } - - @Deprecated - public String readLine() throws IOException { - int c = read(); - if (c < 0) { - return null; - } else if (c == '\n') { - return ""; - } - StringBuilder builder = new StringBuilder(); - for (;;) { - builder.append((char)c); - c = read(); - if (c < 0 || c == '\n') { - return builder.toString(); - } - } - } - - public void write(int b) throws IOException { - int count = writeBytes(peer, position, new byte[] { (byte)b }, 0, 1); - if (count > 0) position += count; - } - - private static native int writeBytes(long peer, long position, byte[] buffer, - int offset, int length); - - public void close() throws IOException { - if (peer != 0) { - close(peer); - peer = 0; - } - } - - private static native void close(long peer); -} diff --git a/sgx-jvm/avian/classpath/java/io/Reader.java b/sgx-jvm/avian/classpath/java/io/Reader.java deleted file mode 100644 index bba2be4c13..0000000000 --- a/sgx-jvm/avian/classpath/java/io/Reader.java +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -import java.nio.CharBuffer; - -public abstract class Reader implements Closeable, Readable { - public int read(CharBuffer buffer) throws IOException { - int c = read(buffer.array(), - buffer.arrayOffset() + buffer.position(), - buffer.remaining()); - - if (c > 0) { - buffer.position(buffer.position() + c); - } - - return c; - } - - public int read() throws IOException { - char[] buffer = new char[1]; - int c = read(buffer); - if (c <= 0) { - return -1; - } else { - return (int) buffer[0]; - } - } - - public int read(char[] buffer) throws IOException { - return read(buffer, 0, buffer.length); - } - - public abstract int read(char[] buffer, int offset, int length) - throws IOException; - - public boolean markSupported() { - return false; - } - - public void mark(int readAheadLimit) throws IOException { - throw new IOException("mark not supported"); - } - - public void reset() throws IOException { - throw new IOException("reset not supported"); - } - - public abstract void close() throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/io/Serializable.java b/sgx-jvm/avian/classpath/java/io/Serializable.java deleted file mode 100644 index 11978a051c..0000000000 --- a/sgx-jvm/avian/classpath/java/io/Serializable.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public interface Serializable { } diff --git a/sgx-jvm/avian/classpath/java/io/StreamCorruptedException.java b/sgx-jvm/avian/classpath/java/io/StreamCorruptedException.java deleted file mode 100644 index 06e56f9d62..0000000000 --- a/sgx-jvm/avian/classpath/java/io/StreamCorruptedException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class StreamCorruptedException extends IOException { - public StreamCorruptedException(String message) { - super(message); - } - - public StreamCorruptedException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/StringReader.java b/sgx-jvm/avian/classpath/java/io/StringReader.java deleted file mode 100644 index f8f863c35e..0000000000 --- a/sgx-jvm/avian/classpath/java/io/StringReader.java +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class StringReader extends Reader { - private final String in; - private int position = 0; - - public StringReader(String in) { - this.in = in; - } - - public int read(char[] b, int offset, int length) throws IOException { - if (length > in.length() - position) { - length = in.length() - position; - if (length <= 0) { - return -1; - } - } - in.getChars(position, position+length, b, offset); - position += length; - return length; - } - - public void close() throws IOException { } -} diff --git a/sgx-jvm/avian/classpath/java/io/StringWriter.java b/sgx-jvm/avian/classpath/java/io/StringWriter.java deleted file mode 100644 index 98d111f077..0000000000 --- a/sgx-jvm/avian/classpath/java/io/StringWriter.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class StringWriter extends Writer { - private final StringBuffer out = new StringBuffer(); - - public void write(char[] b, int offset, int length) throws IOException { - out.append(b, offset, length); - } - - public String toString() { - return out.toString(); - } - - public void flush() throws IOException { } - - public void close() throws IOException { } - - public StringBuffer getBuffer() { - return out; - } -} diff --git a/sgx-jvm/avian/classpath/java/io/UTFDataFormatException.java b/sgx-jvm/avian/classpath/java/io/UTFDataFormatException.java deleted file mode 100644 index 7938bbf6b0..0000000000 --- a/sgx-jvm/avian/classpath/java/io/UTFDataFormatException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class UTFDataFormatException extends IOException { - public UTFDataFormatException(String s) { - super(s); - } - - public UTFDataFormatException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/UnsupportedEncodingException.java b/sgx-jvm/avian/classpath/java/io/UnsupportedEncodingException.java deleted file mode 100644 index 80e8efeff3..0000000000 --- a/sgx-jvm/avian/classpath/java/io/UnsupportedEncodingException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public class UnsupportedEncodingException extends IOException { - public UnsupportedEncodingException(String message) { - super(message); - } - - public UnsupportedEncodingException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/io/Writer.java b/sgx-jvm/avian/classpath/java/io/Writer.java deleted file mode 100644 index 60f0ccdeaf..0000000000 --- a/sgx-jvm/avian/classpath/java/io/Writer.java +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.io; - -public abstract class Writer implements Closeable, Flushable, Appendable { - public void write(int c) throws IOException { - char[] buffer = new char[] { (char) c }; - write(buffer); - } - - public void write(char[] buffer) throws IOException { - write(buffer, 0, buffer.length); - } - - public void write(String s) throws IOException { - write(s.toCharArray()); - } - - public void write(String s, int offset, int length) throws IOException { - char[] b = new char[length]; - s.getChars(offset, offset + length, b, 0); - write(b); - } - - public abstract void write(char[] buffer, int offset, int length) - throws IOException; - - public Appendable append(final char c) throws IOException { - write((int)c); - return this; - } - - public Appendable append(final CharSequence sequence) throws IOException { - return append(sequence, 0, sequence.length()); - } - - public Appendable append(CharSequence sequence, int start, int end) - throws IOException { - final int length = end - start; - if (sequence instanceof String) { - write((String)sequence, start, length); - } else { - final char[] charArray = new char[length]; - for (int i = start; i < end; i++) { - charArray[i] = sequence.charAt(i); - } - write(charArray, 0, length); - } - return this; - } - - public abstract void flush() throws IOException; - - public abstract void close() throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/lang/AbstractMethodError.java b/sgx-jvm/avian/classpath/java/lang/AbstractMethodError.java deleted file mode 100644 index 185e10dee6..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/AbstractMethodError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class AbstractMethodError extends IncompatibleClassChangeError { - public AbstractMethodError() { - super(); - } - - public AbstractMethodError(String message) { - super(message); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Appendable.java b/sgx-jvm/avian/classpath/java/lang/Appendable.java deleted file mode 100644 index fc99187025..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Appendable.java +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.io.IOException; - -public interface Appendable { - public Appendable append(char c) throws IOException; - - public Appendable append(CharSequence sequence) throws IOException; - - public Appendable append(CharSequence sequence, int start, int end) - throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/lang/ArithmeticException.java b/sgx-jvm/avian/classpath/java/lang/ArithmeticException.java deleted file mode 100644 index 0d7822dab0..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ArithmeticException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class ArithmeticException extends RuntimeException { - public ArithmeticException(String message) { - super(message); - } - - public ArithmeticException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ArrayIndexOutOfBoundsException.java b/sgx-jvm/avian/classpath/java/lang/ArrayIndexOutOfBoundsException.java deleted file mode 100644 index 59913900fe..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ArrayIndexOutOfBoundsException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException { - public ArrayIndexOutOfBoundsException(String message, Throwable cause) { - super(message, cause); - } - - public ArrayIndexOutOfBoundsException(String message) { - this(message, null); - } - - public ArrayIndexOutOfBoundsException(Throwable cause) { - this(null, cause); - } - - public ArrayIndexOutOfBoundsException(int idx) { - this("Array index out of range: " + idx); - } - - public ArrayIndexOutOfBoundsException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ArrayStoreException.java b/sgx-jvm/avian/classpath/java/lang/ArrayStoreException.java deleted file mode 100644 index 90ed0ddbd6..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ArrayStoreException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class ArrayStoreException extends RuntimeException { - public ArrayStoreException(String message) { - super(message, null); - } - - public ArrayStoreException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/AssertionError.java b/sgx-jvm/avian/classpath/java/lang/AssertionError.java deleted file mode 100644 index 16d650a26a..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/AssertionError.java +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class AssertionError extends Error { - public AssertionError() { - super("", null); - } - - public AssertionError(boolean detailMessage) { - super(""+detailMessage, null); - } - - public AssertionError(char detailMessage) { - super(""+detailMessage, null); - } - - public AssertionError(double detailMessage) { - super(""+detailMessage, null); - } - - public AssertionError(float detailMessage) { - super(""+detailMessage, null); - } - - public AssertionError(int detailMessage) { - super(""+detailMessage, null); - } - - public AssertionError(long detailMessage) { - super(""+detailMessage, null); - } - - public AssertionError(Object detailMessage) { - super(""+detailMessage, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/AutoCloseable.java b/sgx-jvm/avian/classpath/java/lang/AutoCloseable.java deleted file mode 100644 index 0693dd45a5..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/AutoCloseable.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public interface AutoCloseable { - void close() throws Exception; -} diff --git a/sgx-jvm/avian/classpath/java/lang/Boolean.java b/sgx-jvm/avian/classpath/java/lang/Boolean.java deleted file mode 100644 index 44ebae2e09..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Boolean.java +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Boolean implements Comparable { - public static final Class TYPE = avian.Classes.forCanonicalName("Z"); - - public static final Boolean FALSE = new Boolean(false); - public static final Boolean TRUE = new Boolean(true); - - private final boolean value; - - public Boolean(boolean value) { - this.value = value; - } - - public Boolean(String s) { - this.value = "true".equals(s); - } - - public static Boolean valueOf(boolean value) { - return (value ? Boolean.TRUE : Boolean.FALSE); - } - - public static Boolean valueOf(String s) { - Boolean.TRUE.booleanValue(); - return ("true".equals(s) ? Boolean.TRUE : Boolean.FALSE); - } - - public int compareTo(Boolean o) { - return (value ? (o.value ? 0 : 1) : (o.value ? -1 : 0)); - } - - public boolean equals(Object o) { - return o instanceof Boolean && ((Boolean) o).value == value; - } - - public int hashCode() { - return (value ? 1 : 0); - } - - public String toString() { - return toString(value); - } - - public static String toString(boolean v) { - return (v ? "true" : "false"); - } - - public boolean booleanValue() { - return value; - } - - public static boolean getBoolean(String name) { - return parseBoolean(System.getProperty(name)); - } - - public static boolean parseBoolean(String string) { - return string != null && string.equalsIgnoreCase("true"); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Byte.java b/sgx-jvm/avian/classpath/java/lang/Byte.java deleted file mode 100644 index a28ec6a0f4..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Byte.java +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Byte extends Number implements Comparable { - public static final Class TYPE = avian.Classes.forCanonicalName("B"); - - public static final byte MIN_VALUE = -128; - public static final byte MAX_VALUE = 127; - - private final byte value; - - public Byte(byte value) { - this.value = value; - } - - public static Byte valueOf(byte value) { - return new Byte(value); - } - - public boolean equals(Object o) { - return o instanceof Byte && ((Byte) o).value == value; - } - - public int hashCode() { - return value; - } - - public String toString() { - return toString(value); - } - - public int compareTo(Byte o) { - return value - o.value; - } - - public static String toString(byte v, int radix) { - return Long.toString(v, radix); - } - - public static String toString(byte v) { - return toString(v, 10); - } - - public static byte parseByte(String s) { - return (byte) Integer.parseInt(s); - } - - public byte byteValue() { - return value; - } - - public short shortValue() { - return value; - } - - public int intValue() { - return value; - } - - public long longValue() { - return value; - } - - public float floatValue() { - return (float) value; - } - - public double doubleValue() { - return (double) value; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/CharSequence.java b/sgx-jvm/avian/classpath/java/lang/CharSequence.java deleted file mode 100644 index bde0354155..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/CharSequence.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public interface CharSequence { - public char charAt(int index); - - int length(); - - CharSequence subSequence(int start, int end); - - String toString(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/Character.java b/sgx-jvm/avian/classpath/java/lang/Character.java deleted file mode 100644 index 2a0882de85..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Character.java +++ /dev/null @@ -1,258 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Character implements Comparable { - public static final int MIN_RADIX = 2; - public static final int MAX_RADIX = 36; - - public static final Class TYPE = avian.Classes.forCanonicalName("C"); - - private final char value; - - public Character(char value) { - this.value = value; - } - - public static Character valueOf(char value) { - return new Character(value); - } - - public int compareTo(Character o) { - return value - o.value; - } - - public boolean equals(Object o) { - return o instanceof Character && ((Character) o).value == value; - } - - public int hashCode() { - return (int) value; - } - - public String toString() { - return toString(value); - } - - public static String toString(char v) { - return new String(new char[] { v }); - } - - public char charValue() { - return value; - } - - public static char toLowerCase(char c) { - if (c >= 'A' && c <= 'Z') { - return (char) ((c - 'A') + 'a'); - } else { - return c; - } - } - - public static int toLowerCase(int codePoint) { - if (isSupplementaryCodePoint(codePoint)) { - return codePoint; - } else { - return toLowerCase((char) codePoint); - } - } - - public static char toUpperCase(char c) { - if (c >= 'a' && c <= 'z') { - return (char) ((c - 'a') + 'A'); - } else { - return c; - } - } - - public static int toUpperCase(int codePoint) { - if (isSupplementaryCodePoint(codePoint)) { - return codePoint; - } else { - return toUpperCase((char) codePoint); - } - } - - public static boolean isDigit(char c) { - return c >= '0' && c <= '9'; - } - - public static boolean isDigit(int c) { - return c >= '0' && c <= '9'; - } - - public static int digit(char c, int radix) { - int digit = 0; - if ((c >= '0') && (c <= '9')) { - digit = c - '0'; - } else if ((c >= 'a') && (c <= 'z')) { - digit = c - 'a' + 10; - } else if ((c >= 'A') && (c <= 'Z')) { - digit = c - 'A' + 10; - } else { - return -1; - } - - if (digit < radix) { - return digit; - } else { - return -1; - } - } - - public static char forDigit(int digit, int radix) { - if (MIN_RADIX <= radix && radix <= MAX_RADIX) { - if (0 <= digit && digit < radix) { - return (char) (digit < 10 ? digit + '0' : digit + 'a' - 10); - } - } - return 0; - } - - public static boolean isLetter(int c) { - return canCastToChar(c) && isLetter((char) c); - } - - public static boolean isLetter(char c) { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); - } - - public static boolean isLetterOrDigit(char c) { - return isDigit(c) || isLetter(c); - } - - public static boolean isLetterOrDigit(int c) { - return canCastToChar(c) && (isDigit((char) c) || isLetter((char) c)); - } - - public static boolean isLowerCase(int c) { - return canCastToChar(c) && isLowerCase((char) c); - } - - public static boolean isLowerCase(char c) { - return (c >= 'a' && c <= 'z'); - } - - public static boolean isUpperCase(char c) { - return (c >= 'A' && c <= 'Z'); - } - - public static boolean isUpperCase(int c) { - return canCastToChar(c) && isUpperCase((char) c); - } - - public static boolean isWhitespace(int c) { - return canCastToChar(c) && isWhitespace((char) c); - } - - public static boolean isWhitespace(char c) { - return c == ' ' || c == '\t' || c == '\n' || c == '\r'; - } - - public static boolean isSpaceChar(char c) { - return isWhitespace(c); - } - - public static boolean isHighSurrogate(char ch) { - return ch >= '\uD800' && ch <= '\uDBFF'; - } - - public static boolean isLowSurrogate(char ch) { - return ch >= '\uDC00' && ch <= '\uDFFF'; - } - - public static boolean isISOControl(char ch) { - return ch <= '\u001F' || (ch >= '\u007F' && ch <= '\u009F'); - } - - public static boolean isJavaIdentifierStart(char ch) { - return isLetter(ch) || ch == '$' || ch == '_'; - //TODO: add if (getType(ch)==LETTER_NUMBER) || getType(ch)==CURRENCY_SYMBOL - } - - public static boolean isJavaIdentifierStart(int c) { - return canCastToChar(c) && isJavaIdentifierStart((char) c); - } - - public static boolean isJavaIdentifierPart(char ch) { - return isJavaIdentifierStart(ch) || isDigit(ch); - //TODO:Check for numeric letters (such as a Roman numeral character),combining marks,non-spacing marks - //add isIdentifierIgnorable(ch) - } - - public static boolean isJavaIdentifierPart(int c) { - return canCastToChar(c) && isJavaIdentifierPart((char) c); - } - - public static int toCodePoint(char high, char low) { - return (((high & 0x3FF) << 10) | (low & 0x3FF)) + 0x10000; - } - - public static boolean isSupplementaryCodePoint(int codePoint) { - return codePoint >= 0x10000 && codePoint <= 0x10FFFF; - } - - private static boolean canCastToChar(int codePoint) { - return (codePoint >= 0 && codePoint <= 0xFFFF); - } - - public static char[] toChars(int codePoint) { - if (isSupplementaryCodePoint(codePoint)) { - int cpPrime = codePoint - 0x10000; - int high = 0xD800 | ((cpPrime >> 10) & 0x3FF); - int low = 0xDC00 | (cpPrime & 0x3FF); - return new char[] { (char) high, (char) low }; - } - return new char[] { (char) codePoint }; - } - - public static boolean isSurrogatePair(char high, char low) { - return isHighSurrogate(high) && isLowSurrogate(low); - } - - public static int codePointAt(CharSequence sequence, int offset) { - int length = sequence.length(); - if (offset < 0 || offset >= length) { - throw new IndexOutOfBoundsException(); - } - - char high = sequence.charAt(offset); - if (! isHighSurrogate(high) || offset >= length) { - return high; - } - char low = sequence.charAt(offset + 1); - if (! isLowSurrogate(low)) { - return high; - } - - return toCodePoint(high, low); - } - - public static int codePointCount(CharSequence sequence, int start, int end) { - int length = sequence.length(); - if (start < 0 || start > end || end >= length) { - throw new IndexOutOfBoundsException(); - } - - int count = 0; - for (int i = start; i < end; ++i) { - if (isHighSurrogate(sequence.charAt(i)) - && (i + 1) < end - && isLowSurrogate(sequence.charAt(i + 1))) - { - ++ i; - } - ++ count; - } - return count; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Class.java b/sgx-jvm/avian/classpath/java/lang/Class.java deleted file mode 100644 index 6b3729b8dc..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Class.java +++ /dev/null @@ -1,791 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import avian.VMClass; -import avian.ClassAddendum; -import avian.AnnotationInvocationHandler; -import avian.SystemClassLoader; -import avian.Classes; -import avian.InnerClassReference; - -import java.lang.reflect.Constructor; -import java.lang.reflect.GenericDeclaration; -import java.lang.reflect.Method; -import java.lang.reflect.Field; -import java.lang.reflect.Modifier; -import java.lang.reflect.Type; -import java.lang.reflect.TypeVariable; -import java.lang.reflect.Proxy; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.AnnotatedElement; -import java.lang.reflect.SignatureParser; -import java.lang.annotation.Annotation; -import java.io.InputStream; -import java.io.IOException; -import java.net.URL; -import java.util.Arrays; -import java.util.List; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.Map; -import java.util.HashMap; -import java.security.ProtectionDomain; -import java.security.Permissions; -import java.security.AllPermission; - -public final class Class - implements Type, AnnotatedElement, GenericDeclaration -{ - private static final int PrimitiveFlag = 1 << 5; - private static final int EnumFlag = 1 << 14; - - public final VMClass vmClass; - - public Class(VMClass vmClass) { - this.vmClass = vmClass; - } - - public String toString() { - String res; - if (isInterface()) res = "interface "; - else if (isAnnotation()) res = "annotation "; - else res = "class "; - return res + getName(); - } - - private static byte[] replace(int a, int b, byte[] s, int offset, - int length) - { - byte[] array = new byte[length]; - for (int i = 0; i < length; ++i) { - byte c = s[i]; - array[i] = (byte) (c == a ? b : c); - } - return array; - } - - public String getName() { - return getName(vmClass); - } - - public static String getName(VMClass c) { - if (c.name == null) { - if ((c.vmFlags & PrimitiveFlag) != 0) { - if (c == Classes.primitiveClass('V')) { - c.name = "void\0".getBytes(); - } else if (c == Classes.primitiveClass('Z')) { - c.name = "boolean\0".getBytes(); - } else if (c == Classes.primitiveClass('B')) { - c.name = "byte\0".getBytes(); - } else if (c == Classes.primitiveClass('C')) { - c.name = "char\0".getBytes(); - } else if (c == Classes.primitiveClass('S')) { - c.name = "short\0".getBytes(); - } else if (c == Classes.primitiveClass('I')) { - c.name = "int\0".getBytes(); - } else if (c == Classes.primitiveClass('F')) { - c.name = "float\0".getBytes(); - } else if (c == Classes.primitiveClass('J')) { - c.name = "long\0".getBytes(); - } else if (c == Classes.primitiveClass('D')) { - c.name = "double\0".getBytes(); - } else { - throw new AssertionError(); - } - } else { - throw new AssertionError(); - } - } - - return Classes.makeString - (replace('/', '.', c.name, 0, c.name.length - 1), 0, c.name.length - 1); - } - - public String getCanonicalName() { - if ((vmClass.vmFlags & PrimitiveFlag) != 0) { - return getName(); - } else if (isArray()) { - return getComponentType().getCanonicalName() + "[]"; - } else { - return getName().replace('$', '.'); - } - } - - public String getSimpleName() { - if ((vmClass.vmFlags & PrimitiveFlag) != 0) { - return getName(); - } else if (isArray()) { - return getComponentType().getSimpleName() + "[]"; - } else { - String name = getCanonicalName(); - int index = name.lastIndexOf('.'); - if (index >= 0) { - return name.substring(index + 1); - } else { - return name; - } - } - } - - public T newInstance() - throws IllegalAccessException, InstantiationException - { - try { - return (T) getConstructor().newInstance(); - } catch (NoSuchMethodException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { - throw new RuntimeException(e); - } - } - - public static Class forName(String name) throws ClassNotFoundException { - return forName(name, true, Method.getCaller().class_.loader); - } - - public static Class forName(String name, boolean initialize, - ClassLoader loader) - throws ClassNotFoundException - { - return Classes.forName(name, initialize, loader); - } - - public Class getComponentType() { - if (isArray()) { - String n = getName(); - if ("[Z".equals(n)) { - return SystemClassLoader.getClass(Classes.primitiveClass('Z')); - } else if ("[B".equals(n)) { - return SystemClassLoader.getClass(Classes.primitiveClass('B')); - } else if ("[S".equals(n)) { - return SystemClassLoader.getClass(Classes.primitiveClass('S')); - } else if ("[C".equals(n)) { - return SystemClassLoader.getClass(Classes.primitiveClass('C')); - } else if ("[I".equals(n)) { - return SystemClassLoader.getClass(Classes.primitiveClass('I')); - } else if ("[F".equals(n)) { - return SystemClassLoader.getClass(Classes.primitiveClass('F')); - } else if ("[J".equals(n)) { - return SystemClassLoader.getClass(Classes.primitiveClass('J')); - } else if ("[D".equals(n)) { - return SystemClassLoader.getClass(Classes.primitiveClass('D')); - } - - if (vmClass.arrayElementClass == null) throw new AssertionError(); - return SystemClassLoader.getClass((VMClass) vmClass.arrayElementClass); - } else { - return null; - } - } - - public boolean isAssignableFrom(Class c) { - return Classes.isAssignableFrom(vmClass, c.vmClass); - } - - public Field getDeclaredField(String name) throws NoSuchFieldException { - int index = Classes.findField(vmClass, name); - if (index < 0) { - throw new NoSuchFieldException(name); - } else { - return new Field(vmClass.fieldTable[index]); - } - } - - public Field getField(String name) throws NoSuchFieldException { - for (VMClass c = vmClass; c != null; c = c.super_) { - int index = Classes.findField(c, name); - if (index >= 0) { - return new Field(vmClass.fieldTable[index]); - } - } - throw new NoSuchFieldException(name); - } - - public Method getDeclaredMethod(String name, Class ... parameterTypes) - throws NoSuchMethodException - { - if (name.startsWith("<")) { - throw new NoSuchMethodException(name); - } - int index = Classes.findMethod(vmClass, name, parameterTypes); - if (index < 0) { - throw new NoSuchMethodException(name); - } else { - return new Method(vmClass.methodTable[index]); - } - } - - public Method getMethod(String name, Class ... parameterTypes) - throws NoSuchMethodException - { - if (name.startsWith("<")) { - throw new NoSuchMethodException(name); - } - for (VMClass c = vmClass; c != null; c = c.super_) { - int index = Classes.findMethod(c, name, parameterTypes); - if (index >= 0) { - return new Method(c.methodTable[index]); - } - } - throw new NoSuchMethodException(name); - } - - public Constructor getConstructor(Class ... parameterTypes) - throws NoSuchMethodException - { - int index = Classes.findMethod(vmClass, "", parameterTypes); - if (index < 0) { - throw new NoSuchMethodException(); - } else { - return new Constructor(new Method(vmClass.methodTable[index])); - } - } - - public Constructor getDeclaredConstructor(Class ... parameterTypes) - throws NoSuchMethodException - { - Constructor c = null; - Constructor[] constructors = getDeclaredConstructors(); - - for (int i = 0; i < constructors.length; ++i) { - if (Classes.match(parameterTypes, constructors[i].getParameterTypes())) { - c = constructors[i]; - } - } - - if (c == null) { - throw new NoSuchMethodException(); - } else { - return c; - } - } - - private int countConstructors(boolean publicOnly) { - int count = 0; - if (vmClass.methodTable != null) { - for (int i = 0; i < vmClass.methodTable.length; ++i) { - if (((! publicOnly) - || ((vmClass.methodTable[i].flags & Modifier.PUBLIC)) - != 0) - && Method.getName(vmClass.methodTable[i]).equals("")) - { - ++ count; - } - } - } - return count; - } - - public Constructor[] getDeclaredConstructors() { - Constructor[] array = new Constructor[countConstructors(false)]; - if (vmClass.methodTable != null) { - Classes.link(vmClass); - - int index = 0; - for (int i = 0; i < vmClass.methodTable.length; ++i) { - if (Method.getName(vmClass.methodTable[i]).equals("")) { - array[index++] = new Constructor(new Method(vmClass.methodTable[i])); - } - } - } - - return array; - } - - public Constructor[] getConstructors() { - Constructor[] array = new Constructor[countConstructors(true)]; - if (vmClass.methodTable != null) { - Classes.link(vmClass); - - int index = 0; - for (int i = 0; i < vmClass.methodTable.length; ++i) { - if (((vmClass.methodTable[i].flags & Modifier.PUBLIC) != 0) - && Method.getName(vmClass.methodTable[i]).equals("")) - { - array[index++] = new Constructor(new Method(vmClass.methodTable[i])); - } - } - } - - return array; - } - - public Field[] getDeclaredFields() { - if (vmClass.fieldTable != null) { - Field[] array = new Field[vmClass.fieldTable.length]; - for (int i = 0; i < vmClass.fieldTable.length; ++i) { - array[i] = new Field(vmClass.fieldTable[i]); - } - return array; - } else { - return new Field[0]; - } - } - - private int countPublicFields() { - int count = 0; - if (vmClass.fieldTable != null) { - for (int i = 0; i < vmClass.fieldTable.length; ++i) { - if (((vmClass.fieldTable[i].flags & Modifier.PUBLIC)) != 0) { - ++ count; - } - } - } - return count; - } - - public Field[] getFields() { - Field[] array = new Field[countPublicFields()]; - if (vmClass.fieldTable != null) { - Classes.link(vmClass); - - int ai = 0; - for (int i = 0; i < vmClass.fieldTable.length; ++i) { - if (((vmClass.fieldTable[i].flags & Modifier.PUBLIC)) != 0) { - array[ai++] = new Field(vmClass.fieldTable[i]); - } - } - } - return array; - } - - private static void getAllFields(VMClass vmClass, ArrayList fields) { - if (vmClass.super_ != null) { - getAllFields(vmClass.super_, fields); - } - if (vmClass.fieldTable != null) { - Classes.link(vmClass); - - for (int i = 0; i < vmClass.fieldTable.length; ++i) { - fields.add(new Field(vmClass.fieldTable[i])); - } - } - } - - public Field[] getAllFields() { - ArrayList fields = new ArrayList(); - getAllFields(vmClass, fields); - return fields.toArray(new Field[fields.size()]); - } - - public Method[] getDeclaredMethods() { - return Classes.getMethods(vmClass, false); - } - - public Method[] getMethods() { - return Classes.getMethods(vmClass, true); - } - - public Class[] getInterfaces() { - ClassAddendum addendum = vmClass.addendum; - if (addendum != null) { - Object[] table = addendum.interfaceTable; - if (table != null) { - Class[] array = new Class[table.length]; - for (int i = 0; i < table.length; ++i) { - array[i] = SystemClassLoader.getClass((VMClass) table[i]); - } - return array; - } - } - return new Class[0]; - } - - public native Class getEnclosingClass(); - - public native Method getEnclosingMethod(); - - public native Constructor getEnclosingConstructor(); - - public T[] getEnumConstants() { - if (Enum.class.isAssignableFrom(this)) { - try { - return (T[]) getMethod("values").invoke(null); - } catch (Exception e) { - throw new Error(); - } - } else { - return null; - } - } - - public Class[] getDeclaredClasses() { - ClassAddendum addendum = vmClass.addendum; - if (addendum != null) { - InnerClassReference[] table = addendum.innerClassTable; - if (table != null) { - int count = 0; - for (int i = 0; i < table.length; ++i) { - InnerClassReference reference = table[i]; - if (reference.outer != null - && Arrays.equals(vmClass.name, reference.outer)) - { - ++ count; - } - } - - Class[] result = new Class[count]; - for (int i = 0; i < table.length; ++i) { - InnerClassReference reference = table[i]; - if (reference.outer != null - && Arrays.equals(vmClass.name, reference.outer)) - { - try { - result[--count] = getClassLoader().loadClass - (new String(reference.inner, 0, reference.inner.length - 1)); - } catch (ClassNotFoundException e) { - throw new Error(e); - } - } - } - - return result; - } - } - return new Class[0]; - } - - public Class getDeclaringClass() { - ClassAddendum addendum = vmClass.addendum; - if (addendum != null) { - InnerClassReference[] table = addendum.innerClassTable; - if (table != null) { - for (int i = 0; i < table.length; ++i) { - InnerClassReference reference = table[i]; - if (Arrays.equals(vmClass.name, reference.inner)) { - if (reference.outer != null) { - try { - return getClassLoader().loadClass - (new String(reference.outer, 0, reference.outer.length - 1)); - } catch (ClassNotFoundException e) { - throw new Error(e); - } - } else { - return null; - } - } - } - } - } - return null; - } - - public ClassLoader getClassLoader() { - return vmClass.loader; - } - - public int getModifiers() { - ClassAddendum addendum = vmClass.addendum; - if (addendum != null) { - InnerClassReference[] table = addendum.innerClassTable; - if (table != null) { - for (int i = 0; i < table.length; ++i) { - InnerClassReference reference = table[i]; - if (Arrays.equals(vmClass.name, reference.inner)) { - return reference.flags; - } - } - } - } - - return vmClass.flags; - } - - public boolean isInterface() { - return (vmClass.flags & Modifier.INTERFACE) != 0; - } - - public boolean isAnnotation() { - return (vmClass.flags & 0x2000) != 0; - } - - public Class getSuperclass() { - return (vmClass.super_ == null ? null : SystemClassLoader.getClass(vmClass.super_)); - } - - private enum ClassType { GLOBAL, MEMBER, LOCAL, ANONYMOUS } - - /** - * Determines the class type. - * - * There are four class types: global (no dollar sign), anonymous (only digits after the dollar sign), - * local (starts with digits after the dollar, ends in class name) and member (does not start with digits - * after the dollar sign). - * - * @return the class type - */ - private ClassType getClassType() { - final String name = getName(); - // Find the last dollar, as classes can be nested - int dollar = name.lastIndexOf('$'); - if (dollar < 0) return ClassType.GLOBAL; - - // Find the first non-digit after the dollar, if any - final char[] chars = name.toCharArray(); - int skipDigits; - for (skipDigits = dollar + 1; skipDigits < chars.length; skipDigits++) { - if (chars[skipDigits] < '0' || chars[skipDigits] > '9') break; - } - - if (skipDigits == chars.length) { - return ClassType.ANONYMOUS; - } else if (skipDigits == dollar + 1) { - return ClassType.MEMBER; - } else { - return ClassType.LOCAL; - } - } - - public boolean isAnonymousClass () { - return getClassType() == ClassType.ANONYMOUS; - } - - public boolean isLocalClass () { - return getClassType() == ClassType.LOCAL; - } - - public boolean isMemberClass () { - return getClassType() == ClassType.MEMBER; - } - - public boolean isArray() { - return vmClass.arrayDimensions != 0; - } - - public static boolean isInstance(VMClass c, Object o) { - return o != null && Classes.isAssignableFrom - (c, o.getVMClass()); - } - - public boolean isInstance(Object o) { - return isInstance(vmClass, o); - } - - public boolean isPrimitive() { - return (vmClass.vmFlags & PrimitiveFlag) != 0; - } - - public boolean isEnum() { - return getSuperclass() == Enum.class && (vmClass.flags & EnumFlag) != 0; - } - - public URL getResource(String path) { - if (path.startsWith("/")) { - path = path.substring(1); - } else { - String name = Classes.makeString - (vmClass.name, 0, vmClass.name.length - 1); - int index = name.lastIndexOf('/'); - if (index >= 0) { - path = name.substring(0, index) + "/" + path; - } - } - return getClassLoader().getResource(path); - } - - public InputStream getResourceAsStream(String path) { - URL url = getResource(path); - try { - return (url == null ? null : url.openStream()); - } catch (IOException e) { - return null; - } - } - - public boolean desiredAssertionStatus() { - return false; - } - - public Class asSubclass(Class c) { - if (! c.isAssignableFrom(this)) { - throw new ClassCastException(); - } - - return (Class) this; - } - - public T cast(Object o) { - return (T) o; - } - - public Package getPackage() { - if ((vmClass.vmFlags & PrimitiveFlag) != 0 || isArray()) { - return null; - } else { - String name = getCanonicalName(); - int index = name.lastIndexOf('.'); - if (index >= 0) { - return getClassLoader().getPackage(name.substring(0, index)); - } else { - return null; - } - } - } - - public boolean isAnnotationPresent - (Class class_) - { - return getAnnotation(class_) != null; - } - - private static Annotation getAnnotation(VMClass c, Object[] a) { - if (a[0] == null) { - a[0] = Proxy.newProxyInstance - (c.loader, new Class[] { (Class) a[1] }, - new AnnotationInvocationHandler(a)); - } - return (Annotation) a[0]; - } - - public T getAnnotation(Class class_) { - for (VMClass c = vmClass; c != null; c = c.super_) { - if (c.addendum != null && c.addendum.annotationTable != null) { - Classes.link(c, c.loader); - - Object[] table = (Object[]) c.addendum.annotationTable; - for (int i = 0; i < table.length; ++i) { - Object[] a = (Object[]) table[i]; - if (a[1] == class_) { - return (T) getAnnotation(c, a); - } - } - } - } - return null; - } - - public Annotation[] getDeclaredAnnotations() { - if (vmClass.addendum.annotationTable != null) { - Classes.link(vmClass); - - Object[] table = (Object[]) vmClass.addendum.annotationTable; - Annotation[] array = new Annotation[table.length]; - for (int i = 0; i < table.length; ++i) { - array[i] = getAnnotation(vmClass, (Object[]) table[i]); - } - return array; - } else { - return new Annotation[0]; - } - } - - private int countAnnotations() { - int count = 0; - for (VMClass c = vmClass; c != null; c = c.super_) { - if (c.addendum != null && c.addendum.annotationTable != null) { - count += ((Object[]) c.addendum.annotationTable).length; - } - } - return count; - } - - public Annotation[] getAnnotations() { - Annotation[] array = new Annotation[countAnnotations()]; - int i = 0; - for (VMClass c = vmClass; c != null; c = c.super_) { - if (c.addendum != null && c.addendum.annotationTable != null) { - Object[] table = (Object[]) c.addendum.annotationTable; - for (int j = 0; j < table.length; ++j) { - array[i++] = getAnnotation(vmClass, (Object[]) table[j]); - } - } - } - - return array; - } - - public ProtectionDomain getProtectionDomain() { - return Classes.getProtectionDomain(vmClass); - } - - public TypeVariable[] getTypeParameters() { - throw new UnsupportedOperationException("not yet implemented"); - } - - /** - * The first one is the superclass, the others are interfaces - **/ - private String[] getGenericTypeSignatures() { - String signature = Classes.toString((byte[]) vmClass.addendum.signature); - final char[] signChars = signature.toCharArray(); - - // Addendum format: - // LBaseClass;LIface1;LIface2;... - // We should split it - - int i = -1; - - // Passing the generic args - int angles = 0; - do { - i++; - if (signChars[i] == '<') angles ++; - else if (signChars[i] == '>') angles --; - } while (angles > 0); - if (signChars[i] == '>') i++; - - // Splitting types list - LinkedList typeSigns = new LinkedList(); - StringBuilder curTypeSign = new StringBuilder(); - for (; i < signChars.length; i++) { - // Counting braces - if (signChars[i] == '<') angles ++; - else if (signChars[i] == '>') angles --; - - // Appending character - curTypeSign.append(signChars[i]); - - // Splitting - if (angles == 0 && signChars[i] == ';') { - typeSigns.add(curTypeSign.toString()); - curTypeSign.setLength(0); - } - } - if (curTypeSign.length() > 0) typeSigns.add(curTypeSign.toString()); - - String[] res = new String[typeSigns.size()]; - return typeSigns.toArray(res); - } - - public Type[] getGenericInterfaces() { - if (vmClass.addendum == null || vmClass.addendum.signature == null) { - return getInterfaces(); - } - - String[] typeSigns = getGenericTypeSignatures(); - if (typeSigns.length < 1) { - throw new RuntimeException("Class signature doesn't contain any type"); - } - - // Parsing types - Type[] res = new Type[typeSigns.length - 1]; - for (int i = 0; i < typeSigns.length - 1; i++) { - res[i] = SignatureParser.parse(vmClass.loader, typeSigns[i + 1], this); - } - - return res; - } - - public Type getGenericSuperclass() { - if (vmClass.addendum == null || vmClass.addendum.signature == null) { - return getSuperclass(); - } - String[] typeSigns = getGenericTypeSignatures(); - if (typeSigns.length < 1) { - throw new RuntimeException("Class signature doesn't contain any type"); - } - - return SignatureParser.parse(vmClass.loader, typeSigns[0], this); - } - -} diff --git a/sgx-jvm/avian/classpath/java/lang/ClassCastException.java b/sgx-jvm/avian/classpath/java/lang/ClassCastException.java deleted file mode 100644 index c244f63ca7..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ClassCastException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class ClassCastException extends RuntimeException { - public ClassCastException(String message) { - super(message); - } - - public ClassCastException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ClassLoader.java b/sgx-jvm/avian/classpath/java/lang/ClassLoader.java deleted file mode 100644 index 8cc4329452..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ClassLoader.java +++ /dev/null @@ -1,235 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.io.InputStream; -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Enumeration; -import java.util.Map; -import java.util.HashMap; -import java.security.ProtectionDomain; - -public abstract class ClassLoader { - private final ClassLoader parent; - private Map packages; - - protected ClassLoader(ClassLoader parent) { - if (parent == null) { - this.parent = getSystemClassLoader(); - } else { - this.parent = parent; - } - } - - protected ClassLoader() { - this(getSystemClassLoader()); - } - - private Map packages() { - if (packages == null) { - packages = new HashMap(); - } - return packages; - } - - protected Package getPackage(String name) { - Package p; - synchronized (this) { - p = packages().get(name); - } - - if (parent != null) { - p = parent.getPackage(name); - } else { - // todo: load attributes from JAR manifest if available - p = definePackage(name, null, null, null, null, null, null, null); - } - - if (p != null) { - synchronized (this) { - Package p2 = packages().get(name); - if (p2 != null) { - p = p2; - } else { - packages().put(name, p); - } - } - } - - - return p; - } - - protected Package[] getPackages() { - synchronized (this) { - return packages().values().toArray(new Package[packages().size()]); - } - } - - protected Package definePackage(String name, - String specificationTitle, - String specificationVersion, - String specificationVendor, - String implementationTitle, - String implementationVersion, - String implementationVendor, - URL sealBase) - { - Package p = new Package - (name, implementationTitle, implementationVersion, - implementationVendor, specificationTitle, specificationVersion, - specificationVendor, sealBase, this); - - synchronized (this) { - packages().put(name, p); - return p; - } - } - - public static ClassLoader getSystemClassLoader() { - return ClassLoader.class.getClassLoader(); - } - - protected Class defineClass(String name, byte[] b, int offset, int length) { - if (b == null) { - throw new NullPointerException(); - } - - if (offset < 0 || offset > length || offset + length > b.length) { - throw new IndexOutOfBoundsException(); - } - - return avian.SystemClassLoader.getClass - (avian.Classes.defineVMClass(this, b, offset, length)); - } - - protected Class defineClass(String name, byte[] b, int offset, int length, - ProtectionDomain domain) - { - return defineClass(name, b, offset, length); - } - - protected Class findClass(String name) throws ClassNotFoundException { - throw new ClassNotFoundException(); - } - - protected Class reallyFindLoadedClass(String name) { - return null; - } - - protected final Class findLoadedClass(String name) { - return reallyFindLoadedClass(name); - } - - public Class loadClass(String name) throws ClassNotFoundException { - return loadClass(name, false); - } - - protected Class loadClass(String name, boolean resolve) - throws ClassNotFoundException - { - Class c = findLoadedClass(name); - if (c == null) { - if (parent != null) { - try { - c = parent.loadClass(name); - } catch (ClassNotFoundException ok) { } - } - - if (c == null) { - c = findClass(name); - } - } - - if (resolve) { - resolveClass(c); - } - - return c; - } - - protected void resolveClass(Class c) { - avian.Classes.link(c.vmClass, this); - } - - public final ClassLoader getParent() { - return parent; - } - - protected URL findResource(String path) { - return null; - } - - protected Enumeration findResources(String name) throws IOException { - return Collections.enumeration(new ArrayList(0)); - } - - public URL getResource(String path) { - URL url = null; - if (parent != null) { - url = parent.getResource(path); - } - - if (url == null) { - url = findResource(path); - } - - return url; - } - - public InputStream getResourceAsStream(String path) { - URL url = getResource(path); - try { - return (url == null ? null : url.openStream()); - } catch (IOException e) { - return null; - } - } - - public static URL getSystemResource(String path) { - return getSystemClassLoader().getResource(path); - } - - public static InputStream getSystemResourceAsStream(String path) { - return getSystemClassLoader().getResourceAsStream(path); - } - - public static Enumeration getSystemResources(String name) throws IOException { - return getSystemClassLoader().getResources(name); - } - - public Enumeration getResources(String name) - throws IOException { - Collection resources = collectResources(name); - return Collections.enumeration(resources); - } - - private Collection collectResources(String name) { - Collection urls = parent != null ? parent.collectResources(name) : new ArrayList(5); - URL url = findResource(name); - if (url != null) { - urls.add(url); - } - return urls; - } - - protected String findLibrary(String name) { - return null; - } - - static native Class getCaller(); - - static native void load(String name, Class caller, boolean mapName); -} diff --git a/sgx-jvm/avian/classpath/java/lang/ClassNotFoundException.java b/sgx-jvm/avian/classpath/java/lang/ClassNotFoundException.java deleted file mode 100644 index 9562f95d88..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ClassNotFoundException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class ClassNotFoundException extends Exception { - private final Throwable cause2; - - public ClassNotFoundException(String message, Throwable cause) { - super(message, cause); - cause2 = cause; - } - - public ClassNotFoundException(String message) { - this(message, null); - } - - public ClassNotFoundException() { - this(null, null); - } - - public Throwable getException() { - return cause2; - } - -} diff --git a/sgx-jvm/avian/classpath/java/lang/CloneNotSupportedException.java b/sgx-jvm/avian/classpath/java/lang/CloneNotSupportedException.java deleted file mode 100644 index b29f66a547..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/CloneNotSupportedException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class CloneNotSupportedException extends Exception { - public CloneNotSupportedException(String message) { - super(message); - } - - public CloneNotSupportedException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Cloneable.java b/sgx-jvm/avian/classpath/java/lang/Cloneable.java deleted file mode 100644 index 84e202c12e..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Cloneable.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public interface Cloneable { } diff --git a/sgx-jvm/avian/classpath/java/lang/Comparable.java b/sgx-jvm/avian/classpath/java/lang/Comparable.java deleted file mode 100644 index fdf345bb08..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Comparable.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public interface Comparable { - public int compareTo(T o); -} diff --git a/sgx-jvm/avian/classpath/java/lang/Deprecated.java b/sgx-jvm/avian/classpath/java/lang/Deprecated.java deleted file mode 100644 index b7e833d254..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Deprecated.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface Deprecated { } diff --git a/sgx-jvm/avian/classpath/java/lang/Double.java b/sgx-jvm/avian/classpath/java/lang/Double.java deleted file mode 100644 index ff224dd54e..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Double.java +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Double extends Number { - public static final Class TYPE = avian.Classes.forCanonicalName("D"); - - public static final double NEGATIVE_INFINITY = -1.0 / 0.0; - public static final double POSITIVE_INFINITY = 1.0 / 0.0; - public static final double NaN = 0.0 / 0.0; - - public static final double MIN_VALUE = 2.22507385850720138309e-308; - public static final double MAX_VALUE = 1.79769313486231570815e+308; - - private final double value; - - public Double(String value) { - this.value = parseDouble(value); - } - - public Double(double value) { - this.value = value; - } - - public static Double valueOf(double value) { - return new Double(value); - } - - public static Double valueOf(String s) { - return new Double(s); - } - - public boolean equals(Object o) { - return o instanceof Double && ((Double) o).value == value; - } - - public int hashCode() { - long v = doubleToRawLongBits(value); - return (int) ((v >> 32) ^ (v & 0xFF)); - } - - public String toString() { - return toString(value); - } - - public static String toString(double v) { - byte[] buffer = new byte[20]; - int numChars = fillBufferWithDouble(v, buffer, 20); - return new String(buffer, 0, numChars, false); - } - - public byte byteValue() { - return (byte) value; - } - - public short shortValue() { - return (short) value; - } - - public int intValue() { - return (int) value; - } - - public long longValue() { - return (long) value; - } - - public float floatValue() { - return (float) value; - } - - public double doubleValue() { - return value; - } - - public boolean isInfinite() { - return isInfinite(value); - } - - public boolean isNaN() { - return isNaN(value); - } - - public static double parseDouble(String s) { - int[] numRead = new int[1]; - double d = doubleFromString(s, numRead); - if (numRead[0] == 1) { - return d; - } else { - throw new NumberFormatException(s); - } - } - - public static long doubleToLongBits(double value) { - if (isNaN(value)) return 0x7ff8000000000000L; - return doubleToRawLongBits(value); - } - - public static native int fillBufferWithDouble(double value, byte[] buffer, - int charCount); - - public static native long doubleToRawLongBits(double value); - - public static native double longBitsToDouble(long bits); - - public static native boolean isInfinite(double value); - - public static native boolean isNaN(double value); - - public static native double doubleFromString(String s, int[] numRead); -} diff --git a/sgx-jvm/avian/classpath/java/lang/Enum.java b/sgx-jvm/avian/classpath/java/lang/Enum.java deleted file mode 100644 index 38ea903e5d..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Enum.java +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.lang.reflect.Method; - -public abstract class Enum> implements Comparable { - private final String name; - protected final int ordinal; - - public Enum(String name, int ordinal) { - this.name = name; - this.ordinal = ordinal; - } - - public int compareTo(E other) { - if (getDeclaringClass() != other.getDeclaringClass()) { - throw new ClassCastException(); - } - - return ordinal - other.ordinal; - } - - public static > T valueOf(Class enumType, String name) { - if (name == null) throw new NullPointerException("name"); - if (!enumType.isEnum()) - throw new IllegalArgumentException(enumType.getCanonicalName() + " is not an enum."); - - try { - Method method = enumType.getMethod("values"); - Enum values[] = (Enum[]) method.invoke(null); - for (Enum value: values) { - if (name.equals(value.name)) { - return (T) value; - } - } - } catch (Exception ex) { - // Cannot happen - throw new Error(ex); - } - - throw new IllegalArgumentException(enumType.getCanonicalName() + "." + name + " is not an enum constant."); - } - - public int ordinal() { - return ordinal; - } - - public final String name() { - return name; - } - - public String toString() { - return name; - } - - public Class getDeclaringClass() { - Class c = getClass(); - while (c.getSuperclass() != Enum.class) { - c = c.getSuperclass(); - } - return c; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Error.java b/sgx-jvm/avian/classpath/java/lang/Error.java deleted file mode 100644 index 8851c25979..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Error.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class Error extends Throwable { - public Error(String message, Throwable cause) { - super(message, cause); - } - - public Error(String message) { - this(message, null); - } - - public Error(Throwable cause) { - this(null, cause); - } - - public Error() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Exception.java b/sgx-jvm/avian/classpath/java/lang/Exception.java deleted file mode 100644 index 09bec5b62d..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Exception.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class Exception extends Throwable { - public Exception(String message, Throwable cause) { - super(message, cause); - } - - public Exception(String message) { - this(message, null); - } - - public Exception(Throwable cause) { - this(null, cause); - } - - public Exception() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ExceptionInInitializerError.java b/sgx-jvm/avian/classpath/java/lang/ExceptionInInitializerError.java deleted file mode 100644 index 4e56a2a1f6..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ExceptionInInitializerError.java +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class ExceptionInInitializerError extends Error { - private final Throwable exception; - - public ExceptionInInitializerError(String message) { - super(message); - exception = null; - } - - public ExceptionInInitializerError() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Float.java b/sgx-jvm/avian/classpath/java/lang/Float.java deleted file mode 100644 index 3bebc1079c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Float.java +++ /dev/null @@ -1,121 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Float extends Number { - public static final Class TYPE = avian.Classes.forCanonicalName("F"); - private static final int EXP_BIT_MASK = 0x7F800000; - private static final int SIGNIF_BIT_MASK = 0x007FFFFF; - - public static final float NEGATIVE_INFINITY = -1.0f / 0.0f; - public static final float POSITIVE_INFINITY = 1.0f / 0.0f; - public static final float NaN = 0.0f / 0.0f; - - public static final float MIN_VALUE = 1.17549435082228750797e-38f; - public static final float MAX_VALUE = 3.40282346638528859812e+38f; - - private final float value; - - public Float(String value) { - this.value = parseFloat(value); - } - - public Float(float value) { - this.value = value; - } - - public static Float valueOf(float value) { - return new Float(value); - } - - public static Float valueOf(String s) { - return new Float(s); - } - - public boolean equals(Object o) { - return o instanceof Float && ((Float) o).value == value; - } - - public int hashCode() { - return floatToRawIntBits(value); - } - - public String toString() { - return toString(value); - } - - public static String toString(float v) { - return Double.toString(v); - } - - public byte byteValue() { - return (byte) value; - } - - public short shortValue() { - return (short) value; - } - - public int intValue() { - return (int) value; - } - - public long longValue() { - return (long) value; - } - - public float floatValue() { - return value; - } - - public double doubleValue() { - return (double) value; - } - - public boolean isInfinite() { - return isInfinite(value); - } - - public boolean isNaN() { - return isNaN(value); - } - - public static float parseFloat(String s) { - int[] numRead = new int[1]; - float f = floatFromString(s, numRead); - if (numRead[0] == 1) { - return f; - } else { - throw new NumberFormatException(s); - } - } - - public static int floatToIntBits(float value) { - int result = floatToRawIntBits(value); - - // Check for NaN based on values of bit fields, maximum - // exponent and nonzero significand. - if (((result & EXP_BIT_MASK) == EXP_BIT_MASK) && (result & SIGNIF_BIT_MASK) != 0) { - result = 0x7fc00000; - } - return result; - } - - public static native int floatToRawIntBits(float value); - - public static native float intBitsToFloat(int bits); - - public static native boolean isInfinite(float value); - - public static native boolean isNaN(float value); - - public static native float floatFromString(String s, int[] numRead); -} diff --git a/sgx-jvm/avian/classpath/java/lang/IllegalAccessError.java b/sgx-jvm/avian/classpath/java/lang/IllegalAccessError.java deleted file mode 100644 index c53ba72f4d..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/IllegalAccessError.java +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -/** - * TODO : current Avian runtime doesn't check, need to be implemented. - * - */ -public class IllegalAccessError extends IncompatibleClassChangeError { - - public IllegalAccessError(String message) { - super(message); - } - - public IllegalAccessError() { - } - -} diff --git a/sgx-jvm/avian/classpath/java/lang/IllegalAccessException.java b/sgx-jvm/avian/classpath/java/lang/IllegalAccessException.java deleted file mode 100644 index e4205fb176..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/IllegalAccessException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class IllegalAccessException extends Exception { - public IllegalAccessException(String message) { - super(message); - } - - public IllegalAccessException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/IllegalArgumentException.java b/sgx-jvm/avian/classpath/java/lang/IllegalArgumentException.java deleted file mode 100644 index 124810a25c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/IllegalArgumentException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class IllegalArgumentException extends RuntimeException { - public IllegalArgumentException(String message, Throwable cause) { - super(message, cause); - } - - public IllegalArgumentException(String message) { - this(message, null); - } - - public IllegalArgumentException(Throwable cause) { - this(null, cause); - } - - public IllegalArgumentException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/IllegalMonitorStateException.java b/sgx-jvm/avian/classpath/java/lang/IllegalMonitorStateException.java deleted file mode 100644 index 31b65b587f..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/IllegalMonitorStateException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class IllegalMonitorStateException extends RuntimeException { - public IllegalMonitorStateException(String message) { - super(message, null); - } - - public IllegalMonitorStateException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/IllegalStateException.java b/sgx-jvm/avian/classpath/java/lang/IllegalStateException.java deleted file mode 100644 index 5374f35e4c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/IllegalStateException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class IllegalStateException extends RuntimeException { - public IllegalStateException(String message, Throwable cause) { - super(message, cause); - } - - public IllegalStateException(String message) { - this(message, null); - } - - public IllegalStateException(Throwable cause) { - this(null, cause); - } - - public IllegalStateException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/IllegalThreadStateException.java b/sgx-jvm/avian/classpath/java/lang/IllegalThreadStateException.java deleted file mode 100644 index 3defa035d7..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/IllegalThreadStateException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class IllegalThreadStateException extends IllegalArgumentException { - public IllegalThreadStateException(String message, Throwable cause) { - super(message, cause); - } - - public IllegalThreadStateException(String message) { - this(message, null); - } - - public IllegalThreadStateException(Throwable cause) { - this(null, cause); - } - - public IllegalThreadStateException() { - this(null, null); - } - -} diff --git a/sgx-jvm/avian/classpath/java/lang/IncompatibleClassChangeError.java b/sgx-jvm/avian/classpath/java/lang/IncompatibleClassChangeError.java deleted file mode 100644 index 3af1db4c88..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/IncompatibleClassChangeError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class IncompatibleClassChangeError extends LinkageError { - public IncompatibleClassChangeError(String message) { - super(message); - } - - public IncompatibleClassChangeError() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/IndexOutOfBoundsException.java b/sgx-jvm/avian/classpath/java/lang/IndexOutOfBoundsException.java deleted file mode 100644 index 35bbef659b..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/IndexOutOfBoundsException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class IndexOutOfBoundsException extends RuntimeException { - public IndexOutOfBoundsException(String message, Throwable cause) { - super(message, cause); - } - - public IndexOutOfBoundsException(String message) { - this(message, null); - } - - public IndexOutOfBoundsException(Throwable cause) { - this(null, cause); - } - - public IndexOutOfBoundsException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/InheritableThreadLocal.java b/sgx-jvm/avian/classpath/java/lang/InheritableThreadLocal.java deleted file mode 100644 index cf26eb07ad..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/InheritableThreadLocal.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.util.Map; - -public class InheritableThreadLocal extends ThreadLocal { - protected T childValue(T parentValue) { - return parentValue; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/InstantiationError.java b/sgx-jvm/avian/classpath/java/lang/InstantiationError.java deleted file mode 100644 index d659bfdfbd..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/InstantiationError.java +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -/** - * TODO : current Avian runtime doesn't check, need to be implemented. - * - */ -public class InstantiationError extends IncompatibleClassChangeError { - - public InstantiationError(String message) { - super(message); - } - - public InstantiationError() { - } - -} diff --git a/sgx-jvm/avian/classpath/java/lang/InstantiationException.java b/sgx-jvm/avian/classpath/java/lang/InstantiationException.java deleted file mode 100644 index 112484b9f4..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/InstantiationException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class InstantiationException extends Exception { - public InstantiationException(String message) { - super(message); - } - - public InstantiationException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Integer.java b/sgx-jvm/avian/classpath/java/lang/Integer.java deleted file mode 100644 index 3f48a91a9f..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Integer.java +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Integer extends Number implements Comparable { - public static final Class TYPE = avian.Classes.forCanonicalName("I"); - - public static final int MIN_VALUE = 0x80000000; - public static final int MAX_VALUE = 0x7FFFFFFF; - - private final int value; - - public Integer(int value) { - this.value = value; - } - - public Integer(String s) { - this.value = parseInt(s); - } - - public static Integer valueOf(int value) { - return new Integer(value); - } - - public static Integer valueOf(String value) { - return valueOf(parseInt(value)); - } - - public boolean equals(Object o) { - return o instanceof Integer && ((Integer) o).value == value; - } - - public int hashCode() { - return value; - } - - public int compareTo(Integer other) { - return value - other.value; - } - - public String toString() { - return toString(value); - } - - public static String toString(int v, int radix) { - return Long.toString(v, radix); - } - - public static String toString(int v) { - return toString(v, 10); - } - - public static String toHexString(int v) { - return Long.toString(((long) v) & 0xFFFFFFFFL, 16); - } - - public static String toOctalString(int v) { - return Long.toString(((long) v) & 0xFFFFFFFFL, 8); - } - - public static String toBinaryString(int v) { - return Long.toString(((long) v) & 0xFFFFFFFFL, 2); - } - - public byte byteValue() { - return (byte) value; - } - - public short shortValue() { - return (short) value; - } - - public int intValue() { - return value; - } - - public long longValue() { - return value; - } - - public float floatValue() { - return (float) value; - } - - public double doubleValue() { - return (double) value; - } - - public static int signum(int v) { - if (v == 0) return 0; - else if (v > 0) return 1; - else return -1; - } - - // See http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel - public static int bitCount(int v) { - v = v - ((v >> 1) & 0x55555555); - v = (v & 0x33333333) + ((v >> 2) & 0x33333333); - return ((v + (v >> 4) & 0xF0F0F0F) * 0x1010101) >> 24; - } - - public static int reverseBytes(int v) { - int byte3 = v >>> 24; - int byte2 = (v >>> 8) & 0xFF00; - int byte1 = (v << 8) & 0xFF00; - int byte0 = v << 24; - return (byte0 | byte1 | byte2 | byte3); - } - - public static int parseInt(String s) { - return parseInt(s, 10); - } - - public static int parseInt(String s, int radix) { - return (int) Long.parseLong(s, radix); - } - - public static Integer decode(String string) { - if (string.startsWith("-")) { - if (string.startsWith("-0") || string.startsWith("-#")) { - return new Integer(-decode(string.substring(1))); - } - } else if (string.startsWith("0")) { - char c = string.length() < 2 ? (char)-1 : string.charAt(1); - if (c == 'x' || c == 'X') { - return new Integer(parseInt(string.substring(2), 0x10)); - } - return new Integer(parseInt(string, 010)); - } else if (string.startsWith("#")) { - return new Integer(parseInt(string.substring(1), 0x10)); - } - return new Integer(parseInt(string, 10)); - } - - public static int numberOfLeadingZeros(int i) { - // See nlz5 at http://www.hackersdelight.org/hdcodetxt/nlz.c.txt - i |= i >> 1; - i |= i >> 2; - i |= i >> 4; - i |= i >> 8; - i |= i >> 16; - return bitCount(~i); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/InternalError.java b/sgx-jvm/avian/classpath/java/lang/InternalError.java deleted file mode 100644 index 69ac254db4..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/InternalError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class InternalError extends VirtualMachineError { - public InternalError(String message) { - super(message); - } - - public InternalError() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/InterruptedException.java b/sgx-jvm/avian/classpath/java/lang/InterruptedException.java deleted file mode 100644 index 9a4c0d8178..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/InterruptedException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class InterruptedException extends Exception { - public InterruptedException(String message, Throwable cause) { - super(message, cause); - } - - public InterruptedException(String message) { - this(message, null); - } - - public InterruptedException(Throwable cause) { - this(null, cause); - } - - public InterruptedException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Iterable.java b/sgx-jvm/avian/classpath/java/lang/Iterable.java deleted file mode 100644 index 4618e2ced7..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Iterable.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.util.Iterator; - -public interface Iterable { - public Iterator iterator(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/LinkageError.java b/sgx-jvm/avian/classpath/java/lang/LinkageError.java deleted file mode 100644 index 05313ffc1c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/LinkageError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class LinkageError extends Error { - public LinkageError(String message) { - super(message, null); - } - - public LinkageError() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Long.java b/sgx-jvm/avian/classpath/java/lang/Long.java deleted file mode 100644 index dda7ed1ed6..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Long.java +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Long extends Number implements Comparable { - public static final long MIN_VALUE = -9223372036854775808l; - public static final long MAX_VALUE = 9223372036854775807l; - - public static final Class TYPE = avian.Classes.forCanonicalName("J"); - - private final long value; - - public Long(long value) { - this.value = value; - } - - public Long(String s) { - this.value = parseLong(s); - } - - public static Long valueOf(String value) { - return new Long(value); - } - - public static Long valueOf(long value) { - return new Long(value); - } - - public int compareTo(Long o) { - return value > o.value ? 1 : (value < o.value ? -1 : 0); - } - - public boolean equals(Object o) { - return o instanceof Long && ((Long) o).value == value; - } - - public int hashCode() { - return (int) ((value >> 32) ^ (value & 0xFF)); - } - - public String toString() { - return String.valueOf(value); - } - - public static String toString(long v, int radix) { - if (radix < 1 || radix > 36) { - throw new IllegalArgumentException("radix " + radix + " not in [1,36]"); - } - - if (v == 0) { - return "0"; - } - - boolean negative = v < 0; - - int size = (negative ? 1 : 0); - for (long n = v; n != 0; n /= radix) ++size; - - char[] array = new char[size]; - - int i = size - 1; - for (long n = v; n != 0; n /= radix) { - long digit = n % radix; - if (negative) digit = -digit; - - if (digit >= 0 && digit <= 9) { - array[i] = (char) ('0' + digit); - } else { - array[i] = (char) ('a' + (digit - 10)); - } - --i; - } - - if (negative) { - array[i] = '-'; - } - - return new String(array, 0, size, false); - } - - public static String toString(long v) { - return toString(v, 10); - } - - public static String toHexString(long v) { - return toString(v, 16); - } - - public static String toOctalString(long v) { - return toString(v, 8); - } - - public static String toBinaryString(long v) { - return toString(v, 2); - } - - public byte byteValue() { - return (byte) value; - } - - public short shortValue() { - return (short) value; - } - - public int intValue() { - return (int) value; - } - - public long longValue() { - return value; - } - - public float floatValue() { - return (float) value; - } - - public double doubleValue() { - return (double) value; - } - - public static int signum(long v) { - if (v == 0) return 0; - else if (v > 0) return 1; - else return -1; - } - - private static long pow(long a, long b) { - long c = 1; - for (int i = 0; i < b; ++i) c *= a; - return c; - } - - public static long parseLong(String s) { - return parseLong(s, 10); - } - - public static long parseLong(String s, int radix) { - int i = 0; - long number = 0; - boolean negative = s.startsWith("-"); - int length = s.length(); - if (negative) { - i = 1; - -- length; - } - - long factor = pow(radix, length - 1); - for (; i < s.length(); ++i) { - char c = s.charAt(i); - int digit = Character.digit(c, radix); - if (digit >= 0) { - number += digit * factor; - factor /= radix; - } else { - throw new NumberFormatException("invalid character " + c + " code " + - (int) c); - } - } - - if (negative) { - number = -number; - } - - return number; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Math.java b/sgx-jvm/avian/classpath/java/lang/Math.java deleted file mode 100644 index 7c12b47c23..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Math.java +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.util.Random; - -public final class Math { - public static final double E = 2.718281828459045; - public static final double PI = 3.141592653589793; - - private Math() { } - - public static double max(double a, double b) { - return (a < b ? b : a); - } - - public static double min(double a, double b) { - return (a > b ? b : a); - } - - public static float max(float a, float b) { - return (a < b ? b : a); - } - - public static float min(float a, float b) { - return (a > b ? b : a); - } - - public static long max(long a, long b) { - return (a < b ? b : a); - } - - public static long min(long a, long b) { - return (a > b ? b : a); - } - - public static int max(int a, int b) { - return (a < b ? b : a); - } - - public static int min(int a, int b) { - return (a > b ? b : a); - } - - public static int abs(int v) { - return (v < 0 ? -v : v); - } - - public static long abs(long v) { - return (v < 0 ? -v : v); - } - - public static float abs(float v) { - return (v < 0 ? -v : v); - } - - public static double abs(double v) { - return (v < 0 ? -v : v); - } - - public static long round(double v) { - return (long) Math.floor(v + 0.5); - } - - public static int round(float v) { - return (int) Math.floor(v + 0.5); - } - - public static double signum(double d) { - return d > 0 ? +1.0 : d < 0 ? -1.0 : 0; - } - - public static float signum(float f) { - return f > 0 ? +1.0f : f < 0 ? -1.0f : 0; - } - - public static native double floor(double v); - - public static native double ceil(double v); - - public static native double exp(double v); - - public static native double log(double v); - - public static native double cos(double v); - - public static native double sin(double v); - - public static native double tan(double v); - - public static native double cosh(double v); - - public static native double sinh(double v); - - public static native double tanh(double v); - - public static native double acos(double v); - - public static native double asin(double v); - - public static native double atan(double v); - - public static native double atan2(double y, double x); - - public static native double sqrt(double v); - - public static native double pow(double v, double e); -} diff --git a/sgx-jvm/avian/classpath/java/lang/NegativeArraySizeException.java b/sgx-jvm/avian/classpath/java/lang/NegativeArraySizeException.java deleted file mode 100644 index a51048ad1b..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/NegativeArraySizeException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class NegativeArraySizeException extends RuntimeException { - public NegativeArraySizeException(String message) { - super(message); - } - - public NegativeArraySizeException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/NoClassDefFoundError.java b/sgx-jvm/avian/classpath/java/lang/NoClassDefFoundError.java deleted file mode 100644 index 1b01a3b150..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/NoClassDefFoundError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class NoClassDefFoundError extends LinkageError { - public NoClassDefFoundError(String message) { - super(message); - } - - public NoClassDefFoundError() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/NoSuchFieldError.java b/sgx-jvm/avian/classpath/java/lang/NoSuchFieldError.java deleted file mode 100644 index 1fde5606c6..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/NoSuchFieldError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class NoSuchFieldError extends IncompatibleClassChangeError { - public NoSuchFieldError(String message) { - super(message); - } - - public NoSuchFieldError() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/NoSuchFieldException.java b/sgx-jvm/avian/classpath/java/lang/NoSuchFieldException.java deleted file mode 100644 index 1323172b7b..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/NoSuchFieldException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class NoSuchFieldException extends Exception { - public NoSuchFieldException(String message) { - super(message); - } - - public NoSuchFieldException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/NoSuchMethodError.java b/sgx-jvm/avian/classpath/java/lang/NoSuchMethodError.java deleted file mode 100644 index 0bf772a3fb..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/NoSuchMethodError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class NoSuchMethodError extends IncompatibleClassChangeError { - public NoSuchMethodError(String message) { - super(message); - } - - public NoSuchMethodError() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/NoSuchMethodException.java b/sgx-jvm/avian/classpath/java/lang/NoSuchMethodException.java deleted file mode 100644 index 63e1fb9ddc..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/NoSuchMethodException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class NoSuchMethodException extends Exception { - public NoSuchMethodException(String message) { - super(message); - } - - public NoSuchMethodException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/NullPointerException.java b/sgx-jvm/avian/classpath/java/lang/NullPointerException.java deleted file mode 100644 index ba4c87c365..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/NullPointerException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class NullPointerException extends RuntimeException { - public NullPointerException(String message, Throwable cause) { - super(message, cause); - } - - public NullPointerException(String message) { - this(message, null); - } - - public NullPointerException(Throwable cause) { - this(null, cause); - } - - public NullPointerException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Number.java b/sgx-jvm/avian/classpath/java/lang/Number.java deleted file mode 100644 index bbfff3a72e..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Number.java +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.io.Serializable; - -public abstract class Number implements Serializable { - public abstract byte byteValue(); - public abstract short shortValue(); - public abstract int intValue(); - public abstract long longValue(); - public abstract float floatValue(); - public abstract double doubleValue(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/NumberFormatException.java b/sgx-jvm/avian/classpath/java/lang/NumberFormatException.java deleted file mode 100644 index 9b38d55a09..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/NumberFormatException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class NumberFormatException extends IllegalArgumentException { - public NumberFormatException(String message) { - super(message); - } - - public NumberFormatException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Object.java b/sgx-jvm/avian/classpath/java/lang/Object.java deleted file mode 100644 index 6c0710fa0d..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Object.java +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class Object { - protected Object clone() throws CloneNotSupportedException { - if ((this instanceof Cloneable) || getClass().isArray()) { - return clone(this); - } else { - throw new CloneNotSupportedException(getClass().getName()); - } - } - - private static native Object clone(Object o); - - public boolean equals(Object o) { - return this == o; - } - - protected void finalize() throws Throwable { } - - public final Class getClass() { - return avian.SystemClassLoader.getClass(getVMClass()); - } - - native avian.VMClass getVMClass(); - - public native int hashCode(); - - public native final void notify(); - - public native final void notifyAll(); - - public native String toString(); - - public final void wait() throws InterruptedException { - wait(0); - } - - public native final void wait(long milliseconds) throws InterruptedException; - - public final void wait(long milliseconds, int nanoseconds) - throws InterruptedException - { - if (nanoseconds != 0) { - ++ milliseconds; - } - wait(milliseconds); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/OutOfMemoryError.java b/sgx-jvm/avian/classpath/java/lang/OutOfMemoryError.java deleted file mode 100644 index 3dc9830b3c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/OutOfMemoryError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class OutOfMemoryError extends VirtualMachineError { - public OutOfMemoryError(String message) { - super(message); - } - - public OutOfMemoryError() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Override.java b/sgx-jvm/avian/classpath/java/lang/Override.java deleted file mode 100644 index 78161ff9a8..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Override.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public @interface Override { - -} diff --git a/sgx-jvm/avian/classpath/java/lang/Package.java b/sgx-jvm/avian/classpath/java/lang/Package.java deleted file mode 100644 index f982d48caf..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Package.java +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.net.URL; - -public class Package { - private final String name; - private final String implementationTitle; - private final String implementationVendor; - private final String implementationVersion; - private final String specificationTitle; - private final String specificationVendor; - private final String specificationVersion; - private final URL sealed; - private final ClassLoader loader; - - Package(String name, - String implementationTitle, - String implementationVendor, - String implementationVersion, - String specificationTitle, - String specificationVendor, - String specificationVersion, - URL sealed, - ClassLoader loader) - { - this.name = name; - this.implementationTitle = implementationTitle; - this.implementationVendor = implementationVendor; - this.implementationVersion = implementationVersion; - this.specificationTitle = specificationTitle; - this.specificationVendor = specificationVendor; - this.specificationVersion = specificationVersion; - this.sealed = sealed; - this.loader = loader; - } - - public String getName() { - return name; - } - - public String getImplementationTitle() { - return implementationTitle; - } - - public String getImplementationVendor() { - return implementationVendor; - } - - public String getImplementationVersion() { - return implementationVersion; - } - - public String getSpecificationTitle() { - return specificationTitle; - } - - public String getSpecificationVendor() { - return specificationVendor; - } - - public String getSpecificationVersion() { - return specificationVersion; - } - - public boolean isSealed() { - return sealed != null; - } - - public boolean isSealed(URL url) { - return sealed.equals(url); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Process.java b/sgx-jvm/avian/classpath/java/lang/Process.java deleted file mode 100644 index 12f3f550c3..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Process.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.io.InputStream; -import java.io.OutputStream; - -public abstract class Process { - public abstract void destroy(); - - public abstract int exitValue(); - - public abstract InputStream getInputStream(); - - public abstract OutputStream getOutputStream(); - - public abstract InputStream getErrorStream(); - - public abstract int waitFor() throws InterruptedException; -} diff --git a/sgx-jvm/avian/classpath/java/lang/Readable.java b/sgx-jvm/avian/classpath/java/lang/Readable.java deleted file mode 100644 index f54e4d95ce..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Readable.java +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.nio.CharBuffer; -import java.io.IOException; - -public interface Readable { - int read(CharBuffer buffer) throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/lang/ReflectiveOperationException.java b/sgx-jvm/avian/classpath/java/lang/ReflectiveOperationException.java deleted file mode 100644 index add39584e0..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ReflectiveOperationException.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class ReflectiveOperationException extends Exception { } diff --git a/sgx-jvm/avian/classpath/java/lang/Runnable.java b/sgx-jvm/avian/classpath/java/lang/Runnable.java deleted file mode 100644 index ef186d197c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Runnable.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public interface Runnable { - public void run(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/Runtime.java b/sgx-jvm/avian/classpath/java/lang/Runtime.java deleted file mode 100644 index e73d74b35b..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Runtime.java +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.io.IOException; -import java.io.InputStream; -import java.io.FileInputStream; -import java.io.OutputStream; -import java.io.FileOutputStream; -import java.io.FileDescriptor; -import java.util.StringTokenizer; - -public class Runtime { - private static final Runtime instance = new Runtime(); - - private Runtime() { } - - public static Runtime getRuntime() { - return instance; - } - - public void load(String path) { - if (path != null) { - ClassLoader.load(path, ClassLoader.getCaller(), false); - } else { - throw new NullPointerException(); - } - } - - public void loadLibrary(String path) { - if (path != null) { - ClassLoader.load(path, ClassLoader.getCaller(), true); - } else { - throw new NullPointerException(); - } - } - - public Process exec(String command) throws IOException { - StringTokenizer t = new StringTokenizer(command); - String[] cmd = new String[t.countTokens()]; - for (int i = 0; i < cmd.length; i++) - cmd[i] = t.nextToken(); - - return exec(cmd); - } - - public Process exec(final String[] command) throws IOException { - final MyProcess[] process = new MyProcess[1]; - final Throwable[] exception = new Throwable[1]; - - synchronized (process) { - Thread t = new Thread() { - public void run() { - synchronized (process) { - try { - long[] info = new long[5]; - exec(command, info); - process[0] = new MyProcess - (info[0], info[1], (int) info[2], (int) info[3], - (int) info[4]); - } catch (Throwable e) { - exception[0] = e; - } finally { - process.notifyAll(); - } - } - - MyProcess p = process[0]; - if (p != null) { - synchronized (p) { - try { - if (p.pid != 0) { - p.exitCode = Runtime.waitFor(p.pid, p.tid); - p.pid = 0; - p.tid = 0; - } - } finally { - p.notifyAll(); - } - } - } - } - }; - t.setDaemon(true); - t.start(); - - while (process[0] == null && exception[0] == null) { - try { - process.wait(); - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - } - } - - if (exception[0] != null) { - if (exception[0] instanceof IOException) { - String message = "Failed to run \"" + command[0] + "\": " + exception[0].getMessage(); - throw new IOException(message); - } else { - throw new RuntimeException(exception[0]); - } - } - - return process[0]; - } - - public native void addShutdownHook(Thread t); - - private static native void exec(String[] command, long[] process) - throws IOException; - - private static native int waitFor(long pid, long tid); - - private static native void kill(long pid); - - public native void gc(); - - public native void exit(int code); - - public native long freeMemory(); - - public native long totalMemory(); - - public native long maxMemory(); - - private static class MyProcess extends Process { - private long pid; - private long tid; - private final int in; - private final int out; - private final int err; - private int exitCode; - - public MyProcess(long pid, long tid, int in, int out, int err) { - this.pid = pid; - this.tid = tid; - this.in = in; - this.out = out; - this.err = err; - } - - public void destroy() { - if (pid != 0) { - kill(pid); - } - } - - public InputStream getInputStream() { - return new FileInputStream(new FileDescriptor(in)); - } - - public OutputStream getOutputStream() { - return new FileOutputStream(new FileDescriptor(out)); - } - - public InputStream getErrorStream() { - return new FileInputStream(new FileDescriptor(err)); - } - - public synchronized int exitValue() { - if (pid != 0) { - throw new IllegalThreadStateException(); - } - - return exitCode; - } - - public synchronized int waitFor() throws InterruptedException { - while (pid != 0) { - wait(); - } - - return exitCode; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/RuntimeException.java b/sgx-jvm/avian/classpath/java/lang/RuntimeException.java deleted file mode 100644 index 8eb8ecffb5..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/RuntimeException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class RuntimeException extends Exception { - public RuntimeException(String message, Throwable cause) { - super(message, cause); - } - - public RuntimeException(String message) { - this(message, null); - } - - public RuntimeException(Throwable cause) { - this(null, cause); - } - - public RuntimeException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/RuntimePermission.java b/sgx-jvm/avian/classpath/java/lang/RuntimePermission.java deleted file mode 100644 index b61e22eff9..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/RuntimePermission.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.security.BasicPermission; - -public class RuntimePermission extends BasicPermission { - - public RuntimePermission(String name) { - super(name); - } - -} diff --git a/sgx-jvm/avian/classpath/java/lang/SecurityException.java b/sgx-jvm/avian/classpath/java/lang/SecurityException.java deleted file mode 100644 index af0fa9612f..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/SecurityException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class SecurityException extends RuntimeException { - public SecurityException(String message, Throwable cause) { - super(message, cause); - } - - public SecurityException(String message) { - this(message, null); - } - - public SecurityException(Throwable cause) { - this(null, cause); - } - - public SecurityException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/SecurityManager.java b/sgx-jvm/avian/classpath/java/lang/SecurityManager.java deleted file mode 100644 index 29c6b65f74..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/SecurityManager.java +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.security.AccessController; -import java.security.Permission; -import java.security.SecurityPermission; - -public class SecurityManager { - - public SecurityManager() { - } - - public void checkPermission(Permission perm) { - AccessController.checkPermission(perm); - } - - public void checkSecurityAccess(String target) { - checkPermission(new SecurityPermission(target)); - } - -} diff --git a/sgx-jvm/avian/classpath/java/lang/Short.java b/sgx-jvm/avian/classpath/java/lang/Short.java deleted file mode 100644 index 409eae36c4..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Short.java +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Short extends Number implements Comparable { - public static final Class TYPE = avian.Classes.forCanonicalName("S"); - - public static final short MIN_VALUE = -32768; - public static final short MAX_VALUE = 32767; - - private final short value; - - public Short(short value) { - this.value = value; - } - - public static Short valueOf(short value) { - return new Short(value); - } - - public int compareTo(Short o) { - return value - o.value; - } - - public boolean equals(Object o) { - return o instanceof Short && ((Short) o).value == value; - } - - public int hashCode() { - return value; - } - - public String toString() { - return toString(value); - } - - public static String toString(short v, int radix) { - return Long.toString(v, radix); - } - - public static String toString(short v) { - return toString(v, 10); - } - - public byte byteValue() { - return (byte) value; - } - - public short shortValue() { - return value; - } - - public int intValue() { - return value; - } - - public long longValue() { - return value; - } - - public float floatValue() { - return (float) value; - } - - public double doubleValue() { - return (double) value; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/StackOverflowError.java b/sgx-jvm/avian/classpath/java/lang/StackOverflowError.java deleted file mode 100644 index 9bb536e681..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/StackOverflowError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class StackOverflowError extends VirtualMachineError { - public StackOverflowError(String message) { - super(message); - } - - public StackOverflowError() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/StackTraceElement.java b/sgx-jvm/avian/classpath/java/lang/StackTraceElement.java deleted file mode 100644 index 25b6e57afd..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/StackTraceElement.java +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class StackTraceElement { - private static int NativeLine = -1; - - private String class_; - private String method; - private String file; - private int line; - - public StackTraceElement(String class_, String method, String file, - int line) - { - this.class_ = class_; - this.method = method; - this.file = file; - this.line = line; - } - - public int hashCode() { - return class_.hashCode() ^ method.hashCode() ^ line; - } - - public boolean equals(Object o) { - if (o instanceof StackTraceElement) { - StackTraceElement e = (StackTraceElement) o; - return class_.equals(e.class_) - && method.equals(e.method) - && line == e.line; - } else { - return false; - } - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(class_).append(".").append(method); - - if (line == NativeLine) { - sb.append(" (native)"); - } else if (line >= 0) { - sb.append(" (line ").append(line).append(")"); - } - - return sb.toString(); - } - - public String getClassName() { - return class_; - } - - public String getMethodName() { - return method; - } - - public String getFileName() { - return file; - } - - public int getLineNumber() { - return line; - } - - public boolean isNativeMethod() { - return line == NativeLine; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/String.java b/sgx-jvm/avian/classpath/java/lang/String.java deleted file mode 100644 index be45b3c464..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/String.java +++ /dev/null @@ -1,698 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.io.Serializable; -import java.io.UnsupportedEncodingException; -import java.util.Comparator; -import java.util.Formatter; -import java.util.Locale; -import java.util.regex.Pattern; - -import avian.Iso88591; -import avian.Utf8; - -public final class String - implements Comparable, CharSequence, Serializable -{ - private static final String UTF_8_ENCODING = "UTF-8"; - private static final String ISO_8859_1_ENCODING = "ISO-8859-1"; - private static final String LATIN_1_ENCODING = "LATIN-1"; - private static final String DEFAULT_ENCODING = UTF_8_ENCODING; - - public static Comparator CASE_INSENSITIVE_ORDER - = new Comparator() { - @Override - public int compare(String a, String b) { - return a.compareToIgnoreCase(b); - } - }; - - private final Object data; - private final int offset; - private final int length; - private int hashCode; - - public String() { - this(new char[0], 0, 0); - } - - public String(char[] data, int offset, int length, boolean copy) { - this((Object) data, offset, length, copy); - } - - public String(char[] data, int offset, int length) { - this(data, offset, length, true); - } - - public String(char[] data) { - this(data, 0, data.length); - } - - public String(byte bytes[], int offset, int length, String charsetName) - throws UnsupportedEncodingException - { - this(bytes, offset, length); - if (! (charsetName.equalsIgnoreCase(UTF_8_ENCODING) - || charsetName.equalsIgnoreCase(ISO_8859_1_ENCODING))) - { - throw new UnsupportedEncodingException(charsetName); - } - } - - public String(byte[] data, int offset, int length, boolean copy) { - this((Object) data, offset, length, copy); - } - - public String(byte[] data, int offset, int length) { - this(data, offset, length, true); - } - - public String(byte[] data) { - this(data, 0, data.length); - } - - public String(String s) { - this(s.toCharArray()); - } - - public String(byte[] data, String charset) - throws UnsupportedEncodingException - { - this(data, 0, data.length, charset); - } - - public String(byte bytes[], int highByte, int offset, int length) { - if (offset < 0 ) - throw new StringIndexOutOfBoundsException(offset); - else if (offset + length > bytes.length) - throw new StringIndexOutOfBoundsException(offset + length); - else if (length < 0) - throw new StringIndexOutOfBoundsException(length); - - char[] c = new char[length]; - int mask = highByte << 8; - for (int i = 0; i < length; ++i) { - c[i] = (char) ((bytes[offset + i] & 0xFF) | mask); - } - - this.data = c; - this.offset = 0; - this.length = length; - } - - private String(Object data, int offset, int length, boolean copy) { - int l; - if (data instanceof char[]) { - l = ((char[]) data).length; - } else { - l = ((byte[]) data).length; - } - - if (offset < 0 ) - throw new StringIndexOutOfBoundsException(offset); - else if (offset + length > l) - throw new StringIndexOutOfBoundsException(offset + length); - else if (length < 0) - throw new StringIndexOutOfBoundsException(length); - - if(!copy && Utf8.test(data)) copy = true; - - if (copy) { - Object c; - if (data instanceof char[]) { - c = new char[length]; - System.arraycopy(data, offset, c, 0, length); - } else { - c = Utf8.decode((byte[])data, offset, length); - if(c instanceof char[]) length = ((char[])c).length; - if (c == null) { - throw new RuntimeException - ("unable to parse \"" + new String(data, offset, length, false) - + "\""); - } - } - - this.data = c; - this.offset = 0; - this.length = length; - } else { - this.data = data; - this.offset = offset; - this.length = length; - } - } - - @Override - public String toString() { - return this; - } - - @Override - public int length() { - return length; - } - - @Override - public int hashCode() { - if (hashCode == 0) { - int h = 0; - for (int i = 0; i < length; ++i) h = (h * 31) + charAt(i); - hashCode = h; - } - return hashCode; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } else if (o instanceof String) { - String s = (String) o; - return s.length == length && compareTo(s) == 0; - } else { - return false; - } - } - - public boolean equalsIgnoreCase(String s) { - if (this == s) { - return true; - } else { - return s != null && s.length == length && compareToIgnoreCase(s) == 0; - } - } - - @Override - public int compareTo(String s) { - if (this == s) return 0; - - int idx = 0; - int result; - - int end = (length < s.length ? length : s.length); - - while (idx < end) { - if ((result = charAt(idx) - s.charAt(idx)) != 0) { - return result; - } - idx++; - } - return length - s.length; - } - - public int compareToIgnoreCase(String s) { - if (this == s) return 0; - - int idx = 0; - int result; - - int end = (length < s.length ? length : s.length); - - while (idx < end) { - if ((result = - Character.toLowerCase(charAt(idx)) - - Character.toLowerCase(s.charAt(idx))) != 0) { - return result; - } - idx++; - } - return length - s.length; - } - - public String trim() { - int start = -1; - for (int i = 0; i < length; ++i) { - char c = charAt(i); - if (start == -1 && ! Character.isWhitespace(c)) { - start = i; - break; - } - } - - int end = -1; - for (int i = length - 1; i >= 0; --i) { - char c = charAt(i); - if (end == -1 && ! Character.isWhitespace(c)) { - end = i + 1; - break; - } - } - - if (start >= end) { - return ""; - } else { - return substring(start, end); - } - } - - public String toLowerCase() { - for (int j = 0; j < length; ++j) { - char ch = charAt(j); - if (Character.toLowerCase(ch) != ch) { - char[] b = new char[length]; - for (int i = 0; i < length; ++i) { - b[i] = Character.toLowerCase(charAt(i)); - } - return new String(b, 0, length, false); - } - } - return this; - } - - public String toUpperCase() { - for (int j = 0; j < length; ++j) { - char ch = charAt(j); - if (Character.toUpperCase(ch) != ch) { - char[] b = new char[length]; - for (int i = 0; i < length; ++i) { - b[i] = Character.toUpperCase(charAt(i)); - } - return new String(b, 0, length, false); - } - } - return this; - } - - public int indexOf(int c) { - return indexOf(c, 0); - } - - public int indexOf(int c, int start) { - for (int i = start; i < length; ++i) { - if (charAt(i) == c) { - return i; - } - } - - return -1; - } - - public int lastIndexOf(int ch) { - return lastIndexOf(ch, length-1); - } - - public int indexOf(String s) { - return indexOf(s, 0); - } - - public int indexOf(String s, int start) { - if (s.length == 0) return start; - - for (int i = start; i < length - s.length + 1; ++i) { - int j = 0; - for (; j < s.length; ++j) { - if (charAt(i + j) != s.charAt(j)) { - break; - } - } - if (j == s.length) { - return i; - } - } - - return -1; - } - - public int lastIndexOf(String s) { - return lastIndexOf(s, length - s.length); - } - - public int lastIndexOf(String s, int lastIndex) { - if (s.length == 0) return lastIndex; - - for (int i = Math.min(length - s.length, lastIndex); i >= 0; --i) { - int j = 0; - for (; j < s.length && i + j < length; ++j) { - if (charAt(i + j) != s.charAt(j)) { - break; - } - } - if (j == s.length) { - return i; - } - } - - return -1; - } - - public String replace(char oldChar, char newChar) { - if (data instanceof char[]) { - char[] buf = new char[length]; - for (int i=0; i < length; i++) { - if (charAt(i) == oldChar) { - buf[i] = newChar; - } else { - buf[i] = charAt(i); - } - } - return new String(buf, 0, length, false); - } else { - byte[] buf = new byte[length]; - byte[] orig = (byte[])data; - byte oldByte = (byte)oldChar; - byte newByte = (byte)newChar; - for (int i=0; i < length; i++) { - if (orig[i+offset] == oldByte) { - buf[i] = newByte; - } else { - buf[i] = orig[i+offset]; - } - } - return new String(buf, 0, length, false); - } - } - - public String substring(int start) { - return substring(start, length); - } - - public String substring(int start, int end) { - if (start < 0) - throw new StringIndexOutOfBoundsException(start); - else if (end > length) - throw new StringIndexOutOfBoundsException(end); - int newLen = end - start; - if (newLen < 0) - throw new StringIndexOutOfBoundsException(newLen); - - if (start == 0 && end == length) - return this; - else if (end - start == 0) - return ""; - else - return new String(data, offset + start, newLen, false); - } - - public boolean startsWith(String s) { - if (length >= s.length) { - return substring(0, s.length).compareTo(s) == 0; - } else { - return false; - } - } - - public boolean startsWith(String s, int start) { - if (length >= s.length + start) { - return substring(start, s.length).compareTo(s) == 0; - } else { - return false; - } - } - - public boolean endsWith(String s) { - if (length >= s.length) { - return substring(length - s.length).compareTo(s) == 0; - } else { - return false; - } - } - - public String concat(String s) { - if (s.length() == 0) { - return this; - } else { - return this + s; - } - } - - public void getBytes(int srcOffset, int srcLength, - byte[] dst, int dstOffset) - { - if (srcOffset < 0) - throw new StringIndexOutOfBoundsException(srcOffset); - else if (srcOffset + srcLength > length) - throw new StringIndexOutOfBoundsException(srcOffset + srcLength); - else if (srcLength < 0) - throw new StringIndexOutOfBoundsException(srcLength); - - if (data instanceof char[]) { - char[] src = (char[]) data; - for (int i = 0; i < srcLength; ++i) { - dst[i + dstOffset] = (byte) src[i + offset + srcOffset]; - } - } else { - byte[] src = (byte[]) data; - System.arraycopy(src, offset + srcOffset, dst, dstOffset, srcLength); - } - } - - public byte[] getBytes() { - try { - return getBytes(DEFAULT_ENCODING); - } catch (java.io.UnsupportedEncodingException ex) { - throw new RuntimeException( - "Default '" + DEFAULT_ENCODING + "' encoding not handled", ex); - } - } - - public byte[] getBytes(String format) - throws java.io.UnsupportedEncodingException - { - if(data instanceof byte[]) { - byte[] b = new byte[length]; - getBytes(0, length, b, 0); - return b; - } - String fmt = format.trim().toUpperCase(); - if (DEFAULT_ENCODING.equals(fmt)) { - return Utf8.encode((char[])data, offset, length); - } else if (ISO_8859_1_ENCODING.equals(fmt) || LATIN_1_ENCODING.equals(fmt)) { - return Iso88591.encode((char[])data, offset, length); - } else { - throw new java.io.UnsupportedEncodingException( - "Encoding " + format + " not supported"); - } - } - - public void getChars(int srcOffset, int srcEnd, - char[] dst, int dstOffset) - { - if (srcOffset < 0) - throw new StringIndexOutOfBoundsException(srcOffset); - else if (srcEnd > length) - throw new StringIndexOutOfBoundsException(srcEnd); - - int srcLength = srcEnd-srcOffset; - if (data instanceof char[]) { - char[] src = (char[]) data; - System.arraycopy(src, offset + srcOffset, dst, dstOffset, srcLength); - } else { - byte[] src = (byte[]) data; - for (int i = 0; i < srcLength; ++i) { - dst[i + dstOffset] = (char) src[i + offset + srcOffset]; - } - } - } - - public char[] toCharArray() { - char[] b = new char[length]; - getChars(0, length, b, 0); - return b; - } - - @Override - public char charAt(int index) { - if (index < 0 || index > length) { - throw new StringIndexOutOfBoundsException(index); - } - - if (data instanceof char[]) { - return ((char[]) data)[index + offset]; - } else { - return (char) ((byte[]) data)[index + offset]; - } - } - - public String[] split(String regex) { - return split(regex, 0); - } - - public String[] split(String regex, int limit) { - return Pattern.compile(regex).split(this, limit); - } - - @Override - public CharSequence subSequence(int start, int end) { - return substring(start, end); - } - - public boolean matches(String regex) { - return Pattern.matches(regex, this); - } - - public String replaceFirst(String regex, String replacement) { - return Pattern.compile(regex).matcher(this).replaceFirst(replacement); - } - - public String replaceAll(String regex, String replacement) { - return Pattern.compile(regex).matcher(this).replaceAll(replacement); - } - - public String replace(CharSequence target, CharSequence replace) { - if (target.length() == 0) { - return this.infuse(replace.toString()); - } - - String targetString = target.toString(); - String replaceString = replace.toString(); - - int targetSize = target.length(); - - StringBuilder returnValue = new StringBuilder(); - String unhandled = this; - - int index = -1; - while ((index = unhandled.indexOf(targetString)) != -1) { - returnValue.append(unhandled.substring(0, index)).append(replaceString); - unhandled = unhandled.substring(index + targetSize, - unhandled.length()); - } - - returnValue.append(unhandled); - return returnValue.toString(); - } - - private String infuse(String infuseWith) { - StringBuilder retVal = new StringBuilder(); - - String me = this; - for (int i = 0; i < me.length(); i++) { - retVal.append(infuseWith).append(me.substring(i, i + 1)); - } - - retVal.append(infuseWith); - return retVal.toString(); - } - - public native String intern(); - - public static String format(String fmt, Object... args) { - final Formatter formatter = new Formatter(); - final String result = formatter.format(fmt, args).toString(); - formatter.close(); - return result; - } - - public static String format(Locale l, String fmt, Object... args) { - final Formatter formatter = new Formatter(); - final String result = formatter.format(l, fmt, args).toString(); - formatter.close(); - return result; - } - - public static String valueOf(Object s) { - return s == null ? "null" : s.toString(); - } - - public static String valueOf(boolean v) { - return Boolean.toString(v); - } - - public static String valueOf(byte v) { - return Byte.toString(v); - } - - public static String valueOf(short v) { - return Short.toString(v); - } - - public static String valueOf(char v) { - return Character.toString(v); - } - - public static String valueOf(int v) { - return Integer.toString(v); - } - - public static String valueOf(long v) { - return Long.toString(v); - } - - public static String valueOf(float v) { - return Float.toString(v); - } - - public static String valueOf(double v) { - return Double.toString(v); - } - - public static String valueOf(char[] data, int offset, int length) { - return new String(data, offset, length); - } - - public static String valueOf(char[] data) { - return valueOf(data, 0, data.length); - } - - public int lastIndexOf(int ch, int lastIndex) { - if (lastIndex >= length) { - lastIndex = length - 1; - } - for (int i = lastIndex ; i >= 0; --i) { - if (charAt(i) == ch) { - return i; - } - } - - return -1; - } - - public boolean regionMatches(int thisOffset, String match, int matchOffset, - int length) - { - return regionMatches(false, thisOffset, match, matchOffset, length); - } - - public boolean regionMatches(boolean ignoreCase, int thisOffset, - String match, int matchOffset, int length) - { - String a = substring(thisOffset, thisOffset + length); - String b = match.substring(matchOffset, matchOffset + length); - if (ignoreCase) { - return a.equalsIgnoreCase(b); - } else { - return a.equals(b); - } - } - - public boolean isEmpty() { - return length == 0; - } - - public boolean contains(CharSequence match) { - return indexOf(match.toString()) != -1; - } - - public int codePointAt(int offset) { - return Character.codePointAt(this, offset); - } - - public int codePointCount(int start, int end) { - return Character.codePointCount(this, start, end); - } - - public String toUpperCase(Locale locale) { - if (locale == Locale.ENGLISH) { - return toUpperCase(); - } else { - throw new UnsupportedOperationException("toUpperCase("+locale+')'); - } - } - - public String toLowerCase(Locale locale) { - if (locale == Locale.ENGLISH) { - return toLowerCase(); - } else { - throw new UnsupportedOperationException("toLowerCase("+locale+')'); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/StringBuffer.java b/sgx-jvm/avian/classpath/java/lang/StringBuffer.java deleted file mode 100644 index 66ff1051ae..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/StringBuffer.java +++ /dev/null @@ -1,159 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class StringBuffer implements CharSequence { - private final StringBuilder sb; - - public StringBuffer(String s) { - sb = new StringBuilder(s); - } - - public StringBuffer(int capacity) { - sb = new StringBuilder(capacity); - } - - public StringBuffer() { - this(0); - } - - public synchronized StringBuffer append(String s) { - sb.append(s); - return this; - } - - public synchronized StringBuffer append(CharSequence s) { - sb.append(s); - return this; - } - - public synchronized StringBuffer append(StringBuffer s) { - sb.append(s); - return this; - } - - public synchronized StringBuffer append(Object o) { - sb.append(o); - return this; - } - - public synchronized StringBuffer append(char v) { - sb.append(v); - return this; - } - - public synchronized StringBuffer append(boolean v) { - sb.append(v); - return this; - } - - public synchronized StringBuffer append(int v) { - sb.append(v); - return this; - } - - public synchronized StringBuffer append(long v) { - sb.append(v); - return this; - } - - public synchronized StringBuffer append(float v) { - sb.append(v); - return this; - } - - public synchronized StringBuffer append(double v) { - sb.append(v); - return this; - } - - public synchronized StringBuffer append(char[] b, int offset, int length) { - sb.append(b, offset, length); - return this; - } - - public synchronized StringBuffer append(char[] b) { - sb.append(b, 0, b.length); - return this; - } - - public synchronized int indexOf(String s) { - return sb.indexOf(s); - } - - public synchronized int indexOf(String s, int fromIndex) { - return sb.indexOf(s, fromIndex); - } - - public synchronized StringBuffer insert(int i, String s) { - sb.insert(i, s); - return this; - } - - public synchronized StringBuffer insert(int i, char c) { - sb.insert(i, c); - return this; - } - - public synchronized StringBuffer insert(int i, int v) { - sb.insert(i, v); - return this; - } - - public synchronized StringBuffer delete(int start, int end) { - sb.delete(start, end); - return this; - } - - public synchronized StringBuffer deleteCharAt(int i) { - sb.deleteCharAt(i); - return this; - } - - public synchronized char charAt(int i) { - return sb.charAt(i); - } - - public synchronized int length() { - return sb.length(); - } - - public synchronized StringBuffer replace(int start, int end, String str) { - sb.replace(start, end, str); - return this; - } - - public synchronized void setLength(int v) { - sb.setLength(v); - } - - public synchronized void setCharAt(int index, char ch) { - sb.setCharAt(index, ch); - } - - public synchronized void getChars(int srcStart, int srcEnd, char[] dst, - int dstStart) - { - sb.getChars(srcStart, srcEnd, dst, dstStart); - } - - public synchronized String toString() { - return sb.toString(); - } - - public String substring(int start, int end) { - return sb.substring(start, end); - } - - public CharSequence subSequence(int start, int end) { - return sb.subSequence(start, end); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/StringBuilder.java b/sgx-jvm/avian/classpath/java/lang/StringBuilder.java deleted file mode 100644 index 8e78d1f6b8..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/StringBuilder.java +++ /dev/null @@ -1,384 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class StringBuilder implements CharSequence, Appendable { - private static final int BufferSize = 32; - - private Cell chain; - private int length; - private char[] buffer; - private int position; - - public StringBuilder(String s) { - append(s); - } - - public StringBuilder(int capacity) { } - - public StringBuilder() { - this(0); - } - - private void flush() { - if (position > 0) { - chain = new Cell(new String(buffer, 0, position, false), chain); - buffer = null; - position = 0; - } - } - - public StringBuilder append(String s) { - if (s == null) { - return append("null"); - } else { - if (s.length() > 0) { - if (buffer != null && s.length() <= buffer.length - position) { - s.getChars(0, s.length(), buffer, position); - position += s.length(); - } else { - flush(); - chain = new Cell(s, chain); - } - length += s.length(); - } - return this; - } - } - - public StringBuilder append(StringBuffer sb) { - return append(sb.toString()); - } - - public StringBuilder append(CharSequence sequence) { - return append(sequence.toString()); - } - - public StringBuilder append(CharSequence sequence, int start, int end) { - return append(sequence.subSequence(start, end)); - } - - public StringBuilder append(char[] b, int offset, int length) { - return append(new String(b, offset, length)); - } - - public StringBuilder append(char[] b) { - return append(new String(b)); - } - - public StringBuilder append(Object o) { - return append(o == null ? "null" : o.toString()); - } - - public StringBuilder append(char v) { - if (buffer == null) { - buffer = new char[BufferSize]; - } else if (position >= buffer.length) { - flush(); - buffer = new char[BufferSize]; - } - - buffer[position++] = v; - ++ length; - - return this; - } - - public StringBuilder append(boolean v) { - return append(String.valueOf(v)); - } - - public StringBuilder append(int v) { - return append(String.valueOf(v)); - } - - public StringBuilder append(long v) { - return append(String.valueOf(v)); - } - - public StringBuilder append(float v) { - return append(String.valueOf(v)); - } - - public StringBuilder append(double v) { - return append(String.valueOf(v)); - } - - public char charAt(int i) { - if (i < 0 || i >= length) { - throw new IndexOutOfBoundsException(); - } - - flush(); - - int index = length; - for (Cell c = chain; c != null; c = c.next) { - int start = index - c.value.length(); - index = start; - - if (i >= start) { - return c.value.charAt(i - start); - } - } - - throw new RuntimeException(); - } - - public StringBuilder insert(int i, String s) { - if (i < 0 || i > length) { - throw new IndexOutOfBoundsException(); - } - - if (i == length) { - append(s); - } else { - flush(); - - int index = length; - for (Cell c = chain; c != null; c = c.next) { - int start = index - c.value.length(); - index = start; - - if (i >= start) { - if (i == start) { - c.next = new Cell(s, c.next); - } else { - String v = c.value; - c.value = v.substring(i - start, v.length()); - c.next = new Cell(s, new Cell(v.substring(0, i - start), c.next)); - } - break; - } - } - - length += s.length(); - } - - return this; - } - - public StringBuilder insert(int i, CharSequence s) { - return insert(i, s.toString()); - } - - public StringBuilder insert(int i, char c) { - return insert(i, new String(new char[] { c }, 0, 1, false)); - } - - public StringBuilder insert(int i, int v) { - return insert(i, String.valueOf(v)); - } - - public StringBuilder delete(int start, int end) { - if (start >= end) { - return this; - } - - if (start < 0 || end > length) { - throw new IndexOutOfBoundsException(); - } - - flush(); - - int index = length; - Cell p = null; - for (Cell c = chain; c != null; c = c.next) { - int e = index; - int s = index - c.value.length(); - index = s; - - if (end >= e) { - if (start <= s) { - if (p == null) { - chain = c.next; - } else { - p.next = c.next; - } - } else { - c.value = c.value.substring(0, start - s); - break; - } - } else { - if (start <= s) { - c.value = c.value.substring(end - s, e - s); - } else { - String v = c.value; - c.value = v.substring(end - s, e - s); - c.next = new Cell(v.substring(0, start - s), c.next); - break; - } - } - } - - length -= (end - start); - - return this; - } - - public StringBuilder deleteCharAt(int i) { - return delete(i, i + 1); - } - - public StringBuilder replace(int start, int end, String str) { - delete(start, end); - insert(start, str); - return this; - } - - public int indexOf(String s) { - return indexOf(s, 0); - } - - public int indexOf(String s, int start) { - int slength = s.length(); - if (slength == 0) return start; - - for (int i = start; i < length - slength + 1; ++i) { - int j = 0; - for (; j < slength; ++j) { - if (charAt(i + j) != s.charAt(j)) { - break; - } - } - if (j == slength) { - return i; - } - } - - return -1; - } - - public int lastIndexOf(String s) { - return lastIndexOf(s, length - s.length()); - } - - public int lastIndexOf(String s, int lastIndex) { - int slength = s.length(); - if (slength == 0) return lastIndex; - - for (int i = Math.min(length - slength, lastIndex); i >= 0; --i) { - int j = 0; - for (; j < slength && i + j < length; ++j) { - if (charAt(i + j) != s.charAt(j)) { - break; - } - } - if (j == slength) { - return i; - } - } - - return -1; - } - - public int length() { - return length; - } - - public void setLength(int v) { - if (v < 0) { - throw new IndexOutOfBoundsException(); - } - - if (v == 0) { - length = 0; - chain = null; - return; - } - - flush(); - - int index = length; - length = v; - for (Cell c = chain; c != null; c = c.next) { - int start = index - c.value.length(); - - if (v > start) { - if (v < index) { - c.value = c.value.substring(0, v - start); - } - break; - } - - chain = c.next; - index = start; - } - } - - public void getChars(int srcStart, int srcEnd, char[] dst, int dstStart) { - if (srcStart < 0 || srcEnd > length) { - throw new IndexOutOfBoundsException(); - } - - flush(); - - int index = length; - for (Cell c = chain; c != null; c = c.next) { - int start = index - c.value.length(); - int end = index; - index = start; - - if (start < srcStart) { - start = srcStart; - } - - if (end > srcEnd) { - end = srcEnd; - } - - if (start < end) { - c.value.getChars(start - index, end - index, - dst, dstStart + (start - srcStart)); - } - } - } - - public String toString() { - char[] array = new char[length]; - getChars(0, length, array, 0); - return new String(array, 0, length, false); - } - - private static class Cell { - public String value; - public Cell next; - - public Cell(String value, Cell next) { - this.value = value; - this.next = next; - } - } - - public String substring(int start) { - return substring(start, length); - } - - public String substring(int start, int end) { - int len = end-start; - char[] buf = new char[len]; - getChars(start, end, buf, 0); - return new String(buf, 0, len, false); - } - - public CharSequence subSequence(int start, int end) { - return substring(start, end); - } - - public void setCharAt(int index, char ch) { - if(index < 0 || index >= length) throw new IndexOutOfBoundsException(); - deleteCharAt(index); - insert(index, ch); - } - - public void ensureCapacity(int capacity) { - // ignore - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/StringIndexOutOfBoundsException.java b/sgx-jvm/avian/classpath/java/lang/StringIndexOutOfBoundsException.java deleted file mode 100644 index b66d9ae43d..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/StringIndexOutOfBoundsException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -/** - * Used by String to signal that a given index is either less than - * or greater than the allowed range. - */ -public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException { - private static final long serialVersionUID = -6762910422159637258L; - - public StringIndexOutOfBoundsException(int index) { - super("String index out of range: "+index); - } - - public StringIndexOutOfBoundsException(String message) { - super(message); - } - - public StringIndexOutOfBoundsException() {} -} diff --git a/sgx-jvm/avian/classpath/java/lang/SuppressWarnings.java b/sgx-jvm/avian/classpath/java/lang/SuppressWarnings.java deleted file mode 100644 index fd73e8f4c7..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/SuppressWarnings.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - - -public @interface SuppressWarnings { - String[] value(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/System.java b/sgx-jvm/avian/classpath/java/lang/System.java deleted file mode 100644 index e7b15b29e1..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/System.java +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.io.PrintStream; -import java.io.InputStream; -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.FileDescriptor; -import java.util.Map; -import java.util.Hashtable; -import java.util.Properties; - -public abstract class System { - private static class Static { - public static Properties properties = makeProperties(); - } - - private static Map environment; - - private static SecurityManager securityManager; - // static { - // loadLibrary("natives"); - // } - - public static final PrintStream out = new PrintStream - (new BufferedOutputStream(new FileOutputStream(FileDescriptor.out)), true); - - public static final PrintStream err = new PrintStream - (new BufferedOutputStream(new FileOutputStream(FileDescriptor.err)), true); - - public static final InputStream in - = new BufferedInputStream(new FileInputStream(FileDescriptor.in)); - - public static native void arraycopy(Object src, int srcOffset, Object dst, - int dstOffset, int length); - - public static String getProperty(String name) { - return (String) Static.properties.get(name); - } - - public static String getProperty(String name, String defaultValue) { - String result = getProperty(name); - if (result==null) { - return defaultValue; - } - return result; - } - - public static String setProperty(String name, String value) { - return (String) Static.properties.put(name, value); - } - - public static Properties getProperties() { - return Static.properties; - } - - private static Properties makeProperties() { - Properties properties = new Properties(); - - for (String p: getNativeProperties()) { - if (p == null) break; - int index = p.indexOf('='); - properties.put(p.substring(0, index), p.substring(index + 1)); - } - - for (String p: getVMProperties()) { - if (p == null) break; - int index = p.indexOf('='); - properties.put(p.substring(0, index), p.substring(index + 1)); - } - - return properties; - } - - private static native String[] getNativeProperties(); - - private static native String[] getVMProperties(); - - public static native int identityHashCode(Object o); - - public static String mapLibraryName(String name) { - if (name != null) { - return doMapLibraryName(name); - } else { - throw new NullPointerException(); - } - } - - private static native String doMapLibraryName(String name); - - public static void load(String path) { - ClassLoader.load(path, ClassLoader.getCaller(), false); - } - - public static void loadLibrary(String name) { - ClassLoader.load(name, ClassLoader.getCaller(), true); - } - - public static void gc() { - Runtime.getRuntime().gc(); - } - - public static void exit(int code) { - Runtime.getRuntime().exit(code); - } - - public static SecurityManager getSecurityManager() { - return securityManager; - } - - public static void setSecurityManager(SecurityManager securityManager) { - System.securityManager = securityManager; - } - - public static String getenv(String name) throws NullPointerException, - SecurityException { - if (getSecurityManager() != null) { // is this allowed? - getSecurityManager(). - checkPermission(new RuntimePermission("getenv." + name)); - } - return getenv().get(name); - } - - public static Map getenv() throws SecurityException { - if (getSecurityManager() != null) { // is this allowed? - getSecurityManager().checkPermission(new RuntimePermission("getenv.*")); - } - - if (environment == null) { // build environment table - String[] vars = getEnvironment(); - environment = new Hashtable(vars.length); - for (String var : vars) { // parse name-value pairs - int equalsIndex = var.indexOf('='); - // null names and values are forbidden - if (equalsIndex != -1 && equalsIndex < var.length() - 1) { - environment.put(var.substring(0, equalsIndex), - var.substring(equalsIndex + 1)); - } - } - } - - return environment; - } - - /** Returns the native process environment. */ - private static native String[] getEnvironment(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/Thread.java b/sgx-jvm/avian/classpath/java/lang/Thread.java deleted file mode 100644 index f30b3ec0cd..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Thread.java +++ /dev/null @@ -1,265 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.util.Map; -import java.util.WeakHashMap; - -public class Thread implements Runnable { - // set and accessed from within LockSupport - protected volatile Object parkBlocker; - - private long peer; - private volatile boolean interrupted; - private volatile boolean unparked; - private boolean daemon; - private byte state; - private byte priority; - private final Runnable task; - private Map locals; - private ClassLoader classLoader; - private UncaughtExceptionHandler exceptionHandler; - private String name; - private ThreadGroup group; - - private static UncaughtExceptionHandler defaultExceptionHandler; - - public static final int MIN_PRIORITY = 1; - public static final int NORM_PRIORITY = 5; - public static final int MAX_PRIORITY = 10; - - public Thread(ThreadGroup group, Runnable task, String name, long stackSize) - { - this.group = (group == null ? Thread.currentThread().group : group); - this.task = task; - this.name = name; - - Thread current = currentThread(); - - Map map = current.locals; - if (map != null) { - for (Map.Entry e: map.entrySet()) { - if (e.getKey() instanceof InheritableThreadLocal) { - InheritableThreadLocal itl = (InheritableThreadLocal) e.getKey(); - locals().put(itl, itl.childValue(e.getValue())); - } - } - } - - classLoader = current.classLoader; - } - - public Thread(ThreadGroup group, Runnable task, String name) { - this(group, task, name, 0); - } - - public Thread(ThreadGroup group, String name) { - this(null, null, name); - } - - public Thread(Runnable task, String name) { - this(null, task, name); - } - - public Thread(Runnable task) { - this(null, task, "Thread["+task+"]"); - } - - public Thread(String name) { - this(null, null, name); - } - - public Thread() { - this((Runnable) null); - } - - public synchronized void start() { - if (peer != 0) { - throw new IllegalStateException("thread already started"); - } - - state = (byte) State.RUNNABLE.ordinal(); - - peer = doStart(); - if (peer == 0) { - state = (byte) State.NEW.ordinal(); - throw new RuntimeException("unable to start native thread"); - } - } - - private native long doStart(); - - private static void run(Thread t) throws Throwable { - try { - t.run(); - } catch (Throwable e) { - UncaughtExceptionHandler eh = t.exceptionHandler; - UncaughtExceptionHandler deh = defaultExceptionHandler; - if (eh != null) { - eh.uncaughtException(t, e); - } else if (deh != null) { - deh.uncaughtException(t, e); - } else { - throw e; - } - } finally { - synchronized (t) { - t.state = (byte) State.TERMINATED.ordinal(); - t.notifyAll(); - } - } - } - - public void run() { - if (task != null) { - task.run(); - } - } - - public ClassLoader getContextClassLoader() { - return classLoader; - } - - public void setContextClassLoader(ClassLoader v) { - classLoader = v; - } - - public Map locals() { - if (locals == null) { - locals = new WeakHashMap(); - } - return locals; - } - - public static native Thread currentThread(); - - public void interrupt() { - interrupt(peer); - } - - private static native boolean interrupt(long peer); - - public static boolean interrupted() { - return interrupted(currentThread().peer); - } - - private static native boolean interrupted(long peer); - - public boolean isInterrupted() { - return interrupted; - } - - public StackTraceElement[] getStackTrace() { - long p = peer; - if (p == 0) { - return new StackTraceElement[0]; - } - return Throwable.resolveTrace(getStackTrace(p)); - } - - private static native Object getStackTrace(long peer); - - public static native int activeCount(); - - public static native int enumerate(Thread[] array); - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public UncaughtExceptionHandler getUncaughtExceptionHandler() { - UncaughtExceptionHandler eh = exceptionHandler; - return (eh == null ? group : eh); - } - - public static UncaughtExceptionHandler getDefaultUncaughtExceptionHandler() { - return defaultExceptionHandler; - } - - public void setUncaughtExceptionHandler(UncaughtExceptionHandler h) { - exceptionHandler = h; - } - - public static void setDefaultUncaughtExceptionHandler - (UncaughtExceptionHandler h) - { - defaultExceptionHandler = h; - } - - public State getState() { - return State.values()[state]; - } - - public boolean isAlive() { - switch (getState()) { - case NEW: - case TERMINATED: - return false; - - default: - return true; - } - } - - public int getPriority() { - return priority; - } - - public void setPriority(int priority) { - if (priority < MIN_PRIORITY || priority > MAX_PRIORITY) { - throw new IllegalArgumentException(); - } - this.priority = (byte) priority; - } - - public boolean isDaemon() { - return daemon; - } - - public synchronized void setDaemon(boolean v) { - if (getState() != State.NEW) { - throw new IllegalStateException(); - } - - daemon = v; - } - - public static native void yield(); - - public synchronized void join() throws InterruptedException { - while (getState() != State.TERMINATED) { - wait(); - } - } - - public ThreadGroup getThreadGroup() { - return group; - } - - public static native boolean holdsLock(Object o); - - public long getId() { - return peer; - } - - public interface UncaughtExceptionHandler { - public void uncaughtException(Thread t, Throwable e); - } - - public enum State { - NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING, TERMINATED - } - -} diff --git a/sgx-jvm/avian/classpath/java/lang/ThreadDeath.java b/sgx-jvm/avian/classpath/java/lang/ThreadDeath.java deleted file mode 100644 index 31711ca64a..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ThreadDeath.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class ThreadDeath extends Error { - public ThreadDeath() { } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ThreadGroup.java b/sgx-jvm/avian/classpath/java/lang/ThreadGroup.java deleted file mode 100644 index 0aef6ed6a4..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ThreadGroup.java +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import avian.Cell; - -public class ThreadGroup implements Thread.UncaughtExceptionHandler { - private final ThreadGroup parent; - private final String name; - private Cell subgroups; - - public ThreadGroup(ThreadGroup parent, String name) { - this.parent = parent; - this.name = name; - - synchronized (parent) { - parent.subgroups = new Cell(this, subgroups); - } - } - - public ThreadGroup(String name) { - this(Thread.currentThread().getThreadGroup(), name); - } - - public void uncaughtException(Thread t, Throwable e) { - if (parent != null) { - parent.uncaughtException(t, e); - } else { - Thread.UncaughtExceptionHandler deh - = Thread.getDefaultUncaughtExceptionHandler(); - if (deh != null) { - deh.uncaughtException(t, e); - } else if (! (e instanceof ThreadDeath)) { - e.printStackTrace(); - } - } - } - - public ThreadGroup getParent() { - return parent; - } - - public String getName() { - return name; - } - - public int activeCount() { - int allCount = Thread.activeCount(); - Thread[] all = new Thread[allCount]; - allCount = Thread.enumerate(all); - - int count = 0; - for (int i = 0; i < allCount; ++i) { - if (parentOf(all[i].getThreadGroup())) { - ++ count; - } - } - - return count; - } - - public int enumerate(Thread[] threads) { - return enumerate(threads, true); - } - - public int enumerate(Thread[] threads, boolean recurse) { - int allCount = Thread.activeCount(); - Thread[] all = new Thread[allCount]; - allCount = Thread.enumerate(all); - - int count = 0; - for (int i = 0; i < allCount && count < threads.length; ++i) { - Thread t = all[i]; - ThreadGroup g = t.getThreadGroup(); - if (g == this || (recurse && parentOf(g))) { - threads[count++] = t; - } - } - - return count; - } - - public boolean parentOf(ThreadGroup g) { - for (; g != null; g = g.parent) { - if (g == this) { - return true; - } - } - - return false; - } - - public int enumerate(ThreadGroup[] groups, boolean recurse) { - return enumerate(groups, recurse, 0); - } - - private int enumerate(ThreadGroup[] groups, boolean recurse, int count) { - for (Cell c = subgroups; c != null && count < groups.length; - c = c.next) - { - ThreadGroup g = c.value; - groups[count++] = g; - if (recurse) { - count = g.enumerate(groups, true, count); - } - } - return count; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ThreadLocal.java b/sgx-jvm/avian/classpath/java/lang/ThreadLocal.java deleted file mode 100644 index b15112a742..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ThreadLocal.java +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.util.Map; - -public class ThreadLocal { - private static final Object Null = new Object(); - - protected T initialValue() { - return null; - } - - public T get() { - Map map = Thread.currentThread().locals(); - Object o = map.get(this); - if (o == null) { - o = initialValue(); - if (o == null) { - o = Null; - } - map.put(this, o); - } - if (o == Null) { - o = null; - } - return (T) o; - } - - public void set(T value) { - Map map = Thread.currentThread().locals(); - Object o = value; - if (o == null) { - o = Null; - } - map.put(this, o); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Throwable.java b/sgx-jvm/avian/classpath/java/lang/Throwable.java deleted file mode 100644 index 57c42290f1..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Throwable.java +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -import java.io.PrintStream; -import java.io.PrintWriter; -import java.io.Serializable; - -public class Throwable implements Serializable { - private String message; - private Object trace; - private Throwable cause; - - public Throwable(String message, Throwable cause) { - this.message = message; - this.trace = trace(1); - this.cause = cause; - } - - public Throwable(String message) { - this(message, null); - } - - public Throwable(Throwable cause) { - this(null, cause); - } - - public Throwable() { - this(null, null); - } - - public Throwable getCause() { - return cause; - } - - public Throwable initCause(Throwable e) { - if (cause == null) { - cause = e; - return this; - } else { - throw new IllegalStateException(); - } - } - - public String getMessage() { - return message; - } - - public String getLocalizedMessage() { - return getMessage(); - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getName()); - if (message != null) { - sb.append(": ").append(message); - } - return sb.toString(); - } - - private static native Object trace(int skipCount); - - static native StackTraceElement[] resolveTrace(Object trace); - - private StackTraceElement[] resolveTrace() { - if (! (trace instanceof StackTraceElement[])) { - trace = resolveTrace(trace); - } - return (StackTraceElement[]) trace; - } - - public StackTraceElement[] getStackTrace() { - return resolveTrace(); - } - - public void setStackTrace(StackTraceElement[] trace) { - this.trace = trace; - } - - public void printStackTrace(PrintStream out) { - StringBuilder sb = new StringBuilder(); - printStackTrace(sb, System.getProperty("line.separator")); - out.print(sb.toString()); - out.flush(); - } - - public void printStackTrace(PrintWriter out) { - StringBuilder sb = new StringBuilder(); - printStackTrace(sb, System.getProperty("line.separator")); - out.print(sb.toString()); - out.flush(); - } - - public void printStackTrace() { - printStackTrace(System.err); - } - - private void printStackTrace(StringBuilder sb, String nl) { - sb.append(toString()).append(nl); - - StackTraceElement[] trace = resolveTrace(); - for (int i = 0; i < trace.length; ++i) { - sb.append(" at ").append(trace[i].toString()).append(nl); - } - - Throwable printCause = getCause(); - if (printCause != null) { - sb.append("caused by: "); - printCause.printStackTrace(sb, nl); - } - } - - public Throwable fillInStackTrace() { - trace = trace(0); - return this; - } - - public void addSuppressed(Throwable exception) { - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/TypeNotPresentException.java b/sgx-jvm/avian/classpath/java/lang/TypeNotPresentException.java deleted file mode 100644 index eb1f31ed73..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/TypeNotPresentException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class TypeNotPresentException extends Exception { - public TypeNotPresentException(String message) { - super(message); - } - - public TypeNotPresentException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/UnsatisfiedLinkError.java b/sgx-jvm/avian/classpath/java/lang/UnsatisfiedLinkError.java deleted file mode 100644 index 9c94470345..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/UnsatisfiedLinkError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class UnsatisfiedLinkError extends LinkageError { - public UnsatisfiedLinkError(String message) { - super(message); - } - - public UnsatisfiedLinkError() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/UnsupportedOperationException.java b/sgx-jvm/avian/classpath/java/lang/UnsupportedOperationException.java deleted file mode 100644 index 4e5edb1cd4..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/UnsupportedOperationException.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class UnsupportedOperationException extends RuntimeException { - public UnsupportedOperationException(String message, Throwable cause) { - super(message, cause); - } - - public UnsupportedOperationException(String message) { - this(message, null); - } - - public UnsupportedOperationException(Throwable cause) { - this(null, cause); - } - - public UnsupportedOperationException() { - this(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/VirtualMachineError.java b/sgx-jvm/avian/classpath/java/lang/VirtualMachineError.java deleted file mode 100644 index 3ad721dc22..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/VirtualMachineError.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public class VirtualMachineError extends Error { - public VirtualMachineError(String message) { - super(message); - } - - public VirtualMachineError() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/Void.java b/sgx-jvm/avian/classpath/java/lang/Void.java deleted file mode 100644 index d721269f02..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/Void.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang; - -public final class Void { - public static final Class TYPE = avian.Classes.forCanonicalName("V"); - - private Void() { } -} diff --git a/sgx-jvm/avian/classpath/java/lang/annotation/Annotation.java b/sgx-jvm/avian/classpath/java/lang/annotation/Annotation.java deleted file mode 100644 index 238abeb47e..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/annotation/Annotation.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.annotation; - -public interface Annotation { - Class annotationType(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/annotation/ElementType.java b/sgx-jvm/avian/classpath/java/lang/annotation/ElementType.java deleted file mode 100644 index 36e62e08f6..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/annotation/ElementType.java +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.annotation; - -public enum ElementType { - ANNOTATION_TYPE, - CONSTRUCTOR, - FIELD, - LOCAL_VARIABLE, - METHOD, - PACKAGE, - PARAMETER, - TYPE -} diff --git a/sgx-jvm/avian/classpath/java/lang/annotation/Retention.java b/sgx-jvm/avian/classpath/java/lang/annotation/Retention.java deleted file mode 100644 index 71db2d5f95..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/annotation/Retention.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.annotation; - -@Retention(RetentionPolicy.RUNTIME) -public @interface Retention { - public RetentionPolicy value(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/annotation/RetentionPolicy.java b/sgx-jvm/avian/classpath/java/lang/annotation/RetentionPolicy.java deleted file mode 100644 index aa8f20f02a..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/annotation/RetentionPolicy.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.annotation; - -public enum RetentionPolicy { - CLASS, RUNTIME, SOURCE -} diff --git a/sgx-jvm/avian/classpath/java/lang/annotation/Target.java b/sgx-jvm/avian/classpath/java/lang/annotation/Target.java deleted file mode 100644 index d4dfb88f84..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/annotation/Target.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.annotation; - -@Retention(value=RetentionPolicy.RUNTIME) -@Target(value=ElementType.ANNOTATION_TYPE) -public @interface Target { - public ElementType[] value(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/invoke/CallSite.java b/sgx-jvm/avian/classpath/java/lang/invoke/CallSite.java deleted file mode 100644 index 806ac6e5ee..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/invoke/CallSite.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2016, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.invoke; - -public class CallSite { - private final MethodHandle target; - - CallSite(MethodHandle target) { - this.target = target; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/invoke/LambdaConversionException.java b/sgx-jvm/avian/classpath/java/lang/invoke/LambdaConversionException.java deleted file mode 100644 index bbc4aa131c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/invoke/LambdaConversionException.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2016, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.invoke; - -public class LambdaConversionException extends java.lang.Exception { - public LambdaConversionException() { throw new RuntimeException(); } - public LambdaConversionException(String s) { throw new RuntimeException(); } - public LambdaConversionException(String s, Throwable th) { throw new RuntimeException(); } - public LambdaConversionException(Throwable th) { throw new RuntimeException(); } - public LambdaConversionException(String s, Throwable th, boolean b, boolean b2) { throw new RuntimeException(); } -} diff --git a/sgx-jvm/avian/classpath/java/lang/invoke/LambdaMetafactory.java b/sgx-jvm/avian/classpath/java/lang/invoke/LambdaMetafactory.java deleted file mode 100644 index 269c288a1b..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/invoke/LambdaMetafactory.java +++ /dev/null @@ -1,597 +0,0 @@ -/* Copyright (c) 2008-2016, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.invoke; - -import static avian.Stream.write1; -import static avian.Stream.write2; -import static avian.Stream.write4; -import static avian.Stream.set4; -import static avian.Assembler.*; - -import java.lang.reflect.Proxy; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Modifier; -import java.util.Arrays; -import java.util.List; -import java.util.ArrayList; -import java.util.Iterator; -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; -import java.io.IOException; - -import avian.Classes; -import avian.ConstantPool; -import avian.Assembler; -import avian.ConstantPool.PoolEntry; -import avian.SystemClassLoader; - -// To understand what this is all about, please read: -// -// http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html - -public class LambdaMetafactory { - private static int nextNumber = 0; - - public static final int FLAG_SERIALIZABLE = 1; - public static final int FLAG_MARKERS = 2; - public static final int FLAG_BRIDGES = 4; - - private static Class resolveReturnInterface(MethodType type) { - int index = 1; - byte[] s = type.spec; - - while (s[index] != ')') ++ index; - - if (s[++ index] != 'L') throw new AssertionError(); - - ++ index; - - int end = index + 1; - while (s[end] != ';') ++ end; - - Class c = SystemClassLoader.getClass - (Classes.loadVMClass(type.loader, s, index, end - index)); - - if (! c.isInterface()) throw new AssertionError(); - - return c; - } - - private static int indexOf(int c, byte[] array) { - int i = 0; - while (array[i] != c) ++i; - return i; - } - - private static String constructorSpec(MethodType type) { - return Classes.makeString(type.spec, 0, indexOf(')', type.spec) + 1) + "V"; - } - - private static byte[] makeFactoryCode(List pool, - String className, - String constructorSpec, - MethodType type) - throws IOException - { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - write2(out, type.footprint() + 2); // max stack - write2(out, type.footprint()); // max locals - write4(out, 0); // length (we'll set the real value later) - - write1(out, new_); - write2(out, ConstantPool.addClass(pool, className) + 1); - write1(out, dup); - - for (MethodType.Parameter p: type.parameters()) { - write1(out, p.load()); - write1(out, p.position()); - } - - write1(out, invokespecial); - write2(out, ConstantPool.addMethodRef - (pool, className, "", constructorSpec) + 1); - - write1(out, areturn); - - write2(out, 0); // exception handler table length - write2(out, 0); // attribute count - - byte[] result = out.toByteArray(); - set4(result, 4, result.length - 12); - - return result; - } - - private static byte[] makeConstructorCode(List pool, - String className, - MethodType type) - throws IOException - { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - write2(out, 3); // max stack - write2(out, type.footprint() + 1); // max locals - write4(out, 0); // length (we'll set the real value later) - - write1(out, aload_0); - write1(out, invokespecial); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Object", "", "()V") + 1); - - for (MethodType.Parameter p: type.parameters()) { - write1(out, aload_0); - write1(out, p.load()); - write1(out, p.position() + 1); - write1(out, putfield); - write2(out, ConstantPool.addFieldRef - (pool, className, "field" + p.index(), p.spec()) + 1); - } - - write1(out, return_); - - write2(out, 0); // exception handler table length - write2(out, 0); // attribute count - - byte[] result = out.toByteArray(); - set4(result, 4, result.length - 12); - - return result; - } - - private static void maybeBoxOrUnbox(ByteArrayOutputStream out, - List pool, - MethodType.TypeSpec from, - MethodType.TypeSpec to) - throws IOException - { - if (to.type().isPrimitive()) { - if (! from.type().isPrimitive()) { - write1(out, invokevirtual); - - try { - switch (to.spec()) { - case "Z": - writeMethodReference(out, pool, Classes.toVMMethod - (Boolean.class.getMethod("booleanValue"))); - break; - - case "B": - writeMethodReference(out, pool, Classes.toVMMethod - (Byte.class.getMethod("byteValue"))); - break; - - case "S": - writeMethodReference(out, pool, Classes.toVMMethod - (Short.class.getMethod("shortValue"))); - break; - - case "C": - writeMethodReference(out, pool, Classes.toVMMethod - (Character.class.getMethod("charValue"))); - break; - - case "I": - writeMethodReference(out, pool, Classes.toVMMethod - (Integer.class.getMethod("intValue"))); - break; - - case "F": - writeMethodReference(out, pool, Classes.toVMMethod - (Float.class.getMethod("floatValue"))); - break; - - case "J": - writeMethodReference(out, pool, Classes.toVMMethod - (Long.class.getMethod("longValue"))); - break; - - case "D": - writeMethodReference(out, pool, Classes.toVMMethod - (Double.class.getMethod("doubleValue"))); - break; - - default: - throw new AssertionError("don't know how to auto-unbox to " + to.spec()); - } - } catch (NoSuchMethodException e) { - throw new Error(e); - } - } - } else if (from.type().isPrimitive()) { - write1(out, invokestatic); - - try { - switch (from.spec()) { - case "Z": - writeMethodReference(out, pool, Classes.toVMMethod - (Boolean.class.getMethod - ("valueOf", Boolean.TYPE))); - break; - - case "B": - writeMethodReference(out, pool, Classes.toVMMethod - (Byte.class.getMethod - ("valueOf", Byte.TYPE))); - break; - - case "S": - writeMethodReference(out, pool, Classes.toVMMethod - (Short.class.getMethod - ("valueOf", Short.TYPE))); - break; - - case "C": - writeMethodReference(out, pool, Classes.toVMMethod - (Character.class.getMethod - ("valueOf", Character.TYPE))); - break; - - case "I": - writeMethodReference(out, pool, Classes.toVMMethod - (Integer.class.getMethod - ("valueOf", Integer.TYPE))); - break; - - case "F": - writeMethodReference(out, pool, Classes.toVMMethod - (Float.class.getMethod - ("valueOf", Float.TYPE))); - break; - - case "J": - writeMethodReference(out, pool, Classes.toVMMethod - (Long.class.getMethod - ("valueOf", Long.TYPE))); - break; - - case "D": - writeMethodReference(out, pool, Classes.toVMMethod - (Double.class.getMethod - ("valueOf", Double.TYPE))); - break; - - default: - throw new AssertionError("don't know how to autobox from " + from.spec()); - } - } catch (NoSuchMethodException e) { - throw new Error(e); - } - } - } - - private static byte[] makeInvocationCode(List pool, - String className, - String constructorSpec, - MethodType fieldType, - MethodType localType, - MethodHandle implementation) - throws IOException - { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - write2(out, fieldType.footprint() - + localType.footprint() + 4); // max stack - write2(out, localType.footprint() + 1); // max locals - write4(out, 0); // length (we'll set the real value later) - - write1(out, aload_0); - - Iterator dst = implementation.type().parameters().iterator(); - - boolean skip = implementation.kind != MethodHandle.REF_invokeStatic; - - for (MethodType.Parameter p: fieldType.parameters()) { - write1(out, aload_0); - write1(out, getfield); - write2(out, ConstantPool.addFieldRef - (pool, className, "field" + p.index(), p.spec()) + 1); - if (skip) { - skip = false; - } else { - maybeBoxOrUnbox(out, pool, p, dst.next()); - } - } - - for (MethodType.Parameter p: localType.parameters()) { - write1(out, p.load()); - write1(out, p.position() + 1); - if (skip) { - skip = false; - } else { - maybeBoxOrUnbox(out, pool, p, dst.next()); - } - } - - switch (implementation.kind) { - case MethodHandle.REF_invokeVirtual: - write1(out, invokevirtual); - writeMethodReference(out, pool, implementation.method); - break; - - case MethodHandle.REF_invokeStatic: - write1(out, invokestatic); - writeMethodReference(out, pool, implementation.method); - break; - - case MethodHandle.REF_invokeSpecial: - write1(out, invokespecial); - writeMethodReference(out, pool, implementation.method); - break; - - case MethodHandle.REF_newInvokeSpecial: - write1(out, new_); - write2(out, ConstantPool.addClass - (pool, - Classes.makeString - (implementation.method.class_.name, 0, - implementation.method.class_.name.length - 1)) + 1); - write1(out, dup); - write1(out, invokespecial); - writeMethodReference(out, pool, implementation.method); - break; - - case MethodHandle.REF_invokeInterface: - write1(out, invokeinterface); - writeInterfaceMethodReference(out, pool, implementation.method); - write1(out, implementation.method.parameterFootprint); - write1(out, 0); - break; - - default: throw new AssertionError - ("todo: implement '" + implementation.kind + "' per http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-5.html#jvms-5.4.3.5"); - } - - if (implementation.kind != MethodHandle.REF_newInvokeSpecial) { - maybeBoxOrUnbox(out, pool, implementation.type().result(), localType.result()); - } - write1(out, localType.result().return_()); - - write2(out, 0); // exception handler table length - write2(out, 0); // attribute count - - byte[] result = out.toByteArray(); - set4(result, 4, result.length - 12); - - return result; - } - - private static void writeMethodReference(OutputStream out, - List pool, - avian.VMMethod method) - throws IOException - { - write2(out, ConstantPool.addMethodRef - (pool, - Classes.makeString(method.class_.name, 0, - method.class_.name.length - 1), - Classes.makeString(method.name, 0, - method.name.length - 1), - Classes.makeString(method.spec, 0, - method.spec.length - 1)) + 1); - } - - private static void writeInterfaceMethodReference(OutputStream out, - List pool, - avian.VMMethod method) - throws IOException - { - write2(out, ConstantPool.addInterfaceMethodRef - (pool, - Classes.makeString(method.class_.name, 0, - method.class_.name.length - 1), - Classes.makeString(method.name, 0, - method.name.length - 1), - Classes.makeString(method.spec, 0, - method.spec.length - 1)) + 1); - } - - public static byte[] makeLambda(String invokedName, - String invokedType, - String methodType, - String implementationClass, - String implementationName, - String implementationSpec, - int implementationKind) - { - return makeLambda(invokedName, - new MethodType(invokedType), - new MethodType(methodType), - new MethodHandle(implementationClass, - implementationName, - implementationSpec, - implementationKind), - emptyInterfaceList); - } - - private static byte[] makeLambda(String invokedName, - MethodType invokedType, - MethodType methodType, - MethodHandle methodImplementation, - Class[] interfaces) - { - String className; - { int number; - synchronized (LambdaMetafactory.class) { - number = nextNumber++; - } - className = "Lambda-" + number; - } - - List pool = new ArrayList(); - - int[] interfaceIndexes = new int[interfaces.length + 1]; - interfaceIndexes[0] = ConstantPool.addClass(pool, invokedType.returnType().getName().replace('.', '/')); - for (int i = 0; i < interfaces.length; i++) { - String name = interfaces[i].getName().replace('.', '/'); - interfaceIndexes[i + 1] = ConstantPool.addClass(pool, name); - } - - List fieldTable = new ArrayList(); - - for (MethodType.Parameter p: invokedType.parameters()) { - fieldTable.add - (new FieldData(0, - ConstantPool.addUtf8(pool, "field" + p.index()), - ConstantPool.addUtf8(pool, p.spec()))); - } - - String constructorSpec = constructorSpec(invokedType); - - List methodTable = new ArrayList(); - - try { - methodTable.add - (new MethodData - (Modifier.PUBLIC | Modifier.STATIC, - ConstantPool.addUtf8(pool, "make"), - ConstantPool.addUtf8(pool, invokedType.toMethodDescriptorString()), - makeFactoryCode(pool, className, constructorSpec, invokedType))); - - methodTable.add - (new MethodData - (Modifier.PUBLIC, - ConstantPool.addUtf8(pool, ""), - ConstantPool.addUtf8(pool, constructorSpec), - makeConstructorCode(pool, className, invokedType))); - - methodTable.add - (new MethodData - (Modifier.PUBLIC, - ConstantPool.addUtf8(pool, invokedName), - ConstantPool.addUtf8(pool, methodType.toMethodDescriptorString()), - makeInvocationCode(pool, className, constructorSpec, invokedType, - methodType, methodImplementation))); - } catch (IOException e) { - AssertionError error = new AssertionError(); - error.initCause(e); - throw error; - } - - int nameIndex = ConstantPool.addClass(pool, className); - int superIndex = ConstantPool.addClass(pool, "java/lang/Object"); - - ByteArrayOutputStream out = new ByteArrayOutputStream(); - try { - Assembler.writeClass - (out, pool, nameIndex, superIndex, interfaceIndexes, - fieldTable.toArray(new FieldData[fieldTable.size()]), - methodTable.toArray(new MethodData[methodTable.size()])); - } catch (IOException e) { - AssertionError error = new AssertionError(); - error.initCause(e); - throw error; - } - - return out.toByteArray(); - } - - private static CallSite makeCallSite(MethodType invokedType, byte[] classData) throws AssertionError { - try { - return new CallSite - (new MethodHandle - (MethodHandle.REF_invokeStatic, invokedType.loader, Classes.toVMMethod - (avian.SystemClassLoader.getClass - (avian.Classes.defineVMClass - (invokedType.loader, classData, 0, classData.length)) - .getMethod("make", invokedType.parameterArray())))); - } catch (NoSuchMethodException e) { - AssertionError error = new AssertionError(); - error.initCause(e); - throw error; - } - } - - private static final Class[] emptyInterfaceList = new Class[] {}; - - public static CallSite metafactory(MethodHandles.Lookup caller, - String invokedName, - MethodType invokedType, - MethodType methodType, - MethodHandle methodImplementation, - MethodType instantiatedMethodType) - throws LambdaConversionException - { - byte[] classData = makeLambda(invokedName, invokedType, methodType, methodImplementation, emptyInterfaceList); - return makeCallSite(invokedType, classData); - } - - public static CallSite altMetafactory(MethodHandles.Lookup caller, - String invokedName, - MethodType invokedType, - Object... args) throws LambdaConversionException { - // See openjdk8/jdk/src/share/classes/java/lang/invoke/LambdaMetafactory.java - // Behaves as if the prototype is like this: - // - // CallSite altMetafactory( - // MethodHandles.Lookup caller, - // String invokedName, - // MethodType invokedType, - // MethodType methodType, - // MethodHandle methodImplementation, - // MethodType instantiatedMethodType, - // int flags, - // int markerInterfaceCount, // IF flags has MARKERS set - // Class... markerInterfaces, // IF flags has MARKERS set - // int bridgeCount, // IF flags has BRIDGES set - // MethodType... bridges // IF flags has BRIDGES set - // ) - MethodType methodType = (MethodType) args[0]; - MethodHandle methodImplementation = (MethodHandle) args[1]; - - int flags = (Integer) args[3]; - boolean serializable = (flags & FLAG_SERIALIZABLE) != 0; - - // Marker interfaces are added to a lambda when they're written like this: - // - // Runnable r = (Runnable & Serializable) () -> foo() - // - // The intersection type in the cast here indicates to the compiler what interfaces - // the generated lambda class should implement. Because a lambda has (by definition) - // one method only, it is meaningless for these interfaces to contain anything, thus - // they are only allowed to be empty marker interfaces. In practice the Serializable - // interface is handled specially and the use of markers is extremely rare. Adding - // support would be easy though. - if ((flags & FLAG_MARKERS) != 0) - throw new UnsupportedOperationException("Marker interfaces on lambdas are not supported on Avian yet. Sorry."); - - // In some cases there is a mismatch between what the JVM type system supports and - // what the Java language supports. In other cases the type of a lambda expression - // may not perfectly match the functional interface which represents it. Consider the - // following case: - // - // interface I { void foo(Integer i, String s1, Strings s2) } - // class Foo { static void m(Number i, Object... rest) {} } - // - // I lambda = Foo::m - // - // This is allowed by the Java language, even though the interface representing the - // lambda specifies three specific arguments and the method implementing the lambda - // uses varargs and a different type signature. Behind the scenes the compiler generates - // a "bridge" method that does the adaptation. - // - // You can learn more here: http://www.oracle.com/technetwork/java/jvmls2013heid-2013922.pdf - // and here: http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html - if ((flags & FLAG_BRIDGES) != 0) { - int bridgeCount = (Integer) args[4]; - if (bridgeCount > 0) - throw new UnsupportedOperationException("A lambda that requires bridge methods was used, this is not yet supported by Avian. Sorry."); - } - - // TODO: This is not necessary if the function type interface is already inheriting - // from Serializable. - Class[] interfaces = new Class[serializable ? 1 : 0]; - if (serializable) - interfaces[0] = java.io.Serializable.class; - - byte[] classData = makeLambda(invokedName, invokedType, methodType, methodImplementation, interfaces); - return makeCallSite(invokedType, classData); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/invoke/MethodHandle.java b/sgx-jvm/avian/classpath/java/lang/invoke/MethodHandle.java deleted file mode 100644 index 5e8b9e79c0..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/invoke/MethodHandle.java +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (c) 2008-2016, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.invoke; - -import avian.Classes; -import avian.SystemClassLoader; - -public class MethodHandle { - static final int REF_invokeVirtual = 5; - static final int REF_invokeStatic = 6; - static final int REF_invokeSpecial = 7; - static final int REF_newInvokeSpecial = 8; - static final int REF_invokeInterface = 9; - - final int kind; - private final ClassLoader loader; - final avian.VMMethod method; - private volatile MethodType type; - - MethodHandle(int kind, ClassLoader loader, avian.VMMethod method) { - this.kind = kind; - this.loader = loader; - this.method = method; - } - - MethodHandle(String class_, - String name, - String spec, - int kind) - { - this.kind = kind; - this.loader = SystemClassLoader.appLoader(); - try { - this.method = Classes.findMethod(this.loader, class_, name, spec); - } catch (ClassNotFoundException e) { - throw new RuntimeException(e); - } - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - if (method.class_ != null) { - sb.append(Classes.makeString(method.class_.name, 0, - method.class_.name.length - 1)); - sb.append("."); - } - sb.append(Classes.makeString(method.name, 0, - method.name.length - 1)); - sb.append(Classes.makeString(method.spec, 0, - method.spec.length - 1)); - return sb.toString(); - } - - public MethodType type() { - if (type == null) { - type = new MethodType(loader, method.spec); - } - return type; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/invoke/MethodHandles.java b/sgx-jvm/avian/classpath/java/lang/invoke/MethodHandles.java deleted file mode 100644 index b4af275a5c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/invoke/MethodHandles.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2008-2016, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.invoke; - -public class MethodHandles { - public static class Lookup { - final avian.VMClass class_; - private final int modes; - - private Lookup(avian.VMClass class_, int modes) { - this.class_ = class_; - this.modes = modes; - } - - public String toString() { - return "lookup[" + avian.SystemClassLoader.getClass(class_) + ", " - + modes + "]"; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/invoke/MethodType.java b/sgx-jvm/avian/classpath/java/lang/invoke/MethodType.java deleted file mode 100644 index 60549b3e6e..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/invoke/MethodType.java +++ /dev/null @@ -1,347 +0,0 @@ -/* Copyright (c) 2008-2016, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.invoke; - -import static avian.Assembler.*; - -import avian.Assembler; -import avian.Classes; -import avian.SystemClassLoader; -import avian.VMClass; - -import java.util.List; -import java.util.ArrayList; - -public final class MethodType implements java.io.Serializable { - private static final char[] Primitives = new char[] { - 'V', 'Z', 'B', 'C', 'S', 'I', 'F', 'J', 'D' - }; - - final ClassLoader loader; - final byte[] spec; - private volatile List parameters; - private volatile Result result; - private volatile int footprint; - - MethodType(ClassLoader loader, byte[] spec) { - this.loader = loader; - this.spec = spec; - } - - MethodType(String spec) { - this.loader = SystemClassLoader.appLoader(); - try { - this.spec = spec.getBytes("UTF-8"); - } catch (java.io.UnsupportedEncodingException e) { - throw new IllegalStateException(e.getMessage(), e); - } - } - - public String toMethodDescriptorString() { - return Classes.makeString(spec, 0, spec.length - 1); - } - - private static String spec(Class c) { - if (c.isPrimitive()) { - VMClass vmc = Classes.toVMClass(c); - for (char p: Primitives) { - if (vmc == Classes.primitiveClass(p)) { - return String.valueOf(p); - } - } - throw new AssertionError(); - } else if (c.isArray()) { - return "[" + spec(c.getComponentType()); - } else { - return "L" + c.getName().replace('.', '/') + ";"; - } - } - - private MethodType(Class rtype, - Class ... ptypes) - { - loader = rtype.getClassLoader(); - - StringBuilder sb = new StringBuilder(); - sb.append('('); - parameters = new ArrayList(ptypes.length); - int position = 0; - for (int i = 0; i < ptypes.length; ++i) { - String spec = spec(ptypes[i]); - sb.append(spec); - - Type type = type(spec); - - parameters.add(new Parameter(i, - position, - spec, - ptypes[i], - type.load)); - - position += type.size; - } - sb.append(')'); - - footprint = position; - - String spec = spec(rtype); - sb.append(spec); - - result = new Result(spec, rtype, type(spec).return_); - - try { - this.spec = sb.toString().getBytes("UTF-8"); - } catch (java.io.UnsupportedEncodingException e) { - throw new IllegalStateException(e.getMessage(), e); - } - } - - public static MethodType methodType(Class rtype, - Class ptype0, - Class ... ptypes) - { - Class[] array = new Class[ptypes.length + 1]; - array[0] = ptype0; - System.arraycopy(ptypes, 0, array, 1, ptypes.length); - return methodType(rtype, array); - } - - public static MethodType methodType(Class rtype, - Class ... ptypes) - { - return new MethodType(rtype, ptypes); - } - - public String toString() { - return Classes.makeString(spec, 0, spec.length - 1); - } - - public int footprint() { - parameters(); // ensure spec is parsed - - return footprint; - } - - public Class returnType() { - parameters(); // ensure spec is parsed - - return result.type; - } - - public Class[] parameterArray() { - parameters(); // ensure spec is parsed - - Class[] array = new Class[parameters.size()]; - for (int i = 0; i < parameters.size(); ++i) { - array[i] = parameters.get(i).type; - } - - return array; - } - - public Iterable parameters() { - if (parameters == null) { - List list = new ArrayList(); - int i; - int index = 0; - int position = 0; - for (i = 1; spec[i] != ')'; ++i) { - int start = i; - switch (spec[i]) { - case 'L': { - ++ i; - while (spec[i] != ';') ++ i; - } break; - - case '[': { - ++ i; - while (spec[i] == '[') ++ i; - - switch (spec[i]) { - case 'L': - ++ i; - while (spec[i] != ';') ++ i; - break; - - default: - break; - } - } break; - - case 'Z': - case 'B': - case 'S': - case 'C': - case 'I': - case 'F': - case 'J': - case 'D': - break; - - default: throw new AssertionError(); - } - - String paramSpec = Classes.makeString(spec, start, (i - start) + 1); - Type type = type(paramSpec); - - list.add(new Parameter - (index, - position, - paramSpec, - Classes.forCanonicalName(loader, paramSpec), - type.load)); - - ++ index; - position += type.size; - } - - footprint = position; - - ++ i; - - String paramSpec = Classes.makeString(spec, i, spec.length - i - 1); - Type type = type(paramSpec); - - result = new Result(paramSpec, - Classes.forCanonicalName(loader, paramSpec), - type.return_); - - parameters = list; - } - - return parameters; - } - - public Result result() { - parameters(); // ensure spec has been parsed - - return result; - } - - private static Type type(String spec) { - switch (spec.charAt(0)) { - case 'L': - case '[': - return Type.ObjectType; - - case 'Z': - case 'B': - case 'S': - case 'C': - case 'I': - return Type.IntegerType; - - case 'F': - return Type.FloatType; - - case 'J': - return Type.LongType; - - case 'D': - return Type.DoubleType; - - case 'V': - return Type.VoidType; - - default: throw new AssertionError(); - } - } - - private static enum Type { - ObjectType(aload, areturn, 1), - IntegerType(iload, ireturn, 1), - FloatType(fload, freturn, 1), - LongType(lload, lreturn, 2), - DoubleType(dload, dreturn, 2), - VoidType(-1, Assembler.return_, -1); - - public final int load; - public final int return_; - public final int size; - - private Type(int load, int return_, int size) { - this.load = load; - this.return_ = return_; - this.size = size; - } - } - - public interface TypeSpec { - public Class type(); - - public String spec(); - } - - public static class Parameter implements TypeSpec { - private final int index; - private final int position; - private final String spec; - private final Class type; - private final int load; - - private Parameter(int index, - int position, - String spec, - Class type, - int load) - { - this.index = index; - this.position = position; - this.spec = spec; - this.type = type; - this.load = load; - } - - public int index() { - return index; - } - - public int position() { - return position; - } - - public String spec() { - return spec; - } - - public Class type() { - return type; - } - - public int load() { - return load; - } - } - - public static class Result implements TypeSpec { - private final String spec; - private final Class type; - private final int return_; - - public Result(String spec, Class type, int return_) { - this.spec = spec; - this.type = type; - this.return_ = return_; - } - - public int return_() { - return return_; // :) - } - - public String spec() { - return spec; - } - - public Class type() { - return type; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/invoke/SerializedLambda.java b/sgx-jvm/avian/classpath/java/lang/invoke/SerializedLambda.java deleted file mode 100644 index 749a11f049..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/invoke/SerializedLambda.java +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2008-2016, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.invoke; - -public class SerializedLambda implements java.io.Serializable { - public Object getCapturedArg(int i) { - // todo - return null; - } - - public int getImplMethodKind() { - // todo - return 0; - } - - public String getImplClass() { - // todo - return null; - } - - public String getImplMethodName() { - // todo - return null; - } - - public String getImplMethodSignature() { - // todo - return null; - } - - public String getFunctionalInterfaceClass() { - // todo - return null; - } - - public String getFunctionalInterfaceMethodName() { - // todo - return null; - } - - public String getFunctionalInterfaceMethodSignature() { - // todo - return null; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ref/PhantomReference.java b/sgx-jvm/avian/classpath/java/lang/ref/PhantomReference.java deleted file mode 100644 index 3843154721..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ref/PhantomReference.java +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.ref; - -public class PhantomReference extends Reference { - public PhantomReference(T target, ReferenceQueue queue) { - super(target, queue); - } - - public PhantomReference(T target) { - this(target, null); - } - - public T get() { - return null; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ref/Reference.java b/sgx-jvm/avian/classpath/java/lang/ref/Reference.java deleted file mode 100644 index 443e0c820c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ref/Reference.java +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.ref; - -public abstract class Reference { - private Object vmNext; - private T target; - private ReferenceQueue queue; - - Reference jNext; - - protected Reference(T target, ReferenceQueue queue) { - this.target = target; - this.queue = queue; - } - - protected Reference(T target) { - this(target, null); - } - - public T get() { - return target; - } - - public void clear() { - target = null; - } - - public boolean isEnqueued() { - return jNext != null; - } - - public boolean enqueue() { - if (queue != null) { - queue.add(this); - queue = null; - return true; - } else { - return false; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ref/ReferenceQueue.java b/sgx-jvm/avian/classpath/java/lang/ref/ReferenceQueue.java deleted file mode 100644 index c5ccd6b320..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ref/ReferenceQueue.java +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.ref; - -public class ReferenceQueue { - private Reference front; - - public Reference poll() { - Reference r = front; - if (front != null) { - if (front == front.jNext) { - front = null; - } else { - front = front.jNext; - } - } - return r; - } - - void add(Reference r) { - if (front == null) { - r.jNext = r; - } else { - r.jNext = front; - } - front = r; - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ref/SoftReference.java b/sgx-jvm/avian/classpath/java/lang/ref/SoftReference.java deleted file mode 100644 index 412cf0204c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ref/SoftReference.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.ref; - -public class SoftReference extends Reference { - public SoftReference(T target, ReferenceQueue queue) { - super(target, queue); - } - - public SoftReference(T target) { - this(target, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/ref/WeakReference.java b/sgx-jvm/avian/classpath/java/lang/ref/WeakReference.java deleted file mode 100644 index 4b6835c643..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/ref/WeakReference.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.ref; - -public class WeakReference extends Reference { - public WeakReference(T target, ReferenceQueue queue) { - super(target, queue); - } - - public WeakReference(T target) { - this(target, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/AccessibleObject.java b/sgx-jvm/avian/classpath/java/lang/reflect/AccessibleObject.java deleted file mode 100644 index 9c8c0b57cd..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/AccessibleObject.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -import java.lang.annotation.Annotation; - -public abstract class AccessibleObject implements AnnotatedElement { - protected static final int Accessible = 1 << 0; - - // Access and property flags for Member descendants - protected static final int ACC_VARARGS = 0x0080; - protected static final int ACC_SYNTHETIC = 0x1000; - - public boolean isAnnotationPresent - (Class class_) - { - return getAnnotation(class_) != null; - } - - public abstract boolean isAccessible(); - - public abstract void setAccessible(boolean v); - - public static void setAccessible(AccessibleObject[] array, boolean v) { - for (AccessibleObject o: array) o.setAccessible(v); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/AnnotatedElement.java b/sgx-jvm/avian/classpath/java/lang/reflect/AnnotatedElement.java deleted file mode 100644 index d47b0c9fa3..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/AnnotatedElement.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -import java.lang.annotation.Annotation; - -public interface AnnotatedElement { - public boolean isAnnotationPresent(Class class_); - - public T getAnnotation(Class class_); - - public Annotation[] getAnnotations(); - - public Annotation[] getDeclaredAnnotations(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/Array.java b/sgx-jvm/avian/classpath/java/lang/reflect/Array.java deleted file mode 100644 index 09846019ba..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/Array.java +++ /dev/null @@ -1,130 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -public final class Array { - private Array() { } - - public static Object get(Object array, int index) { - String className = array.getClass().getName(); - if (! className.startsWith("[")) { - throw new IllegalArgumentException(); - } - - switch (className.charAt(1)) { - case 'B': - return Byte.valueOf(((byte[]) array)[index]); - case 'C': - return Character.valueOf(((char[]) array)[index]); - case 'D': - return Double.valueOf(((double[]) array)[index]); - case 'F': - return Float.valueOf(((float[]) array)[index]); - case 'I': - return Integer.valueOf(((int[]) array)[index]); - case 'J': - return Long.valueOf(((long[]) array)[index]); - case 'S': - return Short.valueOf(((short[]) array)[index]); - case 'Z': - return Boolean.valueOf(((boolean[]) array)[index]); - case 'L': - case '[': - return ((Object[]) array)[index]; - - default: - throw new Error(); - } - } - - public static void set(Object array, int index, Object value) { - String className = array.getClass().getName(); - if (! className.startsWith("[")) { - throw new IllegalArgumentException(); - } - - switch (className.charAt(1)) { - case 'B': - ((byte[]) array)[index] = (Byte) value; - break; - case 'C': - ((char[]) array)[index] = (Character) value; - break; - case 'D': - ((double[]) array)[index] = (Double) value; - break; - case 'F': - ((float[]) array)[index] = (Float) value; - break; - case 'I': - ((int[]) array)[index] = (Integer) value; - break; - case 'J': - ((long[]) array)[index] = (Long) value; - break; - case 'S': - ((short[]) array)[index] = (Short) value; - break; - case 'Z': - ((boolean[]) array)[index] = (Boolean) value; - break; - case 'L': - case '[': - if (value == null - || array.getClass().getComponentType().isInstance(value)) - { - ((Object[]) array)[index] = value; - } else { - throw new IllegalArgumentException - ("need " + array.getClass().getComponentType() + - ", got " + value.getClass().getName()); - } - break; - - default: - throw new Error(); - } - } - - public static native int getLength(Object array); - - private static native Object makeObjectArray(Class elementType, int length); - - public static Object newInstance(Class elementType, int length) { - if (length < 0) { - throw new NegativeArraySizeException(); - } - - if (elementType.isPrimitive()) { - if (elementType.equals(boolean.class)) { - return new boolean[length]; - } else if (elementType.equals(byte.class)) { - return new byte[length]; - } else if (elementType.equals(char.class)) { - return new char[length]; - } else if (elementType.equals(short.class)) { - return new short[length]; - } else if (elementType.equals(int.class)) { - return new int[length]; - } else if (elementType.equals(long.class)) { - return new long[length]; - } else if (elementType.equals(float.class)) { - return new float[length]; - } else if (elementType.equals(double.class)) { - return new double[length]; - } else { - throw new IllegalArgumentException(); - } - } else { - return makeObjectArray(elementType, length); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/Constructor.java b/sgx-jvm/avian/classpath/java/lang/reflect/Constructor.java deleted file mode 100644 index ec7d306bbd..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/Constructor.java +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -import java.lang.annotation.Annotation; - -public class Constructor extends AccessibleObject implements Member { - private Method method; - - public Constructor(Method method) { - this.method = method; - } - - public boolean equals(Object o) { - return o instanceof Constructor - && ((Constructor) o).method.equals(method); - } - - public boolean isAccessible() { - return method.isAccessible(); - } - - public void setAccessible(boolean v) { - method.setAccessible(v); - } - - public Class getDeclaringClass() { - return method.getDeclaringClass(); - } - - public Class[] getParameterTypes() { - return method.getParameterTypes(); - } - - public int getModifiers() { - return method.getModifiers(); - } - - public boolean isSynthetic() { - return method.isSynthetic(); - } - - public String getName() { - return method.getName(); - } - - public T getAnnotation(Class class_) { - return method.getAnnotation(class_); - } - - public Annotation[] getAnnotations() { - return method.getAnnotations(); - } - - public Annotation[] getDeclaredAnnotations() { - return method.getDeclaredAnnotations(); - } - - private static native Object make(avian.VMClass c); - - public T newInstance(Object ... arguments) - throws InvocationTargetException, InstantiationException, - IllegalAccessException - { - T v = (T) make(method.getDeclaringClass().vmClass); - method.invoke(v, arguments); - return v; - } - - public Class[] getExceptionTypes() { - throw new UnsupportedOperationException("not yet implemented"); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/Field.java b/sgx-jvm/avian/classpath/java/lang/reflect/Field.java deleted file mode 100644 index 91d3b68f5c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/Field.java +++ /dev/null @@ -1,401 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -import avian.VMField; -import avian.AnnotationInvocationHandler; -import avian.SystemClassLoader; -import avian.Classes; - -import java.lang.annotation.Annotation; - -public class Field extends AccessibleObject implements Member { - private static final int VoidField = 0; - private static final int ByteField = 1; - private static final int CharField = 2; - private static final int DoubleField = 3; - private static final int FloatField = 4; - private static final int IntField = 5; - private static final int LongField = 6; - private static final int ShortField = 7; - private static final int BooleanField = 8; - private static final int ObjectField = 9; - - private final VMField vmField; - private boolean accessible = true; - - public Field(VMField vmField) { - this.vmField = vmField; - } - - public boolean isAccessible() { - return accessible; - } - - public void setAccessible(boolean v) { - accessible = v; - } - - public Class getDeclaringClass() { - return SystemClassLoader.getClass(vmField.class_); - } - - public int getModifiers() { - return vmField.flags; - } - - public boolean isSynthetic() { - return (vmField.flags & ACC_SYNTHETIC) != 0; - } - - public String getName() { - return getName(vmField); - } - - public static String getName(VMField vmField) { - return Classes.makeString(vmField.name, 0, vmField.name.length - 1); - } - - public Class getType() { - return Classes.forCanonicalName - (vmField.class_.loader, - Classes.makeString(vmField.spec, 0, vmField.spec.length - 1)); - } - - public Type getGenericType() { - if (vmField.addendum == null || vmField.addendum.signature == null) { - return getType(); - } - String signature = Classes.toString((byte[]) vmField.addendum.signature); - return SignatureParser.parse(vmField.class_.loader, signature, getDeclaringClass()); - } - - public Object get(Object instance) throws IllegalAccessException { - Object target; - if ((vmField.flags & Modifier.STATIC) != 0) { - target = vmField.class_.staticTable; - } else if (Class.isInstance(vmField.class_, instance)) { - target = instance; - } else { - throw new IllegalArgumentException(); - } - - Classes.initialize(vmField.class_); - - switch (vmField.code) { - case ByteField: - return Byte.valueOf - ((byte) getPrimitive(target, vmField.code, vmField.offset)); - - case BooleanField: - return Boolean.valueOf - (getPrimitive(target, vmField.code, vmField.offset) != 0); - - case CharField: - return Character.valueOf - ((char) getPrimitive(target, vmField.code, vmField.offset)); - - case ShortField: - return Short.valueOf - ((short) getPrimitive(target, vmField.code, vmField.offset)); - - case IntField: - return Integer.valueOf - ((int) getPrimitive(target, vmField.code, vmField.offset)); - - case LongField: - return Long.valueOf - (getPrimitive(target, vmField.code, vmField.offset)); - - case FloatField: - return Float.valueOf - (Float.intBitsToFloat - ((int) getPrimitive(target, vmField.code, vmField.offset))); - - case DoubleField: - return Double.valueOf - (Double.longBitsToDouble - (getPrimitive(target, vmField.code, vmField.offset))); - - case ObjectField: - return getObject(target, vmField.offset); - - default: - throw new Error(); - } - } - - public boolean getBoolean(Object instance) throws IllegalAccessException { - return ((Boolean) get(instance)).booleanValue(); - } - - public byte getByte(Object instance) throws IllegalAccessException { - return ((Byte) get(instance)).byteValue(); - } - - public short getShort(Object instance) throws IllegalAccessException { - return ((Short) get(instance)).shortValue(); - } - - public char getChar(Object instance) throws IllegalAccessException { - return ((Character) get(instance)).charValue(); - } - - public int getInt(Object instance) throws IllegalAccessException { - return ((Integer) get(instance)).intValue(); - } - - public float getFloat(Object instance) throws IllegalAccessException { - return ((Float) get(instance)).floatValue(); - } - - public long getLong(Object instance) throws IllegalAccessException { - return ((Long) get(instance)).longValue(); - } - - public double getDouble(Object instance) throws IllegalAccessException { - return ((Double) get(instance)).doubleValue(); - } - - private boolean matchType(Object value) { - switch (vmField.code) { - case ByteField: - return value instanceof Byte; - - case BooleanField: - return value instanceof Boolean; - - case CharField: - return value instanceof Character; - - case ShortField: - return value instanceof Short; - - case IntField: - return value instanceof Integer; - - case LongField: - return value instanceof Long; - - case FloatField: - return value instanceof Float; - - case DoubleField: - return value instanceof Double; - - case ObjectField: - return value == null || getType().isInstance(value); - - default: - throw new Error(); - } - } - - public void set(Object instance, Object value) - throws IllegalAccessException - { - Object target; - if ((vmField.flags & Modifier.STATIC) != 0) { - target = vmField.class_.staticTable; - } else if (Class.isInstance(vmField.class_, instance)) { - target = instance; - } else { - throw new IllegalArgumentException(); - } - - if (! matchType(value)) { - throw new IllegalArgumentException(); - } - - Classes.initialize(vmField.class_); - - switch (vmField.code) { - case ByteField: - setPrimitive(target, vmField.code, vmField.offset, (Byte) value); - break; - - case BooleanField: - setPrimitive - (target, vmField.code, vmField.offset, ((Boolean) value) ? 1 : 0); - break; - - case CharField: - setPrimitive(target, vmField.code, vmField.offset, (Character) value); - break; - - case ShortField: - setPrimitive(target, vmField.code, vmField.offset, (Short) value); - break; - - case IntField: - setPrimitive(target, vmField.code, vmField.offset, (Integer) value); - break; - - case LongField: - setPrimitive(target, vmField.code, vmField.offset, (Long) value); - break; - - case FloatField: - setPrimitive(target, vmField.code, vmField.offset, - Float.floatToRawIntBits((Float) value)); - break; - - case DoubleField: - setPrimitive(target, vmField.code, vmField.offset, - Double.doubleToRawLongBits((Double) value)); - break; - - case ObjectField: - setObject(target, vmField.offset, value); - break; - - default: - throw new Error(); - } - } - - private void set(Object instance, long value) - throws IllegalAccessException - { - Object target; - if ((vmField.flags & Modifier.STATIC) != 0) { - target = vmField.class_.staticTable; - } else if (Class.isInstance(vmField.class_, instance)) { - target = instance; - } else { - throw new IllegalArgumentException(); - } - - Classes.initialize(vmField.class_); - - switch (vmField.code) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case IntField: - case LongField: - case FloatField: - case DoubleField: - setPrimitive(target, vmField.code, vmField.offset, value); - break; - - default: - throw new IllegalArgumentException - ("needed " + getType() + ", got primitive type when setting " - + Class.getName(vmField.class_) + "." + getName()); - } - } - - public void setByte(Object instance, byte value) - throws IllegalAccessException - { - set(instance, value & 0xff); - } - - public void setBoolean(Object instance, boolean value) - throws IllegalAccessException - { - set(instance, value ? 1 : 0); - } - - public void setChar(Object instance, char value) - throws IllegalAccessException - { - set(instance, value & 0xffff); - } - - public void setShort(Object instance, short value) - throws IllegalAccessException - { - set(instance, value & 0xffff); - } - - public void setInt(Object instance, int value) - throws IllegalAccessException - { - set(instance, value & 0xffffffffl); - } - - public void setLong(Object instance, long value) - throws IllegalAccessException - { - set(instance, value); - } - - public void setFloat(Object instance, float value) - throws IllegalAccessException - { - set(instance, Float.floatToIntBits(value)); - } - - public void setDouble(Object instance, double value) - throws IllegalAccessException - { - set(instance, Double.doubleToLongBits(value)); - } - - private Annotation getAnnotation(Object[] a) { - if (a[0] == null) { - a[0] = Proxy.newProxyInstance - (vmField.class_.loader, new Class[] { (Class) a[1] }, - new AnnotationInvocationHandler(a)); - } - return (Annotation) a[0]; - } - - private boolean hasAnnotations() { - return vmField.addendum != null - && vmField.addendum.annotationTable != null; - } - - public T getAnnotation(Class class_) { - if (hasAnnotations()) { - Object[] table = (Object[]) vmField.addendum.annotationTable; - for (int i = 0; i < table.length; ++i) { - Object[] a = (Object[]) table[i]; - if (a[1] == class_) { - return (T) getAnnotation(a); - } - } - } - return null; - } - - public Annotation[] getAnnotations() { - if (hasAnnotations()) { - Object[] table = (Object[]) vmField.addendum.annotationTable; - Annotation[] array = new Annotation[table.length]; - for (int i = 0; i < table.length; ++i) { - array[i] = getAnnotation((Object[]) table[i]); - } - return array; - } else { - return new Annotation[0]; - } - } - - public Annotation[] getDeclaredAnnotations() { - return getAnnotations(); - } - - private static native long getPrimitive - (Object instance, int code, int offset); - - private static native Object getObject - (Object instance, int offset); - - private static native void setPrimitive - (Object instance, int code, int offset, long value); - - private static native void setObject - (Object instance, int offset, Object value); -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/GenericDeclaration.java b/sgx-jvm/avian/classpath/java/lang/reflect/GenericDeclaration.java deleted file mode 100644 index d167aeb549..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/GenericDeclaration.java +++ /dev/null @@ -1,5 +0,0 @@ -package java.lang.reflect; - -public interface GenericDeclaration { - TypeVariable[] getTypeParameters(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/InvocationHandler.java b/sgx-jvm/avian/classpath/java/lang/reflect/InvocationHandler.java deleted file mode 100644 index 02bd57f97c..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/InvocationHandler.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -public interface InvocationHandler { - public Object invoke(Object proxy, Method method, Object[] arguments) throws Throwable; -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/InvocationTargetException.java b/sgx-jvm/avian/classpath/java/lang/reflect/InvocationTargetException.java deleted file mode 100644 index da6d11956f..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/InvocationTargetException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -public class InvocationTargetException extends Exception { - private Throwable target; // for compatibility with OpenJDK - - public InvocationTargetException(Throwable targetException, String message) { - super(message, targetException); - } - - public InvocationTargetException(Throwable targetException) { - this(targetException, null); - } - - public InvocationTargetException() { - this(null, null); - } - - public Throwable getTargetException() { - return getCause(); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/Member.java b/sgx-jvm/avian/classpath/java/lang/reflect/Member.java deleted file mode 100644 index 4081b12b35..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/Member.java +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -public interface Member { - public static final int PUBLIC = 0; - public static final int DECLARED = 1; - - public Class getDeclaringClass(); - - public int getModifiers(); - - public String getName(); - - public boolean isSynthetic(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/Method.java b/sgx-jvm/avian/classpath/java/lang/reflect/Method.java deleted file mode 100644 index 705fc8ec16..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/Method.java +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -import avian.VMMethod; -import avian.AnnotationInvocationHandler; -import avian.SystemClassLoader; -import avian.Classes; - -import java.lang.annotation.Annotation; - -public class Method extends AccessibleObject implements Member { - public final VMMethod vmMethod; - private boolean accessible; - - public Method(VMMethod vmMethod) { - this.vmMethod = vmMethod; - } - - public boolean equals(Object o) { - return o instanceof Method && ((Method) o).vmMethod == vmMethod; - } - - public boolean isAccessible() { - return accessible; - } - - public void setAccessible(boolean v) { - accessible = v; - } - - public static native VMMethod getCaller(); - - public Class getDeclaringClass() { - return SystemClassLoader.getClass(vmMethod.class_); - } - - public int getModifiers() { - return vmMethod.flags; - } - - public String getName() { - return getName(vmMethod); - } - - public static String getName(VMMethod vmMethod) { - return Classes.makeString(vmMethod.name, 0, vmMethod.name.length - 1); - } - - private String getSpec() { - return getSpec(vmMethod); - } - - public static String getSpec(VMMethod vmMethod) { - return Classes.makeString(vmMethod.spec, 0, vmMethod.spec.length - 1); - } - - public Class[] getParameterTypes() { - return Classes.getParameterTypes(vmMethod); - } - - public Object invoke(Object instance, Object ... arguments) - throws InvocationTargetException, IllegalAccessException - { - if ((vmMethod.flags & Modifier.STATIC) != 0 - || Class.isInstance(vmMethod.class_, instance)) - { - if ((vmMethod.flags & Modifier.STATIC) != 0) { - instance = null; - } - - if (arguments == null) { - if (vmMethod.parameterCount > 0) { - throw new NullPointerException(); - } - arguments = new Object[0]; - } - - if (arguments.length == vmMethod.parameterCount) { - Classes.initialize(vmMethod.class_); - - return invoke(vmMethod, instance, arguments); - } else { - throw new ArrayIndexOutOfBoundsException(); - } - } else { -// System.out.println -// (getDeclaringClass() + "." + getName() + " flags: " + vmMethod.flags + " vm flags: " + vmMethod.vmFlags + " return code: " + vmMethod.returnCode); - throw new IllegalArgumentException(); - } - } - - private static native Object invoke(VMMethod method, Object instance, - Object ... arguments) - throws InvocationTargetException, IllegalAccessException; - - public Class getReturnType() { - for (int i = 0; i < vmMethod.spec.length - 1; ++i) { - if (vmMethod.spec[i] == ')') { - return Classes.forCanonicalName - (vmMethod.class_.loader, - Classes.makeString - (vmMethod.spec, i + 1, vmMethod.spec.length - i - 2)); - } - } - throw new RuntimeException(); - } - - public T getAnnotation(Class class_) { - if (vmMethod.hasAnnotations()) { - Object[] table = (Object[]) vmMethod.addendum.annotationTable; - for (int i = 0; i < table.length; ++i) { - Object[] a = (Object[]) table[i]; - if (a[1] == class_) { - return (T) Classes.getAnnotation(vmMethod.class_.loader, a); - } - } - } - return null; - } - - public Annotation[] getAnnotations() { - if (vmMethod.hasAnnotations()) { - Object[] table = (Object[]) vmMethod.addendum.annotationTable; - Annotation[] array = new Annotation[table.length]; - for (int i = 0; i < table.length; ++i) { - array[i] = Classes.getAnnotation - (vmMethod.class_.loader, (Object[]) table[i]); - } - return array; - } else { - return new Annotation[0]; - } - } - - public Annotation[] getDeclaredAnnotations() { - return getAnnotations(); - } - - public boolean isVarArgs() { - return (getModifiers() & ACC_VARARGS) != 0; - } - - public boolean isSynthetic() { - return (getModifiers() & ACC_SYNTHETIC) != 0; - } - - public Object getDefaultValue() { - ClassLoader loader = getDeclaringClass().getClassLoader(); - return Classes.getAnnotationDefaultValue(loader, vmMethod.addendum); - } - - public Class[] getExceptionTypes() { - throw new UnsupportedOperationException("not yet implemented"); - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/Modifier.java b/sgx-jvm/avian/classpath/java/lang/reflect/Modifier.java deleted file mode 100644 index 1b32f6a1f6..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/Modifier.java +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -public final class Modifier { - public static final int PUBLIC = 1 << 0; - public static final int PRIVATE = 1 << 1; - public static final int PROTECTED = 1 << 2; - public static final int STATIC = 1 << 3; - public static final int FINAL = 1 << 4; - public static final int SUPER = 1 << 5; - public static final int SYNCHRONIZED = SUPER; - public static final int VOLATILE = 1 << 6; - public static final int TRANSIENT = 1 << 7; - public static final int NATIVE = 1 << 8; - public static final int INTERFACE = 1 << 9; - public static final int ABSTRACT = 1 << 10; - public static final int STRICT = 1 << 11; - - private Modifier() { } - - public static boolean isPublic (int v) { return (v & PUBLIC) != 0; } - public static boolean isPrivate (int v) { return (v & PRIVATE) != 0; } - public static boolean isProtected(int v) { return (v & PROTECTED) != 0; } - public static boolean isStatic (int v) { return (v & STATIC) != 0; } - public static boolean isFinal (int v) { return (v & FINAL) != 0; } - public static boolean isTransient(int v) { return (v & TRANSIENT) != 0; } - public static boolean isSuper (int v) { return (v & SUPER) != 0; } - public static boolean isNative (int v) { return (v & NATIVE) != 0; } - public static boolean isAbstract (int v) { return (v & ABSTRACT) != 0; } - public static boolean isInterface(int v) { return (v & INTERFACE) != 0; } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/ParameterizedType.java b/sgx-jvm/avian/classpath/java/lang/reflect/ParameterizedType.java deleted file mode 100644 index 8a570f0c76..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/ParameterizedType.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -public interface ParameterizedType extends Type { - Type[] getActualTypeArguments(); - Type getOwnerType(); - Type getRawType(); -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/Proxy.java b/sgx-jvm/avian/classpath/java/lang/reflect/Proxy.java deleted file mode 100644 index 60bbedc7ec..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/Proxy.java +++ /dev/null @@ -1,430 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -import static avian.Stream.write1; -import static avian.Stream.write2; -import static avian.Stream.write4; -import static avian.Stream.set4; -import static avian.Assembler.*; - -import avian.SystemClassLoader; -import avian.Classes; - -import avian.ConstantPool; -import avian.ConstantPool.PoolEntry; - -import avian.Assembler; -import avian.Assembler.FieldData; -import avian.Assembler.MethodData; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.io.OutputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; - -public class Proxy { - private static int nextNumber; - - protected InvocationHandler h; - protected final static Map methodRefsMap = - new HashMap(); - protected final Method[] methodRefs; - - public Proxy() { - methodRefs = methodRefsMap.get(getClass()); - } - - public static Class getProxyClass(ClassLoader loader, - Class ... interfaces) - { - for (Class c: interfaces) { - if (! c.isInterface()) { - throw new IllegalArgumentException(); - } - } - - int number; - synchronized (Proxy.class) { - number = nextNumber++; - } - - try { - return makeClass(loader, interfaces, "Proxy-" + number); - } catch (IOException e) { - AssertionError error = new AssertionError(); - error.initCause(e); - throw error; - } - } - - public static boolean isProxyClass(Class c) { - return c.getName().startsWith("Proxy-"); - } - - public static InvocationHandler getInvocationHandler(Object proxy) { - return ((Proxy) proxy).h; - } - - private static byte[] makeInvokeCode(List pool, - String className, - byte[] spec, - int parameterCount, - int parameterFootprint, - int index) - throws IOException - { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - write2(out, 8); // max stack - write2(out, parameterFootprint); // max locals - write4(out, 0); // length (we'll set the real value later) - - write1(out, aload_0); - write1(out, getfield); - write2(out, ConstantPool.addFieldRef - (pool, "java/lang/reflect/Proxy", - "h", "Ljava/lang/reflect/InvocationHandler;") + 1); - - write1(out, aload_0); - - write1(out, aload_0); - write1(out, getfield); - write2(out, ConstantPool.addFieldRef - (pool, className, - "methodRefs", "[Ljava/lang/reflect/Method;") + 1); - write1(out, ldc_w); - write2(out, ConstantPool.addInteger(pool, index) + 1); - write1(out, aaload); - - write1(out, ldc_w); - write2(out, ConstantPool.addInteger(pool, parameterCount) + 1); - write1(out, anewarray); - write2(out, ConstantPool.addClass(pool, "java/lang/Object") + 1); - - int ai = 0; - int si; - for (si = 1; spec[si] != ')'; ++si) { - write1(out, dup); - - write1(out, ldc_w); - write2(out, ConstantPool.addInteger(pool, ai) + 1); - - switch (spec[si]) { - case 'L': - ++ si; - while (spec[si] != ';') ++si; - - write1(out, aload); - write1(out, ai + 1); - break; - - case '[': - ++ si; - while (spec[si] == '[') ++si; - switch (spec[si]) { - case 'L': - ++ si; - while (spec[si] != ';') ++si; - break; - - default: - break; - } - - write1(out, aload); - write1(out, ai + 1); - break; - - case 'Z': - write1(out, iload); - write1(out, ai + 1); - - write1(out, invokestatic); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Boolean", - "valueOf", "(Z)Ljava/lang/Boolean;") + 1); - break; - - case 'B': - write1(out, iload); - write1(out, ai + 1); - - write1(out, invokestatic); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Byte", - "valueOf", "(B)Ljava/lang/Byte;") + 1); - break; - - case 'S': - write1(out, iload); - write1(out, ai + 1); - - write1(out, invokestatic); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Short", - "valueOf", "(S)Ljava/lang/Short;") + 1); - break; - - case 'C': - write1(out, iload); - write1(out, ai + 1); - - write1(out, invokestatic); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Character", - "valueOf", "(C)Ljava/lang/Character;") + 1); - break; - - case 'I': - write1(out, iload); - write1(out, ai + 1); - - write1(out, invokestatic); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Integer", - "valueOf", "(I)Ljava/lang/Integer;") + 1); - break; - - case 'F': - write1(out, fload); - write1(out, ai + 1); - - write1(out, invokestatic); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Float", - "valueOf", "(F)Ljava/lang/Float;") + 1); - break; - - case 'J': - write1(out, lload); - write1(out, ai + 1); - - write1(out, invokestatic); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Long", - "valueOf", "(J)Ljava/lang/Long;") + 1); - ++ ai; - break; - - case 'D': - write1(out, dload); - write1(out, ai + 1); - - write1(out, invokestatic); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Double", - "valueOf", "(D)Ljava/lang/Double;") + 1); - ++ ai; - break; - - default: throw new IllegalArgumentException(); - } - - write1(out, aastore); - - ++ ai; - } - - write1(out, invokeinterface); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/reflect/InvocationHandler", - "invoke", - "(Ljava/lang/Object;" - + "Ljava/lang/reflect/Method;" - + "[Ljava/lang/Object;)" - + "Ljava/lang/Object;") + 1); - write2(out, 0); // this will be ignored by the VM - - switch (spec[si + 1]) { - case 'L': - case '[': - write1(out, areturn); - break; - - case 'Z': - write1(out, invokevirtual); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Boolean", "booleanValue", "()Z") + 1); - write1(out, ireturn); - break; - - case 'B': - write1(out, invokevirtual); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Byte", "byteValue", "()B") + 1); - write1(out, ireturn); - break; - - case 'C': - write1(out, invokevirtual); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Character", "charValue", "()C") + 1); - write1(out, ireturn); - break; - - case 'S': - write1(out, invokevirtual); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Short", "shortValue", "()S") + 1); - write1(out, ireturn); - break; - - case 'I': - write1(out, invokevirtual); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Integer", "intValue", "()I") + 1); - write1(out, ireturn); - break; - - case 'F': - write1(out, invokevirtual); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Float", "floatValue", "()F") + 1); - write1(out, freturn); - break; - - case 'J': - write1(out, invokevirtual); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Long", "longValue", "()J") + 1); - write1(out, lreturn); - break; - - case 'D': - write1(out, invokevirtual); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/Double", "doubleValue", "()D") + 1); - write1(out, dreturn); - break; - - case 'V': - write1(out, pop); - write1(out, return_); - break; - - default: throw new IllegalArgumentException(); - } - - write2(out, 0); // exception handler table length - write2(out, 0); // attribute count - - byte[] result = out.toByteArray(); - set4(result, 4, result.length - 12); - - return result; - } - - private static byte[] makeConstructorCode(List pool) - throws IOException - { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - write2(out, 2); // max stack - write2(out, 2); // max locals - write4(out, 10); // length - - write1(out, aload_0); - write1(out, invokespecial); - write2(out, ConstantPool.addMethodRef - (pool, "java/lang/reflect/Proxy", - "", "()V") + 1); - - write1(out, aload_0); - write1(out, aload_1); - write1(out, putfield); - write2(out, ConstantPool.addFieldRef - (pool, "java/lang/reflect/Proxy", - "h", "Ljava/lang/reflect/InvocationHandler;") + 1); - write1(out, return_); - - write2(out, 0); // exception handler table length - write2(out, 0); // attribute count - - return out.toByteArray(); - } - - private static Class makeClass(ClassLoader loader, - Class[] interfaces, - String name) - throws IOException - { - List pool = new ArrayList(); - - int[] interfaceIndexes = new int[interfaces.length]; - for (int i = 0; i < interfaces.length; ++i) { - interfaceIndexes[i] = ConstantPool.addClass - (pool, interfaces[i].getName().replace('.', '/')); - } - - Set specs = new HashSet(); - List methodTable = new ArrayList(); - List refs = new ArrayList(); - for (Class c: interfaces) { - avian.VMMethod[] ivtable = SystemClassLoader.vmClass(c).virtualTable; - if (ivtable != null) { - for (avian.VMMethod m: ivtable) { - String spec = Classes.toString(m.name) + Classes.toString(m.spec); - if (specs.contains(spec)) { - continue; - } - methodTable.add(new MethodData - (Modifier.PUBLIC, - ConstantPool.addUtf8(pool, Classes.toString(m.name)), - ConstantPool.addUtf8(pool, Classes.toString(m.spec)), - makeInvokeCode(pool, name, m.spec, m.parameterCount, - m.parameterFootprint, methodTable.size()))); - refs.add(Classes.makeMethod(m)); - } - } - } - - methodTable.add(new MethodData - (Modifier.PUBLIC, - ConstantPool.addUtf8(pool, ""), - ConstantPool.addUtf8 - (pool, "(Ljava/lang/reflect/InvocationHandler;)V"), - makeConstructorCode(pool))); - - int nameIndex = ConstantPool.addClass(pool, name); - int superIndex = ConstantPool.addClass(pool, "java/lang/reflect/Proxy"); - - ByteArrayOutputStream out = new ByteArrayOutputStream(); - Assembler.writeClass - (out, pool, nameIndex, superIndex, interfaceIndexes, - new FieldData[0], - methodTable.toArray(new MethodData[methodTable.size()])); - - byte[] classData = out.toByteArray(); - Class result = avian.SystemClassLoader.getClass - (avian.Classes.defineVMClass(loader, classData, 0, classData.length)); - methodRefsMap.put(result, refs.toArray(new Method[refs.size()])); - return result; - } - - public static Object newProxyInstance(ClassLoader loader, - Class[] interfaces, - InvocationHandler handler) - { - try { - return Proxy.getProxyClass(loader, interfaces) - .getConstructor(new Class[] { InvocationHandler.class }) - .newInstance(new Object[] { handler }); - } catch (Exception e) { - AssertionError error = new AssertionError(); - error.initCause(e); - throw error; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/SignatureParser.java b/sgx-jvm/avian/classpath/java/lang/reflect/SignatureParser.java deleted file mode 100644 index b32f4fdc24..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/SignatureParser.java +++ /dev/null @@ -1,258 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -import avian.Classes; - -import java.util.ArrayList; -import java.util.List; -import java.util.LinkedList; -import java.util.Map; -import java.util.HashMap; - -public class SignatureParser { - private final ClassLoader loader; - private final char[] array; - private final String signature; - private int offset; - private final Type type; - private final Map typeVariables; - - public static Type parse(ClassLoader loader, String signature, Class declaringClass) { - return new SignatureParser(loader, signature, collectTypeVariables(declaringClass)).type; - } - - private static Type parse(ClassLoader loader, String signature, Map typeVariables) { - return new SignatureParser(loader, signature, typeVariables).type; - } - - private SignatureParser(ClassLoader loader, String signature, Map typeVariables) { - this.loader = loader; - this.signature = signature; - array = signature.toCharArray(); - this.typeVariables = typeVariables; - type = parseType(); - if (offset != array.length) { - throw new IllegalArgumentException("Extra characters after " + offset - + ": " + signature); - } - } - - private Type parseType() { - char c = array[offset++]; - if (c == 'B') { - return Byte.TYPE; - } else if (c == 'C') { - return Character.TYPE; - } else if (c == 'D') { - return Double.TYPE; - } else if (c == 'F') { - return Float.TYPE; - } else if (c == 'I') { - return Integer.TYPE; - } else if (c == 'J') { - return Long.TYPE; - } else if (c == 'S') { - return Short.TYPE; - } else if (c == 'Z') { - return Boolean.TYPE; - } else if (c == 'T') { - int end = signature.indexOf(';', offset); - if (end < 0) { - throw new RuntimeException("No semicolon found while parsing signature"); - } - Type res = typeVariables.get(new String(array, offset, end - offset)); - offset = end + 1; - return res; - } else if (c != 'L') { - throw new IllegalArgumentException("Unexpected character: " + c + ", signature: " + new String(array, 0, array.length) + ", i = " + offset); - } - StringBuilder builder = new StringBuilder(); - Type ownerType = null; - for (;;) { - for (;;) { - c = array[offset++]; - if (c == ';' || c == '<') { - break; - } - builder.append(c == '/' ? '.' : c); - } - String rawTypeName = builder.toString(); - Class rawType; - try { - rawType = loader.loadClass(rawTypeName); - } catch (ClassNotFoundException e) { - throw new RuntimeException("Could not find class " + rawTypeName); - } - - int lastDollar = rawTypeName.lastIndexOf('$'); - if (lastDollar != -1 && ownerType == null) { - String ownerName = rawTypeName.substring(0, lastDollar); - try { - ownerType = loader.loadClass(ownerName); - } catch (ClassNotFoundException e) { - throw new RuntimeException("Could not find class " + ownerName); - } - } - - if (c == ';') { - return rawType; - } - List args = new ArrayList(); - while (array[offset] != '>') { - args.add(parseType()); - } - ++offset; - c = array[offset++]; - ParameterizedType type = makeType(args.toArray(new Type[args.size()]), ownerType, rawType); - if (c == ';') { - return type; - } - if (c != '.') { - throw new RuntimeException("TODO"); - } - ownerType = type; - builder.append("$"); - } - } - - private static String typeName(Type type) { - if (type instanceof Class) { - Class clazz = (Class) type; - return clazz.getName(); - } - return type.toString(); - } - - private static ParameterizedType makeType(final Type[] args, final Type owner, final Type raw) { - return new ParameterizedType() { - @Override - public Type getRawType() { - return raw; - } - - @Override - public Type getOwnerType() { - return owner; - } - - @Override - public Type[] getActualTypeArguments() { - return args; - } - - @Override - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append(typeName(raw)); - builder.append('<'); - String sep = ""; - for (Type t : args) { - builder.append(sep).append(typeName(t)); - sep = ", "; - } - builder.append('>'); - return builder.toString(); - } - }; - } - - private static Map collectTypeVariables(Class clz) { - Map varsMap = new HashMap(); - LinkedList classList = new LinkedList(); - for (Class c = clz; c != null; c = c.getDeclaringClass()) { - classList.addFirst(c); - } - - for (Class cur : classList) { - final LinkedList varsList = new LinkedList(); - if (cur.vmClass.addendum != null && cur.vmClass.addendum.signature != null) { - String signature = Classes.toString((byte[]) cur.vmClass.addendum.signature); - final char[] signChars = signature.toCharArray(); - try { - int i = 0; - if (signChars[i] == '<') { - i++; - do { - final int colon = signature.indexOf(':', i); - if (colon < 0 || colon + 1 == signChars.length) { - throw new RuntimeException("Can't find ':' in the signature " + signature + " starting from " + i); - } - String typeVarName = new String(signChars, i, colon - i); - i = colon + 1; - - int start = i; - int angles = 0; - while (angles > 0 || signChars[i] != ';') { - if (signChars[i] == '<') angles ++; - else if (signChars[i] == '>') angles --; - i++; - } - String typeName = new String(signChars, start, i - start + 1); - final Type baseType = SignatureParser.parse(cur.vmClass.loader, typeName, varsMap); - - TypeVariableImpl tv = new TypeVariableImpl(typeVarName, baseType); - varsList.add(tv); - - i++; - } while (signChars[i] != '>'); - - } - } catch (IndexOutOfBoundsException e) { - throw new RuntimeException("Signature of " + cur + " is broken (" + signature + ") and can't be parsed", e); - } - } - for (TypeVariableImpl tv : varsList) { - tv.setVars(varsList); - varsMap.put(tv.getName(), tv); - } - cur = cur.getDeclaringClass(); - }; - return varsMap; - } - - private static class TypeVariableImpl implements TypeVariable { - private String name; - private Type baseType; - private TypeVariableImpl[] vars; - - public Type[] getBounds() { - return new Type[] { baseType }; - } - - public GenericDeclaration getGenericDeclaration() { - return new GenericDeclaration() { - public TypeVariable[] getTypeParameters() { - return vars; - } - }; - } - - public String getName() { - return name; - } - - TypeVariableImpl(String name, Type baseType) { - this.name = name; - this.baseType = baseType; - } - - void setVars(List vars) { - this.vars = new TypeVariableImpl[vars.size()]; - vars.toArray(this.vars); - } - - @Override - public String toString() { - return name; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/Type.java b/sgx-jvm/avian/classpath/java/lang/reflect/Type.java deleted file mode 100644 index c4deabf16e..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/Type.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.lang.reflect; - -public interface Type { } diff --git a/sgx-jvm/avian/classpath/java/lang/reflect/TypeVariable.java b/sgx-jvm/avian/classpath/java/lang/reflect/TypeVariable.java deleted file mode 100644 index 5d01787ada..0000000000 --- a/sgx-jvm/avian/classpath/java/lang/reflect/TypeVariable.java +++ /dev/null @@ -1,7 +0,0 @@ -package java.lang.reflect; - -public interface TypeVariable extends Type { - Type[] getBounds(); - D getGenericDeclaration(); - String getName(); -} diff --git a/sgx-jvm/avian/classpath/java/math/BigInteger.java b/sgx-jvm/avian/classpath/java/math/BigInteger.java deleted file mode 100644 index 54df95b9e8..0000000000 --- a/sgx-jvm/avian/classpath/java/math/BigInteger.java +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.math; - -import java.io.Serializable; - -public class BigInteger implements Serializable { - - private int sign; - private int[] value; - - private BigInteger(int sign, long value) { - this.sign = sign; - int upperBits = (int) (value >>> 32); - if (upperBits == 0) - // Array with one element - this.value = new int[] { (int) value }; - else - // Array with two elements - this.value = new int[] { (int) value, upperBits }; - } - - public static final BigInteger ZERO = new BigInteger(0, 0); - public static final BigInteger ONE = new BigInteger(1, 1); - public static final BigInteger TEN = new BigInteger(1, 10); - - public static BigInteger valueOf(long num) { - int signum = Long.signum(num); - if (signum == 0) - return BigInteger.ZERO; - else if (signum > 0) - return new BigInteger(signum, num); - else - return new BigInteger(signum, -num); - } -} diff --git a/sgx-jvm/avian/classpath/java/math/MathContext.java b/sgx-jvm/avian/classpath/java/math/MathContext.java deleted file mode 100644 index 8a8fe79607..0000000000 --- a/sgx-jvm/avian/classpath/java/math/MathContext.java +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.math; - -import java.io.Serializable; - -public final class MathContext implements Serializable { - - public static final MathContext DECIMAL32 = new MathContext( 7, RoundingMode.HALF_EVEN); - public static final MathContext DECIMAL64 = new MathContext(16, RoundingMode.HALF_EVEN); - public static final MathContext DECIMAL128 = new MathContext(34, RoundingMode.HALF_EVEN); - public static final MathContext UNLIMITED = new MathContext(0, RoundingMode.HALF_UP); - - private int precision; - private RoundingMode roundingMode; - - public MathContext(int precision, RoundingMode roundingMode) { - if (precision < 0) - throw new IllegalArgumentException(); - if (roundingMode == null) - throw new NullPointerException(); - this.precision = precision; - this.roundingMode = roundingMode; - } - - public MathContext(int precision) { - this(precision, RoundingMode.HALF_UP); - } - - public int getPrecision() { - return precision; - } - - public RoundingMode getRoundingMode() { - return roundingMode; - } - - @Override - public boolean equals(Object that) { - return - (that instanceof MathContext) && - (precision == ((MathContext) that).getPrecision()) && - (roundingMode == ((MathContext) that).getRoundingMode()); - } - - @Override - public int hashCode() { - return - roundingMode.ordinal() | - (precision << 4); - } - - private final static String precisionString = "precision="; - private final static String roundingModeString = " roundingMode="; - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(48); - sb.append(precisionString).append(precision); - sb.append(roundingModeString).append(roundingMode); - return sb.toString(); - } -} diff --git a/sgx-jvm/avian/classpath/java/math/RoundingMode.java b/sgx-jvm/avian/classpath/java/math/RoundingMode.java deleted file mode 100644 index 4ea32d8e30..0000000000 --- a/sgx-jvm/avian/classpath/java/math/RoundingMode.java +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.math; - -public enum RoundingMode { - - UP (0), - DOWN (1), - CEILING (2), - FLOOR (3), - HALF_UP (4), - HALF_DOWN (5), - HALF_EVEN (6), - UNNECESSARY(7); - - RoundingMode(int rm) { - roundingMode = rm; - } - - private final int roundingMode; - - public static RoundingMode valueOf(int roundingMode) { - final RoundingMode[] values = values(); - if (roundingMode < 0 || roundingMode >= values.length) - throw new IllegalArgumentException(); - return values[roundingMode]; - } -} diff --git a/sgx-jvm/avian/classpath/java/net/InetAddress.java b/sgx-jvm/avian/classpath/java/net/InetAddress.java deleted file mode 100644 index 9bb8031362..0000000000 --- a/sgx-jvm/avian/classpath/java/net/InetAddress.java +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.IOException; - -public class InetAddress { - - public String getHostName() { - return null; - } - - public String getHostAddress() { - return null; - } - - public byte[] getAddress() { - return null; - } - - public int getRawAddress() { - return -1; - } -} diff --git a/sgx-jvm/avian/classpath/java/net/JarURLConnection.java b/sgx-jvm/avian/classpath/java/net/JarURLConnection.java deleted file mode 100644 index bdfa5834fb..0000000000 --- a/sgx-jvm/avian/classpath/java/net/JarURLConnection.java +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.IOException; -import java.util.jar.JarFile; - -public abstract class JarURLConnection extends URLConnection { - public JarURLConnection(URL url) { - super(url); - } - - public abstract JarFile getJarFile() throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/net/MalformedURLException.java b/sgx-jvm/avian/classpath/java/net/MalformedURLException.java deleted file mode 100644 index a635c7d457..0000000000 --- a/sgx-jvm/avian/classpath/java/net/MalformedURLException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -public class MalformedURLException extends Exception { - public MalformedURLException(String message) { - super(message); - } - - public MalformedURLException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/net/ProtocolFamily.java b/sgx-jvm/avian/classpath/java/net/ProtocolFamily.java deleted file mode 100644 index 7cbaaad567..0000000000 --- a/sgx-jvm/avian/classpath/java/net/ProtocolFamily.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -public interface ProtocolFamily { } diff --git a/sgx-jvm/avian/classpath/java/net/SocketException.java b/sgx-jvm/avian/classpath/java/net/SocketException.java deleted file mode 100644 index 6d3da998ea..0000000000 --- a/sgx-jvm/avian/classpath/java/net/SocketException.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.IOException; - -public class SocketException extends IOException { - public SocketException(String message) { - super(message); - } - - public SocketException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/net/StandardProtocolFamily.java b/sgx-jvm/avian/classpath/java/net/StandardProtocolFamily.java deleted file mode 100644 index 4a7f1e8a4e..0000000000 --- a/sgx-jvm/avian/classpath/java/net/StandardProtocolFamily.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -public enum StandardProtocolFamily implements ProtocolFamily { - INET; -} diff --git a/sgx-jvm/avian/classpath/java/net/URL.java b/sgx-jvm/avian/classpath/java/net/URL.java deleted file mode 100644 index 87a4683444..0000000000 --- a/sgx-jvm/avian/classpath/java/net/URL.java +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.IOException; -import java.io.InputStream; - -public final class URL { - private final URLStreamHandler handler; - private String protocol; - private String host; - private int port; - private String file; - private String path; - private String query; - private String ref; - - public URL(String s) throws MalformedURLException { - int colon = s.indexOf(':'); - int slash = s.indexOf('/'); - if (colon > 0 && (slash < 0 || colon < slash)) { - handler = findHandler(s.substring(0, colon)); - handler.parseURL(this, s, colon + 1, s.length()); - } else { - throw new MalformedURLException(s); - } - } - - public String toString() { - return handler.toExternalForm(this); - } - - public String getProtocol() { - return protocol; - } - - public String getHost() { - return host; - } - - public int getPort() { - return port; - } - - public String getFile() { - return file; - } - - public String getRef() { - return ref; - } - - public String getPath() { - return path; - } - - public String getQuery() { - return query; - } - - public URLConnection openConnection() throws IOException { - return handler.openConnection(this); - } - - public InputStream openStream() throws IOException { - return openConnection().getInputStream(); - } - - public Object getContent() throws IOException { - return openStream(); - } - - private static URLStreamHandler findHandler(String protocol) - throws MalformedURLException - { - if ("avianvmresource".equals(protocol)) { - return new avian.avianvmresource.Handler(); - } else if ("file".equals(protocol)) { - return new avian.file.Handler(); - } else if ("jar".equals(protocol)) { - return new avian.jar.Handler(); - } else { - throw new MalformedURLException("unknown protocol: " + protocol); - } - } - - public void set(String protocol, String host, int port, String file, - String ref) - { - this.protocol = protocol; - this.host = host; - this.port = port; - this.file = file; - this.ref = ref; - - int q = file == null ? -1 : file.lastIndexOf('?'); - if (q != -1) { - this.query = file.substring(q + 1); - this.path = file.substring(0, q); - } else { - this.path = file; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/net/URLClassLoader.java b/sgx-jvm/avian/classpath/java/net/URLClassLoader.java deleted file mode 100644 index 2d210f13af..0000000000 --- a/sgx-jvm/avian/classpath/java/net/URLClassLoader.java +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.File; - -import java.io.InputStream; -import java.io.IOException; -import java.io.ByteArrayOutputStream; - -public class URLClassLoader extends ClassLoader { - - private final File jarFile; - - public URLClassLoader(URL[] urls, ClassLoader parent) { - super(parent); - if(urls.length != 1) { - throw new UnsupportedOperationException(); - } - if(!urls[0].getProtocol().equals("file")) { - throw new UnsupportedOperationException(urls[0].getProtocol()); - } - this.jarFile = new File(urls[0].getFile()); - } - - - protected Class findClass(String name) throws ClassNotFoundException { - try { - InputStream stream = getResourceAsStream(name.replace(".", "/") + ".class"); - if(stream == null) { - throw new ClassNotFoundException("couldn't find class " + name); - } - byte[] buf = new byte[2048]; - ByteArrayOutputStream mem = new ByteArrayOutputStream(); - try { - int size; - while((size = stream.read(buf, 0, buf.length)) > 0) { - mem.write(buf, 0, size); - } - byte[] data = mem.toByteArray(); - return defineClass(name, data, 0, data.length); - } finally { - stream.close(); - } - } catch(IOException e) { - throw new ClassNotFoundException("couldn't find class " + name, e); - } - } - - public URL getResource(String path) { - try { - return new URL("jar:file:" + jarFile.getAbsolutePath() + "!/" + path); - } catch(MalformedURLException e) { - throw new RuntimeException(e); - } - } - - -} \ No newline at end of file diff --git a/sgx-jvm/avian/classpath/java/net/URLConnection.java b/sgx-jvm/avian/classpath/java/net/URLConnection.java deleted file mode 100644 index 59330e0bfe..0000000000 --- a/sgx-jvm/avian/classpath/java/net/URLConnection.java +++ /dev/null @@ -1,102 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public abstract class URLConnection { - protected final URL url; - protected boolean doInput = true; - protected boolean doOutput = false; - protected boolean useCaches = true; - - protected URLConnection(URL url) { - this.url = url; - } - - public Object getContent() throws IOException { - return getInputStream(); - } - - public int getContentLength() { - return -1; - } - - public long getContentLengthLong() { - return -1l; - } - - public abstract void connect() throws IOException; - - public InputStream getInputStream() throws IOException { - throw new UnknownServiceException(); - } - - public OutputStream getOutputStream() throws IOException { - throw new UnknownServiceException(); - } - - public boolean getDoInput() { - return doInput; - } - - public boolean getDoOutput() { - return doOutput; - } - - public void setDoInput(boolean v) { - doInput = v; - } - - public void setDoOutput(boolean v) { - doInput = v; - } - - public void setUseCaches(boolean v) { - useCaches = v; - } - - public String getHeaderField(String name) { - String result = null; - if(name != null) { - List values = getHeaderFields().get(name.toLowerCase()); - if (values != null && values.size() > 0) { - result = values.get(0); - } - } - - return result; - } - - public int getHeaderFieldInt(String name, int Default) { - return (int) getHeaderFieldLong(name, Default); - } - - public long getHeaderFieldLong(String name, long Default) { - long result = Default; - try { - result = Long.parseLong(getHeaderField(name)); - } catch(Exception e) { - // Do nothing, default will be returned - } - - return result; - } - - public Map> getHeaderFields() { - return Collections.emptyMap(); - } -} diff --git a/sgx-jvm/avian/classpath/java/net/URLStreamHandler.java b/sgx-jvm/avian/classpath/java/net/URLStreamHandler.java deleted file mode 100644 index 3699c73d18..0000000000 --- a/sgx-jvm/avian/classpath/java/net/URLStreamHandler.java +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.IOException; - -public abstract class URLStreamHandler { - protected void parseURL(URL url, String s, int start, int end) - throws MalformedURLException - { - String protocol = s.substring(0, start - 1); - s = s.substring(start, end); - - String host = null; - int port = -1; - if (s.startsWith("//")) { - s = s.substring(2); - int colon = s.indexOf(':'); - int slash = s.indexOf('/'); - if (slash < 0) { - if (colon < 0) { - host = s; - } else { - host = s.substring(0, colon); - port = Integer.parseInt(s.substring(colon + 1)); - } - s = ""; - } else { - if (colon < 0 || colon > slash) { - host = s.substring(0, slash); - } else { - host = s.substring(0, colon); - port = Integer.parseInt(s.substring(colon + 1, slash)); - } - s = s.substring(slash); - } - } - - String file = null; - if (s.length() > 0) { - file = s; - } - - url.set(protocol, host, port, file, null); - } - - private static boolean equals(String a, String b) { - return (a == null && b == null) || (a != null && a.equals(b)); - } - - protected boolean equals(URL a, URL b) { - return equals(a.getHost(), b.getHost()) - && (a.getPort() == b.getPort()) - && equals(a.getFile(), b.getFile()); - } - - protected String toExternalForm(URL url) { - StringBuilder sb = new StringBuilder(); - sb.append(url.getProtocol()).append(":"); - if (url.getHost() != null) { - sb.append("//").append(url.getHost()); - if (url.getPort() >= 0) { - sb.append(":").append(url.getPort()); - } - } - if (url.getFile() != null) { - sb.append(url.getFile()); - } - return sb.toString(); - } - - protected abstract URLConnection openConnection(URL url) throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/net/UnknownHostException.java b/sgx-jvm/avian/classpath/java/net/UnknownHostException.java deleted file mode 100644 index 4e4acd1ef3..0000000000 --- a/sgx-jvm/avian/classpath/java/net/UnknownHostException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.IOException; - -public class UnknownHostException extends IOException { - public UnknownHostException(String host) { - super(host); - } - - public UnknownHostException() { } -} diff --git a/sgx-jvm/avian/classpath/java/net/UnknownServiceException.java b/sgx-jvm/avian/classpath/java/net/UnknownServiceException.java deleted file mode 100644 index 1c415de16e..0000000000 --- a/sgx-jvm/avian/classpath/java/net/UnknownServiceException.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.net; - -import java.io.IOException; - -public class UnknownServiceException extends IOException { - public UnknownServiceException(String message) { - super(message); - } - - public UnknownServiceException() { - this(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/ArrayByteBuffer.java b/sgx-jvm/avian/classpath/java/nio/ArrayByteBuffer.java deleted file mode 100644 index d0e41a2e0c..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/ArrayByteBuffer.java +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -class ArrayByteBuffer extends ByteBuffer { - private final byte[] array; - private final int arrayOffset; - - ArrayByteBuffer(byte[] array, int offset, int length, boolean readOnly) { - super(readOnly); - - this.array = array; - this.arrayOffset = offset; - this.capacity = length; - this.limit = length; - this.position = 0; - } - - public ByteBuffer asReadOnlyBuffer() { - ByteBuffer b = new ArrayByteBuffer(array, arrayOffset, capacity, true); - b.position(position()); - b.limit(limit()); - return b; - } - - public boolean hasArray() { - return true; - } - - public byte[] array() { - return array; - } - - public ByteBuffer slice() { - return new ArrayByteBuffer - (array, arrayOffset + position, remaining(), true); - } - - public int arrayOffset() { - return arrayOffset; - } - - protected void doPut(int position, byte val) { - array[arrayOffset + position] = val; - } - - public ByteBuffer put(ByteBuffer src) { - int length = src.remaining(); - checkPut(position, length, false); - src.get(array, arrayOffset + position, length); - position += length; - return this; - } - - public ByteBuffer put(byte[] src, int offset, int length) { - checkPut(position, length, false); - - System.arraycopy(src, offset, array, arrayOffset + position, length); - position += length; - - return this; - } - - public ByteBuffer get(byte[] dst, int offset, int length) { - checkGet(position, length, false); - - System.arraycopy(array, arrayOffset + position, dst, offset, length); - position += length; - - return this; - } - - protected byte doGet(int position) { - return array[arrayOffset+position]; - } - - public String toString() { - return "(ArrayByteBuffer with array: " + array - + " arrayOffset: " + arrayOffset - + " position: " + position - + " limit: " + limit - + " capacity: " + capacity + ")"; - } - - @Override - public ByteBuffer duplicate() { - ByteBuffer b = new ArrayByteBuffer(array, arrayOffset, capacity, isReadOnly()); - b.limit(this.limit()); - b.position(this.position()); - return b; - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/ArrayCharBuffer.java b/sgx-jvm/avian/classpath/java/nio/ArrayCharBuffer.java deleted file mode 100644 index a4e93aa191..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/ArrayCharBuffer.java +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -class ArrayCharBuffer extends CharBuffer { - private final char[] array; - private final int arrayOffset; - - ArrayCharBuffer(char[] array, int offset, int length, boolean readOnly) { - super(readOnly); - - this.array = array; - this.arrayOffset = offset; - this.capacity = length; - this.limit = length; - this.position = 0; - } - - public CharBuffer asReadOnlyBuffer() { - CharBuffer b = new ArrayCharBuffer(array, arrayOffset, capacity, true); - b.position(position()); - b.limit(limit()); - return b; - } - - public boolean hasArray() { - return true; - } - - public char[] array() { - return array; - } - - public CharBuffer slice() { - return new ArrayCharBuffer - (array, arrayOffset + position, remaining(), true); - } - - public int arrayOffset() { - return arrayOffset; - } - - protected void doPut(int position, char val) { - array[arrayOffset + position] = val; - } - - public CharBuffer put(CharBuffer src) { - int length = src.remaining(); - checkPut(position, length, false); - src.get(array, arrayOffset + position, length); - position += length; - return this; - } - - public CharBuffer put(char[] src, int offset, int length) { - checkPut(position, length, false); - - System.arraycopy(src, offset, array, arrayOffset + position, length); - position += length; - - return this; - } - - public CharBuffer get(char[] dst, int offset, int length) { - checkGet(position, length, false); - - System.arraycopy(array, arrayOffset + position, dst, offset, length); - position += length; - - return this; - } - - protected char doGet(int position) { - return array[arrayOffset+position]; - } - - public String toString() { - return "(ArrayCharBuffer with array: " + array - + " arrayOffset: " + arrayOffset - + " position: " + position - + " limit: " + limit - + " capacity: " + capacity + ")"; - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/Buffer.java b/sgx-jvm/avian/classpath/java/nio/Buffer.java deleted file mode 100644 index f03e178a2b..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/Buffer.java +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -public abstract class Buffer { - protected int capacity; - protected int position; - protected int limit; - protected boolean readonly; - - public final int limit() { - return limit; - } - - public final int remaining() { - return limit-position; - } - - public final int position() { - return position; - } - - public final int capacity() { - return capacity; - } - - public final Buffer limit(int newLimit) { - limit = newLimit; - return this; - } - - public final Buffer position(int newPosition) { - position = newPosition; - return this; - } - - public final boolean hasRemaining() { - return remaining() > 0; - } - - public final Buffer clear() { - position = 0; - limit = capacity; - return this; - } - - public final Buffer flip() { - limit = position; - position = 0; - return this; - } - - public final Buffer rewind() { - position = 0; - return this; - } - - public boolean isReadOnly() { - return readonly; - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/BufferOverflowException.java b/sgx-jvm/avian/classpath/java/nio/BufferOverflowException.java deleted file mode 100644 index b1cb402ab2..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/BufferOverflowException.java +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -public class BufferOverflowException extends RuntimeException { -} diff --git a/sgx-jvm/avian/classpath/java/nio/BufferUnderflowException.java b/sgx-jvm/avian/classpath/java/nio/BufferUnderflowException.java deleted file mode 100644 index ec6afd7e75..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/BufferUnderflowException.java +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -public class BufferUnderflowException extends RuntimeException { -} diff --git a/sgx-jvm/avian/classpath/java/nio/ByteBuffer.java b/sgx-jvm/avian/classpath/java/nio/ByteBuffer.java deleted file mode 100644 index fddb06481b..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/ByteBuffer.java +++ /dev/null @@ -1,337 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -public abstract class ByteBuffer - extends Buffer - implements Comparable -{ - - protected ByteBuffer(boolean readOnly) { - this.readonly = readOnly; - } - - public static ByteBuffer allocate(int capacity) { - return new ArrayByteBuffer(new byte[capacity], 0, capacity, false); - } - - public static ByteBuffer allocateDirect(int capacity) { - return FixedArrayByteBuffer.make(capacity); - } - - public static ByteBuffer wrap(byte[] array) { - return wrap(array, 0, array.length); - } - - public static ByteBuffer wrap(byte[] array, int offset, int length) { - return new ArrayByteBuffer(array, offset, length, false); - } - - public abstract ByteBuffer asReadOnlyBuffer(); - - public abstract ByteBuffer slice(); - - public abstract ByteBuffer duplicate(); - - protected abstract void doPut(int offset, byte val); - - public abstract ByteBuffer put(byte[] arr, int offset, int len); - - protected abstract byte doGet(int offset); - - public abstract ByteBuffer get(byte[] dst, int offset, int length); - - public boolean hasArray() { - return false; - } - - public ByteBuffer compact() { - int remaining = remaining(); - - if (position != 0) { - ByteBuffer b = slice(); - position = 0; - put(b); - } - - position = remaining; - limit(capacity()); - - return this; - } - - public ByteBuffer put(ByteBuffer src) { - if (src.hasArray()) { - checkPut(position, src.remaining(), false); - - put(src.array(), src.arrayOffset() + src.position, src.remaining()); - src.position(src.position() + src.remaining()); - - return this; - } else { - byte[] buffer = new byte[src.remaining()]; - src.get(buffer); - return put(buffer); - } - } - - public int compareTo(ByteBuffer o) { - int end = (remaining() < o.remaining() ? remaining() : o.remaining()); - - for (int i = 0; i < end; ++i) { - int d = get(position + i) - o.get(o.position + i); - if (d != 0) { - return d; - } - } - return remaining() - o.remaining(); - } - - public boolean equals(Object o) { - return o instanceof ByteBuffer && compareTo((ByteBuffer) o) == 0; - } - - public byte[] array() { - throw new UnsupportedOperationException(); - } - - public int arrayOffset() { - throw new UnsupportedOperationException(); - } - - public ByteBuffer put(int offset, byte val) { - checkPut(offset, 1, true); - doPut(offset, val); - return this; - } - - public ByteBuffer put(byte val) { - checkPut(position, 1, false); - doPut(position, val); - ++ position; - return this; - } - - public ByteBuffer put(byte[] arr) { - return put(arr, 0, arr.length); - } - - private void rawPutLong(int position, long val) { - doPut(position , (byte) ((val >> 56) & 0xff)); - doPut(position + 1, (byte) ((val >> 48) & 0xff)); - doPut(position + 2, (byte) ((val >> 40) & 0xff)); - doPut(position + 3, (byte) ((val >> 32) & 0xff)); - doPut(position + 4, (byte) ((val >> 24) & 0xff)); - doPut(position + 5, (byte) ((val >> 16) & 0xff)); - doPut(position + 6, (byte) ((val >> 8) & 0xff)); - doPut(position + 7, (byte) ((val ) & 0xff)); - } - - private void rawPutInt(int position, int val) { - doPut(position , (byte) ((val >> 24) & 0xff)); - doPut(position + 1, (byte) ((val >> 16) & 0xff)); - doPut(position + 2, (byte) ((val >> 8) & 0xff)); - doPut(position + 3, (byte) ((val ) & 0xff)); - } - - private void rawPutShort(int position, short val) { - doPut(position , (byte) ((val >> 8) & 0xff)); - doPut(position + 1, (byte) ((val ) & 0xff)); - } - - public ByteBuffer putDouble(int position, double val) { - return putLong(position, Double.doubleToRawLongBits(val)); - } - - public ByteBuffer putFloat(int position, float val) { - return putInt(position, Float.floatToRawIntBits(val)); - } - - public ByteBuffer putLong(int position, long val) { - checkPut(position, 8, true); - - rawPutLong(position, val); - - return this; - } - - public ByteBuffer putInt(int position, int val) { - checkPut(position, 4, true); - - rawPutInt(position, val); - - return this; - } - - public ByteBuffer putShort(int position, short val) { - checkPut(position, 2, true); - - rawPutShort(position, val); - - return this; - } - - public ByteBuffer putDouble(double val) { - return putLong(Double.doubleToRawLongBits(val)); - } - - public ByteBuffer putFloat(float val) { - return putInt(Float.floatToRawIntBits(val)); - } - - public ByteBuffer putLong(long val) { - checkPut(position, 8, false); - - rawPutLong(position, val); - position += 8; - return this; - } - - public ByteBuffer putInt(int val) { - checkPut(position, 4, false); - - rawPutInt(position, val); - position += 4; - return this; - } - - public ByteBuffer putShort(short val) { - checkPut(position, 2, false); - - rawPutShort(position, val); - position += 2; - return this; - } - - public byte get() { - checkGet(position, 1, false); - return doGet(position++); - } - - public byte get(int position) { - checkGet(position, 1, true); - return doGet(position); - } - - public ByteBuffer get(byte[] dst) { - return get(dst, 0, dst.length); - } - - public double getDouble(int position) { - return Double.longBitsToDouble(getLong(position)); - } - - public float getFloat(int position) { - return Float.intBitsToFloat(getInt(position)); - } - - public long getLong(int position) { - checkGet(position, 8, true); - - return rawGetLong(position); - } - - public int getInt(int position) { - checkGet(position, 4, true); - - return rawGetInt(position); - } - - public short getShort(int position) { - checkGet(position, 2, true); - - return rawGetShort(position); - } - - private long rawGetLong(int position) { - return (((long) (doGet(position ) & 0xFF)) << 56) - | (((long) (doGet(position + 1) & 0xFF)) << 48) - | (((long) (doGet(position + 2) & 0xFF)) << 40) - | (((long) (doGet(position + 3) & 0xFF)) << 32) - | (((long) (doGet(position + 4) & 0xFF)) << 24) - | (((long) (doGet(position + 5) & 0xFF)) << 16) - | (((long) (doGet(position + 6) & 0xFF)) << 8) - | (((long) (doGet(position + 7) & 0xFF)) ); - } - - private int rawGetInt(int position) { - return (((int) (doGet(position ) & 0xFF)) << 24) - | (((int) (doGet(position + 1) & 0xFF)) << 16) - | (((int) (doGet(position + 2) & 0xFF)) << 8) - | (((int) (doGet(position + 3) & 0xFF)) ); - } - - private short rawGetShort(int position) { - return (short) (( ((int) (doGet(position ) & 0xFF)) << 8) - | (((int) (doGet(position + 1) & 0xFF)) )); - } - - public double getDouble() { - return Double.longBitsToDouble(getLong()); - } - - public float getFloat() { - return Float.intBitsToFloat(getInt()); - } - - public long getLong() { - checkGet(position, 8, false); - - long r = rawGetLong(position); - position += 8; - return r; - } - - public int getInt() { - checkGet(position, 4, false); - - int r = rawGetInt(position); - position += 4; - return r; - } - - public short getShort() { - checkGet(position, 2, false); - - short r = rawGetShort(position); - position += 2; - return r; - } - - protected void checkPut(int position, int amount, boolean absolute) { - if (isReadOnly()) { - throw new ReadOnlyBufferException(); - } - - if (position < 0 || position+amount > limit) { - throw absolute - ? new IndexOutOfBoundsException() - : new BufferOverflowException(); - } - } - - protected void checkGet(int position, int amount, boolean absolute) { - if (amount > limit-position) { - throw absolute - ? new IndexOutOfBoundsException() - : new BufferUnderflowException(); - } - } - - public ByteBuffer order(ByteOrder order) { - if (order != ByteOrder.BIG_ENDIAN) throw new UnsupportedOperationException(); - return this; - } - - public ByteOrder order() { - return ByteOrder.BIG_ENDIAN; - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/ByteOrder.java b/sgx-jvm/avian/classpath/java/nio/ByteOrder.java deleted file mode 100644 index 6592bcd873..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/ByteOrder.java +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -public final class ByteOrder { - public static final ByteOrder BIG_ENDIAN = new ByteOrder("BIG_ENDIAN"); - public static final ByteOrder LITTLE_ENDIAN = new ByteOrder("LITTLE_ENDIAN"); - - private static final ByteOrder NATIVE; - private static native boolean isNativeBigEndian(); - - static { - if (isNativeBigEndian()) - NATIVE = BIG_ENDIAN; - else - NATIVE = LITTLE_ENDIAN; - } - - private String name; - - private ByteOrder(String name) { - this.name = name; - } - - public String toString() { - return name; - } - - public static ByteOrder nativeOrder() { - return NATIVE; - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/CharBuffer.java b/sgx-jvm/avian/classpath/java/nio/CharBuffer.java deleted file mode 100644 index 1d92de5980..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/CharBuffer.java +++ /dev/null @@ -1,154 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -public abstract class CharBuffer - extends Buffer - implements Comparable -{ - private final boolean readOnly; - - protected CharBuffer(boolean readOnly) { - this.readOnly = readOnly; - } - - public static CharBuffer allocate(int capacity) { - return new ArrayCharBuffer(new char[capacity], 0, capacity, false); - } - - public static CharBuffer wrap(char[] array) { - return wrap(array, 0, array.length); - } - - public static CharBuffer wrap(char[] array, int offset, int length) { - return new ArrayCharBuffer(array, offset, length, false); - } - - public abstract CharBuffer asReadOnlyBuffer(); - - public abstract CharBuffer slice(); - - protected abstract void doPut(int offset, char value); - - public abstract CharBuffer put(char[] src, int offset, int length); - - protected abstract char doGet(int offset); - - public abstract CharBuffer get(char[] dst, int offset, int length); - - public boolean hasArray() { - return false; - } - - public CharBuffer compact() { - int remaining = remaining(); - - if (position != 0) { - CharBuffer b = slice(); - position = 0; - put(b); - } - - position = remaining; - limit(capacity()); - - return this; - } - - public CharBuffer put(CharBuffer src) { - if (src.hasArray()) { - checkPut(position, src.remaining(), false); - - put(src.array(), src.arrayOffset() + src.position, src.remaining()); - src.position(src.position() + src.remaining()); - - return this; - } else { - char[] buffer = new char[src.remaining()]; - src.get(buffer); - return put(buffer); - } - } - - public int compareTo(CharBuffer o) { - int end = (remaining() < o.remaining() ? remaining() : o.remaining()); - - for (int i = 0; i < end; ++i) { - int d = get(position + i) - o.get(o.position + i); - if (d != 0) { - return d; - } - } - return remaining() - o.remaining(); - } - - public boolean equals(Object o) { - return o instanceof CharBuffer && compareTo((CharBuffer) o) == 0; - } - - public char[] array() { - throw new UnsupportedOperationException(); - } - - public int arrayOffset() { - throw new UnsupportedOperationException(); - } - - public CharBuffer put(int offset, char val) { - checkPut(offset, 1, true); - doPut(offset, val); - return this; - } - - public CharBuffer put(char val) { - put(position, val); - ++ position; - return this; - } - - public CharBuffer put(char[] arr) { - return put(arr, 0, arr.length); - } - - public char get() { - checkGet(position, 1, false); - return doGet(position++); - } - - public char get(int position) { - checkGet(position, 1, true); - return doGet(position); - } - - public CharBuffer get(char[] dst) { - return get(dst, 0, dst.length); - } - - protected void checkPut(int position, int amount, boolean absolute) { - if (readOnly) { - throw new ReadOnlyBufferException(); - } - - if (position < 0 || position+amount > limit) { - throw absolute - ? new IndexOutOfBoundsException() - : new BufferOverflowException(); - } - } - - protected void checkGet(int position, int amount, boolean absolute) { - if (amount > limit-position) { - throw absolute - ? new IndexOutOfBoundsException() - : new BufferUnderflowException(); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/DirectByteBuffer.java b/sgx-jvm/avian/classpath/java/nio/DirectByteBuffer.java deleted file mode 100644 index ede7074a5b..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/DirectByteBuffer.java +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -import sun.misc.Unsafe; - -class DirectByteBuffer extends ByteBuffer { - private static final Unsafe unsafe = Unsafe.getUnsafe(); - private static final int baseOffset = unsafe.arrayBaseOffset(byte[].class); - - protected final long address; - - protected DirectByteBuffer(long address, int capacity, boolean readOnly) { - super(readOnly); - - this.address = address; - this.capacity = capacity; - this.limit = capacity; - this.position = 0; - } - - protected DirectByteBuffer(long address, int capacity) { - this(address, capacity, false); - } - - public ByteBuffer asReadOnlyBuffer() { - ByteBuffer b = new DirectByteBuffer(address, capacity, true); - b.position(position()); - b.limit(limit()); - return b; - } - - public ByteBuffer slice() { - return new DirectByteBuffer(address + position, remaining(), true); - } - - protected void doPut(int position, byte val) { - unsafe.putByte(address + position, val); - } - - public ByteBuffer put(ByteBuffer src) { - if (src instanceof DirectByteBuffer) { - checkPut(position, src.remaining(), false); - - DirectByteBuffer b = (DirectByteBuffer) src; - - unsafe.copyMemory - (b.address + b.position, address + position, b.remaining()); - - position += b.remaining(); - b.position += b.remaining(); - - return this; - } else { - return super.put(src); - } - } - - public ByteBuffer put(byte[] src, int offset, int length) { - if (offset < 0 || offset + length > src.length) { - throw new ArrayIndexOutOfBoundsException(); - } - - checkPut(position, length, false); - - unsafe.copyMemory - (src, baseOffset + offset, null, address + position, length); - - position += length; - - return this; - } - - public ByteBuffer get(byte[] dst, int offset, int length) { - if (offset < 0 || offset + length > dst.length) { - throw new ArrayIndexOutOfBoundsException(); - } - - checkGet(position, length, false); - - unsafe.copyMemory - (null, address + position, dst, baseOffset + offset, length); - - return this; - } - - protected byte doGet(int position) { - return unsafe.getByte(address + position); - } - - public String toString() { - return "(DirectByteBuffer with address: " + address - + " position: " + position - + " limit: " + limit - + " capacity: " + capacity + ")"; - } - - @Override - public ByteBuffer duplicate() { - ByteBuffer b = new DirectByteBuffer(address, capacity, isReadOnly()); - b.limit(this.limit()); - b.position(this.position()); - return b; - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/FixedArrayByteBuffer.java b/sgx-jvm/avian/classpath/java/nio/FixedArrayByteBuffer.java deleted file mode 100644 index d433e321af..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/FixedArrayByteBuffer.java +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -class FixedArrayByteBuffer extends DirectByteBuffer { - private final byte[] array; - private final int arrayOffset; - - private FixedArrayByteBuffer(long address, - byte[] array, - int offset, - int capacity, - boolean readOnly) - { - super(address, capacity, readOnly); - - this.array = array; - this.arrayOffset = offset; - } - - public static FixedArrayByteBuffer make(int capacity) { - long[] address = new long[1]; - byte[] array = allocateFixed(capacity, address); - return new FixedArrayByteBuffer(address[0], array, 0, capacity, false); - } - - private static native byte[] allocateFixed(int capacity, long[] address); - - public ByteBuffer asReadOnlyBuffer() { - ByteBuffer b = new FixedArrayByteBuffer - (address, array, arrayOffset, capacity, true); - b.position(position()); - b.limit(limit()); - return b; - } - - public ByteBuffer slice() { - return new FixedArrayByteBuffer - (address + position, array, arrayOffset + position, remaining(), true); - } - - @Override - public ByteBuffer duplicate() { - ByteBuffer b = new FixedArrayByteBuffer(address, array, arrayOffset, capacity, isReadOnly()); - b.limit(this.limit()); - b.position(this.position()); - return b; - } - - public String toString() { - return "(FixedArrayByteBuffer with address: " + address - + " array: " + array - + " arrayOffset: " + arrayOffset - + " position: " + position - + " limit: " + limit - + " capacity: " + capacity + ")"; - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/ReadOnlyBufferException.java b/sgx-jvm/avian/classpath/java/nio/ReadOnlyBufferException.java deleted file mode 100644 index 62bcdd8ebb..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/ReadOnlyBufferException.java +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio; - -public class ReadOnlyBufferException extends UnsupportedOperationException { -} diff --git a/sgx-jvm/avian/classpath/java/nio/channels/Channel.java b/sgx-jvm/avian/classpath/java/nio/channels/Channel.java deleted file mode 100644 index 172e1d69e8..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/channels/Channel.java +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio.channels; - -import java.io.IOException; - -public interface Channel { - public void close() throws IOException; - public boolean isOpen(); -} diff --git a/sgx-jvm/avian/classpath/java/nio/channels/Channels.java b/sgx-jvm/avian/classpath/java/nio/channels/Channels.java deleted file mode 100644 index 9d0e377ea3..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/channels/Channels.java +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio.channels; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.ByteBuffer; - -public class Channels { - public static InputStream newInputStream(ReadableByteChannel channel) { - return new MyInputStream(channel); - } - - public static OutputStream newOutputStream(WritableByteChannel channel) { - return new MyOutputStream(channel); - } - - public static ReadableByteChannel newChannel(InputStream stream) { - return new InputStreamChannel(stream); - } - - public static WritableByteChannel newChannel(OutputStream stream) { - return new OutputStreamChannel(stream); - } - - private static class MyInputStream extends InputStream { - private final ReadableByteChannel channel; - - public MyInputStream(ReadableByteChannel channel) { - this.channel = channel; - } - - public int read() throws IOException { - byte[] buffer = new byte[1]; - int r = read(buffer); - if (r == -1) { - return -1; - } else { - return buffer[0] & 0xFF; - } - } - - public int read(byte[] buffer, int offset, int length) throws IOException { - return channel.read(ByteBuffer.wrap(buffer, offset, length)); - } - - public void close() throws IOException { - channel.close(); - } - } - - private static class MyOutputStream extends OutputStream { - private final WritableByteChannel channel; - - public MyOutputStream(WritableByteChannel channel) { - this.channel = channel; - } - - public void write(int v) throws IOException { - byte[] buffer = new byte[] { (byte) (v & 0xFF) }; - write(buffer); - } - - public void write(byte[] buffer, int offset, int length) - throws IOException - { - channel.write(ByteBuffer.wrap(buffer, offset, length)); - } - - public void close() throws IOException { - channel.close(); - } - } - - private static class InputStreamChannel implements ReadableByteChannel { - private InputStream stream; - - public InputStreamChannel(InputStream stream) { - this.stream = stream; - } - - public void close() throws IOException { - if (stream != null) { - stream.close(); - stream = null; - } - } - - public boolean isOpen() { - return stream != null; - } - - public int read(ByteBuffer b) throws IOException { - int c = stream.read - (b.array(), b.arrayOffset() + b.position(), b.remaining()); - - if (c > 0) { - b.position(b.position() + c); - } - - return c; - } - } - - private static class OutputStreamChannel implements WritableByteChannel { - private OutputStream stream; - - public OutputStreamChannel(OutputStream stream) { - this.stream = stream; - } - - public void close() throws IOException { - if (stream != null) { - stream.close(); - stream = null; - } - } - - public boolean isOpen() { - return stream != null; - } - - public int write(ByteBuffer b) throws IOException { - stream.write(b.array(), b.arrayOffset() + b.position(), b.remaining()); - - int c = b.remaining(); - - b.position(b.limit()); - - return c; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/channels/GatheringByteChannel.java b/sgx-jvm/avian/classpath/java/nio/channels/GatheringByteChannel.java deleted file mode 100644 index da461fcefe..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/channels/GatheringByteChannel.java +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio.channels; - -import java.io.IOException; -import java.nio.ByteBuffer; - -public interface GatheringByteChannel extends WritableByteChannel { - public long write(ByteBuffer[] srcs) throws IOException; - public long write(ByteBuffer[] srcs, int offset, int length) - throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/nio/channels/ReadableByteChannel.java b/sgx-jvm/avian/classpath/java/nio/channels/ReadableByteChannel.java deleted file mode 100644 index d3891eabeb..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/channels/ReadableByteChannel.java +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio.channels; - -import java.io.IOException; -import java.nio.ByteBuffer; - -public interface ReadableByteChannel extends Channel { - public int read(ByteBuffer b) throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/nio/channels/UnsupportedAddressTypeException.java b/sgx-jvm/avian/classpath/java/nio/channels/UnsupportedAddressTypeException.java deleted file mode 100644 index 01362bcf6c..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/channels/UnsupportedAddressTypeException.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio.channels; - -public class UnsupportedAddressTypeException extends IllegalArgumentException { - public UnsupportedAddressTypeException() { - super(null, null); - } -} diff --git a/sgx-jvm/avian/classpath/java/nio/channels/WritableByteChannel.java b/sgx-jvm/avian/classpath/java/nio/channels/WritableByteChannel.java deleted file mode 100644 index 842f5dedad..0000000000 --- a/sgx-jvm/avian/classpath/java/nio/channels/WritableByteChannel.java +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.nio.channels; - -import java.io.IOException; -import java.nio.ByteBuffer; - -public interface WritableByteChannel extends Channel { - public int write(ByteBuffer b) throws IOException; -} diff --git a/sgx-jvm/avian/classpath/java/security/AccessControlException.java b/sgx-jvm/avian/classpath/java/security/AccessControlException.java deleted file mode 100644 index a0a93028a2..0000000000 --- a/sgx-jvm/avian/classpath/java/security/AccessControlException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -public class AccessControlException extends SecurityException { - private final Permission permission; - - public AccessControlException(String message) { - this(message, null); - } - - public AccessControlException(String message, Permission permission) { - super(message); - this.permission = permission; - } - - public Permission getPermission() { - return permission; - } -} diff --git a/sgx-jvm/avian/classpath/java/security/AccessController.java b/sgx-jvm/avian/classpath/java/security/AccessController.java deleted file mode 100644 index e0fba259f8..0000000000 --- a/sgx-jvm/avian/classpath/java/security/AccessController.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -/** - * No real access control is implemented here. - * - * @author zsombor - * - */ -public class AccessController { - - public static T doPrivileged (PrivilegedAction action) { - return action.run(); - } - - public static void checkPermission(Permission perm) throws AccessControlException { - - } - -} diff --git a/sgx-jvm/avian/classpath/java/security/AllPermission.java b/sgx-jvm/avian/classpath/java/security/AllPermission.java deleted file mode 100644 index c39089f22c..0000000000 --- a/sgx-jvm/avian/classpath/java/security/AllPermission.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -public class AllPermission extends Permission { - public AllPermission() { - super(""); - } - - -} diff --git a/sgx-jvm/avian/classpath/java/security/BasicPermission.java b/sgx-jvm/avian/classpath/java/security/BasicPermission.java deleted file mode 100644 index 74e734eb5c..0000000000 --- a/sgx-jvm/avian/classpath/java/security/BasicPermission.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -public class BasicPermission extends Permission { - - public BasicPermission(String name) { - super(name); - } - -} diff --git a/sgx-jvm/avian/classpath/java/security/CodeSource.java b/sgx-jvm/avian/classpath/java/security/CodeSource.java deleted file mode 100644 index b32723caf0..0000000000 --- a/sgx-jvm/avian/classpath/java/security/CodeSource.java +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -import java.net.URL; -import java.security.cert.Certificate; - -public class CodeSource { - private final URL url; - - public CodeSource(URL url, Certificate[] certificates) { - this.url = url; - } - - public URL getLocation() { - return url; - } -} diff --git a/sgx-jvm/avian/classpath/java/security/Permission.java b/sgx-jvm/avian/classpath/java/security/Permission.java deleted file mode 100644 index 9f2ddeddef..0000000000 --- a/sgx-jvm/avian/classpath/java/security/Permission.java +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -public abstract class Permission { - - protected String name; - - public Permission(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - @Override - public String toString() { - return this.getClass().getSimpleName() + '['+name+']'; - } - - public PermissionCollection newPermissionCollection() { - return null; - } -} diff --git a/sgx-jvm/avian/classpath/java/security/PermissionCollection.java b/sgx-jvm/avian/classpath/java/security/PermissionCollection.java deleted file mode 100644 index efdfc56a66..0000000000 --- a/sgx-jvm/avian/classpath/java/security/PermissionCollection.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -public abstract class PermissionCollection { - public abstract void add(Permission p); -} diff --git a/sgx-jvm/avian/classpath/java/security/Permissions.java b/sgx-jvm/avian/classpath/java/security/Permissions.java deleted file mode 100644 index 919185cb7e..0000000000 --- a/sgx-jvm/avian/classpath/java/security/Permissions.java +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; - -public class Permissions extends PermissionCollection { - private final Map collections = new HashMap(); - - public void add(Permission p) { - Class c = p.getClass(); - PermissionCollection pc = collections.get(c); - if (pc == null) { - pc = p.newPermissionCollection(); - if (pc == null) { - pc = new MyPermissionCollection(); - } - collections.put(c, pc); - } - pc.add(p); - } - - private static class MyPermissionCollection extends PermissionCollection { - private final Set permissions = new HashSet(); - - public void add(Permission p) { - permissions.add(p); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/security/PrivilegedAction.java b/sgx-jvm/avian/classpath/java/security/PrivilegedAction.java deleted file mode 100644 index 6e1a1f757b..0000000000 --- a/sgx-jvm/avian/classpath/java/security/PrivilegedAction.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -public interface PrivilegedAction { - - T run(); - -} diff --git a/sgx-jvm/avian/classpath/java/security/ProtectionDomain.java b/sgx-jvm/avian/classpath/java/security/ProtectionDomain.java deleted file mode 100644 index 8186405853..0000000000 --- a/sgx-jvm/avian/classpath/java/security/ProtectionDomain.java +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -public class ProtectionDomain { - private final CodeSource codeSource; - private final PermissionCollection permissions; - - public ProtectionDomain(CodeSource codeSource, - PermissionCollection permissions) - { - this.codeSource = codeSource; - this.permissions = permissions; - } - - public CodeSource getCodeSource() { - return codeSource; - } -} diff --git a/sgx-jvm/avian/classpath/java/security/SecurityPermission.java b/sgx-jvm/avian/classpath/java/security/SecurityPermission.java deleted file mode 100644 index 22a356a731..0000000000 --- a/sgx-jvm/avian/classpath/java/security/SecurityPermission.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security; - -public class SecurityPermission extends BasicPermission { - - public SecurityPermission(String name) { - super(name); - } - -} diff --git a/sgx-jvm/avian/classpath/java/security/cert/Certificate.java b/sgx-jvm/avian/classpath/java/security/cert/Certificate.java deleted file mode 100644 index 956aadc592..0000000000 --- a/sgx-jvm/avian/classpath/java/security/cert/Certificate.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.security.cert; - -public abstract class Certificate { } diff --git a/sgx-jvm/avian/classpath/java/text/DateFormatSymbols.java b/sgx-jvm/avian/classpath/java/text/DateFormatSymbols.java deleted file mode 100644 index a03becffe8..0000000000 --- a/sgx-jvm/avian/classpath/java/text/DateFormatSymbols.java +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.text; - -public class DateFormatSymbols { - private String[] ampm = new String[] { "AM", "PM" }; - private String[] shortWeekdays = new String[] { "Sun", "Mon", "Tue", - "Wed", "Thu", "Fri", "Sat" }; - private String[] shortMonths = new String[] { "Jan", "Feb", "Mar", "Apr", - "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec" }; - - public String[] getAmPmStrings() { - return ampm; - } - - public void setAmPmStrings(String[] v) { - ampm = v; - } - - public String[] getShortWeekdays() { - return shortWeekdays; - } - - public String[] getShortMonths() { - return shortMonths; - } -} diff --git a/sgx-jvm/avian/classpath/java/text/FieldPosition.java b/sgx-jvm/avian/classpath/java/text/FieldPosition.java deleted file mode 100644 index d9ec4ebd7a..0000000000 --- a/sgx-jvm/avian/classpath/java/text/FieldPosition.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.text; - -public class FieldPosition { - public FieldPosition(int field) { } -} diff --git a/sgx-jvm/avian/classpath/java/text/Format.java b/sgx-jvm/avian/classpath/java/text/Format.java deleted file mode 100644 index b99649540c..0000000000 --- a/sgx-jvm/avian/classpath/java/text/Format.java +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.text; - -public abstract class Format { - public final String format(Object o) { - return format(o, new StringBuffer(), new FieldPosition(0)).toString(); - } - - public abstract StringBuffer format(Object o, StringBuffer target, - FieldPosition p); -} diff --git a/sgx-jvm/avian/classpath/java/text/MessageFormat.java b/sgx-jvm/avian/classpath/java/text/MessageFormat.java deleted file mode 100644 index 4ff224546d..0000000000 --- a/sgx-jvm/avian/classpath/java/text/MessageFormat.java +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.text; - -import java.util.Locale; - -/** - * A minimalist Java message formatter. - * The string is a sequence of letters, copied verbatim unless the letter - * is "{" or "'". If the letter is a "{", this begins a parameter, which - * is a base-10 number. {0} will be replaced by the first argument to - * format, {1} is the second argument, and so on. - * If the letter is a single tick ("'"), then all characters - * until the mathcing tick are outputted verbatim(this is useful for escaping - * the { character). - *

Examples

- * - * - * - * - * - * - *
formatArgsResult
There are {0} grapessixThere are six grapes
{2} + {1} = {0}5 2 33 + 2 = 5
{0} and {0} and {0}againagain and again and again
Joe''s age is {0}, not '{0}'30Joe's age is 30, not {0}
- */ -public class MessageFormat extends Format { - private String pattern; - private final Locale locale; - - public MessageFormat(String pattern, Locale locale) { - this.pattern = pattern; - this.locale = locale; - } - - public MessageFormat(String pattern) { - this(pattern, Locale.getDefault()); - } - - public StringBuffer format(Object args[], StringBuffer target, FieldPosition pos) { - int i=0; - int len=pattern.length(); - - while (i < len) { - char ch = pattern.charAt(i); - if (ch == '{') { - // Param should be a number - int num=0; - while (i < (len-1)) { - i++; - ch = pattern.charAt(i); - if ((ch >= '0') && (ch <= '9')) { - num = num * 10 + (ch - '0'); - } else if (ch == '}') { - target.append((args[num] == null) ? "null" : args[num].toString()); - break; - } else { - throw new IllegalArgumentException("Character within {} isn't digit: " + ch); - } - } - } else if (ch == '\'') { - // Char is a literal string - i++; - ch = pattern.charAt(i); - if (ch == '\'') { - target.append('\''); - } else { - while (ch != '\'') { - target.append(ch); - i++; - ch = pattern.charAt(i); - } - } - } else { - target.append(ch); - } - i++; - } - return target; - } - - public static String format(String message, Object... args) { - return new MessageFormat(message).format(args, new StringBuffer(), new FieldPosition(0)).toString(); - } - - public StringBuffer format(Object args, StringBuffer target, FieldPosition p) { - return format((Object[]) args, target, p); - } - - public void applyPattern(String pattern) { - this.pattern = pattern; - } - - public String toPattern() { - return pattern; - } -} diff --git a/sgx-jvm/avian/classpath/java/text/ParseException.java b/sgx-jvm/avian/classpath/java/text/ParseException.java deleted file mode 100644 index ba9d74a801..0000000000 --- a/sgx-jvm/avian/classpath/java/text/ParseException.java +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.text; - -public class ParseException extends Exception { - private int errorOffset; - - public ParseException(String message, int errorOffset) { - super(message); - this.errorOffset = errorOffset; - } - - public int getErrorOffset() { - return errorOffset; - } -} diff --git a/sgx-jvm/avian/classpath/java/text/ParsePosition.java b/sgx-jvm/avian/classpath/java/text/ParsePosition.java deleted file mode 100644 index 93a730abcd..0000000000 --- a/sgx-jvm/avian/classpath/java/text/ParsePosition.java +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.text; - -public class ParsePosition { - private int index, errorIndex = -1; - - public ParsePosition(int index) { - this.index = index; - } - - public int getErrorIndex() { - return errorIndex; - } - - public int getIndex() { - return index; - } - - public void setErrorIndex(int i) { - errorIndex = i; - } - - public void setIndex(int i) { - index = i; - } - - public String toString() { - return "index: " + index + "(error index: " + errorIndex + ")"; - } -} diff --git a/sgx-jvm/avian/classpath/java/text/SimpleDateFormat.java b/sgx-jvm/avian/classpath/java/text/SimpleDateFormat.java deleted file mode 100644 index 483ac707e9..0000000000 --- a/sgx-jvm/avian/classpath/java/text/SimpleDateFormat.java +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.text; - -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; - -public class SimpleDateFormat { - private String pattern; - - public SimpleDateFormat(String pattern) { - this.pattern = pattern; - if (! "yyyy-MM-dd'T'HH:mm:ss".equals(pattern)) { - throw new UnsupportedOperationException("Unsupported pattern: " + pattern); - } - } - - public void setTimeZone(TimeZone tz) { - if(!tz.getDisplayName().equals("GMT")) { - throw new UnsupportedOperationException(); - } - } - - public StringBuffer format(Date date, StringBuffer buffer, FieldPosition position) { - Calendar calendar = Calendar.getInstance(); - calendar.setTime(date); - pad(buffer, calendar.get(Calendar.YEAR), 4); - buffer.append('-'); - pad(buffer, calendar.get(Calendar.MONTH) + 1, 2); - buffer.append('-'); - pad(buffer, calendar.get(Calendar.DAY_OF_MONTH), 2); - buffer.append("T"); - pad(buffer, calendar.get(Calendar.HOUR_OF_DAY), 2); - buffer.append(':'); - pad(buffer, calendar.get(Calendar.MINUTE), 2); - buffer.append(':'); - pad(buffer, calendar.get(Calendar.SECOND), 2); - return buffer; - } - - public Date parse(String text) { - return parse(text, new ParsePosition(0)); - } - - public Date parse(String text, ParsePosition position) { - int index = position.getIndex(); - try { - Calendar calendar = Calendar.getInstance(); - index = parseField(text, index, 4, calendar, Calendar.YEAR, 0); - index = expectPrefix(text, index, "-"); - index = parseField(text, index, 2, calendar, Calendar.MONTH, -1); - index = expectPrefix(text, index, "-"); - index = parseField(text, index, 2, calendar, Calendar.DAY_OF_MONTH, 0); - index = expectPrefix(text, index, "T"); - index = parseField(text, index, 2, calendar, Calendar.HOUR_OF_DAY, 0); - index = expectPrefix(text, index, ":"); - index = parseField(text, index, 2, calendar, Calendar.MINUTE, 0); - index = expectPrefix(text, index, ":"); - index = parseField(text, index, 2, calendar, Calendar.SECOND, 0); - position.setIndex(index); - return calendar.getTime(); - } catch (ParseException e) { - position.setErrorIndex(index); - return null; - } - } - - private static void pad(StringBuffer buffer, int value, int digits) { - int i = value == 0 ? 1 : value; - while (i > 0) { - i /= 10; - --digits; - } - while (digits-- > 0) { - buffer.append('0'); - } - buffer.append(value); - } - - private static int parseField(String text, int offset, int length, Calendar calendar, int field, int adjustment) throws ParseException { - if (text.length() < offset + length) throw new ParseException("Short date: " + text, offset); - try { - int value = Integer.parseInt(text.substring(offset, offset + length), 10); - calendar.set(field, value + adjustment); - } catch (NumberFormatException e) { - throw new ParseException("Not a number: " + text, offset); - } - return offset + length; - } - - private static int expectPrefix(String text, int offset, String prefix) throws ParseException { - if (text.length() <= offset) throw new ParseException("Short date: " + text, offset); - if (! text.substring(offset).startsWith(prefix)) throw new ParseException("Parse error: " + text, offset); - return offset + prefix.length(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/AbstractCollection.java b/sgx-jvm/avian/classpath/java/util/AbstractCollection.java deleted file mode 100644 index d6b6dda81f..0000000000 --- a/sgx-jvm/avian/classpath/java/util/AbstractCollection.java +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -/** - * @author zsombor - * - */ -public abstract class AbstractCollection implements Collection { - public boolean add(T element) { - throw new UnsupportedOperationException("adding to " - + this.getClass().getName()); - } - - public boolean addAll(Collection collection) { - boolean result = false; - for (T obj : collection) { - result |= add(obj); - } - return result; - } - - public void clear() { - throw new UnsupportedOperationException("clear() in " - + this.getClass().getName()); - } - - public boolean contains(Object element) { - if (element != null) { - for (Iterator iter = iterator(); iter.hasNext();) { - if (element.equals(iter.next())) { - return true; - } - } - } else { - for (Iterator iter = iterator(); iter.hasNext();) { - if (iter.next()==null) { - return true; - } - } - - } - return false; - } - - public boolean containsAll(Collection c) { - if (c == null) { - throw new NullPointerException("Collection is null"); - } - - Iterator it = c.iterator(); - while (it.hasNext()) { - if (! contains(it.next())) { - return false; - } - } - - return true; - } - - public boolean isEmpty() { - return size() == 0; - } - - public boolean remove(Object element) { - throw new UnsupportedOperationException("remove(T) in " - + this.getClass().getName()); - } - - public boolean removeAll(Collection c) { - if (c == null) { - throw new NullPointerException("Collection is null"); - } - - boolean changed = false; - - Iterator it = c.iterator(); - while (it.hasNext()) { - changed = remove(it.next()) || changed; - } - - return changed; - } - - public abstract int size(); - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public S[] toArray(S[] array) { - return avian.Data.toArray(this, array); - } - - public abstract Iterator iterator(); - - public String toString() { - return avian.Data.toString(this); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/AbstractDeque.java b/sgx-jvm/avian/classpath/java/util/AbstractDeque.java deleted file mode 100644 index f88858bb2e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/AbstractDeque.java +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public abstract class AbstractDeque extends AbstractQueue - implements Deque { - - @Override - public void push(T e) { - addFirst(e); - } - - @Override - public void addLast(T element) { - if (! offerLast(element)) { - throw new IllegalStateException(); - } - } - - @Override - public void addFirst(T element) { - if (! offerFirst(element)) { - throw new IllegalStateException(); - } - } - - @Override - public boolean offer(T element) { - return offerLast(element); - } - - @Override - public T poll() { - return pollFirst(); - } - - @Override - public T pop() { - return removeFirst(); - } - - @Override - public T removeFirst() { - return remove(); - } - - @Override - public boolean remove(Object element) { - return removeFirstOccurrence(element); - } - - @Override - public T removeLast() { - T result = pollLast(); - if (result == null) { - throw new NoSuchElementException(); - } else { - return result; - } - } - - @Override - public T getFirst() { - return element(); - } - - @Override - public T getLast() { - T result = peekLast(); - - if (result == null) { - throw new NoSuchElementException(); - } - - return result; - } - - @Override - public T peek() { - return peekFirst(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/AbstractList.java b/sgx-jvm/avian/classpath/java/util/AbstractList.java deleted file mode 100644 index 5ad69eaabc..0000000000 --- a/sgx-jvm/avian/classpath/java/util/AbstractList.java +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public abstract class AbstractList extends AbstractCollection - implements List -{ - protected int modCount; - - public boolean add(T o) { - add(size(), o); - return true; - } - - public boolean addAll(Collection c) { - return addAll(size(), c); - } - - public boolean addAll(int startIndex, Collection c) { - if (c == null) { - throw new NullPointerException("Collection is null"); - } - - int index = startIndex; - boolean changed = false; - - Iterator it = c.iterator(); - while (it.hasNext()) { - add(index++, it.next()); - changed = true; - } - - return changed; - } - - public Iterator iterator() { - return listIterator(); - } - - public ListIterator listIterator() { - return new Collections.ArrayListIterator(this); - } - - public int indexOf(Object o) { - int i = 0; - for (T v: this) { - if (o == null) { - if (v == null) { - return i; - } - } else if (o.equals(v)) { - return i; - } - - ++ i; - } - return -1; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/AbstractMap.java b/sgx-jvm/avian/classpath/java/util/AbstractMap.java deleted file mode 100644 index 88cd22636d..0000000000 --- a/sgx-jvm/avian/classpath/java/util/AbstractMap.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public abstract class AbstractMap extends Object implements Map { } diff --git a/sgx-jvm/avian/classpath/java/util/AbstractQueue.java b/sgx-jvm/avian/classpath/java/util/AbstractQueue.java deleted file mode 100644 index e407672c76..0000000000 --- a/sgx-jvm/avian/classpath/java/util/AbstractQueue.java +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public abstract class AbstractQueue extends AbstractCollection implements Queue { - - protected AbstractQueue() { - super(); - } - - @Override - public boolean add(T element) { - if (offer(element)) { - return true; - } else { - throw new IllegalStateException(); - } - } - - @Override - public boolean addAll(Collection collection) { - if (collection == null) { - throw new NullPointerException(); - } - - for (T element : collection) { - add(element); - } - - return true; - } - - @Override - public void clear() { - while (size() > 0) { - poll(); - } - } - - @Override - public T element() { - T result = peek(); - if (result == null) { - throw new NoSuchElementException(); - } else { - return result; - } - } - - @Override - public T remove() { - T result = poll(); - if (result == null) { - throw new NoSuchElementException(); - } else { - return result; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/AbstractSequentialList.java b/sgx-jvm/avian/classpath/java/util/AbstractSequentialList.java deleted file mode 100644 index 3f359ec502..0000000000 --- a/sgx-jvm/avian/classpath/java/util/AbstractSequentialList.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public abstract class AbstractSequentialList extends AbstractList - implements List -{ } diff --git a/sgx-jvm/avian/classpath/java/util/AbstractSet.java b/sgx-jvm/avian/classpath/java/util/AbstractSet.java deleted file mode 100644 index 29b3a95a82..0000000000 --- a/sgx-jvm/avian/classpath/java/util/AbstractSet.java +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public abstract class AbstractSet extends AbstractCollection implements Set { -} diff --git a/sgx-jvm/avian/classpath/java/util/ArrayDeque.java b/sgx-jvm/avian/classpath/java/util/ArrayDeque.java deleted file mode 100644 index 8801806064..0000000000 --- a/sgx-jvm/avian/classpath/java/util/ArrayDeque.java +++ /dev/null @@ -1,364 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class ArrayDeque extends AbstractDeque - implements Deque { - private Object[] dataArray; - // both indexes are inclusive, except when size == 0 - private int startIndex; - private int endIndex; - private int size; - private int modCount; - - public ArrayDeque() { - this(16); - } - - public ArrayDeque(int intialSize) { - dataArray = new Object[intialSize]; - modCount = 0; - clear(); - } - - public ArrayDeque(Collection c) { - this(c.size()); - - addAll(c); - } - - private void copyInto(Object[] array) { - if (startIndex <= endIndex) { - // only one copy needed - System.arraycopy(dataArray, startIndex, array, 0, size); - } else { - int firstCopyCount = dataArray.length - startIndex; - System.arraycopy(dataArray, startIndex, array, 0, firstCopyCount); - System.arraycopy(dataArray, 0, array, firstCopyCount, endIndex + 1); - } - } - - private void ensureCapacity(int newSize) { - if (dataArray.length < newSize) { - Object[] newArray = new Object[dataArray.length * 2]; - copyInto(newArray); - - dataArray = newArray; - startIndex = 0; - endIndex = size - 1; - } - } - - @Override - public boolean offerFirst(T e) { - ensureCapacity(size() + 1); - modCount++; - - if (size > 0) { - // we don't need to move the head index for the first one - startIndex--; - if (startIndex < 0) { // wrapping to the end of the array - startIndex = dataArray.length - 1; - } - } - size++; - dataArray[startIndex] = e; - - return true; - } - - @Override - public boolean offerLast(T e) { - ensureCapacity(size() + 1); - modCount++; - - if (size > 0) { - // we don't need to move the tail index for the first one - endIndex = (endIndex + 1) % dataArray.length; - } - size++; - dataArray[endIndex] = e; - - return true; - } - - @Override - public T pollFirst() { - modCount++; - - if (size == 0) { - return null; - } - - @SuppressWarnings("unchecked") - T result = (T)dataArray[startIndex]; - size--; - if (size == 0) { - startIndex = endIndex = 0; - } else { - startIndex = (startIndex + 1) % dataArray.length; - } - - return result; - } - - @Override - public T pollLast() { - modCount++; - - if (size == 0) { - return null; - } - - @SuppressWarnings("unchecked") - T result = (T)dataArray[endIndex]; - size--; - if (size == 0) { - startIndex = endIndex = 0; - } else { - endIndex--; - if (endIndex < 0) { - endIndex = dataArray.length - 1; - } - } - - return result; - } - - @Override - public T peekFirst() { - if (size == 0) { - return null; - } else { - @SuppressWarnings("unchecked") - T result = (T)dataArray[startIndex]; - return result; - } - } - - @Override - public T peekLast() { - if (size == 0) { - return null; - } else { - @SuppressWarnings("unchecked") - T result = (T)dataArray[endIndex]; - return result; - } - } - - @Override - public boolean addAll(Collection c) { - if (c == null || c.isEmpty()) { - return false; - } - - ensureCapacity(size() + c.size()); - - Iterator it = c.iterator(); - while (it.hasNext()) { - add(it.next()); - } - - return true; - } - - @Override - public boolean removeAll(Collection c) { - boolean removed = false; - Iterator it = c.iterator(); - while (it.hasNext()) { - removed = remove(it.next()) || removed; - } - - return removed; - } - - private boolean remove(Object o, boolean first) { - modCount++; - - Iterator it; - if (first) { - it = iterator(); - } else { - it = descendingIterator(); - } - while (it.hasNext()) { - T next = it.next(); - if (next == null) { - if (o == null) { - it.remove(); - return true; - } - } else if (next.equals(o)) { - it.remove(); - return true; - } - } - - return false; - } - - @Override - public boolean removeFirstOccurrence(Object o) { - return remove(o, true); - } - - @Override - public boolean removeLastOccurrence(Object o) { - return remove(o, false); - } - - @Override - public void clear() { - size = 0; - startIndex = endIndex = 0; - modCount++; - } - - @Override - public int size() { - return size; - } - - @Override - public boolean contains(Object element) { - Iterator it = iterator(); - while (it.hasNext()) { - T next = it.next(); - if (next == null) { - if (element == null) { - return true; - } - } else if (next.equals(element)) { - return true; - } - } - - return false; - } - - @Override - public boolean containsAll(Collection c) { - Iterator it = c.iterator(); - while (it.hasNext()) { - if (! contains(it.next())) { - return false; - } - } - - return true; - } - - @Override - public Object[] toArray() { - Object[] result = new Object[size]; - copyInto(result); - - return result; - } - - @Override - public S[] toArray(S[] array) { - return avian.Data.toArray(this, array); - } - - public Iterator iterator() { - return new GenericIterator() { - @Override - protected int getArrayIndex() { - int result = (currentIndex + startIndex) % dataArray.length; - return result; - } - }; - } - - public Iterator descendingIterator() { - return new GenericIterator() { - @Override - protected int getArrayIndex() { - int result = (endIndex - currentIndex) % dataArray.length; - return result; - } - }; - } - - private abstract class GenericIterator implements Iterator { - protected int expectedModCount = modCount; - protected int currentIndex = 0; - - protected abstract int getArrayIndex(); - - @Override - public T next() { - if (modCount != expectedModCount) { - throw new ConcurrentModificationException(); - } else if (currentIndex == size) { - throw new NoSuchElementException(); - } - - @SuppressWarnings("unchecked") - T result = (T)dataArray[getArrayIndex()]; - currentIndex++; - - return result; - } - - @Override - public boolean hasNext() { - return currentIndex < size; - } - - @Override - public void remove() { - currentIndex--; - - int removalIndex = getArrayIndex(); - if (removalIndex == startIndex) { - // avoid array copy - pollFirst(); - expectedModCount = modCount; - } else if (removalIndex == endIndex) { - // avoid array copy - pollLast(); - expectedModCount = modCount; - } else { // array must be copied - Object[] newArray = new Object[dataArray.length]; - if (startIndex <= endIndex) { - int firstCopyCount = removalIndex - startIndex; - System.arraycopy(dataArray, startIndex, - newArray, 0, firstCopyCount); - System.arraycopy(dataArray, removalIndex + 1, - newArray, firstCopyCount, size - firstCopyCount); - } else if (removalIndex > startIndex) { - int firstCopyCount = removalIndex - startIndex; - System.arraycopy(dataArray, startIndex, - newArray, 0, firstCopyCount); - System.arraycopy(dataArray, startIndex + firstCopyCount + 1, - newArray, firstCopyCount, dataArray.length - removalIndex - 1); - System.arraycopy(dataArray, 0, newArray, size - removalIndex, endIndex + 1); - } else { - int firstCopyCount = dataArray.length - startIndex; - System.arraycopy(dataArray, startIndex, - newArray, 0, firstCopyCount); - System.arraycopy(dataArray, 0, - newArray, firstCopyCount, removalIndex); - System.arraycopy(dataArray, removalIndex + 1, - newArray, firstCopyCount + removalIndex, endIndex - removalIndex); - } - - dataArray = newArray; - startIndex = 0; - endIndex = --size - 1; - } - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/ArrayList.java b/sgx-jvm/avian/classpath/java/util/ArrayList.java deleted file mode 100644 index 205392a8e0..0000000000 --- a/sgx-jvm/avian/classpath/java/util/ArrayList.java +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.io.IOException; - -public class ArrayList extends AbstractList implements java.io.Serializable, RandomAccess { - private static final int MinimumCapacity = 16; - - private Object[] array; - private int size; - - public ArrayList(int capacity) { - resize(capacity); - } - - public ArrayList() { - this(0); - } - - public ArrayList(Collection source) { - this(source.size()); - addAll(source); - } - - private void grow(int newSize) { - if (array == null || newSize > array.length) { - resize(Math.max(newSize, array == null - ? MinimumCapacity : array.length * 2)); - } - } - - private void shrink(int newSize) { - if (array.length / 2 >= MinimumCapacity && newSize <= array.length / 3) { - resize(array.length / 2); - } - } - - private void resize(int capacity) { - Object[] newArray = null; - if (capacity != 0) { - if (array != null && array.length == capacity) { - return; - } - - newArray = new Object[capacity]; - if (array != null) { - System.arraycopy(array, 0, newArray, 0, size); - } - } - array = newArray; - } - - private static boolean equal(Object a, Object b) { - return (a == null && b == null) || (a != null && a.equals(b)); - } - - public int size() { - return size; - } - - public void ensureCapacity(int capacity) { - grow(capacity); - } - - public boolean contains(Object element) { - for (int i = 0; i < size; ++i) { - if (equal(element, array[i])) { - return true; - } - } - return false; - } - - public void add(int index, T element) { - int newSize = Math.max(size+1, index+1); - grow(newSize); - size = newSize; - System.arraycopy(array, index, array, index+1, size-index-1); - array[index] = element; - } - - public boolean add(T element) { - add(size, element); - return true; - } - - public boolean addAll(Collection collection) { - for (T t: collection) add(t); - return true; - } - - public int indexOf(Object element) { - for (int i = 0; i < size; ++i) { - if (equal(element, array[i])) { - return i; - } - } - return -1; - } - - public int lastIndexOf(Object element) { - for (int i = size - 1; i >= 0; --i) { - if (equal(element, array[i])) { - return i; - } - } - return -1; - } - - public T get(int index) { - if (index >= 0 && index < size) { - return (T) array[index]; - } else { - throw new IndexOutOfBoundsException(index + " not in [0, " + size + ")"); - } - } - - public T set(int index, T element) { - if (index >= 0 && index < size) { - Object oldValue = array[index]; - array[index] = element; - return (T) oldValue; - } else { - throw new IndexOutOfBoundsException(index + " not in [0, " + size + ")"); - } - } - - public T remove(int index) { - T v = get(index); - - int newSize = size - 1; - - if (index == newSize) { - array[index] = null; - } else { - System.arraycopy(array, index + 1, array, index, newSize - index); - } - - shrink(newSize); - size = newSize; - - return v; - } - - public boolean remove(Object element) { - for (int i = 0; i < size; ++i) { - if (equal(element, array[i])) { - remove(i); - return true; - } - } - return false; - } - - public boolean isEmpty() { - return size() == 0; - } - - public void clear() { - array = null; - size = 0; - } - - public Iterator iterator() { - return listIterator(); - } - - public ListIterator listIterator(int index) { - return new Collections.ArrayListIterator(this, index); - } - - public ListIterator listIterator() { - return listIterator(0); - } - - public String toString() { - return avian.Data.toString(this); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Arrays.java b/sgx-jvm/avian/classpath/java/util/Arrays.java deleted file mode 100644 index 7fb756cefd..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Arrays.java +++ /dev/null @@ -1,715 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.lang.reflect.Array; - -public class Arrays { - private Arrays() { } - - public static String toString(Object[] a) { - return asList(a).toString(); - } - - public static String toString(boolean[] a) { - if (a == null) { - return "null"; - } else { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (int i = 0; i < a.length; ++i) { - sb.append(String.valueOf(a[i])); - if (i + 1 != a.length) { - sb.append(", "); - } - } - sb.append("]"); - return sb.toString(); - } - } - - public static String toString(byte[] a) { - if (a == null) { - return "null"; - } else { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (int i = 0; i < a.length; ++i) { - sb.append(String.valueOf(a[i])); - if (i + 1 != a.length) { - sb.append(", "); - } - } - sb.append("]"); - return sb.toString(); - } - } - - public static String toString(short[] a) { - if (a == null) { - return "null"; - } else { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (int i = 0; i < a.length; ++i) { - sb.append(String.valueOf(a[i])); - if (i + 1 != a.length) { - sb.append(", "); - } - } - sb.append("]"); - return sb.toString(); - } - } - - public static String toString(int[] a) { - if (a == null) { - return "null"; - } else { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (int i = 0; i < a.length; ++i) { - sb.append(String.valueOf(a[i])); - if (i + 1 != a.length) { - sb.append(", "); - } - } - sb.append("]"); - return sb.toString(); - } - } - - public static String toString(long[] a) { - if (a == null) { - return "null"; - } else { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (int i = 0; i < a.length; ++i) { - sb.append(String.valueOf(a[i])); - if (i + 1 != a.length) { - sb.append(", "); - } - } - sb.append("]"); - return sb.toString(); - } - } - - public static String toString(float[] a) { - if (a == null) { - return "null"; - } else { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (int i = 0; i < a.length; ++i) { - sb.append(String.valueOf(a[i])); - if (i + 1 != a.length) { - sb.append(", "); - } - } - sb.append("]"); - return sb.toString(); - } - } - - public static String toString(double[] a) { - if (a == null) { - return "null"; - } else { - StringBuilder sb = new StringBuilder(); - sb.append("["); - for (int i = 0; i < a.length; ++i) { - sb.append(String.valueOf(a[i])); - if (i + 1 != a.length) { - sb.append(", "); - } - } - sb.append("]"); - return sb.toString(); - } - } - - private static boolean equal(Object a, Object b) { - return (a == null && b == null) || (a != null && a.equals(b)); - } - - public static void sort(Object[] array) { - sort(array, new Comparator() { - @Override - public int compare(Object a, Object b) { - return ((Comparable) a).compareTo(b); - } - }); - } - - private final static int SORT_SIZE_THRESHOLD = 16; - - public static void sort(T[] array, Comparator comparator) { - introSort(array, comparator, 0, array.length, array.length); - insertionSort(array, comparator); - } - - private static void introSort(T[] array, - Comparator comparator, int begin, int end, int limit) - { - while (end - begin > SORT_SIZE_THRESHOLD) { - if (limit == 0) { - heapSort(array, comparator, begin, end); - return; - } - limit >>= 1; - - // median of three - T a = array[begin]; - T b = array[begin + (end - begin) / 2 + 1]; - T c = array[end - 1]; - T median; - if (comparator.compare(a, b) < 0) { - median = comparator.compare(b, c) < 0 ? - b : (comparator.compare(a, c) < 0 ? c : a); - } else { - median = comparator.compare(b, c) > 0 ? - b : (comparator.compare(a, c) > 0 ? c : a); - } - - // partition - int pivot, i = begin, j = end; - for (;;) { - while (comparator.compare(array[i], median) < 0) { - ++i; - } - --j; - while (comparator.compare(median, array[j]) < 0) { - --j; - } - if (i >= j) { - pivot = i; - break; - } - T swap = array[i]; - array[i] = array[j]; - array[j] = swap; - ++i; - } - - introSort(array, comparator, pivot, end, limit); - end = pivot; - } - } - - private static void heapSort(T[] array, Comparator comparator, - int begin, int end) - { - int count = end - begin; - for (int i = count / 2 - 1; i >= 0; --i) { - siftDown(array, comparator, i, count, begin); - } - for (int i = count - 1; i > 0; --i) { - // swap begin and begin + i - T swap = array[begin + i]; - array[begin + i] = array[begin]; - array[begin] = swap; - - siftDown(array, comparator, 0, i, begin); - } - } - - private static void siftDown(T[] array, Comparator comparator, - int i, int count, int offset) - { - T value = array[offset + i]; - while (i < count / 2) { - int child = 2 * i + 1; - if (child + 1 < count && - comparator.compare(array[child], array[child + 1]) < 0) { - ++child; - } - if (comparator.compare(value, array[child]) >= 0) { - break; - } - array[offset + i] = array[offset + child]; - i = child; - } - array[offset + i] = value; - } - - private static void insertionSort(T[] array, - Comparator comparator) - { - for (int j = 1; j < array.length; ++j) { - T t = array[j]; - int i = j - 1; - while (i >= 0 && comparator.compare(array[i], t) > 0) { - array[i + 1] = array[i]; - i = i - 1; - } - array[i + 1] = t; - } - } - - public static int hashCode(Object[] array) { - if(array == null) { - return 9023; - } - - int hc = 823347; - for(Object o : array) { - hc += o != null ? o.hashCode() : 54267; - hc *= 3; - } - return hc; - } - - public static boolean equals(Object[] a, Object[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(!equal(a[i], b[i])) { - return false; - } - } - return true; - } - - public static boolean equals(byte[] a, byte[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(a[i] != b[i]) { - return false; - } - } - return true; - } - - public static boolean equals(int[] a, int[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(a[i] != b[i]) { - return false; - } - } - return true; - } - - public static boolean equals(long[] a, long[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(a[i] != b[i]) { - return false; - } - } - return true; - } - - public static boolean equals(short[] a, short[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(a[i] != b[i]) { - return false; - } - } - return true; - } - - public static boolean equals(char[] a, char[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(a[i] != b[i]) { - return false; - } - } - return true; - } - - public static boolean equals(float[] a, float[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(a[i] != b[i]) { - return false; - } - } - return true; - } - - public static boolean equals(double[] a, double[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(a[i] != b[i]) { - return false; - } - } - return true; - } - - public static boolean deepEquals(Object[] a, Object[] b) { - if(a == b) { - return true; - } - if(a == null || b == null) { - return false; - } - if(a.length != b.length) { - return false; - } - for(int i = 0; i < a.length; i++) { - if(!Objects.deepEquals(a[i], b[i])) { - return false; - } - } - return true; - } - - public static List asList(final T ... array) { - return new AbstractList() { - @Override - public int size() { - return array.length; - } - - @Override - public void add(int index, T element) { - throw new UnsupportedOperationException(); - } - - @Override - public int indexOf(Object element) { - for (int i = 0; i < array.length; ++i) { - if (equal(element, array[i])) { - return i; - } - } - return -1; - } - - @Override - public int lastIndexOf(Object element) { - for (int i = array.length - 1; i >= 0; --i) { - if (equal(element, array[i])) { - return i; - } - } - return -1; - } - - @Override - public T get(int index) { - return array[index]; - } - - @Override - public T set(int index, T value) { - throw new UnsupportedOperationException(); - } - - @Override - public T remove(int index) { - throw new UnsupportedOperationException(); - } - - @Override - public ListIterator listIterator(int index) { - return new Collections.ArrayListIterator(this, index); - } - }; - } - - private static void checkRange(int len, int start, int stop) { - if (start < 0) { - throw new ArrayIndexOutOfBoundsException(start); - } - if (stop > len) { - throw new ArrayIndexOutOfBoundsException(stop); - } - if (start > stop) { - throw new IllegalArgumentException("start(" + start + ") > stop(" + stop + ")"); - } - } - - public static void fill(int[] array, int value) { - for (int i=0;i void fill(T[] array, T value) { - for (int i=0;i void fill(T[] array, int start, int stop, T value) { - checkRange(array.length, start, stop); - for (int i=start;i newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static byte[] copyOf(byte[] array, int newLength) { - byte[] result = new byte[newLength]; - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static char[] copyOf(char[] array, int newLength) { - char[] result = new char[newLength]; - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static double[] copyOf(double[] array, int newLength) { - double[] result = new double[newLength]; - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static float[] copyOf(float[] array, int newLength) { - float[] result = new float[newLength]; - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static int[] copyOf(int[] array, int newLength) { - int[] result = new int[newLength]; - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static long[] copyOf(long[] array, int newLength) { - long[] result = new long[newLength]; - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static short[] copyOf(short[] array, int newLength) { - short[] result = new short[newLength]; - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static T[] copyOf(T[] array, int newLength) { - Class clazz = array.getClass().getComponentType(); - T[] result = (T[])Array.newInstance(clazz, newLength); - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static T[] copyOf(U[] array, int newLength, - Class newType) - { - T[] result = (T[])Array.newInstance(newType.getComponentType(), newLength); - int length = array.length > newLength ? newLength : array.length; - System.arraycopy(array, 0, result, 0, length); - return result; - } - - public static int binarySearch(int[] a, int key) { - return binarySearch(a, 0, a.length - 1, key); - } - - public static int binarySearch(int[] a, int fromIndex, int toIndex, int key) { - checkRange(a.length, fromIndex, toIndex); - - // Assume array is already sorted - int left = fromIndex; - int right = toIndex - 1; - int mid; - while(left <= right) { - mid = (left + right) / 2; - if(a[mid] < key) { - left = mid + 1; - } else if(a[mid] > key) { - right = mid - 1; - } else { - return mid; - } - } - - return -left - 1; - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/BitSet.java b/sgx-jvm/avian/classpath/java/util/BitSet.java deleted file mode 100644 index c76016a5f0..0000000000 --- a/sgx-jvm/avian/classpath/java/util/BitSet.java +++ /dev/null @@ -1,267 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.io.Serializable; - -/** - * @author zsombor - * - */ -public class BitSet implements Serializable, Cloneable { - - final static int BITS_PER_LONG = 64; - final static int BITS_PER_LONG_SHIFT = 6; - final static long MASK = 0xFFFFFFFFFFFFFFFFL; - - private long[] bits; - - private static int longPosition(int index) { - return index >> BITS_PER_LONG_SHIFT; - } - - private static long bitPosition(int index) { - return 1L << (index % BITS_PER_LONG); - } - - private static long getTrueMask(int fromIndex, int toIndex) { - int currentRange = toIndex - fromIndex; - return (MASK >>> (BITS_PER_LONG - currentRange)) << (fromIndex % BITS_PER_LONG); - } - - public BitSet(int bitLength) { - if (bitLength % BITS_PER_LONG == 0) { - enlarge(longPosition(bitLength)); - } else { - enlarge(longPosition(bitLength) + 1); - } - } - - public BitSet() { - enlarge(1); - } - - public void and(BitSet otherBits) { - int min = Math.min(bits.length, otherBits.bits.length); - for (int i = 0; i < min; i++) { - bits[i] &= otherBits.bits[i]; - } - for (int i = min; i < bits.length; i++) { - bits[i] = 0; - } - } - - public void andNot(BitSet otherBits) { - int max = Math.max(bits.length, otherBits.bits.length); - enlarge(max); - int min = Math.min(bits.length, otherBits.bits.length); - for (int i = 0; i < min; i++) { - bits[i] &= ~otherBits.bits[i]; - } - } - - public void or(BitSet otherBits) { - int max = Math.max(bits.length, otherBits.bits.length); - enlarge(max); - int min = Math.min(bits.length, otherBits.bits.length); - for (int i = 0; i < min; i++) { - bits[i] |= otherBits.bits[i]; - } - } - - public void xor(BitSet otherBits) { - int max = Math.max(bits.length, otherBits.bits.length); - enlarge(max); - int min = Math.min(bits.length, otherBits.bits.length); - for (int i = 0; i < min; i++) { - bits[i] ^= otherBits.bits[i]; - } - } - - private void enlarge(int newPartition) { - if (bits == null || bits.length < (newPartition + 1)) { - long[] newBits = new long[newPartition + 1]; - if (bits != null) { - System.arraycopy(bits, 0, newBits, 0, bits.length); - } - bits = newBits; - } - } - - public boolean get(int index) { - int pos = longPosition(index); - if (pos < bits.length) { - return (bits[pos] & bitPosition(index)) != 0; - } - return false; - } - - public void flip(int index) { - flip(index, index+1); - } - - public void flip(int fromIndex, int toIndex) { - if (fromIndex > toIndex || fromIndex < 0 || toIndex < 0) { - throw new IndexOutOfBoundsException(); - } else if (fromIndex != toIndex) { - MaskInfoIterator iter = new MaskInfoIterator(fromIndex, toIndex); - enlarge(iter.getLastPartition()); - while (iter.hasNext()) { - MaskInfo info = iter.next(); - bits[info.partitionIndex] ^= info.mask; - } - } - } - - public void set(int index) { - int pos = longPosition(index); - enlarge(pos); - bits[pos] |= bitPosition(index); - } - - public void set(int start, int end) { - MaskInfoIterator iter = new MaskInfoIterator(start, end); - enlarge(iter.getLastPartition()); - while (iter.hasNext()) { - MaskInfo info = iter.next(); - bits[info.partitionIndex] |= info.mask; - } - } - - public void clear(int index) { - int pos = longPosition(index); - if (pos < bits.length) { - bits[pos] &= (MASK ^ bitPosition(index)); - } - } - - public void clear(int start, int end) { - MaskInfoIterator iter = new MaskInfoIterator(start, end); - while (iter.hasNext()) { - MaskInfo info = iter.next(); - bits[info.partitionIndex] &= (MASK ^ info.mask); - } - } - - public boolean isEmpty() { - for (int i = 0; i < bits.length; i++) { - if (bits[i] != 0) { - return false; - } - } - return true; - } - - public boolean intersects(BitSet otherBits) { - int max = Math.max(bits.length, otherBits.bits.length); - for (int i = 0; i < max; i++) { - if ((bits[i] & otherBits.bits[i]) != 0) { - return true; - } - } - return false; - } - - public int length() { - return bits.length << BITS_PER_LONG_SHIFT; - } - - public int nextSetBit(int fromIndex) { - return nextBit(fromIndex, false); - } - - private int nextBit(int fromIndex, boolean bitClear) { - int pos = longPosition(fromIndex); - if (pos >= bits.length) { - return -1; - } - int current = fromIndex; - do { - long currValue = bits[pos]; - if (currValue == 0) { - pos++; - current = pos << BITS_PER_LONG_SHIFT; - } else { - do { - long bitPos = bitPosition(current); - if (((currValue & bitPos) != 0) ^ bitClear) { - return current; - } else { - current++; - } - } while (current % BITS_PER_LONG != 0); - } - pos++; - } while (pos < bits.length); - - return -1; - } - - public int nextClearBit(int fromIndex) { - return nextBit(fromIndex, true); - } - - public int cardinality() { - int numSetBits = 0; - for (int i = nextSetBit(0); i >= 0; i = nextSetBit(i+1)) { - ++numSetBits; - } - - return numSetBits; - } - - private static class MaskInfoIterator implements Iterator { - private int basePartition; - private int numPartitionsToTraverse; - private int currentPartitionOffset; - private int toIndex; - private int currentFirstIndex; - - public MaskInfoIterator(int fromIndex, int toIndex) { - this.basePartition = longPosition(fromIndex); - this.numPartitionsToTraverse = longPosition(toIndex - 1) - basePartition + 1; - this.currentPartitionOffset = 0; - this.toIndex = toIndex; - this.currentFirstIndex = fromIndex; - } - - public MaskInfo next() { - int currentToIndex = Math.min(toIndex, (basePartition + currentPartitionOffset + 1) * BITS_PER_LONG); - long mask = getTrueMask(currentFirstIndex, currentToIndex); - MaskInfo info = new MaskInfo(mask, basePartition + currentPartitionOffset); - currentFirstIndex = currentToIndex; - currentPartitionOffset++; - return info; - } - - public boolean hasNext() { - return currentPartitionOffset < numPartitionsToTraverse; - } - - public void remove() { - throw new UnsupportedOperationException(); - } - - public int getLastPartition() { - return basePartition + numPartitionsToTraverse - 1; - } - } - - private static class MaskInfo { - public long mask; - public int partitionIndex; - - public MaskInfo(long mask, int partitionIndex) { - this.mask = mask; - this.partitionIndex = partitionIndex; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Calendar.java b/sgx-jvm/avian/classpath/java/util/Calendar.java deleted file mode 100644 index 964241c5f7..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Calendar.java +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public abstract class Calendar { - public static final int AM = 0; - public static final int AM_PM = 9; - public static final int DAY_OF_MONTH = 5; - public static final int DAY_OF_WEEK = 7; - public static final int HOUR = 10; - public static final int HOUR_OF_DAY = 11; - public static final int MINUTE = 12; - public static final int MONTH = 2; - public static final int PM = 1; - public static final int SECOND = 13; - public static final int YEAR = 1; - - public static final int FIELD_COUNT = 17; - - protected long time; - protected boolean isTimeSet; - protected int[] fields = new int[FIELD_COUNT]; - protected boolean areFieldsSet; - protected boolean[] isSet = new boolean[FIELD_COUNT]; - - protected Calendar() { } - - public static Calendar getInstance() { - return new MyCalendar(0); - } - - public int get(int field) { - return fields[field]; - } - - public void set(int field, int value) { - fields[field] = value; - } - - public void set(int year, int month, int date) { - set(YEAR, year); - set(MONTH, month); - set(DAY_OF_MONTH, date); - } - - public void setTime(Date date) { - time = date.getTime(); - } - - public Date getTime() { - return new Date(time); - } - - public abstract void roll(int field, boolean up); - public abstract void add(int field, int amount); - - public void roll(int field, int amount) { - boolean up = amount >= 0; - if (! up) { - amount = - amount; - } - for (int i = 0; i < amount; ++i) { - roll(field, up); - } - } - - public abstract int getMinimum(int field); - - public abstract int getMaximum(int field); - - public abstract int getActualMinimum(int field); - - public abstract int getActualMaximum(int field); - - private static class MyCalendar extends Calendar { - private static final long MILLIS_PER_DAY = 86400000; - private static final int MILLIS_PER_HOUR = 3600000; - private static final int MILLIS_PER_MINUTE = 60000; - private static final int MILLIS_PER_SECOND = 1000; - - private static final int EPOCH_YEAR = 1970; - private static final int EPOCH_LEAP_YEAR = 1968; - private static final int DAYS_TO_EPOCH = 731; - - private static final int[][] DAYS_IN_MONTH = new int[][] { - { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }, - { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } - }; - - public MyCalendar(long time) { - this.time = time; - this.isTimeSet = true; - parseIntoFields(time); - } - - public void setTime(Date date) { - super.setTime(date); - parseIntoFields(this.time); - } - - public Date getTime() { - long days = fields[DAY_OF_MONTH] - 1; - long years = fields[YEAR] - EPOCH_LEAP_YEAR; - days += years * 365 + years / 4 + 1 - DAYS_TO_EPOCH; - for (int month = 0; month < fields[MONTH]; month++) { - days += DAYS_IN_MONTH[0][month]; - } - if (fields[MONTH] < 2 && isLeapYear(fields[YEAR])) { - days--; - } - long time = MILLIS_PER_DAY * days - + MILLIS_PER_HOUR * fields[HOUR_OF_DAY] - + MILLIS_PER_MINUTE * fields[MINUTE] - + MILLIS_PER_SECOND * fields[SECOND]; - return new Date(time); - } - - private static boolean isLeapYear(int year) { - return (year%4 == 0) && (year%100 != 0) || (year%400 == 0); - } - - private void parseIntoFields(long timeInMillis) { - long days = timeInMillis / MILLIS_PER_DAY; - /* convert days since Jan 1, 1970 to days since Jan 1, 1968 */ - days += DAYS_TO_EPOCH; - long years = 4 * days / 1461; /* days/365.25 = 4*days/(4*365.25) */ - int year = (int)(EPOCH_LEAP_YEAR + years); - days -= 365 * years + years / 4; - if (!isLeapYear(year)) days--; - - int month=0; - int leapIndex = isLeapYear(year) ? 1 : 0; - while (days >= DAYS_IN_MONTH[leapIndex][month]) { - days -= DAYS_IN_MONTH[leapIndex][month++]; - } - days++; - - int remainder = (int)(timeInMillis % MILLIS_PER_DAY); - int hour = remainder / MILLIS_PER_HOUR; - remainder = remainder % MILLIS_PER_HOUR; - int minute = remainder / MILLIS_PER_MINUTE; - remainder = remainder % MILLIS_PER_MINUTE; - int second = remainder / MILLIS_PER_SECOND; - fields[YEAR] = year; - fields[MONTH] = month; - fields[DAY_OF_MONTH] = (int)days; - fields[HOUR_OF_DAY] = hour; - fields[MINUTE] = minute; - fields[SECOND] = second; - } - - public void roll(int field, boolean up) { - // todo - } - - public void add(int fild, int amount) { - // todo - } - - public int getMinimum(int field) { - // todo - return 0; - } - - public int getMaximum(int field) { - // todo - return 0; - } - - public int getActualMinimum(int field) { - // todo - return 0; - } - - public int getActualMaximum(int field) { - // todo - return 0; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Collection.java b/sgx-jvm/avian/classpath/java/util/Collection.java deleted file mode 100644 index 9f0b740961..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Collection.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Collection extends Iterable { - public int size(); - - public boolean isEmpty(); - - public boolean contains(Object element); - - public boolean containsAll(Collection c); - - public boolean add(T element); - - public boolean addAll(Collection collection); - - public boolean remove(Object element); - - public boolean removeAll(Collection c); - - public Object[] toArray(); - - public S[] toArray(S[] array); - - public void clear(); -} diff --git a/sgx-jvm/avian/classpath/java/util/Collections.java b/sgx-jvm/avian/classpath/java/util/Collections.java deleted file mode 100644 index 5fdb68c038..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Collections.java +++ /dev/null @@ -1,820 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import avian.Data; - -public class Collections { - - private Collections() { } - - public static void shuffle(List list, Random random) { - Object[] array = Data.toArray(list, new Object[list.size()]); - for (int i = 0; i < array.length; ++i) { - int j = random.nextInt(array.length); - Object tmp = array[i]; - array[i] = array[j]; - array[j] = tmp; - } - - list.clear(); - for (int i = 0; i < array.length; ++i) { - list.add(array[i]); - } - } - - public static void sort(List list) { - sort(list, new Comparator() { - public int compare(Object a, Object b) { - return ((Comparable) a).compareTo(b); - } - }); - } - - private final static int SORT_SIZE_THRESHOLD = 16; - - public static void sort(List list, Comparator comparator) { - int size = list.size(); - introSort(list, comparator, 0, size, size); - insertionSort(list, comparator); - } - - private static void introSort(List list, - Comparator comparator, int begin, int end, int limit) - { - while (end - begin > SORT_SIZE_THRESHOLD) { - if (limit == 0) { - heapSort(list, comparator, begin, end); - return; - } - limit >>= 1; - - // median of three - T a = list.get(begin); - T b = list.get(begin + (end - begin) / 2 + 1); - T c = list.get(end - 1); - T median; - if (comparator.compare(a, b) < 0) { - median = comparator.compare(b, c) < 0 ? - b : (comparator.compare(a, c) < 0 ? c : a); - } else { - median = comparator.compare(b, c) > 0 ? - b : (comparator.compare(a, c) > 0 ? c : a); - } - - // partition - int pivot, i = begin, j = end; - for (;;) { - while (comparator.compare(list.get(i), median) < 0) { - ++i; - } - --j; - while (comparator.compare(median, list.get(j)) < 0) { - --j; - } - if (i >= j) { - pivot = i; - break; - } - T swap = list.get(i); - list.set(i, list.get(j)); - list.set(j, swap); - ++i; - } - - introSort(list, comparator, pivot, end, limit); - end = pivot; - } - } - - private static void heapSort(List list, Comparator comparator, - int begin, int end) - { - int count = end - begin; - for (int i = count / 2 - 1; i >= 0; --i) { - siftDown(list, comparator, i, count, begin); - } - for (int i = count - 1; i > 0; --i) { - // swap begin and begin + i - T swap = list.get(begin + i); - list.set(begin + i, list.get(begin)); - list.set(begin, swap); - - siftDown(list, comparator, 0, i, begin); - } - } - - private static void siftDown(List list, Comparator comparator, - int i, int count, int offset) - { - T value = list.get(offset + i); - while (i < count / 2) { - int child = 2 * i + 1; - if (child + 1 < count && - comparator.compare(list.get(child), list.get(child + 1)) < 0) { - ++child; - } - if (comparator.compare(value, list.get(child)) >= 0) { - break; - } - list.set(offset + i, list.get(offset + child)); - i = child; - } - list.set(offset + i, value); - } - - private static void insertionSort(List list, - Comparator comparator) - { - int size = list.size(); - for (int j = 1; j < size; ++j) { - T t = list.get(j); - int i = j - 1; - while (i >= 0 && comparator.compare(list.get(i), t) > 0) { - list.set(i + 1, list.get(i)); - --i; - } - list.set(i + 1, t); - } - } - - public static int binarySearch(List list, T needle) { - int left = -1, right = list.size(); - while (left + 1 < right) { - int middle = (left + right) >> 1; - int result = ((Comparable)needle).compareTo(list.get(middle)); - if (result < 0) { - right = middle; - } else if (result > 0) { - left = middle; - } else { - return middle; - } - } - return -1 - right; - } - - public static void reverse(List list) { - int ascending = 0, descending = list.size() - 1; - while (ascending < descending) { - T tmp = list.get(ascending); - list.set(ascending++, list.get(descending)); - list.set(descending--, tmp); - } - } - - public static final List EMPTY_LIST - = new UnmodifiableList(new ArrayList(0)); - - public static final List emptyList() { - return EMPTY_LIST; - } - - public static final Map emptyMap() { - return (Map) new UnmodifiableMap( - new HashMap(0)); - } - - public static final Set emptySet() { - return (Set) new UnmodifiableSet( - new HashSet(0)); - } - - public static Enumeration enumeration(Collection c) { - return new IteratorEnumeration (c.iterator()); - } - - public static Comparator reverseOrder(Comparator cmp) { - return new ReverseComparator(cmp); - } - - public static boolean addAll(Collection collection, T... items) { - boolean modified = false; - for (T item : items) { - modified |= collection.add(item); - } - return modified; - } - - static class IteratorEnumeration implements Enumeration { - private final Iterator it; - - public IteratorEnumeration(Iterator it) { - this.it = it; - } - - public T nextElement() { - return it.next(); - } - - public boolean hasMoreElements() { - return it.hasNext(); - } - } - - static class SynchronizedCollection implements Collection { - protected final Object lock; - protected final Collection collection; - - public SynchronizedCollection(Object lock, Collection collection) { - this.lock = lock; - this.collection = collection; - } - - public int size() { - synchronized (lock) { return collection.size(); } - } - - public boolean isEmpty() { - return size() == 0; - } - - public boolean contains(Object e) { - synchronized (lock) { return collection.contains(e); } - } - - public boolean add(T e) { - synchronized (lock) { return collection.add(e); } - } - - public boolean addAll(Collection collection) { - synchronized (lock) { return this.collection.addAll(collection); } - } - - public boolean remove(Object e) { - synchronized (lock) { return collection.remove((T)e); } - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - synchronized (lock) { return collection.toArray(array); } - } - - public void clear() { - synchronized (lock) { collection.clear(); } - } - - public Iterator iterator() { - return new SynchronizedIterator(lock, collection.iterator()); - } - - public boolean containsAll(Collection c) { - synchronized (lock) { return collection.containsAll(c); } - } - - public boolean removeAll(Collection c) { - synchronized (lock) { return collection.removeAll(c); } - } - } - - static class SynchronizedMap implements Map { - protected final Object lock; - protected final Map map; - - SynchronizedMap(Map map) { - this.map = map; - this.lock = this; - } - - SynchronizedMap(Object lock, Map map) { - this.lock = lock; - this.map = map; - } - - public void clear() { - synchronized (lock) { map.clear(); } - } - public boolean containsKey(Object key) { - synchronized (lock) { return map.containsKey(key); } - } - public boolean containsValue(Object value) { - synchronized (lock) { return map.containsValue(value); } - } - public Set> entrySet() { - synchronized (lock) { return new SynchronizedSet>(lock, map.entrySet()); } - } - public V get(Object key) { - synchronized (lock) { return map.get(key); } - } - public boolean isEmpty() { - synchronized (lock) { return map.isEmpty(); } - } - public Set keySet() { - synchronized (lock) { return new SynchronizedSet(lock, map.keySet()); } - } - public V put(K key, V value) { - synchronized (lock) { return map.put(key, value); } - } - public void putAll(Map elts) { - synchronized (lock) { map.putAll(elts); } - } - public V remove(Object key) { - synchronized (lock) { return map.remove(key); } - } - public int size() { - synchronized (lock) { return map.size(); } - } - public Collection values() { - synchronized (lock) { return new SynchronizedCollection(lock, map.values()); } - } - } - - public static Map synchronizedMap(Map map) { - return new SynchronizedMap (map); - } - - static class SynchronizedSet - extends SynchronizedCollection - implements Set - { - public SynchronizedSet(Object lock, Set set) { - super(lock, set); - } - } - - public static Set synchronizedSet(Set set) { - return new SynchronizedSet (set, set); - } - - static class SynchronizedList - extends SynchronizedCollection - implements List - { - private final List list; - - public SynchronizedList(List list) { - super(list, list); - - this.list = list; - } - - @Override - public T get(int index) { - synchronized (lock) { - return list.get(index); - } - } - - @Override - public T set(int index, T value) { - synchronized (lock) { - return list.set(index, value); - } - } - - @Override - public T remove(int index) { - synchronized (lock) { - return list.remove(index); - } - } - - @Override - public void add(int index, T element) { - synchronized (lock) { - list.add(index, element); - } - } - - @Override - public boolean addAll(int startIndex, Collection c) { - synchronized (lock) { - return list.addAll(startIndex, c); - } - } - - @Override - public int indexOf(Object value) { - synchronized (lock) { - return list.indexOf(value); - } - } - - @Override - public int lastIndexOf(Object value) { - synchronized (lock) { - return list.lastIndexOf(value); - } - } - - @Override - public ListIterator listIterator(int index) { - // as described in the javadocs, user should be synchronized on list before calling - return list.listIterator(index); - } - - @Override - public ListIterator listIterator() { - // as described in the javadocs, user should be synchronized on list before calling - return list.listIterator(); - } - } - - static class RandomAccessSynchronizedList - extends SynchronizedList - implements RandomAccess - { - public RandomAccessSynchronizedList(List list) { - super(list); - } - } - - public static List synchronizedList(List list) { - List result; - if (list instanceof RandomAccess) { - result = new RandomAccessSynchronizedList(list); - } else { - result = new SynchronizedList(list); - } - - return result; - } - - static class SynchronizedIterator implements Iterator { - private final Object lock; - private final Iterator it; - - public SynchronizedIterator(Object lock, Iterator it) { - this.lock = lock; - this.it = it; - } - - public T next() { - synchronized (lock) { return it.next(); } - } - - public boolean hasNext() { - synchronized (lock) { return it.hasNext(); } - } - - public void remove() { - synchronized (lock) { it.remove(); } - } - } - - static class ArrayListIterator implements ListIterator { - private final List list; - private int toRemove = -1; - private int index; - - public ArrayListIterator(List list) { - this(list, 0); - } - - public ArrayListIterator(List list, int index) { - this.list = list; - this.index = index - 1; - } - - public boolean hasPrevious() { - return index >= 0; - } - - public T previous() { - if (hasPrevious()) { - toRemove = index; - return list.get(index--); - } else { - throw new NoSuchElementException(); - } - } - - public T next() { - if (hasNext()) { - toRemove = ++index; - return list.get(index); - } else { - throw new NoSuchElementException(); - } - } - - public boolean hasNext() { - return index + 1 < list.size(); - } - - public void remove() { - if (toRemove != -1) { - list.remove(toRemove); - index = toRemove - 1; - toRemove = -1; - } else { - throw new IllegalStateException(); - } - } - } - - public static List unmodifiableList(List list) { - return new UnmodifiableList(list); - } - - static class UnmodifiableList implements List { - - private List inner; - - UnmodifiableList(List l) { - this.inner = l; - } - - public T get(int index) { - return inner.get(index); - } - - public T set(int index, T value) { - throw new UnsupportedOperationException(); - } - - public T remove(int index) { - throw new UnsupportedOperationException(); - } - - public boolean remove(Object o) { - throw new UnsupportedOperationException(); - } - - public boolean add(T element) { - throw new UnsupportedOperationException(); - } - - public void add(int index, T element) { - throw new UnsupportedOperationException(); - } - - public Iterator iterator() { - return new UnmodifiableIterator(inner.iterator()); - } - - public int indexOf(Object value) { - return inner.indexOf(value); - } - - public int lastIndexOf(Object value) { - return inner.lastIndexOf(value); - } - - public boolean isEmpty() { - return inner.isEmpty(); - } - - public ListIterator listIterator(int index) { - return new UnmodifiableListIterator(inner.listIterator(index)); - } - - public ListIterator listIterator() { - return new UnmodifiableListIterator(inner.listIterator()); - } - - public int size() { - return inner.size(); - } - - public boolean contains(Object element) { - return inner.contains(element); - } - - public boolean addAll(Collection collection) { - throw new UnsupportedOperationException(); - } - - public Object[] toArray() { - return inner.toArray(); - } - - public S[] toArray(S[] array) { - return inner.toArray(array); - } - - public void clear() { - throw new UnsupportedOperationException(); - } - - public boolean removeAll(Collection c) { - throw new UnsupportedOperationException(); - } - - public boolean addAll(int startIndex, Collection c) { - throw new UnsupportedOperationException(); - } - - public boolean containsAll(Collection c) { - return inner.containsAll(c); - } - } - - public static Map unmodifiableMap(Map m) { - return new UnmodifiableMap(m); - } - - static class UnmodifiableMap implements Map { - private Map inner; - - UnmodifiableMap(Map m) { - this.inner = m; - } - - public void clear() { - throw new UnsupportedOperationException(); - } - - public boolean containsKey(Object key) { - return inner.containsKey(key); - } - - public boolean containsValue(Object value) { - return inner.containsValue(value); - } - - public Set> entrySet() { - return unmodifiableSet(inner.entrySet()); - } - - public V get(Object key) { - return inner.get(key); - } - - public boolean isEmpty() { - return inner.isEmpty(); - } - - public Set keySet() { - return unmodifiableSet(inner.keySet()); - } - - public V put(K key, V value) { - throw new UnsupportedOperationException(); - } - - public void putAll(Map t) { - throw new UnsupportedOperationException(); - } - - public V remove(Object key) { - throw new UnsupportedOperationException(); - } - - public int size() { - return inner.size(); - } - - public Collection values() { - return unmodifiableCollection(inner.values()); - } - } - - static class UnmodifiableIterator implements Iterator { - private final Iterator inner; - - UnmodifiableIterator(Iterator inner) { - this.inner = inner; - } - - @Override - public T next() { - return inner.next(); - } - - @Override - public boolean hasNext() { - return inner.hasNext(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - } - - - static class UnmodifiableListIterator extends UnmodifiableIterator - implements ListIterator { - private final ListIterator innerListIterator; - - UnmodifiableListIterator(ListIterator listIterator) { - super(listIterator); - - this.innerListIterator = listIterator; - } - - @Override - public boolean hasPrevious() { - return innerListIterator.hasPrevious(); - } - - @Override - public T previous() { - return innerListIterator.previous(); - } - } - - static class UnmodifiableCollection implements Collection { - private final Collection inner; - - UnmodifiableCollection(Collection inner) { - this.inner = inner; - } - - @Override - public Iterator iterator() { - return new UnmodifiableIterator(inner.iterator()); - } - - @Override - public int size() { - return inner.size(); - } - - @Override - public boolean isEmpty() { - return inner.isEmpty(); - } - - @Override - public boolean contains(Object element) { - return inner.contains(element); - } - - @Override - public boolean containsAll(Collection c) { - return inner.containsAll(c); - } - - @Override - public boolean add(T element) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean addAll(Collection collection) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean remove(Object element) { - throw new UnsupportedOperationException(); - } - - @Override - public boolean removeAll(Collection c) { - throw new UnsupportedOperationException(); - } - - @Override - public Object[] toArray() { - return inner.toArray(); - } - - @Override - public S[] toArray(S[] array) { - return inner.toArray(array); - } - - @Override - public void clear() { - throw new UnsupportedOperationException(); - } - } - - public static UnmodifiableCollection unmodifiableCollection(Collection collection) { - return new UnmodifiableCollection(collection); - } - - static class UnmodifiableSet extends UnmodifiableCollection - implements Set { - UnmodifiableSet(Set inner) { - super(inner); - } - } - - public static Set unmodifiableSet(Set hs) { - return new UnmodifiableSet(hs); - } - - private static final class ReverseComparator implements Comparator { - - Comparator cmp; - - public ReverseComparator(Comparator cmp) { - this.cmp = cmp; - } - - public int compare(T o1, T o2) { - return - cmp.compare(o1, o2); - } - } - - public static List singletonList(T o) { - ArrayList list = new ArrayList(1); - list.add(o); - return new UnmodifiableList(list); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Comparator.java b/sgx-jvm/avian/classpath/java/util/Comparator.java deleted file mode 100644 index 6d861ea393..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Comparator.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Comparator { - public int compare(T o1, T o2); -} diff --git a/sgx-jvm/avian/classpath/java/util/ConcurrentModificationException.java b/sgx-jvm/avian/classpath/java/util/ConcurrentModificationException.java deleted file mode 100644 index f828ac169e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/ConcurrentModificationException.java +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -/** - * @author zsombor - * - */ -public class ConcurrentModificationException extends RuntimeException { - - /** - * @param message - * @param cause - */ - public ConcurrentModificationException(String message, Throwable cause) { - super(message, cause); - } - - /** - * @param message - */ - public ConcurrentModificationException(String message) { - super(message); - } - - /** - * @param cause - */ - public ConcurrentModificationException(Throwable cause) { - super(cause); - } - - /** - * - */ - public ConcurrentModificationException() { - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/Date.java b/sgx-jvm/avian/classpath/java/util/Date.java deleted file mode 100644 index 7154cf26a5..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Date.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class Date { - public final long when; - - public Date(long when) { - this.when = when; - } - - public long getTime() { - return when; - } - - public String toString() { - return toString(when); - } - - private static native String toString(long when); -} diff --git a/sgx-jvm/avian/classpath/java/util/Deque.java b/sgx-jvm/avian/classpath/java/util/Deque.java deleted file mode 100644 index 8586090f42..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Deque.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Deque extends Queue { - public boolean offerFirst(T e); - public void push(T e); - public void addFirst(T element); - public boolean offerLast(T e); - public void addLast(T element); - public T peekFirst(); - public T getFirst(); - public T peekLast(); - public T getLast(); - public T pollFirst(); - public T removeFirst(); - public T pop(); - public T pollLast(); - public T removeLast(); - public Iterator descendingIterator(); - public boolean removeLastOccurrence(Object o); - public boolean removeFirstOccurrence(Object o); -} diff --git a/sgx-jvm/avian/classpath/java/util/EmptyStackException.java b/sgx-jvm/avian/classpath/java/util/EmptyStackException.java deleted file mode 100644 index 2e5a406987..0000000000 --- a/sgx-jvm/avian/classpath/java/util/EmptyStackException.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class EmptyStackException extends RuntimeException {} diff --git a/sgx-jvm/avian/classpath/java/util/EnumSet.java b/sgx-jvm/avian/classpath/java/util/EnumSet.java deleted file mode 100644 index 7b40b56405..0000000000 --- a/sgx-jvm/avian/classpath/java/util/EnumSet.java +++ /dev/null @@ -1,155 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class EnumSet> extends AbstractSet { - - private BitSet bitset; - private Class elementType; - - private EnumSet(int size, Class type) { - bitset = new BitSet(size); - elementType = type; - } - - @Override - public boolean add(T element) { - int index = element.ordinal(); - boolean contains = bitset.get(index); - if (!contains) { - bitset.set(index); - } - - return !contains; - } - - @Override - public boolean remove(Object toRemove) { - T element = tryToCast(toRemove); - - int index = element.ordinal(); - boolean contains = bitset.get(index); - if (contains) { - bitset.clear(index); - } - - return contains; - } - - @Override - public boolean contains(Object toCheck) { - T element = tryToCast(toCheck); - int index = element.ordinal(); - return bitset.get(index); - } - - @Override - public int size() { - return bitset.cardinality(); - } - - @Override - public Iterator iterator() { - return new EnumSetIterator(); - } - - public static >EnumSet allOf(Class elementType) { - EnumSet enumSet = createEmptyEnumSet(elementType); - enumSet.bitset.set(0, elementType.getEnumConstants().length); - - return enumSet; - } - - public static >EnumSet noneOf(Class elementType) { - return createEmptyEnumSet(elementType); - } - - public static >EnumSet of(T first, T ... rest) { - EnumSet enumSet = createEmptyEnumSet(first.getDeclaringClass()); - enumSet.add(first); - addAllElementsToSet(Arrays.asList(rest), enumSet); - - return enumSet; - } - - public static >EnumSet complementOf(EnumSet s) { - EnumSet enumSet = copyOf(s); - enumSet.bitset.flip(0, s.elementType.getEnumConstants().length); - - return enumSet; - } - - public static >EnumSet copyOf(EnumSet s) { - EnumSet enumSet = createEmptyEnumSet(s.elementType); - enumSet.bitset.or(s.bitset); - - return enumSet; - } - - private static >EnumSet createEmptyEnumSet(Class elementType) { - T[] constants = elementType.getEnumConstants(); - EnumSet enumSet = new EnumSet(constants.length, elementType); - - return enumSet; - } - - private static > void addAllElementsToSet(Iterable elements, EnumSet enumSet) { - for (T element : elements) { - enumSet.add(element); - } - } - - @SuppressWarnings("unchecked") - private T tryToCast(Object object) throws ClassCastException { - //We want the class cast exception if we can't convert. - return (T) object; - } - - private class EnumSetIterator implements Iterator { - private int currentIndex = 0; - private boolean removeAllowed = false; - - public T next() { - if (!hasNext()) { - throw new NoSuchElementException("EnumSet has no more elements"); - } - - int indexOfNextValue = nextIndex(); - T element = elementType.getEnumConstants()[indexOfNextValue]; - currentIndex = indexOfNextValue + 1; - removeAllowed = true; - - return element; - } - - public boolean hasNext() { - int indexOfNextValue = nextIndex(); - if (indexOfNextValue >= 0) { - return true; - } else { - return false; - } - } - - public void remove() { - if (!removeAllowed) { - throw new IllegalStateException("Cannot remove from this iterator in this state"); - } - - bitset.clear(currentIndex - 1); - removeAllowed = false; - } - - private int nextIndex() { - return bitset.nextSetBit(currentIndex); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Enumeration.java b/sgx-jvm/avian/classpath/java/util/Enumeration.java deleted file mode 100644 index 70e50b6d59..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Enumeration.java +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Enumeration { - public T nextElement(); - - public boolean hasMoreElements(); -} diff --git a/sgx-jvm/avian/classpath/java/util/EventListener.java b/sgx-jvm/avian/classpath/java/util/EventListener.java deleted file mode 100644 index 3b27d4a709..0000000000 --- a/sgx-jvm/avian/classpath/java/util/EventListener.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface EventListener { - -} diff --git a/sgx-jvm/avian/classpath/java/util/EventObject.java b/sgx-jvm/avian/classpath/java/util/EventObject.java deleted file mode 100644 index 25be1f5df2..0000000000 --- a/sgx-jvm/avian/classpath/java/util/EventObject.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class EventObject { - protected Object source; - - public EventObject(Object source) { - this.source = source; - } - - public Object getSource() { - return source; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Formatter.java b/sgx-jvm/avian/classpath/java/util/Formatter.java deleted file mode 100644 index 12d5919e82..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Formatter.java +++ /dev/null @@ -1,158 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.io.Closeable; -import java.io.File; -import java.io.FileWriter; -import java.io.Flushable; -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.PrintStream; -import java.io.Writer; - -import avian.FormatString; - -public class Formatter implements Closeable, Flushable, AutoCloseable { - - private final Appendable _out; - - private final Locale _locale; - - private IOException lastException; - - private boolean _closed; - - private void ensureNotClosed() { - if (this._closed) { - throw new IllegalStateException(); - } - } - - public Formatter() { - this((Appendable) null, (Locale) null); - } - - public Formatter(final Appendable a) { - this(a, null); - } - - public Formatter(final Appendable a, final Locale l) { - if (a == null) { - this._out = new StringBuilder(); - } else { - this._out = a; - } - if (l == null) { - this._locale = Locale.getDefault(); - } else { - this._locale = l; - } - } - - public Formatter(File file) throws IOException { - this(file, null); - } - - public Formatter(File file, Locale l) throws IOException { - this(new FileWriter(file), l); - } - - public Formatter(Locale l) { - this((Appendable) null, l); - } - - public Formatter(OutputStream os) { - this(os, null); - } - - public Formatter(OutputStream os, Locale l) { - this(new OutputStreamWriter(os), l); - } - - public Formatter(PrintStream ps) { - this(new OutputStreamWriter(ps)); - } - - public Formatter(String fileName) throws IOException { - this(fileName, (Locale) null); - } - - public Formatter(String fileName, Locale l) throws IOException { - this(new File(fileName), l); - } - - public void close() { - if (this._closed) { - return; - } - final Appendable out = out(); - if (out instanceof Closeable) { - final Closeable closeable = (Closeable) out; - try { - closeable.close(); - } catch (IOException e) { - throw new RuntimeException("An error occurred while closing.", e); - } - this._closed = true; - } - } - - public void flush() { - ensureNotClosed(); - final Appendable out = out(); - if (out instanceof Flushable) { - final Flushable flushable = (Flushable) out; - try { - flushable.flush(); - } catch (IOException e) { - throw new RuntimeException("An error occurred while flushing.", e); - } - } - } - - public Formatter format(Locale l, final String format, final Object...args) { - ensureNotClosed(); - try { - final FormatString formatString = FormatString.compile(format); - this._out.append(formatString.format(args)); - } catch (IOException e) { - this.lastException = e; - } - return this; - } - - public Formatter format(String format, Object... args) { - ensureNotClosed(); - return this.format(null, format, args); - } - - public IOException ioException() { - return lastException; - } - - public Locale locale() { - ensureNotClosed(); - return this._locale; - } - - public Appendable out() { - ensureNotClosed(); - return this._out; - } - - public String toString() { - ensureNotClosed(); - return this._out.toString(); - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/HashMap.java b/sgx-jvm/avian/classpath/java/util/HashMap.java deleted file mode 100644 index c86f1dde4a..0000000000 --- a/sgx-jvm/avian/classpath/java/util/HashMap.java +++ /dev/null @@ -1,385 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import avian.Data; - -public class HashMap implements Map { - private static final int MinimumCapacity = 16; - - private int size; - private Cell[] array; - private final Helper helper; - - public HashMap(int capacity, Helper helper) { - if (capacity > 0) { - array = new Cell[Data.nextPowerOfTwo(capacity)]; - } - this.helper = helper; - } - - public HashMap(int capacity) { - this(capacity, new MyHelper()); - } - - public HashMap() { - this(0); - } - - public HashMap(Map map) { - this(map.size()); - for (Map.Entry entry : map.entrySet()) { - put(entry.getKey(), entry.getValue()); - } - } - - public String toString() { - return avian.Data.toString(this); - } - - public boolean isEmpty() { - return size() == 0; - } - - public int size() { - return size; - } - - private void grow() { - if (array == null || size >= array.length * 2) { - resize(array == null ? MinimumCapacity : array.length * 2); - } - } - - private void shrink() { - if (array.length / 2 >= MinimumCapacity && size <= array.length / 3) { - resize(array.length / 2); - } - } - - private void resize(int capacity) { - Cell[] newArray = null; - if (capacity != 0) { - capacity = Data.nextPowerOfTwo(capacity); - if (array != null && array.length == capacity) { - return; - } - - newArray = new Cell[capacity]; - if (array != null) { - for (int i = 0; i < array.length; ++i) { - Cell next; - for (Cell c = array[i]; c != null; c = next) { - next = c.next(); - int index = c.hashCode() & (capacity - 1); - c.setNext(newArray[index]); - newArray[index] = c; - } - } - } - } - array = newArray; - } - - protected Cell find(Object key) { - if (array != null) { - int index = helper.hash(key) & (array.length - 1); - for (Cell c = array[index]; c != null; c = c.next()) { - if (helper.equal(key, c.getKey())) { - return c; - } - } - } - - return null; - } - - private void insert(Cell cell) { - ++ size; - - grow(); - - int index = cell.hashCode() & (array.length - 1); - cell.setNext(array[index]); - array[index] = cell; - } - - public void remove(Cell cell) { - int index = cell.hashCode() & (array.length - 1); - Cell p = null; - for (Cell c = array[index]; c != null; c = c.next()) { - if (c == cell) { - if (p == null) { - array[index] = c.next(); - } else { - p.setNext(c.next()); - } - -- size; - break; - } - } - - shrink(); - } - - private Cell putCell(K key, V value) { - Cell c = find(key); - if (c == null) { - insert(helper.make(key, value, null)); - } else { - c.setValue(value); - } - return c; - } - - public boolean containsKey(Object key) { - return find(key) != null; - } - - public boolean containsValue(Object value) { - if (array != null) { - for (int i = 0; i < array.length; ++i) { - for (Cell c = array[i]; c != null; c = c.next()) { - if (helper.equal(value, c.getValue())) { - return true; - } - } - } - } - - return false; - } - - public V get(Object key) { - Cell c = find(key); - return (c == null ? null : c.getValue()); - } - - public Cell removeCell(Object key) { - Cell old = null; - if (array != null) { - int index = helper.hash(key) & (array.length - 1); - Cell p = null; - for (Cell c = array[index]; c != null; c = c.next()) { - if (helper.equal(key, c.getKey())) { - old = c; - if (p == null) { - array[index] = c.next(); - } else { - p.setNext(c.next()); - } - -- size; - break; - } - p = c; - } - - shrink(); - } - return old; - } - - public V put(K key, V value) { - Cell c = find(key); - if (c == null) { - insert(helper.make(key, value, null)); - return null; - } else { - V old = c.getValue(); - c.setValue(value); - return old; - } - } - - public void putAll(Map elts) { - for (Map.Entry entry : elts.entrySet()) { - put(entry.getKey(), entry.getValue()); - } - } - - public V remove(Object key) { - Cell c = removeCell((K)key); - return (c == null ? null : c.getValue()); - } - - public void clear() { - array = null; - size = 0; - } - - public Set> entrySet() { - return new Data.EntrySet(new MyEntryMap()); - } - - public Set keySet() { - return new Data.KeySet(new MyEntryMap()); - } - - public Collection values() { - return new Data.Values(new MyEntryMap()); - } - - Iterator> iterator() { - return new MyIterator(); - } - - private class MyEntryMap implements Data.EntryMap { - public int size() { - return HashMap.this.size(); - } - - public Entry find(Object key) { - return HashMap.this.find(key); - } - - public Entry remove(Object key) { - return removeCell(key); - } - - public void clear() { - HashMap.this.clear(); - } - - public Iterator> iterator() { - return HashMap.this.iterator(); - } - } - - interface Cell extends Entry { - public HashMap.Cell next(); - - public void setNext(HashMap.Cell next); - } - - interface Helper { - public Cell make(K key, V value, Cell next); - - public int hash(K key); - - public boolean equal(K a, K b); - } - - private static class MyCell implements Cell { - public final K key; - public V value; - public Cell next; - public int hashCode; - - public MyCell(K key, V value, Cell next, int hashCode) { - this.key = key; - this.value = value; - this.next = next; - this.hashCode = hashCode; - } - - public K getKey() { - return key; - } - - public V getValue() { - return value; - } - - public V setValue(V value) { - V old = this.value; - this.value = value; - return old; - } - - public HashMap.Cell next() { - return next; - } - - public void setNext(HashMap.Cell next) { - this.next = next; - } - - public int hashCode() { - return hashCode; - } - } - - static class MyHelper implements Helper { - public Cell make(K key, V value, Cell next) { - return new MyCell(key, value, next, hash(key)); - } - - public int hash(K a) { - return (a == null ? 0 : a.hashCode()); - } - - public boolean equal(K a, K b) { - return (a == null && b == null) || (a != null && a.equals(b)); - } - } - - private class MyIterator implements Iterator> { - private int currentIndex = -1; - private int nextIndex = -1; - private Cell previousCell; - private Cell currentCell; - private Cell nextCell; - - public MyIterator() { - hasNext(); - } - - public Entry next() { - if (hasNext()) { - if (currentCell != null) { - if (currentCell.next() != null) { - previousCell = currentCell; - } else { - previousCell = null; - } - } - - currentCell = nextCell; - currentIndex = nextIndex; - - nextCell = nextCell.next(); - - return currentCell; - } else { - throw new NoSuchElementException(); - } - } - - public boolean hasNext() { - if (array != null) { - while (nextCell == null && ++ nextIndex < array.length) { - if (array[nextIndex] != null) { - nextCell = array[nextIndex]; - return true; - } - } - } - return nextCell != null; - } - - public void remove() { - if (currentCell != null) { - if (previousCell == null) { - array[currentIndex] = currentCell.next(); - } else { - previousCell.setNext(currentCell.next()); - if (previousCell.next() == null) { - previousCell = null; - } - } - currentCell = null; - -- size; - } else { - throw new IllegalStateException(); - } - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/HashSet.java b/sgx-jvm/avian/classpath/java/util/HashSet.java deleted file mode 100644 index 3c70cda172..0000000000 --- a/sgx-jvm/avian/classpath/java/util/HashSet.java +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class HashSet extends AbstractSet implements Set { - private static final Object Value = new Object(); - - private final HashMap map; - - public HashSet(Collection c) { - map = new HashMap(c.size()); - addAll(c); - } - - public HashSet(int capacity) { - map = new HashMap(capacity); - } - - public HashSet() { - this(0); - } - - public int size() { - return map.size(); - } - - public boolean isEmpty() { - return map.isEmpty(); - } - - public boolean contains(Object element) { - return map.containsKey(element); - } - - public boolean add(T element) { - return map.put(element, Value) != Value; - } - - public boolean addAll(Collection collection) { - boolean change = false; - for (T t: collection) if (add(t)) change = true; - return change; - } - - public boolean remove(Object element) { - return map.remove(element) != Value; - } - - public void clear() { - map.clear(); - } - - public Iterator iterator() { - return new MyIterator(map.iterator()); - } - - public String toString() { - return avian.Data.toString(this); - } - - private static class MyIterator implements Iterator { - private final Iterator> it; - - public MyIterator(Iterator> it) { - this.it = it; - } - - public T next() { - return it.next().getKey(); - } - - public boolean hasNext() { - return it.hasNext(); - } - - public void remove() { - it.remove(); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Hashtable.java b/sgx-jvm/avian/classpath/java/util/Hashtable.java deleted file mode 100644 index 4f277a1d18..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Hashtable.java +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class Hashtable implements Map { - private final HashMap map; - - public Hashtable(int capacity) { - map = new HashMap(capacity); - } - - public Hashtable() { - this(0); - } - - public Hashtable(Map m) { - this(m.size()); - for (Entry entry : m.entrySet()) { - put(entry.getKey(), entry.getValue()); - } - } - - public synchronized String toString() { - return map.toString(); - } - - public synchronized boolean isEmpty() { - return map.isEmpty(); - } - - public synchronized int size() { - return map.size(); - } - - public synchronized boolean containsKey(Object key) { - return map.containsKey(key); - } - - public synchronized boolean containsValue(Object value) { - return map.containsValue(value); - } - - public synchronized V get(Object key) { - return map.get(key); - } - - public synchronized V put(K key, V value) { - return map.put(key, value); - } - - public synchronized void putAll(Map elts) { - map.putAll(elts); - } - - public synchronized V remove(Object key) { - return map.remove(key); - } - - public synchronized void clear() { - map.clear(); - } - - public Enumeration keys() { - return new Collections.IteratorEnumeration(keySet().iterator()); - } - - public Enumeration elements() { - return new Collections.IteratorEnumeration(values().iterator()); - } - - public Set> entrySet() { - return new Collections.SynchronizedSet(this, map.entrySet()); - } - - public Set keySet() { - return new Collections.SynchronizedSet(this, map.keySet()); - } - - public Collection values() { - return new Collections.SynchronizedCollection(this, map.values()); - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/IdentityHashMap.java b/sgx-jvm/avian/classpath/java/util/IdentityHashMap.java deleted file mode 100644 index 42fb4a5a6a..0000000000 --- a/sgx-jvm/avian/classpath/java/util/IdentityHashMap.java +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class IdentityHashMap implements Map { - private final HashMap map; - - public IdentityHashMap(int capacity) { - map = new HashMap(capacity, new MyHelper()); - } - - public IdentityHashMap() { - this(0); - } - - public boolean isEmpty() { - return map.isEmpty(); - } - - public int size() { - return map.size(); - } - - public boolean containsKey(Object key) { - return map.containsKey(key); - } - - public boolean containsValue(Object value) { - return map.containsValue(value); - } - - public V get(Object key) { - return map.get(key); - } - - public V put(K key, V value) { - return map.put(key, value); - } - - public void putAll(Map elts) { - map.putAll(elts); - } - - public V remove(Object key) { - return map.remove(key); - } - - public void clear() { - map.clear(); - } - - public Set> entrySet() { - return map.entrySet(); - } - - public Set keySet() { - return map.keySet(); - } - - public Collection values() { - return map.values(); - } - - private static class MyHelper - extends HashMap.MyHelper - { - public int hash(K a) { - return (a == null ? 0 : System.identityHashCode(a)); - } - - public boolean equal(K a, K b) { - return a == b; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/IllegalFormatException.java b/sgx-jvm/avian/classpath/java/util/IllegalFormatException.java deleted file mode 100644 index d9f24f4564..0000000000 --- a/sgx-jvm/avian/classpath/java/util/IllegalFormatException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class IllegalFormatException extends IllegalArgumentException { - - public IllegalFormatException() { - super(); - } - - public IllegalFormatException(String message, Throwable cause) { - super(message, cause); - } - - public IllegalFormatException(String message) { - super(message); - } - - public IllegalFormatException(Throwable cause) { - super(cause); - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/Iterator.java b/sgx-jvm/avian/classpath/java/util/Iterator.java deleted file mode 100644 index cae013f04c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Iterator.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Iterator { - public T next(); - - public boolean hasNext(); - - public void remove(); -} diff --git a/sgx-jvm/avian/classpath/java/util/LinkedHashMap.java b/sgx-jvm/avian/classpath/java/util/LinkedHashMap.java deleted file mode 100644 index 2b9bcce890..0000000000 --- a/sgx-jvm/avian/classpath/java/util/LinkedHashMap.java +++ /dev/null @@ -1,267 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class LinkedHashMap extends HashMap { - private static class LinkedKey { - private final K key; - private LinkedKey previous, next; - - public LinkedKey(K key) { - this.key = key; - } - - public boolean equals(Object other) { - LinkedKey o = (LinkedKey) other; - return key.equals(o.key); - } - - public int hashCode() { - return key.hashCode(); - } - } - - private LinkedKey first, last; - private HashMap> lookup; - - public LinkedHashMap(int capacity) { - super(capacity); - lookup = new HashMap>(); - } - - public LinkedHashMap() { - this(0); - } - - public LinkedHashMap(Map map) { - this(map.size()); - putAll(map); - } - - public V put(K key, V value) { - if (!super.containsKey(key)) { - LinkedKey k = new LinkedKey(key); - if (first == null) { - first = k; - } else { - last.next = k; - k.previous = last; - } - last = k; - lookup.put(key, k); - } - return super.put(key, value); - } - - public V remove(Object key) { - LinkedKey linked = lookup.get(key); - if (linked == null) { - return null; - } - if (linked.previous == null) { - first = linked.next; - } else { - linked.previous.next = linked.next; - } - if (linked.next == null) { - last = linked.previous; - } else { - linked.next.previous = linked.previous; - } - return super.remove(key); - } - - public void clear() { - first = last = null; - super.clear(); - } - - public Set> entrySet() { - return new EntrySet(); - } - - public Set keySet() { - return new KeySet(); - } - - public Collection values() { - return new Values(); - } - - Iterator> iterator() { - return new MyIterator(); - } - - private class EntrySet extends AbstractSet> { - public int size() { - return LinkedHashMap.this.size(); - } - - public boolean isEmpty() { - return LinkedHashMap.this.isEmpty(); - } - - public boolean contains(Object o) { - return (o instanceof Entry) - && containsKey(((Entry)o).getKey()); - } - - public boolean add(Entry e) { - return put(e.getKey(), e.getValue()) != null; - } - - public boolean remove(Object o) { - return (o instanceof Entry) && remove((Entry)o); - } - - public boolean remove(Entry e) { - return LinkedHashMap.this.remove(e.getKey()) != null; - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - return avian.Data.toArray(this, array); - } - - public void clear() { - LinkedHashMap.this.clear(); - } - - public Iterator> iterator() { - return new MyIterator(); - } - } - - private class KeySet extends AbstractSet { - public int size() { - return LinkedHashMap.this.size(); - } - - public boolean isEmpty() { - return LinkedHashMap.this.isEmpty(); - } - - public boolean contains(Object key) { - return containsKey(key); - } - - public boolean add(K key) { - return put(key, null) != null; - } - - public boolean remove(Object key) { - return LinkedHashMap.this.remove(key) != null; - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - return avian.Data.toArray(this, array); - } - - public void clear() { - LinkedHashMap.this.clear(); - } - - public Iterator iterator() { - return new avian.Data.KeyIterator(new MyIterator()); - } - } - - private class Values implements Collection { - public int size() { - return LinkedHashMap.this.size(); - } - - public boolean isEmpty() { - return LinkedHashMap.this.isEmpty(); - } - - public boolean contains(Object value) { - return containsValue(value); - } - - public boolean containsAll(Collection c) { - if (c == null) { - throw new NullPointerException("collection is null"); - } - - Iterator it = c.iterator(); - while (it.hasNext()) { - if (! contains(it.next())) { - return false; - } - } - - return true; - } - - public boolean add(V value) { - throw new UnsupportedOperationException(); - } - - public boolean addAll(Collection collection) { - throw new UnsupportedOperationException(); - } - - public boolean remove(Object value) { - throw new UnsupportedOperationException(); - } - - public boolean removeAll(Collection c) { - throw new UnsupportedOperationException(); - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - return avian.Data.toArray(this, array); - } - - public void clear() { - LinkedHashMap.this.clear(); - } - - public Iterator iterator() { - return new avian.Data.ValueIterator(new MyIterator()); - } - } - - private class MyIterator implements Iterator> { - private LinkedKey current = first; - - public Entry next() { - if (!hasNext()) { - throw new NoSuchElementException(); - } - Entry result = find(current.key); - current = current.next; - return result; - } - - public boolean hasNext() { - return current != null; - } - - public void remove() { - LinkedHashMap.this.remove(current == null ? - last.key : current.previous.key); - } - } -} - diff --git a/sgx-jvm/avian/classpath/java/util/LinkedHashSet.java b/sgx-jvm/avian/classpath/java/util/LinkedHashSet.java deleted file mode 100644 index b508b1d5d5..0000000000 --- a/sgx-jvm/avian/classpath/java/util/LinkedHashSet.java +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class LinkedHashSet extends AbstractSet implements Set { - private static final Object Value = new Object(); - - private final LinkedHashMap map; - - public LinkedHashSet(Collection c) { - map = new LinkedHashMap(c.size()); - addAll(c); - } - - public LinkedHashSet(int capacity) { - map = new LinkedHashMap(capacity); - } - - public LinkedHashSet() { - this(0); - } - - public int size() { - return map.size(); - } - - public boolean isEmpty() { - return map.isEmpty(); - } - - public boolean contains(Object element) { - return map.containsKey(element); - } - - public boolean add(T element) { - return map.put(element, Value) != Value; - } - - public boolean addAll(Collection collection) { - boolean change = false; - for (T t: collection) if (add(t)) change = true; - return change; - } - - public boolean remove(Object element) { - return map.remove(element) != Value; - } - - public void clear() { - map.clear(); - } - - public Iterator iterator() { - return new MyIterator(map.iterator()); - } - - public String toString() { - return avian.Data.toString(this); - } - - private static class MyIterator implements Iterator { - private final Iterator> it; - - public MyIterator(Iterator> it) { - this.it = it; - } - - public T next() { - return it.next().getKey(); - } - - public boolean hasNext() { - return it.hasNext(); - } - - public void remove() { - it.remove(); - } - } -} - diff --git a/sgx-jvm/avian/classpath/java/util/LinkedList.java b/sgx-jvm/avian/classpath/java/util/LinkedList.java deleted file mode 100644 index 6896b1eb4e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/LinkedList.java +++ /dev/null @@ -1,463 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class LinkedList extends AbstractSequentialList implements Deque { - private Cell front; - private Cell rear; - private int size; - - public LinkedList(Collection c) { - addAll(c); - } - - public LinkedList() { } - - private Cell find(int index) { - int i = 0; - for (Cell c = front; c != null; c = c.next) { - if (i == index) { - return c; - } - ++ i; - } - throw new IndexOutOfBoundsException(index + " not in [0, " + size + ")"); - } - - private static boolean equal(Object a, Object b) { - return (a == null && b == null) || (a != null && a.equals(b)); - } - - private void addFirst(Cell c) { - ++ size; - - if (front == null) { - front = rear = c; - } else { - c.next = front; - front.prev = c; - front = c; - } - } - - private void addLast(Cell c) { - ++ size; - - if (front == null) { - front = rear = c; - } else { - c.prev = rear; - rear.next = c; - rear = c; - } - } - - private Cell find(Object element) { - for (Cell c = front; c != null; c = c.next) { - if (equal(c.value, element)) { - return c; - } - } - return null; - } - - private void remove(Cell c) { - -- size; - - if (c.prev == null) { - front = c.next; - } else { - c.prev.next = c.next; - } - - if (c.next == null) { - rear = c.prev; - } else { - c.next.prev = c.prev; - } - } - - @Override - public int size() { - return size; - } - - @Override - public boolean contains(Object element) { - return find(element) != null; - } - - @Override - public int indexOf(Object element) { - int i = 0; - for (Cell c = front; c != null; c = c.next) { - if (equal(c.value, element)) { - return i; - } - ++ i; - } - return -1; - } - - @Override - public int lastIndexOf(Object element) { - int i = size; - for (Cell c = rear; c != null; c = c.prev) { - -- i; - if (equal(c.value, element)) { - return i; - } - } - return -1; - } - - @Override - public boolean offer(T element) { - return add(element); - } - - @Override - public boolean add(T element) { - addLast(element); - return true; - } - - @Override - public boolean addAll(Collection collection) { - for (T t: collection) add(t); - return true; - } - - @Override - public void add(int index, T element) { - if (index == 0) { - addFirst(element); - } else { - Cell cell = find(index); - Cell newCell = new Cell(element, cell.prev, cell); - cell.prev.next = newCell; - } - } - - @Override - public boolean offerFirst(T e) { - addFirst(e); - - return true; - } - - @Override - public void push(T e) { - addFirst(e); - } - - @Override - public void addFirst(T element) { - addFirst(new Cell(element, null, null)); - } - - @Override - public boolean offerLast(T e) { - addLast(e); - - return true; - } - - @Override - public void addLast(T element) { - addLast(new Cell(element, null, null)); - } - - public T get(int index) { - return find(index).value; - } - - @Override - public T set(int index, T value) { - Cell c = find(index); - T old = c.value; - c.value = value; - return old; - } - - @Override - public T peek() { - return peekFirst(); - } - - @Override - public T peekFirst() { - if (front != null) { - return front.value; - } else { - return null; - } - } - - @Override - public T getFirst() { - if (front != null) { - return front.value; - } else { - throw new NoSuchElementException(); - } - } - - @Override - public T peekLast() { - if (rear != null) { - return rear.value; - } else { - return null; - } - } - - @Override - public T getLast() { - if (rear != null) { - return rear.value; - } else { - throw new NoSuchElementException(); - } - } - - @Override - public T remove(int index) { - Cell c = find(index); - remove(c); - return c.value; - } - - @Override - public boolean isEmpty() { - return size() == 0; - } - - @Override - public T poll() { - return pollFirst(); - } - - @Override - public T pollFirst() { - if (front != null) { - T v = front.value; - remove(front); - return v; - } else { - return null; - } - } - - @Override - public T removeFirst() { - T result = pollFirst(); - - if (result == null) { - throw new NoSuchElementException(); - } else { - return result; - } - } - - @Override - public T pop() { - return removeFirst(); - } - - @Override - public T remove() { - return removeFirst(); - } - - @Override - public T pollLast() { - if (rear != null) { - T v = rear.value; - remove(rear); - return v; - } else { - throw new NoSuchElementException(); - } - } - - @Override - public T removeLast() { - T result = pollLast(); - - if (result == null) { - throw new NoSuchElementException(); - } else { - return result; - } - } - - @Override - public boolean remove(Object element) { - Cell c = find(element); - if (c == null) { - return false; - } else { - remove(c); - return true; - } - } - - @Override - public void clear() { - front = rear = null; - size = 0; - } - - @Override - public Iterator iterator() { - return listIterator(); - } - - @Override - public ListIterator listIterator() { - return listIterator(0); - } - - @Override - public ListIterator listIterator(int index) { - MyIterator it = new MyIterator(); - for (int i = 0; i < index; ++i) { - it.next(); - } - return it; - } - - @Override - public Iterator descendingIterator() { - final ListIterator li = listIterator(size()); - - return new Iterator() { - @Override - public T next() { - return li.previous(); - } - - @Override - public boolean hasNext() { - return li.hasPrevious(); - } - - @Override - public void remove() { - li.remove(); - } - }; - } - - @Override - public String toString() { - return avian.Data.toString(this); - } - - @Override - public T element() { - T result = peek(); - if (result == null) { - throw new NoSuchElementException(); - } else { - return result; - } - } - - @Override - public boolean removeFirstOccurrence(Object o) { - int index = indexOf(o); - if (index > 0) { - remove(index); - - return true; - } else { - return false; - } - } - - @Override - public boolean removeLastOccurrence(Object o) { - int lastIndex = lastIndexOf(o); - if (lastIndex > 0) { - remove(lastIndex); - - return true; - } else { - return false; - } - } - - private static class Cell { - public T value; - public Cell prev; - public Cell next; - - public Cell(T value, Cell prev, Cell next) { - this.value = value; - this.prev = prev; - this.next = next; - } - } - - private class MyIterator implements ListIterator { - private Cell toRemove; - private Cell current; - - public T previous() { - if (hasPrevious()) { - T v = current.value; - toRemove = current; - current = current.prev; - return v; - } else { - throw new NoSuchElementException(); - } - } - - public T next() { - if (hasNext()) { - if (current == null) { - current = front; - } else { - current = current.next; - } - toRemove = current; - return current.value; - } else { - throw new NoSuchElementException(); - } - } - - public boolean hasNext() { - if (current == null) { - return front != null; - } else { - return current.next != null; - } - } - - public boolean hasPrevious() { - return current != null; - } - - public void remove() { - if (toRemove != null) { - current = toRemove.prev; - LinkedList.this.remove(toRemove); - toRemove = null; - } else { - throw new IllegalStateException(); - } - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/List.java b/sgx-jvm/avian/classpath/java/util/List.java deleted file mode 100644 index a263f811bd..0000000000 --- a/sgx-jvm/avian/classpath/java/util/List.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface List extends Collection { - public T get(int index); - - public T set(int index, T value); - - public T remove(int index); - - public boolean add(T element); - - public void add(int index, T element); - - public boolean addAll(int startIndex, Collection c); - - public int indexOf(Object value); - - public int lastIndexOf(Object value); - - public boolean isEmpty(); - - public ListIterator listIterator(int index); - - public ListIterator listIterator(); -} diff --git a/sgx-jvm/avian/classpath/java/util/ListIterator.java b/sgx-jvm/avian/classpath/java/util/ListIterator.java deleted file mode 100644 index 8259cb50aa..0000000000 --- a/sgx-jvm/avian/classpath/java/util/ListIterator.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface ListIterator extends Iterator { - public boolean hasPrevious(); - public E previous(); -} diff --git a/sgx-jvm/avian/classpath/java/util/Locale.java b/sgx-jvm/avian/classpath/java/util/Locale.java deleted file mode 100644 index c0ffeebff7..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Locale.java +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class Locale { - private static final Locale DEFAULT; - public static final Locale ENGLISH = new Locale("en", ""); - - private final String language; - private final String country; - private final String variant; - - static { - DEFAULT = new Locale(System.getProperty("user.language"), - System.getProperty("user.region")); - } - - public Locale(String language, String country, String variant) { - this.language = language; - this.country = country; - this.variant = variant; - } - - public Locale(String language, String country) { - this(language, country, ""); - } - - public Locale(String language) { - this(language, ""); - } - - public String getLanguage() { - return language; - } - - public String getCountry() { - return country; - } - - public String getVariant() { - return variant; - } - - public static Locale getDefault() { - return DEFAULT; - } - - public final String toString() { - boolean hasLanguage = language != ""; - boolean hasCountry = country != ""; - boolean hasVariant = variant != ""; - - if (!hasLanguage && !hasCountry) return ""; - return language + (hasCountry || hasVariant ? '_' + country : "") + (hasVariant ? '_' + variant : ""); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Map.java b/sgx-jvm/avian/classpath/java/util/Map.java deleted file mode 100644 index f91b765544..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Map.java +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Map { - public boolean isEmpty(); - - public int size(); - - public boolean containsKey(Object obj); - - public boolean containsValue(Object obj); - - public V get(Object key); - - public V put(K key, V value); - - public void putAll(Map elts); - - public V remove(Object key); - - public void clear(); - - public Set> entrySet(); - - public Set keySet(); - - public Collection values(); - - public boolean equals(Object other); - - public int hashCode(); - - public interface Entry { - public K getKey(); - - public V getValue(); - - public V setValue(V value); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/MissingResourceException.java b/sgx-jvm/avian/classpath/java/util/MissingResourceException.java deleted file mode 100644 index df2f02bfee..0000000000 --- a/sgx-jvm/avian/classpath/java/util/MissingResourceException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class MissingResourceException extends RuntimeException { - private final String class_; - private final String key; - - public MissingResourceException(String message, String class_, String key) { - super(message); - this.class_ = class_; - this.key = key; - } - - public String getClassName() { - return class_; - } - - public String getKey() { - return key; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/NavigableMap.java b/sgx-jvm/avian/classpath/java/util/NavigableMap.java deleted file mode 100644 index 05136159c6..0000000000 --- a/sgx-jvm/avian/classpath/java/util/NavigableMap.java +++ /dev/null @@ -1,6 +0,0 @@ -package java.util; - -public interface NavigableMap extends SortedMap { - Map.Entry firstEntry(); - Map.Entry lastEntry(); -} diff --git a/sgx-jvm/avian/classpath/java/util/NoSuchElementException.java b/sgx-jvm/avian/classpath/java/util/NoSuchElementException.java deleted file mode 100644 index 86c6dba6e7..0000000000 --- a/sgx-jvm/avian/classpath/java/util/NoSuchElementException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class NoSuchElementException extends RuntimeException { - public NoSuchElementException(String message) { - super(message); - } - - public NoSuchElementException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Objects.java b/sgx-jvm/avian/classpath/java/util/Objects.java deleted file mode 100644 index ca59ce1922..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Objects.java +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public final class Objects { - private Objects() { - throw new AssertionError("Instantiating java.long.Objetcs is not allowed!"); - } - - public static int compare(final T x, final T y, final Comparator comparator) { - if (x == y) - return 0; - else - return comparator.compare(x, y); - } - - public static boolean deepEquals(final Object x, final Object y) { - if (x == y) - return true; - if (x == null || y == null) - return false; - if (x.getClass().isArray()) { - if(x instanceof Object[] && y instanceof Object[]) - return Arrays.deepEquals((Object[])x, (Object[])y); - if(x instanceof byte[] && y instanceof byte[]) - return Arrays.equals((byte[]) x, (byte[]) y); - if(x instanceof int[] && y instanceof int[]) - return Arrays.equals((int[]) x, (int[]) y); - if(x instanceof long[] && y instanceof long[]) - return Arrays.equals((long[]) x, (long[]) y); - if(x instanceof short[] && y instanceof short[]) - return Arrays.equals((short[]) x, (short[]) y); - if(x instanceof char[] && y instanceof char[]) - return Arrays.equals((char[]) x, (char[]) y); - if(x instanceof float[] && y instanceof float[]) - return Arrays.equals((float[]) x, (float[]) y); - if(x instanceof double[] && y instanceof double[]) - return Arrays.equals((double[]) x, (double[]) y); - } - return x.equals(y); - } - - public static boolean equals(final Object x, final Object y) { - if (x == y) - return true; - if (x != null) - return x.equals(y); - return false; - } - - public static int hash(final Object... values) { - return Arrays.hashCode(values); - } - - public static int hashCode(final Object value) { - if (value == null) - return 0; - return value.hashCode(); - } - - public static T requireNonNull(final T value) { - if (value == null) - throw new NullPointerException(); - else - return value; - } - - public static T requireNonNull(final T value, String message) { - if (value == null) - throw new NullPointerException(message); - else - return value; - } - - public static String toString(final Object value) { - return String.valueOf(value); - } - - public static String toString(final Object value, final String defaultValue) { - if (value == null) - return defaultValue; - return value.toString(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Observable.java b/sgx-jvm/avian/classpath/java/util/Observable.java deleted file mode 100644 index 5b2d6dfc17..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Observable.java +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class Observable { - - private List observers = new ArrayList(); - private boolean changed = false; - - public void addObserver(Observer o) { - if(o == null) { - throw new NullPointerException(); - } - synchronized(this) { - if(!observers.contains(o)) { - observers.add(o); - } - } - } - - public synchronized int countObservers() { - return observers.size(); - } - - public void deleteObserver(Observer o) { - if(o == null) { - throw new NullPointerException(); - } - synchronized(this) { - observers.remove(o); - } - } - - public void notifyObservers() { - notifyObservers(null); - } - - public synchronized void notifyObservers(Object value) { - Observer[] obsArray = null; - synchronized(this) { - if(hasChanged()) { - clearChanged(); - obsArray = observers.toArray(new Observer[observers.size()]); - } - } - if(obsArray != null) { - for(Observer obs : obsArray) { - obs.update(this, value); - } - } - } - - public boolean hasChanged() { - return changed; - } - - protected void setChanged() { - changed = true; - } - - protected void clearChanged() { - changed = false; - } - -} \ No newline at end of file diff --git a/sgx-jvm/avian/classpath/java/util/Observer.java b/sgx-jvm/avian/classpath/java/util/Observer.java deleted file mode 100644 index f77b916219..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Observer.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Observer { - public void update(Observable o, Object arg); -} \ No newline at end of file diff --git a/sgx-jvm/avian/classpath/java/util/Properties.java b/sgx-jvm/avian/classpath/java/util/Properties.java deleted file mode 100644 index b7905b484d..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Properties.java +++ /dev/null @@ -1,213 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.io.InputStream; -import java.io.OutputStream; -import java.io.PrintStream; -import java.io.IOException; -import java.io.Reader; - -public class Properties extends Hashtable { - public void load(InputStream in) throws IOException { - new InputStreamParser(in).parse(this); - } - - public void load(Reader reader) throws IOException { - new ReaderParser(reader).parse(this); - } - - public void store(OutputStream out, String comment) throws IOException { - PrintStream os = new PrintStream(out); - os.println("# " + comment); - for (Iterator it = entrySet().iterator(); - it.hasNext();) { - Map.Entry entry = (Map.Entry)it.next(); - os.print(entry.getKey()); - os.print('='); - os.println(entry.getValue()); - } - os.flush(); - } - - public String getProperty(String key) { - return (String)get(key); - } - - public String getProperty(String key, String defaultValue) { - String value = (String) get(key); - if (value == null) { - return defaultValue; - } - return value; - } - - public Object setProperty(String key, String value) { - return put(key, value); - } - - public Enumeration propertyNames() { - return keys(); - } - - public Set stringPropertyNames() { - return new HashSet(keySet()); - } - - private abstract static class Parser { - private StringBuilder key = null; - private StringBuilder value = null; - private StringBuilder current = null; - - private void append(int c) { - if (current == null) { - if (key == null) { - current = key = new StringBuilder(); - } else { - current = value = new StringBuilder(); - } - } - - current.append((char) c); - } - - private void finishLine(Map map) { - if (key != null) { - map.put(key.toString(), - (value == null ? "" : value.toString().trim())); - } - - key = value = current = null; - } - - abstract int readCharacter() throws IOException; - - char readUtf16() throws IOException { - char c = 0; - for (int i = 0; i < 4; ++i) { - int digit = Character.digit((char)readCharacter(), 16); - if (digit == -1) throw new IOException("Invalid Unicode escape encountered."); - c <<= 4; - c |= digit; - } - return c; - } - - void parse(Map map) - throws IOException - { - boolean escaped = false; - - int c; - while ((c = readCharacter()) != -1) { - if (c == '\\') { - if (escaped) { - escaped = false; - append(c); - } else { - escaped = true; - } - } else { - switch (c) { - case '#': - case '!': - if (key == null) { - while ((c = readCharacter()) != -1 && c != '\n'); - } else { - append(c); - } - break; - - case ' ': - case '\r': - case '\t': - if (escaped || (current != null && value == current)) { - append(c); - } else if (key == current) { - current = null; - } - break; - - case ':': - case '=': - if (escaped || (current != null && value == current)) { - append(c); - } else { - if (key == null) { - key = new StringBuilder(); - } - current = null; - } - break; - - case '\n': - if (escaped) { - append(c); - } else { - finishLine(map); - } - break; - case 'n': - if (escaped) { - append('\n'); - } else { - append(c); - } - break; - - case 'u': - if (escaped) { - append(readUtf16()); - } else { - append(c); - } break; - - default: - append(c); - break; - } - - escaped = false; - } - } - - finishLine(map); - } - } - - static class InputStreamParser extends Parser { - InputStream in; - - - public InputStreamParser(InputStream in) { - this.in = in; - } - - @Override - int readCharacter() throws IOException { - return in.read(); - } - } - - static class ReaderParser extends Parser { - Reader in; - - public ReaderParser(Reader in) { - this.in = in; - } - - @Override - int readCharacter() throws IOException { - return in.read(); - } - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/PropertyResourceBundle.java b/sgx-jvm/avian/classpath/java/util/PropertyResourceBundle.java deleted file mode 100644 index d9dbff2101..0000000000 --- a/sgx-jvm/avian/classpath/java/util/PropertyResourceBundle.java +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.io.InputStream; -import java.io.IOException; - -public class PropertyResourceBundle extends ResourceBundle { - private final Properties map = new Properties(); - - public PropertyResourceBundle(InputStream in) throws IOException { - map.load(in); - } - - public Object handleGetObject(String key) { - return map.get(key); - } - - public Enumeration getKeys() { - return map.keys(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Queue.java b/sgx-jvm/avian/classpath/java/util/Queue.java deleted file mode 100644 index d0f6578817..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Queue.java +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Queue extends Collection, Iterable { - public boolean add(T element); - public T element(); - public boolean offer(T element); - public T peek(); - public T poll(); - public T remove(); -} diff --git a/sgx-jvm/avian/classpath/java/util/Random.java b/sgx-jvm/avian/classpath/java/util/Random.java deleted file mode 100644 index 802dc87f7a..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Random.java +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class Random { - private static final long Mask = 0x5DEECE66DL; - - private static final long InitialSeed = 123456789987654321L; - - private static long nextSeed = InitialSeed; - - private long seed; - - public Random(long seed) { - setSeed(seed); - } - - public void setSeed(long seed) { - this.seed = (seed ^ Mask) & ((1L << 48) - 1); - } - - protected int next(int bits) { - seed = ((seed * Mask) + 0xBL) & ((1L << 48) - 1); - return (int) (seed >>> (48 - bits)); - } - - public int nextInt(int limit) { - if (limit <= 0) { - throw new IllegalArgumentException(); - } - - if ((limit & -limit) == limit) { - // limit is a power of two - return (int) ((limit * (long) next(31)) >> 31); - } - - int bits; - int value; - do { - bits = next(31); - value = bits % limit; - } while (bits - value + (limit - 1) < 0); - - return value; - } - - public int nextInt() { - return next(32); - } - - public void nextBytes(byte[] bytes) { - final int length = bytes.length; - for (int i = 0; i < length;) { - int r = nextInt(); - for (int j = Math.min(length - i, 4); j > 0; --j) { - bytes[i++] = (byte) r; - r >>= 8; - } - } - } - - public long nextLong() { - return ((long) next(32) << 32) + next(32); - } - - public double nextDouble() { - return (((long) next(26) << 27) + next(27)) / (double) (1L << 53); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/RandomAccess.java b/sgx-jvm/avian/classpath/java/util/RandomAccess.java deleted file mode 100644 index 17afe39dba..0000000000 --- a/sgx-jvm/avian/classpath/java/util/RandomAccess.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface RandomAccess { - /* nothing added here, this interface just indicates a - * structure is efficient to access via index's directly.*/ -} diff --git a/sgx-jvm/avian/classpath/java/util/ResourceBundle.java b/sgx-jvm/avian/classpath/java/util/ResourceBundle.java deleted file mode 100644 index ccab80f876..0000000000 --- a/sgx-jvm/avian/classpath/java/util/ResourceBundle.java +++ /dev/null @@ -1,122 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.lang.reflect.Method; -import java.io.InputStream; -import java.io.IOException; - -public abstract class ResourceBundle { - protected String name; - protected ResourceBundle parent; - - private static String replace(char a, char b, String s) { - char[] array = new char[s.length()]; - for (int i = 0; i < array.length; ++i) { - char c = s.charAt(i); - array[i] = (c == a ? b : c); - } - return new String(array, 0, array.length, false); - } - - private static ResourceBundle findProperties(String name, ClassLoader loader, - ResourceBundle parent) - throws IOException - { - InputStream in = loader.getResourceAsStream - (replace('.', '/', name) + ".properties"); - if (in != null) { - try { - ResourceBundle r = new PropertyResourceBundle(in); - r.name = name; - r.parent = parent; - return r; - } finally { - in.close(); - } - } else { - return null; - } - } - - private static ResourceBundle find(String name, ClassLoader loader, - ResourceBundle parent) - throws Exception - { - try { - Class c = Class.forName(name, true, loader); - if (c.isAssignableFrom(ResourceBundle.class)) { - return (ResourceBundle) c.getConstructor().newInstance(); - } - } catch (ClassNotFoundException ok) { - } catch (NoSuchMethodException ok) { } - - return findProperties(name, loader, parent); - } - - public static ResourceBundle getBundle(String name, Locale locale, - ClassLoader loader) - { - try { - ResourceBundle b = find(name, loader, null); - - if (locale.getLanguage() != null) { - name = name + "_" + locale.getLanguage(); - ResourceBundle b2 = find(name, loader, b); - if (b2 != null) b = b2; - - if (locale.getCountry() != null) { - name = name + "_" + locale.getCountry(); - b2 = find(name, loader, b); - if (b2 != null) b = b2; - - if (locale.getVariant() != null) { - name = name + "_" + locale.getVariant(); - b2 = find(name, loader, b); - if (b2 != null) b = b2; - } - } - } - return b; - } catch (Exception e) { - RuntimeException re = new MissingResourceException(name, name, null); - re.initCause(e); - throw re; - } - } - - public static ResourceBundle getBundle(String name, Locale locale) { - return getBundle(name, locale, Method.getCaller().class_.loader); - } - - public static ResourceBundle getBundle(String name) { - return getBundle - (name, Locale.getDefault(), Method.getCaller().class_.loader); - } - - public Object getObject(String key) { - for (ResourceBundle b = this; b != null; b = b.parent) { - Object value = b.handleGetObject(key); - if (value != null) { - return value; - } - } - throw new MissingResourceException(key, name, key); - } - - public String getString(String key) { - return (String) getObject(key); - } - - protected abstract Object handleGetObject(String key); - - public abstract Enumeration getKeys(); -} diff --git a/sgx-jvm/avian/classpath/java/util/Set.java b/sgx-jvm/avian/classpath/java/util/Set.java deleted file mode 100644 index 1dc124d0e1..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Set.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface Set extends Collection { } diff --git a/sgx-jvm/avian/classpath/java/util/SortedMap.java b/sgx-jvm/avian/classpath/java/util/SortedMap.java deleted file mode 100644 index d7abb282ba..0000000000 --- a/sgx-jvm/avian/classpath/java/util/SortedMap.java +++ /dev/null @@ -1,15 +0,0 @@ -package java.util; - -public interface SortedMap extends Map { - public Comparator comparator(); - - public K firstKey(); - - public K lastKey(); - - public SortedMap headMap(K toKey); - - public SortedMap tailMap(K fromKey); - - public SortedMap subMap(K fromKey, K toKey); -} diff --git a/sgx-jvm/avian/classpath/java/util/SortedSet.java b/sgx-jvm/avian/classpath/java/util/SortedSet.java deleted file mode 100644 index 26ddf8159c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/SortedSet.java +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public interface SortedSet extends Collection, Iterable, Set { - public Comparator comparator(); - public T first(); - public SortedSet headSet(T toElement); - public T last(); - public SortedSet subSet(T fromElement, T toElement); - public SortedSet tailSet(T fromElement); -} diff --git a/sgx-jvm/avian/classpath/java/util/Stack.java b/sgx-jvm/avian/classpath/java/util/Stack.java deleted file mode 100644 index 9d7def967c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Stack.java +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class Stack extends Vector { - public boolean empty() { - return size() == 0; - } - - public T peek() { - return get(size() - 1); - } - - public T pop() { - return remove(size() - 1); - } - - public T push(T element) { - add(element); - return element; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/StringTokenizer.java b/sgx-jvm/avian/classpath/java/util/StringTokenizer.java deleted file mode 100644 index e2127fce20..0000000000 --- a/sgx-jvm/avian/classpath/java/util/StringTokenizer.java +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class StringTokenizer implements Enumeration { - private final String in; - private String delimiters; - private final boolean includeDelimiters; - private int position; - - public StringTokenizer(String in, String delimiters, - boolean includeDelimiters) - { - this.in = in; - this.delimiters = delimiters; - this.includeDelimiters = includeDelimiters; - } - - public StringTokenizer(String in, String delimiters) { - this(in, delimiters, false); - } - - public StringTokenizer(String in) { - this(in, " \t\r\n\f"); - } - - private boolean isDelimiter(char c) { - return delimiters.indexOf(c) >= 0; - } - - public int countTokens() { - int count = 0; - boolean sawNonDelimiter = false; - for (int i = position; i < in.length(); ++i) { - if (isDelimiter(in.charAt(i))) { - if (sawNonDelimiter) { - sawNonDelimiter = false; - ++ count; - } - - if (includeDelimiters) { - ++ count; - } - } else { - sawNonDelimiter = true; - } - } - - if (sawNonDelimiter) { - ++ count; - } - - return count; - } - - public boolean hasMoreTokens() { - for (int i = position; i < in.length(); ++i) { - if (isDelimiter(in.charAt(i))) { - if (includeDelimiters) { - return true; - } - } else { - position = i; - return true; - } - } - return false; - } - - public String nextToken() { - for (int i = position; i < in.length(); ++i) { - if (isDelimiter(in.charAt(i))) { - if (includeDelimiters) { - return in.substring(i, i + 1); - } - } else { - position = i; - while (position < in.length() && ! isDelimiter(in.charAt(position))) { - ++ position; - } - return in.substring(i, position); - } - } - throw new NoSuchElementException(); - } - - public String nextToken(String delimiters) { - this.delimiters = delimiters; - return nextToken(); - } - - public boolean hasMoreElements() { - return hasMoreTokens(); - } - - public Object nextElement() { - return nextToken(); - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/TimeZone.java b/sgx-jvm/avian/classpath/java/util/TimeZone.java deleted file mode 100644 index ec933e7649..0000000000 --- a/sgx-jvm/avian/classpath/java/util/TimeZone.java +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class TimeZone { - - // for now, we only support GMT - private static final TimeZone GMT = new TimeZone("GMT"); - - private final String name; - - private TimeZone(String name) { - this.name = name; - } - - public static TimeZone getTimeZone(String id) { - // technically the Java spec says that this method - // returns GMT if it can't understand the "id" parameter - // sigh. - return GMT; - } - - public String getDisplayName() { - return name; - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/TreeMap.java b/sgx-jvm/avian/classpath/java/util/TreeMap.java deleted file mode 100644 index 53a717e813..0000000000 --- a/sgx-jvm/avian/classpath/java/util/TreeMap.java +++ /dev/null @@ -1,280 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.io.IOException; - -public class TreeMap implements NavigableMap { - private final Comparator comparator; - private transient TreeSet> set; - - public TreeMap(Comparator comparator) { - this.comparator = comparator; - initializeSet(); - } - - private void initializeSet() { - final Comparator comparator = this.comparator != null ? - this.comparator : new Comparator() { - public int compare(K a, K b) { - return ((Comparable) a).compareTo(b); - } - }; - set = new TreeSet(new Comparator>() { - public int compare(MyEntry a, MyEntry b) { - return comparator.compare(a.key, b.key); - } - }); - } - - public TreeMap() { - this(null); - } - - public String toString() { - return avian.Data.toString(this); - } - - @Override - public Comparator comparator() { - return comparator; - } - - @Override - public Map.Entry firstEntry() { - return set.first(); - } - - @Override - public Map.Entry lastEntry() { - return set.last(); - } - - @Override - public K firstKey() { - return set.first().key; - } - - @Override - public K lastKey() { - return set.last().key; - } - - @Override - public SortedMap headMap(K toKey) { - // TODO - this should be implemented, the trick is making the returned SortedMap backed by this TreeSet - throw new UnsupportedOperationException(); - } - - @Override - public SortedMap tailMap(K fromKey) { - // TODO - this should be implemented, the trick is making the returned SortedMap backed by this TreeSet - throw new UnsupportedOperationException(); - } - - @Override - public SortedMap subMap(K fromKey, K toKey) { - // TODO - this should be implemented, the trick is making the returned SortedMap backed by this TreeSet - throw new UnsupportedOperationException(); - } - - public V get(Object key) { - MyEntry e = set.find(new MyEntry(key, null)); - return e == null ? null : e.value; - } - - public V put(K key, V value) { - MyEntry e = set.addAndReplace(new MyEntry(key, value)); - return e == null ? null : e.value; - } - - public void putAll(Map elts) { - for (Map.Entry entry : elts.entrySet()) { - put(entry.getKey(), entry.getValue()); - } - } - - public V remove(Object key) { - MyEntry e = set.removeAndReturn(new MyEntry(key, null)); - return e == null ? null : e.value; - } - - public void clear() { - set.clear(); - } - - public int size() { - return set.size(); - } - - public boolean isEmpty() { - return size() == 0; - } - - public boolean containsKey(Object key) { - return set.contains(new MyEntry(key, null)); - } - - private boolean equal(Object a, Object b) { - return a == null ? b == null : a.equals(b); - } - - public boolean containsValue(Object value) { - for (V v: values()) { - if (equal(v, value)) { - return true; - } - } - return false; - } - - public Set> entrySet() { - return (Set>) (Set) set; - } - - public Set keySet() { - return new KeySet(); - } - - public Collection values() { - return new Values(); - } - - private static class MyEntry implements Entry { - public final K key; - public V value; - - public MyEntry(K key, V value) { - this.key = key; - this.value = value; - } - - public K getKey() { - return key; - } - - public V getValue() { - return value; - } - - public V setValue(V value) { - V old = this.value; - this.value = value; - return old; - } - - } - - private class KeySet extends AbstractSet { - public int size() { - return TreeMap.this.size(); - } - - public boolean isEmpty() { - return TreeMap.this.isEmpty(); - } - - public boolean contains(Object key) { - return containsKey(key); - } - - public boolean add(K key) { - return set.addAndReplace(new MyEntry(key, null)) != null; - } - - public boolean addAll(Collection collection) { - boolean change = false; - for (K k: collection) if (add(k)) change = true; - return change; - } - - public boolean remove(Object key) { - return set.removeAndReturn(new MyEntry(key, null)) != null; - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - return avian.Data.toArray(this, array); - } - - public void clear() { - TreeMap.this.clear(); - } - - public Iterator iterator() { - return new avian.Data.KeyIterator(set.iterator()); - } - } - - private class Values implements Collection { - public int size() { - return TreeMap.this.size(); - } - - public boolean isEmpty() { - return TreeMap.this.isEmpty(); - } - - public boolean contains(Object value) { - return containsValue(value); - } - - public boolean containsAll(Collection c) { - if (c == null) { - throw new NullPointerException("collection is null"); - } - - Iterator it = c.iterator(); - while (it.hasNext()) { - if (! contains(it.next())) { - return false; - } - } - - return true; - } - - public boolean add(V value) { - throw new UnsupportedOperationException(); - } - - public boolean addAll(Collection collection) { - throw new UnsupportedOperationException(); - } - - public boolean remove(Object value) { - throw new UnsupportedOperationException(); - } - - public boolean removeAll(Collection c) { - throw new UnsupportedOperationException(); - } - - public Object[] toArray() { - return toArray(new Object[size()]); - } - - public T[] toArray(T[] array) { - return avian.Data.toArray(this, array); - } - - public void clear() { - TreeMap.this.clear(); - } - - public Iterator iterator() { - return new avian.Data.ValueIterator(set.iterator()); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/TreeSet.java b/sgx-jvm/avian/classpath/java/util/TreeSet.java deleted file mode 100644 index ccb03e3b6e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/TreeSet.java +++ /dev/null @@ -1,214 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import avian.PersistentSet; -import avian.Cell; - -public class TreeSet extends AbstractSet implements Collection { - private PersistentSet> set; - - public TreeSet(final Comparator comparator) { - set = new PersistentSet(new Comparator>() { - public int compare(Cell a, Cell b) { - return comparator.compare(a.value, b.value); - } - }); - } - - public TreeSet() { - this(new Comparator() { - public int compare(T a, T b) { - return ((Comparable) a).compareTo(b); - } - }); - } - - public TreeSet(Collection collection) { - this(); - - for (T item: collection) { - add(item); - } - } - - public T first() { - if (isEmpty()) throw new NoSuchElementException(); - - return set.first().value().value; - } - - public T last() { - if (isEmpty()) throw new NoSuchElementException(); - - return set.last().value().value; - } - - public Iterator iterator() { - return new MyIterator(set.first()); - } - - public Iterator descendingIterator() { - return new MyIterator(set.last(), true); - } - - public String toString() { - return avian.Data.toString(this); - } - - public boolean add(T value) { - PersistentSet.Path> p = set.find(new Cell(value, null)); - if (p.fresh()) { - set = p.add(); - return true; - } - return false; - } - - T addAndReplace(T value) { - PersistentSet.Path> p = set.find(new Cell(value, null)); - if (p.fresh()) { - set = p.add(); - return null; - } else { - T old = p.value().value; - set = p.replaceWith(new Cell(value, null)); - return old; - } - } - - T find(T value) { - PersistentSet.Path> p = set.find(new Cell(value, null)); - return p.fresh() ? null : p.value().value; - } - - T removeAndReturn(T value) { - Cell cell = removeCell(value); - return cell == null ? null : cell.value; - } - - private Cell removeCell(Object value) { - PersistentSet.Path> p = set.find(new Cell(value, null)); - if (p.fresh()) { - return null; - } else { - Cell old = p.value(); - - if (p.value().next != null) { - set = p.replaceWith(p.value().next); - } else { - set = p.remove(); - } - - return old; - } - } - - public boolean remove(Object value) { - return removeCell(value) != null; - } - - public int size() { - return set.size(); - } - - public boolean isEmpty() { - return set.size() == 0; - } - - public boolean contains(Object value) { - return !set.find(new Cell(value, null)).fresh(); - } - - public void clear() { - set = new PersistentSet(set.comparator()); - } - - private class MyIterator implements java.util.Iterator { - private PersistentSet.Path> path; - private PersistentSet.Path> nextPath; - private Cell cell; - private Cell prevCell; - private Cell prevPrevCell; - private boolean canRemove = false; - private final boolean reversed; - - private MyIterator(PersistentSet.Path> path) { - this(path, false); - } - - private MyIterator(PersistentSet.Path> path, boolean reversed) { - this.path = path; - this.reversed = reversed; - if (path != null) { - cell = path.value(); - nextPath = nextPath(); - } - } - - private MyIterator(MyIterator start) { - path = start.path; - nextPath = start.nextPath; - cell = start.cell; - prevCell = start.prevCell; - prevPrevCell = start.prevPrevCell; - canRemove = start.canRemove; - reversed = start.reversed; - } - - public boolean hasNext() { - return cell != null || nextPath != null; - } - - public T next() { - if (cell == null) { - path = nextPath; - nextPath = nextPath(); - cell = path.value(); - } - prevPrevCell = prevCell; - prevCell = cell; - cell = cell.next; - canRemove = true; - return prevCell.value; - } - - private PersistentSet.Path nextPath() { - return reversed ? path.predecessor() : path.successor(); - } - - public void remove() { - if (! canRemove) throw new IllegalStateException(); - - if (prevPrevCell != null && prevPrevCell.next == prevCell) { - // cell to remove is not the first in the list. - prevPrevCell.next = prevCell.next; - prevCell = prevPrevCell; - } else if (prevCell.next == cell && cell != null) { - // cell to remove is the first in the list, but not the last. - set = (PersistentSet) path.replaceWith(cell); - prevCell = null; - } else { - // cell is alone in the list. - set = (PersistentSet) path.remove(); - path = nextPath; - if (path != null) { - prevCell = null; - cell = path.value(); - path = (PersistentSet.Path) set.find((Cell) cell); - nextPath = nextPath(); - } - } - - canRemove = false; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/UUID.java b/sgx-jvm/avian/classpath/java/util/UUID.java deleted file mode 100644 index 883b9708ff..0000000000 --- a/sgx-jvm/avian/classpath/java/util/UUID.java +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class UUID { - private final byte[] data; - - private UUID(byte[] data) { - this.data = data; - } - - public String toString() { - StringBuilder sb = new StringBuilder(); - toHex(sb, data, 0, 4); sb.append('-'); - toHex(sb, data, 4, 2); sb.append('-'); - toHex(sb, data, 6, 2); sb.append('-'); - toHex(sb, data, 8, 2); sb.append('-'); - toHex(sb, data, 10, 6); - return sb.toString(); - } - - private static char toHex(int i) { - return (char) (i < 10 ? i + '0' : (i - 10) + 'A'); - } - - private static void toHex(StringBuilder sb, byte[] array, int offset, - int length) - { - for (int i = offset; i < offset + length; ++i) { - sb.append(toHex((array[i] >> 4) & 0xf)); - sb.append(toHex((array[i] ) & 0xf)); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/Vector.java b/sgx-jvm/avian/classpath/java/util/Vector.java deleted file mode 100644 index 3b8a9d831a..0000000000 --- a/sgx-jvm/avian/classpath/java/util/Vector.java +++ /dev/null @@ -1,137 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -public class Vector extends AbstractList implements java.io.Serializable, Cloneable, RandomAccess { - private final ArrayList list; - - public Vector(int capacity) { - list = new ArrayList(capacity); - } - - public Vector() { - this(0); - } - - public Vector(Collection source) { - list = new ArrayList(source); - } - - public synchronized int size() { - return list.size(); - } - - public synchronized boolean contains(Object element) { - return list.contains(element); - } - - public synchronized void add(int index, T element) { - list.add(index, element); - } - - public void insertElementAt(T element, int index) { - add(index, element); - } - - public synchronized boolean add(T element) { - return list.add(element); - } - - public synchronized boolean addAll(Collection collection) { - return list.addAll(collection); - } - - public void addElement(T element) { - add(element); - } - - public synchronized T get(int index) { - return list.get(index); - } - - public synchronized T set(int index, T value) { - return list.set(index, value); - } - - public void setElementAt(T value, int index) { - set(index, value); - } - - public T elementAt(int index) { - return get(index); - } - - public synchronized T remove(int index) { - return list.remove(index); - } - - public synchronized boolean isEmpty() { - return list.isEmpty(); - } - - public void removeElementAt(int index) { - remove(index); - } - - public synchronized void removeAllElements() { - list.clear(); - } - - public synchronized boolean remove(Object element) { - return list.remove(element); - } - - public boolean removeElement(T element) { - return remove(element); - } - - public synchronized void clear() { - list.clear(); - } - - public synchronized int indexOf(Object element) { - return list.indexOf(element); - } - - public synchronized int lastIndexOf(Object element) { - return list.lastIndexOf(element); - } - - public synchronized void copyInto(Object[] array) { - for (int i = 0; i < size(); ++i) { - array[i] = list.get(i); - } - } - - public Iterator iterator() { - return listIterator(); - } - - public ListIterator listIterator(int index) { - return new Collections.ArrayListIterator(this, index); - } - - public ListIterator listIterator() { - return listIterator(0); - } - - public Enumeration elements() { - return new Collections.IteratorEnumeration(iterator()); - } - - public synchronized Object clone() { - Vector copy = new Vector(size()); - for (T t : this) { - copy.add(t); - } - return copy; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/WeakHashMap.java b/sgx-jvm/avian/classpath/java/util/WeakHashMap.java deleted file mode 100644 index 6cdd19f53c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/WeakHashMap.java +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util; - -import java.lang.ref.ReferenceQueue; -import java.lang.ref.Reference; -import java.lang.ref.WeakReference; - -public class WeakHashMap implements Map { - private final HashMap map; - private final ReferenceQueue queue; - - public WeakHashMap(int capacity) { - map = new HashMap(capacity, new MyHelper()); - queue = new ReferenceQueue(); - } - - public WeakHashMap() { - this(0); - } - - private void poll() { - for (MyCell c = (MyCell) queue.poll(); - c != null; - c = (MyCell) queue.poll()) - { - map.remove(c); - } - } - - public boolean isEmpty() { - return map.isEmpty(); - } - - public int size() { - return map.size(); - } - - public boolean containsKey(Object key) { - poll(); - return map.containsKey(key); - } - - public boolean containsValue(Object value) { - poll(); - return map.containsValue(value); - } - - public V get(Object key) { - poll(); - return map.get(key); - } - - public V put(K key, V value) { - poll(); - return map.put(key, value); - } - - public void putAll(Map elts) { - map.putAll(elts); - } - - public V remove(Object key) { - poll(); - return map.remove(key); - } - - public void clear() { - map.clear(); - } - - public Set> entrySet() { - return map.entrySet(); - } - - public Set keySet() { - return map.keySet(); - } - - public Collection values() { - return map.values(); - } - - private static class MyCell - extends WeakReference - implements HashMap.Cell - { - public V value; - public HashMap.Cell next; - public int hashCode; - - public MyCell(K key, ReferenceQueue queue, V value, - HashMap.Cell next, int hashCode) - { - super(key, queue); - this.value = value; - this.next = next; - this.hashCode = hashCode; - } - - public K getKey() { - return get(); - } - - public V getValue() { - return value; - } - - public V setValue(V value) { - V old = this.value; - this.value = value; - return old; - } - - public HashMap.Cell next() { - return next; - } - - public void setNext(HashMap.Cell next) { - this.next = next; - } - - public int hashCode() { - return hashCode; - } - } - - private class MyHelper - extends HashMap.MyHelper - { - public HashMap.Cell make(K key, V value, HashMap.Cell next) { - return new MyCell(key, queue, value, next, hash(key)); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/BlockingDeque.java b/sgx-jvm/avian/classpath/java/util/concurrent/BlockingDeque.java deleted file mode 100644 index 156d6d469c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/BlockingDeque.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -import java.util.Deque; - -public interface BlockingDeque extends Deque, BlockingQueue { - public T takeFirst() throws InterruptedException; - - public T takeLast() throws InterruptedException; - - public T pollFirst(long timeout, TimeUnit unit) throws InterruptedException; - - public T pollLast(long timeout, TimeUnit unit) throws InterruptedException; -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/BlockingQueue.java b/sgx-jvm/avian/classpath/java/util/concurrent/BlockingQueue.java deleted file mode 100644 index e5a2479f59..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/BlockingQueue.java +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -import java.util.Collection; -import java.util.Queue; - -public interface BlockingQueue extends Queue { - public void put(T e) throws InterruptedException; - - public boolean offer(T e, long timeout, TimeUnit unit) throws InterruptedException; - - public T take() throws InterruptedException; - - public T poll(long timeout, TimeUnit unit) throws InterruptedException; - - public int remainingCapacity(); - - public int drainTo(Collection c); - - public int drainTo(Collection c, int maxElements); -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/Callable.java b/sgx-jvm/avian/classpath/java/util/concurrent/Callable.java deleted file mode 100644 index 8ffca41fec..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/Callable.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface Callable { - public T call() throws Exception; -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/CancellationException.java b/sgx-jvm/avian/classpath/java/util/concurrent/CancellationException.java deleted file mode 100644 index 866ab4a7a3..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/CancellationException.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public class CancellationException extends IllegalStateException { - private static final long serialVersionUID = -9202173006928992231L; - - public CancellationException() { - super(); - } - - public CancellationException(String message) { - super(message); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/CompletionService.java b/sgx-jvm/avian/classpath/java/util/concurrent/CompletionService.java deleted file mode 100644 index 1c671c7590..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/CompletionService.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface CompletionService { - public Future submit(Callable task); - - public Future submit(Runnable task, T result); - - public Future take() throws InterruptedException; - - public Future poll(); - - public Future poll(long timeout, TimeUnit unit) throws InterruptedException; -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentHashMap.java b/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentHashMap.java deleted file mode 100644 index abb0713525..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentHashMap.java +++ /dev/null @@ -1,438 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -import avian.Data; -import avian.PersistentSet; -import avian.PersistentSet.Path; - -import sun.misc.Unsafe; -import java.util.AbstractMap; -import java.util.Map; -import java.util.Set; -import java.util.Collection; -import java.util.Iterator; -import java.util.NoSuchElementException; - -public class ConcurrentHashMap - extends AbstractMap - implements ConcurrentMap -{ - private static final Unsafe unsafe = Unsafe.getUnsafe(); - private static final long Content; - private static final Content Empty = new Content(new PersistentSet(), 0); - - static { - try { - Content = unsafe.objectFieldOffset - (ConcurrentHashMap.class.getDeclaredField("content")); - } catch (NoSuchFieldException e) { - throw new Error(e); - } - } - - private volatile Content content; - - public ConcurrentHashMap() { - content = Empty; - } - - public ConcurrentHashMap(int initialCapacity) { - this(); - } - - public ConcurrentHashMap(int initialCapacity, float loadFactor) { - this(); - } - - public ConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel) { - this(); - } - - public boolean isEmpty() { - return content.size == 0; - } - - public int size() { - return content.size; - } - - public boolean containsKey(Object key) { - return find(key) != null; - } - - public boolean containsValue(Object value) { - for (V v: values()) { - if (value.equals(v)) { - return true; - } - } - return false; - } - - public V get(Object key) { - Cell cell = find(key); - return cell == null ? null : cell.value; - } - - private Cell find(Object key) { - Content c = content; - - Path>> path = c.set.find(new Node(key.hashCode())); - for (Cell cell = path.value().value; - cell != null; - cell = cell.next) - { - if (key.equals(cell.key)) { - return cell; - } - } - return null; - } - - public V putIfAbsent(K key, V value) { - Cell cell = put(key, value, PutCondition.IfAbsent, null); - return cell == null ? null : cell.value; - } - - public boolean remove(K key, V value) { - Cell cell = remove(key, RemoveCondition.IfEqual, value); - return cell != null && cell.value.equals(value); - } - - public V replace(K key, V value) { - Cell cell = put(key, value, PutCondition.IfPresent, null); - return cell == null ? null : cell.value; - } - - public boolean replace(K key, V oldValue, V newValue) { - Cell cell = put(key, newValue, PutCondition.IfEqual, oldValue); - return cell != null && cell.value.equals(oldValue); - } - - public V put(K key, V value) { - Cell cell = put(key, value, PutCondition.Always, null); - return cell == null ? null : cell.value; - } - - public V remove(Object key) { - Cell cell = remove(key, RemoveCondition.Always, null); - return cell == null ? null : cell.value; - } - - private enum PutCondition { - Always() { - public boolean addIfAbsent() { return true; } - public boolean addIfPresent(V a, V b) { return true; } - }, IfAbsent() { - public boolean addIfAbsent() { return true; } - public boolean addIfPresent(V a, V b) { return false; } - }, IfPresent() { - public boolean addIfAbsent() { return false; } - public boolean addIfPresent(V a, V b) { return true; } - }, IfEqual() { - public boolean addIfAbsent() { return false; } - public boolean addIfPresent(V a, V b) { return a.equals(b); } - }; - - public boolean addIfAbsent() { throw new AssertionError(); } - public boolean addIfPresent(V a, V b) { throw new AssertionError(); } - } - - private enum RemoveCondition { - Always() { - public boolean remove(V a, V b) { return true; } - }, IfEqual() { - public boolean remove(V a, V b) { return a.equals(b); } - }; - - public boolean remove(V a, V b) { throw new AssertionError(); } - } - - private Cell put(K key, V value, PutCondition condition, V oldValue) { - Node> node = new Node(key.hashCode()); - - loop: while (true) { - node.value = null; - Content content = this.content; - Path>> path = content.set.find(node); - for (Cell cell = path.value().value; - cell != null; - cell = cell.next) - { - if (key.equals(cell.key)) { - if (! condition.addIfPresent(cell.value, oldValue)) { - return cell; - } - - Cell start = null; - Cell last = null; - for (Cell cell2 = path.value().value; - true; - cell2 = cell2.next) - { - Cell c; - c = cell2.clone(); - - if (last == null) { - last = start = c; - } else { - last.next = c; - last = c; - } - - if (cell2 == cell) { - c.value = value; - break; - } - } - - node.value = start; - if (unsafe.compareAndSwapObject - (this, Content, content, new Content - (path.replaceWith(node), content.size))) - { - return cell; - } else { - continue loop; - } - } - } - - // no mapping found -- add a new one if appropriate - if (! condition.addIfAbsent()) { - return null; - } - - node.value = new Cell(key, value, null); - if (unsafe.compareAndSwapObject - (this, Content, content, new Content - (path.fresh() ? path.add() : path.replaceWith(node), - content.size + 1))) - { - return null; - } - } - } - - public void putAll(Map map) { - for (Map.Entry e: map.entrySet()) { - put(e.getKey(), e.getValue()); - } - } - - private Cell remove(Object key, RemoveCondition condition, - V oldValue) - { - Node> node = new Node(key.hashCode()); - - loop: while (true) { - node.value = null; - Content content = this.content; - Path>> path = content.set.find(node); - for (Cell cell = path.value().value; - cell != null; - cell = cell.next) - { - if (key.equals(cell.key)) { - if (! condition.remove(cell.value, oldValue)) { - return cell; - } - - Cell start = null; - Cell last = null; - for (Cell cell2 = path.value().value; - cell2 != cell; - cell2 = cell2.next) - { - Cell c = cell2.clone(); - if (last == null) { - last = start = c; - } else { - last.next = c; - last = c; - } - } - - if (last == null) { - start = last = cell.next; - } else { - last.next = cell.next; - } - - node.value = start; - if (unsafe.compareAndSwapObject - (this, Content, content, new Content - (start == null ? path.remove() : path.replaceWith(node), - content.size - 1))) - { - return cell; - } else { - continue loop; - } - } - } - - return null; - } - } - - public void clear() { - content = Empty; - } - - public Set> entrySet() { - return new Data.EntrySet(new MyEntryMap()); - } - - public Set keySet() { - return new Data.KeySet(new MyEntryMap()); - } - - public Collection values() { - return new Data.Values(new MyEntryMap()); - } - - private class MyEntryMap implements Data.EntryMap { - public int size() { - return ConcurrentHashMap.this.size(); - } - - public Map.Entry find(Object key) { - return new MyEntry(ConcurrentHashMap.this.find(key)); - } - - public Map.Entry remove(Object key) { - return new MyEntry - (ConcurrentHashMap.this.remove(key, RemoveCondition.Always, null)); - } - - public void clear() { - ConcurrentHashMap.this.clear(); - } - - public Iterator> iterator() { - return new MyIterator(content); - } - } - - private static class Content { - private final PersistentSet>> set; - private final int size; - - public Content(PersistentSet>> set, - int size) - { - this.set = set; - this.size = size; - } - } - - private static class Cell implements Cloneable { - public final K key; - public V value; - public Cell next; - - public Cell(K key, V value, Cell next) { - this.key = key; - this.value = value; - this.next = next; - } - - public Cell clone() { - try { - return (Cell) super.clone(); - } catch (CloneNotSupportedException e) { - throw new AssertionError(); - } - } - } - - private static class Node implements Comparable> { - public final int key; - public T value; - - public Node(int key) { - this.key = key; - } - - public int compareTo(Node n) { - return key - n.key; - } - } - - private class MyEntry implements Map.Entry { - private final K key; - private V value; - - public MyEntry(Cell cell) { - key = cell.key; - value = cell.value; - } - - public K getKey() { - return key; - } - - public V getValue() { - return value; - } - - public V setValue(V value) { - V v = value; - this.value = value; - put(key, value); - return v; - } - } - - private class MyIterator implements Iterator> { - private final Content content; - private final Iterator>> iterator; - private Cell currentCell; - private Cell nextCell; - - public MyIterator(Content content) { - this.content = content; - this.iterator = content.set.iterator(); - hasNext(); - } - - public Map.Entry next() { - if (hasNext()) { - currentCell = nextCell; - - nextCell = nextCell.next; - - return new MyEntry(currentCell); - } else { - throw new NoSuchElementException(); - } - } - - public boolean hasNext() { - if (nextCell == null && iterator.hasNext()) { - nextCell = iterator.next().value; - } - return nextCell != null; - } - - public void remove() { - if (currentCell != null) { - ConcurrentHashMap.this.remove - (currentCell.key, RemoveCondition.Always, null); - currentCell = null; - } else { - throw new IllegalStateException(); - } - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentLinkedQueue.java b/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentLinkedQueue.java deleted file mode 100644 index 21c64cff2c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentLinkedQueue.java +++ /dev/null @@ -1,171 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -import java.util.AbstractQueue; -import java.util.Collection; -import java.util.Iterator; - -import avian.Atomic; - -public class ConcurrentLinkedQueue extends AbstractQueue { - private static final long QueueHead; - private static final long QueueTail; - private static final long NodeNext; - - static { - try { - QueueHead = Atomic.getOffset - (ConcurrentLinkedQueue.class.getField("head")); - - QueueTail = Atomic.getOffset - (ConcurrentLinkedQueue.class.getField("tail")); - - NodeNext = Atomic.getOffset - (Node.class.getField("next")); - } catch (NoSuchFieldException e) { - throw new RuntimeException(e); - } - } - - private volatile Node head = new Node(null, null); - private volatile Node tail = head; - - @Override - public void clear() { - // TODO - can we safely make this O(1)? - while (poll() != null) { } - } - - @Override - public boolean offer(T element) { - add(element); - - return true; - } - - @Override - public boolean add(T value) { - Node n = new Node(value, null); - while (true) { - Node t = tail; - Node next = tail.next; - if (t == tail) { - if (next != null) { - Atomic.compareAndSwapObject(this, QueueTail, t, next); - } else if (Atomic.compareAndSwapObject(tail, NodeNext, null, n)) { - Atomic.compareAndSwapObject(this, QueueTail, t, n); - break; - } - } - } - - return true; - } - - @Override - public T peek() { - return poll(false); - } - - @Override - public T poll() { - return poll(true); - } - - private T poll(boolean remove) { - while (true) { - Node h = head; - Node t = tail; - Node next = head.next; - - if (h == head) { - if (h == t) { - if (next != null) { - Atomic.compareAndSwapObject(this, QueueTail, t, next); - } else { - return null; - } - } else { - T value = next.value; - if ((! remove) - || Atomic.compareAndSwapObject(this, QueueHead, h, next)) - { - return value; - } - } - } - } - } - - private static class Node { - public volatile T value; - public volatile Node next; - - public Node(T value, Node next) { - this.value = value; - this.next = next; - } - } - - @Override - public int size() { - // TODO - implement - throw new UnsupportedOperationException(); - } - - @Override - public boolean isEmpty() { - return size() == 0; - } - - @Override - public boolean contains(Object element) { - // TODO - implement - throw new UnsupportedOperationException(); - } - - @Override - public boolean containsAll(Collection c) { - // TODO - implement - throw new UnsupportedOperationException(); - } - - @Override - public boolean remove(Object element) { - // TODO - implement - throw new UnsupportedOperationException(); - } - - @Override - public boolean removeAll(Collection c) { - // TODO - implement - throw new UnsupportedOperationException(); - } - - @Override - public Object[] toArray() { - // TODO - implement - throw new UnsupportedOperationException(); - } - - @Override - public S[] toArray(S[] array) { - // TODO - implement - throw new UnsupportedOperationException(); - } - - @Override - public Iterator iterator() { - // TODO - implement - throw new UnsupportedOperationException(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentMap.java b/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentMap.java deleted file mode 100644 index 9328320eaa..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/ConcurrentMap.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -import java.util.Map; - -public interface ConcurrentMap extends Map { - public V putIfAbsent(K key, V value); - - public boolean remove(K key, V value); - - public V replace(K key, V value); - - public boolean replace(K key, V oldValue, V newValue); -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/Delayed.java b/sgx-jvm/avian/classpath/java/util/concurrent/Delayed.java deleted file mode 100644 index 0c7368ee62..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/Delayed.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface Delayed extends Comparable { - public long getDelay(TimeUnit unit); -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/ExecutionException.java b/sgx-jvm/avian/classpath/java/util/concurrent/ExecutionException.java deleted file mode 100644 index 7f6560b26e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/ExecutionException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public class ExecutionException extends Exception { - private static final long serialVersionUID = 7830266012832686185L; - - protected ExecutionException() { - super(); - } - - protected ExecutionException(String message) { - super(message); - } - - public ExecutionException(String message, Throwable cause) { - super(message, cause); - } - - public ExecutionException(Throwable cause) { - super(cause); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/Executor.java b/sgx-jvm/avian/classpath/java/util/concurrent/Executor.java deleted file mode 100644 index cd9f5d4b27..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/Executor.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface Executor { - public void execute(Runnable task); -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/ExecutorService.java b/sgx-jvm/avian/classpath/java/util/concurrent/ExecutorService.java deleted file mode 100644 index 15556bff4c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/ExecutorService.java +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; -import java.util.List; -import java.util.Collection; - -public interface ExecutorService extends Executor { - public void shutdown(); - - public List shutdownNow(); - - public boolean isShutdown(); - - public boolean isTerminated(); - - public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException; - - public Future submit(Callable task); - - public Future submit(Runnable task, T result); - - public Future submit(Runnable task); - - public List> invokeAll(Collection> tasks) throws InterruptedException; - - public List> invokeAll(Collection> tasks, - long timeout, TimeUnit unit) throws InterruptedException; - - public T invokeAny(Collection> tasks) throws InterruptedException, ExecutionException; - - public T invokeAny(Collection> tasks, - long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException; -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/Executors.java b/sgx-jvm/avian/classpath/java/util/concurrent/Executors.java deleted file mode 100644 index 96496b5c99..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/Executors.java +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public class Executors { - public static Callable callable(final Runnable task, final T result) { - return new Callable() { - @Override - public T call() throws Exception { - task.run(); - - return result; - } - }; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/Future.java b/sgx-jvm/avian/classpath/java/util/concurrent/Future.java deleted file mode 100644 index 93c219b81c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/Future.java +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface Future { - public boolean cancel(boolean mayInterruptIfRunning); - - public boolean isCancelled(); - - public boolean isDone(); - - public V get() throws InterruptedException, ExecutionException; - - public V get(long timeout, TimeUnit unit) throws InterruptedException, - ExecutionException, - TimeoutException; -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/FutureTask.java b/sgx-jvm/avian/classpath/java/util/concurrent/FutureTask.java deleted file mode 100644 index 2677ee27ff..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/FutureTask.java +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -import java.util.concurrent.atomic.AtomicReference; - -public class FutureTask implements RunnableFuture { - private enum State { New, Canceling, Canceled, Running, Done }; - - private final AtomicReference currentState; - private final Callable callable; - private final Object notifyLock; - private volatile Thread runningThread; - private volatile T result; - private volatile Throwable failure; - - public FutureTask(final Runnable r, final T result) { - this(new Callable() { - @Override - public T call() { - r.run(); - - return result; - } - }); - } - - public FutureTask(Callable callable) { - currentState = new AtomicReference(State.New); - this.callable = callable; - notifyLock = new Object(); - runningThread = null; - result = null; - failure = null; - } - - @Override - public void run() { - if (currentState.compareAndSet(State.New, State.Running)) { - runningThread = Thread.currentThread(); - try { - result = callable.call(); - } catch (Throwable t) { - failure = t; - } finally { - if (currentState.compareAndSet(State.Running, State.Done) || - currentState.get() == State.Canceled) { - /* in either of these conditions we either were not canceled - * or we already were interrupted. The thread may or MAY NOT - * be in an interrupted status depending on when it was - * interrupted and what the callable did with the state. - */ - } else { - /* Should be in canceling state, so block forever till we are - * interrupted. If state already transitioned into canceled - * and thus thread is in interrupted status, the exception should - * throw immediately on the sleep call. - */ - throw new UnsupportedOperationException("Blocking not supported."); - } - - Thread.interrupted(); // reset interrupted status if set - handleDone(); - runningThread = null; // must be last operation - } - } - } - - private void handleDone() { - done(); - - synchronized (notifyLock) { - notifyLock.notifyAll(); - } - } - - protected void done() { - // default implementation does nothing, designed to be overridden - } - - @Override - public boolean cancel(boolean mayInterruptIfRunning) { - if (currentState.compareAndSet(State.New, State.Canceled)) { - handleDone(); - - return true; - } else if (mayInterruptIfRunning && - currentState.compareAndSet(State.Running, State.Canceling)) { - // handleDone will be called from running thread - try { - Thread runningThread = this.runningThread; - if (runningThread != null) { - runningThread.interrupt(); - - return true; - } - } finally { - // we can not set to canceled until interrupt status has been set - currentState.set(State.Canceled); - } - } - - return false; - } - - @Override - public boolean isCancelled() { - return currentState.get() == State.Canceled; - } - - @Override - public boolean isDone() { - return currentState.get() == State.Done || isCancelled(); - } - - @Override - public T get() throws InterruptedException, ExecutionException { - throw new UnsupportedOperationException("System clock unavailable"); - } - - @Override - public T get(long timeout, TimeUnit unit) throws InterruptedException, - ExecutionException, - TimeoutException { - throw new UnsupportedOperationException("System clock unavailable"); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/RejectedExecutionException.java b/sgx-jvm/avian/classpath/java/util/concurrent/RejectedExecutionException.java deleted file mode 100644 index e3230c1cd1..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/RejectedExecutionException.java +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public class RejectedExecutionException extends RuntimeException { - private static final long serialVersionUID = -375805702767069545L; - - public RejectedExecutionException() { - super(); - } - - public RejectedExecutionException(String message) { - super(message); - } - - public RejectedExecutionException(String message, Throwable cause) { - super(message, cause); - } - - public RejectedExecutionException(Throwable cause) { - super(cause); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/RunnableFuture.java b/sgx-jvm/avian/classpath/java/util/concurrent/RunnableFuture.java deleted file mode 100644 index 7b8b38cad6..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/RunnableFuture.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface RunnableFuture extends Runnable, Future { - // nothing added to interface -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/ScheduledExecutorService.java b/sgx-jvm/avian/classpath/java/util/concurrent/ScheduledExecutorService.java deleted file mode 100644 index d0cba8caed..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/ScheduledExecutorService.java +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface ScheduledExecutorService extends ExecutorService { - public ScheduledFuture schedule(Runnable command, - long delay, TimeUnit unit); - - public ScheduledFuture schedule(Callable callable, - long delay, TimeUnit unit); - - public ScheduledFuture scheduleAtFixedRate(Runnable command, - long initialDelay, - long period, - TimeUnit unit); - - public ScheduledFuture scheduleWithFixedDelay(Runnable command, - long initialDelay, - long delay, - TimeUnit unit); -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/ScheduledFuture.java b/sgx-jvm/avian/classpath/java/util/concurrent/ScheduledFuture.java deleted file mode 100644 index eb9ab4da01..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/ScheduledFuture.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface ScheduledFuture extends Delayed, Future { - -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/ThreadFactory.java b/sgx-jvm/avian/classpath/java/util/concurrent/ThreadFactory.java deleted file mode 100644 index ed7def9977..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/ThreadFactory.java +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public interface ThreadFactory { - public Thread newThread(Runnable r); -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/TimeUnit.java b/sgx-jvm/avian/classpath/java/util/concurrent/TimeUnit.java deleted file mode 100644 index 94b91826e0..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/TimeUnit.java +++ /dev/null @@ -1,400 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public enum TimeUnit { - NANOSECONDS { - @Override - public long toNanos(long d) { - return d; - } - - @Override - public long toMicros(long d) { - return d / NANOSECONDS_PER_MICROSECOND; - } - - @Override - public long toMillis(long d) { - return d / NANOSECONDS_PER_MILLISECOND; - } - - @Override - public long toSeconds(long d) { - return d / NANOSECONDS_PER_SECOND; - } - - @Override - public long toMinutes(long d) { - return d / NANOSECONDS_PER_MINUTE; - } - - @Override - public long toHours(long d) { - return d / NANOSECONDS_PER_HOUR; - } - - @Override - public long toDays(long d) { - return d / NANOSECONDS_PER_DAY; - } - - @Override - public long convert(long d, TimeUnit u) { - return u.toNanos(d); - } - - @Override - int excessNanos(long d, long m) { - return (int) (d - (m * NANOSECONDS_PER_MILLISECOND)); - } - }, - MICROSECONDS { - @Override - public long toNanos(long d) { - return scale(d, NANOSECONDS_PER_MICROSECOND); - } - - @Override - public long toMicros(long d) { - return d; - } - - @Override - public long toMillis(long d) { - return d / MICROSECONDS_PER_MILLISECOND; - } - - @Override - public long toSeconds(long d) { - return d / MICROSECONDS_PER_SECOND; - } - - @Override - public long toMinutes(long d) { - return d / MICROSECONDS_PER_MINUTE; - } - - @Override - public long toHours(long d) { - return d / MICROSECONDS_PER_HOUR; - } - - @Override - public long toDays(long d) { - return d / MICROSECONDS_PER_DAY; - } - - @Override - public long convert(long d, TimeUnit u) { - return u.toMicros(d); - } - - @Override - int excessNanos(long d, long m) { - return (int) ((d * NANOSECONDS_PER_MICROSECOND) - (m * NANOSECONDS_PER_MILLISECOND)); - } - }, - MILLISECONDS { - @Override - public long toNanos(long d) { - return scale(d, NANOSECONDS_PER_MILLISECOND); - } - - @Override - public long toMicros(long d) { - return scale(d, MICROSECONDS_PER_MILLISECOND); - } - - @Override - public long toMillis(long d) { - return d; - } - - @Override - public long toSeconds(long d) { - return d / MILLISECONDS_PER_SECOND; - } - - @Override - public long toMinutes(long d) { - return d / MILLISECONDS_PER_MINUTE; - } - - @Override - public long toHours(long d) { - return d / MILLISECONDS_PER_HOUR; - } - - @Override - public long toDays(long d) { - return d / MILLISECONDS_PER_DAY; - } - - @Override - public long convert(long d, TimeUnit u) { - return u.toMillis(d); - } - - @Override - int excessNanos(long d, long m) { - return 0; - } - }, - SECONDS { - @Override - public long toNanos(long d) { - return scale(d, NANOSECONDS_PER_SECOND); - } - - @Override - public long toMicros(long d) { - return scale(d, MICROSECONDS_PER_SECOND); - } - - @Override - public long toMillis(long d) { - return scale(d, MILLISECONDS_PER_SECOND); - } - - @Override - public long toSeconds(long d) { - return d; - } - - @Override - public long toMinutes(long d) { - return d / SECONDS_PER_MINUTE; - } - - @Override - public long toHours(long d) { - return d / SECONDS_PER_HOUR; - } - - @Override - public long toDays(long d) { - return d / SECONDS_PER_DAY; - } - - @Override - public long convert(long d, TimeUnit u) { - return u.toSeconds(d); - } - - @Override - int excessNanos(long d, long m) { - return 0; - } - }, - MINUTES { - @Override - public long toNanos(long d) { - return scale(d, NANOSECONDS_PER_MINUTE); - } - - @Override - public long toMicros(long d) { - return scale(d, MICROSECONDS_PER_MINUTE); - } - - @Override - public long toMillis(long d) { - return scale(d, MILLISECONDS_PER_MINUTE); - } - - @Override - public long toSeconds(long d) { - return scale(d, SECONDS_PER_MINUTE); - } - - @Override - public long toMinutes(long d) { - return d; - } - - @Override - public long toHours(long d) { - return d / MINUETS_PER_HOUR; - } - - @Override - public long toDays(long d) { - return d / MINUETS_PER_DAY; - } - - @Override - public long convert(long d, TimeUnit u) { - return u.toMinutes(d); - } - - @Override - int excessNanos(long d, long m) { - return 0; - } - }, - HOURS { - @Override - public long toNanos(long d) { - return scale(d, NANOSECONDS_PER_HOUR); - } - - @Override - public long toMicros(long d) { - return scale(d, MICROSECONDS_PER_HOUR); - } - - @Override - public long toMillis(long d) { - return scale(d, MILLISECONDS_PER_HOUR); - } - - @Override - public long toSeconds(long d) { - return scale(d, SECONDS_PER_HOUR); - } - - @Override - public long toMinutes(long d) { - return scale(d, MINUETS_PER_HOUR); - } - - @Override - public long toHours(long d) { - return d; - } - - @Override - public long toDays(long d) { - return d / HOURS_PER_DAY; - } - - @Override - public long convert(long d, TimeUnit u) { - return u.toHours(d); - } - - @Override - int excessNanos(long d, long m) { - return 0; - } - }, - DAYS { - @Override - public long toNanos(long d) { - return scale(d, NANOSECONDS_PER_DAY); - } - - @Override - public long toMicros(long d) { - return scale(d, MICROSECONDS_PER_DAY); - } - - @Override - public long toMillis(long d) { - return scale(d, MILLISECONDS_PER_DAY); - } - - @Override - public long toSeconds(long d) { - return scale(d, SECONDS_PER_DAY); - } - - @Override - public long toMinutes(long d) { - return scale(d, MINUETS_PER_DAY); - } - - @Override - public long toHours(long d) { - return scale(d, HOURS_PER_DAY); - } - - @Override - public long toDays(long d) { - return d; - } - - @Override - public long convert(long d, TimeUnit u) { - return u.toDays(d); - } - - @Override - int excessNanos(long d, long m) { - return 0; - } - }; - - private static final long NANOSECONDS_PER_MICROSECOND = 1000L; - private static final long MICROSECONDS_PER_MILLISECOND = 1000L; - private static final long MILLISECONDS_PER_SECOND = 1000L; - private static final long SECONDS_PER_MINUTE = 60; - private static final long MINUETS_PER_HOUR = 60; - private static final long HOURS_PER_DAY = 24; - - private static final long NANOSECONDS_PER_MILLISECOND = NANOSECONDS_PER_MICROSECOND * MICROSECONDS_PER_MILLISECOND; - private static final long NANOSECONDS_PER_SECOND = NANOSECONDS_PER_MILLISECOND * MILLISECONDS_PER_SECOND; - private static final long NANOSECONDS_PER_MINUTE = NANOSECONDS_PER_SECOND * SECONDS_PER_MINUTE; - private static final long NANOSECONDS_PER_HOUR = NANOSECONDS_PER_MINUTE * MINUETS_PER_HOUR; - private static final long NANOSECONDS_PER_DAY = NANOSECONDS_PER_HOUR * HOURS_PER_DAY; - - private static final long MICROSECONDS_PER_SECOND = MICROSECONDS_PER_MILLISECOND * MILLISECONDS_PER_SECOND; - private static final long MICROSECONDS_PER_MINUTE = MICROSECONDS_PER_SECOND * SECONDS_PER_MINUTE; - private static final long MICROSECONDS_PER_HOUR = MICROSECONDS_PER_MINUTE * MINUETS_PER_HOUR; - private static final long MICROSECONDS_PER_DAY = MICROSECONDS_PER_HOUR * HOURS_PER_DAY; - - private static final long MILLISECONDS_PER_MINUTE = MILLISECONDS_PER_SECOND * SECONDS_PER_MINUTE; - private static final long MILLISECONDS_PER_HOUR = MILLISECONDS_PER_MINUTE * MINUETS_PER_HOUR; - private static final long MILLISECONDS_PER_DAY = MILLISECONDS_PER_HOUR * HOURS_PER_DAY; - - private static final long SECONDS_PER_HOUR = SECONDS_PER_MINUTE * MINUETS_PER_HOUR; - private static final long SECONDS_PER_DAY = SECONDS_PER_HOUR * HOURS_PER_DAY; - - private static final long MINUETS_PER_DAY = MINUETS_PER_HOUR * HOURS_PER_DAY; - - private static long scale(long value, long conversion) { - long result = value * conversion; - if (value > 0 && result < value) { - return Long.MAX_VALUE; - } else if (value < 0 && result > value) { - return Long.MIN_VALUE; - } else { - return result; - } - } - - public abstract long convert(long sourceDuration, TimeUnit sourceUnit); - - public abstract long toNanos(long duration); - - public abstract long toMicros(long duration); - - public abstract long toMillis(long duration); - - public abstract long toSeconds(long duration); - - public abstract long toMinutes(long duration); - - public abstract long toHours(long duration); - - public abstract long toDays(long duration); - - abstract int excessNanos(long d, long m); - - public void timedWait(Object obj, long timeout) throws InterruptedException { - if (timeout > 0) { - long ms = toMillis(timeout); - int ns = excessNanos(timeout, ms); - obj.wait(ms, ns); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/TimeoutException.java b/sgx-jvm/avian/classpath/java/util/concurrent/TimeoutException.java deleted file mode 100644 index fcb62e5c8e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/TimeoutException.java +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent; - -public class TimeoutException extends Exception { - private static final long serialVersionUID = 1900926677490660714L; - - public TimeoutException() { - super(); - } - - public TimeoutException(String message) { - super(message); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicBoolean.java b/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicBoolean.java deleted file mode 100644 index fc7253f3fa..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicBoolean.java +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.atomic; - -public class AtomicBoolean implements java.io.Serializable { - private static final long serialVersionUID = 4654671469794556979L; - - private static final int FALSE_VALUE = 0; - private static final int TRUE_VALUE = 1; - - private final AtomicInteger value; - - public AtomicBoolean() { - this(false); - } - - public AtomicBoolean(boolean initialValue) { - value = new AtomicInteger(intValue(initialValue)); - } - - private static int intValue(boolean value) { - return value ? TRUE_VALUE : FALSE_VALUE; - } - - private static boolean booleanValue(int value) { - return value == TRUE_VALUE; - } - - public boolean get() { - return booleanValue(value.get()); - } - - public boolean compareAndSet(boolean expect, boolean update) { - return value.compareAndSet(intValue(expect), intValue(update)); - } - - public boolean weakCompareAndSet(boolean expect, boolean update) { - return value.weakCompareAndSet(intValue(expect), intValue(update)); - } - - public void set(boolean newValue) { - value.set(intValue(newValue)); - } - - public void lazySet(boolean newValue) { - value.lazySet(intValue(newValue)); - } - - public boolean getAndSet(boolean newValue) { - int intResult = value.getAndSet(intValue(newValue)); - - return booleanValue(intResult); - } - - @Override - public String toString() { - return Boolean.toString(get()); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicInteger.java b/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicInteger.java deleted file mode 100644 index 34621f4eff..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicInteger.java +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.atomic; - -import java.lang.reflect.Field; - -import sun.misc.Unsafe; - -public class AtomicInteger extends Number implements java.io.Serializable { - private static final long serialVersionUID = 6214790243416807050L; - - private static final Unsafe unsafe = Unsafe.getUnsafe(); - private static final long valueOffset; - - static { - try { - Field f = AtomicInteger.class.getDeclaredField("value"); - valueOffset = unsafe.objectFieldOffset(f); - } catch (NoSuchFieldException e) { - throw new Error(e); - } - } - - private volatile int value; - - public AtomicInteger() { - this(0); - } - - public AtomicInteger(int initialValue) { - this.value = initialValue; - } - - public int get() { - return value; - } - - public void set(int newValue) { - this.value = newValue; - } - - public void lazySet(int newValue) { - unsafe.putOrderedInt(this, valueOffset, newValue); - } - - public boolean compareAndSet(int expect, int update) { - return unsafe.compareAndSwapInt(this, valueOffset, expect, update); - } - - public boolean weakCompareAndSet(int expect, int update) { - return unsafe.compareAndSwapInt(this, valueOffset, expect, update); - } - - public int getAndSet(int newValue) { - while (true) { - int current = value; - if (compareAndSet(current, newValue)) { - return current; - } - } - } - - public int getAndAdd(int delta) { - while (true) { - int current = value; - int next = current + delta; - if (compareAndSet(current, next)) { - return current; - } - } - } - - public int getAndIncrement() { - return getAndAdd(1); - } - - public int getAndDecrement() { - return getAndAdd(-1); - } - - public int addAndGet(int delta) { - while (true) { - int current = value; - int next = current + delta; - if (compareAndSet(current, next)) { - return next; - } - } - } - - public int incrementAndGet() { - return addAndGet(1); - } - - public int decrementAndGet() { - return addAndGet(-1); - } - - @Override - public byte byteValue() { - return (byte)value; - } - - @Override - public short shortValue() { - return (short)value; - } - - @Override - public int intValue() { - return value; - } - - @Override - public long longValue() { - return value; - } - - @Override - public float floatValue() { - return value; - } - - @Override - public double doubleValue() { - return value; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicLong.java b/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicLong.java deleted file mode 100644 index 849ea91b7b..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicLong.java +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.atomic; - -import java.lang.reflect.Field; - -import sun.misc.Unsafe; - -public class AtomicLong extends Number implements java.io.Serializable { - private static final long serialVersionUID = 1927816293512124184L; - - private static final Unsafe unsafe = Unsafe.getUnsafe(); - private static final long valueOffset; - - static { - try { - Field f = AtomicLong.class.getDeclaredField("value"); - valueOffset = unsafe.objectFieldOffset(f); - } catch (NoSuchFieldException e) { - throw new Error(e); - } - } - - private volatile long value; - - public AtomicLong() { - this(0); - } - - public AtomicLong(long initialValue) { - this.value = initialValue; - } - - public long get() { - return value; - } - - public void set(long newValue) { - this.value = newValue; - } - - public void lazySet(long newValue) { - unsafe.putOrderedLong(this, valueOffset, newValue); - } - - public boolean compareAndSet(long expect, long update) { - return unsafe.compareAndSwapLong(this, valueOffset, expect, update); - } - - public boolean weakCompareAndSet(long expect, long update) { - return unsafe.compareAndSwapLong(this, valueOffset, expect, update); - } - - public long getAndSet(long newValue) { - while (true) { - long current = value; - if (compareAndSet(current, newValue)) { - return current; - } - } - } - - public long getAndAdd(long delta) { - while (true) { - long current = value; - long next = current + delta; - if (compareAndSet(current, next)) { - return current; - } - } - } - - public long getAndIncrement() { - return getAndAdd(1); - } - - public long getAndDecrement() { - return getAndAdd(-1); - } - - public long addAndGet(long delta) { - while (true) { - long current = value; - long next = current + delta; - if (compareAndSet(current, next)) { - return next; - } - } - } - - public long incrementAndGet() { - return addAndGet(1); - } - - public long decrementAndGet() { - return addAndGet(-1); - } - - @Override - public byte byteValue() { - return (byte)value; - } - - @Override - public short shortValue() { - return (short)value; - } - - @Override - public int intValue() { - return (int)value; - } - - @Override - public long longValue() { - return value; - } - - @Override - public float floatValue() { - return value; - } - - @Override - public double doubleValue() { - return value; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicReference.java b/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicReference.java deleted file mode 100644 index 80361d407e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicReference.java +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.atomic; - -import java.lang.reflect.Field; - -import sun.misc.Unsafe; - -public class AtomicReference implements java.io.Serializable { - private static final long serialVersionUID = -1848883965231344442L; - - private static final Unsafe unsafe = Unsafe.getUnsafe(); - private static final long valueOffset; - - static { - try { - Field f = AtomicReference.class.getDeclaredField("value"); - valueOffset = unsafe.objectFieldOffset(f); - } catch (NoSuchFieldException e) { - throw new Error(e); - } - } - - private volatile T value; - - public AtomicReference() { - this(null); - } - - public AtomicReference(T initialValue) { - this.value = initialValue; - } - - public T get() { - return value; - } - - public void set(T newValue) { - value = newValue; - } - - public void lazySet(T newValue) { - unsafe.putOrderedObject(this, valueOffset, newValue); - } - - public boolean compareAndSet(T expect, T update) { - return unsafe.compareAndSwapObject(this, valueOffset, expect, update); - } - - public boolean weakCompareAndSet(T expect, T update) { - return unsafe.compareAndSwapObject(this, valueOffset, expect, update); - } - - public final T getAndSet(T newValue) { - while (true) { - T current = value; - if (compareAndSet(current, newValue)) { - return current; - } - } - } - - @Override - public String toString() { - return String.valueOf(value); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicReferenceArray.java b/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicReferenceArray.java deleted file mode 100644 index 96f6f47586..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/atomic/AtomicReferenceArray.java +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.atomic; - -import java.util.Arrays; - -import sun.misc.Unsafe; - -public class AtomicReferenceArray { - private static final Unsafe unsafe = Unsafe.getUnsafe(); - private static final long arrayOffset = unsafe.arrayBaseOffset(Object.class); - private static final long arrayScale = unsafe.arrayIndexScale(Object.class); - - private final Object[] array; - - public AtomicReferenceArray(int length) { - array = new Object[length]; - } - - public T get(int index) { - return (T) unsafe.getObjectVolatile - (array, arrayOffset + (index * arrayScale)); - } - - public void set(int index, T newValue) { - unsafe.putObjectVolatile - (array, arrayOffset + (index * arrayScale), newValue); - } - - public void lazySet(int index, T newValue) { - unsafe.putOrderedObject - (array, arrayOffset + (index * arrayScale), newValue); - } - - public boolean compareAndSet(int index, T expect, T update) { - return unsafe.compareAndSwapObject - (array, arrayOffset + (index * arrayScale), expect, update); - } - - public boolean weakCompareAndSet(int index, T expect, T update) { - return compareAndSet(index, expect, update); - } - - public final T getAndSet(int index, T newValue) { - while (true) { - T current = get(index); - if (compareAndSet(index, current, newValue)) { - return current; - } - } - } - - public int length() { - return array.length; - } - - @Override - public String toString() { - return Arrays.toString(array); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/locks/Condition.java b/sgx-jvm/avian/classpath/java/util/concurrent/locks/Condition.java deleted file mode 100644 index 75c835f006..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/locks/Condition.java +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.locks; - -import java.util.Date; -import java.util.concurrent.TimeUnit; - -public interface Condition { - public void await(); - public boolean await(long time, TimeUnit unit); - public long awaitNanos(long nanosTimeout); - public void awaitUninterruptibly(); - public boolean awaitUntil(Date deadline); - public void signal(); - public void signalAll(); -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/locks/Lock.java b/sgx-jvm/avian/classpath/java/util/concurrent/locks/Lock.java deleted file mode 100644 index 2d21f97822..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/locks/Lock.java +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.locks; - -import java.util.concurrent.TimeUnit; - -public interface Lock { - public void lock(); - public void lockInterruptibly() throws InterruptedException; - public Condition newCondition(); - public boolean tryLock(); - public boolean tryLock(long time, TimeUnit unit) throws InterruptedException; - public void unlock(); -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/locks/LockSupport.java b/sgx-jvm/avian/classpath/java/util/concurrent/locks/LockSupport.java deleted file mode 100644 index 7276b75afd..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/locks/LockSupport.java +++ /dev/null @@ -1,85 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.locks; - -import sun.misc.Unsafe; - -public class LockSupport { - private LockSupport() { - // can't construct - } - - private static final Unsafe unsafe; - private static final long parkBlockerOffset; - - static { - unsafe = Unsafe.getUnsafe(); - try { - parkBlockerOffset = unsafe.objectFieldOffset(Thread.class.getDeclaredField("parkBlocker")); - } catch (Exception ex) { - throw new Error(ex); - } - } - - public static void unpark(Thread thread) { - if (thread != null) { - unsafe.unpark(thread); - } - } - - public static void park(Object blocker) { - doParkNanos(blocker, 0L); - } - - public static void parkNanos(Object blocker, long nanos) { - if (nanos <= 0) { - return; - } - - doParkNanos(blocker, nanos); - } - - private static void doParkNanos(Object blocker, long nanos) { - Thread t = Thread.currentThread(); - unsafe.putObject(t, parkBlockerOffset, blocker); - unsafe.park(false, nanos); - unsafe.putObject(t, parkBlockerOffset, null); - } - - public static void parkUntil(Object blocker, long deadline) { - Thread t = Thread.currentThread(); - unsafe.putObject(t, parkBlockerOffset, blocker); - unsafe.park(true, deadline); - unsafe.putObject(t, parkBlockerOffset, null); - } - - public static Object getBlocker(Thread t) { - if (t == null) { - throw new NullPointerException(); - } - - return unsafe.getObjectVolatile(t, parkBlockerOffset); - } - - public static void park() { - unsafe.park(false, 0L); - } - - public static void parkNanos(long nanos) { - if (nanos > 0) { - unsafe.park(false, nanos); - } - } - - public static void parkUntil(long deadline) { - unsafe.park(true, deadline); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/concurrent/locks/ReadWriteLock.java b/sgx-jvm/avian/classpath/java/util/concurrent/locks/ReadWriteLock.java deleted file mode 100644 index b0c1b5cae7..0000000000 --- a/sgx-jvm/avian/classpath/java/util/concurrent/locks/ReadWriteLock.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.concurrent.locks; - -public interface ReadWriteLock { - public Lock readLock(); - public Lock writeLock(); -} diff --git a/sgx-jvm/avian/classpath/java/util/jar/Attributes.java b/sgx-jvm/avian/classpath/java/util/jar/Attributes.java deleted file mode 100644 index 6f4ee6cf2d..0000000000 --- a/sgx-jvm/avian/classpath/java/util/jar/Attributes.java +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.jar; - -public class Attributes { - public static class Name { - private final String name; - - private static final int MAX_NAME_LENGTH = 70; - - public Name(String s) { - int len = s.length(); - if (len == 0 || len > MAX_NAME_LENGTH) - throw new IllegalArgumentException(); - - name = s; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/jar/JarEntry.java b/sgx-jvm/avian/classpath/java/util/jar/JarEntry.java deleted file mode 100644 index 6cee2310a5..0000000000 --- a/sgx-jvm/avian/classpath/java/util/jar/JarEntry.java +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.jar; - -import java.util.zip.ZipEntry; - -public abstract class JarEntry extends ZipEntry { - public JarEntry(){ - super(null); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/jar/JarFile.java b/sgx-jvm/avian/classpath/java/util/jar/JarFile.java deleted file mode 100644 index 08adc3d9c8..0000000000 --- a/sgx-jvm/avian/classpath/java/util/jar/JarFile.java +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.jar; - -import java.io.File; -import java.io.IOException; -import java.util.Enumeration; -import java.util.zip.ZipFile; -import java.util.zip.ZipEntry; - -public class JarFile extends ZipFile { - public JarFile(String name) throws IOException { - super(name); - } - - public JarFile(File file) throws IOException { - super(file); - } - - public Enumeration entries() { - return (Enumeration) makeEnumeration(JarEntryFactory.Instance); - } - - public JarEntry getJarEntry(String name) { - return (JarEntry) getEntry(JarEntryFactory.Instance, name); - } - - private static class MyJarEntry extends JarEntry implements MyEntry { - public final Window window; - public final int pointer; - - public MyJarEntry(Window window, int pointer) { - this.window = window; - this.pointer = pointer; - } - - public String getName() { - try { - return entryName(window, pointer); - } catch (IOException e) { - return null; - } - } - - public long getCompressedSize() { - try { - return compressedSize(window, pointer); - } catch (IOException e) { - return 0; - } - } - - public long getSize() { - try { - return uncompressedSize(window, pointer); - } catch (IOException e) { - return 0; - } - } - - public int pointer() { - return pointer; - } - } - - private static class JarEntryFactory implements EntryFactory { - public static final JarEntryFactory Instance = new JarEntryFactory(); - - public ZipEntry makeEntry(Window window, int pointer) { - return new MyJarEntry(window, pointer); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/logging/Handler.java b/sgx-jvm/avian/classpath/java/util/logging/Handler.java deleted file mode 100644 index 2e2fc41cb6..0000000000 --- a/sgx-jvm/avian/classpath/java/util/logging/Handler.java +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.logging; - -public class Handler { - public void publish(LogRecord r) { - } -} diff --git a/sgx-jvm/avian/classpath/java/util/logging/Level.java b/sgx-jvm/avian/classpath/java/util/logging/Level.java deleted file mode 100644 index e301ab7a32..0000000000 --- a/sgx-jvm/avian/classpath/java/util/logging/Level.java +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.logging; - -public class Level { - public static final Level FINEST = new Level("FINEST", 300); - public static final Level FINER = new Level("FINER", 400); - public static final Level FINE = new Level("FINE", 500); - public static final Level INFO = new Level("INFO", 800); - public static final Level WARNING = new Level("WARNING", 900); - public static final Level SEVERE = new Level("SEVERE", 1000); - - private final int value; - private final String name; - - private Level(String name, int value) { - this.name = name; - this.value = value; - } - - public int intValue() { - return value; - } - - public String getName() { - return name; - } - - public String toString() { - return name; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/logging/LogRecord.java b/sgx-jvm/avian/classpath/java/util/logging/LogRecord.java deleted file mode 100644 index 23d4d536bc..0000000000 --- a/sgx-jvm/avian/classpath/java/util/logging/LogRecord.java +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.logging; - -public class LogRecord { - private final String loggerName; - private final String message; - private final Throwable thrown; - private final Level level; - private final String methodName; - - LogRecord(String loggerName, String methodName, Level level, String message, - Throwable thrown) { - this.loggerName = loggerName; - this.message = message; - this.thrown = thrown; - this.level = level; - this.methodName = methodName; - } - - public String getLoggerName() { - return loggerName; - } - - public String getMessage() { - return message; - } - - public Throwable getThrown() { - return thrown; - } - - public Level getLevel() { - return level; - } - - public String getSourceMethodName() { - return methodName; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/logging/Logger.java b/sgx-jvm/avian/classpath/java/util/logging/Logger.java deleted file mode 100644 index ad710ae7ce..0000000000 --- a/sgx-jvm/avian/classpath/java/util/logging/Logger.java +++ /dev/null @@ -1,232 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.logging; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; - -public class Logger { - private final String name; - private Level levelValue = null; - private static final ArrayList handlers; - private static Logger rootLogger; - private Logger parent; - - static { - rootLogger = new Logger(""); - rootLogger.setLevel(Level.INFO); - handlers = new ArrayList(); - handlers.add(new DefaultHandler()); - } - - public static Logger getLogger(String name) { - if (name.equals("")) return rootLogger; - Logger logger = new Logger(name); - logger.parent = rootLogger; - return logger; - } - - private Logger(String name) { - this.name = name; - } - - public Handler[] getHandlers() { - return handlers.toArray(new Handler[handlers.size()]); - } - - public void addHandler(Handler handler) { - handlers.add(handler); - } - - public void removeHandler(Handler handler) { - handlers.remove(handler); - } - - public Logger getParent() { - return parent; - } - - public void fine(String message) { - log(Level.FINE, Method.getCaller(), message, null); - } - - public void finer(String message) { - log(Level.FINER, Method.getCaller(), message, null); - } - - public void finest(String message) { - log(Level.FINEST, Method.getCaller(), message, null); - } - - public void info(String message) { - log(Level.INFO, Method.getCaller(), message, null); - } - - public void warning(String message) { - log(Level.WARNING, Method.getCaller(), message, null); - } - - public void severe(String message) { - log(Level.SEVERE, Method.getCaller(), message, null); - } - - public void log(Level level, String message) { - log(level, Method.getCaller(), message, null); - } - - public void log(Level level, String message, Throwable exception) { - log(level, Method.getCaller(), message, exception); - } - - public void log(Level level, String message, Object param) { - log(level, Method.getCaller(), replaceParameters(message, param), null); - } - - private static String replaceParameters(String message, Object... params) { - StringBuilder builder = new StringBuilder(); - int offset = 0; - for (int i = 0; i < params.length; ++i) { - int curly = message.indexOf("{}", offset); - if (curly < 0) { - break; - } - if (curly > offset) { - builder.append(message, offset, curly); - } - offset = curly + 2; - builder.append(params[i]); - } - if (message.length() > offset) { - builder.append(message, offset, message.length()); - } - return builder.toString(); - } - - public void logp(Level level, String sourceClass, String sourceMethod, String msg) { - if (!isLoggable(level)) { - return; - } - publish(new LogRecord(name, sourceMethod, level, msg, null)); - } - - public void logp(Level level, String sourceClass, String sourceMethod, - String msg, Throwable thrown) { - if (!isLoggable(level)) { - return; - } - publish(new LogRecord(name, sourceMethod, level, msg, thrown)); - } - - public Level getLevel() { - return levelValue; - } - - private Level getEffectiveLevel() { - Logger logger = this; - - while (logger.levelValue == null) { - logger = logger.getParent(); - } - return logger.getLevel(); - } - - private void log(Level level, avian.VMMethod caller, String message, - Throwable exception) { - - if (level.intValue() < getEffectiveLevel().intValue()) { - return; - } - LogRecord r = new LogRecord - (name, caller == null ? "" : Method.getName(caller), level, - message, exception); - publish(r); - } - - private void publish(LogRecord logRecord) { - for (Handler h : handlers) { - h.publish(logRecord); - } - } - - public void setLevel(Level level) { - levelValue = level; - } - - public boolean isLoggable(Level level) { - return level.intValue() >= getEffectiveLevel().intValue(); - } - - private static class DefaultHandler extends Handler { - private static final int NAME_WIDTH = 14; - private static final int METHOD_WIDTH = 15; - private static final int LEVEL_WIDTH = 8; - private final String newline; - - public DefaultHandler() { - newline = System.getProperty("line.separator"); - } - - public Object clone() { return this; } - public void close() { } - public void flush() { } - - private void maybeLogThrown(StringBuilder sb, Throwable t) { - if (t != null) { - sb.append("\nCaused by: "); - sb.append(t.getClass().getName()); - sb.append(": "); - sb.append(t.getMessage()); - sb.append(newline); - - for (StackTraceElement elt : t.getStackTrace()) { - sb.append('\t'); - sb.append(elt.getClassName()); - sb.append('.'); - sb.append(elt.getMethodName()); - sb.append("(line"); - sb.append(':'); - int lineNumber = elt.getLineNumber(); - if (lineNumber == -2) { - sb.append("unknown"); - } else if (lineNumber == -1) { - sb.append("native"); - } else { - sb.append(lineNumber); - } - sb.append(')'); - sb.append(newline); - } - maybeLogThrown(sb, t.getCause()); - } - } - - private void indent(StringBuilder sb, int amount) { - do { - sb.append(' '); - } while (--amount > 0); - } - - public void publish(LogRecord r) { - StringBuilder sb = new StringBuilder(); - sb.append(r.getLoggerName()); - indent(sb, NAME_WIDTH - r.getLoggerName().length()); - sb.append(r.getSourceMethodName()); - indent(sb, METHOD_WIDTH - r.getSourceMethodName().length()); - sb.append(r.getLevel().getName()); - indent(sb, LEVEL_WIDTH - r.getLevel().getName().length()); - sb.append(r.getMessage()); - maybeLogThrown(sb, r.getThrown()); - System.out.println(sb.toString()); - } - } - -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/CharacterMatcher.java b/sgx-jvm/avian/classpath/java/util/regex/CharacterMatcher.java deleted file mode 100644 index 0df1a947c6..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/CharacterMatcher.java +++ /dev/null @@ -1,332 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -/** - * A class to match classes of characters. - *

- * This class is intended to be the working horse behind character classes - * such as {@code [a-z]}. - *

- * @author Johannes Schindelin - */ -class CharacterMatcher { - private boolean[] map; - private boolean inversePattern; - - public static CharacterMatcher parse(String description) { - return parse(description.toCharArray()); - } - - public static CharacterMatcher parse(char[] description) { - Parser parser = new Parser(description); - CharacterMatcher result = parser.parseClass(); - if (parser.getEndOffset() != description.length) { - throw new RuntimeException("Short character class @" - + parser.getEndOffset() + ": " + new String(description)); - } - return result; - } - - public boolean matches(char c) { - int index = c; - return (map.length > index && map[index]) ^ inversePattern; - } - - public String toString() { - StringBuilder builder = new StringBuilder(); - builder.append("["); - if (inversePattern) { - builder.append("^"); - } - for (int i = 0; i < map.length; ++ i) { - if (!map[i]) { - continue; - } - builder.append(i >= ' ' && i <= 0x7f ? - "" + (char)i : ("\\x" + Integer.toHexString(i))); - int j = i + 1; - while (j < map.length && map[j]) { - ++ j; - } - -- j; - if (j > i) { - if (j > i + 1) { - builder.append('-'); - } - builder.append(j >= ' ' && j <= 0x7f ? - "" + (char)j : ("\\x" + Integer.toHexString(j))); - i = j; - } - } - builder.append("]"); - return builder.toString(); - } - - private static String specialClass(int c) { - if ('d' == c) { - return "[0-9]"; - } - if ('D' == c) { - return "[^0-9]"; - } - if ('s' == c) { - return "[ \\t\\n\\x0B\\f\\r]"; - } - if ('S' == c) { - return "[^ \\t\\n\\x0B\\f\\r]"; - } - if ('w' == c) { - return "[a-zA-Z_0-9]"; - } - if ('W' == c) { - return "[^a-zA-Z_0-9]"; - } - return null; - } - - private CharacterMatcher(boolean[] map, boolean inversePattern) { - this.map = map; - this.inversePattern = inversePattern; - } - - private void setMatch(int c) { - ensureCapacity(c + 1); - map[c] = true; - } - - private void ensureCapacity(int length) { - if (map.length >= length) { - return; - } - int size = map.length; - if (size < 32) { - size = 32; - } - while (size < length) { - size <<= 1; - } - map = java.util.Arrays.copyOf(map, size); - } - - private void merge(CharacterMatcher other) { - boolean inversePattern = this.inversePattern || other.inversePattern; - if ((map.length < other.map.length) ^ inversePattern) { - map = java.util.Arrays.copyOf(map, other.map.length); - } - for (int i = 0; i < map.length; ++ i) { - map[i] = (matches((char)i) || other.matches((char)i)) ^ inversePattern; - } - this.inversePattern = inversePattern; - } - - private void intersect(CharacterMatcher other) { - boolean inversePattern = this.inversePattern && other.inversePattern; - if ((map.length > other.map.length) ^ inversePattern) { - map = java.util.Arrays.copyOf(map, other.map.length); - } - for (int i = 0; i < map.length; ++ i) { - map[i] = (matches((char)i) && other.matches((char)i)) ^ inversePattern; - } - this.inversePattern = inversePattern; - } - - static class Parser { - private final char[] description; - private int offset; - - public Parser(char[] description) { - this.description = description; - } - - public int getEndOffset() { - return offset; - } - - /** - * Parses an escaped character. - * - * @param start the offset after the backslash - * @return the escaped character, or -1 if no character was recognized - */ - public int parseEscapedCharacter(int start) { - offset = start; - return parseEscapedCharacter(); - } - - private int parseEscapedCharacter() { - if (offset == description.length) { - throw new IllegalArgumentException("Short escaped character"); - } - char c = description[offset++]; - if (c == '0') { - int len = digits(offset, 3, 8); - if (len == 3 && description[offset] > '3') { - --len; - } - c = (char)Integer.parseInt(new String(description, offset, len), 8); - offset += len; - return c; - } - if (c == 'x' || c == 'u') { - int len = digits(offset, 4, 16); - c = (char)Integer.parseInt(new String(description, offset, len), 16); - offset += len; - return c; - } - switch (c) { - case 'a': - return 0x0007; - case 'e': - return 0x001B; - case 'f': - return 0x000C; - case 'n': - return 0x000A; - case 'r': - return 0x000D; - case 't': - return 0x0009; - case '\\': - case '.': - case '*': - case '+': - case '?': - case '|': - case '[': - case ']': - case '{': - case '}': - case '(': - case ')': - case '^': - case '$': - return c; - } - return -1; - } - - public int digits(int offset, int maxLength, int base) { - for (int i = 0; ; ++i) { - if (i == maxLength || offset + i >= description.length) { - return i; - } - int value = description[offset + i] - '0'; - if (value < 0) { - return i; - } - if (base > 10 && value >= 10) { - value += 10 - (value >= 'a' - '0' ? 'a' - '0' : 'A' - '0'); - } - if (value >= base) { - return i; - } - } - } - - public CharacterMatcher parseClass(int start) { - offset = start; - return parseClass(); - } - - public CharacterMatcher parseClass() { - if (description[offset] != '[') { - if (description[offset] == '\\') { - String range = specialClass(description[++ offset]); - if (range != null) { - ++ offset; - return CharacterMatcher.parse(range); - } - } - return null; - } - CharacterMatcher matcher = new CharacterMatcher(new boolean[0], - description[++ offset] == '^'); - if (matcher.inversePattern) { - ++ offset; - } - - int previous = -1; - boolean firstCharacter = true; - for (;;) { - if (offset >= description.length) { - unsupported("short regex"); - } - char c = description[offset++]; - if (c == '-' && !firstCharacter && description[offset] != ']') { - if (previous < 0) { - unsupported("invalid range"); - } - int rangeEnd = description[offset]; - if ('\\' == rangeEnd) { - rangeEnd = parseEscapedCharacter(); - if (rangeEnd < 0) { - unsupported("invalid range"); - } - } - matcher.ensureCapacity(rangeEnd + 1); - for (int j = previous + 1; j <= rangeEnd; j++) { - matcher.map[j] = true; - } - } else if (c == '\\') { - int saved = offset; - previous = parseEscapedCharacter(); - if (previous < 0) { - offset = saved - 1; - CharacterMatcher clazz = parseClass(); - if (clazz == null) { - unsupported("escape"); - } - matcher.merge(clazz); - } else { - matcher.setMatch(previous); - } - } else if (c == '[') { - Parser parser = new Parser(description); - CharacterMatcher other = parser.parseClass(offset - 1); - if (other == null) { - unsupported("invalid merge"); - } - matcher.merge(other); - offset = parser.getEndOffset(); - previous = -1; - } else if (c == '&') { - if (offset + 2 > description.length || description[offset] != '&' - || description[offset + 1] != '[') { - unsupported("operation"); - } - Parser parser = new Parser(description); - CharacterMatcher other = parser.parseClass(offset + 1); - if (other == null) { - unsupported("invalid intersection"); - } - matcher.intersect(other); - offset = parser.getEndOffset(); - previous = -1; - } else if (c == ']') { - break; - } else { - previous = c; - matcher.setMatch(previous); - } - firstCharacter = false; - } - - return matcher; - } - - private void unsupported(String msg) throws UnsupportedOperationException { - throw new UnsupportedOperationException("Unsupported " + msg + " @" - + offset + ": " - + new String(description, 0, description.length)); - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/Compiler.java b/sgx-jvm/avian/classpath/java/util/regex/Compiler.java deleted file mode 100644 index 4e495a5f80..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/Compiler.java +++ /dev/null @@ -1,533 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -import java.util.ArrayList; -import java.util.Stack; - -/** - * Compiles regular expressions into {@link PikeVM}s. - * - * @author Johannes Schindelin - */ -class Compiler implements PikeVMOpcodes { - private final static CharacterMatcher regularCharacter = - CharacterMatcher.parse("[^\\\\.*+?|\\[\\]{}()^$]"); - - private static class Output { - private int[] program; - private int offset; - private int groupCount = -1; - private int findPreambleSize; - private ArrayList classes; - private ArrayList lookarounds; - - public Output(Expression expr) { - // try-run to determine the code size - expr.writeCode(this); - program = new int[offset]; - offset = 0; - groupCount = -1; - classes = new ArrayList(); - lookarounds = new ArrayList(); - // write it out! - expr.writeCode(this); - } - - public void add(int opcode) { - if (program != null) { - program[offset] = opcode; - } - offset++; - } - - public int markJump() { - return offset++; - } - - public void setJump(int mark) { - if (program != null) { - program[mark] = offset; - } - } - - public void markFindPreambleEnd() { - findPreambleSize = offset; - } - - public PikeVM toVM() { - CharacterMatcher[] classes = new CharacterMatcher[this.classes.size()]; - this.classes.toArray(classes); - PikeVM[] lookarounds = new PikeVM[this.lookarounds.size()]; - this.lookarounds.toArray(lookarounds); - return new PikeVM(program, findPreambleSize, groupCount, classes, - lookarounds); - } - - public int addClass(CharacterMatcher characterClass) { - if (program == null) { - return -1; - } - int result = classes.size(); - classes.add(characterClass); - return result; - } - - public int addLookaround(PikeVM lookaround) { - if (program == null) { - return -1; - } - int result = lookarounds.size(); - lookarounds.add(lookaround); - return result; - } - } - - private abstract class Expression { - protected abstract void writeCode(Output output); - } - - private class CharacterRange extends Expression { - private final CharacterMatcher characterClass; - - public CharacterRange(CharacterMatcher characterClass) { - this.characterClass = characterClass; - } - - protected void writeCode(Output output) { - output.add(CHARACTER_CLASS); - output.add(output.addClass(characterClass)); - } - - public String toString() { - return characterClass.toString(); - } - } - - private class Repeat extends Expression { - private Expression expr; - private int minCount, maxCount; - private boolean greedy; - - public Repeat(Expression expr, int minCount, int maxCount, boolean greedy) { - if (minCount < 0) { - throw new RuntimeException("Unexpected min count: " + minCount); - } - if (maxCount != -1) { - if (maxCount == 0) { - throw new RuntimeException("Unexpected max count: " + maxCount); - } - if (minCount > maxCount) { - throw new RuntimeException("Unexpected range: " + minCount + ", " + maxCount); - } - } - this.expr = expr; - this.minCount = minCount; - this.maxCount = maxCount; - this.greedy = greedy; - } - - protected void writeCode(Output output) { - int start = output.offset; - int splitJmp = greedy ? SPLIT_JMP : SPLIT; - int split = greedy ? SPLIT : SPLIT_JMP; - for (int i = 1; i < minCount; ++ i) { - expr.writeCode(output); - } - if (maxCount == -1) { - if (minCount > 0) { - int jump = output.offset; - expr.writeCode(output); - output.add(splitJmp); - output.add(jump); - } else { - output.add(split); - int jump = output.markJump(); - expr.writeCode(output); - output.add(splitJmp); - output.add(start + 2); - output.setJump(jump); - } - } else { - if (minCount > 0) { - expr.writeCode(output); - } - if (maxCount > minCount) { - int[] jumps = new int[maxCount - minCount]; - for (int i = 0; i < jumps.length; ++ i) { - output.add(split); - jumps[i] = output.markJump(); - expr.writeCode(output); - } - for (int jump : jumps) { - output.setJump(jump); - } - } - } - } - - public String toString() { - String qualifier = greedy ? "" : "?"; - if (minCount == 0 && maxCount < 2) { - return expr.toString() + (minCount < 0 ? "*" : "?") + qualifier; - } - if (minCount == 1 && maxCount < 0) { - return expr.toString() + "+" + qualifier; - } - return expr.toString() + "{" + minCount + "," - + (maxCount < 0 ? "" : "" + maxCount) + "}" + qualifier; - } - } - - private class Group extends Expression { - private final boolean capturing; - - private ArrayList list = new ArrayList(); - private ArrayList alternatives; - - public Group(boolean capturing, ArrayList initialList) { - this.capturing = capturing; - if (initialList != null) { - list.addAll(initialList); - } - } - - public void push(Expression expr) { - list.add(expr); - } - - public void push(final int c) { - push(new Expression() { - public void writeCode(Output output) { - output.add(c); - } - - public String toString() { - if (c >= 0) { - return "" + (char)c; - } - switch (c) { - case DOT: - return "."; - case WORD_BOUNDARY: - return "\\b"; - case NON_WORD_BOUNDARY: - return "\\B"; - case LINE_START: - return "^"; - case LINE_END: - return "$"; - default: - throw new RuntimeException("Unhandled opcode: " + c); - } - } - }); - } - - public void startAlternative() { - if (alternatives == null) { - alternatives = new ArrayList(); - } - alternatives.add(new Group(false, list)); - list.clear(); - } - - public Expression pop() { - Expression result = list.remove(list.size() - 1); - return result; - } - - protected void writeCode(Output output) { - int groupIndex = -1; - if (capturing) { - groupIndex = ++ output.groupCount; - output.add(SAVE_OFFSET); - output.add(2 * groupIndex); - } - int[] jumps = null; - if (alternatives != null) { - jumps = new int[alternatives.size()]; - int i = 0; - for (Group alternative : alternatives) { - output.add(SPLIT); - int jump = output.markJump(); - alternative.writeCode(output); - output.add(JMP); - jumps[i++] = output.markJump(); - output.setJump(jump); - } - } - for (Expression expr : list) { - expr.writeCode(output); - } - if (jumps != null) { - for (int jump : jumps) { - output.setJump(jump); - } - } - if (capturing) { - output.add(SAVE_OFFSET); - output.add(2 * groupIndex + 1); - } - } - - public String toString() { - StringBuilder builder = new StringBuilder(); - if (alternatives != null || list.size() > 1) { - builder.append('('); - if (!capturing) { - builder.append("?:"); - } - } - if (alternatives != null) { - for (Group alternative : alternatives) { - builder.append(alternative).append('|'); - } - } - for (Expression expr : list) { - builder.append(expr); - } - if (alternatives != null || list.size() > 1) { - builder.append(')'); - } - return builder.toString(); - } - } - - private class Lookaround extends Expression { - private final Group group = new Group(false, null); - private final boolean forward, negative; - - public Lookaround(boolean forward, boolean negative) { - this.forward = forward; - this.negative = negative; - } - - @Override - protected void writeCode(Output output) { - PikeVM vm = new Output(group).toVM(); - if (!forward) { - vm.reverse(); - } - output.add(forward ? - (negative ? NEGATIVE_LOOKAHEAD : LOOKAHEAD) : - (negative ? NEGATIVE_LOOKAHEAD : LOOKBEHIND)); - output.add(output.addLookaround(vm)); - } - - public String toString() { - String inner = group.toString(); - if (inner.startsWith("(?:")) { - inner = inner.substring(3); - } else { - inner += ")"; - } - return "(?=" + inner; - } - } - - private class Group0 extends Expression { - private final Group group; - - public Group0() { - group = new Group(true, null); - } - - public void writeCode(Output output) { - // find() preamble - int start = output.offset; - output.add(SPLIT_JMP); - output.add(start + 5); - output.add(DOTALL); - output.add(SPLIT); - output.add(start + 2); - output.markFindPreambleEnd(); - group.writeCode(output); - } - - public String toString() { - String inner = group.toString(); - return inner.startsWith("(?:") && inner.endsWith(")") ? - inner.substring(1, inner.length() - 1) : inner; - } - } - - private Group0 root; - private Stack groups; - - public Compiler() { - root = new Group0(); - groups = new Stack(); - groups.add(root.group); - } - - public Pattern compile(String regex) { - char[] array = regex.toCharArray(); - CharacterMatcher.Parser characterClassParser = - new CharacterMatcher.Parser(array); - for (int index = 0; index < array.length; ++ index) { - char c = array[index]; - Group current = groups.peek(); - if (regularCharacter.matches(c)) { - current.push(c); - continue; - } - switch (c) { - case '.': - current.push(DOT); - continue; - case '\\': - int unescaped = characterClassParser.parseEscapedCharacter(index + 1); - if (unescaped >= 0) { - index = characterClassParser.getEndOffset() - 1; - current.push((char)unescaped); - continue; - } - CharacterMatcher characterClass = characterClassParser.parseClass(index); - if (characterClass != null) { - index = characterClassParser.getEndOffset() - 1; - current.push(new CharacterRange(characterClass)); - continue; - } - switch (array[index + 1]) { - case 'b': - index++; - current.push(WORD_BOUNDARY); - continue; - case 'B': - index++; - current.push(NON_WORD_BOUNDARY); - continue; - } - throw new RuntimeException("Parse error @" + index + ": " + regex); - case '?': - case '*': - case '+': { - boolean greedy = true; - if (index + 1 < array.length && array[index + 1] == '?') { - greedy = false; - ++ index; - } - current.push(new Repeat(current.pop(), - c == '+' ? 1 : 0, c == '?' ? 1 : -1, greedy)); - continue; - } - case '{': { - ++ index; - int length = characterClassParser.digits(index, 8, 10); - int min = Integer.parseInt(regex.substring(index, index + length)); - int max = min; - index += length - 1; - c = index + 1 < array.length ? array[index + 1] : 0; - if (c == ',') { - ++ index; - length = characterClassParser.digits(index + 1, 8, 10); - max = length == 0 ? -1 : - Integer.parseInt(regex.substring(index + 1, index + 1 + length)); - index += length; - c = index + 1< array.length ? array[index + 1] : 0; - } - if (c != '}') { - throw new RuntimeException("Invalid quantifier @" + index + ": " - + regex); - } - ++ index; - boolean greedy = true; - if (index + 1 < array.length && array[index + 1] == '?') { - ++ index; - greedy = false; - } - current.push(new Repeat(current.pop(), min, max, greedy)); - continue; - } - case '(': { - boolean capturing = true; - if (index + 1 < array.length && array[index + 1] == '?') { - index += 2; - if (index >= array.length) { - throw new RuntimeException("Short pattern @" + index + ": " - + regex); - } - c = array[index]; - boolean lookAhead = true; - if (c == '<') { - if (++ index >= array.length) { - throw new RuntimeException("Short pattern @" + index + ": " - + regex); - } - lookAhead = false; - c = array[index]; - if (c != '=' && c != '!') { - throw new IllegalArgumentException("Named groups not supported @" - + index + ": " + regex); - } - } - switch (c) { - case ':': - capturing = false; - break; - case '!': - case '=': { - capturing = false; - Lookaround lookaround = new Lookaround(lookAhead, c == '!'); - current.push(lookaround); - groups.push(lookaround.group); - continue; - } - default: - throw new UnsupportedOperationException("Not yet supported: " - + regex.substring(index)); - } - } - current.push(groups.push(new Group(capturing, null))); - continue; - } - case ')': - if (groups.size() < 2) { - throw new RuntimeException("Invalid group close @" + index + ": " - + regex); - } - groups.pop(); - continue; - case '[': { - CharacterMatcher matcher = characterClassParser.parseClass(index); - if (matcher == null) { - throw new RuntimeException("Invalid range @" + index + ": " + regex); - } - current.push(new CharacterRange(matcher)); - index = characterClassParser.getEndOffset() - 1; - continue; - } - case '|': - current.startAlternative(); - continue; - case '^': - current.push(LINE_START); - continue; - case '$': - current.push(LINE_END); - continue; - default: - throw new RuntimeException("Parse error @" + index + ": " + regex); - } - } - if (groups.size() != 1) { - throw new IllegalArgumentException("Unclosed groups: (" - + (groups.size() - 1) + "): " + regex); - } - PikeVM vm = new Output(root).toVM(); - String plain = vm.isPlainString(); - if (plain != null) { - return new TrivialPattern(regex, plain, 0); - } - return new RegexPattern(regex, 0, vm); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/Matcher.java b/sgx-jvm/avian/classpath/java/util/regex/Matcher.java deleted file mode 100644 index a192942e02..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/Matcher.java +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -/** - * This is a work in progress. - * - * @author zsombor and others - */ -public abstract class Matcher { - protected CharSequence input; - protected int start; - protected int end; - - public Matcher(CharSequence input) { - reset(input); - } - - public abstract boolean matches(); - - public boolean find() { - return find(end); - } - - public abstract boolean find(int start); - - public Matcher reset() { - return reset(input); - } - - public Matcher reset(CharSequence input) { - this.input = input; - start = 0; - end = 0; - return this; - } - - public String replaceAll(String replacement) { - return replace(replacement, Integer.MAX_VALUE); - } - - public String replaceFirst(String replacement) { - return replace(replacement, 1); - } - - protected String replace(String replacement, int limit) { - reset(); - - StringBuilder sb = null; - int index = 0; - int count = 0; - while (count < limit && index < input.length()) { - if (find(index)) { - if (sb == null) { - sb = new StringBuilder(); - } - if (start > index) { - sb.append(input.subSequence(index, start)); - } - sb.append(replacement); - index = end; - ++ count; - } else if (index == 0) { - return input.toString(); - } else { - break; - } - } - if (index < input.length()) { - sb.append(input.subSequence(index, input.length())); - } - return sb.toString(); - } - - public int start() { - return start; - } - - public int end() { - return end; - } - - public String group() { - return input.subSequence(start, end).toString(); - } - - public int start(int group) { - if (group == 0) { - return start(); - } - throw new UnsupportedOperationException(); - } - - public int end(int group) { - if (group == 0) { - return end(); - } - throw new UnsupportedOperationException(); - } - - public String group(int group) { - if (group == 0) { - return group(); - } - throw new UnsupportedOperationException(); - } - - public int groupCount() { - return 0; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/Pattern.java b/sgx-jvm/avian/classpath/java/util/regex/Pattern.java deleted file mode 100644 index 299de7ab8e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/Pattern.java +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -import java.util.ArrayList; -import java.util.List; - -/** - * This is a work in progress. - * - * @author zsombor and others - * - */ -public abstract class Pattern implements PikeVMOpcodes { - - public static final int UNIX_LINES = 1; - public static final int CASE_INSENSITIVE = 2; - public static final int COMMENTS = 4; - public static final int MULTILINE = 8; - public static final int LITERAL = 16; - public static final int DOTALL = 32; - public static final int UNICODE_CASE = 64; - public static final int CANON_EQ = 128; - - private final int patternFlags; - private final String pattern; - - protected Pattern(String pattern, int flags) { - this.pattern = pattern; - this.patternFlags = flags; - } - - public static Pattern compile(String regex) { - return compile(regex, 0); - } - - public static Pattern compile(String regex, int flags) { - if (flags != 0) { - throw new UnsupportedOperationException("TODO"); - } - return new Compiler().compile(regex); - } - - public int flags() { - return patternFlags; - } - - public abstract Matcher matcher(CharSequence input); - - public static boolean matches(String regex, CharSequence input) { - return Pattern.compile(regex).matcher(input).matches(); - } - - public String pattern() { - return pattern; - } - - public String[] split(CharSequence input) { - return split(input, 0); - } - - public String[] split(CharSequence input, int limit) { - if (limit <= 0) { - limit = Integer.MAX_VALUE; - } - Matcher matcher = matcher(input); - List result = new ArrayList(); - int offset = 0; - for (;;) { - if (result.size() >= limit || !matcher.find()) { - break; - } - result.add(input.subSequence(offset, matcher.start()).toString()); - offset = matcher.end(); - } - if (offset == 0 || offset < input.length()) { - result.add(input.subSequence(offset, input.length()).toString()); - } - return result.toArray(new String[result.size()]); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/PikeVM.java b/sgx-jvm/avian/classpath/java/util/regex/PikeVM.java deleted file mode 100644 index b364aecaa6..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/PikeVM.java +++ /dev/null @@ -1,629 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -/** - * A minimal implementation of a regular expression engine. - * - * @author Johannes Schindelin - */ -class PikeVM implements PikeVMOpcodes { - private final int[] program; - private final int groupCount; - private final int offsetsCount; - /* - * For find(), we do not want to anchor the match at the start offset. Our - * compiler allows this by prefixing the code with an implicit '(?:.*?)'. For - * regular matches() calls, we want to skip that code and start at {@code - * findPrefixLength} instead. - */ - private final int findPrefixLength; - private final CharacterMatcher[] classes; - private final PikeVM[] lookarounds; - private final static CharacterMatcher wordCharacter = - CharacterMatcher.parse("\\w"); - private final static CharacterMatcher lineTerminator = - CharacterMatcher.parse("[\n\r\u0085\u2028\u2029]"); - private boolean multiLine; - - public interface Result { - void set(int[] start, int[] end); - } - - protected PikeVM(int[] program, int findPrefixLength, int groupCount, - CharacterMatcher[] classes, PikeVM[] lookarounds) - { - this.program = program; - this.findPrefixLength = findPrefixLength; - this.groupCount = groupCount; - offsetsCount = 2 * groupCount + 2; - this.classes = classes; - this.lookarounds = lookarounds; - } - - /** - * The current thread states. - *

- * The threads are identified by their program counter. The rationale: as all - * threads are executed in lock-step, i.e. for the same character in the - * string to be matched, it does not make sense for two threads to be at the - * same program counter -- they would both do exactly the same for the rest of - * the execution. - *

- *

- * For efficiency, the threads are kept in a linked list that actually lives - * in an array indexed by the program counter, pointing to the next thread's - * program counter, in the order of high to low priority. - *

- *

- * Program counters which have no thread associated thread are marked as -1. - * The program counter associated with the least-priority thread (the last one - * in the linked list) is marked as -2 to be able to tell it apart from - * unscheduled threads. - *

- *

- * We actually never need to have an explicit value for the priority, the - * ordering is sufficient: whenever a new thread is to be scheduled and it is - * found to be scheduled already, it was already scheduled by a - * higher-priority thread. - *

- */ - private class ThreadQueue { - private int head, tail; - // next[pc] is 1 + the next thread's pc - private int[] next; - // offsets[pc][2 * group] is 1 + start offset - private int[][] offsets; - - public ThreadQueue() { - head = tail = -1; - next = new int[program.length + 1]; - offsets = new int[program.length + 1][]; - } - - public ThreadQueue(int startPC) { - head = tail = startPC; - next = new int[program.length + 1]; - offsets = new int[program.length + 1][]; - offsets[head] = new int[offsetsCount]; - } - - public int queueOneImmediately(ThreadQueue into) { - for (;;) { - if (head < 0) { - return -1; - } - boolean wasQueued = queueNext(head, head, into); - int pc = head; - if (head == tail) { - head = tail = -1; - } else { - head = next[pc] - 1; - next[pc] = 0; - } - offsets[pc] = null; - if (wasQueued) { - into.tail = pc; - return pc; - } - } - } - - /** - * Schedules the instruction at {@code nextPC} to be executed immediately. - *

- * For non-matching steps (SPLIT, SAVE_STATE, etc) we need to schedule the - * corresponding program counter(s) to be handled right after this opcode, - * before advancing to the next character. - *

- *

- * To achieve this, we insert the program counter to-be-scheduled in the - * linked thread list at the current position, but only if it has not been - * scheduled yet: if it has, a higher-priority thread already reached that - * state. - *

- *

- * In contrast to {@link #queueNext(int, int, ThreadQueue)}, this method - * works on the current step's thread list. - *

- * - * @param currentPC - * the current program counter - * @param nextPC - * the program counter to schedule - * @param copyThreadState - * whether to spawn off a new thread - * @return whether the step was queued (i.e. no thread was queued for the - * same {@code nextPC} already) - */ - public boolean queueImmediately(int currentPC, int nextPC, - boolean copyThreadState) { - if (isScheduled(nextPC)) { - return false; - } - int[] offsets = this.offsets[currentPC]; - if (copyThreadState) { - offsets = java.util.Arrays.copyOf(offsets, offsetsCount); - } - if (currentPC == tail) { - tail = nextPC; - } else { - next[nextPC] = next[currentPC]; - } - this.offsets[nextPC] = offsets; - next[currentPC] = nextPC + 1; - return true; - } - - /** - * Schedules the instruction at {@code nextPC} to be executed in the next - * step. - *

- * This method advances the current thread to the next program counter, to - * be executed after reading the next character. - *

- * - * @param currentPC - * the current program counter - * @param nextPC - * the program counter to schedule - * @param next - * the thread state of the next step - * @return whether the step was queued (i.e. no thread was queued for the - * same {@code nextPC} already) - */ - private boolean queueNext(int currentPC, int nextPC, ThreadQueue next) { - if (next.tail < 0) { - next.head = nextPC; - } else if (next.isScheduled(nextPC)) { - return false; - } else { - next.next[next.tail] = nextPC + 1; - } - next.offsets[nextPC] = offsets[currentPC]; - next.tail = nextPC; - return true; - } - - public void saveOffset(int pc, int index, int offset) { - offsets[pc][index] = offset + 1; - } - - public void setResult(Result result) { - // copy offsets - int[] offsets = this.offsets[program.length]; - int[] groupStart = new int[groupCount + 1]; - int[] groupEnd = new int[groupCount + 1]; - for (int j = 0; j <= groupCount; ++j) { - groupStart[j] = offsets[2 * j] - 1; - groupEnd[j] = offsets[2 * j + 1] - 1; - } - result.set(groupStart, groupEnd); - } - - private void mustStartMatchAt(int start) { - int previous = -1; - for (int pc = head; pc >= 0; ) { - int nextPC = next[pc] - 1; - if (start + 1 == offsets[pc][0]) { - previous = pc; - } else { - next[pc] = 0; - offsets[pc] = null; - if (pc == tail) { - head = tail = -1; - } else if (previous < 0) { - head = nextPC; - } else { - next[previous] = 1 + nextPC; - } - } - pc = nextPC; - } - } - - private int startOffset(int pc) { - return offsets[pc][0] - 1; - } - - public boolean isEmpty() { - return head < 0; - } - - public boolean isScheduled(int pc) { - return pc == tail || next[pc] > 0; - } - - public int next(int pc) { - return pc < 0 ? head : next[pc] - 1; - } - - public void clean() { - for (int pc = head; pc >= 0; ) { - int nextPC = next[pc] - 1; - next[pc] = 0; - offsets[pc] = null; - pc = nextPC; - } - head = tail = -1; - } - } - - /** - * Executes the Pike VM defined by the program. - *

- * The idea is to execute threads in parallel, at each step executing them - * from the highest priority thread to the lowest one. In contrast to most - * regular expression engines, the Thompson/Pike one gets away with linear - * complexity because the string is matched from left to right, at each step - * executing a number of threads bounded by the length of the program: if two - * threads would execute at the same instruction pointer of the program, we - * need only consider the higher-priority one. - *

- *

- * This implementation is based on the description of Russ Cox. - *

- * - * @param characters - * the {@link String} to match - * @param start - * the start offset where to match - * @param length - * the end offset - * @param anchorStart - * whether the match must start at {@code start} - * @param anchorEnd - * whether the match must start at {@code end} - * @param result - * the {@link Matcher} to store the groups' offsets in, if successful - * @return whether a match was found - */ - public boolean matches(char[] characters, int start, int end, - boolean anchorStart, boolean anchorEnd, Result result) - { - ThreadQueue current = new ThreadQueue(); - ThreadQueue next = new ThreadQueue(); - - // initialize the first thread - int startPC = anchorStart ? findPrefixLength : 0; - ThreadQueue queued = new ThreadQueue(startPC); - - boolean foundMatch = false; - int step = end > start ? +1 : -1; - for (int i = start; i != end + step; i += step) { - if (queued.isEmpty()) { - // no threads left - return foundMatch; - } - - char c = i != end ? characters[i] : 0; - int pc = -1; - for (;;) { - pc = current.next(pc); - if (pc < 0) { - pc = queued.queueOneImmediately(current); - } - if (pc < 0) { - break; - } - - // pc == program.length is a match! - if (pc == program.length) { - if (anchorEnd && i != end) { - continue; - } - if (result == null) { - // only interested in a match, no need to go on - return true; - } - current.setResult(result); - - // now that we found a match, even higher-priority matches must match - // at the same start offset - if (!anchorStart) { - next.mustStartMatchAt(current.startOffset(pc)); - } - foundMatch = true; - break; - } - - int opcode = program[pc]; - switch (opcode) { - case DOT: - if (c != '\0' && c != '\r' && c != '\n') { - current.queueNext(pc, pc + 1, next); - } - break; - case DOTALL: - current.queueNext(pc, pc + 1, next); - break; - case WORD_BOUNDARY: - case NON_WORD_BOUNDARY: { - int i2 = i - step; - int c2 = i2 < 0 || i2 >= characters.length ? -1 : characters[i2]; - switch (opcode) { - case WORD_BOUNDARY: - if ((c2 < 0 || !wordCharacter.matches((char)c2))) { - if (wordCharacter.matches(c)) { - current.queueImmediately(pc, pc + 1, false); - } - } else if (i >= 0 && i < characters.length && - !wordCharacter.matches(c)) { - current.queueImmediately(pc, pc + 1, false); - } - break; - case NON_WORD_BOUNDARY: - if ((c2 < 0 || !wordCharacter.matches((char)c2))) { - if (i >= 0 && i < characters.length && - !wordCharacter.matches(c)) { - current.queueImmediately(pc, pc + 1, false); - } - } else if (wordCharacter.matches(c)) { - current.queueImmediately(pc, pc + 1, false); - } - break; - } - break; - } - case LINE_START: - if (i == 0 || (multiLine && - lineTerminator.matches(characters[i - 1]))) { - current.queueImmediately(pc, pc + 1, false); - } - break; - case LINE_END: - if (i == characters.length || (multiLine && - lineTerminator.matches(c))) { - current.queueImmediately(pc, pc + 1, false); - } - break; - case CHARACTER_CLASS: - if (classes[program[pc + 1]].matches(c)) { - current.queueNext(pc, pc + 2, next); - } - break; - case LOOKAHEAD: - if (lookarounds[program[pc + 1]].matches(characters, - i, characters.length, true, false, null)) { - current.queueImmediately(pc, pc + 2, false); - } - break; - case LOOKBEHIND: - if (lookarounds[program[pc + 1]].matches(characters, - i - 1, -1, true, false, null)) { - current.queueImmediately(pc, pc + 2, false); - } - break; - case NEGATIVE_LOOKAHEAD: - if (!lookarounds[program[pc + 1]].matches(characters, - i, characters.length, true, false, null)) { - current.queueImmediately(pc, pc + 2, false); - } - break; - case NEGATIVE_LOOKBEHIND: - if (!lookarounds[program[pc + 1]].matches(characters, - i - 1, -1, true, false, null)) { - current.queueImmediately(pc, pc + 2, false); - } - break; - /* immediate opcodes, i.e. thread continues within the same step */ - case SAVE_OFFSET: - if (result != null) { - int index = program[pc + 1]; - current.saveOffset(pc, index, i); - } - current.queueImmediately(pc, pc + 2, false); - break; - case SPLIT: - current.queueImmediately(pc, program[pc + 1], true); - current.queueImmediately(pc, pc + 2, false); - break; - case SPLIT_JMP: - current.queueImmediately(pc, pc + 2, true); - current.queueImmediately(pc, program[pc + 1], false); - break; - case JMP: - current.queueImmediately(pc, program[pc + 1], false); - break; - default: - if (program[pc] >= 0 && program[pc] <= 0xffff) { - if (c == (char)program[pc]) { - current.queueNext(pc, pc + 1, next); - } - break; - } - throw new RuntimeException("Invalid opcode: " + opcode - + " at pc " + pc); - } - } - // clean linked thread list (and states) - current.clean(); - - // prepare for next step - ThreadQueue swap = queued; - queued = next; - next = swap; - } - return foundMatch; - } - - /** - * Determines whether this machine recognizes a pattern without special - * operators. - *

- * In case that the regular expression is actually a plain string without any - * special operators, we can avoid using a full-blown Pike VM and instead fall - * back to using the much faster {@link TrivialPattern}. - *

- * - * @return the string to match, or null if the machine recognizes a - * non-trivial pattern - */ - public String isPlainString() { - // we expect the machine to start with the find preamble and SAVE_OFFSET 0 - // end with SAVE_OFFSET 1 - int start = findPrefixLength; - if (start + 1 < program.length && - program[start] == SAVE_OFFSET && program[start + 1] == 0) { - start += 2; - } - int end = program.length; - if (end > start + 1 && - program[end - 2] == SAVE_OFFSET && program[end - 1] == 1) { - end -= 2; - } - for (int i = start; i < end; ++ i) { - if (program[i] < 0) { - return null; - } - } - char[] array = new char[end - start]; - for (int i = start; i < end; ++ i) { - array[i - start] = (char)program[i]; - } - return new String(array); - } - - private static int length(int opcode) { - return opcode <= SINGLE_ARG_START && opcode >= SINGLE_ARG_END ? 2 : 1; - } - - private static boolean isJump(int opcode) { - return opcode <= SPLIT && opcode >= JMP; - } - - /** - * Reverses the program (effectively matching the reverse pattern). - *

- * It is a well-known fact that any regular expression can be reordered - * trivially into an equivalent regular expression to be applied in backward - * direction (coming in real handy for look-behind expressions). - *

- *

- * Example: instead of matching the sequence "aaaabb" with the pattern "a+b+", - * we can match the reverse sequence "bbaaaa" with the pattern "b+a+". - *

- *

- * One caveat: while the reverse pattern is equivalent in the sense that it - * matches if, and only if, the original pattern matches the forward - * direction, the same is not true for submatches. Consider the input "a" and - * the pattern "(a?)a?": when matching in forward direction the captured group - * is "a", while the backward direction will yield the empty string. For that - * reason, Java dictates that capturing groups in look-behind patterns are - * ignored. - *

- */ - public void reverse() { - reverse(findPrefixLength, program.length); - } - - /** - * Reverses a specific part of the program (to match in reverse direction). - *

- * This is the work-horse of {@link #reverse()}. - *

- *

- * To visualize the process of reversing a program, let's look at it as a - * directed graph (each jump is represented by an "X - * ", non-jumping steps are represented by a "o"s, arrows show the - * direction of the flow, SPLITs spawn two arrows): - * - *

-   * o -> X -> X -> o -> X    o -> o
-   * ^    |     \         \___^____^
-   *  \__/       \____________|
-   * 
- * - * The concept of reversing the program is easiest explained as following: if - * we insert auxiliary nodes "Y" for jump targets, the graph looks - * like this instead: - * - *
-   * Y -> o -> X -> X -> o -> X    Y -> o -> Y -> o
-   * ^         |     \         \___^_________^
-   *  \_______/       \____________|
-   * 
- * - * It is now obvious that reversing the program is equivalent to reversing all - * arrows, simply deleting all Xs and substituting each Y - * with a jump. Note that the reverse program will have the same number of - * JMP, but they will not be associated with the same arrows!: - * - *
-   * X <- o <- o    X <- o <- X <- o
-   * |    ^    ^____|________/
-   *  \__/ \_______/
-   * 
- * - *

- * @param start - * start reversing the program with this instruction - * @param end - * stop reversing at this instruction (this must be either an index - * aligned exactly with an instruction, or exactly - * {@code program.length}. - */ - private void reverse(int start, int end) { - // Pass 1: build the list of jump targets - int[] newJumps = new int[end + 1]; - boolean[] brokenArrows = new boolean[end + 1]; - for (int pc = start; pc < end; pc += length(program[pc])) { - if (isJump(program[pc])) { - int target = program[pc + 1]; - newJumps[pc + 1] = newJumps[target]; - newJumps[target] = pc + 1; - if (program[pc] == JMP) { - brokenArrows[pc + 2] = true; - } - } - } - - // Pass 2: determine mapped program counters - int[] mapping = new int[end]; - for (int pc = start, mappedPC = end; mappedPC > 0 - && pc < end; pc += length(program[pc])) { - for (int jump = newJumps[pc]; jump > 0; jump = newJumps[jump]) { - mappedPC -= 2; - } - if (!isJump(program[pc])) { - mappedPC -= length(program[pc]); - } - mapping[pc] = mappedPC; - } - - // Pass 3: write the new program - int[] reverse = new int[end]; - for (int pc = start, mappedPC = end; mappedPC > 0; - pc += length(program[pc])) { - boolean brokenArrow = brokenArrows[pc]; - for (int jump = newJumps[pc]; jump > 0; jump = newJumps[jump]) { - reverse[--mappedPC] = mapping[jump - 1]; - if (brokenArrow) { - reverse[--mappedPC] = JMP; - brokenArrow = false; - } else { - reverse[--mappedPC] = - program[jump - 1] == SPLIT_JMP ? SPLIT_JMP : SPLIT; - } - } - if (pc == end) { - break; - } - if (!isJump(program[pc])) { - for (int i = length(program[pc]); i-- > 0; ) { - reverse[--mappedPC] = program[pc + i]; - } - } - } - System.arraycopy(reverse, start, program, start, end - start); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/PikeVMOpcodes.java b/sgx-jvm/avian/classpath/java/util/regex/PikeVMOpcodes.java deleted file mode 100644 index 7558bf2736..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/PikeVMOpcodes.java +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -/** - * Opcodes for the Pike VM. - *

- * See {@link PikeVM}. - *

- * - * @author Johannes Schindelin - */ -interface PikeVMOpcodes { - final static int DOT = -1; - final static int DOTALL = -2; - - final static int WORD_BOUNDARY = -10; - final static int NON_WORD_BOUNDARY = -11; - final static int LINE_START = -12; - final static int LINE_END = -13; - - final static int CHARACTER_CLASS = -20; - - final static int LOOKAHEAD = -30; - final static int LOOKBEHIND = -31; - final static int NEGATIVE_LOOKAHEAD = -32; - final static int NEGATIVE_LOOKBEHIND = -33; - - final static int SAVE_OFFSET = -40; - - final static int SPLIT = -50; - final static int SPLIT_JMP = -51; // this split prefers to jump - final static int JMP = -52; - - final static int SINGLE_ARG_START = CHARACTER_CLASS; - final static int SINGLE_ARG_END = JMP; -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/RegexMatcher.java b/sgx-jvm/avian/classpath/java/util/regex/RegexMatcher.java deleted file mode 100644 index acd4f9fa7f..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/RegexMatcher.java +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -/** - * A minimal implementation of a regular expression matcher. - * - * @author Johannes Schindelin - */ -public class RegexMatcher extends Matcher { - private final PikeVM vm; - private char[] array; - int[] groupStart, groupEnd; - - RegexMatcher(PikeVM vm, CharSequence string) { - super(string); - this.vm = vm; - } - - private final PikeVM.Result adapter = new PikeVM.Result() { - public void set(int[] start, int[] end) { - RegexMatcher.this.start = start[0]; - RegexMatcher.this.end = end[0]; - RegexMatcher.this.groupStart = start; - RegexMatcher.this.groupEnd = end; - } - }; - - public Matcher reset() { - start = end = -1; - return this; - } - - public Matcher reset(CharSequence input) { - this.input = input; - array = input.toString().toCharArray(); - return reset(); - } - - public boolean matches() { - return vm.matches(array, 0, array.length, true, true, adapter); - } - - public boolean find() { - return find(end + (start == end ? 1 : 0)); - } - - public boolean find(int offset) { - return vm.matches(array, offset, array.length, false, false, adapter); - } - - public int start(int group) { - return groupStart[group]; - } - - public int end(int group) { - return groupEnd[group]; - } - - public String group(int group) { - int offset = start(group); - if (offset < 0) { - return null; - } - int length = end(group) - offset; - return new String(array, offset, length); - } - - public int groupCount() { - return groupStart.length - 1; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/RegexPattern.java b/sgx-jvm/avian/classpath/java/util/regex/RegexPattern.java deleted file mode 100644 index cd7dcc582e..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/RegexPattern.java +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -/** - * A minimal implementation of a regular expression engine. - *

- * Intended as a permissively-licensed drop-in replacement for Oracle JDK's - * regular expression engine, this class uses the Pike VM implemented in - * {@link PikeVM} to match regular expressions. - *

- *

- * The Pike VM not only has a nicer runtime performance than Oracle JDK's - * backtracking approach -- O(n*m) instead of O(2^m) where - * n is the length of the regular expression pattern (after normalizing - * {<n>} quantifiers) and m the length of the text to match against - * the pattern -- but also supports arbitrary-sized look-behinds. - *

- *

- * The current implementation supports all regular expression constructs - * supported by Oracle JDK's regular expression engine except for the following - * ones: - *

    - *
  • control characters: \cX
  • - *
  • extended character classes: \p{...}
  • - *
  • extended boundary matchers: \A,\G,\Z,\z
  • - *
  • possessive quantifiers: X?+
  • - *
  • back references: \<n>, \k<name>
  • - *
  • long escape: \Q, \E
  • - *
  • named groups: (?<name>X)
  • - *
  • flags: (?idmsuxU)
  • - *
  • independent, non-capturing group: (?>X)
  • - *
- *

- * - * @author Johannes Schindelin - */ -public class RegexPattern extends Pattern { - private PikeVM vm; - - public RegexMatcher matcher(CharSequence string) { - return new RegexMatcher(vm, string); - } - - RegexPattern(String regex, int flags, PikeVM vm) { - super(regex, flags); - this.vm = vm; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/regex/TrivialMatcher.java b/sgx-jvm/avian/classpath/java/util/regex/TrivialMatcher.java deleted file mode 100644 index ed4360bf8c..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/TrivialMatcher.java +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -/** - * This is a work in progress. - * - * @author zsombor and others - */ -class TrivialMatcher extends Matcher { - private final String pattern; - - TrivialMatcher(String pattern, CharSequence input) { - super(input); - this.pattern = pattern; - } - - public boolean matches() { - if (pattern.equals(input.toString())) { - start = 0; - end = input.length(); - return true; - } else { - return false; - } - } - - public boolean find(int start) { - String p = pattern; - int i = TrivialPattern.indexOf(input, p, start); - if (i >= 0) { - this.start = i; - this.end = i + p.length(); - return true; - } else { - return false; - } - } -} - diff --git a/sgx-jvm/avian/classpath/java/util/regex/TrivialPattern.java b/sgx-jvm/avian/classpath/java/util/regex/TrivialPattern.java deleted file mode 100644 index 5929375238..0000000000 --- a/sgx-jvm/avian/classpath/java/util/regex/TrivialPattern.java +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.regex; - -import java.util.Iterator; -import java.util.List; -import java.util.LinkedList; - -/** - * This is a work in progress. - * - * @author zsombor and others - * - */ -public class TrivialPattern extends Pattern { - - private final String unescaped; - - TrivialPattern(String pattern, String unescaped, int flags) { - super(pattern, flags); - this.unescaped = unescaped; - } - - public Matcher matcher(CharSequence input) { - return new TrivialMatcher(unescaped, input); - } - - public String[] split(CharSequence input, int limit) { - boolean strip; - if (limit < 0) { - strip = false; - limit = Integer.MAX_VALUE; - } else if (limit == 0) { - strip = true; - limit = Integer.MAX_VALUE; - } else { - strip = false; - } - - List list = new LinkedList(); - int index = 0; - int trailing = 0; - int patternLength = unescaped.length(); - while (index < input.length() && list.size() < limit - 1) { - int i; - if (patternLength == 0) { - if (list.size() == 0) { - i = 0; - } else { - i = index + 1; - } - } else { - i = indexOf(input, unescaped, index); - } - - if (i >= 0) { - if (patternLength != 0 && i == index) { - ++ trailing; - } else { - trailing = 0; - } - - list.add(input.subSequence(index, i)); - index = i + patternLength; - } else { - break; - } - } - - if (strip && index > 0 && index == input.length()) { - ++ trailing; - } else { - trailing = 0; - } - list.add(input.subSequence(index, input.length())); - - String[] result = new String[list.size() - trailing]; - int i = 0; - for (Iterator it = list.iterator(); - it.hasNext() && i < result.length; ++ i) - { - result[i] = it.next().toString(); - } - return result; - } - - static int indexOf(CharSequence haystack, CharSequence needle, int start) { - if (needle.length() == 0) return start; - - for (int i = start; i < haystack.length() - needle.length() + 1; ++i) { - int j = 0; - for (; j < needle.length(); ++j) { - if (haystack.charAt(i + j) != needle.charAt(j)) { - break; - } - } - if (j == needle.length()) { - return i; - } - } - - return -1; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/CRC32.java b/sgx-jvm/avian/classpath/java/util/zip/CRC32.java deleted file mode 100644 index cd587a4c71..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/CRC32.java +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -public class CRC32 { - private static final int Polynomial = 0x04C11DB7; - private static final int Width = 32; - private static final int Top = 1 << (Width - 1); - private static final int InitialRemainder = 0xFFFFFFFF; - private static final long ResultXor = 0xFFFFFFFFL; - - private static final int[] table = new int[256]; - - static { - for (int dividend = 0; dividend < 256; ++ dividend) { - int remainder = dividend << (Width - 8); - for (int bit = 8; bit > 0; --bit) { - remainder = ((remainder & Top) != 0) - ? (remainder << 1) ^ Polynomial - : (remainder << 1); - } - table[dividend] = remainder; - } - } - - private int remainder = InitialRemainder; - - public void reset() { - remainder = InitialRemainder; - } - - public void update(int b) { - remainder = table[reflect(b, 8) ^ (remainder >>> (Width - 8))] - ^ (remainder << 8); - } - - public void update(byte[] array, int offset, int length) { - for (int i = 0; i < length; ++i) { - update(array[offset + i] & 0xFF); - } - } - - public void update(byte[] array) { - update(array, 0, array.length); - } - - public long getValue() { - return (reflect(remainder, Width) ^ ResultXor) & 0xFFFFFFFFL; - } - - private static int reflect(int x, int n) { - int reflection = 0; - for (int i = 0; i < n; ++i) { - if ((x & 1) != 0) { - reflection |= (1 << ((n - 1) - i)); - } - x = (x >>> 1); - } - return reflection; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/DataFormatException.java b/sgx-jvm/avian/classpath/java/util/zip/DataFormatException.java deleted file mode 100644 index c5a7adbb22..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/DataFormatException.java +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -public class DataFormatException extends Exception { - public DataFormatException(String s) { - super(s); - } - - public DataFormatException() { - super(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/Deflater.java b/sgx-jvm/avian/classpath/java/util/zip/Deflater.java deleted file mode 100644 index 7a86294f77..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/Deflater.java +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -public class Deflater { - private static final int DEFAULT_LEVEL = 6; // default compression level (6 is default for gzip) - private static final int Z_OK = 0; - private static final int Z_STREAM_END = 1; - private static final int Z_NEED_DICT = 2; - -// static { -// System.loadLibrary("natives"); -// } - - private long peer; - private byte[] input; - private int offset; - private int length; - private boolean needDictionary; - private boolean finished; - private final boolean nowrap; - private boolean finish; - - public Deflater(int level, boolean nowrap) { - this.nowrap = nowrap; - peer = make(nowrap, level); - } - - public Deflater(int level) { - this(level, false); - } - - public Deflater() { - this(DEFAULT_LEVEL); - } - - private void check() { - if (peer == 0) { - throw new IllegalStateException(); - } - } - - private static native long make(boolean nowrap, int level); - - public boolean finished() { - return finished; - } - - public boolean needsDictionary() { - return needDictionary; - } - - public boolean needsInput() { - return getRemaining() == 0; - } - - public int getRemaining() { - return length; - } - - public void setLevel(int level) throws IllegalArgumentException { - if (level < 0 || level > 9) { - throw new IllegalArgumentException("Valid compression levels are 0-9"); - } - - dispose(peer); - peer = make(nowrap, level); - } - - public void setInput(byte[] input) { - setInput(input, 0, input.length); - } - - public void setInput(byte[] input, int offset, int length) { - this.input = input; - this.offset = offset; - this.length = length; - } - - public void reset() { - dispose(); - peer = make(nowrap, DEFAULT_LEVEL); - input = null; - offset = length = 0; - finish = false; - needDictionary = finished = false; - } - - public int deflate(byte[] output) { - return deflate(output, 0, output.length); - } - - public int deflate(byte[] output, int offset, int length) { - final int zlibResult = 0; - final int inputCount = 1; - final int outputCount = 2; - - if (peer == 0) { - throw new IllegalStateException(); - } - - if (input == null || output == null) { - throw new NullPointerException(); - } - - int[] results = new int[3]; - deflate(peer, - input, this.offset, this.length, - output, offset, length, finish, results); - - if (results[zlibResult] < 0) { - throw new AssertionError(); - } - - switch (results[zlibResult]) { - case Z_NEED_DICT: - needDictionary = true; - break; - - case Z_STREAM_END: - finished = true; - break; - } - - this.offset += results[inputCount]; - this.length -= results[inputCount]; - - return results[outputCount]; - } - - public void finish() { - finish = true; - } - - private static native void deflate - (long peer, - byte[] input, int inputOffset, int inputLength, - byte[] output, int outputOffset, int outputLength, - boolean finish, - int[] results); - - public void end() { - dispose(); - } - - public void dispose() { - if (peer != 0) { - dispose(peer); - peer = 0; - } - } - - private static native void dispose(long peer); -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/DeflaterOutputStream.java b/sgx-jvm/avian/classpath/java/util/zip/DeflaterOutputStream.java deleted file mode 100644 index dc6320fcbb..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/DeflaterOutputStream.java +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -import java.io.OutputStream; -import java.io.FilterOutputStream; -import java.io.IOException; - -public class DeflaterOutputStream extends FilterOutputStream { - protected final Deflater deflater; - protected final byte[] buffer; - - public DeflaterOutputStream(OutputStream out, Deflater deflater, int bufferSize) - { - super(out); - this.deflater = deflater; - this.buffer = new byte[bufferSize]; - } - - public DeflaterOutputStream(OutputStream out, Deflater deflater) { - this(out, deflater, 4 * 1024); - } - - public DeflaterOutputStream(OutputStream out) { - this(out, new Deflater()); - } - - public void write(int b) throws IOException { - byte[] buffer = new byte[1]; - buffer[0] = (byte)(b & 0xff); - write(buffer, 0, 1); - } - - public void write(byte[] b) throws IOException { - write(b, 0, b.length); - } - - public void write(byte[] b, int offset, int length) throws IOException { - // error condition checking - if (deflater.finished()) { - throw new IOException("Already at end of stream"); - } else if (offset < 0) { - throw new IndexOutOfBoundsException("Offset can't be less than zero"); - } else if (length < 0) { - throw new IndexOutOfBoundsException("Length can't be less than zero"); - } else if (b.length - (offset + length) < 0) { - throw new IndexOutOfBoundsException("Offset + Length is larger than the input byte array"); - } else if (length == 0) { - return; - } - - deflater.setInput(b, offset, length); - while (deflater.getRemaining() > 0) { - deflate(); - } - } - - private void deflate() throws IOException { - int len = deflater.deflate(buffer, 0, buffer.length); - if (len > 0) { - out.write(buffer, 0, len); - } - } - - public void close() throws IOException { - deflater.finish(); - while (! deflater.finished()) { - deflate(); - } - out.close(); - deflater.dispose(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/Inflater.java b/sgx-jvm/avian/classpath/java/util/zip/Inflater.java deleted file mode 100644 index 2c0b7e0466..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/Inflater.java +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -public class Inflater { - private static final int Z_OK = 0; - private static final int Z_STREAM_END = 1; - private static final int Z_NEED_DICT = 2; - -// static { -// System.loadLibrary("natives"); -// } - - private long peer; - private byte[] input; - private int offset; - private int length; - private boolean needDictionary; - private boolean finished; - private final boolean nowrap; - - public Inflater(boolean nowrap) { - this.nowrap = nowrap; - peer = make(nowrap); - } - - public Inflater() { - this(false); - } - - private void check() { - if (peer == 0) { - throw new IllegalStateException(); - } - } - - private static native long make(boolean nowrap); - - public boolean finished() { - return finished; - } - - public boolean needsDictionary() { - return needDictionary; - } - - public boolean needsInput() { - return getRemaining() == 0; - } - - public int getRemaining() { - return length; - } - - public void setInput(byte[] input) { - setInput(input, 0, input.length); - } - - public void setInput(byte[] input, int offset, int length) { - this.input = input; - this.offset = offset; - this.length = length; - } - - public void reset() { - dispose(); - peer = make(nowrap); - input = null; - offset = length = 0; - needDictionary = finished = false; - } - - public int inflate(byte[] output) throws DataFormatException { - return inflate(output, 0, output.length); - } - - public int inflate(byte[] output, int offset, int length) - throws DataFormatException - { - final int zlibResult = 0; - final int inputCount = 1; - final int outputCount = 2; - - if (peer == 0) { - throw new IllegalStateException(); - } - - if (input == null || output == null) { - throw new NullPointerException(); - } - - int[] results = new int[3]; - inflate(peer, input, this.offset, this.length, - output, offset, length, results); - - if (results[zlibResult] < 0) { - throw new DataFormatException(); - } - - switch (results[zlibResult]) { - case Z_NEED_DICT: - needDictionary = true; - break; - - case Z_STREAM_END: - finished = true; - break; - } - - this.offset += results[inputCount]; - this.length -= results[inputCount]; - - return results[outputCount]; - } - - private static native void inflate - (long peer, - byte[] input, int inputOffset, int inputLength, - byte[] output, int outputOffset, int outputLength, - int[] results); - - public void end() { - dispose(); - } - - public void dispose() { - if (peer != 0) { - dispose(peer); - peer = 0; - } - } - - private static native void dispose(long peer); -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/InflaterInputStream.java b/sgx-jvm/avian/classpath/java/util/zip/InflaterInputStream.java deleted file mode 100644 index fcefaec87b..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/InflaterInputStream.java +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -import java.io.InputStream; -import java.io.IOException; -import java.io.EOFException; - -public class InflaterInputStream extends InputStream { - private final InputStream in; - private final Inflater inflater; - private final byte[] buffer; - - public InflaterInputStream(InputStream in, Inflater inflater, int bufferSize) - { - this.in = in; - this.inflater = inflater; - this.buffer = new byte[bufferSize]; - } - - public InflaterInputStream(InputStream in, Inflater inflater) { - this(in, inflater, 4 * 1024); - } - - public InflaterInputStream(InputStream in) { - this(in, new Inflater()); - } - - public int read() throws IOException { - byte[] buffer = new byte[1]; - int c = read(buffer); - return (c < 0 ? c : (buffer[0] & 0xFF)); - } - - public int read(byte[] b, int offset, int length) throws IOException { - if (inflater.finished()) { - return -1; - } - - while (true) { - if (inflater.needsInput()) { - int count = in.read(buffer); - if (count > 0) { - inflater.setInput(buffer, 0, count); - } else { - throw new EOFException(); - } - } - - try { - int count = inflater.inflate(b, offset, length); - if (count > 0) { - return count; - } else if (inflater.needsDictionary()) { - throw new IOException("missing dictionary"); - } else if (inflater.finished()) { - return -1; - } - } catch (DataFormatException e) { - throw new IOException(e); - } - } - } - - public int available() throws IOException { - return inflater.finished() ? 0 : 1; - } - - public void close() throws IOException { - in.close(); - inflater.dispose(); - } -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/ZipEntry.java b/sgx-jvm/avian/classpath/java/util/zip/ZipEntry.java deleted file mode 100644 index f2a3ba09f6..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/ZipEntry.java +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -/** - * Class ZipEntry: - * - * Class to store and retrieve information for entries in a zip file - * Contains variables for all standard zip format field as well as - * setter and accessor methods - * - * "name" is used to store the string name of the entrys - * "reqVersion" stores a byte encoded minimum required version to open the zip - * "compressionMethod" stores the method used to compress the zip - * "modTimeDate" stores an MSDOS time field "millisTime" stores time in long format - * "crc" stores crc data for the zip entry - * "compSize" and "uncompSize" store compressed and uncompressed sizes - * "offset" stores data regarding the offset from the start of the zip file - * - * @author Christopher Jordan - * @author David Chau - * @author Aaron Davis - * @author Riley Moses - */ - -import java.util.Calendar; -import java.util.Date; - - -public class ZipEntry { - String name; - short reqVersion = -1; - short compressionMethod = -1; - int modTimeDate = -1; - long millisTime = -1; - int crc = -1; - long compSize = 0; - long uncompSize = 0; - int offset = -1; - - public ZipEntry(String name) { - this.name = name; - } - - //Method to return name of the file - public String getName() { - return name; - } - - //Method to check if file is a directory - public boolean isDirectory() { - return getName().endsWith("/"); - } - - /** - * Method setRequiredVersion: - * - * Method to set the minimum version required to open the zip file - * Valid values for the compression method are the numbers 1.0 to 10.0 - * - * @author Christopher Jordan - */ - private boolean setRequiredVersion(float versionFloat){ - //Check for valid version numbers - if (versionFloat < 1 || versionFloat > 100){ - return false; - } - - //Convert to short value for storage - versionFloat = versionFloat * 10; - short versionShort = (short)versionFloat; - - //Set value of version - reqVersion = versionShort; - return true; - } - - //Method to set the compression method for the file - //Valid methods are "stored" = 0 or "deflated" = 8 - public void setMethod(short compMethod){ - if (compMethod == 0 || compMethod == 8){ - this.compressionMethod = compMethod; - } - } - - public int getMethod(){ - return this.compressionMethod; - } - - //Methods to set and get the crc for the entry - public void setCrc(int crc){ - if (crc < 0 || crc > 0xffffffff){ - return; - } - else - this.crc = crc; - } - - public int getCrc(){ - return this.crc; - } - - //Methods to set and get the time and date - public void setTime(long currentTime){ - modTimeDate = computeDOSDateTime(currentTime); - millisTime = currentTime; - } - - public long getTime(){ - return millisTime; - } - - /** - * Method computeDOSDateTime(): - * - * Takes the time from a long and converts to a Calendar object - * - * Time is stored in the MSDOS format 5 bits for hour, 6 bits for min, 5 bits for seconds - * Hours are in military time and must be adjusted to time zone - * Seconds are divided by two before storing and must be multiplied by two to retrieve - * - * Date is stored in the MSDOS format 7 bit for year, 4 bit for month, 5 bits for day of month - * Year is the number of years since 1980 per, the month is stored starting at 0 - * for January. Day of month is stored with nature numbering - * - * Bit masks and shifting are used to build the time and date bytes - * - * @author Christopher Jordan - * @author Aaron Davis - **/ - private static int computeDOSDateTime(long currentTime){ - final int DAY_OF_MONTH = 5; - final int HOUR_OF_DAY = 11; - final int MINUTE = 12; - final int MONTH = 2; - final int SECOND = 13; - final int YEAR = 1; - - //Create calendar object, then set time to value passed in - Calendar modCalendar = Calendar.getInstance(); - modCalendar.setTime(new Date(currentTime)); - - //Hour - int timeBits = modCalendar.get(HOUR_OF_DAY); - timeBits = timeBits - 6; - timeBits = timeBits << 6; - - //Minutes - int minBits = 0x3f & (modCalendar.get(MINUTE));; - timeBits = timeBits ^ minBits; - timeBits = timeBits << 5; - - //Seconds - int secBits = 0x1f & (modCalendar.get(SECOND)); - secBits = secBits >> 1; //Divide by 2 - timeBits = timeBits ^ secBits; - - //Year - int dateBits = (modCalendar.get(YEAR) -1980); - dateBits = dateBits << 4; - - //Month - int month = 0xf & ((modCalendar.get(MONTH)) + 1); - dateBits = dateBits ^ month; - dateBits = dateBits << 5; - - //Day of month - int dayBits = 0x1f & modCalendar.get(DAY_OF_MONTH); - dateBits = dateBits ^ dayBits; - - //Store Date - int storeDate = ((dateBits << 16) ^ (timeBits)); - return storeDate; - } - - //Methods to set and get the uncompressed size of the entry - public void setSize(int size){ - if (size < 0){ - return; - } - else - uncompSize = size; - } - - public long getSize() { - return uncompSize; - } - - //Methods to set and get the compressed size of the entry - public void setCompressedSize(long size){ - if (size < 0){ - return; - } - else - compSize = size; - } - - public long getCompressedSize() { - return compSize; - } -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/ZipFile.java b/sgx-jvm/avian/classpath/java/util/zip/ZipFile.java deleted file mode 100644 index 17159ea7da..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/ZipFile.java +++ /dev/null @@ -1,389 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -import java.io.File; -import java.io.RandomAccessFile; -import java.io.InputStream; -import java.io.IOException; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.Map; -import java.util.HashMap; - -public class ZipFile { - private final RandomAccessFile file; - private final Window window; - private final Map index = new HashMap(); - - public ZipFile(String name) throws IOException { - file = new RandomAccessFile(name, "r"); - window = new Window(file, 4096); - - int fileLength = (int) file.length(); - int pointer = fileLength - 22; - byte[] magic = new byte[] { 0x50, 0x4B, 0x05, 0x06 }; - while (pointer > 0) { - if (equal(window.data, window.seek(pointer, magic.length), - magic, 0, magic.length)) - { - pointer = directoryOffset(window, pointer); - - magic = new byte[] { 0x50, 0x4B, 0x01, 0x02 }; - while (pointer < fileLength) { - if (equal(window.data, window.seek(pointer, magic.length), - magic, 0, magic.length)) - { - index.put(entryName(window, pointer), pointer); - pointer = entryEnd(window, pointer); - } else { - pointer = fileLength; - } - } - pointer = 0; - } else { - -- pointer; - } - } - } - - public ZipFile(File file) throws IOException { - this(file.getAbsolutePath()); - } - - public int size() { - return index.size(); - } - - protected Enumeration makeEnumeration - (EntryFactory factory) - { - return new MyEnumeration(factory, window, index.values().iterator()); - } - - public Enumeration entries() { - return makeEnumeration(ZipEntryFactory.Instance); - } - - protected ZipEntry getEntry(EntryFactory factory, String name) { - while (name.startsWith("/")) { - name = name.substring(1); - } - Integer pointer = index.get(name); - return (pointer == null ? null : factory.makeEntry(window, pointer)); - } - - public ZipEntry getEntry(String name) { - return getEntry(ZipEntryFactory.Instance, name); - } - - public InputStream getInputStream(ZipEntry entry) throws IOException { - final int pointer = ((MyEntry) entry).pointer(); - int method = compressionMethod(window, pointer); - int size = compressedSize(window, pointer); - InputStream in = new MyInputStream(file, fileData(window, pointer), size); - - final int Stored = 0; - final int Deflated = 8; - - switch (method) { - case Stored: - return in; - - case Deflated: - return new InflaterInputStream(in, new Inflater(true)) { - int remaining = uncompressedSize(window, pointer); - - public int read() throws IOException { - byte[] buffer = new byte[1]; - int c = read(buffer); - return (c < 0 ? c : (buffer[0] & 0xFF)); - } - - public int read(byte[] buffer) throws IOException { - return read(buffer, 0, buffer.length); - } - - public int read(byte[] buffer, int offset, int length) - throws IOException - { - int c = super.read(buffer, offset, length); - if (c > 0) { - remaining -= c; - } - return c; - } - - public int available() { - return remaining; - } - }; - - default: - throw new IOException(); - } - } - - private static boolean equal(byte[] a, int aOffset, byte[] b, int bOffset, - int size) - { - for (int i = 0; i < size; ++i) { - if (a[aOffset + i] != b[bOffset + i]) return false; - } - return true; - } - - private static int get2(Window w, int p) throws IOException { - int offset = w.seek(p, 2); - return - ((w.data[offset + 1] & 0xFF) << 8) | - ((w.data[offset ] & 0xFF) ); - } - - private static int get4(Window w, int p) throws IOException { - int offset = w.seek(p, 4); - return - ((w.data[offset + 3] & 0xFF) << 24) | - ((w.data[offset + 2] & 0xFF) << 16) | - ((w.data[offset + 1] & 0xFF) << 8) | - ((w.data[offset ] & 0xFF) ); - } - - private static int directoryOffset(Window w, int p) throws IOException { - return get4(w, p + 16); - } - - private static int entryNameLength(Window w, int p) throws IOException { - return get2(w, p + 28); - } - - protected static String entryName(Window w, int p) throws IOException { - int length = entryNameLength(w, p); - return new String(w.data, w.seek(p + 46, length), length); - } - - private static int compressionMethod(Window w, int p) throws IOException { - return get2(w, p + 10); - } - - protected static int compressedSize(Window w, int p) throws IOException { - return get4(w, p + 20); - } - - protected static int uncompressedSize(Window w, int p) throws IOException { - return get4(w, p + 24); - } - - private static int fileNameLength(Window w, int p) throws IOException { - return get2(w, p + 28); - } - - private static int extraFieldLength(Window w, int p) throws IOException { - return get2(w, p + 30); - } - - private static int commentFieldLength(Window w, int p) throws IOException { - return get2(w, p + 32); - } - - private static int entryEnd(Window w, int p) throws IOException { - final int HeaderSize = 46; - return p + HeaderSize - + fileNameLength(w, p) - + extraFieldLength(w, p) - + commentFieldLength(w, p); - } - - private static int fileData(Window w, int p) throws IOException { - int localHeader = localHeader(w, p); - final int LocalHeaderSize = 30; - return localHeader - + LocalHeaderSize - + localFileNameLength(w, localHeader) - + localExtraFieldLength(w, localHeader); - } - - private static int localHeader(Window w, int p) throws IOException { - return get4(w, p + 42); - } - - private static int localFileNameLength(Window w, int p) throws IOException { - return get2(w, p + 26); - } - - private static int localExtraFieldLength(Window w, int p) - throws IOException - { - return get2(w, p + 28); - } - - public void close() throws IOException { - file.close(); - } - - protected static class Window { - private final RandomAccessFile file; - public final byte[] data; - public int start; - public int length; - - public Window(RandomAccessFile file, int size) { - this.file = file; - data = new byte[size]; - } - - public int seek(int start, int length) throws IOException { - int fileLength = (int) file.length(); - - if (length > data.length) { - throw new IllegalArgumentException - ("length " + length + " greater than buffer length " + data.length); - } - - if (start < 0) { - throw new IllegalArgumentException("negative start " + start); - } - - if (start + length > fileLength) { - throw new IllegalArgumentException - ("end " + (start + length) + " greater than file length " + - fileLength); - } - - if (start < this.start || start + length > this.start + this.length) { - this.length = Math.min(data.length, fileLength); - this.start = start - ((this.length - length) / 2); - if (this.start < 0) { - this.start = 0; - } else if (this.start + this.length > fileLength) { - this.start = fileLength - this.length; - } - file.seek(this.start); - file.readFully(data, 0, this.length); - } - - return start - this.start; - } - } - - protected interface MyEntry { - public int pointer(); - } - - private static class MyZipEntry extends ZipEntry implements MyEntry { - public final Window window; - public final int pointer; - - public MyZipEntry(Window window, int pointer) { - super(null); - this.window = window; - this.pointer = pointer; - } - - public String getName() { - try { - return entryName(window, pointer); - } catch (IOException e) { - return null; - } - } - - public long getCompressedSize() { - try { - return compressedSize(window, pointer); - } catch (IOException e) { - return 0; - } - } - - public long getSize() { - try { - return uncompressedSize(window, pointer); - } catch (IOException e) { - return 0; - } - } - - public int pointer() { - return pointer; - } - } - - protected interface EntryFactory { - public ZipEntry makeEntry(Window window, int pointer); - } - - private static class ZipEntryFactory implements EntryFactory { - public static final ZipEntryFactory Instance = new ZipEntryFactory(); - - public ZipEntry makeEntry(Window window, int pointer) { - return new MyZipEntry(window, pointer); - } - } - - private static class MyEnumeration implements Enumeration { - private final EntryFactory factory; - private final Window window; - private final Iterator iterator; - - public MyEnumeration(EntryFactory factory, Window window, - Iterator iterator) - { - this.factory = factory; - this.window = window; - this.iterator = iterator; - } - - public boolean hasMoreElements() { - return iterator.hasNext(); - } - - public ZipEntry nextElement() { - return factory.makeEntry(window, iterator.next()); - } - } - - private static class MyInputStream extends InputStream { - private RandomAccessFile file; - private int offset; - private int length; - - public MyInputStream(RandomAccessFile file, int start, int length) { - this.file = file; - this.offset = start; - this.length = length; - } - - public int read() throws IOException { - byte[] b = new byte[1]; - int c = read(b); - return (c == -1 ? -1 : b[0] & 0xFF); - } - - public int read(byte[] b, int offset, int length) throws IOException { - if (this.length == 0) return -1; - - if (length > this.length) length = this.length; - - file.seek(this.offset); - file.readFully(b, offset, length); - - this.offset += length; - this.length -= length; - - return length; - } - - public void close() throws IOException { - file = null; - } - } -} diff --git a/sgx-jvm/avian/classpath/java/util/zip/ZipOutputStream.java b/sgx-jvm/avian/classpath/java/util/zip/ZipOutputStream.java deleted file mode 100644 index e5b929ac72..0000000000 --- a/sgx-jvm/avian/classpath/java/util/zip/ZipOutputStream.java +++ /dev/null @@ -1,246 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package java.util.zip; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.util.ArrayList; -import java.util.List; -import java.util.zip.CRC32; -import java.util.zip.DeflaterOutputStream; -import java.util.zip.Deflater; - - -/** - * An as simple as possible implementation of ZipOutputStream - * Compression method defaults to DEFLATE - * All hardcoded defaults match the defaults for openJDK, - * including PKZip version, bit flags set, compression level, etc - * - * @author David Chau - * @author Aaron Davis - * @author Christopher Jordan - * @author Riley Moses - * - */ -public class ZipOutputStream extends DeflaterOutputStream { - private static final int SIGNATURE = 0x04034b50; - private static final short VERSION = 0x0014; - private static final short BITFLAG = 0x0008; - private static final short METHOD = 0x0008; - private static final int CENTRAL_FILE_HEADER = 0x02014b50; - private static final int DATA_DESCRIPTER_HEADER = 0x08074b50; - private static final int END_OF_CENTRAL_DIRECTORY_SIG = 0x06054b50; - private static final int DEFAULT_LEVEL = 6; - - private static final int INPUT_BUFFER_SIZE = 1024; - - private List entries; - private CRC32 crc = new CRC32(); - private ZipEntry currentEntry; // holder for current entry - private int bytesWritten; // a counter for total bytes written - private int sizeOfCentralDirectory; // a counter for central dir size - - // these are used for the function write(int b) to provide a speed increase - private byte[] inputBuffer = new byte[INPUT_BUFFER_SIZE]; - private int bufferIndex; - - - public ZipOutputStream(OutputStream outStream) { - super(outStream, new Deflater(DEFAULT_LEVEL, true)); - bytesWritten = 0; - sizeOfCentralDirectory = 0; - entries = new ArrayList(); - } - - public void putNextEntry(ZipEntry e) throws IOException { - e.offset = bytesWritten; - currentEntry = e; - entries.add(e); - writeLocalHeader(e); - } - - public void closeEntry() throws IOException { - // write remainder of buffer if partially full - if (bufferIndex != 0) { - write(inputBuffer, 0, bufferIndex); - bufferIndex = 0; - } - - finish(); - - currentEntry.crc = (int) crc.getValue(); - crc.reset(); - writeDataDescriptor(currentEntry); - } - - @Override - public void write(byte[] b, int offset, int length) throws IOException { - if (offset < 0 || length < 0 || b.length - (offset + length) < 0) - throw new IndexOutOfBoundsException(); - - currentEntry.uncompSize += length; - crc.update(b, offset, length); - currentEntry.crc = (int) crc.getValue(); - - deflater.setInput(b, offset, length); - while (deflater.getRemaining() > 0) - deflate(); - } - - @Override - public void write(int b) throws IOException { - inputBuffer[bufferIndex] = (byte)(b & 0xff); - bufferIndex += 1; - if (bufferIndex == 1024) { - write(inputBuffer, 0, bufferIndex); - bufferIndex = 0; - } - } - - private void deflate() throws IOException { - int len = deflater.deflate(buffer, 0, buffer.length); - currentEntry.compSize += len; - bytesWritten += len; - if (len > 0) - out.write(buffer, 0, len); - } - - private void writeLocalHeader(ZipEntry e) throws IOException { - byte[] tmpBuffer = new byte[30]; - - addFourBytes(SIGNATURE, 0, tmpBuffer); // local header signature - addTwoBytes(VERSION, 4, tmpBuffer); // version used - addTwoBytes(BITFLAG, 6, tmpBuffer); // flags - addTwoBytes(METHOD, 8, tmpBuffer); // compression method - addFourBytes(e.modTimeDate, 10, tmpBuffer); // last mod date and time - addFourBytes(0, 14, tmpBuffer); // CRC is 0 for local header - - // with default flag settings (bit 3 set) the compressed and uncompressed size - // is written here as 0 and written correctly in the data descripter - addFourBytes(0, 18, tmpBuffer); // compressed size - addFourBytes(0, 22, tmpBuffer); // uncompressed size - addTwoBytes(e.name.length(), 26, tmpBuffer); // length of file name - - // extra field length, in this implementation extra field in not used - addTwoBytes(0, 28, tmpBuffer); - - out.write(tmpBuffer, 0, 30); - - // write file name, return the number of bytes written - int len = writeUTF8(e.getName()); - - bytesWritten += 30 + len; - } - - private void writeDataDescriptor(ZipEntry currentEntry) throws IOException { - byte[] tmpBuffer = new byte[16]; - - addFourBytes(DATA_DESCRIPTER_HEADER, 0, tmpBuffer); // data descripter header - addFourBytes(currentEntry.crc, 4, tmpBuffer); // crc value - addFourBytes((int)currentEntry.compSize, 8, tmpBuffer); // compressed size - addFourBytes((int)currentEntry.uncompSize, 12, tmpBuffer);// uncompressed size - out.write(tmpBuffer, 0, 16); - bytesWritten += 16; - } - - private void writeCentralDirectoryHeader(ZipEntry e) throws IOException { - byte[] tmpBuffer = new byte[46]; - - addFourBytes(CENTRAL_FILE_HEADER, 0, tmpBuffer); // central directory header signature - addTwoBytes(VERSION, 4, tmpBuffer); // version made by - addTwoBytes(VERSION, 6, tmpBuffer); // version needed - addTwoBytes(BITFLAG, 8, tmpBuffer); // flags - addTwoBytes(METHOD, 10, tmpBuffer); // compression method - - addFourBytes(e.modTimeDate, 12, tmpBuffer); // last mod date and time - addFourBytes(e.crc, 16, tmpBuffer); // crc - addFourBytes((int)e.compSize, 20, tmpBuffer); // compressed size - addFourBytes((int)e.uncompSize, 24, tmpBuffer); // uncompressed size - - addTwoBytes(e.getName().length(), 28, tmpBuffer); // file name length - - // the following 5 fields are all 0 for a simple default compression - addTwoBytes(0, 30, tmpBuffer); // extra field length (not used) - addTwoBytes(0, 32, tmpBuffer); // comment length (not used) - addTwoBytes(0, 34, tmpBuffer); // disk number start - addTwoBytes(0, 36, tmpBuffer); // internal file attribute - addFourBytes(0, 38, tmpBuffer); // external file attribute - - addFourBytes((int) e.offset, 42, tmpBuffer); // relative offset of local header - - out.write(tmpBuffer, 0, 46); - - int len = writeUTF8(e.getName()); - - bytesWritten += 46 + len; - sizeOfCentralDirectory += 46 + len; - } - - private void writeEndofCentralDirectory(int offset) throws IOException { - byte[] tmpBuffer = new byte[22]; - - short numEntries = (short) entries.size(); - addFourBytes(END_OF_CENTRAL_DIRECTORY_SIG, 0, tmpBuffer); // end of central directory signature - addTwoBytes(0, 4, tmpBuffer); // disk number - addTwoBytes(0, 6, tmpBuffer); // disk number where central dir starts - addTwoBytes(numEntries, 8, tmpBuffer); // number of entries on this disk - addTwoBytes(numEntries, 10, tmpBuffer); // number of entries in central dir - addFourBytes(sizeOfCentralDirectory, 12, tmpBuffer); // length of central directory - addFourBytes(offset, 16, tmpBuffer); // offset of central directory - addTwoBytes(0, 20, tmpBuffer); // length of added comments (not used) - out.write(tmpBuffer, 0, 22); - bytesWritten += 22; - } - - @Override - public void close() throws IOException { - int centralDirOffset = bytesWritten; - for (ZipEntry e : entries) - writeCentralDirectoryHeader(e); - writeEndofCentralDirectory(centralDirOffset); - deflater.dispose(); - out.close(); - } - - @Override - public void flush() throws IOException { - out.write(inputBuffer, 0, inputBuffer.length); - inputBuffer = new byte[INPUT_BUFFER_SIZE]; - } - - private void finish() throws IOException { - deflater.finish(); - while (!deflater.finished()) { - deflate(); - } - deflater.reset(); - } - - private void addTwoBytes(int bytes, int offset, byte[] buffer) throws IOException { - buffer[offset] = (byte) (bytes & 0xff); - buffer[offset + 1] = (byte) ((bytes >> 8) & 0xff); - } - - private void addFourBytes(int bytes, int offset, byte[] buffer) throws IOException { - buffer[offset] = (byte) (bytes & 0xff); - buffer[offset + 1] = (byte) ((bytes >> 8) & 0xff); - buffer[offset + 2] = (byte) ((bytes >> 16) & 0xff); - buffer[offset + 3] = (byte) ((bytes >> 24) & 0xff); - } - - private int writeUTF8(String text) throws IOException { - byte[] bytes = text.getBytes("UTF-8"); - out.write(bytes, 0, bytes.length); - return bytes.length; - } -} \ No newline at end of file diff --git a/sgx-jvm/avian/classpath/jni-util.h b/sgx-jvm/avian/classpath/jni-util.h deleted file mode 100644 index f77a4104eb..0000000000 --- a/sgx-jvm/avian/classpath/jni-util.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef JNI_UTIL -#define JNI_UTIL - -#include "stdio.h" -#include "stdlib.h" -#include "string.h" - -#include - -#undef JNIEXPORT - -#ifdef UNUSED -#undef UNUSED -#endif - -#if (defined __MINGW32__) || (defined _MSC_VER) -#define PLATFORM_WINDOWS -#define PATH_SEPARATOR ';' -#define JNIEXPORT __declspec(dllexport) -#else // not (defined __MINGW32__) || (defined _MSC_VER) -#define PLATFORM_POSIX -#define PATH_SEPARATOR ':' -#define JNIEXPORT __attribute__((visibility("default"))) __attribute__((used)) -#endif // not (defined __MINGW32__) || (defined _MSC_VER) - -#ifdef _MSC_VER - -#define UNUSED - -typedef char int8_t; -typedef unsigned char uint8_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef int int32_t; -typedef unsigned int uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; - -#define INT32_MAX 2147483647 - -#define not! -#define or || -#define and && -#define xor ^ - -#ifdef _M_IX86 -#define ARCH_x86_32 -#elif defined _M_X64 -#define ARCH_x86_64 -#endif - -#else // not _MSC_VER - -#define UNUSED __attribute__((unused)) - -#include "stdint.h" -#include "errno.h" - -#ifdef __i386__ -#define ARCH_x86_32 -#elif defined __x86_64__ -#define ARCH_x86_64 -#elif defined __arm__ -#define ARCH_arm -#elif defined __aarch64__ -#define ARCH_arm64 -#endif - -#endif // not _MSC_VER - -inline void throwNew(JNIEnv* e, const char* class_, const char* message, ...) -{ - jclass c = e->FindClass(class_); - if (c) { - if (message) { - static const unsigned BufferSize = 256; - char buffer[BufferSize]; - - va_list list; - va_start(list, message); -#ifdef _MSC_VER - vsnprintf_s(buffer, BufferSize - 1, _TRUNCATE, message, list); -#else - vsnprintf(buffer, BufferSize - 1, message, list); -#endif - va_end(list); - - e->ThrowNew(c, buffer); - } else { - e->ThrowNew(c, 0); - } - e->DeleteLocalRef(c); - } -} - -inline void throwNewErrno(JNIEnv* e, const char* class_) -{ -#ifdef _MSC_VER - const unsigned size = 128; - char buffer[size]; - strerror_s(buffer, size, errno); - throwNew(e, class_, buffer); -#else - throwNew(e, class_, strerror(errno)); -#endif -} - -inline void* allocate(JNIEnv* e, unsigned size) -{ - void* p = malloc(size); - if (p == 0) { - throwNew(e, "java/lang/OutOfMemoryError", 0); - } - return p; -} - -#endif // JNI_UTIL diff --git a/sgx-jvm/avian/classpath/libcore/reflect/AnnotationAccess.java b/sgx-jvm/avian/classpath/libcore/reflect/AnnotationAccess.java deleted file mode 100644 index 750fe9cadf..0000000000 --- a/sgx-jvm/avian/classpath/libcore/reflect/AnnotationAccess.java +++ /dev/null @@ -1,8 +0,0 @@ -package libcore.reflect; - -import java.lang.reflect.AccessibleObject; - -public class AnnotationAccess { - public static native AccessibleObject getEnclosingMethodOrConstructor - (Class c); -} diff --git a/sgx-jvm/avian/classpath/sun/misc/Cleaner.java b/sgx-jvm/avian/classpath/sun/misc/Cleaner.java deleted file mode 100644 index eaeea86f72..0000000000 --- a/sgx-jvm/avian/classpath/sun/misc/Cleaner.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package sun.misc; - -public class Cleaner { } diff --git a/sgx-jvm/avian/classpath/sun/misc/Unsafe.java b/sgx-jvm/avian/classpath/sun/misc/Unsafe.java deleted file mode 100644 index a8fdedc227..0000000000 --- a/sgx-jvm/avian/classpath/sun/misc/Unsafe.java +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package sun.misc; - -import java.lang.reflect.Field; - -public final class Unsafe { - private void Unsafe() { } - - private static final Unsafe theUnsafe = new Unsafe(); - - public static Unsafe getUnsafe() { - return theUnsafe; - } - - public native long allocateMemory(long bytes); - - public native void setMemory - (Object base, long offset, long count, byte value); - - public native void freeMemory(long address); - - public native byte getByte(long address); - - public native void putByte(long address, byte x); - - public native short getShort(long address); - - public native void putShort(long address, short x); - - public native char getChar(long address); - - public native void putChar(long address, char x); - - public native int getInt(long address); - - public native void putInt(long address, int x); - - public native long getLong(long address); - - public native void putLong(long address, long x); - - public native float getFloat(long address); - - public native void putFloat(long address, float x); - - public native double getDouble(long address); - - public native void putDouble(long address, double x); - - public native boolean getBooleanVolatile(Object o, long offset); - - public native void putBooleanVolatile(Object o, long offset, boolean x); - - public native byte getByteVolatile(Object o, long offset); - - public native void putByteVolatile(Object o, long offset, byte x); - - public native short getShortVolatile(Object o, long offset); - - public native void putShortVolatile(Object o, long offset, short x); - - public native char getCharVolatile(Object o, long offset); - - public native void putCharVolatile(Object o, long offset, char x); - - public native int getIntVolatile(Object o, long offset); - - public native void putIntVolatile(Object o, long offset, int x); - - public native float getFloatVolatile(Object o, long offset); - - public native void putFloatVolatile(Object o, long offset, float x); - - public native double getDoubleVolatile(Object o, long offset); - - public native void putDoubleVolatile(Object o, long offset, double x); - - public native long getLongVolatile(Object o, long offset); - - public native void putLongVolatile(Object o, long offset, long x); - - public long getLong(Object o, long offset) { - return getLongVolatile(o, offset); - } - - public void putLong(Object o, long offset, long x) { - putLongVolatile(o, offset, x); - } - - public double getDouble(Object o, long offset) { - return getDoubleVolatile(o, offset); - } - - public void putDouble(Object o, long offset, double x) { - putDoubleVolatile(o, offset, x); - } - - public native void putOrderedLong(Object o, long offset, long x); - - public native void putOrderedInt(Object o, long offset, int x); - - public native Object getObject(Object o, long offset); - - public native void putObject(Object o, long offset, Object x); - - public native void putObjectVolatile(Object o, long offset, Object x); - - public native void putOrderedObject(Object o, long offset, Object x); - - public native Object getObjectVolatile(Object o, long offset); - - public native long getAddress(long address); - - public native void putAddress(long address, long x); - - public native int arrayBaseOffset(Class arrayClass); - - public native int arrayIndexScale(Class arrayClass); - - public native long objectFieldOffset(Field field); - - public native void park(boolean absolute, long time); - - public native void unpark(Object target); - - public native void copyMemory(Object srcBase, long srcOffset, - Object destBase, long destOffset, - long count); - - public native boolean compareAndSwapInt(Object o, long offset, int old, - int new_); - - public native boolean compareAndSwapLong(Object o, long offset, - long old, long new_); - - public native boolean compareAndSwapObject(Object o, long offset, Object old, - Object new_); - - public void copyMemory(long src, long dst, long count) { - copyMemory(null, src, null, dst, count); - } - - public native void throwException(Throwable t); -} diff --git a/sgx-jvm/avian/classpath/sun/reflect/ConstantPool.java b/sgx-jvm/avian/classpath/sun/reflect/ConstantPool.java deleted file mode 100644 index ad29977933..0000000000 --- a/sgx-jvm/avian/classpath/sun/reflect/ConstantPool.java +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -package sun.reflect; - -public class ConstantPool { } diff --git a/sgx-jvm/avian/cmake/Platform.cmake b/sgx-jvm/avian/cmake/Platform.cmake deleted file mode 100644 index 20116488a7..0000000000 --- a/sgx-jvm/avian/cmake/Platform.cmake +++ /dev/null @@ -1,18 +0,0 @@ -IF (APPLE) - INCLUDE_DIRECTORIES ( /Developer/Headers/FlatCarbon ) - FIND_LIBRARY(CORE_FOUNDATION_LIBRARY CoreFoundation) - - MARK_AS_ADVANCED (CORE_FOUNDATION_LIBRARY) - - SET(PLATFORM_LIBS ${CORE_FOUNDATION_LIBRARY}) -ENDIF() - -IF (MSVC) - SET(PLATFORM_CXX_FLAGS "/Wall") -ELSE() - SET(PLATFORM_CXX_FLAGS "-Wall -Werror -fno-exceptions -std=c++0x") - SET(PLATFORM_LIBS ${PLATFORM_LIBS} pthread dl) -ENDIF() - -find_package(ZLIB REQUIRED) -include_directories(${ZLIB_INCLUDE_DIRS}) diff --git a/sgx-jvm/avian/corda.pro b/sgx-jvm/avian/corda.pro deleted file mode 100644 index 32ffe08ef6..0000000000 --- a/sgx-jvm/avian/corda.pro +++ /dev/null @@ -1,18 +0,0 @@ -# proguard include file (http://proguard.sourceforge.net) - --keep class avian.SystemClassLoader { - public void startBlacklisting(java.lang.Thread); -} - -# We need these for Corda deserialisation: --keep class sun.security.ec.ECPublicKeyImpl --keep class sun.security.ec.ECPrivateKeyImpl --keep class org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey --keep class org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPrivateCrtKey - --keep class java.lang.invoke.SerializedLambda { - private java.lang.Object readResolve(); -} - --keep class com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl - diff --git a/sgx-jvm/avian/docker/Dockerfile b/sgx-jvm/avian/docker/Dockerfile deleted file mode 100644 index f4aaa75032..0000000000 --- a/sgx-jvm/avian/docker/Dockerfile +++ /dev/null @@ -1,83 +0,0 @@ -FROM debian:jessie -MAINTAINER Joshua Warner, joshuawarner32@gmail.com - -RUN echo 'deb http://http.debian.net/debian jessie-backports main' >> /etc/apt/sources.list && \ - echo 'deb-src http://http.debian.net/debian jessie-backports main' >> /etc/apt/sources.list && \ - dpkg --add-architecture i386 && \ - apt-get update && \ - mkdir /var/src/ - -# Install base dependencies and build tools, general debugging tools -RUN apt-get install -y \ - build-essential \ - g++-4.9 \ - zlib1g-dev \ - openjdk-8-jdk \ - locales \ - --no-install-recommends && \ - apt-get clean all - -# Fix utf-8 default locale - we'd otherwise have trouble with the Strings and Misc tests -RUN dpkg-reconfigure locales && \ - locale-gen C.UTF-8 && \ - /usr/sbin/update-locale LANG=C.UTF-8 - -ENV LC_ALL C.UTF-8 - -# Set JAVA_HOME for avian's benefit -ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 - -# Add i386 libraries -RUN apt-get install -y \ - libc6-dev-i386 && \ - apt-get download \ - zlib1g-dev:i386 && \ - dpkg -x *.deb / && \ - rm *.deb && \ - apt-get clean all - -# Install cross-compile toolchain and emulator for testing -RUN apt-get install -y \ - mingw-w64 \ - wget \ - unzip \ - --no-install-recommends && \ - apt-get clean all - -# Download win32 and win64 adjacent to avian -RUN cd /var/src/ && \ - wget https://github.com/ReadyTalk/win32/archive/master.zip -O win32.zip && \ - unzip win32.zip && \ - rm win32.zip && \ - mv win32-* win32 && \ - wget https://github.com/ReadyTalk/win64/archive/master.zip -O win64.zip && \ - unzip win64.zip && \ - rm win64.zip && \ - mv win64-* win64 - -# Add openjdk-src stuff -RUN apt-get install -y \ - libcups2-dev \ - libgconf2-dev && \ - mkdir /var/src/openjdk/ && \ - cd /var/src/openjdk/ && \ - apt-get source openjdk-8 && \ - apt-get clean all && \ - find /var/src/openjdk && \ - rm /var/src/openjdk/*.gz /var/src/openjdk/*.dsc && \ - cd /var/src/openjdk/ && \ - tar -xf /var/src/openjdk/openjdk*/jdk.tar.xz && \ - mv /var/src/openjdk/jdk-*/src /var/src/openjdk-src && \ - rm -rf /var/src/openjdk && \ - apt-get clean all - -# Download/extract lzma source -RUN mkdir /var/src/lzma && \ - cd /var/src/lzma && \ - apt-get install -y p7zip && \ - wget http://www.7-zip.org/a/lzma1507.7z -O lzma.7z && \ - p7zip -d lzma.7z - -# Avian build location -VOLUME /var/src/avian -WORKDIR /var/src/avian diff --git a/sgx-jvm/avian/docker/arm/Dockerfile b/sgx-jvm/avian/docker/arm/Dockerfile deleted file mode 100644 index 69278214e2..0000000000 --- a/sgx-jvm/avian/docker/arm/Dockerfile +++ /dev/null @@ -1,69 +0,0 @@ -FROM joshuawarner32/avian-build -MAINTAINER Joshua Warner, joshuawarner32@gmail.com - -RUN dpkg --add-architecture armel && \ - apt-get update && \ - mkdir -p /opt/arm && \ - apt-get download libc6-dev:armel \ - linux-headers-3.13-1-all-armel:armel \ - linux-libc-dev:armel \ - libc6:armel \ - zlib1g-dev:armel \ - zlib1g:armel && \ - for x in *.deb; do \ - dpkg -x $x /opt/arm; \ - done && \ - rm *.deb && \ - apt-get install -y \ - wget \ - libgmp-dev \ - libmpfr-dev \ - libmpc-dev \ - libisl-dev && \ - apt-get clean all && \ - for x in $(find /opt/arm -type l); do \ - r=$(readlink "$x" | sed 's,^/,/opt/arm/,g'); \ - rm "$x"; \ - ln -s "$r" "$x"; \ - done - -RUN mkdir -p /var/src - -# Build & install binutils -RUN wget ftp://sourceware.org/pub/binutils/snapshots/binutils-2.23.91.tar.bz2 -O /var/src/binutils.tar.bz2 && \ - cd /var/src/ && tar -xjf binutils.tar.bz2 && rm binutils.tar.bz2 && \ - cd /var/src/binutils* && \ - mkdir build && \ - cd build && \ - ../configure \ - --target=arm-linux-gnueabi \ - --prefix=/opt/arm \ - --disable-multilib \ - --program-prefix=arm-linux-gnueabi- \ - --with-sysroot=/opt/arm \ - --with-headers=/opt/arm/usr/include && \ - make && \ - make install && \ - cd /var/src && \ - rm -rf * - -# build & install gcc -RUN wget http://www.netgull.com/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.bz2 -O /var/src/gcc.tar.bz2 && \ - cd /var/src/ && tar -xjf gcc.tar.bz2 && rm gcc.tar.bz2 && \ - cd /var/src/gcc* && \ - mkdir build && \ - cd build && \ - ../configure \ - --target=arm-linux-gnueabi \ - --enable-languages=c,c++ \ - --prefix=/opt/arm \ - --disable-multilib \ - --program-prefix=arm-linux-gnueabi- \ - --with-sysroot=/opt/arm \ - --with-headers=/opt/arm/usr/include && \ - make && \ - make install && \ - cd /var/src && \ - rm -rf * - -ENV PATH $PATH:/opt/arm/bin diff --git a/sgx-jvm/avian/docker/arm64/Dockerfile b/sgx-jvm/avian/docker/arm64/Dockerfile deleted file mode 100644 index c39413a31e..0000000000 --- a/sgx-jvm/avian/docker/arm64/Dockerfile +++ /dev/null @@ -1,71 +0,0 @@ -FROM joshuawarner32/avian-build -MAINTAINER Joshua Warner, joshuawarner32@gmail.com - -RUN dpkg --add-architecture arm64 && \ - apt-get update && \ - mkdir -p /opt/arm64 && \ - apt-get download libc6-dev:arm64 \ - linux-headers-3.16.0-4-all-arm64:arm64 \ - linux-libc-dev:arm64 \ - libc6:arm64 \ - zlib1g-dev:arm64 \ - zlib1g:arm64 && \ - for x in *.deb; do \ - dpkg -x $x /opt/arm64; \ - done && \ - rm *.deb && \ - apt-get install -y \ - wget \ - libgmp-dev \ - libmpfr-dev \ - libmpc-dev \ - libisl-dev && \ - apt-get clean all && \ - for x in $(find /opt/arm64 -type l); do \ - r=$(readlink "$x" | sed 's,^/,/opt/arm64/,g'); \ - rm "$x"; \ - ln -s "$r" "$x"; \ - done - -RUN mkdir -p /var/src - -# Build & install binutils -RUN wget ftp://sourceware.org/pub/binutils/snapshots/binutils-2.23.91.tar.bz2 -O /var/src/binutils.tar.bz2 && \ - cd /var/src/ && tar -xjf binutils.tar.bz2 && rm binutils.tar.bz2 && \ - cd /var/src/binutils* && \ - mkdir build && \ - cd build && \ - ../configure \ - --target=aarch64-linux-gnu \ - --prefix=/opt/arm64 \ - --disable-multilib \ - --program-prefix=aarch64-linux-gnu- \ - --with-sysroot=/opt/arm64 \ - --with-headers=/opt/arm64/usr/include \ - --disable-werror && \ - make && \ - make install && \ - cd /var/src && \ - rm -rf * - -# build & install gcc -RUN wget http://www.netgull.com/gcc/releases/gcc-4.8.2/gcc-4.8.2.tar.bz2 -O /var/src/gcc.tar.bz2 && \ - cd /var/src/ && tar -xjf gcc.tar.bz2 && rm gcc.tar.bz2 && \ - cd /var/src/gcc* && \ - mkdir build && \ - cd build && \ - ../configure \ - --target=aarch64-linux-gnu \ - --enable-languages=c,c++ \ - --prefix=/opt/arm64 \ - --disable-multilib \ - --program-prefix=aarch64-linux-gnu- \ - --with-sysroot=/opt/arm64 \ - --with-headers=/opt/arm64/usr/include \ - --disable-werror && \ - make && \ - make install && \ - cd /var/src && \ - rm -rf * - -ENV PATH $PATH:/opt/arm64/bin diff --git a/sgx-jvm/avian/docker/build.sh b/sgx-jvm/avian/docker/build.sh deleted file mode 100755 index ef61007dce..0000000000 --- a/sgx-jvm/avian/docker/build.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -if test $# -eq 0; then - echo "Usage: $0 [--container ] -- " - echo "Ex: $0 make test" - echo "Ex: $0 ./test/ci.sh" - echo "Ex: $0 --container joshuawarner32/avian-build-windows -- make platform=windows" - exit 1 -fi - -THE_USER="-u $(id -u "${USER}")" - -while test $# -gt 1 ; do - key="$1" - case $key in - -c|--container) - shift - CONTAINER="$1" - shift - ;; - -r|--root) - shift - THE_USER= - ;; - --) - shift - break - ;; - *) - break - ;; - esac -done - -if test -z $CONTAINER; then - CONTAINER=joshuawarner32/avian-build -fi - -DIR=$(cd $(dirname "$0") && cd .. && pwd) - -docker run --rm -i -t -v "${DIR}":/var/src/avian ${THE_USER} "${CONTAINER}" "${@}" diff --git a/sgx-jvm/avian/gradle.properties b/sgx-jvm/avian/gradle.properties deleted file mode 100644 index fbcdf372fe..0000000000 --- a/sgx-jvm/avian/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.daemon=true - -group=com.readytalk.avian -version=1.3.0-SNAPSHOT \ No newline at end of file diff --git a/sgx-jvm/avian/gradle/wrapper/gradle-wrapper.jar b/sgx-jvm/avian/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index b761216703..0000000000 Binary files a/sgx-jvm/avian/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/sgx-jvm/avian/gradle/wrapper/gradle-wrapper.properties b/sgx-jvm/avian/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2ce5f17a6f..0000000000 --- a/sgx-jvm/avian/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -#Fri Jan 02 11:31:32 MST 2015 -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=http\://services.gradle.org/distributions/gradle-2.0-bin.zip diff --git a/sgx-jvm/avian/gradlew b/sgx-jvm/avian/gradlew deleted file mode 100755 index 91a7e269e1..0000000000 --- a/sgx-jvm/avian/gradlew +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/sgx-jvm/avian/gradlew.bat b/sgx-jvm/avian/gradlew.bat deleted file mode 100644 index aec99730b4..0000000000 --- a/sgx-jvm/avian/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/sgx-jvm/avian/include/avian/codegen/architecture.h b/sgx-jvm/avian/include/avian/codegen/architecture.h deleted file mode 100644 index 7bdad3eeab..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/architecture.h +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ARCHITECTURE_H -#define AVIAN_CODEGEN_ARCHITECTURE_H - -#include "ir.h" -#include "registers.h" - -namespace vm { -class Zone; -} - -namespace avian { - -namespace util { -class Alloc; -} - -namespace codegen { - -class Assembler; - -class OperandMask { - public: - uint8_t typeMask; - RegisterMask lowRegisterMask; - RegisterMask highRegisterMask; - - OperandMask(uint8_t typeMask, - RegisterMask lowRegisterMask, - RegisterMask highRegisterMask) - : typeMask(typeMask), - lowRegisterMask(lowRegisterMask), - highRegisterMask(highRegisterMask) - { - } - - OperandMask() : typeMask(~0), lowRegisterMask(AnyRegisterMask), highRegisterMask(AnyRegisterMask) - { - } - - void setLowHighRegisterMasks(RegisterMask lowRegisterMask, RegisterMask highRegisterMask) { - this->lowRegisterMask = lowRegisterMask; - this->highRegisterMask = highRegisterMask; - } -}; - -class Architecture { - public: - virtual unsigned floatRegisterSize() = 0; - - virtual const RegisterFile* registerFile() = 0; - - virtual Register scratch() = 0; - virtual Register stack() = 0; - virtual Register thread() = 0; - virtual Register returnLow() = 0; - virtual Register returnHigh() = 0; - virtual Register virtualCallTarget() = 0; - virtual Register virtualCallIndex() = 0; - - virtual ir::TargetInfo targetInfo() = 0; - - virtual bool bigEndian() = 0; - - virtual uintptr_t maximumImmediateJump() = 0; - - virtual bool alwaysCondensed(lir::BinaryOperation op) = 0; - virtual bool alwaysCondensed(lir::TernaryOperation op) = 0; - - virtual bool reserved(Register register_) = 0; - - virtual unsigned frameFootprint(unsigned footprint) = 0; - virtual unsigned argumentFootprint(unsigned footprint) = 0; - virtual bool argumentAlignment() = 0; - virtual bool argumentRegisterAlignment() = 0; - virtual unsigned argumentRegisterCount() = 0; - virtual Register argumentRegister(unsigned index) = 0; - - virtual bool hasLinkRegister() = 0; - - virtual unsigned stackAlignmentInWords() = 0; - - virtual bool matchCall(void* returnAddress, void* target) = 0; - - virtual void updateCall(lir::UnaryOperation op, - void* returnAddress, - void* newTarget) = 0; - - virtual void setConstant(void* dst, uint64_t constant) = 0; - - virtual unsigned alignFrameSize(unsigned sizeInWords) = 0; - - virtual void nextFrame(void* start, - unsigned size, - unsigned footprint, - void* link, - bool mostRecent, - int targetParameterFootprint, - void** ip, - void** stack) = 0; - virtual void* frameIp(void* stack) = 0; - virtual unsigned frameHeaderSize() = 0; - virtual unsigned frameReturnAddressSize() = 0; - virtual unsigned frameFooterSize() = 0; - virtual int returnAddressOffset() = 0; - virtual int framePointerOffset() = 0; - - virtual void plan(lir::UnaryOperation op, - unsigned aSize, - OperandMask& aMask, - bool* thunk) = 0; - - virtual void planSource(lir::BinaryOperation op, - unsigned aSize, - OperandMask& aMask, - unsigned bSize, - bool* thunk) = 0; - - virtual void planDestination(lir::BinaryOperation op, - unsigned aSize, - const OperandMask& aMask, - unsigned bSize, - OperandMask& bMask) = 0; - - virtual void planMove(unsigned size, - OperandMask& src, - OperandMask& tmp, - const OperandMask& dst) = 0; - - virtual void planSource(lir::TernaryOperation op, - unsigned aSize, - OperandMask& aMask, - unsigned bSize, - OperandMask& bMask, - unsigned cSize, - bool* thunk) = 0; - - virtual void planDestination(lir::TernaryOperation op, - unsigned aSize, - const OperandMask& aMask, - unsigned bSize, - const OperandMask& bMask, - unsigned cSize, - OperandMask& cMask) = 0; - - virtual Assembler* makeAssembler(util::Alloc*, vm::Zone*) = 0; - - virtual void acquire() = 0; - virtual void release() = 0; -}; - -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ARCHITECTURE_H diff --git a/sgx-jvm/avian/include/avian/codegen/assembler.h b/sgx-jvm/avian/include/avian/codegen/assembler.h deleted file mode 100644 index ab6a990a4c..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/assembler.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_H -#define AVIAN_CODEGEN_ASSEMBLER_H - -#include -#include "avian/zone.h" - -#include -#include -#include - -namespace avian { -namespace codegen { - -class Architecture; - -class OperandInfo { - public: - const unsigned size; - const lir::Operand::Type type; - lir::Operand* const operand; - - inline OperandInfo(unsigned size, - lir::Operand::Type type, - lir::Operand* operand) - : size(size), type(type), operand(operand) - { - } -}; - -#ifdef AVIAN_TAILS -const bool TailCalls = true; -#else -const bool TailCalls = false; -#endif - -#ifdef AVIAN_USE_FRAME_POINTER -const bool UseFramePointer = true; -#else -const bool UseFramePointer = false; -#endif - -class Assembler { - public: - class Client { - public: - virtual Register acquireTemporary(RegisterMask mask = AnyRegisterMask) = 0; - virtual void releaseTemporary(Register r) = 0; - - virtual void save(Register r) = 0; - }; - - class Block { - public: - virtual unsigned resolve(unsigned start, Block* next) = 0; - }; - - virtual void setClient(Client* client) = 0; - - virtual Architecture* arch() = 0; - - virtual void checkStackOverflow(uintptr_t handler, - unsigned stackLimitOffsetFromThread) = 0; - virtual void saveFrame(unsigned stackOffset, unsigned ipOffset) = 0; - virtual void pushFrame(unsigned argumentCount, ...) = 0; - virtual void allocateFrame(unsigned footprint) = 0; - virtual void adjustFrame(unsigned difference) = 0; - virtual void popFrame(unsigned footprint) = 0; - virtual void popFrameForTailCall(unsigned footprint, - int offset, - Register returnAddressSurrogate, - Register framePointerSurrogate) = 0; - virtual void popFrameAndPopArgumentsAndReturn(unsigned frameFootprint, - unsigned argumentFootprint) = 0; - virtual void popFrameAndUpdateStackAndReturn(unsigned frameFootprint, - unsigned stackOffsetFromThread) - = 0; - - virtual void apply(lir::Operation op) = 0; - virtual void apply(lir::UnaryOperation op, OperandInfo a) = 0; - virtual void apply(lir::BinaryOperation op, OperandInfo a, OperandInfo b) = 0; - virtual void apply(lir::TernaryOperation op, - OperandInfo a, - OperandInfo b, - OperandInfo c) = 0; - - virtual void setDestination(uint8_t* dst) = 0; - - virtual void write() = 0; - - virtual Promise* offset(bool forTrace = false) = 0; - - virtual Block* endBlock(bool startNew) = 0; - - virtual void endEvent() = 0; - - virtual unsigned length() = 0; - - virtual unsigned footerSize() = 0; - - virtual void dispose() = 0; -}; - -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_H diff --git a/sgx-jvm/avian/include/avian/codegen/compiler.h b/sgx-jvm/avian/include/avian/codegen/compiler.h deleted file mode 100644 index 03c03ed855..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/compiler.h +++ /dev/null @@ -1,199 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_H -#define AVIAN_CODEGEN_COMPILER_H - -#include -#include -#include "avian/zone.h" -#include "assembler.h" -#include "ir.h" - -namespace avian { -namespace codegen { - -class TraceHandler { - public: - virtual void handleTrace(Promise* address, unsigned argumentIndex) = 0; -}; - -template -class Args { - public: - ir::Value* values[N]; - - template - Args(Ts... ts) -#ifndef _MSC_VER - : values{ts...} -#endif - { -#ifdef _MSC_VER - setArrayElements(values, ts...); -#endif - } - - operator util::Slice() - { - return util::Slice(&values[0], N); - } -}; - -inline Args<0> args() -{ - return Args<0>(); -} - -inline Args<1> args(ir::Value* first) -{ - return Args<1>{first}; -} - -template -inline Args<1 + util::ArgumentCount::Result> args(ir::Value* first, - Ts... rest) -{ - return Args<1 + util::ArgumentCount::Result>{first, rest...}; -} - -class Compiler { - public: - class Client { - public: - virtual intptr_t getThunk(lir::UnaryOperation op, unsigned size) = 0; - virtual intptr_t getThunk(lir::BinaryOperation op, - unsigned size, - unsigned resultSize) = 0; - virtual intptr_t getThunk(lir::TernaryOperation op, - unsigned size, - unsigned resultSize, - bool* threadParameter) = 0; - }; - - static const unsigned Aligned = 1 << 0; - static const unsigned NoReturn = 1 << 1; - static const unsigned TailJump = 1 << 2; - static const unsigned LongJumpOrCall = 1 << 3; - - class State { - }; - - virtual State* saveState() = 0; - virtual void restoreState(State* state) = 0; - - virtual void init(unsigned logicalCodeSize, - unsigned parameterFootprint, - unsigned localFootprint, - unsigned alignedFrameSize) = 0; - - virtual void extendLogicalCode(unsigned more) = 0; - - virtual void visitLogicalIp(unsigned logicalIp) = 0; - virtual void startLogicalIp(unsigned logicalIp) = 0; - - virtual Promise* machineIp(unsigned logicalIp) = 0; - - virtual Promise* poolAppend(intptr_t value) = 0; - virtual Promise* poolAppendPromise(Promise* value) = 0; - - virtual ir::Value* constant(int64_t value, ir::Type type) = 0; - virtual ir::Value* promiseConstant(Promise* value, ir::Type type) = 0; - virtual ir::Value* address(ir::Type type, Promise* address) = 0; - virtual ir::Value* memory(ir::Value* base, - ir::Type type, - int displacement = 0, - ir::Value* index = 0) = 0; - - virtual ir::Value* threadRegister() = 0; - - virtual void push(ir::Type type, ir::Value* value) = 0; - virtual void save(ir::Type type, ir::Value* value) = 0; - virtual ir::Value* pop(ir::Type type) = 0; - virtual void pushed(ir::Type type) = 0; - virtual void popped(unsigned footprint) = 0; - virtual unsigned topOfStack() = 0; - virtual ir::Value* peek(unsigned footprint, unsigned index) = 0; - - virtual ir::Value* nativeCall(ir::Value* address, - unsigned flags, - TraceHandler* traceHandler, - ir::Type resultType, - util::Slice arguments) = 0; - - virtual ir::Value* stackCall(ir::Value* address, - unsigned flags, - TraceHandler* traceHandler, - ir::Type resultType, - util::Slice arguments) = 0; - - virtual void return_(ir::Value* value) = 0; - virtual void return_() = 0; - - virtual void initLocal(unsigned index, ir::Type type) = 0; - virtual void initLocalsFromLogicalIp(unsigned logicalIp) = 0; - virtual void storeLocal(ir::Value* src, unsigned index) = 0; - virtual ir::Value* loadLocal(ir::Type type, unsigned index) = 0; - virtual void saveLocals() = 0; - - virtual void checkBounds(ir::Value* object, - unsigned lengthOffset, - ir::Value* index, - intptr_t handler) = 0; - - virtual ir::Value* truncateThenExtend(ir::ExtendMode extendMode, - ir::Type extendType, - ir::Type truncateType, - ir::Value* src) = 0; - - virtual ir::Value* truncate(ir::Type type, ir::Value* src) = 0; - - virtual void store(ir::Value* src, ir::Value* dst) = 0; - virtual ir::Value* load(ir::ExtendMode extendMode, - ir::Value* src, - ir::Type dstType) = 0; - - virtual void condJump(lir::TernaryOperation op, - ir::Value* a, - ir::Value* b, - ir::Value* address) = 0; - - virtual void jmp(ir::Value* address) = 0; - virtual void exit(ir::Value* address) = 0; - - virtual ir::Value* binaryOp(lir::TernaryOperation op, - ir::Type type, - ir::Value* a, - ir::Value* b) = 0; - virtual ir::Value* unaryOp(lir::BinaryOperation op, ir::Value* a) = 0; - virtual void nullaryOp(lir::Operation op) = 0; - - virtual ir::Value* f2f(ir::Type resType, ir::Value* a) = 0; - virtual ir::Value* f2i(ir::Type resType, ir::Value* a) = 0; - virtual ir::Value* i2f(ir::Type resType, ir::Value* a) = 0; - - virtual void compile(uintptr_t stackOverflowHandler, - unsigned stackLimitOffset) = 0; - virtual unsigned resolve(uint8_t* dst) = 0; - virtual unsigned poolSize() = 0; - virtual void write() = 0; - - virtual void dispose() = 0; -}; - -Compiler* makeCompiler(vm::System* system, - Assembler* assembler, - vm::Zone* zone, - Compiler::Client* client); - -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_H diff --git a/sgx-jvm/avian/include/avian/codegen/ir.h b/sgx-jvm/avian/include/avian/codegen/ir.h deleted file mode 100644 index ae0f2663aa..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/ir.h +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_IR_H -#define AVIAN_CODEGEN_IR_H - -namespace avian { -namespace codegen { -namespace ir { - -class TargetInfo { - public: - unsigned pointerSize; - - explicit TargetInfo(unsigned pointerSize) : pointerSize(pointerSize) - { - } -}; - -class Type { - public: - enum Flavor { - // A GC-visiible reference - Object, - - // GC-invisible types - Integer, - Float, - Address, - - // Represents the lack of a return value - // TODO: remove when possible - Void, - }; - - typedef int16_t TypeDesc; - -#define TY_DESC(flavor, size) ((flavor & 0xff) | ((size & 0xff) << 8)) - // TODO: once we upgrade to c++11, these should become plain constants (rather - // than function calls). - // The constructor will need to be declared 'constexpr'. - static inline Type void_() - { - return TY_DESC(Void, 0); - } - static inline Type object() - { - return TY_DESC(Object, -1); - } - static inline Type iptr() - { - return TY_DESC(Integer, -1); - } - static inline Type i1() - { - return TY_DESC(Integer, 1); - } - static inline Type i2() - { - return TY_DESC(Integer, 2); - } - static inline Type i4() - { - return TY_DESC(Integer, 4); - } - static inline Type i8() - { - return TY_DESC(Integer, 8); - } - static inline Type f4() - { - return TY_DESC(Float, 4); - } - static inline Type f8() - { - return TY_DESC(Float, 8); - } - static inline Type addr() - { - return TY_DESC(Address, -1); - } -#undef TY_DESC - - private: - TypeDesc desc; - - friend class Types; - - // TODO: once we move to c++11, declare this 'constexpr', to allow - // compile-time constants of this type. - /* constexpr */ Type(TypeDesc desc) : desc(desc) - { - } - - public: - inline Flavor flavor() const - { - return (Flavor)(desc & 0xff); - } - - // If the size isn't known without inspecting the TargetInfo, returns -1. - // Otherwise, matches size(TargetInfo). - inline int rawSize() const - { - return desc >> 8; - } - - inline unsigned size(const TargetInfo& t) const - { - int s = rawSize(); - if (s < 0) { - return t.pointerSize; - } - return (unsigned)s; - } - - inline bool operator==(const Type& other) const - { - return desc == other.desc; - } - - inline bool operator!=(const Type& other) const - { - return !(*this == other); - } -}; - -enum class ExtendMode { Signed, Unsigned }; - -enum class CallingConvention { Native, Avian }; - -class Value { - public: - ir::Type type; - - Value(ir::Type type) : type(type) - { - } -}; - -} // namespace ir -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_IR_H diff --git a/sgx-jvm/avian/include/avian/codegen/lir-ops.inc.cpp b/sgx-jvm/avian/include/avian/codegen/lir-ops.inc.cpp deleted file mode 100644 index cf038c6647..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/lir-ops.inc.cpp +++ /dev/null @@ -1,62 +0,0 @@ -LIR_OP_0(Return) -LIR_OP_0(LoadBarrier) -LIR_OP_0(StoreStoreBarrier) -LIR_OP_0(StoreLoadBarrier) -LIR_OP_0(Trap) - -LIR_OP_1(Call) -LIR_OP_1(LongCall) -LIR_OP_1(AlignedLongCall) -LIR_OP_1(AlignedCall) -LIR_OP_1(Jump) -LIR_OP_1(LongJump) -LIR_OP_1(AlignedLongJump) -LIR_OP_1(AlignedJump) - -LIR_OP_2(Move) -LIR_OP_2(MoveLow) -LIR_OP_2(MoveHigh) -LIR_OP_2(MoveZ) -LIR_OP_2(Negate) -LIR_OP_2(FloatNegate) -LIR_OP_2(Float2Float) -LIR_OP_2(Float2Int) -LIR_OP_2(Int2Float) -LIR_OP_2(FloatSquareRoot) -LIR_OP_2(FloatAbsolute) -LIR_OP_2(Absolute) - -LIR_OP_3(Add) -LIR_OP_3(Subtract) -LIR_OP_3(Multiply) -LIR_OP_3(Divide) -LIR_OP_3(Remainder) -LIR_OP_3(ShiftLeft) -LIR_OP_3(ShiftRight) -LIR_OP_3(UnsignedShiftRight) -LIR_OP_3(And) -LIR_OP_3(Or) -LIR_OP_3(Xor) -LIR_OP_3(FloatAdd) -LIR_OP_3(FloatSubtract) -LIR_OP_3(FloatMultiply) -LIR_OP_3(FloatDivide) -LIR_OP_3(FloatRemainder) -LIR_OP_3(FloatMax) -LIR_OP_3(FloatMin) -LIR_OP_3(JumpIfLess) -LIR_OP_3(JumpIfGreater) -LIR_OP_3(JumpIfLessOrEqual) -LIR_OP_3(JumpIfGreaterOrEqual) -LIR_OP_3(JumpIfEqual) -LIR_OP_3(JumpIfNotEqual) -LIR_OP_3(JumpIfFloatEqual) -LIR_OP_3(JumpIfFloatNotEqual) -LIR_OP_3(JumpIfFloatLess) -LIR_OP_3(JumpIfFloatGreater) -LIR_OP_3(JumpIfFloatLessOrEqual) -LIR_OP_3(JumpIfFloatGreaterOrEqual) -LIR_OP_3(JumpIfFloatLessOrUnordered) -LIR_OP_3(JumpIfFloatGreaterOrUnordered) -LIR_OP_3(JumpIfFloatLessOrEqualOrUnordered) -LIR_OP_3(JumpIfFloatGreaterOrEqualOrUnordered) diff --git a/sgx-jvm/avian/include/avian/codegen/lir.h b/sgx-jvm/avian/include/avian/codegen/lir.h deleted file mode 100644 index 444a661e81..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/lir.h +++ /dev/null @@ -1,184 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_LIR_H -#define AVIAN_CODEGEN_LIR_H - -#include - -namespace avian { -namespace codegen { -class Promise; - -namespace lir { -enum Operation { -#define LIR_OP_0(x) x, -#define LIR_OP_1(x) -#define LIR_OP_2(x) -#define LIR_OP_3(x) -#include "lir-ops.inc.cpp" -#undef LIR_OP_0 -#undef LIR_OP_1 -#undef LIR_OP_2 -#undef LIR_OP_3 -}; - -const unsigned OperationCount = Trap + 1; - -enum UnaryOperation { -#define LIR_OP_0(x) -#define LIR_OP_1(x) x, -#define LIR_OP_2(x) -#define LIR_OP_3(x) -#include "lir-ops.inc.cpp" -#undef LIR_OP_0 -#undef LIR_OP_1 -#undef LIR_OP_2 -#undef LIR_OP_3 - NoUnaryOperation = -1 -}; - -const unsigned UnaryOperationCount = AlignedJump + 1; - -enum BinaryOperation { -#define LIR_OP_0(x) -#define LIR_OP_1(x) -#define LIR_OP_2(x) x, -#define LIR_OP_3(x) -#include "lir-ops.inc.cpp" -#undef LIR_OP_0 -#undef LIR_OP_1 -#undef LIR_OP_2 -#undef LIR_OP_3 - NoBinaryOperation = -1 -}; - -const unsigned BinaryOperationCount = Absolute + 1; - -enum TernaryOperation { -#define LIR_OP_0(x) -#define LIR_OP_1(x) -#define LIR_OP_2(x) -#define LIR_OP_3(x) x, -#include "lir-ops.inc.cpp" -#undef LIR_OP_0 -#undef LIR_OP_1 -#undef LIR_OP_2 -#undef LIR_OP_3 - NoTernaryOperation = -1 -}; - -const unsigned TernaryOperationCount = JumpIfFloatGreaterOrEqualOrUnordered + 1; - -const unsigned NonBranchTernaryOperationCount = FloatMin + 1; -const unsigned BranchOperationCount = JumpIfFloatGreaterOrEqualOrUnordered - - FloatMin; - -enum ValueType { ValueGeneral, ValueFloat }; - -inline bool isBranch(lir::TernaryOperation op) -{ - return op > FloatMin; -} - -inline bool isFloatBranch(lir::TernaryOperation op) -{ - return op > JumpIfNotEqual; -} - -inline bool isGeneralBranch(lir::TernaryOperation op) -{ - return isBranch(op) && !isFloatBranch(op); -} - -inline bool isGeneralBinaryOp(lir::TernaryOperation op) -{ - return op < FloatAdd; -} - -inline bool isFloatBinaryOp(lir::TernaryOperation op) -{ - return op >= FloatAdd && op <= FloatMin; -} - -inline bool isGeneralUnaryOp(lir::BinaryOperation op) -{ - return op == Negate || op == Absolute; -} - -inline bool isFloatUnaryOp(lir::BinaryOperation op) -{ - return op == FloatNegate || op == FloatSquareRoot || op == FloatAbsolute; -} - -class Operand { -public: - - enum class Type { - Constant, - Address, - RegisterPair, - Memory - }; - - const static unsigned TypeCount = (unsigned)Type::Memory + 1; - - const static unsigned ConstantMask = 1 << (unsigned)Type::Constant; - const static unsigned AddressMask = 1 << (unsigned)Type::Address; - const static unsigned RegisterPairMask = 1 << (unsigned)Type::RegisterPair; - const static unsigned MemoryMask = 1 << (unsigned)Type::Memory; -}; - -class Constant : public Operand { - public: - Constant(Promise* value) : value(value) - { - } - - Promise* value; -}; - -class Address : public Operand { - public: - Address(Promise* address) : address(address) - { - } - - Promise* address; -}; - -class RegisterPair : public Operand { - public: - RegisterPair(Register low, Register high = NoRegister) : low(low), high(high) - { - } - - Register low; - Register high; -}; - -class Memory : public Operand { - public: - Memory(Register base, int offset, Register index = NoRegister, unsigned scale = 1) - : base(base), offset(offset), index(index), scale(scale) - { - } - - Register base; - int offset; - Register index; - unsigned scale; -}; - -} // namespace lir -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_LIR_H diff --git a/sgx-jvm/avian/include/avian/codegen/promise.h b/sgx-jvm/avian/include/avian/codegen/promise.h deleted file mode 100644 index 8bca0dd528..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/promise.h +++ /dev/null @@ -1,185 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_PROMISE_H -#define AVIAN_CODEGEN_PROMISE_H - -#include -#include -#include - -namespace avian { -namespace codegen { - -class Promise { - public: - class Listener { - public: - virtual bool resolve(int64_t value, void** location) = 0; - - Listener* next; - }; - - virtual int64_t value() = 0; - virtual bool resolved() = 0; - virtual Listener* listen(unsigned) - { - return 0; - } -}; - -class ResolvedPromise : public Promise { - public: - ResolvedPromise(int64_t value) : value_(value) - { - } - - virtual int64_t value() - { - return value_; - } - - virtual bool resolved() - { - return true; - } - - int64_t value_; -}; - -class ShiftMaskPromise : public Promise { - public: - ShiftMaskPromise(Promise* base, unsigned shift, int64_t mask) - : base(base), shift(shift), mask(mask) - { - } - - virtual int64_t value() - { - return (base->value() >> shift) & mask; - } - - virtual bool resolved() - { - return base->resolved(); - } - - Promise* base; - unsigned shift; - int64_t mask; -}; - -class CombinedPromise : public Promise { - public: - CombinedPromise(Promise* low, Promise* high) : low(low), high(high) - { - } - - virtual int64_t value() - { - return low->value() | (high->value() << 32); - } - - virtual bool resolved() - { - return low->resolved() and high->resolved(); - } - - Promise* low; - Promise* high; -}; - -class OffsetPromise : public Promise { - public: - OffsetPromise(Promise* base, int64_t offset) : base(base), offset(offset) - { - } - - virtual int64_t value() - { - return base->value() + offset; - } - - virtual bool resolved() - { - return base->resolved(); - } - - Promise* base; - int64_t offset; -}; - -class ListenPromise : public Promise { - public: - ListenPromise(vm::System* s, util::AllocOnly* allocator) - : s(s), allocator(allocator), listener(0) - { - } - - virtual int64_t value() - { - abort(s); - } - - virtual bool resolved() - { - return false; - } - - virtual Listener* listen(unsigned sizeInBytes) - { - Listener* l = static_cast(allocator->allocate(sizeInBytes)); - l->next = listener; - listener = l; - return l; - } - - vm::System* s; - util::AllocOnly* allocator; - Listener* listener; - Promise* promise; -}; - -class DelayedPromise : public ListenPromise { - public: - DelayedPromise(vm::System* s, - util::AllocOnly* allocator, - Promise* basis, - DelayedPromise* next) - : ListenPromise(s, allocator), basis(basis), next(next) - { - } - - virtual int64_t value() - { - abort(s); - } - - virtual bool resolved() - { - return false; - } - - virtual Listener* listen(unsigned sizeInBytes) - { - Listener* l = static_cast(allocator->allocate(sizeInBytes)); - l->next = listener; - listener = l; - return l; - } - - Promise* basis; - DelayedPromise* next; -}; - -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_PROMISE_H diff --git a/sgx-jvm/avian/include/avian/codegen/registers.h b/sgx-jvm/avian/include/avian/codegen/registers.h deleted file mode 100644 index 25420db668..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/registers.h +++ /dev/null @@ -1,212 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_REGISTERS_H -#define AVIAN_CODEGEN_REGISTERS_H - -#include "avian/common.h" - -namespace avian { -namespace codegen { - -class RegisterMask; - -class Register { -private: - int8_t _index; -public: - explicit constexpr Register(int8_t _index) : _index(_index) {} - constexpr Register() : _index(-1) {} - - constexpr bool operator == (Register o) const { - return _index == o._index; - } - - constexpr bool operator != (Register o) const { - return !(*this == o); - } - - constexpr RegisterMask operator | (Register o) const; - - constexpr bool operator < (Register o) const { - return _index < o._index; - } - - constexpr bool operator > (Register o) const { - return _index > o._index; - } - - constexpr bool operator <= (Register o) const { - return _index <= o._index; - } - - constexpr bool operator >= (Register o) const { - return _index >= o._index; - } - - constexpr int index() const { - return _index; - } -}; - -constexpr Register NoRegister; - -class RegisterMask { -private: - uint64_t mask; - - static constexpr unsigned maskStart(uint64_t mask, unsigned offset = 64) { - return mask == 0 ? (offset & 63) : maskStart(mask << 1, offset - 1); - } - - static constexpr unsigned maskLimit(uint64_t mask, unsigned offset = 0) { - return mask == 0 ? offset : maskLimit(mask >> 1, offset + 1); - } -public: - constexpr RegisterMask(uint64_t mask) : mask(mask) {} - constexpr RegisterMask() : mask(0) {} - constexpr RegisterMask(Register reg) : mask(static_cast(1) << reg.index()) {} - - constexpr unsigned begin() const { - return maskStart(mask); - } - - constexpr unsigned end() const { - return maskLimit(mask); - } - - constexpr RegisterMask operator &(RegisterMask o) const { - return RegisterMask(mask & o.mask); - } - - RegisterMask operator &=(RegisterMask o) { - mask &= o.mask; - return *this; - } - - constexpr RegisterMask operator |(RegisterMask o) const { - return RegisterMask(mask | o.mask); - } - - constexpr bool contains(Register reg) const { - return (mask & (static_cast(1) << reg.index())) != 0; - } - - constexpr bool containsExactly(Register reg) const { - return mask == (mask & (static_cast(1) << reg.index())); - } - - constexpr RegisterMask excluding(Register reg) const { - return RegisterMask(mask & ~(static_cast(1) << reg.index())); - } - - constexpr RegisterMask including(Register reg) const { - return RegisterMask(mask | (static_cast(1) << reg.index())); - } - - constexpr explicit operator uint64_t() const { - return mask; - } - - constexpr explicit operator bool() const { - return mask != 0; - } -}; - -constexpr RegisterMask AnyRegisterMask(~static_cast(0)); -constexpr RegisterMask NoneRegisterMask(0); - -constexpr RegisterMask Register::operator | (Register o) const { - return RegisterMask(*this) | o; -} - -class RegisterIterator; - -class BoundedRegisterMask : public RegisterMask { - public: - uint8_t start; - uint8_t limit; - - BoundedRegisterMask(RegisterMask mask) - : RegisterMask(mask), start(mask.begin()), limit(mask.end()) - { - } - - RegisterIterator begin() const; - - RegisterIterator end() const; -}; - -class RegisterIterator { - public: - int index; - int direction; - int limit; - const RegisterMask mask; - - RegisterIterator(int index, int direction, int limit, RegisterMask mask) - : index(index), direction(direction), limit(limit), mask(mask) - { - } - - bool operator !=(const RegisterIterator& o) const { - return index != o.index; - } - - Register operator *() { - return Register(index); - } - - void operator ++ () { - if(index != limit) { - index += direction; - } - while(index != limit && !mask.contains(Register(index))) { - index += direction; - } - } -}; - -inline RegisterIterator BoundedRegisterMask::begin() const { - // We use reverse iteration... for some reason. - return RegisterIterator(limit - 1, -1, start - 1, *this); -} - -inline RegisterIterator BoundedRegisterMask::end() const { - // We use reverse iteration... for some reason. - return RegisterIterator(start - 1, -1, start - 1, *this); -} - -inline RegisterIterator begin(BoundedRegisterMask mask) { - return mask.begin(); -} - -inline RegisterIterator end(BoundedRegisterMask mask) { - return mask.end(); -} - -class RegisterFile { - public: - BoundedRegisterMask allRegisters; - BoundedRegisterMask generalRegisters; - BoundedRegisterMask floatRegisters; - - RegisterFile(RegisterMask generalRegisterMask, RegisterMask floatRegisterMask) - : allRegisters(generalRegisterMask | floatRegisterMask), - generalRegisters(generalRegisterMask), - floatRegisters(floatRegisterMask) - { - } -}; - -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_REGISTERS_H diff --git a/sgx-jvm/avian/include/avian/codegen/runtime.h b/sgx-jvm/avian/include/avian/codegen/runtime.h deleted file mode 100644 index 527d68a525..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/runtime.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_RUNTIME_H -#define AVIAN_CODEGEN_RUNTIME_H - -namespace avian { -namespace codegen { -namespace runtime { - -int64_t compareDoublesG(uint64_t bi, uint64_t ai); -int64_t compareDoublesL(uint64_t bi, uint64_t ai); -int64_t compareFloatsG(uint32_t bi, uint32_t ai); -int64_t compareFloatsL(uint32_t bi, uint32_t ai); -int64_t compareLongs(uint64_t b, uint64_t a); -uint64_t addDouble(uint64_t b, uint64_t a); -uint64_t subtractDouble(uint64_t b, uint64_t a); -uint64_t multiplyDouble(uint64_t b, uint64_t a); -uint64_t divideDouble(uint64_t b, uint64_t a); -uint64_t moduloDouble(uint64_t b, uint64_t a); -uint64_t negateDouble(uint64_t a); -uint64_t squareRootDouble(uint64_t a); -uint64_t doubleToFloat(int64_t a); -int64_t doubleToInt(int64_t a); -int64_t doubleToLong(int64_t a); -uint64_t addFloat(uint32_t b, uint32_t a); -uint64_t subtractFloat(uint32_t b, uint32_t a); -uint64_t multiplyFloat(uint32_t b, uint32_t a); -uint64_t divideFloat(uint32_t b, uint32_t a); -uint64_t moduloFloat(uint32_t b, uint32_t a); -uint64_t negateFloat(uint32_t a); -uint64_t absoluteFloat(uint32_t a); -int64_t absoluteLong(int64_t a); -int64_t absoluteInt(int32_t a); -uint64_t floatToDouble(int32_t a); -int64_t floatToInt(int32_t a); -int64_t floatToLong(int32_t a); -uint64_t intToDouble(int32_t a); -uint64_t intToFloat(int32_t a); -uint64_t longToDouble(int64_t a); -uint64_t longToFloat(int64_t a); - -} // namespace runtime -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_RUNTIME_H diff --git a/sgx-jvm/avian/include/avian/codegen/targets.h b/sgx-jvm/avian/include/avian/codegen/targets.h deleted file mode 100644 index d297c86bab..0000000000 --- a/sgx-jvm/avian/include/avian/codegen/targets.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_TARGETS_H -#define AVIAN_CODEGEN_TARGETS_H - -namespace vm { -class System; -} - -namespace avian { -namespace codegen { - -class Architecture; - -Architecture* makeArchitectureNative(vm::System* system, - bool useNativeFeatures); - -Architecture* makeArchitectureX86(vm::System* system, bool useNativeFeatures); -Architecture* makeArchitectureArm(vm::System* system, bool useNativeFeatures); - -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_TARGETS_H diff --git a/sgx-jvm/avian/include/avian/heap/heap.h b/sgx-jvm/avian/include/avian/heap/heap.h deleted file mode 100644 index 5448fa3222..0000000000 --- a/sgx-jvm/avian/include/avian/heap/heap.h +++ /dev/null @@ -1,88 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef HEAP_H -#define HEAP_H - -#include -#include - -namespace vm { - -// an object must survive TenureThreshold + 2 garbage collections -// before being copied to gen2 (must be at least 1): -const unsigned TenureThreshold = 3; - -const unsigned FixieTenureThreshold = TenureThreshold + 2; - -class Heap : public avian::util::Allocator { - public: - enum CollectionType { MinorCollection, MajorCollection }; - - enum Status { Null, Reachable, Unreachable, Tenured }; - - class Visitor { - public: - virtual void visit(void*) = 0; - }; - - class Walker { - public: - virtual bool visit(unsigned) = 0; - }; - - class Client { - public: - virtual void collect(void* context, CollectionType type) = 0; - virtual void visitRoots(Visitor*) = 0; - virtual bool isFixed(void*) = 0; - virtual unsigned sizeInWords(void*) = 0; - virtual unsigned copiedSizeInWords(void*) = 0; - virtual void copy(void*, void*) = 0; - virtual void walk(void*, Walker*) = 0; - }; - - virtual void setClient(Client* client) = 0; - virtual void setImmortalHeap(uintptr_t* start, unsigned sizeInWords) = 0; - virtual unsigned remaining() = 0; - virtual unsigned limit() = 0; - virtual bool limitExceeded(int pendingAllocation = 0) = 0; - virtual void collect(CollectionType type, - unsigned footprint, - int pendingAllocation) = 0; - virtual unsigned fixedFootprint(unsigned sizeInWords, bool objectMask) = 0; - virtual void* allocateFixed(avian::util::Alloc* allocator, - unsigned sizeInWords, - bool objectMask) = 0; - virtual void* allocateImmortalFixed(avian::util::Alloc* allocator, - unsigned sizeInWords, - bool objectMask) = 0; - virtual void mark(void* p, unsigned offset, unsigned count) = 0; - virtual void pad(void* p) = 0; - virtual void* follow(void* p) = 0; - - template - T* follow(T* p) - { - return static_cast(follow(static_cast(p))); - } - - virtual void postVisit() = 0; - virtual Status status(void* p) = 0; - virtual CollectionType collectionType() = 0; - virtual void disposeFixies() = 0; - virtual void dispose() = 0; -}; - -Heap* makeHeap(System* system, unsigned limit); - -} // namespace vm - -#endif // HEAP_H diff --git a/sgx-jvm/avian/include/avian/system/memory.h b/sgx-jvm/avian/include/avian/system/memory.h deleted file mode 100644 index 4b4de4dd7b..0000000000 --- a/sgx-jvm/avian/include/avian/system/memory.h +++ /dev/null @@ -1,49 +0,0 @@ - /* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_SYSTEM_MEMORY_H -#define AVIAN_SYSTEM_MEMORY_H - -#include - -#include - -namespace avian { -namespace system { - -class Memory { - public: - enum Permissions { - Read = 1 << 0, - Write = 1 << 1, - Execute = 1 << 2, - - // Utility munged constants - ReadWrite = Read | Write, - ReadExecute = Read | Execute, - ReadWriteExecute = Read | Write | Execute - }; - - static const size_t PageSize; - - // Allocate a contiguous range of pages. - static util::Slice allocate(size_t sizeInBytes, Permissions perms = ReadWrite); - - // Free a contiguous range of pages. - static void free(util::Slice pages); - - // TODO: In the future: - // static void setPermissions(util::Slice pages, Permissions perms); -}; - -} // namespace system -} // namespace avian - -#endif diff --git a/sgx-jvm/avian/include/avian/system/signal.h b/sgx-jvm/avian/include/avian/system/signal.h deleted file mode 100644 index a5711e7da7..0000000000 --- a/sgx-jvm/avian/include/avian/system/signal.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_SYSTEM_SIGNAL_H -#define AVIAN_SYSTEM_SIGNAL_H - -#include - -namespace avian { -namespace system { - -// Crash the process. -// On posix, the just calls abort. On windows, we dereference a null pointer in -// order to trigger the crash dump logic. -NO_RETURN void crash(); - -// Registrar for unix-like "signals" (implemented with structured exceptions on -// windows). -// TODO: remove dependence on generated code having a well-known "thread" -// register. Use a thread-local variable instead. -class SignalRegistrar { - public: - class Handler { - public: - // This function receives state information about the paused thread. - // Returns whether to resume execution after the failure point. - virtual bool handleSignal(void** ip, - void** frame, - void** stack, - void** thread) = 0; - }; - - enum Signal { - // "Segmentation fault" exceptions (mostly null pointer dereference, but - // generally access to any non-mapped memory) - SegFault, - DivideByZero, - }; - - SignalRegistrar(); - ~SignalRegistrar(); - - // Register a handler for the given signal. - // After this method call, anytime the given signal is raised, it will be - // handled by the given handler. - // Returns true upon success, false upon failure - bool registerHandler(Signal signal, Handler* handler); - - // Unregister a handler for the given signal. - // After this method call, the given signal will no longer be handled (or, - // rather, it go back to being handled by whatever was registered to handle it - // before us). - // Returns true upon success, false upon failure - bool unregisterHandler(Signal signal); - - // Set the directory that a crash dump will be written to should an unhandled - // exception be thrown. - // Note: this only currently does anything on windows. - // TODO: move this out of this class, into a separate "CrashDumper" class or - // somesuch. - void setCrashDumpDirectory(const char* crashDumpDirectory); - - // This is internal, implementation-specific data. It's declared in the - // specific implementation. - struct Data; - - private: - Data* data; -}; - -} // namespace system -} // namespace avian - -#endif diff --git a/sgx-jvm/avian/include/avian/system/system.h b/sgx-jvm/avian/include/avian/system/system.h deleted file mode 100644 index e2c4ff5022..0000000000 --- a/sgx-jvm/avian/include/avian/system/system.h +++ /dev/null @@ -1,183 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef SYSTEM_H -#define SYSTEM_H - -#include "avian/common.h" -#include -#include - -namespace vm { - -class System : public avian::util::Aborter { - public: - typedef intptr_t Status; - - enum FileType { TypeUnknown, TypeDoesNotExist, TypeFile, TypeDirectory }; - - class Thread { - public: - virtual void interrupt() = 0; - virtual bool getAndClearInterrupted() = 0; - virtual void join() = 0; - virtual void dispose() = 0; - }; - - class ThreadVisitor { - public: - virtual void visit(void* ip, void* stack, void* link) = 0; - }; - - class Runnable { - public: - virtual void attach(Thread*) = 0; - virtual void run() = 0; - virtual bool interrupted() = 0; - virtual void setInterrupted(bool v) = 0; - }; - - class Mutex { - public: - virtual void acquire() = 0; - virtual void release() = 0; - virtual void dispose() = 0; - }; - - class Monitor { - public: - virtual bool tryAcquire(Thread* context) = 0; - virtual void acquire(Thread* context) = 0; - virtual void release(Thread* context) = 0; - virtual void wait(Thread* context, int64_t time) = 0; - virtual bool waitAndClearInterrupted(Thread* context, int64_t time) = 0; - virtual void notify(Thread* context) = 0; - virtual void notifyAll(Thread* context) = 0; - virtual Thread* owner() = 0; - virtual void dispose() = 0; - }; - - class Local { - public: - virtual void* get() = 0; - virtual void set(void* p) = 0; - virtual void dispose() = 0; - }; - - class Region { - public: - virtual const uint8_t* start() = 0; - virtual size_t length() = 0; - virtual void dispose() = 0; - }; - - class Directory { - public: - virtual const char* next() = 0; - virtual void dispose() = 0; - }; - - class Library { - public: - virtual void* resolve(const char* symbol) = 0; - virtual const char* name() = 0; - virtual Library* next() = 0; - virtual void setNext(Library* lib) = 0; - virtual void disposeAll() = 0; - }; - - class MonitorResource { - public: - MonitorResource(System::Thread* t, System::Monitor* m) : t(t), m(m) - { - m->acquire(t); - } - - ~MonitorResource() - { - m->release(t); - } - - private: - System::Thread* t; - System::Monitor* m; - }; - - virtual bool success(Status) = 0; - virtual void* tryAllocate(size_t sizeInBytes) = 0; - virtual void free(const void* p) = 0; - virtual Status attach(Runnable*) = 0; - virtual Status start(Runnable*) = 0; - virtual Status make(Mutex**) = 0; - virtual Status make(Monitor**) = 0; - virtual Status make(Local**) = 0; - - virtual Status visit(Thread* thread, Thread* target, ThreadVisitor* visitor) - = 0; - - virtual Status map(Region**, const char* name) = 0; - virtual FileType stat(const char* name, size_t* length) = 0; - virtual Status open(Directory**, const char* name) = 0; - virtual const char* libraryPrefix() = 0; - virtual const char* librarySuffix() = 0; - virtual Status load(Library**, const char* name) = 0; - virtual char pathSeparator() = 0; - virtual char fileSeparator() = 0; - virtual const char* toAbsolutePath(avian::util::AllocOnly* allocator, - const char* name) = 0; - virtual int64_t now() = 0; - virtual void yield() = 0; - virtual void exit(int code) = 0; - virtual void dispose() = 0; -}; - -inline void* allocate(System* s, size_t size) -{ - void* p = s->tryAllocate(size); - if (p == 0) - s->abort(); - return p; -} - -#define ACQUIRE_MONITOR(t, m) \ - System::MonitorResource MAKE_NAME(monitorResource_)(t, m) - -inline avian::util::Aborter* getAborter(System* s) -{ - return s; -} - -inline void NO_RETURN sysAbort(System* s) -{ - abort(s); -} - -// #ifdef NDEBUG - -// # define assertT(a, b) -// # define vm_assert(a, b) - -// #else // not NDEBUG - -// inline void -// assertT(System* s, bool v) -// { -// expect(s, v); -// } - -// # define vm_assert(a, b) vm::assertT(a, b) - -// #endif // not NDEBUG - -AVIAN_EXPORT System* makeSystem(bool reentrant = false); - -} // namespace vm - -#endif // SYSTEM_H diff --git a/sgx-jvm/avian/include/avian/tools/object-writer/tools.h b/sgx-jvm/avian/include/avian/tools/object-writer/tools.h deleted file mode 100644 index b73f27ffdc..0000000000 --- a/sgx-jvm/avian/include/avian/tools/object-writer/tools.h +++ /dev/null @@ -1,170 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_TOOLS_H_ -#define AVIAN_TOOLS_H_ - -#include - -#include -#include - -#include "avian/environment.h" - -namespace avian { - -namespace tools { - -class OutputStream { - public: - virtual void writeChunk(const void* data, size_t size) = 0; - virtual void write(uint8_t byte); - virtual void writeRepeat(uint8_t byte, size_t size); -}; - -class FileOutputStream : public OutputStream { - private: - FILE* file; - - public: - FileOutputStream(const char* name); - ~FileOutputStream(); - - bool isValid(); - - virtual void writeChunk(const void* data, size_t size); - virtual void write(uint8_t byte); -}; - -class SymbolInfo { - public: - unsigned addr; - util::String name; - - inline SymbolInfo(uint64_t addr, const util::String& name) - : addr(addr), name(name) - { - } - - inline SymbolInfo() : name("") - { - } -}; - -class Buffer { - public: - size_t capacity; - size_t length; - uint8_t* data; - - Buffer(); - ~Buffer(); - - void ensure(size_t more); - void write(const void* d, size_t size); -}; - -class StringTable : public Buffer { - public: - unsigned add(util::String str); -}; - -template -class DynamicArray : public util::Slice { - public: - size_t capacity; - - DynamicArray() : util::Slice((T*)malloc(10 * sizeof(T)), 0), capacity(10) - { - } - ~DynamicArray() - { - free(util::Slice::items); - } - - void ensure(size_t more) - { - if (util::Slice::count + more > capacity) { - capacity = capacity * 2 + more; - util::Slice::items - = (T*)realloc(util::Slice::items, capacity * sizeof(T)); - } - } - - void add(const T& item) - { - ensure(1); - util::Slice::items[util::Slice::count++] = item; - } -}; - -class PlatformInfo { - public: - enum Format { - Elf = AVIAN_FORMAT_ELF, - Pe = AVIAN_FORMAT_PE, - MachO = AVIAN_FORMAT_MACHO, - UnknownFormat = AVIAN_FORMAT_UNKNOWN - }; - - enum Architecture { - x86 = AVIAN_ARCH_X86, - x86_64 = AVIAN_ARCH_X86_64, - Arm = AVIAN_ARCH_ARM, - Arm64 = AVIAN_ARCH_ARM64, - UnknownArch = AVIAN_ARCH_UNKNOWN - }; - - const Format format; - const Architecture arch; - - static Format formatFromString(const char* format); - static Architecture archFromString(const char* arch); - - inline PlatformInfo(Format format, Architecture arch) - : format(format), arch(arch) - { - } - - inline bool operator==(const PlatformInfo& other) - { - return format == other.format && arch == other.arch; - } -}; - -class Platform { - private: - Platform* next; - static Platform* first; - - public: - PlatformInfo info; - - inline Platform(PlatformInfo info) : next(first), info(info) - { - first = this; - } - - enum AccessFlags { Writable = 1 << 0, Executable = 1 << 1 }; - - virtual bool writeObject(OutputStream* out, - util::Slice symbols, - util::Slice data, - unsigned accessFlags, - unsigned alignment) = 0; - - static Platform* getPlatform(PlatformInfo info); -}; - -} // namespace tools - -} // namespace avian - -#endif diff --git a/sgx-jvm/avian/include/avian/util/abort.h b/sgx-jvm/avian/include/avian/util/abort.h deleted file mode 100644 index c1c1e98010..0000000000 --- a/sgx-jvm/avian/include/avian/util/abort.h +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_ABORT_H -#define AVIAN_UTIL_ABORT_H - -// TODO: remove reference back into the source directory! -// Note: this is needed for UNLIKELY -#include - -namespace avian { -namespace util { - -class Aborter { - public: - virtual void NO_RETURN abort() = 0; -}; - -inline Aborter* getAborter(Aborter* a) -{ - return a; -} - -template -inline void NO_RETURN abort(T t) -{ - getAborter(t)->abort(); - ::abort(); -} - -template -inline void expect(T t, bool v) -{ - if (UNLIKELY(!v)) { - abort(t); - } -} - -#ifdef NDEBUG -#define assertT(t, v) -#else -template -inline void assertT(T t, bool v) -{ - expect(t, v); -} -#endif - -} // namespace util -} // namespace avian - -#endif // AVIAN_UTIL_ABORT_H diff --git a/sgx-jvm/avian/include/avian/util/allocator.h b/sgx-jvm/avian/include/avian/util/allocator.h deleted file mode 100644 index 7060a759ef..0000000000 --- a/sgx-jvm/avian/include/avian/util/allocator.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_ALLOCATOR_H -#define AVIAN_UTIL_ALLOCATOR_H - -#include - -namespace avian { -namespace util { - -class AllocOnly { - public: - virtual void* allocate(size_t size) = 0; -}; - -class Alloc : public AllocOnly { - public: - virtual void free(const void* p, size_t size) = 0; -}; - -class Allocator : public Alloc { - public: - virtual void* tryAllocate(size_t size) = 0; -}; - -} // namespace util -} // namespace avian - -inline void* operator new(size_t size, avian::util::AllocOnly* allocator) -{ - return allocator->allocate(size); -} - -#endif // AVIAN_UTIL_ALLOCATOR_H diff --git a/sgx-jvm/avian/include/avian/util/arg-parser.h b/sgx-jvm/avian/include/avian/util/arg-parser.h deleted file mode 100644 index 83f089f983..0000000000 --- a/sgx-jvm/avian/include/avian/util/arg-parser.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_ARG_PARSER_H -#define AVIAN_UTIL_ARG_PARSER_H - -namespace avian { -namespace util { - -class Arg; - -class ArgParser { - public: - ArgParser(); - - bool parse(int ac, const char* const* av); - void printUsage(const char* exe); - - private: - friend class Arg; - - Arg* first; - Arg** last; -}; - -class Arg { - public: - Arg* next; - bool required; - const char* name; - const char* desc; - - const char* value; - - Arg(ArgParser& parser, bool required, const char* name, const char* desc); -}; - -} // namespace avian -} // namespace util - -#endif // AVIAN_UTIL_ARG_PARSER_H diff --git a/sgx-jvm/avian/include/avian/util/assert.h b/sgx-jvm/avian/include/avian/util/assert.h deleted file mode 100644 index ab6cee63ed..0000000000 --- a/sgx-jvm/avian/include/avian/util/assert.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (c) 2008-2013, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_ASSERT_H -#define AVIAN_UTIL_ASSERT_H - -#include - -namespace avian { -namespace util { - -#define UNREACHABLE_ ::abort() - -// TODO: print msg in debug mode -#define UNREACHABLE(msg) ::abort() - -#define ASSERT(that) \ - if (!(that)) { \ - UNREACHABLE(#that); \ - } - -} // namespace util -} // namespace avian - -#endif // AVIAN_UTIL_ASSERT_H diff --git a/sgx-jvm/avian/include/avian/util/cpp.h b/sgx-jvm/avian/include/avian/util/cpp.h deleted file mode 100644 index bbe1ff56f7..0000000000 --- a/sgx-jvm/avian/include/avian/util/cpp.h +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_CPP_H -#define AVIAN_UTIL_CPP_H - -#include "allocator.h" -#include "math.h" -#include "assert.h" - -namespace avian { -namespace util { - -template -struct NonConst; - -template -struct NonConst { - typedef T Type; -}; - -template -struct NonConst { - typedef T Type; -}; - -template -struct ArgumentCount; - -template -struct ArgumentCount { - enum { Result = 1 + ArgumentCount::Result }; -}; - -template <> -struct ArgumentCount<> { - enum { Result = 0 }; -}; - -template -void setArrayElements(T*) { -} - -template -void setArrayElements(T* arr, T elem, Ts... ts) { - *arr = elem; - setArrayElements(arr, ts...); -} - -} // namespace util -} // namespace avian - -#endif // AVIAN_UTIL_CPP_H diff --git a/sgx-jvm/avian/include/avian/util/fixed-allocator.h b/sgx-jvm/avian/include/avian/util/fixed-allocator.h deleted file mode 100644 index fa5a2c66b2..0000000000 --- a/sgx-jvm/avian/include/avian/util/fixed-allocator.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_FIXED_ALLOCATOR_H -#define AVIAN_UTIL_FIXED_ALLOCATOR_H - -#include "allocator.h" -#include "abort.h" -#include "slice.h" - -namespace avian { -namespace util { - -// An Allocator that allocates, bump-pointer style, out of a pre-defined chunk -// of memory. -class FixedAllocator : public Alloc { - public: - FixedAllocator(Aborter* a, Slice memory); - - virtual void* tryAllocate(size_t size); - - void* allocate(size_t size, unsigned padAlignment); - - virtual void* allocate(size_t size); - - virtual void free(const void* p, size_t size); - - Aborter* a; - Slice memory; - size_t offset; -}; - -} // namespace util -} // namespace avian - -#endif // AVIAN_UTIL_FIXED_ALLOCATOR_H diff --git a/sgx-jvm/avian/include/avian/util/hash.h b/sgx-jvm/avian/include/avian/util/hash.h deleted file mode 100644 index c9342b5a5f..0000000000 --- a/sgx-jvm/avian/include/avian/util/hash.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_HASH_H -#define AVIAN_UTIL_HASH_H - -#include "slice.h" - -namespace avian { -namespace util { - -inline uint32_t hash(const char* s) -{ - uint32_t h = 0; - for (unsigned i = 0; s[i]; ++i) { - h = (h * 31) + s[i]; - } - return h; -} - -inline uint32_t hash(Slice data) -{ - const uint8_t* s = data.begin(); - uint32_t h = 0; - for (size_t i = 0; i < data.count; ++i) { - h = (h * 31) + s[i]; - } - return h; -} - -inline uint32_t hash(Slice data) -{ - return hash(Slice( - reinterpret_cast(data.begin()), data.count)); -} - -inline uint32_t hash(Slice data) -{ - const uint16_t* s = data.begin(); - uint32_t h = 0; - for (size_t i = 0; i < data.count; ++i) { - h = (h * 31) + s[i]; - } - return h; -} - -} // namespace util -} // namespace avian - -#endif // AVIAN_UTIL_HASH_H diff --git a/sgx-jvm/avian/include/avian/util/list.h b/sgx-jvm/avian/include/avian/util/list.h deleted file mode 100644 index b268176044..0000000000 --- a/sgx-jvm/avian/include/avian/util/list.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_LIST_H -#define AVIAN_UTIL_LIST_H - -#include "allocator.h" - -namespace avian { -namespace util { - -template -class List { - public: - List(const T& item, List* next) : item(item), next(next) - { - } - - unsigned count() - { - unsigned count = 0; - List* c = this; - while (c) { - ++count; - c = c->next; - } - return count; - } - - T item; - List* next; -}; - -} // namespace util -} // namespace avian - -#endif // AVIAN_UTIL_LIST_H diff --git a/sgx-jvm/avian/include/avian/util/math.h b/sgx-jvm/avian/include/avian/util/math.h deleted file mode 100644 index 36a4ca0513..0000000000 --- a/sgx-jvm/avian/include/avian/util/math.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_MATH_H -#define AVIAN_UTIL_MATH_H - -#undef max -#undef min - -namespace avian { -namespace util { - -inline unsigned max(unsigned a, unsigned b) -{ - return (a > b ? a : b); -} - -inline unsigned min(unsigned a, unsigned b) -{ - return (a < b ? a : b); -} - -inline unsigned avg(unsigned a, unsigned b) -{ - return (a + b) / 2; -} - -inline unsigned ceilingDivide(unsigned n, unsigned d) -{ - return (n + d - 1) / d; -} - -inline bool powerOfTwo(unsigned n) -{ - for (; n > 2; n >>= 1) - if (n & 1) - return false; - return true; -} - -inline unsigned nextPowerOfTwo(unsigned n) -{ - unsigned r = 1; - while (r < n) - r <<= 1; - return r; -} - -inline unsigned log(unsigned n) -{ - unsigned r = 0; - for (unsigned i = 1; i < n; ++r) - i <<= 1; - return r; -} - -} // namespace util -} // namespace avian - -#endif // AVIAN_UTIL_MATH_H diff --git a/sgx-jvm/avian/include/avian/util/runtime-array.h b/sgx-jvm/avian/include/avian/util/runtime-array.h deleted file mode 100644 index d89ad1884d..0000000000 --- a/sgx-jvm/avian/include/avian/util/runtime-array.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_RUNTIME_ARRAY_H -#define AVIAN_UTIL_RUNTIME_ARRAY_H - -#ifdef _MSC_VER - -template -class RuntimeArray { - public: - RuntimeArray(unsigned size) : body(static_cast(malloc(size * sizeof(T)))) - { - } - - ~RuntimeArray() - { - free(body); - } - - T* body; -}; - -#define RUNTIME_ARRAY(type, name, size) RuntimeArray name(size); -#define RUNTIME_ARRAY_BODY(name) name.body - -#else // not _MSC_VER - -#define RUNTIME_ARRAY(type, name, size) type name##_body[size]; -#define RUNTIME_ARRAY_BODY(name) name##_body - -#endif - -#endif // AVIAN_UTIL_RUNTIME_ARRAY_H diff --git a/sgx-jvm/avian/include/avian/util/slice.h b/sgx-jvm/avian/include/avian/util/slice.h deleted file mode 100644 index b8877819c0..0000000000 --- a/sgx-jvm/avian/include/avian/util/slice.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_SLICE_H -#define AVIAN_UTIL_SLICE_H - -#include "allocator.h" -#include "math.h" -#include "assert.h" -#include "cpp.h" - -namespace avian { -namespace util { - -template -class Slice { - public: - T* items; - size_t count; - - inline Slice(T* items, size_t count) : items(items), count(count) - { - } - - inline Slice(const Slice::Type>& copy) - : items(copy.items), count(copy.count) - { - } - - inline T& operator[](size_t index) - { - ASSERT(index < count); - return items[index]; - } - - inline T* begin() - { - return items; - } - - inline T* end() - { - return items + count; - } - - inline Slice subslice(size_t begin, size_t count) - { - ASSERT(begin <= this->count); - ASSERT(begin + count <= this->count); - return Slice(this->begin() + begin, count); - } - - static Slice alloc(AllocOnly* a, size_t count) - { - return Slice((T*)a->allocate(sizeof(T) * count), count); - } - - static Slice allocAndSet(AllocOnly* a, size_t count, const T& item) - { - Slice slice(alloc(a, count)); - for (size_t i = 0; i < count; i++) { - slice[i] = item; - } - return slice; - } - - Slice clone(AllocOnly* a, size_t newCount) - { - T* newItems = (T*)a->allocate(newCount * sizeof(T)); - memcpy(newItems, items, min(count, newCount) * sizeof(T)); - return Slice(newItems, newCount); - } - - Slice cloneAndSet(AllocOnly* a, size_t newCount, const T& item) - { - Slice slice(clone(a, newCount)); - for (size_t i = count; i < newCount; i++) { - slice[i] = item; - } - return slice; - } - - void resize(Alloc* a, size_t newCount) - { - Slice slice(clone(a, newCount)); - a->free(items, count); - *this = slice; - } -}; - -} // namespace util -} // namespace avian - -#endif // AVIAN_UTIL_SLICE_H diff --git a/sgx-jvm/avian/include/avian/util/stream.h b/sgx-jvm/avian/include/avian/util/stream.h deleted file mode 100644 index f957dc90de..0000000000 --- a/sgx-jvm/avian/include/avian/util/stream.h +++ /dev/null @@ -1,126 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef STREAM_H -#define STREAM_H - -#include "avian/common.h" - -namespace vm { - -class AbstractStream { - public: - class Client { - public: - virtual void handleError() = 0; - }; - - AbstractStream(Client* client, unsigned size) - : client(client), size(size), position_(0) - { - } - - unsigned position() - { - return position_; - } - - void setPosition(unsigned p) - { - position_ = p; - } - - void skip(unsigned size) - { - if (size > this->size - position_) { - client->handleError(); - } else { - position_ += size; - } - } - - void read(uint8_t* dst, unsigned size) - { - if (size > this->size - position_) { - memset(dst, 0, size); - - client->handleError(); - } else { - copy(dst, position_, size); - position_ += size; - } - } - - uint8_t read1() - { - uint8_t v; - read(&v, 1); - return v; - } - - uint16_t read2() - { - uint16_t a = read1(); - uint16_t b = read1(); - return (a << 8) | b; - } - - uint32_t read4() - { - uint32_t a = read2(); - uint32_t b = read2(); - return (a << 16) | b; - } - - uint64_t read8() - { - uint64_t a = read4(); - uint64_t b = read4(); - return (a << 32) | b; - } - - uint32_t readFloat() - { - return read4(); - } - - uint64_t readDouble() - { - return read8(); - } - - protected: - virtual void copy(uint8_t* dst, unsigned offset, unsigned size) = 0; - - private: - Client* client; - unsigned size; - unsigned position_; -}; - -class Stream : public AbstractStream { - public: - Stream(Client* client, const uint8_t* data, unsigned size) - : AbstractStream(client, size), data(data) - { - } - - private: - virtual void copy(uint8_t* dst, unsigned offset, unsigned size) - { - memcpy(dst, data + offset, size); - } - - const uint8_t* data; -}; - -} // namespace vm - -#endif // STREAM_H diff --git a/sgx-jvm/avian/include/avian/util/string.h b/sgx-jvm/avian/include/avian/util/string.h deleted file mode 100644 index 436bdeacd9..0000000000 --- a/sgx-jvm/avian/include/avian/util/string.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_STRING_H -#define AVIAN_UTIL_STRING_H - -#include - -namespace avian { -namespace util { - -class String { - public: - const char* text; - size_t length; - - String(const char* text) : text(text), length(strlen(text)) - { - } - - inline String(const char* text, size_t length) : text(text), length(length) - { - } -}; - -} // namespace util -} // namespace avain - -#endif // AVIAN_UTIL_STRING_H diff --git a/sgx-jvm/avian/include/avian/util/tokenizer.h b/sgx-jvm/avian/include/avian/util/tokenizer.h deleted file mode 100644 index 0b790314b5..0000000000 --- a/sgx-jvm/avian/include/avian/util/tokenizer.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_UTIL_TOKENIZER_H -#define AVIAN_UTIL_TOKENIZER_H - -#include "string.h" - -namespace avian { -namespace util { - -class Tokenizer { - public: - Tokenizer(const char* s, char delimiter) - : s(s), limit(0), delimiter(delimiter) - { - } - - Tokenizer(String str, char delimiter) - : s(str.text), limit(str.text + str.length), delimiter(delimiter) - { - } - - bool hasMore() - { - while (s != limit and *s == delimiter) - ++s; - return s != limit and *s != 0; - } - - String next() - { - const char* p = s; - while (s != limit and *s and *s != delimiter) - ++s; - return String(p, s - p); - } - - const char* s; - const char* limit; - char delimiter; -}; - -} // namespace util -} // namespace avain - -#endif // AVIAN_UTIL_TOKENIZER_H diff --git a/sgx-jvm/avian/makefile b/sgx-jvm/avian/makefile deleted file mode 100755 index aa5e964862..0000000000 --- a/sgx-jvm/avian/makefile +++ /dev/null @@ -1,2393 +0,0 @@ -MAKEFLAGS = -s - -name = avian -version := $(shell grep version gradle.properties | cut -d'=' -f2) - -java-version := $(shell "$(JAVA_HOME)/bin/java" -version 2>&1 \ - | grep 'version "1' \ - | sed 's/.*version "1.\([^.]*\).*/\1/') - -build-arch := $(shell uname -m \ - | sed 's/^i.86$$/i386/' \ - | sed 's/^x86pc$$/i386/' \ - | sed 's/amd64/x86_64/' \ - | sed 's/^arm.*$$/arm/' \ - | sed 's/aarch64/arm64/') - -build-platform := \ - $(shell uname -s | tr [:upper:] [:lower:] \ - | sed \ - -e 's/^mingw64.*$$/mingw32/' \ - -e 's/^mingw32.*$$/mingw32/' \ - -e 's/^cygwin.*$$/cygwin/' \ - -e 's/^darwin.*$$/macosx/') - -arch = $(build-arch) -target-arch = $(arch) - -bootimage-platform = \ - $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform))) - -platform = $(bootimage-platform) - -codegen-targets = native - -mode = fast -process = compile - -ifneq ($(process),compile) - options := -$(process) -endif -ifneq ($(mode),fast) - options := $(options)-$(mode) -endif -ifneq ($(lzma),) - options := $(options)-lzma -endif -ifeq ($(bootimage),true) - options := $(options)-bootimage - ifeq ($(bootimage-test),true) - # this option indicates that we should AOT-compile the test - # classes as well as the class library - options := $(options)-test - endif -endif -ifeq ($(tails),true) - options := $(options)-tails -endif -ifeq ($(continuations),true) - options := $(options)-continuations -endif -ifeq ($(codegen-targets),all) - options := $(options)-all -endif - -ifeq ($(filter debug debug-fast fast stress stress-major small,$(mode)),) - x := $(error "'$(mode)' is not a valid mode (choose one of: debug debug-fast fast stress stress-major small)") -endif - -ifeq ($(filter compile interpret,$(process)),) - x := $(error "'$(process)' is not a valid process (choose one of: compile interpret)") -endif - -ifeq ($(filter x86_64 i386 arm arm64,$(arch)),) - x := $(error "'$(arch)' is not a supported architecture (choose one of: x86_64 i386 arm arm64)") -endif - -ifeq ($(platform),darwin) - x := $(error "please use 'platform=macosx' or 'platform=ios' instead of 'platform=$(platform)'") -endif - -ifneq ($(ios),) - x := $(error "please use 'platform=ios' instead of 'ios=true'") -endif - -ifeq ($(filter linux windows macosx ios freebsd,$(platform)),) - x := $(error "'$(platform)' is not a supported platform (choose one of: linux windows macosx ios freebsd)") -endif - -ifeq ($(platform),macosx) - ifneq ($(filter arm arm64,$(arch)),) - x := $(error "please use ('arch=arm' or 'arch=arm64') 'platform=ios' to build for ios-arm") - endif -endif - -ifeq ($(platform),ios) - ifeq ($(filter i386 x86_64 arm arm64,$(arch)),) - x := $(error "please specify 'arch=i386', 'arch=x86_64', 'arch=arm', or 'arch=arm64' with 'platform=ios'") - endif -endif - -ifeq ($(bootimage-test),true) - ifneq ($(bootimage),true) - x := $(error "bootimage-test=true only works when bootimage=true") - endif -endif - -aot-only = false -root := $(shell (cd .. && pwd)) -build = build/$(platform)-$(arch)$(options) -host-build-root = $(build)/host -classpath-build = $(build)/classpath -test-build = $(build)/test -src = src -classpath-src = classpath -test = test -unittest = unittest -win32 ?= $(root)/win32 -win64 ?= $(root)/win64 -winrt ?= $(root)/winrt -wp8 ?= $(root)/wp8 - -classpath = avian - -bootimage-classpath = $(classpath-build) - -ifeq ($(bootimage-test),true) - bootimage-classpath = $(classpath-build):$(test-build) -endif - -ifeq ($(use-werror),true) - werror = -Werror -endif - -test-executable = $(shell pwd)/$(executable) -boot-classpath = $(classpath-build) -embed-prefix = /avian-embedded - -native-path = echo - -platform-kernel = $(subst macosx,darwin,$(subst ios,darwin,$1)) - -build-kernel = $(call platform-kernel,$(build-platform)) -kernel = $(call platform-kernel,$(platform)) - -ifeq ($(build-platform),cygwin) - native-path = cygpath -m -endif - -windows-path = echo - -path-separator = : - -ifneq (,$(filter mingw32 cygwin,$(build-platform))) - path-separator = ; -endif - -target-path-separator = : - -ifeq ($(platform),windows) - target-path-separator = ; -endif - -library-path-variable = LD_LIBRARY_PATH - -ifeq ($(build-kernel),darwin) - library-path-variable = DYLD_LIBRARY_PATH -endif - -library-path = $(library-path-variable)=$(build) - - - -ifneq ($(openjdk),) - openjdk-version := $(shell $(openjdk)/bin/java -version 2>&1 \ - | grep 'version "1' \ - | sed 's/.*version "1.\([^.]*\).*/\1/') - - openjdk-arch = $(arch) - ifeq ($(arch),x86_64) - openjdk-arch = amd64 - endif - - ifneq ($(android),) - x := $(error "android and openjdk are incompatible") - endif - - ifeq ($(openjdk-image),) - openjdk-image = $(openjdk)/jre - endif - - ifneq ($(openjdk-src),) - include openjdk-src.mk - options := $(options)-openjdk-src - classpath-objects = $(openjdk-objects) $(openjdk-local-objects) - classpath-cflags = -DAVIAN_OPENJDK_SRC -DBOOT_JAVAHOME - openjdk-jar-dep = $(build)/openjdk-jar.dep - classpath-jar-dep = $(openjdk-jar-dep) - javahome = $(embed-prefix)/javahomeJar - javahome-files = lib/currency.data lib/security/java.security \ - lib/security/java.policy lib/security/cacerts - - ifneq (,$(wildcard $(openjdk)/jre/lib/zi)) - javahome-files += lib/zi - endif - - ifneq (,$(wildcard $(openjdk)/jre/lib/tzdb.dat)) - javahome-files += lib/tzdb.dat - endif - - local-policy = lib/security/local_policy.jar - ifneq (,$(wildcard $(openjdk)/jre/$(local-policy))) - javahome-files += $(local-policy) - endif - - export-policy = lib/security/US_export_policy.jar - ifneq (,$(wildcard $(openjdk)/jre/$(export-policy))) - javahome-files += $(export-policy) - endif - - ifeq ($(platform),windows) - javahome-files += lib/tzmappings - endif - javahome-object = $(build)/javahome-jar.o - boot-javahome-object = $(build)/boot-javahome.o - stub-sources = $(src)/openjdk/stubs.cpp - stub-objects = $(call cpp-objects,$(stub-sources),$(src),$(build)) - else - soname-flag = -Wl,-soname -Wl,$(so-prefix)jvm$(so-suffix) - version-script-flag = -Wl,--version-script=openjdk.ld - options := $(options)-openjdk - test-executable = $(shell pwd)/$(executable-dynamic) - ifeq ($(build-kernel),darwin) - library-path = \ - $(library-path-variable)=$(build):$(openjdk)/jre/lib - else - library-path = \ - $(library-path-variable)=$(build):$(openjdk)/jre/lib/$(openjdk-arch) - endif - javahome = "$$($(native-path) "$(openjdk)/jre")" - endif - - ifeq ($(openjdk-image),) - openjdk-image = $(openjdk)/jre - endif - - classpath = openjdk - boot-classpath := "$(boot-classpath)$(path-separator)$$($(native-path) "$(openjdk)/jre/lib/rt.jar")" - build-javahome = $(openjdk)/jre -endif - -ifneq ($(android),) - options := $(options)-android - classpath-jar-dep = $(build)/android.dep - luni-native = $(android)/libcore/luni/src/main/native - classpath-cflags = -DBOOT_JAVAHOME - android-cflags = -I$(luni-native) \ - -I$(android)/libnativehelper/include/nativehelper \ - -I$(android)/libnativehelper \ - -I$(android)/system/core/include \ - -I$(android)/external/zlib \ - -I$(android)/external/icu4c/i18n \ - -I$(android)/external/icu4c/common \ - -I$(android)/external/expat \ - -I$(android)/external/openssl/include \ - -I$(android)/external/openssl \ - -I$(android)/libcore/include \ - -I$(build)/android-src/external/fdlibm \ - -I$(build)/android-src \ - -fno-exceptions \ - -D_FILE_OFFSET_BITS=64 \ - -DOS_SHARED_LIB_FORMAT_STR="\"$(so-prefix)%s$(so-suffix)\"" \ - -DJNI_JARJAR_PREFIX= \ - -D__DARWIN_UNIX03=1 \ - -D__PROVIDE_FIXMES \ - -DSTATIC_LIB \ - -D__STDC_FORMAT_MACROS=1 \ - -g3 \ - -Wno-shift-count-overflow - - # on Windows (in MinGW-based build) there are neither __BEGIN_DECLS nor __END_DECLS - # defines; we don't want to patch every file that uses them, so we stub them in - # using CFLAGS mechanism - # Also we have off64_t defined in mingw-w64 headers, so let's tell that - ifeq ($(platform),windows) - android-cflags += "-D__BEGIN_DECLS=extern \"C\" {" "-D__END_DECLS=}" "-DHAVE_OFF64_T" - endif - - luni-cpps := $(shell find $(luni-native) -name '*.cpp') - - libziparchive-native := $(android)/system/core/libziparchive - libziparchive-ccs := $(libziparchive-native)/zip_archive.cc - - libutils-native := $(android)/system/core/libutils - libutils-cpps := $(libutils-native)/FileMap.cpp - - libnativehelper-native := $(android)/libnativehelper - libnativehelper-cpps := $(libnativehelper-native)/JniConstants.cpp \ - $(libnativehelper-native)/toStringArray.cpp - - crypto-native := $(android)/external/conscrypt/src/main/native - crypto-cpps := $(crypto-native)/org_conscrypt_NativeCrypto.cpp - - ifeq ($(platform),windows) - android-cflags += -D__STDC_CONSTANT_MACROS -DHAVE_WIN32_FILEMAP -D__STDC_FORMAT_MACROS - blacklist = $(luni-native)/java_io_Console.cpp \ - $(luni-native)/java_lang_ProcessManager.cpp - - icu-libs := $(android)/external/icu4c/lib/libsicuin.a \ - $(android)/external/icu4c/lib/libsicuuc.a \ - $(android)/external/icu4c/lib/sicudt.a - platform-lflags := -lgdi32 -lshlwapi -lwsock32 -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic - else - android-cflags += -fPIC -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP - blacklist = - - icu-libs := $(android)/external/icu4c/lib/libicui18n.a \ - $(android)/external/icu4c/lib/libicuuc.a \ - $(android)/external/icu4c/lib/libicudata.a - endif - luni-cpps := $(filter-out $(blacklist),$(luni-cpps)) - - classpath-lflags := \ - $(icu-libs) \ - $(android)/external/fdlibm/libfdm.a \ - $(android)/external/expat/.libs/libexpat.a \ - $(android)/openssl-upstream/libssl.a \ - $(android)/openssl-upstream/libcrypto.a \ - $(platform-lflags) \ - -lstdc++ - - ifeq ($(platform),linux) - android-cflags += -DHAVE_OFF64_T - classpath-lflags += -lrt - endif - - classpath-objects = \ - $(call cpp-objects,$(luni-cpps),$(luni-native),$(build)) \ - $(call cpp-objects,$(crypto-cpps),$(crypto-native),$(build)) \ - $(call cpp-objects,$(libnativehelper-cpps),$(libnativehelper-native),$(build)) \ - $(call cc-objects,$(libziparchive-ccs),$(libziparchive-native),$(build)) \ - $(call cpp-objects,$(libutils-cpps),$(libutils-native),$(build)) - luni-java = $(android)/libcore/luni/src/main/java - - luni-blacklist = \ - $(luni-java)/libcore/reflect/AnnotationAccess.java - - luni-javas := \ - $(filter-out $(luni-blacklist),$(shell find $(luni-java) -name '*.java')) - - luni-nonjavas := $(shell find $(luni-java) -not -type d -not -name '*.java') - luni-copied-nonjavas = $(call noop-files,$(luni-nonjavas),$(luni-java),) - - crypto-java = $(android)/external/conscrypt/src/main/java - crypto-javas := $(shell find $(crypto-java) -name '*.java') - - crypto-platform-java = $(android)/external/conscrypt/src/platform/java - crypto-platform-javas := $(shell find $(crypto-platform-java) -name '*.java') - - dalvik-java = $(android)/libcore/dalvik/src/main/java - dalvik-javas := \ - $(dalvik-java)/dalvik/system/DalvikLogHandler.java \ - $(dalvik-java)/dalvik/system/CloseGuard.java \ - $(dalvik-java)/dalvik/system/VMDebug.java \ - $(dalvik-java)/dalvik/system/BlockGuard.java \ - $(dalvik-java)/dalvik/system/SocketTagger.java \ - $(dalvik-java)/dalvik/system/DalvikLogging.java \ - - libart-java = $(android)/libcore/libart/src/main/java - libart-javas := \ - $(libart-java)/dalvik/system/VMRuntime.java \ - $(libart-java)/dalvik/system/VMStack.java \ - $(libart-java)/java/lang/Thread.java \ - $(libart-java)/java/lang/ThreadGroup.java \ - $(libart-java)/java/lang/Enum.java \ - $(libart-java)/java/lang/String.java \ - $(libart-java)/java/lang/ref/Reference.java \ - $(libart-java)/java/lang/reflect/AccessibleObject.java \ - - xml-java = $(android)/libcore/xml/src/main/java - xml-javas := $(shell find $(xml-java) -name '*.java') - - okhttp-android-java = $(android)/external/okhttp/android/main/java - okhttp-android-javas := $(shell find $(okhttp-android-java) -name '*.java') - - okhttp-java = $(android)/external/okhttp/okhttp/src/main/java - okhttp-javas := $(shell find $(okhttp-java) -name '*.java') - - okio-java = $(android)/external/okhttp/okio/src/main/java - okio-javas := $(shell find $(okio-java) -name '*.java') - - bcpkix-java = $(android)/external/bouncycastle/bcpkix/src/main/java - bcpkix-javas := $(shell find $(bcpkix-java) -name '*.java') - - bcprov-java = $(android)/external/bouncycastle/bcprov/src/main/java - bcprov-javas := $(shell find $(bcprov-java) -name '*.java') - - android-classes = \ - $(call java-classes,$(luni-javas),$(luni-java),$(build)/android) \ - $(call java-classes,$(crypto-javas),$(crypto-java),$(build)/android) \ - $(call java-classes,$(crypto-platform-javas),$(crypto-platform-java),$(build)/android) \ - $(call java-classes,$(dalvik-javas),$(dalvik-java),$(build)/android) \ - $(call java-classes,$(libart-javas),$(libart-java),$(build)/android) \ - $(call java-classes,$(xml-javas),$(xml-java),$(build)/android) \ - $(call java-classes,$(okhttp-javas),$(okhttp-java),$(build)/android) \ - $(call java-classes,$(okhttp-android-javas),$(okhttp-android-java),$(build)/android) \ - $(call java-classes,$(okio-javas),$(okio-java),$(build)/android) \ - $(call java-classes,$(bcpkix-javas),$(bcpkix-java),$(build)/android) \ - $(call java-classes,$(bcprov-javas),$(bcprov-java),$(build)/android) - - classpath = android - - javahome-files = tzdata - javahome-object = $(build)/javahome-jar.o - boot-javahome-object = $(build)/boot-javahome.o - build-javahome = $(android)/bionic/libc/zoneinfo - stub-sources = $(src)/android/stubs.cpp - stub-objects = $(call cpp-objects,$(stub-sources),$(src),$(build)) -endif - -ifeq ($(classpath),avian) - jni-sources := $(shell find $(classpath-src) -name '*.cpp') - jni-objects = $(call cpp-objects,$(jni-sources),$(classpath-src),$(build)) - classpath-objects = $(jni-objects) -endif - -input = List - -ifeq ($(use-clang),true) - build-cxx = clang++ -std=c++11 - build-cc = clang -else - build-cxx = g++ - build-cc = gcc -endif - -mflag = -ifneq ($(kernel),darwin) - ifeq ($(arch),i386) - mflag = -m32 - endif - ifeq ($(arch),x86_64) - mflag = -m64 - endif -endif - -target-format = elf - -cxx = $(build-cxx) $(mflag) -cc = $(build-cc) $(mflag) - -ar = ar -ranlib = ranlib -dlltool = dlltool -vg = nice valgrind --num-callers=32 --db-attach=yes --freelist-vol=100000000 -vg += --leak-check=full --suppressions=valgrind.supp -db = gdb --args -javac = "$(JAVA_HOME)/bin/javac" -encoding UTF-8 -javah = "$(JAVA_HOME)/bin/javah" -jar = "$(JAVA_HOME)/bin/jar" -strip = strip -strip-all = --strip-all - -rdynamic = -rdynamic - -cflags_debug = -O0 -g3 -cflags_debug_fast = -O0 -g3 -cflags_stress = -O0 -g3 -cflags_stress_major = -O0 -g3 -ifeq ($(use-clang),true) - cflags_fast = -O3 -g3 - cflags_small = -Oz -g3 -else - cflags_fast = -O3 -g3 - cflags_small = -Os -g3 -endif - -# note that we suppress the non-virtual-dtor warning because we never -# use the delete operator, which means we don't need virtual -# destructors: -warnings = -Wall -Wextra $(werror) -Wunused-parameter -Winit-self \ - -Wno-non-virtual-dtor - -target-cflags = -DTARGET_BYTES_PER_WORD=$(pointer-size) - -common-cflags = $(warnings) -std=c++0x -fno-rtti -fno-exceptions -I$(classpath-src) \ - "-I$(JAVA_HOME)/include" -I$(src) -I$(build) -Iinclude $(classpath-cflags) \ - -D__STDC_LIMIT_MACROS -D_JNI_IMPLEMENTATION_ -DAVIAN_VERSION=\"$(version)\" \ - -DAVIAN_INFO="\"$(info)\"" \ - -DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \ - -DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\" $(target-cflags) - -asmflags = $(target-cflags) -I$(src) - -ifneq (,$(filter i386 x86_64,$(arch))) - ifeq ($(use-frame-pointer),true) - common-cflags += -fno-omit-frame-pointer -DAVIAN_USE_FRAME_POINTER - asmflags += -DAVIAN_USE_FRAME_POINTER - endif -endif - -build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \ - "-I$(JAVA_HOME)/include/linux" $(extra-build-cflags) -I$(src) -pthread - -converter-cflags = -D__STDC_CONSTANT_MACROS -std=c++0x -Iinclude/ -Isrc/ \ - -fno-rtti -fno-exceptions \ - -DAVIAN_TARGET_ARCH=AVIAN_ARCH_UNKNOWN \ - -DAVIAN_TARGET_FORMAT=AVIAN_FORMAT_UNKNOWN \ - -Wall -Wextra $(werror) -Wunused-parameter -Winit-self -Wno-non-virtual-dtor - -cflags = $(build-cflags) - -common-lflags = -lm -lz - -ifeq ($(use-clang),true) - ifeq ($(build-kernel),darwin) - common-lflags += -Wl,-export_dynamic - else - ifneq ($(platform),windows) - common-lflags += -Wl,-E - else - common-lflags += -Wl,--export-all-symbols - endif - endif -endif - -build-lflags = -lz -lpthread -ldl - -lflags = $(common-lflags) -lpthread -ldl - -build-system = posix - -system = posix -asm = x86 - -ifeq ($(system),sgx) - cflags += -DSGX -I../linux-sgx/common/inc -I../jvm-enclave/common - lflags += $(shared) -endif - -pointer-size = 8 - -so-prefix = lib -so-suffix = .so - -static-prefix = lib -static-suffix = .a - -output = -o $(1) -asm-output = -o $(1) -asm-input = -c $(1) -asm-format = S -as = $(cc) -ld = $(cc) -build-ld = $(build-cc) -build-ld-cpp = $(build-cxx) - -default-remote-test-host = localhost -default-remote-test-port = 22 -ifeq ($(remote-test-host),) - remote-test-host = $(default-remote-test-host) -else - remote-test = true -endif -ifeq ($(remote-test-port),) - remote-test-port = $(default-remote-test-port) -else - remote-test = true -endif -remote-test-user = ${USER} -remote-test-dir = /tmp/avian-test-${USER} - -static = -static -shared = -shared - -rpath = -Wl,-rpath=\$$ORIGIN -Wl,-z,origin - -openjdk-extra-cflags = -fvisibility=hidden - -bootimage-cflags = -DTARGET_BYTES_PER_WORD=$(pointer-size) -bootimage-symbols = _binary_bootimage_bin_start:_binary_bootimage_bin_end -codeimage-symbols = _binary_codeimage_bin_start:_binary_codeimage_bin_end - -developer-dir := $(shell if test -d /Developer/Platforms/$(target).platform/Developer/SDKs; then echo /Developer; \ - else echo /Applications/Xcode.app/Contents/Developer; fi) - -ifneq (,$(filter i386 arm,$(arch))) - pointer-size = 4 -endif - -ifneq (,$(filter arm arm64,$(arch))) - asm = arm - - ifneq ($(platform),ios) - ifneq ($(arch),arm64) - no-psabi = -Wno-psabi - cflags += -marm $(no-psabi) - - # By default, assume we can't use armv7-specific instructions on - # non-iOS platforms. Ideally, we'd detect this at runtime. - armv6=true - endif - endif - - ifneq ($(arch),$(build-arch)) - ifneq ($(kernel),darwin) - ifeq ($(arch),arm64) - cxx = aarch64-linux-gnu-g++ - cc = aarch64-linux-gnu-gcc - ar = aarch64-linux-gnu-ar - ranlib = aarch64-linux-gnu-ranlib - strip = aarch64-linux-gnu-strip - else - cxx = arm-linux-gnueabi-g++ - cc = arm-linux-gnueabi-gcc - ar = arm-linux-gnueabi-ar - ranlib = arm-linux-gnueabi-ranlib - strip = arm-linux-gnueabi-strip - endif - endif - endif -endif - -ifeq ($(armv6),true) - cflags += -DAVIAN_ASSUME_ARMV6 -endif - -ifeq ($(platform),ios) - cflags += -DAVIAN_IOS - use-lto = false -endif - -ifeq ($(build-kernel),darwin) - build-cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src) - cflags += -Wno-deprecated-declarations - build-lflags += -framework CoreFoundation -endif - -ifeq ($(platform),qnx) - cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src) - lflags = $(common-lflags) -lsocket - ifeq ($(build-platform),qnx) - build-cflags = $(common-cflags) -fPIC -fvisibility=hidden -I$(src) - build-lflags = $(common-lflags) - else - ifeq ($(arch),i386) - prefix = i486-pc-nto-qnx6.5.0- - else - prefix = arm-unknown-nto-qnx6.5.0- - endif - endif - cxx = $(prefix)g++ - cc = $(prefix)gcc - ar = $(prefix)ar - ranlib = $(prefix)ranlib - strip = $(prefix)strip - rdynamic = -Wl,--export-dynamic -endif - -ifeq ($(platform),freebsd) -# There is no -ldl on FreeBSD - build-lflags = $(common-lflags) -lz -lpthread - lflags = $(common-lflags) -lpthread -# include/freebsd instead of include/linux - build-cflags = $(common-cflags) -fPIC -fvisibility=hidden \ - "-I$(JAVA_HOME)/include/freebsd" -I$(src) -pthread - cflags = $(build-cflags) -endif -ifeq ($(platform),android) - ifeq ($(build-platform),cygwin) - ndk = "$$(cygpath -u "$(ANDROID_NDK)")" - else - ndk = $(ANDROID_NDK) - endif - - ifeq ($(android-version),) - android-version = 5 - endif - - ifeq ($(android-toolchain),) - android-toolchain = 4.7 - endif - - ifeq ($(arch),arm) - android-toolchain-name = arm-linux-androideabi - android-toolchain-prefix = arm-linux-androideabi- - endif - ifeq ($(arch),i386) - android-toolchain-name = x86 - android-toolchain-prefix = i686-linux-android- - endif - - ifeq ($(android-arm-arch),) - android-arm-arch = armv5 - endif - - options := $(options)-api$(android-version)-$(android-toolchain)-$(android-arm-arch) - - build-cflags = $(common-cflags) -I$(src) - build-lflags = -lz -lpthread - ifeq ($(subst cygwin,windows,$(subst mingw32,windows,$(build-platform))),windows) - toolchain-host-platform = $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform))) - build-system = windows - build-cxx = i686-w64-mingw32-g++ - build-cc = i686-w64-mingw32-gcc - sysroot = "$$(cygpath -w "$(ndk)/platforms/android-$(android-version)/arch-arm")" - build-cflags += "-I$(JAVA_HOME)/include/win32" - else - toolchain-host-platform = $(subst cygwin,windows,$(subst mingw32,windows,$(build-platform)))-* - sysroot = $(ndk)/platforms/android-$(android-version)/arch-arm - build-cflags += "-I$(JAVA_HOME)/include/linux" - build-lflags += -ldl - endif - toolchain = $(ndk)/toolchains/$(android-toolchain-name)-$(android-toolchain)/prebuilt/$(toolchain-host-platform) - cflags = "-I$(sysroot)/usr/include" "-I$(JAVA_HOME)/include/linux" $(common-cflags) "-I$(src)" -std=c++11 $(no-psabi) - lflags = "-L$(sysroot)/usr/lib" $(common-lflags) -llog - target-format = elf - use-lto = false - - ifeq ($(arch),arm) - cflags += -marm -march=$(android-arm-arch) -ftree-vectorize -ffast-math -mfloat-abi=softfp - endif - ifeq ($(arch),i386) - endif - - cxx = $(toolchain)/bin/$(android-toolchain-prefix)g++ --sysroot="$(sysroot)" - cc = $(toolchain)/bin/$(android-toolchain-prefix)gcc --sysroot="$(sysroot)" - as = $(cxx) - ar = $(toolchain)/bin/$(android-toolchain-prefix)ar - ranlib = $(toolchain)/bin/$(android-toolchain-prefix)ranlib - strip = $(toolchain)/bin/$(android-toolchain-prefix)strip -endif - -ifeq ($(kernel),darwin) - target-format = macho - ifeq (${OSX_SDK_SYSROOT},) - OSX_SDK_SYSROOT = 10.6u - endif - ifeq (${OSX_SDK_VERSION},) - OSX_SDK_VERSION = 10.6 - endif - ifneq ($(build-kernel),darwin) - cxx = i686-apple-darwin8-g++ $(mflag) - cc = i686-apple-darwin8-gcc $(mflag) - ar = i686-apple-darwin8-ar - ranlib = i686-apple-darwin8-ranlib - strip = i686-apple-darwin8-strip - sysroot = /opt/mac/SDKs/MacOSX${OSX_SDK_SYSROOT}.sdk - cflags = -I$(sysroot)/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Headers/ \ - $(common-cflags) -fPIC -fvisibility=hidden -I$(src) - endif - - ifneq ($(platform),ios) - platform-dir = $(developer-dir)/Platforms/MacOSX.platform - sdk-dir = $(platform-dir)/Developer/SDKs - - mac-version := $(shell \ - if test -d $(sdk-dir)/MacOSX10.11.sdk; then echo 10.11; \ - elif test -d $(sdk-dir)/MacOSX10.10.sdk; then echo 10.10; \ - elif test -d $(sdk-dir)/MacOSX10.9.sdk; then echo 10.9; \ - elif test -d $(sdk-dir)/MacOSX10.8.sdk; then echo 10.8; \ - elif test -d $(sdk-dir)/MacOSX10.7.sdk; then echo 10.7; \ - elif test -d $(sdk-dir)/MacOSX10.6.sdk; then echo 10.6; \ - else echo; fi) - - sysroot = $(sdk-dir)/MacOSX$(mac-version).sdk - endif - - soname-flag = - version-script-flag = - lflags = $(common-lflags) -ldl -framework CoreFoundation -framework Foundation - - ifeq (,$(shell ld -v 2>&1 | grep cctools)) - lflags += -Wl,-compatibility_version,1.0.0 - endif - - ifneq ($(platform),ios) - lflags += -framework CoreServices -framework SystemConfiguration \ - -framework Security - endif - ifeq ($(bootimage),true) - bootimage-lflags = -Wl,-segprot,__RWX,rwx,rwx - endif - rdynamic = - strip-all = -S -x - so-suffix = .dylib - shared = -dynamiclib - rpath = - - ifeq ($(platform),ios) - ifeq ($(sim),true) - target = iPhoneSimulator - sdk = iphonesimulator$(ios-version) - ifeq ($(arch),i386) - arch-flag = -arch i386 - else - arch-flag = -arch x86_64 - arch = x86_64 - endif - release = Release-iphonesimulator - else - target = iPhoneOS - sdk = iphoneos$(ios-version) - ifeq ($(arch),arm) - arch-flag = -arch armv7 - else - arch-flag = -arch arm64 - arch = arm64 - endif - release = Release-iphoneos - endif - - platform-dir = $(developer-dir)/Platforms/$(target).platform - sdk-dir = $(platform-dir)/Developer/SDKs - - ios-version := $(shell for x in 10.3 10.2 10.1 10.0 9.3 9.2 9.1 9.0 8.3 8.2 8.1 8.0; \ - do if test -d $(sdk-dir)/$(target)$$x.sdk \ - -o -L $(sdk-dir)/$(target)$$x.sdk; \ - then echo $$x; break; fi; done) - - ifeq ($(ios-version),) - x := $(error "couldn't find SDK in $(sdk-dir)") - endif - - sysroot = $(sdk-dir)/$(target)$(ios-version).sdk - -# apparently, the header files we need are part of the simulator SDK -# but not the device SDK, so we copy them from the former even if -# we're targeting the latter - - header-sysroot := $(subst iPhoneOS,iPhoneSimulator,$(sysroot)) - - ios-bin = $(platform-dir)/Developer/usr/bin - - found-gcc = $(shell if test -f $(ios-bin)/gcc; then echo true; else echo false; fi) - - ifeq ($(found-gcc),false) - use-clang = true - endif - - ifeq ($(use-clang),true) - cxx = clang -std=c++11 - cc = clang - else - cxx = $(ios-bin)/g++ - cc = $(ios-bin)/gcc - endif - - flags = -isysroot $(sdk-dir)/$(target)$(ios-version).sdk \ - $(arch-flag) - - classpath-extra-cflags += $(flags) - cflags += $(flags) - asmflags += $(flags) - lflags += $(flags) - - ios-version-min=$(ios-version) - ifdef ios_deployment_target - ios-version-min=ios_deployment_target - endif - - ifeq ($(sim),true) - ifeq ($(arch),x86_64) - classpath-extra-cflags += \ - -arch x86_64 -miphoneos-version-min=$(ios-version-min) - cflags += -arch x86_64 -miphoneos-version-min=$(ios-version-min) - asmflags += -arch x86_64 -miphoneos-version-min=$(ios-version-min) - lflags += -arch x86_64 -miphoneos-version-min=$(ios-version-min) - else - classpath-extra-cflags += \ - -arch i386 -miphoneos-version-min=$(ios-version-min) - cflags += -arch i386 -miphoneos-version-min=$(ios-version-min) - asmflags += -arch i386 -miphoneos-version-min=$(ios-version-min) - lflags += -arch i386 -miphoneos-version-min=$(ios-version-min) - endif - else - ifeq ($(arch),arm64) - classpath-extra-cflags += \ - -arch arm64 -miphoneos-version-min=$(ios-version-min) - cflags += -arch arm64 -miphoneos-version-min=$(ios-version-min) - asmflags += -arch arm64 -miphoneos-version-min=$(ios-version-min) - lflags += -arch arm64 -miphoneos-version-min=$(ios-version-min) - else - classpath-extra-cflags += \ - -arch armv7 -miphoneos-version-min=$(ios-version-min) - cflags += -arch armv7 -miphoneos-version-min=$(ios-version-min) - asmflags += -arch armv7 -miphoneos-version-min=$(ios-version-min) - lflags += -arch armv7 -miphoneos-version-min=$(ios-version-min) - endif - endif - else # not ios - ifeq ($(arch),i386) - classpath-extra-cflags += \ - -arch i386 -mmacosx-version-min=${OSX_SDK_VERSION} - cflags += -arch i386 -mmacosx-version-min=${OSX_SDK_VERSION} - asmflags += -arch i386 -mmacosx-version-min=${OSX_SDK_VERSION} - lflags += -arch i386 -mmacosx-version-min=${OSX_SDK_VERSION} - endif - - ifeq ($(arch),x86_64) - classpath-extra-cflags += -arch x86_64 - cflags += -arch x86_64 - asmflags += -arch x86_64 - lflags += -arch x86_64 - endif - endif - cflags += -I$(JAVA_HOME)/include/darwin -endif - -openjdk-extra-cflags += $(classpath-extra-cflags) - -find-tool = $(shell if ( command -v "$(1)$(2)" >/dev/null ); then (echo "$(1)$(2)") else (echo "$(2)"); fi) - -ifeq ($(platform),windows) - target-format = pe - - inc = "$(win32)/include" - lib = "$(win32)/lib" - - embed-prefix = c:/avian-embedded - system = windows - - so-prefix = - so-suffix = .dll - exe-suffix = .exe - rpath = - - lflags = -L$(lib) $(common-lflags) -lws2_32 -lversion -luuid -liphlpapi \ - -lmswsock -mconsole - - cflags = -I$(inc) $(common-cflags) -DWINVER=0x0500 -U__STRICT_ANSI__ - - ifeq (,$(filter mingw32 cygwin,$(build-platform))) - openjdk-extra-cflags += -I$(src)/openjdk/caseSensitive - prefix := $(shell i686-w64-mingw32-gcc --version >/dev/null 2>&1 \ - && echo i686-w64-mingw32- || echo x86_64-w64-mingw32-) - cxx = $(prefix)g++ -m32 - cc = $(prefix)gcc -m32 - dlltool = $(prefix)dlltool -mi386 --as-flags=--32 - ar = $(prefix)ar - ranlib = $(prefix)ranlib - strip = $(prefix)strip --strip-all - else - build-system = windows - static-on-windows = -static - common-cflags += "-I$(JAVA_HOME)/include/win32" - build-cflags = $(common-cflags) -I$(src) -I$(inc) -mthreads \ - -D_WIN32_WINNT=0x0500 - openjdk-extra-cflags = - build-lflags = -L$(lib) $(common-lflags) - ifeq ($(build-platform),cygwin) - build-cxx = i686-w64-mingw32-g++ - build-cc = i686-w64-mingw32-gcc - dlltool = i686-w64-mingw32-dlltool - ar = i686-w64-mingw32-ar - ranlib = i686-w64-mingw32-ranlib - strip = i686-w64-mingw32-strip - endif - endif - - ifeq ($(arch),x86_64) - ifeq ($(build-platform),cygwin) - build-cxx = x86_64-w64-mingw32-g++ - build-cc = x86_64-w64-mingw32-gcc - endif - cxx = x86_64-w64-mingw32-g++ $(mflag) - cc = x86_64-w64-mingw32-gcc $(mflag) - dlltool = $(call find-tool,x86_64-w64-mingw32-,dlltool) - ar = $(call find-tool,x86_64-w64-mingw32-,ar) - ranlib = $(call find-tool,x86_64-w64-mingw32-,ranlib) - strip = $(call find-tool,x86_64-w64-mingw32-,strip) - inc = "$(win64)/include" - lib = "$(win64)/lib" - else - shared += -Wl,--add-stdcall-alias - endif - - embed = $(build-embed)/embed$(exe-suffix) - embed-loader = $(build-embed-loader)/embed-loader$(exe-suffix) - embed-loader-o = $(build-embed)/embed-loader.o -endif - -ifeq ($(platform),wp8) - ifeq ($(shell uname -s | grep -i -c WOW64),1) - programFiles = Program Files (x86) - else - programFiles = Program Files - endif - ifeq ($(MSVS_ROOT),) - # Environment variable MSVS_ROOT not found. It should be something like - # "C:\$(programFiles)\Microsoft Visual Studio 11.0" - MSVS_ROOT = C:\$(programFiles)\Microsoft Visual Studio 11.0 - endif - ifeq ($(MSVC_ROOT),) - # Environment variable MSVC_ROOT not found. It should be something like - # "C:\$(programFiles)\Microsoft Visual Studio 11.0\VC" - MSVC_ROOT = $(MSVS_ROOT)\VC - endif - ifeq ($(WP80_SDK),) - # Environment variable WP8_SDK not found. It should be something like - # "C:\Program Files[ (x86)]\Microsoft Visual Studio 11.0\VC\WPSDK\WP80" - # TODO: Lookup in SOFTWARE\Microsoft\Microsoft SDKs\WindowsPhone\v8.0 - WP80_SDK = $(MSVS_ROOT)\VC\WPSDK\WP80 - endif - ifeq ($(WP80_KIT),) - # Environment variable WP8_KIT not found. It should be something like - # "c:\Program Files[ (x86)]\Windows Phone Kits\8.0" - # TODO: Lookup in SOFTWARE\Microsoft\Microsoft SDKs\WindowsPhone\v8.0 - WP80_KIT = C:\$(programFiles)\Windows Phone Kits\8.0 - endif - ifeq ($(WIN8_KIT),) - # Environment variable WIN8_KIT not found. It should be something like - # "c:\Program Files[ (x86)]\Windows Kits\8.0" - WIN8_KIT = C:\$(programFiles)\Windows Kits\8.0 - endif - ifeq ($(build-platform),cygwin) - windows-path = cygpath -w - else - windows-path = $(native-path) - endif - windows-java-home := $(shell $(windows-path) "$(JAVA_HOME)") - target-format = pe - ms_cl_compiler = wp8 - use-lto = false - supports_avian_executable = false - aot-only = true - ifneq ($(bootimage),true) - x := $(error Windows Phone 8 target requires bootimage=true) - endif - system = windows - build-system = windows - static-prefix = - static-suffix = .lib - so-prefix = - so-suffix = .dll - exe-suffix = .exe - manifest-flags = -MANIFEST:NO - - ifeq ($(arch),arm) - wp8_arch = \x86_arm - vc_arch = \arm - w8kit_arch = arm - deps_arch = ARM - as = "$$(cygpath -u "$(WP80_SDK)\bin\x86_arm\armasm.exe")" - cxx = "$$(cygpath -u "$(WP80_SDK)\bin\x86_arm\cl.exe")" - ld = "$$(cygpath -u "$(WP80_SDK)\bin\x86_arm\link.exe")" - asmflags = -machine ARM -32 - asm-output = -o $(1) - asm-input = $(1) - machine_type = ARM - bootimage-symbols = binary_bootimage_bin_start:binary_bootimage_bin_end - codeimage-symbols = binary_codeimage_bin_start:binary_codeimage_bin_end - endif - ifeq ($(arch),i386) - wp8_arch = - vc_arch = - w8kit_arch = x86 - deps_arch = x86 - asmflags = $(target-cflags) -safeseh -nologo -Gd - as = "$$(cygpath -u "$(WP80_SDK)\bin\ml.exe")" - cxx = "$$(cygpath -u "$(WP80_SDK)\bin\cl.exe")" - ld = "$$(cygpath -u "$(WP80_SDK)\bin\link.exe")" - ifeq ($(mode),debug) - asmflags += -Zd - endif - ifeq ($(mode),debug-fast) - asmflags += -Zd - endif - asm-output = $(output) - machine_type = X86 - endif - - PATH := $(shell cygpath -u "$(MSVS_ROOT)\Common7\IDE"):$(shell cygpath -u "$(WP80_SDK)\bin$(wp8_arch)"):$(shell cygpath -u "$(WP80_SDK)\bin"):${PATH} - - build-cflags = $(common-cflags) -I$(src) -I$(inc) -mthreads - build-lflags = -lz -lpthread - - cflags = -nologo \ - -AI"$(WP80_KIT)\Windows Metadata" \ - -I"$(WP80_SDK)\include" -I"$(WP80_KIT)\Include" -I"$(WP80_KIT)\Include\minwin" -I"$(WP80_KIT)\Include\mincore" \ - -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -D_USRDLL -D_WINDLL \ - -DAVIAN_VERSION=\"$(version)\" -D_JNI_IMPLEMENTATION_ \ - -DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \ - -DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\" \ - -I"$(shell $(windows-path) "$(wp8)/zlib/upstream")" -I"$(shell $(windows-path) "$(wp8)/interop/avian-interop-client")" \ - -I"$(shell $(windows-path) "$(wp8)/include")" -I$(src) -I$(classpath-src) \ - -I"$(build)" \ - -I"$(windows-java-home)/include" -I"$(windows-java-home)/include/win32" \ - -DTARGET_BYTES_PER_WORD=$(pointer-size) \ - -Gd -EHsc - - common-lflags = - - ifeq ($(mode),debug) - build-type = Debug - endif - ifeq ($(mode),debug-fast) - build-type = Debug - endif - ifeq ($(mode),stress-major) - build-type = Release - endif - ifeq ($(mode),fast) - build-type = Release - endif - ifeq ($(mode),fast) - build-type = Release - endif - ifeq ($(mode),small) - build-type = Release - endif - - arflags = -MACHINE:$(machine_type) - lflags = $(common-lflags) -nologo \ - -MACHINE:$(machine_type) \ - -LIBPATH:"$(WP80_KIT)\lib\$(w8kit_arch)" -LIBPATH:"$(WP80_SDK)\lib$(vc_arch)" -LIBPATH:"$(WIN8_KIT)\Lib\win8\um\$(w8kit_arch)" \ - ws2_32.lib \ - "$(shell $(windows-path) "$(wp8)\lib\$(deps_arch)\$(build-type)\zlib.lib")" "$(shell $(windows-path) "$(wp8)\lib\$(deps_arch)\$(build-type)\ThreadEmulation.lib")" \ - "$(shell $(windows-path) "$(wp8)\lib\$(deps_arch)\$(build-type)\AvianInteropClient.lib")" - lflags += -NXCOMPAT -DYNAMICBASE -SUBSYSTEM:CONSOLE -TLBID:1 - lflags += -NODEFAULTLIB:"ole32.lib" -NODEFAULTLIB:"kernel32.lib" - lflags += PhoneAppModelHost.lib WindowsPhoneCore.lib -WINMD -WINMDFILE:$(subst $(so-suffix),.winmd,$(@)) - - cc = $(cxx) - asm-format = masm - shared = -dll - ar = "$$(cygpath -u "$(WP80_SDK)\bin\lib.exe")" - arflags += -nologo - ifeq ($(build-platform),cygwin) - build-cxx = i686-w64-mingw32-g++ - build-cc = i686-w64-mingw32-gcc - dlltool = i686-w64-mingw32-dlltool - ranlib = - strip = - endif - output = -Fo$(1) - - #TODO: -MT or -ZW? - cflags_debug = -Od -Zi -MDd - cflags_debug_fast = -Od -Zi -MDd - cflags_stress = -O0 -g3 -MD - cflags_stress_major = -O0 -g3 -MD - cflags_fast = -O2 -Zi -MD - cflags_small = -O1s -Zi -MD - # -GL [whole program optimization] in 'fast' and 'small' breaks compilation for some reason - - ifeq ($(mode),debug) - cflags += - lflags += - endif - ifeq ($(mode),debug-fast) - cflags += -DNDEBUG - lflags += - endif - ifeq ($(mode),stress-major) - cflags += - lflags += - endif - ifeq ($(mode),fast) - cflags += - lflags += - endif - # -LTCG is needed only if -GL is used - ifeq ($(mode),fast) - cflags += -DNDEBUG - lflags += -LTCG - arflags += - endif - ifeq ($(mode),small) - cflags += -DNDEBUG - lflags += -LTCG - arflags += - endif - - strip = : -endif - -ifdef msvc - target-format = pe - windows-path = $(native-path) - windows-java-home := $(shell $(windows-path) "$(JAVA_HOME)") - zlib := $(shell $(windows-path) "$(win32)/msvc") - ms_cl_compiler = regular - as = $(build-cc) - cxx = "$(msvc)/BIN/cl.exe" - cc = $(cxx) - ld = "$(msvc)/BIN/link.exe" - mt = "mt.exe" - ar = "$(msvc)/BIN/lib.exe" - manifest-flags = -MANIFEST -MANIFESTFILE:$(@).manifest - cflags = -nologo -DAVIAN_VERSION=\"$(version)\" -D_JNI_IMPLEMENTATION_ \ - -DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \ - -DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\" \ - -Fd$(build)/$(name).pdb -I"$(zlib)/include" -I$(src) -I$(classpath-src) \ - -I"$(build)" -Iinclude \ - -I"$(windows-java-home)/include" -I"$(windows-java-home)/include/win32" \ - -DTARGET_BYTES_PER_WORD=$(pointer-size) - - ifneq ($(lzma),) - cflags += -I$(shell $(windows-path) "$(lzma)") - endif - - shared = -dll - lflags = -nologo -LIBPATH:"$(zlib)/lib" -DEFAULTLIB:ws2_32 \ - -DEFAULTLIB:zlib -DEFAULTLIB:user32 -MANIFEST -debug - output = -Fo$(1) - - cflags_debug = -Od -Zi -MDd - cflags_debug_fast = -Od -Zi -DNDEBUG - cflags_fast = -O2 -GL -Zi -DNDEBUG - cflags_small = -O1s -Zi -GL -DNDEBUG - ifeq ($(mode),fast) - lflags += -LTCG - endif - ifeq ($(mode),small) - lflags += -LTCG - endif - - use-lto = false - strip = : -endif - -ifeq ($(mode),debug) - optimization-cflags = $(cflags_debug) - converter-cflags += $(cflags_debug) - strip = : -endif -ifeq ($(mode),debug-fast) - optimization-cflags = $(cflags_debug_fast) -DNDEBUG - strip = : -endif -ifeq ($(mode),stress) - optimization-cflags = $(cflags_stress) -DVM_STRESS - strip = : -endif -ifeq ($(mode),stress-major) - optimization-cflags = $(cflags_stress_major) -DVM_STRESS -DVM_STRESS_MAJOR - strip = : -endif -ifeq ($(mode),fast) - optimization-cflags = $(cflags_fast) -DNDEBUG -endif -ifeq ($(mode),small) - optimization-cflags = $(cflags_small) -DNDEBUG -endif - -ifeq ($(use-lto),true) - ifeq ($(use-clang),true) - optimization-cflags += -flto - lflags += $(optimization-cflags) - else -# only try to use LTO when GCC 4.6.0 or greater is available - gcc-major := $(shell $(cc) -dumpversion | cut -f1 -d.) - gcc-minor := $(shell $(cc) -dumpversion | cut -f2 -d.) - ifeq ($(shell expr 4 \< $(gcc-major) \ - \| \( 4 \<= $(gcc-major) \& 6 \<= $(gcc-minor) \)),1) - optimization-cflags += -flto - no-lto = -fno-lto - lflags += $(optimization-cflags) - endif - endif -endif - -cflags += $(optimization-cflags) - -ifndef ms_cl_compiler -ifneq ($(kernel),darwin) -ifeq ($(arch),i386) -# this is necessary to support __sync_bool_compare_and_swap: - cflags += -march=i586 - lflags += -march=i586 -endif -endif -endif - -c-objects = $(foreach x,$(1),$(patsubst $(2)/%.c,$(3)/%.o,$(x))) -cpp-objects = $(foreach x,$(1),$(patsubst $(2)/%.cpp,$(3)/%.o,$(x))) -cc-objects = $(foreach x,$(1),$(patsubst $(2)/%.cc,$(3)/%.o,$(x))) -asm-objects = $(foreach x,$(1),$(patsubst $(2)/%.$(asm-format),$(3)/%-asm.o,$(x))) -java-classes = $(foreach x,$(1),$(patsubst $(2)/%.java,$(3)/%.class,$(x))) -noop-files = $(foreach x,$(1),$(patsubst $(2)/%,$(3)/%,$(x))) - -generated-code = \ - $(build)/type-enums.cpp \ - $(build)/type-declarations.cpp \ - $(build)/type-constructors.cpp \ - $(build)/type-initializations.cpp \ - $(build)/type-java-initializations.cpp \ - $(build)/type-name-initializations.cpp \ - $(build)/type-maps.cpp - -vm-depends := $(generated-code) \ - $(shell find src include -name '*.h' -or -name '*.inc.cpp') - -vm-sources = \ - $(src)/system/$(system).cpp \ - $(wildcard $(src)/system/$(system)/*.cpp) \ - $(src)/finder.cpp \ - $(src)/machine.cpp \ - $(src)/util.cpp \ - $(src)/heap/heap.cpp \ - $(src)/$(process).cpp \ - $(src)/classpath-$(classpath).cpp \ - $(src)/builtin.cpp \ - $(src)/jnienv.cpp \ - $(src)/process.cpp \ - $(src)/heapdump.cpp - -vm-asm-sources = $(src)/$(arch).$(asm-format) - -target-asm = $(asm) - -build-embed = $(build)/embed -build-embed-loader = $(build)/embed-loader - -embed-loader-sources = $(src)/embedded-loader.cpp -embed-loader-objects = $(call cpp-objects,$(embed-loader-sources),$(src),$(build-embed-loader)) - -embed-sources = $(src)/embed.cpp -embed-objects = $(call cpp-objects,$(embed-sources),$(src),$(build-embed)) - -compiler-sources = \ - $(src)/codegen/compiler.cpp \ - $(wildcard $(src)/codegen/compiler/*.cpp) \ - $(src)/debug-util.cpp \ - $(src)/codegen/runtime.cpp \ - $(src)/codegen/targets.cpp \ - $(src)/util/fixed-allocator.cpp - -x86-assembler-sources = $(wildcard $(src)/codegen/target/x86/*.cpp) - -arm-assembler-sources = $(wildcard $(src)/codegen/target/arm/*.cpp) - -all-assembler-sources = \ - $(x86-assembler-sources) \ - $(arm-assembler-sources) - -native-assembler-sources = $($(target-asm)-assembler-sources) - -all-codegen-target-sources = \ - $(compiler-sources) \ - $(native-assembler-sources) - -ifeq ($(process),compile) - vm-sources += $(compiler-sources) - - ifeq ($(codegen-targets),native) - vm-sources += $(native-assembler-sources) - endif - ifeq ($(codegen-targets),all) - ifneq (,$(filter arm arm64,$(arch))) - # The x86 jit has a dependency on the x86 assembly code, - # and thus can't be successfully built on non-x86 platforms. - vm-sources += $(native-assembler-sources) - else - vm-sources += $(all-assembler-sources) - endif - endif - - vm-asm-sources += $(src)/compile-$(arch).$(asm-format) -endif -ifeq ($(aot-only),true) - cflags += -DAVIAN_AOT_ONLY -endif - -vm-cpp-objects = $(call cpp-objects,$(vm-sources),$(src),$(build)) -all-codegen-target-objects = $(call cpp-objects,$(all-codegen-target-sources),$(src),$(build)) -vm-asm-objects = $(call asm-objects,$(vm-asm-sources),$(src),$(build)) -vm-objects = $(vm-cpp-objects) $(vm-asm-objects) - -heapwalk-sources = $(src)/heapwalk.cpp -heapwalk-objects = \ - $(call cpp-objects,$(heapwalk-sources),$(src),$(build)) - -unittest-objects = $(call cpp-objects,$(unittest-sources),$(unittest),$(build)/unittest) - -vm-heapwalk-objects = $(heapwalk-objects) - -ifeq ($(tails),true) - cflags += -DAVIAN_TAILS -endif - -ifeq ($(continuations),true) - cflags += -DAVIAN_CONTINUATIONS - asmflags += -DAVIAN_CONTINUATIONS -endif - -bootimage-generator-sources = $(src)/tools/bootimage-generator/main.cpp $(src)/util/arg-parser.cpp $(stub-sources) - -ifneq ($(lzma),) - bootimage-generator-sources += $(src)/lzma-encode.cpp -endif - -bootimage-generator-objects = \ - $(call cpp-objects,$(bootimage-generator-sources),$(src),$(build)) -bootimage-generator = $(build)/bootimage-generator - -ifneq ($(mode),fast) - host-vm-options := -$(mode) -endif - -host-vm = build/$(build-platform)-$(build-arch)-interpret$(host-vm-options)/$(so-prefix)jvm$(so-suffix) - -bootimage-object = $(build)/bootimage-bin.o -codeimage-object = $(build)/codeimage-bin.o - -ifeq ($(bootimage),true) - vm-classpath-objects = $(bootimage-object) $(codeimage-object) - cflags += -DBOOT_IMAGE -DAVIAN_CLASSPATH=\"\" -else - vm-classpath-objects = $(classpath-object) - cflags += -DBOOT_CLASSPATH=\"[classpathJar]\" \ - -DAVIAN_CLASSPATH=\"[classpathJar]\" -endif - -cflags += $(extra-cflags) -lflags += $(extra-lflags) - -openjdk-cflags += $(extra-cflags) - -driver-source = $(src)/main.cpp -driver-object = $(build)/main.o -driver-dynamic-objects = \ - $(build)/main-dynamic.o - -boot-source = $(src)/boot.cpp -boot-object = $(build)/boot.o - -generator-depends := $(wildcard $(src)/*.h) -generator-sources = \ - $(src)/tools/type-generator/main.cpp \ - $(src)/system/$(build-system).cpp \ - $(wildcard $(src)/system/$(build-system)/*.cpp) \ - $(src)/finder.cpp \ - $(src)/util/arg-parser.cpp - -ifneq ($(lzma),) - common-cflags += -I$(lzma) -DAVIAN_USE_LZMA - - vm-sources += \ - $(src)/lzma-decode.cpp - - generator-sources += \ - $(src)/lzma-decode.cpp - - lzma-decode-sources = \ - $(lzma)/C/LzmaDec.c - - lzma-decode-objects = \ - $(call c-objects,$(lzma-decode-sources),$(lzma)/C,$(build)) - - lzma-encode-sources = \ - $(lzma)/C/LzmaEnc.c \ - $(lzma)/C/LzFind.c - - lzma-encode-objects = \ - $(call c-objects,$(lzma-encode-sources),$(lzma)/C,$(build)) - - lzma-encoder = $(build)/lzma/lzma - - lzma-build-cflags = -D_7ZIP_ST -D__STDC_CONSTANT_MACROS \ - -fno-exceptions -fPIC -I$(lzma)/C - - lzma-cflags = $(lzma-build-cflags) $(classpath-extra-cflags) - - lzma-encoder-sources = \ - $(src)/lzma/main.cpp - - lzma-encoder-objects = \ - $(call cpp-objects,$(lzma-encoder-sources),$(src),$(build)) - - lzma-encoder-lzma-sources = $(lzma-encode-sources) $(lzma-decode-sources) - - lzma-encoder-lzma-objects = \ - $(call generator-c-objects,$(lzma-encoder-lzma-sources),$(lzma)/C,$(build)) - - lzma-loader = $(build)/lzma/load.o - - lzma-library = $(build)/libavian-lzma.a -endif - -generator-cpp-objects = \ - $(foreach x,$(1),$(patsubst $(2)/%.cpp,$(3)/%-build.o,$(x))) -generator-c-objects = \ - $(foreach x,$(1),$(patsubst $(2)/%.c,$(3)/%-build.o,$(x))) -generator-objects = \ - $(call generator-cpp-objects,$(generator-sources),$(src),$(build)) -generator-lzma-objects = \ - $(call generator-c-objects,$(lzma-decode-sources),$(lzma)/C,$(build)) -generator = $(build)/generator - -all-depends = $(shell find include -name '*.h') - -object-writer-depends = $(shell find $(src)/tools/object-writer -name '*.h') -object-writer-sources = $(shell find $(src)/tools/object-writer -name '*.cpp') -object-writer-objects = $(call cpp-objects,$(object-writer-sources),$(src),$(build)) - -binary-to-object-depends = $(shell find $(src)/tools/binary-to-object/ -name '*.h') -binary-to-object-sources = $(shell find $(src)/tools/binary-to-object/ -name '*.cpp') -binary-to-object-objects = $(call cpp-objects,$(binary-to-object-sources),$(src),$(build)) - -converter-sources = $(object-writer-sources) - -converter-tool-depends = $(binary-to-object-depends) $(all-depends) -converter-tool-sources = $(binary-to-object-sources) - -converter-objects = $(call cpp-objects,$(converter-sources),$(src),$(build)) -converter-tool-objects = $(call cpp-objects,$(converter-tool-sources),$(src),$(build)) -converter = $(build)/binaryToObject/binaryToObject - -static-library = $(build)/$(static-prefix)$(name)$(static-suffix) -executable = $(build)/$(name)${exe-suffix} -dynamic-library = $(build)/$(so-prefix)jvm$(so-suffix) -executable-dynamic = $(build)/$(name)-dynamic$(exe-suffix) - -unittest-executable = $(build)/$(name)-unittest${exe-suffix} - -ifneq ($(classpath),avian) -# Assembler, ConstantPool, and Stream are not technically needed for a -# working build, but we include them since our Subroutine test uses -# them to synthesize a class: - classpath-sources := \ - $(classpath-src)/avian/Addendum.java \ - $(classpath-src)/avian/AnnotationInvocationHandler.java \ - $(classpath-src)/avian/Assembler.java \ - $(classpath-src)/avian/Callback.java \ - $(classpath-src)/avian/Cell.java \ - $(classpath-src)/avian/ClassAddendum.java \ - $(classpath-src)/avian/Classes.java \ - $(classpath-src)/avian/Code.java \ - $(classpath-src)/avian/ConstantPool.java \ - $(classpath-src)/avian/Continuations.java \ - $(classpath-src)/avian/FieldAddendum.java \ - $(classpath-src)/avian/Function.java \ - $(classpath-src)/avian/IncompatibleContinuationException.java \ - $(classpath-src)/avian/InnerClassReference.java \ - $(classpath-src)/avian/Machine.java \ - $(classpath-src)/avian/MethodAddendum.java \ - $(classpath-src)/avian/Pair.java \ - $(classpath-src)/avian/Singleton.java \ - $(classpath-src)/avian/Stream.java \ - $(classpath-src)/avian/SystemClassLoader.java \ - $(classpath-src)/avian/VMClass.java \ - $(classpath-src)/avian/VMField.java \ - $(classpath-src)/avian/VMMethod.java \ - $(classpath-src)/avian/avianvmresource/Handler.java \ - $(classpath-src)/avian/file/Handler.java \ - $(classpath-src)/java/lang/invoke/MethodHandle.java \ - $(classpath-src)/java/lang/invoke/MethodHandles.java \ - $(classpath-src)/java/lang/invoke/MethodType.java \ - $(classpath-src)/java/lang/invoke/LambdaMetafactory.java \ - $(classpath-src)/java/lang/invoke/LambdaConversionException.java \ - $(classpath-src)/java/lang/invoke/CallSite.java - - ifeq ($(openjdk),) - classpath-sources := $(classpath-sources) \ - $(classpath-src)/dalvik/system/BaseDexClassLoader.java \ - $(classpath-src)/libcore/reflect/AnnotationAccess.java \ - $(classpath-src)/sun/reflect/ConstantPool.java \ - $(classpath-src)/java/net/ProtocolFamily.java \ - $(classpath-src)/java/net/StandardProtocolFamily.java \ - $(classpath-src)/sun/misc/Cleaner.java \ - $(classpath-src)/sun/misc/Unsafe.java \ - $(classpath-src)/java/lang/Object.java \ - $(classpath-src)/java/lang/Class.java \ - $(classpath-src)/java/lang/ClassLoader.java \ - $(classpath-src)/java/lang/Package.java \ - $(classpath-src)/java/lang/reflect/Proxy.java \ - $(classpath-src)/java/lang/reflect/Field.java \ - $(classpath-src)/java/lang/reflect/SignatureParser.java \ - $(classpath-src)/java/lang/reflect/Constructor.java \ - $(classpath-src)/java/lang/reflect/AccessibleObject.java \ - $(classpath-src)/java/lang/reflect/Method.java - endif -else - classpath-sources := $(shell find $(classpath-src) -name '*.java') -endif - -classpath-classes = \ - $(call java-classes,$(classpath-sources),$(classpath-src),$(classpath-build)) -classpath-object = $(build)/classpath-jar.o -classpath-dep = $(classpath-build).dep - -vm-classes = \ - avian/*.class \ - avian/resource/*.class - -test-support-sources = $(shell find $(test)/avian/ -name '*.java') -test-sources := $(wildcard $(test)/*.java) - -# HACK ALERT!! -# This test fails regularly on travis, but nowhere else. We have yet to spend the time to investigate that test, so we disable it on PR builds. -# Note: travis set TRAVIS_PULL_REQUEST environment variable to either the PR number or "false", as appropriate -ifeq (false,$(TRAVIS_PULL_REQUEST)) -else -ifeq (,$(TRAVIS_PULL_REQUEST)) -else - test-sources := $(subst $(test)/Trace.java,,$(test-sources)) -endif -endif - -ifeq (7,$(java-version)) - test-sources := $(subst $(test)/InvokeDynamic.java,,$(test-sources)) - test-sources := $(subst $(test)/Interfaces.java,,$(test-sources)) -endif - -test-cpp-sources = $(wildcard $(test)/*.cpp) -test-sources += $(test-support-sources) -test-support-classes = $(call java-classes, $(test-support-sources),$(test),$(test-build)) -test-classes = $(call java-classes,$(test-sources),$(test),$(test-build)) -test-cpp-objects = $(call cpp-objects,$(test-cpp-sources),$(test),$(test-build)) -test-library = $(build)/$(so-prefix)test$(so-suffix) -test-dep = $(test-build).dep - -test-extra-sources = $(wildcard $(test)/extra/*.java) -test-extra-classes = \ - $(call java-classes,$(test-extra-sources),$(test),$(test-build)) -test-extra-dep = $(test-build)-extra.dep - -unittest-sources = \ - $(wildcard $(unittest)/*.cpp) \ - $(wildcard $(unittest)/util/*.cpp) \ - $(wildcard $(unittest)/codegen/*.cpp) - -unittest-depends = \ - $(wildcard $(unittest)/*.h) - -ifeq ($(continuations),true) - continuation-tests = \ - extra.ComposableContinuations \ - extra.Continuations \ - extra.Coroutines \ - extra.DynamicWind -endif - -ifeq ($(tails),true) - tail-tests = \ - extra.Tails -endif - -ifeq ($(target-arch),i386) - cflags += -DAVIAN_TARGET_ARCH=AVIAN_ARCH_X86 -endif - -ifeq ($(target-arch),x86_64) - cflags += -DAVIAN_TARGET_ARCH=AVIAN_ARCH_X86_64 -endif - -ifeq ($(target-arch),arm) - cflags += -DAVIAN_TARGET_ARCH=AVIAN_ARCH_ARM -endif - -ifeq ($(target-arch),arm64) - cflags += -DAVIAN_TARGET_ARCH=AVIAN_ARCH_ARM64 -endif - -ifeq ($(target-format),elf) - cflags += -DAVIAN_TARGET_FORMAT=AVIAN_FORMAT_ELF -endif - -ifeq ($(target-format),pe) - cflags += -DAVIAN_TARGET_FORMAT=AVIAN_FORMAT_PE -endif - -ifeq ($(target-format),macho) - cflags += -DAVIAN_TARGET_FORMAT=AVIAN_FORMAT_MACHO -endif - -class-name = $(patsubst $(1)/%.class,%,$(2)) -class-names = $(foreach x,$(2),$(call class-name,$(1),$(x))) - -test-flags = -Djava.library.path=$(build) \ - -cp '$(build)/test$(target-path-separator)$(build)/extra-dir' - -test-args = $(test-flags) $(input) - -ifneq ($(filter linux windows macosx,$(platform)),) -eclipse-exec-env = eclipse-ee -eclipse-jdk-dir = $(build)/eclipse/jdk -eclipse-ee-file = $(eclipse-jdk-dir)/avian.ee -eclipse-bin-dir = $(eclipse-jdk-dir)/bin -eclipse-lib-dir = $(eclipse-jdk-dir)/jre/lib -eclipse-src-dir = $(eclipse-jdk-dir)/src -define eclipse-ee-descriptor -# An Eclipse execution environment for the Avian JVM\ -\n-Dee.executable=bin/java${exe-suffix}\ -\n-Dee.bootclasspath=jre/lib/rt.jar\ -\n-Dee.language.level=1.7\ -\n-Dee.name=$(name)-$(version)-$(platform)-$(arch)$(options)\ -\n-Dee.src=src\ -\n-Dee.javadoc=file://$${ee.home}/doc\ -\n-Djava.home=$${ee.home}\n -endef -else -eclipse-exec-env = -endif - -.PHONY: build -ifneq ($(supports_avian_executable),false) -build: $(static-library) $(executable) $(dynamic-library) $(lzma-library) \ - $(lzma-encoder) $(executable-dynamic) $(classpath-dep) $(test-dep) \ - $(test-extra-dep) $(embed) $(build)/classpath.jar $(eclipse-exec-env) -else -build: $(static-library) $(dynamic-library) $(lzma-library) \ - $(lzma-encoder) $(classpath-dep) $(test-dep) \ - $(test-extra-dep) $(embed) $(build)/classpath.jar -endif - -$(test-dep): $(classpath-dep) - -$(test-extra-dep): $(classpath-dep) - -.PHONY: run -run: build - $(library-path) $(test-executable) $(test-args) - -.PHONY: debug -debug: build - $(library-path) $(db) $(test-executable) $(test-args) - -.PHONY: vg -vg: build - $(library-path) $(vg) $(test-executable) $(test-args) - -.PHONY: test -test: build-test run-test - -.PHONY: build-test -build-test: build $(build)/run-tests.sh $(build)/test.sh $(unittest-executable) - -.PHONY: run-test -run-test: -ifneq ($(remote-test),true) - /bin/sh $(build)/run-tests.sh -else - @echo "running tests on $(remote-test-user)@$(remote-test-host):$(remote-test-port), in $(remote-test-dir)" - rsync $(build) -rav --exclude '*.o' --rsh="ssh -p$(remote-test-port)" $(remote-test-user)@$(remote-test-host):$(remote-test-dir) - ssh -p$(remote-test-port) $(remote-test-user)@$(remote-test-host) sh "$(remote-test-dir)/$(platform)-$(arch)$(options)/run-tests.sh" -endif - -.PHONY: jdk-test -jdk-test: $(test-dep) $(build)/classpath.jar $(build)/jdk-run-tests.sh $(build)/test.sh - /bin/sh $(build)/jdk-run-tests.sh - -.PHONY: tarball -tarball: - @echo "creating build/avian-$(version).tar.bz2" - @mkdir -p build - (cd .. && tar --exclude=build --exclude=cmake-build --exclude=distrib \ - --exclude=lib --exclude='.*' --exclude='*~' \ - -cjf avian/build/avian-$(version).tar.bz2 avian) - -.PHONY: clean-current -clean-current: - @echo "removing $(build)" - rm -rf $(build) - -.PHONY: clean -clean: - @echo "removing build directories" - rm -rf build cmake-build distrib lib - -.PHONY: eclipse-ee -ifneq ($(strip $(eclipse-exec-env)),) -eclipse-ee: $(eclipse-ee-file) $(eclipse-lib-dir)/rt.jar $(eclipse-bin-dir)/java${exe-suffix} $(eclipse-src-dir) - -$(eclipse-bin-dir): - @mkdir -p $(@) - -$(eclipse-lib-dir): - @mkdir -p $(@) - -$(eclipse-jdk-dir): - @mkdir -p $(@) - -$(eclipse-ee-file): $(eclipse-jdk-dir) - @echo "writing eclipse execution environment descriptor to $(@)" - @printf '${eclipse-ee-descriptor}' > $(@) - -$(eclipse-src-dir): $(eclipse-jdk-dir) - @echo "symlinking classpath for $(@)" - @ln -sf ../../../../classpath $(@) - -$(eclipse-bin-dir)/java$(exe-suffix): $(eclipse-bin-dir) $(executable) - @echo "symlinking $(executable) for $(@)" - @ln -sf ../../../$(name)${exe-suffix} $(@) - -$(eclipse-lib-dir)/rt.jar: $(eclipse-lib-dir) $(build)/classpath.jar - @echo "symlinking $(build)/classpath.jar for $(@)" - @ln -sf ../../../../classpath.jar $(@) -else -eclipse-ee: - $(error "Eclipse execution environment for platform '$(platform)' is not supported") -endif - -ifeq ($(continuations),true) -$(build)/compile-x86-asm.o: $(src)/continuations-x86.$(asm-format) -endif - -$(build)/run-tests.sh: $(test-classes) makefile $(build)/extra-dir/multi-classpath-test.txt $(build)/test/multi-classpath-test.txt - echo 'cd $$(dirname $$0)' > $(@) - echo "sh ./test.sh 2>/dev/null \\" >> $(@) - echo "$(shell echo $(library-path) | sed 's|$(build)|\.|g') ./$(name)-unittest${exe-suffix} ./$(notdir $(test-executable)) $(mode) \"-Djava.library.path=. -cp test$(target-path-separator)extra-dir\" \\" >> $(@) - echo "$(call class-names,$(test-build),$(filter-out $(test-support-classes), $(test-classes))) \\" >> $(@) - echo "$(continuation-tests) $(tail-tests)" >> $(@) - -$(build)/jdk-run-tests.sh: $(test-classes) makefile $(build)/extra-dir/multi-classpath-test.txt $(build)/test/multi-classpath-test.txt - echo 'cd $$(dirname $$0)' > $(@) - echo "sh ./test.sh 2>/dev/null \\" >> $(@) - echo "'' true $(JAVA_HOME)/bin/java $(mode) \"-Xmx128m -Djava.library.path=. -cp test$(path-separator)extra-dir$(path-separator)classpath\" \\" >> $(@) - echo "$(call class-names,$(test-build),$(filter-out $(test-support-classes), $(test-classes))) \\" >> $(@) - echo "$(continuation-tests) $(tail-tests)" >> $(@) - -$(build)/extra-dir/multi-classpath-test.txt: - mkdir -p $(build)/extra-dir - echo "$@" > $@ - -$(build)/test/multi-classpath-test.txt: - echo "$@" > $@ - -$(build)/test.sh: $(test)/test.sh - cp $(<) $(@) - -gen-arg = $(shell echo $(1) | sed -e 's:$(build)/type-\(.*\)\.cpp:\1:') -$(generated-code): %.cpp: $(src)/types.def $(generator) $(classpath-dep) - @echo "generating $(@)" - @mkdir -p $(dir $(@)) - $(generator) -cp $(boot-classpath) -i $(<) -o $(@) -t $(call gen-arg,$(@)) - -$(classpath-dep): $(classpath-sources) $(classpath-jar-dep) - @echo "compiling classpath classes" - @mkdir -p $(classpath-build) - $(javac) -source 1.$(java-version) -target 1.$(java-version) \ - -d $(classpath-build) -bootclasspath $(boot-classpath) \ - $(classpath-sources) - @touch $(@) - -$(build)/android-src/%.cpp: $(luni-native)/%.cpp - cp $(<) $(@) - -$(build)/android-src/%.cpp: $(libnativehelper-native)/%.cpp - cp $(<) $(@) - -$(build)/android-src/%.cpp: $(crypto-native)/%.cpp - cp $(<) $(@) - -$(build)/android-src/%.cpp: $(libziparchive-native)/%.cc - cp $(<) $(@) - -$(build)/android-src/%.cpp: $(libutils-native)/%.cpp - cp $(<) $(@) - -$(build)/%.o: $(build)/android-src/%.cpp $(build)/android.dep - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(cxx) $(android-cflags) $(classpath-extra-cflags) -c \ - $$($(windows-path) $(<)) $(call output,$(@)) - -$(build)/android.dep: $(luni-javas) $(dalvik-javas) $(libart-javas) \ - $(xml-javas) $(okhttp-android-javas) $(okhttp-javas) $(okio-javas) \ - $(bcpkix-javas) $(bcprov-javas) $(luni-nonjavas) $(crypto-javas) $(crypto-platform-javas) - @echo "compiling luni classes" - @mkdir -p $(classpath-build) - @mkdir -p $(build)/android - @mkdir -p $(build)/android-src/external/fdlibm - @mkdir -p $(build)/android-src/libexpat - cp $(android)/external/fdlibm/fdlibm.h $(build)/android-src/external/fdlibm/ - cp $(android)/external/expat/lib/expat*.h $(build)/android-src/libexpat/ - cp -a $(luni-java)/* $(xml-java)/* $(okhttp-android-java)/* $(okhttp-java)/* $(okio-java)/* $(bcpkix-java)/* $(bcprov-java)/* $(build)/android-src/ - rm $(call noop-files,$(luni-blacklist),$(luni-java),$(build)/android-src) - (cd $(dalvik-java) && \ - $(jar) c $(call noop-files,$(dalvik-javas),$(dalvik-java),.)) \ - | (cd $(build)/android-src && $(jar) x) - (cd $(libart-java) && \ - $(jar) c $(call noop-files,$(libart-javas),$(libart-java),.)) \ - | (cd $(build)/android-src && $(jar) x) - (cd $(crypto-java) && \ - $(jar) c $(call noop-files,$(crypto-javas),$(crypto-java),.)) \ - | (cd $(build)/android-src && $(jar) x) - (cd $(crypto-platform-java) && \ - $(jar) c $(call noop-files,$(crypto-platform-javas),$(crypto-platform-java),.)) \ - | (cd $(build)/android-src && $(jar) x) - (cd $(classpath-src) && \ - $(jar) c $(call noop-files,$(classpath-sources),$(classpath-src),.)) \ - | (cd $(build)/android-src && $(jar) x) -# (cd android && $(jar) c *) | (cd $(build)/android-src && $(jar) x) - find $(build)/android-src -name '*.java' > $(build)/android.txt - $(javac) -Xmaxerrs 1000 -d $(build)/android @$(build)/android.txt - rm $(build)/android/sun/misc/Unsafe* \ - $(build)/android/java/lang/reflect/Proxy* - for x in $(luni-copied-nonjavas); \ - do cp $(luni-java)$${x} $(build)/android$${x} ; \ - done - # fix security.properties - get rid of "com.android" in front of classes starting with "org" - sed -i -e 's/\(.*=\)com\.android\.\(org\..*\)/\1\2/g' \ - $(build)/android/java/security/security.properties - chmod +w $(build)/android/java/security/security.properties - cp -r $(build)/android/* $(classpath-build) - @touch $(@) - -$(test-build)/%.class: $(test)/%.java - @echo $(<) - -$(test-dep): $(test-sources) $(test-library) - @echo "compiling test classes" - @mkdir -p $(test-build) - files="$(shell $(MAKE) -s --no-print-directory build=$(build) $(test-classes))"; \ - if test -n "$${files}"; then \ - $(javac) -source 1.$(java-version) -target 1.$(java-version) \ - -classpath $(test-build) -d $(test-build) -bootclasspath $(boot-classpath) $${files}; \ - fi - $(javac) -source 1.2 -target 1.1 -XDjsrlimit=0 -d $(test-build) \ - -bootclasspath $(boot-classpath) test/Subroutine.java - @touch $(@) - -$(test-extra-dep): $(test-extra-sources) - @echo "compiling extra test classes" - @mkdir -p $(test-build) - files="$(shell $(MAKE) -s --no-print-directory build=$(build) $(test-extra-classes))"; \ - if test -n "$${files}"; then \ - $(javac) -source 1.$(java-version) -target 1.$(java-version) \ - -d $(test-build) -bootclasspath $(boot-classpath) $${files}; \ - fi - @touch $(@) - -define compile-object - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(cxx) $(cflags) -c $$($(windows-path) $(<)) $(call output,$(@)) -endef - -define compile-asm-object - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(as) $(asmflags) $(call asm-output,$(@)) $(call asm-input,$(<)) -endef - -define compile-unittest-object - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(cxx) $(cflags) -c $$($(windows-path) $(<)) -I$(unittest) $(call output,$(@)) -endef - -$(vm-cpp-objects): $(build)/%.o: $(src)/%.cpp $(vm-depends) - $(compile-object) - -ifeq ($(process),interpret) -$(all-codegen-target-objects): $(build)/%.o: $(src)/%.cpp $(vm-depends) - $(compile-object) -endif - -$(unittest-objects): $(build)/unittest/%.o: $(unittest)/%.cpp $(vm-depends) $(unittest-depends) - $(compile-unittest-object) - -$(test-cpp-objects): $(test-build)/%.o: $(test)/%.cpp $(vm-depends) - $(compile-object) - -$(test-library): $(test-cpp-objects) - @echo "linking $(@)" -ifdef ms_cl_compiler - $(ld) $(shared) $(lflags) $(^) -out:$(@) \ - -debug -PDB:$(subst $(so-suffix),.pdb,$(@)) \ - -IMPLIB:$(test-build)/$(name).lib $(manifest-flags) -ifdef mt - $(mt) -nologo -manifest $(@).manifest -outputresource:"$(@);2" -endif -else - $(ld) $(^) $(shared) $(lflags) -o $(@) -endif - -ifdef embed -$(embed): $(embed-objects) $(embed-loader-o) - @echo "building $(embed)" -ifdef ms_cl_compiler - $(ld) $(lflags) $(^) -out:$(@) \ - -debug -PDB:$(subst $(exe-suffix),.pdb,$(@)) $(manifest-flags) -ifdef mt - $(mt) -nologo -manifest $(@).manifest -outputresource:"$(@);1" -endif -else - $(cxx) $(^) $(lflags) $(static) $(call output,$(@)) -endif - -$(build-embed)/%.o: $(src)/%.cpp - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(cxx) $(cflags) -c $(<) $(call output,$(@)) - -$(embed-loader-o): $(embed-loader) $(converter) - @mkdir -p $(dir $(@)) - $(converter) $(<) $(@) _binary_loader_start \ - _binary_loader_end $(target-format) $(arch) - -$(embed-loader): $(embed-loader-objects) $(vm-objects) $(classpath-objects) \ - $(heapwalk-objects) $(lzma-decode-objects) -ifdef ms_cl_compiler - $(ld) $(lflags) $(^) -out:$(@) \ - -debug -PDB:$(subst $(exe-suffix),.pdb,$(@)) $(manifest-flags) -ifdef mt - $(mt) -nologo -manifest $(@).manifest -outputresource:"$(@);1" -endif -else - $(dlltool) -z $(addsuffix .def,$(basename $(@))) $(^) - $(dlltool) -d $(addsuffix .def,$(basename $(@))) -e $(addsuffix .exp,$(basename $(@))) - $(ld) $(addsuffix .exp,$(basename $(@))) $(^) \ - $(lflags) $(classpath-lflags) $(bootimage-lflags) -o $(@) -endif - $(strip) $(strip-all) $(@) - -$(build-embed-loader)/%.o: $(src)/%.cpp - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(cxx) $(cflags) -c $(<) $(call output,$(@)) -endif - -$(build)/%.o: $(lzma)/C/%.c - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(cc) $(lzma-cflags) -c $$($(windows-path) $(<)) $(call output,$(@)) - -$(vm-asm-objects): $(build)/%-asm.o: $(src)/%.$(asm-format) - $(compile-asm-object) - -$(bootimage-generator-objects): $(build)/%.o: $(src)/%.cpp $(vm-depends) - $(compile-object) - -$(heapwalk-objects): $(build)/%.o: $(src)/%.cpp $(vm-depends) - $(compile-object) - -$(driver-object): $(driver-source) - $(compile-object) - -$(build)/main-dynamic.o: $(driver-source) - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(cxx) $(cflags) -DBOOT_LIBRARY=\"$(so-prefix)jvm$(so-suffix)\" \ - -c $(<) $(call output,$(@)) - -$(boot-object): $(boot-source) - $(compile-object) - -$(boot-javahome-object): $(src)/boot-javahome.cpp - $(compile-object) - -$(object-writer-objects) $(binary-to-object-objects): $(build)/%.o: $(src)/%.cpp $(binary-to-object-depends) $(object-writer-depends) $(all-depends) - @mkdir -p $(dir $(@)) - $(build-cxx) $(converter-cflags) -c $(<) -o $(@) - -$(converter): $(converter-objects) $(converter-tool-objects) - @mkdir -p $(dir $(@)) - $(build-cc) $(^) -g -o $(@) - -$(lzma-encoder-objects): $(build)/lzma/%.o: $(src)/lzma/%.cpp - @mkdir -p $(dir $(@)) - $(build-cxx) $(lzma-build-cflags) -c $(<) -o $(@) - -$(lzma-encoder): $(lzma-encoder-objects) $(lzma-encoder-lzma-objects) - $(build-cc) $(^) -g -o $(@) - -$(lzma-library): $(lzma-loader) $(lzma-decode-objects) - @echo "creating $(@)" - @rm -rf $(build)/libavian-lzma - @mkdir -p $(build)/libavian-lzma - rm -rf $(@) - for x in $(^); \ - do cp $${x} $(build)/libavian-lzma/$$(echo $${x} | sed s:/:_:g); \ - done -ifdef ms_cl_compiler - $(ar) $(arflags) $(build)/libavian-lzma/*.o -out:$(@) -else - $(ar) cru $(@) $(build)/libavian-lzma/*.o - $(ranlib) $(@) -endif - -$(lzma-loader): $(src)/lzma/load.cpp - $(compile-object) - -$(build)/classpath.jar: $(classpath-dep) $(classpath-jar-dep) - @echo "creating $(@)" - (wd=$$(pwd) && \ - cd $(classpath-build) && \ - $(jar) c0f "$$($(native-path) "$${wd}/$(@)")" .) - -$(classpath-object): $(build)/classpath.jar $(converter) - @echo "creating $(@)" - $(converter) $(<) $(@) _binary_classpath_jar_start \ - _binary_classpath_jar_end $(target-format) $(arch) - -$(build)/javahome.jar: - @echo "creating $(@)" - (wd=$$(pwd) && \ - cd "$(build-javahome)" && \ - $(jar) c0f "$$($(native-path) "$${wd}/$(@)")" $(javahome-files)) - -$(javahome-object): $(build)/javahome.jar $(converter) - @echo "creating $(@)" - $(converter) $(<) $(@) _binary_javahome_jar_start \ - _binary_javahome_jar_end $(target-format) $(arch) - -define compile-generator-object - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(build-cxx) -DPOINTER_SIZE=$(pointer-size) -O0 -g3 $(build-cflags) \ - -c $(<) -o $(@) -endef - -$(generator-objects): $(generator-depends) -$(generator-objects): $(build)/%-build.o: $(src)/%.cpp - $(compile-generator-object) - -$(build)/%-build.o: $(lzma)/C/%.c - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(build-cc) -DPOINTER_SIZE=$(pointer-size) -O0 -g3 $(lzma-build-cflags) \ - -c $(<) -o $(@) - -$(jni-objects): $(build)/%.o: $(classpath-src)/%.cpp $(vm-depends) - $(compile-object) - -$(static-library): $(vm-objects) $(classpath-objects) $(vm-heapwalk-objects) \ - $(javahome-object) $(boot-javahome-object) $(lzma-decode-objects) - @echo "creating $(@)" - @rm -rf $(build)/libavian - @mkdir -p $(build)/libavian - rm -rf $(@) - for x in $(^); \ - do cp $${x} $(build)/libavian/$$(echo $${x} | sed s:/:_:g); \ - done -ifdef ms_cl_compiler - $(ar) $(arflags) $(build)/libavian/*.o -out:$(@) -else - $(ar) cru $(@) $(build)/libavian/*.o - $(ranlib) $(@) -endif - -$(bootimage-object) $(codeimage-object): $(bootimage-generator) \ - $(classpath-jar-dep) $(test-dep) - @echo "generating bootimage and codeimage binaries from $(classpath-build) using $(<)" - $(<) -cp $(bootimage-classpath) -bootimage $(bootimage-object) -codeimage $(codeimage-object) \ - -bootimage-symbols $(bootimage-symbols) \ - -codeimage-symbols $(codeimage-symbols) \ - -hostvm $(host-vm) - -executable-objects = $(vm-objects) $(classpath-objects) $(driver-object) \ - $(vm-heapwalk-objects) $(boot-object) $(vm-classpath-objects) \ - $(javahome-object) $(boot-javahome-object) $(lzma-decode-objects) - -unittest-executable-objects = $(unittest-objects) $(vm-objects) \ - $(vm-heapwalk-objects) $(build)/util/arg-parser.o $(stub-objects) \ - $(lzma-decode-objects) - -ifeq ($(process),interpret) - unittest-executable-objects += $(all-codegen-target-objects) -endif - -# apparently, make does poorly with ifs inside of defines, and indented defines. -# I suggest re-indenting the following before making edits (and unindenting afterwards): -ifneq ($(platform),windows) -define link-executable - @echo linking $(@) - $(ld) $(^) $(rdynamic) $(lflags) $(classpath-lflags) $(bootimage-lflags) \ - -o $(@) -endef -else -ifdef ms_cl_compiler -ifdef mt -define link-executable - @echo linking $(@) - $(ld) $(lflags) $(^) -out:$(@) \ - -debug -PDB:$(subst $(exe-suffix),.pdb,$(@)) $(manifest-flags) - $(mt) -nologo -manifest $(@).manifest -outputresource:"$(@);1" -endef -else -define link-executable - @echo linking $(@) - $(mt) -nologo -manifest $(@).manifest -outputresource:"$(@);1" -endef -endif -else -define link-executable - @echo linking $(@) - $(dlltool) -z $(@).def $(^) - $(dlltool) -d $(@).def -e $(@).exp - $(ld) $(@).exp $(^) $(lflags) $(classpath-lflags) -o $(@) -endef -endif -endif - -$(executable): $(executable-objects) - $(link-executable) - -$(unittest-executable): $(unittest-executable-objects) - $(link-executable) - -$(bootimage-generator): $(bootimage-generator-objects) $(vm-objects) - echo building $(bootimage-generator) arch=$(build-arch) platform=$(bootimage-platform) - $(MAKE) process=interpret \ - bootimage= \ - bootimage-test= \ - mode=$(mode) \ - platform=$(bootimage-platform) \ - arch=$(build-arch) - $(MAKE) mode=$(mode) \ - build=$(host-build-root) \ - arch=$(build-arch) \ - aot-only=false \ - target-arch=$(arch) \ - armv6=$(armv6) \ - platform=$(bootimage-platform) \ - target-format=$(target-format) \ - android=$(android) \ - openjdk=$(openjdk) \ - openjdk-src=$(openjdk-src) \ - bootimage-generator= \ - build-bootimage-generator=$(bootimage-generator) \ - target-cflags="$(bootimage-cflags)" \ - target-asm=$(asm) \ - $(bootimage-generator) - -$(build-bootimage-generator): \ - $(vm-objects) $(classpath-object) \ - $(heapwalk-objects) $(bootimage-generator-objects) $(converter-objects) \ - $(lzma-decode-objects) $(lzma-encode-objects) - @echo "linking $(@)" -ifeq ($(platform),windows) -ifdef ms_cl_compiler - $(ld) $(bootimage-generator-lflags) $(lflags) $(^) -out:$(@) \ - -debug -PDB:$(subst $(exe-suffix),.pdb,$(@)) $(manifest-flags) -ifdef mt - $(mt) -nologo -manifest $(@).manifest -outputresource:"$(@);1" -endif -else - $(dlltool) -z $(@).def $(^) - $(dlltool) -d $(@).def -e $(@).exp - $(ld) $(@).exp $(^) $(bootimage-generator-lflags) $(lflags) -o $(@) -endif -else - $(ld) $(^) $(rdynamic) $(bootimage-generator-lflags) $(lflags) -o $(@) -endif - -$(dynamic-library): $(vm-objects) $(dynamic-object) $(classpath-objects) \ - $(vm-heapwalk-objects) $(boot-object) $(vm-classpath-objects) \ - $(classpath-libraries) $(javahome-object) $(boot-javahome-object) \ - $(lzma-decode-objects) - @echo "linking $(@)" -ifdef ms_cl_compiler - $(ld) $(shared) $(lflags) $(^) -out:$(@) \ - -debug -PDB:$(subst $(so-suffix),.pdb,$(@)) \ - -IMPLIB:$(subst $(so-suffix),.lib,$(@)) $(manifest-flags) -ifdef mt - $(mt) -nologo -manifest $(@).manifest -outputresource:"$(@);2" -endif -else - $(ld) $(^) $(version-script-flag) $(soname-flag) \ - $(shared) $(lflags) $(classpath-lflags) $(bootimage-lflags) \ - -o $(@) -endif - $(strip) $(strip-all) $(@) - -# todo: the $(no-lto) flag below is due to odd undefined reference errors on -# Ubuntu 11.10 which may be fixable without disabling LTO. -$(executable-dynamic): $(driver-dynamic-objects) $(dynamic-library) - @echo "linking $(@)" -ifdef ms_cl_compiler - $(ld) $(lflags) -LIBPATH:$(build) -DEFAULTLIB:$(name) \ - -debug -PDB:$(subst $(exe-suffix),.pdb,$(@)) \ - $(driver-dynamic-objects) -out:$(@) $(manifest-flags) -ifdef mt - $(mt) -nologo -manifest $(@).manifest -outputresource:"$(@);1" -endif -else - $(ld) $(driver-dynamic-objects) -L$(build) -ljvm $(lflags) $(no-lto) $(rpath) -o $(@) -endif - $(strip) $(strip-all) $(@) - -$(generator): $(generator-objects) $(generator-lzma-objects) - @echo "linking $(@)" - $(build-ld-cpp) $(^) $(build-lflags) $(static-on-windows) -o $(@) - -$(openjdk-objects): $(build)/openjdk/%-openjdk.o: $(openjdk-src)/%.c \ - $(openjdk-headers-dep) - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - sed 's/^static jclass ia_class;//' < $(<) > $(build)/openjdk/$(notdir $(<)) -ifeq ($(platform),ios) - sed \ - -e 's/^#ifndef __APPLE__/#if 1/' \ - -e 's/^#ifdef __APPLE__/#if 0/' \ - < "$(openjdk-src)/solaris/native/java/lang/ProcessEnvironment_md.c" \ - > $(build)/openjdk/ProcessEnvironment_md.c - sed \ - -e 's/^#ifndef __APPLE__/#if 1/' \ - -e 's/^#ifdef __APPLE__/#if 0/' \ - < "$(openjdk-src)/solaris/native/java/lang/UNIXProcess_md.c" \ - > $(build)/openjdk/UNIXProcess_md.c - if [ -e "$(openjdk-src)/solaris/native/java/lang/childproc.h" ]; then \ - sed \ - -e 's/^#ifndef __APPLE__/#if 1/' \ - -e 's/^#ifdef __APPLE__/#if 0/' \ - < "$(openjdk-src)/solaris/native/java/lang/childproc.h" \ - > $(build)/openjdk/childproc.h; \ - fi -endif -ifneq (7,$(openjdk-version)) - if [ -f openjdk-patches/$(notdir $(<)).8.patch ]; then \ - ( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).8.patch; \ - fi - if [ -f openjdk-patches/$(notdir $(<)).8.$(platform).patch ]; then \ - ( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).8.$(platform).patch; \ - fi -endif - if [ -f openjdk-patches/$(notdir $(<)).patch ]; then \ - ( cd $(build) && patch -p0 ) < openjdk-patches/$(notdir $(<)).patch; \ - fi - $(cc) -fPIC $(openjdk-extra-cflags) $(openjdk-cflags) \ - $(optimization-cflags) -w -c $(build)/openjdk/$(notdir $(<)) \ - $(call output,$(@)) -Wno-return-type - -$(openjdk-local-objects): $(build)/openjdk/%-openjdk.o: $(src)/openjdk/%.c \ - $(openjdk-headers-dep) - @echo "compiling $(@)" - @mkdir -p $(dir $(@)) - $(cc) -fPIC $(openjdk-extra-cflags) $(openjdk-cflags) \ - $(optimization-cflags) -w -c $(<) $(call output,$(@)) - -$(openjdk-headers-dep): - @echo "generating openjdk headers" - @mkdir -p $(dir $(@)) - $(javah) -d $(build)/openjdk -bootclasspath $(boot-classpath) \ - $(openjdk-headers-classes) -ifeq ($(platform),windows) - sed 's/^#ifdef _WIN64/#if 1/' \ - < "$(openjdk-src)/windows/native/java/net/net_util_md.h" \ - > $(build)/openjdk/net_util_md.h - sed \ - -e 's/\(^#include "net_util.h"\)/\1\n#if (defined _INC_NLDEF) || (defined _WS2DEF_)\n#define HIDE(x) hide_##x\n#else\n#define HIDE(x) x\n#define _WINSOCK2API_\n#endif/' \ - -e 's/\(IpPrefix[a-zA-Z_]*\)/HIDE(\1)/' \ - -e 's/\(IpSuffix[a-zA-Z_]*\)/HIDE(\1)/' \ - -e 's/\(IpDad[a-zA-Z_]*\)/HIDE(\1)/' \ - -e 's/\(ScopeLevel[a-zA-Z_]*\)/HIDE(\1)/' \ - -e 's/\(SCOPE_LEVEL[a-zA-Z_]*\)/HIDE(\1)/' \ - < "$(openjdk-src)/windows/native/java/net/NetworkInterface.h" \ - > $(build)/openjdk/NetworkInterface.h - echo 'static int getAddrsFromAdapter(IP_ADAPTER_ADDRESSES *ptr, netaddr **netaddrPP);' >> $(build)/openjdk/NetworkInterface.h -endif - -ifeq ($(kernel),darwin) - mkdir -p $(build)/openjdk/netinet - for file in \ - $(header-sysroot)/usr/include/netinet/ip.h \ - $(header-sysroot)/usr/include/netinet/in_systm.h \ - $(header-sysroot)/usr/include/netinet/ip_icmp.h \ - $(header-sysroot)/usr/include/netinet/in_var.h \ - $(header-sysroot)/usr/include/netinet/icmp6.h \ - $(header-sysroot)/usr/include/netinet/ip_var.h; do \ - if [ ! -f "$(build)/openjdk/netinet/$$(basename $${file})" ]; then \ - ln -s "$${file}" "$(build)/openjdk/netinet/$$(basename $${file})"; \ - fi; \ - done - mkdir -p $(build)/openjdk/netinet6 - for file in \ - $(header-sysroot)/usr/include/netinet6/in6_var.h; do \ - if [ ! -f "$(build)/openjdk/netinet6/$$(basename $${file})" ]; then \ - ln -s "$${file}" "$(build)/openjdk/netinet6/$$(basename $${file})"; \ - fi; \ - done - mkdir -p $(build)/openjdk/net - for file in \ - $(header-sysroot)/usr/include/net/if_arp.h; do \ - if [ ! -f "$(build)/openjdk/net/$$(basename $${file})" ]; then \ - ln -s "$${file}" "$(build)/openjdk/net/$$(basename $${file})"; \ - fi; \ - done - mkdir -p $(build)/openjdk/sys - for file in \ - $(header-sysroot)/usr/include/sys/kern_event.h \ - $(header-sysroot)/usr/include/sys/sys_domain.h; do \ - if [ ! -f "$(build)/openjdk/sys/$$(basename $${file})" ]; then \ - ln -s "$${file}" "$(build)/openjdk/sys/$$(basename $${file})"; \ - fi; \ - done -endif - @touch $(@) - -$(openjdk-jar-dep): - @echo "extracting openjdk classes" - @mkdir -p $(dir $(@)) - @mkdir -p $(classpath-build) - (cd $(classpath-build) && \ - $(jar) xf "$$($(native-path) "$(openjdk-image)/lib/rt.jar")" && \ - $(jar) xf "$$($(native-path) "$(openjdk-image)/lib/charsets.jar")" && \ - $(jar) xf "$$($(native-path) "$(openjdk-image)/lib/resources.jar")" && \ - $(jar) xf "$$($(native-path) "$(openjdk-image)/lib/ext/sunec.jar")") - @touch $(@) diff --git a/sgx-jvm/avian/openjdk-patches/Inet4AddressImpl.c.8.patch b/sgx-jvm/avian/openjdk-patches/Inet4AddressImpl.c.8.patch deleted file mode 100644 index 56e99af3bc..0000000000 --- a/sgx-jvm/avian/openjdk-patches/Inet4AddressImpl.c.8.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- openjdk/Inet4AddressImpl.c -+++ openjdk/Inet4AddressImpl.c -@@ -461,6 +461,21 @@ - return JNI_FALSE; - } - -+#ifdef WIN32 -+DWORD WINAPI IcmpSendEcho2Ex(HANDLE, -+ HANDLE, -+ LPVOID, -+ PVOID, -+ IPAddr, -+ IPAddr, -+ LPVOID, -+ WORD, -+ LPVOID, -+ LPVOID, -+ DWORD, -+ DWORD); -+#endif -+ - /** - * ping implementation. - * Send a ICMP_ECHO_REQUEST packet every second until either the timeout diff --git a/sgx-jvm/avian/openjdk-patches/Inet6AddressImpl.c.8.patch b/sgx-jvm/avian/openjdk-patches/Inet6AddressImpl.c.8.patch deleted file mode 100644 index d2994ea21f..0000000000 --- a/sgx-jvm/avian/openjdk-patches/Inet6AddressImpl.c.8.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- openjdk/Inet6AddressImpl.c -+++ openjdk/Inet6AddressImpl.c -@@ -360,6 +360,13 @@ - - #ifdef AF_INET6 - -+#ifdef __MINGW32__ -+typedef struct icmpv6_echo_reply_lh { -+ IPV6_ADDRESS_EX Address; -+ ULONG Status; -+ unsigned int RoundTripTime; -+} ICMPV6_ECHO_REPLY, *PICMPV6_ECHO_REPLY; -+#endif - - /** - * ping implementation. - diff --git a/sgx-jvm/avian/openjdk-patches/java_props_macosx.c.patch b/sgx-jvm/avian/openjdk-patches/java_props_macosx.c.patch deleted file mode 100644 index 42622f6fda..0000000000 --- a/sgx-jvm/avian/openjdk-patches/java_props_macosx.c.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- openjdk/java_props_macosx.c -+++ openjdk/java_props_macosx.c -@@ -37,11 +37,7 @@ - - // need dlopen/dlsym trick to avoid pulling in JavaRuntimeSupport before libjava.dylib is loaded - static void *getJRSFramework() { -- static void *jrsFwk = NULL; -- if (jrsFwk == NULL) { -- jrsFwk = dlopen("/System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/JavaRuntimeSupport", RTLD_LAZY | RTLD_LOCAL); -- } -- return jrsFwk; -+ return NULL; - } - - static char *getPosixLocale(int cat) { diff --git a/sgx-jvm/avian/openjdk-patches/java_props_md.c.8.windows.patch b/sgx-jvm/avian/openjdk-patches/java_props_md.c.8.windows.patch deleted file mode 100644 index 0211421383..0000000000 --- a/sgx-jvm/avian/openjdk-patches/java_props_md.c.8.windows.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- openjdk/java_props_md.c -+++ openjdk/java_props_md.c -@@ -212,17 +212,17 @@ - * SHELL32 DLL is delay load DLL and we can use the trick with - * __try/__except block. - */ -- __try { -+ /* __try { */ - /* - * For Windows Vista and later (or patched MS OS) we need to use - * [SHGetKnownFolderPath] call to avoid MAX_PATH length limitation. - * Shell32.dll (version 6.0.6000 or later) - */ - hr = SHGetKnownFolderPath(&FOLDERID_Profile, KF_FLAG_DONT_VERIFY, NULL, &u_path); -- } __except(EXCEPTION_EXECUTE_HANDLER) { -+ /* } __except(EXCEPTION_EXECUTE_HANDLER) { */ - /* Exception: no [SHGetKnownFolderPath] entry */ -- hr = E_FAIL; -- } -+ /* hr = E_FAIL; */ -+ /* } */ - - if (FAILED(hr)) { - WCHAR path[MAX_PATH+1]; diff --git a/sgx-jvm/avian/openjdk-src.mk b/sgx-jvm/avian/openjdk-src.mk deleted file mode 100644 index 4bf2a6c678..0000000000 --- a/sgx-jvm/avian/openjdk-src.mk +++ /dev/null @@ -1,270 +0,0 @@ -openjdk-sources = \ - $(openjdk-src)/share/native/common/check_code.c \ - $(openjdk-src)/share/native/common/check_format.c \ - $(openjdk-src)/share/native/common/check_version.c \ - $(openjdk-src)/share/native/common/jdk_util.c \ - $(openjdk-src)/share/native/common/jio.c \ - $(openjdk-src)/share/native/common/jni_util.c \ - $(openjdk-src)/share/native/common/verify_stub.c \ - $(openjdk-src)/share/native/java/io/FileInputStream.c \ - $(openjdk-src)/share/native/java/io/io_util.c \ - $(openjdk-src)/share/native/java/lang/Class.c \ - $(openjdk-src)/share/native/java/lang/ClassLoader.c \ - $(openjdk-src)/share/native/java/lang/Double.c \ - $(openjdk-src)/share/native/java/lang/Float.c \ - $(openjdk-src)/share/native/java/lang/Object.c \ - $(openjdk-src)/share/native/java/lang/Package.c \ - $(wildcard $(openjdk-src)/share/native/java/lang/ref/Finalizer.c) \ - $(openjdk-src)/share/native/java/lang/reflect/Array.c \ - $(openjdk-src)/share/native/java/lang/reflect/Proxy.c \ - $(wildcard $(openjdk-src)/share/native/java/lang/ResourceBundle.c) \ - $(openjdk-src)/share/native/java/lang/Runtime.c \ - $(openjdk-src)/share/native/java/lang/SecurityManager.c \ - $(openjdk-src)/share/native/java/lang/Shutdown.c \ - $(openjdk-src)/share/native/java/lang/StrictMath.c \ - $(openjdk-src)/share/native/java/lang/String.c \ - $(openjdk-src)/share/native/java/lang/System.c \ - $(openjdk-src)/share/native/java/lang/Thread.c \ - $(openjdk-src)/share/native/java/lang/Throwable.c \ - $(wildcard $(openjdk-src)/share/native/java/lang/fdlibm/src/*.c) \ - $(openjdk-src)/share/native/java/net/InetAddress.c \ - $(openjdk-src)/share/native/java/nio/Bits.c \ - $(openjdk-src)/share/native/java/security/AccessController.c \ - $(openjdk-src)/share/native/java/util/concurrent/atomic/AtomicLong.c \ - $(openjdk-src)/share/native/java/util/TimeZone.c \ - $(openjdk-src)/share/native/java/util/zip/Adler32.c \ - $(openjdk-src)/share/native/java/util/zip/CRC32.c \ - $(openjdk-src)/share/native/java/util/zip/Deflater.c \ - $(openjdk-src)/share/native/java/util/zip/Inflater.c \ - $(openjdk-src)/share/native/java/util/zip/ZipFile.c \ - $(openjdk-src)/share/native/java/util/zip/zip_util.c \ - $(openjdk-src)/share/native/sun/misc/GC.c \ - $(openjdk-src)/share/native/sun/misc/MessageUtils.c \ - $(openjdk-src)/share/native/sun/misc/NativeSignalHandler.c \ - $(openjdk-src)/share/native/sun/misc/Signal.c \ - $(openjdk-src)/share/native/sun/misc/Version.c \ - $(openjdk-src)/share/native/sun/misc/VM.c \ - $(openjdk-src)/share/native/sun/misc/VMSupport.c \ - $(openjdk-src)/share/native/sun/reflect/ConstantPool.c \ - $(openjdk-src)/share/native/sun/reflect/NativeAccessors.c \ - $(openjdk-src)/share/native/sun/reflect/Reflection.c - -openjdk-headers-classes = \ - java.io.FileDescriptor \ - java.io.FileInputStream \ - java.io.FileOutputStream \ - java.io.FileSystem \ - java.lang.Class \ - java.lang.ClassLoader \ - java.lang.Double \ - java.lang.Float \ - java.lang.Integer \ - java.lang.Long \ - java.lang.Object \ - java.lang.Package \ - java.lang.Runtime \ - java.lang.SecurityManager \ - java.lang.Shutdown \ - java.lang.StrictMath \ - java.lang.String \ - java.lang.System \ - java.lang.Thread \ - java.lang.Throwable \ - java.lang.ref.Finalizer \ - java.lang.reflect.Array \ - java.lang.reflect.Proxy \ - java.net.InetAddress \ - java.nio.MappedByteBuffer \ - java.security.AccessController \ - java.util.ResourceBundle \ - java.util.TimeZone \ - java.util.concurrent.atomic.AtomicLong \ - java.util.jar.JarFile \ - java.util.zip.Adler32 \ - java.util.zip.CRC32 \ - java.util.zip.Deflater \ - java.util.zip.Inflater \ - java.util.zip.ZipEntry \ - java.util.zip.ZipFile \ - sun.misc.GC \ - sun.misc.MessageUtils \ - sun.misc.NativeSignalHandler \ - sun.misc.Signal \ - sun.misc.VM \ - sun.misc.VMSupport \ - sun.misc.Version \ - sun.misc.URLClassPath \ - sun.nio.ch.IOStatus \ - sun.reflect.ConstantPool \ - sun.reflect.NativeConstructorAccessorImpl \ - sun.reflect.NativeMethodAccessorImpl \ - sun.reflect.Reflection \ - sun.security.provider.NativeSeedGenerator - -ifneq (7,$(openjdk-version)) - openjdk-sources += \ - $(openjdk-src)/share/native/sun/misc/URLClassPath.c -endif - -# todo: set properties according to architecture targeted and OpenJDK -# version used: -openjdk-cflags = \ - "-I$(src)/openjdk" \ - "-I$(build)/openjdk" \ - "-I$(openjdk-src)/share/javavm/export" \ - "-I$(openjdk-src)/share/native/common" \ - "-I$(openjdk-src)/share/native/java/io" \ - "-I$(openjdk-src)/share/native/java/lang" \ - "-I$(openjdk-src)/share/native/java/lang/fdlibm/include" \ - "-I$(openjdk-src)/share/native/java/net" \ - "-I$(openjdk-src)/share/native/java/util/zip" \ - "-I$(openjdk-src)/share/native/sun/nio/ch" \ - "-I$(openjdk-src)/share/javavm/include" \ - -D_LITTLE_ENDIAN \ - -DARCHPROPNAME=\"x86\" \ - -DRELEASE=\"1.6.0\" \ - -DJDK_MAJOR_VERSION=\"1\" \ - -DJDK_MINOR_VERSION=\"6\" \ - -DJDK_MICRO_VERSION=\"0\" \ - -DJDK_BUILD_NUMBER=\"0\" \ - -D_GNU_SOURCE - -ifeq ($(kernel),darwin) - openjdk-cflags += \ - -D_LFS_LARGEFILE=1 \ - -D_ALLBSD_SOURCE -endif - -ifeq ($(platform),windows) - openjdk-sources += \ - $(openjdk-src)/windows/native/common/jni_util_md.c \ - $(openjdk-src)/windows/native/java/io/canonicalize_md.c \ - $(openjdk-src)/windows/native/java/io/FileDescriptor_md.c \ - $(openjdk-src)/windows/native/java/io/FileInputStream_md.c \ - $(openjdk-src)/windows/native/java/io/FileOutputStream_md.c \ - $(openjdk-src)/windows/native/java/io/io_util_md.c \ - $(openjdk-src)/windows/native/java/io/WinNTFileSystem_md.c \ - $(openjdk-src)/windows/native/java/lang/java_props_md.c \ - $(openjdk-src)/windows/native/java/util/WindowsPreferences.c \ - $(openjdk-src)/windows/native/java/util/logging.c \ - $(openjdk-src)/windows/native/java/util/TimeZone_md.c \ - $(openjdk-src)/windows/native/sun/io/Win32ErrorMode.c \ - $(openjdk-src)/windows/native/sun/security/provider/WinCAPISeedGenerator.c - - ifeq (7,$(openjdk-version)) - openjdk-sources += \ - $(openjdk-src)/windows/native/java/io/FileSystem_md.c \ - $(openjdk-src)/windows/native/java/io/Win32FileSystem_md.c - endif - - openjdk-headers-classes += \ - sun.io.Win32ErrorMode - - openjdk-cflags += \ - "-I$(openjdk-src)/windows/javavm/export" \ - "-I$(openjdk-src)/windows/native/common" \ - "-I$(openjdk-src)/windows/native/java/io" \ - "-I$(openjdk-src)/windows/native/java/net" \ - "-I$(openjdk-src)/windows/native/java/util" \ - "-I$(openjdk-src)/windows/native/sun/nio/ch" \ - "-I$(openjdk-src)/windows/javavm/include" \ - -DLOCALE_SNAME=0x0000005c \ - -DLOCALE_SISO3166CTRYNAME2=0x00000068 \ - -DLOCALE_SISO639LANGNAME2=0x00000067 \ - -D_JNI_IMPLEMENTATION_ \ - -D_JAVASOFT_WIN32_TYPEDEF_MD_H_ \ - -D_WIN32_WINNT=0x0600 \ - -Ds6_words=_s6_words \ - -Ds6_bytes=_s6_bytes - - ifeq ($(arch),x86_64) - openjdk-cflags += "-I$(root)/win64/include" - else - openjdk-cflags += "-I$(root)/win32/include" - endif -else - openjdk-sources += \ - $(shell find $(openjdk-src)/solaris/native/common -name '*.c') \ - $(openjdk-src)/solaris/native/java/io/canonicalize_md.c \ - $(openjdk-src)/solaris/native/java/io/FileDescriptor_md.c \ - $(openjdk-src)/solaris/native/java/io/FileInputStream_md.c \ - $(openjdk-src)/solaris/native/java/io/FileOutputStream_md.c \ - $(wildcard $(openjdk-src)/solaris/native/java/io/FileSystem_md.c) \ - $(openjdk-src)/solaris/native/java/io/io_util_md.c \ - $(openjdk-src)/solaris/native/java/io/UnixFileSystem_md.c \ - $(openjdk-src)/solaris/native/java/lang/java_props_md.c \ - $(wildcard $(openjdk-src)/solaris/native/java/lang/childproc.c) \ - $(openjdk-src)/solaris/native/java/nio/MappedByteBuffer.c \ - $(openjdk-src)/solaris/native/java/util/FileSystemPreferences.c \ - $(openjdk-src)/solaris/native/java/util/logging.c \ - $(openjdk-src)/solaris/native/java/util/TimeZone_md.c - - openjdk-headers-classes += \ - java.io.UnixFileSystem - - ifneq (7,$(openjdk-version)) - openjdk-headers-classes += - endif - - openjdk-cflags += \ - "-I$(openjdk-src)/solaris/javavm/export" \ - "-I$(openjdk-src)/solaris/native/common" \ - "-I$(openjdk-src)/solaris/native/java/io" \ - "-I$(openjdk-src)/solaris/native/java/lang" \ - "-I$(openjdk-src)/solaris/native/java/net" \ - "-I$(openjdk-src)/solaris/native/java/util" \ - "-I$(openjdk-src)/solaris/native/sun/nio/ch" \ - "-I$(openjdk-src)/solaris/javavm/include" \ - "-I$(openjdk-src)/solaris/hpi/include" \ - "-I$(openjdk-src)/solaris/native/common/deps" \ - "-I$(openjdk-src)/solaris/native/common/deps/fontconfig2" \ - "-I$(openjdk-src)/solaris/native/common/deps/gconf2" \ - "-I$(openjdk-src)/solaris/native/common/deps/glib2" \ - "-I$(openjdk-src)/solaris/native/common/deps/gtk2" \ - "-DX11_PATH=\"/usr/X11R6\"" - - ifeq ($(platform),linux) - openjdk-sources += \ - $(openjdk-src)/solaris/native/java/net/linux_close.c - - openjdk-headers-classes += - - openjdk-cflags += \ - "-I$(openjdk-src)/solaris/native/common/deps/glib2" \ - "-I$(openjdk-src)/solaris/native/common/deps/gconf2" \ - "-I$(openjdk-src)/solaris/native/common/deps/fontconfig2" \ - "-I$(openjdk-src)/solaris/native/common/deps/gtk2" \ - $(shell pkg-config --cflags glib-2.0) \ - $(shell pkg-config --cflags gconf-2.0) - endif - - ifeq ($(kernel),darwin) - openjdk-sources += \ - $(openjdk-src)/solaris/native/java/net/bsd_close.c \ - $(openjdk-src)/macosx/native/sun/nio/ch/KQueueArrayWrapper.c - - ifeq ($(platform),ios) - openjdk-local-sources += \ - $(src)/openjdk/my_java_props_macosx.c - else - openjdk-sources += \ - $(openjdk-src)/solaris/native/java/lang/java_props_macosx.c - endif - - openjdk-cflags += \ - -DMACOSX -x objective-c - endif -endif - -openjdk-local-sources += - -openjdk-c-objects = \ - $(foreach x,$(1),$(patsubst $(2)/%.c,$(3)/%-openjdk.o,$(x))) - -openjdk-objects = \ - $(call openjdk-c-objects,$(openjdk-sources),$(openjdk-src),$(build)/openjdk) - -openjdk-local-objects = \ - $(call openjdk-c-objects,$(openjdk-local-sources),$(src)/openjdk,$(build)/openjdk) - -openjdk-headers-dep = $(build)/openjdk/headers.dep diff --git a/sgx-jvm/avian/openjdk.ld b/sgx-jvm/avian/openjdk.ld deleted file mode 100644 index 915cdde6e2..0000000000 --- a/sgx-jvm/avian/openjdk.ld +++ /dev/null @@ -1,294 +0,0 @@ -# -# @(#)mapfile-vers-product 1.19 08/02/12 10:56:37 -# - -# -# Copyright 2002-2008 Sun Microsystems, Inc. All Rights Reserved. -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# This code is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 only, as -# published by the Free Software Foundation. -# -# This code is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# version 2 for more details (a copy is included in the LICENSE file that -# accompanied this code). -# -# You should have received a copy of the GNU General Public License version -# 2 along with this work; if not, write to the Free Software Foundation, -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -# CA 95054 USA or visit www.sun.com if you need additional information or -# have any questions. -# -# - -# Define public interface. - -SUNWprivate_1.1 { - global: - # JNI - JNI_CreateJavaVM; - JNI_GetCreatedJavaVMs; - JNI_GetDefaultJavaVMInitArgs; - - # JVM - JVM_Accept; - JVM_ActiveProcessorCount; - JVM_AllocateNewArray; - JVM_AllocateNewObject; - JVM_ArrayCopy; - JVM_AssertionStatusDirectives; - JVM_Available; - JVM_Bind; - JVM_ClassDepth; - JVM_ClassLoaderDepth; - JVM_Clone; - JVM_Close; - JVM_CX8Field; - JVM_CompileClass; - JVM_CompileClasses; - JVM_CompilerCommand; - JVM_Connect; - JVM_ConstantPoolGetClassAt; - JVM_ConstantPoolGetClassAtIfLoaded; - JVM_ConstantPoolGetDoubleAt; - JVM_ConstantPoolGetFieldAt; - JVM_ConstantPoolGetFieldAtIfLoaded; - JVM_ConstantPoolGetFloatAt; - JVM_ConstantPoolGetIntAt; - JVM_ConstantPoolGetLongAt; - JVM_ConstantPoolGetMethodAt; - JVM_ConstantPoolGetMethodAtIfLoaded; - JVM_ConstantPoolGetMemberRefInfoAt; - JVM_ConstantPoolGetSize; - JVM_ConstantPoolGetStringAt; - JVM_ConstantPoolGetUTF8At; - JVM_CountStackFrames; - JVM_CurrentClassLoader; - JVM_CurrentLoadedClass; - JVM_CurrentThread; - JVM_CurrentTimeMillis; - JVM_DefineClass; - JVM_DefineClassWithSource; - JVM_DefineClassWithSourceCond; - JVM_DesiredAssertionStatus; - JVM_DisableCompiler; - JVM_DoPrivileged; - JVM_DTraceGetVersion; - JVM_DTraceActivate; - JVM_DTraceIsProbeEnabled; - JVM_DTraceIsSupported; - JVM_DTraceDispose; - JVM_DumpAllStacks; - JVM_DumpThreads; - JVM_EnableCompiler; - JVM_Exit; - JVM_FillInStackTrace; - JVM_FindClassFromCaller; - JVM_FindClassFromClass; - JVM_FindClassFromClassLoader; - JVM_FindClassFromBootLoader; - JVM_FindLibraryEntry; - JVM_FindLoadedClass; - JVM_FindPrimitiveClass; - JVM_FindSignal; - JVM_FreeMemory; - JVM_GC; - JVM_GetAllThreads; - JVM_GetArrayElement; - JVM_GetArrayLength; - JVM_GetCPClassNameUTF; - JVM_GetCPFieldClassNameUTF; - JVM_GetCPFieldModifiers; - JVM_GetCPFieldNameUTF; - JVM_GetCPFieldSignatureUTF; - JVM_GetCPMethodClassNameUTF; - JVM_GetCPMethodModifiers; - JVM_GetCPMethodNameUTF; - JVM_GetCPMethodSignatureUTF; - JVM_GetCallerClass; - JVM_GetClassAccessFlags; - JVM_GetClassAnnotations; - JVM_GetClassCPEntriesCount; - JVM_GetClassCPTypes; - JVM_GetClassConstantPool; - JVM_GetClassContext; - JVM_GetClassDeclaredConstructors; - JVM_GetClassDeclaredFields; - JVM_GetClassDeclaredMethods; - JVM_GetClassFieldsCount; - JVM_GetClassInterfaces; - JVM_GetClassLoader; - JVM_GetClassMethodsCount; - JVM_GetClassModifiers; - JVM_GetClassName; - JVM_GetClassNameUTF; - JVM_GetClassSignature; - JVM_GetClassSigners; - JVM_GetClassTypeAnnotations; - JVM_GetComponentType; - JVM_GetDeclaredClasses; - JVM_GetDeclaringClass; - JVM_GetEnclosingMethodInfo; - JVM_GetFieldAnnotations; - JVM_GetFieldIxModifiers; - JVM_GetFieldTypeAnnotations; - JVM_GetHostName; - JVM_GetInheritedAccessControlContext; - JVM_GetInterfaceVersion; - JVM_GetLastErrorString; - JVM_GetManagement; - JVM_GetMethodAnnotations; - JVM_GetMethodDefaultAnnotationValue; - JVM_GetMethodIxArgsSize; - JVM_GetMethodIxByteCode; - JVM_GetMethodIxByteCodeLength; - JVM_GetMethodIxExceptionIndexes; - JVM_GetMethodIxExceptionTableEntry; - JVM_GetMethodIxExceptionTableLength; - JVM_GetMethodIxExceptionsCount; - JVM_GetMethodIxLocalsCount; - JVM_GetMethodIxMaxStack; - JVM_GetMethodIxModifiers; - JVM_GetMethodIxNameUTF; - JVM_GetMethodIxSignatureUTF; - JVM_GetMethodParameterAnnotations; - JVM_GetPrimitiveArrayElement; - JVM_GetProtectionDomain; - JVM_GetResourceLookupCacheURLs; - JVM_GetSockName; - JVM_GetSockOpt; - JVM_GetStackAccessControlContext; - JVM_GetStackTraceDepth; - JVM_GetStackTraceElement; - JVM_GetSystemPackage; - JVM_GetSystemPackages; - JVM_GetThreadStateNames; - JVM_GetThreadStateValues; - JVM_GetVersionInfo; - JVM_Halt; - JVM_HoldsLock; - JVM_IHashCode; - JVM_InitAgentProperties; - JVM_InitProperties; - JVM_InitializeCompiler; - JVM_InitializeSocketLibrary; - JVM_InternString; - JVM_Interrupt; - JVM_InvokeMethod; - JVM_IsArrayClass; - JVM_IsConstructorIx; - JVM_IsInterface; - JVM_IsInterrupted; - JVM_IsNaN; - JVM_IsPrimitiveClass; - JVM_IsSameClassPackage; - JVM_IsSilentCompiler; - JVM_IsSupportedJNIVersion; - JVM_IsThreadAlive; - JVM_IsVMGeneratedMethodIx; - JVM_LatestUserDefinedLoader; - JVM_Listen; - JVM_LoadClass0; - JVM_LoadLibrary; - JVM_Lseek; - JVM_MaxObjectInspectionAge; - JVM_MaxMemory; - JVM_MonitorNotify; - JVM_MonitorNotifyAll; - JVM_MonitorWait; - JVM_NanoTime; - JVM_NativePath; - JVM_NewArray; - JVM_NewInstanceFromConstructor; - JVM_NewMultiArray; - JVM_OnExit; - JVM_Open; - JVM_PrintStackTrace; - JVM_RaiseSignal; - JVM_RawMonitorCreate; - JVM_RawMonitorDestroy; - JVM_RawMonitorEnter; - JVM_RawMonitorExit; - JVM_Read; - JVM_Recv; - JVM_RecvFrom; - JVM_RegisterSignal; - JVM_ReleaseUTF; - JVM_ResolveClass; - JVM_ResumeThread; - JVM_Send; - JVM_SendTo; - JVM_SetArrayElement; - JVM_SetClassSigners; - JVM_SetLength; - JVM_SetNativeThreadName; - JVM_SetPrimitiveArrayElement; - JVM_SetProtectionDomain; - JVM_SetSockOpt; - JVM_SetThreadPriority; - JVM_Sleep; - JVM_Socket; - JVM_SocketAvailable; - JVM_SocketClose; - JVM_SocketShutdown; - JVM_StartThread; - JVM_StopThread; - JVM_SuspendThread; - JVM_SupportsCX8; - JVM_Sync; - JVM_Timeout; - JVM_TotalMemory; - JVM_TraceInstructions; - JVM_TraceMethodCalls; - JVM_UnloadLibrary; - JVM_Write; - JVM_Yield; - JVM_handle_linux_signal; - - # Old reflection routines - # These do not need to be present in the product build in JDK 1.4 - # but their code has not been removed yet because there will not - # be a substantial code savings until JVM_InvokeMethod and - # JVM_NewInstanceFromConstructor can also be removed; see - # reflectionCompat.hpp. - JVM_GetClassConstructor; - JVM_GetClassConstructors; - JVM_GetClassField; - JVM_GetClassFields; - JVM_GetClassMethod; - JVM_GetClassMethods; - JVM_GetField; - JVM_GetPrimitiveField; - JVM_NewInstance; - JVM_SetField; - JVM_SetPrimitiveField; - - # Needed for dropping VM into JDK 1.3.x, 1.4 - _JVM_native_threads; - jdk_sem_init; - jdk_sem_post; - jdk_sem_wait; - jdk_pthread_sigmask; - jdk_waitpid; - - # miscellaneous functions - jio_fprintf; - jio_printf; - jio_snprintf; - jio_vfprintf; - jio_vsnprintf; - fork1; - numa_warn; - numa_error; - - # Needed because there is no JVM interface for this. - sysThreadAvailableStackWithSlack; - - # This is for Forte Analyzer profiling support. - AsyncGetCallTrace; -}; diff --git a/sgx-jvm/avian/openjdk.pro b/sgx-jvm/avian/openjdk.pro deleted file mode 100644 index 8054c52812..0000000000 --- a/sgx-jvm/avian/openjdk.pro +++ /dev/null @@ -1,350 +0,0 @@ -# proguard include file (http://proguard.sourceforge.net) - -# This file is for use in combination with vm.pro when ProGuarding -# OpenJDK-based builds - -# the following methods and fields are refered to by name in the VM: - --keepclassmembers class java.lang.Thread { - public void run(); - } - --keepclassmembers class java.lang.ThreadGroup { - void threadTerminated(java.lang.Thread); - } - --keep class java.lang.System { - private static void initializeSystemClass(); - public static void setProperties(java.util.Properties); - } - --keep class sun.misc.Launcher { - public static sun.misc.Launcher getLauncher(); - } - --keep class java.lang.ClassLoader { - private static java.lang.ClassLoader scl; - private static boolean sclSet; - - protected ClassLoader(java.lang.ClassLoader); - } - --keep class avian.SystemClassLoader { - protected java.net.URL findResource(java.lang.String); - } - --keepnames class java.lang.ClassLoader { - public java.lang.Class loadClass(java.lang.String); - static void loadLibrary(java.lang.Class, java.lang.String, boolean); - private static java.net.URL getBootstrapResource(java.lang.String); - private static java.util.Enumeration getBootstrapResources(java.lang.String); - } - --keep class java.util.Properties { - public java.lang.Object setProperty(java.lang.String, java.lang.String); - public java.lang.String getProperty(java.lang.String); - } - --keep class java.util.Hashtable { - public java.lang.Object remove(java.lang.Object); - } - --keep class avian.OpenJDK { - ; - } - --keepclassmembers public class java.security.PrivilegedAction { - public java.lang.Object run(); - } - --keepclassmembers public class * implements java.security.PrivilegedAction { - public java.lang.Object run(); - } - --keepclassmembers public class java.security.PrivilegedExceptionAction { - public java.lang.Object run(); - } - --keepclassmembers public class * implements java.security.PrivilegedExceptionAction { - public java.lang.Object run(); - } - --keep public class java.security.PrivilegedActionException { - public PrivilegedActionException(java.lang.Exception); - } - -# these class names are used to disambiguate JNI method lookups: - --keepnames public class java.net.URL --keepnames public class java.util.Enumeration --keepnames public class java.security.ProtectionDomain --keepnames public class java.security.PrivilegedAction --keepnames public class java.security.PrivilegedExceptionAction --keepnames public class java.security.AccessControlContext - -# the following methods and fields are refered to by name in the OpenJDK -# native code: - --keep class java.util.Properties { - public java.lang.Object put(java.lang.Object, java.lang.Object); - } - --keepclassmembers class * { - public boolean equals(java.lang.Object); - public void wait(); - public void notify(); - public void notifyAll(); - public java.lang.String toString(); - } - --keepclassmembers class java.lang.String { - public String(byte[]); - public String(byte[], java.lang.String); - public byte[] getBytes(); - public byte[] getBytes(java.lang.String); - } - --keepclassmembers class java.lang.Boolean { - public boolean getBoolean(java.lang.String); - } - --keepclassmembers class java.util.zip.Inflater { - long strm; - boolean needDict; - boolean finished; - byte[] buf; - int off; - int len; - } - --keepclassmembers class java.io.FileDescriptor { - private int fd; - private long handle; - } - --keep class java.net.NetworkInterface { - ; - } --keep class java.net.InetAddress { - ; - } --keep class java.net.Inet4Address { - ; - } --keep class java.net.Inet4AddressImpl --keep class java.net.Inet6Address { - ; - } --keep class java.net.Inet6AddressImpl --keep class java.net.InetSocketAddress { - public InetSocketAddress(java.net.InetAddress, int); - } --keep class java.net.ServerSocket --keep class java.net.SocketTimeoutException - --keepclassmembers class java.net.PlainSocketImpl { - ; - } - --keepclassmembers class java.net.TwoStacksPlainSocketImpl { - *** fd1; - *** lastfd; -} - --keepclassmembers class java.net.AbstractPlainSocketImpl { - *** timeout; - *** trafficClass; -} - --keepclassmembers class java.net.SocketImpl { - *** serverSocket; - *** fd; - *** address; - *** port; - *** localport; -} - --keepclassmembers class java.io.FileInputStream { - private java.io.FileDescriptor fd; - } - --keepclassmembers class java.io.FileOutputStream { - private java.io.FileDescriptor fd; - private boolean append; - } - -# changed in native code via sun.misc.Unsafe (todo: handle other -# Atomic* classes) --keepclassmembers class java.util.concurrent.atomic.AtomicInteger { - private int value; - } - -# avoid inlining due to access check using a fixed offset into call stack: --keep,allowshrinking,allowobfuscation class java.util.concurrent.atomic.AtomicReferenceFieldUpdater { - *** newUpdater(...); - } - -# accessed reflectively via an AtomicReferenceFieldUpdater: --keepclassmembers class java.io.BufferedInputStream { - protected byte[] buf; - } - --keep class java.lang.System { - public static java.io.InputStream in; - public static java.io.PrintStream out; - public static java.io.PrintStream err; - # avoid inlining due to access check using fixed offset into call stack: - static java.lang.Class getCallerClass(); - # called from jni_util.c: - static java.lang.String getProperty(java.lang.String); - } - -# refered to by name from native code: --keepnames public class java.io.InputStream --keepnames public class java.io.PrintStream - -# avoid inlining due to access check using fixed offset into call stack: --keep,allowshrinking,allowobfuscation class java.lang.System { - static java.lang.Class getCallerClass(); - } - --keep class java.io.UnixFileSystem { - public UnixFileSystem(); - } - --keep class java.io.WinNTFileSystem { - public WinNTFileSystem(); - } - --keep class java.io.File { - private java.lang.String path; - } - --keepclassmembers class java.lang.ClassLoader$NativeLibrary { - long handle; - private int jniVersion; - } - --keep class java.nio.charset.Charset { - # called from jni_util.c: - boolean isSupported(java.lang.String); - } - -# Charsets are loaded via reflection. If you need others besides -# UTF-8, you'll need to add them (e.g. sun.nio.cs.ISO_8859_1). --keep class sun.nio.cs.UTF_8 - -# loaded reflectively to handle embedded resources: --keep class avian.avianvmresource.Handler - -# loaded reflectively by sun.misc.Launcher: --keep class avian.file.Handler - -# refered to symbolically in MethodAccessorGenerator: --keep class sun.reflect.MethodAccessorImpl { - ; - } --keep class sun.reflect.ConstructorAccessorImpl { - ; - } --keep class sun.reflect.SerializationConstructorAccessorImpl { - ; - } - -# referred to by name in LocaleData to load resources: --keep class sun.util.resources.CalendarData --keep class sun.util.resources.TimeZoneNames --keep class sun.text.resources.FormatData - -# loaded via reflection from DefaultFileSystemProvider: --keep class sun.nio.fs.LinuxFileSystemProvider --keep class sun.nio.fs.BsdFileSystemProvider - -# loaded via JNI in UnixNativeDispatcher.c: --keep class sun.nio.fs.UnixFileAttributes { - ; -} --keep class sun.nio.fs.UnixFileStoreAttributes { - ; -} --keep class sun.nio.fs.UnixMountEntry { - ; -} - --keep class sun.nio.fs.UnixException { - UnixException(int); - } - --keep class sun.net.www.protocol.jar.Handler - -# These concurrent classes refer to certain members reflectively in their static initializers --keepclassmembers class java.util.concurrent.ConcurrentHashMap$HashEntry { - *** next; -} - --keepclassmembers class java.util.concurrent.CopyOnWriteArrayList { - *** lock; -} - --keepclassmembers class java.util.concurrent.CountDownLatch { - *** allocationSpinLock; -} - --keepclassmembers class java.util.concurrent.PriorityBlockingQueue { - *** allocationSpinLock; -} - --keepclassmembers class java.util.concurrent.SynchronousQueue$TransferStack { - *** head; -} - --keepclassmembers class java.util.concurrent.ConcurrentLinkedQueue { - *** head; - *** tail; -} - --keepclassmembers class java.util.concurrent.ConcurrentLinkedQueue$Node { - *** item; - *** next; -} - --keepclassmembers class java.util.concurrent.SynchronousQueue$TransferStack$SNode { - *** match; - *** next; -} - -# These classes are accessed via bytecode generated on the fly. --keepclassmembers class java.lang.reflect.Proxy { - ; -} - --keepclassmembers class java.lang.reflect.InvocationHandler { - ; -} - -# Don't strip special enum members. --keepclassmembers,allowoptimization enum * { - public static **[] values(); - public static ** valueOf(java.lang.String); -} - --keepclassmembers class java.lang.reflect.Executable { - ; -} - -# Needed to create temporary file paths, amongst other things. --keep class sun.security.provider.NativePRNG --keep class sun.security.provider.SHA - -# Character set codecs --keep class sun.nio.cs.ISO_8859_1 --keep class sun.nio.cs.UTF_8 --keep class sun.nio.cs.UTF_16 --keep class sun.nio.cs.UTF_16BE --keep class sun.nio.cs.UTF_16LE --keep class sun.nio.cs.US_ASCII - -# Accessed from native code --keep class java.util.zip.Deflater { - ; -} \ No newline at end of file diff --git a/sgx-jvm/avian/settings.gradle b/sgx-jvm/avian/settings.gradle deleted file mode 100644 index 1d99d5dcf6..0000000000 --- a/sgx-jvm/avian/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name="avian" \ No newline at end of file diff --git a/sgx-jvm/avian/src/CMakeLists.txt b/sgx-jvm/avian/src/CMakeLists.txt deleted file mode 100644 index c949643c0a..0000000000 --- a/sgx-jvm/avian/src/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -add_subdirectory(codegen) -add_subdirectory(system) -add_subdirectory(heap) -add_subdirectory(util) -add_subdirectory(tools) - -add_library(avian_jvm_finder finder.cpp) \ No newline at end of file diff --git a/sgx-jvm/avian/src/android/stubs.cpp b/sgx-jvm/avian/src/android/stubs.cpp deleted file mode 100644 index 0c1295d464..0000000000 --- a/sgx-jvm/avian/src/android/stubs.cpp +++ /dev/null @@ -1,24 +0,0 @@ -struct JavaVM; - -extern "C" int JNI_OnLoad(JavaVM*, void*) -{ - return 0; -} - -struct _JNIEnv; - -struct JniConstants { - static void init(_JNIEnv* env); -}; - -void JniConstants::init(_JNIEnv*) -{ - // ignore -} - -struct _JavaVM; - -int libconscrypt_JNI_OnLoad(_JavaVM*, void*) -{ - return 0; -} diff --git a/sgx-jvm/avian/src/arm.S b/sgx-jvm/avian/src/arm.S deleted file mode 100644 index 941097d4e8..0000000000 --- a/sgx-jvm/avian/src/arm.S +++ /dev/null @@ -1,132 +0,0 @@ -/* arm.S: JNI gluecode for ARM - Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/types.h" - -.text - -#define LOCAL(x) .L##x - -#ifdef __APPLE__ -# define GLOBAL(x) _##x -#else -# define GLOBAL(x) x -#endif - -.globl GLOBAL(vmNativeCall) -.align 2 -GLOBAL(vmNativeCall): - /* - arguments: - r0 -> r4 : function - r1 -> r5 : stackTotal - r2 : memoryTable - r3 : memoryCount - [sp, #0] -> r6 : gprTable - [sp, #4] -> r7 : vfpTable - [sp, #8] -> r8 : returnType - */ - mov ip, sp // save stack frame - stmfd sp!, {r4-r8, lr} // save clobbered non-volatile regs - - // mv args into non-volatile regs - mov r4, r0 - mov r5, r1 - ldr r6, [ip] - ldr r7, [ip, #4] - ldr r8, [ip, #8] - - // setup stack arguments if necessary - sub sp, sp, r5 // allocate stack - mov ip, sp -LOCAL(loop): - tst r3, r3 - ldrne r0, [r2], #4 - strne r0, [ip], #4 - subne r3, r3, #4 - bne LOCAL(loop) - - // setup argument registers if necessary - tst r6, r6 -#if (defined __APPLE__) && (defined __clang_major__) && (__clang_major__ >= 4) - ldmiane r6, {r0-r3} -#else - ldmneia r6, {r0-r3} -#endif -#if defined(__ARM_PCS_VFP) - // and VFP registers - vldmia r7, {d0-d7} -#endif - -#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) - mov lr, pc - bx r4 -#else - blx r4 // call function -#endif - add sp, sp, r5 // deallocate stack - -#if defined(__ARM_PCS_VFP) - cmp r8,#FLOAT_TYPE - bne LOCAL(double) - fmrs r0,s0 - b LOCAL(exit) - -LOCAL(double): - cmp r8,#DOUBLE_TYPE - bne LOCAL(exit) - fmrrd r0,r1,d0 -#endif - -LOCAL(exit): - ldmfd sp!, {r4-r8, pc} // restore non-volatile regs and return - -.globl GLOBAL(vmJump) -.align 2 -GLOBAL(vmJump): - mov lr, r0 - ldr r0, [sp] - ldr r1, [sp, #4] - mov sp, r2 - mov r8, r3 - bx lr - -#define CHECKPOINT_THREAD 4 -#define CHECKPOINT_STACK 24 - -.globl GLOBAL(vmRun) -.align 2 -GLOBAL(vmRun): - // r0: function - // r1: arguments - // r2: checkpoint - stmfd sp!, {r4-r11, lr} - // align stack - sub sp, sp, #12 - - str sp, [r2, #CHECKPOINT_STACK] - - mov r12, r0 - ldr r0, [r2, #CHECKPOINT_THREAD] - -#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) - mov lr, pc - bx r12 -#else - blx r12 -#endif - -.globl GLOBAL(vmRun_returnAddress) -.align 2 -GLOBAL(vmRun_returnAddress): - add sp, sp, #12 - ldmfd sp!, {r4-r11, lr} - bx lr diff --git a/sgx-jvm/avian/src/arm.masm b/sgx-jvm/avian/src/arm.masm deleted file mode 100644 index ae036db58f..0000000000 --- a/sgx-jvm/avian/src/arm.masm +++ /dev/null @@ -1,89 +0,0 @@ -; Copyright (c) 2008-2015, Avian Contributors -; -; Permission to use, copy, modify, and/or distribute this software -; for any purpose with or without fee is hereby granted, provided -; that the above copyright notice and this permission notice appear -; in all copies. -; -; There is NO WARRANTY for this software. See license.txt for -; details. -; -; ORIGIN: https://github.com/gkvas/avian/tree/wince - - AREA text, CODE, ARM - - EXPORT vmNativeCall -vmNativeCall - ; arguments: - ; r0 -> r4 : function - ; r1 -> r5 : stackTotal - ; r2 : memoryTable - ; r3 : memoryCount - ; [sp, #0] -> r6 : gprTable - - mov ip, sp ; save stack frame - stmfd sp!, {r4-r6, lr} ; save clobbered non-volatile regs - - ; mv args into non-volatile regs - mov r4, r0 - mov r5, r1 - ldr r6, [ip] - - ; setup stack arguments if necessary - sub sp, sp, r5 ; allocate stack - mov ip, sp -loop - tst r3, r3 - ldrne r0, [r2], #4 - strne r0, [ip], #4 - subne r3, r3, #4 - bne loop - - ; setup argument registers if necessary - tst r6, r6 - ldmneia r6, {r0-r3} - - blx r4 ; call function - add sp, sp, r5 ; deallocate stack - - ldmfd sp!, {r4-r6, pc} ; restore non-volatile regs and return - - EXPORT vmJump -vmJump - mov lr, r0 - ldr r0, [sp] - ldr r1, [sp, #4] - mov sp, r2 - mov r8, r3 - bx lr - -CHECKPOINT_THREAD EQU 4 -CHECKPOINT_STACK EQU 24 - - EXPORT vmRun -vmRun - ; r0: function - ; r1: arguments - ; r2: checkpoint - stmfd sp!, {r4-r11, lr} - ; align stack - sub sp, sp, #12 - - str sp, [r2, #CHECKPOINT_STACK] - - mov r12, r0 - ldr r0, [r2, #CHECKPOINT_THREAD] - - blx r12 - - EXPORT vmRun_returnAddress -vmRun_returnAddress - add sp, sp, #12 - ldmfd sp!, {r4-r11, lr} - bx lr - - EXPORT vmTrap -vmTrap - bkpt 3 - - END \ No newline at end of file diff --git a/sgx-jvm/avian/src/arm64.S b/sgx-jvm/avian/src/arm64.S deleted file mode 100644 index 1941be3ea6..0000000000 --- a/sgx-jvm/avian/src/arm64.S +++ /dev/null @@ -1,148 +0,0 @@ -/* arm.S: JNI gluecode for ARM - Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/types.h" - -.text - -#define LOCAL(x) .L##x - -#ifdef __APPLE__ -# define GLOBAL(x) _##x -#else -# define GLOBAL(x) x -#endif - -.globl GLOBAL(vmNativeCall) -.align 2 -GLOBAL(vmNativeCall): - // arguments: - // x0 -> x19 : function - // w1 -> w20 : stackTotal - // x2 : memoryTable - // w3 : memoryCount - // x4 -> x21 : gprTable - // x5 -> x22 : vfpTable - // w6 -> w23 : returnType - - // allocate frame - stp x29, x30, [sp,#-64]! - mov x29, sp - - // save callee-saved register values so we can clobber them - stp x19, x20, [sp,#16] - stp x21, x22, [sp,#32] - str x23, [sp,#48] - - // move arguments into callee-saved registers - mov x19, x0 - mov w20, w1 - mov x21, x4 - mov x22, x5 - mov w23, w6 - - // setup stack arguments if necessary - sub sp, sp, w20, uxtw // allocate stack - mov x9, sp -LOCAL(loop): - cmp w3, wzr - b.eq LOCAL(populateGPRs) - ldr x0, [x2], #8 - str x0, [x9], #8 - sub w3, w3, #8 - b LOCAL(loop) - -LOCAL(populateGPRs): - cmp x21, xzr - b.eq LOCAL(populateVFPs) - ldp x0, x1, [x21] - ldp x2, x3, [x21,#16] - ldp x4, x5, [x21,#32] - ldp x6, x7, [x21,#48] - -LOCAL(populateVFPs): - cmp x22, xzr - b.eq LOCAL(doCall) - ldp d0, d1, [x22] - ldp d2, d3, [x22,#16] - ldp d4, d5, [x22,#32] - ldp d6, d7, [x22,#48] - -LOCAL(doCall): - blr x19 // call function - add sp, sp, w20, uxtw // deallocate stack - - cmp w23,#FLOAT_TYPE - b.ne LOCAL(double) - fmov w0,s0 - b LOCAL(exit) - -LOCAL(double): - cmp w23,#DOUBLE_TYPE - b.ne LOCAL(exit) - fmov x0,d0 - -LOCAL(exit): - ldp x19, x20, [sp,#16] - ldp x21, x22, [sp,#32] - ldr x23, [sp,#48] - ldp x29, x30, [sp],#64 - ret - -.globl GLOBAL(vmJump) -.align 2 -GLOBAL(vmJump): - mov x30, x0 - mov x0, x4 - mov x1, x5 - mov sp, x2 - mov x19, x3 - br x30 - -#define CHECKPOINT_THREAD 8 -#define CHECKPOINT_STACK 48 - -.globl GLOBAL(vmRun) -.align 2 -GLOBAL(vmRun): - // x0: function - // x1: arguments - // x2: checkpoint - - // allocate frame - stp x29, x30, [sp,#-96]! - mov x29, sp - - // save callee-saved register values - 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] - - mov x19, sp - str x19, [x2, #CHECKPOINT_STACK] - - mov x19, x0 - ldr x0, [x2, #CHECKPOINT_THREAD] - - blr x19 - -.globl GLOBAL(vmRun_returnAddress) -.align 2 -GLOBAL(vmRun_returnAddress): - ldp x19, x20, [sp,#16] - ldp x21, x22, [sp,#32] - ldp x23, x24, [sp,#48] - ldp x25, x26, [sp,#64] - ldp x27, x28, [sp,#80] - ldp x29, x30, [sp],#96 - br x30 diff --git a/sgx-jvm/avian/src/avian/alloc-vector.h b/sgx-jvm/avian/src/avian/alloc-vector.h deleted file mode 100644 index b1df61e31c..0000000000 --- a/sgx-jvm/avian/src/avian/alloc-vector.h +++ /dev/null @@ -1,186 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef VECTOR_H -#define VECTOR_H - -#include - -#include -#include -#include -#include - -#undef max -#undef min - -namespace vm { - -class Vector { - public: - Vector(avian::util::Aborter* a, - avian::util::Alloc* allocator, - size_t minimumCapacity) - : a(a), - allocator(allocator), - data(0, 0), - position(0), - minimumCapacity(minimumCapacity) - { - } - - ~Vector() - { - dispose(); - } - - void dispose() - { - if (data.items and minimumCapacity > 0) { - allocator->free(data.items, data.count); - data.items = 0; - data.count = 0; - } - } - - void ensure(size_t space) - { - if (position + space > data.count) { - assertT(a, minimumCapacity > 0); - - size_t newCapacity = avian::util::max( - position + space, avian::util::max(minimumCapacity, data.count * 2)); - if (data.begin()) { - data.resize(allocator, newCapacity); - } else { - data = avian::util::Slice::alloc(allocator, newCapacity); - } - } - } - - void get(size_t offset, void* dst, size_t size) - { - assertT(a, offset + size <= position); - memcpy(dst, data.begin() + offset, size); - } - - void set(size_t offset, const void* src, size_t size) - { - assertT(a, offset + size <= position); - memcpy(data.begin() + offset, src, size); - } - - void pop(void* dst, size_t size) - { - get(position - size, dst, size); - position -= size; - } - - void* allocate(size_t size) - { - ensure(size); - void* r = data.begin() + position; - position += size; - return r; - } - - void* append(const void* p, size_t size) - { - void* r = allocate(size); - memcpy(r, p, size); - return r; - } - - void append(uint8_t v) - { - append(&v, 1); - } - - void append2(uint16_t v) - { - append(&v, 2); - } - - void append4(uint32_t v) - { - append(&v, 4); - } - - void appendTargetAddress(target_uintptr_t v) - { - append(&v, TargetBytesPerWord); - } - - void appendAddress(uintptr_t v) - { - append(&v, BytesPerWord); - } - - void appendAddress(void* v) - { - append(&v, BytesPerWord); - } - - void set2(size_t offset, uint16_t v) - { - assertT(a, offset <= position - 2); - memcpy(data.begin() + offset, &v, 2); - } - - size_t get(size_t offset) - { - uint8_t v; - get(offset, &v, 1); - return v; - } - - size_t get2(size_t offset) - { - uint16_t v; - get(offset, &v, 2); - return v; - } - - size_t get4(size_t offset) - { - uint32_t v; - get(offset, &v, 4); - return v; - } - - uintptr_t getAddress(size_t offset) - { - uintptr_t v; - get(offset, &v, BytesPerWord); - return v; - } - - size_t length() - { - return position; - } - - template - T* peek(size_t offset) - { - assertT(a, offset + sizeof(T) <= position); - return reinterpret_cast(data.begin() + offset); - } - - avian::util::Aborter* a; - avian::util::Alloc* allocator; - avian::util::Slice data; - size_t position; - size_t minimumCapacity; -}; - -} // namespace vm - -#endif // VECTOR_H diff --git a/sgx-jvm/avian/src/avian/append.h b/sgx-jvm/avian/src/avian/append.h deleted file mode 100644 index 5ea19bbfeb..0000000000 --- a/sgx-jvm/avian/src/avian/append.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef APPEND_H -#define APPEND_H - -#include -#include - -namespace vm { - -inline const char* append(avian::util::AllocOnly* allocator, - const char* a, - const char* b, - const char* c) -{ - unsigned al = strlen(a); - unsigned bl = strlen(b); - unsigned cl = strlen(c); - char* p = static_cast(allocator->allocate((al + bl + cl) + 1)); - memcpy(p, a, al); - memcpy(p + al, b, bl); - memcpy(p + al + bl, c, cl + 1); - return p; -} - -inline const char* append(avian::util::AllocOnly* allocator, - const char* a, - const char* b) -{ - unsigned al = strlen(a); - unsigned bl = strlen(b); - char* p = static_cast(allocator->allocate((al + bl) + 1)); - memcpy(p, a, al); - memcpy(p + al, b, bl + 1); - return p; -} - -inline const char* copy(avian::util::AllocOnly* allocator, const char* a) -{ - unsigned al = strlen(a); - char* p = static_cast(allocator->allocate(al + 1)); - memcpy(p, a, al + 1); - return p; -} - -} // namespace vm - -#endif // APPEND_H diff --git a/sgx-jvm/avian/src/avian/arch.h b/sgx-jvm/avian/src/avian/arch.h deleted file mode 100644 index 0328d4124f..0000000000 --- a/sgx-jvm/avian/src/avian/arch.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef ARCH_H -#define ARCH_H - -#ifdef _MSC_VER -#include "windows.h" -#pragma push_macro("assert") -#include "intrin.h" -#pragma pop_macro("assert") -#undef interface -#endif - -#include "avian/common.h" - -extern "C" void NO_RETURN vmJump(void* address, - void* frame, - void* stack, - void* thread, - uintptr_t returnLow, - uintptr_t returnHigh); - -namespace vm { - -inline void compileTimeMemoryBarrier() -{ -#ifdef _MSC_VER - _ReadWriteBarrier(); -#else - __asm__ __volatile__("" : : : "memory"); -#endif -} - -} // namespace vm - -#if (defined ARCH_x86_32) || (defined ARCH_x86_64) -#include "x86.h" -#elif (defined ARCH_arm) || (defined ARCH_arm64) -#include "arm.h" -#else -#error unsupported architecture -#endif - -#endif // ARCH_H diff --git a/sgx-jvm/avian/src/avian/arm.h b/sgx-jvm/avian/src/avian/arm.h deleted file mode 100644 index 4a0797207b..0000000000 --- a/sgx-jvm/avian/src/avian/arm.h +++ /dev/null @@ -1,403 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef ARM_H -#define ARM_H - -#include "avian/types.h" -#include "avian/common.h" -#include - -#ifdef __APPLE__ -#include "libkern/OSAtomic.h" -#include "libkern/OSCacheControl.h" -#include "mach/mach_types.h" -#include "mach/thread_act.h" -#include "mach/thread_status.h" - -#define THREAD_STATE ARM_THREAD_STATE -#define THREAD_STATE_TYPE arm_thread_state_t -#define THREAD_STATE_COUNT ARM_THREAD_STATE_COUNT - -#if __DARWIN_UNIX03 && defined(_STRUCT_ARM_EXCEPTION_STATE) -#define FIELD(x) __##x -#else -#define FIELD(x) x -#endif - -#define THREAD_STATE_IP(state) ((state).FIELD(pc)) -#define THREAD_STATE_STACK(state) ((state).FIELD(sp)) -#if (defined __APPLE__) && (defined ARCH_arm64) -#define THREAD_STATE_THREAD(state) ((state).FIELD(x[19])) -#else -#define THREAD_STATE_THREAD(state) ((state).FIELD(r[8])) -#endif -#define THREAD_STATE_LINK(state) ((state).FIELD(lr)) - -#define IP_REGISTER(context) THREAD_STATE_IP(context->uc_mcontext->FIELD(ss)) -#define STACK_REGISTER(context) \ - THREAD_STATE_STACK(context->uc_mcontext->FIELD(ss)) -#define THREAD_REGISTER(context) \ - THREAD_STATE_THREAD(context->uc_mcontext->FIELD(ss)) -#define LINK_REGISTER(context) \ - THREAD_STATE_LINK(context->uc_mcontext->FIELD(ss)) -#elif(defined __QNX__) -#include "arm/smpxchg.h" -#include "sys/mman.h" - -#define IP_REGISTER(context) (context->uc_mcontext.cpu.gpr[ARM_REG_PC]) -#define STACK_REGISTER(context) (context->uc_mcontext.cpu.gpr[ARM_REG_SP]) -#define THREAD_REGISTER(context) (context->uc_mcontext.cpu.gpr[ARM_REG_IP]) -#define LINK_REGISTER(context) (context->uc_mcontext.cpu.gpr[ARM_REG_LR]) -#else -#ifdef ARCH_arm -#define IP_REGISTER(context) (context->uc_mcontext.arm_pc) -#define STACK_REGISTER(context) (context->uc_mcontext.arm_sp) -#define THREAD_REGISTER(context) (context->uc_mcontext.arm_ip) -#define LINK_REGISTER(context) (context->uc_mcontext.arm_lr) -#else -#define IP_REGISTER(context) (context->uc_mcontext.pc) -#define STACK_REGISTER(context) (context->uc_mcontext.sp) -#define THREAD_REGISTER(context) (context->uc_mcontext.regs[19]) -#define LINK_REGISTER(context) (context->uc_mcontext.regs[30]) -#endif -#endif - -#define VA_LIST(x) (&(x)) - -extern "C" uint64_t vmNativeCall(void* function, - unsigned stackTotal, - void* memoryTable, - unsigned memoryCount, - void* gprTable, - void* vfpTable, - unsigned returnType); - -namespace vm { - -inline void trap() -{ -#ifdef _MSC_VER - __debugbreak(); -#else - asm("brk 0"); -#endif -} - -// todo: determine the minimal operation types and domains needed to -// implement the following barriers (see -// http://community.arm.com/groups/processors/blog/2011/10/19/memory-access-ordering-part-3--memory-access-ordering-in-the-arm-architecture). -// For now, we just use DMB SY as a conservative but not necessarily -// performant choice. - -#ifndef _MSC_VER -inline void memoryBarrier() -{ -#ifdef __APPLE__ - OSMemoryBarrier(); -#elif(__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1) - return __sync_synchronize(); -#elif(!defined AVIAN_ASSUME_ARMV6) - __asm__ __volatile__("dmb" : : : "memory"); -#else - __asm__ __volatile__("" : : : "memory"); -#endif -} -#endif - -inline void storeStoreMemoryBarrier() -{ -#ifdef _MSC_VER - _ReadWriteBarrier(); -#else - memoryBarrier(); -#endif -} - -inline void storeLoadMemoryBarrier() -{ -#ifdef _MSC_VER - MemoryBarrier(); -#else - memoryBarrier(); -#endif -} - -inline void loadMemoryBarrier() -{ -#ifdef _MSC_VER - _ReadWriteBarrier(); -#else - memoryBarrier(); -#endif -} - -#if !defined(AVIAN_AOT_ONLY) - -#if defined(__ANDROID__) || defined(__linux__) -// http://code.google.com/p/android/issues/detail?id=1803 -extern "C" void __clear_cache(void* beg __attribute__((__unused__)), - void* end __attribute__((__unused__))); -#endif -inline void syncInstructionCache(const void* start, unsigned size) -{ -#ifdef __APPLE__ - sys_icache_invalidate(const_cast(start), size); -#elif(defined __QNX__) - msync(const_cast(start), size, MS_INVALIDATE_ICACHE); -#else - __clear_cache( - const_cast(start), - const_cast(static_cast(start) + size)); -#endif -} - -#endif // AVIAN_AOT_ONLY - -#ifndef __APPLE__ -typedef int(__kernel_cmpxchg_t)(int oldval, int newval, int* ptr); -#define __kernel_cmpxchg (*(__kernel_cmpxchg_t*)0xffff0fc0) -#endif - -inline bool atomicCompareAndSwap32(uint32_t* p, uint32_t old, uint32_t new_) -{ -#ifdef __APPLE__ - return OSAtomicCompareAndSwap32Barrier( - old, new_, reinterpret_cast(p)); -#elif(defined __QNX__) - return old == _smp_cmpxchg(p, old, new_); -#elif (defined ARCH_arm64) - return __sync_bool_compare_and_swap(p, old, new_); -#else - int r = __kernel_cmpxchg( - static_cast(old), static_cast(new_), reinterpret_cast(p)); - return (!r ? true : false); -#endif -} - -#ifdef ARCH_arm64 -inline bool atomicCompareAndSwap64(uint64_t* p, uint64_t old, uint64_t new_) -{ - return __sync_bool_compare_and_swap(p, old, new_); -} - -inline bool atomicCompareAndSwap(uintptr_t* p, uintptr_t old, uintptr_t new_) -{ - return atomicCompareAndSwap64(reinterpret_cast(p), old, new_); -} -#else -inline bool atomicCompareAndSwap(uintptr_t* p, uintptr_t old, uintptr_t new_) -{ - return atomicCompareAndSwap32(reinterpret_cast(p), old, new_); -} -#endif - -#if (defined __APPLE__) && (defined ARCH_arm64) -const bool AppleARM64 = true; -#else -const bool AppleARM64 = false; -#endif - -inline void advance(unsigned* stackIndex, - unsigned* stackSubIndex, - unsigned newStackSubIndex) -{ - if (AppleARM64) { - if (newStackSubIndex == BytesPerWord) { - *stackSubIndex = 0; - ++(*stackIndex); - } else { - *stackSubIndex = newStackSubIndex; - } - } -} - -inline void push(uint8_t type, - uintptr_t* stack, - unsigned* stackIndex, - unsigned* stackSubIndex, - uintptr_t argument) -{ - if (AppleARM64) { - // See - // https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html - // for how Apple diverges from the generic ARM64 ABI on iOS. - // Specifically, arguments passed on the stack are aligned to - // their natural alignment rather than 8. - switch (type) { - case INT8_TYPE: - reinterpret_cast(stack + *stackIndex)[*stackSubIndex] = argument; - advance(stackIndex, stackSubIndex, *stackSubIndex + 1); - break; - - case INT16_TYPE: - advance(stackIndex, stackSubIndex, pad(*stackSubIndex, 2)); - reinterpret_cast(stack + *stackIndex)[*stackSubIndex / 2] - = argument; - advance(stackIndex, stackSubIndex, *stackSubIndex + 2); - break; - - case INT32_TYPE: - case FLOAT_TYPE: - advance(stackIndex, stackSubIndex, pad(*stackSubIndex, 4)); - reinterpret_cast(stack + *stackIndex)[*stackSubIndex / 4] - = argument; - advance(stackIndex, stackSubIndex, *stackSubIndex + 4); - break; - - case POINTER_TYPE: - advance(stackIndex, stackSubIndex, pad(*stackSubIndex)); - stack[(*stackIndex)++] = argument; - break; - - default: - abort(); - } - } else { - stack[(*stackIndex)++] = argument; - } -} - -inline uint64_t dynamicCall(void* function, - uintptr_t* arguments, - uint8_t* argumentTypes, - unsigned argumentCount, - unsigned argumentsSize UNUSED, - unsigned returnType) -{ -#if (defined __APPLE__) || (defined ARCH_arm64) - const unsigned Alignment = 1; -#else - const unsigned Alignment = 2; -#endif - - const unsigned GprCount = BytesPerWord; - uintptr_t gprTable[GprCount]; - unsigned gprIndex = 0; - - const unsigned VfpCount = BytesPerWord == 8 ? 8 : 16; - uintptr_t vfpTable[VfpCount]; - unsigned vfpIndex = 0; - unsigned vfpBackfillIndex UNUSED = 0; - - RUNTIME_ARRAY(uintptr_t, - stack, - (argumentCount * 8) - / BytesPerWord); // is > argumentSize to account for padding - unsigned stackIndex = 0; - unsigned stackSubIndex = 0; - - unsigned ai = 0; - for (unsigned ati = 0; ati < argumentCount; ++ati) { - switch (argumentTypes[ati]) { - case DOUBLE_TYPE: -#if (defined __ARM_PCS_VFP) || (defined ARCH_arm64) - { - if (vfpIndex + Alignment <= VfpCount) { - if (vfpIndex % Alignment) { - vfpBackfillIndex = vfpIndex; - ++vfpIndex; - } - - memcpy(vfpTable + vfpIndex, arguments + ai, 8); - vfpIndex += 8 / BytesPerWord; - } else { - advance(&stackIndex, &stackSubIndex, pad(stackSubIndex)); - vfpIndex = VfpCount; - if (stackIndex % Alignment) { - ++stackIndex; - } - - memcpy(RUNTIME_ARRAY_BODY(stack) + stackIndex, arguments + ai, 8); - stackIndex += 8 / BytesPerWord; - } - ai += 8 / BytesPerWord; - } break; - - case FLOAT_TYPE: - if (vfpBackfillIndex) { - vfpTable[vfpBackfillIndex] = arguments[ai]; - vfpBackfillIndex = 0; - } else if (vfpIndex < VfpCount) { - vfpTable[vfpIndex++] = arguments[ai]; - } else { - push(argumentTypes[ati], - RUNTIME_ARRAY_BODY(stack), - &stackIndex, - &stackSubIndex, - arguments[ai]); - } - ++ai; - break; -#endif - case INT64_TYPE: { - if (gprIndex + Alignment <= GprCount) { // pass argument in register(s) - if (Alignment == 1 and BytesPerWord < 8 - and gprIndex + Alignment == GprCount) { - gprTable[gprIndex++] = arguments[ai]; - RUNTIME_ARRAY_BODY(stack)[stackIndex++] = arguments[ai + 1]; - } else { - if (gprIndex % Alignment) { - ++gprIndex; - } - - memcpy(gprTable + gprIndex, arguments + ai, 8); - gprIndex += 8 / BytesPerWord; - } - } else { // pass argument on stack - advance(&stackIndex, &stackSubIndex, pad(stackSubIndex)); - gprIndex = GprCount; - if (stackIndex % Alignment) { - ++stackIndex; - } - - memcpy(RUNTIME_ARRAY_BODY(stack) + stackIndex, arguments + ai, 8); - stackIndex += 8 / BytesPerWord; - } - ai += 8 / BytesPerWord; - } break; - - default: { - if (gprIndex < GprCount) { - gprTable[gprIndex++] = arguments[ai]; - } else { - push(argumentTypes[ati], - RUNTIME_ARRAY_BODY(stack), - &stackIndex, - &stackSubIndex, - arguments[ai]); - } - ++ai; - } break; - } - } - - if (gprIndex < GprCount) { // pad since assembly loads all GPRs - memset(gprTable + gprIndex, 0, (GprCount - gprIndex) * 4); - gprIndex = GprCount; - } - if (vfpIndex < VfpCount) { - memset(vfpTable + vfpIndex, 0, (VfpCount - vfpIndex) * 4); - vfpIndex = VfpCount; - } - - unsigned stackSize = pad(stackIndex * BytesPerWord + stackSubIndex, 16); - return vmNativeCall(function, - stackSize, - RUNTIME_ARRAY_BODY(stack), - pad(stackIndex * BytesPerWord + stackSubIndex, BytesPerWord), - (gprIndex ? gprTable : 0), - (vfpIndex ? vfpTable : 0), - returnType); -} - -} // namespace vm - -#endif // ARM_H diff --git a/sgx-jvm/avian/src/avian/bootimage.h b/sgx-jvm/avian/src/avian/bootimage.h deleted file mode 100644 index d14755f8b3..0000000000 --- a/sgx-jvm/avian/src/avian/bootimage.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef BOOTIMAGE_H -#define BOOTIMAGE_H - -#include "avian/common.h" -#include "java-common.h" -#include "avian/target.h" -#include "avian/machine.h" - -#include - -namespace vm { - -class BootImage { - public: - class Thunk { - public: - Thunk() : start(0), frameSavedOffset(0), length(0) - { - } - - Thunk(uint32_t start, uint32_t frameSavedOffset, uint32_t length) - : start(start), frameSavedOffset(frameSavedOffset), length(length) - { - } - - uint32_t start; - uint32_t frameSavedOffset; - uint32_t length; - } PACKED; - - class ThunkCollection { - public: -#define THUNK_FIELD(name) Thunk name; -#include "bootimage-fields.cpp" -#undef THUNK_FIELD - } PACKED; - - static const uint32_t Magic = 0x22377322; - -#define FIELD(name) uint32_t name; -#include "bootimage-fields.cpp" -#undef FIELD - - ThunkCollection thunks; -} PACKED; - -class GcField; -class GcClass; - -class OffsetResolver { - public: - virtual unsigned fieldOffset(Thread*, GcField*) = 0; - - virtual void addClass(Thread*, GcClass*, const uint8_t*, size_t) = 0; -}; - -#define NAME(x) Target##x -#define LABEL(x) target_##x -#include "bootimage-template.cpp" -#undef LABEL -#undef NAME - -#define NAME(x) x -#define LABEL(x) x -#include "bootimage-template.cpp" -#undef LABEL -#undef NAME - -} // namespace vm - -#endif // BOOTIMAGE_H diff --git a/sgx-jvm/avian/src/avian/classpath-common.h b/sgx-jvm/avian/src/avian/classpath-common.h deleted file mode 100644 index 85815cbb76..0000000000 --- a/sgx-jvm/avian/src/avian/classpath-common.h +++ /dev/null @@ -1,864 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef CLASSPATH_COMMON_H -#define CLASSPATH_COMMON_H - -#include -#include -#include - -using namespace avian::util; - -namespace vm { - -object getTrace(Thread* t, unsigned skipCount) -{ - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t, int skipCount) : t(t), trace(0), skipCount(skipCount) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - if (skipCount == 0) { - GcMethod* method = walker->method(); - if (isAssignableFrom(t, type(t, GcThrowable::Type), method->class_()) - and vm::strcmp(reinterpret_cast(""), - method->name()->body().begin()) == 0) { - return true; - } else { - trace = makeTrace(t, walker); - return false; - } - } else { - --skipCount; - return true; - } - } - - Thread* t; - object trace; - unsigned skipCount; - } v(t, skipCount); - - t->m->processor->walkStack(t, &v); - - if (v.trace == 0) - v.trace = makeObjectArray(t, 0); - - return v.trace; -} - -bool compatibleArrayTypes(Thread* t UNUSED, GcClass* a, GcClass* b) -{ - return a->arrayElementSize() and b->arrayElementSize() - and (a == b or (not((a->vmFlags() & PrimitiveFlag) - or (b->vmFlags() & PrimitiveFlag)))); -} - -void arrayCopy(Thread* t, - object src, - int32_t srcOffset, - object dst, - int32_t dstOffset, - int32_t length) -{ - if (LIKELY(src and dst)) { - if (LIKELY(compatibleArrayTypes( - t, objectClass(t, src), objectClass(t, dst)))) { - unsigned elementSize = objectClass(t, src)->arrayElementSize(); - - if (LIKELY(elementSize)) { - intptr_t sl = fieldAtOffset(src, BytesPerWord); - intptr_t dl = fieldAtOffset(dst, BytesPerWord); - if (LIKELY(length > 0)) { - if (LIKELY(srcOffset >= 0 and srcOffset + length <= sl - and dstOffset >= 0 and dstOffset + length <= dl)) { - uint8_t* sbody = &fieldAtOffset(src, ArrayBody); - uint8_t* dbody = &fieldAtOffset(dst, ArrayBody); - if (src == dst) { - memmove(dbody + (dstOffset * elementSize), - sbody + (srcOffset * elementSize), - length * elementSize); - } else { - memcpy(dbody + (dstOffset * elementSize), - sbody + (srcOffset * elementSize), - length * elementSize); - } - - if (objectClass(t, dst)->objectMask()) { - mark(t, dst, ArrayBody + (dstOffset * BytesPerWord), length); - } - - return; - } else { - throwNew(t, GcIndexOutOfBoundsException::Type); - } - } else { - return; - } - } - } - } else { - throwNew(t, GcNullPointerException::Type); - return; - } - - throwNew(t, GcArrayStoreException::Type); -} - -void runOnLoadIfFound(Thread* t, System::Library* library) -{ - void* p = library->resolve("JNI_OnLoad"); - -#ifdef PLATFORM_WINDOWS - if (p == 0) { - p = library->resolve("_JNI_OnLoad@8"); - if (p == 0) { - p = library->resolve("JNI_OnLoad@8"); - } - } -#endif - - if (p) { - jint(JNICALL * JNI_OnLoad)(Machine*, void*); - memcpy(&JNI_OnLoad, &p, sizeof(void*)); - JNI_OnLoad(t->m, 0); - } -} - -System::Library* loadLibrary(Thread* t, const char* name) -{ - ACQUIRE(t, t->m->classLock); - - System::Library* last = t->m->libraries; - for (System::Library* lib = t->m->libraries; lib; lib = lib->next()) { - if (lib->name() and ::strcmp(lib->name(), name) == 0) { - // already loaded - return lib; - } - last = lib; - } - - System::Library* lib; - if (t->m->system->success(t->m->system->load(&lib, name))) { - last->setNext(lib); - return lib; - } else { - return 0; - } -} - -System::Library* loadLibrary(Thread* t, - const char* path, - const char* name, - bool mapName, - bool runOnLoad, - bool throw_ = true) -{ - ACQUIRE(t, t->m->classLock); - - char* mappedName; - unsigned nameLength = strlen(name); - if (mapName) { - const char* builtins = findProperty(t, "avian.builtins"); - if (builtins) { - const char* s = builtins; - while (*s) { - if (::strncmp(s, name, nameLength) == 0 - and (s[nameLength] == ',' or s[nameLength] == 0)) { - // library is built in to this executable - if (runOnLoad and not t->m->triedBuiltinOnLoad) { - t->m->triedBuiltinOnLoad = true; - // todo: release the classLock before calling this to - // avoid the possibility of deadlock: - runOnLoadIfFound(t, t->m->libraries); - } - return t->m->libraries; - } else { - while (*s and *s != ',') - ++s; - if (*s) - ++s; - } - } - } - - const char* prefix = t->m->system->libraryPrefix(); - const char* suffix = t->m->system->librarySuffix(); - unsigned mappedNameLength = nameLength + strlen(prefix) + strlen(suffix); - - mappedName = static_cast(t->m->heap->allocate(mappedNameLength + 1)); - - snprintf(mappedName, mappedNameLength + 1, "%s%s%s", prefix, name, suffix); - - name = mappedName; - nameLength = mappedNameLength; - } else { - mappedName = 0; - } - - THREAD_RESOURCE2(t, char*, mappedName, unsigned, nameLength, if (mappedName) { - t->m->heap->free(mappedName, nameLength + 1); - }); - - System::Library* lib = 0; - for (Tokenizer tokenizer(path, t->m->system->pathSeparator()); - tokenizer.hasMore();) { - String token(tokenizer.next()); - - unsigned fullNameLength = token.length + 1 + nameLength; - THREAD_RUNTIME_ARRAY(t, char, fullName, fullNameLength + 1); - - snprintf(RUNTIME_ARRAY_BODY(fullName), - fullNameLength + 1, - "%.*s/%s", - token.length, - token.text, - name); - - lib = loadLibrary(t, RUNTIME_ARRAY_BODY(fullName)); - if (lib) - break; - } - - if (lib == 0) { - lib = loadLibrary(t, name); - } - - if (lib) { - if (runOnLoad) { - runOnLoadIfFound(t, lib); - } - } else if (throw_) { - throwNew(t, - GcUnsatisfiedLinkError::Type, - "library not found in %s: %s", - path, - name); - } - - return lib; -} - -GcStackTraceElement* makeStackTraceElement(Thread* t, GcTraceElement* e) -{ - PROTECT(t, e); - - GcMethod* method = cast(t, e->method()); - PROTECT(t, method); - - GcByteArray* class_name = method->class_()->name(); - PROTECT(t, class_name); - - THREAD_RUNTIME_ARRAY(t, char, s, class_name->length()); - replace('/', - '.', - RUNTIME_ARRAY_BODY(s), - reinterpret_cast(class_name->body().begin())); - GcString* class_name_string = makeString(t, "%s", RUNTIME_ARRAY_BODY(s)); - PROTECT(t, class_name_string); - - GcByteArray* method_name = method->name(); - PROTECT(t, method_name); - - GcString* method_name_string = t->m->classpath->makeString( - t, method_name, 0, method_name->length() - 1); - PROTECT(t, method_name_string); - - unsigned line = t->m->processor->lineNumber(t, method, e->ip()); - - GcByteArray* file = method->class_()->sourceFile(); - GcString* file_string - = file ? t->m->classpath->makeString(t, file, 0, file->length() - 1) : 0; - - return makeStackTraceElement( - t, class_name_string, method_name_string, file_string, line); -} - -GcObject* translateInvokeResult(Thread* t, unsigned returnCode, object o) -{ - switch (returnCode) { - case ByteField: - return makeByte(t, cast(t, o)->value()); - - case BooleanField: - return makeBoolean(t, cast(t, o)->value() != 0); - - case CharField: - return makeChar(t, cast(t, o)->value()); - - case ShortField: - return makeShort(t, cast(t, o)->value()); - - case FloatField: - return makeFloat(t, cast(t, o)->value()); - - case IntField: - case LongField: - case ObjectField: - case VoidField: - return reinterpret_cast(o); - - case DoubleField: - return makeDouble(t, cast(t, o)->value()); - - default: - abort(t); - } -} - -GcClass* resolveClassBySpec(Thread* t, - GcClassLoader* loader, - const char* spec, - unsigned specLength) -{ - switch (*spec) { - case 'L': { - THREAD_RUNTIME_ARRAY(t, char, s, specLength - 1); - memcpy(RUNTIME_ARRAY_BODY(s), spec + 1, specLength - 2); - RUNTIME_ARRAY_BODY(s)[specLength - 2] = 0; - return resolveClass(t, loader, RUNTIME_ARRAY_BODY(s)); - } - - case '[': { - THREAD_RUNTIME_ARRAY(t, char, s, specLength + 1); - memcpy(RUNTIME_ARRAY_BODY(s), spec, specLength); - RUNTIME_ARRAY_BODY(s)[specLength] = 0; - return resolveClass(t, loader, RUNTIME_ARRAY_BODY(s)); - } - - default: - return primitiveClass(t, *spec); - } -} - -GcJclass* resolveJType(Thread* t, - GcClassLoader* loader, - const char* spec, - unsigned specLength) -{ - return getJClass(t, resolveClassBySpec(t, loader, spec, specLength)); -} - -GcPair* resolveParameterTypes(Thread* t, - GcClassLoader* loader, - GcByteArray* spec, - unsigned* parameterCount, - unsigned* returnTypeSpec) -{ - PROTECT(t, loader); - PROTECT(t, spec); - - GcPair* list = 0; - PROTECT(t, list); - - unsigned offset = 1; - unsigned count = 0; - while (spec->body()[offset] != ')') { - switch (spec->body()[offset]) { - case 'L': { - unsigned start = offset; - ++offset; - while (spec->body()[offset] != ';') - ++offset; - ++offset; - - GcClass* type - = resolveClassBySpec(t, - loader, - reinterpret_cast(&spec->body()[start]), - offset - start); - - list = makePair(t, type, list); - - ++count; - } break; - - case '[': { - unsigned start = offset; - while (spec->body()[offset] == '[') - ++offset; - switch (spec->body()[offset]) { - case 'L': - ++offset; - while (spec->body()[offset] != ';') - ++offset; - ++offset; - break; - - default: - ++offset; - break; - } - - GcClass* type - = resolveClassBySpec(t, - loader, - reinterpret_cast(&spec->body()[start]), - offset - start); - - list = makePair(t, type, list); - ++count; - } break; - - default: - list = makePair(t, primitiveClass(t, spec->body()[offset]), list); - ++offset; - ++count; - break; - } - } - - *parameterCount = count; - *returnTypeSpec = offset + 1; - return list; -} - -object resolveParameterJTypes(Thread* t, - GcClassLoader* loader, - GcByteArray* spec, - unsigned* parameterCount, - unsigned* returnTypeSpec) -{ - GcPair* list - = resolveParameterTypes(t, loader, spec, parameterCount, returnTypeSpec); - - PROTECT(t, list); - - object array = makeObjectArray(t, type(t, GcJclass::Type), *parameterCount); - PROTECT(t, array); - - for (int i = *parameterCount - 1; i >= 0; --i) { - object c = getJClass(t, cast(t, list->first())); - reinterpret_cast(array)->setBodyElement(t, i, c); - list = cast(t, list->second()); - } - - return array; -} - -object resolveExceptionJTypes(Thread* t, - GcClassLoader* loader, - GcMethodAddendum* addendum) -{ - if (addendum == 0 or addendum->exceptionTable() == 0) { - return makeObjectArray(t, type(t, GcJclass::Type), 0); - } - - PROTECT(t, loader); - PROTECT(t, addendum); - - GcShortArray* exceptionTable - = cast(t, addendum->exceptionTable()); - PROTECT(t, exceptionTable); - - object array - = makeObjectArray(t, type(t, GcJclass::Type), exceptionTable->length()); - PROTECT(t, array); - - for (unsigned i = 0; i < exceptionTable->length(); ++i) { - uint16_t index = exceptionTable->body()[i] - 1; - - object o = singletonObject(t, addendum->pool()->as(t), index); - - if (objectClass(t, o) == type(t, GcReference::Type)) { - o = resolveClass(t, loader, cast(t, o)->name()); - - addendum->pool()->setBodyElement( - t, index, reinterpret_cast(o)); - } - - o = getJClass(t, cast(t, o)); - - reinterpret_cast(array)->setBodyElement(t, i, o); - } - - return array; -} - -object invoke(Thread* t, GcMethod* method, object instance, object args) -{ - PROTECT(t, method); - PROTECT(t, instance); - PROTECT(t, args); - - if (method->flags() & ACC_STATIC) { - instance = 0; - } - - if ((args == 0 ? 0 : objectArrayLength(t, args)) - != method->parameterCount()) { - throwNew(t, GcIllegalArgumentException::Type); - } - - if (method->parameterCount()) { - unsigned specLength = method->spec()->length(); - THREAD_RUNTIME_ARRAY(t, char, spec, specLength); - memcpy( - RUNTIME_ARRAY_BODY(spec), method->spec()->body().begin(), specLength); - unsigned i = 0; - for (MethodSpecIterator it(t, RUNTIME_ARRAY_BODY(spec)); it.hasNext();) { - GcClass* type; - bool objectType = false; - const char* p = it.next(); - switch (*p) { - case 'Z': - type = vm::type(t, GcBoolean::Type); - break; - case 'B': - type = vm::type(t, GcByte::Type); - break; - case 'S': - type = vm::type(t, GcShort::Type); - break; - case 'C': - type = vm::type(t, GcChar::Type); - break; - case 'I': - type = vm::type(t, GcInt::Type); - break; - case 'F': - type = vm::type(t, GcFloat::Type); - break; - case 'J': - type = vm::type(t, GcLong::Type); - break; - case 'D': - type = vm::type(t, GcDouble::Type); - break; - - case 'L': - case '[': { - objectType = true; - unsigned nameLength; - if (*p == 'L') { - ++p; - nameLength = it.s - p; - } else { - nameLength = (it.s - p) + 1; - } - THREAD_RUNTIME_ARRAY(t, char, name, nameLength); - memcpy(RUNTIME_ARRAY_BODY(name), p, nameLength - 1); - RUNTIME_ARRAY_BODY(name)[nameLength - 1] = 0; - type = resolveClass( - t, method->class_()->loader(), RUNTIME_ARRAY_BODY(name)); - } break; - - default: - abort(); - } - - object arg = objectArrayBody(t, args, i++); - if ((arg == 0 and (not objectType)) - or (arg and (not instanceOf(t, type, arg)))) { - if (false) { - fprintf(stderr, - "%s is not a %s\n", - arg ? objectClass(t, arg)->name()->body().begin() - : reinterpret_cast(""), - type->name()->body().begin()); - } - - throwNew(t, GcIllegalArgumentException::Type); - } - } - } - - initClass(t, method->class_()); - - unsigned returnCode = method->returnCode(); - - THREAD_RESOURCE0(t, { - if (t->exception) { - t->exception = makeThrowable( - t, GcInvocationTargetException::Type, 0, 0, t->exception); - - t->exception->as(t) - ->setTarget(t, t->exception->cause()); - } - }); - - object result; - if (args) { - result = t->m->processor->invokeArray(t, method, instance, args); - } else { - result = t->m->processor->invoke(t, method, instance); - } - - return translateInvokeResult(t, returnCode, result); -} - -// only safe to call during bootstrap when there's only one thread -// running: -void intercept(Thread* t, - GcClass* c, - const char* name, - const char* spec, - void* function, - bool updateRuntimeData) -{ - GcMethod* m = findMethodOrNull(t, c, name, spec); - if (m) { - PROTECT(t, m); - - if (updateRuntimeData) { - GcMethod* clone = methodClone(t, m); - - m->flags() |= ACC_NATIVE; - - // make clone private to prevent vtable updates at compilation - // time. Otherwise, our interception might be bypassed by calls - // through the vtable. - clone->flags() |= ACC_PRIVATE; - - GcNativeIntercept* native = makeNativeIntercept(t, function, true, clone); - - PROTECT(t, native); - - GcMethodRuntimeData* runtimeData = getMethodRuntimeData(t, m); - - runtimeData->setNative(t, native->as(t)); - } else { - m->flags() |= ACC_NATIVE; - } - } else { - // If we can't find the method, just ignore it, since ProGuard may - // have stripped it out as unused. Otherwise, the code below can - // be enabled for debugging purposes. - - if (false) { - fprintf(stderr, - "unable to find %s%s in %s\n", - name, - spec, - c->name()->body().begin()); - - abort(t); - } - } -} - -Finder* getFinder(Thread* t, const char* name, size_t nameLength) -{ - ACQUIRE(t, t->m->referenceLock); - - for (GcFinder* p = roots(t)->virtualFileFinders(); p; p = p->next()) { - if (p->name()->length() == nameLength - and strncmp(reinterpret_cast(p->name()->body().begin()), - name, - nameLength)) { - return static_cast(p->finder()); - } - } - - GcByteArray* n = makeByteArray(t, nameLength + 1); - memcpy(n->body().begin(), name, nameLength); - - void* p = t->m->libraries->resolve( - reinterpret_cast(n->body().begin())); - - if (p) { - uint8_t* (*function)(size_t*); - memcpy(&function, &p, BytesPerWord); - - size_t size = 0; - uint8_t* data = function(&size); - if (data) { - Finder* f = makeFinder(t->m->system, t->m->heap, data, size); - GcFinder* finder = makeFinder(t, f, n, roots(t)->virtualFileFinders()); - - roots(t)->setVirtualFileFinders(t, finder); - - return f; - } - } - - return 0; -} - -object getDeclaredClasses(Thread* t, GcClass* c, bool publicOnly) -{ - GcClassAddendum* addendum = c->addendum(); - if (addendum) { - GcArray* table = cast(t, addendum->innerClassTable()); - if (table) { - PROTECT(t, table); - - unsigned count = 0; - for (unsigned i = 0; i < table->length(); ++i) { - GcInnerClassReference* reference - = cast(t, table->body()[i]); - GcByteArray* outer = reference->outer(); - if (outer and byteArrayEqual(t, outer, c->name()) - and ((not publicOnly) or (reference->flags() & ACC_PUBLIC))) { - ++count; - } - } - - object result = makeObjectArray(t, type(t, GcJclass::Type), count); - PROTECT(t, result); - - for (unsigned i = 0; i < table->length(); ++i) { - GcInnerClassReference* reference - = cast(t, table->body()[i]); - GcByteArray* outer = reference->outer(); - if (outer and byteArrayEqual(t, outer, c->name()) - and ((not publicOnly) or (reference->flags() & ACC_PUBLIC))) { - object inner - = getJClass(t, resolveClass(t, c->loader(), reference->inner())); - - --count; - reinterpret_cast(result)->setBodyElement(t, count, inner); - } - } - - return result; - } - } - - return makeObjectArray(t, type(t, GcJclass::Type), 0); -} - -unsigned classModifiers(Thread* t, GcClass* c) -{ - GcClassAddendum* addendum = c->addendum(); - if (addendum) { - GcArray* table = cast(t, addendum->innerClassTable()); - if (table) { - for (unsigned i = 0; i < table->length(); ++i) { - GcInnerClassReference* reference - = cast(t, table->body()[i]); - if (0 == strcmp(c->name()->body().begin(), - reference->inner()->body().begin())) { - return reference->flags(); - } - } - } - } - - return c->flags(); -} - -object makeMethod(Thread* t, GcJclass* class_, int index) -{ - GcMethod* method = cast( - t, cast(t, class_->vmClass()->methodTable())->body()[index]); - PROTECT(t, method); - - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "java/lang/reflect/Method"); - PROTECT(t, c); - - object instance = makeNew(t, c); - PROTECT(t, instance); - - GcMethod* constructor = resolveMethod(t, c, "", "(Lavian/VMMethod;)V"); - - t->m->processor->invoke(t, constructor, instance, method); - - if (method->name()->body()[0] == '<') { - object oldInstance = instance; - - c = resolveClass( - t, roots(t)->bootLoader(), "java/lang/reflect/Constructor"); - - object instance = makeNew(t, c); - - GcMethod* constructor - = resolveMethod(t, c, "", "(Ljava/lang/Method;)V"); - - t->m->processor->invoke(t, constructor, instance, oldInstance); - } - - return instance; -} - -int64_t getPrimitive(Thread* t, object instance, int code, int offset) -{ - switch (code) { - case ByteField: - return fieldAtOffset(instance, offset); - case BooleanField: - return fieldAtOffset(instance, offset); - case CharField: - return fieldAtOffset(instance, offset); - case ShortField: - return fieldAtOffset(instance, offset); - case IntField: - return fieldAtOffset(instance, offset); - case LongField: - return fieldAtOffset(instance, offset); - case FloatField: - return fieldAtOffset(instance, offset); - case DoubleField: - return fieldAtOffset(instance, offset); - default: - abort(t); - } -} - -void setPrimitive(Thread* t, - object instance, - int code, - int offset, - int64_t value) -{ - switch (code) { - case ByteField: - fieldAtOffset(instance, offset) = static_cast(value); - break; - case BooleanField: - fieldAtOffset(instance, offset) = static_cast(value); - break; - case CharField: - fieldAtOffset(instance, offset) = static_cast(value); - break; - case ShortField: - fieldAtOffset(instance, offset) = static_cast(value); - break; - case IntField: - fieldAtOffset(instance, offset) = static_cast(value); - break; - case LongField: - fieldAtOffset(instance, offset) = static_cast(value); - break; - case FloatField: - fieldAtOffset(instance, offset) = static_cast(value); - break; - case DoubleField: - fieldAtOffset(instance, offset) = static_cast(value); - break; - default: - abort(t); - } -} - -int64_t invokeMethod(Thread* t, GcMethod* method, object instance, object args) -{ - THREAD_RESOURCE0(t, { - if (t->exception) { - GcThrowable* exception = t->exception; - t->exception = makeThrowable( - t, GcInvocationTargetException::Type, 0, 0, exception); - } - }); - - unsigned returnCode = method->returnCode(); - - return reinterpret_cast(translateInvokeResult( - t, returnCode, t->m->processor->invokeArray(t, method, instance, args))); -} - -} // namespace vm - -#endif // CLASSPATH_COMMON_H diff --git a/sgx-jvm/avian/src/avian/common.h b/sgx-jvm/avian/src/avian/common.h deleted file mode 100644 index fc837d6e88..0000000000 --- a/sgx-jvm/avian/src/avian/common.h +++ /dev/null @@ -1,497 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_COMMON_H -#define AVIAN_COMMON_H - -#ifndef __STDC_CONSTANT_MACROS -#define __STDC_CONSTANT_MACROS -#endif - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include "avian/types.h" -#include - -#ifdef UNUSED -#undef UNUSED -#endif - -#ifdef _MSC_VER - -#include -#include - -#ifdef linux -#undef linux -#endif - -// don't complain about using 'this' in member initializers: -#pragma warning(disable : 4355) - -#define strncasecmp _strnicmp - -#define FP_UNDEF 2 - -#define not ! -#define or || -#define and && -#define xor ^ - -#define LIKELY(v) v -#define UNLIKELY(v) v - -#define UNUSED - -#define NO_RETURN __declspec(noreturn) - -#define PACKED - -#define PLATFORM_WINDOWS - -#ifdef _M_IX86 -typedef int32_t intptr_t; -typedef uint32_t uintptr_t; -#define ARCH_x86_32 -#define BYTES_PER_WORD 4 -#elif defined _M_X64 -typedef int64_t intptr_t; -typedef uint64_t uintptr_t; -#define ARCH_x86_64 -#define BYTES_PER_WORD 8 -#elif defined _M_ARM_FP -typedef int32_t intptr_t; -typedef uint32_t uintptr_t; -#define ARCH_arm -#define BYTES_PER_WORD 4 -#else -#error "unsupported architecture" -#endif - -namespace vm { - -typedef intptr_t intptr_alias_t; - -} // namespace vm - -#else // not _MSC_VER - -#include - -#define BYTES_PER_WORD __SIZEOF_POINTER__ - -#define LIKELY(v) __builtin_expect((v) != 0, true) -#define UNLIKELY(v) __builtin_expect((v) != 0, false) - -#define UNUSED __attribute__((unused)) - -#define NO_RETURN __attribute__((noreturn)) - -#define PACKED __attribute__((packed)) - -#ifdef __MINGW32__ -#define PLATFORM_WINDOWS -#endif - -#ifdef __i386__ -#define ARCH_x86_32 -#elif defined __x86_64__ -#define ARCH_x86_64 -#elif defined __arm__ -#define ARCH_arm -#elif defined __aarch64__ -#define ARCH_arm64 -#else -#error "unsupported architecture" -#endif - -namespace vm { - -typedef intptr_t __attribute__((__may_alias__)) intptr_alias_t; - -} // namespace vm - -#endif // not _MSC_VER - -#ifdef PLATFORM_WINDOWS -#define AVIAN_EXPORT __declspec(dllexport) -#define PATH_SEPARATOR ';' -#else // not PLATFORM_WINDOWS -#define AVIAN_EXPORT \ - __attribute__((visibility("default"))) __attribute__((used)) -#define PATH_SEPARATOR ':' -#endif // not PLATFORM_WINDOWS - -#ifdef PRId64 -#define LLD PRId64 -#define ULD PRIu64 -#define LD PRIdPTR -#define LX PRIxPTR -#else -#if (defined ARCH_x86_32) || (defined ARCH_arm) -#define LD "ld" -#if (defined _MSC_VER) || ((defined __MINGW32__) && __GNUC__ >= 4) -#if (__GNUC__ == 4 && __GNUC_MINOR__ <= 8) -#define LLD "I64d" -#else -#define LLD "lld" -#endif -#else -#define LLD "lld" -#endif -#ifdef __APPLE__ -#define ULD "lu" -#define LX "lx" -#else -#define LX "x" -#define ULD "u" -#endif -#elif defined ARCH_x86_64 -#define LD "ld" -#define LX "lx" -#if (defined _MSC_VER) || (defined __MINGW32__) -#if (__GNUC__ == 4 && __GNUC_MINOR__ <= 8) -#define LLD "I64d" -#define ULD "I64x" -#else -#define LLD "lld" -#define ULD "llu" -#endif -#else -#ifdef __APPLE__ -#define LLD "lld" -#else -#define LLD "ld" -#endif -#define ULD "lu" -#endif -#else -#error "Unsupported architecture" -#endif -#endif - -#ifdef PLATFORM_WINDOWS -#define SO_PREFIX "" -#else -#define SO_PREFIX "lib" -#endif - -#ifdef __APPLE__ -#define SO_SUFFIX ".dylib" -#elif defined PLATFORM_WINDOWS -#define SO_SUFFIX ".dll" -#else -#define SO_SUFFIX ".so" -#endif - -#define MACRO_XY(X, Y) X##Y -#define MACRO_MakeNameXY(FX, LINE) MACRO_XY(FX, LINE) -#define MAKE_NAME(FX) MACRO_MakeNameXY(FX, __LINE__) - -#define RESOURCE(type, name, release) \ - class MAKE_NAME(Resource_) { \ - public: \ - MAKE_NAME(Resource_)(type name) : name(name) \ - { \ - } \ - ~MAKE_NAME(Resource_)() \ - { \ - release; \ - } \ - \ - private: \ - type name; \ - } MAKE_NAME(resource_)(name); - -#ifdef _MSC_VER -#pragma warning(disable : 4291) -#endif - -namespace vm { - -inline intptr_alias_t& alias(void* p, unsigned offset) -{ - return *reinterpret_cast(static_cast(p) + offset); -} - -#ifdef _MSC_VER - -inline int vsnprintf(char* dst, size_t size, const char* format, va_list a) -{ - return vsnprintf_s(dst, size, _TRUNCATE, format, a); -} - -inline int snprintf(char* dst, size_t size, const char* format, ...) -{ - va_list a; - va_start(a, format); - int r = vsnprintf(dst, size, format, a); - va_end(a); - return r; -} - -inline FILE* fopen(const char* name, const char* mode) -{ - FILE* file; - if (fopen_s(&file, name, mode) == 0) { - return file; - } else { - return 0; - } -} - -#else // not _MSC_VER - -inline int vsnprintf(char* dst, size_t size, const char* format, va_list a) -{ - return ::vsnprintf(dst, size, format, a); -} - -inline int snprintf(char* dst, size_t size, const char* format, ...) -{ - va_list a; - va_start(a, format); - int r = vsnprintf(dst, size, format, a); - va_end(a); - return r; -} - -inline FILE* fopen(const char* name, const char* mode) -{ - return ::fopen(name, mode); -} - -#endif // not _MSC_VER - -const unsigned BytesPerWord = sizeof(uintptr_t); -const unsigned BitsPerWord = BytesPerWord * 8; - -const uintptr_t PointerMask = ((~static_cast(0)) / BytesPerWord) - * BytesPerWord; - -const unsigned LikelyPageSizeInBytes = 4 * 1024; - -inline unsigned pad(unsigned n, unsigned alignment) -{ - return (n + (alignment - 1)) & ~(alignment - 1); -} - -inline unsigned pad(unsigned n) -{ - return pad(n, BytesPerWord); -} - -inline uintptr_t padWord(uintptr_t n, uintptr_t alignment) -{ - return (n + (alignment - 1)) & ~(alignment - 1); -} - -inline uintptr_t padWord(uintptr_t n) -{ - return padWord(n, BytesPerWord); -} - -inline bool fitsInInt8(int64_t v) -{ - return v == static_cast(v); -} - -inline bool fitsInInt16(int64_t v) -{ - return v == static_cast(v); -} - -inline bool fitsInInt32(int64_t v) -{ - return v == static_cast(v); -} -template -inline unsigned wordOf(unsigned i) -{ - return i / (sizeof(T) * 8); -} - -inline unsigned wordOf(unsigned i) -{ - return wordOf(i); -} - -template -inline unsigned bitOf(unsigned i) -{ - return i % (sizeof(T) * 8); -} - -inline unsigned bitOf(unsigned i) -{ - return bitOf(i); -} - -template -inline unsigned indexOf(unsigned word, unsigned bit) -{ - return (word * (sizeof(T) * 8)) + bit; -} - -inline unsigned indexOf(unsigned word, unsigned bit) -{ - return indexOf(word, bit); -} - -template -inline void markBit(T* map, unsigned i) -{ - map[wordOf(i)] |= static_cast(1) << bitOf(i); -} - -template -inline void clearBit(T* map, unsigned i) -{ - map[wordOf(i)] &= ~(static_cast(1) << bitOf(i)); -} - -template -inline unsigned getBit(T* map, unsigned i) -{ - return (map[wordOf(i)] & (static_cast(1) << bitOf(i))) - >> bitOf(i); -} - -// todo: the following (clearBits, setBits, and getBits) could be made -// more efficient by operating on a word at a time instead of a bit at -// a time: - -template -inline void clearBits(T* map, unsigned bitsPerRecord, unsigned index) -{ - for (unsigned i = index, limit = index + bitsPerRecord; i < limit; ++i) { - clearBit(map, i); - } -} - -template -inline void setBits(T* map, unsigned bitsPerRecord, int index, unsigned v) -{ - for (int i = index + bitsPerRecord - 1; i >= index; --i) { - if (v & 1) - markBit(map, i); - else - clearBit(map, i); - v >>= 1; - } -} - -template -inline unsigned getBits(T* map, unsigned bitsPerRecord, unsigned index) -{ - unsigned v = 0; - for (unsigned i = index, limit = index + bitsPerRecord; i < limit; ++i) { - v <<= 1; - v |= getBit(map, i); - } - return v; -} - -template -inline T& fieldAtOffset(void* p, unsigned offset) -{ - return *reinterpret_cast(static_cast(p) + offset); -} - -template -inline T* maskAlignedPointer(T* p) -{ - return reinterpret_cast(reinterpret_cast(p) & PointerMask); -} - -inline void write4(uint8_t* dst, uint32_t v) -{ - memcpy(dst, &v, 4); -} - -inline uint32_t floatToBits(float f) -{ - uint32_t bits; - memcpy(&bits, &f, 4); - return bits; -} - -inline uint64_t doubleToBits(double d) -{ - uint64_t bits; - memcpy(&bits, &d, 8); - return bits; -} - -inline double bitsToDouble(uint64_t bits) -{ - double d; - memcpy(&d, &bits, 8); - return d; -} - -inline float bitsToFloat(uint32_t bits) -{ - float f; - memcpy(&f, &bits, 4); - return f; -} - -inline int difference(void* a, void* b) -{ - return reinterpret_cast(a) - reinterpret_cast(b); -} - -template -inline void* voidPointer(T function) -{ - void* p; - memcpy(&p, &function, sizeof(void*)); - return p; -} - -inline void replace(char a, char b, char* c) -{ - for (; *c; ++c) - if (*c == a) - *c = b; -} - -inline void replace(char a, char b, char* dst, const char* src) -{ - unsigned i = 0; - for (; src[i]; ++i) { - dst[i] = src[i] == a ? b : src[i]; - } - dst[i] = 0; -} - -inline bool equal(const void* a, unsigned al, const void* b, unsigned bl) -{ - if (al == bl) { - return memcmp(a, b, al) == 0; - } else { - return false; - } -} - -} // namespace vm - -#endif // AVIAN_COMMON_H diff --git a/sgx-jvm/avian/src/avian/constants.h b/sgx-jvm/avian/src/avian/constants.h deleted file mode 100644 index ebeb975af3..0000000000 --- a/sgx-jvm/avian/src/avian/constants.h +++ /dev/null @@ -1,294 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef CONSTANTS_H -#define CONSTANTS_H - -namespace vm { - -enum OpCode { - aaload = 0x32, - aastore = 0x53, - aconst_null = 0x01, - aload = 0x19, - aload_0 = 0x2a, - aload_1 = 0x2b, - aload_2 = 0x2c, - aload_3 = 0x2d, - anewarray = 0xbd, - areturn = 0xb0, - arraylength = 0xbe, - astore = 0x3a, - astore_0 = 0x4b, - astore_1 = 0x4c, - astore_2 = 0x4d, - astore_3 = 0x4e, - athrow = 0xbf, - baload = 0x33, - bastore = 0x54, - bipush = 0x10, - breakpoint = 0xca, - caload = 0x34, - castore = 0x55, - checkcast = 0xc0, - d2f = 0x90, - d2i = 0x8e, - d2l = 0x8f, - dadd = 0x63, - daload = 0x31, - dastore = 0x52, - dcmpg = 0x98, - dcmpl = 0x97, - dconst_0 = 0x0e, - dconst_1 = 0x0f, - ddiv = 0x6f, - dload = 0x18, - dload_0 = 0x26, - dload_1 = 0x27, - dload_2 = 0x28, - dload_3 = 0x29, - dmul = 0x6b, - dneg = 0x77, - drem = 0x73, - dreturn = 0xaf, - dstore = 0x39, - dstore_0 = 0x47, - dstore_1 = 0x48, - dstore_2 = 0x49, - dstore_3 = 0x4a, - dsub = 0x67, - dup = 0x59, - dup_x1 = 0x5a, - dup_x2 = 0x5b, - dup2 = 0x5c, - dup2_x1 = 0x5d, - dup2_x2 = 0x5e, - f2d = 0x8d, - f2i = 0x8b, - f2l = 0x8c, - fadd = 0x62, - faload = 0x30, - fastore = 0x51, - fcmpg = 0x96, - fcmpl = 0x95, - fconst_0 = 0x0b, - fconst_1 = 0x0c, - fconst_2 = 0x0d, - fdiv = 0x6e, - fload = 0x17, - fload_0 = 0x22, - fload_1 = 0x23, - fload_2 = 0x24, - fload_3 = 0x25, - fmul = 0x6a, - fneg = 0x76, - frem = 0x72, - freturn = 0xae, - fstore = 0x38, - fstore_0 = 0x43, - fstore_1 = 0x44, - fstore_2 = 0x45, - fstore_3 = 0x46, - fsub = 0x66, - getfield = 0xb4, - getstatic = 0xb2, - goto_ = 0xa7, - goto_w = 0xc8, - i2b = 0x91, - i2c = 0x92, - i2d = 0x87, - i2f = 0x86, - i2l = 0x85, - i2s = 0x93, - iadd = 0x60, - iaload = 0x2e, - iand = 0x7e, - iastore = 0x4f, - iconst_m1 = 0x02, - iconst_0 = 0x03, - iconst_1 = 0x04, - iconst_2 = 0x05, - iconst_3 = 0x06, - iconst_4 = 0x07, - iconst_5 = 0x08, - idiv = 0x6c, - if_acmpeq = 0xa5, - if_acmpne = 0xa6, - if_icmpeq = 0x9f, - if_icmpne = 0xa0, - if_icmplt = 0xa1, - if_icmpge = 0xa2, - if_icmpgt = 0xa3, - if_icmple = 0xa4, - ifeq = 0x99, - ifge = 0x9c, - ifgt = 0x9d, - ifle = 0x9e, - iflt = 0x9b, - ifne = 0x9a, - ifnonnull = 0xc7, - ifnull = 0xc6, - iinc = 0x84, - iload = 0x15, - iload_0 = 0x1a, - iload_1 = 0x1b, - iload_2 = 0x1c, - iload_3 = 0x1d, - impdep1 = 0xfe, - impdep2 = 0xff, - imul = 0x68, - ineg = 0x74, - instanceof = 0xc1, - invokedynamic = 0xba, - invokeinterface = 0xb9, - invokespecial = 0xb7, - invokestatic = 0xb8, - invokevirtual = 0xb6, - ior = 0x80, - irem = 0x70, - ireturn = 0xac, - ishl = 0x78, - ishr = 0x7a, - istore = 0x36, - istore_0 = 0x3b, - istore_1 = 0x3c, - istore_2 = 0x3d, - istore_3 = 0x3e, - isub = 0x64, - iushr = 0x7c, - ixor = 0x82, - jsr = 0xa8, - jsr_w = 0xc9, - l2d = 0x8a, - l2f = 0x89, - l2i = 0x88, - ladd = 0x61, - laload = 0x2f, - land = 0x7f, - lastore = 0x50, - lcmp = 0x94, - lconst_0 = 0x09, - lconst_1 = 0x0a, - ldc = 0x12, - ldc_w = 0x13, - ldc2_w = 0x14, - ldiv_ = 0x6d, - lload = 0x16, - lload_0 = 0x1e, - lload_1 = 0x1f, - lload_2 = 0x20, - lload_3 = 0x21, - lmul = 0x69, - lneg = 0x75, - lookupswitch = 0xab, - lor = 0x81, - lrem = 0x71, - lreturn = 0xad, - lshl = 0x79, - lshr = 0x7b, - lstore = 0x37, - lstore_0 = 0x3f, - lstore_1 = 0x40, - lstore_2 = 0x41, - lstore_3 = 0x42, - lsub = 0x65, - lushr = 0x7d, - lxor = 0x83, - monitorenter = 0xc2, - monitorexit = 0xc3, - multianewarray = 0xc5, - new_ = 0xbb, - newarray = 0xbc, - nop = 0x00, - pop_ = 0x57, - pop2 = 0x58, - putfield = 0xb5, - putstatic = 0xb3, - ret = 0xa9, - return_ = 0xb1, - saload = 0x35, - sastore = 0x56, - sipush = 0x11, - swap = 0x5f, - tableswitch = 0xaa, - wide = 0xc4 -}; - -enum TypeCode { - T_BOOLEAN = 4, - T_CHAR = 5, - T_FLOAT = 6, - T_DOUBLE = 7, - T_BYTE = 8, - T_SHORT = 9, - T_INT = 10, - T_LONG = 11 -}; - -enum Constant { - CONSTANT_Class = 7, - CONSTANT_Double = 6, - CONSTANT_Fieldref = 9, - CONSTANT_Float = 4, - CONSTANT_Integer = 3, - CONSTANT_InterfaceMethodref = 11, - CONSTANT_InvokeDynamic = 18, - CONSTANT_Long = 5, - CONSTANT_MethodHandle = 15, - CONSTANT_MethodType = 16, - CONSTANT_Methodref = 10, - CONSTANT_NameAndType = 12, - CONSTANT_String = 8, - CONSTANT_Utf8 = 1 -}; - -const unsigned ACC_PUBLIC = 1 << 0; -const unsigned ACC_PRIVATE = 1 << 1; -const unsigned ACC_PROTECTED = 1 << 2; -const unsigned ACC_STATIC = 1 << 3; -const unsigned ACC_FINAL = 1 << 4; -const unsigned ACC_SUPER = 1 << 5; -const unsigned ACC_SYNCHRONIZED = ACC_SUPER; -const unsigned ACC_VOLATILE = 1 << 6; -const unsigned ACC_TRANSIENT = 1 << 7; -const unsigned ACC_VARARGS = 1 << 7; -const unsigned ACC_NATIVE = 1 << 8; -const unsigned ACC_INTERFACE = 1 << 9; -const unsigned ACC_ABSTRACT = 1 << 10; -const unsigned ACC_STRICT = 1 << 11; - -const unsigned REF_getField = 1; -const unsigned REF_getStatic = 2; -const unsigned REF_putField = 3; -const unsigned REF_putStatic = 4; -const unsigned REF_invokeVirtual = 5; -const unsigned REF_invokeStatic = 6; -const unsigned REF_invokeSpecial = 7; -const unsigned REF_newInvokeSpecial = 8; -const unsigned REF_invokeInterface = 9; - -const int AVIAN_JNI_COMMIT = 1; -const int AVIAN_JNI_ABORT = 2; - -const int AVIAN_JNI_OK = 0; -const int AVIAN_JNI_ERR = -1; -const int AVIAN_JNI_EDETACHED = -2; -const int AVIAN_JNI_EVERSION = -3; -const int AVIAN_JNI_ENOMEM = -4; -const int AVIAN_JNI_EEXIST = -5; -const int AVIAN_JNI_EINVAL = -6; - -const int AVIAN_JNI_VERSION_1_1 = 0x00010001; -const int AVIAN_JNI_VERSION_1_2 = 0x00010002; -const int AVIAN_JNI_VERSION_1_4 = 0x00010004; - -} // namespace vm - -#endif // CONSTANTS_H diff --git a/sgx-jvm/avian/src/avian/embed.h b/sgx-jvm/avian/src/avian/embed.h deleted file mode 100644 index 7f1f457f99..0000000000 --- a/sgx-jvm/avian/src/avian/embed.h +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef EMBED_H -#define EMBED_H - -#define RESID_MAIN_CLASS 100 -#define RESID_BOOT_JAR L"BOOT.JAR" - -#endif diff --git a/sgx-jvm/avian/src/avian/environment.h b/sgx-jvm/avian/src/avian/environment.h deleted file mode 100644 index a4eba6dbb5..0000000000 --- a/sgx-jvm/avian/src/avian/environment.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_ENVIRONMENT_H -#define AVIAN_ENVIRONMENT_H - -#ifndef AVIAN_TARGET_FORMAT -#error build system should have defined AVIAN_TARGET_FORMAT -#endif - -#ifndef AVIAN_TARGET_ARCH -#error build system should have defined AVIAN_TARGET_ARCH -#endif - -#define AVIAN_FORMAT_UNKNOWN 0 -#define AVIAN_FORMAT_ELF 1 -#define AVIAN_FORMAT_PE 2 -#define AVIAN_FORMAT_MACHO 3 - -#define AVIAN_ARCH_UNKNOWN 0 -#define AVIAN_ARCH_X86 (1 << 8) -#define AVIAN_ARCH_X86_64 (2 << 8) -#define AVIAN_ARCH_ARM (3 << 8) -#define AVIAN_ARCH_ARM64 (4 << 8) - -#endif diff --git a/sgx-jvm/avian/src/avian/finder.h b/sgx-jvm/avian/src/avian/finder.h deleted file mode 100644 index 133f1127ee..0000000000 --- a/sgx-jvm/avian/src/avian/finder.h +++ /dev/null @@ -1,216 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef FINDER_H -#define FINDER_H - -#include "avian/common.h" -#include - -namespace avian { -namespace util { -class Alloc; -} -} - -namespace vm { - -const unsigned LocalHeaderSize = 30; -const unsigned HeaderSize = 46; - -const unsigned CentralDirectorySignature = 0x06054b50; -const unsigned EntrySignature = 0x02014b50; - -const unsigned CentralDirectorySearchStart = 22; - -inline uint16_t get2(const uint8_t* p) -{ - return (static_cast(p[1]) << 8) | (static_cast(p[0])); -} - -inline uint32_t get4(const uint8_t* p) -{ - return (static_cast(p[3]) << 24) - | (static_cast(p[2]) << 16) - | (static_cast(p[1]) << 8) | (static_cast(p[0])); -} - -inline uint32_t signature(const uint8_t* p) -{ - return get4(p); -} - -inline uint16_t compressionMethod(const uint8_t* centralHeader) -{ - return get2(centralHeader + 10); -} - -inline uint32_t fileTime(const uint8_t* centralHeader) -{ - return get4(centralHeader + 12); -} - -inline uint32_t fileCRC(const uint8_t* centralHeader) -{ - return get4(centralHeader + 16); -} - -inline uint32_t compressedSize(const uint8_t* centralHeader) -{ - return get4(centralHeader + 20); -} - -inline uint32_t uncompressedSize(const uint8_t* centralHeader) -{ - return get4(centralHeader + 24); -} - -inline uint16_t fileNameLength(const uint8_t* centralHeader) -{ - return get2(centralHeader + 28); -} - -inline uint16_t extraFieldLength(const uint8_t* centralHeader) -{ - return get2(centralHeader + 30); -} - -inline uint16_t commentFieldLength(const uint8_t* centralHeader) -{ - return get2(centralHeader + 32); -} - -inline uint32_t localHeaderOffset(const uint8_t* centralHeader) -{ - return get4(centralHeader + 42); -} - -inline uint16_t localFileNameLength(const uint8_t* localHeader) -{ - return get2(localHeader + 26); -} - -inline uint16_t localExtraFieldLength(const uint8_t* localHeader) -{ - return get2(localHeader + 28); -} - -inline uint32_t centralDirectoryOffset(const uint8_t* centralHeader) -{ - return get4(centralHeader + 16); -} - -inline const uint8_t* fileName(const uint8_t* centralHeader) -{ - return centralHeader + 46; -} - -inline const uint8_t* fileData(const uint8_t* localHeader) -{ - return localHeader + LocalHeaderSize + localFileNameLength(localHeader) - + localExtraFieldLength(localHeader); -} - -inline const uint8_t* endOfEntry(const uint8_t* p) -{ - return p + HeaderSize + fileNameLength(p) + extraFieldLength(p) - + commentFieldLength(p); -} - -inline bool readLine(const uint8_t* base, - unsigned total, - size_t* start, - size_t* length) -{ - const uint8_t* p = base + *start; - const uint8_t* end = base + total; - while (p != end and (*p == '\n' or *p == '\r')) - ++p; - - *start = p - base; - while (p != end and not(*p == '\n' or *p == '\r')) - ++p; - - *length = (p - base) - *start; - - return *length != 0; -} - -class Finder { - public: - class IteratorImp { - public: - virtual const char* next(size_t* size) = 0; - virtual void dispose() = 0; - }; - - class Iterator { - public: - Iterator(Finder* finder) - : it(finder->iterator()), current(it->next(¤tSize)) - { - } - - ~Iterator() - { - it->dispose(); - } - - bool hasMore() - { - if (current) - return true; - current = it->next(¤tSize); - return current != 0; - } - - const char* next(size_t* size) - { - if (hasMore()) { - *size = currentSize; - const char* v = current; - current = 0; - return v; - } else { - return 0; - } - } - - IteratorImp* it; - const char* current; - size_t currentSize; - }; - - virtual IteratorImp* iterator() = 0; - virtual System::Region* find(const char* name) = 0; - virtual System::FileType stat(const char* name, - size_t* length, - bool tryDirectory = false) = 0; - virtual const char* urlPrefix(const char* name) = 0; - virtual const char* nextUrlPrefix(const char* name, void*& finderElementPtr) - = 0; - virtual const char* sourceUrl(const char* name) = 0; - virtual const char* path() = 0; - virtual void dispose() = 0; -}; - -AVIAN_EXPORT Finder* makeFinder(System* s, - avian::util::Alloc* a, - const char* path, - const char* bootLibrary); - -Finder* makeFinder(System* s, - avian::util::Alloc* a, - const uint8_t* jarData, - size_t jarLength); - -} // namespace vm - -#endif // FINDER_H diff --git a/sgx-jvm/avian/src/avian/heapwalk.h b/sgx-jvm/avian/src/avian/heapwalk.h deleted file mode 100644 index 32bf0104aa..0000000000 --- a/sgx-jvm/avian/src/avian/heapwalk.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef HEAPWALK_H -#define HEAPWALK_H - -#include "avian/common.h" -#include "java-common.h" - -namespace vm { - -class Thread; - -class HeapMap { - public: - virtual int find(object value) = 0; - virtual void dispose() = 0; -}; - -class HeapVisitor { - public: - virtual void root() = 0; - virtual unsigned visitNew(object value) = 0; - virtual void visitOld(object value, unsigned number) = 0; - virtual void push(object parent, unsigned parentNumber, unsigned childOffset) - = 0; - virtual void pop() = 0; -}; - -class HeapWalker { - public: - virtual unsigned visitRoot(object root) = 0; - virtual void visitAllRoots() = 0; - virtual HeapMap* map() = 0; - virtual void dispose() = 0; -}; - -HeapWalker* makeHeapWalker(Thread* t, HeapVisitor* v); - -} // namespace vm - -#endif // HEAPWALK_H diff --git a/sgx-jvm/avian/src/avian/java-common.h b/sgx-jvm/avian/src/avian/java-common.h deleted file mode 100644 index 52b8c9d499..0000000000 --- a/sgx-jvm/avian/src/avian/java-common.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef JAVA_COMMON_H -#define JAVA_COMMON_H - -namespace vm { - -class Machine; -class Thread; - -class GcObject; -; - -typedef GcObject* object; - -typedef uint8_t jboolean; -typedef int8_t jbyte; -typedef uint16_t jchar; -typedef int16_t jshort; -typedef int32_t jint; -typedef int64_t jlong; -typedef float jfloat; -typedef double jdouble; - -typedef jint jsize; - -typedef object* jobject; - -class GcString; -class GcJclass; -class GcThrowable; -class GcBooleanArray; -class GcByteArray; -class GcCharArray; -class GcShortArray; -class GcIntArray; -class GcLongArray; -class GcFloatArray; -class GcDoubleArray; -class GcObjectArray; - -typedef GcJclass** jclass; -typedef GcThrowable** jthrowable; -typedef GcString** jstring; -typedef jobject jweak; - -typedef jobject jarray; -typedef GcBooleanArray** jbooleanArray; -typedef GcByteArray** jbyteArray; -typedef GcCharArray** jcharArray; -typedef GcShortArray** jshortArray; -typedef GcIntArray** jintArray; -typedef GcLongArray** jlongArray; -typedef GcFloatArray** jfloatArray; -typedef GcDoubleArray** jdoubleArray; -typedef GcObjectArray** jobjectArray; - -typedef uintptr_t jfieldID; -typedef uintptr_t jmethodID; - -union jvalue { - jboolean z; - jbyte b; - jchar c; - jshort s; - jint i; - jlong j; - jfloat f; - jdouble d; - jobject l; -}; - -} // namespace vm - -#endif // JAVA_COMMON_H diff --git a/sgx-jvm/avian/src/avian/jnienv.h b/sgx-jvm/avian/src/avian/jnienv.h deleted file mode 100644 index 9947ade6ec..0000000000 --- a/sgx-jvm/avian/src/avian/jnienv.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef JNIENV_H -#define JNIENV_H - -#include "avian/machine.h" - -#define BOOTSTRAP_PROPERTY "avian.bootstrap" -#define JAVA_COMMAND_PROPERTY "sun.java.command" -#define JAVA_LAUNCHER_PROPERTY "sun.java.launcher" -#define CRASHDIR_PROPERTY "avian.crash.dir" -#define EMBED_PREFIX_PROPERTY "avian.embed.prefix" -#define CLASSPATH_PROPERTY "java.class.path" -#define JAVA_HOME_PROPERTY "java.home" -#define REENTRANT_PROPERTY "avian.reentrant" -#define BOOTCLASSPATH_PREPEND_OPTION "bootclasspath/p" -#define BOOTCLASSPATH_OPTION "bootclasspath" -#define BOOTCLASSPATH_APPEND_OPTION "bootclasspath/a" - -namespace vm { - -void populateJNITables(JavaVMVTable* vmTable, JNIEnvVTable* envTable); - -} // namespace vm - -#endif // JNIENV_H diff --git a/sgx-jvm/avian/src/avian/lzma-util.h b/sgx-jvm/avian/src/avian/lzma-util.h deleted file mode 100644 index 6837f79dd9..0000000000 --- a/sgx-jvm/avian/src/avian/lzma-util.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef LZMA_UTIL_H -#define LZMA_UTIL_H - -#include -#include -#include -#include - -namespace vm { - -const unsigned Padding = 16; - -class LzmaAllocator { - public: - LzmaAllocator(avian::util::Alloc* a) : a(a) - { - allocator.Alloc = allocate; - allocator.Free = free; - } - - ISzAlloc allocator; - avian::util::Alloc* a; - - static void* allocate(void* allocator, size_t size) - { - uint8_t* p = static_cast( - static_cast(allocator)->a->allocate(size + Padding)); - int32_t size32 = size; - memcpy(p, &size32, 4); - return p + Padding; - } - - static void free(void* allocator, void* address) - { - if (address) { - void* p = static_cast(address) - Padding; - int32_t size32; - memcpy(&size32, p, 4); - static_cast(allocator)->a->free(p, size32 + Padding); - } - } -}; - -} // namespace vm - -#endif // LZMA_UTIL_H diff --git a/sgx-jvm/avian/src/avian/lzma.h b/sgx-jvm/avian/src/avian/lzma.h deleted file mode 100644 index a9c6baa545..0000000000 --- a/sgx-jvm/avian/src/avian/lzma.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef LZMA_H -#define LZMA_H - -#include - -namespace avian { -namespace util { -class AllocOnly; -} -} - -namespace vm { - -uint8_t* decodeLZMA(System* s, - avian::util::Alloc* a, - uint8_t* in, - size_t inSize, - size_t* outSize); - -uint8_t* encodeLZMA(System* s, - avian::util::Alloc* a, - uint8_t* in, - size_t inSize, - size_t* outSize); - -} // namespace vm - -#endif // LZMA_H diff --git a/sgx-jvm/avian/src/avian/machine.h b/sgx-jvm/avian/src/avian/machine.h deleted file mode 100644 index 2d4dd323d3..0000000000 --- a/sgx-jvm/avian/src/avian/machine.h +++ /dev/null @@ -1,3873 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef MACHINE_H -#define MACHINE_H - -#include "avian/common.h" -#include "java-common.h" -#include -#include -#include -#include -#include "avian/finder.h" -#include "avian/processor.h" -#include "avian/constants.h" -#include "avian/arch.h" - -using namespace avian::util; - -#ifdef PLATFORM_WINDOWS -#define JNICALL __stdcall -#else -#define JNICALL -#endif - -#define PROTECT(thread, name) \ - Thread::SingleProtector MAKE_NAME(protector_)(thread, &name); - -#define ACQUIRE(t, x) MonitorResource MAKE_NAME(monitorResource_)(t, x) - -#define ACQUIRE_OBJECT(t, x) \ - ObjectMonitorResource MAKE_NAME(monitorResource_)(t, x) - -#define ACQUIRE_FIELD_FOR_READ(t, field) \ - FieldReadResource MAKE_NAME(monitorResource_)(t, field) - -#define ACQUIRE_FIELD_FOR_WRITE(t, field) \ - FieldWriteResource MAKE_NAME(monitorResource_)(t, field) - -#define ACQUIRE_RAW(t, x) RawMonitorResource MAKE_NAME(monitorResource_)(t, x) - -#define ENTER(t, state) StateResource MAKE_NAME(stateResource_)(t, state) - -#define THREAD_RESOURCE0(t, releaseBody) \ - class MAKE_NAME(Resource_) : public Thread::AutoResource { \ - public: \ - MAKE_NAME(Resource_)(Thread * t) : AutoResource(t) \ - { \ - } \ - ~MAKE_NAME(Resource_)() \ - { \ - releaseBody; \ - } \ - virtual void release() \ - { \ - this->MAKE_NAME(Resource_)::~MAKE_NAME(Resource_)(); \ - } \ - } MAKE_NAME(resource_)(t); - -#define OBJECT_RESOURCE(t, name, releaseBody) \ - class MAKE_NAME(Resource_) : public Thread::AutoResource { \ - public: \ - MAKE_NAME(Resource_)(Thread * t, object name) \ - : AutoResource(t), name(name), protector(t, &(this->name)) \ - { \ - } \ - ~MAKE_NAME(Resource_)() \ - { \ - releaseBody; \ - } \ - virtual void release() \ - { \ - this->MAKE_NAME(Resource_)::~MAKE_NAME(Resource_)(); \ - } \ - \ - private: \ - object name; \ - Thread::SingleProtector protector; \ - } MAKE_NAME(resource_)(t, name); - -#define THREAD_RESOURCE(t, type, name, releaseBody) \ - class MAKE_NAME(Resource_) : public Thread::AutoResource { \ - public: \ - MAKE_NAME(Resource_)(Thread * t, type name) : AutoResource(t), name(name) \ - { \ - } \ - ~MAKE_NAME(Resource_)() \ - { \ - releaseBody; \ - } \ - virtual void release() \ - { \ - this->MAKE_NAME(Resource_)::~MAKE_NAME(Resource_)(); \ - } \ - \ - private: \ - type name; \ - } MAKE_NAME(resource_)(t, name); - -#define THREAD_RESOURCE2(t, type1, name1, type2, name2, releaseBody) \ - class MAKE_NAME(Resource_) : public Thread::AutoResource { \ - public: \ - MAKE_NAME(Resource_)(Thread * t, type1 name1, type2 name2) \ - : AutoResource(t), name1(name1), name2(name2) \ - { \ - } \ - ~MAKE_NAME(Resource_)() \ - { \ - releaseBody; \ - } \ - virtual void release() \ - { \ - this->MAKE_NAME(Resource_)::~MAKE_NAME(Resource_)(); \ - } \ - \ - private: \ - type1 name1; \ - type2 name2; \ - } MAKE_NAME(resource_)(t, name1, name2); - -AVIAN_EXPORT void vmPrintTrace(vm::Thread* t); - -AVIAN_EXPORT void vmfPrintTrace(vm::Thread* t, FILE* out); - -namespace vm { - -const bool Verbose = false; -const bool DebugRun = false; -const bool DebugCalls = false; -const bool DebugStack = false; -const bool DebugMonitors = false; -const bool DebugReferences = false; - -const bool AbortOnOutOfMemoryError = false; - -const uintptr_t HashTakenMark = 1; -const uintptr_t ExtendedMark = 2; -const uintptr_t FixedMark = 3; - -const unsigned ThreadHeapSizeInBytes = 64 * 1024; -const unsigned ThreadHeapSizeInWords = ThreadHeapSizeInBytes / BytesPerWord; - -const unsigned ThreadBackupHeapSizeInBytes = 2 * 1024; -const unsigned ThreadBackupHeapSizeInWords = ThreadBackupHeapSizeInBytes - / BytesPerWord; - -const unsigned ThreadHeapPoolSize = 64; - -const unsigned FixedFootprintThresholdInBytes = ThreadHeapPoolSize - * ThreadHeapSizeInBytes; - -// number of zombie threads which may accumulate before we force a GC -// to clean them up: -#ifdef SGX -# define ZOMBIE_THRESHOLD 0 -#else -# define ZOMBIE_THRESHOLD 16 -#endif -const unsigned ZombieCollectionThreshold = ZOMBIE_THRESHOLD; - -enum FieldCode { - VoidField, - ByteField, - CharField, - DoubleField, - FloatField, - IntField, - LongField, - ShortField, - BooleanField, - ObjectField -}; - -enum StackTag { - IntTag, // must be zero - ObjectTag -}; - -const int NativeLine = -2; -const int UnknownLine = -1; - -// class vmFlags: -const unsigned ReferenceFlag = 1 << 0; -const unsigned WeakReferenceFlag = 1 << 1; -const unsigned NeedInitFlag = 1 << 2; -const unsigned InitFlag = 1 << 3; -const unsigned InitErrorFlag = 1 << 4; -const unsigned PrimitiveFlag = 1 << 5; -const unsigned BootstrapFlag = 1 << 6; -const unsigned HasFinalizerFlag = 1 << 7; -const unsigned LinkFlag = 1 << 8; -const unsigned HasFinalMemberFlag = 1 << 9; -const unsigned SingletonFlag = 1 << 10; -const unsigned ContinuationFlag = 1 << 11; - -// method vmFlags: -const unsigned ClassInitFlag = 1 << 0; -const unsigned ConstructorFlag = 1 << 1; - -#ifndef JNI_VERSION_1_6 -#define JNI_VERSION_1_6 0x00010006 -#endif - -#ifndef JNI_TRUE -#define JNI_TRUE 1 -#endif - -#ifndef JNI_OK -#define JNI_OK 0 -#endif - -typedef Machine JavaVM; -typedef Thread JNIEnv; - -struct JNINativeMethod { - char* name; - char* signature; - void* function; -}; - -struct JavaVMOption { - char* optionString; - void* extraInfo; -}; - -struct JavaVMInitArgs { - jint version; - - jint nOptions; - JavaVMOption* options; - jboolean ignoreUnrecognized; -}; - -struct JavaVMVTable { - void* reserved0; - void* reserved1; - void* reserved2; - - jint(JNICALL* DestroyJavaVM)(JavaVM*); - - jint(JNICALL* AttachCurrentThread)(JavaVM*, JNIEnv**, void*); - - jint(JNICALL* DetachCurrentThread)(JavaVM*); - - jint(JNICALL* GetEnv)(JavaVM*, JNIEnv**, jint); - - jint(JNICALL* AttachCurrentThreadAsDaemon)(JavaVM*, JNIEnv**, void*); -}; - -struct JNIEnvVTable { - void* reserved0; - void* reserved1; - void* reserved2; - void* reserved3; - - jint(JNICALL* GetVersion)(JNIEnv*); - - jclass( - JNICALL* DefineClass)(JNIEnv*, const char*, jobject, const jbyte*, jsize); - - jclass(JNICALL* FindClass)(JNIEnv*, const char*); - - jmethodID(JNICALL* FromReflectedMethod)(JNIEnv*, jobject); - - jfieldID(JNICALL* FromReflectedField)(JNIEnv*, jobject); - - jobject(JNICALL* ToReflectedMethod)(JNIEnv*, jclass, jmethodID, jboolean); - - jclass(JNICALL* GetSuperclass)(JNIEnv*, jclass); - - jboolean(JNICALL* IsAssignableFrom)(JNIEnv*, jclass, jclass); - - jobject(JNICALL* ToReflectedField)(JNIEnv*, jclass, jfieldID, jboolean); - - jint(JNICALL* Throw)(JNIEnv*, jthrowable); - - jint(JNICALL* ThrowNew)(JNIEnv*, jclass, const char*); - - jthrowable(JNICALL* ExceptionOccurred)(JNIEnv*); - - void(JNICALL* ExceptionDescribe)(JNIEnv*); - - void(JNICALL* ExceptionClear)(JNIEnv*); - - void(JNICALL* FatalError)(JNIEnv*, const char*); - - jint(JNICALL* PushLocalFrame)(JNIEnv*, jint); - - jobject(JNICALL* PopLocalFrame)(JNIEnv*, jobject); - - jobject(JNICALL* NewGlobalRef)(JNIEnv*, jobject); - - void(JNICALL* DeleteGlobalRef)(JNIEnv*, jobject); - - void(JNICALL* DeleteLocalRef)(JNIEnv*, jobject); - - jboolean(JNICALL* IsSameObject)(JNIEnv*, jobject, jobject); - - jobject(JNICALL* NewLocalRef)(JNIEnv*, jobject); - - jint(JNICALL* EnsureLocalCapacity)(JNIEnv*, jint); - - jobject(JNICALL* AllocObject)(JNIEnv*, jclass); - - jobject(JNICALL* NewObject)(JNIEnv*, jclass, jmethodID, ...); - - jobject(JNICALL* NewObjectV)(JNIEnv*, jclass, jmethodID, va_list); - - jobject(JNICALL* NewObjectA)(JNIEnv*, jclass, jmethodID, const jvalue*); - - jclass(JNICALL* GetObjectClass)(JNIEnv*, jobject); - - jboolean(JNICALL* IsInstanceOf)(JNIEnv*, jobject, jclass); - - jmethodID(JNICALL* GetMethodID)(JNIEnv*, jclass, const char*, const char*); - - jobject(JNICALL* CallObjectMethod)(JNIEnv*, jobject, jmethodID, ...); - - jobject(JNICALL* CallObjectMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jobject(JNICALL* CallObjectMethodA)(JNIEnv*, - jobject, - jmethodID, - const jvalue*); - - jboolean(JNICALL* CallBooleanMethod)(JNIEnv*, jobject, jmethodID, ...); - - jboolean(JNICALL* CallBooleanMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jboolean(JNICALL* CallBooleanMethodA)(JNIEnv*, - jobject, - jmethodID, - const jvalue*); - - jbyte(JNICALL* CallByteMethod)(JNIEnv*, jobject, jmethodID, ...); - - jbyte(JNICALL* CallByteMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jbyte(JNICALL* CallByteMethodA)(JNIEnv*, jobject, jmethodID, const jvalue*); - - jchar(JNICALL* CallCharMethod)(JNIEnv*, jobject, jmethodID, ...); - - jchar(JNICALL* CallCharMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jchar(JNICALL* CallCharMethodA)(JNIEnv*, jobject, jmethodID, const jvalue*); - - jshort(JNICALL* CallShortMethod)(JNIEnv*, jobject, jmethodID, ...); - - jshort(JNICALL* CallShortMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jshort(JNICALL* CallShortMethodA)(JNIEnv*, jobject, jmethodID, const jvalue*); - - jint(JNICALL* CallIntMethod)(JNIEnv*, jobject, jmethodID, ...); - - jint(JNICALL* CallIntMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jint(JNICALL* CallIntMethodA)(JNIEnv*, jobject, jmethodID, const jvalue*); - - jlong(JNICALL* CallLongMethod)(JNIEnv*, jobject, jmethodID, ...); - - jlong(JNICALL* CallLongMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jlong(JNICALL* CallLongMethodA)(JNIEnv*, jobject, jmethodID, const jvalue*); - - jfloat(JNICALL* CallFloatMethod)(JNIEnv*, jobject, jmethodID, ...); - - jfloat(JNICALL* CallFloatMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jfloat(JNICALL* CallFloatMethodA)(JNIEnv*, jobject, jmethodID, const jvalue*); - - jdouble(JNICALL* CallDoubleMethod)(JNIEnv*, jobject, jmethodID, ...); - - jdouble(JNICALL* CallDoubleMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - jdouble(JNICALL* CallDoubleMethodA)(JNIEnv*, - jobject, - jmethodID, - const jvalue*); - - void(JNICALL* CallVoidMethod)(JNIEnv*, jobject, jmethodID, ...); - - void(JNICALL* CallVoidMethodV)(JNIEnv*, jobject, jmethodID, va_list); - - void(JNICALL* CallVoidMethodA)(JNIEnv*, jobject, jmethodID, const jvalue*); - - jobject(JNICALL* CallNonvirtualObjectMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jobject(JNICALL* CallNonvirtualObjectMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - jobject(JNICALL* CallNonvirtualObjectMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jboolean(JNICALL* CallNonvirtualBooleanMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jboolean(JNICALL* CallNonvirtualBooleanMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - jboolean(JNICALL* CallNonvirtualBooleanMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jbyte(JNICALL* CallNonvirtualByteMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jbyte(JNICALL* CallNonvirtualByteMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - jbyte(JNICALL* CallNonvirtualByteMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jchar(JNICALL* CallNonvirtualCharMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jchar(JNICALL* CallNonvirtualCharMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - jchar(JNICALL* CallNonvirtualCharMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jshort(JNICALL* CallNonvirtualShortMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jshort(JNICALL* CallNonvirtualShortMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - jshort(JNICALL* CallNonvirtualShortMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jint(JNICALL* CallNonvirtualIntMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jint(JNICALL* CallNonvirtualIntMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - jint(JNICALL* CallNonvirtualIntMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jlong(JNICALL* CallNonvirtualLongMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jlong(JNICALL* CallNonvirtualLongMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - jlong(JNICALL* CallNonvirtualLongMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jfloat(JNICALL* CallNonvirtualFloatMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jfloat(JNICALL* CallNonvirtualFloatMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - jfloat(JNICALL* CallNonvirtualFloatMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jdouble(JNICALL* CallNonvirtualDoubleMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - jdouble(JNICALL* CallNonvirtualDoubleMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - jdouble(JNICALL* CallNonvirtualDoubleMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - void(JNICALL* CallNonvirtualVoidMethod)(JNIEnv*, - jobject, - jclass, - jmethodID, - ...); - - void(JNICALL* CallNonvirtualVoidMethodV)(JNIEnv*, - jobject, - jclass, - jmethodID, - va_list); - - void(JNICALL* CallNonvirtualVoidMethodA)(JNIEnv*, - jobject, - jclass, - jmethodID, - const jvalue*); - - jfieldID(JNICALL* GetFieldID)(JNIEnv*, jclass, const char*, const char*); - - jobject(JNICALL* GetObjectField)(JNIEnv*, jobject, jfieldID); - - jboolean(JNICALL* GetBooleanField)(JNIEnv*, jobject, jfieldID); - - jbyte(JNICALL* GetByteField)(JNIEnv*, jobject, jfieldID); - - jchar(JNICALL* GetCharField)(JNIEnv*, jobject, jfieldID); - - jshort(JNICALL* GetShortField)(JNIEnv*, jobject, jfieldID); - - jint(JNICALL* GetIntField)(JNIEnv*, jobject, jfieldID); - - jlong(JNICALL* GetLongField)(JNIEnv*, jobject, jfieldID); - - jfloat(JNICALL* GetFloatField)(JNIEnv*, jobject, jfieldID); - - jdouble(JNICALL* GetDoubleField)(JNIEnv*, jobject, jfieldID); - - void(JNICALL* SetObjectField)(JNIEnv*, jobject, jfieldID, jobject); - - void(JNICALL* SetBooleanField)(JNIEnv*, jobject, jfieldID, jboolean); - - void(JNICALL* SetByteField)(JNIEnv*, jobject, jfieldID, jbyte); - - void(JNICALL* SetCharField)(JNIEnv*, jobject, jfieldID, jchar); - - void(JNICALL* SetShortField)(JNIEnv*, jobject, jfieldID, jshort); - - void(JNICALL* SetIntField)(JNIEnv*, jobject, jfieldID, jint); - - void(JNICALL* SetLongField)(JNIEnv*, jobject, jfieldID, jlong); - - void(JNICALL* SetFloatField)(JNIEnv*, jobject, jfieldID, jfloat); - - void(JNICALL* SetDoubleField)(JNIEnv*, jobject, jfieldID, jdouble); - - jmethodID(JNICALL* GetStaticMethodID)(JNIEnv*, - jclass, - const char*, - const char*); - - jobject(JNICALL* CallStaticObjectMethod)(JNIEnv*, jclass, jmethodID, ...); - - jobject(JNICALL* CallStaticObjectMethodV)(JNIEnv*, - jclass, - jmethodID, - va_list); - - jobject(JNICALL* CallStaticObjectMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jboolean(JNICALL* CallStaticBooleanMethod)(JNIEnv*, jclass, jmethodID, ...); - - jboolean(JNICALL* CallStaticBooleanMethodV)(JNIEnv*, - jclass, - jmethodID, - va_list); - - jboolean(JNICALL* CallStaticBooleanMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jbyte(JNICALL* CallStaticByteMethod)(JNIEnv*, jclass, jmethodID, ...); - - jbyte(JNICALL* CallStaticByteMethodV)(JNIEnv*, jclass, jmethodID, va_list); - - jbyte(JNICALL* CallStaticByteMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jchar(JNICALL* CallStaticCharMethod)(JNIEnv*, jclass, jmethodID, ...); - - jchar(JNICALL* CallStaticCharMethodV)(JNIEnv*, jclass, jmethodID, va_list); - - jchar(JNICALL* CallStaticCharMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jshort(JNICALL* CallStaticShortMethod)(JNIEnv*, jclass, jmethodID, ...); - - jshort(JNICALL* CallStaticShortMethodV)(JNIEnv*, jclass, jmethodID, va_list); - - jshort(JNICALL* CallStaticShortMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jint(JNICALL* CallStaticIntMethod)(JNIEnv*, jclass, jmethodID, ...); - - jint(JNICALL* CallStaticIntMethodV)(JNIEnv*, jclass, jmethodID, va_list); - - jint(JNICALL* CallStaticIntMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jlong(JNICALL* CallStaticLongMethod)(JNIEnv*, jclass, jmethodID, ...); - - jlong(JNICALL* CallStaticLongMethodV)(JNIEnv*, jclass, jmethodID, va_list); - - jlong(JNICALL* CallStaticLongMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jfloat(JNICALL* CallStaticFloatMethod)(JNIEnv*, jclass, jmethodID, ...); - - jfloat(JNICALL* CallStaticFloatMethodV)(JNIEnv*, jclass, jmethodID, va_list); - - jfloat(JNICALL* CallStaticFloatMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jdouble(JNICALL* CallStaticDoubleMethod)(JNIEnv*, jclass, jmethodID, ...); - - jdouble(JNICALL* CallStaticDoubleMethodV)(JNIEnv*, - jclass, - jmethodID, - va_list); - - jdouble(JNICALL* CallStaticDoubleMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - void(JNICALL* CallStaticVoidMethod)(JNIEnv*, jclass, jmethodID, ...); - - void(JNICALL* CallStaticVoidMethodV)(JNIEnv*, jclass, jmethodID, va_list); - - void(JNICALL* CallStaticVoidMethodA)(JNIEnv*, - jclass, - jmethodID, - const jvalue*); - - jfieldID(JNICALL* GetStaticFieldID)(JNIEnv*, - jclass, - const char*, - const char*); - - jobject(JNICALL* GetStaticObjectField)(JNIEnv*, jclass, jfieldID); - - jboolean(JNICALL* GetStaticBooleanField)(JNIEnv*, jclass, jfieldID); - - jbyte(JNICALL* GetStaticByteField)(JNIEnv*, jclass, jfieldID); - - jchar(JNICALL* GetStaticCharField)(JNIEnv*, jclass, jfieldID); - - jshort(JNICALL* GetStaticShortField)(JNIEnv*, jclass, jfieldID); - - jint(JNICALL* GetStaticIntField)(JNIEnv*, jclass, jfieldID); - - jlong(JNICALL* GetStaticLongField)(JNIEnv*, jclass, jfieldID); - - jfloat(JNICALL* GetStaticFloatField)(JNIEnv*, jclass, jfieldID); - - jdouble(JNICALL* GetStaticDoubleField)(JNIEnv*, jclass, jfieldID); - - void(JNICALL* SetStaticObjectField)(JNIEnv*, jclass, jfieldID, jobject); - - void(JNICALL* SetStaticBooleanField)(JNIEnv*, jclass, jfieldID, jboolean); - - void(JNICALL* SetStaticByteField)(JNIEnv*, jclass, jfieldID, jbyte); - - void(JNICALL* SetStaticCharField)(JNIEnv*, jclass, jfieldID, jchar); - - void(JNICALL* SetStaticShortField)(JNIEnv*, jclass, jfieldID, jshort); - - void(JNICALL* SetStaticIntField)(JNIEnv*, jclass, jfieldID, jint); - - void(JNICALL* SetStaticLongField)(JNIEnv*, jclass, jfieldID, jlong); - - void(JNICALL* SetStaticFloatField)(JNIEnv*, jclass, jfieldID, jfloat); - - void(JNICALL* SetStaticDoubleField)(JNIEnv*, jclass, jfieldID, jdouble); - - jstring(JNICALL* NewString)(JNIEnv*, const jchar*, jsize); - - jsize(JNICALL* GetStringLength)(JNIEnv*, jstring); - - const jchar*(JNICALL* GetStringChars)(JNIEnv*, jstring, jboolean*); - - void(JNICALL* ReleaseStringChars)(JNIEnv*, jstring, const jchar*); - - jstring(JNICALL* NewStringUTF)(JNIEnv*, const char*); - - jsize(JNICALL* GetStringUTFLength)(JNIEnv*, jstring); - - const char*(JNICALL* GetStringUTFChars)(JNIEnv*, jstring, jboolean*); - - void(JNICALL* ReleaseStringUTFChars)(JNIEnv*, jstring, const char*); - - jsize(JNICALL* GetArrayLength)(JNIEnv*, jarray); - - jobjectArray(JNICALL* NewObjectArray)(JNIEnv*, jsize, jclass, jobject); - - jobject(JNICALL* GetObjectArrayElement)(JNIEnv*, jobjectArray, jsize); - - void(JNICALL* SetObjectArrayElement)(JNIEnv*, jobjectArray, jsize, jobject); - - jbooleanArray(JNICALL* NewBooleanArray)(JNIEnv*, jsize); - - jbyteArray(JNICALL* NewByteArray)(JNIEnv*, jsize); - - jcharArray(JNICALL* NewCharArray)(JNIEnv*, jsize); - - jshortArray(JNICALL* NewShortArray)(JNIEnv*, jsize); - - jintArray(JNICALL* NewIntArray)(JNIEnv*, jsize); - - jlongArray(JNICALL* NewLongArray)(JNIEnv*, jsize); - - jfloatArray(JNICALL* NewFloatArray)(JNIEnv*, jsize); - - jdoubleArray(JNICALL* NewDoubleArray)(JNIEnv*, jsize); - - jboolean*(JNICALL* GetBooleanArrayElements)(JNIEnv*, - jbooleanArray, - jboolean*); - - jbyte*(JNICALL* GetByteArrayElements)(JNIEnv*, jbyteArray, jboolean*); - - jchar*(JNICALL* GetCharArrayElements)(JNIEnv*, jcharArray, jboolean*); - - jshort*(JNICALL* GetShortArrayElements)(JNIEnv*, jshortArray, jboolean*); - - jint*(JNICALL* GetIntArrayElements)(JNIEnv*, jintArray, jboolean*); - - jlong*(JNICALL* GetLongArrayElements)(JNIEnv*, jlongArray, jboolean*); - - jfloat*(JNICALL* GetFloatArrayElements)(JNIEnv*, jfloatArray, jboolean*); - - jdouble*(JNICALL* GetDoubleArrayElements)(JNIEnv*, jdoubleArray, jboolean*); - - void(JNICALL* ReleaseBooleanArrayElements)(JNIEnv*, - jbooleanArray, - jboolean*, - jint); - - void(JNICALL* ReleaseByteArrayElements)(JNIEnv*, jbyteArray, jbyte*, jint); - - void(JNICALL* ReleaseCharArrayElements)(JNIEnv*, jcharArray, jchar*, jint); - - void(JNICALL* ReleaseShortArrayElements)(JNIEnv*, jshortArray, jshort*, jint); - - void(JNICALL* ReleaseIntArrayElements)(JNIEnv*, jintArray, jint*, jint); - - void(JNICALL* ReleaseLongArrayElements)(JNIEnv*, jlongArray, jlong*, jint); - - void(JNICALL* ReleaseFloatArrayElements)(JNIEnv*, jfloatArray, jfloat*, jint); - - void(JNICALL* ReleaseDoubleArrayElements)(JNIEnv*, - jdoubleArray, - jdouble*, - jint); - - void(JNICALL* GetBooleanArrayRegion)(JNIEnv*, - jbooleanArray, - jsize, - jsize, - jboolean*); - - void(JNICALL* GetByteArrayRegion)(JNIEnv*, jbyteArray, jsize, jsize, jbyte*); - - void(JNICALL* GetCharArrayRegion)(JNIEnv*, jcharArray, jsize, jsize, jchar*); - - void(JNICALL* GetShortArrayRegion)(JNIEnv*, - jshortArray, - jsize, - jsize, - jshort*); - - void(JNICALL* GetIntArrayRegion)(JNIEnv*, jintArray, jsize, jsize, jint*); - - void(JNICALL* GetLongArrayRegion)(JNIEnv*, jlongArray, jsize, jsize, jlong*); - - void(JNICALL* GetFloatArrayRegion)(JNIEnv*, - jfloatArray, - jsize, - jsize, - jfloat*); - - void(JNICALL* GetDoubleArrayRegion)(JNIEnv*, - jdoubleArray, - jsize, - jsize, - jdouble*); - - void(JNICALL* SetBooleanArrayRegion)(JNIEnv*, - jbooleanArray, - jsize, - jsize, - const jboolean*); - - void(JNICALL* SetByteArrayRegion)(JNIEnv*, - jbyteArray, - jsize, - jsize, - const jbyte*); - - void(JNICALL* SetCharArrayRegion)(JNIEnv*, - jcharArray, - jsize, - jsize, - const jchar*); - - void(JNICALL* SetShortArrayRegion)(JNIEnv*, - jshortArray, - jsize, - jsize, - const jshort*); - - void(JNICALL* SetIntArrayRegion)(JNIEnv*, - jintArray, - jsize, - jsize, - const jint*); - - void(JNICALL* SetLongArrayRegion)(JNIEnv*, - jlongArray, - jsize, - jsize, - const jlong*); - - void(JNICALL* SetFloatArrayRegion)(JNIEnv*, - jfloatArray, - jsize, - jsize, - const jfloat*); - - void(JNICALL* SetDoubleArrayRegion)(JNIEnv*, - jdoubleArray, - jsize, - jsize, - const jdouble*); - - jint(JNICALL* RegisterNatives)(JNIEnv*, jclass, const JNINativeMethod*, jint); - - jint(JNICALL* UnregisterNatives)(JNIEnv*, jclass); - - jint(JNICALL* MonitorEnter)(JNIEnv*, jobject); - - jint(JNICALL* MonitorExit)(JNIEnv*, jobject); - - jint(JNICALL* GetJavaVM)(JNIEnv*, JavaVM**); - - void(JNICALL* GetStringRegion)(JNIEnv*, jstring, jsize, jsize, jchar*); - - void(JNICALL* GetStringUTFRegion)(JNIEnv*, jstring, jsize, jsize, char*); - - void*(JNICALL* GetPrimitiveArrayCritical)(JNIEnv*, jarray, jboolean*); - - void(JNICALL* ReleasePrimitiveArrayCritical)(JNIEnv*, jarray, void*, jint); - - const jchar*(JNICALL* GetStringCritical)(JNIEnv*, jstring, jboolean*); - - void(JNICALL* ReleaseStringCritical)(JNIEnv*, jstring, const jchar*); - - jweak(JNICALL* NewWeakGlobalRef)(JNIEnv*, jobject); - - void(JNICALL* DeleteWeakGlobalRef)(JNIEnv*, jweak); - - jboolean(JNICALL* ExceptionCheck)(JNIEnv*); - - jobject(JNICALL* NewDirectByteBuffer)(JNIEnv*, void*, jlong); - - void*(JNICALL* GetDirectBufferAddress)(JNIEnv* env, jobject); - - jlong(JNICALL* GetDirectBufferCapacity)(JNIEnv*, jobject); -}; - -inline void atomicOr(uint32_t* p, int v) -{ - for (uint32_t old = *p; not atomicCompareAndSwap32(p, old, old | v); - old = *p) { - } -} - -inline void atomicAnd(uint32_t* p, int v) -{ - for (uint32_t old = *p; not atomicCompareAndSwap32(p, old, old & v); - old = *p) { - } -} - -inline int strcmp(const int8_t* a, const int8_t* b) -{ - return ::strcmp(reinterpret_cast(a), - reinterpret_cast(b)); -} - -void noop(); - -class Reference { - public: - Reference(object target, Reference** handle, bool weak) - : target(target), next(*handle), handle(handle), count(0), weak(weak) - { - if (next) { - next->handle = &next; - } - *handle = this; - } - - object target; - Reference* next; - Reference** handle; - unsigned count; - bool weak; -}; - -class Classpath; - -class Gc { - public: - enum Type { -#include "type-enums.cpp" - }; -}; - -class GcObject { - public: - template - T* as(Thread* t); - - template - bool isa(Thread* t); - - protected: - template - T& field_at(size_t offset) - { - return *reinterpret_cast(reinterpret_cast(this) + offset); - } -}; - -class GcFinalizer; -class GcClassLoader; -class GcJreference; -class GcArray; -class GcThrowable; -class GcRoots; - -class Machine { - public: - enum AllocationType { - MovableAllocation, - FixedAllocation, - ImmortalAllocation - }; - - Machine(System* system, - Heap* heap, - Finder* bootFinder, - Finder* appFinder, - Processor* processor, - Classpath* classpath, - const char** properties, - unsigned propertyCount, - const char** arguments, - unsigned argumentCount, - unsigned stackSizeInBytes); - - ~Machine() - { - dispose(); - } - - void dispose(); - - JavaVMVTable* vtable; - System* system; - Heap::Client* heapClient; - Heap* heap; - Finder* bootFinder; - Finder* appFinder; - Processor* processor; - Classpath* classpath; - Thread* rootThread; - Thread* exclusive; - Thread* finalizeThread; - Reference* jniReferences; - char** properties; - unsigned propertyCount; - const char** arguments; - unsigned argumentCount; - unsigned threadCount; - unsigned activeCount; - unsigned liveCount; - unsigned daemonCount; - unsigned fixedFootprint; - unsigned stackSizeInBytes; - System::Local* localThread; - System::Monitor* stateLock; - System::Monitor* heapLock; - System::Monitor* classLock; - System::Monitor* referenceLock; - System::Monitor* shutdownLock; - System::Library* libraries; - FILE* errorLog; - BootImage* bootimage; - GcArray* types; - GcRoots* roots; - GcFinalizer* finalizers; - GcFinalizer* tenuredFinalizers; - GcFinalizer* finalizeQueue; - GcJreference* weakReferences; - GcJreference* tenuredWeakReferences; - bool unsafe; - bool collecting; - bool triedBuiltinOnLoad; - bool dumpedHeapOnOOM; - bool alive; - JavaVMVTable javaVMVTable; - JNIEnvVTable jniEnvVTable; - uintptr_t* heapPool[ThreadHeapPoolSize]; - unsigned heapPoolIndex; - size_t bootimageSize; -}; - -void printTrace(Thread* t, GcThrowable* exception); - -void enterActiveState(Thread* t); - -#ifdef VM_STRESS - -inline void stress(Thread* t); - -#else // not VM_STRESS - -#define stress(t) - -#endif // not VM_STRESS - -uint64_t runThread(Thread*, uintptr_t*); - -uint64_t run(Thread* t, - uint64_t (*function)(Thread*, uintptr_t*), - uintptr_t* arguments); - -void checkDaemon(Thread* t); - -GcRoots* roots(Thread* t); - -extern "C" uint64_t vmRun(uint64_t (*function)(Thread*, uintptr_t*), - uintptr_t* arguments, - void* checkpoint); - -extern "C" void vmRun_returnAddress(); - -class GcThread; -class GcThrowable; -class GcString; - -class Thread { - public: - enum State { - NoState, - ActiveState, - IdleState, - ZombieState, - JoinedState, - ExclusiveState, - ExitState - }; - - enum Flag { - UseBackupHeapFlag = 1 << 0, - WaitingFlag = 1 << 1, - TracingFlag = 1 << 2, - DaemonFlag = 1 << 3, - StressFlag = 1 << 4, - ActiveFlag = 1 << 5, - SystemFlag = 1 << 6, - JoinFlag = 1 << 7, - TryNativeFlag = 1 << 8 - }; - - class Protector { - public: - Protector(Thread* t) : t(t), next(t->protector) - { - t->protector = this; - } - - ~Protector() - { - t->protector = next; - } - - virtual void visit(Heap::Visitor* v) = 0; - - Thread* t; - Protector* next; - }; - - class SingleProtector : public Protector { - public: - SingleProtector(Thread* t, void* p) : Protector(t), p(p) - { - } - - virtual void visit(Heap::Visitor* v) - { - v->visit(p); - } - - void* p; - }; - - class Resource { - public: - Resource(Thread* t, Resource* next) : t(t), next(next) - { - t->resource = this; - } - - virtual void release() = 0; - - Thread* t; - Resource* next; - }; - - class AutoResource : public Resource { - public: - AutoResource(Thread* t) : Resource(t, t->resource) - { - } - - ~AutoResource() - { - t->resource = next; - } - - virtual void release() = 0; - }; - - class ClassInitStack : public AutoResource { - public: - ClassInitStack(Thread* t, GcClass* class_) - : AutoResource(t), - next(t->classInitStack), - class_(class_), - protector(t, &(this->class_)) - { - t->classInitStack = this; - } - - ~ClassInitStack() - { - t->classInitStack = next; - } - - virtual void release() - { - this->ClassInitStack::~ClassInitStack(); - } - - ClassInitStack* next; - GcClass* class_; - SingleProtector protector; - }; - - class LibraryLoadStack : public AutoResource { - public: - LibraryLoadStack(Thread* t, GcClassLoader* classLoader) - : AutoResource(t), - next(t->libraryLoadStack), - classLoader(classLoader), - protector(t, &(this->classLoader)) - { - t->libraryLoadStack = this; - } - - ~LibraryLoadStack() - { - t->libraryLoadStack = next; - } - - virtual void release() - { - this->LibraryLoadStack::~LibraryLoadStack(); - } - - LibraryLoadStack* next; - GcClassLoader* classLoader; - SingleProtector protector; - }; - - class Checkpoint { - public: - Checkpoint(Thread* t) - : t(t), - next(t->checkpoint), - resource(t->resource), - protector(t->protector), - noThrow(false) - { - t->checkpoint = this; - } - - ~Checkpoint() - { - t->checkpoint = next; - } - - virtual void NO_RETURN unwind() = 0; - - Thread* t; - Checkpoint* next; - Resource* resource; - Protector* protector; - bool noThrow; - }; - - class RunCheckpoint : public Checkpoint { - public: - RunCheckpoint(Thread* t) : Checkpoint(t), stack(0) - { - } - - virtual void unwind() - { - void* stack = this->stack; - this->stack = 0; - expect(t->m->system, stack); - vmJump(voidPointer(vmRun_returnAddress), 0, stack, t, 0, 0); - } - - void* stack; - }; - - class Runnable : public System::Runnable { - public: - Runnable(Thread* t) : t(t) - { - } - - virtual void attach(System::Thread* st) - { - t->systemThread = st; - } - - virtual void run(); - - virtual bool interrupted(); - - virtual void setInterrupted(bool v); - - Thread* t; - }; - - Thread(Machine* m, GcThread* javaThread, Thread* parent); - - void init(); - void exit(); - void dispose(); - - void setFlag(Flag flag) { - atomicOr(&flags, flag); - } - - void clearFlag(Flag flag) { - atomicAnd(&flags, ~flag); - } - - unsigned getFlags() { - return flags; - } - - bool isBlacklisting(); - - JNIEnvVTable* vtable; - Machine* m; - Thread* parent; - Thread* peer; - Thread* child; - Thread* waitNext; - State state; - unsigned criticalLevel; - System::Thread* systemThread; - System::Monitor* lock; - GcThread* javaThread; - GcThrowable* exception; - unsigned heapIndex; - unsigned heapOffset; - Protector* protector; - ClassInitStack* classInitStack; - LibraryLoadStack* libraryLoadStack; - Resource* resource; - Checkpoint* checkpoint; - Runnable runnable; - uintptr_t* defaultHeap; - uintptr_t* heap; - uintptr_t backupHeap[ThreadBackupHeapSizeInWords]; - unsigned backupHeapIndex; - - private: - unsigned flags; -}; - -class GcJfield; - -class Classpath { - public: - virtual GcJclass* makeJclass(Thread* t, GcClass* class_) = 0; - - virtual GcString* makeString(Thread* t, - object array, - int32_t offset, - int32_t length) = 0; - - virtual GcThread* makeThread(Thread* t, Thread* parent) = 0; - - virtual object makeJMethod(Thread* t, GcMethod* vmMethod) = 0; - - virtual GcMethod* getVMMethod(Thread* t, object jmethod) = 0; - - virtual object makeJField(Thread* t, GcField* vmField) = 0; - - virtual GcField* getVMField(Thread* t, GcJfield* jfield) = 0; - - virtual void clearInterrupted(Thread* t) = 0; - - virtual void runThread(Thread* t) = 0; - - virtual void resolveNative(Thread* t, GcMethod* method) = 0; - - virtual void interceptMethods(Thread* t) = 0; - - virtual void preBoot(Thread* t) = 0; - - virtual bool mayInitClasses() = 0; - - virtual void boot(Thread* t) = 0; - - virtual const char* bootClasspath() = 0; - - virtual object makeDirectByteBuffer(Thread* t, void* p, jlong capacity) = 0; - - virtual void* getDirectBufferAddress(Thread* t, object buffer) = 0; - - virtual int64_t getDirectBufferCapacity(Thread* t, object buffer) = 0; - - virtual bool canTailCall(Thread* t, - GcMethod* caller, - GcByteArray* calleeClassName, - GcByteArray* calleeMethodName, - GcByteArray* calleeMethodSpec) = 0; - - virtual GcClassLoader* libraryClassLoader(Thread* t, GcMethod* caller) = 0; - - virtual void shutDown(Thread* t) = 0; - - virtual void dispose() = 0; -}; - -#ifdef _MSC_VER - -template -class ThreadRuntimeArray : public Thread::AutoResource { - public: - ThreadRuntimeArray(Thread* t, unsigned size) - : AutoResource(t), - body(static_cast(t->m->heap->allocate(size * sizeof(T)))), - size(size) - { - } - - ~ThreadRuntimeArray() - { - t->m->heap->free(body, size * sizeof(T)); - } - - virtual void release() - { - ThreadRuntimeArray::~ThreadRuntimeArray(); - } - - T* body; - unsigned size; -}; - -#define THREAD_RUNTIME_ARRAY(thread, type, name, size) \ - ThreadRuntimeArray name(thread, size); - -#else // not _MSC_VER - -#define THREAD_RUNTIME_ARRAY(thread, type, name, size) type name##_body[size]; - -#endif // not _MSC_VER - -Classpath* makeClasspath(System* system, - Allocator* allocator, - const char* javaHome, - const char* embedPrefix); - -typedef uint64_t(JNICALL* FastNativeFunction)(Thread*, GcMethod*, uintptr_t*); -typedef void(JNICALL* FastVoidNativeFunction)(Thread*, GcMethod*, uintptr_t*); - -inline GcClass* objectClass(Thread*, object o) -{ - return reinterpret_cast( - maskAlignedPointer(fieldAtOffset(o, 0))); -} - -inline unsigned stackSizeInWords(Thread* t) -{ - return t->m->stackSizeInBytes / BytesPerWord; -} - -void enter(Thread* t, Thread::State state); - -inline void enterActiveState(Thread* t) -{ - enter(t, Thread::ActiveState); -} - -class StateResource : public Thread::AutoResource { - public: - StateResource(Thread* t, Thread::State state) - : AutoResource(t), oldState(t->state) - { - enter(t, state); - } - - ~StateResource() - { - enter(t, oldState); - } - - virtual void release() - { - this->StateResource::~StateResource(); - } - - private: - Thread::State oldState; -}; - -inline void dispose(Thread* t, Reference* r) -{ - *(r->handle) = r->next; - if (r->next) { - r->next->handle = r->handle; - } - t->m->heap->free(r, sizeof(*r)); -} - -inline void acquire(Thread*, Reference* r) -{ - ++r->count; -} - -inline void release(Thread* t, Reference* r) -{ - if ((--r->count) == 0) { - dispose(t, r); - } -} - -void collect(Thread* t, Heap::CollectionType type, int pendingAllocation = 0); - -void shutDown(Thread* t); - -#ifdef VM_STRESS - -inline void stress(Thread* t) -{ - if ((not t->m->unsafe) - and (t->getFlags() & (Thread::StressFlag | Thread::TracingFlag)) == 0 - and t->state != Thread::NoState and t->state != Thread::IdleState) { - t->setFlag(Thread::StressFlag); - -#ifdef VM_STRESS_MAJOR - collect(t, Heap::MajorCollection); -#else // not VM_STRESS_MAJOR - collect(t, Heap::MinorCollection); -#endif // not VM_STRESS_MAJOR - - t->clearFlag(Thread::StressFlag); - } -} - -#endif // not VM_STRESS - -inline void acquire(Thread* t, System::Monitor* m) -{ - if (not m->tryAcquire(t->systemThread)) { - ENTER(t, Thread::IdleState); - m->acquire(t->systemThread); - } - - stress(t); -} - -inline void release(Thread* t, System::Monitor* m) -{ - m->release(t->systemThread); -} - -class MonitorResource : public Thread::AutoResource { - public: - MonitorResource(Thread* t, System::Monitor* m) : AutoResource(t), m(m) - { - acquire(t, m); - } - - ~MonitorResource() - { - vm::release(t, m); - } - - virtual void release() - { - this->MonitorResource::~MonitorResource(); - } - - private: - System::Monitor* m; -}; - -class RawMonitorResource : public Thread::Resource { - public: - RawMonitorResource(Thread* t, System::Monitor* m) - : Resource(t, t->resource), m(m) - { - m->acquire(t->systemThread); - } - - ~RawMonitorResource() - { - t->resource = next; - vm::release(t, m); - } - - virtual void release() - { - this->RawMonitorResource::~RawMonitorResource(); - } - - private: - System::Monitor* m; -}; - -inline Aborter* getAborter(Thread* t) -{ - return t->m->system; -} - -inline bool ensure(Thread* t, unsigned sizeInBytes) -{ - if (t->heapIndex + ceilingDivide(sizeInBytes, BytesPerWord) - > ThreadHeapSizeInWords) { - if (sizeInBytes <= ThreadBackupHeapSizeInBytes) { - expect(t, (t->getFlags() & Thread::UseBackupHeapFlag) == 0); - - t->setFlag(Thread::UseBackupHeapFlag); - - return true; - } else { - return false; - } - } else { - return true; - } -} - -object allocate2(Thread* t, unsigned sizeInBytes, bool objectMask); - -object allocate3(Thread* t, - Alloc* allocator, - Machine::AllocationType type, - unsigned sizeInBytes, - bool objectMask); - -inline object allocateSmall(Thread* t, unsigned sizeInBytes) -{ - assertT(t, - t->heapIndex + ceilingDivide(sizeInBytes, BytesPerWord) - <= ThreadHeapSizeInWords); - - object o = reinterpret_cast(t->heap + t->heapIndex); - t->heapIndex += ceilingDivide(sizeInBytes, BytesPerWord); - return o; -} - -inline object allocate(Thread* t, unsigned sizeInBytes, bool objectMask) -{ - stress(t); - - if (UNLIKELY(t->heapIndex + ceilingDivide(sizeInBytes, BytesPerWord) - > ThreadHeapSizeInWords or t->m->exclusive)) { - return allocate2(t, sizeInBytes, objectMask); - } else { - assertT(t, t->criticalLevel == 0); - return allocateSmall(t, sizeInBytes); - } -} - -inline void mark(Thread* t, object o, unsigned offset, unsigned count) -{ - t->m->heap->mark(o, offset / BytesPerWord, count); -} - -inline void mark(Thread* t, object o, unsigned offset) -{ - t->m->heap->mark(o, offset / BytesPerWord, 1); -} - -inline void setField(Thread* t, object target, unsigned offset, object value) -{ - fieldAtOffset(target, offset) = value; - mark(t, target, offset); -} - -inline void setObject(Thread* t, - GcObject* target, - unsigned offset, - GcObject* value) -{ - setField(t, target, offset, value); -} - -inline void setObjectClass(Thread*, object o, GcClass* c) -{ - fieldAtOffset(o, 0) = reinterpret_cast( - reinterpret_cast(c) - | (reinterpret_cast(fieldAtOffset(o, 0)) - & (~PointerMask))); -} - -inline const char* findProperty(Machine* m, const char* name) -{ - for (unsigned i = 0; i < m->propertyCount; ++i) { - const char* p = m->properties[i]; - const char* n = name; - while (*p and *p != '=' and *n and *p == *n) { - ++p; - ++n; - } - if (*p == '=' and *n == 0) { - return p + 1; - } - } - return 0; -} - -inline const char* findProperty(Thread* t, const char* name) -{ - return findProperty(t->m, name); -} - -object arrayBodyUnsafe(Thread*, GcArray*, unsigned); - -bool instanceOf(Thread* t, GcClass* class_, object o); - -template -T* GcObject::as(Thread* t UNUSED) -{ - assertT(t, - t->m->unsafe || instanceOf(t, - reinterpret_cast(arrayBodyUnsafe( - t, t->m->types, T::Type)), - this)); - return static_cast(this); -} - -template -bool GcObject::isa(Thread* t) -{ - return instanceOf( - t, - reinterpret_cast(arrayBodyUnsafe(t, t->m->types, T::Type)), - this); -} - -template -T* cast(Thread* t UNUSED, object o) -{ - if (o == 0) { - return 0; - } - assertT(t, - t->m->unsafe || instanceOf(t, - reinterpret_cast(arrayBodyUnsafe( - t, t->m->types, T::Type)), - o)); - return reinterpret_cast(o); -} - -#include "type-declarations.cpp" - -inline object arrayBodyUnsafe(Thread*, GcArray* a, unsigned index) -{ - return a->body()[index]; -} - -inline void Thread::Runnable::run() -{ - enterActiveState(t); - - vm::run(t, runThread, 0); - - if (t->exception and t->exception != roots(t)->shutdownInProgress()) { - printTrace(t, t->exception); - } - - t->exit(); -} - -inline bool Thread::Runnable::interrupted() -{ - return t->javaThread and t->javaThread->interrupted(); -} - -inline void Thread::Runnable::setInterrupted(bool v) -{ - t->javaThread->interrupted() = v; -} - -inline uint64_t runRaw(Thread* t, - uint64_t (*function)(Thread*, uintptr_t*), - uintptr_t* arguments) -{ - Thread::RunCheckpoint checkpoint(t); - return vmRun(function, arguments, &checkpoint); -} - -inline uint64_t run(Thread* t, - uint64_t (*function)(Thread*, uintptr_t*), - uintptr_t* arguments) -{ - ENTER(t, Thread::ActiveState); - return runRaw(t, function, arguments); -} - -inline void runJavaThread(Thread* t) -{ - t->m->classpath->runThread(t); -} - -void runFinalizeThread(Thread* t); - -inline uint64_t runThread(Thread* t, uintptr_t*) -{ - t->m->localThread->set(t); - - checkDaemon(t); - - if (t == t->m->finalizeThread) { - runFinalizeThread(t); - } else if (t->javaThread) { - runJavaThread(t); - } - - return 1; -} - -inline bool startThread(Thread* t, Thread* p) -{ - p->setFlag(Thread::JoinFlag); - return t->m->system->success(t->m->system->start(&(p->runnable))); -} - -inline void addThread(Thread* t, Thread* p) -{ - ACQUIRE_RAW(t, t->m->stateLock); - - assertT(t, p->state == Thread::NoState); - expect(t, - t->state == Thread::ActiveState || t->state == Thread::ExclusiveState - || t->state == Thread::NoState); - - p->state = Thread::IdleState; - ++t->m->threadCount; - ++t->m->liveCount; - - p->peer = p->parent->child; - p->parent->child = p; - - if (p->javaThread) { - p->javaThread->peer() = reinterpret_cast(p); - } -} - -inline void removeThread(Thread* t, Thread* p) -{ - ACQUIRE_RAW(t, t->m->stateLock); - - assertT(t, p->state == Thread::IdleState); - - --t->m->liveCount; - --t->m->threadCount; - - t->m->stateLock->notifyAll(t->systemThread); - - p->parent->child = p->peer; - - if (p->javaThread) { - p->javaThread->peer() = 0; - } - - p->dispose(); -} - -inline Thread* startThread(Thread* t, GcThread* javaThread) -{ - { - PROTECT(t, javaThread); - - stress(t); - - ACQUIRE_RAW(t, t->m->stateLock); - - if (t->m->threadCount > t->m->liveCount + ZombieCollectionThreshold) { - collect(t, Heap::MinorCollection); - } - } - - Thread* p = t->m->processor->makeThread(t->m, javaThread, t); - - addThread(t, p); - - if (startThread(t, p)) { - return p; - } else { - removeThread(t, p); - return 0; - } -} - -inline void registerDaemon(Thread* t) -{ - ACQUIRE_RAW(t, t->m->stateLock); - - t->setFlag(Thread::DaemonFlag); - - ++t->m->daemonCount; - - t->m->stateLock->notifyAll(t->systemThread); -} - -inline void checkDaemon(Thread* t) -{ - if (t->javaThread->daemon()) { - registerDaemon(t); - } -} - -inline uint64_t initAttachedThread(Thread* t, uintptr_t* arguments) -{ - bool daemon = arguments[0]; - - t->javaThread = t->m->classpath->makeThread(t, t->m->rootThread); - - t->javaThread->peer() = reinterpret_cast(t); - - if (daemon) { - t->javaThread->daemon() = true; - - registerDaemon(t); - } - - t->m->localThread->set(t); - - return 1; -} - -inline Thread* attachThread(Machine* m, bool daemon) -{ - Thread* t = m->processor->makeThread(m, 0, m->rootThread); - m->system->attach(&(t->runnable)); - - addThread(t, t); - - enter(t, Thread::ActiveState); - - uintptr_t arguments[] = {daemon}; - - if (run(t, initAttachedThread, arguments)) { - enter(t, Thread::IdleState); - return t; - } else { - t->exit(); - return 0; - } -} - -inline GcRoots* roots(Thread* t) -{ - return t->m->roots; -} - -inline GcClass* type(Thread* t, Gc::Type type) -{ - return cast(t, t->m->types->body()[type]); -} - -inline void setType(Thread* t, Gc::Type type, GcClass* value) -{ - t->m->types->setBodyElement(t, type, value); -} - -inline bool objectFixed(Thread*, object o) -{ - return (alias(o, 0) & (~PointerMask)) == FixedMark; -} - -inline bool objectExtended(Thread*, object o) -{ - return (alias(o, 0) & (~PointerMask)) == ExtendedMark; -} - -inline bool hashTaken(Thread*, object o) -{ - return (alias(o, 0) & (~PointerMask)) == HashTakenMark; -} - -inline unsigned baseSize(Thread* t UNUSED, object o, GcClass* class_) -{ - assertT(t, class_->fixedSize() >= BytesPerWord); - - unsigned size = ceilingDivide(class_->fixedSize(), BytesPerWord); - if (class_->arrayElementSize() > 0) { - size += ceilingDivide(class_->arrayElementSize() - * fieldAtOffset( - o, class_->fixedSize() - BytesPerWord), - BytesPerWord); - } - return size; -} - -object makeTrace(Thread* t, Processor::StackWalker* walker); - -object makeTrace(Thread* t, Thread* target); - -inline object makeTrace(Thread* t) -{ - return makeTrace(t, t); -} - -inline object makeNew(Thread* t, GcClass* class_) -{ - assertT(t, t->state == Thread::NoState or t->state == Thread::ActiveState); - - PROTECT(t, class_); - unsigned sizeInBytes = pad(class_->fixedSize()); - assertT(t, sizeInBytes); - object instance = allocate(t, sizeInBytes, class_->objectMask()); - setObjectClass(t, instance, class_); - - return instance; -} - -object makeNewGeneral(Thread* t, GcClass* class_); - -inline object make(Thread* t, GcClass* class_) -{ - if (UNLIKELY(class_->vmFlags() & (WeakReferenceFlag | HasFinalizerFlag))) { - return makeNewGeneral(t, class_); - } else { - return makeNew(t, class_); - } -} - -GcByteArray* makeByteArrayV(Thread* t, const char* format, va_list a, int size); - -GcByteArray* makeByteArray(Thread* t, const char* format, ...); - -GcString* makeString(Thread* t, const char* format, ...); - -#ifndef HAVE_StringOffset - -inline uint32_t GcString::length(Thread* t) -{ - return cast(t, this->data())->length(); -} - -inline uint32_t GcString::offset(Thread*) -{ - return 0; -} - -#ifndef HAVE_StringHash32 - -inline GcString* makeString(Thread* t, object data, int32_t hash, int32_t) -{ - return makeString(t, data, hash); -} - -#endif // not HAVE_StringHash32 - -inline GcString* makeString(Thread* t, - object odata, - unsigned offset, - unsigned length, - unsigned) -{ - GcCharArray* data = cast(t, odata); - if (offset == 0 and length == data->length()) { - return makeString(t, reinterpret_cast(data), 0, 0); - } else { - PROTECT(t, data); - - GcCharArray* array = makeCharArray(t, length); - - memcpy(array->body().begin(), &data->body()[offset], length * 2); - - return makeString(t, reinterpret_cast(array), 0, 0); - } -} - -#endif // not HAVE_StringOffset - -int stringUTFLength(Thread* t, - GcString* string, - unsigned start, - unsigned length); - -inline int stringUTFLength(Thread* t, GcString* string) -{ - return stringUTFLength(t, string, 0, string->length(t)); -} - -void stringChars(Thread* t, - GcString* string, - unsigned start, - unsigned length, - char* chars); - -inline void stringChars(Thread* t, GcString* string, char* chars) -{ - stringChars(t, string, 0, string->length(t), chars); -} - -void stringChars(Thread* t, - GcString* string, - unsigned start, - unsigned length, - uint16_t* chars); - -inline void stringChars(Thread* t, GcString* string, uint16_t* chars) -{ - stringChars(t, string, 0, string->length(t), chars); -} - -void stringUTFChars(Thread* t, - GcString* string, - unsigned start, - unsigned length, - char* chars, - unsigned charsLength); - -inline void stringUTFChars(Thread* t, - GcString* string, - char* chars, - unsigned charsLength) -{ - stringUTFChars(t, string, 0, string->length(t), chars, charsLength); -} - -bool isAssignableFrom(Thread* t, GcClass* a, GcClass* b); - -GcMethod* classInitializer(Thread* t, GcClass* class_); - -object frameMethod(Thread* t, int frame); - -inline uintptr_t& extendedWord(Thread* t UNUSED, object o, unsigned baseSize) -{ - assertT(t, objectExtended(t, o)); - return fieldAtOffset(o, baseSize * BytesPerWord); -} - -inline unsigned extendedSize(Thread* t, object o, unsigned baseSize) -{ - return baseSize + objectExtended(t, o); -} - -inline void markHashTaken(Thread* t, object o) -{ - assertT(t, not objectExtended(t, o)); - assertT(t, not objectFixed(t, o)); - - ACQUIRE_RAW(t, t->m->heapLock); - - alias(o, 0) |= HashTakenMark; - t->m->heap->pad(o); -} - -inline uint32_t takeHash(Thread*, object o) -{ - // some broken code implicitly relies on System.identityHashCode - // always returning a non-negative number (e.g. old versions of - // com/sun/xml/bind/v2/util/CollisionCheckStack.hash), hence the "& - // 0x7FFFFFFF": - return (reinterpret_cast(o) / BytesPerWord) & 0x7FFFFFFF; -} - -inline uint32_t objectHash(Thread* t, object o) -{ - if (objectExtended(t, o)) { - return extendedWord(t, o, baseSize(t, o, objectClass(t, o))); - } else { - if (not objectFixed(t, o)) { - markHashTaken(t, o); - } - return takeHash(t, o); - } -} - -inline bool objectEqual(Thread*, object a, object b) -{ - return a == b; -} - -inline uint32_t byteArrayHash(Thread* t UNUSED, object ao) -{ - GcByteArray* a = cast(t, ao); - return hash(a->body()); -} - -inline uint32_t charArrayHash(Thread* t UNUSED, object ao) -{ - GcByteArray* a = cast(t, ao); - return hash(a->body()); -} - -inline bool byteArrayEqual(Thread* t UNUSED, object ao, object bo) -{ - GcByteArray* a = cast(t, ao); - GcByteArray* b = cast(t, bo); - return a == b - or ((a->length() == b->length()) - and memcmp(a->body().begin(), b->body().begin(), a->length()) - == 0); -} - -inline uint32_t stringHash(Thread* t, object so) -{ - GcString* s = cast(t, so); - if (s->hashCode() == 0 and s->length(t)) { - if (objectClass(t, s->data()) == type(t, GcByteArray::Type)) { - s->hashCode() = hash(cast(t, s->data())->body().subslice( - s->offset(t), s->length(t))); - } else { - s->hashCode() = hash(cast(t, s->data())->body().subslice( - s->offset(t), s->length(t))); - } - } - return s->hashCode(); -} - -inline uint16_t stringCharAt(Thread* t, GcString* s, int i) -{ - if (objectClass(t, s->data()) == type(t, GcByteArray::Type)) { - return cast(t, s->data())->body()[s->offset(t) + i]; - } else { - return cast(t, s->data())->body()[s->offset(t) + i]; - } -} - -inline bool stringEqual(Thread* t, object ao, object bo) -{ - GcString* a = cast(t, ao); - GcString* b = cast(t, bo); - if (a == b) { - return true; - } else if (a->length(t) == b->length(t)) { - for (unsigned i = 0; i < a->length(t); ++i) { - if (stringCharAt(t, a, i) != stringCharAt(t, b, i)) { - return false; - } - } - return true; - } else { - return false; - } -} - -inline uint32_t methodHash(Thread* t, object mo) -{ - GcMethod* method = cast(t, mo); - return byteArrayHash(t, method->name()) ^ byteArrayHash(t, method->spec()); -} - -inline bool methodEqual(Thread* t, object ao, object bo) -{ - GcMethod* a = cast(t, ao); - GcMethod* b = cast(t, bo); - return a == b or (byteArrayEqual(t, a->name(), b->name()) - and byteArrayEqual(t, a->spec(), b->spec())); -} - -class MethodSpecIterator { - public: - MethodSpecIterator(Thread* t, const char* s) : t(t), s(s + 1) - { - } - - const char* next() - { - assertT(t, *s != ')'); - - const char* p = s; - - switch (*s) { - case 'L': - while (*s and *s != ';') - ++s; - ++s; - break; - - case '[': - while (*s == '[') - ++s; - switch (*s) { - case 'L': - while (*s and *s != ';') - ++s; - ++s; - break; - - default: - ++s; - break; - } - break; - - default: - ++s; - break; - } - - return p; - } - - bool hasNext() - { - return *s != ')'; - } - - const char* returnSpec() - { - assertT(t, *s == ')'); - return s + 1; - } - - Thread* t; - const char* s; -}; - -unsigned fieldCode(Thread* t, unsigned javaCode); - -unsigned fieldType(Thread* t, unsigned code); - -unsigned primitiveSize(Thread* t, unsigned code); - -inline unsigned fieldSize(Thread* t, unsigned code) -{ - if (code == ObjectField) { - return BytesPerWord; - } else { - return primitiveSize(t, code); - } -} - -inline unsigned fieldSize(Thread* t, GcField* field) -{ - return fieldSize(t, field->code()); -} - -inline void scanMethodSpec(Thread* t, - const char* s, - bool static_, - unsigned* parameterCount, - unsigned* parameterFootprint, - unsigned* returnCode) -{ - unsigned count = 0; - unsigned footprint = 0; - MethodSpecIterator it(t, s); - while (it.hasNext()) { - ++count; - switch (*it.next()) { - case 'J': - case 'D': - footprint += 2; - break; - - default: - ++footprint; - break; - } - } - - if (not static_) { - ++footprint; - } - - *parameterCount = count; - *parameterFootprint = footprint; - *returnCode = fieldCode(t, *it.returnSpec()); -} - -GcClass* findLoadedClass(Thread* t, GcClassLoader* loader, GcByteArray* spec); - -GcJclass* getDeclaringClass(Thread* t, GcClass* c); - -GcCallSite* resolveDynamic(Thread* t, GcInvocation* invocation); - -inline bool emptyMethod(Thread* t UNUSED, GcMethod* method) -{ - return ((method->flags() & ACC_NATIVE) == 0) - and (method->code()->length() == 1) - and (method->code()->body()[0] == return_); -} - -object parseUtf8(Thread* t, const char* data, unsigned length); - -object parseUtf8(Thread* t, GcByteArray* array); - -GcClass* parseClass(Thread* t, - GcClassLoader* loader, - const uint8_t* data, - unsigned length, - Gc::Type throwType = GcNoClassDefFoundError::Type); - -GcClass* resolveClass(Thread* t, - GcClassLoader* loader, - GcByteArray* name, - bool throw_ = true, - Gc::Type throwType = GcNoClassDefFoundError::Type); - -inline GcClass* resolveClass(Thread* t, - GcClassLoader* loader, - const char* name, - bool throw_ = true, - Gc::Type throwType = GcNoClassDefFoundError::Type) -{ - PROTECT(t, loader); - GcByteArray* n = makeByteArray(t, "%s", name); - return resolveClass(t, loader, n, throw_, throwType); -} - -GcClass* resolveSystemClass(Thread* t, - GcClassLoader* loader, - GcByteArray* name, - bool throw_ = true, - Gc::Type throwType = GcNoClassDefFoundError::Type); - -inline GcClass* resolveSystemClass(Thread* t, - GcClassLoader* loader, - const char* name) -{ - return resolveSystemClass(t, loader, makeByteArray(t, "%s", name)); -} - -void linkClass(Thread* t, GcClassLoader* loader, GcClass* class_); - -GcMethod* resolveMethod(Thread* t, - GcClass* class_, - const char* methodName, - const char* methodSpec); - -inline GcMethod* resolveMethod(Thread* t, - GcClassLoader* loader, - const char* className, - const char* methodName, - const char* methodSpec) -{ - return resolveMethod( - t, resolveClass(t, loader, className), methodName, methodSpec); -} - -GcField* resolveField(Thread* t, - GcClass* class_, - const char* fieldName, - const char* fieldSpec); - -inline GcField* resolveField(Thread* t, - GcClassLoader* loader, - const char* className, - const char* fieldName, - const char* fieldSpec) -{ - return resolveField( - t, resolveClass(t, loader, className), fieldName, fieldSpec); -} - -bool classNeedsInit(Thread* t, GcClass* c); - -bool preInitClass(Thread* t, GcClass* c); - -void postInitClass(Thread* t, GcClass* c); - -void initClass(Thread* t, GcClass* c); - -GcClass* resolveObjectArrayClass(Thread* t, - GcClassLoader* loader, - GcClass* elementClass); - -object makeObjectArray(Thread* t, GcClass* elementClass, unsigned count); - -inline object makeObjectArray(Thread* t, unsigned count) -{ - return makeObjectArray(t, type(t, GcJobject::Type), count); -} - -object findFieldInClass(Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec); - -inline GcField* findFieldInClass2(Thread* t, - GcClass* class_, - const char* name, - const char* spec) -{ - PROTECT(t, class_); - GcByteArray* n = makeByteArray(t, "%s", name); - PROTECT(t, n); - GcByteArray* s = makeByteArray(t, "%s", spec); - return cast(t, findFieldInClass(t, class_, n, s)); -} - -object findMethodInClass(Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec); - -inline GcThrowable* makeThrowable(Thread* t, - Gc::Type type, - GcString* message = 0, - object trace = 0, - GcThrowable* cause = 0) -{ - PROTECT(t, message); - PROTECT(t, trace); - PROTECT(t, cause); - - if (trace == 0) { - trace = makeTrace(t); - } - - GcThrowable* result = cast(t, make(t, vm::type(t, type))); - - result->setMessage(t, message); - result->setTrace(t, trace); - result->setCause(t, cause); - - return result; -} - -inline GcThrowable* makeThrowableV(Thread* t, - Gc::Type type, - const char* format, - va_list a, - int size) -{ - GcByteArray* s = makeByteArrayV(t, format, a, size); - - if (s) { - GcString* message = t->m->classpath->makeString(t, s, 0, s->length() - 1); - - return makeThrowable(t, type, message); - } else { - return 0; - } -} - -inline GcThrowable* makeThrowable(Thread* t, - Gc::Type type, - const char* format, - ...) -{ - int size = 256; - while (true) { - va_list a; - va_start(a, format); - GcThrowable* r = makeThrowableV(t, type, format, a, size); - va_end(a); - - if (r) { - return r; - } else { - size *= 2; - } - } -} - -void popResources(Thread* t); - -} // namespace vm - -namespace vm { - -void dumpHeap(Thread* t, FILE* out); - -inline void NO_RETURN throw_(Thread* t, GcThrowable* e) -{ - assertT(t, t->exception == 0); - assertT(t, e); - - expect(t, not t->checkpoint->noThrow); - - t->exception = e; - - if (objectClass(t, e) == type(t, GcOutOfMemoryError::Type)) { - if (not t->m->dumpedHeapOnOOM) { - t->m->dumpedHeapOnOOM = true; - const char* path = findProperty(t, "avian.heap.dump"); - if (path) { - FILE* out = vm::fopen(path, "wb"); - if (out) { - dumpHeap(t, out); - fclose(out); - } - } - } - - if (AbortOnOutOfMemoryError) { - fprintf(stderr, "OutOfMemoryError\n"); - vmPrintTrace(t); - abort(); - } - } - - // printTrace(t, e); - - popResources(t); - - t->checkpoint->unwind(); - - abort(t); -} - -inline void NO_RETURN throwNew(Thread* t, - Gc::Type type, - GcString* message = 0, - object trace = 0, - GcThrowable* cause = 0) -{ - throw_(t, makeThrowable(t, type, message, trace, cause)); -} - -inline void NO_RETURN - throwNew(Thread* t, Gc::Type type, const char* format, ...) -{ - int size = 256; - while (true) { - va_list a; - va_start(a, format); - GcThrowable* r = makeThrowableV(t, type, format, a, size); - va_end(a); - - if (r) { - throw_(t, r); - } else { - size *= 2; - } - } -} - -object findInHierarchyOrNull( - Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec, - object (*find)(Thread*, GcClass*, GcByteArray*, GcByteArray*)); - -inline object findInHierarchy( - Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec, - object (*find)(Thread*, GcClass*, GcByteArray*, GcByteArray*), - Gc::Type errorType, - bool throw_ = true) -{ - object o = findInHierarchyOrNull(t, class_, name, spec, find); - - if (throw_ and o == 0) { - throwNew(t, - errorType, - "%s %s not found in %s", - name->body().begin(), - spec->body().begin(), - class_->name()->body().begin()); - } - - return o; -} - -inline GcMethod* findMethod(Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec) -{ - return cast( - t, - findInHierarchy( - t, class_, name, spec, findMethodInClass, GcNoSuchMethodError::Type)); -} - -inline GcMethod* findMethodOrNull(Thread* t, - GcClass* class_, - const char* name, - const char* spec) -{ - PROTECT(t, class_); - GcByteArray* n = makeByteArray(t, "%s", name); - PROTECT(t, n); - GcByteArray* s = makeByteArray(t, "%s", spec); - return cast( - t, findInHierarchyOrNull(t, class_, n, s, findMethodInClass)); -} - -inline GcMethod* findVirtualMethod(Thread* t, GcMethod* method, GcClass* class_) -{ - return cast( - t, cast(t, class_->virtualTable())->body()[method->offset()]); -} - -inline GcMethod* findInterfaceMethod(Thread* t, - GcMethod* method, - GcClass* class_) -{ - if (UNLIKELY(class_->vmFlags() & BootstrapFlag)) { - PROTECT(t, method); - PROTECT(t, class_); - - resolveSystemClass(t, roots(t)->bootLoader(), class_->name()); - } - - GcClass* interface = method->class_(); - GcArray* itable = cast(t, class_->interfaceTable()); - for (unsigned i = 0; i < itable->length(); i += 2) { - if (itable->body()[i] == interface) { - return cast( - t, cast(t, itable->body()[i + 1])->body()[method->offset()]); - } - } - abort(t); -} - -inline unsigned objectArrayLength(Thread* t UNUSED, object array) -{ - assertT(t, objectClass(t, array)->fixedSize() == BytesPerWord * 2); - assertT(t, objectClass(t, array)->arrayElementSize() == BytesPerWord); - return fieldAtOffset(array, BytesPerWord); -} - -inline object& objectArrayBody(Thread* t UNUSED, object array, unsigned index) -{ - assertT(t, objectClass(t, array)->fixedSize() == BytesPerWord * 2); - assertT(t, objectClass(t, array)->arrayElementSize() == BytesPerWord); - assertT( - t, - objectClass(t, array)->objectMask() - == cast(t, t->m->types->body()[GcArray::Type])->objectMask()); - return fieldAtOffset(array, ArrayBody + (index * BytesPerWord)); -} - -unsigned parameterFootprint(Thread* t, const char* s, bool static_); - -void addFinalizer(Thread* t, object target, void (*finalize)(Thread*, object)); - -inline bool acquireSystem(Thread* t, Thread* target) -{ - ACQUIRE_RAW(t, t->m->stateLock); - - if (t->state != Thread::JoinedState) { - target->setFlag(Thread::SystemFlag); - return true; - } else { - return false; - } -} - -inline void releaseSystem(Thread* t, Thread* target) -{ - ACQUIRE_RAW(t, t->m->stateLock); - - assertT(t, t->state != Thread::JoinedState); - - target->clearFlag(Thread::SystemFlag); -} - -inline bool atomicCompareAndSwapObject(Thread* t, - object target, - unsigned offset, - object old, - object new_) -{ - if (atomicCompareAndSwap(&fieldAtOffset(target, offset), - reinterpret_cast(old), - reinterpret_cast(new_))) { - mark(t, target, offset); - return true; - } else { - return false; - } -} - -// The following two methods (monitorAtomicAppendAcquire and -// monitorAtomicPollAcquire) use the Michael and Scott Non-Blocking -// Queue Algorithm: http://www.cs.rochester.edu/u/michael/PODC96.html - -inline void monitorAtomicAppendAcquire(Thread* t, - GcMonitor* monitor, - GcMonitorNode* node) -{ - if (node == 0) { - PROTECT(t, monitor); - - node = makeMonitorNode(t, t, 0); - } - - while (true) { - GcMonitorNode* tail = cast(t, monitor->acquireTail()); - - loadMemoryBarrier(); - - object next = tail->next(); - - loadMemoryBarrier(); - - if (tail == cast(t, monitor->acquireTail())) { - if (next) { - atomicCompareAndSwapObject(t, monitor, MonitorAcquireTail, tail, next); - } else if (atomicCompareAndSwapObject( - t, tail, MonitorNodeNext, 0, node)) { - atomicCompareAndSwapObject(t, monitor, MonitorAcquireTail, tail, node); - return; - } - } - } -} - -inline Thread* monitorAtomicPollAcquire(Thread* t, - GcMonitor* monitor, - bool remove) -{ - while (true) { - GcMonitorNode* head = cast(t, monitor->acquireHead()); - - loadMemoryBarrier(); - - GcMonitorNode* tail = cast(t, monitor->acquireTail()); - - loadMemoryBarrier(); - - GcMonitorNode* next = cast(t, head->next()); - - loadMemoryBarrier(); - - if (head == cast(t, monitor->acquireHead())) { - if (head == tail) { - if (next) { - atomicCompareAndSwapObject( - t, monitor, MonitorAcquireTail, tail, next); - } else { - return 0; - } - } else { - Thread* value = static_cast(next->value()); - if ((not remove) or atomicCompareAndSwapObject( - t, monitor, MonitorAcquireHead, head, next)) { - return value; - } - } - } - } -} - -inline bool monitorTryAcquire(Thread* t, GcMonitor* monitor) -{ - if (monitor->owner() == t - or (monitorAtomicPollAcquire(t, monitor, false) == 0 - and atomicCompareAndSwap( - reinterpret_cast(&monitor->owner()), - 0, - reinterpret_cast(t)))) { - ++monitor->depth(); - return true; - } else { - return false; - } -} - -inline void monitorAcquire(Thread* t, - GcMonitor* monitor, - GcMonitorNode* node = 0) -{ - if (not monitorTryAcquire(t, monitor)) { - PROTECT(t, monitor); - PROTECT(t, node); - - ACQUIRE(t, t->lock); - - monitorAtomicAppendAcquire(t, monitor, node); - - // note that we don't try to acquire the lock until we're first in - // line, both because it's fair and because we don't support - // removing elements from arbitrary positions in the queue - - while (not(t == monitorAtomicPollAcquire(t, monitor, false) - and atomicCompareAndSwap( - reinterpret_cast(&monitor->owner()), - 0, - reinterpret_cast(t)))) { - ENTER(t, Thread::IdleState); - - t->lock->wait(t->systemThread, 0); - } - - expect(t, t == monitorAtomicPollAcquire(t, monitor, true)); - - ++monitor->depth(); - } - - assertT(t, monitor->owner() == t); -} - -inline void monitorRelease(Thread* t, GcMonitor* monitor) -{ - expect(t, monitor->owner() == t); - - if (--monitor->depth() == 0) { - monitor->owner() = 0; - - storeLoadMemoryBarrier(); - - Thread* next = monitorAtomicPollAcquire(t, monitor, false); - - if (next and acquireSystem(t, next)) { - ACQUIRE(t, next->lock); - - next->lock->notify(t->systemThread); - - releaseSystem(t, next); - } - } -} - -inline void monitorAppendWait(Thread* t, GcMonitor* monitor) -{ - assertT(t, monitor->owner() == t); - - expect(t, (t->getFlags() & Thread::WaitingFlag) == 0); - expect(t, t->waitNext == 0); - - t->setFlag(Thread::WaitingFlag); - - if (monitor->waitTail()) { - static_cast(monitor->waitTail())->waitNext = t; - } else { - monitor->waitHead() = t; - } - - monitor->waitTail() = t; -} - -inline void monitorRemoveWait(Thread* t, GcMonitor* monitor) -{ - assertT(t, monitor->owner() == t); - - Thread* previous = 0; - for (Thread* current = static_cast(monitor->waitHead()); current; - current = current->waitNext) { - if (t == current) { - if (t == monitor->waitHead()) { - monitor->waitHead() = t->waitNext; - } else { - previous->waitNext = t->waitNext; - } - - if (t == monitor->waitTail()) { - assertT(t, t->waitNext == 0); - monitor->waitTail() = previous; - } - - t->waitNext = 0; - t->clearFlag(Thread::WaitingFlag); - - return; - } else { - previous = current; - } - } - - abort(t); -} - -inline bool monitorFindWait(Thread* t, GcMonitor* monitor) -{ - assertT(t, monitor->owner() == t); - - for (Thread* current = static_cast(monitor->waitHead()); current; - current = current->waitNext) { - if (t == current) { - return true; - } - } - - return false; -} - -inline bool monitorWait(Thread* t, GcMonitor* monitor, int64_t time) -{ - expect(t, monitor->owner() == t); - - bool interrupted; - unsigned depth; - - PROTECT(t, monitor); - - // pre-allocate monitor node so we don't get an OutOfMemoryError - // when we try to re-acquire the monitor below - GcMonitorNode* monitorNode = makeMonitorNode(t, t, 0); - PROTECT(t, monitorNode); - - { - ACQUIRE(t, t->lock); - - monitorAppendWait(t, monitor); - - depth = monitor->depth(); - monitor->depth() = 1; - - monitorRelease(t, monitor); - - ENTER(t, Thread::IdleState); - - interrupted = t->lock->waitAndClearInterrupted(t->systemThread, time); - } - - monitorAcquire(t, monitor, monitorNode); - - monitor->depth() = depth; - - if (t->getFlags() & Thread::WaitingFlag) { - monitorRemoveWait(t, monitor); - } else { - expect(t, not monitorFindWait(t, monitor)); - } - - assertT(t, monitor->owner() == t); - - return interrupted; -} - -inline Thread* monitorPollWait(Thread* t UNUSED, GcMonitor* monitor) -{ - assertT(t, monitor->owner() == t); - - Thread* next = static_cast(monitor->waitHead()); - - if (next) { - monitor->waitHead() = next->waitNext; - next->clearFlag(Thread::WaitingFlag); - next->waitNext = 0; - if (next == monitor->waitTail()) { - monitor->waitTail() = 0; - } - } else { - assertT(t, monitor->waitTail() == 0); - } - - return next; -} - -inline bool monitorNotify(Thread* t, GcMonitor* monitor) -{ - expect(t, monitor->owner() == t); - - Thread* next = monitorPollWait(t, monitor); - - if (next) { - ACQUIRE(t, next->lock); - - next->lock->notify(t->systemThread); - - return true; - } else { - return false; - } -} - -inline void monitorNotifyAll(Thread* t, GcMonitor* monitor) -{ - PROTECT(t, monitor); - - while (monitorNotify(t, monitor)) { - } -} - -class ObjectMonitorResource { - public: - ObjectMonitorResource(Thread* t, GcMonitor* o) - : o(o), protector(t, &(this->o)) - { - monitorAcquire(protector.t, o); - } - - ~ObjectMonitorResource() - { - monitorRelease(protector.t, o); - } - - private: - GcMonitor* o; - Thread::SingleProtector protector; -}; - -GcMonitor* objectMonitor(Thread* t, object o, bool createNew); - -inline void acquire(Thread* t, object o) -{ - unsigned hash; - if (DebugMonitors) { - hash = objectHash(t, o); - } - - GcMonitor* m = objectMonitor(t, o, true); - - if (DebugMonitors) { - fprintf(stderr, "thread %p acquires %p for %x\n", t, m, hash); - } - - monitorAcquire(t, m); -} - -inline void release(Thread* t, object o) -{ - unsigned hash; - if (DebugMonitors) { - hash = objectHash(t, o); - } - - GcMonitor* m = objectMonitor(t, o, false); - - if (DebugMonitors) { - fprintf(stderr, "thread %p releases %p for %x\n", t, m, hash); - } - - monitorRelease(t, m); -} - -inline void wait(Thread* t, object o, int64_t milliseconds) -{ - unsigned hash; - if (DebugMonitors) { - hash = objectHash(t, o); - } - - GcMonitor* m = objectMonitor(t, o, false); - - if (DebugMonitors) { - fprintf(stderr, - "thread %p waits %d millis on %p for %x\n", - t, - static_cast(milliseconds), - m, - hash); - } - - if (m and m->owner() == t) { - PROTECT(t, m); - - bool interrupted = monitorWait(t, m, milliseconds); - - if (interrupted) { - if (t->m->alive or (t->getFlags() & Thread::DaemonFlag) == 0) { - t->m->classpath->clearInterrupted(t); - throwNew(t, GcInterruptedException::Type); - } else { - throw_(t, roots(t)->shutdownInProgress()); - } - } - } else { - throwNew(t, GcIllegalMonitorStateException::Type); - } - - if (DebugMonitors) { - fprintf(stderr, "thread %p wakes up on %p for %x\n", t, m, hash); - } - - stress(t); -} - -inline void notify(Thread* t, object o) -{ - unsigned hash; - if (DebugMonitors) { - hash = objectHash(t, o); - } - - GcMonitor* m = objectMonitor(t, o, false); - - if (DebugMonitors) { - fprintf(stderr, "thread %p notifies on %p for %x\n", t, m, hash); - } - - if (m and m->owner() == t) { - monitorNotify(t, m); - } else { - throwNew(t, GcIllegalMonitorStateException::Type); - } -} - -inline void notifyAll(Thread* t, object o) -{ - GcMonitor* m = objectMonitor(t, o, false); - - if (DebugMonitors) { - fprintf(stderr, - "thread %p notifies all on %p for %x\n", - t, - m, - objectHash(t, o)); - } - - if (m and m->owner() == t) { - monitorNotifyAll(t, m); - } else { - throwNew(t, GcIllegalMonitorStateException::Type); - } -} - -inline void interrupt(Thread* t, Thread* target) -{ - if (acquireSystem(t, target)) { - target->systemThread->interrupt(); - releaseSystem(t, target); - } -} - -inline bool getAndClearInterrupted(Thread* t, Thread* target) -{ - if (acquireSystem(t, target)) { - bool result = target->systemThread->getAndClearInterrupted(); - releaseSystem(t, target); - return result; - } else { - return false; - } -} - -inline bool exceptionMatch(Thread* t, GcClass* type, GcThrowable* exception) -{ - return type == 0 or (exception != roots(t)->shutdownInProgress() - and instanceOf(t, type, t->exception)); -} - -object intern(Thread* t, object s); - -object clone(Thread* t, object o); - -void walk(Thread* t, Heap::Walker* w, object o, unsigned start); - -int walkNext(Thread* t, object o, int previous); - -void visitRoots(Machine* m, Heap::Visitor* v); - -inline jobject makeLocalReference(Thread* t, object o) -{ - return t->m->processor->makeLocalReference(t, o); -} - -inline void disposeLocalReference(Thread* t, jobject r) -{ - t->m->processor->disposeLocalReference(t, r); -} - -inline bool methodVirtual(Thread* t UNUSED, GcMethod* method) -{ - return (method->flags() & (ACC_STATIC | ACC_PRIVATE)) == 0 - and method->name()->body()[0] != '<'; -} - -inline unsigned singletonMaskSize(unsigned count, unsigned bitsPerWord) -{ - if (count) { - return ceilingDivide(count + 2, bitsPerWord); - } - return 0; -} - -inline unsigned singletonMaskSize(unsigned count) -{ - return singletonMaskSize(count, BitsPerWord); -} - -inline unsigned singletonMaskSize(Thread* t UNUSED, GcSingleton* singleton) -{ - unsigned length = singleton->length(); - if (length) { - return ceilingDivide(length + 2, BitsPerWord + 1); - } - return 0; -} - -inline unsigned singletonCount(Thread* t, GcSingleton* singleton) -{ - return singleton->length() - singletonMaskSize(t, singleton); -} - -inline uint32_t* singletonMask(Thread* t UNUSED, GcSingleton* singleton) -{ - assertT(t, singleton->length()); - return reinterpret_cast( - &singleton->body()[singletonCount(t, singleton)]); -} - -inline void singletonMarkObject(uint32_t* mask, unsigned index) -{ - mask[(index + 2) / 32] |= (static_cast(1) << ((index + 2) % 32)); -} - -inline void singletonMarkObject(Thread* t, - GcSingleton* singleton, - unsigned index) -{ - singletonMarkObject(singletonMask(t, singleton), index); -} - -inline bool singletonIsObject(Thread* t, GcSingleton* singleton, unsigned index) -{ - assertT(t, index < singletonCount(t, singleton)); - - return (singletonMask(t, singleton)[(index + 2) / 32] - & (static_cast(1) << ((index + 2) % 32))) != 0; -} - -inline object& singletonObject(Thread* t UNUSED, - GcSingleton* singleton, - unsigned index) -{ - assertT(t, singletonIsObject(t, singleton, index)); - return reinterpret_cast(singleton->body()[index]); -} - -inline uintptr_t& singletonValue(Thread* t UNUSED, - GcSingleton* singleton, - unsigned index) -{ - assertT(t, not singletonIsObject(t, singleton, index)); - return singleton->body()[index]; -} - -inline GcSingleton* makeSingletonOfSize(Thread* t, unsigned count) -{ - GcSingleton* o = makeSingleton(t, count + singletonMaskSize(count)); - assertT(t, o->length() == count + singletonMaskSize(t, o)); - if (count) { - singletonMask(t, o)[0] = 1; - } - return o; -} - -inline void singletonSetBit(Thread* t, - GcSingleton* singleton, - unsigned start, - unsigned index) -{ - singletonValue(t, singleton, start + (index / BitsPerWord)) - |= static_cast(1) << (index % BitsPerWord); -} - -inline bool singletonBit(Thread* t, - GcSingleton* singleton, - unsigned start, - unsigned index) -{ - return (singletonValue(t, singleton, start + (index / BitsPerWord)) - & (static_cast(1) << (index % BitsPerWord))) != 0; -} - -inline unsigned poolMaskSize(unsigned count, unsigned bitsPerWord) -{ - return ceilingDivide(count, bitsPerWord); -} - -inline unsigned poolMaskSize(unsigned count) -{ - return poolMaskSize(count, BitsPerWord); -} - -inline unsigned poolMaskSize(Thread* t, GcSingleton* pool) -{ - return ceilingDivide(singletonCount(t, pool), BitsPerWord + 1); -} - -inline unsigned poolSize(Thread* t, GcSingleton* pool) -{ - return singletonCount(t, pool) - poolMaskSize(t, pool); -} - -inline GcClass* resolveClassInObject(Thread* t, - GcClassLoader* loader, - object container, - unsigned classOffset, - bool throw_ = true) -{ - object o = fieldAtOffset(container, classOffset); - - loadMemoryBarrier(); - - if (objectClass(t, o) == type(t, GcByteArray::Type)) { - GcByteArray* name = cast(t, o); - PROTECT(t, container); - - GcClass* c = resolveClass(t, loader, name, throw_); - - if (c) { - storeStoreMemoryBarrier(); - - setField(t, container, classOffset, c); - } - - return c; - } - return cast(t, o); -} - -inline GcClass* resolveClassInPool(Thread* t, - GcClassLoader* loader, - GcMethod* method, - unsigned index, - bool throw_ = true) -{ - object o = singletonObject(t, method->code()->pool(), index); - - loadMemoryBarrier(); - - if (objectClass(t, o) == type(t, GcReference::Type)) { - PROTECT(t, method); - - GcClass* c - = resolveClass(t, loader, cast(t, o)->name(), throw_); - - if (c) { - storeStoreMemoryBarrier(); - - method->code()->pool()->setBodyElement( - t, index, reinterpret_cast(c)); - } - return c; - } - return cast(t, o); -} - -inline GcClass* resolveClassInPool(Thread* t, - GcMethod* method, - unsigned index, - bool throw_ = true) -{ - return resolveClassInPool( - t, method->class_()->loader(), method, index, throw_); -} - -inline object resolve( - Thread* t, - GcClassLoader* loader, - GcSingleton* pool, - unsigned index, - object (*find)(vm::Thread*, GcClass*, GcByteArray*, GcByteArray*), - Gc::Type errorType, - bool throw_ = true) -{ - object o = singletonObject(t, pool, index); - - loadMemoryBarrier(); - - if (objectClass(t, o) == type(t, GcReference::Type)) { - PROTECT(t, loader); - PROTECT(t, pool); - - GcReference* reference = cast(t, o); - PROTECT(t, reference); - - GcClass* class_ - = resolveClassInObject(t, loader, o, ReferenceClass, throw_); - - if (class_) { - o = findInHierarchy(t, - class_, - reference->name(), - reference->spec(), - find, - errorType, - throw_); - - if (o) { - storeStoreMemoryBarrier(); - - if (objectClass(t, o) == type(t, GcMethod::Type)) { - o = makeMethodHandle(t, reference->kind(), loader, cast(t, o), 0); - } - - pool->setBodyElement(t, index, reinterpret_cast(o)); - } - } else { - o = 0; - } - } - - return o; -} - -inline GcField* resolveField(Thread* t, - GcClassLoader* loader, - GcMethod* method, - unsigned index, - bool throw_ = true) -{ - return cast(t, - resolve(t, - loader, - method->code()->pool(), - index, - findFieldInClass, - GcNoSuchFieldError::Type, - throw_)); -} - -inline GcField* resolveField(Thread* t, - GcMethod* method, - unsigned index, - bool throw_ = true) -{ - return resolveField(t, method->class_()->loader(), method, index, throw_); -} - -inline void acquireFieldForRead(Thread* t, GcField* field) -{ - if (UNLIKELY( - (field->flags() & ACC_VOLATILE) and BytesPerWord == 4 - and (field->code() == DoubleField or field->code() == LongField))) { - acquire(t, field); - } -} - -inline void releaseFieldForRead(Thread* t, GcField* field) -{ - if (UNLIKELY(field->flags() & ACC_VOLATILE)) { - if (BytesPerWord == 4 - and (field->code() == DoubleField or field->code() == LongField)) { - release(t, field); - } else { - loadMemoryBarrier(); - } - } -} - -class FieldReadResource { - public: - FieldReadResource(Thread* t, GcField* o) : o(o), protector(t, &(this->o)) - { - acquireFieldForRead(protector.t, o); - } - - ~FieldReadResource() - { - releaseFieldForRead(protector.t, o); - } - - private: - GcField* o; - Thread::SingleProtector protector; -}; - -inline void acquireFieldForWrite(Thread* t, GcField* field) -{ - if (UNLIKELY(field->flags() & ACC_VOLATILE)) { - if (BytesPerWord == 4 - and (field->code() == DoubleField or field->code() == LongField)) { - acquire(t, field); - } else { - storeStoreMemoryBarrier(); - } - } -} - -inline void releaseFieldForWrite(Thread* t, GcField* field) -{ - if (UNLIKELY(field->flags() & ACC_VOLATILE)) { - if (BytesPerWord == 4 - and (field->code() == DoubleField or field->code() == LongField)) { - release(t, field); - } else { - storeLoadMemoryBarrier(); - } - } -} - -class FieldWriteResource { - public: - FieldWriteResource(Thread* t, GcField* o) : o(o), protector(t, &(this->o)) - { - acquireFieldForWrite(protector.t, o); - } - - ~FieldWriteResource() - { - releaseFieldForWrite(protector.t, o); - } - - private: - GcField* o; - Thread::SingleProtector protector; -}; - -inline GcMethod* resolveMethod(Thread* t, - GcClassLoader* loader, - GcMethod* method, - unsigned index, - bool throw_ = true) -{ - GcMethodHandle* handle = cast(t, - resolve(t, - loader, - method->code()->pool(), - index, - findMethodInClass, - GcNoSuchMethodError::Type, - throw_)); - - return handle ? handle->method() : 0; -} - -inline GcMethod* resolveMethod(Thread* t, - GcMethod* method, - unsigned index, - bool throw_ = true) -{ - return resolveMethod(t, method->class_()->loader(), method, index, throw_); -} - -GcVector* vectorAppend(Thread*, GcVector*, object); - -inline GcClassRuntimeData* getClassRuntimeDataIfExists(Thread* t, GcClass* c) -{ - if (c->runtimeDataIndex()) { - return cast( - t, - roots(t)->classRuntimeDataTable()->body()[c->runtimeDataIndex() - 1]); - } else { - return 0; - } -} - -inline GcClassRuntimeData* getClassRuntimeData(Thread* t, GcClass* c) -{ - if (c->runtimeDataIndex() == 0) { - PROTECT(t, c); - - ACQUIRE(t, t->m->classLock); - - if (c->runtimeDataIndex() == 0) { - GcClassRuntimeData* runtimeData = makeClassRuntimeData(t, 0, 0, 0, 0); - - { - GcVector* v - = vectorAppend(t, roots(t)->classRuntimeDataTable(), runtimeData); - // sequence point, for gc (don't recombine statements) - roots(t)->setClassRuntimeDataTable(t, v); - } - - c->runtimeDataIndex() = roots(t)->classRuntimeDataTable()->size(); - } - } - - return cast( - t, roots(t)->classRuntimeDataTable()->body()[c->runtimeDataIndex() - 1]); -} - -inline GcMethodRuntimeData* getMethodRuntimeData(Thread* t, GcMethod* method) -{ - int index = method->runtimeDataIndex(); - - loadMemoryBarrier(); - - if (index == 0) { - PROTECT(t, method); - - ACQUIRE(t, t->m->classLock); - - if (method->runtimeDataIndex() == 0) { - GcMethodRuntimeData* runtimeData = makeMethodRuntimeData(t, 0); - - { - GcVector* v - = vectorAppend(t, roots(t)->methodRuntimeDataTable(), runtimeData); - // sequence point, for gc (don't recombine statements) - roots(t)->setMethodRuntimeDataTable(t, v); - } - - storeStoreMemoryBarrier(); - - method->runtimeDataIndex() = roots(t)->methodRuntimeDataTable()->size(); - } - } - - return cast(t, - roots(t)->methodRuntimeDataTable()->body() - [method->runtimeDataIndex() - 1]); -} - -inline GcJclass* getJClass(Thread* t, GcClass* c) -{ - PROTECT(t, c); - - GcJclass* jclass = cast(t, getClassRuntimeData(t, c)->jclass()); - - loadMemoryBarrier(); - - if (jclass == 0) { - ACQUIRE(t, t->m->classLock); - - jclass = cast(t, getClassRuntimeData(t, c)->jclass()); - if (jclass == 0) { - jclass = t->m->classpath->makeJclass(t, c); - - storeStoreMemoryBarrier(); - - getClassRuntimeData(t, c)->setJclass(t, jclass); - } - } - - return jclass; -} - -inline GcClass* primitiveClass(Thread* t, char name) -{ - switch (name) { - case 'B': - return type(t, GcJbyte::Type); - case 'C': - return type(t, GcJchar::Type); - case 'D': - return type(t, GcJdouble::Type); - case 'F': - return type(t, GcJfloat::Type); - case 'I': - return type(t, GcJint::Type); - case 'J': - return type(t, GcJlong::Type); - case 'S': - return type(t, GcJshort::Type); - case 'V': - return type(t, GcJvoid::Type); - case 'Z': - return type(t, GcJboolean::Type); - default: - throwNew(t, GcIllegalArgumentException::Type); - } -} - -inline void registerNative(Thread* t, GcMethod* method, void* function) -{ - PROTECT(t, method); - - expect(t, method->flags() & ACC_NATIVE); - - GcNative* native = makeNative(t, function, false); - PROTECT(t, native); - - GcMethodRuntimeData* runtimeData = getMethodRuntimeData(t, method); - - // ensure other threads only see the methodRuntimeDataNative field - // populated once the object it points to has been populated: - storeStoreMemoryBarrier(); - - runtimeData->setNative(t, native); -} - -inline void unregisterNatives(Thread* t, GcClass* c) -{ - GcArray* table = cast(t, c->methodTable()); - if (table) { - for (unsigned i = 0; i < table->length(); ++i) { - GcMethod* method = cast(t, table->body()[i]); - if (method->flags() & ACC_NATIVE) { - getMethodRuntimeData(t, method)->setNative(t, 0); - } - } - } -} - -void populateMultiArray(Thread* t, - object array, - int32_t* counts, - unsigned index, - unsigned dimensions); - -GcMethod* getCaller(Thread* t, unsigned target, bool skipMethodInvoke = false); - -GcClass* defineClass(Thread* t, - GcClassLoader* loader, - const uint8_t* buffer, - unsigned length); - -inline GcMethod* methodClone(Thread* t, GcMethod* method) -{ - return makeMethod(t, - method->vmFlags(), - method->returnCode(), - method->parameterCount(), - method->parameterFootprint(), - method->flags(), - method->offset(), - method->nativeID(), - method->runtimeDataIndex(), - method->name(), - method->spec(), - method->addendum(), - method->class_(), - method->code()); -} - -inline uint64_t exceptionHandler(uint64_t start, - uint64_t end, - uint64_t ip, - uint64_t catchType) -{ - return (start << 48) | (end << 32) | (ip << 16) | catchType; -} - -inline unsigned exceptionHandlerStart(uint64_t eh) -{ - return eh >> 48; -} - -inline unsigned exceptionHandlerEnd(uint64_t eh) -{ - return (eh >> 32) & 0xFFFF; -} - -inline unsigned exceptionHandlerIp(uint64_t eh) -{ - return (eh >> 16) & 0xFFFF; -} - -inline unsigned exceptionHandlerCatchType(uint64_t eh) -{ - return eh & 0xFFFF; -} - -inline uint64_t lineNumber(uint64_t ip, uint64_t line) -{ - return (ip << 32) | line; -} - -inline unsigned lineNumberIp(uint64_t ln) -{ - return ln >> 32; -} - -inline unsigned lineNumberLine(uint64_t ln) -{ - return ln & 0xFFFFFFFF; -} - -object interruptLock(Thread* t, GcThread* thread); - -void clearInterrupted(Thread* t); - -void threadInterrupt(Thread* t, GcThread* thread); - -bool threadIsInterrupted(Thread* t, GcThread* thread, bool clear); - -inline FILE* errorLog(Thread* t) -{ - if (t->m->errorLog == 0) { - const char* path = findProperty(t, "avian.error.log"); - if (path) { - t->m->errorLog = vm::fopen(path, "wb"); - } else { - t->m->errorLog = stderr; - } - } - - return t->m->errorLog; -} - -} // namespace vm - -AVIAN_EXPORT void* vmAddressFromLine(vm::Thread* t, - vm::object m, - unsigned line); - -#endif // MACHINE_H diff --git a/sgx-jvm/avian/src/avian/process.h b/sgx-jvm/avian/src/avian/process.h deleted file mode 100644 index 531927f421..0000000000 --- a/sgx-jvm/avian/src/avian/process.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef PROCESS_H -#define PROCESS_H - -#include "avian/common.h" -#include -#include "avian/machine.h" -#include "avian/constants.h" - -namespace vm { - -inline int16_t codeReadInt16(Thread* t UNUSED, GcCode* code, unsigned& ip) -{ - uint8_t v1 = code->body()[ip++]; - uint8_t v2 = code->body()[ip++]; - return ((v1 << 8) | v2); -} - -inline int32_t codeReadInt32(Thread* t UNUSED, GcCode* code, unsigned& ip) -{ - uint8_t v1 = code->body()[ip++]; - uint8_t v2 = code->body()[ip++]; - uint8_t v3 = code->body()[ip++]; - uint8_t v4 = code->body()[ip++]; - return ((v1 << 24) | (v2 << 16) | (v3 << 8) | v4); -} - -inline bool isSuperclass(Thread* t UNUSED, GcClass* class_, GcClass* base) -{ - for (GcClass* oc = base->super(); oc; oc = oc->super()) { - if (oc == class_) { - return true; - } - } - return false; -} - -inline bool isSpecialMethod(Thread* t, GcMethod* method, GcClass* class_) -{ - return (class_->flags() & ACC_SUPER) - and strcmp(reinterpret_cast(""), - method->name()->body().begin()) != 0 - and isSuperclass(t, method->class_(), class_); -} - -void resolveNative(Thread* t, GcMethod* method); - -int findLineNumber(Thread* t, GcMethod* method, unsigned ip); - -} // namespace vm - -#endif // PROCESS_H diff --git a/sgx-jvm/avian/src/avian/processor.h b/sgx-jvm/avian/src/avian/processor.h deleted file mode 100644 index 7e9df08ae3..0000000000 --- a/sgx-jvm/avian/src/avian/processor.h +++ /dev/null @@ -1,241 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef PROCESSOR_H -#define PROCESSOR_H - -#include "avian/common.h" -#include -#include -#include -#include "bootimage.h" -#include "avian/heapwalk.h" -#include "avian/zone.h" - -namespace avian { -namespace codegen { -class DelayedPromise; -} - -namespace util { -template -class Slice; -} -} - -namespace vm { - -class GcByteArray; -class GcCode; -class GcClass; -class GcMethod; -class GcMethodAddendum; -class GcIntArray; -class GcContinuation; -class GcThrowable; -class GcThread; -class GcClassAddendum; -class GcClassLoader; -class GcArray; -class GcSingleton; -class GcTriple; - -class Processor { - public: - class StackWalker; - - class StackVisitor { - public: - virtual bool visit(StackWalker* walker) = 0; - }; - - class StackWalker { - public: - virtual void walk(StackVisitor* v) = 0; - - virtual GcMethod* method() = 0; - - virtual int ip() = 0; - - virtual unsigned count() = 0; - }; - - class CompilationHandler { - public: - virtual void compiled(const void* code, - unsigned size, - unsigned frameSize, - const char* name) = 0; - - virtual void dispose() = 0; - }; - - virtual Thread* makeThread(Machine* m, GcThread* javaThread, Thread* parent) - = 0; - - virtual GcMethod* makeMethod(Thread* t, - uint8_t vmFlags, - uint8_t returnCode, - uint8_t parameterCount, - uint8_t parameterFootprint, - uint16_t flags, - uint16_t offset, - GcByteArray* name, - GcByteArray* spec, - GcMethodAddendum* addendum, - GcClass* class_, - GcCode* code) = 0; - - virtual GcClass* makeClass(Thread* t, - uint16_t flags, - uint16_t vmFlags, - uint16_t fixedSize, - uint8_t arrayElementSize, - uint8_t arrayDimensions, - GcClass* arrayElementClass, - GcIntArray* objectMask, - GcByteArray* name, - GcByteArray* sourceFile, - GcClass* super, - object interfaceTable, - object virtualTable, - object fieldTable, - object methodTable, - GcClassAddendum* addendum, - GcSingleton* staticTable, - GcClassLoader* loader, - unsigned vtableLength) = 0; - - virtual void initVtable(Thread* t, GcClass* c) = 0; - - virtual void visitObjects(Thread* t, Heap::Visitor* v) = 0; - - virtual void walkStack(Thread* t, StackVisitor* v) = 0; - - virtual int lineNumber(Thread* t, GcMethod* method, int ip) = 0; - - virtual object* makeLocalReference(Thread* t, object o) = 0; - - virtual void disposeLocalReference(Thread* t, object* r) = 0; - - virtual bool pushLocalFrame(Thread* t, unsigned capacity) = 0; - - virtual void popLocalFrame(Thread* t) = 0; - - virtual object invokeArray(Thread* t, - GcMethod* method, - object this_, - object arguments) = 0; - - virtual object invokeArray(Thread* t, - GcMethod* method, - object this_, - const jvalue* arguments) = 0; - - virtual object invokeList(Thread* t, - GcMethod* method, - object this_, - bool indirectObjects, - va_list arguments) = 0; - - virtual object invokeList(Thread* t, - GcClassLoader* loader, - const char* className, - const char* methodName, - const char* methodSpec, - object this_, - va_list arguments) = 0; - - virtual void dispose(Thread* t) = 0; - - virtual void dispose() = 0; - - virtual object getStackTrace(Thread* t, Thread* target) = 0; - - virtual void initialize(BootImage* image, avian::util::Slice code) - = 0; - - virtual void addCompilationHandler(CompilationHandler* handler) = 0; - - virtual void compileMethod(Thread* t, - Zone* zone, - GcTriple** constants, - GcTriple** calls, - avian::codegen::DelayedPromise** addresses, - GcMethod* method, - OffsetResolver* resolver, - Machine* hostVM) = 0; - - virtual void visitRoots(Thread* t, HeapWalker* w) = 0; - - virtual void normalizeVirtualThunks(Thread* t) = 0; - - virtual unsigned* makeCallTable(Thread* t, HeapWalker* w) = 0; - - virtual void boot(Thread* t, BootImage* image, uint8_t* code) = 0; - - virtual void callWithCurrentContinuation(Thread* t, object receiver) = 0; - - virtual void dynamicWind(Thread* t, object before, object thunk, object after) - = 0; - - virtual void feedResultToContinuation(Thread* t, - GcContinuation* continuation, - object result) = 0; - - virtual void feedExceptionToContinuation(Thread* t, - GcContinuation* continuation, - GcThrowable* exception) = 0; - - virtual void walkContinuationBody(Thread* t, - Heap::Walker* w, - object o, - unsigned start) = 0; - - object invoke(Thread* t, GcMethod* method, object this_, ...) - { - va_list a; - va_start(a, this_); - - object r = invokeList(t, method, this_, false, a); - - va_end(a); - - return r; - } - - object invoke(Thread* t, - GcClassLoader* loader, - const char* className, - const char* methodName, - const char* methodSpec, - object this_, - ...) - { - va_list a; - va_start(a, this_); - - object r - = invokeList(t, loader, className, methodName, methodSpec, this_, a); - - va_end(a); - - return r; - } -}; - -Processor* makeProcessor(System* system, - avian::util::Allocator* allocator, - const char* crashDumpDirectory, - bool useNativeFeatures); - -} // namespace vm - -#endif // PROCESSOR_H diff --git a/sgx-jvm/avian/src/avian/target-fields.h b/sgx-jvm/avian/src/avian/target-fields.h deleted file mode 100644 index ac4402ece1..0000000000 --- a/sgx-jvm/avian/src/avian/target-fields.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_TARGET_FIELDS_H -#define AVIAN_TARGET_FIELDS_H - -#ifdef TARGET_BYTES_PER_WORD -#if (TARGET_BYTES_PER_WORD == 8) - -#define TARGET_THREAD_EXCEPTION 80 -#define TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT 2264 -#define TARGET_THREAD_EXCEPTIONOFFSET 2272 -#define TARGET_THREAD_EXCEPTIONHANDLER 2280 - -#define TARGET_THREAD_IP 2224 -#define TARGET_THREAD_STACK 2232 -#define TARGET_THREAD_NEWSTACK 2240 -#define TARGET_THREAD_SCRATCH 2248 -#define TARGET_THREAD_CONTINUATION 2256 -#define TARGET_THREAD_TAILADDRESS 2288 -#define TARGET_THREAD_VIRTUALCALLTARGET 2296 -#define TARGET_THREAD_VIRTUALCALLINDEX 2304 -#define TARGET_THREAD_HEAPIMAGE 2312 -#define TARGET_THREAD_CODEIMAGE 2320 -#define TARGET_THREAD_THUNKTABLE 2328 -#define TARGET_THREAD_DYNAMICTABLE 2336 -#define TARGET_THREAD_STACKLIMIT 2384 - -#elif(TARGET_BYTES_PER_WORD == 4) - -#define TARGET_THREAD_EXCEPTION 44 -#define TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT 2168 -#define TARGET_THREAD_EXCEPTIONOFFSET 2172 -#define TARGET_THREAD_EXCEPTIONHANDLER 2176 - -#define TARGET_THREAD_IP 2148 -#define TARGET_THREAD_STACK 2152 -#define TARGET_THREAD_NEWSTACK 2156 -#define TARGET_THREAD_SCRATCH 2160 -#define TARGET_THREAD_CONTINUATION 2164 -#define TARGET_THREAD_TAILADDRESS 2180 -#define TARGET_THREAD_VIRTUALCALLTARGET 2184 -#define TARGET_THREAD_VIRTUALCALLINDEX 2188 -#define TARGET_THREAD_HEAPIMAGE 2192 -#define TARGET_THREAD_CODEIMAGE 2196 -#define TARGET_THREAD_THUNKTABLE 2200 -#define TARGET_THREAD_DYNAMICTABLE 2204 -#define TARGET_THREAD_STACKLIMIT 2228 - -#else -#error -#endif -#else -#error -#endif - -#endif diff --git a/sgx-jvm/avian/src/avian/target.h b/sgx-jvm/avian/src/avian/target.h deleted file mode 100644 index d2ffa01f2b..0000000000 --- a/sgx-jvm/avian/src/avian/target.h +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef TARGET_H -#define TARGET_H - -#include "avian/target-fields.h" -#include "avian/common.h" - -namespace vm { - -template -inline T targetV1(T v) -{ - return v; -} - -template -inline T swapV2(T v) -{ - return (((v >> 8) & 0xFF) | ((v << 8))); -} - -template -inline T swapV4(T v) -{ - return (((v >> 24) & 0x000000FF) | ((v >> 8) & 0x0000FF00) - | ((v << 8) & 0x00FF0000) | ((v << 24))); -} - -template -inline T swapV8(T v) -{ - return (((static_cast(v) >> 56) & UINT64_C(0x00000000000000FF)) - | ((static_cast(v) >> 40) & UINT64_C(0x000000000000FF00)) - | ((static_cast(v) >> 24) & UINT64_C(0x0000000000FF0000)) - | ((static_cast(v) >> 8) & UINT64_C(0x00000000FF000000)) - | ((static_cast(v) << 8) & UINT64_C(0x000000FF00000000)) - | ((static_cast(v) << 24) & UINT64_C(0x0000FF0000000000)) - | ((static_cast(v) << 40) & UINT64_C(0x00FF000000000000)) - | ((static_cast(v) << 56))); -} - -#ifdef TARGET_OPPOSITE_ENDIAN - -template -inline T targetV2(T v) -{ - return swapV2(v); -} - -template -inline T targetV4(T v) -{ - return swapV4(v); -} - -template -inline T targetV8(T v) -{ - return swapV8(v); -} - -#else -template -inline T targetV2(T v) -{ - return v; -} - -template -inline T targetV4(T v) -{ - return v; -} - -template -inline T targetV8(T v) -{ - return v; -} -#endif - -#ifdef TARGET_BYTES_PER_WORD -#if (TARGET_BYTES_PER_WORD == 8) - -template -inline T targetVW(T v) -{ - return targetV8(v); -} - -typedef uint64_t target_uintptr_t; -typedef int64_t target_intptr_t; - -const unsigned TargetClassFixedSize = 12; -const unsigned TargetClassArrayElementSize = 14; -const unsigned TargetClassVtable = 136; - -const unsigned TargetFieldOffset = 12; - -#elif(TARGET_BYTES_PER_WORD == 4) - -template -inline T targetVW(T v) -{ - return targetV4(v); -} - -typedef uint32_t target_uintptr_t; -typedef int32_t target_intptr_t; - -const unsigned TargetClassFixedSize = 8; -const unsigned TargetClassArrayElementSize = 10; -const unsigned TargetClassVtable = 72; - -const unsigned TargetFieldOffset = 8; - -#else -#error -#endif -#else -#error -#endif - -const unsigned TargetBytesPerWord = TARGET_BYTES_PER_WORD; - -const unsigned TargetBitsPerWord = TargetBytesPerWord * 8; - -const target_uintptr_t TargetPointerMask - = ((~static_cast(0)) / TargetBytesPerWord) - * TargetBytesPerWord; - -const unsigned TargetArrayLength = TargetBytesPerWord; -const unsigned TargetArrayBody = TargetBytesPerWord * 2; - -inline void targetMarkBit(target_uintptr_t* map, unsigned i) -{ - map[wordOf(i)] |= targetVW(static_cast(1) - << bitOf(i)); -} - -} // namespace vm - -#endif // TARGET_H diff --git a/sgx-jvm/avian/src/avian/types.h b/sgx-jvm/avian/src/avian/types.h deleted file mode 100644 index 43ad0bfc3c..0000000000 --- a/sgx-jvm/avian/src/avian/types.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef TYPES_H -#define TYPES_H - -#define VOID_TYPE 0 -#define INT8_TYPE 1 -#define INT16_TYPE 2 -#define INT32_TYPE 3 -#define INT64_TYPE 4 -#define FLOAT_TYPE 5 -#define DOUBLE_TYPE 6 -#define POINTER_TYPE 7 - -#endif // TYPES_H diff --git a/sgx-jvm/avian/src/avian/util.h b/sgx-jvm/avian/src/avian/util.h deleted file mode 100644 index dd5293bd17..0000000000 --- a/sgx-jvm/avian/src/avian/util.h +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef UTIL_H -#define UTIL_H - -#include "avian/machine.h" -#include "avian/zone.h" - -namespace vm { - -GcTriple* hashMapFindNode(Thread* t, - GcHashMap* map, - object key, - uint32_t (*hash)(Thread*, object), - bool (*equal)(Thread*, object, object)); - -inline object hashMapFind(Thread* t, - GcHashMap* map, - object key, - uint32_t (*hash)(Thread*, object), - bool (*equal)(Thread*, object, object)) -{ - GcTriple* n = hashMapFindNode(t, map, key, hash, equal); - return (n ? n->second() : 0); -} - -void hashMapResize(Thread* t, - GcHashMap* map, - uint32_t (*hash)(Thread*, object), - unsigned size); - -void hashMapInsert(Thread* t, - GcHashMap* map, - object key, - object value, - uint32_t (*hash)(Thread*, object)); - -inline bool hashMapInsertOrReplace(Thread* t, - GcHashMap* map, - object key, - object value, - uint32_t (*hash)(Thread*, object), - bool (*equal)(Thread*, object, object)) -{ - GcTriple* n = hashMapFindNode(t, map, key, hash, equal); - if (n == 0) { - hashMapInsert(t, map, key, value, hash); - return true; - } else { - n->setSecond(t, value); - return false; - } -} - -inline bool hashMapInsertMaybe(Thread* t, - GcHashMap* map, - object key, - object value, - uint32_t (*hash)(Thread*, object), - bool (*equal)(Thread*, object, object)) -{ - GcTriple* n = hashMapFindNode(t, map, key, hash, equal); - if (n == 0) { - hashMapInsert(t, map, key, value, hash); - return true; - } else { - return false; - } -} - -object hashMapRemove(Thread* t, - GcHashMap* map, - object key, - uint32_t (*hash)(Thread*, object), - bool (*equal)(Thread*, object, object)); - -object hashMapIterator(Thread* t, GcHashMap* map); - -object hashMapIteratorNext(Thread* t, object it); - -void listAppend(Thread* t, GcList* list, object value); - -GcVector* vectorAppend(Thread* t, GcVector* vector, object value); - -GcArray* growArray(Thread* t, GcArray* array); - -object treeQuery(Thread* t, - GcTreeNode* tree, - intptr_t key, - GcTreeNode* sentinal, - intptr_t (*compare)(Thread* t, intptr_t key, object b)); - -GcTreeNode* treeInsert(Thread* t, - Zone* zone, - GcTreeNode* tree, - intptr_t key, - object value, - GcTreeNode* sentinal, - intptr_t (*compare)(Thread* t, intptr_t key, object b)); - -void treeUpdate(Thread* t, - GcTreeNode* tree, - intptr_t key, - object value, - GcTreeNode* sentinal, - intptr_t (*compare)(Thread* t, intptr_t key, object b)); - -class HashMapIterator : public Thread::Protector { - public: - HashMapIterator(Thread* t, GcHashMap* map) - : Protector(t), map(map), node(0), index(0) - { - find(); - } - - void find() - { - GcArray* array = map->array(); - if (array) { - for (unsigned i = index; i < array->length(); ++i) { - if (array->body()[i]) { - node = cast(t, array->body()[i]); - index = i + 1; - return; - } - } - } - node = 0; - } - - bool hasMore() - { - return node != 0; - } - - GcTriple* next() - { - if (node) { - GcTriple* n = node; - if (node->third()) { - node = cast(t, node->third()); - } else { - find(); - } - return n; - } else { - return 0; - } - } - - virtual void visit(Heap::Visitor* v) - { - v->visit(&map); - v->visit(&node); - } - - GcHashMap* map; - GcTriple* node; - unsigned index; -}; - -} // vm - -#endif // UTIL_H diff --git a/sgx-jvm/avian/src/avian/x86.h b/sgx-jvm/avian/src/avian/x86.h deleted file mode 100644 index c54a17763f..0000000000 --- a/sgx-jvm/avian/src/avian/x86.h +++ /dev/null @@ -1,332 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef X86_H -#define X86_H - -#include "avian/types.h" -#include "avian/common.h" - -#ifdef _MSC_VER -#include "windows.h" -#pragma push_macro("assert") -#include "intrin.h" -#pragma pop_macro("assert") -#undef interface -#endif - -#if (defined ARCH_x86_32) || (defined PLATFORM_WINDOWS) -#define VA_LIST(x) (&(x)) -#else -#define VA_LIST(x) (x) -#endif - -#ifdef __APPLE__ -#include "mach/mach_types.h" -#include "mach/thread_act.h" -#include "mach/thread_status.h" - -#if __DARWIN_UNIX03 && defined(_STRUCT_X86_EXCEPTION_STATE32) -#define FIELD(x) __##x -#else -#define FIELD(x) x -#endif -#endif - -#ifdef ARCH_x86_32 - -#ifdef __APPLE__ -#define THREAD_STATE x86_THREAD_STATE32 -#define THREAD_STATE_TYPE x86_thread_state32_t -#define THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT - -#define THREAD_STATE_IP(state) ((state).FIELD(eip)) -#define THREAD_STATE_STACK(state) ((state).FIELD(esp)) -#define THREAD_STATE_THREAD(state) ((state).FIELD(ebx)) -#define THREAD_STATE_LINK(state) ((state).FIELD(ecx)) -#define THREAD_STATE_FRAME(state) ((state).FIELD(ebp)) - -#define IP_REGISTER(context) THREAD_STATE_IP(context->uc_mcontext->FIELD(ss)) -#define STACK_REGISTER(context) \ - THREAD_STATE_STACK(context->uc_mcontext->FIELD(ss)) -#define THREAD_REGISTER(context) \ - THREAD_STATE_THREAD(context->uc_mcontext->FIELD(ss)) -#define LINK_REGISTER(context) \ - THREAD_STATE_LINK(context->uc_mcontext->FIELD(ss)) -#define FRAME_REGISTER(context) \ - THREAD_STATE_FRAME(context->uc_mcontext->FIELD(ss)) - -#elif(defined __QNX__) -#define IP_REGISTER(context) (context->uc_mcontext.cpu.eip) -#define STACK_REGISTER(context) (context->uc_mcontext.cpu.esp) -#define THREAD_REGISTER(context) (context->uc_mcontext.cpu.ebx) -#define LINK_REGISTER(context) (context->uc_mcontext.cpu.ecx) -#define FRAME_REGISTER(context) (context->uc_mcontext.cpu.ebp) -#elif(defined __FreeBSD__) -#define IP_REGISTER(context) (context->uc_mcontext.mc_eip) -#define STACK_REGISTER(context) (context->uc_mcontext.mc_esp) -#define THREAD_REGISTER(context) (context->uc_mcontext.mc_ebx) -#define LINK_REGISTER(context) (context->uc_mcontext.mc_ecx) -#define FRAME_REGISTER(context) (context->uc_mcontext.mc_ebp) -#else -#define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_EIP]) -#define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_ESP]) -#define THREAD_REGISTER(context) (context->uc_mcontext.gregs[REG_EBX]) -#define LINK_REGISTER(context) (context->uc_mcontext.gregs[REG_ECX]) -#define FRAME_REGISTER(context) (context->uc_mcontext.gregs[REG_EBP]) -#endif - -extern "C" uint64_t vmNativeCall(void* function, - void* stack, - unsigned stackSize, - unsigned returnType); - -namespace vm { - -inline uint64_t dynamicCall(void* function, - uintptr_t* arguments, - uint8_t*, - unsigned, - unsigned argumentsSize, - unsigned returnType) -{ - return vmNativeCall(function, arguments, argumentsSize, returnType); -} - -} // namespace vm - -#elif defined ARCH_x86_64 - -#ifdef __APPLE__ -#define THREAD_STATE x86_THREAD_STATE64 -#define THREAD_STATE_TYPE x86_thread_state64_t -#define THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT - -#define THREAD_STATE_IP(state) ((state).FIELD(rip)) -#define THREAD_STATE_STACK(state) ((state).FIELD(rsp)) -#define THREAD_STATE_THREAD(state) ((state).FIELD(rbx)) -#define THREAD_STATE_LINK(state) ((state).FIELD(rcx)) -#define THREAD_STATE_FRAME(state) ((state).FIELD(rbp)) - -#define IP_REGISTER(context) THREAD_STATE_IP(context->uc_mcontext->FIELD(ss)) -#define STACK_REGISTER(context) \ - THREAD_STATE_STACK(context->uc_mcontext->FIELD(ss)) -#define THREAD_REGISTER(context) \ - THREAD_STATE_THREAD(context->uc_mcontext->FIELD(ss)) -#define LINK_REGISTER(context) \ - THREAD_STATE_LINK(context->uc_mcontext->FIELD(ss)) -#define FRAME_REGISTER(context) \ - THREAD_STATE_FRAME(context->uc_mcontext->FIELD(ss)) - -#elif(defined __FreeBSD__) -#define IP_REGISTER(context) (context->uc_mcontext.mc_rip) -#define STACK_REGISTER(context) (context->uc_mcontext.mc_rsp) -#define THREAD_REGISTER(context) (context->uc_mcontext.mc_rbx) -#define LINK_REGISTER(context) (context->uc_mcontext.mc_rcx) -#define FRAME_REGISTER(context) (context->uc_mcontext.mc_rbp) -#else -#define IP_REGISTER(context) (context->uc_mcontext.gregs[REG_RIP]) -#define STACK_REGISTER(context) (context->uc_mcontext.gregs[REG_RSP]) -#define THREAD_REGISTER(context) (context->uc_mcontext.gregs[REG_RBX]) -#define LINK_REGISTER(context) (context->uc_mcontext.gregs[REG_RCX]) -#define FRAME_REGISTER(context) (context->uc_mcontext.gregs[REG_RBP]) -#endif - -extern "C" uint64_t -#ifdef PLATFORM_WINDOWS - vmNativeCall(void* function, - void* stack, - unsigned stackSize, - unsigned returnType); -#else - vmNativeCall(void* function, - void* stack, - unsigned stackSize, - void* gprTable, - void* sseTable, - unsigned returnType); -#endif - -namespace vm { - -#ifdef PLATFORM_WINDOWS -inline uint64_t dynamicCall(void* function, - uint64_t* arguments, - UNUSED uint8_t* argumentTypes, - unsigned argumentCount, - unsigned, - unsigned returnType) -{ - return vmNativeCall(function, arguments, argumentCount, returnType); -} -#else -inline uint64_t dynamicCall(void* function, - uintptr_t* arguments, - uint8_t* argumentTypes, - unsigned argumentCount, - unsigned, - unsigned returnType) -{ - const unsigned GprCount = 6; - uint64_t gprTable[GprCount]; - unsigned gprIndex = 0; - - const unsigned SseCount = 8; - uint64_t sseTable[SseCount]; - unsigned sseIndex = 0; - - uint64_t stack[argumentCount]; - unsigned stackIndex = 0; - - for (unsigned i = 0; i < argumentCount; ++i) { - switch (argumentTypes[i]) { - case FLOAT_TYPE: - case DOUBLE_TYPE: { - if (sseIndex < SseCount) { - sseTable[sseIndex++] = arguments[i]; - } else { - stack[stackIndex++] = arguments[i]; - } - } break; - - default: { - if (gprIndex < GprCount) { - gprTable[gprIndex++] = arguments[i]; - } else { - stack[stackIndex++] = arguments[i]; - } - } break; - } - } - - return vmNativeCall(function, - stack, - stackIndex * BytesPerWord, - (gprIndex ? gprTable : 0), - (sseIndex ? sseTable : 0), - returnType); -} -#endif - -} // namespace vm - -#else -#error unsupported architecture -#endif - -namespace vm { - -inline void trap() -{ -#ifdef _MSC_VER - __asm int 3 -#else - asm("int3"); -#endif -} - -inline void programOrderMemoryBarrier() -{ - compileTimeMemoryBarrier(); -} - -inline void storeStoreMemoryBarrier() -{ - programOrderMemoryBarrier(); -} - -inline void storeLoadMemoryBarrier() -{ -#ifdef _MSC_VER - MemoryBarrier(); -#elif defined ARCH_x86_32 - __asm__ __volatile__("lock; addl $0,0(%%esp)" : : : "memory"); -#elif defined ARCH_x86_64 - __asm__ __volatile__("mfence" : : : "memory"); -#endif // ARCH_x86_64 -} - -inline void loadMemoryBarrier() -{ - programOrderMemoryBarrier(); -} - -inline void syncInstructionCache(const void*, unsigned) -{ - programOrderMemoryBarrier(); -} - -#ifdef USE_ATOMIC_OPERATIONS -inline bool atomicCompareAndSwap32(uint32_t* p, uint32_t old, uint32_t new_) -{ -#ifdef _MSC_VER - return old - == InterlockedCompareExchange(reinterpret_cast(p), new_, old); -#elif(__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1) - return __sync_bool_compare_and_swap(p, old, new_); -#else - uint8_t result; - - __asm__ __volatile__("lock; cmpxchgl %2, %0; setz %1" - : "=m"(*p), "=q"(result) - : "r"(new_), "a"(old), "m"(*p) - : "memory"); - - return result != 0; -#endif -} - -#define AVIAN_HAS_CAS64 - -inline bool atomicCompareAndSwap64(uint64_t* p, uint64_t old, uint64_t new_) -{ -#ifdef _MSC_VER - return old == InterlockedCompareExchange64( - reinterpret_cast(p), new_, old); -#elif(__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1) - return __sync_bool_compare_and_swap(p, old, new_); -#elif defined ARCH_x86_32 - uint8_t result; - - __asm__ __volatile__("lock; cmpxchg8b %0; setz %1" - : "=m"(*p), "=q"(result) - : "a"(static_cast(old)), - "d"(static_cast(old >> 32)), - "b"(static_cast(new_)), - "c"(static_cast(new_ >> 32)), - "m"(*p) - : "memory"); - - return result != 0; -#else - uint8_t result; - - __asm__ __volatile__("lock; cmpxchgq %2, %0; setz %1" - : "=m"(*p), "=q"(result) - : "r"(new_), "a"(old), "m"(*p) - : "memory"); - - return result != 0; -#endif -} - -inline bool atomicCompareAndSwap(uintptr_t* p, uintptr_t old, uintptr_t new_) -{ -#ifdef ARCH_x86_32 - return atomicCompareAndSwap32(reinterpret_cast(p), old, new_); -#elif defined ARCH_x86_64 - return atomicCompareAndSwap64(reinterpret_cast(p), old, new_); -#endif // ARCH_x86_64 -} -#endif // USE_ATOMIC_OPERATIONS - -} // namespace vm - -#endif // X86_H diff --git a/sgx-jvm/avian/src/avian/zlib-custom.h b/sgx-jvm/avian/src/avian/zlib-custom.h deleted file mode 100644 index 73a62c81bb..0000000000 --- a/sgx-jvm/avian/src/avian/zlib-custom.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "zlib.h" - -#ifdef inflateInit2 -#undef inflateInit2 -#define inflateInit2(strm, windowBits) \ - inflateInit2_( \ - (strm), (windowBits), ZLIB_VERSION, static_cast(sizeof(z_stream))) -#endif - -#ifdef deflateInit2 -#undef deflateInit2 -#define deflateInit2(strm, level, windowBits) \ - deflateInit2_((strm), \ - (level), \ - Z_DEFLATED, \ - (windowBits), \ - 8, \ - Z_DEFAULT_STRATEGY, \ - ZLIB_VERSION, \ - static_cast(sizeof(z_stream))) -#endif diff --git a/sgx-jvm/avian/src/avian/zone.h b/sgx-jvm/avian/src/avian/zone.h deleted file mode 100644 index 1274abfa73..0000000000 --- a/sgx-jvm/avian/src/avian/zone.h +++ /dev/null @@ -1,156 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef ZONE_H -#define ZONE_H - -#include -#include -#include - -namespace vm { - -class Zone : public avian::util::AllocOnly { - public: - class Segment { - public: - Segment(Segment* next, unsigned size) : next(next), size(size), position(0) - { - } - - Segment* next; - uintptr_t size; - uintptr_t position; - uint8_t data[0]; - }; - - Zone(avian::util::Allocator* allocator, size_t minimumFootprint) - : allocator(allocator), - segment(0), - minimumFootprint(minimumFootprint < sizeof(Segment) - ? 0 - : minimumFootprint - sizeof(Segment)) - { - } - - ~Zone() - { - dispose(); - } - - void dispose() - { - for (Segment* seg = segment, *next; seg; seg = next) { - next = seg->next; - allocator->free(seg, sizeof(Segment) + seg->size); - } - - segment = 0; - } - - virtual void* allocate(size_t size) - { - size = pad(size); - void* p = tryAllocate(size); - if (p) { - return p; - } else { - ensure(size); - void* r = segment->data + segment->position; - segment->position += size; - return r; - } - } - - void* peek(size_t size) - { - size = pad(size); - Segment* s = segment; - while (s->position < size) { - size -= s->position; - s = s->next; - } - return s->data + (s->position - size); - } - - void pop(size_t size) - { - size = pad(size); - Segment* s = segment; - while (s->position < size) { - size -= s->position; - Segment* next = s->next; - allocator->free(s, sizeof(Segment) + s->size); - s = next; - } - s->position -= size; - segment = s; - } - - private: - static unsigned padToPage(unsigned size) - { - return (size + (LikelyPageSizeInBytes - 1)) & ~(LikelyPageSizeInBytes - 1); - } - - bool tryEnsure(unsigned space) - { - if (segment == 0 or segment->position + space > segment->size) { - unsigned size = padToPage( - avian::util::max( - space, - avian::util::max(minimumFootprint, - segment == 0 ? 0 : segment->size * 2)) - + sizeof(Segment)); - - void* p = allocator->tryAllocate(size); - if (p == 0) { - size = padToPage(space + sizeof(Segment)); - p = allocator->tryAllocate(size); - if (p == 0) { - return false; - } - } - - segment = new (p) Segment(segment, size - sizeof(Segment)); - } - return true; - } - - void ensure(unsigned space) - { - if (segment == 0 or segment->position + space > segment->size) { - unsigned size = padToPage(space + sizeof(Segment)); - - segment = new (allocator->allocate(size)) - Segment(segment, size - sizeof(Segment)); - } - } - - void* tryAllocate(size_t size) - { - size = pad(size); - if (tryEnsure(size)) { - void* r = segment->data + segment->position; - segment->position += size; - return r; - } else { - return 0; - } - } - - avian::util::Allocator* allocator; - Segment* segment; - unsigned minimumFootprint; -}; - -} // namespace vm - -#endif // ZONE_H diff --git a/sgx-jvm/avian/src/boot-javahome.cpp b/sgx-jvm/avian/src/boot-javahome.cpp deleted file mode 100644 index 026910ede6..0000000000 --- a/sgx-jvm/avian/src/boot-javahome.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/common.h" - -#ifdef BOOT_JAVAHOME - -#if (!defined __x86_64__) && ((defined __MINGW32__) || (defined _MSC_VER)) -#define SYMBOL(x) binary_javahome_jar_##x -#else -#define SYMBOL(x) _binary_javahome_jar_##x -#endif - -extern "C" { -extern const uint8_t SYMBOL(start)[]; -extern const uint8_t SYMBOL(end)[]; - -AVIAN_EXPORT const uint8_t* javahomeJar(size_t* size) -{ - *size = SYMBOL(end) - SYMBOL(start); - return SYMBOL(start); -} -} - -#undef SYMBOL - -#endif // BOOT_JAVAHOME diff --git a/sgx-jvm/avian/src/boot.cpp b/sgx-jvm/avian/src/boot.cpp deleted file mode 100644 index 3849c9eed0..0000000000 --- a/sgx-jvm/avian/src/boot.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include "avian/common.h" - -// since we aren't linking against libstdc++, we must implement this -// ourselves: -extern "C" void __cxa_pure_virtual(void) -{ - abort(); -} - -#ifdef BOOT_IMAGE - -#if (!defined __x86_64__) && ((defined __MINGW32__) || (defined _MSC_VER)) -#define BOOTIMAGE_SYMBOL(x) binary_bootimage_bin_##x -#define CODEIMAGE_SYMBOL(x) binary_codeimage_bin_##x -#else -#define BOOTIMAGE_SYMBOL(x) _binary_bootimage_bin_##x -#define CODEIMAGE_SYMBOL(x) _binary_codeimage_bin_##x -#endif - -extern "C" { -extern const uint8_t BOOTIMAGE_SYMBOL(start)[]; -extern const uint8_t BOOTIMAGE_SYMBOL(end)[]; - -AVIAN_EXPORT const uint8_t* bootimageBin(size_t* size) -{ - *size = BOOTIMAGE_SYMBOL(end) - BOOTIMAGE_SYMBOL(start); - return BOOTIMAGE_SYMBOL(start); -} - -extern const uint8_t CODEIMAGE_SYMBOL(start)[]; -extern const uint8_t CODEIMAGE_SYMBOL(end)[]; - -AVIAN_EXPORT const uint8_t* codeimageBin(size_t* size) -{ - *size = CODEIMAGE_SYMBOL(end) - CODEIMAGE_SYMBOL(start); - return CODEIMAGE_SYMBOL(start); -} -} - -#undef SYMBOL - -#endif // BOOT_IMAGE - -#ifdef BOOT_CLASSPATH - -#if (!defined __x86_64__) && ((defined __MINGW32__) || (defined _MSC_VER)) -#define SYMBOL(x) binary_classpath_jar_##x -#else -#define SYMBOL(x) _binary_classpath_jar_##x -#endif - -extern "C" { -extern const uint8_t SYMBOL(start)[]; -extern const uint8_t SYMBOL(end)[]; - -AVIAN_EXPORT const uint8_t* classpathJar(size_t* size) -{ - *size = SYMBOL(end) - SYMBOL(start); - return SYMBOL(start); -} -} - -#undef SYMBOL - -#endif // BOOT_CLASSPATH diff --git a/sgx-jvm/avian/src/bootimage-fields.cpp b/sgx-jvm/avian/src/bootimage-fields.cpp deleted file mode 100644 index 1cd72c73ea..0000000000 --- a/sgx-jvm/avian/src/bootimage-fields.cpp +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef FIELD -#define FIELD(name) -#define FIELD_DEFINED -#endif - -FIELD(magic) - -FIELD(initialized) - -FIELD(heapSize) -FIELD(codeSize) - -FIELD(bootClassCount) -FIELD(appClassCount) -FIELD(stringCount) -FIELD(callCount) - -FIELD(bootLoader) -FIELD(appLoader) -FIELD(types) -FIELD(methodTree) -FIELD(methodTreeSentinal) -FIELD(virtualThunks) - -#ifdef FIELD_DEFINED -#undef FIELD -#undef FIELD_DEFINED -#endif - -#ifndef THUNK_FIELD -#define THUNK_FIELD(name) -#define THUNK_FIELD_DEFINED -#endif - -THUNK_FIELD(default_); -THUNK_FIELD(defaultVirtual); -THUNK_FIELD(defaultDynamic); -THUNK_FIELD(native); -THUNK_FIELD(aioob); -THUNK_FIELD(stackOverflow); -THUNK_FIELD(table); - -#ifdef THUNK_FIELD_DEFINED -#undef THUNK_FIELD -#undef THUNK_FIELD_DEFINED -#endif diff --git a/sgx-jvm/avian/src/bootimage-template.cpp b/sgx-jvm/avian/src/bootimage-template.cpp deleted file mode 100644 index 16dd85e11e..0000000000 --- a/sgx-jvm/avian/src/bootimage-template.cpp +++ /dev/null @@ -1,26 +0,0 @@ -const unsigned NAME(BootMask) = (~static_cast(0)) - / NAME(BytesPerWord); - -const unsigned NAME(BootShift) UNUSED = 32 - avian::util::log(NAME(BytesPerWord)); - -inline unsigned LABEL(codeMapSize)(unsigned codeSize) -{ - return avian::util::ceilingDivide(codeSize, TargetBitsPerWord) - * TargetBytesPerWord; -} - -inline unsigned LABEL(heapMapSize)(unsigned heapSize) -{ - return avian::util::ceilingDivide(heapSize, - TargetBitsPerWord * TargetBytesPerWord) - * TargetBytesPerWord; -} - -inline object LABEL(bootObject)(LABEL(uintptr_t) * heap, unsigned offset) -{ - if (offset) { - return reinterpret_cast(heap + offset - 1); - } else { - return 0; - } -} diff --git a/sgx-jvm/avian/src/builtin.cpp b/sgx-jvm/avian/src/builtin.cpp deleted file mode 100644 index fc5516c006..0000000000 --- a/sgx-jvm/avian/src/builtin.cpp +++ /dev/null @@ -1,1405 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/machine.h" -#include "avian/constants.h" -#include "avian/processor.h" -#include "avian/util.h" - -#include - -using namespace vm; - -namespace { - -int64_t search(Thread* t, - GcClassLoader* loader, - GcString* name, - GcClass* (*op)(Thread*, GcClassLoader*, GcByteArray*), - bool replaceDots) -{ - if (LIKELY(name)) { - PROTECT(t, loader); - PROTECT(t, name); - - GcByteArray* n = makeByteArray(t, name->length(t) + 1); - char* s = reinterpret_cast(n->body().begin()); - stringChars(t, name, s); - - if (replaceDots) { - replace('.', '/', s); - } - - return reinterpret_cast(op(t, loader, n)); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -GcClass* resolveSystemClassThrow(Thread* t, - GcClassLoader* loader, - GcByteArray* spec) -{ - return resolveSystemClass( - t, loader, spec, true, GcClassNotFoundException::Type); -} - -GcField* fieldForOffsetInClass(Thread* t, GcClass* c, unsigned offset) -{ - GcClass* super = c->super(); - if (super) { - GcField* field = fieldForOffsetInClass(t, super, offset); - if (field) { - return field; - } - } - - object table = c->fieldTable(); - if (table) { - for (unsigned i = 0; i < objectArrayLength(t, table); ++i) { - GcField* field = cast(t, objectArrayBody(t, table, i)); - if ((field->flags() & ACC_STATIC) == 0 and field->offset() == offset) { - return field; - } - } - } - - return 0; -} - -GcField* fieldForOffset(Thread* t, object o, unsigned offset) -{ - GcClass* c = objectClass(t, o); - if (c->vmFlags() & SingletonFlag) { - GcSingleton* s = cast(t, o); - - // If the object is a Singleton, we assume it's the static table of a class - - // which will always have the parent class as the first (0th) element. - c = cast(t, singletonObject(t, s, 0)); - - object table = c->fieldTable(); - if (table) { - for (unsigned i = 0; i < objectArrayLength(t, table); ++i) { - GcField* field = cast(t, objectArrayBody(t, table, i)); - if ((field->flags() & ACC_STATIC) and field->offset() == offset) { - return field; - } - } - } - abort(t); - } else { - GcField* field = fieldForOffsetInClass(t, c, offset); - if (field) { - return field; - } else { - abort(t); - } - } -} - -} // namespace - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_toVMClass(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - cast(t, reinterpret_cast(arguments[0]))->vmClass()); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_toVMMethod(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast(t->m->classpath->getVMMethod( - t, cast(t, reinterpret_cast(arguments[0])))); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_Classes_initialize(Thread* t, object, uintptr_t* arguments) -{ - GcClass* this_ = cast(t, reinterpret_cast(arguments[0])); - - initClass(t, this_); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_Classes_acquireClassLock(Thread* t, object, uintptr_t*) -{ - acquire(t, t->m->classLock); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_Classes_releaseClassLock(Thread* t, object, uintptr_t*) -{ - release(t, t->m->classLock); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_resolveVMClass(Thread* t, object, uintptr_t* arguments) -{ - GcClassLoader* loader - = cast(t, reinterpret_cast(arguments[0])); - GcByteArray* spec - = cast(t, reinterpret_cast(arguments[1])); - - return reinterpret_cast( - resolveClass(t, loader, spec, true, GcClassNotFoundException::Type)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_defineVMClass(Thread* t, object, uintptr_t* arguments) -{ - GcClassLoader* loader - = cast(t, reinterpret_cast(arguments[0])); - GcByteArray* b = cast(t, reinterpret_cast(arguments[1])); - int offset = arguments[2]; - int length = arguments[3]; - - uint8_t* buffer = static_cast(t->m->heap->allocate(length)); - - THREAD_RESOURCE2( - t, uint8_t*, buffer, int, length, t->m->heap->free(buffer, length)); - - memcpy(buffer, &b->body()[offset], length); - - return reinterpret_cast(defineClass(t, loader, buffer, length)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_makeString(Thread* t, object, uintptr_t* arguments) -{ - GcByteArray* array - = cast(t, reinterpret_cast(arguments[0])); - int offset = arguments[1]; - int length = arguments[2]; - - return reinterpret_cast( - t->m->classpath->makeString(t, array, offset, length)); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_SystemClassLoader_startBlacklisting0(Thread *t, - object, - uintptr_t* arguments) -{ - GcThread *jt = cast(t, reinterpret_cast(arguments[0])); - if (jt == NULL) { - throwNew(t, GcNullPointerException::Type); - } - jt->setBlacklisting(t, 1); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_appLoader(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(roots(t)->appLoader()); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_findLoadedVMClass(Thread* t, - object, - uintptr_t* arguments) -{ - GcClassLoader* loader - = cast(t, reinterpret_cast(arguments[0])); - GcString* name = cast(t, reinterpret_cast(arguments[1])); - - return search(t, loader, name, findLoadedClass, true); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_vmClass(Thread* t, - object, - uintptr_t* arguments) -{ - return reinterpret_cast( - cast(t, reinterpret_cast(arguments[0]))->vmClass()); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_findVMClass(Thread* t, - object, - uintptr_t* arguments) -{ - GcClassLoader* loader - = cast(t, reinterpret_cast(arguments[0])); - GcString* name = cast(t, reinterpret_cast(arguments[1])); - - return search(t, loader, name, resolveSystemClassThrow, true); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_resourceURLPrefix(Thread* t, - object, - uintptr_t* arguments) -{ - GcClassLoader* loader - = cast(t, reinterpret_cast(arguments[0])); - GcString* name = cast(t, reinterpret_cast(arguments[1])); - - if (LIKELY(name)) { - THREAD_RUNTIME_ARRAY(t, char, n, name->length(t) + 1); - stringChars(t, name, RUNTIME_ARRAY_BODY(n)); - - const char* name - = static_cast(loader->as(t)->finder()) - ->urlPrefix(RUNTIME_ARRAY_BODY(n)); - - return name ? reinterpret_cast(makeString(t, "%s", name)) : 0; - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_00024ResourceEnumeration_nextResourceURLPrefix( - Thread* t, - object, - uintptr_t* arguments) -{ - GcClassLoader* loader - = cast(t, reinterpret_cast(arguments[1])); - GcString* name = cast(t, reinterpret_cast(arguments[2])); - GcLongArray* finderElementPtrPtr - = cast(t, reinterpret_cast(arguments[3])); - - if (LIKELY(name) && LIKELY(finderElementPtrPtr)) { - THREAD_RUNTIME_ARRAY(t, char, n, name->length(t) + 1); - stringChars(t, name, RUNTIME_ARRAY_BODY(n)); - - void*& finderElementPtr - = reinterpret_cast(finderElementPtrPtr->body()[0]); - const char* name - = static_cast(loader->as(t)->finder()) - ->nextUrlPrefix(RUNTIME_ARRAY_BODY(n), finderElementPtr); - - return name ? reinterpret_cast(makeString(t, "%s", name)) : 0; - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_getClass(Thread* t, - object, - uintptr_t* arguments) -{ - return reinterpret_cast( - getJClass(t, cast(t, reinterpret_cast(arguments[0])))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_getPackageSource(Thread* t, - object, - uintptr_t* arguments) -{ - GcString* name = cast(t, reinterpret_cast(arguments[0])); - PROTECT(t, name); - - ACQUIRE(t, t->m->classLock); - - THREAD_RUNTIME_ARRAY(t, char, chars, name->length(t) + 2); - stringChars(t, name, RUNTIME_ARRAY_BODY(chars)); - replace('.', '/', RUNTIME_ARRAY_BODY(chars)); - RUNTIME_ARRAY_BODY(chars)[name->length(t)] = '/'; - RUNTIME_ARRAY_BODY(chars)[name->length(t) + 1] = 0; - - GcByteArray* key = makeByteArray(t, RUNTIME_ARRAY_BODY(chars)); - - GcByteArray* array = cast( - t, - hashMapFind( - t, roots(t)->packageMap(), key, byteArrayHash, byteArrayEqual)); - - if (array) { - return reinterpret_cast(makeLocalReference( - t, t->m->classpath->makeString(t, array, 0, array->length()))); - } else { - return 0; - } -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_Machine_dumpHeap(Thread* t, object, uintptr_t* arguments) -{ - GcString* outputFile - = static_cast(reinterpret_cast(*arguments)); - - unsigned length = outputFile->length(t); - THREAD_RUNTIME_ARRAY(t, char, n, length + 1); - stringChars(t, outputFile, RUNTIME_ARRAY_BODY(n)); - FILE* out = vm::fopen(RUNTIME_ARRAY_BODY(n), "wb"); - if (out) { - { - ENTER(t, Thread::ExclusiveState); - dumpHeap(t, out); - } - fclose(out); - } else { - throwNew(t, - GcRuntimeException::Type, - "file not found: %s", - RUNTIME_ARRAY_BODY(n)); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Machine_tryNative(Thread* t, object, uintptr_t* arguments) -{ - int64_t function; - memcpy(&function, arguments, 8); - int64_t argument; - memcpy(&argument, arguments + 2, 8); - - t->setFlag(Thread::TryNativeFlag); - THREAD_RESOURCE0(t, t->clearFlag(Thread::TryNativeFlag)); - - return reinterpret_cast(function)(argument); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Runtime_exit(Thread* t, object, uintptr_t* arguments) -{ - shutDown(t); - - t->m->system->exit(arguments[1]); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Runtime_freeMemory(Thread* t, object, uintptr_t*) -{ - return t->m->heap->remaining(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Runtime_totalMemory(Thread* t, object, uintptr_t*) -{ - return t->m->heap->limit(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Runtime_maxMemory(Thread* t, object, uintptr_t*) -{ - return t->m->heap->limit(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_avianvmresource_Handler_00024ResourceInputStream_getContentLength( - Thread* t, - object, - uintptr_t* arguments) -{ - GcString* path = cast(t, reinterpret_cast(*arguments)); - - if (LIKELY(path)) { - THREAD_RUNTIME_ARRAY(t, char, p, path->length(t) + 1); - stringChars(t, path, RUNTIME_ARRAY_BODY(p)); - - System::Region* r = t->m->bootFinder->find(RUNTIME_ARRAY_BODY(p)); - if (r == 0) { - r = t->m->appFinder->find(RUNTIME_ARRAY_BODY(p)); - } - - if (r) { - jint rSize = r->length(); - r->dispose(); - return rSize; - } - } - return -1; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_avianvmresource_Handler_00024ResourceInputStream_open( - Thread* t, - object, - uintptr_t* arguments) -{ - GcString* path = cast(t, reinterpret_cast(*arguments)); - - if (LIKELY(path)) { - THREAD_RUNTIME_ARRAY(t, char, p, path->length(t) + 1); - stringChars(t, path, RUNTIME_ARRAY_BODY(p)); - - System::Region* r = t->m->bootFinder->find(RUNTIME_ARRAY_BODY(p)); - if (r == 0) { - r = t->m->appFinder->find(RUNTIME_ARRAY_BODY(p)); - } - - return reinterpret_cast(r); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_avianvmresource_Handler_00024ResourceInputStream_available( - Thread*, - object, - uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - int32_t position = arguments[2]; - - System::Region* region = reinterpret_cast(peer); - return static_cast(region->length()) - position; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_avianvmresource_Handler_00024ResourceInputStream_read__JI( - Thread*, - object, - uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - int32_t position = arguments[2]; - - System::Region* region = reinterpret_cast(peer); - if (position >= static_cast(region->length())) { - return -1; - } else { - return region->start()[position]; - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_avianvmresource_Handler_00024ResourceInputStream_read__JI_3BII( - Thread* t, - object, - uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - int32_t position = arguments[2]; - GcByteArray* buffer - = cast(t, reinterpret_cast(arguments[3])); - int32_t offset = arguments[4]; - int32_t length = arguments[5]; - - if (length == 0) - return 0; - - System::Region* region = reinterpret_cast(peer); - if (length > static_cast(region->length()) - position) { - length = static_cast(region->length()) - position; - } - if (length <= 0) { - return -1; - } else { - memcpy(&buffer->body()[offset], region->start() + position, length); - return length; - } -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_avianvmresource_Handler_00024ResourceInputStream_close( - Thread*, - object, - uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - reinterpret_cast(peer)->dispose(); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_Continuations_callWithCurrentContinuation(Thread* t, - object, - uintptr_t* arguments) -{ - t->m->processor->callWithCurrentContinuation( - t, reinterpret_cast(*arguments)); - - abort(t); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_Continuations_dynamicWind2(Thread* t, - object, - uintptr_t* arguments) -{ - t->m->processor->dynamicWind(t, - reinterpret_cast(arguments[0]), - reinterpret_cast(arguments[1]), - reinterpret_cast(arguments[2])); - - abort(t); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_Continuations_00024Continuation_handleResult( - Thread* t, - object, - uintptr_t* arguments) -{ - t->m->processor->feedResultToContinuation( - t, - cast(t, reinterpret_cast(arguments[0])), - reinterpret_cast(arguments[1])); - - abort(t); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_avian_Continuations_00024Continuation_handleException( - Thread* t, - object, - uintptr_t* arguments) -{ - t->m->processor->feedExceptionToContinuation( - t, - cast(t, reinterpret_cast(arguments[0])), - cast(t, reinterpret_cast(arguments[1]))); - - abort(t); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Singleton_getObject(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast(singletonObject( - t, - cast(t, reinterpret_cast(arguments[0])), - arguments[1])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Singleton_getInt(Thread* t, object, uintptr_t* arguments) -{ - return singletonValue( - t, - cast(t, reinterpret_cast(arguments[0])), - arguments[1]); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Singleton_getLong(Thread* t, object, uintptr_t* arguments) -{ - int64_t v; - memcpy(&v, - &singletonValue( - t, - cast(t, reinterpret_cast(arguments[0])), - arguments[1]), - 8); - return v; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_allocateMemory(Thread* t, - object, - uintptr_t* arguments) -{ - int64_t size; - memcpy(&size, arguments + 1, 8); - void* p = malloc(size); - if (p) { - return reinterpret_cast(p); - } else { - throwNew(t, GcOutOfMemoryError::Type); - } -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_freeMemory(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - if (p) { - free(reinterpret_cast(p)); - } -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_setMemory(Thread* t, object, uintptr_t* arguments) -{ - object base = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int64_t count; - memcpy(&count, arguments + 4, 8); - int8_t value = arguments[6]; - - PROTECT(t, base); - - ACQUIRE(t, t->m->referenceLock); - - if (base) { - memset(&fieldAtOffset(base, offset), value, count); - } else { - memset(reinterpret_cast(offset), value, count); - } -} - -// NB: The following primitive get/put methods are only used by the -// interpreter. The JIT/AOT compiler implements them as intrinsics, -// so these versions will be ignored. - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putByte__JB(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - int8_t v = arguments[3]; - - *reinterpret_cast(p) = v; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putShort__JS(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - int16_t v = arguments[3]; - - *reinterpret_cast(p) = v; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putChar__JC(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putShort__JS(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putInt__JI(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - int32_t v = arguments[3]; - - *reinterpret_cast(p) = v; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putFloat__JF(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putInt__JI(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putLong__JJ(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - int64_t v; - memcpy(&v, arguments + 3, 8); - - *reinterpret_cast(p) = v; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putDouble__JD(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putLong__JJ(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putAddress__JJ(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - int64_t v; - memcpy(&v, arguments + 3, 8); - - *reinterpret_cast(p) = v; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getByte__J(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - - return *reinterpret_cast(p); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getShort__J(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - - return *reinterpret_cast(p); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getChar__J(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getShort__J(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getInt__J(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - - return *reinterpret_cast(p); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getFloat__J(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getInt__J(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getLong__J(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - - return *reinterpret_cast(p); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getDouble__J(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getLong__J(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getAddress__J(Thread*, object, uintptr_t* arguments) -{ - int64_t p; - memcpy(&p, arguments + 1, 8); - - return *reinterpret_cast(p); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_copyMemory(Thread* t, object, uintptr_t* arguments) -{ - object srcBase = reinterpret_cast(arguments[1]); - int64_t srcOffset; - memcpy(&srcOffset, arguments + 2, 8); - object dstBase = reinterpret_cast(arguments[4]); - int64_t dstOffset; - memcpy(&dstOffset, arguments + 5, 8); - int64_t count; - memcpy(&count, arguments + 7, 8); - - PROTECT(t, srcBase); - PROTECT(t, dstBase); - - ACQUIRE(t, t->m->referenceLock); - - void* src = srcBase ? &fieldAtOffset(srcBase, srcOffset) - : reinterpret_cast(srcOffset); - - void* dst = dstBase ? &fieldAtOffset(dstBase, dstOffset) - : reinterpret_cast(dstOffset); - - memcpy(dst, src, count); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_arrayBaseOffset(Thread*, object, uintptr_t*) -{ - return ArrayBody; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_arrayIndexScale(Thread* t, - object, - uintptr_t* arguments) -{ - GcClass* c - = cast(t, reinterpret_cast(arguments[1]))->vmClass(); - - if (c == type(t, GcBooleanArray::Type) || c == type(t, GcByteArray::Type)) - return 1; - else if (c == type(t, GcShortArray::Type) || c == type(t, GcCharArray::Type)) - return 2; - else if (c == type(t, GcIntArray::Type) || c == type(t, GcFloatArray::Type)) - return 4; - else if (c == type(t, GcLongArray::Type) || c == type(t, GcDoubleArray::Type)) - return 8; - else - return BytesPerWord; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_nio_FixedArrayByteBuffer_allocateFixed(Thread* t, - object, - uintptr_t* arguments) -{ - int capacity = arguments[0]; - GcLongArray* address - = cast(t, reinterpret_cast(arguments[1])); - PROTECT(t, address); - - GcArray* array = reinterpret_cast(allocate3( - t, t->m->heap, Machine::FixedAllocation, ArrayBody + capacity, false)); - - setObjectClass( - t, reinterpret_cast(array), type(t, GcByteArray::Type)); - array->length() = capacity; - - address->body()[0] = reinterpret_cast(array) + ArrayBody; - - return reinterpret_cast(array); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getObject(Thread*, object, uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - return fieldAtOffset(o, offset); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putObject(Thread* t, object, uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - uintptr_t value = arguments[4]; - - setField(t, o, offset, reinterpret_cast(value)); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putObjectVolatile(Thread* t, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - object value = reinterpret_cast(arguments[4]); - - storeStoreMemoryBarrier(); - setField(t, o, offset, value); - storeLoadMemoryBarrier(); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putOrderedObject(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putObjectVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getObjectVolatile(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - uintptr_t value = fieldAtOffset(o, offset); - loadMemoryBarrier(); - return value; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_compareAndSwapObject(Thread* t, - object, - uintptr_t* arguments) -{ - object target = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - uintptr_t expect = arguments[4]; - uintptr_t update = arguments[5]; - - bool success = atomicCompareAndSwap( - &fieldAtOffset(target, offset), expect, update); - - if (success) { - mark(t, target, offset); - } - - return success; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_compareAndSwapInt(Thread*, - object, - uintptr_t* arguments) -{ - object target = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - uint32_t expect = arguments[4]; - uint32_t update = arguments[5]; - - return atomicCompareAndSwap32( - &fieldAtOffset(target, offset), expect, update); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_compareAndSwapLong(Thread* t UNUSED, - object, - uintptr_t* arguments) -{ - object target = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - uint64_t expect; - memcpy(&expect, arguments + 4, 8); - uint64_t update; - memcpy(&update, arguments + 6, 8); - -#ifdef AVIAN_HAS_CAS64 - return atomicCompareAndSwap64( - &fieldAtOffset(target, offset), expect, update); -#else - PROTECT(t, target); - ACQUIRE_FIELD_FOR_WRITE(t, fieldForOffset(t, target, offset)); - if (fieldAtOffset(target, offset) == expect) { - fieldAtOffset(target, offset) = update; - return true; - } else { - return false; - } -#endif -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getLongVolatile(Thread* t, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - object lock; - if (BytesPerWord < 8) { - if (objectClass(t, o)->arrayDimensions()) { - lock = objectClass(t, o); - } else { - lock = fieldForOffset(t, cast(t, o), offset); - } - - PROTECT(t, o); - PROTECT(t, lock); - acquire(t, lock); - } - - int64_t result = fieldAtOffset(o, offset); - - if (BytesPerWord < 8) { - release(t, lock); - } else { - loadMemoryBarrier(); - } - - return result; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putLongVolatile(Thread* t, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int64_t value; - memcpy(&value, arguments + 4, 8); - - object lock; - if (BytesPerWord < 8) { - if (objectClass(t, o)->arrayDimensions()) { - lock = objectClass(t, o); - } else { - lock = fieldForOffset(t, cast(t, o), offset); - } - - PROTECT(t, o); - PROTECT(t, lock); - acquire(t, lock); - } else { - storeStoreMemoryBarrier(); - } - - fieldAtOffset(o, offset) = value; - - if (BytesPerWord < 8) { - release(t, lock); - } else { - storeLoadMemoryBarrier(); - } -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putOrderedLong(Thread* t, - object method, - uintptr_t* arguments) -{ - // todo: we might be able to use weaker barriers here than - // putLongVolatile does - Avian_sun_misc_Unsafe_putLongVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_unpark(Thread* t, object, uintptr_t* arguments) -{ - GcThread* thread = cast(t, reinterpret_cast(arguments[1])); - - monitorAcquire(t, cast(t, interruptLock(t, thread))); - thread->unparked() = true; - monitorNotify(t, cast(t, interruptLock(t, thread))); - monitorRelease(t, cast(t, interruptLock(t, thread))); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_park(Thread* t, object, uintptr_t* arguments) -{ - bool absolute = arguments[1]; - int64_t time; - memcpy(&time, arguments + 2, 8); - - int64_t then = t->m->system->now(); - - if (absolute) { - time -= then; - if (time <= 0) { - return; - } - } else if (time) { - // if not absolute, interpret time as nanoseconds, but make sure - // it doesn't become zero when we convert to milliseconds, since - // zero is interpreted as infinity below - time = (time / (1000 * 1000)) + 1; - } - - monitorAcquire(t, cast(t, interruptLock(t, t->javaThread))); - bool interrupted = false; - while (time >= 0 - and (not(t->javaThread->unparked() or t->javaThread->interrupted() - or (interrupted = monitorWait( - t, - cast(t, interruptLock(t, t->javaThread)), - time))))) { - int64_t now = t->m->system->now(); - time -= now - then; - then = now; - - if (time == 0) { - break; - } - } - if (interrupted) { - t->javaThread->interrupted() = true; - } - t->javaThread->unparked() = false; - monitorRelease(t, cast(t, interruptLock(t, t->javaThread))); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putIntVolatile(Thread*, object, uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int32_t value = arguments[4]; - - storeStoreMemoryBarrier(); - fieldAtOffset(o, offset) = value; - storeLoadMemoryBarrier(); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putOrderedInt(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putIntVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getIntVolatile(Thread*, object, uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - int32_t result = fieldAtOffset(o, offset); - loadMemoryBarrier(); - return result; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putByteVolatile(Thread*, object, uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int8_t value = arguments[4]; - - storeStoreMemoryBarrier(); - fieldAtOffset(o, offset) = value; - storeLoadMemoryBarrier(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getByteVolatile(Thread*, object, uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - int8_t result = fieldAtOffset(o, offset); - loadMemoryBarrier(); - return result; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putBooleanVolatile(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putByteVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getBooleanVolatile(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getByteVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putShortVolatile(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int16_t value = arguments[4]; - - storeStoreMemoryBarrier(); - fieldAtOffset(o, offset) = value; - storeLoadMemoryBarrier(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getShortVolatile(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - int16_t result = fieldAtOffset(o, offset); - loadMemoryBarrier(); - return result; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putCharVolatile(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putShortVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getCharVolatile(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getShortVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putFloatVolatile(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putIntVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getFloatVolatile(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getIntVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putDoubleVolatile(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_sun_misc_Unsafe_putLongVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getDoubleVolatile(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getLongVolatile(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_throwException(Thread* t, - object, - uintptr_t* arguments) -{ - vm::throw_(t, cast(t, reinterpret_cast(arguments[1]))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_primitiveClass(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast(primitiveClass(t, arguments[0])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Class_getEnclosingMethod(Thread* t, - object, - uintptr_t* arguments) -{ - GcClass* c - = cast(t, reinterpret_cast(arguments[0]))->vmClass(); - PROTECT(t, c); - - GcClassAddendum* addendum = c->addendum(); - if (addendum) { - PROTECT(t, addendum); - - GcByteArray* enclosingClass - = cast(t, addendum->enclosingClass()); - - if (enclosingClass) { - GcClass* enclosing = resolveClass(t, c->loader(), enclosingClass); - - GcPair* enclosingMethod = cast(t, addendum->enclosingMethod()); - - if (enclosingMethod) { - return reinterpret_cast(t->m->classpath->makeJMethod( - t, - cast( - t, - findMethodInClass( - t, - enclosing, - cast(t, enclosingMethod->first()), - cast(t, enclosingMethod->second()))))); - } - } - } - return 0; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Class_getEnclosingClass(Thread* t, - object, - uintptr_t* arguments) -{ - GcClass* c - = cast(t, reinterpret_cast(arguments[0]))->vmClass(); - PROTECT(t, c); - - GcClassAddendum* addendum = c->addendum(); - if (addendum) { - GcByteArray* enclosingClass - = cast(t, addendum->enclosingClass()); - - if (enclosingClass) { - return reinterpret_cast( - getJClass(t, resolveClass(t, c->loader(), enclosingClass))); - } - } - return 0; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Class_getEnclosingConstructor(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_java_lang_Class_getEnclosingMethod(t, method, arguments); -} - - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Object_toString(Thread* t, object, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - - unsigned hash = objectHash(t, this_); - GcString* s = makeString( - t, "%s@0x%x", objectClass(t, this_)->name()->body().begin(), hash); - - return reinterpret_cast(s); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Object_getVMClass(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - objectClass(t, reinterpret_cast(arguments[0]))); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Object_wait(Thread* t, object, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - int64_t milliseconds; - memcpy(&milliseconds, arguments + 1, 8); - - vm::wait(t, this_, milliseconds); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Object_notify(Thread* t, object, uintptr_t* arguments) -{ - notify(t, reinterpret_cast(arguments[0])); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Object_notifyAll(Thread* t, object, uintptr_t* arguments) -{ - notifyAll(t, reinterpret_cast(arguments[0])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Object_hashCode(Thread* t, object, uintptr_t* arguments) -{ - return objectHash(t, reinterpret_cast(arguments[0])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Object_clone(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - clone(t, reinterpret_cast(arguments[0]))); -} diff --git a/sgx-jvm/avian/src/classpath-android.cpp b/sgx-jvm/avian/src/classpath-android.cpp deleted file mode 100644 index c5db8be5e8..0000000000 --- a/sgx-jvm/avian/src/classpath-android.cpp +++ /dev/null @@ -1,1680 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -using namespace std; - -struct JavaVM; -struct _JavaVM; -struct _JNIEnv; - -struct JniConstants { - static void init(_JNIEnv* env); -}; - -extern "C" int JNI_OnLoad(JavaVM*, void*); - -int libconscrypt_JNI_OnLoad(_JavaVM*, void*); - -#define _POSIX_C_SOURCE 200112L -#undef _GNU_SOURCE -#include "avian/machine.h" -#include "avian/classpath-common.h" -#include "avian/process.h" -#include "avian/util.h" - -#ifdef PLATFORM_WINDOWS -const char* getErrnoDescription( - int err); // This function is defined in mingw-extensions.cpp -#endif - -using namespace vm; - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_defineVMClass(Thread*, object, uintptr_t*); - -namespace { - -namespace local { - -void* getDirectBufferAddress(Thread* t, object b) -{ - PROTECT(t, b); - - GcField* field - = resolveField(t, objectClass(t, b), "effectiveDirectAddress", "J"); - - return reinterpret_cast(fieldAtOffset(b, field->offset())); -} - -void JNICALL loadLibrary(Thread* t, object, uintptr_t* arguments) -{ - GcString* name = cast(t, reinterpret_cast(arguments[1])); - - Thread::LibraryLoadStack stack( - t, cast(t, reinterpret_cast(arguments[2]))); - - unsigned length = name->length(t); - THREAD_RUNTIME_ARRAY(t, char, n, length + 1); - stringChars(t, name, RUNTIME_ARRAY_BODY(n)); - - /* org_conscrypt_NativeCrypto.o is linked statically, and in Avian build - the package is named org.conscrypt.NativeCrypto. When Android code sees - that name it thinks the library isn't linked as a part of Android, so it - tries to load in dynamically, but there's actually no need to, so we - just ignore this request. */ - if (strcmp(RUNTIME_ARRAY_BODY(n), "conscrypt_jni") != 0) { - loadLibrary(t, "", RUNTIME_ARRAY_BODY(n), true, true); - } -} - -void JNICALL gc(Thread* t, object, uintptr_t*) -{ - collect(t, Heap::MajorCollection); -} - -void JNICALL finalizeAllEnqueued(Thread*, object, uintptr_t*) -{ - // ignore -} - -int64_t JNICALL appLoader(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(roots(t)->appLoader()); -} - -int64_t JNICALL defineClass(Thread* t, object method, uintptr_t* arguments) -{ - uintptr_t args[] = {arguments[0], arguments[2], arguments[3], arguments[4]}; - - int64_t v = Avian_avian_Classes_defineVMClass(t, method, args); - - if (v) { - return reinterpret_cast( - getJClass(t, cast(t, reinterpret_cast(v)))); - } else { - return 0; - } -} - -int64_t JNICALL mapData(Thread*, object, uintptr_t*); - -void JNICALL closeMemoryMappedFile(Thread*, GcMethod*, uintptr_t*); - -object translateStackTrace(Thread* t, object raw) -{ - PROTECT(t, raw); - - object array = makeObjectArray( - t, - resolveClass(t, roots(t)->bootLoader(), "java/lang/StackTraceElement"), - objectArrayLength(t, raw)); - PROTECT(t, array); - - for (unsigned i = 0; i < objectArrayLength(t, array); ++i) { - GcStackTraceElement* e = makeStackTraceElement( - t, cast(t, objectArrayBody(t, raw, i))); - - setField(t, array, ArrayBody + (i * BytesPerWord), e); - } - - return array; -} - -class MyClasspath : public Classpath { - public: - MyClasspath(Allocator* allocator) - : allocator(allocator), tzdata(0), mayInitClasses_(false) - { - } - - virtual GcJclass* makeJclass(Thread* t, GcClass* class_) - { - PROTECT(t, class_); - - GcJclass* c - = reinterpret_cast(allocate(t, GcJclass::FixedSize, true)); - setObjectClass(t, c, type(t, GcJclass::Type)); - c->setVmClass(t, class_); - - return c; - } - - virtual GcString* makeString(Thread* t, - object array, - int32_t offset, - int32_t length) - { - if (objectClass(t, array) == type(t, GcByteArray::Type)) { - GcByteArray* byteArray = cast(t, array); - PROTECT(t, byteArray); - - assertT(t, offset + length <= static_cast(byteArray->length())); - - GcCharArray* charArray = makeCharArray(t, length); - for (int i = 0; i < length; ++i) { - expect(t, (byteArray->body()[offset + i] & 0x80) == 0); - - charArray->body()[i] = byteArray->body()[offset + i]; - } - - array = charArray; - offset = 0; - } else { - expect(t, objectClass(t, array) == type(t, GcCharArray::Type)); - - assertT(t, - offset + length - <= static_cast(cast(t, array)->length())); - } - - return vm::makeString(t, array, offset, length, 0); - } - - virtual GcThread* makeThread(Thread* t, Thread* parent) - { - const unsigned NormalPriority = 5; - - GcThreadGroup* group = 0; - PROTECT(t, group); - if (parent) { - group = parent->javaThread->group(); - } else { - resolveSystemClass(t, - roots(t)->bootLoader(), - type(t, GcThreadGroup::Type)->name(), - false); - - group = cast(t, makeNew(t, type(t, GcThreadGroup::Type))); - - GcMethod* constructor - = resolveMethod(t, type(t, GcThreadGroup::Type), "", "()V"); - - t->m->processor->invoke(t, constructor, group); - } - - resolveSystemClass( - t, roots(t)->bootLoader(), type(t, GcThread::Type)->name(), false); - - GcThread* thread = cast(t, makeNew(t, type(t, GcThread::Type))); - PROTECT(t, thread); - - GcMethod* constructor - = resolveMethod(t, - type(t, GcThread::Type), - "", - "(Ljava/lang/ThreadGroup;Ljava/lang/String;IZ)V"); - - t->m->processor->invoke( - t, constructor, thread, group, 0, NormalPriority, false); - - thread->setContextClassLoader(t, roots(t)->appLoader()); - - return thread; - } - - virtual object makeJMethod(Thread* t, GcMethod* vmMethod) - { - PROTECT(t, vmMethod); - - GcJmethod* jmethod = makeJmethod(t, vmMethod, false); - - return vmMethod->name()->body()[0] == '<' - ? static_cast(makeJconstructor(t, jmethod)) - : static_cast(jmethod); - } - - virtual GcMethod* getVMMethod(Thread* t, object jmethod) - { - return objectClass(t, jmethod) == type(t, GcJmethod::Type) - ? cast(t, jmethod)->vmMethod() - : cast(t, jmethod)->method()->vmMethod(); - } - - virtual object makeJField(Thread* t, GcField* vmField) - { - return makeJfield(t, vmField, false); - } - - virtual GcField* getVMField(Thread* t UNUSED, GcJfield* jfield) - { - return jfield->vmField(); - } - - virtual void clearInterrupted(Thread*) - { - // ignore - } - - virtual void runThread(Thread* t) - { - // force monitor creation so we don't get an OutOfMemory error - // later when we try to acquire it: - objectMonitor(t, t->javaThread->lock(), true); - - THREAD_RESOURCE0(t, { - vm::acquire(t, t->javaThread->lock()); - t->clearFlag(Thread::ActiveFlag); - t->javaThread->peer() = 0; - vm::notifyAll(t, t->javaThread->lock()); - vm::release(t, t->javaThread->lock()); - }); - - GcMethod* method = resolveMethod( - t, roots(t)->bootLoader(), "java/lang/Thread", "run", "()V"); - - t->m->processor->invoke(t, method, t->javaThread); - } - - virtual void resolveNative(Thread* t, GcMethod* method) - { - vm::resolveNative(t, method); - } - - void interceptMethods(Thread* t, bool updateRuntimeData) - { - { - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "java/lang/Runtime", false); - - if (c) { - PROTECT(t, c); - - intercept(t, - c, - "loadLibrary", - "(Ljava/lang/String;Ljava/lang/ClassLoader;)V", - voidPointer(loadLibrary), - updateRuntimeData); - } - } - - { - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "java/lang/System", false); - - if (c) { - PROTECT(t, c); - - intercept(t, c, "gc", "()V", voidPointer(gc), updateRuntimeData); - } - } - - { - GcClass* c = resolveClass( - t, roots(t)->bootLoader(), "java/lang/ref/FinalizerReference", false); - - if (c) { - PROTECT(t, c); - - intercept(t, - c, - "finalizeAllEnqueued", - "()V", - voidPointer(finalizeAllEnqueued), - updateRuntimeData); - } - } - - { - GcClass* c = resolveClass( - t, roots(t)->bootLoader(), "java/lang/ClassLoader", false); - - if (c) { - PROTECT(t, c); - - intercept(t, - c, - "createSystemClassLoader", - "()Ljava/lang/ClassLoader;", - voidPointer(appLoader), - updateRuntimeData); - - intercept(t, - c, - "defineClass", - "(Ljava/lang/String;[BII)Ljava/lang/Class;", - voidPointer(defineClass), - updateRuntimeData); - } - } - - { - GcClass* c = resolveClass( - t, roots(t)->bootLoader(), "libcore/util/ZoneInfoDB", false); - - if (c) { - PROTECT(t, c); - - intercept(t, - c, - "mapData", - "()Llibcore/io/MemoryMappedFile;", - voidPointer(mapData), - updateRuntimeData); - } - } - - { - GcClass* c = resolveClass( - t, roots(t)->bootLoader(), "libcore/io/MemoryMappedFile", false); - - if (c) { - PROTECT(t, c); - - intercept(t, - c, - "close", - "()V", - voidPointer(closeMemoryMappedFile), - updateRuntimeData); - } - } - } - - virtual void interceptMethods(Thread* t) - { - interceptMethods(t, false); - } - - virtual void preBoot(Thread* t) - { -// Android's System.initSystemProperties throws an NPE if -// LD_LIBRARY_PATH is not set as of this writing: -#ifdef PLATFORM_WINDOWS - _wputenv(L"LD_LIBRARY_PATH=(dummy)"); -#elif(!defined AVIAN_IOS) - setenv("LD_LIBRARY_PATH", "", false); -#endif - - interceptMethods(t, true); - - JniConstants::init(reinterpret_cast<_JNIEnv*>(t)); - - JNI_OnLoad(reinterpret_cast< ::JavaVM*>(t->m), 0); - - libconscrypt_JNI_OnLoad(reinterpret_cast< ::_JavaVM*>(t->m), 0); - - mayInitClasses_ = true; - } - - virtual bool mayInitClasses() - { - return mayInitClasses_; - } - - virtual void boot(Thread*) - { - // ignore - } - - virtual const char* bootClasspath() - { - return AVIAN_CLASSPATH; - } - - virtual object makeDirectByteBuffer(Thread* t, void* p, jlong capacity) - { - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "java/nio/DirectByteBuffer"); - PROTECT(t, c); - - object instance = makeNew(t, c); - PROTECT(t, instance); - - GcMethod* constructor = resolveMethod(t, c, "", "(JI)V"); - - t->m->processor->invoke(t, - constructor, - instance, - reinterpret_cast(p), - static_cast(capacity)); - - return instance; - } - - virtual void* getDirectBufferAddress(Thread* t, object b) - { - return local::getDirectBufferAddress(t, b); - } - - virtual int64_t getDirectBufferCapacity(Thread* t, object b) - { - PROTECT(t, b); - - GcField* field = resolveField(t, objectClass(t, b), "capacity", "I"); - - return fieldAtOffset(b, field->offset()); - } - - virtual bool canTailCall(Thread* t UNUSED, - GcMethod*, - GcByteArray* calleeClassName, - GcByteArray* calleeMethodName, - GcByteArray*) - { - // we can't tail call System.load[Library] or - // Runtime.load[Library] due to their use of - // ClassLoader.getCaller, which gets confused if we elide stack - // frames. - - return ( - (strcmp("loadLibrary", - reinterpret_cast(calleeMethodName->body().begin())) - and strcmp("load", - reinterpret_cast(calleeMethodName->body().begin()))) - or (strcmp("java/lang/System", - reinterpret_cast(calleeClassName->body().begin())) - and strcmp( - "java/lang/Runtime", - reinterpret_cast(calleeClassName->body().begin())))); - } - - virtual GcClassLoader* libraryClassLoader(Thread* t, GcMethod* caller) - { - return strcmp("java/lang/Runtime", - reinterpret_cast( - caller->class_()->name()->body().begin())) == 0 - ? t->libraryLoadStack->classLoader - : caller->class_()->loader(); - } - - virtual void shutDown(Thread*) - { - // ignore - } - - virtual void dispose() - { - if (tzdata) { - tzdata->dispose(); - } - allocator->free(this, sizeof(*this)); - } - - Allocator* allocator; - System::Region* tzdata; - bool mayInitClasses_; -}; - -int64_t JNICALL mapData(Thread* t, object, uintptr_t*) -{ - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "libcore/io/MemoryMappedFile"); - PROTECT(t, c); - - object instance = makeNew(t, c); - PROTECT(t, instance); - - GcMethod* constructor = resolveMethod(t, c, "", "(JJ)V"); - - const char* jar = "javahomeJar"; - Finder* finder = getFinder(t, jar, strlen(jar)); - if (finder) { - System::Region* r = finder->find("tzdata"); - if (r) { - MyClasspath* cp = static_cast(t->m->classpath); - - expect(t, cp->tzdata == 0); - - cp->tzdata = r; - - t->m->processor->invoke(t, - constructor, - instance, - reinterpret_cast(r->start()), - static_cast(r->length())); - - return reinterpret_cast(instance); - } - } - - throwNew(t, GcRuntimeException::Type); -} - -void JNICALL - closeMemoryMappedFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - object file = reinterpret_cast(arguments[0]); - PROTECT(t, file); - - MyClasspath* cp = static_cast(t->m->classpath); - - if (cp->tzdata) { - GcField* field = resolveField(t, objectClass(t, file), "address", "J"); - - if (fieldAtOffset(file, field->offset()) - == reinterpret_cast(cp->tzdata->start())) { - cp->tzdata->dispose(); - cp->tzdata = 0; - - fieldAtOffset(file, field->offset()) = 0; - return; - } - } - - t->m->processor->invoke(t, - cast(t, - getMethodRuntimeData(t, method) - ->native() - ->as(t) - ->original()), - file); -} - -} // namespace local - -} // namespace - -namespace vm { - -Classpath* makeClasspath(System*, - Allocator* allocator, - const char*, - const char*) -{ - return new (allocator->allocate(sizeof(local::MyClasspath))) - local::MyClasspath(allocator); -} - -} // namespace vm - -extern "C" int jniRegisterNativeMethods(JNIEnv* e, - const char* className, - const JNINativeMethod* methods, - int methodCount) -{ - jclass c = e->vtable->FindClass(e, className); - - if (c) { - e->vtable->RegisterNatives(e, c, methods, methodCount); - } else { - e->vtable->ExceptionClear(e); - } - - return 0; -} - -extern "C" void jniLogException(JNIEnv*, int, const char*, jthrowable) -{ - // ignore -} - -extern "C" int jniThrowException(JNIEnv* e, - const char* className, - const char* message) -{ - jclass c = e->vtable->FindClass(e, className); - - if (c) { - e->vtable->ThrowNew(e, c, message); - } - - return 0; -} - -extern "C" int jniThrowExceptionFmt(JNIEnv* e, - const char* className, - const char* format, - va_list args) -{ - const unsigned size = 4096; - char buffer[size]; - ::vsnprintf(buffer, size, format, args); - return jniThrowException(e, className, buffer); -} - -extern "C" int jniThrowNullPointerException(JNIEnv* e, const char* message) -{ - return jniThrowException(e, "java/lang/NullPointerException", message); -} - -extern "C" int jniThrowRuntimeException(JNIEnv* e, const char* message) -{ - return jniThrowException(e, "java/lang/RuntimeException", message); -} - -extern "C" int jniThrowIOException(JNIEnv* e, const char* message) -{ - return jniThrowException(e, "java/lang/IOException", message); -} - -extern "C" const char* jniStrError(int error, char* buffer, size_t length) -{ -#ifdef PLATFORM_WINDOWS - const char* s = getErrnoDescription(error); - if (strlen(s) < length) { - strncpy(buffer, s, length); - return buffer; - } else { - return 0; - } -#else - if (static_cast(strerror_r(error, buffer, length)) == 0) { - return buffer; - } else { - return 0; - } -#endif -} - -/* - * Android log priority values (as text) - */ -const char* const androidLogPriorityTitles[] = {"UNKNOWN", - "DEFAULT", - "VERBOSE", - "DEBUG", - "INFO", - "WARNING", - "ERROR", - "FATAL", - "SILENT"}; - -extern "C" int __android_log_print(int priority, - const char* tag, - const char* format, - ...) -{ - va_list a; - const unsigned size = 4096; - char buffer[size]; - - va_start(a, format); - ::vsnprintf(buffer, size, format, a); - va_end(a); - -#ifndef PLATFORM_WINDOWS - return printf( - "[%s] %s: %s\n", androidLogPriorityTitles[priority], tag, buffer); -#else - return __mingw_fprintf( - stderr, "[%s] %s: %s\n", androidLogPriorityTitles[priority], tag, buffer); -#endif -} - -extern "C" int jniGetFDFromFileDescriptor(JNIEnv* e, jobject descriptor) -{ - return e->vtable->GetIntField( - e, - descriptor, - e->vtable->GetFieldID(e, - e->vtable->FindClass(e, "java/io/FileDescriptor"), - "descriptor", - "I")); -} - -extern "C" void jniSetFileDescriptorOfFD(JNIEnv* e, - jobject descriptor, - int value) -{ - e->vtable->SetIntField( - e, - descriptor, - e->vtable->GetFieldID(e, - e->vtable->FindClass(e, "java/io/FileDescriptor"), - "descriptor", - "I"), - value); -} - -extern "C" jobject jniCreateFileDescriptor(JNIEnv* e, int fd) -{ - jobject descriptor = e->vtable->NewObject( - e, - e->vtable->FindClass(e, "java/io/FileDescriptor"), - e->vtable->GetMethodID(e, - e->vtable->FindClass(e, "java/io/FileDescriptor"), - "", - "()V")); - - jniSetFileDescriptorOfFD(e, descriptor, fd); - - return descriptor; -} - -int register_org_apache_harmony_dalvik_NativeTestTarget(_JNIEnv*) -{ - // ignore - return 0; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_String_compareTo(Thread* t, object, uintptr_t* arguments) -{ - GcString* a = cast(t, reinterpret_cast(arguments[0])); - GcString* b = cast(t, reinterpret_cast(arguments[1])); - - unsigned length = a->length(t); - if (length > b->length(t)) { - length = b->length(t); - } - - for (unsigned i = 0; i < length; ++i) { - int d = stringCharAt(t, a, i) - stringCharAt(t, b, i); - if (d) { - return d; - } - } - - return a->length(t) - b->length(t); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_String_isEmpty(Thread* t, object, uintptr_t* arguments) -{ - return cast(t, reinterpret_cast(arguments[0]))->length(t) - == 0; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_String_length(Thread* t, object, uintptr_t* arguments) -{ - return cast(t, reinterpret_cast(arguments[0]))->length(t); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_String_intern(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - intern(t, reinterpret_cast(arguments[0]))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_String_charAt(Thread* t, object, uintptr_t* arguments) -{ - return stringCharAt(t, - cast(t, reinterpret_cast(arguments[0])), - arguments[1]); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_String_equals(Thread* t, object, uintptr_t* arguments) -{ - return arguments[1] and stringEqual(t, - reinterpret_cast(arguments[0]), - reinterpret_cast(arguments[1])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_String_fastIndexOf(Thread* t, object, uintptr_t* arguments) -{ - GcString* s = cast(t, reinterpret_cast(arguments[0])); - unsigned c = arguments[1]; - unsigned start = arguments[2]; - - for (unsigned i = start; i < s->length(t); ++i) { - if (stringCharAt(t, s, i) == c) { - return i; - } - } - - return -1; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_SystemClassLoader_findLoadedVMClass(Thread*, - object, - uintptr_t*); - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMRuntime_bootClassPath(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(roots(t)->bootLoader()); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMRuntime_classPath(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(roots(t)->appLoader()); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMRuntime_vmVersion(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(makeString(t, "%s", AVIAN_VERSION)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMRuntime_properties(Thread* t, object, uintptr_t*) -{ - object array - = makeObjectArray(t, type(t, GcString::Type), t->m->propertyCount + 1); - PROTECT(t, array); - - unsigned i; - for (i = 0; i < t->m->propertyCount; ++i) { - GcString* s = makeString(t, "%s", t->m->properties[i]); - setField( - t, array, ArrayBody + (i * BytesPerWord), reinterpret_cast(s)); - } - - { - GcString* s = makeString(t, "%s", "java.protocol.handler.pkgs=avian"); - setField(t, - array, - ArrayBody + (i++ * BytesPerWord), - reinterpret_cast(s)); - } - - return reinterpret_cast(array); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Runtime_gc(Thread* t, object, uintptr_t*) -{ - collect(t, Heap::MajorCollection); -} - -extern "C" AVIAN_EXPORT jlong JNICALL - Avian_java_lang_Runtime_maxMemory(Thread* t, object, uintptr_t*) -{ - return t->m->heap->limit(); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Runtime_nativeExit(Thread* t, object, uintptr_t* arguments) -{ - shutDown(t); - - t->m->system->exit(arguments[0]); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Runtime_nativeLoad(Thread* t, object, uintptr_t* arguments) -{ - GcString* name = cast(t, reinterpret_cast(arguments[0])); - PROTECT(t, name); - - unsigned length = name->length(t); - THREAD_RUNTIME_ARRAY(t, char, n, length + 1); - stringChars(t, name, RUNTIME_ARRAY_BODY(n)); - - if (loadLibrary(t, "", RUNTIME_ARRAY_BODY(n), false, true)) { - return 0; - } else { - return reinterpret_cast(name); - } -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_System_arraycopy(Thread* t, object, uintptr_t* arguments) -{ - arrayCopy(t, - reinterpret_cast(arguments[0]), - arguments[1], - reinterpret_cast(arguments[2]), - arguments[3], - arguments[4]); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_System_arraycopyCharUnchecked(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_java_lang_System_arraycopy(t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_System_arraycopyByteUnchecked(Thread* t, - object method, - uintptr_t* arguments) -{ - Avian_java_lang_System_arraycopy(t, method, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_objectFieldOffset(Thread* t, - object, - uintptr_t* arguments) -{ - return cast(t, reinterpret_cast(arguments[1])) - ->vmField() - ->offset(); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Thread_nativeInterrupt(Thread* t, - object, - uintptr_t* arguments) -{ - interrupt( - t, - reinterpret_cast( - cast(t, reinterpret_cast(arguments[0]))->peer())); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_interrupted(Thread* t, object, uintptr_t*) -{ - return getAndClearInterrupted(t, t); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_isInterrupted(Thread* t, - object, - uintptr_t* arguments) -{ - return cast(t, reinterpret_cast(arguments[0])) - ->interrupted(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_nativeGetStatus(Thread*, - object, - uintptr_t* arguments) -{ - enum { New, Runnable, Blocked, Waiting, TimedWaiting, Terminated }; - - // todo: more detail? (e.g. waiting, terminated, etc.) - return arguments[1] ? Runnable : New; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_currentThread(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(t->javaThread); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Thread_nativeCreate(Thread* t, object, uintptr_t* arguments) -{ - startThread(t, cast(t, reinterpret_cast(arguments[0]))); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Thread_nativeSetName(Thread*, object, uintptr_t*) -{ - // ignore -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Thread_sleep(Thread* t, object, uintptr_t* arguments) -{ - object lock = reinterpret_cast(arguments[0]); - PROTECT(t, lock); - - int64_t milliseconds; - memcpy(&milliseconds, arguments + 1, 8); - if (arguments[2] > 0) - ++milliseconds; - if (milliseconds <= 0) - milliseconds = 1; - - acquire(t, lock); - vm::wait(t, lock, milliseconds); - release(t, lock); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_nativeHoldsLock(Thread* t, - object, - uintptr_t* arguments) -{ - if (cast(t, reinterpret_cast(arguments[0])) - != t->javaThread) { - throwNew(t, - GcIllegalStateException::Type, - "VMThread.holdsLock may only be called on current thread"); - } - - GcMonitor* m - = objectMonitor(t, reinterpret_cast(arguments[1]), false); - - return m and m->owner() == t; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Thread_yield(Thread* t, object, uintptr_t*) -{ - t->m->system->yield(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMStack_getThreadStackTrace(Thread* t, - object, - uintptr_t* arguments) -{ - Thread* p = reinterpret_cast( - cast(t, reinterpret_cast(arguments[0]))->peer()); - - return reinterpret_cast(local::translateStackTrace( - t, p == t ? makeTrace(t) : t->m->processor->getStackTrace(t, p))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMStack_getCallingClassLoader(Thread* t, - object, - uintptr_t*) -{ - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t) : t(t), loader(0), counter(2) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - if (counter--) { - return true; - } else { - this->loader = walker->method()->class_()->loader(); - return false; - } - } - - Thread* t; - GcClassLoader* loader; - unsigned counter; - } v(t); - - t->m->processor->walkStack(t, &v); - - return reinterpret_cast(v.loader); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMStack_getClosestUserClassLoader(Thread* t, - object, - uintptr_t* arguments) -{ - GcClassLoader* boot - = cast(t, reinterpret_cast(arguments[0])); - - GcClassLoader* app - = cast(t, reinterpret_cast(arguments[1])); - - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t, GcClassLoader* boot, GcClassLoader* app) - : t(t), loader(0), boot(boot), app(app) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - GcClassLoader* loader = walker->method()->class_()->loader(); - if (loader == boot or loader == app) { - return true; - } else { - this->loader = loader; - return false; - } - } - - Thread* t; - GcClassLoader* loader; - GcClassLoader* boot; - GcClassLoader* app; - } v(t, boot, app); - - t->m->processor->walkStack(t, &v); - - return reinterpret_cast(v.loader); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMStack_getClasses(Thread* t, object, uintptr_t*) -{ - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t) : t(t), array(0), counter(0) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - if (counter < 2) { - return true; - } else { - if (array == 0) { - array = makeObjectArray(t, type(t, GcJclass::Type), walker->count()); - } - - GcJclass* c = getJClass(t, walker->method()->class_()); - - assertT(t, counter - 2 < objectArrayLength(t, array)); - - setField(t, array, ArrayBody + ((counter - 2) * BytesPerWord), c); - - return true; - } - - ++counter; - } - - Thread* t; - object array; - unsigned counter; - } v(t); - - PROTECT(t, v.array); - - t->m->processor->walkStack(t, &v); - - return reinterpret_cast( - v.array ? v.array : makeObjectArray(t, type(t, GcJclass::Type), 0)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Math_min(Thread*, object, uintptr_t* arguments) -{ - return min(static_cast(arguments[0]), static_cast(arguments[1])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Math_max(Thread*, object, uintptr_t* arguments) -{ - return max(static_cast(arguments[0]), static_cast(arguments[1])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Math_cos(Thread*, object, uintptr_t* arguments) -{ - int64_t v; - memcpy(&v, arguments, 8); - return doubleToBits(cos(bitsToDouble(v))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Math_sin(Thread*, object, uintptr_t* arguments) -{ - int64_t v; - memcpy(&v, arguments, 8); - return doubleToBits(sin(bitsToDouble(v))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Math_sqrt(Thread*, object, uintptr_t* arguments) -{ - int64_t v; - memcpy(&v, arguments, 8); - return doubleToBits(sqrt(bitsToDouble(v))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Math_abs__I(Thread*, object, uintptr_t* arguments) -{ - return abs(static_cast(arguments[0])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Math_abs__J(Thread*, object, uintptr_t* arguments) -{ - int64_t v; memcpy(&v, arguments, 8); - return llabs(v); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Math_abs__F(Thread*, object, uintptr_t* arguments) -{ - return floatToBits(abs(bitsToFloat(arguments[0]))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Float_intBitsToFloat(Thread*, object, uintptr_t* arguments) -{ - return arguments[0]; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Float_floatToIntBits(Thread*, object, uintptr_t* arguments) -{ - if (((arguments[0] & 0x7F800000) == 0x7F800000) - and ((arguments[0] & 0x007FFFFF) != 0)) { - return 0x7fc00000; - } else { - return arguments[0]; - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Double_doubleToRawLongBits(Thread*, - object, - uintptr_t* arguments) -{ - int64_t v; - memcpy(&v, arguments, 8); - // todo: do we need to do NaN checks as in - // Avian_java_lang_Float_floatToIntBits above? If so, update - // Double.doubleToRawLongBits in the Avian class library too. - return v; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Method_getCaller(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(getCaller(t, 2)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Method_invoke(Thread* t, - object, - uintptr_t* arguments) -{ - return invokeMethod(t, - cast(t, reinterpret_cast(arguments[0])), - reinterpret_cast(arguments[1]), - reinterpret_cast(arguments[2])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Field_getObject(Thread*, - object, - uintptr_t* arguments) -{ - return reinterpret_cast(fieldAtOffset( - reinterpret_cast(arguments[0]), arguments[1])); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_reflect_Field_setObject(Thread* t, - object, - uintptr_t* arguments) -{ - setField(t, - reinterpret_cast(arguments[0]), - arguments[1], - reinterpret_cast(arguments[2])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Field_getPrimitive(Thread* t, - object, - uintptr_t* arguments) -{ - return getPrimitive( - t, reinterpret_cast(arguments[0]), arguments[1], arguments[2]); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_reflect_Field_setPrimitive(Thread* t, - object, - uintptr_t* arguments) -{ - int64_t value; - memcpy(&value, arguments + 3, 8); - - setPrimitive(t, - reinterpret_cast(arguments[0]), - arguments[1], - arguments[2], - value); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Constructor_make(Thread* t, - object, - uintptr_t* arguments) -{ - return reinterpret_cast( - make(t, cast(t, reinterpret_cast(arguments[0])))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_ref_Reference_get(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - cast(t, reinterpret_cast(arguments[0]))->target()); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Throwable_nativeFillInStackTrace(Thread* t, - object, - uintptr_t*) -{ - return reinterpret_cast(getTrace(t, 2)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Throwable_nativeGetStackTrace(Thread* t, - object, - uintptr_t* arguments) -{ - return reinterpret_cast( - local::translateStackTrace(t, reinterpret_cast(arguments[0]))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_getVMClass(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - objectClass(t, reinterpret_cast(arguments[0]))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_makeMethod(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - makeMethod(t, - cast(t, reinterpret_cast(arguments[0])), - arguments[1])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_isAssignableFrom(Thread* t, - object, - uintptr_t* arguments) -{ - GcClass* this_ = cast(t, reinterpret_cast(arguments[0])); - GcClass* that = cast(t, reinterpret_cast(arguments[1])); - - if (LIKELY(that)) { - return vm::isAssignableFrom(t, this_, that); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Array_createObjectArray(Thread* t, - object, - uintptr_t* arguments) -{ - return reinterpret_cast(makeObjectArray( - t, - cast(t, reinterpret_cast(arguments[0]))->vmClass(), - arguments[1])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_nio_ByteOrder_isLittleEndian(Thread*, object, uintptr_t*) -{ - return true; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMRuntime_newNonMovableArray(Thread* t, - object, - uintptr_t* arguments) -{ - if (cast(t, reinterpret_cast(arguments[1]))->vmClass() - == type(t, GcJbyte::Type)) { - GcByteArray* array - = reinterpret_cast(allocate3(t, - t->m->heap, - Machine::FixedAllocation, - ArrayBody + arguments[2], - false)); - - setObjectClass(t, array, type(t, GcByteArray::Type)); - array->length() = arguments[2]; - - return reinterpret_cast(array); - } else { - // todo - abort(t); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_dalvik_system_VMRuntime_addressOf(Thread*, - object, - uintptr_t* arguments) -{ - return arguments[1] + ArrayBody; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_libcore_io_Memory_pokeLong(Thread*, object, uintptr_t* arguments) -{ - int64_t address; - memcpy(&address, arguments, 8); - int64_t v; - memcpy(&v, arguments + 2, 8); - if (arguments[4]) { - v = swapV8(v); - } - memcpy(reinterpret_cast(address), &v, 8); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_libcore_io_Memory_peekLong(Thread*, object, uintptr_t* arguments) -{ - int64_t address; - memcpy(&address, arguments, 8); - int64_t v; - memcpy(&v, reinterpret_cast(address), 8); - return arguments[2] ? swapV8(v) : v; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_libcore_io_Memory_pokeInt(Thread*, object, uintptr_t* arguments) -{ - int64_t address; - memcpy(&address, arguments, 8); - int32_t v = arguments[3] ? swapV4(arguments[2]) : arguments[2]; - memcpy(reinterpret_cast(address), &v, 4); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_libcore_io_Memory_peekInt(Thread*, object, uintptr_t* arguments) -{ - int64_t address; - memcpy(&address, arguments, 8); - int32_t v; - memcpy(&v, reinterpret_cast(address), 4); - return arguments[2] ? swapV4(v) : v; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_libcore_io_Memory_pokeShort(Thread*, object, uintptr_t* arguments) -{ - int64_t address; - memcpy(&address, arguments, 8); - int16_t v = arguments[3] ? swapV2(arguments[2]) : arguments[2]; - memcpy(reinterpret_cast(address), &v, 2); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_libcore_io_Memory_peekShort(Thread*, object, uintptr_t* arguments) -{ - int64_t address; - memcpy(&address, arguments, 8); - int16_t v; - memcpy(&v, reinterpret_cast(address), 2); - return arguments[2] ? swapV2(v) : v; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_libcore_io_Memory_pokeByte(Thread*, object, uintptr_t* arguments) -{ - int64_t address; - memcpy(&address, arguments, 8); - *reinterpret_cast(address) = arguments[2]; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_libcore_io_Memory_peekByte(Thread*, object, uintptr_t* arguments) -{ - int64_t address; - memcpy(&address, arguments, 8); - return *reinterpret_cast(address); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_System_nanoTime(Thread* t, object, uintptr_t*) -{ - return t->m->system->now() * 1000 * 1000; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_System_currentTimeMillis(Thread* t, object, uintptr_t*) -{ - return t->m->system->now(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_System_identityHashCode(Thread* t, - object, - uintptr_t* arguments) -{ - return objectHash(t, reinterpret_cast(arguments[0])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8(Thread*, - object, - uintptr_t*) -{ - return true; -} - -#ifdef PLATFORM_WINDOWS - -#include - -void register_java_io_Console(_JNIEnv*) -{ -} -void register_java_lang_ProcessManager(_JNIEnv*) -{ -} -void register_libcore_net_RawSocket(_JNIEnv*) -{ -} -// void register_org_apache_harmony_xnet_provider_jsse_NativeCrypto(_JNIEnv*) { -// } - -extern "C" AVIAN_EXPORT void JNICALL - Avian_libcore_io_OsConstants_initConstants(Thread* t, - object m, - uintptr_t*) -{ - GcMethod* method = cast(t, m); - GcClass* c = method->class_(); - PROTECT(t, c); - - object table = c->staticTable(); - PROTECT(t, table); - - GcField* field = resolveField(t, c, "STDIN_FILENO", "I"); - fieldAtOffset(table, field->offset()) = 0; - - field = resolveField(t, c, "STDOUT_FILENO", "I"); - fieldAtOffset(table, field->offset()) = 1; - - field = resolveField(t, c, "STDERR_FILENO", "I"); - fieldAtOffset(table, field->offset()) = 2; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_libcore_io_Posix_getenv(Thread* t, object, uintptr_t* arguments) -{ - GcString* name = cast(t, reinterpret_cast(arguments[1])); - - THREAD_RUNTIME_ARRAY(t, uint16_t, chars, name->length(t) + 1); - stringChars(t, name, RUNTIME_ARRAY_BODY(chars)); - - wchar_t* value - = _wgetenv(reinterpret_cast(RUNTIME_ARRAY_BODY(chars))); - - if (value) { - unsigned size = wcslen(value); - - GcCharArray* a = makeCharArray(t, size); - if (size) { - memcpy(a->body().begin(), value, size * sizeof(jchar)); - } - - return reinterpret_cast( - t->m->classpath->makeString(t, a, 0, size)); - } else { - return 0; - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_libcore_io_Posix_uname(Thread* t, object, uintptr_t*) -{ - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "libcore/io/StructUtsname"); - PROTECT(t, c); - - object instance = makeNew(t, c); - PROTECT(t, instance); - -#ifdef ARCH_x86_32 - object arch = makeString(t, "x86"); -#elif defined ARCH_x86_64 - object arch = makeString(t, "x86_64"); -#elif defined ARCH_arm - object arch = makeString(t, "arm"); -#else - object arch = makeString(t, "unknown"); -#endif - - setField(t, - instance, - resolveField(t, c, "machine", "Ljava/lang/String;")->offset(), - arch); - - object platform = makeString(t, "Windows"); - - setField(t, - instance, - resolveField(t, c, "sysname", "Ljava/lang/String;")->offset(), - platform); - - object version = makeString(t, "unknown"); - - setField(t, - instance, - resolveField(t, c, "release", "Ljava/lang/String;")->offset(), - version); - - return reinterpret_cast(instance); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_libcore_io_Posix_writeBytes(Thread* t, object, uintptr_t* arguments) -{ - object fd = reinterpret_cast(arguments[1]); - PROTECT(t, fd); - - GcByteArray* buffer = cast(t, reinterpret_cast(arguments[2])); - PROTECT(t, buffer); - - int offset = arguments[3]; - int count = arguments[4]; - - int d = jniGetFDFromFileDescriptor(t, &fd); - - int r; - if (objectClass(t, buffer) == type(t, GcByteArray::Type)) { - void* tmp = t->m->heap->allocate(count); - memcpy(tmp, &buffer->body()[offset], count); - { - ENTER(t, Thread::IdleState); - r = _write(d, tmp, count); - } - t->m->heap->free(tmp, count); - } else { - void* p = local::getDirectBufferAddress(t, buffer); - { - ENTER(t, Thread::IdleState); - r = _write(d, p, count); - } - } - - if (r < 0) { - THREAD_RUNTIME_ARRAY(t, char, message, 256); - throwNew(t, - GcRuntimeException::Type, - "writeBytes %d: %s", - d, - jniStrError(errno, RUNTIME_ARRAY_BODY(message), 0)); - } else { - return r; - } -} - -#endif diff --git a/sgx-jvm/avian/src/classpath-avian.cpp b/sgx-jvm/avian/src/classpath-avian.cpp deleted file mode 100644 index a89a143d5d..0000000000 --- a/sgx-jvm/avian/src/classpath-avian.cpp +++ /dev/null @@ -1,693 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/machine.h" -#include "avian/classpath-common.h" -#include "avian/process.h" - -#include - -using namespace vm; - -namespace { - -namespace local { - -class MyClasspath : public Classpath { - public: - MyClasspath(Allocator* allocator) : allocator(allocator) - { - } - - virtual GcJclass* makeJclass(Thread* t, GcClass* class_) - { - return vm::makeJclass(t, class_); - } - - virtual GcString* makeString(Thread* t, - object array, - int32_t offset, - int32_t length) - { - return vm::makeString(t, array, offset, length, 0); - } - - virtual GcThread* makeThread(Thread* t, Thread* parent) - { - GcThreadGroup* group; - if (parent) { - group = parent->javaThread->group(); - } else { - group = makeThreadGroup(t, 0, 0, 0); - } - - const unsigned NewState = 0; - const unsigned NormalPriority = 5; - - return vm::makeThread(t, - 0, - 0, - 0, - 0, - 0, - NewState, - NormalPriority, - 0, - 0, - 0, - roots(t)->appLoader(), - 0, - 0, - group, - 0, - 0); - } - - virtual object makeJMethod(Thread* t, GcMethod* vmMethod) - { - PROTECT(t, vmMethod); - - GcJmethod* jmethod = makeJmethod(t, vmMethod, false); - - return vmMethod->name()->body()[0] == '<' - ? (object)makeJconstructor(t, jmethod) - : (object)jmethod; - } - - virtual GcMethod* getVMMethod(Thread* t, object jmethod) - { - return objectClass(t, jmethod) == type(t, GcJmethod::Type) - ? cast(t, jmethod)->vmMethod() - : cast(t, jmethod)->method()->vmMethod(); - } - - virtual object makeJField(Thread* t, GcField* vmField) - { - return makeJfield(t, vmField, false); - } - - virtual GcField* getVMField(Thread* t UNUSED, GcJfield* jfield) - { - return jfield->vmField(); - } - - virtual void clearInterrupted(Thread*) - { - // ignore - } - - virtual void runThread(Thread* t) - { - GcMethod* method = resolveMethod(t, - roots(t)->bootLoader(), - "java/lang/Thread", - "run", - "(Ljava/lang/Thread;)V"); - - t->m->processor->invoke(t, method, 0, t->javaThread); - } - - virtual void resolveNative(Thread* t, GcMethod* method) - { - vm::resolveNative(t, method); - } - - virtual void interceptMethods(Thread*) - { - // ignore - } - - virtual void preBoot(Thread*) - { - // ignore - } - - virtual bool mayInitClasses() - { - return true; - } - - virtual void boot(Thread*) - { - // ignore - } - - virtual const char* bootClasspath() - { - return AVIAN_CLASSPATH; - } - - virtual object makeDirectByteBuffer(Thread* t, void* p, jlong capacity) - { - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "java/nio/DirectByteBuffer"); - PROTECT(t, c); - - object instance = makeNew(t, c); - PROTECT(t, instance); - - GcMethod* constructor = resolveMethod(t, c, "", "(JI)V"); - - t->m->processor->invoke(t, - constructor, - instance, - reinterpret_cast(p), - static_cast(capacity)); - - return instance; - } - - virtual void* getDirectBufferAddress(Thread* t, object b) - { - PROTECT(t, b); - - GcField* field = resolveField(t, objectClass(t, b), "address", "J"); - - return reinterpret_cast(fieldAtOffset(b, field->offset())); - } - - virtual int64_t getDirectBufferCapacity(Thread* t, object b) - { - PROTECT(t, b); - - GcField* field = resolveField(t, objectClass(t, b), "capacity", "I"); - - return fieldAtOffset(b, field->offset()); - } - - virtual bool canTailCall(Thread* t UNUSED, - GcMethod*, - GcByteArray* calleeClassName, - GcByteArray* calleeMethodName, - GcByteArray*) - { - // we can't tail call System.load[Library] or - // Runtime.load[Library] due to their use of - // ClassLoader.getCaller, which gets confused if we elide stack - // frames. - - return ( - (strcmp("loadLibrary", - reinterpret_cast(calleeMethodName->body().begin())) - and strcmp("load", - reinterpret_cast(calleeMethodName->body().begin()))) - or (strcmp("java/lang/System", - reinterpret_cast(calleeClassName->body().begin())) - and strcmp( - "java/lang/Runtime", - reinterpret_cast(calleeClassName->body().begin())))); - } - - virtual GcClassLoader* libraryClassLoader(Thread* t, GcMethod* caller) - { - return (caller->class_() == type(t, Gc::ClassLoaderType) - and t->libraryLoadStack) - ? t->libraryLoadStack->classLoader - : caller->class_()->loader(); - } - - virtual void shutDown(Thread*) - { - // ignore - } - - virtual void dispose() - { - allocator->free(this, sizeof(*this)); - } - - Allocator* allocator; -}; - -void enumerateThreads(Thread* t, - Thread* x, - GcArray* array, - unsigned* index, - unsigned limit) -{ - if (*index < limit) { - array->setBodyElement(t, *index, x->javaThread); - ++(*index); - - if (x->peer) - enumerateThreads(t, x->peer, array, index, limit); - - if (x->child) - enumerateThreads(t, x->child, array, index, limit); - } -} - -} // namespace local - -} // namespace - -namespace vm { - -Classpath* makeClasspath(System*, - Allocator* allocator, - const char*, - const char*) -{ - return new (allocator->allocate(sizeof(local::MyClasspath))) - local::MyClasspath(allocator); -} - -} // namespace vm - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_io_ObjectInputStream_makeInstance(Thread* t, - object, - uintptr_t* arguments) -{ - GcClass* c = cast(t, reinterpret_cast(arguments[0])); - - return reinterpret_cast(make(t, c)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_LegacyObjectInputStream_makeInstance(Thread* t, - object, - uintptr_t* arguments) -{ - return Avian_java_io_ObjectInputStream_makeInstance(t, NULL, arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Field_getPrimitive(Thread* t, - object, - uintptr_t* arguments) -{ - return getPrimitive( - t, reinterpret_cast(arguments[0]), arguments[1], arguments[2]); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Field_getObject(Thread*, - object, - uintptr_t* arguments) -{ - return reinterpret_cast(fieldAtOffset( - reinterpret_cast(arguments[0]), arguments[1])); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_reflect_Field_setPrimitive(Thread* t, - object, - uintptr_t* arguments) -{ - int64_t value; - memcpy(&value, arguments + 3, 8); - - setPrimitive(t, - reinterpret_cast(arguments[0]), - arguments[1], - arguments[2], - value); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_reflect_Field_setObject(Thread* t, - object, - uintptr_t* arguments) -{ - setField(t, - reinterpret_cast(arguments[0]), - arguments[1], - reinterpret_cast(arguments[2])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Constructor_make(Thread* t, - object, - uintptr_t* arguments) -{ - return reinterpret_cast( - make(t, cast(t, reinterpret_cast(arguments[0])))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Method_getCaller(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(getCaller(t, 2)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Method_invoke(Thread* t, - object, - uintptr_t* arguments) -{ - return invokeMethod(t, - cast(t, reinterpret_cast(arguments[0])), - reinterpret_cast(arguments[1]), - reinterpret_cast(arguments[2])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Array_getLength(Thread* t, - object, - uintptr_t* arguments) -{ - object array = reinterpret_cast(arguments[0]); - - if (LIKELY(array)) { - unsigned elementSize = objectClass(t, array)->arrayElementSize(); - - if (LIKELY(elementSize)) { - return fieldAtOffset(array, BytesPerWord); - } else { - throwNew(t, GcIllegalArgumentException::Type); - } - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_reflect_Array_makeObjectArray(Thread* t, - object, - uintptr_t* arguments) -{ - GcJclass* elementType - = cast(t, reinterpret_cast(arguments[0])); - int length = arguments[1]; - - return reinterpret_cast( - makeObjectArray(t, elementType->vmClass(), length)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Float_floatToRawIntBits(Thread*, - object, - uintptr_t* arguments) -{ - return static_cast(*arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Float_intBitsToFloat(Thread*, object, uintptr_t* arguments) -{ - return static_cast(*arguments); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Double_doubleToRawLongBits(Thread*, - object, - uintptr_t* arguments) -{ - int64_t v; - memcpy(&v, arguments, 8); - return v; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Double_longBitsToDouble(Thread*, - object, - uintptr_t* arguments) -{ - int64_t v; - memcpy(&v, arguments, 8); - return v; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_String_intern(Thread* t, object, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - - return reinterpret_cast(intern(t, this_)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_System_getVMProperties(Thread* t, object, uintptr_t*) -{ - object array - = makeObjectArray(t, type(t, GcString::Type), t->m->propertyCount); - PROTECT(t, array); - - for (unsigned i = 0; i < t->m->propertyCount; ++i) { - GcString* s = makeString(t, "%s", t->m->properties[i]); - reinterpret_cast(array)->setBodyElement(t, i, s); - } - - return reinterpret_cast(array); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_System_arraycopy(Thread* t, object, uintptr_t* arguments) -{ - arrayCopy(t, - reinterpret_cast(arguments[0]), - arguments[1], - reinterpret_cast(arguments[2]), - arguments[3], - arguments[4]); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_System_identityHashCode(Thread* t, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[0]); - - if (LIKELY(o)) { - return objectHash(t, o); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_ClassLoader_getCaller(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(getJClass(t, getCaller(t, 2)->class_())); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_ClassLoader_load(Thread* t, object, uintptr_t* arguments) -{ - GcString* name = cast(t, reinterpret_cast(arguments[0])); - - Thread::LibraryLoadStack stack( - t, - cast(t, reinterpret_cast(arguments[1])) - ->vmClass() - ->loader()); - - bool mapName = arguments[2]; - - unsigned length = name->length(t); - THREAD_RUNTIME_ARRAY(t, char, n, length + 1); - stringChars(t, name, RUNTIME_ARRAY_BODY(n)); - - loadLibrary(t, "", RUNTIME_ARRAY_BODY(n), mapName, true); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Runtime_gc(Thread* t, object, uintptr_t*) -{ - collect(t, Heap::MajorCollection); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Runtime_addShutdownHook(Thread* t, - object, - uintptr_t* arguments) -{ - object hook = reinterpret_cast(arguments[1]); - PROTECT(t, hook); - - ACQUIRE(t, t->m->shutdownLock); - - GcPair* p = makePair(t, hook, roots(t)->shutdownHooks()); - // sequence point, for gc (don't recombine statements) - roots(t)->setShutdownHooks(t, p); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Throwable_trace(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast(getTrace(t, arguments[0])); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Throwable_resolveTrace(Thread* t, - object, - uintptr_t* arguments) -{ - object trace = reinterpret_cast(*arguments); - PROTECT(t, trace); - - unsigned length = objectArrayLength(t, trace); - GcClass* elementType = type(t, GcStackTraceElement::Type); - object array = makeObjectArray(t, elementType, length); - PROTECT(t, array); - - for (unsigned i = 0; i < length; ++i) { - GcStackTraceElement* ste = makeStackTraceElement( - t, cast(t, objectArrayBody(t, trace, i))); - reinterpret_cast(array)->setBodyElement(t, i, ste); - } - - return reinterpret_cast(array); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_currentThread(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast(t->javaThread); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_doStart(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - startThread(t, cast(t, reinterpret_cast(*arguments)))); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Thread_interrupt(Thread* t, object, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - threadInterrupt(t, reinterpret_cast(peer)->javaThread); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_interrupted(Thread* t, object, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - return threadIsInterrupted( - t, reinterpret_cast(peer)->javaThread, true); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_getStackTrace(Thread* t, - object, - uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - if (reinterpret_cast(peer) == t) { - return reinterpret_cast(makeTrace(t)); - } else { - return reinterpret_cast( - t->m->processor->getStackTrace(t, reinterpret_cast(peer))); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_activeCount(Thread* t, object, uintptr_t*) -{ - return t->m->liveCount; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_enumerate(Thread* t, object, uintptr_t* arguments) -{ - GcArray* array = cast(t, reinterpret_cast(*arguments)); - - ACQUIRE_RAW(t, t->m->stateLock); - - unsigned count = min(t->m->liveCount, - objectArrayLength(t, reinterpret_cast(array))); - unsigned index = 0; - local::enumerateThreads(t, t->m->rootThread, array, &index, count); - return count; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Thread_holdsLock(Thread* t, object, uintptr_t* arguments) -{ - GcMonitor* m - = objectMonitor(t, reinterpret_cast(arguments[0]), false); - - return m and m->owner() == t; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_java_lang_Thread_yield(Thread* t, object, uintptr_t*) -{ - t->m->system->yield(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Atomic_getOffset(Thread* t, object, uintptr_t* arguments) -{ - return cast(t, reinterpret_cast(arguments[0])) - ->vmField() - ->offset(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_objectFieldOffset(Thread* t, - object, - uintptr_t* arguments) -{ - return cast(t, reinterpret_cast(arguments[1])) - ->vmField() - ->offset(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Atomic_compareAndSwapObject(Thread* t, - object, - uintptr_t* arguments) -{ - object target = reinterpret_cast(arguments[0]); - int64_t offset; - memcpy(&offset, arguments + 1, 8); - uintptr_t expect = arguments[3]; - uintptr_t update = arguments[4]; - - bool success = atomicCompareAndSwap( - &fieldAtOffset(target, offset), expect, update); - - if (success) { - mark(t, target, offset); - } - - return success; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_isAssignableFrom(Thread* t, - object, - uintptr_t* arguments) -{ - GcClass* this_ = cast(t, reinterpret_cast(arguments[0])); - GcClass* that = cast(t, reinterpret_cast(arguments[1])); - - if (LIKELY(that)) { - return vm::isAssignableFrom(t, this_, that); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_getVMClass(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - objectClass(t, reinterpret_cast(arguments[0]))); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_avian_Classes_makeMethod(Thread* t, object, uintptr_t* arguments) -{ - return reinterpret_cast( - makeMethod(t, - cast(t, reinterpret_cast(arguments[0])), - arguments[1])); -} diff --git a/sgx-jvm/avian/src/classpath-openjdk.cpp b/sgx-jvm/avian/src/classpath-openjdk.cpp deleted file mode 100644 index e66427835c..0000000000 --- a/sgx-jvm/avian/src/classpath-openjdk.cpp +++ /dev/null @@ -1,6149 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/machine.h" -#include "avian/classpath-common.h" -#include "avian/util.h" -#include "avian/process.h" - -#ifdef PLATFORM_WINDOWS - -#include -#include -#include -#include -#include -#include -#include -#include - -#undef interface - -#define CLOSE _close -#define READ _read -#define WRITE _write -#define FSTAT _fstat -#define STAT _stat -#define LSEEK _lseek - -#define S_ISSOCK(x) false - -#ifdef _MSC_VER -#define S_ISREG(x) ((x) | _S_IFREG) -#define S_ISDIR(x) ((x) | _S_IFDIR) -#define S_IRUSR _S_IREAD -#define S_IWUSR _S_IWRITE -#else -#define OPEN _open -#endif - -#define O_RDONLY _O_RDONLY - -#if (defined AVIAN_OPENJDK_SRC) \ - || ((defined __x86_64__) && (defined __MINGW32__)) -#define EXPORT(x) x -#else -#define EXPORT(x) _##x -#endif - -typedef int socklen_t; - -#define RTLD_DEFAULT 0 - -#else // not PLATFORM_WINDOWS - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define OPEN open -#define CLOSE close -#define READ read -#define WRITE write -#define STAT stat -#define FSTAT fstat -#define LSEEK lseek - -#define EXPORT(x) x - -#endif // not PLATFORM_WINDOWS - -#define JVM_EEXIST -100 - -using namespace vm; - -namespace { - -#ifdef _MSC_VER -inline int OPEN(string_t path, int mask, int mode) -{ - int fd; - if (_wsopen_s(&fd, path, mask, _SH_DENYNO, mode) == 0) { - return fd; - } else { - return -1; - } -} -#endif - -namespace local { - -const int JMM_VERSION_1_0 = 0x20010000; - -struct jmmOptionalSupport { - unsigned isLowMemoryDetectionSupported : 1; - unsigned isCompilationTimeMonitoringSupported : 1; - unsigned isThreadContentionMonitoringSupported : 1; - unsigned isCurrentThreadCpuTimeSupported : 1; - unsigned isOtherThreadCpuTimeSupported : 1; - unsigned isBootClassPathSupported : 1; - unsigned isObjectMonitorUsageSupported : 1; - unsigned isSynchronizerUsageSupported : 1; -}; - -typedef unsigned jmmLongAttribute; -typedef unsigned jmmBoolAttribute; -typedef unsigned jmmStatisticType; -typedef unsigned jmmThresholdType; -typedef unsigned jmmVMGlobalType; -typedef unsigned jmmVMGlobalOrigin; - -struct jmmVMGlobal { - jstring name; - jvalue value; - jmmVMGlobalType type; - jmmVMGlobalOrigin origin; - unsigned writeable : 1; - unsigned external : 1; - unsigned reserved : 30; - void* reserved1; - void* reserved2; -}; - -struct jmmExtAttributeInfo { - const char* name; - char type; - const char* description; -}; - -struct jmmGCStat { - jlong gc_index; - jlong start_time; - jlong end_time; - jobjectArray usage_before_gc; - jobjectArray usage_after_gc; - jint gc_ext_attribute_values_size; - jvalue* gc_ext_attribute_values; - jint num_gc_ext_attributes; -}; - -struct JmmInterface { - void* reserved1; - void* reserved2; - - jint(JNICALL* GetVersion)(JNIEnv*); - - jint(JNICALL* GetOptionalSupport)(JNIEnv*, jmmOptionalSupport*); - - jobject(JNICALL* GetInputArguments)(JNIEnv*); - - jint(JNICALL* GetThreadInfo)(JNIEnv*, jlongArray, jint, jobjectArray); - - jobjectArray(JNICALL* GetInputArgumentArray)(JNIEnv*); - - jobjectArray(JNICALL* GetMemoryPools)(JNIEnv*, jobject); - - jobjectArray(JNICALL* GetMemoryManagers)(JNIEnv*, jobject); - - jobject(JNICALL* GetMemoryPoolUsage)(JNIEnv*, jobject); - - jobject(JNICALL* GetPeakMemoryPoolUsage)(JNIEnv*, jobject); - - void* reserved4; - - jobject(JNICALL* GetMemoryUsage)(JNIEnv*, jboolean); - - jlong(JNICALL* GetLongAttribute)(JNIEnv*, jobject, jmmLongAttribute); - - jboolean(JNICALL* GetBoolAttribute)(JNIEnv*, jmmBoolAttribute); - - jboolean(JNICALL* SetBoolAttribute)(JNIEnv*, jmmBoolAttribute, jboolean); - - jint(JNICALL* GetLongAttributes)(JNIEnv*, - jobject, - jmmLongAttribute*, - jint, - jlong*); - - jobjectArray(JNICALL* FindCircularBlockedThreads)(JNIEnv*); - - jlong(JNICALL* GetThreadCpuTime)(JNIEnv*, jlong); - - jobjectArray(JNICALL* GetVMGlobalNames)(JNIEnv*); - - jint(JNICALL* GetVMGlobals)(JNIEnv*, jobjectArray, jmmVMGlobal*, jint); - - jint(JNICALL* GetInternalThreadTimes)(JNIEnv*, jobjectArray, jlongArray); - - jboolean(JNICALL* ResetStatistic)(JNIEnv*, jvalue, jmmStatisticType); - - void(JNICALL* SetPoolSensor)(JNIEnv*, jobject, jmmThresholdType, jobject); - - jlong(JNICALL* SetPoolThreshold)(JNIEnv*, jobject, jmmThresholdType, jlong); - - jobject(JNICALL* GetPoolCollectionUsage)(JNIEnv*, jobject); - - jint(JNICALL* GetGCExtAttributeInfo)(JNIEnv*, - jobject, - jmmExtAttributeInfo*, - jint); - - void(JNICALL* GetLastGCStat)(JNIEnv*, jobject, jmmGCStat*); - - jlong(JNICALL* GetThreadCpuTimeWithKind)(JNIEnv*, jlong, jboolean); - - void* reserved5; - - jint(JNICALL* DumpHeap0)(JNIEnv*, jstring, jboolean); - - jobjectArray(JNICALL* FindDeadlocks)(JNIEnv*, jboolean); - - void(JNICALL* SetVMGlobal)(JNIEnv*, jstring, jvalue); - - void* reserved6; - - jobjectArray(JNICALL* DumpThreads)(JNIEnv*, jlongArray, jboolean, jboolean); -}; - -const unsigned InterfaceVersion = 4; -const unsigned PageSize = 4 * 1024; -#ifdef AVIAN_OPENJDK_SRC -const int VirtualFileBase = 1000000000; -#endif - -Machine* globalMachine; - -const char* primitiveName(Thread* t, GcClass* c) -{ - if (c == primitiveClass(t, 'V')) { - return "void"; - } else if (c == primitiveClass(t, 'Z')) { - return "boolean"; - } else if (c == primitiveClass(t, 'B')) { - return "byte"; - } else if (c == primitiveClass(t, 'C')) { - return "char"; - } else if (c == primitiveClass(t, 'S')) { - return "short"; - } else if (c == primitiveClass(t, 'I')) { - return "int"; - } else if (c == primitiveClass(t, 'F')) { - return "float"; - } else if (c == primitiveClass(t, 'J')) { - return "long"; - } else if (c == primitiveClass(t, 'D')) { - return "double"; - } else { - abort(t); - } -} - -GcByteArray* getClassName(Thread* t, GcClass* c) -{ - if (c->name() == 0) { - if (c->vmFlags() & PrimitiveFlag) { - PROTECT(t, c); - - GcByteArray* name = makeByteArray(t, primitiveName(t, c)); - - c->setName(t, name); - } else { - abort(t); - } - } - - return c->name(); -} - -GcString* makeClassNameString(Thread* t, GcByteArray* name) -{ - THREAD_RUNTIME_ARRAY(t, char, s, name->length()); - replace('/', - '.', - RUNTIME_ARRAY_BODY(s), - reinterpret_cast(name->body().begin())); - - return makeString(t, "%s", RUNTIME_ARRAY_BODY(s)); -} - -object makeJmethod(Thread* t, GcMethod* vmMethod, int index = -1); - -object makeJconstructor(Thread* t, GcMethod* vmMethod, int index = -1); - -object makeJfield(Thread* t, GcField* vmField, int index = -1); - -static uint64_t uncaughtExceptionHandler(Thread*, uintptr_t*); - -#ifdef AVIAN_OPENJDK_SRC -void interceptFileOperations(Thread*, bool); -#endif - -class MyClasspath : public Classpath { - public: - MyClasspath(System* s, - Allocator* allocator, - const char* javaHome, - const char* embedPrefix) - : allocator(allocator), ranNetOnLoad(0), ranManagementOnLoad(0) - { - class StringBuilder { - public: - StringBuilder(System* s, Allocator* allocator) - : s(s), - allocator(allocator), - bufferSize(1024), - buffer(static_cast(allocator->allocate(bufferSize))), - offset(0) - { - } - - void ensure(unsigned capacity) - { - if (capacity > bufferSize) { - unsigned size = max(bufferSize * 2, capacity); - char* b = static_cast(allocator->allocate(size)); - - if (offset) { - memcpy(b, buffer, offset); - } - - allocator->free(buffer, bufferSize); - - buffer = b; - bufferSize = size; - } - } - - void append(const char* append) - { - unsigned length = strlen(append); - ensure(offset + length + 1); - - strncpy(buffer + offset, append, length + 1); - - offset += length; - } - - void append(char c) - { - ensure(2); - - buffer[offset] = c; - buffer[offset + 1] = 0; - - ++offset; - } - - System* s; - Allocator* allocator; - unsigned bufferSize; - char* buffer; - unsigned offset; - } sb(s, allocator); - - unsigned javaHomeOffset = sb.offset; - sb.append(javaHome); - sb.append('\0'); - - unsigned classpathOffset = sb.offset; - sb.append(AVIAN_CLASSPATH); - sb.append(s->pathSeparator()); - sb.append(javaHome); - sb.append("/lib/rt.jar"); - sb.append(s->pathSeparator()); - sb.append(javaHome); - sb.append("/lib/jsse.jar"); - sb.append(s->pathSeparator()); - sb.append(javaHome); - sb.append("/lib/jce.jar"); - sb.append(s->pathSeparator()); - sb.append(javaHome); - sb.append("/lib/resources.jar"); - sb.append('\0'); - - unsigned libraryPathOffset = sb.offset; - sb.append(javaHome); -#ifdef PLATFORM_WINDOWS -#define LIB_DIR "/bin" -#elif defined __APPLE__ -#define LIB_DIR "/lib" -#elif defined ARCH_x86_64 -#define LIB_DIR "/lib/amd64" -#elif defined ARCH_arm -#define LIB_DIR "/lib/arm" -#else -// todo: handle other architectures -#define LIB_DIR "/lib/i386" -#endif - -#ifdef PLATFORM_WINDOWS - sb.append(LIB_DIR); -#else - sb.append(LIB_DIR ":"); - sb.append(javaHome); - sb.append(LIB_DIR "/xawt"); -#endif - sb.append('\0'); - - unsigned tzMappingsOffset = sb.offset; - sb.append(javaHome); - sb.append("/lib/tzmappings"); - this->tzMappingsLength = sb.offset - tzMappingsOffset; - sb.append('\0'); - - unsigned embedPrefixOffset = sb.offset; - sb.append(embedPrefix); - this->embedPrefixLength = sb.offset - embedPrefixOffset; - - this->javaHome = sb.buffer + javaHomeOffset; - this->classpath = sb.buffer + classpathOffset; - this->libraryPath = sb.buffer + libraryPathOffset; - this->tzMappings = sb.buffer + tzMappingsOffset; - this->embedPrefix = sb.buffer + embedPrefixOffset; - this->buffer = sb.buffer; - this->bufferSize = sb.bufferSize; - } - - virtual GcJclass* makeJclass(Thread* t, GcClass* class_) - { - PROTECT(t, class_); - - GcString* name = makeClassNameString(t, getClassName(t, class_)); - PROTECT(t, name); - - GcJclass* c - = reinterpret_cast(allocate(t, GcJclass::FixedSize, true)); - setObjectClass(t, c, type(t, GcJclass::Type)); - c->setName(t, name); - c->setVmClass(t, class_); -#ifdef HAVE_JclassClassLoader - if (class_->loader() != roots(t)->bootLoader()) { - c->setClassLoader(t, class_->loader()); - } -#endif - - return c; - } - - virtual GcString* makeString(Thread* t, - object oarray, - int32_t offset, - int32_t length) - { - if (objectClass(t, oarray) == type(t, GcByteArray::Type)) { - GcByteArray* array = cast(t, oarray); - PROTECT(t, array); - - GcCharArray* charArray = makeCharArray(t, length); - for (int i = 0; i < length; ++i) { - if (array->body()[offset + i] & 0x80) { - GcMethod* constructor = resolveMethod(t, - type(t, GcString::Type), - "", - "([BIILjava/lang/String;)V"); - PROTECT(t, constructor); - - GcString* utf8 = vm::makeString(t, "UTF8"); - PROTECT(t, utf8); - - object s = makeNew(t, type(t, GcString::Type)); - PROTECT(t, s); - - t->m->processor->invoke( - t, constructor, s, array, offset, length, utf8); - - return cast(t, s); - } - - charArray->body()[i] = array->body()[offset + i]; - } - - oarray = charArray; - offset = 0; - } else { - expect(t, objectClass(t, oarray) == type(t, GcCharArray::Type)); - } - - return vm::makeString(t, oarray, offset, length, 0); - } - - virtual GcThread* makeThread(Thread* t, Thread* parent) - { - const unsigned MaxPriority = 10; - const unsigned NormalPriority = 5; - - GcThreadGroup* group; - if (parent) { - group = parent->javaThread->group(); - } else { - group = reinterpret_cast( - allocate(t, GcThreadGroup::FixedSize, true)); - setObjectClass(t, group, type(t, GcThreadGroup::Type)); - group->maxPriority() = MaxPriority; - } - - PROTECT(t, group); - - GcThread* thread - = reinterpret_cast(allocate(t, GcThread::FixedSize, true)); - setObjectClass(t, thread, type(t, GcThread::Type)); - thread->priority() = NormalPriority; - - thread->setGroup(t, group); - - thread->setContextClassLoader(t, roots(t)->appLoader()); - - PROTECT(t, thread); - - GcJobject* blockerLock = makeJobject(t); - thread->setBlockerLock(t, blockerLock); - -#if HAVE_ThreadName_Ljava_lang_String_ - GcString* name = vm::makeString(t, "Thread-%p", thread); -#else - const unsigned BufferSize = 256; - char buffer[BufferSize]; - unsigned length = vm::snprintf(buffer, BufferSize, "Thread-%p", thread); - GcCharArray* name = makeCharArray(t, length); - for (unsigned i = 0; i < length; ++i) { - name->body()[i] = buffer[i]; - } -#endif - thread->setName(t, name); - - return thread; - } - - virtual object makeJMethod(Thread* t, GcMethod* vmMethod) - { - PROTECT(t, vmMethod); - - return vmMethod->name()->body()[0] == '<' ? makeJconstructor(t, vmMethod) - : makeJmethod(t, vmMethod); - } - - virtual GcMethod* getVMMethod(Thread* t, object jmethod) - { - return cast( - t, - objectClass(t, jmethod) == type(t, GcJmethod::Type) - ? cast(t, - cast(t, jmethod) - ->clazz() - ->vmClass() - ->methodTable()) - ->body()[cast(t, jmethod)->slot()] - : cast(t, - cast(t, jmethod) - ->clazz() - ->vmClass() - ->methodTable()) - ->body()[cast(t, jmethod)->slot()]); - } - - virtual object makeJField(Thread* t, GcField* vmField) - { - return makeJfield(t, vmField); - } - - virtual GcField* getVMField(Thread* t, GcJfield* jfield) - { - return cast( - t, - cast(t, jfield->clazz()->vmClass()->fieldTable()) - ->body()[jfield->slot()]); - } - - virtual void clearInterrupted(Thread* t) - { - vm::clearInterrupted(t); - } - - virtual void runThread(Thread* t) - { - // force monitor creation so we don't get an OutOfMemory error - // later when we try to acquire it: - objectMonitor(t, t->javaThread, true); - - THREAD_RESOURCE0(t, { - GcThrowable* e = t->exception; - if (e != NULL) { - t->exception = NULL; - - // Prevent any exceptions thrown from the uncaught - // exception handler from unwinding the stack past - // this point. This allows us to continue cleaning - // up this resource. - uintptr_t argument = reinterpret_cast(e); - runRaw(t, uncaughtExceptionHandler, &argument); - } - - vm::acquire(t, t->javaThread); - t->clearFlag(Thread::ActiveFlag); - vm::notifyAll(t, t->javaThread); - vm::release(t, t->javaThread); - - t->m->processor->invoke(t, - cast(t, roots(t)->threadTerminated()), - t->javaThread->group(), - t->javaThread); - }); - - GcMethod* method = resolveMethod( - t, roots(t)->bootLoader(), "java/lang/Thread", "run", "()V"); - - t->m->processor->invoke(t, method, t->javaThread); - } - - virtual void resolveNative(Thread* t, GcMethod* method) - { - if (strcmp(reinterpret_cast("sun/font/SunFontManager"), - method->class_()->name()->body().begin()) == 0 - and strcmp(reinterpret_cast("initIDs"), - method->name()->body().begin()) == 0 - and strcmp(reinterpret_cast("()V"), - method->spec()->body().begin()) == 0) { - PROTECT(t, method); - - expect(t, loadLibrary(t, libraryPath, "fontmanager", true, true)); - } - - vm::resolveNative(t, method); - } - - virtual void interceptMethods(Thread* t UNUSED) - { -#ifdef AVIAN_OPENJDK_SRC - interceptFileOperations(t, false); -#endif - } - - virtual void preBoot(Thread*) - { - // ignore - } - - virtual bool mayInitClasses() - { - return true; - } - - virtual void boot(Thread* t) - { - globalMachine = t->m; - - resolveSystemClass( - t, roots(t)->bootLoader(), type(t, GcClassLoader::Type)->name()); - - GcMethod* method = resolveMethod(t, - roots(t)->bootLoader(), - "java/lang/ThreadGroup", - "threadTerminated", - "(Ljava/lang/Thread;)V"); - // sequence point, for gc (don't recombine statements) - roots(t)->setThreadTerminated(t, method); - -#ifdef AVIAN_OPENJDK_SRC - interceptFileOperations(t, true); -#else // not AVIAN_OPENJDK_SRC -# ifdef PLATFORM_WINDOWS - expect(t, loadLibrary(t, libraryPath, "msvcr100", true, true)); -# endif - // necessary for using OpenJDK builds from - // https://github.com/ojdkbuild/ojdkbuild: - loadLibrary(t, libraryPath, "ojdkbuild_zlib", true, true, false); - - expect(t, loadLibrary(t, libraryPath, "verify", true, true)); - expect(t, loadLibrary(t, libraryPath, "java", true, true)); -#endif // not AVIAN_OPENJDK_SRC - - { - GcField* assertionLock = resolveField(t, - type(t, GcClassLoader::Type), - "assertionLock", - "Ljava/lang/Object;"); - - setField(t, - roots(t)->bootLoader(), - assertionLock->offset(), - roots(t)->bootLoader()); - } - - { - GcClass* class_ = resolveClass(t, - roots(t)->bootLoader(), - "java/util/Properties", - true, - GcNoClassDefFoundError::Type); - - PROTECT(t, class_); - - object instance = makeNew(t, class_); - - PROTECT(t, instance); - - GcMethod* constructor = resolveMethod(t, class_, "", "()V"); - - t->m->processor->invoke(t, constructor, instance); - - t->m->processor->invoke(t, - roots(t)->bootLoader(), - "java/lang/System", - "setProperties", - "(Ljava/util/Properties;)V", - 0, - instance); - } - - { - GcMethod* constructor = resolveMethod(t, - type(t, GcClassLoader::Type), - "", - "(Ljava/lang/ClassLoader;)V"); - - PROTECT(t, constructor); - - t->m->processor->invoke(t, constructor, roots(t)->bootLoader(), 0); - - t->m->processor->invoke( - t, constructor, roots(t)->appLoader(), roots(t)->bootLoader()); - } - - { - GcField* scl = resolveField( - t, type(t, GcClassLoader::Type), "scl", "Ljava/lang/ClassLoader;"); - - PROTECT(t, scl); - - GcField* sclSet - = resolveField(t, type(t, GcClassLoader::Type), "sclSet", "Z"); - - setField(t, - type(t, GcClassLoader::Type)->staticTable(), - scl->offset(), - roots(t)->appLoader()); - - fieldAtOffset(type(t, GcClassLoader::Type)->staticTable(), - sclSet->offset()) = true; - } - - t->m->processor->invoke(t, - roots(t)->bootLoader(), - "java/lang/System", - "initializeSystemClass", - "()V", - 0); - - t->m->processor->invoke(t, - roots(t)->bootLoader(), - "sun/misc/Launcher", - "getLauncher", - "()Lsun/misc/Launcher;", - 0); - - t->javaThread->setContextClassLoader(t, roots(t)->appLoader()); - } - - virtual const char* bootClasspath() - { - return classpath; - } - - virtual object makeDirectByteBuffer(Thread* t, void* p, jlong capacity) - { - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "java/nio/DirectByteBuffer"); - PROTECT(t, c); - - object instance = makeNew(t, c); - PROTECT(t, instance); - - GcMethod* constructor = resolveMethod(t, c, "", "(JI)V"); - - t->m->processor->invoke(t, - constructor, - instance, - reinterpret_cast(p), - static_cast(capacity)); - - return instance; - } - - virtual void* getDirectBufferAddress(Thread* t, object b) - { - PROTECT(t, b); - - GcField* field = resolveField(t, objectClass(t, b), "address", "J"); - - return reinterpret_cast(fieldAtOffset(b, field->offset())); - } - - virtual int64_t getDirectBufferCapacity(Thread* t, object b) - { - PROTECT(t, b); - - GcField* field = resolveField(t, objectClass(t, b), "capacity", "I"); - - return fieldAtOffset(b, field->offset()); - } - - virtual bool canTailCall(Thread* t UNUSED, - GcMethod*, - GcByteArray* calleeClassName, - GcByteArray* calleeMethodName, - GcByteArray*) - { - // we can't tail call System.loadLibrary or Runtime.loadLibrary - // due to their use of System.getCallerClass, which gets confused - // if we elide stack frames. - - return (strcmp("loadLibrary", - reinterpret_cast(calleeMethodName->body().begin())) - or (strcmp("java/lang/System", - reinterpret_cast(calleeClassName->body().begin())) - and strcmp("java/lang/Runtime", - reinterpret_cast( - calleeClassName->body().begin())))) - - // and we can't tail call Reflection.getCallerClass because the - // number of stack frames will be wrong - and (strcmp( - "getCallerClass", - reinterpret_cast(calleeMethodName->body().begin())) - or strcmp("sun/reflect/Reflection", - reinterpret_cast( - calleeClassName->body().begin()))); - } - - virtual GcClassLoader* libraryClassLoader(Thread* t, GcMethod* caller) - { -#ifdef AVIAN_OPENJDK_SRC - return (caller->class_() == type(t, GcClassLoader::Type) - and t->libraryLoadStack) - ? t->libraryLoadStack->classLoader -#else - return strcmp("java/lang/ClassLoader$NativeLibrary", - reinterpret_cast( - caller->class_()->name()->body().begin())) == 0 - ? cast( - t, - cast(t, - t->m->processor->invoke( - t, - resolveMethod(t, - caller->class_(), - "getFromClass", - "()Ljava/lang/Class;"), - 0))->vmClass())->loader() -#endif - : caller->class_()->loader(); - } - - virtual void shutDown(Thread* t) - { - GcClass* c - = resolveClass(t, roots(t)->bootLoader(), "java/lang/Shutdown", false); - - if (c) { - GcMethod* m = findMethodOrNull(t, c, "shutdown", "()V"); - - if (m) { - t->m->processor->invoke(t, m, 0); - } - } - } - - virtual void dispose() - { - allocator->free(buffer, bufferSize); - allocator->free(this, sizeof(*this)); - } - - Allocator* allocator; - const char* javaHome; - const char* classpath; - const char* libraryPath; - const char* tzMappings; - const char* embedPrefix; - char* buffer; - unsigned bufferSize; - unsigned tzMappingsLength; - unsigned embedPrefixLength; - unsigned filePathField; - unsigned fileDescriptorFdField; - unsigned fileInputStreamFdField; - unsigned zipFileJzfileField; - unsigned zipEntryNameField; - unsigned zipEntryTimeField; - unsigned zipEntryCrcField; - unsigned zipEntrySizeField; - unsigned zipEntryCsizeField; - unsigned zipEntryMethodField; - bool ranNetOnLoad; - bool ranManagementOnLoad; - JmmInterface jmmInterface; -}; - -struct JVM_ExceptionTableEntryType { - jint start_pc; - jint end_pc; - jint handler_pc; - jint catchType; -}; - -struct jvm_version_info { - unsigned jvm_version; - unsigned update_version : 8; - unsigned special_update_version : 8; - unsigned reserved1 : 16; - unsigned reserved2; - unsigned is_attach_supported : 1; - unsigned is_kernel_jvm : 1; - unsigned : 30; - unsigned : 32; - unsigned : 32; -}; - -bool pathEqual(const char* a, const char* b, unsigned length) -{ -#ifdef PLATFORM_WINDOWS - return strncasecmp(a, b, length) == 0; -#else - return strncmp(a, b, length) == 0; -#endif -} - -class EmbeddedFile { - public: - EmbeddedFile(MyClasspath* cp, const char* path, unsigned pathLength) - { - if (pathEqual(cp->embedPrefix, path, cp->embedPrefixLength)) { - const char* p = path + cp->embedPrefixLength; - while (*p == '/') - ++p; - - this->jar = p; - - if (*p == 0) { - this->jarLength = 0; - this->path = 0; - this->pathLength = 0; - return; - } - - while (*p and *p != '/') - ++p; - - this->jarLength = p - this->jar; - - while (*p == '/') - ++p; - - this->path = p; - this->pathLength = pathLength - (p - path); - } else { - this->jar = 0; - this->jarLength = 0; - this->path = 0; - this->pathLength = 0; - } - } - - const char* jar; - const char* path; - unsigned jarLength; - unsigned pathLength; -}; - -static uint64_t uncaughtExceptionHandler(Thread* t, uintptr_t* arguments) -{ - GcThrowable* exception = cast(t, reinterpret_cast(arguments[0])); - PROTECT(t, exception); - - GcMethod* dispatch = resolveMethod(t, - roots(t)->bootLoader(), - "java/lang/Thread", - "dispatchUncaughtException", - "(Ljava/lang/Throwable;)V"); - if (dispatch != NULL) { - t->m->processor->invoke(t, dispatch, t->javaThread, exception); - } - return 0; -} - -#ifdef AVIAN_OPENJDK_SRC -int64_t JNICALL - getFileAttributes(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - const unsigned Exists = 1; - const unsigned Regular = 2; - const unsigned Directory = 4; - - MyClasspath* cp = static_cast(t->m->classpath); - - object file = reinterpret_cast(arguments[1]); - GcString* path - = cast(t, fieldAtOffset(file, cp->filePathField)); - - THREAD_RUNTIME_ARRAY(t, char, p, path->length(t) + 1); - stringChars(t, path, RUNTIME_ARRAY_BODY(p)); - replace('\\', '/', RUNTIME_ARRAY_BODY(p)); - - EmbeddedFile ef(cp, RUNTIME_ARRAY_BODY(p), path->length(t)); - if (ef.jar) { - if (ef.jarLength == 0) { - return Exists | Directory; - } - - Finder* finder = getFinder(t, ef.jar, ef.jarLength); - if (finder) { - if (ef.pathLength == 0) { - return Exists | Directory; - } - - size_t length; - System::FileType type = finder->stat(ef.path, &length, true); - switch (type) { - case System::TypeUnknown: - return Exists; - case System::TypeDoesNotExist: - return 0; - case System::TypeFile: - return Exists | Regular; - case System::TypeDirectory: - return Exists | Directory; - default: - abort(t); - } - } else { - return 0; - } - } else { - return cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - reinterpret_cast(arguments[0]), - file))->value(); - } -} - -int64_t JNICALL - checkFileAccess(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - const unsigned Read = 4; - - MyClasspath* cp = static_cast(t->m->classpath); - - object file = reinterpret_cast(arguments[1]); - unsigned mask = arguments[2]; - GcString* path - = cast(t, fieldAtOffset(file, cp->filePathField)); - - THREAD_RUNTIME_ARRAY(t, char, p, path->length(t) + 1); - stringChars(t, path, RUNTIME_ARRAY_BODY(p)); - replace('\\', '/', RUNTIME_ARRAY_BODY(p)); - - EmbeddedFile ef(cp, RUNTIME_ARRAY_BODY(p), path->length(t)); - if (ef.jar) { - if (ef.jarLength == 0) { - return mask == Read; - } - - Finder* finder = getFinder(t, ef.jar, ef.jarLength); - if (finder) { - if (ef.pathLength == 0) { - return mask == Read; - } - - size_t length; - System::FileType type = finder->stat(ef.path, &length, true); - switch (type) { - case System::TypeDoesNotExist: - return false; - case System::TypeUnknown: - case System::TypeFile: - case System::TypeDirectory: - return mask == Read; - default: - abort(t); - } - } else { - return 0; - } - } else { - return cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - reinterpret_cast(arguments[0]), - file, - mask))->value() != 0; - } -} - -int64_t JNICALL getFileLength(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - MyClasspath* cp = static_cast(t->m->classpath); - - object file = reinterpret_cast(arguments[1]); - GcString* path - = cast(t, fieldAtOffset(file, cp->filePathField)); - - THREAD_RUNTIME_ARRAY(t, char, p, path->length(t) + 1); - stringChars(t, path, RUNTIME_ARRAY_BODY(p)); - replace('\\', '/', RUNTIME_ARRAY_BODY(p)); - - EmbeddedFile ef(cp, RUNTIME_ARRAY_BODY(p), path->length(t)); - if (ef.jar) { - if (ef.jarLength == 0) { - return 0; - } - - Finder* finder = getFinder(t, ef.jar, ef.jarLength); - if (finder) { - if (ef.pathLength == 0) { - return 0; - } - - size_t fileLength; - finder->stat(ef.path, &fileLength); - return fileLength; - } - - return 0; - } else { - return cast(t, - t->m->processor->invoke( - t, - cast(t, - cast( - t, - getMethodRuntimeData(t, method) - ->native())->original()), - reinterpret_cast(arguments[0]), - file))->value(); - } -} - -void JNICALL openFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - GcString* path = cast(t, reinterpret_cast(arguments[1])); - - MyClasspath* cp = static_cast(t->m->classpath); - - THREAD_RUNTIME_ARRAY(t, char, p, path->length(t) + 1); - stringChars(t, path, RUNTIME_ARRAY_BODY(p)); - replace('\\', '/', RUNTIME_ARRAY_BODY(p)); - - EmbeddedFile ef(cp, RUNTIME_ARRAY_BODY(p), path->length(t)); - if (ef.jar) { - if (ef.jarLength == 0 or ef.pathLength == 0) { - throwNew(t, GcFileNotFoundException::Type); - } - - Finder* finder = getFinder(t, ef.jar, ef.jarLength); - if (finder == 0) { - throwNew(t, GcFileNotFoundException::Type); - } - - System::Region* r = finder->find(ef.path); - if (r == 0) { - throwNew(t, GcFileNotFoundException::Type); - } - - PROTECT(t, this_); - - ACQUIRE(t, t->m->referenceLock); - - int index = -1; - unsigned oldLength - = roots(t)->virtualFiles() ? roots(t)->virtualFiles()->length() : 0; - - for (unsigned i = 0; i < oldLength; ++i) { - if (roots(t)->virtualFiles()->body()[i] == 0) { - index = i; - break; - } - } - - if (index == -1) { - GcArray* newArray = growArray(t, roots(t)->virtualFiles()); - roots(t)->setVirtualFiles(t, newArray); - index = oldLength; - } - - object region = makeRegion(t, r, 0); - roots(t)->virtualFiles()->setBodyElement(t, index, region); - - fieldAtOffset( - fieldAtOffset(this_, cp->fileInputStreamFdField), - cp->fileDescriptorFdField) = index + VirtualFileBase; - } else { - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native())->original()), - this_, - path); - } -} - -int64_t JNICALL - readByteFromFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - - MyClasspath* cp = static_cast(t->m->classpath); - - int fd = fieldAtOffset( - fieldAtOffset(this_, cp->fileInputStreamFdField), - cp->fileDescriptorFdField); - - if (fd >= VirtualFileBase) { - ACQUIRE(t, t->m->referenceLock); - - GcRegion* region = cast( - t, roots(t)->virtualFiles()->body()[fd - VirtualFileBase]); - - if (region) { - System::Region* r = static_cast(region->region()); - - if (r->length() > region->position()) { - return r->start()[region->position()++]; - } else { - return -1; - } - } else { - throwNew(t, GcIoException::Type); - } - } else { - return cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - this_))->value(); - } -} - -int64_t JNICALL - readBytesFromFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - GcByteArray* dst - = cast(t, reinterpret_cast(arguments[1])); - int32_t offset = arguments[2]; - int32_t length = arguments[3]; - - MyClasspath* cp = static_cast(t->m->classpath); - - int fd = fieldAtOffset( - fieldAtOffset(this_, cp->fileInputStreamFdField), - cp->fileDescriptorFdField); - - if (fd >= VirtualFileBase) { - PROTECT(t, dst); - - ACQUIRE(t, t->m->referenceLock); - - GcRegion* region = cast( - t, roots(t)->virtualFiles()->body()[fd - VirtualFileBase]); - - if (region) { - System::Region* r = static_cast(region->region()); - - int available = r->length() - region->position(); - if (available == 0) { - return -1; - } - - if (length > available) { - length = available; - } - - memcpy(&dst->body()[offset], r->start() + region->position(), length); - - region->position() += length; - - return length; - } else { - throwNew(t, GcIoException::Type); - } - } else { - return cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - this_, - dst, - offset, - length))->value(); - } -} - -int64_t JNICALL - skipBytesInFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - int64_t count; - memcpy(&count, arguments + 1, 8); - - MyClasspath* cp = static_cast(t->m->classpath); - - int fd = fieldAtOffset( - fieldAtOffset(this_, cp->fileInputStreamFdField), - cp->fileDescriptorFdField); - - if (fd >= VirtualFileBase) { - ACQUIRE(t, t->m->referenceLock); - - GcRegion* region = cast( - t, roots(t)->virtualFiles()->body()[fd - VirtualFileBase]); - - if (region) { - System::Region* r = static_cast(region->region()); - - int available = r->length() - region->position(); - if (count > available) { - count = available; - } - - region->position() += count; - - return count; - } else { - throwNew(t, GcIoException::Type); - } - } else { - return cast(t, - t->m->processor->invoke( - t, - cast(t, - cast( - t, - getMethodRuntimeData(t, method) - ->native())->original()), - this_, - count))->value(); - } -} - -int64_t JNICALL - availableBytesInFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - - MyClasspath* cp = static_cast(t->m->classpath); - - int fd = fieldAtOffset( - fieldAtOffset(this_, cp->fileInputStreamFdField), - cp->fileDescriptorFdField); - - if (fd >= VirtualFileBase) { - ACQUIRE(t, t->m->referenceLock); - - GcRegion* region = cast( - t, roots(t)->virtualFiles()->body()[fd - VirtualFileBase]); - - if (region) { - return static_cast(region->region())->length() - - region->position(); - } else { - throwNew(t, GcIoException::Type); - } - } else { - object r = t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native())->original()), - this_); - - return r ? cast(t, r)->value() : 0; - } -} - -void JNICALL closeFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - - MyClasspath* cp = static_cast(t->m->classpath); - - int fd = fieldAtOffset( - fieldAtOffset(this_, cp->fileInputStreamFdField), - cp->fileDescriptorFdField); - - if (fd >= VirtualFileBase) { - ACQUIRE(t, t->m->referenceLock); - - int index = fd - VirtualFileBase; - GcRegion* region - = cast(t, roots(t)->virtualFiles()->body()[index]); - - if (region) { - static_cast(region->region())->dispose(); - } - - roots(t)->virtualFiles()->setBodyElement(t, index, 0); - } else { - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native())->original()), - this_); - } -} - -class ZipFile { - public: - class Entry { - public: - Entry(unsigned hash, const uint8_t* start, Entry* next) - : hash(hash), start(start), next(next), entry(0) - { - } - - Entry(int64_t entry) : hash(0), start(0), next(0), entry(entry) - { - } - - Entry() : hash(0), start(0), next(0), entry(0) - { - } - - unsigned hash; - const uint8_t* start; - Entry* next; - int64_t entry; - }; - - ZipFile(Thread* t, System::Region* region, unsigned entryCount) - : region(region), - entryCount(entryCount), - indexSize(nextPowerOfTwo(entryCount)), - index(reinterpret_cast( - t->m->heap->allocate(sizeof(ZipFile::Entry*) * indexSize))), - file(0) - { - memset(index, 0, sizeof(ZipFile::Entry*) * indexSize); - } - - ZipFile(int64_t file) - : region(0), entryCount(0), indexSize(0), index(0), file(file) - { - } - - System::Region* region; - unsigned entryCount; - unsigned indexSize; - Entry** index; - int64_t file; - Entry entries[0]; -}; - -int64_t JNICALL openZipFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - GcString* path = cast(t, reinterpret_cast(arguments[0])); - int mode = arguments[1]; - int64_t lastModified; - memcpy(&lastModified, arguments + 2, 8); - - MyClasspath* cp = static_cast(t->m->classpath); - - THREAD_RUNTIME_ARRAY(t, char, p, path->length(t) + 1); - stringChars(t, path, RUNTIME_ARRAY_BODY(p)); - replace('\\', '/', RUNTIME_ARRAY_BODY(p)); - - EmbeddedFile ef(cp, RUNTIME_ARRAY_BODY(p), path->length(t)); - if (ef.jar) { - if (ef.jarLength == 0 or ef.pathLength == 0) { - throwNew(t, GcFileNotFoundException::Type); - } - - Finder* finder = getFinder(t, ef.jar, ef.jarLength); - if (finder == 0) { - throwNew(t, GcFileNotFoundException::Type); - } - - System::Region* r = finder->find(ef.path); - if (r == 0) { - throwNew(t, GcFileNotFoundException::Type); - } - - const uint8_t* start = r->start(); - const uint8_t* end = start + r->length(); - unsigned entryCount = 0; - for (const uint8_t* p = end - CentralDirectorySearchStart; p > start;) { - if (get4(p) == CentralDirectorySignature) { - p = start + centralDirectoryOffset(p); - - while (p < end) { - if (get4(p) == EntrySignature) { - ++entryCount; - - p = endOfEntry(p); - } else { - goto make; - } - } - } else { - --p; - } - } - - make: - ZipFile* file = new (t->m->heap->allocate( - sizeof(ZipFile) + (sizeof(ZipFile::Entry) * entryCount))) - ZipFile(t, r, entryCount); - - { - unsigned position = 0; - for (const uint8_t* p = end - CentralDirectorySearchStart; p > start;) { - if (get4(p) == CentralDirectorySignature) { - p = start + centralDirectoryOffset(p); - - while (p < end) { - if (get4(p) == EntrySignature) { - unsigned h - = hash(Slice(fileName(p), fileNameLength(p))); - unsigned i = h & (file->indexSize - 1); - - file->index[i] = new (file->entries + (position++)) - ZipFile::Entry(h, p, file->index[i]); - - p = endOfEntry(p); - } else { - goto exit; - } - } - } else { - --p; - } - } - } - - exit: - return reinterpret_cast(file); - } else { - return reinterpret_cast( - new (t->m->heap->allocate(sizeof(ZipFile))) ZipFile( - cast(t, - t->m->processor->invoke( - t, - cast(t, - cast( - t, - getMethodRuntimeData(t, method) - ->native())->original()), - 0, - path, - mode, - lastModified))->value())); - } -} - -int64_t JNICALL - getZipFileEntryCount(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - ZipFile* file = reinterpret_cast(peer); - if (file->region) { - return file->entryCount; - } else { - return cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - 0, - file->file))->value(); - } -} - -ZipFile::Entry* find(ZipFile* file, const char* path, unsigned pathLength) -{ - if (pathLength > 0 && path[0] == '/') { - ++path; - --pathLength; - } - unsigned i = hash(path) & (file->indexSize - 1); - for (ZipFile::Entry* e = file->index[i]; e; e = e->next) { - const uint8_t* p = e->start; - if (equal(path, pathLength, fileName(p), fileNameLength(p))) { - return e; - } - } - return 0; -} - -int64_t JNICALL - getZipFileEntry(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - GcByteArray* path - = cast(t, reinterpret_cast(arguments[2])); - bool addSlash = arguments[3]; - - ZipFile* file = reinterpret_cast(peer); - if (file->region) { - THREAD_RUNTIME_ARRAY(t, char, p, path->length() + 2); - memcpy(RUNTIME_ARRAY_BODY(p), path->body().begin(), path->length()); - RUNTIME_ARRAY_BODY(p)[path->length()] = 0; - replace('\\', '/', RUNTIME_ARRAY_BODY(p)); - - ZipFile::Entry *e = find(file, RUNTIME_ARRAY_BODY(p), path->length()); - - if (e == 0 and addSlash and RUNTIME_ARRAY_BODY(p)[path->length()] != '/') { - RUNTIME_ARRAY_BODY(p)[path->length()] = '/'; - RUNTIME_ARRAY_BODY(p)[path->length() + 1] = 0; - - e = find(file, RUNTIME_ARRAY_BODY(p), path->length()); - } - - return reinterpret_cast(e); - } else { - int64_t entry - = cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - 0, - file->file, - path, - addSlash))->value(); - - return entry ? reinterpret_cast(new (t->m->heap->allocate( - sizeof(ZipFile::Entry))) ZipFile::Entry(entry)) - : 0; - } -} - -int64_t JNICALL - getZipFileEntryBytes(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - int type = arguments[2]; - - ZipFile::Entry* entry = reinterpret_cast(peer); - if (entry->start) { - switch (type) { - case 0: { // name - unsigned nameLength = fileNameLength(entry->start); - GcByteArray* array = makeByteArray(t, nameLength); - memcpy(array->body().begin(), fileName(entry->start), nameLength); - return reinterpret_cast(array); - } break; - - case 1: { // extra - return 0; - } break; - - case 2: { // comment - return 0; - } break; - - default: - abort(t); - } - return compressedSize(entry->start); - } else { - return reinterpret_cast(t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native())->original()), - 0, - entry->entry, - type)); - } -} - -int64_t JNICALL - getNextZipFileEntry(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - int index = arguments[2]; - - ZipFile* file = reinterpret_cast(peer); - if (file->region) { - return reinterpret_cast(file->entries + index); - } else { - int64_t entry - = cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - 0, - file->file, - index))->value(); - - return entry ? reinterpret_cast(new (t->m->heap->allocate( - sizeof(ZipFile::Entry))) ZipFile::Entry(entry)) - : 0; - } -} - -int64_t JNICALL - getZipFileEntryMethod(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - ZipFile::Entry* entry = reinterpret_cast(peer); - if (entry->start) { - return compressionMethod(entry->start); - } else { - return cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - 0, - entry->entry))->value(); - } -} - -int64_t JNICALL getZipFileEntryCompressedSize(Thread* t, - GcMethod* method, - uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - ZipFile::Entry* entry = reinterpret_cast(peer); - if (entry->start) { - return compressedSize(entry->start); - } else { - return cast(t, - t->m->processor->invoke( - t, - cast(t, - cast( - t, - getMethodRuntimeData(t, method) - ->native())->original()), - 0, - entry->entry))->value(); - } -} - -int64_t JNICALL getZipFileEntryUncompressedSize(Thread* t, - GcMethod* method, - uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - ZipFile::Entry* entry = reinterpret_cast(peer); - if (entry->start) { - return uncompressedSize(entry->start); - } else { - return cast(t, - t->m->processor->invoke( - t, - cast(t, - cast( - t, - getMethodRuntimeData(t, method) - ->native())->original()), - 0, - entry->entry))->value(); - } -} - -void JNICALL freeZipFileEntry(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t filePeer; - memcpy(&filePeer, arguments, 8); - int64_t entryPeer; - memcpy(&entryPeer, arguments + 2, 8); - - ZipFile* file = reinterpret_cast(filePeer); - ZipFile::Entry* entry = reinterpret_cast(entryPeer); - if (file->region == 0) { - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native())->original()), - 0, - file->file, - entry->entry); - - t->m->heap->free(entry, sizeof(ZipFile::Entry)); - } -} - -int64_t JNICALL - readZipFileEntry(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t filePeer; - memcpy(&filePeer, arguments, 8); - int64_t entryPeer; - memcpy(&entryPeer, arguments + 2, 8); - int64_t position; - memcpy(&position, arguments + 4, 8); - GcByteArray* buffer - = cast(t, reinterpret_cast(arguments[6])); - int offset = arguments[7]; - int length = arguments[8]; - - ZipFile* file = reinterpret_cast(filePeer); - ZipFile::Entry* entry = reinterpret_cast(entryPeer); - if (file->region) { - unsigned size = uncompressedSize(entry->start); - if (position >= size) { - return -1; - } - - if (position + length > size) { - length = size - position; - } - - memcpy(&buffer->body()[offset], - fileData(file->region->start() + localHeaderOffset(entry->start)) - + position, - length); - - return length; - } else { - return cast(t, - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native()) - ->original()), - 0, - file->file, - entry->entry, - position, - buffer, - offset, - length))->value(); - } -} - -int64_t JNICALL getZipMessage(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - ZipFile* file = reinterpret_cast(peer); - if (file->region) { - return 0; - } else { - return reinterpret_cast(t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native())->original()), - 0, - file->file)); - } -} - -int64_t JNICALL getJarFileMetaInfEntryNames(Thread* t, - GcMethod* method, - uintptr_t* arguments) -{ - object this_ = reinterpret_cast(arguments[0]); - - MyClasspath* cp = static_cast(t->m->classpath); - - int64_t peer = fieldAtOffset(this_, cp->zipFileJzfileField); - ZipFile* file = reinterpret_cast(peer); - if (file->region) { - return 0; - } else { - PROTECT(t, method); - - // OpenJDK's Java_java_util_jar_JarFile_getMetaInfEntryNames - // implementation expects to find a pointer to an instance of its - // jzfile structure in the ZipFile.jzfile field of the object we - // pass in. However, we can't pass this_ in, because its - // ZipFile.jzfile field points to a ZipFile instance, not a - // jzfile. So we pass in a temporary object instead which has the - // desired pointer at the same offset. We assume here that - // ZipFile.jzfile is the first field in that class and that - // Java_java_util_jar_JarFile_getMetaInfEntryNames will not look - // for any other fields in the object. - object pseudoThis = makeLong(t, file->file); - - return reinterpret_cast(t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native())->original()), - pseudoThis)); - } -} - -void JNICALL closeZipFile(Thread* t, GcMethod* method, uintptr_t* arguments) -{ - int64_t peer; - memcpy(&peer, arguments, 8); - - ZipFile* file = reinterpret_cast(peer); - if (file->region) { - file->region->dispose(); - t->m->heap->free( - file, sizeof(ZipFile) + (sizeof(ZipFile::Entry) * file->entryCount)); - } else { - t->m->processor->invoke( - t, - cast( - t, - cast( - t, getMethodRuntimeData(t, method)->native())->original()), - 0, - file->file); - - t->m->heap->free(file, sizeof(ZipFile)); - } -} - -int64_t JNICALL getBootstrapResource(Thread* t, object, uintptr_t* arguments) -{ - object name = reinterpret_cast(arguments[0]); - PROTECT(t, name); - - GcMethod* m = findMethodOrNull(t, - type(t, GcSystemClassLoader::Type), - "findResource", - "(Ljava/lang/String;)Ljava/net/URL;"); - - if (m) { - return reinterpret_cast( - t->m->processor->invoke(t, m, roots(t)->bootLoader(), name)); - } else { - return 0; - } -} - -int64_t JNICALL getBootstrapResources(Thread* t, object, uintptr_t* arguments) -{ - object name = reinterpret_cast(arguments[0]); - PROTECT(t, name); - - GcMethod* m = findMethodOrNull(t, - type(t, GcSystemClassLoader::Type), - "findResources", - "(Ljava/lang/String;)Ljava/util/Enumeration;"); - - if (m) { - return reinterpret_cast( - t->m->processor->invoke(t, m, roots(t)->bootLoader(), name)); - } else { - return 0; - } -} - -void JNICALL loadLibrary(Thread* t, object, uintptr_t* arguments) -{ - Thread::LibraryLoadStack stack( - t, - cast(t, reinterpret_cast(arguments[0])) - ->vmClass() - ->loader()); - - GcString* name = cast(t, reinterpret_cast(arguments[1])); - THREAD_RUNTIME_ARRAY(t, char, n, name->length(t) + 1); - stringChars(t, name, RUNTIME_ARRAY_BODY(n)); - - bool absolute = arguments[2]; - - if (not absolute) { - if (strcmp(RUNTIME_ARRAY_BODY(n), "zip") == 0 - or strcmp(RUNTIME_ARRAY_BODY(n), "nio") == 0) { - return; - } - } - - loadLibrary(t, - static_cast(t->m->classpath)->libraryPath, - RUNTIME_ARRAY_BODY(n), - not absolute, - true); -} - -void interceptFileOperations(Thread* t, bool updateRuntimeData) -{ - MyClasspath* cp = static_cast(t->m->classpath); - - { - GcClass* fileClass - = resolveClass(t, roots(t)->bootLoader(), "java/io/File", false); - - if (fileClass) { - GcField* filePathField - = findFieldInClass2(t, fileClass, "path", "Ljava/lang/String;"); - - if (filePathField) { - cp->filePathField = filePathField->offset(); - } - } - } - - { - GcClass* fileDescriptorClass = resolveClass( - t, roots(t)->bootLoader(), "java/io/FileDescriptor", false); - - if (fileDescriptorClass) { - GcField* fileDescriptorFdField - = findFieldInClass2(t, fileDescriptorClass, "fd", "I"); - - if (fileDescriptorFdField) { - cp->fileDescriptorFdField = fileDescriptorFdField->offset(); - } - } - } - - { - GcClass* fileInputStreamClass = resolveClass( - t, roots(t)->bootLoader(), "java/io/FileInputStream", false); - - if (fileInputStreamClass) { - PROTECT(t, fileInputStreamClass); - - GcField* fileInputStreamFdField = findFieldInClass2( - t, fileInputStreamClass, "fd", "Ljava/io/FileDescriptor;"); - - if (fileInputStreamFdField) { - cp->fileInputStreamFdField = fileInputStreamFdField->offset(); - - // Some OpenJDK versions wrap the native call in a simple forwarder method, others don't. - - if (findMethodOrNull(t, fileInputStreamClass, "open0", "(Ljava/lang/String;)V") != 0) { - intercept(t, - fileInputStreamClass, - "open0", - "(Ljava/lang/String;)V", - voidPointer(openFile), - updateRuntimeData); - } else { - intercept(t, - fileInputStreamClass, - "open", - "(Ljava/lang/String;)V", - voidPointer(openFile), - updateRuntimeData); - } - - if (findMethodOrNull(t, fileInputStreamClass, "read0", "()I") != 0) { - intercept(t, - fileInputStreamClass, - "read0", - "()I", - voidPointer(readByteFromFile), - updateRuntimeData); - } else { - intercept(t, - fileInputStreamClass, - "read", - "()I", - voidPointer(readByteFromFile), - updateRuntimeData); - } - - intercept(t, - fileInputStreamClass, - "readBytes", - "([BII)I", - voidPointer(readBytesFromFile), - updateRuntimeData); - - if (findMethodOrNull(t, fileInputStreamClass, "skip0", "()I") != 0) { - intercept(t, - fileInputStreamClass, - "skip0", - "(J)J", - voidPointer(skipBytesInFile), - updateRuntimeData); - } else { - intercept(t, - fileInputStreamClass, - "skip", - "(J)J", - voidPointer(skipBytesInFile), - updateRuntimeData); - } - - if (findMethodOrNull(t, fileInputStreamClass, "available0", "()I") != 0) { - intercept(t, - fileInputStreamClass, - "available0", - "()I", - voidPointer(availableBytesInFile), - updateRuntimeData); - } else { - intercept(t, - fileInputStreamClass, - "available", - "()I", - voidPointer(availableBytesInFile), - updateRuntimeData); - } - - intercept(t, - fileInputStreamClass, - "close0", - "()V", - voidPointer(closeFile), - updateRuntimeData); - } - } - } - - { - GcClass* zipFileClass = resolveClass( - t, roots(t)->bootLoader(), "java/util/zip/ZipFile", false); - - if (zipFileClass) { - PROTECT(t, zipFileClass); - - GcField* zipFileJzfileField - = findFieldInClass2(t, zipFileClass, "jzfile", "J"); - - if (zipFileJzfileField) { - cp->zipFileJzfileField = zipFileJzfileField->offset(); - - intercept(t, - zipFileClass, - "open", - "(Ljava/lang/String;IJZ)J", - voidPointer(openZipFile), - updateRuntimeData); - - intercept(t, - zipFileClass, - "getTotal", - "(J)I", - voidPointer(getZipFileEntryCount), - updateRuntimeData); - - intercept(t, - zipFileClass, - "getEntry", - "(J[BZ)J", - voidPointer(getZipFileEntry), - updateRuntimeData); - - intercept(t, - zipFileClass, - "getEntryBytes", - "(JI)[B", - voidPointer(getZipFileEntryBytes), - updateRuntimeData); - - intercept(t, - zipFileClass, - "getNextEntry", - "(JI)J", - voidPointer(getNextZipFileEntry), - updateRuntimeData); - - intercept(t, - zipFileClass, - "getEntryMethod", - "(J)I", - voidPointer(getZipFileEntryMethod), - updateRuntimeData); - - intercept(t, - zipFileClass, - "freeEntry", - "(JJ)V", - voidPointer(freeZipFileEntry), - updateRuntimeData); - - intercept(t, - zipFileClass, - "read", - "(JJJ[BII)I", - voidPointer(readZipFileEntry), - updateRuntimeData); - - intercept(t, - zipFileClass, - "getEntryCSize", - "(J)J", - voidPointer(getZipFileEntryCompressedSize), - updateRuntimeData); - - intercept(t, - zipFileClass, - "getEntrySize", - "(J)J", - voidPointer(getZipFileEntryUncompressedSize), - updateRuntimeData); - - intercept(t, - zipFileClass, - "getZipMessage", - "(J)Ljava/lang/String;", - voidPointer(getZipMessage), - updateRuntimeData); - - intercept(t, - zipFileClass, - "close", - "(J)V", - voidPointer(closeZipFile), - updateRuntimeData); - } - } - } - - { - GcClass* jarFileClass = resolveClass( - t, roots(t)->bootLoader(), "java/util/jar/JarFile", false); - - if (jarFileClass) { - intercept(t, - jarFileClass, - "getMetaInfEntryNames", - "()[Ljava/lang/String;", - voidPointer(getJarFileMetaInfEntryNames), - updateRuntimeData); - } - } - - { -#ifdef PLATFORM_WINDOWS - const char* const fsClassName = "java/io/WinNTFileSystem"; - const char* const gbaMethodName = "getBooleanAttributes"; -#else - const char* const fsClassName = "java/io/UnixFileSystem"; - const char* const gbaMethodName = "getBooleanAttributes0"; -#endif - - GcClass* fsClass - = resolveClass(t, roots(t)->bootLoader(), fsClassName, false); - - if (fsClass) { - PROTECT(t, fsClass); - - intercept(t, - fsClass, - gbaMethodName, - "(Ljava/io/File;)I", - voidPointer(getFileAttributes), - updateRuntimeData); - - intercept(t, - fsClass, - "checkAccess", - "(Ljava/io/File;I)Z", - voidPointer(checkFileAccess), - updateRuntimeData); - - intercept(t, - fsClass, - "getLength", - "(Ljava/io/File;)J", - voidPointer(getFileLength), - updateRuntimeData); - } - } - - intercept(t, - type(t, GcClassLoader::Type), - "loadLibrary", - "(Ljava/lang/Class;Ljava/lang/String;Z)V", - voidPointer(loadLibrary), - updateRuntimeData); - - intercept(t, - type(t, GcClassLoader::Type), - "getBootstrapResource", - "(Ljava/lang/String;)Ljava/net/URL;", - voidPointer(getBootstrapResource), - updateRuntimeData); - - intercept(t, - type(t, GcClassLoader::Type), - "getBootstrapResources", - "(Ljava/lang/String;)Ljava/util/Enumeration;", - voidPointer(getBootstrapResources), - updateRuntimeData); -} -#endif // AVIAN_OPENJDK_SRC - -unsigned classDeclaredMethodCount(Thread* t, GcClass* c) -{ - GcClassAddendum* addendum = c->addendum(); - if (addendum) { - int count = addendum->declaredMethodCount(); - if (count >= 0) { - return count; - } - } - GcArray* table = cast(t, c->methodTable()); - return table == 0 ? 0 : table->length(); -} - -unsigned countMethods(Thread* t, GcClass* c, bool publicOnly) -{ - GcArray* table = cast(t, c->methodTable()); - unsigned count = 0; - for (unsigned i = 0, j = classDeclaredMethodCount(t, c); i < j; ++i) { - GcMethod* vmMethod = cast(t, table->body()[i]); - if (((not publicOnly) or (vmMethod->flags() & ACC_PUBLIC)) - and vmMethod->name()->body()[0] != '<') { - ++count; - } - } - return count; -} - -unsigned countFields(Thread* t, GcClass* c, bool publicOnly) -{ - GcArray* table = cast(t, c->fieldTable()); - if (publicOnly) { - unsigned count = 0; - for (unsigned i = 0; i < table->length(); ++i) { - GcField* vmField = cast(t, table->body()[i]); - if (vmField->flags() & ACC_PUBLIC) { - ++count; - } - } - return count; - } else { - return objectArrayLength(t, table); - } -} - -unsigned countConstructors(Thread* t, GcClass* c, bool publicOnly) -{ - GcArray* table = cast(t, c->methodTable()); - unsigned count = 0; - for (unsigned i = 0, j = classDeclaredMethodCount(t, c); i < j; ++i) { - GcMethod* vmMethod = cast(t, table->body()[i]); - if (((not publicOnly) or (vmMethod->flags() & ACC_PUBLIC)) - and strcmp(reinterpret_cast(vmMethod->name()->body().begin()), - "") == 0) { - ++count; - } - } - return count; -} - -#ifdef HAVE_JexecutableHasRealParameterData -object makeJmethod(Thread* t, - uint8_t override, - object securityCheckCache, - object clazz, - uint32_t slot, - object name, - object returnType, - object parameterTypes, - object exceptionTypes, - uint32_t modifiers, - object signature, - object genericInfo, - object annotations, - object parameterAnnotations, - object annotationDefault, - object methodAccessor, - object root, - object declaredAnnotations) -{ - return makeJmethod(t, - override, - securityCheckCache, - 0, - 0, - declaredAnnotations, - cast(t, clazz), - slot, - cast(t, name), - cast(t, returnType), - parameterTypes, - exceptionTypes, - modifiers, - cast(t, signature), - genericInfo, - cast(t, annotations), - cast(t, parameterAnnotations), - cast(t, annotationDefault), - methodAccessor, - cast(t, root)); -} - -object makeJconstructor(Thread* t, - uint8_t override, - object securityCheckCache, - object clazz, - uint32_t slot, - object parameterTypes, - object exceptionTypes, - uint32_t modifiers, - object signature, - object genericInfo, - object annotations, - object parameterAnnotations, - object constructorAccessor, - object root, - object declaredAnnotations) -{ - return makeJconstructor(t, - override, - securityCheckCache, - 0, - 0, - declaredAnnotations, - cast(t, clazz), - slot, - parameterTypes, - exceptionTypes, - modifiers, - cast(t, signature), - genericInfo, - cast(t, annotations), - cast(t, parameterAnnotations), - constructorAccessor, - cast(t, root)); -} -#endif // HAVE_JexecutableHasRealParameterData - -object makeJmethod(Thread* t, GcMethod* vmMethod, int index) -{ - PROTECT(t, vmMethod); - - object name - = intern(t, - t->m->classpath->makeString( - t, vmMethod->name(), 0, vmMethod->name()->length() - 1)); - PROTECT(t, name); - - unsigned parameterCount; - unsigned returnTypeSpec; - object parameterTypes = resolveParameterJTypes(t, - vmMethod->class_()->loader(), - vmMethod->spec(), - ¶meterCount, - &returnTypeSpec); - PROTECT(t, parameterTypes); - - GcJclass* returnType = resolveJType( - t, - vmMethod->class_()->loader(), - reinterpret_cast(&vmMethod->spec()->body()[returnTypeSpec]), - vmMethod->spec()->length() - 1 - returnTypeSpec); - PROTECT(t, returnType); - - object exceptionTypes = resolveExceptionJTypes( - t, vmMethod->class_()->loader(), vmMethod->addendum()); - PROTECT(t, exceptionTypes); - - object signature; - object annotationTable; - object parameterAnnotationTable; - object annotationDefault; - GcMethodAddendum* addendum = vmMethod->addendum(); - if (addendum) { - signature = addendum->signature(); - if (signature) { - PROTECT(t, addendum); - - signature = t->m->classpath->makeString( - t, signature, 0, cast(t, signature)->length() - 1); - } - - annotationTable = addendum->annotationTable(); - - parameterAnnotationTable = addendum->parameterAnnotationTable(); - - annotationDefault = addendum->annotationDefault(); - } else { - signature = 0; - annotationTable = 0; - parameterAnnotationTable = 0; - annotationDefault = 0; - } - - PROTECT(t, signature); - PROTECT(t, annotationTable); - PROTECT(t, parameterAnnotationTable); - PROTECT(t, annotationDefault); - - if (annotationTable or parameterAnnotationTable or annotationDefault) { - GcClassRuntimeData* runtimeData - = getClassRuntimeData(t, vmMethod->class_()); - - runtimeData->setPool(t, vmMethod->addendum()->pool()); - } - - if (index == -1) { - GcArray* table = cast(t, vmMethod->class_()->methodTable()); - for (unsigned i = 0; i < table->length(); ++i) { - if (vmMethod == table->body()[i]) { - index = i; - break; - } - } - } - - expect(t, index != -1); - - GcJclass* jclass = getJClass(t, vmMethod->class_()); - - return makeJmethod(t, - true, - 0, - jclass, - index, - cast(t, name), - returnType, - parameterTypes, - exceptionTypes, - vmMethod->flags(), - cast(t, signature), - 0, - cast(t, annotationTable), - cast(t, parameterAnnotationTable), - cast(t, annotationDefault), - 0, - 0, - 0); -} - -object makeJconstructor(Thread* t, GcMethod* vmMethod, int index) -{ - PROTECT(t, vmMethod); - - unsigned parameterCount; - unsigned returnTypeSpec; - object parameterTypes = resolveParameterJTypes(t, - vmMethod->class_()->loader(), - vmMethod->spec(), - ¶meterCount, - &returnTypeSpec); - PROTECT(t, parameterTypes); - - object exceptionTypes = resolveExceptionJTypes( - t, vmMethod->class_()->loader(), vmMethod->addendum()); - PROTECT(t, exceptionTypes); - - object signature; - object annotationTable; - object parameterAnnotationTable; - GcMethodAddendum* addendum = vmMethod->addendum(); - if (addendum) { - signature = addendum->signature(); - if (signature) { - PROTECT(t, addendum); - - signature = t->m->classpath->makeString( - t, signature, 0, cast(t, signature)->length() - 1); - } - - annotationTable = addendum->annotationTable(); - parameterAnnotationTable = addendum->parameterAnnotationTable(); - } else { - signature = 0; - annotationTable = 0; - parameterAnnotationTable = 0; - } - - PROTECT(t, signature); - PROTECT(t, annotationTable); - PROTECT(t, parameterAnnotationTable); - - if (annotationTable or parameterAnnotationTable) { - GcClassRuntimeData* runtimeData - = getClassRuntimeData(t, vmMethod->class_()); - - runtimeData->setPool(t, vmMethod->addendum()->pool()); - } - - if (index == -1) { - GcArray* table = cast(t, vmMethod->class_()->methodTable()); - for (unsigned i = 0; i < table->length(); ++i) { - if (vmMethod == table->body()[i]) { - index = i; - break; - } - } - } - - expect(t, index != -1); - - GcJclass* jclass = getJClass(t, vmMethod->class_()); - - return makeJconstructor(t, - true, - 0, - jclass, - index, - parameterTypes, - exceptionTypes, - vmMethod->flags(), - cast(t, signature), - 0, - cast(t, annotationTable), - cast(t, parameterAnnotationTable), - 0, - 0, - 0); -} - -object makeJfield(Thread* t, GcField* vmField, int index) -{ - PROTECT(t, vmField); - - object name - = intern(t, - t->m->classpath->makeString( - t, vmField->name(), 0, vmField->name()->length() - 1)); - PROTECT(t, name); - - GcClass* type = resolveClassBySpec( - t, - vmField->class_()->loader(), - reinterpret_cast(vmField->spec()->body().begin()), - vmField->spec()->length() - 1); - PROTECT(t, type); - - GcJclass* jtype = getJClass(t, type); - - object signature; - object annotationTable; - GcFieldAddendum* addendum = vmField->addendum(); - if (addendum) { - signature = addendum->signature(); - if (signature) { - PROTECT(t, addendum); - - signature = t->m->classpath->makeString( - t, signature, 0, cast(t, signature)->length() - 1); - } - - annotationTable = addendum->annotationTable(); - } else { - signature = 0; - annotationTable = 0; - } - - PROTECT(t, signature); - PROTECT(t, annotationTable); - - if (annotationTable) { - GcClassRuntimeData* runtimeData = getClassRuntimeData(t, vmField->class_()); - - runtimeData->setPool(t, vmField->addendum()->pool()); - } - - if (index == -1) { - GcArray* table = cast(t, vmField->class_()->fieldTable()); - for (unsigned i = 0; i < table->length(); ++i) { - if (vmField == table->body()[i]) { - index = i; - break; - } - } - } - - expect(t, index != -1); - - GcJclass* jclass = getJClass(t, vmField->class_()); - - return makeJfield(t, - true, - 0, - jclass, - index, - cast(t, name), - jtype, - vmField->flags(), - cast(t, signature), - 0, - cast(t, annotationTable), - 0, - 0, - 0, - 0); -} - -void setProperty(Thread* t, - GcMethod* method, - object properties, - const char* name, - const void* value, - const char* format = "%s") -{ - PROTECT(t, method); - PROTECT(t, properties); - - GcString* n = makeString(t, "%s", name); - PROTECT(t, n); - - GcString* v = makeString(t, format, value); - - t->m->processor->invoke(t, method, properties, n, v); -} - -bool pipeAvailable(int fd, int* available) -{ -#ifdef PLATFORM_WINDOWS - HANDLE h = reinterpret_cast(_get_osfhandle(fd)); - if (h == INVALID_HANDLE_VALUE) { - return false; - } - - DWORD n; - if (PeekNamedPipe(h, 0, 0, 0, &n, 0)) { - *available = n; - } else { - if (GetLastError() != ERROR_BROKEN_PIPE) { - return false; - } - *available = 0; - } - - return true; -#else - return ioctl(fd, FIONREAD, available) >= 0; -#endif -} - -} // namespace local - -} // namespace - -namespace vm { - -Classpath* makeClasspath(System* s, - Allocator* allocator, - const char* javaHome, - const char* embedPrefix) -{ - return new (allocator->allocate(sizeof(local::MyClasspath))) - local::MyClasspath(s, allocator, javaHome, embedPrefix); -} - -} // namespace vm - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_lang_Class_getSuperclass(Thread* t, object, uintptr_t* arguments) -{ - GcClass* class_ - = cast(t, reinterpret_cast(arguments[0]))->vmClass(); - if (class_->flags() & ACC_INTERFACE) { - return 0; - } else { - GcClass* super = class_->super(); - return super ? reinterpret_cast(getJClass(t, super)) : 0; - } -} - -extern "C" AVIAN_EXPORT void Avian_sun_misc_Unsafe_registerNatives(Thread*, - object, - uintptr_t*) -{ - // ignore -} - -extern "C" AVIAN_EXPORT void Avian_sun_misc_Perf_registerNatives(Thread*, - object, - uintptr_t*) -{ - // ignore -} - -extern "C" AVIAN_EXPORT int64_t - Avian_sun_misc_Perf_createLong(Thread* t, object, uintptr_t*) -{ - return reinterpret_cast( - t->m->processor->invoke(t, - resolveMethod(t, - roots(t)->bootLoader(), - "java/nio/ByteBuffer", - "allocate", - "(I)Ljava/nio/ByteBuffer;"), - 0, - 8)); -} - -extern "C" AVIAN_EXPORT int64_t - Avian_sun_misc_Unsafe_addressSize(Thread*, object, uintptr_t*) -{ - return BytesPerWord; -} - -extern "C" AVIAN_EXPORT int64_t - Avian_sun_misc_Unsafe_defineClass__Ljava_lang_String_2_3BIILjava_lang_ClassLoader_2Ljava_security_ProtectionDomain_2( - Thread* t, - object, - uintptr_t* arguments) -{ - // object name = reinterpret_cast(arguments[1]); - GcByteArray* data - = cast(t, reinterpret_cast(arguments[2])); - int32_t offset = arguments[3]; - int32_t length = arguments[4]; - GcClassLoader* loader - = cast(t, reinterpret_cast(arguments[5])); - // object domain = reinterpret_cast(arguments[6]); - - uint8_t* buffer = static_cast(t->m->heap->allocate(length)); - - THREAD_RESOURCE2( - t, uint8_t*, buffer, int, length, t->m->heap->free(buffer, length)); - - memcpy(buffer, &data->body()[offset], length); - - return reinterpret_cast( - getJClass(t, cast(t, defineClass(t, loader, buffer, length)))); -} - -extern "C" AVIAN_EXPORT int64_t - Avian_sun_misc_Unsafe_allocateInstance(Thread* t, - object, - uintptr_t* arguments) -{ - GcClass* c - = cast(t, reinterpret_cast(arguments[1]))->vmClass(); - PROTECT(t, c); - - initClass(t, c); - - return reinterpret_cast(make(t, c)); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_staticFieldOffset(Thread* t, - object, - uintptr_t* arguments) -{ - GcJfield* jfield = cast(t, reinterpret_cast(arguments[1])); - return cast( - t, - cast(t, jfield->clazz()->vmClass()->fieldTable()) - ->body()[jfield->slot()])->offset(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_staticFieldBase(Thread* t, - object, - uintptr_t* arguments) -{ - return reinterpret_cast( - cast(t, reinterpret_cast(arguments[1])) - ->clazz() - ->vmClass() - ->staticTable()); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_objectFieldOffset(Thread* t, - object, - uintptr_t* arguments) -{ - GcJfield* jfield = cast(t, reinterpret_cast(arguments[1])); - return cast( - t, - cast(t, jfield->clazz()->vmClass()->fieldTable()) - ->body()[jfield->slot()])->offset(); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getShort__Ljava_lang_Object_2J(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - return fieldAtOffset(o, offset); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getChar__Ljava_lang_Object_2J(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - return fieldAtOffset(o, offset); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getInt__Ljava_lang_Object_2J(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - return fieldAtOffset(o, offset); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getFloat__Ljava_lang_Object_2J(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - return fieldAtOffset(o, offset); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getLong__Ljava_lang_Object_2J(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - return fieldAtOffset(o, offset); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getDouble__Ljava_lang_Object_2J(Thread* t, - GcMethod* method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getLong__Ljava_lang_Object_2J( - t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putByte__Ljava_lang_Object_2JB(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int8_t value = arguments[4]; - - fieldAtOffset(o, offset) = value; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putShort__Ljava_lang_Object_2JS(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int16_t value = arguments[4]; - - fieldAtOffset(o, offset) = value; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putChar__Ljava_lang_Object_2JC(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - uint16_t value = arguments[4]; - - fieldAtOffset(o, offset) = value; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putInt__Ljava_lang_Object_2JI(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int32_t value = arguments[4]; - - fieldAtOffset(o, offset) = value; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putFloat__Ljava_lang_Object_2JF(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int32_t value = arguments[4]; - - fieldAtOffset(o, offset) = value; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getByte__Ljava_lang_Object_2J(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - - return fieldAtOffset(o, offset); -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_getBoolean__Ljava_lang_Object_2J(Thread* t, - object method, - uintptr_t* arguments) -{ - return Avian_sun_misc_Unsafe_getByte__Ljava_lang_Object_2J( - t, method, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putBoolean__Ljava_lang_Object_2JZ( - Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - uint8_t value = arguments[4]; - - fieldAtOffset(o, offset) = value; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_putLong__Ljava_lang_Object_2JJ(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - int64_t value; - memcpy(&value, arguments + 4, 8); - - fieldAtOffset(o, offset) = value; -} - -extern "C" AVIAN_EXPORT void JNICALL -Avian_sun_misc_Unsafe_putDouble__Ljava_lang_Object_2JD(Thread*, - object, - uintptr_t* arguments) -{ - object o = reinterpret_cast(arguments[1]); - int64_t offset; - memcpy(&offset, arguments + 2, 8); - jdouble value; - memcpy(&value, arguments + 4, 8); - - fieldAtOffset(o, offset) = value; -} - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_sun_misc_Unsafe_pageSize(Thread*, object, uintptr_t*) -{ - return local::PageSize; -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_ensureClassInitialized(Thread* t, - object, - uintptr_t* arguments) -{ - initClass( - t, cast(t, reinterpret_cast(arguments[1]))->vmClass()); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_monitorEnter(Thread* t, object, uintptr_t* arguments) -{ - acquire(t, reinterpret_cast(arguments[1])); -} - -extern "C" AVIAN_EXPORT void JNICALL - Avian_sun_misc_Unsafe_monitorExit(Thread* t, object, uintptr_t* arguments) -{ - release(t, reinterpret_cast(arguments[1])); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - Avian_sun_misc_Unsafe_isBigEndian0(Thread*, object, uintptr_t*) -{ - return false; -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - Avian_sun_misc_Unsafe_unalignedAccess0(Thread*, object, uintptr_t*) -{ - return false; -} - -namespace { - -namespace local { - -extern "C" AVIAN_EXPORT jobjectArray JNICALL EXPORT(JVM_GetMethodParameters)(Thread*, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetInterfaceVersion)() -{ - return local::InterfaceVersion; -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_IHashCode)(Thread* t, jobject o) -{ - ENTER(t, Thread::ActiveState); - - return o ? objectHash(t, *o) : 0; -} - -uint64_t jvmWait(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jlong milliseconds; - memcpy(&milliseconds, arguments + 1, sizeof(jlong)); - - vm::wait(t, *o, milliseconds); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_MonitorWait)(Thread* t, jobject o, jlong milliseconds) -{ - uintptr_t arguments[1 + (sizeof(jlong) / BytesPerWord)]; - arguments[0] = reinterpret_cast(o); - memcpy(arguments + 1, &milliseconds, sizeof(jlong)); - - run(t, jvmWait, arguments); -} - -uint64_t jvmNotify(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - - notify(t, *o); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_MonitorNotify)(Thread* t, jobject o) -{ - uintptr_t arguments[] = {reinterpret_cast(o)}; - - run(t, jvmNotify, arguments); -} - -uint64_t jvmNotifyAll(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - - notifyAll(t, *o); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_MonitorNotifyAll)(Thread* t, jobject o) -{ - uintptr_t arguments[] = {reinterpret_cast(o)}; - - run(t, jvmNotifyAll, arguments); -} - -uint64_t jvmClone(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - - return reinterpret_cast(makeLocalReference(t, clone(t, *o))); -} - -extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_Clone)(Thread* t, jobject o) -{ - uintptr_t arguments[] = {reinterpret_cast(o)}; - - return reinterpret_cast(run(t, jvmClone, arguments)); -} - -uint64_t jvmInternString(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - - return reinterpret_cast(makeLocalReference(t, intern(t, *o))); -} - -extern "C" AVIAN_EXPORT jstring JNICALL - EXPORT(JVM_InternString)(Thread* t, jstring s) -{ - uintptr_t arguments[] = {reinterpret_cast(s)}; - - return reinterpret_cast(run(t, jvmInternString, arguments)); -} - -extern "C" AVIAN_EXPORT jlong JNICALL - EXPORT(JVM_CurrentTimeMillis)(Thread* t, jclass) -{ - return t->m->system->now(); -} - -extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_NanoTime)(Thread* t, jclass) -{ - return t->m->system->now() * 1000 * 1000; -} - -uint64_t jvmArrayCopy(Thread* t, uintptr_t* arguments) -{ - jobject src = reinterpret_cast(arguments[0]); - jint srcOffset = arguments[1]; - jobject dst = reinterpret_cast(arguments[2]); - jint dstOffset = arguments[3]; - jint length = arguments[4]; - - arrayCopy(t, *src, srcOffset, *dst, dstOffset, length); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_ArrayCopy)(Thread* t, - jclass, - jobject src, - jint srcOffset, - jobject dst, - jint dstOffset, - jint length) -{ - uintptr_t arguments[] = {reinterpret_cast(src), - static_cast(srcOffset), - reinterpret_cast(dst), - static_cast(dstOffset), - static_cast(length)}; - - run(t, jvmArrayCopy, arguments); -} - -uint64_t jvmInitProperties(Thread* t, uintptr_t* arguments) -{ - jobject properties = reinterpret_cast(arguments[0]); - - GcMethod* method = resolveMethod( - t, - roots(t)->bootLoader(), - "java/util/Properties", - "setProperty", - "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;"); - - PROTECT(t, method); - -#ifdef PLATFORM_WINDOWS - local::setProperty(t, method, *properties, "line.separator", "\r\n"); - local::setProperty(t, method, *properties, "file.separator", "\\"); - local::setProperty(t, method, *properties, "path.separator", ";"); - local::setProperty(t, method, *properties, "os.name", "Windows"); - - TCHAR buffer[MAX_PATH]; - GetTempPath(MAX_PATH, buffer); - - local::setProperty(t, method, *properties, "java.io.tmpdir", buffer); - local::setProperty(t, method, *properties, "java.home", buffer); - local::setProperty( - t, method, *properties, "user.home", _wgetenv(L"USERPROFILE"), "%ls"); - - GetCurrentDirectory(MAX_PATH, buffer); - - local::setProperty(t, method, *properties, "user.dir", buffer); -#else // not PLATFORM_WINDOWS - local::setProperty(t, method, *properties, "line.separator", "\n"); - local::setProperty(t, method, *properties, "file.separator", "/"); - local::setProperty(t, method, *properties, "path.separator", ":"); -#ifdef __APPLE__ - local::setProperty(t, method, *properties, "os.name", "Mac OS X"); -#elif defined __FreeBSD__ - local::setProperty(t, method, *properties, "os.name", "FreeBSD"); -#else // not __APPLE__ - local::setProperty(t, method, *properties, "os.name", "Linux"); -#endif // not __APPLE__ - local::setProperty(t, method, *properties, "java.io.tmpdir", "/tmp"); - local::setProperty(t, method, *properties, "user.home", getenv("HOME")); - - char buffer[PATH_MAX]; - local::setProperty( - t, method, *properties, "user.dir", getcwd(buffer, PATH_MAX)); -#endif // not PLATFORM_WINDOWS - - local::setProperty( - t, method, *properties, "java.protocol.handler.pkgs", "avian"); - - local::setProperty( - t, method, *properties, "java.vm.vendor", "Avian Contributors"); - - local::setProperty(t, method, *properties, "java.vm.name", "Avian (Corda)"); -#ifdef AVIAN_VERSION - local::setProperty(t, method, *properties, "java.vm.version", AVIAN_VERSION); -#endif -#ifdef AVIAN_INFO - local::setProperty(t, method, *properties, "java.vm.info", AVIAN_INFO); -#endif - - local::setProperty(t, - method, - *properties, - "java.vm.specification.name", - "Java Virtual Machine Specification"); - - local::setProperty( - t, - method, - *properties, - "java.home", - static_cast(t->m->classpath)->javaHome); - - local::setProperty( - t, - method, - *properties, - "sun.boot.library.path", - static_cast(t->m->classpath)->libraryPath); - - local::setProperty( - t, - method, - *properties, - "sun.boot.class.path", - static_cast( - roots(t)->bootLoader()->as(t)->finder()) - ->path()); - - local::setProperty(t, method, *properties, "file.encoding", "UTF-8"); - - local::setProperty(t, method, *properties, "jdk.lang.Process.launchMechanism", "fork"); - -#ifdef ARCH_x86_32 - local::setProperty(t, method, *properties, "os.arch", "x86"); -#elif defined ARCH_x86_64 - local::setProperty(t, method, *properties, "os.arch", "x86_64"); -#elif defined ARCH_arm - local::setProperty(t, method, *properties, "os.arch", "arm"); -#else - local::setProperty(t, method, *properties, "os.arch", "unknown"); -#endif - - for (unsigned i = 0; i < t->m->propertyCount; ++i) { - const char* start = t->m->properties[i]; - const char* p = start; - while (*p and *p != '=') - ++p; - - if (*p == '=') { - THREAD_RUNTIME_ARRAY(t, char, name, (p - start) + 1); - memcpy(RUNTIME_ARRAY_BODY(name), start, p - start); - RUNTIME_ARRAY_BODY(name)[p - start] = 0; - local::setProperty( - t, method, *properties, RUNTIME_ARRAY_BODY(name), p + 1); - } - } - - return reinterpret_cast(properties); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_InitProperties)(Thread* t, jobject properties) -{ - uintptr_t arguments[] = {reinterpret_cast(properties)}; - - return reinterpret_cast(run(t, jvmInitProperties, arguments)); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_OnExit)(void (*)(void)) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_Exit)(jint code) -{ - exit(code); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_Halt)(jint code) -{ - exit(code); -} - -uint64_t jvmGC(Thread* t, uintptr_t*) -{ - collect(t, Heap::MajorCollection); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_GC)() -{ - Thread* t = static_cast(local::globalMachine->localThread->get()); - - run(t, jvmGC, 0); -} - -extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_MaxObjectInspectionAge)(void) -{ - return 0; -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_TraceInstructions)(jboolean) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_TraceMethodCalls)(jboolean) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_TotalMemory)() -{ - return 0; -} - -extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_FreeMemory)() -{ - return 0; -} - -extern "C" AVIAN_EXPORT jlong JNICALL EXPORT(JVM_MaxMemory)() -{ - return local::globalMachine->heap->limit(); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_ActiveProcessorCount)() -{ -#ifdef PLATFORM_WINDOWS - SYSTEM_INFO si; - GetSystemInfo(&si); - return si.dwNumberOfProcessors; -#else - return sysconf(_SC_NPROCESSORS_ONLN); -#endif -} - -uint64_t jvmLoadLibrary(Thread* t, uintptr_t* arguments) -{ - const char* path = reinterpret_cast(arguments[0]); - - THREAD_RUNTIME_ARRAY(t, char, p, strlen(path) + 1); - replace('\\', '/', RUNTIME_ARRAY_BODY(p), path); - - return reinterpret_cast(loadLibrary( - t, - static_cast(t->m->classpath)->libraryPath, - RUNTIME_ARRAY_BODY(p), - false, - false)); -} - -extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_LoadLibrary)(const char* path) -{ - Thread* t = static_cast(local::globalMachine->localThread->get()); - - uintptr_t arguments[] = {reinterpret_cast(path)}; - - return reinterpret_cast(run(t, jvmLoadLibrary, arguments)); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_UnloadLibrary)(void*) -{ - // todo: implement this correctly for POSIX and Windows -} - -extern "C" AVIAN_EXPORT void* JNICALL - EXPORT(JVM_FindLibraryEntry)(void* library, const char* name) -{ - Thread* t = static_cast(local::globalMachine->localThread->get()); - - ENTER(t, Thread::ActiveState); - - if (library == RTLD_DEFAULT) { - library = t->m->libraries; - } - - for (System::Library* lib = t->m->libraries; lib; lib = lib->next()) { - if (library == lib) { - return lib->resolve(name); - } - } - - return 0; -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsSupportedJNIVersion)(jint version) -{ - return version <= JNI_VERSION_1_6; -} - -extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_IsNaN)(jdouble v) -{ - return isnan(v); -} - -uint64_t jvmFillInStackTrace(Thread* t, uintptr_t* arguments) -{ - GcThrowable* throwable - = cast(t, *reinterpret_cast(arguments[0])); - PROTECT(t, throwable); - - object trace = getTrace(t, 2); - throwable->setTrace(t, trace); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_FillInStackTrace)(Thread* t, jobject throwable) -{ - uintptr_t arguments[] = {reinterpret_cast(throwable)}; - - run(t, jvmFillInStackTrace, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_PrintStackTrace)(Thread*, jobject, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetStackTraceDepth)(Thread* t, jobject throwable) -{ - ENTER(t, Thread::ActiveState); - - return objectArrayLength(t, cast(t, *throwable)->trace()); -} - -uint64_t jvmGetStackTraceElement(Thread* t, uintptr_t* arguments) -{ - jobject throwable = reinterpret_cast(arguments[0]); - jint index = arguments[1]; - - return reinterpret_cast(makeLocalReference( - t, - makeStackTraceElement( - t, - cast( - t, - objectArrayBody( - t, cast(t, *throwable)->trace(), index))))); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_GetStackTraceElement)(Thread* t, jobject throwable, jint index) -{ - uintptr_t arguments[] - = {reinterpret_cast(throwable), static_cast(index)}; - - return reinterpret_cast(run(t, jvmGetStackTraceElement, arguments)); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_InitializeCompiler)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsSilentCompiler)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_CompileClass)(Thread*, jclass, jclass) -{ - return false; -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_CompileClasses)(Thread*, jclass, jstring) -{ - return false; -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_CompilerCommand)(Thread*, jclass, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_EnableCompiler)(Thread*, jclass) -{ - // ignore -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_DisableCompiler)(Thread*, jclass) -{ - // ignore -} - -uint64_t jvmStartThread(Thread* t, uintptr_t* arguments) -{ - jobject thread = reinterpret_cast(arguments[0]); - - return startThread(t, cast(t, *thread)) != 0; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_StartThread)(Thread* t, jobject thread) -{ - uintptr_t arguments[] = {reinterpret_cast(thread)}; - - run(t, jvmStartThread, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_StopThread)(Thread*, jobject, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsThreadAlive)(Thread* t, jobject thread) -{ - ENTER(t, Thread::ActiveState); - - Thread* p = reinterpret_cast(cast(t, *thread)->peer()); - return p and (p->getFlags() & Thread::ActiveFlag) != 0; -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SuspendThread)(Thread*, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_ResumeThread)(Thread*, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_SetThreadPriority)(Thread*, jobject, jint) -{ - // ignore -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_Yield)(Thread* t, jclass) -{ - t->m->system->yield(); -} - -uint64_t jvmSleep(Thread* t, uintptr_t* arguments) -{ - jlong milliseconds; - memcpy(&milliseconds, arguments, sizeof(jlong)); - - if (milliseconds <= 0) { - milliseconds = 1; - } - - if (t->javaThread->sleepLock() == 0) { - GcJobject* lock = makeJobject(t); - t->javaThread->setSleepLock(t, lock); - } - - acquire(t, t->javaThread->sleepLock()); - vm::wait(t, t->javaThread->sleepLock(), milliseconds); - release(t, t->javaThread->sleepLock()); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_Sleep)(Thread* t, jclass, jlong milliseconds) -{ - uintptr_t arguments[sizeof(jlong) / BytesPerWord]; - memcpy(arguments, &milliseconds, sizeof(jlong)); - - run(t, jvmSleep, arguments); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_CurrentThread)(Thread* t, jclass) -{ - ENTER(t, Thread::ActiveState); - - return makeLocalReference(t, t->javaThread); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_CountStackFrames)(Thread*, jobject) -{ - abort(); -} - -uint64_t jvmInterrupt(Thread* t, uintptr_t* arguments) -{ - threadInterrupt(t, - cast(t, *reinterpret_cast(arguments[0]))); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_Interrupt)(Thread* t, jobject thread) -{ - uintptr_t arguments[] = {reinterpret_cast(thread)}; - - run(t, jvmInterrupt, arguments); -} - -uint64_t jvmIsInterrupted(Thread* t, uintptr_t* arguments) -{ - jobject thread = reinterpret_cast(arguments[0]); - jboolean clear = arguments[1]; - - return threadIsInterrupted(t, cast(t, *thread), clear); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsInterrupted)(Thread* t, jobject thread, jboolean clear) -{ - uintptr_t arguments[] = {reinterpret_cast(thread), clear}; - - return run(t, jvmIsInterrupted, arguments); -} - -uint64_t jvmHoldsLock(Thread* t, uintptr_t* arguments) -{ - GcMonitor* m - = objectMonitor(t, *reinterpret_cast(arguments[0]), false); - - return m and m->owner() == t; -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_HoldsLock)(Thread* t, jclass, jobject o) -{ - uintptr_t arguments[] = {reinterpret_cast(o)}; - - return run(t, jvmHoldsLock, arguments); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_DumpAllStacks)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetAllThreads)(Thread*, jclass) -{ - abort(); -} - -uint64_t jvmDumpThreads(Thread* t, uintptr_t* arguments) -{ - jobjectArray threads = reinterpret_cast(arguments[0]); - - unsigned threadsLength - = objectArrayLength(t, reinterpret_cast(*threads)); - GcClass* arrayClass - = resolveObjectArrayClass(t, - type(t, GcStackTraceElement::Type)->loader(), - type(t, GcStackTraceElement::Type)); - object result = makeObjectArray(t, arrayClass, threadsLength); - PROTECT(t, result); - - for (unsigned threadsIndex = 0; threadsIndex < threadsLength; - ++threadsIndex) { - Thread* peer = reinterpret_cast( - cast(t, - objectArrayBody( - t, reinterpret_cast(*threads), threadsIndex)) - ->peer()); - - if (peer) { - object trace = t->m->processor->getStackTrace(t, peer); - PROTECT(t, trace); - - unsigned traceLength = objectArrayLength(t, trace); - object array - = makeObjectArray(t, type(t, GcStackTraceElement::Type), traceLength); - PROTECT(t, array); - - for (unsigned traceIndex = 0; traceIndex < traceLength; ++traceIndex) { - object ste = makeStackTraceElement( - t, cast(t, objectArrayBody(t, trace, traceIndex))); - setField(t, array, ArrayBody + (traceIndex * BytesPerWord), ste); - } - - setField(t, result, ArrayBody + (threadsIndex * BytesPerWord), array); - } - } - - return reinterpret_cast(makeLocalReference(t, result)); -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_DumpThreads)(Thread* t, jclass, jobjectArray threads) -{ - uintptr_t arguments[] = {reinterpret_cast(threads)}; - - return reinterpret_cast(run(t, jvmDumpThreads, arguments)); -} - -extern "C" AVIAN_EXPORT jclass JNICALL EXPORT(JVM_CurrentLoadedClass)(Thread*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobject JNICALL EXPORT(JVM_CurrentClassLoader)(Thread*) -{ - // just return null, i.e. tell SecurityManager.currentClassLoader - // all permissions are granted, since Avian doesn't do any internal - // security checks: - return 0; -} - -uint64_t jvmGetClassContext(Thread* t, uintptr_t*) -{ - object trace = getTrace(t, 1); - PROTECT(t, trace); - - object context = makeObjectArray( - t, type(t, GcJclass::Type), objectArrayLength(t, trace)); - PROTECT(t, context); - - for (unsigned i = 0; i < objectArrayLength(t, trace); ++i) { - object c = getJClass( - t, - cast( - t, cast(t, objectArrayBody(t, trace, i))->method()) - ->class_()); - - setField(t, context, ArrayBody + (i * BytesPerWord), c); - } - - return reinterpret_cast(makeLocalReference(t, context)); -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetClassContext)(Thread* t) -{ - return reinterpret_cast(run(t, jvmGetClassContext, 0)); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_ClassDepth)(Thread*, jstring) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_ClassLoaderDepth)(Thread*) -{ - abort(); -} - -uint64_t jvmGetSystemPackage(Thread* t, uintptr_t* arguments) -{ - jstring s = reinterpret_cast(arguments[0]); - - ACQUIRE(t, t->m->classLock); - - THREAD_RUNTIME_ARRAY(t, char, chars, (*s)->length(t) + 1); - stringChars(t, *s, RUNTIME_ARRAY_BODY(chars)); - - object key = makeByteArray(t, RUNTIME_ARRAY_BODY(chars)); - - GcByteArray* array = cast( - t, - hashMapFind( - t, roots(t)->packageMap(), key, byteArrayHash, byteArrayEqual)); - - if (array) { - return reinterpret_cast(makeLocalReference( - t, t->m->classpath->makeString(t, array, 0, array->length()))); - } else { - return 0; - } -} - -extern "C" AVIAN_EXPORT jstring JNICALL - EXPORT(JVM_GetSystemPackage)(Thread* t, jstring s) -{ - uintptr_t arguments[] = {reinterpret_cast(s)}; - - return reinterpret_cast(run(t, jvmGetSystemPackage, arguments)); -} - -uint64_t jvmGetSystemPackages(Thread* t, uintptr_t*) -{ - return reinterpret_cast(makeLocalReference( - t, - makeObjectArray( - t, resolveClass(t, roots(t)->bootLoader(), "java/lang/Package"), 0))); -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetSystemPackages)(Thread* t) -{ - return reinterpret_cast(run(t, jvmGetSystemPackages, 0)); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_AllocateNewObject)(Thread*, jobject, jclass, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_AllocateNewArray)(Thread*, jobject, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_LatestUserDefinedLoader)(Thread* t) -{ - ENTER(t, Thread::ActiveState); - - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t) : t(t), loader(0) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - GcClassLoader* loader = walker->method()->class_()->loader(); - if (loader and loader != roots(t)->bootLoader() - and strcmp(objectClass(t, loader)->name()->body().begin(), - reinterpret_cast( - "sun/reflect/DelegatingClassLoader"))) { - this->loader = loader; - return false; - } else { - return true; - } - } - - Thread* t; - GcClassLoader* loader; - } v(t); - - t->m->processor->walkStack(t, &v); - - return makeLocalReference(t, v.loader); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_LoadClass0)(Thread*, jobject, jclass, jstring) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetArrayLength)(Thread* t, jobject array) -{ - ENTER(t, Thread::ActiveState); - - return fieldAtOffset(*array, BytesPerWord); -} - -uint64_t jvmGetArrayElement(Thread* t, uintptr_t* arguments) -{ - jobject array = reinterpret_cast(arguments[0]); - jint index = arguments[1]; - - switch (objectClass(t, *array)->name()->body()[1]) { - case 'Z': - return reinterpret_cast(makeLocalReference( - t, makeBoolean(t, fieldAtOffset(*array, ArrayBody + index)))); - case 'B': - return reinterpret_cast(makeLocalReference( - t, makeByte(t, fieldAtOffset(*array, ArrayBody + index)))); - case 'C': - return reinterpret_cast(makeLocalReference( - t, - makeChar(t, fieldAtOffset(*array, ArrayBody + (index * 2))))); - case 'S': - return reinterpret_cast(makeLocalReference( - t, - makeShort(t, fieldAtOffset(*array, ArrayBody + (index * 2))))); - case 'I': - return reinterpret_cast(makeLocalReference( - t, - makeInt(t, fieldAtOffset(*array, ArrayBody + (index * 4))))); - case 'F': - return reinterpret_cast(makeLocalReference( - t, - makeFloat(t, fieldAtOffset(*array, ArrayBody + (index * 4))))); - case 'J': - return reinterpret_cast(makeLocalReference( - t, - makeLong(t, fieldAtOffset(*array, ArrayBody + (index * 8))))); - case 'D': - return reinterpret_cast(makeLocalReference( - t, - makeDouble(t, - fieldAtOffset(*array, ArrayBody + (index * 8))))); - case 'L': - case '[': - return reinterpret_cast(makeLocalReference( - t, fieldAtOffset(*array, ArrayBody + (index * BytesPerWord)))); - default: - abort(t); - } -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_GetArrayElement)(Thread* t, jobject array, jint index) -{ - uintptr_t arguments[] - = {reinterpret_cast(array), static_cast(index)}; - - return reinterpret_cast(run(t, jvmGetArrayElement, arguments)); -} - -extern "C" AVIAN_EXPORT jvalue JNICALL - EXPORT(JVM_GetPrimitiveArrayElement)(Thread*, jobject, jint, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_SetArrayElement)(Thread* t, - jobject array, - jint index, - jobject value) -{ - ENTER(t, Thread::ActiveState); - - switch (objectClass(t, *array)->name()->body()[1]) { - case 'Z': - fieldAtOffset(*array, ArrayBody + index) - = cast(t, *value)->value(); - break; - case 'B': - fieldAtOffset(*array, ArrayBody + index) - = cast(t, *value)->value(); - break; - case 'C': - fieldAtOffset(*array, ArrayBody + (index * 2)) - = cast(t, *value)->value(); - break; - case 'S': - fieldAtOffset(*array, ArrayBody + (index * 2)) - = cast(t, *value)->value(); - break; - case 'I': - fieldAtOffset(*array, ArrayBody + (index * 4)) - = cast(t, *value)->value(); - break; - case 'F': - fieldAtOffset(*array, ArrayBody + (index * 4)) - = cast(t, *value)->value(); - break; - case 'J': - fieldAtOffset(*array, ArrayBody + (index * 8)) - = cast(t, *value)->value(); - break; - case 'D': - fieldAtOffset(*array, ArrayBody + (index * 8)) - = cast(t, *value)->value(); - break; - case 'L': - case '[': - setField( - t, *array, ArrayBody + (index * BytesPerWord), (value ? *value : 0)); - break; - default: - abort(t); - } -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT( - JVM_SetPrimitiveArrayElement)(Thread*, jobject, jint, jvalue, unsigned char) -{ - abort(); -} - -object makeNewArray(Thread* t, GcClass* c, unsigned length) -{ - if (c->vmFlags() & PrimitiveFlag) { - const char* name - = reinterpret_cast(local::getClassName(t, c)->body().begin()); - - switch (*name) { - case 'b': - if (name[1] == 'o') { - return makeBooleanArray(t, length); - } else { - return makeByteArray(t, length); - } - case 'c': - return makeCharArray(t, length); - case 'd': - return makeDoubleArray(t, length); - case 'f': - return makeFloatArray(t, length); - case 'i': - return makeIntArray(t, length); - case 'l': - return makeLongArray(t, length); - case 's': - return makeShortArray(t, length); - default: - abort(t); - } - } else { - return makeObjectArray(t, c, length); - } -} - -uint64_t jvmNewArray(Thread* t, uintptr_t* arguments) -{ - jclass elementClass = reinterpret_cast(arguments[0]); - jint length = arguments[1]; - - return reinterpret_cast(makeLocalReference( - t, makeNewArray(t, (*elementClass)->vmClass(), length))); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_NewArray)(Thread* t, jclass elementClass, jint length) -{ - uintptr_t arguments[] = {reinterpret_cast(elementClass), - static_cast(length)}; - - return reinterpret_cast(run(t, jvmNewArray, arguments)); -} - -uint64_t jvmNewMultiArray(Thread* t, uintptr_t* arguments) -{ - jclass elementClass = reinterpret_cast(arguments[0]); - jintArray dimensions = reinterpret_cast(arguments[1]); - - THREAD_RUNTIME_ARRAY(t, int32_t, counts, (*dimensions)->length()); - for (int i = (*dimensions)->length() - 1; i >= 0; --i) { - RUNTIME_ARRAY_BODY(counts)[i] = (*dimensions)->body()[i]; - if (UNLIKELY(RUNTIME_ARRAY_BODY(counts)[i] < 0)) { - throwNew(t, - GcNegativeArraySizeException::Type, - "%d", - RUNTIME_ARRAY_BODY(counts)[i]); - return 0; - } - } - - object array = makeNewArray( - t, (*elementClass)->vmClass(), RUNTIME_ARRAY_BODY(counts)[0]); - PROTECT(t, array); - - populateMultiArray( - t, array, RUNTIME_ARRAY_BODY(counts), 0, (*dimensions)->length()); - - return reinterpret_cast(makeLocalReference(t, array)); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_NewMultiArray)(Thread* t, - jclass elementClass, - jintArray dimensions) -{ - uintptr_t arguments[] = {reinterpret_cast(elementClass), - reinterpret_cast(dimensions)}; - - return reinterpret_cast(run(t, jvmNewMultiArray, arguments)); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_GetCallerClass)(Thread* t, int target) -{ - ENTER(t, Thread::ActiveState); - - GcMethod* method = getCaller(t, target, true); - - return method ? reinterpret_cast( - makeLocalReference(t, getJClass(t, method->class_()))) - : 0; -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_FindPrimitiveClass)(Thread* t, const char* name) -{ - ENTER(t, Thread::ActiveState); - - switch (*name) { - case 'b': - if (name[1] == 'o') { - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJboolean::Type)))); - } else { - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJbyte::Type)))); - } - case 'c': - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJchar::Type)))); - case 'd': - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJdouble::Type)))); - case 'f': - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJfloat::Type)))); - case 'i': - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJint::Type)))); - case 'l': - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJlong::Type)))); - case 's': - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJshort::Type)))); - case 'v': - return reinterpret_cast( - makeLocalReference(t, getJClass(t, type(t, GcJvoid::Type)))); - default: - throwNew(t, GcIllegalArgumentException::Type); - } -} - -uint64_t jvmResolveClass(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - - GcMethod* method = resolveMethod( - t, roots(t)->bootLoader(), "avian/Classes", "link", "(Lavian/VMClass;)V"); - - t->m->processor->invoke(t, method, 0, (*c)->vmClass()); - - return 1; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_ResolveClass)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - run(t, jvmResolveClass, arguments); -} - -uint64_t jvmFindClassFromCaller(Thread* t, uintptr_t* arguments) -{ - const char* name = reinterpret_cast(arguments[0]); - jboolean init = arguments[1]; - jobject loader = reinterpret_cast(arguments[2]); - // jclass caller = reinterpret_cast(arguments[3]); - - /* XXX The caller's protection domain should be used during - the resolveClass but there is no specification or - unit-test in OpenJDK documenting the desired effect */ - - GcClass* c = resolveClass( - t, - loader ? cast(t, *loader) : roots(t)->bootLoader(), - name, - true, - static_cast(GcClassNotFoundException::Type)); - - if (init) { - PROTECT(t, c); - - initClass(t, c); - } - - return reinterpret_cast(makeLocalReference(t, getJClass(t, c))); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_FindClassFromCaller)(Thread* t, - const char* name, - jboolean init, - jobject loader, - jclass caller) -{ - uintptr_t arguments[] = {reinterpret_cast(name), - init, - reinterpret_cast(loader), - reinterpret_cast(caller)}; - - return reinterpret_cast( - run(t, jvmFindClassFromCaller, arguments)); -} - -uint64_t jvmFindClassFromClassLoader(Thread* t, uintptr_t* arguments) -{ - const char* name = reinterpret_cast(arguments[0]); - jboolean init = arguments[1]; - jobject loader = reinterpret_cast(arguments[2]); - jboolean throwError = arguments[3]; - - GcClass* c = resolveClass( - t, - loader ? cast(t, *loader) : roots(t)->bootLoader(), - name, - true, - throwError ? static_cast(GcNoClassDefFoundError::Type) - : static_cast(GcClassNotFoundException::Type)); - - if (init) { - PROTECT(t, c); - - initClass(t, c); - } - - return reinterpret_cast(makeLocalReference(t, getJClass(t, c))); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_FindClassFromClassLoader)(Thread* t, - const char* name, - jboolean init, - jobject loader, - jboolean throwError) -{ - uintptr_t arguments[] = {reinterpret_cast(name), - init, - reinterpret_cast(loader), - throwError}; - - return reinterpret_cast( - run(t, jvmFindClassFromClassLoader, arguments)); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - JVM_FindClassFromBootLoader(Thread* t, const char* name) -{ - return EXPORT(JVM_FindClassFromClassLoader)(t, name, false, 0, false); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_FindClassFromClass)(Thread*, const char*, jboolean, jclass) -{ - abort(); -} - -uint64_t jvmFindLoadedClass(Thread* t, uintptr_t* arguments) -{ - jobject loader = reinterpret_cast(arguments[0]); - jstring name = reinterpret_cast(arguments[1]); - - GcByteArray* spec = makeByteArray(t, (*name)->length(t) + 1); - - { - char* s = reinterpret_cast(spec->body().begin()); - stringChars(t, (*name), s); - replace('.', '/', s); - } - - GcClass* c = findLoadedClass(t, cast(t, *loader), spec); - - return reinterpret_cast(c ? makeLocalReference(t, getJClass(t, c)) - : 0); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_FindLoadedClass)(Thread* t, jobject loader, jstring name) -{ - uintptr_t arguments[] = {reinterpret_cast(loader), - reinterpret_cast(name)}; - - return reinterpret_cast(run(t, jvmFindLoadedClass, arguments)); -} - -uint64_t jvmDefineClass(Thread* t, uintptr_t* arguments) -{ - jobject loader = reinterpret_cast(arguments[0]); - const uint8_t* data = reinterpret_cast(arguments[1]); - jsize length = arguments[2]; - - return reinterpret_cast(makeLocalReference( - t, - getJClass( - t, - cast( - t, - defineClass(t, cast(t, *loader), data, length))))); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_DefineClass)(Thread* t, - const char*, - jobject loader, - const uint8_t* data, - jsize length, - jobject) -{ - uintptr_t arguments[] = {reinterpret_cast(loader), - reinterpret_cast(data), - static_cast(length)}; - - return reinterpret_cast(run(t, jvmDefineClass, arguments)); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_DefineClassWithSource)(Thread* t, - const char*, - jobject loader, - const uint8_t* data, - jsize length, - jobject, - const char*) -{ - return EXPORT(JVM_DefineClass)(t, 0, loader, data, length, 0); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_DefineClassWithSourceCond)(Thread* t, - const char*, - jobject loader, - const uint8_t* data, - jsize length, - jobject, - const char*, - jboolean) -{ - return EXPORT(JVM_DefineClass)(t, 0, loader, data, length, 0); -} - -extern "C" AVIAN_EXPORT jstring JNICALL - EXPORT(JVM_GetClassName)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - return reinterpret_cast(makeLocalReference(t, (*c)->name())); -} - -uint64_t jvmGetClassInterfaces(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - - GcClassAddendum* addendum = (*c)->vmClass()->addendum(); - if (addendum) { - GcArray* table = cast(t, addendum->interfaceTable()); - if (table) { - PROTECT(t, table); - - object array - = makeObjectArray(t, type(t, GcJclass::Type), table->length()); - PROTECT(t, array); - - for (unsigned i = 0; i < table->length(); ++i) { - object c = getJClass(t, cast(t, table->body()[i])); - setField(t, array, ArrayBody + (i * BytesPerWord), c); - } - - return reinterpret_cast(makeLocalReference(t, array)); - } - } - - return reinterpret_cast( - makeLocalReference(t, makeObjectArray(t, type(t, GcJclass::Type), 0))); -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetClassInterfaces)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return reinterpret_cast( - run(t, jvmGetClassInterfaces, arguments)); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_GetClassLoader)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - GcClassLoader* loader = (*c)->vmClass()->loader(); - - if (loader == roots(t)->bootLoader()) { - // sun.misc.Unsafe.getUnsafe expects a null result if the class - // loader is the boot classloader and will throw a - // SecurityException otherwise. - GcMethod* caller = getCaller(t, 2); - if (caller - and strcmp(reinterpret_cast( - caller->class_()->name()->body().begin()), - "sun/misc/Unsafe") == 0) { - return 0; - } else { - return makeLocalReference(t, roots(t)->bootLoader()); - } - } else { - return makeLocalReference(t, loader); - } -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsInterface)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - return ((*c)->vmClass()->flags() & ACC_INTERFACE) != 0; -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetClassSigners)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - GcClassRuntimeData* runtimeData - = getClassRuntimeDataIfExists(t, (*c)->vmClass()); - - return runtimeData ? reinterpret_cast( - makeLocalReference(t, runtimeData->signers())) - : 0; -} - -extern "C" AVIAN_EXPORT jbyteArray JNICALL - EXPORT(JVM_GetClassTypeAnnotations)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jbyteArray JNICALL - EXPORT(JVM_GetFieldTypeAnnotations)(Thread*, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jbyteArray JNICALL - EXPORT(JVM_GetMethodTypeAnnotations)(Thread*, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_SetClassSigners)(Thread* t, jclass c, jobjectArray signers) -{ - ENTER(t, Thread::ActiveState); - - GcClassRuntimeData* runtimeData = getClassRuntimeData(t, (*c)->vmClass()); - - runtimeData->setSigners(t, reinterpret_cast(*signers)); -} - -uint64_t jvmGetProtectionDomain(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - - GcMethod* method - = resolveMethod(t, - roots(t)->bootLoader(), - "avian/Classes", - "getProtectionDomain", - "(Lavian/VMClass;)Ljava/security/ProtectionDomain;"); - - return reinterpret_cast(makeLocalReference( - t, t->m->processor->invoke(t, method, 0, (*c)->vmClass()))); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_GetProtectionDomain)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return reinterpret_cast(run(t, jvmGetProtectionDomain, arguments)); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_GetResourceLookupCacheURLs)(Thread*, jobject) -{ - return 0; -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_SetProtectionDomain)(Thread*, jclass, jobject) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsArrayClass)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - return (*c)->vmClass()->arrayDimensions() != 0; -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsPrimitiveClass)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - return ((*c)->vmClass()->vmFlags() & PrimitiveFlag) != 0; -} - -uint64_t jvmGetComponentType(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - - if ((*c)->vmClass()->arrayDimensions()) { - uint8_t n = (*c)->vmClass()->name()->body()[1]; - if (n != 'L' and n != '[') { - return reinterpret_cast( - makeLocalReference(t, getJClass(t, primitiveClass(t, n)))); - } else { - return reinterpret_cast(makeLocalReference( - t, getJClass(t, (*c)->vmClass()->arrayElementClass()))); - } - } else { - return 0; - } -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_GetComponentType)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return reinterpret_cast(run(t, jvmGetComponentType, arguments)); -} - -uint64_t jvmGetClassModifiers(Thread* t, uintptr_t* arguments) -{ - return classModifiers( - t, - cast(t, *reinterpret_cast(arguments[0]))->vmClass()); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetClassModifiers)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return run(t, jvmGetClassModifiers, arguments); -} - -uint64_t jvmGetDeclaredClasses(Thread* t, uintptr_t* arguments) -{ - return reinterpret_cast(makeLocalReference( - t, - getDeclaredClasses( - t, - cast(t, *reinterpret_cast(arguments[0])) - ->vmClass(), - false))); -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetDeclaredClasses)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return reinterpret_cast( - run(t, jvmGetDeclaredClasses, arguments)); -} - -uint64_t jvmGetDeclaringClass(Thread* t, uintptr_t* arguments) -{ - return reinterpret_cast(makeLocalReference( - t, - getDeclaringClass( - t, - cast(t, *reinterpret_cast(arguments[0])) - ->vmClass()))); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_GetDeclaringClass)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return reinterpret_cast(run(t, jvmGetDeclaringClass, arguments)); -} - -uint64_t jvmGetClassSignature(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - - GcClassAddendum* addendum = (*c)->vmClass()->addendum(); - if (addendum) { - GcByteArray* signature = cast(t, addendum->signature()); - if (signature) { - return reinterpret_cast( - makeLocalReference(t, - t->m->classpath->makeString( - t, signature, 0, signature->length() - 1))); - } - } - return 0; -} - -extern "C" AVIAN_EXPORT jstring JNICALL - EXPORT(JVM_GetClassSignature)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return reinterpret_cast(run(t, jvmGetClassSignature, arguments)); -} - -extern "C" AVIAN_EXPORT jbyteArray JNICALL - EXPORT(JVM_GetClassAnnotations)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - GcClassAddendum* addendum = (*c)->vmClass()->addendum(); - return addendum ? reinterpret_cast( - makeLocalReference(t, addendum->annotationTable())) - : 0; -} - -uint64_t jvmGetClassDeclaredMethods(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - jboolean publicOnly = arguments[1]; - - GcArray* table = cast(t, (*c)->vmClass()->methodTable()); - if (table) { - PROTECT(t, table); - - object array - = makeObjectArray(t, - type(t, GcJmethod::Type), - local::countMethods(t, (*c)->vmClass(), publicOnly)); - PROTECT(t, array); - - unsigned ai = 0; - for (unsigned i = 0, j = classDeclaredMethodCount(t, (*c)->vmClass()); - i < j; - ++i) { - GcMethod* vmMethod = cast(t, table->body()[i]); - PROTECT(t, vmMethod); - - if (((not publicOnly) or (vmMethod->flags() & ACC_PUBLIC)) - and vmMethod->name()->body()[0] != '<') { - object method = makeJmethod(t, vmMethod, i); - - assertT(t, ai < objectArrayLength(t, array)); - - setField(t, array, ArrayBody + ((ai++) * BytesPerWord), method); - } - } - - return reinterpret_cast(makeLocalReference(t, array)); - } else { - return reinterpret_cast( - makeLocalReference(t, makeObjectArray(t, type(t, GcJmethod::Type), 0))); - } -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetClassDeclaredMethods)(Thread* t, - jclass c, - jboolean publicOnly) -{ - uintptr_t arguments[] = {reinterpret_cast(c), publicOnly}; - - return reinterpret_cast( - run(t, jvmGetClassDeclaredMethods, arguments)); -} - -uint64_t jvmGetClassDeclaredFields(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - jboolean publicOnly = arguments[1]; - GcArray* table = cast(t, (*c)->vmClass()->fieldTable()); - if (table) { - PROTECT(t, table); - - object array - = makeObjectArray(t, - type(t, GcJfield::Type), - local::countFields(t, (*c)->vmClass(), publicOnly)); - PROTECT(t, array); - - unsigned ai = 0; - for (unsigned i = 0; i < table->length(); ++i) { - GcField* vmField = cast(t, table->body()[i]); - PROTECT(t, vmField); - - if ((not publicOnly) or (vmField->flags() & ACC_PUBLIC)) { - object field = makeJfield(t, vmField, i); - - assertT(t, ai < objectArrayLength(t, array)); - - setField(t, array, ArrayBody + ((ai++) * BytesPerWord), field); - } - } - assertT(t, ai == objectArrayLength(t, array)); - - return reinterpret_cast(makeLocalReference(t, array)); - } else { - return reinterpret_cast( - makeLocalReference(t, makeObjectArray(t, type(t, GcJfield::Type), 0))); - } -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetClassDeclaredFields)(Thread* t, jclass c, jboolean publicOnly) -{ - uintptr_t arguments[] = {reinterpret_cast(c), publicOnly}; - - return reinterpret_cast( - run(t, jvmGetClassDeclaredFields, arguments)); -} - -uint64_t jvmGetClassDeclaredConstructors(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - jboolean publicOnly = arguments[1]; - - GcArray* table = cast(t, (*c)->vmClass()->methodTable()); - if (table) { - PROTECT(t, table); - - object array = makeObjectArray( - t, - type(t, GcJconstructor::Type), - local::countConstructors(t, (*c)->vmClass(), publicOnly)); - PROTECT(t, array); - - unsigned ai = 0; - for (unsigned i = 0, j = classDeclaredMethodCount(t, (*c)->vmClass()); - i < j; - ++i) { - GcMethod* vmMethod = cast(t, table->body()[i]); - PROTECT(t, vmMethod); - - bool isCtor = strcmp(reinterpret_cast(vmMethod->name()->body().begin()), "") == 0; - if (((not publicOnly) or (vmMethod->flags() & ACC_PUBLIC)) and isCtor) { - object method = makeJconstructor(t, vmMethod, i); - - assertT(t, ai < objectArrayLength(t, array)); - - setField(t, array, ArrayBody + ((ai++) * BytesPerWord), method); - } - } - - return reinterpret_cast(makeLocalReference(t, array)); - } else { - return reinterpret_cast(makeLocalReference( - t, makeObjectArray(t, type(t, GcJconstructor::Type), 0))); - } -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetClassDeclaredConstructors)(Thread* t, - jclass c, - jboolean publicOnly) -{ - uintptr_t arguments[] = {reinterpret_cast(c), publicOnly}; - - return reinterpret_cast( - run(t, jvmGetClassDeclaredConstructors, arguments)); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetClassAccessFlags)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - return (*c)->vmClass()->flags(); -} - -uint64_t jvmInvokeMethod(Thread* t, uintptr_t* arguments) -{ - jobject method = reinterpret_cast(arguments[0]); - jobject instance = reinterpret_cast(arguments[1]); - jobjectArray args = reinterpret_cast(arguments[2]); - - GcMethod* vmMethod = cast( - t, - cast( - t, cast(t, *method)->clazz()->vmClass()->methodTable()) - ->body()[cast(t, *method)->slot()]); - - if (vmMethod->flags() & ACC_STATIC) { - instance = 0; - } - - if (instance and not instanceOf(t, vmMethod->class_(), *instance)) { - throwNew(t, GcIllegalArgumentException::Type); - } - - return reinterpret_cast( - makeLocalReference(t, - invoke(t, - vmMethod, - instance ? *instance : 0, - args ? reinterpret_cast(*args) : 0))); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_InvokeMethod)(Thread* t, - jobject method, - jobject instance, - jobjectArray args) -{ - uintptr_t arguments[] = {reinterpret_cast(method), - reinterpret_cast(instance), - reinterpret_cast(args)}; - - return reinterpret_cast(run(t, jvmInvokeMethod, arguments)); -} - -uint64_t jvmNewInstanceFromConstructor(Thread* t, uintptr_t* arguments) -{ - jobject constructor = reinterpret_cast(arguments[0]); - jobjectArray args = reinterpret_cast(arguments[1]); - - object instance - = make(t, cast(t, *constructor)->clazz()->vmClass()); - PROTECT(t, instance); - - GcMethod* method = cast( - t, - cast(t, - cast(t, *constructor) - ->clazz() - ->vmClass() - ->methodTable()) - ->body()[cast(t, *constructor)->slot()]); - - invoke(t, method, instance, args ? reinterpret_cast(*args) : 0); - - return reinterpret_cast(makeLocalReference(t, instance)); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_NewInstanceFromConstructor)(Thread* t, - jobject constructor, - jobjectArray args) -{ - uintptr_t arguments[] = {reinterpret_cast(constructor), - reinterpret_cast(args)}; - - return reinterpret_cast( - run(t, jvmNewInstanceFromConstructor, arguments)); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_GetClassConstantPool)(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - GcClass* vmClass = (*c)->vmClass(); - GcClassAddendum* addendum = vmClass->addendum(); - object pool; - if (addendum) { - pool = addendum->pool(); - } else { - pool = 0; - } - - if (pool == 0) { - pool = getClassRuntimeData(t, vmClass)->pool(); - } - - return makeLocalReference(t, makeConstantPool(t, pool)); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_ConstantPoolGetSize)(Thread* t, jobject, jobject pool) -{ - if (pool == 0) - return 0; - - ENTER(t, Thread::ActiveState); - - return singletonCount(t, cast(t, *pool)); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_ConstantPoolGetClassAt)(Thread*, jobject, jobject, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jclass JNICALL - EXPORT(JVM_ConstantPoolGetClassAtIfLoaded)(Thread*, jobject, jobject, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_ConstantPoolGetMethodAt)(Thread*, jobject, jobject, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_ConstantPoolGetMethodAtIfLoaded)(Thread*, jobject, jobject, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_ConstantPoolGetFieldAt)(Thread*, jobject, jobject, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_ConstantPoolGetFieldAtIfLoaded)(Thread*, jobject, jobject, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_ConstantPoolGetMemberRefInfoAt)(Thread*, jobject, jobject, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT( - JVM_ConstantPoolGetIntAt)(Thread* t, jobject, jobject pool, jint index) -{ - ENTER(t, Thread::ActiveState); - - return singletonValue(t, cast(t, *pool), index - 1); -} - -extern "C" AVIAN_EXPORT jlong JNICALL EXPORT( - JVM_ConstantPoolGetLongAt)(Thread* t, jobject, jobject pool, jint index) -{ - ENTER(t, Thread::ActiveState); - - uint64_t v; - memcpy(&v, &singletonValue(t, cast(t, *pool), index - 1), 8); - - return v; -} - -extern "C" AVIAN_EXPORT jfloat JNICALL EXPORT( - JVM_ConstantPoolGetFloatAt)(Thread* t, jobject, jobject pool, jint index) -{ - ENTER(t, Thread::ActiveState); - - return bitsToFloat(singletonValue(t, cast(t, *pool), index - 1)); -} - -extern "C" AVIAN_EXPORT jdouble JNICALL EXPORT( - JVM_ConstantPoolGetDoubleAt)(Thread* t, jobject, jobject pool, jint index) -{ - ENTER(t, Thread::ActiveState); - - double v; - memcpy(&v, &singletonValue(t, cast(t, *pool), index - 1), 8); - - return v; -} - -extern "C" AVIAN_EXPORT jstring JNICALL - EXPORT(JVM_ConstantPoolGetStringAt)(Thread*, jobject, jobject, jint) -{ - abort(); -} - -uint64_t jvmConstantPoolGetUTF8At(Thread* t, uintptr_t* arguments) -{ - jobject pool = reinterpret_cast(arguments[0]); - jint index = arguments[1]; - - object array = parseUtf8( - t, - cast( - t, singletonObject(t, cast(t, *pool), index - 1))); - - return reinterpret_cast(makeLocalReference( - t, - t->m->classpath->makeString( - t, array, 0, fieldAtOffset(array, BytesPerWord) - 1))); -} - -extern "C" AVIAN_EXPORT jstring JNICALL EXPORT( - JVM_ConstantPoolGetUTF8At)(Thread* t, jobject, jobject pool, jint index) -{ - uintptr_t arguments[] - = {reinterpret_cast(pool), static_cast(index)}; - - return reinterpret_cast(run(t, jvmConstantPoolGetUTF8At, arguments)); -} - -void maybeWrap(Thread* t, bool wrapException) -{ - if (t->exception and wrapException - and not(instanceOf(t, type(t, GcError::Type), t->exception) - or instanceOf( - t, type(t, GcRuntimeException::Type), t->exception))) { - GcThrowable* exception = t->exception; - t->exception = 0; - - PROTECT(t, exception); - - GcClass* paeClass = resolveClass( - t, roots(t)->bootLoader(), "java/security/PrivilegedActionException"); - PROTECT(t, paeClass); - - GcMethod* paeConstructor - = resolveMethod(t, paeClass, "", "(Ljava/lang/Exception;)V"); - PROTECT(t, paeConstructor); - - GcThrowable* result = cast(t, make(t, paeClass)); - PROTECT(t, result); - - t->m->processor->invoke(t, paeConstructor, result, exception); - - t->exception = result; - } -} - -uint64_t jvmDoPrivileged(Thread* t, uintptr_t* arguments) -{ - jobject action = reinterpret_cast(arguments[0]); - jboolean wrapException = arguments[1]; - - // todo: cache these class and method lookups in the t->m->classpath - // object: - - GcClass* privilegedAction = resolveClass( - t, roots(t)->bootLoader(), "java/security/PrivilegedAction"); - - GcMethod* method; - if (instanceOf(t, privilegedAction, *action)) { - method = resolveMethod(t, privilegedAction, "run", "()Ljava/lang/Object;"); - } else { - GcClass* privilegedExceptionAction = resolveClass( - t, roots(t)->bootLoader(), "java/security/PrivilegedExceptionAction"); - - method = resolveMethod( - t, privilegedExceptionAction, "run", "()Ljava/lang/Object;"); - } - - THREAD_RESOURCE(t, jboolean, wrapException, maybeWrap(t, wrapException)); - - return reinterpret_cast( - makeLocalReference(t, t->m->processor->invoke(t, method, *action))); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_DoPrivileged)(Thread* t, - jclass, - jobject action, - jobject, - jboolean wrapException) -{ - uintptr_t arguments[] = {reinterpret_cast(action), wrapException}; - - return reinterpret_cast(run(t, jvmDoPrivileged, arguments)); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_GetInheritedAccessControlContext)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_GetStackAccessControlContext)(Thread*, jclass) -{ - return 0; -} - -extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_RegisterSignal)(jint, void*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_RaiseSignal)(jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_FindSignal)(const char*) -{ - return -1; -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_DesiredAssertionStatus)(Thread*, jclass, jclass) -{ - return false; -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_AssertionStatusDirectives)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL EXPORT(JVM_SupportsCX8)() -{ - return true; -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetClassNameUTF)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_GetClassCPTypes)(Thread*, jclass, unsigned char*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetClassCPEntriesCount)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetClassFieldsCount)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetClassMethodsCount)(Thread*, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT( - JVM_GetMethodIxExceptionIndexes)(Thread*, jclass, jint, unsigned short*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetMethodIxExceptionsCount)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_GetMethodIxByteCode)(Thread*, jclass, jint, unsigned char*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetMethodIxByteCodeLength)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_GetMethodIxExceptionTableEntry)( - Thread*, - jclass, - jint, - jint, - local::JVM_ExceptionTableEntryType*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetMethodIxExceptionTableLength)(Thread*, jclass, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetFieldIxModifiers)(Thread*, jclass, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetMethodIxModifiers)(Thread*, jclass, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetMethodIxLocalsCount)(Thread*, jclass, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetMethodIxArgsSize)(Thread*, jclass, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetMethodIxMaxStack)(Thread*, jclass, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsConstructorIx)(Thread*, jclass, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsVMGeneratedMethodIx)(Thread*, jclass, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetMethodIxNameUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetMethodIxSignatureUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetCPFieldNameUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetCPMethodNameUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetCPMethodSignatureUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetCPFieldSignatureUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetCPClassNameUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetCPFieldClassNameUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT const char* JNICALL - EXPORT(JVM_GetCPMethodClassNameUTF)(Thread*, jclass, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetCPFieldModifiers)(Thread*, jclass, int, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetCPMethodModifiers)(Thread*, jclass, int, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_ReleaseUTF)(const char*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_IsSameClassPackage)(Thread*, jclass, jclass) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetLastErrorString)(char* dst, int length) -{ - strncpy(dst, strerror(errno), length); - return strlen(dst); -} - -extern "C" AVIAN_EXPORT char* JNICALL EXPORT(JVM_NativePath)(char* path) -{ - return path; -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Open)(const char* path, jint flags, jint mode) -{ - int r = OPEN(path, flags & 0xFFFF, mode); - if (r == -1) { - return errno == EEXIST ? JVM_EEXIST : -1; - } else { - return r; - } -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Close)(jint fd) -{ - return CLOSE(fd); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Read)(jint fd, char* dst, jint length) -{ - return READ(fd, dst, length); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Write)(jint fd, char* src, jint length) -{ - return WRITE(fd, src, length); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Available)(jint fd, jlong* result) -{ - struct STAT buffer; - int n; - if (FSTAT(fd, &buffer) >= 0 - and (S_ISCHR(buffer.st_mode) or S_ISFIFO(buffer.st_mode) - or S_ISSOCK(buffer.st_mode)) and local::pipeAvailable(fd, &n)) { - *result = n; - return 1; - } - - int current = LSEEK(fd, 0, SEEK_CUR); - if (current == -1) - return 0; - - int end = LSEEK(fd, 0, SEEK_END); - if (end == -1) - return 0; - - if (LSEEK(fd, current, SEEK_SET) == -1) - return 0; - - *result = end - current; - return 1; -} - -extern "C" AVIAN_EXPORT jlong JNICALL - EXPORT(JVM_Lseek)(jint fd, jlong offset, jint seek) -{ - return LSEEK(fd, offset, seek); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_SetLength)(jint fd, jlong length) -{ -#ifdef PLATFORM_WINDOWS - HANDLE h = reinterpret_cast(_get_osfhandle(fd)); - if (h == INVALID_HANDLE_VALUE) { - errno = EBADF; - return -1; - } - - long high = length >> 32; - DWORD r = SetFilePointer(h, static_cast(length), &high, FILE_BEGIN); - if (r == 0xFFFFFFFF and GetLastError() != NO_ERROR) { - errno = EIO; - return -1; - } - - if (SetEndOfFile(h)) { - return 0; - } else { - errno = EIO; - return -1; - } -#else - return ftruncate(fd, length); -#endif -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Sync)(jint fd) -{ -#ifdef PLATFORM_WINDOWS - HANDLE h = reinterpret_cast(_get_osfhandle(fd)); - if (h == INVALID_HANDLE_VALUE) { - errno = EBADF; - return -1; - } - - if (FlushFileBuffers(h)) { - return 0; - } else { - errno = EIO; - return -1; - } -#else - return fsync(fd); -#endif -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_InitializeSocketLibrary)() -{ -#ifdef PLATFORM_WINDOWS - static bool wsaInitialized = false; - if (not wsaInitialized) { - WSADATA data; - int r = WSAStartup(MAKEWORD(2, 2), &data); - if (r or LOBYTE(data.wVersion) != 2 or HIBYTE(data.wVersion) != 2) { - return -1; - } else { - wsaInitialized = true; - } - } -#endif - return 0; -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Socket)(jint domain, jint type, jint protocol) -{ - return socket(domain, type, protocol); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_SocketClose)(jint socket) -{ -#ifdef PLATFORM_WINDOWS - return closesocket(socket); -#else - return close(socket); -#endif -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_SocketShutdown)(jint socket, jint how) -{ - return shutdown(socket, how); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Recv)(jint socket, char* dst, jint count, jint flags) -{ - return recv(socket, dst, count, flags); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Send)(jint socket, char* src, jint count, jint flags) -{ - return send(socket, src, count, flags); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Timeout)(int, long) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_Listen)(jint socket, jint count) -{ - return listen(socket, count); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Connect)(jint socket, sockaddr* address, jint addressLength) -{ - return connect(socket, address, addressLength); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Bind)(jint, struct sockaddr*, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_Accept)(jint socket, - struct sockaddr* address, - jint* addressLength) -{ - socklen_t length = *addressLength; - int r = accept(socket, address, &length); - *addressLength = length; - return r; -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_RecvFrom)(jint, char*, int, int, struct sockaddr*, int*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_SendTo)(jint, char*, int, int, struct sockaddr*, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_SocketAvailable)(jint socket, jint* count) -{ -#ifdef PLATFORM_WINDOWS - unsigned long c = *count; - int r = ioctlsocket(socket, FIONREAD, &c); - *count = c; - return r; -#else - return ioctl(socket, FIONREAD, count) < 0 ? 0 : 1; -#endif -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_GetSockName)(jint socket, - struct sockaddr* address, - int* addressLength) -{ - socklen_t length = *addressLength; - int r = getsockname(socket, address, &length); - *addressLength = length; - return r; -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_GetSockOpt)(jint socket, - int level, - int optionName, - char* optionValue, - int* optionLength) -{ - socklen_t length = *optionLength; - int rv = getsockopt(socket, level, optionName, optionValue, &length); - *optionLength = length; - return rv; -} - -extern "C" AVIAN_EXPORT jint JNICALL - EXPORT(JVM_SetSockOpt)(jint socket, - int level, - int optionName, - const char* optionValue, - int optionLength) -{ - return setsockopt(socket, level, optionName, optionValue, optionLength); -} - -extern "C" AVIAN_EXPORT struct protoent* JNICALL - EXPORT(JVM_GetProtoByName)(char*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT struct hostent* JNICALL - EXPORT(JVM_GetHostByAddr)(const char*, int, int) -{ - abort(); -} - -extern "C" AVIAN_EXPORT struct hostent* JNICALL EXPORT(JVM_GetHostByName)(char*) -{ - abort(); -} - -extern "C" AVIAN_EXPORT int JNICALL - EXPORT(JVM_GetHostName)(char* name, int length) -{ - return gethostname(name, length); -} - -extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_RawMonitorCreate)(void) -{ - System* s = local::globalMachine->system; - System::Monitor* lock; - if (s->success(s->make(&lock))) { - return lock; - } else { - return 0; - } -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_RawMonitorDestroy)(void* lock) -{ - static_cast(lock)->dispose(); -} - -extern "C" AVIAN_EXPORT jint JNICALL EXPORT(JVM_RawMonitorEnter)(void* lock) -{ - static_cast(lock) - ->acquire(static_cast(local::globalMachine->localThread->get()) - ->systemThread); - - return 0; -} - -extern "C" AVIAN_EXPORT void JNICALL EXPORT(JVM_RawMonitorExit)(void* lock) -{ - static_cast(lock) - ->release(static_cast(local::globalMachine->localThread->get()) - ->systemThread); -} - -int JNICALL GetVersion(Thread*) -{ - return JMM_VERSION_1_0; -} - -uint64_t getInputArgumentArray(Thread* t, uintptr_t*) -{ - object array - = makeObjectArray(t, type(t, GcString::Type), t->m->argumentCount); - PROTECT(t, array); - - for (unsigned i = 0; i < t->m->argumentCount; ++i) { - GcString* argument = makeString(t, t->m->arguments[i]); - setField(t, array, ArrayBody + (i * BytesPerWord), argument); - } - - return reinterpret_cast(makeLocalReference(t, array)); -} - -jobjectArray JNICALL GetInputArgumentArray(Thread* t) -{ - return reinterpret_cast(run(t, getInputArgumentArray, 0)); -} - -jint JNICALL GetOptionalSupport(Thread*, jmmOptionalSupport* support) -{ - memset(support, 0, sizeof(jmmOptionalSupport)); - return 0; -} - -jlong JNICALL GetLongAttribute(Thread* t, jobject, jmmLongAttribute attribute) -{ - const unsigned JMM_JVM_INIT_DONE_TIME_MS = 7; - - switch (attribute) { - case JMM_JVM_INIT_DONE_TIME_MS: - return 0; - - default: - abort(t); - } -} - -jboolean JNICALL GetBoolAttribute(Thread* t, jmmBoolAttribute attribute) -{ - const unsigned JMM_THREAD_CPU_TIME = 24; - const unsigned JMM_THREAD_ALLOCATED_MEMORY = 25; - - switch (attribute) { - case JMM_THREAD_CPU_TIME: - case JMM_THREAD_ALLOCATED_MEMORY: - return false; - - default: - abort(t); - } -} - -uint64_t getMemoryManagers(Thread* t, uintptr_t*) -{ - return reinterpret_cast(makeLocalReference( - t, - makeObjectArray(t, - resolveClass(t, - roots(t)->bootLoader(), - "java/lang/management/MemoryManagerMXBean"), - 0))); -} - -jobjectArray JNICALL GetMemoryManagers(Thread* t, jobject) -{ - return reinterpret_cast(run(t, getMemoryManagers, 0)); -} - -uint64_t getMemoryPools(Thread* t, uintptr_t*) -{ - return reinterpret_cast(makeLocalReference( - t, - makeObjectArray(t, - resolveClass(t, - roots(t)->bootLoader(), - "java/lang/management/MemoryPoolMXBean"), - 0))); -} - -jobjectArray JNICALL GetMemoryPools(Thread* t, jobject) -{ - return reinterpret_cast(run(t, getMemoryPools, 0)); -} - -extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_GetManagement)(jint version) -{ - if (version == JMM_VERSION_1_0) { - JmmInterface* interface = &(static_cast( - local::globalMachine->classpath) - ->jmmInterface); - - memset(interface, 0, sizeof(JmmInterface)); - - interface->GetVersion = GetVersion; - interface->GetOptionalSupport = GetOptionalSupport; - interface->GetLongAttribute = GetLongAttribute; - interface->GetBoolAttribute = GetBoolAttribute; - interface->GetMemoryManagers = GetMemoryManagers; - interface->GetMemoryPools = GetMemoryPools; - interface->GetInputArgumentArray = GetInputArgumentArray; - - return interface; - } else { - return 0; - } -} - -extern "C" AVIAN_EXPORT jobject JNICALL - EXPORT(JVM_InitAgentProperties)(Thread*, jobject) -{ - abort(); -} - -uint64_t getEnclosingMethodInfo(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - GcClass* class_ = (*c)->vmClass(); - PROTECT(t, class_); - - GcClassAddendum* addendum = class_->addendum(); - if (addendum) { - object enclosingClass = addendum->enclosingClass(); - if (enclosingClass) { - PROTECT(t, enclosingClass); - - object array = makeObjectArray(t, type(t, GcJobject::Type), 3); - PROTECT(t, array); - - enclosingClass = getJClass( - t, - resolveClass( - t, class_->loader(), cast(t, enclosingClass))); - - setField(t, array, ArrayBody, enclosingClass); - - GcPair* enclosingMethod = cast(t, addendum->enclosingMethod()); - - if (enclosingMethod) { - PROTECT(t, enclosingMethod); - - GcString* name = t->m->classpath->makeString( - t, - enclosingMethod->first(), - 0, - cast(t, enclosingMethod->first())->length() - 1); - - setField(t, array, ArrayBody + BytesPerWord, name); - - GcString* spec = t->m->classpath->makeString( - t, - enclosingMethod->second(), - 0, - cast(t, enclosingMethod->second())->length() - 1); - - setField(t, array, ArrayBody + (2 * BytesPerWord), spec); - } - - return reinterpret_cast(makeLocalReference(t, array)); - } - } - return 0; -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetEnclosingMethodInfo)(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return reinterpret_cast( - run(t, getEnclosingMethodInfo, arguments)); -} - -extern "C" AVIAN_EXPORT jintArray JNICALL - EXPORT(JVM_GetThreadStateValues)(JNIEnv*, jint) -{ - abort(); -} - -extern "C" AVIAN_EXPORT jobjectArray JNICALL - EXPORT(JVM_GetThreadStateNames)(JNIEnv*, jint, jintArray) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_GetVersionInfo)(JNIEnv*, - local::jvm_version_info* info, - size_t size) -{ - memset(info, 0, size); - info->jvm_version = 0x01070000; -} - -extern "C" AVIAN_EXPORT jboolean JNICALL - EXPORT(JVM_CX8Field)(JNIEnv*, jobject*, jfieldID*, jlong, jlong) -{ - abort(); -} - -extern "C" AVIAN_EXPORT void JNICALL - EXPORT(JVM_SetNativeThreadName)(JNIEnv*, jobject, jstring) -{ - abort(); -} - -} // namespace local - -} // namespace - -extern "C" AVIAN_EXPORT int jio_vsnprintf(char* dst, - size_t size, - const char* format, - va_list a) -{ - return vm::vsnprintf(dst, size, format, a); -} - -extern "C" AVIAN_EXPORT int jio_vfprintf(FILE* stream, - const char* format, - va_list a) -{ - return vfprintf(stream, format, a); -} - -#ifdef PLATFORM_WINDOWS -extern "C" AVIAN_EXPORT void* JNICALL EXPORT(JVM_GetThreadInterruptEvent)() -{ - // hack: We don't want to expose thread interruption implementation - // details, so we give the class library a fake event to play with. - // This means that threads won't be interruptable when blocked in - // Process.waitFor. - static HANDLE fake = 0; - if (fake == 0) { - fake = CreateEvent(0, true, false, 0); - } - return fake; -} - -namespace { -HMODULE jvmHandle = 0; -} - -extern "C" int JDK_InitJvmHandle() -{ - jvmHandle = GetModuleHandle(0); - return jvmHandle != 0; -} - -extern "C" void* JDK_FindJvmEntry(const char* name) -{ - return voidPointer(GetProcAddress(jvmHandle, name)); -} - -extern "C" HMODULE JDK_LoadSystemLibrary(const char* name) { - HMODULE handle; - char path[MAX_PATH]; - - if (GetSystemDirectory(path, sizeof(path)) != 0) { - strcat(path, "\\"); - strcat(path, name); - handle = LoadLibrary(path); - } else { - handle = nullptr; - } - - if (handle == nullptr) { - if (GetWindowsDirectory(path, sizeof(path)) != 0) { - strcat(path, "\\"); - strcat(path, name); - handle = LoadLibrary(path); - } - } - return handle; -} - -#ifdef AVIAN_OPENJDK_SRC - -extern "C" char* findJavaTZ_md(const char*, const char*); - -extern "C" AVIAN_EXPORT int64_t JNICALL - Avian_java_util_TimeZone_getSystemTimeZoneID(Thread* t, - object, - uintptr_t* arguments) -{ - // On Windows, findJavaTZ_md loads tzmappings from the filesystem - // using fopen, so we have no opportunity to make it read straight - // from the embedded JAR file as with files read from Java code. - // Therefore, we must extract tzmappings to a temporary location - // before calling findJavaTZ_md. We could avoid this by - // implementing findJavaTZ_md ourselves from scratch, but that would - // be a lot of code to implement and maintain. - - GcString* country = cast(t, reinterpret_cast(arguments[1])); - - THREAD_RUNTIME_ARRAY(t, char, countryChars, country->length(t) + 1); - stringChars(t, country, RUNTIME_ARRAY_BODY(countryChars)); - - local::MyClasspath* cp = static_cast(t->m->classpath); - - local::EmbeddedFile ef(cp, cp->tzMappings, cp->tzMappingsLength); - if (ef.jar == 0 or ef.jarLength == 0 or ef.pathLength == 0) { - return 0; - } - - Finder* finder = getFinder(t, ef.jar, ef.jarLength); - if (finder == 0) { - return 0; - } - - System::Region* r = finder->find(ef.path); - if (r == 0) { - return 0; - } - - THREAD_RESOURCE(t, System::Region*, r, r->dispose()); - - char tmpPath[MAX_PATH + 1]; - GetTempPathA(MAX_PATH, tmpPath); - - char tmpDir[MAX_PATH + 1]; - vm::snprintf(tmpDir, MAX_PATH, "%s/avian-tmp", tmpPath); - if (_mkdir(tmpDir) != 0 and errno != EEXIST) { - return 0; - } - - THREAD_RESOURCE(t, char*, tmpDir, rmdir(tmpDir)); - - char libDir[MAX_PATH + 1]; - vm::snprintf(libDir, MAX_PATH, "%s/lib", tmpDir); - if (mkdir(libDir) != 0 and errno != EEXIST) { - return 0; - } - - THREAD_RESOURCE(t, char*, libDir, rmdir(libDir)); - - char file[MAX_PATH + 1]; - vm::snprintf(file, MAX_PATH, "%s/tzmappings", libDir); - FILE* out = vm::fopen(file, "wb"); - if (out == 0) { - return 0; - } - - THREAD_RESOURCE(t, char*, file, unlink(file)); - THREAD_RESOURCE(t, FILE*, out, fclose(out)); - - if (fwrite(r->start(), 1, r->length(), out) != r->length() - or fflush(out) != 0) { - return 0; - } - - char* javaTZ = findJavaTZ_md(tmpDir, RUNTIME_ARRAY_BODY(countryChars)); - if (javaTZ) { - THREAD_RESOURCE(t, char*, javaTZ, free(javaTZ)); - - return reinterpret_cast(makeString(t, "%s", javaTZ)); - } else { - return 0; - } -} -#else // not AVIAN_OPENJDK_SRC -extern "C" AVIAN_EXPORT int jio_snprintf(char* dst, - size_t size, - const char* format, - ...) -{ - va_list a; - va_start(a, format); - - int r = jio_vsnprintf(dst, size, format, a); - - va_end(a); - - return r; -} - -extern "C" AVIAN_EXPORT int jio_fprintf(FILE* stream, const char* format, ...) -{ - va_list a; - va_start(a, format); - - int r = jio_vfprintf(stream, format, a); - - va_end(a); - - return r; -} -#endif // not AVIAN_OPENJDK_SRC -#endif // PLATFORM_WINDOWS diff --git a/sgx-jvm/avian/src/codegen/CMakeLists.txt b/sgx-jvm/avian/src/codegen/CMakeLists.txt deleted file mode 100644 index 001a8681d3..0000000000 --- a/sgx-jvm/avian/src/codegen/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -add_library (avian_codegen - compiler.cpp - runtime.cpp - targets.cpp - - compiler/context.cpp - compiler/event.cpp - compiler/frame.cpp - compiler/ir.cpp - compiler/promise.cpp - compiler/read.cpp - compiler/regalloc.cpp - compiler/resource.cpp - compiler/site.cpp - compiler/value.cpp -) - -add_subdirectory(target) diff --git a/sgx-jvm/avian/src/codegen/compiler.cpp b/sgx-jvm/avian/src/codegen/compiler.cpp deleted file mode 100644 index 24ac8c9239..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler.cpp +++ /dev/null @@ -1,2964 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" - -#include - -#include -#include -#include -#include - -#include "codegen/compiler/regalloc.h" -#include "codegen/compiler/context.h" -#include "codegen/compiler/resource.h" -#include "codegen/compiler/value.h" -#include "codegen/compiler/site.h" -#include "codegen/compiler/read.h" -#include "codegen/compiler/event.h" -#include "codegen/compiler/promise.h" -#include "codegen/compiler/frame.h" -#include "codegen/compiler/ir.h" - -using namespace vm; - -namespace avian { -namespace codegen { -namespace compiler { - -const bool DebugAppend = false; -const bool DebugCompile = false; -const bool DebugResources = false; -const bool DebugFrame = false; -const bool DebugControl = false; -const bool DebugBuddies = false; - -const unsigned StealRegisterReserveCount = 2; - -// this should be equal to the largest number of registers used by a -// compare instruction: -const unsigned ResolveRegisterReserveCount = (TargetBytesPerWord == 8 ? 2 : 4); - -void apply(Context* c, - lir::UnaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High); - -void apply(Context* c, - lir::BinaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High, - unsigned s2Size, - Site* s2Low, - Site* s2High); - -void apply(Context* c, - lir::TernaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High, - unsigned s2Size, - Site* s2Low, - Site* s2High, - unsigned s3Size, - Site* s3Low, - Site* s3High); - -class ConstantPoolNode { - public: - ConstantPoolNode(Promise* promise) : promise(promise), next(0) - { - } - - Promise* promise; - ConstantPoolNode* next; -}; - -Read* live(Context* c UNUSED, Value* v) -{ - assertT(c, v->buddy->hasBuddy(c, v)); - - Value* p = v; - do { - if (valid(p->reads)) { - return p->reads; - } - p = p->buddy; - } while (p != v); - - return 0; -} - -unsigned sitesToString(Context* c, Value* v, char* buffer, unsigned size); - -void deadWord(Context* c, Value* v) -{ - Value* nextWord = v->nextWord; - assertT(c, nextWord != v); - - for (SiteIterator it(c, v, true, false); it.hasMore();) { - Site* s = it.next(); - - if (s->registerSize(c) > TargetBytesPerWord) { - it.remove(c); - nextWord->addSite(c, s); - } - } -} - -void deadBuddy(Context* c, Value* v, Read* r UNUSED) -{ - assertT(c, v->buddy != v); - assertT(c, r); - - if (DebugBuddies) { - fprintf(stderr, "remove dead buddy %p from", v); - for (Value* p = v->buddy; p != v; p = p->buddy) { - fprintf(stderr, " %p", p); - } - fprintf(stderr, "\n"); - } - - assertT(c, v->buddy); - - Value* next = v->buddy; - v->buddy = v; - Value* p = next; - while (p->buddy != v) - p = p->buddy; - p->buddy = next; - - assertT(c, p->buddy); - - for (SiteIterator it(c, v, false, false); it.hasMore();) { - Site* s = it.next(); - it.remove(c); - - next->addSite(c, s); - } -} - -void popRead(Context* c, Event* e UNUSED, Value* v) -{ - assertT(c, e == v->reads->event); - - if (DebugReads) { - fprintf(stderr, - "pop read %p from %p next %p event %p (%s)\n", - v->reads, - v, - v->reads->next(c), - e, - (e ? e->name() : 0)); - } - - v->reads = v->reads->next(c); - - if (not valid(v->reads)) { - Value* nextWord = v->nextWord; - if (nextWord != v) { - if (valid(nextWord->reads)) { - deadWord(c, v); - } else { - deadWord(c, nextWord); - } - } - - Read* r = live(c, v); - if (r) { - deadBuddy(c, v, r); - } else { - v->clearSites(c); - } - } -} - -void addBuddy(Value* original, Value* buddy) -{ - buddy->buddy = original; - Value* p = original; - while (p->buddy != original) - p = p->buddy; - p->buddy = buddy; - - if (DebugBuddies) { - fprintf(stderr, "add buddy %p to", buddy); - for (Value* p = buddy->buddy; p != buddy; p = p->buddy) { - fprintf(stderr, " %p", p); - } - fprintf(stderr, "\n"); - } -} - -void move(Context* c, Value* value, Site* src, Site* dst); - -unsigned sitesToString(Context* c, Site* sites, char* buffer, unsigned size) -{ - unsigned total = 0; - for (Site* s = sites; s; s = s->next) { - total += s->toString(c, buffer + total, size - total); - - if (s->next) { - assertT(c, size > total + 2); - memcpy(buffer + total, ", ", 2); - total += 2; - } - } - - assertT(c, size > total); - buffer[total] = 0; - - return total; -} - -unsigned sitesToString(Context* c, Value* v, char* buffer, unsigned size) -{ - unsigned total = 0; - Value* p = v; - do { - if (total) { - assertT(c, size > total + 2); - memcpy(buffer + total, "; ", 2); - total += 2; - } - - if (p->sites) { - total += vm::snprintf(buffer + total, size - total, "%p has ", p); - total += sitesToString(c, p->sites, buffer + total, size - total); - } else { - total += vm::snprintf(buffer + total, size - total, "%p has nothing", p); - } - - p = p->buddy; - } while (p != v); - - return total; -} - -Site* pickTargetSite(Context* c, - Read* read, - bool intersectRead = false, - unsigned registerReserveCount = 0, - CostCalculator* costCalculator = 0) -{ - Target target( - pickTarget(c, read, intersectRead, registerReserveCount, costCalculator)); - - expect(c, target.cost < Target::Impossible); - - if (target.type == lir::Operand::Type::Memory) { - return frameSite(c, target.index); - } else { - return registerSite(c, Register(target.index)); - } -} - -bool acceptMatch(Context* c, Site* s, Read*, const SiteMask& mask) -{ - return s->match(c, mask); -} - -Site* pickSourceSite(Context* c, - Read* read, - Site* target = 0, - unsigned* cost = 0, - SiteMask* extraMask = 0, - bool intersectRead = true, - bool includeBuddies = true, - bool includeNextWord = true, - bool (*accept)(Context*, Site*, Read*, const SiteMask&) - = acceptMatch) -{ - SiteMask mask; - - if (extraMask) { - mask = mask.intersectionWith(*extraMask); - } - - if (intersectRead) { - read->intersect(&mask); - } - - Site* site = 0; - unsigned copyCost = 0xFFFFFFFF; - for (SiteIterator it(c, read->value, includeBuddies, includeNextWord); - it.hasMore();) { - Site* s = it.next(); - if (accept(c, s, read, mask)) { - unsigned v = s->copyCost(c, target); - if (v < copyCost) { - site = s; - copyCost = v; - } - } - } - - if (DebugMoves and site and target) { - char srcb[256]; - site->toString(c, srcb, 256); - char dstb[256]; - target->toString(c, dstb, 256); - fprintf(stderr, - "pick source %s to %s for %p cost %d\n", - srcb, - dstb, - read->value, - copyCost); - } - - if (cost) - *cost = copyCost; - return site; -} - -Site* maybeMove(Context* c, - Read* read, - bool intersectRead, - bool includeNextWord, - unsigned registerReserveCount = 0) -{ - Value* value = read->value; - unsigned size = value == value->nextWord ? TargetBytesPerWord : 8; - - class MyCostCalculator : public CostCalculator { - public: - MyCostCalculator(Value* value, unsigned size, bool includeNextWord) - : value(value), size(size), includeNextWord(includeNextWord) - { - } - - virtual unsigned cost(Context* c, SiteMask dstMask) - { - OperandMask src; - OperandMask tmp; - c->arch->planMove( - size, src, tmp, OperandMask(dstMask.typeMask, dstMask.registerMask, 0)); - - SiteMask srcMask = SiteMask::lowPart(src); - for (SiteIterator it(c, value, true, includeNextWord); it.hasMore();) { - Site* s = it.next(); - if (s->match(c, srcMask) or s->match(c, dstMask)) { - return 0; - } - } - - return Target::IndirectMovePenalty; - } - - Value* value; - unsigned size; - bool includeNextWord; - } costCalculator(value, size, includeNextWord); - - Site* dstSite = pickTargetSite( - c, read, intersectRead, registerReserveCount, &costCalculator); - - OperandMask src; - OperandMask tmp; - c->arch->planMove( - size, - src, - tmp, - OperandMask(1 << (unsigned)dstSite->type(c), dstSite->registerMask(c), 0)); - - SiteMask srcMask = SiteMask::lowPart(src); - unsigned cost = 0xFFFFFFFF; - Site* srcSite = 0; - for (SiteIterator it(c, value, true, includeNextWord); it.hasMore();) { - Site* s = it.next(); - unsigned v = s->copyCost(c, dstSite); - if (v == 0) { - srcSite = s; - cost = 0; - break; - } - if (not s->match(c, srcMask)) { - v += CopyPenalty; - } - if (v < cost) { - srcSite = s; - cost = v; - } - } - - if (cost) { - if (DebugMoves) { - char srcb[256]; - srcSite->toString(c, srcb, 256); - char dstb[256]; - dstSite->toString(c, dstb, 256); - fprintf(stderr, - "maybe move %s to %s for %p to %p\n", - srcb, - dstb, - value, - value); - } - - srcSite->freeze(c, value); - - value->addSite(c, dstSite); - - srcSite->thaw(c, value); - - if (not srcSite->match(c, srcMask)) { - srcSite->freeze(c, value); - dstSite->freeze(c, value); - - SiteMask tmpMask = SiteMask::lowPart(tmp); - SingleRead tmpRead(tmpMask, 0); - tmpRead.value = value; - tmpRead.successor_ = value; - - Site* tmpSite = pickTargetSite(c, &tmpRead, true); - - value->addSite(c, tmpSite); - - move(c, value, srcSite, tmpSite); - - dstSite->thaw(c, value); - srcSite->thaw(c, value); - - srcSite = tmpSite; - } - - move(c, value, srcSite, dstSite); - } - - return dstSite; -} - -Site* maybeMove(Context* c, - Value* v, - const SiteMask& mask, - bool intersectMask, - bool includeNextWord, - unsigned registerReserveCount = 0) -{ - SingleRead read(mask, 0); - read.value = v; - read.successor_ = v; - - return maybeMove( - c, &read, intersectMask, includeNextWord, registerReserveCount); -} - -Site* pickSiteOrMove(Context* c, - Read* read, - bool intersectRead, - bool includeNextWord, - unsigned registerReserveCount = 0) -{ - Site* s - = pickSourceSite(c, read, 0, 0, 0, intersectRead, true, includeNextWord); - - if (s) { - return s; - } else { - return maybeMove( - c, read, intersectRead, includeNextWord, registerReserveCount); - } -} - -Site* pickSiteOrMove(Context* c, - Value* v, - const SiteMask& mask, - bool intersectMask, - bool includeNextWord, - unsigned registerReserveCount = 0) -{ - SingleRead read(mask, 0); - read.value = v; - read.successor_ = v; - - return pickSiteOrMove( - c, &read, intersectMask, includeNextWord, registerReserveCount); -} - -void steal(Context* c, Resource* r, Value* thief) -{ - if (DebugResources) { - char resourceBuffer[256]; - r->toString(c, resourceBuffer, 256); - char siteBuffer[1024]; - sitesToString(c, r->value, siteBuffer, 1024); - fprintf(stderr, - "%p steal %s from %p (%s)\n", - thief, - resourceBuffer, - r->value, - siteBuffer); - } - - if ((not(thief and thief->isBuddyOf(r->value)) - and r->value->uniqueSite(c, r->site))) { - r->site->freeze(c, r->value); - - maybeMove(c, live(c, r->value), false, true, StealRegisterReserveCount); - - r->site->thaw(c, r->value); - } - - r->value->removeSite(c, r->site); -} - -SiteMask generalRegisterMask(Context* c) -{ - return SiteMask(lir::Operand::RegisterPairMask, - c->regFile->generalRegisters, - NoFrameIndex); -} - -SiteMask generalRegisterOrConstantMask(Context* c) -{ - return SiteMask(lir::Operand::RegisterPairMask | lir::Operand::ConstantMask, - c->regFile->generalRegisters, - NoFrameIndex); -} - -MultiRead* multiRead(Context* c) -{ - return new (c->zone) MultiRead; -} - -StubRead* stubRead(Context* c) -{ - return new (c->zone) StubRead; -} - -Site* pickSite(Context* c, - Value* v, - Site* s, - unsigned index, - bool includeNextWord) -{ - for (SiteIterator it(c, v, true, includeNextWord); it.hasMore();) { - Site* candidate = it.next(); - if (s->matchNextWord(c, candidate, index)) { - return candidate; - } - } - - return 0; -} - -Site* pickSiteOrMove(Context* c, Value* v, Site* s, unsigned index) -{ - Site* n = pickSite(c, v, s, index, false); - if (n) { - return n; - } - - return maybeMove(c, v, s->nextWordMask(c, index), true, false); -} - -Site* pickSiteOrMove(Context* c, Value* v, Site* s, Site** low, Site** high) -{ - if (v->wordIndex == 0) { - *low = s; - *high = pickSiteOrMove(c, v->nextWord, s, 1); - return *high; - } else { - *low = pickSiteOrMove(c, v->nextWord, s, 0); - *high = s; - return *low; - } -} - -Site* pickSiteOrGrow(Context* c, Value* v, Site* s, unsigned index) -{ - Site* n = pickSite(c, v, s, index, false); - if (n) { - return n; - } - - n = s->makeNextWord(c, index); - v->addSite(c, n); - return n; -} - -Site* pickSiteOrGrow(Context* c, Value* v, Site* s, Site** low, Site** high) -{ - if (v->wordIndex == 0) { - *low = s; - *high = pickSiteOrGrow(c, v->nextWord, s, 1); - return *high; - } else { - *low = pickSiteOrGrow(c, v->nextWord, s, 0); - *high = s; - return *low; - } -} - -bool isHome(Value* v, int frameIndex) -{ - Value* p = v; - do { - if (p->home == frameIndex) { - return true; - } - p = p->buddy; - } while (p != v); - - return false; -} - -bool acceptForResolve(Context* c, Site* s, Read* read, const SiteMask& mask) -{ - if (acceptMatch(c, s, read, mask) and (not s->frozen(c))) { - if (s->type(c) == lir::Operand::Type::RegisterPair) { - return c->availableGeneralRegisterCount > ResolveRegisterReserveCount; - } else { - assertT(c, - s->match(c, SiteMask(lir::Operand::MemoryMask, 0, AnyFrameIndex))); - - return isHome(read->value, - offsetToFrameIndex(c, static_cast(s)->offset)); - } - } else { - return false; - } -} - -void move(Context* c, Value* value, Site* src, Site* dst) -{ - if (DebugMoves) { - char srcb[256]; - src->toString(c, srcb, 256); - char dstb[256]; - dst->toString(c, dstb, 256); - fprintf(stderr, "move %s to %s for %p to %p\n", srcb, dstb, value, value); - } - - assertT(c, value->findSite(dst)); - - src->freeze(c, value); - dst->freeze(c, value); - - unsigned srcSize; - unsigned dstSize; - if (value->nextWord == value) { - srcSize = TargetBytesPerWord; - dstSize = TargetBytesPerWord; - } else { - srcSize = src->registerSize(c); - dstSize = dst->registerSize(c); - } - - if (srcSize == dstSize) { - apply(c, lir::Move, srcSize, src, src, dstSize, dst, dst); - } else if (srcSize > TargetBytesPerWord) { - Site* low, *high, *other = pickSiteOrGrow(c, value, dst, &low, &high); - other->freeze(c, value->nextWord); - - apply(c, lir::Move, srcSize, src, src, srcSize, low, high); - - other->thaw(c, value->nextWord); - } else { - Site* low, *high, *other = pickSiteOrMove(c, value, src, &low, &high); - other->freeze(c, value->nextWord); - - apply(c, lir::Move, dstSize, low, high, dstSize, dst, dst); - - other->thaw(c, value->nextWord); - } - - dst->thaw(c, value); - src->thaw(c, value); -} - -void asAssemblerOperand(Context* c, Site* low, Site* high, lir::Operand* result) -{ - low->asAssemblerOperand(c, high, result); -} - -class OperandUnion : public lir::Operand { - public: - // must be large enough and aligned properly to hold any operand - // type (we'd use an actual union type here, except that classes - // with constructors cannot be used in a union): - uintptr_t padding[4]; -}; - -void apply(Context* c, - lir::UnaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High) -{ - assertT(c, s1Low->type(c) == s1High->type(c)); - - lir::Operand::Type s1Type = s1Low->type(c); - OperandUnion s1Union; - asAssemblerOperand(c, s1Low, s1High, &s1Union); - - c->assembler->apply(op, OperandInfo(s1Size, s1Type, &s1Union)); -} - -void apply(Context* c, - lir::BinaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High, - unsigned s2Size, - Site* s2Low, - Site* s2High) -{ - assertT(c, s1Low->type(c) == s1High->type(c)); - assertT(c, s2Low->type(c) == s2High->type(c)); - - lir::Operand::Type s1Type = s1Low->type(c); - OperandUnion s1Union; - asAssemblerOperand(c, s1Low, s1High, &s1Union); - - lir::Operand::Type s2Type = s2Low->type(c); - OperandUnion s2Union; - asAssemblerOperand(c, s2Low, s2High, &s2Union); - - c->assembler->apply(op, - OperandInfo(s1Size, s1Type, &s1Union), - OperandInfo(s2Size, s2Type, &s2Union)); -} - -void apply(Context* c, - lir::TernaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High, - unsigned s2Size, - Site* s2Low, - Site* s2High, - unsigned s3Size, - Site* s3Low, - Site* s3High) -{ - assertT(c, s1Low->type(c) == s1High->type(c)); - assertT(c, s2Low->type(c) == s2High->type(c)); - assertT(c, s3Low->type(c) == s3High->type(c)); - - lir::Operand::Type s1Type = s1Low->type(c); - OperandUnion s1Union; - asAssemblerOperand(c, s1Low, s1High, &s1Union); - - lir::Operand::Type s2Type = s2Low->type(c); - OperandUnion s2Union; - asAssemblerOperand(c, s2Low, s2High, &s2Union); - - lir::Operand::Type s3Type = s3Low->type(c); - OperandUnion s3Union; - asAssemblerOperand(c, s3Low, s3High, &s3Union); - - c->assembler->apply(op, - OperandInfo(s1Size, s1Type, &s1Union), - OperandInfo(s2Size, s2Type, &s2Union), - OperandInfo(s3Size, s3Type, &s3Union)); -} - -void append(Context* c, Event* e); - -void saveLocals(Context* c, Event* e) -{ - for (unsigned li = 0; li < c->localFootprint; ++li) { - Local* local = e->localsBefore + li; - if (local->value) { - if (DebugReads) { - fprintf(stderr, - "local save read %p at %d of %d\n", - local->value, - compiler::frameIndex(c, li), - totalFrameSize(c)); - } - - e->addRead( - c, - local->value, - SiteMask(lir::Operand::MemoryMask, 0, compiler::frameIndex(c, li))); - } - } -} - -void maybeMove(Context* c, - lir::BinaryOperation op, - unsigned srcSize, - unsigned srcSelectSize, - Value* srcValue, - unsigned dstSize, - Value* dstValue, - const SiteMask& dstMask) -{ - Read* read = live(c, dstValue); - bool isStore = read == 0; - - Site* target; - if (dstValue->target) { - target = dstValue->target; - } else if (isStore) { - return; - } else { - target = pickTargetSite(c, read); - } - - unsigned cost = srcValue->source->copyCost(c, target); - - if (srcSelectSize < dstSize) - cost = 1; - - if (cost) { - // todo: let c->arch->planMove decide this: - bool useTemporary = ((target->type(c) == lir::Operand::Type::Memory - and srcValue->source->type(c) == lir::Operand::Type::Memory) - or (srcSelectSize < dstSize - and target->type(c) != lir::Operand::Type::RegisterPair)); - - srcValue->source->freeze(c, srcValue); - - dstValue->addSite(c, target); - - srcValue->source->thaw(c, srcValue); - - bool addOffset = srcSize != srcSelectSize and c->arch->bigEndian() - and srcValue->source->type(c) == lir::Operand::Type::Memory; - - if (addOffset) { - static_cast(srcValue->source)->offset - += (srcSize - srcSelectSize); - } - - target->freeze(c, dstValue); - - if (target->match(c, dstMask) and not useTemporary) { - if (DebugMoves) { - char srcb[256]; - srcValue->source->toString(c, srcb, 256); - char dstb[256]; - target->toString(c, dstb, 256); - fprintf(stderr, - "move %s to %s for %p to %p\n", - srcb, - dstb, - srcValue, - dstValue); - } - - srcValue->source->freeze(c, srcValue); - - apply(c, - op, - min(srcSelectSize, dstSize), - srcValue->source, - srcValue->source, - dstSize, - target, - target); - - srcValue->source->thaw(c, srcValue); - } else { - // pick a temporary register which is valid as both a - // destination and a source for the moves we need to perform: - - dstValue->removeSite(c, target); - - bool thunk; - OperandMask src; - - c->arch->planSource(op, dstSize, src, dstSize, &thunk); - - if (isGeneralValue(srcValue)) { - src.lowRegisterMask &= c->regFile->generalRegisters; - } - - assertT(c, thunk == 0); - assertT(c, dstMask.typeMask & src.typeMask & lir::Operand::RegisterPairMask); - - Site* tmpTarget - = freeRegisterSite(c, dstMask.registerMask & src.lowRegisterMask); - - srcValue->source->freeze(c, srcValue); - - dstValue->addSite(c, tmpTarget); - - tmpTarget->freeze(c, dstValue); - - if (DebugMoves) { - char srcb[256]; - srcValue->source->toString(c, srcb, 256); - char dstb[256]; - tmpTarget->toString(c, dstb, 256); - fprintf(stderr, - "move %s to %s for %p to %p\n", - srcb, - dstb, - srcValue, - dstValue); - } - - apply(c, - op, - srcSelectSize, - srcValue->source, - srcValue->source, - dstSize, - tmpTarget, - tmpTarget); - - tmpTarget->thaw(c, dstValue); - - srcValue->source->thaw(c, srcValue); - - if (useTemporary or isStore) { - if (DebugMoves) { - char srcb[256]; - tmpTarget->toString(c, srcb, 256); - char dstb[256]; - target->toString(c, dstb, 256); - fprintf(stderr, - "move %s to %s for %p to %p\n", - srcb, - dstb, - srcValue, - dstValue); - } - - dstValue->addSite(c, target); - - tmpTarget->freeze(c, dstValue); - - apply(c, - lir::Move, - dstSize, - tmpTarget, - tmpTarget, - dstSize, - target, - target); - - tmpTarget->thaw(c, dstValue); - - if (isStore) { - dstValue->removeSite(c, tmpTarget); - } - } - } - - target->thaw(c, dstValue); - - if (addOffset) { - static_cast(srcValue->source)->offset - -= (srcSize - srcSelectSize); - } - } else { - target = srcValue->source; - - if (DebugMoves) { - char dstb[256]; - target->toString(c, dstb, 256); - fprintf( - stderr, "null move in %s for %p to %p\n", dstb, srcValue, dstValue); - } - } - - if (isStore) { - dstValue->removeSite(c, target); - } -} - -Site* pickMatchOrMove(Context* c, - Read* r, - Site* nextWord, - unsigned index, - bool intersectRead) -{ - Site* s = pickSite(c, r->value, nextWord, index, true); - SiteMask mask; - if (intersectRead) { - r->intersect(&mask); - } - if (s and s->match(c, mask)) { - return s; - } - - return pickSiteOrMove(c, - r->value, - mask.intersectionWith(nextWord->nextWordMask(c, index)), - true, - true); -} - -Site* pickSiteOrMove(Context* c, - Value* src, - Value* dst, - Site* nextWord, - unsigned index) -{ - if (live(c, dst)) { - Read* read = live(c, src); - Site* s; - if (nextWord) { - s = pickMatchOrMove(c, read, nextWord, index, false); - } else { - s = pickSourceSite(c, read, 0, 0, 0, false, true, true); - - if (s == 0 or s->isVolatile(c)) { - s = maybeMove(c, read, false, true); - } - } - assertT(c, s); - - addBuddy(src, dst); - - if (src->source->isVolatile(c)) { - src->removeSite(c, src->source); - } - - return s; - } else { - return 0; - } -} - -ConstantSite* findConstantSite(Context* c, Value* v); - -Site* getTarget(Context* c, - Value* value, - Value* result, - const SiteMask& resultMask); - -void freezeSource(Context* c, unsigned size, Value* v); - -void thawSource(Context* c, unsigned size, Value* v); - -void removeBuddy(Context* c, Value* v) -{ - if (v->buddy != v) { - if (DebugBuddies) { - fprintf(stderr, "remove buddy %p from", v); - for (Value* p = v->buddy; p != v; p = p->buddy) { - fprintf(stderr, " %p", p); - } - fprintf(stderr, "\n"); - } - - assertT(c, v->buddy); - - Value* next = v->buddy; - v->buddy = v; - Value* p = next; - while (p->buddy != v) - p = p->buddy; - p->buddy = next; - - assertT(c, p->buddy); - - if (not live(c, next)) { - next->clearSites(c); - } - - if (not live(c, v)) { - v->clearSites(c); - } - } -} - -Site* copy(Context* c, Site* s) -{ - Site* start = 0; - Site* end = 0; - for (; s; s = s->next) { - Site* n = s->copy(c); - if (end) { - end->next = n; - } else { - start = n; - } - end = n; - } - return start; -} - -class Snapshot { - public: - Snapshot(Context* c, Value* value, Snapshot* next) - : value(value), - buddy(value->buddy), - sites(copy(c, value->sites)), - next(next) - { - } - - Value* value; - Value* buddy; - Site* sites; - Snapshot* next; -}; - -Snapshot* snapshot(Context* c, Value* value, Snapshot* next) -{ - if (DebugControl) { - char buffer[256]; - sitesToString(c, value->sites, buffer, 256); - fprintf( - stderr, "snapshot %p buddy %p sites %s\n", value, value->buddy, buffer); - } - - return new (c->zone) Snapshot(c, value, next); -} - -Snapshot* makeSnapshots(Context* c, Value* value, Snapshot* next) -{ - next = snapshot(c, value, next); - for (Value* p = value->buddy; p != value; p = p->buddy) { - next = snapshot(c, p, next); - } - return next; -} - -Value* maybeBuddy(Context* c, Value* v); - -Value* pushWord(Context* c, Value* v) -{ - if (v) { - v = maybeBuddy(c, v); - } - - Stack* s = stack(c, v, c->stack); - - if (DebugFrame) { - fprintf(stderr, "push %p\n", v); - } - - if (v) { - v->home = frameIndex(c, s->index + c->localFootprint); - } - c->stack = s; - - return v; -} - -void push(Context* c, unsigned footprint, Value* v) -{ - assertT(c, footprint); - - bool bigEndian = c->arch->bigEndian(); - - Value* low = v; - - if (bigEndian) { - v = pushWord(c, v); - } - - Value* high; - if (footprint > 1) { - assertT(c, footprint == 2); - - if (TargetBytesPerWord == 4) { - low->maybeSplit(c); - high = pushWord(c, low->nextWord); - } else { - high = pushWord(c, 0); - } - } else { - high = 0; - } - - if (not bigEndian) { - v = pushWord(c, v); - } - - if (high) { - v->nextWord = high; - high->nextWord = v; - high->wordIndex = 1; - } -} - -void popWord(Context* c) -{ - Stack* s = c->stack; - assertT(c, s->value == 0 or s->value->home >= 0); - - if (DebugFrame) { - fprintf(stderr, "pop %p\n", s->value); - } - - c->stack = s->next; -} - -Value* pop(Context* c, unsigned footprint) -{ - assertT(c, footprint); - - Stack* s = 0; - - bool bigEndian = c->arch->bigEndian(); - - if (not bigEndian) { - s = c->stack; - } - - if (footprint > 1) { - assertT(c, footprint == 2); - -#ifndef NDEBUG - Stack* low; - Stack* high; - if (bigEndian) { - high = c->stack; - low = high->next; - } else { - low = c->stack; - high = low->next; - } - - assertT( - c, - (TargetBytesPerWord == 8 and low->value->nextWord == low->value - and high->value == 0) - or (TargetBytesPerWord == 4 and low->value->nextWord == high->value)); -#endif // not NDEBUG - - popWord(c); - } - - if (bigEndian) { - s = c->stack; - } - - popWord(c); - - return s->value; -} - -Value* storeLocal(Context* c, - unsigned footprint, - Value* v, - unsigned index, - bool copy) -{ - assertT(c, index + footprint <= c->localFootprint); - - if (copy) { - unsigned sizeInBytes = sizeof(Local) * c->localFootprint; - Local* newLocals = static_cast(c->zone->allocate(sizeInBytes)); - memcpy(newLocals, c->locals, sizeInBytes); - c->locals = newLocals; - } - - Value* high; - if (footprint > 1) { - assertT(c, footprint == 2); - - unsigned highIndex; - unsigned lowIndex; - if (c->arch->bigEndian()) { - highIndex = index + 1; - lowIndex = index; - } else { - lowIndex = index + 1; - highIndex = index; - } - - if (TargetBytesPerWord == 4) { - assertT(c, v->nextWord != v); - - high = storeLocal(c, 1, v->nextWord, highIndex, false); - } else { - high = 0; - } - - index = lowIndex; - } else { - high = 0; - } - - v = maybeBuddy(c, v); - - if (high != 0) { - v->nextWord = high; - high->nextWord = v; - high->wordIndex = 1; - } - - Local* local = c->locals + index; - local->value = v; - - if (DebugFrame) { - fprintf(stderr, "store local %p at %d\n", local->value, index); - } - - local->value->home = frameIndex(c, index); - - return v; -} - -unsigned typeFootprint(Context* c, ir::Type type) -{ - // TODO: this function is very Java-specific in nature. Generalize. - switch (type.flavor()) { - case ir::Type::Float: - case ir::Type::Integer: - return type.rawSize() / 4; - case ir::Type::Object: - case ir::Type::Address: - return 1; - case ir::Type::Void: - return 0; - default: - abort(c); - } -} - -Value* loadLocal(Context* c, ir::Type type, unsigned index) -{ - unsigned footprint = typeFootprint(c, type); - assertT(c, index + footprint <= c->localFootprint); - - if (footprint > 1) { - assertT(c, footprint == 2); - - if (not c->arch->bigEndian()) { - ++index; - } - } - - assertT(c, c->locals[index].value); - assertT(c, c->locals[index].value->home >= 0); - - if (DebugFrame) { - fprintf(stderr, "load local %p at %d\n", c->locals[index].value, index); - } - - return c->locals[index].value; -} - -Value* threadRegister(Context* c) -{ - Site* s = registerSite(c, c->arch->thread()); - return value(c, ir::Type::addr(), s, s); -} - -unsigned frameFootprint(Context* c, Stack* s) -{ - return c->localFootprint + (s ? (s->index + 1) : 0); -} - -void visit(Context* c, Link* link) -{ - if (false) { - fprintf(stderr, - "visit link from %d to %d fork %p junction %p\n", - link->predecessor->logicalInstruction->index, - link->successor->logicalInstruction->index, - link->forkState, - link->junctionState); - } - - ForkState* forkState = link->forkState; - if (forkState) { - for (unsigned i = 0; i < forkState->readCount; ++i) { - ForkElement* p = forkState->elements + i; - Value* v = p->value; - v->reads = p->read->nextTarget(); - if (false) { - fprintf(stderr, "next read %p for %p from %p\n", v->reads, v, p->read); - } - if (not live(c, v)) { - v->clearSites(c); - } - } - } - - JunctionState* junctionState = link->junctionState; - if (junctionState) { - for (unsigned i = 0; i < junctionState->frameFootprint; ++i) { - StubReadPair* p = junctionState->reads + i; - - if (p->value and p->value->reads) { - assertT(c, p->value->reads == p->read); - popRead(c, 0, p->value); - } - } - } -} - -class BuddyEvent : public Event { - public: - BuddyEvent(Context* c, Value* original, Value* buddy) - : Event(c), original(original), buddy(buddy) - { - this->addRead(c, original, SiteMask(~0, ~0, AnyFrameIndex), buddy); - } - - virtual const char* name() - { - return "BuddyEvent"; - } - - virtual void compile(Context* c) - { - if (DebugBuddies) { - fprintf(stderr, "original %p buddy %p\n", original, buddy); - } - - assertT(c, original->hasSite(c)); - - assertT(c, original); - assertT(c, buddy); - - addBuddy(original, buddy); - - popRead(c, this, original); - } - - Value* original; - Value* buddy; -}; - -void appendBuddy(Context* c, Value* original, Value* buddy) -{ - append(c, new (c->zone) BuddyEvent(c, original, buddy)); -} - -void append(Context* c, Event* e) -{ - LogicalInstruction* i = c->logicalCode[c->logicalIp]; - if (c->stack != i->stack or c->locals != i->locals) { - appendDummy(c); - } - - if (DebugAppend) { - fprintf(stderr, - " -- append %s at %d with %d stack before\n", - e->name(), - e->logicalInstruction->index, - c->stack ? c->stack->index + 1 : 0); - } - - if (c->lastEvent) { - c->lastEvent->next = e; - } else { - c->firstEvent = e; - } - c->lastEvent = e; - - Event* p = c->predecessor; - if (p) { - if (DebugAppend) { - fprintf(stderr, - "%d precedes %d\n", - p->logicalInstruction->index, - e->logicalInstruction->index); - } - - Link* link - = compiler::link(c, p, e->predecessors, e, p->successors, c->forkState); - e->predecessors = link; - p->successors = link; - } - c->forkState = 0; - - c->predecessor = e; - - if (e->logicalInstruction->firstEvent == 0) { - e->logicalInstruction->firstEvent = e; - } - e->logicalInstruction->lastEvent = e; -} - -Site* readSource(Context* c, Read* r) -{ - Value* v = r->value; - - if (DebugReads) { - char buffer[1024]; - sitesToString(c, v, buffer, 1024); - fprintf(stderr, "read source for %p from %s\n", v, buffer); - } - - if (not v->hasSite(c)) { - if (DebugReads) { - fprintf(stderr, "no sites found for %p\n", v); - } - return 0; - } - - Value* high = r->high(c); - if (high) { - return pickMatchOrMove(c, r, high->source, 0, true); - } else { - return pickSiteOrMove(c, r, true, true); - } -} - -void propagateJunctionSites(Context* c, Event* e, Site** sites) -{ - for (Link* pl = e->predecessors; pl; pl = pl->nextPredecessor) { - Event* p = pl->predecessor; - if (p->junctionSites == 0) { - p->junctionSites = sites; - for (Link* sl = p->successors; sl; sl = sl->nextSuccessor) { - Event* s = sl->successor; - propagateJunctionSites(c, s, sites); - } - } - } -} - -void propagateJunctionSites(Context* c, Event* e) -{ - for (Link* sl = e->successors; sl; sl = sl->nextSuccessor) { - Event* s = sl->successor; - if (s->predecessors->nextPredecessor) { - unsigned size = sizeof(Site*) * frameFootprint(c, e->stackAfter); - Site** junctionSites = static_cast(c->zone->allocate(size)); - memset(junctionSites, 0, size); - - propagateJunctionSites(c, s, junctionSites); - break; - } - } -} - -class SiteRecord { - public: - Site* site; - Value* value; -}; - -void init(SiteRecord* r, Site* s, Value* v) -{ - r->site = s; - r->value = v; -} - -class SiteRecordList { - public: - SiteRecordList(SiteRecord* records, unsigned capacity) - : records(records), index(0), capacity(capacity) - { - } - - SiteRecord* records; - unsigned index; - unsigned capacity; -}; - -void freeze(Context* c, SiteRecordList* frozen, Site* s, Value* v) -{ - assertT(c, frozen->index < frozen->capacity); - - s->freeze(c, v); - init(new (frozen->records + (frozen->index++)) SiteRecord, s, v); -} - -void thaw(Context* c, SiteRecordList* frozen) -{ - while (frozen->index) { - SiteRecord* sr = frozen->records + (--frozen->index); - sr->site->thaw(c, sr->value); - } -} - -bool resolveOriginalSites(Context* c, - Event* e, - SiteRecordList* frozen, - Site** sites) -{ - bool complete = true; - for (FrameIterator it(c, e->stackAfter, e->localsAfter, true); - it.hasMore();) { - FrameIterator::Element el = it.next(c); - Value* v = el.value; - Read* r = v ? live(c, v) : 0; - Site* s = sites[el.localIndex]; - - if (r) { - if (s) { - if (DebugControl) { - char buffer[256]; - s->toString(c, buffer, 256); - fprintf(stderr, - "resolve original %s for %p local %d frame %d\n", - buffer, - v, - el.localIndex, - el.frameIndex(c)); - } - - Site* target = pickSiteOrMove( - c, v, s->mask(c), true, true, ResolveRegisterReserveCount); - - freeze(c, frozen, target, v); - } else { - complete = false; - } - } else if (s) { - if (DebugControl) { - char buffer[256]; - s->toString(c, buffer, 256); - fprintf(stderr, - "freeze original %s for %p local %d frame %d\n", - buffer, - v, - el.localIndex, - el.frameIndex(c)); - } - - Value dummy(0, 0, ir::Type::addr()); - dummy.addSite(c, s); - dummy.removeSite(c, s); - freeze(c, frozen, s, 0); - } - } - - return complete; -} - -bool resolveSourceSites(Context* c, - Event* e, - SiteRecordList* frozen, - Site** sites) -{ - bool complete = true; - for (FrameIterator it(c, e->stackAfter, e->localsAfter); it.hasMore();) { - FrameIterator::Element el = it.next(c); - Value* v = el.value; - Read* r = live(c, v); - - if (r and sites[el.localIndex] == 0) { - SiteMask mask(lir::Operand::RegisterPairMask | lir::Operand::MemoryMask, - c->regFile->generalRegisters, - AnyFrameIndex); - - Site* s = pickSourceSite( - c, r, 0, 0, &mask, true, false, true, acceptForResolve); - - if (s) { - if (DebugControl) { - char buffer[256]; - s->toString(c, buffer, 256); - fprintf(stderr, - "resolve source %s from %p local %d frame %d\n", - buffer, - v, - el.localIndex, - el.frameIndex(c)); - } - - freeze(c, frozen, s, v); - - sites[el.localIndex] = s->copy(c); - } else { - complete = false; - } - } - } - - return complete; -} - -void resolveTargetSites(Context* c, - Event* e, - SiteRecordList* frozen, - Site** sites) -{ - for (FrameIterator it(c, e->stackAfter, e->localsAfter); it.hasMore();) { - FrameIterator::Element el = it.next(c); - Value* v = el.value; - Read* r = live(c, v); - - if (r and sites[el.localIndex] == 0) { - SiteMask mask(lir::Operand::RegisterPairMask | lir::Operand::MemoryMask, - c->regFile->generalRegisters, - AnyFrameIndex); - - Site* s = pickSourceSite( - c, r, 0, 0, &mask, false, true, true, acceptForResolve); - - if (s == 0) { - s = maybeMove(c, v, mask, false, true, ResolveRegisterReserveCount); - } - - freeze(c, frozen, s, v); - - sites[el.localIndex] = s->copy(c); - - if (DebugControl) { - char buffer[256]; - sites[el.localIndex]->toString(c, buffer, 256); - fprintf(stderr, - "resolve target %s for %p local %d frame %d\n", - buffer, - el.value, - el.localIndex, - el.frameIndex(c)); - } - } - } -} - -void resolveJunctionSites(Context* c, Event* e, SiteRecordList* frozen) -{ - bool complete; - if (e->junctionSites) { - complete = resolveOriginalSites(c, e, frozen, e->junctionSites); - } else { - propagateJunctionSites(c, e); - complete = false; - } - - if (e->junctionSites) { - if (not complete) { - complete = resolveSourceSites(c, e, frozen, e->junctionSites); - if (not complete) { - resolveTargetSites(c, e, frozen, e->junctionSites); - } - } - - if (DebugControl) { - fprintf(stderr, - "resolved junction sites %p at %d\n", - e->junctionSites, - e->logicalInstruction->index); - } - } -} - -void resolveBranchSites(Context* c, Event* e, SiteRecordList* frozen) -{ - if (e->successors->nextSuccessor and e->junctionSites == 0) { - unsigned footprint = frameFootprint(c, e->stackAfter); - RUNTIME_ARRAY(Site*, branchSites, footprint); - memset(RUNTIME_ARRAY_BODY(branchSites), 0, sizeof(Site*) * footprint); - - if (not resolveSourceSites(c, e, frozen, RUNTIME_ARRAY_BODY(branchSites))) { - resolveTargetSites(c, e, frozen, RUNTIME_ARRAY_BODY(branchSites)); - } - } -} - -void captureBranchSnapshots(Context* c, Event* e) -{ - if (e->successors->nextSuccessor) { - for (FrameIterator it(c, e->stackAfter, e->localsAfter); it.hasMore();) { - FrameIterator::Element el = it.next(c); - e->snapshots = makeSnapshots(c, el.value, e->snapshots); - } - - for (List* sv = e->successors->forkState->saved; sv; - sv = sv->next) { - e->snapshots = makeSnapshots(c, sv->item, e->snapshots); - } - - if (DebugControl) { - fprintf(stderr, - "captured snapshots %p at %d\n", - e->snapshots, - e->logicalInstruction->index); - } - } -} - -void populateSiteTables(Context* c, Event* e, SiteRecordList* frozen) -{ - resolveJunctionSites(c, e, frozen); - - resolveBranchSites(c, e, frozen); -} - -void setSites(Context* c, Value* v, Site* s) -{ - assertT(c, live(c, v)); - - for (; s; s = s->next) { - v->addSite(c, s->copy(c)); - } - - if (DebugControl) { - char buffer[256]; - sitesToString(c, v->sites, buffer, 256); - fprintf(stderr, "set sites %s for %p\n", buffer, v); - } -} - -void resetFrame(Context* c, Event* e) -{ - for (FrameIterator it(c, e->stackBefore, e->localsBefore); it.hasMore();) { - FrameIterator::Element el = it.next(c); - el.value->clearSites(c); - } - - while (c->acquiredResources) { - c->acquiredResources->value->clearSites(c); - } -} - -void setSites(Context* c, Event* e, Site** sites) -{ - resetFrame(c, e); - - for (FrameIterator it(c, e->stackBefore, e->localsBefore); it.hasMore();) { - FrameIterator::Element el = it.next(c); - if (sites[el.localIndex]) { - if (live(c, el.value)) { - setSites(c, el.value, sites[el.localIndex]); - } else if (DebugControl) { - char buffer[256]; - sitesToString(c, sites[el.localIndex], buffer, 256); - fprintf(stderr, - "skip sites %s for %p local %d frame %d\n", - buffer, - el.value, - el.localIndex, - el.frameIndex(c)); - } - } else if (DebugControl) { - fprintf(stderr, - "no sites for %p local %d frame %d\n", - el.value, - el.localIndex, - el.frameIndex(c)); - } - } -} - -void removeBuddies(Context* c) -{ - for (FrameIterator it(c, c->stack, c->locals); it.hasMore();) { - FrameIterator::Element el = it.next(c); - removeBuddy(c, el.value); - } -} - -void restore(Context* c, Event* e, Snapshot* snapshots) -{ - for (Snapshot* s = snapshots; s; s = s->next) { - Value* v = s->value; - Value* next = v->buddy; - if (v != next) { - v->buddy = v; - Value* p = next; - while (p->buddy != v) - p = p->buddy; - p->buddy = next; - } - } - - for (Snapshot* s = snapshots; s; s = s->next) { - assertT(c, s->buddy); - - s->value->buddy = s->buddy; - } - - resetFrame(c, e); - - for (Snapshot* s = snapshots; s; s = s->next) { - if (live(c, s->value)) { - if (live(c, s->value) and s->sites and s->value->sites == 0) { - setSites(c, s->value, s->sites); - } - } - - if (false) { - char buffer[256]; - sitesToString(c, s->sites, buffer, 256); - fprintf(stderr, - "restore %p buddy %p sites %s live %p\n", - s->value, - s->value->buddy, - buffer, - live(c, s->value)); - } - } -} - -void populateSources(Context* c, Event* e) -{ - RUNTIME_ARRAY(SiteRecord, frozenRecords, e->readCount); - SiteRecordList frozen(RUNTIME_ARRAY_BODY(frozenRecords), e->readCount); - - for (Read* r = e->reads; r; r = r->eventNext) { - r->value->source = readSource(c, r); - if (r->value->source) { - if (DebugReads) { - char buffer[256]; - r->value->source->toString(c, buffer, 256); - fprintf(stderr, "freeze source %s for %p\n", buffer, r->value); - } - - freeze(c, &frozen, r->value->source, r->value); - } - } - - thaw(c, &frozen); -} - -void setStubRead(Context* c, StubReadPair* p, Value* v) -{ - if (v) { - StubRead* r = stubRead(c); - if (DebugReads) { - fprintf(stderr, "add stub read %p to %p\n", r, v); - } - finishAddRead(c, v, r); - - p->value = v; - p->read = r; - } -} - -void populateJunctionReads(Context* c, Link* link) -{ - JunctionState* state = new ( - c->zone->allocate(sizeof(JunctionState) - + (sizeof(StubReadPair) * frameFootprint(c, c->stack)))) - JunctionState(frameFootprint(c, c->stack)); - - memset(state->reads, 0, sizeof(StubReadPair) * frameFootprint(c, c->stack)); - - link->junctionState = state; - - for (FrameIterator it(c, c->stack, c->locals); it.hasMore();) { - FrameIterator::Element e = it.next(c); - setStubRead(c, state->reads + e.localIndex, e.value); - } -} - -void updateJunctionReads(Context* c, JunctionState* state) -{ - for (FrameIterator it(c, c->stack, c->locals); it.hasMore();) { - FrameIterator::Element e = it.next(c); - StubReadPair* p = state->reads + e.localIndex; - if (p->value and p->read->read == 0) { - Read* r = live(c, e.value); - if (r) { - if (DebugReads) { - fprintf( - stderr, "stub read %p for %p valid: %p\n", p->read, p->value, r); - } - p->read->read = r; - } - } - } - - for (unsigned i = 0; i < frameFootprint(c, c->stack); ++i) { - StubReadPair* p = state->reads + i; - if (p->value and p->read->read == 0) { - if (DebugReads) { - fprintf(stderr, "stub read %p for %p invalid\n", p->read, p->value); - } - p->read->valid_ = false; - } - } -} - -void compile(Context* c, - uintptr_t stackOverflowHandler, - unsigned stackLimitOffset) -{ - if (c->logicalCode[c->logicalIp]->lastEvent == 0) { - appendDummy(c); - } - - Assembler* a = c->assembler; - - Block* firstBlock = block(c, c->firstEvent); - Block* block = firstBlock; - - if (stackOverflowHandler) { - a->checkStackOverflow(stackOverflowHandler, stackLimitOffset); - } - - a->allocateFrame(c->alignedFrameSize); - - for (Event* e = c->firstEvent; e; e = e->next) { - if (DebugCompile) { - fprintf(stderr, - " -- compile %s at %d with %d preds %d succs %d stack\n", - e->name(), - e->logicalInstruction->index, - e->predecessors->countPredecessors(), - e->successors->countSuccessors(), - e->stackBefore ? e->stackBefore->index + 1 : 0); - } - - e->block = block; - - c->stack = e->stackBefore; - c->locals = e->localsBefore; - - if (e->logicalInstruction->machineOffset == 0) { - e->logicalInstruction->machineOffset = a->offset(); - } - - if (e->predecessors) { - visit(c, e->predecessors->lastPredecessor()); - - Event* first = e->predecessors->predecessor; - if (e->predecessors->nextPredecessor) { - for (Link* pl = e->predecessors; pl->nextPredecessor; - pl = pl->nextPredecessor) { - updateJunctionReads(c, pl->junctionState); - } - - if (DebugControl) { - fprintf(stderr, - "set sites to junction sites %p at %d\n", - first->junctionSites, - first->logicalInstruction->index); - } - - setSites(c, e, first->junctionSites); - removeBuddies(c); - } else if (first->successors->nextSuccessor) { - if (DebugControl) { - fprintf(stderr, - "restore snapshots %p at %d\n", - first->snapshots, - first->logicalInstruction->index); - } - - restore(c, e, first->snapshots); - } - } - - unsigned footprint = frameFootprint(c, e->stackAfter); - RUNTIME_ARRAY(SiteRecord, frozenRecords, footprint); - SiteRecordList frozen(RUNTIME_ARRAY_BODY(frozenRecords), footprint); - - bool branch = e->isBranch(); - if (branch and e->successors) { - populateSiteTables(c, e, &frozen); - } - - populateSources(c, e); - - if (branch and e->successors) { - captureBranchSnapshots(c, e); - } - - thaw(c, &frozen); - - e->compile(c); - - if ((not branch) and e->successors) { - populateSiteTables(c, e, &frozen); - captureBranchSnapshots(c, e); - thaw(c, &frozen); - } - - if (e->visitLinks) { - for (List* cell = reverseDestroy(e->visitLinks); cell; - cell = cell->next) { - visit(c, cell->item); - } - e->visitLinks = 0; - } - - for (CodePromise* p = e->promises; p; p = p->next) { - p->offset = a->offset(); - } - - a->endEvent(); - - LogicalInstruction* nextInstruction = e->logicalInstruction->next(c); - if (e->next == 0 or (e->next->logicalInstruction != e->logicalInstruction - and (e->next->logicalInstruction != nextInstruction - or e != e->logicalInstruction->lastEvent))) { - Block* b = e->logicalInstruction->firstEvent->block; - - while (b->nextBlock) { - b = b->nextBlock; - } - - if (b != block) { - b->nextBlock = block; - } - - block->nextInstruction = nextInstruction; - block->assemblerBlock = a->endBlock(e->next != 0); - - if (e->next) { - block = compiler::block(c, e->next); - } - } - } - - c->firstBlock = firstBlock; -} - -void restore(Context* c, ForkState* state) -{ - for (unsigned i = 0; i < state->readCount; ++i) { - ForkElement* p = state->elements + i; - p->value->lastRead = p->read; - p->read->allocateTarget(c); - } -} - -void addForkElement(Context* c, Value* v, ForkState* state, unsigned index) -{ - MultiRead* r = multiRead(c); - if (DebugReads) { - fprintf(stderr, "add multi read %p to %p\n", r, v); - } - finishAddRead(c, v, r); - - ForkElement* p = state->elements + index; - p->value = v; - p->read = r; -} - -ForkState* saveState(Context* c) -{ - if (c->logicalCode[c->logicalIp]->lastEvent == 0) { - appendDummy(c); - } - - unsigned elementCount = frameFootprint(c, c->stack) + c->saved->count(); - - ForkState* state = new (c->zone->allocate( - sizeof(ForkState) + (sizeof(ForkElement) * elementCount))) - ForkState(c->stack, c->locals, c->saved, c->predecessor, c->logicalIp); - - if (c->predecessor) { - c->forkState = state; - - unsigned count = 0; - - for (FrameIterator it(c, c->stack, c->locals); it.hasMore();) { - FrameIterator::Element e = it.next(c); - addForkElement(c, e.value, state, count++); - } - - for (List* sv = c->saved; sv; sv = sv->next) { - addForkElement(c, sv->item, state, count++); - } - - state->readCount = count; - } - - c->saved = 0; - - return state; -} - -void restoreState(Context* c, ForkState* s) -{ - if (c->logicalCode[c->logicalIp]->lastEvent == 0) { - appendDummy(c); - } - - c->stack = s->stack; - c->locals = s->locals; - c->predecessor = s->predecessor; - c->logicalIp = s->logicalIp; - - if (c->predecessor) { - c->forkState = s; - restore(c, s); - } -} - -Value* maybeBuddy(Context* c, Value* v) -{ - if (v->home >= 0) { - Value* n = value(c, v->type); - appendBuddy(c, v, n); - return n; - } else { - return v; - } -} - -void linkLocals(Context* c, Local* oldLocals, Local* newLocals) -{ - for (int i = 0; i < static_cast(c->localFootprint); ++i) { - Local* local = oldLocals + i; - if (local->value) { - int highOffset = c->arch->bigEndian() ? 1 : -1; - - if (i + highOffset >= 0 - and i + highOffset < static_cast(c->localFootprint) - and local->value->nextWord == local[highOffset].value) { - Value* v = newLocals[i].value; - Value* next = newLocals[i + highOffset].value; - v->nextWord = next; - next->nextWord = v; - next->wordIndex = 1; - } - } - } -} - -class Client : public Assembler::Client { - public: - Client(Context* c) : c(c) - { - } - - virtual Register acquireTemporary(RegisterMask mask) - { - unsigned cost; - Register r = pickRegisterTarget(c, 0, mask, &cost); - expect(c, cost < Target::Impossible); - save(r); - c->registerResources[r.index()].increment(c); - return r; - } - - virtual void releaseTemporary(Register r) - { - c->registerResources[r.index()].decrement(c); - } - - virtual void save(Register r) - { - RegisterResource* reg = c->registerResources + r.index(); - - assertT(c, reg->referenceCount == 0); - assertT(c, reg->freezeCount == 0); - assertT(c, not reg->reserved); - - if (reg->value) { - steal(c, reg, 0); - } - } - - Context* c; -}; - -class MyCompiler : public Compiler { - public: - MyCompiler(System* s, - Assembler* assembler, - Zone* zone, - Compiler::Client* compilerClient) - : c(s, assembler, zone, compilerClient), client(&c) - { - assembler->setClient(&client); - } - - virtual State* saveState() - { - State* s = compiler::saveState(&c); - restoreState(s); - return s; - } - - virtual void restoreState(State* state) - { - compiler::restoreState(&c, static_cast(state)); - } - - virtual void init(unsigned logicalCodeLength, - unsigned parameterFootprint, - unsigned localFootprint, - unsigned alignedFrameSize) - { - c.parameterFootprint = parameterFootprint; - c.localFootprint = localFootprint; - c.alignedFrameSize = alignedFrameSize; - - unsigned frameResourceCount = totalFrameSize(&c); - - c.frameResources = static_cast( - c.zone->allocate(sizeof(FrameResource) * frameResourceCount)); - - for (unsigned i = 0; i < frameResourceCount; ++i) { - new (c.frameResources + i) FrameResource; - } - - unsigned base = frameBase(&c); - c.frameResources[base + c.arch->returnAddressOffset()].reserved = true; - c.frameResources[base + c.arch->framePointerOffset()].reserved - = UseFramePointer; - - c.logicalCode.init(c.zone, logicalCodeLength); - - c.logicalCode[-1] = new (c.zone) LogicalInstruction(-1, c.stack, c.locals); - - c.locals - = static_cast(c.zone->allocate(sizeof(Local) * localFootprint)); - - memset(c.locals, 0, sizeof(Local) * localFootprint); - } - - virtual void extendLogicalCode(unsigned more) - { - c.logicalCode.extend(c.zone, more); - } - - virtual void visitLogicalIp(unsigned logicalIp) - { - assertT(&c, logicalIp < c.logicalCode.count()); - - if (c.logicalCode[c.logicalIp]->lastEvent == 0) { - appendDummy(&c); - } - - Event* e = c.logicalCode[logicalIp]->firstEvent; - - Event* p = c.predecessor; - if (p) { - if (DebugAppend) { - fprintf(stderr, - "visit %d pred %d\n", - logicalIp, - p->logicalInstruction->index); - } - - p->stackAfter = c.stack; - p->localsAfter = c.locals; - - Link* link = compiler::link( - &c, p, e->predecessors, e, p->successors, c.forkState); - e->predecessors = link; - p->successors = link; - c.lastEvent->visitLinks = cons(&c, link, c.lastEvent->visitLinks); - - if (DebugAppend) { - fprintf(stderr, - "populate junction reads for %d to %d\n", - p->logicalInstruction->index, - logicalIp); - } - - populateJunctionReads(&c, link); - } - - c.forkState = 0; - } - - virtual void startLogicalIp(unsigned logicalIp) - { - assertT(&c, logicalIp < c.logicalCode.count()); - assertT(&c, c.logicalCode[logicalIp] == 0); - - if (c.logicalCode[c.logicalIp]->lastEvent == 0) { - appendDummy(&c); - } - - Event* p = c.predecessor; - if (p) { - p->stackAfter = c.stack; - p->localsAfter = c.locals; - } - - c.logicalCode[logicalIp] = new (c.zone) - LogicalInstruction(logicalIp, c.stack, c.locals); - - c.logicalIp = logicalIp; - } - - virtual Promise* machineIp(unsigned logicalIp) - { - return ipPromise(&c, logicalIp); - } - - virtual Promise* poolAppend(intptr_t value) - { - return poolAppendPromise(resolvedPromise(&c, value)); - } - - virtual Promise* poolAppendPromise(Promise* value) - { - Promise* p = poolPromise(&c, c.constantCount); - - ConstantPoolNode* constant = new (c.zone) ConstantPoolNode(value); - - if (c.firstConstant) { - c.lastConstant->next = constant; - } else { - c.firstConstant = constant; - } - c.lastConstant = constant; - ++c.constantCount; - - return p; - } - - virtual ir::Value* constant(int64_t value, ir::Type type) - { - return promiseConstant(resolvedPromise(&c, value), type); - } - - virtual ir::Value* promiseConstant(Promise* value, ir::Type type) - { - return compiler::value(&c, type, compiler::constantSite(&c, value)); - } - - virtual ir::Value* address(ir::Type type, Promise* address) - { - return value(&c, type, compiler::addressSite(&c, address)); - } - - virtual ir::Value* memory(ir::Value* base, - ir::Type type, - int displacement = 0, - ir::Value* index = 0) - { - Value* result = value(&c, type); - - appendMemory(&c, - static_cast(base), - displacement, - static_cast(index), - index == 0 ? 1 : type.size(c.targetInfo), - result); - - return result; - } - - virtual ir::Value* threadRegister() - { - return compiler::threadRegister(&c); - } - - Promise* machineIp() - { - return c.logicalCode[c.logicalIp]->lastEvent->makeCodePromise(&c); - } - - virtual void push(ir::Type type, ir::Value* value) - { - // TODO: once type information is flowed properly, enable this assertT. - // Some time later, we can remove the parameter. - // assertT(&c, value->type == type); - compiler::push(&c, typeFootprint(&c, type), static_cast(value)); - } - - virtual void save(ir::Type type, ir::Value* value) - { - // TODO: once type information is flowed properly, enable this assertT. - // Some time later, we can remove the parameter. - // assertT(&c, value->type == type); - unsigned footprint = typeFootprint(&c, type); - c.saved = cons(&c, static_cast(value), c.saved); - if (TargetBytesPerWord == 4 and footprint > 1) { - assertT(&c, footprint == 2); - assertT(&c, static_cast(value)->nextWord); - - save(ir::Type::i4(), static_cast(value)->nextWord); - } - } - - virtual ir::Value* pop(ir::Type type) - { - ir::Value* value = compiler::pop(&c, typeFootprint(&c, type)); - // TODO: once type information is flowed properly, enable this assertT. - // Some time later, we can remove the parameter. - // assertT(&c, static_cast(value)->type == type); - return value; - } - - virtual void pushed(ir::Type type) - { - Value* v = value(&c, type); - appendFrameSite( - &c, - v, - frameIndex(&c, (c.stack ? c.stack->index : 0) + c.localFootprint)); - - Stack* s = compiler::stack(&c, v, c.stack); - v->home = frameIndex(&c, s->index + c.localFootprint); - c.stack = s; - } - - virtual void popped(unsigned footprint) - { - for (; footprint; --footprint) { - assertT(&c, c.stack->value == 0 or c.stack->value->home >= 0); - - if (DebugFrame) { - fprintf(stderr, "popped %p\n", c.stack->value); - } - - c.stack = c.stack->next; - } - } - - virtual unsigned topOfStack() - { - return c.stack->index; - } - - virtual ir::Value* peek(unsigned footprint, unsigned index) - { - Stack* s = c.stack; - for (unsigned i = index; i > 0; --i) { - s = s->next; - } - - if (footprint > 1) { - assertT(&c, footprint == 2); - - bool bigEndian = c.arch->bigEndian(); - -#ifndef NDEBUG - Stack* low; - Stack* high; - if (bigEndian) { - high = s; - low = s->next; - } else { - low = s; - high = s->next; - } - - assertT( - &c, - (TargetBytesPerWord == 8 and low->value->nextWord == low->value - and high->value == 0) - or (TargetBytesPerWord == 4 and low->value->nextWord == high->value)); -#endif // not NDEBUG - - if (bigEndian) { - s = s->next; - } - } - - return s->value; - } - - virtual ir::Value* nativeCall(ir::Value* address, - unsigned flags, - TraceHandler* traceHandler, - ir::Type resultType, - util::Slice arguments) - { - bool bigEndian = c.arch->bigEndian(); - - unsigned footprint = 0; - unsigned size = TargetBytesPerWord; - RUNTIME_ARRAY(ir::Value*, args, arguments.count); - int index = 0; - for (unsigned i = 0; i < arguments.count; ++i) { - Value* o = static_cast(arguments[i]); - if (o) { - if (bigEndian and size > TargetBytesPerWord) { - RUNTIME_ARRAY_BODY(args)[index++] = o->nextWord; - } - RUNTIME_ARRAY_BODY(args)[index] = o; - if ((not bigEndian) and size > TargetBytesPerWord) { - RUNTIME_ARRAY_BODY(args)[++index] = o->nextWord; - } - size = TargetBytesPerWord; - ++index; - } else { - size = 8; - } - ++footprint; - } - - Value* result = value(&c, resultType); - appendCall(&c, - static_cast(address), - ir::CallingConvention::Native, - flags, - traceHandler, - result, - util::Slice(RUNTIME_ARRAY_BODY(args), index)); - - return result; - } - - virtual ir::Value* stackCall(ir::Value* address, - unsigned flags, - TraceHandler* traceHandler, - ir::Type resultType, - Slice arguments) - { - Value* result = value(&c, resultType); - Stack* b UNUSED = c.stack; - appendCall(&c, - static_cast(address), - ir::CallingConvention::Avian, - flags, - traceHandler, - result, - arguments); - assertT(&c, c.stack == b); - return result; - } - - virtual void return_(ir::Value* a) - { - assertT(&c, a); - appendReturn(&c, static_cast(a)); - } - - virtual void return_() - { - appendReturn(&c, 0); - } - - void initLocalPart(unsigned index, ir::Type type) - { - Value* v = value(&c, type); - - if (DebugFrame) { - fprintf(stderr, - "init local %p at %d (%d)\n", - v, - index, - frameIndex(&c, index)); - } - - appendFrameSite(&c, v, frameIndex(&c, index)); - - Local* local = c.locals + index; - local->value = v; - v->home = frameIndex(&c, index); - } - - virtual void initLocal(unsigned index, ir::Type type) - { - unsigned footprint = typeFootprint(&c, type); - - assertT(&c, index + footprint <= c.localFootprint); - - Value* v = value(&c, type); - - if (footprint > 1) { - assertT(&c, footprint == 2); - - unsigned highIndex; - unsigned lowIndex; - if (c.arch->bigEndian()) { - highIndex = index + 1; - lowIndex = index; - } else { - lowIndex = index + 1; - highIndex = index; - } - - if (TargetBytesPerWord == 4) { - initLocalPart(highIndex, type); - Value* next = c.locals[highIndex].value; - v->nextWord = next; - next->nextWord = v; - next->wordIndex = 1; - } - - index = lowIndex; - } - - if (DebugFrame) { - fprintf(stderr, - "init local %p at %d (%d)\n", - v, - index, - frameIndex(&c, index)); - } - - appendFrameSite(&c, v, frameIndex(&c, index)); - - Local* local = c.locals + index; - local->value = v; - v->home = frameIndex(&c, index); - } - - virtual void initLocalsFromLogicalIp(unsigned logicalIp) - { - assertT(&c, logicalIp < c.logicalCode.count()); - - unsigned footprint = sizeof(Local) * c.localFootprint; - Local* newLocals = static_cast(c.zone->allocate(footprint)); - memset(newLocals, 0, footprint); - c.locals = newLocals; - - Event* e = c.logicalCode[logicalIp]->firstEvent; - for (int i = 0; i < static_cast(c.localFootprint); ++i) { - Local* local = e->locals() + i; - if (local->value) { - initLocalPart(i, local->value->type); - } - } - - linkLocals(&c, e->locals(), newLocals); - } - - virtual void storeLocal(ir::Value* src, unsigned index) - { - compiler::storeLocal(&c, - typeFootprint(&c, src->type), - static_cast(src), - index, - true); - } - - virtual ir::Value* loadLocal(ir::Type type, unsigned index) - { - return compiler::loadLocal(&c, type, index); - } - - virtual void saveLocals() - { - int oldIp UNUSED = c.logicalIp; - appendSaveLocals(&c); - assertT(&c, oldIp == c.logicalIp); - } - - virtual void checkBounds(ir::Value* object, - unsigned lengthOffset, - ir::Value* index, - intptr_t handler) - { - appendBoundsCheck(&c, - static_cast(object), - lengthOffset, - static_cast(index), - handler); - } - - virtual ir::Value* truncate(ir::Type type, ir::Value* src) - { - assertT(&c, src->type.flavor() == type.flavor()); - assertT(&c, type.flavor() != ir::Type::Float); - assertT(&c, type.rawSize() < src->type.rawSize()); - Value* dst = value(&c, type); - appendMove(&c, - lir::Move, - src->type.size(c.targetInfo), - src->type.size(c.targetInfo), - static_cast(src), - type.size(c.targetInfo), - dst); - return dst; - } - - virtual ir::Value* truncateThenExtend(ir::ExtendMode extendMode, - ir::Type extendType, - ir::Type truncateType, - ir::Value* src) - { - Value* dst = value(&c, extendType); - appendMove(&c, - extendMode == ir::ExtendMode::Signed ? lir::Move : lir::MoveZ, - TargetBytesPerWord, - truncateType.size(c.targetInfo), - static_cast(src), - extendType.size(c.targetInfo) < TargetBytesPerWord - ? TargetBytesPerWord - : extendType.size(c.targetInfo), - dst); - return dst; - } - - virtual void store(ir::Value* src, ir::Value* dst) - { - assertT(&c, src->type.flavor() == dst->type.flavor()); - - appendMove(&c, - lir::Move, - src->type.size(c.targetInfo), - src->type.size(c.targetInfo), - static_cast(src), - dst->type.size(c.targetInfo), - static_cast(dst)); - } - - virtual ir::Value* load(ir::ExtendMode extendMode, - ir::Value* src, - ir::Type dstType) - { - assertT(&c, src->type.flavor() == dstType.flavor()); - - Value* dst = value(&c, dstType); - appendMove(&c, - extendMode == ir::ExtendMode::Signed ? lir::Move : lir::MoveZ, - src->type.size(c.targetInfo), - src->type.size(c.targetInfo), - static_cast(src), - dstType.size(c.targetInfo) < TargetBytesPerWord - ? TargetBytesPerWord - : dstType.size(c.targetInfo), - dst); - return dst; - } - - virtual void condJump(lir::TernaryOperation op, - ir::Value* a, - ir::Value* b, - ir::Value* addr) - { - assertT(&c, - (isGeneralBranch(op) and isGeneralValue(a) and isGeneralValue(b)) - or (isFloatBranch(op) and isFloatValue(a) and isFloatValue(b))); - - assertT(&c, a->type == b->type); - assertT(&c, addr->type == ir::Type::iptr()); - - appendBranch(&c, - op, - static_cast(a), - static_cast(b), - static_cast(addr)); - } - - virtual void jmp(ir::Value* addr) - { - appendJump(&c, lir::Jump, static_cast(addr)); - } - - virtual void exit(ir::Value* addr) - { - appendJump(&c, lir::Jump, static_cast(addr), true); - } - - virtual ir::Value* binaryOp(lir::TernaryOperation op, - ir::Type type, - ir::Value* a, - ir::Value* b) - { - assertT(&c, - (isGeneralBinaryOp(op) and isGeneralValue(a) and isGeneralValue(b)) - or (isFloatBinaryOp(op) and isFloatValue(a) and isFloatValue(b))); - - Value* result = value(&c, type); - - appendCombine( - &c, op, static_cast(a), static_cast(b), result); - return result; - } - - virtual ir::Value* unaryOp(lir::BinaryOperation op, ir::Value* a) - { - assertT(&c, - (isGeneralUnaryOp(op) and isGeneralValue(a)) - or (isFloatUnaryOp(op) and isFloatValue(a))); - Value* result = value(&c, a->type); - appendTranslate(&c, op, static_cast(a), result); - return result; - } - - virtual ir::Value* f2f(ir::Type resType, ir::Value* a) - { - assertT(&c, isFloatValue(a)); - assertT(&c, resType.flavor() == ir::Type::Float); - Value* result = value(&c, resType); - appendTranslate(&c, lir::Float2Float, static_cast(a), result); - return result; - } - - virtual ir::Value* f2i(ir::Type resType, ir::Value* a) - { - assertT(&c, isFloatValue(a)); - assertT(&c, resType.flavor() != ir::Type::Float); - Value* result = value(&c, resType); - appendTranslate(&c, lir::Float2Int, static_cast(a), result); - return result; - } - - virtual ir::Value* i2f(ir::Type resType, ir::Value* a) - { - assertT(&c, isGeneralValue(a)); - assertT(&c, resType.flavor() == ir::Type::Float); - Value* result = value(&c, resType); - appendTranslate(&c, lir::Int2Float, static_cast(a), result); - return result; - } - - virtual void nullaryOp(lir::Operation op) - { - appendOperation(&c, op); - } - - virtual void compile(uintptr_t stackOverflowHandler, - unsigned stackLimitOffset) - { - compiler::compile(&c, stackOverflowHandler, stackLimitOffset); - } - - virtual unsigned resolve(uint8_t* dst) - { - c.machineCode = dst; - c.assembler->setDestination(dst); - - Block* block = c.firstBlock; - while (block->nextBlock or block->nextInstruction) { - Block* next = block->nextBlock - ? block->nextBlock - : block->nextInstruction->firstEvent->block; - - next->start - = block->assemblerBlock->resolve(block->start, next->assemblerBlock); - - block = next; - } - - return c.machineCodeSize = block->assemblerBlock->resolve(block->start, 0) - + c.assembler->footerSize(); - } - - virtual unsigned poolSize() - { - return c.constantCount * TargetBytesPerWord; - } - - virtual void write() - { - c.assembler->write(); - - int i = 0; - for (ConstantPoolNode* n = c.firstConstant; n; n = n->next) { - target_intptr_t* target = reinterpret_cast( - c.machineCode + pad(c.machineCodeSize, TargetBytesPerWord) + i); - - if (n->promise->resolved()) { - *target = targetVW(n->promise->value()); - } else { - class Listener : public Promise::Listener { - public: - Listener(target_intptr_t* target) : target(target) - { - } - - virtual bool resolve(int64_t value, void** location) - { - *target = targetVW(value); - if (location) - *location = target; - return true; - } - - target_intptr_t* target; - }; - new (n->promise->listen(sizeof(Listener))) Listener(target); - } - - i += TargetBytesPerWord; - } - } - - virtual void dispose() - { - // ignore - } - - Context c; - compiler::Client client; -}; - -} // namespace compiler - -Compiler* makeCompiler(System* system, - Assembler* assembler, - Zone* zone, - Compiler::Client* client) -{ - return new (zone) compiler::MyCompiler(system, assembler, zone, client); -} - -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/context.cpp b/sgx-jvm/avian/src/codegen/compiler/context.cpp deleted file mode 100644 index 3027d72568..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/context.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "codegen/compiler/context.h" -#include "codegen/compiler/resource.h" - -#include - -namespace avian { -namespace codegen { -namespace compiler { - -Context::Context(vm::System* system, - Assembler* assembler, - vm::Zone* zone, - Compiler::Client* client) - : system(system), - assembler(assembler), - arch(assembler->arch()), - zone(zone), - client(client), - stack(0), - locals(0), - saved(0), - predecessor(0), - regFile(arch->registerFile()), - regAlloc(system, arch->registerFile()), - registerResources(static_cast(zone->allocate( - sizeof(RegisterResource) * regFile->allRegisters.limit))), - frameResources(0), - acquiredResources(0), - firstConstant(0), - lastConstant(0), - machineCode(0), - firstEvent(0), - lastEvent(0), - forkState(0), - firstBlock(0), - logicalIp(-1), - constantCount(0), - parameterFootprint(0), - localFootprint(0), - machineCodeSize(0), - alignedFrameSize(0), - availableGeneralRegisterCount(regFile->generalRegisters.limit - - regFile->generalRegisters.start), - targetInfo(arch->targetInfo()) -{ - for (Register i : regFile->generalRegisters) { - new (registerResources + i.index()) RegisterResource(arch->reserved(i)); - - if (registerResources[i.index()].reserved) { - --availableGeneralRegisterCount; - } - } - for (Register i : regFile->floatRegisters) { - new (registerResources + i.index()) RegisterResource(arch->reserved(i)); - } -} - -} // namespace compiler -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/context.h b/sgx-jvm/avian/src/codegen/compiler/context.h deleted file mode 100644 index c6ca6ece73..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/context.h +++ /dev/null @@ -1,149 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_CONTEXT_H -#define AVIAN_CODEGEN_COMPILER_CONTEXT_H - -#include -#include -#include - -#include "regalloc.h" - -using namespace avian::util; - -namespace avian { -namespace codegen { -namespace compiler { - -class Stack; -class Local; -class Event; -class LogicalInstruction; - -class Resource; -class RegisterResource; -class FrameResource; - -class ConstantPoolNode; - -class ForkState; -class Block; - -template -List* reverseDestroy(List* cell) -{ - List* previous = 0; - while (cell) { - List* next = cell->next; - cell->next = previous; - previous = cell; - cell = next; - } - return previous; -} - -class LogicalCode { - private: - util::Slice logicalCode; - - public: - LogicalCode() : logicalCode(0, 0) - { - } - - void init(vm::Zone* zone, size_t count) - { - // leave room for logical instruction -1 - size_t realCount = count + 1; - - logicalCode - = util::Slice::allocAndSet(zone, realCount, 0); - } - - void extend(vm::Zone* zone, size_t more) - { - util::Slice newCode - = logicalCode.cloneAndSet(zone, logicalCode.count + more, 0); - - for (size_t i = 0; i < logicalCode.count; i++) { - assertT((vm::System*)0, logicalCode[i] == newCode[i]); - } - - logicalCode = newCode; - } - - size_t count() - { - return logicalCode.count - 1; - } - - LogicalInstruction*& operator[](int index) - { - // leave room for logical instruction -1 - return logicalCode[index + 1]; - } -}; - -class Context { - public: - Context(vm::System* system, - Assembler* assembler, - vm::Zone* zone, - Compiler::Client* client); - - vm::System* system; - Assembler* assembler; - Architecture* arch; - vm::Zone* zone; - Compiler::Client* client; - Stack* stack; - Local* locals; - List* saved; - Event* predecessor; - LogicalCode logicalCode; - const RegisterFile* regFile; - RegisterAllocator regAlloc; - RegisterResource* registerResources; - FrameResource* frameResources; - Resource* acquiredResources; - ConstantPoolNode* firstConstant; - ConstantPoolNode* lastConstant; - uint8_t* machineCode; - Event* firstEvent; - Event* lastEvent; - ForkState* forkState; - Block* firstBlock; - int logicalIp; - unsigned constantCount; - unsigned parameterFootprint; - unsigned localFootprint; - unsigned machineCodeSize; - unsigned alignedFrameSize; - unsigned availableGeneralRegisterCount; - ir::TargetInfo targetInfo; -}; - -inline Aborter* getAborter(Context* c) -{ - return c->system; -} - -template -List* cons(Context* c, const T& value, List* next) -{ - return new (c->zone) List(value, next); -} - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_CONTEXT_H diff --git a/sgx-jvm/avian/src/codegen/compiler/event.cpp b/sgx-jvm/avian/src/codegen/compiler/event.cpp deleted file mode 100644 index 575bede6ac..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/event.cpp +++ /dev/null @@ -1,2193 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" -#include -#include - -#include "codegen/compiler/context.h" -#include "codegen/compiler/event.h" -#include "codegen/compiler/site.h" -#include "codegen/compiler/read.h" -#include "codegen/compiler/value.h" -#include "codegen/compiler/promise.h" -#include "codegen/compiler/frame.h" -#include "codegen/compiler/ir.h" - -using namespace avian::util; - -namespace avian { -namespace codegen { -namespace compiler { - -SiteMask generalRegisterMask(Context* c); -SiteMask generalRegisterOrConstantMask(Context* c); - -CodePromise* codePromise(Context* c, Promise* offset); - -void saveLocals(Context* c, Event* e); - -void apply(Context* c, - lir::UnaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High); - -void apply(Context* c, - lir::BinaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High, - unsigned s2Size, - Site* s2Low, - Site* s2High); - -void apply(Context* c, - lir::TernaryOperation op, - unsigned s1Size, - Site* s1Low, - Site* s1High, - unsigned s2Size, - Site* s2Low, - Site* s2High, - unsigned s3Size, - Site* s3Low, - Site* s3High); - -void append(Context* c, Event* e); - -void clean(Context* c, - Event* e, - Stack* stack, - Local* locals, - Read* reads, - unsigned popIndex); - -Read* live(Context* c UNUSED, Value* v); - -void popRead(Context* c, Event* e UNUSED, Value* v); - -void maybeMove(Context* c, - lir::BinaryOperation op, - unsigned srcSize, - unsigned srcSelectSize, - Value* src, - unsigned dstSize, - Value* dst, - const SiteMask& dstMask); - -Site* maybeMove(Context* c, - Value* v, - const SiteMask& mask, - bool intersectMask, - bool includeNextWord, - unsigned registerReserveCount = 0); - -Site* maybeMove(Context* c, - Read* read, - bool intersectRead, - bool includeNextWord, - unsigned registerReserveCount = 0); -Site* pickSiteOrMove(Context* c, - Value* src, - Value* dst, - Site* nextWord, - unsigned index); - -Site* pickTargetSite(Context* c, - Read* read, - bool intersectRead = false, - unsigned registerReserveCount = 0, - CostCalculator* costCalculator = 0); -Value* threadRegister(Context* c); - -Event::Event(Context* c) - : next(0), - stackBefore(c->stack), - localsBefore(c->locals), - stackAfter(0), - localsAfter(0), - promises(0), - reads(0), - junctionSites(0), - snapshots(0), - predecessors(0), - successors(0), - visitLinks(0), - block(0), - logicalInstruction(c->logicalCode[c->logicalIp]), - readCount(0) -{ -} - -void Event::addRead(Context* c, Value* v, Read* r) -{ - if (DebugReads) { - fprintf(stderr, - "add read %p to %p last %p event %p (%s)\n", - r, - v, - v->lastRead, - this, - this->name()); - } - - r->event = this; - r->eventNext = this->reads; - this->reads = r; - ++this->readCount; - - finishAddRead(c, v, r); -} - -void finishAddRead(Context* c, Value* v, Read* r) -{ - r->value = v; - - if (v->lastRead) { - if (DebugReads) { - fprintf(stderr, "append %p to %p for %p\n", r, v->lastRead, v); - } - - v->lastRead->append(c, r); - } else { - v->reads = r; - } - v->lastRead = r; -} - -void Event::addRead(Context* c, - Value* v, - const SiteMask& mask, - Value* successor) -{ - this->addRead(c, v, read(c, mask, successor)); -} - -void Event::addReads(Context* c, - Value* v, - unsigned size, - const SiteMask& lowMask, - Value* lowSuccessor, - const SiteMask& highMask, - Value* highSuccessor) -{ - SingleRead* r = read(c, lowMask, lowSuccessor); - this->addRead(c, v, r); - if (size > c->targetInfo.pointerSize) { - r->high_ = v->nextWord; - this->addRead(c, v->nextWord, highMask, highSuccessor); - } -} - -void Event::addReads(Context* c, - Value* v, - unsigned size, - const SiteMask& lowMask, - const SiteMask& highMask) -{ - this->addReads(c, v, size, lowMask, 0, highMask, 0); -} - -CodePromise* Event::makeCodePromise(Context* c) -{ - return this->promises = new (c->zone) CodePromise(c, this->promises); -} - -bool Event::isUnreachable() -{ - for (Link* p = this->predecessors; p; p = p->nextPredecessor) { - if (not p->predecessor->allExits()) - return false; - } - return this->predecessors != 0; -} - -unsigned Link::countPredecessors() -{ - Link* link = this; - unsigned c = 0; - for (; link; link = link->nextPredecessor) { - ++c; - } - return c; -} - -Link* Link::lastPredecessor() -{ - Link* link = this; - while (link->nextPredecessor) { - link = link->nextPredecessor; - } - return link; -} - -unsigned Link::countSuccessors() -{ - Link* link = this; - unsigned c = 0; - for (; link; link = link->nextSuccessor) { - ++c; - } - return c; -} - -Link* link(Context* c, - Event* predecessor, - Link* nextPredecessor, - Event* successor, - Link* nextSuccessor, - ForkState* forkState) -{ - return new (c->zone) - Link(predecessor, nextPredecessor, successor, nextSuccessor, forkState); -} - -Value* maybeBuddySlice(Context* c, Value* v) -{ - if (v->home >= 0) { - Value* n = value(c, v->type); - appendBuddy(c, v, n); - return n; - } else { - return v; - } -} - -template -struct SliceStack : public Slice { - size_t capacity; - - SliceStack(T* items, size_t capacity) - : Slice(items + capacity, 0), capacity(capacity) - { - } - - void push(const T& item) - { - ASSERT(Slice::count < capacity); - --Slice::items; - ++Slice::count; - *Slice::items = item; - } -}; - -template -struct FixedSliceStack : public SliceStack { - T itemArray[Capacity]; - - FixedSliceStack() : SliceStack(&itemArray[0], Capacity) - { - } -}; - -Value* slicePushWord(Context* c, - Value* v, - size_t stackBase UNUSED, - SliceStack& slice) -{ - if (v) { - v = maybeBuddySlice(c, v); - } - - size_t index UNUSED = slice.count; - - assertT(c, slice.count < slice.capacity); - slice.push(v); - - if (false) { - fprintf(stderr, "push %p\n", v); - } - - if (v) { - v->home = frameIndex(c, index + stackBase + c->localFootprint); - } - - return v; -} - -void slicePush(Context* c, - unsigned footprint, - Value* v, - size_t stackBase, - SliceStack& slice) -{ - assertT(c, footprint); - - bool bigEndian = c->arch->bigEndian(); - - Value* low = v; - - if (bigEndian) { - v = slicePushWord(c, v, stackBase, slice); - } - - Value* high; - if (footprint > 1) { - assertT(c, footprint == 2); - - if (c->targetInfo.pointerSize == 4) { - low->maybeSplit(c); - high = slicePushWord(c, low->nextWord, stackBase, slice); - } else { - high = slicePushWord(c, 0, stackBase, slice); - } - } else { - high = 0; - } - - if (not bigEndian) { - v = slicePushWord(c, v, stackBase, slice); - } - - if (high) { - v->nextWord = high; - high->nextWord = v; - high->wordIndex = 1; - } -} - -class CallEvent : public Event { - public: - CallEvent(Context* c, - Value* address, - ir::CallingConvention callingConvention, - unsigned flags, - TraceHandler* traceHandler, - Value* resultValue, - util::Slice arguments) - : Event(c), - address(address), - traceHandler(traceHandler), - resultValue(resultValue), - returnAddressSurrogate(0), - framePointerSurrogate(0), - popIndex(0), - stackArgumentIndex(0), - flags(flags), - stackArgumentFootprint(callingConvention == ir::CallingConvention::Avian - ? arguments.count - : 0) - { - RegisterMask registerMask = c->regFile->generalRegisters; - - if (callingConvention == ir::CallingConvention::Native) { - assertT(c, (flags & Compiler::TailJump) == 0); - assertT(c, stackArgumentFootprint == 0); - - unsigned index = 0; - unsigned argumentIndex = 0; - - while (true) { - Value* v = static_cast(arguments[argumentIndex]); - - unsigned footprint = (argumentIndex + 1 < arguments.count - and v->nextWord == arguments[argumentIndex + 1]) - ? 2 - : 1; - - if (index % (c->arch->argumentAlignment() ? footprint : 1)) { - ++index; - } - - SiteMask targetMask; - if (index + (c->arch->argumentRegisterAlignment() ? footprint : 1) - <= c->arch->argumentRegisterCount()) { - Register number = c->arch->argumentRegister(index); - - if (DebugReads) { - fprintf(stderr, "reg %d arg read %p\n", number.index(), v); - } - - targetMask = SiteMask::fixedRegisterMask(number); - registerMask = registerMask.excluding(number); - } else { - if (index < c->arch->argumentRegisterCount()) { - index = c->arch->argumentRegisterCount(); - } - - unsigned frameIndex = index - c->arch->argumentRegisterCount(); - - if (DebugReads) { - fprintf(stderr, "stack %d arg read %p\n", frameIndex, v); - } - - targetMask = SiteMask(lir::Operand::MemoryMask, 0, frameIndex); - } - - this->addRead(c, v, targetMask); - - ++index; - - if ((++argumentIndex) >= arguments.count) { - break; - } - } - } - - if (DebugReads) { - fprintf(stderr, "address read %p\n", address); - } - - { - bool thunk; - OperandMask op; - c->arch->plan((flags & Compiler::Aligned) ? lir::AlignedCall : lir::Call, - c->targetInfo.pointerSize, - op, - &thunk); - - assertT(c, not thunk); - - this->addRead( - c, - address, - SiteMask(op.typeMask, registerMask & op.lowRegisterMask, AnyFrameIndex)); - } - - Stack* stack = stackBefore; - - if (callingConvention == ir::CallingConvention::Avian) { - for (size_t i = 0; i < arguments.count; i++) { - stack = stack->next; - } - for (int i = stackArgumentFootprint - 1; i >= 0; --i) { - Value* v = static_cast(arguments[i]); - - if ((c->targetInfo.pointerSize == 8 - && (v == 0 || (i >= 1 && arguments[i - 1] == 0))) - || (c->targetInfo.pointerSize == 4 && v->nextWord != v)) { - assertT(c, - c->targetInfo.pointerSize == 8 - or v->nextWord == arguments[i - 1]); - - arguments[i] = arguments[i - 1]; - --i; - } - arguments[i] = v; - } - - int returnAddressIndex; - int framePointerIndex; - int frameOffset; - - if (TailCalls and (flags & Compiler::TailJump)) { - int base = frameBase(c); - returnAddressIndex = base + c->arch->returnAddressOffset(); - if (UseFramePointer) { - framePointerIndex = base + c->arch->framePointerOffset(); - } else { - framePointerIndex = -1; - } - - frameOffset = totalFrameSize(c) - - c->arch->argumentFootprint(stackArgumentFootprint); - } else { - returnAddressIndex = -1; - framePointerIndex = -1; - frameOffset = 0; - } - - for (unsigned i = 0; i < stackArgumentFootprint; ++i) { - Value* v = static_cast(arguments[i]); - if (v) { - int frameIndex = i + frameOffset; - - if (DebugReads) { - fprintf(stderr, - "stack arg read %p at %d of %d\n", - v, - frameIndex, - totalFrameSize(c)); - } - - if (static_cast(frameIndex) == returnAddressIndex) { - returnAddressSurrogate = v; - this->addRead(c, v, generalRegisterMask(c)); - } else if (static_cast(frameIndex) == framePointerIndex) { - framePointerSurrogate = v; - this->addRead(c, v, generalRegisterMask(c)); - } else { - this->addRead( - c, v, SiteMask(lir::Operand::MemoryMask, 0, frameIndex)); - } - } - } - } - - if ((not TailCalls) or (flags & Compiler::TailJump) == 0) { - stackArgumentIndex = c->localFootprint; - if (stackBefore) { - stackArgumentIndex += stackBefore->index + 1 - stackArgumentFootprint; - } - - popIndex = c->alignedFrameSize + c->parameterFootprint - - c->arch->frameFooterSize() - stackArgumentIndex; - - assertT(c, static_cast(popIndex) >= 0); - - while (stack) { - if (stack->value) { - unsigned logicalIndex - = compiler::frameIndex(c, stack->index + c->localFootprint); - - if (DebugReads) { - fprintf(stderr, - "stack save read %p at %d of %d\n", - stack->value, - logicalIndex, - totalFrameSize(c)); - } - - this->addRead(c, - stack->value, - SiteMask(lir::Operand::MemoryMask, 0, logicalIndex)); - } - - stack = stack->next; - } - - saveLocals(c, this); - } - } - - virtual const char* name() - { - return "CallEvent"; - } - - virtual void compile(Context* c) - { - lir::UnaryOperation op; - - unsigned footprint = c->arch->argumentFootprint(stackArgumentFootprint); - - if (TailCalls and (flags & Compiler::TailJump)) { - if (flags & Compiler::LongJumpOrCall) { - if (flags & Compiler::Aligned) { - op = lir::AlignedLongJump; - } else { - op = lir::LongJump; - } - } else if (flags & Compiler::Aligned) { - op = lir::AlignedJump; - } else { - op = lir::Jump; - } - - assertT( - c, - returnAddressSurrogate == 0 - or returnAddressSurrogate->source->type(c) == lir::Operand::Type::RegisterPair); - assertT( - c, - framePointerSurrogate == 0 - or framePointerSurrogate->source->type(c) == lir::Operand::Type::RegisterPair); - - Register ras; - if (returnAddressSurrogate) { - returnAddressSurrogate->source->freeze(c, returnAddressSurrogate); - - ras = static_cast(returnAddressSurrogate->source) - ->number; - } else { - ras = NoRegister; - } - - Register fps; - if (framePointerSurrogate) { - framePointerSurrogate->source->freeze(c, framePointerSurrogate); - - fps = static_cast(framePointerSurrogate->source)->number; - } else { - fps = NoRegister; - } - - int offset = static_cast(footprint) - - static_cast( - c->arch->argumentFootprint(c->parameterFootprint)); - - c->assembler->popFrameForTailCall(c->alignedFrameSize, offset, ras, fps); - } else if (flags & Compiler::LongJumpOrCall) { - if (flags & Compiler::Aligned) { - op = lir::AlignedLongCall; - } else { - op = lir::LongCall; - } - } else if (flags & Compiler::Aligned) { - op = lir::AlignedCall; - } else { - op = lir::Call; - } - - apply(c, op, c->targetInfo.pointerSize, address->source, address->source); - - if (traceHandler) { - traceHandler->handleTrace(codePromise(c, c->assembler->offset(true)), - stackArgumentIndex); - } - - if (TailCalls) { - if (flags & Compiler::TailJump) { - if (returnAddressSurrogate) { - returnAddressSurrogate->source->thaw(c, returnAddressSurrogate); - } - - if (framePointerSurrogate) { - framePointerSurrogate->source->thaw(c, framePointerSurrogate); - } - } else if (footprint > c->arch->stackAlignmentInWords()) { - c->assembler->adjustFrame(footprint - c->arch->stackAlignmentInWords()); - } - } - - clean(c, this, stackBefore, localsBefore, reads, popIndex); - - if (resultValue->type.size(c->targetInfo) and live(c, resultValue)) { - resultValue->addSite(c, registerSite(c, c->arch->returnLow())); - if (resultValue->type.size(c->targetInfo) > c->targetInfo.pointerSize - and live(c, resultValue->nextWord)) { - resultValue->nextWord->addSite(c, - registerSite(c, c->arch->returnHigh())); - } - } - } - - virtual bool allExits() - { - return (flags & Compiler::TailJump) != 0; - } - - Value* address; - TraceHandler* traceHandler; - Value* resultValue; - Value* returnAddressSurrogate; - Value* framePointerSurrogate; - unsigned popIndex; - unsigned stackArgumentIndex; - unsigned flags; - unsigned stackArgumentFootprint; -}; - -void appendCall(Context* c, - Value* address, - ir::CallingConvention callingConvention, - unsigned flags, - TraceHandler* traceHandler, - Value* result, - util::Slice arguments) -{ - append(c, - new (c->zone) CallEvent(c, - address, - callingConvention, - flags, - traceHandler, - result, - arguments)); -} - -class ReturnEvent : public Event { - public: - ReturnEvent(Context* c, Value* value) : Event(c), value(value) - { - if (value) { - this->addReads(c, - value, - value->type.size(c->targetInfo), - SiteMask::fixedRegisterMask(c->arch->returnLow()), - SiteMask::fixedRegisterMask(c->arch->returnHigh())); - } - } - - virtual const char* name() - { - return "ReturnEvent"; - } - - virtual void compile(Context* c) - { - for (Read* r = reads; r; r = r->eventNext) { - popRead(c, this, r->value); - } - - if (not this->isUnreachable()) { - c->assembler->popFrameAndPopArgumentsAndReturn( - c->alignedFrameSize, - c->arch->argumentFootprint(c->parameterFootprint)); - } - } - - Value* value; -}; - -void appendReturn(Context* c, Value* value) -{ - append(c, new (c->zone) ReturnEvent(c, value)); -} - -class MoveEvent : public Event { - public: - MoveEvent(Context* c, - lir::BinaryOperation op, - unsigned srcSize, - unsigned srcSelectSize, - Value* srcValue, - unsigned dstSize, - Value* dstValue, - const SiteMask& srcLowMask, - const SiteMask& srcHighMask) - : Event(c), - op(op), - srcSize(srcSize), - srcSelectSize(srcSelectSize), - srcValue(srcValue), - dstSize(dstSize), - dstValue(dstValue) - { - assertT(c, srcSelectSize <= srcSize); - - bool noop = srcSelectSize >= dstSize; - - if (dstSize > c->targetInfo.pointerSize) { - dstValue->grow(c); - } - - if (srcSelectSize > c->targetInfo.pointerSize) { - srcValue->maybeSplit(c); - } - - this->addReads( - c, - srcValue, - srcSelectSize, - srcLowMask, - noop ? dstValue : 0, - srcHighMask, - noop and dstSize > c->targetInfo.pointerSize ? dstValue->nextWord : 0); - } - - virtual const char* name() - { - return "MoveEvent"; - } - - virtual void compile(Context* c) - { - OperandMask dst; - - c->arch->planDestination( - op, - srcSelectSize, - OperandMask( - 1 << (unsigned)srcValue->source->type(c), - srcValue->source->registerMask(c), - srcValue->nextWord->source->registerMask(c)), - dstSize, - dst); - - SiteMask dstLowMask = SiteMask::lowPart(dst); - SiteMask dstHighMask = SiteMask::highPart(dst); - - if (srcSelectSize >= c->targetInfo.pointerSize - and dstSize >= c->targetInfo.pointerSize and srcSelectSize >= dstSize) { - if (dstValue->target) { - if (dstSize > c->targetInfo.pointerSize) { - if (srcValue->source->registerSize(c) > c->targetInfo.pointerSize) { - apply(c, - lir::Move, - srcSelectSize, - srcValue->source, - srcValue->source, - dstSize, - dstValue->target, - dstValue->target); - - if (live(c, dstValue) == 0) { - dstValue->removeSite(c, dstValue->target); - if (dstSize > c->targetInfo.pointerSize) { - dstValue->nextWord->removeSite(c, dstValue->nextWord->target); - } - } - } else { - srcValue->nextWord->source->freeze(c, srcValue->nextWord); - - maybeMove(c, - lir::Move, - c->targetInfo.pointerSize, - c->targetInfo.pointerSize, - srcValue, - c->targetInfo.pointerSize, - dstValue, - dstLowMask); - - srcValue->nextWord->source->thaw(c, srcValue->nextWord); - - maybeMove(c, - lir::Move, - c->targetInfo.pointerSize, - c->targetInfo.pointerSize, - srcValue->nextWord, - c->targetInfo.pointerSize, - dstValue->nextWord, - dstHighMask); - } - } else { - maybeMove(c, - lir::Move, - c->targetInfo.pointerSize, - c->targetInfo.pointerSize, - srcValue, - c->targetInfo.pointerSize, - dstValue, - dstLowMask); - } - } else { - Site* low = pickSiteOrMove(c, srcValue, dstValue, 0, 0); - if (dstSize > c->targetInfo.pointerSize) { - pickSiteOrMove(c, srcValue->nextWord, dstValue->nextWord, low, 1); - } - } - } else if (srcSelectSize <= c->targetInfo.pointerSize - and dstSize <= c->targetInfo.pointerSize) { - maybeMove(c, - op, - srcSize, - srcSelectSize, - srcValue, - dstSize, - dstValue, - dstLowMask); - } else { - assertT(c, srcSize == c->targetInfo.pointerSize); - assertT(c, srcSelectSize == c->targetInfo.pointerSize); - - if (dstValue->nextWord->target or live(c, dstValue->nextWord)) { - assertT(c, dstLowMask.typeMask & lir::Operand::RegisterPairMask); - - Site* low = freeRegisterSite(c, dstLowMask.registerMask); - - srcValue->source->freeze(c, srcValue); - - dstValue->addSite(c, low); - - low->freeze(c, dstValue); - - if (DebugMoves) { - char srcb[256]; - srcValue->source->toString(c, srcb, 256); - char dstb[256]; - low->toString(c, dstb, 256); - fprintf(stderr, "move %s to %s for %p\n", srcb, dstb, srcValue); - } - - apply(c, - lir::Move, - c->targetInfo.pointerSize, - srcValue->source, - srcValue->source, - c->targetInfo.pointerSize, - low, - low); - - low->thaw(c, dstValue); - - srcValue->source->thaw(c, srcValue); - - assertT(c, dstHighMask.typeMask & lir::Operand::RegisterPairMask); - - Site* high = freeRegisterSite(c, dstHighMask.registerMask); - - low->freeze(c, dstValue); - - dstValue->nextWord->addSite(c, high); - - high->freeze(c, dstValue->nextWord); - - if (DebugMoves) { - char srcb[256]; - low->toString(c, srcb, 256); - char dstb[256]; - high->toString(c, dstb, 256); - fprintf(stderr, - "extend %s to %s for %p %p\n", - srcb, - dstb, - dstValue, - dstValue->nextWord); - } - - apply(c, - lir::Move, - c->targetInfo.pointerSize, - low, - low, - dstSize, - low, - high); - - high->thaw(c, dstValue->nextWord); - - low->thaw(c, dstValue); - } else { - pickSiteOrMove(c, srcValue, dstValue, 0, 0); - } - } - - for (Read* r = reads; r; r = r->eventNext) { - popRead(c, this, r->value); - } - } - - lir::BinaryOperation op; - unsigned srcSize; - unsigned srcSelectSize; - Value* srcValue; - unsigned dstSize; - Value* dstValue; -}; - -void appendMove(Context* c, - lir::BinaryOperation op, - unsigned srcSize, - unsigned srcSelectSize, - Value* srcValue, - unsigned dstSize, - Value* dstValue) -{ - bool thunk; - OperandMask src; - - c->arch->planSource(op, srcSelectSize, src, dstSize, &thunk); - - assertT(c, not thunk); - - append(c, - new (c->zone) MoveEvent(c, - op, - srcSize, - srcSelectSize, - srcValue, - dstSize, - dstValue, - SiteMask::lowPart(src), - SiteMask::highPart(src))); -} - -void freezeSource(Context* c, unsigned size, Value* v) -{ - v->source->freeze(c, v); - if (size > c->targetInfo.pointerSize) { - v->nextWord->source->freeze(c, v->nextWord); - } -} - -void thawSource(Context* c, unsigned size, Value* v) -{ - v->source->thaw(c, v); - if (size > c->targetInfo.pointerSize) { - v->nextWord->source->thaw(c, v->nextWord); - } -} - -Read* liveNext(Context* c, Value* v) -{ - assertT(c, v->buddy->hasBuddy(c, v)); - - Read* r = v->reads->next(c); - if (valid(r)) - return r; - - for (Value* p = v->buddy; p != v; p = p->buddy) { - if (valid(p->reads)) - return p->reads; - } - - return 0; -} - -void preserve(Context* c, Value* v, Read* r, Site* s) -{ - s->freeze(c, v); - - maybeMove(c, r, false, true, 0); - - s->thaw(c, v); -} - -Site* getTarget(Context* c, - Value* value, - Value* result, - const SiteMask& resultMask) -{ - Site* s; - Value* v; - Read* r = liveNext(c, value); - if (value->source->match(c, static_cast(resultMask)) - and (r == 0 - or value->source->loneMatch( - c, static_cast(resultMask)))) { - s = value->source; - v = value; - if (r and v->uniqueSite(c, s)) { - preserve(c, v, r, s); - } - } else { - SingleRead r(resultMask, 0); - r.value = result; - r.successor_ = result; - s = pickTargetSite(c, &r, true); - v = result; - result->addSite(c, s); - } - - v->removeSite(c, s); - - s->freeze(c, v); - - return s; -} - -class CombineEvent : public Event { - public: - CombineEvent(Context* c, - lir::TernaryOperation op, - Value* firstValue, - Value* secondValue, - Value* resultValue, - const SiteMask& firstLowMask, - const SiteMask& firstHighMask, - const SiteMask& secondLowMask, - const SiteMask& secondHighMask) - : Event(c), - op(op), - firstValue(firstValue), - secondValue(secondValue), - resultValue(resultValue) - { - this->addReads(c, - firstValue, - firstValue->type.size(c->targetInfo), - firstLowMask, - firstHighMask); - - if (resultValue->type.size(c->targetInfo) > c->targetInfo.pointerSize) { - resultValue->grow(c); - } - - bool condensed = c->arch->alwaysCondensed(op); - - this->addReads(c, - secondValue, - secondValue->type.size(c->targetInfo), - secondLowMask, - condensed ? resultValue : 0, - secondHighMask, - condensed ? resultValue->nextWord : 0); - } - - virtual const char* name() - { - return "CombineEvent"; - } - - virtual void compile(Context* c) - { - assertT( - c, - firstValue->source->type(c) == firstValue->nextWord->source->type(c)); - - if (false) { - if (secondValue->source->type(c) - != secondValue->nextWord->source->type(c)) { - fprintf(stderr, - "%p %p %d : %p %p %d\n", - secondValue, - secondValue->source, - static_cast(secondValue->source->type(c)), - secondValue->nextWord, - secondValue->nextWord->source, - static_cast(secondValue->nextWord->source->type(c))); - } - } - - assertT( - c, - secondValue->source->type(c) == secondValue->nextWord->source->type(c)); - - freezeSource(c, firstValue->type.size(c->targetInfo), firstValue); - - OperandMask cMask; - - c->arch->planDestination( - op, - firstValue->type.size(c->targetInfo), - OperandMask( - 1 << (unsigned)firstValue->source->type(c), - firstValue->source->registerMask(c), - firstValue->nextWord->source->registerMask(c)), - secondValue->type.size(c->targetInfo), - OperandMask( - 1 << (unsigned)secondValue->source->type(c), - secondValue->source->registerMask(c), - secondValue->nextWord->source->registerMask(c)), - resultValue->type.size(c->targetInfo), - cMask); - - SiteMask resultLowMask = SiteMask::lowPart(cMask); - SiteMask resultHighMask = SiteMask::highPart(cMask); - - Site* low = getTarget(c, secondValue, resultValue, resultLowMask); - unsigned lowSize = low->registerSize(c); - Site* high = (resultValue->type.size(c->targetInfo) > lowSize - ? getTarget(c, - secondValue->nextWord, - resultValue->nextWord, - resultHighMask) - : low); - - if (false) { - fprintf(stderr, - "combine %p:%p and %p:%p into %p:%p\n", - firstValue, - firstValue->nextWord, - secondValue, - secondValue->nextWord, - resultValue, - resultValue->nextWord); - } - - apply(c, - op, - firstValue->type.size(c->targetInfo), - firstValue->source, - firstValue->nextWord->source, - secondValue->type.size(c->targetInfo), - secondValue->source, - secondValue->nextWord->source, - resultValue->type.size(c->targetInfo), - low, - high); - - thawSource(c, firstValue->type.size(c->targetInfo), firstValue); - - for (Read* r = reads; r; r = r->eventNext) { - popRead(c, this, r->value); - } - - low->thaw(c, secondValue); - if (resultValue->type.size(c->targetInfo) > lowSize) { - high->thaw(c, secondValue->nextWord); - } - - if (live(c, resultValue)) { - resultValue->addSite(c, low); - if (resultValue->type.size(c->targetInfo) > lowSize - and live(c, resultValue->nextWord)) { - resultValue->nextWord->addSite(c, high); - } - } - } - - lir::TernaryOperation op; - Value* firstValue; - Value* secondValue; - Value* resultValue; -}; - -void appendCombine(Context* c, - lir::TernaryOperation op, - Value* firstValue, - Value* secondValue, - Value* resultValue) -{ - bool thunk; - OperandMask firstMask; - OperandMask secondMask; - c->arch->planSource(op, - firstValue->type.size(c->targetInfo), - firstMask, - secondValue->type.size(c->targetInfo), - secondMask, - resultValue->type.size(c->targetInfo), - &thunk); - - if (thunk) { - const size_t MaxValueCount = 6; - FixedSliceStack slice; - size_t stackBase = c->stack ? c->stack->index + 1 : 0; - - bool threadParameter; - intptr_t handler - = c->client->getThunk(op, - firstValue->type.size(c->targetInfo), - resultValue->type.size(c->targetInfo), - &threadParameter); - - unsigned stackSize = ceilingDivide(secondValue->type.size(c->targetInfo), - c->targetInfo.pointerSize) - + ceilingDivide(firstValue->type.size(c->targetInfo), - c->targetInfo.pointerSize); - - slicePush(c, - ceilingDivide(secondValue->type.size(c->targetInfo), - c->targetInfo.pointerSize), - secondValue, - stackBase, - slice); - slicePush(c, - ceilingDivide(firstValue->type.size(c->targetInfo), - c->targetInfo.pointerSize), - firstValue, - stackBase, - slice); - - if (threadParameter) { - ++stackSize; - - slicePush(c, 1, threadRegister(c), stackBase, slice); - } - - appendCall(c, - value(c, ir::Type::addr(), constantSite(c, handler)), - ir::CallingConvention::Native, - 0, - 0, - resultValue, - slice); - } else { - append(c, - new (c->zone) CombineEvent(c, - op, - firstValue, - secondValue, - resultValue, - SiteMask::lowPart(firstMask), - SiteMask::highPart(firstMask), - SiteMask::lowPart(secondMask), - SiteMask::highPart(secondMask))); - } -} - -class TranslateEvent : public Event { - public: - TranslateEvent(Context* c, - lir::BinaryOperation op, - Value* firstValue, - Value* resultValue, - const SiteMask& valueLowMask, - const SiteMask& valueHighMask) - : Event(c), op(op), firstValue(firstValue), resultValue(resultValue) - { - bool condensed = c->arch->alwaysCondensed(op); - - if (resultValue->type.size(c->targetInfo) > c->targetInfo.pointerSize) { - resultValue->grow(c); - } - - this->addReads(c, - firstValue, - firstValue->type.size(c->targetInfo), - valueLowMask, - condensed ? resultValue : 0, - valueHighMask, - condensed ? resultValue->nextWord : 0); - } - - virtual const char* name() - { - return "TranslateEvent"; - } - - virtual void compile(Context* c) - { - assertT( - c, - firstValue->source->type(c) == firstValue->nextWord->source->type(c)); - - OperandMask bMask; - - c->arch->planDestination( - op, - firstValue->type.size(c->targetInfo), - OperandMask( - 1 << (unsigned)firstValue->source->type(c), - firstValue->source->registerMask(c), - firstValue->nextWord->source->registerMask(c)), - resultValue->type.size(c->targetInfo), - bMask); - - SiteMask resultLowMask = SiteMask::lowPart(bMask); - SiteMask resultHighMask = SiteMask::highPart(bMask); - - Site* low = getTarget(c, firstValue, resultValue, resultLowMask); - unsigned lowSize = low->registerSize(c); - Site* high = (resultValue->type.size(c->targetInfo) > lowSize - ? getTarget(c, - firstValue->nextWord, - resultValue->nextWord, - resultHighMask) - : low); - - apply(c, - op, - firstValue->type.size(c->targetInfo), - firstValue->source, - firstValue->nextWord->source, - resultValue->type.size(c->targetInfo), - low, - high); - - for (Read* r = reads; r; r = r->eventNext) { - popRead(c, this, r->value); - } - - low->thaw(c, firstValue); - if (resultValue->type.size(c->targetInfo) > lowSize) { - high->thaw(c, firstValue->nextWord); - } - - if (live(c, resultValue)) { - resultValue->addSite(c, low); - if (resultValue->type.size(c->targetInfo) > lowSize - and live(c, resultValue->nextWord)) { - resultValue->nextWord->addSite(c, high); - } - } - } - - lir::BinaryOperation op; - Value* firstValue; - Value* resultValue; - Read* resultRead; - SiteMask resultLowMask; - SiteMask resultHighMask; -}; - -void appendTranslate(Context* c, - lir::BinaryOperation op, - Value* firstValue, - Value* resultValue) -{ - assertT(c, - firstValue->type.size(c->targetInfo) - == firstValue->type.size(c->targetInfo)); - assertT(c, - resultValue->type.size(c->targetInfo) - == resultValue->type.size(c->targetInfo)); - - bool thunk; - OperandMask first; - - c->arch->planSource(op, - firstValue->type.size(c->targetInfo), - first, - resultValue->type.size(c->targetInfo), - &thunk); - - if (thunk) { - size_t stackBase = c->stack ? c->stack->index + 1 : 0; - FixedSliceStack slice; - - slicePush(c, - ceilingDivide(firstValue->type.size(c->targetInfo), - c->targetInfo.pointerSize), - firstValue, - stackBase, - slice); - - appendCall(c, - value(c, - ir::Type::addr(), - constantSite(c, - c->client->getThunk( - op, - firstValue->type.size(c->targetInfo), - resultValue->type.size(c->targetInfo)))), - ir::CallingConvention::Native, - 0, - 0, - resultValue, - slice); - } else { - append(c, - new (c->zone) TranslateEvent(c, - op, - firstValue, - resultValue, - SiteMask::lowPart(first), - SiteMask::highPart(first))); - } -} - -class OperationEvent : public Event { - public: - OperationEvent(Context* c, lir::Operation op) : Event(c), op(op) - { - } - - virtual const char* name() - { - return "OperationEvent"; - } - - virtual void compile(Context* c) - { - c->assembler->apply(op); - } - - lir::Operation op; -}; - -void appendOperation(Context* c, lir::Operation op) -{ - append(c, new (c->zone) OperationEvent(c, op)); -} - -ConstantSite* findConstantSite(Context* c, Value* v) -{ - for (SiteIterator it(c, v); it.hasMore();) { - Site* s = it.next(); - if (s->type(c) == lir::Operand::Type::Constant) { - return static_cast(s); - } - } - return 0; -} - -void moveIfConflict(Context* c, Value* v, MemorySite* s) -{ - if (v->reads) { - SiteMask mask(lir::Operand::RegisterPairMask, ~0, AnyFrameIndex); - v->reads->intersect(&mask); - if (s->conflicts(mask)) { - maybeMove(c, v->reads, true, false); - v->removeSite(c, s); - } - } -} - -class MemoryEvent : public Event { - public: - MemoryEvent(Context* c, - Value* base, - int displacement, - Value* index, - unsigned scale, - Value* result) - : Event(c), - base(base), - displacement(displacement), - index(index), - scale(scale), - result(result) - { - this->addRead(c, base, generalRegisterMask(c)); - if (index) { - this->addRead(c, index, generalRegisterOrConstantMask(c)); - } - } - - virtual const char* name() - { - return "MemoryEvent"; - } - - virtual void compile(Context* c) - { - Register indexRegister; - int displacement = this->displacement; - unsigned scale = this->scale; - if (index) { - ConstantSite* constant = findConstantSite(c, index); - - if (constant) { - indexRegister = NoRegister; - displacement += (constant->value->value() * scale); - scale = 1; - } else { - assertT(c, index->source->type(c) == lir::Operand::Type::RegisterPair); - indexRegister = static_cast(index->source)->number; - } - } else { - indexRegister = NoRegister; - } - assertT(c, base->source->type(c) == lir::Operand::Type::RegisterPair); - Register baseRegister = static_cast(base->source)->number; - - popRead(c, this, base); - if (index) { - if (c->targetInfo.pointerSize == 8 and indexRegister != NoRegister) { - apply(c, - lir::Move, - 4, - index->source, - index->source, - 8, - index->source, - index->source); - } - - popRead(c, this, index); - } - - MemorySite* site - = memorySite(c, baseRegister, displacement, indexRegister, scale); - - MemorySite* low; - if (result->nextWord != result) { - MemorySite* high = static_cast(site->copyHigh(c)); - low = static_cast(site->copyLow(c)); - - result->nextWord->target = high; - result->nextWord->addSite(c, high); - moveIfConflict(c, result->nextWord, high); - } else { - low = site; - } - - result->target = low; - result->addSite(c, low); - moveIfConflict(c, result, low); - } - - Value* base; - int displacement; - Value* index; - unsigned scale; - Value* result; -}; - -void appendMemory(Context* c, - Value* base, - int displacement, - Value* index, - unsigned scale, - Value* result) -{ - append(c, - new (c->zone) - MemoryEvent(c, base, displacement, index, scale, result)); -} - -double asFloat(unsigned size, int64_t v) -{ - if (size == 4) { - return vm::bitsToFloat(v); - } else { - return vm::bitsToDouble(v); - } -} - -bool unordered(double a, double b) -{ - return not(a >= b or a < b); -} - -bool shouldJump(Context* c, - lir::TernaryOperation op, - unsigned size, - int64_t b, - int64_t a) -{ - switch (op) { - case lir::JumpIfEqual: - return a == b; - - case lir::JumpIfNotEqual: - return a != b; - - case lir::JumpIfLess: - return a < b; - - case lir::JumpIfGreater: - return a > b; - - case lir::JumpIfLessOrEqual: - return a <= b; - - case lir::JumpIfGreaterOrEqual: - return a >= b; - - case lir::JumpIfFloatEqual: - return asFloat(size, a) == asFloat(size, b); - - case lir::JumpIfFloatNotEqual: - return asFloat(size, a) != asFloat(size, b); - - case lir::JumpIfFloatLess: - return asFloat(size, a) < asFloat(size, b); - - case lir::JumpIfFloatGreater: - return asFloat(size, a) > asFloat(size, b); - - case lir::JumpIfFloatLessOrEqual: - return asFloat(size, a) <= asFloat(size, b); - - case lir::JumpIfFloatGreaterOrEqual: - return asFloat(size, a) >= asFloat(size, b); - - case lir::JumpIfFloatLessOrUnordered: - return asFloat(size, a) < asFloat(size, b) - or unordered(asFloat(size, a), asFloat(size, b)); - - case lir::JumpIfFloatGreaterOrUnordered: - return asFloat(size, a) > asFloat(size, b) - or unordered(asFloat(size, a), asFloat(size, b)); - - case lir::JumpIfFloatLessOrEqualOrUnordered: - return asFloat(size, a) <= asFloat(size, b) - or unordered(asFloat(size, a), asFloat(size, b)); - - case lir::JumpIfFloatGreaterOrEqualOrUnordered: - return asFloat(size, a) >= asFloat(size, b) - or unordered(asFloat(size, a), asFloat(size, b)); - - default: - abort(c); - } -} - -lir::TernaryOperation thunkBranch(Context* c, lir::TernaryOperation op) -{ - switch (op) { - case lir::JumpIfFloatEqual: - return lir::JumpIfEqual; - - case lir::JumpIfFloatNotEqual: - return lir::JumpIfNotEqual; - - case lir::JumpIfFloatLess: - case lir::JumpIfFloatLessOrUnordered: - return lir::JumpIfLess; - - case lir::JumpIfFloatGreater: - case lir::JumpIfFloatGreaterOrUnordered: - return lir::JumpIfGreater; - - case lir::JumpIfFloatLessOrEqual: - case lir::JumpIfFloatLessOrEqualOrUnordered: - return lir::JumpIfLessOrEqual; - - case lir::JumpIfFloatGreaterOrEqual: - case lir::JumpIfFloatGreaterOrEqualOrUnordered: - return lir::JumpIfGreaterOrEqual; - - default: - abort(c); - } -} - -class BranchEvent : public Event { - public: - BranchEvent(Context* c, - lir::TernaryOperation op, - Value* firstValue, - Value* secondValue, - Value* addressValue, - const SiteMask& firstLowMask, - const SiteMask& firstHighMask, - const SiteMask& secondLowMask, - const SiteMask& secondHighMask) - : Event(c), - op(op), - firstValue(firstValue), - secondValue(secondValue), - addressValue(addressValue) - { - this->addReads(c, - firstValue, - firstValue->type.size(c->targetInfo), - firstLowMask, - firstHighMask); - this->addReads(c, - secondValue, - firstValue->type.size(c->targetInfo), - secondLowMask, - secondHighMask); - - OperandMask dstMask; - c->arch->planDestination(op, - firstValue->type.size(c->targetInfo), - OperandMask(0, 0, 0), - firstValue->type.size(c->targetInfo), - OperandMask(0, 0, 0), - c->targetInfo.pointerSize, - dstMask); - - this->addRead(c, addressValue, SiteMask::lowPart(dstMask)); - } - - virtual const char* name() - { - return "BranchEvent"; - } - - virtual void compile(Context* c) - { - ConstantSite* firstConstant = findConstantSite(c, firstValue); - ConstantSite* secondConstant = findConstantSite(c, secondValue); - - if (not this->isUnreachable()) { - if (firstConstant and secondConstant and firstConstant->value->resolved() - and secondConstant->value->resolved()) { - int64_t firstConstVal = firstConstant->value->value(); - int64_t secondConstVal = secondConstant->value->value(); - - if (firstValue->type.size(c->targetInfo) > c->targetInfo.pointerSize) { - firstConstVal - |= findConstantSite(c, firstValue->nextWord)->value->value() - << 32; - secondConstVal - |= findConstantSite(c, secondValue->nextWord)->value->value() - << 32; - } - - if (shouldJump(c, - op, - firstValue->type.size(c->targetInfo), - firstConstVal, - secondConstVal)) { - apply(c, - lir::Jump, - c->targetInfo.pointerSize, - addressValue->source, - addressValue->source); - } - } else { - freezeSource(c, firstValue->type.size(c->targetInfo), firstValue); - freezeSource(c, firstValue->type.size(c->targetInfo), secondValue); - freezeSource(c, c->targetInfo.pointerSize, addressValue); - - apply(c, - op, - firstValue->type.size(c->targetInfo), - firstValue->source, - firstValue->nextWord->source, - firstValue->type.size(c->targetInfo), - secondValue->source, - secondValue->nextWord->source, - c->targetInfo.pointerSize, - addressValue->source, - addressValue->source); - - thawSource(c, c->targetInfo.pointerSize, addressValue); - thawSource(c, firstValue->type.size(c->targetInfo), secondValue); - thawSource(c, firstValue->type.size(c->targetInfo), firstValue); - } - } - - for (Read* r = reads; r; r = r->eventNext) { - popRead(c, this, r->value); - } - } - - virtual bool isBranch() - { - return true; - } - - lir::TernaryOperation op; - Value* firstValue; - Value* secondValue; - Value* addressValue; -}; - -void appendBranch(Context* c, - lir::TernaryOperation op, - Value* firstValue, - Value* secondValue, - Value* addressValue) -{ - bool thunk; - OperandMask firstMask; - OperandMask secondMask; - - c->arch->planSource(op, - firstValue->type.size(c->targetInfo), - firstMask, - firstValue->type.size(c->targetInfo), - secondMask, - c->targetInfo.pointerSize, - &thunk); - - if (thunk) { - const size_t MaxValueCount = 4; - FixedSliceStack slice; - size_t stackBase = c->stack ? c->stack->index + 1 : 0; - - bool threadParameter; - intptr_t handler = c->client->getThunk(op, - firstValue->type.size(c->targetInfo), - firstValue->type.size(c->targetInfo), - &threadParameter); - - assertT(c, not threadParameter); - - slicePush(c, - ceilingDivide(firstValue->type.size(c->targetInfo), - c->targetInfo.pointerSize), - secondValue, - stackBase, - slice); - slicePush(c, - ceilingDivide(firstValue->type.size(c->targetInfo), - c->targetInfo.pointerSize), - firstValue, - stackBase, - slice); - - Value* result = value(c, ir::Type::addr()); - appendCall(c, - value(c, ir::Type::addr(), constantSite(c, handler)), - ir::CallingConvention::Native, - 0, - 0, - result, - slice); - - appendBranch( - c, - thunkBranch(c, op), - value(c, ir::Type::addr(), constantSite(c, static_cast(0))), - result, - addressValue); - } else { - append(c, - new (c->zone) BranchEvent(c, - op, - firstValue, - secondValue, - addressValue, - SiteMask::lowPart(firstMask), - SiteMask::highPart(firstMask), - SiteMask::lowPart(secondMask), - SiteMask::highPart(secondMask))); - } -} - -void clean(Context* c, Value* v, unsigned popIndex) -{ - for (SiteIterator it(c, v); it.hasMore();) { - Site* s = it.next(); - if (not(s->match(c, SiteMask(lir::Operand::MemoryMask, 0, AnyFrameIndex)) - and offsetToFrameIndex(c, static_cast(s)->offset) - >= popIndex)) { - if (false - and s->match(c, - SiteMask(lir::Operand::MemoryMask, 0, AnyFrameIndex))) { - char buffer[256]; - s->toString(c, buffer, 256); - fprintf(stderr, - "remove %s from %p at %d pop offset 0x%x\n", - buffer, - v, - offsetToFrameIndex(c, static_cast(s)->offset), - frameIndexToOffset(c, popIndex)); - } - it.remove(c); - } - } -} - -void clean(Context* c, - Event* e, - Stack* stack, - Local* locals, - Read* reads, - unsigned popIndex) -{ - for (FrameIterator it(c, stack, locals); it.hasMore();) { - FrameIterator::Element e = it.next(c); - clean(c, e.value, popIndex); - } - - for (Read* r = reads; r; r = r->eventNext) { - popRead(c, e, r->value); - } -} - -class JumpEvent : public Event { - public: - JumpEvent(Context* c, - lir::UnaryOperation op, - Value* address, - bool exit, - bool cleanLocals) - : Event(c), op(op), address(address), exit(exit), cleanLocals(cleanLocals) - { - bool thunk; - OperandMask mask; - c->arch->plan(op, c->targetInfo.pointerSize, mask, &thunk); - - assertT(c, not thunk); - - this->addRead(c, address, SiteMask::lowPart(mask)); - } - - virtual const char* name() - { - return "JumpEvent"; - } - - virtual void compile(Context* c) - { - if (not this->isUnreachable()) { - apply(c, op, c->targetInfo.pointerSize, address->source, address->source); - } - - for (Read* r = reads; r; r = r->eventNext) { - popRead(c, this, r->value); - } - - if (cleanLocals) { - for (FrameIterator it(c, 0, c->locals); it.hasMore();) { - FrameIterator::Element e = it.next(c); - clean(c, e.value, 0); - } - } - } - - virtual bool isBranch() - { - return true; - } - - virtual bool allExits() - { - return exit or this->isUnreachable(); - } - - lir::UnaryOperation op; - Value* address; - bool exit; - bool cleanLocals; -}; - -void appendJump(Context* c, - lir::UnaryOperation op, - Value* address, - bool exit, - bool cleanLocals) -{ - append(c, new (c->zone) JumpEvent(c, op, address, exit, cleanLocals)); -} - -class BoundsCheckEvent : public Event { - public: - BoundsCheckEvent(Context* c, - Value* object, - unsigned lengthOffset, - Value* index, - intptr_t handler) - : Event(c), - object(object), - lengthOffset(lengthOffset), - index(index), - handler(handler) - { - this->addRead(c, object, generalRegisterMask(c)); - this->addRead(c, index, generalRegisterOrConstantMask(c)); - } - - virtual const char* name() - { - return "BoundsCheckEvent"; - } - - virtual void compile(Context* c) - { - Assembler* a = c->assembler; - - ConstantSite* constant = findConstantSite(c, index); - CodePromise* outOfBoundsPromise = 0; - - if (constant) { - if (constant->value->value() < 0) { - lir::Constant handlerConstant(resolvedPromise(c, handler)); - a->apply(lir::Call, - OperandInfo(c->targetInfo.pointerSize, - lir::Operand::Type::Constant, - &handlerConstant)); - } - } else { - outOfBoundsPromise = compiler::codePromise(c, static_cast(0)); - - ConstantSite zero(resolvedPromise(c, 0)); - ConstantSite oob(outOfBoundsPromise); - apply(c, - lir::JumpIfLess, - 4, - &zero, - &zero, - 4, - index->source, - index->source, - c->targetInfo.pointerSize, - &oob, - &oob); - } - - if (constant == 0 or constant->value->value() >= 0) { - assertT(c, object->source->type(c) == lir::Operand::Type::RegisterPair); - MemorySite length(static_cast(object->source)->number, - lengthOffset, - NoRegister, - 1); - length.acquired = true; - - CodePromise* nextPromise - = compiler::codePromise(c, static_cast(0)); - - freezeSource(c, c->targetInfo.pointerSize, index); - - ConstantSite next(nextPromise); - apply(c, - lir::JumpIfGreater, - 4, - index->source, - index->source, - 4, - &length, - &length, - c->targetInfo.pointerSize, - &next, - &next); - - thawSource(c, c->targetInfo.pointerSize, index); - - if (constant == 0) { - outOfBoundsPromise->offset = a->offset(); - } - - lir::Constant handlerConstant(resolvedPromise(c, handler)); - a->apply(lir::Call, - OperandInfo(c->targetInfo.pointerSize, - lir::Operand::Type::Constant, - &handlerConstant)); - - nextPromise->offset = a->offset(); - } - - popRead(c, this, object); - popRead(c, this, index); - } - - Value* object; - unsigned lengthOffset; - Value* index; - intptr_t handler; -}; - -void appendBoundsCheck(Context* c, - Value* object, - unsigned lengthOffset, - Value* index, - intptr_t handler) -{ - append(c, - new (c->zone) - BoundsCheckEvent(c, object, lengthOffset, index, handler)); -} - -class FrameSiteEvent : public Event { - public: - FrameSiteEvent(Context* c, Value* value, int index) - : Event(c), value(value), index(index) - { - } - - virtual const char* name() - { - return "FrameSiteEvent"; - } - - virtual void compile(Context* c) - { - if (live(c, value)) { - value->addSite(c, frameSite(c, index)); - } - } - - Value* value; - int index; -}; - -void appendFrameSite(Context* c, Value* value, int index) -{ - append(c, new (c->zone) FrameSiteEvent(c, value, index)); -} - -class SaveLocalsEvent : public Event { - public: - SaveLocalsEvent(Context* c) : Event(c) - { - saveLocals(c, this); - } - - virtual const char* name() - { - return "SaveLocalsEvent"; - } - - virtual void compile(Context* c) - { - for (Read* r = reads; r; r = r->eventNext) { - popRead(c, this, r->value); - } - } -}; - -void appendSaveLocals(Context* c) -{ - append(c, new (c->zone) SaveLocalsEvent(c)); -} - -class DummyEvent : public Event { - public: - DummyEvent(Context* c, Local* locals) : Event(c), locals_(locals) - { - } - - virtual const char* name() - { - return "DummyEvent"; - } - - virtual void compile(Context*) - { - } - - virtual Local* locals() - { - return locals_; - } - - Local* locals_; -}; - -void appendDummy(Context* c) -{ - Stack* stack = c->stack; - Local* locals = c->locals; - LogicalInstruction* i = c->logicalCode[c->logicalIp]; - - c->stack = i->stack; - c->locals = i->locals; - - append(c, new (c->zone) DummyEvent(c, locals)); - - c->stack = stack; - c->locals = locals; -} - -} // namespace compiler -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/event.h b/sgx-jvm/avian/src/codegen/compiler/event.h deleted file mode 100644 index 8aa68bec11..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/event.h +++ /dev/null @@ -1,214 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_EVENT_H -#define AVIAN_CODEGEN_COMPILER_EVENT_H - -namespace avian { -namespace codegen { -namespace compiler { - -class Context; -class CodePromise; -class Snapshot; -class Link; -class Site; -class StubRead; - -const bool DebugReads = false; -const bool DebugMoves = false; - -class Event { - public: - Event(Context* c); - - virtual const char* name() = 0; - - virtual void compile(Context* c) = 0; - - virtual bool isBranch() - { - return false; - } - - virtual bool allExits() - { - return false; - } - - virtual Local* locals() - { - return localsBefore; - } - - void addRead(Context* c, Value* v, Read* r); - - void addRead(Context* c, - Value* v, - const SiteMask& mask, - Value* successor = 0); - - void addReads(Context* c, - Value* v, - unsigned size, - const SiteMask& lowMask, - Value* lowSuccessor, - const SiteMask& highMask, - Value* highSuccessor); - - void addReads(Context* c, - Value* v, - unsigned size, - const SiteMask& lowMask, - const SiteMask& highMask); - - CodePromise* makeCodePromise(Context* c); - - bool isUnreachable(); - - Event* next; - Stack* stackBefore; - Local* localsBefore; - Stack* stackAfter; - Local* localsAfter; - CodePromise* promises; - Read* reads; - Site** junctionSites; - Snapshot* snapshots; - Link* predecessors; - Link* successors; - List* visitLinks; - Block* block; - LogicalInstruction* logicalInstruction; - unsigned readCount; -}; - -void finishAddRead(Context* c, Value* v, Read* r); - -class StubReadPair { - public: - Value* value; - StubRead* read; -}; - -class JunctionState { - public: - JunctionState(unsigned frameFootprint) : frameFootprint(frameFootprint) - { - } - - unsigned frameFootprint; - StubReadPair reads[0]; -}; - -class Link { - public: - Link(Event* predecessor, - Link* nextPredecessor, - Event* successor, - Link* nextSuccessor, - ForkState* forkState) - : predecessor(predecessor), - nextPredecessor(nextPredecessor), - successor(successor), - nextSuccessor(nextSuccessor), - forkState(forkState), - junctionState(0) - { - } - - unsigned countPredecessors(); - Link* lastPredecessor(); - unsigned countSuccessors(); - - Event* predecessor; - Link* nextPredecessor; - Event* successor; - Link* nextSuccessor; - ForkState* forkState; - JunctionState* junctionState; -}; - -Link* link(Context* c, - Event* predecessor, - Link* nextPredecessor, - Event* successor, - Link* nextSuccessor, - ForkState* forkState); - -void appendCall(Context* c, - Value* address, - ir::CallingConvention callingConvention, - unsigned flags, - TraceHandler* traceHandler, - Value* result, - util::Slice arguments); - -void appendReturn(Context* c, Value* value); - -void appendMove(Context* c, - lir::BinaryOperation op, - unsigned srcSize, - unsigned srcSelectSize, - Value* src, - unsigned dstSize, - Value* dst); - -void appendCombine(Context* c, - lir::TernaryOperation op, - Value* first, - Value* second, - Value* result); - -void appendTranslate(Context* c, - lir::BinaryOperation op, - Value* first, - Value* result); - -void appendOperation(Context* c, lir::Operation op); - -void appendMemory(Context* c, - Value* base, - int displacement, - Value* index, - unsigned scale, - Value* result); - -void appendBranch(Context* c, - lir::TernaryOperation op, - Value* first, - Value* second, - Value* address); - -void appendJump(Context* c, - lir::UnaryOperation op, - Value* address, - bool exit = false, - bool cleanLocals = false); - -void appendBoundsCheck(Context* c, - Value* object, - unsigned lengthOffset, - Value* index, - intptr_t handler); - -void appendFrameSite(Context* c, Value* value, int index); - -void appendSaveLocals(Context* c); - -void appendDummy(Context* c); - -void appendBuddy(Context* c, Value* original, Value* buddy); - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_EVENT_H diff --git a/sgx-jvm/avian/src/codegen/compiler/frame.cpp b/sgx-jvm/avian/src/codegen/compiler/frame.cpp deleted file mode 100644 index e6b6832f9c..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/frame.cpp +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" - -#include "codegen/compiler/context.h" -#include "codegen/compiler/frame.h" - -#include - -namespace avian { -namespace codegen { -namespace compiler { - -unsigned totalFrameSize(Context* c) -{ - return c->alignedFrameSize + c->arch->frameHeaderSize() - + c->arch->argumentFootprint(c->parameterFootprint); -} - -int frameIndex(Context* c, int localIndex) -{ - assertT(c, localIndex >= 0); - - int index = c->alignedFrameSize + c->parameterFootprint - localIndex - 1; - - if (localIndex < static_cast(c->parameterFootprint)) { - index += c->arch->frameHeaderSize(); - } else { - index -= c->arch->frameFooterSize(); - } - - assertT(c, index >= 0); - assertT(c, static_cast(index) < totalFrameSize(c)); - - return index; -} - -unsigned frameIndexToOffset(Context* c, unsigned frameIndex) -{ - assertT(c, frameIndex < totalFrameSize(c)); - - return (frameIndex + c->arch->frameFooterSize()) * c->targetInfo.pointerSize; -} - -unsigned offsetToFrameIndex(Context* c, unsigned offset) -{ - assertT(c, - static_cast((offset / c->targetInfo.pointerSize) - - c->arch->frameFooterSize()) >= 0); - assertT(c, - ((offset / c->targetInfo.pointerSize) - c->arch->frameFooterSize()) - < totalFrameSize(c)); - - return (offset / c->targetInfo.pointerSize) - c->arch->frameFooterSize(); -} - -unsigned frameBase(Context* c) -{ - return c->alignedFrameSize - c->arch->frameReturnAddressSize() - - c->arch->frameFooterSize() + c->arch->frameHeaderSize(); -} - -FrameIterator::Element::Element(Value* value, unsigned localIndex) - : value(value), localIndex(localIndex) -{ -} - -int FrameIterator::Element::frameIndex(Context* c) -{ - return compiler::frameIndex(c, this->localIndex); -} - -FrameIterator::FrameIterator(Context* c, - Stack* stack, - Local* locals, - bool includeEmpty) - : stack(stack), - locals(locals), - localIndex(c->localFootprint - 1), - includeEmpty(includeEmpty) -{ -} - -bool FrameIterator::hasMore() -{ - if (not includeEmpty) { - while (stack and stack->value == 0) { - stack = stack->next; - } - - while (localIndex >= 0 and locals[localIndex].value == 0) { - --localIndex; - } - } - - return stack != 0 or localIndex >= 0; -} - -FrameIterator::Element FrameIterator::next(Context* c) -{ - Value* v; - unsigned li; - if (stack) { - Stack* s = stack; - v = s->value; - li = s->index + c->localFootprint; - stack = stack->next; - } else { - Local* l = locals + localIndex; - v = l->value; - li = localIndex; - --localIndex; - } - return Element(v, li); -} - -Stack* stack(Context* c, Value* value, Stack* next) -{ - return new (c->zone) Stack(next ? next->index + 1 : 0, value, next); -} - -} // namespace compiler -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/frame.h b/sgx-jvm/avian/src/codegen/compiler/frame.h deleted file mode 100644 index 2f4bdb58a5..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/frame.h +++ /dev/null @@ -1,78 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_FRAME_H -#define AVIAN_CODEGEN_COMPILER_FRAME_H - -namespace avian { -namespace codegen { -namespace compiler { - -unsigned totalFrameSize(Context* c); - -int frameIndex(Context* c, int localIndex); - -unsigned frameIndexToOffset(Context* c, unsigned frameIndex); - -unsigned offsetToFrameIndex(Context* c, unsigned offset); - -unsigned frameBase(Context* c); - -class FrameIterator { - public: - class Element { - public: - Element(Value* value, unsigned localIndex); - - int frameIndex(Context* c); - - Value* const value; - const unsigned localIndex; - }; - - FrameIterator(Context* c, - Stack* stack, - Local* locals, - bool includeEmpty = false); - - bool hasMore(); - - Element next(Context* c); - - Stack* stack; - Local* locals; - int localIndex; - bool includeEmpty; -}; - -class Local { - public: - Value* value; -}; - -class Stack { - public: - Stack(unsigned index, Value* value, Stack* next) - : index(index), value(value), next(next) - { - } - - unsigned index; - Value* value; - Stack* next; -}; - -Stack* stack(Context* c, Value* value, Stack* next); - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_FRAME_H diff --git a/sgx-jvm/avian/src/codegen/compiler/ir.cpp b/sgx-jvm/avian/src/codegen/compiler/ir.cpp deleted file mode 100644 index fe7b58a5de..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/ir.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "codegen/compiler/context.h" -#include "codegen/compiler/ir.h" - -namespace avian { -namespace codegen { -namespace compiler { - -LogicalInstruction::LogicalInstruction(int index, Stack* stack, Local* locals) - : firstEvent(0), - lastEvent(0), - immediatePredecessor(0), - stack(stack), - locals(locals), - machineOffset(0), - /*subroutine(0), */ index(index) -{ -} - -LogicalInstruction* LogicalInstruction::next(Context* c) -{ - LogicalInstruction* i = this; - for (size_t n = i->index + 1; n < c->logicalCode.count(); ++n) { - i = c->logicalCode[n]; - if (i) - return i; - } - return 0; -} - -unsigned machineOffset(Context* c, int logicalIp) -{ - return c->logicalCode[logicalIp]->machineOffset->value(); -} - -Block::Block(Event* head) - : head(head), nextBlock(0), nextInstruction(0), assemblerBlock(0), start(0) -{ -} - -Block* block(Context* c, Event* head) -{ - return new (c->zone) Block(head); -} - -} // namespace compiler -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/ir.h b/sgx-jvm/avian/src/codegen/compiler/ir.h deleted file mode 100644 index cd52fe063e..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/ir.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_IR_H -#define AVIAN_CODEGEN_COMPILER_IR_H - -namespace avian { -namespace codegen { -namespace compiler { - -class MultiRead; - -class ForkElement { - public: - Value* value; - MultiRead* read; - bool local; -}; - -class ForkState : public Compiler::State { - public: - ForkState(Stack* stack, - Local* locals, - List* saved, - Event* predecessor, - unsigned logicalIp) - : stack(stack), - locals(locals), - saved(saved), - predecessor(predecessor), - logicalIp(logicalIp), - readCount(0) - { - } - - Stack* stack; - Local* locals; - List* saved; - Event* predecessor; - unsigned logicalIp; - unsigned readCount; - ForkElement elements[0]; -}; - -class LogicalInstruction { - public: - LogicalInstruction(int index, Stack* stack, Local* locals); - - LogicalInstruction* next(Context* c); - - Event* firstEvent; - Event* lastEvent; - LogicalInstruction* immediatePredecessor; - Stack* stack; - Local* locals; - Promise* machineOffset; - int index; -}; - -class Block { - public: - Block(Event* head); - - Event* head; - Block* nextBlock; - LogicalInstruction* nextInstruction; - Assembler::Block* assemblerBlock; - unsigned start; -}; - -Block* block(Context* c, Event* head); - -unsigned machineOffset(Context* c, int logicalIp); - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_IR_H diff --git a/sgx-jvm/avian/src/codegen/compiler/promise.cpp b/sgx-jvm/avian/src/codegen/compiler/promise.cpp deleted file mode 100644 index 3fff9d6afa..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/promise.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" - -#include "codegen/compiler/context.h" -#include "codegen/compiler/promise.h" -#include "codegen/compiler/ir.h" - -namespace avian { -namespace codegen { -namespace compiler { - -CodePromise::CodePromise(Context* c, CodePromise* next) - : c(c), offset(0), next(next) -{ -} - -CodePromise::CodePromise(Context* c, Promise* offset) - : c(c), offset(offset), next(0) -{ -} - -int64_t CodePromise::value() -{ - if (resolved()) { - return reinterpret_cast(c->machineCode + offset->value()); - } - - abort(c); -} - -bool CodePromise::resolved() -{ - return c->machineCode != 0 and offset and offset->resolved(); -} - -CodePromise* codePromise(Context* c, Promise* offset) -{ - return new (c->zone) CodePromise(c, offset); -} - -Promise* shiftMaskPromise(Context* c, - Promise* base, - unsigned shift, - int64_t mask) -{ - return new (c->zone) ShiftMaskPromise(base, shift, mask); -} - -Promise* combinedPromise(Context* c, Promise* low, Promise* high) -{ - return new (c->zone) CombinedPromise(low, high); -} - -Promise* resolvedPromise(Context* c, int64_t value) -{ - return new (c->zone) ResolvedPromise(value); -} - -class IpPromise : public Promise { - public: - IpPromise(Context* c, int logicalIp) : c(c), logicalIp(logicalIp) - { - } - - virtual int64_t value() - { - if (resolved()) { - return reinterpret_cast(c->machineCode - + machineOffset(c, logicalIp)); - } - - abort(c); - } - - virtual bool resolved() - { - return c->machineCode != 0 - and c->logicalCode[logicalIp]->machineOffset->resolved(); - } - - Context* c; - int logicalIp; -}; - -Promise* ipPromise(Context* c, int logicalIp) -{ - return new (c->zone) IpPromise(c, logicalIp); -} - -class PoolPromise : public Promise { - public: - PoolPromise(Context* c, int key) : c(c), key(key) - { - } - - virtual int64_t value() - { - if (resolved()) { - return reinterpret_cast( - c->machineCode - + vm::pad(c->machineCodeSize, c->targetInfo.pointerSize) - + (key * c->targetInfo.pointerSize)); - } - - abort(c); - } - - virtual bool resolved() - { - return c->machineCode != 0; - } - - Context* c; - int key; -}; - -Promise* poolPromise(Context* c, int key) -{ - return new (c->zone) PoolPromise(c, key); -} - -} // namespace compiler -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/promise.h b/sgx-jvm/avian/src/codegen/compiler/promise.h deleted file mode 100644 index 928b7cd11e..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/promise.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_PROMISE_H -#define AVIAN_CODEGEN_COMPILER_PROMISE_H - -namespace avian { -namespace codegen { -namespace compiler { - -class CodePromise : public Promise { - public: - CodePromise(Context* c, CodePromise* next); - - CodePromise(Context* c, Promise* offset); - - virtual int64_t value(); - - virtual bool resolved(); - - Context* c; - Promise* offset; - CodePromise* next; -}; - -CodePromise* codePromise(Context* c, Promise* offset); - -Promise* shiftMaskPromise(Context* c, - Promise* base, - unsigned shift, - int64_t mask); - -Promise* combinedPromise(Context* c, Promise* low, Promise* high); - -Promise* resolvedPromise(Context* c, int64_t value); - -Promise* ipPromise(Context* c, int logicalIp); - -Promise* poolPromise(Context* c, int key); - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_PROMISE_H diff --git a/sgx-jvm/avian/src/codegen/compiler/read.cpp b/sgx-jvm/avian/src/codegen/compiler/read.cpp deleted file mode 100644 index 5dfaba2777..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/read.cpp +++ /dev/null @@ -1,215 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" - -#include "codegen/compiler/context.h" -#include "codegen/compiler/value.h" -#include "codegen/compiler/site.h" -#include "codegen/compiler/resource.h" -#include "codegen/compiler/read.h" - -namespace avian { -namespace codegen { -namespace compiler { - -SingleRead::SingleRead(const SiteMask& mask, Value* successor) - : next_(0), mask(mask), high_(0), successor_(successor) -{ -} - -bool SingleRead::intersect(SiteMask* mask, unsigned) -{ - *mask = mask->intersectionWith(this->mask); - - return true; -} - -Value* SingleRead::high(Context*) -{ - return high_; -} - -Value* SingleRead::successor() -{ - return successor_; -} - -bool SingleRead::valid() -{ - return true; -} - -void SingleRead::append(Context* c UNUSED, Read* r) -{ - assertT(c, next_ == 0); - next_ = r; -} - -Read* SingleRead::next(Context*) -{ - return next_; -} - -MultiRead::MultiRead() - : reads(0), lastRead(0), firstTarget(0), lastTarget(0), visited(false) -{ -} - -bool MultiRead::intersect(SiteMask* mask, unsigned depth) -{ - if (depth > 0) { - // short-circuit recursion to avoid poor performance in - // deeply-nested branches - return reads != 0; - } - - bool result = false; - if (not visited) { - visited = true; - for (List** cell = &reads; *cell;) { - Read* r = (*cell)->item; - bool valid = r->intersect(mask, depth + 1); - if (valid) { - result = true; - cell = &((*cell)->next); - } else { - *cell = (*cell)->next; - } - } - visited = false; - } - return result; -} - -Value* MultiRead::successor() -{ - return 0; -} - -bool MultiRead::valid() -{ - bool result = false; - if (not visited) { - visited = true; - for (List** cell = &reads; *cell;) { - Read* r = (*cell)->item; - if (r->valid()) { - result = true; - cell = &((*cell)->next); - } else { - *cell = (*cell)->next; - } - } - visited = false; - } - return result; -} - -void MultiRead::append(Context* c, Read* r) -{ - List* cell = cons(c, r, 0); - if (lastRead == 0) { - reads = cell; - } else { - lastRead->next = cell; - } - lastRead = cell; - - if (false) { - fprintf(stderr, "append %p to %p for %p\n", r, lastTarget, this); - } - - lastTarget->item = r; -} - -Read* MultiRead::next(Context* c) -{ - abort(c); -} - -void MultiRead::allocateTarget(Context* c) -{ - List* cell = cons(c, 0, 0); - - if (false) { - fprintf(stderr, "allocate target for %p: %p\n", this, cell); - } - - if (lastTarget) { - lastTarget->next = cell; - } else { - firstTarget = cell; - } - lastTarget = cell; -} - -Read* MultiRead::nextTarget() -{ - if (false) { - fprintf(stderr, "next target for %p: %p\n", this, firstTarget); - } - - Read* r = firstTarget->item; - firstTarget = firstTarget->next; - return r; -} - -StubRead::StubRead() : next_(0), read(0), visited(false), valid_(true) -{ -} - -bool StubRead::intersect(SiteMask* mask, unsigned depth) -{ - if (not visited) { - visited = true; - if (read) { - bool valid = read->intersect(mask, depth); - if (not valid) { - read = 0; - } - } - visited = false; - } - return valid_; -} - -Value* StubRead::successor() -{ - return 0; -} - -bool StubRead::valid() -{ - return valid_; -} - -void StubRead::append(Context* c UNUSED, Read* r) -{ - assertT(c, next_ == 0); - next_ = r; -} - -Read* StubRead::next(Context*) -{ - return next_; -} - -SingleRead* read(Context* c, const SiteMask& mask, Value* successor) -{ - assertT(c, - (mask.typeMask != lir::Operand::MemoryMask) or mask.frameIndex >= 0); - - return new (c->zone) SingleRead(mask, successor); -} - -} // namespace compiler -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/read.h b/sgx-jvm/avian/src/codegen/compiler/read.h deleted file mode 100644 index 80b8983a2f..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/read.h +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_READ_H -#define AVIAN_CODEGEN_COMPILER_READ_H - -namespace avian { -namespace codegen { -namespace compiler { - -class Context; -class SiteMask; -class Value; -class Event; - -class Read { - public: - Read() : value(0), event(0), eventNext(0) - { - } - - virtual bool intersect(SiteMask* mask, unsigned depth = 0) = 0; - - virtual Value* high(Context* c) - { - abort(c); - } - - virtual Value* successor() = 0; - - virtual bool valid() = 0; - - virtual void append(Context* c, Read* r) = 0; - - virtual Read* next(Context* c) = 0; - - Value* value; - Event* event; - Read* eventNext; -}; - -inline bool valid(Read* r) -{ - return r and r->valid(); -} - -class SingleRead : public Read { - public: - SingleRead(const SiteMask& mask, Value* successor); - - virtual bool intersect(SiteMask* mask, unsigned); - - virtual Value* high(Context*); - - virtual Value* successor(); - - virtual bool valid(); - - virtual void append(Context* c UNUSED, Read* r); - - virtual Read* next(Context*); - - Read* next_; - SiteMask mask; - Value* high_; - Value* successor_; -}; - -class MultiRead : public Read { - public: - MultiRead(); - - virtual bool intersect(SiteMask* mask, unsigned depth); - - virtual Value* successor(); - - virtual bool valid(); - - virtual void append(Context* c, Read* r); - - virtual Read* next(Context* c); - - void allocateTarget(Context* c); - - Read* nextTarget(); - - List* reads; - List* lastRead; - List* firstTarget; - List* lastTarget; - bool visited; -}; - -class StubRead : public Read { - public: - StubRead(); - - virtual bool intersect(SiteMask* mask, unsigned depth); - - virtual Value* successor(); - - virtual bool valid(); - - virtual void append(Context* c UNUSED, Read* r); - - virtual Read* next(Context*); - - Read* next_; - Read* read; - bool visited; - bool valid_; -}; - -SingleRead* read(Context* c, const SiteMask& mask, Value* successor = 0); - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_READ_H diff --git a/sgx-jvm/avian/src/codegen/compiler/regalloc.cpp b/sgx-jvm/avian/src/codegen/compiler/regalloc.cpp deleted file mode 100644 index 788cab3dd3..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/regalloc.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" - -#include "codegen/compiler/regalloc.h" -#include "codegen/compiler/context.h" -#include "codegen/compiler/site.h" -#include "codegen/compiler/resource.h" -#include "codegen/compiler/read.h" - -namespace avian { -namespace codegen { -namespace compiler { - -RegisterAllocator::RegisterAllocator(Aborter* a, - const RegisterFile* registerFile) - : a(a), registerFile(registerFile) -{ -} - -unsigned totalFrameSize(Context* c); -Read* live(Context* c UNUSED, Value* v); - -unsigned resourceCost(Context* c, - Value* v, - Resource* r, - SiteMask mask, - CostCalculator* costCalculator) -{ - if (r->reserved or r->freezeCount or r->referenceCount) { - return Target::Impossible; - } else { - unsigned baseCost = costCalculator ? costCalculator->cost(c, mask) : 0; - - if (r->value) { - assertT(c, r->value->findSite(r->site)); - - if (v and r->value->isBuddyOf(v)) { - return baseCost; - } else if (r->value->uniqueSite(c, r->site)) { - return baseCost + Target::StealUniquePenalty; - } else { - return baseCost = Target::StealPenalty; - } - } else { - return baseCost; - } - } -} - -bool pickRegisterTarget(Context* c, - Register i, - Value* v, - RegisterMask mask, - Register* target, - unsigned* cost, - CostCalculator* costCalculator) -{ - if (mask.contains(i)) { - RegisterResource* r = c->registerResources + i.index(); - unsigned myCost - = resourceCost( - c, - v, - r, - SiteMask(lir::Operand::RegisterPairMask, RegisterMask(i), NoFrameIndex), - costCalculator) + Target::MinimumRegisterCost; - - if (mask.containsExactly(i)) { - *cost = myCost; - return true; - } else if (myCost < *cost) { - *cost = myCost; - *target = i; - } - } - return false; -} - -Register pickRegisterTarget(Context* c, - Value* v, - RegisterMask mask, - unsigned* cost, - CostCalculator* costCalculator) -{ - Register target = NoRegister; - *cost = Target::Impossible; - - if (mask & c->regFile->generalRegisters) { - for (Register i : c->regFile->generalRegisters) { - if (pickRegisterTarget(c, i, v, mask, &target, cost, costCalculator)) { - return i; - } - } - } - - if (mask & c->regFile->floatRegisters) { - for (Register i : c->regFile->floatRegisters) { - if (pickRegisterTarget(c, i, v, mask, &target, cost, costCalculator)) { - return i; - } - } - } - - return target; -} - -Target pickRegisterTarget(Context* c, - Value* v, - RegisterMask mask, - CostCalculator* costCalculator) -{ - unsigned cost; - Register number = pickRegisterTarget(c, v, mask, &cost, costCalculator); - return Target(number, cost); -} - -unsigned frameCost(Context* c, - Value* v, - int frameIndex, - CostCalculator* costCalculator) -{ - return resourceCost(c, - v, - c->frameResources + frameIndex, - SiteMask(lir::Operand::MemoryMask, 0, frameIndex), - costCalculator) + Target::MinimumFrameCost; -} - -Target pickFrameTarget(Context* c, Value* v, CostCalculator* costCalculator) -{ - Target best; - - Value* p = v; - do { - if (p->home >= 0) { - Target mine(p->home, - lir::Operand::Type::Memory, - frameCost(c, v, p->home, costCalculator)); - - if (mine.cost == Target::MinimumFrameCost) { - return mine; - } else if (mine.cost < best.cost) { - best = mine; - } - } - p = p->buddy; - } while (p != v); - - return best; -} - -Target pickAnyFrameTarget(Context* c, Value* v, CostCalculator* costCalculator) -{ - Target best; - - unsigned count = totalFrameSize(c); - for (unsigned i = 0; i < count; ++i) { - Target mine(i, lir::Operand::Type::Memory, frameCost(c, v, i, costCalculator)); - if (mine.cost == Target::MinimumFrameCost) { - return mine; - } else if (mine.cost < best.cost) { - best = mine; - } - } - - return best; -} - -Target pickTarget(Context* c, - Value* value, - const SiteMask& mask, - unsigned registerPenalty, - Target best, - CostCalculator* costCalculator) -{ - if (mask.typeMask & lir::Operand::RegisterPairMask) { - Target mine - = pickRegisterTarget(c, value, mask.registerMask, costCalculator); - - mine.cost += registerPenalty; - if (mine.cost == Target::MinimumRegisterCost) { - return mine; - } else if (mine.cost < best.cost) { - best = mine; - } - } - - if (mask.typeMask & lir::Operand::MemoryMask) { - if (mask.frameIndex >= 0) { - Target mine(mask.frameIndex, - lir::Operand::Type::Memory, - frameCost(c, value, mask.frameIndex, costCalculator)); - if (mine.cost == Target::MinimumFrameCost) { - return mine; - } else if (mine.cost < best.cost) { - best = mine; - } - } else if (mask.frameIndex == AnyFrameIndex) { - Target mine = pickFrameTarget(c, value, costCalculator); - if (mine.cost == Target::MinimumFrameCost) { - return mine; - } else if (mine.cost < best.cost) { - best = mine; - } - } - } - - return best; -} - -Target pickTarget(Context* c, - Read* read, - bool intersectRead, - unsigned registerReserveCount, - CostCalculator* costCalculator) -{ - unsigned registerPenalty - = (c->availableGeneralRegisterCount > registerReserveCount - ? 0 - : Target::LowRegisterPenalty); - - Value* value = read->value; - - RegisterMask registerMask - = (isFloatValue(value) ? AnyRegisterMask : (RegisterMask)c->regFile->generalRegisters); - - SiteMask mask(~0, registerMask, AnyFrameIndex); - read->intersect(&mask); - - if (isFloatValue(value)) { - RegisterMask floatMask = mask.registerMask & c->regFile->floatRegisters; - if (floatMask) { - mask.registerMask = floatMask; - } - } - - Target best; - - Value* successor = read->successor(); - if (successor) { - Read* r = live(c, successor); - if (r) { - SiteMask intersection = mask; - if (r->intersect(&intersection)) { - best = pickTarget( - c, value, intersection, registerPenalty, best, costCalculator); - - if (best.cost <= Target::MinimumFrameCost) { - return best; - } - } - } - } - - best = pickTarget(c, value, mask, registerPenalty, best, costCalculator); - if (best.cost <= Target::MinimumFrameCost) { - return best; - } - - if (intersectRead) { - if (best.cost == Target::Impossible) { - fprintf(stderr, - "mask type %d reg %" LLD " frame %d\n", - mask.typeMask, - (uint64_t)mask.registerMask, - mask.frameIndex); - abort(c); - } - return best; - } - - { - Target mine = pickRegisterTarget(c, value, registerMask, costCalculator); - - mine.cost += registerPenalty; - - if (mine.cost == Target::MinimumRegisterCost) { - return mine; - } else if (mine.cost < best.cost) { - best = mine; - } - } - - { - Target mine = pickFrameTarget(c, value, costCalculator); - if (mine.cost == Target::MinimumFrameCost) { - return mine; - } else if (mine.cost < best.cost) { - best = mine; - } - } - - if (best.cost >= Target::StealUniquePenalty - and c->availableGeneralRegisterCount == 0) { - // there are no free registers left, so moving from memory to - // memory isn't an option - try harder to find an available frame - // site: - best = pickAnyFrameTarget(c, value, costCalculator); - assertT(c, best.cost <= 3); - } - - if (best.cost == Target::Impossible) { - abort(c); - } - - return best; -} - -} // namespace regalloc -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/regalloc.h b/sgx-jvm/avian/src/codegen/compiler/regalloc.h deleted file mode 100644 index a50b2e1ccc..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/regalloc.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_REGALLOC_H -#define AVIAN_CODEGEN_COMPILER_REGALLOC_H - -#include "avian/common.h" - -#include -#include - -namespace avian { - -namespace util { -class Aborter; -} // namespace util - -namespace codegen { -namespace compiler { - -using namespace avian::util; - -class Context; -class Value; -class SiteMask; -class Resource; -class Read; - -class RegisterAllocator { - public: - Aborter* a; - const RegisterFile* registerFile; - - RegisterAllocator(Aborter* a, const RegisterFile* registerFile); -}; - -class Target { - public: - static const unsigned MinimumRegisterCost = 0; - static const unsigned MinimumFrameCost = 1; - static const unsigned StealPenalty = 2; - static const unsigned StealUniquePenalty = 4; - static const unsigned IndirectMovePenalty = 4; - static const unsigned LowRegisterPenalty = 10; - static const unsigned Impossible = 20; - - Target() : cost(Impossible) - { - } - - Target(int16_t index, lir::Operand::Type type, unsigned cost) - : index(index), type(type), cost(cost) - { - } - - Target(Register reg, unsigned cost) - : index(reg.index()), type(lir::Operand::Type::RegisterPair), cost(cost) - { - } - - int16_t index; - lir::Operand::Type type; - uint8_t cost; -}; - -class CostCalculator { - public: - virtual unsigned cost(Context* c, SiteMask mask) = 0; -}; - -unsigned resourceCost(Context* c, - Value* v, - Resource* r, - SiteMask mask, - CostCalculator* costCalculator); - -bool pickRegisterTarget(Context* c, - Register i, - Value* v, - RegisterMask mask, - Register* target, - unsigned* cost, - CostCalculator* costCalculator = 0); - -Register pickRegisterTarget(Context* c, - Value* v, - RegisterMask mask, - unsigned* cost, - CostCalculator* costCalculator = 0); - -Target pickRegisterTarget(Context* c, - Value* v, - RegisterMask mask, - CostCalculator* costCalculator = 0); - -unsigned frameCost(Context* c, - Value* v, - int frameIndex, - CostCalculator* costCalculator); - -Target pickFrameTarget(Context* c, Value* v, CostCalculator* costCalculator); - -Target pickAnyFrameTarget(Context* c, Value* v, CostCalculator* costCalculator); - -Target pickTarget(Context* c, - Value* value, - const SiteMask& mask, - unsigned registerPenalty, - Target best, - CostCalculator* costCalculator); - -Target pickTarget(Context* c, - Read* read, - bool intersectRead, - unsigned registerReserveCount, - CostCalculator* costCalculator); - -} // namespace regalloc -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_REGALLOC_H diff --git a/sgx-jvm/avian/src/codegen/compiler/resource.cpp b/sgx-jvm/avian/src/codegen/compiler/resource.cpp deleted file mode 100644 index 85b49d604c..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/resource.cpp +++ /dev/null @@ -1,249 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "codegen/compiler/context.h" -#include "codegen/compiler/resource.h" -#include "codegen/compiler/value.h" - -namespace avian { -namespace codegen { -namespace compiler { - -const bool DebugResources = false; - -void steal(Context* c, Resource* r, Value* thief); - -void decrementAvailableGeneralRegisterCount(Context* c) -{ - assertT(c, c->availableGeneralRegisterCount); - --c->availableGeneralRegisterCount; - - if (DebugResources) { - fprintf( - stderr, "%d registers available\n", c->availableGeneralRegisterCount); - } -} - -void incrementAvailableGeneralRegisterCount(Context* c) -{ - ++c->availableGeneralRegisterCount; - - if (DebugResources) { - fprintf( - stderr, "%d registers available\n", c->availableGeneralRegisterCount); - } -} - -void freezeResource(Context* c, Resource* r, Value* v) -{ - if (DebugResources) { - char buffer[256]; - r->toString(c, buffer, 256); - fprintf(stderr, "%p freeze %s to %d\n", v, buffer, r->freezeCount + 1); - } - - ++r->freezeCount; -} - -void thawResource(Context* c, Resource* r, Value* v) -{ - if (not r->reserved) { - if (DebugResources) { - char buffer[256]; - r->toString(c, buffer, 256); - fprintf(stderr, "%p thaw %s to %d\n", v, buffer, r->freezeCount - 1); - } - - assertT(c, r->freezeCount); - - --r->freezeCount; - } -} - -Resource::Resource(bool reserved) - : value(0), - site(0), - previousAcquired(0), - nextAcquired(0), - freezeCount(0), - referenceCount(0), - reserved(reserved) -{ -} - -RegisterResource::RegisterResource(bool reserved) : Resource(reserved) -{ -} - -void RegisterResource::freeze(Context* c, Value* v) -{ - if (not reserved) { - freezeResource(c, this, v); - - if (freezeCount == 1 - and c->regFile->generalRegisters.contains(index(c))) { - decrementAvailableGeneralRegisterCount(c); - } - } -} - -void RegisterResource::thaw(Context* c, Value* v) -{ - if (not reserved) { - thawResource(c, this, v); - - if (freezeCount == 0 - and c->regFile->generalRegisters.contains(index(c))) { - incrementAvailableGeneralRegisterCount(c); - } - } -} - -unsigned RegisterResource::toString(Context* c, - char* buffer, - unsigned bufferSize) -{ - return vm::snprintf(buffer, bufferSize, "register %d", index(c)); -} - -Register RegisterResource::index(Context* c) -{ - return Register(this - c->registerResources); -} - -void RegisterResource::increment(Context* c) -{ - if (not this->reserved) { - if (DebugResources) { - char buffer[256]; - this->toString(c, buffer, 256); - fprintf(stderr, "increment %s to %d\n", buffer, this->referenceCount + 1); - } - - ++this->referenceCount; - - if (this->referenceCount == 1 - and c->regFile->generalRegisters.contains(this->index(c))) { - decrementAvailableGeneralRegisterCount(c); - } - } -} - -void RegisterResource::decrement(Context* c) -{ - if (not this->reserved) { - if (DebugResources) { - char buffer[256]; - this->toString(c, buffer, 256); - fprintf(stderr, "decrement %s to %d\n", buffer, this->referenceCount - 1); - } - - assertT(c, this->referenceCount > 0); - - --this->referenceCount; - - if (this->referenceCount == 0 - and c->regFile->generalRegisters.contains(this->index(c))) { - incrementAvailableGeneralRegisterCount(c); - } - } -} - -void FrameResource::freeze(Context* c, Value* v) -{ - freezeResource(c, this, v); -} - -void FrameResource::thaw(Context* c, Value* v) -{ - thawResource(c, this, v); -} - -unsigned FrameResource::toString(Context* c, char* buffer, unsigned bufferSize) -{ - return vm::snprintf(buffer, bufferSize, "frame %d", index(c)); -} - -unsigned FrameResource::index(Context* c) -{ - return this - c->frameResources; -} - -void acquire(Context* c, Resource* resource, Value* value, Site* site) -{ - assertT(c, value); - assertT(c, site); - - if (not resource->reserved) { - if (DebugResources) { - char buffer[256]; - resource->toString(c, buffer, 256); - fprintf(stderr, "%p acquire %s\n", value, buffer); - } - - if (resource->value) { - assertT(c, resource->value->findSite(resource->site)); - assertT(c, not value->findSite(resource->site)); - - steal(c, resource, value); - } - - if (c->acquiredResources) { - c->acquiredResources->previousAcquired = resource; - resource->nextAcquired = c->acquiredResources; - } - c->acquiredResources = resource; - - resource->value = value; - resource->site = site; - } -} - -void release(Context* c, - Resource* resource, - Value* value UNUSED, - Site* site UNUSED) -{ - if (not resource->reserved) { - if (DebugResources) { - char buffer[256]; - resource->toString(c, buffer, 256); - fprintf(stderr, "%p release %s\n", resource->value, buffer); - } - - assertT(c, resource->value); - assertT(c, resource->site); - - assertT(c, resource->value->isBuddyOf(value)); - assertT(c, site == resource->site); - - Resource* next = resource->nextAcquired; - if (next) { - next->previousAcquired = resource->previousAcquired; - resource->nextAcquired = 0; - } - - Resource* previous = resource->previousAcquired; - if (previous) { - previous->nextAcquired = next; - resource->previousAcquired = 0; - } else { - assertT(c, c->acquiredResources == resource); - c->acquiredResources = next; - } - - resource->value = 0; - resource->site = 0; - } -} - -} // namespace compiler -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/resource.h b/sgx-jvm/avian/src/codegen/compiler/resource.h deleted file mode 100644 index e74543e376..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/resource.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_RESOURCE_H -#define AVIAN_CODEGEN_COMPILER_RESOURCE_H - -namespace avian { -namespace codegen { -namespace compiler { - -class Context; -class Value; -class Site; - -class Resource { - public: - Resource(bool reserved = false); - - virtual void freeze(Context*, Value*) = 0; - - virtual void thaw(Context*, Value*) = 0; - - virtual unsigned toString(Context*, char*, unsigned) = 0; - - Value* value; - Site* site; - Resource* previousAcquired; - Resource* nextAcquired; - uint8_t freezeCount; - uint8_t referenceCount; - bool reserved; -}; - -class RegisterResource : public Resource { - public: - RegisterResource(bool reserved); - - virtual void freeze(Context*, Value*); - - virtual void thaw(Context*, Value*); - - virtual unsigned toString(Context* c, char* buffer, unsigned bufferSize); - - virtual Register index(Context*); - - void increment(Context*); - - void decrement(Context*); -}; - -class FrameResource : public Resource { - public: - virtual void freeze(Context*, Value*); - - virtual void thaw(Context*, Value*); - - virtual unsigned toString(Context* c, char* buffer, unsigned bufferSize); - - virtual unsigned index(Context*); -}; - -void acquire(Context* c, Resource* resource, Value* value, Site* site); - -void release(Context* c, Resource* resource, Value* value, Site* site); - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_RESOURCE_H diff --git a/sgx-jvm/avian/src/codegen/compiler/site.cpp b/sgx-jvm/avian/src/codegen/compiler/site.cpp deleted file mode 100644 index d3c59065b4..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/site.cpp +++ /dev/null @@ -1,706 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" - -#include "codegen/compiler/context.h" -#include "codegen/compiler/value.h" -#include "codegen/compiler/site.h" -#include "codegen/compiler/resource.h" -#include "codegen/compiler/frame.h" -#include "codegen/compiler/promise.h" - -namespace avian { -namespace codegen { -namespace compiler { - -int intersectFrameIndexes(int a, int b) -{ - if (a == NoFrameIndex or b == NoFrameIndex) - return NoFrameIndex; - if (a == AnyFrameIndex) - return b; - if (b == AnyFrameIndex) - return a; - if (a == b) - return a; - return NoFrameIndex; -} - -SiteMask SiteMask::intersectionWith(const SiteMask& b) -{ - return SiteMask(typeMask & b.typeMask, - registerMask & b.registerMask, - intersectFrameIndexes(frameIndex, b.frameIndex)); -} - -SiteIterator::SiteIterator(Context* c, - Value* v, - bool includeBuddies, - bool includeNextWord) - : c(c), - originalValue(v), - currentValue(v), - includeBuddies(includeBuddies), - includeNextWord(includeNextWord), - pass(0), - next_(findNext(&(v->sites))), - previous(0) -{ -} - -Site** SiteIterator::findNext(Site** p) -{ - while (true) { - if (*p) { - if (pass == 0 or (*p)->registerSize(c) > c->targetInfo.pointerSize) { - return p; - } else { - p = &((*p)->next); - } - } else { - if (includeBuddies) { - Value* v = currentValue->buddy; - if (v != originalValue) { - currentValue = v; - p = &(v->sites); - continue; - } - } - - if (includeNextWord and pass == 0) { - Value* v = originalValue->nextWord; - if (v != originalValue) { - pass = 1; - originalValue = v; - currentValue = v; - p = &(v->sites); - continue; - } - } - - return 0; - } - } -} - -bool SiteIterator::hasMore() -{ - if (previous) { - next_ = findNext(&((*previous)->next)); - previous = 0; - } - return next_ != 0; -} - -Site* SiteIterator::next() -{ - previous = next_; - return *previous; -} - -void SiteIterator::remove(Context* c) -{ - (*previous)->release(c, originalValue); - *previous = (*previous)->next; - next_ = findNext(previous); - previous = 0; -} - -unsigned Site::registerSize(Context* c) -{ - return c->targetInfo.pointerSize; -} - -Site* constantSite(Context* c, Promise* value) -{ - return new (c->zone) ConstantSite(value); -} - -Site* constantSite(Context* c, int64_t value) -{ - return constantSite(c, resolvedPromise(c, value)); -} - -class AddressSite : public Site { - public: - AddressSite(Promise* address) : address(address) - { - } - - virtual unsigned toString(Context*, char* buffer, unsigned bufferSize) - { - if (address->resolved()) { - return vm::snprintf( - buffer, bufferSize, "address %" LLD, address->value()); - } else { - return vm::snprintf(buffer, bufferSize, "address unresolved"); - } - } - - virtual unsigned copyCost(Context*, Site* s) - { - return (s == this ? 0 : AddressCopyCost); - } - - virtual bool match(Context*, const SiteMask& mask) - { - return mask.typeMask & lir::Operand::AddressMask; - } - - virtual bool loneMatch(Context*, const SiteMask&) - { - return false; - } - - virtual bool matchNextWord(Context* c, Site*, unsigned) - { - abort(c); - } - - virtual lir::Operand::Type type(Context*) - { - return lir::Operand::Type::Address; - } - - virtual void asAssemblerOperand(Context* c UNUSED, - Site* high UNUSED, - lir::Operand* result) - { - assertT(c, high == this); - - new (result) lir::Address(address); - } - - virtual Site* copy(Context* c) - { - return addressSite(c, address); - } - - virtual Site* copyLow(Context* c) - { - abort(c); - } - - virtual Site* copyHigh(Context* c) - { - abort(c); - } - - virtual Site* makeNextWord(Context* c, unsigned) - { - abort(c); - } - - virtual SiteMask mask(Context*) - { - return SiteMask(lir::Operand::AddressMask, 0, NoFrameIndex); - } - - virtual SiteMask nextWordMask(Context* c, unsigned) - { - abort(c); - } - - Promise* address; -}; - -Site* addressSite(Context* c, Promise* address) -{ - return new (c->zone) AddressSite(address); -} - -RegisterSite::RegisterSite(RegisterMask mask, Register number) - : mask_(mask), number(number) -{ -} - -unsigned RegisterSite::toString(Context*, char* buffer, unsigned bufferSize) -{ - if (number != NoRegister) { - return vm::snprintf(buffer, bufferSize, "%p register %d", this, number); - } else { - return vm::snprintf( - buffer, bufferSize, "%p register unacquired (mask %d)", this, mask_); - } -} - -unsigned RegisterSite::copyCost(Context* c, Site* s) -{ - assertT(c, number != NoRegister); - - if (s and (this == s - or (s->type(c) == lir::Operand::Type::RegisterPair - and (static_cast(s)->mask_.contains(number))))) { - return 0; - } else { - return RegisterCopyCost; - } -} - -bool RegisterSite::match(Context* c UNUSED, const SiteMask& mask) -{ - assertT(c, number != NoRegister); - - if ((mask.typeMask & lir::Operand::RegisterPairMask)) { - return mask.registerMask.contains(number); - } else { - return false; - } -} - -bool RegisterSite::loneMatch(Context* c UNUSED, const SiteMask& mask) -{ - assertT(c, number != NoRegister); - - if ((mask.typeMask & lir::Operand::RegisterPairMask)) { - return mask.registerMask.containsExactly(number); - } else { - return false; - } -} - -bool RegisterSite::matchNextWord(Context* c, Site* s, unsigned) -{ - assertT(c, number != NoRegister); - - if (s->type(c) != lir::Operand::Type::RegisterPair) { - return false; - } - - RegisterSite* rs = static_cast(s); - unsigned size = rs->registerSize(c); - if (size > c->targetInfo.pointerSize) { - assertT(c, number != NoRegister); - return number == rs->number; - } else { - RegisterMask mask = c->regFile->generalRegisters; - return mask.contains(number) and mask.contains(rs->number); - } -} - -void RegisterSite::acquire(Context* c, Value* v) -{ - Target target; - if (number != NoRegister) { - target = Target(number, 0); - } else { - target = pickRegisterTarget(c, v, mask_); - expect(c, target.cost < Target::Impossible); - } - - RegisterResource* resource = c->registerResources + target.index; - compiler::acquire(c, resource, v, this); - - number = Register(target.index); -} - -void RegisterSite::release(Context* c, Value* v) -{ - assertT(c, number != NoRegister); - - compiler::release(c, c->registerResources + number.index(), v, this); -} - -void RegisterSite::freeze(Context* c, Value* v) -{ - assertT(c, number != NoRegister); - - c->registerResources[number.index()].freeze(c, v); -} - -void RegisterSite::thaw(Context* c, Value* v) -{ - assertT(c, number != NoRegister); - - c->registerResources[number.index()].thaw(c, v); -} - -bool RegisterSite::frozen(Context* c UNUSED) -{ - assertT(c, number != NoRegister); - - return c->registerResources[number.index()].freezeCount != 0; -} - -lir::Operand::Type RegisterSite::type(Context*) -{ - return lir::Operand::Type::RegisterPair; -} - -void RegisterSite::asAssemblerOperand(Context* c UNUSED, - Site* high, - lir::Operand* result) -{ - assertT(c, number != NoRegister); - - Register highNumber; - if (high != this) { - highNumber = static_cast(high)->number; - assertT(c, highNumber != NoRegister); - } else { - highNumber = NoRegister; - } - - new (result) lir::RegisterPair(number, highNumber); -} - -Site* RegisterSite::copy(Context* c) -{ - RegisterMask mask; - - if (number != NoRegister) { - mask = RegisterMask(number); - } else { - mask = mask_; - } - - return freeRegisterSite(c, mask); -} - -Site* RegisterSite::copyLow(Context* c) -{ - abort(c); -} - -Site* RegisterSite::copyHigh(Context* c) -{ - abort(c); -} - -Site* RegisterSite::makeNextWord(Context* c, unsigned) -{ - assertT(c, number != NoRegister); - assertT(c, c->regFile->generalRegisters.contains(number)); - - return freeRegisterSite(c, c->regFile->generalRegisters); -} - -SiteMask RegisterSite::mask(Context* c UNUSED) -{ - return SiteMask(lir::Operand::RegisterPairMask, mask_, NoFrameIndex); -} - -SiteMask RegisterSite::nextWordMask(Context* c, unsigned) -{ - assertT(c, number != NoRegister); - - if (registerSize(c) > c->targetInfo.pointerSize) { - return SiteMask(lir::Operand::RegisterPairMask, number, NoFrameIndex); - } else { - return SiteMask(lir::Operand::RegisterPairMask, - c->regFile->generalRegisters, - NoFrameIndex); - } -} - -unsigned RegisterSite::registerSize(Context* c) -{ - assertT(c, number != NoRegister); - - if (c->regFile->floatRegisters.contains(number)) { - return c->arch->floatRegisterSize(); - } else { - return c->targetInfo.pointerSize; - } -} - -RegisterMask RegisterSite::registerMask(Context* c UNUSED) -{ - assertT(c, number != NoRegister); - - return RegisterMask(number); -} - -Site* registerSite(Context* c, Register number) -{ - assertT(c, number != NoRegister); - assertT(c, - (c->regFile->generalRegisters - | c->regFile->floatRegisters).contains(number)); - - return new (c->zone) RegisterSite(RegisterMask(number), number); -} - -Site* freeRegisterSite(Context* c, RegisterMask mask) -{ - return new (c->zone) RegisterSite(mask, NoRegister); -} - -MemorySite::MemorySite(Register base, int offset, Register index, unsigned scale) - : acquired(false), base(base), offset(offset), index(index), scale(scale) -{ -} - -unsigned MemorySite::toString(Context*, char* buffer, unsigned bufferSize) -{ - if (acquired) { - return vm::snprintf( - buffer, bufferSize, "memory %d 0x%x %d %d", base, offset, index, scale); - } else { - return vm::snprintf(buffer, bufferSize, "memory unacquired"); - } -} - -unsigned MemorySite::copyCost(Context* c, Site* s) -{ - assertT(c, acquired); - - if (s and (this == s or (s->type(c) == lir::Operand::Type::Memory - and static_cast(s)->base == base - and static_cast(s)->offset == offset - and static_cast(s)->index == index - and static_cast(s)->scale == scale))) { - return 0; - } else { - return MemoryCopyCost; - } -} - -bool MemorySite::conflicts(const SiteMask& mask) -{ - return (mask.typeMask & lir::Operand::RegisterPairMask) != 0 - and (!mask.registerMask.contains(base) - or (index != NoRegister - and !mask.registerMask.contains(index))); -} - -bool MemorySite::match(Context* c, const SiteMask& mask) -{ - assertT(c, acquired); - - if (mask.typeMask & lir::Operand::MemoryMask) { - if (mask.frameIndex >= 0) { - if (base == c->arch->stack()) { - assertT(c, index == NoRegister); - return static_cast(frameIndexToOffset(c, mask.frameIndex)) - == offset; - } else { - return false; - } - } else { - return true; - } - } else { - return false; - } -} - -bool MemorySite::loneMatch(Context* c, const SiteMask& mask) -{ - assertT(c, acquired); - - if (mask.typeMask & lir::Operand::MemoryMask) { - if (base == c->arch->stack()) { - assertT(c, index == NoRegister); - - if (mask.frameIndex == AnyFrameIndex) { - return false; - } else { - return true; - } - } - } - return false; -} - -bool MemorySite::matchNextWord(Context* c, Site* s, unsigned index) -{ - if (s->type(c) == lir::Operand::Type::Memory) { - MemorySite* ms = static_cast(s); - return ms->base == this->base - and ((index == 1 - and ms->offset - == static_cast(this->offset - + c->targetInfo.pointerSize)) - or (index == 0 - and this->offset - == static_cast(ms->offset - + c->targetInfo.pointerSize))) - and ms->index == this->index and ms->scale == this->scale; - } else { - return false; - } -} - -void MemorySite::acquire(Context* c, Value* v) -{ - c->registerResources[base.index()].increment(c); - if (index != NoRegister) { - c->registerResources[index.index()].increment(c); - } - - if (base == c->arch->stack()) { - assertT(c, index == NoRegister); - assertT(c, not c->frameResources[offsetToFrameIndex(c, offset)].reserved); - - compiler::acquire( - c, c->frameResources + offsetToFrameIndex(c, offset), v, this); - } - - acquired = true; -} - -void MemorySite::release(Context* c, Value* v) -{ - if (base == c->arch->stack()) { - assertT(c, index == NoRegister); - assertT(c, not c->frameResources[offsetToFrameIndex(c, offset)].reserved); - - compiler::release( - c, c->frameResources + offsetToFrameIndex(c, offset), v, this); - } - - c->registerResources[base.index()].decrement(c); - if (index != NoRegister) { - c->registerResources[index.index()].decrement(c); - } - - acquired = false; -} - -void MemorySite::freeze(Context* c, Value* v) -{ - if (base == c->arch->stack()) { - c->frameResources[offsetToFrameIndex(c, offset)].freeze(c, v); - } else { - c->registerResources[base.index()].increment(c); - if (index != NoRegister) { - c->registerResources[index.index()].increment(c); - } - } -} - -void MemorySite::thaw(Context* c, Value* v) -{ - if (base == c->arch->stack()) { - c->frameResources[offsetToFrameIndex(c, offset)].thaw(c, v); - } else { - c->registerResources[base.index()].decrement(c); - if (index != NoRegister) { - c->registerResources[index.index()].decrement(c); - } - } -} - -bool MemorySite::frozen(Context* c) -{ - return base == c->arch->stack() - and c->frameResources[offsetToFrameIndex(c, offset)].freezeCount != 0; -} - -lir::Operand::Type MemorySite::type(Context*) -{ - return lir::Operand::Type::Memory; -} - -void MemorySite::asAssemblerOperand(Context* c UNUSED, - Site* high UNUSED, - lir::Operand* result) -{ - // todo: endianness? - assertT(c, - high == this - or (static_cast(high)->base == base - and static_cast(high)->offset - == static_cast(offset + c->targetInfo.pointerSize) - and static_cast(high)->index == index - and static_cast(high)->scale == scale)); - - assertT(c, acquired); - - new (result) lir::Memory(base, offset, index, scale); -} - -Site* MemorySite::copy(Context* c) -{ - return memorySite(c, base, offset, index, scale); -} - -Site* MemorySite::copyHalf(Context* c, bool add) -{ - if (add) { - return memorySite( - c, base, offset + c->targetInfo.pointerSize, index, scale); - } else { - return copy(c); - } -} - -Site* MemorySite::copyLow(Context* c) -{ - return copyHalf(c, c->arch->bigEndian()); -} - -Site* MemorySite::copyHigh(Context* c) -{ - return copyHalf(c, not c->arch->bigEndian()); -} - -Site* MemorySite::makeNextWord(Context* c, unsigned index) -{ - return memorySite(c, - base, - offset + ((index == 1) xor c->arch->bigEndian() - ? c->targetInfo.pointerSize - : -c->targetInfo.pointerSize), - this->index, - scale); -} - -SiteMask MemorySite::mask(Context* c) -{ - return SiteMask(lir::Operand::MemoryMask, - 0, - (base == c->arch->stack()) - ? static_cast(offsetToFrameIndex(c, offset)) - : NoFrameIndex); -} - -SiteMask MemorySite::nextWordMask(Context* c, unsigned index) -{ - int frameIndex; - if (base == c->arch->stack()) { - assertT(c, this->index == NoRegister); - frameIndex = static_cast(offsetToFrameIndex(c, offset)) - + ((index == 1) xor c->arch->bigEndian() ? 1 : -1); - } else { - frameIndex = NoFrameIndex; - } - return SiteMask(lir::Operand::MemoryMask, 0, frameIndex); -} - -bool MemorySite::isVolatile(Context* c) -{ - return base != c->arch->stack(); -} - -MemorySite* memorySite(Context* c, - Register base, - int offset, - Register index, - unsigned scale) -{ - return new (c->zone) MemorySite(base, offset, index, scale); -} - -MemorySite* frameSite(Context* c, int frameIndex) -{ - assertT(c, frameIndex >= 0); - return memorySite(c, - c->arch->stack(), - frameIndexToOffset(c, frameIndex), - NoRegister, - 0); -} - -} // namespace compiler -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/site.h b/sgx-jvm/avian/src/codegen/compiler/site.h deleted file mode 100644 index 9629455c88..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/site.h +++ /dev/null @@ -1,371 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_SITE_H -#define AVIAN_CODEGEN_COMPILER_SITE_H - -#include - -#include "codegen/compiler/value.h" -#include "codegen/compiler/context.h" - -namespace avian { -namespace codegen { -namespace compiler { - -class Context; - -const unsigned RegisterCopyCost = 1; -const unsigned AddressCopyCost = 2; -const unsigned ConstantCopyCost = 3; -const unsigned MemoryCopyCost = 4; -const unsigned CopyPenalty = 10; - -class SiteMask { - public: - SiteMask() : typeMask(~0), registerMask(~0), frameIndex(AnyFrameIndex) - { - } - - SiteMask(uint8_t typeMask, RegisterMask registerMask, int frameIndex) - : typeMask(typeMask), registerMask(registerMask), frameIndex(frameIndex) - { - } - - SiteMask intersectionWith(const SiteMask& b); - - static SiteMask fixedRegisterMask(Register number) - { - return SiteMask(lir::Operand::RegisterPairMask, 1 << number.index(), NoFrameIndex); - } - - static SiteMask lowPart(const OperandMask& mask) - { - return SiteMask(mask.typeMask, mask.lowRegisterMask, AnyFrameIndex); - } - - static SiteMask highPart(const OperandMask& mask) - { - return SiteMask(mask.typeMask, mask.highRegisterMask, AnyFrameIndex); - } - - uint8_t typeMask; - RegisterMask registerMask; - int frameIndex; -}; - -class Site { - public: - Site() : next(0) - { - } - - virtual Site* readTarget(Context*, Read*) - { - return this; - } - - virtual unsigned toString(Context*, char*, unsigned) = 0; - - virtual unsigned copyCost(Context*, Site*) = 0; - - virtual bool match(Context*, const SiteMask&) = 0; - - virtual bool loneMatch(Context*, const SiteMask&) = 0; - - virtual bool matchNextWord(Context*, Site*, unsigned) = 0; - - virtual void acquire(Context*, Value*) - { - } - - virtual void release(Context*, Value*) - { - } - - virtual void freeze(Context*, Value*) - { - } - - virtual void thaw(Context*, Value*) - { - } - - virtual bool frozen(Context*) - { - return false; - } - - virtual lir::Operand::Type type(Context*) = 0; - - virtual void asAssemblerOperand(Context*, Site*, lir::Operand*) = 0; - - virtual Site* copy(Context*) = 0; - - virtual Site* copyLow(Context*) = 0; - - virtual Site* copyHigh(Context*) = 0; - - virtual Site* makeNextWord(Context*, unsigned) = 0; - - virtual SiteMask mask(Context*) = 0; - - virtual SiteMask nextWordMask(Context*, unsigned) = 0; - - virtual unsigned registerSize(Context*); - - virtual RegisterMask registerMask(Context*) - { - return RegisterMask(0); - } - - virtual bool isVolatile(Context*) - { - return false; - } - - Site* next; -}; - -class SiteIterator { - public: - SiteIterator(Context* c, - Value* v, - bool includeBuddies = true, - bool includeNextWord = true); - - Site** findNext(Site** p); - bool hasMore(); - Site* next(); - void remove(Context* c); - - Context* c; - Value* originalValue; - Value* currentValue; - bool includeBuddies; - bool includeNextWord; - uint8_t pass; - Site** next_; - Site** previous; -}; - -Site* constantSite(Context* c, Promise* value); -Site* constantSite(Context* c, int64_t value); - -Promise* combinedPromise(Context* c, Promise* low, Promise* high); -Promise* shiftMaskPromise(Context* c, - Promise* base, - unsigned shift, - int64_t mask); - -class ConstantSite : public Site { - public: - ConstantSite(Promise* value) : value(value) - { - } - - virtual unsigned toString(Context*, char* buffer, unsigned bufferSize) - { - if (value->resolved()) { - return vm::snprintf(buffer, bufferSize, "constant %" LLD, value->value()); - } else { - return vm::snprintf(buffer, bufferSize, "constant unresolved"); - } - } - - virtual unsigned copyCost(Context*, Site* s) - { - return (s == this ? 0 : ConstantCopyCost); - } - - virtual bool match(Context*, const SiteMask& mask) - { - return mask.typeMask & lir::Operand::ConstantMask; - } - - virtual bool loneMatch(Context*, const SiteMask&) - { - return true; - } - - virtual bool matchNextWord(Context* c, Site* s, unsigned) - { - return s->type(c) == lir::Operand::Type::Constant; - } - - virtual lir::Operand::Type type(Context*) - { - return lir::Operand::Type::Constant; - } - - virtual void asAssemblerOperand(Context* c, Site* high, lir::Operand* result) - { - Promise* v = value; - if (high != this) { - v = combinedPromise(c, value, static_cast(high)->value); - } - new (result) lir::Constant(v); - } - - virtual Site* copy(Context* c) - { - return constantSite(c, value); - } - - virtual Site* copyLow(Context* c) - { - return constantSite(c, shiftMaskPromise(c, value, 0, 0xFFFFFFFF)); - } - - virtual Site* copyHigh(Context* c) - { - return constantSite(c, shiftMaskPromise(c, value, 32, 0xFFFFFFFF)); - } - - virtual Site* makeNextWord(Context* c, unsigned) - { - abort(c); - } - - virtual SiteMask mask(Context*) - { - return SiteMask(lir::Operand::ConstantMask, 0, NoFrameIndex); - } - - virtual SiteMask nextWordMask(Context*, unsigned) - { - return SiteMask(lir::Operand::ConstantMask, 0, NoFrameIndex); - } - - Promise* value; -}; - -Site* addressSite(Context* c, Promise* address); - -class RegisterSite : public Site { - public: - RegisterSite(RegisterMask mask, Register number); - - virtual unsigned toString(Context*, char* buffer, unsigned bufferSize); - - virtual unsigned copyCost(Context* c, Site* s); - - virtual bool match(Context* c UNUSED, const SiteMask& mask); - - virtual bool loneMatch(Context* c UNUSED, const SiteMask& mask); - - virtual bool matchNextWord(Context* c, Site* s, unsigned); - - virtual void acquire(Context* c, Value* v); - - virtual void release(Context* c, Value* v); - - virtual void freeze(Context* c, Value* v); - - virtual void thaw(Context* c, Value* v); - - virtual bool frozen(Context* c UNUSED); - - virtual lir::Operand::Type type(Context*); - - virtual void asAssemblerOperand(Context* c UNUSED, - Site* high, - lir::Operand* result); - - virtual Site* copy(Context* c); - - virtual Site* copyLow(Context* c); - - virtual Site* copyHigh(Context* c); - - virtual Site* makeNextWord(Context* c, unsigned); - - virtual SiteMask mask(Context* c UNUSED); - - virtual SiteMask nextWordMask(Context* c, unsigned); - - virtual unsigned registerSize(Context* c); - - virtual RegisterMask registerMask(Context* c UNUSED); - - RegisterMask mask_; - Register number; -}; - -Site* registerSite(Context* c, Register number); -Site* freeRegisterSite(Context* c, RegisterMask mask); - -class MemorySite : public Site { - public: - MemorySite(Register base, int offset, Register index, unsigned scale); - - virtual unsigned toString(Context*, char* buffer, unsigned bufferSize); - - virtual unsigned copyCost(Context* c, Site* s); - - bool conflicts(const SiteMask& mask); - - virtual bool match(Context* c, const SiteMask& mask); - - virtual bool loneMatch(Context* c, const SiteMask& mask); - - virtual bool matchNextWord(Context* c, Site* s, unsigned index); - - virtual void acquire(Context* c, Value* v); - - virtual void release(Context* c, Value* v); - - virtual void freeze(Context* c, Value* v); - - virtual void thaw(Context* c, Value* v); - - virtual bool frozen(Context* c); - - virtual lir::Operand::Type type(Context*); - - virtual void asAssemblerOperand(Context* c UNUSED, - Site* high UNUSED, - lir::Operand* result); - - virtual Site* copy(Context* c); - - Site* copyHalf(Context* c, bool add); - - virtual Site* copyLow(Context* c); - - virtual Site* copyHigh(Context* c); - - virtual Site* makeNextWord(Context* c, unsigned index); - - virtual SiteMask mask(Context* c); - - virtual SiteMask nextWordMask(Context* c, unsigned index); - - virtual bool isVolatile(Context* c); - - bool acquired; - Register base; - int offset; - Register index; - unsigned scale; -}; - -MemorySite* memorySite(Context* c, - Register base, - int offset = 0, - Register index = NoRegister, - unsigned scale = 1); -MemorySite* frameSite(Context* c, int frameIndex); - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_SITE_H diff --git a/sgx-jvm/avian/src/codegen/compiler/value.cpp b/sgx-jvm/avian/src/codegen/compiler/value.cpp deleted file mode 100644 index b4c44e8837..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/value.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" - -#include "codegen/compiler/regalloc.h" -#include "codegen/compiler/site.h" - -namespace avian { -namespace codegen { -namespace compiler { - -Value::Value(Site* site, Site* target, ir::Type type) - : ir::Value(type), - reads(0), - lastRead(0), - sites(site), - source(0), - target(target), - buddy(this), - nextWord(this), - home(NoFrameIndex), - wordIndex(0) -{ -} - -bool Value::findSite(Site* site) -{ - for (Site* s = this->sites; s; s = s->next) { - if (s == site) - return true; - } - return false; -} - -bool Value::isBuddyOf(Value* b) -{ - Value* a = this; - if (a == b) - return true; - for (Value* p = a->buddy; p != a; p = p->buddy) { - if (p == b) - return true; - } - return false; -} - -void Value::addSite(Context* c, Site* s) -{ - if (not this->findSite(s)) { - if (DebugSites) { - char buffer[256]; - s->toString(c, buffer, 256); - fprintf(stderr, "add site %s to %p\n", buffer, this); - } - s->acquire(c, this); - s->next = this->sites; - this->sites = s; - } -} - -void Value::grow(Context* c) -{ - assertT(c, this->nextWord == this); - - Value* next = value(c, this->type); - this->nextWord = next; - next->nextWord = this; - next->wordIndex = 1; -} - -void Value::maybeSplit(Context* c) -{ - if (this->nextWord == this) { - this->split(c); - } -} - -void Value::split(Context* c) -{ - this->grow(c); - for (SiteIterator it(c, this); it.hasMore();) { - Site* s = it.next(); - this->removeSite(c, s); - - this->addSite(c, s->copyLow(c)); - this->nextWord->addSite(c, s->copyHigh(c)); - } -} - -void Value::removeSite(Context* c, Site* s) -{ - for (SiteIterator it(c, this); it.hasMore();) { - if (s == it.next()) { - if (DebugSites) { - char buffer[256]; - s->toString(c, buffer, 256); - fprintf(stderr, "remove site %s from %p\n", buffer, this); - } - it.remove(c); - break; - } - } - if (DebugSites) { - fprintf(stderr, "%p has more: %d\n", this, this->hasSite(c)); - } - assertT(c, not this->findSite(s)); -} - -bool Value::hasSite(Context* c) -{ - SiteIterator it(c, this); - return it.hasMore(); -} - -bool Value::uniqueSite(Context* c, Site* s) -{ - SiteIterator it(c, this); - Site* p UNUSED = it.next(); - if (it.hasMore()) { - // the site is not this word's only site, but if the site is - // shared with the next word, it may be that word's only site - if (this->nextWord != this - and s->registerSize(c) > c->targetInfo.pointerSize) { - SiteIterator nit(c, this->nextWord); - Site* p = nit.next(); - if (nit.hasMore()) { - return false; - } else { - return p == s; - } - } else { - return false; - } - } else { - assertT(c, p == s); - return true; - } -} - -void Value::clearSites(Context* c) -{ - if (DebugSites) { - fprintf(stderr, "clear sites for %p\n", this); - } - for (SiteIterator it(c, this); it.hasMore();) { - it.next(); - it.remove(c); - } -} - -#ifndef NDEBUG -bool Value::hasBuddy(Context* c, Value* b) -{ - Value* a = this; - if (a == b) { - return true; - } - - int i = 0; - for (Value* p = a->buddy; p != a; p = p->buddy) { - if (p == b) { - return true; - } - if (++i > 1000) { - abort(c); - } - } - return false; -} -#endif // not NDEBUG - -Value* value(Context* c, ir::Type type, Site* site, Site* target) -{ - return new (c->zone) Value(site, target, type); -} - -} // namespace regalloc -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/compiler/value.h b/sgx-jvm/avian/src/codegen/compiler/value.h deleted file mode 100644 index 76f67987b9..0000000000 --- a/sgx-jvm/avian/src/codegen/compiler/value.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_COMPILER_VALUE_H -#define AVIAN_CODEGEN_COMPILER_VALUE_H - -#include -#include - -namespace avian { -namespace codegen { -namespace compiler { - -class Read; -class Site; - -const int AnyFrameIndex = -2; -const int NoFrameIndex = -1; - -const bool DebugSites = false; - -class Value : public ir::Value { - public: - Read* reads; - Read* lastRead; - Site* sites; - Site* source; - Site* target; - Value* buddy; - Value* nextWord; - int16_t home; - uint8_t wordIndex; - - Value(Site* site, Site* target, ir::Type type); - - bool findSite(Site* site); - - bool isBuddyOf(Value* b); - - void addSite(Context* c, Site* s); - - void grow(Context* c); - - void maybeSplit(Context* c); - - void split(Context* c); - - void removeSite(Context* c, Site* s); - - bool hasSite(Context* c); - - bool uniqueSite(Context* c, Site* s); - - void clearSites(Context* c); - -#ifndef NDEBUG - bool hasBuddy(Context* c, Value* b); -#endif // not NDEBUG -}; - -inline bool isFloatValue(ir::Value* a) -{ - return static_cast(a)->type.flavor() == ir::Type::Float; -} - -inline bool isGeneralValue(ir::Value* a) -{ - return !isFloatValue(a); -} - -Value* value(Context* c, ir::Type type, Site* site = 0, Site* target = 0); - -} // namespace compiler -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_COMPILER_VALUE_H diff --git a/sgx-jvm/avian/src/codegen/runtime.cpp b/sgx-jvm/avian/src/codegen/runtime.cpp deleted file mode 100644 index b868464492..0000000000 --- a/sgx-jvm/avian/src/codegen/runtime.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -namespace avian { -namespace codegen { -namespace runtime { - -static bool isNaN(double v) -{ - return fpclassify(v) == FP_NAN; -} - -static bool isNaN(float v) -{ - return fpclassify(v) == FP_NAN; -} - -int64_t compareDoublesG(uint64_t bi, uint64_t ai) -{ - double a = vm::bitsToDouble(ai); - double b = vm::bitsToDouble(bi); - - if (isNaN(a) or isNaN(b)) { - return 1; - } else if (a < b) { - return -1; - } else if (a > b) { - return 1; - } else if (a == b) { - return 0; - } else { - return 1; - } -} - -int64_t compareDoublesL(uint64_t bi, uint64_t ai) -{ - double a = vm::bitsToDouble(ai); - double b = vm::bitsToDouble(bi); - - if (isNaN(a) or isNaN(b)) { - return -1; - } else if (a < b) { - return -1; - } else if (a > b) { - return 1; - } else if (a == b) { - return 0; - } else { - return -1; - } -} - -int64_t compareFloatsG(uint32_t bi, uint32_t ai) -{ - float a = vm::bitsToFloat(ai); - float b = vm::bitsToFloat(bi); - - if (isNaN(a) or isNaN(b)) { - return 1; - } - if (a < b) { - return -1; - } else if (a > b) { - return 1; - } else if (a == b) { - return 0; - } else { - return 1; - } -} - -int64_t compareFloatsL(uint32_t bi, uint32_t ai) -{ - float a = vm::bitsToFloat(ai); - float b = vm::bitsToFloat(bi); - - if (isNaN(a) or isNaN(b)) { - return -1; - } - if (a < b) { - return -1; - } else if (a > b) { - return 1; - } else if (a == b) { - return 0; - } else { - return -1; - } -} - -int64_t compareLongs(uint64_t b, uint64_t a) -{ - if (a < b) { - return -1; - } else if (a > b) { - return 1; - } else { - return 0; - } -} - -uint64_t addDouble(uint64_t b, uint64_t a) -{ - return vm::doubleToBits(vm::bitsToDouble(a) + vm::bitsToDouble(b)); -} - -uint64_t subtractDouble(uint64_t b, uint64_t a) -{ - return vm::doubleToBits(vm::bitsToDouble(a) - vm::bitsToDouble(b)); -} - -uint64_t multiplyDouble(uint64_t b, uint64_t a) -{ - return vm::doubleToBits(vm::bitsToDouble(a) * vm::bitsToDouble(b)); -} - -uint64_t divideDouble(uint64_t b, uint64_t a) -{ - return vm::doubleToBits(vm::bitsToDouble(a) / vm::bitsToDouble(b)); -} - -uint64_t moduloDouble(uint64_t b, uint64_t a) -{ - return vm::doubleToBits(fmod(vm::bitsToDouble(a), vm::bitsToDouble(b))); -} - -uint64_t negateDouble(uint64_t a) -{ - return vm::doubleToBits(-vm::bitsToDouble(a)); -} - -uint64_t squareRootDouble(uint64_t a) -{ - return vm::doubleToBits(sqrt(vm::bitsToDouble(a))); -} - -uint64_t doubleToFloat(int64_t a) -{ - return vm::floatToBits(static_cast(vm::bitsToDouble(a))); -} - -int64_t doubleToInt(int64_t a) -{ - double f = vm::bitsToDouble(a); - switch (fpclassify(f)) { - case FP_NAN: - return 0; - case FP_INFINITE: - return signbit(f) ? INT32_MIN : INT32_MAX; - default: - return f >= INT32_MAX - ? INT32_MAX - : (f <= INT32_MIN ? INT32_MIN : static_cast(f)); - } -} - -int64_t doubleToLong(int64_t a) -{ - double f = vm::bitsToDouble(a); - switch (fpclassify(f)) { - case FP_NAN: - return 0; - case FP_INFINITE: - return signbit(f) ? INT64_MIN : INT64_MAX; - default: - return f >= INT64_MAX - ? INT64_MAX - : (f <= INT64_MIN ? INT64_MIN : static_cast(f)); - } -} - -uint64_t addFloat(uint32_t b, uint32_t a) -{ - return vm::floatToBits(vm::bitsToFloat(a) + vm::bitsToFloat(b)); -} - -uint64_t subtractFloat(uint32_t b, uint32_t a) -{ - return vm::floatToBits(vm::bitsToFloat(a) - vm::bitsToFloat(b)); -} - -uint64_t multiplyFloat(uint32_t b, uint32_t a) -{ - return vm::floatToBits(vm::bitsToFloat(a) * vm::bitsToFloat(b)); -} - -uint64_t divideFloat(uint32_t b, uint32_t a) -{ - return vm::floatToBits(vm::bitsToFloat(a) / vm::bitsToFloat(b)); -} - -uint64_t moduloFloat(uint32_t b, uint32_t a) -{ - return vm::floatToBits(fmod(vm::bitsToFloat(a), vm::bitsToFloat(b))); -} - -uint64_t negateFloat(uint32_t a) -{ - return vm::floatToBits(-vm::bitsToFloat(a)); -} - -uint64_t absoluteFloat(uint32_t a) -{ - return vm::floatToBits(fabsf(vm::bitsToFloat(a))); -} - -int64_t absoluteLong(int64_t a) -{ - return a > 0 ? a : -a; -} - -int64_t absoluteInt(int32_t a) -{ - return a > 0 ? a : -a; -} - -uint64_t floatToDouble(int32_t a) -{ - return vm::doubleToBits(static_cast(vm::bitsToFloat(a))); -} - -int64_t floatToInt(int32_t a) -{ - float f = vm::bitsToFloat(a); - switch (fpclassify(f)) { - case FP_NAN: - return 0; - case FP_INFINITE: - return signbit(f) ? INT32_MIN : INT32_MAX; - default: - return f >= INT32_MAX - ? INT32_MAX - : (f <= INT32_MIN ? INT32_MIN : static_cast(f)); - } -} - -int64_t floatToLong(int32_t a) -{ - float f = vm::bitsToFloat(a); - switch (fpclassify(f)) { - case FP_NAN: - return 0; - case FP_INFINITE: - return signbit(f) ? INT64_MIN : INT64_MAX; - default: - return static_cast(f); - } -} - -uint64_t intToDouble(int32_t a) -{ - return vm::doubleToBits(static_cast(a)); -} - -uint64_t intToFloat(int32_t a) -{ - return vm::floatToBits(static_cast(a)); -} - -uint64_t longToDouble(int64_t a) -{ - return vm::doubleToBits(static_cast(a)); -} - -uint64_t longToFloat(int64_t a) -{ - return vm::floatToBits(static_cast(a)); -} - -} // namespace runtime -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/CMakeLists.txt b/sgx-jvm/avian/src/codegen/target/CMakeLists.txt deleted file mode 100644 index 55edb6b112..0000000000 --- a/sgx-jvm/avian/src/codegen/target/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(arm) -add_subdirectory(x86) diff --git a/sgx-jvm/avian/src/codegen/target/arm/CMakeLists.txt b/sgx-jvm/avian/src/codegen/target/arm/CMakeLists.txt deleted file mode 100644 index 23faf6694f..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -add_library(avian_codegen_arm - assembler.cpp - block.cpp - context.cpp - fixup.cpp - multimethod.cpp - operations32.cpp - operations64.cpp -) diff --git a/sgx-jvm/avian/src/codegen/target/arm/assembler.cpp b/sgx-jvm/avian/src/codegen/target/arm/assembler.cpp deleted file mode 100644 index a72bd5edf5..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/assembler.cpp +++ /dev/null @@ -1,1178 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include -#include -#include - -#include "context.h" -#include "block.h" -#include "fixup.h" -#include "multimethod.h" -#include "encode.h" -#include "operations.h" -#include "registers.h" -#include "../multimethod.h" - -#include "avian/alloc-vector.h" -#include - -using namespace vm; -using namespace avian::codegen; -using namespace avian::util; - -namespace avian { -namespace codegen { -namespace arm { - -namespace isa { -// HARDWARE FLAGS -bool vfpSupported() -{ -// TODO: Use at runtime detection -#if (defined __ARM_PCS_VFP) || (defined ARCH_arm64) - // armhf - return true; -#else - // armel - // TODO: allow VFP use for -mfloat-abi=softfp armel builds. - // GCC -mfloat-abi=softfp flag allows use of VFP while remaining compatible - // with soft-float code. - return false; -#endif -} -} // namespace isa - -const RegisterFile MyRegisterFileWithoutFloats(GPR_MASK, 0); -const RegisterFile MyRegisterFileWithFloats(GPR_MASK, FPR_MASK); - -const unsigned FrameHeaderSize = TargetBytesPerWord / 4; - -const unsigned StackAlignmentInBytes = TargetBytesPerWord * 2; -const unsigned StackAlignmentInWords = StackAlignmentInBytes - / TargetBytesPerWord; - -void resolve(MyBlock*); - -unsigned padding(MyBlock*, unsigned); - -class ConstantPoolEntry; - -// BEGIN OPERATION COMPILERS - -using namespace isa; - -// END OPERATION COMPILERS - -unsigned argumentFootprint(unsigned footprint) -{ - return max(pad(footprint, StackAlignmentInWords), StackAlignmentInWords); -} - -void nextFrame(ArchitectureContext* con, - uint32_t* start, - unsigned size UNUSED, - unsigned footprint, - void* link, - bool, - int targetParameterFootprint UNUSED, - void** ip, - void** stack) -{ - assertT(con, *ip >= start); - assertT(con, *ip <= start + (size / 4)); - - uint32_t* instruction = static_cast(*ip); - - if ((*start >> 20) == (TargetBytesPerWord == 8 ? 0xf94 : 0xe59)) { - // skip stack overflow check - start += TargetBytesPerWord == 8 ? 4 : 3; - } - - if (instruction <= start) { - *ip = link; - return; - } - - unsigned offset = footprint + FrameHeaderSize; - - if (instruction <= start + 2) { - *ip = link; - *stack = static_cast(*stack) + offset; - return; - } - - if (*instruction == (TargetBytesPerWord == 8 ? 0xd61f03c0 : 0xe12fff1e)) { - // return - *ip = link; - return; - } - - if (TailCalls and targetParameterFootprint >= 0) { - if (argumentFootprint(targetParameterFootprint) > StackAlignmentInWords) { - offset += argumentFootprint(targetParameterFootprint) - - StackAlignmentInWords; - } - - // check for post-non-tail-call stack adjustment of the form "sub - // sp, sp, #offset": - if (TargetBytesPerWord == 8 and (*instruction & 0xff0003ff) == 0xd10003ff) { - unsigned value = (*instruction >> 10) & 0xfff; - unsigned shift = (*instruction >> 22) & 1; - switch (shift) { - case 0: - offset -= value / TargetBytesPerWord; - break; - case 1: - offset -= (value << 12) / TargetBytesPerWord; - break; - default: - abort(con); - } - } else if (TargetBytesPerWord == 4 and (*instruction >> 12) == 0xe24dd) { - unsigned value = *instruction & 0xff; - unsigned rotation = (*instruction >> 8) & 0xf; - switch (rotation) { - case 0: - offset -= value / TargetBytesPerWord; - break; - case 15: - offset -= value; - break; - default: - abort(con); - } - } - - // todo: check for and handle tail calls - } - - *ip = static_cast(*stack)[offset - 1]; - *stack = static_cast(*stack) + offset; -} - -class MyArchitecture : public Architecture { - public: - MyArchitecture(System* system) : con(system), referenceCount(0) - { - populateTables(&con); - } - - virtual unsigned floatRegisterSize() - { - return vfpSupported() ? 8 : 0; - } - - virtual const RegisterFile* registerFile() - { - return vfpSupported() ? &MyRegisterFileWithFloats - : &MyRegisterFileWithoutFloats; - } - - virtual Register scratch() - { - return Register(5); - } - - virtual Register stack() - { - return StackRegister; - } - - virtual Register thread() - { - return ThreadRegister; - } - - virtual Register returnLow() - { - return Register(0); - } - - virtual Register returnHigh() - { - return Register(1); - } - - virtual Register virtualCallTarget() - { - return Register(4); - } - - virtual Register virtualCallIndex() - { - return Register(3); - } - - virtual ir::TargetInfo targetInfo() - { - return ir::TargetInfo(TargetBytesPerWord); - } - - virtual bool bigEndian() - { - return false; - } - - virtual uintptr_t maximumImmediateJump() - { - return 0x1FFFFFF; - } - - virtual bool reserved(Register register_) - { - switch (register_.index()) { - case LinkRegister.index(): - case FrameRegister.index(): - case StackRegister.index(): - case ThreadRegister.index(): - case ProgramCounter.index(): - return true; - case 18: - // x18 is a reserved platform register on arm64 - return TargetBytesPerWord == 8; - - default: - return false; - } - } - - virtual unsigned frameFootprint(unsigned footprint) - { - return max(footprint, StackAlignmentInWords); - } - - virtual unsigned argumentFootprint(unsigned footprint) - { - return arm::argumentFootprint(footprint); - } - - virtual bool argumentAlignment() - { -#ifdef __APPLE__ - return false; -#else - return true; -#endif - } - - virtual bool argumentRegisterAlignment() - { -#ifdef __APPLE__ - return false; -#else - return true; -#endif - } - - virtual unsigned argumentRegisterCount() - { - return TargetBytesPerWord; - } - - virtual Register argumentRegister(unsigned index) - { - assertT(&con, index < argumentRegisterCount()); - - return Register(index); - } - - virtual bool hasLinkRegister() - { - return true; - } - - virtual unsigned stackAlignmentInWords() - { - return StackAlignmentInWords; - } - - virtual bool matchCall(void* returnAddress, void* target) - { - uint32_t* instruction = static_cast(returnAddress) - 1; - - return *instruction == static_cast( - bl(static_cast(target) - - reinterpret_cast(instruction))); - } - - virtual void updateCall(lir::UnaryOperation op UNUSED, - void* returnAddress, - void* newTarget) - { - switch (op) { - case lir::Call: - case lir::Jump: - case lir::AlignedCall: - case lir::AlignedJump: { - updateOffset(con.s, - static_cast(returnAddress) - 4, - reinterpret_cast(newTarget)); - } break; - - case lir::LongCall: - case lir::LongJump: - case lir::AlignedLongCall: - case lir::AlignedLongJump: { - uint32_t* p = static_cast(returnAddress) - 2; - if (TargetBytesPerWord == 8) { - const int32_t mask = (PoolOffsetMask >> 2) << 5; - *reinterpret_cast(p + ((*p & mask) >> 5)) = newTarget; - } else { - *reinterpret_cast(p + (((*p & PoolOffsetMask) + 8) / 4)) - = newTarget; - } - } break; - - default: - abort(&con); - } - } - - virtual unsigned constantCallSize() - { - return 4; - } - - virtual void setConstant(void* dst, uint64_t constant) - { - *static_cast(dst) = constant; - } - - virtual unsigned alignFrameSize(unsigned sizeInWords) - { - return pad(sizeInWords + FrameHeaderSize, StackAlignmentInWords) - - FrameHeaderSize; - } - - virtual void nextFrame(void* start, - unsigned size, - unsigned footprint, - void* link, - bool mostRecent, - int targetParameterFootprint, - void** ip, - void** stack) - { - arm::nextFrame(&con, - static_cast(start), - size, - footprint, - link, - mostRecent, - targetParameterFootprint, - ip, - stack); - } - - virtual void* frameIp(void* stack) - { - return stack ? static_cast(stack)[returnAddressOffset()] : 0; - } - - virtual unsigned frameHeaderSize() - { - return FrameHeaderSize; - } - - virtual unsigned frameReturnAddressSize() - { - return 0; - } - - virtual unsigned frameFooterSize() - { - return 0; - } - - virtual int returnAddressOffset() - { - return -1; - } - - virtual int framePointerOffset() - { - return 0; - } - - virtual bool alwaysCondensed(lir::BinaryOperation) - { - return false; - } - - virtual bool alwaysCondensed(lir::TernaryOperation) - { - return false; - } - - virtual void plan(lir::UnaryOperation, - unsigned, - OperandMask& aMask, - bool* thunk) - { - aMask.typeMask = lir::Operand::RegisterPairMask | lir::Operand::ConstantMask; - aMask.setLowHighRegisterMasks(AnyRegisterMask, AnyRegisterMask); - *thunk = false; - } - - virtual void planSource(lir::BinaryOperation op, - unsigned aSize, - OperandMask& aMask, - unsigned bSize, - bool* thunk) - { - *thunk = false; - aMask.typeMask = ~0; - aMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - - switch (op) { - case lir::Negate: - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - break; - - case lir::Absolute: - *thunk = true; - break; - - case lir::FloatAbsolute: - case lir::FloatSquareRoot: - case lir::FloatNegate: - case lir::Float2Float: - if (vfpSupported()) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(FPR_MASK, FPR_MASK); - } else { - *thunk = true; - } - break; - - case lir::Float2Int: - // todo: Java requires different semantics than VFP for - // converting floats to integers, we we need to either use - // thunks or produce inline machine code which handles edge - // cases properly. - if (false && vfpSupported() && bSize <= TargetBytesPerWord) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(FPR_MASK, FPR_MASK); - } else { - *thunk = true; - } - break; - - case lir::Int2Float: - if (vfpSupported() && aSize <= TargetBytesPerWord) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - } else { - *thunk = true; - } - break; - - default: - break; - } - } - - virtual void planDestination(lir::BinaryOperation op, - unsigned, - const OperandMask& aMask, - unsigned, - OperandMask& bMask) - { - bMask.typeMask = lir::Operand::RegisterPairMask | lir::Operand::MemoryMask; - bMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - - switch (op) { - case lir::Negate: - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - break; - - case lir::FloatAbsolute: - case lir::FloatSquareRoot: - case lir::FloatNegate: - case lir::Float2Float: - case lir::Int2Float: - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.setLowHighRegisterMasks(FPR_MASK, FPR_MASK); - break; - - case lir::Float2Int: - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - break; - - case lir::Move: - if (!(aMask.typeMask & lir::Operand::RegisterPairMask)) { - bMask.typeMask = lir::Operand::RegisterPairMask; - } - break; - - default: - break; - } - } - - virtual void planMove(unsigned, - OperandMask& srcMask, - OperandMask& tmpMask, - const OperandMask& dstMask) - { - srcMask.typeMask = ~0; - srcMask.setLowHighRegisterMasks(AnyRegisterMask, AnyRegisterMask); - - tmpMask.typeMask = 0; - tmpMask.setLowHighRegisterMasks(0, 0); - - if (dstMask.typeMask & lir::Operand::MemoryMask) { - // can't move directly from memory or constant to memory - srcMask.typeMask = lir::Operand::RegisterPairMask; - tmpMask.typeMask = lir::Operand::RegisterPairMask; - tmpMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - } else if (vfpSupported() && dstMask.typeMask & lir::Operand::RegisterPairMask - && dstMask.lowRegisterMask & FPR_MASK) { - srcMask.typeMask = tmpMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - tmpMask.setLowHighRegisterMasks(AnyRegisterMask, AnyRegisterMask); - } - } - - virtual void planSource(lir::TernaryOperation op, - unsigned, - OperandMask& aMask, - unsigned bSize, - OperandMask& bMask, - unsigned, - bool* thunk) - { - aMask.typeMask = lir::Operand::RegisterPairMask | lir::Operand::ConstantMask; - aMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.setLowHighRegisterMasks(GPR_MASK, GPR_MASK); - - *thunk = false; - - switch (op) { - case lir::ShiftLeft: - case lir::ShiftRight: - case lir::UnsignedShiftRight: - if (bSize > TargetBytesPerWord) - aMask.typeMask = bMask.typeMask = lir::Operand::RegisterPairMask; - break; - - case lir::Add: - case lir::Subtract: - case lir::Or: - case lir::Xor: - case lir::Multiply: - aMask.typeMask = bMask.typeMask = lir::Operand::RegisterPairMask; - break; - - // todo: Although ARM has instructions for integer division and - // remainder, they don't trap on division by zero, which is why - // we use thunks. Alternatively, we could generate inline code - // with an explicit zero check, which would probably be a bit - // faster. - case lir::Divide: - case lir::Remainder: - case lir::FloatRemainder: - *thunk = true; - break; - - case lir::FloatAdd: - case lir::FloatSubtract: - case lir::FloatMultiply: - case lir::FloatDivide: - if (vfpSupported()) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(FPR_MASK, FPR_MASK); - bMask = aMask; - } else { - *thunk = true; - } - break; - - case lir::JumpIfFloatEqual: - case lir::JumpIfFloatNotEqual: - case lir::JumpIfFloatLess: - case lir::JumpIfFloatGreater: - case lir::JumpIfFloatLessOrEqual: - case lir::JumpIfFloatGreaterOrEqual: - case lir::JumpIfFloatLessOrUnordered: - case lir::JumpIfFloatGreaterOrUnordered: - case lir::JumpIfFloatLessOrEqualOrUnordered: - case lir::JumpIfFloatGreaterOrEqualOrUnordered: - if (vfpSupported()) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(FPR_MASK, FPR_MASK); - bMask = aMask; - } else { - *thunk = true; - } - break; - - default: - break; - } - } - - virtual void planDestination(lir::TernaryOperation op, - unsigned, - const OperandMask& aMask UNUSED, - unsigned, - const OperandMask& bMask, - unsigned, - OperandMask& cMask) - { - if (isBranch(op)) { - cMask.typeMask = lir::Operand::ConstantMask; - cMask.setLowHighRegisterMasks(0, 0); - } else { - cMask.typeMask = lir::Operand::RegisterPairMask; - cMask.lowRegisterMask = bMask.lowRegisterMask; - cMask.highRegisterMask = bMask.highRegisterMask; - } - } - - virtual Assembler* makeAssembler(Alloc* allocator, Zone* zone); - - virtual void acquire() - { - ++referenceCount; - } - - virtual void release() - { - if (--referenceCount == 0) { - con.s->free(this); - } - } - - ArchitectureContext con; - unsigned referenceCount; -}; - -class MyAssembler : public Assembler { - public: - MyAssembler(System* s, Alloc* a, Zone* zone, MyArchitecture* arch) - : con(s, a, zone), arch_(arch) - { - } - - virtual void setClient(Client* client) - { - assertT(&con, con.client == 0); - con.client = client; - } - - virtual Architecture* arch() - { - return arch_; - } - - virtual void checkStackOverflow(uintptr_t handler, - unsigned stackLimitOffsetFromThread) - { - lir::RegisterPair stack(StackRegister); - lir::Memory stackLimit(ThreadRegister, stackLimitOffsetFromThread); - lir::Constant handlerConstant(new (con.zone) ResolvedPromise(handler)); - branchRM(&con, - lir::JumpIfGreaterOrEqual, - TargetBytesPerWord, - &stack, - &stackLimit, - &handlerConstant); - } - - virtual void saveFrame(unsigned stackOffset, unsigned ipOffset) - { - lir::RegisterPair link(LinkRegister); - lir::Memory linkDst(ThreadRegister, ipOffset); - moveRM(&con, TargetBytesPerWord, &link, TargetBytesPerWord, &linkDst); - - lir::RegisterPair stack(StackRegister); - lir::Memory stackDst(ThreadRegister, stackOffset); - moveRM(&con, TargetBytesPerWord, &stack, TargetBytesPerWord, &stackDst); - } - - virtual void pushFrame(unsigned argumentCount, ...) - { - struct Argument { - unsigned size; - lir::Operand::Type type; - lir::Operand* operand; - }; - RUNTIME_ARRAY(Argument, arguments, argumentCount); - - va_list a; - va_start(a, argumentCount); - unsigned footprint = 0; - for (unsigned i = 0; i < argumentCount; ++i) { - RUNTIME_ARRAY_BODY(arguments)[i].size = va_arg(a, unsigned); - RUNTIME_ARRAY_BODY(arguments)[i].type - = static_cast(va_arg(a, int)); - RUNTIME_ARRAY_BODY(arguments)[i].operand = va_arg(a, lir::Operand*); - footprint += ceilingDivide(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord); - } - va_end(a); - - allocateFrame(arch_->alignFrameSize(footprint)); - - unsigned offset = 0; - for (unsigned i = 0; i < argumentCount; ++i) { - if (i < arch_->argumentRegisterCount()) { - lir::RegisterPair dst(arch_->argumentRegister(i)); - - apply(lir::Move, - OperandInfo(RUNTIME_ARRAY_BODY(arguments)[i].size, - RUNTIME_ARRAY_BODY(arguments)[i].type, - RUNTIME_ARRAY_BODY(arguments)[i].operand), - OperandInfo(pad(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord), - lir::Operand::Type::RegisterPair, - &dst)); - - offset += ceilingDivide(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord); - } else { - lir::Memory dst(StackRegister, offset * TargetBytesPerWord); - - apply(lir::Move, - OperandInfo(RUNTIME_ARRAY_BODY(arguments)[i].size, - RUNTIME_ARRAY_BODY(arguments)[i].type, - RUNTIME_ARRAY_BODY(arguments)[i].operand), - OperandInfo(pad(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord), - lir::Operand::Type::Memory, - &dst)); - - offset += ceilingDivide(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord); - } - } - } - - virtual void allocateFrame(unsigned footprint) - { - footprint += FrameHeaderSize; - - // larger frames may require multiple subtract/add instructions - // to allocate/deallocate, and nextFrame will need to be taught - // how to handle them: - assertT(&con, footprint < 256); - - // todo: the ARM ABI says the frame preamble should be of the form - // - // stp x29, x30, [sp,#-footprint]! - // mov x29, sp - // - // and the frame should be popped with e.g. - // - // ldp x29, x30, [sp],#footprint - // br x30 - // - // However, that will invalidate a lot of assumptions elsewhere - // about the return address being stored at the opposite end of - // the frame, so lots of other code will need to change before we - // can do that. The code below can be enabled as a starting point - // when we're ready to tackle that. - if (false and TargetBytesPerWord == 8) { - // stp x29, x30, [sp,#-footprint]! - con.code.append4(0xa9800000 | ((-footprint & 0x7f) << 15) - | (StackRegister.index() << 5) - | (LinkRegister.index() << 10) | FrameRegister.index()); - - lir::RegisterPair stack(StackRegister); - lir::RegisterPair frame(FrameRegister); - moveRR(&con, TargetBytesPerWord, &stack, TargetBytesPerWord, &frame); - } else { - lir::RegisterPair stack(StackRegister); - ResolvedPromise footprintPromise(footprint * TargetBytesPerWord); - lir::Constant footprintConstant(&footprintPromise); - subC(&con, TargetBytesPerWord, &footprintConstant, &stack, &stack); - - lir::RegisterPair returnAddress(LinkRegister); - lir::Memory returnAddressDst(StackRegister, - (footprint - 1) * TargetBytesPerWord); - moveRM(&con, - TargetBytesPerWord, - &returnAddress, - TargetBytesPerWord, - &returnAddressDst); - } - } - - virtual void adjustFrame(unsigned difference) - { - lir::RegisterPair stack(StackRegister); - ResolvedPromise differencePromise(difference * TargetBytesPerWord); - lir::Constant differenceConstant(&differencePromise); - subC(&con, TargetBytesPerWord, &differenceConstant, &stack, &stack); - } - - virtual void popFrame(unsigned footprint) - { - footprint += FrameHeaderSize; - - // see comment regarding the ARM64 ABI in allocateFrame - if (false and TargetBytesPerWord == 8) { - // ldp x29, x30, [sp],#footprint - con.code.append4(0xa8c00000 | (footprint << 15) | (31 << 5) | (30 << 10) - | 29); - } else { - lir::RegisterPair returnAddress(LinkRegister); - lir::Memory returnAddressSrc(StackRegister, - (footprint - 1) * TargetBytesPerWord); - moveMR(&con, - TargetBytesPerWord, - &returnAddressSrc, - TargetBytesPerWord, - &returnAddress); - - lir::RegisterPair stack(StackRegister); - ResolvedPromise footprintPromise(footprint * TargetBytesPerWord); - lir::Constant footprintConstant(&footprintPromise); - addC(&con, TargetBytesPerWord, &footprintConstant, &stack, &stack); - } - } - - virtual void popFrameForTailCall(unsigned footprint, - int offset, - Register returnAddressSurrogate, - Register framePointerSurrogate UNUSED) - { - assertT(&con, framePointerSurrogate == NoRegister); - - if (TailCalls) { - if (offset) { - footprint += FrameHeaderSize; - - lir::RegisterPair link(LinkRegister); - lir::Memory returnAddressSrc(StackRegister, - (footprint - 1) * TargetBytesPerWord); - moveMR(&con, - TargetBytesPerWord, - &returnAddressSrc, - TargetBytesPerWord, - &link); - - lir::RegisterPair stack(StackRegister); - ResolvedPromise footprintPromise((footprint - offset) - * TargetBytesPerWord); - lir::Constant footprintConstant(&footprintPromise); - addC(&con, TargetBytesPerWord, &footprintConstant, &stack, &stack); - - if (returnAddressSurrogate != NoRegister) { - assertT(&con, offset > 0); - - lir::RegisterPair ras(returnAddressSurrogate); - lir::Memory dst(StackRegister, (offset - 1) * TargetBytesPerWord); - moveRM(&con, TargetBytesPerWord, &ras, TargetBytesPerWord, &dst); - } - } else { - popFrame(footprint); - } - } else { - abort(&con); - } - } - - virtual void popFrameAndPopArgumentsAndReturn(unsigned frameFootprint, - unsigned argumentFootprint) - { - popFrame(frameFootprint); - - assertT(&con, argumentFootprint >= StackAlignmentInWords); - assertT(&con, (argumentFootprint % StackAlignmentInWords) == 0); - - unsigned offset; - if (TailCalls and argumentFootprint > StackAlignmentInWords) { - offset = argumentFootprint - StackAlignmentInWords; - - lir::RegisterPair stack(StackRegister); - ResolvedPromise adjustmentPromise(offset * TargetBytesPerWord); - lir::Constant adjustment(&adjustmentPromise); - addC(&con, TargetBytesPerWord, &adjustment, &stack, &stack); - } else { - offset = 0; - } - - return_(&con); - } - - virtual void popFrameAndUpdateStackAndReturn(unsigned footprint, - unsigned stackOffsetFromThread) - { - footprint += FrameHeaderSize; - - // see comment regarding the ARM64 ABI in allocateFrame - if (false and TargetBytesPerWord == 8) { - // ldp x29, x30, [sp],#footprint - con.code.append4(0xa8c00000 | (footprint << 15) | (31 << 5) | (30 << 10) - | 29); - } else { - lir::RegisterPair returnAddress(LinkRegister); - lir::Memory returnAddressSrc(StackRegister, - (footprint - 1) * TargetBytesPerWord); - moveMR(&con, - TargetBytesPerWord, - &returnAddressSrc, - TargetBytesPerWord, - &returnAddress); - } - - lir::RegisterPair stack(StackRegister); - lir::Memory newStackSrc(ThreadRegister, stackOffsetFromThread); - moveMR(&con, TargetBytesPerWord, &newStackSrc, TargetBytesPerWord, &stack); - - return_(&con); - } - - virtual void apply(lir::Operation op) - { - arch_->con.operations[op](&con); - } - - virtual void apply(lir::UnaryOperation op, OperandInfo a) - { - arch_->con.unaryOperations[Multimethod::index(op, a.type)]( - &con, a.size, a.operand); - } - - virtual void apply(lir::BinaryOperation op, OperandInfo a, OperandInfo b) - { - arch_->con.binaryOperations[index(&(arch_->con), op, a.type, b.type)]( - &con, a.size, a.operand, b.size, b.operand); - } - - virtual void apply(lir::TernaryOperation op, - OperandInfo a, - OperandInfo b, - OperandInfo c) - { - if (isBranch(op)) { - assertT(&con, a.size == b.size); - assertT(&con, c.size == TargetBytesPerWord); - assertT(&con, c.type == lir::Operand::Type::Constant); - - arch_->con.branchOperations[branchIndex(&(arch_->con), a.type, b.type)]( - &con, op, a.size, a.operand, b.operand, c.operand); - } else { - assertT(&con, b.size == c.size); - assertT(&con, b.type == lir::Operand::Type::RegisterPair); - assertT(&con, c.type == lir::Operand::Type::RegisterPair); - - arch_->con.ternaryOperations[index(&(arch_->con), op, a.type)]( - &con, b.size, a.operand, b.operand, c.operand); - } - } - - virtual void setDestination(uint8_t* dst) - { - con.result = dst; - } - - virtual void write() - { - uint8_t* dst = con.result; - unsigned dstOffset = 0; - for (MyBlock* b = con.firstBlock; b; b = b->next) { - if (DebugPool) { - fprintf(stderr, "write block %p\n", b); - } - - unsigned blockOffset = 0; - for (PoolEvent* e = b->poolEventHead; e; e = e->next) { - unsigned size = e->offset - blockOffset; - memcpy(dst + dstOffset, - con.code.data.begin() + b->offset + blockOffset, - size); - blockOffset = e->offset; - dstOffset += size; - - unsigned poolSize = 0; - for (PoolOffset* o = e->poolOffsetHead; o; o = o->next) { - if (DebugPool) { - fprintf(stderr, - "visit pool offset %p %d in block %p\n", - o, - o->offset, - b); - } - - unsigned entry = dstOffset + poolSize; - - if (needJump(b)) { - entry += TargetBytesPerWord; - } - - o->entry->address = dst + entry; - - unsigned instruction = o->block->start + padding(o->block, o->offset) - + o->offset; - - int32_t* p = reinterpret_cast(dst + instruction); - - if (TargetBytesPerWord == 8) { - int32_t v = entry - instruction; - expect(&con, v == (v & PoolOffsetMask)); - - const int32_t mask = (PoolOffsetMask >> 2) << 5; - *p = (((v >> 2) << 5) & mask) | ((~mask) & *p); - } else { - int32_t v = (entry - 8) - instruction; - expect(&con, v == (v & PoolOffsetMask)); - - *p = (v & PoolOffsetMask) | ((~PoolOffsetMask) & *p); - } - - poolSize += TargetBytesPerWord; - } - - bool jump = needJump(b); - if (jump) { - expect(&con, TargetBytesPerWord == 4); - - write4(dst + dstOffset, - isa::b((poolSize + TargetBytesPerWord - 8) >> 2)); - } - - dstOffset += poolSize + (jump ? TargetBytesPerWord : 0); - } - - unsigned size = b->size - blockOffset; - - memcpy(dst + dstOffset, - con.code.data.begin() + b->offset + blockOffset, - size); - - dstOffset += size; - } - - for (Task* t = con.tasks; t; t = t->next) { - t->run(&con); - } - - for (ConstantPoolEntry* e = con.constantPool; e; e = e->next) { - if (e->constant->resolved()) { - *static_cast(e->address) = e->constant->value(); - } else { - new (e->constant->listen(sizeof(ConstantPoolListener))) - ConstantPoolListener( - con.s, - static_cast(e->address), - e->callOffset ? dst + e->callOffset->value() + 8 : 0); - } - if (false) { - fprintf(stderr, - "constant %p at %p\n", - reinterpret_cast(e->constant->value()), - e->address); - } - } - } - - virtual Promise* offset(bool forTrace) - { - return arm::offsetPromise(&con, forTrace); - } - - virtual Block* endBlock(bool startNew) - { - MyBlock* b = con.lastBlock; - b->size = con.code.length() - b->offset; - if (startNew) { - con.lastBlock = new (con.zone) MyBlock(&con, con.code.length()); - } else { - con.lastBlock = 0; - } - return b; - } - - virtual void endEvent() - { - MyBlock* b = con.lastBlock; - unsigned thisEventOffset = con.code.length() - b->offset; - if (b->poolOffsetHead) { - int32_t v = (thisEventOffset + TargetBytesPerWord - 8) - - b->poolOffsetHead->offset; - - if (v > 0 and v != (v & PoolOffsetMask)) { - appendPoolEvent(&con, - b, - b->lastEventOffset, - b->poolOffsetHead, - b->lastPoolOffsetTail); - - if (DebugPool) { - for (PoolOffset* o = b->poolOffsetHead; - o != b->lastPoolOffsetTail->next; - o = o->next) { - fprintf(stderr, - "in endEvent, include %p %d in pool event %p at offset %d " - "in block %p\n", - o, - o->offset, - b->poolEventTail, - b->lastEventOffset, - b); - } - } - - b->poolOffsetHead = b->lastPoolOffsetTail->next; - b->lastPoolOffsetTail->next = 0; - if (b->poolOffsetHead == 0) { - b->poolOffsetTail = 0; - } - } - } - b->lastEventOffset = thisEventOffset; - b->lastPoolOffsetTail = b->poolOffsetTail; - } - - virtual unsigned length() - { - return con.code.length(); - } - - virtual unsigned footerSize() - { - return 0; - } - - virtual void dispose() - { - con.code.dispose(); - } - - Context con; - MyArchitecture* arch_; -}; - -Assembler* MyArchitecture::makeAssembler(Alloc* allocator, Zone* zone) -{ - return new (zone) MyAssembler(this->con.s, allocator, zone, this); -} - -} // namespace arm - -Architecture* makeArchitectureArm(System* system, bool) -{ - return new (allocate(system, sizeof(arm::MyArchitecture))) - arm::MyArchitecture(system); -} - -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/arm/block.cpp b/sgx-jvm/avian/src/codegen/target/arm/block.cpp deleted file mode 100644 index fe2805e143..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/block.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "context.h" -#include "block.h" - -namespace avian { -namespace codegen { -namespace arm { - -void resolve(MyBlock*); - -unsigned padding(MyBlock*, unsigned); - -MyBlock::MyBlock(Context* context, unsigned offset) - : context(context), - next(0), - poolOffsetHead(0), - poolOffsetTail(0), - lastPoolOffsetTail(0), - poolEventHead(0), - poolEventTail(0), - lastEventOffset(0), - offset(offset), - start(~0), - size(0) -{ -} - -unsigned MyBlock::resolve(unsigned start, Assembler::Block* next) -{ - this->start = start; - this->next = static_cast(next); - - arm::resolve(this); - - return start + size + padding(this, size); -} - -} // namespace arm -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/arm/block.h b/sgx-jvm/avian/src/codegen/target/arm/block.h deleted file mode 100644 index 55f383c78f..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/block.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_ARM_BLOCK_H -#define AVIAN_CODEGEN_ASSEMBLER_ARM_BLOCK_H - -#include -#include - -namespace avian { -namespace codegen { -namespace arm { - -class PoolEvent; - -class MyBlock : public Assembler::Block { - public: - MyBlock(Context* context, unsigned offset); - - virtual unsigned resolve(unsigned start, Assembler::Block* next); - - Context* context; - MyBlock* next; - PoolOffset* poolOffsetHead; - PoolOffset* poolOffsetTail; - PoolOffset* lastPoolOffsetTail; - PoolEvent* poolEventHead; - PoolEvent* poolEventTail; - unsigned lastEventOffset; - unsigned offset; - unsigned start; - unsigned size; -}; - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_ARM_BLOCK_H diff --git a/sgx-jvm/avian/src/codegen/target/arm/context.cpp b/sgx-jvm/avian/src/codegen/target/arm/context.cpp deleted file mode 100644 index fa455fa622..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/context.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "context.h" -#include "block.h" - -namespace avian { -namespace codegen { -namespace arm { - -Context::Context(vm::System* s, util::Alloc* a, vm::Zone* zone) - : s(s), - zone(zone), - client(0), - code(s, a, 1024), - tasks(0), - result(0), - firstBlock(new (zone) MyBlock(this, 0)), - lastBlock(firstBlock), - poolOffsetHead(0), - poolOffsetTail(0), - constantPool(0), - constantPoolCount(0) -{ -} - -} // namespace arm -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/arm/context.h b/sgx-jvm/avian/src/codegen/target/arm/context.h deleted file mode 100644 index d5eb90b8c6..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/context.h +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_ARM_CONTEXT_H -#define AVIAN_CODEGEN_ASSEMBLER_ARM_CONTEXT_H - -#include -#include -#include "avian/alloc-vector.h" - -namespace vm { -class System; -class Zone; -} // namespace vm - -namespace avian { - -namespace util { -class Aborter; -class Alloc; -} // namespace util - -namespace codegen { -namespace arm { - -class Task; -class MyBlock; -class PoolOffset; -class ConstantPoolEntry; - -class Context { - public: - Context(vm::System* s, util::Alloc* a, vm::Zone* zone); - - vm::System* s; - vm::Zone* zone; - Assembler::Client* client; - vm::Vector code; - Task* tasks; - uint8_t* result; - MyBlock* firstBlock; - MyBlock* lastBlock; - PoolOffset* poolOffsetHead; - PoolOffset* poolOffsetTail; - ConstantPoolEntry* constantPool; - unsigned constantPoolCount; -}; - -typedef void (*OperationType)(Context*); - -typedef void (*UnaryOperationType)(Context*, unsigned, lir::Operand*); - -typedef void (*BinaryOperationType)(Context*, - unsigned, - lir::Operand*, - unsigned, - lir::Operand*); - -typedef void (*TernaryOperationType)(Context*, - unsigned, - lir::Operand*, - lir::Operand*, - lir::Operand*); - -typedef void (*BranchOperationType)(Context*, - lir::TernaryOperation, - unsigned, - lir::Operand*, - lir::Operand*, - lir::Operand*); - -class ArchitectureContext { - public: - ArchitectureContext(vm::System* s) : s(s) - { - } - - vm::System* s; - OperationType operations[lir::OperationCount]; - UnaryOperationType - unaryOperations[lir::UnaryOperationCount * lir::Operand::TypeCount]; - BinaryOperationType binaryOperations[lir::BinaryOperationCount - * lir::Operand::TypeCount - * lir::Operand::TypeCount]; - TernaryOperationType ternaryOperations[lir::NonBranchTernaryOperationCount - * lir::Operand::TypeCount]; - BranchOperationType branchOperations[lir::BranchOperationCount - * lir::Operand::TypeCount - * lir::Operand::TypeCount]; -}; - -inline avian::util::Aborter* getAborter(Context* c) -{ - return c->s; -} - -inline avian::util::Aborter* getAborter(ArchitectureContext* c) -{ - return c->s; -} - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_ARM_CONTEXT_H diff --git a/sgx-jvm/avian/src/codegen/target/arm/encode.h b/sgx-jvm/avian/src/codegen/target/arm/encode.h deleted file mode 100644 index b6ea050fe2..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/encode.h +++ /dev/null @@ -1,692 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_ARM_ENCODE_H -#define AVIAN_CODEGEN_ASSEMBLER_ARM_ENCODE_H - -#include -#include - -namespace avian { -namespace codegen { -namespace arm { - -namespace isa { - -// SYSTEM REGISTERS -const int FPSID = 0x0; -const int FPSCR = 0x1; -const int FPEXC = 0x8; -// INSTRUCTION OPTIONS -enum CONDITION { - EQ, - NE, - CS, - CC, - MI, - PL, - VS, - VC, - HI, - LS, - GE, - LT, - GT, - LE, - AL, - NV -}; -enum SHIFTOP { LSL, LSR, ASR, ROR }; -// INSTRUCTION FORMATS -inline int - DATA(int cond, int opcode, int S, Register Rn, Register Rd, int shift, int Sh, Register Rm) -{ - return cond << 28 | opcode << 21 | S << 20 | Rn.index() << 16 | Rd.index() << 12 | shift << 7 - | Sh << 5 | Rm.index(); -} -inline int - DATAS(int cond, int opcode, int S, Register Rn, Register Rd, Register Rs, int Sh, Register Rm) -{ - return cond << 28 | opcode << 21 | S << 20 | Rn.index() << 16 | Rd.index() << 12 | Rs.index() << 8 - | Sh << 5 | 1 << 4 | Rm.index(); -} -inline int DATAI(int cond, int opcode, int S, Register Rn, Register Rd, int rot, int imm) -{ - return cond << 28 | 1 << 25 | opcode << 21 | S << 20 | Rn.index() << 16 | Rd.index() << 12 - | rot << 8 | (imm & 0xff); -} -inline int BRANCH(int cond, int L, int offset) -{ - return cond << 28 | 5 << 25 | L << 24 | (offset & 0xffffff); -} -inline int BRANCHX(int cond, int L, Register Rm) -{ - return cond << 28 | 0x4bffc << 6 | L << 5 | 1 << 4 | Rm.index(); -} -inline int MULTIPLY(int cond, int mul, int S, Register Rd, Register Rn, Register Rs, Register Rm) -{ - return cond << 28 | mul << 21 | S << 20 | Rd.index() << 16 | Rn.index() << 12 | Rs.index() << 8 - | 9 << 4 | Rm.index(); -} -inline int XFER(int cond, - int P, - int U, - int B, - int W, - int L, - Register Rn, - Register Rd, - int shift, - int Sh, - Register Rm) -{ - return cond << 28 | 3 << 25 | P << 24 | U << 23 | B << 22 | W << 21 | L << 20 - | Rn.index() << 16 | Rd.index() << 12 | shift << 7 | Sh << 5 | Rm.index(); -} -inline int XFERI(int cond, - int P, - int U, - int B, - int W, - int L, - Register Rn, - Register Rd, - int offset) -{ - return cond << 28 | 2 << 25 | P << 24 | U << 23 | B << 22 | W << 21 | L << 20 - | Rn.index() << 16 | Rd.index() << 12 | (offset & 0xfff); -} -inline int XFER2(int cond, - int P, - int U, - int W, - int L, - Register Rn, - Register Rd, - int S, - int H, - Register Rm) -{ - return cond << 28 | P << 24 | U << 23 | W << 21 | L << 20 | Rn.index() << 16 - | Rd.index() << 12 | 1 << 7 | S << 6 | H << 5 | 1 << 4 | Rm.index(); -} -inline int XFER2I(int cond, - int P, - int U, - int W, - int L, - Register Rn, - Register Rd, - int offsetH, - int S, - int H, - int offsetL) -{ - return cond << 28 | P << 24 | U << 23 | 1 << 22 | W << 21 | L << 20 | Rn.index() << 16 - | Rd.index() << 12 | offsetH << 8 | 1 << 7 | S << 6 | H << 5 | 1 << 4 - | (offsetL & 0xf); -} -inline int COOP(int cond, - int opcode_1, - int CRn, - int CRd, - int cp_num, - int opcode_2, - int CRm) -{ - return cond << 28 | 0xe << 24 | opcode_1 << 20 | CRn << 16 | CRd << 12 - | cp_num << 8 | opcode_2 << 5 | CRm; -} -inline int COXFER(int cond, - int P, - int U, - int N, - int W, - int L, - Register Rn, - int CRd, - int cp_num, - int offset) // offset is in words, not bytes -{ - return cond << 28 | 0x6 << 25 | P << 24 | U << 23 | N << 22 | W << 21 - | L << 20 | Rn.index() << 16 | CRd << 12 | cp_num << 8 | (offset & 0xff) >> 2; -} -inline int COREG(int cond, - int opcode_1, - int L, - int CRn, - Register Rd, - int cp_num, - int opcode_2, - int CRm) -{ - return cond << 28 | 0xe << 24 | opcode_1 << 21 | L << 20 | CRn << 16 - | Rd.index() << 12 | cp_num << 8 | opcode_2 << 5 | 1 << 4 | CRm; -} -inline int - COREG2(int cond, int L, Register Rn, Register Rd, int cp_num, int opcode, int CRm) -{ - return cond << 28 | 0xc4 << 20 | L << 20 | Rn.index() << 16 | Rd.index() << 12 | cp_num << 8 - | opcode << 4 | CRm; -} -// FIELD CALCULATORS -inline int calcU(int imm) -{ - return imm >= 0 ? 1 : 0; -} -// INSTRUCTIONS -// The "cond" and "S" fields are set using the SETCOND() and SETS() functions -inline int b(int offset) -{ - return BRANCH(AL, 0, offset); -} -inline int bl(int offset) -{ - return BRANCH(AL, 1, offset); -} -inline int bx(Register Rm) -{ - return BRANCHX(AL, 0, Rm); -} -inline int blx(Register Rm) -{ - return BRANCHX(AL, 1, Rm); -} -inline int and_(Register Rd, Register Rn, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0x0, 0, Rn, Rd, shift, Sh, Rm); -} -inline int eor(Register Rd, Register Rn, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0x1, 0, Rn, Rd, shift, Sh, Rm); -} -inline int rsb(Register Rd, Register Rn, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0x3, 0, Rn, Rd, shift, Sh, Rm); -} -inline int add(Register Rd, Register Rn, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0x4, 0, Rn, Rd, shift, Sh, Rm); -} -inline int adc(Register Rd, Register Rn, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0x5, 0, Rn, Rd, shift, Sh, Rm); -} -inline int rsc(Register Rd, Register Rn, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0x7, 0, Rn, Rd, shift, Sh, Rm); -} -inline int cmp(Register Rn, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0xa, 1, Rn, Register(0), shift, Sh, Rm); -} -inline int orr(Register Rd, Register Rn, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0xc, 0, Rn, Rd, shift, Sh, Rm); -} -inline int mov(Register Rd, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0xd, 0, Register(0), Rd, shift, Sh, Rm); -} -inline int mvn(Register Rd, Register Rm, int Sh = 0, int shift = 0) -{ - return DATA(AL, 0xf, 0, Register(0), Rd, shift, Sh, Rm); -} -inline int andi(Register Rd, Register Rn, int imm, int rot = 0) -{ - return DATAI(AL, 0x0, 0, Rn, Rd, rot, imm); -} -inline int subi(Register Rd, Register Rn, int imm, int rot = 0) -{ - return DATAI(AL, 0x2, 0, Rn, Rd, rot, imm); -} -inline int rsbi(Register Rd, Register Rn, int imm, int rot = 0) -{ - return DATAI(AL, 0x3, 0, Rn, Rd, rot, imm); -} -inline int addi(Register Rd, Register Rn, int imm, int rot = 0) -{ - return DATAI(AL, 0x4, 0, Rn, Rd, rot, imm); -} -inline int adci(Register Rd, Register Rn, int imm, int rot = 0) -{ - return DATAI(AL, 0x5, 0, Rn, Rd, rot, imm); -} -inline int bici(Register Rd, Register Rn, int imm, int rot = 0) -{ - return DATAI(AL, 0xe, 0, Rn, Rd, rot, imm); -} -inline int cmpi(Register Rn, int imm, int rot = 0) -{ - return DATAI(AL, 0xa, 1, Rn, Register(0), rot, imm); -} -inline int movi(Register Rd, int imm, int rot = 0) -{ - return DATAI(AL, 0xd, 0, Register(0), Rd, rot, imm); -} -inline int orrsh(Register Rd, Register Rn, Register Rm, Register Rs, int Sh) -{ - return DATAS(AL, 0xc, 0, Rn, Rd, Rs, Sh, Rm); -} -inline int movsh(Register Rd, Register Rm, Register Rs, int Sh) -{ - return DATAS(AL, 0xd, 0, Register(0), Rd, Rs, Sh, Rm); -} -inline int mul(Register Rd, Register Rm, Register Rs) -{ - return MULTIPLY(AL, 0, 0, Rd, Register(0), Rs, Rm); -} -inline int mla(Register Rd, Register Rm, Register Rs, Register Rn) -{ - return MULTIPLY(AL, 1, 0, Rd, Rn, Rs, Rm); -} -inline int umull(Register RdLo, Register RdHi, Register Rm, Register Rs) -{ - return MULTIPLY(AL, 4, 0, RdHi, RdLo, Rs, Rm); -} -inline int ldr(Register Rd, Register Rn, Register Rm, int W = 0) -{ - return XFER(AL, 1, 1, 0, W, 1, Rn, Rd, 0, 0, Rm); -} -inline int ldri(Register Rd, Register Rn, int imm, int W = 0) -{ - return XFERI(AL, 1, calcU(imm), 0, W, 1, Rn, Rd, abs(imm)); -} -inline int ldrb(Register Rd, Register Rn, Register Rm) -{ - return XFER(AL, 1, 1, 1, 0, 1, Rn, Rd, 0, 0, Rm); -} -inline int ldrbi(Register Rd, Register Rn, int imm) -{ - return XFERI(AL, 1, calcU(imm), 1, 0, 1, Rn, Rd, abs(imm)); -} -inline int str(Register Rd, Register Rn, Register Rm, int W = 0) -{ - return XFER(AL, 1, 1, 0, W, 0, Rn, Rd, 0, 0, Rm); -} -inline int stri(Register Rd, Register Rn, int imm, int W = 0) -{ - return XFERI(AL, 1, calcU(imm), 0, W, 0, Rn, Rd, abs(imm)); -} -inline int strb(Register Rd, Register Rn, Register Rm) -{ - return XFER(AL, 1, 1, 1, 0, 0, Rn, Rd, 0, 0, Rm); -} -inline int strbi(Register Rd, Register Rn, int imm) -{ - return XFERI(AL, 1, calcU(imm), 1, 0, 0, Rn, Rd, abs(imm)); -} -inline int ldrh(Register Rd, Register Rn, Register Rm) -{ - return XFER2(AL, 1, 1, 0, 1, Rn, Rd, 0, 1, Rm); -} -inline int ldrhi(Register Rd, Register Rn, int imm) -{ - return XFER2I(AL, - 1, - calcU(imm), - 0, - 1, - Rn, - Rd, - abs(imm) >> 4 & 0xf, - 0, - 1, - abs(imm) & 0xf); -} -inline int strh(Register Rd, Register Rn, Register Rm) -{ - return XFER2(AL, 1, 1, 0, 0, Rn, Rd, 0, 1, Rm); -} -inline int strhi(Register Rd, Register Rn, int imm) -{ - return XFER2I(AL, - 1, - calcU(imm), - 0, - 0, - Rn, - Rd, - abs(imm) >> 4 & 0xf, - 0, - 1, - abs(imm) & 0xf); -} -inline int ldrsh(Register Rd, Register Rn, Register Rm) -{ - return XFER2(AL, 1, 1, 0, 1, Rn, Rd, 1, 1, Rm); -} -inline int ldrshi(Register Rd, Register Rn, int imm) -{ - return XFER2I(AL, - 1, - calcU(imm), - 0, - 1, - Rn, - Rd, - abs(imm) >> 4 & 0xf, - 1, - 1, - abs(imm) & 0xf); -} -inline int ldrsb(Register Rd, Register Rn, Register Rm) -{ - return XFER2(AL, 1, 1, 0, 1, Rn, Rd, 1, 0, Rm); -} -inline int ldrsbi(Register Rd, Register Rn, int imm) -{ - return XFER2I(AL, - 1, - calcU(imm), - 0, - 1, - Rn, - Rd, - abs(imm) >> 4 & 0xf, - 1, - 0, - abs(imm) & 0xf); -} -// breakpoint instruction, this really has its own instruction format -inline int bkpt(int16_t immed) -{ - return 0xe1200070 | (((unsigned)immed & 0xffff) >> 4 << 8) | (immed & 0xf); -} -// COPROCESSOR INSTRUCTIONS -inline int mcr(int coproc, - int opcode_1, - Register Rd, - int CRn, - int CRm, - int opcode_2 = 0) -{ - return COREG(AL, opcode_1, 0, CRn, Rd, coproc, opcode_2, CRm); -} -inline int mcrr(int coproc, int opcode, Register Rd, Register Rn, int CRm) -{ - return COREG2(AL, 0, Rn, Rd, coproc, opcode, CRm); -} -inline int mrc(int coproc, - int opcode_1, - Register Rd, - int CRn, - int CRm, - int opcode_2 = 0) -{ - return COREG(AL, opcode_1, 1, CRn, Rd, coproc, opcode_2, CRm); -} -inline int mrrc(int coproc, int opcode, Register Rd, Register Rn, int CRm) -{ - return COREG2(AL, 1, Rn, Rd, coproc, opcode, CRm); -} -// VFP FLOATING-POINT INSTRUCTIONS -inline int fmuls(int Sd, int Sn, int Sm) -{ - return COOP(AL, - (Sd & 1) << 2 | 2, - Sn >> 1, - Sd >> 1, - 10, - (Sn & 1) << 2 | (Sm & 1), - Sm >> 1); -} -inline int fadds(int Sd, int Sn, int Sm) -{ - return COOP(AL, - (Sd & 1) << 2 | 3, - Sn >> 1, - Sd >> 1, - 10, - (Sn & 1) << 2 | (Sm & 1), - Sm >> 1); -} -inline int fsubs(int Sd, int Sn, int Sm) -{ - return COOP(AL, - (Sd & 1) << 2 | 3, - Sn >> 1, - Sd >> 1, - 10, - (Sn & 1) << 2 | (Sm & 1) | 2, - Sm >> 1); -} -inline int fdivs(int Sd, int Sn, int Sm) -{ - return COOP(AL, - (Sd & 1) << 2 | 8, - Sn >> 1, - Sd >> 1, - 10, - (Sn & 1) << 2 | (Sm & 1), - Sm >> 1); -} -inline int fmuld(int Dd, int Dn, int Dm) -{ - return COOP(AL, 2, Dn, Dd, 11, 0, Dm); -} -inline int faddd(int Dd, int Dn, int Dm) -{ - return COOP(AL, 3, Dn, Dd, 11, 0, Dm); -} -inline int fsubd(int Dd, int Dn, int Dm) -{ - return COOP(AL, 3, Dn, Dd, 11, 2, Dm); -} -inline int fdivd(int Dd, int Dn, int Dm) -{ - return COOP(AL, 8, Dn, Dd, 11, 0, Dm); -} -inline int fcpys(int Sd, int Sm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 0, Sd >> 1, 10, 2 | (Sm & 1), Sm >> 1); -} -inline int fabss(int Sd, int Sm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 0, Sd >> 1, 10, 6 | (Sm & 1), Sm >> 1); -} -inline int fnegs(int Sd, int Sm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 1, Sd >> 1, 10, 2 | (Sm & 1), Sm >> 1); -} -inline int fsqrts(int Sd, int Sm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 1, Sd >> 1, 10, 6 | (Sm & 1), Sm >> 1); -} -inline int fcmps(int Sd, int Sm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 4, Sd >> 1, 10, 2 | (Sm & 1), Sm >> 1); -} -inline int fcvtds(int Dd, int Sm) -{ - return COOP(AL, 0xb, 7, Dd, 10, 6 | (Sm & 1), Sm >> 1); -} -inline int fsitos(int Sd, int Sm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 8, Sd >> 1, 10, 6 | (Sm & 1), Sm >> 1); -} -inline int ftosizs(int Sd, int Sm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 0xd, Sd >> 1, 10, 6 | (Sm & 1), Sm >> 1); -} -inline int fcpyd(int Dd, int Dm) -{ - return COOP(AL, 0xb, 0, Dd, 11, 2, Dm); -} -inline int fabsd(int Dd, int Dm) -{ - return COOP(AL, 0xb, 0, Dd, 11, 6, Dm); -} -inline int fnegd(int Dd, int Dm) -{ - return COOP(AL, 0xb, 1, Dd, 11, 2, Dm); -} -inline int fsqrtd(int Dd, int Dm) -{ - return COOP(AL, 0xb, 1, Dd, 11, 6, Dm); -} -// double-precision comparison instructions -inline int fcmpd(int Dd, int Dm) -{ - return COOP(AL, 0xb, 4, Dd, 11, 2, Dm); -} -// double-precision conversion instructions -inline int fcvtsd(int Sd, int Dm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 7, Sd >> 1, 11, 6, Dm); -} -inline int fsitod(int Dd, int Sm) -{ - return COOP(AL, 0xb, 8, Dd, 11, 6 | (Sm & 1), Sm >> 1); -} -inline int ftosizd(int Sd, int Dm) -{ - return COOP(AL, 0xb | (Sd & 1) << 2, 0xd, Sd >> 1, 11, 6, Dm); -} -// single load/store instructions for both precision types -inline int flds(int Sd, Register Rn, int offset = 0) -{ - return COXFER(AL, 1, 1, Sd & 1, 0, 1, Rn, Sd >> 1, 10, offset); -}; -inline int fldd(int Dd, Register Rn, int offset = 0) -{ - return COXFER(AL, 1, 1, 0, 0, 1, Rn, Dd, 11, offset); -}; -inline int fsts(int Sd, Register Rn, int offset = 0) -{ - return COXFER(AL, 1, 1, Sd & 1, 0, 0, Rn, Sd >> 1, 10, offset); -}; -inline int fstd(int Dd, Register Rn, int offset = 0) -{ - return COXFER(AL, 1, 1, 0, 0, 0, Rn, Dd, 11, offset); -}; -// move between GPRs and FPRs -inline int fmsr(int Sn, Register Rd) -{ - return mcr(10, 0, Rd, Sn >> 1, 0, (Sn & 1) << 2); -} -inline int fmrs(Register Rd, int Sn) -{ - return mrc(10, 0, Rd, Sn >> 1, 0, (Sn & 1) << 2); -} -// move to/from VFP system registers -inline int fmrx(Register Rd, int reg) -{ - return mrc(10, 7, Rd, reg, 0); -} -// these move around pairs of single-precision registers -inline int fmdrr(int Dm, Register Rd, Register Rn) -{ - return mcrr(11, 1, Rd, Rn, Dm); -} -inline int fmrrd(Register Rd, Register Rn, int Dm) -{ - return mrrc(11, 1, Rd, Rn, Dm); -} -// FLAG SETTERS -inline int SETCOND(int ins, int cond) -{ - return ((ins & 0x0fffffff) | (cond << 28)); -} -inline int SETS(int ins) -{ - return ins | 1 << 20; -} -// PSEUDO-INSTRUCTIONS -inline int lsl(Register Rd, Register Rm, Register Rs) -{ - return movsh(Rd, Rm, Rs, LSL); -} -inline int lsli(Register Rd, Register Rm, int imm) -{ - return mov(Rd, Rm, LSL, imm); -} -inline int lsr(Register Rd, Register Rm, Register Rs) -{ - return movsh(Rd, Rm, Rs, LSR); -} -inline int lsri(Register Rd, Register Rm, int imm) -{ - return mov(Rd, Rm, LSR, imm); -} -inline int asr(Register Rd, Register Rm, Register Rs) -{ - return movsh(Rd, Rm, Rs, ASR); -} -inline int asri(Register Rd, Register Rm, int imm) -{ - return mov(Rd, Rm, ASR, imm); -} -inline int beq(int offset) -{ - return SETCOND(b(offset), EQ); -} -inline int bne(int offset) -{ - return SETCOND(b(offset), NE); -} -inline int bls(int offset) -{ - return SETCOND(b(offset), LS); -} -inline int bhi(int offset) -{ - return SETCOND(b(offset), HI); -} -inline int blt(int offset) -{ - return SETCOND(b(offset), LT); -} -inline int bgt(int offset) -{ - return SETCOND(b(offset), GT); -} -inline int ble(int offset) -{ - return SETCOND(b(offset), LE); -} -inline int bge(int offset) -{ - return SETCOND(b(offset), GE); -} -inline int blo(int offset) -{ - return SETCOND(b(offset), CC); -} -inline int bhs(int offset) -{ - return SETCOND(b(offset), CS); -} -inline int bpl(int offset) -{ - return SETCOND(b(offset), PL); -} -inline int fmstat() -{ - return fmrx(Register(15), FPSCR); -} -// todo: make this pretty: -inline int dmb() -{ - return 0xf57ff05f; -} - -} // namespace isa - -inline void emit(Context* con, int code) -{ - con->code.append4(code); -} - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_ARM_ENCODE_H diff --git a/sgx-jvm/avian/src/codegen/target/arm/fixup.cpp b/sgx-jvm/avian/src/codegen/target/arm/fixup.cpp deleted file mode 100644 index d345ae3cba..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/fixup.cpp +++ /dev/null @@ -1,333 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "context.h" -#include "fixup.h" -#include "block.h" - -namespace { - -const unsigned InstructionSize = 4; - -} // namespace - -namespace avian { -namespace codegen { -namespace arm { - -using namespace util; - -unsigned padding(MyBlock*, unsigned); - -OffsetPromise::OffsetPromise(Context* con, - MyBlock* block, - unsigned offset, - bool forTrace) - : con(con), block(block), offset(offset), forTrace(forTrace) -{ -} - -bool OffsetPromise::resolved() -{ - return block->start != static_cast(~0); -} - -int64_t OffsetPromise::value() -{ - assertT(con, resolved()); - - unsigned o = offset - block->offset; - return block->start + padding(block, forTrace ? o - InstructionSize : o) + o; -} - -Promise* offsetPromise(Context* con, bool forTrace) -{ - return new (con->zone) - OffsetPromise(con, con->lastBlock, con->code.length(), forTrace); -} - -OffsetListener::OffsetListener(vm::System* s, uint8_t* instruction) - : s(s), instruction(instruction) -{ -} - -bool OffsetListener::resolve(int64_t value, void** location) -{ - void* p = updateOffset(s, instruction, value); - if (location) - *location = p; - return false; -} - -OffsetTask::OffsetTask(Task* next, Promise* promise, Promise* instructionOffset) - : Task(next), promise(promise), instructionOffset(instructionOffset) -{ -} - -void OffsetTask::run(Context* con) -{ - if (promise->resolved()) { - updateOffset( - con->s, con->result + instructionOffset->value(), promise->value()); - } else { - new (promise->listen(sizeof(OffsetListener))) - OffsetListener(con->s, con->result + instructionOffset->value()); - } -} - -void appendOffsetTask(Context* con, - Promise* promise, - Promise* instructionOffset) -{ - con->tasks = new (con->zone) - OffsetTask(con->tasks, promise, instructionOffset); -} - -bool bounded(int right, int left, int32_t v) -{ - return ((v << left) >> left) == v and ((v >> right) << right) == v; -} - -void* updateOffset(vm::System* s, uint8_t* instruction, int64_t value) -{ - int32_t* p = reinterpret_cast(instruction); - - int32_t v; - int32_t mask; - if (vm::TargetBytesPerWord == 8) { - if ((*p >> 24) == 0x54) { - // conditional branch - v = ((reinterpret_cast(value) - instruction) >> 2) << 5; - mask = 0xFFFFE0; - expect(s, bounded(5, 8, v)); - } else { - // unconditional branch - v = (reinterpret_cast(value) - instruction) >> 2; - mask = 0x3FFFFFF; - expect(s, bounded(0, 6, v)); - } - } else { - v = (reinterpret_cast(value) - (instruction + 8)) >> 2; - mask = 0xFFFFFF; - expect(s, bounded(0, 8, v)); - } - - *p = (v & mask) | ((~mask) & *p); - - return instruction + InstructionSize; -} - -ConstantPoolEntry::ConstantPoolEntry(Context* con, - Promise* constant, - ConstantPoolEntry* next, - Promise* callOffset) - : con(con), - constant(constant), - next(next), - callOffset(callOffset), - address(0) -{ -} - -int64_t ConstantPoolEntry::value() -{ - assertT(con, resolved()); - - return reinterpret_cast(address); -} - -bool ConstantPoolEntry::resolved() -{ - return address != 0; -} - -ConstantPoolListener::ConstantPoolListener(vm::System* s, - vm::target_uintptr_t* address, - uint8_t* returnAddress) - : s(s), address(address), returnAddress(returnAddress) -{ -} - -bool ConstantPoolListener::resolve(int64_t value, void** location) -{ - *address = value; - if (location) { - *location = returnAddress ? static_cast(returnAddress) : address; - } - return true; -} - -PoolOffset::PoolOffset(MyBlock* block, - ConstantPoolEntry* entry, - unsigned offset) - : block(block), entry(entry), next(0), offset(offset) -{ -} - -PoolEvent::PoolEvent(PoolOffset* poolOffsetHead, - PoolOffset* poolOffsetTail, - unsigned offset) - : poolOffsetHead(poolOffsetHead), - poolOffsetTail(poolOffsetTail), - next(0), - offset(offset) -{ -} - -void appendConstantPoolEntry(Context* con, - Promise* constant, - Promise* callOffset) -{ - if (constant->resolved()) { - // make a copy, since the original might be allocated on the - // stack, and we need our copy to live until assembly is complete - constant = new (con->zone) ResolvedPromise(constant->value()); - } - - con->constantPool = new (con->zone) - ConstantPoolEntry(con, constant, con->constantPool, callOffset); - - ++con->constantPoolCount; - - PoolOffset* o = new (con->zone) - PoolOffset(con->lastBlock, - con->constantPool, - con->code.length() - con->lastBlock->offset); - - if (DebugPool) { - fprintf(stderr, - "add pool offset %p %d to block %p\n", - o, - o->offset, - con->lastBlock); - } - - if (con->lastBlock->poolOffsetTail) { - con->lastBlock->poolOffsetTail->next = o; - } else { - con->lastBlock->poolOffsetHead = o; - } - con->lastBlock->poolOffsetTail = o; -} - -void appendPoolEvent(Context* con, - MyBlock* b, - unsigned offset, - PoolOffset* head, - PoolOffset* tail) -{ - PoolEvent* e = new (con->zone) PoolEvent(head, tail, offset); - - if (b->poolEventTail) { - b->poolEventTail->next = e; - } else { - b->poolEventHead = e; - } - b->poolEventTail = e; -} - -bool needJump(MyBlock* b) -{ - return b->next or b->size != (b->size & PoolOffsetMask); -} - -unsigned padding(MyBlock* b, unsigned offset) -{ - unsigned total = 0; - for (PoolEvent* e = b->poolEventHead; e; e = e->next) { - if (e->offset <= offset) { - if (needJump(b)) { - total += vm::TargetBytesPerWord; - } - for (PoolOffset* o = e->poolOffsetHead; o; o = o->next) { - total += vm::TargetBytesPerWord; - } - } else { - break; - } - } - return total; -} - -void resolve(MyBlock* b) -{ - Context* con = b->context; - - if (b->poolOffsetHead) { - if (con->poolOffsetTail) { - con->poolOffsetTail->next = b->poolOffsetHead; - } else { - con->poolOffsetHead = b->poolOffsetHead; - } - con->poolOffsetTail = b->poolOffsetTail; - } - - if (con->poolOffsetHead) { - bool append; - if (b->next == 0 or b->next->poolEventHead) { - append = true; - } else { - int32_t v - = (b->start + b->size + b->next->size + vm::TargetBytesPerWord - 8) - - (con->poolOffsetHead->offset + con->poolOffsetHead->block->start); - - append = (v != (v & PoolOffsetMask)); - - if (DebugPool) { - fprintf(stderr, - "current %p %d %d next %p %d %d\n", - b, - b->start, - b->size, - b->next, - b->start + b->size, - b->next->size); - fprintf(stderr, - "offset %p %d is of distance %d to next block; append? %d\n", - con->poolOffsetHead, - con->poolOffsetHead->offset, - v, - append); - } - } - - if (append) { -#ifndef NDEBUG - int32_t v - = (b->start + b->size - 8) - - (con->poolOffsetHead->offset + con->poolOffsetHead->block->start); - - expect(con, v == (v & PoolOffsetMask)); -#endif // not NDEBUG - - appendPoolEvent( - con, b, b->size, con->poolOffsetHead, con->poolOffsetTail); - - if (DebugPool) { - for (PoolOffset* o = con->poolOffsetHead; o; o = o->next) { - fprintf(stderr, - "include %p %d in pool event %p at offset %d in block %p\n", - o, - o->offset, - b->poolEventTail, - b->size, - b); - } - } - - con->poolOffsetHead = 0; - con->poolOffsetTail = 0; - } - } -} - -} // namespace arm -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/arm/fixup.h b/sgx-jvm/avian/src/codegen/target/arm/fixup.h deleted file mode 100644 index 31340ed4bd..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/fixup.h +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_ARM_PROMISE_H -#define AVIAN_CODEGEN_ASSEMBLER_ARM_PROMISE_H - -#include "avian/target.h" - -#include -#include -#include "avian/alloc-vector.h" - -namespace vm { -class System; -} - -namespace avian { -namespace codegen { -namespace arm { - -const bool DebugPool = false; - -const int32_t PoolOffsetMask = vm::TargetBytesPerWord == 8 ? 0x1FFFFF : 0xFFF; - -class Task { - public: - Task(Task* next) : next(next) - { - } - - virtual void run(Context* con) = 0; - - Task* next; -}; - -class OffsetPromise : public Promise { - public: - OffsetPromise(Context* con, MyBlock* block, unsigned offset, bool forTrace); - - virtual bool resolved(); - - virtual int64_t value(); - - Context* con; - MyBlock* block; - unsigned offset; - bool forTrace; -}; - -Promise* offsetPromise(Context* con, bool forTrace = false); - -class OffsetListener : public Promise::Listener { - public: - OffsetListener(vm::System* s, uint8_t* instruction); - - virtual bool resolve(int64_t value, void** location); - - vm::System* s; - uint8_t* instruction; -}; - -class OffsetTask : public Task { - public: - OffsetTask(Task* next, Promise* promise, Promise* instructionOffset); - - virtual void run(Context* con); - - Promise* promise; - Promise* instructionOffset; -}; - -void appendOffsetTask(Context* con, - Promise* promise, - Promise* instructionOffset); - -void* updateOffset(vm::System* s, uint8_t* instruction, int64_t value); - -class ConstantPoolEntry : public Promise { - public: - ConstantPoolEntry(Context* con, - Promise* constant, - ConstantPoolEntry* next, - Promise* callOffset); - - virtual int64_t value(); - - virtual bool resolved(); - - Context* con; - Promise* constant; - ConstantPoolEntry* next; - Promise* callOffset; - void* address; - unsigned constantPoolCount; -}; - -class ConstantPoolListener : public Promise::Listener { - public: - ConstantPoolListener(vm::System* s, - vm::target_uintptr_t* address, - uint8_t* returnAddress); - - virtual bool resolve(int64_t value, void** location); - - vm::System* s; - vm::target_uintptr_t* address; - uint8_t* returnAddress; -}; - -class PoolOffset { - public: - PoolOffset(MyBlock* block, ConstantPoolEntry* entry, unsigned offset); - - MyBlock* block; - ConstantPoolEntry* entry; - PoolOffset* next; - unsigned offset; -}; - -class PoolEvent { - public: - PoolEvent(PoolOffset* poolOffsetHead, - PoolOffset* poolOffsetTail, - unsigned offset); - - PoolOffset* poolOffsetHead; - PoolOffset* poolOffsetTail; - PoolEvent* next; - unsigned offset; -}; - -void appendConstantPoolEntry(Context* con, - Promise* constant, - Promise* callOffset); - -void appendPoolEvent(Context* con, - MyBlock* b, - unsigned offset, - PoolOffset* head, - PoolOffset* tail); - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_ARM_PROMISE_H diff --git a/sgx-jvm/avian/src/codegen/target/arm/multimethod.cpp b/sgx-jvm/avian/src/codegen/target/arm/multimethod.cpp deleted file mode 100644 index 94e3d6f3fb..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/multimethod.cpp +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "context.h" -#include "operations.h" - -#include "multimethod.h" -#include "../multimethod.h" - -namespace avian { -namespace codegen { -namespace arm { - -using namespace util; - -unsigned index(ArchitectureContext*, - lir::BinaryOperation operation, - lir::Operand::Type operand1, - lir::Operand::Type operand2) -{ - return operation + (lir::BinaryOperationCount * (unsigned)operand1) - + (lir::BinaryOperationCount * lir::Operand::TypeCount * (unsigned)operand2); -} - -unsigned index(ArchitectureContext* con UNUSED, - lir::TernaryOperation operation, - lir::Operand::Type operand1) -{ - assertT(con, not isBranch(operation)); - - return operation + (lir::NonBranchTernaryOperationCount * (unsigned)operand1); -} - -unsigned branchIndex(ArchitectureContext* con UNUSED, - lir::Operand::Type operand1, - lir::Operand::Type operand2) -{ - return (unsigned)operand1 + (lir::Operand::TypeCount * (unsigned)operand2); -} - -void populateTables(ArchitectureContext* con) -{ - const lir::Operand::Type C = lir::Operand::Type::Constant; - const lir::Operand::Type A = lir::Operand::Type::Address; - const lir::Operand::Type R = lir::Operand::Type::RegisterPair; - const lir::Operand::Type M = lir::Operand::Type::Memory; - - OperationType* zo = con->operations; - UnaryOperationType* uo = con->unaryOperations; - BinaryOperationType* bo = con->binaryOperations; - TernaryOperationType* to = con->ternaryOperations; - BranchOperationType* bro = con->branchOperations; - - zo[lir::Return] = return_; - zo[lir::LoadBarrier] = loadBarrier; - zo[lir::StoreStoreBarrier] = storeStoreBarrier; - zo[lir::StoreLoadBarrier] = storeLoadBarrier; - zo[lir::Trap] = trap; - - uo[Multimethod::index(lir::LongCall, C)] = CAST1(longCallC); - - uo[Multimethod::index(lir::AlignedLongCall, C)] = CAST1(longCallC); - - uo[Multimethod::index(lir::LongJump, C)] = CAST1(longJumpC); - - uo[Multimethod::index(lir::AlignedLongJump, C)] = CAST1(longJumpC); - - uo[Multimethod::index(lir::Jump, R)] = CAST1(jumpR); - uo[Multimethod::index(lir::Jump, C)] = CAST1(jumpC); - - uo[Multimethod::index(lir::AlignedJump, R)] = CAST1(jumpR); - uo[Multimethod::index(lir::AlignedJump, C)] = CAST1(jumpC); - - uo[Multimethod::index(lir::Call, C)] = CAST1(callC); - uo[Multimethod::index(lir::Call, R)] = CAST1(callR); - - uo[Multimethod::index(lir::AlignedCall, C)] = CAST1(callC); - uo[Multimethod::index(lir::AlignedCall, R)] = CAST1(callR); - - bo[index(con, lir::Move, R, R)] = CAST2(moveRR); - bo[index(con, lir::Move, C, R)] = CAST2(moveCR); - bo[index(con, lir::Move, C, M)] = CAST2(moveCM); - bo[index(con, lir::Move, M, R)] = CAST2(moveMR); - bo[index(con, lir::Move, R, M)] = CAST2(moveRM); - bo[index(con, lir::Move, A, R)] = CAST2(moveAR); - - bo[index(con, lir::MoveZ, R, R)] = CAST2(moveZRR); - bo[index(con, lir::MoveZ, M, R)] = CAST2(moveZMR); - bo[index(con, lir::MoveZ, C, R)] = CAST2(moveCR); - - bo[index(con, lir::Negate, R, R)] = CAST2(negateRR); - - bo[index(con, lir::FloatAbsolute, R, R)] = CAST2(floatAbsoluteRR); - bo[index(con, lir::FloatNegate, R, R)] = CAST2(floatNegateRR); - bo[index(con, lir::Float2Float, R, R)] = CAST2(float2FloatRR); - bo[index(con, lir::Float2Int, R, R)] = CAST2(float2IntRR); - bo[index(con, lir::Int2Float, R, R)] = CAST2(int2FloatRR); - bo[index(con, lir::FloatSquareRoot, R, R)] = CAST2(floatSqrtRR); - - to[index(con, lir::Add, R)] = CAST3(addR); - - to[index(con, lir::Subtract, R)] = CAST3(subR); - - to[index(con, lir::Multiply, R)] = CAST3(multiplyR); - - to[index(con, lir::FloatAdd, R)] = CAST3(floatAddR); - to[index(con, lir::FloatSubtract, R)] = CAST3(floatSubtractR); - to[index(con, lir::FloatMultiply, R)] = CAST3(floatMultiplyR); - to[index(con, lir::FloatDivide, R)] = CAST3(floatDivideR); - - to[index(con, lir::ShiftLeft, R)] = CAST3(shiftLeftR); - to[index(con, lir::ShiftLeft, C)] = CAST3(shiftLeftC); - - to[index(con, lir::ShiftRight, R)] = CAST3(shiftRightR); - to[index(con, lir::ShiftRight, C)] = CAST3(shiftRightC); - - to[index(con, lir::UnsignedShiftRight, R)] = CAST3(unsignedShiftRightR); - to[index(con, lir::UnsignedShiftRight, C)] = CAST3(unsignedShiftRightC); - - to[index(con, lir::And, R)] = CAST3(andR); - to[index(con, lir::And, C)] = CAST3(andC); - - to[index(con, lir::Or, R)] = CAST3(orR); - - to[index(con, lir::Xor, R)] = CAST3(xorR); - - bro[branchIndex(con, R, R)] = CAST_BRANCH(branchRR); - bro[branchIndex(con, C, R)] = CAST_BRANCH(branchCR); - bro[branchIndex(con, C, M)] = CAST_BRANCH(branchCM); - bro[branchIndex(con, R, M)] = CAST_BRANCH(branchRM); -} - -} // namespace arm -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/arm/multimethod.h b/sgx-jvm/avian/src/codegen/target/arm/multimethod.h deleted file mode 100644 index 2459b8bef6..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/multimethod.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_ARM_MULTIMETHOD_H -#define AVIAN_CODEGEN_ASSEMBLER_ARM_MULTIMETHOD_H - -#include -#include - -#define CAST1(x) reinterpret_cast(x) -#define CAST2(x) reinterpret_cast(x) -#define CAST3(x) reinterpret_cast(x) -#define CAST_BRANCH(x) reinterpret_cast(x) - -namespace avian { -namespace codegen { -namespace arm { - -unsigned index(ArchitectureContext*, - lir::BinaryOperation operation, - lir::Operand::Type operand1, - lir::Operand::Type operand2); - -unsigned index(ArchitectureContext* con UNUSED, - lir::TernaryOperation operation, - lir::Operand::Type operand1); - -unsigned branchIndex(ArchitectureContext* con UNUSED, - lir::Operand::Type operand1, - lir::Operand::Type operand2); - -void populateTables(ArchitectureContext* con); - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_ARM_MULTIMETHOD_H diff --git a/sgx-jvm/avian/src/codegen/target/arm/operations.h b/sgx-jvm/avian/src/codegen/target/arm/operations.h deleted file mode 100644 index 08603bcd73..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/operations.h +++ /dev/null @@ -1,434 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_ARM_OPERATIONS_H -#define AVIAN_CODEGEN_ASSEMBLER_ARM_OPERATIONS_H - -#include "registers.h" - -namespace vm { -class System; -} - -namespace avian { -namespace codegen { -namespace arm { - -class Context; - -// shortcut functions - -inline Register newTemp(Context* con) -{ - return con->client->acquireTemporary(GPR_MASK); -} - -inline Register newTemp(Context* con, RegisterMask mask) -{ - return con->client->acquireTemporary(mask); -} - -inline void freeTemp(Context* con, Register r) -{ - con->client->releaseTemporary(r); -} - -inline int64_t getValue(lir::Constant* con) -{ - return con->value->value(); -} - -inline lir::RegisterPair makeTemp(Context* con) -{ - lir::RegisterPair tmp(newTemp(con)); - return tmp; -} - -inline lir::RegisterPair makeTemp64(Context* con) -{ - lir::RegisterPair tmp(newTemp(con), newTemp(con)); - return tmp; -} - -inline void freeTemp(Context* con, const lir::RegisterPair& tmp) -{ - if (tmp.low != NoRegister) - freeTemp(con, tmp.low); - if (tmp.high != NoRegister) - freeTemp(con, tmp.high); -} - -void shiftLeftR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void moveRR(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize, - lir::RegisterPair* dst); - -void shiftLeftC(Context* con, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void shiftRightR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void shiftRightC(Context* con, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void unsignedShiftRightR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void unsignedShiftRightC(Context* con, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -bool needJump(MyBlock* b); - -unsigned padding(MyBlock* b, unsigned offset); - -void resolve(MyBlock* b); - -void jumpR(Context* con, unsigned size UNUSED, lir::RegisterPair* target); - -void swapRR(Context* con, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b); - -void moveRR(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize, - lir::RegisterPair* dst); - -void moveZRR(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned, - lir::RegisterPair* dst); - -void moveCR(Context* con, - unsigned size, - lir::Constant* src, - unsigned, - lir::RegisterPair* dst); - -void moveCR2(Context* con, - unsigned size, - lir::Constant* src, - lir::RegisterPair* dst, - Promise* callOffset); - -void moveCR(Context* con, - unsigned size, - lir::Constant* src, - unsigned, - lir::RegisterPair* dst); - -void addR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void subR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void addC(Context* con, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst); - -void subC(Context* con, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst); - -void multiplyR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void floatAbsoluteRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b); - -void floatNegateRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b); - -void float2FloatRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b); - -void float2IntRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b); - -void int2FloatRR(Context* con, - unsigned, - lir::RegisterPair* a, - unsigned size, - lir::RegisterPair* b); - -void floatSqrtRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b); - -void floatAddR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void floatSubtractR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void floatMultiplyR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -void floatDivideR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t); - -int normalize(Context* con, - int offset, - int index, - unsigned scale, - bool* preserveIndex, - bool* release); - -void store(Context* con, - unsigned size, - lir::RegisterPair* src, - int base, - int offset, - int index, - unsigned scale, - bool preserveIndex); - -void moveRM(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize UNUSED, - lir::Memory* dst); - -void load(Context* con, - unsigned srcSize, - int base, - int offset, - int index, - unsigned scale, - unsigned dstSize, - lir::RegisterPair* dst, - bool preserveIndex, - bool signExtend); - -void moveMR(Context* con, - unsigned srcSize, - lir::Memory* src, - unsigned dstSize, - lir::RegisterPair* dst); - -void moveZMR(Context* con, - unsigned srcSize, - lir::Memory* src, - unsigned dstSize, - lir::RegisterPair* dst); - -void andR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst); - -void andC(Context* con, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst); - -void orR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst); - -void xorR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst); - -void moveAR2(Context* con, - unsigned srcSize, - lir::Address* src, - unsigned dstSize, - lir::RegisterPair* dst); - -void moveAR(Context* con, - unsigned srcSize, - lir::Address* src, - unsigned dstSize, - lir::RegisterPair* dst); - -void compareRR(Context* con, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void compareCR(Context* con, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void compareCM(Context* con, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::Memory* b); - -void compareRM(Context* con, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::Memory* b); - -int32_t branch(Context* con, lir::TernaryOperation op); - -void conditional(Context* con, int32_t branch, lir::Constant* target); - -void branch(Context* con, lir::TernaryOperation op, lir::Constant* target); - -void branchLong(Context* con, - lir::TernaryOperation op, - lir::Operand* al, - lir::Operand* ah, - lir::Operand* bl, - lir::Operand* bh, - lir::Constant* target, - BinaryOperationType compareSigned, - BinaryOperationType compareUnsigned); - -void branchRR(Context* con, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::Constant* target); - -void branchCR(Context* con, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::Constant* target); - -void branchRM(Context* con, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::Memory* b, - lir::Constant* target); - -void branchCM(Context* con, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::Memory* b, - lir::Constant* target); - -ShiftMaskPromise* shiftMaskPromise(Context* con, - Promise* base, - unsigned shift, - int64_t mask); - -void moveCM(Context* con, - unsigned srcSize, - lir::Constant* src, - unsigned dstSize, - lir::Memory* dst); - -void negateRR(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize UNUSED, - lir::RegisterPair* dst); - -void callR(Context* con, unsigned size UNUSED, lir::RegisterPair* target); - -void callC(Context* con, unsigned size UNUSED, lir::Constant* target); - -void longCallC(Context* con, unsigned size UNUSED, lir::Constant* target); - -void longJumpC(Context* con, unsigned size UNUSED, lir::Constant* target); - -void jumpC(Context* con, unsigned size UNUSED, lir::Constant* target); - -void return_(Context* con); - -void trap(Context* con); - -void loadBarrier(Context*); - -void storeStoreBarrier(Context*); - -void storeLoadBarrier(Context*); - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_ARM_OPERATIONS_H diff --git a/sgx-jvm/avian/src/codegen/target/arm/operations32.cpp b/sgx-jvm/avian/src/codegen/target/arm/operations32.cpp deleted file mode 100644 index 5572dcae87..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/operations32.cpp +++ /dev/null @@ -1,1459 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "context.h" -#include "operations.h" -#include "encode.h" -#include "block.h" -#include "fixup.h" -#include "multimethod.h" - -#if TARGET_BYTES_PER_WORD == 4 - -namespace avian { -namespace codegen { -namespace arm { - -using namespace isa; -using namespace avian::util; - -inline bool isOfWidth(int64_t i, int size) -{ - return static_cast(i) >> size == 0; -} - -inline unsigned lo8(int64_t i) -{ - return (unsigned)(i & MASK_LO8); -} - -void andC(Context* con, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst); - -void shiftLeftR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - Register tmp1 = newTemp(con), tmp2 = newTemp(con), tmp3 = newTemp(con); - ResolvedPromise maskPromise(0x3F); - lir::Constant mask(&maskPromise); - lir::RegisterPair dst(tmp3); - andC(con, 4, &mask, a, &dst); - emit(con, lsl(tmp1, b->high, tmp3)); - emit(con, rsbi(tmp2, tmp3, 32)); - emit(con, orrsh(tmp1, tmp1, b->low, tmp2, LSR)); - emit(con, SETS(subi(t->high, tmp3, 32))); - emit(con, SETCOND(mov(t->high, tmp1), MI)); - emit(con, SETCOND(lsl(t->high, b->low, t->high), PL)); - emit(con, lsl(t->low, b->low, tmp3)); - freeTemp(con, tmp1); - freeTemp(con, tmp2); - freeTemp(con, tmp3); - } else { - Register tmp = newTemp(con); - ResolvedPromise maskPromise(0x1F); - lir::Constant mask(&maskPromise); - lir::RegisterPair dst(tmp); - andC(con, size, &mask, a, &dst); - emit(con, lsl(t->low, b->low, tmp)); - freeTemp(con, tmp); - } -} - -void moveRR(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize, - lir::RegisterPair* dst); - -void shiftLeftC(Context* con, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - assertT(con, size == vm::TargetBytesPerWord); - if (getValue(a) & 0x1F) { - emit(con, lsli(t->low, b->low, getValue(a) & 0x1F)); - } else { - moveRR(con, size, b, size, t); - } -} - -void shiftRightR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - Register tmp1 = newTemp(con), tmp2 = newTemp(con), tmp3 = newTemp(con); - ResolvedPromise maskPromise(0x3F); - lir::Constant mask(&maskPromise); - lir::RegisterPair dst(tmp3); - andC(con, 4, &mask, a, &dst); - emit(con, lsr(tmp1, b->low, tmp3)); - emit(con, rsbi(tmp2, tmp3, 32)); - emit(con, orrsh(tmp1, tmp1, b->high, tmp2, LSL)); - emit(con, SETS(subi(t->low, tmp3, 32))); - emit(con, SETCOND(mov(t->low, tmp1), MI)); - emit(con, SETCOND(asr(t->low, b->high, t->low), PL)); - emit(con, asr(t->high, b->high, tmp3)); - freeTemp(con, tmp1); - freeTemp(con, tmp2); - freeTemp(con, tmp3); - } else { - Register tmp = newTemp(con); - ResolvedPromise maskPromise(0x1F); - lir::Constant mask(&maskPromise); - lir::RegisterPair dst(tmp); - andC(con, size, &mask, a, &dst); - emit(con, asr(t->low, b->low, tmp)); - freeTemp(con, tmp); - } -} - -void shiftRightC(Context* con, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - assertT(con, size == vm::TargetBytesPerWord); - if (getValue(a) & 0x1F) { - emit(con, asri(t->low, b->low, getValue(a) & 0x1F)); - } else { - moveRR(con, size, b, size, t); - } -} - -void unsignedShiftRightR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - Register tmpShift = newTemp(con); - ResolvedPromise maskPromise(size == 8 ? 0x3F : 0x1F); - lir::Constant mask(&maskPromise); - lir::RegisterPair dst(tmpShift); - andC(con, 4, &mask, a, &dst); - emit(con, lsr(t->low, b->low, tmpShift)); - if (size == 8) { - Register tmpHi = newTemp(con), tmpLo = newTemp(con); - emit(con, SETS(rsbi(tmpHi, tmpShift, 32))); - emit(con, lsl(tmpLo, b->high, tmpHi)); - emit(con, orr(t->low, t->low, tmpLo)); - emit(con, addi(tmpHi, tmpShift, -32)); - emit(con, lsr(tmpLo, b->high, tmpHi)); - emit(con, orr(t->low, t->low, tmpLo)); - emit(con, lsr(t->high, b->high, tmpShift)); - freeTemp(con, tmpHi); - freeTemp(con, tmpLo); - } - freeTemp(con, tmpShift); -} - -void unsignedShiftRightC(Context* con, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - assertT(con, size == vm::TargetBytesPerWord); - if (getValue(a) & 0x1F) { - emit(con, lsri(t->low, b->low, getValue(a) & 0x1F)); - } else { - moveRR(con, size, b, size, t); - } -} - -void jumpR(Context* con, unsigned size UNUSED, lir::RegisterPair* target) -{ - assertT(con, size == vm::TargetBytesPerWord); - emit(con, bx(target->low)); -} - -void swapRR(Context* con, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(con, aSize == vm::TargetBytesPerWord); - assertT(con, bSize == vm::TargetBytesPerWord); - - lir::RegisterPair tmp(con->client->acquireTemporary(GPR_MASK)); - moveRR(con, aSize, a, bSize, &tmp); - moveRR(con, bSize, b, aSize, a); - moveRR(con, bSize, &tmp, bSize, b); - con->client->releaseTemporary(tmp.low); -} - -void moveRR(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - bool srcIsFpr = isFpr(src); - bool dstIsFpr = isFpr(dst); - if (srcIsFpr || dstIsFpr) { // FPR(s) involved - assertT(con, srcSize == dstSize); - const bool dprec = srcSize == 8; - if (srcIsFpr && dstIsFpr) { // FPR to FPR - if (dprec) - emit(con, fcpyd(fpr64(dst), fpr64(src))); // double - else - emit(con, fcpys(fpr32(dst), fpr32(src))); // single - } else if (srcIsFpr) { // FPR to GPR - if (dprec) - emit(con, fmrrd(dst->low, dst->high, fpr64(src))); - else - emit(con, fmrs(dst->low, fpr32(src))); - } else { // GPR to FPR - if (dprec) - emit(con, fmdrr(fpr64(dst->low), src->low, src->high)); - else - emit(con, fmsr(fpr32(dst), src->low)); - } - return; - } - - switch (srcSize) { - case 1: - emit(con, lsli(dst->low, src->low, 24)); - emit(con, asri(dst->low, dst->low, 24)); - break; - - case 2: - emit(con, lsli(dst->low, src->low, 16)); - emit(con, asri(dst->low, dst->low, 16)); - break; - - case 4: - case 8: - if (srcSize == 4 and dstSize == 8) { - moveRR(con, 4, src, 4, dst); - emit(con, asri(dst->high, src->low, 31)); - } else if (srcSize == 8 and dstSize == 8) { - lir::RegisterPair srcHigh(src->high); - lir::RegisterPair dstHigh(dst->high); - - if (src->high == dst->low) { - if (src->low == dst->high) { - swapRR(con, 4, src, 4, dst); - } else { - moveRR(con, 4, &srcHigh, 4, &dstHigh); - moveRR(con, 4, src, 4, dst); - } - } else { - moveRR(con, 4, src, 4, dst); - moveRR(con, 4, &srcHigh, 4, &dstHigh); - } - } else if (src->low != dst->low) { - emit(con, mov(dst->low, src->low)); - } - break; - - default: - abort(con); - } -} - -void moveZRR(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned, - lir::RegisterPair* dst) -{ - switch (srcSize) { - case 2: - emit(con, lsli(dst->low, src->low, 16)); - emit(con, lsri(dst->low, dst->low, 16)); - break; - - default: - abort(con); - } -} - -void moveCR(Context* con, - unsigned size, - lir::Constant* src, - unsigned, - lir::RegisterPair* dst); - -void moveCR2(Context* con, - unsigned size, - lir::Constant* src, - lir::RegisterPair* dst, - Promise* callOffset) -{ - if (isFpr(dst)) { // floating-point - lir::RegisterPair tmp = size > 4 ? makeTemp64(con) : makeTemp(con); - moveCR(con, size, src, size, &tmp); - moveRR(con, size, &tmp, size, dst); - freeTemp(con, tmp); - } else if (size > 4) { - uint64_t value = (uint64_t)src->value->value(); - ResolvedPromise loBits(value & MASK_LO32); - lir::Constant srcLo(&loBits); - ResolvedPromise hiBits(value >> 32); - lir::Constant srcHi(&hiBits); - lir::RegisterPair dstHi(dst->high); - moveCR(con, 4, &srcLo, 4, dst); - moveCR(con, 4, &srcHi, 4, &dstHi); - } else if (callOffset == 0 and src->value->resolved() - and isOfWidth(getValue(src), 8)) { - emit(con, movi(dst->low, lo8(getValue(src)))); // fits in immediate - } else { - appendConstantPoolEntry(con, src->value, callOffset); - emit(con, ldri(dst->low, ProgramCounter, 0)); // load 32 bits - } -} - -void moveCR(Context* con, - unsigned size, - lir::Constant* src, - unsigned, - lir::RegisterPair* dst) -{ - moveCR2(con, size, src, dst, 0); -} - -void addR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - emit(con, SETS(add(t->low, a->low, b->low))); - emit(con, adc(t->high, a->high, b->high)); - } else { - emit(con, add(t->low, a->low, b->low)); - } -} - -void subR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - emit(con, SETS(rsb(t->low, a->low, b->low))); - emit(con, rsc(t->high, a->high, b->high)); - } else { - emit(con, rsb(t->low, a->low, b->low)); - } -} - -void addC(Context* con, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - assertT(con, size == vm::TargetBytesPerWord); - - int32_t v = a->value->value(); - if (v) { - if (v > 0 and v < 256) { - emit(con, addi(dst->low, b->low, v)); - } else if (v > 0 and v < 1024 and v % 4 == 0) { - emit(con, addi(dst->low, b->low, v >> 2, 15)); - } else { - // todo - abort(con); - } - } else { - moveRR(con, size, b, size, dst); - } -} - -void subC(Context* con, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - assertT(con, size == vm::TargetBytesPerWord); - - int32_t v = a->value->value(); - if (v) { - if (v > 0 and v < 256) { - emit(con, subi(dst->low, b->low, v)); - } else if (v > 0 and v < 1024 and v % 4 == 0) { - emit(con, subi(dst->low, b->low, v >> 2, 15)); - } else { - // todo - abort(con); - } - } else { - moveRR(con, size, b, size, dst); - } -} - -void multiplyR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - bool useTemporaries = b->low == t->low; - Register tmpLow = useTemporaries ? con->client->acquireTemporary(GPR_MASK) - : t->low; - Register tmpHigh = useTemporaries ? con->client->acquireTemporary(GPR_MASK) - : t->high; - - emit(con, umull(tmpLow, tmpHigh, a->low, b->low)); - emit(con, mla(tmpHigh, a->low, b->high, tmpHigh)); - emit(con, mla(tmpHigh, a->high, b->low, tmpHigh)); - - if (useTemporaries) { - emit(con, mov(t->low, tmpLow)); - emit(con, mov(t->high, tmpHigh)); - con->client->releaseTemporary(tmpLow); - con->client->releaseTemporary(tmpHigh); - } - } else { - emit(con, mul(t->low, a->low, b->low)); - } -} - -void floatAbsoluteRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - if (size == 8) { - emit(con, fabsd(fpr64(b), fpr64(a))); - } else { - emit(con, fabss(fpr32(b), fpr32(a))); - } -} - -void floatNegateRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - if (size == 8) { - emit(con, fnegd(fpr64(b), fpr64(a))); - } else { - emit(con, fnegs(fpr32(b), fpr32(a))); - } -} - -void float2FloatRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - if (size == 8) { - emit(con, fcvtsd(fpr32(b), fpr64(a))); - } else { - emit(con, fcvtds(fpr64(b), fpr32(a))); - } -} - -void float2IntRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - Register tmp = newTemp(con, FPR_MASK); - int ftmp = fpr32(tmp); - if (size == 8) { // double to int - emit(con, ftosizd(ftmp, fpr64(a))); - } else { // float to int - emit(con, ftosizs(ftmp, fpr32(a))); - } // else thunked - emit(con, fmrs(b->low, ftmp)); - freeTemp(con, tmp); -} - -void int2FloatRR(Context* con, - unsigned, - lir::RegisterPair* a, - unsigned size, - lir::RegisterPair* b) -{ - emit(con, fmsr(fpr32(b), a->low)); - if (size == 8) { // int to double - emit(con, fsitod(fpr64(b), fpr32(b))); - } else { // int to float - emit(con, fsitos(fpr32(b), fpr32(b))); - } // else thunked -} - -void floatSqrtRR(Context* con, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - if (size == 8) { - emit(con, fsqrtd(fpr64(b), fpr64(a))); - } else { - emit(con, fsqrts(fpr32(b), fpr32(a))); - } -} - -void floatAddR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - emit(con, faddd(fpr64(t), fpr64(a), fpr64(b))); - } else { - emit(con, fadds(fpr32(t), fpr32(a), fpr32(b))); - } -} - -void floatSubtractR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - emit(con, fsubd(fpr64(t), fpr64(b), fpr64(a))); - } else { - emit(con, fsubs(fpr32(t), fpr32(b), fpr32(a))); - } -} - -void floatMultiplyR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - emit(con, fmuld(fpr64(t), fpr64(a), fpr64(b))); - } else { - emit(con, fmuls(fpr32(t), fpr32(a), fpr32(b))); - } -} - -void floatDivideR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* t) -{ - if (size == 8) { - emit(con, fdivd(fpr64(t), fpr64(b), fpr64(a))); - } else { - emit(con, fdivs(fpr32(t), fpr32(b), fpr32(a))); - } -} - -Register normalize(Context* con, - int offset, - Register index, - unsigned scale, - bool* preserveIndex, - bool* release) -{ - if (offset != 0 or scale != 1) { - lir::RegisterPair normalizedIndex( - *preserveIndex ? con->client->acquireTemporary(GPR_MASK) : index); - - if (*preserveIndex) { - *release = true; - *preserveIndex = false; - } else { - *release = false; - } - - Register scaled; - - if (scale != 1) { - lir::RegisterPair unscaledIndex(index); - - ResolvedPromise scalePromise(log(scale)); - lir::Constant scaleConstant(&scalePromise); - - shiftLeftC(con, - vm::TargetBytesPerWord, - &scaleConstant, - &unscaledIndex, - &normalizedIndex); - - scaled = normalizedIndex.low; - } else { - scaled = index; - } - - if (offset != 0) { - lir::RegisterPair untranslatedIndex(scaled); - - ResolvedPromise offsetPromise(offset); - lir::Constant offsetConstant(&offsetPromise); - - lir::RegisterPair tmp(con->client->acquireTemporary(GPR_MASK)); - moveCR(con, - vm::TargetBytesPerWord, - &offsetConstant, - vm::TargetBytesPerWord, - &tmp); - addR(con, - vm::TargetBytesPerWord, - &tmp, - &untranslatedIndex, - &normalizedIndex); - con->client->releaseTemporary(tmp.low); - } - - return normalizedIndex.low; - } else { - *release = false; - return index; - } -} - -void store(Context* con, - unsigned size, - lir::RegisterPair* src, - Register base, - int offset, - Register index, - unsigned scale, - bool preserveIndex) -{ - if (index != NoRegister) { - bool release; - Register normalized - = normalize(con, offset, index, scale, &preserveIndex, &release); - - if (!isFpr(src)) { // GPR store - switch (size) { - case 1: - emit(con, strb(src->low, base, normalized)); - break; - - case 2: - emit(con, strh(src->low, base, normalized)); - break; - - case 4: - emit(con, str(src->low, base, normalized)); - break; - - case 8: { // split into 2 32-bit stores - lir::RegisterPair srcHigh(src->high); - store(con, 4, &srcHigh, base, 0, normalized, 1, preserveIndex); - store(con, 4, src, base, 4, normalized, 1, preserveIndex); - } break; - - default: - abort(con); - } - } else { // FPR store - lir::RegisterPair base_(base), normalized_(normalized), - absAddr = makeTemp(con); - // FPR stores have only bases, so we must add the index - addR(con, vm::TargetBytesPerWord, &base_, &normalized_, &absAddr); - // double-precision - if (size == 8) - emit(con, fstd(fpr64(src), absAddr.low)); - // single-precision - else - emit(con, fsts(fpr32(src), absAddr.low)); - freeTemp(con, absAddr); - } - - if (release) - con->client->releaseTemporary(normalized); - } else if (size == 8 or abs(offset) == (abs(offset) & 0xFF) - or (size != 2 and abs(offset) == (abs(offset) & 0xFFF))) { - if (!isFpr(src)) { // GPR store - switch (size) { - case 1: - emit(con, strbi(src->low, base, offset)); - break; - - case 2: - emit(con, strhi(src->low, base, offset)); - break; - - case 4: - emit(con, stri(src->low, base, offset)); - break; - - case 8: { // split into 2 32-bit stores - lir::RegisterPair srcHigh(src->high); - store(con, 4, &srcHigh, base, offset, NoRegister, 1, false); - store(con, 4, src, base, offset + 4, NoRegister, 1, false); - } break; - - default: - abort(con); - } - } else { // FPR store - // double-precision - if (size == 8) - emit(con, fstd(fpr64(src), base, offset)); - // single-precision - else - emit(con, fsts(fpr32(src), base, offset)); - } - } else { - lir::RegisterPair tmp(con->client->acquireTemporary(GPR_MASK)); - ResolvedPromise offsetPromise(offset); - lir::Constant offsetConstant(&offsetPromise); - moveCR(con, - vm::TargetBytesPerWord, - &offsetConstant, - vm::TargetBytesPerWord, - &tmp); - - store(con, size, src, base, 0, tmp.low, 1, false); - - con->client->releaseTemporary(tmp.low); - } -} - -void moveRM(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize UNUSED, - lir::Memory* dst) -{ - assertT(con, srcSize == dstSize); - - store( - con, srcSize, src, dst->base, dst->offset, dst->index, dst->scale, true); -} - -void load(Context* con, - unsigned srcSize, - Register base, - int offset, - Register index, - unsigned scale, - unsigned dstSize, - lir::RegisterPair* dst, - bool preserveIndex, - bool signExtend) -{ - if (index != NoRegister) { - bool release; - Register normalized - = normalize(con, offset, index, scale, &preserveIndex, &release); - - if (!isFpr(dst)) { // GPR load - switch (srcSize) { - case 1: - if (signExtend) { - emit(con, ldrsb(dst->low, base, normalized)); - } else { - emit(con, ldrb(dst->low, base, normalized)); - } - break; - - case 2: - if (signExtend) { - emit(con, ldrsh(dst->low, base, normalized)); - } else { - emit(con, ldrh(dst->low, base, normalized)); - } - break; - - case 4: - case 8: { - if (srcSize == 4 and dstSize == 8) { - load(con, 4, base, 0, normalized, 1, 4, dst, preserveIndex, false); - moveRR(con, 4, dst, 8, dst); - } else if (srcSize == 8 and dstSize == 8) { - lir::RegisterPair dstHigh(dst->high); - load(con, - 4, - base, - 0, - normalized, - 1, - 4, - &dstHigh, - preserveIndex, - false); - load(con, 4, base, 4, normalized, 1, 4, dst, preserveIndex, false); - } else { - emit(con, ldr(dst->low, base, normalized)); - } - } break; - - default: - abort(con); - } - } else { // FPR load - lir::RegisterPair base_(base), normalized_(normalized), - absAddr = makeTemp(con); - // VFP loads only have bases, so we must add the index - addR(con, vm::TargetBytesPerWord, &base_, &normalized_, &absAddr); - // double-precision - if (srcSize == 8) - emit(con, fldd(fpr64(dst), absAddr.low)); - // single-precision - else - emit(con, flds(fpr32(dst), absAddr.low)); - freeTemp(con, absAddr); - } - - if (release) - con->client->releaseTemporary(normalized); - } else if ((srcSize == 8 and dstSize == 8) - or abs(offset) == (abs(offset) & 0xFF) - or (srcSize != 2 and (srcSize != 1 or not signExtend) - and abs(offset) == (abs(offset) & 0xFFF))) { - if (!isFpr(dst)) { // GPR load - switch (srcSize) { - case 1: - if (signExtend) { - emit(con, ldrsbi(dst->low, base, offset)); - } else { - emit(con, ldrbi(dst->low, base, offset)); - } - break; - - case 2: - if (signExtend) { - emit(con, ldrshi(dst->low, base, offset)); - } else { - emit(con, ldrhi(dst->low, base, offset)); - } - break; - - case 4: - emit(con, ldri(dst->low, base, offset)); - break; - - case 8: { - if (dstSize == 8) { - lir::RegisterPair dstHigh(dst->high); - load(con, 4, base, offset, NoRegister, 1, 4, &dstHigh, false, false); - load(con, 4, base, offset + 4, NoRegister, 1, 4, dst, false, false); - } else { - emit(con, ldri(dst->low, base, offset)); - } - } break; - - default: - abort(con); - } - } else { // FPR load - // double-precision - if (srcSize == 8) - emit(con, fldd(fpr64(dst), base, offset)); - // single-precision - else - emit(con, flds(fpr32(dst), base, offset)); - } - } else { - lir::RegisterPair tmp(con->client->acquireTemporary(GPR_MASK)); - ResolvedPromise offsetPromise(offset); - lir::Constant offsetConstant(&offsetPromise); - moveCR(con, - vm::TargetBytesPerWord, - &offsetConstant, - vm::TargetBytesPerWord, - &tmp); - - load(con, srcSize, base, 0, tmp.low, 1, dstSize, dst, false, signExtend); - - con->client->releaseTemporary(tmp.low); - } -} - -void moveMR(Context* con, - unsigned srcSize, - lir::Memory* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - load(con, - srcSize, - src->base, - src->offset, - src->index, - src->scale, - dstSize, - dst, - true, - true); -} - -void moveZMR(Context* con, - unsigned srcSize, - lir::Memory* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - load(con, - srcSize, - src->base, - src->offset, - src->index, - src->scale, - dstSize, - dst, - true, - false); -} - -void andR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - if (size == 8) - emit(con, and_(dst->high, a->high, b->high)); - emit(con, and_(dst->low, a->low, b->low)); -} - -void andC(Context* con, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - int64_t v = a->value->value(); - - if (size == 8) { - ResolvedPromise high((v >> 32) & 0xFFFFFFFF); - lir::Constant ah(&high); - - ResolvedPromise low(v & 0xFFFFFFFF); - lir::Constant al(&low); - - lir::RegisterPair bh(b->high); - lir::RegisterPair dh(dst->high); - - andC(con, 4, &al, b, dst); - andC(con, 4, &ah, &bh, &dh); - } else { - uint32_t v32 = static_cast(v); - if (v32 != 0xFFFFFFFF) { - if ((v32 & 0xFFFFFF00) == 0xFFFFFF00) { - emit(con, bici(dst->low, b->low, (~(v32 & 0xFF)) & 0xFF)); - } else if ((v32 & 0xFFFFFF00) == 0) { - emit(con, andi(dst->low, b->low, v32 & 0xFF)); - } else { - // todo: there are other cases we can handle in one - // instruction - - bool useTemporary = b->low == dst->low; - lir::RegisterPair tmp(dst->low); - if (useTemporary) { - tmp.low = con->client->acquireTemporary(GPR_MASK); - } - - moveCR(con, 4, a, 4, &tmp); - andR(con, 4, b, &tmp, dst); - - if (useTemporary) { - con->client->releaseTemporary(tmp.low); - } - } - } else { - moveRR(con, size, b, size, dst); - } - } -} - -void orR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - if (size == 8) - emit(con, orr(dst->high, a->high, b->high)); - emit(con, orr(dst->low, a->low, b->low)); -} - -void xorR(Context* con, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - if (size == 8) - emit(con, eor(dst->high, a->high, b->high)); - emit(con, eor(dst->low, a->low, b->low)); -} - -void moveAR2(Context* con, - unsigned srcSize, - lir::Address* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - assertT(con, srcSize == 4 and dstSize == 4); - - lir::Constant constant(src->address); - moveCR(con, srcSize, &constant, dstSize, dst); - - lir::Memory memory(dst->low, 0, NoRegister, 0); - moveMR(con, dstSize, &memory, dstSize, dst); -} - -void moveAR(Context* con, - unsigned srcSize, - lir::Address* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - moveAR2(con, srcSize, src, dstSize, dst); -} - -void compareRR(Context* con, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(con, !(isFpr(a) ^ isFpr(b))); // regs must be of the same type - - if (!isFpr(a)) { // GPR compare - assertT(con, aSize == 4 && bSize == 4); - /**/ // assertT(con, b->low != a->low); - emit(con, cmp(b->low, a->low)); - } else { // FPR compare - assertT(con, aSize == bSize); - if (aSize == 8) - emit(con, fcmpd(fpr64(b), fpr64(a))); // double - else - emit(con, fcmps(fpr32(b), fpr32(a))); // single - emit(con, fmstat()); - } -} - -void compareCR(Context* con, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(con, aSize == 4 and bSize == 4); - - if (!isFpr(b) && a->value->resolved() && isOfWidth(a->value->value(), 8)) { - emit(con, cmpi(b->low, a->value->value())); - } else { - lir::RegisterPair tmp(con->client->acquireTemporary(GPR_MASK)); - moveCR(con, aSize, a, bSize, &tmp); - compareRR(con, bSize, &tmp, bSize, b); - con->client->releaseTemporary(tmp.low); - } -} - -void compareCM(Context* con, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::Memory* b) -{ - assertT(con, aSize == 4 and bSize == 4); - - lir::RegisterPair tmp(con->client->acquireTemporary(GPR_MASK)); - moveMR(con, bSize, b, bSize, &tmp); - compareCR(con, aSize, a, bSize, &tmp); - con->client->releaseTemporary(tmp.low); -} - -void compareRM(Context* con, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::Memory* b) -{ - assertT(con, aSize == 4 and bSize == 4); - - lir::RegisterPair tmp(con->client->acquireTemporary(GPR_MASK)); - moveMR(con, bSize, b, bSize, &tmp); - compareRR(con, aSize, a, bSize, &tmp); - con->client->releaseTemporary(tmp.low); -} - -int32_t branch(Context* con, lir::TernaryOperation op) -{ - switch (op) { - case lir::JumpIfEqual: - case lir::JumpIfFloatEqual: - return beq(0); - - case lir::JumpIfNotEqual: - case lir::JumpIfFloatNotEqual: - return bne(0); - - case lir::JumpIfLess: - case lir::JumpIfFloatLess: - case lir::JumpIfFloatLessOrUnordered: - return blt(0); - - case lir::JumpIfGreater: - case lir::JumpIfFloatGreater: - return bgt(0); - - case lir::JumpIfLessOrEqual: - case lir::JumpIfFloatLessOrEqual: - case lir::JumpIfFloatLessOrEqualOrUnordered: - return ble(0); - - case lir::JumpIfGreaterOrEqual: - case lir::JumpIfFloatGreaterOrEqual: - return bge(0); - - case lir::JumpIfFloatGreaterOrUnordered: - return bhi(0); - - case lir::JumpIfFloatGreaterOrEqualOrUnordered: - return bpl(0); - - default: - abort(con); - } -} - -void conditional(Context* con, int32_t branch, lir::Constant* target) -{ - appendOffsetTask(con, target->value, offsetPromise(con)); - emit(con, branch); -} - -void branch(Context* con, lir::TernaryOperation op, lir::Constant* target) -{ - conditional(con, branch(con, op), target); -} - -void branchLong(Context* con, - lir::TernaryOperation op, - lir::Operand* al, - lir::Operand* ah, - lir::Operand* bl, - lir::Operand* bh, - lir::Constant* target, - BinaryOperationType compareSigned, - BinaryOperationType compareUnsigned) -{ - compareSigned(con, 4, ah, 4, bh); - - unsigned next = 0; - - switch (op) { - case lir::JumpIfEqual: - case lir::JumpIfFloatEqual: - next = con->code.length(); - emit(con, bne(0)); - - compareSigned(con, 4, al, 4, bl); - conditional(con, beq(0), target); - break; - - case lir::JumpIfNotEqual: - case lir::JumpIfFloatNotEqual: - conditional(con, bne(0), target); - - compareSigned(con, 4, al, 4, bl); - conditional(con, bne(0), target); - break; - - case lir::JumpIfLess: - case lir::JumpIfFloatLess: - conditional(con, blt(0), target); - - next = con->code.length(); - emit(con, bgt(0)); - - compareUnsigned(con, 4, al, 4, bl); - conditional(con, blo(0), target); - break; - - case lir::JumpIfGreater: - case lir::JumpIfFloatGreater: - conditional(con, bgt(0), target); - - next = con->code.length(); - emit(con, blt(0)); - - compareUnsigned(con, 4, al, 4, bl); - conditional(con, bhi(0), target); - break; - - case lir::JumpIfLessOrEqual: - case lir::JumpIfFloatLessOrEqual: - conditional(con, blt(0), target); - - next = con->code.length(); - emit(con, bgt(0)); - - compareUnsigned(con, 4, al, 4, bl); - conditional(con, bls(0), target); - break; - - case lir::JumpIfGreaterOrEqual: - case lir::JumpIfFloatGreaterOrEqual: - conditional(con, bgt(0), target); - - next = con->code.length(); - emit(con, blt(0)); - - compareUnsigned(con, 4, al, 4, bl); - conditional(con, bhs(0), target); - break; - - default: - abort(con); - } - - if (next) { - updateOffset(con->s, - con->code.data.begin() + next, - reinterpret_cast(con->code.data.begin() - + con->code.length())); - } -} - -void branchRR(Context* con, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::Constant* target) -{ - if (!isFpr(a) && size > vm::TargetBytesPerWord) { - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - branchLong( - con, op, a, &ah, b, &bh, target, CAST2(compareRR), CAST2(compareRR)); - } else { - compareRR(con, size, a, size, b); - branch(con, op, target); - } -} - -void branchCR(Context* con, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::Constant* target) -{ - assertT(con, !isFloatBranch(op)); - - if (size > vm::TargetBytesPerWord) { - int64_t v = a->value->value(); - - ResolvedPromise low(v & ~static_cast(0)); - lir::Constant al(&low); - - ResolvedPromise high((v >> 32) & ~static_cast(0)); - lir::Constant ah(&high); - - lir::RegisterPair bh(b->high); - - branchLong( - con, op, &al, &ah, b, &bh, target, CAST2(compareCR), CAST2(compareCR)); - } else { - compareCR(con, size, a, size, b); - branch(con, op, target); - } -} - -void branchRM(Context* con, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::Memory* b, - lir::Constant* target) -{ - assertT(con, !isFloatBranch(op)); - assertT(con, size <= vm::TargetBytesPerWord); - - compareRM(con, size, a, size, b); - branch(con, op, target); -} - -void branchCM(Context* con, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::Memory* b, - lir::Constant* target) -{ - assertT(con, !isFloatBranch(op)); - assertT(con, size <= vm::TargetBytesPerWord); - - compareCM(con, size, a, size, b); - branch(con, op, target); -} - -ShiftMaskPromise* shiftMaskPromise(Context* con, - Promise* base, - unsigned shift, - int64_t mask) -{ - return new (con->zone) ShiftMaskPromise(base, shift, mask); -} - -void moveCM(Context* con, - unsigned srcSize, - lir::Constant* src, - unsigned dstSize, - lir::Memory* dst) -{ - switch (dstSize) { - case 8: { - lir::Constant srcHigh(shiftMaskPromise(con, src->value, 32, 0xFFFFFFFF)); - lir::Constant srcLow(shiftMaskPromise(con, src->value, 0, 0xFFFFFFFF)); - - lir::Memory dstLow(dst->base, dst->offset + 4, dst->index, dst->scale); - - moveCM(con, 4, &srcLow, 4, &dstLow); - moveCM(con, 4, &srcHigh, 4, dst); - } break; - - default: - lir::RegisterPair tmp(con->client->acquireTemporary(GPR_MASK)); - moveCR(con, srcSize, src, dstSize, &tmp); - moveRM(con, dstSize, &tmp, dstSize, dst); - con->client->releaseTemporary(tmp.low); - } -} - -void negateRR(Context* con, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize UNUSED, - lir::RegisterPair* dst) -{ - assertT(con, srcSize == dstSize); - - emit(con, mvn(dst->low, src->low)); - emit(con, SETS(addi(dst->low, dst->low, 1))); - if (srcSize == 8) { - emit(con, mvn(dst->high, src->high)); - emit(con, adci(dst->high, dst->high, 0)); - } -} - -void callR(Context* con, unsigned size UNUSED, lir::RegisterPair* target) -{ - assertT(con, size == vm::TargetBytesPerWord); - emit(con, blx(target->low)); -} - -void callC(Context* con, unsigned size UNUSED, lir::Constant* target) -{ - assertT(con, size == vm::TargetBytesPerWord); - - appendOffsetTask(con, target->value, offsetPromise(con)); - emit(con, bl(0)); -} - -void longCallC(Context* con, unsigned size UNUSED, lir::Constant* target) -{ - assertT(con, size == vm::TargetBytesPerWord); - - lir::RegisterPair tmp(Register(4)); - moveCR2(con, vm::TargetBytesPerWord, target, &tmp, offsetPromise(con)); - callR(con, vm::TargetBytesPerWord, &tmp); -} - -void alignedLongCallC(Context* con, unsigned size, lir::Constant* target) -{ - longCallC(con, size, target); -} - -void longJumpC(Context* con, unsigned size UNUSED, lir::Constant* target) -{ - assertT(con, size == vm::TargetBytesPerWord); - - lir::RegisterPair tmp( - Register(4)); // a non-arg reg that we don't mind clobbering - moveCR2(con, vm::TargetBytesPerWord, target, &tmp, offsetPromise(con)); - jumpR(con, vm::TargetBytesPerWord, &tmp); -} - -void alignedLongJumpC(Context* con, unsigned size, lir::Constant* target) -{ - longJumpC(con, size, target); -} - -void jumpC(Context* con, unsigned size UNUSED, lir::Constant* target) -{ - assertT(con, size == vm::TargetBytesPerWord); - - appendOffsetTask(con, target->value, offsetPromise(con)); - emit(con, b(0)); -} - -void return_(Context* con) -{ - emit(con, bx(LinkRegister)); -} - -void trap(Context* con) -{ - emit(con, bkpt(0)); -} - -// todo: determine the minimal operation types and domains needed to -// implement the following barriers (see -// http://community.arm.com/groups/processors/blog/2011/10/19/memory-access-ordering-part-3--memory-access-ordering-in-the-arm-architecture). -// For now, we just use DMB SY as a conservative but not necessarily -// performant choice. - -void memoryBarrier(Context* con UNUSED) -{ -#ifndef AVIAN_ASSUME_ARMV6 - emit(con, dmb()); -#endif -} - -void loadBarrier(Context* con) -{ - memoryBarrier(con); -} - -void storeStoreBarrier(Context* con) -{ - memoryBarrier(con); -} - -void storeLoadBarrier(Context* con) -{ - memoryBarrier(con); -} - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // TARGET_BYTES_PER_WORD == 4 diff --git a/sgx-jvm/avian/src/codegen/target/arm/operations64.cpp b/sgx-jvm/avian/src/codegen/target/arm/operations64.cpp deleted file mode 100644 index 9bd905c472..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/operations64.cpp +++ /dev/null @@ -1,1630 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "context.h" -#include "operations.h" -#include "block.h" -#include "fixup.h" -#include "multimethod.h" - -#if TARGET_BYTES_PER_WORD == 8 - -namespace { - -using namespace avian::codegen; -using namespace avian::codegen::arm; - -Register fpr(Register reg) -{ - return Register(reg.index() - N_GPRS); -} - -Register fpr(lir::RegisterPair* reg) -{ - return fpr(reg->low); -} - -void append(Context* c, uint32_t instruction) -{ - c->code.append4(instruction); -} - -uint32_t lslv(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0x9ac02000 : 0x1ac02000) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ubfm(Register Rd, Register Rn, int r, int s, unsigned size) -{ - return (size == 8 ? 0xd3400000 : 0x53000000) | (r << 16) | (s << 10) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t sbfm(Register Rd, Register Rn, int r, int s, unsigned size) -{ - return (size == 8 ? 0x93400000 : 0x13000000) | (r << 16) | (s << 10) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t lsli(Register Rd, Register Rn, int shift, unsigned size) -{ - if (size == 4) { - return ubfm(Rd, Rn, (32 - shift) & 0x1f, 31 - shift, size); - } else { - return ubfm(Rd, Rn, (64 - shift) & 0x3f, 63 - shift, size); - } -} - -uint32_t asrv(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0x9ac02800 : 0x1ac02800) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t lsrv(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0x9ac02400 : 0x1ac02400) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t lsri(Register Rd, Register Rn, int shift, unsigned size) -{ - return ubfm(Rd, Rn, shift, size == 8 ? 63 : 31, size); -} - -uint32_t asri(Register Rd, Register Rn, int shift, unsigned size) -{ - return sbfm(Rd, Rn, shift, size == 8 ? 63 : 31, size); -} - -uint32_t sxtb(Register Rd, Register Rn) -{ - return sbfm(Rd, Rn, 0, 7, 8); -} - -uint32_t sxth(Register Rd, Register Rn) -{ - return sbfm(Rd, Rn, 0, 15, 8); -} - -uint32_t uxth(Register Rd, Register Rn) -{ - return ubfm(Rd, Rn, 0, 15, 4); -} - -uint32_t sxtw(Register Rd, Register Rn) -{ - return sbfm(Rd, Rn, 0, 31, 8); -} - -uint32_t br(Register Rn) -{ - return 0xd61f0000 | (Rn.index() << 5); -} - -uint32_t fmovFdFn(Register Fd, Register Fn, unsigned size) -{ - return (size == 8 ? 0x1e604000 : 0x1e204000) | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fmovRdFn(Register Rd, Register Fn, unsigned size) -{ - return (size == 8 ? 0x9e660000 : 0x1e260000) | (Fn.index() << 5) | Rd.index(); -} - -uint32_t fmovFdRn(Register Fd, Register Rn, unsigned size) -{ - return (size == 8 ? 0x9e670000 : 0x1e270000) | (Rn.index() << 5) | Fd.index(); -} - -uint32_t orr(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0xaa000000 : 0x2a000000) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t addi(Register Rd, Register Rn, int value, int shift, unsigned size) -{ - return (size == 8 ? 0x91000000 : 0x11000000) | (shift ? 0x400000 : 0) - | (value << 10) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t mov(Register Rd, Register Rn, unsigned size) -{ - return Rn.index() == 31 or Rd.index() == 31 ? addi(Rd, Rn, 0, 0, size) - : orr(Rd, Register(31), Rn, size); -} - -uint32_t movz(Register Rd, int value, unsigned shift, unsigned size) -{ - return (size == 8 ? 0xd2800000 : 0x52800000) | ((shift >> 4) << 21) - | (value << 5) | Rd.index(); -} - -uint32_t movn(Register Rd, int value, unsigned shift, unsigned size) -{ - return (size == 8 ? 0x92800000 : 0x12800000) | ((shift >> 4) << 21) - | (value << 5) | Rd.index(); -} - -uint32_t movk(Register Rd, int value, unsigned shift, unsigned size) -{ - return (size == 8 ? 0xf2800000 : 0x72800000) | ((shift >> 4) << 21) - | (value << 5) | Rd.index(); -} - -uint32_t ldrPCRel(Register Rd, int offset, unsigned size) -{ - return (size == 8 ? 0x58000000 : 0x18000000) | ((offset >> 2) << 5) - | Rd.index(); -} - -uint32_t add(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0x8b000000 : 0x0b000000) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t sub(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0xcb000000 : 0x4b000000) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t and_(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0x8a000000 : 0x0a000000) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t eor(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0xca000000 : 0x4a000000) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t madd(Register Rd, Register Rn, Register Rm, Register Ra, unsigned size) -{ - return (size == 8 ? 0x9b000000 : 0x1b000000) | (Rm.index() << 16) - | (Ra.index() << 10) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t mul(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return madd(Rd, Rn, Rm, Register(31), size); -} - -uint32_t subi(Register Rd, Register Rn, int value, int shift, unsigned size) -{ - return (size == 8 ? 0xd1000000 : 0x51000000) | (shift ? 0x400000 : 0) - | (value << 10) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t fabs_(Register Fd, Register Fn, unsigned size) -{ - return (size == 8 ? 0x1e60c000 : 0x1e20c000) | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fneg(Register Fd, Register Fn, unsigned size) -{ - return (size == 8 ? 0x1e614000 : 0x1e214000) | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fsqrt(Register Fd, Register Fn, unsigned size) -{ - return (size == 8 ? 0x1e61c000 : 0x1e21c000) | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fadd(Register Fd, Register Fn, Register Fm, unsigned size) -{ - return (size == 8 ? 0x1e602800 : 0x1e202800) | (Fm.index() << 16) - | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fsub(Register Fd, Register Fn, Register Fm, unsigned size) -{ - return (size == 8 ? 0x1e603800 : 0x1e203800) | (Fm.index() << 16) - | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fmul(Register Fd, Register Fn, Register Fm, unsigned size) -{ - return (size == 8 ? 0x1e600800 : 0x1e200800) | (Fm.index() << 16) - | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fdiv(Register Fd, Register Fn, Register Fm, unsigned size) -{ - return (size == 8 ? 0x1e601800 : 0x1e201800) | (Fm.index() << 16) - | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fcvtSdDn(Register Fd, Register Fn) -{ - return 0x1e624000 | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fcvtDdSn(Register Fd, Register Fn) -{ - return 0x1e22c000 | (Fn.index() << 5) | Fd.index(); -} - -uint32_t fcvtasXdDn(Register Rd, Register Fn) -{ - return 0x9e640000 | (Fn.index() << 5) | Rd.index(); -} - -uint32_t fcvtasWdSn(Register Rd, Register Fn) -{ - return 0x1e240000 | (Fn.index() << 5) | Rd.index(); -} - -uint32_t scvtfDdXn(Register Fd, Register Rn) -{ - return 0x9e620000 | (Rn.index() << 5) | Fd.index(); -} - -uint32_t scvtfSdWn(Register Fd, Register Rn) -{ - return 0x1e220000 | (Rn.index() << 5) | Fd.index(); -} - -uint32_t strFs(Register Fs, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0xfc206800 : 0xbc206800) | (Rm.index() << 16) - | (Rn.index() << 5) | Fs.index(); -} - -uint32_t strb(Register Rs, Register Rn, Register Rm) -{ - return 0x38206800 | (Rm.index() << 16) | (Rn.index() << 5) | Rs.index(); -} - -uint32_t strh(Register Rs, Register Rn, Register Rm) -{ - return 0x78206800 | (Rm.index() << 16) | (Rn.index() << 5) | Rs.index(); -} - -uint32_t striFs(Register Fs, Register Rn, int offset, unsigned size) -{ - return (size == 8 ? 0xfd000000 : 0xbd000000) - | ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5) - | Fs.index(); -} - -uint32_t str(Register Rs, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0xf8206800 : 0xb8206800) | (Rm.index() << 16) - | (Rn.index() << 5) | Rs.index(); -} - -uint32_t strbi(Register Rs, Register Rn, int offset) -{ - return 0x39000000 | (offset << 10) | (Rn.index() << 5) | Rs.index(); -} - -uint32_t strhi(Register Rs, Register Rn, int offset) -{ - return 0x79000000 | ((offset >> 1) << 10) | (Rn.index() << 5) | Rs.index(); -} - -uint32_t stri(Register Rs, Register Rn, int offset, unsigned size) -{ - return (size == 8 ? 0xf9000000 : 0xb9000000) - | ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5) - | Rs.index(); -} - -uint32_t ldrFd(Register Fd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0xfc606800 : 0xbc606800) | (Rm.index() << 16) - | (Rn.index() << 5) | Fd.index(); -} - -uint32_t ldrb(Register Rd, Register Rn, Register Rm) -{ - return 0x38606800 | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldrsb(Register Rd, Register Rn, Register Rm) -{ - return 0x38e06800 | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldrh(Register Rd, Register Rn, Register Rm) -{ - return 0x78606800 | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldrsh(Register Rd, Register Rn, Register Rm) -{ - return 0x78e06800 | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldrsw(Register Rd, Register Rn, Register Rm) -{ - return 0xb8a06800 | (Rm.index() << 16) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldr(Register Rd, Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0xf8606800 : 0xb8606800) | (Rm.index() << 16) - | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldriFd(Register Fd, Register Rn, int offset, unsigned size) -{ - return (size == 8 ? 0xfd400000 : 0xbd400000) - | ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5) - | Fd.index(); -} - -uint32_t ldrbi(Register Rd, Register Rn, int offset) -{ - return 0x39400000 | (offset << 10) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldrsbi(Register Rd, Register Rn, int offset) -{ - return 0x39c00000 | (offset << 10) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldrhi(Register Rd, Register Rn, int offset) -{ - return 0x79400000 | ((offset >> 1) << 10) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldrshi(Register Rd, Register Rn, int offset) -{ - return 0x79c00000 | ((offset >> 1) << 10) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldrswi(Register Rd, Register Rn, int offset) -{ - return 0xb9800000 | ((offset >> 2) << 10) | (Rn.index() << 5) | Rd.index(); -} - -uint32_t ldri(Register Rd, Register Rn, int offset, unsigned size) -{ - return (size == 8 ? 0xf9400000 : 0xb9400000) - | ((offset >> (size == 8 ? 3 : 2)) << 10) | (Rn.index() << 5) - | Rd.index(); -} - -uint32_t fcmp(Register Fn, Register Fm, unsigned size) -{ - return (size == 8 ? 0x1e602000 : 0x1e202000) | (Fm.index() << 16) - | (Fn.index() << 5); -} - -uint32_t neg(Register Rd, Register Rm, unsigned size) -{ - return (size == 8 ? 0xcb0003e0 : 0x4b0003e0) | (Rm.index() << 16) - | Rd.index(); -} - -uint32_t cmp(Register Rn, Register Rm, unsigned size) -{ - return (size == 8 ? 0xeb00001f : 0x6b00001f) | (Rm.index() << 16) - | (Rn.index() == 31 ? 0x2063ff : (Rn.index() << 5)); -} - -uint32_t cmpi(Register Rn, int value, unsigned shift, unsigned size) -{ - return (size == 8 ? 0xf100001f : 0x7100001f) | (shift == 12 ? 0x400000 : 0) - | (value << 10) | (Rn.index() << 5); -} - -uint32_t b(int offset) -{ - return 0x14000000 | (offset >> 2); -} - -uint32_t bl(int offset) -{ - return 0x94000000 | (offset >> 2); -} - -uint32_t blr(Register Rn) -{ - return 0xd63f0000 | (Rn.index() << 5); -} - -uint32_t beq(int offset) -{ - return 0x54000000 | ((offset >> 2) << 5); -} - -uint32_t bne(int offset) -{ - return 0x54000001 | ((offset >> 2) << 5); -} - -uint32_t blt(int offset) -{ - return 0x5400000b | ((offset >> 2) << 5); -} - -uint32_t bgt(int offset) -{ - return 0x5400000c | ((offset >> 2) << 5); -} - -uint32_t ble(int offset) -{ - return 0x5400000d | ((offset >> 2) << 5); -} - -uint32_t bge(int offset) -{ - return 0x5400000a | ((offset >> 2) << 5); -} - -uint32_t bhi(int offset) -{ - return 0x54000008 | ((offset >> 2) << 5); -} - -uint32_t bpl(int offset) -{ - return 0x54000005 | ((offset >> 2) << 5); -} - -uint32_t brk(int flag) -{ - return 0xd4200020 | (flag << 5); -} - -uint32_t dmb(int flag) -{ - return 0xd50330bf | (flag << 8); -} - -} // namespace - -namespace avian { -namespace codegen { -namespace arm { - -using namespace avian::util; - -void shiftLeftR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, lslv(dst->low, b->low, a->low, size)); -} - -void shiftLeftC(Context* c, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - uint64_t value = a->value->value(); - if (size == 4 and (value & 0x1F)) { - append(c, lsli(dst->low, b->low, value & 0x1F, 4)); - } else if (size == 8 and (value & 0x3F)) { - append(c, lsli(dst->low, b->low, value & 0x3F, 8)); - } else { - moveRR(c, size, b, size, dst); - } -} - -void shiftRightR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, asrv(dst->low, b->low, a->low, size)); -} - -void shiftRightC(Context* c, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - uint64_t value = a->value->value(); - if (size == 4 and (value & 0x1F)) { - append(c, asri(dst->low, b->low, value & 0x1F, 4)); - } else if (size == 8 and (value & 0x3F)) { - append(c, asri(dst->low, b->low, value & 0x3F, 8)); - } else { - moveRR(c, size, b, size, dst); - } -} - -void unsignedShiftRightR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, lsrv(dst->low, b->low, a->low, size)); -} - -void unsignedShiftRightC(Context* c, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - uint64_t value = a->value->value(); - if (size == 4 and (value & 0x1F)) { - append(c, lsri(dst->low, b->low, value & 0x1F, 4)); - } else if (size == 8 and (value & 0x3F)) { - append(c, lsri(dst->low, b->low, value & 0x3F, 8)); - } else { - moveRR(c, size, b, size, dst); - } -} - -void jumpR(Context* c, unsigned size UNUSED, lir::RegisterPair* target) -{ - assertT(c, size == vm::TargetBytesPerWord); - append(c, br(target->low)); -} - -void moveRR(Context* c, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - bool srcIsFpr = isFpr(src); - bool dstIsFpr = isFpr(dst); - if (srcIsFpr or dstIsFpr) { - assertT(c, srcSize == dstSize); - - if (srcIsFpr and dstIsFpr) { - append(c, fmovFdFn(fpr(dst), fpr(src), srcSize)); - } else if (srcIsFpr) { - append(c, fmovRdFn(dst->low, fpr(src), srcSize)); - } else { - append(c, fmovFdRn(fpr(dst), src->low, srcSize)); - } - } else { - switch (srcSize) { - case 1: - append(c, sxtb(dst->low, src->low)); - break; - - case 2: - append(c, sxth(dst->low, src->low)); - break; - - case 4: - if (dstSize == 4) { - append(c, mov(dst->low, src->low, srcSize)); - } else { - append(c, sxtw(dst->low, src->low)); - } - break; - - case 8: - append(c, mov(dst->low, src->low, srcSize)); - break; - - default: - abort(c); - } - } -} - -void moveZRR(Context* c, - unsigned srcSize, - lir::RegisterPair* src, - unsigned, - lir::RegisterPair* dst) -{ - switch (srcSize) { - case 2: - append(c, uxth(dst->low, src->low)); - break; - - default: - abort(c); - } -} - -void moveCR2(Context* c, - unsigned size, - lir::Constant* src, - lir::RegisterPair* dst, - Promise* callOffset) -{ - if (isFpr(dst)) { - // todo: could use a single fmov here and avoid the temporary for - // constants that fit - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - moveCR(c, size, src, size, &tmp); - moveRR(c, size, &tmp, size, dst); - c->client->releaseTemporary(tmp.low); - } else if (callOffset == 0 and src->value->resolved()) { - // todo: Is it better performance-wise to load using immediate - // moves or via a PC-relative constant pool? Does it depend on - // how many significant bits there are? - - int64_t value = src->value->value(); - if (value >= 0) { - append(c, movz(dst->low, value & 0xFFFF, 0, size)); - if (value >> 16) { - if ((value >> 16) & 0xFFFF) { - append(c, movk(dst->low, (value >> 16) & 0xFFFF, 16, size)); - } - if (value >> 32) { - if ((value >> 32) & 0xFFFF) { - append(c, movk(dst->low, (value >> 32) & 0xFFFF, 32, size)); - } - if (value >> 48) { - append(c, movk(dst->low, (value >> 48) & 0xFFFF, 48, size)); - } - } - } - } else { - append(c, movn(dst->low, (~value) & 0xFFFF, 0, size)); - if (~(value >> 16)) { - if (((value >> 16) & 0xFFFF) != 0xFFFF) { - append(c, movk(dst->low, (value >> 16) & 0xFFFF, 16, size)); - } - if (~(value >> 32)) { - if (((value >> 32) & 0xFFFF) != 0xFFFF) { - append(c, movk(dst->low, (value >> 32) & 0xFFFF, 32, size)); - } - if (~(value >> 48)) { - append(c, movk(dst->low, (value >> 48) & 0xFFFF, 48, size)); - } - } - } - } - } else { - appendConstantPoolEntry(c, src->value, callOffset); - append(c, ldrPCRel(dst->low, 0, size)); - } -} - -void moveCR(Context* c, - unsigned size, - lir::Constant* src, - unsigned, - lir::RegisterPair* dst) -{ - moveCR2(c, size, src, dst, 0); -} - -void addR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, add(dst->low, a->low, b->low, size)); -} - -void subR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, sub(dst->low, b->low, a->low, size)); -} - -void addC(Context* c, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - int64_t v = a->value->value(); - if (v) { - if (v > 0 and v < 0x1000) { - append(c, addi(dst->low, b->low, v, 0, size)); - } else if (v > 0 and v < 0x1000000 and v % 0x1000 == 0) { - append(c, addi(dst->low, b->low, v >> 12, 12, size)); - } else { - // todo - abort(c); - } - } else { - moveRR(c, size, b, size, dst); - } -} - -void subC(Context* c, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - int64_t v = a->value->value(); - if (v) { - if (v > 0 and v < 0x1000) { - append(c, subi(dst->low, b->low, v, 0, size)); - } else if (v > 0 and v < 0x1000000 and v % 0x1000 == 0) { - append(c, subi(dst->low, b->low, v >> 12, 12, size)); - } else { - // todo - abort(c); - } - } else { - moveRR(c, size, b, size, dst); - } -} - -void multiplyR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, mul(dst->low, a->low, b->low, size)); -} - -void floatAbsoluteRR(Context* c, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - append(c, fabs_(fpr(b), fpr(a), size)); -} - -void floatNegateRR(Context* c, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - append(c, fneg(fpr(b), fpr(a), size)); -} - -void float2FloatRR(Context* c, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - if (size == 8) { - append(c, fcvtSdDn(fpr(b), fpr(a))); - } else { - append(c, fcvtDdSn(fpr(b), fpr(a))); - } -} - -void float2IntRR(Context* c, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - if (size == 8) { - append(c, fcvtasXdDn(b->low, fpr(a))); - } else { - append(c, fcvtasWdSn(b->low, fpr(a))); - } -} - -void int2FloatRR(Context* c, - unsigned, - lir::RegisterPair* a, - unsigned size, - lir::RegisterPair* b) -{ - if (size == 8) { - append(c, scvtfDdXn(fpr(b), a->low)); - } else { - append(c, scvtfSdWn(fpr(b), a->low)); - } -} - -void floatSqrtRR(Context* c, - unsigned size, - lir::RegisterPair* a, - unsigned, - lir::RegisterPair* b) -{ - append(c, fsqrt(fpr(b), fpr(a), size)); -} - -void floatAddR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, fadd(fpr(dst), fpr(b), fpr(a), size)); -} - -void floatSubtractR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, fsub(fpr(dst), fpr(b), fpr(a), size)); -} - -void floatMultiplyR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, fmul(fpr(dst), fpr(b), fpr(a), size)); -} - -void floatDivideR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, fdiv(fpr(dst), fpr(b), fpr(a), size)); -} - -Register normalize(Context* c, - int offset, - Register index, - unsigned scale, - bool* preserveIndex, - bool* release) -{ - if (offset != 0 or scale != 1) { - lir::RegisterPair normalizedIndex( - *preserveIndex ? c->client->acquireTemporary(GPR_MASK) : index); - - if (*preserveIndex) { - *release = true; - *preserveIndex = false; - } else { - *release = false; - } - - Register scaled; - - if (scale != 1) { - lir::RegisterPair unscaledIndex(index); - - ResolvedPromise scalePromise(log(scale)); - lir::Constant scaleConstant(&scalePromise); - - shiftLeftC(c, - vm::TargetBytesPerWord, - &scaleConstant, - &unscaledIndex, - &normalizedIndex); - - scaled = normalizedIndex.low; - } else { - scaled = index; - } - - if (offset != 0) { - lir::RegisterPair untranslatedIndex(scaled); - - ResolvedPromise offsetPromise(offset); - lir::Constant offsetConstant(&offsetPromise); - - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - moveCR(c, - vm::TargetBytesPerWord, - &offsetConstant, - vm::TargetBytesPerWord, - &tmp); - addR(c, - vm::TargetBytesPerWord, - &tmp, - &untranslatedIndex, - &normalizedIndex); - c->client->releaseTemporary(tmp.low); - } - - return normalizedIndex.low; - } else { - *release = false; - return index; - } -} - -void store(Context* c, - unsigned size, - lir::RegisterPair* src, - Register base, - int offset, - Register index, - unsigned scale, - bool preserveIndex) -{ - if (index != NoRegister) { - bool release; - - // todo: browsing the instruction set, it looks like we could do a - // scaled store or load in a single instruction if the offset is - // zero, and we could simplify things for the case of non-zero - // offsets also - - Register normalized - = normalize(c, offset, index, scale, &preserveIndex, &release); - - if (isFpr(src)) { - switch (size) { - case 4: - case 8: - append(c, strFs(fpr(src->low), base, normalized, size)); - break; - - default: - abort(c); - } - } else { - switch (size) { - case 1: - append(c, strb(src->low, base, normalized)); - break; - - case 2: - append(c, strh(src->low, base, normalized)); - break; - - case 4: - case 8: - append(c, str(src->low, base, normalized, size)); - break; - - default: - abort(c); - } - } - - if (release) { - c->client->releaseTemporary(normalized); - } - } else if (abs(offset) == (abs(offset) & 0xFFF)) { - if (isFpr(src)) { - switch (size) { - case 4: - case 8: - assertT(c, offset == (offset & (size == 8 ? (~7) : (~3)))); - append(c, striFs(fpr(src->low), base, offset, size)); - break; - - default: - abort(c); - } - } else { // FPR store - switch (size) { - case 1: - append(c, strbi(src->low, base, offset)); - break; - - case 2: - assertT(c, offset == (offset & (~1))); - append(c, strhi(src->low, base, offset)); - break; - - case 4: - assertT(c, offset == (offset & (~3))); - append(c, stri(src->low, base, offset, size)); - break; - - case 8: - assertT(c, offset == (offset & (~7))); - append(c, stri(src->low, base, offset, size)); - break; - - default: - abort(c); - } - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - ResolvedPromise offsetPromise(offset); - lir::Constant offsetConstant(&offsetPromise); - moveCR(c, - vm::TargetBytesPerWord, - &offsetConstant, - vm::TargetBytesPerWord, - &tmp); - - store(c, size, src, base, 0, tmp.low, 1, false); - - c->client->releaseTemporary(tmp.low); - } -} - -void moveRM(Context* c, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize UNUSED, - lir::Memory* dst) -{ - assertT(c, srcSize == dstSize); - - if (src->low.index() == 31) { - assertT(c, c->client == 0); // the compiler should never ask us to - // store the SP; we'll only get here - // when assembling a thunk - - lir::RegisterPair tmp(Register(9)); // we're in a thunk, so we can - // clobber this - - moveRR(c, srcSize, src, srcSize, &tmp); - store( - c, srcSize, &tmp, dst->base, dst->offset, dst->index, dst->scale, true); - } else { - store( - c, srcSize, src, dst->base, dst->offset, dst->index, dst->scale, true); - } -} - -void load(Context* c, - unsigned srcSize, - Register base, - int offset, - Register index, - unsigned scale, - unsigned dstSize, - lir::RegisterPair* dst, - bool preserveIndex, - bool signExtend) -{ - if (index != NoRegister) { - bool release; - Register normalized - = normalize(c, offset, index, scale, &preserveIndex, &release); - - if (isFpr(dst)) { // FPR load - switch (srcSize) { - case 4: - case 8: - append(c, ldrFd(fpr(dst->low), base, normalized, srcSize)); - break; - - default: - abort(c); - } - } else { - switch (srcSize) { - case 1: - if (signExtend) { - append(c, ldrsb(dst->low, base, normalized)); - } else { - append(c, ldrb(dst->low, base, normalized)); - } - break; - - case 2: - if (signExtend) { - append(c, ldrsh(dst->low, base, normalized)); - } else { - append(c, ldrh(dst->low, base, normalized)); - } - break; - - case 4: - case 8: - if (signExtend and srcSize == 4 and dstSize == 8) { - append(c, ldrsw(dst->low, base, normalized)); - } else { - append(c, ldr(dst->low, base, normalized, srcSize)); - } - break; - - default: - abort(c); - } - } - - if (release) { - c->client->releaseTemporary(normalized); - } - } else if (abs(offset) == (abs(offset) & 0xFFF)) { - if (isFpr(dst)) { - switch (srcSize) { - case 4: - case 8: - assertT(c, offset == (offset & (srcSize == 8 ? (~7) : (~3)))); - append(c, ldriFd(fpr(dst->low), base, offset, srcSize)); - break; - - default: - abort(c); - } - } else { - switch (srcSize) { - case 1: - if (signExtend) { - append(c, ldrsbi(dst->low, base, offset)); - } else { - append(c, ldrbi(dst->low, base, offset)); - } - break; - - case 2: - assertT(c, offset == (offset & (~1))); - if (signExtend) { - append(c, ldrshi(dst->low, base, offset)); - } else { - append(c, ldrhi(dst->low, base, offset)); - } - break; - - case 4: - case 8: - if (signExtend and srcSize == 4 and dstSize == 8) { - assertT(c, offset == (offset & (~3))); - append(c, ldrswi(dst->low, base, offset)); - } else { - assertT(c, offset == (offset & (srcSize == 8 ? (~7) : (~3)))); - append(c, ldri(dst->low, base, offset, srcSize)); - } - break; - - default: - abort(c); - } - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - ResolvedPromise offsetPromise(offset); - lir::Constant offsetConstant(&offsetPromise); - moveCR(c, - vm::TargetBytesPerWord, - &offsetConstant, - vm::TargetBytesPerWord, - &tmp); - - load(c, srcSize, base, 0, tmp.low, 1, dstSize, dst, false, signExtend); - - c->client->releaseTemporary(tmp.low); - } -} - -void moveMR(Context* c, - unsigned srcSize, - lir::Memory* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - if (dst->low.index() == 31) { - assertT(c, c->client == 0); // the compiler should never ask us to - // load the SP; we'll only get here - // when assembling a thunk - - lir::RegisterPair tmp(Register(9)); // we're in a thunk, so we can - // clobber this - - load(c, srcSize, src->base, src->offset, src->index, src->scale, dstSize, &tmp, true, true); - moveRR(c, dstSize, &tmp, dstSize, dst); - } else { - load(c, - srcSize, - src->base, - src->offset, - src->index, - src->scale, - dstSize, - dst, - true, - true); - } -} - -void moveZMR(Context* c, - unsigned srcSize, - lir::Memory* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - load(c, - srcSize, - src->base, - src->offset, - src->index, - src->scale, - dstSize, - dst, - true, - false); -} - -void andR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, and_(dst->low, a->low, b->low, size)); -} - -void andC(Context* c, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - int64_t v = a->value->value(); - - if (~v) { - bool useTemporary = b->low == dst->low; - lir::RegisterPair tmp(dst->low); - if (useTemporary) { - tmp.low = c->client->acquireTemporary(GPR_MASK); - } - - moveCR(c, size, a, size, &tmp); - andR(c, size, b, &tmp, dst); - - if (useTemporary) { - c->client->releaseTemporary(tmp.low); - } - } else { - moveRR(c, size, b, size, dst); - } -} - -void orR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, orr(dst->low, a->low, b->low, size)); -} - -void xorR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::RegisterPair* dst) -{ - append(c, eor(dst->low, a->low, b->low, size)); -} - -void moveAR(Context* c, - unsigned srcSize, - lir::Address* src, - unsigned dstSize, - lir::RegisterPair* dst) -{ - assertT( - c, - srcSize == vm::TargetBytesPerWord and dstSize == vm::TargetBytesPerWord); - - lir::Constant constant(src->address); - moveCR(c, srcSize, &constant, dstSize, dst); - - lir::Memory memory(dst->low, 0, NoRegister, 0); - moveMR(c, dstSize, &memory, dstSize, dst); -} - -void compareRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, not(isFpr(a) xor isFpr(b))); - assertT(c, aSize == bSize); - - if (isFpr(a)) { - append(c, fcmp(fpr(b), fpr(a), aSize)); - } else { - append(c, cmp(b->low, a->low, aSize)); - } -} - -void compareCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - if (!isFpr(b) && a->value->resolved()) { - int64_t v = a->value->value(); - if (v == 0) { - append(c, cmp(b->low, Register(31), aSize)); - return; - } else if (v > 0 and v < 0x1000) { - append(c, cmpi(b->low, v, 0, aSize)); - return; - } else if (v > 0 and v < 0x1000000 and v % 0x1000 == 0) { - append(c, cmpi(b->low, v >> 12, 12, aSize)); - return; - } - } - - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - moveCR(c, aSize, a, bSize, &tmp); - compareRR(c, bSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); -} - -void compareCM(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::Memory* b) -{ - assertT(c, aSize == bSize); - - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - moveMR(c, bSize, b, bSize, &tmp); - compareCR(c, aSize, a, bSize, &tmp); - c->client->releaseTemporary(tmp.low); -} - -void compareRM(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::Memory* b) -{ - assertT(c, aSize == bSize); - - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - moveMR(c, bSize, b, bSize, &tmp); - compareRR(c, aSize, a, bSize, &tmp); - c->client->releaseTemporary(tmp.low); -} - -void compareMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - moveMR(c, aSize, a, aSize, &tmp); - compareRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); -} - -int32_t branch(Context* c, lir::TernaryOperation op) -{ - switch (op) { - case lir::JumpIfEqual: - case lir::JumpIfFloatEqual: - return beq(0); - - case lir::JumpIfNotEqual: - case lir::JumpIfFloatNotEqual: - return bne(0); - - case lir::JumpIfLess: - case lir::JumpIfFloatLess: - case lir::JumpIfFloatLessOrUnordered: - return blt(0); - - case lir::JumpIfGreater: - case lir::JumpIfFloatGreater: - return bgt(0); - - case lir::JumpIfLessOrEqual: - case lir::JumpIfFloatLessOrEqual: - case lir::JumpIfFloatLessOrEqualOrUnordered: - return ble(0); - - case lir::JumpIfGreaterOrEqual: - case lir::JumpIfFloatGreaterOrEqual: - return bge(0); - - case lir::JumpIfFloatGreaterOrUnordered: - return bhi(0); - - case lir::JumpIfFloatGreaterOrEqualOrUnordered: - return bpl(0); - - default: - abort(c); - } -} - -void conditional(Context* c, int32_t branch, lir::Constant* target) -{ - appendOffsetTask(c, target->value, offsetPromise(c)); - append(c, branch); -} - -void branch(Context* c, lir::TernaryOperation op, lir::Constant* target) -{ - conditional(c, branch(c, op), target); -} - -void branchRR(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::Constant* target) -{ - compareRR(c, size, a, size, b); - branch(c, op, target); -} - -void branchCR(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::Constant* target) -{ - assertT(c, not isFloatBranch(op)); - - compareCR(c, size, a, size, b); - branch(c, op, target); -} - -void branchRM(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::Memory* b, - lir::Constant* target) -{ - assertT(c, not isFloatBranch(op)); - assertT(c, size <= vm::TargetBytesPerWord); - - if (a->low.index() == 31) { - // Stack overflow checks need to compare to the stack pointer, but - // we can only encode that in the opposite operand order we're - // given, so we need to reverse everything. Also, we can't do a - // conditional jump further than 2^19 instructions away, which can - // cause trouble with large code, so we branch past an - // unconditional branch which can jump further, which reverses the - // logic again. Confused? Good. - assertT(c, op == lir::JumpIfGreaterOrEqual); - compareMR(c, size, b, size, a); - append(c, bge(8)); - jumpC(c, vm::TargetBytesPerWord, target); - } else { - compareRM(c, size, a, size, b); - branch(c, op, target); - } -} - -void branchCM(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::Memory* b, - lir::Constant* target) -{ - assertT(c, not isFloatBranch(op)); - assertT(c, size <= vm::TargetBytesPerWord); - - compareCM(c, size, a, size, b); - branch(c, op, target); -} - -ShiftMaskPromise* shiftMaskPromise(Context* c, - Promise* base, - unsigned shift, - int64_t mask) -{ - return new (c->zone) ShiftMaskPromise(base, shift, mask); -} - -void moveCM(Context* c, - unsigned srcSize, - lir::Constant* src, - unsigned dstSize, - lir::Memory* dst) -{ - lir::RegisterPair tmp(c->client->acquireTemporary(GPR_MASK)); - moveCR(c, srcSize, src, dstSize, &tmp); - moveRM(c, dstSize, &tmp, dstSize, dst); - c->client->releaseTemporary(tmp.low); -} - -void negateRR(Context* c, - unsigned srcSize, - lir::RegisterPair* src, - unsigned dstSize UNUSED, - lir::RegisterPair* dst) -{ - assertT(c, srcSize == dstSize); - - append(c, neg(dst->low, src->low, srcSize)); -} - -void callR(Context* c, unsigned size UNUSED, lir::RegisterPair* target) -{ - assertT(c, size == vm::TargetBytesPerWord); - append(c, blr(target->low)); -} - -void callC(Context* c, unsigned size UNUSED, lir::Constant* target) -{ - assertT(c, size == vm::TargetBytesPerWord); - - appendOffsetTask(c, target->value, offsetPromise(c)); - append(c, bl(0)); -} - -void longCallC(Context* c, unsigned size UNUSED, lir::Constant* target) -{ - assertT(c, size == vm::TargetBytesPerWord); - - lir::RegisterPair tmp( - Register(9)); // a non-arg reg that we don't mind clobbering - moveCR2(c, vm::TargetBytesPerWord, target, &tmp, offsetPromise(c)); - callR(c, vm::TargetBytesPerWord, &tmp); -} - -void longJumpC(Context* c, unsigned size UNUSED, lir::Constant* target) -{ - assertT(c, size == vm::TargetBytesPerWord); - - lir::RegisterPair tmp( - Register(9)); // a non-arg reg that we don't mind clobbering - moveCR2(c, vm::TargetBytesPerWord, target, &tmp, offsetPromise(c)); - jumpR(c, vm::TargetBytesPerWord, &tmp); -} - -void jumpC(Context* c, unsigned size UNUSED, lir::Constant* target) -{ - assertT(c, size == vm::TargetBytesPerWord); - - appendOffsetTask(c, target->value, offsetPromise(c)); - append(c, b(0)); -} - -void return_(Context* c) -{ - append(c, br(LinkRegister)); -} - -void trap(Context* c) -{ - append(c, brk(0)); -} - -// todo: determine the minimal operation types and domains needed to -// implement the following barriers (see -// http://community.arm.com/groups/processors/blog/2011/10/19/memory-access-ordering-part-3--memory-access-ordering-in-the-arm-architecture). -// For now, we just use DMB SY as a conservative but not necessarily -// performant choice. - -void memoryBarrier(Context* c) -{ - append(c, dmb(0xF)); -} - -void loadBarrier(Context* c) -{ - memoryBarrier(c); -} - -void storeStoreBarrier(Context* c) -{ - memoryBarrier(c); -} - -void storeLoadBarrier(Context* c) -{ - memoryBarrier(c); -} - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // TARGET_BYTES_PER_WORD == 8 diff --git a/sgx-jvm/avian/src/codegen/target/arm/registers.h b/sgx-jvm/avian/src/codegen/target/arm/registers.h deleted file mode 100644 index 07e377bd76..0000000000 --- a/sgx-jvm/avian/src/codegen/target/arm/registers.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_ARM_REGISTERS_H -#define AVIAN_CODEGEN_ASSEMBLER_ARM_REGISTERS_H - -#include -#include - -#include "avian/environment.h" - -namespace avian { -namespace codegen { -namespace arm { - -const uint64_t MASK_LO32 = 0xffffffff; -const unsigned MASK_LO8 = 0xff; - -#if TARGET_BYTES_PER_WORD == 8 -constexpr Register ThreadRegister(19); -constexpr Register StackRegister(31); -constexpr Register LinkRegister(30); -constexpr Register FrameRegister(29); -constexpr Register ProgramCounter(0xFE); // i.e. unaddressable - -const int N_GPRS = 32; -const int N_FPRS = 32; -const RegisterMask GPR_MASK = 0xffffffff; -const RegisterMask FPR_MASK = 0xffffffff00000000; - -#else -constexpr Register ThreadRegister(8); -constexpr Register StackRegister(13); -constexpr Register LinkRegister(14); -constexpr Register FrameRegister(0xFE); // i.e. there is none -constexpr Register ProgramCounter(15); - -const int N_GPRS = 16; -const int N_FPRS = 16; -const RegisterMask GPR_MASK = 0xffff; -const RegisterMask FPR_MASK = 0xffff0000; - -inline int fpr64(Register reg) -{ - return reg.index() - N_GPRS; -} -inline int fpr64(lir::RegisterPair* reg) -{ - return fpr64(reg->low); -} -inline int fpr32(Register reg) -{ - return fpr64(reg) << 1; -} -inline int fpr32(lir::RegisterPair* reg) -{ - return fpr64(reg) << 1; -} -#endif - -inline bool isFpr(lir::RegisterPair* reg) -{ - return reg->low.index() >= N_GPRS; -} - -} // namespace arm -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_ARM_REGISTERS_H diff --git a/sgx-jvm/avian/src/codegen/target/multimethod.h b/sgx-jvm/avian/src/codegen/target/multimethod.h deleted file mode 100644 index 61f7a72318..0000000000 --- a/sgx-jvm/avian/src/codegen/target/multimethod.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_TARGET_MULTIMETHOD_H -#define AVIAN_CODEGEN_TARGET_MULTIMETHOD_H - -namespace avian { -namespace codegen { - -class Multimethod { - public: - inline static unsigned index(lir::UnaryOperation operation, - lir::Operand::Type operand) - { - return operation + (lir::UnaryOperationCount * (unsigned)operand); - } -}; - -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_TARGET_MULTIMETHOD_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/CMakeLists.txt b/sgx-jvm/avian/src/codegen/target/x86/CMakeLists.txt deleted file mode 100644 index eb5d5b1554..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -add_library(avian_codegen_x86 - assembler.cpp - block.cpp - context.cpp - detect.cpp - encode.cpp - fixup.cpp - multimethod.cpp - operations.cpp - padding.cpp -) diff --git a/sgx-jvm/avian/src/codegen/target/x86/assembler.cpp b/sgx-jvm/avian/src/codegen/target/x86/assembler.cpp deleted file mode 100644 index c8412dbc04..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/assembler.cpp +++ /dev/null @@ -1,1263 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include - -#include "avian/environment.h" -#include "avian/target.h" -#include "avian/alloc-vector.h" -#include "avian/common.h" -#include "avian/util/allocator.h" -#include "avian/zone.h" - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "context.h" -#include "block.h" -#include "fixup.h" -#include "padding.h" -#include "registers.h" -#include "operations.h" -#include "detect.h" -#include "multimethod.h" -#include "../multimethod.h" - -#define CAST1(x) reinterpret_cast(x) -#define CAST2(x) reinterpret_cast(x) -#define CAST_BRANCH(x) reinterpret_cast(x) - -using namespace vm; -using namespace avian::util; - -namespace avian { -namespace codegen { -namespace x86 { - -const unsigned FrameHeaderSize = (UseFramePointer ? 2 : 1); - -const unsigned StackAlignmentInBytes = 16; -const unsigned StackAlignmentInWords = StackAlignmentInBytes - / TargetBytesPerWord; - -unsigned argumentFootprint(unsigned footprint) -{ - return max(pad(footprint, StackAlignmentInWords), StackAlignmentInWords); -} - -uint32_t read4(uint8_t* p) -{ - uint32_t v; - memcpy(&v, p, 4); - return v; -} - -void nextFrame(ArchitectureContext* c UNUSED, - uint8_t* start, - unsigned size UNUSED, - unsigned footprint, - void*, - bool mostRecent, - int targetParameterFootprint, - void** ip, - void** stack) -{ - assertT(c, *ip >= start); - assertT(c, *ip <= start + size); - - uint8_t* instruction = static_cast(*ip); - - // skip stack overflow check, if present: - if (TargetBytesPerWord == 4) { - if (*start == 0x39) { - start += 12; - } - } else if (*start == 0x48 and start[1] == 0x39) { - start += 13; - } - - if (instruction <= start) { - assertT(c, mostRecent); - *ip = static_cast(*stack)[0]; - return; - } - - if (UseFramePointer) { - // skip preamble - start += (TargetBytesPerWord == 4 ? 3 : 4); - - if (instruction <= start or *instruction == 0x5d) { - assertT(c, mostRecent); - - *ip = static_cast(*stack)[1]; - *stack = static_cast(*stack) + 1; - return; - } - } - - if (*instruction == 0xc3) { // return - *ip = static_cast(*stack)[0]; - return; - } - - unsigned offset = footprint + FrameHeaderSize - (mostRecent ? 1 : 0); - - if (TailCalls and targetParameterFootprint >= 0) { - if (argumentFootprint(targetParameterFootprint) > StackAlignmentInWords) { - offset += argumentFootprint(targetParameterFootprint) - - StackAlignmentInWords; - } - - // check for post-non-tail-call stack adjustment of the form "sub - // $offset,%rsp": - if (TargetBytesPerWord == 4) { - if ((*instruction == 0x83 or *instruction == 0x81) - and instruction[1] == 0xec) { - offset - -= (*instruction == 0x83 ? instruction[2] : read4(instruction + 2)) - / TargetBytesPerWord; - } - } else if (*instruction == 0x48 - and (instruction[1] == 0x83 or instruction[1] == 0x81) - and instruction[2] == 0xec) { - offset - -= (instruction[1] == 0x83 ? instruction[3] : read4(instruction + 3)) - / TargetBytesPerWord; - } - - // todo: check for and handle tail calls - } - - if (UseFramePointer and not mostRecent) { - assertT(c, - static_cast(*stack)[-1] + 1 - == static_cast(*stack) + offset); - - assertT(c, - static_cast(*stack)[-1][1] - == static_cast(*stack)[offset]); - } - - *ip = static_cast(*stack)[offset]; - *stack = static_cast(*stack) + offset; -} - -class MyArchitecture : public Architecture { - public: - MyArchitecture(System* system, bool useNativeFeatures) - : c(system, useNativeFeatures), - referenceCount(0), - myRegisterFile(GeneralRegisterMask, useSSE(&c) ? FloatRegisterMask : 0) - { - populateTables(&c); - } - - virtual unsigned floatRegisterSize() - { - if (useSSE(&c)) { - return 8; - } else { - return 0; - } - } - - virtual const RegisterFile* registerFile() - { - return &myRegisterFile; - } - - virtual Register scratch() - { - return rax; - } - - virtual Register stack() - { - return rsp; - } - - virtual Register thread() - { - return rbx; - } - - virtual Register returnLow() - { - return rax; - } - - virtual Register returnHigh() - { - return (TargetBytesPerWord == 4 ? rdx : NoRegister); - } - - virtual Register virtualCallTarget() - { - return rax; - } - - virtual Register virtualCallIndex() - { - return rdx; - } - - virtual ir::TargetInfo targetInfo() - { - return ir::TargetInfo(TargetBytesPerWord); - } - - virtual bool bigEndian() - { - return false; - } - - virtual uintptr_t maximumImmediateJump() - { - return 0x7FFFFFFF; - } - - virtual bool reserved(Register register_) - { - switch (register_.index()) { - case rbp.index(): - return UseFramePointer; - - case rsp.index(): - case rbx.index(): - return true; - - default: - return false; - } - } - - virtual unsigned frameFootprint(unsigned footprint) - { -#if AVIAN_TARGET_FORMAT == AVIAN_FORMAT_PE - return max(footprint, StackAlignmentInWords); -#else - return max(footprint > argumentRegisterCount() - ? footprint - argumentRegisterCount() - : 0, - StackAlignmentInWords); -#endif - } - - virtual unsigned argumentFootprint(unsigned footprint) - { - return x86::argumentFootprint(footprint); - } - - virtual bool argumentAlignment() - { - return false; - } - - virtual bool argumentRegisterAlignment() - { - return false; - } - - virtual unsigned argumentRegisterCount() - { -#if AVIAN_TARGET_FORMAT == AVIAN_FORMAT_PE - if (TargetBytesPerWord == 8) - return 4; - else -#else - if (TargetBytesPerWord == 8) - return 6; - else -#endif - return 0; - } - - virtual Register argumentRegister(unsigned index) - { - assertT(&c, TargetBytesPerWord == 8); - switch (index) { -#if AVIAN_TARGET_FORMAT == AVIAN_FORMAT_PE - case 0: - return rcx; - case 1: - return rdx; - case 2: - return r8; - case 3: - return r9; -#else - case 0: - return rdi; - case 1: - return rsi; - case 2: - return rdx; - case 3: - return rcx; - case 4: - return r8; - case 5: - return r9; -#endif - default: - abort(&c); - } - } - - virtual bool hasLinkRegister() - { - return false; - } - - virtual unsigned stackAlignmentInWords() - { - return StackAlignmentInWords; - } - - virtual bool matchCall(void* returnAddress, void* target) - { - uint8_t* instruction = static_cast(returnAddress) - 5; - int32_t actualOffset; - memcpy(&actualOffset, instruction + 1, 4); - void* actualTarget = static_cast(returnAddress) + actualOffset; - - return *instruction == 0xE8 and actualTarget == target; - } - - virtual void updateCall(lir::UnaryOperation op, - void* returnAddress, - void* newTarget) - { - bool assertTAlignment UNUSED; - switch (op) { - case lir::AlignedCall: - op = lir::Call; - assertTAlignment = true; - break; - - case lir::AlignedJump: - op = lir::Jump; - assertTAlignment = true; - break; - - case lir::AlignedLongCall: - op = lir::LongCall; - assertTAlignment = true; - break; - - case lir::AlignedLongJump: - op = lir::LongJump; - assertTAlignment = true; - break; - - default: - assertTAlignment = false; - } - - if (TargetBytesPerWord == 4 or op == lir::Call or op == lir::Jump) { - uint8_t* instruction = static_cast(returnAddress) - 5; - - assertT( - &c, - ((op == lir::Call or op == lir::LongCall) and *instruction == 0xE8) - or ((op == lir::Jump or op == lir::LongJump) - and *instruction == 0xE9)); - - assertT(&c, - (not assertTAlignment) - or reinterpret_cast(instruction + 1) % 4 == 0); - - intptr_t v = static_cast(newTarget) - - static_cast(returnAddress); - - assertT(&c, vm::fitsInInt32(v)); - - int32_t v32 = v; - - memcpy(instruction + 1, &v32, 4); - } else { - uint8_t* instruction = static_cast(returnAddress) - 13; - - assertT(&c, instruction[0] == 0x49 and instruction[1] == 0xBA); - assertT(&c, instruction[10] == 0x41 and instruction[11] == 0xFF); - assertT(&c, - (op == lir::LongCall and instruction[12] == 0xD2) - or (op == lir::LongJump and instruction[12] == 0xE2)); - - assertT(&c, - (not assertTAlignment) - or reinterpret_cast(instruction + 2) % 8 == 0); - - memcpy(instruction + 2, &newTarget, 8); - } - } - - virtual void setConstant(void* dst, uint64_t constant) - { - target_uintptr_t v = targetVW(constant); - memcpy(dst, &v, TargetBytesPerWord); - } - - virtual unsigned alignFrameSize(unsigned sizeInWords) - { - return pad(sizeInWords + FrameHeaderSize, StackAlignmentInWords) - - FrameHeaderSize; - } - - virtual void nextFrame(void* start, - unsigned size, - unsigned footprint, - void* link, - bool mostRecent, - int targetParameterFootprint, - void** ip, - void** stack) - { - x86::nextFrame(&c, - static_cast(start), - size, - footprint, - link, - mostRecent, - targetParameterFootprint, - ip, - stack); - } - - virtual void* frameIp(void* stack) - { - return stack ? *static_cast(stack) : 0; - } - - virtual unsigned frameHeaderSize() - { - return FrameHeaderSize; - } - - virtual unsigned frameReturnAddressSize() - { - return 1; - } - - virtual unsigned frameFooterSize() - { - return 0; - } - - virtual bool alwaysCondensed(lir::BinaryOperation op) - { - switch (op) { - case lir::Float2Float: - case lir::Float2Int: - case lir::Int2Float: - case lir::FloatAbsolute: - case lir::FloatNegate: - case lir::FloatSquareRoot: - return false; - - case lir::Negate: - case lir::Absolute: - return true; - - default: - abort(&c); - } - } - - virtual bool alwaysCondensed(lir::TernaryOperation) - { - return true; - } - - virtual int returnAddressOffset() - { - return 0; - } - - virtual int framePointerOffset() - { - return UseFramePointer ? -1 : 0; - } - - virtual void plan(lir::UnaryOperation, - unsigned, - OperandMask& aMask, - bool* thunk) - { - aMask.typeMask = lir::Operand::RegisterPairMask | lir::Operand::MemoryMask - | lir::Operand::ConstantMask; - *thunk = false; - } - - virtual void planSource(lir::BinaryOperation op, - unsigned aSize, - OperandMask& aMask, - unsigned bSize, - bool* thunk) - { - aMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - - *thunk = false; - - switch (op) { - case lir::Negate: - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(rax, rdx); - break; - - case lir::Absolute: - if (aSize <= TargetBytesPerWord) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(rax, 0); - } else { - *thunk = true; - } - break; - - case lir::FloatAbsolute: - if (useSSE(&c)) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - } else { - *thunk = true; - } - break; - - case lir::FloatNegate: - // floatNegateRR does not support doubles - if (useSSE(&c) and aSize == 4 and bSize == 4) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(FloatRegisterMask, 0); - } else { - *thunk = true; - } - break; - - case lir::FloatSquareRoot: - if (useSSE(&c)) { - aMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - aMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - } else { - *thunk = true; - } - break; - - case lir::Float2Float: - if (useSSE(&c)) { - aMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - aMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - } else { - *thunk = true; - } - break; - - case lir::Float2Int: - // todo: Java requires different semantics than SSE for - // converting floats to integers, we we need to either use - // thunks or produce inline machine code which handles edge - // cases properly. - if (false and useSSE(&c) and bSize <= TargetBytesPerWord) { - aMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - aMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - } else { - *thunk = true; - } - break; - - case lir::Int2Float: - if (useSSE(&c) and aSize <= TargetBytesPerWord) { - aMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - aMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - } else { - *thunk = true; - } - break; - - case lir::Move: - aMask.typeMask = ~0; - aMask.setLowHighRegisterMasks(AnyRegisterMask, AnyRegisterMask); - - if (TargetBytesPerWord == 4) { - if (aSize == 4 and bSize == 8) { - aMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - const RegisterMask mask = GeneralRegisterMask - .excluding(rax).excluding(rdx); - aMask.setLowHighRegisterMasks(mask, mask); - } else if (aSize == 1 or bSize == 1) { - aMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - const RegisterMask mask = rax | rcx | rdx | rbx; - aMask.setLowHighRegisterMasks(mask, mask); - } - } - break; - - default: - break; - } - } - - virtual void planDestination(lir::BinaryOperation op, - unsigned aSize, - const OperandMask& aMask, - unsigned bSize, - OperandMask& bMask) - { - bMask.typeMask = ~0; - bMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - - switch (op) { - case lir::Absolute: - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.setLowHighRegisterMasks(rax, 0); - break; - - case lir::FloatAbsolute: - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.lowRegisterMask = aMask.lowRegisterMask; - bMask.highRegisterMask = aMask.highRegisterMask; - break; - - case lir::Negate: - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.lowRegisterMask = aMask.lowRegisterMask; - bMask.highRegisterMask = aMask.highRegisterMask; - break; - - case lir::FloatNegate: - case lir::FloatSquareRoot: - case lir::Float2Float: - case lir::Int2Float: - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - break; - - case lir::Float2Int: - bMask.typeMask = lir::Operand::RegisterPairMask; - break; - - case lir::Move: - if (aMask.typeMask - & (lir::Operand::MemoryMask | lir::Operand::AddressMask)) { - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.setLowHighRegisterMasks(GeneralRegisterMask | FloatRegisterMask, GeneralRegisterMask); - } else if (aMask.typeMask & lir::Operand::RegisterPairMask) { - bMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - if (aMask.lowRegisterMask & FloatRegisterMask) { - bMask.setLowHighRegisterMasks(FloatRegisterMask, 0); - } else { - bMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - } - } else { - bMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - } - - if (TargetBytesPerWord == 4) { - if (aSize == 4 and bSize == 8) { - bMask.setLowHighRegisterMasks(rax, rdx); - } else if (aSize == 1 or bSize == 1) { - const RegisterMask mask = rax | rcx | rdx | rbx; - bMask.setLowHighRegisterMasks(mask, mask); - } - } - break; - - default: - break; - } - } - - virtual void planMove(unsigned size, - OperandMask& srcMask, - OperandMask& tmpMask, - const OperandMask& dstMask) - { - srcMask.typeMask = ~0; - srcMask.setLowHighRegisterMasks(AnyRegisterMask, AnyRegisterMask); - - tmpMask.typeMask = 0; - tmpMask.setLowHighRegisterMasks(0, 0); - - if (dstMask.typeMask & lir::Operand::MemoryMask) { - // can't move directly from memory to memory - srcMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::ConstantMask; - tmpMask.typeMask = lir::Operand::RegisterPairMask; - tmpMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - } else if (dstMask.typeMask & lir::Operand::RegisterPairMask) { - if (size > TargetBytesPerWord) { - // can't move directly from FPR to GPR or vice-versa for - // values larger than the GPR size - if (dstMask.lowRegisterMask & FloatRegisterMask) { - srcMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - tmpMask.typeMask = lir::Operand::MemoryMask; - } else if (dstMask.lowRegisterMask & GeneralRegisterMask) { - srcMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - tmpMask.typeMask = lir::Operand::MemoryMask; - } - } - if (dstMask.lowRegisterMask & FloatRegisterMask) { - // can't move directly from constant to FPR - srcMask.typeMask &= ~lir::Operand::ConstantMask; - if (size > TargetBytesPerWord) { - tmpMask.typeMask = lir::Operand::MemoryMask; - } else { - tmpMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - tmpMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - } - } - } - } - - virtual void planSource(lir::TernaryOperation op, - unsigned aSize, - OperandMask& aMask, - unsigned bSize, - OperandMask& bMask, - unsigned, - bool* thunk) - { - aMask.typeMask = lir::Operand::RegisterPairMask | lir::Operand::ConstantMask; - aMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - - bMask.typeMask = lir::Operand::RegisterPairMask; - bMask.setLowHighRegisterMasks(GeneralRegisterMask, GeneralRegisterMask); - - *thunk = false; - - switch (op) { - case lir::FloatAdd: - case lir::FloatSubtract: - case lir::FloatMultiply: - case lir::FloatDivide: - if (useSSE(&c)) { - aMask.typeMask = lir::Operand::RegisterPairMask - | lir::Operand::MemoryMask; - bMask.typeMask = lir::Operand::RegisterPairMask; - - aMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - bMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - } else { - *thunk = true; - } - break; - - case lir::FloatRemainder: - *thunk = true; - break; - - case lir::Multiply: - if (TargetBytesPerWord == 4 and aSize == 8) { - const RegisterMask mask = GeneralRegisterMask .excluding(rax).excluding(rdx); - aMask.setLowHighRegisterMasks(mask, mask); - bMask.setLowHighRegisterMasks(mask, rdx); - } else { - aMask.setLowHighRegisterMasks(GeneralRegisterMask, 0); - bMask.setLowHighRegisterMasks(GeneralRegisterMask, 0); - } - break; - - case lir::Divide: - if (TargetBytesPerWord == 4 and aSize == 8) { - *thunk = true; - } else { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(GeneralRegisterMask .excluding(rax).excluding(rdx), 0); - bMask.setLowHighRegisterMasks(rax, 0); - } - break; - - case lir::Remainder: - if (TargetBytesPerWord == 4 and aSize == 8) { - *thunk = true; - } else { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(GeneralRegisterMask .excluding(rax).excluding(rdx), 0); - bMask.setLowHighRegisterMasks(rax, 0); - } - break; - - case lir::ShiftLeft: - case lir::ShiftRight: - case lir::UnsignedShiftRight: { - if (TargetBytesPerWord == 4 and bSize == 8) { - const RegisterMask mask = GeneralRegisterMask.excluding(rcx); - aMask.setLowHighRegisterMasks(mask, mask); - bMask.setLowHighRegisterMasks(mask, mask); - } else { - aMask.setLowHighRegisterMasks(rcx, GeneralRegisterMask); - const RegisterMask mask = GeneralRegisterMask.excluding(rcx); - bMask.setLowHighRegisterMasks(mask, mask); - } - } break; - - case lir::JumpIfFloatEqual: - case lir::JumpIfFloatNotEqual: - case lir::JumpIfFloatLess: - case lir::JumpIfFloatGreater: - case lir::JumpIfFloatLessOrEqual: - case lir::JumpIfFloatGreaterOrEqual: - case lir::JumpIfFloatLessOrUnordered: - case lir::JumpIfFloatGreaterOrUnordered: - case lir::JumpIfFloatLessOrEqualOrUnordered: - case lir::JumpIfFloatGreaterOrEqualOrUnordered: - if (useSSE(&c)) { - aMask.typeMask = lir::Operand::RegisterPairMask; - aMask.setLowHighRegisterMasks(FloatRegisterMask, FloatRegisterMask); - bMask.typeMask = aMask.typeMask; - bMask.lowRegisterMask = aMask.lowRegisterMask; - bMask.highRegisterMask = aMask.highRegisterMask; - } else { - *thunk = true; - } - break; - - default: - break; - } - } - - virtual void planDestination(lir::TernaryOperation op, - unsigned, - const OperandMask&, - unsigned, - const OperandMask& bMask, - unsigned, - OperandMask& cMask) - { - if (isBranch(op)) { - cMask.typeMask = lir::Operand::ConstantMask; - cMask.setLowHighRegisterMasks(0, 0); - } else { - cMask.typeMask = lir::Operand::RegisterPairMask; - cMask.lowRegisterMask = bMask.lowRegisterMask; - cMask.highRegisterMask = bMask.highRegisterMask; - } - } - - virtual Assembler* makeAssembler(util::Alloc* allocator, Zone* zone); - - virtual void acquire() - { - ++referenceCount; - } - - virtual void release() - { - if (--referenceCount == 0) { - c.s->free(this); - } - } - - ArchitectureContext c; - unsigned referenceCount; - const RegisterFile myRegisterFile; -}; - -class MyAssembler : public Assembler { - public: - MyAssembler(System* s, util::Alloc* a, Zone* zone, MyArchitecture* arch) - : c(s, a, zone, &(arch->c)), arch_(arch) - { - } - - virtual void setClient(Client* client) - { - assertT(&c, c.client == 0); - c.client = client; - } - - virtual Architecture* arch() - { - return arch_; - } - - virtual void checkStackOverflow(uintptr_t handler, - unsigned stackLimitOffsetFromThread) - { - lir::RegisterPair stack(rsp); - lir::Memory stackLimit(rbx, stackLimitOffsetFromThread); - lir::Constant handlerConstant(resolvedPromise(&c, handler)); - branchRM(&c, - lir::JumpIfGreaterOrEqual, - TargetBytesPerWord, - &stack, - &stackLimit, - &handlerConstant); - } - - virtual void saveFrame(unsigned stackOffset, unsigned) - { - lir::RegisterPair stack(rsp); - lir::Memory stackDst(rbx, stackOffset); - apply(lir::Move, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::Memory, &stackDst)); - } - - virtual void pushFrame(unsigned argumentCount, ...) - { - // TODO: Argument should be replaced by OperandInfo... - struct Argument { - unsigned size; - lir::Operand::Type type; - lir::Operand* operand; - }; - RUNTIME_ARRAY(Argument, arguments, argumentCount); - va_list a; - va_start(a, argumentCount); - unsigned footprint = 0; - for (unsigned i = 0; i < argumentCount; ++i) { - RUNTIME_ARRAY_BODY(arguments)[i].size = va_arg(a, unsigned); - RUNTIME_ARRAY_BODY(arguments)[i].type - = static_cast(va_arg(a, int)); - RUNTIME_ARRAY_BODY(arguments)[i].operand = va_arg(a, lir::Operand*); - footprint += ceilingDivide(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord); - } - va_end(a); - - allocateFrame(arch_->alignFrameSize(footprint)); - - unsigned offset = 0; - for (unsigned i = 0; i < argumentCount; ++i) { - if (i < arch_->argumentRegisterCount()) { - lir::RegisterPair dst(arch_->argumentRegister(i)); - apply(lir::Move, - OperandInfo(RUNTIME_ARRAY_BODY(arguments)[i].size, - RUNTIME_ARRAY_BODY(arguments)[i].type, - RUNTIME_ARRAY_BODY(arguments)[i].operand), - OperandInfo(pad(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord), - lir::Operand::Type::RegisterPair, - &dst)); - } else { - lir::Memory dst(rsp, offset * TargetBytesPerWord); - apply(lir::Move, - OperandInfo(RUNTIME_ARRAY_BODY(arguments)[i].size, - RUNTIME_ARRAY_BODY(arguments)[i].type, - RUNTIME_ARRAY_BODY(arguments)[i].operand), - OperandInfo(pad(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord), - lir::Operand::Type::Memory, - &dst)); - offset += ceilingDivide(RUNTIME_ARRAY_BODY(arguments)[i].size, - TargetBytesPerWord); - } - } - } - - virtual void allocateFrame(unsigned footprint) - { - lir::RegisterPair stack(rsp); - - if (UseFramePointer) { - lir::RegisterPair base(rbp); - pushR(&c, TargetBytesPerWord, &base); - - apply(lir::Move, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &base)); - } - - lir::Constant footprintConstant( - resolvedPromise(&c, footprint * TargetBytesPerWord)); - apply(lir::Subtract, - OperandInfo( - TargetBytesPerWord, lir::Operand::Type::Constant, &footprintConstant), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack)); - } - - virtual void adjustFrame(unsigned difference) - { - lir::RegisterPair stack(rsp); - lir::Constant differenceConstant( - resolvedPromise(&c, difference * TargetBytesPerWord)); - apply(lir::Subtract, - OperandInfo( - TargetBytesPerWord, lir::Operand::Type::Constant, &differenceConstant), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack)); - } - - virtual void popFrame(unsigned frameFootprint) - { - if (UseFramePointer) { - lir::RegisterPair base(rbp); - lir::RegisterPair stack(rsp); - apply(lir::Move, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &base), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack)); - - popR(&c, TargetBytesPerWord, &base); - } else { - lir::RegisterPair stack(rsp); - lir::Constant footprint( - resolvedPromise(&c, frameFootprint * TargetBytesPerWord)); - apply(lir::Add, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::Constant, &footprint), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &stack)); - } - } - - virtual void popFrameForTailCall(unsigned frameFootprint, - int offset, - Register returnAddressSurrogate, - Register framePointerSurrogate) - { - if (TailCalls) { - if (offset) { - lir::RegisterPair tmp(c.client->acquireTemporary()); - - unsigned baseSize = UseFramePointer ? 1 : 0; - - lir::Memory returnAddressSrc( - rsp, (frameFootprint + baseSize) * TargetBytesPerWord); - moveMR(&c, - TargetBytesPerWord, - &returnAddressSrc, - TargetBytesPerWord, - &tmp); - - lir::Memory returnAddressDst( - rsp, (frameFootprint - offset + baseSize) * TargetBytesPerWord); - moveRM(&c, - TargetBytesPerWord, - &tmp, - TargetBytesPerWord, - &returnAddressDst); - - c.client->releaseTemporary(tmp.low); - - if (UseFramePointer) { - lir::Memory baseSrc(rsp, frameFootprint * TargetBytesPerWord); - lir::RegisterPair base(rbp); - moveMR(&c, TargetBytesPerWord, &baseSrc, TargetBytesPerWord, &base); - } - - lir::RegisterPair stack(rsp); - lir::Constant footprint(resolvedPromise( - &c, (frameFootprint - offset + baseSize) * TargetBytesPerWord)); - - addCR(&c, TargetBytesPerWord, &footprint, TargetBytesPerWord, &stack); - - if (returnAddressSurrogate != NoRegister) { - assertT(&c, offset > 0); - - lir::RegisterPair ras(returnAddressSurrogate); - lir::Memory dst(rsp, offset * TargetBytesPerWord); - moveRM(&c, TargetBytesPerWord, &ras, TargetBytesPerWord, &dst); - } - - if (framePointerSurrogate != NoRegister) { - assertT(&c, offset > 0); - - lir::RegisterPair fps(framePointerSurrogate); - lir::Memory dst(rsp, (offset - 1) * TargetBytesPerWord); - moveRM(&c, TargetBytesPerWord, &fps, TargetBytesPerWord, &dst); - } - } else { - popFrame(frameFootprint); - } - } else { - abort(&c); - } - } - - virtual void popFrameAndPopArgumentsAndReturn(unsigned frameFootprint, - unsigned argumentFootprint) - { - popFrame(frameFootprint); - - assertT(&c, argumentFootprint >= StackAlignmentInWords); - assertT(&c, (argumentFootprint % StackAlignmentInWords) == 0); - - if (TailCalls and argumentFootprint > StackAlignmentInWords) { - lir::RegisterPair returnAddress(rcx); - popR(&c, TargetBytesPerWord, &returnAddress); - - lir::RegisterPair stack(rsp); - lir::Constant adjustment(resolvedPromise( - &c, - (argumentFootprint - StackAlignmentInWords) * TargetBytesPerWord)); - addCR(&c, TargetBytesPerWord, &adjustment, TargetBytesPerWord, &stack); - - jumpR(&c, TargetBytesPerWord, &returnAddress); - } else { - return_(&c); - } - } - - virtual void popFrameAndUpdateStackAndReturn(unsigned frameFootprint, - unsigned stackOffsetFromThread) - { - popFrame(frameFootprint); - - lir::RegisterPair returnAddress(rcx); - popR(&c, TargetBytesPerWord, &returnAddress); - - lir::RegisterPair stack(rsp); - lir::Memory stackSrc(rbx, stackOffsetFromThread); - moveMR(&c, TargetBytesPerWord, &stackSrc, TargetBytesPerWord, &stack); - - jumpR(&c, TargetBytesPerWord, &returnAddress); - } - - virtual void apply(lir::Operation op) - { - arch_->c.operations[op](&c); - } - - virtual void apply(lir::UnaryOperation op, OperandInfo a) - { - arch_->c.unaryOperations[Multimethod::index(op, a.type)]( - &c, a.size, a.operand); - } - - virtual void apply(lir::BinaryOperation op, OperandInfo a, OperandInfo b) - { - arch_->c.binaryOperations[index(&(arch_->c), op, a.type, b.type)]( - &c, a.size, a.operand, b.size, b.operand); - } - - virtual void apply(lir::TernaryOperation op, - OperandInfo a, - OperandInfo b, - OperandInfo c) - { - if (isBranch(op)) { - assertT(&this->c, a.size == b.size); - assertT(&this->c, c.size == TargetBytesPerWord); - assertT(&this->c, c.type == lir::Operand::Type::Constant); - - arch_->c.branchOperations[branchIndex(&(arch_->c), a.type, b.type)]( - &this->c, op, a.size, a.operand, b.operand, c.operand); - } else { - assertT(&this->c, b.size == c.size); - assertT(&this->c, b.type == c.type); - - arch_->c.binaryOperations[index(&(arch_->c), op, a.type, b.type)]( - &this->c, a.size, a.operand, b.size, b.operand); - } - } - - virtual void setDestination(uint8_t* dst) - { - c.result = dst; - } - - virtual void write() - { - uint8_t* dst = c.result; - for (MyBlock* b = c.firstBlock; b; b = b->next) { - unsigned index = 0; - unsigned padding = 0; - for (AlignmentPadding* p = b->firstPadding; p; p = p->next) { - unsigned size = p->offset - b->offset - index; - - memcpy(dst + b->start + index + padding, - c.code.data.begin() + b->offset + index, - size); - - index += size; - - while ((b->start + index + padding + p->instructionOffset) - % p->alignment) { - *(dst + b->start + index + padding) = 0x90; - ++padding; - } - } - - memcpy(dst + b->start + index + padding, - c.code.data.begin() + b->offset + index, - b->size - index); - } - - for (Task* t = c.tasks; t; t = t->next) { - t->run(&c); - } - } - - virtual Promise* offset(bool) - { - return x86::offsetPromise(&c); - } - - virtual Block* endBlock(bool startNew) - { - MyBlock* b = c.lastBlock; - b->size = c.code.length() - b->offset; - if (startNew) { - c.lastBlock = new (c.zone) MyBlock(c.code.length()); - } else { - c.lastBlock = 0; - } - return b; - } - - virtual void endEvent() - { - // ignore - } - - virtual unsigned length() - { - return c.code.length(); - } - - virtual unsigned footerSize() - { - return 0; - } - - virtual void dispose() - { - c.code.dispose(); - } - - Context c; - MyArchitecture* arch_; -}; - -Assembler* MyArchitecture::makeAssembler(util::Alloc* allocator, Zone* zone) -{ - return new (zone) MyAssembler(c.s, allocator, zone, this); -} - -} // namespace x86 - -Architecture* makeArchitectureX86(System* system, bool useNativeFeatures) -{ - return new (allocate(system, sizeof(x86::MyArchitecture))) - x86::MyArchitecture(system, useNativeFeatures); -} - -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/block.cpp b/sgx-jvm/avian/src/codegen/target/x86/block.cpp deleted file mode 100644 index 5d2d46d6fe..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/block.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "block.h" - -#include - -namespace avian { -namespace codegen { -namespace x86 { - -unsigned padding(AlignmentPadding* p, - unsigned index, - unsigned offset, - AlignmentPadding* limit); - -MyBlock::MyBlock(unsigned offset) - : next(0), - firstPadding(0), - lastPadding(0), - offset(offset), - start(~0), - size(0) -{ -} - -unsigned MyBlock::resolve(unsigned start, Assembler::Block* next) -{ - this->start = start; - this->next = static_cast(next); - - return start + size + padding(firstPadding, start, offset, lastPadding); -} - -} // namespace x86 -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/block.h b/sgx-jvm/avian/src/codegen/target/x86/block.h deleted file mode 100644 index 6841f5d577..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/block.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_BLOCK_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_BLOCK_H - -#include - -namespace avian { -namespace codegen { -namespace x86 { - -class AlignmentPadding; - -class MyBlock : public Assembler::Block { - public: - MyBlock(unsigned offset); - - virtual unsigned resolve(unsigned start, Assembler::Block* next); - - MyBlock* next; - AlignmentPadding* firstPadding; - AlignmentPadding* lastPadding; - unsigned offset; - unsigned start; - unsigned size; -}; - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_BLOCK_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/context.cpp b/sgx-jvm/avian/src/codegen/target/x86/context.cpp deleted file mode 100644 index 37d742c47c..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/context.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/util/allocator.h" -#include "avian/zone.h" - -#include "context.h" -#include "block.h" - -namespace avian { -namespace codegen { -namespace x86 { - -ArchitectureContext::ArchitectureContext(vm::System* s, bool useNativeFeatures) - : s(s), useNativeFeatures(useNativeFeatures) -{ -} - -Context::Context(vm::System* s, - util::Alloc* a, - vm::Zone* zone, - ArchitectureContext* ac) - : s(s), - zone(zone), - client(0), - code(s, a, 1024), - tasks(0), - result(0), - firstBlock(new (zone) MyBlock(0)), - lastBlock(firstBlock), - ac(ac) -{ -} - -} // namespace x86 -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/context.h b/sgx-jvm/avian/src/codegen/target/x86/context.h deleted file mode 100644 index ac8d267012..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/context.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_CONTEXT_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_CONTEXT_H - -#define CAST1(x) reinterpret_cast(x) -#define CAST2(x) reinterpret_cast(x) -#define CAST_BRANCH(x) reinterpret_cast(x) - -#include - -#include "avian/alloc-vector.h" - -#include -#include - -#include - -namespace vm { -class System; -class Alloc; -class Zone; -} // namespace vm - -namespace avian { - -namespace util { -class Aborter; -} // namespace util - -namespace codegen { -namespace x86 { - -class Context; -class MyBlock; -class Task; - -typedef void (*OperationType)(Context*); - -typedef void (*UnaryOperationType)(Context*, unsigned, lir::Operand*); - -typedef void (*BinaryOperationType)(Context*, - unsigned, - lir::Operand*, - unsigned, - lir::Operand*); - -typedef void (*BranchOperationType)(Context*, - lir::TernaryOperation, - unsigned, - lir::Operand*, - lir::Operand*, - lir::Operand*); - -class ArchitectureContext { - public: - ArchitectureContext(vm::System* s, bool useNativeFeatures); - - vm::System* s; - bool useNativeFeatures; - OperationType operations[lir::OperationCount]; - UnaryOperationType - unaryOperations[lir::UnaryOperationCount * lir::Operand::TypeCount]; - BinaryOperationType binaryOperations - [(lir::BinaryOperationCount + lir::NonBranchTernaryOperationCount) - * lir::Operand::TypeCount * lir::Operand::TypeCount]; - BranchOperationType branchOperations[lir::BranchOperationCount - * lir::Operand::TypeCount - * lir::Operand::TypeCount]; -}; - -class Context { - public: - Context(vm::System* s, - util::Alloc* a, - vm::Zone* zone, - ArchitectureContext* ac); - - vm::System* s; - vm::Zone* zone; - Assembler::Client* client; - vm::Vector code; - Task* tasks; - uint8_t* result; - MyBlock* firstBlock; - MyBlock* lastBlock; - ArchitectureContext* ac; -}; - -inline avian::util::Aborter* getAborter(Context* c) -{ - return c->s; -} - -inline avian::util::Aborter* getAborter(ArchitectureContext* c) -{ - return c->s; -} - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_CONTEXT_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/detect.cpp b/sgx-jvm/avian/src/codegen/target/x86/detect.cpp deleted file mode 100644 index 52ecc2f293..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/detect.cpp +++ /dev/null @@ -1,83 +0,0 @@ - -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" - -#include "context.h" - -// Note: this is so that we can build the x86 backend(s) on an arm machine. -// This way, we could (in theory) do a bootimage cross-compile from arm to x86 -#ifndef __arm__ - -#ifndef _MSC_VER -#include -#else -// MSVC implementation: -static int __get_cpuid(unsigned int __level, - unsigned int* __eax, - unsigned int* __ebx, - unsigned int* __ecx, - unsigned int* __edx) -{ - _asm - { - mov eax, __level; - cpuid; - mov[__eax], eax; - mov[__ebx], ebx; - mov[__ecx], ecx; - mov[__edx], edx; - } - return 1; -} -#define bit_SSE (1 << 25) -#define bit_SSE2 (1 << 26) - -#endif // ndef _MSC_VER - -#endif // ndef __arm__ - -namespace avian { -namespace codegen { -namespace x86 { - -// TODO: this should be moved such that it's called by the client (e.g. whatever -// allocates the Archivecture). That way, we can link the x86 code generator on -// another architecture (e.g. arm). - -bool useSSE(ArchitectureContext* c) -{ -#ifdef __arm__ - // We can't link in the detection code on arm (DUH!) - return vm::TargetBytesPerWord == 8; -#else - if (vm::TargetBytesPerWord == 8) { - // amd64 implies SSE2 support - return true; - } else if (c->useNativeFeatures) { - static int supported = -1; - if (supported == -1) { - unsigned eax; - unsigned ebx; - unsigned ecx; - unsigned edx; - supported = __get_cpuid(1, &eax, &ebx, &ecx, &edx) && (edx & bit_SSE) && (edx & bit_SSE2); - } - return supported; - } else { - return false; - } -#endif -} - -} // namespace x86 -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/detect.h b/sgx-jvm/avian/src/codegen/target/x86/detect.h deleted file mode 100644 index f8014ab1da..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/detect.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_DETECT_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_DETECT_H - -#include - -namespace avian { -namespace codegen { -namespace x86 { - -class ArchitectureContext; - -bool useSSE(ArchitectureContext* c); - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_DETECT_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/encode.cpp b/sgx-jvm/avian/src/codegen/target/x86/encode.cpp deleted file mode 100644 index 38313660f8..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/encode.cpp +++ /dev/null @@ -1,432 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" -#include "avian/alloc-vector.h" - -#include -#include - -#include -#include - -#include "context.h" -#include "encode.h" -#include "registers.h" -#include "fixup.h" - -using namespace avian::util; - -namespace { - -int64_t signExtend(unsigned size, int64_t v) -{ - if (size == 4) { - return static_cast(v); - } else if (size == 2) { - return static_cast(v); - } else if (size == 1) { - return static_cast(v); - } else { - return v; - } -} - -} // namespace - -namespace avian { -namespace codegen { -namespace x86 { - -#define REX_W 0x48 -#define REX_R 0x44 -#define REX_X 0x42 -#define REX_B 0x41 -#define REX_NONE 0x40 - -void maybeRex(Context* c, - unsigned size, - Register a, - Register index, - Register base, - bool always) -{ - if (vm::TargetBytesPerWord == 8) { - uint8_t byte; - if (size == 8) { - byte = REX_W; - } else { - byte = REX_NONE; - } - if (a != NoRegister and (a.index() & 8)) - byte |= REX_R; - if (index != NoRegister and (index.index() & 8)) - byte |= REX_X; - if (base != NoRegister and (base.index() & 8)) - byte |= REX_B; - if (always or byte != REX_NONE) - c->code.append(byte); - } -} - -void maybeRex(Context* c, unsigned size, lir::RegisterPair* a, lir::RegisterPair* b) -{ - maybeRex(c, size, a->low, NoRegister, b->low, false); -} - -void alwaysRex(Context* c, unsigned size, lir::RegisterPair* a, lir::RegisterPair* b) -{ - maybeRex(c, size, a->low, NoRegister, b->low, true); -} - -void maybeRex(Context* c, unsigned size, lir::RegisterPair* a) -{ - maybeRex(c, size, NoRegister, NoRegister, a->low, false); -} - -void maybeRex(Context* c, unsigned size, lir::RegisterPair* a, lir::Memory* b) -{ - maybeRex(c, size, a->low, b->index, b->base, size == 1 and (a->low.index() & 4)); -} - -void maybeRex(Context* c, unsigned size, lir::Memory* a) -{ - maybeRex(c, size, NoRegister, a->index, a->base, false); -} - -void modrm(Context* c, uint8_t mod, Register a, Register b) -{ - c->code.append(mod | (regCode(b) << 3) | regCode(a)); -} - -void modrm(Context* c, uint8_t mod, lir::RegisterPair* a, lir::RegisterPair* b) -{ - modrm(c, mod, a->low, b->low); -} - -void sib(Context* c, unsigned scale, Register index, Register base) -{ - c->code.append((util::log(scale) << 6) | (regCode(index) << 3) - | regCode(base)); -} - -void modrmSib(Context* c, int width, Register a, int scale, Register index, Register base) -{ - if (index == NoRegister) { - modrm(c, width, base, a); - if (regCode(base) == rsp.index()) { - sib(c, 0x00, rsp, rsp); - } - } else { - modrm(c, width, rsp, a); - sib(c, scale, index, base); - } -} - -void modrmSibImm(Context* c, Register a, int scale, Register index, Register base, int offset) -{ - if (offset == 0 and regCode(base) != rbp.index()) { - modrmSib(c, 0x00, a, scale, index, base); - } else if (vm::fitsInInt8(offset)) { - modrmSib(c, 0x40, a, scale, index, base); - c->code.append(offset); - } else { - modrmSib(c, 0x80, a, scale, index, base); - c->code.append4(offset); - } -} - -void modrmSibImm(Context* c, lir::RegisterPair* a, lir::Memory* b) -{ - modrmSibImm(c, a->low, b->scale, b->index, b->base, b->offset); -} - -void opcode(Context* c, uint8_t op) -{ - c->code.append(op); -} - -void opcode(Context* c, uint8_t op1, uint8_t op2) -{ - c->code.append(op1); - c->code.append(op2); -} - -void unconditional(Context* c, unsigned jump, lir::Constant* a) -{ - appendOffsetTask(c, a->value, offsetPromise(c), 5); - - opcode(c, jump); - c->code.append4(0); -} - -void conditional(Context* c, unsigned condition, lir::Constant* a) -{ - appendOffsetTask(c, a->value, offsetPromise(c), 6); - - opcode(c, 0x0f, condition); - c->code.append4(0); -} - -void sseMoveRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize >= 4); - assertT(c, aSize == bSize); - - if (isFloatReg(a) and isFloatReg(b)) { - if (aSize == 4) { - opcode(c, 0xf3); - maybeRex(c, 4, a, b); - opcode(c, 0x0f, 0x10); - modrm(c, 0xc0, a, b); - } else { - opcode(c, 0xf2); - maybeRex(c, 4, b, a); - opcode(c, 0x0f, 0x10); - modrm(c, 0xc0, a, b); - } - } else if (isFloatReg(a)) { - opcode(c, 0x66); - maybeRex(c, aSize, a, b); - opcode(c, 0x0f, 0x7e); - modrm(c, 0xc0, b, a); - } else { - opcode(c, 0x66); - maybeRex(c, aSize, b, a); - opcode(c, 0x0f, 0x6e); - modrm(c, 0xc0, a, b); - } -} - -void sseMoveCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize <= vm::TargetBytesPerWord); - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR2(c, aSize, a, aSize, &tmp, 0); - sseMoveRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); -} - -void sseMoveMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize >= 4); - - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - opcode(c, 0xf3); - opcode(c, 0x0f, 0x7e); - modrmSibImm(c, b, a); - } else { - opcode(c, 0x66); - maybeRex(c, aSize, b, a); - opcode(c, 0x0f, 0x6e); - modrmSibImm(c, b, a); - } -} - -void sseMoveRM(Context* c, - unsigned aSize, - lir::RegisterPair* a, - UNUSED unsigned bSize, - lir::Memory* b) -{ - assertT(c, aSize >= 4); - assertT(c, aSize == bSize); - - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - opcode(c, 0x66); - opcode(c, 0x0f, 0xd6); - modrmSibImm(c, a, b); - } else { - opcode(c, 0x66); - maybeRex(c, aSize, a, b); - opcode(c, 0x0f, 0x7e); - modrmSibImm(c, a, b); - } -} - -void branch(Context* c, lir::TernaryOperation op, lir::Constant* target) -{ - switch (op) { - case lir::JumpIfEqual: - conditional(c, 0x84, target); - break; - - case lir::JumpIfNotEqual: - conditional(c, 0x85, target); - break; - - case lir::JumpIfLess: - conditional(c, 0x8c, target); - break; - - case lir::JumpIfGreater: - conditional(c, 0x8f, target); - break; - - case lir::JumpIfLessOrEqual: - conditional(c, 0x8e, target); - break; - - case lir::JumpIfGreaterOrEqual: - conditional(c, 0x8d, target); - break; - - default: - abort(c); - } -} - -void branchFloat(Context* c, lir::TernaryOperation op, lir::Constant* target) -{ - switch (op) { - case lir::JumpIfFloatEqual: - // jp past the je so we don't jump to the target if unordered: - c->code.append(0x7a); - c->code.append(6); - conditional(c, 0x84, target); - break; - - case lir::JumpIfFloatNotEqual: - conditional(c, 0x85, target); - conditional(c, 0x8a, target); - break; - - case lir::JumpIfFloatLess: - conditional(c, 0x82, target); - break; - - case lir::JumpIfFloatGreater: - conditional(c, 0x87, target); - break; - - case lir::JumpIfFloatLessOrEqual: - conditional(c, 0x86, target); - break; - - case lir::JumpIfFloatGreaterOrEqual: - conditional(c, 0x83, target); - break; - - case lir::JumpIfFloatLessOrUnordered: - conditional(c, 0x82, target); - conditional(c, 0x8a, target); - break; - - case lir::JumpIfFloatGreaterOrUnordered: - conditional(c, 0x87, target); - conditional(c, 0x8a, target); - break; - - case lir::JumpIfFloatLessOrEqualOrUnordered: - conditional(c, 0x86, target); - conditional(c, 0x8a, target); - break; - - case lir::JumpIfFloatGreaterOrEqualOrUnordered: - conditional(c, 0x83, target); - conditional(c, 0x8a, target); - break; - - default: - abort(c); - } -} - -void floatRegOp(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b, - uint8_t op, - uint8_t mod) -{ - if (aSize == 4) { - opcode(c, 0xf3); - } else { - opcode(c, 0xf2); - } - maybeRex(c, bSize, b, a); - opcode(c, 0x0f, op); - modrm(c, mod, a, b); -} - -void floatMemOp(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b, - uint8_t op) -{ - if (aSize == 4) { - opcode(c, 0xf3); - } else { - opcode(c, 0xf2); - } - maybeRex(c, bSize, b, a); - opcode(c, 0x0f, op); - modrmSibImm(c, b, a); -} - -void moveCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void moveCR2(Context* c, - UNUSED unsigned aSize, - lir::Constant* a, - UNUSED unsigned bSize, - lir::RegisterPair* b, - unsigned promiseOffset) -{ - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - int64_t v = signExtend(aSize, a->value->value()); - - ResolvedPromise high((v >> 32) & 0xFFFFFFFF); - lir::Constant ah(&high); - - ResolvedPromise low(v & 0xFFFFFFFF); - lir::Constant al(&low); - - lir::RegisterPair bh(b->high); - - moveCR(c, 4, &al, 4, b); - moveCR(c, 4, &ah, 4, &bh); - } else { - maybeRex(c, vm::TargetBytesPerWord, b); - opcode(c, 0xb8 + regCode(b)); - if (a->value->resolved()) { - c->code.appendTargetAddress(signExtend(aSize, a->value->value())); - } else { - expect(c, aSize == vm::TargetBytesPerWord); - - appendImmediateTask( - c, a->value, offsetPromise(c), vm::TargetBytesPerWord, promiseOffset); - c->code.appendTargetAddress(static_cast(0)); - } - } -} - -} // namespace x86 -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/encode.h b/sgx-jvm/avian/src/codegen/target/x86/encode.h deleted file mode 100644 index cb107cbbcc..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/encode.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H - -#include - -#include "avian/common.h" - -#include - -#include "registers.h" - -namespace avian { -namespace codegen { -namespace x86 { - -class Context; - -void maybeRex(Context* c, - unsigned size, - int a, - int index, - int base, - bool always); - -void maybeRex(Context* c, unsigned size, lir::RegisterPair* a, lir::RegisterPair* b); - -void alwaysRex(Context* c, unsigned size, lir::RegisterPair* a, lir::RegisterPair* b); - -void maybeRex(Context* c, unsigned size, lir::RegisterPair* a); - -void maybeRex(Context* c, unsigned size, lir::RegisterPair* a, lir::Memory* b); - -void maybeRex(Context* c, unsigned size, lir::Memory* a); - -inline int regCode(Register a) -{ - return a.index() & 7; -} - -inline int regCode(lir::RegisterPair* a) -{ - return regCode(a->low); -} - -inline bool isFloatReg(lir::RegisterPair* a) -{ - return a->low >= xmm0; -} - -void modrm(Context* c, uint8_t mod, Register a, Register b); - -void modrm(Context* c, uint8_t mod, lir::RegisterPair* a, lir::RegisterPair* b); - -void sib(Context* c, unsigned scale, Register index, Register base); - -void modrmSib(Context* c, int width, Register a, int scale, Register index, Register base); - -void modrmSibImm(Context* c, Register a, int scale, Register index, Register base, int offset); - -void modrmSibImm(Context* c, lir::RegisterPair* a, lir::Memory* b); - -void opcode(Context* c, uint8_t op); - -void opcode(Context* c, uint8_t op1, uint8_t op2); - -void unconditional(Context* c, unsigned jump, lir::Constant* a); - -void conditional(Context* c, unsigned condition, lir::Constant* a); - -void sseMoveRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void sseMoveCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void sseMoveMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void sseMoveRM(Context* c, - unsigned aSize, - lir::RegisterPair* a, - UNUSED unsigned bSize, - lir::Memory* b); - -void branch(Context* c, lir::TernaryOperation op, lir::Constant* target); - -void branchFloat(Context* c, lir::TernaryOperation op, lir::Constant* target); - -void floatRegOp(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b, - uint8_t op, - uint8_t mod = 0xc0); - -void floatMemOp(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b, - uint8_t op); - -void moveCR2(Context* c, - UNUSED unsigned aSize, - lir::Constant* a, - UNUSED unsigned bSize, - lir::RegisterPair* b, - unsigned promiseOffset); - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_ENCODE_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/fixup.cpp b/sgx-jvm/avian/src/codegen/target/x86/fixup.cpp deleted file mode 100644 index 788d773afe..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/fixup.cpp +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include "avian/util/allocator.h" -#include "avian/alloc-vector.h" -#include "avian/common.h" -#include "avian/zone.h" - -#include -#include - -#include "context.h" -#include "fixup.h" -#include "padding.h" -#include "block.h" - -namespace avian { -namespace codegen { -namespace x86 { - -using namespace util; - -ResolvedPromise* resolvedPromise(Context* c, int64_t value) -{ - return new (c->zone) ResolvedPromise(value); -} - -OffsetPromise::OffsetPromise(Context* c, - MyBlock* block, - unsigned offset, - AlignmentPadding* limit) - : c(c), block(block), offset(offset), limit(limit), value_(-1) -{ -} - -bool OffsetPromise::resolved() -{ - return block->start != static_cast(~0); -} - -int64_t OffsetPromise::value() -{ - assertT(c, resolved()); - - if (value_ == -1) { - value_ = block->start + (offset - block->offset) - + padding(block->firstPadding, block->start, block->offset, limit); - } - - return value_; -} -Promise* offsetPromise(Context* c) -{ - return new (c->zone) OffsetPromise( - c, c->lastBlock, c->code.length(), c->lastBlock->lastPadding); -} - -void* resolveOffset(vm::System* s, - uint8_t* instruction, - unsigned instructionSize, - int64_t value) -{ - intptr_t v = reinterpret_cast(value) - instruction - - instructionSize; - - expect(s, vm::fitsInInt32(v)); - - int32_t v4 = v; - memcpy(instruction + instructionSize - 4, &v4, 4); - return instruction + instructionSize; -} - -OffsetListener::OffsetListener(vm::System* s, - uint8_t* instruction, - unsigned instructionSize) - : s(s), instruction(instruction), instructionSize(instructionSize) -{ -} - -bool OffsetListener::resolve(int64_t value, void** location) -{ - void* p = resolveOffset(s, instruction, instructionSize, value); - if (location) - *location = p; - return false; -} - -OffsetTask::OffsetTask(Task* next, - Promise* promise, - Promise* instructionOffset, - unsigned instructionSize) - : Task(next), - promise(promise), - instructionOffset(instructionOffset), - instructionSize(instructionSize) -{ -} - -void OffsetTask::run(Context* c) -{ - if (promise->resolved()) { - resolveOffset(c->s, - c->result + instructionOffset->value(), - instructionSize, - promise->value()); - } else { - new (promise->listen(sizeof(OffsetListener))) OffsetListener( - c->s, c->result + instructionOffset->value(), instructionSize); - } -} - -void appendOffsetTask(Context* c, - Promise* promise, - Promise* instructionOffset, - unsigned instructionSize) -{ - OffsetTask* task = new (c->zone) - OffsetTask(c->tasks, promise, instructionOffset, instructionSize); - - c->tasks = task; -} - -ImmediateListener::ImmediateListener(vm::System* s, - void* dst, - unsigned size, - unsigned offset) - : s(s), dst(dst), size(size), offset(offset) -{ -} - -void copy(vm::System* s, void* dst, int64_t src, unsigned size) -{ - switch (size) { - case 4: { - int32_t v = src; - memcpy(dst, &v, 4); - } break; - - case 8: { - int64_t v = src; - memcpy(dst, &v, 8); - } break; - - default: - abort(s); - } -} - -bool ImmediateListener::resolve(int64_t value, void** location) -{ - copy(s, dst, value, size); - if (location) - *location = static_cast(dst) + offset; - return offset == 0; -} - -ImmediateTask::ImmediateTask(Task* next, - Promise* promise, - Promise* offset, - unsigned size, - unsigned promiseOffset) - : Task(next), - promise(promise), - offset(offset), - size(size), - promiseOffset(promiseOffset) -{ -} - -void ImmediateTask::run(Context* c) -{ - if (promise->resolved()) { - copy(c->s, c->result + offset->value(), promise->value(), size); - } else { - new (promise->listen(sizeof(ImmediateListener))) ImmediateListener( - c->s, c->result + offset->value(), size, promiseOffset); - } -} - -void appendImmediateTask(Context* c, - Promise* promise, - Promise* offset, - unsigned size, - unsigned promiseOffset) -{ - c->tasks = new (c->zone) - ImmediateTask(c->tasks, promise, offset, size, promiseOffset); -} - -ShiftMaskPromise* shiftMaskPromise(Context* c, - Promise* base, - unsigned shift, - int64_t mask) -{ - return new (c->zone) ShiftMaskPromise(base, shift, mask); -} - -} // namespace x86 -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/fixup.h b/sgx-jvm/avian/src/codegen/target/x86/fixup.h deleted file mode 100644 index 68c6d1fe0d..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/fixup.h +++ /dev/null @@ -1,141 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H - -#include - -#include - -namespace vm { -class System; -} - -namespace avian { -namespace codegen { -namespace x86 { - -class Context; -class MyBlock; -class AlignmentPadding; - -ResolvedPromise* resolvedPromise(Context* c, int64_t value); - -class Task { - public: - Task(Task* next) : next(next) - { - } - - virtual void run(Context* c) = 0; - - Task* next; -}; - -class OffsetPromise : public Promise { - public: - OffsetPromise(Context* c, - MyBlock* block, - unsigned offset, - AlignmentPadding* limit); - - virtual bool resolved(); - - virtual int64_t value(); - - Context* c; - MyBlock* block; - unsigned offset; - AlignmentPadding* limit; - int value_; -}; - -Promise* offsetPromise(Context* c); - -void* resolveOffset(vm::System* s, - uint8_t* instruction, - unsigned instructionSize, - int64_t value); - -class OffsetListener : public Promise::Listener { - public: - OffsetListener(vm::System* s, uint8_t* instruction, unsigned instructionSize); - - virtual bool resolve(int64_t value, void** location); - - vm::System* s; - uint8_t* instruction; - unsigned instructionSize; -}; - -class OffsetTask : public Task { - public: - OffsetTask(Task* next, - Promise* promise, - Promise* instructionOffset, - unsigned instructionSize); - - virtual void run(Context* c); - - Promise* promise; - Promise* instructionOffset; - unsigned instructionSize; -}; - -void appendOffsetTask(Context* c, - Promise* promise, - Promise* instructionOffset, - unsigned instructionSize); - -class ImmediateListener : public Promise::Listener { - public: - ImmediateListener(vm::System* s, void* dst, unsigned size, unsigned offset); - - virtual bool resolve(int64_t value, void** location); - - vm::System* s; - void* dst; - unsigned size; - unsigned offset; -}; - -class ImmediateTask : public Task { - public: - ImmediateTask(Task* next, - Promise* promise, - Promise* offset, - unsigned size, - unsigned promiseOffset); - - virtual void run(Context* c); - - Promise* promise; - Promise* offset; - unsigned size; - unsigned promiseOffset; -}; - -void appendImmediateTask(Context* c, - Promise* promise, - Promise* offset, - unsigned size, - unsigned promiseOffset = 0); - -ShiftMaskPromise* shiftMaskPromise(Context* c, - Promise* base, - unsigned shift, - int64_t mask); - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_FIXUP_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/multimethod.cpp b/sgx-jvm/avian/src/codegen/target/x86/multimethod.cpp deleted file mode 100644 index 9eae71bada..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/multimethod.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/common.h" - -#include - -#include - -#include "context.h" -#include "operations.h" - -#include "multimethod.h" -#include "../multimethod.h" - -namespace avian { -namespace codegen { -namespace x86 { - -using namespace util; - -unsigned index(ArchitectureContext*, - lir::BinaryOperation operation, - lir::Operand::Type operand1, - lir::Operand::Type operand2) -{ - return operation + ((lir::BinaryOperationCount - + lir::NonBranchTernaryOperationCount) * (unsigned)operand1) - + ((lir::BinaryOperationCount + lir::NonBranchTernaryOperationCount) - * lir::Operand::TypeCount * (unsigned)operand2); -} - -unsigned index(ArchitectureContext* c UNUSED, - lir::TernaryOperation operation, - lir::Operand::Type operand1, - lir::Operand::Type operand2) -{ - assertT(c, not isBranch(operation)); - - return lir::BinaryOperationCount + operation - + ((lir::BinaryOperationCount + lir::NonBranchTernaryOperationCount) - * (unsigned)operand1) - + ((lir::BinaryOperationCount + lir::NonBranchTernaryOperationCount) - * lir::Operand::TypeCount * (unsigned)operand2); -} - -unsigned branchIndex(ArchitectureContext* c UNUSED, - lir::Operand::Type operand1, - lir::Operand::Type operand2) -{ - return (unsigned)operand1 + (lir::Operand::TypeCount * (unsigned)operand2); -} - -void populateTables(ArchitectureContext* c) -{ - const lir::Operand::Type C = lir::Operand::Type::Constant; - const lir::Operand::Type A = lir::Operand::Type::Address; - const lir::Operand::Type R = lir::Operand::Type::RegisterPair; - const lir::Operand::Type M = lir::Operand::Type::Memory; - - OperationType* zo = c->operations; - UnaryOperationType* uo = c->unaryOperations; - BinaryOperationType* bo = c->binaryOperations; - BranchOperationType* bro = c->branchOperations; - - zo[lir::Return] = return_; - zo[lir::LoadBarrier] = ignore; - zo[lir::StoreStoreBarrier] = ignore; - zo[lir::StoreLoadBarrier] = storeLoadBarrier; - zo[lir::Trap] = trap; - - uo[Multimethod::index(lir::Call, C)] = CAST1(callC); - uo[Multimethod::index(lir::Call, R)] = CAST1(callR); - uo[Multimethod::index(lir::Call, M)] = CAST1(callM); - - uo[Multimethod::index(lir::AlignedCall, C)] = CAST1(alignedCallC); - - uo[Multimethod::index(lir::LongCall, C)] = CAST1(longCallC); - - uo[Multimethod::index(lir::AlignedLongCall, C)] = CAST1(alignedLongCallC); - - uo[Multimethod::index(lir::Jump, R)] = CAST1(jumpR); - uo[Multimethod::index(lir::Jump, C)] = CAST1(jumpC); - uo[Multimethod::index(lir::Jump, M)] = CAST1(jumpM); - - uo[Multimethod::index(lir::AlignedJump, C)] = CAST1(alignedJumpC); - - uo[Multimethod::index(lir::LongJump, C)] = CAST1(longJumpC); - - uo[Multimethod::index(lir::AlignedLongJump, C)] = CAST1(alignedLongJumpC); - - bo[index(c, lir::Negate, R, R)] = CAST2(negateRR); - - bo[index(c, lir::FloatNegate, R, R)] = CAST2(floatNegateRR); - - bo[index(c, lir::Move, R, R)] = CAST2(moveRR); - bo[index(c, lir::Move, C, R)] = CAST2(moveCR); - bo[index(c, lir::Move, M, R)] = CAST2(moveMR); - bo[index(c, lir::Move, R, M)] = CAST2(moveRM); - bo[index(c, lir::Move, C, M)] = CAST2(moveCM); - bo[index(c, lir::Move, A, R)] = CAST2(moveAR); - - bo[index(c, lir::FloatSquareRoot, R, R)] = CAST2(floatSqrtRR); - bo[index(c, lir::FloatSquareRoot, M, R)] = CAST2(floatSqrtMR); - - bo[index(c, lir::MoveZ, R, R)] = CAST2(moveZRR); - bo[index(c, lir::MoveZ, M, R)] = CAST2(moveZMR); - bo[index(c, lir::MoveZ, C, R)] = CAST2(moveZCR); - - bo[index(c, lir::Add, R, R)] = CAST2(addRR); - bo[index(c, lir::Add, C, R)] = CAST2(addCR); - - bo[index(c, lir::Subtract, C, R)] = CAST2(subtractCR); - bo[index(c, lir::Subtract, R, R)] = CAST2(subtractRR); - - bo[index(c, lir::FloatAdd, R, R)] = CAST2(floatAddRR); - bo[index(c, lir::FloatAdd, M, R)] = CAST2(floatAddMR); - - bo[index(c, lir::FloatSubtract, R, R)] = CAST2(floatSubtractRR); - bo[index(c, lir::FloatSubtract, M, R)] = CAST2(floatSubtractMR); - - bo[index(c, lir::And, R, R)] = CAST2(andRR); - bo[index(c, lir::And, C, R)] = CAST2(andCR); - - bo[index(c, lir::Or, R, R)] = CAST2(orRR); - bo[index(c, lir::Or, C, R)] = CAST2(orCR); - - bo[index(c, lir::Xor, R, R)] = CAST2(xorRR); - bo[index(c, lir::Xor, C, R)] = CAST2(xorCR); - - bo[index(c, lir::Multiply, R, R)] = CAST2(multiplyRR); - bo[index(c, lir::Multiply, C, R)] = CAST2(multiplyCR); - - bo[index(c, lir::Divide, R, R)] = CAST2(divideRR); - - bo[index(c, lir::FloatMultiply, R, R)] = CAST2(floatMultiplyRR); - bo[index(c, lir::FloatMultiply, M, R)] = CAST2(floatMultiplyMR); - - bo[index(c, lir::FloatDivide, R, R)] = CAST2(floatDivideRR); - bo[index(c, lir::FloatDivide, M, R)] = CAST2(floatDivideMR); - - bo[index(c, lir::Remainder, R, R)] = CAST2(remainderRR); - - bo[index(c, lir::ShiftLeft, R, R)] = CAST2(shiftLeftRR); - bo[index(c, lir::ShiftLeft, C, R)] = CAST2(shiftLeftCR); - - bo[index(c, lir::ShiftRight, R, R)] = CAST2(shiftRightRR); - bo[index(c, lir::ShiftRight, C, R)] = CAST2(shiftRightCR); - - bo[index(c, lir::UnsignedShiftRight, R, R)] = CAST2(unsignedShiftRightRR); - bo[index(c, lir::UnsignedShiftRight, C, R)] = CAST2(unsignedShiftRightCR); - - bo[index(c, lir::Float2Float, R, R)] = CAST2(float2FloatRR); - bo[index(c, lir::Float2Float, M, R)] = CAST2(float2FloatMR); - - bo[index(c, lir::Float2Int, R, R)] = CAST2(float2IntRR); - bo[index(c, lir::Float2Int, M, R)] = CAST2(float2IntMR); - - bo[index(c, lir::Int2Float, R, R)] = CAST2(int2FloatRR); - bo[index(c, lir::Int2Float, M, R)] = CAST2(int2FloatMR); - - bo[index(c, lir::Absolute, R, R)] = CAST2(absoluteRR); - bo[index(c, lir::FloatAbsolute, R, R)] = CAST2(floatAbsoluteRR); - - bro[branchIndex(c, R, R)] = CAST_BRANCH(branchRR); - bro[branchIndex(c, C, R)] = CAST_BRANCH(branchCR); - bro[branchIndex(c, C, M)] = CAST_BRANCH(branchCM); - bro[branchIndex(c, R, M)] = CAST_BRANCH(branchRM); -} - -} // namespace x86 -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/multimethod.h b/sgx-jvm/avian/src/codegen/target/x86/multimethod.h deleted file mode 100644 index 46b62300c5..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/multimethod.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H - -#include "avian/common.h" - -#include - -namespace avian { -namespace codegen { -namespace x86 { - -class ArchitectureContext; - -unsigned index(ArchitectureContext*, - lir::BinaryOperation operation, - lir::Operand::Type operand1, - lir::Operand::Type operand2); - -unsigned index(ArchitectureContext* c UNUSED, - lir::TernaryOperation operation, - lir::Operand::Type operand1, - lir::Operand::Type operand2); - -unsigned branchIndex(ArchitectureContext* c UNUSED, - lir::Operand::Type operand1, - lir::Operand::Type operand2); - -void populateTables(ArchitectureContext* c); - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_MULTIMETHOD_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/operations.cpp b/sgx-jvm/avian/src/codegen/target/x86/operations.cpp deleted file mode 100644 index d9cbde1c04..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/operations.cpp +++ /dev/null @@ -1,1759 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/target.h" -#include "avian/alloc-vector.h" -#include "avian/util/allocator.h" -#include "avian/zone.h" - -#include - -#include -#include - -#include "context.h" -#include "encode.h" -#include "registers.h" -#include "detect.h" -#include "operations.h" -#include "padding.h" -#include "fixup.h" - -using namespace avian::util; - -namespace avian { -namespace codegen { -namespace x86 { - -void return_(Context* c) -{ - opcode(c, 0xc3); -} - -void trap(Context* c) -{ - opcode(c, 0xcc); -} - -void ignore(Context*) -{ -} - -void storeLoadBarrier(Context* c) -{ - if (useSSE(c->ac)) { - // mfence: - c->code.append(0x0f); - c->code.append(0xae); - c->code.append(0xf0); - } else { - // lock addq $0x0,(%rsp): - c->code.append(0xf0); - if (vm::TargetBytesPerWord == 8) { - c->code.append(0x48); - } - c->code.append(0x83); - c->code.append(0x04); - c->code.append(0x24); - c->code.append(0x00); - } -} - -void callC(Context* c, unsigned size UNUSED, lir::Constant* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - unconditional(c, 0xe8, a); -} - -void longCallC(Context* c, unsigned size, lir::Constant* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - if (vm::TargetBytesPerWord == 8) { - lir::RegisterPair r(LongJumpRegister); - moveCR2(c, size, a, size, &r, 11); - callR(c, size, &r); - } else { - callC(c, size, a); - } -} - -void jumpR(Context* c, unsigned size UNUSED, lir::RegisterPair* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - maybeRex(c, 4, a); - opcode(c, 0xff, 0xe0 + regCode(a)); -} - -void jumpC(Context* c, unsigned size UNUSED, lir::Constant* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - unconditional(c, 0xe9, a); -} - -void jumpM(Context* c, unsigned size UNUSED, lir::Memory* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - maybeRex(c, 4, a); - opcode(c, 0xff); - modrmSibImm(c, rsp, a->scale, a->index, a->base, a->offset); -} - -void longJumpC(Context* c, unsigned size, lir::Constant* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - if (vm::TargetBytesPerWord == 8) { - lir::RegisterPair r(LongJumpRegister); - moveCR2(c, size, a, size, &r, 11); - jumpR(c, size, &r); - } else { - jumpC(c, size, a); - } -} - -void callR(Context* c, unsigned size UNUSED, lir::RegisterPair* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - // maybeRex.W has no meaning here so we disable it - maybeRex(c, 4, a); - opcode(c, 0xff, 0xd0 + regCode(a)); -} - -void callM(Context* c, unsigned size UNUSED, lir::Memory* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - maybeRex(c, 4, a); - opcode(c, 0xff); - modrmSibImm(c, rdx, a->scale, a->index, a->base, a->offset); -} - -void alignedCallC(Context* c, unsigned size, lir::Constant* a) -{ - new (c->zone) AlignmentPadding(c, 1, 4); - callC(c, size, a); -} - -void alignedLongCallC(Context* c, unsigned size, lir::Constant* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - if (vm::TargetBytesPerWord == 8) { - new (c->zone) AlignmentPadding(c, 2, 8); - longCallC(c, size, a); - } else { - alignedCallC(c, size, a); - } -} - -void alignedJumpC(Context* c, unsigned size, lir::Constant* a) -{ - new (c->zone) AlignmentPadding(c, 1, 4); - jumpC(c, size, a); -} - -void alignedLongJumpC(Context* c, unsigned size, lir::Constant* a) -{ - assertT(c, size == vm::TargetBytesPerWord); - - if (vm::TargetBytesPerWord == 8) { - new (c->zone) AlignmentPadding(c, 2, 8); - longJumpC(c, size, a); - } else { - alignedJumpC(c, size, a); - } -} - -void pushR(Context* c, unsigned size, lir::RegisterPair* a) -{ - if (vm::TargetBytesPerWord == 4 and size == 8) { - lir::RegisterPair ah(a->high); - - pushR(c, 4, &ah); - pushR(c, 4, a); - } else { - maybeRex(c, 4, a); - opcode(c, 0x50 + regCode(a)); - } -} - -void popR(Context* c, unsigned size, lir::RegisterPair* a) -{ - if (vm::TargetBytesPerWord == 4 and size == 8) { - lir::RegisterPair ah(a->high); - - popR(c, 4, a); - popR(c, 4, &ah); - } else { - maybeRex(c, 4, a); - opcode(c, 0x58 + regCode(a)); - if (vm::TargetBytesPerWord == 8 and size == 4) { - moveRR(c, 4, a, 8, a); - } - } -} - -void negateR(Context* c, unsigned size, lir::RegisterPair* a) -{ - if (vm::TargetBytesPerWord == 4 and size == 8) { - assertT(c, a->low == rax and a->high == rdx); - - ResolvedPromise zeroPromise(0); - lir::Constant zero(&zeroPromise); - - lir::RegisterPair ah(a->high); - - negateR(c, 4, a); - addCarryCR(c, 4, &zero, &ah); - negateR(c, 4, &ah); - } else { - maybeRex(c, size, a); - opcode(c, 0xf7, 0xd8 + regCode(a)); - } -} - -void negateRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b UNUSED) -{ - assertT(c, aSize == bSize); - - negateR(c, aSize, a); -} - -void moveCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - if (isFloatReg(b)) { - sseMoveCR(c, aSize, a, bSize, b); - } else { - moveCR2(c, aSize, a, bSize, b, 0); - } -} - -void moveZCR(Context* c, - unsigned aSize UNUSED, - lir::Constant* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, not isFloatReg(b)); - assertT(c, aSize == 2); - assertT(c, bSize == vm::TargetBytesPerWord); - assertT(c, a->value->resolved()); - - maybeRex(c, vm::TargetBytesPerWord, b); - opcode(c, 0xb8 + regCode(b)); - c->code.appendTargetAddress(static_cast(a->value->value())); -} - -void swapRR(Context* c, - unsigned aSize UNUSED, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - assertT(c, aSize == vm::TargetBytesPerWord); - - alwaysRex(c, aSize, a, b); - opcode(c, 0x87); - modrm(c, 0xc0, b, a); -} - -void moveRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - UNUSED unsigned bSize, - lir::RegisterPair* b) -{ - if (isFloatReg(a) or isFloatReg(b)) { - sseMoveRR(c, aSize, a, bSize, b); - return; - } - - if (vm::TargetBytesPerWord == 4 and aSize == 8 and bSize == 8) { - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - if (a->high == b->low) { - if (a->low == b->high) { - swapRR(c, 4, a, 4, b); - } else { - moveRR(c, 4, &ah, 4, &bh); - moveRR(c, 4, a, 4, b); - } - } else { - moveRR(c, 4, a, 4, b); - moveRR(c, 4, &ah, 4, &bh); - } - } else { - switch (aSize) { - case 1: - if (vm::TargetBytesPerWord == 4 and a->low > rbx) { - assertT(c, b->low <= rbx); - - moveRR(c, vm::TargetBytesPerWord, a, vm::TargetBytesPerWord, b); - moveRR(c, 1, b, vm::TargetBytesPerWord, b); - } else { - alwaysRex(c, aSize, b, a); - opcode(c, 0x0f, 0xbe); - modrm(c, 0xc0, a, b); - } - break; - - case 2: - alwaysRex(c, aSize, b, a); - opcode(c, 0x0f, 0xbf); - modrm(c, 0xc0, a, b); - break; - - case 4: - if (bSize == 8) { - if (vm::TargetBytesPerWord == 8) { - alwaysRex(c, bSize, b, a); - opcode(c, 0x63); - modrm(c, 0xc0, a, b); - } else { - if (a->low == rax and b->low == rax and b->high == rdx) { - opcode(c, 0x99); // cdq - } else { - assertT(c, b->low == rax and b->high == rdx); - - moveRR(c, 4, a, 4, b); - moveRR(c, 4, b, 8, b); - } - } - } else { - if (a->low != b->low) { - alwaysRex(c, aSize, a, b); - opcode(c, 0x89); - modrm(c, 0xc0, b, a); - } - } - break; - - case 8: - if (a->low != b->low) { - maybeRex(c, aSize, a, b); - opcode(c, 0x89); - modrm(c, 0xc0, b, a); - } - break; - } - } -} - -void moveMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b) -{ - if (isFloatReg(b)) { - sseMoveMR(c, aSize, a, bSize, b); - return; - } - - switch (aSize) { - case 1: - maybeRex(c, bSize, b, a); - opcode(c, 0x0f, 0xbe); - modrmSibImm(c, b, a); - break; - - case 2: - maybeRex(c, bSize, b, a); - opcode(c, 0x0f, 0xbf); - modrmSibImm(c, b, a); - break; - - case 4: - if (vm::TargetBytesPerWord == 8) { - maybeRex(c, bSize, b, a); - opcode(c, 0x63); - modrmSibImm(c, b, a); - } else { - if (bSize == 8) { - assertT(c, b->low == rax and b->high == rdx); - - moveMR(c, 4, a, 4, b); - moveRR(c, 4, b, 8, b); - } else { - maybeRex(c, bSize, b, a); - opcode(c, 0x8b); - modrmSibImm(c, b, a); - } - } - break; - - case 8: - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - lir::Memory ah(a->base, a->offset + 4, a->index, a->scale); - lir::RegisterPair bh(b->high); - - moveMR(c, 4, a, 4, b); - moveMR(c, 4, &ah, 4, &bh); - } else { - maybeRex(c, bSize, b, a); - opcode(c, 0x8b); - modrmSibImm(c, b, a); - } - break; - - default: - abort(c); - } -} - -void moveRM(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::Memory* b) -{ - assertT(c, aSize == bSize); - - if (isFloatReg(a)) { - sseMoveRM(c, aSize, a, bSize, b); - return; - } - - switch (aSize) { - case 1: - maybeRex(c, bSize, a, b); - opcode(c, 0x88); - modrmSibImm(c, a, b); - break; - - case 2: - opcode(c, 0x66); - maybeRex(c, bSize, a, b); - opcode(c, 0x89); - modrmSibImm(c, a, b); - break; - - case 4: - if (vm::TargetBytesPerWord == 8) { - maybeRex(c, bSize, a, b); - opcode(c, 0x89); - modrmSibImm(c, a, b); - break; - } else { - opcode(c, 0x89); - modrmSibImm(c, a, b); - } - break; - - case 8: - if (vm::TargetBytesPerWord == 8) { - maybeRex(c, bSize, a, b); - opcode(c, 0x89); - modrmSibImm(c, a, b); - } else { - lir::RegisterPair ah(a->high); - lir::Memory bh(b->base, b->offset + 4, b->index, b->scale); - - moveRM(c, 4, a, 4, b); - moveRM(c, 4, &ah, 4, &bh); - } - break; - - default: - abort(c); - } -} - -void moveAR(Context* c, - unsigned aSize, - lir::Address* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, vm::TargetBytesPerWord == 8 or (aSize == 4 and bSize == 4)); - - lir::Constant constant(a->address); - lir::Memory memory(b->low, 0, NoRegister, 0); - - moveCR(c, aSize, &constant, bSize, b); - moveMR(c, bSize, &memory, bSize, b); -} - -void moveCM(Context* c, - unsigned aSize UNUSED, - lir::Constant* a, - unsigned bSize, - lir::Memory* b) -{ - switch (bSize) { - case 1: - maybeRex(c, bSize, b); - opcode(c, 0xc6); - modrmSibImm(c, rax, b->scale, b->index, b->base, b->offset); - c->code.append(a->value->value()); - break; - - case 2: - opcode(c, 0x66); - maybeRex(c, bSize, b); - opcode(c, 0xc7); - modrmSibImm(c, rax, b->scale, b->index, b->base, b->offset); - c->code.append2(a->value->value()); - break; - - case 4: - maybeRex(c, bSize, b); - opcode(c, 0xc7); - modrmSibImm(c, rax, b->scale, b->index, b->base, b->offset); - if (a->value->resolved()) { - c->code.append4(a->value->value()); - } else { - appendImmediateTask(c, a->value, offsetPromise(c), 4); - c->code.append4(0); - } - break; - - case 8: { - if (vm::TargetBytesPerWord == 8) { - if (a->value->resolved() and vm::fitsInInt32(a->value->value())) { - maybeRex(c, bSize, b); - opcode(c, 0xc7); - modrmSibImm(c, rax, b->scale, b->index, b->base, b->offset); - c->code.append4(a->value->value()); - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, 8, a, 8, &tmp); - moveRM(c, 8, &tmp, 8, b); - c->client->releaseTemporary(tmp.low); - } - } else { - lir::Constant ah(shiftMaskPromise(c, a->value, 32, 0xFFFFFFFF)); - lir::Constant al(shiftMaskPromise(c, a->value, 0, 0xFFFFFFFF)); - - lir::Memory bh(b->base, b->offset + 4, b->index, b->scale); - - moveCM(c, 4, &al, 4, b); - moveCM(c, 4, &ah, 4, &bh); - } - } break; - - default: - abort(c); - } -} - -void moveZRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - switch (aSize) { - case 2: - alwaysRex(c, aSize, b, a); - opcode(c, 0x0f, 0xb7); - modrm(c, 0xc0, a, b); - break; - - default: - abort(c); - } -} - -void moveZMR(Context* c, - unsigned aSize UNUSED, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, bSize == vm::TargetBytesPerWord); - assertT(c, aSize == 2); - - maybeRex(c, bSize, b, a); - opcode(c, 0x0f, 0xb7); - modrmSibImm(c, b->low, a->scale, a->index, a->base, a->offset); -} - -void addCarryRR(Context* c, unsigned size, lir::RegisterPair* a, lir::RegisterPair* b) -{ - assertT(c, vm::TargetBytesPerWord == 8 or size == 4); - - maybeRex(c, size, a, b); - opcode(c, 0x11); - modrm(c, 0xc0, b, a); -} - -void addRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - addRR(c, 4, a, 4, b); - addCarryRR(c, 4, &ah, &bh); - } else { - maybeRex(c, aSize, a, b); - opcode(c, 0x01); - modrm(c, 0xc0, b, a); - } -} - -void addCarryCR(Context* c, unsigned size, lir::Constant* a, lir::RegisterPair* b) -{ - int64_t v = a->value->value(); - maybeRex(c, size, b); - if (vm::fitsInInt8(v)) { - opcode(c, 0x83, 0xd0 + regCode(b)); - c->code.append(v); - } else { - opcode(c, 0x81, 0xd0 + regCode(b)); - c->code.append4(v); - } -} - -void addCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - int64_t v = a->value->value(); - if (v) { - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - ResolvedPromise high((v >> 32) & 0xFFFFFFFF); - lir::Constant ah(&high); - - ResolvedPromise low(v & 0xFFFFFFFF); - lir::Constant al(&low); - - lir::RegisterPair bh(b->high); - - addCR(c, 4, &al, 4, b); - addCarryCR(c, 4, &ah, &bh); - } else { - if (vm::fitsInInt32(v)) { - maybeRex(c, aSize, b); - if (vm::fitsInInt8(v)) { - opcode(c, 0x83, 0xc0 + regCode(b)); - c->code.append(v); - } else { - opcode(c, 0x81, 0xc0 + regCode(b)); - c->code.append4(v); - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, aSize, a, aSize, &tmp); - addRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - } - } - } -} - -void subtractBorrowCR(Context* c, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b) -{ - assertT(c, vm::TargetBytesPerWord == 8 or size == 4); - - int64_t v = a->value->value(); - if (vm::fitsInInt8(v)) { - opcode(c, 0x83, 0xd8 + regCode(b)); - c->code.append(v); - } else { - opcode(c, 0x81, 0xd8 + regCode(b)); - c->code.append4(v); - } -} - -void subtractCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - int64_t v = a->value->value(); - if (v) { - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - ResolvedPromise high((v >> 32) & 0xFFFFFFFF); - lir::Constant ah(&high); - - ResolvedPromise low(v & 0xFFFFFFFF); - lir::Constant al(&low); - - lir::RegisterPair bh(b->high); - - subtractCR(c, 4, &al, 4, b); - subtractBorrowCR(c, 4, &ah, &bh); - } else { - if (vm::fitsInInt32(v)) { - maybeRex(c, aSize, b); - if (vm::fitsInInt8(v)) { - opcode(c, 0x83, 0xe8 + regCode(b)); - c->code.append(v); - } else { - opcode(c, 0x81, 0xe8 + regCode(b)); - c->code.append4(v); - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, aSize, a, aSize, &tmp); - subtractRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - } - } - } -} - -void subtractBorrowRR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b) -{ - assertT(c, vm::TargetBytesPerWord == 8 or size == 4); - - maybeRex(c, size, a, b); - opcode(c, 0x19); - modrm(c, 0xc0, b, a); -} - -void subtractRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - subtractRR(c, 4, a, 4, b); - subtractBorrowRR(c, 4, &ah, &bh); - } else { - maybeRex(c, aSize, a, b); - opcode(c, 0x29); - modrm(c, 0xc0, b, a); - } -} - -void andRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - andRR(c, 4, a, 4, b); - andRR(c, 4, &ah, 4, &bh); - } else { - maybeRex(c, aSize, a, b); - opcode(c, 0x21); - modrm(c, 0xc0, b, a); - } -} - -void andCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - int64_t v = a->value->value(); - - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - ResolvedPromise high((v >> 32) & 0xFFFFFFFF); - lir::Constant ah(&high); - - ResolvedPromise low(v & 0xFFFFFFFF); - lir::Constant al(&low); - - lir::RegisterPair bh(b->high); - - andCR(c, 4, &al, 4, b); - andCR(c, 4, &ah, 4, &bh); - } else { - if (vm::fitsInInt32(v)) { - maybeRex(c, aSize, b); - if (vm::fitsInInt8(v)) { - opcode(c, 0x83, 0xe0 + regCode(b)); - c->code.append(v); - } else { - opcode(c, 0x81, 0xe0 + regCode(b)); - c->code.append4(v); - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, aSize, a, aSize, &tmp); - andRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - } - } -} - -void orRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - orRR(c, 4, a, 4, b); - orRR(c, 4, &ah, 4, &bh); - } else { - maybeRex(c, aSize, a, b); - opcode(c, 0x09); - modrm(c, 0xc0, b, a); - } -} - -void orCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - int64_t v = a->value->value(); - if (v) { - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - ResolvedPromise high((v >> 32) & 0xFFFFFFFF); - lir::Constant ah(&high); - - ResolvedPromise low(v & 0xFFFFFFFF); - lir::Constant al(&low); - - lir::RegisterPair bh(b->high); - - orCR(c, 4, &al, 4, b); - orCR(c, 4, &ah, 4, &bh); - } else { - if (vm::fitsInInt32(v)) { - maybeRex(c, aSize, b); - if (vm::fitsInInt8(v)) { - opcode(c, 0x83, 0xc8 + regCode(b)); - c->code.append(v); - } else { - opcode(c, 0x81, 0xc8 + regCode(b)); - c->code.append4(v); - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, aSize, a, aSize, &tmp); - orRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - } - } - } -} - -void xorRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - xorRR(c, 4, a, 4, b); - xorRR(c, 4, &ah, 4, &bh); - } else { - maybeRex(c, aSize, a, b); - opcode(c, 0x31); - modrm(c, 0xc0, b, a); - } -} - -void xorCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - int64_t v = a->value->value(); - if (v) { - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - ResolvedPromise high((v >> 32) & 0xFFFFFFFF); - lir::Constant ah(&high); - - ResolvedPromise low(v & 0xFFFFFFFF); - lir::Constant al(&low); - - lir::RegisterPair bh(b->high); - - xorCR(c, 4, &al, 4, b); - xorCR(c, 4, &ah, 4, &bh); - } else { - if (vm::fitsInInt32(v)) { - maybeRex(c, aSize, b); - if (vm::fitsInInt8(v)) { - opcode(c, 0x83, 0xf0 + regCode(b)); - c->code.append(v); - } else { - opcode(c, 0x81, 0xf0 + regCode(b)); - c->code.append4(v); - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, aSize, a, aSize, &tmp); - xorRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - } - } - } -} - -void multiplyRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - assertT(c, b->high == rdx); - assertT(c, b->low != rax); - assertT(c, a->low != rax); - assertT(c, a->high != rax); - - c->client->save(rax); - - lir::RegisterPair axdx(rax, rdx); - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - lir::RegisterPair tmp(NoRegister); - lir::RegisterPair* scratch; - if (a->low == b->low) { - tmp.low = c->client->acquireTemporary(GeneralRegisterMask.excluding(rax)); - scratch = &tmp; - moveRR(c, 4, b, 4, scratch); - } else { - scratch = b; - } - - moveRR(c, 4, b, 4, &axdx); - multiplyRR(c, 4, &ah, 4, scratch); - multiplyRR(c, 4, a, 4, &bh); - addRR(c, 4, &bh, 4, scratch); - - // mul a->low,%eax%edx - opcode(c, 0xf7, 0xe0 + a->low.index()); - - addRR(c, 4, scratch, 4, &bh); - moveRR(c, 4, &axdx, 4, b); - - if (tmp.low != NoRegister) { - c->client->releaseTemporary(tmp.low); - } - } else { - maybeRex(c, aSize, b, a); - opcode(c, 0x0f, 0xaf); - modrm(c, 0xc0, a, b); - } -} - -void compareRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - assertT(c, aSize <= vm::TargetBytesPerWord); - - maybeRex(c, aSize, a, b); - opcode(c, 0x39); - modrm(c, 0xc0, b, a); -} - -void compareCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - assertT(c, vm::TargetBytesPerWord == 8 or aSize == 4); - - if (a->value->resolved() and vm::fitsInInt32(a->value->value())) { - int64_t v = a->value->value(); - maybeRex(c, aSize, b); - if (vm::fitsInInt8(v)) { - opcode(c, 0x83, 0xf8 + regCode(b)); - c->code.append(v); - } else { - opcode(c, 0x81, 0xf8 + regCode(b)); - c->code.append4(v); - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, aSize, a, aSize, &tmp); - compareRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - } -} - -void compareRM(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::Memory* b) -{ - assertT(c, aSize == bSize); - assertT(c, vm::TargetBytesPerWord == 8 or aSize == 4); - - if (vm::TargetBytesPerWord == 8 and aSize == 4) { - moveRR(c, 4, a, 8, a); - } - maybeRex(c, bSize, a, b); - opcode(c, 0x39); - modrmSibImm(c, a, b); -} - -void compareCM(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::Memory* b) -{ - assertT(c, aSize == bSize); - assertT(c, vm::TargetBytesPerWord == 8 or aSize == 4); - - if (a->value->resolved()) { - int64_t v = a->value->value(); - maybeRex(c, aSize, b); - opcode(c, vm::fitsInInt8(v) ? 0x83 : 0x81); - modrmSibImm(c, rdi, b->scale, b->index, b->base, b->offset); - - if (vm::fitsInInt8(v)) { - c->code.append(v); - } else if (vm::fitsInInt32(v)) { - c->code.append4(v); - } else { - abort(c); - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, aSize, a, bSize, &tmp); - compareRM(c, bSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - } -} - -void compareFloatRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - if (aSize == 8) { - opcode(c, 0x66); - } - maybeRex(c, 4, a, b); - opcode(c, 0x0f, 0x2e); - modrm(c, 0xc0, a, b); -} - -void branchLong(Context* c, - lir::TernaryOperation op, - lir::Operand* al, - lir::Operand* ah, - lir::Operand* bl, - lir::Operand* bh, - lir::Constant* target, - BinaryOperationType compare) -{ - compare(c, 4, ah, 4, bh); - - unsigned next = 0; - - switch (op) { - case lir::JumpIfEqual: - opcode(c, 0x75); // jne - next = c->code.length(); - c->code.append(0); - - compare(c, 4, al, 4, bl); - conditional(c, 0x84, target); // je - break; - - case lir::JumpIfNotEqual: - conditional(c, 0x85, target); // jne - - compare(c, 4, al, 4, bl); - conditional(c, 0x85, target); // jne - break; - - case lir::JumpIfLess: - conditional(c, 0x8c, target); // jl - - opcode(c, 0x7f); // jg - next = c->code.length(); - c->code.append(0); - - compare(c, 4, al, 4, bl); - conditional(c, 0x82, target); // jb - break; - - case lir::JumpIfGreater: - conditional(c, 0x8f, target); // jg - - opcode(c, 0x7c); // jl - next = c->code.length(); - c->code.append(0); - - compare(c, 4, al, 4, bl); - conditional(c, 0x87, target); // ja - break; - - case lir::JumpIfLessOrEqual: - conditional(c, 0x8c, target); // jl - - opcode(c, 0x7f); // jg - next = c->code.length(); - c->code.append(0); - - compare(c, 4, al, 4, bl); - conditional(c, 0x86, target); // jbe - break; - - case lir::JumpIfGreaterOrEqual: - conditional(c, 0x8f, target); // jg - - opcode(c, 0x7c); // jl - next = c->code.length(); - c->code.append(0); - - compare(c, 4, al, 4, bl); - conditional(c, 0x83, target); // jae - break; - - default: - abort(c); - } - - if (next) { - int8_t nextOffset = c->code.length() - next - 1; - c->code.set(next, &nextOffset, 1); - } -} - -void branchRR(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::Constant* target) -{ - if (isFloatBranch(op)) { - compareFloatRR(c, size, a, size, b); - branchFloat(c, op, target); - } else if (size > vm::TargetBytesPerWord) { - lir::RegisterPair ah(a->high); - lir::RegisterPair bh(b->high); - - branchLong(c, op, a, &ah, b, &bh, target, CAST2(compareRR)); - } else { - compareRR(c, size, a, size, b); - branch(c, op, target); - } -} - -void branchCR(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::Constant* target) -{ - assertT(c, not isFloatBranch(op)); - - if (size > vm::TargetBytesPerWord) { - int64_t v = a->value->value(); - - ResolvedPromise low(v & ~static_cast(0)); - lir::Constant al(&low); - - ResolvedPromise high((v >> 32) & ~static_cast(0)); - lir::Constant ah(&high); - - lir::RegisterPair bh(b->high); - - branchLong(c, op, &al, &ah, b, &bh, target, CAST2(compareCR)); - } else { - compareCR(c, size, a, size, b); - branch(c, op, target); - } -} - -void branchRM(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::Memory* b, - lir::Constant* target) -{ - assertT(c, not isFloatBranch(op)); - assertT(c, size <= vm::TargetBytesPerWord); - - compareRM(c, size, a, size, b); - branch(c, op, target); -} - -void branchCM(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::Memory* b, - lir::Constant* target) -{ - assertT(c, not isFloatBranch(op)); - assertT(c, size <= vm::TargetBytesPerWord); - - compareCM(c, size, a, size, b); - branch(c, op, target); -} - -void multiplyCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - if (vm::TargetBytesPerWord == 4 and aSize == 8) { - const RegisterMask mask = GeneralRegisterMask.excluding(rax).excluding(rdx); - lir::RegisterPair tmp(c->client->acquireTemporary(mask), - c->client->acquireTemporary(mask)); - - moveCR(c, aSize, a, aSize, &tmp); - multiplyRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - c->client->releaseTemporary(tmp.high); - } else { - int64_t v = a->value->value(); - if (v != 1) { - if (vm::fitsInInt32(v)) { - maybeRex(c, bSize, b, b); - if (vm::fitsInInt8(v)) { - opcode(c, 0x6b); - modrm(c, 0xc0, b, b); - c->code.append(v); - } else { - opcode(c, 0x69); - modrm(c, 0xc0, b, b); - c->code.append4(v); - } - } else { - lir::RegisterPair tmp(c->client->acquireTemporary(GeneralRegisterMask)); - moveCR(c, aSize, a, aSize, &tmp); - multiplyRR(c, aSize, &tmp, bSize, b); - c->client->releaseTemporary(tmp.low); - } - } - } -} - -void divideRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b UNUSED) -{ - assertT(c, aSize == bSize); - - assertT(c, b->low == rax); - assertT(c, a->low != rdx); - - c->client->save(rdx); - - maybeRex(c, aSize, a, b); - opcode(c, 0x99); // cdq - maybeRex(c, aSize, b, a); - opcode(c, 0xf7, 0xf8 + regCode(a)); -} - -void remainderRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, aSize == bSize); - - assertT(c, b->low == rax); - assertT(c, a->low != rdx); - - c->client->save(rdx); - - maybeRex(c, aSize, a, b); - opcode(c, 0x99); // cdq - maybeRex(c, aSize, b, a); - opcode(c, 0xf7, 0xf8 + regCode(a)); - - lir::RegisterPair dx(rdx); - moveRR(c, vm::TargetBytesPerWord, &dx, vm::TargetBytesPerWord, b); -} - -void doShift(Context* c, - UNUSED void (*shift)(Context*, - unsigned, - lir::RegisterPair*, - unsigned, - lir::RegisterPair*), - int type, - UNUSED unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - int64_t v = a->value->value(); - - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - c->client->save(rcx); - - lir::RegisterPair cx(rcx); - ResolvedPromise promise(v & 0x3F); - lir::Constant masked(&promise); - moveCR(c, 4, &masked, 4, &cx); - shift(c, aSize, &cx, bSize, b); - } else { - maybeRex(c, bSize, b); - if (v == 1) { - opcode(c, 0xd1, type + regCode(b)); - } else if (vm::fitsInInt8(v)) { - opcode(c, 0xc1, type + regCode(b)); - c->code.append(v); - } else { - abort(c); - } - } -} - -void shiftLeftRR(Context* c, - UNUSED unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b) -{ - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - lir::RegisterPair cx(rcx); - if (a->low != rcx) { - c->client->save(rcx); - ResolvedPromise promise(0x3F); - lir::Constant mask(&promise); - moveRR(c, 4, a, 4, &cx); - andCR(c, 4, &mask, 4, &cx); - } - - // shld - opcode(c, 0x0f, 0xa5); - modrm(c, 0xc0, b->high, b->low); - - // shl - opcode(c, 0xd3, 0xe0 + b->low.index()); - - ResolvedPromise promise(32); - lir::Constant constant(&promise); - compareCR( - c, vm::TargetBytesPerWord, &constant, vm::TargetBytesPerWord, &cx); - - opcode(c, 0x7c); // jl - c->code.append(2 + 2); - - lir::RegisterPair bh(b->high); - moveRR(c, 4, b, 4, &bh); // 2 bytes - xorRR(c, 4, b, 4, b); // 2 bytes - } else { - assertT(c, a->low == rcx); - - maybeRex(c, bSize, a, b); - opcode(c, 0xd3, 0xe0 + regCode(b)); - } -} - -void shiftLeftCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - doShift(c, shiftLeftRR, 0xe0, aSize, a, bSize, b); -} - -void shiftRightRR(Context* c, - UNUSED unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b) -{ - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - lir::RegisterPair cx(rcx); - if (a->low != rcx) { - c->client->save(rcx); - ResolvedPromise promise(0x3F); - lir::Constant mask(&promise); - moveRR(c, 4, a, 4, &cx); - andCR(c, 4, &mask, 4, &cx); - } - - // shrd - opcode(c, 0x0f, 0xad); - modrm(c, 0xc0, b->low, b->high); - - // sar - opcode(c, 0xd3, 0xf8 + b->high.index()); - - ResolvedPromise promise(32); - lir::Constant constant(&promise); - compareCR( - c, vm::TargetBytesPerWord, &constant, vm::TargetBytesPerWord, &cx); - - opcode(c, 0x7c); // jl - c->code.append(2 + 3); - - lir::RegisterPair bh(b->high); - moveRR(c, 4, &bh, 4, b); // 2 bytes - - // sar 31,high - opcode(c, 0xc1, 0xf8 + b->high.index()); - c->code.append(31); - } else { - assertT(c, a->low == rcx); - - maybeRex(c, bSize, a, b); - opcode(c, 0xd3, 0xf8 + regCode(b)); - } -} - -void shiftRightCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - doShift(c, shiftRightRR, 0xf8, aSize, a, bSize, b); -} - -void unsignedShiftRightRR(Context* c, - UNUSED unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b) -{ - if (vm::TargetBytesPerWord == 4 and bSize == 8) { - lir::RegisterPair cx(rcx); - if (a->low != rcx) { - c->client->save(rcx); - ResolvedPromise promise(0x3F); - lir::Constant mask(&promise); - moveRR(c, 4, a, 4, &cx); - andCR(c, 4, &mask, 4, &cx); - } - - // shrd - opcode(c, 0x0f, 0xad); - modrm(c, 0xc0, b->low, b->high); - - // shr - opcode(c, 0xd3, 0xe8 + b->high.index()); - - ResolvedPromise promise(32); - lir::Constant constant(&promise); - compareCR( - c, vm::TargetBytesPerWord, &constant, vm::TargetBytesPerWord, &cx); - - opcode(c, 0x7c); // jl - c->code.append(2 + 2); - - lir::RegisterPair bh(b->high); - moveRR(c, 4, &bh, 4, b); // 2 bytes - xorRR(c, 4, &bh, 4, &bh); // 2 bytes - } else { - assertT(c, a->low == rcx); - - maybeRex(c, bSize, a, b); - opcode(c, 0xd3, 0xe8 + regCode(b)); - } -} - -void unsignedShiftRightCR(Context* c, - unsigned aSize UNUSED, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b) -{ - doShift(c, unsignedShiftRightRR, 0xe8, aSize, a, bSize, b); -} - -void floatSqrtRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatRegOp(c, aSize, a, 4, b, 0x51); -} - -void floatSqrtMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatMemOp(c, aSize, a, 4, b, 0x51); -} - -void floatAddRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatRegOp(c, aSize, a, 4, b, 0x58); -} - -void floatAddMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatMemOp(c, aSize, a, 4, b, 0x58); -} - -void floatSubtractRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatRegOp(c, aSize, a, 4, b, 0x5c); -} - -void floatSubtractMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatMemOp(c, aSize, a, 4, b, 0x5c); -} - -void floatMultiplyRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatRegOp(c, aSize, a, 4, b, 0x59); -} - -void floatMultiplyMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatMemOp(c, aSize, a, 4, b, 0x59); -} - -void floatDivideRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatRegOp(c, aSize, a, 4, b, 0x5e); -} - -void floatDivideMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatMemOp(c, aSize, a, 4, b, 0x5e); -} - -void float2FloatRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatRegOp(c, aSize, a, 4, b, 0x5a); -} - -void float2FloatMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - floatMemOp(c, aSize, a, 4, b, 0x5a); -} - -void float2IntRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b) -{ - assertT(c, not isFloatReg(b)); - floatRegOp(c, aSize, a, bSize, b, 0x2c); -} - -void float2IntMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b) -{ - floatMemOp(c, aSize, a, bSize, b, 0x2c); -} - -void int2FloatRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b) -{ - floatRegOp(c, bSize, a, aSize, b, 0x2a); -} - -void int2FloatMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b) -{ - floatMemOp(c, bSize, a, aSize, b, 0x2a); -} - -void floatNegateRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, isFloatReg(a) and isFloatReg(b)); - // unlike most of the other floating point code, this does NOT - // support doubles: - assertT(c, aSize == 4); - ResolvedPromise pcon(0x80000000); - lir::Constant con(&pcon); - if (a->low == b->low) { - lir::RegisterPair tmp(c->client->acquireTemporary(FloatRegisterMask)); - moveCR(c, 4, &con, 4, &tmp); - maybeRex(c, 4, a, &tmp); - opcode(c, 0x0f, 0x57); - modrm(c, 0xc0, &tmp, a); - c->client->releaseTemporary(tmp.low); - } else { - moveCR(c, 4, &con, 4, b); - if (aSize == 8) - opcode(c, 0x66); - maybeRex(c, 4, a, b); - opcode(c, 0x0f, 0x57); - modrm(c, 0xc0, a, b); - } -} - -void floatAbsoluteRR(Context* c, - unsigned aSize UNUSED, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b) -{ - assertT(c, isFloatReg(a) and isFloatReg(b)); - // unlike most of the other floating point code, this does NOT - // support doubles: - assertT(c, aSize == 4); - ResolvedPromise pcon(0x7fffffff); - lir::Constant con(&pcon); - if (a->low == b->low) { - lir::RegisterPair tmp(c->client->acquireTemporary(FloatRegisterMask)); - moveCR(c, 4, &con, 4, &tmp); - maybeRex(c, 4, a, &tmp); - opcode(c, 0x0f, 0x54); - modrm(c, 0xc0, &tmp, a); - c->client->releaseTemporary(tmp.low); - } else { - moveCR(c, 4, &con, 4, b); - maybeRex(c, 4, a, b); - opcode(c, 0x0f, 0x54); - modrm(c, 0xc0, a, b); - } -} - -void absoluteRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b UNUSED) -{ - assertT(c, aSize == bSize and a->low == rax and b->low == rax); - lir::RegisterPair d(c->client->acquireTemporary(rdx)); - maybeRex(c, aSize, a, b); - opcode(c, 0x99); - xorRR(c, aSize, &d, aSize, a); - subtractRR(c, aSize, &d, aSize, a); - c->client->releaseTemporary(rdx); -} - -} // namespace x86 -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/operations.h b/sgx-jvm/avian/src/codegen/target/x86/operations.h deleted file mode 100644 index 2101231e05..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/operations.h +++ /dev/null @@ -1,459 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H - -#include "avian/common.h" - -#include - -#include "context.h" - -namespace avian { -namespace codegen { -namespace x86 { - -void return_(Context* c); - -void trap(Context* c); - -void ignore(Context*); - -void storeLoadBarrier(Context* c); - -void callC(Context* c, unsigned size UNUSED, lir::Constant* a); - -void longCallC(Context* c, unsigned size, lir::Constant* a); - -void jumpR(Context* c, unsigned size UNUSED, lir::RegisterPair* a); - -void jumpC(Context* c, unsigned size UNUSED, lir::Constant* a); - -void jumpM(Context* c, unsigned size UNUSED, lir::Memory* a); - -void longJumpC(Context* c, unsigned size, lir::Constant* a); - -void callR(Context* c, unsigned size UNUSED, lir::RegisterPair* a); - -void callM(Context* c, unsigned size UNUSED, lir::Memory* a); - -void alignedCallC(Context* c, unsigned size, lir::Constant* a); - -void alignedLongCallC(Context* c, unsigned size, lir::Constant* a); - -void alignedJumpC(Context* c, unsigned size, lir::Constant* a); - -void alignedLongJumpC(Context* c, unsigned size, lir::Constant* a); - -void pushR(Context* c, unsigned size, lir::RegisterPair* a); - -void popR(Context* c, unsigned size, lir::RegisterPair* a); - -void negateR(Context* c, unsigned size, lir::RegisterPair* a); - -void negateRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b UNUSED); - -void moveCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void moveZCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void swapRR(Context* c, - unsigned aSize UNUSED, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void moveRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - UNUSED unsigned bSize, - lir::RegisterPair* b); - -void moveMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b); - -void moveRM(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::Memory* b); - -void moveAR(Context* c, - unsigned aSize, - lir::Address* a, - unsigned bSize, - lir::RegisterPair* b); - -void moveCM(Context* c, - unsigned aSize UNUSED, - lir::Constant* a, - unsigned bSize, - lir::Memory* b); - -void moveZRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void moveZMR(Context* c, - unsigned aSize UNUSED, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void addCarryRR(Context* c, unsigned size, lir::RegisterPair* a, lir::RegisterPair* b); - -void addRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void addCarryCR(Context* c, unsigned size, lir::Constant* a, lir::RegisterPair* b); - -void addCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void subtractBorrowCR(Context* c, - unsigned size UNUSED, - lir::Constant* a, - lir::RegisterPair* b); - -void subtractCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void subtractBorrowRR(Context* c, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b); - -void subtractRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void andRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void andCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void orRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void orCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void xorRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void xorCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void multiplyRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void compareRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void compareCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void compareRM(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::Memory* b); - -void compareCM(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::Memory* b); - -void compareFloatRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void branchLong(Context* c, - lir::TernaryOperation op, - lir::Operand* al, - lir::Operand* ah, - lir::Operand* bl, - lir::Operand* bh, - lir::Constant* target, - BinaryOperationType compare); - -void branchRR(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::RegisterPair* b, - lir::Constant* target); - -void branchCR(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::RegisterPair* b, - lir::Constant* target); - -void branchRM(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::RegisterPair* a, - lir::Memory* b, - lir::Constant* target); - -void branchCM(Context* c, - lir::TernaryOperation op, - unsigned size, - lir::Constant* a, - lir::Memory* b, - lir::Constant* target); - -void multiplyCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void divideRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b UNUSED); - -void remainderRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void doShift(Context* c, - UNUSED void (*shift)(Context*, - unsigned, - lir::RegisterPair*, - unsigned, - lir::RegisterPair*), - int type, - UNUSED unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void shiftLeftRR(Context* c, - UNUSED unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b); - -void shiftLeftCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void shiftRightRR(Context* c, - UNUSED unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b); - -void shiftRightCR(Context* c, - unsigned aSize, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void unsignedShiftRightRR(Context* c, - UNUSED unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b); - -void unsignedShiftRightCR(Context* c, - unsigned aSize UNUSED, - lir::Constant* a, - unsigned bSize, - lir::RegisterPair* b); - -void floatSqrtRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatSqrtMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatAddRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatAddMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatSubtractRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatSubtractMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatMultiplyRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatMultiplyMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatDivideRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatDivideMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void float2FloatRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void float2FloatMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void float2IntRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b); - -void float2IntMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b); - -void int2FloatRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize, - lir::RegisterPair* b); - -void int2FloatMR(Context* c, - unsigned aSize, - lir::Memory* a, - unsigned bSize, - lir::RegisterPair* b); - -void floatNegateRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void floatAbsoluteRR(Context* c, - unsigned aSize UNUSED, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b); - -void absoluteRR(Context* c, - unsigned aSize, - lir::RegisterPair* a, - unsigned bSize UNUSED, - lir::RegisterPair* b UNUSED); - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_OPERATIONS_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/padding.cpp b/sgx-jvm/avian/src/codegen/target/x86/padding.cpp deleted file mode 100644 index 930d05903e..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/padding.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/alloc-vector.h" - -#include "context.h" -#include "padding.h" -#include "block.h" - -namespace avian { -namespace codegen { -namespace x86 { - -AlignmentPadding::AlignmentPadding(Context* c, - unsigned instructionOffset, - unsigned alignment) - : offset(c->code.length()), - instructionOffset(instructionOffset), - alignment(alignment), - next(0), - padding(-1) -{ - if (c->lastBlock->firstPadding) { - c->lastBlock->lastPadding->next = this; - } else { - c->lastBlock->firstPadding = this; - } - c->lastBlock->lastPadding = this; -} - -unsigned padding(AlignmentPadding* p, - unsigned start, - unsigned offset, - AlignmentPadding* limit) -{ - unsigned padding = 0; - if (limit) { - if (limit->padding == -1) { - for (; p; p = p->next) { - if (p->padding == -1) { - unsigned index = p->offset - offset; - while ((start + index + padding + p->instructionOffset) - % p->alignment) { - ++padding; - } - - p->padding = padding; - - if (p == limit) - break; - } else { - padding = p->padding; - } - } - } else { - padding = limit->padding; - } - } - return padding; -} - -} // namespace x86 -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/codegen/target/x86/padding.h b/sgx-jvm/avian/src/codegen/target/x86/padding.h deleted file mode 100644 index 51fde450d7..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/padding.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_PADDING_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_PADDING_H - -namespace avian { -namespace codegen { -namespace x86 { - -class Context; - -class AlignmentPadding { - public: - AlignmentPadding(Context* c, unsigned instructionOffset, unsigned alignment); - - unsigned offset; - unsigned instructionOffset; - unsigned alignment; - AlignmentPadding* next; - int padding; -}; - -unsigned padding(AlignmentPadding* p, - unsigned start, - unsigned offset, - AlignmentPadding* limit); - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_PADDING_H diff --git a/sgx-jvm/avian/src/codegen/target/x86/registers.h b/sgx-jvm/avian/src/codegen/target/x86/registers.h deleted file mode 100644 index 3e614a552f..0000000000 --- a/sgx-jvm/avian/src/codegen/target/x86/registers.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_CODEGEN_ASSEMBLER_X86_REGISTERS_H -#define AVIAN_CODEGEN_ASSEMBLER_X86_REGISTERS_H - -namespace avian { -namespace codegen { -namespace x86 { - -constexpr Register rax((int)0); -constexpr Register rcx(1); -constexpr Register rdx(2); -constexpr Register rbx(3); -constexpr Register rsp(4); -constexpr Register rbp(5); -constexpr Register rsi(6); -constexpr Register rdi(7); -constexpr Register r8(8); -constexpr Register r9(9); -constexpr Register r10(10); -constexpr Register r11(11); -constexpr Register r12(12); -constexpr Register r13(13); -constexpr Register r14(14); -constexpr Register r15(15); -constexpr Register xmm0(16); -constexpr Register xmm1(16 + 1); -constexpr Register xmm2(16 + 2); -constexpr Register xmm3(16 + 3); -constexpr Register xmm4(16 + 4); -constexpr Register xmm5(16 + 5); -constexpr Register xmm6(16 + 6); -constexpr Register xmm7(16 + 7); -constexpr Register xmm8(16 + 8); -constexpr Register xmm9(16 + 9); -constexpr Register xmm10(16 + 10); -constexpr Register xmm11(16 + 11); -constexpr Register xmm12(16 + 12); -constexpr Register xmm13(16 + 13); -constexpr Register xmm14(16 + 14); -constexpr Register xmm15(16 + 15); - -constexpr Register LongJumpRegister = r10; - -constexpr RegisterMask GeneralRegisterMask = vm::TargetBytesPerWord == 4 ? 0x000000ff - : 0x0000ffff; - -constexpr RegisterMask FloatRegisterMask = vm::TargetBytesPerWord == 4 ? 0x00ff0000 - : 0xffff0000; - -} // namespace x86 -} // namespace codegen -} // namespace avian - -#endif // AVIAN_CODEGEN_ASSEMBLER_X86_REGISTERS_H diff --git a/sgx-jvm/avian/src/codegen/targets.cpp b/sgx-jvm/avian/src/codegen/targets.cpp deleted file mode 100644 index b4eabba5be..0000000000 --- a/sgx-jvm/avian/src/codegen/targets.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/common.h" - -#include - -#include "avian/environment.h" - -namespace avian { -namespace codegen { - -Architecture* makeArchitectureNative(vm::System* system, - bool useNativeFeatures UNUSED) -{ -#ifndef AVIAN_TARGET_ARCH -#error "Must specify native target!" -#endif - -#if AVIAN_TARGET_ARCH == AVIAN_ARCH_UNKNOWN - system->abort(); - return 0; -#elif(AVIAN_TARGET_ARCH == AVIAN_ARCH_X86) \ - || (AVIAN_TARGET_ARCH == AVIAN_ARCH_X86_64) - return makeArchitectureX86(system, useNativeFeatures); -#elif (AVIAN_TARGET_ARCH == AVIAN_ARCH_ARM) \ - || (AVIAN_TARGET_ARCH == AVIAN_ARCH_ARM64) - return makeArchitectureArm(system, useNativeFeatures); -#else -#error "Unsupported codegen target" -#endif -} - -} // namespace codegen -} // namespace avian diff --git a/sgx-jvm/avian/src/compile-arm.S b/sgx-jvm/avian/src/compile-arm.S deleted file mode 100644 index cd44d243a6..0000000000 --- a/sgx-jvm/avian/src/compile-arm.S +++ /dev/null @@ -1,255 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/types.h" -#include "avian/target-fields.h" - -.text - -#define BYTES_PER_WORD 4 - -#define LOCAL(x) .L##x - -#ifdef __APPLE__ -# define GLOBAL(x) _##x -#else -# define GLOBAL(x) x -#endif - -#define CONTINUATION_NEXT 4 -#define CONTINUATION_ADDRESS 16 -#define CONTINUATION_RETURN_ADDRESS_OFFSET 20 -#define CONTINUATION_FRAME_POINTER_OFFSET 24 -#define CONTINUATION_LENGTH 28 -#define CONTINUATION_BODY 32 - -.globl GLOBAL(vmInvoke) -.align 2 -GLOBAL(vmInvoke): - /* - arguments - r0 : thread - r1 : function - r2 : arguments - r3 : argumentFootprint - [sp, #0] : frameSize (not used) - [sp, #4] : returnType - */ - - // save all non-volatile registers - stmfd sp!, {r4-r11, lr} - - // save return type - ldr r4, [sp, #4] - str r4, [sp, #-4]! - - str sp, [r0, #TARGET_THREAD_SCRATCH] - - // align stack, if necessary - eor r4, sp, r3 - tst r4, #4 - subne sp, sp, #4 - - // copy arguments into place - sub sp, r3 - mov r4, #0 - b LOCAL(vmInvoke_argumentTest) - -LOCAL(vmInvoke_argumentLoop): - ldr r5, [r2, r4] - str r5, [sp, r4] - add r4, r4, #BYTES_PER_WORD - -LOCAL(vmInvoke_argumentTest): - cmp r4, r3 - blt LOCAL(vmInvoke_argumentLoop) - - // we use r8 to hold the thread pointer, by convention - mov r8, r0 - - // load and call function address -#if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) - mov lr, pc - bx r1 -#else - blx r1 -#endif - -.globl GLOBAL(vmInvoke_returnAddress) -.align 2 -GLOBAL(vmInvoke_returnAddress): - // restore stack pointer - ldr sp, [r8, #TARGET_THREAD_SCRATCH] - - // clear MyThread::stack to avoid confusing another thread calling - // java.lang.Thread.getStackTrace on this one. See - // MyProcess::getStackTrace in compile.cpp for details on how we get - // a reliable stack trace from a thread that might be interrupted at - // any point in its execution. - mov r5, #0 - str r5, [r8, #TARGET_THREAD_STACK] - -.globl GLOBAL(vmInvoke_safeStack) -.align 2 -GLOBAL(vmInvoke_safeStack): - -#ifdef AVIAN_CONTINUATIONS - // call the next continuation, if any - ldr r5,[r8,#TARGET_THREAD_CONTINUATION] - cmp r5,#0 - beq LOCAL(vmInvoke_exit) - - ldr r6,[r5,#CONTINUATION_LENGTH] - lsl r6,r6,#2 - neg r7,r6 - add r7,r7,#-80 // 80 bytes for callee-saved register values - mov r4,sp - str r4,[sp,r7]! - - add r7,r5,#CONTINUATION_BODY - - mov r11,#0 - b LOCAL(vmInvoke_continuationTest) - -LOCAL(vmInvoke_continuationLoop): - ldr r9,[r7,r11] - str r9,[sp,r11] - add r11,r11,#4 - -LOCAL(vmInvoke_continuationTest): - cmp r11,r6 - ble LOCAL(vmInvoke_continuationLoop) - - ldr r7,[r5,#CONTINUATION_RETURN_ADDRESS_OFFSET] -#ifdef __APPLE__ - movw r11, :lower16:(GLOBAL(vmInvoke_returnAddress)-(LOCAL(vmInvoke_getAddress)+8)) - movt r11, :upper16:(GLOBAL(vmInvoke_returnAddress)-(LOCAL(vmInvoke_getAddress)+8)) -LOCAL(vmInvoke_getAddress): - add r11, pc, r11 -#else // not __APPLE__ - ldr r10,LOCAL(vmInvoke_returnAddress_word) - ldr r11,LOCAL(vmInvoke_getAddress_word) -LOCAL(vmInvoke_getAddress): - add r11,pc,r11 - ldr r11,[r11,r10] -#endif // not __APPLE__ - str r11,[sp,r7] - - ldr r7,[r5,#CONTINUATION_NEXT] - str r7,[r8,#TARGET_THREAD_CONTINUATION] - - // call the continuation unless we're handling an exception - ldr r7,[r8,#TARGET_THREAD_EXCEPTION] - cmp r7,#0 - bne LOCAL(vmInvoke_handleException) - ldr r7,[r5,#CONTINUATION_ADDRESS] - bx r7 - -LOCAL(vmInvoke_handleException): - // we're handling an exception - call the exception handler instead - mov r11,#0 - str r11,[r8,#TARGET_THREAD_EXCEPTION] - ldr r11,[r8,#TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT] - ldr r9,[sp] - neg r11,r11 - str r9,[sp,r11]! - ldr r11,[r8,#TARGET_THREAD_EXCEPTIONOFFSET] - str r7,[sp,r11] - - ldr r7,[r8,#TARGET_THREAD_EXCEPTIONHANDLER] - bx r7 - -LOCAL(vmInvoke_exit): - - mov ip, #0 - str ip, [r8, #TARGET_THREAD_STACK] -#endif // AVIAN_CONTINUATIONS - - // restore return type - ldr ip, [sp], #4 - - // restore callee-saved registers - ldmfd sp!, {r4-r11, lr} - -LOCAL(vmInvoke_return): - bx lr - -.globl GLOBAL(vmJumpAndInvoke) -.align 2 -GLOBAL(vmJumpAndInvoke): -#ifdef AVIAN_CONTINUATIONS - // r0: thread - // r1: address - // r2: stack - // r3: argumentFootprint - // [sp,#0]: arguments - // [sp,#4]: frameSize - - ldr r5,[sp,#0] - ldr r6,[sp,#4] - - // allocate new frame, adding room for callee-saved registers, plus - // 4 bytes of padding since the calculation of frameSize assumes 4 - // bytes have already been allocated to save the return address, - // which is not true in this case - sub r2,r2,r6 - sub r2,r2,#84 - - mov r8,r0 - - // copy arguments into place - mov r6,#0 - b LOCAL(vmJumpAndInvoke_argumentTest) - -LOCAL(vmJumpAndInvoke_argumentLoop): - ldr r12,[r5,r6] - str r12,[r2,r6] - add r6,r6,#4 - -LOCAL(vmJumpAndInvoke_argumentTest): - cmp r6,r3 - ble LOCAL(vmJumpAndInvoke_argumentLoop) - - // the arguments have been copied, so we can set the real stack - // pointer now - mov sp,r2 - - // set return address to vmInvoke_returnAddress -#ifdef __APPLE__ - movw r11, :lower16:(GLOBAL(vmInvoke_returnAddress)-(LOCAL(vmJumpAndInvoke_getAddress)+8)) - movt r11, :upper16:(GLOBAL(vmInvoke_returnAddress)-(LOCAL(vmJumpAndInvoke_getAddress)+8)) -LOCAL(vmJumpAndInvoke_getAddress): - add r11, pc, r11 -#else // not __APPLE__ - - ldr r10,LOCAL(vmInvoke_returnAddress_word) - ldr r11,LOCAL(vmJumpAndInvoke_getAddress_word) -LOCAL(vmJumpAndInvoke_getAddress): - add r11,pc,r11 -#endif // not __APPLE__ - ldr lr,[r11,r10] - - bx r1 - -#ifndef __APPLE__ -LOCAL(vmInvoke_returnAddress_word): - .word GLOBAL(vmInvoke_returnAddress)(GOT) -LOCAL(vmInvoke_getAddress_word): - .word _GLOBAL_OFFSET_TABLE_-(LOCAL(vmInvoke_getAddress)+8) -LOCAL(vmJumpAndInvoke_getAddress_word): - .word _GLOBAL_OFFSET_TABLE_-(LOCAL(vmJumpAndInvoke_getAddress)+8) -#endif // not __APPLE__ - -#else // not AVIAN_CONTINUATIONS - // vmJumpAndInvoke should only be called when continuations are - // enabled, so we force a crash if we reach here: - mov r1,#0 - ldr r1,[r1] -#endif // not AVIAN_CONTINUATIONS diff --git a/sgx-jvm/avian/src/compile-arm.masm b/sgx-jvm/avian/src/compile-arm.masm deleted file mode 100644 index ac02048372..0000000000 --- a/sgx-jvm/avian/src/compile-arm.masm +++ /dev/null @@ -1,252 +0,0 @@ -; Copyright (c) 2008-2015, Avian Contributors -; -; Permission to use, copy, modify, and/or distribute this software -; for any purpose with or without fee is hereby granted, provided -; that the above copyright notice and this permission notice appear -; in all copies. -; -; There is NO WARRANTY for this software. See license.txt for -; details. -; -; ORIGIN: https://github.com/gkvas/avian/tree/wince - -; types.inc -VOID_TYPE equ 0 -INT8_TYPE equ 1 -INT16_TYPE equ 2 -INT32_TYPE equ 3 -INT64_TYPE equ 4 -FLOAT_TYPE equ 5 -DOUBLE_TYPE equ 6 -POINTER_TYPE equ 7 - -; target-fields.inc -;TARGET_BYTES_PER_WORD = 4 - -TARGET_THREAD_EXCEPTION equ 44 -TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT equ 2164 -TARGET_THREAD_EXCEPTIONOFFSET equ 2168 -TARGET_THREAD_EXCEPTIONHANDLER equ 2172 - -TARGET_THREAD_IP equ 2144 -TARGET_THREAD_STACK equ 2148 -TARGET_THREAD_NEWSTACK equ 2152 -TARGET_THREAD_SCRATCH equ 2156 -TARGET_THREAD_CONTINUATION equ 2160 -TARGET_THREAD_TAILADDRESS equ 2176 -TARGET_THREAD_VIRTUALCALLTARGET equ 2180 -TARGET_THREAD_VIRTUALCALLINDEX equ 2184 -TARGET_THREAD_HEAPIMAGE equ 2188 -TARGET_THREAD_CODEIMAGE equ 2192 -TARGET_THREAD_THUNKTABLE equ 2196 -TARGET_THREAD_STACKLIMIT equ 2220 - - AREA text, CODE, ARM - -BYTES_PER_WORD equ 4 - -CONTINUATION_NEXT equ 4 -CONTINUATION_ADDRESS equ 16 -CONTINUATION_RETURN_ADDRESS_OFFSET equ 20 -CONTINUATION_FRAME_POINTER_OFFSET equ 24 -CONTINUATION_LENGTH equ 28 -CONTINUATION_BODY equ 32 - - EXPORT vmInvoke -vmInvoke - - ; arguments - ; r0 : thread - ; r1 : function - ; r2 : arguments - ; r3 : argumentFootprint - ; [sp, #0] : frameSize (not used) - ; [sp, #4] : returnType - - - ; save all non-volatile registers - stmfd sp!, {r4-r11, lr} - - ; save return type - ldr r4, [sp, #4] - str r4, [sp, #-4]! - - str sp, [r0, #TARGET_THREAD_SCRATCH] - - ; align stack, if necessary - eor r4, sp, r3 - tst r4, #4 - subne sp, sp, #4 - - ; copy arguments into place - sub sp, sp, r3 - mov r4, #0 - b vmInvoke_argumentTest - -vmInvoke_argumentLoop - ldr r5, [r2, r4] - str r5, [sp, r4] - add r4, r4, #BYTES_PER_WORD - -vmInvoke_argumentTest - cmp r4, r3 - blt vmInvoke_argumentLoop - - ; we use r8 to hold the thread pointer, by convention - mov r8, r0 - - ; load and call function address - blx r1 - - EXPORT vmInvoke_returnAddress -vmInvoke_returnAddress - ; restore stack pointer - ldr sp, [r8, #TARGET_THREAD_SCRATCH] - - ; clear MyThread::stack to avoid confusing another thread calling - ; java.lang.Thread.getStackTrace on this one. See - ; MyProcess::getStackTrace in compile.cpp for details on how we get - ; a reliable stack trace from a thread that might be interrupted at - ; any point in its execution. - mov r5, #0 - str r5, [r8, #TARGET_THREAD_STACK] - - EXPORT vmInvoke_safeStack -vmInvoke_safeStack - -;if AVIAN_CONTINUATIONS -; ; call the next continuation, if any -; ldr r5,[r8,#TARGET_THREAD_CONTINUATION] -; cmp r5,#0 -; beq vmInvoke_exit) -; -; ldr r6,[r5,#CONTINUATION_LENGTH] -; lsl r6,r6,#2 -; neg r7,r6 -; add r7,r7,#-80 -; mov r4,sp -; str r4,[sp,r7]! -; -; add r7,r5,#CONTINUATION_BODY -; -; mov r11,#0 -; b vmInvoke_continuationTest -; -;vmInvoke_continuationLoop -; ldr r9,[r7,r11] -; str r9,[sp,r11] -; add r11,r11,#4 -; -;vmInvoke_continuationTest -; cmp r11,r6 -; ble vmInvoke_continuationLoop) -; -; ldr r7,[r5,#CONTINUATION_RETURN_ADDRESS_OFFSET] -; ldr r10,vmInvoke_returnAddress_word -; ldr r11,vmInvoke_getAddress_word -;vmInvoke_getAddress -; add r11,pc,r11 -; ldr r11,[r11,r10] -; str r11,[sp,r7] -; -; ldr r7,[r5,#CONTINUATION_NEXT] -; str r7,[r8,#TARGET_THREAD_CONTINUATION] -; -; ; call the continuation unless we're handling an exception -; ldr r7,[r8,#TARGET_THREAD_EXCEPTION] -; cmp r7,#0 -; bne vmInvoke_handleException) -; ldr r7,[r5,#CONTINUATION_ADDRESS] -; bx r7 -; -;vmInvoke_handleException -; ; we're handling an exception - call the exception handler instead -; mov r11,#0 -; str r11,[r8,#TARGET_THREAD_EXCEPTION] -; ldr r11,[r8,#TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT] -; ldr r9,[sp] -; neg r11,r11 -; str r9,[sp,r11]! -; ldr r11,[r8,#TARGET_THREAD_EXCEPTIONOFFSET] -; str r7,[sp,r11] -; -; ldr r7,[r8,#TARGET_THREAD_EXCEPTIONHANDLER] -; bx r7 -; -;vmInvoke_exit -;endif ; AVIAN_CONTINUATIONS - - mov ip, #0 - str ip, [r8, #TARGET_THREAD_STACK] - - ; restore return type - ldr ip, [sp], #4 - - ; restore callee-saved registers - ldmfd sp!, {r4-r11, lr} - -vmInvoke_return - bx lr - - EXPORT vmJumpAndInvoke -vmJumpAndInvoke -;if :DEF:AVIAN_CONTINUATIONS -; ; r0: thread -; ; r1: address -; ; r2: stack -; ; r3: argumentFootprint -; ; [sp,#0]: arguments -; ; [sp,#4]: frameSize -; -; ldr r5,[sp,#0] -; ldr r6,[sp,#4] -; -; ; allocate new frame, adding room for callee-saved registers, plus -; ; 4 bytes of padding since the calculation of frameSize assumes 4 -; ; bytes have already been allocated to save the return address, -; ; which is not true in this case -; sub r2,r2,r6 -; sub r2,r2,#84 -; -; mov r8,r0 -; -; ; copy arguments into place -; mov r6,#0 -; b vmJumpAndInvoke_argumentTest -; -;vmJumpAndInvoke_argumentLoop -; ldr r12,[r5,r6] -; str r12,[r2,r6] -; add r6,r6,#4 -; -;vmJumpAndInvoke_argumentTest -; cmp r6,r3 -; ble vmJumpAndInvoke_argumentLoop -; -; ; the arguments have been copied, so we can set the real stack -; ; pointer now -; mov sp,r2 -; -; ; set return address to vmInvoke_returnAddress -; ldr r10,vmInvoke_returnAddress_word) -; ldr r11,vmJumpAndInvoke_getAddress_word) -;vmJumpAndInvoke_getAddress -; add r11,pc,r11 -; ldr lr,[r11,r10] -; -; bx r1 -; -;vmInvoke_returnAddress_word -; .word GLOBAL(vmInvoke_returnAddress)(GOT) -;vmInvoke_getAddress_word -; .word _GLOBAL_OFFSET_TABLE_-(vmInvoke_getAddress)+8) -;vmJumpAndInvoke_getAddress_word -; .word _GLOBAL_OFFSET_TABLE_-(vmJumpAndInvoke_getAddress)+8) -; -;else ; not AVIAN_CONTINUATIONS - ; vmJumpAndInvoke should only be called when continuations are - ; enabled - bkpt 0 -;endif ; not AVIAN_CONTINUATIONS - - END \ No newline at end of file diff --git a/sgx-jvm/avian/src/compile-arm64.S b/sgx-jvm/avian/src/compile-arm64.S deleted file mode 100644 index f1b022e860..0000000000 --- a/sgx-jvm/avian/src/compile-arm64.S +++ /dev/null @@ -1,222 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/types.h" -#include "avian/target-fields.h" - -.text - -#define BYTES_PER_WORD 8 - -#define LOCAL(x) .L##x - -#ifdef __APPLE__ -# define GLOBAL(x) _##x -#else -# define GLOBAL(x) x -#endif - -#define CONTINUATION_NEXT 8 -#define CONTINUATION_ADDRESS 32 -#define CONTINUATION_RETURN_ADDRESS_OFFSET 40 -#define CONTINUATION_FRAME_POINTER_OFFSET 48 -#define CONTINUATION_LENGTH 56 -#define CONTINUATION_BODY 64 - -.globl GLOBAL(vmInvoke) -.align 2 -GLOBAL(vmInvoke): - // arguments: - // x0 : thread - // x1 : function - // x2 : arguments - // w3 : argumentFootprint - // w4 : frameSize (not used) - // w5 : returnType - - // allocate frame - stp x29, x30, [sp,#-96]! - mov x29, sp - - // save callee-saved register values - 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] - - // save return type - str w5, [sp,#-16]! - - mov x5, sp - str x5, [x0,#TARGET_THREAD_SCRATCH] - - // copy arguments into place, reserving enough space for them, plus - // alignment padding - sub x5, sp, w3, uxtw - and sp, x5, #-16 - - mov x4, #0 - b LOCAL(vmInvoke_argumentTest) - -LOCAL(vmInvoke_argumentLoop): - ldr x5, [x2, x4] - str x5, [sp, x4] - add x4, x4, #BYTES_PER_WORD - -LOCAL(vmInvoke_argumentTest): - cmp x4, x3 - b.lt LOCAL(vmInvoke_argumentLoop) - - // we use x19 to hold the thread pointer, by convention - mov x19, x0 - - // load and call function address - blr x1 - -.globl GLOBAL(vmInvoke_returnAddress) -.align 2 -GLOBAL(vmInvoke_returnAddress): - // restore stack pointer - ldr x5, [x19, #TARGET_THREAD_SCRATCH] - mov sp, x5 - - // clear MyThread::stack to avoid confusing another thread calling - // java.lang.Thread.getStackTrace on this one. See - // MyProcess::getStackTrace in compile.cpp for details on how we get - // a reliable stack trace from a thread that might be interrupted at - // any point in its execution. - str xzr, [x19, #TARGET_THREAD_STACK] - -.globl GLOBAL(vmInvoke_safeStack) -.align 2 -GLOBAL(vmInvoke_safeStack): - -#ifdef AVIAN_CONTINUATIONS - // call the next continuation, if any - ldr x5, [x19,#TARGET_THREAD_CONTINUATION] - cmp x5, xzr - b.eq LOCAL(vmInvoke_exit) - - ldr x6, [x5,#CONTINUATION_LENGTH] - lsl x6, x6, #3 - neg x7, x6 - add x7, x7, #-128 // 128 bytes for callee-saved register values - mov x4, sp - add sp, sp, x7 - str x4, [sp] - - add x7, x5, #CONTINUATION_BODY - mov x11, xzr - b LOCAL(vmInvoke_continuationTest) - -LOCAL(vmInvoke_continuationLoop): - ldr x9, [x7,x11] - str x9, [sp,x11] - add x11, x11, #8 - -LOCAL(vmInvoke_continuationTest): - cmp x11, x6 - b.le LOCAL(vmInvoke_continuationLoop) - - ldr x7, [x5,#CONTINUATION_RETURN_ADDRESS_OFFSET] - adr x11, GLOBAL(vmInvoke_returnAddress) - str x11, [sp,x7] - - ldr x7, [x5,#CONTINUATION_NEXT] - str x7, [x19,#TARGET_THREAD_CONTINUATION] - - // call the continuation unless we're handling an exception - ldr x7, [x19,#TARGET_THREAD_EXCEPTION] - cmp x7, xzr - b.ne LOCAL(vmInvoke_handleException) - ldr x7, [x5,#CONTINUATION_ADDRESS] - br x7 - -LOCAL(vmInvoke_handleException): - // we're handling an exception - call the exception handler instead - str xzr, [x19,#TARGET_THREAD_EXCEPTION] - ldr x11, [x19,#TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT] - ldr x9, [sp] - neg x11, x11 - add sp, sp, x11 - str x9, [sp] - ldr x11, [x19,#TARGET_THREAD_EXCEPTIONOFFSET] - str x7, [sp,x11] - - ldr x7, [x19,#TARGET_THREAD_EXCEPTIONHANDLER] - br x7 - -LOCAL(vmInvoke_exit): - str xzr, [x19, #TARGET_THREAD_STACK] - -#endif // AVIAN_CONTINUATIONS - - // restore return type - ldr w5, [sp],#16 - - // restore callee-saved register values - ldp x19, x20, [sp,#16] - ldp x21, x22, [sp,#32] - ldp x23, x24, [sp,#48] - ldp x25, x26, [sp,#64] - ldp x27, x28, [sp,#80] - ldp x29, x30, [sp],#96 - -LOCAL(vmInvoke_return): - br x30 - -.globl GLOBAL(vmJumpAndInvoke) -.align 2 -GLOBAL(vmJumpAndInvoke): -#ifdef AVIAN_CONTINUATIONS - // x0: thread - // x1: address - // x2: stack - // x3: argumentFootprint - // x4: arguments - // x5: frameSize - - // allocate new frame, adding room for callee-saved registers, plus - // 8 bytes of padding since the calculation of frameSize assumes 8 - // bytes have already been allocated to save the return address, - // which is not true in this case - sub x2, x2, x5 - sub x2, x2, #136 - - mov x19, x0 - - // copy arguments into place - mov x6, xzr - b LOCAL(vmJumpAndInvoke_argumentTest) - -LOCAL(vmJumpAndInvoke_argumentLoop): - ldr x12, [x4,x6] - str x12, [x2,x6] - add x6, x6, #4 - -LOCAL(vmJumpAndInvoke_argumentTest): - cmp x6, x3 - ble LOCAL(vmJumpAndInvoke_argumentLoop) - - // the arguments have been copied, so we can set the real stack - // pointer now - mov sp, x2 - - // set return address to vmInvoke_returnAddress - adr x30, GLOBAL(vmInvoke_returnAddress) - - br x1 - -#else // not AVIAN_CONTINUATIONS - // vmJumpAndInvoke should only be called when continuations are - // enabled, so we force a crash if we reach here: - brk 0 -#endif // not AVIAN_CONTINUATIONS diff --git a/sgx-jvm/avian/src/compile-i386.S b/sgx-jvm/avian/src/compile-i386.S deleted file mode 100644 index d6ddd2052f..0000000000 --- a/sgx-jvm/avian/src/compile-i386.S +++ /dev/null @@ -1,455 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/types.h" -#include "avian/target-fields.h" - -#define LOCAL(x) .L##x - -#if defined __APPLE__ \ - || ((defined __MINGW32__ || defined __CYGWIN32__) && ! defined __x86_64__) -# define GLOBAL(x) _##x -#else -# define GLOBAL(x) x -#endif - -.text - -#ifdef __x86_64__ - -#ifdef AVIAN_USE_FRAME_POINTER -# define ALIGNMENT_ADJUSTMENT 0 -#else -# define ALIGNMENT_ADJUSTMENT 8 -#endif - -#if defined __MINGW32__ || defined __CYGWIN32__ - -#define CALLEE_SAVED_REGISTER_FOOTPRINT 64 + ALIGNMENT_ADJUSTMENT - -.globl GLOBAL(vmInvoke) -GLOBAL(vmInvoke): - pushq %rbp - movq %rsp,%rbp - - // %rcx: thread - // %rdx: function - // %r8 : arguments - // %r9 : argumentsFootprint - // 48(%rbp) : frameSize - // 56(%rbp) : returnType (ignored) - - // allocate stack space for callee-saved registers - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // remember this stack position, since we won't be able to rely on - // %rbp being restored when the call returns - movq %rsp,TARGET_THREAD_SCRATCH(%rcx) - - // save callee-saved registers - movq %rbx,0(%rsp) - movq %r12,8(%rsp) - movq %r13,16(%rsp) - movq %r14,24(%rsp) - movq %r15,32(%rsp) - movq %rsi,40(%rsp) - movq %rdi,48(%rsp) - - // allocate stack space for arguments - movl 48(%rbp),%eax - subq %rax,%rsp - - // we use rbx to hold the thread pointer, by convention - mov %rcx,%rbx - - // copy arguments into place - movq $0,%r11 - jmp LOCAL(vmInvoke_argumentTest) - -LOCAL(vmInvoke_argumentLoop): - movq (%r8,%r11,1),%rsi - movq %rsi,(%rsp,%r11,1) - addq $8,%r11 - -LOCAL(vmInvoke_argumentTest): - cmpq %r9,%r11 - jb LOCAL(vmInvoke_argumentLoop) - - // call function - call *%rdx - -.globl GLOBAL(vmInvoke_returnAddress) -GLOBAL(vmInvoke_returnAddress): - // restore stack pointer - movq TARGET_THREAD_SCRATCH(%rbx),%rsp - - // clear MyThread::stack to avoid confusing another thread calling - // java.lang.Thread.getStackTrace on this one. See - // MyProcess::getStackTrace in compile.cpp for details on how we get - // a reliable stack trace from a thread that might be interrupted at - // any point in its execution. - movq $0,TARGET_THREAD_STACK(%rbx) - -.globl GLOBAL(vmInvoke_safeStack) -GLOBAL(vmInvoke_safeStack): - -#ifdef AVIAN_CONTINUATIONS -# include "continuations-x86.S" -#endif // AVIAN_CONTINUATIONS - - // restore callee-saved registers - movq 0(%rsp),%rbx - movq 8(%rsp),%r12 - movq 16(%rsp),%r13 - movq 24(%rsp),%r14 - movq 32(%rsp),%r15 - movq 40(%rsp),%rsi - movq 48(%rsp),%rdi - - addq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // return - popq %rbp - ret - -.globl GLOBAL(vmJumpAndInvoke) -GLOBAL(vmJumpAndInvoke): -#ifdef AVIAN_CONTINUATIONS - // %rcx: thread - // %rdx: address - // %r8 : stack - // %r9 : argumentFootprint - // 40(%rsp): arguments - // 48(%rsp): frameSize - - // allocate new frame, adding room for callee-saved registers - movl 48(%rsp),%eax - subq %rax,%r8 - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%r8 - - movq %rcx,%rbx - - // set return address - leaq GLOBAL(vmInvoke_returnAddress)(%rip),%r10 - movq %r10,(%r8) - - // copy arguments into place - movq $0,%r11 - movl 40(%rsp),%eax - jmp LOCAL(vmJumpAndInvoke_argumentTest) - -LOCAL(vmJumpAndInvoke_argumentLoop): - movq (%rax,%r11,1),%r10 - movq %r10,8(%r8,%r11,1) - addq $8,%r11 - -LOCAL(vmJumpAndInvoke_argumentTest): - cmpq %r9,%r11 - jb LOCAL(vmJumpAndInvoke_argumentLoop) - - // the arguments have been copied, so we can set the real stack - // pointer now - movq %r8,%rsp - - jmp *%rdx -#else // not AVIAN_CONTINUATIONS - // vmJumpAndInvoke should only be called when continuations are - // enabled - int3 -#endif // not AVIAN_CONTINUATIONS - -#else // not __MINGW32__ || __CYGWIN32__ - -#define CALLEE_SAVED_REGISTER_FOOTPRINT 48 + ALIGNMENT_ADJUSTMENT - -.globl GLOBAL(vmInvoke) -GLOBAL(vmInvoke): - pushq %rbp - movq %rsp,%rbp - - // %rdi: thread - // %rsi: function - // %rdx: arguments - // %rcx: argumentFootprint - // %r8 : frameSize - // %r9 : returnType (ignored) - - // allocate stack space for callee-saved registers - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // remember this stack position, since we won't be able to rely on - // %rbp being restored when the call returns - movq %rsp,TARGET_THREAD_SCRATCH(%rdi) - - // save callee-saved registers - movq %rbx,0(%rsp) - movq %r12,8(%rsp) - movq %r13,16(%rsp) - movq %r14,24(%rsp) - movq %r15,32(%rsp) - - // allocate stack space for arguments - subq %r8,%rsp - - // we use rbx to hold the thread pointer, by convention - mov %rdi,%rbx - - // copy arguments into place - movq $0,%r9 - jmp LOCAL(vmInvoke_argumentTest) - -LOCAL(vmInvoke_argumentLoop): - movq (%rdx,%r9,1),%r8 - movq %r8,(%rsp,%r9,1) - addq $8,%r9 - -LOCAL(vmInvoke_argumentTest): - cmpq %rcx,%r9 - jb LOCAL(vmInvoke_argumentLoop) - - // call function - call *%rsi - -.globl GLOBAL(vmInvoke_returnAddress) -GLOBAL(vmInvoke_returnAddress): - // restore stack pointer - movq TARGET_THREAD_SCRATCH(%rbx),%rsp - - // clear MyThread::stack to avoid confusing another thread calling - // java.lang.Thread.getStackTrace on this one. See - // MyProcess::getStackTrace in compile.cpp for details on how we get - // a reliable stack trace from a thread that might be interrupted at - // any point in its execution. - movq $0,TARGET_THREAD_STACK(%rbx) - -.globl GLOBAL(vmInvoke_safeStack) -GLOBAL(vmInvoke_safeStack): - -#ifdef AVIAN_CONTINUATIONS -# include "continuations-x86.S" -#endif // AVIAN_CONTINUATIONS - - // restore callee-saved registers - movq 0(%rsp),%rbx - movq 8(%rsp),%r12 - movq 16(%rsp),%r13 - movq 24(%rsp),%r14 - movq 32(%rsp),%r15 - - addq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // return - popq %rbp - ret - -.globl GLOBAL(vmJumpAndInvoke) -GLOBAL(vmJumpAndInvoke): -#ifdef AVIAN_CONTINUATIONS - // %rdi: thread - // %rsi: address - // %rdx: stack - // %rcx: argumentFootprint - // %r8 : arguments - // %r9 : frameSize - - // allocate new frame, adding room for callee-saved registers - subq %r9,%rdx - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rdx - - movq %rdi,%rbx - - // set return address - movq GLOBAL(vmInvoke_returnAddress)@GOTPCREL(%rip),%r10 - movq %r10,(%rdx) - - // copy arguments into place - movq $0,%r11 - jmp LOCAL(vmJumpAndInvoke_argumentTest) - -LOCAL(vmJumpAndInvoke_argumentLoop): - movq (%r8,%r11,1),%r10 - movq %r10,8(%rdx,%r11,1) - addq $8,%r11 - -LOCAL(vmJumpAndInvoke_argumentTest): - cmpq %rcx,%r11 - jb LOCAL(vmJumpAndInvoke_argumentLoop) - - // the arguments have been copied, so we can set the real stack - // pointer now - movq %rdx,%rsp - - jmp *%rsi -#else // not AVIAN_CONTINUATIONS - // vmJumpAndInvoke should only be called when continuations are - // enabled - int3 -#endif // not AVIAN_CONTINUATIONS - -#endif // not __MINGW32__ || __CYGWIN32__ - -#elif defined __i386__ - -#ifdef AVIAN_USE_FRAME_POINTER -# define ALIGNMENT_ADJUSTMENT 0 -#else -# define ALIGNMENT_ADJUSTMENT 12 -#endif - -#define CALLEE_SAVED_REGISTER_FOOTPRINT 16 + ALIGNMENT_ADJUSTMENT - -.globl GLOBAL(vmInvoke) -GLOBAL(vmInvoke): - pushl %ebp - movl %esp,%ebp - - // 8(%ebp): thread - // 12(%ebp): function - // 16(%ebp): arguments - // 20(%ebp): argumentFootprint - // 24(%ebp): frameSize - // 28(%ebp): returnType - - // allocate stack space for callee-saved registers - subl $CALLEE_SAVED_REGISTER_FOOTPRINT,%esp - - // remember this stack position, since we won't be able to rely on - // %rbp being restored when the call returns - movl 8(%ebp),%eax - movl %esp,TARGET_THREAD_SCRATCH(%eax) - - movl %ebx,0(%esp) - movl %esi,4(%esp) - movl %edi,8(%esp) - - // allocate stack space for arguments - subl 24(%ebp),%esp - - // we use ebx to hold the thread pointer, by convention - mov %eax,%ebx - - // copy arguments into place - movl $0,%ecx - movl 16(%ebp),%edx - jmp LOCAL(vmInvoke_argumentTest) - -LOCAL(vmInvoke_argumentLoop): - movl (%edx,%ecx,1),%eax - movl %eax,(%esp,%ecx,1) - addl $4,%ecx - -LOCAL(vmInvoke_argumentTest): - cmpl 20(%ebp),%ecx - jb LOCAL(vmInvoke_argumentLoop) - - // call function - call *12(%ebp) - -.globl GLOBAL(vmInvoke_returnAddress) -GLOBAL(vmInvoke_returnAddress): - // restore stack pointer - movl TARGET_THREAD_SCRATCH(%ebx),%esp - - // clear MyThread::stack to avoid confusing another thread calling - // java.lang.Thread.getStackTrace on this one. See - // MyProcess::getStackTrace in compile.cpp for details on how we get - // a reliable stack trace from a thread that might be interrupted at - // any point in its execution. - movl $0,TARGET_THREAD_STACK(%ebx) - -.globl GLOBAL(vmInvoke_safeStack) -GLOBAL(vmInvoke_safeStack): - -#ifdef AVIAN_CONTINUATIONS -# include "continuations-x86.S" -#endif // AVIAN_CONTINUATIONS - - // restore callee-saved registers - movl 0(%esp),%ebx - movl 4(%esp),%esi - movl 8(%esp),%edi - - addl $CALLEE_SAVED_REGISTER_FOOTPRINT,%esp - - // handle return value based on expected type - movl 28(%esp),%ecx - - popl %ebp - ret - -LOCAL(getPC): - movl (%esp),%esi - ret - -.globl GLOBAL(vmJumpAndInvoke) -GLOBAL(vmJumpAndInvoke): -#ifdef AVIAN_CONTINUATIONS - // 4(%esp): thread - // 8(%esp): address - // 12(%esp): stack - // 16(%esp): argumentFootprint - // 20(%esp): arguments - // 24(%esp): frameSize - - movl 12(%esp),%ecx - - // allocate new frame, adding room for callee-saved registers, - // return address, and frame pointer - subl 24(%esp),%ecx - subl $CALLEE_SAVED_REGISTER_FOOTPRINT+8,%ecx - - movl 4(%esp),%ebx - - // set return address -#if defined __MINGW32__ || defined __CYGWIN32__ - movl $GLOBAL(vmInvoke_returnAddress),%esi -#else - call LOCAL(getPC) -# if defined __APPLE__ -LOCAL(vmJumpAndInvoke_offset): - leal GLOBAL(vmInvoke_returnAddress)-LOCAL(vmJumpAndInvoke_offset)(%esi),%esi -# else - addl $_GLOBAL_OFFSET_TABLE_,%esi - movl GLOBAL(vmInvoke_returnAddress)@GOT(%esi),%esi -# endif -#endif - movl %esi,(%ecx) - - // copy arguments into place - movl $0,%esi - movl 16(%esp),%edx - movl 20(%esp),%eax - jmp LOCAL(vmJumpAndInvoke_argumentTest) - -LOCAL(vmJumpAndInvoke_argumentLoop): - movl (%eax,%esi,1),%edi - movl %edi,4(%ecx,%esi,1) - addl $4,%esi - -LOCAL(vmJumpAndInvoke_argumentTest): - cmpl %edx,%esi - jb LOCAL(vmJumpAndInvoke_argumentLoop) - - movl 8(%esp),%esi - - // the arguments have been copied, so we can set the real stack - // pointer now - movl %ecx,%esp - - jmp *%esi -#else // not AVIAN_CONTINUATIONS - // vmJumpAndInvoke should only be called when continuations are - // enabled - int3 -#endif // AVIAN_CONTINUATIONS - -#else -#error unsupported architecture -#endif //def __x86_64__ diff --git a/sgx-jvm/avian/src/compile-i386.masm b/sgx-jvm/avian/src/compile-i386.masm deleted file mode 100644 index aff4cabb94..0000000000 --- a/sgx-jvm/avian/src/compile-i386.masm +++ /dev/null @@ -1,173 +0,0 @@ -comment # - Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. - - ORIGIN: https://github.com/gkvas/avian/tree/wince -# - -.586 -.MODEL FLAT, C - -comment # types.h # -VOID_TYPE equ 0 -INT8_TYPE equ 1 -INT16_TYPE equ 2 -INT32_TYPE equ 3 -INT64_TYPE equ 4 -FLOAT_TYPE equ 5 -DOUBLE_TYPE equ 6 -POINTER_TYPE equ 7 - -comment # target-fields.h # -ifdef TARGET_BYTES_PER_WORD - if TARGET_BYTES_PER_WORD eq 8 - -TARGET_THREAD_EXCEPTION equ 80 -TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT equ 2256 -TARGET_THREAD_EXCEPTIONOFFSET equ 2264 -TARGET_THREAD_EXCEPTIONHANDLER equ 2272 - -TARGET_THREAD_IP equ 2216 -TARGET_THREAD_STACK equ 2224 -TARGET_THREAD_NEWSTACK equ 2232 -TARGET_THREAD_SCRATCH equ 2240 -TARGET_THREAD_CONTINUATION equ 2248 -TARGET_THREAD_TAILADDRESS equ 2280 -TARGET_THREAD_VIRTUALCALLTARGET equ 2288 -TARGET_THREAD_VIRTUALCALLINDEX equ 2296 -TARGET_THREAD_HEAPIMAGE equ 2304 -TARGET_THREAD_CODEIMAGE equ 2312 -TARGET_THREAD_THUNKTABLE equ 2320 -TARGET_THREAD_STACKLIMIT equ 2368 - - elseif TARGET_BYTES_PER_WORD eq 4 - -TARGET_THREAD_EXCEPTION equ 44 -TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT equ 2164 -TARGET_THREAD_EXCEPTIONOFFSET equ 2168 -TARGET_THREAD_EXCEPTIONHANDLER equ 2172 - -TARGET_THREAD_IP equ 2144 -TARGET_THREAD_STACK equ 2148 -TARGET_THREAD_NEWSTACK equ 2152 -TARGET_THREAD_SCRATCH equ 2156 -TARGET_THREAD_CONTINUATION equ 2160 -TARGET_THREAD_TAILADDRESS equ 2176 -TARGET_THREAD_VIRTUALCALLTARGET equ 2180 -TARGET_THREAD_VIRTUALCALLINDEX equ 2184 -TARGET_THREAD_HEAPIMAGE equ 2188 -TARGET_THREAD_CODEIMAGE equ 2192 -TARGET_THREAD_THUNKTABLE equ 2196 -TARGET_THREAD_STACKLIMIT equ 2220 - - else - error - endif -else - error -endif - -ifdef AVIAN_USE_FRAME_POINTER - ALIGNMENT_ADJUSTMENT equ 0 -else - ALIGNMENT_ADJUSTMENT equ 12 -endif - -CALLEE_SAVED_REGISTER_FOOTPRINT equ 16 + ALIGNMENT_ADJUSTMENT - -_TEXT SEGMENT - -public C vmInvoke -vmInvoke: - push ebp - mov ebp,esp - - ; 8(%ebp): thread - ; 12(%ebp): function - ; 16(%ebp): arguments - ; 20(%ebp): argumentFootprint - ; 24(%ebp): frameSize - ; 28(%ebp): returnType - - ; allocate stack space for callee-saved registers - sub esp,offset CALLEE_SAVED_REGISTER_FOOTPRINT - - ; remember this stack position, since we won't be able to rely on - ; %rbp being restored when the call returns - mov eax,ds:dword ptr[8+ebp] - mov ds:dword ptr[TARGET_THREAD_SCRATCH+eax],esp - - mov ds:dword ptr[0+esp],ebx - mov ds:dword ptr[4+esp],esi - mov ds:dword ptr[8+esp],edi - - ; allocate stack space for arguments - sub esp,ds:dword ptr[24+ebp] - - ; we use ebx to hold the thread pointer, by convention - mov ebx,eax - - ; copy arguments into place - mov ecx,0 - mov edx,ds:dword ptr[16+ebp] - jmp LvmInvoke_argumentTest - -LvmInvoke_argumentLoop: - mov eax,ds:dword ptr[edx+ecx*1] - mov ds:dword ptr[esp+ecx*1],eax - add ecx,4 - -LvmInvoke_argumentTest: - cmp ecx,ds:dword ptr[20+ebp] - jb LvmInvoke_argumentLoop - - ; call function - call dword ptr[12+ebp] - -public vmInvoke_returnAddress -vmInvoke_returnAddress: - ; restore stack pointer - mov esp,ds:dword ptr[TARGET_THREAD_SCRATCH+ebx] - - ; clear MyThread::stack to avoid confusing another thread calling - ; java.lang.Thread.getStackTrace on this one. See - ; MyProcess::getStackTrace in compile.cpp for details on how we get - ; a reliable stack trace from a thread that might be interrupted at - ; any point in its execution. - mov ds:dword ptr[TARGET_THREAD_STACK+ebx],0 - -public vmInvoke_safeStack -vmInvoke_safeStack: - - ; restore callee-saved registers - mov ebx,ds:dword ptr[0+esp] - mov esi,ds:dword ptr[4+esp] - mov edi,ds:dword ptr[8+esp] - - add esp,offset CALLEE_SAVED_REGISTER_FOOTPRINT - - mov ecx,ds:dword ptr[28+esp] - - pop ebp - ret - -LgetPC: - mov esi,ds:dword ptr[esp] - ret - -public vmJumpAndInvoke -vmJumpAndInvoke: - ; vmJumpAndInvoke should only be called when continuations are - ; enabled - int 3 - -_TEXT ENDS - -END diff --git a/sgx-jvm/avian/src/compile-x86_64.S b/sgx-jvm/avian/src/compile-x86_64.S deleted file mode 100644 index d6ddd2052f..0000000000 --- a/sgx-jvm/avian/src/compile-x86_64.S +++ /dev/null @@ -1,455 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/types.h" -#include "avian/target-fields.h" - -#define LOCAL(x) .L##x - -#if defined __APPLE__ \ - || ((defined __MINGW32__ || defined __CYGWIN32__) && ! defined __x86_64__) -# define GLOBAL(x) _##x -#else -# define GLOBAL(x) x -#endif - -.text - -#ifdef __x86_64__ - -#ifdef AVIAN_USE_FRAME_POINTER -# define ALIGNMENT_ADJUSTMENT 0 -#else -# define ALIGNMENT_ADJUSTMENT 8 -#endif - -#if defined __MINGW32__ || defined __CYGWIN32__ - -#define CALLEE_SAVED_REGISTER_FOOTPRINT 64 + ALIGNMENT_ADJUSTMENT - -.globl GLOBAL(vmInvoke) -GLOBAL(vmInvoke): - pushq %rbp - movq %rsp,%rbp - - // %rcx: thread - // %rdx: function - // %r8 : arguments - // %r9 : argumentsFootprint - // 48(%rbp) : frameSize - // 56(%rbp) : returnType (ignored) - - // allocate stack space for callee-saved registers - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // remember this stack position, since we won't be able to rely on - // %rbp being restored when the call returns - movq %rsp,TARGET_THREAD_SCRATCH(%rcx) - - // save callee-saved registers - movq %rbx,0(%rsp) - movq %r12,8(%rsp) - movq %r13,16(%rsp) - movq %r14,24(%rsp) - movq %r15,32(%rsp) - movq %rsi,40(%rsp) - movq %rdi,48(%rsp) - - // allocate stack space for arguments - movl 48(%rbp),%eax - subq %rax,%rsp - - // we use rbx to hold the thread pointer, by convention - mov %rcx,%rbx - - // copy arguments into place - movq $0,%r11 - jmp LOCAL(vmInvoke_argumentTest) - -LOCAL(vmInvoke_argumentLoop): - movq (%r8,%r11,1),%rsi - movq %rsi,(%rsp,%r11,1) - addq $8,%r11 - -LOCAL(vmInvoke_argumentTest): - cmpq %r9,%r11 - jb LOCAL(vmInvoke_argumentLoop) - - // call function - call *%rdx - -.globl GLOBAL(vmInvoke_returnAddress) -GLOBAL(vmInvoke_returnAddress): - // restore stack pointer - movq TARGET_THREAD_SCRATCH(%rbx),%rsp - - // clear MyThread::stack to avoid confusing another thread calling - // java.lang.Thread.getStackTrace on this one. See - // MyProcess::getStackTrace in compile.cpp for details on how we get - // a reliable stack trace from a thread that might be interrupted at - // any point in its execution. - movq $0,TARGET_THREAD_STACK(%rbx) - -.globl GLOBAL(vmInvoke_safeStack) -GLOBAL(vmInvoke_safeStack): - -#ifdef AVIAN_CONTINUATIONS -# include "continuations-x86.S" -#endif // AVIAN_CONTINUATIONS - - // restore callee-saved registers - movq 0(%rsp),%rbx - movq 8(%rsp),%r12 - movq 16(%rsp),%r13 - movq 24(%rsp),%r14 - movq 32(%rsp),%r15 - movq 40(%rsp),%rsi - movq 48(%rsp),%rdi - - addq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // return - popq %rbp - ret - -.globl GLOBAL(vmJumpAndInvoke) -GLOBAL(vmJumpAndInvoke): -#ifdef AVIAN_CONTINUATIONS - // %rcx: thread - // %rdx: address - // %r8 : stack - // %r9 : argumentFootprint - // 40(%rsp): arguments - // 48(%rsp): frameSize - - // allocate new frame, adding room for callee-saved registers - movl 48(%rsp),%eax - subq %rax,%r8 - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%r8 - - movq %rcx,%rbx - - // set return address - leaq GLOBAL(vmInvoke_returnAddress)(%rip),%r10 - movq %r10,(%r8) - - // copy arguments into place - movq $0,%r11 - movl 40(%rsp),%eax - jmp LOCAL(vmJumpAndInvoke_argumentTest) - -LOCAL(vmJumpAndInvoke_argumentLoop): - movq (%rax,%r11,1),%r10 - movq %r10,8(%r8,%r11,1) - addq $8,%r11 - -LOCAL(vmJumpAndInvoke_argumentTest): - cmpq %r9,%r11 - jb LOCAL(vmJumpAndInvoke_argumentLoop) - - // the arguments have been copied, so we can set the real stack - // pointer now - movq %r8,%rsp - - jmp *%rdx -#else // not AVIAN_CONTINUATIONS - // vmJumpAndInvoke should only be called when continuations are - // enabled - int3 -#endif // not AVIAN_CONTINUATIONS - -#else // not __MINGW32__ || __CYGWIN32__ - -#define CALLEE_SAVED_REGISTER_FOOTPRINT 48 + ALIGNMENT_ADJUSTMENT - -.globl GLOBAL(vmInvoke) -GLOBAL(vmInvoke): - pushq %rbp - movq %rsp,%rbp - - // %rdi: thread - // %rsi: function - // %rdx: arguments - // %rcx: argumentFootprint - // %r8 : frameSize - // %r9 : returnType (ignored) - - // allocate stack space for callee-saved registers - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // remember this stack position, since we won't be able to rely on - // %rbp being restored when the call returns - movq %rsp,TARGET_THREAD_SCRATCH(%rdi) - - // save callee-saved registers - movq %rbx,0(%rsp) - movq %r12,8(%rsp) - movq %r13,16(%rsp) - movq %r14,24(%rsp) - movq %r15,32(%rsp) - - // allocate stack space for arguments - subq %r8,%rsp - - // we use rbx to hold the thread pointer, by convention - mov %rdi,%rbx - - // copy arguments into place - movq $0,%r9 - jmp LOCAL(vmInvoke_argumentTest) - -LOCAL(vmInvoke_argumentLoop): - movq (%rdx,%r9,1),%r8 - movq %r8,(%rsp,%r9,1) - addq $8,%r9 - -LOCAL(vmInvoke_argumentTest): - cmpq %rcx,%r9 - jb LOCAL(vmInvoke_argumentLoop) - - // call function - call *%rsi - -.globl GLOBAL(vmInvoke_returnAddress) -GLOBAL(vmInvoke_returnAddress): - // restore stack pointer - movq TARGET_THREAD_SCRATCH(%rbx),%rsp - - // clear MyThread::stack to avoid confusing another thread calling - // java.lang.Thread.getStackTrace on this one. See - // MyProcess::getStackTrace in compile.cpp for details on how we get - // a reliable stack trace from a thread that might be interrupted at - // any point in its execution. - movq $0,TARGET_THREAD_STACK(%rbx) - -.globl GLOBAL(vmInvoke_safeStack) -GLOBAL(vmInvoke_safeStack): - -#ifdef AVIAN_CONTINUATIONS -# include "continuations-x86.S" -#endif // AVIAN_CONTINUATIONS - - // restore callee-saved registers - movq 0(%rsp),%rbx - movq 8(%rsp),%r12 - movq 16(%rsp),%r13 - movq 24(%rsp),%r14 - movq 32(%rsp),%r15 - - addq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // return - popq %rbp - ret - -.globl GLOBAL(vmJumpAndInvoke) -GLOBAL(vmJumpAndInvoke): -#ifdef AVIAN_CONTINUATIONS - // %rdi: thread - // %rsi: address - // %rdx: stack - // %rcx: argumentFootprint - // %r8 : arguments - // %r9 : frameSize - - // allocate new frame, adding room for callee-saved registers - subq %r9,%rdx - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rdx - - movq %rdi,%rbx - - // set return address - movq GLOBAL(vmInvoke_returnAddress)@GOTPCREL(%rip),%r10 - movq %r10,(%rdx) - - // copy arguments into place - movq $0,%r11 - jmp LOCAL(vmJumpAndInvoke_argumentTest) - -LOCAL(vmJumpAndInvoke_argumentLoop): - movq (%r8,%r11,1),%r10 - movq %r10,8(%rdx,%r11,1) - addq $8,%r11 - -LOCAL(vmJumpAndInvoke_argumentTest): - cmpq %rcx,%r11 - jb LOCAL(vmJumpAndInvoke_argumentLoop) - - // the arguments have been copied, so we can set the real stack - // pointer now - movq %rdx,%rsp - - jmp *%rsi -#else // not AVIAN_CONTINUATIONS - // vmJumpAndInvoke should only be called when continuations are - // enabled - int3 -#endif // not AVIAN_CONTINUATIONS - -#endif // not __MINGW32__ || __CYGWIN32__ - -#elif defined __i386__ - -#ifdef AVIAN_USE_FRAME_POINTER -# define ALIGNMENT_ADJUSTMENT 0 -#else -# define ALIGNMENT_ADJUSTMENT 12 -#endif - -#define CALLEE_SAVED_REGISTER_FOOTPRINT 16 + ALIGNMENT_ADJUSTMENT - -.globl GLOBAL(vmInvoke) -GLOBAL(vmInvoke): - pushl %ebp - movl %esp,%ebp - - // 8(%ebp): thread - // 12(%ebp): function - // 16(%ebp): arguments - // 20(%ebp): argumentFootprint - // 24(%ebp): frameSize - // 28(%ebp): returnType - - // allocate stack space for callee-saved registers - subl $CALLEE_SAVED_REGISTER_FOOTPRINT,%esp - - // remember this stack position, since we won't be able to rely on - // %rbp being restored when the call returns - movl 8(%ebp),%eax - movl %esp,TARGET_THREAD_SCRATCH(%eax) - - movl %ebx,0(%esp) - movl %esi,4(%esp) - movl %edi,8(%esp) - - // allocate stack space for arguments - subl 24(%ebp),%esp - - // we use ebx to hold the thread pointer, by convention - mov %eax,%ebx - - // copy arguments into place - movl $0,%ecx - movl 16(%ebp),%edx - jmp LOCAL(vmInvoke_argumentTest) - -LOCAL(vmInvoke_argumentLoop): - movl (%edx,%ecx,1),%eax - movl %eax,(%esp,%ecx,1) - addl $4,%ecx - -LOCAL(vmInvoke_argumentTest): - cmpl 20(%ebp),%ecx - jb LOCAL(vmInvoke_argumentLoop) - - // call function - call *12(%ebp) - -.globl GLOBAL(vmInvoke_returnAddress) -GLOBAL(vmInvoke_returnAddress): - // restore stack pointer - movl TARGET_THREAD_SCRATCH(%ebx),%esp - - // clear MyThread::stack to avoid confusing another thread calling - // java.lang.Thread.getStackTrace on this one. See - // MyProcess::getStackTrace in compile.cpp for details on how we get - // a reliable stack trace from a thread that might be interrupted at - // any point in its execution. - movl $0,TARGET_THREAD_STACK(%ebx) - -.globl GLOBAL(vmInvoke_safeStack) -GLOBAL(vmInvoke_safeStack): - -#ifdef AVIAN_CONTINUATIONS -# include "continuations-x86.S" -#endif // AVIAN_CONTINUATIONS - - // restore callee-saved registers - movl 0(%esp),%ebx - movl 4(%esp),%esi - movl 8(%esp),%edi - - addl $CALLEE_SAVED_REGISTER_FOOTPRINT,%esp - - // handle return value based on expected type - movl 28(%esp),%ecx - - popl %ebp - ret - -LOCAL(getPC): - movl (%esp),%esi - ret - -.globl GLOBAL(vmJumpAndInvoke) -GLOBAL(vmJumpAndInvoke): -#ifdef AVIAN_CONTINUATIONS - // 4(%esp): thread - // 8(%esp): address - // 12(%esp): stack - // 16(%esp): argumentFootprint - // 20(%esp): arguments - // 24(%esp): frameSize - - movl 12(%esp),%ecx - - // allocate new frame, adding room for callee-saved registers, - // return address, and frame pointer - subl 24(%esp),%ecx - subl $CALLEE_SAVED_REGISTER_FOOTPRINT+8,%ecx - - movl 4(%esp),%ebx - - // set return address -#if defined __MINGW32__ || defined __CYGWIN32__ - movl $GLOBAL(vmInvoke_returnAddress),%esi -#else - call LOCAL(getPC) -# if defined __APPLE__ -LOCAL(vmJumpAndInvoke_offset): - leal GLOBAL(vmInvoke_returnAddress)-LOCAL(vmJumpAndInvoke_offset)(%esi),%esi -# else - addl $_GLOBAL_OFFSET_TABLE_,%esi - movl GLOBAL(vmInvoke_returnAddress)@GOT(%esi),%esi -# endif -#endif - movl %esi,(%ecx) - - // copy arguments into place - movl $0,%esi - movl 16(%esp),%edx - movl 20(%esp),%eax - jmp LOCAL(vmJumpAndInvoke_argumentTest) - -LOCAL(vmJumpAndInvoke_argumentLoop): - movl (%eax,%esi,1),%edi - movl %edi,4(%ecx,%esi,1) - addl $4,%esi - -LOCAL(vmJumpAndInvoke_argumentTest): - cmpl %edx,%esi - jb LOCAL(vmJumpAndInvoke_argumentLoop) - - movl 8(%esp),%esi - - // the arguments have been copied, so we can set the real stack - // pointer now - movl %ecx,%esp - - jmp *%esi -#else // not AVIAN_CONTINUATIONS - // vmJumpAndInvoke should only be called when continuations are - // enabled - int3 -#endif // AVIAN_CONTINUATIONS - -#else -#error unsupported architecture -#endif //def __x86_64__ diff --git a/sgx-jvm/avian/src/compile.cpp b/sgx-jvm/avian/src/compile.cpp deleted file mode 100644 index c1365b3855..0000000000 --- a/sgx-jvm/avian/src/compile.cpp +++ /dev/null @@ -1,10776 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/machine.h" -#include "avian/util.h" -#include "avian/alloc-vector.h" -#include "avian/process.h" -#include "avian/target.h" -#include "avian/arch.h" - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "debug-util.h" - -using namespace vm; - -extern "C" uint64_t vmInvoke(void* thread, - void* function, - void* arguments, - unsigned argumentFootprint, - unsigned frameSize, - unsigned returnType); - -extern "C" void vmInvoke_returnAddress(); - -extern "C" void vmInvoke_safeStack(); - -extern "C" void vmJumpAndInvoke(void* thread, - void* function, - void* stack, - unsigned argumentFootprint, - uintptr_t* arguments, - unsigned frameSize); - -using namespace avian::codegen; -using namespace avian::system; - -namespace { - -namespace local { - -const bool DebugCompile = false; -const bool DebugNatives = false; -const bool DebugCallTable = false; -const bool DebugMethodTree = false; -const bool DebugInstructions = false; - -#ifndef AVIAN_AOT_ONLY -const bool DebugFrameMaps = false; -const bool CheckArrayBounds = true; -const unsigned ExecutableAreaSizeInBytes = 30 * 1024 * 1024; -#endif - -#ifdef AVIAN_CONTINUATIONS -const bool Continuations = true; -#else -const bool Continuations = false; -#endif - -const unsigned MaxNativeCallFootprint = TargetBytesPerWord == 8 ? 4 : 5; - -const unsigned InitialZoneCapacityInBytes = 64 * 1024; - -enum ThunkIndex { - compileMethodIndex, - compileVirtualMethodIndex, - linkDynamicMethodIndex, - invokeNativeIndex, - throwArrayIndexOutOfBoundsIndex, - throwStackOverflowIndex, - -#define THUNK(s) s##Index, -#include "thunks.cpp" -#undef THUNK - dummyIndex -}; - -inline bool isVmInvokeUnsafeStack(void* ip) -{ - return reinterpret_cast(ip) - >= reinterpret_cast(voidPointer(vmInvoke_returnAddress)) - and reinterpret_cast(ip) - < reinterpret_cast(voidPointer(vmInvoke_safeStack)); -} - -class MyThread; - -void* getIp(MyThread*); - -class MyThread : public Thread { - public: - class CallTrace { - public: - CallTrace(MyThread* t, GcMethod* method) - : t(t), - ip(getIp(t)), - stack(t->stack), - scratch(t->scratch), - continuation(t->continuation), - nativeMethod((method->flags() & ACC_NATIVE) ? method : 0), - targetMethod(0), - originalMethod(method), - next(t->trace) - { - doTransition(t, 0, 0, 0, this); - } - - ~CallTrace() - { - assertT(t, t->stack == 0); - - t->scratch = scratch; - - doTransition(t, ip, stack, continuation, next); - } - - MyThread* t; - void* ip; - void* stack; - void* scratch; - GcContinuation* continuation; - GcMethod* nativeMethod; - GcMethod* targetMethod; - GcMethod* originalMethod; - CallTrace* next; - }; - - class Context { - public: - class MyProtector : public Thread::Protector { - public: - MyProtector(MyThread* t, Context* context) - : Protector(t), context(context) - { - } - - virtual void visit(Heap::Visitor* v) - { - v->visit(&(context->continuation)); - } - - Context* context; - }; - - Context(MyThread* t, - void* ip, - void* stack, - GcContinuation* continuation, - CallTrace* trace) - : ip(ip), - stack(stack), - continuation(continuation), - trace(trace), - protector(t, this) - { - } - - void* ip; - void* stack; - GcContinuation* continuation; - CallTrace* trace; - MyProtector protector; - }; - - class TraceContext : public Context { - public: - TraceContext(MyThread* t, - void* ip, - void* stack, - GcContinuation* continuation, - CallTrace* trace) - : Context(t, ip, stack, continuation, trace), - t(t), - link(0), - next(t->traceContext), - methodIsMostRecent(false) - { - t->traceContext = this; - } - - TraceContext(MyThread* t, void* link) - : Context(t, t->ip, t->stack, t->continuation, t->trace), - t(t), - link(link), - next(t->traceContext), - methodIsMostRecent(false) - { - t->traceContext = this; - } - - ~TraceContext() - { - t->traceContext = next; - } - - MyThread* t; - void* link; - TraceContext* next; - bool methodIsMostRecent; - }; - - static void doTransition(MyThread* t, - void* ip, - void* stack, - GcContinuation* continuation, - MyThread::CallTrace* trace) - { - // in this function, we "atomically" update the thread context - // fields in such a way to ensure that another thread may - // interrupt us at any time and still get a consistent, accurate - // stack trace. See MyProcessor::getStackTrace for details. - - assertT(t, t->transition == 0); - - Context c(t, ip, stack, continuation, trace); - - compileTimeMemoryBarrier(); - - t->transition = &c; - - compileTimeMemoryBarrier(); - - t->ip = ip; - t->stack = stack; - t->continuation = continuation; - t->trace = trace; - - compileTimeMemoryBarrier(); - - t->transition = 0; - } - - MyThread(Machine* m, - GcThread* javaThread, - MyThread* parent, - bool useNativeFeatures) - : Thread(m, javaThread, parent), - ip(0), - stack(0), - newStack(0), - scratch(0), - continuation(0), - exceptionStackAdjustment(0), - exceptionOffset(0), - exceptionHandler(0), - tailAddress(0), - virtualCallTarget(0), - virtualCallIndex(0), - heapImage(0), - codeImage(0), - thunkTable(0), - dynamicTable(0), - trace(0), - reference(0), - arch(parent ? parent->arch : avian::codegen::makeArchitectureNative( - m->system, - useNativeFeatures)), - transition(0), - traceContext(0), - stackLimit(0), - referenceFrame(0), - methodLockIsClean(true) - { - arch->acquire(); - } - - void* ip; - void* stack; - void* newStack; - void* scratch; - GcContinuation* continuation; - uintptr_t exceptionStackAdjustment; - uintptr_t exceptionOffset; - void* exceptionHandler; - void* tailAddress; - void* virtualCallTarget; - uintptr_t virtualCallIndex; - uintptr_t* heapImage; - uint8_t* codeImage; - void** thunkTable; - void** dynamicTable; - CallTrace* trace; - Reference* reference; - avian::codegen::Architecture* arch; - Context* transition; - TraceContext* traceContext; - uintptr_t stackLimit; - List* referenceFrame; - bool methodLockIsClean; -}; - -void transition(MyThread* t, - void* ip, - void* stack, - GcContinuation* continuation, - MyThread::CallTrace* trace) -{ - MyThread::doTransition(t, ip, stack, continuation, trace); -} - -object resolveThisPointer(MyThread* t, void* stack) -{ - return reinterpret_cast( - stack)[t->arch->frameFooterSize() + t->arch->frameReturnAddressSize()]; -} - -GcMethod* findMethod(Thread* t, GcMethod* method, object instance) -{ - if ((method->flags() & ACC_STATIC) == 0) { - if (method->class_()->flags() & ACC_INTERFACE) { - return findInterfaceMethod(t, method, objectClass(t, instance)); - } else if (methodVirtual(t, method)) { - return findVirtualMethod(t, method, objectClass(t, instance)); - } - } - return method; -} - -GcMethod* resolveTarget(MyThread* t, void* stack, GcMethod* method) -{ - GcClass* class_ = objectClass(t, resolveThisPointer(t, stack)); - - if (class_->vmFlags() & BootstrapFlag) { - PROTECT(t, method); - PROTECT(t, class_); - - resolveSystemClass(t, roots(t)->bootLoader(), class_->name()); - } - - if (method->class_()->flags() & ACC_INTERFACE) { - return findInterfaceMethod(t, method, class_); - } else { - return findVirtualMethod(t, method, class_); - } -} - -GcMethod* resolveTarget(MyThread* t, GcClass* class_, unsigned index) -{ - if (class_->vmFlags() & BootstrapFlag) { - PROTECT(t, class_); - - resolveSystemClass(t, roots(t)->bootLoader(), class_->name()); - } - - return cast( - t, cast(t, class_->virtualTable())->body()[index]); -} - -GcCompileRoots* compileRoots(Thread* t); - -intptr_t methodCompiled(Thread* t UNUSED, GcMethod* method) -{ - return method->code()->compiled(); -} - -unsigned methodCompiledSize(Thread* t UNUSED, GcMethod* method) -{ - return method->code()->compiledSize(); -} - -intptr_t compareIpToMethodBounds(Thread* t, intptr_t ip, object om) -{ - GcMethod* method = cast(t, om); - intptr_t start = methodCompiled(t, method); - - if (DebugMethodTree) { - fprintf(stderr, - "find %p in (%p,%p)\n", - reinterpret_cast(ip), - reinterpret_cast(start), - reinterpret_cast(start + methodCompiledSize(t, method))); - } - - if (ip < start) { - return -1; - } else if (ip < start - + static_cast(methodCompiledSize(t, method))) { - return 0; - } else { - return 1; - } -} - -GcMethod* methodForIp(MyThread* t, void* ip) -{ - if (DebugMethodTree) { - fprintf(stderr, "query for method containing %p\n", ip); - } - - // we must use a version of the method tree at least as recent as the - // compiled form of the method containing the specified address (see - // compile(MyThread*, FixedAllocator*, BootContext*, object)): - loadMemoryBarrier(); - - return cast(t, - treeQuery(t, - compileRoots(t)->methodTree(), - reinterpret_cast(ip), - compileRoots(t)->methodTreeSentinal(), - compareIpToMethodBounds)); -} - -unsigned localSize(MyThread* t UNUSED, GcMethod* method) -{ - unsigned size = method->code()->maxLocals(); - if ((method->flags() & (ACC_SYNCHRONIZED | ACC_STATIC)) == ACC_SYNCHRONIZED) { - ++size; - } - return size; -} - -unsigned alignedFrameSize(MyThread* t, GcMethod* method) -{ - return t->arch->alignFrameSize( - localSize(t, method) - method->parameterFootprint() - + method->code()->maxStack() - + t->arch->frameFootprint(MaxNativeCallFootprint)); -} - -void nextFrame(MyThread* t, - void** ip, - void** sp, - GcMethod* method, - GcMethod* target, - bool mostRecent) -{ - GcCode* code = method->code(); - intptr_t start = code->compiled(); - void* link; - bool methodIsMostRecent; - - if (t->traceContext) { - link = t->traceContext->link; - methodIsMostRecent = mostRecent and t->traceContext->methodIsMostRecent; - } else { - link = 0; - methodIsMostRecent = false; - } - - if (false) { - fprintf(stderr, - "nextFrame %s.%s%s target %s.%s%s ip %p sp %p\n", - method->class_()->name()->body().begin(), - method->name()->body().begin(), - method->spec()->body().begin(), - target ? target->class_()->name()->body().begin() : 0, - target ? target->name()->body().begin() : 0, - target ? target->spec()->body().begin() : 0, - *ip, - *sp); - } - - t->arch->nextFrame(reinterpret_cast(start), - code->compiledSize(), - alignedFrameSize(t, method), - link, - methodIsMostRecent, - target ? target->parameterFootprint() : -1, - ip, - sp); - - if (false) { - fprintf(stderr, "next frame ip %p sp %p\n", *ip, *sp); - } -} - -void* getIp(MyThread* t, void* ip, void* stack) -{ - // Here we use the convention that, if the return address is neither - // pushed on to the stack automatically as part of the call nor - // stored in the caller's frame, it will be saved in MyThread::ip - // instead of on the stack. See the various implementations of - // Assembler::saveFrame for details on how this is done. - return t->arch->returnAddressOffset() < 0 ? ip : t->arch->frameIp(stack); -} - -void* getIp(MyThread* t) -{ - return getIp(t, t->ip, t->stack); -} - -class MyStackWalker : public Processor::StackWalker { - public: - enum State { Start, Next, Trace, Continuation, Method, NativeMethod, Finish }; - - class MyProtector : public Thread::Protector { - public: - MyProtector(MyStackWalker* walker) : Protector(walker->t), walker(walker) - { - } - - virtual void visit(Heap::Visitor* v) - { - v->visit(&(walker->method_)); - v->visit(&(walker->target)); - v->visit(&(walker->continuation)); - } - - MyStackWalker* walker; - }; - - MyStackWalker(MyThread* t) - : t(t), state(Start), method_(0), target(0), count_(0), protector(this) - { - if (t->traceContext) { - ip_ = t->traceContext->ip; - stack = t->traceContext->stack; - trace = t->traceContext->trace; - continuation = t->traceContext->continuation; - } else { - ip_ = getIp(t); - stack = t->stack; - trace = t->trace; - continuation = t->continuation; - } - } - - MyStackWalker(MyStackWalker* w) - : t(w->t), - state(w->state), - ip_(w->ip_), - stack(w->stack), - trace(w->trace), - method_(w->method_), - target(w->target), - continuation(w->continuation), - count_(w->count_), - protector(this) - { - } - - virtual void walk(Processor::StackVisitor* v) - { - for (MyStackWalker it(this); it.valid();) { - MyStackWalker walker(&it); - if (not v->visit(&walker)) { - break; - } - it.next(); - } - } - - bool valid() - { - while (true) { - if (false) { - fprintf(stderr, "state: %d\n", state); - } - switch (state) { - case Start: - if (trace and trace->nativeMethod) { - method_ = trace->nativeMethod; - state = NativeMethod; - } else { - state = Next; - } - break; - - case Next: - if (stack) { - target = method_; - method_ = methodForIp(t, ip_); - if (method_) { - state = Method; - } else if (continuation) { - method_ = continuation->method(); - state = Continuation; - } else { - state = Trace; - } - } else { - state = Trace; - } - break; - - case Trace: { - if (trace) { - continuation = trace->continuation; - stack = trace->stack; - ip_ = trace->ip; - trace = trace->next; - - state = Start; - } else { - state = Finish; - } - } break; - - case Continuation: - case Method: - case NativeMethod: - return true; - - case Finish: - return false; - - default: - abort(t); - } - } - } - - void next() - { - expect(t, count_ <= stackSizeInWords(t)); - - switch (state) { - case Continuation: - continuation = continuation->next(); - break; - - case Method: - nextFrame(t, &ip_, &stack, method_, target, count_ == 0); - break; - - case NativeMethod: - break; - - default: - abort(t); - } - - ++count_; - - state = Next; - } - - virtual GcMethod* method() - { - if (false) { - fprintf(stderr, - "method %s.%s\n", - method_->class_()->name()->body().begin(), - method_->name()->body().begin()); - } - return method_; - } - - virtual int ip() - { - switch (state) { - case Continuation: - return reinterpret_cast(continuation->address()) - - methodCompiled(t, continuation->method()); - - case Method: - return reinterpret_cast(ip_) - methodCompiled(t, method_); - - case NativeMethod: - return 0; - - default: - abort(t); - } - } - - virtual unsigned count() - { - unsigned count = 0; - - for (MyStackWalker walker(this); walker.valid();) { - walker.next(); - ++count; - } - - return count; - } - - MyThread* t; - State state; - void* ip_; - void* stack; - MyThread::CallTrace* trace; - GcMethod* method_; - GcMethod* target; - GcContinuation* continuation; - unsigned count_; - MyProtector protector; -}; - -int localOffset(MyThread* t, int v, GcMethod* method) -{ - int parameterFootprint = method->parameterFootprint(); - int frameSize = alignedFrameSize(t, method); - - int offset - = ((v < parameterFootprint) - ? (frameSize + parameterFootprint + t->arch->frameFooterSize() - + t->arch->frameHeaderSize() - v - 1) - : (frameSize + parameterFootprint - v - 1)); - - assertT(t, offset >= 0); - return offset; -} - -int localOffsetFromStack(MyThread* t, int index, GcMethod* method) -{ - return localOffset(t, index, method) + t->arch->frameReturnAddressSize(); -} - -object* localObject(MyThread* t, void* stack, GcMethod* method, unsigned index) -{ - return static_cast(stack) + localOffsetFromStack(t, index, method); -} - -int stackOffsetFromFrame(MyThread* t, GcMethod* method) -{ - return alignedFrameSize(t, method) + t->arch->frameHeaderSize(); -} - -void* stackForFrame(MyThread* t, void* frame, GcMethod* method) -{ - return static_cast(frame) - stackOffsetFromFrame(t, method); -} - -class PoolElement : public avian::codegen::Promise { - public: - PoolElement(Thread* t, object target, PoolElement* next) - : t(t), target(target), address(0), next(next) - { - } - - virtual int64_t value() - { - assertT(t, resolved()); - return address; - } - - virtual bool resolved() - { - return address != 0; - } - - Thread* t; - object target; - intptr_t address; - PoolElement* next; -}; - -class Subroutine { - public: - Subroutine(unsigned index, - unsigned returnAddress, - unsigned methodSize, - Subroutine* outer) - : index(index), - outer(outer), - returnAddress(returnAddress), - duplicatedBaseIp(methodSize * index), - visited(false) - { - } - - // Index of this subroutine, in the (unmaterialized) list of subroutines in - // this method. - // Note that in the presence of nested finallys, this could theoretically end - // up being greater than the number of jsr instructions (but this will be - // extremely rare - I don't think we've seen this in practice). - const unsigned index; - - // Subroutine outer to this one (if, for instance, we have nested finallys) - Subroutine* const outer; - - // Starting ip in the original bytecode (always < original bytecode size) - const unsigned returnAddress; - - // Starting ip for this subroutine's copy of the method bytecode - const unsigned duplicatedBaseIp; - - bool visited; -}; - -class Context; - -class TraceElement : public avian::codegen::TraceHandler { - public: - static const unsigned VirtualCall = 1 << 0; - static const unsigned TailCall = 1 << 1; - static const unsigned LongCall = 1 << 2; - - TraceElement(Context* context, - unsigned ip, - GcMethod* target, - unsigned flags, - TraceElement* next, - unsigned mapSize) - : context(context), - address(0), - next(next), - target(target), - ip(ip), - argumentIndex(0), - flags(flags), - watch(false) - { - memset(map, 0xFF, mapSize * BytesPerWord); - } - - virtual void handleTrace(avian::codegen::Promise* address, - unsigned argumentIndex) - { - if (this->address == 0) { - this->address = address; - this->argumentIndex = argumentIndex; - } - } - - Context* context; - avian::codegen::Promise* address; - TraceElement* next; - GcMethod* target; - unsigned ip; - unsigned argumentIndex; - unsigned flags; - bool watch; - uintptr_t map[0]; -}; - -class TraceElementPromise : public avian::codegen::Promise { - public: - TraceElementPromise(System* s, TraceElement* trace) : s(s), trace(trace) - { - } - - virtual int64_t value() - { - assertT(s, resolved()); - return trace->address->value(); - } - - virtual bool resolved() - { - return trace->address != 0 and trace->address->resolved(); - } - - System* s; - TraceElement* trace; -}; - -enum Event { - PushContextEvent, - PopContextEvent, - IpEvent, - MarkEvent, - ClearEvent, - PushExceptionHandlerEvent, - TraceEvent, -}; - -unsigned frameMapSizeInBits(MyThread* t, GcMethod* method) -{ - return localSize(t, method) + method->code()->maxStack(); -} - -unsigned frameMapSizeInWords(MyThread* t, GcMethod* method) -{ - return ceilingDivide(frameMapSizeInBits(t, method), BitsPerWord); -} - -enum Thunk { -#define THUNK(s) s##Thunk, - -#include "thunks.cpp" - -#undef THUNK -}; - -const unsigned ThunkCount = idleIfNecessaryThunk + 1; - -intptr_t getThunk(MyThread* t, Thunk thunk); - -class BootContext { - public: - class MyProtector : public Thread::Protector { - public: - MyProtector(Thread* t, BootContext* c) : Protector(t), c(c) - { - } - - virtual void visit(Heap::Visitor* v) - { - v->visit(&(c->constants)); - v->visit(&(c->calls)); - } - - BootContext* c; - }; - - BootContext(Thread* t, - GcTriple* constants, - GcTriple* calls, - avian::codegen::DelayedPromise* addresses, - Zone* zone, - OffsetResolver* resolver, - JavaVM* hostVM) - : protector(t, this), - constants(constants), - calls(calls), - addresses(addresses), - addressSentinal(addresses), - zone(zone), - resolver(resolver), - hostVM(hostVM) - { - } - - MyProtector protector; - GcTriple* constants; - GcTriple* calls; - avian::codegen::DelayedPromise* addresses; - avian::codegen::DelayedPromise* addressSentinal; - Zone* zone; - OffsetResolver* resolver; - JavaVM* hostVM; -}; - -class Context { - public: - class MyResource : public Thread::AutoResource { - public: - MyResource(Context* c) : AutoResource(c->thread), c(c) - { - } - - virtual void release() - { - c->dispose(); - } - - Context* c; - }; - - class MyProtector : public Thread::Protector { - public: - MyProtector(Context* c) : Protector(c->thread), c(c) - { - } - - virtual void visit(Heap::Visitor* v) - { - v->visit(&(c->method)); - - for (PoolElement* p = c->objectPool; p; p = p->next) { - v->visit(&(p->target)); - } - - for (TraceElement* p = c->traceLog; p; p = p->next) { - v->visit(&(p->target)); - } - } - - Context* c; - }; - - class MyClient : public Compiler::Client { - public: - MyClient(MyThread* t) : t(t) - { - } - - virtual intptr_t getThunk(avian::codegen::lir::UnaryOperation, unsigned) - { - abort(t); - } - - virtual intptr_t getThunk(avian::codegen::lir::BinaryOperation op, - unsigned size, - unsigned resultSize) - { - if (size == 8) { - switch (op) { - case avian::codegen::lir::Absolute: - assertT(t, resultSize == 8); - return local::getThunk(t, absoluteLongThunk); - - case avian::codegen::lir::FloatNegate: - assertT(t, resultSize == 8); - return local::getThunk(t, negateDoubleThunk); - - case avian::codegen::lir::FloatSquareRoot: - assertT(t, resultSize == 8); - return local::getThunk(t, squareRootDoubleThunk); - - case avian::codegen::lir::Float2Float: - assertT(t, resultSize == 4); - return local::getThunk(t, doubleToFloatThunk); - - case avian::codegen::lir::Float2Int: - if (resultSize == 8) { - return local::getThunk(t, doubleToLongThunk); - } else { - assertT(t, resultSize == 4); - return local::getThunk(t, doubleToIntThunk); - } - - case avian::codegen::lir::Int2Float: - if (resultSize == 8) { - return local::getThunk(t, longToDoubleThunk); - } else { - assertT(t, resultSize == 4); - return local::getThunk(t, longToFloatThunk); - } - - default: - abort(t); - } - } else { - assertT(t, size == 4); - - switch (op) { - case avian::codegen::lir::Absolute: - assertT(t, resultSize == 4); - return local::getThunk(t, absoluteIntThunk); - - case avian::codegen::lir::FloatNegate: - assertT(t, resultSize == 4); - return local::getThunk(t, negateFloatThunk); - - case avian::codegen::lir::FloatAbsolute: - assertT(t, resultSize == 4); - return local::getThunk(t, absoluteFloatThunk); - - case avian::codegen::lir::Float2Float: - assertT(t, resultSize == 8); - return local::getThunk(t, floatToDoubleThunk); - - case avian::codegen::lir::Float2Int: - if (resultSize == 4) { - return local::getThunk(t, floatToIntThunk); - } else { - assertT(t, resultSize == 8); - return local::getThunk(t, floatToLongThunk); - } - - case avian::codegen::lir::Int2Float: - if (resultSize == 4) { - return local::getThunk(t, intToFloatThunk); - } else { - assertT(t, resultSize == 8); - return local::getThunk(t, intToDoubleThunk); - } - - default: - abort(t); - } - } - } - - virtual intptr_t getThunk(avian::codegen::lir::TernaryOperation op, - unsigned size, - unsigned, - bool* threadParameter) - { - *threadParameter = false; - - if (size == 8) { - switch (op) { - case avian::codegen::lir::Divide: - *threadParameter = true; - return local::getThunk(t, divideLongThunk); - - case avian::codegen::lir::Remainder: - *threadParameter = true; - return local::getThunk(t, moduloLongThunk); - - case avian::codegen::lir::FloatAdd: - return local::getThunk(t, addDoubleThunk); - - case avian::codegen::lir::FloatSubtract: - return local::getThunk(t, subtractDoubleThunk); - - case avian::codegen::lir::FloatMultiply: - return local::getThunk(t, multiplyDoubleThunk); - - case avian::codegen::lir::FloatDivide: - return local::getThunk(t, divideDoubleThunk); - - case avian::codegen::lir::FloatRemainder: - return local::getThunk(t, moduloDoubleThunk); - - case avian::codegen::lir::JumpIfFloatEqual: - case avian::codegen::lir::JumpIfFloatNotEqual: - case avian::codegen::lir::JumpIfFloatLess: - case avian::codegen::lir::JumpIfFloatGreater: - case avian::codegen::lir::JumpIfFloatLessOrEqual: - case avian::codegen::lir::JumpIfFloatGreaterOrUnordered: - case avian::codegen::lir::JumpIfFloatGreaterOrEqualOrUnordered: - return local::getThunk(t, compareDoublesGThunk); - - case avian::codegen::lir::JumpIfFloatGreaterOrEqual: - case avian::codegen::lir::JumpIfFloatLessOrUnordered: - case avian::codegen::lir::JumpIfFloatLessOrEqualOrUnordered: - return local::getThunk(t, compareDoublesLThunk); - - default: - abort(t); - } - } else { - assertT(t, size == 4); - switch (op) { - case avian::codegen::lir::Divide: - *threadParameter = true; - return local::getThunk(t, divideIntThunk); - - case avian::codegen::lir::Remainder: - *threadParameter = true; - return local::getThunk(t, moduloIntThunk); - - case avian::codegen::lir::FloatAdd: - return local::getThunk(t, addFloatThunk); - - case avian::codegen::lir::FloatSubtract: - return local::getThunk(t, subtractFloatThunk); - - case avian::codegen::lir::FloatMultiply: - return local::getThunk(t, multiplyFloatThunk); - - case avian::codegen::lir::FloatDivide: - return local::getThunk(t, divideFloatThunk); - - case avian::codegen::lir::FloatRemainder: - return local::getThunk(t, moduloFloatThunk); - - case avian::codegen::lir::JumpIfFloatEqual: - case avian::codegen::lir::JumpIfFloatNotEqual: - case avian::codegen::lir::JumpIfFloatLess: - case avian::codegen::lir::JumpIfFloatGreater: - case avian::codegen::lir::JumpIfFloatLessOrEqual: - case avian::codegen::lir::JumpIfFloatGreaterOrUnordered: - case avian::codegen::lir::JumpIfFloatGreaterOrEqualOrUnordered: - return local::getThunk(t, compareFloatsGThunk); - - case avian::codegen::lir::JumpIfFloatGreaterOrEqual: - case avian::codegen::lir::JumpIfFloatLessOrUnordered: - case avian::codegen::lir::JumpIfFloatLessOrEqualOrUnordered: - return local::getThunk(t, compareFloatsLThunk); - - default: - abort(t); - } - } - } - - MyThread* t; - }; - - Context(MyThread* t, BootContext* bootContext, GcMethod* method) - : thread(t), - zone(t->m->heap, InitialZoneCapacityInBytes), - assembler(t->arch->makeAssembler(t->m->heap, &zone)), - client(t), - compiler(makeCompiler(t->m->system, assembler, &zone, &client)), - method(method), - bootContext(bootContext), - objectPool(0), - subroutineCount(0), - traceLog(0), - visitTable( - Slice::allocAndSet(&zone, method->code()->length(), 0)), - rootTable(Slice::allocAndSet( - &zone, - method->code()->length() * frameMapSizeInWords(t, method), - ~(uintptr_t)0)), - executableAllocator(0), - executableStart(0), - executableSize(0), - objectPoolCount(0), - traceLogCount(0), - dirtyRoots(false), - leaf(true), - eventLog(t->m->system, t->m->heap, 1024), - protector(this), - resource(this), - argumentBuffer( - (ir::Value**)t->m->heap->allocate(256 * sizeof(ir::Value*)), - 256) // below the maximal allowed parameter count for Java - { - } - - Context(MyThread* t) - : thread(t), - zone(t->m->heap, InitialZoneCapacityInBytes), - assembler(t->arch->makeAssembler(t->m->heap, &zone)), - client(t), - compiler(0), - method(0), - bootContext(0), - objectPool(0), - subroutineCount(0), - traceLog(0), - visitTable(0, 0), - rootTable(0, 0), - executableAllocator(0), - executableStart(0), - executableSize(0), - objectPoolCount(0), - traceLogCount(0), - dirtyRoots(false), - leaf(true), - eventLog(t->m->system, t->m->heap, 0), - protector(this), - resource(this), - argumentBuffer(0, 0) - { - } - - ~Context() - { - dispose(); - } - - void dispose() - { - if (compiler) { - compiler->dispose(); - } - - assembler->dispose(); - - if (executableAllocator) { - executableAllocator->free(executableStart, executableSize); - } - - eventLog.dispose(); - - zone.dispose(); - - if (argumentBuffer.begin()) { - thread->m->heap->free(argumentBuffer.begin(), 256 * sizeof(ir::Value*)); - } - } - - void extendLogicalCode(unsigned more) - { - compiler->extendLogicalCode(more); - visitTable = visitTable.cloneAndSet(&zone, visitTable.count + more, 0); - rootTable = rootTable.cloneAndSet( - &zone, - rootTable.count + more * frameMapSizeInWords(thread, method), - ~(uintptr_t)0); - } - - MyThread* thread; - Zone zone; - avian::codegen::Assembler* assembler; - MyClient client; - avian::codegen::Compiler* compiler; - GcMethod* method; - BootContext* bootContext; - PoolElement* objectPool; - unsigned subroutineCount; - TraceElement* traceLog; - Slice visitTable; - Slice rootTable; - Alloc* executableAllocator; - void* executableStart; - unsigned executableSize; - unsigned objectPoolCount; - unsigned traceLogCount; - bool dirtyRoots; - bool leaf; - Vector eventLog; - MyProtector protector; - MyResource resource; - Slice argumentBuffer; -}; - -unsigned& dynamicIndex(MyThread* t); - -void**& dynamicTable(MyThread* t); - -unsigned& dynamicTableSize(MyThread* t); - -void updateDynamicTable(MyThread* t, MyThread* o) -{ - o->dynamicTable = dynamicTable(t); - if (t->peer) - updateDynamicTable(static_cast(t->peer), o); - if (t->child) - updateDynamicTable(static_cast(t->child), o); -} - -uintptr_t defaultDynamicThunk(MyThread* t); - -uintptr_t compileVirtualThunk(MyThread* t, - unsigned index, - unsigned* size, - uintptr_t thunk, - const char* baseName); - -Allocator* allocator(MyThread* t); - -unsigned addDynamic(MyThread* t, GcInvocation* invocation) -{ - ACQUIRE(t, t->m->classLock); - - int index = invocation->index(); - if (index == -1) { - index = dynamicIndex(t)++; - invocation->index() = index; - - unsigned oldCapacity = roots(t)->invocations() - ? roots(t)->invocations()->length() - : 0; - - if (static_cast(index) >= oldCapacity) { - unsigned newCapacity = oldCapacity ? 2 * oldCapacity : 4096; - - void** newTable = static_cast( - allocator(t)->allocate(newCapacity * BytesPerWord)); - - GcArray* newData = makeArray(t, newCapacity); - PROTECT(t, newData); - - GcWordArray* newThunks = makeWordArray(t, newCapacity * 2); - PROTECT(t, newThunks); - - if (dynamicTable(t)) { - memcpy(newTable, dynamicTable(t), oldCapacity * BytesPerWord); - - for(size_t i = 0; i < oldCapacity; i++) { - newData->setBodyElement(t, i, - roots(t)->invocations()->body()[i]); - } - - - mark(t, newData, ArrayBody, oldCapacity); - - memcpy(newThunks->body().begin(), - compileRoots(t)->dynamicThunks()->body().begin(), - compileRoots(t)->dynamicThunks()->length() * BytesPerWord); - } - - ENTER(t, Thread::ExclusiveState); - - if (dynamicTable(t)) { - allocator(t)->free(dynamicTable(t), dynamicTableSize(t)); - } - dynamicTable(t) = newTable; - dynamicTableSize(t) = newCapacity * BytesPerWord; - roots(t)->setInvocations(t, newData); - - updateDynamicTable(static_cast(t->m->rootThread), t); - - compileRoots(t)->setDynamicThunks(t, newThunks); - } - - unsigned size; - uintptr_t thunk = compileVirtualThunk( - t, index, &size, defaultDynamicThunk(t), "dynamicThunk"); - compileRoots(t)->dynamicThunks()->body()[index * 2] = thunk; - compileRoots(t)->dynamicThunks()->body()[(index * 2) + 1] = size; - - t->dynamicTable[index] = reinterpret_cast(thunk); - - roots(t)->invocations()->setBodyElement(t, index, invocation); - } - - return index; -} - -unsigned translateLocalIndex(Context* context, - unsigned footprint, - unsigned index) -{ - unsigned parameterFootprint = context->method->parameterFootprint(); - - if (index < parameterFootprint) { - return parameterFootprint - index - footprint; - } else { - return index; - } -} - -ir::Value* loadLocal(Context* context, - unsigned footprint, - ir::Type type, - unsigned index) -{ - ir::Value* result = context->compiler->loadLocal( - type, translateLocalIndex(context, footprint, index)); - - assertT(context->thread, type == result->type); - return result; -} - -void storeLocal(Context* context, - unsigned footprint, - ir::Type type UNUSED, - ir::Value* value, - unsigned index) -{ - assertT(context->thread, type == value->type); - context->compiler->storeLocal(value, - translateLocalIndex(context, footprint, index)); -} - -avian::util::FixedAllocator* codeAllocator(MyThread* t); - -ir::Type operandTypeForFieldCode(Thread* t, unsigned code) -{ - switch (code) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case IntField: - return ir::Type::i4(); - case LongField: - return ir::Type::i8(); - - case ObjectField: - return ir::Type::object(); - - case FloatField: - return ir::Type::f4(); - case DoubleField: - return ir::Type::f8(); - - case VoidField: - return ir::Type::void_(); - - default: - abort(t); - } -} - -unsigned methodReferenceParameterFootprint(Thread* t, - GcReference* reference, - bool isStatic) -{ - return parameterFootprint( - t, - reinterpret_cast(reference->spec()->body().begin()), - isStatic); -} - -int methodReferenceReturnCode(Thread* t, GcReference* reference) -{ - unsigned parameterCount; - unsigned parameterFootprint; - unsigned returnCode; - scanMethodSpec( - t, - reinterpret_cast(reference->spec()->body().begin()), - true, - ¶meterCount, - ¶meterFootprint, - &returnCode); - - return returnCode; -} - -class Frame { - public: - Frame(Context* context, ir::Type* stackMap) - : context(context), - t(context->thread), - c(context->compiler), - subroutine(0), - stackMap(stackMap), - ip(0), - sp(localSize()), - level(0) - { - memset(stackMap, 0, context->method->code()->maxStack() * sizeof(ir::Type)); - } - - Frame(Frame* f, ir::Type* stackMap) - : context(f->context), - t(context->thread), - c(context->compiler), - subroutine(f->subroutine), - stackMap(stackMap), - ip(f->ip), - sp(f->sp), - level(f->level + 1) - { - memcpy(stackMap, - f->stackMap, - context->method->code()->maxStack() * sizeof(ir::Type)); - - if (level > 1) { - context->eventLog.append(PushContextEvent); - } - } - - ~Frame() - { - dispose(); - } - - void dispose() - { - if (level > 1) { - context->eventLog.append(PopContextEvent); - } - } - - ir::Value* append(object o) - { - BootContext* bc = context->bootContext; - if (bc) { - avian::codegen::Promise* p = new (bc->zone) - avian::codegen::ListenPromise(t->m->system, bc->zone); - - PROTECT(t, o); - object pointer = makePointer(t, p); - bc->constants = makeTriple(t, o, pointer, bc->constants); - - return c->binaryOp( - lir::Add, - ir::Type::object(), - c->memory( - c->threadRegister(), ir::Type::object(), TARGET_THREAD_HEAPIMAGE), - c->promiseConstant(p, ir::Type::object())); - } else { - for (PoolElement* e = context->objectPool; e; e = e->next) { - if (o == e->target) { - return c->address(ir::Type::object(), e); - } - } - - context->objectPool = new (&context->zone) - PoolElement(t, o, context->objectPool); - - ++context->objectPoolCount; - - return c->address(ir::Type::object(), context->objectPool); - } - } - - unsigned localSize() - { - return local::localSize(t, context->method); - } - - unsigned stackSize() - { - return context->method->code()->maxStack(); - } - - unsigned frameSize() - { - return localSize() + stackSize(); - } - - void set(unsigned index, ir::Type type) - { - assertT(t, index < frameSize()); - - if (type == ir::Type::object()) { - context->eventLog.append(MarkEvent); - context->eventLog.append2(index); - } else { - context->eventLog.append(ClearEvent); - context->eventLog.append2(index); - } - - int si = index - localSize(); - if (si >= 0) { - stackMap[si] = type; - } - } - - ir::Type get(unsigned index) - { - assertT(t, index < frameSize()); - int si = index - localSize(); - assertT(t, si >= 0); - return stackMap[si]; - } - - void popped(unsigned count) - { - assertT(t, sp >= count); - assertT(t, sp - count >= localSize()); - while (count) { - set(--sp, ir::Type::i4()); - --count; - } - } - - avian::codegen::Promise* addressPromise(avian::codegen::Promise* p) - { - BootContext* bc = context->bootContext; - if (bc) { - bc->addresses = new (bc->zone) avian::codegen::DelayedPromise( - t->m->system, bc->zone, p, bc->addresses); - return bc->addresses; - } else { - return p; - } - } - - ir::Value* addressOperand(avian::codegen::Promise* p) - { - return c->promiseConstant(p, ir::Type::iptr()); - } - - ir::Value* absoluteAddressOperand(avian::codegen::Promise* p) - { - return context->bootContext - ? c->binaryOp( - lir::Add, - ir::Type::iptr(), - c->memory(c->threadRegister(), - ir::Type::iptr(), - TARGET_THREAD_CODEIMAGE), - c->promiseConstant( - new (&context->zone) avian::codegen::OffsetPromise( - p, - -reinterpret_cast( - codeAllocator(t)->memory.begin())), - ir::Type::iptr())) - : addressOperand(p); - } - - ir::Value* machineIpValue(unsigned logicalIp) - { - return c->promiseConstant(machineIp(logicalIp), ir::Type::iptr()); - } - - unsigned duplicatedIp(unsigned bytecodeIp) - { - if (UNLIKELY(subroutine)) { - return bytecodeIp + subroutine->duplicatedBaseIp; - } else { - return bytecodeIp; - } - } - - Promise* machineIp(unsigned bytecodeIp) - { - return c->machineIp(duplicatedIp(bytecodeIp)); - } - - void visitLogicalIp(unsigned bytecodeIp) - { - unsigned dupIp = duplicatedIp(bytecodeIp); - c->visitLogicalIp(dupIp); - - context->eventLog.append(IpEvent); - context->eventLog.append2(bytecodeIp); - } - - void startLogicalIp(unsigned bytecodeIp) - { - unsigned dupIp = duplicatedIp(bytecodeIp); - c->startLogicalIp(dupIp); - - context->eventLog.append(IpEvent); - context->eventLog.append2(bytecodeIp); - - this->ip = bytecodeIp; - } - - void push(ir::Type type, ir::Value* o) - { - assertT(t, type == o->type); - c->push(o->type, o); - assertT(t, sp + 1 <= frameSize()); - set(sp++, type); - } - - void pushObject() - { - c->pushed(ir::Type::object()); - - assertT(t, sp + 1 <= frameSize()); - set(sp++, ir::Type::object()); - } - - void pushLarge(ir::Type type, ir::Value* o) - { - assertT(t, o->type == type); - c->push(type, o); - assertT(t, sp + 2 <= frameSize()); - set(sp++, type); - set(sp++, type); - } - - void popFootprint(unsigned count) - { - popped(count); - c->popped(count); - } - - ir::Value* pop(ir::Type type) - { - assertT(t, sp >= 1); - assertT(t, sp - 1 >= localSize()); - assertT(t, get(sp - 1) == type); - set(--sp, ir::Type::i4()); - return c->pop(type); - } - - ir::Value* popLarge(ir::Type type) - { - assertT(t, sp >= 1); - assertT(t, sp - 2 >= localSize()); - assertT(t, get(sp - 1) == type); - assertT(t, get(sp - 2) == type); - sp -= 2; - return c->pop(type); - } - - void load(ir::Type type, unsigned index) - { - assertT(t, index < localSize()); - push(type, loadLocal(context, 1, type, index)); - } - - void loadLarge(ir::Type type, unsigned index) - { - assertT(t, index < static_cast(localSize() - 1)); - pushLarge(type, loadLocal(context, 2, type, index)); - } - - void store(ir::Type type, unsigned index) - { - assertT(t, - type == ir::Type::i4() || type == ir::Type::f4() - || type == ir::Type::object()); - storeLocal(context, 1, type, pop(type), index); - unsigned ti = translateLocalIndex(context, 1, index); - assertT(t, ti < localSize()); - set(ti, type); - } - - void storeLarge(ir::Type type, unsigned index) - { - assertT(t, type.rawSize() == 8); - storeLocal(context, 2, type, popLarge(type), index); - unsigned ti = translateLocalIndex(context, 2, index); - assertT(t, ti + 1 < localSize()); - set(ti, type); - set(ti + 1, type); - } - - void dup() - { - c->push(ir::Type::i4(), c->peek(1, 0)); - - assertT(t, sp + 1 <= frameSize()); - assertT(t, sp - 1 >= localSize()); - set(sp, get(sp - 1)); - ++sp; - } - - void dupX1() - { - ir::Value* s0 = c->pop(ir::Type::i4()); - ir::Value* s1 = c->pop(ir::Type::i4()); - - c->push(ir::Type::i4(), s0); - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i4(), s0); - - assertT(t, sp + 1 <= frameSize()); - assertT(t, sp - 2 >= localSize()); - - ir::Type b2 = get(sp - 2); - ir::Type b1 = get(sp - 1); - - set(sp - 1, b2); - set(sp - 2, b1); - set(sp, b1); - - ++sp; - } - - void dupX2() - { - ir::Value* s0 = c->pop(ir::Type::i4()); - - if (get(sp - 2).rawSize() == 8) { - ir::Value* s1 = c->pop(ir::Type::i8()); - - c->push(ir::Type::i4(), s0); - c->push(ir::Type::i8(), s1); - c->push(ir::Type::i4(), s0); - } else { - ir::Value* s1 = c->pop(ir::Type::i4()); - ir::Value* s2 = c->pop(ir::Type::i4()); - - c->push(ir::Type::i4(), s0); - c->push(ir::Type::i4(), s2); - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i4(), s0); - } - - assertT(t, sp + 1 <= frameSize()); - assertT(t, sp - 3 >= localSize()); - - ir::Type b3 = get(sp - 3); - ir::Type b2 = get(sp - 2); - ir::Type b1 = get(sp - 1); - - set(sp - 2, b3); - set(sp - 1, b2); - set(sp - 3, b1); - set(sp, b1); - - ++sp; - } - - void dup2() - { - if (get(sp - 1).rawSize() == 8) { - c->push(ir::Type::i8(), c->peek(2, 0)); - } else { - ir::Value* s0 = c->pop(ir::Type::i4()); - ir::Value* s1 = c->pop(ir::Type::i4()); - - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i4(), s0); - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i4(), s0); - } - - assertT(t, sp + 2 <= frameSize()); - assertT(t, sp - 2 >= localSize()); - - ir::Type b2 = get(sp - 2); - ir::Type b1 = get(sp - 1); - - set(sp, b2); - set(sp + 1, b1); - - sp += 2; - } - - void dup2X1() - { - if (get(sp - 1).rawSize() == 8) { - ir::Value* s0 = c->pop(ir::Type::i8()); - ir::Value* s1 = c->pop(ir::Type::i4()); - - c->push(ir::Type::i8(), s0); - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i8(), s0); - } else { - ir::Value* s0 = c->pop(ir::Type::i4()); - ir::Value* s1 = c->pop(ir::Type::i4()); - ir::Value* s2 = c->pop(ir::Type::i4()); - - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i4(), s0); - c->push(ir::Type::i4(), s2); - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i4(), s0); - } - - assertT(t, sp + 2 <= frameSize()); - assertT(t, sp - 3 >= localSize()); - - ir::Type b3 = get(sp - 3); - ir::Type b2 = get(sp - 2); - ir::Type b1 = get(sp - 1); - - set(sp - 1, b3); - set(sp - 3, b2); - set(sp, b2); - set(sp - 2, b1); - set(sp + 1, b1); - - sp += 2; - } - - void dup2X2() - { - if (get(sp - 1).rawSize() == 8) { - ir::Value* s0 = c->pop(ir::Type::i8()); - - if (get(sp - 3).rawSize() == 8) { - ir::Value* s1 = c->pop(ir::Type::i8()); - - c->push(ir::Type::i8(), s0); - c->push(ir::Type::i8(), s1); - c->push(ir::Type::i8(), s0); - } else { - ir::Value* s1 = c->pop(ir::Type::i4()); - ir::Value* s2 = c->pop(ir::Type::i4()); - - c->push(ir::Type::i8(), s0); - c->push(ir::Type::i4(), s2); - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i8(), s0); - } - } else { - ir::Value* s0 = c->pop(ir::Type::i4()); - ir::Value* s1 = c->pop(ir::Type::i4()); - ir::Value* s2 = c->pop(ir::Type::i4()); - ir::Value* s3 = c->pop(ir::Type::i4()); - - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i4(), s0); - c->push(ir::Type::i4(), s3); - c->push(ir::Type::i4(), s2); - c->push(ir::Type::i4(), s1); - c->push(ir::Type::i4(), s0); - } - - assertT(t, sp + 2 <= frameSize()); - assertT(t, sp - 4 >= localSize()); - - ir::Type b4 = get(sp - 4); - ir::Type b3 = get(sp - 3); - ir::Type b2 = get(sp - 2); - ir::Type b1 = get(sp - 1); - - set(sp - 2, b4); - set(sp - 1, b3); - set(sp - 4, b2); - set(sp, b2); - set(sp - 3, b1); - set(sp + 1, b1); - - sp += 2; - } - - void swap() - { - ir::Value* s0 = c->pop(ir::Type::i4()); - ir::Value* s1 = c->pop(ir::Type::i4()); - - c->push(ir::Type::i4(), s0); - c->push(ir::Type::i4(), s1); - - assertT(t, sp - 2 >= localSize()); - - ir::Type saved = get(sp - 1); - - set(sp - 1, get(sp - 2)); - set(sp - 2, saved); - } - - TraceElement* trace(GcMethod* target, unsigned flags) - { - unsigned mapSize = frameMapSizeInWords(t, context->method); - - TraceElement* e = context->traceLog = new ( - context->zone.allocate(sizeof(TraceElement) + (mapSize * BytesPerWord))) - TraceElement(context, - duplicatedIp(ip), - target, - flags, - context->traceLog, - mapSize); - - ++context->traceLogCount; - - context->eventLog.append(TraceEvent); - context->eventLog.appendAddress(e); - - return e; - } - - void pushReturnValue(unsigned code, ir::Value* result) - { - switch (code) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case IntField: - return push(ir::Type::i4(), result); - case FloatField: - return push(ir::Type::f4(), result); - - case ObjectField: - return push(ir::Type::object(), result); - - case LongField: - return pushLarge(ir::Type::i8(), result); - case DoubleField: - return pushLarge(ir::Type::f8(), result); - - default: - abort(t); - } - } - - Slice peekMethodArguments(unsigned footprint) - { - ir::Value** ptr = context->argumentBuffer.items; - - for (unsigned i = 0; i < footprint; i++) { - *(ptr++) = c->peek(1, footprint - i - 1); - } - - return Slice(context->argumentBuffer.items, footprint); - } - - void stackCall(ir::Value* methodValue, - GcMethod* methodObject, - unsigned flags, - TraceElement* trace) - { - unsigned footprint = methodObject->parameterFootprint(); - unsigned returnCode = methodObject->returnCode(); - ir::Value* result = c->stackCall(methodValue, - flags, - trace, - operandTypeForFieldCode(t, returnCode), - peekMethodArguments(footprint)); - - popFootprint(footprint); - - if (returnCode != VoidField) { - pushReturnValue(returnCode, result); - } - } - - void referenceStackCall(bool isStatic, - ir::Value* methodValue, - GcReference* methodReference, - unsigned flags, - TraceElement* trace) - { - unsigned footprint - = methodReferenceParameterFootprint(t, methodReference, isStatic); - unsigned returnCode = methodReferenceReturnCode(t, methodReference); - ir::Value* result = c->stackCall(methodValue, - flags, - trace, - operandTypeForFieldCode(t, returnCode), - peekMethodArguments(footprint)); - - popFootprint(footprint); - - if (returnCode != VoidField) { - pushReturnValue(returnCode, result); - } - } - - void startSubroutine(unsigned ip, unsigned returnAddress) - { - // Push a dummy value to the stack, representing the return address (which - // we don't need, since we're expanding everything statically). - // TODO: in the future, push a value that we can track through type checking - push(ir::Type::object(), c->constant(0, ir::Type::object())); - - if (DebugInstructions) { - fprintf(stderr, "startSubroutine %u %u\n", ip, returnAddress); - } - - Subroutine* subroutine = new (&context->zone) - Subroutine(context->subroutineCount++, - returnAddress, - context->method->code()->length(), - this->subroutine); - - context->extendLogicalCode(context->method->code()->length()); - - this->subroutine = subroutine; - } - - unsigned endSubroutine(unsigned returnAddressLocal UNUSED) - { - // TODO: use returnAddressLocal to decide which subroutine we're returning - // from (in case it's ever not the most recent one entered). I'm unsure of - // whether such a subroutine pattern would pass bytecode verification. - - unsigned returnAddress = subroutine->returnAddress; - - if (DebugInstructions) { - fprintf(stderr, "endSubroutine %u %u\n", ip, returnAddress); - } - - subroutine = subroutine->outer; - - return returnAddress; - } - - Context* context; - MyThread* t; - avian::codegen::Compiler* c; - - // Innermost subroutine we're compiling code for - Subroutine* subroutine; - - ir::Type* stackMap; - unsigned ip; - unsigned sp; - unsigned level; -}; - -unsigned savedTargetIndex(MyThread* t UNUSED, GcMethod* method) -{ - return method->code()->maxLocals(); -} - -GcCallNode* findCallNode(MyThread* t, void* address); - -void* findExceptionHandler(Thread* t, GcMethod* method, void* ip) -{ - if (t->exception) { - GcArray* table = cast(t, method->code()->exceptionHandlerTable()); - if (table) { - GcIntArray* index = cast(t, table->body()[0]); - - uint8_t* compiled = reinterpret_cast(methodCompiled(t, method)); - - for (unsigned i = 0; i < table->length() - 1; ++i) { - unsigned start = index->body()[i * 3]; - unsigned end = index->body()[(i * 3) + 1]; - unsigned key = difference(ip, compiled) - 1; - - if (key >= start and key < end) { - GcClass* catchType = cast(t, table->body()[i + 1]); - - if (exceptionMatch(t, catchType, t->exception)) { - return compiled + index->body()[(i * 3) + 2]; - } - } - } - } - } - - return 0; -} - -void releaseLock(MyThread* t, GcMethod* method, void* stack) -{ - if (method->flags() & ACC_SYNCHRONIZED) { - if (t->methodLockIsClean) { - object lock; - if (method->flags() & ACC_STATIC) { - lock = getJClass(t, method->class_()); - } else { - lock = *localObject(t, - stackForFrame(t, stack, method), - method, - savedTargetIndex(t, method)); - } - - release(t, lock); - } else { - // got an exception while trying to acquire the lock for a - // synchronized method -- don't try to release it, since we - // never succeeded in acquiring it. - t->methodLockIsClean = true; - } - } -} - -void findUnwindTarget(MyThread* t, - void** targetIp, - void** targetFrame, - void** targetStack, - GcContinuation** targetContinuation) -{ - void* ip; - void* stack; - GcContinuation* continuation; - - if (t->traceContext) { - ip = t->traceContext->ip; - stack = t->traceContext->stack; - continuation = t->traceContext->continuation; - } else { - ip = getIp(t); - stack = t->stack; - continuation = t->continuation; - } - - GcMethod* target = t->trace->targetMethod; - bool mostRecent = true; - - *targetIp = 0; - while (*targetIp == 0) { - GcMethod* method = methodForIp(t, ip); - if (method) { - void* handler = findExceptionHandler(t, method, ip); - - if (handler) { - *targetIp = handler; - - nextFrame(t, &ip, &stack, method, target, mostRecent); - - void** sp = static_cast(stackForFrame(t, stack, method)) - + t->arch->frameReturnAddressSize(); - - *targetFrame = static_cast(stack) - + t->arch->framePointerOffset(); - *targetStack = sp; - *targetContinuation = continuation; - - sp[localOffset(t, localSize(t, method), method)] = t->exception; - - t->exception = 0; - } else { - nextFrame(t, &ip, &stack, method, target, mostRecent); - - if (t->exception) { - releaseLock(t, method, stack); - } - - target = method; - } - } else { - expect(t, ip); - *targetIp = ip; - *targetFrame = 0; - *targetStack = static_cast(stack) - + t->arch->frameReturnAddressSize(); - *targetContinuation = continuation; - - while (Continuations and *targetContinuation) { - GcContinuation* c = *targetContinuation; - - GcMethod* method = c->method(); - - void* handler = findExceptionHandler(t, method, c->address()); - - if (handler) { - t->exceptionHandler = handler; - - t->exceptionStackAdjustment - = (stackOffsetFromFrame(t, method) - - ((c->framePointerOffset() / BytesPerWord) - - t->arch->framePointerOffset() - + t->arch->frameReturnAddressSize())) * BytesPerWord; - - t->exceptionOffset = localOffset(t, localSize(t, method), method) - * BytesPerWord; - - break; - } else if (t->exception) { - releaseLock(t, - method, - reinterpret_cast(c) + ContinuationBody - + c->returnAddressOffset() - - t->arch->returnAddressOffset()); - } - - *targetContinuation = c->next(); - } - } - - mostRecent = false; - } -} - -GcContinuation* makeCurrentContinuation(MyThread* t, - void** targetIp, - void** targetStack) -{ - void* ip = getIp(t); - void* stack = t->stack; - - GcContinuationContext* context - = t->continuation - ? t->continuation->context() - : makeContinuationContext(t, 0, 0, 0, 0, t->trace->originalMethod); - PROTECT(t, context); - - GcMethod* target = t->trace->targetMethod; - PROTECT(t, target); - - GcContinuation* first = 0; - PROTECT(t, first); - - GcContinuation* last = 0; - PROTECT(t, last); - - bool mostRecent = true; - - *targetIp = 0; - while (*targetIp == 0) { - assertT(t, ip); - - GcMethod* method = methodForIp(t, ip); - if (method) { - PROTECT(t, method); - - void** top = static_cast(stack) - + t->arch->frameReturnAddressSize() - + t->arch->frameFooterSize(); - unsigned argumentFootprint - = t->arch->argumentFootprint(target->parameterFootprint()); - unsigned alignment = t->arch->stackAlignmentInWords(); - if (avian::codegen::TailCalls and argumentFootprint > alignment) { - top += argumentFootprint - alignment; - } - - void* nextIp = ip; - nextFrame(t, &nextIp, &stack, method, target, mostRecent); - - void** bottom = static_cast(stack) - + t->arch->frameReturnAddressSize(); - unsigned frameSize = bottom - top; - unsigned totalSize - = frameSize + t->arch->frameFooterSize() - + t->arch->argumentFootprint(method->parameterFootprint()); - - GcContinuation* c = makeContinuation( - t, - 0, - context, - method, - ip, - (frameSize + t->arch->frameFooterSize() - + t->arch->returnAddressOffset() - t->arch->frameReturnAddressSize()) - * BytesPerWord, - (frameSize + t->arch->frameFooterSize() - + t->arch->framePointerOffset() - t->arch->frameReturnAddressSize()) - * BytesPerWord, - totalSize); - - memcpy(c->body().begin(), top, totalSize * BytesPerWord); - - if (last) { - last->setNext(t, c); - } else { - first = c; - } - last = c; - - ip = nextIp; - - target = method; - } else { - *targetIp = ip; - *targetStack = static_cast(stack) - + t->arch->frameReturnAddressSize(); - } - - mostRecent = false; - } - - expect(t, last); - last->setNext(t, t->continuation); - - return first; -} - -void NO_RETURN unwind(MyThread* t) -{ - void* ip; - void* frame; - void* stack; - GcContinuation* continuation; - findUnwindTarget(t, &ip, &frame, &stack, &continuation); - - t->trace->targetMethod = 0; - t->trace->nativeMethod = 0; - - transition(t, ip, stack, continuation, t->trace); - - vmJump(ip, frame, stack, t, 0, 0); -} - -class MyCheckpoint : public Thread::Checkpoint { - public: - MyCheckpoint(MyThread* t) : Checkpoint(t) - { - } - - virtual void unwind() - { - local::unwind(static_cast(t)); - } -}; - -uintptr_t defaultThunk(MyThread* t); - -uintptr_t nativeThunk(MyThread* t); - -uintptr_t bootNativeThunk(MyThread* t); - -uintptr_t virtualThunk(MyThread* t, unsigned index); - -bool unresolved(MyThread* t, uintptr_t methodAddress); - -uintptr_t methodAddress(Thread* t, GcMethod* method) -{ - if (method->flags() & ACC_NATIVE) { - return bootNativeThunk(static_cast(t)); - } else { - return methodCompiled(t, method); - } -} - -void tryInitClass(MyThread* t, GcClass* class_) -{ - initClass(t, class_); -} - -void compile(MyThread* t, - FixedAllocator* allocator, - BootContext* bootContext, - GcMethod* method); - -GcMethod* resolveMethod(Thread* t, GcPair* pair) -{ - GcReference* reference = cast(t, pair->second()); - PROTECT(t, reference); - - GcClass* class_ = resolveClassInObject( - t, - cast(t, pair->first())->class_()->loader(), - reference, - ReferenceClass); - - return cast(t, - findInHierarchy(t, - class_, - reference->name(), - reference->spec(), - findMethodInClass, - GcNoSuchMethodError::Type)); -} - -bool methodAbstract(Thread* t UNUSED, GcMethod* method) -{ - return method->code() == 0 and (method->flags() & ACC_NATIVE) == 0; -} - -int64_t prepareMethodForCall(MyThread* t, GcMethod* target) -{ - if (methodAbstract(t, target)) { - throwNew(t, - GcAbstractMethodError::Type, - "%s.%s%s", - target->class_()->name()->body().begin(), - target->name()->body().begin(), - target->spec()->body().begin()); - } else { - if (unresolved(t, methodAddress(t, target))) { - PROTECT(t, target); - - compile(t, codeAllocator(t), 0, target); - } - - if (target->flags() & ACC_NATIVE) { - t->trace->nativeMethod = target; - } - - return methodAddress(t, target); - } -} - -int64_t findInterfaceMethodFromInstance(MyThread* t, - GcMethod* method, - object instance) -{ - if (instance) { - return prepareMethodForCall( - t, findInterfaceMethod(t, method, objectClass(t, instance))); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -int64_t findInterfaceMethodFromInstanceAndReference(MyThread* t, - GcPair* pair, - object instance) -{ - PROTECT(t, instance); - - GcMethod* method = resolveMethod(t, pair); - - return findInterfaceMethodFromInstance(t, method, instance); -} - -void checkMethod(Thread* t, GcMethod* method, bool shouldBeStatic) -{ - if (((method->flags() & ACC_STATIC) == 0) == shouldBeStatic) { - throwNew(t, - GcIncompatibleClassChangeError::Type, - "expected %s.%s%s to be %s", - method->class_()->name()->body().begin(), - method->name()->body().begin(), - method->spec()->body().begin(), - shouldBeStatic ? "static" : "non-static"); - } -} - -int64_t findSpecialMethodFromReference(MyThread* t, GcPair* pair) -{ - PROTECT(t, pair); - - GcMethod* target = resolveMethod(t, pair); - - GcClass* class_ = cast(t, pair->first())->class_(); - if (isSpecialMethod(t, target, class_)) { - target = findVirtualMethod(t, target, class_->super()); - } - - checkMethod(t, target, false); - - return prepareMethodForCall(t, target); -} - -int64_t findStaticMethodFromReference(MyThread* t, GcPair* pair) -{ - GcMethod* target = resolveMethod(t, pair); - - checkMethod(t, target, true); - - return prepareMethodForCall(t, target); -} - -int64_t findVirtualMethodFromReference(MyThread* t, - GcPair* pair, - object instance) -{ - PROTECT(t, instance); - - GcMethod* target = resolveMethod(t, pair); - - target = findVirtualMethod(t, target, objectClass(t, instance)); - - checkMethod(t, target, false); - - return prepareMethodForCall(t, target); -} - -int64_t getMethodAddress(MyThread* t, GcMethod* target) -{ - return prepareMethodForCall(t, target); -} - -int64_t getJClassFromReference(MyThread* t, GcPair* pair) -{ - return reinterpret_cast(getJClass( - t, - resolveClass(t, - cast(t, pair->first())->class_()->loader(), - cast(t, pair->second())->name()))); -} - -unsigned traceSize(Thread* t) -{ - class Counter : public Processor::StackVisitor { - public: - Counter() : count(0) - { - } - - virtual bool visit(Processor::StackWalker*) - { - ++count; - return true; - } - - unsigned count; - } counter; - - t->m->processor->walkStack(t, &counter); - - return pad(GcArray::FixedSize) - + (counter.count * pad(ArrayElementSizeOfArray)) - + (counter.count * pad(GcTraceElement::FixedSize)); -} - -void NO_RETURN throwArithmetic(MyThread* t) -{ - if (ensure(t, GcArithmeticException::FixedSize + traceSize(t))) { - t->setFlag(Thread::TracingFlag); - THREAD_RESOURCE0(t, t->clearFlag(Thread::TracingFlag)); - - throwNew(t, GcArithmeticException::Type); - } else { - // not enough memory available for a new exception and stack trace - // -- use a preallocated instance instead - throw_(t, roots(t)->arithmeticException()); - } -} - -int64_t divideLong(MyThread* t, int64_t b, int64_t a) -{ - if (LIKELY(b)) { - return a / b; - } else { - throwArithmetic(t); - } -} - -int64_t divideInt(MyThread* t, int32_t b, int32_t a) -{ - if (LIKELY(b)) { - return a / b; - } else { - throwArithmetic(t); - } -} - -int64_t moduloLong(MyThread* t, int64_t b, int64_t a) -{ - if (LIKELY(b)) { - return a % b; - } else { - throwArithmetic(t); - } -} - -int64_t moduloInt(MyThread* t, int32_t b, int32_t a) -{ - if (LIKELY(b)) { - return a % b; - } else { - throwArithmetic(t); - } -} - -uint64_t makeBlankObjectArray(MyThread* t, GcClass* class_, int32_t length) -{ - if (length >= 0) { - return reinterpret_cast(makeObjectArray(t, class_, length)); - } else { - throwNew(t, GcNegativeArraySizeException::Type, "%d", length); - } -} - -uint64_t makeBlankObjectArrayFromReference(MyThread* t, - GcPair* pair, - int32_t length) -{ - return makeBlankObjectArray( - t, - resolveClass(t, - cast(t, pair->first())->class_()->loader(), - cast(t, pair->second())->name()), - length); -} - -uint64_t makeBlankArray(MyThread* t, unsigned type, int32_t length) -{ - if (length >= 0) { - switch (type) { - case T_BOOLEAN: - return reinterpret_cast(makeBooleanArray(t, length)); - case T_CHAR: - return reinterpret_cast(makeCharArray(t, length)); - case T_FLOAT: - return reinterpret_cast(makeFloatArray(t, length)); - case T_DOUBLE: - return reinterpret_cast(makeDoubleArray(t, length)); - case T_BYTE: - return reinterpret_cast(makeByteArray(t, length)); - case T_SHORT: - return reinterpret_cast(makeShortArray(t, length)); - case T_INT: - return reinterpret_cast(makeIntArray(t, length)); - case T_LONG: - return reinterpret_cast(makeLongArray(t, length)); - default: - abort(t); - } - } else { - throwNew(t, GcNegativeArraySizeException::Type, "%d", length); - } -} - -uint64_t lookUpAddress(int32_t key, - uintptr_t* start, - int32_t count, - uintptr_t default_) -{ - int32_t bottom = 0; - int32_t top = count; - for (int32_t span = top - bottom; span; span = top - bottom) { - int32_t middle = bottom + (span / 2); - uintptr_t* p = start + (middle * 2); - int32_t k = *p; - - if (key < k) { - top = middle; - } else if (key > k) { - bottom = middle + 1; - } else { - return p[1]; - } - } - - return default_; -} - -void setMaybeNull(MyThread* t, object o, unsigned offset, object value) -{ - if (LIKELY(o)) { - setField(t, o, offset, value); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -void acquireMonitorForObject(MyThread* t, object o) -{ - if (LIKELY(o)) { - acquire(t, o); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -void acquireMonitorForObjectOnEntrance(MyThread* t, object o) -{ - if (LIKELY(o)) { - t->methodLockIsClean = false; - acquire(t, o); - t->methodLockIsClean = true; - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -void releaseMonitorForObject(MyThread* t, object o) -{ - if (LIKELY(o)) { - release(t, o); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -void acquireMonitorForClassOnEntrance(MyThread* t, GcClass* o) -{ - if (LIKELY(o)) { - t->methodLockIsClean = false; - acquire(t, getJClass(t, o)); - t->methodLockIsClean = true; - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -void releaseMonitorForClass(MyThread* t, GcClass* o) -{ - if (LIKELY(o)) { - release(t, getJClass(t, o)); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -object makeMultidimensionalArray2(MyThread* t, - GcClass* class_, - uintptr_t* countStack, - int32_t dimensions) -{ - PROTECT(t, class_); - - THREAD_RUNTIME_ARRAY(t, int32_t, counts, dimensions); - for (int i = dimensions - 1; i >= 0; --i) { - RUNTIME_ARRAY_BODY(counts)[i] = countStack[dimensions - i - 1]; - if (UNLIKELY(RUNTIME_ARRAY_BODY(counts)[i] < 0)) { - throwNew(t, - GcNegativeArraySizeException::Type, - "%d", - RUNTIME_ARRAY_BODY(counts)[i]); - return 0; - } - } - - object array = makeArray(t, RUNTIME_ARRAY_BODY(counts)[0]); - setObjectClass(t, array, class_); - PROTECT(t, array); - - populateMultiArray(t, array, RUNTIME_ARRAY_BODY(counts), 0, dimensions); - - return array; -} - -uint64_t makeMultidimensionalArray(MyThread* t, - GcClass* class_, - int32_t dimensions, - int32_t offset) -{ - return reinterpret_cast(makeMultidimensionalArray2( - t, class_, static_cast(t->stack) + offset, dimensions)); -} - -uint64_t makeMultidimensionalArrayFromReference(MyThread* t, - GcPair* pair, - int32_t dimensions, - int32_t offset) -{ - return makeMultidimensionalArray( - t, - resolveClass(t, - cast(t, pair->first())->class_()->loader(), - cast(t, pair->second())->name()), - dimensions, - offset); -} - -void NO_RETURN throwArrayIndexOutOfBounds(MyThread* t) -{ - if (ensure(t, GcArrayIndexOutOfBoundsException::FixedSize + traceSize(t))) { - t->setFlag(Thread::TracingFlag); - THREAD_RESOURCE0(t, t->clearFlag(Thread::TracingFlag)); - - throwNew(t, GcArrayIndexOutOfBoundsException::Type); - } else { - // not enough memory available for a new exception and stack trace - // -- use a preallocated instance instead - throw_(t, roots(t)->arrayIndexOutOfBoundsException()); - } -} - -void NO_RETURN throwStackOverflow(MyThread* t) -{ - throwNew(t, GcStackOverflowError::Type); -} - -void NO_RETURN throw_(MyThread* t, GcThrowable* o) -{ - if (LIKELY(o)) { - vm::throw_(t, o); - } else { - throwNew(t, GcNullPointerException::Type); - } -} - -void checkCast(MyThread* t, GcClass* class_, object o) -{ - if (UNLIKELY(o and not isAssignableFrom(t, class_, objectClass(t, o)))) { - GcByteArray* classNameFrom = objectClass(t, o)->name(); - GcByteArray* classNameTo = class_->name(); - THREAD_RUNTIME_ARRAY(t, char, classFrom, classNameFrom->length()); - THREAD_RUNTIME_ARRAY(t, char, classTo, classNameTo->length()); - replace('/', - '.', - RUNTIME_ARRAY_BODY(classFrom), - reinterpret_cast(classNameFrom->body().begin())); - replace('/', - '.', - RUNTIME_ARRAY_BODY(classTo), - reinterpret_cast(classNameTo->body().begin())); - throwNew(t, - GcClassCastException::Type, - "%s cannot be cast to %s", - RUNTIME_ARRAY_BODY(classFrom), - RUNTIME_ARRAY_BODY(classTo)); - } -} - -void checkCastFromReference(MyThread* t, GcPair* pair, object o) -{ - PROTECT(t, o); - - GcClass* c - = resolveClass(t, - cast(t, pair->first())->class_()->loader(), - cast(t, pair->second())->name()); - - checkCast(t, c, o); -} - -GcField* resolveField(Thread* t, GcPair* pair) -{ - GcReference* reference = cast(t, pair->second()); - PROTECT(t, reference); - - GcClass* class_ = resolveClassInObject( - t, - cast(t, pair->first())->class_()->loader(), - reference, - ReferenceClass); - - return cast(t, - findInHierarchy(t, - class_, - reference->name(), - reference->spec(), - findFieldInClass, - GcNoSuchFieldError::Type)); -} - -uint64_t getFieldValue(Thread* t, object target, GcField* field) -{ - switch (field->code()) { - case ByteField: - case BooleanField: - return fieldAtOffset(target, field->offset()); - - case CharField: - case ShortField: - return fieldAtOffset(target, field->offset()); - - case FloatField: - case IntField: - return fieldAtOffset(target, field->offset()); - - case DoubleField: - case LongField: - return fieldAtOffset(target, field->offset()); - - case ObjectField: - return fieldAtOffset(target, field->offset()); - - default: - abort(t); - } -} - -uint64_t getStaticFieldValueFromReference(MyThread* t, GcPair* pair) -{ - GcField* field = resolveField(t, pair); - PROTECT(t, field); - - initClass(t, field->class_()); - - ACQUIRE_FIELD_FOR_READ(t, field); - - return getFieldValue(t, field->class_()->staticTable(), field); -} - -uint64_t getFieldValueFromReference(MyThread* t, GcPair* pair, object instance) -{ - PROTECT(t, instance); - - GcField* field = resolveField(t, pair); - PROTECT(t, field); - - ACQUIRE_FIELD_FOR_READ(t, field); - - return getFieldValue(t, instance, field); -} - -void setStaticLongFieldValueFromReference(MyThread* t, - GcPair* pair, - uint64_t value) -{ - GcField* field = resolveField(t, pair); - PROTECT(t, field); - - initClass(t, field->class_()); - - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(field->class_()->staticTable(), field->offset()) - = value; -} - -void setLongFieldValueFromReference(MyThread* t, - GcPair* pair, - object instance, - uint64_t value) -{ - PROTECT(t, instance); - - GcField* field = resolveField(t, pair); - PROTECT(t, field); - - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(instance, field->offset()) = value; -} - -void setStaticObjectFieldValueFromReference(MyThread* t, - GcPair* pair, - object value) -{ - PROTECT(t, value); - - GcField* field = resolveField(t, pair); - PROTECT(t, field); - - initClass(t, field->class_()); - - ACQUIRE_FIELD_FOR_WRITE(t, field); - - setField(t, field->class_()->staticTable(), field->offset(), value); -} - -void setObjectFieldValueFromReference(MyThread* t, - GcPair* pair, - object instance, - object value) -{ - PROTECT(t, instance); - PROTECT(t, value); - - GcField* field = resolveField(t, pair); - PROTECT(t, field); - - ACQUIRE_FIELD_FOR_WRITE(t, field); - - setField(t, instance, field->offset(), value); -} - -void setFieldValue(MyThread* t, object target, GcField* field, uint32_t value) -{ - switch (field->code()) { - case ByteField: - case BooleanField: - fieldAtOffset(target, field->offset()) = value; - break; - - case CharField: - case ShortField: - fieldAtOffset(target, field->offset()) = value; - break; - - case FloatField: - case IntField: - fieldAtOffset(target, field->offset()) = value; - break; - - default: - abort(t); - } -} - -void setStaticFieldValueFromReference(MyThread* t, GcPair* pair, uint32_t value) -{ - GcField* field = resolveField(t, pair); - PROTECT(t, field); - - initClass(t, field->class_()); - - ACQUIRE_FIELD_FOR_WRITE(t, field); - - setFieldValue(t, field->class_()->staticTable(), field, value); -} - -void setFieldValueFromReference(MyThread* t, - GcPair* pair, - object instance, - uint32_t value) -{ - PROTECT(t, instance); - GcField* field = resolveField(t, pair); - PROTECT(t, field); - - ACQUIRE_FIELD_FOR_WRITE(t, field); - - setFieldValue(t, instance, field, value); -} - -uint64_t instanceOf64(Thread* t, GcClass* class_, object o) -{ - return instanceOf(t, class_, o); -} - -uint64_t instanceOfFromReference(Thread* t, GcPair* pair, object o) -{ - PROTECT(t, o); - - GcClass* c - = resolveClass(t, - cast(t, pair->first())->class_()->loader(), - cast(t, pair->second())->name()); - - return instanceOf64(t, c, o); -} - -uint64_t makeNewGeneral64(Thread* t, GcClass* class_) -{ - PROTECT(t, class_); - - initClass(t, class_); - - return reinterpret_cast(makeNewGeneral(t, class_)); -} - -uint64_t makeNew64(Thread* t, GcClass* class_) -{ - PROTECT(t, class_); - - initClass(t, class_); - - return reinterpret_cast(makeNew(t, class_)); -} - -uint64_t makeNewFromReference(Thread* t, GcPair* pair) -{ - GcClass* class_ - = resolveClass(t, - cast(t, pair->first())->class_()->loader(), - cast(t, pair->second())->name()); - - PROTECT(t, class_); - - initClass(t, class_); - - return makeNewGeneral64(t, class_); -} - -uint64_t getJClass64(Thread* t, GcClass* class_) -{ - return reinterpret_cast(getJClass(t, class_)); -} - -void gcIfNecessary(MyThread* t) -{ - stress(t); - - if (UNLIKELY(t->getFlags() & Thread::UseBackupHeapFlag)) { - collect(t, Heap::MinorCollection); - } -} - -void idleIfNecessary(MyThread* t) -{ - if (UNLIKELY(t->m->exclusive)) { - ENTER(t, Thread::IdleState); - } -} - -bool useLongJump(MyThread* t, uintptr_t target) -{ - uintptr_t reach = t->arch->maximumImmediateJump(); - FixedAllocator* a = codeAllocator(t); - uintptr_t start = reinterpret_cast(a->memory.begin()); - uintptr_t end = reinterpret_cast(a->memory.begin()) - + a->memory.count; - assertT(t, end - start < reach); - - return (target > end && (target - start) > reach) - or (target < start && (end - target) > reach); -} - -FILE* compileLog = 0; - -void logCompile(MyThread* t, - const void* code, - unsigned size, - const char* class_, - const char* name, - const char* spec); - -unsigned simpleFrameMapTableSize(MyThread* t, GcMethod* method, GcIntArray* map) -{ - int size = frameMapSizeInBits(t, method); - return ceilingDivide(map->length() * size, 32 + size); -} - -#ifndef AVIAN_AOT_ONLY -unsigned resultSize(MyThread* t, unsigned code) -{ - switch (code) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case FloatField: - case IntField: - return 4; - - case ObjectField: - return TargetBytesPerWord; - - case LongField: - case DoubleField: - return 8; - - case VoidField: - return 0; - - default: - abort(t); - } -} - -ir::Value* popField(MyThread* t, Frame* frame, int code) -{ - switch (code) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case IntField: - return frame->pop(ir::Type::i4()); - case FloatField: - return frame->pop(ir::Type::f4()); - - case LongField: - return frame->popLarge(ir::Type::i8()); - case DoubleField: - return frame->popLarge(ir::Type::f8()); - - case ObjectField: - return frame->pop(ir::Type::object()); - - default: - abort(t); - } -} - -void compileSafePoint(MyThread* t, Compiler* c, Frame* frame) -{ - c->nativeCall( - c->constant(getThunk(t, idleIfNecessaryThunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister())); -} - -void compileDirectInvoke(MyThread* t, - Frame* frame, - GcMethod* target, - bool tailCall, - bool useThunk, - avian::codegen::Promise* addressPromise) -{ - avian::codegen::Compiler* c = frame->c; - - unsigned flags - = (avian::codegen::TailCalls and tailCall ? Compiler::TailJump : 0); - unsigned traceFlags; - - if (addressPromise == 0 and useLongJump(t, methodAddress(t, target))) { - flags |= Compiler::LongJumpOrCall; - traceFlags = TraceElement::LongCall; - } else { - traceFlags = 0; - } - - if (useThunk or (avian::codegen::TailCalls and tailCall - and (target->flags() & ACC_NATIVE))) { - if (frame->context->bootContext == 0) { - flags |= Compiler::Aligned; - } - - if (avian::codegen::TailCalls and tailCall) { - traceFlags |= TraceElement::TailCall; - - TraceElement* trace = frame->trace(target, traceFlags); - - avian::codegen::Promise* returnAddressPromise - = new (frame->context->zone.allocate(sizeof(TraceElementPromise))) - TraceElementPromise(t->m->system, trace); - - frame->stackCall( - c->promiseConstant(returnAddressPromise, ir::Type::iptr()), - target, - flags, - trace); - - c->store(frame->absoluteAddressOperand(returnAddressPromise), - c->memory(c->threadRegister(), - ir::Type::iptr(), - TARGET_THREAD_TAILADDRESS)); - - c->exit(c->constant( - (target->flags() & ACC_NATIVE) ? nativeThunk(t) : defaultThunk(t), - ir::Type::iptr())); - } else { - return frame->stackCall(c->constant(defaultThunk(t), ir::Type::iptr()), - target, - flags, - frame->trace(target, traceFlags)); - } - } else { - ir::Value* address - = (addressPromise - ? c->promiseConstant(addressPromise, ir::Type::iptr()) - : c->constant(methodAddress(t, target), ir::Type::iptr())); - - frame->stackCall( - address, - target, - flags, - tailCall ? 0 : frame->trace((target->flags() & ACC_NATIVE) ? target : 0, - 0)); - } -} - -bool compileDirectInvoke(MyThread* t, - Frame* frame, - GcMethod* target, - bool tailCall) -{ - // don't bother calling an empty method unless calling it might - // cause the class to be initialized, which may have side effects - if (emptyMethod(t, target) and (not classNeedsInit(t, target->class_()))) { - frame->popFootprint(target->parameterFootprint()); - tailCall = false; - } else { - BootContext* bc = frame->context->bootContext; - if (bc) { - if ((target->class_() == frame->context->method->class_() - or (not classNeedsInit(t, target->class_()))) - and (not(avian::codegen::TailCalls and tailCall - and (target->flags() & ACC_NATIVE)))) { - avian::codegen::Promise* p = new (bc->zone) - avian::codegen::ListenPromise(t->m->system, bc->zone); - - PROTECT(t, target); - object pointer = makePointer(t, p); - bc->calls = makeTriple(t, target, pointer, bc->calls); - - compileDirectInvoke(t, frame, target, tailCall, false, p); - } else { - compileDirectInvoke(t, frame, target, tailCall, true, 0); - } - } else if (unresolved(t, methodAddress(t, target)) - or classNeedsInit(t, target->class_())) { - compileDirectInvoke(t, frame, target, tailCall, true, 0); - } else { - compileDirectInvoke(t, frame, target, tailCall, false, 0); - } - } - - return tailCall; -} - -void compileReferenceInvoke(Frame* frame, - ir::Value* method, - GcReference* reference, - bool isStatic, - bool tailCall) -{ - frame->referenceStackCall(isStatic, - method, - reference, - tailCall ? Compiler::TailJump : 0, - frame->trace(0, 0)); -} - -void compileDirectReferenceInvoke(MyThread* t, - Frame* frame, - Thunk thunk, - GcReference* reference, - bool isStatic, - bool tailCall) -{ - avian::codegen::Compiler* c = frame->c; - - PROTECT(t, reference); - - GcPair* pair = makePair(t, frame->context->method, reference); - - compileReferenceInvoke( - frame, - c->nativeCall(c->constant(getThunk(t, thunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::iptr(), - args(c->threadRegister(), frame->append(pair))), - reference, - isStatic, - tailCall); -} - -void compileAbstractInvoke(Frame* frame, - ir::Value* method, - GcMethod* target, - bool tailCall) -{ - frame->stackCall( - method, target, tailCall ? Compiler::TailJump : 0, frame->trace(0, 0)); -} - -void compileDirectAbstractInvoke(MyThread* t, - Frame* frame, - Thunk thunk, - GcMethod* target, - bool tailCall) -{ - avian::codegen::Compiler* c = frame->c; - - compileAbstractInvoke( - frame, - c->nativeCall(c->constant(getThunk(t, thunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::iptr(), - args(c->threadRegister(), frame->append(target))), - target, - tailCall); -} - -void handleMonitorEvent(MyThread* t, Frame* frame, intptr_t function) -{ - avian::codegen::Compiler* c = frame->c; - GcMethod* method = frame->context->method; - - if (method->flags() & ACC_SYNCHRONIZED) { - ir::Value* lock; - if (method->flags() & ACC_STATIC) { - PROTECT(t, method); - - lock = frame->append(method->class_()); - } else { - lock = loadLocal( - frame->context, 1, ir::Type::object(), savedTargetIndex(t, method)); - } - - c->nativeCall(c->constant(function, ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), lock)); - } -} - -void handleEntrance(MyThread* t, Frame* frame) -{ - GcMethod* method = frame->context->method; - - if ((method->flags() & (ACC_SYNCHRONIZED | ACC_STATIC)) == ACC_SYNCHRONIZED) { - // save 'this' pointer in case it is overwritten. - unsigned index = savedTargetIndex(t, method); - storeLocal(frame->context, - 1, - ir::Type::object(), - loadLocal(frame->context, 1, ir::Type::object(), 0), - index); - frame->set(index, ir::Type::object()); - } - - handleMonitorEvent(t, - frame, - getThunk(t, - method->flags() & ACC_STATIC - ? acquireMonitorForClassOnEntranceThunk - : acquireMonitorForObjectOnEntranceThunk)); -} - -void handleExit(MyThread* t, Frame* frame) -{ - handleMonitorEvent(t, - frame, - getThunk(t, - frame->context->method->flags() & ACC_STATIC - ? releaseMonitorForClassThunk - : releaseMonitorForObjectThunk)); -} - -bool inTryBlock(MyThread* t UNUSED, GcCode* code, unsigned ip) -{ - GcExceptionHandlerTable* table - = cast(t, code->exceptionHandlerTable()); - if (table) { - unsigned length = table->length(); - for (unsigned i = 0; i < length; ++i) { - uint64_t eh = table->body()[i]; - if (ip >= exceptionHandlerStart(eh) and ip < exceptionHandlerEnd(eh)) { - return true; - } - } - } - return false; -} - -bool needsReturnBarrier(MyThread* t UNUSED, GcMethod* method) -{ - return (method->flags() & ConstructorFlag) - and (method->class_()->vmFlags() & HasFinalMemberFlag); -} - -bool returnsNext(MyThread* t, GcCode* code, unsigned ip) -{ - switch (code->body()[ip]) { - case return_: - case areturn: - case ireturn: - case freturn: - case lreturn: - case dreturn: - return true; - - case goto_: { - uint32_t offset = codeReadInt16(t, code, ++ip); - uint32_t newIp = (ip - 3) + offset; - assertT(t, newIp < code->length()); - - return returnsNext(t, code, newIp); - } - - case goto_w: { - uint32_t offset = codeReadInt32(t, code, ++ip); - uint32_t newIp = (ip - 5) + offset; - assertT(t, newIp < code->length()); - - return returnsNext(t, code, newIp); - } - - default: - return false; - } -} - -bool isTailCall(MyThread* t, - GcCode* code, - unsigned ip, - GcMethod* caller, - int calleeReturnCode, - GcByteArray* calleeClassName, - GcByteArray* calleeMethodName, - GcByteArray* calleeMethodSpec) -{ - return avian::codegen::TailCalls - and ((caller->flags() & ACC_SYNCHRONIZED) == 0) - and (not inTryBlock(t, code, ip - 1)) - and (not needsReturnBarrier(t, caller)) - and (caller->returnCode() == VoidField - or caller->returnCode() == calleeReturnCode) - and returnsNext(t, code, ip) - and t->m->classpath->canTailCall(t, - caller, - calleeClassName, - calleeMethodName, - calleeMethodSpec); -} - -bool isTailCall(MyThread* t, - GcCode* code, - unsigned ip, - GcMethod* caller, - GcMethod* callee) -{ - return isTailCall(t, - code, - ip, - caller, - callee->returnCode(), - callee->class_()->name(), - callee->name(), - callee->spec()); -} - -bool isReferenceTailCall(MyThread* t, - GcCode* code, - unsigned ip, - GcMethod* caller, - GcReference* calleeReference) -{ - return isTailCall(t, - code, - ip, - caller, - methodReferenceReturnCode(t, calleeReference), - calleeReference->class_(), - calleeReference->name(), - calleeReference->spec()); -} - -lir::TernaryOperation toCompilerJumpOp(MyThread* t, unsigned instruction) -{ - switch (instruction) { - case ifeq: - case if_icmpeq: - case if_acmpeq: - case ifnull: - return lir::JumpIfEqual; - case ifne: - case if_icmpne: - case if_acmpne: - case ifnonnull: - return lir::JumpIfNotEqual; - case ifgt: - case if_icmpgt: - return lir::JumpIfGreater; - case ifge: - case if_icmpge: - return lir::JumpIfGreaterOrEqual; - case iflt: - case if_icmplt: - return lir::JumpIfLess; - case ifle: - case if_icmple: - return lir::JumpIfLessOrEqual; - default: - abort(t); - } -} - -bool integerBranch(MyThread* t, - Frame* frame, - GcCode* code, - unsigned& ip, - ir::Value* a, - ir::Value* b, - unsigned* newIpp) -{ - if (ip + 3 > code->length()) { - return false; - } - - avian::codegen::Compiler* c = frame->c; - unsigned instruction = code->body()[ip++]; - uint32_t offset = codeReadInt16(t, code, ip); - uint32_t newIp = (ip - 3) + offset; - assertT(t, newIp < code->length()); - - ir::Value* target = frame->machineIpValue(newIp); - - switch (instruction) { - case ifeq: - case ifne: - case ifgt: - case ifge: - case iflt: - case ifle: - c->condJump(toCompilerJumpOp(t, instruction), a, b, target); - break; - - default: - ip -= 3; - return false; - } - - *newIpp = newIp; - return true; -} - -lir::TernaryOperation toCompilerFloatJumpOp(MyThread* t, - unsigned instruction, - bool lessIfUnordered) -{ - switch (instruction) { - case ifeq: - return lir::JumpIfFloatEqual; - case ifne: - return lir::JumpIfFloatNotEqual; - case ifgt: - if (lessIfUnordered) { - return lir::JumpIfFloatGreater; - } else { - return lir::JumpIfFloatGreaterOrUnordered; - } - case ifge: - if (lessIfUnordered) { - return lir::JumpIfFloatGreaterOrEqual; - } else { - return lir::JumpIfFloatGreaterOrEqualOrUnordered; - } - case iflt: - if (lessIfUnordered) { - return lir::JumpIfFloatLessOrUnordered; - } else { - return lir::JumpIfFloatLess; - } - case ifle: - if (lessIfUnordered) { - return lir::JumpIfFloatLessOrEqualOrUnordered; - } else { - return lir::JumpIfFloatLessOrEqual; - } - default: - abort(t); - } -} - -bool floatBranch(MyThread* t, - Frame* frame, - GcCode* code, - unsigned& ip, - bool lessIfUnordered, - ir::Value* a, - ir::Value* b, - unsigned* newIpp) -{ - if (ip + 3 > code->length()) { - return false; - } - - avian::codegen::Compiler* c = frame->c; - unsigned instruction = code->body()[ip++]; - uint32_t offset = codeReadInt16(t, code, ip); - uint32_t newIp = (ip - 3) + offset; - assertT(t, newIp < code->length()); - - ir::Value* target = frame->machineIpValue(newIp); - - switch (instruction) { - case ifeq: - case ifne: - case ifgt: - case ifge: - case iflt: - case ifle: - c->condJump( - toCompilerFloatJumpOp(t, instruction, lessIfUnordered), a, b, target); - break; - - default: - ip -= 3; - return false; - } - - *newIpp = newIp; - return true; -} - -ir::Value* popLongAddress(Frame* frame) -{ - return TargetBytesPerWord == 8 - ? frame->popLarge(ir::Type::i8()) - : frame->c->load(ir::ExtendMode::Signed, - frame->popLarge(ir::Type::i8()), - ir::Type::iptr()); -} - -bool intrinsic(MyThread* t UNUSED, Frame* frame, GcMethod* target) -{ -#define MATCH(name, constant) \ - (name->length() == sizeof(constant) \ - and ::strcmp(reinterpret_cast(name->body().begin()), constant) == 0) - - GcByteArray* className = target->class_()->name(); - if (UNLIKELY(MATCH(className, "java/lang/Math"))) { - avian::codegen::Compiler* c = frame->c; - if (MATCH(target->name(), "sqrt") and MATCH(target->spec(), "(D)D")) { - frame->pushLarge( - ir::Type::f8(), - c->unaryOp(lir::FloatSquareRoot, frame->popLarge(ir::Type::f8()))); - return true; - } else if (MATCH(target->name(), "abs")) { - if (MATCH(target->spec(), "(I)I")) { - frame->push(ir::Type::i4(), - c->unaryOp(lir::Absolute, frame->pop(ir::Type::i4()))); - return true; - } else if (MATCH(target->spec(), "(J)J")) { - frame->pushLarge( - ir::Type::i8(), - c->unaryOp(lir::Absolute, frame->popLarge(ir::Type::i8()))); - return true; - } else if (MATCH(target->spec(), "(F)F")) { - frame->push(ir::Type::f4(), - c->unaryOp(lir::FloatAbsolute, frame->pop(ir::Type::f4()))); - return true; - } - } - } else if (UNLIKELY(MATCH(className, "sun/misc/Unsafe"))) { - avian::codegen::Compiler* c = frame->c; - if (MATCH(target->name(), "getByte") and MATCH(target->spec(), "(J)B")) { - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - frame->push(ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(address, ir::Type::i1()), - ir::Type::i4())); - return true; - } else if (MATCH(target->name(), "putByte") - and MATCH(target->spec(), "(JB)V")) { - ir::Value* value = frame->pop(ir::Type::i4()); - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - c->store(value, c->memory(address, ir::Type::i1())); - return true; - } else if ((MATCH(target->name(), "getShort") - and MATCH(target->spec(), "(J)S")) - or (MATCH(target->name(), "getChar") - and MATCH(target->spec(), "(J)C"))) { - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - frame->push(ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(address, ir::Type::i2()), - ir::Type::i4())); - return true; - } else if ((MATCH(target->name(), "putShort") - and MATCH(target->spec(), "(JS)V")) - or (MATCH(target->name(), "putChar") - and MATCH(target->spec(), "(JC)V"))) { - ir::Value* value = frame->pop(ir::Type::i4()); - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - c->store(value, c->memory(address, ir::Type::i2())); - return true; - } else if ((MATCH(target->name(), "getInt") - and MATCH(target->spec(), "(J)I")) - or (MATCH(target->name(), "getFloat") - and MATCH(target->spec(), "(J)F"))) { - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - ir::Type type = MATCH(target->name(), "getInt") ? ir::Type::i4() - : ir::Type::f4(); - frame->push( - type, - c->load(ir::ExtendMode::Signed, c->memory(address, type), type)); - return true; - } else if ((MATCH(target->name(), "putInt") - and MATCH(target->spec(), "(JI)V")) - or (MATCH(target->name(), "putFloat") - and MATCH(target->spec(), "(JF)V"))) { - ir::Type type = MATCH(target->name(), "putInt") ? ir::Type::i4() - : ir::Type::f4(); - ir::Value* value = frame->pop(type); - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - c->store(value, c->memory(address, type)); - return true; - } else if ((MATCH(target->name(), "getLong") - and MATCH(target->spec(), "(J)J")) - or (MATCH(target->name(), "getDouble") - and MATCH(target->spec(), "(J)D"))) { - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - ir::Type type = MATCH(target->name(), "getLong") ? ir::Type::i8() - : ir::Type::f8(); - frame->pushLarge( - type, - c->load(ir::ExtendMode::Signed, c->memory(address, type), type)); - return true; - } else if ((MATCH(target->name(), "putLong") - and MATCH(target->spec(), "(JJ)V")) - or (MATCH(target->name(), "putDouble") - and MATCH(target->spec(), "(JD)V"))) { - ir::Type type = MATCH(target->name(), "putLong") ? ir::Type::i8() - : ir::Type::f8(); - ir::Value* value = frame->popLarge(type); - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - c->store(value, c->memory(address, type)); - return true; - } else if (MATCH(target->name(), "getAddress") - and MATCH(target->spec(), "(J)J")) { - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - frame->pushLarge(ir::Type::i8(), - c->load(ir::ExtendMode::Signed, - c->memory(address, ir::Type::iptr()), - ir::Type::i8())); - return true; - } else if (MATCH(target->name(), "putAddress") - and MATCH(target->spec(), "(JJ)V")) { - ir::Value* value = frame->popLarge(ir::Type::i8()); - ir::Value* address = popLongAddress(frame); - frame->pop(ir::Type::object()); - c->store(value, c->memory(address, ir::Type::iptr())); - return true; - } - } - return false; -} - -unsigned targetFieldOffset(Context* context, GcField* field) -{ - if (context->bootContext) { - return context->bootContext->resolver->fieldOffset(context->thread, field); - } else { - return field->offset(); - } -} - -class Stack { - public: - class MyResource : public Thread::AutoResource { - public: - MyResource(Stack* s) : AutoResource(s->thread), s(s) - { - } - - virtual void release() - { - s->zone.dispose(); - } - - Stack* s; - }; - - Stack(MyThread* t) : thread(t), zone(t->m->heap, 0), resource(this) - { - } - - ~Stack() - { - zone.dispose(); - } - - void pushValue(uintptr_t v) - { - *static_cast(push(BytesPerWord)) = v; - } - - uintptr_t peekValue(unsigned offset) - { - return *static_cast(peek((offset + 1) * BytesPerWord)); - } - - uintptr_t popValue() - { - uintptr_t v = peekValue(0); - pop(BytesPerWord); - return v; - } - - void* push(unsigned size) - { - return zone.allocate(size); - } - - void* peek(unsigned size) - { - return zone.peek(size); - } - - void pop(unsigned size) - { - zone.pop(size); - } - - MyThread* thread; - Zone zone; - MyResource resource; -}; - -class SwitchState { - public: - SwitchState(Compiler::State* state, - unsigned count, - unsigned defaultIp, - ir::Value* key, - avian::codegen::Promise* start, - int bottom, - int top) - : state(state), - count(count), - defaultIp(defaultIp), - key(key), - start(start), - bottom(bottom), - top(top), - index(0) - { - } - - Frame* frame() - { - return reinterpret_cast(reinterpret_cast(this) - - pad(count * 4) - pad(sizeof(Frame))); - } - - uint32_t* ipTable() - { - return reinterpret_cast(reinterpret_cast(this) - - pad(count * 4)); - } - - Compiler::State* state; - unsigned count; - unsigned defaultIp; - ir::Value* key; - avian::codegen::Promise* start; - int bottom; - int top; - unsigned index; -}; - -lir::TernaryOperation toCompilerBinaryOp(MyThread* t, unsigned instruction) -{ - switch (instruction) { - case iadd: - case ladd: - return lir::Add; - case ior: - case lor: - return lir::Or; - case ishl: - case lshl: - return lir::ShiftLeft; - case ishr: - case lshr: - return lir::ShiftRight; - case iushr: - case lushr: - return lir::UnsignedShiftRight; - case fadd: - case dadd: - return lir::FloatAdd; - case fsub: - case dsub: - return lir::FloatSubtract; - case fmul: - case dmul: - return lir::FloatMultiply; - case fdiv: - case ddiv: - return lir::FloatDivide; - case frem: - case vm::drem: - return lir::FloatRemainder; - case iand: - case land: - return lir::And; - case isub: - case lsub: - return lir::Subtract; - case ixor: - case lxor: - return lir::Xor; - case imul: - case lmul: - return lir::Multiply; - default: - abort(t); - } -} - -uintptr_t aioobThunk(MyThread* t); - -uintptr_t stackOverflowThunk(MyThread* t); - -void checkField(Thread* t, GcField* field, bool shouldBeStatic) -{ - if (((field->flags() & ACC_STATIC) == 0) == shouldBeStatic) { - throwNew(t, - GcIncompatibleClassChangeError::Type, - "expected %s.%s to be %s", - field->class_()->name()->body().begin(), - field->name()->body().begin(), - shouldBeStatic ? "static" : "non-static"); - } -} - -bool isLambda(Thread* t, - GcClassLoader* loader, - GcCharArray* bootstrapArray, - GcInvocation* invocation) -{ - GcMethod* bootstrap = cast(t, - resolve(t, - loader, - invocation->pool(), - bootstrapArray->body()[0], - findMethodInClass, - GcNoSuchMethodError::Type))->method(); - PROTECT(t, bootstrap); - - return vm::strcmp(reinterpret_cast( - "java/lang/invoke/LambdaMetafactory"), - bootstrap->class_()->name()->body().begin()) == 0 - and ((vm::strcmp(reinterpret_cast("metafactory"), - bootstrap->name()->body().begin()) == 0 - and vm::strcmp( - reinterpret_cast( - "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/" - "String;Ljava/lang/invoke/MethodType;Ljava/lang/" - "invoke/" - "MethodType;Ljava/lang/invoke/MethodHandle;Ljava/" - "lang/" - "invoke/MethodType;)Ljava/lang/invoke/CallSite;"), - bootstrap->spec()->body().begin()) == 0) - or (vm::strcmp(reinterpret_cast("altMetafactory"), - bootstrap->name()->body().begin()) == 0 - and vm::strcmp( - reinterpret_cast( - "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/" - "lang/" - "String;Ljava/lang/invoke/MethodType;[Ljava/lang/" - "Object;)Ljava/lang/invoke/CallSite;"), - bootstrap->spec()->body().begin()) == 0)); -} - -void compile(MyThread* t, - Frame* initialFrame, - unsigned initialIp, - int exceptionHandlerStart = -1) -{ - enum { Return, Unbranch, Unsubroutine, Untable0, Untable1, Unswitch }; - - Frame* frame = initialFrame; - avian::codegen::Compiler* c = frame->c; - Context* context = frame->context; - unsigned stackSize = context->method->code()->maxStack(); - Stack stack(t); - unsigned ip = initialIp; - unsigned newIp; - stack.pushValue(Return); - -start: - ir::Type* stackMap - = static_cast(stack.push(stackSize * sizeof(ir::Type))); - frame = new (stack.push(sizeof(Frame))) Frame(frame, stackMap); - -loop: - GcCode* code = context->method->code(); - PROTECT(t, code); - - while (ip < code->length()) { - if (context->visitTable[frame->duplicatedIp(ip)]++) { - // we've already visited this part of the code - frame->visitLogicalIp(ip); - goto next; - } - - frame->startLogicalIp(ip); - - if (exceptionHandlerStart >= 0) { - c->initLocalsFromLogicalIp(exceptionHandlerStart); - - exceptionHandlerStart = -1; - - frame->pushObject(); - - c->nativeCall( - c->constant(getThunk(t, gcIfNecessaryThunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister())); - } - - if (DebugInstructions) { - unsigned startingIp = ip; - fprintf(stderr, " stack: ["); - for (size_t i = frame->localSize(); i < frame->sp; i++) { - ir::Type ty = frame->get(i); - if (ty == ir::Type::i4()) { - fprintf(stderr, "I"); - } else if (ty == ir::Type::i8()) { - fprintf(stderr, "L"); - } else if (ty == ir::Type::f4()) { - fprintf(stderr, "F"); - } else if (ty == ir::Type::f8()) { - fprintf(stderr, "D"); - } else if (ty == ir::Type::object()) { - fprintf(stderr, "O"); - } else { - fprintf(stderr, "?"); - } - } - fprintf(stderr, "]\n"); - fprintf(stderr, "% 5d: ", startingIp); - avian::jvm::debug::printInstruction(code->body().begin(), startingIp); - fprintf(stderr, "\n"); - } - - unsigned instruction = code->body()[ip++]; - - switch (instruction) { - case aaload: - case baload: - case caload: - case daload: - case faload: - case iaload: - case laload: - case saload: { - ir::Value* index = frame->pop(ir::Type::i4()); - ir::Value* array = frame->pop(ir::Type::object()); - - if (inTryBlock(t, code, ip - 1)) { - c->saveLocals(); - frame->trace(0, 0); - } - - if (CheckArrayBounds) { - c->checkBounds(array, TargetArrayLength, index, aioobThunk(t)); - } - - switch (instruction) { - case aaload: - frame->push( - ir::Type::object(), - c->load( - ir::ExtendMode::Signed, - c->memory(array, ir::Type::object(), TargetArrayBody, index), - ir::Type::object())); - break; - - case faload: - frame->push( - ir::Type::f4(), - c->load(ir::ExtendMode::Signed, - c->memory(array, ir::Type::f4(), TargetArrayBody, index), - ir::Type::f4())); - break; - - case iaload: - frame->push( - ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(array, ir::Type::i4(), TargetArrayBody, index), - ir::Type::i4())); - break; - - case baload: - frame->push( - ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(array, ir::Type::i1(), TargetArrayBody, index), - ir::Type::i4())); - break; - - case caload: - frame->push( - ir::Type::i4(), - c->load(ir::ExtendMode::Unsigned, - c->memory(array, ir::Type::i2(), TargetArrayBody, index), - ir::Type::i4())); - break; - - case daload: - frame->pushLarge( - ir::Type::f8(), - c->load(ir::ExtendMode::Signed, - c->memory(array, ir::Type::f8(), TargetArrayBody, index), - ir::Type::f8())); - break; - - case laload: - frame->pushLarge( - ir::Type::i8(), - c->load(ir::ExtendMode::Signed, - c->memory(array, ir::Type::i8(), TargetArrayBody, index), - ir::Type::i8())); - break; - - case saload: - frame->push( - ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(array, ir::Type::i2(), TargetArrayBody, index), - ir::Type::i4())); - break; - } - } break; - - case aastore: - case bastore: - case castore: - case dastore: - case fastore: - case iastore: - case lastore: - case sastore: { - ir::Value* value; - if (instruction == lastore) { - value = frame->popLarge(ir::Type::i8()); - } else if (instruction == dastore) { - value = frame->popLarge(ir::Type::f8()); - } else if (instruction == aastore) { - value = frame->pop(ir::Type::object()); - } else if (instruction == fastore) { - value = frame->pop(ir::Type::f4()); - } else { - value = frame->pop(ir::Type::i4()); - } - - ir::Value* index = frame->pop(ir::Type::i4()); - ir::Value* array = frame->pop(ir::Type::object()); - - if (inTryBlock(t, code, ip - 1)) { - c->saveLocals(); - frame->trace(0, 0); - } - - if (CheckArrayBounds) { - c->checkBounds(array, TargetArrayLength, index, aioobThunk(t)); - } - - switch (instruction) { - case aastore: { - c->nativeCall( - c->constant(getThunk(t, setMaybeNullThunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), - array, - c->binaryOp(lir::Add, - ir::Type::i4(), - c->constant(TargetArrayBody, ir::Type::i4()), - c->binaryOp(lir::ShiftLeft, - ir::Type::i4(), - c->constant(log(TargetBytesPerWord), - ir::Type::i4()), - index)), - value)); - } break; - - case fastore: - c->store(value, - c->memory(array, ir::Type::f4(), TargetArrayBody, index)); - break; - - case iastore: - c->store(value, - c->memory(array, ir::Type::i4(), TargetArrayBody, index)); - break; - - case bastore: - c->store(value, - c->memory(array, ir::Type::i1(), TargetArrayBody, index)); - break; - - case castore: - case sastore: - c->store(value, - c->memory(array, ir::Type::i2(), TargetArrayBody, index)); - break; - - case dastore: - c->store(value, - c->memory(array, ir::Type::f8(), TargetArrayBody, index)); - break; - - case lastore: - c->store(value, - c->memory(array, ir::Type::i8(), TargetArrayBody, index)); - break; - } - } break; - - case aconst_null: - frame->push(ir::Type::object(), c->constant(0, ir::Type::object())); - break; - - case aload: - frame->load(ir::Type::object(), code->body()[ip++]); - break; - - case aload_0: - frame->load(ir::Type::object(), 0); - break; - - case aload_1: - frame->load(ir::Type::object(), 1); - break; - - case aload_2: - frame->load(ir::Type::object(), 2); - break; - - case aload_3: - frame->load(ir::Type::object(), 3); - break; - - case anewarray: { - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcClass* class_ - = resolveClassInPool(t, context->method, index - 1, false); - - ir::Value* length = frame->pop(ir::Type::i4()); - - object argument; - Thunk thunk; - if (LIKELY(class_)) { - argument = class_; - thunk = makeBlankObjectArrayThunk; - } else { - argument = makePair(t, context->method, reference); - thunk = makeBlankObjectArrayFromReferenceThunk; - } - - frame->push( - ir::Type::object(), - c->nativeCall( - c->constant(getThunk(t, thunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::object(), - args(c->threadRegister(), frame->append(argument), length))); - } break; - - case areturn: { - handleExit(t, frame); - c->return_(frame->pop(ir::Type::object())); - } - goto next; - - case arraylength: { - frame->push(ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(frame->pop(ir::Type::object()), - ir::Type::iptr(), - TargetArrayLength), - ir::Type::i4())); - } break; - - case astore: - frame->store(ir::Type::object(), code->body()[ip++]); - break; - - case astore_0: - frame->store(ir::Type::object(), 0); - break; - - case astore_1: - frame->store(ir::Type::object(), 1); - break; - - case astore_2: - frame->store(ir::Type::object(), 2); - break; - - case astore_3: - frame->store(ir::Type::object(), 3); - break; - - case athrow: { - ir::Value* target = frame->pop(ir::Type::object()); - c->nativeCall(c->constant(getThunk(t, throw_Thunk), ir::Type::iptr()), - Compiler::NoReturn, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), target)); - - c->nullaryOp(lir::Trap); - } - goto next; - - case bipush: - frame->push( - ir::Type::i4(), - c->constant(static_cast(code->body()[ip++]), ir::Type::i4())); - break; - - case checkcast: { - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcClass* class_ - = resolveClassInPool(t, context->method, index - 1, false); - - object argument; - Thunk thunk; - if (LIKELY(class_)) { - argument = class_; - thunk = checkCastThunk; - } else { - argument = makePair(t, context->method, reference); - thunk = checkCastFromReferenceThunk; - } - - ir::Value* instance = c->peek(1, 0); - - c->nativeCall( - c->constant(getThunk(t, thunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), frame->append(argument), instance)); - } break; - - case d2f: { - frame->push(ir::Type::f4(), - c->f2f(ir::Type::f4(), frame->popLarge(ir::Type::f8()))); - } break; - - case d2i: { - frame->push(ir::Type::i4(), - c->f2i(ir::Type::i4(), frame->popLarge(ir::Type::f8()))); - } break; - - case d2l: { - frame->pushLarge(ir::Type::i8(), - c->f2i(ir::Type::i8(), frame->popLarge(ir::Type::f8()))); - } break; - - case dadd: - case dsub: - case dmul: - case ddiv: - case vm::drem: { - ir::Value* a = frame->popLarge(ir::Type::f8()); - ir::Value* b = frame->popLarge(ir::Type::f8()); - - frame->pushLarge( - ir::Type::f8(), - c->binaryOp( - toCompilerBinaryOp(t, instruction), ir::Type::f8(), a, b)); - } break; - - case dcmpg: { - ir::Value* a = frame->popLarge(ir::Type::f8()); - ir::Value* b = frame->popLarge(ir::Type::f8()); - - if (floatBranch(t, frame, code, ip, false, a, b, &newIp)) { - goto branch; - } else { - frame->push(ir::Type::i4(), - c->nativeCall(c->constant(getThunk(t, compareDoublesGThunk), - ir::Type::iptr()), - 0, - 0, - ir::Type::i4(), - args(nullptr, a, nullptr, b))); - } - } break; - - case dcmpl: { - ir::Value* a = frame->popLarge(ir::Type::f8()); - ir::Value* b = frame->popLarge(ir::Type::f8()); - - if (floatBranch(t, frame, code, ip, true, a, b, &newIp)) { - goto branch; - } else { - frame->push(ir::Type::i4(), - c->nativeCall(c->constant(getThunk(t, compareDoublesLThunk), - ir::Type::iptr()), - 0, - 0, - ir::Type::i4(), - args(nullptr, a, nullptr, b))); - } - } break; - - case dconst_0: - frame->pushLarge(ir::Type::f8(), - c->constant(doubleToBits(0.0), ir::Type::f8())); - break; - - case dconst_1: - frame->pushLarge(ir::Type::f8(), - c->constant(doubleToBits(1.0), ir::Type::f8())); - break; - - case dneg: { - frame->pushLarge( - ir::Type::f8(), - c->unaryOp(lir::FloatNegate, frame->popLarge(ir::Type::f8()))); - } break; - - case vm::dup: - frame->dup(); - break; - - case dup_x1: - frame->dupX1(); - break; - - case dup_x2: - frame->dupX2(); - break; - - case vm::dup2: - frame->dup2(); - break; - - case dup2_x1: - frame->dup2X1(); - break; - - case dup2_x2: - frame->dup2X2(); - break; - - case f2d: { - frame->pushLarge(ir::Type::f8(), - c->f2f(ir::Type::f8(), frame->pop(ir::Type::f4()))); - } break; - - case f2i: { - frame->push(ir::Type::i4(), - c->f2i(ir::Type::i4(), frame->pop(ir::Type::f4()))); - } break; - - case f2l: { - frame->pushLarge(ir::Type::i8(), - c->f2i(ir::Type::i8(), frame->pop(ir::Type::f4()))); - } break; - - case fadd: - case fsub: - case fmul: - case fdiv: - case frem: { - ir::Value* a = frame->pop(ir::Type::f4()); - ir::Value* b = frame->pop(ir::Type::f4()); - - frame->push( - ir::Type::f4(), - c->binaryOp( - toCompilerBinaryOp(t, instruction), ir::Type::f4(), a, b)); - } break; - - case fcmpg: { - ir::Value* a = frame->pop(ir::Type::f4()); - ir::Value* b = frame->pop(ir::Type::f4()); - - if (floatBranch(t, frame, code, ip, false, a, b, &newIp)) { - goto branch; - } else { - frame->push(ir::Type::i4(), - c->nativeCall(c->constant(getThunk(t, compareFloatsGThunk), - ir::Type::iptr()), - 0, - 0, - ir::Type::i4(), - args(a, b))); - } - } break; - - case fcmpl: { - ir::Value* a = frame->pop(ir::Type::f4()); - ir::Value* b = frame->pop(ir::Type::f4()); - - if (floatBranch(t, frame, code, ip, true, a, b, &newIp)) { - goto branch; - } else { - frame->push(ir::Type::i4(), - c->nativeCall(c->constant(getThunk(t, compareFloatsLThunk), - ir::Type::iptr()), - 0, - 0, - ir::Type::i4(), - args(a, b))); - } - } break; - - case fconst_0: - frame->push(ir::Type::f4(), - c->constant(floatToBits(0.0), ir::Type::f4())); - break; - - case fconst_1: - frame->push(ir::Type::f4(), - c->constant(floatToBits(1.0), ir::Type::f4())); - break; - - case fconst_2: - frame->push(ir::Type::f4(), - c->constant(floatToBits(2.0), ir::Type::f4())); - break; - - case fneg: { - frame->push(ir::Type::f4(), - c->unaryOp(lir::FloatNegate, frame->pop(ir::Type::f4()))); - } break; - - case getfield: - case getstatic: { - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcField* field = resolveField(t, context->method, index - 1, false); - - if (LIKELY(field)) { - if ((field->flags() & ACC_VOLATILE) and TargetBytesPerWord == 4 - and (field->code() == DoubleField or field->code() == LongField)) { - PROTECT(t, field); - - c->nativeCall(c->constant(getThunk(t, acquireMonitorForObjectThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), frame->append(field))); - } - - ir::Value* table; - - if (instruction == getstatic) { - checkField(t, field, true); - - PROTECT(t, field); - - if (classNeedsInit(t, field->class_())) { - c->nativeCall( - c->constant(getThunk(t, tryInitClassThunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), frame->append(field->class_()))); - } - - table = frame->append(field->class_()->staticTable()); - } else { - checkField(t, field, false); - - table = frame->pop(ir::Type::object()); - - if (inTryBlock(t, code, ip - 3)) { - c->saveLocals(); - frame->trace(0, 0); - } - } - - switch (field->code()) { - case ByteField: - case BooleanField: - frame->push(ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(table, - ir::Type::i1(), - targetFieldOffset(context, field)), - ir::Type::i4())); - break; - - case CharField: - frame->push(ir::Type::i4(), - c->load(ir::ExtendMode::Unsigned, - c->memory(table, - ir::Type::i2(), - targetFieldOffset(context, field)), - ir::Type::i4())); - break; - - case ShortField: - frame->push(ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(table, - ir::Type::i2(), - targetFieldOffset(context, field)), - ir::Type::i4())); - break; - - case FloatField: - frame->push(ir::Type::f4(), - c->load(ir::ExtendMode::Signed, - c->memory(table, - ir::Type::f4(), - targetFieldOffset(context, field)), - ir::Type::f4())); - break; - - case IntField: - frame->push(ir::Type::i4(), - c->load(ir::ExtendMode::Signed, - c->memory(table, - ir::Type::i4(), - targetFieldOffset(context, field)), - ir::Type::i4())); - break; - - case DoubleField: - frame->pushLarge(ir::Type::f8(), - c->load(ir::ExtendMode::Signed, - c->memory(table, - ir::Type::f8(), - targetFieldOffset(context, field)), - ir::Type::f8())); - break; - - case LongField: - frame->pushLarge(ir::Type::i8(), - c->load(ir::ExtendMode::Signed, - c->memory(table, - ir::Type::i8(), - targetFieldOffset(context, field)), - ir::Type::i8())); - break; - - case ObjectField: - frame->push(ir::Type::object(), - c->load(ir::ExtendMode::Signed, - c->memory(table, - ir::Type::object(), - targetFieldOffset(context, field)), - ir::Type::object())); - break; - - default: - abort(t); - } - - if (field->flags() & ACC_VOLATILE) { - if (TargetBytesPerWord == 4 and (field->code() == DoubleField - or field->code() == LongField)) { - c->nativeCall(c->constant(getThunk(t, releaseMonitorForObjectThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), frame->append(field))); - } else { - c->nullaryOp(lir::LoadBarrier); - } - } - } else { - GcReference* ref = cast(t, reference); - PROTECT(t, ref); - int fieldCode = vm::fieldCode(t, ref->spec()->body()[0]); - - GcPair* pair = makePair(t, context->method, reference); - - ir::Type rType = operandTypeForFieldCode(t, fieldCode); - - ir::Value* result; - if (instruction == getstatic) { - result = c->nativeCall( - c->constant(getThunk(t, getStaticFieldValueFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - rType, - args(c->threadRegister(), frame->append(pair))); - } else { - ir::Value* instance = frame->pop(ir::Type::object()); - - result = c->nativeCall( - c->constant(getThunk(t, getFieldValueFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - rType, - args(c->threadRegister(), frame->append(pair), instance)); - } - - frame->pushReturnValue(fieldCode, result); - } - } break; - - case goto_: { - uint32_t offset = codeReadInt16(t, code, ip); - uint32_t newIp = (ip - 3) + offset; - assertT(t, newIp < code->length()); - - if (newIp <= ip) { - compileSafePoint(t, c, frame); - } - - c->jmp(frame->machineIpValue(newIp)); - ip = newIp; - } break; - - case goto_w: { - uint32_t offset = codeReadInt32(t, code, ip); - uint32_t newIp = (ip - 5) + offset; - assertT(t, newIp < code->length()); - - if (newIp <= ip) { - compileSafePoint(t, c, frame); - } - - c->jmp(frame->machineIpValue(newIp)); - ip = newIp; - } break; - - case i2b: { - frame->push(ir::Type::i4(), - c->truncateThenExtend(ir::ExtendMode::Signed, - ir::Type::i4(), - ir::Type::i1(), - frame->pop(ir::Type::i4()))); - } break; - - case i2c: { - frame->push(ir::Type::i4(), - c->truncateThenExtend(ir::ExtendMode::Unsigned, - ir::Type::i4(), - ir::Type::i2(), - frame->pop(ir::Type::i4()))); - } break; - - case i2d: { - frame->pushLarge(ir::Type::f8(), - c->i2f(ir::Type::f8(), frame->pop(ir::Type::i4()))); - } break; - - case i2f: { - frame->push(ir::Type::f4(), - c->i2f(ir::Type::f4(), frame->pop(ir::Type::i4()))); - } break; - - case i2l: - frame->pushLarge(ir::Type::i8(), - c->truncateThenExtend(ir::ExtendMode::Signed, - ir::Type::i8(), - ir::Type::i4(), - frame->pop(ir::Type::i4()))); - break; - - case i2s: { - frame->push(ir::Type::i4(), - c->truncateThenExtend(ir::ExtendMode::Signed, - ir::Type::i4(), - ir::Type::i2(), - frame->pop(ir::Type::i4()))); - } break; - - case iadd: - case iand: - case ior: - case ishl: - case ishr: - case iushr: - case isub: - case ixor: - case imul: { - ir::Value* a = frame->pop(ir::Type::i4()); - ir::Value* b = frame->pop(ir::Type::i4()); - frame->push( - ir::Type::i4(), - c->binaryOp( - toCompilerBinaryOp(t, instruction), ir::Type::i4(), a, b)); - } break; - - case iconst_m1: - frame->push(ir::Type::i4(), c->constant(-1, ir::Type::i4())); - break; - - case iconst_0: - frame->push(ir::Type::i4(), c->constant(0, ir::Type::i4())); - break; - - case iconst_1: - frame->push(ir::Type::i4(), c->constant(1, ir::Type::i4())); - break; - - case iconst_2: - frame->push(ir::Type::i4(), c->constant(2, ir::Type::i4())); - break; - - case iconst_3: - frame->push(ir::Type::i4(), c->constant(3, ir::Type::i4())); - break; - - case iconst_4: - frame->push(ir::Type::i4(), c->constant(4, ir::Type::i4())); - break; - - case iconst_5: - frame->push(ir::Type::i4(), c->constant(5, ir::Type::i4())); - break; - - case idiv: { - ir::Value* a = frame->pop(ir::Type::i4()); - ir::Value* b = frame->pop(ir::Type::i4()); - - if (inTryBlock(t, code, ip - 1)) { - c->saveLocals(); - frame->trace(0, 0); - } - - frame->push(ir::Type::i4(), - c->binaryOp(lir::Divide, ir::Type::i4(), a, b)); - } break; - - case if_acmpeq: - case if_acmpne: { - uint32_t offset = codeReadInt16(t, code, ip); - newIp = (ip - 3) + offset; - assertT(t, newIp < code->length()); - - if (newIp <= ip) { - compileSafePoint(t, c, frame); - } - - ir::Value* a = frame->pop(ir::Type::object()); - ir::Value* b = frame->pop(ir::Type::object()); - ir::Value* target = frame->machineIpValue(newIp); - - c->condJump(toCompilerJumpOp(t, instruction), a, b, target); - } - goto branch; - - case if_icmpeq: - case if_icmpne: - case if_icmpgt: - case if_icmpge: - case if_icmplt: - case if_icmple: { - uint32_t offset = codeReadInt16(t, code, ip); - newIp = (ip - 3) + offset; - assertT(t, newIp < code->length()); - - if (newIp <= ip) { - compileSafePoint(t, c, frame); - } - - ir::Value* a = frame->pop(ir::Type::i4()); - ir::Value* b = frame->pop(ir::Type::i4()); - ir::Value* target = frame->machineIpValue(newIp); - - c->condJump(toCompilerJumpOp(t, instruction), a, b, target); - } - goto branch; - - case ifeq: - case ifne: - case ifgt: - case ifge: - case iflt: - case ifle: { - uint32_t offset = codeReadInt16(t, code, ip); - newIp = (ip - 3) + offset; - assertT(t, newIp < code->length()); - - ir::Value* target = frame->machineIpValue(newIp); - - if (newIp <= ip) { - compileSafePoint(t, c, frame); - } - - ir::Value* a = c->constant(0, ir::Type::i4()); - ir::Value* b = frame->pop(ir::Type::i4()); - - c->condJump(toCompilerJumpOp(t, instruction), a, b, target); - } - goto branch; - - case ifnull: - case ifnonnull: { - uint32_t offset = codeReadInt16(t, code, ip); - newIp = (ip - 3) + offset; - assertT(t, newIp < code->length()); - - if (newIp <= ip) { - compileSafePoint(t, c, frame); - } - - ir::Value* a = c->constant(0, ir::Type::object()); - ir::Value* b = frame->pop(ir::Type::object()); - ir::Value* target = frame->machineIpValue(newIp); - - c->condJump(toCompilerJumpOp(t, instruction), a, b, target); - } - goto branch; - - case iinc: { - uint8_t index = code->body()[ip++]; - int8_t count = code->body()[ip++]; - - storeLocal(context, - 1, - ir::Type::i4(), - c->binaryOp(lir::Add, - ir::Type::i4(), - c->constant(count, ir::Type::i4()), - loadLocal(context, 1, ir::Type::i4(), index)), - index); - } break; - - case iload: - frame->load(ir::Type::i4(), code->body()[ip++]); - break; - case fload: - frame->load(ir::Type::f4(), code->body()[ip++]); - break; - - case iload_0: - frame->load(ir::Type::i4(), 0); - break; - case fload_0: - frame->load(ir::Type::f4(), 0); - break; - - case iload_1: - frame->load(ir::Type::i4(), 1); - break; - case fload_1: - frame->load(ir::Type::f4(), 1); - break; - - case iload_2: - frame->load(ir::Type::i4(), 2); - break; - case fload_2: - frame->load(ir::Type::f4(), 2); - break; - - case iload_3: - frame->load(ir::Type::i4(), 3); - break; - case fload_3: - frame->load(ir::Type::f4(), 3); - break; - - case ineg: { - frame->push(ir::Type::i4(), - c->unaryOp(lir::Negate, frame->pop(ir::Type::i4()))); - } break; - - case instanceof: { - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcClass* class_ - = resolveClassInPool(t, context->method, index - 1, false); - - ir::Value* instance = frame->pop(ir::Type::object()); - - object argument; - Thunk thunk; - if (LIKELY(class_)) { - argument = class_; - thunk = instanceOf64Thunk; - } else { - argument = makePair(t, context->method, reference); - thunk = instanceOfFromReferenceThunk; - } - - frame->push( - ir::Type::i4(), - c->nativeCall( - c->constant(getThunk(t, thunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::i4(), - args(c->threadRegister(), frame->append(argument), instance))); - } break; - - case invokedynamic: { - context->leaf = false; - - uint16_t poolIndex = codeReadInt16(t, code, ip); - ip += 2; - - GcInvocation* invocation = cast( - t, - singletonObject(t, context->method->code()->pool(), poolIndex - 1)); - - PROTECT(t, invocation); - - invocation->setClass(t, context->method->class_()); - - BootContext* bc = context->bootContext; - if (bc) { - // When we're AOT-compiling an application, we can't handle - // invokedynamic in general, since it usually implies runtime - // code generation. However, Java 8 lambda expressions are a - // special case for which we can generate code ahead of time. - // - // The only tricky part about it is that the class synthesis - // code resides in LambdaMetaFactory, which means we need to - // call out to a separate Java VM to execute it (the VM we're - // currently executing in won't work because it only knows how - // to compile code for the target machine, which might not be - // the same as the host; plus we don't want to pollute the - // runtime heap image with stuff that's only needed at compile - // time). - - GcClass* c = context->method->class_(); - PROTECT(t, c); - - GcMethod* target - = c->addendum()->bootstrapLambdaTable() - ? cast( - t, - cast(t, c->addendum()->bootstrapLambdaTable()) - ->body()[invocation->bootstrap()]) - : nullptr; - PROTECT(t, target); - - if (target == nullptr) { - GcCharArray* bootstrapArray = cast( - t, - cast(t, c->addendum()->bootstrapMethodTable()) - ->body()[invocation->bootstrap()]); - PROTECT(t, bootstrapArray); - - if (isLambda(t, c->loader(), bootstrapArray, invocation)) { - if (bc->hostVM == 0) { - throwNew( - t, - GcVirtualMachineError::Type, - "lambda expression encountered, but host VM is not " - "available; use -hostvm option to bootimage-generator to " - "fix this"); - } - - JNIEnv* e; - if (bc->hostVM->vtable->AttachCurrentThread(bc->hostVM, &e, 0) - == 0) { - e->vtable->PushLocalFrame(e, 256); - - jclass lmfClass = e->vtable->FindClass( - e, "java/lang/invoke/LambdaMetafactory"); - jmethodID makeLambda - = e->vtable->GetStaticMethodID(e, - lmfClass, - "makeLambda", - "(Ljava/lang/String;" - "Ljava/lang/String;" - "Ljava/lang/String;" - "Ljava/lang/String;" - "Ljava/lang/String;" - "Ljava/lang/String;" - "I" - ")[B"); - - GcMethodHandle* handle - = cast(t, - resolve(t, - c->loader(), - invocation->pool(), - bootstrapArray->body()[2], - findMethodInClass, - GcNoSuchMethodError::Type)); - - int kind = handle->kind(); - - GcMethod* method = handle->method(); - - jarray lambda = e->vtable->CallStaticObjectMethod( - e, - lmfClass, - makeLambda, - e->vtable->NewStringUTF( - e, - reinterpret_cast( - invocation->template_()->name()->body().begin())), - e->vtable->NewStringUTF( - e, - reinterpret_cast( - invocation->template_()->spec()->body().begin())), - e->vtable->NewStringUTF( - e, - reinterpret_cast( - cast( - t, - singletonObject(t, - invocation->pool(), - bootstrapArray->body()[1])) - ->body() - .begin())), - e->vtable->NewStringUTF( - e, - reinterpret_cast( - method->class_()->name()->body().begin())), - e->vtable->NewStringUTF(e, - reinterpret_cast( - method->name()->body().begin())), - e->vtable->NewStringUTF(e, - reinterpret_cast( - method->spec()->body().begin())), - kind); - - uint8_t* bytes = reinterpret_cast( - e->vtable->GetPrimitiveArrayCritical(e, lambda, 0)); - - GcClass* lambdaClass - = defineClass(t, - roots(t)->appLoader(), - bytes, - e->vtable->GetArrayLength(e, lambda)); - - bc->resolver->addClass( - t, lambdaClass, bytes, e->vtable->GetArrayLength(e, lambda)); - - e->vtable->ReleasePrimitiveArrayCritical(e, lambda, bytes, 0); - - e->vtable->PopLocalFrame(e, 0); - - THREAD_RUNTIME_ARRAY( - t, char, spec, invocation->template_()->spec()->length()); - memcpy(RUNTIME_ARRAY_BODY(spec), - invocation->template_()->spec()->body().begin(), - invocation->template_()->spec()->length()); - - target = resolveMethod( - t, lambdaClass, "make", RUNTIME_ARRAY_BODY(spec)); - - GcArray* table - = cast(t, c->addendum()->bootstrapLambdaTable()); - if (table == nullptr) { - table = makeArray( - t, - cast(t, c->addendum()->bootstrapMethodTable()) - ->length()); - c->addendum()->setBootstrapLambdaTable(t, table); - } - - table->setBodyElement(t, invocation->bootstrap(), target); - } else { - throwNew(t, - GcVirtualMachineError::Type, - "unable to attach to host VM"); - } - } else { - throwNew(t, - GcVirtualMachineError::Type, - "invokedynamic not supported for AOT-compiled code except " - "in the case of lambda expressions"); - } - } - - bool tailCall = isTailCall(t, code, ip, context->method, target); - compileDirectInvoke(t, frame, target, tailCall); - } else { - unsigned index = addDynamic(t, invocation); - - GcMethod* template_ = invocation->template_(); - unsigned returnCode = template_->returnCode(); - unsigned rSize = resultSize(t, returnCode); - unsigned parameterFootprint = template_->parameterFootprint(); - - // TODO: can we allow tailCalls in general? - // e.g. what happens if the call site is later bound to a method that - // can't be tail called? - // NOTE: calling isTailCall right now would cause an segfault, since - // invocation->template_()->class_() will be null. - // bool tailCall - // = isTailCall(t, code, ip, context->method, - // invocation->template_()); - bool tailCall = false; - - // todo: do we need to tell the compiler to add a load barrier - // here for VolatileCallSite instances? - - ir::Value* result - = c->stackCall(c->memory(c->memory(c->threadRegister(), - ir::Type::object(), - TARGET_THREAD_DYNAMICTABLE), - ir::Type::object(), - index * TargetBytesPerWord), - tailCall ? Compiler::TailJump : 0, - frame->trace(0, 0), - operandTypeForFieldCode(t, returnCode), - frame->peekMethodArguments(parameterFootprint)); - - frame->popFootprint(parameterFootprint); - - if (rSize) { - frame->pushReturnValue(returnCode, result); - } - } - } break; - - case invokeinterface: { - context->leaf = false; - - uint16_t index = codeReadInt16(t, code, ip); - ip += 2; - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcMethod* target = resolveMethod(t, context->method, index - 1, false); - - object argument; - Thunk thunk; - unsigned parameterFootprint; - int returnCode; - bool tailCall; - if (LIKELY(target)) { - checkMethod(t, target, false); - - argument = target; - thunk = findInterfaceMethodFromInstanceThunk; - parameterFootprint = target->parameterFootprint(); - returnCode = target->returnCode(); - tailCall = isTailCall(t, code, ip, context->method, target); - } else { - GcReference* ref = cast(t, reference); - PROTECT(t, ref); - argument = makePair(t, context->method, reference); - thunk = findInterfaceMethodFromInstanceAndReferenceThunk; - parameterFootprint = methodReferenceParameterFootprint(t, ref, false); - returnCode = methodReferenceReturnCode(t, ref); - tailCall = isReferenceTailCall(t, code, ip, context->method, ref); - } - - unsigned rSize = resultSize(t, returnCode); - - ir::Value* result = c->stackCall( - c->nativeCall(c->constant(getThunk(t, thunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::iptr(), - args(c->threadRegister(), - frame->append(argument), - c->peek(1, parameterFootprint - 1))), - tailCall ? Compiler::TailJump : 0, - frame->trace(0, 0), - operandTypeForFieldCode(t, returnCode), - frame->peekMethodArguments(parameterFootprint)); - - frame->popFootprint(parameterFootprint); - - if (rSize) { - frame->pushReturnValue(returnCode, result); - } - } break; - - case invokespecial: { - context->leaf = false; - - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcMethod* target = resolveMethod(t, context->method, index - 1, false); - - if (LIKELY(target)) { - GcClass* class_ = context->method->class_(); - if (isSpecialMethod(t, target, class_)) { - target = findVirtualMethod(t, target, class_->super()); - } - - checkMethod(t, target, false); - - bool tailCall = isTailCall(t, code, ip, context->method, target); - - if (UNLIKELY(methodAbstract(t, target))) { - compileDirectAbstractInvoke( - t, frame, getMethodAddressThunk, target, tailCall); - } else { - compileDirectInvoke(t, frame, target, tailCall); - } - } else { - GcReference* ref = cast(t, reference); - PROTECT(t, ref); - compileDirectReferenceInvoke( - t, - frame, - findSpecialMethodFromReferenceThunk, - ref, - false, - isReferenceTailCall(t, code, ip, context->method, ref)); - } - } break; - - case invokestatic: { - context->leaf = false; - - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcMethod* target = resolveMethod(t, context->method, index - 1, false); - - if (LIKELY(target)) { - checkMethod(t, target, true); - - if (not intrinsic(t, frame, target)) { - bool tailCall = isTailCall(t, code, ip, context->method, target); - compileDirectInvoke(t, frame, target, tailCall); - } - } else { - GcReference* ref = cast(t, reference); - PROTECT(t, ref); - compileDirectReferenceInvoke( - t, - frame, - findStaticMethodFromReferenceThunk, - ref, - true, - isReferenceTailCall(t, code, ip, context->method, ref)); - } - } break; - - case invokevirtual: { - context->leaf = false; - - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcMethod* target = resolveMethod(t, context->method, index - 1, false); - - if (LIKELY(target)) { - checkMethod(t, target, false); - - if (not intrinsic(t, frame, target)) { - bool tailCall = isTailCall(t, code, ip, context->method, target); - - if (LIKELY(methodVirtual(t, target))) { - unsigned parameterFootprint = target->parameterFootprint(); - - unsigned offset = TargetClassVtable - + (target->offset() * TargetBytesPerWord); - - ir::Value* instance = c->peek(1, parameterFootprint - 1); - - frame->stackCall( - c->memory(c->binaryOp( - lir::And, - ir::Type::iptr(), - c->constant(TargetPointerMask, ir::Type::iptr()), - c->memory(instance, ir::Type::object())), - ir::Type::object(), - offset), - target, - tailCall ? Compiler::TailJump : 0, - frame->trace(0, 0)); - } else { - // OpenJDK generates invokevirtual calls to private methods - // (e.g. readObject and writeObject for serialization), so - // we must handle such cases here. - - compileDirectInvoke(t, frame, target, tailCall); - } - } - } else { - GcReference* ref = cast(t, reference); - PROTECT(t, reference); - PROTECT(t, ref); - - GcPair* pair = makePair(t, context->method, reference); - - compileReferenceInvoke( - frame, - c->nativeCall( - c->constant(getThunk(t, findVirtualMethodFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::iptr(), - args(c->threadRegister(), - frame->append(pair), - c->peek(1, - methodReferenceParameterFootprint(t, ref, false) - - 1))), - ref, - false, - isReferenceTailCall(t, code, ip, context->method, ref)); - } - } break; - - case irem: { - ir::Value* a = frame->pop(ir::Type::i4()); - ir::Value* b = frame->pop(ir::Type::i4()); - - if (inTryBlock(t, code, ip - 1)) { - c->saveLocals(); - frame->trace(0, 0); - } - - frame->push(ir::Type::i4(), - c->binaryOp(lir::Remainder, ir::Type::i4(), a, b)); - } break; - - case ireturn: { - handleExit(t, frame); - c->return_(frame->pop(ir::Type::i4())); - } - goto next; - - case freturn: { - handleExit(t, frame); - c->return_(frame->pop(ir::Type::f4())); - } - goto next; - - case istore: - frame->store(ir::Type::i4(), code->body()[ip++]); - break; - case fstore: - frame->store(ir::Type::f4(), code->body()[ip++]); - break; - - case istore_0: - frame->store(ir::Type::i4(), 0); - break; - case fstore_0: - frame->store(ir::Type::f4(), 0); - break; - - case istore_1: - frame->store(ir::Type::i4(), 1); - break; - case fstore_1: - frame->store(ir::Type::f4(), 1); - break; - - case istore_2: - frame->store(ir::Type::i4(), 2); - break; - case fstore_2: - frame->store(ir::Type::f4(), 2); - break; - - case istore_3: - frame->store(ir::Type::i4(), 3); - break; - case fstore_3: - frame->store(ir::Type::f4(), 3); - break; - - case jsr: - case jsr_w: { - uint32_t thisIp; - - if (instruction == jsr) { - uint32_t offset = codeReadInt16(t, code, ip); - thisIp = ip - 3; - newIp = thisIp + offset; - } else { - uint32_t offset = codeReadInt32(t, code, ip); - thisIp = ip - 5; - newIp = thisIp + offset; - } - - assertT(t, newIp < code->length()); - - frame->startSubroutine(newIp, ip); - - c->jmp(frame->machineIpValue(newIp)); - - ip = newIp; - } break; - - case l2d: { - frame->pushLarge(ir::Type::f8(), - c->i2f(ir::Type::f8(), frame->popLarge(ir::Type::i8()))); - } break; - - case l2f: { - frame->push(ir::Type::f4(), - c->i2f(ir::Type::f4(), frame->popLarge(ir::Type::i8()))); - } break; - - case l2i: - frame->push(ir::Type::i4(), - c->truncate(ir::Type::i4(), frame->popLarge(ir::Type::i8()))); - break; - - case ladd: - case land: - case lor: - case lsub: - case lxor: - case lmul: { - ir::Value* a = frame->popLarge(ir::Type::i8()); - ir::Value* b = frame->popLarge(ir::Type::i8()); - frame->pushLarge( - ir::Type::i8(), - c->binaryOp( - toCompilerBinaryOp(t, instruction), ir::Type::i8(), a, b)); - } break; - - case lcmp: { - ir::Value* a = frame->popLarge(ir::Type::i8()); - ir::Value* b = frame->popLarge(ir::Type::i8()); - - if (integerBranch(t, frame, code, ip, a, b, &newIp)) { - goto branch; - } else { - frame->push(ir::Type::i4(), - c->nativeCall(c->constant(getThunk(t, compareLongsThunk), - ir::Type::iptr()), - 0, - 0, - ir::Type::i4(), - args(nullptr, a, nullptr, b))); - } - } break; - - case lconst_0: - frame->pushLarge(ir::Type::i8(), c->constant(0, ir::Type::i8())); - break; - - case lconst_1: - frame->pushLarge(ir::Type::i8(), c->constant(1, ir::Type::i8())); - break; - - case ldc: - case ldc_w: { - uint16_t index; - - if (instruction == ldc) { - index = code->body()[ip++]; - } else { - index = codeReadInt16(t, code, ip); - } - - GcSingleton* pool = code->pool(); - - if (singletonIsObject(t, pool, index - 1)) { - object v = singletonObject(t, pool, index - 1); - - loadMemoryBarrier(); - - if (objectClass(t, v) == type(t, GcReference::Type)) { - GcReference* reference = cast(t, v); - PROTECT(t, reference); - - v = resolveClassInPool(t, context->method, index - 1, false); - - if (UNLIKELY(v == 0)) { - frame->push( - ir::Type::object(), - c->nativeCall( - c->constant(getThunk(t, getJClassFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::object(), - args(c->threadRegister(), - frame->append( - makePair(t, context->method, reference))))); - } - } - - if (v) { - if (objectClass(t, v) == type(t, GcClass::Type)) { - frame->push( - ir::Type::object(), - c->nativeCall(c->constant(getThunk(t, getJClass64Thunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::object(), - args(c->threadRegister(), frame->append(v)))); - } else { - frame->push(ir::Type::object(), frame->append(v)); - } - } - } else { - ir::Type type = singletonBit(t, pool, poolSize(t, pool), index - 1) - ? ir::Type::f4() - : ir::Type::i4(); - frame->push(type, - c->constant(singletonValue(t, pool, index - 1), type)); - } - } break; - - case ldc2_w: { - uint16_t index = codeReadInt16(t, code, ip); - - GcSingleton* pool = code->pool(); - - uint64_t v; - memcpy(&v, &singletonValue(t, pool, index - 1), 8); - ir::Type type = singletonBit(t, pool, poolSize(t, pool), index - 1) - ? ir::Type::f8() - : ir::Type::i8(); - frame->pushLarge(type, c->constant(v, type)); - } break; - - case ldiv_: { - ir::Value* a = frame->popLarge(ir::Type::i8()); - ir::Value* b = frame->popLarge(ir::Type::i8()); - - if (inTryBlock(t, code, ip - 1)) { - c->saveLocals(); - frame->trace(0, 0); - } - - frame->pushLarge(ir::Type::i8(), - c->binaryOp(lir::Divide, ir::Type::i8(), a, b)); - } break; - - case lload: - frame->loadLarge(ir::Type::i8(), code->body()[ip++]); - break; - case dload: - frame->loadLarge(ir::Type::f8(), code->body()[ip++]); - break; - - case lload_0: - frame->loadLarge(ir::Type::i8(), 0); - break; - case dload_0: - frame->loadLarge(ir::Type::f8(), 0); - break; - - case lload_1: - frame->loadLarge(ir::Type::i8(), 1); - break; - case dload_1: - frame->loadLarge(ir::Type::f8(), 1); - break; - - case lload_2: - frame->loadLarge(ir::Type::i8(), 2); - break; - case dload_2: - frame->loadLarge(ir::Type::f8(), 2); - break; - - case lload_3: - frame->loadLarge(ir::Type::i8(), 3); - break; - case dload_3: - frame->loadLarge(ir::Type::f8(), 3); - break; - - case lneg: - frame->pushLarge( - ir::Type::i8(), - c->unaryOp(lir::Negate, frame->popLarge(ir::Type::i8()))); - break; - - case lookupswitch: { - int32_t base = ip - 1; - - ip = (ip + 3) & ~3; // pad to four byte boundary - - ir::Value* key = frame->pop(ir::Type::i4()); - - uint32_t defaultIp = base + codeReadInt32(t, code, ip); - assertT(t, defaultIp < code->length()); - - int32_t pairCount = codeReadInt32(t, code, ip); - - if (pairCount) { - ir::Value* default_ = frame->addressOperand( - frame->addressPromise(frame->machineIp(defaultIp))); - - avian::codegen::Promise* start = 0; - uint32_t* ipTable - = static_cast(stack.push(sizeof(uint32_t) * pairCount)); - for (int32_t i = 0; i < pairCount; ++i) { - unsigned index = ip + (i * 8); - int32_t key = codeReadInt32(t, code, index); - uint32_t newIp = base + codeReadInt32(t, code, index); - assertT(t, newIp < code->length()); - - ipTable[i] = newIp; - - avian::codegen::Promise* p = c->poolAppend(key); - if (i == 0) { - start = p; - } - c->poolAppendPromise(frame->addressPromise(frame->machineIp(newIp))); - } - assertT(t, start); - - ir::Value* address = c->nativeCall( - c->constant(getThunk(t, lookUpAddressThunk), ir::Type::iptr()), - 0, - 0, - ir::Type::iptr(), - args(key, - frame->absoluteAddressOperand(start), - c->constant(pairCount, ir::Type::i4()), - default_)); - - c->jmp(context->bootContext - ? c->binaryOp(lir::Add, - ir::Type::iptr(), - c->memory(c->threadRegister(), - ir::Type::iptr(), - TARGET_THREAD_CODEIMAGE), - address) - : address); - - new (stack.push(sizeof(SwitchState))) - SwitchState(c->saveState(), pairCount, defaultIp, 0, 0, 0, 0); - - goto switchloop; - } else { - // a switch statement with no cases, apparently - c->jmp(frame->machineIpValue(defaultIp)); - ip = defaultIp; - } - } break; - - case lrem: { - ir::Value* a = frame->popLarge(ir::Type::i8()); - ir::Value* b = frame->popLarge(ir::Type::i8()); - - if (inTryBlock(t, code, ip - 1)) { - c->saveLocals(); - frame->trace(0, 0); - } - - frame->pushLarge(ir::Type::i8(), - c->binaryOp(lir::Remainder, ir::Type::i8(), a, b)); - } break; - - case lreturn: { - handleExit(t, frame); - c->return_(frame->popLarge(ir::Type::i8())); - } - goto next; - - case dreturn: { - handleExit(t, frame); - c->return_(frame->popLarge(ir::Type::f8())); - } - goto next; - - case lshl: - case lshr: - case lushr: { - ir::Value* a = frame->pop(ir::Type::i4()); - ir::Value* b = frame->popLarge(ir::Type::i8()); - frame->pushLarge( - ir::Type::i8(), - c->binaryOp( - toCompilerBinaryOp(t, instruction), ir::Type::i8(), a, b)); - } break; - - case lstore: - frame->storeLarge(ir::Type::i8(), code->body()[ip++]); - break; - case dstore: - frame->storeLarge(ir::Type::f8(), code->body()[ip++]); - break; - - case lstore_0: - frame->storeLarge(ir::Type::i8(), 0); - break; - case dstore_0: - frame->storeLarge(ir::Type::f8(), 0); - break; - - case lstore_1: - frame->storeLarge(ir::Type::i8(), 1); - break; - case dstore_1: - frame->storeLarge(ir::Type::f8(), 1); - break; - - case lstore_2: - frame->storeLarge(ir::Type::i8(), 2); - break; - case dstore_2: - frame->storeLarge(ir::Type::f8(), 2); - break; - - case lstore_3: - frame->storeLarge(ir::Type::i8(), 3); - break; - case dstore_3: - frame->storeLarge(ir::Type::f8(), 3); - break; - - case monitorenter: { - ir::Value* target = frame->pop(ir::Type::object()); - c->nativeCall(c->constant(getThunk(t, acquireMonitorForObjectThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), target)); - } break; - - case monitorexit: { - ir::Value* target = frame->pop(ir::Type::object()); - c->nativeCall(c->constant(getThunk(t, releaseMonitorForObjectThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), target)); - } break; - - case multianewarray: { - uint16_t index = codeReadInt16(t, code, ip); - uint8_t dimensions = code->body()[ip++]; - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcClass* class_ - = resolveClassInPool(t, context->method, index - 1, false); - - object argument; - Thunk thunk; - if (LIKELY(class_)) { - argument = class_; - thunk = makeMultidimensionalArrayThunk; - } else { - argument = makePair(t, context->method, reference); - thunk = makeMultidimensionalArrayFromReferenceThunk; - } - - unsigned offset - = localOffset(t, - localSize(t, context->method) + c->topOfStack(), - context->method) + t->arch->frameReturnAddressSize(); - - ir::Value* result - = c->nativeCall(c->constant(getThunk(t, thunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::object(), - args(c->threadRegister(), - frame->append(argument), - c->constant(dimensions, ir::Type::i4()), - c->constant(offset, ir::Type::i4()))); - - frame->popFootprint(dimensions); - frame->push(ir::Type::object(), result); - } break; - - case new_: { - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcClass* class_ - = resolveClassInPool(t, context->method, index - 1, false); - - object argument; - Thunk thunk; - if (LIKELY(class_)) { - argument = class_; - if (class_->vmFlags() & (WeakReferenceFlag | HasFinalizerFlag)) { - thunk = makeNewGeneral64Thunk; - } else { - thunk = makeNew64Thunk; - } - } else { - argument = makePair(t, context->method, reference); - thunk = makeNewFromReferenceThunk; - } - - frame->push( - ir::Type::object(), - c->nativeCall(c->constant(getThunk(t, thunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::object(), - args(c->threadRegister(), frame->append(argument)))); - } break; - - case newarray: { - uint8_t type = code->body()[ip++]; - - ir::Value* length = frame->pop(ir::Type::i4()); - - frame->push(ir::Type::object(), - c->nativeCall(c->constant(getThunk(t, makeBlankArrayThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::object(), - args(c->threadRegister(), - c->constant(type, ir::Type::i4()), - length))); - } break; - - case nop: - break; - - case pop_: - frame->popFootprint(1); - break; - - case pop2: - frame->popFootprint(2); - break; - - case putfield: - case putstatic: { - uint16_t index = codeReadInt16(t, code, ip); - - object reference - = singletonObject(t, context->method->code()->pool(), index - 1); - - PROTECT(t, reference); - - GcField* field = resolveField(t, context->method, index - 1, false); - - if (LIKELY(field)) { - int fieldCode = field->code(); - - object staticTable = 0; - - if (instruction == putstatic) { - checkField(t, field, true); - - if (classNeedsInit(t, field->class_())) { - PROTECT(t, field); - - c->nativeCall( - c->constant(getThunk(t, tryInitClassThunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), frame->append(field->class_()))); - } - - staticTable = field->class_()->staticTable(); - } else { - checkField(t, field, false); - - if (inTryBlock(t, code, ip - 3)) { - c->saveLocals(); - frame->trace(0, 0); - } - } - - if (field->flags() & ACC_VOLATILE) { - if (TargetBytesPerWord == 4 - and (fieldCode == DoubleField or fieldCode == LongField)) { - PROTECT(t, field); - - c->nativeCall(c->constant(getThunk(t, acquireMonitorForObjectThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), frame->append(field))); - } else { - c->nullaryOp(lir::StoreStoreBarrier); - } - } - - ir::Value* value = popField(t, frame, fieldCode); - - ir::Value* table; - - if (instruction == putstatic) { - PROTECT(t, field); - - table = frame->append(staticTable); - } else { - table = frame->pop(ir::Type::object()); - } - - switch (fieldCode) { - case ByteField: - case BooleanField: - c->store( - value, - c->memory( - table, ir::Type::i1(), targetFieldOffset(context, field))); - break; - - case CharField: - case ShortField: - c->store( - value, - c->memory( - table, ir::Type::i2(), targetFieldOffset(context, field))); - break; - - case FloatField: - c->store( - value, - c->memory( - table, ir::Type::f4(), targetFieldOffset(context, field))); - break; - - case IntField: - c->store( - value, - c->memory( - table, ir::Type::i4(), targetFieldOffset(context, field))); - break; - - case DoubleField: - c->store( - value, - c->memory( - table, ir::Type::f8(), targetFieldOffset(context, field))); - break; - - case LongField: - c->store( - value, - c->memory( - table, ir::Type::i8(), targetFieldOffset(context, field))); - break; - - case ObjectField: - if (instruction == putfield) { - c->nativeCall( - c->constant(getThunk(t, setMaybeNullThunk), ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), - table, - c->constant(targetFieldOffset(context, field), - ir::Type::i4()), - value)); - } else { - c->nativeCall( - c->constant(getThunk(t, setObjectThunk), ir::Type::iptr()), - 0, - 0, - ir::Type::void_(), - args(c->threadRegister(), - table, - c->constant(targetFieldOffset(context, field), - ir::Type::i4()), - value)); - } - break; - - default: - abort(t); - } - - if (field->flags() & ACC_VOLATILE) { - if (TargetBytesPerWord == 4 - and (fieldCode == DoubleField or fieldCode == LongField)) { - c->nativeCall(c->constant(getThunk(t, releaseMonitorForObjectThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - ir::Type::void_(), - args(c->threadRegister(), frame->append(field))); - } else { - c->nullaryOp(lir::StoreLoadBarrier); - } - } - } else { - GcReference* ref = cast(t, reference); - PROTECT(t, ref); - int fieldCode = vm::fieldCode(t, ref->spec()->body()[0]); - - ir::Value* value = popField(t, frame, fieldCode); - ir::Type rType = operandTypeForFieldCode(t, fieldCode); - - GcPair* pair = makePair(t, context->method, reference); - - switch (fieldCode) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case FloatField: - case IntField: { - if (instruction == putstatic) { - c->nativeCall( - c->constant(getThunk(t, setStaticFieldValueFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - rType, - args(c->threadRegister(), frame->append(pair), value)); - } else { - ir::Value* instance = frame->pop(ir::Type::object()); - - c->nativeCall( - c->constant(getThunk(t, setFieldValueFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - rType, - args( - c->threadRegister(), frame->append(pair), instance, value)); - } - } break; - - case DoubleField: - case LongField: { - if (instruction == putstatic) { - c->nativeCall( - c->constant( - getThunk(t, setStaticLongFieldValueFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - rType, - args(c->threadRegister(), frame->append(pair), nullptr, value)); - } else { - ir::Value* instance = frame->pop(ir::Type::object()); - - c->nativeCall( - c->constant(getThunk(t, setLongFieldValueFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - rType, - args(c->threadRegister(), - frame->append(pair), - instance, - nullptr, - value)); - } - } break; - - case ObjectField: { - if (instruction == putstatic) { - c->nativeCall( - c->constant( - getThunk(t, setStaticObjectFieldValueFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - rType, - args(c->threadRegister(), frame->append(pair), value)); - } else { - ir::Value* instance = frame->pop(ir::Type::object()); - - c->nativeCall( - c->constant(getThunk(t, setObjectFieldValueFromReferenceThunk), - ir::Type::iptr()), - 0, - frame->trace(0, 0), - rType, - args( - c->threadRegister(), frame->append(pair), instance, value)); - } - } break; - - default: - abort(t); - } - } - } break; - - case ret: { - unsigned index = code->body()[ip]; - - unsigned returnAddress = frame->endSubroutine(index); - c->jmp(frame->machineIpValue(returnAddress)); - ip = returnAddress; - } break; - - case return_: - if (needsReturnBarrier(t, context->method)) { - c->nullaryOp(lir::StoreStoreBarrier); - } - - handleExit(t, frame); - c->return_(); - goto next; - - case sipush: - frame->push(ir::Type::i4(), - c->constant(static_cast(codeReadInt16(t, code, ip)), - ir::Type::i4())); - break; - - case swap: - frame->swap(); - break; - - case tableswitch: { - int32_t base = ip - 1; - - ip = (ip + 3) & ~3; // pad to four byte boundary - - uint32_t defaultIp = base + codeReadInt32(t, code, ip); - assertT(t, defaultIp < code->length()); - - int32_t bottom = codeReadInt32(t, code, ip); - int32_t top = codeReadInt32(t, code, ip); - - avian::codegen::Promise* start = 0; - unsigned count = top - bottom + 1; - uint32_t* ipTable - = static_cast(stack.push(sizeof(uint32_t) * count)); - for (int32_t i = 0; i < top - bottom + 1; ++i) { - unsigned index = ip + (i * 4); - uint32_t newIp = base + codeReadInt32(t, code, index); - assertT(t, newIp < code->length()); - - ipTable[i] = newIp; - - avian::codegen::Promise* p = c->poolAppendPromise( - frame->addressPromise(frame->machineIp(newIp))); - if (i == 0) { - start = p; - } - } - assertT(t, start); - - ir::Value* key = frame->pop(ir::Type::i4()); - - c->condJump(lir::JumpIfLess, - c->constant(bottom, ir::Type::i4()), - key, - frame->machineIpValue(defaultIp)); - - c->save(ir::Type::i4(), key); - - new (stack.push(sizeof(SwitchState))) SwitchState( - c->saveState(), count, defaultIp, key, start, bottom, top); - - stack.pushValue(Untable0); - ip = defaultIp; - } - goto start; - - case wide: { - switch (code->body()[ip++]) { - case aload: { - frame->load(ir::Type::object(), codeReadInt16(t, code, ip)); - } break; - - case astore: { - frame->store(ir::Type::object(), codeReadInt16(t, code, ip)); - } break; - - case iinc: { - uint16_t index = codeReadInt16(t, code, ip); - int16_t count = codeReadInt16(t, code, ip); - - storeLocal(context, - 1, - ir::Type::i4(), - c->binaryOp(lir::Add, - ir::Type::i4(), - c->constant(count, ir::Type::i4()), - loadLocal(context, 1, ir::Type::i4(), index)), - index); - } break; - - case iload: { - frame->load(ir::Type::i4(), codeReadInt16(t, code, ip)); - } break; - - case istore: { - frame->store(ir::Type::i4(), codeReadInt16(t, code, ip)); - } break; - - case lload: { - frame->loadLarge(ir::Type::i8(), codeReadInt16(t, code, ip)); - } break; - - case lstore: { - frame->storeLarge(ir::Type::i8(), codeReadInt16(t, code, ip)); - } break; - - case ret: { - unsigned index = codeReadInt16(t, code, ip); - - unsigned returnAddress = frame->endSubroutine(index); - c->jmp(frame->machineIpValue(returnAddress)); - ip = returnAddress; - } break; - - default: - abort(t); - } - } break; - - default: - abort(t); - } - } - -next: - frame->dispose(); - frame = 0; - stack.pop(sizeof(Frame)); - stack.pop(stackSize * sizeof(ir::Type)); - switch (stack.popValue()) { - case Return: - return; - - case Unbranch: - if (DebugInstructions) { - fprintf(stderr, "Unbranch\n"); - } - ip = stack.popValue(); - c->restoreState(reinterpret_cast(stack.popValue())); - frame = static_cast(stack.peek(sizeof(Frame))); - goto loop; - - case Untable0: { - if (DebugInstructions) { - fprintf(stderr, "Untable0\n"); - } - SwitchState* s = static_cast(stack.peek(sizeof(SwitchState))); - - frame = s->frame(); - - c->restoreState(s->state); - - c->condJump(lir::JumpIfGreater, - c->constant(s->top, ir::Type::i4()), - s->key, - frame->machineIpValue(s->defaultIp)); - - c->save(ir::Type::i4(), s->key); - ip = s->defaultIp; - stack.pushValue(Untable1); - } - goto start; - - case Untable1: { - if (DebugInstructions) { - fprintf(stderr, "Untable1\n"); - } - SwitchState* s = static_cast(stack.peek(sizeof(SwitchState))); - - frame = s->frame(); - - c->restoreState(s->state); - - ir::Value* normalizedKey - = (s->bottom - ? c->binaryOp(lir::Subtract, - ir::Type::i4(), - c->constant(s->bottom, ir::Type::i4()), - s->key) - : s->key); - - ir::Value* entry = c->memory(frame->absoluteAddressOperand(s->start), - ir::Type::iptr(), - 0, - normalizedKey); - - c->jmp(c->load(ir::ExtendMode::Signed, - context->bootContext - ? c->binaryOp(lir::Add, - ir::Type::iptr(), - c->memory(c->threadRegister(), - ir::Type::iptr(), - TARGET_THREAD_CODEIMAGE), - entry) - : entry, - ir::Type::iptr())); - - s->state = c->saveState(); - } - goto switchloop; - - case Unswitch: { - if (DebugInstructions) { - fprintf(stderr, "Unswitch\n"); - } - SwitchState* s = static_cast(stack.peek(sizeof(SwitchState))); - - frame = s->frame(); - - c->restoreState( - static_cast(stack.peek(sizeof(SwitchState)))->state); - } - goto switchloop; - - case Unsubroutine: { - if (DebugInstructions) { - fprintf(stderr, "Unsubroutine\n"); - } - ip = stack.popValue(); - unsigned start = stack.popValue(); - frame = reinterpret_cast(stack.peek(sizeof(Frame))); - frame->endSubroutine(start); - } - goto loop; - - default: - abort(t); - } - -switchloop : { - SwitchState* s = static_cast(stack.peek(sizeof(SwitchState))); - - if (s->index < s->count) { - ip = s->ipTable()[s->index++]; - stack.pushValue(Unswitch); - goto start; - } else { - ip = s->defaultIp; - unsigned count = s->count * 4; - stack.pop(sizeof(SwitchState)); - stack.pop(count); - frame = reinterpret_cast(stack.peek(sizeof(Frame))); - goto loop; - } -} - -branch: - stack.pushValue(reinterpret_cast(c->saveState())); - stack.pushValue(ip); - stack.pushValue(Unbranch); - ip = newIp; - goto start; -} - -int resolveIpForwards(Context* context, int start, int end) -{ - if (start < 0) { - start = 0; - } - - while (start < end and context->visitTable[start] == 0) { - ++start; - } - - if (start >= end) { - return -1; - } else { - return start; - } -} - -int resolveIpBackwards(Context* context, int start, int end) -{ - if (start >= static_cast(context->method->code()->length() - * (context->subroutineCount + 1))) { - start = context->method->code()->length(); - } else { - while (start >= end and context->visitTable[start] == 0) { - --start; - } - } - - if (start < end) { - return -1; - } else { - return start; - } -} - -GcIntArray* truncateIntArray(Thread* t, GcIntArray* array, unsigned length) -{ - expect(t, array->length() > length); - - PROTECT(t, array); - - GcIntArray* newArray = makeIntArray(t, length); - if (length) { - memcpy(newArray->body().begin(), array->body().begin(), length * 4); - } - - return newArray; -} - -GcArray* truncateArray(Thread* t, GcArray* array, unsigned length) -{ - expect(t, array->length() > length); - - PROTECT(t, array); - - GcArray* newArray = makeArray(t, length); - if (length) { - for (size_t i = 0; i < length; i++) { - newArray->setBodyElement(t, i, array->body()[i]); - } - } - - return newArray; -} - -GcLineNumberTable* truncateLineNumberTable(Thread* t, - GcLineNumberTable* table, - unsigned length) -{ - expect(t, table->length() > length); - - PROTECT(t, table); - - GcLineNumberTable* newTable = makeLineNumberTable(t, length); - if (length) { - memcpy(newTable->body().begin(), - table->body().begin(), - length * sizeof(uint64_t)); - } - - return newTable; -} - -GcArray* translateExceptionHandlerTable(MyThread* t, - Context* context, - intptr_t start, - intptr_t end) -{ - avian::codegen::Compiler* c = context->compiler; - - GcExceptionHandlerTable* oldTable = cast( - t, context->method->code()->exceptionHandlerTable()); - - if (oldTable) { - PROTECT(t, oldTable); - - unsigned length = oldTable->length(); - - GcIntArray* newIndex - = makeIntArray(t, length * (context->subroutineCount + 1) * 3); - PROTECT(t, newIndex); - - GcArray* newTable - = makeArray(t, length * (context->subroutineCount + 1) + 1); - PROTECT(t, newTable); - - unsigned ni = 0; - for (unsigned subI = 0; subI <= context->subroutineCount; ++subI) { - unsigned duplicatedBaseIp = subI * context->method->code()->length(); - - for (unsigned oi = 0; oi < length; ++oi) { - uint64_t oldHandler = oldTable->body()[oi]; - - int handlerStart = resolveIpForwards( - context, - duplicatedBaseIp + exceptionHandlerStart(oldHandler), - duplicatedBaseIp + exceptionHandlerEnd(oldHandler)); - - if (LIKELY(handlerStart >= 0)) { - assertT(t, - handlerStart - < static_cast(context->method->code()->length() - * (context->subroutineCount + 1))); - - int handlerEnd = resolveIpBackwards( - context, - duplicatedBaseIp + exceptionHandlerEnd(oldHandler), - duplicatedBaseIp + exceptionHandlerStart(oldHandler)); - - assertT(t, handlerEnd >= 0); - assertT( - t, - handlerEnd <= static_cast(context->method->code()->length() - * (context->subroutineCount + 1))); - - newIndex->body()[ni * 3] = c->machineIp(handlerStart)->value() - - start; - - newIndex->body()[(ni * 3) + 1] - = (handlerEnd - == static_cast(context->method->code()->length()) - ? end - : c->machineIp(handlerEnd)->value()) - start; - - newIndex->body()[(ni * 3) + 2] - = c->machineIp(exceptionHandlerIp(oldHandler))->value() - start; - - object type; - if (exceptionHandlerCatchType(oldHandler)) { - type = resolveClassInPool( - t, context->method, exceptionHandlerCatchType(oldHandler) - 1); - } else { - type = 0; - } - - newTable->setBodyElement(t, ni + 1, type); - - ++ni; - } - } - } - - if (UNLIKELY(ni < length)) { - newIndex = truncateIntArray(t, newIndex, ni * 3); - newTable = truncateArray(t, newTable, ni + 1); - } - - newTable->setBodyElement(t, 0, newIndex); - - return newTable; - } else { - return 0; - } -} - -GcLineNumberTable* translateLineNumberTable(MyThread* t, - Context* context, - intptr_t start) -{ - GcLineNumberTable* oldTable = context->method->code()->lineNumberTable(); - if (oldTable) { - PROTECT(t, oldTable); - - unsigned length = oldTable->length(); - GcLineNumberTable* newTable = makeLineNumberTable(t, length); - unsigned ni = 0; - for (unsigned oi = 0; oi < length; ++oi) { - uint64_t oldLine = oldTable->body()[oi]; - - int ip = resolveIpForwards( - context, - lineNumberIp(oldLine), - oi + 1 < length ? lineNumberIp(oldTable->body()[oi + 1]) - 1 - : lineNumberIp(oldLine) + 1); - - if (LIKELY(ip >= 0)) { - newTable->body()[ni++] - = lineNumber(context->compiler->machineIp(ip)->value() - start, - lineNumberLine(oldLine)); - } - } - - if (UNLIKELY(ni < length)) { - newTable = truncateLineNumberTable(t, newTable, ni); - } - - return newTable; - } else { - return 0; - } -} - -void printSet(uintptr_t* m, unsigned limit) -{ - if (limit) { - for (unsigned i = 0; i < 32; ++i) { - if ((*m >> i) & 1) { - fprintf(stderr, "1"); - } else { - fprintf(stderr, "_"); - } - } - } -} - -void calculateTryCatchRoots(Context* context, - uintptr_t* roots, - unsigned mapSize, - unsigned start, - unsigned end) -{ - memset(roots, 0xFF, mapSize * BytesPerWord); - - if (DebugFrameMaps) { - fprintf(stderr, "calculate try/catch roots from %d to %d\n", start, end); - } - - for (TraceElement* te = context->traceLog; te; te = te->next) { - if (te->ip >= start and te->ip < end) { - uintptr_t* traceRoots = 0; - traceRoots = te->map; - te->watch = true; - - if (traceRoots) { - if (DebugFrameMaps) { - fprintf(stderr, " use roots at ip %3d: ", te->ip); - printSet(traceRoots, mapSize); - fprintf(stderr, "\n"); - } - - for (unsigned wi = 0; wi < mapSize; ++wi) { - roots[wi] &= traceRoots[wi]; - } - } else { - if (DebugFrameMaps) { - fprintf(stderr, " skip roots at ip %3d\n", te->ip); - } - } - } - } - - if (DebugFrameMaps) { - fprintf(stderr, "result roots : "); - printSet(roots, mapSize); - fprintf(stderr, "\n"); - } -} - -unsigned calculateFrameMaps(MyThread* t, - Context* context, - uintptr_t* originalRoots, - unsigned eventIndex, - uintptr_t* resultRoots) -{ - // for each instruction with more than one predecessor, and for each - // stack position, determine if there exists a path to that - // instruction such that there is not an object pointer left at that - // stack position (i.e. it is uninitialized or contains primitive - // data). - - unsigned mapSize = frameMapSizeInWords(t, context->method); - - THREAD_RUNTIME_ARRAY(t, uintptr_t, roots, mapSize); - if (originalRoots) { - memcpy(RUNTIME_ARRAY_BODY(roots), originalRoots, mapSize * BytesPerWord); - } else { - memset(RUNTIME_ARRAY_BODY(roots), 0, mapSize * BytesPerWord); - } - - int32_t ip = -1; - - // invariant: for each stack position, roots contains a zero at that - // position if there exists some path to the current instruction - // such that there is definitely not an object pointer at that - // position. Otherwise, roots contains a one at that position, - // meaning either all known paths result in an object pointer at - // that position, or the contents of that position are as yet - // unknown. - - unsigned length = context->eventLog.length(); - while (eventIndex < length) { - Event e = static_cast(context->eventLog.get(eventIndex++)); - switch (e) { - case PushContextEvent: { - eventIndex = calculateFrameMaps(t, - context, - RUNTIME_ARRAY_BODY(roots), - eventIndex, /*subroutinePath,*/ - resultRoots); - } break; - - case PopContextEvent: - goto exit; - - case IpEvent: { - ip = context->eventLog.get2(eventIndex); - eventIndex += 2; - - if (DebugFrameMaps) { - fprintf(stderr, " roots at ip %3d: ", ip); - printSet(RUNTIME_ARRAY_BODY(roots), mapSize); - fprintf(stderr, "\n"); - } - - assertT(context->thread, ip * mapSize <= context->rootTable.count); - uintptr_t* tableRoots = context->rootTable.begin() + (ip * mapSize); - - if (context->visitTable[ip] > 1) { - for (unsigned wi = 0; wi < mapSize; ++wi) { - uintptr_t newRoots = tableRoots[wi] & RUNTIME_ARRAY_BODY(roots)[wi]; - - if ((eventIndex == length - or context->eventLog.get(eventIndex) == PopContextEvent) - and newRoots != tableRoots[wi]) { - if (DebugFrameMaps) { - fprintf(stderr, "dirty roots!\n"); - } - - context->dirtyRoots = true; - } - - tableRoots[wi] = newRoots; - RUNTIME_ARRAY_BODY(roots)[wi] &= tableRoots[wi]; - } - - if (DebugFrameMaps) { - fprintf(stderr, " table roots at ip %3d: ", ip); - printSet(tableRoots, mapSize); - fprintf(stderr, "\n"); - } - } else { - memcpy(tableRoots, RUNTIME_ARRAY_BODY(roots), mapSize * BytesPerWord); - } - } break; - - case MarkEvent: { - unsigned i = context->eventLog.get2(eventIndex); - eventIndex += 2; - - markBit(RUNTIME_ARRAY_BODY(roots), i); - } break; - - case ClearEvent: { - unsigned i = context->eventLog.get2(eventIndex); - eventIndex += 2; - - clearBit(RUNTIME_ARRAY_BODY(roots), i); - } break; - - case PushExceptionHandlerEvent: { - unsigned start = context->eventLog.get2(eventIndex); - eventIndex += 2; - unsigned end = context->eventLog.get2(eventIndex); - eventIndex += 2; - - calculateTryCatchRoots( - context, RUNTIME_ARRAY_BODY(roots), mapSize, start, end); - - eventIndex = calculateFrameMaps( - t, context, RUNTIME_ARRAY_BODY(roots), eventIndex, 0); - } break; - - case TraceEvent: { - TraceElement* te; - context->eventLog.get(eventIndex, &te, BytesPerWord); - if (DebugFrameMaps) { - fprintf(stderr, " trace roots at ip %3d: ", ip); - printSet(RUNTIME_ARRAY_BODY(roots), mapSize); - fprintf(stderr, "\n"); - } - - uintptr_t* map; - bool watch; - map = te->map; - watch = te->watch; - - for (unsigned wi = 0; wi < mapSize; ++wi) { - uintptr_t v = RUNTIME_ARRAY_BODY(roots)[wi]; - - if (watch and map[wi] != v) { - if (DebugFrameMaps) { - fprintf(stderr, "dirty roots due to trace watch!\n"); - } - - context->dirtyRoots = true; - } - - map[wi] = v; - } - - eventIndex += BytesPerWord; - } break; - - default: - abort(t); - } - } - -exit: - if (resultRoots and ip != -1) { - if (DebugFrameMaps) { - fprintf(stderr, "result roots at ip %3d: ", ip); - printSet(RUNTIME_ARRAY_BODY(roots), mapSize); - fprintf(stderr, "\n"); - } - - memcpy(resultRoots, RUNTIME_ARRAY_BODY(roots), mapSize * BytesPerWord); - } - - return eventIndex; -} - -int compareTraceElementPointers(const void* va, const void* vb) -{ - TraceElement* a = *static_cast(va); - TraceElement* b = *static_cast(vb); - if (a->address->value() > b->address->value()) { - return 1; - } else if (a->address->value() < b->address->value()) { - return -1; - } else { - return 0; - } -} - -uint8_t* finish(MyThread* t, - FixedAllocator* allocator, - avian::codegen::Assembler* a, - const char* name, - unsigned length) -{ - uint8_t* start - = static_cast(allocator->allocate(length, TargetBytesPerWord)); - - a->setDestination(start); - a->write(); - - logCompile(t, start, length, 0, name, 0); - - return start; -} - -void setBit(int32_t* dst, unsigned index) -{ - dst[index / 32] |= static_cast(1) << (index % 32); -} - -void clearBit(int32_t* dst, unsigned index) -{ - dst[index / 32] &= ~(static_cast(1) << (index % 32)); -} - -void copyFrameMap(int32_t* dst, - uintptr_t* src, - unsigned mapSizeInBits, - unsigned offset, - TraceElement* p) -{ - if (DebugFrameMaps) { - fprintf(stderr, " orig roots at ip %3d: ", p->ip); - printSet(src, ceilingDivide(mapSizeInBits, BitsPerWord)); - fprintf(stderr, "\n"); - - fprintf(stderr, " final roots at ip %3d: ", p->ip); - } - - for (unsigned j = 0; j < p->argumentIndex; ++j) { - if (getBit(src, j)) { - if (DebugFrameMaps) { - fprintf(stderr, "1"); - } - setBit(dst, offset + j); - } else { - if (DebugFrameMaps) { - fprintf(stderr, "_"); - } - clearBit(dst, offset + j); - } - } - - if (DebugFrameMaps) { - fprintf(stderr, "\n"); - } -} - -class FrameMapTableHeader { - public: - FrameMapTableHeader(unsigned indexCount) : indexCount(indexCount) - { - } - - unsigned indexCount; -}; - -class FrameMapTableIndexElement { - public: - FrameMapTableIndexElement(int offset, unsigned base, unsigned path) - : offset(offset), base(base), path(path) - { - } - - int offset; - unsigned base; - unsigned path; -}; - -class FrameMapTablePath { - public: - FrameMapTablePath(unsigned stackIndex, unsigned elementCount, unsigned next) - : stackIndex(stackIndex), elementCount(elementCount), next(next) - { - } - - unsigned stackIndex; - unsigned elementCount; - unsigned next; - int32_t elements[0]; -}; - -GcIntArray* makeSimpleFrameMapTable(MyThread* t, - Context* context, - uint8_t* start, - TraceElement** elements, - unsigned elementCount) -{ - unsigned mapSize = frameMapSizeInBits(t, context->method); - GcIntArray* table = makeIntArray( - t, elementCount + ceilingDivide(elementCount * mapSize, 32)); - - assertT(t, - table->length() - == elementCount + simpleFrameMapTableSize(t, context->method, table)); - - for (unsigned i = 0; i < elementCount; ++i) { - TraceElement* p = elements[i]; - - table->body()[i] = static_cast(p->address->value()) - - reinterpret_cast(start); - - assertT( - t, - elementCount + ceilingDivide((i + 1) * mapSize, 32) <= table->length()); - - if (mapSize) { - copyFrameMap( - &table->body()[elementCount], p->map, mapSize, i * mapSize, p); - } - } - - return table; -} - -void insertCallNode(MyThread* t, GcCallNode* node); - -void finish(MyThread* t, FixedAllocator* allocator, Context* context) -{ - avian::codegen::Compiler* c = context->compiler; - - if (false) { - logCompile( - t, - 0, - 0, - reinterpret_cast( - context->method->class_()->name()->body().begin()), - reinterpret_cast(context->method->name()->body().begin()), - reinterpret_cast(context->method->spec()->body().begin())); - } - - // for debugging: - if (false - and ::strcmp(reinterpret_cast( - context->method->class_()->name()->body().begin()), - "java/lang/System") == 0 - and ::strcmp(reinterpret_cast( - context->method->name()->body().begin()), - "") == 0) { - trap(); - } - - // todo: this is a CPU-intensive operation, so consider doing it - // earlier before we've acquired the global class lock to improve - // parallelism (the downside being that it may end up being a waste - // of cycles if another thread compiles the same method in parallel, - // which might be mitigated by fine-grained, per-method locking): - c->compile(context->leaf ? 0 : stackOverflowThunk(t), - TARGET_THREAD_STACKLIMIT); - - // we must acquire the class lock here at the latest - - unsigned codeSize = c->resolve(allocator->memory.begin() + allocator->offset); - - unsigned total = pad(codeSize, TargetBytesPerWord) - + pad(c->poolSize(), TargetBytesPerWord); - - target_uintptr_t* code = static_cast( - allocator->allocate(total, TargetBytesPerWord)); - uint8_t* start = reinterpret_cast(code); - - context->executableAllocator = allocator; - context->executableStart = code; - context->executableSize = total; - - if (context->objectPool) { - object pool = allocate3( - t, - allocator, - Machine::ImmortalAllocation, - GcArray::FixedSize + ((context->objectPoolCount + 1) * BytesPerWord), - true); - - context->executableSize = (allocator->memory.begin() + allocator->offset) - - static_cast(context->executableStart); - - initArray( - t, reinterpret_cast(pool), context->objectPoolCount + 1); - mark(t, pool, 0); - - setField(t, pool, ArrayBody, compileRoots(t)->objectPools()); - compileRoots(t)->setObjectPools(t, pool); - - unsigned i = 1; - for (PoolElement* p = context->objectPool; p; p = p->next) { - unsigned offset = ArrayBody + ((i++) * BytesPerWord); - - p->address = reinterpret_cast(pool) + offset; - - setField(t, pool, offset, p->target); - } - } - - c->write(); - - BootContext* bc = context->bootContext; - if (bc) { - for (avian::codegen::DelayedPromise* p = bc->addresses; - p != bc->addressSentinal; - p = p->next) { - p->basis = new (bc->zone) - avian::codegen::ResolvedPromise(p->basis->value()); - } - } - - { - GcArray* newExceptionHandlerTable = translateExceptionHandlerTable( - t, - context, - reinterpret_cast(start), - reinterpret_cast(start) + codeSize); - - PROTECT(t, newExceptionHandlerTable); - - GcLineNumberTable* newLineNumberTable = translateLineNumberTable( - t, context, reinterpret_cast(start)); - - GcCode* code = context->method->code(); - - code = makeCode(t, - 0, - 0, - newExceptionHandlerTable, - newLineNumberTable, - reinterpret_cast(start), - codeSize, - code->maxStack(), - code->maxLocals(), - 0); - - context->method->setCode(t, code); - } - - if (context->traceLogCount) { - THREAD_RUNTIME_ARRAY(t, TraceElement*, elements, context->traceLogCount); - unsigned index = 0; - // unsigned pathFootprint = 0; - // unsigned mapCount = 0; - for (TraceElement* p = context->traceLog; p; p = p->next) { - assertT(t, index < context->traceLogCount); - - if (p->address) { - RUNTIME_ARRAY_BODY(elements)[index++] = p; - - if (p->target) { - insertCallNode( - t, makeCallNode(t, p->address->value(), p->target, p->flags, 0)); - } - } - } - - qsort(RUNTIME_ARRAY_BODY(elements), - index, - sizeof(TraceElement*), - compareTraceElementPointers); - - GcIntArray* map = makeSimpleFrameMapTable( - t, context, start, RUNTIME_ARRAY_BODY(elements), index); - - context->method->code()->setStackMap(t, map); - } - - logCompile( - t, - start, - codeSize, - reinterpret_cast( - context->method->class_()->name()->body().begin()), - reinterpret_cast(context->method->name()->body().begin()), - reinterpret_cast(context->method->spec()->body().begin())); - - // for debugging: - if (false - and ::strcmp(reinterpret_cast( - context->method->class_()->name()->body().begin()), - "java/lang/System") == 0 - and ::strcmp(reinterpret_cast( - context->method->name()->body().begin()), - "") == 0) { - trap(); - } - syncInstructionCache(start, codeSize); -} - -void compile(MyThread* t, Context* context) -{ - avian::codegen::Compiler* c = context->compiler; - - if (false) { - fprintf(stderr, - "compiling %s.%s%s\n", - context->method->class_()->name()->body().begin(), - context->method->name()->body().begin(), - context->method->spec()->body().begin()); - } - - unsigned footprint = context->method->parameterFootprint(); - unsigned locals = localSize(t, context->method); - c->init(context->method->code()->length(), - footprint, - locals, - alignedFrameSize(t, context->method)); - - ir::Type* stackMap = (ir::Type*)malloc(sizeof(ir::Type) - * context->method->code()->maxStack()); - Frame frame(context, stackMap); - - unsigned index = context->method->parameterFootprint(); - if ((context->method->flags() & ACC_STATIC) == 0) { - frame.set(--index, ir::Type::object()); - c->initLocal(index, ir::Type::object()); - } - - for (MethodSpecIterator it(t, - reinterpret_cast( - context->method->spec()->body().begin())); - it.hasNext();) { - switch (*it.next()) { - case 'L': - case '[': - frame.set(--index, ir::Type::object()); - c->initLocal(index, ir::Type::object()); - break; - - case 'J': - frame.set(--index, ir::Type::i8()); - frame.set(--index, ir::Type::i8()); - c->initLocal(index, ir::Type::i8()); - break; - - case 'D': - frame.set(--index, ir::Type::f8()); - frame.set(--index, ir::Type::f8()); - c->initLocal(index, ir::Type::f8()); - break; - - case 'F': - frame.set(--index, ir::Type::i4()); - c->initLocal(index, ir::Type::f4()); - break; - - default: - frame.set(--index, ir::Type::i4()); - c->initLocal(index, ir::Type::i4()); - break; - } - } - - handleEntrance(t, &frame); - - Compiler::State* state = c->saveState(); - - compile(t, &frame, 0); - - context->dirtyRoots = false; - unsigned eventIndex = calculateFrameMaps(t, context, 0, 0, 0); - - GcExceptionHandlerTable* eht = cast( - t, context->method->code()->exceptionHandlerTable()); - if (eht) { - PROTECT(t, eht); - - unsigned visitCount = eht->length(); - - THREAD_RUNTIME_ARRAY(t, bool, visited, visitCount); - memset(RUNTIME_ARRAY_BODY(visited), 0, visitCount * sizeof(bool)); - - bool progress = true; - while (progress) { - progress = false; - - for (unsigned subI = 0; subI <= context->subroutineCount; ++subI) { - unsigned duplicatedBaseIp = subI * context->method->code()->length(); - - for (unsigned i = 0; i < eht->length(); ++i) { - uint64_t eh = eht->body()[i]; - int start - = resolveIpForwards(context, - duplicatedBaseIp + exceptionHandlerStart(eh), - duplicatedBaseIp + exceptionHandlerEnd(eh)); - - if ((not RUNTIME_ARRAY_BODY(visited)[i]) and start >= 0 - and context->visitTable[start]) { - RUNTIME_ARRAY_BODY(visited)[i] = true; - progress = true; - - c->restoreState(state); - - ir::Type* stackMap2 = (ir::Type*)malloc( - sizeof(ir::Type) * context->method->code()->maxStack()); - Frame frame2(&frame, stackMap2); - - unsigned end = duplicatedBaseIp + exceptionHandlerEnd(eh); - if (exceptionHandlerIp(eh) >= static_cast(start) - and exceptionHandlerIp(eh) < end) { - end = duplicatedBaseIp + exceptionHandlerIp(eh); - } - - context->eventLog.append(PushExceptionHandlerEvent); - context->eventLog.append2(start); - context->eventLog.append2(end); - - for (unsigned i = 1; i < context->method->code()->maxStack(); ++i) { - frame2.set(localSize(t, context->method) + i, ir::Type::i4()); - } - - compile(t, &frame2, exceptionHandlerIp(eh), start); - - context->eventLog.append(PopContextEvent); - - eventIndex = calculateFrameMaps(t, context, 0, eventIndex, 0); - free(stackMap2); - } - } - } - } - } - - while (context->dirtyRoots) { - context->dirtyRoots = false; - calculateFrameMaps(t, context, 0, 0, 0); - } - free(stackMap); -} -#endif // not AVIAN_AOT_ONLY - -void updateCall(MyThread* t, - avian::codegen::lir::UnaryOperation op, - void* returnAddress, - void* target) -{ - t->arch->updateCall(op, returnAddress, target); -} - -void* compileMethod2(MyThread* t, void* ip); - -uint64_t compileMethod(MyThread* t) -{ - void* ip; - if (t->tailAddress) { - ip = t->tailAddress; - t->tailAddress = 0; - } else { - ip = getIp(t); - } - - return reinterpret_cast(compileMethod2(t, ip)); -} - -void* compileVirtualMethod2(MyThread* t, GcClass* class_, unsigned index) -{ - // If class_ has BootstrapFlag set, that means its vtable is not yet - // available. However, we must set t->trace->targetMethod to an - // appropriate method to ensure we can accurately scan the stack for - // GC roots. We find such a method by looking for a superclass with - // a vtable and using it instead: - - GcClass* c = class_; - while (c->vmFlags() & BootstrapFlag) { - c = c->super(); - } - t->trace->targetMethod - = cast(t, cast(t, c->virtualTable())->body()[index]); - - THREAD_RESOURCE0(t, static_cast(t)->trace->targetMethod = 0;); - - PROTECT(t, class_); - - GcMethod* target = resolveTarget(t, class_, index); - PROTECT(t, target); - - compile(t, codeAllocator(t), 0, target); - - void* address = reinterpret_cast(methodAddress(t, target)); - if (target->flags() & ACC_NATIVE) { - t->trace->nativeMethod = target; - } else { - class_->vtable()[target->offset()] = address; - } - return address; -} - -uint64_t compileVirtualMethod(MyThread* t) -{ - GcClass* class_ = objectClass(t, static_cast(t->virtualCallTarget)); - t->virtualCallTarget = 0; - - unsigned index = t->virtualCallIndex; - t->virtualCallIndex = 0; - - return reinterpret_cast(compileVirtualMethod2(t, class_, index)); -} - -void* linkDynamicMethod2(MyThread* t, unsigned index) -{ - GcInvocation* invocation - = cast(t, roots(t)->invocations()->body()[index]); - - GcCallSite* site = invocation->site(); - - loadMemoryBarrier(); - - if (site == 0) { - t->trace->targetMethod = invocation->template_(); - - THREAD_RESOURCE0(t, static_cast(t)->trace->targetMethod = 0;); - - PROTECT(t, invocation); - - site = resolveDynamic(t, invocation); - PROTECT(t, site); - - compile(t, codeAllocator(t), 0, site->target()->method()); - - ACQUIRE(t, t->m->classLock); - - if (invocation->site() == 0) { - void* address - = reinterpret_cast(methodAddress(t, site->target()->method())); - - if ((site->target()->method()->flags() & ACC_NATIVE) == 0) { - t->dynamicTable[index] = address; - } - } - - storeStoreMemoryBarrier(); - - invocation->setSite(t, site); - site->setInvocation(t, invocation); - } - - GcMethod* target = invocation->site()->target()->method(); - - if (target->flags() & ACC_NATIVE) { - t->trace->nativeMethod = target; - } - - return reinterpret_cast(methodAddress(t, target)); -} - -uint64_t linkDynamicMethod(MyThread* t) -{ - unsigned index = t->virtualCallIndex; - t->virtualCallIndex = 0; - - return reinterpret_cast(linkDynamicMethod2(t, index)); -} - -uint64_t invokeNativeFast(MyThread* t, GcMethod* method, void* function) -{ - FastNativeFunction f; - memcpy(&f, &function, sizeof(void*)); - return f(t, - method, - static_cast(t->stack) + t->arch->frameFooterSize() - + t->arch->frameReturnAddressSize()); -} - -uint64_t invokeNativeSlow(MyThread* t, GcMethod* method, void* function) -{ - PROTECT(t, method); - - unsigned footprint = method->parameterFootprint() + 1; - if (method->flags() & ACC_STATIC) { - ++footprint; - } - unsigned count = method->parameterCount() + 2; - - THREAD_RUNTIME_ARRAY(t, uintptr_t, args, footprint); - unsigned argOffset = 0; - THREAD_RUNTIME_ARRAY(t, uint8_t, types, count); - unsigned typeOffset = 0; - - RUNTIME_ARRAY_BODY(args)[argOffset++] = reinterpret_cast(t); - RUNTIME_ARRAY_BODY(types)[typeOffset++] = POINTER_TYPE; - - uintptr_t* sp = static_cast(t->stack) + t->arch->frameFooterSize() - + t->arch->frameReturnAddressSize(); - - GcJclass* jclass = 0; - PROTECT(t, jclass); - - if (method->flags() & ACC_STATIC) { - jclass = getJClass(t, method->class_()); - RUNTIME_ARRAY_BODY(args)[argOffset++] - = reinterpret_cast(&jclass); - } else { - RUNTIME_ARRAY_BODY(args)[argOffset++] = reinterpret_cast(sp++); - } - RUNTIME_ARRAY_BODY(types)[typeOffset++] = POINTER_TYPE; - - MethodSpecIterator it( - t, reinterpret_cast(method->spec()->body().begin())); - - while (it.hasNext()) { - unsigned type = RUNTIME_ARRAY_BODY(types)[typeOffset++] - = fieldType(t, fieldCode(t, *it.next())); - - switch (type) { - case INT8_TYPE: - case INT16_TYPE: - case INT32_TYPE: - case FLOAT_TYPE: - RUNTIME_ARRAY_BODY(args)[argOffset++] = *(sp++); - break; - - case INT64_TYPE: - case DOUBLE_TYPE: { - memcpy(RUNTIME_ARRAY_BODY(args) + argOffset, sp, 8); - argOffset += (8 / BytesPerWord); - sp += 2; - } break; - - case POINTER_TYPE: { - if (*sp) { - RUNTIME_ARRAY_BODY(args)[argOffset++] = reinterpret_cast(sp); - } else { - RUNTIME_ARRAY_BODY(args)[argOffset++] = 0; - } - ++sp; - } break; - - default: - abort(t); - } - } - - unsigned returnCode = method->returnCode(); - unsigned returnType = fieldType(t, returnCode); - uint64_t result; - - if (DebugNatives) { - fprintf(stderr, - "invoke native method %s.%s\n", - method->class_()->name()->body().begin(), - method->name()->body().begin()); - } - - if (method->flags() & ACC_SYNCHRONIZED) { - if (method->flags() & ACC_STATIC) { - acquire(t, getJClass(t, method->class_())); - } else { - acquire(t, *reinterpret_cast(RUNTIME_ARRAY_BODY(args)[1])); - } - } - - Reference* reference = t->reference; - - { - ENTER(t, Thread::IdleState); - - bool noThrow = t->checkpoint->noThrow; - t->checkpoint->noThrow = true; - THREAD_RESOURCE(t, bool, noThrow, t->checkpoint->noThrow = noThrow); - - result = vm::dynamicCall(function, - RUNTIME_ARRAY_BODY(args), - RUNTIME_ARRAY_BODY(types), - count, - footprint * BytesPerWord, - returnType); - } - - if (method->flags() & ACC_SYNCHRONIZED) { - if (method->flags() & ACC_STATIC) { - release(t, getJClass(t, method->class_())); - } else { - release(t, *reinterpret_cast(RUNTIME_ARRAY_BODY(args)[1])); - } - } - - if (DebugNatives) { - fprintf(stderr, - "return from native method %s.%s\n", - method->class_()->name()->body().begin(), - method->name()->body().begin()); - } - - if (UNLIKELY(t->exception)) { - GcThrowable* exception = t->exception; - t->exception = 0; - vm::throw_(t, exception); - } - - switch (returnCode) { - case ByteField: - case BooleanField: - result = static_cast(result); - break; - - case CharField: - result = static_cast(result); - break; - - case ShortField: - result = static_cast(result); - break; - - case FloatField: - case IntField: - result = static_cast(result); - break; - - case LongField: - case DoubleField: - break; - - case ObjectField: - result = static_cast(result) - ? *reinterpret_cast(static_cast(result)) - : 0; - break; - - case VoidField: - result = 0; - break; - - default: - abort(t); - } - - while (t->reference != reference) { - dispose(t, t->reference); - } - - return result; -} - -uint64_t invokeNative2(MyThread* t, GcMethod* method) -{ - GcNative* native = getMethodRuntimeData(t, method)->native(); - if (native->fast()) { - return invokeNativeFast(t, method, native->function()); - } else { - return invokeNativeSlow(t, method, native->function()); - } -} - -uint64_t invokeNative(MyThread* t) -{ - if (t->trace->nativeMethod == 0) { - void* ip; - if (t->tailAddress) { - ip = t->tailAddress; - t->tailAddress = 0; - } else { - ip = getIp(t); - } - - GcCallNode* node = findCallNode(t, ip); - GcMethod* target = node->target(); - if (node->flags() & TraceElement::VirtualCall) { - target = resolveTarget(t, t->stack, target); - } - t->trace->nativeMethod = target; - } - - assertT(t, t->tailAddress == 0); - - uint64_t result = 0; - - t->trace->targetMethod = t->trace->nativeMethod; - - t->m->classpath->resolveNative(t, t->trace->nativeMethod); - - result = invokeNative2(t, t->trace->nativeMethod); - - unsigned parameterFootprint = t->trace->targetMethod->parameterFootprint(); - - uintptr_t* stack = static_cast(t->stack); - - if (avian::codegen::TailCalls - and t->arch->argumentFootprint(parameterFootprint) - > t->arch->stackAlignmentInWords()) { - stack += t->arch->argumentFootprint(parameterFootprint) - - t->arch->stackAlignmentInWords(); - } - - stack += t->arch->frameReturnAddressSize(); - - t->trace->targetMethod = 0; - t->trace->nativeMethod = 0; - - t->newStack = stack; - - return result; -} - -void findFrameMapInSimpleTable(MyThread* t, - GcMethod* method, - GcIntArray* table, - int32_t offset, - int32_t** map, - unsigned* start) -{ - unsigned tableSize = simpleFrameMapTableSize(t, method, table); - unsigned indexSize = table->length() - tableSize; - - *map = &table->body()[indexSize]; - - unsigned bottom = 0; - unsigned top = indexSize; - for (unsigned span = top - bottom; span; span = top - bottom) { - unsigned middle = bottom + (span / 2); - int32_t v = table->body()[middle]; - - if (offset == v) { - *start = frameMapSizeInBits(t, method) * middle; - return; - } else if (offset < v) { - top = middle; - } else { - bottom = middle + 1; - } - } - - abort(t); -} - -void findFrameMap(MyThread* t, - void* stack UNUSED, - GcMethod* method, - int32_t offset, - int32_t** map, - unsigned* start) -{ - findFrameMapInSimpleTable( - t, method, method->code()->stackMap(), offset, map, start); -} - -void visitStackAndLocals(MyThread* t, - Heap::Visitor* v, - void* frame, - GcMethod* method, - void* ip) -{ - unsigned count = frameMapSizeInBits(t, method); - - if (count) { - void* stack = stackForFrame(t, frame, method); - - int32_t* map; - unsigned offset; - findFrameMap( - t, - stack, - method, - difference(ip, reinterpret_cast(methodAddress(t, method))), - &map, - &offset); - - for (unsigned i = 0; i < count; ++i) { - int j = offset + i; - if (map[j / 32] & (static_cast(1) << (j % 32))) { - v->visit(localObject(t, stack, method, i)); - } - } - } -} - -void visitArgument(MyThread* t, Heap::Visitor* v, void* stack, unsigned index) -{ - v->visit(static_cast(stack) + index - + t->arch->frameReturnAddressSize() + t->arch->frameFooterSize()); -} - -void visitArguments(MyThread* t, - Heap::Visitor* v, - void* stack, - GcMethod* method) -{ - unsigned index = 0; - - if ((method->flags() & ACC_STATIC) == 0) { - visitArgument(t, v, stack, index++); - } - - for (MethodSpecIterator it( - t, reinterpret_cast(method->spec()->body().begin())); - it.hasNext();) { - switch (*it.next()) { - case 'L': - case '[': - visitArgument(t, v, stack, index++); - break; - - case 'J': - case 'D': - index += 2; - break; - - default: - ++index; - break; - } - } -} - -void visitStack(MyThread* t, Heap::Visitor* v) -{ - void* ip = getIp(t); - void* stack = t->stack; - - MyThread::CallTrace* trace = t->trace; - GcMethod* targetMethod = (trace ? trace->targetMethod : 0); - GcMethod* target = targetMethod; - bool mostRecent = true; - - while (stack) { - if (targetMethod) { - visitArguments(t, v, stack, targetMethod); - targetMethod = 0; - } - - GcMethod* method = methodForIp(t, ip); - if (method) { - PROTECT(t, method); - - void* nextIp = ip; - nextFrame(t, &nextIp, &stack, method, target, mostRecent); - - visitStackAndLocals(t, v, stack, method, ip); - - ip = nextIp; - - target = method; - } else if (trace) { - stack = trace->stack; - ip = trace->ip; - trace = trace->next; - - if (trace) { - targetMethod = trace->targetMethod; - target = targetMethod; - } else { - target = 0; - } - } else { - break; - } - - mostRecent = false; - } -} - -void walkContinuationBody(MyThread* t, - Heap::Walker* w, - GcContinuation* c, - int start) -{ - const int BodyOffset = ContinuationBody / BytesPerWord; - - GcMethod* method = t->m->heap->follow(c->method()); - int count = frameMapSizeInBits(t, method); - - if (count) { - int stack = BodyOffset + (c->framePointerOffset() / BytesPerWord) - - t->arch->framePointerOffset() - - stackOffsetFromFrame(t, method); - - int first = stack + localOffsetFromStack(t, count - 1, method); - if (start > first) { - count -= start - first; - } - - int32_t* map; - unsigned offset; - findFrameMap(t, - reinterpret_cast(c) + stack, - method, - difference(c->address(), - reinterpret_cast(methodAddress(t, method))), - &map, - &offset); - - for (int i = count - 1; i >= 0; --i) { - int j = offset + i; - if (map[j / 32] & (static_cast(1) << (j % 32))) { - if (not w->visit(stack + localOffsetFromStack(t, i, method))) { - return; - } - } - } - } -} - -void callContinuation(MyThread* t, - GcContinuation* continuation, - object result, - GcThrowable* exception, - void* ip, - void* stack) -{ - assertT(t, t->exception == 0); - - if (exception) { - t->exception = exception; - - MyThread::TraceContext c(t, ip, stack, continuation, t->trace); - - void* frame; - findUnwindTarget(t, &ip, &frame, &stack, &continuation); - } - - t->trace->nativeMethod = 0; - t->trace->targetMethod = 0; - - popResources(t); - - transition(t, ip, stack, continuation, t->trace); - - vmJump(ip, 0, stack, t, reinterpret_cast(result), 0); -} - -int8_t* returnSpec(MyThread* t, GcMethod* method) -{ - int8_t* s = method->spec()->body().begin(); - while (*s and *s != ')') - ++s; - expect(t, *s == ')'); - return s + 1; -} - -GcClass* returnClass(MyThread* t, GcMethod* method) -{ - PROTECT(t, method); - - int8_t* spec = returnSpec(t, method); - unsigned length = strlen(reinterpret_cast(spec)); - GcByteArray* name; - if (*spec == '[') { - name = makeByteArray(t, length + 1); - memcpy(name->body().begin(), spec, length); - } else { - assertT(t, *spec == 'L'); - assertT(t, spec[length - 1] == ';'); - name = makeByteArray(t, length - 1); - memcpy(name->body().begin(), spec + 1, length - 2); - } - - return resolveClass(t, method->class_()->loader(), name); -} - -bool compatibleReturnType(MyThread* t, GcMethod* oldMethod, GcMethod* newMethod) -{ - if (oldMethod == newMethod) { - return true; - } else if (oldMethod->returnCode() == newMethod->returnCode()) { - if (oldMethod->returnCode() == ObjectField) { - PROTECT(t, newMethod); - - GcClass* oldClass = returnClass(t, oldMethod); - PROTECT(t, oldClass); - - GcClass* newClass = returnClass(t, newMethod); - - return isAssignableFrom(t, oldClass, newClass); - } else { - return true; - } - } else { - return oldMethod->returnCode() == VoidField; - } -} - -void jumpAndInvoke(MyThread* t, GcMethod* method, void* stack, ...) -{ - t->trace->targetMethod = 0; - - if (method->flags() & ACC_NATIVE) { - t->trace->nativeMethod = method; - } else { - t->trace->nativeMethod = 0; - } - - unsigned argumentCount = method->parameterFootprint(); - THREAD_RUNTIME_ARRAY(t, uintptr_t, arguments, argumentCount); - va_list a; - va_start(a, stack); - for (unsigned i = 0; i < argumentCount; ++i) { - RUNTIME_ARRAY_BODY(arguments)[i] = va_arg(a, uintptr_t); - } - va_end(a); - - assertT(t, t->exception == 0); - - popResources(t); - - vmJumpAndInvoke( - t, - reinterpret_cast(methodAddress(t, method)), - stack, - argumentCount * BytesPerWord, - RUNTIME_ARRAY_BODY(arguments), - (t->arch->alignFrameSize(t->arch->argumentFootprint(argumentCount)) - + t->arch->frameReturnAddressSize()) * BytesPerWord); -} - -void callContinuation(MyThread* t, - GcContinuation* continuation, - object result, - GcThrowable* exception) -{ - enum { Call, Unwind, Rewind } action; - - GcContinuation* nextContinuation = 0; - - if (t->continuation == 0 - or t->continuation->context() != continuation->context()) { - PROTECT(t, continuation); - PROTECT(t, result); - PROTECT(t, exception); - - if (compatibleReturnType( - t, t->trace->originalMethod, continuation->context()->method())) { - GcContinuationContext* oldContext; - GcContinuationContext* unwindContext; - - if (t->continuation) { - oldContext = t->continuation->context(); - unwindContext = oldContext; - } else { - oldContext = 0; - unwindContext = 0; - } - - GcContinuationContext* rewindContext = 0; - - for (GcContinuationContext* newContext = continuation->context(); - newContext; - newContext = newContext->next()) { - if (newContext == oldContext) { - unwindContext = 0; - break; - } else { - rewindContext = newContext; - } - } - - if (unwindContext and unwindContext->continuation()) { - nextContinuation - = cast(t, unwindContext->continuation()); - result = makeUnwindResult(t, continuation, result, exception); - action = Unwind; - } else if (rewindContext and rewindContext->continuation()) { - nextContinuation - = cast(t, rewindContext->continuation()); - action = Rewind; - - if (compileRoots(t)->rewindMethod() == 0) { - PROTECT(t, nextContinuation); - - GcMethod* method = resolveMethod( - t, - roots(t)->bootLoader(), - "avian/Continuations", - "rewind", - "(Ljava/lang/Runnable;Lavian/Callback;Ljava/lang/Object;" - "Ljava/lang/Throwable;)V"); - - PROTECT(t, method); - - compile(t, local::codeAllocator(t), 0, method); - - compileRoots(t)->setRewindMethod(t, method); - } - } else { - action = Call; - } - } else { - throwNew(t, GcIncompatibleContinuationException::Type); - } - } else { - action = Call; - } - - void* ip; - void* frame; - void* stack; - GcContinuation* threadContinuation; - findUnwindTarget(t, &ip, &frame, &stack, &threadContinuation); - - switch (action) { - case Call: { - callContinuation(t, continuation, result, exception, ip, stack); - } break; - - case Unwind: { - callContinuation(t, nextContinuation, result, 0, ip, stack); - } break; - - case Rewind: { - transition(t, 0, 0, nextContinuation, t->trace); - - jumpAndInvoke(t, - compileRoots(t)->rewindMethod(), - stack, - nextContinuation->context()->before(), - continuation, - result, - exception); - } break; - - default: - abort(t); - } -} - -void callWithCurrentContinuation(MyThread* t, object receiver) -{ - GcMethod* method = 0; - void* ip = 0; - void* stack = 0; - - { - PROTECT(t, receiver); - - if (compileRoots(t)->receiveMethod() == 0) { - GcMethod* m = resolveMethod(t, - roots(t)->bootLoader(), - "avian/Function", - "call", - "(Ljava/lang/Object;)Ljava/lang/Object;"); - - if (m) { - compileRoots(t)->setReceiveMethod(t, m); - - GcClass* continuationClass = type(t, GcContinuation::Type); - - if (continuationClass->vmFlags() & BootstrapFlag) { - resolveSystemClass( - t, roots(t)->bootLoader(), continuationClass->name()); - } - } - } - - method = findInterfaceMethod( - t, compileRoots(t)->receiveMethod(), objectClass(t, receiver)); - PROTECT(t, method); - - compile(t, local::codeAllocator(t), 0, method); - - t->continuation = makeCurrentContinuation(t, &ip, &stack); - } - - jumpAndInvoke(t, method, stack, receiver, t->continuation); -} - -void dynamicWind(MyThread* t, object before, object thunk, object after) -{ - void* ip = 0; - void* stack = 0; - - { - PROTECT(t, before); - PROTECT(t, thunk); - PROTECT(t, after); - - if (compileRoots(t)->windMethod() == 0) { - GcMethod* method = resolveMethod( - t, - roots(t)->bootLoader(), - "avian/Continuations", - "wind", - "(Ljava/lang/Runnable;Ljava/util/concurrent/Callable;" - "Ljava/lang/Runnable;)Lavian/Continuations$UnwindResult;"); - - if (method) { - compileRoots(t)->setWindMethod(t, method); - compile(t, local::codeAllocator(t), 0, method); - } - } - - t->continuation = makeCurrentContinuation(t, &ip, &stack); - - GcContinuationContext* newContext - = makeContinuationContext(t, - t->continuation->context(), - before, - after, - t->continuation, - t->trace->originalMethod); - - t->continuation->setContext(t, newContext); - } - - jumpAndInvoke(t, compileRoots(t)->windMethod(), stack, before, thunk, after); -} - -class ArgumentList { - public: - ArgumentList(Thread* t, - uintptr_t* array, - unsigned size, - bool* objectMask, - object this_, - const char* spec, - bool indirectObjects, - va_list arguments) - : t(static_cast(t)), - array(array), - objectMask(objectMask), - size(size), - position(0), - protector(this) - { - if (this_) { - addObject(this_); - } - - for (MethodSpecIterator it(t, spec); it.hasNext();) { - switch (*it.next()) { - case 'L': - case '[': - if (indirectObjects) { - object* v = va_arg(arguments, object*); - addObject(v ? *v : 0); - } else { - addObject(va_arg(arguments, object)); - } - break; - - case 'J': - addLong(va_arg(arguments, uint64_t)); - break; - - case 'D': - addLong(doubleToBits(va_arg(arguments, double))); - break; - - case 'F': - addInt(floatToBits(va_arg(arguments, double))); - break; - - default: - addInt(va_arg(arguments, uint32_t)); - break; - } - } - } - - ArgumentList(Thread* t, - uintptr_t* array, - unsigned size, - bool* objectMask, - object this_, - const char* spec, - const jvalue* arguments) - : t(static_cast(t)), - array(array), - objectMask(objectMask), - size(size), - position(0), - protector(this) - { - if (this_) { - addObject(this_); - } - - unsigned index = 0; - for (MethodSpecIterator it(t, spec); it.hasNext();) { - switch (*it.next()) { - case 'L': - case '[': { - object* v = arguments[index++].l; - addObject(v ? *v : 0); - } break; - - case 'J': - addLong(arguments[index++].j); - break; - - case 'D': - addLong(doubleToBits(arguments[index++].d)); - break; - - case 'F': - addInt(floatToBits(arguments[index++].f)); - break; - - default: - addInt(arguments[index++].i); - break; - } - } - } - - ArgumentList(Thread* t, - uintptr_t* array, - unsigned size, - bool* objectMask, - object this_, - const char* spec, - object arguments) - : t(static_cast(t)), - array(array), - objectMask(objectMask), - size(size), - position(0), - protector(this) - { - if (this_) { - addObject(this_); - } - - unsigned index = 0; - for (MethodSpecIterator it(t, spec); it.hasNext();) { - switch (*it.next()) { - case 'L': - case '[': - addObject(objectArrayBody(t, arguments, index++)); - break; - - case 'J': - case 'D': - addLong( - fieldAtOffset(objectArrayBody(t, arguments, index++), 8)); - break; - - default: - addInt(fieldAtOffset(objectArrayBody(t, arguments, index++), - BytesPerWord)); - break; - } - } - } - - void addObject(object v) - { - assertT(t, position < size); - - array[position] = reinterpret_cast(v); - objectMask[position] = true; - ++position; - } - - void addInt(uintptr_t v) - { - assertT(t, position < size); - - array[position] = v; - objectMask[position] = false; - ++position; - } - - void addLong(uint64_t v) - { - assertT(t, position < size - 1); - - memcpy(array + position, &v, 8); - - objectMask[position] = false; - objectMask[position + 1] = false; - - position += 2; - } - - MyThread* t; - uintptr_t* array; - bool* objectMask; - unsigned size; - unsigned position; - - class MyProtector : public Thread::Protector { - public: - MyProtector(ArgumentList* list) : Protector(list->t), list(list) - { - } - - virtual void visit(Heap::Visitor* v) - { - for (unsigned i = 0; i < list->position; ++i) { - if (list->objectMask[i]) { - v->visit(reinterpret_cast(list->array + i)); - } - } - } - - ArgumentList* list; - } protector; -}; - -object invoke(Thread* thread, GcMethod* method, ArgumentList* arguments) -{ - MyThread* t = static_cast(thread); - - if (false) { - PROTECT(t, method); - - compile( - t, - local::codeAllocator(static_cast(t)), - 0, - resolveMethod( - t, roots(t)->appLoader(), "foo/ClassName", "methodName", "()V")); - } - - uintptr_t stackLimit = t->stackLimit; - uintptr_t stackPosition = reinterpret_cast(&t); - if (stackLimit == 0) { - t->stackLimit = stackPosition - t->m->stackSizeInBytes; - } else if (stackPosition < stackLimit) { - throwNew(t, GcStackOverflowError::Type); - } - - THREAD_RESOURCE(t, - uintptr_t, - stackLimit, - static_cast(t)->stackLimit = stackLimit); - - unsigned returnCode = method->returnCode(); - unsigned returnType = fieldType(t, returnCode); - - uint64_t result; - - { - MyThread::CallTrace trace(t, method); - - MyCheckpoint checkpoint(t); - - assertT(t, arguments->position == arguments->size); - - result = vmInvoke( - t, - reinterpret_cast(methodAddress(t, method)), - arguments->array, - arguments->position * BytesPerWord, - t->arch->alignFrameSize(t->arch->argumentFootprint(arguments->position)) - * BytesPerWord, - returnType); - } - - if (t->exception) { - if (UNLIKELY(t->getFlags() & Thread::UseBackupHeapFlag)) { - collect(t, Heap::MinorCollection); - } - - GcThrowable* exception = t->exception; - t->exception = 0; - vm::throw_(t, exception); - } - - object r; - switch (returnCode) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case FloatField: - case IntField: - r = makeInt(t, result); - break; - - case LongField: - case DoubleField: - r = makeLong(t, result); - break; - - case ObjectField: - r = reinterpret_cast(result); - break; - - case VoidField: - r = 0; - break; - - default: - abort(t); - } - - return r; -} - -class SignalHandler : public SignalRegistrar::Handler { - public: - typedef GcThrowable* (GcRoots::*ExceptionGetter)(); - SignalHandler(Gc::Type type, ExceptionGetter exc, unsigned fixedSize) - : m(0), type(type), exc(exc), fixedSize(fixedSize) - { - } - - void setException(MyThread* t) { - if (ensure(t, pad(fixedSize) + traceSize(t))) { - t->setFlag(Thread::TracingFlag); - t->exception = makeThrowable(t, type); - t->clearFlag(Thread::TracingFlag); - } else { - // not enough memory available for a new exception and stack - // trace -- use a preallocated instance instead - t->exception = (vm::roots(t)->*exc)(); - } - } - - virtual bool handleSignal(void** ip, - void** frame, - void** stack, - void** thread) - { - MyThread* t = static_cast(m->localThread->get()); - if (t and t->state == Thread::ActiveState) { - if (t->getFlags() & Thread::TryNativeFlag) { - setException(t); - - popResources(t); - - GcContinuation* continuation; - findUnwindTarget(t, ip, frame, stack, &continuation); - - t->trace->targetMethod = 0; - t->trace->nativeMethod = 0; - - transition(t, *ip, *stack, continuation, t->trace); - - *thread = t; - - return true; - } else if (methodForIp(t, *ip)) { - // add one to the IP since findLineNumber will subtract one - // when we make the trace: - MyThread::TraceContext context( - t, - static_cast(*ip) + 1, - static_cast(*stack) - t->arch->frameReturnAddressSize(), - t->continuation, - t->trace); - - setException(t); - - // printTrace(t, t->exception); - - GcContinuation* continuation; - findUnwindTarget(t, ip, frame, stack, &continuation); - - transition(t, *ip, *stack, continuation, t->trace); - - *thread = t; - - return true; - } - } - - if (compileLog) { - fflush(compileLog); - } - - return false; - } - - Machine* m; - Gc::Type type; - ExceptionGetter exc; - unsigned fixedSize; -}; - -bool isThunk(MyThread* t, void* ip); - -bool isVirtualThunk(MyThread* t, void* ip); - -bool isThunkUnsafeStack(MyThread* t, void* ip); - -void boot(MyThread* t, BootImage* image, uint8_t* code); - -class MyProcessor; - -MyProcessor* processor(MyThread* t); - -#ifndef AVIAN_AOT_ONLY -void compileThunks(MyThread* t, FixedAllocator* allocator); -#endif - -class CompilationHandlerList { - public: - CompilationHandlerList(CompilationHandlerList* next, - Processor::CompilationHandler* handler) - : next(next), handler(handler) - { - } - - void dispose(Allocator* allocator) - { - if (next) { - next->dispose(allocator); - } - handler->dispose(); - allocator->free(this, sizeof(*this)); - } - - CompilationHandlerList* next; - Processor::CompilationHandler* handler; -}; - -template -int checkConstant(MyThread* t, size_t expected, T C::*field, const char* name) -{ - size_t actual = reinterpret_cast(&(t->*field)) - - reinterpret_cast(t); - if (expected != actual) { - fprintf(stderr, - "constant mismatch (%s): \n\tconstant says: %d\n\tc++ compiler " - "says: %d\n", - name, - (unsigned)expected, - (unsigned)actual); - return 1; - } - return 0; -} - -class MyProcessor : public Processor { - public: - class Thunk { - public: - Thunk() : start(0), frameSavedOffset(0), length(0) - { - } - - Thunk(uint8_t* start, unsigned frameSavedOffset, unsigned length) - : start(start), frameSavedOffset(frameSavedOffset), length(length) - { - } - - uint8_t* start; - unsigned frameSavedOffset; - unsigned length; - }; - - class ThunkCollection { - public: - Thunk default_; - Thunk defaultVirtual; - Thunk defaultDynamic; - Thunk native; - Thunk aioob; - Thunk stackOverflow; - Thunk table; - }; - - MyProcessor(System* s, - Allocator* allocator, - const char* crashDumpDirectory, - bool useNativeFeatures) - : s(s), - allocator(allocator), - roots(0), - bootImage(0), - heapImage(0), - codeImage(0), - codeImageSize(0), - segFaultHandler(GcNullPointerException::Type, - &GcRoots::nullPointerException, - GcNullPointerException::FixedSize), - divideByZeroHandler(GcArithmeticException::Type, - &GcRoots::arithmeticException, - GcArithmeticException::FixedSize), - codeAllocator(s, Slice(0, 0)), - callTableSize(0), - dynamicIndex(0), - useNativeFeatures(useNativeFeatures), - compilationHandlers(0), - dynamicTable(0), - dynamicTableSize(0) - { - thunkTable[compileMethodIndex] = voidPointer(local::compileMethod); - thunkTable[compileVirtualMethodIndex] = voidPointer(compileVirtualMethod); - thunkTable[linkDynamicMethodIndex] = voidPointer(linkDynamicMethod); - thunkTable[invokeNativeIndex] = voidPointer(invokeNative); - thunkTable[throwArrayIndexOutOfBoundsIndex] - = voidPointer(throwArrayIndexOutOfBounds); - thunkTable[throwStackOverflowIndex] = voidPointer(throwStackOverflow); - - using namespace avian::codegen::runtime; - -#define THUNK(s) thunkTable[s##Index] = voidPointer(s); -#include "thunks.cpp" -#undef THUNK - // Set the dummyIndex entry to a constant which should require the - // maximum number of bytes to represent in assembly code - // (i.e. can't be represented by a smaller number of bytes and - // implicitly sign- or zero-extended). We'll use this property - // later to determine the maximum size of a thunk in the thunk - // table. - thunkTable[dummyIndex] = reinterpret_cast( - static_cast(UINT64_C(0x5555555555555555))); - - signals.setCrashDumpDirectory(crashDumpDirectory); - } - - virtual Thread* makeThread(Machine* m, GcThread* javaThread, Thread* parent) - { - MyThread* t = new (m->heap->allocate(sizeof(MyThread))) MyThread( - m, javaThread, static_cast(parent), useNativeFeatures); - - t->heapImage = heapImage; - t->codeImage = codeImage; - t->thunkTable = thunkTable; - t->dynamicTable = local::dynamicTable(t); - -#if TARGET_BYTES_PER_WORD == BYTES_PER_WORD - - int mismatches - = checkConstant(t, - TARGET_THREAD_EXCEPTION, - &Thread::exception, - "TARGET_THREAD_EXCEPTION") - + checkConstant(t, - TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT, - &MyThread::exceptionStackAdjustment, - "TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT") - + checkConstant(t, - TARGET_THREAD_EXCEPTIONOFFSET, - &MyThread::exceptionOffset, - "TARGET_THREAD_EXCEPTIONOFFSET") - + checkConstant(t, - TARGET_THREAD_EXCEPTIONHANDLER, - &MyThread::exceptionHandler, - "TARGET_THREAD_EXCEPTIONHANDLER") - + checkConstant( - t, TARGET_THREAD_IP, &MyThread::ip, "TARGET_THREAD_IP") - + checkConstant( - t, TARGET_THREAD_STACK, &MyThread::stack, "TARGET_THREAD_STACK") - + checkConstant(t, - TARGET_THREAD_NEWSTACK, - &MyThread::newStack, - "TARGET_THREAD_NEWSTACK") - + checkConstant(t, - TARGET_THREAD_TAILADDRESS, - &MyThread::tailAddress, - "TARGET_THREAD_TAILADDRESS") - + checkConstant(t, - TARGET_THREAD_VIRTUALCALLTARGET, - &MyThread::virtualCallTarget, - "TARGET_THREAD_VIRTUALCALLTARGET") - + checkConstant(t, - TARGET_THREAD_VIRTUALCALLINDEX, - &MyThread::virtualCallIndex, - "TARGET_THREAD_VIRTUALCALLINDEX") - + checkConstant(t, - TARGET_THREAD_HEAPIMAGE, - &MyThread::heapImage, - "TARGET_THREAD_HEAPIMAGE") - + checkConstant(t, - TARGET_THREAD_CODEIMAGE, - &MyThread::codeImage, - "TARGET_THREAD_CODEIMAGE") - + checkConstant(t, - TARGET_THREAD_THUNKTABLE, - &MyThread::thunkTable, - "TARGET_THREAD_THUNKTABLE") - + checkConstant(t, - TARGET_THREAD_DYNAMICTABLE, - &MyThread::dynamicTable, - "TARGET_THREAD_DYNAMICTABLE") - + checkConstant(t, - TARGET_THREAD_STACKLIMIT, - &MyThread::stackLimit, - "TARGET_THREAD_STACKLIMIT"); - - if (mismatches > 0) { - fprintf(stderr, "%d constant mismatches\n", mismatches); - abort(t); - } - - expect(t, TargetClassArrayElementSize == ClassArrayElementSize); - expect(t, TargetClassFixedSize == ClassFixedSize); - expect(t, TargetClassVtable == ClassVtable); - -#endif - - t->init(); - - return t; - } - - virtual GcMethod* makeMethod(vm::Thread* t, - uint8_t vmFlags, - uint8_t returnCode, - uint8_t parameterCount, - uint8_t parameterFootprint, - uint16_t flags, - uint16_t offset, - GcByteArray* name, - GcByteArray* spec, - GcMethodAddendum* addendum, - GcClass* class_, - GcCode* code) - { - if (code) { - code->compiled() = local::defaultThunk(static_cast(t)); - } - - return vm::makeMethod(t, - vmFlags, - returnCode, - parameterCount, - parameterFootprint, - flags, - offset, - 0, - 0, - name, - spec, - addendum, - class_, - code); - } - - virtual GcClass* makeClass(vm::Thread* t, - uint16_t flags, - uint16_t vmFlags, - uint16_t fixedSize, - uint8_t arrayElementSize, - uint8_t arrayDimensions, - GcClass* arrayElementClass, - GcIntArray* objectMask, - GcByteArray* name, - GcByteArray* sourceFile, - GcClass* super, - object interfaceTable, - object virtualTable, - object fieldTable, - object methodTable, - GcClassAddendum* addendum, - GcSingleton* staticTable, - GcClassLoader* loader, - unsigned vtableLength) - { - return vm::makeClass(t, - flags, - vmFlags, - fixedSize, - arrayElementSize, - arrayDimensions, - arrayElementClass, - 0, - objectMask, - name, - sourceFile, - super, - interfaceTable, - virtualTable, - fieldTable, - methodTable, - addendum, - staticTable, - loader, - 0, - vtableLength); - } - - virtual void initVtable(Thread* t, GcClass* c) - { - PROTECT(t, c); - for (int i = c->length() - 1; i >= 0; --i) { - void* thunk - = reinterpret_cast(virtualThunk(static_cast(t), i)); - c->vtable()[i] = thunk; - } - } - - virtual void visitObjects(Thread* vmt, Heap::Visitor* v) - { - MyThread* t = static_cast(vmt); - - if (t == t->m->rootThread) { - v->visit(&roots); - } - - for (MyThread::CallTrace* trace = t->trace; trace; trace = trace->next) { - v->visit(&(trace->continuation)); - v->visit(&(trace->nativeMethod)); - v->visit(&(trace->targetMethod)); - v->visit(&(trace->originalMethod)); - } - - v->visit(&(t->continuation)); - - for (Reference* r = t->reference; r; r = r->next) { - v->visit(&(r->target)); - } - - visitStack(t, v); - } - - virtual void walkStack(Thread* vmt, StackVisitor* v) - { - MyThread* t = static_cast(vmt); - - MyStackWalker walker(t); - walker.walk(v); - } - - virtual int lineNumber(Thread* vmt, GcMethod* method, int ip) - { - return findLineNumber(static_cast(vmt), method, ip); - } - - virtual object* makeLocalReference(Thread* vmt, object o) - { - if (o) { - MyThread* t = static_cast(vmt); - - for (Reference* r = t->reference; r; r = r->next) { - if (r->target == o) { - acquire(t, r); - - return &(r->target); - } - } - - Reference* r = new (t->m->heap->allocate(sizeof(Reference))) - Reference(o, &(t->reference), false); - - acquire(t, r); - - return &(r->target); - } else { - return 0; - } - } - - virtual void disposeLocalReference(Thread* t, object* r) - { - if (r) { - release(t, reinterpret_cast(r)); - } - } - - virtual bool pushLocalFrame(Thread* vmt, unsigned) - { - MyThread* t = static_cast(vmt); - - t->referenceFrame = new (t->m->heap->allocate(sizeof(List))) - List(t->reference, t->referenceFrame); - - return true; - } - - virtual void popLocalFrame(Thread* vmt) - { - MyThread* t = static_cast(vmt); - - List* f = t->referenceFrame; - t->referenceFrame = f->next; - while (t->reference != f->item) { - vm::dispose(t, t->reference); - } - - t->m->heap->free(f, sizeof(List)); - } - - virtual object invokeArray(Thread* t, - GcMethod* method, - object this_, - object arguments) - { - assertT(t, t->exception == 0); - - assertT( - t, - t->state == Thread::ActiveState or t->state == Thread::ExclusiveState); - - assertT(t, ((method->flags() & ACC_STATIC) == 0) xor (this_ == 0)); - - const char* spec = reinterpret_cast(method->spec()->body().begin()); - - unsigned size = method->parameterFootprint(); - THREAD_RUNTIME_ARRAY(t, uintptr_t, array, size); - THREAD_RUNTIME_ARRAY(t, bool, objectMask, size); - ArgumentList list(t, - RUNTIME_ARRAY_BODY(array), - size, - RUNTIME_ARRAY_BODY(objectMask), - this_, - spec, - arguments); - - PROTECT(t, method); - - method = findMethod(t, method, this_); - - compile(static_cast(t), - local::codeAllocator(static_cast(t)), - 0, - method); - - return local::invoke(t, method, &list); - } - - virtual object invokeArray(Thread* t, - GcMethod* method, - object this_, - const jvalue* arguments) - { - assertT(t, t->exception == 0); - - assertT( - t, - t->state == Thread::ActiveState or t->state == Thread::ExclusiveState); - - assertT(t, ((method->flags() & ACC_STATIC) == 0) xor (this_ == 0)); - - const char* spec = reinterpret_cast(method->spec()->body().begin()); - - unsigned size = method->parameterFootprint(); - THREAD_RUNTIME_ARRAY(t, uintptr_t, array, size); - THREAD_RUNTIME_ARRAY(t, bool, objectMask, size); - ArgumentList list(t, - RUNTIME_ARRAY_BODY(array), - size, - RUNTIME_ARRAY_BODY(objectMask), - this_, - spec, - arguments); - - PROTECT(t, method); - - method = findMethod(t, method, this_); - - compile(static_cast(t), - local::codeAllocator(static_cast(t)), - 0, - method); - - return local::invoke(t, method, &list); - } - - virtual object invokeList(Thread* t, - GcMethod* method, - object this_, - bool indirectObjects, - va_list arguments) - { - assertT(t, t->exception == 0); - - assertT( - t, - t->state == Thread::ActiveState or t->state == Thread::ExclusiveState); - - assertT(t, ((method->flags() & ACC_STATIC) == 0) xor (this_ == 0)); - - const char* spec = reinterpret_cast(method->spec()->body().begin()); - - unsigned size = method->parameterFootprint(); - THREAD_RUNTIME_ARRAY(t, uintptr_t, array, size); - THREAD_RUNTIME_ARRAY(t, bool, objectMask, size); - ArgumentList list(t, - RUNTIME_ARRAY_BODY(array), - size, - RUNTIME_ARRAY_BODY(objectMask), - this_, - spec, - indirectObjects, - arguments); - - PROTECT(t, method); - - method = findMethod(t, method, this_); - - compile(static_cast(t), - local::codeAllocator(static_cast(t)), - 0, - method); - - return local::invoke(t, method, &list); - } - - virtual object invokeList(Thread* t, - GcClassLoader* loader, - const char* className, - const char* methodName, - const char* methodSpec, - object this_, - va_list arguments) - { - assertT(t, t->exception == 0); - - assertT( - t, - t->state == Thread::ActiveState or t->state == Thread::ExclusiveState); - - unsigned size = parameterFootprint(t, methodSpec, this_ == 0); - THREAD_RUNTIME_ARRAY(t, uintptr_t, array, size); - THREAD_RUNTIME_ARRAY(t, bool, objectMask, size); - ArgumentList list(t, - RUNTIME_ARRAY_BODY(array), - size, - RUNTIME_ARRAY_BODY(objectMask), - this_, - methodSpec, - false, - arguments); - - GcMethod* method - = resolveMethod(t, loader, className, methodName, methodSpec); - - assertT(t, ((method->flags() & ACC_STATIC) == 0) xor (this_ == 0)); - - PROTECT(t, method); - - compile(static_cast(t), - local::codeAllocator(static_cast(t)), - 0, - method); - - return local::invoke(t, method, &list); - } - - virtual void dispose(Thread* vmt) - { - MyThread* t = static_cast(vmt); - - while (t->reference) { - vm::dispose(t, t->reference); - } - - t->arch->release(); - - t->m->heap->free(t, sizeof(*t)); - } - - virtual void dispose() - { - if (codeAllocator.memory.begin()) { -#ifndef AVIAN_AOT_ONLY - Memory::free(codeAllocator.memory); -#endif - } - - if(compilationHandlers) { - compilationHandlers->dispose(allocator); - } - - signals.unregisterHandler(SignalRegistrar::SegFault); - signals.unregisterHandler(SignalRegistrar::DivideByZero); - signals.setCrashDumpDirectory(0); - - if (dynamicTable) { - allocator->free(dynamicTable, dynamicTableSize); - } - - this->~MyProcessor(); - - allocator->free(this, sizeof(*this)); - } - - virtual object getStackTrace(Thread* vmt, Thread* vmTarget) - { - MyThread* t = static_cast(vmt); - MyThread* target = static_cast(vmTarget); - MyProcessor* p = this; - - class Visitor : public System::ThreadVisitor { - public: - Visitor(MyThread* t, MyProcessor* p, MyThread* target) - : t(t), p(p), target(target), trace(0) - { - } - - virtual void visit(void* ip, void* stack, void* link) - { - MyThread::TraceContext c(target, link); - - if (methodForIp(t, ip)) { - // we caught the thread in Java code - use the register values - c.ip = ip; - c.stack = stack; - c.methodIsMostRecent = true; - } else if (target->transition) { - // we caught the thread in native code while in the middle - // of updating the context fields (MyThread::stack, etc.) - static_cast(c) = *(target->transition); - } else if (isVmInvokeUnsafeStack(ip)) { - // we caught the thread in native code just after returning - // from java code, but before clearing MyThread::stack - // (which now contains a garbage value), and the most recent - // Java frame, if any, can be found in - // MyThread::continuation or MyThread::trace - c.ip = 0; - c.stack = 0; - } else if (target->stack and (not isThunkUnsafeStack(t, ip)) - and (not isVirtualThunk(t, ip))) { - // we caught the thread in a thunk or native code, and the - // saved stack pointer indicates the most recent Java frame - // on the stack - c.ip = getIp(target); - c.stack = target->stack; - } else if (isThunk(t, ip) or isVirtualThunk(t, ip)) { - // we caught the thread in a thunk where the stack register - // indicates the most recent Java frame on the stack - - // On e.g. x86, the return address will have already been - // pushed onto the stack, in which case we use getIp to - // retrieve it. On e.g. ARM, it will be in the - // link register. Note that we can't just check if the link - // argument is null here, since we use ecx/rcx as a - // pseudo-link register on x86 for the purpose of tail - // calls. - c.ip = t->arch->hasLinkRegister() ? link : getIp(t, link, stack); - c.stack = stack; - } else { - // we caught the thread in native code, and the most recent - // Java frame, if any, can be found in - // MyThread::continuation or MyThread::trace - c.ip = 0; - c.stack = 0; - } - - if (ensure(t, traceSize(target))) { - t->setFlag(Thread::TracingFlag); - trace = makeTrace(t, target); - t->clearFlag(Thread::TracingFlag); - } - } - - MyThread* t; - MyProcessor* p; - MyThread* target; - object trace; - } visitor(t, p, target); - - t->m->system->visit(t->systemThread, target->systemThread, &visitor); - - if (UNLIKELY(t->getFlags() & Thread::UseBackupHeapFlag)) { - PROTECT(t, visitor.trace); - - collect(t, Heap::MinorCollection); - } - - return visitor.trace ? visitor.trace : makeObjectArray(t, 0); - } - - virtual void initialize(BootImage* image, Slice code) - { - bootImage = image; - codeAllocator.memory = code; - } - - virtual void addCompilationHandler(CompilationHandler* handler) - { - compilationHandlers - = new (allocator->allocate(sizeof(CompilationHandlerList))) - CompilationHandlerList(compilationHandlers, handler); - } - - virtual void compileMethod(Thread* vmt, - Zone* zone, - GcTriple** constants, - GcTriple** calls, - avian::codegen::DelayedPromise** addresses, - GcMethod* method, - OffsetResolver* resolver, - JavaVM* hostVM) - { - MyThread* t = static_cast(vmt); - BootContext bootContext( - t, *constants, *calls, *addresses, zone, resolver, hostVM); - - compile(t, &codeAllocator, &bootContext, method); - - *constants = bootContext.constants; - *calls = bootContext.calls; - *addresses = bootContext.addresses; - } - - virtual void visitRoots(Thread* t, HeapWalker* w) - { - bootImage->methodTree = w->visitRoot(compileRoots(t)->methodTree()); - bootImage->methodTreeSentinal - = w->visitRoot(compileRoots(t)->methodTreeSentinal()); - bootImage->virtualThunks = w->visitRoot(compileRoots(t)->virtualThunks()); - } - - virtual void normalizeVirtualThunks(Thread* t) - { - GcWordArray* a = compileRoots(t)->virtualThunks(); - for (unsigned i = 0; i < a->length(); i += 2) { - if (a->body()[i]) { - a->body()[i] - -= reinterpret_cast(codeAllocator.memory.begin()); - } - } - } - - virtual unsigned* makeCallTable(Thread* t, HeapWalker* w) - { - bootImage->codeSize = codeAllocator.offset; - bootImage->callCount = callTableSize; - - unsigned* table = static_cast( - t->m->heap->allocate(callTableSize * sizeof(unsigned) * 2)); - - unsigned index = 0; - GcArray* callTable = compileRoots(t)->callTable(); - for (unsigned i = 0; i < callTable->length(); ++i) { - for (GcCallNode* p = cast(t, callTable->body()[i]); p; - p = p->next()) { - table[index++] - = targetVW(p->address() - reinterpret_cast( - codeAllocator.memory.begin())); - table[index++] = targetVW( - w->map()->find(p->target()) - | (static_cast(p->flags()) << TargetBootShift)); - } - } - - return table; - } - - virtual void boot(Thread* t, BootImage* image, uint8_t* code) - { -#ifndef AVIAN_AOT_ONLY - if (codeAllocator.memory.begin() == 0) { - codeAllocator.memory = Memory::allocate(ExecutableAreaSizeInBytes, - Memory::ReadWriteExecute); - - expect(t, codeAllocator.memory.begin()); - } -#endif - - if (image and code) { - local::boot(static_cast(t), image, code); - } else { - roots = makeCompileRoots(t, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); - - { - GcArray* ct = makeArray(t, 128); - // sequence point, for gc (don't recombine statements) - compileRoots(t)->setCallTable(t, ct); - } - - GcTreeNode* tree = makeTreeNode(t, 0, 0, 0); - compileRoots(t)->setMethodTreeSentinal(t, tree); - compileRoots(t)->setMethodTree(t, tree); - tree->setLeft(t, tree); - tree->setRight(t, tree); - } - -#ifdef AVIAN_AOT_ONLY - thunks = bootThunks; -#else - local::compileThunks(static_cast(t), &codeAllocator); - - if (not(image and code)) { - bootThunks = thunks; - } -#endif - - segFaultHandler.m = t->m; - expect( - t, - signals.registerHandler(SignalRegistrar::SegFault, &segFaultHandler)); - - divideByZeroHandler.m = t->m; - expect(t, - signals.registerHandler(SignalRegistrar::DivideByZero, - ÷ByZeroHandler)); - } - - virtual void callWithCurrentContinuation(Thread* t, object receiver) - { - if (Continuations) { - local::callWithCurrentContinuation(static_cast(t), receiver); - } else { - abort(t); - } - } - - virtual void dynamicWind(Thread* t, object before, object thunk, object after) - { - if (Continuations) { - local::dynamicWind(static_cast(t), before, thunk, after); - } else { - abort(t); - } - } - - virtual void feedResultToContinuation(Thread* t, - GcContinuation* continuation, - object result) - { - if (Continuations) { - callContinuation(static_cast(t), continuation, result, 0); - } else { - abort(t); - } - } - - virtual void feedExceptionToContinuation(Thread* t, - GcContinuation* continuation, - GcThrowable* exception) - { - if (Continuations) { - callContinuation(static_cast(t), continuation, 0, exception); - } else { - abort(t); - } - } - - virtual void walkContinuationBody(Thread* t, - Heap::Walker* w, - object o, - unsigned start) - { - if (Continuations) { - local::walkContinuationBody( - static_cast(t), w, cast(t, o), start); - } else { - abort(t); - } - } - - System* s; - SignalRegistrar signals; - Allocator* allocator; - GcCompileRoots* roots; - BootImage* bootImage; - uintptr_t* heapImage; - uint8_t* codeImage; - unsigned codeImageSize; - SignalHandler segFaultHandler; - SignalHandler divideByZeroHandler; - FixedAllocator codeAllocator; - ThunkCollection thunks; - ThunkCollection bootThunks; - unsigned callTableSize; - unsigned dynamicIndex; - bool useNativeFeatures; - void* thunkTable[dummyIndex + 1]; - CompilationHandlerList* compilationHandlers; - void** dynamicTable; - unsigned dynamicTableSize; -}; - -unsigned& dynamicIndex(MyThread* t) -{ - return static_cast(t->m->processor)->dynamicIndex; -} - -void**& dynamicTable(MyThread* t) -{ - return static_cast(t->m->processor)->dynamicTable; -} - -unsigned& dynamicTableSize(MyThread* t) -{ - return static_cast(t->m->processor)->dynamicTableSize; -} - -const char* stringOrNull(const char* str) -{ - if (str) { - return str; - } else { - return "(null)"; - } -} - -size_t stringOrNullSize(const char* str) -{ - return strlen(stringOrNull(str)); -} - -void logCompile(MyThread* t, - const void* code, - unsigned size, - const char* class_, - const char* name, - const char* spec) -{ - static bool open = false; - if (not open) { - open = true; - const char* path = findProperty(t, "avian.jit.log"); - if (path) { - compileLog = vm::fopen(path, "wb"); - } else if (DebugCompile) { - compileLog = stderr; - } - } - - if (compileLog) { - fprintf(compileLog, - "%p,%p %s.%s%s\n", - code, - static_cast(code) + size, - class_, - name, - spec); - } - - size_t nameLength = stringOrNullSize(class_) + stringOrNullSize(name) - + stringOrNullSize(spec) + 2; - - THREAD_RUNTIME_ARRAY(t, char, completeName, nameLength); - - sprintf(RUNTIME_ARRAY_BODY(completeName), - "%s.%s%s", - stringOrNull(class_), - stringOrNull(name), - stringOrNull(spec)); - - MyProcessor* p = static_cast(t->m->processor); - for (CompilationHandlerList* h = p->compilationHandlers; h; h = h->next) { - h->handler->compiled(code, 0, 0, RUNTIME_ARRAY_BODY(completeName)); - } -} - -void* compileMethod2(MyThread* t, void* ip) -{ - GcCallNode* node = findCallNode(t, ip); - GcMethod* target = node->target(); - - PROTECT(t, node); - PROTECT(t, target); - - t->trace->targetMethod = target; - - THREAD_RESOURCE0(t, static_cast(t)->trace->targetMethod = 0); - - compile(t, codeAllocator(t), 0, target); - - uint8_t* updateIp = static_cast(ip); - - MyProcessor* p = processor(t); - - bool updateCaller = updateIp < p->codeImage - or updateIp >= p->codeImage + p->codeImageSize; - - uintptr_t address; - if (target->flags() & ACC_NATIVE) { - address = useLongJump(t, reinterpret_cast(ip)) - or (not updateCaller) - ? bootNativeThunk(t) - : nativeThunk(t); - } else { - address = methodAddress(t, target); - } - - if (updateCaller) { - avian::codegen::lir::UnaryOperation op; - if (node->flags() & TraceElement::LongCall) { - if (node->flags() & TraceElement::TailCall) { - op = avian::codegen::lir::AlignedLongJump; - } else { - op = avian::codegen::lir::AlignedLongCall; - } - } else if (node->flags() & TraceElement::TailCall) { - op = avian::codegen::lir::AlignedJump; - } else { - op = avian::codegen::lir::AlignedCall; - } - - updateCall(t, op, updateIp, reinterpret_cast(address)); - } - - return reinterpret_cast(address); -} - -bool isThunk(MyProcessor::ThunkCollection* thunks, void* ip) -{ - uint8_t* thunkStart = thunks->default_.start; - uint8_t* thunkEnd = thunks->table.start + (thunks->table.length * ThunkCount); - - return (reinterpret_cast(ip) - >= reinterpret_cast(thunkStart) - and reinterpret_cast(ip) - < reinterpret_cast(thunkEnd)); -} - -bool isThunk(MyThread* t, void* ip) -{ - MyProcessor* p = processor(t); - - return isThunk(&(p->thunks), ip) or isThunk(&(p->bootThunks), ip); -} - -bool isThunkUnsafeStack(MyProcessor::Thunk* thunk, void* ip) -{ - return reinterpret_cast(ip) - >= reinterpret_cast(thunk->start) - and reinterpret_cast(ip) - < reinterpret_cast(thunk->start - + thunk->frameSavedOffset); -} - -bool isThunkUnsafeStack(MyProcessor::ThunkCollection* thunks, void* ip) -{ - const unsigned NamedThunkCount = 6; - - MyProcessor::Thunk table[NamedThunkCount + ThunkCount]; - - table[0] = thunks->default_; - table[1] = thunks->defaultVirtual; - table[2] = thunks->defaultDynamic; - table[3] = thunks->native; - table[4] = thunks->aioob; - table[5] = thunks->stackOverflow; - - for (unsigned i = 0; i < ThunkCount; ++i) { - new (table + NamedThunkCount + i) - MyProcessor::Thunk(thunks->table.start + (i * thunks->table.length), - thunks->table.frameSavedOffset, - thunks->table.length); - } - - for (unsigned i = 0; i < NamedThunkCount + ThunkCount; ++i) { - if (isThunkUnsafeStack(table + i, ip)) { - return true; - } - } - - return false; -} - -bool isVirtualThunk(MyThread* t, void* ip) -{ - GcWordArray* a = compileRoots(t)->virtualThunks(); - for (unsigned i = 0; i < a->length(); i += 2) { - uintptr_t start = a->body()[i]; - uintptr_t end = start + a->body()[i + 1]; - - if (reinterpret_cast(ip) >= start - and reinterpret_cast(ip) < end) { - return true; - } - } - - return false; -} - -bool isThunkUnsafeStack(MyThread* t, void* ip) -{ - MyProcessor* p = processor(t); - - return isThunk(t, ip) and (isThunkUnsafeStack(&(p->thunks), ip) - or isThunkUnsafeStack(&(p->bootThunks), ip)); -} - -GcCallNode* findCallNode(MyThread* t, void* address) -{ - if (DebugCallTable) { - fprintf(stderr, "find call node %p\n", address); - } - - // we must use a version of the call table at least as recent as the - // compiled form of the method containing the specified address (see - // compile(MyThread*, Allocator*, BootContext*, object)): - loadMemoryBarrier(); - - GcArray* table = compileRoots(t)->callTable(); - - intptr_t key = reinterpret_cast(address); - unsigned index = static_cast(key) & (table->length() - 1); - - for (GcCallNode* n = cast(t, table->body()[index]); n; - n = n->next()) { - intptr_t k = n->address(); - - if (k == key) { - return n; - } - } - - return 0; -} - -GcArray* resizeTable(MyThread* t, GcArray* oldTable, unsigned newLength) -{ - PROTECT(t, oldTable); - - GcCallNode* oldNode = 0; - PROTECT(t, oldNode); - - GcArray* newTable = makeArray(t, newLength); - PROTECT(t, newTable); - - for (unsigned i = 0; i < oldTable->length(); ++i) { - for (oldNode = cast(t, oldTable->body()[i]); oldNode; - oldNode = oldNode->next()) { - intptr_t k = oldNode->address(); - - unsigned index = k & (newLength - 1); - - GcCallNode* newNode - = makeCallNode(t, - oldNode->address(), - oldNode->target(), - oldNode->flags(), - cast(t, newTable->body()[index])); - - newTable->setBodyElement(t, index, newNode); - } - } - - return newTable; -} - -GcArray* insertCallNode(MyThread* t, - GcArray* table, - unsigned* size, - GcCallNode* node) -{ - if (DebugCallTable) { - fprintf(stderr, - "insert call node %p\n", - reinterpret_cast(node->address())); - } - - PROTECT(t, table); - PROTECT(t, node); - - ++(*size); - - if (*size >= table->length() * 2) { - table = resizeTable(t, table, table->length() * 2); - } - - intptr_t key = node->address(); - unsigned index = static_cast(key) & (table->length() - 1); - - node->setNext(t, cast(t, table->body()[index])); - table->setBodyElement(t, index, node); - - return table; -} - -GcHashMap* makeClassMap(Thread* t, - unsigned* table, - unsigned count, - uintptr_t* heap) -{ - GcArray* array = makeArray(t, nextPowerOfTwo(count)); - GcHashMap* map = makeHashMap(t, 0, array); - PROTECT(t, map); - - for (unsigned i = 0; i < count; ++i) { - GcClass* c = cast(t, bootObject(heap, table[i])); - hashMapInsert(t, map, c->name(), c, byteArrayHash); - } - - return map; -} - -GcArray* makeStaticTableArray(Thread* t, - unsigned* bootTable, - unsigned bootCount, - unsigned* appTable, - unsigned appCount, - uintptr_t* heap) -{ - GcArray* array = makeArray(t, bootCount + appCount); - - for (unsigned i = 0; i < bootCount; ++i) { - array->setBodyElement( - t, i, cast(t, bootObject(heap, bootTable[i]))->staticTable()); - } - - for (unsigned i = 0; i < appCount; ++i) { - array->setBodyElement( - t, - (bootCount + i), - cast(t, bootObject(heap, appTable[i]))->staticTable()); - } - - return array; -} - -GcHashMap* makeStringMap(Thread* t, - unsigned* table, - unsigned count, - uintptr_t* heap) -{ - GcArray* array = makeArray(t, nextPowerOfTwo(count)); - GcHashMap* map = makeWeakHashMap(t, 0, array)->as(t); - PROTECT(t, map); - - for (unsigned i = 0; i < count; ++i) { - object s = bootObject(heap, table[i]); - hashMapInsert(t, map, s, 0, stringHash); - } - - return map; -} - -GcArray* makeCallTable(MyThread* t, - uintptr_t* heap, - unsigned* calls, - unsigned count, - uintptr_t base) -{ - GcArray* table = makeArray(t, nextPowerOfTwo(count)); - PROTECT(t, table); - - unsigned size = 0; - for (unsigned i = 0; i < count; ++i) { - unsigned address = calls[i * 2]; - unsigned target = calls[(i * 2) + 1]; - - GcCallNode* node - = makeCallNode(t, - base + address, - cast(t, bootObject(heap, target & BootMask)), - target >> BootShift, - 0); - - table = insertCallNode(t, table, &size, node); - } - - return table; -} - -void fixupHeap(MyThread* t UNUSED, - uintptr_t* map, - unsigned size, - uintptr_t* heap) -{ - for (unsigned word = 0; word < size; ++word) { - uintptr_t w = map[word]; - if (w) { - for (unsigned bit = 0; bit < BitsPerWord; ++bit) { - if (w & (static_cast(1) << bit)) { - unsigned index = indexOf(word, bit); - - uintptr_t* p = heap + index; - assertT(t, *p); - - uintptr_t number = *p & BootMask; - uintptr_t mark = *p >> BootShift; - - if (number) { - *p = reinterpret_cast(heap + (number - 1)) | mark; - if (false) { - fprintf(stderr, - "fixup %d: %d 0x%x\n", - index, - static_cast(number), - static_cast(*p)); - } - } else { - *p = mark; - } - } - } - } - } -} - -void resetClassRuntimeState(Thread* t, - GcClass* c, - uintptr_t* heap, - unsigned heapSize) -{ - c->runtimeDataIndex() = 0; - - if (c->arrayElementSize() == 0) { - GcSingleton* staticTable = c->staticTable()->as(t); - if (staticTable) { - for (unsigned i = 0; i < singletonCount(t, staticTable); ++i) { - if (singletonIsObject(t, staticTable, i) - and (reinterpret_cast( - singletonObject(t, staticTable, i)) < heap - or reinterpret_cast(singletonObject( - t, staticTable, i)) > heap + heapSize)) { - singletonObject(t, staticTable, i) = 0; - } - } - } - } - - if (GcArray* mtable = cast(t, c->methodTable())) { - PROTECT(t, mtable); - for (unsigned i = 0; i < mtable->length(); ++i) { - GcMethod* m = cast(t, mtable->body()[i]); - - m->nativeID() = 0; - m->runtimeDataIndex() = 0; - - if (m->vmFlags() & ClassInitFlag) { - c->vmFlags() |= NeedInitFlag; - c->vmFlags() &= ~InitErrorFlag; - } - } - } - - t->m->processor->initVtable(t, c); -} - -void resetRuntimeState(Thread* t, - GcHashMap* map, - uintptr_t* heap, - unsigned heapSize) -{ - for (HashMapIterator it(t, map); it.hasMore();) { - resetClassRuntimeState( - t, cast(t, it.next()->second()), heap, heapSize); - } -} - -void fixupMethods(Thread* t, - GcHashMap* map, - BootImage* image UNUSED, - uint8_t* code) -{ - for (HashMapIterator it(t, map); it.hasMore();) { - GcClass* c = cast(t, it.next()->second()); - - if (GcArray* mtable = cast(t, c->methodTable())) { - PROTECT(t, mtable); - for (unsigned i = 0; i < mtable->length(); ++i) { - GcMethod* method = cast(t, mtable->body()[i]); - if (method->code()) { - assertT(t, - methodCompiled(t, method) - <= static_cast(image->codeSize)); - - method->code()->compiled() = methodCompiled(t, method) - + reinterpret_cast(code); - - if (DebugCompile) { - logCompile(static_cast(t), - reinterpret_cast(methodCompiled(t, method)), - methodCompiledSize(t, method), - reinterpret_cast( - method->class_()->name()->body().begin()), - reinterpret_cast(method->name()->body().begin()), - reinterpret_cast(method->spec()->body().begin())); - } - } - } - } - - t->m->processor->initVtable(t, c); - } -} - -MyProcessor::Thunk thunkToThunk(const BootImage::Thunk& thunk, uint8_t* base) -{ - return MyProcessor::Thunk( - base + thunk.start, thunk.frameSavedOffset, thunk.length); -} - -void findThunks(MyThread* t, BootImage* image, uint8_t* code) -{ - MyProcessor* p = processor(t); - - p->bootThunks.default_ = thunkToThunk(image->thunks.default_, code); - p->bootThunks.defaultVirtual = thunkToThunk(image->thunks.defaultVirtual, code); - p->bootThunks.defaultDynamic = thunkToThunk(image->thunks.defaultDynamic, code); - p->bootThunks.native = thunkToThunk(image->thunks.native, code); - p->bootThunks.aioob = thunkToThunk(image->thunks.aioob, code); - p->bootThunks.stackOverflow = thunkToThunk(image->thunks.stackOverflow, code); - p->bootThunks.table = thunkToThunk(image->thunks.table, code); -} - -void fixupVirtualThunks(MyThread* t, uint8_t* code) -{ - GcWordArray* a = compileRoots(t)->virtualThunks(); - for (unsigned i = 0; i < a->length(); i += 2) { - if (a->body()[i]) { - a->body()[i] += reinterpret_cast(code); - } - } -} - -void boot(MyThread* t, BootImage* image, uint8_t* code) -{ - assertT(t, image->magic == BootImage::Magic); - - unsigned* bootClassTable = reinterpret_cast(image + 1); - unsigned* appClassTable = bootClassTable + image->bootClassCount; - unsigned* stringTable = appClassTable + image->appClassCount; - unsigned* callTable = stringTable + image->stringCount; - - uintptr_t* heapMap = reinterpret_cast( - padWord(reinterpret_cast(callTable + (image->callCount * 2)))); - - unsigned heapMapSizeInWords - = ceilingDivide(heapMapSize(image->heapSize), BytesPerWord); - uintptr_t* heap = heapMap + heapMapSizeInWords; - - MyProcessor* p = static_cast(t->m->processor); - - t->heapImage = p->heapImage = heap; - - if (false) { - fprintf(stderr, - "heap from %p to %p\n", - heap, - heap + ceilingDivide(image->heapSize, BytesPerWord)); - } - - t->codeImage = p->codeImage = code; - p->codeImageSize = image->codeSize; - - if (false) { - fprintf(stderr, "code from %p to %p\n", code, code + image->codeSize); - } - - if (not image->initialized) { - fixupHeap(t, heapMap, heapMapSizeInWords, heap); - } - - t->m->heap->setImmortalHeap(heap, image->heapSize / BytesPerWord); - - t->m->types = reinterpret_cast(bootObject(heap, image->types)); - - t->m->roots = GcRoots::makeZeroed(t); - - roots(t)->setBootLoader( - t, cast(t, bootObject(heap, image->bootLoader))); - roots(t)->setAppLoader( - t, cast(t, bootObject(heap, image->appLoader))); - - p->roots = GcCompileRoots::makeZeroed(t); - - compileRoots(t)->setMethodTree( - t, cast(t, bootObject(heap, image->methodTree))); - compileRoots(t)->setMethodTreeSentinal( - t, cast(t, bootObject(heap, image->methodTreeSentinal))); - - compileRoots(t)->setVirtualThunks( - t, cast(t, bootObject(heap, image->virtualThunks))); - - { - GcHashMap* map - = makeClassMap(t, bootClassTable, image->bootClassCount, heap); - // sequence point, for gc (don't recombine statements) - roots(t)->bootLoader()->setMap(t, map); - } - - roots(t)->bootLoader()->as(t)->finder() - = t->m->bootFinder; - - { - GcHashMap* map = makeClassMap(t, appClassTable, image->appClassCount, heap); - // sequence point, for gc (don't recombine statements) - roots(t)->appLoader()->setMap(t, map); - } - - roots(t)->appLoader()->as(t)->finder() = t->m->appFinder; - - { - GcHashMap* map = makeStringMap(t, stringTable, image->stringCount, heap); - // sequence point, for gc (don't recombine statements) - roots(t)->setStringMap(t, map); - } - - p->callTableSize = image->callCount; - - { - GcArray* ct = makeCallTable(t, - heap, - callTable, - image->callCount, - reinterpret_cast(code)); - // sequence point, for gc (don't recombine statements) - compileRoots(t)->setCallTable(t, ct); - } - - { - GcArray* staticTableArray = makeStaticTableArray(t, - bootClassTable, - image->bootClassCount, - appClassTable, - image->appClassCount, - heap); - // sequence point, for gc (don't recombine statements) - compileRoots(t)->setStaticTableArray(t, staticTableArray); - } - - findThunks(t, image, code); - - if (image->initialized) { - resetRuntimeState(t, - cast(t, roots(t)->bootLoader()->map()), - heap, - image->heapSize); - - resetRuntimeState(t, - cast(t, roots(t)->appLoader()->map()), - heap, - image->heapSize); - - for (unsigned i = 0; i < t->m->types->length(); ++i) { - resetClassRuntimeState( - t, type(t, static_cast(i)), heap, image->heapSize); - } - } else { - fixupVirtualThunks(t, code); - - fixupMethods( - t, cast(t, roots(t)->bootLoader()->map()), image, code); - - fixupMethods( - t, cast(t, roots(t)->appLoader()->map()), image, code); - } - - image->initialized = true; - - GcHashMap* map = makeHashMap(t, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(t)->setBootstrapClassMap(t, map); -} - -intptr_t getThunk(MyThread* t, Thunk thunk) -{ - MyProcessor* p = processor(t); - - return reinterpret_cast(p->thunks.table.start - + (thunk * p->thunks.table.length)); -} - -#ifndef AVIAN_AOT_ONLY -void insertCallNode(MyThread* t, GcCallNode* node) -{ - GcArray* newArray = insertCallNode( - t, compileRoots(t)->callTable(), &(processor(t)->callTableSize), node); - // sequence point, for gc (don't recombine statements) - compileRoots(t)->setCallTable(t, newArray); -} - -BootImage::Thunk thunkToThunk(const MyProcessor::Thunk& thunk, uint8_t* base) -{ - return BootImage::Thunk( - thunk.start - base, thunk.frameSavedOffset, thunk.length); -} - -using avian::codegen::OperandInfo; -namespace lir = avian::codegen::lir; - -void compileCall(MyThread* t, Context* c, ThunkIndex index, bool call = true) -{ - avian::codegen::Assembler* a = c->assembler; - - if (processor(t)->bootImage) { - lir::Memory table(t->arch->thread(), TARGET_THREAD_THUNKTABLE); - lir::RegisterPair scratch(t->arch->scratch()); - a->apply(lir::Move, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::Memory, &table), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &scratch)); - lir::Memory proc(scratch.low, index * TargetBytesPerWord); - a->apply(lir::Move, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::Memory, &proc), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &scratch)); - a->apply(call ? lir::Call : lir::Jump, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &scratch)); - } else { - lir::Constant proc(new (&c->zone) avian::codegen::ResolvedPromise( - reinterpret_cast(t->thunkTable[index]))); - - a->apply(call ? lir::LongCall : lir::LongJump, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::Constant, &proc)); - } -} - -void compileDefaultThunk(MyThread* t, - FixedAllocator* allocator, - MyProcessor::Thunk* thunk, - const char* name, - ThunkIndex thunkIndex, - bool hasTarget) -{ - Context context(t); - avian::codegen::Assembler* a = context.assembler; - - if(hasTarget) { - lir::RegisterPair class_(t->arch->virtualCallTarget()); - lir::Memory virtualCallTargetSrc( - t->arch->stack(), - (t->arch->frameFooterSize() + t->arch->frameReturnAddressSize()) - * TargetBytesPerWord); - - a->apply(lir::Move, - OperandInfo( - TargetBytesPerWord, lir::Operand::Type::Memory, &virtualCallTargetSrc), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &class_)); - - lir::Memory virtualCallTargetDst(t->arch->thread(), - TARGET_THREAD_VIRTUALCALLTARGET); - - a->apply( - lir::Move, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &class_), - OperandInfo( - TargetBytesPerWord, lir::Operand::Type::Memory, &virtualCallTargetDst)); - } - - lir::RegisterPair index(t->arch->virtualCallIndex()); - lir::Memory virtualCallIndex(t->arch->thread(), - TARGET_THREAD_VIRTUALCALLINDEX); - - a->apply( - lir::Move, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &index), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::Memory, &virtualCallIndex)); - - a->saveFrame(TARGET_THREAD_STACK, TARGET_THREAD_IP); - - thunk->frameSavedOffset = a->length(); - - lir::RegisterPair thread(t->arch->thread()); - a->pushFrame(1, TargetBytesPerWord, lir::Operand::Type::RegisterPair, &thread); - - compileCall(t, &context, thunkIndex); - - a->popFrame(t->arch->alignFrameSize(1)); - - lir::RegisterPair result(t->arch->returnLow()); - a->apply(lir::Jump, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &result)); - - thunk->length = a->endBlock(false)->resolve(0, 0); - - thunk->start = finish( - t, allocator, a, name, thunk->length); -} - -void compileThunks(MyThread* t, FixedAllocator* allocator) -{ - MyProcessor* p = processor(t); - - { - Context context(t); - avian::codegen::Assembler* a = context.assembler; - - a->saveFrame(TARGET_THREAD_STACK, TARGET_THREAD_IP); - - p->thunks.default_.frameSavedOffset = a->length(); - - lir::RegisterPair thread(t->arch->thread()); - a->pushFrame(1, TargetBytesPerWord, lir::Operand::Type::RegisterPair, &thread); - - compileCall(t, &context, compileMethodIndex); - - a->popFrame(t->arch->alignFrameSize(1)); - - lir::RegisterPair result(t->arch->returnLow()); - a->apply(lir::Jump, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &result)); - - p->thunks.default_.length = a->endBlock(false)->resolve(0, 0); - - p->thunks.default_.start - = finish(t, allocator, a, "default", p->thunks.default_.length); - } - - compileDefaultThunk - (t, allocator, &(p->thunks.defaultVirtual), "defaultVirtual", - compileVirtualMethodIndex, true); - - compileDefaultThunk - (t, allocator, &(p->thunks.defaultDynamic), "defaultDynamic", - linkDynamicMethodIndex, false); - - { - Context context(t); - avian::codegen::Assembler* a = context.assembler; - - a->saveFrame(TARGET_THREAD_STACK, TARGET_THREAD_IP); - - p->thunks.native.frameSavedOffset = a->length(); - - lir::RegisterPair thread(t->arch->thread()); - a->pushFrame(1, TargetBytesPerWord, lir::Operand::Type::RegisterPair, &thread); - - compileCall(t, &context, invokeNativeIndex); - - a->popFrameAndUpdateStackAndReturn(t->arch->alignFrameSize(1), - TARGET_THREAD_NEWSTACK); - - p->thunks.native.length = a->endBlock(false)->resolve(0, 0); - - p->thunks.native.start - = finish(t, allocator, a, "native", p->thunks.native.length); - } - - { - Context context(t); - avian::codegen::Assembler* a = context.assembler; - - a->saveFrame(TARGET_THREAD_STACK, TARGET_THREAD_IP); - - p->thunks.aioob.frameSavedOffset = a->length(); - - lir::RegisterPair thread(t->arch->thread()); - a->pushFrame(1, TargetBytesPerWord, lir::Operand::Type::RegisterPair, &thread); - - compileCall(t, &context, throwArrayIndexOutOfBoundsIndex); - - p->thunks.aioob.length = a->endBlock(false)->resolve(0, 0); - - p->thunks.aioob.start - = finish(t, allocator, a, "aioob", p->thunks.aioob.length); - } - - { - Context context(t); - avian::codegen::Assembler* a = context.assembler; - - a->saveFrame(TARGET_THREAD_STACK, TARGET_THREAD_IP); - - p->thunks.stackOverflow.frameSavedOffset = a->length(); - - lir::RegisterPair thread(t->arch->thread()); - a->pushFrame(1, TargetBytesPerWord, lir::Operand::Type::RegisterPair, &thread); - - compileCall(t, &context, throwStackOverflowIndex); - - p->thunks.stackOverflow.length = a->endBlock(false)->resolve(0, 0); - - p->thunks.stackOverflow.start = finish( - t, allocator, a, "stackOverflow", p->thunks.stackOverflow.length); - } - - { - { - Context context(t); - avian::codegen::Assembler* a = context.assembler; - - a->saveFrame(TARGET_THREAD_STACK, TARGET_THREAD_IP); - - p->thunks.table.frameSavedOffset = a->length(); - - compileCall(t, &context, dummyIndex, false); - - p->thunks.table.length = a->endBlock(false)->resolve(0, 0); - - p->thunks.table.start = static_cast(allocator->allocate( - p->thunks.table.length * ThunkCount, TargetBytesPerWord)); - } - - uint8_t* start = p->thunks.table.start; - -#define THUNK(s) \ - { \ - Context context(t); \ - avian::codegen::Assembler* a = context.assembler; \ - \ - a->saveFrame(TARGET_THREAD_STACK, TARGET_THREAD_IP); \ - \ - p->thunks.table.frameSavedOffset = a->length(); \ - \ - compileCall(t, &context, s##Index, false); \ - \ - expect(t, a->endBlock(false)->resolve(0, 0) <= p->thunks.table.length); \ - \ - a->setDestination(start); \ - a->write(); \ - \ - logCompile(t, start, p->thunks.table.length, 0, #s, 0); \ - \ - start += p->thunks.table.length; \ - } -#include "thunks.cpp" -#undef THUNK - } - - BootImage* image = p->bootImage; - - if (image) { - uint8_t* imageBase = p->codeAllocator.memory.begin(); - - image->thunks.default_ = thunkToThunk(p->thunks.default_, imageBase); - image->thunks.defaultVirtual - = thunkToThunk(p->thunks.defaultVirtual, imageBase); - image->thunks.native = thunkToThunk(p->thunks.native, imageBase); - image->thunks.aioob = thunkToThunk(p->thunks.aioob, imageBase); - image->thunks.stackOverflow - = thunkToThunk(p->thunks.stackOverflow, imageBase); - image->thunks.table = thunkToThunk(p->thunks.table, imageBase); - } -} - -uintptr_t aioobThunk(MyThread* t) -{ - return reinterpret_cast(processor(t)->thunks.aioob.start); -} - -uintptr_t stackOverflowThunk(MyThread* t) -{ - return reinterpret_cast(processor(t)->thunks.stackOverflow.start); -} -#endif // not AVIAN_AOT_ONLY - -MyProcessor* processor(MyThread* t) -{ - return static_cast(t->m->processor); -} - -uintptr_t defaultThunk(MyThread* t) -{ - return reinterpret_cast(processor(t)->thunks.default_.start); -} - -uintptr_t bootDefaultThunk(MyThread* t) -{ - return reinterpret_cast(processor(t)->bootThunks.default_.start); -} - -uintptr_t defaultVirtualThunk(MyThread* t) -{ - return reinterpret_cast(processor(t)->thunks.defaultVirtual.start); -} - -uintptr_t defaultDynamicThunk(MyThread* t) -{ - return reinterpret_cast(processor(t)->thunks.defaultDynamic.start); -} - -uintptr_t nativeThunk(MyThread* t) -{ - return reinterpret_cast(processor(t)->thunks.native.start); -} - -uintptr_t bootNativeThunk(MyThread* t) -{ - return reinterpret_cast(processor(t)->bootThunks.native.start); -} - -bool unresolved(MyThread* t, uintptr_t methodAddress) -{ - return methodAddress == defaultThunk(t) - or methodAddress == bootDefaultThunk(t); -} - -uintptr_t compileVirtualThunk(MyThread* t, - unsigned index, - unsigned* size, - uintptr_t thunk, - const char* baseName) -{ - Context context(t); - avian::codegen::Assembler* a = context.assembler; - - avian::codegen::ResolvedPromise indexPromise(index); - lir::Constant indexConstant(&indexPromise); - lir::RegisterPair indexRegister(t->arch->virtualCallIndex()); - a->apply( - lir::Move, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::Constant, &indexConstant), - OperandInfo(TargetBytesPerWord, lir::Operand::Type::RegisterPair, &indexRegister)); - - avian::codegen::ResolvedPromise promise(thunk); - lir::Constant target(&promise); - a->apply(lir::Jump, - OperandInfo(TargetBytesPerWord, lir::Operand::Type::Constant, &target)); - - *size = a->endBlock(false)->resolve(0, 0); - - uint8_t* start = static_cast( - codeAllocator(t)->allocate(*size, TargetBytesPerWord)); - - a->setDestination(start); - a->write(); - - const size_t virtualThunkBaseNameLength = strlen(baseName); - const size_t maxIntStringLength = 10; - - THREAD_RUNTIME_ARRAY(t, - char, - virtualThunkName, - virtualThunkBaseNameLength + maxIntStringLength); - - sprintf(RUNTIME_ARRAY_BODY(virtualThunkName), - "%s%d", - baseName, - index); - - logCompile(t, start, *size, 0, RUNTIME_ARRAY_BODY(virtualThunkName), 0); - - return reinterpret_cast(start); -} - -uintptr_t virtualThunk(MyThread* t, unsigned index) -{ - ACQUIRE(t, t->m->classLock); - - GcWordArray* oldArray = compileRoots(t)->virtualThunks(); - if (oldArray == 0 or oldArray->length() <= index * 2) { - GcWordArray* newArray = makeWordArray(t, nextPowerOfTwo((index + 1) * 2)); - if (compileRoots(t)->virtualThunks()) { - memcpy(newArray->body().begin(), - oldArray->body().begin(), - oldArray->length() * BytesPerWord); - } - compileRoots(t)->setVirtualThunks(t, newArray); - oldArray = newArray; - } - - if (oldArray->body()[index * 2] == 0) { - unsigned size; - uintptr_t thunk = compileVirtualThunk(t, index, &size, defaultVirtualThunk(t), "virtualThunk"); - oldArray->body()[index * 2] = thunk; - oldArray->body()[(index * 2) + 1] = size; - } - - return oldArray->body()[index * 2]; -} - -void compile(MyThread* t, - FixedAllocator* allocator UNUSED, - BootContext* bootContext, - GcMethod* method) -{ - PROTECT(t, method); - - if (bootContext == 0 and method->flags() & ACC_STATIC) { - initClass(t, method->class_()); - } - - if (methodAddress(t, method) != defaultThunk(t)) { - return; - } - - assertT(t, (method->flags() & ACC_NATIVE) == 0); - -#ifdef AVIAN_AOT_ONLY - abort(t); -#else - - // We must avoid acquiring any locks until after the first pass of - // compilation, since this pass may trigger classloading operations - // involving application classloaders and thus the potential for - // deadlock. To make this safe, we use a private clone of the - // method so that we won't be confused if another thread updates the - // original while we're working. - - GcMethod* clone = methodClone(t, method); - - loadMemoryBarrier(); - - if (methodAddress(t, method) != defaultThunk(t)) { - return; - } - - PROTECT(t, clone); - - Context context(t, bootContext, clone); - compile(t, &context); - - { - GcExceptionHandlerTable* ehTable = cast( - t, clone->code()->exceptionHandlerTable()); - - if (ehTable) { - PROTECT(t, ehTable); - - // resolve all exception handler catch types before we acquire - // the class lock: - for (unsigned i = 0; i < ehTable->length(); ++i) { - uint64_t handler = ehTable->body()[i]; - if (exceptionHandlerCatchType(handler)) { - resolveClassInPool(t, clone, exceptionHandlerCatchType(handler) - 1); - } - } - } - } - - ACQUIRE(t, t->m->classLock); - - if (methodAddress(t, method) != defaultThunk(t)) { - return; - } - - finish(t, allocator, &context); - - if (DebugMethodTree) { - fprintf(stderr, - "insert method at %p\n", - reinterpret_cast(methodCompiled(t, clone))); - } - - // We can't update the MethodCode field on the original method - // before it is placed into the method tree, since another thread - // might call the method, from which stack unwinding would fail - // (since there is not yet an entry in the method tree). However, - // we can't insert the original method into the tree before updating - // the MethodCode field on it since we rely on that field to - // determine its position in the tree. Therefore, we insert the - // clone in its place. Later, we'll replace the clone with the - // original to save memory. - - GcTreeNode* newTree = treeInsert(t, - &(context.zone), - compileRoots(t)->methodTree(), - methodCompiled(t, clone), - clone, - compileRoots(t)->methodTreeSentinal(), - compareIpToMethodBounds); - // sequence point, for gc (don't recombine statements) - compileRoots(t)->setMethodTree(t, newTree); - - storeStoreMemoryBarrier(); - - method->setCode(t, clone->code()); - - if (methodVirtual(t, method)) { - method->class_()->vtable()[method->offset()] - = reinterpret_cast(methodCompiled(t, clone)); - } - - // we've compiled the method and inserted it into the tree without - // error, so we ensure that the executable area not be deallocated - // when we dispose of the context: - context.executableAllocator = 0; - - treeUpdate(t, - compileRoots(t)->methodTree(), - methodCompiled(t, clone), - method, - compileRoots(t)->methodTreeSentinal(), - compareIpToMethodBounds); -#endif // not AVIAN_AOT_ONLY -} - -GcCompileRoots* compileRoots(Thread* t) -{ - return processor(static_cast(t))->roots; -} - -avian::util::FixedAllocator* codeAllocator(MyThread* t) -{ - return &(processor(t)->codeAllocator); -} - -Allocator* allocator(MyThread* t) -{ - return processor(t)->allocator; -} - -} // namespace local - -} // namespace - -namespace vm { - -Processor* makeProcessor(System* system, - Allocator* allocator, - const char* crashDumpDirectory, - bool useNativeFeatures) -{ - return new (allocator->allocate(sizeof(local::MyProcessor))) - local::MyProcessor( - system, allocator, crashDumpDirectory, useNativeFeatures); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/continuations-x86.S b/sgx-jvm/avian/src/continuations-x86.S deleted file mode 100644 index 3304eddfc1..0000000000 --- a/sgx-jvm/avian/src/continuations-x86.S +++ /dev/null @@ -1,184 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifdef __x86_64__ - -#define CONTINUATION_NEXT 8 -#define CONTINUATION_ADDRESS 32 -#define CONTINUATION_RETURN_ADDRESS_OFFSET 40 -#define CONTINUATION_FRAME_POINTER_OFFSET 48 -#define CONTINUATION_LENGTH 56 -#define CONTINUATION_BODY 64 - - // call the next continuation, if any - movq TARGET_THREAD_CONTINUATION(%rbx),%rcx - cmpq $0,%rcx - je LOCAL(vmInvoke_exit) - - // allocate a frame of size (continuation.length * BYTES_PER_WORD) - // + CALLEE_SAVED_REGISTER_FOOTPRINT - movq CONTINUATION_LENGTH(%rcx),%rsi - shlq $3,%rsi - subq %rsi,%rsp - subq $CALLEE_SAVED_REGISTER_FOOTPRINT,%rsp - - // copy the continuation body into the frame - leaq CONTINUATION_BODY(%rcx),%rdi - - movq $0,%r9 - jmp LOCAL(vmInvoke_continuationTest) - -LOCAL(vmInvoke_continuationLoop): - movq (%rdi,%r9,1),%r8 - movq %r8,(%rsp,%r9,1) - addq $8,%r9 - -LOCAL(vmInvoke_continuationTest): - cmpq %rsi,%r9 - jb LOCAL(vmInvoke_continuationLoop) - - // set the return address to vmInvoke_returnAddress - movq CONTINUATION_RETURN_ADDRESS_OFFSET(%rcx),%rdi -#if defined __MINGW32__ || defined __CYGWIN32__ - leaq GLOBAL(vmInvoke_returnAddress)(%rip),%r10 -#else - movq GLOBAL(vmInvoke_returnAddress)@GOTPCREL(%rip),%r10 -#endif - movq %r10,(%rsp,%rdi,1) - -#ifdef AVIAN_USE_FRAME_POINTER - // save the current base pointer in the frame and update it - movq CONTINUATION_FRAME_POINTER_OFFSET(%rcx),%rdi - movq %rbp,(%rsp,%rdi,1) - addq %rsp,%rdi - movq %rdi,%rbp -#endif - - // consume the continuation - movq CONTINUATION_NEXT(%rcx),%rdi - movq %rdi,TARGET_THREAD_CONTINUATION(%rbx) - - // call the continuation unless we're handling an exception - movq TARGET_THREAD_EXCEPTION(%rbx),%rsi - cmpq $0,%rsi - jne LOCAL(vmInvoke_handleException) - jmp *CONTINUATION_ADDRESS(%rcx) - -LOCAL(vmInvoke_handleException): - // we're handling an exception - call the exception handler instead - movq $0,TARGET_THREAD_EXCEPTION(%rbx) - movq TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT(%rbx),%rdi - subq %rdi,%rsp - movq TARGET_THREAD_EXCEPTIONOFFSET(%rbx),%rdi - movq %rsi,(%rsp,%rdi,1) - - jmp *TARGET_THREAD_EXCEPTIONHANDLER(%rbx) - -LOCAL(vmInvoke_exit): - -#elif defined __i386__ - -#define CONTINUATION_NEXT 4 -#define CONTINUATION_ADDRESS 16 -#define CONTINUATION_RETURN_ADDRESS_OFFSET 20 -#define CONTINUATION_FRAME_POINTER_OFFSET 24 -#define CONTINUATION_LENGTH 28 -#define CONTINUATION_BODY 32 - -#ifdef AVIAN_USE_FRAME_POINTER -# define CONTINUATION_ALIGNMENT_PADDING 8 -#else -# define CONTINUATION_ALIGNMENT_PADDING 12 -#endif - - // call the next continuation, if any - movl TARGET_THREAD_CONTINUATION(%ebx),%ecx - cmpl $0,%ecx - je LOCAL(vmInvoke_exit) - - // allocate a frame of size (continuation.length * BYTES_PER_WORD), - // plus stack alignment padding - movl CONTINUATION_LENGTH(%ecx),%esi - shll $2,%esi - leal CONTINUATION_ALIGNMENT_PADDING(%esi),%esi - subl %esi,%esp - - // copy the continuation body into the frame - leal CONTINUATION_BODY(%ecx),%edi - - push %eax - push %edx - - movl $0,%edx - jmp LOCAL(vmInvoke_continuationTest) - -LOCAL(vmInvoke_continuationLoop): - movl (%edi,%edx,1),%eax - movl %eax,8(%esp,%edx,1) - addl $4,%edx - -LOCAL(vmInvoke_continuationTest): - cmpl %esi,%edx - jb LOCAL(vmInvoke_continuationLoop) - - pop %edx - pop %eax - - // set the return address to vmInvoke_returnAddress - movl CONTINUATION_RETURN_ADDRESS_OFFSET(%ecx),%edi -#if defined __MINGW32__ || defined __CYGWIN32__ - movl $GLOBAL(vmInvoke_returnAddress),%esi -#else - call LOCAL(getPC) -# if defined __APPLE__ -LOCAL(vmInvoke_offset): - leal GLOBAL(vmInvoke_returnAddress)-LOCAL(vmInvoke_offset)(%esi),%esi -# else - addl $_GLOBAL_OFFSET_TABLE_,%esi - movl GLOBAL(vmInvoke_returnAddress)@GOT(%esi),%esi -# endif -#endif - movl %esi,(%esp,%edi,1) - -#ifdef AVIAN_USE_FRAME_POINTER - // save the current base pointer in the frame and update it - movl CONTINUATION_FRAME_POINTER_OFFSET(%ecx),%edi - movl %ebp,(%esp,%edi,1) - addl %esp,%edi - movl %edi,%ebp -#endif - - // consume the continuation - movl CONTINUATION_NEXT(%ecx),%edi - movl %edi,TARGET_THREAD_CONTINUATION(%ebx) - - // call the continuation unless we're handling an exception - movl TARGET_THREAD_EXCEPTION(%ebx),%esi - cmpl $0,%esi - jne LOCAL(vmInvoke_handleException) - - jmp *CONTINUATION_ADDRESS(%ecx) - -LOCAL(vmInvoke_handleException): - // we're handling an exception - call the exception handler instead - movl $0,TARGET_THREAD_EXCEPTION(%ebx) - movl TARGET_THREAD_EXCEPTIONSTACKADJUSTMENT(%ebx),%edi - subl %edi,%esp - movl TARGET_THREAD_EXCEPTIONOFFSET(%ebx),%edi - movl %esi,(%esp,%edi,1) - - jmp *TARGET_THREAD_EXCEPTIONHANDLER(%ebx) - -LOCAL(vmInvoke_exit): - -#else -# error unsupported architecture -#endif - diff --git a/sgx-jvm/avian/src/debug-util.cpp b/sgx-jvm/avian/src/debug-util.cpp deleted file mode 100644 index a0247c00a4..0000000000 --- a/sgx-jvm/avian/src/debug-util.cpp +++ /dev/null @@ -1,613 +0,0 @@ -/* Copyright (c) 2008-2013, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include "debug-util.h" - -namespace avian { -namespace jvm { -namespace debug { - -uint16_t read16(uint8_t* code, unsigned& ip) -{ - uint16_t a = code[ip++]; - uint16_t b = code[ip++]; - return (a << 8) | b; -} - -uint32_t read32(uint8_t* code, unsigned& ip) -{ - uint32_t b = code[ip++]; - uint32_t a = code[ip++]; - uint32_t c = code[ip++]; - uint32_t d = code[ip++]; - return (a << 24) | (b << 16) | (c << 8) | d; -} - -using namespace vm; - -int printInstruction(uint8_t* code, unsigned& ip, const char* prefix) -{ - unsigned startIp = ip; - - uint8_t instr = code[ip++]; - switch (instr) { - case aaload: - return fprintf(stderr, "aaload"); - case aastore: - return fprintf(stderr, "aastore"); - - case aconst_null: - return fprintf(stderr, "aconst_null"); - - case aload: - return fprintf(stderr, "aload %2d", code[ip++]); - case aload_0: - return fprintf(stderr, "aload_0"); - case aload_1: - return fprintf(stderr, "aload_1"); - case aload_2: - return fprintf(stderr, "aload_2"); - case aload_3: - return fprintf(stderr, "aload_3"); - - case anewarray: - return fprintf(stderr, "anewarray %4d", read16(code, ip)); - case areturn: - return fprintf(stderr, "areturn"); - case arraylength: - return fprintf(stderr, "arraylength"); - - case astore: - return fprintf(stderr, "astore %2d", code[ip++]); - case astore_0: - return fprintf(stderr, "astore_0"); - case astore_1: - return fprintf(stderr, "astore_1"); - case astore_2: - return fprintf(stderr, "astore_2"); - case astore_3: - return fprintf(stderr, "astore_3"); - - case athrow: - return fprintf(stderr, "athrow"); - case baload: - return fprintf(stderr, "baload"); - case bastore: - return fprintf(stderr, "bastore"); - - case bipush: - return fprintf(stderr, "bipush %2d", code[ip++]); - case caload: - return fprintf(stderr, "caload"); - case castore: - return fprintf(stderr, "castore"); - case checkcast: - return fprintf(stderr, "checkcast %4d", read16(code, ip)); - case d2f: - return fprintf(stderr, "d2f"); - case d2i: - return fprintf(stderr, "d2i"); - case d2l: - return fprintf(stderr, "d2l"); - case dadd: - return fprintf(stderr, "dadd"); - case daload: - return fprintf(stderr, "daload"); - case dastore: - return fprintf(stderr, "dastore"); - case dcmpg: - return fprintf(stderr, "dcmpg"); - case dcmpl: - return fprintf(stderr, "dcmpl"); - case dconst_0: - return fprintf(stderr, "dconst_0"); - case dconst_1: - return fprintf(stderr, "dconst_1"); - case ddiv: - return fprintf(stderr, "ddiv"); - case dmul: - return fprintf(stderr, "dmul"); - case dneg: - return fprintf(stderr, "dneg"); - case vm::drem: - return fprintf(stderr, "drem"); - case dsub: - return fprintf(stderr, "dsub"); - case vm::dup: - return fprintf(stderr, "dup"); - case dup_x1: - return fprintf(stderr, "dup_x1"); - case dup_x2: - return fprintf(stderr, "dup_x2"); - case vm::dup2: - return fprintf(stderr, "dup2"); - case dup2_x1: - return fprintf(stderr, "dup2_x1"); - case dup2_x2: - return fprintf(stderr, "dup2_x2"); - case f2d: - return fprintf(stderr, "f2d"); - case f2i: - return fprintf(stderr, "f2i"); - case f2l: - return fprintf(stderr, "f2l"); - case fadd: - return fprintf(stderr, "fadd"); - case faload: - return fprintf(stderr, "faload"); - case fastore: - return fprintf(stderr, "fastore"); - case fcmpg: - return fprintf(stderr, "fcmpg"); - case fcmpl: - return fprintf(stderr, "fcmpl"); - case fconst_0: - return fprintf(stderr, "fconst_0"); - case fconst_1: - return fprintf(stderr, "fconst_1"); - case fconst_2: - return fprintf(stderr, "fconst_2"); - case fdiv: - return fprintf(stderr, "fdiv"); - case fmul: - return fprintf(stderr, "fmul"); - case fneg: - return fprintf(stderr, "fneg"); - case frem: - return fprintf(stderr, "frem"); - case fsub: - return fprintf(stderr, "fsub"); - - case getfield: - return fprintf(stderr, "getfield %4d", read16(code, ip)); - case getstatic: - return fprintf(stderr, "getstatic %4d", read16(code, ip)); - case goto_: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "goto %4d", offset + ip - 3); - } - case goto_w: { - int32_t offset = read32(code, ip); - return fprintf(stderr, "goto_w %08x", offset + ip - 5); - } - - case i2b: - return fprintf(stderr, "i2b"); - case i2c: - return fprintf(stderr, "i2c"); - case i2d: - return fprintf(stderr, "i2d"); - case i2f: - return fprintf(stderr, "i2f"); - case i2l: - return fprintf(stderr, "i2l"); - case i2s: - return fprintf(stderr, "i2s"); - case iadd: - return fprintf(stderr, "iadd"); - case iaload: - return fprintf(stderr, "iaload"); - case iand: - return fprintf(stderr, "iand"); - case iastore: - return fprintf(stderr, "iastore"); - case iconst_m1: - return fprintf(stderr, "iconst_m1"); - case iconst_0: - return fprintf(stderr, "iconst_0"); - case iconst_1: - return fprintf(stderr, "iconst_1"); - case iconst_2: - return fprintf(stderr, "iconst_2"); - case iconst_3: - return fprintf(stderr, "iconst_3"); - case iconst_4: - return fprintf(stderr, "iconst_4"); - case iconst_5: - return fprintf(stderr, "iconst_5"); - case idiv: - return fprintf(stderr, "idiv"); - - case if_acmpeq: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "if_acmpeq %4d", offset + ip - 3); - } - case if_acmpne: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "if_acmpne %4d", offset + ip - 3); - } - case if_icmpeq: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "if_icmpeq %4d", offset + ip - 3); - } - case if_icmpne: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "if_icmpne %4d", offset + ip - 3); - } - - case if_icmpgt: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "if_icmpgt %4d", offset + ip - 3); - } - case if_icmpge: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "if_icmpge %4d", offset + ip - 3); - } - case if_icmplt: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "if_icmplt %4d", offset + ip - 3); - } - case if_icmple: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "if_icmple %4d", offset + ip - 3); - } - - case ifeq: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "ifeq %4d", offset + ip - 3); - } - case ifne: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "ifne %4d", offset + ip - 3); - } - case ifgt: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "ifgt %4d", offset + ip - 3); - } - case ifge: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "ifge %4d", offset + ip - 3); - } - case iflt: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "iflt %4d", offset + ip - 3); - } - case ifle: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "ifle %4d", offset + ip - 3); - } - - case ifnonnull: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "ifnonnull %4d", offset + ip - 3); - } - case ifnull: { - int16_t offset = read16(code, ip); - return fprintf(stderr, "ifnull %4d", offset + ip - 3); - } - - case iinc: { - uint8_t a = code[ip++]; - uint8_t b = code[ip++]; - return fprintf(stderr, "iinc %2d %2d", a, b); - } - - case iload: - return fprintf(stderr, "iload %2d", code[ip++]); - case fload: - return fprintf(stderr, "fload %2d", code[ip++]); - - case iload_0: - return fprintf(stderr, "iload_0"); - case fload_0: - return fprintf(stderr, "fload_0"); - case iload_1: - return fprintf(stderr, "iload_1"); - case fload_1: - return fprintf(stderr, "fload_1"); - - case iload_2: - return fprintf(stderr, "iload_2"); - case fload_2: - return fprintf(stderr, "fload_2"); - case iload_3: - return fprintf(stderr, "iload_3"); - case fload_3: - return fprintf(stderr, "fload_3"); - - case imul: - return fprintf(stderr, "imul"); - case ineg: - return fprintf(stderr, "ineg"); - - case instanceof: - return fprintf(stderr, "instanceof %4d", read16(code, ip)); - case invokeinterface: - return fprintf(stderr, "invokeinterface %4d", read16(code, ip)); - case invokespecial: - return fprintf(stderr, "invokespecial %4d", read16(code, ip)); - case invokestatic: - return fprintf(stderr, "invokestatic %4d", read16(code, ip)); - case invokevirtual: - return fprintf(stderr, "invokevirtual %4d", read16(code, ip)); - - case ior: - return fprintf(stderr, "ior"); - case irem: - return fprintf(stderr, "irem"); - case ireturn: - return fprintf(stderr, "ireturn"); - case freturn: - return fprintf(stderr, "freturn"); - case ishl: - return fprintf(stderr, "ishl"); - case ishr: - return fprintf(stderr, "ishr"); - - case istore: - return fprintf(stderr, "istore %2d", code[ip++]); - case fstore: - return fprintf(stderr, "fstore %2d", code[ip++]); - - case istore_0: - return fprintf(stderr, "istore_0"); - case fstore_0: - return fprintf(stderr, "fstore_0"); - case istore_1: - return fprintf(stderr, "istore_1"); - case fstore_1: - return fprintf(stderr, "fstore_1"); - case istore_2: - return fprintf(stderr, "istore_2"); - case fstore_2: - return fprintf(stderr, "fstore_2"); - case istore_3: - return fprintf(stderr, "istore_3"); - case fstore_3: - return fprintf(stderr, "fstore_3"); - - case isub: - return fprintf(stderr, "isub"); - case iushr: - return fprintf(stderr, "iushr"); - case ixor: - return fprintf(stderr, "ixor"); - - case jsr: - return fprintf(stderr, "jsr %4d", read16(code, ip) + startIp); - case jsr_w: - return fprintf(stderr, "jsr_w %08x", read32(code, ip) + startIp); - - case l2d: - return fprintf(stderr, "l2d"); - case l2f: - return fprintf(stderr, "l2f"); - case l2i: - return fprintf(stderr, "l2i"); - case ladd: - return fprintf(stderr, "ladd"); - case laload: - return fprintf(stderr, "laload"); - - case land: - return fprintf(stderr, "land"); - case lastore: - return fprintf(stderr, "lastore"); - - case lcmp: - return fprintf(stderr, "lcmp"); - case lconst_0: - return fprintf(stderr, "lconst_0"); - case lconst_1: - return fprintf(stderr, "lconst_1"); - - case ldc: - return fprintf(stderr, "ldc %4d", read16(code, ip)); - case ldc_w: - return fprintf(stderr, "ldc_w %08x", read32(code, ip)); - case ldc2_w: - return fprintf(stderr, "ldc2_w %4d", read16(code, ip)); - - case ldiv_: - return fprintf(stderr, "ldiv_"); - - case lload: - return fprintf(stderr, "lload %2d", code[ip++]); - case dload: - return fprintf(stderr, "dload %2d", code[ip++]); - - case lload_0: - return fprintf(stderr, "lload_0"); - case dload_0: - return fprintf(stderr, "dload_0"); - case lload_1: - return fprintf(stderr, "lload_1"); - case dload_1: - return fprintf(stderr, "dload_1"); - case lload_2: - return fprintf(stderr, "lload_2"); - case dload_2: - return fprintf(stderr, "dload_2"); - case lload_3: - return fprintf(stderr, "lload_3"); - case dload_3: - return fprintf(stderr, "dload_3"); - - case lmul: - return fprintf(stderr, "lmul"); - case lneg: - return fprintf(stderr, "lneg"); - - case lookupswitch: { - while (ip & 0x3) { - ip++; - } - int32_t default_ = read32(code, ip) + startIp; - int32_t pairCount = read32(code, ip); - fprintf( - stderr, "lookupswitch default: %d pairCount: %d", default_, pairCount); - - for (int i = 0; i < pairCount; i++) { - int32_t k = read32(code, ip); - int32_t d = read32(code, ip) + startIp; - fprintf(stderr, "\n%s key: %2d dest: %d", prefix, k, d); - } - fprintf(stderr, "\n"); - fflush(stderr); - return 0; - } - - case lor: - return fprintf(stderr, "lor"); - case lrem: - return fprintf(stderr, "lrem"); - case lreturn: - return fprintf(stderr, "lreturn"); - case dreturn: - return fprintf(stderr, "dreturn"); - case lshl: - return fprintf(stderr, "lshl"); - case lshr: - return fprintf(stderr, "lshr"); - - case lstore: - return fprintf(stderr, "lstore %2d", code[ip++]); - case dstore: - return fprintf(stderr, "dstore %2d", code[ip++]); - - case lstore_0: - return fprintf(stderr, "lstore_0"); - case dstore_0: - return fprintf(stderr, "dstore_0"); - case lstore_1: - return fprintf(stderr, "lstore_1"); - case dstore_1: - return fprintf(stderr, "dstore_1"); - case lstore_2: - return fprintf(stderr, "lstore_2"); - case dstore_2: - return fprintf(stderr, "dstore_2"); - case lstore_3: - return fprintf(stderr, "lstore_3"); - case dstore_3: - return fprintf(stderr, "dstore_3"); - - case lsub: - return fprintf(stderr, "lsub"); - case lushr: - return fprintf(stderr, "lushr"); - case lxor: - return fprintf(stderr, "lxor"); - - case monitorenter: - return fprintf(stderr, "monitorenter"); - case monitorexit: - return fprintf(stderr, "monitorexit"); - - case multianewarray: { - unsigned type = read16(code, ip); - return fprintf(stderr, "multianewarray %4d %2d", type, code[ip++]); - } - - case new_: - return fprintf(stderr, "new %4d", read16(code, ip)); - - case newarray: - return fprintf(stderr, "newarray %2d", code[ip++]); - - case nop: - return fprintf(stderr, "nop"); - case pop_: - return fprintf(stderr, "pop"); - case pop2: - return fprintf(stderr, "pop2"); - - case putfield: - return fprintf(stderr, "putfield %4d", read16(code, ip)); - case putstatic: - return fprintf(stderr, "putstatic %4d", read16(code, ip)); - - case ret: - return fprintf(stderr, "ret %2d", code[ip++]); - - case return_: - return fprintf(stderr, "return_"); - case saload: - return fprintf(stderr, "saload"); - case sastore: - return fprintf(stderr, "sastore"); - - case sipush: - return fprintf(stderr, "sipush %4d", read16(code, ip)); - - case swap: - return fprintf(stderr, "swap"); - - case tableswitch: { - while (ip & 0x3) { - ip++; - } - int32_t default_ = read32(code, ip) + startIp; - int32_t bottom = read32(code, ip); - int32_t top = read32(code, ip); - fprintf(stderr, - "tableswitch default: %d bottom: %d top: %d", - default_, - bottom, - top); - - for (int i = 0; i < top - bottom + 1; i++) { - int32_t d = read32(code, ip) + startIp; - fprintf(stderr, "%s key: %d dest: %d", prefix, i + bottom, d); - } - return 0; - } - - case wide: { - switch (code[ip++]) { - case aload: - return fprintf(stderr, "wide aload %4d", read16(code, ip)); - - case astore: - return fprintf(stderr, "wide astore %4d", read16(code, ip)); - case iinc: - fprintf(stderr, "wide iinc %4d %4d", read16(code, ip), read16(code, ip)); - /* fallthrough */ - case iload: - return fprintf(stderr, "wide iload %4d", read16(code, ip)); - case istore: - return fprintf(stderr, "wide istore %4d", read16(code, ip)); - case lload: - return fprintf(stderr, "wide lload %4d", read16(code, ip)); - case lstore: - return fprintf(stderr, "wide lstore %4d", read16(code, ip)); - case ret: - return fprintf(stderr, "wide ret %4d", read16(code, ip)); - - default: - fprintf( - stderr, "unknown wide instruction %2d %4d", instr, read16(code, ip)); - break; - } - } - - default: { - return fprintf(stderr, "unknown instruction %2d", instr); - } - } - return ip; -} - -void disassembleCode(const char* prefix, uint8_t* code, unsigned length) -{ - unsigned ip = 0; - - while (ip < length) { - fprintf(stderr, "%s%x:\t", prefix, ip); - printInstruction(code, ip, prefix); - fprintf(stderr, "\n"); - } -} - -} // namespace debug -} // namespace jvm -} // namespace avian diff --git a/sgx-jvm/avian/src/debug-util.h b/sgx-jvm/avian/src/debug-util.h deleted file mode 100644 index bb981baa10..0000000000 --- a/sgx-jvm/avian/src/debug-util.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2008-2013, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -namespace avian { -namespace jvm { -namespace debug { - -// print out a single instruction (no newline) -// returns number of characters printed -int printInstruction(uint8_t* code, unsigned& ip, const char* prefix = ""); -void disassembleCode(const char* prefix, uint8_t* code, unsigned length); - -} // namespace debug -} // namespace jvm -} // namespace avian diff --git a/sgx-jvm/avian/src/embed.cpp b/sgx-jvm/avian/src/embed.cpp deleted file mode 100644 index 60687d899e..0000000000 --- a/sgx-jvm/avian/src/embed.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include -#include -#include -#include - -#include "avian/embed.h" - -#ifdef __x86_64__ -#define BINARY_LOADER(x) _binary_loader_##x -#else -#define BINARY_LOADER(x) binary_loader_##x -#endif - -extern "C" const uint8_t BINARY_LOADER(start)[]; -extern "C" const uint8_t BINARY_LOADER(end)[]; - -__declspec(noreturn) void printUsage(const wchar_t* executableName) -{ - wprintf(L"Usage: %s destination.exe classes.jar package.Main\n", - executableName); - exit(0); -} - -void writeDestinationFile(const wchar_t* filename) -{ - if (FILE* file = _wfopen(filename, L"wb")) { - size_t count = BINARY_LOADER(end) - BINARY_LOADER(start); - if (count == fwrite(BINARY_LOADER(start), - sizeof(BINARY_LOADER(start)[0]), - count, - file)) { - fclose(file); - return; - } - } - - fprintf(stderr, "Unable to write to destination file\n"); - exit(EXIT_FAILURE); -} - -void readFile(std::vector* jarFile, const wchar_t* fileName) -{ - if (FILE* file = _wfopen(fileName, L"rb")) { - fseek(file, 0, SEEK_END); - jarFile->resize(ftell(file)); - fseek(file, 0, SEEK_SET); - fread(&jarFile->at(0), 1, jarFile->size(), file); - fclose(file); - } -} - -bool mkStringSection(std::vector* stringSection, - const std::vector& strings, - int first, - int last) -{ - stringSection->clear(); - for (int i = first; i <= last; ++i) { - const std::wstring& s = strings.at(i); - stringSection->push_back(s.size()); - stringSection->insert(stringSection->end(), s.begin(), s.end()); - } - - // pad to 16 entries - for (int i = last - first; i < 15; ++i) - stringSection->push_back(0); - - return stringSection->size() > 16; -} - -void writeStringResources(HANDLE hDest, - const std::vector& strings) -{ - for (unsigned i = 0; i < strings.size(); i += 16) { - std::vector stringSection; - - if (mkStringSection(&stringSection, - strings, - i, - std::min(i + 15, strings.size() - 1))) - UpdateResourceW(hDest, - reinterpret_cast(RT_STRING), - reinterpret_cast(MAKEINTRESOURCE((i >> 4) + 1)), - LANG_NEUTRAL, - &stringSection.at(0), - sizeof(wchar_t) * stringSection.size()); - } -} - -int wmain(int argc, wchar_t* argv[]) -{ - if (argc != 4) - printUsage(argv[0]); - - const wchar_t* destinationName = argv[1]; - const wchar_t* classesName = argv[2]; - const wchar_t* mainClassName = argv[3]; - - writeDestinationFile(destinationName); - - if (HANDLE hDest = BeginUpdateResourceW(destinationName, TRUE)) { - std::vector strings; - strings.resize(RESID_MAIN_CLASS + 1); - strings.at(RESID_MAIN_CLASS) = mainClassName; - - writeStringResources(hDest, strings); - - std::vector jarFile; - readFile(&jarFile, classesName); - UpdateResourceW(hDest, - reinterpret_cast(RT_RCDATA), - RESID_BOOT_JAR, - LANG_NEUTRAL, - &jarFile.at(0), - jarFile.size()); - - EndUpdateResource(hDest, FALSE); - } - - return 0; -} - -#ifndef _MSC_VER -extern "C" int _CRT_glob; -extern "C" void __wgetmainargs(int*, wchar_t***, wchar_t***, int, int*); - -int main() -{ - wchar_t** enpv, **argv; - int argc, si = 0; - __wgetmainargs(&argc, &argv, &enpv, _CRT_glob, &si); - return wmain(argc, argv); -} -#endif diff --git a/sgx-jvm/avian/src/embedded-loader.cpp b/sgx-jvm/avian/src/embedded-loader.cpp deleted file mode 100644 index 7d1df49e47..0000000000 --- a/sgx-jvm/avian/src/embedded-loader.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include - -#include "avian/embed.h" -#include "avian/common.h" -#include "jni.h" - -extern "C" { -// since we aren't linking against libstdc++, we must implement this -// ourselves: -void __cxa_pure_virtual(void) -{ - abort(); -} - -AVIAN_EXPORT const uint8_t* bootJar(unsigned* size) -{ - if (HRSRC hResInfo = FindResourceW( - NULL, RESID_BOOT_JAR, reinterpret_cast(RT_RCDATA))) { - if (HGLOBAL hRes = LoadResource(NULL, hResInfo)) { - *size = SizeofResource(NULL, hResInfo); - return (const uint8_t*)LockResource(hRes); - } - } - - fprintf(stderr, "boot.jar resource not found\n"); - - *size = 0; - return NULL; -} -} // extern "C" - -static void getMainClass(char* pName, int maxLen) -{ - if (0 == LoadString(NULL, RESID_MAIN_CLASS, pName, maxLen)) { - fprintf(stderr, "Main class not specified\n"); - strcpy(pName, "Main"); - } -} - -int main(int ac, const char** av) -{ - JavaVMInitArgs vmArgs; - vmArgs.version = JNI_VERSION_1_2; - vmArgs.nOptions = 1; - vmArgs.ignoreUnrecognized = JNI_TRUE; - - JavaVMOption options[1]; - vmArgs.options = options; - - options[0].optionString = const_cast("-Xbootclasspath:[bootJar]"); - - JavaVM* vm; - void* env; - JNI_CreateJavaVM(&vm, &env, &vmArgs); - JNIEnv* e = static_cast(env); - - char mainClass[256]; - getMainClass(mainClass, sizeof(mainClass)); - - jclass c = e->FindClass(mainClass); - if (not e->ExceptionCheck()) { - jmethodID m = e->GetStaticMethodID(c, "main", "([Ljava/lang/String;)V"); - if (not e->ExceptionCheck()) { - jclass stringClass = e->FindClass("java/lang/String"); - if (not e->ExceptionCheck()) { - jobjectArray a = e->NewObjectArray(ac - 1, stringClass, 0); - if (not e->ExceptionCheck()) { - for (int i = 1; i < ac; ++i) { - e->SetObjectArrayElement(a, i - 1, e->NewStringUTF(av[i])); - } - - e->CallStaticVoidMethod(c, m, a); - } else - fprintf(stderr, "Couldn't create array\n"); - } else - fprintf(stderr, "java.lang.String not found\n"); - } else - fprintf(stderr, "main method not found\n"); - } else - fprintf(stderr, "Main class not found\n"); - - int exitCode = 0; - if (e->ExceptionCheck()) { - exitCode = -1; - e->ExceptionDescribe(); - e->ExceptionClear(); - } - - vm->DestroyJavaVM(); - - return exitCode; -} diff --git a/sgx-jvm/avian/src/finder.cpp b/sgx-jvm/avian/src/finder.cpp deleted file mode 100644 index e16df51184..0000000000 --- a/sgx-jvm/avian/src/finder.cpp +++ /dev/null @@ -1,1104 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include -#include -#include -#include - -#include "avian/zlib-custom.h" -#include "avian/finder.h" -#include "avian/lzma.h" -#include "avian/append.h" - -using namespace vm; -using namespace avian::util; - -namespace { - -const bool DebugFind = false; -const bool DebugStat = false; - -class Element { - public: - class Iterator { - public: - virtual const char* next(size_t* size) = 0; - virtual void dispose() = 0; - }; - - Element() : next(0) - { - } - - virtual Iterator* iterator() = 0; - virtual System::Region* find(const char* name) = 0; - virtual System::FileType stat(const char* name, - size_t* length, - bool tryDirectory) = 0; - virtual const char* urlPrefix() = 0; - virtual const char* sourceUrl() = 0; - virtual void dispose() = 0; - - Element* next; -}; - -class DirectoryElement : public Element { - public: - class Iterator : public Element::Iterator { - public: - Iterator(System* s, Alloc* allocator, const char* name, unsigned skip) - : s(s), - allocator(allocator), - name(name), - skip(skip), - directory(0), - last(0), - it(0) - { - if (not s->success(s->open(&directory, name))) { - directory = 0; - } - } - - virtual const char* next(size_t* size) - { - if (it) { - const char* v = it->next(size); - if (v) { - return v; - } else { - it->dispose(); - it = 0; - } - } - - if (last) { - allocator->free(last, strlen(last) + 1); - } - - if (directory) { - for (const char* v = directory->next(); v; v = directory->next()) { - if (v[0] != '.') { - last = append(allocator, name, "/", v); - size_t length; - if (s->stat(last, &length) == System::TypeDirectory) { - it = new (allocator->allocate(sizeof(Iterator))) - Iterator(s, allocator, last, skip); - it->name = last; - } - const char* result = last + skip; - *size = strlen(result); - return result; - } - } - } - - return 0; - } - - virtual void dispose() - { - directory->dispose(); - allocator->free(this, sizeof(*this)); - } - - System* s; - Alloc* allocator; - const char* name; - unsigned skip; - System::Directory* directory; - const char* last; - Iterator* it; - }; - - DirectoryElement(System* s, Alloc* allocator, const char* name) - : s(s), - allocator(allocator), - originalName(name), - name(s->toAbsolutePath(allocator, name)), - urlPrefix_(append(allocator, "file:", this->name, "/")), - sourceUrl_(append(allocator, "file:", this->name)) - { - } - - virtual Element::Iterator* iterator() - { - return new (allocator->allocate(sizeof(Iterator))) - Iterator(s, allocator, name, strlen(name) + 1); - } - - virtual System::Region* find(const char* name) - { - const char* file = append(allocator, this->name, "/", name); - System::Region* region; - System::Status status = s->map(®ion, file); - allocator->free(file, strlen(file) + 1); - - if (s->success(status)) { - if (DebugFind) { - fprintf(stderr, "found %s in %s\n", name, this->name); - } - return region; - } else { - if (DebugFind) { - fprintf(stderr, "%s not found in %s\n", name, this->name); - } - return 0; - } - } - - virtual System::FileType stat(const char* name, size_t* length, bool) - { - const char* file = append(allocator, this->name, "/", name); - System::FileType type = s->stat(file, length); - if (DebugStat) { - fprintf(stderr, "stat %s in %s: %d\n", name, this->name, type); - } - allocator->free(file, strlen(file) + 1); - return type; - } - - virtual const char* urlPrefix() - { - return urlPrefix_; - } - - virtual const char* sourceUrl() - { - return sourceUrl_; - } - - virtual void dispose() - { - allocator->free(originalName, strlen(originalName) + 1); - allocator->free(name, strlen(name) + 1); - allocator->free(urlPrefix_, strlen(urlPrefix_) + 1); - allocator->free(sourceUrl_, strlen(sourceUrl_) + 1); - allocator->free(this, sizeof(*this)); - } - - System* s; - Alloc* allocator; - const char* originalName; - const char* name; - const char* urlPrefix_; - const char* sourceUrl_; -}; - -class PointerRegion : public System::Region { - public: - PointerRegion(System* s, - Alloc* allocator, - const uint8_t* start, - size_t length, - bool freePointer = false) - : s(s), - allocator(allocator), - start_(start), - length_(length), - freePointer(freePointer) - { - } - - virtual const uint8_t* start() - { - return start_; - } - - virtual size_t length() - { - return length_; - } - - virtual void dispose() - { - if (freePointer) { - allocator->free(start_, length_); - } - allocator->free(this, sizeof(*this)); - } - - System* s; - Alloc* allocator; - const uint8_t* start_; - size_t length_; - bool freePointer; -}; - -class DataRegion : public System::Region { - public: - DataRegion(System* s, Alloc* allocator, size_t length) - : s(s), allocator(allocator), length_(length) - { - } - - virtual const uint8_t* start() - { - return data; - } - - virtual size_t length() - { - return length_; - } - - virtual void dispose() - { - allocator->free(this, sizeof(*this) + length_); - } - - System* s; - Alloc* allocator; - size_t length_; - uint8_t data[0]; -}; - -class JarIndex { - public: - enum CompressionMethod { Stored = 0, Deflated = 8 }; - - class Entry { - public: - Entry(uint32_t hash, const uint8_t* entry) : hash(hash), entry(entry) - { - } - - uint32_t hash; - const uint8_t* entry; - }; - - JarIndex(System* s, Alloc* allocator, unsigned capacity) - : s(s), - allocator(allocator), - capacity(capacity), - position(0), - nodes(static_cast*>( - allocator->allocate(sizeof(List) * capacity))) - { - memset(table, 0, sizeof(List*) * capacity); - } - - static JarIndex* make(System* s, Alloc* allocator, unsigned capacity) - { - return new (allocator->allocate(sizeof(JarIndex) - + (sizeof(List*) * capacity))) - JarIndex(s, allocator, capacity); - } - - static JarIndex* open(System* s, Alloc* allocator, System::Region* region) - { - JarIndex* index = make(s, allocator, 32); - - const uint8_t* start = region->start(); - const uint8_t* end = start + region->length(); - const uint8_t* p = end - CentralDirectorySearchStart; - // Find end of central directory record - while (p > start) { - if (signature(p) == CentralDirectorySignature) { - p = region->start() + centralDirectoryOffset(p); - - while (p < end) { - if (signature(p) == EntrySignature) { - index = index->add(Entry( - hash(Slice(fileName(p), fileNameLength(p))), p)); - - p = endOfEntry(p); - } else { - return index; - } - } - } else { - p--; - } - } - - return index; - } - - JarIndex* add(const Entry& entry) - { - if (position < capacity) { - unsigned i = entry.hash & (capacity - 1); - table[i] = new (nodes + (position++)) List(entry, table[i]); - return this; - } else { - JarIndex* index = make(s, allocator, capacity * 2); - for (unsigned i = 0; i < capacity; ++i) { - index->add(nodes[i].item); - } - index->add(entry); - dispose(); - return index; - } - } - - List* findNode(const char* name) - { - size_t length = strlen(name); - unsigned i = hash(name) & (capacity - 1); - for (List* n = table[i]; n; n = n->next) { - const uint8_t* p = n->item.entry; - if (equal(name, length, fileName(p), fileNameLength(p))) { - return n; - } - } - return 0; - } - - System::Region* find(const char* name, const uint8_t* start) - { - List* n = findNode(name); - if (n) { - const uint8_t* p = n->item.entry; - switch (compressionMethod(p)) { - case Stored: { - return new (allocator->allocate(sizeof(PointerRegion))) - PointerRegion(s, - allocator, - fileData(start + localHeaderOffset(p)), - compressedSize(p)); - } break; - - case Deflated: { - DataRegion* region = new ( - allocator->allocate(sizeof(DataRegion) + uncompressedSize(p))) - DataRegion(s, allocator, uncompressedSize(p)); - - z_stream zStream; - memset(&zStream, 0, sizeof(z_stream)); - - zStream.next_in - = const_cast(fileData(start + localHeaderOffset(p))); - zStream.avail_in = compressedSize(p); - zStream.next_out = region->data; - zStream.avail_out = region->length(); - - // -15 means max window size and raw deflate (no zlib wrapper) - int r = inflateInit2(&zStream, -15); - expect(s, r == Z_OK); - - r = inflate(&zStream, Z_FINISH); - expect(s, r == Z_STREAM_END); - - inflateEnd(&zStream); - - return region; - } break; - - default: - abort(s); - } - } - - return 0; - } - - System::FileType stat(const char* name, size_t* length, bool tryDirectory) - { - List* node = findNode(name); - if (node) { - *length = uncompressedSize(node->item.entry); - return System::TypeFile; - } else if (tryDirectory) { - *length = 0; - - // try again with '/' appended - size_t length = strlen(name); - RUNTIME_ARRAY(char, n, length + 2); - memcpy(RUNTIME_ARRAY_BODY(n), name, length); - RUNTIME_ARRAY_BODY(n)[length] = '/'; - RUNTIME_ARRAY_BODY(n)[length + 1] = 0; - - node = findNode(RUNTIME_ARRAY_BODY(n)); - if (node) { - return System::TypeDirectory; - } else { - return System::TypeDoesNotExist; - } - } else { - *length = 0; - return System::TypeDoesNotExist; - } - } - - void dispose() - { - allocator->free(nodes, sizeof(List) * capacity); - allocator->free(this, sizeof(*this) + (sizeof(List*) * capacity)); - } - - System* s; - Alloc* allocator; - unsigned capacity; - unsigned position; - - List* nodes; - List* table[0]; -}; - -class JarElement : public Element { - public: - class Iterator : public Element::Iterator { - public: - Iterator(System* s, Alloc* allocator, JarIndex* index) - : s(s), allocator(allocator), index(index), position(0) - { - } - - virtual const char* next(size_t* size) - { - if (position < index->position) { - List* n = index->nodes + (position++); - *size = fileNameLength(n->item.entry); - return reinterpret_cast(fileName(n->item.entry)); - } else { - return 0; - } - } - - virtual void dispose() - { - allocator->free(this, sizeof(*this)); - } - - System* s; - Alloc* allocator; - JarIndex* index; - unsigned position; - }; - - JarElement(System* s, - Alloc* allocator, - const char* name, - bool canonicalizePath = true) - : s(s), - allocator(allocator), - originalName(name), - name(name and canonicalizePath ? s->toAbsolutePath(allocator, name) - : name), - urlPrefix_(this->name ? append(allocator, "jar:file:", this->name, "!/") - : 0), - sourceUrl_(this->name ? append(allocator, "file:", this->name) : 0), - region(0), - index(0) - { - } - - JarElement(System* s, - Alloc* allocator, - const uint8_t* jarData, - unsigned jarLength) - : s(s), - allocator(allocator), - originalName(0), - name(0), - urlPrefix_(name ? append(allocator, "jar:file:", name, "!/") : 0), - sourceUrl_(name ? append(allocator, "file:", name) : 0), - region(new (allocator->allocate(sizeof(PointerRegion))) - PointerRegion(s, allocator, jarData, jarLength)), - index(JarIndex::open(s, allocator, region)) - { - } - - virtual Element::Iterator* iterator() - { - init(); - - return new (allocator->allocate(sizeof(Iterator))) - Iterator(s, allocator, index); - } - - virtual void init() - { - if (index == 0) { - System::Region* r; - if (s->success(s->map(&r, name))) { - region = r; - index = JarIndex::open(s, allocator, r); - } - } - } - - virtual System::Region* find(const char* name) - { - init(); - - while (*name == '/') - name++; - - System::Region* r = (index ? index->find(name, region->start()) : 0); - if (DebugFind) { - if (r) { - fprintf(stderr, "found %s in %s\n", name, this->name); - } else { - fprintf(stderr, "%s not found in %s\n", name, this->name); - } - } - return r; - } - - virtual System::FileType stat(const char* name, - size_t* length, - bool tryDirectory) - { - init(); - - while (*name == '/') - name++; - - System::FileType type = (index ? index->stat(name, length, tryDirectory) - : System::TypeDoesNotExist); - if (DebugStat) { - fprintf(stderr, "stat %s in %s: %d\n", name, this->name, type); - } - return type; - } - - virtual const char* urlPrefix() - { - return urlPrefix_; - } - - virtual const char* sourceUrl() - { - return sourceUrl_; - } - - virtual void dispose() - { - dispose(sizeof(*this)); - } - - virtual void dispose(unsigned size) - { - if (name) { - if (originalName != name) { - allocator->free(originalName, strlen(originalName) + 1); - } - allocator->free(name, strlen(name) + 1); - allocator->free(urlPrefix_, strlen(urlPrefix_) + 1); - allocator->free(sourceUrl_, strlen(sourceUrl_) + 1); - } - if (index) { - index->dispose(); - } - if (region) { - region->dispose(); - } - allocator->free(this, size); - } - - System* s; - Alloc* allocator; - const char* originalName; - const char* name; - const char* urlPrefix_; - const char* sourceUrl_; - System::Region* region; - JarIndex* index; -}; - -class BuiltinElement : public JarElement { - public: - BuiltinElement(System* s, - Alloc* allocator, - const char* name, - const char* libraryName) - : JarElement(s, allocator, name, false), - library(0), - libraryName(libraryName ? copy(allocator, libraryName) : 0) - { - } - - virtual void init() - { - if (index == 0) { - if (s->success(s->load(&library, libraryName))) { - bool lzma = strncmp("lzma.", name, 5) == 0; - const char* symbolName = lzma ? name + 5 : name; - - void* p = library->resolve(symbolName); - if (p) { - uint8_t* (*function)(size_t*); - memcpy(&function, &p, BytesPerWord); - - size_t size = 0; - uint8_t* data = function(&size); - if (data) { - bool freePointer; - if (lzma) { -#ifdef AVIAN_USE_LZMA - size_t outSize; - data = decodeLZMA(s, allocator, data, size, &outSize); - size = outSize; - freePointer = true; -#else - abort(s); -#endif - } else { - freePointer = false; - } - region = new (allocator->allocate(sizeof(PointerRegion))) - PointerRegion(s, allocator, data, size, freePointer); - index = JarIndex::open(s, allocator, region); - } else if (DebugFind) { - fprintf( - stderr, "%s in %s returned null\n", symbolName, libraryName); - } - } else if (DebugFind) { - fprintf(stderr, "unable to find %s in %s\n", symbolName, libraryName); - } - } else if (DebugFind) { - fprintf(stderr, "unable to load %s\n", libraryName); - } - } - } - - virtual const char* urlPrefix() - { - return "avianvmresource:"; - } - - virtual const char* sourceUrl() - { - return 0; - } - - virtual void dispose() - { - if (library) { - library->disposeAll(); - } - if (libraryName) { - allocator->free(libraryName, strlen(libraryName) + 1); - } - JarElement::dispose(sizeof(*this)); - } - - System::Library* library; - const char* libraryName; -}; - -void add(Element** first, Element** last, Element* e) -{ - if (*last) { - (*last)->next = e; - } else { - *first = e; - } - *last = e; -} - -unsigned baseName(const char* name, char fileSeparator) -{ - const char* p = name; - const char* last = 0; - while (*p) { - if (*p == fileSeparator) { - last = p; - } - ++p; - } - - return last ? (last + 1) - name : 0; -} - -void add(System* s, - Element** first, - Element** last, - Alloc* allocator, - const char* name, - unsigned nameLength, - const char* bootLibrary); - -void addTokens(System* s, - Element** first, - Element** last, - Alloc* allocator, - const char* jarName, - unsigned jarNameBase, - const char* tokens, - unsigned tokensLength, - const char* bootLibrary) -{ - for (Tokenizer t(String(tokens, tokensLength), ' '); t.hasMore();) { - String token(t.next()); - - RUNTIME_ARRAY(char, n, jarNameBase + token.length + 1); - memcpy(RUNTIME_ARRAY_BODY(n), jarName, jarNameBase); - memcpy(RUNTIME_ARRAY_BODY(n) + jarNameBase, token.text, token.length); - RUNTIME_ARRAY_BODY(n)[jarNameBase + token.length] = 0; - - add(s, - first, - last, - allocator, - RUNTIME_ARRAY_BODY(n), - jarNameBase + token.length, - bootLibrary); - } -} - -bool continuationLine(const uint8_t* base, - unsigned total, - size_t* start, - size_t* length) -{ - return readLine(base, total, start, length) and *length > 0 - and base[*start] == ' '; -} - -void addJar(System* s, - Element** first, - Element** last, - Alloc* allocator, - const char* name, - const char* bootLibrary) -{ - if (DebugFind) { - fprintf(stderr, "add jar %s\n", name); - } - - JarElement* e = new (allocator->allocate(sizeof(JarElement))) - JarElement(s, allocator, name); - - unsigned nameBase = baseName(name, s->fileSeparator()); - - add(first, last, e); - - System::Region* region = e->find("META-INF/MANIFEST.MF"); - if (region) { - size_t start = 0; - size_t length; - while (readLine(region->start(), region->length(), &start, &length)) { - unsigned multilineTotal = 0; - - const unsigned PrefixLength = 12; - if (length > PrefixLength - and strncmp("Class-Path: ", - reinterpret_cast(region->start() + start), - PrefixLength) == 0) { - { - size_t nextStart = start + length; - size_t nextLength; - while (continuationLine( - region->start(), region->length(), &nextStart, &nextLength)) { - multilineTotal += nextLength; - nextStart += nextLength; - } - } - - const char* line = reinterpret_cast(region->start() + start - + PrefixLength); - - unsigned lineLength = length - PrefixLength; - - if (multilineTotal) { - RUNTIME_ARRAY(char, n, (length - PrefixLength) + multilineTotal + 1); - - memcpy(RUNTIME_ARRAY_BODY(n), line, lineLength); - - unsigned offset = lineLength; - { - size_t nextStart = start + length; - size_t nextLength; - while (continuationLine( - region->start(), region->length(), &nextStart, &nextLength)) { - unsigned continuationLength = nextLength - 1; - - memcpy(RUNTIME_ARRAY_BODY(n) + offset, - region->start() + nextStart + 1, - continuationLength); - - offset += continuationLength; - nextStart += nextLength; - } - } - - addTokens(s, - first, - last, - allocator, - name, - nameBase, - RUNTIME_ARRAY_BODY(n), - offset, - bootLibrary); - } else { - addTokens(s, - first, - last, - allocator, - name, - nameBase, - line, - lineLength, - bootLibrary); - } - } - - start += length + multilineTotal; - } - - region->dispose(); - } -} - -void add(System* s, - Element** first, - Element** last, - Alloc* allocator, - const char* token, - unsigned tokenLength, - const char* bootLibrary) -{ - if (*token == '[' and token[tokenLength - 1] == ']') { - char* name = static_cast(allocator->allocate(tokenLength - 1)); - memcpy(name, token + 1, tokenLength - 1); - name[tokenLength - 2] = 0; - - if (DebugFind) { - fprintf(stderr, "add builtin %s\n", name); - } - - add(first, - last, - new (allocator->allocate(sizeof(BuiltinElement))) - BuiltinElement(s, allocator, name, bootLibrary)); - } else { - char* name = static_cast(allocator->allocate(tokenLength + 1)); - memcpy(name, token, tokenLength); - name[tokenLength] = 0; - - size_t length; - switch (s->stat(name, &length)) { - case System::TypeFile: { - addJar(s, first, last, allocator, name, bootLibrary); - } break; - - case System::TypeDirectory: { - if (DebugFind) { - fprintf(stderr, "add directory %s\n", name); - } - - add(first, - last, - new (allocator->allocate(sizeof(DirectoryElement))) - DirectoryElement(s, allocator, name)); - } break; - - default: { - if (DebugFind) { - fprintf(stderr, "ignore nonexistent %s\n", name); - } - - allocator->free(name, strlen(name) + 1); - } break; - } - } -} - -Element* parsePath(System* s, - Alloc* allocator, - const char* path, - const char* bootLibrary) -{ - Element* first = 0; - Element* last = 0; - for (Tokenizer t(path, s->pathSeparator()); t.hasMore();) { - String token(t.next()); - - add(s, &first, &last, allocator, token.text, token.length, bootLibrary); - } - - return first; -} - -class MyIterator : public Finder::IteratorImp { - public: - MyIterator(System* s, Alloc* allocator, Element* path) - : s(s), - allocator(allocator), - e(path ? path->next : 0), - it(path ? path->iterator() : 0) - { - } - - virtual const char* next(size_t* size) - { - while (it) { - const char* v = it->next(size); - if (v) { - return v; - } else { - it->dispose(); - if (e) { - it = e->iterator(); - e = e->next; - } else { - it = 0; - } - } - } - return 0; - } - - virtual void dispose() - { - if (it) - it->dispose(); - allocator->free(this, sizeof(*this)); - } - - System* s; - Alloc* allocator; - Element* e; - Element::Iterator* it; -}; - -class MyFinder : public Finder { - public: - MyFinder(System* system, - Alloc* allocator, - const char* path, - const char* bootLibrary) - : system(system), - allocator(allocator), - path_(parsePath(system, allocator, path, bootLibrary)), - pathString(copy(allocator, path)) - { - } - - MyFinder(System* system, - Alloc* allocator, - const uint8_t* jarData, - unsigned jarLength) - : system(system), - allocator(allocator), - path_(new (allocator->allocate(sizeof(JarElement))) - JarElement(system, allocator, jarData, jarLength)), - pathString(0) - { - } - - virtual IteratorImp* iterator() - { - return new (allocator->allocate(sizeof(MyIterator))) - MyIterator(system, allocator, path_); - } - - virtual System::Region* find(const char* name) - { - for (Element* e = path_; e; e = e->next) { - System::Region* r = e->find(name); - if (r) { - return r; - } - } - - return 0; - } - - virtual System::FileType stat(const char* name, - size_t* length, - bool tryDirectory) - { - for (Element* e = path_; e; e = e->next) { - System::FileType type = e->stat(name, length, tryDirectory); - if (type != System::TypeDoesNotExist) { - return type; - } - } - - return System::TypeDoesNotExist; - } - - virtual const char* urlPrefix(const char* name) - { - void* finderElementPtr = NULL; - return nextUrlPrefix(name, finderElementPtr); - } - - virtual const char* nextUrlPrefix(const char* name, void*& finderElementPtr) - { - Element*& e = reinterpret_cast(finderElementPtr); - e = e ? e->next : path_; - for (; e; e = e->next) { - size_t length; - System::FileType type = e->stat(name, &length, true); - if (type != System::TypeDoesNotExist) { - return e->urlPrefix(); - } - } - - return 0; - } - - virtual const char* sourceUrl(const char* name) - { - for (Element* e = path_; e; e = e->next) { - size_t length; - System::FileType type = e->stat(name, &length, true); - if (type != System::TypeDoesNotExist) { - return e->sourceUrl(); - } - } - - return 0; - } - - virtual const char* path() - { - return pathString; - } - - virtual void dispose() - { - for (Element* e = path_; e;) { - Element* t = e; - e = e->next; - t->dispose(); - } - if (pathString) { - allocator->free(pathString, strlen(pathString) + 1); - } - allocator->free(this, sizeof(*this)); - } - - System* system; - Alloc* allocator; - Element* path_; - const char* pathString; -}; - -} // namespace - -namespace vm { - -AVIAN_EXPORT Finder* makeFinder(System* s, - Alloc* a, - const char* path, - const char* bootLibrary) -{ - return new (a->allocate(sizeof(MyFinder))) MyFinder(s, a, path, bootLibrary); -} - -Finder* makeFinder(System* s, - Alloc* a, - const uint8_t* jarData, - size_t jarLength) -{ - return new (a->allocate(sizeof(MyFinder))) MyFinder(s, a, jarData, jarLength); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/heap/CMakeLists.txt b/sgx-jvm/avian/src/heap/CMakeLists.txt deleted file mode 100644 index 5c6ae4177d..0000000000 --- a/sgx-jvm/avian/src/heap/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ - -add_library(avian_heap heap.cpp) \ No newline at end of file diff --git a/sgx-jvm/avian/src/heap/heap.cpp b/sgx-jvm/avian/src/heap/heap.cpp deleted file mode 100644 index 6799452725..0000000000 --- a/sgx-jvm/avian/src/heap/heap.cpp +++ /dev/null @@ -1,2206 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include "avian/common.h" -#include "avian/arch.h" - -#include - -using namespace vm; -using namespace avian::util; - -namespace { - -namespace local { - -const unsigned Top = ~static_cast(0); - -const unsigned InitialGen2CapacityInBytes = 4 * 1024 * 1024; -const unsigned InitialTenuredFixieCeilingInBytes = 4 * 1024 * 1024; - -const bool Verbose = false; -const bool Verbose2 = false; -const bool Debug = false; -const bool DebugFixies = false; - -#ifdef NDEBUG -const bool DebugAllocation = false; -#else -const bool DebugAllocation = true; -#endif - -#define ACQUIRE(x) MutexLock MAKE_NAME(monitorLock_)(x) - -class MutexLock { - public: - MutexLock(System::Mutex* m) : m(m) - { - m->acquire(); - } - - ~MutexLock() - { - m->release(); - } - - private: - System::Mutex* m; -}; - -class Context; - -Aborter* getAborter(Context* c); - -void* tryAllocate(Context* c, size_t size); -void* allocate(Context* c, size_t size); -void* allocate(Context* c, size_t size, bool limit); -void free(Context* c, const void* p, size_t size); - -#ifdef USE_ATOMIC_OPERATIONS -inline void markBitAtomic(uintptr_t* map, unsigned i) -{ - uintptr_t* p = map + wordOf(i); - uintptr_t v = static_cast(1) << bitOf(i); - for (uintptr_t old = *p; not atomicCompareAndSwap(p, old, old | v); - old = *p) { - } -} -#endif // USE_ATOMIC_OPERATIONS - -inline void* get(void* o, unsigned offsetInWords) -{ - return maskAlignedPointer( - fieldAtOffset(o, offsetInWords * BytesPerWord)); -} - -inline void** getp(void* o, unsigned offsetInWords) -{ - return &fieldAtOffset(o, offsetInWords * BytesPerWord); -} - -inline void set(void** o, void* value) -{ - *o = reinterpret_cast( - reinterpret_cast(value) - | (reinterpret_cast(*o) & (~PointerMask))); -} - -inline void set(void* o, unsigned offsetInWords, void* value) -{ - set(getp(o, offsetInWords), value); -} - -class Segment { - public: - class Map { - public: - class Iterator { - public: - Map* map; - unsigned index; - unsigned limit; - - Iterator(Map* map, unsigned start, unsigned end) : map(map) - { - assertT(map->segment->context, map->bitsPerRecord == 1); - assertT(map->segment->context, map->segment); - assertT(map->segment->context, start <= map->segment->position()); - - if (end > map->segment->position()) - end = map->segment->position(); - - index = map->indexOf(start); - limit = map->indexOf(end); - - if ((end - start) % map->scale) - ++limit; - } - - bool hasMore() - { - unsigned word = wordOf(index); - unsigned bit = bitOf(index); - unsigned wordLimit = wordOf(limit); - unsigned bitLimit = bitOf(limit); - - for (; word <= wordLimit and (word < wordLimit or bit < bitLimit); - ++word) { - uintptr_t w = map->data[word]; - if (2) { - for (; bit < BitsPerWord and (word < wordLimit or bit < bitLimit); - ++bit) { - if (w & (static_cast(1) << bit)) { - index = ::indexOf(word, bit); - // printf("hit at index %d\n", index); - return true; - } else { - // printf("miss at index %d\n", indexOf(word, - // bit)); - } - } - } - bit = 0; - } - - index = limit; - - return false; - } - - unsigned next() - { - assertT(map->segment->context, hasMore()); - assertT(map->segment->context, map->segment); - - return (index++) * map->scale; - } - }; - - Segment* segment; - Map* child; - uintptr_t* data; - unsigned bitsPerRecord; - unsigned scale; - bool clearNewData; - - Map(Segment* segment, - uintptr_t* data, - unsigned bitsPerRecord, - unsigned scale, - Map* child, - bool clearNewData) - : segment(segment), - child(child), - data(data), - bitsPerRecord(bitsPerRecord), - scale(scale), - clearNewData(clearNewData) - { - } - - Map(Segment* segment, - unsigned bitsPerRecord, - unsigned scale, - Map* child, - bool clearNewData) - : segment(segment), - child(child), - data(0), - bitsPerRecord(bitsPerRecord), - scale(scale), - clearNewData(clearNewData) - { - } - - void init() - { - assertT(segment->context, bitsPerRecord); - assertT(segment->context, scale); - assertT(segment->context, powerOfTwo(scale)); - - if (data == 0) { - data = segment->data + segment->capacity() - + calculateOffset(segment->capacity()); - } - - if (clearNewData) { - memset(data, 0, size() * BytesPerWord); - } - - if (child) { - child->init(); - } - } - - unsigned calculateOffset(unsigned capacity) - { - unsigned n = 0; - if (child) - n += child->calculateFootprint(capacity); - return n; - } - - static unsigned calculateSize(Context* c UNUSED, - unsigned capacity, - unsigned scale, - unsigned bitsPerRecord) - { - unsigned result = ceilingDivide( - ceilingDivide(capacity, scale) * bitsPerRecord, BitsPerWord); - assertT(c, result); - return result; - } - - unsigned calculateSize(unsigned capacity) - { - return calculateSize(segment->context, capacity, scale, bitsPerRecord); - } - - unsigned size() - { - return calculateSize(segment->capacity()); - } - - unsigned calculateFootprint(unsigned capacity) - { - unsigned n = calculateSize(capacity); - if (child) - n += child->calculateFootprint(capacity); - return n; - } - - void replaceWith(Map* m) - { - assertT(segment->context, bitsPerRecord == m->bitsPerRecord); - assertT(segment->context, scale == m->scale); - - data = m->data; - - m->segment = 0; - m->data = 0; - - if (child) - child->replaceWith(m->child); - } - - unsigned indexOf(unsigned segmentIndex) - { - return (segmentIndex / scale) * bitsPerRecord; - } - - unsigned indexOf(void* p) - { - assertT(segment->context, segment->almostContains(p)); - assertT(segment->context, segment->capacity()); - return indexOf(segment->indexOf(p)); - } - - void clearBit(unsigned i) - { - assertT(segment->context, wordOf(i) < size()); - - vm::clearBit(data, i); - } - - void setBit(unsigned i) - { - assertT(segment->context, wordOf(i) < size()); - - vm::markBit(data, i); - } - - void clearOnlyIndex(unsigned index) - { - clearBits(data, bitsPerRecord, index); - } - - void clearOnly(unsigned segmentIndex) - { - clearOnlyIndex(indexOf(segmentIndex)); - } - - void clearOnly(void* p) - { - clearOnlyIndex(indexOf(p)); - } - - void clear(void* p) - { - clearOnly(p); - if (child) - child->clear(p); - } - - void setOnlyIndex(unsigned index, unsigned v = 1) - { - setBits(data, bitsPerRecord, index, v); - } - - void setOnly(unsigned segmentIndex, unsigned v = 1) - { - setOnlyIndex(indexOf(segmentIndex), v); - } - - void setOnly(void* p, unsigned v = 1) - { - setOnlyIndex(indexOf(p), v); - } - - void set(void* p, unsigned v = 1) - { - setOnly(p, v); - assertT(segment->context, get(p) == v); - if (child) - child->set(p, v); - } - -#ifdef USE_ATOMIC_OPERATIONS - void markAtomic(void* p) - { - assertT(segment->context, bitsPerRecord == 1); - markBitAtomic(data, indexOf(p)); - assertT(segment->context, getBit(data, indexOf(p))); - if (child) - child->markAtomic(p); - } -#endif - - unsigned get(void* p) - { - return getBits(data, bitsPerRecord, indexOf(p)); - } - }; - - Context* context; - uintptr_t* data; - unsigned position_; - unsigned capacity_; - Map* map; - - Segment(Context* context, - Map* map, - unsigned desired, - unsigned minimum, - int64_t available = INT64_MAX) - : context(context), data(0), position_(0), capacity_(0), map(map) - { - if (desired) { - if (minimum == 0) { - minimum = 1; - } - - assertT(context, desired >= minimum); - - capacity_ = desired; - - if (static_cast(footprint(capacity_)) > available) { - unsigned top = capacity_; - unsigned bottom = minimum; - unsigned target = available; - while (true) { - if (static_cast(footprint(capacity_)) > target) { - if (bottom == capacity_) { - break; - } else if (static_cast(footprint(capacity_ - 1)) - <= target) { - --capacity_; - break; - } - top = capacity_; - capacity_ = avg(bottom, capacity_); - } else if (static_cast(footprint(capacity_)) < target) { - if (top == capacity_ - or static_cast(footprint(capacity_ + 1)) >= target) { - break; - } - bottom = capacity_; - capacity_ = avg(top, capacity_); - } else { - break; - } - } - } - - while (data == 0) { - data = static_cast(local::allocate( - context, (footprint(capacity_)) * BytesPerWord, false)); - - if (data == 0) { - if (capacity_ > minimum) { - capacity_ = avg(minimum, capacity_); - if (capacity_ == 0) { - break; - } - } else { - data = static_cast(local::allocate( - context, (footprint(capacity_)) * BytesPerWord)); - } - } - } - - if (map) { - map->init(); - } - } - } - - Segment(Context* context, - Map* map, - uintptr_t* data, - unsigned position, - unsigned capacity) - : context(context), - data(data), - position_(position), - capacity_(capacity), - map(map) - { - if (map) { - map->init(); - } - } - - unsigned footprint(unsigned capacity) - { - return capacity - + (map and capacity ? map->calculateFootprint(capacity) : 0); - } - - unsigned capacity() - { - return capacity_; - } - - unsigned position() - { - return position_; - } - - unsigned remaining() - { - return capacity() - position(); - } - - void replaceWith(Segment* s) - { - if (data) { - free(context, data, (footprint(capacity())) * BytesPerWord); - } - data = s->data; - s->data = 0; - - position_ = s->position_; - s->position_ = 0; - - capacity_ = s->capacity_; - s->capacity_ = 0; - - if (s->map) { - if (map) { - map->replaceWith(s->map); - s->map = 0; - } else { - abort(context); - } - } else { - assertT(context, map == 0); - } - } - - bool contains(void* p) - { - return position() and p >= data and p < data + position(); - } - - bool almostContains(void* p) - { - return contains(p) or p == data + position(); - } - - void* get(unsigned offset) - { - assertT(context, offset <= position()); - return data + offset; - } - - unsigned indexOf(void* p) - { - assertT(context, almostContains(p)); - return static_cast(p) - data; - } - - void* allocate(unsigned size) - { - assertT(context, size); - assertT(context, position() + size <= capacity()); - - void* p = data + position(); - position_ += size; - return p; - } - - void dispose() - { - if (data) { - free(context, data, (footprint(capacity())) * BytesPerWord); - } - data = 0; - map = 0; - } -}; - -class Fixie { - public: - static const unsigned HasMask = 1 << 0; - static const unsigned Marked = 1 << 1; - static const unsigned Dirty = 1 << 2; - static const unsigned Dead = 1 << 3; - - Fixie(Context* c, unsigned size, bool hasMask, Fixie** handle, bool immortal) - : age(immortal ? FixieTenureThreshold + 1 : 0), - flags(hasMask ? HasMask : 0), - size(size), - next(0), - handle(0) - { - memset(mask(), 0, maskSize(size, hasMask)); - add(c, handle); - if (DebugFixies) { - fprintf(stderr, "make fixie %p of size %d\n", this, totalSize()); - } - } - - bool immortal() - { - return age == FixieTenureThreshold + 1; - } - - void add(Context* c UNUSED, Fixie** handle) - { - assertT(c, this->handle == 0); - assertT(c, next == 0); - - this->handle = handle; - if (handle) { - next = *handle; - if (next) - next->handle = &next; - *handle = this; - } else { - next = 0; - } - } - - void remove(Context* c UNUSED) - { - if (handle) { - assertT(c, *handle == this); - *handle = next; - } - if (next) { - next->handle = handle; - } - next = 0; - handle = 0; - } - - void move(Context* c, Fixie** handle) - { - if (DebugFixies) { - fprintf(stderr, "move fixie %p\n", this); - } - - remove(c); - add(c, handle); - } - - void** body() - { - return static_cast(static_cast(body_)); - } - - uintptr_t* mask() - { - return body_ + size; - } - - static unsigned maskSize(unsigned size, bool hasMask) - { - return hasMask * ceilingDivide(size, BitsPerWord) * BytesPerWord; - } - - static unsigned totalSize(unsigned size, bool hasMask) - { - return sizeof(Fixie) + (size * BytesPerWord) + maskSize(size, hasMask); - } - - unsigned totalSize() - { - return totalSize(size, hasMask()); - } - - bool hasMask() - { - return (flags & HasMask) != 0; - } - - bool marked() - { - return (flags & Marked) != 0; - } - - void marked(bool v) - { - if (v) { - flags |= Marked; - } else { - flags &= ~Marked; - } - } - - bool dirty() - { - return (flags & Dirty) != 0; - } - - void dirty(bool v) - { - if (v) { - flags |= Dirty; - } else { - flags &= ~Dirty; - } - } - - bool dead() - { - return (flags & Dead) != 0; - } - - void dead(bool v) - { - if (v) { - flags |= Dead; - } else { - flags &= ~Dead; - } - } - - // be sure to update e.g. TargetFixieSizeInBytes in bootimage.cpp if - // you add/remove/change fields in this class: - - uint16_t age; - uint16_t flags; - uint32_t size; - Fixie* next; - Fixie** handle; - uintptr_t body_[0]; -}; - -Fixie* fixie(void* body) -{ - return static_cast(body) - 1; -} - -void free(Context* c, Fixie** fixies, bool resetImmortal = false); - -class Context { - public: - Context(System* system, unsigned limit) - : system(system), - client(0), - count(0), - limit(limit), - lock(0), - immortalHeapStart(0), - immortalHeapEnd(0), - ageMap(&gen1, max(1, log(TenureThreshold)), 1, 0, false), - gen1(this, &ageMap, 0, 0), - nextAgeMap(&nextGen1, max(1, log(TenureThreshold)), 1, 0, false), - nextGen1(this, &nextAgeMap, 0, 0), - pointerMap(&gen2, 1, 1, 0, true), - pageMap(&gen2, - 1, - LikelyPageSizeInBytes / BytesPerWord, - &pointerMap, - true), - heapMap(&gen2, 1, pageMap.scale * 1024, &pageMap, true), - gen2(this, &heapMap, 0, 0), - nextPointerMap(&nextGen2, 1, 1, 0, true), - nextPageMap(&nextGen2, - 1, - LikelyPageSizeInBytes / BytesPerWord, - &nextPointerMap, - true), - nextHeapMap(&nextGen2, 1, nextPageMap.scale * 1024, &nextPageMap, true), - nextGen2(this, &nextHeapMap, 0, 0), - gen2Base(0), - incomingFootprint(0), - pendingAllocation(0), - tenureFootprint(0), - gen1Padding(0), - tenurePadding(0), - gen2Padding(0), - fixieTenureFootprint(0), - untenuredFixieFootprint(0), - tenuredFixieFootprint(0), - tenuredFixieCeiling(InitialTenuredFixieCeilingInBytes), - mode(Heap::MinorCollection), - fixies(0), - tenuredFixies(0), - dirtyTenuredFixies(0), - markedFixies(0), - visitedFixies(0), - lastCollectionTime(system->now()), - totalCollectionTime(0), - totalTime(0), - limitWasExceeded(false) - { - if (not system->success(system->make(&lock))) { - system->abort(); - } - } - - void dispose() - { - gen1.dispose(); - nextGen1.dispose(); - gen2.dispose(); - nextGen2.dispose(); - lock->dispose(); - } - - void disposeFixies() - { - free(this, &tenuredFixies, true); - free(this, &dirtyTenuredFixies, true); - free(this, &fixies, true); - } - - System* system; - Heap::Client* client; - - unsigned count; - unsigned limit; - - System::Mutex* lock; - - uintptr_t* immortalHeapStart; - uintptr_t* immortalHeapEnd; - - Segment::Map ageMap; - Segment gen1; - - Segment::Map nextAgeMap; - Segment nextGen1; - - Segment::Map pointerMap; - Segment::Map pageMap; - Segment::Map heapMap; - Segment gen2; - - Segment::Map nextPointerMap; - Segment::Map nextPageMap; - Segment::Map nextHeapMap; - Segment nextGen2; - - unsigned gen2Base; - - unsigned incomingFootprint; - int pendingAllocation; - unsigned tenureFootprint; - unsigned gen1Padding; - unsigned tenurePadding; - unsigned gen2Padding; - - unsigned fixieTenureFootprint; - unsigned untenuredFixieFootprint; - unsigned tenuredFixieFootprint; - unsigned tenuredFixieCeiling; - - Heap::CollectionType mode; - - Fixie* fixies; - Fixie* tenuredFixies; - Fixie* dirtyTenuredFixies; - Fixie* markedFixies; - Fixie* visitedFixies; - - int64_t lastCollectionTime; - int64_t totalCollectionTime; - int64_t totalTime; - - bool limitWasExceeded; -}; - -const char* segment(Context* c, void* p) -{ - if (c->gen1.contains(p)) { - return "gen1"; - } else if (c->nextGen1.contains(p)) { - return "nextGen1"; - } else if (c->gen2.contains(p)) { - return "gen2"; - } else if (c->nextGen2.contains(p)) { - return "nextGen2"; - } else { - return "none"; - } -} - -inline Aborter* getAborter(Context* c) -{ - return c->system; -} - -inline unsigned minimumNextGen1Capacity(Context* c) -{ - return c->gen1.position() - c->tenureFootprint + c->incomingFootprint - + c->gen1Padding; -} - -inline unsigned minimumNextGen2Capacity(Context* c) -{ - return c->gen2.position() + c->tenureFootprint + c->tenurePadding - + c->gen2Padding; -} - -inline bool oversizedGen2(Context* c) -{ - return c->gen2.capacity() > (InitialGen2CapacityInBytes / BytesPerWord) - and c->gen2.position() < (c->gen2.capacity() / 4); -} - -inline void initNextGen1(Context* c) -{ - new (&(c->nextAgeMap)) - Segment::Map(&(c->nextGen1), max(1, log(TenureThreshold)), 1, 0, false); - - unsigned minimum = minimumNextGen1Capacity(c); - unsigned desired = minimum; - - new (&(c->nextGen1)) Segment(c, &(c->nextAgeMap), desired, minimum); - - if (Verbose2) { - fprintf(stderr, - "init nextGen1 to %d bytes\n", - c->nextGen1.capacity() * BytesPerWord); - } -} - -inline void initNextGen2(Context* c) -{ - new (&(c->nextPointerMap)) Segment::Map(&(c->nextGen2), 1, 1, 0, true); - - new (&(c->nextPageMap)) Segment::Map(&(c->nextGen2), - 1, - LikelyPageSizeInBytes / BytesPerWord, - &(c->nextPointerMap), - true); - - new (&(c->nextHeapMap)) Segment::Map( - &(c->nextGen2), 1, c->pageMap.scale * 1024, &(c->nextPageMap), true); - - unsigned minimum = minimumNextGen2Capacity(c); - unsigned desired = minimum; - - if (not oversizedGen2(c)) { - desired *= 2; - } - - if (desired < InitialGen2CapacityInBytes / BytesPerWord) { - desired = InitialGen2CapacityInBytes / BytesPerWord; - } - - new (&(c->nextGen2)) Segment( - c, - &(c->nextHeapMap), - desired, - minimum, - static_cast(c->limit / BytesPerWord) - - (static_cast(c->count / BytesPerWord) - - c->gen2.footprint(c->gen2.capacity()) - - c->gen1.footprint(c->gen1.capacity()) + c->pendingAllocation)); - - if (Verbose2) { - fprintf(stderr, - "init nextGen2 to %d bytes\n", - c->nextGen2.capacity() * BytesPerWord); - } -} - -inline bool fresh(Context* c, void* o) -{ - return c->nextGen1.contains(o) or c->nextGen2.contains(o) - or (c->gen2.contains(o) and c->gen2.indexOf(o) >= c->gen2Base); -} - -inline bool wasCollected(Context* c, void* o) -{ - return o and (not fresh(c, o)) and fresh(c, get(o, 0)); -} - -inline void* follow(Context* c UNUSED, void* o) -{ - assertT(c, wasCollected(c, o)); - return fieldAtOffset(o, 0); -} - -inline void*& parent(Context* c UNUSED, void* o) -{ - assertT(c, wasCollected(c, o)); - return fieldAtOffset(o, BytesPerWord); -} - -inline uintptr_t* bitset(Context* c UNUSED, void* o) -{ - assertT(c, wasCollected(c, o)); - return &fieldAtOffset(o, BytesPerWord * 2); -} - -void free(Context* c, Fixie** fixies, bool resetImmortal) -{ - for (Fixie** p = fixies; *p;) { - Fixie* f = *p; - - if (f->immortal()) { - if (resetImmortal) { - if (DebugFixies) { - fprintf(stderr, "reset immortal fixie %p\n", f); - } - *p = f->next; - memset(f->mask(), 0, Fixie::maskSize(f->size, f->hasMask())); - f->next = 0; - f->handle = 0; - f->marked(false); - f->dirty(false); - } else { - p = &(f->next); - } - } else { - *p = f->next; - if (DebugFixies) { - fprintf(stderr, "free fixie %p\n", f); - } - free(c, f, f->totalSize()); - } - } -} - -void kill(Fixie* fixies) -{ - for (Fixie* f = fixies; f; f = f->next) { - if (!f->immortal()) { - f->dead(true); - } - } -} - -void killFixies(Context* c) -{ - assertT(c, c->markedFixies == 0); - - if (c->mode == Heap::MajorCollection) { - kill(c->tenuredFixies); - kill(c->dirtyTenuredFixies); - } - kill(c->fixies); -} - -void sweepFixies(Context* c) -{ - assertT(c, c->markedFixies == 0); - - if (c->mode == Heap::MajorCollection) { - free(c, &(c->tenuredFixies), true); - free(c, &(c->dirtyTenuredFixies), true); - - c->tenuredFixieFootprint = 0; - } - free(c, &(c->fixies)); - - c->untenuredFixieFootprint = 0; - - while (c->visitedFixies) { - Fixie* f = c->visitedFixies; - f->remove(c); - - if (not f->immortal()) { - ++f->age; - if (f->age > FixieTenureThreshold) { - f->age = FixieTenureThreshold; - } else if (static_cast(f->age + 1) == FixieTenureThreshold) { - c->fixieTenureFootprint += f->totalSize(); - } - } - - if (f->age >= FixieTenureThreshold) { - if (DebugFixies) { - fprintf(stderr, "tenure fixie %p (dirty: %d)\n", f, f->dirty()); - } - - if (not f->immortal()) { - c->tenuredFixieFootprint += f->totalSize(); - } - - if (f->dirty()) { - f->add(c, &(c->dirtyTenuredFixies)); - } else { - f->add(c, &(c->tenuredFixies)); - } - } else { - c->untenuredFixieFootprint += f->totalSize(); - - f->add(c, &(c->fixies)); - } - - f->marked(false); - } - - c->tenuredFixieCeiling - = max(c->tenuredFixieFootprint * 2, InitialTenuredFixieCeilingInBytes); -} - -inline void* copyTo(Context* c, Segment* s, void* o, unsigned size) -{ - assertT(c, s->remaining() >= size); - void* dst = s->allocate(size); - c->client->copy(o, dst); - return dst; -} - -bool immortalHeapContains(Context* c, void* p) -{ - return p < c->immortalHeapEnd and p >= c->immortalHeapStart; -} - -void* copy2(Context* c, void* o) -{ - unsigned size = c->client->copiedSizeInWords(o); - - if (c->gen2.contains(o)) { - assertT(c, c->mode == Heap::MajorCollection); - - return copyTo(c, &(c->nextGen2), o, size); - } else if (c->gen1.contains(o)) { - unsigned age = c->ageMap.get(o); - if (age == TenureThreshold) { - if (c->mode == Heap::MinorCollection) { - assertT(c, c->gen2.remaining() >= size); - - if (c->gen2Base == Top) { - c->gen2Base = c->gen2.position(); - } - - return copyTo(c, &(c->gen2), o, size); - } else { - return copyTo(c, &(c->nextGen2), o, size); - } - } else { - o = copyTo(c, &(c->nextGen1), o, size); - - c->nextAgeMap.setOnly(o, age + 1); - if (age + 1 == TenureThreshold) { - c->tenureFootprint += size; - } - - return o; - } - } else { - assertT(c, not c->nextGen1.contains(o)); - assertT(c, not c->nextGen2.contains(o)); - assertT(c, not immortalHeapContains(c, o)); - - o = copyTo(c, &(c->nextGen1), o, size); - - c->nextAgeMap.clear(o); - - return o; - } -} - -void* copy(Context* c, void* o) -{ - void* r = copy2(c, o); - - if (Debug) { - fprintf(stderr, - "copy %p (%s) to %p (%s)\n", - o, - segment(c, o), - r, - segment(c, r)); - } - - // leave a pointer to the copy in the original - fieldAtOffset(o, 0) = r; - - return r; -} - -void* update3(Context* c, void* o, bool* needsVisit) -{ - if (c->client->isFixed(o)) { - Fixie* f = fixie(o); - if ((not f->marked()) and (c->mode == Heap::MajorCollection - or f->age < FixieTenureThreshold)) { - if (DebugFixies) { - fprintf(stderr, "mark fixie %p\n", f); - } - f->marked(true); - f->dead(false); - f->move(c, &(c->markedFixies)); - } - *needsVisit = false; - return o; - } else if (immortalHeapContains(c, o)) { - *needsVisit = false; - return o; - } else if (wasCollected(c, o)) { - *needsVisit = false; - return follow(c, o); - } else { - *needsVisit = true; - return copy(c, o); - } -} - -void* update2(Context* c, void* o, bool* needsVisit) -{ - if (c->mode == Heap::MinorCollection and c->gen2.contains(o)) { - *needsVisit = false; - return o; - } - - return update3(c, o, needsVisit); -} - -void markDirty(Context* c, Fixie* f) -{ - if (not f->dirty()) { -#ifdef USE_ATOMIC_OPERATIONS - ACQUIRE(c->lock); -#endif - - if (not f->dirty()) { - f->dirty(true); - f->move(c, &(c->dirtyTenuredFixies)); - } - } -} - -void markClean(Context* c, Fixie* f) -{ - if (f->dirty()) { - f->dirty(false); - if (f->immortal()) { - f->remove(c); - } else { - f->move(c, &(c->tenuredFixies)); - } - } -} - -void updateHeapMap(Context* c, - void* p, - void* target, - unsigned offset, - void* result) -{ - Segment* seg; - Segment::Map* map; - - if (c->mode == Heap::MinorCollection) { - seg = &(c->gen2); - map = &(c->heapMap); - } else { - seg = &(c->nextGen2); - map = &(c->nextHeapMap); - } - - if (not(immortalHeapContains(c, result) - or (c->client->isFixed(result) - and fixie(result)->age >= FixieTenureThreshold) - or seg->contains(result))) { - if (target and c->client->isFixed(target)) { - Fixie* f = fixie(target); - assertT(c, offset == 0 or f->hasMask()); - - if (static_cast(f->age + 1) >= FixieTenureThreshold) { - if (DebugFixies) { - fprintf(stderr, - "dirty fixie %p at %d (%p): %p\n", - f, - offset, - f->body() + offset, - result); - } - - f->dirty(true); - markBit(f->mask(), offset); - } - } else if (seg->contains(p)) { - if (Debug) { - fprintf(stderr, - "mark %p (%s) at %p (%s)\n", - result, - segment(c, result), - p, - segment(c, p)); - } - - map->set(p); - } - } -} - -void* update(Context* c, - void** p, - void* target, - unsigned offset, - bool* needsVisit) -{ - if (maskAlignedPointer(*p) == 0) { - *needsVisit = false; - return 0; - } - - void* result = update2(c, maskAlignedPointer(*p), needsVisit); - - if (result) { - updateHeapMap(c, p, target, offset, result); - } - - return result; -} - -const uintptr_t BitsetExtensionBit - = (static_cast(1) << (BitsPerWord - 1)); - -void bitsetInit(uintptr_t* p) -{ - memset(p, 0, BytesPerWord); -} - -void bitsetClear(uintptr_t* p, unsigned start, unsigned end) -{ - if (end < BitsPerWord - 1) { - // do nothing - } else if (start < BitsPerWord - 1) { - memset(p + 1, 0, (wordOf(end + (BitsPerWord * 2) + 1)) * BytesPerWord); - } else { - unsigned startWord = wordOf(start + (BitsPerWord * 2) + 1); - unsigned endWord = wordOf(end + (BitsPerWord * 2) + 1); - if (endWord > startWord) { - memset(p + startWord + 1, 0, (endWord - startWord) * BytesPerWord); - } - } -} - -void bitsetSet(uintptr_t* p, unsigned i, bool v) -{ - if (i >= BitsPerWord - 1) { - i += (BitsPerWord * 2) + 1; - if (v) { - p[0] |= BitsetExtensionBit; - if (p[2] <= wordOf(i) - 3) - p[2] = wordOf(i) - 2; - } - } - - if (v) { - markBit(p, i); - } else { - clearBit(p, i); - } -} - -bool bitsetHasMore(uintptr_t* p) -{ - switch (*p) { - case 0: - return false; - - case BitsetExtensionBit: { - uintptr_t length = p[2]; - uintptr_t word = wordOf(p[1]); - for (; word < length; ++word) { - if (p[word + 3]) { - p[1] = indexOf(word, 0); - return true; - } - } - p[1] = indexOf(word, 0); - return false; - } - - default: - return true; - } -} - -unsigned bitsetNext(Context* c, uintptr_t* p) -{ - bool more UNUSED = bitsetHasMore(p); - assertT(c, more); - - switch (*p) { - case 0: - abort(c); - - case BitsetExtensionBit: { - uintptr_t i = p[1]; - uintptr_t word = wordOf(i); - assertT(c, word < p[2]); - for (uintptr_t bit = bitOf(i); bit < BitsPerWord; ++bit) { - if (p[word + 3] & (static_cast(1) << bit)) { - p[1] = indexOf(word, bit) + 1; - bitsetSet(p, p[1] + BitsPerWord - 2, false); - return p[1] + BitsPerWord - 2; - } - } - abort(c); - } - - default: { - for (unsigned i = 0; i < BitsPerWord - 1; ++i) { - if (*p & (static_cast(1) << i)) { - bitsetSet(p, i, false); - return i; - } - } - abort(c); - } - } -} - -void collect(Context* c, void** p, void* target, unsigned offset) -{ - void* original = maskAlignedPointer(*p); - void* parent_ = 0; - - if (Debug) { - fprintf(stderr, - "update %p (%s) at %p (%s)\n", - maskAlignedPointer(*p), - segment(c, *p), - p, - segment(c, p)); - } - - bool needsVisit; - local::set(p, update(c, maskAlignedPointer(p), target, offset, &needsVisit)); - - if (Debug) { - fprintf(stderr, - " result: %p (%s) (visit? %d)\n", - maskAlignedPointer(*p), - segment(c, *p), - needsVisit); - } - - if (not needsVisit) - return; - -visit : { - void* copy = follow(c, original); - - class Walker : public Heap::Walker { - public: - Walker(Context* c, void* copy, uintptr_t* bitset) - : c(c), - copy(copy), - bitset(bitset), - first(0), - second(0), - last(0), - visits(0), - total(0) - { - } - - virtual bool visit(unsigned offset) - { - if (Debug) { - fprintf(stderr, - " update %p (%s) at %p - offset %d from %p (%s)\n", - get(copy, offset), - segment(c, get(copy, offset)), - getp(copy, offset), - offset, - copy, - segment(c, copy)); - } - - bool needsVisit; - void* childCopy - = update(c, getp(copy, offset), copy, offset, &needsVisit); - - if (Debug) { - fprintf(stderr, - " result: %p (%s) (visit? %d)\n", - childCopy, - segment(c, childCopy), - needsVisit); - } - - ++total; - - if (total == 3) { - bitsetInit(bitset); - } - - if (needsVisit) { - ++visits; - - if (visits == 1) { - first = offset; - } else if (visits == 2) { - second = offset; - } - } else { - local::set(copy, offset, childCopy); - } - - if (visits > 1 and total > 2 and (second or needsVisit)) { - bitsetClear(bitset, last, offset); - last = offset; - - if (second) { - bitsetSet(bitset, second, true); - second = 0; - } - - if (needsVisit) { - bitsetSet(bitset, offset, true); - } - } - - return true; - } - - Context* c; - void* copy; - uintptr_t* bitset; - unsigned first; - unsigned second; - unsigned last; - unsigned visits; - unsigned total; - } walker(c, copy, bitset(c, original)); - - if (Debug) { - fprintf(stderr, "walk %p (%s)\n", copy, segment(c, copy)); - } - - c->client->walk(copy, &walker); - - if (walker.visits) { - // descend - if (walker.visits > 1) { - parent(c, original) = parent_; - parent_ = original; - } - - original = get(copy, walker.first); - local::set(copy, walker.first, follow(c, original)); - goto visit; - } else { - // ascend - original = parent_; - } -} - - if (original) { - void* copy = follow(c, original); - - class Walker : public Heap::Walker { - public: - Walker(Context* c, uintptr_t* bitset) - : c(c), bitset(bitset), next(0), total(0) - { - } - - virtual bool visit(unsigned offset) - { - switch (++total) { - case 1: - return true; - - case 2: - next = offset; - return true; - - case 3: - next = bitsetNext(c, bitset); - return false; - - default: - abort(c); - } - } - - Context* c; - uintptr_t* bitset; - unsigned next; - unsigned total; - } walker(c, bitset(c, original)); - - if (Debug) { - fprintf(stderr, "scan %p\n", copy); - } - - c->client->walk(copy, &walker); - - assertT(c, walker.total > 1); - - if (walker.total == 3 and bitsetHasMore(bitset(c, original))) { - parent_ = original; - } else { - parent_ = parent(c, original); - } - - if (Debug) { - fprintf(stderr, - " next is %p (%s) at %p - offset %d from %p (%s)\n", - get(copy, walker.next), - segment(c, get(copy, walker.next)), - getp(copy, walker.next), - walker.next, - copy, - segment(c, copy)); - } - - original = get(copy, walker.next); - local::set(copy, walker.next, follow(c, original)); - goto visit; - } else { - return; - } -} - -void collect(Context* c, void** p) -{ - collect(c, p, 0, 0); -} - -void collect(Context* c, void* target, unsigned offset) -{ - collect(c, getp(target, offset), target, offset); -} - -void visitDirtyFixies(Context* c, Fixie** p) -{ - while (*p) { - Fixie* f = *p; - - bool wasDirty UNUSED = false; - bool clean = true; - uintptr_t* mask = f->mask(); - - unsigned word = 0; - unsigned bit = 0; - unsigned wordLimit = wordOf(f->size); - unsigned bitLimit = bitOf(f->size); - - if (DebugFixies) { - fprintf(stderr, "clean fixie %p\n", f); - } - - for (; word <= wordLimit and (word < wordLimit or bit < bitLimit); ++word) { - if (mask[word]) { - for (; bit < BitsPerWord and (word < wordLimit or bit < bitLimit); - ++bit) { - unsigned index = indexOf(word, bit); - - if (getBit(mask, index)) { - wasDirty = true; - - clearBit(mask, index); - - if (DebugFixies) { - fprintf(stderr, - "clean fixie %p at %d (%p)\n", - f, - index, - f->body() + index); - } - - collect(c, f->body(), index); - - if (getBit(mask, index)) { - clean = false; - } - } - } - bit = 0; - } - } - - if (DebugFixies) { - fprintf(stderr, "done cleaning fixie %p\n", f); - } - - assertT(c, wasDirty); - - if (clean) { - markClean(c, f); - } else { - p = &(f->next); - } - } -} - -void visitMarkedFixies(Context* c) -{ - while (c->markedFixies) { - Fixie* f = c->markedFixies; - f->remove(c); - - if (DebugFixies) { - fprintf(stderr, "visit fixie %p\n", f); - } - - class Walker : public Heap::Walker { - public: - Walker(Context* c, void** p) : c(c), p(p) - { - } - - virtual bool visit(unsigned offset) - { - local::collect(c, p, offset); - return true; - } - - Context* c; - void** p; - } w(c, f->body()); - - c->client->walk(f->body(), &w); - - f->move(c, &(c->visitedFixies)); - } -} - -void collect(Context* c, - Segment::Map* map, - unsigned start, - unsigned end, - bool* dirty, - bool expectDirty UNUSED) -{ - bool wasDirty UNUSED = false; - for (Segment::Map::Iterator it(map, start, end); it.hasMore();) { - wasDirty = true; - if (map->child) { - assertT(c, map->scale > 1); - unsigned s = it.next(); - unsigned e = s + map->scale; - - map->clearOnly(s); - bool childDirty = false; - collect(c, map->child, s, e, &childDirty, true); - if (childDirty) { - map->setOnly(s); - *dirty = true; - } - } else { - assertT(c, map->scale == 1); - void** p = reinterpret_cast(map->segment->get(it.next())); - - map->clearOnly(p); - if (c->nextGen1.contains(*p)) { - map->setOnly(p); - *dirty = true; - } else { - collect(c, p); - - if (not c->gen2.contains(*p)) { - map->setOnly(p); - *dirty = true; - } - } - } - } - - assertT(c, wasDirty or not expectDirty); -} - -void collect2(Context* c) -{ - c->gen2Base = Top; - c->tenureFootprint = 0; - c->fixieTenureFootprint = 0; - c->gen1Padding = 0; - c->tenurePadding = 0; - - if (c->mode == Heap::MajorCollection) { - c->gen2Padding = 0; - } - - if (c->mode == Heap::MinorCollection and c->gen2.position()) { - unsigned start = 0; - unsigned end = start + c->gen2.position(); - bool dirty; - collect(c, &(c->heapMap), start, end, &dirty, false); - } - - if (c->mode == Heap::MinorCollection) { - visitDirtyFixies(c, &(c->dirtyTenuredFixies)); - } - - class Visitor : public Heap::Visitor { - public: - Visitor(Context* c) : c(c) - { - } - - virtual void visit(void* p) - { - local::collect(c, static_cast(p)); - visitMarkedFixies(c); - } - - Context* c; - } v(c); - - c->client->visitRoots(&v); -} - -bool limitExceeded(Context* c, int pendingAllocation) -{ - unsigned count = c->count + pendingAllocation - - (c->gen2.remaining() * BytesPerWord); - - if (Verbose) { - if (count > c->limit) { - if (not c->limitWasExceeded) { - c->limitWasExceeded = true; - fprintf(stderr, "heap limit %d exceeded: %d\n", c->limit, count); - } - } else if (c->limitWasExceeded) { - c->limitWasExceeded = false; - fprintf( - stderr, "heap limit %d no longer exceeded: %d\n", c->limit, count); - } - } - - return count > c->limit; -} - -void collect(Context* c) -{ - if (limitExceeded(c, c->pendingAllocation) or oversizedGen2(c) - or c->tenureFootprint + c->tenurePadding > c->gen2.remaining() - or c->fixieTenureFootprint + c->tenuredFixieFootprint - > c->tenuredFixieCeiling) { - if (Verbose) { - if (limitExceeded(c, c->pendingAllocation)) { - fprintf(stderr, "low memory causes "); - } else if (oversizedGen2(c)) { - fprintf(stderr, "oversized gen2 causes "); - } else if (c->tenureFootprint + c->tenurePadding > c->gen2.remaining()) { - fprintf(stderr, "undersized gen2 causes "); - } else { - fprintf(stderr, "fixie ceiling causes "); - } - } - - c->mode = Heap::MajorCollection; - } - - int64_t then; - if (Verbose) { - if (c->mode == Heap::MajorCollection) { - fprintf(stderr, "major collection\n"); - } else { - fprintf(stderr, "minor collection\n"); - } - - then = c->system->now(); - } - - initNextGen1(c); - - if (c->mode == Heap::MajorCollection) { - initNextGen2(c); - } - - collect2(c); - - c->gen1.replaceWith(&(c->nextGen1)); - if (c->mode == Heap::MajorCollection) { - c->gen2.replaceWith(&(c->nextGen2)); - } - - sweepFixies(c); - - if (Verbose) { - int64_t now = c->system->now(); - int64_t collection = now - then; - int64_t run = then - c->lastCollectionTime; - c->totalCollectionTime += collection; - c->totalTime += collection + run; - c->lastCollectionTime = now; - - fprintf(stderr, - " - collect: %4dms; " - "total: %4dms; " - "run: %4dms; " - "total: %4dms\n", - static_cast(collection), - static_cast(c->totalCollectionTime), - static_cast(run), - static_cast(c->totalTime - c->totalCollectionTime)); - - fprintf(stderr, - " - gen1: %8d/%8d bytes\n", - c->gen1.position() * BytesPerWord, - c->gen1.capacity() * BytesPerWord); - - fprintf(stderr, - " - gen2: %8d/%8d bytes\n", - c->gen2.position() * BytesPerWord, - c->gen2.capacity() * BytesPerWord); - - fprintf(stderr, - " - untenured fixies: %8d bytes\n", - c->untenuredFixieFootprint); - - fprintf(stderr, - " - tenured fixies: %8d bytes\n", - c->tenuredFixieFootprint); - } -} - -void* allocate(Context* c, size_t size, bool limit) -{ - ACQUIRE(c->lock); - - if (DebugAllocation) { - size = pad(size) + 2 * BytesPerWord; - } - - if ((not limit) or size + c->count < c->limit) { - void* p = c->system->tryAllocate(size); - if (p) { - c->count += size; - - if (DebugAllocation) { - static_cast(p)[0] = 0x22377322; - static_cast(p)[(size / BytesPerWord) - 1] = 0x22377322; - return static_cast(p) + 1; - } else { - return p; - } - } - } - return 0; -} - -void* tryAllocate(Context* c, size_t size) -{ - return allocate(c, size, true); -} - -void* allocate(Context* c, size_t size) -{ - void* p = allocate(c, size, false); - expect(c->system, p); - - return p; -} - -void free(Context* c, const void* p, size_t size) -{ - ACQUIRE(c->lock); - - if (DebugAllocation) { - size = pad(size) + 2 * BytesPerWord; - - memset(const_cast(p), 0xFE, size - (2 * BytesPerWord)); - - p = static_cast(p) - 1; - - expect(c->system, static_cast(p)[0] == 0x22377322); - - expect(c->system, - static_cast(p)[(size / BytesPerWord) - 1] - == 0x22377322); - } - - expect(c->system, c->count >= size); - - c->system->free(p); - c->count -= size; -} - -void free_(Context* c, const void* p, size_t size) -{ - free(c, p, size); -} - -class MyHeap : public Heap { - public: - MyHeap(System* system, unsigned limit) : c(system, limit) - { - } - - virtual void setClient(Heap::Client* client) - { - assertT(&c, c.client == 0); - c.client = client; - } - - virtual void setImmortalHeap(uintptr_t* start, unsigned sizeInWords) - { - c.immortalHeapStart = start; - c.immortalHeapEnd = start + sizeInWords; - } - - virtual unsigned remaining() - { - return c.limit - c.count; - } - - virtual unsigned limit() - { - return c.limit; - } - - virtual bool limitExceeded(int pendingAllocation = 0) - { - return local::limitExceeded(&c, pendingAllocation); - } - - virtual void* tryAllocate(size_t size) - { - return local::tryAllocate(&c, size); - } - - virtual void* allocate(size_t size) - { - return local::allocate(&c, size); - } - - virtual void free(const void* p, size_t size) - { - free_(&c, p, size); - } - - virtual void collect(CollectionType type, - unsigned incomingFootprint, - int pendingAllocation) - { - c.mode = type; - c.incomingFootprint = incomingFootprint; - c.pendingAllocation = pendingAllocation; - - local::collect(&c); - } - - virtual unsigned fixedFootprint(unsigned sizeInWords, bool objectMask) - { - return Fixie::totalSize(sizeInWords, objectMask); - } - - void* allocateFixed(Alloc* allocator, - unsigned sizeInWords, - bool objectMask, - Fixie** handle, - bool immortal) - { - expect(&c, not limitExceeded()); - - unsigned total = Fixie::totalSize(sizeInWords, objectMask); - void* p = allocator->allocate(total); - - expect(&c, not limitExceeded()); - - return (new (p) Fixie(&c, sizeInWords, objectMask, handle, immortal)) - ->body(); - } - - virtual void* allocateFixed(Alloc* allocator, - unsigned sizeInWords, - bool objectMask) - { - return allocateFixed( - allocator, sizeInWords, objectMask, &(c.fixies), false); - } - - virtual void* allocateImmortalFixed(Alloc* allocator, - unsigned sizeInWords, - bool objectMask) - { - return allocateFixed(allocator, sizeInWords, objectMask, 0, true); - } - - bool needsMark(void* p) - { - assertT(&c, c.client->isFixed(p) or (not immortalHeapContains(&c, p))); - - if (c.client->isFixed(p)) { - return fixie(p)->age >= FixieTenureThreshold; - } else { - return c.gen2.contains(p) or c.nextGen2.contains(p); - } - } - - bool targetNeedsMark(void* target) - { - return target and not c.gen2.contains(target) - and not c.nextGen2.contains(target) - and not immortalHeapContains(&c, target) - and not(c.client->isFixed(target) - and fixie(target)->age >= FixieTenureThreshold); - } - - virtual void mark(void* p, unsigned offset, unsigned count) - { - if (needsMark(p)) { -#ifndef USE_ATOMIC_OPERATIONS - ACQUIRE(c.lock); -#endif - - if (c.client->isFixed(p)) { - Fixie* f = fixie(p); - assertT(&c, offset == 0 or f->hasMask()); - - bool dirty = false; - for (unsigned i = 0; i < count; ++i) { - void** target = static_cast(p) + offset + i; - if (targetNeedsMark(maskAlignedPointer(*target))) { - if (DebugFixies) { - fprintf(stderr, - "dirty fixie %p at %d (%p): %p\n", - f, - offset, - f->body() + offset, - maskAlignedPointer(*target)); - } - - dirty = true; -#ifdef USE_ATOMIC_OPERATIONS - markBitAtomic(f->mask(), offset + i); -#else - markBit(f->mask(), offset + i); -#endif - assertT(&c, getBit(f->mask(), offset + i)); - } - } - - if (dirty) - markDirty(&c, f); - } else { - Segment::Map* map; - if (c.gen2.contains(p)) { - map = &(c.heapMap); - } else { - assertT(&c, c.nextGen2.contains(p)); - map = &(c.nextHeapMap); - } - - for (unsigned i = 0; i < count; ++i) { - void** target = static_cast(p) + offset + i; - if (targetNeedsMark(maskAlignedPointer(*target))) { -#ifdef USE_ATOMIC_OPERATIONS - map->markAtomic(target); -#else - map->set(target); -#endif - } - } - } - } - } - - virtual void pad(void* p) - { - if (c.gen1.contains(p)) { - if (c.ageMap.get(p) == TenureThreshold) { - ++c.tenurePadding; - } else { - ++c.gen1Padding; - } - } else if (c.gen2.contains(p)) { - ++c.gen2Padding; - } else { - ++c.gen1Padding; - } - } - - virtual void* follow(void* p) - { - if (p == 0 or c.client->isFixed(p)) { - return p; - } else if (wasCollected(&c, p)) { - if (Debug) { - fprintf(stderr, - "follow %p (%s) to %p (%s)\n", - p, - segment(&c, p), - local::follow(&c, p), - segment(&c, local::follow(&c, p))); - } - - return local::follow(&c, p); - } else { - return p; - } - } - - virtual void postVisit() - { - killFixies(&c); - } - - virtual Status status(void* p) - { - p = maskAlignedPointer(p); - - if (p == 0) { - return Null; - } else if (c.client->isFixed(p)) { - Fixie* f = fixie(p); - return f->dead() ? Unreachable : (static_cast(f->age + 1) - < FixieTenureThreshold - ? Reachable - : Tenured); - } else if (c.nextGen1.contains(p)) { - return Reachable; - } else if (c.nextGen2.contains(p) or immortalHeapContains(&c, p) - or (c.gen2.contains(p) - and (c.mode == Heap::MinorCollection - or c.gen2.indexOf(p) >= c.gen2Base))) { - return Tenured; - } else if (wasCollected(&c, p)) { - return Reachable; - } else { - return Unreachable; - } - } - - virtual CollectionType collectionType() - { - return c.mode; - } - - virtual void disposeFixies() - { - c.disposeFixies(); - } - - virtual void dispose() - { - c.dispose(); - assertT(&c, c.count == 0); - c.system->free(this); - } - - Context c; -}; - -} // namespace local - -} // namespace - -namespace vm { - -Heap* makeHeap(System* system, unsigned limit) -{ - return new (system->tryAllocate(sizeof(local::MyHeap))) - local::MyHeap(system, limit); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/heapdump.cpp b/sgx-jvm/avian/src/heapdump.cpp deleted file mode 100644 index 813d8cfd84..0000000000 --- a/sgx-jvm/avian/src/heapdump.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/machine.h" -#include "avian/heapwalk.h" - -using namespace vm; - -namespace { - -namespace local { - -enum { Root, Size, ClassName, Push, Pop }; - -void write1(FILE* out, uint8_t v) -{ - size_t n UNUSED = fwrite(&v, 1, 1, out); -} - -void write4(FILE* out, uint32_t v) -{ - uint8_t b[] = {static_cast(v >> 24), - static_cast((v >> 16) & 0xFF), - static_cast((v >> 8) & 0xFF), - static_cast(v & 0xFF)}; - - size_t n UNUSED = fwrite(b, 4, 1, out); -} - -void writeString(FILE* out, int8_t* p, unsigned size) -{ - write4(out, size); - size_t n UNUSED = fwrite(p, size, 1, out); -} - -unsigned objectSize(Thread* t, object o) -{ - return extendedSize(t, o, baseSize(t, o, objectClass(t, o))); -} - -} // namespace local - -} // namespace - -namespace vm { - -void dumpHeap(Thread* t, FILE* out) -{ - class Visitor : public HeapVisitor { - public: - Visitor(Thread* t, FILE* out) : t(t), out(out), nextNumber(1) - { - } - - virtual void root() - { - write1(out, local::Root); - } - - virtual unsigned visitNew(object p) - { - if (p) { - unsigned number = nextNumber++; - local::write4(out, number); - - local::write1(out, local::Size); - local::write4(out, local::objectSize(t, p)); - - if (objectClass(t, p) == type(t, GcClass::Type)) { - GcByteArray* name = static_cast(p)->name(); - if (name) { - local::write1(out, local::ClassName); - local::writeString(out, name->body().begin(), name->length() - 1); - } - } - - return number; - } else { - return 0; - } - } - - virtual void visitOld(object, unsigned number) - { - local::write4(out, number); - } - - virtual void push(object, unsigned, unsigned) - { - local::write1(out, local::Push); - } - - virtual void pop() - { - local::write1(out, local::Pop); - } - - Thread* t; - FILE* out; - unsigned nextNumber; - } visitor(t, out); - - HeapWalker* w = makeHeapWalker(t, &visitor); - w->visitAllRoots(); - w->dispose(); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/heapwalk.cpp b/sgx-jvm/avian/src/heapwalk.cpp deleted file mode 100644 index 24efa50246..0000000000 --- a/sgx-jvm/avian/src/heapwalk.cpp +++ /dev/null @@ -1,335 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/machine.h" -#include "avian/heapwalk.h" - -using namespace vm; - -namespace { - -namespace local { - -const uintptr_t PointerShift = log(BytesPerWord); - -class Context; - -class Set : public HeapMap { - public: - class Entry { - public: - object value; - uint32_t number; - int next; - }; - - static unsigned footprint(unsigned capacity) - { - return sizeof(Set) + pad(sizeof(int) * capacity) - + pad(sizeof(Set::Entry) * capacity); - } - - Set(Context* context, unsigned capacity) - : context(context), - index(reinterpret_cast(reinterpret_cast(this) - + sizeof(Set))), - entries(reinterpret_cast(reinterpret_cast(index) - + pad(sizeof(int) * capacity))), - size(0), - capacity(capacity) - { - } - - virtual int find(object value); - - virtual void dispose(); - - Context* context; - int* index; - Entry* entries; - unsigned size; - unsigned capacity; -}; - -class Stack { - public: - class Entry { - public: - object value; - int offset; - }; - - static const unsigned Capacity = 4096; - - Stack(Stack* next) : next(next), entryCount(0) - { - } - - Stack* next; - unsigned entryCount; - Entry entries[Capacity]; -}; - -class Context { - public: - Context(Thread* thread) : thread(thread), objects(0), stack(0) - { - } - - void dispose() - { - if (objects) { - objects->dispose(); - } - - while (stack) { - Stack* dead = stack; - stack = dead->next; - thread->m->heap->free(dead, sizeof(Stack)); - } - } - - Thread* thread; - Set* objects; - Stack* stack; -}; - -void push(Context* c, object p, int offset) -{ - if (c->stack == 0 or c->stack->entryCount == Stack::Capacity) { - c->stack = new (c->thread->m->heap->allocate(sizeof(Stack))) - Stack(c->stack); - } - Stack::Entry* e = c->stack->entries + (c->stack->entryCount++); - e->value = p; - e->offset = offset; -} - -bool pop(Context* c, object* p, int* offset) -{ - if (c->stack) { - if (c->stack->entryCount == 0) { - if (c->stack->next) { - Stack* dead = c->stack; - c->stack = dead->next; - c->thread->m->heap->free(dead, sizeof(Stack)); - } else { - return false; - } - } - Stack::Entry* e = c->stack->entries + (--c->stack->entryCount); - *p = e->value; - *offset = e->offset; - return true; - } else { - return false; - } -} - -unsigned hash(object p, unsigned capacity) -{ - return (reinterpret_cast(p) >> PointerShift) & (capacity - 1); -} - -Set::Entry* find(Context* c, object p) -{ - if (c->objects == 0) - return 0; - - for (int i = c->objects->index[hash(p, c->objects->capacity)]; i >= 0;) { - Set::Entry* e = c->objects->entries + i; - if (e->value == p) { - return e; - } - i = e->next; - } - - return 0; -} - -int Set::find(object value) -{ - Set::Entry* e = local::find(context, value); - if (e) { - return e->number; - } else { - return -1; - } -} - -void Set::dispose() -{ - context->thread->m->heap->free(this, footprint(capacity)); -} - -Set::Entry* add(Context* c UNUSED, Set* set, object p, uint32_t number) -{ - assertT(c->thread, set->size < set->capacity); - - unsigned index = hash(p, set->capacity); - - int offset = set->size++; - Set::Entry* e = set->entries + offset; - e->value = p; - e->number = number; - e->next = set->index[index]; - set->index[index] = offset; - return e; -} - -Set::Entry* add(Context* c, object p) -{ - if (c->objects == 0 or c->objects->size == c->objects->capacity) { - unsigned capacity; - if (c->objects) { - capacity = c->objects->capacity * 2; - } else { - capacity = 4096; // must be power of two - } - - Set* set = new (c->thread->m->heap->allocate(Set::footprint(capacity))) - Set(c, capacity); - - memset(set->index, 0xFF, sizeof(int) * capacity); - - if (c->objects) { - for (unsigned i = 0; i < c->objects->capacity; ++i) { - for (int j = c->objects->index[i]; j >= 0;) { - Set::Entry* e = c->objects->entries + j; - add(c, set, e->value, e->number); - j = e->next; - } - } - - c->thread->m->heap->free(c->objects, - Set::footprint(c->objects->capacity)); - } - - c->objects = set; - } - - return add(c, c->objects, p, 0); -} - -inline object get(object o, unsigned offsetInWords) -{ - return static_cast(maskAlignedPointer( - fieldAtOffset(o, offsetInWords * BytesPerWord))); -} - -unsigned walk(Context* c, HeapVisitor* v, object p) -{ - Thread* t = c->thread; - object root = p; - int nextChildOffset; - - v->root(); - -visit : { - Set::Entry* e = find(c, p); - if (e) { - v->visitOld(p, e->number); - } else { - e = add(c, p); - e->number = v->visitNew(p); - - nextChildOffset = walkNext(t, p, -1); - if (nextChildOffset != -1) { - goto children; - } - } -} - - goto pop; - -children : { - v->push(p, find(c, p)->number, nextChildOffset); - push(c, p, nextChildOffset); - p = get(p, nextChildOffset); - goto visit; -} - -pop : { - if (pop(c, &p, &nextChildOffset)) { - v->pop(); - nextChildOffset = walkNext(t, p, nextChildOffset); - if (nextChildOffset >= 0) { - goto children; - } else { - goto pop; - } - } -} - - return find(c, root)->number; -} - -class MyHeapWalker : public HeapWalker { - public: - MyHeapWalker(Thread* t, HeapVisitor* v) : context(t), visitor(v) - { - add(&context, 0)->number = v->visitNew(0); - } - - virtual unsigned visitRoot(object root) - { - return walk(&context, visitor, root); - } - - virtual void visitAllRoots() - { - class Visitor : public Heap::Visitor { - public: - Visitor(Context* c, HeapVisitor* v) : c(c), v(v) - { - } - - virtual void visit(void* p) - { - walk(c, - v, - static_cast(maskAlignedPointer(*static_cast(p)))); - } - - Context* c; - HeapVisitor* v; - } v(&context, visitor); - - visitRoots(context.thread->m, &v); - } - - virtual HeapMap* map() - { - return context.objects; - } - - virtual void dispose() - { - context.dispose(); - context.thread->m->heap->free(this, sizeof(MyHeapWalker)); - } - - Context context; - HeapVisitor* visitor; -}; - -} // namespace local - -} // namespace - -namespace vm { - -HeapWalker* makeHeapWalker(Thread* t, HeapVisitor* v) -{ - return new (t->m->heap->allocate(sizeof(local::MyHeapWalker))) - local::MyHeapWalker(t, v); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/i386.S b/sgx-jvm/avian/src/i386.S deleted file mode 100644 index 47acd677e3..0000000000 --- a/sgx-jvm/avian/src/i386.S +++ /dev/null @@ -1,145 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/types.h" - -#define LOCAL(x) .L##x - -#if defined __APPLE__ \ - || ((defined __MINGW32__ || defined __CYGWIN32__) && ! defined __x86_64__) -# define GLOBAL(x) _##x -#else -# define GLOBAL(x) x -#endif - -.text - -#define CHECKPOINT_THREAD 4 -#define CHECKPOINT_STACK 24 -#define CHECKPOINT_BASE 28 - -.globl GLOBAL(vmNativeCall) -GLOBAL(vmNativeCall): - pushl %ebp - movl %esp,%ebp - - // 8(%ebp): function - // 12(%ebp): stack - // 16(%ebp): stackSize - // 20(%ebp): returnType - - // reserve space for arguments - movl 16(%ebp),%ecx - - subl %ecx,%esp - -//# ifdef __APPLE__ - // align to a 16 byte boundary - andl $0xFFFFFFF0,%esp -//# endif - - // copy arguments into place - movl $0,%ecx - jmp LOCAL(test) - -LOCAL(loop): - movl %ecx,%eax - movl %ecx,%edx - addl %esp,%edx - addl 12(%ebp),%eax - movl (%eax),%eax - movl %eax,(%edx) - addl $4,%ecx - -LOCAL(test): - cmpl 16(%ebp),%ecx - jb LOCAL(loop) - - // call function - call *8(%ebp) - - // handle return value based on expected type - movl 20(%ebp),%ecx - -LOCAL(void): - cmpl $VOID_TYPE,%ecx - jne LOCAL(int64) - jmp LOCAL(exit) - -LOCAL(int64): - cmpl $INT64_TYPE,%ecx - jne LOCAL(float) - jmp LOCAL(exit) - -LOCAL(float): - cmpl $FLOAT_TYPE,%ecx - jne LOCAL(double) - fstps 8(%ebp) - movl 8(%ebp),%eax - jmp LOCAL(exit) - -LOCAL(double): - cmpl $DOUBLE_TYPE,%ecx - jne LOCAL(exit) - fstpl 8(%ebp) - movl 8(%ebp),%eax - movl 12(%ebp),%edx - -LOCAL(exit): - movl %ebp,%esp - popl %ebp - ret - -.globl GLOBAL(vmJump) -GLOBAL(vmJump): - movl 4(%esp),%esi - movl 8(%esp),%ebp - movl 16(%esp),%ebx - movl 20(%esp),%eax - movl 24(%esp),%edx - movl 12(%esp),%esp - jmp *%esi - -#define VMRUN_FRAME_SIZE 24 - -.globl GLOBAL(vmRun) -GLOBAL(vmRun): - // 8(%ebp): function - // 12(%ebp): arguments - // 16(%ebp): checkpoint - pushl %ebp - movl %esp,%ebp - subl $VMRUN_FRAME_SIZE,%esp - - movl %ebx,8(%esp) - movl %esi,12(%esp) - movl %edi,16(%esp) - - movl 12(%ebp),%eax - movl %eax,4(%esp) - - movl 16(%ebp),%ecx - movl CHECKPOINT_THREAD(%ecx),%eax - movl %eax,0(%esp) - - movl %esp,CHECKPOINT_STACK(%ecx) - - call *8(%ebp) - -.globl GLOBAL(vmRun_returnAddress) -GLOBAL(vmRun_returnAddress): - - movl 8(%esp),%ebx - movl 12(%esp),%esi - movl 16(%esp),%edi - - addl $VMRUN_FRAME_SIZE,%esp - popl %ebp - ret diff --git a/sgx-jvm/avian/src/i386.masm b/sgx-jvm/avian/src/i386.masm deleted file mode 100644 index e44c82c2c5..0000000000 --- a/sgx-jvm/avian/src/i386.masm +++ /dev/null @@ -1,134 +0,0 @@ -comment # - Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. - - ORIGIN: https://github.com/gkvas/avian/tree/wince -# - -.586 -.MODEL FLAT, C - -VOID_TYPE equ 0 -INT8_TYPE equ 1 -INT16_TYPE equ 2 -INT32_TYPE equ 3 -INT64_TYPE equ 4 -FLOAT_TYPE equ 5 -DOUBLE_TYPE equ 6 -POINTER_TYPE equ 7 - -CHECKPOINT_THREAD equ 4 -CHECKPOINT_STACK equ 24 -CHECKPOINT_BASE equ 28 - -_TEXT SEGMENT - -public C vmNativeCall -vmNativeCall: - push ebp - mov ebp,esp - mov ecx,ds:dword ptr[16+ebp] - sub esp,ecx - mov ecx,0 - jmp Ltest - -Lloop: - mov eax,ecx - mov edx,ecx - add edx,esp - add eax,ds:dword ptr[12+ebp] - mov eax,ds:dword ptr[eax] - mov ds:dword ptr[edx],eax - add ecx,4 - -Ltest: - cmp ecx,ds:dword ptr[16+ebp] - jb Lloop - call dword ptr[8+ebp] - mov ecx,ds:dword ptr[20+ebp] - -Lvoid: - cmp ecx,offset VOID_TYPE - jne Lint64 - jmp Lexit - -Lint64: - cmp ecx,offset INT64_TYPE - jne Lfloat - jmp Lexit - -Lfloat: - cmp ecx,offset FLOAT_TYPE - jne Ldouble - fstp ds:dword ptr[8+ebp] - mov eax,ds:dword ptr[8+ebp] - jmp Lexit - -Ldouble: - cmp ecx,offset DOUBLE_TYPE - jne Lexit - fstp ds:qword ptr[8+ebp] - mov eax,ds:dword ptr[8+ebp] - mov edx,ds:dword ptr[12+ebp] - -Lexit: - mov esp,ebp - pop ebp - ret - -public C vmJump -vmJump: - mov esi,ds:dword ptr[4+esp] - mov ebp,ds:dword ptr[8+esp] - mov ebx,ds:dword ptr[16+esp] - mov eax,ds:dword ptr[20+esp] - mov edx,ds:dword ptr[24+esp] - mov esp,ds:dword ptr[12+esp] - jmp esi - -VMRUN_FRAME_SIZE equ 24 - -public C vmRun_ -vmRun_: - ; 8(%ebp): function - ; 12(%ebp): arguments - ; 16(%ebp): checkpoint - push ebp - mov ebp,esp - sub esp,offset VMRUN_FRAME_SIZE - - mov ds:dword ptr[8+esp],ebx - mov ds:dword ptr[12+esp],esi - mov ds:dword ptr[16+esp],edi - - mov eax,ds:dword ptr[12+ebp] - mov ds:dword ptr[4+esp],eax - - mov ecx,ds:dword ptr[16+ebp] - mov eax,ds:dword ptr[CHECKPOINT_THREAD+ecx] - mov ds:dword ptr[0+esp],eax - - mov ds:dword ptr[CHECKPOINT_STACK+ecx],esp - - call dword ptr[8+ebp] - -public C vmRun_returnAddress -vmRun_returnAddress: - - mov ebx,ds:dword ptr[8+esp] - mov esi,ds:dword ptr[12+esp] - mov edi,ds:dword ptr[16+esp] - - add esp,offset VMRUN_FRAME_SIZE - pop ebp - ret - -_TEXT ENDS -END \ No newline at end of file diff --git a/sgx-jvm/avian/src/interpret.cpp b/sgx-jvm/avian/src/interpret.cpp deleted file mode 100644 index 12ddc9e0bb..0000000000 --- a/sgx-jvm/avian/src/interpret.cpp +++ /dev/null @@ -1,3609 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/common.h" -#include -#include -#include "avian/constants.h" -#include "avian/machine.h" -#include "avian/processor.h" -#include "avian/process.h" -#include "avian/arch.h" - -#include -#include -#include - -using namespace vm; -using namespace avian::system; - -namespace local { - -const unsigned FrameBaseOffset = 0; -const unsigned FrameNextOffset = 1; -const unsigned FrameMethodOffset = 2; -const unsigned FrameIpOffset = 3; -const unsigned FrameFootprint = 4; - -class Thread : public vm::Thread { - public: - Thread(Machine* m, GcThread* javaThread, vm::Thread* parent) - : vm::Thread(m, javaThread, parent), - ip(0), - sp(0), - frame(-1), - code(0), - stackPointers(0) - { - } - - unsigned ip; - unsigned sp; - int frame; - GcCode* code; - List* stackPointers; - uintptr_t stack[0]; -}; - -inline void pushObject(Thread* t, object o) -{ - if (DebugStack) { - fprintf(stderr, "push object %p at %d\n", o, t->sp); - } - - assertT(t, t->sp + 1 < stackSizeInWords(t) / 2); - t->stack[(t->sp * 2)] = ObjectTag; - t->stack[(t->sp * 2) + 1] = reinterpret_cast(o); - ++t->sp; -} - -inline void pushInt(Thread* t, uint32_t v) -{ - if (DebugStack) { - fprintf(stderr, "push int %d at %d\n", v, t->sp); - } - - assertT(t, t->sp + 1 < stackSizeInWords(t) / 2); - t->stack[(t->sp * 2)] = IntTag; - t->stack[(t->sp * 2) + 1] = v; - ++t->sp; -} - -inline void pushFloat(Thread* t, float v) -{ - pushInt(t, floatToBits(v)); -} - -inline void pushLong(Thread* t, uint64_t v) -{ - if (DebugStack) { - fprintf(stderr, "push long %" LLD " at %d\n", v, t->sp); - } - - pushInt(t, v >> 32); - pushInt(t, v & 0xFFFFFFFF); -} - -inline void pushDouble(Thread* t, double v) -{ - uint64_t w = doubleToBits(v); - pushLong(t, w); -} - -inline object popObject(Thread* t) -{ - if (DebugStack) { - fprintf(stderr, - "pop object %p at %d\n", - reinterpret_cast(t->stack[((t->sp - 1) * 2) + 1]), - t->sp - 1); - } - - assertT(t, t->stack[(t->sp - 1) * 2] == ObjectTag); - return reinterpret_cast(t->stack[((--t->sp) * 2) + 1]); -} - -inline uint32_t popInt(Thread* t) -{ - if (DebugStack) { - fprintf(stderr, - "pop int %" LD " at %d\n", - t->stack[((t->sp - 1) * 2) + 1], - t->sp - 1); - } - - assertT(t, t->stack[(t->sp - 1) * 2] == IntTag); - return t->stack[((--t->sp) * 2) + 1]; -} - -inline float popFloat(Thread* t) -{ - return bitsToFloat(popInt(t)); -} - -inline uint64_t popLong(Thread* t) -{ - if (DebugStack) { - fprintf(stderr, - "pop long %" LLD " at %d\n", - (static_cast(t->stack[((t->sp - 2) * 2) + 1]) << 32) - | static_cast(t->stack[((t->sp - 1) * 2) + 1]), - t->sp - 2); - } - - uint64_t a = popInt(t); - uint64_t b = popInt(t); - return (b << 32) | a; -} - -inline double popDouble(Thread* t) -{ - uint64_t v = popLong(t); - return bitsToDouble(v); -} - -inline object peekObject(Thread* t, unsigned index) -{ - if (DebugStack) { - fprintf(stderr, - "peek object %p at %d\n", - reinterpret_cast(t->stack[(index * 2) + 1]), - index); - } - - assertT(t, index < stackSizeInWords(t) / 2); - assertT(t, t->stack[index * 2] == ObjectTag); - return reinterpret_cast(t->stack[(index * 2) + 1]); -} - -inline uint32_t peekInt(Thread* t, unsigned index) -{ - if (DebugStack) { - fprintf( - stderr, "peek int %" LD " at %d\n", t->stack[(index * 2) + 1], index); - } - - assertT(t, index < stackSizeInWords(t) / 2); - assertT(t, t->stack[index * 2] == IntTag); - return t->stack[(index * 2) + 1]; -} - -inline uint64_t peekLong(Thread* t, unsigned index) -{ - if (DebugStack) { - fprintf(stderr, - "peek long %" LLD " at %d\n", - (static_cast(t->stack[(index * 2) + 1]) << 32) - | static_cast(t->stack[((index + 1) * 2) + 1]), - index); - } - - return (static_cast(peekInt(t, index)) << 32) - | static_cast(peekInt(t, index + 1)); -} - -inline void pokeObject(Thread* t, unsigned index, object value) -{ - if (DebugStack) { - fprintf(stderr, "poke object %p at %d\n", value, index); - } - - t->stack[index * 2] = ObjectTag; - t->stack[(index * 2) + 1] = reinterpret_cast(value); -} - -inline void pokeInt(Thread* t, unsigned index, uint32_t value) -{ - if (DebugStack) { - fprintf(stderr, "poke int %d at %d\n", value, index); - } - - t->stack[index * 2] = IntTag; - t->stack[(index * 2) + 1] = value; -} - -inline void pokeLong(Thread* t, unsigned index, uint64_t value) -{ - if (DebugStack) { - fprintf(stderr, "poke long %" LLD " at %d\n", value, index); - } - - pokeInt(t, index, value >> 32); - pokeInt(t, index + 1, value & 0xFFFFFFFF); -} - -inline object* pushReference(Thread* t, object o) -{ - if (o) { - expect(t, t->sp + 1 < stackSizeInWords(t) / 2); - pushObject(t, o); - return reinterpret_cast(t->stack + ((t->sp - 1) * 2) + 1); - } else { - return 0; - } -} - -inline int frameNext(Thread* t, int frame) -{ - return peekInt(t, frame + FrameNextOffset); -} - -inline GcMethod* frameMethod(Thread* t, int frame) -{ - return cast(t, peekObject(t, frame + FrameMethodOffset)); -} - -inline unsigned frameIp(Thread* t, int frame) -{ - return peekInt(t, frame + FrameIpOffset); -} - -inline unsigned frameBase(Thread* t, int frame) -{ - return peekInt(t, frame + FrameBaseOffset); -} - -inline object localObject(Thread* t, unsigned index) -{ - return peekObject(t, frameBase(t, t->frame) + index); -} - -inline uint32_t localInt(Thread* t, unsigned index) -{ - return peekInt(t, frameBase(t, t->frame) + index); -} - -inline uint64_t localLong(Thread* t, unsigned index) -{ - return peekLong(t, frameBase(t, t->frame) + index); -} - -inline void setLocalObject(Thread* t, unsigned index, object value) -{ - pokeObject(t, frameBase(t, t->frame) + index, value); -} - -inline void setLocalInt(Thread* t, unsigned index, uint32_t value) -{ - pokeInt(t, frameBase(t, t->frame) + index, value); -} - -inline void setLocalLong(Thread* t, unsigned index, uint64_t value) -{ - pokeLong(t, frameBase(t, t->frame) + index, value); -} - -void pushFrame(Thread* t, GcMethod* method) -{ - PROTECT(t, method); - - unsigned parameterFootprint = method->parameterFootprint(); - unsigned base = t->sp - parameterFootprint; - unsigned locals = parameterFootprint; - - if (method->flags() & ACC_SYNCHRONIZED) { - // Try to acquire the monitor before doing anything else. - // Otherwise, if we were to push the frame first, we risk trying - // to release a monitor we never successfully acquired when we try - // to pop the frame back off. - if (method->flags() & ACC_STATIC) { - acquire(t, getJClass(t, method->class_())); - } else { - acquire(t, peekObject(t, base)); - } - } - - if (t->frame >= 0) { - pokeInt(t, t->frame + FrameIpOffset, t->ip); - } - t->ip = 0; - - if ((method->flags() & ACC_NATIVE) == 0) { - t->code = method->code(); - - locals = t->code->maxLocals(); - - memset(t->stack + ((base + parameterFootprint) * 2), - 0, - (locals - parameterFootprint) * BytesPerWord * 2); - } - - unsigned frame = base + locals; - pokeInt(t, frame + FrameNextOffset, t->frame); - t->frame = frame; - - t->sp = frame + FrameFootprint; - - pokeInt(t, frame + FrameBaseOffset, base); - pokeObject(t, frame + FrameMethodOffset, method); - pokeInt(t, t->frame + FrameIpOffset, 0); -} - -void popFrame(Thread* t) -{ - GcMethod* method = frameMethod(t, t->frame); - - if (method->flags() & ACC_SYNCHRONIZED) { - if (method->flags() & ACC_STATIC) { - release(t, getJClass(t, method->class_())); - } else { - release(t, peekObject(t, frameBase(t, t->frame))); - } - } - - t->sp = frameBase(t, t->frame); - t->frame = frameNext(t, t->frame); - if (t->frame >= 0) { - t->code = frameMethod(t, t->frame)->code(); - t->ip = frameIp(t, t->frame); - } else { - t->code = 0; - t->ip = 0; - } -} - -class MyStackWalker : public Processor::StackWalker { - public: - MyStackWalker(Thread* t, int frame) : t(t), frame(frame) - { - } - - virtual void walk(Processor::StackVisitor* v) - { - for (int frame = this->frame; frame >= 0; frame = frameNext(t, frame)) { - MyStackWalker walker(t, frame); - if (not v->visit(&walker)) { - break; - } - } - } - - virtual GcMethod* method() - { - return frameMethod(t, frame); - } - - virtual int ip() - { - return frameIp(t, frame); - } - - virtual unsigned count() - { - unsigned count = 0; - for (int frame = this->frame; frame >= 0; frame = frameNext(t, frame)) { - ++count; - } - return count; - } - - Thread* t; - int frame; -}; - -inline void checkStack(Thread* t, GcMethod* method) -{ - if (UNLIKELY(t->sp + method->parameterFootprint() - + method->code()->maxLocals() + FrameFootprint - + method->code()->maxStack() > stackSizeInWords(t) / 2)) { - throwNew(t, GcStackOverflowError::Type); - } -} - -void pushResult(Thread* t, unsigned returnCode, uint64_t result, bool indirect) -{ - switch (returnCode) { - case ByteField: - case BooleanField: - if (DebugRun) { - fprintf(stderr, "result: %d\n", static_cast(result)); - } - pushInt(t, static_cast(result)); - break; - - case CharField: - if (DebugRun) { - fprintf(stderr, "result: %d\n", static_cast(result)); - } - pushInt(t, static_cast(result)); - break; - - case ShortField: - if (DebugRun) { - fprintf(stderr, "result: %d\n", static_cast(result)); - } - pushInt(t, static_cast(result)); - break; - - case FloatField: - case IntField: - if (DebugRun) { - fprintf(stderr, "result: %d\n", static_cast(result)); - } - pushInt(t, result); - break; - - case DoubleField: - case LongField: - if (DebugRun) { - fprintf(stderr, "result: %" LLD "\n", result); - } - pushLong(t, result); - break; - - case ObjectField: - if (indirect) { - if (DebugRun) { - fprintf( - stderr, - "result: %p at %p\n", - static_cast(result) == 0 - ? 0 - : *reinterpret_cast(static_cast(result)), - reinterpret_cast(static_cast(result))); - } - pushObject( - t, - static_cast(result) == 0 - ? 0 - : *reinterpret_cast(static_cast(result))); - } else { - if (DebugRun) { - fprintf(stderr, "result: %p\n", reinterpret_cast(result)); - } - pushObject(t, reinterpret_cast(result)); - } - break; - - case VoidField: - break; - - default: - abort(t); - } -} - -void marshalArguments(Thread* t, - uintptr_t* args, - uint8_t* types, - unsigned sp, - GcMethod* method, - bool fastCallingConvention) -{ - MethodSpecIterator it( - t, reinterpret_cast(method->spec()->body().begin())); - - unsigned argOffset = 0; - unsigned typeOffset = 0; - - while (it.hasNext()) { - unsigned type = fieldType(t, fieldCode(t, *it.next())); - if (types) { - types[typeOffset++] = type; - } - - switch (type) { - case INT8_TYPE: - case INT16_TYPE: - case INT32_TYPE: - case FLOAT_TYPE: - args[argOffset++] = peekInt(t, sp++); - break; - - case DOUBLE_TYPE: - case INT64_TYPE: { - uint64_t v = peekLong(t, sp); - memcpy(args + argOffset, &v, 8); - argOffset += fastCallingConvention ? 2 : (8 / BytesPerWord); - sp += 2; - } break; - - case POINTER_TYPE: { - if (fastCallingConvention) { - args[argOffset++] = reinterpret_cast(peekObject(t, sp++)); - } else { - object* v = reinterpret_cast(t->stack + ((sp++) * 2) + 1); - if (*v == 0) { - v = 0; - } - args[argOffset++] = reinterpret_cast(v); - } - } break; - - default: - abort(t); - } - } -} - -unsigned invokeNativeSlow(Thread* t, GcMethod* method, void* function) -{ - PROTECT(t, method); - - pushFrame(t, method); - - unsigned footprint = method->parameterFootprint() + 1; - if (method->flags() & ACC_STATIC) { - ++footprint; - } - unsigned count = method->parameterCount() + 2; - - THREAD_RUNTIME_ARRAY(t, uintptr_t, args, footprint); - unsigned argOffset = 0; - THREAD_RUNTIME_ARRAY(t, uint8_t, types, count); - unsigned typeOffset = 0; - - RUNTIME_ARRAY_BODY(args)[argOffset++] = reinterpret_cast(t); - RUNTIME_ARRAY_BODY(types)[typeOffset++] = POINTER_TYPE; - - GcJclass* jclass = 0; - PROTECT(t, jclass); - - unsigned sp; - if (method->flags() & ACC_STATIC) { - sp = frameBase(t, t->frame); - jclass = getJClass(t, method->class_()); - RUNTIME_ARRAY_BODY(args)[argOffset++] - = reinterpret_cast(&jclass); - } else { - sp = frameBase(t, t->frame); - object* v = reinterpret_cast(t->stack + ((sp++) * 2) + 1); - if (*v == 0) { - v = 0; - } - RUNTIME_ARRAY_BODY(args)[argOffset++] = reinterpret_cast(v); - } - RUNTIME_ARRAY_BODY(types)[typeOffset++] = POINTER_TYPE; - - marshalArguments(t, - RUNTIME_ARRAY_BODY(args) + argOffset, - RUNTIME_ARRAY_BODY(types) + typeOffset, - sp, - method, - false); - - unsigned returnCode = method->returnCode(); - unsigned returnType = fieldType(t, returnCode); - uint64_t result; - - if (DebugRun) { - signed char *cname = method->class_() && method->class_()->name() ? method->class_()->name()->body().begin() : (signed char*) "?"; - signed char *mname = method->name() ? method->name()->body().begin() : (signed char*) "?"; - fprintf(stderr, - "invoke native method %s.%s\n", - cname, mname); - } - - { - ENTER(t, Thread::IdleState); - - bool noThrow = t->checkpoint->noThrow; - t->checkpoint->noThrow = true; - THREAD_RESOURCE(t, bool, noThrow, t->checkpoint->noThrow = noThrow); - - result = vm::dynamicCall(function, - RUNTIME_ARRAY_BODY(args), - RUNTIME_ARRAY_BODY(types), - count, - footprint * BytesPerWord, - returnType); - } - - if (DebugRun) { - fprintf(stderr, - "return from native method %s.%s\n", - frameMethod(t, t->frame)->class_()->name()->body().begin(), - frameMethod(t, t->frame)->name()->body().begin()); - } - - popFrame(t); - - if (UNLIKELY(t->exception)) { - GcThrowable* exception = t->exception; - t->exception = 0; - throw_(t, exception); - } - - pushResult(t, returnCode, result, true); - - return returnCode; -} - -unsigned invokeNative(Thread* t, GcMethod* method) -{ - PROTECT(t, method); - - resolveNative(t, method); - - GcNative* native = getMethodRuntimeData(t, method)->native(); - if (native->fast()) { - pushFrame(t, method); - - uint64_t result; - { - THREAD_RESOURCE0(t, popFrame(static_cast(t))); - - unsigned footprint = method->parameterFootprint(); - THREAD_RUNTIME_ARRAY(t, uintptr_t, args, footprint); - unsigned sp = frameBase(t, t->frame); - unsigned argOffset = 0; - if ((method->flags() & ACC_STATIC) == 0) { - RUNTIME_ARRAY_BODY(args)[argOffset++] - = reinterpret_cast(peekObject(t, sp++)); - } - - marshalArguments( - t, RUNTIME_ARRAY_BODY(args) + argOffset, 0, sp, method, true); - - if(method->returnCode() != VoidField) { - result = reinterpret_cast(native->function())( - t, method, RUNTIME_ARRAY_BODY(args)); - } - else { - result = 0; - reinterpret_cast(native->function())( - t, method, RUNTIME_ARRAY_BODY(args)); - } - } - - pushResult(t, method->returnCode(), result, false); - - return method->returnCode(); - } else { - return invokeNativeSlow(t, method, native->function()); - } -} - -inline void store(Thread* t, unsigned index) -{ - memcpy(t->stack + ((frameBase(t, t->frame) + index) * 2), - t->stack + ((--t->sp) * 2), - BytesPerWord * 2); -} - -bool isNaN(double v) -{ - return fpclassify(v) == FP_NAN; -} - -bool isNaN(float v) -{ - return fpclassify(v) == FP_NAN; -} - -uint64_t findExceptionHandler(Thread* t, GcMethod* method, unsigned ip) -{ - PROTECT(t, method); - - GcExceptionHandlerTable* eht = cast( - t, method->code()->exceptionHandlerTable()); - - if (eht) { - for (unsigned i = 0; i < eht->length(); ++i) { - uint64_t eh = eht->body()[i]; - - if (ip - 1 >= exceptionHandlerStart(eh) - and ip - 1 < exceptionHandlerEnd(eh)) { - GcClass* catchType = 0; - if (exceptionHandlerCatchType(eh)) { - GcThrowable* e = t->exception; - t->exception = 0; - PROTECT(t, e); - - PROTECT(t, eht); - catchType = resolveClassInPool( - t, method, exceptionHandlerCatchType(eh) - 1); - - if (catchType) { - eh = eht->body()[i]; - t->exception = e; - } else { - // can't find what we're supposed to catch - move on. - continue; - } - } - - if (exceptionMatch(t, catchType, t->exception)) { - return eh; - } - } - } - } - - return 0; -} - -uint64_t findExceptionHandler(Thread* t, int frame) -{ - return findExceptionHandler(t, frameMethod(t, frame), frameIp(t, frame)); -} - -void pushField(Thread* t, object target, GcField* field) -{ - switch (field->code()) { - case ByteField: - case BooleanField: - pushInt(t, fieldAtOffset(target, field->offset())); - break; - - case CharField: - case ShortField: - pushInt(t, fieldAtOffset(target, field->offset())); - break; - - case FloatField: - case IntField: - pushInt(t, fieldAtOffset(target, field->offset())); - break; - - case DoubleField: - case LongField: - pushLong(t, fieldAtOffset(target, field->offset())); - break; - - case ObjectField: - pushObject(t, fieldAtOffset(target, field->offset())); - break; - - default: - abort(t); - } -} - -void safePoint(Thread* t) -{ - if (UNLIKELY(t->m->exclusive)) { - ENTER(t, Thread::IdleState); - } -} - -object interpret3(Thread* t, const int base) -{ - unsigned instruction = nop; - unsigned& ip = t->ip; - unsigned& sp = t->sp; - int& frame = t->frame; - GcCode*& code = t->code; - GcMethod* method = 0; - PROTECT(t, method); - GcThrowable*& exception = t->exception; - uintptr_t* stack = t->stack; - - code = frameMethod(t, frame)->code(); - - if (UNLIKELY(exception)) { - goto throw_; - } - -loop: - instruction = code->body()[ip++]; - - if (DebugRun) { - GcMethod *method_ = frameMethod(t, frame); - signed char *cname = method_->class_() && method_->class_()->name() ? method_->class_()->name()->body().begin() : (signed char*) "?"; - signed char *mname = method_->name() ? method_->name()->body().begin() : (signed char*) "?"; - fprintf(stderr, - "ip: %d; instruction: 0x%x in %s.%s ", - ip - 1, - instruction, cname, mname); - - int line = findLineNumber(t, frameMethod(t, frame), ip); - switch (line) { - case NativeLine: - fprintf(stderr, "(native)\n"); - break; - case UnknownLine: - fprintf(stderr, "(unknown line)\n"); - break; - default: - fprintf(stderr, "(line %d)\n", line); - } - } - - switch (instruction) { - case aaload: { - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - if (LIKELY(index >= 0 - and static_cast(index) - < objectArrayLength(t, array))) { - pushObject(t, objectArrayBody(t, array, index)); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - objectArrayLength(t, array)); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case aastore: { - object value = popObject(t); - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - if (LIKELY(index >= 0 - and static_cast(index) - < objectArrayLength(t, array))) { - setField(t, array, ArrayBody + (index * BytesPerWord), value); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - objectArrayLength(t, array)); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case aconst_null: { - pushObject(t, 0); - } - goto loop; - - case aload: { - pushObject(t, localObject(t, code->body()[ip++])); - } - goto loop; - - case aload_0: { - pushObject(t, localObject(t, 0)); - } - goto loop; - - case aload_1: { - pushObject(t, localObject(t, 1)); - } - goto loop; - - case aload_2: { - pushObject(t, localObject(t, 2)); - } - goto loop; - - case aload_3: { - pushObject(t, localObject(t, 3)); - } - goto loop; - - case anewarray: { - int32_t count = popInt(t); - - if (LIKELY(count >= 0)) { - uint16_t index = codeReadInt16(t, code, ip); - - GcClass* class_ = resolveClassInPool(t, frameMethod(t, frame), index - 1); - - pushObject(t, makeObjectArray(t, class_, count)); - } else { - exception - = makeThrowable(t, GcNegativeArraySizeException::Type, "%d", count); - goto throw_; - } - } - goto loop; - - case areturn: { - object result = popObject(t); - if (frame > base) { - popFrame(t); - pushObject(t, result); - goto loop; - } else { - return result; - } - } - goto loop; - - case arraylength: { - object array = popObject(t); - if (LIKELY(array)) { - pushInt(t, fieldAtOffset(array, BytesPerWord)); - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case astore: { - store(t, code->body()[ip++]); - } - goto loop; - - case astore_0: { - store(t, 0); - } - goto loop; - - case astore_1: { - store(t, 1); - } - goto loop; - - case astore_2: { - store(t, 2); - } - goto loop; - - case astore_3: { - store(t, 3); - } - goto loop; - - case athrow: { - exception = cast(t, popObject(t)); - if (UNLIKELY(exception == 0)) { - exception = makeThrowable(t, GcNullPointerException::Type); - } - } - goto throw_; - - case baload: { - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - if (objectClass(t, array) == type(t, GcBooleanArray::Type)) { - GcBooleanArray* a = cast(t, array); - if (LIKELY(index >= 0 - and static_cast(index) < a->length())) { - pushInt(t, a->body()[index]); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - GcByteArray* a = cast(t, array); - if (LIKELY(index >= 0 - and static_cast(index) < a->length())) { - pushInt(t, a->body()[index]); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case bastore: { - int8_t value = popInt(t); - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - if (objectClass(t, array) == type(t, GcBooleanArray::Type)) { - GcBooleanArray* a = cast(t, array); - if (LIKELY(index >= 0 - and static_cast(index) < a->length())) { - a->body()[index] = value; - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - GcByteArray* a = cast(t, array); - if (LIKELY(index >= 0 - and static_cast(index) < a->length())) { - a->body()[index] = value; - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case bipush: { - pushInt(t, static_cast(code->body()[ip++])); - } - goto loop; - - case caload: { - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcCharArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - pushInt(t, a->body()[index]); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case castore: { - uint16_t value = popInt(t); - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcCharArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - a->body()[index] = value; - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case checkcast: { - uint16_t index = codeReadInt16(t, code, ip); - - if (peekObject(t, sp - 1)) { - GcClass* class_ = resolveClassInPool(t, frameMethod(t, frame), index - 1); - if (UNLIKELY(exception)) - goto throw_; - - if (not instanceOf(t, class_, peekObject(t, sp - 1))) { - exception = makeThrowable( - t, - GcClassCastException::Type, - "%s as %s", - objectClass(t, peekObject(t, sp - 1))->name()->body().begin(), - class_->name()->body().begin()); - goto throw_; - } - } - } - goto loop; - - case d2f: { - pushFloat(t, static_cast(popDouble(t))); - } - goto loop; - - case d2i: { - double f = popDouble(t); - switch (fpclassify(f)) { - case FP_NAN: - pushInt(t, 0); - break; - case FP_INFINITE: - pushInt(t, signbit(f) ? INT32_MIN : INT32_MAX); - break; - default: - pushInt(t, - f >= INT32_MAX - ? INT32_MAX - : (f <= INT32_MIN ? INT32_MIN : static_cast(f))); - break; - } - } - goto loop; - - case d2l: { - double f = popDouble(t); - switch (fpclassify(f)) { - case FP_NAN: - pushLong(t, 0); - break; - case FP_INFINITE: - pushLong(t, signbit(f) ? INT64_MIN : INT64_MAX); - break; - default: - pushLong(t, - f >= INT64_MAX - ? INT64_MAX - : (f <= INT64_MIN ? INT64_MIN : static_cast(f))); - break; - } - } - goto loop; - - case dadd: { - double b = popDouble(t); - double a = popDouble(t); - - pushDouble(t, a + b); - } - goto loop; - - case daload: { - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcDoubleArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - pushLong(t, a->body()[index]); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case dastore: { - double value = popDouble(t); - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcDoubleArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - memcpy(&a->body()[index], &value, sizeof(uint64_t)); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case dcmpg: { - double b = popDouble(t); - double a = popDouble(t); - - if (isNaN(a) or isNaN(b)) { - pushInt(t, 1); - } - if (a < b) { - pushInt(t, static_cast(-1)); - } else if (a > b) { - pushInt(t, 1); - } else if (a == b) { - pushInt(t, 0); - } else { - pushInt(t, 1); - } - } - goto loop; - - case dcmpl: { - double b = popDouble(t); - double a = popDouble(t); - - if (isNaN(a) or isNaN(b)) { - pushInt(t, static_cast(-1)); - } - if (a < b) { - pushInt(t, static_cast(-1)); - } else if (a > b) { - pushInt(t, 1); - } else if (a == b) { - pushInt(t, 0); - } else { - pushInt(t, static_cast(-1)); - } - } - goto loop; - - case dconst_0: { - pushDouble(t, 0); - } - goto loop; - - case dconst_1: { - pushDouble(t, 1); - } - goto loop; - - case ddiv: { - double b = popDouble(t); - double a = popDouble(t); - - pushDouble(t, a / b); - } - goto loop; - - case dmul: { - double b = popDouble(t); - double a = popDouble(t); - - pushDouble(t, a * b); - } - goto loop; - - case dneg: { - double a = popDouble(t); - - pushDouble(t, -a); - } - goto loop; - - case vm::drem: { - double b = popDouble(t); - double a = popDouble(t); - - pushDouble(t, fmod(a, b)); - } - goto loop; - - case dsub: { - double b = popDouble(t); - double a = popDouble(t); - - pushDouble(t, a - b); - } - goto loop; - - case vm::dup: { - if (DebugStack) { - fprintf(stderr, "dup\n"); - } - - memcpy(stack + ((sp)*2), stack + ((sp - 1) * 2), BytesPerWord * 2); - ++sp; - } - goto loop; - - case dup_x1: { - if (DebugStack) { - fprintf(stderr, "dup_x1\n"); - } - - memcpy(stack + ((sp)*2), stack + ((sp - 1) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 1) * 2), stack + ((sp - 2) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 2) * 2), stack + ((sp)*2), BytesPerWord * 2); - ++sp; - } - goto loop; - - case dup_x2: { - if (DebugStack) { - fprintf(stderr, "dup_x2\n"); - } - - memcpy(stack + ((sp)*2), stack + ((sp - 1) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 1) * 2), stack + ((sp - 2) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 2) * 2), stack + ((sp - 3) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 3) * 2), stack + ((sp)*2), BytesPerWord * 2); - ++sp; - } - goto loop; - - case vm::dup2: { - if (DebugStack) { - fprintf(stderr, "dup2\n"); - } - - memcpy(stack + ((sp)*2), stack + ((sp - 2) * 2), BytesPerWord * 4); - sp += 2; - } - goto loop; - - case dup2_x1: { - if (DebugStack) { - fprintf(stderr, "dup2_x1\n"); - } - - memcpy(stack + ((sp + 1) * 2), stack + ((sp - 1) * 2), BytesPerWord * 2); - memcpy(stack + ((sp)*2), stack + ((sp - 2) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 1) * 2), stack + ((sp - 3) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 3) * 2), stack + ((sp)*2), BytesPerWord * 4); - sp += 2; - } - goto loop; - - case dup2_x2: { - if (DebugStack) { - fprintf(stderr, "dup2_x2\n"); - } - - memcpy(stack + ((sp + 1) * 2), stack + ((sp - 1) * 2), BytesPerWord * 2); - memcpy(stack + ((sp)*2), stack + ((sp - 2) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 1) * 2), stack + ((sp - 3) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 2) * 2), stack + ((sp - 4) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 4) * 2), stack + ((sp)*2), BytesPerWord * 4); - sp += 2; - } - goto loop; - - case f2d: { - pushDouble(t, popFloat(t)); - } - goto loop; - - case f2i: { - float f = popFloat(t); - switch (fpclassify(f)) { - case FP_NAN: - pushInt(t, 0); - break; - case FP_INFINITE: - pushInt(t, signbit(f) ? INT32_MIN : INT32_MAX); - break; - default: - pushInt(t, - f >= INT32_MAX - ? INT32_MAX - : (f <= INT32_MIN ? INT32_MIN : static_cast(f))); - break; - } - } - goto loop; - - case f2l: { - float f = popFloat(t); - switch (fpclassify(f)) { - case FP_NAN: - pushLong(t, 0); - break; - case FP_INFINITE: - pushLong(t, signbit(f) ? INT64_MIN : INT64_MAX); - break; - default: - pushLong(t, static_cast(f)); - break; - } - } - goto loop; - - case fadd: { - float b = popFloat(t); - float a = popFloat(t); - - pushFloat(t, a + b); - } - goto loop; - - case faload: { - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcFloatArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - pushInt(t, a->body()[index]); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case fastore: { - float value = popFloat(t); - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcFloatArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - memcpy(&a->body()[index], &value, sizeof(uint32_t)); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case fcmpg: { - float b = popFloat(t); - float a = popFloat(t); - - if (isNaN(a) or isNaN(b)) { - pushInt(t, 1); - } - if (a < b) { - pushInt(t, static_cast(-1)); - } else if (a > b) { - pushInt(t, 1); - } else if (a == b) { - pushInt(t, 0); - } else { - pushInt(t, 1); - } - } - goto loop; - - case fcmpl: { - float b = popFloat(t); - float a = popFloat(t); - - if (isNaN(a) or isNaN(b)) { - pushInt(t, static_cast(-1)); - } - if (a < b) { - pushInt(t, static_cast(-1)); - } else if (a > b) { - pushInt(t, 1); - } else if (a == b) { - pushInt(t, 0); - } else { - pushInt(t, static_cast(-1)); - } - } - goto loop; - - case fconst_0: { - pushFloat(t, 0); - } - goto loop; - - case fconst_1: { - pushFloat(t, 1); - } - goto loop; - - case fconst_2: { - pushFloat(t, 2); - } - goto loop; - - case fdiv: { - float b = popFloat(t); - float a = popFloat(t); - - pushFloat(t, a / b); - } - goto loop; - - case fmul: { - float b = popFloat(t); - float a = popFloat(t); - - pushFloat(t, a * b); - } - goto loop; - - case fneg: { - float a = popFloat(t); - - pushFloat(t, -a); - } - goto loop; - - case frem: { - float b = popFloat(t); - float a = popFloat(t); - - pushFloat(t, fmodf(a, b)); - } - goto loop; - - case fsub: { - float b = popFloat(t); - float a = popFloat(t); - - pushFloat(t, a - b); - } - goto loop; - - case getfield: { - if (LIKELY(peekObject(t, sp - 1))) { - uint16_t index = codeReadInt16(t, code, ip); - - GcField* field = resolveField(t, frameMethod(t, frame), index - 1); - - assertT(t, (field->flags() & ACC_STATIC) == 0); - - PROTECT(t, field); - - ACQUIRE_FIELD_FOR_READ(t, field); - - pushField(t, popObject(t), field); - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case getstatic: { - uint16_t index = codeReadInt16(t, code, ip); - - GcField* field = resolveField(t, frameMethod(t, frame), index - 1); - - assertT(t, field->flags() & ACC_STATIC); - - PROTECT(t, field); - - initClass(t, field->class_()); - - ACQUIRE_FIELD_FOR_READ(t, field); - - pushField(t, field->class_()->staticTable(), field); - } - goto loop; - - case goto_: { - int16_t offset = codeReadInt16(t, code, ip); - ip = (ip - 3) + offset; - } - goto back_branch; - - case goto_w: { - int32_t offset = codeReadInt32(t, code, ip); - ip = (ip - 5) + offset; - } - goto back_branch; - - case i2b: { - pushInt(t, static_cast(popInt(t))); - } - goto loop; - - case i2c: { - pushInt(t, static_cast(popInt(t))); - } - goto loop; - - case i2d: { - pushDouble(t, static_cast(static_cast(popInt(t)))); - } - goto loop; - - case i2f: { - pushFloat(t, static_cast(static_cast(popInt(t)))); - } - goto loop; - - case i2l: { - pushLong(t, static_cast(popInt(t))); - } - goto loop; - - case i2s: { - pushInt(t, static_cast(popInt(t))); - } - goto loop; - - case iadd: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - pushInt(t, a + b); - } - goto loop; - - case iaload: { - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcIntArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - pushInt(t, a->body()[index]); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case iand: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - pushInt(t, a & b); - } - goto loop; - - case iastore: { - int32_t value = popInt(t); - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcIntArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - a->body()[index] = value; - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case iconst_m1: { - pushInt(t, static_cast(-1)); - } - goto loop; - - case iconst_0: { - pushInt(t, 0); - } - goto loop; - - case iconst_1: { - pushInt(t, 1); - } - goto loop; - - case iconst_2: { - pushInt(t, 2); - } - goto loop; - - case iconst_3: { - pushInt(t, 3); - } - goto loop; - - case iconst_4: { - pushInt(t, 4); - } - goto loop; - - case iconst_5: { - pushInt(t, 5); - } - goto loop; - - case idiv: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - if (UNLIKELY(b == 0)) { - exception = makeThrowable(t, GcArithmeticException::Type); - goto throw_; - } - - pushInt(t, a / b); - } - goto loop; - - case if_acmpeq: { - int16_t offset = codeReadInt16(t, code, ip); - - object b = popObject(t); - object a = popObject(t); - - if (a == b) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case if_acmpne: { - int16_t offset = codeReadInt16(t, code, ip); - - object b = popObject(t); - object a = popObject(t); - - if (a != b) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case if_icmpeq: { - int16_t offset = codeReadInt16(t, code, ip); - - int32_t b = popInt(t); - int32_t a = popInt(t); - - if (a == b) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case if_icmpne: { - int16_t offset = codeReadInt16(t, code, ip); - - int32_t b = popInt(t); - int32_t a = popInt(t); - - if (a != b) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case if_icmpgt: { - int16_t offset = codeReadInt16(t, code, ip); - - int32_t b = popInt(t); - int32_t a = popInt(t); - - if (a > b) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case if_icmpge: { - int16_t offset = codeReadInt16(t, code, ip); - - int32_t b = popInt(t); - int32_t a = popInt(t); - - if (a >= b) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case if_icmplt: { - int16_t offset = codeReadInt16(t, code, ip); - - int32_t b = popInt(t); - int32_t a = popInt(t); - - if (a < b) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case if_icmple: { - int16_t offset = codeReadInt16(t, code, ip); - - int32_t b = popInt(t); - int32_t a = popInt(t); - - if (a <= b) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case ifeq: { - int16_t offset = codeReadInt16(t, code, ip); - - if (popInt(t) == 0) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case ifne: { - int16_t offset = codeReadInt16(t, code, ip); - - if (popInt(t)) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case ifgt: { - int16_t offset = codeReadInt16(t, code, ip); - - if (static_cast(popInt(t)) > 0) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case ifge: { - int16_t offset = codeReadInt16(t, code, ip); - - if (static_cast(popInt(t)) >= 0) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case iflt: { - int16_t offset = codeReadInt16(t, code, ip); - - if (static_cast(popInt(t)) < 0) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case ifle: { - int16_t offset = codeReadInt16(t, code, ip); - - if (static_cast(popInt(t)) <= 0) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case ifnonnull: { - int16_t offset = codeReadInt16(t, code, ip); - - if (popObject(t)) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case ifnull: { - int16_t offset = codeReadInt16(t, code, ip); - - if (popObject(t) == 0) { - ip = (ip - 3) + offset; - } - } - goto back_branch; - - case iinc: { - uint8_t index = code->body()[ip++]; - int8_t c = code->body()[ip++]; - - setLocalInt(t, index, localInt(t, index) + c); - } - goto loop; - - case iload: - case fload: { - pushInt(t, localInt(t, code->body()[ip++])); - } - goto loop; - - case iload_0: - case fload_0: { - pushInt(t, localInt(t, 0)); - } - goto loop; - - case iload_1: - case fload_1: { - pushInt(t, localInt(t, 1)); - } - goto loop; - - case iload_2: - case fload_2: { - pushInt(t, localInt(t, 2)); - } - goto loop; - - case iload_3: - case fload_3: { - pushInt(t, localInt(t, 3)); - } - goto loop; - - case imul: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - pushInt(t, a * b); - } - goto loop; - - case ineg: { - pushInt(t, -popInt(t)); - } - goto loop; - - case instanceof: { - uint16_t index = codeReadInt16(t, code, ip); - - if (peekObject(t, sp - 1)) { - GcClass* class_ = resolveClassInPool(t, frameMethod(t, frame), index - 1); - - if (instanceOf(t, class_, popObject(t))) { - pushInt(t, 1); - } else { - pushInt(t, 0); - } - } else { - popObject(t); - pushInt(t, 0); - } - } - goto loop; - - case invokedynamic: { - uint16_t index = codeReadInt16(t, code, ip); - - ip += 2; - - GcInvocation* invocation = cast(t, singletonObject(t, code->pool(), index - 1)); - - GcCallSite* site = invocation->site(); - - loadMemoryBarrier(); - - if (site == 0) { - PROTECT(t, invocation); - - invocation->setClass(t, frameMethod(t, frame)->class_()); - - site = resolveDynamic(t, invocation); - PROTECT(t, site); - - storeStoreMemoryBarrier(); - - invocation->setSite(t, site); - site->setInvocation(t, invocation); - } - - method = site->target()->method(); - } goto invoke; - - case invokeinterface: { - uint16_t index = codeReadInt16(t, code, ip); - - ip += 2; - - GcMethod* m = resolveMethod(t, frameMethod(t, frame), index - 1); - - unsigned parameterFootprint = m->parameterFootprint(); - if (LIKELY(peekObject(t, sp - parameterFootprint))) { - method = findInterfaceMethod( - t, m, objectClass(t, peekObject(t, sp - parameterFootprint))); - goto invoke; - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case invokespecial: { - uint16_t index = codeReadInt16(t, code, ip); - - GcMethod* m = resolveMethod(t, frameMethod(t, frame), index - 1); - - unsigned parameterFootprint = m->parameterFootprint(); - if (LIKELY(peekObject(t, sp - parameterFootprint))) { - GcClass* class_ = frameMethod(t, frame)->class_(); - if (isSpecialMethod(t, m, class_)) { - class_ = class_->super(); - PROTECT(t, m); - PROTECT(t, class_); - - initClass(t, class_); - - method = findVirtualMethod(t, m, class_); - } else { - method = m; - } - - goto invoke; - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case invokestatic: { - uint16_t index = codeReadInt16(t, code, ip); - - GcMethod* m = resolveMethod(t, frameMethod(t, frame), index - 1); - PROTECT(t, m); - - initClass(t, m->class_()); - - method = m; - } - goto invoke; - - case invokevirtual: { - uint16_t index = codeReadInt16(t, code, ip); - - GcMethod* m = resolveMethod(t, frameMethod(t, frame), index - 1); - - unsigned parameterFootprint = m->parameterFootprint(); - if (LIKELY(peekObject(t, sp - parameterFootprint))) { - GcClass* class_ = objectClass(t, peekObject(t, sp - parameterFootprint)); - PROTECT(t, m); - PROTECT(t, class_); - - method = findVirtualMethod(t, m, class_); - goto invoke; - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case ior: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - pushInt(t, a | b); - } - goto loop; - - case irem: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - if (UNLIKELY(b == 0)) { - exception = makeThrowable(t, GcArithmeticException::Type); - goto throw_; - } - - pushInt(t, a % b); - } - goto loop; - - case ireturn: - case freturn: { - int32_t result = popInt(t); - if (frame > base) { - popFrame(t); - pushInt(t, result); - goto loop; - } else { - return makeInt(t, result); - } - } - goto loop; - - case ishl: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - pushInt(t, a << (b & 0x1F)); - } - goto loop; - - case ishr: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - pushInt(t, a >> (b & 0x1F)); - } - goto loop; - - case istore: - case fstore: { - setLocalInt(t, code->body()[ip++], popInt(t)); - } - goto loop; - - case istore_0: - case fstore_0: { - setLocalInt(t, 0, popInt(t)); - } - goto loop; - - case istore_1: - case fstore_1: { - setLocalInt(t, 1, popInt(t)); - } - goto loop; - - case istore_2: - case fstore_2: { - setLocalInt(t, 2, popInt(t)); - } - goto loop; - - case istore_3: - case fstore_3: { - setLocalInt(t, 3, popInt(t)); - } - goto loop; - - case isub: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - pushInt(t, a - b); - } - goto loop; - - case iushr: { - int32_t b = popInt(t); - uint32_t a = popInt(t); - - pushInt(t, a >> (b & 0x1F)); - } - goto loop; - - case ixor: { - int32_t b = popInt(t); - int32_t a = popInt(t); - - pushInt(t, a ^ b); - } - goto loop; - - case jsr: { - uint16_t offset = codeReadInt16(t, code, ip); - - pushInt(t, ip); - ip = (ip - 3) + static_cast(offset); - } - goto loop; - - case jsr_w: { - uint32_t offset = codeReadInt32(t, code, ip); - - pushInt(t, ip); - ip = (ip - 5) + static_cast(offset); - } - goto loop; - - case l2d: { - pushDouble(t, static_cast(static_cast(popLong(t)))); - } - goto loop; - - case l2f: { - pushFloat(t, static_cast(static_cast(popLong(t)))); - } - goto loop; - - case l2i: { - pushInt(t, static_cast(popLong(t))); - } - goto loop; - - case ladd: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - pushLong(t, a + b); - } - goto loop; - - case laload: { - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcLongArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - pushLong(t, a->body()[index]); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case land: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - pushLong(t, a & b); - } - goto loop; - - case lastore: { - int64_t value = popLong(t); - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcLongArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - a->body()[index] = value; - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case lcmp: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - pushInt(t, a > b ? 1 : a == b ? 0 : -1); - } - goto loop; - - case lconst_0: { - pushLong(t, 0); - } - goto loop; - - case lconst_1: { - pushLong(t, 1); - } - goto loop; - - case ldc: - case ldc_w: { - uint16_t index; - - if (instruction == ldc) { - index = code->body()[ip++]; - } else { - index = codeReadInt16(t, code, ip); - } - - GcSingleton* pool = code->pool(); - - if (singletonIsObject(t, pool, index - 1)) { - object v = singletonObject(t, pool, index - 1); - if (objectClass(t, v) == type(t, GcReference::Type)) { - GcClass* class_ - = resolveClassInPool(t, frameMethod(t, frame), index - 1); - - pushObject(t, reinterpret_cast(getJClass(t, class_))); - } else if (objectClass(t, v) == type(t, GcClass::Type)) { - pushObject(t, - reinterpret_cast(getJClass(t, cast(t, v)))); - } else { - pushObject(t, v); - } - } else { - pushInt(t, singletonValue(t, pool, index - 1)); - } - } - goto loop; - - case ldc2_w: { - uint16_t index = codeReadInt16(t, code, ip); - - GcSingleton* pool = code->pool(); - - uint64_t v; - memcpy(&v, &singletonValue(t, pool, index - 1), 8); - pushLong(t, v); - } - goto loop; - - case ldiv_: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - if (UNLIKELY(b == 0)) { - exception = makeThrowable(t, GcArithmeticException::Type); - goto throw_; - } - - pushLong(t, a / b); - } - goto loop; - - case lload: - case dload: { - pushLong(t, localLong(t, code->body()[ip++])); - } - goto loop; - - case lload_0: - case dload_0: { - pushLong(t, localLong(t, 0)); - } - goto loop; - - case lload_1: - case dload_1: { - pushLong(t, localLong(t, 1)); - } - goto loop; - - case lload_2: - case dload_2: { - pushLong(t, localLong(t, 2)); - } - goto loop; - - case lload_3: - case dload_3: { - pushLong(t, localLong(t, 3)); - } - goto loop; - - case lmul: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - pushLong(t, a * b); - } - goto loop; - - case lneg: { - pushLong(t, -popLong(t)); - } - goto loop; - - case lookupswitch: { - int32_t base = ip - 1; - - ip += 3; - ip -= (ip % 4); - - int32_t default_ = codeReadInt32(t, code, ip); - int32_t pairCount = codeReadInt32(t, code, ip); - - int32_t key = popInt(t); - - int32_t bottom = 0; - int32_t top = pairCount; - for (int32_t span = top - bottom; span; span = top - bottom) { - int32_t middle = bottom + (span / 2); - unsigned index = ip + (middle * 8); - - int32_t k = codeReadInt32(t, code, index); - - if (key < k) { - top = middle; - } else if (key > k) { - bottom = middle + 1; - } else { - ip = base + codeReadInt32(t, code, index); - goto loop; - } - } - - ip = base + default_; - } - goto loop; - - case lor: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - pushLong(t, a | b); - } - goto loop; - - case lrem: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - if (UNLIKELY(b == 0)) { - exception = makeThrowable(t, GcArithmeticException::Type); - goto throw_; - } - - pushLong(t, a % b); - } - goto loop; - - case lreturn: - case dreturn: { - int64_t result = popLong(t); - if (frame > base) { - popFrame(t); - pushLong(t, result); - goto loop; - } else { - return makeLong(t, result); - } - } - goto loop; - - case lshl: { - int32_t b = popInt(t); - int64_t a = popLong(t); - - pushLong(t, a << (b & 0x3F)); - } - goto loop; - - case lshr: { - int32_t b = popInt(t); - int64_t a = popLong(t); - - pushLong(t, a >> (b & 0x3F)); - } - goto loop; - - case lstore: - case dstore: { - setLocalLong(t, code->body()[ip++], popLong(t)); - } - goto loop; - - case lstore_0: - case dstore_0: { - setLocalLong(t, 0, popLong(t)); - } - goto loop; - - case lstore_1: - case dstore_1: { - setLocalLong(t, 1, popLong(t)); - } - goto loop; - - case lstore_2: - case dstore_2: { - setLocalLong(t, 2, popLong(t)); - } - goto loop; - - case lstore_3: - case dstore_3: { - setLocalLong(t, 3, popLong(t)); - } - goto loop; - - case lsub: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - pushLong(t, a - b); - } - goto loop; - - case lushr: { - int64_t b = popInt(t); - uint64_t a = popLong(t); - - pushLong(t, a >> (b & 0x3F)); - } - goto loop; - - case lxor: { - int64_t b = popLong(t); - int64_t a = popLong(t); - - pushLong(t, a ^ b); - } - goto loop; - - case monitorenter: { - object o = popObject(t); - if (LIKELY(o)) { - acquire(t, o); - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case monitorexit: { - object o = popObject(t); - if (LIKELY(o)) { - release(t, o); - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case multianewarray: { - uint16_t index = codeReadInt16(t, code, ip); - uint8_t dimensions = code->body()[ip++]; - - GcClass* class_ = resolveClassInPool(t, frameMethod(t, frame), index - 1); - PROTECT(t, class_); - - THREAD_RUNTIME_ARRAY(t, int32_t, counts, dimensions); - for (int i = dimensions - 1; i >= 0; --i) { - RUNTIME_ARRAY_BODY(counts)[i] = popInt(t); - if (UNLIKELY(RUNTIME_ARRAY_BODY(counts)[i] < 0)) { - exception = makeThrowable(t, - GcNegativeArraySizeException::Type, - "%d", - RUNTIME_ARRAY_BODY(counts)[i]); - goto throw_; - } - } - - object array = makeArray(t, RUNTIME_ARRAY_BODY(counts)[0]); - setObjectClass(t, array, class_); - PROTECT(t, array); - - populateMultiArray(t, array, RUNTIME_ARRAY_BODY(counts), 0, dimensions); - - pushObject(t, array); - } - goto loop; - - case new_: { - uint16_t index = codeReadInt16(t, code, ip); - - GcClass* class_ = resolveClassInPool(t, frameMethod(t, frame), index - 1); - PROTECT(t, class_); - - initClass(t, class_); - - pushObject(t, make(t, class_)); - } - goto loop; - - case newarray: { - int32_t count = popInt(t); - - if (LIKELY(count >= 0)) { - uint8_t type = code->body()[ip++]; - - object array; - - switch (type) { - case T_BOOLEAN: - array = makeBooleanArray(t, count); - break; - - case T_CHAR: - array = makeCharArray(t, count); - break; - - case T_FLOAT: - array = makeFloatArray(t, count); - break; - - case T_DOUBLE: - array = makeDoubleArray(t, count); - break; - - case T_BYTE: - array = makeByteArray(t, count); - break; - - case T_SHORT: - array = makeShortArray(t, count); - break; - - case T_INT: - array = makeIntArray(t, count); - break; - - case T_LONG: - array = makeLongArray(t, count); - break; - - default: - abort(t); - } - - pushObject(t, array); - } else { - exception - = makeThrowable(t, GcNegativeArraySizeException::Type, "%d", count); - goto throw_; - } - } - goto loop; - - case nop: - goto loop; - - case pop_: { - --sp; - } - goto loop; - - case pop2: { - sp -= 2; - } - goto loop; - - case putfield: { - uint16_t index = codeReadInt16(t, code, ip); - - GcField* field = resolveField(t, frameMethod(t, frame), index - 1); - - assertT(t, (field->flags() & ACC_STATIC) == 0); - PROTECT(t, field); - - { - ACQUIRE_FIELD_FOR_WRITE(t, field); - - switch (field->code()) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case FloatField: - case IntField: { - int32_t value = popInt(t); - object o = popObject(t); - if (LIKELY(o)) { - switch (field->code()) { - case ByteField: - case BooleanField: - fieldAtOffset(o, field->offset()) = value; - break; - - case CharField: - case ShortField: - fieldAtOffset(o, field->offset()) = value; - break; - - case FloatField: - case IntField: - fieldAtOffset(o, field->offset()) = value; - break; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - } - } break; - - case DoubleField: - case LongField: { - int64_t value = popLong(t); - object o = popObject(t); - if (LIKELY(o)) { - fieldAtOffset(o, field->offset()) = value; - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - } - } break; - - case ObjectField: { - object value = popObject(t); - object o = popObject(t); - if (LIKELY(o)) { - setField(t, o, field->offset(), value); - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - } - } break; - - default: - abort(t); - } - } - - if (UNLIKELY(exception)) { - goto throw_; - } - } - goto loop; - - case putstatic: { - uint16_t index = codeReadInt16(t, code, ip); - - GcField* field = resolveField(t, frameMethod(t, frame), index - 1); - - assertT(t, field->flags() & ACC_STATIC); - - PROTECT(t, field); - - ACQUIRE_FIELD_FOR_WRITE(t, field); - - initClass(t, field->class_()); - - GcSingleton* table = field->class_()->staticTable(); - - switch (field->code()) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case FloatField: - case IntField: { - int32_t value = popInt(t); - switch (field->code()) { - case ByteField: - case BooleanField: - fieldAtOffset(table, field->offset()) = value; - break; - - case CharField: - case ShortField: - fieldAtOffset(table, field->offset()) = value; - break; - - case FloatField: - case IntField: - fieldAtOffset(table, field->offset()) = value; - break; - } - } break; - - case DoubleField: - case LongField: { - fieldAtOffset(table, field->offset()) = popLong(t); - } break; - - case ObjectField: { - setField(t, table, field->offset(), popObject(t)); - } break; - - default: - abort(t); - } - } - goto loop; - - case ret: { - ip = localInt(t, code->body()[ip]); - } - goto loop; - - case return_: { - GcMethod* method = frameMethod(t, frame); - if ((method->flags() & ConstructorFlag) - and (method->class_()->vmFlags() & HasFinalMemberFlag)) { - storeStoreMemoryBarrier(); - } - - if (frame > base) { - popFrame(t); - goto loop; - } else { - return 0; - } - } - goto loop; - - case saload: { - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcShortArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - pushInt(t, a->body()[index]); - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case sastore: { - int16_t value = popInt(t); - int32_t index = popInt(t); - object array = popObject(t); - - if (LIKELY(array)) { - GcShortArray* a = cast(t, array); - if (LIKELY(index >= 0 and static_cast(index) < a->length())) { - a->body()[index] = value; - } else { - exception = makeThrowable(t, - GcArrayIndexOutOfBoundsException::Type, - "%d not in [0,%d)", - index, - a->length()); - goto throw_; - } - } else { - exception = makeThrowable(t, GcNullPointerException::Type); - goto throw_; - } - } - goto loop; - - case sipush: { - pushInt(t, static_cast(codeReadInt16(t, code, ip))); - } - goto loop; - - case swap: { - uintptr_t tmp[2]; - memcpy(tmp, stack + ((sp - 1) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 1) * 2), stack + ((sp - 2) * 2), BytesPerWord * 2); - memcpy(stack + ((sp - 2) * 2), tmp, BytesPerWord * 2); - } - goto loop; - - case tableswitch: { - int32_t base = ip - 1; - - ip += 3; - ip -= (ip % 4); - - int32_t default_ = codeReadInt32(t, code, ip); - int32_t bottom = codeReadInt32(t, code, ip); - int32_t top = codeReadInt32(t, code, ip); - - int32_t key = popInt(t); - - if (key >= bottom and key <= top) { - unsigned index = ip + ((key - bottom) * 4); - ip = base + codeReadInt32(t, code, index); - } else { - ip = base + default_; - } - } - goto loop; - - case wide: - goto wide; - - case impdep1: { - // this means we're invoking a virtual method on an instance of a - // bootstrap class, so we need to load the real class to get the - // real method and call it. - - assertT(t, frameNext(t, frame) >= base); - popFrame(t); - - assertT(t, code->body()[ip - 3] == invokevirtual); - ip -= 2; - - uint16_t index = codeReadInt16(t, code, ip); - GcMethod* method = resolveMethod(t, frameMethod(t, frame), index - 1); - - unsigned parameterFootprint = method->parameterFootprint(); - GcClass* class_ = objectClass(t, peekObject(t, sp - parameterFootprint)); - assertT(t, class_->vmFlags() & BootstrapFlag); - - resolveClass(t, frameMethod(t, frame)->class_()->loader(), class_->name()); - - ip -= 3; - } - goto loop; - - default: - abort(t); - } - -wide: - switch (code->body()[ip++]) { - case aload: { - pushObject(t, localObject(t, codeReadInt16(t, code, ip))); - } - goto loop; - - case astore: { - setLocalObject(t, codeReadInt16(t, code, ip), popObject(t)); - } - goto loop; - - case iinc: { - uint16_t index = codeReadInt16(t, code, ip); - int16_t count = codeReadInt16(t, code, ip); - - setLocalInt(t, index, localInt(t, index) + count); - } - goto loop; - - case iload: { - pushInt(t, localInt(t, codeReadInt16(t, code, ip))); - } - goto loop; - - case istore: { - setLocalInt(t, codeReadInt16(t, code, ip), popInt(t)); - } - goto loop; - - case lload: { - pushLong(t, localLong(t, codeReadInt16(t, code, ip))); - } - goto loop; - - case lstore: { - setLocalLong(t, codeReadInt16(t, code, ip), popLong(t)); - } - goto loop; - - case ret: { - ip = localInt(t, codeReadInt16(t, code, ip)); - } - goto loop; - - default: - abort(t); - } - -back_branch: - safePoint(t); - goto loop; - -invoke : { - if (method->flags() & ACC_NATIVE) { - invokeNative(t, method); - } else { - if (DebugCalls && method) { - printf("invoke %s.%s\n", - method->class_() && method->class_()->name() ? (const char *)method->class_()->name()->body().begin() : "", - method->name() ? (const char *)method->name()->body().begin() : "" - ); - } - checkStack(t, method); - pushFrame(t, method); - } -} - goto loop; - -throw_: - if (DebugRun || DebugCalls) { - fprintf(stderr, "throw @ %s\n", frameMethod(t, frame)->name()->body().begin()); - } - - pokeInt(t, t->frame + FrameIpOffset, t->ip); - for (; frame >= base; popFrame(t)) { - uint64_t eh = findExceptionHandler(t, frame); - if (eh) { - sp = frame + FrameFootprint; - ip = exceptionHandlerIp(eh); - pushObject(t, exception); - exception = 0; - goto loop; - } - } - - return 0; -} - -uint64_t interpret2(vm::Thread* t, uintptr_t* arguments) -{ - int base = arguments[0]; - bool* success = reinterpret_cast(arguments[1]); - - object r = interpret3(static_cast(t), base); - *success = true; - return reinterpret_cast(r); -} - -object interpret(Thread* t) -{ - const int base = t->frame; - - while (true) { - bool success = false; - uintptr_t arguments[] - = {static_cast(base), reinterpret_cast(&success)}; - - uint64_t r = run(t, interpret2, arguments); - if (success) { - if (t->exception) { - GcThrowable* exception = t->exception; - t->exception = 0; - throw_(t, exception); - } else { - return reinterpret_cast(r); - } - } - } -} - -void pushArguments(Thread* t, - object this_, - const char* spec, - bool indirectObjects, - va_list a) -{ - if (this_) { - pushObject(t, this_); - } - - for (MethodSpecIterator it(t, spec); it.hasNext();) { - switch (*it.next()) { - case 'L': - case '[': - if (indirectObjects) { - object* v = va_arg(a, object*); - pushObject(t, v ? *v : 0); - } else { - pushObject(t, va_arg(a, object)); - } - break; - - case 'J': - case 'D': - pushLong(t, va_arg(a, uint64_t)); - break; - - case 'F': { - pushFloat(t, va_arg(a, double)); - } break; - - default: - pushInt(t, va_arg(a, uint32_t)); - break; - } - } -} - -void pushArguments(Thread* t, - object this_, - const char* spec, - const jvalue* arguments) -{ - if (this_) { - pushObject(t, this_); - } - - unsigned index = 0; - for (MethodSpecIterator it(t, spec); it.hasNext();) { - switch (*it.next()) { - case 'L': - case '[': { - jobject v = arguments[index++].l; - pushObject(t, v ? *v : 0); - } break; - - case 'J': - case 'D': - pushLong(t, arguments[index++].j); - break; - - case 'F': { - pushFloat(t, arguments[index++].f); - } break; - - default: - pushInt(t, arguments[index++].i); - break; - } - } -} - -void pushArguments(Thread* t, object this_, const char* spec, object a) -{ - if (this_) { - pushObject(t, this_); - } - - unsigned index = 0; - for (MethodSpecIterator it(t, spec); it.hasNext();) { - switch (*it.next()) { - case 'L': - case '[': - pushObject(t, objectArrayBody(t, a, index++)); - break; - - case 'J': - case 'D': - pushLong(t, fieldAtOffset(objectArrayBody(t, a, index++), 8)); - break; - - default: - pushInt( - t, - fieldAtOffset(objectArrayBody(t, a, index++), BytesPerWord)); - break; - } - } -} - -object invoke(Thread* t, GcMethod* method) -{ - PROTECT(t, method); - - GcClass* class_; - PROTECT(t, class_); - - if (methodVirtual(t, method)) { - unsigned parameterFootprint = method->parameterFootprint(); - class_ = objectClass(t, peekObject(t, t->sp - parameterFootprint)); - - if (class_->vmFlags() & BootstrapFlag) { - resolveClass(t, roots(t)->bootLoader(), class_->name()); - } - - if (method->class_()->flags() & ACC_INTERFACE) { - method = findInterfaceMethod(t, method, class_); - } else { - method = findVirtualMethod(t, method, class_); - } - } else { - class_ = method->class_(); - } - - if (method->flags() & ACC_STATIC) { - initClass(t, class_); - } - - object result = 0; - - if (method->flags() & ACC_NATIVE) { - unsigned returnCode = invokeNative(t, method); - - switch (returnCode) { - case ByteField: - case BooleanField: - case CharField: - case ShortField: - case FloatField: - case IntField: - result = makeInt(t, popInt(t)); - break; - - case LongField: - case DoubleField: - result = makeLong(t, popLong(t)); - break; - - case ObjectField: - result = popObject(t); - break; - - case VoidField: - result = 0; - break; - - default: - abort(t); - }; - } else { - checkStack(t, method); - pushFrame(t, method); - - result = interpret(t); - - if (LIKELY(t->exception == 0)) { - popFrame(t); - } else { - GcThrowable* exception = t->exception; - t->exception = 0; - throw_(t, exception); - } - } - - return result; -} - -class MyProcessor : public Processor { - public: - MyProcessor(System* s, Allocator* allocator, const char* crashDumpDirectory) - : s(s), allocator(allocator) - { - signals.setCrashDumpDirectory(crashDumpDirectory); - } - - virtual vm::Thread* makeThread(Machine* m, - GcThread* javaThread, - vm::Thread* parent) - { - Thread* t = new (m->heap->allocate(sizeof(Thread) + m->stackSizeInBytes)) - Thread(m, javaThread, parent); - t->init(); - return t; - } - - virtual GcMethod* makeMethod(vm::Thread* t, - uint8_t vmFlags, - uint8_t returnCode, - uint8_t parameterCount, - uint8_t parameterFootprint, - uint16_t flags, - uint16_t offset, - GcByteArray* name, - GcByteArray* spec, - GcMethodAddendum* addendum, - GcClass* class_, - GcCode* code) - { - return vm::makeMethod(t, - vmFlags, - returnCode, - parameterCount, - parameterFootprint, - flags, - offset, - 0, - 0, - name, - spec, - addendum, - class_, - code); - } - - virtual GcClass* makeClass(vm::Thread* t, - uint16_t flags, - uint16_t vmFlags, - uint16_t fixedSize, - uint8_t arrayElementSize, - uint8_t arrayDimensions, - GcClass* arrayElementClass, - GcIntArray* objectMask, - GcByteArray* name, - GcByteArray* sourceFile, - GcClass* super, - object interfaceTable, - object virtualTable, - object fieldTable, - object methodTable, - GcClassAddendum* addendum, - GcSingleton* staticTable, - GcClassLoader* loader, - unsigned vtableLength UNUSED) - { - return vm::makeClass(t, - flags, - vmFlags, - fixedSize, - arrayElementSize, - arrayDimensions, - arrayElementClass, - 0, - objectMask, - name, - sourceFile, - super, - interfaceTable, - virtualTable, - fieldTable, - methodTable, - addendum, - staticTable, - loader, - 0, - 0); - } - - virtual void initVtable(vm::Thread*, GcClass*) - { - // ignore - } - - virtual void visitObjects(vm::Thread* vmt, Heap::Visitor* v) - { - Thread* t = static_cast(vmt); - - v->visit(&(t->code)); - - for (unsigned i = 0; i < t->sp; ++i) { - if (t->stack[i * 2] == ObjectTag) { - v->visit(reinterpret_cast(t->stack + (i * 2) + 1)); - } - } - } - - virtual void walkStack(vm::Thread* vmt, StackVisitor* v) - { - Thread* t = static_cast(vmt); - - if (t->frame >= 0) { - pokeInt(t, t->frame + FrameIpOffset, t->ip); - } - - MyStackWalker walker(t, t->frame); - walker.walk(v); - } - - virtual int lineNumber(vm::Thread* t, GcMethod* method, int ip) - { - return findLineNumber(static_cast(t), method, ip); - } - - virtual object* makeLocalReference(vm::Thread* vmt, object o) - { - Thread* t = static_cast(vmt); - - return pushReference(t, o); - } - - virtual void disposeLocalReference(vm::Thread*, object* r) - { - if (r) { - *r = 0; - } - } - - virtual bool pushLocalFrame(vm::Thread* vmt, unsigned capacity) - { - Thread* t = static_cast(vmt); - - if (t->sp + capacity < stackSizeInWords(t) / 2) { - t->stackPointers = new (t->m->heap) - List(t->sp, t->stackPointers); - - return true; - } else { - return false; - } - } - - virtual void popLocalFrame(vm::Thread* vmt) - { - Thread* t = static_cast(vmt); - - List* f = t->stackPointers; - t->stackPointers = f->next; - t->sp = f->item; - - t->m->heap->free(f, sizeof(List)); - } - - virtual object invokeArray(vm::Thread* vmt, - GcMethod* method, - object this_, - object arguments) - { - Thread* t = static_cast(vmt); - - assertT( - t, - t->state == Thread::ActiveState or t->state == Thread::ExclusiveState); - - assertT(t, ((method->flags() & ACC_STATIC) == 0) xor (this_ == 0)); - - if (UNLIKELY(t->sp + method->parameterFootprint() + 1 > stackSizeInWords(t) - / 2)) { - throwNew(t, GcStackOverflowError::Type); - } - - const char* spec = reinterpret_cast(method->spec()->body().begin()); - pushArguments(t, this_, spec, arguments); - - return local::invoke(t, method); - } - - virtual object invokeArray(vm::Thread* vmt, - GcMethod* method, - object this_, - const jvalue* arguments) - { - Thread* t = static_cast(vmt); - - assertT( - t, - t->state == Thread::ActiveState or t->state == Thread::ExclusiveState); - - assertT(t, ((method->flags() & ACC_STATIC) == 0) xor (this_ == 0)); - - if (UNLIKELY(t->sp + method->parameterFootprint() + 1 > stackSizeInWords(t) - / 2)) { - throwNew(t, GcStackOverflowError::Type); - } - - const char* spec = reinterpret_cast(method->spec()->body().begin()); - pushArguments(t, this_, spec, arguments); - - return local::invoke(t, method); - } - - virtual object invokeList(vm::Thread* vmt, - GcMethod* method, - object this_, - bool indirectObjects, - va_list arguments) - { - Thread* t = static_cast(vmt); - - assertT( - t, - t->state == Thread::ActiveState or t->state == Thread::ExclusiveState); - - assertT(t, ((method->flags() & ACC_STATIC) == 0) xor (this_ == 0)); - - if (UNLIKELY(t->sp + method->parameterFootprint() + 1 > stackSizeInWords(t) - / 2)) { - throwNew(t, GcStackOverflowError::Type); - } - - const char* spec = reinterpret_cast(method->spec()->body().begin()); - pushArguments(t, this_, spec, indirectObjects, arguments); - - return local::invoke(t, method); - } - - virtual object invokeList(vm::Thread* vmt, - GcClassLoader* loader, - const char* className, - const char* methodName, - const char* methodSpec, - object this_, - va_list arguments) - { - Thread* t = static_cast(vmt); - - assertT( - t, - t->state == Thread::ActiveState or t->state == Thread::ExclusiveState); - - if (UNLIKELY(t->sp + parameterFootprint(vmt, methodSpec, false) - > stackSizeInWords(t) / 2)) { - throwNew(t, GcStackOverflowError::Type); - } - - pushArguments(t, this_, methodSpec, false, arguments); - - GcMethod* method - = resolveMethod(t, loader, className, methodName, methodSpec); - - assertT(t, ((method->flags() & ACC_STATIC) == 0) xor (this_ == 0)); - - return local::invoke(t, method); - } - - virtual object getStackTrace(vm::Thread* t, vm::Thread*) - { - // not implemented - return makeObjectArray(t, 0); - } - - virtual void initialize(BootImage*, avian::util::Slice) - { - abort(s); - } - - virtual void addCompilationHandler(CompilationHandler*) - { - abort(s); - } - - virtual void compileMethod(vm::Thread*, - Zone*, - GcTriple**, - GcTriple**, - avian::codegen::DelayedPromise**, - GcMethod*, - OffsetResolver*, - JavaVM*) - { - abort(s); - } - - virtual void visitRoots(vm::Thread*, HeapWalker*) - { - abort(s); - } - - virtual void normalizeVirtualThunks(vm::Thread*) - { - abort(s); - } - - virtual unsigned* makeCallTable(vm::Thread*, HeapWalker*) - { - abort(s); - } - - virtual void boot(vm::Thread*, BootImage* image, uint8_t* code) - { - expect(s, image == 0 and code == 0); - } - - virtual void callWithCurrentContinuation(vm::Thread*, object) - { - abort(s); - } - - virtual void dynamicWind(vm::Thread*, object, object, object) - { - abort(s); - } - - virtual void feedResultToContinuation(vm::Thread*, GcContinuation*, object) - { - abort(s); - } - - virtual void feedExceptionToContinuation(vm::Thread*, - GcContinuation*, - GcThrowable*) - { - abort(s); - } - - virtual void walkContinuationBody(vm::Thread*, - Heap::Walker*, - object, - unsigned) - { - abort(s); - } - - virtual void dispose(vm::Thread* t) - { - t->m->heap->free(t, sizeof(Thread) + t->m->stackSizeInBytes); - } - - virtual void dispose() - { - signals.setCrashDumpDirectory(0); - this->~MyProcessor(); - allocator->free(this, sizeof(*this)); - } - - System* s; - Allocator* allocator; - SignalRegistrar signals; -}; - -} // namespace - -namespace vm { - -Processor* makeProcessor(System* system, - Allocator* allocator, - const char* crashDumpDirectory, - bool) -{ - return new (allocator->allocate(sizeof(local::MyProcessor))) - local::MyProcessor(system, allocator, crashDumpDirectory); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/jnienv.cpp b/sgx-jvm/avian/src/jnienv.cpp deleted file mode 100644 index f9c1d28aff..0000000000 --- a/sgx-jvm/avian/src/jnienv.cpp +++ /dev/null @@ -1,3807 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/jnienv.h" -#include "avian/machine.h" -#include "avian/util.h" -#include "avian/processor.h" -#include "avian/constants.h" - -#include - -using namespace vm; - -namespace { - -namespace local { - -jint JNICALL AttachCurrentThread(Machine* m, Thread** t, void*) -{ - *t = static_cast(m->localThread->get()); - if (*t == 0) { - *t = attachThread(m, false); - } - return 0; -} - -jint JNICALL AttachCurrentThreadAsDaemon(Machine* m, Thread** t, void*) -{ - *t = static_cast(m->localThread->get()); - if (*t == 0) { - *t = attachThread(m, true); - } - return 0; -} - -jint JNICALL DetachCurrentThread(Machine* m) -{ - Thread* t = static_cast(m->localThread->get()); - if (t) { - // todo: detaching the root thread seems to cause stability - // problems which I haven't yet had a chance to investigate - // thoroughly. Meanwhile, we just ignore requests to detach it, - // which leaks a bit of memory but should be harmless otherwise. - if (m->rootThread != t) { - m->localThread->set(0); - - ACQUIRE_RAW(t, t->m->stateLock); - - enter(t, Thread::ActiveState); - - t->javaThread->peer() = 0; - - enter(t, Thread::ZombieState); - - t->state = Thread::JoinedState; - } - - return 0; - } else { - return -1; - } -} - -uint64_t destroyJavaVM(Thread* t, uintptr_t*) -{ - // wait for other non-daemon threads to exit - { - ACQUIRE(t, t->m->stateLock); - while (t->m->liveCount - t->m->daemonCount > 1) { - t->m->stateLock->wait(t->systemThread, 0); - } - } - { - ENTER(t, Thread::ActiveState); - - t->m->classpath->shutDown(t); - } - // wait again in case the Classpath::shutDown process started new - // threads: - { - ACQUIRE(t, t->m->stateLock); - while (t->m->liveCount - t->m->daemonCount > 1) { - t->m->stateLock->wait(t->systemThread, 0); - } - - enter(t, Thread::ExclusiveState); - } - shutDown(t); - - return 1; -} - -jint JNICALL DestroyJavaVM(Machine* m) -{ - Thread* t; - AttachCurrentThread(m, &t, 0); - - if (runRaw(t, destroyJavaVM, 0)) { - t->exit(); - return 0; - } else { - return -1; - } -} - -jint JNICALL GetEnv(Machine* m, Thread** t, jint version) -{ - *t = static_cast(m->localThread->get()); - if (*t) { - if (version <= JNI_VERSION_1_6) { - return AVIAN_JNI_OK; - } else { - return AVIAN_JNI_EVERSION; - } - } else { - return AVIAN_JNI_EDETACHED; - } -} - -jint JNICALL GetVersion(Thread* t) -{ - ENTER(t, Thread::ActiveState); - - return JNI_VERSION_1_6; -} - -jsize JNICALL GetStringLength(Thread* t, jstring s) -{ - ENTER(t, Thread::ActiveState); - - return (*s)->length(t); -} - -const jchar* JNICALL GetStringChars(Thread* t, jstring s, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - jchar* chars = static_cast( - t->m->heap->allocate(((*s)->length(t) + 1) * sizeof(jchar))); - stringChars(t, *s, chars); - - if (isCopy) - *isCopy = true; - return chars; -} - -void JNICALL ReleaseStringChars(Thread* t, jstring s, const jchar* chars) -{ - ENTER(t, Thread::ActiveState); - - t->m->heap->free(chars, ((*s)->length(t) + 1) * sizeof(jchar)); -} - -void JNICALL - GetStringRegion(Thread* t, jstring s, jsize start, jsize length, jchar* dst) -{ - ENTER(t, Thread::ActiveState); - - stringChars(t, *s, start, length, dst); -} - -const jchar* JNICALL GetStringCritical(Thread* t, jstring s, jboolean* isCopy) -{ - if (t->criticalLevel == 0) { - enter(t, Thread::ActiveState); - } - - ++t->criticalLevel; - - if (isCopy) { - *isCopy = true; - } - - object data = (*s)->data(); - if (objectClass(t, data) == type(t, GcByteArray::Type)) { - return GetStringChars(t, s, isCopy); - } else { - return &cast(t, data)->body()[(*s)->offset(t)]; - } -} - -void JNICALL ReleaseStringCritical(Thread* t, jstring s, const jchar* chars) -{ - if (objectClass(t, (*s)->data()) == type(t, GcByteArray::Type)) { - ReleaseStringChars(t, s, chars); - } - - if ((--t->criticalLevel) == 0) { - enter(t, Thread::IdleState); - } -} - -jsize JNICALL GetStringUTFLength(Thread* t, jstring s) -{ - ENTER(t, Thread::ActiveState); - - return stringUTFLength(t, *s); -} - -const char* JNICALL GetStringUTFChars(Thread* t, jstring s, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - int length = stringUTFLength(t, *s); - char* chars = static_cast(t->m->heap->allocate(length + 1)); - stringUTFChars(t, *s, chars, length); - - if (isCopy) - *isCopy = true; - return chars; -} - -void JNICALL ReleaseStringUTFChars(Thread* t, jstring s, const char* chars) -{ - ENTER(t, Thread::ActiveState); - - t->m->heap->free(chars, stringUTFLength(t, *s) + 1); -} - -void JNICALL GetStringUTFRegion(Thread* t, - jstring s, - jsize start, - jsize length, - char* dst) -{ - ENTER(t, Thread::ActiveState); - - stringUTFChars( - t, *s, start, length, dst, stringUTFLength(t, *s, start, length)); -} - -jsize JNICALL GetArrayLength(Thread* t, jarray array) -{ - ENTER(t, Thread::ActiveState); - - return fieldAtOffset(*array, BytesPerWord); -} - -uint64_t newString(Thread* t, uintptr_t* arguments) -{ - const jchar* chars = reinterpret_cast(arguments[0]); - jsize size = arguments[1]; - - GcCharArray* a = makeCharArray(t, size); - if (size) { - memcpy(a->body().begin(), chars, size * sizeof(jchar)); - } - - return reinterpret_cast( - makeLocalReference(t, t->m->classpath->makeString(t, a, 0, size))); -} - -jstring JNICALL NewString(Thread* t, const jchar* chars, jsize size) -{ - if (chars == 0) - return 0; - - uintptr_t arguments[] - = {reinterpret_cast(chars), static_cast(size)}; - - return reinterpret_cast(run(t, newString, arguments)); -} - -uint64_t newStringUTF(Thread* t, uintptr_t* arguments) -{ - const char* chars = reinterpret_cast(arguments[0]); - - object array = parseUtf8(t, chars, strlen(chars)); - - return reinterpret_cast(makeLocalReference( - t, - t->m->classpath->makeString( - t, array, 0, fieldAtOffset(array, BytesPerWord) - 1))); -} - -jstring JNICALL NewStringUTF(Thread* t, const char* chars) -{ - if (chars == 0) - return 0; - - uintptr_t arguments[] = {reinterpret_cast(chars)}; - - return reinterpret_cast(run(t, newStringUTF, arguments)); -} - -void replace(int a, int b, const char* in, int8_t* out) -{ - while (*in) { - *out = (*in == a ? b : *in); - ++in; - ++out; - } - *out = 0; -} - -uint64_t defineClass(Thread* t, uintptr_t* arguments) -{ - jobject loader = reinterpret_cast(arguments[0]); - const uint8_t* buffer = reinterpret_cast(arguments[1]); - jsize length = arguments[2]; - - return reinterpret_cast(makeLocalReference( - t, - getJClass( - t, - cast(t, - defineClass(t, - loader ? cast(t, *loader) - : roots(t)->bootLoader(), - buffer, - length))))); -} - -jclass JNICALL DefineClass(Thread* t, - const char*, - jobject loader, - const jbyte* buffer, - jsize length) -{ - uintptr_t arguments[] = {reinterpret_cast(loader), - reinterpret_cast(buffer), - static_cast(length)}; - - return reinterpret_cast(run(t, defineClass, arguments)); -} - -uint64_t findClass(Thread* t, uintptr_t* arguments) -{ - const char* name = reinterpret_cast(arguments[0]); - - GcByteArray* n = makeByteArray(t, strlen(name) + 1); - replace('.', '/', name, n->body().begin()); - - GcMethod* caller = getCaller(t, 0); - - GcClass* c - = resolveClass(t, - caller ? t->m->classpath->libraryClassLoader(t, caller) - : roots(t)->appLoader(), - n); - - if (t->m->classpath->mayInitClasses()) { - PROTECT(t, c); - - initClass(t, c); - } - - return reinterpret_cast(makeLocalReference(t, getJClass(t, c))); -} - -jclass JNICALL FindClass(Thread* t, const char* name) -{ - uintptr_t arguments[] = {reinterpret_cast(name)}; - - return reinterpret_cast(run(t, findClass, arguments)); -} - -uint64_t throwNew(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - const char* message = reinterpret_cast(arguments[1]); - - GcString* m = 0; - PROTECT(t, m); - - if (message) { - m = makeString(t, "%s", message); - } - - object trace = makeTrace(t); - PROTECT(t, trace); - - t->exception = cast(t, make(t, (*c)->vmClass())); - t->exception->setMessage(t, m); - t->exception->setTrace(t, trace); - - return 1; -} - -jint JNICALL ThrowNew(Thread* t, jclass c, const char* message) -{ - if (t->exception) { - return -1; - } - - uintptr_t arguments[] - = {reinterpret_cast(c), reinterpret_cast(message)}; - - return run(t, throwNew, arguments) ? 0 : -1; -} - -jint JNICALL Throw(Thread* t, jthrowable throwable) -{ - if (t->exception) { - return -1; - } - - ENTER(t, Thread::ActiveState); - - t->exception = *throwable; - - return 0; -} - -jobject JNICALL NewLocalRef(Thread* t, jobject o) -{ - ENTER(t, Thread::ActiveState); - - return makeLocalReference(t, *o); -} - -void JNICALL DeleteLocalRef(Thread* t, jobject r) -{ - ENTER(t, Thread::ActiveState); - - disposeLocalReference(t, r); -} - -jboolean JNICALL ExceptionCheck(Thread* t) -{ - return t->exception != 0; -} - -uint64_t getObjectClass(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - - return reinterpret_cast( - makeLocalReference(t, getJClass(t, objectClass(t, *o)))); -} - -jclass JNICALL GetObjectClass(Thread* t, jobject o) -{ - uintptr_t arguments[] = {reinterpret_cast(o)}; - - return reinterpret_cast(run(t, getObjectClass, arguments)); -} - -uint64_t getSuperclass(Thread* t, uintptr_t* arguments) -{ - GcClass* class_ = (*reinterpret_cast(arguments[0]))->vmClass(); - if (class_->flags() & ACC_INTERFACE) { - return 0; - } else { - GcClass* super = class_->super(); - return super ? reinterpret_cast( - makeLocalReference(t, getJClass(t, super))) - : 0; - } -} - -jclass JNICALL GetSuperclass(Thread* t, jclass c) -{ - uintptr_t arguments[] = {reinterpret_cast(c)}; - - return reinterpret_cast(run(t, getSuperclass, arguments)); -} - -uint64_t isInstanceOf(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jclass c = reinterpret_cast(arguments[1]); - - return instanceOf(t, (*c)->vmClass(), *o); -} - -jboolean JNICALL IsInstanceOf(Thread* t, jobject o, jclass c) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), reinterpret_cast(c)}; - - return run(t, isInstanceOf, arguments); -} - -uint64_t isAssignableFrom(Thread* t, uintptr_t* arguments) -{ - jclass b = reinterpret_cast(arguments[0]); - jclass a = reinterpret_cast(arguments[1]); - - return isAssignableFrom(t, (*a)->vmClass(), (*b)->vmClass()); -} - -jboolean JNICALL IsAssignableFrom(Thread* t, jclass b, jclass a) -{ - uintptr_t arguments[] - = {reinterpret_cast(b), reinterpret_cast(a)}; - - return run(t, isAssignableFrom, arguments); -} - -GcMethod* findMethod(Thread* t, jclass c, const char* name, const char* spec) -{ - GcByteArray* n = makeByteArray(t, "%s", name); - PROTECT(t, n); - - GcByteArray* s = makeByteArray(t, "%s", spec); - return vm::findMethod(t, (*c)->vmClass(), n, s); -} - -jint methodID(Thread* t, GcMethod* method) -{ - int id = method->nativeID(); - - loadMemoryBarrier(); - - if (id == 0) { - PROTECT(t, method); - - ACQUIRE(t, t->m->referenceLock); - - if (method->nativeID() == 0) { - GcVector* v = vectorAppend(t, roots(t)->jNIMethodTable(), method); - // sequence point, for gc (don't recombine statements) - roots(t)->setJNIMethodTable(t, v); - - storeStoreMemoryBarrier(); - - method->nativeID() = roots(t)->jNIMethodTable()->size(); - } - } - - return method->nativeID(); -} - -uint64_t getMethodID(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - const char* name = reinterpret_cast(arguments[1]); - const char* spec = reinterpret_cast(arguments[2]); - - GcMethod* method = findMethod(t, c, name, spec); - - assertT(t, (method->flags() & ACC_STATIC) == 0); - - return methodID(t, method); -} - -jmethodID JNICALL - GetMethodID(Thread* t, jclass c, const char* name, const char* spec) -{ - uintptr_t arguments[] = {reinterpret_cast(c), - reinterpret_cast(name), - reinterpret_cast(spec)}; - - return run(t, getMethodID, arguments); -} - -uint64_t getStaticMethodID(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - const char* name = reinterpret_cast(arguments[1]); - const char* spec = reinterpret_cast(arguments[2]); - - GcMethod* method = findMethod(t, c, name, spec); - - assertT(t, method->flags() & ACC_STATIC); - - return methodID(t, method); -} - -jmethodID JNICALL - GetStaticMethodID(Thread* t, jclass c, const char* name, const char* spec) -{ - uintptr_t arguments[] = {reinterpret_cast(c), - reinterpret_cast(name), - reinterpret_cast(spec)}; - - return run(t, getStaticMethodID, arguments); -} - -GcMethod* getMethod(Thread* t, jmethodID m) -{ - assertT(t, m); - - GcMethod* method - = cast(t, roots(t)->jNIMethodTable()->body()[m - 1]); - - assertT(t, (method->flags() & ACC_STATIC) == 0); - - return method; -} - -uint64_t newObjectV(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - va_list* a = reinterpret_cast(arguments[2]); - - object o = make(t, (*c)->vmClass()); - PROTECT(t, o); - - t->m->processor->invokeList(t, getMethod(t, m), o, true, *a); - - return reinterpret_cast(makeLocalReference(t, o)); -} - -jobject JNICALL NewObjectV(Thread* t, jclass c, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(c), - m, - reinterpret_cast(VA_LIST(a))}; - - return reinterpret_cast(run(t, newObjectV, arguments)); -} - -jobject JNICALL NewObject(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jobject r = NewObjectV(t, c, m, a); - - va_end(a); - - return r; -} - -uint64_t newObjectA(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - const jvalue* a = reinterpret_cast(arguments[2]); - - object o = make(t, (*c)->vmClass()); - PROTECT(t, o); - - t->m->processor->invokeArray(t, getMethod(t, m), o, a); - - return reinterpret_cast(makeLocalReference(t, o)); -} - -jobject JNICALL NewObjectA(Thread* t, jclass c, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(c), m, reinterpret_cast(a)}; - - return reinterpret_cast(run(t, newObjectA, arguments)); -} - -uint64_t callObjectMethodV(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - va_list* a = reinterpret_cast(arguments[2]); - - return reinterpret_cast(makeLocalReference( - t, t->m->processor->invokeList(t, getMethod(t, m), *o, true, *a))); -} - -jobject JNICALL CallObjectMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return reinterpret_cast(run(t, callObjectMethodV, arguments)); -} - -jobject JNICALL CallObjectMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jobject r = CallObjectMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -uint64_t callObjectMethodA(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - const jvalue* a = reinterpret_cast(arguments[2]); - - return reinterpret_cast(makeLocalReference( - t, t->m->processor->invokeArray(t, getMethod(t, m), *o, a))); -} - -jobject JNICALL - CallObjectMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return reinterpret_cast(run(t, callObjectMethodA, arguments)); -} - -uint64_t callIntMethodV(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - va_list* a = reinterpret_cast(arguments[2]); - - return cast( - t, t->m->processor->invokeList(t, getMethod(t, m), *o, true, *a)) - ->value(); -} - -jboolean JNICALL - CallBooleanMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return run(t, callIntMethodV, arguments) != 0; -} - -jboolean JNICALL CallBooleanMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jboolean r = CallBooleanMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -uint64_t callIntMethodA(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - const jvalue* a = reinterpret_cast(arguments[2]); - - return cast(t, t->m->processor->invokeArray(t, getMethod(t, m), *o, a)) - ->value(); -} - -jboolean JNICALL - CallBooleanMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return run(t, callIntMethodA, arguments) != 0; -} - -jbyte JNICALL CallByteMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return run(t, callIntMethodV, arguments); -} - -jbyte JNICALL CallByteMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jbyte r = CallByteMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -jbyte JNICALL - CallByteMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return run(t, callIntMethodA, arguments); -} - -jchar JNICALL CallCharMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return run(t, callIntMethodV, arguments); -} - -jchar JNICALL CallCharMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jchar r = CallCharMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -jchar JNICALL - CallCharMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return run(t, callIntMethodA, arguments); -} - -jshort JNICALL CallShortMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return run(t, callIntMethodV, arguments); -} - -jshort JNICALL CallShortMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jshort r = CallShortMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -jshort JNICALL - CallShortMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return run(t, callIntMethodA, arguments); -} - -jint JNICALL CallIntMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return run(t, callIntMethodV, arguments); -} - -jint JNICALL CallIntMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jint r = CallIntMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -jint JNICALL CallIntMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return run(t, callIntMethodA, arguments); -} - -uint64_t callLongMethodV(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - va_list* a = reinterpret_cast(arguments[2]); - - return cast( - t, t->m->processor->invokeList(t, getMethod(t, m), *o, true, *a)) - ->value(); -} - -jlong JNICALL CallLongMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return run(t, callLongMethodV, arguments); -} - -jlong JNICALL CallLongMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jlong r = CallLongMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -uint64_t callLongMethodA(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - const jvalue* a = reinterpret_cast(arguments[2]); - - return cast(t, - t->m->processor->invokeArray(t, getMethod(t, m), *o, a)) - ->value(); -} - -jlong JNICALL - CallLongMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return run(t, callLongMethodA, arguments); -} - -jfloat JNICALL CallFloatMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return bitsToFloat(run(t, callIntMethodV, arguments)); -} - -jfloat JNICALL CallFloatMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jfloat r = CallFloatMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -jfloat JNICALL - CallFloatMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return bitsToFloat(run(t, callIntMethodA, arguments)); -} - -jdouble JNICALL CallDoubleMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - return bitsToDouble(run(t, callLongMethodV, arguments)); -} - -jdouble JNICALL CallDoubleMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jdouble r = CallDoubleMethodV(t, o, m, a); - - va_end(a); - - return r; -} - -jdouble JNICALL - CallDoubleMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - return bitsToDouble(run(t, callLongMethodA, arguments)); -} - -uint64_t callVoidMethodV(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - va_list* a = reinterpret_cast(arguments[2]); - - t->m->processor->invokeList(t, getMethod(t, m), *o, true, *a); - - return 0; -} - -void JNICALL CallVoidMethodV(Thread* t, jobject o, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {reinterpret_cast(o), - m, - reinterpret_cast(VA_LIST(a))}; - - run(t, callVoidMethodV, arguments); -} - -void JNICALL CallVoidMethod(Thread* t, jobject o, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - CallVoidMethodV(t, o, m, a); - - va_end(a); -} - -uint64_t callVoidMethodA(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - jmethodID m = arguments[1]; - const jvalue* a = reinterpret_cast(arguments[2]); - - t->m->processor->invokeArray(t, getMethod(t, m), *o, a); - - return 0; -} - -void JNICALL CallVoidMethodA(Thread* t, jobject o, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), m, reinterpret_cast(a)}; - - run(t, callVoidMethodA, arguments); -} - -GcMethod* getStaticMethod(Thread* t, jmethodID m) -{ - assertT(t, m); - - GcMethod* method - = cast(t, roots(t)->jNIMethodTable()->body()[m - 1]); - - assertT(t, method->flags() & ACC_STATIC); - - return method; -} - -uint64_t callStaticObjectMethodV(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[0]; - va_list* a = reinterpret_cast(arguments[1]); - - return reinterpret_cast(makeLocalReference( - t, t->m->processor->invokeList(t, getStaticMethod(t, m), 0, true, *a))); -} - -jobject JNICALL - CallStaticObjectMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return reinterpret_cast(run(t, callStaticObjectMethodV, arguments)); -} - -jobject JNICALL CallStaticObjectMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jobject r = CallStaticObjectMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -uint64_t callStaticObjectMethodA(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[0]; - const jvalue* a = reinterpret_cast(arguments[1]); - - return reinterpret_cast(makeLocalReference( - t, t->m->processor->invokeArray(t, getStaticMethod(t, m), 0, a))); -} - -jobject JNICALL - CallStaticObjectMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return reinterpret_cast(run(t, callStaticObjectMethodA, arguments)); -} - -uint64_t callStaticIntMethodV(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[0]; - va_list* a = reinterpret_cast(arguments[1]); - - return cast(t, - t->m->processor->invokeList( - t, getStaticMethod(t, m), 0, true, *a))->value(); -} - -jboolean JNICALL - CallStaticBooleanMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return run(t, callStaticIntMethodV, arguments) != 0; -} - -jboolean JNICALL CallStaticBooleanMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jboolean r = CallStaticBooleanMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -uint64_t callStaticIntMethodA(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[0]; - const jvalue* a = reinterpret_cast(arguments[1]); - - return cast( - t, t->m->processor->invokeArray(t, getStaticMethod(t, m), 0, a)) - ->value(); -} - -jboolean JNICALL - CallStaticBooleanMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return run(t, callStaticIntMethodA, arguments) != 0; -} - -jbyte JNICALL CallStaticByteMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return run(t, callStaticIntMethodV, arguments); -} - -jbyte JNICALL CallStaticByteMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jbyte r = CallStaticByteMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -jbyte JNICALL - CallStaticByteMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return run(t, callStaticIntMethodA, arguments); -} - -jchar JNICALL CallStaticCharMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return run(t, callStaticIntMethodV, arguments); -} - -jchar JNICALL CallStaticCharMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jchar r = CallStaticCharMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -jchar JNICALL - CallStaticCharMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return run(t, callStaticIntMethodA, arguments); -} - -jshort JNICALL CallStaticShortMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return run(t, callStaticIntMethodV, arguments); -} - -jshort JNICALL CallStaticShortMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jshort r = CallStaticShortMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -jshort JNICALL - CallStaticShortMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return run(t, callStaticIntMethodA, arguments); -} - -jint JNICALL CallStaticIntMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return run(t, callStaticIntMethodV, arguments); -} - -jint JNICALL CallStaticIntMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jint r = CallStaticIntMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -jint JNICALL - CallStaticIntMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return run(t, callStaticIntMethodA, arguments); -} - -uint64_t callStaticLongMethodV(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[0]; - va_list* a = reinterpret_cast(arguments[1]); - - return cast(t, - t->m->processor->invokeList( - t, getStaticMethod(t, m), 0, true, *a))->value(); -} - -jlong JNICALL CallStaticLongMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return run(t, callStaticLongMethodV, arguments); -} - -jlong JNICALL CallStaticLongMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jlong r = CallStaticLongMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -uint64_t callStaticLongMethodA(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[0]; - const jvalue* a = reinterpret_cast(arguments[1]); - - return cast( - t, t->m->processor->invokeArray(t, getStaticMethod(t, m), 0, a)) - ->value(); -} - -jlong JNICALL - CallStaticLongMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return run(t, callStaticLongMethodA, arguments); -} - -jfloat JNICALL CallStaticFloatMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return bitsToFloat(run(t, callStaticIntMethodV, arguments)); -} - -jfloat JNICALL CallStaticFloatMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jfloat r = CallStaticFloatMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -jfloat JNICALL - CallStaticFloatMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return bitsToFloat(run(t, callStaticIntMethodA, arguments)); -} - -jdouble JNICALL - CallStaticDoubleMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - return bitsToDouble(run(t, callStaticLongMethodV, arguments)); -} - -jdouble JNICALL CallStaticDoubleMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - jdouble r = CallStaticDoubleMethodV(t, c, m, a); - - va_end(a); - - return r; -} - -jdouble JNICALL - CallStaticDoubleMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - return bitsToDouble(run(t, callStaticLongMethodA, arguments)); -} - -uint64_t callStaticVoidMethodV(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[0]; - va_list* a = reinterpret_cast(arguments[1]); - - t->m->processor->invokeList(t, getStaticMethod(t, m), 0, true, *a); - - return 0; -} - -void JNICALL CallStaticVoidMethodV(Thread* t, jclass, jmethodID m, va_list a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(VA_LIST(a))}; - - run(t, callStaticVoidMethodV, arguments); -} - -void JNICALL CallStaticVoidMethod(Thread* t, jclass c, jmethodID m, ...) -{ - va_list a; - va_start(a, m); - - CallStaticVoidMethodV(t, c, m, a); - - va_end(a); -} - -uint64_t callStaticVoidMethodA(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[0]; - const jvalue* a = reinterpret_cast(arguments[1]); - - t->m->processor->invokeArray(t, getStaticMethod(t, m), 0, a); - - return 0; -} - -void JNICALL - CallStaticVoidMethodA(Thread* t, jclass, jmethodID m, const jvalue* a) -{ - uintptr_t arguments[] = {m, reinterpret_cast(a)}; - - run(t, callStaticVoidMethodA, arguments); -} - -jint fieldID(Thread* t, GcField* field) -{ - int id = field->nativeID(); - - loadMemoryBarrier(); - - if (id == 0) { - PROTECT(t, field); - - ACQUIRE(t, t->m->referenceLock); - - if (field->nativeID() == 0) { - GcVector* v = vectorAppend(t, roots(t)->jNIFieldTable(), field); - // sequence point, for gc (don't recombine statements) - roots(t)->setJNIFieldTable(t, v); - - storeStoreMemoryBarrier(); - - field->nativeID() = roots(t)->jNIFieldTable()->size(); - } - } - - return field->nativeID(); -} - -uint64_t getFieldID(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - const char* name = reinterpret_cast(arguments[1]); - const char* spec = reinterpret_cast(arguments[2]); - - return fieldID(t, resolveField(t, (*c)->vmClass(), name, spec)); -} - -jfieldID JNICALL - GetFieldID(Thread* t, jclass c, const char* name, const char* spec) -{ - uintptr_t arguments[] = {reinterpret_cast(c), - reinterpret_cast(name), - reinterpret_cast(spec)}; - - return run(t, getFieldID, arguments); -} - -jfieldID JNICALL - GetStaticFieldID(Thread* t, jclass c, const char* name, const char* spec) -{ - uintptr_t arguments[] = {reinterpret_cast(c), - reinterpret_cast(name), - reinterpret_cast(spec)}; - - return run(t, getFieldID, arguments); -} - -GcField* getField(Thread* t, jfieldID f) -{ - assertT(t, f); - - GcField* field = cast(t, roots(t)->jNIFieldTable()->body()[f - 1]); - - assertT(t, (field->flags() & ACC_STATIC) == 0); - - return field; -} - -uint64_t getObjectField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return reinterpret_cast( - makeLocalReference(t, fieldAtOffset(*o, field->offset()))); -} - -jobject JNICALL GetObjectField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return reinterpret_cast(run(t, getObjectField, arguments)); -} - -uint64_t getBooleanField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(*o, field->offset()); -} - -jboolean JNICALL GetBooleanField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return run(t, getBooleanField, arguments); -} - -uint64_t getByteField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(*o, field->offset()); -} - -jbyte JNICALL GetByteField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return run(t, getByteField, arguments); -} - -uint64_t getCharField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(*o, field->offset()); -} - -jchar JNICALL GetCharField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return run(t, getCharField, arguments); -} - -uint64_t getShortField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(*o, field->offset()); -} - -jshort JNICALL GetShortField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return run(t, getShortField, arguments); -} - -uint64_t getIntField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(*o, field->offset()); -} - -jint JNICALL GetIntField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return run(t, getIntField, arguments); -} - -uint64_t getLongField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(*o, field->offset()); -} - -jlong JNICALL GetLongField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return run(t, getLongField, arguments); -} - -uint64_t getFloatField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return floatToBits(fieldAtOffset(*o, field->offset())); -} - -jfloat JNICALL GetFloatField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return bitsToFloat(run(t, getFloatField, arguments)); -} - -uint64_t getDoubleField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return doubleToBits(fieldAtOffset(*o, field->offset())); -} - -jdouble JNICALL GetDoubleField(Thread* t, jobject o, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field}; - - return bitsToDouble(run(t, getDoubleField, arguments)); -} - -uint64_t setObjectField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jobject v = reinterpret_cast(arguments[2]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - setField(t, *o, field->offset(), (v ? *v : 0)); - - return 1; -} - -void JNICALL SetObjectField(Thread* t, jobject o, jfieldID field, jobject v) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), field, reinterpret_cast(v)}; - - run(t, setObjectField, arguments); -} - -uint64_t setBooleanField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jboolean v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(*o, field->offset()) = v; - - return 1; -} - -void JNICALL SetBooleanField(Thread* t, jobject o, jfieldID field, jboolean v) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field, v}; - - run(t, setBooleanField, arguments); -} - -uint64_t setByteField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jbyte v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(*o, field->offset()) = v; - - return 1; -} - -void JNICALL SetByteField(Thread* t, jobject o, jfieldID field, jbyte v) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), field, static_cast(v)}; - - run(t, setByteField, arguments); -} - -uint64_t setCharField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jchar v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(*o, field->offset()) = v; - - return 1; -} - -void JNICALL SetCharField(Thread* t, jobject o, jfieldID field, jchar v) -{ - uintptr_t arguments[] = {reinterpret_cast(o), field, v}; - - run(t, setCharField, arguments); -} - -uint64_t setShortField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jshort v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(*o, field->offset()) = v; - - return 1; -} - -void JNICALL SetShortField(Thread* t, jobject o, jfieldID field, jshort v) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), field, static_cast(v)}; - - run(t, setShortField, arguments); -} - -uint64_t setIntField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jint v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(*o, field->offset()) = v; - - return 1; -} - -void JNICALL SetIntField(Thread* t, jobject o, jfieldID field, jint v) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), field, static_cast(v)}; - - run(t, setIntField, arguments); -} - -uint64_t setLongField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jlong v; - memcpy(&v, arguments + 2, sizeof(jlong)); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(*o, field->offset()) = v; - - return 1; -} - -void JNICALL SetLongField(Thread* t, jobject o, jfieldID field, jlong v) -{ - uintptr_t arguments[2 + (sizeof(jlong) / BytesPerWord)]; - arguments[0] = reinterpret_cast(o); - arguments[1] = field; - memcpy(arguments + 2, &v, sizeof(jlong)); - - run(t, setLongField, arguments); -} - -uint64_t setFloatField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jfloat v = bitsToFloat(arguments[2]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(*o, field->offset()) = v; - - return 1; -} - -void JNICALL SetFloatField(Thread* t, jobject o, jfieldID field, jfloat v) -{ - uintptr_t arguments[] - = {reinterpret_cast(o), field, floatToBits(v)}; - - run(t, setFloatField, arguments); -} - -uint64_t setDoubleField(Thread* t, uintptr_t* arguments) -{ - jobject o = reinterpret_cast(arguments[0]); - GcField* field = getField(t, arguments[1]); - jdouble v; - memcpy(&v, arguments + 2, sizeof(jdouble)); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(*o, field->offset()) = v; - - return 1; -} - -void JNICALL SetDoubleField(Thread* t, jobject o, jfieldID field, jdouble v) -{ - uintptr_t arguments[2 + (sizeof(jdouble) / BytesPerWord)]; - arguments[0] = reinterpret_cast(o); - arguments[1] = field; - memcpy(arguments + 2, &v, sizeof(jdouble)); - - run(t, setDoubleField, arguments); -} - -GcField* getStaticField(Thread* t, jfieldID f) -{ - assertT(t, f); - - GcField* field = cast(t, roots(t)->jNIFieldTable()->body()[f - 1]); - - assertT(t, field->flags() & ACC_STATIC); - - return field; -} - -uint64_t getStaticObjectField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return reinterpret_cast(makeLocalReference( - t, fieldAtOffset(c->vmClass()->staticTable(), field->offset()))); -} - -jobject JNICALL GetStaticObjectField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return reinterpret_cast(run(t, getStaticObjectField, arguments)); -} - -uint64_t getStaticBooleanField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(c->vmClass()->staticTable(), field->offset()); -} - -jboolean JNICALL GetStaticBooleanField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return run(t, getStaticBooleanField, arguments); -} - -uint64_t getStaticByteField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(c->vmClass()->staticTable(), field->offset()); -} - -jbyte JNICALL GetStaticByteField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return run(t, getStaticByteField, arguments); -} - -uint64_t getStaticCharField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(c->vmClass()->staticTable(), field->offset()); -} - -jchar JNICALL GetStaticCharField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return run(t, getStaticCharField, arguments); -} - -uint64_t getStaticShortField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(c->vmClass()->staticTable(), field->offset()); -} - -jshort JNICALL GetStaticShortField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return run(t, getStaticShortField, arguments); -} - -uint64_t getStaticIntField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(c->vmClass()->staticTable(), field->offset()); -} - -jint JNICALL GetStaticIntField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return run(t, getStaticIntField, arguments); -} - -uint64_t getStaticLongField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return fieldAtOffset(c->vmClass()->staticTable(), field->offset()); -} - -jlong JNICALL GetStaticLongField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return run(t, getStaticLongField, arguments); -} - -uint64_t getStaticFloatField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return floatToBits( - fieldAtOffset(c->vmClass()->staticTable(), field->offset())); -} - -jfloat JNICALL GetStaticFloatField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return bitsToFloat(run(t, getStaticFloatField, arguments)); -} - -uint64_t getStaticDoubleField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_READ(t, field); - - return doubleToBits( - fieldAtOffset(c->vmClass()->staticTable(), field->offset())); -} - -jdouble JNICALL GetStaticDoubleField(Thread* t, jclass c, jfieldID field) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field}; - - return bitsToDouble(run(t, getStaticDoubleField, arguments)); -} - -uint64_t setStaticObjectField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jobject v = reinterpret_cast(arguments[2]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - setField(t, c->vmClass()->staticTable(), field->offset(), (v ? *v : 0)); - - return 1; -} - -void JNICALL - SetStaticObjectField(Thread* t, jclass c, jfieldID field, jobject v) -{ - uintptr_t arguments[] - = {reinterpret_cast(c), field, reinterpret_cast(v)}; - - run(t, setStaticObjectField, arguments); -} - -uint64_t setStaticBooleanField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jboolean v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(c->vmClass()->staticTable(), field->offset()) = v; - - return 1; -} - -void JNICALL - SetStaticBooleanField(Thread* t, jclass c, jfieldID field, jboolean v) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field, v}; - - run(t, setStaticBooleanField, arguments); -} - -uint64_t setStaticByteField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jbyte v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(c->vmClass()->staticTable(), field->offset()) = v; - - return 1; -} - -void JNICALL SetStaticByteField(Thread* t, jclass c, jfieldID field, jbyte v) -{ - uintptr_t arguments[] - = {reinterpret_cast(c), field, static_cast(v)}; - - run(t, setStaticByteField, arguments); -} - -uint64_t setStaticCharField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jchar v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(c->vmClass()->staticTable(), field->offset()) = v; - - return 1; -} - -void JNICALL SetStaticCharField(Thread* t, jclass c, jfieldID field, jchar v) -{ - uintptr_t arguments[] = {reinterpret_cast(c), field, v}; - - run(t, setStaticCharField, arguments); -} - -uint64_t setStaticShortField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jshort v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(c->vmClass()->staticTable(), field->offset()) = v; - - return 1; -} - -void JNICALL SetStaticShortField(Thread* t, jclass c, jfieldID field, jshort v) -{ - uintptr_t arguments[] - = {reinterpret_cast(c), field, static_cast(v)}; - - run(t, setStaticShortField, arguments); -} - -uint64_t setStaticIntField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jint v = arguments[2]; - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(c->vmClass()->staticTable(), field->offset()) = v; - - return 1; -} - -void JNICALL SetStaticIntField(Thread* t, jclass c, jfieldID field, jint v) -{ - uintptr_t arguments[] - = {reinterpret_cast(c), field, static_cast(v)}; - - run(t, setStaticIntField, arguments); -} - -uint64_t setStaticLongField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jlong v; - memcpy(&v, arguments + 2, sizeof(jlong)); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(c->vmClass()->staticTable(), field->offset()) = v; - - return 1; -} - -void JNICALL SetStaticLongField(Thread* t, jclass c, jfieldID field, jlong v) -{ - uintptr_t arguments[2 + (sizeof(jlong) / BytesPerWord)]; - arguments[0] = reinterpret_cast(c); - arguments[1] = field; - memcpy(arguments + 2, &v, sizeof(jlong)); - - run(t, setStaticLongField, arguments); -} - -uint64_t setStaticFloatField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jfloat v = bitsToFloat(arguments[2]); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(c->vmClass()->staticTable(), field->offset()) = v; - - return 1; -} - -void JNICALL SetStaticFloatField(Thread* t, jclass c, jfieldID field, jfloat v) -{ - uintptr_t arguments[] - = {reinterpret_cast(c), field, floatToBits(v)}; - - run(t, setStaticFloatField, arguments); -} - -uint64_t setStaticDoubleField(Thread* t, uintptr_t* arguments) -{ - GcJclass* c = cast(t, *reinterpret_cast(arguments[0])); - - initClass(t, c->vmClass()); - - GcField* field = getStaticField(t, arguments[1]); - jdouble v; - memcpy(&v, arguments + 2, sizeof(jdouble)); - - PROTECT(t, field); - ACQUIRE_FIELD_FOR_WRITE(t, field); - - fieldAtOffset(c->vmClass()->staticTable(), field->offset()) = v; - - return 1; -} - -void JNICALL - SetStaticDoubleField(Thread* t, jclass c, jfieldID field, jdouble v) -{ - uintptr_t arguments[2 + (sizeof(jdouble) / BytesPerWord)]; - arguments[0] = reinterpret_cast(c); - arguments[1] = field; - memcpy(arguments + 2, &v, sizeof(jdouble)); - - run(t, setStaticDoubleField, arguments); -} - -jobject JNICALL newGlobalRef(Thread* t, jobject o, bool weak) -{ - ENTER(t, Thread::ActiveState); - - ACQUIRE(t, t->m->referenceLock); - - if (o) { - for (Reference* r = t->m->jniReferences; r; r = r->next) { - if (r->target == *o and r->weak == weak) { - acquire(t, r); - - return &(r->target); - } - } - - Reference* r = new (t->m->heap->allocate(sizeof(Reference))) - Reference(*o, &(t->m->jniReferences), weak); - - acquire(t, r); - - return &(r->target); - } else { - return 0; - } -} - -jobject JNICALL NewGlobalRef(Thread* t, jobject o) -{ - return newGlobalRef(t, o, false); -} - -void JNICALL DeleteGlobalRef(Thread* t, jobject r) -{ - ENTER(t, Thread::ActiveState); - - ACQUIRE(t, t->m->referenceLock); - - if (r) { - release(t, reinterpret_cast(r)); - } -} - -jobject JNICALL NewWeakGlobalRef(Thread* t, jobject o) -{ - return newGlobalRef(t, o, true); -} - -void JNICALL DeleteWeakGlobalRef(Thread* t, jobject r) -{ - DeleteGlobalRef(t, r); -} - -jint JNICALL EnsureLocalCapacity(Thread*, jint) -{ - return 0; -} - -jthrowable JNICALL ExceptionOccurred(Thread* t) -{ - ENTER(t, Thread::ActiveState); - - return reinterpret_cast(makeLocalReference(t, t->exception)); -} - -void JNICALL ExceptionDescribe(Thread* t) -{ - ENTER(t, Thread::ActiveState); - - return printTrace(t, t->exception); -} - -void JNICALL ExceptionClear(Thread* t) -{ - ENTER(t, Thread::ActiveState); - - t->exception = 0; -} - -uint64_t newObjectArray(Thread* t, uintptr_t* arguments) -{ - jsize length = arguments[0]; - jclass class_ = reinterpret_cast(arguments[1]); - jobject init = reinterpret_cast(arguments[2]); - - object a = makeObjectArray(t, (*class_)->vmClass(), length); - object value = (init ? *init : 0); - for (jsize i = 0; i < length; ++i) { - reinterpret_cast(a)->setBodyElement(t, i, value); - } - return reinterpret_cast(makeLocalReference(t, a)); -} - -jobjectArray JNICALL - NewObjectArray(Thread* t, jsize length, jclass class_, jobject init) -{ - uintptr_t arguments[] = {static_cast(length), - reinterpret_cast(class_), - reinterpret_cast(init)}; - - return reinterpret_cast(run(t, newObjectArray, arguments)); -} - -jobject JNICALL - GetObjectArrayElement(Thread* t, jobjectArray array, jsize index) -{ - ENTER(t, Thread::ActiveState); - - return makeLocalReference( - t, objectArrayBody(t, reinterpret_cast(*array), index)); -} - -void JNICALL SetObjectArrayElement(Thread* t, - jobjectArray array, - jsize index, - jobject value) -{ - ENTER(t, Thread::ActiveState); - - setField(t, - reinterpret_cast(*array), - ArrayBody + (index * BytesPerWord), - (value ? *value : 0)); -} - -uint64_t newArray(Thread* t, uintptr_t* arguments) -{ - object (*constructor)(Thread*, unsigned) - = reinterpret_cast(arguments[0]); - - jsize length = arguments[1]; - - return reinterpret_cast( - makeLocalReference(t, constructor(t, length))); -} - -jbooleanArray JNICALL NewBooleanArray(Thread* t, jsize length) -{ - uintptr_t arguments[] - = {reinterpret_cast(voidPointer(makeBooleanArray)), - static_cast(length)}; - - return reinterpret_cast(run(t, newArray, arguments)); -} - -object makeByteArray0(Thread* t, unsigned length) -{ - return makeByteArray(t, length); -} - -jbyteArray JNICALL NewByteArray(Thread* t, jsize length) -{ - uintptr_t arguments[] - = {reinterpret_cast(voidPointer(makeByteArray0)), - static_cast(length)}; - - return reinterpret_cast(run(t, newArray, arguments)); -} - -jcharArray JNICALL NewCharArray(Thread* t, jsize length) -{ - uintptr_t arguments[] - = {reinterpret_cast(voidPointer(makeCharArray)), - static_cast(length)}; - - return reinterpret_cast(run(t, newArray, arguments)); -} - -jshortArray JNICALL NewShortArray(Thread* t, jsize length) -{ - uintptr_t arguments[] - = {reinterpret_cast(voidPointer(makeShortArray)), - static_cast(length)}; - - return reinterpret_cast(run(t, newArray, arguments)); -} - -jintArray JNICALL NewIntArray(Thread* t, jsize length) -{ - uintptr_t arguments[] - = {reinterpret_cast(voidPointer(makeIntArray)), - static_cast(length)}; - - return reinterpret_cast(run(t, newArray, arguments)); -} - -jlongArray JNICALL NewLongArray(Thread* t, jsize length) -{ - uintptr_t arguments[] - = {reinterpret_cast(voidPointer(makeLongArray)), - static_cast(length)}; - - return reinterpret_cast(run(t, newArray, arguments)); -} - -jfloatArray JNICALL NewFloatArray(Thread* t, jsize length) -{ - uintptr_t arguments[] - = {reinterpret_cast(voidPointer(makeFloatArray)), - static_cast(length)}; - - return reinterpret_cast(run(t, newArray, arguments)); -} - -jdoubleArray JNICALL NewDoubleArray(Thread* t, jsize length) -{ - uintptr_t arguments[] - = {reinterpret_cast(voidPointer(makeDoubleArray)), - static_cast(length)}; - - return reinterpret_cast(run(t, newArray, arguments)); -} - -jboolean* JNICALL - GetBooleanArrayElements(Thread* t, jbooleanArray array, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jboolean); - jboolean* p = static_cast(t->m->heap->allocate(size)); - if (size) { - memcpy(p, (*array)->body().begin(), size); - } - - if (isCopy) { - *isCopy = true; - } - - return p; -} - -jbyte* JNICALL - GetByteArrayElements(Thread* t, jbyteArray array, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jbyte); - jbyte* p = static_cast(t->m->heap->allocate(size)); - if (size) { - memcpy(p, (*array)->body().begin(), size); - } - - if (isCopy) { - *isCopy = true; - } - - return p; -} - -jchar* JNICALL - GetCharArrayElements(Thread* t, jcharArray array, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jchar); - jchar* p = static_cast(t->m->heap->allocate(size)); - if (size) { - memcpy(p, (*array)->body().begin(), size); - } - - if (isCopy) { - *isCopy = true; - } - - return p; -} - -jshort* JNICALL - GetShortArrayElements(Thread* t, jshortArray array, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jshort); - jshort* p = static_cast(t->m->heap->allocate(size)); - if (size) { - memcpy(p, (*array)->body().begin(), size); - } - - if (isCopy) { - *isCopy = true; - } - - return p; -} - -jint* JNICALL GetIntArrayElements(Thread* t, jintArray array, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jint); - jint* p = static_cast(t->m->heap->allocate(size)); - if (size) { - memcpy(p, (*array)->body().begin(), size); - } - - if (isCopy) { - *isCopy = true; - } - - return p; -} - -jlong* JNICALL - GetLongArrayElements(Thread* t, jlongArray array, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jlong); - jlong* p = static_cast(t->m->heap->allocate(size)); - if (size) { - memcpy(p, (*array)->body().begin(), size); - } - - if (isCopy) { - *isCopy = true; - } - - return p; -} - -jfloat* JNICALL - GetFloatArrayElements(Thread* t, jfloatArray array, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jfloat); - jfloat* p = static_cast(t->m->heap->allocate(size)); - if (size) { - memcpy(p, (*array)->body().begin(), size); - } - - if (isCopy) { - *isCopy = true; - } - - return p; -} - -jdouble* JNICALL - GetDoubleArrayElements(Thread* t, jdoubleArray array, jboolean* isCopy) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jdouble); - jdouble* p = static_cast(t->m->heap->allocate(size)); - if (size) { - memcpy(p, (*array)->body().begin(), size); - } - - if (isCopy) { - *isCopy = true; - } - - return p; -} - -void JNICALL ReleaseBooleanArrayElements(Thread* t, - jbooleanArray array, - jboolean* p, - jint mode) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jboolean); - - if (mode == 0 or mode == AVIAN_JNI_COMMIT) { - if (size) { - memcpy((*array)->body().begin(), p, size); - } - } - - if (mode == 0 or mode == AVIAN_JNI_ABORT) { - t->m->heap->free(p, size); - } -} - -void JNICALL - ReleaseByteArrayElements(Thread* t, jbyteArray array, jbyte* p, jint mode) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jbyte); - - if (mode == 0 or mode == AVIAN_JNI_COMMIT) { - if (size) { - memcpy((*array)->body().begin(), p, size); - } - } - - if (mode == 0 or mode == AVIAN_JNI_ABORT) { - t->m->heap->free(p, size); - } -} - -void JNICALL - ReleaseCharArrayElements(Thread* t, jcharArray array, jchar* p, jint mode) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jchar); - - if (mode == 0 or mode == AVIAN_JNI_COMMIT) { - if (size) { - memcpy((*array)->body().begin(), p, size); - } - } - - if (mode == 0 or mode == AVIAN_JNI_ABORT) { - t->m->heap->free(p, size); - } -} - -void JNICALL ReleaseShortArrayElements(Thread* t, - jshortArray array, - jshort* p, - jint mode) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jshort); - - if (mode == 0 or mode == AVIAN_JNI_COMMIT) { - if (size) { - memcpy((*array)->body().begin(), p, size); - } - } - - if (mode == 0 or mode == AVIAN_JNI_ABORT) { - t->m->heap->free(p, size); - } -} - -void JNICALL - ReleaseIntArrayElements(Thread* t, jintArray array, jint* p, jint mode) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jint); - - if (mode == 0 or mode == AVIAN_JNI_COMMIT) { - if (size) { - memcpy((*array)->body().begin(), p, size); - } - } - - if (mode == 0 or mode == AVIAN_JNI_ABORT) { - t->m->heap->free(p, size); - } -} - -void JNICALL - ReleaseLongArrayElements(Thread* t, jlongArray array, jlong* p, jint mode) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jlong); - - if (mode == 0 or mode == AVIAN_JNI_COMMIT) { - if (size) { - memcpy((*array)->body().begin(), p, size); - } - } - - if (mode == 0 or mode == AVIAN_JNI_ABORT) { - t->m->heap->free(p, size); - } -} - -void JNICALL ReleaseFloatArrayElements(Thread* t, - jfloatArray array, - jfloat* p, - jint mode) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jfloat); - - if (mode == 0 or mode == AVIAN_JNI_COMMIT) { - if (size) { - memcpy((*array)->body().begin(), p, size); - } - } - - if (mode == 0 or mode == AVIAN_JNI_ABORT) { - t->m->heap->free(p, size); - } -} - -void JNICALL ReleaseDoubleArrayElements(Thread* t, - jdoubleArray array, - jdouble* p, - jint mode) -{ - ENTER(t, Thread::ActiveState); - - unsigned size = (*array)->length() * sizeof(jdouble); - - if (mode == 0 or mode == AVIAN_JNI_COMMIT) { - if (size) { - memcpy((*array)->body().begin(), p, size); - } - } - - if (mode == 0 or mode == AVIAN_JNI_ABORT) { - t->m->heap->free(p, size); - } -} - -void JNICALL GetBooleanArrayRegion(Thread* t, - jbooleanArray array, - jint offset, - jint length, - jboolean* dst) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(dst, &(*array)->body()[offset], length * sizeof(jboolean)); - } -} - -void JNICALL GetByteArrayRegion(Thread* t, - jbyteArray array, - jint offset, - jint length, - jbyte* dst) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(dst, &(*array)->body()[offset], length * sizeof(jbyte)); - } -} - -void JNICALL GetCharArrayRegion(Thread* t, - jcharArray array, - jint offset, - jint length, - jchar* dst) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(dst, &(*array)->body()[offset], length * sizeof(jchar)); - } -} - -void JNICALL GetShortArrayRegion(Thread* t, - jshortArray array, - jint offset, - jint length, - jshort* dst) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(dst, &(*array)->body()[offset], length * sizeof(jshort)); - } -} - -void JNICALL GetIntArrayRegion(Thread* t, - jintArray array, - jint offset, - jint length, - jint* dst) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(dst, &(*array)->body()[offset], length * sizeof(jint)); - } -} - -void JNICALL GetLongArrayRegion(Thread* t, - jlongArray array, - jint offset, - jint length, - jlong* dst) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(dst, &(*array)->body()[offset], length * sizeof(jlong)); - } -} - -void JNICALL GetFloatArrayRegion(Thread* t, - jfloatArray array, - jint offset, - jint length, - jfloat* dst) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(dst, &(*array)->body()[offset], length * sizeof(jfloat)); - } -} - -void JNICALL GetDoubleArrayRegion(Thread* t, - jdoubleArray array, - jint offset, - jint length, - jdouble* dst) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(dst, &(*array)->body()[offset], length * sizeof(jdouble)); - } -} - -void JNICALL SetBooleanArrayRegion(Thread* t, - jbooleanArray array, - jint offset, - jint length, - const jboolean* src) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(&(*array)->body()[offset], src, length * sizeof(jboolean)); - } -} - -void JNICALL SetByteArrayRegion(Thread* t, - jbyteArray array, - jint offset, - jint length, - const jbyte* src) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(&(*array)->body()[offset], src, length * sizeof(jbyte)); - } -} - -void JNICALL SetCharArrayRegion(Thread* t, - jcharArray array, - jint offset, - jint length, - const jchar* src) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(&(*array)->body()[offset], src, length * sizeof(jchar)); - } -} - -void JNICALL SetShortArrayRegion(Thread* t, - jshortArray array, - jint offset, - jint length, - const jshort* src) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(&(*array)->body()[offset], src, length * sizeof(jshort)); - } -} - -void JNICALL SetIntArrayRegion(Thread* t, - jintArray array, - jint offset, - jint length, - const jint* src) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(&(*array)->body()[offset], src, length * sizeof(jint)); - } -} - -void JNICALL SetLongArrayRegion(Thread* t, - jlongArray array, - jint offset, - jint length, - const jlong* src) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(&(*array)->body()[offset], src, length * sizeof(jlong)); - } -} - -void JNICALL SetFloatArrayRegion(Thread* t, - jfloatArray array, - jint offset, - jint length, - const jfloat* src) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(&(*array)->body()[offset], src, length * sizeof(jfloat)); - } -} - -void JNICALL SetDoubleArrayRegion(Thread* t, - jdoubleArray array, - jint offset, - jint length, - const jdouble* src) -{ - ENTER(t, Thread::ActiveState); - - if (length) { - memcpy(&(*array)->body()[offset], src, length * sizeof(jdouble)); - } -} - -void* JNICALL - GetPrimitiveArrayCritical(Thread* t, jarray array, jboolean* isCopy) -{ - if (t->criticalLevel == 0) { - enter(t, Thread::ActiveState); - } - - ++t->criticalLevel; - - if (isCopy) { - *isCopy = true; - } - - expect(t, *array); - - return reinterpret_cast(*array) + 2; -} - -void JNICALL ReleasePrimitiveArrayCritical(Thread* t, jarray, void*, jint) -{ - if ((--t->criticalLevel) == 0) { - enter(t, Thread::IdleState); - } -} - -uint64_t fromReflectedMethod(Thread* t, uintptr_t* arguments) -{ - jobject m = reinterpret_cast(arguments[0]); - - return methodID(t, t->m->classpath->getVMMethod(t, *m)); -} - -jmethodID JNICALL FromReflectedMethod(Thread* t, jobject method) -{ - uintptr_t arguments[] = {reinterpret_cast(method)}; - - return static_cast(run(t, fromReflectedMethod, arguments)); -} - -uint64_t toReflectedMethod(Thread* t, uintptr_t* arguments) -{ - jmethodID m = arguments[1]; - jboolean isStatic = arguments[2]; - - return reinterpret_cast(makeLocalReference( - t, - t->m->classpath->makeJMethod( - t, isStatic ? getStaticMethod(t, m) : getMethod(t, m)))); -} - -jobject JNICALL - ToReflectedMethod(Thread* t, jclass c, jmethodID method, jboolean isStatic) -{ - uintptr_t arguments[] = {reinterpret_cast(c), - static_cast(method), - static_cast(isStatic)}; - - return reinterpret_cast(run(t, toReflectedMethod, arguments)); -} - -uint64_t fromReflectedField(Thread* t, uintptr_t* arguments) -{ - jobject f = reinterpret_cast(arguments[0]); - - return fieldID(t, t->m->classpath->getVMField(t, cast(t, *f))); -} - -jfieldID JNICALL FromReflectedField(Thread* t, jobject field) -{ - uintptr_t arguments[] = {reinterpret_cast(field)}; - - return static_cast(run(t, fromReflectedField, arguments)); -} - -uint64_t toReflectedField(Thread* t, uintptr_t* arguments) -{ - jfieldID f = arguments[1]; - jboolean isStatic = arguments[2]; - - return reinterpret_cast(makeLocalReference( - t, - t->m->classpath->makeJField( - t, isStatic ? getStaticField(t, f) : getField(t, f)))); -} - -jobject JNICALL - ToReflectedField(Thread* t, jclass c, jfieldID field, jboolean isStatic) -{ - uintptr_t arguments[] = {reinterpret_cast(c), - static_cast(field), - static_cast(isStatic)}; - - return reinterpret_cast(run(t, toReflectedField, arguments)); -} - -uint64_t registerNatives(Thread* t, uintptr_t* arguments) -{ - jclass c = reinterpret_cast(arguments[0]); - const JNINativeMethod* methods - = reinterpret_cast(arguments[1]); - jint methodCount = arguments[2]; - - for (int i = 0; i < methodCount; ++i) { - if (methods[i].function) { - // Android's class library sometimes prepends a mysterious "!" - // to the method signature, which we happily ignore: - const char* sig = methods[i].signature; - if (*sig == '!') - ++sig; - - GcMethod* method - = findMethodOrNull(t, (*c)->vmClass(), methods[i].name, sig); - - if (method == 0 or (method->flags() & ACC_NATIVE) == 0) { - // The JNI spec says we must throw a NoSuchMethodError in this - // case, but that would prevent using a code shrinker like - // ProGuard effectively. Instead, we just ignore it. - - if (false) { - fprintf(stderr, - "not found: %s.%s%s\n", - (*c)->vmClass()->name()->body().begin(), - methods[i].name, - sig); - abort(t); - } - } else { - registerNative(t, method, methods[i].function); - } - } - } - - return 1; -} - -jint JNICALL RegisterNatives(Thread* t, - jclass c, - const JNINativeMethod* methods, - jint methodCount) -{ - uintptr_t arguments[] = {reinterpret_cast(c), - reinterpret_cast(methods), - static_cast(methodCount)}; - - return run(t, registerNatives, arguments) ? 0 : -1; -} - -jint JNICALL UnregisterNatives(Thread* t, jclass c) -{ - ENTER(t, Thread::ActiveState); - - unregisterNatives(t, (*c)->vmClass()); - - return 0; -} - -uint64_t monitorOp(Thread* t, uintptr_t* arguments) -{ - void (*op)(Thread*, object) - = reinterpret_cast(arguments[0]); - - jobject o = reinterpret_cast(arguments[1]); - - op(t, *o); - - return 1; -} - -void acquire0(Thread* t, object o) -{ - return acquire(t, o); -} - -jint JNICALL MonitorEnter(Thread* t, jobject o) -{ - uintptr_t arguments[] = {reinterpret_cast(voidPointer(acquire0)), - reinterpret_cast(o)}; - - return run(t, monitorOp, arguments) ? 0 : -1; -} - -void release0(Thread* t, object o) -{ - return release(t, o); -} - -jint JNICALL MonitorExit(Thread* t, jobject o) -{ - uintptr_t arguments[] = {reinterpret_cast(voidPointer(release0)), - reinterpret_cast(o)}; - - return run(t, monitorOp, arguments) ? 0 : -1; -} - -jint JNICALL GetJavaVM(Thread* t, Machine** m) -{ - *m = t->m; - return 0; -} - -jboolean JNICALL IsSameObject(Thread* t, jobject a, jobject b) -{ - if (a and b) { - ENTER(t, Thread::ActiveState); - - return *a == *b; - } else { - return a == b; - } -} - -uint64_t pushLocalFrame(Thread* t, uintptr_t* arguments) -{ - if (t->m->processor->pushLocalFrame(t, arguments[0])) { - return 1; - } else { - throw_(t, roots(t)->outOfMemoryError()); - } -} - -jint JNICALL PushLocalFrame(Thread* t, jint capacity) -{ - uintptr_t arguments[] = {static_cast(capacity)}; - - return run(t, pushLocalFrame, arguments) ? 0 : -1; -} - -uint64_t popLocalFrame(Thread* t, uintptr_t* arguments) -{ - uint64_t r; - jobject presult = reinterpret_cast(arguments[0]); - if (presult != NULL) { - object result = *presult; - PROTECT(t, result); - - t->m->processor->popLocalFrame(t); - - r = reinterpret_cast(makeLocalReference(t, result)); - } else { - t->m->processor->popLocalFrame(t); - r = 0; - } - - return r; -} - -jobject JNICALL PopLocalFrame(Thread* t, jobject result) -{ - uintptr_t arguments[] = {reinterpret_cast(result)}; - - return reinterpret_cast(run(t, popLocalFrame, arguments)); -} - -uint64_t newDirectByteBuffer(Thread* t, uintptr_t* arguments) -{ - jlong capacity; - memcpy(&capacity, arguments + 1, sizeof(jlong)); - - return reinterpret_cast(makeLocalReference( - t, - t->m->classpath->makeDirectByteBuffer( - t, reinterpret_cast(arguments[0]), capacity))); -} - -jobject JNICALL NewDirectByteBuffer(Thread* t, void* p, jlong capacity) -{ - uintptr_t arguments[1 + (sizeof(jlong) / BytesPerWord)]; - arguments[0] = reinterpret_cast(p); - memcpy(arguments + 1, &capacity, sizeof(jlong)); - - return reinterpret_cast(run(t, newDirectByteBuffer, arguments)); -} - -uint64_t getDirectBufferAddress(Thread* t, uintptr_t* arguments) -{ - return reinterpret_cast(t->m->classpath->getDirectBufferAddress( - t, *reinterpret_cast(arguments[0]))); -} - -void* JNICALL GetDirectBufferAddress(Thread* t, jobject b) -{ - uintptr_t arguments[] = {reinterpret_cast(b)}; - - return reinterpret_cast(run(t, getDirectBufferAddress, arguments)); -} - -uint64_t getDirectBufferCapacity(Thread* t, uintptr_t* arguments) -{ - return t->m->classpath->getDirectBufferCapacity( - t, *reinterpret_cast(arguments[0])); -} - -jlong JNICALL GetDirectBufferCapacity(Thread* t, jobject b) -{ - uintptr_t arguments[] = {reinterpret_cast(b)}; - - return run(t, getDirectBufferCapacity, arguments); -} - -struct JavaVMOption { - char* optionString; - void* extraInfo; -}; - -struct JavaVMInitArgs { - jint version; - - jint nOptions; - JavaVMOption* options; - jboolean ignoreUnrecognized; -}; - -int parseSize(const char* s) -{ - unsigned length = strlen(s); - RUNTIME_ARRAY(char, buffer, length + 1); - - if (length == 0) - return 0; - - char suffix = s[length - 1]; - if (suffix== 'k' or suffix == 'K') { - memcpy(RUNTIME_ARRAY_BODY(buffer), s, length - 1); - RUNTIME_ARRAY_BODY(buffer)[length - 1] = 0; - return atoi(RUNTIME_ARRAY_BODY(buffer)) * 1024; - } - - if (suffix == 'm' or suffix == 'M') { - memcpy(RUNTIME_ARRAY_BODY(buffer), s, length - 1); - RUNTIME_ARRAY_BODY(buffer)[length - 1] = 0; - return atoi(RUNTIME_ARRAY_BODY(buffer)) * 1024 * 1024; - } - - if (suffix == 'g' or suffix == 'G') { - memcpy(RUNTIME_ARRAY_BODY(buffer), s, length - 1); - RUNTIME_ARRAY_BODY(buffer)[length - 1] = 0; - return atoi(RUNTIME_ARRAY_BODY(buffer)) * 1024 * 1024 * 1024; - } - - return atoi(s); -} - -void append(char** p, const char* value, unsigned length, char tail) -{ - if (length) { - memcpy(*p, value, length); - *p += length; - *((*p)++) = tail; - } -} - -uint64_t boot(Thread* t, uintptr_t*) -{ - GcThrowable* throwable = makeThrowable(t, GcNullPointerException::Type); - // sequence point, for gc (don't recombine statements) - roots(t)->setNullPointerException(t, throwable); - - throwable = makeThrowable(t, GcArithmeticException::Type); - // sequence point, for gc (don't recombine statements) - roots(t)->setArithmeticException(t, throwable); - - throwable = makeThrowable(t, GcArrayIndexOutOfBoundsException::Type); - // sequence point, for gc (don't recombine statements) - roots(t)->setArrayIndexOutOfBoundsException(t, throwable); - - throwable = makeThrowable(t, GcOutOfMemoryError::Type); - // sequence point, for gc (don't recombine statements) - roots(t)->setOutOfMemoryError(t, throwable); - - throwable = makeThrowable(t, GcThrowable::Type); - // sequence point, for gc (don't recombine statements) - roots(t)->setShutdownInProgress(t, throwable); - - t->m->classpath->preBoot(t); - - t->javaThread = t->m->classpath->makeThread(t, 0); - - t->javaThread->peer() = reinterpret_cast(t); - -#ifndef SGX - GcThread* jthread = t->m->classpath->makeThread(t, t); - // sequence point, for gc (don't recombine statements) - roots(t)->setFinalizerThread(t, jthread); - roots(t)->finalizerThread()->daemon() = true; -#endif - - t->m->classpath->boot(t); - - const char* port = findProperty(t, "avian.trace.port"); - if (port) { - GcString* host = makeString(t, "0.0.0.0"); - PROTECT(t, host); - - GcMethod* method = resolveMethod(t, - roots(t)->bootLoader(), - "avian/Traces", - "startTraceListener", - "(Ljava/lang/String;I)V"); - - t->m->processor->invoke(t, method, 0, host, atoi(port)); - } - - enter(t, Thread::IdleState); - - return 1; -} - -} // namespace local - -} // namespace - -namespace vm { - -void populateJNITables(JavaVMVTable* vmTable, JNIEnvVTable* envTable) -{ - memset(vmTable, 0, sizeof(JavaVMVTable)); - - vmTable->DestroyJavaVM = local::DestroyJavaVM; - vmTable->AttachCurrentThread = local::AttachCurrentThread; - vmTable->AttachCurrentThreadAsDaemon = local::AttachCurrentThreadAsDaemon; - vmTable->DetachCurrentThread = local::DetachCurrentThread; - vmTable->GetEnv = local::GetEnv; - - memset(envTable, 0, sizeof(JNIEnvVTable)); - - envTable->GetVersion = local::GetVersion; - envTable->GetStringLength = local::GetStringLength; - envTable->GetStringChars = local::GetStringChars; - envTable->ReleaseStringChars = local::ReleaseStringChars; - envTable->GetStringRegion = local::GetStringRegion; - envTable->GetStringCritical = local::GetStringCritical; - envTable->ReleaseStringCritical = local::ReleaseStringCritical; - envTable->GetStringUTFLength = local::GetStringUTFLength; - envTable->GetStringUTFChars = local::GetStringUTFChars; - envTable->ReleaseStringUTFChars = local::ReleaseStringUTFChars; - envTable->GetStringUTFRegion = local::GetStringUTFRegion; - envTable->GetArrayLength = local::GetArrayLength; - envTable->NewString = local::NewString; - envTable->NewStringUTF = local::NewStringUTF; - envTable->DefineClass = local::DefineClass; - envTable->FindClass = local::FindClass; - envTable->ThrowNew = local::ThrowNew; - envTable->Throw = local::Throw; - envTable->ExceptionCheck = local::ExceptionCheck; - envTable->NewDirectByteBuffer = local::NewDirectByteBuffer; - envTable->GetDirectBufferAddress = local::GetDirectBufferAddress; - envTable->GetDirectBufferCapacity = local::GetDirectBufferCapacity; - envTable->NewLocalRef = local::NewLocalRef; - envTable->DeleteLocalRef = local::DeleteLocalRef; - envTable->GetObjectClass = local::GetObjectClass; - envTable->GetSuperclass = local::GetSuperclass; - envTable->IsInstanceOf = local::IsInstanceOf; - envTable->IsAssignableFrom = local::IsAssignableFrom; - envTable->GetFieldID = local::GetFieldID; - envTable->GetMethodID = local::GetMethodID; - envTable->GetStaticMethodID = local::GetStaticMethodID; - envTable->NewObjectV = local::NewObjectV; - envTable->NewObjectA = local::NewObjectA; - envTable->NewObject = local::NewObject; - envTable->CallObjectMethodV = local::CallObjectMethodV; - envTable->CallObjectMethodA = local::CallObjectMethodA; - envTable->CallObjectMethod = local::CallObjectMethod; - envTable->CallBooleanMethodV = local::CallBooleanMethodV; - envTable->CallBooleanMethodA = local::CallBooleanMethodA; - envTable->CallBooleanMethod = local::CallBooleanMethod; - envTable->CallByteMethodV = local::CallByteMethodV; - envTable->CallByteMethodA = local::CallByteMethodA; - envTable->CallByteMethod = local::CallByteMethod; - envTable->CallCharMethodV = local::CallCharMethodV; - envTable->CallCharMethodA = local::CallCharMethodA; - envTable->CallCharMethod = local::CallCharMethod; - envTable->CallShortMethodV = local::CallShortMethodV; - envTable->CallShortMethodA = local::CallShortMethodA; - envTable->CallShortMethod = local::CallShortMethod; - envTable->CallIntMethodV = local::CallIntMethodV; - envTable->CallIntMethodA = local::CallIntMethodA; - envTable->CallIntMethod = local::CallIntMethod; - envTable->CallLongMethodV = local::CallLongMethodV; - envTable->CallLongMethodA = local::CallLongMethodA; - envTable->CallLongMethod = local::CallLongMethod; - envTable->CallFloatMethodV = local::CallFloatMethodV; - envTable->CallFloatMethodA = local::CallFloatMethodA; - envTable->CallFloatMethod = local::CallFloatMethod; - envTable->CallDoubleMethodV = local::CallDoubleMethodV; - envTable->CallDoubleMethodA = local::CallDoubleMethodA; - envTable->CallDoubleMethod = local::CallDoubleMethod; - envTable->CallVoidMethodV = local::CallVoidMethodV; - envTable->CallVoidMethodA = local::CallVoidMethodA; - envTable->CallVoidMethod = local::CallVoidMethod; - envTable->CallStaticObjectMethodV = local::CallStaticObjectMethodV; - envTable->CallStaticObjectMethodA = local::CallStaticObjectMethodA; - envTable->CallStaticObjectMethod = local::CallStaticObjectMethod; - envTable->CallStaticBooleanMethodV = local::CallStaticBooleanMethodV; - envTable->CallStaticBooleanMethodA = local::CallStaticBooleanMethodA; - envTable->CallStaticBooleanMethod = local::CallStaticBooleanMethod; - envTable->CallStaticByteMethodV = local::CallStaticByteMethodV; - envTable->CallStaticByteMethodA = local::CallStaticByteMethodA; - envTable->CallStaticByteMethod = local::CallStaticByteMethod; - envTable->CallStaticCharMethodV = local::CallStaticCharMethodV; - envTable->CallStaticCharMethodA = local::CallStaticCharMethodA; - envTable->CallStaticCharMethod = local::CallStaticCharMethod; - envTable->CallStaticShortMethodV = local::CallStaticShortMethodV; - envTable->CallStaticShortMethodA = local::CallStaticShortMethodA; - envTable->CallStaticShortMethod = local::CallStaticShortMethod; - envTable->CallStaticIntMethodV = local::CallStaticIntMethodV; - envTable->CallStaticIntMethodA = local::CallStaticIntMethodA; - envTable->CallStaticIntMethod = local::CallStaticIntMethod; - envTable->CallStaticLongMethodV = local::CallStaticLongMethodV; - envTable->CallStaticLongMethodA = local::CallStaticLongMethodA; - envTable->CallStaticLongMethod = local::CallStaticLongMethod; - envTable->CallStaticFloatMethodV = local::CallStaticFloatMethodV; - envTable->CallStaticFloatMethodA = local::CallStaticFloatMethodA; - envTable->CallStaticFloatMethod = local::CallStaticFloatMethod; - envTable->CallStaticDoubleMethodV = local::CallStaticDoubleMethodV; - envTable->CallStaticDoubleMethodA = local::CallStaticDoubleMethodA; - envTable->CallStaticDoubleMethod = local::CallStaticDoubleMethod; - envTable->CallStaticVoidMethodV = local::CallStaticVoidMethodV; - envTable->CallStaticVoidMethodA = local::CallStaticVoidMethodA; - envTable->CallStaticVoidMethod = local::CallStaticVoidMethod; - envTable->GetStaticFieldID = local::GetStaticFieldID; - envTable->GetObjectField = local::GetObjectField; - envTable->GetBooleanField = local::GetBooleanField; - envTable->GetByteField = local::GetByteField; - envTable->GetCharField = local::GetCharField; - envTable->GetShortField = local::GetShortField; - envTable->GetIntField = local::GetIntField; - envTable->GetLongField = local::GetLongField; - envTable->GetFloatField = local::GetFloatField; - envTable->GetDoubleField = local::GetDoubleField; - envTable->SetObjectField = local::SetObjectField; - envTable->SetBooleanField = local::SetBooleanField; - envTable->SetByteField = local::SetByteField; - envTable->SetCharField = local::SetCharField; - envTable->SetShortField = local::SetShortField; - envTable->SetIntField = local::SetIntField; - envTable->SetLongField = local::SetLongField; - envTable->SetFloatField = local::SetFloatField; - envTable->SetDoubleField = local::SetDoubleField; - envTable->GetStaticObjectField = local::GetStaticObjectField; - envTable->GetStaticBooleanField = local::GetStaticBooleanField; - envTable->GetStaticByteField = local::GetStaticByteField; - envTable->GetStaticCharField = local::GetStaticCharField; - envTable->GetStaticShortField = local::GetStaticShortField; - envTable->GetStaticIntField = local::GetStaticIntField; - envTable->GetStaticLongField = local::GetStaticLongField; - envTable->GetStaticFloatField = local::GetStaticFloatField; - envTable->GetStaticDoubleField = local::GetStaticDoubleField; - envTable->SetStaticObjectField = local::SetStaticObjectField; - envTable->SetStaticBooleanField = local::SetStaticBooleanField; - envTable->SetStaticByteField = local::SetStaticByteField; - envTable->SetStaticCharField = local::SetStaticCharField; - envTable->SetStaticShortField = local::SetStaticShortField; - envTable->SetStaticIntField = local::SetStaticIntField; - envTable->SetStaticLongField = local::SetStaticLongField; - envTable->SetStaticFloatField = local::SetStaticFloatField; - envTable->SetStaticDoubleField = local::SetStaticDoubleField; - envTable->NewGlobalRef = local::NewGlobalRef; - envTable->NewWeakGlobalRef = local::NewWeakGlobalRef; - envTable->DeleteGlobalRef = local::DeleteGlobalRef; - envTable->DeleteWeakGlobalRef = local::DeleteWeakGlobalRef; - envTable->EnsureLocalCapacity = local::EnsureLocalCapacity; - envTable->ExceptionOccurred = local::ExceptionOccurred; - envTable->ExceptionDescribe = local::ExceptionDescribe; - envTable->ExceptionClear = local::ExceptionClear; - envTable->NewObjectArray = local::NewObjectArray; - envTable->GetObjectArrayElement = local::GetObjectArrayElement; - envTable->SetObjectArrayElement = local::SetObjectArrayElement; - envTable->NewBooleanArray = local::NewBooleanArray; - envTable->NewByteArray = local::NewByteArray; - envTable->NewCharArray = local::NewCharArray; - envTable->NewShortArray = local::NewShortArray; - envTable->NewIntArray = local::NewIntArray; - envTable->NewLongArray = local::NewLongArray; - envTable->NewFloatArray = local::NewFloatArray; - envTable->NewDoubleArray = local::NewDoubleArray; - envTable->GetBooleanArrayElements = local::GetBooleanArrayElements; - envTable->GetByteArrayElements = local::GetByteArrayElements; - envTable->GetCharArrayElements = local::GetCharArrayElements; - envTable->GetShortArrayElements = local::GetShortArrayElements; - envTable->GetIntArrayElements = local::GetIntArrayElements; - envTable->GetLongArrayElements = local::GetLongArrayElements; - envTable->GetFloatArrayElements = local::GetFloatArrayElements; - envTable->GetDoubleArrayElements = local::GetDoubleArrayElements; - envTable->ReleaseBooleanArrayElements = local::ReleaseBooleanArrayElements; - envTable->ReleaseByteArrayElements = local::ReleaseByteArrayElements; - envTable->ReleaseCharArrayElements = local::ReleaseCharArrayElements; - envTable->ReleaseShortArrayElements = local::ReleaseShortArrayElements; - envTable->ReleaseIntArrayElements = local::ReleaseIntArrayElements; - envTable->ReleaseLongArrayElements = local::ReleaseLongArrayElements; - envTable->ReleaseFloatArrayElements = local::ReleaseFloatArrayElements; - envTable->ReleaseDoubleArrayElements = local::ReleaseDoubleArrayElements; - envTable->GetBooleanArrayRegion = local::GetBooleanArrayRegion; - envTable->GetByteArrayRegion = local::GetByteArrayRegion; - envTable->GetCharArrayRegion = local::GetCharArrayRegion; - envTable->GetShortArrayRegion = local::GetShortArrayRegion; - envTable->GetIntArrayRegion = local::GetIntArrayRegion; - envTable->GetLongArrayRegion = local::GetLongArrayRegion; - envTable->GetFloatArrayRegion = local::GetFloatArrayRegion; - envTable->GetDoubleArrayRegion = local::GetDoubleArrayRegion; - envTable->SetBooleanArrayRegion = local::SetBooleanArrayRegion; - envTable->SetByteArrayRegion = local::SetByteArrayRegion; - envTable->SetCharArrayRegion = local::SetCharArrayRegion; - envTable->SetShortArrayRegion = local::SetShortArrayRegion; - envTable->SetIntArrayRegion = local::SetIntArrayRegion; - envTable->SetLongArrayRegion = local::SetLongArrayRegion; - envTable->SetFloatArrayRegion = local::SetFloatArrayRegion; - envTable->SetDoubleArrayRegion = local::SetDoubleArrayRegion; - envTable->GetPrimitiveArrayCritical = local::GetPrimitiveArrayCritical; - envTable->ReleasePrimitiveArrayCritical - = local::ReleasePrimitiveArrayCritical; - envTable->RegisterNatives = local::RegisterNatives; - envTable->UnregisterNatives = local::UnregisterNatives; - envTable->MonitorEnter = local::MonitorEnter; - envTable->MonitorExit = local::MonitorExit; - envTable->GetJavaVM = local::GetJavaVM; - envTable->IsSameObject = local::IsSameObject; - envTable->PushLocalFrame = local::PushLocalFrame; - envTable->PopLocalFrame = local::PopLocalFrame; - envTable->FromReflectedMethod = local::FromReflectedMethod; - envTable->ToReflectedMethod = local::ToReflectedMethod; - envTable->FromReflectedField = local::FromReflectedField; - envTable->ToReflectedField = local::ToReflectedField; -} - -} // namespace vm - -extern "C" AVIAN_EXPORT jint JNICALL JNI_GetDefaultJavaVMInitArgs(void*) -{ - return 0; -} - -extern "C" AVIAN_EXPORT jint JNICALL - JNI_GetCreatedJavaVMs(Machine**, jsize, jsize*) -{ - // todo - return -1; -} - -extern "C" AVIAN_EXPORT jint JNICALL - JNI_CreateJavaVM(Machine** m, Thread** t, void* args) -{ - local::JavaVMInitArgs* a = static_cast(args); - - unsigned heapLimit = 0; - unsigned stackLimit = 0; - const char* bootLibraries = 0; - const char* classpath = 0; - const char* javaHome = AVIAN_JAVA_HOME; - bool reentrant = false; - const char* embedPrefix = AVIAN_EMBED_PREFIX; - const char* bootClasspathPrepend = ""; - const char* bootClasspath = 0; - const char* bootClasspathAppend = ""; - const char* crashDumpDirectory = 0; - - unsigned propertyCount = 0; - - for (int i = 0; i < a->nOptions; ++i) { - if (strncmp(a->options[i].optionString, "-X", 2) == 0) { - const char* p = a->options[i].optionString + 2; - if (strncmp(p, "mx", 2) == 0) { - heapLimit = local::parseSize(p + 2); - } else if (strncmp(p, "ss", 2) == 0) { - stackLimit = local::parseSize(p + 2); - } else if (strncmp(p, - BOOTCLASSPATH_PREPEND_OPTION ":", - sizeof(BOOTCLASSPATH_PREPEND_OPTION)) == 0) { - bootClasspathPrepend = p + sizeof(BOOTCLASSPATH_PREPEND_OPTION); - } else if (strncmp( - p, BOOTCLASSPATH_OPTION ":", sizeof(BOOTCLASSPATH_OPTION)) - == 0) { - bootClasspath = p + sizeof(BOOTCLASSPATH_OPTION); - } else if (strncmp(p, - BOOTCLASSPATH_APPEND_OPTION ":", - sizeof(BOOTCLASSPATH_APPEND_OPTION)) == 0) { - bootClasspathAppend = p + sizeof(BOOTCLASSPATH_APPEND_OPTION); - } - } else if (strncmp(a->options[i].optionString, "-D", 2) == 0) { - const char* p = a->options[i].optionString + 2; - if (strncmp(p, BOOTSTRAP_PROPERTY "=", sizeof(BOOTSTRAP_PROPERTY)) == 0) { - bootLibraries = p + sizeof(BOOTSTRAP_PROPERTY); - } else if (strncmp(p, - JAVA_COMMAND_PROPERTY "=", - sizeof(JAVA_COMMAND_PROPERTY)) == 0 - or strncmp(p, - JAVA_LAUNCHER_PROPERTY "=", - sizeof(JAVA_LAUNCHER_PROPERTY)) == 0) { - // this means we're being invoked via the javac or java - // command, so the bootstrap library should be e.g. libjvm.so - bootLibraries = SO_PREFIX "jvm" SO_SUFFIX; - } else if (strncmp(p, CRASHDIR_PROPERTY "=", sizeof(CRASHDIR_PROPERTY)) - == 0) { - crashDumpDirectory = p + sizeof(CRASHDIR_PROPERTY); - } else if (strncmp(p, CLASSPATH_PROPERTY "=", sizeof(CLASSPATH_PROPERTY)) - == 0) { - classpath = p + sizeof(CLASSPATH_PROPERTY); - } else if (strncmp(p, JAVA_HOME_PROPERTY "=", sizeof(JAVA_HOME_PROPERTY)) - == 0) { - javaHome = p + sizeof(JAVA_HOME_PROPERTY); - } else if (strncmp(p, REENTRANT_PROPERTY "=", sizeof(REENTRANT_PROPERTY)) - == 0) { - reentrant = strcmp(p + sizeof(REENTRANT_PROPERTY), "true") == 0; - } else if (strncmp(p, - EMBED_PREFIX_PROPERTY "=", - sizeof(EMBED_PREFIX_PROPERTY)) == 0) { - embedPrefix = p + sizeof(EMBED_PREFIX_PROPERTY); - } - - ++propertyCount; - } - } - - if (heapLimit == 0) - heapLimit = 128 * 1024 * 1024; - - if (stackLimit == 0) - stackLimit = 128 * 1024; - - bool addClasspathProperty = classpath == 0; - if (addClasspathProperty) { - classpath = "."; - ++propertyCount; - } - - System* s = makeSystem(reentrant); - Heap* h = makeHeap(s, heapLimit); - Classpath* c = makeClasspath(s, h, javaHome, embedPrefix); - - if (bootClasspath == 0) { - bootClasspath = c->bootClasspath(); - } - - unsigned bcppl = strlen(bootClasspathPrepend); - unsigned bcpl = strlen(bootClasspath); - unsigned bcpal = strlen(bootClasspathAppend); - - unsigned bootClasspathBufferSize = bcppl + bcpl + bcpal + 3; - RUNTIME_ARRAY(char, bootClasspathBuffer, bootClasspathBufferSize); - char* bootClasspathPointer = RUNTIME_ARRAY_BODY(bootClasspathBuffer); - if (bootClasspathBufferSize > 3) { - local::append(&bootClasspathPointer, - bootClasspathPrepend, - bcppl, - bcpl + bcpal ? PATH_SEPARATOR : 0); - local::append( - &bootClasspathPointer, bootClasspath, bcpl, bcpal ? PATH_SEPARATOR : 0); - local::append(&bootClasspathPointer, bootClasspathAppend, bcpal, 0); - } else { - *RUNTIME_ARRAY_BODY(bootClasspathBuffer) = 0; - } - - char* bootLibrary = bootLibraries ? strdup(bootLibraries) : 0; - char* bootLibraryEnd = bootLibrary ? strchr(bootLibrary, PATH_SEPARATOR) : 0; - if (bootLibraryEnd) - *bootLibraryEnd = 0; - - Finder* bf - = makeFinder(s, h, RUNTIME_ARRAY_BODY(bootClasspathBuffer), bootLibrary); - Finder* af = makeFinder(s, h, classpath, bootLibrary); - if (bootLibrary) - free(bootLibrary); - Processor* p = makeProcessor(s, h, crashDumpDirectory, true); - - // reserve space for avian.version and file.encoding: - propertyCount += 2; - - const char** properties = static_cast( - h->allocate(sizeof(const char*) * propertyCount)); - - const char** propertyPointer = properties; - - const char** arguments = static_cast( - h->allocate(sizeof(const char*) * a->nOptions)); - - const char** argumentPointer = arguments; - - for (int i = 0; i < a->nOptions; ++i) { - if (strncmp(a->options[i].optionString, "-D", 2) == 0) { - *(propertyPointer++) = a->options[i].optionString + 2; - } - *(argumentPointer++) = a->options[i].optionString; - } - - unsigned cpl = strlen(classpath); - RUNTIME_ARRAY(char, classpathProperty, cpl + strlen(CLASSPATH_PROPERTY) + 2); - if (addClasspathProperty) { - char* p = RUNTIME_ARRAY_BODY(classpathProperty); - local::append(&p, CLASSPATH_PROPERTY, strlen(CLASSPATH_PROPERTY), '='); - local::append(&p, classpath, cpl, 0); - *(propertyPointer++) = RUNTIME_ARRAY_BODY(classpathProperty); - } - - *(propertyPointer++) = "avian.version=" AVIAN_VERSION; - - // todo: should this be derived from the OS locale? Should it be - // overrideable via JavaVMInitArgs? - *(propertyPointer++) = "file.encoding=UTF-8"; - - *m = new (h->allocate(sizeof(Machine))) Machine(s, - h, - bf, - af, - p, - c, - properties, - propertyCount, - arguments, - a->nOptions, - stackLimit); - - h->free(properties, sizeof(const char*) * propertyCount); - - *t = p->makeThread(*m, 0, 0); - - enter(*t, Thread::ActiveState); - enter(*t, Thread::IdleState); - - return run(*t, local::boot, 0) ? 0 : -1; -} - -extern "C" AVIAN_EXPORT jstring JNICALL JVM_GetTemporaryDirectory(JNIEnv* e UNUSED) -{ - // Unimplemented - // This is used in newer builds of openjdk8, as a place to store statistics or something... - abort(); -} - -extern "C" AVIAN_EXPORT jboolean JNICALL JVM_KnownToNotExist(JNIEnv* e UNUSED, jobject loader UNUSED, jstring classname UNUSED) -{ - // Unimplemented - abort(); -} - -extern "C" AVIAN_EXPORT jintArray JNICALL JVM_GetResourceLookupCache(JNIEnv* e UNUSED, jobject loader UNUSED, jstring resourcename UNUSED) -{ - // Unimplemented - abort(); -} diff --git a/sgx-jvm/avian/src/lzma-decode.cpp b/sgx-jvm/avian/src/lzma-decode.cpp deleted file mode 100644 index e94253e340..0000000000 --- a/sgx-jvm/avian/src/lzma-decode.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/lzma-util.h" -#include "C/LzmaDec.h" - -using namespace vm; - -namespace { - -int32_t read4(const uint8_t* in) -{ - return (static_cast(in[3]) << 24) - | (static_cast(in[2]) << 16) - | (static_cast(in[1]) << 8) | (static_cast(in[0])); -} - -} // namespace - -namespace vm { - -uint8_t* decodeLZMA(System* s, - avian::util::Alloc* a, - uint8_t* in, - size_t inSize, - size_t* outSize) -{ - const size_t PropHeaderSize = 5; - const size_t HeaderSize = 13; - - int32_t outSize32 = read4(in + PropHeaderSize); - expect(s, outSize32 >= 0); - SizeT outSizeT = outSize32; - - uint8_t* out = static_cast(a->allocate(outSize32)); - - SizeT inSizeT = inSize; - LzmaAllocator allocator(a); - - ELzmaStatus status; - int result = LzmaDecode(out, - &outSizeT, - in + HeaderSize, - &inSizeT, - in, - PropHeaderSize, - LZMA_FINISH_END, - &status, - &(allocator.allocator)); - - expect(s, result == SZ_OK); - expect(s, status == LZMA_STATUS_FINISHED_WITH_MARK); - - *outSize = outSize32; - - return out; -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/lzma-encode.cpp b/sgx-jvm/avian/src/lzma-encode.cpp deleted file mode 100644 index b15ebe54eb..0000000000 --- a/sgx-jvm/avian/src/lzma-encode.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/lzma-util.h" -#include "C/LzmaEnc.h" - -using namespace vm; - -namespace { - -SRes myProgress(void*, UInt64, UInt64) -{ - return SZ_OK; -} - -} // namespace - -namespace vm { - -uint8_t* encodeLZMA(System* s, - avian::util::Alloc* a, - uint8_t* in, - size_t inSize, - size_t* outSize) -{ - const unsigned PropHeaderSize = 5; - const unsigned HeaderSize = 13; - - unsigned bufferSize = inSize * 2; - - uint8_t* buffer = static_cast(a->allocate(bufferSize)); - - LzmaAllocator allocator(a); - - CLzmaEncProps props; - LzmaEncProps_Init(&props); - props.level = 9; - props.writeEndMark = 1; - - ICompressProgress progress = {myProgress}; - - SizeT propsSize = PropHeaderSize; - - int32_t inSize32 = inSize; - memcpy(buffer + PropHeaderSize, &inSize32, 4); - - SizeT outSizeT = bufferSize; - int result = LzmaEncode(buffer + HeaderSize, - &outSizeT, - in, - inSize, - &props, - buffer, - &propsSize, - 1, - &progress, - &(allocator.allocator), - &(allocator.allocator)); - - expect(s, result == SZ_OK); - - *outSize = outSizeT + HeaderSize; - - uint8_t* out = static_cast(a->allocate(*outSize)); - memcpy(out, buffer, *outSize); - - a->free(buffer, bufferSize); - - return out; -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/lzma/load.cpp b/sgx-jvm/avian/src/lzma/load.cpp deleted file mode 100644 index 3f177e6b39..0000000000 --- a/sgx-jvm/avian/src/lzma/load.cpp +++ /dev/null @@ -1,195 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include "C/LzmaDec.h" - -#if (defined __MINGW32__) || (defined _MSC_VER) -#define EXPORT __declspec(dllexport) -#include -#define open _open -#define write _write -#define close _close -#ifdef _MSC_VER -#define S_IRWXU (_S_IREAD | _S_IWRITE) -#define and && -#endif -#else -#define EXPORT __attribute__((visibility("default"))) -#include -#include -#include -#define O_BINARY 0 -#endif - -#if (!defined __x86_64__) && ((defined __MINGW32__) || (defined _MSC_VER)) -#define SYMBOL(x) binary_exe_##x -#else -#define SYMBOL(x) _binary_exe_##x -#endif - -extern "C" { -extern const uint8_t SYMBOL(start)[]; -extern const uint8_t SYMBOL(end)[]; - -} // extern "C" - -namespace { - -int32_t read4(const uint8_t* in) -{ - return (static_cast(in[3]) << 24) - | (static_cast(in[2]) << 16) - | (static_cast(in[1]) << 8) | (static_cast(in[0])); -} - -void* myAllocate(void*, size_t size) -{ - return malloc(size); -} - -void myFree(void*, void* address) -{ - free(address); -} - -#if (defined __MINGW32__) || (defined _MSC_VER) - -void* openLibrary(const char* name) -{ - return LoadLibrary(name); -} - -void* librarySymbol(void* library, const char* name) -{ - void* address; - FARPROC p = GetProcAddress(static_cast(library), name); - memcpy(&address, &p, sizeof(void*)); - return address; -} - -const char* libraryError(void*) -{ - return "unknown error"; -} - -const char* temporaryFileName(char* buffer, unsigned size) -{ - unsigned c = GetTempPathA(size, buffer); - if (c) { - if (GetTempFileNameA(buffer, "223", 0, buffer + c)) { - DeleteFileA(buffer + c); - return buffer + c; - } - } - return 0; -} - -#else - -void* openLibrary(const char* name) -{ - return dlopen(name, RTLD_LAZY | RTLD_LOCAL); -} - -void* librarySymbol(void* library, const char* name) -{ - return dlsym(library, name); -} - -const char* libraryError(void*) -{ - return dlerror(); -} - -const char* temporaryFileName(char* buffer, unsigned) -{ - return tmpnam(buffer); -} - -#endif - -} // namespace - -int main(int ac, const char** av) -{ - const unsigned PropHeaderSize = 5; - const unsigned HeaderSize = 13; - - SizeT inSize = SYMBOL(end) - SYMBOL(start); - - int32_t outSize32 = read4(SYMBOL(start) + PropHeaderSize); - SizeT outSize = outSize32; - - uint8_t* out = static_cast(malloc(outSize)); - if (out) { - ISzAlloc allocator = {myAllocate, myFree}; - ELzmaStatus status = LZMA_STATUS_NOT_SPECIFIED; - - if (SZ_OK == LzmaDecode(out, - &outSize, - SYMBOL(start) + HeaderSize, - &inSize, - SYMBOL(start), - PropHeaderSize, - LZMA_FINISH_END, - &status, - &allocator)) { - const unsigned BufferSize = 1024; - char buffer[BufferSize]; - const char* name = temporaryFileName(buffer, BufferSize); - if (name) { - int file = open(name, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, S_IRWXU); - if (file != -1) { - SizeT result = write(file, out, outSize); - free(out); - - if (close(file) == 0 and outSize == result) { - void* library = openLibrary(name); - unlink(name); - - if (library) { - void* main = librarySymbol(library, "avianMain"); - if (main) { - int (*mainFunction)(const char*, int, const char**); - memcpy(&mainFunction, &main, sizeof(void*)); - return mainFunction(name, ac, av); - } else { - fprintf(stderr, "unable to find main in %s", name); - } - } else { - fprintf(stderr, - "unable to load %s: %s\n", - name, - libraryError(library)); - } - } else { - unlink(name); - - fprintf(stderr, - "close or write failed; tried %d, got %d; %s\n", - static_cast(outSize), - static_cast(result), - strerror(errno)); - } - } else { - fprintf(stderr, "unable to open %s\n", name); - } - } else { - fprintf(stderr, "unable to make temporary file name\n"); - } - } else { - fprintf(stderr, "unable to decode LZMA data\n"); - } - } else { - fprintf(stderr, - "unable to allocate buffer of size %d\n", - static_cast(outSize)); - } - - return -1; -} diff --git a/sgx-jvm/avian/src/lzma/main.cpp b/sgx-jvm/avian/src/lzma/main.cpp deleted file mode 100644 index 5820e235cf..0000000000 --- a/sgx-jvm/avian/src/lzma/main.cpp +++ /dev/null @@ -1,192 +0,0 @@ -#include -#include -#include -#include -#include -#include -#ifdef _WIN32 -#include -#else -#include -#include -#endif -#include - -#include "LzmaEnc.h" -#include "LzmaDec.h" - -namespace { - -int32_t read4(const uint8_t* in) -{ - return (static_cast(in[3]) << 24) - | (static_cast(in[2]) << 16) - | (static_cast(in[1]) << 8) | (static_cast(in[0])); -} - -void* myAllocate(void*, size_t size) -{ - return malloc(size); -} - -void myFree(void*, void* address) -{ - free(address); -} - -SRes myProgress(void*, UInt64, UInt64) -{ - return SZ_OK; -} - -void usageAndExit(const char* program) -{ - fprintf(stderr, - "usage: %s {encode|decode} " - "[]", - program); - exit(-1); -} - -} // namespace - -int main(int argc, const char** argv) -{ - if (argc < 4 or argc > 5) { - usageAndExit(argv[0]); - } - - bool encode = strcmp(argv[1], "encode") == 0; - - uint8_t* data = 0; - unsigned size; - int fd = open(argv[2], O_RDONLY); - if (fd != -1) { - struct stat s; - int r = fstat(fd, &s); - if (r != -1) { -#ifdef _WIN32 - HANDLE fm; - HANDLE h = (HANDLE)_get_osfhandle(fd); - - fm = CreateFileMapping(h, NULL, PAGE_READONLY, 0, 0, NULL); - data = static_cast( - MapViewOfFile(fm, FILE_MAP_READ, 0, 0, s.st_size)); - - CloseHandle(fm); -#else - data = static_cast( - mmap(0, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0)); -#endif - size = s.st_size; - } - close(fd); - } - - bool success = false; - - if (data) { - const unsigned PropHeaderSize = 5; - const unsigned HeaderSize = 13; - - SizeT outSize; - bool outSizeIsValid; - if (encode) { - outSize = size * 2; - outSizeIsValid = true; - } else { - int32_t outSize32 = read4(data + PropHeaderSize); - if (outSize32 < 0 and argc == 5) { - outSize32 = atoi(argv[4]); - } - - outSize = outSize32; - outSizeIsValid = outSize32 >= 0; - } - - if (outSizeIsValid) { - uint8_t* out = static_cast(malloc(outSize)); - if (out) { - SizeT inSize = size; - ISzAlloc allocator = {myAllocate, myFree}; - ELzmaStatus status = LZMA_STATUS_NOT_SPECIFIED; - int result; - if (encode) { - CLzmaEncProps props; - LzmaEncProps_Init(&props); - props.level = 9; - props.writeEndMark = 1; - - ICompressProgress progress = {myProgress}; - - SizeT propsSize = PropHeaderSize; - - int32_t inSize32 = inSize; - memcpy(out + PropHeaderSize, &inSize32, 4); - - result = LzmaEncode(out + HeaderSize, - &outSize, - data, - inSize, - &props, - out, - &propsSize, - 1, - &progress, - &allocator, - &allocator); - - outSize += HeaderSize; - } else { - result = LzmaDecode(out, - &outSize, - data + HeaderSize, - &inSize, - data, - PropHeaderSize, - LZMA_FINISH_END, - &status, - &allocator); - } - - if (result == SZ_OK) { - FILE* outFile = fopen(argv[3], "wb"); - - if (outFile) { - if (fwrite(out, outSize, 1, outFile) == 1) { - success = true; - } else { - fprintf(stderr, "unable to write to %s\n", argv[3]); - } - - fclose(outFile); - } else { - fprintf(stderr, "unable to open %s\n", argv[3]); - } - } else { - fprintf(stderr, - "unable to %s data: result %d status %d\n", - encode ? "encode" : "decode", - result, - status); - } - - free(out); - } else { - fprintf(stderr, "unable to allocate output buffer\n"); - } - } else { - fprintf(stderr, "unable to determine uncompressed size\n"); - } - -#ifdef _WIN32 - UnmapViewOfFile(data); -#else - munmap(data, size); -#endif - } else { - perror(argv[0]); - } - - return (success ? 0 : -1); -} diff --git a/sgx-jvm/avian/src/machine.cpp b/sgx-jvm/avian/src/machine.cpp deleted file mode 100644 index 44bcfdb968..0000000000 --- a/sgx-jvm/avian/src/machine.cpp +++ /dev/null @@ -1,6392 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/jnienv.h" -#include "avian/machine.h" -#include "avian/util.h" -#include -#include "avian/constants.h" -#include "avian/processor.h" -#include "avian/arch.h" -#include "avian/lzma.h" - -#include -#include - -#if defined(PLATFORM_WINDOWS) -#define WIN32_LEAN_AND_MEAN -#include -#endif - -using namespace vm; -using namespace avian::util; - -namespace { - -const bool DebugClassReader = false; - -const unsigned NoByte = 0xFFFF; - -#ifdef USE_ATOMIC_OPERATIONS -void atomicIncrement(uint32_t* p, int v) -{ - for (uint32_t old = *p; not atomicCompareAndSwap32(p, old, old + v); - old = *p) { - } -} -#endif - -void join(Thread* t, Thread* o) -{ - if (t != o) { - assertT(t, o->state != Thread::JoinedState); - assertT(t, (o->getFlags() & Thread::SystemFlag) == 0); - if (o->getFlags() & Thread::JoinFlag) { - o->systemThread->join(); - } - o->state = Thread::JoinedState; - } -} - -#ifndef NDEBUG - -bool find(Thread* t, Thread* o) -{ - return (t == o) or (t->peer and find(t->peer, o)) - or (t->child and find(t->child, o)); -} - -unsigned count(Thread* t, Thread* o) -{ - unsigned c = 0; - - if (t != o) - ++c; - if (t->peer) - c += count(t->peer, o); - if (t->child) - c += count(t->child, o); - - return c; -} - -Thread** fill(Thread* t, Thread* o, Thread** array) -{ - if (t != o) - *(array++) = t; - if (t->peer) - array = fill(t->peer, o, array); - if (t->child) - array = fill(t->child, o, array); - - return array; -} - -#endif // not NDEBUG - -void dispose(Thread* t, Thread* o, bool remove) -{ - if (remove) { -#ifndef NDEBUG - expect(t, find(t->m->rootThread, o)); - - unsigned c = count(t->m->rootThread, o); - THREAD_RUNTIME_ARRAY(t, Thread*, threads, c); - fill(t->m->rootThread, o, RUNTIME_ARRAY_BODY(threads)); -#endif - - if (o->parent) { - Thread* previous = 0; - for (Thread* p = o->parent->child; p;) { - if (p == o) { - if (p == o->parent->child) { - o->parent->child = p->peer; - } else { - previous->peer = p->peer; - } - break; - } else { - previous = p; - p = p->peer; - } - } - - for (Thread* p = o->child; p;) { - Thread* next = p->peer; - p->peer = o->parent->child; - o->parent->child = p; - p->parent = o->parent; - p = next; - } - } else if (o->child) { - t->m->rootThread = o->child; - - for (Thread* p = o->peer; p;) { - Thread* next = p->peer; - p->peer = t->m->rootThread; - t->m->rootThread = p; - p = next; - } - } else if (o->peer) { - t->m->rootThread = o->peer; - } else { - abort(t); - } - -#ifndef NDEBUG - expect(t, not find(t->m->rootThread, o)); - - for (unsigned i = 0; i < c; ++i) { - expect(t, find(t->m->rootThread, RUNTIME_ARRAY_BODY(threads)[i])); - } -#endif - } - - o->dispose(); -} - -void visitAll(Thread* m, Thread* o, void (*visit)(Thread*, Thread*)) -{ - for (Thread* p = o->child; p;) { - Thread* child = p; - p = p->peer; - visitAll(m, child, visit); - } - - visit(m, o); -} - -void disposeNoRemove(Thread* m, Thread* o) -{ - dispose(m, o, false); -} - -void interruptDaemon(Thread* m, Thread* o) -{ - if (o->getFlags() & Thread::DaemonFlag) { - interrupt(m, o); - } -} - -void turnOffTheLights(Thread* t) -{ - expect(t, t->m->liveCount == 1); - - visitAll(t, t->m->rootThread, join); - - enter(t, Thread::ExitState); - - { - GcFinalizer* p = 0; - PROTECT(t, p); - - for (p = t->m->finalizers; p;) { - GcFinalizer* f = p; - p = cast(t, p->next()); - - void (*function)(Thread*, object); - memcpy(&function, &f->finalize(), BytesPerWord); - if (function) { - function(t, f->target()); - } - } - - for (p = t->m->tenuredFinalizers; p;) { - GcFinalizer* f = p; - p = cast(t, p->next()); - - void (*function)(Thread*, object); - memcpy(&function, &f->finalize(), BytesPerWord); - if (function) { - function(t, f->target()); - } - } - } - - if (GcArray* files = roots(t)->virtualFiles()) { - PROTECT(t, files); - for (unsigned i = 0; i < files->length(); ++i) { - object region = files->body()[i]; - if (region) { - static_cast(cast(t, region)->region()) - ->dispose(); - } - } - } - - for (GcFinder* p = roots(t)->virtualFileFinders(); p; p = p->next()) { - static_cast(p->finder())->dispose(); - } - - Machine* m = t->m; - - visitAll(t, t->m->rootThread, disposeNoRemove); - - System* s = m->system; - - expect(s, m->threadCount == 0); - - Heap* h = m->heap; - Processor* p = m->processor; - Classpath* c = m->classpath; - Finder* bf = m->bootFinder; - Finder* af = m->appFinder; - - c->dispose(); - h->disposeFixies(); - m->dispose(); - p->dispose(); - bf->dispose(); - af->dispose(); - h->dispose(); - s->dispose(); -} - -void killZombies(Thread* t, Thread* o) -{ - for (Thread* p = o->child; p;) { - Thread* child = p; - p = p->peer; - killZombies(t, child); - } - - if ((o->getFlags() & Thread::SystemFlag) == 0) { - switch (o->state) { - case Thread::ZombieState: - join(t, o); - // fall through - - case Thread::JoinedState: - dispose(t, o, true); - - default: - break; - } - } -} - -unsigned footprint(Thread* t) -{ - expect(t, t->criticalLevel == 0); - - unsigned n = t->heapOffset + t->heapIndex + t->backupHeapIndex; - - for (Thread* c = t->child; c; c = c->peer) { - n += footprint(c); - } - - return n; -} - -void visitRoots(Thread* t, Heap::Visitor* v) -{ - if (t->state != Thread::ZombieState) { - v->visit(&(t->javaThread)); - v->visit(&(t->exception)); - - t->m->processor->visitObjects(t, v); - - for (Thread::Protector* p = t->protector; p; p = p->next) { - p->visit(v); - } - } - - for (Thread* c = t->child; c; c = c->peer) { - visitRoots(c, v); - } -} - -bool walk(Thread*, - Heap::Walker* w, - uint32_t* mask, - unsigned fixedSize, - unsigned arrayElementSize, - unsigned arrayLength, - unsigned start) -{ - unsigned fixedSizeInWords = ceilingDivide(fixedSize, BytesPerWord); - unsigned arrayElementSizeInWords - = ceilingDivide(arrayElementSize, BytesPerWord); - - for (unsigned i = start; i < fixedSizeInWords; ++i) { - if (mask[i / 32] & (static_cast(1) << (i % 32))) { - if (not w->visit(i)) { - return false; - } - } - } - - bool arrayObjectElements = false; - for (unsigned j = 0; j < arrayElementSizeInWords; ++j) { - unsigned k = fixedSizeInWords + j; - if (mask[k / 32] & (static_cast(1) << (k % 32))) { - arrayObjectElements = true; - break; - } - } - - if (arrayObjectElements) { - unsigned arrayStart; - unsigned elementStart; - if (start > fixedSizeInWords) { - unsigned s = start - fixedSizeInWords; - arrayStart = s / arrayElementSizeInWords; - elementStart = s % arrayElementSizeInWords; - } else { - arrayStart = 0; - elementStart = 0; - } - - for (unsigned i = arrayStart; i < arrayLength; ++i) { - for (unsigned j = elementStart; j < arrayElementSizeInWords; ++j) { - unsigned k = fixedSizeInWords + j; - if (mask[k / 32] & (static_cast(1) << (k % 32))) { - if (not w->visit(fixedSizeInWords + (i * arrayElementSizeInWords) - + j)) { - return false; - } - } - } - } - } - - return true; -} - -object findInInterfaces( - Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec, - object (*find)(Thread*, GcClass*, GcByteArray*, GcByteArray*)) -{ - object result = 0; - if (GcArray* itable = cast(t, class_->interfaceTable())) { - PROTECT(t, itable); - for (unsigned i = 0; i < itable->length() and result == 0; i += 2) { - result = find(t, cast(t, itable->body()[i]), name, spec); - } - } - return result; -} - -void finalizerTargetUnreachable(Thread* t, Heap::Visitor* v, GcFinalizer** p) -{ - v->visit(&(*p)->target()); - - GcFinalizer* finalizer = *p; - *p = cast(t, finalizer->next()); - - void (*function)(Thread*, object); - memcpy(&function, &finalizer->finalize(), BytesPerWord); - - if (function) { - // TODO: use set() here? - finalizer->next() = t->m->finalizeQueue; - t->m->finalizeQueue = finalizer; - } else { - finalizer->setQueueTarget(t, finalizer->target()); - finalizer->setQueueNext(t, roots(t)->objectsToFinalize()); - roots(t)->setObjectsToFinalize(t, finalizer); - } -} - -void referenceTargetUnreachable(Thread* t, Heap::Visitor* v, GcJreference** p) -{ - if (DebugReferences) { - fprintf( - stderr, "target %p unreachable for reference %p\n", (*p)->target(), *p); - } - - v->visit(p); - (*p)->target() = 0; - - if (objectClass(t, *p) == type(t, GcCleaner::Type)) { - // In openjdk, sun/misc/Cleaner extends PhantomReference - GcCleaner* cleaner = (*p)->as(t); - - *p = cast(t, (*p)->vmNext()); - - cleaner->setQueueNext(t, roots(t)->objectsToClean()); - roots(t)->setObjectsToClean(t, cleaner); - } else { - if ((*p)->queue() - and t->m->heap->status((*p)->queue()) != Heap::Unreachable) { - // queue is reachable - add the reference - - v->visit(&(*p)->queue()); - - GcReferenceQueue* q = (*p)->queue(); - - if (q->front()) { - (*p)->setJNext(t, q->front()); - } else { - (*p)->setJNext(t, *p); - } - q->setFront(t, *p); - - (*p)->queue() = 0; - } - - *p = cast(t, (*p)->vmNext()); - } -} - -void referenceUnreachable(Thread* t, Heap::Visitor* v, GcJreference** p) -{ - GcJreference* r = t->m->heap->follow(*p); - - if (DebugReferences) { - fprintf(stderr, "reference %p unreachable (target %p)\n", *p, r->target()); - } - - if (r->queue() and t->m->heap->status(r->queue()) != Heap::Unreachable) { - // queue is reachable - add the reference - referenceTargetUnreachable(t, v, p); - } else { - *p = cast(t, (*p)->vmNext()); - } -} - -void referenceTargetReachable(Thread* t, Heap::Visitor* v, GcJreference** p) -{ - if (DebugReferences) { - fprintf( - stderr, "target %p reachable for reference %p\n", (*p)->target(), *p); - } - - v->visit(p); - v->visit(&(*p)->target()); - - if (t->m->heap->status((*p)->queue()) == Heap::Unreachable) { - (*p)->queue() = 0; - } else { - v->visit(&(*p)->queue()); - } -} - -bool isFinalizable(Thread* t, object o) -{ - return t->m->heap->status(o) == Heap::Unreachable - and (t->m->heap->follow(objectClass(t, o))->vmFlags() - & HasFinalizerFlag); -} - -void clearTargetIfFinalizable(Thread* t, GcJreference* r) -{ - if (isFinalizable(t, t->m->heap->follow(r->target()))) { - r->target() = 0; - } -} - -void postVisit(Thread* t, Heap::Visitor* v) -{ - Machine* m = t->m; - bool major = m->heap->collectionType() == Heap::MajorCollection; - - assertT(t, m->finalizeQueue == 0); - - m->heap->postVisit(); - - for (GcJreference* p = m->weakReferences; p;) { - GcJreference* r = m->heap->follow(p); - p = cast(t, r->vmNext()); - clearTargetIfFinalizable(t, r); - } - - if (major) { - for (GcJreference* p = m->tenuredWeakReferences; p;) { - GcJreference* r = m->heap->follow(p); - p = cast(t, r->vmNext()); - clearTargetIfFinalizable(t, r); - } - } - - for (Reference* r = m->jniReferences; r; r = r->next) { - if (r->weak - and isFinalizable(t, - static_cast(t->m->heap->follow(r->target)))) { - r->target = 0; - } - } - - GcFinalizer* firstNewTenuredFinalizer = 0; - GcFinalizer* lastNewTenuredFinalizer = 0; - - { - object unreachable = 0; - for (GcFinalizer** p = &(m->finalizers); *p;) { - v->visit(p); - - if (m->heap->status((*p)->target()) == Heap::Unreachable) { - GcFinalizer* finalizer = *p; - *p = cast(t, finalizer->next()); - - finalizer->next() = unreachable; - unreachable = finalizer; - } else { - p = reinterpret_cast(&(*p)->next()); - } - } - - for (GcFinalizer** p = &(m->finalizers); *p;) { - // target is reachable - v->visit(&(*p)->target()); - - if (m->heap->status(*p) == Heap::Tenured) { - // the finalizer is tenured, so we remove it from - // m->finalizers and later add it to m->tenuredFinalizers - - if (lastNewTenuredFinalizer == 0) { - lastNewTenuredFinalizer = *p; - } - - GcFinalizer* finalizer = *p; - *p = cast(t, finalizer->next()); - finalizer->next() = firstNewTenuredFinalizer; - firstNewTenuredFinalizer = finalizer; - } else { - p = reinterpret_cast(&(*p)->next()); - } - } - - for (object* p = &unreachable; *p;) { - // target is unreachable - queue it up for finalization - finalizerTargetUnreachable(t, v, reinterpret_cast(p)); - } - } - - GcJreference* firstNewTenuredWeakReference = 0; - GcJreference* lastNewTenuredWeakReference = 0; - - for (GcJreference** p = &(m->weakReferences); *p;) { - if (m->heap->status(*p) == Heap::Unreachable) { - // reference is unreachable - referenceUnreachable(t, v, p); - } else if (m->heap->status(m->heap->follow(*p)->target()) - == Heap::Unreachable) { - // target is unreachable - referenceTargetUnreachable(t, v, p); - } else { - // both reference and target are reachable - referenceTargetReachable(t, v, p); - - if (m->heap->status(*p) == Heap::Tenured) { - // the reference is tenured, so we remove it from - // m->weakReferences and later add it to - // m->tenuredWeakReferences - - if (lastNewTenuredWeakReference == 0) { - lastNewTenuredWeakReference = *p; - } - - GcJreference* reference = (*p); - *p = cast(t, reference->vmNext()); - reference->vmNext() = firstNewTenuredWeakReference; - firstNewTenuredWeakReference = reference; - } else { - p = reinterpret_cast(&(*p)->vmNext()); - } - } - } - - if (major) { - { - object unreachable = 0; - for (GcFinalizer** p = &(m->tenuredFinalizers); *p;) { - v->visit(p); - - if (m->heap->status((*p)->target()) == Heap::Unreachable) { - GcFinalizer* finalizer = *p; - *p = cast(t, finalizer->next()); - - finalizer->next() = unreachable; - unreachable = finalizer; - } else { - p = reinterpret_cast(&(*p)->next()); - } - } - - for (GcFinalizer** p = &(m->tenuredFinalizers); *p;) { - // target is reachable - v->visit(&(*p)->target()); - p = reinterpret_cast(&(*p)->next()); - } - - for (object* p = &unreachable; *p;) { - // target is unreachable - queue it up for finalization - finalizerTargetUnreachable(t, v, reinterpret_cast(p)); - } - } - - for (GcJreference** p = &(m->tenuredWeakReferences); *p;) { - if (m->heap->status(*p) == Heap::Unreachable) { - // reference is unreachable - referenceUnreachable(t, v, reinterpret_cast(p)); - } else if (m->heap->status(m->heap->follow(*p)->target()) - == Heap::Unreachable) { - // target is unreachable - referenceTargetUnreachable(t, v, reinterpret_cast(p)); - } else { - // both reference and target are reachable - referenceTargetReachable(t, v, reinterpret_cast(p)); - p = reinterpret_cast(&(*p)->vmNext()); - } - } - } - - if (lastNewTenuredFinalizer) { - lastNewTenuredFinalizer->next() = m->tenuredFinalizers; - m->tenuredFinalizers = firstNewTenuredFinalizer; - } - - if (lastNewTenuredWeakReference) { - lastNewTenuredWeakReference->vmNext() = m->tenuredWeakReferences; - m->tenuredWeakReferences = firstNewTenuredWeakReference; - } - - for (Reference* r = m->jniReferences; r; r = r->next) { - if (r->weak) { - if (m->heap->status(r->target) == Heap::Unreachable) { - r->target = 0; - } else { - v->visit(&(r->target)); - } - } - } -} - -void postCollect(Thread* t) -{ -#ifdef VM_STRESS - t->m->heap->free(t->defaultHeap, ThreadHeapSizeInBytes); - t->defaultHeap - = static_cast(t->m->heap->allocate(ThreadHeapSizeInBytes)); - memset(t->defaultHeap, 0, ThreadHeapSizeInBytes); -#endif - - if (t->heap == t->defaultHeap) { - memset(t->defaultHeap, 0, t->heapIndex * BytesPerWord); - } else { - memset(t->defaultHeap, 0, ThreadHeapSizeInBytes); - t->heap = t->defaultHeap; - } - - t->heapOffset = 0; - - if (t->m->heap->limitExceeded()) { - // if we're out of memory, pretend the thread-local heap is - // already full so we don't make things worse: - t->heapIndex = ThreadHeapSizeInWords; - } else { - t->heapIndex = 0; - } - - if (t->getFlags() & Thread::UseBackupHeapFlag) { - memset(t->backupHeap, 0, ThreadBackupHeapSizeInBytes); - - t->clearFlag(Thread::UseBackupHeapFlag); - t->backupHeapIndex = 0; - } - - for (Thread* c = t->child; c; c = c->peer) { - postCollect(c); - } -} - -uint64_t invoke(Thread* t, uintptr_t* arguments) -{ - GcMethod* m = cast(t, *reinterpret_cast(arguments[0])); - object o = *reinterpret_cast(arguments[1]); - - t->m->processor->invoke(t, m, o); - - return 1; -} - -void finalizeObject(Thread* t, object o, const char* name) -{ - for (GcClass* c = objectClass(t, o); c; c = c->super()) { - GcArray* mtable = cast(t, c->methodTable()); - for (unsigned i = 0; i < mtable->length(); ++i) { - GcMethod* m = cast(t, mtable->body()[i]); - - if (vm::strcmp(reinterpret_cast(name), - m->name()->body().begin()) == 0 - and vm::strcmp(reinterpret_cast("()V"), - m->spec()->body().begin()) == 0) { - PROTECT(t, m); - PROTECT(t, o); - - uintptr_t arguments[] = {reinterpret_cast(&m), - reinterpret_cast(&o)}; - - run(t, invoke, arguments); - - t->exception = 0; - return; - } - } - } - abort(t); -} - -unsigned readByte(AbstractStream& s, unsigned* value) -{ - if (*value == NoByte) { - return s.read1(); - } else { - unsigned r = *value; - *value = NoByte; - return r; - } -} - -GcCharArray* parseUtf8NonAscii(Thread* t, - AbstractStream& s, - GcByteArray* bytesSoFar, - unsigned byteCount, - unsigned sourceIndex, - unsigned byteA, - unsigned byteB) -{ - PROTECT(t, bytesSoFar); - - unsigned length = bytesSoFar->length() - 1; - GcCharArray* value = makeCharArray(t, length + 1); - - unsigned vi = 0; - for (; vi < byteCount; ++vi) { - value->body()[vi] = bytesSoFar->body()[vi]; - } - - for (unsigned si = sourceIndex; si < length; ++si) { - unsigned a = readByte(s, &byteA); - if (a & 0x80) { - if (a & 0x20) { - // 3 bytes - si += 2; - assertT(t, si < length); - unsigned b = readByte(s, &byteB); - unsigned c = s.read1(); - value->body()[vi++] = ((a & 0xf) << 12) | ((b & 0x3f) << 6) - | (c & 0x3f); - } else { - // 2 bytes - ++si; - assertT(t, si < length); - unsigned b = readByte(s, &byteB); - - if (a == 0xC0 and b == 0x80) { - value->body()[vi++] = 0; - } else { - value->body()[vi++] = ((a & 0x1f) << 6) | (b & 0x3f); - } - } - } else { - value->body()[vi++] = a; - } - } - - if (vi < length) { - PROTECT(t, value); - - GcCharArray* v = makeCharArray(t, vi + 1); - memcpy(v->body().begin(), value->body().begin(), vi * 2); - value = v; - } - - return value; -} - -object parseUtf8(Thread* t, AbstractStream& s, unsigned length) -{ - GcByteArray* value = makeByteArray(t, length + 1); - unsigned vi = 0; - for (unsigned si = 0; si < length; ++si) { - unsigned a = s.read1(); - if (a & 0x80) { - if (a & 0x20) { - // 3 bytes - return parseUtf8NonAscii(t, s, value, vi, si, a, NoByte); - } else { - // 2 bytes - unsigned b = s.read1(); - - if (a == 0xC0 and b == 0x80) { - ++si; - assertT(t, si < length); - value->body()[vi++] = 0; - } else { - return parseUtf8NonAscii(t, s, value, vi, si, a, b); - } - } - } else { - value->body()[vi++] = a; - } - } - - if (vi < length) { - PROTECT(t, value); - - GcByteArray* v = makeByteArray(t, vi + 1); - memcpy(v->body().begin(), value->body().begin(), vi); - value = v; - } - - return value; -} - -GcByteArray* makeByteArray(Thread* t, Stream& s, unsigned length) -{ - GcByteArray* value = makeByteArray(t, length + 1); - s.read(reinterpret_cast(value->body().begin()), length); - return value; -} - -void removeByteArray(Thread* t, object o) -{ - hashMapRemove(t, roots(t)->byteArrayMap(), o, byteArrayHash, objectEqual); -} - -GcByteArray* internByteArray(Thread* t, GcByteArray* array) -{ - PROTECT(t, array); - - ACQUIRE(t, t->m->referenceLock); - - GcTriple* n = hashMapFindNode( - t, roots(t)->byteArrayMap(), array, byteArrayHash, byteArrayEqual); - if (n) { - return cast(t, cast(t, n->first())->target()); - } else { - hashMapInsert(t, roots(t)->byteArrayMap(), array, 0, byteArrayHash); - addFinalizer(t, array, removeByteArray); - return array; - } -} - -unsigned parsePoolEntry(Thread* t, - Stream& s, - uint32_t* index, - GcSingleton* pool, - unsigned i) -{ - PROTECT(t, pool); - - s.setPosition(index[i]); - - switch (s.read1()) { - case CONSTANT_Integer: - case CONSTANT_Float: { - uint32_t v = s.read4(); - singletonValue(t, pool, i) = v; - - if (DebugClassReader) { - fprintf(stderr, " consts[%d] = int/float 0x%x\n", i, v); - } - } - return 1; - - case CONSTANT_Long: - case CONSTANT_Double: { - uint64_t v = s.read8(); - memcpy(&singletonValue(t, pool, i), &v, 8); - - if (DebugClassReader) { - fprintf(stderr, " consts[%d] = long/double \n", i); - } - } - return 2; - - case CONSTANT_Utf8: { - if (singletonObject(t, pool, i) == 0) { - GcByteArray* value = internByteArray(t, makeByteArray(t, s, s.read2())); - pool->setBodyElement(t, i, reinterpret_cast(value)); - - if (DebugClassReader) { - fprintf(stderr, " consts[%d] = utf8 %s\n", i, value->body().begin()); - } - } - } - return 1; - - case CONSTANT_Class: { - if (singletonObject(t, pool, i) == 0) { - unsigned si = s.read2() - 1; - parsePoolEntry(t, s, index, pool, si); - - GcReference* value = makeReference( - t, 0, 0, cast(t, singletonObject(t, pool, si)), 0); - pool->setBodyElement(t, i, reinterpret_cast(value)); - - if (DebugClassReader) { - fprintf(stderr, " consts[%d] = class \n", i); - } - } - } - return 1; - - case CONSTANT_String: { - if (singletonObject(t, pool, i) == 0) { - unsigned si = s.read2() - 1; - parsePoolEntry(t, s, index, pool, si); - - object value - = parseUtf8(t, cast(t, singletonObject(t, pool, si))); - value = t->m->classpath->makeString( - t, value, 0, fieldAtOffset(value, BytesPerWord) - 1); - value = intern(t, value); - pool->setBodyElement(t, i, reinterpret_cast(value)); - - if (DebugClassReader) { - fprintf(stderr, " consts[%d] = string \n", i); - } - } - } - return 1; - - case CONSTANT_NameAndType: { - if (singletonObject(t, pool, i) == 0) { - unsigned ni = s.read2() - 1; - unsigned ti = s.read2() - 1; - - parsePoolEntry(t, s, index, pool, ni); - parsePoolEntry(t, s, index, pool, ti); - - GcByteArray* name = cast(t, singletonObject(t, pool, ni)); - GcByteArray* type = cast(t, singletonObject(t, pool, ti)); - GcPair* value = makePair(t, name, type); - pool->setBodyElement(t, i, reinterpret_cast(value)); - - if (DebugClassReader) { - fprintf(stderr, - " consts[%d] = nameAndType %s%s\n", - i, - name->body().begin(), - type->body().begin()); - } - } - } - return 1; - - case CONSTANT_Fieldref: - case CONSTANT_Methodref: - case CONSTANT_InterfaceMethodref: { - if (singletonObject(t, pool, i) == 0) { - unsigned ci = s.read2() - 1; - unsigned nti = s.read2() - 1; - - parsePoolEntry(t, s, index, pool, ci); - parsePoolEntry(t, s, index, pool, nti); - - GcByteArray* className - = cast(t, singletonObject(t, pool, ci))->name(); - GcPair* nameAndType = cast(t, singletonObject(t, pool, nti)); - - object value = makeReference(t, - 0, - className, - cast(t, nameAndType->first()), - cast(t, nameAndType->second())); - pool->setBodyElement(t, i, reinterpret_cast(value)); - - if (DebugClassReader) { - fprintf(stderr, - " consts[%d] = method %s.%s%s\n", - i, - className->body().begin(), - cast(t, nameAndType->first())->body().begin(), - cast(t, nameAndType->second())->body().begin()); - } - } - } - return 1; - - case CONSTANT_MethodHandle: - if (singletonObject(t, pool, i) == 0) { - unsigned kind = s.read1(); - unsigned ri = s.read2() - 1; - - parsePoolEntry(t, s, index, pool, ri); - - GcReference* value = cast(t, singletonObject(t, pool, ri)); - - if (DebugClassReader) { - fprintf(stderr, - " consts[%d] = method handle %d %s.%s%s\n", - i, - kind, - value->class_()->body().begin(), - value->name()->body().begin(), - value->spec()->body().begin()); - } - - value = makeReference( - t, kind, value->class_(), value->name(), value->spec()); - - pool->setBodyElement(t, i, reinterpret_cast(value)); - } - return 1; - - case CONSTANT_MethodType: - if (singletonObject(t, pool, i) == 0) { - unsigned ni = s.read2() - 1; - - parsePoolEntry(t, s, index, pool, ni); - - pool->setBodyElement( - t, i, reinterpret_cast(singletonObject(t, pool, ni))); - } - return 1; - - case CONSTANT_InvokeDynamic: - if (singletonObject(t, pool, i) == 0) { - unsigned bootstrap = s.read2(); - unsigned nti = s.read2() - 1; - - parsePoolEntry(t, s, index, pool, nti); - - GcPair* nameAndType = cast(t, singletonObject(t, pool, nti)); - - const char* specString = reinterpret_cast( - cast(t, nameAndType->second())->body().begin()); - - unsigned parameterCount; - unsigned parameterFootprint; - unsigned returnCode; - scanMethodSpec(t, - specString, - true, - ¶meterCount, - ¶meterFootprint, - &returnCode); - - GcMethod* template_ - = makeMethod(t, - 0, - returnCode, - parameterCount, - parameterFootprint, - ACC_STATIC, - 0, - 0, - 0, - cast(t, nameAndType->first()), - cast(t, nameAndType->second()), - 0, - 0, - 0); - - object value = reinterpret_cast( - makeInvocation(t, bootstrap, -1, 0, pool, template_, 0)); - - pool->setBodyElement(t, i, reinterpret_cast(value)); - } - return 1; - - default: - abort(t); - } -} - -GcSingleton* parsePool(Thread* t, Stream& s) -{ - unsigned count = s.read2() - 1; - GcSingleton* pool = makeSingletonOfSize(t, count + poolMaskSize(count)); - PROTECT(t, pool); - - if (DebugClassReader) { - fprintf(stderr, " const pool entries %d\n", count); - } - - if (count) { - uint32_t* index = static_cast(t->m->heap->allocate(count * 4)); - - THREAD_RESOURCE2(t, - uint32_t*, - index, - unsigned, - count, - t->m->heap->free(index, count * 4)); - - for (unsigned i = 0; i < count; ++i) { - index[i] = s.position(); - - switch (s.read1()) { - case CONSTANT_Class: - case CONSTANT_String: - singletonMarkObject(t, pool, i); - s.skip(2); - break; - - case CONSTANT_Integer: - s.skip(4); - break; - - case CONSTANT_Float: - singletonSetBit(t, pool, count, i); - s.skip(4); - break; - - case CONSTANT_NameAndType: - case CONSTANT_Fieldref: - case CONSTANT_Methodref: - case CONSTANT_InterfaceMethodref: - singletonMarkObject(t, pool, i); - s.skip(4); - break; - - case CONSTANT_Long: - s.skip(8); - ++i; - break; - - case CONSTANT_Double: - singletonSetBit(t, pool, count, i); - singletonSetBit(t, pool, count, i + 1); - s.skip(8); - ++i; - break; - - case CONSTANT_Utf8: - singletonMarkObject(t, pool, i); - s.skip(s.read2()); - break; - - case CONSTANT_MethodHandle: - singletonMarkObject(t, pool, i); - s.skip(3); - break; - - case CONSTANT_MethodType: - singletonMarkObject(t, pool, i); - s.skip(2); - break; - - case CONSTANT_InvokeDynamic: - singletonMarkObject(t, pool, i); - s.skip(4); - break; - - default: - abort(t); - } - } - - unsigned end = s.position(); - - for (unsigned i = 0; i < count;) { - i += parsePoolEntry(t, s, index, pool, i); - } - - s.setPosition(end); - } - - return pool; -} - -void addInterfaces(Thread* t, GcClass* class_, GcHashMap* map) -{ - GcArray* table = cast(t, class_->interfaceTable()); - if (table) { - unsigned increment = 2; - if (class_->flags() & ACC_INTERFACE) { - increment = 1; - } - - PROTECT(t, map); - PROTECT(t, table); - - for (unsigned i = 0; i < table->length(); i += increment) { - GcClass* interface = cast(t, table->body()[i]); - GcByteArray* name = interface->name(); - hashMapInsertMaybe( - t, map, name, interface, byteArrayHash, byteArrayEqual); - } - } -} - -GcClassAddendum* getClassAddendum(Thread* t, GcClass* class_, GcSingleton* pool) -{ - GcClassAddendum* addendum = class_->addendum(); - if (addendum == 0) { - PROTECT(t, class_); - - addendum = makeClassAddendum(t, pool, 0, 0, 0, 0, -1, 0, 0, 0, 0); - setField(t, class_, ClassAddendum, addendum); - } - return addendum; -} - -void parseInterfaceTable(Thread* t, - Stream& s, - GcClass* class_, - GcSingleton* pool, - Gc::Type throwType) -{ - PROTECT(t, class_); - PROTECT(t, pool); - - GcHashMap* map = makeHashMap(t, 0, 0); - PROTECT(t, map); - - if (class_->super()) { - addInterfaces(t, class_->super(), map); - } - - unsigned count = s.read2(); - GcArray* table = 0; - PROTECT(t, table); - - if (count) { - table = makeArray(t, count); - - GcClassAddendum* addendum = getClassAddendum(t, class_, pool); - addendum->setInterfaceTable(t, table); - } - - for (unsigned i = 0; i < count; ++i) { - GcByteArray* name - = cast(t, singletonObject(t, pool, s.read2() - 1))->name(); - PROTECT(t, name); - - GcClass* interface = resolveClass( - t, class_->loader(), name, true, throwType); - - PROTECT(t, interface); - - table->setBodyElement(t, i, interface); - - hashMapInsertMaybe(t, map, name, interface, byteArrayHash, byteArrayEqual); - - addInterfaces(t, interface, map); - } - - GcArray* interfaceTable = 0; - if (map->size()) { - unsigned length = map->size(); - if ((class_->flags() & ACC_INTERFACE) == 0) { - length *= 2; - } - interfaceTable = makeArray(t, length); - PROTECT(t, interfaceTable); - - unsigned i = 0; - for (HashMapIterator it(t, map); it.hasMore();) { - GcClass* interface = cast(t, it.next()->second()); - - interfaceTable->setBodyElement(t, i, interface); - ++i; - - if ((class_->flags() & ACC_INTERFACE) == 0) { - if (GcArray* vt = cast(t, interface->virtualTable())) { - PROTECT(t, vt); - // we'll fill in this table in parseMethodTable(): - GcArray* vtable = makeArray(t, vt->length()); - - interfaceTable->setBodyElement(t, i, vtable); - } - - ++i; - } - } - } - - class_->setInterfaceTable(t, interfaceTable); -} - -void parseFieldTable(Thread* t, Stream& s, GcClass* class_, GcSingleton* pool) -{ - PROTECT(t, class_); - PROTECT(t, pool); - - unsigned memberOffset = BytesPerWord; - if (class_->super()) { - memberOffset = class_->super()->fixedSize(); - } - - unsigned count = s.read2(); - if (count) { - unsigned staticOffset = BytesPerWord * 3; - unsigned staticCount = 0; - - GcArray* fieldTable = makeArray(t, count); - PROTECT(t, fieldTable); - - GcIntArray* staticValueTable = makeIntArray(t, count); - PROTECT(t, staticValueTable); - - GcFieldAddendum* addendum = 0; - PROTECT(t, addendum); - - THREAD_RUNTIME_ARRAY(t, uint8_t, staticTypes, count); - - for (unsigned i = 0; i < count; ++i) { - unsigned flags = s.read2(); - unsigned name = s.read2(); - unsigned spec = s.read2(); - - unsigned value = 0; - - addendum = 0; - - unsigned code = fieldCode( - t, - cast(t, singletonObject(t, pool, spec - 1))->body()[0]); - - unsigned attributeCount = s.read2(); - for (unsigned j = 0; j < attributeCount; ++j) { - GcByteArray* name - = cast(t, singletonObject(t, pool, s.read2() - 1)); - unsigned length = s.read4(); - - if (vm::strcmp(reinterpret_cast("ConstantValue"), - name->body().begin()) == 0) { - value = s.read2(); - } else if (vm::strcmp(reinterpret_cast("Signature"), - name->body().begin()) == 0) { - if (addendum == 0) { - addendum = makeFieldAddendum(t, pool, 0, 0); - } - - addendum->setSignature(t, singletonObject(t, pool, s.read2() - 1)); - } else if (vm::strcmp(reinterpret_cast( - "RuntimeVisibleAnnotations"), - name->body().begin()) == 0) { - if (addendum == 0) { - addendum = makeFieldAddendum(t, pool, 0, 0); - } - - GcByteArray* body = makeByteArray(t, length); - s.read(reinterpret_cast(body->body().begin()), length); - - addendum->setAnnotationTable(t, body); - } else { - s.skip(length); - } - } - - GcField* field - = makeField(t, - 0, // vm flags - code, - flags, - 0, // offset - 0, // native ID - cast(t, singletonObject(t, pool, name - 1)), - cast(t, singletonObject(t, pool, spec - 1)), - addendum, - class_); - - unsigned size = fieldSize(t, code); - if (flags & ACC_STATIC) { - staticOffset = pad(staticOffset, size); - - field->offset() = staticOffset; - - staticOffset += size; - - staticValueTable->body()[staticCount] = value; - - RUNTIME_ARRAY_BODY(staticTypes)[staticCount++] = code; - } else { - if (flags & ACC_FINAL) { - class_->vmFlags() |= HasFinalMemberFlag; - } - - memberOffset = pad(memberOffset, size); - - field->offset() = memberOffset; - - memberOffset += size; - } - - fieldTable->setBodyElement(t, i, field); - } - - class_->setFieldTable(t, fieldTable); - - if (staticCount) { - unsigned footprint - = ceilingDivide(staticOffset - (BytesPerWord * 2), BytesPerWord); - GcSingleton* staticTable = makeSingletonOfSize(t, footprint); - - uint8_t* body = reinterpret_cast(staticTable->body().begin()); - - memcpy(body, &class_, BytesPerWord); - singletonMarkObject(t, staticTable, 0); - - for (unsigned i = 0, offset = BytesPerWord; i < staticCount; ++i) { - unsigned size = fieldSize(t, RUNTIME_ARRAY_BODY(staticTypes)[i]); - offset = pad(offset, size); - - unsigned value = staticValueTable->body()[i]; - if (value) { - switch (RUNTIME_ARRAY_BODY(staticTypes)[i]) { - case ByteField: - case BooleanField: - body[offset] = singletonValue(t, pool, value - 1); - break; - - case CharField: - case ShortField: - *reinterpret_cast(body + offset) - = singletonValue(t, pool, value - 1); - break; - - case IntField: - case FloatField: - *reinterpret_cast(body + offset) - = singletonValue(t, pool, value - 1); - break; - - case LongField: - case DoubleField: - memcpy(body + offset, &singletonValue(t, pool, value - 1), 8); - break; - - case ObjectField: - memcpy(body + offset, - &singletonObject(t, pool, value - 1), - BytesPerWord); - break; - - default: - abort(t); - } - } - - if (RUNTIME_ARRAY_BODY(staticTypes)[i] == ObjectField) { - singletonMarkObject(t, staticTable, offset / BytesPerWord); - } - - offset += size; - } - - class_->setStaticTable(t, staticTable); - } - } - - class_->fixedSize() = memberOffset; - - if (class_->super() and memberOffset == class_->super()->fixedSize()) { - class_->setObjectMask(t, class_->super()->objectMask()); - } else { - GcIntArray* mask = makeIntArray( - t, ceilingDivide(class_->fixedSize(), 32 * BytesPerWord)); - mask->body()[0] = 1; - - GcIntArray* superMask = 0; - if (class_->super()) { - superMask = class_->super()->objectMask(); - if (superMask) { - memcpy( - mask->body().begin(), - superMask->body().begin(), - ceilingDivide(class_->super()->fixedSize(), 32 * BytesPerWord) * 4); - } - } - - bool sawReferenceField = false; - GcArray* fieldTable = cast(t, class_->fieldTable()); - if (fieldTable) { - for (int i = fieldTable->length() - 1; i >= 0; --i) { - GcField* field = cast(t, fieldTable->body()[i]); - if ((field->flags() & ACC_STATIC) == 0 - and field->code() == ObjectField) { - unsigned index = field->offset() / BytesPerWord; - mask->body()[index / 32] |= 1 << (index % 32); - sawReferenceField = true; - } - } - } - - if (superMask or sawReferenceField) { - class_->setObjectMask(t, mask); - } - } -} - -uint16_t read16(uint8_t* code, unsigned& ip) -{ - uint16_t a = code[ip++]; - uint16_t b = code[ip++]; - return (a << 8) | b; -} - -uint32_t read32(uint8_t* code, unsigned& ip) -{ - uint32_t b = code[ip++]; - uint32_t a = code[ip++]; - uint32_t c = code[ip++]; - uint32_t d = code[ip++]; - return (a << 24) | (b << 16) | (c << 8) | d; -} - -void disassembleCode(const char* prefix, uint8_t* code, unsigned length) -{ - unsigned ip = 0; - - while (ip < length) { - unsigned instr; - fprintf(stderr, "%s%x:\t", prefix, ip); - switch (instr = code[ip++]) { - case aaload: - fprintf(stderr, "aaload\n"); - break; - case aastore: - fprintf(stderr, "aastore\n"); - break; - - case aconst_null: - fprintf(stderr, "aconst_null\n"); - break; - - case aload: - fprintf(stderr, "aload %02x\n", code[ip++]); - break; - case aload_0: - fprintf(stderr, "aload_0\n"); - break; - case aload_1: - fprintf(stderr, "aload_1\n"); - break; - case aload_2: - fprintf(stderr, "aload_2\n"); - break; - case aload_3: - fprintf(stderr, "aload_3\n"); - break; - - case anewarray: - fprintf(stderr, "anewarray %04x\n", read16(code, ip)); - break; - case areturn: - fprintf(stderr, "areturn\n"); - break; - case arraylength: - fprintf(stderr, "arraylength\n"); - break; - - case astore: - fprintf(stderr, "astore %02x\n", code[ip++]); - break; - case astore_0: - fprintf(stderr, "astore_0\n"); - break; - case astore_1: - fprintf(stderr, "astore_1\n"); - break; - case astore_2: - fprintf(stderr, "astore_2\n"); - break; - case astore_3: - fprintf(stderr, "astore_3\n"); - break; - - case athrow: - fprintf(stderr, "athrow\n"); - break; - case baload: - fprintf(stderr, "baload\n"); - break; - case bastore: - fprintf(stderr, "bastore\n"); - break; - - case bipush: - fprintf(stderr, "bipush %02x\n", code[ip++]); - break; - case caload: - fprintf(stderr, "caload\n"); - break; - case castore: - fprintf(stderr, "castore\n"); - break; - case checkcast: - fprintf(stderr, "checkcast %04x\n", read16(code, ip)); - break; - case d2f: - fprintf(stderr, "d2f\n"); - break; - case d2i: - fprintf(stderr, "d2i\n"); - break; - case d2l: - fprintf(stderr, "d2l\n"); - break; - case dadd: - fprintf(stderr, "dadd\n"); - break; - case daload: - fprintf(stderr, "daload\n"); - break; - case dastore: - fprintf(stderr, "dastore\n"); - break; - case dcmpg: - fprintf(stderr, "dcmpg\n"); - break; - case dcmpl: - fprintf(stderr, "dcmpl\n"); - break; - case dconst_0: - fprintf(stderr, "dconst_0\n"); - break; - case dconst_1: - fprintf(stderr, "dconst_1\n"); - break; - case ddiv: - fprintf(stderr, "ddiv\n"); - break; - case dmul: - fprintf(stderr, "dmul\n"); - break; - case dneg: - fprintf(stderr, "dneg\n"); - break; - case vm::drem: - fprintf(stderr, "drem\n"); - break; - case dsub: - fprintf(stderr, "dsub\n"); - break; - case vm::dup: - fprintf(stderr, "dup\n"); - break; - case dup_x1: - fprintf(stderr, "dup_x1\n"); - break; - case dup_x2: - fprintf(stderr, "dup_x2\n"); - break; - case vm::dup2: - fprintf(stderr, "dup2\n"); - break; - case dup2_x1: - fprintf(stderr, "dup2_x1\n"); - break; - case dup2_x2: - fprintf(stderr, "dup2_x2\n"); - break; - case f2d: - fprintf(stderr, "f2d\n"); - break; - case f2i: - fprintf(stderr, "f2i\n"); - break; - case f2l: - fprintf(stderr, "f2l\n"); - break; - case fadd: - fprintf(stderr, "fadd\n"); - break; - case faload: - fprintf(stderr, "faload\n"); - break; - case fastore: - fprintf(stderr, "fastore\n"); - break; - case fcmpg: - fprintf(stderr, "fcmpg\n"); - break; - case fcmpl: - fprintf(stderr, "fcmpl\n"); - break; - case fconst_0: - fprintf(stderr, "fconst_0\n"); - break; - case fconst_1: - fprintf(stderr, "fconst_1\n"); - break; - case fconst_2: - fprintf(stderr, "fconst_2\n"); - break; - case fdiv: - fprintf(stderr, "fdiv\n"); - break; - case fmul: - fprintf(stderr, "fmul\n"); - break; - case fneg: - fprintf(stderr, "fneg\n"); - break; - case frem: - fprintf(stderr, "frem\n"); - break; - case fsub: - fprintf(stderr, "fsub\n"); - break; - - case getfield: - fprintf(stderr, "getfield %04x\n", read16(code, ip)); - break; - case getstatic: - fprintf(stderr, "getstatic %04x\n", read16(code, ip)); - break; - case goto_: { - int16_t offset = read16(code, ip); - fprintf(stderr, "goto %04x\n", offset + ip - 3); - } break; - case goto_w: { - int32_t offset = read32(code, ip); - fprintf(stderr, "goto_w %08x\n", offset + ip - 5); - } break; - - case i2b: - fprintf(stderr, "i2b\n"); - break; - case i2c: - fprintf(stderr, "i2c\n"); - break; - case i2d: - fprintf(stderr, "i2d\n"); - break; - case i2f: - fprintf(stderr, "i2f\n"); - break; - case i2l: - fprintf(stderr, "i2l\n"); - break; - case i2s: - fprintf(stderr, "i2s\n"); - break; - case iadd: - fprintf(stderr, "iadd\n"); - break; - case iaload: - fprintf(stderr, "iaload\n"); - break; - case iand: - fprintf(stderr, "iand\n"); - break; - case iastore: - fprintf(stderr, "iastore\n"); - break; - case iconst_m1: - fprintf(stderr, "iconst_m1\n"); - break; - case iconst_0: - fprintf(stderr, "iconst_0\n"); - break; - case iconst_1: - fprintf(stderr, "iconst_1\n"); - break; - case iconst_2: - fprintf(stderr, "iconst_2\n"); - break; - case iconst_3: - fprintf(stderr, "iconst_3\n"); - break; - case iconst_4: - fprintf(stderr, "iconst_4\n"); - break; - case iconst_5: - fprintf(stderr, "iconst_5\n"); - break; - case idiv: - fprintf(stderr, "idiv\n"); - break; - - case if_acmpeq: { - int16_t offset = read16(code, ip); - fprintf(stderr, "if_acmpeq %04x\n", offset + ip - 3); - } break; - case if_acmpne: { - int16_t offset = read16(code, ip); - fprintf(stderr, "if_acmpne %04x\n", offset + ip - 3); - } break; - case if_icmpeq: { - int16_t offset = read16(code, ip); - fprintf(stderr, "if_icmpeq %04x\n", offset + ip - 3); - } break; - case if_icmpne: { - int16_t offset = read16(code, ip); - fprintf(stderr, "if_icmpne %04x\n", offset + ip - 3); - } break; - - case if_icmpgt: { - int16_t offset = read16(code, ip); - fprintf(stderr, "if_icmpgt %04x\n", offset + ip - 3); - } break; - case if_icmpge: { - int16_t offset = read16(code, ip); - fprintf(stderr, "if_icmpge %04x\n", offset + ip - 3); - } break; - case if_icmplt: { - int16_t offset = read16(code, ip); - fprintf(stderr, "if_icmplt %04x\n", offset + ip - 3); - } break; - case if_icmple: { - int16_t offset = read16(code, ip); - fprintf(stderr, "if_icmple %04x\n", offset + ip - 3); - } break; - - case ifeq: { - int16_t offset = read16(code, ip); - fprintf(stderr, "ifeq %04x\n", offset + ip - 3); - } break; - case ifne: { - int16_t offset = read16(code, ip); - fprintf(stderr, "ifne %04x\n", offset + ip - 3); - } break; - case ifgt: { - int16_t offset = read16(code, ip); - fprintf(stderr, "ifgt %04x\n", offset + ip - 3); - } break; - case ifge: { - int16_t offset = read16(code, ip); - fprintf(stderr, "ifge %04x\n", offset + ip - 3); - } break; - case iflt: { - int16_t offset = read16(code, ip); - fprintf(stderr, "iflt %04x\n", offset + ip - 3); - } break; - case ifle: { - int16_t offset = read16(code, ip); - fprintf(stderr, "ifle %04x\n", offset + ip - 3); - } break; - - case ifnonnull: { - int16_t offset = read16(code, ip); - fprintf(stderr, "ifnonnull %04x\n", offset + ip - 3); - } break; - case ifnull: { - int16_t offset = read16(code, ip); - fprintf(stderr, "ifnull %04x\n", offset + ip - 3); - } break; - - case iinc: { - uint8_t a = code[ip++]; - uint8_t b = code[ip++]; - fprintf(stderr, "iinc %02x %02x\n", a, b); - } break; - - case iload: - fprintf(stderr, "iload %02x\n", code[ip++]); - break; - case fload: - fprintf(stderr, "fload %02x\n", code[ip++]); - break; - - case iload_0: - fprintf(stderr, "iload_0\n"); - break; - case fload_0: - fprintf(stderr, "fload_0\n"); - break; - case iload_1: - fprintf(stderr, "iload_1\n"); - break; - case fload_1: - fprintf(stderr, "fload_1\n"); - break; - - case iload_2: - fprintf(stderr, "iload_2\n"); - break; - case fload_2: - fprintf(stderr, "fload_2\n"); - break; - case iload_3: - fprintf(stderr, "iload_3\n"); - break; - case fload_3: - fprintf(stderr, "fload_3\n"); - break; - - case imul: - fprintf(stderr, "imul\n"); - break; - case ineg: - fprintf(stderr, "ineg\n"); - break; - - case instanceof: - fprintf(stderr, "instanceof %04x\n", read16(code, ip)); - break; - case invokeinterface: - fprintf(stderr, "invokeinterface %04x\n", read16(code, ip)); - break; - case invokespecial: - fprintf(stderr, "invokespecial %04x\n", read16(code, ip)); - break; - case invokestatic: - fprintf(stderr, "invokestatic %04x\n", read16(code, ip)); - break; - case invokevirtual: - fprintf(stderr, "invokevirtual %04x\n", read16(code, ip)); - break; - - case ior: - fprintf(stderr, "ior\n"); - break; - case irem: - fprintf(stderr, "irem\n"); - break; - case ireturn: - fprintf(stderr, "ireturn\n"); - break; - case freturn: - fprintf(stderr, "freturn\n"); - break; - case ishl: - fprintf(stderr, "ishl\n"); - break; - case ishr: - fprintf(stderr, "ishr\n"); - break; - - case istore: - fprintf(stderr, "istore %02x\n", code[ip++]); - break; - case fstore: - fprintf(stderr, "fstore %02x\n", code[ip++]); - break; - - case istore_0: - fprintf(stderr, "istore_0\n"); - break; - case fstore_0: - fprintf(stderr, "fstore_0\n"); - break; - case istore_1: - fprintf(stderr, "istore_1\n"); - break; - case fstore_1: - fprintf(stderr, "fstore_1\n"); - break; - case istore_2: - fprintf(stderr, "istore_2\n"); - break; - case fstore_2: - fprintf(stderr, "fstore_2\n"); - break; - case istore_3: - fprintf(stderr, "istore_3\n"); - break; - case fstore_3: - fprintf(stderr, "fstore_3\n"); - break; - - case isub: - fprintf(stderr, "isub\n"); - break; - case iushr: - fprintf(stderr, "iushr\n"); - break; - case ixor: - fprintf(stderr, "ixor\n"); - break; - - case jsr: - fprintf(stderr, "jsr %04x\n", read16(code, ip)); - break; - case jsr_w: - fprintf(stderr, "jsr_w %08x\n", read32(code, ip)); - break; - - case l2d: - fprintf(stderr, "l2d\n"); - break; - case l2f: - fprintf(stderr, "l2f\n"); - break; - case l2i: - fprintf(stderr, "l2i\n"); - break; - case ladd: - fprintf(stderr, "ladd\n"); - break; - case laload: - fprintf(stderr, "laload\n"); - break; - - case land: - fprintf(stderr, "land\n"); - break; - case lastore: - fprintf(stderr, "lastore\n"); - break; - - case lcmp: - fprintf(stderr, "lcmp\n"); - break; - case lconst_0: - fprintf(stderr, "lconst_0\n"); - break; - case lconst_1: - fprintf(stderr, "lconst_1\n"); - break; - - case ldc: - fprintf(stderr, "ldc %04x\n", read16(code, ip)); - break; - case ldc_w: - fprintf(stderr, "ldc_w %08x\n", read32(code, ip)); - break; - case ldc2_w: - fprintf(stderr, "ldc2_w %04x\n", read16(code, ip)); - break; - - case ldiv_: - fprintf(stderr, "ldiv_\n"); - break; - - case lload: - fprintf(stderr, "lload %02x\n", code[ip++]); - break; - case dload: - fprintf(stderr, "dload %02x\n", code[ip++]); - break; - - case lload_0: - fprintf(stderr, "lload_0\n"); - break; - case dload_0: - fprintf(stderr, "dload_0\n"); - break; - case lload_1: - fprintf(stderr, "lload_1\n"); - break; - case dload_1: - fprintf(stderr, "dload_1\n"); - break; - case lload_2: - fprintf(stderr, "lload_2\n"); - break; - case dload_2: - fprintf(stderr, "dload_2\n"); - break; - case lload_3: - fprintf(stderr, "lload_3\n"); - break; - case dload_3: - fprintf(stderr, "dload_3\n"); - break; - - case lmul: - fprintf(stderr, "lmul\n"); - break; - case lneg: - fprintf(stderr, "lneg\n"); - break; - - case lookupswitch: { - int32_t default_ = read32(code, ip); - int32_t pairCount = read32(code, ip); - fprintf(stderr, - "lookupswitch default: %d pairCount: %d\n", - default_, - pairCount); - - for (int i = 0; i < pairCount; i++) { - int32_t k = read32(code, ip); - int32_t d = read32(code, ip); - fprintf(stderr, "%s key: %02x dest: %2x\n", prefix, k, d); - } - } break; - - case lor: - fprintf(stderr, "lor\n"); - break; - case lrem: - fprintf(stderr, "lrem\n"); - break; - case lreturn: - fprintf(stderr, "lreturn\n"); - break; - case dreturn: - fprintf(stderr, "dreturn\n"); - break; - case lshl: - fprintf(stderr, "lshl\n"); - break; - case lshr: - fprintf(stderr, "lshr\n"); - break; - - case lstore: - fprintf(stderr, "lstore %02x\n", code[ip++]); - break; - case dstore: - fprintf(stderr, "dstore %02x\n", code[ip++]); - break; - - case lstore_0: - fprintf(stderr, "lstore_0\n"); - break; - case dstore_0: - fprintf(stderr, "dstore_0\n"); - break; - case lstore_1: - fprintf(stderr, "lstore_1\n"); - break; - case dstore_1: - fprintf(stderr, "dstore_1\n"); - break; - case lstore_2: - fprintf(stderr, "lstore_2\n"); - break; - case dstore_2: - fprintf(stderr, "dstore_2\n"); - break; - case lstore_3: - fprintf(stderr, "lstore_3\n"); - break; - case dstore_3: - fprintf(stderr, "dstore_3\n"); - break; - - case lsub: - fprintf(stderr, "lsub\n"); - break; - case lushr: - fprintf(stderr, "lushr\n"); - break; - case lxor: - fprintf(stderr, "lxor\n"); - break; - - case monitorenter: - fprintf(stderr, "monitorenter\n"); - break; - case monitorexit: - fprintf(stderr, "monitorexit\n"); - break; - - case multianewarray: { - unsigned type = read16(code, ip); - fprintf(stderr, "multianewarray %04x %02x\n", type, code[ip++]); - } break; - - case new_: - fprintf(stderr, "new %04x\n", read16(code, ip)); - break; - - case newarray: - fprintf(stderr, "newarray %02x\n", code[ip++]); - break; - - case nop: - fprintf(stderr, "nop\n"); - break; - case pop_: - fprintf(stderr, "pop\n"); - break; - case pop2: - fprintf(stderr, "pop2\n"); - break; - - case putfield: - fprintf(stderr, "putfield %04x\n", read16(code, ip)); - break; - case putstatic: - fprintf(stderr, "putstatic %04x\n", read16(code, ip)); - break; - - case ret: - fprintf(stderr, "ret %02x\n", code[ip++]); - break; - - case return_: - fprintf(stderr, "return_\n"); - break; - case saload: - fprintf(stderr, "saload\n"); - break; - case sastore: - fprintf(stderr, "sastore\n"); - break; - - case sipush: - fprintf(stderr, "sipush %04x\n", read16(code, ip)); - break; - - case swap: - fprintf(stderr, "swap\n"); - break; - - case tableswitch: { - int32_t default_ = read32(code, ip); - int32_t bottom = read32(code, ip); - int32_t top = read32(code, ip); - fprintf(stderr, - "tableswitch default: %d bottom: %d top: %d\n", - default_, - bottom, - top); - - for (int i = 0; i < top - bottom + 1; i++) { - int32_t d = read32(code, ip); - fprintf(stderr, "%s key: %d dest: %2x\n", prefix, i + bottom, d); - } - } break; - - case wide: { - switch (code[ip++]) { - case aload: - fprintf(stderr, "wide aload %04x\n", read16(code, ip)); - break; - - case astore: - fprintf(stderr, "wide astore %04x\n", read16(code, ip)); - break; - case iinc: - fprintf(stderr, - "wide iinc %04x %04x\n", - read16(code, ip), - read16(code, ip)); - break; - case iload: - fprintf(stderr, "wide iload %04x\n", read16(code, ip)); - break; - case istore: - fprintf(stderr, "wide istore %04x\n", read16(code, ip)); - break; - case lload: - fprintf(stderr, "wide lload %04x\n", read16(code, ip)); - break; - case lstore: - fprintf(stderr, "wide lstore %04x\n", read16(code, ip)); - break; - case ret: - fprintf(stderr, "wide ret %04x\n", read16(code, ip)); - break; - - default: { - fprintf(stderr, - "unknown wide instruction %02x %04x\n", - instr, - read16(code, ip)); - } - } - } break; - - default: { - fprintf(stderr, "unknown instruction %02x\n", instr); - } - } - } -} - -GcCode* parseCode(Thread* t, Stream& s, GcSingleton* pool) -{ - PROTECT(t, pool); - - unsigned maxStack = s.read2(); - unsigned maxLocals = s.read2(); - unsigned length = s.read4(); - - if (DebugClassReader) { - fprintf(stderr, - " code: maxStack %d maxLocals %d length %d\n", - maxStack, - maxLocals, - length); - } - - GcCode* code = makeCode(t, pool, 0, 0, 0, 0, 0, maxStack, maxLocals, length); - s.read(code->body().begin(), length); - PROTECT(t, code); - - if (DebugClassReader) { - disassembleCode(" ", code->body().begin(), length); - } - - unsigned ehtLength = s.read2(); - if (ehtLength) { - GcExceptionHandlerTable* eht = makeExceptionHandlerTable(t, ehtLength); - for (unsigned i = 0; i < ehtLength; ++i) { - unsigned start = s.read2(); - unsigned end = s.read2(); - unsigned ip = s.read2(); - unsigned catchType = s.read2(); - eht->body()[i] = exceptionHandler(start, end, ip, catchType); - } - - code->setExceptionHandlerTable(t, eht); - } - - unsigned attributeCount = s.read2(); - for (unsigned j = 0; j < attributeCount; ++j) { - GcByteArray* name - = cast(t, singletonObject(t, pool, s.read2() - 1)); - unsigned length = s.read4(); - - if (vm::strcmp(reinterpret_cast("LineNumberTable"), - name->body().begin()) == 0) { - unsigned lntLength = s.read2(); - GcLineNumberTable* lnt = makeLineNumberTable(t, lntLength); - for (unsigned i = 0; i < lntLength; ++i) { - unsigned ip = s.read2(); - unsigned line = s.read2(); - lnt->body()[i] = lineNumber(ip, line); - } - - code->setLineNumberTable(t, lnt); - } else { - s.skip(length); - } - } - - return code; -} - -GcList* addInterfaceMethods(Thread* t, - GcClass* class_, - GcHashMap* virtualMap, - unsigned* virtualCount, - bool makeList) -{ - GcArray* itable = cast(t, class_->interfaceTable()); - if (itable) { - PROTECT(t, class_); - PROTECT(t, virtualMap); - PROTECT(t, itable); - - GcList* list = 0; - PROTECT(t, list); - - GcMethod* method = 0; - PROTECT(t, method); - - GcArray* vtable = 0; - PROTECT(t, vtable); - - unsigned stride = (class_->flags() & ACC_INTERFACE) ? 1 : 2; - for (unsigned i = 0; i < itable->length(); i += stride) { - vtable = cast( - t, cast(t, itable->body()[i])->virtualTable()); - if (vtable) { - for (unsigned j = 0; j < vtable->length(); ++j) { - method = cast(t, vtable->body()[j]); - GcTriple* n - = hashMapFindNode(t, virtualMap, method, methodHash, methodEqual); - if (n == 0) { - method = makeMethod(t, - method->vmFlags(), - method->returnCode(), - method->parameterCount(), - method->parameterFootprint(), - method->flags(), - (*virtualCount)++, - 0, - 0, - method->name(), - method->spec(), - 0, - class_, - method->code()); - - hashMapInsert(t, virtualMap, method, method, methodHash); - - if (makeList) { - if (list == 0) { - list = vm::makeList(t, 0, 0, 0); - } - listAppend(t, list, method); - } - } - } - } - } - - return list; - } - - return 0; -} - -void parseMethodTable(Thread* t, Stream& s, GcClass* class_, GcSingleton* pool) -{ - PROTECT(t, class_); - PROTECT(t, pool); - - GcHashMap* virtualMap = makeHashMap(t, 0, 0); - PROTECT(t, virtualMap); - - unsigned virtualCount = 0; - unsigned declaredVirtualCount = 0; - - GcArray* superVirtualTable = 0; - PROTECT(t, superVirtualTable); - - if ((class_->flags() & ACC_INTERFACE) == 0) { - if (class_->super()) { - superVirtualTable = cast(t, class_->super()->virtualTable()); - } - - if (superVirtualTable) { - virtualCount = superVirtualTable->length(); - for (unsigned i = 0; i < virtualCount; ++i) { - object method = superVirtualTable->body()[i]; - hashMapInsert(t, virtualMap, method, method, methodHash); - } - } - } - - GcList* newVirtuals = makeList(t, 0, 0, 0); - PROTECT(t, newVirtuals); - - unsigned count = s.read2(); - - if (DebugClassReader) { - fprintf(stderr, " method count %d\n", count); - } - - if (count) { - GcArray* methodTable = makeArray(t, count); - PROTECT(t, methodTable); - - GcMethodAddendum* addendum = 0; - PROTECT(t, addendum); - - GcCode* code = 0; - PROTECT(t, code); - - for (unsigned i = 0; i < count; ++i) { - unsigned flags = s.read2(); - unsigned name = s.read2(); - unsigned spec = s.read2(); - - if (DebugClassReader) { - fprintf(stderr, - " method flags %d name %d spec %d '%s%s'\n", - flags, - name, - spec, - cast(t, singletonObject(t, pool, name - 1)) - ->body() - .begin(), - cast(t, singletonObject(t, pool, spec - 1)) - ->body() - .begin()); - } - - addendum = 0; - code = 0; - - unsigned attributeCount = s.read2(); - for (unsigned j = 0; j < attributeCount; ++j) { - GcByteArray* attributeName - = cast(t, singletonObject(t, pool, s.read2() - 1)); - unsigned length = s.read4(); - - if (vm::strcmp(reinterpret_cast("Code"), - attributeName->body().begin()) == 0) { - code = parseCode(t, s, pool); - } else if (vm::strcmp(reinterpret_cast("Exceptions"), - attributeName->body().begin()) == 0) { - if (addendum == 0) { - addendum = makeMethodAddendum(t, pool, 0, 0, 0, 0, 0); - } - unsigned exceptionCount = s.read2(); - GcShortArray* body = makeShortArray(t, exceptionCount); - for (unsigned i = 0; i < exceptionCount; ++i) { - body->body()[i] = s.read2(); - } - addendum->setExceptionTable(t, body); - } else if (vm::strcmp( - reinterpret_cast("AnnotationDefault"), - attributeName->body().begin()) == 0) { - if (addendum == 0) { - addendum = makeMethodAddendum(t, pool, 0, 0, 0, 0, 0); - } - - GcByteArray* body = makeByteArray(t, length); - s.read(reinterpret_cast(body->body().begin()), length); - - addendum->setAnnotationDefault(t, body); - } else if (vm::strcmp(reinterpret_cast("Signature"), - attributeName->body().begin()) == 0) { - if (addendum == 0) { - addendum = makeMethodAddendum(t, pool, 0, 0, 0, 0, 0); - } - - addendum->setSignature(t, singletonObject(t, pool, s.read2() - 1)); - } else if (vm::strcmp(reinterpret_cast( - "RuntimeVisibleAnnotations"), - attributeName->body().begin()) == 0) { - if (addendum == 0) { - addendum = makeMethodAddendum(t, pool, 0, 0, 0, 0, 0); - } - - GcByteArray* body = makeByteArray(t, length); - s.read(reinterpret_cast(body->body().begin()), length); - - addendum->setAnnotationTable(t, body); - } else if (vm::strcmp(reinterpret_cast( - "RuntimeVisibleParameterAnnotations"), - attributeName->body().begin()) == 0) { - if (addendum == 0) { - addendum = makeMethodAddendum(t, pool, 0, 0, 0, 0, 0); - } - - GcByteArray* body = makeByteArray(t, length); - s.read(reinterpret_cast(body->body().begin()), length); - - addendum->setParameterAnnotationTable(t, body); - } else { - s.skip(length); - } - } - - const char* specString = reinterpret_cast( - cast(t, singletonObject(t, pool, spec - 1)) - ->body() - .begin()); - - unsigned parameterCount; - unsigned parameterFootprint; - unsigned returnCode; - scanMethodSpec(t, - specString, - flags & ACC_STATIC, - ¶meterCount, - ¶meterFootprint, - &returnCode); - - GcMethod* method = t->m->processor->makeMethod( - t, - 0, // vm flags - returnCode, - parameterCount, - parameterFootprint, - flags, - 0, // offset - cast(t, singletonObject(t, pool, name - 1)), - cast(t, singletonObject(t, pool, spec - 1)), - addendum, - class_, - code); - - PROTECT(t, method); - - if (methodVirtual(t, method)) { - ++declaredVirtualCount; - - GcTriple* p - = hashMapFindNode(t, virtualMap, method, methodHash, methodEqual); - - if (p) { - method->offset() = cast(t, p->first())->offset(); - - p->setSecond(t, method); - } else { - method->offset() = virtualCount++; - - listAppend(t, newVirtuals, method); - - hashMapInsert(t, virtualMap, method, method, methodHash); - } - - if (UNLIKELY((class_->flags() & ACC_INTERFACE) == 0 - and vm::strcmp(reinterpret_cast("finalize"), - method->name()->body().begin()) == 0 - and vm::strcmp(reinterpret_cast("()V"), - method->spec()->body().begin()) == 0 - and (not emptyMethod(t, method)))) { - class_->vmFlags() |= HasFinalizerFlag; - } - } else { - method->offset() = i; - - if (vm::strcmp(reinterpret_cast(""), - method->name()->body().begin()) == 0) { - method->vmFlags() |= ClassInitFlag; - class_->vmFlags() |= NeedInitFlag; - } else if (vm::strcmp(reinterpret_cast(""), - method->name()->body().begin()) == 0) { - method->vmFlags() |= ConstructorFlag; - } - } - - methodTable->setBodyElement(t, i, method); - } - - class_->setMethodTable(t, methodTable); - } - - GcList* abstractVirtuals - = addInterfaceMethods(t, class_, virtualMap, &virtualCount, true); - - PROTECT(t, abstractVirtuals); - - bool populateInterfaceVtables = false; - - if (declaredVirtualCount == 0 and abstractVirtuals == 0 - and (class_->flags() & ACC_INTERFACE) == 0) { - if (class_->super()) { - // inherit virtual table from superclass - class_->setVirtualTable(t, superVirtualTable); - - if (class_->super()->interfaceTable() - and cast(t, class_->interfaceTable())->length() - == cast(t, class_->super()->interfaceTable()) - ->length()) { - // inherit interface table from superclass - class_->setInterfaceTable(t, class_->super()->interfaceTable()); - } else { - populateInterfaceVtables = true; - } - } else { - // apparently, Object does not have any virtual methods. We - // give it a vtable anyway so code doesn't break elsewhere. - GcArray* vtable = makeArray(t, 0); - class_->setVirtualTable(t, vtable); - } - } else if (virtualCount) { - // generate class vtable - - GcArray* vtable = makeArray(t, virtualCount); - - unsigned i = 0; - if (class_->flags() & ACC_INTERFACE) { - PROTECT(t, vtable); - - for (HashMapIterator it(t, virtualMap); it.hasMore();) { - GcMethod* method = cast(t, it.next()->first()); - assertT(t, vtable->body()[method->offset()] == 0); - vtable->setBodyElement(t, method->offset(), method); - ++i; - } - } else { - populateInterfaceVtables = true; - - if (superVirtualTable) { - for (; i < superVirtualTable->length(); ++i) { - object method = superVirtualTable->body()[i]; - method = hashMapFind(t, virtualMap, method, methodHash, methodEqual); - - vtable->setBodyElement(t, i, method); - } - } - - for (GcPair* p = cast(t, newVirtuals->front()); p; - p = cast(t, p->second())) { - vtable->setBodyElement(t, i, p->first()); - ++i; - } - } - - if (abstractVirtuals) { - PROTECT(t, vtable); - - object originalMethodTable = class_->methodTable(); - PROTECT(t, originalMethodTable); - - unsigned oldLength - = class_->methodTable() - ? cast(t, class_->methodTable())->length() - : 0; - - GcClassAddendum* addendum = getClassAddendum(t, class_, pool); - addendum->declaredMethodCount() = oldLength; - - GcArray* newMethodTable - = makeArray(t, oldLength + abstractVirtuals->size()); - - if (oldLength) { - GcArray* mtable = cast(t, class_->methodTable()); - for (size_t i = 0; i < oldLength; i++) { - newMethodTable->setBodyElement(t, i, mtable->body()[i]); - } - } - - mark(t, newMethodTable, ArrayBody, oldLength); - - unsigned mti = oldLength; - for (GcPair* p = cast(t, abstractVirtuals->front()); p; - p = cast(t, p->second())) { - newMethodTable->setBodyElement(t, mti++, p->first()); - - if ((class_->flags() & ACC_INTERFACE) == 0) { - vtable->setBodyElement(t, i++, p->first()); - } - } - - assertT(t, newMethodTable->length() == mti); - - class_->setMethodTable(t, newMethodTable); - } - - assertT(t, vtable->length() == i); - - class_->setVirtualTable(t, vtable); - } - - if (populateInterfaceVtables) { - // generate interface vtables - GcArray* itable = cast(t, class_->interfaceTable()); - if (itable) { - PROTECT(t, itable); - - for (unsigned i = 0; i < itable->length(); i += 2) { - GcArray* ivtable = cast( - t, cast(t, itable->body()[i])->virtualTable()); - if (ivtable) { - GcArray* vtable = cast(t, itable->body()[i + 1]); - - for (unsigned j = 0; j < ivtable->length(); ++j) { - object method = ivtable->body()[j]; - method - = hashMapFind(t, virtualMap, method, methodHash, methodEqual); - assertT(t, method); - - vtable->setBodyElement(t, j, method); - } - } - } - } - } -} - -void parseAttributeTable(Thread* t, - Stream& s, - GcClass* class_, - GcSingleton* pool) -{ - PROTECT(t, class_); - PROTECT(t, pool); - - unsigned attributeCount = s.read2(); - for (unsigned j = 0; j < attributeCount; ++j) { - GcByteArray* name - = cast(t, singletonObject(t, pool, s.read2() - 1)); - unsigned length = s.read4(); - - if (vm::strcmp(reinterpret_cast("SourceFile"), - name->body().begin()) == 0) { - class_->setSourceFile( - t, cast(t, singletonObject(t, pool, s.read2() - 1))); - } else if (vm::strcmp(reinterpret_cast("Signature"), - name->body().begin()) == 0) { - GcClassAddendum* addendum = getClassAddendum(t, class_, pool); - addendum->setSignature(t, singletonObject(t, pool, s.read2() - 1)); - } else if (vm::strcmp(reinterpret_cast("InnerClasses"), - name->body().begin()) == 0) { - unsigned innerClassCount = s.read2(); - GcArray* table = makeArray(t, innerClassCount); - PROTECT(t, table); - - for (unsigned i = 0; i < innerClassCount; ++i) { - int16_t inner = s.read2(); - int16_t outer = s.read2(); - int16_t name = s.read2(); - int16_t flags = s.read2(); - - GcInnerClassReference* reference = makeInnerClassReference( - t, - inner - ? cast(t, singletonObject(t, pool, inner - 1)) - ->name() - : 0, - outer - ? cast(t, singletonObject(t, pool, outer - 1)) - ->name() - : 0, - name ? cast(t, singletonObject(t, pool, name - 1)) : 0, - flags); - - table->setBodyElement(t, i, reference); - } - - GcClassAddendum* addendum = getClassAddendum(t, class_, pool); - addendum->setInnerClassTable(t, table); - } else if (vm::strcmp( - reinterpret_cast("RuntimeVisibleAnnotations"), - name->body().begin()) == 0) { - GcByteArray* body = makeByteArray(t, length); - PROTECT(t, body); - s.read(reinterpret_cast(body->body().begin()), length); - - GcClassAddendum* addendum = getClassAddendum(t, class_, pool); - addendum->setAnnotationTable(t, body); - } else if (vm::strcmp(reinterpret_cast("BootstrapMethods"), - name->body().begin()) == 0) { - unsigned count = s.read2(); - GcArray* array = makeArray(t, count); - PROTECT(t, array); - - for (unsigned i = 0; i < count; ++i) { - unsigned reference = s.read2() - 1; - unsigned argumentCount = s.read2(); - GcCharArray* element = makeCharArray(t, 1 + argumentCount); - element->body()[0] = reference; - for (unsigned ai = 0; ai < argumentCount; ++ai) { - element->body()[1 + ai] = s.read2() - 1; - } - array->setBodyElement(t, i, element); - } - - GcClassAddendum* addendum = getClassAddendum(t, class_, pool); - addendum->setBootstrapMethodTable(t, array); - } else if (vm::strcmp(reinterpret_cast("EnclosingMethod"), - name->body().begin()) == 0) { - int16_t enclosingClass = s.read2(); - int16_t enclosingMethod = s.read2(); - - GcClassAddendum* addendum = getClassAddendum(t, class_, pool); - - addendum->setEnclosingClass( - t, - cast(t, singletonObject(t, pool, enclosingClass - 1)) - ->name()); - - addendum->setEnclosingMethod( - t, - enclosingMethod - ? cast(t, singletonObject(t, pool, enclosingMethod - 1)) - : 0); - } else { - s.skip(length); - } - } -} - -void updateClassTables(Thread* t, GcClass* newClass, GcClass* oldClass) -{ - GcArray* fieldTable = cast(t, newClass->fieldTable()); - if (fieldTable) { - for (unsigned i = 0; i < fieldTable->length(); ++i) { - cast(t, fieldTable->body()[i])->setClass(t, newClass); - } - } - - GcSingleton* staticTable = newClass->staticTable(); - if (staticTable) { - staticTable->setBodyElement(t, 0, reinterpret_cast(newClass)); - } - - if (newClass->flags() & ACC_INTERFACE) { - GcArray* virtualTable = cast(t, newClass->virtualTable()); - if (virtualTable) { - for (unsigned i = 0; i < virtualTable->length(); ++i) { - GcMethod* m = cast(t, virtualTable->body()[i]); - if (m->class_() == oldClass) { - m->setClass(t, newClass); - } - } - } - } - - GcArray* methodTable = cast(t, newClass->methodTable()); - if (methodTable) { - for (unsigned i = 0; i < methodTable->length(); ++i) { - cast(t, methodTable->body()[i])->setClass(t, newClass); - } - } -} - -void updateBootstrapClass(Thread* t, GcClass* bootstrapClass, GcClass* class_) -{ - expect(t, bootstrapClass != class_); - - // verify that the classes have the same layout - expect(t, bootstrapClass->super() == class_->super()); - - expect(t, bootstrapClass->fixedSize() >= class_->fixedSize()); - - expect(t, (class_->vmFlags() & HasFinalizerFlag) == 0); - - PROTECT(t, bootstrapClass); - PROTECT(t, class_); - - ENTER(t, Thread::ExclusiveState); - - bootstrapClass->vmFlags() &= ~BootstrapFlag; - bootstrapClass->vmFlags() |= class_->vmFlags(); - bootstrapClass->flags() |= class_->flags(); - - bootstrapClass->setArrayElementClass(t, class_->arrayElementClass()); - bootstrapClass->setSuper(t, class_->super()); - bootstrapClass->setInterfaceTable(t, class_->interfaceTable()); - bootstrapClass->setVirtualTable(t, class_->virtualTable()); - bootstrapClass->setFieldTable(t, class_->fieldTable()); - bootstrapClass->setMethodTable(t, class_->methodTable()); - bootstrapClass->setStaticTable(t, class_->staticTable()); - bootstrapClass->setAddendum(t, class_->addendum()); - - updateClassTables(t, bootstrapClass, class_); -} - -GcClass* makeArrayClass(Thread* t, - GcClassLoader* loader, - unsigned dimensions, - GcByteArray* spec, - GcClass* elementClass) -{ - if (type(t, GcJobject::Type)->vmFlags() & BootstrapFlag) { - PROTECT(t, loader); - PROTECT(t, spec); - PROTECT(t, elementClass); - - // Load java.lang.Object if present so we can use its vtable, but - // don't throw an exception if we can't find it. This way, we - // avoid infinite recursion due to trying to create an array to - // make a stack trace for a ClassNotFoundException. - resolveSystemClass( - t, roots(t)->bootLoader(), type(t, GcJobject::Type)->name(), false); - } - - GcArray* vtable = cast(t, type(t, GcJobject::Type)->virtualTable()); - - // From JDK docs: for array classes the public, private, protected modifiers are the same as - // the underlying type, and the final modifier is always set. Testing on OpenJDK shows that - // ACC_ABSTRACT is also set on array classes. - int flags = elementClass->flags() & (ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED); - flags |= ACC_FINAL; - flags |= ACC_ABSTRACT; - - GcClass* c = t->m->processor->makeClass(t, - flags, - 0, - 2 * BytesPerWord, - BytesPerWord, - dimensions, - elementClass, - type(t, GcArray::Type)->objectMask(), - spec, - 0, - type(t, GcJobject::Type), - roots(t)->arrayInterfaceTable(), - vtable, - 0, - 0, - 0, - 0, - loader, - vtable->length()); - - PROTECT(t, c); - - t->m->processor->initVtable(t, c); - - return c; -} - -void saveLoadedClass(Thread* t, GcClassLoader* loader, GcClass* c) -{ - PROTECT(t, loader); - PROTECT(t, c); - - ACQUIRE(t, t->m->classLock); - - if (loader->map() == 0) { - GcHashMap* map = makeHashMap(t, 0, 0); - loader->setMap(t, map); - } - - hashMapInsert( - t, cast(t, loader->map()), c->name(), c, byteArrayHash); -} - -GcClass* makeArrayClass(Thread* t, - GcClassLoader* loader, - GcByteArray* spec, - bool throw_, - Gc::Type throwType) -{ - PROTECT(t, loader); - PROTECT(t, spec); - - const char* s = reinterpret_cast(spec->body().begin()); - const char* start = s; - unsigned dimensions = 0; - for (; *s == '['; ++s) - ++dimensions; - - GcByteArray* elementSpec; - switch (*s) { - case 'L': { - ++s; - const char* elementSpecStart = s; - while (*s and *s != ';') - ++s; - if (dimensions > 1) { - elementSpecStart -= dimensions; - ++s; - } - - elementSpec = makeByteArray(t, s - elementSpecStart + 1); - memcpy(elementSpec->body().begin(), - &spec->body()[elementSpecStart - start], - s - elementSpecStart); - elementSpec->body()[s - elementSpecStart] = 0; - } break; - - default: - if (dimensions > 1) { - char c = *s; - elementSpec = makeByteArray(t, dimensions + 1); - unsigned i; - for (i = 0; i < dimensions - 1; ++i) { - elementSpec->body()[i] = '['; - } - elementSpec->body()[i++] = c; - elementSpec->body()[i] = 0; - --dimensions; - } else { - abort(t); - } - } - - GcClass* elementClass - = cast(t, - hashMapFind(t, - roots(t)->bootstrapClassMap(), - elementSpec, - byteArrayHash, - byteArrayEqual)); - - if (elementClass == 0) { - elementClass = resolveClass(t, loader, elementSpec, throw_, throwType); - if (elementClass == 0) - return 0; - } - - PROTECT(t, elementClass); - - ACQUIRE(t, t->m->classLock); - - GcClass* class_ = findLoadedClass(t, elementClass->loader(), spec); - if (class_) { - return class_; - } - - class_ = makeArrayClass( - t, elementClass->loader(), dimensions, spec, elementClass); - - PROTECT(t, class_); - - saveLoadedClass(t, elementClass->loader(), class_); - - return class_; -} - -GcClass* resolveArrayClass(Thread* t, - GcClassLoader* loader, - GcByteArray* spec, - bool throw_, - Gc::Type throwType) -{ - GcClass* c = cast(t, - hashMapFind(t, - roots(t)->bootstrapClassMap(), - spec, - byteArrayHash, - byteArrayEqual)); - - if (c) { - c->setVirtualTable(t, type(t, GcJobject::Type)->virtualTable()); - - return c; - } else { - PROTECT(t, loader); - PROTECT(t, spec); - - c = findLoadedClass(t, roots(t)->bootLoader(), spec); - - if (c) { - return c; - } else { - return makeArrayClass(t, loader, spec, throw_, throwType); - } - } -} - -void removeMonitor(Thread* t, object o) -{ - unsigned hash; - if (DebugMonitors) { - hash = objectHash(t, o); - } - - object m - = hashMapRemove(t, roots(t)->monitorMap(), o, objectHash, objectEqual); - - if (DebugMonitors) { - fprintf(stderr, "dispose monitor %p for object %x\n", m, hash); - } -} - -void removeString(Thread* t, object o) -{ - hashMapRemove(t, roots(t)->stringMap(), o, stringHash, objectEqual); -} - -void bootClass(Thread* t, - Gc::Type type, - int superType, - uint32_t* objectMask, - unsigned fixedSize, - unsigned arrayElementSize, - unsigned vtableLength) -{ - GcClass* super - = (superType >= 0 ? vm::type(t, static_cast(superType)) : 0); - - unsigned maskSize - = ceilingDivide(fixedSize + arrayElementSize, 32 * BytesPerWord); - - GcIntArray* mask; - if (objectMask) { - if (super and super->objectMask() - and super->objectMask()->length() == maskSize - and memcmp(super->objectMask()->body().begin(), - objectMask, - sizeof(uint32_t) * maskSize) == 0) { - mask = vm::type(t, static_cast(superType))->objectMask(); - } else { - mask = makeIntArray(t, maskSize); - memcpy(mask->body().begin(), objectMask, sizeof(uint32_t) * maskSize); - } - } else { - mask = 0; - } - - int flags = 0; - switch(type) { - case Gc::JbyteType: - case Gc::JintType: - case Gc::JshortType: - case Gc::JlongType: - case Gc::JbooleanType: - case Gc::JcharType: - case Gc::JfloatType: - case Gc::JdoubleType: - - case Gc::ByteArrayType: - case Gc::IntArrayType: - case Gc::ShortArrayType: - case Gc::LongArrayType: - case Gc::BooleanArrayType: - case Gc::CharArrayType: - case Gc::FloatArrayType: - case Gc::DoubleArrayType: - // Primitive and array types are final, abstract and public. - flags = ACC_FINAL | ACC_ABSTRACT | ACC_PUBLIC; - default: - break; - } - - super = (superType >= 0 ? vm::type(t, static_cast(superType)) : 0); - - GcClass* class_ = t->m->processor->makeClass(t, - flags, - BootstrapFlag, - fixedSize, - arrayElementSize, - arrayElementSize ? 1 : 0, - 0, - mask, - 0, - 0, - super, - 0, - 0, - 0, - 0, - 0, - 0, - roots(t)->bootLoader(), - vtableLength); - - setType(t, type, class_); -} - -void bootJavaClass(Thread* t, - Gc::Type type, - int superType, - const char* name, - int vtableLength, - object bootMethod) -{ - PROTECT(t, bootMethod); - - GcByteArray* n = makeByteArray(t, name); - PROTECT(t, n); - - GcClass* class_ = vm::type(t, type); - PROTECT(t, class_); - - class_->setName(t, n); - - GcArray* vtable; - if (vtableLength >= 0) { - vtable = makeArray(t, vtableLength); - for (int i = 0; i < vtableLength; ++i) { - vtable->setBodyElement(t, i, bootMethod); - } - } else { - vtable = cast( - t, vm::type(t, static_cast(superType))->virtualTable()); - } - - class_->setVirtualTable(t, vtable); - - t->m->processor->initVtable(t, class_); - - hashMapInsert(t, roots(t)->bootstrapClassMap(), n, class_, byteArrayHash); -} - -void nameClass(Thread* t, Gc::Type type, const char* name) -{ - GcByteArray* n = makeByteArray(t, name); - cast(t, t->m->types->body()[type])->setName(t, n); -} - -void makeArrayInterfaceTable(Thread* t) -{ - GcArray* interfaceTable = makeArray(t, 4); - - interfaceTable->setBodyElement(t, 0, type(t, GcSerializable::Type)); - - interfaceTable->setBodyElement(t, 2, type(t, GcCloneable::Type)); - - roots(t)->setArrayInterfaceTable(t, interfaceTable); -} - -void boot(Thread* t) -{ - Machine* m = t->m; - - m->unsafe = true; - - m->roots = reinterpret_cast(allocate(t, GcRoots::FixedSize, true)); - - object classLoader = allocate(t, GcSystemClassLoader::FixedSize, true); - // sequence point, for gc (don't recombine statements) - roots(t)->setBootLoader(t, reinterpret_cast(classLoader)); - - classLoader = allocate(t, GcSystemClassLoader::FixedSize, true); - // sequence point, for gc (don't recombine statements) - roots(t)->setAppLoader(t, reinterpret_cast(classLoader)); - - m->types = reinterpret_cast( - allocate(t, pad((TypeCount + 2) * BytesPerWord), true)); - m->types->length() = TypeCount; - -#include "type-initializations.cpp" - - GcClass* arrayClass = type(t, GcArray::Type); - setField(t, m->types, 0, arrayClass); - - GcClass* rootsClass = type(t, GcRoots::Type); - setField(t, m->roots, 0, rootsClass); - - GcClass* loaderClass = type(t, GcSystemClassLoader::Type); - setField(t, roots(t)->bootLoader(), 0, loaderClass); - setField(t, roots(t)->appLoader(), 0, loaderClass); - - GcClass* objectClass = type(t, GcJobject::Type); - - GcClass* classClass = type(t, GcClass::Type); - setField(t, classClass, 0, classClass); - classClass->setSuper(t, objectClass); - - GcClass* intArrayClass = type(t, GcIntArray::Type); - setField(t, intArrayClass, 0, classClass); - intArrayClass->setSuper(t, objectClass); - - m->unsafe = false; - - type(t, GcSingleton::Type)->vmFlags() |= SingletonFlag; - - type(t, GcContinuation::Type)->vmFlags() |= ContinuationFlag; - - type(t, GcJreference::Type)->vmFlags() |= ReferenceFlag; - type(t, GcWeakReference::Type)->vmFlags() |= ReferenceFlag - | WeakReferenceFlag; - type(t, GcSoftReference::Type)->vmFlags() |= ReferenceFlag - | WeakReferenceFlag; - type(t, GcPhantomReference::Type)->vmFlags() |= ReferenceFlag - | WeakReferenceFlag; - - type(t, GcJboolean::Type)->vmFlags() |= PrimitiveFlag; - type(t, GcJbyte::Type)->vmFlags() |= PrimitiveFlag; - type(t, GcJchar::Type)->vmFlags() |= PrimitiveFlag; - type(t, GcJshort::Type)->vmFlags() |= PrimitiveFlag; - type(t, GcJint::Type)->vmFlags() |= PrimitiveFlag; - type(t, GcJlong::Type)->vmFlags() |= PrimitiveFlag; - type(t, GcJfloat::Type)->vmFlags() |= PrimitiveFlag; - type(t, GcJdouble::Type)->vmFlags() |= PrimitiveFlag; - type(t, GcJvoid::Type)->vmFlags() |= PrimitiveFlag; - - type(t, GcBooleanArray::Type) - ->setArrayElementClass(t, type(t, GcJboolean::Type)); - type(t, GcByteArray::Type)->setArrayElementClass(t, type(t, GcJbyte::Type)); - type(t, GcCharArray::Type)->setArrayElementClass(t, type(t, GcJchar::Type)); - type(t, GcShortArray::Type)->setArrayElementClass(t, type(t, GcJshort::Type)); - type(t, GcIntArray::Type)->setArrayElementClass(t, type(t, GcJint::Type)); - type(t, GcLongArray::Type)->setArrayElementClass(t, type(t, GcJlong::Type)); - type(t, GcFloatArray::Type)->setArrayElementClass(t, type(t, GcJfloat::Type)); - type(t, GcDoubleArray::Type) - ->setArrayElementClass(t, type(t, GcJdouble::Type)); - - { - GcHashMap* map = makeHashMap(t, 0, 0); - roots(t)->bootLoader()->setMap(t, map); - } - - roots(t)->bootLoader()->as(t)->finder() = m->bootFinder; - - { - GcHashMap* map = makeHashMap(t, 0, 0); - roots(t)->appLoader()->setMap(t, map); - } - - roots(t)->appLoader()->as(t)->finder() = m->appFinder; - - roots(t)->appLoader()->setParent(t, roots(t)->bootLoader()); - - { - GcHashMap* map = makeHashMap(t, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(t)->setBootstrapClassMap(t, map); - } - - { - GcWeakHashMap* map = makeWeakHashMap(t, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(t)->setStringMap(t, map->as(t)); - } - - makeArrayInterfaceTable(t); - - type(t, GcBooleanArray::Type) - ->setInterfaceTable(t, roots(t)->arrayInterfaceTable()); - type(t, GcByteArray::Type) - ->setInterfaceTable(t, roots(t)->arrayInterfaceTable()); - type(t, GcCharArray::Type) - ->setInterfaceTable(t, roots(t)->arrayInterfaceTable()); - type(t, GcShortArray::Type) - ->setInterfaceTable(t, roots(t)->arrayInterfaceTable()); - type(t, GcIntArray::Type) - ->setInterfaceTable(t, roots(t)->arrayInterfaceTable()); - type(t, GcLongArray::Type) - ->setInterfaceTable(t, roots(t)->arrayInterfaceTable()); - type(t, GcFloatArray::Type) - ->setInterfaceTable(t, roots(t)->arrayInterfaceTable()); - type(t, GcDoubleArray::Type) - ->setInterfaceTable(t, roots(t)->arrayInterfaceTable()); - - m->processor->boot(t, 0, 0); - - { - GcCode* bootCode = makeCode(t, 0, 0, 0, 0, 0, 0, 0, 0, 1); - bootCode->body()[0] = impdep1; - object bootMethod - = makeMethod(t, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, bootCode); - PROTECT(t, bootMethod); - -# include "type-java-initializations.cpp" -# include "type-name-initializations.cpp" - - } - -} - -class HeapClient : public Heap::Client { - public: - HeapClient(Machine* m) : m(m) - { - } - - virtual void visitRoots(Heap::Visitor* v) - { - ::visitRoots(m, v); - - postVisit(m->rootThread, v); - } - - virtual void collect(void* context, Heap::CollectionType type) - { - collect(static_cast(context), type); - } - - virtual bool isFixed(void* p) - { - return objectFixed(m->rootThread, static_cast(p)); - } - - virtual unsigned sizeInWords(void* p) - { - Thread* t = m->rootThread; - - object o = static_cast(m->heap->follow(maskAlignedPointer(p))); - - unsigned n = baseSize(t, o, m->heap->follow(objectClass(t, o))); - - if (objectExtended(t, o)) { - ++n; - } - - return n; - } - - virtual unsigned copiedSizeInWords(void* p) - { - Thread* t = m->rootThread; - - object o = static_cast(m->heap->follow(maskAlignedPointer(p))); - assertT(t, not objectFixed(t, o)); - - unsigned n = baseSize(t, o, m->heap->follow(objectClass(t, o))); - - if (objectExtended(t, o) or hashTaken(t, o)) { - ++n; - } - - return n; - } - - virtual void copy(void* srcp, void* dstp) - { - Thread* t = m->rootThread; - - object src = static_cast(m->heap->follow(maskAlignedPointer(srcp))); - assertT(t, not objectFixed(t, src)); - - GcClass* class_ = m->heap->follow(objectClass(t, src)); - - unsigned base = baseSize(t, src, class_); - unsigned n = extendedSize(t, src, base); - - object dst = static_cast(dstp); - - memcpy(dst, src, n * BytesPerWord); - - if (hashTaken(t, src)) { - alias(dst, 0) &= PointerMask; - alias(dst, 0) |= ExtendedMark; - extendedWord(t, dst, base) = takeHash(t, src); - } - } - - virtual void walk(void* p, Heap::Walker* w) - { - object o = static_cast(m->heap->follow(maskAlignedPointer(p))); - ::walk(m->rootThread, w, o, 0); - } - - void dispose() - { - m->heap->free(this, sizeof(*this)); - } - - private: - Machine* m; -}; - -void doCollect(Thread* t, Heap::CollectionType type, int pendingAllocation) -{ - expect(t, not t->m->collecting); - - t->m->collecting = true; - THREAD_RESOURCE0(t, t->m->collecting = false); - -#ifdef VM_STRESS - bool stress = (t->getFlags() & Thread::StressFlag) != 0; - if (not stress) - t->setFlag(Thread::StressFlag); -#endif - - Machine* m = t->m; - - m->unsafe = true; - m->heap->collect( - type, - footprint(m->rootThread), - pendingAllocation - (t->m->heapPoolIndex * ThreadHeapSizeInWords)); - m->unsafe = false; - - postCollect(m->rootThread); - - killZombies(t, m->rootThread); - - for (unsigned i = 0; i < m->heapPoolIndex; ++i) { - m->heap->free(m->heapPool[i], ThreadHeapSizeInBytes); - } - m->heapPoolIndex = 0; - - if (m->heap->limitExceeded()) { - // if we're out of memory, disallow further allocations of fixed - // objects: - m->fixedFootprint = FixedFootprintThresholdInBytes; - } else { - m->fixedFootprint = 0; - } - -#ifdef VM_STRESS - if (not stress) - t->clearFlag(Thread::StressFlag); -#endif - - GcFinalizer* finalizeQueue = t->m->finalizeQueue; - t->m->finalizeQueue = 0; - for (; finalizeQueue; - finalizeQueue = cast(t, finalizeQueue->next())) { - void (*function)(Thread*, object); - memcpy(&function, &finalizeQueue->finalize(), BytesPerWord); - function(t, finalizeQueue->target()); - } - -#ifndef SGX - if ((roots(t)->objectsToFinalize() or roots(t)->objectsToClean()) - and m->finalizeThread == 0 and t->state != Thread::ExitState) { - m->finalizeThread = m->processor->makeThread( - m, roots(t)->finalizerThread(), m->rootThread); - - addThread(t, m->finalizeThread); - - if (not startThread(t, m->finalizeThread)) { - removeThread(t, m->finalizeThread); - m->finalizeThread = 0; - } - } -#endif -} - -uint64_t invokeLoadClass(Thread* t, uintptr_t* arguments) -{ - GcMethod* method = cast(t, reinterpret_cast(arguments[0])); - object loader = reinterpret_cast(arguments[1]); - object specString = reinterpret_cast(arguments[2]); - - return reinterpret_cast( - t->m->processor->invoke(t, method, loader, specString)); -} - -bool isInitializing(Thread* t, GcClass* c) -{ - for (Thread::ClassInitStack* s = t->classInitStack; s; s = s->next) { - if (s->class_ == c) { - return true; - } - } - return false; -} - -object findInTable(Thread* t, - GcArray* table, - GcByteArray* name, - GcByteArray* spec, - GcByteArray* (*getName)(Thread*, object), - GcByteArray* (*getSpec)(Thread*, object)) -{ - if (table) { - for (unsigned i = 0; i < table->length(); ++i) { - object o = table->body()[i]; - if (vm::strcmp(getName(t, o)->body().begin(), name->body().begin()) == 0 - and vm::strcmp(getSpec(t, o)->body().begin(), spec->body().begin()) - == 0) { - return o; - } - } - - if (false) { - fprintf( - stderr, "%s %s not in\n", name->body().begin(), spec->body().begin()); - - for (unsigned i = 0; i < table->length(); ++i) { - object o = table->body()[i]; - fprintf(stderr, - "\t%s %s\n", - getName(t, o)->body().begin(), - getSpec(t, o)->body().begin()); - } - } - } - - return 0; -} - -void updatePackageMap(Thread* t, GcClass* class_) -{ - PROTECT(t, class_); - - if (roots(t)->packageMap() == 0) { - GcHashMap* map = makeHashMap(t, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(t)->setPackageMap(t, map); - } - - GcByteArray* className = class_->name(); - if ('[' != className->body()[0]) { - THREAD_RUNTIME_ARRAY(t, char, packageName, className->length()); - - char* s = reinterpret_cast(className->body().begin()); - char* p = strrchr(s, '/'); - - if (p) { - int length = (p - s) + 1; - memcpy( - RUNTIME_ARRAY_BODY(packageName), className->body().begin(), length); - RUNTIME_ARRAY_BODY(packageName)[length] = 0; - - GcByteArray* key - = vm::makeByteArray(t, "%s", RUNTIME_ARRAY_BODY(packageName)); - PROTECT(t, key); - - hashMapRemove( - t, roots(t)->packageMap(), key, byteArrayHash, byteArrayEqual); - - GcByteArray* source = class_->source(); - if (source) { - // note that we strip the "file:" prefix, since OpenJDK's - // Package.defineSystemPackage expects an unadorned filename: - const unsigned PrefixLength = 5; - unsigned sourceNameLength = source->length() - PrefixLength; - THREAD_RUNTIME_ARRAY(t, char, sourceName, sourceNameLength); - memcpy(RUNTIME_ARRAY_BODY(sourceName), - &source->body()[PrefixLength], - sourceNameLength); - - source = vm::makeByteArray(t, "%s", RUNTIME_ARRAY_BODY(sourceName)); - } else { - source = vm::makeByteArray(t, "avian-dummy-package-source"); - } - - hashMapInsert(t, roots(t)->packageMap(), key, source, byteArrayHash); - } - } -} - -} // namespace - -namespace vm { - -Machine::Machine(System* system, - Heap* heap, - Finder* bootFinder, - Finder* appFinder, - Processor* processor, - Classpath* classpath, - const char** properties, - unsigned propertyCount, - const char** arguments, - unsigned argumentCount, - unsigned stackSizeInBytes) - : vtable(&javaVMVTable), - system(system), - heapClient(new (heap->allocate(sizeof(HeapClient))) HeapClient(this)), - heap(heap), - bootFinder(bootFinder), - appFinder(appFinder), - processor(processor), - classpath(classpath), - rootThread(0), - exclusive(0), - finalizeThread(0), - jniReferences(0), - propertyCount(propertyCount), - arguments(arguments), - argumentCount(argumentCount), - threadCount(0), - activeCount(0), - liveCount(0), - daemonCount(0), - fixedFootprint(0), - stackSizeInBytes(stackSizeInBytes), - localThread(0), - stateLock(0), - heapLock(0), - classLock(0), - referenceLock(0), - shutdownLock(0), - libraries(0), - errorLog(0), - bootimage(0), - types(0), - roots(0), - finalizers(0), - tenuredFinalizers(0), - finalizeQueue(0), - weakReferences(0), - tenuredWeakReferences(0), - unsafe(false), - collecting(false), - triedBuiltinOnLoad(false), - dumpedHeapOnOOM(false), - alive(true), - heapPoolIndex(0) -{ - heap->setClient(heapClient); - - populateJNITables(&javaVMVTable, &jniEnvVTable); - - // Copying the properties memory (to avoid memory crashes) - this->properties = (char**)heap->allocate(sizeof(char*) * propertyCount); - for (unsigned int i = 0; i < propertyCount; i++) { - size_t length = strlen(properties[i]) + 1; // +1 for null-terminating char - this->properties[i] = (char*)heap->allocate(sizeof(char) * length); - memcpy(this->properties[i], properties[i], length); - } - - const char* bootstrapProperty = findProperty(this, BOOTSTRAP_PROPERTY); - const char* bootstrapPropertyDup - = bootstrapProperty ? strdup(bootstrapProperty) : 0; - const char* bootstrapPropertyEnd - = bootstrapPropertyDup - + (bootstrapPropertyDup ? strlen(bootstrapPropertyDup) : 0); - char* codeLibraryName = (char*)bootstrapPropertyDup; - char* codeLibraryNameEnd = 0; - if (codeLibraryName && (codeLibraryNameEnd - = strchr(codeLibraryName, system->pathSeparator()))) - *codeLibraryNameEnd = 0; - - if (not system->success(system->make(&localThread)) - or not system->success(system->make(&stateLock)) - or not system->success(system->make(&heapLock)) - or not system->success(system->make(&classLock)) - or not system->success(system->make(&referenceLock)) - or not system->success(system->make(&shutdownLock)) - or not system->success(system->load(&libraries, bootstrapPropertyDup))) { - system->abort(); - } - - System::Library* additionalLibrary = 0; - while (codeLibraryNameEnd && codeLibraryNameEnd + 1 < bootstrapPropertyEnd) { - codeLibraryName = codeLibraryNameEnd + 1; - codeLibraryNameEnd = strchr(codeLibraryName, system->pathSeparator()); - if (codeLibraryNameEnd) - *codeLibraryNameEnd = 0; - - if (!system->success(system->load(&additionalLibrary, codeLibraryName))) - system->abort(); - libraries->setNext(additionalLibrary); - } - - if (bootstrapPropertyDup) - free((void*)bootstrapPropertyDup); -} - -void Machine::dispose() -{ - localThread->dispose(); - stateLock->dispose(); - heapLock->dispose(); - classLock->dispose(); - referenceLock->dispose(); - shutdownLock->dispose(); - - if (libraries) { - libraries->disposeAll(); - } - - for (Reference* r = jniReferences; r;) { - Reference* tmp = r; - r = r->next; - heap->free(tmp, sizeof(*tmp)); - } - - for (unsigned i = 0; i < heapPoolIndex; ++i) { - heap->free(heapPool[i], ThreadHeapSizeInBytes); - } - - if (bootimage) { - heap->free(bootimage, bootimageSize); - } - - heap->free(arguments, sizeof(const char*) * argumentCount); - - for (unsigned int i = 0; i < propertyCount; i++) { - heap->free(properties[i], sizeof(char) * (strlen(properties[i]) + 1)); - } - heap->free(properties, sizeof(const char*) * propertyCount); - - static_cast(heapClient)->dispose(); - - heap->free(this, sizeof(*this)); -} - -Thread::Thread(Machine* m, GcThread* javaThread, Thread* parent) - : vtable(&(m->jniEnvVTable)), - m(m), - parent(parent), - peer(0), - child(0), - waitNext(0), - state(NoState), - criticalLevel(0), - systemThread(0), - lock(0), - javaThread(javaThread), - exception(0), - heapIndex(0), - heapOffset(0), - protector(0), - classInitStack(0), - libraryLoadStack(0), - runnable(this), - defaultHeap( - static_cast(m->heap->allocate(ThreadHeapSizeInBytes))), - heap(defaultHeap), - backupHeapIndex(0), - flags(ActiveFlag) -{ -} - -void Thread::init() -{ - memset(defaultHeap, 0, ThreadHeapSizeInBytes); - memset(backupHeap, 0, ThreadBackupHeapSizeInBytes); - - if (parent == 0) { - assertT(this, m->rootThread == 0); - assertT(this, javaThread == 0); - - m->rootThread = this; - m->unsafe = true; - - if (not m->system->success(m->system->attach(&runnable))) { - abort(this); - } - - BootImage* image = 0; - uint8_t* code = 0; - const char* imageFunctionName = findProperty(m, "avian.bootimage"); - if (imageFunctionName) { - bool lzma = strncmp("lzma:", imageFunctionName, 5) == 0; - const char* symbolName = lzma ? imageFunctionName + 5 : imageFunctionName; - - void* imagep = m->libraries->resolve(symbolName); - if (imagep) { - uint8_t* (*imageFunction)(size_t*); - memcpy(&imageFunction, &imagep, BytesPerWord); - - size_t size = 0; - uint8_t* imageBytes = imageFunction(&size); - if (lzma) { -#ifdef AVIAN_USE_LZMA - m->bootimage = image = reinterpret_cast(decodeLZMA( - m->system, m->heap, imageBytes, size, &(m->bootimageSize))); -#else - abort(this); -#endif - } else { - image = reinterpret_cast(imageBytes); - } - - const char* codeFunctionName = findProperty(m, "avian.codeimage"); - if (codeFunctionName) { - void* codep = m->libraries->resolve(codeFunctionName); - if (codep) { - uint8_t* (*codeFunction)(size_t*); - memcpy(&codeFunction, &codep, BytesPerWord); - - code = codeFunction(&size); - } - } - } - } - - m->unsafe = false; - - enter(this, ActiveState); - - if (image and code) { - m->processor->boot(this, image, code); - makeArrayInterfaceTable(this); - } else { - boot(this); - } - - GcWeakHashMap* map = makeWeakHashMap(this, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(this)->setByteArrayMap(this, map->as(this)); - - map = makeWeakHashMap(this, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(this)->setMonitorMap(this, map->as(this)); - - GcVector* v = makeVector(this, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(this)->setClassRuntimeDataTable(this, v); - - v = makeVector(this, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(this)->setMethodRuntimeDataTable(this, v); - - v = makeVector(this, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(this)->setJNIMethodTable(this, v); - - v = makeVector(this, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(this)->setJNIFieldTable(this, v); - - m->localThread->set(this); - } - - expect(this, m->system->success(m->system->make(&lock))); -} - -void Thread::exit() -{ - if (state != Thread::ExitState and state != Thread::ZombieState) { - enter(this, Thread::ExclusiveState); - - if (m->liveCount == 1) { - turnOffTheLights(this); - } else { - javaThread->peer() = 0; - - enter(this, Thread::ZombieState); - } - } -} - -void Thread::dispose() -{ - if (lock) { - lock->dispose(); - } - - if (systemThread) { - systemThread->dispose(); - } - - --m->threadCount; - - m->heap->free(defaultHeap, ThreadHeapSizeInBytes); - - m->processor->dispose(this); -} - -bool Thread::isBlacklisting() -{ - return (javaThread != NULL) && javaThread->blacklisting(); -} - -void shutDown(Thread* t) -{ - ACQUIRE(t, t->m->shutdownLock); - - GcPair* hooks = roots(t)->shutdownHooks(); - PROTECT(t, hooks); - - roots(t)->setShutdownHooks(t, 0); - - GcPair* h = hooks; - PROTECT(t, h); - for (; h; h = cast(t, h->second())) { - startThread(t, cast(t, h->first())); - } - - // wait for hooks to exit - h = hooks; - for (; h; h = cast(t, h->second())) { - while (true) { - Thread* ht - = reinterpret_cast(cast(t, h->first())->peer()); - - { - ACQUIRE(t, t->m->stateLock); - - if (ht == 0 or ht->state == Thread::ZombieState - or ht->state == Thread::JoinedState) { - break; - } else { - ENTER(t, Thread::IdleState); - t->m->stateLock->wait(t->systemThread, 0); - } - } - } - } - - // tell finalize thread to exit and wait for it to do so - { - ACQUIRE(t, t->m->stateLock); - Thread* finalizeThread = t->m->finalizeThread; - if (finalizeThread) { - t->m->finalizeThread = 0; - t->m->stateLock->notifyAll(t->systemThread); - - while (finalizeThread->state != Thread::ZombieState - and finalizeThread->state != Thread::JoinedState) { - ENTER(t, Thread::IdleState); - t->m->stateLock->wait(t->systemThread, 0); - } - } - } - - // interrupt daemon threads and tell them to die - - // todo: be more aggressive about killing daemon threads, e.g. at - // any GC point, not just at waits/sleeps - { - ACQUIRE(t, t->m->stateLock); - - t->m->alive = false; - - visitAll(t, t->m->rootThread, interruptDaemon); - } -} - -void enter(Thread* t, Thread::State s) -{ - stress(t); - - if (s == t->state) - return; - - if (t->state == Thread::ExitState) { - // once in exit state, we stay that way - return; - } - -#ifdef USE_ATOMIC_OPERATIONS -#define INCREMENT atomicIncrement -#define ACQUIRE_LOCK ACQUIRE_RAW(t, t->m->stateLock) -#define STORE_LOAD_MEMORY_BARRIER storeLoadMemoryBarrier() -#else -#define INCREMENT(pointer, value) *(pointer) += value; -#define ACQUIRE_LOCK -#define STORE_LOAD_MEMORY_BARRIER - - ACQUIRE_RAW(t, t->m->stateLock); -#endif // not USE_ATOMIC_OPERATIONS - - switch (s) { - case Thread::ExclusiveState: { - ACQUIRE_LOCK; - - while (t->m->exclusive) { - // another thread got here first. - ENTER(t, Thread::IdleState); - t->m->stateLock->wait(t->systemThread, 0); - } - - switch (t->state) { - case Thread::ActiveState: - break; - - case Thread::IdleState: { - INCREMENT(&(t->m->activeCount), 1); - } break; - - default: - abort(t); - } - - t->state = Thread::ExclusiveState; - t->m->exclusive = t; - - STORE_LOAD_MEMORY_BARRIER; - - while (t->m->activeCount > 1) { - t->m->stateLock->wait(t->systemThread, 0); - } - } break; - - case Thread::IdleState: - if (LIKELY(t->state == Thread::ActiveState)) { - // fast path - assertT(t, t->m->activeCount > 0); - INCREMENT(&(t->m->activeCount), -1); - - t->state = s; - - STORE_LOAD_MEMORY_BARRIER; - - if (t->m->exclusive) { - ACQUIRE_LOCK; - - t->m->stateLock->notifyAll(t->systemThread); - } - - break; - } else { - // fall through to slow path - } - /* fallthrough */ - - case Thread::ZombieState: { - ACQUIRE_LOCK; - - switch (t->state) { - case Thread::ExclusiveState: { - assertT(t, t->m->exclusive == t); - t->m->exclusive = 0; - } break; - - case Thread::ActiveState: - break; - - default: - abort(t); - } - - assertT(t, t->m->activeCount > 0); - INCREMENT(&(t->m->activeCount), -1); - - if (s == Thread::ZombieState) { - assertT(t, t->m->liveCount > 0); - --t->m->liveCount; - - if (t->getFlags() & Thread::DaemonFlag) { - --t->m->daemonCount; - } - } - - t->state = s; - - t->m->stateLock->notifyAll(t->systemThread); - } break; - - case Thread::ActiveState: - if (LIKELY(t->state == Thread::IdleState and t->m->exclusive == 0)) { - // fast path - INCREMENT(&(t->m->activeCount), 1); - - t->state = s; - - STORE_LOAD_MEMORY_BARRIER; - - if (t->m->exclusive) { - // another thread has entered the exclusive state, so we - // return to idle and use the slow path to become active - enter(t, Thread::IdleState); - } else { - break; - } - } - - { - ACQUIRE_LOCK; - - switch (t->state) { - case Thread::ExclusiveState: { - assertT(t, t->m->exclusive == t); - - t->state = s; - t->m->exclusive = 0; - - t->m->stateLock->notifyAll(t->systemThread); - } break; - - case Thread::NoState: - case Thread::IdleState: { - while (t->m->exclusive) { - t->m->stateLock->wait(t->systemThread, 0); - } - - INCREMENT(&(t->m->activeCount), 1); - if (t->state == Thread::NoState) { - ++t->m->liveCount; - ++t->m->threadCount; - } - t->state = s; - } break; - - default: - abort(t); - } - } - break; - - case Thread::ExitState: { - ACQUIRE_LOCK; - - switch (t->state) { - case Thread::ExclusiveState: { - assertT(t, t->m->exclusive == t); - // exit state should also be exclusive, so don't set exclusive = 0 - - t->m->stateLock->notifyAll(t->systemThread); - } break; - - case Thread::ActiveState: - break; - - default: - abort(t); - } - - assertT(t, t->m->activeCount > 0); - INCREMENT(&(t->m->activeCount), -1); - - t->state = s; - - while (t->m->liveCount - t->m->daemonCount > 1) { - t->m->stateLock->wait(t->systemThread, 0); - } - } break; - - default: - abort(t); - } -} - -object allocate2(Thread* t, unsigned sizeInBytes, bool objectMask) -{ - return allocate3( - t, - t->m->heap, - ceilingDivide(sizeInBytes, BytesPerWord) > ThreadHeapSizeInWords - ? Machine::FixedAllocation - : Machine::MovableAllocation, - sizeInBytes, - objectMask); -} - -object allocate3(Thread* t, - Alloc* allocator, - Machine::AllocationType type, - unsigned sizeInBytes, - bool objectMask) -{ - expect(t, t->criticalLevel == 0); - - if (UNLIKELY(t->getFlags() & Thread::UseBackupHeapFlag)) { - expect(t, - t->backupHeapIndex + ceilingDivide(sizeInBytes, BytesPerWord) - <= ThreadBackupHeapSizeInWords); - - object o = reinterpret_cast(t->backupHeap + t->backupHeapIndex); - t->backupHeapIndex += ceilingDivide(sizeInBytes, BytesPerWord); - fieldAtOffset(o, 0) = 0; - return o; - } else if (UNLIKELY(t->getFlags() & Thread::TracingFlag)) { - expect(t, - t->heapIndex + ceilingDivide(sizeInBytes, BytesPerWord) - <= ThreadHeapSizeInWords); - return allocateSmall(t, sizeInBytes); - } - - ACQUIRE_RAW(t, t->m->stateLock); - - while (t->m->exclusive and t->m->exclusive != t) { - // another thread wants to enter the exclusive state, either for a - // collection or some other reason. We give it a chance here. - ENTER(t, Thread::IdleState); - - while (t->m->exclusive) { - t->m->stateLock->wait(t->systemThread, 0); - } - } - - do { - switch (type) { - case Machine::MovableAllocation: - if (t->heapIndex + ceilingDivide(sizeInBytes, BytesPerWord) - > ThreadHeapSizeInWords) { - t->heap = 0; - if ((not t->m->heap->limitExceeded()) - and t->m->heapPoolIndex < ThreadHeapPoolSize) { - t->heap = static_cast( - t->m->heap->tryAllocate(ThreadHeapSizeInBytes)); - - if (t->heap) { - memset(t->heap, 0, ThreadHeapSizeInBytes); - - t->m->heapPool[t->m->heapPoolIndex++] = t->heap; - t->heapOffset += t->heapIndex; - t->heapIndex = 0; - } - } - } - break; - - case Machine::FixedAllocation: - if (t->m->fixedFootprint + sizeInBytes > FixedFootprintThresholdInBytes) { - t->heap = 0; - } - break; - - case Machine::ImmortalAllocation: - break; - } - - int pendingAllocation = t->m->heap->fixedFootprint( - ceilingDivide(sizeInBytes, BytesPerWord), objectMask); - - if (t->heap == 0 or t->m->heap->limitExceeded(pendingAllocation)) { - // fprintf(stderr, "gc"); - // vmPrintTrace(t); - collect(t, Heap::MinorCollection, pendingAllocation); - } - - if (t->m->heap->limitExceeded(pendingAllocation)) { - throw_(t, roots(t)->outOfMemoryError()); - } - } while (type == Machine::MovableAllocation - and t->heapIndex + ceilingDivide(sizeInBytes, BytesPerWord) - > ThreadHeapSizeInWords); - - switch (type) { - case Machine::MovableAllocation: { - return allocateSmall(t, sizeInBytes); - } - - case Machine::FixedAllocation: { - object o = static_cast(t->m->heap->allocateFixed( - allocator, ceilingDivide(sizeInBytes, BytesPerWord), objectMask)); - - memset(o, 0, sizeInBytes); - - alias(o, 0) = FixedMark; - - t->m->fixedFootprint += t->m->heap->fixedFootprint( - ceilingDivide(sizeInBytes, BytesPerWord), objectMask); - - return o; - } - - case Machine::ImmortalAllocation: { - object o = static_cast(t->m->heap->allocateImmortalFixed( - allocator, ceilingDivide(sizeInBytes, BytesPerWord), objectMask)); - - memset(o, 0, sizeInBytes); - - alias(o, 0) = FixedMark; - - return o; - } - - default: - abort(t); - } -} - -void collect(Thread* t, Heap::CollectionType type, int pendingAllocation) -{ - ENTER(t, Thread::ExclusiveState); - - unsigned pending = pendingAllocation - - (t->m->heapPoolIndex * ThreadHeapSizeInWords); - - if (t->m->heap->limitExceeded(pending)) { - type = Heap::MajorCollection; - } - - doCollect(t, type, pendingAllocation); - - if (t->m->heap->limitExceeded(pending)) { - // try once more, giving the heap a chance to squeeze everything - // into the smallest possible space: - doCollect(t, Heap::MajorCollection, pendingAllocation); - } -} - -object makeNewGeneral(Thread* t, GcClass* class_) -{ - assertT(t, t->state == Thread::ActiveState); - - PROTECT(t, class_); - - object instance = makeNew(t, class_); - PROTECT(t, instance); - - if (class_->vmFlags() & WeakReferenceFlag) { - ACQUIRE(t, t->m->referenceLock); - - cast(t, instance)->vmNext() = t->m->weakReferences; - t->m->weakReferences = cast(t, instance); - } - - if (class_->vmFlags() & HasFinalizerFlag) { - addFinalizer(t, instance, 0); - } - - return instance; -} - -void popResources(Thread* t) -{ - while (t->resource != t->checkpoint->resource) { - Thread::Resource* r = t->resource; - t->resource = r->next; - r->release(); - } - - t->protector = t->checkpoint->protector; -} - -GcByteArray* makeByteArrayV(Thread* t, const char* format, va_list a, int size) -{ - THREAD_RUNTIME_ARRAY(t, char, buffer, size); - - int r = vm::vsnprintf(RUNTIME_ARRAY_BODY(buffer), size - 1, format, a); - if (r >= 0 and r < size - 1) { - GcByteArray* s = makeByteArray(t, strlen(RUNTIME_ARRAY_BODY(buffer)) + 1); - memcpy(s->body().begin(), RUNTIME_ARRAY_BODY(buffer), s->length()); - return s; - } else { - return 0; - } -} - -GcByteArray* makeByteArray(Thread* t, const char* format, ...) -{ - int size = 256; - while (true) { - va_list a; - va_start(a, format); - GcByteArray* s = makeByteArrayV(t, format, a, size); - va_end(a); - - if (s) { - return s; - } else { - size *= 2; - } - } -} - -GcString* makeString(Thread* t, const char* format, ...) -{ - int size = 256; - while (true) { - va_list a; - va_start(a, format); - GcByteArray* s = makeByteArrayV(t, format, a, size); - va_end(a); - - if (s) { - return t->m->classpath->makeString(t, s, 0, s->length() - 1); - } else { - size *= 2; - } - } -} - -int stringUTFLength(Thread* t, - GcString* string, - unsigned start, - unsigned length) -{ - unsigned result = 0; - - if (length) { - object data = string->data(); - if (objectClass(t, data) == type(t, GcByteArray::Type)) { - result = length; - } else { - GcCharArray* a = cast(t, data); - for (unsigned i = 0; i < length; ++i) { - uint16_t c = a->body()[string->offset(t) + start + i]; - if (c == 0) - result += 1; // null char (was 2 bytes in Java) - else if (c < 0x80) - result += 1; // ASCII char - else if (c < 0x800) - result += 2; // two-byte char - else - result += 3; // three-byte char - } - } - } - - return result; -} - -void stringChars(Thread* t, - GcString* string, - unsigned start, - unsigned length, - char* chars) -{ - if (length) { - object data = string->data(); - if (objectClass(t, data) == type(t, GcByteArray::Type)) { - GcByteArray* b = cast(t, data); - memcpy(chars, &b->body()[string->offset(t) + start], length); - } else { - GcCharArray* c = cast(t, data); - for (unsigned i = 0; i < length; ++i) { - chars[i] = c->body()[string->offset(t) + start + i]; - } - } - } - chars[length] = 0; -} - -void stringChars(Thread* t, - GcString* string, - unsigned start, - unsigned length, - uint16_t* chars) -{ - if (length) { - object data = string->data(); - if (objectClass(t, data) == type(t, GcByteArray::Type)) { - GcByteArray* b = cast(t, data); - for (unsigned i = 0; i < length; ++i) { - chars[i] = b->body()[string->offset(t) + start + i]; - } - } else { - GcCharArray* c = cast(t, data); - memcpy(chars, - &c->body()[string->offset(t) + start], - length * sizeof(uint16_t)); - } - } - chars[length] = 0; -} - -void stringUTFChars(Thread* t, - GcString* string, - unsigned start, - unsigned length, - char* chars, - unsigned charsLength UNUSED) -{ - assertT(t, - static_cast(stringUTFLength(t, string, start, length)) - == charsLength); - - object data = string->data(); - if (objectClass(t, data) == type(t, GcByteArray::Type)) { - GcByteArray* b = cast(t, data); - memcpy(chars, &b->body()[string->offset(t) + start], length); - chars[length] = 0; - } else { - GcCharArray* cs = cast(t, data); - int j = 0; - for (unsigned i = 0; i < length; ++i) { - uint16_t c = cs->body()[string->offset(t) + start + i]; - if (!c) { // null char - chars[j++] = 0; - } else if (c < 0x80) { // ASCII char - chars[j++] = static_cast(c); - } else if (c < 0x800) { // two-byte char - chars[j++] = static_cast(0x0c0 | (c >> 6)); - chars[j++] = static_cast(0x080 | (c & 0x03f)); - } else { // three-byte char - chars[j++] = static_cast(0x0e0 | ((c >> 12) & 0x0f)); - chars[j++] = static_cast(0x080 | ((c >> 6) & 0x03f)); - chars[j++] = static_cast(0x080 | (c & 0x03f)); - } - } - chars[j] = 0; - } -} - -uint64_t resolveBootstrap(Thread* t, uintptr_t* arguments) -{ - GcByteArray* name - = cast(t, reinterpret_cast(arguments[0])); - - resolveSystemClass(t, roots(t)->bootLoader(), name); - - return 1; -} - -bool isAssignableFrom(Thread* t, GcClass* a, GcClass* b) -{ - assertT(t, a); - assertT(t, b); - - if (a == b) - return true; - - if (a->flags() & ACC_INTERFACE) { - if (b->vmFlags() & BootstrapFlag) { - uintptr_t arguments[] = {reinterpret_cast(b->name())}; - - if (run(t, resolveBootstrap, arguments) == 0) { - t->exception = 0; - return false; - } - } - - GcArray* itable = cast(t, b->interfaceTable()); - if (itable) { - unsigned stride = (b->flags() & ACC_INTERFACE) ? 1 : 2; - for (unsigned i = 0; i < itable->length(); i += stride) { - if (itable->body()[i] == a) { - return true; - } - } - } - } else if (a->arrayDimensions()) { - if (b->arrayDimensions()) { - return isAssignableFrom( - t, a->arrayElementClass(), b->arrayElementClass()); - } - } else if ((a->vmFlags() & PrimitiveFlag) == (b->vmFlags() & PrimitiveFlag)) { - for (; b; b = b->super()) { - if (b == a) { - return true; - } - } - } - - return false; -} - -bool instanceOf(Thread* t, GcClass* class_, object o) -{ - if (o == 0) { - return false; - } else { - return isAssignableFrom(t, class_, objectClass(t, o)); - } -} - -GcMethod* classInitializer(Thread* t, GcClass* class_) -{ - if (GcArray* mtable = cast(t, class_->methodTable())) { - PROTECT(t, mtable); - for (unsigned i = 0; i < mtable->length(); ++i) { - GcMethod* o = cast(t, mtable->body()[i]); - - if (o->vmFlags() & ClassInitFlag) { - return o; - } - } - } - return 0; -} - -unsigned fieldCode(Thread* t, unsigned javaCode) -{ - switch (javaCode) { - case 'B': - return ByteField; - case 'C': - return CharField; - case 'D': - return DoubleField; - case 'F': - return FloatField; - case 'I': - return IntField; - case 'J': - return LongField; - case 'S': - return ShortField; - case 'V': - return VoidField; - case 'Z': - return BooleanField; - case 'L': - case '[': - return ObjectField; - - default: - abort(t); - } -} - -unsigned fieldType(Thread* t, unsigned code) -{ - switch (code) { - case VoidField: - return VOID_TYPE; - case ByteField: - case BooleanField: - return INT8_TYPE; - case CharField: - case ShortField: - return INT16_TYPE; - case DoubleField: - return DOUBLE_TYPE; - case FloatField: - return FLOAT_TYPE; - case IntField: - return INT32_TYPE; - case LongField: - return INT64_TYPE; - case ObjectField: - return POINTER_TYPE; - - default: - abort(t); - } -} - -unsigned primitiveSize(Thread* t, unsigned code) -{ - switch (code) { - case VoidField: - return 0; - case ByteField: - case BooleanField: - return 1; - case CharField: - case ShortField: - return 2; - case FloatField: - case IntField: - return 4; - case DoubleField: - case LongField: - return 8; - - default: - abort(t); - } -} - -GcClass* parseClass(Thread* t, - GcClassLoader* loader, - const uint8_t* data, - unsigned size, - Gc::Type throwType) -{ - PROTECT(t, loader); - - class Client : public Stream::Client { - public: - Client(Thread* t) : t(t) - { - } - - virtual void NO_RETURN handleError() - { - abort(t); - } - - private: - Thread* t; - } client(t); - - Stream s(&client, data, size); - - uint32_t magic = s.read4(); - expect(t, magic == 0xCAFEBABE); - unsigned minorVer = s.read2(); // minor version - unsigned majorVer = s.read2(); // major version - if (DebugClassReader) { - fprintf(stderr, "read class (minor %d major %d)\n", minorVer, majorVer); - } - - GcSingleton* pool = parsePool(t, s); - PROTECT(t, pool); - - unsigned flags = s.read2(); - unsigned name = s.read2(); - - GcClass* class_ = (GcClass*)makeClass( - t, - flags, - 0, // VM flags - 0, // fixed size - 0, // array size - 0, // array dimensions - 0, // array element class - 0, // runtime data index - 0, // object mask - cast(t, singletonObject(t, pool, name - 1))->name(), - 0, // source file - 0, // super - 0, // interfaces - 0, // vtable - 0, // fields - 0, // methods - 0, // addendum - 0, // static table - loader, - 0, // source - 0); // vtable length - PROTECT(t, class_); - - unsigned super = s.read2(); - if (super) { - GcClass* sc = resolveClass( - t, - loader, - cast(t, singletonObject(t, pool, super - 1))->name(), - true, - throwType); - - class_->setSuper(t, sc); - - class_->vmFlags() |= (sc->vmFlags() & (ReferenceFlag | WeakReferenceFlag - | HasFinalizerFlag | NeedInitFlag)); - } - - if (DebugClassReader) { - fprintf(stderr, " flags %d name %d super %d\n", flags, name, super); - } - - parseInterfaceTable(t, s, class_, pool, throwType); - - parseFieldTable(t, s, class_, pool); - - parseMethodTable(t, s, class_, pool); - - parseAttributeTable(t, s, class_, pool); - - GcArray* vtable = cast(t, class_->virtualTable()); - unsigned vtableLength = (vtable ? vtable->length() : 0); - - GcClass* real = t->m->processor->makeClass(t, - class_->flags(), - class_->vmFlags(), - class_->fixedSize(), - class_->arrayElementSize(), - class_->arrayDimensions(), - class_->arrayElementClass(), - class_->objectMask(), - class_->name(), - class_->sourceFile(), - class_->super(), - class_->interfaceTable(), - class_->virtualTable(), - class_->fieldTable(), - class_->methodTable(), - class_->addendum(), - class_->staticTable(), - class_->loader(), - vtableLength); - - PROTECT(t, real); - - t->m->processor->initVtable(t, real); - - updateClassTables(t, real, class_); - - if (roots(t)->poolMap()) { - object bootstrapClass = hashMapFind(t, - roots(t)->bootstrapClassMap(), - class_->name(), - byteArrayHash, - byteArrayEqual); - - hashMapInsert(t, - roots(t)->poolMap(), - bootstrapClass ? bootstrapClass : real, - pool, - objectHash); - } - - return real; -} - -uint64_t runParseClass(Thread* t, uintptr_t* arguments) -{ - GcClassLoader* loader - = cast(t, reinterpret_cast(arguments[0])); - System::Region* region = reinterpret_cast(arguments[1]); - Gc::Type throwType = static_cast(arguments[2]); - - return reinterpret_cast( - parseClass(t, loader, region->start(), region->length(), throwType)); -} - -GcClass* resolveSystemClass(Thread* t, - GcClassLoader* loader, - GcByteArray* spec, - bool throw_, - Gc::Type throwType) -{ - PROTECT(t, loader); - PROTECT(t, spec); - - ACQUIRE(t, t->m->classLock); - - /* - * We require that SystemClassLoader.isForbidden() has already - * been executed once before isBlacklisting is set to true. - * Otherwise this code-block recurses until the stack explodes. - */ - if (t->isBlacklisting() - && ::strcmp("avian/SystemClassLoader", reinterpret_cast(spec->body().begin()))) { - GcMethod* forbid = resolveMethod(t, - roots(t)->bootLoader(), - "avian/SystemClassLoader", - "isForbidden", - "(Ljava/lang/String;)Z"); - GcString *name = t->m->classpath->makeString(t, spec, 0, spec->length()); - GcInt *result = cast(t, t->m->processor->invoke(t, forbid, NULL, name)); - if (UNLIKELY(t->exception)) { - if (throw_) { - GcThrowable* e = t->exception; - t->exception = 0; - vm::throw_(t, e); - } else { - t->exception = 0; - return 0; - } - } - - if (result->value() == JNI_TRUE) { - if (throw_) { - throwNew(t, throwType, "%s", spec->body().begin()); - } else { - return 0; - } - } - } - - GcClass* class_ = findLoadedClass(t, loader, spec); - if (class_ == 0) { - PROTECT(t, class_); - - if (loader->parent()) { - class_ = resolveSystemClass(t, loader->parent(), spec, false); - if (class_) { - return class_; - } - } - - if (spec->body()[0] == '[') { - class_ = resolveArrayClass(t, loader, spec, throw_, throwType); - } else { - GcSystemClassLoader* sysLoader = loader->as(t); - PROTECT(t, sysLoader); - - THREAD_RUNTIME_ARRAY(t, char, file, spec->length() + 6); - memcpy( - RUNTIME_ARRAY_BODY(file), spec->body().begin(), spec->length() - 1); - memcpy(RUNTIME_ARRAY_BODY(file) + spec->length() - 1, ".class", 7); - - System::Region* region = static_cast(sysLoader->finder()) - ->find(RUNTIME_ARRAY_BODY(file)); - - if (region) { - if (Verbose) { - fprintf(stderr, "parsing %s\n", spec->body().begin()); - } - - { - THREAD_RESOURCE(t, System::Region*, region, region->dispose()); - - uintptr_t arguments[] = {reinterpret_cast(loader), - reinterpret_cast(region), - static_cast(throwType)}; - - // parse class file - class_ = cast( - t, reinterpret_cast(runRaw(t, runParseClass, arguments))); - - if (UNLIKELY(t->exception)) { - if (throw_) { - GcThrowable* e = t->exception; - t->exception = 0; - vm::throw_(t, e); - } else { - t->exception = 0; - return 0; - } - } - } - - if (Verbose) { - fprintf( - stderr, "done parsing %s: %p\n", spec->body().begin(), class_); - } - - { - const char* source = static_cast(sysLoader->finder()) - ->sourceUrl(RUNTIME_ARRAY_BODY(file)); - - if (source) { - unsigned length = strlen(source); - GcByteArray* array = makeByteArray(t, length + 1); - memcpy(array->body().begin(), source, length); - array = internByteArray(t, array); - - class_->setSource(t, array); - } - } - - GcClass* bootstrapClass - = cast(t, - hashMapFind(t, - roots(t)->bootstrapClassMap(), - spec, - byteArrayHash, - byteArrayEqual)); - - if (bootstrapClass) { - PROTECT(t, bootstrapClass); - - updateBootstrapClass(t, bootstrapClass, class_); - class_ = bootstrapClass; - } - } - } - - if (class_) { - hashMapInsert( - t, cast(t, loader->map()), spec, class_, byteArrayHash); - - updatePackageMap(t, class_); - } else if (throw_) { - throwNew(t, throwType, "%s", spec->body().begin()); - } - } - - return class_; -} - -GcClass* findLoadedClass(Thread* t, GcClassLoader* loader, GcByteArray* spec) -{ - PROTECT(t, loader); - PROTECT(t, spec); - - ACQUIRE(t, t->m->classLock); - - return loader->map() - ? cast(t, - hashMapFind(t, - cast(t, loader->map()), - spec, - byteArrayHash, - byteArrayEqual)) - : 0; -} - -GcClass* resolveClass(Thread* t, - GcClassLoader* loader, - GcByteArray* spec, - bool throw_, - Gc::Type throwType) -{ - if (objectClass(t, loader) == type(t, GcSystemClassLoader::Type)) { - return resolveSystemClass(t, loader, spec, throw_, throwType); - } else { - PROTECT(t, loader); - PROTECT(t, spec); - - GcClass* c = findLoadedClass(t, loader, spec); - if (c) { - return c; - } - - if (spec->body()[0] == '[') { - c = resolveArrayClass(t, loader, spec, throw_, throwType); - } else { - if (roots(t)->loadClassMethod() == 0) { - GcMethod* m = resolveMethod(t, - roots(t)->bootLoader(), - "java/lang/ClassLoader", - "loadClass", - "(Ljava/lang/String;)Ljava/lang/Class;"); - - if (m) { - roots(t)->setLoadClassMethod(t, m); - - GcClass* classLoaderClass = type(t, GcClassLoader::Type); - - if (classLoaderClass->vmFlags() & BootstrapFlag) { - resolveSystemClass( - t, roots(t)->bootLoader(), classLoaderClass->name()); - } - } - } - - GcMethod* method = findVirtualMethod( - t, roots(t)->loadClassMethod(), objectClass(t, loader)); - - PROTECT(t, method); - - THREAD_RUNTIME_ARRAY(t, char, s, spec->length()); - replace('/', - '.', - RUNTIME_ARRAY_BODY(s), - reinterpret_cast(spec->body().begin())); - - GcString* specString = makeString(t, "%s", RUNTIME_ARRAY_BODY(s)); - PROTECT(t, specString); - - uintptr_t arguments[] = {reinterpret_cast(method), - reinterpret_cast(loader), - reinterpret_cast(specString)}; - - GcJclass* jc = cast( - t, reinterpret_cast(runRaw(t, invokeLoadClass, arguments))); - - if (LIKELY(jc)) { - c = jc->vmClass(); - } else if (t->exception) { - if (throw_) { - GcThrowable* e - = type(t, throwType) == objectClass(t, t->exception) - ? t->exception - : makeThrowable(t, throwType, specString, 0, t->exception); - t->exception = 0; - vm::throw_(t, e); - } else { - t->exception = 0; - } - } - } - - if (LIKELY(c)) { - PROTECT(t, c); - - saveLoadedClass(t, loader, c); - } else if (throw_) { - throwNew(t, throwType, "%s", spec->body().begin()); - } - - return c; - } -} - -GcMethod* resolveMethod(Thread* t, - GcClass* class_, - const char* methodName, - const char* methodSpec) -{ - PROTECT(t, class_); - - GcByteArray* name = makeByteArray(t, methodName); - PROTECT(t, name); - - GcByteArray* spec = makeByteArray(t, methodSpec); - - GcMethod* method - = cast(t, findMethodInClass(t, class_, name, spec)); - - if (method == 0) { - throwNew(t, - GcNoSuchMethodError::Type, - "%s %s not found in %s", - methodName, - methodSpec, - class_->name()->body().begin()); - } else { - return method; - } -} - -GcField* resolveField(Thread* t, - GcClass* class_, - const char* fieldName, - const char* fieldSpec) -{ - PROTECT(t, class_); - - GcByteArray* name = makeByteArray(t, fieldName); - PROTECT(t, name); - - GcByteArray* spec = makeByteArray(t, fieldSpec); - PROTECT(t, spec); - - GcField* field = cast( - t, findInInterfaces(t, class_, name, spec, findFieldInClass)); - - GcClass* c = class_; - PROTECT(t, c); - - for (; c != 0 and field == 0; c = c->super()) { - field = cast(t, findFieldInClass(t, c, name, spec)); - } - - if (field == 0) { - throwNew(t, - GcNoSuchFieldError::Type, - "%s %s not found in %s", - fieldName, - fieldSpec, - class_->name()->body().begin()); - } else { - return field; - } -} - -bool classNeedsInit(Thread* t, GcClass* c) -{ - if (c->vmFlags() & NeedInitFlag) { - if (c->vmFlags() & InitFlag) { - // the class is currently being initialized. If this the thread - // which is initializing it, we should not try to initialize it - // recursively. Otherwise, we must wait for the responsible - // thread to finish. - for (Thread::ClassInitStack* s = t->classInitStack; s; s = s->next) { - if (s->class_ == c) { - return false; - } - } - } - return true; - } else { - return false; - } -} - -bool preInitClass(Thread* t, GcClass* c) -{ - int flags = c->vmFlags(); - - loadMemoryBarrier(); - - if (flags & NeedInitFlag) { - PROTECT(t, c); - ACQUIRE(t, t->m->classLock); - - if (c->vmFlags() & NeedInitFlag) { - if (c->vmFlags() & InitFlag) { - // If the class is currently being initialized and this the thread - // which is initializing it, we should not try to initialize it - // recursively. - if (isInitializing(t, c)) { - return false; - } - - // some other thread is on the job - wait for it to finish. - while (c->vmFlags() & InitFlag) { - ENTER(t, Thread::IdleState); - t->m->classLock->wait(t->systemThread, 0); - } - } else if (c->vmFlags() & InitErrorFlag) { - throwNew( - t, GcNoClassDefFoundError::Type, "%s", c->name()->body().begin()); - } else { - c->vmFlags() |= InitFlag; - return true; - } - } - } - return false; -} - -void postInitClass(Thread* t, GcClass* c) -{ - PROTECT(t, c); - ACQUIRE(t, t->m->classLock); - - if (t->exception - and instanceOf(t, type(t, GcException::Type), t->exception)) { - c->vmFlags() |= NeedInitFlag | InitErrorFlag; - c->vmFlags() &= ~InitFlag; - - GcThrowable* exception = t->exception; - t->exception = 0; - - GcExceptionInInitializerError* initExecption - = makeThrowable(t, GcExceptionInInitializerError::Type, 0, 0, exception) - ->as(t); - - initExecption->setException(t, exception->cause()); - - throw_(t, initExecption->as(t)); - } else { - c->vmFlags() &= ~(NeedInitFlag | InitFlag); - } - t->m->classLock->notifyAll(t->systemThread); -} - -void initClass(Thread* t, GcClass* c) -{ - PROTECT(t, c); - - GcClass* super = c->super(); - if (super) { - initClass(t, super); - } - - if (preInitClass(t, c)) { - OBJECT_RESOURCE(t, c, postInitClass(t, cast(t, c))); - - GcMethod* initializer = classInitializer(t, c); - - if (initializer) { - Thread::ClassInitStack stack(t, c); - - t->m->processor->invoke(t, initializer, 0); - } - } -} - -GcClass* resolveObjectArrayClass(Thread* t, - GcClassLoader* loader, - GcClass* elementClass) -{ - PROTECT(t, loader); - PROTECT(t, elementClass); - - { - GcClass* arrayClass - = cast(t, getClassRuntimeData(t, elementClass)->arrayClass()); - if (arrayClass) { - return arrayClass; - } - } - - GcByteArray* elementSpec = elementClass->name(); - PROTECT(t, elementSpec); - - GcByteArray* spec; - if (elementSpec->body()[0] == '[') { - spec = makeByteArray(t, elementSpec->length() + 1); - spec->body()[0] = '['; - memcpy( - &spec->body()[1], elementSpec->body().begin(), elementSpec->length()); - } else { - spec = makeByteArray(t, elementSpec->length() + 3); - spec->body()[0] = '['; - spec->body()[1] = 'L'; - memcpy(&spec->body()[2], - elementSpec->body().begin(), - elementSpec->length() - 1); - spec->body()[elementSpec->length() + 1] = ';'; - spec->body()[elementSpec->length() + 2] = 0; - } - - GcClass* arrayClass = resolveClass(t, loader, spec); - - getClassRuntimeData(t, elementClass)->setArrayClass(t, arrayClass); - - return arrayClass; -} - -object makeObjectArray(Thread* t, GcClass* elementClass, unsigned count) -{ - GcClass* arrayClass - = resolveObjectArrayClass(t, elementClass->loader(), elementClass); - - PROTECT(t, arrayClass); - - object array = makeArray(t, count); - setObjectClass(t, array, arrayClass); - - return array; -} - -static GcByteArray* getFieldName(Thread* t, object obj) -{ - return reinterpret_cast(cast(t, obj)->name()); -} - -static GcByteArray* getFieldSpec(Thread* t, object obj) -{ - return reinterpret_cast(cast(t, obj)->spec()); -} - -static GcByteArray* getMethodName(Thread* t, object obj) -{ - return reinterpret_cast(cast(t, obj)->name()); -} - -static GcByteArray* getMethodSpec(Thread* t, object obj) -{ - return reinterpret_cast(cast(t, obj)->spec()); -} - -object findFieldInClass(Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec) -{ - return findInTable(t, - cast(t, class_->fieldTable()), - name, - spec, - getFieldName, - getFieldSpec); -} - -object findMethodInClass(Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec) -{ - return findInTable(t, - cast(t, class_->methodTable()), - name, - spec, - getMethodName, - getMethodSpec); -} - -object findInHierarchyOrNull( - Thread* t, - GcClass* class_, - GcByteArray* name, - GcByteArray* spec, - object (*find)(Thread*, GcClass*, GcByteArray*, GcByteArray*)) -{ - GcClass* originalClass = class_; - - object o = 0; - if ((class_->flags() & ACC_INTERFACE) and class_->virtualTable()) { - o = findInTable(t, - cast(t, class_->virtualTable()), - name, - spec, - getMethodName, - getMethodSpec); - } - - if (o == 0) { - for (; o == 0 and class_; class_ = class_->super()) { - o = find(t, class_, name, spec); - } - - if (o == 0 and find == findFieldInClass) { - o = findInInterfaces(t, originalClass, name, spec, find); - } - } - - return o; -} - -unsigned parameterFootprint(Thread* t, const char* s, bool static_) -{ - unsigned footprint = 0; - for (MethodSpecIterator it(t, s); it.hasNext();) { - switch (*it.next()) { - case 'J': - case 'D': - footprint += 2; - break; - - default: - ++footprint; - break; - } - } - - if (not static_) { - ++footprint; - } - return footprint; -} - -void addFinalizer(Thread* t, object target, void (*finalize)(Thread*, object)) -{ - PROTECT(t, target); - - ACQUIRE(t, t->m->referenceLock); - - void* function; - memcpy(&function, &finalize, BytesPerWord); - - GcFinalizer* f = makeFinalizer(t, 0, function, 0, 0, 0); - f->target() = target; - f->next() = t->m->finalizers; - t->m->finalizers = f; -} - -GcMonitor* objectMonitor(Thread* t, object o, bool createNew) -{ - assertT(t, t->state == Thread::ActiveState); - - object m = hashMapFind(t, roots(t)->monitorMap(), o, objectHash, objectEqual); - - if (m) { - if (DebugMonitors) { - fprintf(stderr, "found monitor %p for object %x\n", m, objectHash(t, o)); - } - - return cast(t, m); - } else if (createNew) { - PROTECT(t, o); - PROTECT(t, m); - - { - ENTER(t, Thread::ExclusiveState); - - m = hashMapFind(t, roots(t)->monitorMap(), o, objectHash, objectEqual); - - if (m) { - if (DebugMonitors) { - fprintf( - stderr, "found monitor %p for object %x\n", m, objectHash(t, o)); - } - - return cast(t, m); - } - - object head = makeMonitorNode(t, 0, 0); - m = makeMonitor(t, 0, 0, 0, head, head, 0); - - if (DebugMonitors) { - fprintf(stderr, "made monitor %p for object %x\n", m, objectHash(t, o)); - } - - hashMapInsert(t, roots(t)->monitorMap(), o, m, objectHash); - - addFinalizer(t, o, removeMonitor); - } - - return cast(t, m); - } else { - return 0; - } -} - -object intern(Thread* t, object s) -{ - PROTECT(t, s); - - ACQUIRE(t, t->m->referenceLock); - - GcTriple* n - = hashMapFindNode(t, roots(t)->stringMap(), s, stringHash, stringEqual); - - if (n) { - return cast(t, n->first())->target(); - } else { - hashMapInsert(t, roots(t)->stringMap(), s, 0, stringHash); - addFinalizer(t, s, removeString); - return s; - } -} - -object clone(Thread* t, object o) -{ - PROTECT(t, o); - - GcClass* class_ = objectClass(t, o); - unsigned size = baseSize(t, o, class_) * BytesPerWord; - object clone; - - if (class_->arrayElementSize()) { - clone = static_cast(allocate(t, size, class_->objectMask())); - memcpy(clone, o, size); - // clear any object header flags: - setObjectClass(t, o, objectClass(t, o)); - } else if (instanceOf(t, type(t, GcCloneable::Type), o)) { - clone = make(t, class_); - memcpy(reinterpret_cast(clone) + 1, - reinterpret_cast(o) + 1, - size - BytesPerWord); - } else { - GcByteArray* classNameSlash = objectClass(t, o)->name(); - THREAD_RUNTIME_ARRAY(t, char, classNameDot, classNameSlash->length()); - replace('/', - '.', - RUNTIME_ARRAY_BODY(classNameDot), - reinterpret_cast(classNameSlash->body().begin())); - throwNew(t, - GcCloneNotSupportedException::Type, - "%s", - RUNTIME_ARRAY_BODY(classNameDot)); - } - - return clone; -} - -void walk(Thread* t, Heap::Walker* w, object o, unsigned start) -{ - GcClass* class_ = t->m->heap->follow(objectClass(t, o)); - GcIntArray* objectMask = t->m->heap->follow(class_->objectMask()); - - bool more = true; - - if (objectMask) { - unsigned fixedSize = class_->fixedSize(); - unsigned arrayElementSize = class_->arrayElementSize(); - unsigned arrayLength = (arrayElementSize ? fieldAtOffset( - o, fixedSize - BytesPerWord) - : 0); - - THREAD_RUNTIME_ARRAY(t, uint32_t, mask, objectMask->length()); - memcpy(RUNTIME_ARRAY_BODY(mask), - objectMask->body().begin(), - objectMask->length() * 4); - - more = ::walk(t, - w, - RUNTIME_ARRAY_BODY(mask), - fixedSize, - arrayElementSize, - arrayLength, - start); - } else if (class_->vmFlags() & SingletonFlag) { - GcSingleton* s = cast(t, o); - unsigned length = s->length(); - if (length) { - more = ::walk(t, - w, - singletonMask(t, s), - (singletonCount(t, s) + 2) * BytesPerWord, - 0, - 0, - start); - } else if (start == 0) { - more = w->visit(0); - } - } else if (start == 0) { - more = w->visit(0); - } - - if (more and class_->vmFlags() & ContinuationFlag) { - t->m->processor->walkContinuationBody(t, w, o, start); - } -} - -int walkNext(Thread* t, object o, int previous) -{ - class Walker : public Heap::Walker { - public: - Walker() : value(-1) - { - } - - bool visit(unsigned offset) - { - value = offset; - return false; - } - - int value; - } walker; - - walk(t, &walker, o, previous + 1); - return walker.value; -} - -void visitRoots(Machine* m, Heap::Visitor* v) -{ - v->visit(&(m->types)); - v->visit(&(m->roots)); - - for (Thread* t = m->rootThread; t; t = t->peer) { - ::visitRoots(t, v); - } - - for (Reference* r = m->jniReferences; r; r = r->next) { - if (not r->weak) { - v->visit(&(r->target)); - } - } -} - -void logTrace(FILE* f, const char* fmt, ...) -{ - va_list a; - va_start(a, fmt); -#ifdef PLATFORM_WINDOWS - const unsigned length = _vscprintf(fmt, a); -#else - const unsigned length = vsnprintf(0, 0, fmt, a); -#endif - va_end(a); - - RUNTIME_ARRAY(char, buffer, length + 1); - va_start(a, fmt); - vsnprintf(RUNTIME_ARRAY_BODY(buffer), length + 1, fmt, a); - va_end(a); - RUNTIME_ARRAY_BODY(buffer)[length] = 0; - - ::fprintf(f, "%s", RUNTIME_ARRAY_BODY(buffer)); -#ifdef PLATFORM_WINDOWS - ::OutputDebugStringA(RUNTIME_ARRAY_BODY(buffer)); -#endif -} - -void printTrace(Thread* t, GcThrowable* exception) -{ - if (exception == 0) { - exception = makeThrowable(t, GcNullPointerException::Type); - } - - for (GcThrowable* e = exception; e; e = e->cause()) { - if (e != exception) { - logTrace(errorLog(t), "caused by: "); - } - - logTrace(errorLog(t), "%s", objectClass(t, e)->name()->body().begin()); - - if (e->message()) { - GcString* m = e->message(); - THREAD_RUNTIME_ARRAY(t, char, message, m->length(t) + 1); - stringChars(t, m, RUNTIME_ARRAY_BODY(message)); - logTrace(errorLog(t), ": %s\n", RUNTIME_ARRAY_BODY(message)); - } else { - logTrace(errorLog(t), "\n"); - } - - object trace = e->trace(); - if (trace) { - for (unsigned i = 0; i < objectArrayLength(t, trace); ++i) { - GcTraceElement* e - = cast(t, objectArrayBody(t, trace, i)); - GcMethod* m = cast(t, e->method()); - const int8_t* class_ = m->class_()->name()->body().begin(); - const int8_t* method = m->name()->body().begin(); - int line = t->m->processor->lineNumber(t, m, e->ip()); - - logTrace(errorLog(t), " at %s.%s ", class_, method); - - switch (line) { - case NativeLine: - logTrace(errorLog(t), "(native)\n"); - break; - case UnknownLine: - logTrace(errorLog(t), "(unknown line)\n"); - break; - default: - logTrace(errorLog(t), "(line %d)\n", line); - } - } - } - - if (e == e->cause()) { - break; - } - } - - ::fflush(errorLog(t)); -} - -object makeTrace(Thread* t, Processor::StackWalker* walker) -{ - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t) : t(t), trace(0), index(0), protector(t, &trace) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - if (trace == 0) { - trace = makeObjectArray(t, walker->count()); - assertT(t, trace); - } - - GcTraceElement* e = makeTraceElement(t, walker->method(), walker->ip()); - assertT(t, index < objectArrayLength(t, trace)); - reinterpret_cast(trace)->setBodyElement(t, index, e); - ++index; - return true; - } - - Thread* t; - object trace; - unsigned index; - Thread::SingleProtector protector; - } v(t); - - walker->walk(&v); - - return v.trace ? v.trace : makeObjectArray(t, 0); -} - -object makeTrace(Thread* t, Thread* target) -{ - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t) : t(t), trace(0) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - trace = vm::makeTrace(t, walker); - return false; - } - - Thread* t; - object trace; - } v(t); - - t->m->processor->walkStack(target, &v); - - return v.trace ? v.trace : makeObjectArray(t, 0); -} - -void runFinalizeThread(Thread* t) -{ - GcFinalizer* finalizeList = 0; - PROTECT(t, finalizeList); - - GcCleaner* cleanList = 0; - PROTECT(t, cleanList); - - while (true) { - { - ACQUIRE(t, t->m->stateLock); - - while (t->m->finalizeThread and roots(t)->objectsToFinalize() == 0 - and roots(t)->objectsToClean() == 0) { - ENTER(t, Thread::IdleState); - t->m->stateLock->wait(t->systemThread, 0); - } - - if (t->m->finalizeThread == 0) { - return; - } else { - finalizeList = roots(t)->objectsToFinalize(); - roots(t)->setObjectsToFinalize(t, 0); - - cleanList = roots(t)->objectsToClean(); - roots(t)->setObjectsToClean(t, 0); - } - } - - for (; finalizeList; finalizeList = finalizeList->queueNext()) { - finalizeObject(t, finalizeList->queueTarget(), "finalize"); - } - - for (; cleanList; cleanList = cleanList->queueNext()) { - finalizeObject(t, cleanList, "clean"); - } - } -} - -object parseUtf8(Thread* t, const char* data, unsigned length) -{ - class Client : public Stream::Client { - public: - Client(Thread* t) : t(t) - { - } - - virtual void handleError() - { - if (false) - abort(t); - } - - private: - Thread* t; - } client(t); - - Stream s(&client, reinterpret_cast(data), length); - - return ::parseUtf8(t, s, length); -} - -object parseUtf8(Thread* t, GcByteArray* array) -{ - for (unsigned i = 0; i < array->length() - 1; ++i) { - if (array->body()[i] & 0x80) { - goto slow_path; - } - } - - return array; - -slow_path: - class Client : public Stream::Client { - public: - Client(Thread* t) : t(t) - { - } - - virtual void handleError() - { - if (false) - abort(t); - } - - private: - Thread* t; - } client(t); - - class MyStream : public AbstractStream { - public: - class MyProtector : public Thread::Protector { - public: - MyProtector(Thread* t, MyStream* s) : Protector(t), s(s) - { - } - - virtual void visit(Heap::Visitor* v) - { - v->visit(&(s->array)); - } - - MyStream* s; - }; - - MyStream(Thread* t, Client* client, GcByteArray* array) - : AbstractStream(client, array->length() - 1), - array(array), - protector(t, this) - { - } - - virtual void copy(uint8_t* dst, unsigned offset, unsigned size) - { - memcpy(dst, &array->body()[offset], size); - } - - GcByteArray* array; - MyProtector protector; - } s(t, &client, array); - - return ::parseUtf8(t, s, array->length() - 1); -} - -GcMethod* getCaller(Thread* t, unsigned target, bool skipMethodInvoke) -{ - if (static_cast(target) == -1) { - target = 2; - } - - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t, unsigned target, bool skipMethodInvoke) - : t(t), - method(0), - count(0), - target(target), - skipMethodInvoke(skipMethodInvoke) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - if (skipMethodInvoke - and walker->method()->class_() == type(t, GcJmethod::Type) - and strcmp(walker->method()->name()->body().begin(), - reinterpret_cast("invoke")) == 0) { - return true; - } - - if (count == target) { - method = walker->method(); - return false; - } else { - ++count; - return true; - } - } - - Thread* t; - GcMethod* method; - unsigned count; - unsigned target; - bool skipMethodInvoke; - } v(t, target, skipMethodInvoke); - - t->m->processor->walkStack(t, &v); - - return v.method; -} - -GcClass* defineClass(Thread* t, - GcClassLoader* loader, - const uint8_t* buffer, - unsigned length) -{ - PROTECT(t, loader); - - GcClass* c = parseClass(t, loader, buffer, length); - - // char name[byteArrayLength(t, className(t, c))]; - // memcpy(name, &byteArrayBody(t, className(t, c), 0), - // byteArrayLength(t, className(t, c))); - // replace('/', '-', name); - - // const unsigned BufferSize = 1024; - // char path[BufferSize]; - // snprintf(path, BufferSize, "/tmp/avian-define-class/%s.class", name); - - // FILE* file = fopen(path, "wb"); - // if (file) { - // fwrite(buffer, length, 1, file); - // fclose(file); - // } - - PROTECT(t, c); - - saveLoadedClass(t, loader, c); - - return c; -} - -void populateMultiArray(Thread* t, - object array, - int32_t* counts, - unsigned index, - unsigned dimensions) -{ - if (index + 1 == dimensions or counts[index] == 0) { - return; - } - - PROTECT(t, array); - - GcByteArray* spec = objectClass(t, array)->name(); - PROTECT(t, spec); - - GcByteArray* elementSpec = makeByteArray(t, spec->length() - 1); - memcpy(elementSpec->body().begin(), &spec->body()[1], spec->length() - 1); - - GcClass* class_ - = resolveClass(t, objectClass(t, array)->loader(), elementSpec); - PROTECT(t, class_); - - for (int32_t i = 0; i < counts[index]; ++i) { - GcArray* a = makeArray( - t, - ceilingDivide(counts[index + 1] * class_->arrayElementSize(), - BytesPerWord)); - a->length() = counts[index + 1]; - setObjectClass(t, a, class_); - setField(t, array, ArrayBody + (i * BytesPerWord), a); - - populateMultiArray(t, a, counts, index + 1, dimensions); - } -} - -object interruptLock(Thread* t, GcThread* thread) -{ - object lock = thread->interruptLock(); - - loadMemoryBarrier(); - - if (lock == 0) { - PROTECT(t, thread); - ACQUIRE(t, t->m->referenceLock); - - if (thread->interruptLock() == 0) { - object head = makeMonitorNode(t, 0, 0); - GcMonitor* lock = makeMonitor(t, 0, 0, 0, head, head, 0); - - storeStoreMemoryBarrier(); - - thread->setInterruptLock(t, lock); - } - } - - return thread->interruptLock(); -} - -void clearInterrupted(Thread* t) -{ - monitorAcquire(t, cast(t, interruptLock(t, t->javaThread))); - t->javaThread->interrupted() = false; - monitorRelease(t, cast(t, interruptLock(t, t->javaThread))); -} - -void threadInterrupt(Thread* t, GcThread* thread) -{ - PROTECT(t, thread); - - monitorAcquire(t, cast(t, interruptLock(t, thread))); - Thread* p = reinterpret_cast(thread->peer()); - if (p) { - interrupt(t, p); - } - thread->interrupted() = true; - monitorRelease(t, cast(t, interruptLock(t, thread))); -} - -bool threadIsInterrupted(Thread* t, GcThread* thread, bool clear) -{ - PROTECT(t, thread); - - monitorAcquire(t, cast(t, interruptLock(t, thread))); - bool v = thread->interrupted(); - if (clear) { - thread->interrupted() = false; - } - monitorRelease(t, cast(t, interruptLock(t, thread))); - return v; -} - -GcJclass* getDeclaringClass(Thread* t, GcClass* c) -{ - GcClassAddendum* addendum = c->addendum(); - if (addendum) { - GcArray* table = cast(t, addendum->innerClassTable()); - if (table) { - for (unsigned i = 0; i < table->length(); ++i) { - GcInnerClassReference* reference - = cast(t, table->body()[i]); - if (reference->outer() - and strcmp(reference->inner()->body().begin(), - c->name()->body().begin()) == 0) { - return getJClass(t, resolveClass(t, c->loader(), reference->outer())); - } - } - } - } - - return 0; -} - -// Called when interpreting invokedynamic. `invocation` points to -// static data in the bootstrap method table, which in turn points to -// a bootstrap method and stores additional data to be passed to -// it. `resolveDynamic` will then call this bootstrap method after -// resolving the arguments as required. The called method is assumed -// to be a lambda `metafactory` or `altMetafactory`. -// -// Note that capture/bridging etc happens within the bootstrap method, -// this is just the code that dispatches to it. -// -// Returns the CallSite returned by the bootstrap method. -GcCallSite* resolveDynamic(Thread* t, GcInvocation* invocation) -{ - PROTECT(t, invocation); - - // Use the invocation's Class to get the bootstrap method table and get a classloader. - GcClass* c = invocation->class_(); - PROTECT(t, c); - - // First element points to the bootstrap method. The rest are static data passed to the BSM. - GcCharArray* bootstrapArray = cast( - t, - cast(t, c->addendum()->bootstrapMethodTable()) - ->body()[invocation->bootstrap()]); - - PROTECT(t, bootstrapArray); - - // Resolve the bootstrap method itself. - GcMethod* bootstrap = cast(t, - resolve(t, - c->loader(), - invocation->pool(), - bootstrapArray->body()[0], - findMethodInClass, - GcNoSuchMethodError::Type))->method(); - PROTECT(t, bootstrap); - - // Caller context info to be passed to the bootstrap method. - GcLookup* lookup - = makeLookup(t, c, ACC_PUBLIC | ACC_PRIVATE | ACC_PROTECTED | ACC_STATIC); - PROTECT(t, lookup); - - // The name of the linked-to method. - GcByteArray* nameBytes = invocation->template_()->name(); - GcString* name - = t->m->classpath->makeString(t, nameBytes, 0, nameBytes->length() - 1); - PROTECT(t, name); - - // This is the type of the linked-to method (e.g. lambda). - GcMethodType* type = makeMethodType( - t, c->loader(), invocation->template_()->spec(), 0, 0, 0); - PROTECT(t, type); - - // `array` stores either - // 1. All the arguments to be passed to the bootstrap method in the case of `metafactory` - // 2. The vararg object array to be passed to `altMetafactory` - GcArray* array = makeArray(t, bootstrap->parameterCount()); - PROTECT(t, array); - - // These are common arguments to metafactory and altMetafactory - unsigned argument = 0; - array->setBodyElement(t, argument++, lookup); - array->setBodyElement(t, argument++, name); - array->setBodyElement(t, argument++, type); - - THREAD_RUNTIME_ARRAY(t, char, specBuffer, bootstrap->spec()->length()); - - const char* spec; - // `argArray` stores the final arguments to be passed to the bootstrap method. - // Later in this function we iterate through the method signature + - // bootstrap array and resolve the arguments as required into `array`. - // - // In the case of a `metafactory` call: - // `argArray = [caller, invokedName, invokedType, methodType, methodImplementation, instantiatedType]` - // `array = argArray` - // - // In the case of an `altMetafactory` call: - // `argArray = [caller, invokedName, invokedType, array]` - // `array = [methodType, methodImplementation, instantiatedType, flags, ...]` - GcArray* argArray = array; - PROTECT(t, argArray); - - // Check if the bootstrap method's signature matches that of an altMetafactory - if (::strcmp(reinterpret_cast(bootstrap->spec()->body().begin()), - "(Ljava/lang/invoke/MethodHandles$Lookup;" - "Ljava/lang/String;" - "Ljava/lang/invoke/MethodType;" - "[Ljava/lang/Object;)" - "Ljava/lang/invoke/CallSite;") == 0) { - // If so, create a new array to store the varargs in, and hardcode the BSM signature. - array = makeArray(t, bootstrapArray->length() - 1); - spec = "(Ljava/lang/invoke/MethodHandles$Lookup;" - "Ljava/lang/String;" - "Ljava/lang/invoke/MethodType;" - "Ljava/lang/invoke/MethodType;" - "Ljava/lang/invoke/MethodHandle;" - "Ljava/lang/invoke/MethodType;" - "I" - "I" - "[Ljava/lang/Class;" - "I" - "[Ljava/lang/invoke/MethodType;" - ")Ljava/lang/invoke/CallSite;"; - } else if (bootstrap->parameterCount() == 2 + bootstrapArray->length()) { - // We're calling the simpler `metafactory`. 2 + bootstrapArray->length() is the - // arguments to the bootstrap method (bootstrapArray->length() - 1), plus the 3 static - // arguments (lookup, name, type). - memcpy(RUNTIME_ARRAY_BODY(specBuffer), - bootstrap->spec()->body().begin(), - bootstrap->spec()->length()); - spec = RUNTIME_ARRAY_BODY(specBuffer); - } else { - abort(t); - } - - MethodSpecIterator it(t, spec); - - // Skip over the already handled 3 arguments. - for (unsigned i = 0; i < argument; ++i) - it.next(); - - // If we're calling altMetafactory then we reset the argument - // offset, because we are filling the vararg array instead of the - // final argument array. - if (argArray != array) { - argument = 0; - } - - // `i` iterates through the bootstrap arguments (the +1 is because we skip - // the bootstrap method's name), `it` iterates through the corresponding types - // in the method signature - unsigned i = 0; - while (i + 1 < bootstrapArray->length() && it.hasNext()) { - const char* p = it.next(); - - switch (*p) { - case 'L': { - const char* const methodType = "Ljava/lang/invoke/MethodType;"; - const char* const methodHandle = "Ljava/lang/invoke/MethodHandle;"; - if (strncmp(p, methodType, strlen(methodType)) == 0) { - GcMethodType* type = makeMethodType( - t, - c->loader(), - cast( - t, - singletonObject( - t, invocation->pool(), bootstrapArray->body()[i + 1])), - 0, - 0, - 0); - - array->setBodyElement(t, i + argument, type); - } else if (strncmp(p, methodHandle, strlen(methodHandle)) == 0) { - GcMethodHandle* handle = cast(t, - resolve(t, - c->loader(), - invocation->pool(), - bootstrapArray->body()[i + 1], - findMethodInClass, - GcNoSuchMethodError::Type)); - - array->setBodyElement(t, i + argument, handle); - } else { - abort(t); - } - } break; - - case 'I': - case 'F': { - GcInt* box = makeInt( - t, - singletonValue(t, invocation->pool(), bootstrapArray->body()[i + 1])); - - array->setBodyElement(t, i + argument, box); - } break; - - case 'J': - case 'D': { - uint64_t v; - memcpy( - &v, - &singletonValue(t, invocation->pool(), bootstrapArray->body()[i + 1]), - 8); - - GcLong* box = makeLong(t, v); - - array->setBodyElement(t, i + argument, box); - } break; - - default: - fprintf(stderr, "todo: unsupported bootstrap argument type: %s", p); - abort(t); - } - - ++i; - } - - GcMethodHandle* handle - = (bootstrap->flags() & ACC_STATIC) - ? 0 - : makeMethodHandle(t, REF_invokeSpecial, c->loader(), bootstrap, 0); - - // If we're calling altMetafactory we set the fourth argument to the vararg array. - if (argArray != array) { - argArray->setBodyElement(t, 3, array); - } - - // Finally we make the bootstrap call. - return cast( - t, t->m->processor->invokeArray(t, bootstrap, handle, argArray)); -} - -void noop() -{ -} - -#include "type-constructors.cpp" - -} // namespace vm - -// for debugging -AVIAN_EXPORT void vmfPrintTrace(Thread* t, FILE* out) -{ - class Visitor : public Processor::StackVisitor { - public: - Visitor(Thread* t, FILE* out) : t(t), out(out) - { - } - - virtual bool visit(Processor::StackWalker* walker) - { - const int8_t* class_ = walker->method()->class_()->name()->body().begin(); - const int8_t* method = walker->method()->name()->body().begin(); - int line = t->m->processor->lineNumber(t, walker->method(), walker->ip()); - - fprintf(out, " at %s.%s ", class_, method); - - switch (line) { - case NativeLine: - fprintf(out, "(native)\n"); - break; - case UnknownLine: - fprintf(out, "(unknown line)\n"); - break; - default: - fprintf(out, "(line %d)\n", line); - } - - return true; - } - - Thread* t; - FILE* out; - } v(t, out); - - fprintf(out, "debug trace for thread %p\n", t); - - t->m->processor->walkStack(t, &v); - - fflush(out); -} - -AVIAN_EXPORT void vmPrintTrace(Thread* t) -{ - vmfPrintTrace(t, stderr); -} - -// also for debugging -AVIAN_EXPORT void* vmAddressFromLine(GcMethod* m, unsigned line) -{ - GcCode* code = m->code(); - printf("code: %p\n", code); - GcLineNumberTable* lnt = code->lineNumberTable(); - printf("lnt: %p\n", lnt); - - if (lnt) { - unsigned last = 0; - unsigned bottom = 0; - unsigned top = lnt->length(); - for (unsigned i = bottom; i < top; i++) { - uint64_t ln = lnt->body()[i]; - if (lineNumberLine(ln) == line) - return reinterpret_cast(lineNumberIp(ln)); - else if (lineNumberLine(ln) > line) - return reinterpret_cast(last); - last = lineNumberIp(ln); - } - } - return 0; -} diff --git a/sgx-jvm/avian/src/main.cpp b/sgx-jvm/avian/src/main.cpp deleted file mode 100644 index dd6b616666..0000000000 --- a/sgx-jvm/avian/src/main.cpp +++ /dev/null @@ -1,295 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "stdlib.h" -#include "stdio.h" -#include "string.h" -#include "jni.h" - -#include -#include "avian/finder.h" - -#include - -#if (defined __MINGW32__) || (defined _MSC_VER) -#define PATH_SEPARATOR ';' -#else -#define PATH_SEPARATOR ':' -#endif - -#ifdef _MSC_VER - -#define not! -#define or || -#define and && -#define xor ^ - -#endif // not _MSC_VER - -#ifdef BOOT_LIBRARY - -// since we aren't linking against libstdc++, we must implement this -// ourselves: -extern "C" void __cxa_pure_virtual(void) -{ - abort(); -} - -// we link against a System implmentation, which requires this at link -// time, but it should not be used at runtime: -extern "C" uint64_t vmNativeCall(void*, void*, unsigned, unsigned) -{ - abort(); - // abort is not declared __declspec(noreturn) on MSVC, so we have to - // pretend it might return to make the compiler happy: - return 0; -} - -#endif // BOOT_LIBRARY - -namespace { - -const char* mainClass(const char* jar) -{ - using namespace vm; - - System* system = makeSystem(); - - class MyAllocator : public avian::util::Alloc { - public: - MyAllocator(System* s) : s(s) - { - } - - virtual void* allocate(size_t size) - { - void* p = s->tryAllocate(size); - if (p == 0) { - abort(s); - } - return p; - } - - virtual void free(const void* p, size_t) - { - s->free(p); - } - - System* s; - } allocator(system); - - Finder* finder = makeFinder(system, &allocator, jar, 0); - - char* result = 0; - - System::Region* region = finder->find("META-INF/MANIFEST.MF"); - if (region) { - size_t start = 0; - size_t length; - while (readLine(region->start(), region->length(), &start, &length)) { - const unsigned PrefixLength = 12; - if (strncasecmp("Main-Class: ", - reinterpret_cast(region->start() + start), - PrefixLength) == 0) { - result = static_cast(malloc(length + 1 - PrefixLength)); - memcpy(result, - region->start() + start + PrefixLength, - length - PrefixLength); - result[length - PrefixLength] = 0; - break; - } - start += length; - } - - region->dispose(); - } - - finder->dispose(); - - system->dispose(); - - return result; -} - -void usageAndExit(const char* name) -{ - fprintf( - stderr, - "usage: %s\n" - "\t[{-cp|-classpath} ]\n" - "\t[-Xmx]\n" - "\t[-Xss]\n" - "\t[-Xbootclasspath/p:]\n" - "\t[-Xbootclasspath:]\n" - "\t[-Xbootclasspath/a:]\n" - "\t[-D= ...]\n" - "\t{|-jar } [ ...]\n", - name); - exit(-1); -} - -} // namespace - -int main(int ac, const char** av) -{ - JavaVMInitArgs vmArgs; - vmArgs.version = JNI_VERSION_1_2; - vmArgs.nOptions = 1; - vmArgs.ignoreUnrecognized = JNI_TRUE; - - const char* class_ = 0; - const char* jar = 0; - int argc = 0; - const char** argv = 0; - const char* classpath = "."; - - for (int i = 1; i < ac; ++i) { - if (strcmp(av[i], "-cp") == 0 or strcmp(av[i], "-classpath") == 0) { - if (i + 1 == ac) - usageAndExit(av[0]); - classpath = av[++i]; - } else if (strcmp(av[i], "-jar") == 0) { - if (i + 1 == ac) - usageAndExit(av[0]); - jar = av[++i]; - } else if (strncmp(av[i], "-X", 2) == 0 or strncmp(av[i], "-D", 2) == 0) { - ++vmArgs.nOptions; - } else if (strcmp(av[i], "-client") == 0 or strcmp(av[i], "-server") == 0) { - // ignore - } else if (strcmp(av[i], "-version") == 0) { - fprintf(stderr, "Avian " AVIAN_VERSION "\n"); - exit(0); - } else { - if (jar == 0) { - class_ = av[i++]; - } - if (i < ac) { - argc = ac - i; - argv = av + i; - i = ac; - } - } - } - - if (jar) { - classpath = jar; - - class_ = mainClass(jar); - - if (class_ == 0) { - fprintf(stderr, "Main-Class manifest header not found in %s\n", jar); - exit(-1); - } - } - -#ifdef BOOT_LIBRARY - ++vmArgs.nOptions; -#endif - -#ifdef BOOT_IMAGE - vmArgs.nOptions += 2; -#endif - -#ifdef BOOT_BUILTINS - ++vmArgs.nOptions; -#endif - - RUNTIME_ARRAY(JavaVMOption, options, vmArgs.nOptions); - vmArgs.options = RUNTIME_ARRAY_BODY(options); - - unsigned optionIndex = 0; - -#ifdef BOOT_IMAGE - vmArgs.options[optionIndex++].optionString - = const_cast("-Davian.bootimage=bootimageBin"); - - vmArgs.options[optionIndex++].optionString - = const_cast("-Davian.codeimage=codeimageBin"); -#endif - -#ifdef BOOT_LIBRARY - vmArgs.options[optionIndex++].optionString - = const_cast("-Davian.bootstrap=" BOOT_LIBRARY); -#endif - -#ifdef BOOT_BUILTINS - vmArgs.options[optionIndex++].optionString - = const_cast("-Davian.builtins=" BOOT_BUILTINS); -#endif - -#define CLASSPATH_PROPERTY "-Djava.class.path=" - - size_t classpathSize = strlen(classpath); - size_t classpathPropertyBufferSize = sizeof(CLASSPATH_PROPERTY) - + classpathSize; - - RUNTIME_ARRAY(char, classpathPropertyBuffer, classpathPropertyBufferSize); - memcpy(RUNTIME_ARRAY_BODY(classpathPropertyBuffer), - CLASSPATH_PROPERTY, - sizeof(CLASSPATH_PROPERTY) - 1); - memcpy(RUNTIME_ARRAY_BODY(classpathPropertyBuffer) - + sizeof(CLASSPATH_PROPERTY) - 1, - classpath, - classpathSize + 1); - - vmArgs.options[optionIndex++].optionString - = RUNTIME_ARRAY_BODY(classpathPropertyBuffer); - - for (int i = 1; i < ac; ++i) { - if (strncmp(av[i], "-X", 2) == 0 or strncmp(av[i], "-D", 2) == 0) { - vmArgs.options[optionIndex++].optionString = const_cast(av[i]); - } - } - - if (class_ == 0) { - usageAndExit(av[0]); - } - - JavaVM* vm; - void* env; - JNI_CreateJavaVM(&vm, &env, &vmArgs); - JNIEnv* e = static_cast(env); - - jclass c = 0; - if (not e->ExceptionCheck()) { - c = e->FindClass(class_); - } - - if (jar) { - free(const_cast(class_)); - } - - if (not e->ExceptionCheck()) { - jmethodID m = e->GetStaticMethodID(c, "main", "([Ljava/lang/String;)V"); - if (not e->ExceptionCheck()) { - jclass stringClass = e->FindClass("java/lang/String"); - if (not e->ExceptionCheck()) { - jobjectArray a = e->NewObjectArray(argc, stringClass, 0); - if (not e->ExceptionCheck()) { - for (int i = 0; i < argc; ++i) { - e->SetObjectArrayElement(a, i, e->NewStringUTF(argv[i])); - } - - e->CallStaticVoidMethod(c, m, a); - } - } - } - } - - int exitCode = 0; - if (e->ExceptionCheck()) { - exitCode = -1; - e->ExceptionDescribe(); - } - - vm->DestroyJavaVM(); - - return exitCode; -} diff --git a/sgx-jvm/avian/src/openjdk/caseSensitive/WS2tcpip.h b/sgx-jvm/avian/src/openjdk/caseSensitive/WS2tcpip.h deleted file mode 100644 index 5caab3e7f6..0000000000 --- a/sgx-jvm/avian/src/openjdk/caseSensitive/WS2tcpip.h +++ /dev/null @@ -1 +0,0 @@ -#include "ws2tcpip.h" diff --git a/sgx-jvm/avian/src/openjdk/caseSensitive/Wincon.h b/sgx-jvm/avian/src/openjdk/caseSensitive/Wincon.h deleted file mode 100644 index 40d2ad2a68..0000000000 --- a/sgx-jvm/avian/src/openjdk/caseSensitive/Wincon.h +++ /dev/null @@ -1,3 +0,0 @@ -// Console_md.c #includes "Wincon.h", which only matches "wincon.h" on -// a case insensive filesystem, so we redirect here. -#include "wincon.h" diff --git a/sgx-jvm/avian/src/openjdk/jni_md.h b/sgx-jvm/avian/src/openjdk/jni_md.h deleted file mode 100644 index 555c772249..0000000000 --- a/sgx-jvm/avian/src/openjdk/jni_md.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef JNI_MD_H -#define JNI_MD_H - -#include "stdint.h" - -#if (defined __MINGW32__) || (defined _MSC_VER) -#define JNIEXPORT __declspec(dllexport) -#define JNICALL __stdcall -#else // not (defined __MINGW32__) || (defined _MSC_VER) -#define JNIEXPORT __attribute__((visibility("default"))) __attribute__((used)) -#define JNICALL -#endif // not (defined __MINGW32__) || (defined _MSC_VER) - -#define JNIIMPORT - -typedef int32_t jint; -typedef int64_t jlong; -typedef int8_t jbyte; - -#endif // JNI_MD_H diff --git a/sgx-jvm/avian/src/openjdk/my_java_props_macosx.c b/sgx-jvm/avian/src/openjdk/my_java_props_macosx.c deleted file mode 100644 index f6833283f6..0000000000 --- a/sgx-jvm/avian/src/openjdk/my_java_props_macosx.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "java_props_macosx.h" - -PreferredToolkit -getPreferredToolkit() -{ - return XToolkit; -} - -void -setOSNameAndVersion(java_props_t* props) -{ - props->os_name = strdup("iOS"); - props->os_version = strdup("Unknown"); -} - -void -setProxyProperties(java_props_t* props) -{ - // ignore -} - -void -setUserHome(java_props_t* props) -{ - // ignore -} - -char* -setupMacOSXLocale(int cat) -{ - return 0; -} - -char* environ[0]; diff --git a/sgx-jvm/avian/src/openjdk/stubs.cpp b/sgx-jvm/avian/src/openjdk/stubs.cpp deleted file mode 100644 index c2175fdd34..0000000000 --- a/sgx-jvm/avian/src/openjdk/stubs.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#include "avian/machine.h" - -using namespace vm; - -extern "C" AVIAN_EXPORT jint JNICALL net_JNI_OnLoad(JavaVM*, void*) -{ - return 0; -} - -extern "C" AVIAN_EXPORT jint JNICALL management_JNI_OnLoad(JavaVM*, void*) -{ - return 0; -} - -extern "C" char* findJavaTZ_md(const char*, const char*) -{ - return 0; -} diff --git a/sgx-jvm/avian/src/powerpc-regs.S b/sgx-jvm/avian/src/powerpc-regs.S deleted file mode 100644 index da5940f403..0000000000 --- a/sgx-jvm/avian/src/powerpc-regs.S +++ /dev/null @@ -1,64 +0,0 @@ -#define r0 0 -#define r1 1 -#define r2 2 -#define r3 3 -#define r4 4 -#define r5 5 -#define r6 6 -#define r7 7 -#define r8 8 -#define r9 9 -#define r10 10 -#define r11 11 -#define r12 12 -#define r13 13 -#define r14 14 -#define r15 15 -#define r16 16 -#define r17 17 -#define r18 18 -#define r19 19 -#define r20 20 -#define r21 21 -#define r22 22 -#define r23 23 -#define r24 24 -#define r25 25 -#define r26 26 -#define r27 27 -#define r28 28 -#define r29 29 -#define r30 30 -#define r31 31 -#define f0 0 -#define f1 1 -#define f2 2 -#define f3 3 -#define f4 4 -#define f5 5 -#define f6 6 -#define f7 7 -#define f8 8 -#define f9 9 -#define f10 10 -#define f11 11 -#define f12 12 -#define f13 13 -#define f14 14 -#define f15 15 -#define f16 16 -#define f17 17 -#define f18 18 -#define f19 19 -#define f20 20 -#define f21 21 -#define f22 22 -#define f23 23 -#define f24 24 -#define f25 25 -#define f26 26 -#define f27 27 -#define f28 28 -#define f29 29 -#define f30 30 -#define f31 31 diff --git a/sgx-jvm/avian/src/process.cpp b/sgx-jvm/avian/src/process.cpp deleted file mode 100644 index ba6cfd5809..0000000000 --- a/sgx-jvm/avian/src/process.cpp +++ /dev/null @@ -1,310 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/process.h" - -#include - -using namespace vm; - -namespace { - -unsigned mangledSize(int8_t c) -{ - switch (c) { - case '_': - case ';': - case '[': - return 2; - - case '$': - return 6; - - default: - return 1; - } -} - -unsigned mangle(int8_t c, char* dst) -{ - switch (c) { - case '/': - dst[0] = '_'; - return 1; - - case '_': - dst[0] = '_'; - dst[1] = '1'; - return 2; - - case ';': - dst[0] = '_'; - dst[1] = '2'; - return 2; - - case '[': - dst[0] = '_'; - dst[1] = '3'; - return 2; - - case '$': - memcpy(dst, "_00024", 6); - return 6; - - default: - dst[0] = c; - return 1; - } -} - -unsigned jniNameLength(Thread* t UNUSED, GcMethod* method, bool decorate) -{ - unsigned size = 0; - - GcByteArray* className = method->class_()->name(); - for (unsigned i = 0; i < className->length() - 1; ++i) { - size += mangledSize(className->body()[i]); - } - - ++size; - - GcByteArray* methodName = method->name(); - for (unsigned i = 0; i < methodName->length() - 1; ++i) { - size += mangledSize(methodName->body()[i]); - } - - if (decorate) { - size += 2; - - GcByteArray* methodSpec = method->spec(); - for (unsigned i = 1; - i < methodSpec->length() - 1 and methodSpec->body()[i] != ')'; - ++i) { - size += mangledSize(methodSpec->body()[i]); - } - } - - return size; -} - -void makeJNIName(Thread* t UNUSED, - const char* prefix, - unsigned prefixLength, - char* name, - GcMethod* method, - bool decorate) -{ - memcpy(name, prefix, prefixLength); - name += prefixLength; - - GcByteArray* className = method->class_()->name(); - for (unsigned i = 0; i < className->length() - 1; ++i) { - name += mangle(className->body()[i], name); - } - - *(name++) = '_'; - - GcByteArray* methodName = method->name(); - for (unsigned i = 0; i < methodName->length() - 1; ++i) { - name += mangle(methodName->body()[i], name); - } - - if (decorate) { - *(name++) = '_'; - *(name++) = '_'; - - GcByteArray* methodSpec = method->spec(); - for (unsigned i = 1; - i < methodSpec->length() - 1 and methodSpec->body()[i] != ')'; - ++i) { - name += mangle(methodSpec->body()[i], name); - } - } - - *(name++) = 0; -} - -void* resolveNativeMethod(Thread* t, - const char* undecorated, - const char* decorated) -{ - for (System::Library* lib = t->m->libraries; lib; lib = lib->next()) { - void* p = lib->resolve(undecorated); - if (p) { - return p; - } else { - p = lib->resolve(decorated); - if (p) { - return p; - } - } - } - - return 0; -} - -void* resolveNativeMethod(Thread* t, - GcMethod* method, - const char* prefix, - unsigned prefixLength, - int footprint UNUSED) -{ - unsigned undecoratedSize = prefixLength + jniNameLength(t, method, false); - // extra 6 is for code below: - THREAD_RUNTIME_ARRAY(t, char, undecorated, undecoratedSize + 1 + 6); - makeJNIName(t, - prefix, - prefixLength, - RUNTIME_ARRAY_BODY(undecorated) + 1, - method, - false); - - unsigned decoratedSize = prefixLength + jniNameLength(t, method, true); - // extra 6 is for code below: - THREAD_RUNTIME_ARRAY(t, char, decorated, decoratedSize + 1 + 6); - makeJNIName( - t, prefix, prefixLength, RUNTIME_ARRAY_BODY(decorated) + 1, method, true); - - void* p = resolveNativeMethod(t, - RUNTIME_ARRAY_BODY(undecorated) + 1, - RUNTIME_ARRAY_BODY(decorated) + 1); - if (p) { - return p; - } - -#ifdef PLATFORM_WINDOWS - // on windows, we also try the _%s@%d and %s@%d variants - if (footprint == -1) { - footprint = method->parameterFootprint() + 1; - if (method->flags() & ACC_STATIC) { - ++footprint; - } - } - - *RUNTIME_ARRAY_BODY(undecorated) = '_'; - vm::snprintf(RUNTIME_ARRAY_BODY(undecorated) + undecoratedSize + 1, - 5, - "@%d", - footprint * BytesPerWord); - - *RUNTIME_ARRAY_BODY(decorated) = '_'; - vm::snprintf(RUNTIME_ARRAY_BODY(decorated) + decoratedSize + 1, - 5, - "@%d", - footprint * BytesPerWord); - - p = resolveNativeMethod( - t, RUNTIME_ARRAY_BODY(undecorated), RUNTIME_ARRAY_BODY(decorated)); - if (p) { - return p; - } - - // one more try without the leading underscore - p = resolveNativeMethod(t, - RUNTIME_ARRAY_BODY(undecorated) + 1, - RUNTIME_ARRAY_BODY(decorated) + 1); - if (p) { - return p; - } -#endif - - return 0; -} - -GcNative* resolveNativeMethod(Thread* t, GcMethod* method) -{ - void* p = resolveNativeMethod(t, method, "Avian_", 6, 3); - if (p) { - return makeNative(t, p, true); - } - - p = resolveNativeMethod(t, method, "Java_", 5, -1); - if (p) { - return makeNative(t, p, false); - } - - return 0; -} - -} // namespace - -namespace vm { - -void resolveNative(Thread* t, GcMethod* method) -{ - PROTECT(t, method); - - assertT(t, method->flags() & ACC_NATIVE); - - initClass(t, method->class_()); - - if (getMethodRuntimeData(t, method)->native() == 0) { - GcNative* native = resolveNativeMethod(t, method); - if (UNLIKELY(native == 0)) { - throwNew(t, - GcUnsatisfiedLinkError::Type, - "%s.%s%s", - method->class_()->name()->body().begin(), - method->name()->body().begin(), - method->spec()->body().begin()); - } - - PROTECT(t, native); - - GcMethodRuntimeData* runtimeData = getMethodRuntimeData(t, method); - - // ensure other threads only see the methodRuntimeDataNative field - // populated once the object it points to has been populated: - storeStoreMemoryBarrier(); - - runtimeData->setNative(t, native); - } -} - -int findLineNumber(Thread* t UNUSED, GcMethod* method, unsigned ip) -{ - if (method->flags() & ACC_NATIVE) { - return NativeLine; - } - - // our parameter indicates the instruction following the one we care - // about, so we back up first: - --ip; - - GcLineNumberTable* lnt = method->code()->lineNumberTable(); - if (lnt) { - unsigned bottom = 0; - unsigned top = lnt->length(); - for (unsigned span = top - bottom; span; span = top - bottom) { - unsigned middle = bottom + (span / 2); - uint64_t ln = lnt->body()[middle]; - - if (ip >= lineNumberIp(ln) - and (middle + 1 == lnt->length() - or ip < lineNumberIp(lnt->body()[middle + 1]))) { - return lineNumberLine(ln); - } else if (ip < lineNumberIp(ln)) { - top = middle; - } else if (ip > lineNumberIp(ln)) { - bottom = middle + 1; - } - } - - if (top < lnt->length()) { - return lineNumberLine(lnt->body()[top]); - } else { - return UnknownLine; - } - } else { - return UnknownLine; - } -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/system/CMakeLists.txt b/sgx-jvm/avian/src/system/CMakeLists.txt deleted file mode 100644 index 5c6f2a58fa..0000000000 --- a/sgx-jvm/avian/src/system/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ - -if (MSVC) - #todo: support mingw compiler - add_library(avian_system windows.cpp windows/crash.cpp) -else() - add_library(avian_system posix.cpp posix/crash.cpp) -endif() diff --git a/sgx-jvm/avian/src/system/posix.cpp b/sgx-jvm/avian/src/system/posix.cpp deleted file mode 100644 index 64a667887c..0000000000 --- a/sgx-jvm/avian/src/system/posix.cpp +++ /dev/null @@ -1,1002 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef __STDC_CONSTANT_MACROS -#define __STDC_CONSTANT_MACROS -#endif - -#include "sys/types.h" -#ifdef __APPLE__ -#include "CoreFoundation/CoreFoundation.h" -#include "sys/ucontext.h" -#undef assert -#elif defined(__ANDROID__) -#include /* for sigcontext */ -#include /* for stack_t */ -typedef struct ucontext { - unsigned long uc_flags; - struct ucontext* uc_link; - stack_t uc_stack; - struct sigcontext uc_mcontext; - unsigned long uc_sigmask; -} ucontext_t; -#else -#if defined __FreeBSD__ -#include "limits.h" -#endif -#include "ucontext.h" -#endif - -#include "sys/mman.h" - -#include "sys/stat.h" -#include "sys/time.h" -#include "time.h" -#include "fcntl.h" -#include "dlfcn.h" -#include "errno.h" -#include "unistd.h" -#include "pthread.h" -#include "signal.h" -#include "stdint.h" -#include "dirent.h" -#include "sched.h" - -#include -#include - -#include -#include -#include -#include - -#define ACQUIRE(x) MutexResource MAKE_NAME(mutexResource_)(x) - -using namespace vm; -using namespace avian::util; - -namespace { - -class MutexResource { - public: - MutexResource(pthread_mutex_t& m) : m(&m) - { - pthread_mutex_lock(&m); - } - - ~MutexResource() - { - pthread_mutex_unlock(m); - } - - private: - pthread_mutex_t* m; -}; - -const int VisitSignal = SIGUSR1; -const unsigned VisitSignalIndex = 0; -const int InterruptSignal = SIGUSR2; -const unsigned InterruptSignalIndex = 1; -const int PipeSignal = SIGPIPE; -const unsigned PipeSignalIndex = 2; - -const int signals[] = {VisitSignal, InterruptSignal, PipeSignal}; - -const unsigned SignalCount = 3; - -class MySystem; -MySystem* globalSystem; - -void handleSignal(int signal, siginfo_t* info, void* context); - -void* run(void* r) -{ - static_cast(r)->run(); - return 0; -} - -void pathOfExecutable(System* s, const char** retBuf, unsigned* size) -{ -#ifdef __APPLE__ - CFBundleRef bundle = CFBundleGetMainBundle(); - CFURLRef url = CFBundleCopyExecutableURL(bundle); - CFStringRef path = CFURLCopyPath(url); - path = CFURLCreateStringByReplacingPercentEscapes( - kCFAllocatorDefault, path, CFSTR("")); - CFIndex pathSize = CFStringGetMaximumSizeOfFileSystemRepresentation(path); - char* buffer = reinterpret_cast(allocate(s, pathSize)); - if (CFStringGetFileSystemRepresentation(path, buffer, pathSize)) { - *size = pathSize; - *retBuf = buffer; - } else { - abort(); - } -#else - if (s) - *size = 0; - *retBuf = NULL; -#endif -} - -const bool Verbose = false; - -const unsigned Notified = 1 << 0; - -class MySystem : public System { - public: - class Thread : public System::Thread { - public: - Thread(System* s, System::Runnable* r) : s(s), r(r), next(0), flags(0) - { - pthread_mutex_init(&mutex, 0); - pthread_cond_init(&condition, 0); - } - - virtual void interrupt() - { - ACQUIRE(mutex); - - r->setInterrupted(true); - - pthread_kill(thread, InterruptSignal); - - // pthread_kill won't necessarily wake a thread blocked in - // pthread_cond_{timed}wait (it does on Linux but not Mac OS), - // so we signal the condition as well: - int rv UNUSED = pthread_cond_signal(&condition); - expect(s, rv == 0); - } - - virtual bool getAndClearInterrupted() - { - ACQUIRE(mutex); - - bool interrupted = r->interrupted(); - - r->setInterrupted(false); - - return interrupted; - } - - virtual void join() - { - int rv UNUSED = pthread_join(thread, 0); - expect(s, rv == 0); - } - - virtual void dispose() - { - pthread_mutex_destroy(&mutex); - pthread_cond_destroy(&condition); - ::free(this); - } - - pthread_t thread; - pthread_mutex_t mutex; - pthread_cond_t condition; - System* s; - System::Runnable* r; - Thread* next; - unsigned flags; - }; - - class Mutex : public System::Mutex { - public: - Mutex(System* s) : s(s) - { - pthread_mutex_init(&mutex, 0); - } - - virtual void acquire() - { - pthread_mutex_lock(&mutex); - } - - virtual void release() - { - pthread_mutex_unlock(&mutex); - } - - virtual void dispose() - { - pthread_mutex_destroy(&mutex); - ::free(this); - } - - System* s; - pthread_mutex_t mutex; - }; - - class Monitor : public System::Monitor { - public: - Monitor(System* s) : s(s), owner_(0), first(0), last(0), depth(0) - { - pthread_mutex_init(&mutex, 0); - } - - virtual bool tryAcquire(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - ++depth; - return true; - } else { - switch (pthread_mutex_trylock(&mutex)) { - case EBUSY: - return false; - - case 0: - owner_ = t; - ++depth; - return true; - - default: - sysAbort(s); - } - } - } - - virtual void acquire(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ != t) { - pthread_mutex_lock(&mutex); - owner_ = t; - } - ++depth; - } - - virtual void release(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - if (--depth == 0) { - owner_ = 0; - pthread_mutex_unlock(&mutex); - } - } else { - sysAbort(s); - } - } - - void append(Thread* t) - { -#ifndef NDEBUG - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } -#endif - - if (last) { - expect(s, t != last); - last->next = t; - last = t; - } else { - first = last = t; - } - } - - void remove(Thread* t) - { - Thread* previous = 0; - for (Thread* current = first; current;) { - if (t == current) { - if (current == first) { - first = t->next; - } else { - expect(s, previous != t->next); - previous->next = t->next; - } - - if (current == last) { - last = previous; - } - - t->next = 0; - - break; - } else { - previous = current; - current = current->next; - } - } - -#ifndef NDEBUG - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } -#endif - } - - virtual void wait(System::Thread* context, int64_t time) - { - wait(context, time, false); - } - - virtual bool waitAndClearInterrupted(System::Thread* context, int64_t time) - { - return wait(context, time, true); - } - - bool wait(System::Thread* context, int64_t time, bool clearInterrupted) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - // Initialized here to make gcc 4.2 a happy compiler - bool interrupted = false; - bool notified = false; - unsigned depth = 0; - - { - ACQUIRE(t->mutex); - - expect(s, (t->flags & Notified) == 0); - - interrupted = t->r->interrupted(); - if (interrupted and clearInterrupted) { - t->r->setInterrupted(false); - } - - append(t); - - depth = this->depth; - this->depth = 0; - owner_ = 0; - pthread_mutex_unlock(&mutex); - - if (not interrupted) { - // pretend anything greater than one million years (in - // milliseconds) is infinity so as to avoid overflow: - if (time and time < INT64_C(31536000000000000)) { - int64_t then = s->now() + time; - timespec ts = {static_cast(then / 1000), - static_cast((then % 1000) * 1000 * 1000)}; - int rv UNUSED - = pthread_cond_timedwait(&(t->condition), &(t->mutex), &ts); - expect(s, rv == 0 or rv == ETIMEDOUT or rv == EINTR); - } else { - int rv UNUSED = pthread_cond_wait(&(t->condition), &(t->mutex)); - expect(s, rv == 0 or rv == EINTR); - } - - interrupted = t->r->interrupted(); - if (interrupted and clearInterrupted) { - t->r->setInterrupted(false); - } - } - - notified = ((t->flags & Notified) != 0); - } - - pthread_mutex_lock(&mutex); - - { - ACQUIRE(t->mutex); - t->flags = 0; - } - - if (not notified) { - remove(t); - } else { -#ifndef NDEBUG - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } -#endif - } - - t->next = 0; - - owner_ = t; - this->depth = depth; - - return interrupted; - } else { - sysAbort(s); - } - } - - void doNotify(Thread* t) - { - ACQUIRE(t->mutex); - - t->flags |= Notified; - int rv UNUSED = pthread_cond_signal(&(t->condition)); - expect(s, rv == 0); - } - - virtual void notify(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - if (first) { - Thread* t = first; - first = first->next; - if (t == last) { - expect(s, first == 0); - last = 0; - } - - doNotify(t); - } - } else { - sysAbort(s); - } - } - - virtual void notifyAll(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - for (Thread* t = first; t; t = t->next) { - doNotify(t); - } - first = last = 0; - } else { - sysAbort(s); - } - } - - virtual System::Thread* owner() - { - return owner_; - } - - virtual void dispose() - { - expect(s, owner_ == 0); - pthread_mutex_destroy(&mutex); - ::free(this); - } - - System* s; - pthread_mutex_t mutex; - Thread* owner_; - Thread* first; - Thread* last; - unsigned depth; - }; - - class Local : public System::Local { - public: - Local(System* s) : s(s) - { - int r UNUSED = pthread_key_create(&key, 0); - expect(s, r == 0); - } - - virtual void* get() - { - return pthread_getspecific(key); - } - - virtual void set(void* p) - { - int r UNUSED = pthread_setspecific(key, p); - expect(s, r == 0); - } - - virtual void dispose() - { - int r UNUSED = pthread_key_delete(key); - expect(s, r == 0); - - ::free(this); - } - - System* s; - pthread_key_t key; - }; - - class Region : public System::Region { - public: - Region(System* s, uint8_t* start, size_t length) - : s(s), start_(start), length_(length) - { - } - - virtual const uint8_t* start() - { - return start_; - } - - virtual size_t length() - { - return length_; - } - - virtual void dispose() - { - if (start_) { - munmap(start_, length_); - } - ::free(this); - } - - System* s; - uint8_t* start_; - size_t length_; - }; - - class Directory : public System::Directory { - public: - Directory(System* s, DIR* directory) : s(s), directory(directory) - { - } - - virtual const char* next() - { - if (directory) { - dirent* e = readdir(directory); - if (e) { - return e->d_name; - } - } - return 0; - } - - virtual void dispose() - { - if (directory) { - closedir(directory); - } - ::free(this); - } - - System* s; - DIR* directory; - }; - - class Library : public System::Library { - public: - Library(System* s, - void* p, - const char* name, - unsigned nameLength, - bool isMain) - : s(s), - p(p), - mainExecutable(isMain), - name_(name), - nameLength(nameLength), - next_(0) - { - } - - virtual void* resolve(const char* function) - { - return dlsym(p, function); - } - - virtual const char* name() - { - return name_; - } - - virtual System::Library* next() - { - return next_; - } - - virtual void setNext(System::Library* lib) - { - next_ = lib; - } - - virtual void disposeAll() - { - if (Verbose) { - fprintf(stderr, "close %p\n", p); - } - - if (not mainExecutable) - dlclose(p); - - if (next_) { - next_->disposeAll(); - } - - if (name_) { - ::free(const_cast(name_)); - } - - ::free(this); - } - - System* s; - void* p; - bool mainExecutable; - const char* name_; - unsigned nameLength; - System::Library* next_; - }; - - MySystem(bool reentrant) : reentrant(reentrant), threadVisitor(0), visitTarget(0) - { - if (not reentrant) { - expect(this, globalSystem == 0); - globalSystem = this; - - expect(this, registerHandler(InterruptSignalIndex)); - expect(this, registerHandler(VisitSignalIndex)); - expect(this, registerHandler(PipeSignalIndex)); - - expect(this, make(&visitLock) == 0); - } - } - - // Returns true on success, false on failure - bool unregisterHandler(int index) - { - return sigaction(signals[index], oldHandlers + index, 0) == 0; - } - - // Returns true on success, false on failure - bool registerHandler(int index) - { - struct sigaction sa; - memset(&sa, 0, sizeof(struct sigaction)); - sigemptyset(&(sa.sa_mask)); - sa.sa_flags = SA_SIGINFO; - sa.sa_sigaction = handleSignal; - - return sigaction(signals[index], &sa, oldHandlers + index) == 0; - } - - virtual void* tryAllocate(size_t sizeInBytes) - { - return malloc(sizeInBytes); - } - - virtual void free(const void* p) - { - if (p) - ::free(const_cast(p)); - } - - virtual bool success(Status s) { - return s == 0; - } - - virtual Status attach(Runnable* r) - { - Thread* t = new (allocate(this, sizeof(Thread))) Thread(this, r); - t->thread = pthread_self(); - r->attach(t); - return 0; - } - - virtual Status start(Runnable* r) - { - Thread* t = new (allocate(this, sizeof(Thread))) Thread(this, r); - r->attach(t); - int rv UNUSED = pthread_create(&(t->thread), 0, run, r); - expect(this, rv == 0); - return 0; - } - - virtual Status make(System::Mutex** m) - { - *m = new (allocate(this, sizeof(Mutex))) Mutex(this); - return 0; - } - - virtual Status make(System::Monitor** m) - { - *m = new (allocate(this, sizeof(Monitor))) Monitor(this); - return 0; - } - - virtual Status make(System::Local** l) - { - *l = new (allocate(this, sizeof(Local))) Local(this); - return 0; - } - - virtual Status visit(System::Thread* st UNUSED, - System::Thread* sTarget, - ThreadVisitor* visitor) - { - expect(this, not reentrant); - - assertT(this, st != sTarget); - - Thread* target = static_cast(sTarget); - -#ifdef __APPLE__ - // On Mac OS, signals sent using pthread_kill are never delivered - // if the target thread is blocked (e.g. acquiring a lock or - // waiting on a condition), so we can't rely on it and must use - // the Mach-specific thread execution API instead. - - mach_port_t port = pthread_mach_thread_np(target->thread); - - if (thread_suspend(port)) - return -1; - - THREAD_STATE_TYPE state; - mach_msg_type_number_t stateCount = THREAD_STATE_COUNT; - kern_return_t rv - = thread_get_state(port, - THREAD_STATE, - reinterpret_cast(&state), - &stateCount); - - if (rv == 0) { - visitor->visit(reinterpret_cast(THREAD_STATE_IP(state)), - reinterpret_cast(THREAD_STATE_STACK(state)), - reinterpret_cast(THREAD_STATE_LINK(state))); - } - - thread_resume(port); - - return rv ? -1 : 0; -#else // not __APPLE__ - Thread* t = static_cast(st); - - ACQUIRE_MONITOR(t, visitLock); - - while (threadVisitor) - visitLock->wait(t, 0); - - threadVisitor = visitor; - visitTarget = target; - - int rv = pthread_kill(target->thread, VisitSignal); - - int result; - if (rv == 0) { - while (visitTarget) - visitLock->wait(t, 0); - - result = 0; - } else { - visitTarget = 0; - - result = -1; - } - - threadVisitor = 0; - - globalSystem->visitLock->notifyAll(t); - - return result; -#endif // not __APPLE__ - } - - virtual Status map(System::Region** region, const char* name) - { - Status status = 1; - - int fd = ::open(name, O_RDONLY); - if (fd != -1) { - struct stat s; - int r = fstat(fd, &s); - if (r != -1) { - void* data = mmap(0, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0); - if (data) { - *region = new (allocate(this, sizeof(Region))) - Region(this, static_cast(data), s.st_size); - status = 0; - } - } - close(fd); - } - - return status; - } - - virtual Status open(System::Directory** directory, const char* name) - { - Status status = 1; - - DIR* d = opendir(name); - if (d) { - *directory = new (allocate(this, sizeof(Directory))) Directory(this, d); - status = 0; - } - - return status; - } - - virtual FileType stat(const char* name, size_t* length) - { -#ifdef __FreeBSD__ - // Now the hack below causes the error "Dereferencing type-punned - // pointer will break strict aliasing rules", so another workaround - // is needed... - struct stat ss; - struct stat* s = &ss; -#else - // Ugly Hack Alert: It seems that the Apple iOS Simulator's stat - // implementation writes beyond the end of the struct stat we pass - // it, which can clobber unrelated parts of the stack. Perhaps - // this is due to some kind of header/library mismatch, but I've - // been unable to track it down so far. The workaround is to give - // it 8 words more than it should need, where 8 is a number I just - // made up and seems to work. - void* array[ceilingDivide(sizeof(struct stat), sizeof(void*)) + 8]; - struct stat* s = reinterpret_cast(array); -#endif - - int r = ::stat(name, s); - if (r == 0) { - if (S_ISREG(s->st_mode)) { - *length = s->st_size; - return TypeFile; - } else if (S_ISDIR(s->st_mode)) { - *length = 0; - return TypeDirectory; - } else { - *length = 0; - return TypeUnknown; - } - } else { - *length = 0; - return TypeDoesNotExist; - } - } - - virtual const char* libraryPrefix() - { - return SO_PREFIX; - } - - virtual const char* librarySuffix() - { - return SO_SUFFIX; - } - - virtual const char* toAbsolutePath(AllocOnly* allocator, const char* name) - { - if (name[0] == '/') { - return copy(allocator, name); - } else { - char buffer[PATH_MAX]; - return append(allocator, getcwd(buffer, PATH_MAX), "/", name); - } - } - - virtual Status load(System::Library** lib, const char* name) - { - unsigned nameLength = (name ? strlen(name) : 0); - bool isMain = name == 0; - if (isMain) { - pathOfExecutable(this, &name, &nameLength); - } - void* p = dlopen(name, RTLD_LAZY | RTLD_LOCAL); - - if (p) { - if (Verbose) { - fprintf(stderr, "open %s as %p\n", name, p); - } - - char* n; - if (name) { - n = static_cast(allocate(this, nameLength + 1)); - memcpy(n, name, nameLength + 1); - if (isMain) { - free(name); - } - } else { - n = 0; - } - - *lib = new (allocate(this, sizeof(Library))) - Library(this, p, n, nameLength, isMain); - - return 0; - } else { - if (Verbose) { - fprintf(stderr, "dlerror opening %s: %s\n", name, dlerror()); - } - return 1; - } - } - - virtual char pathSeparator() - { - return ':'; - } - - virtual char fileSeparator() - { - return '/'; - } - - virtual int64_t now() - { - timeval tv = {0, 0}; - gettimeofday(&tv, 0); - return (static_cast(tv.tv_sec) * 1000) - + (static_cast(tv.tv_usec) / 1000); - } - - virtual void yield() - { - sched_yield(); - } - - virtual void exit(int code) - { - ::exit(code); - } - - virtual void abort() - { - avian::system::crash(); - } - - virtual void dispose() - { - if (not reentrant) { - visitLock->dispose(); - - expect(this, unregisterHandler(InterruptSignalIndex)); - expect(this, unregisterHandler(VisitSignalIndex)); - expect(this, unregisterHandler(PipeSignalIndex)); - globalSystem = 0; - } - - ::free(this); - } - - struct sigaction oldHandlers[SignalCount]; - - bool reentrant; - ThreadVisitor* threadVisitor; - Thread* visitTarget; - System::Monitor* visitLock; -}; - -void handleSignal(int signal, siginfo_t*, void* context) -{ - ucontext_t* c = static_cast(context); - - void* ip = reinterpret_cast(IP_REGISTER(c)); - void* stack = reinterpret_cast(STACK_REGISTER(c)); - void* link = reinterpret_cast(LINK_REGISTER(c)); - - switch (signal) { - case VisitSignal: { - globalSystem->threadVisitor->visit(ip, stack, link); - - System::Thread* t = globalSystem->visitTarget; - globalSystem->visitTarget = 0; - - ACQUIRE_MONITOR(t, globalSystem->visitLock); - globalSystem->visitLock->notifyAll(t); - } break; - - case InterruptSignal: - case PipeSignal: - break; - - default: - abort(); - } -} - -} // namespace - -namespace vm { - -AVIAN_EXPORT System* makeSystem(bool reentrant) -{ - return new (malloc(sizeof(MySystem))) MySystem(reentrant); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/system/posix/crash.cpp b/sgx-jvm/avian/src/system/posix/crash.cpp deleted file mode 100644 index c275e6fb29..0000000000 --- a/sgx-jvm/avian/src/system/posix/crash.cpp +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -namespace avian { -namespace system { - -NO_RETURN void crash() -{ - abort(); -} - -} // namespace system -} // namespace avian diff --git a/sgx-jvm/avian/src/system/posix/memory.cpp b/sgx-jvm/avian/src/system/posix/memory.cpp deleted file mode 100644 index 4b00666bed..0000000000 --- a/sgx-jvm/avian/src/system/posix/memory.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include - -#include "sys/mman.h" - -namespace avian { -namespace system { - -const size_t Memory::PageSize = 1 << 12; - -util::Slice Memory::allocate(size_t sizeInBytes, - Permissions perms) -{ - unsigned prot = 0; - if(perms & Read) { - prot |= PROT_READ; - } - if(perms & Write) { - prot |= PROT_WRITE; - } - if(perms & Execute) { - prot |= PROT_EXEC; - } -#ifdef MAP_32BIT - // map to the lower 32 bits of memory when possible so as to avoid - // expensive relative jumps - const unsigned Extra = MAP_32BIT; -#else - const unsigned Extra = 0; -#endif - - void* p = mmap(0, - sizeInBytes, - prot, - MAP_PRIVATE | MAP_ANON | Extra, - -1, - 0); - - if (p == MAP_FAILED) { - return util::Slice(0, 0); - } else { - return util::Slice(static_cast(p), sizeInBytes); - } -} - -void Memory::free(util::Slice pages) -{ - munmap(const_cast(pages.begin()), pages.count); -} - -} // namespace system -} // namespace avian diff --git a/sgx-jvm/avian/src/system/posix/signal.cpp b/sgx-jvm/avian/src/system/posix/signal.cpp deleted file mode 100644 index 9d8b7c7463..0000000000 --- a/sgx-jvm/avian/src/system/posix/signal.cpp +++ /dev/null @@ -1,227 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "signal.h" -#include "sys/types.h" -#ifdef __APPLE__ -#include "CoreFoundation/CoreFoundation.h" -#include "sys/ucontext.h" -#undef assert -#elif defined(__ANDROID__) -#include /* for sigcontext */ -#include /* for stack_t */ -typedef struct ucontext { - unsigned long uc_flags; - struct ucontext* uc_link; - stack_t uc_stack; - struct sigcontext uc_mcontext; - unsigned long uc_sigmask; -} ucontext_t; -#else -#if defined __FreeBSD__ -#include "limits.h" -#endif -#include "ucontext.h" -#endif - -#include "avian/arch.h" -#include -#include - -namespace avian { -namespace system { - -namespace posix { - -const int InvalidSignal = -1; -const int SegFaultSignal = SIGSEGV; -const unsigned SegFaultSignalIndex = 0; -#ifdef __APPLE__ -const int AltSegFaultSignal = SIGBUS; -#else -const int AltSegFaultSignal = InvalidSignal; -#endif -const unsigned AltSegFaultSignalIndex = 1; -const int DivideByZeroSignal = SIGFPE; -const unsigned DivideByZeroSignalIndex = 2; - -const int signals[] = {SegFaultSignal, AltSegFaultSignal, DivideByZeroSignal}; - -const unsigned SignalCount = 3; -} - -struct SignalRegistrar::Data { - Handler* handlers[posix::SignalCount]; - struct sigaction oldHandlers[posix::SignalCount]; - - bool registerHandler(Handler* handler, int index); - - Data() - { - if (instance) { - crash(); - } - - instance = this; - } - - ~Data() - { - instance = 0; - } - - static SignalRegistrar::Data* instance; -}; - -SignalRegistrar::Data* SignalRegistrar::Data::instance = 0; - -namespace posix { - -using namespace vm; - -void handleSignal(int signal, siginfo_t*, void* context) -{ - ucontext_t* c = static_cast(context); - - void* ip = reinterpret_cast(IP_REGISTER(c)); - void* stack = reinterpret_cast(STACK_REGISTER(c)); - void* thread = reinterpret_cast(THREAD_REGISTER(c)); -#ifdef FRAME_REGISTER - void* frame = reinterpret_cast(FRAME_REGISTER(c)); -#else - void* frame = 0; -#endif - - unsigned index; - - switch (signal) { - case SegFaultSignal: - case AltSegFaultSignal: - case DivideByZeroSignal: { - switch (signal) { - case SegFaultSignal: - index = SegFaultSignalIndex; - break; - - case AltSegFaultSignal: - index = AltSegFaultSignalIndex; - break; - - case DivideByZeroSignal: - index = DivideByZeroSignalIndex; - break; - - default: - crash(); - } - - bool jump = SignalRegistrar::Data::instance->handlers[index]->handleSignal( - &ip, &frame, &stack, &thread); - - if (jump) { - // I'd like to use setcontext here (and get rid of the - // sigprocmask call), but it doesn't work on my Linux x86_64 - // system, and I can't tell from the documentation if it's even - // supposed to work. - - sigset_t set; - sigemptyset(&set); - sigaddset(&set, signal); - pthread_sigmask(SIG_UNBLOCK, &set, 0); - - vmJump(ip, frame, stack, thread, 0, 0); - } else { - crash(); - } - } break; - - default: - crash(); - } -} - -} // namespace posix - -SignalRegistrar::SignalRegistrar() -{ - data = new (malloc(sizeof(Data))) Data(); -} - -SignalRegistrar::~SignalRegistrar() -{ - data->~Data(); - free(data); -} - -bool SignalRegistrar::Data::registerHandler(Handler* handler, int index) -{ - if (handler) { - handlers[index] = handler; - - struct sigaction sa; - memset(&sa, 0, sizeof(struct sigaction)); - sigemptyset(&(sa.sa_mask)); - sa.sa_flags = SA_SIGINFO; - sa.sa_sigaction = posix::handleSignal; - - return sigaction(posix::signals[index], &sa, oldHandlers + index) == 0; - } else if (handlers[index]) { - handlers[index] = 0; - return sigaction(posix::signals[index], oldHandlers + index, 0) == 0; - } else { - return false; - } -} - -bool SignalRegistrar::registerHandler(Signal signal, Handler* handler) -{ - switch (signal) { - case SegFault: - if (!data->registerHandler(handler, posix::SegFaultSignalIndex)) { - return false; - } - if (posix::AltSegFaultSignal != posix::InvalidSignal) { - return data->registerHandler(handler, posix::AltSegFaultSignalIndex); - } else { - return true; - } - case DivideByZero: - return data->registerHandler(handler, posix::DivideByZeroSignalIndex); - default: - crash(); - } -} - -bool SignalRegistrar::unregisterHandler(Signal signal) -{ - switch (signal) { - case SegFault: - if (!data->registerHandler(0, posix::SegFaultSignalIndex)) { - return false; - } - if (posix::AltSegFaultSignal != posix::InvalidSignal) { - return data->registerHandler(0, posix::AltSegFaultSignalIndex); - } else { - return true; - } - case DivideByZero: - return data->registerHandler(0, posix::DivideByZeroSignalIndex); - default: - crash(); - } -} - -void SignalRegistrar::setCrashDumpDirectory(const char*) -{ - // Do nothing, not currently supported on posix -} - -} // namespace system -} // namespace avian diff --git a/sgx-jvm/avian/src/system/sgx.cpp b/sgx-jvm/avian/src/system/sgx.cpp deleted file mode 100644 index 596717786f..0000000000 --- a/sgx-jvm/avian/src/system/sgx.cpp +++ /dev/null @@ -1,719 +0,0 @@ -// (C) 2016 R3 CEV Ltd -// -// Platform implementation for an Intel SGX enclave, which is similar to having no platform at all. - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#define PATH_MAX 256 -#define ACQUIRE(x) MutexResource MAKE_NAME(mutexResource_)(x) - -using namespace vm; -using namespace avian::util; - -// Weak link against the JAR functions that the Avian embedder must provide. -// This lets us look it up at runtime without having it be present in libavian.a -extern "C" __attribute__((weak)) const uint8_t* embedded_file_boot_jar(size_t* size); -extern "C" __attribute__((weak)) const uint8_t* embedded_file_app_jar(size_t* size); - -extern "C" const uint8_t* javahomeJar(size_t* size); - -typedef struct _thread_data_t thread_data_t; -extern "C" __attribute__((weak)) thread_data_t* start_thread(void (*routine)(void *), void *param, sgx_thread_completion *completion); -extern "C" __attribute__((weak)) thread_data_t* get_thread_data(); - -static void run(void* r) -{ - static_cast(r)->run(); -} - -namespace { - class MutexResource { - public: - MutexResource(sgx_thread_mutex_t& m) noexcept : _m(&m) - { - sgx_thread_mutex_lock(_m); - } - - ~MutexResource() noexcept - { - sgx_thread_mutex_unlock(_m); - } - - private: - sgx_thread_mutex_t* _m; - }; - - void abort_with(const char *msg) { - printf("%s\n", msg); - while(true); - } - - class MySystem; - MySystem* globalSystem; - const bool Verbose = false; - const unsigned Notified = 1 << 0; - - class MySystem : public System { - public: - class Thread : public System::Thread { - public: - Thread(System* s, System::Runnable* r) : s(s), r(r), next(0), flags(0) - { - sgx_thread_mutex_init(&mutex, 0); - sgx_thread_cond_init(&condition, 0); - } - - virtual void interrupt() - { - ACQUIRE(mutex); - - r->setInterrupted(true); - - int rv UNUSED = sgx_thread_cond_signal(&condition); - expect(s, rv == 0); - } - - virtual bool getAndClearInterrupted() - { - ACQUIRE(mutex); - - bool interrupted = r->interrupted(); - - r->setInterrupted(false); - - return interrupted; - } - - virtual void join() - { - completion.wait(); - } - - virtual void dispose() - { - sgx_thread_mutex_destroy(&mutex); - sgx_thread_cond_destroy(&condition); - ::free(this); - } - - thread_data_t* thread; - sgx_thread_completion completion; - - /* - * The mutex protects this thread object's internal - * "state", and the condition wakes the thread when - * it is waiting on a monitor lock. - */ - sgx_thread_mutex_t mutex; - sgx_thread_cond_t condition; - - System* s; - System::Runnable* r; - Thread* next; - unsigned flags; - }; - - class Mutex : public System::Mutex { - public: - Mutex(System* s) : s(s) - { - sgx_thread_mutex_init(&mutex, 0); - } - - virtual void acquire() - { - sgx_thread_mutex_lock(&mutex); - } - - virtual void release() - { - sgx_thread_mutex_unlock(&mutex); - } - - virtual void dispose() - { - sgx_thread_mutex_destroy(&mutex); - ::free(this); - } - - private: - System* s; - sgx_thread_mutex_t mutex; - }; - - class Monitor : public System::Monitor { - public: - Monitor(System* s) : s(s), owner_(0), first(0), last(0), depth(0) - { - sgx_thread_mutex_init(&mutex, 0); - } - - virtual bool tryAcquire(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - ++depth; - return true; - } else { - switch (sgx_thread_mutex_trylock(&mutex)) { - case EBUSY: - return false; - - case 0: - owner_ = t; - ++depth; - return true; - - default: - sysAbort(s); - } - } - } - - virtual void acquire(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ != t) { - sgx_thread_mutex_lock(&mutex); - owner_ = t; - } - ++depth; - } - - virtual void release(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - if (--depth == 0) { - owner_ = 0; - sgx_thread_mutex_unlock(&mutex); - } - } else { - sysAbort(s); - } - } - - void append(Thread* t) - { - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } - - if (last) { - expect(s, t != last); - last->next = t; - last = t; - } else { - first = last = t; - } - } - - void remove(Thread* t) - { - Thread* previous = 0; - for (Thread* current = first; current;) { - if (t == current) { - if (current == first) { - first = t->next; - } else { - expect(s, previous != t->next); - previous->next = t->next; - } - - if (current == last) { - last = previous; - } - - t->next = 0; - - break; - } else { - previous = current; - current = current->next; - } - } - - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } - } - - virtual void wait(System::Thread* context, int64_t time) - { - wait(context, time, false); - } - - virtual bool waitAndClearInterrupted(System::Thread* context, int64_t time) - { - return wait(context, time, true); - } - - bool wait(System::Thread* context, int64_t time UNUSED, bool clearInterrupted) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - // Initialized here to make gcc 4.2 a happy compiler - bool interrupted = false; - bool notified = false; - unsigned depth = 0; - - { - ACQUIRE(t->mutex); - - expect(s, (t->flags & Notified) == 0); - - interrupted = t->r->interrupted(); - if (interrupted and clearInterrupted) { - t->r->setInterrupted(false); - } - - append(t); - - depth = this->depth; - this->depth = 0; - owner_ = 0; - sgx_thread_mutex_unlock(&mutex); - - if (not interrupted) { - int rv UNUSED = sgx_thread_cond_wait(&(t->condition), &(t->mutex)); - expect(s, rv == 0 or rv == EINTR); - - interrupted = t->r->interrupted(); - if (interrupted and clearInterrupted) { - t->r->setInterrupted(false); - } - } - - notified = ((t->flags & Notified) != 0); - } - - sgx_thread_mutex_lock(&mutex); - - { - ACQUIRE(t->mutex); - t->flags = 0; - } - - if (not notified) { - remove(t); - } else { -#ifndef NDEBUG - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } -#endif - } - - t->next = 0; - - owner_ = t; - this->depth = depth; - - return interrupted; - } else { - sysAbort(s); - } - } - - void doNotify(Thread* t) - { - ACQUIRE(t->mutex); - - t->flags |= Notified; - int rv UNUSED = sgx_thread_cond_signal(&(t->condition)); - expect(s, rv == 0); - } - - virtual void notify(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - if (first) { - Thread* t = first; - first = first->next; - if (t == last) { - expect(s, first == 0); - last = 0; - } - - doNotify(t); - } - } else { - sysAbort(s); - } - } - - virtual void notifyAll(System::Thread* context) - { - Thread* t = static_cast(context); - - if (owner_ == t) { - for (Thread* t = first; t; t = t->next) { - doNotify(t); - } - first = last = 0; - } else { - sysAbort(s); - } - } - - virtual System::Thread* owner() - { - return owner_; - } - - virtual void dispose() - { - expect(s, owner_ == 0); - sgx_thread_mutex_destroy(&mutex); - ::free(this); - } - - private: - System* s; - sgx_thread_mutex_t mutex; - Thread* owner_; - Thread* first; - Thread* last; - unsigned depth; - }; - - // This implementation of thread-local storage - // for SGX only works because we only create - // one instance of this class. - class Local : public System::Local { - public: - Local(System* s) : s(s) - { - } - - virtual void* get() - { - return data; - } - - virtual void set(void* p) - { - expect(s, data == NULL); - data = p; - } - - virtual void dispose() - { - ::free(this); - } - - private: - System* s; - // Requires __get_tls_addr() in libsgx_trts - static thread_local void *data; - }; - - class Region : public System::Region { - public: - Region(System* s, uint8_t* start, size_t length) - : s(s), start_(start), length_(length) - { - } - - virtual const uint8_t* start() - { - return start_; - } - - virtual size_t length() - { - return length_; - } - - virtual void dispose() - { - if (start_) { - printf("STUB: munmap\n"); - //munmap(start_, length_); - } - ::free(this); - } - - private: - System* s; - uint8_t* start_; - size_t length_; - }; - - class Directory : public System::Directory { - public: - Directory(System* s, void* directory UNUSED) : s(s) - { - } - - virtual const char* next() - { - return 0; - } - - virtual void dispose() - { - ::free(this); - } - - System* s; - }; - - class Library : public System::Library { - public: - Library(System* s UNUSED) : next_(0) {} - - virtual void* resolve(const char* function) - { - const void *ptr = NULL; - if (!strcmp(function, "embedded_file_boot_jar")) { - return (void *) &embedded_file_boot_jar; - } if (!strcmp(function, "embedded_file_app_jar")) { - return (void *) &embedded_file_app_jar; - } if (!strcmp(function, "javahomeJar")) { - return (void *) &javahomeJar; - } else if ((ptr = dlsym(NULL, function))) { - return (void *) ptr; - } else { - // If you seem to be hitting a JNI call you're sure should exist, try uncommenting this. - // It is expected that some resolutions won't work as multiple names are tried for each - // native call, which is why we don't spam them all to the logs here. - // - // printf("Could not resolve file/function %s, check dispatch tables\n", function); - return NULL; - } - } - - virtual const char* name() - { - return "main"; - } - - virtual System::Library* next() - { - return next_; - } - - virtual void setNext(System::Library* lib) - { - next_ = lib; - } - - virtual void disposeAll() - { - if (next_) { - next_->disposeAll(); - } - - ::free(this); - } - - private: - System* s; - System::Library* next_; - }; - - MySystem(bool reentrant) : reentrant(reentrant), threadVisitor(0), visitTarget(0) - { - if (not reentrant) { - expect(this, globalSystem == 0); - globalSystem = this; - expect(this, make(&visitLock) == 0); - } - } - - bool unregisterHandler(int index UNUSED) - { - return true; - } - - // Returns true on success, false on failure - bool registerHandler(int index UNUSED) - { - printf("System::registerHandler(%d)\n", index); - return true; - } - - virtual void* tryAllocate(size_t sizeInBytes) - { - return malloc(sizeInBytes); - } - - virtual void free(const void* p) - { - if (p) - ::free(const_cast(p)); - } - - virtual bool success(Status s) { - return s == 0; - } - - virtual Status attach(Runnable* r) - { - // This system thread will never be joined because it was not - // created using startThread() and so does not have JoinFlag set. - Thread* t = new (allocate(this, sizeof(Thread))) Thread(this, r); - t->thread = get_thread_data(); - r->attach(t); - return 0; - } - - virtual Status start(Runnable* r) - { - Thread* t = new (allocate(this, sizeof(Thread))) Thread(this, r); - r->attach(t); - t->thread = start_thread(&run, r, &t->completion); - return 0; - } - - virtual Status make(System::Mutex** m) - { - *m = new (allocate(this, sizeof(Mutex))) Mutex(this); - return 0; - } - - virtual Status make(System::Monitor** m) - { - *m = new (allocate(this, sizeof(Monitor))) Monitor(this); - return 0; - } - - virtual Status make(System::Local** l) - { - *l = new (allocate(this, sizeof(Local))) Local(this); - return 0; - } - - virtual Status visit(System::Thread* st UNUSED, - System::Thread* sTarget UNUSED, - ThreadVisitor* visitor UNUSED) - { - printf("System::visit (threads)\n"); - return 0; - } - - virtual Status map(System::Region** region UNUSED, const char* name) - { - printf("System::map(%s)\n", name); - return 0; - } - - virtual Status open(System::Directory** directory UNUSED, const char* name) - { - printf("System::open(%s)\n", name); - return 1; - } - - virtual FileType stat(const char* name, size_t* length) - { - // Avian does a stat on the current directory during startup but doesn't seem to care about the result, - // so suppress stub logging of stat(".") - if (strcmp(name, ".")) - printf("System::stat(%s)\n", name); - *length = 0; - return TypeDoesNotExist; - } - - virtual const char* libraryPrefix() - { - return SO_PREFIX; - } - - virtual const char* librarySuffix() - { - return SO_SUFFIX; - } - - virtual const char* toAbsolutePath(AllocOnly* allocator, const char* name) - { - return copy(allocator, name); - } - - virtual Status load(System::Library** lib, const char* name) - { - if (name != NULL) { - printf("System::load(%s)", name); - while(1); - } - - // Request to get a System::Library for the main process. - *lib = new (allocate(this, sizeof(Library))) Library(this); - return 0; - } - - virtual char pathSeparator() - { - return ':'; - } - - virtual char fileSeparator() - { - return '/'; - } - - virtual int64_t now() - { - timeval tv = {0, 0}; - gettimeofday(&tv, 0); - return (static_cast(tv.tv_sec) * 1000) + (static_cast(tv.tv_usec) / 1000); - } - - virtual void yield() - { - - } - - virtual void exit(int code UNUSED) - { - abort_with("exit()"); - } - - virtual void abort() - { - abort_with("abort!"); - } - - virtual void dispose() - { - if (not reentrant) { - visitLock->dispose(); - globalSystem = 0; - } - - ::free(this); - } - - bool reentrant; - ThreadVisitor* threadVisitor; - Thread* visitTarget; - System::Monitor* visitLock; - }; - - thread_local void* MySystem::Local::data; -} // namespace - -namespace vm { - AVIAN_EXPORT System* makeSystem(bool reentrant) - { - return new (malloc(sizeof(MySystem))) MySystem(reentrant); - } -} // namespace vm diff --git a/sgx-jvm/avian/src/system/sgx/memory.cpp b/sgx-jvm/avian/src/system/sgx/memory.cpp deleted file mode 100644 index b91f84da50..0000000000 --- a/sgx-jvm/avian/src/system/sgx/memory.cpp +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -namespace avian { - namespace system { - util::Slice Memory::allocate(size_t sizeInBytes, Permissions) - { - void* p = malloc(sizeInBytes); - - if (p == NULL) { - return util::Slice(0, 0); - } else { - return util::Slice(static_cast(p), sizeInBytes); - } - } - - void Memory::free(util::Slice slice) - { - ::free(slice.begin()); - } - - } // namespace system -} // namespace avian diff --git a/sgx-jvm/avian/src/system/sgx/signal.cpp b/sgx-jvm/avian/src/system/sgx/signal.cpp deleted file mode 100644 index dcb02686e1..0000000000 --- a/sgx-jvm/avian/src/system/sgx/signal.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "avian/arch.h" -#include -#include - -extern "C" { - void debug_print(const char *msg); -} - -namespace avian { - namespace system { - SignalRegistrar::SignalRegistrar() - { - } - - SignalRegistrar::~SignalRegistrar() - { - } - - bool SignalRegistrar::registerHandler(Signal signal UNUSED, Handler* handler UNUSED) - { - return true; - } - - bool SignalRegistrar::unregisterHandler(Signal signal UNUSED) - { - return true; - } - - void SignalRegistrar::setCrashDumpDirectory(const char*) - { - } - } // namespace system -} // namespace avian - diff --git a/sgx-jvm/avian/src/system/windows.cpp b/sgx-jvm/avian/src/system/windows.cpp deleted file mode 100644 index 5833c28274..0000000000 --- a/sgx-jvm/avian/src/system/windows.cpp +++ /dev/null @@ -1,1033 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "sys/stat.h" -#include "windows.h" - -#ifdef _MSC_VER -#define S_ISREG(x) ((x)&_S_IFREG) -#define S_ISDIR(x) ((x)&_S_IFDIR) -#define FTIME _ftime_s -#else -#define FTIME _ftime -#endif - -#undef max -#undef min - -#include "avian/arch.h" -#include -#include -#include -#include - -#if defined(WINAPI_FAMILY) - -#if !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - -#define WaitForSingleObject(hHandle, dwMilliseconds) \ - WaitForSingleObjectEx((hHandle), (dwMilliseconds), FALSE) - -#define CreateEvent(lpEventAttributes, bManualReset, bInitialState, lpName) \ - CreateEventEx((lpEventAttributes), \ - (lpName), \ - ((bManualReset) ? CREATE_EVENT_MANUAL_RESET : 0) \ - | ((bInitialState) ? CREATE_EVENT_INITIAL_SET : 0), \ - EVENT_ALL_ACCESS) - -#define CreateMutex(lpEventAttributes, bInitialOwner, lpName) \ - CreateMutexEx((lpEventAttributes), \ - (lpName), \ - (bInitialOwner) ? CREATE_MUTEX_INITIAL_OWNER : 0, \ - MUTEX_ALL_ACCESS) - -#include "thread-emulation.h" - -#endif - -#if defined(WINAPI_PARTITION_PHONE) \ - && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE) -// Headers in Windows Phone 8 DevKit contain severe error, so let's define -// needed functions on our own -extern "C" { -WINBASEAPI -_Ret_maybenull_ HANDLE WINAPI - CreateFileMappingFromApp(_In_ HANDLE hFile, - _In_opt_ PSECURITY_ATTRIBUTES SecurityAttributes, - _In_ ULONG PageProtection, - _In_ ULONG64 MaximumSize, - _In_opt_ PCWSTR Name); - -WINBASEAPI -_Ret_maybenull_ __out_data_source(FILE) PVOID WINAPI - MapViewOfFileFromApp(_In_ HANDLE hFileMappingObject, - _In_ ULONG DesiredAccess, - _In_ ULONG64 FileOffset, - _In_ SIZE_T NumberOfBytesToMap); - -WINBASEAPI -BOOL WINAPI UnmapViewOfFile(_In_ LPCVOID lpBaseAddress); -} -#endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_PHONE) - -#else - -#ifndef WINAPI_PARTITION_DESKTOP -#define WINAPI_PARTITION_DESKTOP 1 -#endif - -#ifndef WINAPI_FAMILY_PARTITION -#define WINAPI_FAMILY_PARTITION(x) (x) -#endif - -#endif - -#define ACQUIRE(s, x) MutexResource MAKE_NAME(mutexResource_)(s, x) - -using namespace vm; - -namespace { - -class MutexResource { - public: - MutexResource(System* s, HANDLE m) : s(s), m(m) - { - int r UNUSED = WaitForSingleObject(m, INFINITE); - assertT(s, r == WAIT_OBJECT_0); - } - - ~MutexResource() - { - bool success UNUSED = ReleaseMutex(m); - assertT(s, success); - } - - private: - System* s; - HANDLE m; -}; - -class MySystem; -MySystem* globalSystem; - -DWORD WINAPI run(void* r) -{ - static_cast(r)->run(); - return 0; -} - -const bool Verbose = false; - -const unsigned Waiting = 1 << 0; -const unsigned Notified = 1 << 1; - -class MySystem : public System { - public: - class Thread : public System::Thread { - public: - Thread(System* s, System::Runnable* r) : s(s), r(r), next(0), flags(0) - { - mutex = CreateMutex(0, false, 0); - assertT(s, mutex); - - event = CreateEvent(0, true, false, 0); - assertT(s, event); - } - - virtual void interrupt() - { - ACQUIRE(s, mutex); - - r->setInterrupted(true); - - if (flags & Waiting) { - int r UNUSED = SetEvent(event); - assertT(s, r != 0); - } - } - - virtual bool getAndClearInterrupted() - { - ACQUIRE(s, mutex); - - bool interrupted = r->interrupted(); - - r->setInterrupted(false); - - return interrupted; - } - - virtual void join() - { - int r UNUSED = WaitForSingleObject(thread, INFINITE); - assertT(s, r == WAIT_OBJECT_0); - } - - virtual void dispose() - { - CloseHandle(event); - CloseHandle(mutex); - CloseHandle(thread); - ::free(this); - } - - HANDLE thread; - HANDLE mutex; - HANDLE event; - System* s; - System::Runnable* r; - Thread* next; - unsigned flags; - }; - - class Mutex : public System::Mutex { - public: - Mutex(System* s) : s(s) - { - mutex = CreateMutex(0, false, 0); - assertT(s, mutex); - } - - virtual void acquire() - { - int r UNUSED = WaitForSingleObject(mutex, INFINITE); - assertT(s, r == WAIT_OBJECT_0); - } - - virtual void release() - { - bool success UNUSED = ReleaseMutex(mutex); - assertT(s, success); - } - - virtual void dispose() - { - CloseHandle(mutex); - ::free(this); - } - - System* s; - HANDLE mutex; - }; - - class Monitor : public System::Monitor { - public: - Monitor(System* s) : s(s), owner_(0), first(0), last(0), depth(0) - { - mutex = CreateMutex(0, false, 0); - assertT(s, mutex); - } - - virtual bool tryAcquire(System::Thread* context) - { - Thread* t = static_cast(context); - assertT(s, t); - - if (owner_ == t) { - ++depth; - return true; - } else { - switch (WaitForSingleObject(mutex, 0)) { - case WAIT_TIMEOUT: - return false; - - case WAIT_OBJECT_0: - owner_ = t; - ++depth; - return true; - - default: - sysAbort(s); - } - } - } - - virtual void acquire(System::Thread* context) - { - Thread* t = static_cast(context); - assertT(s, t); - - if (owner_ != t) { - int r UNUSED = WaitForSingleObject(mutex, INFINITE); - assertT(s, r == WAIT_OBJECT_0); - owner_ = t; - } - ++depth; - } - - virtual void release(System::Thread* context) - { - Thread* t = static_cast(context); - assertT(s, t); - - if (owner_ == t) { - if (--depth == 0) { - owner_ = 0; - bool success UNUSED = ReleaseMutex(mutex); - assertT(s, success); - } - } else { - sysAbort(s); - } - } - - void append(Thread* t) - { -#ifndef NDEBUG - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } -#endif - - if (last) { - last->next = t; - last = t; - } else { - first = last = t; - } - } - - void remove(Thread* t) - { - Thread* previous = 0; - for (Thread* current = first; current;) { - if (t == current) { - if (current == first) { - first = t->next; - } else { - previous->next = t->next; - } - - if (current == last) { - last = previous; - } - - t->next = 0; - - break; - } else { - previous = current; - current = current->next; - } - } - -#ifndef NDEBUG - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } -#endif - } - - virtual void wait(System::Thread* context, int64_t time) - { - wait(context, time, false); - } - - virtual bool waitAndClearInterrupted(System::Thread* context, int64_t time) - { - return wait(context, time, true); - } - - bool wait(System::Thread* context, int64_t time, bool clearInterrupted) - { - Thread* t = static_cast(context); - assertT(s, t); - - if (owner_ == t) { - // Initialized here to make gcc 4.2 a happy compiler - bool interrupted = false; - bool notified = false; - unsigned depth = 0; - - int r UNUSED; - - { - ACQUIRE(s, t->mutex); - - expect(s, (t->flags & Notified) == 0); - - interrupted = t->r->interrupted(); - if (interrupted and clearInterrupted) { - t->r->setInterrupted(false); - } - - t->flags |= Waiting; - - append(t); - - depth = this->depth; - this->depth = 0; - owner_ = 0; - - bool success UNUSED = ReleaseMutex(mutex); - assertT(s, success); - - if (not interrupted) { - success = ResetEvent(t->event); - assertT(s, success); - - success = ReleaseMutex(t->mutex); - assertT(s, success); - - r = WaitForSingleObject(t->event, (time ? time : INFINITE)); - assertT(s, r == WAIT_OBJECT_0 or r == WAIT_TIMEOUT); - - r = WaitForSingleObject(t->mutex, INFINITE); - assertT(s, r == WAIT_OBJECT_0); - - interrupted = t->r->interrupted(); - if (interrupted and clearInterrupted) { - t->r->setInterrupted(false); - } - } - - notified = ((t->flags & Notified) != 0); - } - - r = WaitForSingleObject(mutex, INFINITE); - assertT(s, r == WAIT_OBJECT_0); - - { - ACQUIRE(s, t->mutex); - t->flags = 0; - } - - if (not notified) { - remove(t); - } else { -#ifndef NDEBUG - for (Thread* x = first; x; x = x->next) { - expect(s, t != x); - } -#endif - } - - t->next = 0; - - owner_ = t; - this->depth = depth; - - return interrupted; - } else { - sysAbort(s); - } - } - - void doNotify(Thread* t) - { - ACQUIRE(s, t->mutex); - - t->flags |= Notified; - - bool success UNUSED = SetEvent(t->event); - assertT(s, success); - } - - virtual void notify(System::Thread* context) - { - Thread* t = static_cast(context); - assertT(s, t); - - if (owner_ == t) { - if (first) { - Thread* t = first; - first = first->next; - if (t == last) { - expect(s, first == 0); - last = 0; - } - - doNotify(t); - } - } else { - sysAbort(s); - } - } - - virtual void notifyAll(System::Thread* context) - { - Thread* t = static_cast(context); - assertT(s, t); - - if (owner_ == t) { - for (Thread* t = first; t; t = t->next) { - doNotify(t); - } - first = last = 0; - } else { - sysAbort(s); - } - } - - virtual System::Thread* owner() - { - return owner_; - } - - virtual void dispose() - { - assertT(s, owner_ == 0); - CloseHandle(mutex); - ::free(this); - } - - System* s; - HANDLE mutex; - Thread* owner_; - Thread* first; - Thread* last; - unsigned depth; - }; - - class Local : public System::Local { - public: - Local(System* s) : s(s) - { - key = TlsAlloc(); - assertT(s, key != TLS_OUT_OF_INDEXES); - } - - virtual void* get() - { - return TlsGetValue(key); - } - - virtual void set(void* p) - { - bool r UNUSED = TlsSetValue(key, p); - assertT(s, r); - } - - virtual void dispose() - { - bool r UNUSED = TlsFree(key); - assertT(s, r); - - ::free(this); - } - - System* s; - unsigned key; - }; - - class Region : public System::Region { - public: - Region(System* system, - uint8_t* start, - size_t length, - HANDLE mapping, - HANDLE file) - : system(system), - start_(start), - length_(length), - mapping(mapping), - file(file) - { - } - - virtual const uint8_t* start() - { - return start_; - } - - virtual size_t length() - { - return length_; - } - - virtual void dispose() - { - if (start_) { - if (start_) - UnmapViewOfFile(start_); - if (mapping) - CloseHandle(mapping); - if (file) - CloseHandle(file); - } - system->free(this); - } - - System* system; - uint8_t* start_; - size_t length_; - HANDLE mapping; - HANDLE file; - }; - - class Directory : public System::Directory { - public: - Directory(System* s) : s(s), handle(0), findNext(false) - { - } - - virtual const char* next() - { - if (handle and handle != INVALID_HANDLE_VALUE) { - if (findNext) { - if (FindNextFile(handle, &data)) { - return data.cFileName; - } - } else { - findNext = true; - return data.cFileName; - } - } - return 0; - } - - virtual void dispose() - { - if (handle and handle != INVALID_HANDLE_VALUE) { - FindClose(handle); - } - ::free(this); - } - - System* s; - HANDLE handle; - WIN32_FIND_DATA data; - bool findNext; - }; - - class Library : public System::Library { - public: - Library(System* s, HMODULE handle, const char* name) - : s(s), handle(handle), name_(name), next_(0) - { - } - - virtual void* resolve(const char* function) - { - void* address; - FARPROC p = GetProcAddress(handle, function); - memcpy(&address, &p, BytesPerWord); - return address; - } - - virtual const char* name() - { - return name_; - } - - virtual System::Library* next() - { - return next_; - } - - virtual void setNext(System::Library* lib) - { - next_ = lib; - } - - virtual void disposeAll() - { - if (Verbose) { - fprintf(stderr, "close %p\n", handle); - fflush(stderr); - } - - if (name_) { - FreeLibrary(handle); - } - - if (next_) { - next_->disposeAll(); - } - - if (name_) { - ::free(const_cast(name_)); - } - - ::free(this); - } - - System* s; - HMODULE handle; - const char* name_; - System::Library* next_; - }; - - MySystem(bool reentrant): reentrant(reentrant) - { - if (not reentrant) { - expect(this, globalSystem == 0); - globalSystem = this; - } - - mutex = CreateMutex(0, false, 0); - assertT(this, mutex); - } - - virtual void* tryAllocate(size_t sizeInBytes) - { - return malloc(sizeInBytes); - } - - virtual void free(const void* p) - { - if (p) - ::free(const_cast(p)); - } - - virtual bool success(Status s) { - return s == 0; - } - - virtual Status attach(Runnable* r) - { - Thread* t = new (allocate(this, sizeof(Thread))) Thread(this, r); - bool success UNUSED = DuplicateHandle(GetCurrentProcess(), - GetCurrentThread(), - GetCurrentProcess(), - &(t->thread), - 0, - false, - DUPLICATE_SAME_ACCESS); - assertT(this, success); - r->attach(t); - return 0; - } - - virtual Status start(Runnable* r) - { - Thread* t = new (allocate(this, sizeof(Thread))) Thread(this, r); - r->attach(t); - DWORD id; - t->thread = CreateThread(0, 0, run, r, 0, &id); - assertT(this, t->thread); - return 0; - } - - virtual Status make(System::Mutex** m) - { - *m = new (allocate(this, sizeof(Mutex))) Mutex(this); - return 0; - } - - virtual Status make(System::Monitor** m) - { - *m = new (allocate(this, sizeof(Monitor))) Monitor(this); - return 0; - } - - virtual Status make(System::Local** l) - { - *l = new (allocate(this, sizeof(Local))) Local(this); - return 0; - } - - virtual Status visit(System::Thread* st UNUSED, - System::Thread* sTarget, - ThreadVisitor* visitor) - { -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - assertT(this, st != sTarget); - - Thread* target = static_cast(sTarget); - - ACQUIRE(this, mutex); - - bool success = false; - int rv = SuspendThread(target->thread); - if (rv != -1) { - CONTEXT context; - memset(&context, 0, sizeof(CONTEXT)); - context.ContextFlags = CONTEXT_CONTROL; - rv = GetThreadContext(target->thread, &context); - - if (rv) { -#ifdef ARCH_x86_32 - visitor->visit(reinterpret_cast(context.Eip), - reinterpret_cast(context.Esp), - reinterpret_cast(context.Ebp)); -#elif defined ARCH_x86_64 - visitor->visit(reinterpret_cast(context.Rip), - reinterpret_cast(context.Rsp), - reinterpret_cast(context.Rbp)); -#endif - success = true; - } - - rv = ResumeThread(target->thread); - expect(this, rv != -1); - } - - return (success ? 0 : 1); -#else -#pragma message( \ - "TODO: http://msdn.microsoft.com/en-us/library/windowsphone/develop/system.windows.application.unhandledexception(v=vs.105).aspx") - return false; -#endif - } - - virtual Status map(System::Region** region, const char* name) - { - Status status = 1; - size_t nameLen = strlen(name) * 2; - RUNTIME_ARRAY(wchar_t, wideName, nameLen + 1); - MultiByteToWideChar( - CP_UTF8, 0, name, -1, RUNTIME_ARRAY_BODY(wideName), nameLen + 1); -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - HANDLE file = CreateFileW(RUNTIME_ARRAY_BODY(wideName), - FILE_READ_DATA, - FILE_SHARE_READ, - 0, - OPEN_EXISTING, - 0, - 0); -#else - HANDLE file = CreateFile2(RUNTIME_ARRAY_BODY(wideName), - GENERIC_READ, - FILE_SHARE_READ, - OPEN_EXISTING, - 0); -#endif - if (file != INVALID_HANDLE_VALUE) { -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - unsigned size = GetFileSize(file, 0); -#else - FILE_STANDARD_INFO info; - unsigned size = INVALID_FILE_SIZE; - if (GetFileInformationByHandleEx( - file, FileStandardInfo, &info, sizeof(info))) - size = info.EndOfFile.QuadPart; -#endif - if (size != INVALID_FILE_SIZE) { -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - HANDLE mapping = CreateFileMapping(file, 0, PAGE_READONLY, 0, size, 0); -#else - HANDLE mapping - = CreateFileMappingFromApp(file, 0, PAGE_READONLY, size, 0); -#endif - if (mapping) { -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - void* data = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0); -#else - void* data = MapViewOfFileFromApp(mapping, FILE_MAP_READ, 0, 0); -#endif - if (data) { - *region = new (allocate(this, sizeof(Region))) - Region(this, static_cast(data), size, file, mapping); - status = 0; - } - - if (status) { - CloseHandle(mapping); - } - } - } - - if (status) { - CloseHandle(file); - } - } - - return status; - } - - virtual Status open(System::Directory** directory, const char* name) - { - Status status = 1; - - unsigned length = strlen(name); - RUNTIME_ARRAY(char, buffer, length + 3); - memcpy(RUNTIME_ARRAY_BODY(buffer), name, length); - memcpy(RUNTIME_ARRAY_BODY(buffer) + length, "\\*", 3); - - Directory* d = new (allocate(this, sizeof(Directory))) Directory(this); - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - d->handle = FindFirstFile(RUNTIME_ARRAY_BODY(buffer), &(d->data)); -#else - d->handle = FindFirstFileEx(RUNTIME_ARRAY_BODY(buffer), - FindExInfoStandard, - &(d->data), - FindExSearchNameMatch, - 0, - 0); -#endif - if (d->handle == INVALID_HANDLE_VALUE) { - d->dispose(); - } else { - *directory = d; - status = 0; - } - - return status; - } - - virtual FileType stat(const char* name, size_t* length) - { - size_t nameLen = strlen(name) * 2; - RUNTIME_ARRAY(wchar_t, wideName, nameLen + 1); - MultiByteToWideChar( - CP_UTF8, 0, name, -1, RUNTIME_ARRAY_BODY(wideName), nameLen + 1); - WIN32_FILE_ATTRIBUTE_DATA data; - if (GetFileAttributesExW( - RUNTIME_ARRAY_BODY(wideName), GetFileExInfoStandard, &data)) { - if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - return TypeDirectory; - } else { - *length = (data.nFileSizeHigh * static_cast(MAXDWORD + 1)) - + data.nFileSizeLow; - return TypeFile; - } - } else { - return TypeDoesNotExist; - } - } - - virtual const char* libraryPrefix() - { - return SO_PREFIX; - } - - virtual const char* librarySuffix() - { - return SO_SUFFIX; - } - - virtual const char* toAbsolutePath(avian::util::AllocOnly* allocator, - const char* name) - { -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - if (strncmp(name, "//", 2) == 0 or strncmp(name, "\\\\", 2) == 0 - or strncmp(name + 1, ":/", 2) == 0 - or strncmp(name + 1, ":\\", 2) == 0) { - return copy(allocator, name); - } else { - TCHAR buffer[MAX_PATH]; - GetCurrentDirectory(MAX_PATH, buffer); - return append(allocator, buffer, "\\", name); - } -#else -#pragma message( \ - "TODO:http://lunarfrog.com/blog/2012/05/21/winrt-folders-access/ Windows.ApplicationModel.Package.Current.InstalledLocation") - return copy(allocator, name); -#endif - } - - virtual Status load(System::Library** lib, const char* name) - { - HMODULE handle; - unsigned nameLength = (name ? strlen(name) : 0); - if (name) { - size_t nameLen = nameLength * 2; - RUNTIME_ARRAY(wchar_t, wideName, nameLen + 1); - MultiByteToWideChar( - CP_UTF8, 0, name, -1, RUNTIME_ARRAY_BODY(wideName), nameLen + 1); - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - handle = LoadLibraryW(RUNTIME_ARRAY_BODY(wideName)); -#else - handle = LoadPackagedLibrary(RUNTIME_ARRAY_BODY(wideName), 0); -#endif - } else { -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - handle = GetModuleHandle(0); -#else - // Most of WinRT/WP8 applications can not host native object files inside - // main executable - assertT(this, false); -#endif - } - - if (handle) { - if (Verbose) { - fprintf(stderr, "open %s as %p\n", name, handle); - fflush(stderr); - } - - char* n; - if (name) { - n = static_cast(allocate(this, nameLength + 1)); - memcpy(n, name, nameLength + 1); - } else { - n = 0; - } - - *lib = new (allocate(this, sizeof(Library))) Library(this, handle, n); - - return 0; - } else { - if (Verbose) { - fprintf(stderr, "unable to open %s: %ld\n", name, GetLastError()); - fflush(stderr); - } - - return 1; - } - } - - virtual char pathSeparator() - { - return ';'; - } - - virtual char fileSeparator() - { - return '\\'; - } - - virtual int64_t now() - { - // We used to use _ftime here, but that only gives us 1-second - // resolution on Windows 7. _ftime_s might work better, but MinGW - // doesn't have it as of this writing. So we use this mess instead: - FILETIME time; - GetSystemTimeAsFileTime(&time); - return (((static_cast(time.dwHighDateTime) << 32) - | time.dwLowDateTime) / 10000) - 11644473600000LL; - } - - virtual void yield() - { -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - SwitchToThread(); -#else - YieldProcessor(); -#endif - } - - virtual void exit(int code) - { - ::exit(code); - } - - virtual void abort() - { - avian::system::crash(); - } - - virtual void dispose() - { - if (not reentrant) { - globalSystem = 0; - } - - CloseHandle(mutex); - ::free(this); - } - - HANDLE mutex; - bool reentrant; -}; - -} // namespace - -namespace vm { - -AVIAN_EXPORT System* makeSystem(bool reentrant) -{ - return new (malloc(sizeof(MySystem))) MySystem(reentrant); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/system/windows/crash.cpp b/sgx-jvm/avian/src/system/windows/crash.cpp deleted file mode 100644 index 16ea717b72..0000000000 --- a/sgx-jvm/avian/src/system/windows/crash.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -namespace avian { -namespace system { - -NO_RETURN void crash() -{ - // trigger an EXCEPTION_ACCESS_VIOLATION, which we will catch and - // generate a debug dump for - *static_cast(0) = 0; - - // Some (all?) compilers don't realize that we can't possibly continue past - // the above statement. - abort(); -} - -} // namespace system -} // namespace avian diff --git a/sgx-jvm/avian/src/system/windows/memory.cpp b/sgx-jvm/avian/src/system/windows/memory.cpp deleted file mode 100644 index c6d33053ca..0000000000 --- a/sgx-jvm/avian/src/system/windows/memory.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include - -#include - -namespace avian { -namespace system { - -const size_t Memory::PageSize = 1 << 12; - -util::Slice Memory::allocate(size_t sizeInBytes, - Permissions perms) -{ - unsigned prot; - switch(perms) { - case Read: - prot = PAGE_READONLY; - break; - case ReadWrite: - prot = PAGE_READWRITE; - break; - case ReadExecute: - prot = PAGE_EXECUTE_READ; - break; - case ReadWriteExecute: - prot = PAGE_EXECUTE_READWRITE; - break; - default: - UNREACHABLE_; - } - void* ret = VirtualAlloc( - 0, sizeInBytes, MEM_COMMIT | MEM_RESERVE, prot); - return util::Slice((uint8_t*)ret, sizeInBytes); -} - -void Memory::free(util::Slice pages) -{ - int r = VirtualFree(pages.begin(), 0, MEM_RELEASE); - (void) r; - ASSERT(r); -} - -} // namespace system -} // namespace avian diff --git a/sgx-jvm/avian/src/system/windows/signal.cpp b/sgx-jvm/avian/src/system/windows/signal.cpp deleted file mode 100644 index 66e1cd1f8d..0000000000 --- a/sgx-jvm/avian/src/system/windows/signal.cpp +++ /dev/null @@ -1,343 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "windows.h" -#include "sys/timeb.h" - -#ifdef _MSC_VER -#define FTIME _ftime_s -#else -#define FTIME _ftime -#endif - -#ifndef WINAPI_FAMILY - -#ifndef WINAPI_PARTITION_DESKTOP -#define WINAPI_PARTITION_DESKTOP 1 -#endif - -#ifndef WINAPI_FAMILY_PARTITION -#define WINAPI_FAMILY_PARTITION(x) (x) -#endif - -#endif - -#include -#include - -namespace avian { -namespace system { - -namespace windows { - -const unsigned HandlerCount = 2; - -} // namespace windows - -struct SignalRegistrar::Data { - Handler* handlers[windows::HandlerCount]; - const char* crashDumpDirectory; - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - LPTOP_LEVEL_EXCEPTION_FILTER oldHandler; -#endif - - Data() - : crashDumpDirectory(0), -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - oldHandler(0) -#endif - { - if (instance) { - crash(); - } - instance = this; - memset(handlers, 0, sizeof(handlers)); - } - - ~Data() - { - instance = 0; - } - - bool registerHandler(Handler* handler, int index); - - bool findHandler() - { - for (unsigned i = 0; i < windows::HandlerCount; ++i) { - if (handlers[i]) - return true; - } - return false; - } - - static SignalRegistrar::Data* instance; -}; - -SignalRegistrar::Data* SignalRegistrar::Data::instance = 0; - -namespace windows { - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - -#pragma pack(push, 4) -struct MINIDUMP_EXCEPTION_INFORMATION { - DWORD thread; - LPEXCEPTION_POINTERS exception; - BOOL exceptionInCurrentAddressSpace; -}; -#pragma pack(pop) - -struct MINIDUMP_USER_STREAM_INFORMATION; -struct MINIDUMP_CALLBACK_INFORMATION; - -enum MINIDUMP_TYPE { MiniDumpNormal = 0, MiniDumpWithFullMemory = 2 }; - -typedef BOOL (*MiniDumpWriteDumpType)( - HANDLE processHandle, - DWORD processId, - HANDLE file, - MINIDUMP_TYPE type, - const MINIDUMP_EXCEPTION_INFORMATION* exception, - const MINIDUMP_USER_STREAM_INFORMATION* userStream, - const MINIDUMP_CALLBACK_INFORMATION* callback); - -#endif - -void dump(LPEXCEPTION_POINTERS e, const char* directory) -{ - HINSTANCE dbghelp = LoadLibrary("dbghelp.dll"); - - if (dbghelp) { - MiniDumpWriteDumpType MiniDumpWriteDump - = reinterpret_cast( - GetProcAddress(dbghelp, "MiniDumpWriteDump")); - - if (MiniDumpWriteDump) { - char name[MAX_PATH]; - _timeb tb; - FTIME(&tb); - vm::snprintf(name, - MAX_PATH, - "%s\\crash-%" LLD ".mdmp", - directory, - (static_cast(tb.time) * 1000) - + static_cast(tb.millitm)); - - HANDLE file - = CreateFile(name, FILE_WRITE_DATA, 0, 0, CREATE_ALWAYS, 0, 0); - - if (file != INVALID_HANDLE_VALUE) { - MINIDUMP_EXCEPTION_INFORMATION exception - = {GetCurrentThreadId(), e, true}; - - MiniDumpWriteDump(GetCurrentProcess(), - GetCurrentProcessId(), - file, - MiniDumpWithFullMemory, - &exception, - 0, - 0); - - CloseHandle(file); - } - } - - FreeLibrary(dbghelp); - } -} - -void logException(LPEXCEPTION_POINTERS e, const char* directory) -{ - char name[MAX_PATH]; - _timeb tb; - FTIME(&tb); - vm::snprintf(name, MAX_PATH, "%s\\exceptions.txt", directory); - - FILE* log = vm::fopen(name, "ab"); - if (log) { -#ifdef ARCH_x86_32 - void* ip = reinterpret_cast(e->ContextRecord->Eip); - void* base = reinterpret_cast(e->ContextRecord->Ebp); - void* stack = reinterpret_cast(e->ContextRecord->Esp); - void* thread = reinterpret_cast(e->ContextRecord->Ebx); -#elif defined ARCH_x86_64 - void* ip = reinterpret_cast(e->ContextRecord->Rip); - void* base = reinterpret_cast(e->ContextRecord->Rbp); - void* stack = reinterpret_cast(e->ContextRecord->Rsp); - void* thread = reinterpret_cast(e->ContextRecord->Rbx); -#endif - - HMODULE module; - if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, - static_cast(ip), - &module)) { - GetModuleFileName(module, name, MAX_PATH); - } else { - module = 0; - } - - fprintf(log, - "timestamp %" LLD - " code %ld ip %p base %p stack %p thread %p module %s\n", - (static_cast(tb.time) * 1000) - + static_cast(tb.millitm), - e->ExceptionRecord->ExceptionCode, - ip, - base, - stack, - thread, - module ? name : "(unknown)"); - - fflush(log); - fclose(log); - } -} - -LONG CALLBACK handleException(LPEXCEPTION_POINTERS e) -{ - SignalRegistrar::Handler* handler = 0; - if (e->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) { - handler - = SignalRegistrar::Data::instance->handlers[SignalRegistrar::SegFault]; - } else if (e->ExceptionRecord->ExceptionCode - == EXCEPTION_INT_DIVIDE_BY_ZERO) { - handler = SignalRegistrar::Data::instance - ->handlers[SignalRegistrar::DivideByZero]; - } - - if (handler) { -#ifdef ARCH_x86_32 - void* ip = reinterpret_cast(e->ContextRecord->Eip); - void* base = reinterpret_cast(e->ContextRecord->Ebp); - void* stack = reinterpret_cast(e->ContextRecord->Esp); - void* thread = reinterpret_cast(e->ContextRecord->Ebx); -#elif defined ARCH_x86_64 - void* ip = reinterpret_cast(e->ContextRecord->Rip); - void* base = reinterpret_cast(e->ContextRecord->Rbp); - void* stack = reinterpret_cast(e->ContextRecord->Rsp); - void* thread = reinterpret_cast(e->ContextRecord->Rbx); -#endif - - bool jump = handler->handleSignal(&ip, &base, &stack, &thread); - - if (jump) { -#ifdef ARCH_x86_32 - e->ContextRecord->Eip = reinterpret_cast(ip); - e->ContextRecord->Ebp = reinterpret_cast(base); - e->ContextRecord->Esp = reinterpret_cast(stack); - e->ContextRecord->Ebx = reinterpret_cast(thread); -#elif defined ARCH_x86_64 - e->ContextRecord->Rip = reinterpret_cast(ip); - e->ContextRecord->Rbp = reinterpret_cast(base); - e->ContextRecord->Rsp = reinterpret_cast(stack); - e->ContextRecord->Rbx = reinterpret_cast(thread); -#endif - - return EXCEPTION_CONTINUE_EXECUTION; - } else if (SignalRegistrar::Data::instance->crashDumpDirectory) { - // We only generate a crash dump if exception occurred in code - // belonging to the current executable. If the exception - // occurred in a library, there may be a handler available to - // handle it, in which case it is premature to assume we're - // going to crash. Generating a full memory dump on each such - // event is time consuming and eats up disk space, so we'd - // prefer to avoid it unless we're really crashing. - HMODULE module; - if (GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, - static_cast(ip), - &module) and module == GetModuleHandle(0)) { - dump(e, SignalRegistrar::Data::instance->crashDumpDirectory); - } else { - logException(e, SignalRegistrar::Data::instance->crashDumpDirectory); - } - } - } - - return EXCEPTION_CONTINUE_SEARCH; -} - -} // namespace windows - -SignalRegistrar::SignalRegistrar() -{ - data = new (malloc(sizeof(Data))) Data(); -} - -SignalRegistrar::~SignalRegistrar() -{ - data->~Data(); - free(data); -} - -bool SignalRegistrar::Data::registerHandler(Handler* handler, int index) -{ - if (index != SegFault && index != DivideByZero) { - crash(); - } - - if (handler) { - handlers[index] = handler; - -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) - if (oldHandler == 0) { -#ifdef ARCH_x86_32 - oldHandler = SetUnhandledExceptionFilter(windows::handleException); -#elif defined ARCH_x86_64 - AddVectoredExceptionHandler(1, windows::handleException); - oldHandler = reinterpret_cast(1); -#endif - } -#else -#pragma message( \ - "TODO: http://msdn.microsoft.com/en-us/library/windowsphone/develop/system.windows.application.unhandledexception(v=vs.105).aspx") -#endif - - return true; - } else if (handlers[index]) { - handlers[index] = 0; - - if (not findHandler()) { -#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -#ifdef ARCH_x86_32 - SetUnhandledExceptionFilter(oldHandler); - oldHandler = 0; -#elif defined ARCH_x86_64 -// do nothing, handlers are never "unregistered" anyway -#endif -#else -#pragma message( \ - "TODO: http://msdn.microsoft.com/en-us/library/windowsphone/develop/system.windows.application.unhandledexception(v=vs.105).aspx") -#endif - } - - return true; - } else { - return false; - } -} - -bool SignalRegistrar::registerHandler(Signal signal, Handler* handler) -{ - return data->registerHandler(handler, signal); -} - -bool SignalRegistrar::unregisterHandler(Signal signal) -{ - return data->registerHandler(0, signal); -} - -void SignalRegistrar::setCrashDumpDirectory(const char* crashDumpDirectory) -{ - data->crashDumpDirectory = crashDumpDirectory; -} - -} // namespace system -} // namespace avian diff --git a/sgx-jvm/avian/src/thunks.cpp b/sgx-jvm/avian/src/thunks.cpp deleted file mode 100644 index 43a2a0c45d..0000000000 --- a/sgx-jvm/avian/src/thunks.cpp +++ /dev/null @@ -1,75 +0,0 @@ -THUNK(tryInitClass) -THUNK(findInterfaceMethodFromInstance) -THUNK(findInterfaceMethodFromInstanceAndReference) -THUNK(findSpecialMethodFromReference) -THUNK(findStaticMethodFromReference) -THUNK(findVirtualMethodFromReference) -THUNK(getMethodAddress) -THUNK(compareDoublesG) -THUNK(compareDoublesL) -THUNK(compareFloatsG) -THUNK(compareFloatsL) -THUNK(compareLongs) -THUNK(addDouble) -THUNK(subtractDouble) -THUNK(multiplyDouble) -THUNK(divideDouble) -THUNK(moduloDouble) -THUNK(negateDouble) -THUNK(squareRootDouble) -THUNK(doubleToFloat) -THUNK(doubleToInt) -THUNK(doubleToLong) -THUNK(addFloat) -THUNK(subtractFloat) -THUNK(multiplyFloat) -THUNK(divideFloat) -THUNK(moduloFloat) -THUNK(negateFloat) -THUNK(absoluteFloat) -THUNK(absoluteLong) -THUNK(absoluteInt) -THUNK(divideLong) -THUNK(divideInt) -THUNK(moduloLong) -THUNK(moduloInt) -THUNK(floatToDouble) -THUNK(floatToInt) -THUNK(floatToLong) -THUNK(intToDouble) -THUNK(intToFloat) -THUNK(longToDouble) -THUNK(longToFloat) -THUNK(makeBlankObjectArray) -THUNK(makeBlankObjectArrayFromReference) -THUNK(makeBlankArray) -THUNK(lookUpAddress) -THUNK(setMaybeNull) -THUNK(acquireMonitorForObject) -THUNK(acquireMonitorForObjectOnEntrance) -THUNK(releaseMonitorForObject) -THUNK(acquireMonitorForClassOnEntrance) -THUNK(releaseMonitorForClass) -THUNK(makeMultidimensionalArray) -THUNK(makeMultidimensionalArrayFromReference) -THUNK(throw_) -THUNK(checkCast) -THUNK(checkCastFromReference) -THUNK(getStaticFieldValueFromReference) -THUNK(getFieldValueFromReference) -THUNK(setStaticFieldValueFromReference) -THUNK(setFieldValueFromReference) -THUNK(setStaticLongFieldValueFromReference) -THUNK(setLongFieldValueFromReference) -THUNK(setStaticObjectFieldValueFromReference) -THUNK(setObjectFieldValueFromReference) -THUNK(instanceOf64) -THUNK(instanceOfFromReference) -THUNK(makeNewGeneral64) -THUNK(makeNew64) -THUNK(makeNewFromReference) -THUNK(setObject) -THUNK(getJClass64) -THUNK(getJClassFromReference) -THUNK(gcIfNecessary) -THUNK(idleIfNecessary) diff --git a/sgx-jvm/avian/src/tools/CMakeLists.txt b/sgx-jvm/avian/src/tools/CMakeLists.txt deleted file mode 100644 index 9825129a2c..0000000000 --- a/sgx-jvm/avian/src/tools/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_subdirectory(binary-to-object) -add_subdirectory(object-writer) -add_subdirectory(type-generator) diff --git a/sgx-jvm/avian/src/tools/binary-to-object/CMakeLists.txt b/sgx-jvm/avian/src/tools/binary-to-object/CMakeLists.txt deleted file mode 100644 index 1de4e5f9e4..0000000000 --- a/sgx-jvm/avian/src/tools/binary-to-object/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_executable(binary_to_object main.cpp) - -target_link_libraries(binary_to_object object_writer) diff --git a/sgx-jvm/avian/src/tools/binary-to-object/main.cpp b/sgx-jvm/avian/src/tools/binary-to-object/main.cpp deleted file mode 100644 index a6b25ae137..0000000000 --- a/sgx-jvm/avian/src/tools/binary-to-object/main.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include -#include - -#include -#ifdef _WIN32 -#include -#include -#else -#include -#include -#endif -#include - -#include - -extern "C" void __cxa_pure_virtual() -{ - abort(); -} - -void* operator new(size_t size) -{ - return malloc(size); -} - -void operator delete(void*) throw() -{ - abort(); -} - -namespace { - -using namespace avian::tools; -using namespace avian::util; - -bool writeObject(uint8_t* data, - size_t size, - OutputStream* out, - const char* startName, - const char* endName, - Platform* platform, - unsigned alignment, - bool writable, - bool executable) -{ - - SymbolInfo symbols[] = {SymbolInfo(0, startName), SymbolInfo(size, endName)}; - - unsigned accessFlags = (writable ? Platform::Writable : 0) - | (executable ? Platform::Executable : 0); - - return platform->writeObject(out, - Slice(symbols, 2), - Slice(data, size), - accessFlags, - alignment); -} - -void usageAndExit(const char* name) -{ - fprintf(stderr, - "usage: %s " - " " - "[ [{writable|executable}...]]\n", - name); - exit(-1); -} - -} // namespace - -int main(int argc, const char** argv) -{ - if (argc < 7 || argc > 10) { - usageAndExit(argv[0]); - } - - unsigned alignment = 1; - if (argc > 7) { - alignment = atoi(argv[7]); - } - - bool writable = false; - bool executable = false; - - for (int i = 8; i < argc; ++i) { - if (strcmp("writable", argv[i]) == 0) { - writable = true; - } else if (strcmp("executable", argv[i]) == 0) { - executable = true; - } else { - usageAndExit(argv[0]); - } - } - - const char* format = argv[5]; - const char* architecture = argv[6]; - - Platform* platform = Platform::getPlatform( - PlatformInfo(PlatformInfo::formatFromString(format), - PlatformInfo::archFromString(architecture))); - - if (!platform) { - fprintf(stderr, "unsupported platform: %s/%s\n", format, architecture); - return 1; - } - - - uint8_t* data = 0; - unsigned size; - int fd = open(argv[1], O_RDONLY); - if (fd != -1) { - struct stat s; - int r = fstat(fd, &s); - if (r != -1) { -#ifdef _WIN32 - HANDLE fm; - HANDLE h = (HANDLE)_get_osfhandle(fd); - - fm = CreateFileMapping(h, NULL, PAGE_READONLY, 0, 0, NULL); - data = static_cast( - MapViewOfFile(fm, FILE_MAP_READ, 0, 0, s.st_size)); - - CloseHandle(fm); -#else - data = static_cast( - mmap(0, s.st_size, PROT_READ, MAP_PRIVATE, fd, 0)); -#endif - size = s.st_size; - } - close(fd); - } - - bool success = false; - - if (data) { - FileOutputStream out(argv[2]); - if (out.isValid()) { - success = writeObject(data, - size, - &out, - argv[3], - argv[4], - platform, - alignment, - writable, - executable); - } else { - fprintf(stderr, "unable to open %s\n", argv[2]); - } - -#ifdef _WIN32 - UnmapViewOfFile(data); -#else - munmap(data, size); -#endif - } else { - perror(argv[0]); - } - - return (success ? 0 : -1); -} diff --git a/sgx-jvm/avian/src/tools/bootimage-generator/main.cpp b/sgx-jvm/avian/src/tools/bootimage-generator/main.cpp deleted file mode 100644 index 1b271a22dd..0000000000 --- a/sgx-jvm/avian/src/tools/bootimage-generator/main.cpp +++ /dev/null @@ -1,2324 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include "avian/heapwalk.h" -#include "avian/common.h" -#include "avian/machine.h" -#include "avian/util.h" -#include -#include -#include -#include "avian/target.h" -#include -#include -#include "avian/lzma.h" - -#include -#include - -// since we aren't linking against libstdc++, we must implement this -// ourselves: -extern "C" void __cxa_pure_virtual(void) -{ - abort(); -} - -using namespace vm; -using namespace avian::tools; -using namespace avian::util; -using namespace avian::codegen; - -namespace { - -const unsigned HeapCapacity = 512 * 1024 * 1024; - -const unsigned TargetFixieSizeInBytes = 8 + (TargetBytesPerWord * 2); -const unsigned TargetFixieSizeInWords - = ceilingDivide(TargetFixieSizeInBytes, TargetBytesPerWord); -const unsigned TargetFixieAge = 0; -const unsigned TargetFixieFlags = 2; -const unsigned TargetFixieSize = 4; - -const bool DebugNativeTarget = false; - -enum Type { - Type_none, - Type_object, - Type_object_nogc, - Type_int8_t, - Type_uint8_t, - Type_int16_t, - Type_uint16_t, - Type_int32_t, - Type_uint32_t, - Type_intptr_t, - Type_uintptr_t, - Type_int64_t, - Type_int64_t_pad, - Type_uint64_t, - Type_float, - Type_double, - Type_double_pad, - Type_word, - Type_array -}; - -class Field { - public: - Type type; - unsigned buildOffset; - unsigned buildSize; - unsigned targetOffset; - unsigned targetSize; -}; - -void init(Field* f, - Type type, - unsigned buildOffset, - unsigned buildSize, - unsigned targetOffset, - unsigned targetSize) -{ - f->type = type; - f->buildOffset = buildOffset; - f->buildSize = buildSize; - f->targetOffset = targetOffset; - f->targetSize = targetSize; -} - -class TypeMap { - public: - enum Kind { NormalKind, SingletonKind, PoolKind }; - - TypeMap(unsigned buildFixedSizeInWords, - unsigned targetFixedSizeInWords, - unsigned fixedFieldCount, - Kind kind = NormalKind, - unsigned buildArrayElementSizeInBytes = 0, - unsigned targetArrayElementSizeInBytes = 0, - Type arrayElementType = Type_none) - : buildFixedSizeInWords(buildFixedSizeInWords), - targetFixedSizeInWords(targetFixedSizeInWords), - fixedFieldCount(fixedFieldCount), - buildArrayElementSizeInBytes(buildArrayElementSizeInBytes), - targetArrayElementSizeInBytes(targetArrayElementSizeInBytes), - arrayElementType(arrayElementType), - kind(kind) - { - } - - uintptr_t* targetFixedOffsets() - { - return reinterpret_cast(this + 1); - } - - Field* fixedFields() - { - return reinterpret_cast(targetFixedOffsets() - + (buildFixedSizeInWords * BytesPerWord)); - } - - static unsigned sizeInBytes(unsigned buildFixedSizeInWords, - unsigned fixedFieldCount) - { - return sizeof(TypeMap) - + (buildFixedSizeInWords * BytesPerWord * BytesPerWord) - + (sizeof(Field) * fixedFieldCount); - } - - unsigned buildFixedSizeInWords; - unsigned targetFixedSizeInWords; - unsigned fixedFieldCount; - unsigned buildArrayElementSizeInBytes; - unsigned targetArrayElementSizeInBytes; - Type arrayElementType; - Kind kind; -}; - -// Notes on immutable references in the heap image: -// -// One of the advantages of a bootimage-based build is that reduces -// the overhead of major GCs at runtime since we can avoid scanning -// the pre-built heap image entirely. However, this only works if we -// can ensure that no part of the heap image (with exceptions noted -// below) ever points to runtime-allocated objects. Therefore (most) -// references in the heap image are considered immutable, and any -// attempt to update them at runtime will cause the process to abort. -// -// However, some references in the heap image really must be updated -// at runtime: e.g. the static field table for each class. Therefore, -// we allocate these as "fixed" objects, subject to mark-and-sweep -// collection, instead of as "copyable" objects subject to copying -// collection. This strategy avoids the necessity of maintaining -// "dirty reference" bitsets at runtime for the entire heap image; -// each fixed object has its own bitset specific to that object. -// -// In addition to the "fixed" object solution, there are other -// strategies available to avoid attempts to update immutable -// references at runtime: -// -// * Table-based: use a lazily-updated array or vector to associate -// runtime data with heap image objects (see -// e.g. getClassRuntimeData in machine.cpp). -// -// * Update references at build time: for example, we set the names -// of primitive classes before generating the heap image so that we -// need not populate them lazily at runtime. - -bool endsWith(const char* suffix, const char* s, unsigned length) -{ - unsigned suffixLength = strlen(suffix); - return length >= suffixLength - and memcmp(suffix, s + (length - suffixLength), suffixLength) == 0; -} - -GcVector* getNonStaticFields(Thread* t, - GcHashMap* typeMaps, - GcClass* c, - GcVector* fields, - unsigned* count, - GcByteArray** array) -{ - PROTECT(t, typeMaps); - PROTECT(t, c); - PROTECT(t, fields); - - *array = cast( - t, - hashMapFind( - t, typeMaps, reinterpret_cast(c), objectHash, objectEqual)); - - if (*array) { - *count += reinterpret_cast((*array)->body().begin()) - ->fixedFieldCount; - } else { - if (c->super()) { - fields - = getNonStaticFields(t, typeMaps, c->super(), fields, count, array); - } - - if (GcArray* ftable = cast(t, c->fieldTable())) { - PROTECT(t, ftable); - for (unsigned i = 0; i < ftable->length(); ++i) { - GcField* field = cast(t, ftable->body()[i]); - - if ((field->flags() & ACC_STATIC) == 0) { - ++(*count); - fields = vectorAppend(t, fields, reinterpret_cast(field)); - } - } - } - } - - return vectorAppend(t, fields, 0); -} - -GcVector* allFields(Thread* t, - GcHashMap* typeMaps, - GcClass* c, - unsigned* count, - GcByteArray** array) -{ - PROTECT(t, typeMaps); - PROTECT(t, c); - - GcVector* fields = makeVector(t, 0, 0); - PROTECT(t, fields); - - *array = cast( - t, - hashMapFind( - t, typeMaps, reinterpret_cast(c), objectHash, objectEqual)); - - bool includeMembers; - if (*array) { - includeMembers = false; - *count += reinterpret_cast((*array)->body().begin()) - ->fixedFieldCount; - } else { - includeMembers = true; - if (c->super()) { - fields - = getNonStaticFields(t, typeMaps, c->super(), fields, count, array); - } - } - - if (GcArray* ftable = cast(t, c->fieldTable())) { - PROTECT(t, ftable); - for (unsigned i = 0; i < ftable->length(); ++i) { - GcField* field = cast(t, ftable->body()[i]); - - if (includeMembers or (field->flags() & ACC_STATIC)) { - ++(*count); - fields = vectorAppend(t, fields, reinterpret_cast(field)); - } - } - } - - return fields; -} - -TypeMap* classTypeMap(Thread* t, GcHashMap* typeMaps, object p) -{ - return reinterpret_cast( - cast(t, hashMapFind(t, typeMaps, p, objectHash, objectEqual)) - ->body() - .begin()); -} - -TypeMap* typeMap(Thread* t, GcHashMap* typeMaps, object p) -{ - return reinterpret_cast( - cast( - t, - objectClass(t, p) == type(t, GcSingleton::Type) - ? hashMapFind(t, typeMaps, p, objectHash, objectEqual) - : hashMapFind(t, - typeMaps, - reinterpret_cast(objectClass(t, p)), - objectHash, - objectEqual)) - ->body() - .begin()); -} - -unsigned targetFieldOffset(Thread* t, GcHashMap* typeMaps, GcField* field) -{ - unsigned offset - = ((field->flags() & ACC_STATIC) - ? typeMap(t, - typeMaps, - reinterpret_cast(field->class_()->staticTable())) - : classTypeMap( - t, typeMaps, reinterpret_cast(field->class_()))) - ->targetFixedOffsets()[field->offset()]; - - assertT(t, not((field->offset() == 0) xor (offset == 0))); - - return offset; -} - -void addClass(Thread* t, - GcClass* c, - const uint8_t* start, - size_t length, - GcHashMap* typeMaps) -{ - PROTECT(t, c); - PROTECT(t, typeMaps); - - { - class Client : public Stream::Client { - public: - Client(Thread* t) : t(t) - { - } - - virtual void NO_RETURN handleError() - { - abort(t); - } - - private: - Thread* t; - } client(t); - - Stream s(&client, start, length); - - uint32_t magic = s.read4(); - expect(t, magic == 0xCAFEBABE); - s.read2(); // minor version - s.read2(); // major version - - unsigned count = s.read2() - 1; - if (count) { - THREAD_RUNTIME_ARRAY(t, Type, types, count + 2); - RUNTIME_ARRAY_BODY(types)[0] = Type_object; - RUNTIME_ARRAY_BODY(types)[1] = Type_intptr_t; - - for (unsigned i = 2; i < count + 2; ++i) { - unsigned constType = s.read1(); - switch (constType) { - case CONSTANT_Class: - case CONSTANT_String: - RUNTIME_ARRAY_BODY(types)[i] = Type_object; - s.skip(2); - break; - - case CONSTANT_Integer: - case CONSTANT_Float: - RUNTIME_ARRAY_BODY(types)[i] = Type_int32_t; - s.skip(4); - break; - - case CONSTANT_NameAndType: - case CONSTANT_Fieldref: - case CONSTANT_Methodref: - case CONSTANT_InterfaceMethodref: - RUNTIME_ARRAY_BODY(types)[i] = Type_object; - s.skip(4); - break; - - case CONSTANT_Long: - RUNTIME_ARRAY_BODY(types)[i++] = Type_int64_t; - RUNTIME_ARRAY_BODY(types)[i] = Type_int64_t_pad; - s.skip(8); - break; - - case CONSTANT_Double: - RUNTIME_ARRAY_BODY(types)[i++] = Type_double; - RUNTIME_ARRAY_BODY(types)[i] = Type_double_pad; - s.skip(8); - break; - - case CONSTANT_Utf8: - RUNTIME_ARRAY_BODY(types)[i] = Type_object; - s.skip(s.read2()); - break; - - case CONSTANT_MethodHandle: - RUNTIME_ARRAY_BODY(types)[i] = Type_object; - s.skip(3); - break; - - case CONSTANT_MethodType: - RUNTIME_ARRAY_BODY(types)[i] = Type_object; - s.skip(2); - break; - - case CONSTANT_InvokeDynamic: - RUNTIME_ARRAY_BODY(types)[i] = Type_object; - s.skip(4); - break; - - default: - fprintf(stderr, "unknown class constant: %d\n", constType); - abort(t); - } - } - - GcByteArray* array - = makeByteArray(t, TypeMap::sizeInBytes(count + 2, count + 2)); - - TypeMap* map = new (array->body().begin()) - TypeMap(count + 2, count + 2, count + 2, TypeMap::PoolKind); - - for (unsigned i = 0; i < count + 2; ++i) { - expect(t, i < map->buildFixedSizeInWords); - - map->targetFixedOffsets()[i * BytesPerWord] = i * TargetBytesPerWord; - - init(new (map->fixedFields() + i) Field, - RUNTIME_ARRAY_BODY(types)[i], - i* BytesPerWord, - BytesPerWord, - i* TargetBytesPerWord, - TargetBytesPerWord); - } - - hashMapInsert( - t, - typeMaps, - reinterpret_cast(hashMapFind(t, - roots(t)->poolMap(), - reinterpret_cast(c), - objectHash, - objectEqual)), - reinterpret_cast(array), - objectHash); - } - } - - { - GcByteArray* array = 0; - PROTECT(t, array); - - unsigned count = 0; - GcVector* fields = allFields(t, typeMaps, c, &count, &array); - PROTECT(t, fields); - - THREAD_RUNTIME_ARRAY(t, Field, memberFields, count + 1); - - unsigned memberIndex; - unsigned buildMemberOffset; - unsigned targetMemberOffset; - - if (array) { - memberIndex = 0; - buildMemberOffset = 0; - targetMemberOffset = 0; - - TypeMap* map = reinterpret_cast(array->body().begin()); - - for (unsigned j = 0; j < map->fixedFieldCount; ++j) { - Field* f = map->fixedFields() + j; - - RUNTIME_ARRAY_BODY(memberFields)[memberIndex] = *f; - - targetMemberOffset = f->targetOffset + f->targetSize; - - ++memberIndex; - } - } else { - init(new (RUNTIME_ARRAY_BODY(memberFields)) Field, - Type_object, - 0, - BytesPerWord, - 0, - TargetBytesPerWord); - - memberIndex = 1; - buildMemberOffset = BytesPerWord; - targetMemberOffset = TargetBytesPerWord; - } - - const unsigned StaticHeader = 3; - - THREAD_RUNTIME_ARRAY(t, Field, staticFields, count + StaticHeader); - - init(new (RUNTIME_ARRAY_BODY(staticFields)) Field, - Type_object, - 0, - BytesPerWord, - 0, - TargetBytesPerWord); - - init(new (RUNTIME_ARRAY_BODY(staticFields) + 1) Field, - Type_intptr_t, - BytesPerWord, - BytesPerWord, - TargetBytesPerWord, - TargetBytesPerWord); - - init(new (RUNTIME_ARRAY_BODY(staticFields) + 2) Field, - Type_object, - BytesPerWord * 2, - BytesPerWord, - TargetBytesPerWord * 2, - TargetBytesPerWord); - - unsigned staticIndex = StaticHeader; - unsigned buildStaticOffset = BytesPerWord * StaticHeader; - unsigned targetStaticOffset = TargetBytesPerWord * StaticHeader; - - for (unsigned i = 0; i < fields->size(); ++i) { - GcField* field = cast(t, fields->body()[i]); - if (field) { - unsigned buildSize = fieldSize(t, field->code()); - unsigned targetSize = buildSize; - - Type type; - switch (field->code()) { - case ObjectField: - type = Type_object; - targetSize = TargetBytesPerWord; - break; - - case ByteField: - case BooleanField: - type = Type_int8_t; - break; - - case CharField: - case ShortField: - type = Type_int8_t; - break; - - case FloatField: - case IntField: - type = Type_int32_t; - break; - - case LongField: - case DoubleField: - type = Type_int64_t; - break; - - default: - abort(t); - } - - if (field->flags() & ACC_STATIC) { - targetStaticOffset = pad(targetStaticOffset, targetSize); - - buildStaticOffset = field->offset(); - - init(new (RUNTIME_ARRAY_BODY(staticFields) + staticIndex) Field, - type, - buildStaticOffset, - buildSize, - targetStaticOffset, - targetSize); - - targetStaticOffset += targetSize; - - ++staticIndex; - } else { - targetMemberOffset = pad(targetMemberOffset, targetSize); - - buildMemberOffset = field->offset(); - - init(new (RUNTIME_ARRAY_BODY(memberFields) + memberIndex) Field, - type, - buildMemberOffset, - buildSize, - targetMemberOffset, - targetSize); - - targetMemberOffset += targetSize; - - ++memberIndex; - } - } else { - targetMemberOffset = pad(targetMemberOffset, TargetBytesPerWord); - } - } - - if (hashMapFind( - t, typeMaps, reinterpret_cast(c), objectHash, objectEqual) - == 0) { - GcByteArray* array = makeByteArray( - t, - TypeMap::sizeInBytes(ceilingDivide(c->fixedSize(), BytesPerWord), - memberIndex)); - - TypeMap* map = new (array->body().begin()) - TypeMap(ceilingDivide(c->fixedSize(), BytesPerWord), - ceilingDivide(targetMemberOffset, TargetBytesPerWord), - memberIndex); - - for (unsigned i = 0; i < memberIndex; ++i) { - Field* f = RUNTIME_ARRAY_BODY(memberFields) + i; - - expect(t, f->buildOffset < map->buildFixedSizeInWords * BytesPerWord); - - map->targetFixedOffsets()[f->buildOffset] = f->targetOffset; - - map->fixedFields()[i] = *f; - } - - hashMapInsert(t, - typeMaps, - reinterpret_cast(c), - reinterpret_cast(array), - objectHash); - } - - if (c->staticTable()) { - GcByteArray* array = makeByteArray( - t, - TypeMap::sizeInBytes(singletonCount(t, c->staticTable()) + 2, - staticIndex)); - - TypeMap* map = new (array->body().begin()) - TypeMap(singletonCount(t, c->staticTable()) + 2, - ceilingDivide(targetStaticOffset, TargetBytesPerWord), - staticIndex, - TypeMap::SingletonKind); - - for (unsigned i = 0; i < staticIndex; ++i) { - Field* f = RUNTIME_ARRAY_BODY(staticFields) + i; - - expect(t, f->buildOffset < map->buildFixedSizeInWords * BytesPerWord); - - map->targetFixedOffsets()[f->buildOffset] = f->targetOffset; - - map->fixedFields()[i] = *f; - } - - hashMapInsert(t, - typeMaps, - reinterpret_cast(c->staticTable()), - reinterpret_cast(array), - objectHash); - } - } -} - -void compileMethods(Thread* t, - GcClass* c, - Zone* zone, - GcTriple** constants, - GcTriple** calls, - GcPair** methods, - DelayedPromise** addresses, - OffsetResolver* resolver, - JavaVM* hostVM, - const char* methodName, - const char* methodSpec) -{ - PROTECT(t, c); - - if (GcArray* mtable = cast(t, c->methodTable())) { - PROTECT(t, mtable); - for (unsigned i = 0; i < mtable->length(); ++i) { - GcMethod* method = cast(t, mtable->body()[i]); - if (((methodName == 0 - or ::strcmp(reinterpret_cast(method->name()->body().begin()), - methodName) == 0) - and (methodSpec == 0 - or ::strcmp( - reinterpret_cast(method->spec()->body().begin()), - methodSpec) == 0))) { - if (method->code() or (method->flags() & ACC_NATIVE)) { - PROTECT(t, method); - - t->m->processor->compileMethod( - t, zone, constants, calls, addresses, method, resolver, hostVM); - - if (method->code()) { - *methods = makePair(t, - reinterpret_cast(method), - reinterpret_cast(*methods)); - } - } - - GcMethodAddendum* addendum = method->addendum(); - if (addendum and addendum->exceptionTable()) { - PROTECT(t, addendum); - GcShortArray* exceptionTable - = cast(t, addendum->exceptionTable()); - PROTECT(t, exceptionTable); - - // resolve exception types now to avoid trying to update - // immutable references at runtime - for (unsigned i = 0; i < exceptionTable->length(); ++i) { - uint16_t index = exceptionTable->body()[i] - 1; - - object o = singletonObject(t, addendum->pool(), index); - - if (objectClass(t, o) == type(t, GcReference::Type)) { - o = reinterpret_cast(resolveClass( - t, roots(t)->bootLoader(), cast(t, o)->name())); - - addendum->pool()->setBodyElement( - t, index, reinterpret_cast(o)); - } - } - } - } - } - } -} - -GcTriple* makeCodeImage(Thread* t, - Zone* zone, - BootImage* image, - uint8_t* code, - JavaVM* hostVM, - const char* className, - const char* methodName, - const char* methodSpec, - GcHashMap* typeMaps) -{ - PROTECT(t, typeMaps); - - t->m->classpath->interceptMethods(t); - - GcPair* classes = 0; - PROTECT(t, classes); - - class MyOffsetResolver : public OffsetResolver { - public: - MyOffsetResolver(GcHashMap** typeMaps, GcPair** classes) - : typeMaps(typeMaps), classes(classes) - { - } - - virtual unsigned fieldOffset(Thread* t, GcField* field) - { - return targetFieldOffset(t, *typeMaps, field); - } - - virtual void addClass(Thread* t, - GcClass* c, - const uint8_t* start, - size_t length) - { - PROTECT(t, c); - - *classes = makePair( - t, reinterpret_cast(c), reinterpret_cast(*classes)); - - return ::addClass(t, c, start, length, *typeMaps); - } - - GcHashMap** typeMaps; - GcPair** classes; - } resolver(&typeMaps, &classes); - - Finder* finder = static_cast( - roots(t)->bootLoader()->as(t)->finder()); - - for (Finder::Iterator it(finder); it.hasMore();) { - size_t nameSize = 0; - const char* name = it.next(&nameSize); - - if (endsWith(".class", name, nameSize) - and (className == 0 or strncmp(name, className, nameSize - 6) == 0)) { - if (false) { - fprintf(stderr, "pass 1 %.*s\n", (int)nameSize - 6, name); - } - - GcClass* c - = resolveSystemClass(t, - roots(t)->bootLoader(), - makeByteArray(t, "%.*s", nameSize - 6, name), - true); - - System::Region* region = finder->find(name); - - THREAD_RESOURCE(t, System::Region*, region, region->dispose()); - - addClass(t, c, region->start(), region->length(), typeMaps); - } - } - - GcTriple* constants = 0; - PROTECT(t, constants); - - GcTriple* calls = 0; - PROTECT(t, calls); - - GcPair* methods = 0; - PROTECT(t, methods); - - DelayedPromise* addresses = 0; - - for (Finder::Iterator it(finder); it.hasMore();) { - size_t nameSize = 0; - const char* name = it.next(&nameSize); - - if (endsWith(".class", name, nameSize) - and (className == 0 or strncmp(name, className, nameSize - 6) == 0)) { - if (false) { - fprintf(stderr, "pass 2 %.*s\n", (int)nameSize - 6, name); - } - - GcClass* c - = resolveSystemClass(t, - roots(t)->bootLoader(), - makeByteArray(t, "%.*s", nameSize - 6, name), - true); - - classes = makePair( - t, reinterpret_cast(c), reinterpret_cast(classes)); - } - } - - // Each method compilation may result in the creation of new, - // synthetic classes (e.g. for lambda expressions), so we must - // iterate until we've visited them all: - while (classes) { - GcPair* myClasses = classes; - PROTECT(t, myClasses); - - classes = 0; - - for (; myClasses; myClasses = cast(t, myClasses->second())) { - compileMethods(t, - cast(t, myClasses->first()), - zone, - &constants, - &calls, - &methods, - &addresses, - &resolver, - hostVM, - methodName, - methodSpec); - } - } - - for (; calls; calls = cast(t, calls->third())) { - GcMethod* method = cast(t, calls->first()); - uintptr_t address; - if (method->flags() & ACC_NATIVE) { - address = reinterpret_cast(code + image->thunks.native.start); - } else { - address = method->code()->compiled(); - } - - static_cast(cast(t, calls->second())->value()) - ->listener->resolve(address, 0); - } - - for (; addresses; addresses = addresses->next) { - uint8_t* value = reinterpret_cast(addresses->basis->value()); - expect(t, value >= code); - - addresses->listener->resolve(static_cast(value - code), 0); - } - - for (; methods; methods = cast(t, methods->second())) { - cast(t, methods->first())->code()->compiled() - -= reinterpret_cast(code); - } - - t->m->processor->normalizeVirtualThunks(t); - - return constants; -} - -void visitRoots(Thread* t, BootImage* image, HeapWalker* w, GcTriple* constants) -{ - Machine* m = t->m; - - for (HashMapIterator it(t, cast(t, roots(t)->bootLoader()->map())); - it.hasMore();) { - w->visitRoot(it.next()->second()); - } - - image->bootLoader - = w->visitRoot(reinterpret_cast(roots(t)->bootLoader())); - image->appLoader - = w->visitRoot(reinterpret_cast(roots(t)->appLoader())); - image->types = w->visitRoot(reinterpret_cast(m->types)); - - m->processor->visitRoots(t, w); - - for (; constants; constants = cast(t, constants->third())) { - w->visitRoot(constants->first()); - } -} - -unsigned targetOffset(Thread* t, GcHashMap* typeMaps, object p, unsigned offset) -{ - TypeMap* map = typeMap(t, typeMaps, p); - - if (map->targetArrayElementSizeInBytes - and offset >= map->buildFixedSizeInWords * BytesPerWord) { - return (map->targetFixedSizeInWords * TargetBytesPerWord) - + (((offset - (map->buildFixedSizeInWords * BytesPerWord)) - / map->buildArrayElementSizeInBytes) - * map->targetArrayElementSizeInBytes); - } else { - return map->targetFixedOffsets()[offset]; - } -} - -unsigned targetSize(Thread* t, GcHashMap* typeMaps, object p) -{ - TypeMap* map = typeMap(t, typeMaps, p); - - if (map->targetArrayElementSizeInBytes) { - return map->targetFixedSizeInWords - + ceilingDivide( - map->targetArrayElementSizeInBytes - * fieldAtOffset( - p, (map->buildFixedSizeInWords - 1) * BytesPerWord), - TargetBytesPerWord); - } else { - switch (map->kind) { - case TypeMap::NormalKind: - return map->targetFixedSizeInWords; - - case TypeMap::SingletonKind: - return map->targetFixedSizeInWords - + singletonMaskSize(map->targetFixedSizeInWords - 2, - TargetBitsPerWord); - - case TypeMap::PoolKind: { - unsigned maskSize - = poolMaskSize(map->targetFixedSizeInWords - 2, TargetBitsPerWord); - - return map->targetFixedSizeInWords + maskSize - + singletonMaskSize(map->targetFixedSizeInWords - 2 + maskSize, - TargetBitsPerWord); - } - - default: - abort(t); - } - } -} - -unsigned objectMaskCount(TypeMap* map) -{ - unsigned count = map->targetFixedSizeInWords; - - if (map->targetArrayElementSizeInBytes) { - ++count; - } - - return count; -} - -unsigned targetSize(Thread* t, - GcHashMap* typeMaps, - object referer, - unsigned refererOffset, - object p) -{ - if (referer and objectClass(t, referer) == type(t, GcClass::Type) - and (refererOffset * BytesPerWord) == ClassObjectMask) { - return (TargetBytesPerWord * 2) - + pad(ceilingDivide( - objectMaskCount(classTypeMap(t, typeMaps, referer)), 32) - * 4, - TargetBytesPerWord); - } else { - return targetSize(t, typeMaps, p); - } -} - -void copy(Thread* t, uint8_t* src, uint8_t* dst, Type type) -{ - switch (type) { - case Type_int8_t: - memcpy(dst, src, 1); - break; - - case Type_int16_t: { - int16_t s; - memcpy(&s, src, 2); - int16_t d = targetV2(s); - memcpy(dst, &d, 2); - } break; - - case Type_int32_t: - case Type_float: { - int32_t s; - memcpy(&s, src, 4); - int32_t d = targetV4(s); - memcpy(dst, &d, 4); - } break; - - case Type_int64_t: - case Type_double: { - int64_t s; - memcpy(&s, src, 8); - int64_t d = targetV8(s); - memcpy(dst, &d, 8); - } break; - - case Type_int64_t_pad: - case Type_double_pad: - break; - - case Type_intptr_t: { - intptr_t s; - memcpy(&s, src, BytesPerWord); - target_intptr_t d = targetVW(s); - memcpy(dst, &d, TargetBytesPerWord); - } break; - - case Type_object: { - memset(dst, 0, TargetBytesPerWord); - } break; - - default: - abort(t); - } -} - -bool nonObjectsEqual(uint8_t* src, uint8_t* dst, Type type) -{ - switch (type) { - case Type_int8_t: - return memcmp(dst, src, 1) == 0; - - case Type_int16_t: - return memcmp(dst, src, 2) == 0; - - case Type_int32_t: - case Type_float: - return memcmp(dst, src, 4) == 0; - - case Type_int64_t: - case Type_double: - return memcmp(dst, src, 8) == 0; - - case Type_int64_t_pad: - case Type_double_pad: - return true; - - case Type_intptr_t: - return memcmp(dst, src, BytesPerWord) == 0; - - case Type_object: - case Type_object_nogc: - return true; - - default: - abort(); - } -} - -bool nonObjectsEqual(TypeMap* map, uint8_t* src, uint8_t* dst) -{ - for (unsigned i = 0; i < map->fixedFieldCount; ++i) { - Field* field = map->fixedFields() + i; - if (not nonObjectsEqual( - src + field->buildOffset, dst + field->targetOffset, field->type)) { - return false; - } - } - - if (map->targetArrayElementSizeInBytes) { - unsigned fixedSize = map->buildFixedSizeInWords * BytesPerWord; - unsigned count = fieldAtOffset(src, fixedSize - BytesPerWord); - - for (unsigned i = 0; i < count; ++i) { - if (not nonObjectsEqual( - src + fixedSize + (i * map->buildArrayElementSizeInBytes), - dst + (map->targetFixedSizeInWords * TargetBytesPerWord) - + (i * map->targetArrayElementSizeInBytes), - map->arrayElementType)) { - return false; - } - } - } - - return true; -} - -void copy(Thread* t, GcHashMap* typeMaps, object p, uint8_t* dst) -{ - TypeMap* map = typeMap(t, typeMaps, p); - - uint8_t* src = reinterpret_cast(p); - - for (unsigned i = 0; i < map->fixedFieldCount; ++i) { - Field* field = map->fixedFields() + i; - if (field->type > Type_array) - abort(t); - copy(t, src + field->buildOffset, dst + field->targetOffset, field->type); - } - - if (map->targetArrayElementSizeInBytes) { - unsigned fixedSize = map->buildFixedSizeInWords * BytesPerWord; - unsigned count = fieldAtOffset(p, fixedSize - BytesPerWord); - - for (unsigned i = 0; i < count; ++i) { - copy(t, - src + fixedSize + (i * map->buildArrayElementSizeInBytes), - dst + (map->targetFixedSizeInWords * TargetBytesPerWord) - + (i * map->targetArrayElementSizeInBytes), - map->arrayElementType); - } - - if (objectClass(t, p) == type(t, GcClass::Type)) { - uint16_t fixedSize; - uint8_t arrayElementSize; - GcByteArray* array = cast( - t, hashMapFind(t, typeMaps, p, objectHash, objectEqual)); - PROTECT(t, array); - - GcClass* c = cast(t, p); - PROTECT(t, c); - - if (array) { - TypeMap* classMap = reinterpret_cast(array->body().begin()); - - fixedSize - = targetV2(classMap->targetFixedSizeInWords * TargetBytesPerWord); - - arrayElementSize = classMap->targetArrayElementSizeInBytes; - } else if (c->fixedSize() == BytesPerWord * 2 - and c->arrayElementSize() == BytesPerWord) { - fixedSize = targetV2(TargetBytesPerWord * 2); - - arrayElementSize = TargetBytesPerWord; - } else { - fixedSize = 0; - arrayElementSize = 0; - } - - if (fixedSize) { - memcpy(dst + TargetClassFixedSize, &fixedSize, 2); - - memcpy(dst + TargetClassArrayElementSize, &arrayElementSize, 1); - } - - // if (strcmp("vm::lineNumberTable", - // reinterpret_cast(&byteArrayBody(t, className(t, - // p), 0))) == 0) trap(); - } - } else { - switch (map->kind) { - case TypeMap::NormalKind: - if (objectClass(t, p) == type(t, GcField::Type)) { - uint16_t offset - = targetV2(targetFieldOffset(t, typeMaps, cast(t, p))); - memcpy(dst + TargetFieldOffset, &offset, 2); - } - break; - - case TypeMap::SingletonKind: { - unsigned maskSize = singletonMaskSize(map->targetFixedSizeInWords - 2, - TargetBitsPerWord); - - target_uintptr_t targetLength - = targetVW(map->targetFixedSizeInWords - 2 + maskSize); - memcpy(dst + TargetBytesPerWord, &targetLength, TargetBytesPerWord); - - uint8_t* mask = dst + (map->targetFixedSizeInWords * TargetBytesPerWord); - memset(mask, 0, maskSize * TargetBytesPerWord); - - for (unsigned i = 0; i < map->fixedFieldCount; ++i) { - Field* field = map->fixedFields() + i; - if (field->type == Type_object) { - unsigned offset = field->targetOffset / TargetBytesPerWord; - reinterpret_cast(mask)[offset / 32] - |= targetV4(static_cast(1) << (offset % 32)); - } - } - - if (DebugNativeTarget) { - expect(t, - memcmp(src + (map->targetFixedSizeInWords * TargetBytesPerWord), - mask, - singletonMaskSize(map->targetFixedSizeInWords - 2, - TargetBitsPerWord) * TargetBytesPerWord) - == 0); - } - } break; - - case TypeMap::PoolKind: { - unsigned poolMaskSize = vm::poolMaskSize(map->targetFixedSizeInWords - 2, - TargetBitsPerWord); - - unsigned objectMaskSize = singletonMaskSize( - map->targetFixedSizeInWords - 2 + poolMaskSize, TargetBitsPerWord); - - target_uintptr_t targetLength = targetVW(map->targetFixedSizeInWords - 2 - + poolMaskSize + objectMaskSize); - memcpy(dst + TargetBytesPerWord, &targetLength, TargetBytesPerWord); - - uint8_t* poolMask = dst - + (map->targetFixedSizeInWords * TargetBytesPerWord); - - memset(poolMask, 0, poolMaskSize * TargetBytesPerWord); - - uint8_t* objectMask = dst + ((map->targetFixedSizeInWords + poolMaskSize) - * TargetBytesPerWord); - - memset(objectMask, 0, objectMaskSize * TargetBytesPerWord); - - for (unsigned i = 0; i < map->fixedFieldCount; ++i) { - Field* field = map->fixedFields() + i; - switch (field->type) { - case Type_object: - reinterpret_cast(objectMask)[i / 32] - |= targetV4(static_cast(1) << (i % 32)); - break; - - case Type_float: - case Type_double: - reinterpret_cast(poolMask)[i / TargetBitsPerWord] - |= targetVW(static_cast(1) - << (i % TargetBitsPerWord)); - break; - - default: - break; - } - } - - if (DebugNativeTarget) { - expect(t, - memcmp(src + (map->targetFixedSizeInWords * TargetBytesPerWord), - poolMask, - (poolMaskSize - + singletonMaskSize( - map->targetFixedSizeInWords - 2 + poolMaskSize, - TargetBitsPerWord)) * TargetBytesPerWord) == 0); - } - } break; - - default: - abort(t); - } - } -} - -void copy(Thread* t, - GcHashMap* typeMaps, - object referer, - unsigned refererOffset, - object p, - uint8_t* dst) -{ - if (referer and objectClass(t, referer) == type(t, GcClass::Type) - and (refererOffset * BytesPerWord) == ClassObjectMask) { - TypeMap* map = classTypeMap(t, typeMaps, referer); - - memset(dst, 0, TargetBytesPerWord); - - unsigned length = ceilingDivide(objectMaskCount(map), 32); - - target_uintptr_t targetLength = targetVW(length); - - memcpy(dst + TargetBytesPerWord, &targetLength, TargetBytesPerWord); - - memset(dst + (TargetBytesPerWord * 2), 0, length * 4); - - for (unsigned i = 0; i < map->fixedFieldCount; ++i) { - Field* field = map->fixedFields() + i; - if (field->type == Type_object) { - unsigned offset = field->targetOffset / TargetBytesPerWord; - reinterpret_cast(dst + (TargetBytesPerWord * 2))[offset / 32] - |= targetV4(static_cast(1) << (offset % 32)); - } - } - - if (map->targetArrayElementSizeInBytes - and map->arrayElementType == Type_object) { - unsigned offset = map->targetFixedSizeInWords; - reinterpret_cast(dst + (TargetBytesPerWord * 2))[offset / 32] - |= targetV4(static_cast(1) << (offset % 32)); - } - } else { - copy(t, typeMaps, p, dst); - } - - if (DebugNativeTarget) { - expect(t, targetSize(t, typeMaps, p) == baseSize(t, p, objectClass(t, p))); - expect(t, - nonObjectsEqual( - typeMap(t, typeMaps, p), reinterpret_cast(p), dst)); - } -} - -HeapWalker* makeHeapImage(Thread* t, - BootImage* image, - target_uintptr_t* heap, - target_uintptr_t* map, - unsigned capacity, - GcTriple* constants, - GcHashMap* typeMaps) -{ - class Visitor : public HeapVisitor { - public: - Visitor(Thread* t, - GcHashMap* typeMaps, - target_uintptr_t* heap, - target_uintptr_t* map, - unsigned capacity) - : t(t), - typeMaps(typeMaps), - currentObject(0), - currentNumber(0), - currentOffset(0), - heap(heap), - map(map), - position(0), - capacity(capacity) - { - } - - void visit(unsigned number) - { - if (currentObject) { - if (DebugNativeTarget) { - expect(t, - targetOffset( - t, typeMaps, currentObject, currentOffset * BytesPerWord) - == currentOffset * BytesPerWord); - } - - unsigned offset - = currentNumber - 1 - + (targetOffset( - t, typeMaps, currentObject, currentOffset * BytesPerWord) - / TargetBytesPerWord); - - unsigned mark = heap[offset] & (~TargetPointerMask); - unsigned value = number | (mark << TargetBootShift); - - if (value) - targetMarkBit(map, offset); - - heap[offset] = targetVW(value); - } - } - - virtual void root() - { - currentObject = 0; - } - - virtual unsigned visitNew(object p) - { - if (p) { - unsigned size - = targetSize(t, typeMaps, currentObject, currentOffset, p); - - unsigned number; - if ((currentObject - and objectClass(t, currentObject) == type(t, GcClass::Type) - and (currentOffset * BytesPerWord) == ClassStaticTable) - or instanceOf(t, type(t, GcSystemClassLoader::Type), p) - or instanceOf(t, type(t, GcAddendum::Type), p)) { - // Static tables, system classloaders, and addendums must be - // allocated as fixed objects in the heap image so that they - // can be marked as dirty and visited during GC. Otherwise, - // attempts to update references in these objects to point - // to runtime-allocated memory would fail because we don't - // scan non-fixed objects in the heap image during GC. - - target_uintptr_t* dst = heap + position + TargetFixieSizeInWords; - - unsigned maskSize = ceilingDivide(size, TargetBitsPerWord); - - unsigned total = TargetFixieSizeInWords + size + maskSize; - - expect(t, position + total < capacity); - - memset(heap + position, 0, TargetFixieSizeInBytes); - - uint16_t age = targetV2(FixieTenureThreshold + 1); - memcpy(reinterpret_cast(heap + position) + TargetFixieAge, - &age, - 2); - - uint16_t flags = targetV2(1); - memcpy(reinterpret_cast(heap + position) + TargetFixieFlags, - &flags, - 2); - - uint32_t targetSize = targetV4(size); - memcpy(reinterpret_cast(heap + position) + TargetFixieSize, - &targetSize, - 4); - - copy(t, - typeMaps, - currentObject, - currentOffset, - p, - reinterpret_cast(dst)); - - dst[0] |= FixedMark; - - memset(heap + position + TargetFixieSizeInWords + size, - 0, - maskSize * TargetBytesPerWord); - - number = (dst - heap) + 1; - position += total; - } else { - expect(t, position + size < capacity); - - copy(t, - typeMaps, - currentObject, - currentOffset, - p, - reinterpret_cast(heap + position)); - - number = position + 1; - position += size; - } - - visit(number); - - return number; - } else { - return 0; - } - } - - virtual void visitOld(object, unsigned number) - { - visit(number); - } - - virtual void push(object object, unsigned number, unsigned offset) - { - currentObject = object; - currentNumber = number; - currentOffset = offset; - } - - virtual void pop() - { - currentObject = 0; - } - - Thread* t; - GcHashMap* typeMaps; - object currentObject; - unsigned currentNumber; - unsigned currentOffset; - target_uintptr_t* heap; - target_uintptr_t* map; - unsigned position; - unsigned capacity; - } visitor(t, typeMaps, heap, map, capacity / TargetBytesPerWord); - - HeapWalker* w = makeHeapWalker(t, &visitor); - visitRoots(t, image, w, constants); - - image->heapSize = visitor.position * TargetBytesPerWord; - - return w; -} - -void updateConstants(Thread* t, GcTriple* constants, HeapMap* heapTable) -{ - for (; constants; constants = cast(t, constants->third())) { - unsigned target = heapTable->find(constants->first()); - expect(t, target > 0); - - for (Promise::Listener* pl - = static_cast( - cast(t, constants->second())->value())->listener; - pl; - pl = pl->next) { - pl->resolve((target - 1) * TargetBytesPerWord, 0); - } - } -} - -BootImage::Thunk targetThunk(BootImage::Thunk t) -{ - return BootImage::Thunk( - targetV4(t.start), targetV4(t.frameSavedOffset), targetV4(t.length)); -} - -void writeBootImage2(Thread* t, - OutputStream* bootimageOutput, - OutputStream* codeOutput, - BootImage* image, - uint8_t* code, - JavaVM* hostVM, - const char* className, - const char* methodName, - const char* methodSpec, - const char* bootimageStart, - const char* bootimageEnd, - const char* codeimageStart, - const char* codeimageEnd, - bool useLZMA) -{ - GcThrowable* throwable - = cast(t, make(t, type(t, GcOutOfMemoryError::Type))); - // sequence point, for gc (don't recombine statements) - roots(t)->setOutOfMemoryError(t, throwable); - - Zone zone(t->m->heap, 64 * 1024); - - class MyCompilationHandler : public Processor::CompilationHandler { - public: - String heapDup(const char* name) - { - String ret(name); - char* n = (char*)heap->allocate(ret.length + 1); - memcpy(n, ret.text, ret.length + 1); - ret.text = n; - return ret; - } - - virtual void compiled(const void* code, - unsigned size UNUSED, - unsigned frameSize UNUSED, - const char* name) - { - uint64_t offset = reinterpret_cast(code) - codeOffset; - symbols.add(SymbolInfo(offset, heapDup(name))); - // printf("%ld %ld %s.%s%s\n", offset, offset + size, class_, name, spec); - } - - virtual void dispose() - { - } - - DynamicArray symbols; - uint64_t codeOffset; - Heap* heap; - - MyCompilationHandler(uint64_t codeOffset, Heap* heap) - : codeOffset(codeOffset), heap(heap) - { - } - - } compilationHandler(reinterpret_cast(code), t->m->heap); - - t->m->processor->addCompilationHandler(&compilationHandler); - - GcHashMap* classPoolMap; - GcHashMap* typeMaps; - GcTriple* constants; - - { - classPoolMap = makeHashMap(t, 0, 0); - PROTECT(t, classPoolMap); - - roots(t)->setPoolMap(t, classPoolMap); - - typeMaps = makeHashMap(t, 0, 0); - PROTECT(t, typeMaps); - -#include "type-maps.cpp" - - for (unsigned i = 0; i < t->m->types->length(); ++i) { - Type* source = types[i]; - unsigned typeCount = 0; - unsigned fieldCount = 1; - while (source[typeCount] != Type_none) { - ++typeCount; - ++fieldCount; - } - - THREAD_RUNTIME_ARRAY(t, Field, fields, fieldCount); - - init(new (RUNTIME_ARRAY_BODY(fields)) Field, - Type_object, - 0, - BytesPerWord, - 0, - TargetBytesPerWord); - - unsigned buildOffset = BytesPerWord; - unsigned targetOffset = TargetBytesPerWord; - bool sawArray = false; - Type type = Type_none; - unsigned buildSize = 0; - unsigned targetSize = 0; - unsigned fieldOffset = 1; - for (unsigned j = 0; j < typeCount; ++j) { - switch (source[j]) { - case Type_object: - type = Type_object; - buildSize = BytesPerWord; - targetSize = TargetBytesPerWord; - break; - - case Type_object_nogc: - type = Type_object_nogc; - buildSize = BytesPerWord; - targetSize = TargetBytesPerWord; - break; - - case Type_word: - case Type_intptr_t: - case Type_uintptr_t: - type = Type_intptr_t; - buildSize = BytesPerWord; - targetSize = TargetBytesPerWord; - break; - - case Type_int8_t: - case Type_uint8_t: - type = Type_int8_t; - buildSize = targetSize = 1; - break; - - case Type_int16_t: - case Type_uint16_t: - type = Type_int16_t; - buildSize = targetSize = 2; - break; - - case Type_int32_t: - case Type_uint32_t: - case Type_float: - type = Type_int32_t; - buildSize = targetSize = 4; - break; - - case Type_int64_t: - case Type_uint64_t: - case Type_double: - type = Type_int64_t; - buildSize = targetSize = 8; - break; - - case Type_array: - type = Type_none; - buildSize = targetSize = 0; - break; - - default: - abort(t); - } - - if (source[j] == Type_array) { - sawArray = true; - } - - if (not sawArray) { - buildOffset = pad(buildOffset, buildSize); - - targetOffset = pad(targetOffset, targetSize); - - init(new (RUNTIME_ARRAY_BODY(fields) + (fieldOffset++)) Field, - type, - buildOffset, - buildSize, - targetOffset, - targetSize); - - buildOffset += buildSize; - targetOffset += targetSize; - } - } - - unsigned fixedFieldCount; - Type arrayElementType; - unsigned buildArrayElementSize; - unsigned targetArrayElementSize; - if (sawArray) { - fixedFieldCount = fieldCount - 2; - arrayElementType = type; - buildArrayElementSize = buildSize; - targetArrayElementSize = targetSize; - } else { - fixedFieldCount = fieldCount; - arrayElementType = Type_none; - buildArrayElementSize = 0; - targetArrayElementSize = 0; - } - - GcByteArray* array = makeByteArray( - t, - TypeMap::sizeInBytes(ceilingDivide(buildOffset, BytesPerWord), - fixedFieldCount)); - - TypeMap* map = new (array->body().begin()) - TypeMap(ceilingDivide(buildOffset, BytesPerWord), - ceilingDivide(targetOffset, TargetBytesPerWord), - fixedFieldCount, - TypeMap::NormalKind, - buildArrayElementSize, - targetArrayElementSize, - arrayElementType); - - for (unsigned j = 0; j < fixedFieldCount; ++j) { - Field* f = RUNTIME_ARRAY_BODY(fields) + j; - - expect(t, f->buildOffset < map->buildFixedSizeInWords * BytesPerWord); - - map->targetFixedOffsets()[f->buildOffset] = f->targetOffset; - - map->fixedFields()[j] = *f; - } - - hashMapInsert( - t, - typeMaps, - reinterpret_cast(vm::type(t, static_cast(i))), - reinterpret_cast(array), - objectHash); - } - - constants = makeCodeImage(t, - &zone, - image, - code, - hostVM, - className, - methodName, - methodSpec, - typeMaps); - - PROTECT(t, constants); - - // these roots will not be used when the bootimage is loaded, so - // there's no need to preserve them: - roots(t)->setPoolMap(t, 0); - - GcWeakHashMap* map = makeWeakHashMap(t, 0, 0); - // sequence point, for gc (don't recombine statements) - roots(t)->setByteArrayMap(t, map->as(t)); - - // name all primitive classes so we don't try to update immutable - // references at runtime: - { - GcByteArray* name = makeByteArray(t, "void"); - // sequence point, for gc (don't recombine statements) - type(t, GcJvoid::Type)->setName(t, name); - - name = makeByteArray(t, "boolean"); - // sequence point, for gc (don't recombine statements) - type(t, GcJboolean::Type)->setName(t, name); - - name = makeByteArray(t, "byte"); - // sequence point, for gc (don't recombine statements) - type(t, GcJbyte::Type)->setName(t, name); - - name = makeByteArray(t, "short"); - // sequence point, for gc (don't recombine statements) - type(t, GcJshort::Type)->setName(t, name); - - name = makeByteArray(t, "char"); - // sequence point, for gc (don't recombine statements) - type(t, GcJchar::Type)->setName(t, name); - - name = makeByteArray(t, "int"); - // sequence point, for gc (don't recombine statements) - type(t, GcJint::Type)->setName(t, name); - - name = makeByteArray(t, "float"); - // sequence point, for gc (don't recombine statements) - type(t, GcJfloat::Type)->setName(t, name); - - name = makeByteArray(t, "long"); - // sequence point, for gc (don't recombine statements) - type(t, GcJlong::Type)->setName(t, name); - - name = makeByteArray(t, "double"); - // sequence point, for gc (don't recombine statements) - type(t, GcJdouble::Type)->setName(t, name); - } - - // resolve primitive array classes in case they are needed at - // runtime: - { - GcByteArray* name = makeByteArray(t, "[B"); - resolveSystemClass(t, roots(t)->bootLoader(), name, true); - - name = makeByteArray(t, "[Z"); - resolveSystemClass(t, roots(t)->bootLoader(), name, true); - - name = makeByteArray(t, "[S"); - resolveSystemClass(t, roots(t)->bootLoader(), name, true); - - name = makeByteArray(t, "[C"); - resolveSystemClass(t, roots(t)->bootLoader(), name, true); - - name = makeByteArray(t, "[I"); - resolveSystemClass(t, roots(t)->bootLoader(), name, true); - - name = makeByteArray(t, "[J"); - resolveSystemClass(t, roots(t)->bootLoader(), name, true); - - name = makeByteArray(t, "[F"); - resolveSystemClass(t, roots(t)->bootLoader(), name, true); - - name = makeByteArray(t, "[D"); - resolveSystemClass(t, roots(t)->bootLoader(), name, true); - } - } - - target_uintptr_t* heap - = static_cast(t->m->heap->allocate(HeapCapacity)); - - target_uintptr_t* heapMap = static_cast( - t->m->heap->allocate(heapMapSize(HeapCapacity))); - memset(heapMap, 0, heapMapSize(HeapCapacity)); - - HeapWalker* heapWalker = makeHeapImage( - t, image, heap, heapMap, HeapCapacity, constants, typeMaps); - - updateConstants(t, constants, heapWalker->map()); - - image->bootClassCount - = cast(t, roots(t)->bootLoader()->map())->size(); - - unsigned* bootClassTable = static_cast( - t->m->heap->allocate(image->bootClassCount * sizeof(unsigned))); - - { - unsigned i = 0; - for (HashMapIterator it(t, - cast(t, roots(t)->bootLoader()->map())); - it.hasMore();) { - bootClassTable[i++] - = targetVW(heapWalker->map()->find(it.next()->second())); - } - } - - image->appClassCount - = cast(t, roots(t)->appLoader()->map())->size(); - - unsigned* appClassTable = static_cast( - t->m->heap->allocate(image->appClassCount * sizeof(unsigned))); - - { - unsigned i = 0; - for ( - HashMapIterator it(t, cast(t, roots(t)->appLoader()->map())); - it.hasMore();) { - appClassTable[i++] - = targetVW(heapWalker->map()->find(it.next()->second())); - } - } - - image->stringCount = roots(t)->stringMap()->size(); - unsigned* stringTable = static_cast( - t->m->heap->allocate(image->stringCount * sizeof(unsigned))); - - { - unsigned i = 0; - for (HashMapIterator it(t, roots(t)->stringMap()); it.hasMore();) { - stringTable[i++] - = targetVW(heapWalker->map()->find(reinterpret_cast( - cast(t, it.next()->first())->target()))); - } - } - - unsigned* callTable = t->m->processor->makeCallTable(t, heapWalker); - - heapWalker->dispose(); - - image->magic = BootImage::Magic; - image->initialized = 0; - - fprintf(stderr, - "class count %d string count %d call count %d\n" - "heap size %d code size %d\n", - image->bootClassCount, - image->stringCount, - image->callCount, - image->heapSize, - image->codeSize); - - Buffer bootimageData; - - if (true) { - { - BootImage targetImage; - -#ifdef FIELD -#undef FIELD -#endif - -#define FIELD(name) targetImage.name = targetV4(image->name); -#include "bootimage-fields.cpp" -#undef FIELD - -#define THUNK_FIELD(name) \ - targetImage.thunks.name = targetThunk(image->thunks.name); -#include "bootimage-fields.cpp" -#undef THUNK_FIELD - - bootimageData.write(&targetImage, sizeof(BootImage)); - } - - bootimageData.write(bootClassTable, - image->bootClassCount * sizeof(unsigned)); - bootimageData.write(appClassTable, image->appClassCount * sizeof(unsigned)); - bootimageData.write(stringTable, image->stringCount * sizeof(unsigned)); - bootimageData.write(callTable, image->callCount * sizeof(unsigned) * 2); - - unsigned offset = sizeof(BootImage) - + (image->bootClassCount * sizeof(unsigned)) - + (image->appClassCount * sizeof(unsigned)) - + (image->stringCount * sizeof(unsigned)) - + (image->callCount * sizeof(unsigned) * 2); - - while (offset % TargetBytesPerWord) { - uint8_t c = 0; - bootimageData.write(&c, 1); - ++offset; - } - - bootimageData.write(heapMap, - pad(heapMapSize(image->heapSize), TargetBytesPerWord)); - - bootimageData.write(heap, pad(image->heapSize, TargetBytesPerWord)); - - // fwrite(code, pad(image->codeSize, TargetBytesPerWord), 1, codeOutput); - - Platform* platform = Platform::getPlatform( - PlatformInfo((PlatformInfo::Format)AVIAN_TARGET_FORMAT, - (PlatformInfo::Architecture)AVIAN_TARGET_ARCH)); - - if (!platform) { - fprintf(stderr, - "unsupported platform: target-format = %d / target-arch = %d\n", - AVIAN_TARGET_FORMAT, - AVIAN_TARGET_ARCH); - abort(); - } - - uint8_t* bootimage; - size_t bootimageLength; - if (useLZMA) { -#ifdef AVIAN_USE_LZMA - bootimage = encodeLZMA(t->m->system, - t->m->heap, - bootimageData.data, - bootimageData.length, - &bootimageLength); - - fprintf(stderr, "compressed heap size %zu\n", bootimageLength); -#else - abort(t); -#endif - } else { - bootimage = bootimageData.data; - bootimageLength = bootimageData.length; - } - - SymbolInfo bootimageSymbols[] - = {SymbolInfo(0, bootimageStart), - SymbolInfo(bootimageLength, bootimageEnd)}; - - platform->writeObject(bootimageOutput, - Slice(bootimageSymbols, 2), - Slice(bootimage, bootimageLength), - Platform::Writable, - TargetBytesPerWord); - - if (useLZMA) { - t->m->heap->free(bootimage, bootimageLength); - } - - compilationHandler.symbols.add(SymbolInfo(0, codeimageStart)); - compilationHandler.symbols.add(SymbolInfo(image->codeSize, codeimageEnd)); - - platform->writeObject(codeOutput, - Slice(compilationHandler.symbols), - Slice(code, image->codeSize), - Platform::Executable, - TargetBytesPerWord); - - for (SymbolInfo* sym = compilationHandler.symbols.begin(); - sym != compilationHandler.symbols.end() - 2; - sym++) { - t->m->heap->free(const_cast((const void*)sym->name.text), - sym->name.length + 1); - } - } -} - -uint64_t writeBootImage(Thread* t, uintptr_t* arguments) -{ - OutputStream* bootimageOutput = reinterpret_cast(arguments[0]); - OutputStream* codeOutput = reinterpret_cast(arguments[1]); - BootImage* image = reinterpret_cast(arguments[2]); - uint8_t* code = reinterpret_cast(arguments[3]); - JavaVM* hostVM = reinterpret_cast(arguments[4]); - const char* className = reinterpret_cast(arguments[5]); - const char* methodName = reinterpret_cast(arguments[6]); - const char* methodSpec = reinterpret_cast(arguments[7]); - - const char* bootimageStart = reinterpret_cast(arguments[8]); - const char* bootimageEnd = reinterpret_cast(arguments[9]); - const char* codeimageStart = reinterpret_cast(arguments[10]); - const char* codeimageEnd = reinterpret_cast(arguments[11]); - bool useLZMA = arguments[12]; - - writeBootImage2(t, - bootimageOutput, - codeOutput, - image, - code, - hostVM, - className, - methodName, - methodSpec, - bootimageStart, - bootimageEnd, - codeimageStart, - codeimageEnd, - useLZMA); - - return 1; -} - -char* myStrndup(const char* src, unsigned length) -{ - char* s = static_cast(malloc(length + 1)); - memcpy(s, src, length); - s[length] = 0; - return s; -} - -class Arguments { - public: - const char* classpath; - - const char* bootimage; - const char* codeimage; - - const char* hostvm; - - char* entryClass; - char* entryMethod; - char* entrySpec; - - char* bootimageStart; - char* bootimageEnd; - - char* codeimageStart; - char* codeimageEnd; - - bool useLZMA; - - bool maybeSplit(const char* src, char*& destA, char*& destB) - { - if (src) { - const char* split = strchr(src, ':'); - if (!split) { - return false; - } - - destA = myStrndup(src, split - src); - destB = strdup(split + 1); - } - return true; - } - - Arguments(int ac, const char** av) - : entryClass(0), - entryMethod(0), - entrySpec(0), - bootimageStart(0), - bootimageEnd(0), - codeimageStart(0), - codeimageEnd(0) - { - ArgParser parser; - Arg classpath(parser, true, "cp", ""); - Arg bootimage(parser, true, "bootimage", ""); - Arg codeimage(parser, true, "codeimage", ""); - Arg hostvm(parser, false, "hostvm", ""); - Arg entry( - parser, false, "entry", "[.[]]"); - Arg bootimageSymbols(parser, - false, - "bootimage-symbols", - ":"); - Arg codeimageSymbols(parser, - false, - "codeimage-symbols", - ":"); - Arg useLZMA(parser, false, "use-lzma", 0); - - if (!parser.parse(ac, av)) { - parser.printUsage(av[0]); - exit(1); - } - - this->classpath = classpath.value; - this->bootimage = bootimage.value; - this->codeimage = codeimage.value; - this->hostvm = hostvm.value; - this->useLZMA = useLZMA.value != 0; - - if (entry.value) { - if (const char* entryClassEnd = strchr(entry.value, '.')) { - entryClass = myStrndup(entry.value, entryClassEnd - entry.value); - if (const char* entryMethodEnd = strchr(entryClassEnd, '(')) { - entryMethod = myStrndup(entryClassEnd + 1, - entryMethodEnd - entryClassEnd - 1); - entrySpec = strdup(entryMethodEnd); - } else { - entryMethod = strdup(entryClassEnd + 1); - } - } else { - entryClass = strdup(entry.value); - } - } - - if (!maybeSplit(bootimageSymbols.value, bootimageStart, bootimageEnd) - || !maybeSplit(codeimageSymbols.value, codeimageStart, codeimageEnd)) { - fprintf(stderr, "wrong format for symbols\n"); - parser.printUsage(av[0]); - exit(1); - } - - if (!bootimageStart) { - bootimageStart = strdup("_binary_bootimage_bin_start"); - } - - if (!bootimageEnd) { - bootimageEnd = strdup("_binary_bootimage_bin_end"); - } - - if (!codeimageStart) { - codeimageStart = strdup("_binary_codeimage_bin_start"); - } - - if (!codeimageEnd) { - codeimageEnd = strdup("_binary_codeimage_bin_end"); - } - } - - ~Arguments() - { - if (entryClass) { - free(entryClass); - } - if (entryMethod) { - free(entryMethod); - } - if (entrySpec) { - free(entrySpec); - } - if (bootimageStart) { - free(bootimageStart); - } - if (bootimageEnd) { - free(bootimageEnd); - } - if (codeimageStart) { - free(codeimageStart); - } - if (codeimageEnd) { - free(codeimageEnd); - } - } - - void dump() - { - printf( - "classpath = %s\n" - "bootimage = %s\n" - "codeimage = %s\n" - "hostvm = %s\n" - "entryClass = %s\n" - "entryMethod = %s\n" - "entrySpec = %s\n" - "bootimageStart = %s\n" - "bootimageEnd = %s\n" - "codeimageStart = %s\n" - "codeimageEnd = %s\n", - classpath, - bootimage, - codeimage, - hostvm, - entryClass, - entryMethod, - entrySpec, - bootimageStart, - bootimageEnd, - codeimageStart, - codeimageEnd); - } -}; - -} // namespace - -int main(int ac, const char** av) -{ - Arguments args(ac, av); - // args.dump(); - - System* s = makeSystem(); - Heap* h = makeHeap(s, HeapCapacity * 2); - Classpath* c = makeClasspath(s, h, AVIAN_JAVA_HOME, AVIAN_EMBED_PREFIX); - Finder* f = makeFinder(s, h, args.classpath, 0); - Processor* p = makeProcessor(s, h, 0, false); - -// todo: currently, the compiler cannot compile code with jumps or -// calls spanning more than the maximum size of an immediate value -// in a branch instruction for the target architecture (~32MB on ARM). -// When that limitation is removed, we'll be able to specify a -// capacity as large as we like here: -#if (AVIAN_TARGET_ARCH == AVIAN_ARCH_X86_64) \ - || (AVIAN_TARGET_ARCH == AVIAN_ARCH_X86) - const unsigned CodeCapacity = 128 * 1024 * 1024; -#else - const unsigned CodeCapacity = 30 * 1024 * 1024; -#endif - - Slice code = Slice::alloc(h, CodeCapacity); - BootImage image; - p->initialize(&image, code); - - Machine* m = new (h->allocate(sizeof(Machine))) - Machine(s, h, f, 0, p, c, 0, 0, 0, 0, 128 * 1024); - Thread* t = p->makeThread(m, 0, 0); - - enter(t, Thread::ActiveState); - enter(t, Thread::IdleState); - - FileOutputStream bootimageOutput(args.bootimage); - if (!bootimageOutput.isValid()) { - fprintf(stderr, "unable to open %s\n", args.bootimage); - return -1; - } - - FileOutputStream codeOutput(args.codeimage); - if (!codeOutput.isValid()) { - fprintf(stderr, "unable to open %s\n", args.codeimage); - return -1; - } - - JavaVM* hostVM = 0; - System::Library* hostVMLibrary = 0; - if (args.hostvm) { - if (s->success(s->load(&hostVMLibrary, args.hostvm))) { - typedef jint(JNICALL * CreateVM)(Machine**, Thread**, void*); - const char* name = "JNI_CreateJavaVM"; - CreateVM createVM - = reinterpret_cast(hostVMLibrary->resolve(name)); - - if (createVM) { - JavaVMInitArgs vmArgs; - vmArgs.version = JNI_VERSION_1_6; - vmArgs.nOptions = 2; - vmArgs.ignoreUnrecognized = JNI_TRUE; - -#define CLASSPATH_PROPERTY "-Xbootclasspath:" - - const char* classpath = args.classpath; - size_t classpathSize = strlen(classpath); - size_t classpathPropertyBufferSize = sizeof(CLASSPATH_PROPERTY) - + classpathSize; - - RUNTIME_ARRAY( - char, classpathPropertyBuffer, classpathPropertyBufferSize); - memcpy(RUNTIME_ARRAY_BODY(classpathPropertyBuffer), - CLASSPATH_PROPERTY, - sizeof(CLASSPATH_PROPERTY) - 1); - memcpy(RUNTIME_ARRAY_BODY(classpathPropertyBuffer) - + sizeof(CLASSPATH_PROPERTY) - 1, - classpath, - classpathSize + 1); - - JavaVMOption options[2]; - options[0].optionString = RUNTIME_ARRAY_BODY(classpathPropertyBuffer); - options[1].optionString = const_cast("-Davian.reentrant=true"); - - vmArgs.options = options; - - Thread* dummy; - if (JNI_OK != createVM(&hostVM, &dummy, &vmArgs)) { - fprintf(stderr, "unable to initialize host VM\n"); - hostVMLibrary->disposeAll(); - return -1; - } - } else { - fprintf(stderr, "unable to find %s in %s\n", name, args.hostvm); - hostVMLibrary->disposeAll(); - return -1; - } - } else { - fprintf(stderr, "unable to open %s\n", args.hostvm); - return -1; - } - } - - uintptr_t arguments[] = {reinterpret_cast(&bootimageOutput), - reinterpret_cast(&codeOutput), - reinterpret_cast(&image), - reinterpret_cast(code.begin()), - reinterpret_cast(hostVM), - reinterpret_cast(args.entryClass), - reinterpret_cast(args.entryMethod), - reinterpret_cast(args.entrySpec), - reinterpret_cast(args.bootimageStart), - reinterpret_cast(args.bootimageEnd), - reinterpret_cast(args.codeimageStart), - reinterpret_cast(args.codeimageEnd), - static_cast(args.useLZMA)}; - - run(t, writeBootImage, arguments); - - if (hostVM) { - hostVM->vtable->DestroyJavaVM(hostVM); - hostVMLibrary->disposeAll(); - } - - if (t->exception) { - printTrace(t, t->exception); - return -1; - } else { - return 0; - } -} diff --git a/sgx-jvm/avian/src/tools/object-writer/CMakeLists.txt b/sgx-jvm/avian/src/tools/object-writer/CMakeLists.txt deleted file mode 100644 index 1437bf1d67..0000000000 --- a/sgx-jvm/avian/src/tools/object-writer/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -add_library(object_writer - elf.cpp - mach-o.cpp - pe.cpp - tools.cpp -) \ No newline at end of file diff --git a/sgx-jvm/avian/src/tools/object-writer/elf.cpp b/sgx-jvm/avian/src/tools/object-writer/elf.cpp deleted file mode 100644 index a54690d10c..0000000000 --- a/sgx-jvm/avian/src/tools/object-writer/elf.cpp +++ /dev/null @@ -1,407 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include -#include - -#include "endianness.h" - -#include - -#define EI_NIDENT 16 - -#define EI_MAG0 0 -#define EI_MAG1 1 -#define EI_MAG2 2 -#define EI_MAG3 3 -#define EI_CLASS 4 -#define EI_DATA 5 -#define EI_VERSION 6 -#define EI_OSABI 7 -#define EI_ABIVERSION 8 - -#define ELFMAG0 0x7f -#define ELFMAG1 'E' -#define ELFMAG2 'L' -#define ELFMAG3 'F' - -#define ELFCLASS64 2 -#define ELFCLASS32 1 - -#define EV_CURRENT 1 - -#define ELFDATA2LSB 1 -#define ELFDATA2MSB 2 - -#define ELFOSABI_SYSV 0 - -#define ET_REL 1 - -#define EM_386 3 -#define EM_X86_64 62 -#define EM_ARM 40 -#define EM_AARCH64 183 - -#define SHT_PROGBITS 1 -#define SHT_SYMTAB 2 -#define SHT_STRTAB 3 - -#define SHF_WRITE (1 << 0) -#define SHF_ALLOC (1 << 1) -#define SHF_EXECINSTR (1 << 2) - -#define STB_GLOBAL 1 - -#define STT_NOTYPE 0 - -#define STV_DEFAULT 0 - -#define SYMBOL_INFO(bind, type) (((bind) << 4) + ((type)&0xf)) - -#define OSABI ELFOSABI_SYSV - -namespace { - -using namespace avian::tools; -using namespace avian::util; - -template -struct ElfTypes { - typedef uint16_t Half; - typedef uint32_t Word; - typedef AddrTy Addr; - typedef uint64_t Xword; - typedef uint16_t Section; - typedef AddrTy Off; - typedef AddrTy XFlags; - static const unsigned BytesPerWord = sizeof(AddrTy); -}; - -template -struct Symbol_Ty; - -template <> -struct Symbol_Ty { - typedef ElfTypes Elf; - - Elf::Word st_name; - unsigned char st_info; - unsigned char st_other; - Elf::Section st_shndx; - Elf::Addr st_value; - Elf::Xword st_size; -}; - -template <> -struct Symbol_Ty { - typedef ElfTypes Elf; - - Elf::Word st_name; - Elf::Addr st_value; - Elf::Word st_size; - unsigned char st_info; - unsigned char st_other; - Elf::Section st_shndx; -}; - -using avian::endian::Endianness; - -#define V1 Endianness::v1 -#define V2 Endianness::v2 -#define V3 Endianness::v3 -#define V4 Endianness::v4 -#define VANY Endianness::vAny - -unsigned getElfPlatform(PlatformInfo::Architecture arch) -{ - switch (arch) { - case PlatformInfo::x86_64: - return EM_X86_64; - case PlatformInfo::x86: - return EM_386; - case PlatformInfo::Arm: - return EM_ARM; - case PlatformInfo::Arm64: - return EM_AARCH64; - default: - return ~0; - } -} - -const char* getSectionName(unsigned accessFlags, unsigned& sectionFlags) -{ - sectionFlags = SHF_ALLOC; - if (accessFlags & Platform::Writable) { - if (accessFlags & Platform::Executable) { - sectionFlags |= SHF_WRITE | SHF_EXECINSTR; - return ".rwx"; - } else { - sectionFlags |= SHF_WRITE; - return ".data"; - } - } else if (accessFlags & Platform::Executable) { - sectionFlags |= SHF_EXECINSTR; - return ".text"; - } else { - return ".rodata"; - } -} - -template -class ElfPlatform : public Platform { - public: - typedef ElfTypes Elf; - static const unsigned Class = Elf::BytesPerWord / 4; - - struct FileHeader { - unsigned char e_ident[EI_NIDENT]; - typename Elf::Half e_type; - typename Elf::Half e_machine; - typename Elf::Word e_version; - typename Elf::Addr e_entry; - typename Elf::Off e_phoff; - typename Elf::Off e_shoff; - typename Elf::Word e_flags; - typename Elf::Half e_ehsize; - typename Elf::Half e_phentsize; - typename Elf::Half e_phnum; - typename Elf::Half e_shentsize; - typename Elf::Half e_shnum; - typename Elf::Half e_shstrndx; - }; - - struct SectionHeader { - typename Elf::Word sh_name; - typename Elf::Word sh_type; - typename Elf::XFlags sh_flags; - typename Elf::Addr sh_addr; - typename Elf::Off sh_offset; - typename Elf::Off sh_size; - typename Elf::Word sh_link; - typename Elf::Word sh_info; - typename Elf::Addr sh_addralign; - typename Elf::Off sh_entsize; - }; - - typedef Symbol_Ty Symbol; - - static const unsigned Encoding = TargetLittleEndian ? ELFDATA2LSB - : ELFDATA2MSB; - - const unsigned machine; - - ElfPlatform(PlatformInfo::Architecture arch) - : Platform(PlatformInfo(PlatformInfo::Elf, arch)), - machine(getElfPlatform(arch)) - { - } - - class FileWriter { - public: - unsigned sectionCount; - unsigned sectionStringTableSectionNumber; - - AddrTy dataOffset; - - FileHeader header; - StringTable strings; - - FileWriter(unsigned machine) - : sectionCount(0), dataOffset(sizeof(FileHeader)) - { - memset(&header, 0, sizeof(FileHeader)); - header.e_ident[EI_MAG0] = V1(ELFMAG0); - header.e_ident[EI_MAG1] = V1(ELFMAG1); - header.e_ident[EI_MAG2] = V1(ELFMAG2); - header.e_ident[EI_MAG3] = V1(ELFMAG3); - header.e_ident[EI_CLASS] = V1(Class); - header.e_ident[EI_DATA] = V1(Encoding); - header.e_ident[EI_VERSION] = V1(EV_CURRENT); - header.e_ident[EI_OSABI] = V1(OSABI); - header.e_ident[EI_ABIVERSION] = V1(0); - header.e_type = V2(ET_REL); - header.e_machine = V2(machine); - header.e_version = V4(EV_CURRENT); - header.e_entry = VANY(static_cast(0)); - header.e_phoff = VANY(static_cast(0)); - header.e_shoff = VANY(static_cast(sizeof(FileHeader))); - header.e_flags = V4(machine == EM_ARM ? 0x04000000 : 0); - header.e_ehsize = V2(sizeof(FileHeader)); - header.e_phentsize = V2(0); - header.e_phnum = V2(0); - header.e_shentsize = V2(sizeof(SectionHeader)); - } - - void writeHeader(OutputStream* out) - { - header.e_shnum = V2(sectionCount); - header.e_shstrndx = V2(sectionStringTableSectionNumber); - out->writeChunk(&header, sizeof(FileHeader)); - } - }; - - class SectionWriter { - public: - FileWriter& file; - String name; - SectionHeader header; - const size_t* dataSize; - const uint8_t* const* data; - - SectionWriter(FileWriter& file) : file(file), name(""), dataSize(0), data(0) - { - memset(&header, 0, sizeof(SectionHeader)); - file.sectionCount++; - file.dataOffset += sizeof(SectionHeader); - size_t nameOffset = file.strings.add(name); - header.sh_name = V4(nameOffset); - } - - SectionWriter(FileWriter& file, - const char* chname, - unsigned type, - AddrTy flags, - unsigned alignment, - AddrTy addr, - const uint8_t* const* data, - size_t* dataSize, - size_t entsize = 0, - unsigned link = 0) - : file(file), name(chname), dataSize(dataSize), data(data) - { - if (strcmp(chname, ".shstrtab") == 0) { - file.sectionStringTableSectionNumber = file.sectionCount; - } - file.sectionCount++; - file.dataOffset += sizeof(SectionHeader); - size_t nameOffset = file.strings.add(name); - - header.sh_name = V4(nameOffset); - header.sh_type = V4(type); - header.sh_flags = VANY(flags); - header.sh_addr = VANY(addr); - // header.sh_offset = VANY(static_cast(bodySectionOffset)); - // header.sh_size = VANY(static_cast(*dataSize)); - header.sh_link = V4(link); - header.sh_info = V4(0); - header.sh_addralign = VANY(static_cast(alignment)); - header.sh_entsize = VANY(static_cast(entsize)); - } - - void writeHeader(OutputStream* out) - { - if (dataSize) { - header.sh_offset = VANY(file.dataOffset); - header.sh_size = VANY(static_cast(*dataSize)); - file.dataOffset += *dataSize; - } - - out->writeChunk(&header, sizeof(SectionHeader)); - } - - void writeData(OutputStream* out) - { - if (data) { - out->writeChunk(*data, *dataSize); - } - } - }; - - virtual bool writeObject(OutputStream* out, - Slice symbols, - Slice data, - unsigned accessFlags, - unsigned alignment) - { - unsigned sectionFlags; - const char* sectionName = getSectionName(accessFlags, sectionFlags); - - StringTable symbolStringTable; - Buffer symbolTable; - - FileWriter file(machine); - - const int bodySectionNumber = 1; - const int stringTableSectionNumber = 3; - - SectionWriter sections[] = {SectionWriter(file), // null section - SectionWriter(file, - sectionName, - SHT_PROGBITS, - sectionFlags, - alignment, - 0, - &data.items, - &data.count), // body section - SectionWriter(file, - ".shstrtab", - SHT_STRTAB, - 0, - 1, - 0, - &file.strings.data, - &file.strings.length), - SectionWriter(file, - ".strtab", - SHT_STRTAB, - 0, - 1, - 0, - &symbolStringTable.data, - &symbolStringTable.length), - SectionWriter(file, - ".symtab", - SHT_SYMTAB, - 0, - 8, - 0, - &symbolTable.data, - &symbolTable.length, - sizeof(Symbol), - stringTableSectionNumber)}; - - // for some reason, string tables require a null first element... - symbolStringTable.add(""); - - for (SymbolInfo* sym = symbols.begin(); sym != symbols.end(); sym++) { - size_t nameOffset = symbolStringTable.add(sym->name); - - Symbol symbolStruct; - symbolStruct.st_name = V4(nameOffset); - symbolStruct.st_value = VANY(static_cast(sym->addr)); - symbolStruct.st_size = VANY(static_cast(0)); - symbolStruct.st_info = V1(SYMBOL_INFO(STB_GLOBAL, STT_NOTYPE)); - symbolStruct.st_other = V1(STV_DEFAULT); - symbolStruct.st_shndx = V2(bodySectionNumber); - symbolTable.write(&symbolStruct, sizeof(Symbol)); - } - - file.writeHeader(out); - - for (unsigned i = 0; i < file.sectionCount; i++) { - sections[i].writeHeader(out); - } - - for (unsigned i = 0; i < file.sectionCount; i++) { - sections[i].writeData(out); - } - - return true; - } -}; - -ElfPlatform elfX86Platform(PlatformInfo::x86); -ElfPlatform elfArmPlatform(PlatformInfo::Arm); -ElfPlatform elfArm64Platform(PlatformInfo::Arm64); -ElfPlatform elfX86_64Platform(PlatformInfo::x86_64); - -} // namespace diff --git a/sgx-jvm/avian/src/tools/object-writer/endianness.h b/sgx-jvm/avian/src/tools/object-writer/endianness.h deleted file mode 100644 index f29c90bf24..0000000000 --- a/sgx-jvm/avian/src/tools/object-writer/endianness.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_ENDIANNESS_H -#define AVIAN_ENDIANNESS_H - -namespace avian { - -namespace endian { - -static union { - uint32_t i; - char c[4]; -} _DetectEndianness = {1}; - -const bool LittleEndian = _DetectEndianness.c[0] == 1; - -template -class Endianness { - public: - static inline uint8_t v1(uint8_t v) - { - return v; - } - - static inline uint16_t v2(uint16_t v) - { - if (LittleEndian == TargetLittleEndian) { - return v; - } else { - return ((v >> 8) & 0xFF) | (v << 8); - } - } - - static inline uint32_t v4(uint32_t v) - { - if (LittleEndian == TargetLittleEndian) { - return v; - } else { - return ((v >> 24) & 0x000000FF) | ((v >> 8) & 0x0000FF00) - | ((v << 8) & 0x00FF0000) | ((v << 24)); - } - } - - static inline uint32_t vAny(uint32_t v) - { - return v4(v); - } - - static inline uint64_t v8(uint64_t v) - { - if (LittleEndian == TargetLittleEndian) { - return v; - } else { - return ((static_cast(v) >> 56) - & (static_cast(0xff) << 0)) - | ((static_cast(v) >> 40) - & (static_cast(0xff) << 8)) - | ((static_cast(v) >> 24) - & (static_cast(0xff) << 16)) - | ((static_cast(v) >> 8) - & (static_cast(0xff) << 24)) - | ((static_cast(v) << 8) - & (static_cast(0xff) << 32)) - | ((static_cast(v) << 24) - & (static_cast(0xff) << 40)) - | ((static_cast(v) << 40) - & (static_cast(0xff) << 48)) - | ((static_cast(v) << 56)); - } - } - - static inline uint64_t vAny(uint64_t v) - { - return v8(v); - } -}; - -} // namespace endian - -} // namespace avian - -#endif // AVIAN_ENDIANNESS_H diff --git a/sgx-jvm/avian/src/tools/object-writer/mach-o.cpp b/sgx-jvm/avian/src/tools/object-writer/mach-o.cpp deleted file mode 100644 index 85f713ba23..0000000000 --- a/sgx-jvm/avian/src/tools/object-writer/mach-o.cpp +++ /dev/null @@ -1,292 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include - -#include "endianness.h" - -#include - -#define MH_MAGIC_64 0xfeedfacf -#define MH_MAGIC 0xfeedface - -#define MH_OBJECT 1 - -#define LC_SYMTAB 2 - -#define S_REGULAR 0 - -#define N_SECT 0xe -#define N_EXT 0x1 - -#define CPU_ARCH_ABI64 0x01000000 - -#define CPU_TYPE_I386 7 -#define CPU_TYPE_X86_64 (CPU_TYPE_I386 | CPU_ARCH_ABI64) -#define CPU_TYPE_ARM 12 -#define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64) - -#define CPU_SUBTYPE_I386_ALL 3 -#define CPU_SUBTYPE_X86_64_ALL CPU_SUBTYPE_I386_ALL -#define CPU_SUBTYPE_ARM_V7 9 -#define CPU_SUBTYPE_ARM_V8 13 - -namespace { - -using namespace avian::tools; -using namespace avian::util; - -typedef int cpu_type_t; -typedef int cpu_subtype_t; -typedef int vm_prot_t; - -using avian::endian::Endianness; - -#define V1 Endianness::v1 -#define V2 Endianness::v2 -#define V3 Endianness::v3 -#define V4 Endianness::v4 -#define VANY Endianness::vAny - -inline unsigned log(unsigned n) -{ - unsigned r = 0; - for (unsigned i = 1; i < n; ++r) - i <<= 1; - return r; -} - -template -class MachOPlatform : public Platform { - public: - struct FileHeader { - uint32_t magic; - cpu_type_t cputype; - cpu_subtype_t cpusubtype; - uint32_t filetype; - uint32_t ncmds; - uint32_t sizeofcmds; - - union { - uint32_t flags; - AddrTy flagsAndMaybeReserved; - }; - }; - - struct SegmentCommand { - uint32_t cmd; - uint32_t cmdsize; - char segname[16]; - AddrTy vmaddr; - AddrTy vmsize; - AddrTy fileoff; - AddrTy filesize; - vm_prot_t maxprot; - vm_prot_t initprot; - uint32_t nsects; - uint32_t flags; - }; - - struct Section { - char sectname[16]; - char segname[16]; - AddrTy addr; - AddrTy size; - uint32_t offset; - uint32_t align; - uint32_t reloff; - uint32_t nreloc; - uint32_t flags; - uint32_t reserved1; - AddrTy reserved2AndMaybe3; - }; - - struct NList { - union { - uint32_t n_strx; - } n_un; - uint8_t n_type; - uint8_t n_sect; - uint16_t n_desc; - AddrTy n_value; - }; - - struct SymtabCommand { - uint32_t cmd; - uint32_t cmdsize; - uint32_t symoff; - uint32_t nsyms; - uint32_t stroff; - uint32_t strsize; - }; - - static const unsigned BytesPerWord = sizeof(AddrTy); - static const unsigned Segment = BytesPerWord == 8 ? 0x19 : 1; - static const unsigned Magic = BytesPerWord == 8 ? 0xfeedfacf : 0xfeedface; - - static inline unsigned pad(unsigned n) - { - return (n + (BytesPerWord - 1)) & ~(BytesPerWord - 1); - } - - virtual bool writeObject(OutputStream* out, - Slice symbols, - Slice data, - unsigned accessFlags, - unsigned alignment) - { - cpu_type_t cpuType; - cpu_subtype_t cpuSubType; - switch (info.arch) { - case PlatformInfo::x86_64: - cpuType = CPU_TYPE_X86_64; - cpuSubType = CPU_SUBTYPE_X86_64_ALL; - break; - case PlatformInfo::x86: - cpuType = CPU_TYPE_I386; - cpuSubType = CPU_SUBTYPE_I386_ALL; - break; - case PlatformInfo::Arm: - cpuType = CPU_TYPE_ARM; - cpuSubType = CPU_SUBTYPE_ARM_V7; - break; - case PlatformInfo::Arm64: - cpuType = CPU_TYPE_ARM64; - cpuSubType = CPU_SUBTYPE_ARM_V8; - break; - default: - // should never happen (see MachOPlatform declarations at bottom) - fprintf(stderr, "unsupported architecture: %d\n", info.arch); - return false; - } - - const char* segmentName; - const char* sectionName; - if (accessFlags & Writable) { - if (accessFlags & Executable) { - segmentName = "__RWX"; - sectionName = "__rwx"; - } else { - segmentName = "__DATA"; - sectionName = "__data"; - } - } else { - segmentName = "__TEXT"; - sectionName = "__text"; - } - - FileHeader header = { - V4(Magic), // magic - static_cast(V4(cpuType)), - static_cast(V4(cpuSubType)), - V4(MH_OBJECT), // filetype, - V4(2), // ncmds - V4(sizeof(SegmentCommand) + sizeof(Section) - + sizeof(SymtabCommand)), // sizeofcmds - {V4(0)} // flags - }; - - AddrTy finalSize = pad(data.count); - - SegmentCommand segment = { - V4(Segment), // cmd - V4(sizeof(SegmentCommand) + sizeof(Section)), // cmdsize - "", // segname - VANY(static_cast(0)), // vmaddr - VANY(static_cast(finalSize)), // vmsize - VANY(static_cast(sizeof(FileHeader) + sizeof(SegmentCommand) - + sizeof(Section) - + sizeof(SymtabCommand))), // fileoff - VANY(static_cast(finalSize)), // filesize - static_cast(V4(7)), // maxprot - static_cast(V4(7)), // initprot - V4(1), // nsects - V4(0) // flags - }; - - strncpy(segment.segname, segmentName, sizeof(segment.segname)); - - Section sect = { - "", // sectname - "", // segname - VANY(static_cast(0)), // addr - VANY(static_cast(finalSize)), // size - V4(sizeof(FileHeader) + sizeof(SegmentCommand) + sizeof(Section) - + sizeof(SymtabCommand)), // offset - V4(log(alignment)), // align - V4(0), // reloff - V4(0), // nreloc - V4(S_REGULAR), // flags - V4(0), // reserved1 - V4(0), // reserved2 - }; - - strncpy(sect.segname, segmentName, sizeof(sect.segname)); - strncpy(sect.sectname, sectionName, sizeof(sect.sectname)); - - StringTable strings; - strings.add(""); - Buffer symbolList; - - for (SymbolInfo* sym = symbols.begin(); sym != symbols.end(); sym++) { - unsigned offset = strings.length; - strings.write("_", 1); - strings.add(sym->name); - NList symbol = { - {V4(offset)}, // n_un - V1(N_SECT | N_EXT), // n_type - V1(1), // n_sect - V2(0), // n_desc - VANY(static_cast(sym->addr)) // n_value - }; - symbolList.write(&symbol, sizeof(NList)); - } - - SymtabCommand symbolTable = { - V4(LC_SYMTAB), // cmd - V4(sizeof(SymtabCommand)), // cmdsize - V4(sizeof(FileHeader) + sizeof(SegmentCommand) + sizeof(Section) - + sizeof(SymtabCommand) + finalSize), // symoff - V4(symbols.count), // nsyms - V4(sizeof(FileHeader) + sizeof(SegmentCommand) + sizeof(Section) - + sizeof(SymtabCommand) + finalSize - + (sizeof(NList) * symbols.count)), // stroff - V4(strings.length), // strsize - }; - - out->writeChunk(&header, sizeof(header)); - out->writeChunk(&segment, sizeof(segment)); - out->writeChunk(§, sizeof(sect)); - out->writeChunk(&symbolTable, sizeof(symbolTable)); - - out->writeChunk(data.items, data.count); - out->writeRepeat(0, finalSize - data.count); - - out->writeChunk(symbolList.data, symbolList.length); - - out->writeChunk(strings.data, strings.length); - - return true; - } - - MachOPlatform(PlatformInfo::Architecture arch) - : Platform(PlatformInfo(PlatformInfo::MachO, arch)) - { - } -}; - -MachOPlatform darwinx86Platform(PlatformInfo::x86); -MachOPlatform darwinArmPlatform(PlatformInfo::Arm); -MachOPlatform darwinArm64Platform(PlatformInfo::Arm64); -MachOPlatform darwinx86_64Platform(PlatformInfo::x86_64); - -} // namespace diff --git a/sgx-jvm/avian/src/tools/object-writer/pe.cpp b/sgx-jvm/avian/src/tools/object-writer/pe.cpp deleted file mode 100644 index 22888f1ecb..0000000000 --- a/sgx-jvm/avian/src/tools/object-writer/pe.cpp +++ /dev/null @@ -1,299 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include -#include - -#include - -namespace { - -// --- winnt.h ---- -#define IMAGE_SIZEOF_SHORT_NAME 8 - -#define IMAGE_FILE_RELOCS_STRIPPED \ - 0x0001 // Relocation info stripped from file. -#define IMAGE_FILE_LINE_NUMS_STRIPPED \ - 0x0004 // Line nunbers stripped from file. -#define IMAGE_FILE_MACHINE_AMD64 0x8664 // AMD64 (K8) -#define IMAGE_FILE_MACHINE_I386 0x014c // Intel 386. -#define IMAGE_FILE_MACHINE_ARM 0x01c0 // ARM Little-Endian -#define IMAGE_FILE_MACHINE_THUMB 0x01c2 // ARM Thumb/Thumb-2 Little-Endian -#define IMAGE_FILE_MACHINE_ARMNT 0x01c4 // ARM Thumb-2 Little-Endian -#define IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine. - -#define IMAGE_SCN_ALIGN_1BYTES 0x100000 -#define IMAGE_SCN_ALIGN_2BYTES 0x200000 -#define IMAGE_SCN_ALIGN_4BYTES 0x300000 -#define IMAGE_SCN_ALIGN_8BYTES 0x400000 -#define IMAGE_SCN_MEM_EXECUTE 0x20000000 -#define IMAGE_SCN_MEM_READ 0x40000000 -#define IMAGE_SCN_MEM_WRITE 0x80000000 -#define IMAGE_SCN_CNT_CODE 32 - -#ifdef _MSC_VER -#define PACKED_STRUCT _declspec(align(1)) -#else -#define PACKED_STRUCT __attribute__((packed)) -#endif - -struct IMAGE_FILE_HEADER { - uint16_t Machine; - uint16_t NumberOfSections; - uint32_t TimeDateStamp; - uint32_t PointerToSymbolTable; - uint32_t NumberOfSymbols; - uint16_t SizeOfOptionalHeader; - uint16_t Characteristics; -} PACKED_STRUCT; - -struct IMAGE_SECTION_HEADER { - uint8_t Name[IMAGE_SIZEOF_SHORT_NAME]; - union { - uint32_t PhysicalAddress; - uint32_t VirtualSize; - } Misc; - uint32_t VirtualAddress; - uint32_t SizeOfRawData; - uint32_t PointerToRawData; - uint32_t PointerToRelocations; - uint32_t PointerToLinenumbers; - uint16_t NumberOfRelocations; - uint16_t NumberOfLinenumbers; - uint32_t Characteristics; -} PACKED_STRUCT; - -struct IMAGE_SYMBOL { - union { - struct { - uint32_t Short; - uint32_t Long; - } Name; - } N; - uint32_t Value; - int16_t SectionNumber; - uint16_t Type; - uint8_t StorageClass; - uint8_t NumberOfAuxSymbols; -} PACKED_STRUCT; -// --- winnt.h ---- - -inline unsigned pad(unsigned n) -{ - return (n + (4 - 1)) & ~(4 - 1); -} - -using namespace avian::tools; -using namespace avian::util; - -template -class WindowsPlatform : public Platform { - public: - class FileWriter { - public: - unsigned sectionCount; - unsigned symbolCount; - unsigned dataStart; - unsigned dataOffset; - - IMAGE_FILE_HEADER header; - - StringTable strings; - Buffer symbols; - - FileWriter(unsigned machine, unsigned machineMask, unsigned symbolCount) - : sectionCount(0), - symbolCount(symbolCount), - dataStart(sizeof(IMAGE_FILE_HEADER)), - dataOffset(0) - { - header.Machine = machine; - // header.NumberOfSections = sectionCount; - header.TimeDateStamp = 0; - // header.PointerToSymbolTable = sizeof(IMAGE_FILE_HEADER) - // + sizeof(IMAGE_SECTION_HEADER) - // + pad(size); - // header.NumberOfSymbols = symbolCount; - header.SizeOfOptionalHeader = 0; - header.Characteristics = IMAGE_FILE_RELOCS_STRIPPED - | IMAGE_FILE_LINE_NUMS_STRIPPED | machineMask; - } - - void writeHeader(OutputStream* out) - { - header.NumberOfSections = sectionCount; - header.PointerToSymbolTable = dataStart + dataOffset; - dataOffset = pad(dataOffset + symbolCount * sizeof(IMAGE_SYMBOL)); - header.NumberOfSymbols = symbolCount; - out->writeChunk(&header, sizeof(IMAGE_FILE_HEADER)); - } - - void addSymbol(String name, - unsigned addr, - unsigned sectionNumber, - unsigned type, - unsigned storageClass) - { - unsigned nameOffset = strings.add(name); - IMAGE_SYMBOL symbol = { - {{0, 0}}, // Name - addr, // Value - static_cast(sectionNumber), // SectionNumber - static_cast(type), // Type - static_cast(storageClass), // StorageClass - 0, // NumberOfAuxSymbols - }; - symbol.N.Name.Long = nameOffset + 4; - symbols.write(&symbol, sizeof(IMAGE_SYMBOL)); - } - - void writeData(OutputStream* out) - { - out->writeChunk(symbols.data, symbols.length); - uint32_t size = strings.length + 4; - out->writeChunk(&size, 4); - out->writeChunk(strings.data, strings.length); - } - }; - - class SectionWriter { - public: - FileWriter& file; - IMAGE_SECTION_HEADER header; - size_t dataSize; - size_t finalSize; - const uint8_t* data; - unsigned dataOffset; - - SectionWriter(FileWriter& file, - const char* name, - unsigned sectionMask, - const uint8_t* data, - size_t dataSize) - : file(file), dataSize(dataSize), finalSize(pad(dataSize)), data(data) - { - file.sectionCount++; - file.dataStart += sizeof(IMAGE_SECTION_HEADER); - strcpy(reinterpret_cast(header.Name), name); - header.Misc.VirtualSize = 0; - header.SizeOfRawData = finalSize; - // header.PointerToRawData = file.dataOffset; - dataOffset = file.dataOffset; - file.dataOffset += finalSize; - header.PointerToRelocations = 0; - header.PointerToLinenumbers = 0; - header.NumberOfRelocations = 0; - header.NumberOfLinenumbers = 0; - header.Characteristics = sectionMask; - } - - void writeHeader(OutputStream* out) - { - header.PointerToRawData = dataOffset + file.dataStart; - out->writeChunk(&header, sizeof(IMAGE_SECTION_HEADER)); - } - - void writeData(OutputStream* out) - { - out->writeChunk(data, dataSize); - out->writeRepeat(0, finalSize - dataSize); - } - }; - - virtual bool writeObject(OutputStream* out, - Slice symbols, - Slice data, - unsigned accessFlags, - unsigned alignment) - { - int machine; - int machineMask; - - if (Architecture == PlatformInfo::x86_64) { - machine = IMAGE_FILE_MACHINE_AMD64; - machineMask = 0; - } else if (Architecture == PlatformInfo::x86) { - machine = IMAGE_FILE_MACHINE_I386; - machineMask = IMAGE_FILE_32BIT_MACHINE; - } else if (Architecture == PlatformInfo::Arm) { - machine = IMAGE_FILE_MACHINE_ARMNT; - machineMask = IMAGE_FILE_32BIT_MACHINE; - } - - int sectionMask; - switch (alignment) { - case 0: - case 1: - sectionMask = IMAGE_SCN_ALIGN_1BYTES; - break; - case 2: - sectionMask = IMAGE_SCN_ALIGN_2BYTES; - break; - case 4: - sectionMask = IMAGE_SCN_ALIGN_4BYTES; - break; - case 8: - sectionMask = IMAGE_SCN_ALIGN_8BYTES; - break; - default: - fprintf(stderr, "unsupported alignment: %d\n", alignment); - return false; - } - - sectionMask |= IMAGE_SCN_MEM_READ; - - const char* sectionName; - if (accessFlags & Platform::Writable) { - if (accessFlags & Platform::Executable) { - sectionName = ".rwx"; - sectionMask |= IMAGE_SCN_MEM_WRITE | IMAGE_SCN_MEM_EXECUTE - | IMAGE_SCN_CNT_CODE; - } else { - sectionName = ".data"; - sectionMask |= IMAGE_SCN_MEM_WRITE; - } - } else { - sectionName = ".text"; - sectionMask |= IMAGE_SCN_MEM_EXECUTE | IMAGE_SCN_CNT_CODE; - } - - FileWriter file(machine, machineMask, symbols.count); - - SectionWriter section( - file, sectionName, sectionMask, data.items, data.count); - - file.writeHeader(out); - - for (SymbolInfo* sym = symbols.begin(); sym != symbols.end(); sym++) { - file.addSymbol(sym->name, sym->addr, 1, 0, 2); - } - - section.writeHeader(out); - - section.writeData(out); - - file.writeData(out); - - return true; - } - - WindowsPlatform() : Platform(PlatformInfo(PlatformInfo::Pe, Architecture)) - { - } -}; - -WindowsPlatform<4, PlatformInfo::x86> windows32Platform; -WindowsPlatform<8, PlatformInfo::x86_64> windows64Platform; -WindowsPlatform<4, PlatformInfo::Arm> - windowsRtPlatform; // Windows Phone 8 and Windows RT - -} // namespace diff --git a/sgx-jvm/avian/src/tools/object-writer/tools.cpp b/sgx-jvm/avian/src/tools/object-writer/tools.cpp deleted file mode 100644 index 138cc5e122..0000000000 --- a/sgx-jvm/avian/src/tools/object-writer/tools.cpp +++ /dev/null @@ -1,137 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include -#include -#include - -#include - -using namespace avian::util; - -namespace avian { - -namespace tools { - -Buffer::Buffer() : capacity(100), length(0), data((uint8_t*)malloc(capacity)) -{ -} - -Buffer::~Buffer() -{ - free(data); -} - -void Buffer::ensure(size_t more) -{ - if (length + more > capacity) { - capacity = capacity * 2 + more; - data = (uint8_t*)realloc(data, capacity); - } -} - -void Buffer::write(const void* d, size_t size) -{ - ensure(size); - memcpy(data + length, d, size); - length += size; -} - -unsigned StringTable::add(String str) -{ - unsigned offset = Buffer::length; - Buffer::write(str.text, str.length + 1); - return offset; -} - -void OutputStream::write(uint8_t byte) -{ - writeChunk(&byte, 1); -} - -void OutputStream::writeRepeat(uint8_t byte, size_t size) -{ - for (size_t i = 0; i < size; i++) { - write(byte); - } -} - -FileOutputStream::FileOutputStream(const char* name) : file(fopen(name, "wb")) -{ -} - -FileOutputStream::~FileOutputStream() -{ - if (file) { - fclose(file); - } -} - -bool FileOutputStream::isValid() -{ - return file; -} - -void FileOutputStream::writeChunk(const void* data, size_t size) -{ - fwrite(data, size, 1, file); -} - -void FileOutputStream::write(uint8_t byte) -{ - fputc(byte, file); -} - -Platform* Platform::first = 0; - -PlatformInfo::Format PlatformInfo::formatFromString(const char* format) -{ - if (strcmp(format, "elf") == 0 || strcmp(format, "linux") == 0 - || strcmp(format, "freebsd") == 0 || strcmp(format, "qnx") == 0) { - return Elf; - } else if (strcmp(format, "pe") == 0 || strcmp(format, "windows") == 0) { - return Pe; - } else if (strcmp(format, "macho") == 0 || strcmp(format, "darwin") == 0 - || strcmp(format, "ios") == 0 || strcmp(format, "macosx") == 0) { - return MachO; - } else { - return UnknownFormat; - } -} - -PlatformInfo::Architecture PlatformInfo::archFromString(const char* arch) -{ - if (strcmp(arch, "i386") == 0) { - return Architecture::x86; - } else if (strcmp(arch, "x86_64") == 0) { - return Architecture::x86_64; - } else if (strcmp(arch, "arm") == 0) { - return Architecture::Arm; - } else if (strcmp(arch, "arm64") == 0) { - return Architecture::Arm64; - } else { - return Architecture::UnknownArch; - } -} - -Platform* Platform::getPlatform(PlatformInfo info) -{ - for (Platform* p = first; p; p = p->next) { - if (p->info == info) { - return p; - } - } - return 0; -} - -} // namespace tools - -} // namespace avian diff --git a/sgx-jvm/avian/src/tools/type-generator/CMakeLists.txt b/sgx-jvm/avian/src/tools/type-generator/CMakeLists.txt deleted file mode 100644 index 53bb7cabb1..0000000000 --- a/sgx-jvm/avian/src/tools/type-generator/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -add_executable(type_generator main.cpp) - -target_link_libraries(type_generator - avian_jvm_finder - avian_system - avian_util - ${ZLIB_LIBRARIES} - ${PLATFORM_LIBS} -) diff --git a/sgx-jvm/avian/src/tools/type-generator/io.h b/sgx-jvm/avian/src/tools/type-generator/io.h deleted file mode 100644 index 2dcbaac4c1..0000000000 --- a/sgx-jvm/avian/src/tools/type-generator/io.h +++ /dev/null @@ -1,181 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include "assert.h" - -#ifndef AVIAN_TOOLS_TYPE_GENERATOR_IO_H -#define AVIAN_TOOLS_TYPE_GENERATOR_IO_H - -namespace avian { -namespace tools { -namespace typegenerator { - -class Input { - public: - virtual ~Input() - { - } - - virtual void dispose() = 0; - - virtual int peek() = 0; - - virtual int read() = 0; - - virtual unsigned line() = 0; - - virtual unsigned column() = 0; - - void skipSpace() - { - bool quit = false; - while (not quit) { - int c = peek(); - switch (c) { - case ' ': - case '\t': - case '\n': - read(); - break; - - default: - quit = true; - } - } - } -}; - -class FileInput : public Input { - public: - const char* file; - FILE* stream; - unsigned line_; - unsigned column_; - bool close; - - FileInput(const char* file, FILE* stream = 0, bool close = true) - : file(file), stream(stream), line_(1), column_(1), close(close) - { - } - - virtual ~FileInput() - { - dispose(); - } - - virtual void dispose() - { - if (stream and close) { - fclose(stream); - stream = 0; - } - } - - virtual int peek() - { - int c = getc(stream); - ungetc(c, stream); - return c; - } - - virtual int read() - { - int c = getc(stream); - if (c == '\n') { - ++line_; - column_ = 1; - } else { - ++column_; - } - return c; - } - - virtual unsigned line() - { - return line_; - } - - virtual unsigned column() - { - return column_; - } -}; - -class Output { - public: - virtual ~Output() - { - } - - virtual void dispose() = 0; - - virtual void write(const std::string& s) = 0; - - void write(int32_t i) - { - static const int Size = 32; - char s[Size]; - int c UNUSED = vm::snprintf(s, Size, "%d", i); - assert(c > 0 and c < Size); - write(s); - } - - void writeUnsigned(uint32_t i) - { - static const int Size = 32; - char s[Size]; - int c UNUSED = vm::snprintf(s, Size, "%u", i); - assert(c > 0 and c < Size); - write(s); - } -}; - -class FileOutput : public Output { - public: - const char* file; - FILE* stream; - bool close; - - FileOutput(const char* file, FILE* stream = 0, bool close = true) - : file(file), stream(stream), close(close) - { - } - - virtual ~FileOutput() - { - dispose(); - } - - virtual void dispose() - { - if (stream and close) { - fclose(stream); - stream = 0; - } - } - - virtual void write(const std::string& s) - { - fputs(s.c_str(), stream); - } - - const char* filename() - { - return file; - } -}; - -} // namespace typegenerator -} // namespace tools -} // namespace avian - -#endif // AVIAN_TOOLS_TYPE_GENERATOR_IO_H diff --git a/sgx-jvm/avian/src/tools/type-generator/main.cpp b/sgx-jvm/avian/src/tools/type-generator/main.cpp deleted file mode 100644 index 40735927b2..0000000000 --- a/sgx-jvm/avian/src/tools/type-generator/main.cpp +++ /dev/null @@ -1,1707 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "stdlib.h" -#include "stdio.h" -#include "stdint.h" -#include "string.h" -#include "errno.h" - -#include -#include -#include -#include -#include -#include - -#include "avian/constants.h" -#include "avian/finder.h" - -#include -#include -#include - -#include "io.h" -#include "sexpr.h" - -#include "assert.h" - -using namespace avian::util; - -#define UNREACHABLE abort() - -#define UNUSED __attribute__((unused)) - -using namespace vm; -using namespace avian::tools::typegenerator; - -namespace avian { -namespace tools { -namespace typegenerator { - -class Class; - -class Field { - public: - std::string name; - size_t elementSize; - size_t offset; - uintptr_t ownerId; - bool noassert; - bool nogc; - bool polyfill; - bool threadParam; - - std::string javaSpec; - std::string typeName; - - Field(Class* ownerId, - const std::string& typeName, - const std::string& javaSpec, - const std::string& name) - : name(name), - elementSize(-1), - offset(0), - ownerId(reinterpret_cast(ownerId)), - noassert(false), - nogc(false), - polyfill(false), - threadParam(false), - javaSpec(javaSpec), - typeName(typeName) - { - } - - std::string dump() const - { - std::ostringstream ss; - ss << "field " << name << ":" << typeName << ":" << javaSpec - << ", size=" << elementSize << ", offset=" << offset; - if (noassert) { - ss << " noassert"; - } - if (nogc) { - ss << " nogc"; - } - if (polyfill) { - ss << " polyfill"; - } - return ss.str(); - } -}; - -class Method { - public: - std::string javaName; - std::string javaSpec; - - Method(const std::string& javaName, const std::string& javaSpec) - : javaName(javaName), javaSpec(javaSpec) - { - } - - bool operator==(const Method& o) const - { - return javaName == o.javaName && javaSpec == o.javaSpec; - } - - bool operator<(const Method& o) const - { - return javaName < o.javaName - || (javaName == o.javaName && javaSpec < o.javaSpec); - } - std::string dump() const - { - return "method " + javaName + javaSpec; - } -}; - -class Class { - public: - // "simple" name, used for generated code, defined in types.def - std::string name; - - // Name of the backing Java class, empty if there isn't one - std::string javaName; - - Class* super; - - std::vector fields; - std::set methods; - - Field* arrayField; - - bool overridesMethods; - - int fixedSize; - - Class(const std::string& name) - : name(name), - super(0), - arrayField(0), - overridesMethods(false), - fixedSize(-1) - { - } - - std::string dump() const - { - std::ostringstream ss; - ss << "class " << name; - if (javaName.size() > 0) { - ss << "(" << javaName << ")"; - } - if (super) { - ss << " : " << super->name << "(" << super->javaName << ")"; - } - ss << " {\n"; - - for (const auto f : fields) { - ss << " " << f->dump() << "\n"; - } - - for (const auto m : methods) { - ss << " " << m.dump() << "\n"; - } - ss << "}"; - return ss.str(); - } - - void dumpToStdout() const - { - printf("%s\n", dump().c_str()); - } -}; - -class Module { - public: - // Map from java-level name to Class - std::map javaClasses; - - std::map classes; - - void add(Class* cl) - { - assert(classes.find(cl->name) == classes.end()); - classes[cl->name] = cl; - if (cl->javaName != "") { - assert(javaClasses.find(cl->javaName) == javaClasses.end()); - javaClasses[cl->javaName] = cl; - } - } -}; -} -} -} - -namespace { - -namespace local { - -#ifndef POINTER_SIZE -#define POINTER_SIZE sizeof(void*) -#endif - -const unsigned BytesPerWord = POINTER_SIZE; - -inline bool equal(const char* a, const char* b) -{ - return strcmp(a, b) == 0; -} - -inline bool endsWith(const std::string& b, const std::string& a) -{ - if (b.size() > a.size()) { - return false; - } - return std::equal(a.begin() + a.size() - b.size(), a.end(), b.begin()); -} - -std::string enumName(Module& module, Field* f) -{ - std::string& type = f->typeName; - if (type == "void*") { - return "word"; - } else if (type == "maybe_object") { - return "uintptr_t"; - } else if (f->javaSpec.size() != 0 - && (f->javaSpec[0] == 'L' || f->javaSpec[0] == '[')) { - return "object"; - } - const auto it = module.classes.find(f->typeName); - assert(f->typeName.size() > 0); - if (it != module.classes.end()) { - return "object"; - } else { - return f->typeName; - } -} - -class Character : public Object { - public: - char value; - - static Character* make(char value) - { - Character* o = allocate(); - o->type = Object::Character; - o->value = value; - return o; - } -}; - -char character(Object* o) -{ - assert(o->type == Object::Character); - return static_cast(o)->value; -} - -class String : public Object { - public: - const char* value; - - static String* make(Object* s) - { - assert(s); - - String* o = allocate(); - o->type = Object::String; - - unsigned length = 0; - for (Object* p = s; p; p = cdr(p)) - ++length; - - char* value = static_cast(malloc(length + 1)); - assert(value); - unsigned i = 0; - for (Object* p = s; p; p = cdr(p)) - value[i++] = character(car(p)); - value[i] = 0; - - o->value = value; - return o; - } -}; - -const char* string(Object* o) -{ - assert(o->type == Object::String); - return static_cast(o)->value; -} - -class Singleton : public Object { - public: - static Singleton* make(Object::ObjectType type) - { - Singleton* o = allocate(); - o->type = type; - return o; - } -}; - -std::string capitalize(const std::string& s) -{ - if (s[0] >= 'a' && s[0] <= 'z') { - return (char)(s[0] + 'A' - 'a') + s.substr(1, s.size() - 1); - } - return s; -} - -Object* read(Input* in, Object* eos, int level) -{ - List s; - - int c; - while ((c = in->peek()) >= 0) { - switch (c) { - case '(': { - if (s.first) { - return String::make(s.first); - } else { - List list; - Object* o; - in->read(); - while ((o = read(in, eos, level + 1)) != eos) { - list.append(o); - } - return list.first; - } - } break; - - case ')': { - if (s.first) { - return String::make(s.first); - } else { - if (level == 0) { - fprintf(stderr, "unexpected ')'\n"); - abort(); - } - in->read(); - return eos; - } - } break; - - case ' ': - case '\t': - case '\n': - case '\r': { - if (s.first) { - return String::make(s.first); - } - } break; - - default: { - s.append(Character::make(c)); - } break; - } - - in->read(); - } - - if (level == 0) { - if (s.first) { - return String::make(s.first); - } else { - return eos; - } - } else { - fprintf(stderr, "unexpected end of stream\n"); - abort(); - } -} - -bool namesPointer(const std::string& s) -{ - return s == "Collector" or s == "Disposer" or endsWith("*", s); -} - -unsigned sizeOf(Module& module, const std::string& type) -{ - if (type == "object" or type == "intptr_t" or type == "uintptr_t" - or type == "maybe_object") { - return BytesPerWord; - } else if (type == "unsigned" or type == "int") { - return sizeof(int); - } else if (type == "bool") { - return sizeof(bool); - } else if (type == "int8_t" or type == "uint8_t") { - return sizeof(uint8_t); - } else if (type == "int16_t" or type == "uint16_t") { - return sizeof(uint16_t); - } else if (type == "int32_t" or type == "uint32_t") { - return sizeof(uint32_t); - } else if (type == "int64_t" or type == "uint64_t") { - return sizeof(uint64_t); - } else if (type == "char") { - return sizeof(char); - } else if (endsWith("[0]", type)) { - return 0; - } else if (namesPointer(type)) { - return BytesPerWord; - } else { - const auto it = module.classes.find(type); - if (it != module.classes.end()) { - return BytesPerWord; - } else { - fprintf(stderr, "unexpected type: %s\n", type.c_str()); - abort(); - } - } -} - -struct FieldSpec { - bool isArray; - std::string aliasName; - bool require; - Field* field; - - FieldSpec() - { - } - - FieldSpec(bool isArray, Field* field) - : isArray(isArray), require(false), field(field) - { - } -}; - -class ClassParser { - public: - Class* cl; - std::map fields; - - ClassParser(Class* cl) : cl(cl) - { - } - - void add(FieldSpec f) - { - if (f.field->polyfill) { - if (fields.find(f.field->name) == fields.end()) { - fields[f.field->name] = f.field; - cl->fields.push_back(f.field); - } else { - fields[f.field->name]->threadParam = true; - } - return; - } - if (f.aliasName.size() > 0) { - if (fields.find(f.aliasName) == fields.end()) { - if (fields.find(f.field->name) != fields.end()) { - // printf("alias %s.%s -> %s.%s\n", cl->name.c_str(), - // f.field->name.c_str(), cl->name.c_str(), f.aliasName.c_str()); - const auto it = fields.find(f.field->name); - assert(it != fields.end()); - Field* renamed = it->second; - fields.erase(it); - fields[f.aliasName] = renamed; - - renamed->name = f.aliasName; - - // TODO: this currently works around how avian uses an object (either - // a char[] or byte[]) for String.data - renamed->typeName = f.field->typeName; - renamed->javaSpec = f.field->javaSpec; - } else { - // printf("ignoring absent alias %s.%s -> %s.%s\n", cl->name.c_str(), - // f.field->name.c_str(), cl->name.c_str(), f-> aliasName.c_str()); - } - } else { - // printf("ignoring already defined alias %s.%s -> %s.%s\n", - // cl->name.c_str(), f.field->name.c_str(), cl->name.c_str(), f-> - // aliasName.c_str()); - } - } else { - if (fields.find(f.field->name) == fields.end()) { - // printf("add %s.%s\n", cl->name.c_str(), f.field->name.c_str()); - fields[f.field->name] = f.field; - if (f.isArray) { - add(FieldSpec(false, new Field(cl, "uintptr_t", "", "length"))); - assert(!cl->arrayField); - cl->arrayField = f.field; - } else { - cl->fields.push_back(f.field); - } - } else { - // printf("required check %s.%s\n", cl->name.c_str(), - // f.field->name.c_str()); - assert(f.aliasName.size() > 0 || f.require); - fields[f.field->name]->nogc |= f.field->nogc; - fields[f.field->name]->noassert |= f.field->noassert; - } - } - } - - void setSuper(Class* super) - { - assert(!cl->super); - cl->super = super; - assert(!super->arrayField); - assert(fields.size() == 0); - for (const auto f : super->fields) { - add(FieldSpec(false, f)); - } - } -}; - -FieldSpec parseArray(Module&, ClassParser& clparser, Object* p) -{ - const char* typeName = string(car(p)); - - p = cdr(p); - const char* name = string(car(p)); - - assert(!clparser.cl->arrayField); - return FieldSpec(true, new Field(clparser.cl, typeName, "", name)); -} - -FieldSpec parseVerbatimField(Module&, ClassParser& clparser, Object* p) -{ - const char* spec = string(car(p)); - const char* name = string(car(cdr(p))); - return FieldSpec(false, new Field(clparser.cl, spec, "", name)); -} - -FieldSpec parseField(Module& module, ClassParser& clparser, Object* p) -{ - FieldSpec f; - const char* spec = string(car(p)); - if (equal(spec, "field")) { - return parseVerbatimField(module, clparser, cdr(p)); - } else if (equal(spec, "array")) { - return parseArray(module, clparser, cdr(p)); - } else if (equal(spec, "noassert")) { - f = parseField(module, clparser, cdr(p)); - f.field->noassert = true; - f.require = true; - } else if (equal(spec, "nogc")) { - f = parseField(module, clparser, cdr(p)); - f.field->nogc = true; - f.require = true; - } else if (equal(spec, "require")) { - f = parseField(module, clparser, cdr(p)); - f.require = true; - } else if (equal(spec, "alias")) { - const char* name = string(car(cdr(p))); - f = parseField(module, clparser, cdr(cdr(p))); - f.aliasName = name; - } else if (equal(spec, "polyfill")) { - f = parseField(module, clparser, cdr(p)); - f.field->polyfill = true; - } else { - return parseVerbatimField(module, clparser, p); - } - return f; -} - -void parseSubdeclaration(Module& module, ClassParser& clparser, Object* p) -{ - const char* front = string(car(p)); - if (equal(front, "extends")) { - Class* super = module.classes[string(car(cdr(p)))]; - clparser.setSuper(super); - } else { - clparser.add(parseField(module, clparser, p)); - } -} - -const char* append(const char* a, const char* b, const char* c, const char* d) -{ - unsigned al = strlen(a); - unsigned bl = strlen(b); - unsigned cl = strlen(c); - unsigned dl = strlen(d); - char* p = static_cast(malloc(al + bl + cl + dl + 1)); - memcpy(p, a, al); - memcpy(p + al, b, bl); - memcpy(p + al + bl, c, cl); - memcpy(p + al + bl + cl, d, dl + 1); - return p; -} - -const char* append(const char* a, const char* b) -{ - return append(a, b, "", ""); -} - -const char* fieldType(const char* spec) -{ - switch (*spec) { - case 'B': - case 'Z': - return "uint8_t"; - case 'C': - case 'S': - return "uint16_t"; - case 'D': - case 'J': - return "uint64_t"; - case 'F': - case 'I': - return "uint32_t"; - case 'L': - case '[': - return "object"; - - default: - abort(); - } -} - -void parseJavaClass(Module& module, ClassParser& clparser, Stream* s) -{ - uint32_t magic = s->read4(); - assert(magic == 0xCAFEBABE); - (void)magic; - s->read2(); // minor version - s->read2(); // major version - - unsigned poolCount = s->read2() - 1; - std::vector pool(poolCount, -1); - for (unsigned i = 0; i < poolCount; ++i) { - unsigned c = s->read1(); - - switch (c) { - case CONSTANT_Integer: - case CONSTANT_Float: - pool[i] = s->read4(); - break; - - case CONSTANT_Long: - case CONSTANT_Double: - pool[i++] = s->read4(); - pool[i] = s->read4(); - break; - - case CONSTANT_Utf8: { - unsigned length = s->read2(); - uint8_t* p = static_cast(malloc(length + 1)); - s->read(p, length); - p[length] = 0; - pool[i] = reinterpret_cast(p); - } break; - - case CONSTANT_Class: - case CONSTANT_String: - pool[i] = s->read2(); - break; - - case CONSTANT_NameAndType: - pool[i] = s->read4(); - break; - - case CONSTANT_Fieldref: - case CONSTANT_Methodref: - case CONSTANT_InterfaceMethodref: - pool[i] = s->read4(); - break; - - default: - abort(); - } - } - - s->read2(); // flags - s->read2(); // name - - unsigned superIndex = s->read2(); - if (superIndex) { - const char* name - = reinterpret_cast(pool[pool[superIndex - 1] - 1]); - Class* super = module.javaClasses[name]; - clparser.setSuper(super); - } - - unsigned interfaceCount = s->read2(); - s->skip(interfaceCount * 2); - // for (unsigned i = 0; i < interfaceCount; ++i) { - // const char* name = reinterpret_cast - // (pool[pool[s->read2() - 1] - 1]); - // } - - unsigned fieldCount = s->read2(); - for (unsigned i = 0; i < fieldCount; ++i) { - unsigned flags = s->read2(); - unsigned nameIndex = s->read2(); - unsigned specIndex = s->read2(); - - unsigned attributeCount = s->read2(); - for (unsigned j = 0; j < attributeCount; ++j) { - s->read2(); - s->skip(s->read4()); - } - - if ((flags & ACC_STATIC) == 0) { - char* name = reinterpret_cast(pool[nameIndex - 1]); - unsigned nameLength = strlen(name); - if (nameLength > 0 and name[nameLength - 1] == '_') { - name[nameLength - 1] = 0; - } - - const char* spec = reinterpret_cast(pool[specIndex - 1]); - const char* memberType = fieldType(spec); - - clparser.add( - FieldSpec(false, new Field(clparser.cl, memberType, spec, name))); - } - } - - if (clparser.cl->super) { - clparser.cl->methods.insert(clparser.cl->super->methods.begin(), - clparser.cl->super->methods.end()); - } - - unsigned methodCount = s->read2(); - for (unsigned i = 0; i < methodCount; ++i) { - unsigned flags = s->read2(); - unsigned nameIndex = s->read2(); - unsigned specIndex = s->read2(); - - unsigned attributeCount = s->read2(); - for (unsigned j = 0; j < attributeCount; ++j) { - s->read2(); - s->skip(s->read4()); - } - - const char* name = reinterpret_cast(pool[nameIndex - 1]); - const char* spec = reinterpret_cast(pool[specIndex - 1]); - - if ((flags & (ACC_STATIC | ACC_PRIVATE)) == 0 and *name != '<') { - clparser.cl->methods.insert(Method(name, spec)); - clparser.cl->overridesMethods = true; - } - } -} - -void parseType(Finder* finder, Module& module, Object* p) -{ - const char* name = string(car(p)); - - Class* cl = new Class(name); - - ClassParser clparser(cl); - - const char* javaName = 0; - if (cdr(p) and car(cdr(p))->type == Object::String) { - p = cdr(p); - javaName = string(car(p)); - cl->javaName = javaName; - } - - bool isJavaType = javaName and *javaName != '['; - - if (isJavaType) { - class Client : public Stream::Client { - public: - virtual void NO_RETURN handleError() - { - abort(); - } - } client; - System::Region* region = finder->find(append(javaName, ".class")); - if (region == 0) { - return; - } - Stream s(&client, region->start(), region->length()); - parseJavaClass(module, clparser, &s); - region->dispose(); - } - - module.add(cl); - - for (p = cdr(p); p; p = cdr(p)) { - parseSubdeclaration(module, clparser, car(p)); - } - - if (not isJavaType) { - if (cl->super) { - cl->methods.insert(cl->super->methods.begin(), cl->super->methods.end()); - } - } -} - -void parseDeclaration(Finder* finder, Module& module, Object* p) -{ - const char* spec = string(car(p)); - if (equal(spec, "type")) { - parseType(finder, module, cdr(p)); - } else { - fprintf(stderr, "unexpected declaration spec: %s\n", spec); - abort(); - } -} - -void parse(Finder* finder, Input* in, Module& module) -{ - Object* eos = Singleton::make(Object::Eos); - List declarations; - - Object* o; - while ((o = read(in, eos, 0)) != eos) { - parseDeclaration(finder, module, o); - } -} - -void layoutClass(Module& module, Class* cl) -{ - if (cl->fixedSize >= 0) { - return; - } - - unsigned offset = BytesPerWord; - - unsigned size = 0; - unsigned alignment = BytesPerWord; - - alignment = BytesPerWord; - - for (const auto f : cl->fields) { - f->elementSize = sizeOf(module, f->typeName); - - if (!f->polyfill) { // polyfills contribute no size - alignment = f->elementSize; - offset = (offset + alignment - 1) & ~(alignment - 1); - f->offset = offset; - - size = f->elementSize; - - offset += size; - } - } - if (cl->arrayField) { - Field* f = cl->arrayField; - - f->elementSize = sizeOf(module, f->typeName); - - alignment = f->elementSize; - offset = (offset + alignment - 1) & ~(alignment - 1); - f->offset = offset; - } - // offset = (offset + BytesPerWord - 1) & ~(BytesPerWord - 1); - cl->fixedSize = offset; -} - -void layoutClasses(Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - layoutClass(module, cl); - } -} - -void writeOffset(Output* out, size_t offset) -{ - out->write(offset); -} - -void writeOffset(Output* out, Class* cl) -{ - out->write(cl->fixedSize); - if (cl->arrayField) { - out->write(" + pad(length * "); - out->write(cl->arrayField->elementSize); - out->write(")"); - } -} - -std::string cppClassName(Class* cl) -{ - if (cl->name == "jobject") { - return "object"; - } else { - return "Gc" + capitalize(cl->name) + "*"; - } -} - -std::string cppFieldType(Module& module, Field* f) -{ - if (f->javaSpec.size() != 0) { - if (f->javaSpec[0] == 'L') { - std::string className = f->javaSpec.substr(1, f->javaSpec.size() - 2); - const auto it = module.javaClasses.find(className); - if (it != module.javaClasses.end()) { - return cppClassName(it->second); - } - } else if (f->javaSpec[0] == '[') { - const auto it = module.javaClasses.find(f->javaSpec); - if (it != module.javaClasses.end()) { - return cppClassName(it->second); - } - } - } - const auto it = module.classes.find(f->typeName); - assert(f->typeName.size() > 0); - if (it != module.classes.end()) { - return cppClassName(it->second); - } else if (f->typeName == "maybe_object") { - return "uintptr_t"; - } else { - return f->typeName; - } -} - -void writeAccessor(Output* out, Class* cl, Field* f) -{ - out->write("const unsigned "); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write(" = "); - writeOffset(out, f->offset); - out->write(";\n\n"); - - out->write("#define HAVE_"); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write(" 1\n"); - - if (! f->javaSpec.empty()) { - std::string s = f->javaSpec; - std::replace(s.begin(), s.end(), '/', '_'); - std::replace(s.begin(), s.end(), '$', '_'); - std::replace(s.begin(), s.end(), ';', '_'); - std::replace(s.begin(), s.end(), '[', '_'); - - out->write("#define HAVE_"); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write("_"); - out->write(s); - out->write(" 1\n\n"); - } -} - -void writeAccessors(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - for (const auto f : cl->fields) { - if (!f->polyfill) { - writeAccessor(out, cl, f); - } - } - if (cl->arrayField) { - writeAccessor(out, cl, cl->arrayField); - } - } -} - -void writeSizes(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - - out->write("const unsigned FixedSizeOf"); - out->write(capitalize(cl->name)); - out->write(" = "); - out->write(cl->fixedSize); - out->write(";\n\n"); - - if (cl->arrayField) { - out->write("const unsigned ArrayElementSizeOf"); - out->write(capitalize(cl->name)); - out->write(" = "); - out->write(cl->arrayField->elementSize); - out->write(";\n\n"); - } - } -} - -std::string obfuscate(const std::string& s) -{ - if (s == "default" || s == "template" || s == "class" || s == "register" - || s == "this") { - return s + "_"; - } else { - return s; - } -} - -void writeConstructorParameters(Output* out, Module& module, Class* cl) -{ - for (const auto f : cl->fields) { - if (!f->polyfill) { - out->write(", "); - out->write(cppFieldType(module, f)); - out->write(" "); - out->write(obfuscate(f->name)); - } - } -} - -void writeConstructorArguments(Output* out, Class* cl) -{ - for (const auto f : cl->fields) { - if (!f->polyfill) { - out->write(", "); - out->write(obfuscate(f->name)); - } - } -} - -void writeConstructorInitializations(Output* out, Class* cl) -{ - for (const auto f : cl->fields) { - if (!f->polyfill) { - out->write(" o->set"); - out->write(capitalize(f->name)); - out->write("(t, "); - out->write(obfuscate(f->name)); - out->write(");\n"); - } - } -} - -void writeClassDeclarations(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - - out->write("class Gc"); - out->write(capitalize(cl->name)); - out->write(";\n"); - } - out->write("\n"); -} - -bool isFieldGcVisible(Module& module, Field* f) -{ - return enumName(module, f) == "object" && !f->nogc; -} - -bool isFieldGcMarkable(Module& module, Field* f) -{ - return (f->typeName == "maybe_object" || enumName(module, f) == "object") - && !f->nogc; -} - -void writeClassAccessors(Output* out, Module& module, Class* cl) -{ - for (const auto f : cl->fields) { - if (!f->polyfill) { - out->write(" void set"); - out->write(capitalize(f->name)); - out->write("(Thread* t UNUSED, "); - out->write(cppFieldType(module, f)); - out->write(" value) { "); - if (isFieldGcMarkable(module, f)) { - out->write("setField(t, this , "); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write(", reinterpret_cast(value));"); - } else { - out->write("field_at<"); - out->write(cppFieldType(module, f)); - out->write(">("); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write(") = value;"); - } - out->write(" }\n"); - - out->write(" "); - out->write(cppFieldType(module, f)); - out->write("* "); - out->write(obfuscate(f->name)); - out->write("Ptr() { return &field_at<"); - out->write(cppFieldType(module, f)); - out->write(">("); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write("); }\n"); - } - - out->write(" "); - out->write(cppFieldType(module, f)); - if (!f->polyfill && !isFieldGcMarkable(module, f)) { - out->write("&"); - } - out->write(" "); - out->write(obfuscate(f->name)); - if (f->threadParam || f->polyfill) { - out->write("(Thread*"); - } else { - out->write("("); - } - if (f->polyfill) { - out->write("); // polyfill, assumed to be implemented elsewhere\n"); - } else { - out->write(") { return field_at<"); - out->write(cppFieldType(module, f)); - out->write(">("); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write("); }\n"); - } - } - if (cl->arrayField) { - Field* f = cl->arrayField; - out->write(" avian::util::Slice<"); - if (isFieldGcVisible(module, f)) { - out->write("const "); - } - out->write(cppFieldType(module, f)); - out->write("> "); - out->write(obfuscate(f->name)); - out->write("() { return avian::util::Slice<"); - if (isFieldGcVisible(module, f)) { - out->write("const "); - } - out->write(cppFieldType(module, f)); - out->write("> (&field_at<"); - if (isFieldGcVisible(module, f)) { - out->write("const "); - } - out->write(cppFieldType(module, f)); - out->write(">("); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write("), field_at("); - out->write(capitalize(cl->name)); - out->write("Length)); }\n"); - - out->write(" void set"); - out->write(capitalize(f->name)); - out->write("Element(Thread* t UNUSED, size_t index, "); - out->write(cppFieldType(module, f)); - out->write(" value) { "); - if (isFieldGcMarkable(module, f)) { - out->write("setField(t, this , "); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write(" + index * ("); - out->write(sizeOf(module, f->typeName)); - out->write("), reinterpret_cast(value));"); - } else { - out->write("field_at<"); - out->write(cppFieldType(module, f)); - out->write(">("); - out->write(capitalize(cl->name)); - out->write(capitalize(f->name)); - out->write(" + index * ("); - out->write(sizeOf(module, f->typeName)); - out->write(")) = value;"); - } - out->write(" }\n"); - } -} - -void writeClasses(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - - out->write("class Gc"); - out->write(capitalize(cl->name)); - out->write(": public GcObject {\n"); - out->write(" public:\n"); - out->write(" static const Gc::Type Type = Gc::"); - out->write(capitalize(cl->name)); - out->write("Type;\n"); - out->write(" static const size_t FixedSize = FixedSizeOf"); - out->write(capitalize(cl->name)); - out->write(";\n\n"); - - out->write(" static Gc" + capitalize(cl->name) + "* makeZeroed(Thread* t"); - if (cl->arrayField) { - out->write(", uintptr_t length"); - } - out->write(");\n"); - - writeClassAccessors(out, module, cl); - - out->write("};\n\n"); - } -} - -void writeInitializerDeclarations(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - out->write("void init"); - out->write(capitalize(cl->name)); - out->write("(Thread* t, Gc"); - out->write(capitalize(cl->name)); - out->write("* o"); - - writeConstructorParameters(out, module, cl); - - out->write(");\n\n"); - } -} - -void writeConstructorDeclarations(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - out->write("Gc"); - out->write(capitalize(cl->name)); - out->write("* make"); - out->write(capitalize(cl->name)); - out->write("(Thread* t"); - - writeConstructorParameters(out, module, cl); - - out->write(");\n\n"); - } -} - -void writeInitializers(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - out->write("void init"); - out->write(capitalize(cl->name)); - out->write("(Thread* t, Gc"); - out->write(capitalize(cl->name)); - out->write("* o"); - - writeConstructorParameters(out, module, cl); - - out->write(")\n{\n"); - - out->write(" setObjectClass(t, reinterpret_cast(o), "); - out->write( - "reinterpret_cast(reinterpret_cast(t->m->types)->" - "body()[Gc::"); - out->write(capitalize(cl->name)); - out->write("Type]));\n"); - - writeConstructorInitializations(out, cl); - - out->write("}\n\n"); - } -} - -void writeConstructors(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - - bool hasObjectMask = cl->name == "singleton"; - - std::string name = "Gc" + capitalize(cl->name); - - out->write(name + "* " + name + "::makeZeroed(Thread* t"); - if (cl->arrayField) { - out->write(", uintptr_t length"); - } - out->write(")\n{\n"); - out->write(" " + name + "* o = reinterpret_cast<" + name - + "*>(allocate(t, "); - writeOffset(out, cl); - if (hasObjectMask) { - out->write(", true"); - } else { - out->write(", false"); - } - out->write("));\n"); - out->write(" setObjectClass(t, reinterpret_cast(o), "); - out->write( - "reinterpret_cast(reinterpret_cast(t->m->types)->" - "body()[Gc::"); - out->write(capitalize(cl->name)); - out->write("Type]));\n"); - out->write(" return o;\n"); - out->write("}\n\n"); - - out->write(name + "* make" + capitalize(cl->name)); - out->write("(Thread* t"); - - writeConstructorParameters(out, module, cl); - - out->write(")\n{\n"); - for (const auto f : cl->fields) { - if (enumName(module, f) == "object" and not f->nogc) { - out->write(" PROTECT(t, "); - out->write(obfuscate(f->name)); - out->write(");\n"); - - hasObjectMask = true; - } - } - if (cl->arrayField) { - Field* f = cl->arrayField; - if (f->typeName == "object" and not f->nogc) { - hasObjectMask = true; - } - } - - out->write(" " + name + "* o = reinterpret_cast<" + name - + "*>(allocate(t, "); - writeOffset(out, cl); - if (hasObjectMask) { - out->write(", true"); - } else { - out->write(", false"); - } - out->write("));\n"); - - out->write(" init"); - out->write(capitalize(cl->name)); - out->write("(t, o"); - writeConstructorArguments(out, cl); - out->write(");\n"); - - out->write(" return o;\n}\n\n"); - } -} - -void writeEnums(Output* out, Module& module) -{ - bool wrote = false; - for (const auto p : module.classes) { - Class* cl = p.second; - if (wrote) { - out->write(",\n"); - } else { - wrote = true; - } - out->write(capitalize(cl->name)); - out->write("Type"); - } - - if (wrote) { - out->write("\n"); - } -} - -void set(uint32_t* mask, unsigned index) -{ - if (index < 32) { - *mask |= 1 << index; - } else { - UNREACHABLE; - } -} - -void set(std::vector& mask, unsigned index) -{ - set(&(mask[index / 32]), index % 32); -} - -std::vector typeObjectMask(Module& module, Class* cl) -{ - std::vector mask(ceilingDivide( - cl->fixedSize + (cl->arrayField ? cl->arrayField->elementSize : 0), - 32 * BytesPerWord)); - - set(mask, 0); - - for (const auto f : cl->fields) { - unsigned offset = f->offset / BytesPerWord; - if (isFieldGcVisible(module, f)) { - set(mask, offset); - } - } - - if (cl->arrayField) { - Field* f = cl->arrayField; - unsigned offset = f->offset / BytesPerWord; - if (isFieldGcVisible(module, f)) { - set(mask, offset); - } - } - - return mask; -} - -bool trivialMask(const std::vector& mask) -{ - if (mask[0] != 1) { - return false; - } - - for (size_t i = 1; i < mask.size(); ++i) { - if (mask[i]) { - return false; - } - } - - return true; -} - -void writeInitialization(Output* out, - Module& module, - std::set& alreadyInited, - Class* cl) -{ - if (alreadyInited.find(cl) != alreadyInited.end()) { - return; - } - alreadyInited.insert(cl); - if (cl->super && cl->name != "intArray" && cl->name != "class") { - writeInitialization(out, module, alreadyInited, cl->super); - } - - std::vector mask = typeObjectMask(module, cl); - bool trivialMask = local::trivialMask(mask); - if (trivialMask) { - out->write("{ "); - } else { - out->write("{ uint32_t mask["); - out->write(mask.size()); - out->write("] = { "); - for (size_t i = 0; i < mask.size(); ++i) { - out->writeUnsigned(mask[i]); - if (i < mask.size() - 1) { - out->write(", "); - } - } - out->write(" };\n"); - } - - out->write("bootClass(t, Gc::"); - out->write(capitalize(cl->name)); - out->write("Type, "); - - if (cl->super) { - out->write("Gc::"); - out->write(capitalize(cl->super->name)); - out->write("Type"); - } else { - out->write("-1"); - } - out->write(", "); - - if (trivialMask) { - out->write("0"); - } else { - out->write("mask"); - } - out->write(", "); - - out->write(cl->fixedSize); - out->write(", "); - - out->write(cl->arrayField ? cl->arrayField->elementSize : 0); - out->write(", "); - - out->write(cl->methods.size()); - out->write("); }\n"); -} - -void writeInitializations(Output* out, Module& module) -{ - std::set alreadyInited; - - writeInitialization(out, module, alreadyInited, module.classes["intArray"]); - writeInitialization(out, module, alreadyInited, module.classes["class"]); - - for (const auto p : module.classes) { - Class* cl = p.second; - if (cl->name != "intArray" && cl->name != "class") { - writeInitialization(out, module, alreadyInited, cl); - } - } -} - -void writeJavaInitialization(Output* out, - Class* cl, - std::set& alreadyInited) -{ - if (alreadyInited.find(cl) != alreadyInited.end()) { - return; - } - - alreadyInited.insert(cl); - - if (cl->super) { - writeJavaInitialization(out, cl->super, alreadyInited); - } - - out->write("bootJavaClass(t, Gc::"); - out->write(capitalize(cl->name)); - out->write("Type, "); - - if (cl->super) { - out->write("Gc::"); - out->write(capitalize(cl->super->name)); - out->write("Type"); - } else { - out->write("-1"); - } - out->write(", \""); - - out->write(cl->javaName); - out->write("\", "); - - if (cl->overridesMethods) { - out->write(cl->methods.size()); - } else { - out->write("-1"); - } - out->write(", bootMethod);\n"); -} - -void writeJavaInitializations(Output* out, Module& module) -{ - std::set alreadyInited; - for (const auto p : module.classes) { - Class* cl = p.second; - if (cl->javaName.size()) { - writeJavaInitialization(out, cl, alreadyInited); - } - } -} - -void writeNameInitialization(Output* out, Class* cl) -{ - out->write("nameClass(t, Gc::"); - out->write(capitalize(cl->name)); - out->write("Type, \""); - if (cl->name == "jbyte" or cl->name == "jboolean" or cl->name == "jshort" - or cl->name == "jchar" or cl->name == "jint" or cl->name == "jlong" - or cl->name == "jfloat" or cl->name == "jdouble" or cl->name == "jvoid") { - out->write(cl->name.substr(1, cl->name.size() - 1)); - } else { - out->write("vm::"); - out->write(cl->name); - } - out->write("\");\n"); -} - -void writeNameInitializations(Output* out, Module& module) -{ - for (const auto p : module.classes) { - Class* cl = p.second; - if (!cl->javaName.size()) { - writeNameInitialization(out, cl); - } - } -} - -void writeMap(Output* out, Module& module, Class* cl) -{ - std::ostringstream ss; - for (const auto f : cl->fields) { - ss << "Type_"; - ss << enumName(module, f); - if (f->nogc) { - ss << "_nogc"; - } - - ss << ", "; - } - - if (cl->arrayField) { - Field* f = cl->arrayField; - ss << "Type_array, "; - ss << "Type_"; - ss << enumName(module, f); - ss << ", "; - } - - ss << "Type_none"; - - out->write(ss.str()); -} - -void writeMaps(Output* out, Module& module) -{ - out->write("Type types[]["); - out->write(module.classes.size()); - out->write("] = {\n"); - bool wrote = false; - for (const auto p : module.classes) { - Class* cl = p.second; - if (wrote) { - out->write(",\n"); - } else { - wrote = true; - } - - out->write("// "); - out->write(cl->name); - out->write("\n{ "); - writeMap(out, module, cl); - out->write(" }"); - } - out->write("\n};"); -} - -} // namespace local - -} // namespace - -extern "C" uint64_t vmNativeCall(void*, void*, unsigned, unsigned) -{ - abort(); -} - -extern "C" void vmJump(void*, void*, void*, void*, uintptr_t, uintptr_t) -{ - abort(); -} - -int main(int ac, char** av) -{ - ArgParser parser; - Arg classpath(parser, true, "cp", ""); - Arg input(parser, true, "i", ""); - Arg output(parser, true, "o", ""); - Arg outputType(parser, - true, - "t", - ""); - - if (!parser.parse(ac, av)) { - parser.printUsage(av[0]); - exit(1); - } - - if (!(local::equal(outputType.value, "enums") - || local::equal(outputType.value, "declarations") - || local::equal(outputType.value, "constructors") - || local::equal(outputType.value, "initializations") - || local::equal(outputType.value, "java-initializations") - || local::equal(outputType.value, "name-initializations") - || local::equal(outputType.value, "maps"))) { - parser.printUsage(av[0]); - exit(1); - } - - System* system = makeSystem(); - - class MyAllocator : public avian::util::Alloc { - public: - MyAllocator(System* s) : s(s) - { - } - - virtual void* allocate(size_t size) - { - void* p = s->tryAllocate(size); - if (p == 0) { - abort(s); - } - return p; - } - - virtual void free(const void* p, size_t) - { - s->free(p); - } - - System* s; - } allocator(system); - - Finder* finder = makeFinder(system, &allocator, classpath.value, 0); - - FILE* inStream = ::fopen(input.value, "rb"); - if (inStream == 0) { - fprintf(stderr, "unable to open %s: %s\n", input.value, strerror(errno)); - exit(1); - } - - FileInput in(0, inStream, false); - - Module module; - local::parse(finder, &in, module); - local::layoutClasses(module); - - finder->dispose(); - system->dispose(); - - FILE* outStream = ::fopen(output.value, "wb"); - if (outStream == 0) { - fprintf(stderr, "unable to open %s: %s\n", output.value, strerror(errno)); - exit(1); - } - FileOutput out(0, outStream, false); - - if (local::equal(outputType.value, "enums")) { - local::writeEnums(&out, module); - } else if (local::equal(outputType.value, "declarations")) { - out.write("const unsigned TypeCount = "); - out.Output::write(module.classes.size()); - out.write(";\n\n"); - - local::writeClassDeclarations(&out, module); - local::writeAccessors(&out, module); - local::writeSizes(&out, module); - local::writeClasses(&out, module); - local::writeInitializerDeclarations(&out, module); - local::writeConstructorDeclarations(&out, module); - } else if (local::equal(outputType.value, "constructors")) { - local::writeInitializers(&out, module); - local::writeConstructors(&out, module); - } else if (local::equal(outputType.value, "initializations")) { - local::writeInitializations(&out, module); - } else if (local::equal(outputType.value, "java-initializations")) { - local::writeJavaInitializations(&out, module); - } else if (local::equal(outputType.value, "name-initializations")) { - local::writeNameInitializations(&out, module); - } else if (local::equal(outputType.value, "maps")) { - local::writeMaps(&out, module); - } - - out.write("\n"); -} diff --git a/sgx-jvm/avian/src/tools/type-generator/sexpr.h b/sgx-jvm/avian/src/tools/type-generator/sexpr.h deleted file mode 100644 index 07059d74ec..0000000000 --- a/sgx-jvm/avian/src/tools/type-generator/sexpr.h +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef AVIAN_TOOLS_TYPE_GENERATOR_SEXPR_H -#define AVIAN_TOOLS_TYPE_GENERATOR_SEXPR_H - -namespace avian { -namespace tools { -namespace typegenerator { - -template -inline T* allocate() -{ - T* t = static_cast(malloc(sizeof(T))); - assert(t); - return t; -} - -class Object { - public: - typedef enum { - Scalar, - Array, - Method, - Type, - Pair, - Character, - String, - Eos - } ObjectType; - - ObjectType type; -}; - -class Pair : public Object { - public: - Object* car; - Object* cdr; - - static Pair* make(Object* car, Object* cdr) - { - Pair* o = allocate(); - o->type = Object::Pair; - o->car = car; - o->cdr = cdr; - return o; - } -}; - -inline Object* cons(Object* car, Object* cdr) -{ - return Pair::make(car, cdr); -} - -inline Object*& car(Object* o) -{ - assert(o->type == Object::Pair); - return static_cast(o)->car; -} - -inline void setCar(Object* o, Object* v) -{ - assert(o->type == Object::Pair); - static_cast(o)->car = v; -} - -inline Object*& cdr(Object* o) -{ - assert(o->type == Object::Pair); - return static_cast(o)->cdr; -} - -inline void setCdr(Object* o, Object* v) -{ - assert(o->type == Object::Pair); - static_cast(o)->cdr = v; -} - -class List { - public: - Object* first; - Object* last; - - List() : first(0), last(0) - { - } - - void append(Object* o) - { - Object* p = cons(o, 0); - if (last) { - setCdr(last, p); - last = p; - } else { - first = last = p; - } - } -}; - -} // namespace typegenerator -} // namespace tools -} // namespace avian - -#endif // AVIAN_TOOLS_TYPE_GENERATOR_SEXPR_H diff --git a/sgx-jvm/avian/src/types.def b/sgx-jvm/avian/src/types.def deleted file mode 100644 index bf26c3c659..0000000000 --- a/sgx-jvm/avian/src/types.def +++ /dev/null @@ -1,433 +0,0 @@ -(type jobject java/lang/Object) - -(type class avian/VMClass - (array void* vtable)) - -(type jclass java/lang/Class - (require class vmClass)) - -(type jaccessibleObject java/lang/reflect/AccessibleObject) - -(type jexecutable java/lang/reflect/Executable) - -(type jfield java/lang/reflect/Field) - -(type jmethod java/lang/reflect/Method) - -(type jconstructor java/lang/reflect/Constructor) - -(type constantPool sun/reflect/ConstantPool) - -(type serializable java/io/Serializable) - -(type cloneable java/lang/Cloneable) - -(type callSite java/lang/invoke/CallSite - (require invocation invocation)) - -(type methodHandle java/lang/invoke/MethodHandle - (alias method method vmtarget)) - -(type methodType java/lang/invoke/MethodType) - -(type lookup java/lang/invoke/MethodHandles$Lookup) - -(type singleton avian/Singleton - (array maybe_object body)) - -(type classLoader java/lang/ClassLoader - (object map)) - -(type systemClassLoader avian/SystemClassLoader - (void* finder)) - -(type field avian/VMField) - -(type method avian/VMMethod) - -(type addendum avian/Addendum) - -(type classAddendum avian/ClassAddendum) - -(type methodAddendum avian/MethodAddendum) - -(type fieldAddendum avian/FieldAddendum) - -(type classRuntimeData - (object arrayClass) - (object jclass) - (object pool) - (object signers)) - -(type native - (void* function) - (uint8_t fast)) - -(type methodRuntimeData - (native native)) - -(type pointer - (void* value)) - -(type nativeIntercept - (extends native) - (object original)) - -(type region - (void* region) - (uint32_t position)) - -(type exceptionHandlerTable - (array uint64_t body)) - -(type lineNumberTable - (array uint64_t body)) - -(type invocation - (uint16_t bootstrap) - (int32_t index) - (class class) - (singleton pool) - (method template) - (callSite site)) - -(type triple - (object first) - (object second) - (object third)) - -(type finalizer - (nogc object target) - (void* finalize) - (nogc object next) - (object queueTarget) - (finalizer queueNext)) - -(type list - (uint32_t size) - (object front) - (object rear)) - -(type vector - (uint32_t size) - (array object body)) - -(type traceElement - (object method) - (int32_t ip)) - -(type treeNode - (object value) - (treeNode left) - (treeNode right)) - -(type callNode - (intptr_t address) - (method target) - (uintptr_t flags) - (callNode next)) - -(type wordArray - (array uintptr_t body)) - -(type array - (noassert array object body)) - -(type hashMap - (uint32_t size) - (field array array)) - -(type weakHashMap - (extends hashMap)) - -(type pair avian/Pair - (object first) - (object second)) - -(type monitor - (void* owner) - (void* waitHead) - (void* waitTail) - (object acquireHead) - (object acquireTail) - (uint32_t depth)) - -(type monitorNode - (void* value) - (object next)) - -(type innerClassReference avian/InnerClassReference) - -(type continuationContext - (continuationContext next) - (object before) - (object after) - (object continuation) - (method method)) - -(type continuation avian/Continuations$Continuation - (continuation next) - (continuationContext context) - (method method) - (void* address) - (uintptr_t returnAddressOffset) - (uintptr_t framePointerOffset) - (array uintptr_t body)) - -(type unwindResult avian/Continuations$UnwindResult) - -(type string java/lang/String - (alias data object value) - (alias length uint32_t count) - (alias hashCode uint32_t hash) - (polyfill uint32_t offset) - (polyfill uint32_t length)) - -(type thread java/lang/Thread - (require object sleepLock) - (require object interruptLock) - (require uint8_t interrupted) - (require uint8_t unparked) - (require uint8_t blacklisting) - (alias peer uint64_t eetop) - (alias peer uint64_t nativePeer) - (require uint64_t peer)) - -(type threadGroup java/lang/ThreadGroup) - -(type stackTraceElement java/lang/StackTraceElement) - -(type throwable java/lang/Throwable - (alias message string detailMessage) - (alias trace object backtrace) - (alias trace object stackState)) - -(type exception java/lang/Exception) - -(type runtimeException java/lang/RuntimeException) - -(type nullPointerException java/lang/NullPointerException) - -(type arithmeticException java/lang/ArithmeticException) - -(type illegalStateException java/lang/IllegalStateException) - -(type illegalArgumentException java/lang/IllegalArgumentException) - -(type illegalMonitorStateException java/lang/IllegalMonitorStateException) - -(type indexOutOfBoundsException java/lang/IndexOutOfBoundsException) - -(type arrayIndexOutOfBoundsException java/lang/ArrayIndexOutOfBoundsException) - -(type arrayStoreException java/lang/ArrayStoreException) - -(type negativeArraySizeException java/lang/NegativeArraySizeException) - -(type cloneNotSupportedException java/lang/CloneNotSupportedException) - -(type reflectiveOperationException java/lang/ReflectiveOperationException) - -(type classCastException java/lang/ClassCastException) - -(type classNotFoundException java/lang/ClassNotFoundException) - -(type invocationTargetException java/lang/reflect/InvocationTargetException) - -(type interruptedException java/lang/InterruptedException) - -(type error java/lang/Error) - -(type virtualMachineError java/lang/VirtualMachineError) - -(type outOfMemoryError java/lang/OutOfMemoryError) - -(type stackOverflowError java/lang/StackOverflowError) - -(type linkageError java/lang/LinkageError) - -(type incompatibleClassChangeError java/lang/IncompatibleClassChangeError) - -(type abstractMethodError java/lang/AbstractMethodError) - -(type noSuchFieldError java/lang/NoSuchFieldError) - -(type noSuchMethodError java/lang/NoSuchMethodError) - -(type noClassDefFoundError java/lang/NoClassDefFoundError) - -(type unsatisfiedLinkError java/lang/UnsatisfiedLinkError) - -(type exceptionInInitializerError java/lang/ExceptionInInitializerError) - -(type ioException java/io/IOException) - -(type fileNotFoundException java/io/FileNotFoundException) - -(type incompatibleContinuationException - avian/IncompatibleContinuationException) - -(type number java/lang/Number) - -(type byte java/lang/Byte) - -(type boolean java/lang/Boolean) - -(type short java/lang/Short) - -(type char java/lang/Character) - -(type int java/lang/Integer) - -(type long java/lang/Long) - -(type float java/lang/Float) - -(type double java/lang/Double) - -(type referenceQueue java/lang/ref/ReferenceQueue - (alias front jreference head) - (require object jnext)) - -(type jreference java/lang/ref/Reference - (alias target object referent) - (alias queue referenceQueue queue) - (alias jNext jreference next) - (alias jNext jreference queueNext) - (alias vmNext object discovered) - (alias vmNext object pendingNext) - (nogc object target) - (nogc object queue) - (nogc object vmNext)) - -(type weakReference java/lang/ref/WeakReference) - -(type softReference java/lang/ref/SoftReference) - -(type phantomReference java/lang/ref/PhantomReference) - -(type cleaner sun/misc/Cleaner - (cleaner queueNext)) - -(type byteArray [B - (extends jobject) - (array int8_t body)) - -(type reference - (uint8_t kind) - (byteArray class) - (byteArray name) - (byteArray spec)) - -(type finder - (void* finder) - (byteArray name) - (finder next)) - -(type booleanArray [Z - (extends jobject) - (array uint8_t body)) - -(type shortArray [S - (extends jobject) - (array int16_t body)) - -(type charArray [C - (extends jobject) - (array uint16_t body)) - -(type intArray [I - (extends jobject) - (array int32_t body)) - -(type code avian/Code - (singleton pool) - (intArray stackMap) - (object exceptionHandlerTable) - (lineNumberTable lineNumberTable) - (intptr_t compiled) - (uint32_t compiledSize) - (uint16_t maxStack) - (uint16_t maxLocals) - (array uint8_t body)) - -(type longArray [J - (extends jobject) - (array int64_t body)) - -(type floatArray [F - (extends jobject) - (array uint32_t body)) - -(type doubleArray [D - (extends jobject) - (array uint64_t body)) - -(type jbyte - (extends jobject)) - -(type jboolean - (extends jobject)) - -(type jshort - (extends jobject)) - -(type jchar - (extends jobject)) - -(type jint - (extends jobject)) - -(type jlong - (extends jobject)) - -(type jfloat - (extends jobject)) - -(type jdouble - (extends jobject)) - -(type jvoid - (extends jobject)) - -(type roots - (classLoader bootLoader) - (classLoader appLoader) - (hashMap bootstrapClassMap) - (hashMap packageMap) - (method findLoadedClassMethod) - (method loadClassMethod) - (hashMap monitorMap) - (hashMap stringMap) - (hashMap byteArrayMap) - (hashMap poolMap) - (vector classRuntimeDataTable) - (vector methodRuntimeDataTable) - (vector jNIMethodTable) - (vector jNIFieldTable) - (pair shutdownHooks) - (thread finalizerThread) - (finalizer objectsToFinalize) - (cleaner objectsToClean) - (throwable nullPointerException) - (throwable arithmeticException) - (throwable arrayIndexOutOfBoundsException) - (throwable outOfMemoryError) - (throwable shutdownInProgress) - (finder virtualFileFinders) - (field array virtualFiles) - (field array arrayInterfaceTable) - (object threadTerminated) - (field array invocations)) - -(type compileRoots - (field array callTable) - (treeNode methodTree) - (treeNode methodTreeSentinal) - (object objectPools) - (object staticTableArray) - (wordArray virtualThunks) - (wordArray dynamicThunks) - (method receiveMethod) - (method windMethod) - (method rewindMethod)) diff --git a/sgx-jvm/avian/src/util.cpp b/sgx-jvm/avian/src/util.cpp deleted file mode 100644 index 9b2e31d3ff..0000000000 --- a/sgx-jvm/avian/src/util.cpp +++ /dev/null @@ -1,604 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/util.h" -#include - -using namespace vm; - -namespace { - -class TreeContext { - public: - class MyProtector : public Thread::Protector { - public: - MyProtector(Thread* thread, TreeContext* context) - : Protector(thread), context(context) - { - } - - virtual void visit(Heap::Visitor* v) - { - v->visit(&(context->root)); - v->visit(&(context->node)); - - for (List* p = context->ancestors; p; p = p->next) { - v->visit(&(p->item)); - } - } - - TreeContext* context; - }; - - TreeContext(Thread* thread, Zone* zone) - : zone(zone), - root(0), - node(0), - ancestors(0), - protector(thread, this), - fresh(false) - { - } - - Zone* zone; - GcTreeNode* root; - GcTreeNode* node; - List* ancestors; - MyProtector protector; - bool fresh; -}; - -List* path(TreeContext* c, - GcTreeNode* node, - List* next) -{ - return new (c->zone) List(node, next); -} - -inline object getTreeNodeValue(Thread*, GcTreeNode* n) -{ - return reinterpret_cast(alias(n, TreeNodeValue) & PointerMask); -} - -inline void setTreeNodeValue(Thread* t, GcTreeNode* n, object value) -{ - intptr_t red = alias(n, TreeNodeValue) & (~PointerMask); - - n->setValue(t, value); - - alias(n, TreeNodeValue) |= red; -} - -inline bool treeNodeRed(Thread*, GcTreeNode* n) -{ - return (alias(n, TreeNodeValue) & (~PointerMask)) == 1; -} - -inline void setTreeNodeRed(Thread*, GcTreeNode* n, bool red) -{ - if (red) { - alias(n, TreeNodeValue) |= 1; - } else { - alias(n, TreeNodeValue) &= PointerMask; - } -} - -inline GcTreeNode* cloneTreeNode(Thread* t, GcTreeNode* n) -{ - PROTECT(t, n); - - GcTreeNode* newNode - = makeTreeNode(t, getTreeNodeValue(t, n), n->left(), n->right()); - setTreeNodeRed(t, newNode, treeNodeRed(t, n)); - return newNode; -} - -GcTreeNode* treeFind(Thread* t, - GcTreeNode* tree, - intptr_t key, - GcTreeNode* sentinal, - intptr_t (*compare)(Thread* t, intptr_t key, object b)) -{ - GcTreeNode* node = tree; - while (node != sentinal) { - intptr_t difference = compare(t, key, getTreeNodeValue(t, node)); - if (difference < 0) { - node = node->left(); - } else if (difference > 0) { - node = node->right(); - } else { - return node; - } - } - - return 0; -} - -void treeFind(Thread* t, - TreeContext* c, - GcTreeNode* old, - intptr_t key, - GcTreeNode* node, - GcTreeNode* sentinal, - intptr_t (*compare)(Thread* t, intptr_t key, object b)) -{ - PROTECT(t, old); - PROTECT(t, node); - PROTECT(t, sentinal); - - GcTreeNode* newRoot = cloneTreeNode(t, old); - PROTECT(t, newRoot); - - GcTreeNode* new_ = newRoot; - PROTECT(t, new_); - - int count = 0; - while (old != sentinal) { - c->ancestors = path(c, new_, c->ancestors); - - intptr_t difference = compare(t, key, getTreeNodeValue(t, old)); - - if (difference < 0) { - old = old->left(); - GcTreeNode* n = cloneTreeNode(t, old); - new_->setLeft(t, n); - new_ = n; - } else if (difference > 0) { - old = old->right(); - GcTreeNode* n = cloneTreeNode(t, old); - new_->setRight(t, n); - new_ = n; - } else { - c->fresh = false; - c->root = newRoot; - c->node = new_; - c->ancestors = c->ancestors->next; - return; - } - - if (++count > 100) { - // if we've gone this deep, we probably have an unbalanced tree, - // which should only happen if there's a serious bug somewhere - // in our insertion process - abort(t); - } - } - - setTreeNodeValue(t, new_, getTreeNodeValue(t, node)); - - c->fresh = true; - c->root = newRoot; - c->node = new_; - c->ancestors = c->ancestors; -} - -GcTreeNode* leftRotate(Thread* t, GcTreeNode* n) -{ - PROTECT(t, n); - - GcTreeNode* child = cloneTreeNode(t, n->right()); - n->setRight(t, child->left()); - child->setLeft(t, n); - return child; -} - -GcTreeNode* rightRotate(Thread* t, GcTreeNode* n) -{ - PROTECT(t, n); - - GcTreeNode* child = cloneTreeNode(t, n->left()); - n->setLeft(t, child->right()); - child->setRight(t, n); - return child; -} - -GcTreeNode* treeAdd(Thread* t, TreeContext* c) -{ - GcTreeNode* new_ = c->node; - PROTECT(t, new_); - - GcTreeNode* newRoot = c->root; - PROTECT(t, newRoot); - - // rebalance - setTreeNodeRed(t, new_, true); - while (c->ancestors != 0 and treeNodeRed(t, c->ancestors->item)) { - if (c->ancestors->item == c->ancestors->next->item->left()) { - if (treeNodeRed(t, c->ancestors->next->item->right())) { - setTreeNodeRed(t, c->ancestors->item, false); - - GcTreeNode* n = cloneTreeNode(t, c->ancestors->next->item->right()); - - c->ancestors->next->item->setRight(t, n); - - setTreeNodeRed(t, c->ancestors->next->item->right(), false); - - setTreeNodeRed(t, c->ancestors->next->item, true); - - new_ = c->ancestors->next->item; - c->ancestors = c->ancestors->next->next; - } else { - if (new_ == c->ancestors->item->right()) { - new_ = c->ancestors->item; - c->ancestors = c->ancestors->next; - - GcTreeNode* n = leftRotate(t, new_); - - if (new_ == c->ancestors->item->right()) { - c->ancestors->item->setRight(t, n); - } else { - c->ancestors->item->setLeft(t, n); - } - c->ancestors = path(c, n, c->ancestors); - } - setTreeNodeRed(t, c->ancestors->item, false); - setTreeNodeRed(t, c->ancestors->next->item, true); - - GcTreeNode* n = rightRotate(t, c->ancestors->next->item); - if (c->ancestors->next->next == 0) { - newRoot = n; - } else if (c->ancestors->next->next->item->right() - == c->ancestors->next->item) { - c->ancestors->next->next->item->setRight(t, n); - } else { - c->ancestors->next->next->item->setLeft(t, n); - } - // done - } - } else { // this is just the reverse of the code above (right and - // left swapped): - if (treeNodeRed(t, c->ancestors->next->item->left())) { - setTreeNodeRed(t, c->ancestors->item, false); - - GcTreeNode* n = cloneTreeNode(t, c->ancestors->next->item->left()); - - c->ancestors->next->item->setLeft(t, n); - - setTreeNodeRed(t, c->ancestors->next->item->left(), false); - - setTreeNodeRed(t, c->ancestors->next->item, true); - - new_ = c->ancestors->next->item; - c->ancestors = c->ancestors->next->next; - } else { - if (new_ == c->ancestors->item->left()) { - new_ = c->ancestors->item; - c->ancestors = c->ancestors->next; - - GcTreeNode* n = rightRotate(t, new_); - - if (new_ == c->ancestors->item->left()) { - c->ancestors->item->setLeft(t, n); - } else { - c->ancestors->item->setRight(t, n); - } - c->ancestors = path(c, n, c->ancestors); - } - setTreeNodeRed(t, c->ancestors->item, false); - setTreeNodeRed(t, c->ancestors->next->item, true); - - GcTreeNode* n = leftRotate(t, c->ancestors->next->item); - if (c->ancestors->next->next == 0) { - newRoot = n; - } else if (c->ancestors->next->next->item->left() - == c->ancestors->next->item) { - c->ancestors->next->next->item->setLeft(t, n); - } else { - c->ancestors->next->next->item->setRight(t, n); - } - // done - } - } - } - - setTreeNodeRed(t, newRoot, false); - - return newRoot; -} - -} // namespace - -namespace vm { - -GcTriple* hashMapFindNode(Thread* t, - GcHashMap* map, - object key, - uint32_t (*hash)(Thread*, object), - bool (*equal)(Thread*, object, object)) -{ - bool weak = objectClass(t, map) == type(t, GcWeakHashMap::Type); - - GcArray* array = map->array(); - if (array) { - unsigned index = hash(t, key) & (array->length() - 1); - for (GcTriple* n = cast(t, array->body()[index]); n; - n = cast(t, n->third())) { - object k = n->first(); - if (weak) { - k = cast(t, k)->target(); - if (k == 0) { - continue; - } - } - - if (equal(t, key, k)) { - return n; - } - } - } - return 0; -} - -void hashMapResize(Thread* t, - GcHashMap* map, - uint32_t (*hash)(Thread*, object), - unsigned size) -{ - PROTECT(t, map); - - GcArray* newArray = 0; - - if (size) { - GcArray* oldArray = map->array(); - PROTECT(t, oldArray); - - unsigned newLength = nextPowerOfTwo(size); - if (oldArray and oldArray->length() == newLength) { - return; - } - - newArray = makeArray(t, newLength); - - if (oldArray != map->array()) { - // a resize was performed during a GC via the makeArray call - // above; nothing left to do - return; - } - - if (oldArray) { - bool weak = objectClass(t, map) == type(t, GcWeakHashMap::Type); - for (unsigned i = 0; i < oldArray->length(); ++i) { - GcTriple* next; - for (GcTriple* p = cast(t, oldArray->body()[i]); p; - p = next) { - next = cast(t, p->third()); - - object k = p->first(); - if (weak) { - k = cast(t, k)->target(); - if (k == 0) { - continue; - } - } - - unsigned index = hash(t, k) & (newLength - 1); - - p->setThird(t, newArray->body()[index]); - newArray->setBodyElement(t, index, p); - } - } - } - } - - map->setArray(t, newArray); -} - -void hashMapInsert(Thread* t, - GcHashMap* map, - object key, - object value, - uint32_t (*hash)(Thread*, object)) -{ - // note that we reinitialize the array variable whenever an - // allocation (and thus possibly a collection) occurs, in case the - // array changes due to a table resize. - - PROTECT(t, map); - - uint32_t h = hash(t, key); - - bool weak = objectClass(t, map) == type(t, GcWeakHashMap::Type); - - GcArray* array = map->array(); - - ++map->size(); - - if (array == 0 or map->size() >= array->length() * 2) { - PROTECT(t, key); - PROTECT(t, value); - - hashMapResize(t, map, hash, array ? array->length() * 2 : 16); - - array = map->array(); - } - - object k = key; - - if (weak) { - PROTECT(t, key); - PROTECT(t, value); - - GcWeakReference* r = makeWeakReference(t, 0, 0, 0, 0); - - r->setTarget(t, key); - r->setVmNext(t, t->m->weakReferences); - t->m->weakReferences = r->as(t); - k = r; - - array = map->array(); - } - - GcTriple* n = makeTriple(t, k, value, 0); - - array = map->array(); - - unsigned index = h & (array->length() - 1); - - n->setThird(t, array->body()[index]); - array->setBodyElement(t, index, n); - - if (map->size() <= array->length() / 3) { - // this might happen if nodes were removed during GC in which case - // we weren't able to resize at the time - hashMapResize(t, map, hash, array->length() / 2); - } -} - -GcTriple* hashMapRemoveNode(Thread* t, - GcHashMap* map, - unsigned index, - GcTriple* p, - GcTriple* n) -{ - if (p) { - p->setThird(t, n->third()); - } else { - map->array()->setBodyElement(t, index, n->third()); - } - --map->size(); - return n; -} - -object hashMapRemove(Thread* t, - GcHashMap* map, - object key, - uint32_t (*hash)(Thread*, object), - bool (*equal)(Thread*, object, object)) -{ - bool weak = objectClass(t, map) == type(t, GcWeakHashMap::Type); - - GcArray* array = map->array(); - object o = 0; - if (array) { - unsigned index = hash(t, key) & (array->length() - 1); - GcTriple* p = 0; - for (GcTriple* n = cast(t, array->body()[index]); n;) { - object k = n->first(); - if (weak) { - k = cast(t, k)->target(); - if (k == 0) { - n = cast(t, - hashMapRemoveNode(t, map, index, p, n)->third()); - continue; - } - } - - if (equal(t, key, k)) { - o = hashMapRemoveNode(t, map, index, p, n)->second(); - break; - } else { - p = n; - n = cast(t, n->third()); - } - } - - if ((not t->m->collecting) and map->size() <= array->length() / 3) { - PROTECT(t, o); - hashMapResize(t, map, hash, array->length() / 2); - } - } - - return o; -} - -void listAppend(Thread* t, GcList* list, object value) -{ - PROTECT(t, list); - - ++list->size(); - - object p = makePair(t, value, 0); - if (list->front()) { - cast(t, list->rear())->setSecond(t, p); - } else { - list->setFront(t, p); - } - list->setRear(t, p); -} - -GcVector* vectorAppend(Thread* t, GcVector* vector, object value) -{ - if (vector->length() == vector->size()) { - PROTECT(t, vector); - PROTECT(t, value); - - GcVector* newVector - = makeVector(t, vector->size(), max(16, vector->size() * 2)); - - if (vector->size()) { - for (size_t i = 0; i < vector->size(); i++) { - newVector->setBodyElement(t, i, vector->body()[i]); - } - } - - vector = newVector; - } - - vector->setBodyElement(t, vector->size(), value); - ++vector->size(); - return vector; -} - -GcArray* growArray(Thread* t, GcArray* array) -{ - PROTECT(t, array); - - GcArray* newArray = makeArray(t, array == 0 ? 16 : (array->length() * 2)); - - if (array) { - for (size_t i = 0; i < array->length(); i++) { - newArray->setBodyElement(t, i, array->body()[i]); - } - } - - return newArray; -} - -object treeQuery(Thread* t, - GcTreeNode* tree, - intptr_t key, - GcTreeNode* sentinal, - intptr_t (*compare)(Thread* t, intptr_t key, object b)) -{ - GcTreeNode* node = treeFind(t, tree, key, sentinal, compare); - return (node ? getTreeNodeValue(t, node) : 0); -} - -GcTreeNode* treeInsert(Thread* t, - Zone* zone, - GcTreeNode* tree, - intptr_t key, - object value, - GcTreeNode* sentinal, - intptr_t (*compare)(Thread* t, intptr_t key, object b)) -{ - PROTECT(t, tree); - PROTECT(t, sentinal); - - GcTreeNode* node = makeTreeNode(t, value, sentinal, sentinal); - - TreeContext c(t, zone); - treeFind(t, &c, tree, key, node, sentinal, compare); - expect(t, c.fresh); - - return treeAdd(t, &c); -} - -void treeUpdate(Thread* t, - GcTreeNode* tree, - intptr_t key, - object value, - GcTreeNode* sentinal, - intptr_t (*compare)(Thread* t, intptr_t key, object b)) -{ - setTreeNodeValue(t, treeFind(t, tree, key, sentinal, compare), value); -} - -} // namespace vm diff --git a/sgx-jvm/avian/src/util/CMakeLists.txt b/sgx-jvm/avian/src/util/CMakeLists.txt deleted file mode 100644 index d4311a7b7f..0000000000 --- a/sgx-jvm/avian/src/util/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_library(avian_util arg-parser.cpp fixed-allocator.cpp) \ No newline at end of file diff --git a/sgx-jvm/avian/src/util/arg-parser.cpp b/sgx-jvm/avian/src/util/arg-parser.cpp deleted file mode 100644 index 50493d44fb..0000000000 --- a/sgx-jvm/avian/src/util/arg-parser.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include -#include - -#include -#include - -namespace avian { -namespace util { - -Arg::Arg(ArgParser& parser, bool required, const char* name, const char* desc) - : next(0), required(required), name(name), desc(desc), value(0) -{ - *parser.last = this; - parser.last = &next; -} - -ArgParser::ArgParser() : first(0), last(&first) -{ -} - -bool ArgParser::parse(int ac, const char* const* av) -{ - Arg* state = 0; - - for (int i = 1; i < ac; i++) { - if (state) { - if (state->value) { - fprintf(stderr, - "duplicate parameter %s: '%s' and '%s'\n", - state->name, - state->value, - av[i]); - return false; - } - state->value = av[i]; - state = 0; - } else { - if (av[i][0] != '-') { - fprintf(stderr, "expected -parameter\n"); - return false; - } - bool found = false; - for (Arg* arg = first; arg; arg = arg->next) { - if (strcmp(arg->name, &av[i][1]) == 0) { - found = true; - if (arg->desc == 0) { - arg->value = "true"; - } else { - state = arg; - } - } - } - if (not found) { - fprintf(stderr, "unrecognized parameter %s\n", av[i]); - return false; - } - } - } - - if (state) { - fprintf(stderr, "expected argument after -%s\n", state->name); - return false; - } - - for (Arg* arg = first; arg; arg = arg->next) { - if (arg->required && !arg->value) { - fprintf(stderr, "expected value for %s\n", arg->name); - return false; - } - } - - return true; -} - -void ArgParser::printUsage(const char* exe) -{ - fprintf(stderr, "usage:\n%s \\\n", exe); - for (Arg* arg = first; arg; arg = arg->next) { - const char* lineEnd = arg->next ? " \\" : ""; - if (arg->required) { - fprintf(stderr, " -%s\t%s%s\n", arg->name, arg->desc, lineEnd); - } else if (arg->desc) { - fprintf(stderr, " [-%s\t%s]%s\n", arg->name, arg->desc, lineEnd); - } else { - fprintf(stderr, " [-%s]%s\n", arg->name, lineEnd); - } - } -} - -} // namespace util -} // namespace avian diff --git a/sgx-jvm/avian/src/util/fixed-allocator.cpp b/sgx-jvm/avian/src/util/fixed-allocator.cpp deleted file mode 100644 index bc87e6d1c0..0000000000 --- a/sgx-jvm/avian/src/util/fixed-allocator.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include - -namespace avian { -namespace util { - -FixedAllocator::FixedAllocator(Aborter* a, Slice memory) - : a(a), memory(memory), offset(0) -{ -} - -void* FixedAllocator::tryAllocate(size_t size) -{ - return allocate(size); -} - -void* FixedAllocator::allocate(size_t size, unsigned padAlignment) -{ - size_t paddedSize = vm::pad(size, padAlignment); - expect(a, offset + paddedSize < memory.count); - - void* p = memory.begin() + offset; - offset += paddedSize; - return p; -} - -void* FixedAllocator::allocate(size_t size) -{ - return allocate(size, vm::BytesPerWord); -} - -void FixedAllocator::free(const void* p, size_t size) -{ - if (p >= memory.begin() - and static_cast(p) + size == memory.begin() + offset) { - offset -= size; - } else { - abort(a); - } -} - -} // namespace util -} // namespace avian diff --git a/sgx-jvm/avian/src/x86_64.S b/sgx-jvm/avian/src/x86_64.S deleted file mode 100644 index 501b8982f1..0000000000 --- a/sgx-jvm/avian/src/x86_64.S +++ /dev/null @@ -1,340 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include "avian/types.h" - -#define LOCAL(x) .L##x - -#if defined __APPLE__ \ - || ((defined __MINGW32__ || defined __CYGWIN32__) && ! defined __x86_64__) -# define GLOBAL(x) _##x -#else -# define GLOBAL(x) x -#endif - -.text - -#define CHECKPOINT_THREAD 8 -#define CHECKPOINT_STACK 48 - -#ifdef __MINGW32__ - -.globl GLOBAL(vmNativeCall) -GLOBAL(vmNativeCall): - pushq %rbp - //save nonvolatile registers - pushq %r12 - pushq %r13 - pushq %r14 - pushq %r15 - movq %rsp, %rbp - - - // %rcx: function - // %rdx: arguments - // %r8: arguments count - // %r9: return type - - movq %rcx, %r10 - movq %rdx, %r11 - movq %r8, %r12 - movq %r9, %r13 - - // %r10: function - // %r11: arguments - // %r12: arguments count - // %r13: return type - - //allocate initial stack space - subq $32, %rsp - - //first arg - cmp $0, %r12 - je LOCAL(call) - movq 0(%r11),%rcx - movq 0(%r11),%xmm0 - subq $1, %r12 - - //second arg - cmp $0, %r12 - je LOCAL(call) - movq 8(%r11),%rdx - movq 8(%r11),%xmm1 - subq $1, %r12 - - //third arg - cmp $0, %r12 - je LOCAL(call) - movq 16(%r11),%r8 - movq 16(%r11),%xmm2 - subq $1, %r12 - - //fourth arg - cmp $0, %r12 - je LOCAL(call) - movq 24(%r11),%r9 - movq 24(%r11),%xmm3 - subq $1, %r12 - - - //calculate stack space for arguments, aligned - movq $8, %r15 - leaq (%r15, %r12, 8), %r15 - andq $0xFFFFFFFFFFFFFFF0, %r15 - - //reserve stack space for arguments - subq %r15, %rsp - - //reset the counter - addq $3, %r12 - jmp LOCAL(loopend) - -LOCAL(loop): - movq (%r11, %r12, 8), %r14 - movq %r14, (%rsp, %r12, 8); - subq $1, %r12 - -LOCAL(loopend): - //we don't need to move arg 3 and lower - cmpq $3, %r12 - jne LOCAL(loop) - -LOCAL(call): - call *%r10 - -LOCAL(void): - cmpq $VOID_TYPE,%r13 - jne LOCAL(float) - jmp LOCAL(exit) - -LOCAL(float): - cmpq $FLOAT_TYPE,%r13 - je LOCAL(copy) - cmpq $DOUBLE_TYPE,%r13 - jne LOCAL(exit) - -LOCAL(copy): - movq %xmm0,%rax - -LOCAL(exit): - - movq %rbp, %rsp - //return nonvolatile registers to their former state - popq %r15 - popq %r14 - popq %r13 - popq %r12 - - popq %rbp - ret - -.globl GLOBAL(vmJump) -GLOBAL(vmJump): - movq %rdx,%rbp - movq 40(%rsp),%rax - movq 48(%rsp),%rdx - movq %r8,%rsp - movq %r9,%rbx - jmp *%rcx - -#define VMRUN_FRAME_SIZE 80 - -.globl GLOBAL(vmRun) -GLOBAL(vmRun): - // %rcx: function - // %rdx: arguments - // %r8 : checkpoint - pushq %rbp - movq %rsp,%rbp - subq $VMRUN_FRAME_SIZE,%rsp - - movq %rbx,16(%rsp) - movq %r12,24(%rsp) - movq %r13,32(%rsp) - movq %r14,40(%rsp) - movq %r15,48(%rsp) - movq %rsi,56(%rsp) - movq %rdi,64(%rsp) - - movq %rsp,CHECKPOINT_STACK(%r8) - - movq %rcx,%r11 - movq CHECKPOINT_THREAD(%r8),%rcx - - call *%r11 - -.globl GLOBAL(vmRun_returnAddress) -GLOBAL(vmRun_returnAddress): - - movq 16(%rsp),%rbx - movq 24(%rsp),%r12 - movq 32(%rsp),%r13 - movq 40(%rsp),%r14 - movq 48(%rsp),%r15 - movq 56(%rsp),%rsi - movq 64(%rsp),%rdi - - addq $VMRUN_FRAME_SIZE,%rsp - popq %rbp - ret - -#else // not __MINGW32__ - -.globl GLOBAL(vmNativeCall) -GLOBAL(vmNativeCall): - pushq %rbp - movq %rsp,%rbp - - // %rdi aka -48(%rbp): function - // %rsi aka -40(%rbp): stack - // %rdx aka -32(%rbp): stackSize - // %rcx aka -24(%rbp): gprTable - // %r8 aka -16(%rbp): sseTable - // %r9 aka -8(%rbp): returnType - - // save our argument registers so we can clobber them - pushq %r9 - pushq %r8 - pushq %rcx - pushq %rdx - pushq %rsi - pushq %rdi - - // reserve space for arguments passed via memory - subq %rdx,%rsp - - // align to a 16 byte boundary - andq $0xFFFFFFFFFFFFFFF0,%rsp - - // copy memory arguments into place - movq $0,%rcx - jmp LOCAL(test) - -LOCAL(loop): - movq %rcx,%rax - movq %rcx,%rdx - addq %rsp,%rdx - addq -40(%rbp),%rax - movq (%rax),%rax - movq %rax,(%rdx) - addq $8,%rcx - -LOCAL(test): - cmpq -32(%rbp),%rcx - jb LOCAL(loop) - - // do we need to load the general-purpose registers? - cmpq $0,-24(%rbp) - je LOCAL(sse) - - // yes, we do - movq -24(%rbp),%rax - movq 0(%rax),%rdi - movq 8(%rax),%rsi - movq 16(%rax),%rdx - movq 24(%rax),%rcx - movq 32(%rax),%r8 - movq 40(%rax),%r9 - -LOCAL(sse): - // do we need to load the SSE registers? - cmpq $0,-16(%rbp) - je LOCAL(call) - - // yes, we do - movq -16(%rbp),%rax - movq 0(%rax),%xmm0 - movq 8(%rax),%xmm1 - movq 16(%rax),%xmm2 - movq 24(%rax),%xmm3 - movq 32(%rax),%xmm4 - movq 40(%rax),%xmm5 - movq 48(%rax),%xmm6 - movq 56(%rax),%xmm7 - -LOCAL(call): - call *-48(%rbp) - - // handle return value based on expected type - movq -8(%rbp),%rcx - -LOCAL(void): - cmpq $VOID_TYPE,%rcx - jne LOCAL(float) - jmp LOCAL(exit) - -LOCAL(float): - cmpq $FLOAT_TYPE,%rcx - je LOCAL(copy) - cmpq $DOUBLE_TYPE,%rcx - jne LOCAL(exit) - -LOCAL(copy): -#ifdef __APPLE__ - // as of OS X 10.6, Apple is still using an assembler that doesn't - // understand movq SSE,GPR, but movd does the same thing, despite - // the name - movd %xmm0,%rax -#else - movq %xmm0,%rax -#endif - -LOCAL(exit): - movq %rbp,%rsp - popq %rbp - ret - -.globl GLOBAL(vmJump) -GLOBAL(vmJump): - movq %rsi,%rbp - movq %rdx,%rsp - movq %rcx,%rbx - movq %r8,%rax - movq %r9,%rdx - jmp *%rdi - -#define VMRUN_FRAME_SIZE 64 - -.globl GLOBAL(vmRun) -GLOBAL(vmRun): - // %rdi: function - // %rsi: arguments - // %rdx: checkpoint - pushq %rbp - movq %rsp,%rbp - subq $VMRUN_FRAME_SIZE,%rsp - - movq %rbx,16(%rsp) - movq %r12,24(%rsp) - movq %r13,32(%rsp) - movq %r14,40(%rsp) - movq %r15,48(%rsp) - - movq %rsp,CHECKPOINT_STACK(%rdx) - - movq %rdi,%r11 - movq CHECKPOINT_THREAD(%rdx),%rdi - - call *%r11 - -.globl GLOBAL(vmRun_returnAddress) -GLOBAL(vmRun_returnAddress): - - movq 16(%rsp),%rbx - movq 24(%rsp),%r12 - movq 32(%rsp),%r13 - movq 40(%rsp),%r14 - movq 48(%rsp),%r15 - - addq $VMRUN_FRAME_SIZE,%rsp - popq %rbp - ret - -#endif // not __MINGW32__ diff --git a/sgx-jvm/avian/test/AllFloats.java b/sgx-jvm/avian/test/AllFloats.java deleted file mode 100644 index 0bba388b9b..0000000000 --- a/sgx-jvm/avian/test/AllFloats.java +++ /dev/null @@ -1,86 +0,0 @@ -public class AllFloats { - private static float multiplyByFive(float a) {return 5f * a;} - private static double multiplyByFive(double a) {return 5d * a;} - private static float multiply(float a, float b) {return a * b;} - private static double multiply(double a, double b) {return a * b;} - private static double multiply(float a, double b) {return a * b;} - private static float divide(float a, float b) {return a / b;} - private static double divide(double a, double b) {return a / b;} - private static double divide(float a, double b) {return a / b;} - private static float remainder(float a, float b) {return a % b;} - private static double remainder(double a, double b) {return a % b;} - private static double remainder(float a, double b) {return a % b;} - private static float add(float a, float b) {return a + b;} - private static double add(double a, double b) {return a + b;} - private static double add(float a, double b) {return a + b;} - private static float subtract(float a, float b) {return a - b;} - private static double subtract(double a, double b) {return a - b;} - private static double subtract(float a, double b) {return a - b;} - private static float complex(float a, float b) {return (a - b) / (a * b) + (float)Math.sqrt(a);} - private static double complex(double a, double b) {return (a - b) / (a * b) + Math.sqrt(a);} - private static double complex(float a, double b) {return (a - b) / (a * b) + Math.sqrt(a);} - private static double sqrt(double a) {return Math.sqrt(a);} - private static float complexNoIntrinsic(float a, float b) {return (a - b) / (a * b) + (float)sqrt(a);} - private static int f2i(float a) {return (int)a;} - private static long f2l(float a) {return (long)a;} - private static float i2f(int a) {return (float)a;} - private static double i2d(int a) {return (double)a;} - private static int d2i(double a) {return (int)a;} - private static long d2l(double a) {return (long)a;} - private static float l2f(long a) {return (float)a;} - private static double l2d(long a) {return (double)a;} - private static float negate(float a) {return -a;} - private static double negate(double a) {return -a;} - private static int abs(int a) {return Math.abs(a);} - private static float abs(float a) {return Math.abs(a);} - - private static void expect(boolean v) { - if(!v)throw new RuntimeException(); - } - - private static int last(){return 0;} - - public static void main(String[] args) { - expect(multiplyByFive(36f) == 5f * 36f); - expect(multiplyByFive(36d) == 5d * 36d); - expect(multiply(5f, 4f) == 5f*4f); - expect(multiply(5d, 4d) == 5d*4d); - expect(multiply(5f, 4d) == 5f*4d); - expect(divide(5f, 2f) == 5f/2f); - expect(divide(5d, 2d) == 5d/2d); - expect(divide(5f, 2d) == 5f/2d); - expect(remainder(5f, 2f) == 5f%2f); - expect(remainder(5d, 2d) == 5d%2d); - expect(remainder(5f, 2d) == 5f%2d); - expect(add(5f, 4f) == 5f+4f); - expect(add(5d, 4d) == 5f+4d); - expect(add(5f, 4d) == 5f+4d); - expect(subtract(5f, 4f) == 5f-4f); - expect(subtract(5d, 4d) == 5f-4d); - expect(subtract(5f, 4d) == 5f-4d); - expect(complex(4f, 3f) == (4f-3f)/(4f*3f) + 2f); - expect(complex(4d, 3d) == (4d-3d)/(4d*3d) + 2d); - expect(complex(4f, 3d) == (4f-3d)/(4f*3d) + 2f); - expect(complexNoIntrinsic(4f, 3f) == (4f-3f)/(4f*3f) + 2f); - - expect(f2i(4f) == 4); - expect(f2l(4f) == 4); - expect(i2f(4) == 4f); - expect(i2d(4) == 4d); - - expect(d2i(4d) == 4); - expect(d2l(4d) == 4); - expect(l2f(4) == 4f); - expect(l2d(4) == 4d); - - expect(negate(4f) == -4f); - expect(negate(4d) == -4d); - - expect(abs(-4) == 4); - expect(abs(12) == 12); - expect(abs(-4f) == 4f); - expect(abs(12f) == 12f); - - int unused = last(); - } -} diff --git a/sgx-jvm/avian/test/Annotations.java b/sgx-jvm/avian/test/Annotations.java deleted file mode 100644 index f09b0251eb..0000000000 --- a/sgx-jvm/avian/test/Annotations.java +++ /dev/null @@ -1,89 +0,0 @@ -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; -import java.lang.reflect.Proxy; - -import avian.testing.annotations.Color; -import avian.testing.annotations.Test; -import avian.testing.annotations.TestComplex; -import avian.testing.annotations.TestEnum; -import avian.testing.annotations.TestInteger; - -public class Annotations { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) throws Exception { - Method m = Annotations.class.getMethod("foo"); - - expect(m.isAnnotationPresent(Test.class)); - - expect(((Test) m.getAnnotation(Test.class)).value().equals("couscous")); - - expect(((TestEnum) m.getAnnotation(TestEnum.class)).value() - .equals(Color.Red)); - - expect(((TestInteger) m.getAnnotation(TestInteger.class)).value() == 42); - - expect(m.getAnnotations().length == 3); - - Method noAnno = Annotations.class.getMethod("noAnnotation"); - expect(noAnno.getAnnotation(Test.class) == null); - expect(noAnno.getAnnotations().length == 0); - testProxyDefaultValue(); - testComplexAnnotation(); - } - - @Test("couscous") - @TestEnum(Color.Red) - @TestInteger(42) - public static void foo() { - - } - - public static void noAnnotation() { - - } - - private static void testProxyDefaultValue() { - ClassLoader loader = Annotations.class.getClassLoader(); - InvocationHandler handler = new InvocationHandler() { - public Object invoke(Object proxy, Method method, Object... args) { - return method.getDefaultValue(); - } - }; - Test test = (Test) - Proxy.newProxyInstance(loader, new Class[] { Test.class }, handler); - expect("Hello, world!".equals(test.value())); - } - - private interface World { - @TestComplex(arrayValue = { @Test, @Test(value = "7/9") }, - stringValue = "adjunct element", charValue = '7', doubleValue = 0.7778, - classValue = TestInteger.class) - int hello(); - } - - private static void testComplexAnnotation(TestComplex annotation) - throws Exception - { - expect(2 == annotation.arrayValue().length); - expect("Hello, world!".equals(annotation.arrayValue()[0].value())); - expect("7/9".equals(annotation.arrayValue()[1].value())); - expect("adjunct element".equals(annotation.stringValue())); - expect('7' == annotation.charValue()); - expect(0.7778 == annotation.doubleValue()); - expect(TestInteger.class == annotation.classValue()); - } - - public static void testComplexAnnotation() throws Exception { - ClassLoader loader = Annotations.class.getClassLoader(); - TestComplex annotation = (TestComplex) - World.class.getMethod("hello").getAnnotation(TestComplex.class); - testComplexAnnotation(annotation); - Class clazz = Proxy.getProxyClass(loader, new Class[] { World.class }); - annotation = (TestComplex) - clazz.getMethod("hello").getAnnotation(TestComplex.class); - expect(annotation == null); - } -} diff --git a/sgx-jvm/avian/test/ArrayDequeTest.java b/sgx-jvm/avian/test/ArrayDequeTest.java deleted file mode 100644 index 103cda4fa3..0000000000 --- a/sgx-jvm/avian/test/ArrayDequeTest.java +++ /dev/null @@ -1,161 +0,0 @@ -import java.util.ArrayDeque; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.NoSuchElementException; - -public class ArrayDequeTest { - private static void verify(boolean val) { - if (! val) { - throw new RuntimeException(); - } - } - - public static void main(String[] args) throws InterruptedException { - QueueHelper.sizeTest(new ArrayDeque()); - QueueHelper.isEmptyTest(new ArrayDeque()); - QueueHelper.addTest(new ArrayDeque()); - QueueHelper.addAllTest(new ArrayDeque()); - QueueHelper.elementTest(new ArrayDeque()); - QueueHelper.elementFail(new ArrayDeque()); - QueueHelper.removeEmptyFail(new ArrayDeque()); - QueueHelper.removeTest(new ArrayDeque()); - QueueHelper.containsTest(new ArrayDeque()); - QueueHelper.containsAllTest(new ArrayDeque()); - QueueHelper.removeObjectTest(new ArrayDeque()); - QueueHelper.removeAllTest(new ArrayDeque()); - QueueHelper.clearTest(new ArrayDeque()); - QueueHelper.toArrayTest(new ArrayDeque()); - - DequeHelper.addFirstTest(new ArrayDeque()); - DequeHelper.addLastTest(new ArrayDeque()); - DequeHelper.removeFirstTest(new ArrayDeque()); - DequeHelper.removeLastTest(new ArrayDeque()); - - iterateTest(false); - iterateTest(true); - iteratorRemoveTest(false); - iteratorRemoveTest(true); - iteratorNoElementFail(false); - iteratorNoElementFail(true); - } - - private static void iterateTest(boolean desc) { - int testQty = 10; - LinkedList compareList = new LinkedList(); - ArrayDeque ad = new ArrayDeque(); - - for (int i = 0; i < testQty; i++) { - Object o = new Object(); - compareList.add(o); - ad.add(o); - } - - Iterator compIt; - Iterator testIt; - if (desc) { - compIt = compareList.descendingIterator(); - testIt = ad.descendingIterator(); - } else { - compIt = compareList.iterator(); - testIt = ad.iterator(); - } - while (testIt.hasNext()) { - verify(testIt.next() == compIt.next()); - } - - // remove from the front - compareList.removeFirst(); - ad.removeFirst(); - - if (desc) { - compIt = compareList.descendingIterator(); - testIt = ad.descendingIterator(); - } else { - compIt = compareList.iterator(); - testIt = ad.iterator(); - } - while (testIt.hasNext()) { - verify(testIt.next() == compIt.next()); - } - - // remove from the end - compareList.removeLast(); - ad.removeLast(); - - if (desc) { - compIt = compareList.descendingIterator(); - testIt = ad.descendingIterator(); - } else { - compIt = compareList.iterator(); - testIt = ad.iterator(); - } - while (testIt.hasNext()) { - verify(testIt.next() == compIt.next()); - } - } - - private static void iteratorRemoveTest(boolean desc) { - int testQty = 20; - LinkedList compareList = new LinkedList(); - ArrayDeque ad = new ArrayDeque(); - - for (int i = 0; i < testQty; i++) { - Object o = new Object(); - compareList.add(o); - ad.add(o); - } - - Iterator compIt; - Iterator testIt; - if (desc) { - compIt = compareList.descendingIterator(); - testIt = ad.descendingIterator(); - } else { - compIt = compareList.iterator(); - testIt = ad.iterator(); - } - boolean flip = true; // start with true to ensure first is removed - while (testIt.hasNext()) { - // advance iterators - testIt.next(); - compIt.next(); - - if (flip || ! testIt.hasNext()) { - compIt.remove(); - testIt.remove(); - flip = false; - } else { - flip = true; - } - } - - if (desc) { - compIt = compareList.descendingIterator(); - testIt = ad.descendingIterator(); - } else { - compIt = compareList.iterator(); - testIt = ad.iterator(); - } - while (testIt.hasNext()) { - verify(testIt.next() == compIt.next()); - } - } - - private static void iteratorNoElementFail(boolean desc) { - ArrayDeque ad = new ArrayDeque(); - - Iterator testIt; - if (desc) { - testIt = ad.descendingIterator(); - } else { - testIt = ad.iterator(); - } - - try { - testIt.next(); - throw new RuntimeException("Exception should have thrown"); - } catch (NoSuchElementException e) { - // expected - } - } -} diff --git a/sgx-jvm/avian/test/ArraysTest.java b/sgx-jvm/avian/test/ArraysTest.java deleted file mode 100644 index 6a9d478f5c..0000000000 --- a/sgx-jvm/avian/test/ArraysTest.java +++ /dev/null @@ -1,206 +0,0 @@ -import java.util.Arrays; - -public class ArraysTest { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static > void expectSorted(T[] array) { - for (int i = 1; i < array.length; ++i) { - expect(array[i - 1].compareTo(array[i]) <= 0); - } - } - - private static int pseudoRandom(int seed) { - return 3170425 * seed + 132102; - } - - private static > int shuffle(T[] array, int seed) { - for (int i = array.length; i > 1; --i) { - int i2 = (seed < 0 ? -seed : seed) % i; - T value = array[i - 1]; - array[i - 1] = array[i2]; - array[i2] = value; - seed = pseudoRandom(seed); - } - return seed; - } - - public static void testSort() { - Integer[] array = new Integer[64]; - for (int i = 0; i < array.length; ++i) { - array[i] = Integer.valueOf(i + 1); - } - ; - int random = 12345; - for (int i = 0; i < 32; ++i) { - random = shuffle(array, random); - Arrays.sort(array); - expectSorted(array); - } - } - - public static void testBinarySearch() { - int[] a = new int[]{ 1, 5, 7, 8, 10, 13, 17, 18, 21, 26 }; - - int i = Arrays.binarySearch(a, 5); - expect(i == 1); - i = Arrays.binarySearch(a, 17); - expect(i == 6); - i = Arrays.binarySearch(a, 6); - expect(i == -3); - i = Arrays.binarySearch(a, 1, 4, 8); - expect(i == 3); - i = Arrays.binarySearch(a, 1, 4, 10); - expect(i == -5); - - Exception exception = null; - try { - Arrays.binarySearch(a, -1, a.length, 4); - } catch (ArrayIndexOutOfBoundsException e) { - exception = e; - } - expect(exception != null); - - exception = null; - try { - Arrays.binarySearch(a, 0, a.length + 1, 4); - } catch (ArrayIndexOutOfBoundsException e) { - exception = e; - } - expect(exception != null); - } - - public static void main(String[] args) { - { int[] array = new int[0]; - Exception exception = null; - try { - int x = array[0]; - } catch (ArrayIndexOutOfBoundsException e) { - exception = e; - } - - expect(exception != null); - } - - { int[] array = new int[0]; - Exception exception = null; - try { - int x = array[-1]; - } catch (ArrayIndexOutOfBoundsException e) { - exception = e; - } - - expect(exception != null); - } - - { int[] array = new int[3]; - int i = 0; - array[i++] = 1; - array[i++] = 2; - array[i++] = 3; - - expect(array[--i] == 3); - expect(array[--i] == 2); - expect(array[--i] == 1); - } - - { Object[][] array = new Object[1][1]; - expect(array.length == 1); - expect(array[0].length == 1); - } - - { Object[][] array = new Object[2][3]; - expect(array.length == 2); - expect(array[0].length == 3); - } - - { int j = 0; - byte[] decodeTable = new byte[256]; - for (int i = 'A'; i <= 'Z'; ++i) decodeTable[i] = (byte) j++; - for (int i = 'a'; i <= 'z'; ++i) decodeTable[i] = (byte) j++; - for (int i = '0'; i <= '9'; ++i) decodeTable[i] = (byte) j++; - decodeTable['+'] = (byte) j++; - decodeTable['/'] = (byte) j++; - decodeTable['='] = 0; - - expect(decodeTable['a'] != 0); - } - - { boolean p = true; - int[] array = new int[] { 1, 2 }; - expect(array[0] == array[p ? 0 : 1]); - p = false; - expect(array[1] == array[p ? 0 : 1]); - } - - { int[] array = new int[1024]; - array[1023] = -1; - expect(array[1023] == -1); - expect(array[1022] == 0); - } - - { Integer[] array = (Integer[]) - java.lang.reflect.Array.newInstance(Integer.class, 1); - array[0] = Integer.valueOf(42); - expect(array[0].intValue() == 42); - } - - { Object[] a = new Object[3]; - Object[] b = new Object[3]; - - expect(Arrays.equals(a, b)); - a[0] = new Object(); - expect(! Arrays.equals(a, b)); - expect(! Arrays.equals(b, new Object[4])); - expect(! Arrays.equals(a, null)); - expect(! Arrays.equals(null, b)); - expect(Arrays.equals((Object[])null, (Object[])null)); - b[0] = a[0]; - expect(Arrays.equals(a, b)); - - Arrays.hashCode(a); - Arrays.hashCode((Object[])null); - } - - { String[] list = new String[] { "Hello", "World", "!" }; - Object[] result = Arrays.copyOf(list, 2, Object[].class); - expect(list[1] == result[1]); - expect(result.length == 2); - expect(result.getClass().getComponentType() == Object.class); - } - - { Object[] a = new Object[3]; - Object[] b = new Object[3]; - - expect(Arrays.deepEquals(a, b)); - - a[0] = new Object(); - expect(! Arrays.deepEquals(a, b)); - expect(! Arrays.deepEquals(b, new Object[4])); - expect(! Arrays.deepEquals(a, null)); - expect(! Arrays.deepEquals(null, b)); - expect(Arrays.deepEquals((Object[])null, (Object[])null)); - - b[0] = a[0]; - expect(Arrays.deepEquals(a, b)); - - a[0] = new Object[] {1}; - expect(! Arrays.deepEquals(a, b)); - b[0] = new Object[] {1}; - expect(Arrays.deepEquals(a, b)); - ((Object[])a[0])[0] = (Long)1L; - expect(! Arrays.deepEquals(a, b)); - a[0] = new Integer[] {1}; - expect(Arrays.deepEquals(a, b)); - - a[0] = new int[] {1}; - expect(! Arrays.deepEquals(a, b)); - b[0] = new int[] {1}; - expect(Arrays.deepEquals(a, b)); - } - - testSort(); - testBinarySearch(); - } -} diff --git a/sgx-jvm/avian/test/AtomicTests.java b/sgx-jvm/avian/test/AtomicTests.java deleted file mode 100644 index 9dab42703e..0000000000 --- a/sgx-jvm/avian/test/AtomicTests.java +++ /dev/null @@ -1,231 +0,0 @@ -import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; -import java.util.concurrent.atomic.AtomicLong; -import java.util.concurrent.atomic.AtomicReference; - - -public class AtomicTests { - private static final int threadCount = 10; - private static final int iterationsPerThread = 100; - - public static void main(String[] args) { - runAtomicIntegerTest(true); - runAtomicIntegerTest(false); - - runAtomicLongTest(true); - runAtomicLongTest(false); - - runAtomicReferenceTest(); - } - - private static void blockTillThreadsDone(AtomicInteger threadDoneCount) throws InterruptedException { - synchronized (threadDoneCount) { - while (threadDoneCount.get() < threadCount) { - threadDoneCount.wait(); - } - } - } - - private static void runAtomicIntegerTest(final boolean increment) { - final AtomicInteger result = new AtomicInteger(); - final AtomicInteger threadDoneCount = new AtomicInteger(); - // only using an AtomicBoolean here so I don't need two variables to do the synchronize/wait/notify - final AtomicBoolean threadsStart = new AtomicBoolean(false); - - Runnable operationRunnable = new Runnable() { - @Override - public void run() { - boolean flip = true; - for (int i = 0; i < iterationsPerThread; i++) { - if (flip) { - if (increment) { - result.incrementAndGet(); - } else { - result.decrementAndGet(); - } - flip = false; - } else { - if (increment) { - result.getAndIncrement(); - } else { - result.getAndDecrement(); - } - flip = true; - } - } - } - }; - - for (int i = 0; i < threadCount; i++) { - new Thread(new DelayedRunnable(threadsStart, - operationRunnable, - threadDoneCount)).start(); - } - - synchronized (threadsStart) { - threadsStart.set(true); - - threadsStart.notifyAll(); - } - - try { - blockTillThreadsDone(threadDoneCount); - } catch (InterruptedException e) { - // let thread exit - return; - } - - int expectedResult = threadCount * iterationsPerThread; - if (! increment) { - expectedResult *= -1; - } - int resultValue = result.get(); - if (resultValue != expectedResult) { - throw new IllegalStateException(resultValue + " != " + expectedResult); - } - } - - private static void runAtomicLongTest(final boolean increment) { - final AtomicLong result = new AtomicLong(); - final AtomicInteger threadDoneCount = new AtomicInteger(); - // only using an AtomicBoolean here so I don't need two variables to do the synchronize/wait/notify - final AtomicBoolean threadsStart = new AtomicBoolean(false); - - Runnable operationRunnable = new Runnable() { - @Override - public void run() { - boolean flip = true; - for (int i = 0; i < iterationsPerThread; i++) { - if (flip) { - if (increment) { - result.incrementAndGet(); - } else { - result.decrementAndGet(); - } - flip = false; - } else { - if (increment) { - result.getAndIncrement(); - } else { - result.getAndDecrement(); - } - flip = true; - } - } - } - }; - - for (int i = 0; i < threadCount; i++) { - new Thread(new DelayedRunnable(threadsStart, - operationRunnable, - threadDoneCount)).start(); - } - - synchronized (threadsStart) { - threadsStart.set(true); - - threadsStart.notifyAll(); - } - - try { - blockTillThreadsDone(threadDoneCount); - } catch (InterruptedException e) { - // let thread exit - return; - } - - long expectedResult = threadCount * iterationsPerThread; - if (! increment) { - expectedResult *= -1; - } - long resultValue = result.get(); - if (resultValue != expectedResult) { - throw new IllegalStateException(resultValue + " != " + expectedResult); - } - } - - private static void runAtomicReferenceTest() { - final AtomicReference result = new AtomicReference(0); - final AtomicInteger threadDoneCount = new AtomicInteger(0); - // only using an AtomicBoolean here so I don't need two variables to do the synchronize/wait/notify - final AtomicBoolean threadsStart = new AtomicBoolean(false); - - Runnable operationRunnable = new Runnable() { - @Override - public void run() { - for (int i = 0; i < iterationsPerThread; i++) { - Integer current = result.get(); - while (! result.compareAndSet(current, current + 1)) { - current = result.get(); - } - } - } - }; - - for (int i = 0; i < threadCount; i++) { - new Thread(new DelayedRunnable(threadsStart, - operationRunnable, - threadDoneCount)).start(); - } - - synchronized (threadsStart) { - threadsStart.set(true); - - threadsStart.notifyAll(); - } - - try { - blockTillThreadsDone(threadDoneCount); - } catch (InterruptedException e) { - // let thread exit - return; - } - - long expectedResult = threadCount * iterationsPerThread; - Integer resultValue = result.get(); - if (resultValue != expectedResult) { - throw new IllegalStateException(resultValue + " != " + expectedResult); - } - } - - private static class DelayedRunnable implements Runnable { - private final AtomicBoolean threadsStart; - private final Runnable operationRunnable; - private final AtomicInteger threadDoneCount; - - private DelayedRunnable(AtomicBoolean threadsStart, - Runnable operationRunnable, - AtomicInteger threadDoneCount) { - this.threadsStart = threadsStart; - this.operationRunnable = operationRunnable; - this.threadDoneCount = threadDoneCount; - } - - @Override - public void run() { - try { - try { - waitTillReady(); - } catch (InterruptedException e) { - // let thread exit - return; - } - operationRunnable.run(); - } finally { - synchronized (threadDoneCount) { - threadDoneCount.incrementAndGet(); - - threadDoneCount.notifyAll(); - } - } - } - - private void waitTillReady() throws InterruptedException { - synchronized (threadsStart) { - while (! threadsStart.get()) { - threadsStart.wait(); - } - } - } - } -} diff --git a/sgx-jvm/avian/test/BitsetTest.java b/sgx-jvm/avian/test/BitsetTest.java deleted file mode 100644 index 6609eb60dd..0000000000 --- a/sgx-jvm/avian/test/BitsetTest.java +++ /dev/null @@ -1,128 +0,0 @@ -import java.util.BitSet; - -public class BitsetTest { - - public static void main(String[] args) { - BitSet bits = new BitSet(16); - bits.set(5); - bits.set(1); - - BitSet other = new BitSet(16); - other.set(5); - - assertTrue("bit 1 is set", bits.get(1)); - assertTrue("bit 5 is set", bits.get(5)); - assertTrue("bit 0 is not set", !bits.get(0)); - assertTrue("bit 16 is not set", !bits.get(16)); - assertCardinality(bits, 2); - - bits.and(other); - - assertTrue("bit 5 is set", bits.get(5)); - assertTrue("bit 1 is not set", !bits.get(1)); - assertCardinality(bits, 1); - - bits.set(100); - - assertTrue("bit 100 is set", bits.get(100)); - assertTrue("bit 101 is not set", !bits.get(101)); - assertCardinality(bits, 2); - - other.set(101); - - bits.or(other); - - assertTrue("bit 101 is set", bits.get(101)); - - assertEquals("first bit is 5", 5, bits.nextSetBit(0)); - assertEquals("first bit is 5 from 3", 5, bits.nextSetBit(4)); - assertEquals("first bit is 5 from 5", 5, bits.nextSetBit(5)); - assertEquals("second bit is 100", 100, bits.nextSetBit(6)); - assertEquals("second bit is 100 from 100", 100, bits.nextSetBit(100)); - assertEquals("third bit is 101", 101, bits.nextSetBit(101)); - assertEquals("there is no 4th bit", -1, bits.nextSetBit(102)); - assertCardinality(bits, 3); - - assertEquals("first empty bit is 0", 0, bits.nextClearBit(0)); - assertEquals("after 5, 6 is empty", 6, bits.nextClearBit(5)); - assertEquals("after 100, 102 is empty", 102, bits.nextClearBit(100)); - - testFlip(); - testClear(); - - BitSet expandingSet = new BitSet(); - //should force us to have 3 partitions. - expandingSet.set(128); - } - - private static void testFlip() { - /* simple case */ - BitSet bitset = new BitSet(); - bitset.set(0); - bitset.flip(0, 0); - assertTrue("Should not be flipped with 0 length range", bitset.get(0)); - bitset.flip(0, 1); - assertTrue("Should be false with range of one", !bitset.get(0)); - bitset.flip(0); - assertTrue("Should be true again", bitset.get(0)); - - /* need to grow */ - bitset.flip(1000); - assertTrue("1000 should be true", bitset.get(1000)); - assertTrue("1001 should be false", !bitset.get(1001)); - assertTrue("999 should be false", !bitset.get(999)); - - /* Range over 2 segments */ - bitset.flip(60, 70); - assertTrue("59 should be false", !bitset.get(59)); - for (int i=60; i < 70; ++i) { - assertTrue(i + " should be true", bitset.get(i)); - } - assertTrue("70 should be false", !bitset.get(70)); - } - - private static void testClear() { - BitSet bitset = new BitSet(); - bitset.set(0, 20); - assertCardinality(bitset, 20); - - bitset.clear(1); - assertTrue("bit 1 should be 0", !bitset.get(1)); - assertCardinality(bitset, 19); - - bitset.clear(0, 3); - assertTrue("bit 0 should be 0", !bitset.get(0)); - assertTrue("bit 1 should be 0", !bitset.get(1)); - assertTrue("bit 2 should be 0", !bitset.get(2)); - assertTrue("bit 3 should be 1", bitset.get(3)); - assertCardinality(bitset, 17); - - bitset = new BitSet(70); - bitset.flip(0, 65); - for (int i=0; i < 65; ++i) { - assertTrue("bit " + i + " should be set", bitset.get(i)); - } - assertTrue("bit 65 should not be set", !bitset.get(65)); - } - - static void assertTrue(String msg, boolean flag) { - if (flag) { - System.out.println(msg + " : OK."); - } else { - throw new RuntimeException("Error:"+msg); - } - } - - static void assertEquals(String msg, int expected, int actual) { - if (expected==actual) { - System.out.println(msg + " : OK. ["+actual+']'); - } else { - throw new RuntimeException("Error:"+msg+" expected:"+expected+", actual:"+actual); - } - } - - static void assertCardinality(BitSet set, int expectedCardinality) { - assertEquals("Checking cardinality", expectedCardinality, set.cardinality()); - } - -} diff --git a/sgx-jvm/avian/test/BufferedInputStreamTest.java b/sgx-jvm/avian/test/BufferedInputStreamTest.java deleted file mode 100644 index c5db546849..0000000000 --- a/sgx-jvm/avian/test/BufferedInputStreamTest.java +++ /dev/null @@ -1,70 +0,0 @@ - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.BufferedInputStream; - -/** - * Checks that BufferedInputStream does not block if data is available in it's internal buffer. - */ -public class BufferedInputStreamTest -{ - public static void main(String[] args) throws IOException - { - MyByteArrayStream in = new MyByteArrayStream(new byte[100]); - - BufferedInputStream bin = new BufferedInputStream(in); - //read a single byte to fill the buffer - int b = bin.read(); - byte[] buf = new byte[10]; - //now try to read 10 bytes. this should a least return the content of the buffer. On OpenJDK this are - //4 bytes (the rest of the buffer returned by MyByteArrayStream in the first call). - //It should definately NOT block. - int count = bin.read(buf); - System.out.println("Read bytes: " + count); - } - - /** - * Internal Stream used to show the BufferedInputStream behaviour. - */ - static class MyByteArrayStream extends ByteArrayInputStream - { - boolean stopReading = false; - - /** - * @param buf - */ - public MyByteArrayStream(byte[] buf) - { - super(buf); - } - - /* (non-Javadoc) - * @see java.io.ByteArrayInputStream#read(byte[], int, int) - */ - @Override - public synchronized int read(byte[] b, int off, int len) - { - if(stopReading == false) - { //On the first call 5 bytes are returned. - stopReading = true; - return super.read(b, off, 5); - } - //on all following calls block. The spec says, that a least one byte is returned, if the - //stream is not at EOF. - return 0; - } - - /* (non-Javadoc) - * @see java.io.ByteArrayInputStream#available() - */ - @Override - public synchronized int available() - { - if(stopReading) - { - return 0; - } - return super.available(); - } - } -} diff --git a/sgx-jvm/avian/test/Buffers.java b/sgx-jvm/avian/test/Buffers.java deleted file mode 100644 index 4af5fddfbc..0000000000 --- a/sgx-jvm/avian/test/Buffers.java +++ /dev/null @@ -1,175 +0,0 @@ -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.nio.BufferUnderflowException; -import java.nio.BufferOverflowException; -import static avian.testing.Asserts.*; - -public class Buffers { - static { - System.loadLibrary("test"); - } - - private static void testArrays(Factory factory1, Factory factory2) throws UnsupportedEncodingException { - final int size = 64; - ByteBuffer b1 = factory1.allocate(size); - ByteBuffer b2 = factory2.allocate(size); - - String s = "1234567890abcdefghijklmnopqrstuvwxyz"; - b1.put(s.getBytes("UTF-8")); - b1.flip(); - byte[] ba = new byte[s.length()]; - b1.get(ba); - assertEquals(s, new String(ba, "UTF-8")); - b1.position(0); - b2.put(b1); - b2.flip(); - b2.get(ba); - assertEquals(s, new String(ba, "UTF-8")); - b1.position(0); - b2.position(0); - b1.limit(b1.capacity()); - b2.limit(b2.capacity()); - b1.put(s.getBytes("UTF-8"), 4, 5); - b1.flip(); - ba = new byte[5]; - b1.get(ba); - assertEquals(s.substring(4, 9), new String(ba, "UTF-8")); - } - - private static void testPrimativeGetAndSet(Factory factory1, Factory factory2) { - { final int size = 64; - ByteBuffer b1 = factory1.allocate(size); - try { - - for (int i = 0; i < size; ++i) - b1.put(i, (byte) 42); - - for (int i = 0; i < size; ++i) - assertEquals(b1.get(i), 42); - - for (int i = 0; i < size/4; i++) - b1.putFloat(i*4, (float) 19.12); - - for (int i = 0; i < size/4; i++) - assertEquals(b1.getFloat(i*4), (float) 19.12); - - ByteBuffer b3 = b1.duplicate(); - for (int i = 0; i < size/4; i++) - assertEquals(b3.getFloat(), (float) 19.12); - assertEquals(64, b3.position()); - - for (int i = 0; i < size/8; i++) - b1.putDouble(i*8, (double) 19.12); - - for (int i = 0; i < size/8; i++) - assertEquals(b1.getDouble(i*8), (double) 19.12); - - b3.position(0); - - for (int i = 0; i < size/8; i++) - assertEquals(b3.getDouble(i*8), (double) 19.12); - - for (int i = 0; i < size / 2; ++i) - b1.putShort(i * 2, (short) -12345); - - for (int i = 0; i < size / 2; ++i) - assertEquals(b1.getShort(i * 2), -12345); - - for (int i = 0; i < size / 4; ++i) - b1.putInt(i * 4, 0x12345678); - - for (int i = 0; i < size / 4; ++i) - assertEquals(b1.getInt(i * 4), 0x12345678); - - for (int i = 0; i < size / 8; ++i) - b1.putLong(i * 8, 0x1234567890ABCDEFL); - - for (int i = 0; i < size / 8; ++i) - assertEquals(b1.getLong(i * 8), 0x1234567890ABCDEFL); - - ByteBuffer b2 = factory2.allocate(size); - try { - b2.put(b1); - - for (int i = 0; i < size / 8; ++i) - assertTrue(b2.getLong(i * 8) == 0x1234567890ABCDEFL); - - } finally { - factory2.dispose(b2); - } - } finally { - factory1.dispose(b1); - } - } - } - - private static native ByteBuffer allocateNative(int capacity); - - private static native void freeNative(ByteBuffer b); - - public static void main(String[] args) throws Exception { - Factory array = new Factory() { - public ByteBuffer allocate(int capacity) { - return ByteBuffer.allocate(capacity); - } - - public void dispose(ByteBuffer b) { - // ignore - } - }; - - Factory native_ = new Factory() { - public ByteBuffer allocate(int capacity) { - return allocateNative(capacity); - } - - public void dispose(ByteBuffer b) { - freeNative(b); - } - }; - - testPrimativeGetAndSet(array, array); - testArrays(array, array); - testPrimativeGetAndSet(array, native_); - testArrays(array, native_); - - testPrimativeGetAndSet(native_, array); - testArrays(native_, array); - testPrimativeGetAndSet(native_, native_); - testArrays(native_, native_); - - try { - ByteBuffer.allocate(1).getInt(); - assertTrue(false); - } catch (BufferUnderflowException e) { - // cool - } - - try { - ByteBuffer.allocate(1).getInt(0); - assertTrue(false); - } catch (IndexOutOfBoundsException e) { - // cool - } - - try { - ByteBuffer.allocate(1).putInt(1); - assertTrue(false); - } catch (BufferOverflowException e) { - // cool - } - - try { - ByteBuffer.allocate(1).putInt(0, 1); - assertTrue(false); - } catch (IndexOutOfBoundsException e) { - // cool - } - } - - private interface Factory { - public ByteBuffer allocate(int capacity); - - public void dispose(ByteBuffer b); - } -} diff --git a/sgx-jvm/avian/test/Busy.java b/sgx-jvm/avian/test/Busy.java deleted file mode 100644 index e301896416..0000000000 --- a/sgx-jvm/avian/test/Busy.java +++ /dev/null @@ -1,25 +0,0 @@ -public class Busy { - private static volatile int foo = 0; - private static volatile boolean go; - - public static void main(String[] args) { - final Object lock = new Object(); - - synchronized (lock) { - new Thread() { - public void run() { - while (foo < 100) { - go = true; - } - } - }.start(); - - while (foo < 100) { - while (! go) { } - go = false; - byte[] array = new byte[256 * 1024]; - ++ foo; - } - } - } -} \ No newline at end of file diff --git a/sgx-jvm/avian/test/Collections.java b/sgx-jvm/avian/test/Collections.java deleted file mode 100644 index d778267dde..0000000000 --- a/sgx-jvm/avian/test/Collections.java +++ /dev/null @@ -1,68 +0,0 @@ -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -public class Collections { - public static void main(String[] args) { - testValues(); - testSort(); - } - - @SuppressWarnings("rawtypes") - private static void testValues() { - Map testMap = java.util.Collections.unmodifiableMap(java.util.Collections.emptyMap()); - Collection values = testMap.values(); - - if (values == null) { - throw new NullPointerException(); - } - - try { - values.clear(); - - throw new IllegalStateException("Object should be immutable, exception should have thrown"); - } catch (Exception e) { - // expected - } - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static > void expectSorted(List list) { - for (int i = 1; i < list.size(); ++i) { - expect(list.get(i - 1).compareTo(list.get(i)) <= 0); - } - } - - private static int pseudoRandom(int seed) { - return 3170425 * seed + 132102; - } - - private static > int shuffle(List list, int seed) { - for (int i = list.size(); i > 1; --i) { - int i2 = (seed < 0 ? -seed : seed) % i; - T value = list.get(i - 1); - list.set(i - 1, list.get(i2)); - list.set(i2, value); - seed = pseudoRandom(seed); - } - return seed; - } - - public static void testSort() { - List list = new ArrayList(); - for (int i = 0; i < 64; ++i) { - list.add(Integer.valueOf(i + 1)); - } - ; - int random = 12345; - for (int i = 0; i < 32; ++i) { - random = shuffle(list, random); - java.util.Collections.sort(list); - expectSorted(list); - } - } -} diff --git a/sgx-jvm/avian/test/ConcurrentHashMapTest.java b/sgx-jvm/avian/test/ConcurrentHashMapTest.java deleted file mode 100644 index f0d271f412..0000000000 --- a/sgx-jvm/avian/test/ConcurrentHashMapTest.java +++ /dev/null @@ -1,166 +0,0 @@ -import java.util.Iterator; -import java.util.Map; -import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.ConcurrentHashMap; - -public class ConcurrentHashMapTest { - private static final int ThreadCount = 4; - private static final int IterationCount = 100; - private static final int Range = 10; - private static final int CommonBase = -Range; - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) throws Throwable { - final ConcurrentMap map = new ConcurrentHashMap(); - final int[] counter = new int[1]; - final int[] step = new int[1]; - final Throwable[] exception = new Throwable[1]; - - synchronized (map) { - for (int i = 0; i < ThreadCount; ++i) { - final int index = i; - new Thread() { - public void run() { - try { - synchronized (map) { - ++ counter[0]; - map.notifyAll(); - while (exception[0] == null && step[0] == 0) { - map.wait(); - } - } - - for (int i = 0; i < IterationCount; ++i) { - populateCommon(map); - populate(map, index * Range); - } - - synchronized (map) { - -- counter[0]; - map.notifyAll(); - while (exception[0] == null && step[0] == 1) { - map.wait(); - } - } - - for (int i = 0; i < IterationCount; ++i) { - populate(map, index * Range); - depopulate(map, index * Range); - } - - synchronized (map) { - ++ counter[0]; - map.notifyAll(); - } - } catch (Throwable e) { - synchronized (map) { - exception[0] = e; - map.notifyAll(); - } - e.printStackTrace(); - } - } - }.start(); - } - - try { - while (exception[0] == null && counter[0] < ThreadCount) { - map.wait(); - } - - step[0] = 1; - map.notifyAll(); - - while (exception[0] == null && counter[0] > 0) { - map.wait(); - } - - if (map.size() != ThreadCount * Range) { - System.err.println - ("expected " + (ThreadCount * Range) + " got " + map.size()); - } - expect(map.size() == ThreadCount * Range); - for (int i = CommonBase, j = CommonBase + Range; i < j; ++i) { - expect(! map.containsKey(i)); - } - - step[0] = 2; - map.notifyAll(); - - while (exception[0] == null && counter[0] < ThreadCount) { - map.wait(); - } - - expect(map.isEmpty()); - expect(exception[0] == null); - } catch (Throwable e) { - exception[0] = e; - throw e; - } finally { - map.notifyAll(); - } - } - } - - private static void populateCommon(ConcurrentMap map) { - Object value = new Object(); - for (int i = CommonBase, j = CommonBase + Range; i < j; ++i) { - map.remove(i); - map.put(i, value); - map.remove(i); - } - } - - private static void populate(ConcurrentMap map, int base) { - for (int i = base, j = base + Range; i < j; ++i) { - map.remove(i); - Object value = new Object(); - expect(map.put(i, value) == null); - expect(map.containsKey(i)); - expect(map.get(i).equals(value)); - expect(map.putIfAbsent(i, new Object()) == value); - expect(map.get(i).equals(value)); - expect(! map.remove(i, new Object())); - expect(map.remove(i, value)); - expect(map.replace(i, value) == null); - expect(! map.containsKey(i)); - expect(map.get(i) == null); - expect(map.putIfAbsent(i, value) == null); - expect(map.containsKey(i)); - expect(map.get(i) == value); - Object newValue = new Object(); - expect(map.replace(i, newValue) == value); - expect(map.get(i) == newValue); - - boolean found = false; - for (Iterator> it = map.entrySet().iterator(); - it.hasNext();) - { - Map.Entry e = it.next(); - if (e.getKey() == i) { - expect(! found); - expect(e.getValue() == newValue); - found = true; - it.remove(); - } - } - - expect(found); - expect(! map.containsKey(i)); - expect(map.putIfAbsent(i, value) == null); - expect(map.containsKey(i)); - expect(map.get(i) == value); - } - } - - private static void depopulate(ConcurrentMap map, int base) - { - for (int i = base, j = base + Range; i < j; ++i) { - expect(map.containsKey(i)); - expect(map.remove(i) != null); - } - } -} diff --git a/sgx-jvm/avian/test/Dates.java b/sgx-jvm/avian/test/Dates.java deleted file mode 100644 index dfd6d72273..0000000000 --- a/sgx-jvm/avian/test/Dates.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.text.FieldPosition; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.TimeZone; - -public class Dates { - private final static long EPOCH = 1234567890; - private final static String TEXT = "2009-02-13T23:31:30"; - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) throws Exception { - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); - format.setTimeZone(TimeZone.getTimeZone("GMT")); - Date date = format.parse("1970-01-01T00:00:00"); - expect(0 == date.getTime()); - - date = new Date(EPOCH * 1000l); - String actual = format.format(date, new StringBuffer(), new FieldPosition(0)).toString(); - expect(TEXT.equals(actual)); - - date = format.parse(TEXT); - expect(EPOCH == date.getTime() / 1000l); - } -} diff --git a/sgx-jvm/avian/test/DefineClass.java b/sgx-jvm/avian/test/DefineClass.java deleted file mode 100644 index 4cff3ecfde..0000000000 --- a/sgx-jvm/avian/test/DefineClass.java +++ /dev/null @@ -1,86 +0,0 @@ -import java.io.IOException; -import java.io.File; -import java.io.FileInputStream; - -public class DefineClass { - private static File findClass(String name, File directory) { - for (File file: directory.listFiles()) { - if (file.isFile()) { - if (file.getName().equals(name + ".class")) { - return file; - } - } else if (file.isDirectory()) { - File result = findClass(name, file); - if (result != null) { - return result; - } - } - } - return null; - } - - private static byte[] read(File file) throws IOException { - byte[] bytes = new byte[(int) file.length()]; - FileInputStream in = new FileInputStream(file); - try { - if (in.read(bytes) != (int) file.length()) { - throw new RuntimeException(); - } - return bytes; - } finally { - in.close(); - } - } - - private static Class loadClass(String name) throws Exception { - return new MyClassLoader(DefineClass.class.getClassLoader()).defineClass - (name, read(findClass(name, new File(System.getProperty("user.dir"))))); - } - - private static void testStatic() throws Exception { - loadClass("DefineClass$Hello") - .getMethod("main", String[].class).invoke(null, (Object) new String[0]); - } - - private static void testDerived() throws Exception { - System.out.println - (String.valueOf - (((Base) loadClass("DefineClass$Derived").newInstance()).zip())); - } - - public static void main(String[] args) throws Exception { - testStatic(); - testDerived(); - } - - private static class MyClassLoader extends ClassLoader { - public MyClassLoader(ClassLoader parent) { - super(parent); - } - - public Class defineClass(String name, byte[] bytes) { - return defineClass(name, bytes, 0, bytes.length); - } - } - - public static class Hello { - public static void main(String[] args) { - System.out.println("hello, world!"); - } - } - - public abstract static class Base { - public int foo; - public int[] array; - - public void bar() { } - - public abstract int zip(); - } - - public static class Derived extends Base { - public int zip() { - return 42; - } - } -} diff --git a/sgx-jvm/avian/test/DequeHelper.java b/sgx-jvm/avian/test/DequeHelper.java deleted file mode 100644 index 4d19041a6b..0000000000 --- a/sgx-jvm/avian/test/DequeHelper.java +++ /dev/null @@ -1,55 +0,0 @@ -import java.util.Deque; - -public class DequeHelper { - private static void verify(boolean val) { - if (! val) { - throw new RuntimeException(); - } - } - - public static void main(String args[]) { - // prevents unit test failure - } - - public static void addFirstTest(Deque q) { - Object firstObject = new Object(); - Object lastObject = new Object(); - q.addFirst(lastObject); - q.addFirst(firstObject); - - verify(q.size() == 2); - verify(q.peekFirst() == firstObject); - verify(q.peekLast() == lastObject); - } - - public static void addLastTest(Deque q) { - Object firstObject = new Object(); - Object lastObject = new Object(); - q.addLast(firstObject); - q.addLast(lastObject); - - verify(q.size() == 2); - verify(q.peekFirst() == firstObject); - verify(q.peekLast() == lastObject); - } - - public static void removeFirstTest(Deque q) { - Object firstObject = new Object(); - Object lastObject = new Object(); - q.addLast(firstObject); - q.addLast(lastObject); - - verify(q.removeFirst() == firstObject); - verify(q.removeFirst() == lastObject); - } - - public static void removeLastTest(Deque q) { - Object firstObject = new Object(); - Object lastObject = new Object(); - q.addLast(firstObject); - q.addLast(lastObject); - - verify(q.removeLast() == lastObject); - verify(q.removeLast() == firstObject); - } -} diff --git a/sgx-jvm/avian/test/DivideByZero.java b/sgx-jvm/avian/test/DivideByZero.java deleted file mode 100644 index 80f308adcb..0000000000 --- a/sgx-jvm/avian/test/DivideByZero.java +++ /dev/null @@ -1,135 +0,0 @@ -public class DivideByZero { - private static int divide(int n, int d) { - return n / d; - } - - private static int modulo(int n, int d) { - return n % d; - } - - private static long divide(long n, long d) { - return n / d; - } - - private static long modulo(long n, long d) { - return n % d; - } - - private static float divide(float n, float d) { - return n / d; - } - - private static float modulo(float n, float d) { - return n % d; - } - - private static double divide(double n, double d) { - return n / d; - } - - private static double modulo(double n, double d) { - return n % d; - } - - public static void main(String[] args) { - try { - int x = 1 / 0; - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - int x = 1 % 0; - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - int y = 2; - int x = y / 0; - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - int y = 2; - int x = y % 0; - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - int z = 0; - int y = 2; - int x = y / z; - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - int z = 0; - int y = 2; - int x = y % z; - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - long z = 0; - long y = 2; - long x = y / z; - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - long z = 0; - long y = 2; - long x = y % z; - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - divide(5, 0); - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - modulo(6, 0); - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - divide(5L, 0L); - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - try { - modulo(6L, 0L); - throw new RuntimeException(); - } catch (ArithmeticException e) { - e.printStackTrace(); - } - - divide(5F, 0F); - modulo(6F, 0F); - - divide(5D, 0D); - modulo(6D, 0D); - } -} diff --git a/sgx-jvm/avian/test/EnumSetTest.java b/sgx-jvm/avian/test/EnumSetTest.java deleted file mode 100644 index 3b1317b7ec..0000000000 --- a/sgx-jvm/avian/test/EnumSetTest.java +++ /dev/null @@ -1,107 +0,0 @@ -import java.util.EnumSet; -import java.util.Iterator; -import java.util.NoSuchElementException; - -public class EnumSetTest { - private enum SmallEnum { - ONE, - TWO, - THREE - } - - private enum LargerEnum { - LARGEONE, - LARGETWO, - LARGETHREE, - LARGEFOUR, - LARGEFIVE, - LARGESIX - } - - public static void main(String[] args) { - testAllOf(); - testNoneOf(); - testIterators(); - testOf(); - testCopyOf(); - testComplimentOf(); - } - - private static void testComplimentOf() { - EnumSet one = EnumSet.of(SmallEnum.ONE, SmallEnum.THREE); - EnumSet two = EnumSet.complementOf(one); - assertElementInSet(SmallEnum.TWO, two); - assertSize(1, two); - } - - private static void testCopyOf() { - EnumSet one = EnumSet.of(SmallEnum.ONE, SmallEnum.THREE); - EnumSet two = EnumSet.copyOf(one); - assertElementInSet(SmallEnum.ONE, two); - assertElementInSet(SmallEnum.THREE, two); - assertSize(2, two); - } - - private static void testOf() { - EnumSet set = EnumSet.of(LargerEnum.LARGEONE, LargerEnum.LARGEFIVE, LargerEnum.LARGETWO); - assertElementInSet(LargerEnum.LARGEONE, set); - assertElementInSet(LargerEnum.LARGEFIVE, set); - assertElementInSet(LargerEnum.LARGETWO, set); - assertSize(3, set); - } - - private static void testAllOf() { - EnumSet set = EnumSet.allOf(SmallEnum.class); - for (SmallEnum current : SmallEnum.values()) { - assertElementInSet(current, set); - } - assertSize(3, set); - } - - private static void testNoneOf() { - EnumSet set = EnumSet.noneOf(SmallEnum.class); - assertSize(0, set); - } - - private static void testIterators() { - EnumSet set = EnumSet.allOf(SmallEnum.class); - Iterator iterator = set.iterator(); - boolean exceptionCaught = false; - try { - iterator.remove(); - } catch (IllegalStateException e) { - exceptionCaught = true; - } - if (!exceptionCaught) { - throw new RuntimeException("Calling remove() before next() should throw IllegalStateException"); - } - - while (iterator.hasNext()) { - iterator.next(); - iterator.remove(); - } - assertSize(0, set); - - exceptionCaught = false; - try { - iterator.next(); - } catch (NoSuchElementException e) { - exceptionCaught = true; - } - if (!exceptionCaught) { - throw new RuntimeException("Calling next() when hasNext() == false should throw NoSuchElementException"); - } - } - - private static void assertElementInSet(Enum element, EnumSet set) { - if (!set.contains(element)) { - throw new RuntimeException("expected " + element + " in the set!"); - } - } - - private static void assertSize(int expectedSize, EnumSet set) { - if (set.size() != expectedSize) { - throw new RuntimeException("expected the set to be size=" + expectedSize + ", actual=" + set.size()); - } - } -} diff --git a/sgx-jvm/avian/test/Enums.java b/sgx-jvm/avian/test/Enums.java deleted file mode 100644 index 9cb397fbc3..0000000000 --- a/sgx-jvm/avian/test/Enums.java +++ /dev/null @@ -1,39 +0,0 @@ -public class Enums { - private enum Suit { CLUBS, HEARTS, SPADES, DIAMONDS }; - private enum Rank { ACE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, - NINE, TEN, JACK, QUEEN, KING }; - private enum Person { Joe(4), Mike(5) ; - private final int age; - private Person(int age) { - this.age = age; - } - public int getAge() { - return age; - } - }; - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static boolean checkFaceCard(Rank r) { - switch (r) { - case ACE: - case JACK: - case QUEEN: - case KING: - return true; - } - return false; - } - - public static void main(String[] args) { - expect(Suit.CLUBS.ordinal() == 0); - expect(Suit.valueOf("DIAMONDS") == Suit.DIAMONDS); - System.out.println(Suit.SPADES); - expect(Suit.values()[1] == Suit.HEARTS); - expect(!checkFaceCard(Rank.FIVE)); - expect(checkFaceCard(Rank.KING)); - expect(Person.Mike.getAge() == 5); - } -} diff --git a/sgx-jvm/avian/test/Exceptions.java b/sgx-jvm/avian/test/Exceptions.java deleted file mode 100644 index 15f1c99c1d..0000000000 --- a/sgx-jvm/avian/test/Exceptions.java +++ /dev/null @@ -1,63 +0,0 @@ -public class Exceptions { - static class ThrowError { - static { - if (true) throw new AssertionError(); - } - - static void foo() { } - } - - static class ThrowException { - static { - if (true) throw new RuntimeException(); - } - - static void foo() { } - } - - private static void evenMoreDangerous() { - throw new RuntimeException("chaos! panic! overwhelming anxiety!"); - } - - private static void moreDangerous() { - evenMoreDangerous(); - } - - private static void dangerous() { - moreDangerous(); - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) { - boolean threw = false; - try { - dangerous(); - } catch (Exception e) { - e.printStackTrace(); - threw = true; - } - expect(threw); - threw = false; - - try { - ThrowError.foo(); - } catch (AssertionError e) { - e.printStackTrace(); - threw = true; - } - expect(threw); - threw = false; - - try { - ThrowException.foo(); - } catch (ExceptionInInitializerError e) { - e.printStackTrace(); - threw = true; - } - expect(threw); - } - -} diff --git a/sgx-jvm/avian/test/Files.java b/sgx-jvm/avian/test/Files.java deleted file mode 100644 index 5e00ef0319..0000000000 --- a/sgx-jvm/avian/test/Files.java +++ /dev/null @@ -1,80 +0,0 @@ -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; - -public class Files { - private static final boolean IsWindows - = System.getProperty("os.name").equals("Windows"); - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static void isAbsoluteTest(boolean absolutePath) { - File file = new File("test.txt"); - if (absolutePath) { - file = file.getAbsoluteFile(); - } - - boolean isAbsolute = file.isAbsolute(); - - if (absolutePath) { - expect(isAbsolute); - } else { - expect(!isAbsolute); - } - - } - - private static void isRootParent() { - if(!IsWindows) { - File f = new File("/root"); - File f2 = f.getParentFile(); - System.out.println("------------"+f2); - expect(f2.getPath().equals("/")); - } - } - - public static void main(String[] args) throws Exception { - isAbsoluteTest(true); - isAbsoluteTest(false); - isRootParent(); - - { File f = new File("test.txt"); - FileOutputStream out = new FileOutputStream(f); - byte[] message = "hello, world!\n".getBytes("UTF-8"); - out.write(message); - out.close(); - - expect(f.lastModified() > 0); - - FileInputStream in = new FileInputStream(f); - try { - expect(in.available() == message.length); - - for (int i = 0; i < message.length; ++i) { - in.read(); - expect(in.available() == message.length - i - 1); - } - - expect(in.read() == -1); - expect(in.available() == 0); - } finally { - in.close(); - } - } - - if(IsWindows) { - expect(new File("/c:\\test").getPath().equals("c:\\test")); - } else { - expect(new File("/c:\\test").getPath().equals("/c:\\test")); - } - - expect(new File("foo/bar").getParent().equals("foo")); - expect(new File("foo/bar/").getParent().equals("foo")); - expect(new File("foo/bar//").getParent().equals("foo")); - - expect(new File("foo/nonexistent-directory").listFiles() == null); - } - -} diff --git a/sgx-jvm/avian/test/Finalizers.java b/sgx-jvm/avian/test/Finalizers.java deleted file mode 100644 index 220a32ba4c..0000000000 --- a/sgx-jvm/avian/test/Finalizers.java +++ /dev/null @@ -1,44 +0,0 @@ -public class Finalizers { - private static final Object lock = new Object(); - private static boolean finalized = false; - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - protected void finalize() { - synchronized (lock) { - finalized = true; - lock.notifyAll(); - } - } - - public static void main(String[] args) throws Exception { - new Finalizers(); - - expect(! finalized); - - synchronized (lock) { - System.gc(); - lock.wait(5000); - } - - expect(finalized); - - new Finalizers2(); - - finalized = false; - - expect(! finalized); - - synchronized (lock) { - System.gc(); - lock.wait(5000); - } - - expect(finalized); - } - - private static class Finalizers2 extends Finalizers { } - -} diff --git a/sgx-jvm/avian/test/Floats.java b/sgx-jvm/avian/test/Floats.java deleted file mode 100644 index eca59b1bc9..0000000000 --- a/sgx-jvm/avian/test/Floats.java +++ /dev/null @@ -1,351 +0,0 @@ -public class Floats { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static double multiply(double a, double b) { - return a * b; - } - - private static float multiply(float a, float b) { - return a * b; - } - - private static double divide(double a, double b) { - return a / b; - } - - private static double subtract(double a, double b) { - return a - b; - } - - private double field = 100d; - - private static int doubleToInt(Floats f) { - return (int) f.field; - } - - private static void multiplyAndStore(double a, double b, Floats f) { - f.field = a * b; - } - - private static double loadAndMultiply(double a, Floats f) { - return f.field * a; - } - - private static void subdivide(double src[], int srcoff, - double left[], int leftoff, - double right[], int rightoff) - { - double x1 = src[srcoff + 0]; - double y1 = src[srcoff + 1]; - double ctrlx1 = src[srcoff + 2]; - double ctrly1 = src[srcoff + 3]; - double ctrlx2 = src[srcoff + 4]; - double ctrly2 = src[srcoff + 5]; - double x2 = src[srcoff + 6]; - double y2 = src[srcoff + 7]; - if (left != null) { - left[leftoff + 0] = x1; - left[leftoff + 1] = y1; - } - if (right != null) { - right[rightoff + 6] = x2; - right[rightoff + 7] = y2; - } - x1 = (x1 + ctrlx1) / 2.0; - y1 = (y1 + ctrly1) / 2.0; - x2 = (x2 + ctrlx2) / 2.0; - y2 = (y2 + ctrly2) / 2.0; - double centerx = (ctrlx1 + ctrlx2) / 2.0; - double centery = (ctrly1 + ctrly2) / 2.0; - ctrlx1 = (x1 + centerx) / 2.0; - ctrly1 = (y1 + centery) / 2.0; - ctrlx2 = (x2 + centerx) / 2.0; - ctrly2 = (y2 + centery) / 2.0; - centerx = (ctrlx1 + ctrlx2) / 2.0; - centery = (ctrly1 + ctrly2) / 2.0; - if (left != null) { - left[leftoff + 2] = x1; - left[leftoff + 3] = y1; - left[leftoff + 4] = ctrlx1; - left[leftoff + 5] = ctrly1; - left[leftoff + 6] = centerx; - left[leftoff + 7] = centery; - } - if (right != null) { - right[rightoff + 0] = centerx; - right[rightoff + 1] = centery; - right[rightoff + 2] = ctrlx2; - right[rightoff + 3] = ctrly2; - right[rightoff + 4] = x2; - right[rightoff + 5] = y2; - } - } - - public static class Rectangle { - public double x; - public double y; - public double width; - public double height; - - public void setX(double x) { - this.x = x; - } - } - - public static void main(String[] args) throws Exception { - expect(new Double(42.0) == 42.0); - - { Rectangle r = new Rectangle(); - Rectangle.class.getMethod("setX", double.class).invoke(r, 42.0); - expect(r.x == 42.0); - } - - { double input[] = new double[8]; - double left[] = new double[8]; - double right[] = new double[8]; - - input[0] = 732.0; - input[1] = 952.0; - input[2] = 761.0; - input[3] = 942.0; - input[4] = 786.0; - input[5] = 944.0; - input[6] = 813.0; - input[7] = 939.0; - - subdivide(input, 0, left, 0, right, 0); - - expect(left[0] == 732.0); - expect(left[1] == 952.0); - expect(left[2] == 746.5); - expect(left[3] == 947.0); - expect(left[4] == 760.0); - expect(left[5] == 945.0); - expect(left[6] == 773.25); - expect(left[7] == 943.625); - - expect(right[0] == 773.25); - expect(right[1] == 943.625); - expect(right[2] == 786.5); - expect(right[3] == 942.25); - expect(right[4] == 799.5); - expect(right[5] == 941.5); - expect(right[6] == 813.0); - expect(right[7] == 939.0); - } - - expect(multiply(0.5d, 0.5d) == 0.25d); - expect(multiply(0.5f, 0.5f) == 0.25f); - - expect(multiply(0.5d, 0.1d) == 0.05d); - expect(multiply(0.5f, 0.1f) == 0.05f); - - expect(multiply(0.5d, 0.5d) < 0.5d); - expect(multiply(0.5f, 0.5f) < 0.5f); - - expect(multiply(0.5d, 0.1d) < 0.5d); - expect(multiply(0.5f, 0.1f) < 0.5f); - - expect(multiply(0.5d, 0.5d) > 0.1d); - expect(multiply(0.5f, 0.5f) > 0.1f); - - expect(multiply(0.5d, 0.1d) > 0.01d); - expect(multiply(0.5f, 0.1f) > 0.01f); - - expect(divide(0.5d, 0.5d) == 1.0d); - - expect(divide(0.5d, 0.1d) == 5.0d); - - expect(subtract(0.5d, 0.5d) == 0.0d); - - expect(subtract(0.5d, 0.1d) == 0.4d); - - { double d = 1d; - expect(((int) d) == 1); - } - - { double d = 12345d; - expect(((int) d) == 12345); - } - - expect(doubleToInt(new Floats()) == 100); - - { Floats f = new Floats(); - f.field = 32.0d; - expect(loadAndMultiply(2.0d, f) == 64.0d); - } - - { Floats f = new Floats(); - f.field = 32.0d; - expect(multiply(2.0d, f.field) == 64.0d); - } - - { Floats f = new Floats(); - multiplyAndStore(32.0d, 0.5d, f); - expect(f.field == 16.0d); - } - - { float f = 1f; - expect(((int) f) == 1); - } - - { float f = 1f; - expect(((long) f) == 1); - } - - expect(Math.round(0.4f) == 0); - expect(Math.round(0.5f) == 1); - expect(Math.round(1.0f) == 1); - expect(Math.round(1.9f) == 2); - - expect(Math.round(0.4d) == 0); - expect(Math.round(0.5d) == 1); - expect(Math.round(1.0d) == 1); - expect(Math.round(1.9d) == 2); - - { float b = 1.0f; - int blue = (int)(b * 255 + 0.5); - expect(blue == 255); - } - - { long z = 6553311036568663L; - double d = (double) z; - expect(d == 6553311036568663.0); - } - - { long z = 12345L; - float f = (float) z; - expect(f == 12345.0); - } - - { int z = 12345; - float f = (float) z; - expect(f == 12345.0); - } - - { int z = 12345; - double d = (double) z; - expect(d == 12345.0); - } - - // Test floatToIntBits - { - int orig = 0x7f800001; - float NaN = Float.intBitsToFloat(orig); - int result = Float.floatToIntBits(NaN); - int expected = 0x7fc00000; - expect(result == expected); - } - - { - int orig = 0x7f801001; - float NaN = Float.intBitsToFloat(orig); - int result = Float.floatToIntBits(NaN); - int expected = 0x7fc00000; - expect(result == expected); - } - - { - int orig = 0x00800001; - float number = Float.intBitsToFloat(orig); - int result = Float.floatToIntBits(number); - expect(result == orig); - } - - { - int orig = 0x80800003; - float number = Float.intBitsToFloat(orig); - int result = Float.floatToIntBits(number); - expect(result == orig); - } - - for (int x = 0; x < 1000; ++x) { - int m = 100; - int n = 200; - double array[][] = new double[m][n]; - - for (int i = 0; i < m; ++i) { - for (int j = 0; j < n; ++j) { - array[i][j] = 1234567890.0; - } - } - } - - { double v = Double.NaN; - expect(0 == (int) v); } - - { double v = Double.NEGATIVE_INFINITY; - expect(Integer.MIN_VALUE == (int) v); } - - { double v = Long.MIN_VALUE; - expect(Integer.MIN_VALUE == (int) v); } - - { double v = Double.POSITIVE_INFINITY; - expect(Integer.MAX_VALUE == (int) v); } - - { double v = Long.MAX_VALUE; - expect(Integer.MAX_VALUE == (int) v); } - - { float v = Float.NaN; - expect(0 == (int) v); } - - { float v = Float.NEGATIVE_INFINITY; - expect(Integer.MIN_VALUE == (int) v); } - - { float v = Integer.MIN_VALUE; - expect(Integer.MIN_VALUE == (int) v); } - - { float v = Float.POSITIVE_INFINITY; - expect(Integer.MAX_VALUE == (int) v); } - - { float v = Integer.MAX_VALUE; - expect(Integer.MAX_VALUE == (int) v); } - - { double v = Double.NaN; - expect(0 == (long) v); } - - { double v = Double.NEGATIVE_INFINITY; - expect(Long.MIN_VALUE == (long) v); } - - { double v = Long.MIN_VALUE; - expect(Long.MIN_VALUE == (long) v); } - - { double v = Double.POSITIVE_INFINITY; - expect(Long.MAX_VALUE == (long) v); } - - { double v = Long.MAX_VALUE; - expect(Long.MAX_VALUE == (long) v); } - - { float v = Float.NaN; - expect(0 == (long) v); } - - { float v = Float.NEGATIVE_INFINITY; - expect(Long.MIN_VALUE == (long) v); } - - { float v = Integer.MIN_VALUE; - expect(Integer.MIN_VALUE == (long) v); } - - { float v = Float.POSITIVE_INFINITY; - expect(Long.MAX_VALUE == (long) v); } - - expect(Double.NaN != Double.NaN); - expect(! (Double.NaN == Double.NaN)); - - { double d = Double.NaN; - expect(Double.NaN != d); - expect(! (Double.NaN == d)); - expect(d != d); - expect(! (d == d)); } - - expect(Float.NaN != Float.NaN); - expect(! (Float.NaN == Float.NaN)); - - { float d = Float.NaN; - expect(Float.NaN != d); - expect(! (Float.NaN == d)); - expect(d != d); - expect(! (d == d)); } - } -} diff --git a/sgx-jvm/avian/test/FormatStrings.java b/sgx-jvm/avian/test/FormatStrings.java deleted file mode 100644 index 32e8305012..0000000000 --- a/sgx-jvm/avian/test/FormatStrings.java +++ /dev/null @@ -1,296 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -/* - * @author bcg - */ -public class FormatStrings { - - public static void main(String... args) throws Exception { - FormatStrings test = new FormatStrings(); - test.testLiteral(); - test.testString(); - test.testNewline(); - test.testPercent(); - test.testBoolean(); - test.testCharacter(); - test.testHashCode(); - test.testIntegers(); - test.testWidths(); - test.testPrecisions(); - } - - private void _testFormat(String expected, String format, Object... args) { - String actual = String.format(format, args); - ensureEquals(expected, actual); - System.err.println("Expected: " + expected + ", Actual: " + actual); - } - - private static void ensureEquals(String expected, String actual) { - if (expected != actual) { - if ((expected == null || actual == null) || !(expected.equals(actual))) { - throw new IllegalArgumentException( - "Expected `" + expected + "` but was actually `" + actual + "`."); - } - } - } - - public void testLiteral() { - _testFormat("test Literal 1", "test Literal 1"); - _testFormat("test Literal 2", "test Literal 2", (Object[]) null); - _testFormat("test Literal 3", "test Literal 3", new Object[0]); - } - - public void testString() { - _testFormat("test String 1", "test %s", "String 1"); - _testFormat("test String null", "test String %s", new Object[]{null} ); - _testFormat("test String 2", "test %2$s", "String 1", "String 2"); - _testFormat("String `string`", "String `%s`", new String("string")); - _testFormat("String `STRING`", "String `%S`", new String("string")); - _testFormat("String `another string`", "String `%s`", new String("another string")); - _testFormat("String `ANOTHER STRING`", "String `%S`", new String("another string")); - _testFormat("String `null`", "String `%s`", (String)null); - _testFormat("String `NULL`", "String `%S`", (String)null); - _testFormat("String `true`", "String `%s`", new Boolean("true")); - _testFormat("String `TRUE`", "String `%S`", new Boolean("true")); - _testFormat("String `false`", "String `%s`", new Boolean("false")); - _testFormat("String `FALSE`", "String `%S`", new Boolean("false")); - } - - public void testNewline() { - final String newline = System.getProperty("line.separator"); - _testFormat( - "<<<" + newline + " test newlines" + newline + ">>>", - "<<<%n test newlines%n>>>" - ); - } - - public void testBoolean() { - _testFormat("test boolean true", "test boolean %b", true); - _testFormat("test Boolean true", "test Boolean %b", Boolean.TRUE); - _testFormat("test boolean false", "test boolean %b", false); - _testFormat("test Boolean false", "test Boolean %b", Boolean.FALSE); - _testFormat("test null Boolean (false)", "test null Boolean (%b)", new Object[]{(Boolean)null}); - _testFormat("test non-null Boolean (true)", "test non-null Boolean (%b)", new Object()); - _testFormat("test boolean string (true)", "test boolean string (%b)", "false"); - _testFormat("Boolean `true`", "Boolean `%b`", new Boolean("true")); - _testFormat("Boolean `TRUE`", "Boolean `%B`", new Boolean("true")); - _testFormat("Boolean `false`", "Boolean `%b`", new Boolean("false")); - _testFormat("Boolean `FALSE`", "Boolean `%B`", new Boolean("false")); - _testFormat("Boolean `false`", "Boolean `%b`", (String)null); - _testFormat("Boolean `FALSE`", "Boolean `%B`", (String)null); - _testFormat("Boolean `true`", "Boolean `%b`", new String("")); - _testFormat("Boolean `TRUE`", "Boolean `%B`", new String("")); - _testFormat("Boolean `true`", "Boolean `%b`", new String("true")); - _testFormat("Boolean `TRUE`", "Boolean `%B`", new String("true")); - _testFormat("Boolean `true`", "Boolean `%b`", new String("false")); - _testFormat("Boolean `TRUE`", "Boolean `%B`", new String("false")); - } - - public void testPercent() { - _testFormat("Percents work 100%", "Percents work 100%%"); - } - - public void testCharacter() { - _testFormat("test character such as a", "test character such as %c", 'a'); - _testFormat("test character such as b", "test character such as %c", (int) 98); - _testFormat("test character such as c", "test character such as %c", (byte) 99); - _testFormat("test character such as d", "test character such as %c", (short) 100); - } - - public void testHashCode() { - final Object obj1 = new Object(); - final Object obj2 = new Object(); - final String hc1 = Integer.toHexString(obj1.hashCode()); - final String hc2 = Integer.toHexString(obj2.hashCode()); - _testFormat("test hashcode 1 (" + hc1 + ")" , "test hashcode 1 (%h)", obj1, obj2); - _testFormat("test hashcode 2 (" + hc2 + ")" , "test hashcode 2 (%2$h)", obj1, obj2); - _testFormat("test hashcode null", "test hashcode %h", (String) null); - } - - public void testIntegers() { - - _testFormat("Long 1", "Long %d", new Long(1)); - _testFormat("Long 2", "Long %2$d", new Long(1), new Long(2)); - _testFormat("Integer 1", "Integer %d", new Integer(1)); - _testFormat("Integer 2", "Integer %2$d", new Integer(1), new Integer(2)); - _testFormat("Short 1", "Short %d", new Short((short)1)); - _testFormat("Short 2", "Short %2$d", new Short((short)1), new Short((short)2)); - _testFormat("Byte 1", "Byte %d", new Byte((byte)1)); - _testFormat("Byte 2", "Byte %2$d", new Byte((byte)1), new Byte((byte)2)); - - _testFormat("Long 144", "Long %o", new Long(100)); - _testFormat("Long 310", "Long %2$o", new Long(100), new Long(200)); - _testFormat("Integer 144", "Integer %o", new Integer(100)); - _testFormat("Integer 310", "Integer %2$o", new Integer(100), new Integer(200)); - _testFormat("Short 144", "Short %o", new Short((short)100)); - _testFormat("Short 310", "Short %2$o", new Short((short)100), new Short((short)200)); - _testFormat("Byte 144", "Byte %o", new Byte((byte)100)); - _testFormat("Byte 310", "Byte %2$o", new Byte((byte)100), new Byte((byte)200)); - - _testFormat("Long 64", "Long %x", new Long(100)); - _testFormat("Long c8", "Long %2$x", new Long(100), new Long(200)); - _testFormat("Long C8", "Long %2$X", new Long(100), new Long(200)); - _testFormat("Integer 64", "Integer %x", new Integer(100)); - _testFormat("Integer c8", "Integer %2$x", new Integer(100), new Integer(200)); - _testFormat("Short 64", "Short %x", new Short((short)100)); - _testFormat("Short C8", "Short %2$X", new Short((short)100), new Short((short)200)); - _testFormat("Byte 64", "Byte %x", new Byte((byte)100)); - _testFormat("Byte c8", "Byte %2$x", new Byte((byte)100), new Byte((byte)200)); - - _testFormat("Decimal `1`", "Decimal `%d`", new Integer((int)1)); - _testFormat("Decimal `0`", "Decimal `%d`", new Integer((int)0)); - _testFormat("Decimal `100`", "Decimal `%d`", new Integer((int)100)); - _testFormat("Decimal `100000`", "Decimal `%d`", new Integer((int)100000)); - _testFormat("Decimal `63`", "Decimal `%d`", new Integer((int)63)); - _testFormat("Decimal `64`", "Decimal `%d`", new Integer((int)64)); - _testFormat("Decimal `-1`", "Decimal `%d`", new Integer((int)-1)); - _testFormat("Decimal `-100`", "Decimal `%d`", new Integer((int)-100)); - _testFormat("Decimal `-100000`", "Decimal `%d`", new Integer((int)-100000)); - _testFormat("Decimal `1`", "Decimal `%d`", new Byte((byte)1)); - _testFormat("Decimal `0`", "Decimal `%d`", new Byte((byte)0)); - _testFormat("Decimal `100`", "Decimal `%d`", new Byte((byte)100)); - _testFormat("Decimal `63`", "Decimal `%d`", new Byte((byte)63)); - _testFormat("Decimal `64`", "Decimal `%d`", new Byte((byte)64)); - _testFormat("Decimal `-1`", "Decimal `%d`", new Byte((byte)-1)); - _testFormat("Decimal `-100`", "Decimal `%d`", new Byte((byte)-100)); - _testFormat("Decimal `1`", "Decimal `%d`", new Long((long)1)); - _testFormat("Decimal `0`", "Decimal `%d`", new Long((long)0)); - _testFormat("Decimal `100`", "Decimal `%d`", new Long((long)100)); - _testFormat("Decimal `100000`", "Decimal `%d`", new Long((long)100000)); - _testFormat("Decimal `63`", "Decimal `%d`", new Long((long)63)); - _testFormat("Decimal `64`", "Decimal `%d`", new Long((long)64)); - _testFormat("Decimal `-1`", "Decimal `%d`", new Long((long)-1)); - _testFormat("Decimal `-100`", "Decimal `%d`", new Long((long)-100)); - _testFormat("Decimal `-100000`", "Decimal `%d`", new Long((long)-100000)); - _testFormat("Decimal `1`", "Decimal `%d`", new Short((short)1)); - _testFormat("Decimal `0`", "Decimal `%d`", new Short((short)0)); - _testFormat("Decimal `100`", "Decimal `%d`", new Short((short)100)); - _testFormat("Decimal `63`", "Decimal `%d`", new Short((short)63)); - _testFormat("Decimal `64`", "Decimal `%d`", new Short((short)64)); - _testFormat("Decimal `-1`", "Decimal `%d`", new Short((short)-1)); - _testFormat("Decimal `-100`", "Decimal `%d`", new Short((short)-100)); - - _testFormat("Octal `1`", "Octal `%o`", new Integer((int)1)); - _testFormat("Octal `0`", "Octal `%o`", new Integer((int)0)); - _testFormat("Octal `144`", "Octal `%o`", new Integer((int)100)); - _testFormat("Octal `303240`", "Octal `%o`", new Integer((int)100000)); - _testFormat("Octal `77`", "Octal `%o`", new Integer((int)63)); - _testFormat("Octal `100`", "Octal `%o`", new Integer((int)64)); - _testFormat("Octal `37777777777`", "Octal `%o`", new Integer((int)-1)); - _testFormat("Octal `37777777634`", "Octal `%o`", new Integer((int)-100)); - _testFormat("Octal `37777474540`", "Octal `%o`", new Integer((int)-100000)); - _testFormat("Octal `1`", "Octal `%o`", new Byte((byte)1)); - _testFormat("Octal `0`", "Octal `%o`", new Byte((byte)0)); - _testFormat("Octal `144`", "Octal `%o`", new Byte((byte)100)); - _testFormat("Octal `77`", "Octal `%o`", new Byte((byte)63)); - _testFormat("Octal `100`", "Octal `%o`", new Byte((byte)64)); - _testFormat("Octal `377`", "Octal `%o`", new Byte((byte)-1)); - _testFormat("Octal `234`", "Octal `%o`", new Byte((byte)-100)); - _testFormat("Octal `1`", "Octal `%o`", new Long((long)1)); - _testFormat("Octal `0`", "Octal `%o`", new Long((long)0)); - _testFormat("Octal `144`", "Octal `%o`", new Long((long)100)); - _testFormat("Octal `303240`", "Octal `%o`", new Long((long)100000)); - _testFormat("Octal `77`", "Octal `%o`", new Long((long)63)); - _testFormat("Octal `100`", "Octal `%o`", new Long((long)64)); - _testFormat("Octal `1`", "Octal `%o`", new Short((short)1)); - _testFormat("Octal `0`", "Octal `%o`", new Short((short)0)); - _testFormat("Octal `144`", "Octal `%o`", new Short((short)100)); - _testFormat("Octal `77`", "Octal `%o`", new Short((short)63)); - _testFormat("Octal `100`", "Octal `%o`", new Short((short)64)); - _testFormat("Octal `177777`", "Octal `%o`", new Short((short)-1)); - _testFormat("Octal `177634`", "Octal `%o`", new Short((short)-100)); - - _testFormat("HexDec `1`", "HexDec `%x`", new Integer((int)1)); - _testFormat("HexDec `1`", "HexDec `%X`", new Integer((int)1)); - _testFormat("HexDec `0`", "HexDec `%x`", new Integer((int)0)); - _testFormat("HexDec `0`", "HexDec `%X`", new Integer((int)0)); - _testFormat("HexDec `64`", "HexDec `%x`", new Integer((int)100)); - _testFormat("HexDec `64`", "HexDec `%X`", new Integer((int)100)); - _testFormat("HexDec `186a0`", "HexDec `%x`", new Integer((int)100000)); - _testFormat("HexDec `186A0`", "HexDec `%X`", new Integer((int)100000)); - _testFormat("HexDec `3f`", "HexDec `%x`", new Integer((int)63)); - _testFormat("HexDec `3F`", "HexDec `%X`", new Integer((int)63)); - _testFormat("HexDec `40`", "HexDec `%x`", new Integer((int)64)); - _testFormat("HexDec `40`", "HexDec `%X`", new Integer((int)64)); - _testFormat("HexDec `ffffffff`", "HexDec `%x`", new Integer((int)-1)); - _testFormat("HexDec `FFFFFFFF`", "HexDec `%X`", new Integer((int)-1)); - _testFormat("HexDec `ffffff9c`", "HexDec `%x`", new Integer((int)-100)); - _testFormat("HexDec `FFFFFF9C`", "HexDec `%X`", new Integer((int)-100)); - _testFormat("HexDec `fffe7960`", "HexDec `%x`", new Integer((int)-100000)); - _testFormat("HexDec `FFFE7960`", "HexDec `%X`", new Integer((int)-100000)); - _testFormat("HexDec `1`", "HexDec `%x`", new Byte((byte)1)); - _testFormat("HexDec `1`", "HexDec `%X`", new Byte((byte)1)); - _testFormat("HexDec `0`", "HexDec `%x`", new Byte((byte)0)); - _testFormat("HexDec `0`", "HexDec `%X`", new Byte((byte)0)); - _testFormat("HexDec `64`", "HexDec `%x`", new Byte((byte)100)); - _testFormat("HexDec `64`", "HexDec `%X`", new Byte((byte)100)); - _testFormat("HexDec `3f`", "HexDec `%x`", new Byte((byte)63)); - _testFormat("HexDec `3F`", "HexDec `%X`", new Byte((byte)63)); - _testFormat("HexDec `40`", "HexDec `%x`", new Byte((byte)64)); - _testFormat("HexDec `40`", "HexDec `%X`", new Byte((byte)64)); - _testFormat("HexDec `ff`", "HexDec `%x`", new Byte((byte)-1)); - _testFormat("HexDec `FF`", "HexDec `%X`", new Byte((byte)-1)); - _testFormat("HexDec `9c`", "HexDec `%x`", new Byte((byte)-100)); - _testFormat("HexDec `9C`", "HexDec `%X`", new Byte((byte)-100)); - _testFormat("HexDec `1`", "HexDec `%x`", new Long((long)1)); - _testFormat("HexDec `1`", "HexDec `%X`", new Long((long)1)); - _testFormat("HexDec `0`", "HexDec `%x`", new Long((long)0)); - _testFormat("HexDec `0`", "HexDec `%X`", new Long((long)0)); - _testFormat("HexDec `64`", "HexDec `%x`", new Long((long)100)); - _testFormat("HexDec `64`", "HexDec `%X`", new Long((long)100)); - _testFormat("HexDec `186a0`", "HexDec `%x`", new Long((long)100000)); - _testFormat("HexDec `186A0`", "HexDec `%X`", new Long((long)100000)); - _testFormat("HexDec `3f`", "HexDec `%x`", new Long((long)63)); - _testFormat("HexDec `3F`", "HexDec `%X`", new Long((long)63)); - _testFormat("HexDec `40`", "HexDec `%x`", new Long((long)64)); - _testFormat("HexDec `40`", "HexDec `%X`", new Long((long)64)); - _testFormat("HexDec `ffffffffffffffff`", "HexDec `%x`", new Long((long)-1)); - _testFormat("HexDec `FFFFFFFFFFFFFFFF`", "HexDec `%X`", new Long((long)-1)); - _testFormat("HexDec `ffffffffffffff9c`", "HexDec `%x`", new Long((long)-100)); - _testFormat("HexDec `FFFFFFFFFFFFFF9C`", "HexDec `%X`", new Long((long)-100)); - _testFormat("HexDec `fffffffffffe7960`", "HexDec `%x`", new Long((long)-100000)); - _testFormat("HexDec `FFFFFFFFFFFE7960`", "HexDec `%X`", new Long((long)-100000)); - _testFormat("HexDec `1`", "HexDec `%x`", new Short((short)1)); - _testFormat("HexDec `1`", "HexDec `%X`", new Short((short)1)); - _testFormat("HexDec `0`", "HexDec `%x`", new Short((short)0)); - _testFormat("HexDec `0`", "HexDec `%X`", new Short((short)0)); - _testFormat("HexDec `64`", "HexDec `%x`", new Short((short)100)); - _testFormat("HexDec `64`", "HexDec `%X`", new Short((short)100)); - _testFormat("HexDec `3f`", "HexDec `%x`", new Short((short)63)); - _testFormat("HexDec `3F`", "HexDec `%X`", new Short((short)63)); - _testFormat("HexDec `40`", "HexDec `%x`", new Short((short)64)); - _testFormat("HexDec `40`", "HexDec `%X`", new Short((short)64)); - _testFormat("HexDec `ffff`", "HexDec `%x`", new Short((short)-1)); - _testFormat("HexDec `FFFF`", "HexDec `%X`", new Short((short)-1)); - _testFormat("HexDec `ff9c`", "HexDec `%x`", new Short((short)-100)); - _testFormat("HexDec `FF9C`", "HexDec `%X`", new Short((short)-100)); - } - - public void testWidths() { - _testFormat("0001", "%04d", 1); - _testFormat(" 1", "%4d", 1); - _testFormat(" 11", "%4x", 17); - _testFormat("0011", "%04x", 17); - _testFormat(" a", "%2x", 10); - _testFormat(" A", "%2X", 10); - _testFormat("a ", "%-2x", 10); - _testFormat("A ", "%-2X", 10); - _testFormat("10000", "%4d", 10000); - _testFormat("Hello World ", "%-15s", "Hello World"); - _testFormat(" Hello World", "%15s", "Hello World"); - } - - public void testPrecisions() { - _testFormat("Hello", "%-1.5s", "Hello World"); - _testFormat("Hello", "%1.5s", "Hello World"); - } - -} diff --git a/sgx-jvm/avian/test/FutureTaskTest.java b/sgx-jvm/avian/test/FutureTaskTest.java deleted file mode 100644 index 13159320b9..0000000000 --- a/sgx-jvm/avian/test/FutureTaskTest.java +++ /dev/null @@ -1,33 +0,0 @@ -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.FutureTask; -import java.util.concurrent.RunnableFuture; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.TimeoutException; - -public class FutureTaskTest { - private static final int DELAY_TIME = 10; - - public static void main(String[] args) throws InterruptedException, ExecutionException { - isDoneTest(false); - isDoneTest(true); - } - - private static void isDoneTest(final boolean throwException) { - RunnableFuture future = new FutureTask(new Runnable() { - @Override - public void run() { - if (throwException) { - throw new RuntimeException(); - } - } - }, null); - - // should finish the future - future.run(); - - if (! future.isDone()) { - throw new RuntimeException("Future should be done"); - } - } -} diff --git a/sgx-jvm/avian/test/GC.java b/sgx-jvm/avian/test/GC.java deleted file mode 100644 index 9fabee0cc9..0000000000 --- a/sgx-jvm/avian/test/GC.java +++ /dev/null @@ -1,203 +0,0 @@ -public class GC { - private static final Integer cache[] = new Integer[100]; - private static final Integer MAX_INT_OBJ = new Integer(Integer.MAX_VALUE); - - private static Integer valueOf(int i) { - try { - return cache[i]; - } catch (ArrayIndexOutOfBoundsException e) { - return (i == Integer.MAX_VALUE) ? MAX_INT_OBJ : new Integer(i); - } - } - - private static void small() { - for (int i = 0; i < 1024; ++i) { - byte[] a = new byte[4 * 1024]; - } - } - - private static void medium() { - for (int i = 0; i < 8; ++i) { - Object[] array = new Object[32]; - for (int j = 0; j < 32; ++j) { - array[j] = new byte[32 * 1024]; - } - } - } - - private static void large() { - for (int i = 0; i < 8; ++i) { - byte[] a = new byte[16 * 1024 * 1024]; - } - - for (int i = 0; i < 8; ++i) { - byte[] a = new byte[16 * 1024 * 1024]; - for (int j = 0; j < 32; ++j) { - byte[] b = new byte[32 * 1024]; - } - } - } - - private static void stackMap1(boolean predicate) { - if (predicate) { - Object a = null; - } - - System.gc(); - } - - private static void stackMap2(boolean predicate) { - if (predicate) { - int a = 42; - } else { - Object a = null; - } - - System.gc(); - } - - private static void stackMap3(boolean predicate) { - if (predicate) { - Object a = null; - } else { - int a = 42; - } - - System.gc(); - } - - private static void stackMap4(boolean predicate) { - int i = 2; - if (predicate) { - Object a = null; - } else { - Object a = null; - } - - do { - System.gc(); - int a = 42; - -- i; - } while (i >= 0); - } - - private static void noop() { } - - private static void stackMap5(boolean predicate) { - if (predicate) { - noop(); - } - - if (predicate) { - noop(); - } else { - Object a = null; - } - - System.gc(); - } - - private static void stackMap6(boolean predicate) { - if (predicate) { - int a = 42; - } else { - Object a = null; - } - - if (predicate) { - noop(); - } else { - Object a = null; - } - - noop(); - System.gc(); - } - - private static void stackMap7(boolean predicate) { - try { - if (predicate) { - Object a = null; - } else { - Object a = null; - } - - try { - int a = 42; - throw new DummyException(); - } finally { - System.gc(); - } - } catch (DummyException e) { - e.toString(); - } - } - - private static void stackMap8(boolean predicate) { - try { - Object x = new Object(); - if (predicate) { - Object a = null; - } else { - Object a = null; - } - - try { - int a = 42; - throw new DummyException(); - } finally { - System.gc(); - x.toString(); - } - } catch (DummyException e) { - e.toString(); - } - } - - public static void main(String[] args) { - valueOf(1000); - - Object[] array = new Object[1024 * 1024]; - array[0] = new Object(); - - small(); - - array[1] = new Object(); - - medium(); - - array[2] = new Object(); - - large(); - - array[0].toString(); - array[1].toString(); - array[2].toString(); - - stackMap1(true); - stackMap1(false); - - stackMap2(true); - stackMap2(false); - - stackMap3(true); - stackMap3(false); - - stackMap4(true); - stackMap4(false); - - stackMap5(true); - stackMap5(false); - - stackMap6(true); - stackMap6(false); - - stackMap7(true); - stackMap7(false); - - stackMap8(true); - stackMap8(false); - } - - private static class DummyException extends RuntimeException { } -} diff --git a/sgx-jvm/avian/test/Hello.java b/sgx-jvm/avian/test/Hello.java deleted file mode 100644 index d7d4f91935..0000000000 --- a/sgx-jvm/avian/test/Hello.java +++ /dev/null @@ -1,5 +0,0 @@ -public class Hello { - public static void main(String[] args) { - System.out.println("hello, world!"); - } -} diff --git a/sgx-jvm/avian/test/Initializers.java b/sgx-jvm/avian/test/Initializers.java deleted file mode 100644 index 5b6fe2c2cb..0000000000 --- a/sgx-jvm/avian/test/Initializers.java +++ /dev/null @@ -1,24 +0,0 @@ -public class Initializers { - private static class Static2 { - public static String foo = "Static2.foo"; - - static { - System.gc(); - new Exception().printStackTrace(); - } - } - - private static class Static1 { - public static String foo = "Static1.foo"; - - static { - System.out.println(Static2.foo); - } - } - - public static void main(String[] args) { - Object x = new Object(); - System.out.println(Static1.foo); - x.toString(); - } -} diff --git a/sgx-jvm/avian/test/Integers.java b/sgx-jvm/avian/test/Integers.java deleted file mode 100644 index 18e5256dfa..0000000000 --- a/sgx-jvm/avian/test/Integers.java +++ /dev/null @@ -1,341 +0,0 @@ -public class Integers { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static int gcd(int m, int n) { - int temp; - m = Math.abs(m); - n = Math.abs(n); - if (m < n) { - temp = m; - m = n; - n = temp; - } - while (n != 0) { - temp = m; - m = n; - n = temp % n; - } - return m; - } - - private static void testNumberOfLeadingZeros() { - expect(Integer.numberOfLeadingZeros(Integer.MAX_VALUE) == 1); - expect(Integer.numberOfLeadingZeros(0) == 32); - - int positive = 1; - int negative = Integer.MIN_VALUE; - for(int i = 0; i < 32; i++) { - expect(Integer.numberOfLeadingZeros(positive) == 32 - i - 1); - positive <<= 1; - - expect(Integer.numberOfLeadingZeros(negative) == 0); - negative += ((int)Math.pow(2, i)); - } - } - - public static void main(String[] args) throws Exception { - { int foo = 1028; - foo -= 1023; - expect(foo == 5); - } - - expect(gcd(12, 4) == 4); - - { int a = 2; - int b = 2; - int c = a + b; - } - - { int a = 2; - int c = a + a; - } - - { int a = -5; - int b = 2; - expect(a >> b == -5 >> 2); - expect(a >>> b == -5 >>> 2); - expect(a << b == -5 << 2); - expect(a + b == -5 + 2); - expect(a - b == -5 - 2); - expect(a * b == -5 * 2); - expect(a / b == -5 / 2); - expect(a % b == -5 % 2); - expect((a & b) == (-5 & 2)); - expect((a | b) == (-5 | 2)); - expect((a ^ b) == (-5 ^ 2)); - expect(-a == 5); - expect(~a == ~-5); - - a = 5; - b = 2; - expect(a >> b == 5 >> 2); - expect(a >>> b == 5 >>> 2); - expect(a << b == 5 << 2); - expect(a + b == 5 + 2); - expect(a - b == 5 - 2); - expect(a * b == 5 * 2); - expect(a / b == 5 / 2); - expect(a % b == 5 % 2); - expect((a & b) == (5 & 2)); - expect((a | b) == (5 | 2)); - expect((a ^ b) == (5 ^ 2)); - expect(-a == -5); - expect(~a == ~5); - } - - { int a = -5; - expect(a >> 2 == -5 >> 2); - expect(a >>> 2 == -5 >>> 2); - expect(a << 2 == -5 << 2); - expect(a + 2 == -5 + 2); - expect(a - 2 == -5 - 2); - expect(a * 2 == -5 * 2); - expect(a / 2 == -5 / 2); - expect(a % 2 == -5 % 2); - expect((a & 2) == (-5 & 2)); - expect((a | 2) == (-5 | 2)); - expect((a ^ 2) == (-5 ^ 2)); - - a = 5; - expect(a >> 2 == 5 >> 2); - expect(a >>> 2 == 5 >>> 2); - expect(a << 2 == 5 << 2); - expect(a + 2 == 5 + 2); - expect(a - 2 == 5 - 2); - expect(a * 2 == 5 * 2); - expect(a / 2 == 5 / 2); - expect(a % 2 == 5 % 2); - expect((a & 2) == (5 & 2)); - expect((a | 2) == (5 | 2)); - expect((a ^ 2) == (5 ^ 2)); - } - - { int a = -5; - int b = 1234567; - expect(a + b == -5 + 1234567); - expect(a - b == -5 - 1234567); - expect(a * b == -5 * 1234567); - expect(a / b == -5 / 1234567); - expect(a % b == -5 % 1234567); - expect((a & b) == (-5 & 1234567)); - expect((a | b) == (-5 | 1234567)); - expect((a ^ b) == (-5 ^ 1234567)); - - a = 5; - b = 1234567; - expect(a + b == 5 + 1234567); - expect(a - b == 5 - 1234567); - expect(a * b == 5 * 1234567); - expect(a / b == 5 / 1234567); - expect(a % b == 5 % 1234567); - expect((a & b) == (5 & 1234567)); - expect((a | b) == (5 | 1234567)); - expect((a ^ b) == (5 ^ 1234567)); - } - - { int a = -5; - expect(a + 1234567 == -5 + 1234567); - expect(a - 1234567 == -5 - 1234567); - expect(a * 1234567 == -5 * 1234567); - expect(a / 1234567 == -5 / 1234567); - expect(a % 1234567 == -5 % 1234567); - expect((a & 1234567) == (-5 & 1234567)); - expect((a | 1234567) == (-5 | 1234567)); - expect((a ^ 1234567) == (-5 ^ 1234567)); - - a = 5; - expect(a + 1234567 == 5 + 1234567); - expect(a - 1234567 == 5 - 1234567); - expect(a * 1234567 == 5 * 1234567); - expect(a / 1234567 == 5 / 1234567); - expect(a % 1234567 == 5 % 1234567); - expect((a & 1234567) == (5 & 1234567)); - expect((a | 1234567) == (5 | 1234567)); - expect((a ^ 1234567) == (5 ^ 1234567)); - } - - { int a = -1234567; - int b = 2; - expect(a >> b == -1234567 >> 2); - expect(a >>> b == -1234567 >>> 2); - expect(a << b == -1234567 << 2); - expect(a + b == -1234567 + 2); - expect(a - b == -1234567 - 2); - expect(a * b == -1234567 * 2); - expect(a / b == -1234567 / 2); - expect(a % b == -1234567 % 2); - expect((a & b) == (-1234567 & 2)); - expect((a | b) == (-1234567 | 2)); - expect((a ^ b) == (-1234567 ^ 2)); - expect(-a == 1234567); - expect(~a == ~-1234567); - - a = 1234567; - b = 2; - expect(a >> b == 1234567 >> 2); - expect(a >>> b == 1234567 >>> 2); - expect(a << b == 1234567 << 2); - expect(a + b == 1234567 + 2); - expect(a - b == 1234567 - 2); - expect(a * b == 1234567 * 2); - expect(a / b == 1234567 / 2); - expect(a % b == 1234567 % 2); - expect((a & b) == (1234567 & 2)); - expect((a | b) == (1234567 | 2)); - expect((a ^ b) == (1234567 ^ 2)); - expect(-a == -1234567); - expect(~a == ~1234567); - } - - { int a = -1234567; - expect(a >> 2 == -1234567 >> 2); - expect(a >>> 2 == -1234567 >>> 2); - expect(a << 2 == -1234567 << 2); - expect(a + 2 == -1234567 + 2); - expect(a - 2 == -1234567 - 2); - expect(a * 2 == -1234567 * 2); - expect(a / 2 == -1234567 / 2); - expect(a % 2 == -1234567 % 2); - expect((a & 2) == (-1234567 & 2)); - expect((a | 2) == (-1234567 | 2)); - expect((a ^ 2) == (-1234567 ^ 2)); - - a = 1234567; - expect(a >> 2 == 1234567 >> 2); - expect(a >>> 2 == 1234567 >>> 2); - expect(a << 2 == 1234567 << 2); - expect(a + 2 == 1234567 + 2); - expect(a - 2 == 1234567 - 2); - expect(a * 2 == 1234567 * 2); - expect(a / 2 == 1234567 / 2); - expect(a % 2 == 1234567 % 2); - expect((a & 2) == (1234567 & 2)); - expect((a | 2) == (1234567 | 2)); - expect((a ^ 2) == (1234567 ^ 2)); - } - - { int a = -1234567; - int b = 1234567; - expect(a + b == -1234567 + 1234567); - expect(a - b == -1234567 - 1234567); - expect(a * b == -1234567 * 1234567); - expect(a / b == -1234567 / 1234567); - expect(a % b == -1234567 % 1234567); - expect((a & b) == (-1234567 & 1234567)); - expect((a | b) == (-1234567 | 1234567)); - expect((a ^ b) == (-1234567 ^ 1234567)); - - a = 1234567; - b = 1234567; - expect(a + b == 1234567 + 1234567); - expect(a - b == 1234567 - 1234567); - expect(a * b == 1234567 * 1234567); - expect(a / b == 1234567 / 1234567); - expect(a % b == 1234567 % 1234567); - expect((a & b) == (1234567 & 1234567)); - expect((a | b) == (1234567 | 1234567)); - expect((a ^ b) == (1234567 ^ 1234567)); - } - - { int a = -1234567; - expect(a + 1234567 == -1234567 + 1234567); - expect(a - 1234567 == -1234567 - 1234567); - expect(a * 1234567 == -1234567 * 1234567); - expect(a / 1234567 == -1234567 / 1234567); - expect(a % 1234567 == -1234567 % 1234567); - expect((a & 1234567) == (-1234567 & 1234567)); - expect((a | 1234567) == (-1234567 | 1234567)); - expect((a ^ 1234567) == (-1234567 ^ 1234567)); - - a = 1234567; - expect(a + 1234567 == 1234567 + 1234567); - expect(a - 1234567 == 1234567 - 1234567); - expect(a * 1234567 == 1234567 * 1234567); - expect(a / 1234567 == 1234567 / 1234567); - expect(a % 1234567 == 1234567 % 1234567); - expect((a & 1234567) == (1234567 & 1234567)); - expect((a | 1234567) == (1234567 | 1234567)); - expect((a ^ 1234567) == (1234567 ^ 1234567)); - } - - { int get_buffer = 2144642881; - int bits_left = 30; - int l = 9; - int code = (((get_buffer >> (bits_left -= (l)))) & ((1<<(l))-1)); - expect(code == 510); - } - - { int width = 8; - int height = 8; - int depth = 24; - int scanlinePad = 4; - - int bytesPerLine = (((width * depth + 7) / 8) + (scanlinePad - 1)) - / scanlinePad * scanlinePad; - expect(bytesPerLine == 24); - } - - { int y = -11760768; - expect((y + 0x8000) == (-11760768 + 0x8000)); } - - expect(Math.min(796, 1069) == 796); - - { int b = 1; - expect((b << 32) == 1); } - - { int b = 0xFFFFFFFF; - expect((b >>> -1) == 1); } - - { int b = 0x10000000; - expect((b >> -31) == 0x8000000); } - - { int b = 1; int s = 32; - expect((b << s) == 1); } - - { int b = 0xFFFFFFFF; int s = -1; - expect((b >>> s) == 1); } - - { int b = 0x10000000; int s = -31; - expect((b >> s) == 0x8000000); } - - { int b = 0xBE; - expect((b & 0xFF) == 0xBE); } - - { int b = 0xBE; - expect((b >>> 0) == 0xBE); } - - { int b = 0xBE; - expect((b >> 0) == 0xBE); } - - { int b = 0xBE; - expect((b << 0) == 0xBE); } - - { int b = 0xBE; - expect(((b >>> 0) & 0xFF) == 0xBE); } - - { int b = 0xBE; int x = 0xFF; - expect((b & x) == 0xBE); } - - { int b = 0xBE; int x = 0; - expect((b >>> x) == 0xBE); } - - { int b = 0xBE; int x = 0; - expect((b >> x) == 0xBE); } - - { int b = 0xBE; int x = 0; - expect((b << x) == 0xBE); } - - { int b = 0xBE; int x = 0; int y = 0xFF; - expect(((b >>> x) & y) == 0xBE); } - - expect(123 == Integer.decode("123").intValue()); - expect(-123 == Integer.decode("-123").intValue()); - expect(-83 == Integer.decode("-0123").intValue()); - expect(-291 == Integer.decode("-0x123").intValue()); - expect(291 == Integer.decode("#123").intValue()); - - testNumberOfLeadingZeros(); - } -} diff --git a/sgx-jvm/avian/test/InvokeDynamic.java b/sgx-jvm/avian/test/InvokeDynamic.java deleted file mode 100644 index cd65c22199..0000000000 --- a/sgx-jvm/avian/test/InvokeDynamic.java +++ /dev/null @@ -1,184 +0,0 @@ -import java.util.*; - -public class InvokeDynamic { - private final int foo; - - private InvokeDynamic(int foo) { - this.foo = foo; - } - - private interface Operation { - int operate(int a, int b); - } - - private interface Operation2 { - long operate(long a, int b); - } - - private static class Pair { - public final A first; - public final B second; - - public Pair(A first, B second) { - this.first = first; - this.second = second; - } - } - - private interface Supplier extends java.io.Serializable { - T get(); - } - - private interface Consumer { - void accept(T obj); - } - - private interface Function { - R apply(T obj); - } - - private interface BiFunction { - R apply(T t, U u); - } - - private interface GetLong { - long get(long l); - } - - private interface GetDouble { - double get(double d); - } - - private static class LongHolder implements GetLong { - @Override - public long get(long l) { - return l; - } - } - - private static class DoubleHolder implements GetDouble { - @Override - public double get(double d) { - return d; - } - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) { - int c = 4; - Operation op = (a, b) -> a + b - c; - expect(op.operate(2, 3) == (2 + 3) - 4); - - for (int i = 0; i < 4; ++i) { - new InvokeDynamic(i).test(); - } - } - - private interface Foo extends java.io.Serializable { - void someFunction(Integer a, Integer b, String s); - } - - private interface UnboxedSerializable extends java.io.Serializable { - int add(int a, int b); - } - - private interface Unboxed { - int add(int a, int b); - } - - private void requiresBridge(Number a, Object... rest) { - String s = "" + a; - for (Object r : rest) { - s += r; - } - } - - private static Integer addBoxed(Integer a, Integer b) { - return a + b; - } - - private interface Marker { - } - - private void test() { - { int c = 2; - Operation op = (a, b) -> ((a + b) * c) - foo; - expect(op.operate(2, 3) == ((2 + 3) * 2) - foo); - } - - { int c = 2; - Operation2 op = (a, b) -> ((a + b) * c) - foo; - expect(op.operate(2, 3) == ((2 + 3) * 2) - foo); - } - - { Supplier> s = () -> new Pair(42L, 77.1D); - expect(s.get().first == 42L); - expect(s.get().second == 77.1D); - } - - { double[] a = new double[] { 3.14D }; - Supplier> s = () -> new Pair(42L, a[0]); - expect(s.get().first == 42L); - expect(s.get().second == 3.14D); - } - - { Foo s = this::requiresBridge; - s.someFunction(1, 2, ""); - } - - { Consumer c = System.out::println; - c.accept("invoke virtual"); - } - - { Function f = CharSequence::toString; - expect(f.apply("invoke interface") == "invoke interface"); - } - - { Function f = CharSequence::length; - expect(f.apply("invoke interface") == 16); - } - - { BiFunction f = CharSequence::charAt; - String data = "0123456789"; - for (int i = 0; i < data.length(); ++i) { - expect(f.apply(data, i) == data.charAt(i)); - } - } - - { Function, Iterator> f = java.util.List::iterator; - Iterator iter = f.apply(Arrays.asList("1", "22", "333")); - expect(iter.next() == "1"); - expect(iter.next() == "22"); - expect(iter.next() == "333"); - expect(! iter.hasNext()); - } - - { BiFunction f = GetLong::get; - expect(f.apply(new LongHolder(), 20L) == 20L); - } - - { BiFunction f = GetDouble::get; - expect(f.apply(new DoubleHolder(), 20d) == 20d); - } - - // This abort()s in machine.cpp - // { Foo s = (Foo & Marker) this::requiresBridge; - // s.someFunction(1, 2, ""); - // } - - { UnboxedSerializable s = InvokeDynamic::addBoxed; - expect(s.add(1, 2) == 3); - } - - { Unboxed s = InvokeDynamic::addBoxed; - expect(s.add(1, 2) == 3); - } - - { Supplier> s = java.util.ArrayList::new; - java.util.List list = s.get(); - } - } -} diff --git a/sgx-jvm/avian/test/JNI.java b/sgx-jvm/avian/test/JNI.java deleted file mode 100644 index b0583b6606..0000000000 --- a/sgx-jvm/avian/test/JNI.java +++ /dev/null @@ -1,141 +0,0 @@ -import java.lang.reflect.Method; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; - -public class JNI { - private static boolean onLoadCalled; - - static { - System.loadLibrary("test"); - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static float echo(float f) { - return f; - } - - private static native float doEcho(float f); - - private static double echo(double f) { - return f; - } - - private static native double doEcho(double f); - - private static native double addDoubles - (double a1, double a2, double a3, double a4, double a5, double a6, - double a7, double a8, double a9, double a10, double a11, double a12, - double a13, double a14, double a15, double a16, double a17, double a18, - double a19, double a20); - - private static native float addFloats - (float a1, float a2, float a3, float a4, float a5, float a6, - float a7, float a8, float a9, float a10, float a11, float a12, - float a13, float a14, float a15, float a16, float a17, float a18, - float a19, float a20); - - private static native double addMix - (float a1, double a2, float a3, double a4, float a5, float a6, - float a7, float a8, float a9, float a10, float a11, float a12, - float a13, float a14, float a15, double a16, float a17, float a18, - float a19, float a20); - - private static native int addStackBoundary2 - (Object o1, Object o2, Object o3, int i1, int i2); - - private static native int addStackBoundary3 - (Object o1, Object o2, Object o3, int i1, int i2, int i3); - - private static native int addStackBoundary4 - (Object o1, Object o2, Object o3, int i1, int i2, int i3, int i4); - - private static native int addStackBoundary5 - (Object o1, Object o2, Object o3, int i1, int i2, int i3, int i4, int i5); - - private static native int addStackBoundary6 - (Object o1, Object o2, Object o3, int i1, int i2, int i3, int i4, int i5, int i6); - - private static native long fromReflectedMethod(Object m); - - private static native Object toReflectedMethod(Class c, long id, - boolean isStatic); - - private static native int callStaticIntMethod(Class c, long id); - - private static native Object newObject(Class c, long id); - - private static native long fromReflectedField(Field f); - - private static native Field toReflectedField(Class c, long id, - boolean isStatic); - - private static native int getStaticIntField(Class c, long id); - - private static native Object testLocalRef(Object o); - - public static int method242() { return 242; } - - public static final int field950 = 950; - - public static void main(String[] args) throws Exception { - expect(onLoadCalled); - - expect(addDoubles - (1.0d, 2.0d, 3.0d, 4.0d, 5.0d, 6.0d, 7.0d, 8.0d, 9.0d, 10.0d, 11.0d, - 12.0d, 13.0d, 14.0d, 15.0d, 16.0d, 17.0d, 18.0d, 19.0d, 20.0d) - == 210.0d); - - expect(addFloats - (1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, - 12.0f, 13.0f, 14.0f, 15.0f, 16.0f, 17.0f, 18.0f, 19.0f, 20.0f) - == 210.0f); - - expect(addMix - (1.0f, 2.0d, 3.0f, 4.0d, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, - 12.0f, 13.0f, 14.0f, 15.0f, 16.0d, 17.0f, 18.0f, 19.0f, 20.0f) - == 210.0d); - - expect(addStackBoundary2(null, null, null, 1, 10) == 11); - expect(addStackBoundary3(null, null, null, 1, 10, 100) == 111); - expect(addStackBoundary4(null, null, null, 1, 10, 100, 1000) == 1111); - expect(addStackBoundary5(null, null, null, 1, 10, 100, 1000, 10000) == 11111); - expect(addStackBoundary6(null, null, null, 1, 10, 100, 1000, 10000, 100000) == 111111); - - expect(doEcho(42.0f) == 42.0f); - expect(doEcho(42.0d) == 42.0d); - - expect(callStaticIntMethod - (JNI.class, fromReflectedMethod - (JNI.class.getMethod("method242"))) == 242); - - expect(((Method) toReflectedMethod - (JNI.class, fromReflectedMethod - (JNI.class.getMethod("method242")), true)) - .getName().equals("method242")); - - expect(newObject - (JNI.class, fromReflectedMethod - (JNI.class.getConstructor())) instanceof JNI); - - expect(((Constructor) toReflectedMethod - (JNI.class, fromReflectedMethod - (JNI.class.getConstructor()), false)) - .getDeclaringClass().equals(JNI.class)); - - expect(getStaticIntField - (JNI.class, fromReflectedField - (JNI.class.getField("field950"))) == 950); - - expect(toReflectedField - (JNI.class, fromReflectedField - (JNI.class.getField("field950")), true) - .getName().equals("field950")); - - { Object o = new Object(); - expect(testLocalRef(o) == o); - } - } -} diff --git a/sgx-jvm/avian/test/LazyLoading.java b/sgx-jvm/avian/test/LazyLoading.java deleted file mode 100644 index 80d279e3f3..0000000000 --- a/sgx-jvm/avian/test/LazyLoading.java +++ /dev/null @@ -1,183 +0,0 @@ -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; - -public class LazyLoading { - public static boolean loadLazy; - - public static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static File findClass(String name, File directory) { - for (File file: directory.listFiles()) { - if (file.isFile()) { - if (file.getName().equals(name + ".class")) { - return file; - } - } else if (file.isDirectory()) { - File result = findClass(name, file); - if (result != null) { - return result; - } - } - } - return null; - } - - private static byte[] read(File file) throws IOException { - byte[] bytes = new byte[(int) file.length()]; - FileInputStream in = new FileInputStream(file); - try { - if (in.read(bytes) != (int) file.length()) { - throw new RuntimeException(); - } - return bytes; - } finally { - in.close(); - } - } - - public static void main(String[] args) throws Exception { - Class c = new MyClassLoader(LazyLoading.class.getClassLoader()).loadClass - ("LazyLoading$Test"); - - c.getMethod("test").invoke(null); - } - - private static class MyClassLoader extends ClassLoader { - public MyClassLoader(ClassLoader parent) { - super(parent); - } - - protected Class findClass(String name) throws ClassNotFoundException { - try { - return defineClass - (name, read - (LazyLoading.findClass - (name, new File(System.getProperty("user.dir"))))); - } catch (IOException e) { - throw new RuntimeException(e); - } - } - - public Class loadClass(String name) throws ClassNotFoundException { - if ("LazyLoading$Test".equals(name)) { - return findClass(name); - } else if ("LazyLoading$Lazy".equals(name) - || "LazyLoading$Interface".equals(name)) - { - if (loadLazy) { - return findClass(name); - } else { - throw new ClassNotFoundException(name); - } - } else { - return super.loadClass(name); - } - } - - private Class defineClass(String name, byte[] bytes) { - return defineClass(name, bytes, 0, bytes.length); - } - } - - public static class Test { - public static void test() { - doTest(); - loadLazy = true; - doTest(); - } - - private static void doTest() { - if (loadLazy) { - // anewarray - Lazy[] array = new Lazy[1]; - - // new and invokespecial - Object lazy = new Lazy(); - - // checkcast - array[0] = (Lazy) lazy; - - // instanceof - expect(lazy instanceof Lazy); - - // invokeinterface - expect(array[0].interfaceMethod() == 42); - - // invokestatic - expect(Lazy.staticMethod() == 43); - - // invokevirtual - expect(array[0].virtualMethod() == 44); - - // ldc - expect(Lazy.class == lazy.getClass()); - - // multianewarray - Lazy[][] multiarray = new Lazy[5][6]; - multiarray[2][3] = array[0]; - expect(multiarray[2][3] == array[0]); - - // getfield - expect(array[0].intField == 45); - - // getstatic - expect(Lazy.intStaticField == 46); - - // putfield int - array[0].intField = 47; - expect(array[0].intField == 47); - - // putfield long - array[0].longField = 48; - expect(array[0].longField == 48); - - // putfield object - Object x = new Object(); - array[0].objectField = x; - expect(array[0].objectField == x); - - // putstatic int - array[0].intStaticField = 49; - expect(array[0].intStaticField == 49); - - // putstatic long - array[0].longStaticField = 50; - expect(array[0].longStaticField == 50); - - // putstatic object - Object y = new Object(); - array[0].objectStaticField = y; - expect(array[0].objectStaticField == y); - } - } - } - - private interface Interface { - public int interfaceMethod(); - } - - private static class Lazy implements Interface { - public static int intStaticField = 46; - public static long longStaticField; - public static Object objectStaticField; - - public int intField = 45; - public long longField; - public Object objectField; - - public int interfaceMethod() { - return 42; - } - - public static int staticMethod() { - return 43; - } - - public int virtualMethod() { - return 44; - } - } -} diff --git a/sgx-jvm/avian/test/List.java b/sgx-jvm/avian/test/List.java deleted file mode 100644 index c25950c525..0000000000 --- a/sgx-jvm/avian/test/List.java +++ /dev/null @@ -1,193 +0,0 @@ -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.ListIterator; - -public class List { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static String printList(ArrayList list) { - StringBuilder sb = new StringBuilder(); - - for (Integer i : list) { - sb.append(i); - sb.append(", "); - } - sb.setLength(sb.length()-2); - return sb.toString(); - } - - private static void isEqual(String s1, String s2) { - System.out.println(s1); - expect(s1.equals(s2)); - } - - private static void testIterators(java.util.List l) { - l.add(1); - l.add(2); - l.add(3); - - ListIterator it = l.listIterator(); - expect(it.next().equals(Integer.valueOf(1))); - expect(it.next().equals(Integer.valueOf(2))); - expect(it.next().equals(Integer.valueOf(3))); - expect(! it.hasNext()); - - it = l.listIterator(1); - expect(it.next().equals(Integer.valueOf(2))); - expect(it.next().equals(Integer.valueOf(3))); - expect(! it.hasNext()); - - it = l.listIterator(2); - expect(it.next().equals(Integer.valueOf(3))); - expect(! it.hasNext()); - - it = l.listIterator(3); - expect(it.previous().equals(Integer.valueOf(3))); - expect(it.previous().equals(Integer.valueOf(2))); - expect(it.previous().equals(Integer.valueOf(1))); - expect(! it.hasPrevious()); - - it = l.listIterator(2); - expect(it.previous().equals(Integer.valueOf(2))); - expect(it.previous().equals(Integer.valueOf(1))); - expect(! it.hasPrevious()); - - it = l.listIterator(1); - expect(it.previous().equals(Integer.valueOf(1))); - expect(! it.hasPrevious()); - } - - private static void testIterators2(java.util.List l) { - l.add(1); - l.add(2); - l.add(3); - - ListIterator it = l.listIterator(); - expect(it.next().equals(Integer.valueOf(1))); - it.remove(); - expect(it.next().equals(Integer.valueOf(2))); - it.remove(); - expect(it.next().equals(Integer.valueOf(3))); - it.remove(); - expect(! it.hasNext()); - expect(l.isEmpty()); - - l.add(1); - l.add(2); - l.add(3); - - it = l.listIterator(1); - expect(it.next().equals(Integer.valueOf(2))); - it.remove(); - expect(it.next().equals(Integer.valueOf(3))); - it.remove(); - expect(! it.hasNext()); - expect(l.size() == 1); - - l.add(2); - l.add(3); - - it = l.listIterator(2); - expect(it.next().equals(Integer.valueOf(3))); - it.remove(); - expect(! it.hasNext()); - expect(l.size() == 2); - - l.add(3); - - it = l.listIterator(3); - expect(it.previous().equals(Integer.valueOf(3))); - it.remove(); - expect(it.previous().equals(Integer.valueOf(2))); - it.remove(); - expect(it.previous().equals(Integer.valueOf(1))); - it.remove(); - expect(! it.hasPrevious()); - expect(l.isEmpty()); - - l.add(1); - l.add(2); - l.add(3); - - it = l.listIterator(2); - expect(it.previous().equals(Integer.valueOf(2))); - it.remove(); - expect(it.previous().equals(Integer.valueOf(1))); - it.remove(); - expect(! it.hasPrevious()); - expect(l.size() == 1); - - l.clear(); - l.add(1); - l.add(2); - l.add(3); - - it = l.listIterator(1); - expect(it.previous().equals(Integer.valueOf(1))); - it.remove(); - expect(! it.hasPrevious()); - expect(l.size() == 2); - } - - private static void testGrow() { - ArrayList foo = new ArrayList(2); - foo.add(0); - foo.add(1); - foo.add(2); // first grow - foo.add(3); - foo.add(4); // second grow - foo.add(5); - - for (int i = 0; i < foo.size(); i++) { - expect(i == foo.get(i)); - } - } - - private static void testRemove() { - ArrayList foo = new ArrayList(2); - foo.add("Uno"); - foo.add("Dos"); - foo.add("Tres"); - foo.add("Cuatro"); - - ArrayList fooToRemove = new ArrayList(2); - fooToRemove.add(foo.get(0)); - fooToRemove.add(foo.get(1)); - - for (String s : fooToRemove) { - foo.remove(s); - } - - expect(foo.size() == 2); - } - - public static void main(String args[]) { - ArrayList l = new ArrayList(); - l.add(1); l.add(2); l.add(3); l.add(4); l.add(5); - isEqual(printList(l), "1, 2, 3, 4, 5"); - l.add(0, 6); - isEqual(printList(l), "6, 1, 2, 3, 4, 5"); - l.add(2, 7); - isEqual(printList(l), "6, 1, 7, 2, 3, 4, 5"); - l.remove(1); - isEqual(printList(l), "6, 7, 2, 3, 4, 5"); - l.add(6, 8); - isEqual(printList(l), "6, 7, 2, 3, 4, 5, 8"); - Integer[] ints = new Integer[15]; - Integer[] z = l.toArray(ints); - expect(z == ints); - for (int i=0; i < z.length; i++) { - System.out.println(z[i]); - } - - testIterators(new ArrayList()); - testIterators(new LinkedList()); - - testIterators2(new ArrayList()); - testIterators2(new LinkedList()); - testGrow(); - testRemove(); - } -} diff --git a/sgx-jvm/avian/test/Logging.java b/sgx-jvm/avian/test/Logging.java deleted file mode 100644 index cbfc663d25..0000000000 --- a/sgx-jvm/avian/test/Logging.java +++ /dev/null @@ -1,150 +0,0 @@ -import java.util.logging.Handler; -import java.util.logging.Level; -import java.util.logging.LogRecord; -import java.util.logging.Logger; - -public class Logging { - private static final Logger log = Logger.getLogger("Logging"); - - private static class MyHandler extends Handler { - private static final int NAME_WIDTH = 18; - private static final int METHOD_WIDTH = 20; - private static final int LEVEL_WIDTH = 8; - - public Object clone() { return this; } - public void close() { } - public void flush() { } - - private void maybeLogThrown(StringBuilder sb, Throwable t) { - if (t != null) { - sb.append("\nCaused by: "); - sb.append(t.getClass().getName()); - sb.append(": "); - sb.append(t.getMessage()); - sb.append('\n'); - - for (StackTraceElement elt : t.getStackTrace()) { - sb.append('\t'); - sb.append(elt.getClassName()); - sb.append('.'); - sb.append(elt.getMethodName()); - sb.append('('); - sb.append(elt.getFileName()); - sb.append(':'); - sb.append(elt.getLineNumber()); - sb.append(')'); - sb.append('\n'); - } - maybeLogThrown(sb, t.getCause()); - } - } - - private void indent(StringBuilder sb, int amount) { - do { - sb.append(' '); - } while (--amount > 0); - } - - public void publish(LogRecord r) { - StringBuilder sb = new StringBuilder(); - sb.append(r.getLoggerName()); - indent(sb, NAME_WIDTH - r.getLoggerName().length()); - String methodName = r.getSourceMethodName(); - if (methodName == null) { - methodName = ""; - } - sb.append(methodName); - indent(sb, METHOD_WIDTH - methodName.length()); - sb.append(r.getLevel().getName()); - indent(sb, LEVEL_WIDTH - r.getLevel().getName().length()); - sb.append(r.getMessage()); - maybeLogThrown(sb, r.getThrown()); - System.out.println(sb.toString()); - } - } - - public void run() { - log.info("Started run"); - a(); - log.log(Level.INFO, "Ended {}!", "run"); - } - - private void a() { - log.fine("Started a()"); - b(); - } - - private void b() { - log.info("Started b()"); - c(); - } - - private void c() { - log.warning("Started c()"); - try { - d(); - } catch (Exception ex) { - log.log(Level.SEVERE, "Exception caught in c", ex); - } - } - - private void d() throws Exception { - e(); - } - - private void e() throws Exception { - throw new Exception("Started here"); - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static final boolean useCustomHandler = true; - public static void main(String args[]) { - if (useCustomHandler) { - Logger root = Logger.getLogger(""); - root.addHandler(new MyHandler()); - for (Handler h : root.getHandlers()) root.removeHandler(h); - root.addHandler(new MyHandler()); - } - - Logging me = new Logging(); - me.run(); - - { final boolean[] logged = new boolean[1]; - Logger root = Logger.getLogger(""); - for (Handler h : root.getHandlers()) root.removeHandler(h); - root.setLevel(Level.FINER); - root.addHandler(new Handler() { - public void publish(LogRecord r) { - logged[0] = true; - } - - public void close() { } - public void flush() { } - }); - - Logger foo = Logger.getLogger("foo"); - expect(foo.getLevel() == null); - expect(foo.getParent() == root); - - foo.info("hi"); - expect(logged[0]); - - logged[0] = false; - foo.fine("hi"); - expect(logged[0]); - - logged[0] = false; - foo.finest("hi"); - expect(! logged[0]); - - root.setLevel(Level.FINEST); - - logged[0] = false; - foo.finest("hi"); - expect(logged[0]); - } - } -} diff --git a/sgx-jvm/avian/test/Longs.java b/sgx-jvm/avian/test/Longs.java deleted file mode 100644 index 4d9395f7b0..0000000000 --- a/sgx-jvm/avian/test/Longs.java +++ /dev/null @@ -1,394 +0,0 @@ -public class Longs { - private static volatile long volatileLong = getConstant(); - - private static long getConstant() { - return 0x123456789ABCDEFL; - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static long readLongFrom(java.io.InputStream in) - throws java.io.IOException - { - long b1 = in.read(); - long b2 = in.read(); - long b3 = in.read(); - long b4 = in.read(); - long b5 = in.read(); - long b6 = in.read(); - long b7 = in.read(); - long b8 = in.read(); - if (b8 == -1) throw new java.io.EOFException(); - return (long) ((b1 << 56) | (b2 << 48) | (b3 << 40) | (b4 << 32) | - (b5 << 24) | (b6 << 16) | (b7 << 8) | (b8)); - } - - public static void putInt(int val, byte[] dst, int offset) { - System.out.println("put " + val); - dst[offset] = (byte)((val >> 24) & 0xff); - dst[offset+1] = (byte)((val >> 16) & 0xff); - dst[offset+2] = (byte)((val >> 8) & 0xff); - dst[offset+3] = (byte)((val ) & 0xff); - } - - public static void putLong(long val, byte[] dst, int offset) { - putInt((int)(val >> 32), dst, offset); - putInt((int)val, dst, offset + 4); - } - - public static int getInt(byte[] src, int offset) { - int r = ((src[offset] & 0xFF) << 24) - | ((src[offset + 1] & 0xFF) << 16) - | ((src[offset + 2] & 0xFF) << 8) - | ((src[offset + 3] & 0xFF)); - System.out.println("get " + r); - return r; - } - - public static long getLong(byte[] src, int offset) { - return ((long) getInt(src, offset) << 32) - | ((long) getInt(src, offset + 4) & 0xffffffffL); - } - - private static long roundUp(long a, long b) { - a += b - 1L; - return a - (a % b); - } - - private static int negativeOne() { - return -1; - } - - private static long unsignedShiftRight32(long x) { - return x >>> 32; - } - - public static class Rectangle { - public long x; - public long y; - public long width; - public long height; - - public void setX(long x) { - this.x = x; - } - } - - public static void main(String[] args) throws Exception { - expect(volatileLong == getConstant()); - - { Rectangle r = new Rectangle(); - Rectangle.class.getMethod("setX", long.class).invoke(r, 42L); - expect(r.x == 42L); - } - - { long a = 0x1FFFFFFFFL; - long b = -1; - expect(a != b); - } - - expect(Math.abs(-123L) == 123L); - - expect(readLongFrom(new java.io.InputStream() { - int step; - - public int read() { - return ++step; - } - }) == 0x0102030405060708L); - - expect(((long) negativeOne()) == -1); - - { long foo = 25214903884L; - int radix = 10; - expect(foo > 0); - foo /= radix; - expect(foo > 0); - } - - expect(roundUp(156, 2) == 156); - expect(((int) roundUp(156, 2)) == 156); - - expect(Long.parseLong("25214903884") == 25214903884L); - - expect(Long.parseLong("-9223372036854775808") == -9223372036854775808L); - - expect(String.valueOf(25214903884L).equals("25214903884")); - - expect(String.valueOf(-9223372036854775808L).equals - ("-9223372036854775808")); - - { long a = -5; - long b = 2; - expect(a >> b == -5L >> 2); - expect(a >>> b == -5L >>> 2); - expect(a << b == -5L << 2); - expect(a + b == -5L + 2L); - expect(a - b == -5L - 2L); - expect(a * b == -5L * 2L); - expect(a / b == -5L / 2L); - expect(a % b == -5L % 2L); - expect((a & b) == (-5L & 2L)); - expect((a | b) == (-5L | 2L)); - expect((a ^ b) == (-5L ^ 2L)); - expect(-a == 5L); - expect(~a == ~-5L); - - a = 5; - b = 2; - expect(a >> b == 5L >> 2); - expect(a >>> b == 5L >>> 2); - expect(a << b == 5L << 2); - expect(a + b == 5L + 2L); - expect(a - b == 5L - 2L); - expect(a * b == 5L * 2L); - expect(a / b == 5L / 2L); - expect(a % b == 5L % 2L); - expect((a & b) == (5L & 2L)); - expect((a | b) == (5L | 2L)); - expect((a ^ b) == (5L ^ 2L)); - expect(-a == -5L); - expect(~a == ~5L); - } - - { long a = -25214903884L; - long b = 2; - expect(a >> b == -25214903884L >> 2); - expect(a >>> b == -25214903884L >>> 2); - expect(a << b == -25214903884L << 2); - expect(a + b == -25214903884L + 2L); - expect(a - b == -25214903884L - 2L); - expect(a * b == -25214903884L * 2L); - expect(a / b == -25214903884L / 2L); - expect(a % b == -25214903884L % 2L); - expect((a & b) == (-25214903884L & 2L)); - expect((a | b) == (-25214903884L | 2L)); - expect((a ^ b) == (-25214903884L ^ 2L)); - expect(-a == 25214903884L); - expect(~a == ~-25214903884L); - - a = 25214903884L; - b = 2; - expect(a >> b == 25214903884L >> 2); - expect(a >>> b == 25214903884L >>> 2); - expect(a << b == 25214903884L << 2); - expect(a + b == 25214903884L + 2L); - expect(a - b == 25214903884L - 2L); - expect(a * b == 25214903884L * 2L); - expect(a / b == 25214903884L / 2L); - expect(a % b == 25214903884L % 2L); - expect((a & b) == (25214903884L & 2L)); - expect((a | b) == (25214903884L | 2L)); - expect((a ^ b) == (25214903884L ^ 2L)); - expect(-a == -25214903884L); - expect(~a == ~25214903884L); - } - - { long b = 2; - expect((-25214903884L) >> b == -25214903884L >> 2); - expect((-25214903884L) >>> b == -25214903884L >>> 2); - expect((-25214903884L) << b == -25214903884L << 2); - expect((-25214903884L) + b == -25214903884L + 2L); - expect((-25214903884L) - b == -25214903884L - 2L); - expect((-25214903884L) * b == -25214903884L * 2L); - expect((-25214903884L) / b == -25214903884L / 2L); - expect((-25214903884L) % b == -25214903884L % 2L); - expect(((-25214903884L) & b) == (-25214903884L & 2L)); - expect(((-25214903884L) | b) == (-25214903884L | 2L)); - expect(((-25214903884L) ^ b) == (-25214903884L ^ 2L)); - - b = 2; - expect(25214903884L >> b == 25214903884L >> 2); - expect(25214903884L >>> b == 25214903884L >>> 2); - expect(25214903884L << b == 25214903884L << 2); - expect(25214903884L + b == 25214903884L + 2L); - expect(25214903884L - b == 25214903884L - 2L); - expect(25214903884L * b == 25214903884L * 2L); - expect(25214903884L / b == 25214903884L / 2L); - expect(25214903884L % b == 25214903884L % 2L); - expect((25214903884L & b) == (25214903884L & 2L)); - expect((25214903884L | b) == (25214903884L | 2L)); - expect((25214903884L ^ b) == (25214903884L ^ 2L)); - } - - { long a = 2L; - expect(a + (-25214903884L) == 2L + (-25214903884L)); - expect(a - (-25214903884L) == 2L - (-25214903884L)); - expect(a * (-25214903884L) == 2L * (-25214903884L)); - expect(a / (-25214903884L) == 2L / (-25214903884L)); - expect(a % (-25214903884L) == 2L % (-25214903884L)); - expect((a & (-25214903884L)) == (2L & (-25214903884L))); - expect((a | (-25214903884L)) == (2L | (-25214903884L))); - expect((a ^ (-25214903884L)) == (2L ^ (-25214903884L))); - - a = 2L; - expect(a + 25214903884L == 2L + 25214903884L); - expect(a - 25214903884L == 2L - 25214903884L); - expect(a * 25214903884L == 2L * 25214903884L); - expect(a / 25214903884L == 2L / 25214903884L); - expect(a % 25214903884L == 2L % 25214903884L); - expect((a & 25214903884L) == (2L & 25214903884L)); - expect((a | 25214903884L) == (2L | 25214903884L)); - expect((a ^ 25214903884L) == (2L ^ 25214903884L)); - } - - { long b = 2; - expect((-281474976710656L) >> b == -281474976710656L >> 2); - expect((-281474976710656L) >>> b == -281474976710656L >>> 2); - expect((-281474976710656L) << b == -281474976710656L << 2); - expect((-281474976710656L) + b == -281474976710656L + 2L); - expect((-281474976710656L) - b == -281474976710656L - 2L); - expect((-281474976710656L) * b == -281474976710656L * 2L); - expect((-281474976710656L) / b == -281474976710656L / 2L); - expect((-281474976710656L) % b == -281474976710656L % 2L); - expect(((-281474976710656L) & b) == (-281474976710656L & 2L)); - expect(((-281474976710656L) | b) == (-281474976710656L | 2L)); - expect(((-281474976710656L) ^ b) == (-281474976710656L ^ 2L)); - - b = 2; - expect(281474976710656L >> b == 281474976710656L >> 2); - expect(281474976710656L >>> b == 281474976710656L >>> 2); - expect(281474976710656L << b == 281474976710656L << 2); - expect(281474976710656L + b == 281474976710656L + 2L); - expect(281474976710656L - b == 281474976710656L - 2L); - expect(281474976710656L * b == 281474976710656L * 2L); - expect(281474976710656L / b == 281474976710656L / 2L); - expect(281474976710656L % b == 281474976710656L % 2L); - expect((281474976710656L & b) == (281474976710656L & 2L)); - expect((281474976710656L | b) == (281474976710656L | 2L)); - expect((281474976710656L ^ b) == (281474976710656L ^ 2L)); - } - - { long a = 2L; - expect(a + (-281474976710656L) == 2L + (-281474976710656L)); - expect(a - (-281474976710656L) == 2L - (-281474976710656L)); - expect(a * (-281474976710656L) == 2L * (-281474976710656L)); - expect(a / (-281474976710656L) == 2L / (-281474976710656L)); - expect(a % (-281474976710656L) == 2L % (-281474976710656L)); - expect((a & (-281474976710656L)) == (2L & (-281474976710656L))); - expect((a | (-281474976710656L)) == (2L | (-281474976710656L))); - expect((a ^ (-281474976710656L)) == (2L ^ (-281474976710656L))); - - a = 2L; - expect(a + 281474976710656L == 2L + 281474976710656L); - expect(a - 281474976710656L == 2L - 281474976710656L); - expect(a * 281474976710656L == 2L * 281474976710656L); - expect(a / 281474976710656L == 2L / 281474976710656L); - expect(a % 281474976710656L == 2L % 281474976710656L); - expect((a & 281474976710656L) == (2L & 281474976710656L)); - expect((a | 281474976710656L) == (2L | 281474976710656L)); - expect((a ^ 281474976710656L) == (2L ^ 281474976710656L)); - } - - { long x = 231; - expect((x >> 32) == 0); - expect((x >>> 32) == 0); - expect((x << 32) == 992137445376L); - - int shift = 32; - expect((x >> shift) == 0); - expect((x >>> shift) == 0); - expect((x << shift) == 992137445376L); - - long y = -231; - expect((y >> 32) == 0xffffffffffffffffL); - expect((y >>> 32) == 0xffffffffL); - } - - expect(Long.valueOf(231L) == 231L); - - { byte[] array = new byte[8]; - putLong(231, array, 0); - - expect((array[0] & 0xff) == 0); - expect((array[1] & 0xff) == 0); - expect((array[2] & 0xff) == 0); - expect((array[3] & 0xff) == 0); - expect((array[4] & 0xff) == 0); - expect((array[5] & 0xff) == 0); - expect((array[6] & 0xff) == 0); - expect((array[7] & 0xff) == 231); - - expect(getLong(array, 0) == 231); - } - - java.nio.ByteBuffer buffer = java.nio.ByteBuffer.allocate(8); - buffer.putLong(231); - buffer.flip(); - expect(buffer.getLong() == 231); - - expect(unsignedShiftRight32(231) == 0); - - { int[] x = new int[] { 1701899151 }; - int[] z = new int[x.length * 2]; - final long LONG_MASK = 0xffffffffL; - - int lastProductLowWord = 0; - for (int j=0, i=0; j>> 33); - z[i++] = (int) (product >>> 1); - lastProductLowWord = (int) product; - } - - expect(z[0] == 337192406); - expect(z[1] == -437261072); - } - - { long b = 1; - expect((b << 64) == 1); } - - { long b = 0xFFFFFFFFFFFFFFFFL; - expect((b >>> -1) == 1); } - - { long b = 0x10000000000L; - expect((b >> -63) == 0x8000000000L); } - - { long b = 1; int s = 64; - expect((b << s) == 1); } - - { long b = 0xFFFFFFFFFFFFFFFFL; int s = -1; - expect((b >>> s) == 1); } - - { long b = 0x10000000000L; int s = -63; - expect((b >> s) == 0x8000000000L); } - - { long b = 0xBEL; - expect((b & 0xFF) == 0xBEL); } - - { long b = 0xBEL; - expect((b >>> 0) == 0xBEL); } - - { long b = 0xBEL; - expect((b >> 0) == 0xBEL); } - - { long b = 0xBEL; - expect((b << 0) == 0xBEL); } - - { long b = 0xBEL; - expect(((b >>> 0) & 0xFF) == 0xBEL); } - - { long b = 0xBEL; int x = 0xFF; - expect((b & x) == 0xBEL); } - - { long b = 0xBEL; int x = 0; - expect((b >>> x) == 0xBEL); } - - { long b = 0xBEL; int x = 0; - expect((b >> x) == 0xBEL); } - - { long b = 0xBEL; int x = 0; - expect((b << x) == 0xBEL); } - - { long b = 0xBEL; int x = 0; int y = 0xFF; - expect(((b >>> x) & y) == 0xBEL); } - - { long b = 0xFFFFFFFFFFFFFFFFL; int s = 20; - expect((b >>> -s) == 0xFFFFF); - } - } - -} diff --git a/sgx-jvm/avian/test/MemoryRamp.java b/sgx-jvm/avian/test/MemoryRamp.java deleted file mode 100644 index cba83ebb13..0000000000 --- a/sgx-jvm/avian/test/MemoryRamp.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Demonstrates slow multithreaded memory access. - */ -public class MemoryRamp implements Runnable { - - private static final int ARRAY_SIZE = 10 * 1024 * 1024; //10 MB in byte - private static final boolean ACCESS_ARRAY = true; - - @Override - public void run() { - mem(); - } - - public static void main(String[] args) { - // get timing for single thread - long singleTime = mem(); - System.out.println("Single thread: " + singleTime + "ms"); - - // run the same method with different thread numbers - for (int threadCount : new int[] {2, 3, 4}) { - long time = memMulti(threadCount); - double timeFactor = 1.0 * singleTime * threadCount / time; - System.out.println(threadCount + " threads: " + time + "ms (" + timeFactor + "x)"); - } - } - - /** - * Creates and accesses a ARRAY_SIZE big byte[]. - * @return time to create and access array in milliseconds - */ - private static long mem() { - final byte[] array = new byte[ARRAY_SIZE]; - if (ACCESS_ARRAY) { - for (int i = 0; i < array.length; i++) { - //array[i] = (byte) 170; //write - byte x = array[i]; //read - } - } - return 0; - } - - /** - * Starts multiple threads and runs mem() in each one. - * @return total time for all threads - */ - private static long memMulti(int numOfThreads) { - Thread[] threads = new Thread[numOfThreads]; - - for (int i = 0; i < threads.length; i++) { - threads[i] = new Thread(new MemoryRamp(), "mem-"); - threads[i].start(); - } - - try { - for (Thread thread : threads) { - thread.join(); - } - } - catch (InterruptedException iex) { - throw new RuntimeException(iex); - } - return 0; - } -} diff --git a/sgx-jvm/avian/test/MessageFormatTest.java b/sgx-jvm/avian/test/MessageFormatTest.java deleted file mode 100644 index 63914ee44e..0000000000 --- a/sgx-jvm/avian/test/MessageFormatTest.java +++ /dev/null @@ -1,24 +0,0 @@ -import java.text.MessageFormat; - -public class MessageFormatTest { - - private static void assertEquals(Object a, Object b) { - if(!a.equals(b)) { - throw new RuntimeException("[" + a + "] != [" + b + "]"); - } - } - - public static void main(String[] args) { - assertEquals("Hi there", MessageFormat.format("Hi there", "a")); - assertEquals("Hi there", MessageFormat.format("Hi {0}here", "t")); - assertEquals("Hi a!a!a", MessageFormat.format("Hi {0}!{0}!{0}", "a")); - assertEquals("Hi There", MessageFormat.format("{1} {0}", "There", "Hi")); - assertEquals("6 There 4", MessageFormat.format("{1} {2} {0}", 4, 6, "There")); - assertEquals("Zero and {0} aren't the same", MessageFormat.format("{0} and '{0}' aren''t the same","Zero")); - assertEquals("There are six grapes", MessageFormat.format("There are {0} grapes", "six")); - assertEquals("3 + 2 = 5", MessageFormat.format("{2} + {1} = {0}", 5, 2, 3)); - assertEquals("again and again and again", MessageFormat.format("{0} and {0} and {0}", "again")); - assertEquals("Joe's age is 30, not {0}", MessageFormat.format("Joe''s age is {0}, not '{0}'", 30)); - } - -} \ No newline at end of file diff --git a/sgx-jvm/avian/test/Misc.java b/sgx-jvm/avian/test/Misc.java deleted file mode 100644 index 21d7937d4f..0000000000 --- a/sgx-jvm/avian/test/Misc.java +++ /dev/null @@ -1,352 +0,0 @@ -import java.io.IOException; -import java.net.URL; -import java.util.Enumeration; - -public class Misc { - private static class μClass { - public int μField; - - public void μMethod(int i) { - μField = i; - } - } - - private interface Bar { - public int baz(); - } - - private static abstract class Bim implements Bar { } - - private static class Baz extends Bim { - public int baz() { - return 42; - } - } - - private static class Static { - static { - staticRan = true; - } - - public static void run() { } - } - - private static boolean staticRan; - - private static int alpha; - private static int beta; - private static byte byte1, byte2, byte3; - - private static volatile int volatileStatic; - - private static volatile long volatileStaticLong; - - private final int NonStaticConstant = 42; - - private int gamma; - private int pajama; - private boolean boolean1; - private boolean boolean2; - private long time; - private volatile int volatileMember; - - public Misc() { - expect(! boolean1); - expect(! boolean2); - - time = 0xffffffffffffffffL; - - expect(! boolean1); - expect(! boolean2); - } - - private String foo(String s) { - return s; - } - - public String bar(String s) { - return s; - } - - private static String baz(String s) { - return s; - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private synchronized byte sync() { - byte[] array = new byte[123]; - return array[42]; - } - - private static synchronized byte syncStatic(boolean throw_) { - byte[] array = new byte[123]; - if (throw_) { - throw new RuntimeException(); - } else { - return array[42]; - } - } - - public String toString() { - return super.toString(); - } - - private static int zap() { - return 42; - } - - private static int zip() { - return 5 + zap(); - } - - private static int zup() { - return zap() + 5; - } - - private static class Foo { - public int a; - public int b; - public int c; - public int[] array; - } - - private static int bar(int a, int b, int c) { - return a + b + c; - } - - private static Object gimmeNull() { - return null; - } - - private static Object queryDefault(Object default_) { - Object o = gimmeNull(); - return (o == null ? default_ : o); - } - - private static class Zam { - public void bim() { } - } - - private static class Zim { - public Object zum() { - return null; - } - } - - private static Zim zim = new Zim(); - - private static void zam() { - Zam z; - while ((z = (Zam) zim.zum()) != null) { - z.bim(); - } - } - - private static synchronized void testStaticNotify() { - Misc.class.notify(); - } - - public static void main(String[] args) throws Exception { - zam(); - - Bim bim = new Baz(); - expect(bim.baz() == 42); - - expect(queryDefault(new Object()) != null); - - { Foo foo = new Foo(); - int x = foo.a + foo.b + foo.c; - bar(foo.a, foo.b, foo.c); - } - - byte2 = 0; - expect(byte2 == 0); - - boolean v = Boolean.valueOf("true"); - - ClassLoader.getSystemClassLoader().toString(); - - testStaticNotify(); - - { Misc m = new Misc(); - m.toString(); - - expect(m.NonStaticConstant == 42); - - expect(m.time == 0xffffffffffffffffL); - long t = m.time; - expect(t == 0xffffffffffffffffL); - - String s = "hello"; - m.foo(s); - m.bar(s); - baz(s); - - m.sync(); - syncStatic(false); - try { - syncStatic(true); - } catch (RuntimeException e) { - e.printStackTrace(); - } - - int d = alpha; - beta = 42; - alpha = 43; - volatileStatic = 55; - volatileStaticLong = 9L; - int e = beta; - int f = alpha; - m.volatileMember = 23; - m.gamma = 44; - m.volatileMember = 27; - - expect(beta == 42); - expect(alpha == 43); - expect(m.gamma == 44); - expect(volatileStatic == 55); - expect(volatileStaticLong == 9L); - expect(m.volatileMember == 27); - } - - expect(zip() == 47); - expect(zup() == 47); - - { - Object a = new Object(); - Object b = new Object(); - expect(a != b); - - Object c = a; - Object d = b; - expect(c != d); - - c = (c == a) ? b : a; - d = (d == a) ? b : a; - - expect(c != d); - } - - { Foo foo = new Foo(); - foo.array = new int[3]; - foo.a = (foo.a + 1) % foo.array.length; - } - - { boolean foo = false; - boolean iconic = false; - do { - zap(); - iconic = foo ? true : false; - } while (foo); - zap(); - } - - { int x = 0; - if (x == 0) { - x = 1; - do { - int y = x; - x = 1; - } while (x != 1); - } - } - - System.out.println('x'); - System.out.println(true); - System.out.println(42); - System.out.println(123456789012345L); - System.out.println(75.62); - System.out.println(75.62d); - System.out.println(new char[] { 'h', 'i' }); - - expect(! (((Object) new int[0]) instanceof Object[])); - - { μClass μInstance = new μClass(); - μInstance.μMethod(8933); - expect(μInstance.μField == 8933); - } - - expect(new int[0] instanceof Cloneable); - expect(new int[0] instanceof java.io.Serializable); - - expect(new Object[0] instanceof Cloneable); - expect(new Object[0] instanceof java.io.Serializable); - - expect((Baz.class.getModifiers() & java.lang.reflect.Modifier.STATIC) - != 0); - - expect((Protected.class.getModifiers() & java.lang.reflect.Modifier.PUBLIC) - == 0); - - try { - int count = 0; - boolean test = false, extraDir = false; - ClassLoader loader = Misc.class.getClassLoader(); - Enumeration resources = loader.getResources("multi-classpath-test.txt"); - while (resources.hasMoreElements()) { - ++count; - String url = resources.nextElement().toString(); - if (url.contains("extra-dir")) { - extraDir = true; - } else if (url.contains("test")) { - test = true; - } - } - // This test is only relevant if multi-classpath-test.txt - // actually exists in somewhere under the classpath from which - // Misc.class was loaded. Since we run this test from an - // AOT-compiled boot image as well as straight from the - // filesystem, and the boot image does not contain - // multi-classpath-test.txt, we'll skip the test if it's not - // present. - if (count != 0) { - expect(count == 2); - expect(test); - expect(extraDir); - } - } catch (IOException e) { - throw new RuntimeException(e); - } - - expect(! staticRan); - Static.run(); - expect(staticRan); - - expect(System.getProperty("java.class.path").equals - (System.getProperties().getProperty("java.class.path"))); - - expect(System.getProperty("path.separator").equals - (System.getProperties().getProperty("path.separator"))); - - expect(System.getProperty("user.dir").equals - (System.getProperties().getProperty("user.dir"))); - - expect(System.getProperty("java.io.tmpdir").equals - (System.getProperties().getProperty("java.io.tmpdir"))); - - System.setProperty("buzzy.buzzy.bim.bam", "dippy dopey flim flam"); - - expect(System.getProperty("buzzy.buzzy.bim.bam").equals - (System.getProperties().getProperty("buzzy.buzzy.bim.bam"))); - - expect(System.getProperty("buzzy.buzzy.bim.bam").equals - ("dippy dopey flim flam")); - - System.getProperties().put("buzzy.buzzy.bim.bam", "yippy yappy yin yang"); - - expect(System.getProperty("buzzy.buzzy.bim.bam").equals - (System.getProperties().getProperty("buzzy.buzzy.bim.bam"))); - - expect(System.getProperty("buzzy.buzzy.bim.bam").equals - ("yippy yappy yin yang")); - - // just test that it's there; don't care what it returns: - Runtime.getRuntime().totalMemory(); - Runtime.getRuntime().maxMemory(); - } - - protected class Protected { } -} diff --git a/sgx-jvm/avian/test/NullPointer.java b/sgx-jvm/avian/test/NullPointer.java deleted file mode 100644 index 8d3abdc6fa..0000000000 --- a/sgx-jvm/avian/test/NullPointer.java +++ /dev/null @@ -1,132 +0,0 @@ -public class NullPointer { - private int x; - private Object y; - - private static void throw_(Object o) { - o.toString(); - } - - private static void throwAndCatch(Object o) { - try { - o.toString(); - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - } - - public static void main(String[] args) { - try { - ((Object) null).getClass(); - } catch (Exception e) { - e.printStackTrace(); - } - - try { - throw_(null); - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - throwAndCatch(null); - - // invokeinterface - try { - ((Runnable) null).run(); - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // invokevirtual - try { - ((Object) null).toString(); - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // arraylength - try { - int a = ((byte[]) null).length; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // iaload - try { - int a = ((byte[]) null)[42]; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // aaload - try { - Object a = ((Object[]) null)[42]; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // getfield (int) - try { - int a = ((NullPointer) null).x; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // getfield (Object) - try { - Object a = ((NullPointer) null).y; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // iastore - try { - ((byte[]) null)[42] = 42; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // aastore - try { - ((Object[]) null)[42] = null; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // putfield (int) - try { - ((NullPointer) null).x = 42; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // putfield (Object) - try { - ((NullPointer) null).y = null; - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - - // monitorenter - try { - synchronized ((Object) null) { - int a = 42; - } - throw new RuntimeException(); - } catch (NullPointerException e) { - e.printStackTrace(); - } - } -} diff --git a/sgx-jvm/avian/test/Observe.java b/sgx-jvm/avian/test/Observe.java deleted file mode 100644 index 75dc0063a8..0000000000 --- a/sgx-jvm/avian/test/Observe.java +++ /dev/null @@ -1,88 +0,0 @@ -import java.util.Observer; -import java.util.Observable; - -public class Observe { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static class MyObservable extends Observable { - private String value; - - public MyObservable(String value) { - this.value = value; - } - - public void set(String newValue) { - if(!value.equals(newValue)) { - value = newValue; - setChanged(); - notifyObservers(value); - } - } - } - - private static class MyObserver implements Observer { - private int count = 0; - private Observable expectedObs; - private Object expectedValue = null; - private boolean expected = false; - - public MyObserver(Observable expectedObs) { - this.expectedObs = expectedObs; - } - - public void update(Observable obs, Object value) { - expect(expectedObs == expectedObs); - expect(expected); - expect(value == expectedValue); - expectNothing(); - } - - public void noUpdate() { - expect(!expected); - } - - public void expect(Object value) { - expected = true; - expectedValue = value; - } - - public void expectNothing() { - expected = false; - } - - } - - public static void main(String[] args) { - MyObservable obs = new MyObservable("test"); - MyObserver o = new MyObserver(obs); - MyObserver o2 = new MyObserver(obs); - - obs.set("a"); - - obs.addObserver(o); - o.expect("b"); - obs.set("b"); - o.noUpdate(); - - obs.addObserver(o2); - o.expect("c"); - o2.expect("c"); - obs.set("c"); - o.noUpdate(); - o2.noUpdate(); - - obs.deleteObserver(o); - o.expectNothing(); - o2.expect("d"); - obs.set("d"); - o2.noUpdate(); - - obs.deleteObserver(o2); - o.expectNothing(); - o2.expectNothing(); - obs.set("e"); - - } -} \ No newline at end of file diff --git a/sgx-jvm/avian/test/OutOfMemory.java b/sgx-jvm/avian/test/OutOfMemory.java deleted file mode 100644 index fbcb614fdf..0000000000 --- a/sgx-jvm/avian/test/OutOfMemory.java +++ /dev/null @@ -1,62 +0,0 @@ -public class OutOfMemory { - // assume a 128MB heap size: - private static final int Padding = 120 * 1024 * 1024; - - private static class Node { - Object value; - Node next; - } - - private static void bigObjects() { - Object[] root = null; - while (true) { - Object[] x = new Object[1024 * 1024]; - x[0] = root; - root = x; - } - } - - private static void littleObjects() { - byte[] padding = new byte[Padding]; - Node root = null; - while (true) { - Node x = new Node(); - x.next = root; - root = x; - } - } - - private static void bigAndLittleObjects() { - byte[] padding = new byte[Padding]; - Node root = null; - while (true) { - Node x = new Node(); - x.value = new Object[1024 * 1024]; - x.next = root; - root = x; - } - } - - public static void main(String[] args) { - try { - bigObjects(); - throw new RuntimeException(); - } catch (OutOfMemoryError e) { - e.printStackTrace(); - } - - try { - littleObjects(); - throw new RuntimeException(); - } catch (OutOfMemoryError e) { - e.printStackTrace(); - } - - try { - bigAndLittleObjects(); - throw new RuntimeException(); - } catch (OutOfMemoryError e) { - e.printStackTrace(); - } - } -} diff --git a/sgx-jvm/avian/test/Proxies.java b/sgx-jvm/avian/test/Proxies.java deleted file mode 100644 index e52a0e7d68..0000000000 --- a/sgx-jvm/avian/test/Proxies.java +++ /dev/null @@ -1,42 +0,0 @@ -import java.lang.reflect.Proxy; -import java.lang.reflect.InvocationHandler; -import java.lang.reflect.Method; - -public class Proxies { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) { - Foo foo = (Foo) Proxy.newProxyInstance - (Proxies.class.getClassLoader(), new Class[] { Foo.class }, - new InvocationHandler() { - public Object invoke(Object proxy, Method method, Object[] arguments) - { - if (method.getName().equals("bar")) { - return "bam"; - } else if (method.getName().equals("baz")) { - return ((Integer) arguments[0]) + 1; - } else if (method.getName().equals("bim")) { - return ((Long) arguments[0]) - 1L; - } else if (method.getName().equals("boom")) { - return ((String) arguments[0]).substring(1); - } else { - throw new IllegalArgumentException(); - } - } - }); - - expect(foo.bar().equals("bam")); - expect(foo.baz(42) == 43); - expect(foo.bim(42L) == 41L); - expect(foo.boom("hello").equals("ello")); - } - - private interface Foo { - public String bar(); - public int baz(int v); - public long bim(long v); - public String boom(String s); - } -} diff --git a/sgx-jvm/avian/test/QueueHelper.java b/sgx-jvm/avian/test/QueueHelper.java deleted file mode 100644 index 3c9cc4c6fb..0000000000 --- a/sgx-jvm/avian/test/QueueHelper.java +++ /dev/null @@ -1,149 +0,0 @@ -import java.util.LinkedList; -import java.util.NoSuchElementException; -import java.util.Queue; - -public class QueueHelper { - private static void verify(boolean val) { - if (! val) { - throw new RuntimeException(); - } - } - - public static void main(String args[]) { - // prevents unit test failure - } - - public static void sizeTest(Queue q) { - verify(q.size() == 0); - - q.add(new Object()); - verify(q.size() == 1); - } - - public static void isEmptyTest(Queue q) { - verify(q.isEmpty()); - - q.add(new Object()); - verify(! q.isEmpty()); - } - - public static void addTest(Queue q) { - Object testObject = new Object(); - q.add(testObject); - - verify(q.size() == 1); - verify(q.peek() == testObject); - } - - public static void addAllTest(Queue q) { - LinkedList toAdd = new LinkedList(); - toAdd.add(new Object()); - toAdd.add(new Object()); - - q.addAll(toAdd); - - verify(q.size() == toAdd.size()); - while (! q.isEmpty()) { - verify(q.remove() == toAdd.remove()); - } - } - - public static void elementTest(Queue q) { - Object testObject = new Object(); - q.add(testObject); - - verify(q.element() == testObject); - } - - public static void elementFail(Queue q) { - try { - q.element(); - throw new RuntimeException("Exception should have thrown"); - } catch (NoSuchElementException e) { - // expected - } - } - - public static void removeTest(Queue q) { - Object testObject = new Object(); - q.add(testObject); - - verify(q.remove() == testObject); - } - - public static void removeEmptyFail(Queue q) { - try { - q.remove(); - throw new RuntimeException("Exception should have thrown"); - } catch (NoSuchElementException e) { - // expected - } - } - - public static void containsTest(Queue q) { - Object testObject = new Object(); - - verify(! q.contains(testObject)); - - q.add(testObject); - verify(q.contains(testObject)); - } - - public static void containsAllTest(Queue q) { - Object testObject = new Object(); - q.add(testObject); - - LinkedList testList = new LinkedList(); - testList.add(testObject); - testList.add(new Object()); - - verify(! q.containsAll(testList)); - - q.addAll(testList); - verify(q.containsAll(testList)); - } - - public static void removeObjectTest(Queue q) { - Object testObject = new Object(); - - verify(! q.remove(testObject)); - - q.add(testObject); - verify(q.remove(testObject)); - } - - public static void removeAllTest(Queue q) { - Object testObject = new Object(); - q.add(testObject); - - LinkedList testList = new LinkedList(); - testList.add(testObject); - testList.add(new Object()); - - verify(q.removeAll(testList)); - - q.addAll(testList); - verify(q.removeAll(testList)); - } - - public static void clearTest(Queue q) { - q.add(new Object()); - - q.clear(); - - verify(q.isEmpty()); - } - - public static void toArrayTest(Queue q) { - if (q.toArray().length != 0) { - throw new RuntimeException(); - } - - Object testObject = new Object(); - q.add(testObject); - - Object[] result = q.toArray(); - verify(result.length == 1); - verify(result[0] == testObject); - } -} diff --git a/sgx-jvm/avian/test/References.java b/sgx-jvm/avian/test/References.java deleted file mode 100644 index 5557e5db1a..0000000000 --- a/sgx-jvm/avian/test/References.java +++ /dev/null @@ -1,72 +0,0 @@ -import java.lang.ref.ReferenceQueue; -import java.lang.ref.Reference; -import java.lang.ref.WeakReference; -import java.lang.ref.PhantomReference; -import java.util.WeakHashMap; - -public class References { - public static void main(String[] args) { - Object a = new Object(); - Object b = new Object(); - Object c = new Object(); - Object d = new Object(); - Object e = new Object(); - Object f = new Object(); - - ReferenceQueue q = new ReferenceQueue(); - - Reference ar = new WeakReference(a); - Reference br = new WeakReference(b, q); - Reference cr = new WeakReference(c, q); - Reference dr = new PhantomReference(d, q); - Reference er = new MyReference(e, q, "foo"); - - WeakHashMap map = new WeakHashMap(); - map.put(new Key("foo"), f); - - a = b = c = d = e = cr = null; - - System.out.println("a: " + ar.get()); - System.out.println("b: " + br.get()); - System.out.println("d: " + dr.get()); - System.out.println("e: " + er.get()); - System.out.println("f: " + map.get(new Key("foo"))); - - System.gc(); - - System.out.println("a: " + ar.get()); - System.out.println("b: " + br.get()); - System.out.println("d: " + dr.get()); - System.out.println("e: " + er.get()); - System.out.println("f: " + map.get(new Key("foo"))); - - for (Reference r = q.poll(); r != null; r = q.poll()) { - System.out.println("polled: " + r.get()); - } - } - - private static class MyReference extends WeakReference { - private final Object foo; - - public MyReference(Object target, ReferenceQueue queue, Object foo) { - super(target, queue); - this.foo = foo; - } - } - - private static class Key { - private final String name; - - public Key(String name) { - this.name = name; - } - - public int hashCode() { - return name.hashCode(); - } - - public boolean equals(Object o) { - return o instanceof Key && ((Key) o).name.equals(name); - } - } -} diff --git a/sgx-jvm/avian/test/Reflection.java b/sgx-jvm/avian/test/Reflection.java deleted file mode 100644 index 1280a2c2b0..0000000000 --- a/sgx-jvm/avian/test/Reflection.java +++ /dev/null @@ -1,346 +0,0 @@ -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.lang.reflect.InvocationTargetException; - -public class Reflection { - public static boolean booleanMethod() { - return true; - } - - public static byte byteMethod() { - return 1; - } - - public static char charMethod() { - return '2'; - } - - public static short shortMethod() { - return 3; - } - - public static int intMethod() { - return 4; - } - - public static float floatMethod() { - return 5.0f; - } - - public static long longMethod() { - return 6; - } - - public static double doubleMethod() { - return 7.0; - } - - public static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static class Hello { - private class World { } - } - - private static void innerClasses() throws Exception { - Class c = Reflection.class; - Class[] inner = c.getDeclaredClasses(); - expect(3 == inner.length); - expect(Hello.class == inner[0] - || Hello.class == inner[1] - || Hello.class == inner[2]); - } - - private int egads; - - private static void annotations() throws Exception { - Field egads = Reflection.class.getDeclaredField("egads"); - expect(egads.getAnnotation(Deprecated.class) == null); - } - - private Integer[] array; - - private Integer integer; - - public static Hello>.World> pinky; - - private static void genericType() throws Exception { - Field field = Reflection.class.getDeclaredField("egads"); - expect(field.getGenericType() == Integer.TYPE); - - field = Reflection.class.getField("pinky"); - expect("Reflection$Hello$World".equals(field.getType().getName())); - expect(field.getGenericType() instanceof ParameterizedType); - ParameterizedType type = (ParameterizedType) field.getGenericType(); - - expect(type.getRawType() instanceof Class); - Class clazz = (Class) type.getRawType(); - expect("Reflection$Hello$World".equals(clazz.getName())); - - expect(type.getOwnerType() instanceof ParameterizedType); - ParameterizedType owner = (ParameterizedType) type.getOwnerType(); - clazz = (Class) owner.getRawType(); - expect(clazz == Hello.class); - - Type[] args = type.getActualTypeArguments(); - expect(1 == args.length); - expect(args[0] instanceof ParameterizedType); - - ParameterizedType arg = (ParameterizedType) args[0]; - expect(arg.getRawType() instanceof Class); - clazz = (Class) arg.getRawType(); - expect("Reflection$Hello".equals(clazz.getName())); - - args = arg.getActualTypeArguments(); - expect(1 == args.length); - expect(args[0] == String.class); - } - - public static void throwOOME() { - throw new OutOfMemoryError(); - } - - public static void classType() throws Exception { - // Class types - expect(!Reflection.class.isAnonymousClass()); - expect(!Reflection.class.isLocalClass()); - expect(!Reflection.class.isMemberClass()); - - expect(Reflection.Hello.class.isMemberClass()); - - Cloneable anonymousLocal = new Cloneable() {}; - expect(anonymousLocal.getClass().isAnonymousClass()); - - class NamedLocal {} - expect(NamedLocal.class.isLocalClass()); - } - - private static class MyClassLoader extends ClassLoader { - public Package definePackage1(String name) { - return definePackage(name, null, null, null, null, null, null, null); - } - } - - public static void main(String[] args) throws Exception { - expect(new MyClassLoader().definePackage1("foo").getName().equals("foo")); - - innerClasses(); - annotations(); - genericType(); - classType(); - - Class system = Class.forName("java.lang.System"); - Field out = system.getDeclaredField("out"); - Class output = Class.forName("java.io.PrintStream"); - Method println = output.getDeclaredMethod("println", String.class); - - println.invoke(out.get(null), "Hello, World!"); - - expect((Boolean) Reflection.class.getMethod("booleanMethod").invoke(null)); - - expect(1 == (Byte) Reflection.class.getMethod("byteMethod").invoke(null)); - - expect('2' == (Character) Reflection.class.getMethod - ("charMethod").invoke(null)); - - expect(3 == (Short) Reflection.class.getMethod - ("shortMethod").invoke(null)); - - expect(4 == (Integer) Reflection.class.getMethod - ("intMethod").invoke(null)); - - expect(5.0 == (Float) Reflection.class.getMethod - ("floatMethod").invoke(null)); - - expect(6 == (Long) Reflection.class.getMethod - ("longMethod").invoke(null)); - - expect(7.0 == (Double) Reflection.class.getMethod - ("doubleMethod").invoke(null)); - - { Class[][] array = new Class[][] { { Class.class } }; - expect("[Ljava.lang.Class;".equals(array[0].getClass().getName())); - expect(Class[].class == array[0].getClass()); - expect(array.getClass().getComponentType() == array[0].getClass()); - } - - { Reflection r = new Reflection(); - expect(r.egads == 0); - - Reflection.class.getDeclaredField("egads").set(r, (Integer)42); - expect(((Integer)Reflection.class.getDeclaredField("egads").get(r)) == 42); - - Reflection.class.getDeclaredField("egads").setInt(r, 43); - expect(Reflection.class.getDeclaredField("egads").getInt(r) == 43); - - Integer[] array = new Integer[0]; - Reflection.class.getDeclaredField("array").set(r, array); - expect(Reflection.class.getDeclaredField("array").get(r) == array); - - try { - Reflection.class.getDeclaredField("array").set(r, new Object()); - expect(false); - } catch (IllegalArgumentException e) { - // cool - } - - Integer integer = 45; - Reflection.class.getDeclaredField("integer").set(r, integer); - expect(Reflection.class.getDeclaredField("integer").get(r) == integer); - - try { - Reflection.class.getDeclaredField("integer").set(r, new Object()); - expect(false); - } catch (IllegalArgumentException e) { - // cool - } - - try { - Reflection.class.getDeclaredField("integer").set - (new Object(), integer); - expect(false); - } catch (IllegalArgumentException e) { - // cool - } - - try { - Reflection.class.getDeclaredField("integer").get(new Object()); - expect(false); - } catch (IllegalArgumentException e) { - // cool - } - } - - try { - Foo.class.getMethod("foo").invoke(null); - expect(false); - } catch (ExceptionInInitializerError e) { - expect(e.getCause() instanceof MyException); - } - - try { - Foo.class.getConstructor().newInstance(); - expect(false); - } catch (NoClassDefFoundError e) { - // cool - } - - try { - Foo.class.getField("foo").get(null); - expect(false); - } catch (NoClassDefFoundError e) { - // cool - } - - try { - Foo.class.getField("foo").set(null, (Integer)42); - expect(false); - } catch (NoClassDefFoundError e) { - // cool - } - - try { - Foo.class.getField("foo").set(null, new Object()); - expect(false); - } catch (IllegalArgumentException e) { - // cool - } catch (NoClassDefFoundError e) { - // cool - } - - { Method m = Reflection.class.getMethod("throwOOME"); - try { - m.invoke(null); - } catch(Throwable t) { - expect(t.getClass() == InvocationTargetException.class); - } - } - - expect((Foo.class.getMethod("toString").getModifiers() - & Modifier.PUBLIC) != 0); - - expect(avian.TestReflection.get(Baz.class.getField("foo"), new Baz()) - .equals(42)); - expect((Baz.class.getModifiers() & Modifier.PUBLIC) == 0); - - expect(B.class.getDeclaredMethods().length == 0); - - new Runnable() { - public void run() { - expect(getClass().getDeclaringClass() == null); - } - }.run(); - - expect(avian.testing.annotations.Test.class.getPackage().getName().equals - ("avian.testing.annotations")); - - expect(Baz.class.getField("foo").getAnnotation(Ann.class) == null); - expect(Baz.class.getField("foo").getAnnotations().length == 0); - - expect(new Runnable() { public void run() { } }.getClass() - .getEnclosingClass().equals(Reflection.class)); - - expect(new Runnable() { public void run() { } }.getClass() - .getEnclosingMethod().equals - (Reflection.class.getMethod - ("main", new Class[] { String[].class }))); - - Slithy.class.getMethod("tove", Gybe.class); - - try { - Slithy.class.getMethod("tove", Bandersnatch.class); - expect(false); - } catch (NoSuchMethodException e) { - // cool - } - - expect(C.class.getInterfaces().length == 1); - expect(C.class.getInterfaces()[0].equals(B.class)); - } - - protected static class Baz { - public int foo = 42; - } -} - -class Bandersnatch { } - -class Gybe extends Bandersnatch { } - -class Slithy { - public static void tove(Gybe gybe) { - // ignore - } -} - -class Foo { - static { - if (true) throw new MyException(); - } - - public Foo() { } - - public static int foo; - - public static void foo() { - // ignore - } -} - -class MyException extends RuntimeException { } - -interface A { - void foo(); -} - -interface B extends A { } - -class C implements B { - public void foo() { } -} - -@interface Ann { } diff --git a/sgx-jvm/avian/test/Regex.java b/sgx-jvm/avian/test/Regex.java deleted file mode 100644 index 1409c67e3e..0000000000 --- a/sgx-jvm/avian/test/Regex.java +++ /dev/null @@ -1,102 +0,0 @@ -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class Regex { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static Matcher getMatcher(String regex, String string) { - return Pattern.compile(regex).matcher(string); - } - - private static void expectMatch(String regex, String string) { - expect(getMatcher(regex, string).matches()); - } - - private static void expectNoMatch(String regex, String string) { - expect(!getMatcher(regex, string).matches()); - } - - private static void expectGroups(String regex, String string, - String... groups) { - Matcher matcher = getMatcher(regex, string); - expect(matcher.matches()); - expect(matcher.groupCount() == groups.length); - for (int i = 1; i <= groups.length; ++i) { - if (groups[i - 1] == null) { - expect(matcher.group(i) == null); - } else { - expect(groups[i - 1].equals(matcher.group(i))); - } - } - } - - private static void expectFind(String regex, String string, - String... matches) - { - Matcher matcher = getMatcher(regex, string); - int i = 0; - while (i < matches.length) { - expect(matcher.find()); - expect(matches[i++].equals(matcher.group())); - } - expect(!matcher.find()); - } - - private static void expectSplit(String regex, String string, - String... list) - { - String[] array = Pattern.compile(regex).split(string); - expect(array.length == list.length); - for (int i = 0; i < list.length; ++ i) { - expect(list[i].equals(array[i])); - } - } - - public static void main(String[] args) { - expectMatch("a(bb)?a", "abba"); - expectNoMatch("a(bb)?a", "abbba"); - expectNoMatch("a(bb)?a", "abbaa"); - expectGroups("a(a*?)(a?)(a??)(a+)(a*)a", "aaaaaa", "", "a", "", "aaa", ""); - expectMatch("...", "abc"); - expectNoMatch(".", "\n"); - expectGroups("a(bb)*a", "abbbba", "bb"); - expectGroups("a(bb)?(bb)+a", "abba", null, "bb"); - expectFind(" +", "Hello , world! ", " ", " ", " "); - expectMatch("[0-9A-Fa-f]+", "08ef"); - expectNoMatch("[0-9A-Fa-f]+", "08@ef"); - expectGroups("(?:a)", "a"); - expectGroups("a|(b|c)", "a", (String)null); - expectGroups("a|(b|c)", "c", "c"); - expectGroups("(?=a)a", "a"); - expectGroups(".*(o)(?<=[A-Z][a-z]{1,4})", "Hello", "o"); - expectNoMatch("(?!a).", "a"); - expectMatch("[\\d]", "0"); - expectMatch("\\0777", "?7"); - expectMatch("\\a", "\007"); - expectMatch("\\\\", "\\"); - expectMatch("\\x4A", "J"); - expectMatch("\\x61", "a"); - expectMatch("\\078", "\0078"); - expectSplit("(?<=\\w)(?=\\W)|(?<=\\W)(?=\\w)", "a + b * x", - "a", " + ", "b", " * ", "x"); - expectMatch("[0-9[def]]", "f"); - expectNoMatch("[a-z&&[^d-f]]", "f"); - expectSplit("^H", "Hello\nHobbes!", "", "ello\nHobbes!"); - expectSplit("o.*?$", "Hello\r\nHobbes!", "Hello\r\nH"); - try { - expectSplit("\\b", "a+ b + c\nd", "", "a", "+ ", "b", " + ", "c", "\n", "d"); - } catch (RuntimeException e) { - // Java 8 changed the semantics of split, so if we're on 8, the - // above will fail and this will succeed: - expectSplit("\\b", "a+ b + c\nd", "a", "+ ", "b", " + ", "c", "\n", "d"); - } - expectSplit("\\B", "Hi Cal!", "H", "i C", "a", "l!"); - expectMatch("a{2,5}", "aaaa"); - expectGroups("a??(a{2,5}?)", "aaaa", "aaaa"); - expectGroups("a??(a{3}?)", "aaaa", "aaa"); - expectNoMatch("a(a{3}?)", "aaaaa"); - expectMatch("a(a{3,}?)", "aaaaa"); - } -} diff --git a/sgx-jvm/avian/test/Simple.java b/sgx-jvm/avian/test/Simple.java deleted file mode 100644 index ce0c470e95..0000000000 --- a/sgx-jvm/avian/test/Simple.java +++ /dev/null @@ -1,11 +0,0 @@ -public class Simple { - public static int size(long v, int radix) { - int size = 0; - for (long n = v; n != 0; n /= radix) ++size; - return size; - } - - public static void main(String[] args) { - size(42, 10); - } -} diff --git a/sgx-jvm/avian/test/StackOverflow.java b/sgx-jvm/avian/test/StackOverflow.java deleted file mode 100644 index e25e3819eb..0000000000 --- a/sgx-jvm/avian/test/StackOverflow.java +++ /dev/null @@ -1,41 +0,0 @@ -public class StackOverflow { - private static int add(int[] numbers, int offset, int length) { - if (length == 0) { - return 0; - } else { - return numbers[offset] + add(numbers, offset + 1, length - 1); - } - } - private static int add(int ... numbers) { - return add(numbers, 0, numbers.length); - } - - private static int test1() { - add(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); - return test1() + 1; - } - - private static int test2() { - return test3() + 1; - } - - private static int test3() { - return test2() + 1; - } - - public static void main(String[] args) { - try { - test1(); - throw new RuntimeException(); - } catch (StackOverflowError e) { - e.printStackTrace(); - } - - try { - test2(); - throw new RuntimeException(); - } catch (StackOverflowError e) { - e.printStackTrace(); - } - } -} diff --git a/sgx-jvm/avian/test/StringBuilderTest.java b/sgx-jvm/avian/test/StringBuilderTest.java deleted file mode 100644 index 3060b4f975..0000000000 --- a/sgx-jvm/avian/test/StringBuilderTest.java +++ /dev/null @@ -1,65 +0,0 @@ - -public class StringBuilderTest { - private static final int iterations = 1000; - - public static void main(String[] args) { - verifyAppendStrLength(); - verifyAppendCharLength(); - verifySubstring(); - } - - private static void verify(String srcStr, int iterations, String result) { - int expectedLength = srcStr.length() * iterations; - if (result.length() != expectedLength) { - throw new IllegalStateException("Incorrect length: " + result.length() + " vs " + expectedLength); - } - } - - private static void verify(String expected, String actual) { - if (! expected.equals(actual)) { - throw new IllegalStateException("Strings don't match, expected: " + expected + ", actual: " + actual); - } - } - - private static void verifyAppendStrLength() { - String fooStr = "foobar"; - - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < iterations; i++) { - sb.append(fooStr); - } - String result = sb.toString(); - - verify(fooStr, iterations, result); - } - - private static void verifyAppendCharLength() { - int iterations = 5000; - String fooStr = "foobar"; - char[] fooChars = new char[fooStr.length()]; - fooStr.getChars(0, fooStr.length(), fooChars, 0); - - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < iterations; i++) { - for (int j = 0; j < fooChars.length; j++) { - sb.append(fooChars[j]); - } - } - String result = sb.toString(); - - verify(fooStr, iterations, result); - } - - private static void verifySubstring() { - String fooStr = "foobar"; - StringBuilder sb = new StringBuilder(); - sb.append(fooStr); - sb.append(fooStr); - - String beginingSubString = sb.substring(0, fooStr.length()); - verify(fooStr, beginingSubString); - - String endSubString = sb.substring(fooStr.length()); - verify(fooStr, endSubString); - } -} diff --git a/sgx-jvm/avian/test/Strings.java b/sgx-jvm/avian/test/Strings.java deleted file mode 100644 index 077c2a6895..0000000000 --- a/sgx-jvm/avian/test/Strings.java +++ /dev/null @@ -1,231 +0,0 @@ -public class Strings { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static boolean equal(Object a, Object b) { - return a == b || (a != null && a.equals(b)); - } - - private static boolean arraysEqual(byte[] a, byte[] b) { - if (a.length != b.length) { - return false; - } - - for (int i = 0; i < a.length; ++i) { - if (a[i] != b[i]) { - return false; - } - } - - return true; - } - - private static byte[] append(byte[] a, byte[] b) { - byte[] c = new byte[a.length + b.length]; - for (int i = 0; i < a.length; ++i) { - c[i] = a[i]; - } - for (int i = 0; i < b.length; ++i) { - c[i + a.length] = b[i]; - } - return c; - } - - private static boolean arraysEqual(Object[] a, Object[] b) { - if (a.length != b.length) { - return false; - } - - for (int i = 0; i < a.length; ++i) { - if (! equal(a[i], b[i])) { - return false; - } - } - - return true; - } - - private static void testDecode(final boolean prematureEOS) throws Exception { - java.io.Reader r = new java.io.InputStreamReader - (new java.io.InputStream() { - int state = 0; - - public int read() { - throw new UnsupportedOperationException(); - } - - public int read(byte[] b, int offset, int length) { - if (length == 0) return 0; - - switch (state) { - case 0: - b[offset] = (byte) 0xc2; - state = 1; - return 1; - - case 1: - b[offset] = (byte) 0xae; - state = 2; - return 1; - - case 2: - b[offset] = (byte) 0xea; - state = 3; - return 1; - - case 3: - b[offset] = (byte) 0xba; - state = prematureEOS ? 5 : 4; - return 1; - - case 4: - b[offset] = (byte) 0xaf; - state = 5; - return 1; - - case 5: - return -1; - - default: - throw new RuntimeException(); - } - } - }, "UTF-8"); - - char[] buffer = new char[2]; - int offset = 0; - while (offset < buffer.length) { - int c = r.read(buffer, offset, buffer.length - offset); - if (c == -1) break; - offset += c; - } - - expect(new String(buffer, 0, offset).equals - (prematureEOS ? "\u00ae\ufffd" : "\u00ae\uaeaf")); - } - - public static void testTrivialPattern() throws Exception { - expect("?7".matches("\\0777")); - expect("\007".matches("\\a")); - expect("\\".matches("\\\\")); - expect("J".matches("\\x4A")); - expect("a".matches("\\x61")); - expect("\0078".matches("\\078")); - } - - public static void main(String[] args) throws Exception { - expect(new String(new byte[] { 99, 111, 109, 46, 101, 99, 111, 118, 97, - 116, 101, 46, 110, 97, 116, 46, 98, 117, - 115, 46, 83, 121, 109, 98, 111, 108 }, "UTF-8") - .equals("com.ecovate.nat.bus.Symbol")); - - final String months = "Jan\u00aeFeb\u00aeMar\u00ae"; - expect(months.split("\u00ae").length == 3); - expect(months.replaceAll("\u00ae", ".").equals("Jan.Feb.Mar.")); - - // Java 8 changed the semantics of String.split relative to - // previous versions, therefore we accept multiple possible - // results: - expect(arraysEqual - ("xyz".split("", 0), new String[] { "", "x", "y", "z" }) - || arraysEqual - ("xyz".split("", 0), new String[] { "x", "y", "z" })); - expect(arraysEqual - ("xyz".split("", 1), new String[] { "xyz" })); - expect(arraysEqual - ("xyz".split("", 2), new String[] { "", "xyz" }) - || arraysEqual - ("xyz".split("", 2), new String[] { "x", "yz" })); - expect(arraysEqual - ("xyz".split("", 3), new String[] { "", "x", "yz" }) - || arraysEqual - ("xyz".split("", 3), new String[] { "x", "y", "z" })); - expect(arraysEqual - ("xyz".split("", 4), new String[] { "", "x", "y", "z" }) - || arraysEqual - ("xyz".split("", 4), new String[] { "x", "y", "z", "" })); - expect(arraysEqual - ("xyz".split("", 5), new String[] { "", "x", "y", "z", "" }) - || arraysEqual - ("xyz".split("", 5), new String[] { "x", "y", "z", "" })); - expect(arraysEqual - ("xyz".split("", 6), new String[] { "", "x", "y", "z", "" }) - || arraysEqual - ("xyz".split("", 6), new String[] { "x", "y", "z", "" })); - expect(arraysEqual - ("xyz".split("", -1), new String[] { "", "x", "y", "z", "" }) - || arraysEqual - ("xyz".split("", -1), new String[] { "x", "y", "z", "" })); - - expect(arraysEqual("".split("xyz", 0), new String[] { "" })); - expect(arraysEqual("".split("xyz", 1), new String[] { "" })); - expect(arraysEqual("".split("xyz", -1), new String[] { "" })); - - expect(arraysEqual("".split("", 0), new String[] { "" })); - expect(arraysEqual("".split("", 1), new String[] { "" })); - expect(arraysEqual("".split("", -1), new String[] { "" })); - - expect("foo_foofoo__foo".replaceAll("_", "__") - .equals("foo__foofoo____foo")); - - expect("foo_foofoo__foo".replaceFirst("_", "__") - .equals("foo__foofoo__foo")); - - expect("stereomime".matches("stereomime")); - expect(! "stereomime".matches("stereomim")); - expect(! "stereomime".matches("tereomime")); - expect(! "stereomime".matches("sterEomime")); - - StringBuilder sb = new StringBuilder(); - sb.append('$'); - sb.append('2'); - expect(sb.substring(1).equals("2")); - - expect(Character.forDigit(Character.digit('0', 10), 10) == '0'); - expect(Character.forDigit(Character.digit('9', 10), 10) == '9'); - expect(Character.forDigit(Character.digit('b', 16), 16) == 'b'); - expect(Character.forDigit(Character.digit('f', 16), 16) == 'f'); - expect(Character.forDigit(Character.digit('z', 36), 36) == 'z'); - - testDecode(false); - testDecode(true); - - expect - (java.text.MessageFormat.format - ("{0} enjoy {1} {2}. do {4}? {4} do?", - "I", "grape", "nuts", "foobar", - new Object() { public String toString() { return "you"; } }) - .equals("I enjoy grape nuts. do you? you do?")); - - { java.io.ByteArrayOutputStream bout = new java.io.ByteArrayOutputStream(); - java.io.PrintStream pout = new java.io.PrintStream(bout, true, "UTF-8"); - String s = "I ♥ grape nuts"; - System.out.println(s); - pout.println(s); - - expect - (arraysEqual - (bout.toByteArray(), - (s + System.getProperty("line.separator")).getBytes("UTF-8"))); - - expect - (arraysEqual - (bout.toByteArray(), append - (new byte[] { 73, 32, -30, -103, -91, 32, 103, 114, 97, 112, 101, - 32, 110, 117, 116, 115 }, - System.getProperty("line.separator").getBytes("UTF-8")))); - } - - expect("abc".lastIndexOf('b', 100) == 1); - - testTrivialPattern(); - - { String s = "hello, world!"; - java.nio.CharBuffer buffer = java.nio.CharBuffer.allocate(s.length()); - new java.io.InputStreamReader - (new java.io.ByteArrayInputStream(s.getBytes("UTF-8"))).read(buffer); - expect(s.equals(new String(buffer.array()))); - } - } -} diff --git a/sgx-jvm/avian/test/Subroutine.java b/sgx-jvm/avian/test/Subroutine.java deleted file mode 100644 index e03686a9f5..0000000000 --- a/sgx-jvm/avian/test/Subroutine.java +++ /dev/null @@ -1,347 +0,0 @@ -import avian.Stream; -import avian.ConstantPool; -import avian.ConstantPool.PoolEntry; -import avian.Assembler; -import avian.Assembler.FieldData; -import avian.Assembler.MethodData; - -import java.util.ArrayList; -import java.util.List; -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; -import java.io.IOException; - -public class Subroutine { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static void stackMap(Object x) { - while (true) { - try { - try { - System.gc(); - } catch (DummyException e) { - // ignore - } finally { - x.toString(); - } - break; - } catch (DummyException e) { - // ignore - } - } - } - - private static byte[] makeTestCode(List pool) throws IOException { - ByteArrayOutputStream out = new ByteArrayOutputStream(); - Stream.write2(out, 1); // max stack - Stream.write2(out, 1); // max locals - Stream.write4(out, 0); // length (we'll set the real value later) - - // 0: - Stream.write1(out, Assembler.ldc_w); - Stream.write2(out, ConstantPool.addString(pool, "foo") + 1); - - // 3: - Stream.write1(out, Assembler.astore_0); - - // 4: - Stream.write1(out, Assembler.invokestatic); - Stream.write2(out, ConstantPool.addMethodRef - (pool, "java/lang/System", "gc", "()V") + 1); - - // 7: - Stream.write1(out, Assembler.goto_); - Stream.write2(out, 9); // 16 - - // 10: - Stream.write1(out, Assembler.astore_0); - - // 11: - Stream.write1(out, Assembler.invokestatic); - Stream.write2(out, ConstantPool.addMethodRef - (pool, "java/lang/System", "gc", "()V") + 1); - - // 14: - Stream.write1(out, Assembler.ret); - Stream.write1(out, 0); - - // 16: - Stream.write1(out, Assembler.jsr); - Stream.write2(out, -6); // 10 - - // 19: - Stream.write1(out, Assembler.invokestatic); - Stream.write2(out, ConstantPool.addMethodRef - (pool, "java/lang/System", "gc", "()V") + 1); - - // 22: - Stream.write1(out, Assembler.return_); - - Stream.write2(out, 0); // exception handler table length - Stream.write2(out, 0); // attribute count - - byte[] result = out.toByteArray(); - Stream.set4(result, 4, result.length - 12); - - return result; - } - - private static Class makeTestClass() throws IOException { - List pool = new ArrayList(); - ByteArrayOutputStream out = new ByteArrayOutputStream(); - String name = "$SubroutineTest$"; - - Assembler.writeClass - (out, pool, ConstantPool.addClass(pool, name), - ConstantPool.addClass(pool, "java/lang/Object"), - new int[0], new FieldData[0], new MethodData[] - { new MethodData(Assembler.ACC_STATIC | Assembler.ACC_PUBLIC, - ConstantPool.addUtf8(pool, "test"), - ConstantPool.addUtf8(pool, "()V"), - makeTestCode(pool)) }); - - return new MyClassLoader(Subroutine.class.getClassLoader()) - .defineClass(name, out.toByteArray()); - } - - // These tests are intended to cover the jsr and ret instructions. - // However, recent Sun javac versions avoid generating these - // instructions by default, so we must compile this class using - // -source 1.2 -target 1.1 -XDjsrlimit=0. - // - // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4381996 - // - - private static void test(boolean throw_, boolean predicate) { - int x = 42; - int y = 99; - int a = 0; - try { - try { - int z = x + y; - if (throw_) throw new DummyException(); - if (predicate) { - return; - } - Integer.valueOf(z).toString(); - } finally { - a = x + y; - System.gc(); - } - expect(a == x + y); - } catch (DummyException e) { - e.printStackTrace(); - } - } - - private static Object test2(int path) { - try { - try { - switch (path) { - case 1: - return new Object(); - - case 2: { - int a = 42; - return Integer.valueOf(a); - } - - case 3: - throw new DummyException(); - } - } finally { - System.gc(); - } - return null; - } catch (DummyException e) { - e.printStackTrace(); - return null; - } - } - - private static Object test3(int path1, int path2, int path3) { - try { - try { - switch (path1) { - case 1: - return new Object(); - - case 2: { - int a = 42; - return Integer.valueOf(a); - } - - case 3: - throw new DummyException(); - } - } finally { - try { - switch (path2) { - case 1: - return new Object(); - - case 2: { - int a = 42; - return Integer.valueOf(a); - } - - case 3: - throw new DummyException(); - } - } finally { - try { - switch (path3) { - case 1: - return new Object(); - - case 2: { - int a = 42; - return Integer.valueOf(a); - } - - case 3: - throw new DummyException(); - } - } finally { - System.gc(); - } - } - } - return null; - } catch (DummyException e) { - e.printStackTrace(); - return null; - } - } - - private static long test4(int path) { - try { - try { - switch (path) { - case 1: - return 0xFABFABFABFL; - - case 2: { - int a = 42; - return 52L; - } - - case 3: - throw new DummyException(); - } - } finally { - System.gc(); - } - return 0L; - } catch (DummyException e) { - e.printStackTrace(); - return 0L; - } - } - - private boolean test5(boolean predicate) { - try { - if (predicate) { - return false; - } - } finally { - synchronized (this) { - notifyAll(); - } - } - return true; - } - - private static int test6(boolean predicate) { - try { - if (predicate) { - return -2; - } - } finally { - return new Throwable().getStackTrace()[0].getLineNumber(); - } - } - - public static void main(String[] args) throws Exception { - test(false, false); - test(false, true); - test(true, false); - - String.valueOf(test2(1)); - String.valueOf(test2(2)); - String.valueOf(test2(3)); - - String.valueOf(test3(1, 1, 1)); - String.valueOf(test3(2, 1, 1)); - String.valueOf(test3(3, 1, 1)); - - String.valueOf(test3(1, 2, 1)); - String.valueOf(test3(2, 2, 1)); - String.valueOf(test3(3, 2, 1)); - - String.valueOf(test3(1, 3, 1)); - String.valueOf(test3(2, 3, 1)); - String.valueOf(test3(3, 3, 1)); - - String.valueOf(test3(1, 1, 2)); - String.valueOf(test3(2, 1, 2)); - String.valueOf(test3(3, 1, 2)); - - String.valueOf(test3(1, 2, 2)); - String.valueOf(test3(2, 2, 2)); - String.valueOf(test3(3, 2, 2)); - - String.valueOf(test3(1, 3, 2)); - String.valueOf(test3(2, 3, 2)); - String.valueOf(test3(3, 3, 2)); - - String.valueOf(test3(1, 1, 3)); - String.valueOf(test3(2, 1, 3)); - String.valueOf(test3(3, 1, 3)); - - String.valueOf(test3(1, 2, 3)); - String.valueOf(test3(2, 2, 3)); - String.valueOf(test3(3, 2, 3)); - - String.valueOf(test3(1, 3, 3)); - String.valueOf(test3(2, 3, 3)); - String.valueOf(test3(3, 3, 3)); - - String.valueOf(test4(1)); - String.valueOf(test4(2)); - String.valueOf(test4(3)); - - expect(test4(1) == 0xFABFABFABFL); - - new Subroutine().test5(true); - new Subroutine().test5(false); - - makeTestClass().getMethod("test", new Class[0]).invoke - (null, new Object[0]); - - stackMap(new Object()); - - { - int f = test6(false); - int t = test6(true); - System.out.println("line: " + f); - expect(f > 0); - expect(f == t); - } - - } - - private static class DummyException extends RuntimeException { } - - private static class MyClassLoader extends ClassLoader { - public MyClassLoader(ClassLoader parent) { - super(parent); - } - - public Class defineClass(String name, byte[] bytes) { - return super.defineClass(name, bytes, 0, bytes.length); - } - } -} diff --git a/sgx-jvm/avian/test/Switch.java b/sgx-jvm/avian/test/Switch.java deleted file mode 100644 index bb1c0a459f..0000000000 --- a/sgx-jvm/avian/test/Switch.java +++ /dev/null @@ -1,66 +0,0 @@ -public class Switch { - private static int table(int k) { - switch (k) { - case 0: - return 0; - case 1: - return 1; - case 2: - return 2; - case 9: - return 9; - case 10: - return 10; - case 11: - return 11; - case 12: - return 8; - case -5: - return 5; - default: - return 7; - } - } - - private static int lookup(int k) { - switch (k) { - case 0: - return 0; - case 45: - return 45; - case 46: - return 46; - case 47: - return -47; - case 200: - return 200; - case 244: - return 244; - case 245: - return 245; - default: - return 91; - } - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) { - expect(table(0) == 0); - expect(table(9) == 9); - expect(table(10) == 10); - expect(table(11) == 11); - expect(table(12) == 8); - expect(table(-5) == 5); - expect(table(-13) == 7); - - expect(lookup(0) == 0); - expect(lookup(45) == 45); - expect(lookup(46) == 46); - expect(lookup(47) == -47); - expect(lookup(245) == 245); - expect(lookup(246) == 91); - } -} diff --git a/sgx-jvm/avian/test/ThreadExceptions.java b/sgx-jvm/avian/test/ThreadExceptions.java deleted file mode 100644 index cd9fcd91ea..0000000000 --- a/sgx-jvm/avian/test/ThreadExceptions.java +++ /dev/null @@ -1,71 +0,0 @@ -public class ThreadExceptions { - - private static void expect(boolean v) { - if (! v) throw new RuntimeException("Expectation failed"); - } - - private static class Handler implements Thread.UncaughtExceptionHandler { - public String message; - - @Override - public void uncaughtException(Thread t, Throwable e) { - message = e.getMessage(); - } - } - - public static void main(String[] args) throws Exception { - { Thread thread = new Thread() { - @Override - public void run() { - throw new RuntimeException("TEST-DEFAULT-HANDLER"); - } - }; - - Handler handler = new Handler(); - Thread.setDefaultUncaughtExceptionHandler(handler); - thread.start(); - thread.join(); - - expect("TEST-DEFAULT-HANDLER".equals(handler.message)); - } - - Thread.setDefaultUncaughtExceptionHandler(null); - - { Thread thread = new Thread() { - @Override - public void run() { - throw new RuntimeException("TEST-HANDLER"); - } - }; - - Handler handler = new Handler(); - thread.setUncaughtExceptionHandler(handler); - thread.start(); - thread.join(); - - expect("TEST-HANDLER".equals(handler.message)); - } - - { Thread thread = new Thread() { - @Override - public void run() { - throw new RuntimeException("TEST-BAD-HANDLER"); - } - }; - - Handler handler = new Handler() { - @Override - public void uncaughtException(Thread t, Throwable e) { - super.uncaughtException(t, e); - throw new IllegalStateException("BAD THING"); - } - }; - thread.setUncaughtExceptionHandler(handler); - thread.start(); - thread.join(); - - expect("TEST-BAD-HANDLER".equals(handler.message)); - System.out.println("Exception from UncaughtExceptionHandler was ignored"); - } - } -} diff --git a/sgx-jvm/avian/test/Threads.java b/sgx-jvm/avian/test/Threads.java deleted file mode 100644 index 750bbe0ab9..0000000000 --- a/sgx-jvm/avian/test/Threads.java +++ /dev/null @@ -1,94 +0,0 @@ -public class Threads implements Runnable { - private static boolean success = false; - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) throws Exception { - Thread.currentThread().getThreadGroup() - .uncaughtException(Thread.currentThread(), new Exception()); - - { Threads test = new Threads(); - Thread thread = new Thread(test); - - synchronized (test) { - thread.start(); - test.wait(); - } - } - - { Thread thread = new Thread() { - public void run() { - while (true) { - System.out.print("."); - try { - sleep(1000); - } catch (Exception e) { - System.out.println("thread interrupted? " + interrupted()); - break; - } - } - } - }; - thread.start(); - - System.out.println("\nAbout to interrupt..."); - thread.interrupt(); - System.out.println("\nInterrupted!"); - } - - { Thread thread = new Thread() { - @Override - public void run() { - // do nothing - } - }; - - thread.start(); - thread.join(); - } - - System.out.println("finished; success? " + success); - - if (! success) { - System.exit(-1); - } - } - - public void run() { - int i = 0; - try { - expect(! Thread.holdsLock(this)); - synchronized (this) { - expect(Thread.holdsLock(this)); - - System.out.println("I'm running in a separate thread!"); - - Thread.yield(); // just to prove Thread.yield exists and is callable - - final int arrayCount = 16; - final int arraySize = 4; - System.out.println("Allocating and discarding " + arrayCount + - " arrays of " + arraySize + "MB each"); - for (; i < arrayCount; ++i) { - byte[] array = new byte[arraySize * 1024 * 1024]; - } - - long nap = 500; - System.out.println("sleeping for " + nap + " milliseconds"); - Thread.sleep(nap); - notifyAll(); - } - success = true; - } catch (Throwable e) { - System.err.println("caught something in second thread after " + i + - " iterations"); - e.printStackTrace(); - } finally { - synchronized (this) { - notifyAll(); - } - } - } -} diff --git a/sgx-jvm/avian/test/TimeUnitConversions.java b/sgx-jvm/avian/test/TimeUnitConversions.java deleted file mode 100644 index b681f60076..0000000000 --- a/sgx-jvm/avian/test/TimeUnitConversions.java +++ /dev/null @@ -1,117 +0,0 @@ -import java.util.concurrent.TimeUnit; - -public class TimeUnitConversions { - private static void expect(long v1, long v2) { - if (v1 != v2) { - throw new RuntimeException(v1 + " != " + v2); - } - } - - private static void toNanoConversionTest() { - long expectedValue = 1; - expect(TimeUnit.NANOSECONDS.convert(1, TimeUnit.NANOSECONDS), expectedValue); - expectedValue *= 1000; - expect(TimeUnit.NANOSECONDS.convert(1, TimeUnit.MICROSECONDS), expectedValue); - expectedValue *= 1000; - expect(TimeUnit.NANOSECONDS.convert(1, TimeUnit.MILLISECONDS), expectedValue); - expectedValue *= 1000; - expect(TimeUnit.NANOSECONDS.convert(1, TimeUnit.SECONDS), expectedValue); - expectedValue *= 60; - expect(TimeUnit.NANOSECONDS.convert(1, TimeUnit.MINUTES), expectedValue); - expectedValue *= 60; - expect(TimeUnit.NANOSECONDS.convert(1, TimeUnit.HOURS), expectedValue); - expectedValue *= 24; - expect(TimeUnit.NANOSECONDS.convert(1, TimeUnit.DAYS), expectedValue); - } - - private static void toMicroConversionTest() { - long expectedValue = 1; - expect(TimeUnit.MICROSECONDS.convert(1000, TimeUnit.NANOSECONDS), expectedValue); - expect(TimeUnit.MICROSECONDS.convert(1, TimeUnit.MICROSECONDS), expectedValue); - expectedValue *= 1000; - expect(TimeUnit.MICROSECONDS.convert(1, TimeUnit.MILLISECONDS), expectedValue); - expectedValue *= 1000; - expect(TimeUnit.MICROSECONDS.convert(1, TimeUnit.SECONDS), expectedValue); - expectedValue *= 60; - expect(TimeUnit.MICROSECONDS.convert(1, TimeUnit.MINUTES), expectedValue); - expectedValue *= 60; - expect(TimeUnit.MICROSECONDS.convert(1, TimeUnit.HOURS), expectedValue); - expectedValue *= 24; - expect(TimeUnit.MICROSECONDS.convert(1, TimeUnit.DAYS), expectedValue); - } - - private static void toMilliConversionTest() { - long expectedValue = 1; - expect(TimeUnit.MILLISECONDS.convert(1000L * 1000, TimeUnit.NANOSECONDS), expectedValue); - expect(TimeUnit.MILLISECONDS.convert(1000, TimeUnit.MICROSECONDS), expectedValue); - expect(TimeUnit.MILLISECONDS.convert(1, TimeUnit.MILLISECONDS), expectedValue); - expectedValue *= 1000; - expect(TimeUnit.MILLISECONDS.convert(1, TimeUnit.SECONDS), expectedValue); - expectedValue *= 60; - expect(TimeUnit.MILLISECONDS.convert(1, TimeUnit.MINUTES), expectedValue); - expectedValue *= 60; - expect(TimeUnit.MILLISECONDS.convert(1, TimeUnit.HOURS), expectedValue); - expectedValue *= 24; - expect(TimeUnit.MILLISECONDS.convert(1, TimeUnit.DAYS), expectedValue); - } - - private static void toSecondConversionTest() { - long expectedValue = 1; - expect(TimeUnit.SECONDS.convert(1000L * 1000 * 1000, TimeUnit.NANOSECONDS), expectedValue); - expect(TimeUnit.SECONDS.convert(1000L * 1000, TimeUnit.MICROSECONDS), expectedValue); - expect(TimeUnit.SECONDS.convert(1000, TimeUnit.MILLISECONDS), expectedValue); - expect(TimeUnit.SECONDS.convert(1, TimeUnit.SECONDS), expectedValue); - expectedValue *= 60; - expect(TimeUnit.SECONDS.convert(1, TimeUnit.MINUTES), expectedValue); - expectedValue *= 60; - expect(TimeUnit.SECONDS.convert(1, TimeUnit.HOURS), expectedValue); - expectedValue *= 24; - expect(TimeUnit.SECONDS.convert(1, TimeUnit.DAYS), expectedValue); - } - - private static void toMinuteConversionTest() { - long expectedValue = 1; - expect(TimeUnit.MINUTES.convert(1000L * 1000 * 1000 * 60, TimeUnit.NANOSECONDS), expectedValue); - expect(TimeUnit.MINUTES.convert(1000L * 1000 * 60, TimeUnit.MICROSECONDS), expectedValue); - expect(TimeUnit.MINUTES.convert(1000L * 60, TimeUnit.MILLISECONDS), expectedValue); - expect(TimeUnit.MINUTES.convert(60, TimeUnit.SECONDS), expectedValue); - expect(TimeUnit.MINUTES.convert(1, TimeUnit.MINUTES), expectedValue); - expectedValue *= 60; - expect(TimeUnit.MINUTES.convert(1, TimeUnit.HOURS), expectedValue); - expectedValue *= 24; - expect(TimeUnit.MINUTES.convert(1, TimeUnit.DAYS), expectedValue); - } - - private static void toHourConversionTest() { - long expectedValue = 1; - expect(TimeUnit.HOURS.convert(1000L * 1000 * 1000 * 60 * 60, TimeUnit.NANOSECONDS), expectedValue); - expect(TimeUnit.HOURS.convert(1000L * 1000 * 60 * 60, TimeUnit.MICROSECONDS), expectedValue); - expect(TimeUnit.HOURS.convert(1000L * 60 * 60, TimeUnit.MILLISECONDS), expectedValue); - expect(TimeUnit.HOURS.convert(60L * 60, TimeUnit.SECONDS), expectedValue); - expect(TimeUnit.HOURS.convert(60, TimeUnit.MINUTES), expectedValue); - expect(TimeUnit.HOURS.convert(1, TimeUnit.HOURS), expectedValue); - expectedValue *= 24; - expect(TimeUnit.HOURS.convert(1, TimeUnit.DAYS), expectedValue); - } - - private static void toDayConversionTest() { - long expectedValue = 1; - expect(TimeUnit.DAYS.convert(1000L * 1000 * 1000 * 60 * 60 * 24, TimeUnit.NANOSECONDS), expectedValue); - expect(TimeUnit.DAYS.convert(1000L * 1000 * 60 * 60 * 24, TimeUnit.MICROSECONDS), expectedValue); - expect(TimeUnit.DAYS.convert(1000L * 60 * 60 * 24, TimeUnit.MILLISECONDS), expectedValue); - expect(TimeUnit.DAYS.convert(60L * 60 * 24, TimeUnit.SECONDS), expectedValue); - expect(TimeUnit.DAYS.convert(60L * 24, TimeUnit.MINUTES), expectedValue); - expect(TimeUnit.DAYS.convert(24, TimeUnit.HOURS), expectedValue); - expect(TimeUnit.DAYS.convert(1, TimeUnit.DAYS), expectedValue); - } - - public static void main(String[] args) { - toNanoConversionTest(); - toMicroConversionTest(); - toMilliConversionTest(); - toSecondConversionTest(); - toMinuteConversionTest(); - toHourConversionTest(); - toDayConversionTest(); - } -} diff --git a/sgx-jvm/avian/test/Tree.java b/sgx-jvm/avian/test/Tree.java deleted file mode 100644 index ec7c5cf41f..0000000000 --- a/sgx-jvm/avian/test/Tree.java +++ /dev/null @@ -1,133 +0,0 @@ -import java.util.Comparator; -import java.util.TreeSet; -import java.util.TreeMap; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Map; -import java.util.Iterator; - -public class Tree { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static String printList(TreeSet list) { - StringBuilder sb = new StringBuilder(); - - for (Object o : list) { - sb.append(o); - sb.append(", "); - } - sb.setLength(sb.length()-2); - return sb.toString(); - } - - private static String printMap(TreeMap map) { - StringBuilder sb = new StringBuilder(); - - for (Iterator it = map.entrySet().iterator(); it.hasNext();) { - Map.Entry e = it.next(); - sb.append(e.getKey()); - sb.append("="); - sb.append(e.getValue()); - if (it.hasNext()) { - sb.append(", "); - } - } - return sb.toString(); - } - - private static void isEqual(String s1, String s2) { - System.out.println(s1); - expect(s1.equals(s2)); - } - - private static class MyCompare implements Comparator { - public int compare(Integer o1, Integer o2) { - return o1.compareTo(o2); - } - } - - private static void ascendingIterator() { - TreeSet t = new TreeSet(); - t.add(7); - t.add(2); - t.add(9); - t.add(2); - Iterator iter = t.iterator(); - expect(2 == (int)iter.next()); - expect(7 == (int)iter.next()); - iter.remove(); - expect(9 == (int)iter.next()); - expect(!iter.hasNext()); - isEqual(printList(t), "2, 9"); - } - - private static void descendingIterator() { - TreeSet t = new TreeSet(); - t.add(7); - t.add(2); - t.add(9); - t.add(2); - Iterator iter = t.descendingIterator(); - expect(9 == (int)iter.next()); - expect(7 == (int)iter.next()); - iter.remove(); - expect(2 == (int)iter.next()); - expect(!iter.hasNext()); - isEqual(printList(t), "2, 9"); - } - - public static void main(String args[]) { - ascendingIterator(); - descendingIterator(); - TreeSet t1 = new TreeSet(new MyCompare()); - t1.add(5); t1.add(2); t1.add(1); t1.add(8); t1.add(3); - isEqual(printList(t1), "1, 2, 3, 5, 8"); - t1.add(4); - isEqual(printList(t1), "1, 2, 3, 4, 5, 8"); - t1.remove(3); - isEqual(printList(t1), "1, 2, 4, 5, 8"); - TreeSet t2 = new TreeSet(new Comparator() { - public int compare(String s1, String s2) { - return s1.compareTo(s2); - } - }); - t2.add("one"); t2.add("two"); t2.add("three"); t2.add("four"); t2.add("five"); - isEqual(printList(t2), "five, four, one, three, two"); - for (int i=0; i < 1000; i++) { - t2.add(Integer.toString(i)); - } - expect(t2.size() == 1005); - for (int i=0; i < 999; i++) { - t2.remove(Integer.toString(i)); - } - expect(t2.size() == 6); - t2.add("kappa"); - isEqual(printList(t2), "999, five, four, kappa, one, three, two"); - - TreeMap map = new TreeMap - (new Comparator() { - public int compare(String s1, String s2) { - return s1.compareTo(s2); - } - }); - - map.put("q", "Q"); - map.put("a", "A"); - map.put("b", "B"); - map.put("z", "Z"); - map.put("c", "C"); - map.put("y", "Y"); - - isEqual(printMap(map), "a=A, b=B, c=C, q=Q, y=Y, z=Z"); - - Collection list = new ArrayList(); - list.add(7); - list.add(2); - list.add(9); - list.add(2); - - isEqual(printList(new TreeSet(list)), "2, 7, 9"); - } -} diff --git a/sgx-jvm/avian/test/UnsafeTest.java b/sgx-jvm/avian/test/UnsafeTest.java deleted file mode 100644 index 732c281a4a..0000000000 --- a/sgx-jvm/avian/test/UnsafeTest.java +++ /dev/null @@ -1,171 +0,0 @@ -import sun.misc.Unsafe; - -public class UnsafeTest { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static void unsafeThrow(Unsafe u) { - u.throwException(new Exception()); - } - - private static void unsafeCatch(Unsafe u) { - boolean success = false; - try { - unsafeThrow(u); - } catch(Exception e) { - expect(e.getClass() == Exception.class); - success = true; - } - expect(success); - } - - private static void unsafeMemory(Unsafe u) { - final long size = 64; - long memory = u.allocateMemory(size); - try { - for (int i = 0; i < size; ++i) - u.putByte(memory + i, (byte) 42); - - for (int i = 0; i < size; ++i) - expect(u.getByte(memory + i) == 42); - - for (int i = 0; i < size / 2; ++i) - u.putShort(memory + (i * 2), (short) -12345); - - for (int i = 0; i < size / 2; ++i) - expect(u.getShort(memory + (i * 2)) == -12345); - - for (int i = 0; i < size / 2; ++i) - u.putChar(memory + (i * 2), (char) 23456); - - for (int i = 0; i < size / 2; ++i) - expect(u.getChar(memory + (i * 2)) == 23456); - - for (int i = 0; i < size / 4; ++i) - u.putInt(memory + (i * 4), 0x12345678); - - for (int i = 0; i < size / 4; ++i) - expect(u.getInt(memory + (i * 4)) == 0x12345678); - - for (int i = 0; i < size / 4; ++i) - u.putFloat(memory + (i * 4), 1.2345678F); - - for (int i = 0; i < size / 4; ++i) - expect(u.getFloat(memory + (i * 4)) == 1.2345678F); - - for (int i = 0; i < size / 8; ++i) - u.putLong(memory + (i * 8), 0x1234567890ABCDEFL); - - for (int i = 0; i < size / 8; ++i) - expect(u.getLong(memory + (i * 8)) == 0x1234567890ABCDEFL); - - for (int i = 0; i < size / 8; ++i) - u.putDouble(memory + (i * 8), 1.23456789012345D); - - for (int i = 0; i < size / 8; ++i) - expect(u.getDouble(memory + (i * 8)) == 1.23456789012345D); - - for (int i = 0; i < size / 8; ++i) - u.putAddress(memory + (i * 8), 0x12345678); - - for (int i = 0; i < size / 8; ++i) - expect(u.getAddress(memory + (i * 8)) == 0x12345678); - } finally { - u.freeMemory(memory); - } - } - - private static void unsafeArray(Unsafe u) { - final int offset = u.arrayBaseOffset(long[].class); - final int scale = u.arrayIndexScale(long[].class); - final int size = 64; - final long[] array = new long[size]; - - for (int i = 0; i < size; ++i) - u.putBooleanVolatile(array, offset + (i * scale), i % 2 == 0); - - for (int i = 0; i < size; ++i) - expect(u.getBooleanVolatile(array, offset + (i * scale)) - == (i % 2 == 0)); - - for (int i = 0; i < size; ++i) - u.putByteVolatile(array, offset + (i * scale), (byte) 42); - - for (int i = 0; i < size; ++i) - expect(u.getByteVolatile(array, offset + (i * scale)) == 42); - - for (int i = 0; i < size; ++i) - u.putShortVolatile(array, offset + (i * scale), (short) -12345); - - for (int i = 0; i < size; ++i) - expect(u.getShortVolatile(array, offset + (i * scale)) == -12345); - - for (int i = 0; i < size; ++i) - u.putCharVolatile(array, offset + (i * scale), (char) 23456); - - for (int i = 0; i < size; ++i) - expect(u.getCharVolatile(array, offset + (i * scale)) == 23456); - - for (int i = 0; i < size; ++i) - u.putIntVolatile(array, offset + (i * scale), 0x12345678); - - for (int i = 0; i < size; ++i) - expect(u.getIntVolatile(array, offset + (i * scale)) == 0x12345678); - - for (int i = 0; i < size; ++i) - u.putFloatVolatile(array, offset + (i * scale), 1.2345678F); - - for (int i = 0; i < size; ++i) - expect(u.getFloatVolatile(array, offset + (i * scale)) == 1.2345678F); - - for (int i = 0; i < size; ++i) - u.putLongVolatile(array, offset + (i * scale), 0x1234567890ABCDEFL); - - for (int i = 0; i < size; ++i) - expect(u.getLongVolatile(array, offset + (i * scale)) - == 0x1234567890ABCDEFL); - - for (int i = 0; i < size; ++i) - u.putDoubleVolatile(array, offset + (i * scale), 1.23456789012345D); - - for (int i = 0; i < size; ++i) - expect(u.getDoubleVolatile(array, offset + (i * scale)) - == 1.23456789012345D); - } - - private static class Data { - public long longField; - public double doubleField; - } - - private static void unsafeObject(Unsafe u) throws Exception { - final long longOffset = u.objectFieldOffset - (Data.class.getField("longField")); - - final long doubleOffset = u.objectFieldOffset - (Data.class.getField("doubleField")); - - Data data = new Data(); - - u.putLong(data, longOffset, 0x1234567890ABCDEFL); - - u.putDouble(data, doubleOffset, 1.23456789012345D); - - expect(u.getLong(data, longOffset) == 0x1234567890ABCDEFL); - - expect(u.getDouble(data, doubleOffset) == 1.23456789012345D); - } - - public static void main(String[] args) throws Exception { - System.out.println("method count is " - + Unsafe.class.getDeclaredMethods().length); - - Unsafe u = avian.Machine.getUnsafe(); - - unsafeCatch(u); - unsafeMemory(u); - unsafeArray(u); - unsafeObject(u); - } -} diff --git a/sgx-jvm/avian/test/UrlTest.java b/sgx-jvm/avian/test/UrlTest.java deleted file mode 100644 index 244d1ec45a..0000000000 --- a/sgx-jvm/avian/test/UrlTest.java +++ /dev/null @@ -1,41 +0,0 @@ -import java.net.MalformedURLException; -import java.net.URL; - -public class UrlTest { - private static String query="var1=val1&var2=val2"; - private static String path="/testpath"; - private static String domain="file://www.readytalk.com"; - private static String file=path + "?" + query; - private static URL url; - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static void setupURL() throws MalformedURLException { - StringBuilder builder = new StringBuilder(); - builder.append(domain); - builder.append(file); - url = new URL(builder.toString()); - } - - private static void testGetPath() { - expect(url.getPath().equals(path)); - } - - private static void testGetFile() { - expect(url.getFile().equals(file)); - } - - private static void testGetQuery() { - expect(url.getQuery().equals(query)); - } - - public static void main(String[] args) throws MalformedURLException { - setupURL(); - testGetPath(); - testGetFile(); - testGetQuery(); - } - -} diff --git a/sgx-jvm/avian/test/Zip.java b/sgx-jvm/avian/test/Zip.java deleted file mode 100644 index 36d08b6ca2..0000000000 --- a/sgx-jvm/avian/test/Zip.java +++ /dev/null @@ -1,53 +0,0 @@ -import java.io.InputStream; -import java.io.File; -import java.util.Enumeration; -import java.util.zip.ZipFile; -import java.util.zip.ZipEntry; - -public class Zip { - - private static String findJar(File directory) { - for (File file: directory.listFiles()) { - if (file.isFile()) { - if (file.getName().endsWith(".jar")) { - System.out.println - ("found " + file.getAbsolutePath() + " length " + file.length()); - - return file.getAbsolutePath(); - } - } else if (file.isDirectory()) { - String result = findJar(file); - if (result != null) { - return result; - } - } - } - return null; - } - - public static void main(String[] args) throws Exception { - ZipFile file = new ZipFile - (findJar(new File(System.getProperty("user.dir")))); - - try { - byte[] buffer = new byte[4096]; - for (Enumeration e = file.entries(); - e.hasMoreElements();) - { - ZipEntry entry = e.nextElement(); - InputStream in = file.getInputStream(entry); - try { - int size = 0; - int c; while ((c = in.read(buffer)) != -1) size += c; - System.out.println - (entry.getName() + " " + entry.getCompressedSize() + " " + size); - } finally { - in.close(); - } - } - } finally { - file.close(); - } - } - -} diff --git a/sgx-jvm/avian/test/avian/TestReflection.java b/sgx-jvm/avian/test/avian/TestReflection.java deleted file mode 100644 index 7b17dff52b..0000000000 --- a/sgx-jvm/avian/test/avian/TestReflection.java +++ /dev/null @@ -1,9 +0,0 @@ -package avian; - -import java.lang.reflect.Field; - -public class TestReflection { - public static Object get(Field field, Object target) throws Exception { - return field.get(target); - } -} diff --git a/sgx-jvm/avian/test/avian/testing/Asserts.java b/sgx-jvm/avian/test/avian/testing/Asserts.java deleted file mode 100644 index ed0ce5ec95..0000000000 --- a/sgx-jvm/avian/test/avian/testing/Asserts.java +++ /dev/null @@ -1,67 +0,0 @@ -package avian.testing; - -import java.util.Collection; - -public class Asserts { - - public static void assertEquals(byte first, byte second) { - if(first != second) { - throw new RuntimeException(first+" is not equals to: "+second); - } - } - - public static void assertEquals(short first, short second) { - if(first != second) { - throw new RuntimeException(first+" is not equals to: "+second); - } - } - - public static void assertEquals(int first, int second) { - if(first != second) { - throw new RuntimeException(first+" is not equals to: "+second); - } - } - - public static void assertEquals(long first, long second) { - if(first != second) { - throw new RuntimeException(first+" is not equals to: "+second); - } - } - - public static void assertEquals(float first, float second) { - if(first != second) { - throw new RuntimeException(first+" is not equals to: "+second); - } - } - - public static void assertEquals(double first, double second) { - if(first != second) { - throw new RuntimeException(first+" is not equals to: "+second); - } - } - - - - - - public static void assertEquals(Object first, Object second) { - if(first == null && second == null) { - return; - } - if(!first.equals(second)) { - throw new RuntimeException(first+" is not equals to: "+second); - } - } - - public static void assertTrue(boolean flag) { - if (!flag) { - throw new RuntimeException("Error: "+flag+" is not True"); - } - } - - public static void assertContains(Enum element, Collection collection) { - if (!collection.contains(element)) { - throw new RuntimeException("expected " + element + " in the collection:"+collection); - } - } -} diff --git a/sgx-jvm/avian/test/avian/testing/annotations/Color.java b/sgx-jvm/avian/test/avian/testing/annotations/Color.java deleted file mode 100644 index f054b0420a..0000000000 --- a/sgx-jvm/avian/test/avian/testing/annotations/Color.java +++ /dev/null @@ -1,5 +0,0 @@ -package avian.testing.annotations; - -public enum Color { - Red, Yellow, Blue -} \ No newline at end of file diff --git a/sgx-jvm/avian/test/avian/testing/annotations/Test.java b/sgx-jvm/avian/test/avian/testing/annotations/Test.java deleted file mode 100644 index 24b8229480..0000000000 --- a/sgx-jvm/avian/test/avian/testing/annotations/Test.java +++ /dev/null @@ -1,9 +0,0 @@ -package avian.testing.annotations; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface Test { - public String value() default "Hello, world!"; -} diff --git a/sgx-jvm/avian/test/avian/testing/annotations/TestComplex.java b/sgx-jvm/avian/test/avian/testing/annotations/TestComplex.java deleted file mode 100644 index 4e271cc9d9..0000000000 --- a/sgx-jvm/avian/test/avian/testing/annotations/TestComplex.java +++ /dev/null @@ -1,14 +0,0 @@ -package avian.testing.annotations; - -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface TestComplex { - public Test[] arrayValue(); - public Class classValue(); - public String stringValue(); - public char charValue(); - public double doubleValue(); -} - diff --git a/sgx-jvm/avian/test/avian/testing/annotations/TestEnum.java b/sgx-jvm/avian/test/avian/testing/annotations/TestEnum.java deleted file mode 100644 index f8a252fd54..0000000000 --- a/sgx-jvm/avian/test/avian/testing/annotations/TestEnum.java +++ /dev/null @@ -1,8 +0,0 @@ -package avian.testing.annotations; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface TestEnum { - public Color value(); -} \ No newline at end of file diff --git a/sgx-jvm/avian/test/avian/testing/annotations/TestInteger.java b/sgx-jvm/avian/test/avian/testing/annotations/TestInteger.java deleted file mode 100644 index b7ec78d0bc..0000000000 --- a/sgx-jvm/avian/test/avian/testing/annotations/TestInteger.java +++ /dev/null @@ -1,8 +0,0 @@ -package avian.testing.annotations; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; - -@Retention(RetentionPolicy.RUNTIME) -public @interface TestInteger { - public int value(); -} \ No newline at end of file diff --git a/sgx-jvm/avian/test/ci.sh b/sgx-jvm/avian/test/ci.sh deleted file mode 100755 index 5ca24ed83b..0000000000 --- a/sgx-jvm/avian/test/ci.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env bash - -set -eo pipefail - -root_dir=$(pwd) - -flags="use-werror=true ${@}" - -is-mac() { - if [[ $(uname -s) == "Darwin" || ${TRAVIS_OS_NAME} == "osx" ]]; then - return 0 - fi - return 1 -} - -install-deps() { - if is-mac; then - echo "------ Installing dependencies for Mac ------" - else - echo "------ Installing dependencies for Linux ------" - sudo apt-get update -qq - sudo apt-get install -y libc6-dev-i386 mingw-w64 gcc-mingw-w64-x86-64 g++-mingw-w64-i686 binutils-mingw-w64-x86-64 lib32z1-dev zlib1g-dev g++-mingw-w64-x86-64 - fi -} - -run() { - echo '===============================================' - if [ ! $(pwd) = ${root_dir} ]; then - printf "cd $(pwd); " - fi - echo "${@}" - echo '===============================================' - "${@}" -} - -run_cmake() { - mkdir -p cmake-build - rm -rf cmake-build/* - cd cmake-build - run cmake ${@} .. - run make -j4 check - cd .. -} - -publish() { - local platforms="${1}" - local arches="${2}" - - local platform - for platform in ${platforms}; do - local arch - for arch in ${arches}; do - echo "------ Publishing ${platform}-${arch} ------" - ./gradlew artifactoryPublish -Pplatform=${platform} -Parch=${arch} - done - done -} - -has_flag() { - local arg=${1} - - local f - for f in ${flags}; do - local key=$(echo $f | awk -F '=' '{print $1}') - if [ ${key} = ${arg} ]; then - return 0 - fi - done - return 1 -} - -### START ### - -echo "java version:" -${JAVA_HOME}/bin/java -version - -install-deps - -if [[ "${1}" == "PUBLISH" ]]; then - if is-mac; then - publish "macosx" "i386 x86_64" - elif [[ $(uname -s) == "Linux" ]]; then - publish "linux windows" "i386 x86_64" - fi -else - if [[ $(uname -o) != "Cygwin" ]]; then - run_cmake -DCMAKE_BUILD_TYPE=Debug - fi - - make_target=test - - if ! has_flag arch; then - run make ${flags} jdk-test - fi - - run make ${flags} ${make_target} - run make ${flags} mode=debug ${make_target} - run make ${flags} process=interpret ${make_target} - - if has_flag openjdk-src || ! has_flag openjdk; then - run make ${flags} mode=debug bootimage=true ${make_target} - run make ${flags} bootimage=true ${make_target} - run make ${flags} bootimage=true bootimage-test=true ${make_target} - fi - - if ! has_flag openjdk && ! has_flag android && ! has_flag arch; then - run make ${flags} openjdk=$JAVA_HOME ${make_target} - fi - - run make ${flags} tails=true continuations=true heapdump=true ${make_target} - run make ${flags} codegen-targets=all -fi diff --git a/sgx-jvm/avian/test/extra/ComposableContinuations.java b/sgx-jvm/avian/test/extra/ComposableContinuations.java deleted file mode 100644 index d33d39693b..0000000000 --- a/sgx-jvm/avian/test/extra/ComposableContinuations.java +++ /dev/null @@ -1,93 +0,0 @@ -package extra; - -import static avian.Continuations.shift; -import static avian.Cell.cons; -import static avian.Cell.equal; - -import avian.Cell; -import avian.Function; -import avian.Continuations; - -import java.util.concurrent.Callable; - -public class ComposableContinuations { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) throws Exception { - expect(2 * Continuations.reset(new Callable() { - public Integer call() throws Exception { - return 1 + shift - (new Function,Integer>() { - public Integer call(Function continuation) - throws Exception - { - return continuation.call(5); - } - }); - } - }) == 12); - - expect(1 + Continuations.reset(new Callable() { - public Integer call() throws Exception { - return 2 * shift - (new Function,Integer>() { - public Integer call(Function continuation) - throws Exception - { - return continuation.call(continuation.call(4)); - } - }); - } - }) == 17); - - expect - (equal - (Continuations.,Cell>reset - (new Callable>() { - public Cell call() throws Exception { - shift(new Function,Cell>, - Cell>() - { - public Cell call - (Function,Cell> continuation) - throws Exception - { - return cons(1, continuation.call(null)); - } - }); - - shift(new Function,Cell>, - Cell>() - { - public Cell call - (Function,Cell> continuation) - throws Exception - { - return cons(2, continuation.call(null)); - } - }); - - return null; - } - }), cons(1, cons(2, null)))); - - expect - (equal - (Continuations.reset - (new Callable() { - public String call() throws Exception { - return new String - (shift(new Function,Integer>() { - public Integer call(Function continuation) - throws Exception - { - return Integer.parseInt - (continuation.call(new byte[] { 0x34, 0x32 })); - } - }), "UTF-8"); - } - }), 42)); - } -} diff --git a/sgx-jvm/avian/test/extra/Continuations.java b/sgx-jvm/avian/test/extra/Continuations.java deleted file mode 100644 index 1186c43a4a..0000000000 --- a/sgx-jvm/avian/test/extra/Continuations.java +++ /dev/null @@ -1,58 +0,0 @@ -package extra; - -import static avian.Continuations.callWithCurrentContinuation; - -import avian.Function; -import avian.Callback; - -public class Continuations { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - public static void main(String[] args) throws Exception { - expect - (callWithCurrentContinuation - (new Function,Integer>() { - public Integer call(Callback continuation) { - continuation.handleResult(42); - throw new AssertionError(); - } - }) == 42); - - expect - (callWithCurrentContinuation - (new Function,Integer>() { - public Integer call(Callback continuation) { - return 43; - } - }) == 43); - - try { - callWithCurrentContinuation(new Function,Integer>() { - public Integer call(Callback continuation) { - continuation.handleException(new MyException()); - throw new AssertionError(); - } - }); - throw new AssertionError(); - } catch (MyException e) { - e.printStackTrace(); - } - - try { - callWithCurrentContinuation(new Function,Integer>() { - public Integer call(Callback continuation) - throws MyException - { - throw new MyException(); - } - }); - throw new AssertionError(); - } catch (MyException e) { - e.printStackTrace(); - } - } - - private static class MyException extends Exception { } -} diff --git a/sgx-jvm/avian/test/extra/Coroutines.java b/sgx-jvm/avian/test/extra/Coroutines.java deleted file mode 100644 index 3afd2dce73..0000000000 --- a/sgx-jvm/avian/test/extra/Coroutines.java +++ /dev/null @@ -1,93 +0,0 @@ -package extra; - -import static avian.Continuations.callWithCurrentContinuation; - -import avian.Function; -import avian.Callback; - -public class Coroutines { - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static void produce(Consumer consumer) throws Exception { - System.out.println("produce \"a\""); - consumer.consume('a'); - - System.out.println("produce \"b\""); - consumer.consume('b'); - - System.out.println("produce \"c\""); - consumer.consume('c'); - } - - private static void consume(Producer producer) throws Exception { - char v = producer.produce(); - System.out.println("consume \"" + v + "\""); - expect(v == 'a'); - - v = producer.produce(); - System.out.println("consume \"" + v + "\""); - expect(v == 'b'); - - v = producer.produce(); - System.out.println("consume \"" + v + "\""); - expect(v == 'c'); - } - - public static void main(String[] args) throws Exception { - final CoroutineState state = new CoroutineState(); - - final Consumer consumer = new Consumer() { - public void consume(final Character c) throws Exception { - callWithCurrentContinuation(new Function,Object>() { - public Object call(Callback continuation) { - state.produceNext = continuation; - - state.consumeNext.handleResult(c); - - throw new AssertionError(); - } - }); - } - }; - - final Producer producer = new Producer() { - final Function,Character> receiver - = new Function,Character>() { - public Character call(Callback continuation) - throws Exception - { - state.consumeNext = continuation; - - if (state.produceNext == null) { - Coroutines.produce(consumer); - } else { - state.produceNext.handleResult(null); - } - - throw new AssertionError(); - } - }; - - public Character produce() throws Exception { - return callWithCurrentContinuation(receiver); - } - }; - - consume(producer); - } - - private static class CoroutineState { - public Callback produceNext; - public Callback consumeNext; - } - - private interface Producer { - public T produce() throws Exception; - } - - private interface Consumer { - public void consume(T value) throws Exception; - } -} diff --git a/sgx-jvm/avian/test/extra/DumpStats.java b/sgx-jvm/avian/test/extra/DumpStats.java deleted file mode 100644 index 4a28b3790e..0000000000 --- a/sgx-jvm/avian/test/extra/DumpStats.java +++ /dev/null @@ -1,159 +0,0 @@ -package extra; - -import java.io.PrintStream; -import java.io.InputStream; -import java.io.FileInputStream; -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.EOFException; -import java.util.Map; -import java.util.HashMap; -import java.util.Comparator; -import java.util.Arrays; - -/** - * This is a simple utility to generate and print statistics from a - * heap dump generated by Avian's heapdump.cpp. The output is a list - * of classes (identified by number in the case of anonymous, - * VM-internal classes), each followed by (1) the total memory - * footprint of all instances of the class in machine words, and (2) - * the number of instances. The output is ordered by instance memory - * footprint. - */ -public class DumpStats { - private static final int Root = 0; - private static final int Size = 1; - private static final int ClassName = 2; - private static final int Push = 3; - private static final int Pop = 4; - - private static int readInt(InputStream in) throws IOException { - int b1 = in.read(); - int b2 = in.read(); - int b3 = in.read(); - int b4 = in.read(); - if (b4 == -1) throw new EOFException(); - return (int) ((b1 << 24) | (b2 << 16) | (b3 << 8) | (b4)); - } - - private static String readString(InputStream in) throws IOException { - int count = readInt(in); - byte[] b = new byte[count]; - int offset = 0; - int c; - while ((c = in.read(b, offset, b.length - offset)) != -1 - && offset < b.length) - { - offset += c; - } - if (offset != b.length) throw new EOFException(); - return new String(b, "UTF-8"); - } - - private static Record record(Map map, int key) { - Record r = map.get(key); - if (r == null) { - map.put(key, r = new Record(key)); - } - return r; - } - - private static Map read(InputStream in) - throws IOException - { - boolean done = false; - boolean popped = false; - int size = 0; - int last = 0; - Map map = new HashMap(); - - while (! done) { - int flag = in.read(); - switch (flag) { - case Root: { - last = readInt(in); - popped = false; - } break; - - case ClassName: { - record(map, last).name = readString(in); - } break; - - case Push: { - last = readInt(in); - if (! popped) { - Record r = record(map, last); - r.footprint += size; - ++ r.count; - } - popped = false; - } break; - - case Pop: { - popped = true; - } break; - - case Size: { - size = readInt(in); - } break; - - case -1: - done = true; - break; - - default: - throw new RuntimeException("bad flag: " + flag); - } - } - - return map; - } - - private static void usageAndExit() { - System.err.println("usage: java DumpStats "); - } - - public static void main(String[] args) throws Exception { - if (args.length != 2) { - usageAndExit(); - } - - Map map = read - (new BufferedInputStream(new FileInputStream(args[0]))); - - Record[] array = map.values().toArray(new Record[map.size()]); - Arrays.sort(array, new Comparator() { - public int compare(Record a, Record b) { - return b.footprint - a.footprint; - } - }); - - int wordSize = Integer.parseInt(args[1]); - - int footprint = 0; - int count = 0; - for (Record r: array) { - if (r.name == null) { - r.name = String.valueOf(r.key); - } - System.out.println - (r.name + ": " + (r.footprint * wordSize) + " " + r.count); - footprint += r.footprint; - count += r.count; - } - - System.out.println(); - System.out.println("total: " + (footprint * wordSize) + " " + count); - } - - private static class Record { - public final int key; - public String name; - public int footprint; - public int count; - - public Record(int key) { - this.key = key; - } - } -} diff --git a/sgx-jvm/avian/test/extra/DynamicWind.java b/sgx-jvm/avian/test/extra/DynamicWind.java deleted file mode 100644 index bbc305842c..0000000000 --- a/sgx-jvm/avian/test/extra/DynamicWind.java +++ /dev/null @@ -1,338 +0,0 @@ -package extra; - -import static avian.Continuations.callWithCurrentContinuation; -import static avian.Continuations.dynamicWind; - -import avian.Function; -import avian.Callback; - -import java.util.concurrent.Callable; - -public class DynamicWind { - private int before; - private int task; - private int after; - private int continuationCount; - private Callback continuationReference; - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private void unwindTest(final Callable unwind) throws Exception { - System.out.println("unwindTest enter"); - - try { - expect(dynamicWind(new Runnable() { - public void run() { - System.out.println("unwindTest before"); - - expect(before == 0); - expect(task == 0); - expect(after == 0); - - before = 1; - } - }, new Callable() { - public Integer call() throws Exception { - System.out.println("unwindTest thunk"); - - expect(before == 1); - expect(task == 0); - expect(after == 0); - - task = 1; - - return unwind.call(); - } - }, - new Runnable() { - public void run() { - System.out.println("unwindTest after"); - - expect(before == 1); - expect(task == 1); - expect(after == 0); - - after = 1; - } - }) == 42); - } catch (MyException e) { - e.printStackTrace(); - } - - System.out.println("unwindTest expect"); - - expect(before == 1); - expect(task == 1); - expect(after == 1); - - System.out.println("unwindTest exit"); - } - - private void normalUnwind() throws Exception { - unwindTest(new Callable() { - public Integer call() { - return 42; - } - }); - } - - private void exceptionUnwind() throws Exception { - unwindTest(new Callable() { - public Integer call() throws Exception { - throw new MyException(); - } - }); - } - - private void continuationUnwindTest - (final Function,Integer> receiver) - throws Exception - { - System.out.println("continuationUnwindTest enter"); - - try { - expect - (callWithCurrentContinuation - (new Function,Integer>() { - public Integer call(final Callback continuation) - throws Exception - { - unwindTest(new Callable() { - public Integer call() throws Exception { - return receiver.call(continuation); - } - }); - throw new AssertionError(); - } - }) == 42); - } catch (MyException e) { - e.printStackTrace(); - } - - System.out.println("continuationUnwindTest expect"); - - expect(before == 1); - expect(task == 1); - expect(after == 1); - - System.out.println("continuationUnwindTest exit"); - } - - private void continuationResultUnwind() throws Exception { - continuationUnwindTest(new Function,Integer>() { - public Integer call(final Callback continuation) { - continuation.handleResult(42); - throw new AssertionError(); - } - }); - } - - private void continuationExceptionUnwind() throws Exception { - continuationUnwindTest(new Function,Integer>() { - public Integer call(final Callback continuation) { - continuation.handleException(new MyException()); - throw new AssertionError(); - } - }); - } - - private void rewindTest(final Callable unwind, Runnable rewind) - throws Exception - { - System.out.println("rewindTest enter"); - - int value; - try { - value = dynamicWind(new Runnable() { - public void run() { - System.out.println("rewindTest before"); - - expect(before == continuationCount); - expect(task == continuationCount); - expect(after == continuationCount); - - ++ before; - } - }, new Callable() { - public Integer call() throws Exception { - System.out.println("rewindTest thunk"); - - expect(before == 1); - expect(task == 0); - expect(after == 0); - - task = 1; - - return callWithCurrentContinuation - (new Function,Integer>() { - public Integer call(final Callback continuation) - throws Exception - { - continuationReference = continuation; - return unwind.call(); - } - }); - } - }, new Runnable() { - public void run() { - System.out.println("rewindTest after"); - - expect(before == continuationCount + 1); - expect(task == 1); - expect(after == continuationCount); - - ++ after; - } - }); - } catch (MyException e) { - value = e.value; - } - - System.out.println("rewindTest expect"); - - expect(value == continuationCount); - - if (value == 0) { - System.out.println("rewindTest expect 0"); - - expect(before == 1); - expect(task == 1); - expect(after == 1); - - continuationCount = 1; - rewind.run(); - throw new AssertionError(); - } else { - System.out.println("rewindTest expect 1"); - - expect(value == 1); - expect(before == 2); - expect(task == 1); - expect(after == 2); - } - - System.out.println("rewindTest exit"); - } - - private void continuationResultRewind() throws Exception { - rewindTest(new Callable() { - public Integer call() { - return 0; - } - }, new Runnable() { - public void run() { - continuationReference.handleResult(1); - } - }); - } - - private void continuationExceptionRewind() throws Exception { - rewindTest(new Callable() { - public Integer call() throws Exception { - throw new MyException(0); - } - }, new Runnable() { - public void run() { - continuationReference.handleException(new MyException(1)); - } - }); - } - - private void continuationResultUnwindAndRewind() throws Exception { - rewindTest(new Callable() { - public Integer call() { - return 0; - } - }, new Runnable() { - public void run() { - try { - new DynamicWind().unwindTest(new Callable() { - public Integer call() { - continuationReference.handleResult(1); - throw new AssertionError(); - } - }); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - }); - } - - private void continuationExceptionUnwindAndRewind() throws Exception { - rewindTest(new Callable() { - public Integer call() throws Exception { - throw new MyException(0); - } - }, new Runnable() { - public void run() { - try { - new DynamicWind().unwindTest(new Callable() { - public Integer call() { - continuationReference.handleException(new MyException(1)); - throw new AssertionError(); - } - }); - } catch (Exception e) { - throw new RuntimeException(e); - } - } - }); - } - - private void continuationResultUnwindAndRewindWithShared() throws Exception { - unwindTest(new Callable() { - public Integer call() throws Exception { - new DynamicWind().continuationResultUnwindAndRewind(); - return 42; - } - }); - } - - private void continuationExceptionUnwindAndRewindWithShared() - throws Exception - { - unwindTest(new Callable() { - public Integer call() throws Exception { - new DynamicWind().continuationExceptionUnwindAndRewind(); - return 42; - } - }); - } - - public static void main(String[] args) throws Exception { - new DynamicWind().normalUnwind(); - - new DynamicWind().exceptionUnwind(); - - new DynamicWind().continuationResultUnwind(); - - new DynamicWind().continuationExceptionUnwind(); - - new DynamicWind().continuationResultRewind(); - - new DynamicWind().continuationExceptionRewind(); - - new DynamicWind().continuationResultUnwindAndRewind(); - - new DynamicWind().continuationExceptionUnwindAndRewind(); - - new DynamicWind().continuationResultUnwindAndRewindWithShared(); - - new DynamicWind().continuationExceptionUnwindAndRewindWithShared(); - } - - private static class MyException extends Exception { - public final int value; - - public MyException() { - this(0); - } - - public MyException(int value) { - this.value = value; - } - } -} diff --git a/sgx-jvm/avian/test/extra/Memory.java b/sgx-jvm/avian/test/extra/Memory.java deleted file mode 100644 index b2e8cfbfea..0000000000 --- a/sgx-jvm/avian/test/extra/Memory.java +++ /dev/null @@ -1,172 +0,0 @@ -package extra; - -import java.util.Collection; -import java.util.Comparator; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.TreeSet; - -public class Memory { - private static final int ITERATION_COUNT=1; - - private static class Item { - private static int instanceCount=0; - private final int index; - private final int val; - public Item(int i) { val = i; index = instanceCount++; } - public int value() { return val; } - public int index() { return index; } - } - - private static void traceFunc(String s) { - if (false) { - System.out.println(s); - } - } - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static int runningSum(Item[] items) { - int sum=0; - for (Item item : items) { - sum += item.value(); - } - return sum; - } - - private static int runningSum(Collection items) { - int sum=0; - for (Item item : items) { - sum += item.value(); - } - return sum; - } - - private static final void testArray() { - traceFunc("testArray()"); - Item[] items = new Item[1750]; - - for (int iter=0; iter < ITERATION_COUNT; iter++) { - for (int i=0; i < 1000; i++) { - items[i] = new Item(1); - } - for (int i=0; i < 500; i++) { - items[i+1000] = new Item(4); - } - for (int i=0; i < 250; i++) { - items[i+1500] = new Item(9); - } - expect(runningSum(items) == (1000*1 + 500*4 + 250*9)); - Item[] zeroItems = new Item[300]; - for (int i=0; i < 300; i++) { - zeroItems[i] = new Item(0); - } - System.arraycopy(zeroItems, 0, items, 900, zeroItems.length); - for (int i=0; i < 10000; i++) { - items[0] = new Item(1); - } - expect(runningSum(items) == (900*1 + 300*4 + 250*9)); - for (int i=0; i < 300; i++) { - zeroItems[i] = new Item((i+900) < 1000 ? 1 : 4); - } - for (int i=0; i < 10000; i++) { - items[0] = new Item(1); - } - expect(runningSum(items) == (900*1 + 300*4 + 250*9)); - System.arraycopy(zeroItems, 0, items, 900, zeroItems.length); - expect(runningSum(items) == (1000*1 + 500*4 + 250*9)); - for (int i=0; i < 1750; i++) { - items[i] = null; - } - } - } - - private static final void testHashMap() { - traceFunc("testHashMap()"); - HashMap items = new HashMap(); - for (int iter=0; iter < ITERATION_COUNT; iter++) { - for (int i=0; i < 1000; i++) { - items.put(i, new Item(1)); - } - for (int i=0; i < 500; i++) { - items.put(i+1000, new Item(4)); - } - for (int i=0; i < 250; i++) { - items.put(i+1500, new Item(9)); - } - expect(runningSum(items.values()) == (1000*1 + 500*4 + 250*9)); - for (int i = 900; i < 1200; i++) { - items.remove(i); - } - expect(runningSum(items.values()) == (900*1 + 300*4 + 250*9)); - for (int i = 900; i < 1200; i++) { - items.put(i, new Item(i < 1000 ? 1 : 4)); - } - expect(runningSum(items.values()) == (1000*1 + 500*4 + 250*9)); - items.clear(); - } - } - - private static final void testLinkedList() { - traceFunc("testLinkedList()"); - LinkedList items = new LinkedList(); - for (int iter=0; iter < ITERATION_COUNT; iter++) { - for (int i=0; i < 1000; i++) { - items.add(new Item(1)); - } - for (int i=0; i < 500; i++) { - items.add(new Item(4)); - } - for (int i=0; i < 250; i++) { - items.add(new Item(9)); - } - expect(runningSum(items) == (1000*1 + 500*4 + 250*9)); - for (int i = 1199; i >= 900; i--) { - items.remove(i); - } - expect(runningSum(items) == (900*1 + 300*4 + 250*9)); - for (int i = 900; i < 1200; i++) { - items.add(new Item(i < 1000 ? 1 : 4)); - } - expect(runningSum(items) == (1000*1 + 500*4 + 250*9)); - items.clear(); - } - } - - private static final void testTreeSet() { - traceFunc("testTreeSet()"); - TreeSet items = new TreeSet(new Comparator() { - public int compare(Item i1, Item i2) { - int r = i1.value() - i2.value(); - if (r == 0) { - return i1.index() - i2.index(); - } - return r; - } - }); - for (int iter=0; iter < ITERATION_COUNT; iter++) { - for (int i=0; i < 1000; i++) { - items.add(new Item(1)); - } - for (int i=0; i < 500; i++) { - items.add(new Item(4)); - } - for (int i=0; i < 250; i++) { - items.add(new Item(9)); - } - expect(runningSum(items) == (1000*1 + 500*4 + 250*9)); - items.clear(); - } - } - - public static void main(String args[]) { - for (int i=0; i < 10; i++) { - testArray(); - testHashMap(); - testLinkedList(); - testTreeSet(); - } - } -} diff --git a/sgx-jvm/avian/test/extra/PrintDump.java b/sgx-jvm/avian/test/extra/PrintDump.java deleted file mode 100644 index 059bef8241..0000000000 --- a/sgx-jvm/avian/test/extra/PrintDump.java +++ /dev/null @@ -1,101 +0,0 @@ -package extra; - -import java.io.PrintStream; -import java.io.InputStream; -import java.io.FileInputStream; -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.EOFException; - -/** - * This is a simple utility to print the contents of a heap dump - * generated by Avian's heapdump.cpp in a human-readable format. - */ -public class PrintDump { - private static final int Root = 0; - private static final int Size = 1; - private static final int ClassName = 2; - private static final int Push = 3; - private static final int Pop = 4; - - private static void indent(PrintStream out, int level) { - for (; level > 0; --level) out.print(" "); - } - - private static int readInt(InputStream in) throws IOException { - int b1 = in.read(); - int b2 = in.read(); - int b3 = in.read(); - int b4 = in.read(); - if (b4 == -1) throw new EOFException(); - return (int) ((b1 << 24) | (b2 << 16) | (b3 << 8) | (b4)); - } - - private static String readString(InputStream in) throws IOException { - int count = readInt(in); - byte[] b = new byte[count]; - int offset = 0; - int c; - while ((c = in.read(b, offset, b.length - offset)) != -1 - && offset < b.length) - { - offset += c; - } - if (offset != b.length) throw new EOFException(); - return new String(b, "UTF-8"); - } - - private static void pipe(InputStream in, PrintStream out) - throws IOException - { - boolean done = false; - boolean popped = false; - int level = 0; - while (! done) { - int flag = in.read(); - switch (flag) { - case Root: { - out.print("\nroot " + readInt(in)); - popped = false; - } break; - - case ClassName: { - out.print(" class " + readString(in)); - } break; - - case Push: { - ++ level; - out.println(); - indent(out, level); - if (! popped) { - out.print("first "); - } - out.print("child " + readInt(in)); - popped = false; - } break; - - case Pop: { - -- level; - popped = true; - } break; - - case Size: { - out.print(" size " + readInt(in)); - } break; - - case -1: - out.println(); - out.flush(); - done = true; - break; - - default: - throw new RuntimeException("bad flag: " + flag); - } - } - } - - public static void main(String[] args) throws Exception { - pipe(new BufferedInputStream(new FileInputStream(args[0])), System.out); - } -} diff --git a/sgx-jvm/avian/test/extra/QueryDump.java b/sgx-jvm/avian/test/extra/QueryDump.java deleted file mode 100644 index d565f5b422..0000000000 --- a/sgx-jvm/avian/test/extra/QueryDump.java +++ /dev/null @@ -1,358 +0,0 @@ -package extra; - -import java.io.PrintStream; -import java.io.InputStream; -import java.io.FileInputStream; -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.EOFException; -import java.util.Set; -import java.util.HashSet; -import java.util.Map; -import java.util.HashMap; -import java.util.Comparator; -import java.util.Arrays; -import java.util.List; -import java.util.ArrayList; -import java.util.Iterator; - -public class QueryDump { - private static final int Root = 0; - private static final int Size = 1; - private static final int ClassName = 2; - private static final int Push = 3; - private static final int Pop = 4; - - private static int readInt(InputStream in) throws IOException { - int b1 = in.read(); - int b2 = in.read(); - int b3 = in.read(); - int b4 = in.read(); - if (b4 == -1) throw new EOFException(); - return (int) ((b1 << 24) | (b2 << 16) | (b3 << 8) | (b4)); - } - - private static String readString(InputStream in) throws IOException { - int count = readInt(in); - byte[] b = new byte[count]; - int offset = 0; - int c; - while ((c = in.read(b, offset, b.length - offset)) != -1 - && offset < b.length) - { - offset += c; - } - if (offset != b.length) throw new EOFException(); - return new String(b, "UTF-8"); - } - - private static Record record(Map map, int key) { - Record r = map.get(key); - if (r == null) { - map.put(key, r = new Record(key)); - } - return r; - } - - private static void push(List stack, T value) { - stack.add(value); - } - - private static T pop(List stack) { - return stack.remove(stack.size() - 1); - } - - private static T peek(List stack, int offset) { - return stack.get(stack.size() - 1 - offset); - } - - private static T peek(List stack) { - return peek(stack, 0); - } - - private static Set nodes(Record record) { - if (record.nodes == null) { - record.nodes = new HashSet(2); - } - return record.nodes; - } - - private static void query(Map nodes, Record[] query, - List stack, int index) - { - Node node = nodes.get(peek(stack, index).key); - if (node != null) { - int base = node.index(); - for (int i = base + 1; i < query.length; ++i) { - int peek = index + i - base; - if (peek < stack.size()) { - Instance instance = peek(stack, peek); - if (query[i] == instance.record) { - TreeNode next = (TreeNode) nodes.get(instance); - if (next == null) { - nodes.put(instance.key, next = new TreeNode(instance, i)); - } - next.children.add(node); - node = next; - } else { - return; - } - } else { - return; - } - } - - if (index + query.length - base < stack.size()) { - nodes(peek(stack, index + query.length - base).record).add(node); - } - } - } - - private static void query(Map nodes, Record[] query, - List stack) - { - if (stack.size() > 1) { - Instance instance = peek(stack, 1); - if (instance != null && instance.record == query[0]) { - Node node = nodes.get(instance.key); - if (node == null) { - nodes.put(instance.key, new LeafNode(instance)); - query(nodes, query, stack, 1); - } - return; - } - } - - query(nodes, query, stack, 0); - } - - private static Map read(InputStream in, - String[] queryClasses) - throws IOException - { - boolean done = false; - boolean popped = false; - Map records = new HashMap(); - Map nodes = new HashMap(); - List stack = new ArrayList(); - Record[] query = new Record[queryClasses.length]; - - Record roots = new Record(-1, ""); - records.put(roots.key, roots); - - while (! done) { - int flag = in.read(); - switch (flag) { - case Root: { - stack.clear(); - push(stack, new Instance(readInt(in))); - - query(nodes, query, stack); - - popped = false; - // System.out.println("root " + last); - } break; - - case ClassName: { - String name = readString(in); - Record r = record(records, peek(stack).key); - r.name = name; - - for (int i = 0; i < queryClasses.length; ++i) { - if (queryClasses[i].equals(name)) { - query[i] = r; - } - } - - query(nodes, query, stack); - } break; - - case Push: { - int key = readInt(in); - - if (! popped) { - peek(stack).record = record(records, key); - } - - push(stack, new Instance(key)); - - query(nodes, query, stack); - - popped = false; - } break; - - case Pop: { - pop(stack); - - popped = true; - } break; - - case Size: { - peek(stack).size = readInt(in); - } break; - - case -1: - done = true; - break; - - default: - throw new RuntimeException("bad flag: " + flag); - } - } - - return records; - } - - private static String[] copy(String[] array, int offset, int length) { - String[] copy = new String[length]; - if (length > 0) { - System.arraycopy(array, offset, copy, 0, length); - } - - return copy; - } - - private static void visitLeaves(Set nodes, LeafVisitor visitor) { - for (Node n: nodes) { - n.visitLeaves(visitor); - } - } - - private static void usageAndExit() { - System.err.println("usage: java QueryDump " + - " ..."); - } - - public static void main(String[] args) throws Exception { - if (args.length < 3) { - usageAndExit(); - } - - Map map = read - (new BufferedInputStream(new FileInputStream(args[0])), - copy(args, 2, args.length - 2)); - - for (Iterator it = map.values().iterator(); it.hasNext();) { - final Record r = it.next(); - if (r.nodes == null) { - it.remove(); - } else { - visitLeaves(r.nodes, new LeafVisitor() { - private Set set = new HashSet(); - - public void visit(LeafNode node) { - if (! set.contains(node.instance)) { - r.footprint += node.instance.size; - ++ r.count; - } - set.add(node.instance); - } - }); - } - } - - Record[] array = map.values().toArray(new Record[map.size()]); - Arrays.sort(array, new Comparator() { - public int compare(Record a, Record b) { - return b.footprint - a.footprint; - } - }); - - int wordSize = Integer.parseInt(args[1]); - - int footprint = 0; - int count = 0; - for (Record r: array) { - if (r.name == null) { - r.name = String.valueOf(r.key); - } - System.out.println - (r.name + ": " + (r.footprint * wordSize) + " " + r.count); - footprint += r.footprint; - count += r.count; - } - - System.out.println(); - System.out.println("total: " + (footprint * wordSize) + " " + count); - } - - private static class Record { - public final int key; - public String name; - public int footprint; - public int count; - public Set nodes; - - public Record(int key) { - this(key, null); - } - - public Record(int key, String name) { - this.key = key; - this.name = name; - } - - public String toString() { - return name; - } - } - - private static class Instance { - public final int key; - public int size; - public Record record; - - public Instance(int key) { - this.key = key; - } - - public String toString() { - return "[" + key + " " + record + "]"; - } - } - - public interface Node { - public void visitLeaves(LeafVisitor visitor); - public int index(); - } - - public static class LeafNode implements Node { - public final Instance instance; - - public LeafNode(Instance instance) { - this.instance = instance; - } - - public void visitLeaves(LeafVisitor visitor) { - visitor.visit(this); - } - - public int index() { - return 0; - } - } - - public static class TreeNode implements Node { - public final Instance instance; - public final int index; - - public final Set children = new HashSet(2); - - public TreeNode(Instance instance, int index) { - this.instance = instance; - this.index = index; - } - - public void visitLeaves(LeafVisitor visitor) { - QueryDump.visitLeaves(children, visitor); - } - - public int index() { - return index; - } - } - - public interface LeafVisitor { - public void visit(LeafNode node); - } -} diff --git a/sgx-jvm/avian/test/extra/Tails.java b/sgx-jvm/avian/test/extra/Tails.java deleted file mode 100644 index a99655531a..0000000000 --- a/sgx-jvm/avian/test/extra/Tails.java +++ /dev/null @@ -1,49 +0,0 @@ -package extra; - -public class Tails { - private static final int Limit = 1000000; - - private static void expect(boolean v) { - if (! v) throw new RuntimeException(); - } - - private static int staticMethod(Interface i, int n) { - if (n < Limit) { - return i.interfaceMethod(n + 1); - } else { - return leafMethod(n); - } - } - - private static int leafMethod(int n) { - expect(new Throwable().getStackTrace().length == 2); - - return n; - } - - public static void main(String[] args) { - expect(staticMethod(new Foo(), 0) == Limit); - } - - private interface Interface { - public int interfaceMethod(int n); - } - - private static class Foo implements Interface { - public int interfaceMethod(int n) { - if (n < Limit) { - return virtualMethod(n + 1, 1, 2, 3, 4, 5); - } else { - return leafMethod(n); - } - } - - public int virtualMethod(int n, int a, int b, int c, int d, int e) { - if (n < Limit) { - return staticMethod(this, n + 1); - } else { - return leafMethod(n); - } - } - } -} diff --git a/sgx-jvm/avian/test/jni.cpp b/sgx-jvm/avian/test/jni.cpp deleted file mode 100644 index 18e418ab92..0000000000 --- a/sgx-jvm/avian/test/jni.cpp +++ /dev/null @@ -1,228 +0,0 @@ -#include -#include "jni-util.h" - -extern "C" JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) -{ - JNIEnv* e; - if (vm->GetEnv(reinterpret_cast(&e), JNI_VERSION_1_6) != JNI_OK) { - return -1; - } - - jclass c = e->FindClass("JNI"); - if (c == 0) { - return -1; - } - - e->SetStaticBooleanField( - c, e->GetStaticFieldID(c, "onLoadCalled", "Z"), true); - - return JNI_VERSION_1_6; -} - -extern "C" JNIEXPORT jdouble JNICALL Java_JNI_addDoubles(JNIEnv*, - jclass, - jdouble a1, - jdouble a2, - jdouble a3, - jdouble a4, - jdouble a5, - jdouble a6, - jdouble a7, - jdouble a8, - jdouble a9, - jdouble a10, - jdouble a11, - jdouble a12, - jdouble a13, - jdouble a14, - jdouble a15, - jdouble a16, - jdouble a17, - jdouble a18, - jdouble a19, - jdouble a20) -{ - return a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11 + a12 + a13 - + a14 + a15 + a16 + a17 + a18 + a19 + a20; -} - -extern "C" JNIEXPORT jfloat JNICALL Java_JNI_addFloats(JNIEnv*, - jclass, - jfloat a1, - jfloat a2, - jfloat a3, - jfloat a4, - jfloat a5, - jfloat a6, - jfloat a7, - jfloat a8, - jfloat a9, - jfloat a10, - jfloat a11, - jfloat a12, - jfloat a13, - jfloat a14, - jfloat a15, - jfloat a16, - jfloat a17, - jfloat a18, - jfloat a19, - jfloat a20) -{ - return a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11 + a12 + a13 - + a14 + a15 + a16 + a17 + a18 + a19 + a20; -} - -extern "C" JNIEXPORT jdouble JNICALL Java_JNI_addMix(JNIEnv*, - jclass, - jfloat a1, - jdouble a2, - jfloat a3, - jdouble a4, - jfloat a5, - jfloat a6, - jfloat a7, - jfloat a8, - jfloat a9, - jfloat a10, - jfloat a11, - jfloat a12, - jfloat a13, - jfloat a14, - jfloat a15, - jdouble a16, - jfloat a17, - jfloat a18, - jfloat a19, - jfloat a20) -{ - return a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9 + a10 + a11 + a12 + a13 - + a14 + a15 + a16 + a17 + a18 + a19 + a20; -} - -extern "C" JNIEXPORT jint JNICALL - Java_JNI_addStackBoundary2(JNIEnv*, jclass, jobject, jobject, jobject, - jint i1, jint i2) -{ - return i1 + i2; -} - -extern "C" JNIEXPORT jint JNICALL - Java_JNI_addStackBoundary3(JNIEnv*, jclass, jobject, jobject, jobject, - jint i1, jint i2, jint i3) -{ - return i1 + i2 + i3; -} - -extern "C" JNIEXPORT jint JNICALL - Java_JNI_addStackBoundary4(JNIEnv*, jclass, jobject, jobject, jobject, - jint i1, jint i2, jint i3, jint i4) -{ - return i1 + i2 + i3 + i4; -} - -extern "C" JNIEXPORT jint JNICALL - Java_JNI_addStackBoundary5(JNIEnv*, jclass, jobject, jobject, jobject, - jint i1, jint i2, jint i3, jint i4, jint i5) -{ - return i1 + i2 + i3 + i4 + i5; -} - -extern "C" JNIEXPORT jint JNICALL - Java_JNI_addStackBoundary6(JNIEnv*, jclass, jobject, jobject, jobject, - jint i1, jint i2, jint i3, jint i4, jint i5, jint i6) -{ - return i1 + i2 + i3 + i4 + i5 + i6; -} - -extern "C" JNIEXPORT jfloat JNICALL - Java_JNI_doEcho__F(JNIEnv* e, jclass c, jfloat f) -{ - jvalue value; - value.f = f; - jvalue array[] = {value}; - return e->CallStaticFloatMethodA( - c, e->GetStaticMethodID(c, "echo", "(F)F"), array); -} - -extern "C" JNIEXPORT jdouble JNICALL - Java_JNI_doEcho__D(JNIEnv* e, jclass c, jdouble f) -{ - jvalue value; - value.d = f; - jvalue array[] = {value}; - return e->CallStaticDoubleMethodA( - c, e->GetStaticMethodID(c, "echo", "(D)D"), array); -} - -extern "C" JNIEXPORT jlong JNICALL - Java_JNI_fromReflectedMethod(JNIEnv* e, jclass, jobject method) -{ - return reinterpret_cast(e->FromReflectedMethod(method)); -} - -extern "C" JNIEXPORT jobject JNICALL - Java_JNI_toReflectedMethod(JNIEnv* e, - jclass, - jclass c, - jlong id, - jboolean isStatic) -{ - return e->ToReflectedMethod(c, reinterpret_cast(id), isStatic); -} - -extern "C" JNIEXPORT jint JNICALL - Java_JNI_callStaticIntMethod(JNIEnv* e, jclass, jclass c, jlong id) -{ - return e->CallStaticIntMethod(c, reinterpret_cast(id)); -} - -extern "C" JNIEXPORT jobject JNICALL - Java_JNI_newObject(JNIEnv* e, jclass, jclass c, jlong id) -{ - return e->NewObject(c, reinterpret_cast(id)); -} - -extern "C" JNIEXPORT jlong JNICALL - Java_JNI_fromReflectedField(JNIEnv* e, jclass, jobject field) -{ - return reinterpret_cast(e->FromReflectedField(field)); -} - -extern "C" JNIEXPORT jobject JNICALL - Java_JNI_toReflectedField(JNIEnv* e, - jclass, - jclass c, - jlong id, - jboolean isStatic) -{ - return e->ToReflectedField(c, reinterpret_cast(id), isStatic); -} - -extern "C" JNIEXPORT jint JNICALL - Java_JNI_getStaticIntField(JNIEnv* e, jclass, jclass c, jlong id) -{ - return e->GetStaticIntField(c, reinterpret_cast(id)); -} - -extern "C" JNIEXPORT jobject JNICALL - Java_JNI_testLocalRef(JNIEnv* e, jclass, jobject o) -{ - return e->NewLocalRef(o); -} - -extern "C" JNIEXPORT jobject JNICALL - Java_Buffers_allocateNative(JNIEnv* e, jclass, jint capacity) -{ - void* p = allocate(e, capacity); - if (p == 0) - return 0; - - return e->NewDirectByteBuffer(p, capacity); -} - -extern "C" JNIEXPORT void JNICALL - Java_Buffers_freeNative(JNIEnv* e, jclass, jobject b) -{ - free(e->GetDirectBufferAddress(b)); -} diff --git a/sgx-jvm/avian/test/test.sh b/sgx-jvm/avian/test/test.sh deleted file mode 100644 index 0bd3db7d68..0000000000 --- a/sgx-jvm/avian/test/test.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -vg="nice valgrind --leak-check=full --num-callers=32 \ ---freelist-vol=100000000 --error-exitcode=1" - -ld_path=${1}; shift -unit_tester=${1}; shift -vm=${1}; shift -mode=${1}; shift -flags=${1}; shift -tests=${@} - -log=log.txt - -if [ -n "${ld_path}" ]; then - export ${ld_path} -fi - -echo -n "" >${log} - -printf "%20s------- Unit tests -------\n" "" -${unit_tester} 2>>${log} -if [ "${?}" != "0" ]; then - trouble=1 - echo "unit tests failed!" -fi - -echo - -printf "%20s------- Java tests -------\n" "" -for test in ${tests}; do - printf "%32s: " "${test}" - - case ${mode} in - debug|debug-fast|fast|small ) - ${vm} ${flags} ${test} >>${log} 2>&1;; - - stress* ) - ${vg} ${vm} ${flags} ${test} \ - >>${log} 2>&1;; - - * ) - echo "unknown mode: ${mode}" >&2 - exit 1;; - esac - - if [ "${?}" = "0" ]; then - echo "success" - else - echo "fail" - trouble=1 - fi -done - -echo - -if [ -n "${trouble}" ]; then - printf "see ${log} for output\n" - exit -1 -fi diff --git a/sgx-jvm/avian/unittest/CMakeLists.txt b/sgx-jvm/avian/unittest/CMakeLists.txt deleted file mode 100644 index d810e3ffba..0000000000 --- a/sgx-jvm/avian/unittest/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ - -include_directories (${CMAKE_CURRENT_SOURCE_DIR}) - -add_executable (avian_unittest - test-harness.cpp - - codegen/assembler-test.cpp - codegen/registers-test.cpp - - util/arg-parser-test.cpp -) - -target_link_libraries (avian_unittest - avian_codegen - avian_codegen_x86 - avian_system - avian_heap - avian_util - ${PLATFORM_LIBS} -) - -add_test(NAME avian_unittest COMMAND avian_unittest) -add_dependencies(check avian_unittest) diff --git a/sgx-jvm/avian/unittest/codegen/assembler-test.cpp b/sgx-jvm/avian/unittest/codegen/assembler-test.cpp deleted file mode 100644 index 614135949a..0000000000 --- a/sgx-jvm/avian/unittest/codegen/assembler-test.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include "avian/common.h" -#include -#include -#include "avian/target.h" - -#include -#include -#include -#include - -#include "test-harness.h" - -using namespace avian::codegen; -using namespace vm; - -class BasicEnv { - public: - System* s; - Heap* heap; - Architecture* arch; - - BasicEnv() - : s(makeSystem()), - heap(makeHeap(s, 32 * 1024)), - arch(makeArchitectureNative(s, true)) - { - arch->acquire(); - } - - ~BasicEnv() - { - arch->release(); - s->dispose(); - } -}; - -class Asm { - public: - Zone zone; - Assembler* a; - - Asm(BasicEnv& env) - : zone(env.heap, 8192), a(env.arch->makeAssembler(env.heap, &zone)) - { - } - - ~Asm() - { - a->dispose(); - } -}; - -TEST(BasicAssembler) -{ - BasicEnv env; - Asm a(env); -} - -TEST(ArchitecturePlan) -{ - BasicEnv env; - - for (int op = (int)lir::Call; op < (int)lir::AlignedJump; op++) { - bool thunk; - OperandMask mask; - env.arch->plan( - (lir::UnaryOperation)op, vm::TargetBytesPerWord, mask, &thunk); - assertFalse(thunk); - assertNotEqual(static_cast(0), mask.typeMask); - assertNotEqual(static_cast(0), (uint64_t)mask.lowRegisterMask); - } -} diff --git a/sgx-jvm/avian/unittest/codegen/registers-test.cpp b/sgx-jvm/avian/unittest/codegen/registers-test.cpp deleted file mode 100644 index 4aa982c940..0000000000 --- a/sgx-jvm/avian/unittest/codegen/registers-test.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include - -#include "test-harness.h" - -using namespace avian::codegen; -using namespace vm; - -TEST(RegisterIterator) -{ - BoundedRegisterMask regs(0x55); - assertEqual(0, regs.start); - assertEqual(7, regs.limit); - - for(int i = 0; i < 64; i++) { - assertEqual(i, BoundedRegisterMask(static_cast(1) << i).start); - assertEqual(i + 1, BoundedRegisterMask(static_cast(1) << i).limit); - } - - auto it = regs.begin(); - auto end = regs.end(); - - assertTrue(it != end); - assertEqual(6, (*it).index()); - ++it; - assertTrue(it != end); - assertEqual(4, (*it).index()); - ++it; - assertTrue(it != end); - assertEqual(2, (*it).index()); - ++it; - assertTrue(it != end); - assertEqual(0, (*it).index()); - ++it; - assertFalse(it != end); -} diff --git a/sgx-jvm/avian/unittest/test-harness.cpp b/sgx-jvm/avian/unittest/test-harness.cpp deleted file mode 100644 index 2a8d4c2986..0000000000 --- a/sgx-jvm/avian/unittest/test-harness.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include "test-harness.h" - -// since we aren't linking against libstdc++, we must implement this -// ourselves: -extern "C" void __cxa_pure_virtual(void) -{ - abort(); -} - -Test* Test::first = 0; -Test** Test::last = &first; - -Test::Test(const char* name) : next(0), failures(0), runs(0), name(name) -{ - *last = this; - last = &next; -} - -bool Test::runAll() -{ - int failures = 0; - for (Test* t = Test::first; t; t = t->next) { - printf("%32s: ", t->name); - t->run(); - failures += t->failures; - if (t->failures > 0) { - printf("failure\n"); - } else { - printf("success\n"); - } - } - return failures == 0; -} - -int main(int argc UNUSED, char** argv UNUSED) -{ - if (Test::runAll()) { - return 0; - } - return 1; -} diff --git a/sgx-jvm/avian/unittest/test-harness.h b/sgx-jvm/avian/unittest/test-harness.h deleted file mode 100644 index 10b3f0259a..0000000000 --- a/sgx-jvm/avian/unittest/test-harness.h +++ /dev/null @@ -1,119 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#ifndef TEST_HARNESS_H -#define TEST_HARNESS_H - -#include "avian/common.h" -#include - -class Test { - private: - Test* next; - static Test* first; - static Test** last; - - friend int main(int argc, char** argv); - - void print(uint64_t value) - { - fprintf(stderr, "%p", reinterpret_cast(value)); - } - - void print(uint32_t value) - { - fprintf(stderr, "%p", reinterpret_cast(value)); - } - - void print(uint8_t value) - { - print(static_cast(value)); - } - - void print(bool value) - { - fprintf(stderr, "%s", value ? "true" : "false"); - } - - int failures; - int runs; - - protected: - template - void assertEqual(T expected, T actual) - { - if (expected != actual) { - fprintf(stderr, "assertion failure, expected: "); - print(expected); - fprintf(stderr, ", actual: "); - print(actual); - fprintf(stderr, "\n"); - failures++; - } - runs++; - } - - void assertEqual(const char* expected, const char* actual) - { - if ((expected == 0 && actual != 0) || (expected != 0 && actual == 0) - || strcmp(expected, actual) != 0) { - fprintf(stderr, - "assertion failure, expected: \"%s\", actual: \"%s\"\n", - expected, - actual); - failures++; - } - runs++; - } - - template - void assertNotEqual(T expected, T actual) - { - if (expected == actual) { - fprintf(stderr, "assertion failure, expected: not "); - print(expected); - fprintf(stderr, ", actual: "); - print(actual); - fprintf(stderr, "\n"); - failures++; - } - runs++; - } - - void assertTrue(bool value) - { - assertEqual(true, value); - } - - void assertFalse(bool value) - { - assertEqual(false, value); - } - - public: - const char* const name; - Test(const char* name); - - virtual void run() = 0; - - static bool runAll(); -}; - -#define TEST(name) \ - class name##TestClass : public Test { \ - public: \ - name##TestClass() : Test(#name) \ - { \ - } \ - virtual void run(); \ - } name##TestInstance; \ - void name##TestClass::run() - -#endif // TEST_HARNESS_H diff --git a/sgx-jvm/avian/unittest/util/arg-parser-test.cpp b/sgx-jvm/avian/unittest/util/arg-parser-test.cpp deleted file mode 100644 index 11fdb5e929..0000000000 --- a/sgx-jvm/avian/unittest/util/arg-parser-test.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2008-2015, Avian Contributors - - Permission to use, copy, modify, and/or distribute this software - for any purpose with or without fee is hereby granted, provided - that the above copyright notice and this permission notice appear - in all copies. - - There is NO WARRANTY for this software. See license.txt for - details. */ - -#include - -#include "avian/common.h" - -#include - -#include "test-harness.h" - -using namespace avian::util; - -TEST(ArgParser) -{ - { - ArgParser parser; - Arg arg1(parser, false, "arg1", ""); - Arg required2(parser, true, "required2", ""); - const char* args[] - = {"myExecutable", "-arg1", "myValue1", "-required2", "myRequired2", 0}; - assertTrue(parser.parse(sizeof(args) / sizeof(char*) - 1, args)); - assertEqual("myValue1", arg1.value); - assertEqual("myRequired2", required2.value); - } - - { - ArgParser parser; - Arg arg1(parser, false, "arg1", ""); - Arg required2(parser, true, "required2", ""); - const char* args[] = {"myExecutable", "-arg1", "myValue1", "-required2", 0}; - assertFalse(parser.parse(sizeof(args) / sizeof(char*) - 1, args)); - } - - { - ArgParser parser; - Arg arg1(parser, false, "arg1", ""); - Arg required2(parser, true, "required2", ""); - const char* args[] = {"myExecutable", "-arg1", "myValue1", 0}; - assertFalse(parser.parse(sizeof(args) / sizeof(char*) - 1, args)); - } -} diff --git a/sgx-jvm/avian/valgrind.supp b/sgx-jvm/avian/valgrind.supp deleted file mode 100644 index 89e9ef784b..0000000000 --- a/sgx-jvm/avian/valgrind.supp +++ /dev/null @@ -1,50 +0,0 @@ - -{ - - Memcheck:Cond - obj:/lib/ld-2.3.6.so -} - -{ - - Memcheck:Cond - obj:/lib/ld-2.6.so -} - -{ - - Memcheck:Addr4 - obj:/lib/ld-2.3.6.so -} - -{ - - Memcheck:Addr8 - obj:/lib/ld-2.3.6.so -} - -# { -# -# Memcheck:Param -# write(buf) -# obj:* -# } - -# { -# -# Memcheck:Param -# writev(vector[...]) -# obj:* -# } - -# { -# -# Memcheck:Cond -# obj:* -# } - -# { -# -# Memcheck:Value8 -# obj:* -# } diff --git a/sgx-jvm/avian/vm.pro b/sgx-jvm/avian/vm.pro deleted file mode 100644 index 6ead35b18b..0000000000 --- a/sgx-jvm/avian/vm.pro +++ /dev/null @@ -1,136 +0,0 @@ -# proguard include file (http://proguard.sourceforge.net) - -# Enums have methods and members that are called reflectively in both Avian and OpenJDK. --keepclassmembers enum * { - **[] $VALUES; - public *; - public static **[] values(); -} - -# the VM depends on the fixed layout of the following classes: - --keepclassmembers class java.lang.Class { !static ; } --keepclassmembers class java.lang.ClassLoader { !static ; } --keepclassmembers class java.lang.String { !static ; } --keepclassmembers class java.lang.Thread { !static ; } --keepclassmembers class java.lang.ThreadGroup { !static ; } --keepclassmembers class java.lang.StackTraceElement { !static ; } --keepclassmembers class java.lang.Throwable { !static ; } --keepclassmembers class java.lang.Byte { !static ; } --keepclassmembers class java.lang.Boolean { !static ; } --keepclassmembers class java.lang.Short { !static ; } --keepclassmembers class java.lang.Character { !static ; } --keepclassmembers class java.lang.Integer { !static ; } --keepclassmembers class java.lang.Long { !static ; } --keepclassmembers class java.lang.Float { !static ; } --keepclassmembers class java.lang.Double { !static ; } --keepclassmembers class java.lang.ref.Reference { !static ; } --keepclassmembers class java.lang.ref.ReferenceQueue { !static ; } --keepclassmembers class java.lang.ref.WeakReference { !static ; } --keepclassmembers class java.lang.ref.PhantomReference { !static ; } --keepclassmembers class java.lang.reflect.Field { !static ; } --keepclassmembers class java.lang.reflect.Method { !static ; } --keepclassmembers class java.lang.reflect.Constructor { !static ; } --keepclassmembers class java.lang.reflect.AccessibleObject { !static ; } --keepclassmembers class sun.reflect.ConstantPool { !static ; } --keepclassmembers class avian.VMClass { !static ; } --keepclassmembers class avian.VMMethod { !static ; } --keepclassmembers class avian.VMField { !static ; } --keepclassmembers class avian.ClassAddendum { !static ; } --keepclassmembers class avian.MethodAddendum { !static ; } --keepclassmembers class avian.FieldAddendum { !static ; } --keepclassmembers class avian.Continuations$Continuation { !static ; } --keepclassmembers class avian.Continuations$UnwindResult { !static ; } - -# the VM may throw instances of the following: - --keep public class avian.IncompatibleContinuationException --keep public class java.lang.Exception --keep public class java.lang.RuntimeException --keep public class java.lang.IllegalStateException --keep public class java.lang.IllegalArgumentException --keep public class java.lang.IllegalMonitorStateException --keep public class java.lang.IllegalThreadStateException --keep public class java.lang.IndexOutOfBoundsException --keep public class java.lang.ArrayIndexOutOfBoundsException --keep public class java.lang.ArrayStoreException --keep public class java.lang.NegativeArraySizeException --keep public class java.lang.CloneNotSupportedException --keep public class java.lang.ClassCastException --keep public class java.lang.ClassNotFoundException --keep public class java.lang.NullPointerException --keep public class java.lang.ArithmeticException --keep public class java.lang.InterruptedException --keep public class java.lang.StackOverflowError --keep public class java.lang.NoSuchFieldError --keep public class java.lang.NoSuchMethodError --keep public class java.lang.AbstractMethodError --keep public class java.lang.UnsatisfiedLinkError --keep public class java.lang.ExceptionInInitializerError --keep public class java.lang.OutOfMemoryError --keep public class java.lang.IncompatibleClassChangeError --keep public class java.lang.reflect.InvocationTargetException --keep public class java.io.IOException --keep public class java.io.FileNotFoundException --keep public class java.net.SocketException --keep public class java.net.UnknownHostException --keep public class java.util.Locale - -# ClassLoader.getSystemClassloader() depends on the existence of this class: - --keep class avian.SystemClassLoader - -# the VM references these classes by name, so protect them from obfuscation: - --keepnames public class java.lang.** --keepnames public class avian.** - -# Don't optimize calls to ResourceBundle --keep,allowshrinking,allowobfuscation public class java.util.ResourceBundle { - public static java.util.ResourceBundle getBundle(...); -} - -# musn't obfuscate native method names: - --keepclasseswithmembernames class * { - native ; - } - -# Thread.run is called by name in the VM - --keepclassmembers class java.lang.Thread { - private static void run(java.lang.Thread); - public void run(); - } - -# when continuations are enabled, the VM may call these methods by name: - --keepclassmembers class avian.Continuations { - *** wind(...); - *** rewind(...); - } - --keepclassmembernames class avian.CallbackReceiver { - *** receive(...); - } - -# the above methods include these classes in their signatures: - --keepnames public class avian.Callback --keepnames public class java.util.concurrent.Callable - -# Proguard gets confused about clone() and array classes (http://sourceforge.net/tracker/index.php?func=detail&aid=2851344&group_id=54750&atid=474704): - --keepclassmembers class java.lang.Object { - protected java.lang.Object clone(); - } - -# called by name in the VM: - --keepclassmembers class java.lang.ClassLoader { - public java.lang.Class loadClass(java.lang.String); - } - - -keepclassmembers class avian.Classes { - public java.security.ProtectionDomain getProtectionDomain(avian.VMClass); - } diff --git a/sgx-jvm/containers/core/Dockerfile b/sgx-jvm/containers/core/Dockerfile deleted file mode 100644 index d110598548..0000000000 --- a/sgx-jvm/containers/core/Dockerfile +++ /dev/null @@ -1,99 +0,0 @@ -FROM ubuntu:xenial-20171114 - -# General information - -LABEL version="1.0" -LABEL description="SGX build and test container" -LABEL maintainer="tommy.lillehagen@r3.com" - -# Configure package management software - -ENV LANG C.UTF-8 -ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update -qqy -RUN apt-get install -qqy software-properties-common apt-utils -RUN apt-get update -qqy - -# Install dependencies (lock versions) - -RUN apt-get install -qqy \ - autoconf=2.69-9 \ - ccache=3.2.4-1 \ - cmake=3.5.1-1ubuntu3 \ - cpio=2.11+dfsg-5ubuntu1 \ - exuberant-ctags=1:5.9~svn20110310-11 \ - g++=4:5.3.1-1ubuntu1 \ - gcc=4:5.3.1-1ubuntu1 \ - gdb=7.11.1-0ubuntu1~16.5 \ - gdbserver=7.11.1-0ubuntu1~16.5 \ - git=1:2.7.4-0ubuntu1.3 \ - libcurl3=7.47.0-1ubuntu2.5 \ - libcurl4-openssl-dev=7.47.0-1ubuntu2.5 \ - libprotobuf-dev=2.6.1-1.3 \ - libssl-dev=1.0.2g-1ubuntu4.10 \ - libtool=2.4.6-0.1 \ - libunwind8=1.1-4.1 \ - make=4.1-6 \ - ocaml=4.02.3-5ubuntu2 \ - openjdk-8-jdk=8u151-b12-0ubuntu0.16.04.2 \ - openssl=1.0.2g-1ubuntu4.10 \ - patch=2.7.5-1 \ - protobuf-compiler=2.6.1-1.3 \ - python2.7=2.7.12-1ubuntu0~16.04.2 \ - unzip=6.0-20ubuntu1 \ - wget=1.17.1-1ubuntu1.3 \ - zip=3.0-11 \ - zlib1g-dev=1:1.2.8.dfsg-2ubuntu4.1 - -# Set Python 2.7 as the default version - -RUN ln -fs \ - /usr/bin/python2.7 \ - /usr/bin/python - -# Link libcrypto properly - -RUN ln -fs \ - /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 \ - /usr/lib/x86_64-linux-gnu/libcrypto.so - -# Location for the UNIX socket belonging to the Intel AESM service - -RUN mkdir -p /var/run/aesmd/ - -# Update ProGuard to version 6 beta - -ADD dependencies/proguard6.0beta1.tar.gz /usr/share/ - -# Expose ports for remote GDB and Java debugging, and test servers - -EXPOSE 2000 5005 8080 8084 9080 - -# Environment - -ENV SHELL /bin/bash -ENV CODE /code -ENV HOME /home -ENV USER_HOME ${HOME} -ENV GRADLE_USER_HOME ${HOME}/.gradle -ENV SGX_SDK /sgx - -# Volumes and work directory - -VOLUME ${CODE} -VOLUME ${HOME} -VOLUME ${SGX_SDK} -RUN mkdir -p ${CODE} -RUN mkdir -p ${HOME} -RUN mkdir -p ${SGX_SDK} -WORKDIR ${CODE} - -# Set up Java and SGX environment - -ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 -ENV _JAVA_OPTIONS=-Duser.home=${HOME} - -ENV SGX_BIN ${SGX_SDK}/sgxsdk/bin:${SGX_SDK}/sgxsdk/bin/x64 -ENV PATH ${PATH}:${JAVA_HOME}/jre/bin:${JAVA_HOME}/bin:${SGX_BIN} - -ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CODE}/sgx-jvm/linux-sgx/build/linux diff --git a/sgx-jvm/containers/core/Makefile b/sgx-jvm/containers/core/Makefile deleted file mode 100644 index 9cf58ddf45..0000000000 --- a/sgx-jvm/containers/core/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -.PHONY: container sgsdk - -SHELL = /bin/bash -MAKEFILE_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) - -container: Dockerfile - docker build -t sgx-ra-core . - -sgxsdk: - @mkdir -p ~/.container/sgx - @if [ ! -e ~/.container/sgx/sgxsdk ]; then \ - docker run --rm \ - -v ${HOME}/.container/sgx:/sgx \ - -v ${MAKEFILE_DIR}/../../../../:/code sgx-ra-core bash \ - /code/sgx-jvm/linux-sgx/linux/installer/bin/build-installpkg.sh sdk; \ - docker run --rm \ - -v ${HOME}/.container/sgx:/sgx \ - -v ${MAKEFILE_DIR}/../../../../:/code -it sgx-ra-core bash \ - /code/sgx-jvm/linux-sgx/linux/installer/bin/sgx_linux_x64_sdk_1.9.100.39124.bin \ - -prefix=/sgx; \ - fi diff --git a/sgx-jvm/containers/core/dependencies/proguard6.0beta1.tar.gz b/sgx-jvm/containers/core/dependencies/proguard6.0beta1.tar.gz deleted file mode 100644 index 7334e2c610..0000000000 Binary files a/sgx-jvm/containers/core/dependencies/proguard6.0beta1.tar.gz and /dev/null differ diff --git a/sgx-jvm/environment b/sgx-jvm/environment deleted file mode 100755 index 76ab50060a..0000000000 --- a/sgx-jvm/environment +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" - -# make the sx tool available for the user -alias sx="bash ${DIR}/tools/sx/sx" - -# load sx configuration -if [ -e "/tmp" ]; then - TMPDIR=${TMPDIR:-/tmp} -fi -TMP_CONFIG="${TMPDIR}/sx.config" -if [ -z "${TMPDIR}" ]; then - TMP_CONFIG=$(tempfile) -fi - -sx shell auto-completion > "${TMP_CONFIG}" -source "${TMP_CONFIG}" diff --git a/sgx-jvm/jvm-enclave/.gitignore b/sgx-jvm/jvm-enclave/.gitignore deleted file mode 100644 index 5892d8efb9..0000000000 --- a/sgx-jvm/jvm-enclave/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -test/tests -tools/enclave-inspector diff --git a/sgx-jvm/jvm-enclave/Makefile b/sgx-jvm/jvm-enclave/Makefile deleted file mode 100644 index 10d499c56d..0000000000 --- a/sgx-jvm/jvm-enclave/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -.PHONY: all -all: standalone_sgx_verify libuntrusted_corda_sgx.so - -standalone/build: - mkdir -p standalone/build - -standalone/build/Makefile: | standalone/build - cd standalone/build/ && cmake .. - -.PHONY: standalone_sgx_verify -standalone_sgx_verify: standalone/build/Makefile ../../verify-enclave/build/libs/corda-enclavelet.jar - $(MAKE) -C $( -#include -#include "enclave_map.h" - -static enclave_map_t map; - -void add_enclave_mapping(sgx_measurement_t *mr_enclave, sgx_enclave_id_t enclave_id) { - // Note: The size of the enclave map is proportional to the number of unique - // enclaves a system is dealing with. For the time being we don't envision this - // number to be very big. Longer term, we might want to implement some form of - // pruning to avoid old entries taking up unnecessary memory space. - map[mr_enclave] = enclave_id; -} - -sgx_enclave_id_t get_enclave_id(sgx_measurement_t *mr_enclave) { - auto result = map.find(mr_enclave); - if (result == map.end()) { - throw std::invalid_argument("no enclave ID associated with enclave measurement"); - } - return result->second; -} diff --git a/sgx-jvm/jvm-enclave/common/enclave_map.h b/sgx-jvm/jvm-enclave/common/enclave_map.h deleted file mode 100644 index 25ed1fb077..0000000000 --- a/sgx-jvm/jvm-enclave/common/enclave_map.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef __ENCLAVE_MAP_H__ -#define __ENCLAVE_MAP_H__ - -#include -#include -#include -#include - -struct enclave_hash_comparer : public std::binary_function { -public: - bool operator() (const sgx_measurement_t* a, const sgx_measurement_t* b) const - { return memcmp(a->m, b->m, 32) < 0; } -}; - -class enclave_map_t : public std::map { }; - -void add_enclave_mapping(sgx_measurement_t *mr_enclave, sgx_enclave_id_t enclave_id); - -sgx_enclave_id_t get_enclave_id(sgx_measurement_t *mr_enclave); - -#endif /* __ENCLAVE_MAP_H__ */ diff --git a/sgx-jvm/jvm-enclave/common/enclave_metadata.cpp b/sgx-jvm/jvm-enclave/common/enclave_metadata.cpp deleted file mode 100644 index 49964a3d3d..0000000000 --- a/sgx-jvm/jvm-enclave/common/enclave_metadata.cpp +++ /dev/null @@ -1,127 +0,0 @@ -#include -#include -#include - -#include "enclave_metadata.h" -#include "elf_types.h" -#include "sgx_types.h" - -static enclave_hash_result_t read_header(FILE *fp, Elf64_Ehdr *header) { - if (0 != fseek(fp, 0, SEEK_SET)) { - return EHR_ERROR_READ_FILE; - } - - size_t read = fread(header, sizeof(Elf64_Ehdr), 1, fp); - if (0 == read) { - return EHR_ERROR_READ_ELF_HEADER; - } - - if (header->e_ident[0] != ELFMAG0 - || header->e_ident[1] != ELFMAG1 - || header->e_ident[2] != ELFMAG2 - || header->e_ident[3] != ELFMAG3) { - return EHR_ERROR_NOT_ELF_FORMAT; - } - - if (header->e_ident[EI_CLASS] != ELFCLASS64) { - return EHR_ERROR_NOT_ELF64_FORMAT; - } - - return EHR_SUCCESS; -} - -static enclave_hash_result_t find_section(FILE *fp, Elf64_Ehdr *header, const char *name, Elf64_Shdr *metadata_section) { - fseek(fp, header->e_shoff, SEEK_SET); - Elf64_Shdr *sections = static_cast(calloc(header->e_shnum, sizeof(Elf64_Shdr))); - if (NULL == sections) { - return EHR_ERROR_OUT_OF_MEMORY; - } - - if (header->e_shnum != fread(sections, sizeof(Elf64_Shdr), header->e_shnum, fp)) { - free(sections); - return EHR_ERROR_READ_SECTION_HEADERS; - } - - Elf64_Shdr *name_section = §ions[header->e_shstrndx]; - for (int i = 1; i < header->e_shnum; i++) { // Skip index 0, always empty - char name[16]; - fseek(fp, name_section->sh_offset + sections[i].sh_name, SEEK_SET); - fread(name, 1, 16, fp); - if (0 == strncmp(name, ".note.sgxmeta", 16)) { - memcpy(metadata_section, §ions[i], sizeof(Elf64_Shdr)); - free(sections); - return EHR_SUCCESS; - } - } - - free(sections); - return EHR_ERROR_NO_SGX_META_DATA_SECTION; -} - -enclave_hash_result_t retrieve_enclave_hash(const char *path, uint8_t *enclave_hash) { - FILE *fp = fopen(path, "rb"); - if (!fp) { - return EHR_ERROR_READ_FILE; - } - - Elf64_Ehdr header; - enclave_hash_result_t read_header_result = read_header(fp, &header); - if (EHR_SUCCESS != read_header_result) { - fclose(fp); - return read_header_result; - } - - Elf64_Shdr section; - enclave_hash_result_t find_section_result = find_section(fp, &header, ".note.sgxmeta", §ion); - if (EHR_SUCCESS != find_section_result) { - fclose(fp); - return find_section_result; - } - - size_t metadata_offset = section.sh_offset; - size_t metadata_align = section.sh_addralign; - - Elf64_Note note; - fseek(fp, section.sh_offset, SEEK_SET); - fread(¬e, sizeof(Elf64_Note), 1, fp); - - if (section.sh_size != ROUND_TO(sizeof(Elf64_Note) + note.namesz + note.descsz, section.sh_addralign)) { - fclose(fp); - return EHR_ERROR_INVALID_SECTION_SIZE; - } - - const char *meta_name = "sgx_metadata"; - const size_t meta_name_len = strlen(meta_name); - char meta_name_buffer[16] = { 0 }; - - fseek(fp, section.sh_offset + sizeof(Elf64_Note), SEEK_SET); - fread(meta_name_buffer, 1, 16, fp); - - if (meta_name_len + 1 != note.namesz || 0 != strncmp(meta_name, meta_name_buffer, meta_name_len)) { - fclose(fp); - return EHR_ERROR_INVALID_SECTION_NAME; - } - - size_t meta_data_offset = section.sh_offset + sizeof(Elf64_Note) + note.namesz; - metadata_t *metadata = static_cast(malloc(sizeof(metadata_t))); - if (NULL == metadata) { - fclose(fp); - return EHR_ERROR_OUT_OF_MEMORY; - } - - fseek(fp, meta_data_offset, SEEK_SET); - if (1 != fread(metadata, sizeof(metadata_t), 1, fp)) { - free(metadata); - fclose(fp); - return EHR_ERROR_READ_META_DATA; - } - - if (NULL != enclave_hash) { - memcpy(enclave_hash, metadata->enclave_css.body.enclave_hash, MRE_SIZE); - } - - free(metadata); - fclose(fp); - - return EHR_SUCCESS; -} diff --git a/sgx-jvm/jvm-enclave/common/enclave_metadata.h b/sgx-jvm/jvm-enclave/common/enclave_metadata.h deleted file mode 100644 index a02535f445..0000000000 --- a/sgx-jvm/jvm-enclave/common/enclave_metadata.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef __ENCLAVE_METADATA_H__ -#define __ENCLAVE_METADATA_H__ - -typedef enum _enclave_hash_result_t { - EHR_SUCCESS, // The hash of the enclave was retrieved successfully - EHR_ERROR_READ_FILE, // Unable to read the file - EHR_ERROR_READ_ELF_HEADER, // Unable to read the file header - EHR_ERROR_NOT_ELF_FORMAT, // The file is not an ELF file - EHR_ERROR_NOT_ELF64_FORMAT, // The file is an ELF file, but only 64-bit ELF files are supported - EHR_ERROR_OUT_OF_MEMORY, // Unable to allocate memory - EHR_ERROR_READ_SECTION_HEADERS, // Unable to read section headers from file - EHR_ERROR_NO_SGX_META_DATA_SECTION, // Unable to find note section named ".note.sgxmeta" - EHR_ERROR_INVALID_SECTION_NAME, // Invalid name of note section - EHR_ERROR_INVALID_SECTION_SIZE, // Invalid size of note section - EHR_ERROR_READ_META_DATA, // Unable to read meta data from file -} enclave_hash_result_t; - -extern "C" enclave_hash_result_t retrieve_enclave_hash(const char *path, uint8_t *enclave_hash); - -#endif /* __ENCLAVE_METADATA_H__ */ diff --git a/sgx-jvm/jvm-enclave/common/rpc/CMakeLists.txt b/sgx-jvm/jvm-enclave/common/rpc/CMakeLists.txt deleted file mode 100644 index 76e256b762..0000000000 --- a/sgx-jvm/jvm-enclave/common/rpc/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(sgx_rpc) - -add_executable(edger8r IMPORTED) -set_target_properties(edger8r PROPERTIES IMPORTED_LOCATION ${SGX_LIBRARY_PATH}/sgx_edger8r) diff --git a/sgx-jvm/jvm-enclave/common/rpc/java.edl b/sgx-jvm/jvm-enclave/common/rpc/java.edl deleted file mode 100644 index 906222cbff..0000000000 --- a/sgx-jvm/jvm-enclave/common/rpc/java.edl +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Interface definitions for the ecalls (in) and ocalls (out) to/from the enclave. This is used to generate - * marshalling code that moves calls across the boundary. - */ - -enclave { - from "start_thread.edl" import *; - trusted { - public void check_transaction([in, size=len] void* reqbuf, size_t len, [out, size=1024] char* error); - }; - - untrusted { - void debug_print([in, string] const char *string); - }; -}; \ No newline at end of file diff --git a/sgx-jvm/jvm-enclave/common/rpc/start_thread.edl b/sgx-jvm/jvm-enclave/common/rpc/start_thread.edl deleted file mode 100644 index 759b7c67e3..0000000000 --- a/sgx-jvm/jvm-enclave/common/rpc/start_thread.edl +++ /dev/null @@ -1,10 +0,0 @@ -enclave { - from "sgx_tstdc.edl" import *; - include "sgx_report.h" - trusted { - public void create_new_thread(unsigned int nonce); - }; - untrusted { - void request_new_thread(sgx_measurement_t mr_enclave, uint32_t nonce); - }; -}; diff --git a/sgx-jvm/jvm-enclave/common/sgx_thread_completion.h b/sgx-jvm/jvm-enclave/common/sgx_thread_completion.h deleted file mode 100644 index 2c1f826d9a..0000000000 --- a/sgx-jvm/jvm-enclave/common/sgx_thread_completion.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include - -class sgx_thread_completion { - bool completed; - sgx_thread_mutex_t mutex; - sgx_thread_cond_t thread_complete; - -public: - sgx_thread_completion() noexcept : completed(false) { - sgx_thread_mutex_init(&mutex, NULL); - sgx_thread_cond_init(&thread_complete, NULL); - } - ~sgx_thread_completion() noexcept { - sgx_thread_cond_destroy(&thread_complete); - sgx_thread_mutex_destroy(&mutex); - } - void complete() noexcept; - void wait() noexcept; -}; - diff --git a/sgx-jvm/jvm-enclave/common/sgx_thread_mutex_guard.h b/sgx-jvm/jvm-enclave/common/sgx_thread_mutex_guard.h deleted file mode 100644 index 3bf95b54af..0000000000 --- a/sgx-jvm/jvm-enclave/common/sgx_thread_mutex_guard.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include - -class sgx_thread_mutex_guard { - sgx_thread_mutex_t * const mutex; -public: - sgx_thread_mutex_guard(sgx_thread_mutex_t *mutex) noexcept : mutex(mutex) { - sgx_thread_mutex_lock(mutex); - } - ~sgx_thread_mutex_guard() noexcept { - sgx_thread_mutex_unlock(mutex); - } -}; - diff --git a/sgx-jvm/jvm-enclave/common/sgx_types.h b/sgx-jvm/jvm-enclave/common/sgx_types.h deleted file mode 100644 index b5f145bbcd..0000000000 --- a/sgx-jvm/jvm-enclave/common/sgx_types.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef __SGX_TYPES_H__ -#define __SGX_TYPES_H__ - -#pragma pack(push, 1) - -#define ROUND_TO(x, align) \ - (((x) + ((align)-1)) & ~((align)-1)) - -#define MRE_SIZE 32 // Size of MRENCLAVE (in bytes) -#define SE_KEY_SIZE 384 // Size of keys (in bytes) -#define SE_EXP_SIZE 4 // RSA public key exponent size in bytes - -typedef struct { - uint64_t flags; - uint64_t xfrm; -} sgx_attributes_t; - -typedef uint32_t sgx_misc_select_t; - -typedef struct { - sgx_attributes_t secs_attr; - sgx_misc_select_t misc_select; -} sgx_misc_attribute_t; - -typedef struct { // 128 bytes - uint8_t header[12]; // (0) must be (06000000E100000000000100H) - uint32_t type; // (12) bit 31: 0 = prod, 1 = debug; Bit 30-0: Must be zero - uint32_t module_vendor; // (16) Intel=0x8086, ISV=0x0000 - uint32_t date; // (20) build date as yyyymmdd - uint8_t header2[16]; // (24) must be (01010000600000006000000001000000H) - uint32_t hw_version; // (40) For Launch Enclaves: HWVERSION != 0. Others, HWVERSION = 0 - uint8_t reserved[84]; // (44) Must be 0 -} css_header_t; - -typedef struct { // 772 bytes - uint8_t modulus[SE_KEY_SIZE]; // (128) Module Public Key (keylength=3072 bits) - uint8_t exponent[SE_EXP_SIZE]; // (512) RSA Exponent = 3 - uint8_t signature[SE_KEY_SIZE]; // (516) Signature over Header and Body -} css_key_t; - -typedef struct { // 128 bytes - sgx_misc_select_t misc_select; // (900) The MISCSELECT that must be set - sgx_misc_select_t misc_mask; // (904) Mask of MISCSELECT to enforce - uint8_t reserved[20]; // (908) Reserved. Must be 0. - sgx_attributes_t attributes; // (928) Enclave Attributes that must be set - sgx_attributes_t attribute_mask; // (944) Mask of Attributes to Enforce - uint8_t enclave_hash[MRE_SIZE]; // (960) MRENCLAVE - (32 bytes) - uint8_t reserved2[32]; // (992) Must be 0 - uint16_t isv_prod_id; // (1024) ISV assigned Product ID - uint16_t isv_svn; // (1026) ISV assigned SVN -} css_body_t; - -typedef struct { // 780 bytes - uint8_t reserved[12]; // (1028) Must be 0 - uint8_t q1[SE_KEY_SIZE]; // (1040) Q1 value for RSA Signature Verification - uint8_t q2[SE_KEY_SIZE]; // (1424) Q2 value for RSA Signature Verification -} css_buffer_t; - -typedef struct { // 1808 bytes - css_header_t header; // (0) - css_key_t key; // (128) - css_body_t body; // (900) - css_buffer_t buffer; // (1028) -} enclave_css_t; - -typedef struct { - uint64_t magic_num; // The magic number identifying the file as a signed enclave image - uint64_t version; // The metadata version - uint32_t size; // The size of this structure - uint32_t tcs_policy; // TCS management policy - uint32_t ssa_frame_size; // The size of SSA frame in page - uint32_t max_save_buffer_size; // Max buffer size is 2632 - uint32_t desired_misc_select; - uint32_t tcs_min_pool; // TCS min pool*/ - uint64_t enclave_size; // enclave virtual size - sgx_attributes_t attributes; // XFeatureMask to be set in SECS. - enclave_css_t enclave_css; // The enclave signature -} metadata_t; - - -#endif /* __SGX_TYPES_H__ */ diff --git a/sgx-jvm/jvm-enclave/common/sgx_utilities.cpp b/sgx-jvm/jvm-enclave/common/sgx_utilities.cpp deleted file mode 100644 index 65b2c63a52..0000000000 --- a/sgx-jvm/jvm-enclave/common/sgx_utilities.cpp +++ /dev/null @@ -1,102 +0,0 @@ -#include -#include - -#include "sgx_utilities.h" - -/* Error code returned by sgx_create_enclave */ -static sgx_errlist_t sgx_errlist[] = { - { - SGX_ERROR_UNEXPECTED, - "Unexpected error occurred.", - NULL - }, - { - SGX_ERROR_INVALID_PARAMETER, - "Invalid parameter.", - NULL - }, - { - SGX_ERROR_OUT_OF_MEMORY, - "Out of memory.", - NULL - }, - { - SGX_ERROR_ENCLAVE_LOST, - "Power transition occurred.", - "Please refer to the sample \"PowerTransition\" for details." - }, - { - SGX_ERROR_INVALID_ENCLAVE, - "Invalid enclave image.", - NULL - }, - { - SGX_ERROR_INVALID_ENCLAVE_ID, - "Invalid enclave identification.", - NULL - }, - { - SGX_ERROR_INVALID_SIGNATURE, - "Invalid enclave signature.", - NULL - }, - { - SGX_ERROR_OUT_OF_EPC, - "Out of EPC memory.", - NULL - }, - { - SGX_ERROR_NO_DEVICE, - "Invalid SGX device.", - "Please make sure SGX module is enabled in the BIOS, and install SGX driver afterwards." - }, - { - SGX_ERROR_MEMORY_MAP_CONFLICT, - "Memory map conflicted.", - NULL - }, - { - SGX_ERROR_INVALID_METADATA, - "Invalid enclave metadata.", - NULL - }, - { - SGX_ERROR_DEVICE_BUSY, - "SGX device was busy.", - NULL - }, - { - SGX_ERROR_INVALID_VERSION, - "Enclave version was invalid.", - NULL - }, - { - SGX_ERROR_INVALID_ATTRIBUTE, - "Enclave was not authorized.", - NULL - }, - { - SGX_ERROR_ENCLAVE_FILE_ACCESS, - "Can't open enclave file.", - NULL - }, -}; - -/* Check error conditions for loading enclave */ -void print_error_message(sgx_status_t ret) -{ - size_t idx = 0; - size_t ttl = sizeof sgx_errlist/sizeof sgx_errlist[0]; - - for (idx = 0; idx < ttl; idx++) { - if(ret == sgx_errlist[idx].err) { - if(NULL != sgx_errlist[idx].suggestion) - printf("Info: %s\n", sgx_errlist[idx].suggestion); - printf("Error: %s\n", sgx_errlist[idx].message); - break; - } - } - - if (idx == ttl) - printf("Error: Unexpected error occurred.\n"); -} diff --git a/sgx-jvm/jvm-enclave/common/sgx_utilities.h b/sgx-jvm/jvm-enclave/common/sgx_utilities.h deleted file mode 100644 index 7b89a453ff..0000000000 --- a/sgx-jvm/jvm-enclave/common/sgx_utilities.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include - -typedef struct { - sgx_status_t err; - const char *message; - const char *suggestion; -} sgx_errlist_t; - -/* Check error conditions for loading enclave */ -void print_error_message(sgx_status_t ret); - -#define CHECK_SGX(cmd) { sgx_status_t ret = cmd; \ -if (ret != SGX_SUCCESS) { \ -print_error_message(ret); \ -exit(-1); \ -} \ -} diff --git a/sgx-jvm/jvm-enclave/common/untrusted_debug_print.cpp b/sgx-jvm/jvm-enclave/common/untrusted_debug_print.cpp deleted file mode 100644 index b80a752c04..0000000000 --- a/sgx-jvm/jvm-enclave/common/untrusted_debug_print.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -extern "C" { - void debug_print(const char *str) { - // Don't allow 'str' to contain format string codes that might get interpreted and screw with memory. - printf("%s", str); - fflush(stdout); - } -} diff --git a/sgx-jvm/jvm-enclave/common/untrusted_start_thread.cpp b/sgx-jvm/jvm-enclave/common/untrusted_start_thread.cpp deleted file mode 100644 index 64f33c496c..0000000000 --- a/sgx-jvm/jvm-enclave/common/untrusted_start_thread.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include -#include -#include "java_u.h" -#include "sgx_utilities.h" -#include "enclave_map.h" - -extern "C" { - struct new_thread_data { - sgx_measurement_t mr_enclave; - unsigned int nonce; - }; - void *create_new_enclave_thread(void *param) { - auto thread_data = (new_thread_data*) param; - sgx_enclave_id_t enclave_id = get_enclave_id(&thread_data->mr_enclave); - CHECK_SGX(create_new_thread(enclave_id, thread_data->nonce)); - delete thread_data; - } - void request_new_thread(sgx_measurement_t mr_enclave, unsigned int nonce) { - pthread_t enclave_thread; - new_thread_data *thread_data = new new_thread_data { mr_enclave, nonce }; - int ret = pthread_create(&enclave_thread, NULL, create_new_enclave_thread, (void *)thread_data); - assert(!ret); - } -} diff --git a/sgx-jvm/jvm-enclave/enclave/CMakeLists.txt b/sgx-jvm/jvm-enclave/enclave/CMakeLists.txt deleted file mode 100644 index e172754649..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/CMakeLists.txt +++ /dev/null @@ -1,157 +0,0 @@ -# Build file for the enclave. A few notes: -# -# - We take control over the final link of the DSO because we need very precise control over the linker flags. -# That's why we use add_custom_command to do the final link. -# - The enclave library must be signed. We self-sign here, which means the CPU won't close the debug ports. Thus it is -# not secure. - -# Compiler flags: -# -# -nostdinc: Prepare the compiler for a bare-metal style runtime environment. -# -fvisibility=hidden: Don't export symbols. -# -fpie: Resulting library is relocatable, can be loaded anywhere in the address space. -# -fstack-protector: Compiler generates extra code to protect against stack smashing exploits. -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../common ${CMAKE_CURRENT_SOURCE_DIR}/../common/build) -include_directories("/usr/include") -include_directories("${JAVA_HOME}/include") -include_directories("${JAVA_HOME}/include/linux") -include_directories(${GENERATED_RPC_DIR}) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fpie -fstack-protector") -set(ENCLAVE_UNSIGNED_OUTPUT_LIB cordaenclave.so) -set(ENCLAVE_SIGNED_OUTPUT_LIB cordaenclave.signed.so) -set(SGX_SIGN_TOOL ${SGX_SDK}/build/linux/sgx_sign) -set(PROGUARD_JAR_PATH /usr/share/proguard6.0beta1/lib/proguard.jar) -set(AVIAN_PATH ${PROJECT_SOURCE_DIR}/../../avian) -set(JDK_IMAGE ${PROJECT_SOURCE_DIR}/../../jdk8u/build/linux-x86_64-normal-server-release/images/j2re-image) -set(ENCLAVE_JAR_PATH ${PROJECT_SOURCE_DIR}/../../../verify-enclave/build/libs/corda-enclavelet.jar) -set(AVIAN_PROCESS "-debug-openjdk-src") - -# C++11 -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - -if(NOT JAVA_HOME}) - set(JAVA_HOME $ENV{JAVA_HOME} CACHE STRING "") -endif() - -if(SGX_USE_HARDWARE) - set(URTS_LIB "sgx_urts" CACHE STRING "") - set(TRTS_LIB "sgx_trts" CACHE STRING "") - set(SGX_SERVICE_LIB "sgx_tservice" CACHE STRING "") - # Avoid linking the binary against the stub libsgx_urts.so provided in the SDK rather than the real thing. - # If the stub is used, we get a message like "Please use the correct libsgx_urts from the PSW" - set(CMAKE_SKIP_BUILD_RPATH TRUE) -else() - set(URTS_LIB "sgx_urts_sim" CACHE STRING "") - set(TRTS_LIB "sgx_trts_sim" CACHE STRING "") - set(SGX_SERVICE_LIB "sgx_tservice_sim" CACHE STRING "") -endif() - -file(GLOB JAVA_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.java) -string(REPLACE ".java" ".class" CLASS_FILES "${JAVA_FILES}") - -# An RSA private key we can use to self-sign. The SGX code is very picky about the format. It must be generated like this: -# openssl genrsas -out selfsigning.pem -3 3072 -set(PRIVATE_KEY_NAME ${CMAKE_CURRENT_SOURCE_DIR}/selfsigning.pem) - -# Now add the compiled class files to our copy of the boot jar (as we need a single uni-jar for everything). -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/encjars/classpath.jar ${CMAKE_CURRENT_BINARY_DIR}/encjars/app.jar ${CMAKE_CURRENT_BINARY_DIR}/encjars/corda-enclavelet.jar ${CMAKE_CURRENT_BINARY_DIR}/encjars/jce.jar ${CMAKE_CURRENT_BINARY_DIR}/encjars/jsse.jar - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/create-boot-jar.sh ${AVIAN_PATH}/build/linux-x86_64${AVIAN_PROCESS} ${ENCLAVE_JAR_PATH} ${CMAKE_CURRENT_BINARY_DIR}/encjars ${PROGUARD_JAR_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/proguard.pro ${JDK_IMAGE} - DEPENDS ${ENCLAVE_JAR_PATH} -) - -# Convert the boot jar and app jar into an object file we can statically link. -add_executable(binaryToObject IMPORTED) -set_target_properties(binaryToObject PROPERTIES IMPORTED_LOCATION ${AVIAN_PATH}/build/linux-x86_64${AVIAN_PROCESS}/binaryToObject/binaryToObject) - -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/boot-jar.o - COMMAND binaryToObject ${CMAKE_CURRENT_BINARY_DIR}/encjars/classpath.jar ${CMAKE_CURRENT_BINARY_DIR}/boot-jar.o _binary_boot_jar_start _binary_boot_jar_end linux x86_64 - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/encjars/classpath.jar -) -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/app-jar.o - COMMAND binaryToObject ${CMAKE_CURRENT_BINARY_DIR}/encjars/app.jar ${CMAKE_CURRENT_BINARY_DIR}/app-jar.o _binary_app_jar_start _binary_app_jar_end linux x86_64 - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/encjars/app.jar -) - -# Find the Avian JVM as static objects. -set(PATH_TO_AVIAN ${AVIAN_PATH}/build/linux-x86_64${AVIAN_PROCESS}/libavian.a) - -# Generate the static dispatch table -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dispatch_table.txt ${CMAKE_CURRENT_BINARY_DIR}/dispatch_table.cpp - COMMAND python2.7 ${CMAKE_CURRENT_SOURCE_DIR}/gen_dispatch_table.py ${PATH_TO_AVIAN} ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_table.cpp.template ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dispatch_table.cpp.template -) - -include_directories("/usr/include") -include_directories("${JAVA_HOME}/include") -include_directories("${JAVA_HOME}/include/linux") - -# Compile os support, using system headers. - -set_source_files_properties(${GENERATED_EDL_FILES} PROPERTIES GENERATED TRUE) -add_library(os_support os_support.cpp stubsyms.cpp ${CMAKE_CURRENT_BINARY_DIR}/dispatch_table.cpp ${GENERATED_RPC_DIR}/java_t.h) -target_include_directories(os_support PUBLIC ${SGX_SDK_INCLUDE} ${AVIAN_PATH}/include ${AVIAN_PATH}/src ${GENERATED_RPC_DIR}) -add_dependencies(os_support GENERATED_EDL) - -# Build the enclave into a static archive. We switch off standard headers to make sure SGX headers are used. -add_library(enclave_objects enclave.cpp enclave_start_thread.cpp sgx_thread_completion.cpp ${GENERATED_RPC_DIR}/java_t.c ${CMAKE_CURRENT_BINARY_DIR}/boot-jar.o ${CMAKE_CURRENT_BINARY_DIR}/app-jar.o) -add_dependencies(enclave_objects GENERATED_EDL) -target_include_directories(enclave_objects PUBLIC ${COMMON_INCLUDE} ${SGX_SDK_INCLUDE} ${SGX_SDK_INCLUDE}/tlibc ${SGX_SDK}/sdk/tlibstdcxx/stlport ${AVIAN_PATH}/include ${AVIAN_PATH}/src ${GENERATED_RPC_DIR}) -target_compile_options(enclave_objects PUBLIC -nostdinc) - -# Linker flags: -# -# - Don't use the standard libraries or expect any OS. -# - Link against the SGX trusted enclave runtime. -# - Use a custom linker script to restrict symbol exports. -# -# We could probably use pkgconfig for a few of these. -set(ENCLAVE_LINKER_FLAGS - "-Wl,--no-undefined" - "-nostdlib" - "-nodefaultlibs" - "-nostartfiles" - "-L${SGX_LIBRARY_PATH}" - "-Wl,--whole-archive" - "-l${TRTS_LIB}" - "-Wl,--no-whole-archive" - "-Wl,--start-group" - "${PATH_TO_AVIAN}" - "libos_support.a" - "libenclave_objects.a" - "-lsgx_tstdc" - "-lsgx_tstdcxx" - "-lsgx_tcrypto" - "-l${SGX_SERVICE_LIB}" - "-Wl,--end-group" - "${CMAKE_CURRENT_SOURCE_DIR}/libz.a" - "-Wl,-Bstatic" - "-Wl,-Bsymbolic" - "-Wl,--no-undefined" - "-Wl,-pie,-eenclave_entry" - "-Wl,--export-dynamic" - "-Wl,--defsym,__ImageBase=0" - "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linkerscript.lds" -) - -# Convert to an unsigned ELF DSO. -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ENCLAVE_UNSIGNED_OUTPUT_LIB} - COMMAND ${CMAKE_CXX_COMPILER} -o ${ENCLAVE_UNSIGNED_OUTPUT_LIB} ${ENCLAVE_LINKER_FLAGS} - DEPENDS enclave_objects os_support ${SGX_LIBRARY_PATH} ${PATH_TO_AVIAN} -) - -# Sign the enclave. -add_executable(sgx_sign IMPORTED) -set_target_properties(sgx_sign PROPERTIES IMPORTED_LOCATION ${SGX_SIGN_TOOL}) -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ENCLAVE_SIGNED_OUTPUT_LIB} - COMMAND sgx_sign sign -key ${PRIVATE_KEY_NAME} -enclave ${CMAKE_CURRENT_BINARY_DIR}/${ENCLAVE_UNSIGNED_OUTPUT_LIB} -out ${CMAKE_CURRENT_BINARY_DIR}/${ENCLAVE_SIGNED_OUTPUT_LIB} -config ${CMAKE_CURRENT_SOURCE_DIR}/enclave.xml - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${ENCLAVE_UNSIGNED_OUTPUT_LIB} ${PRIVATE_KEY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/enclave.xml -) - -add_custom_target(enclave DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${ENCLAVE_SIGNED_OUTPUT_LIB}) diff --git a/sgx-jvm/jvm-enclave/enclave/aex_assert.h b/sgx-jvm/jvm-enclave/enclave/aex_assert.h deleted file mode 100644 index 0df68f0505..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/aex_assert.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Exits the enclave if passed in boolean is false. -inline void aex_assert(bool predicate) { - if (!predicate) { - abort(); - } -} diff --git a/sgx-jvm/jvm-enclave/enclave/create-boot-jar.sh b/sgx-jvm/jvm-enclave/enclave/create-boot-jar.sh deleted file mode 100755 index b7542729d2..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/create-boot-jar.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# Args: -# 1) path to avian -# 2) path to the app jar (corda-enclave.jar) -# 3) path to the output dir -# 4) path to proguard jar -# 5) path to proguard conf -# 6) path to openjdk image - -if [ ! -d "$1" ]; then echo "$1 is not a directory"; exit 1; fi -if [ ! -e "$2" ]; then echo "$2 does not exist"; exit 1; fi -if [ ! -e "$4" ]; then echo "$4 is not a ProGuard jar"; exit 1; fi - -set -ex - -avianpath=$( readlink -f $1 ) -bootjar="$avianpath/classpath.jar" -if [ ! -e "$bootjar" ]; then echo "$avianpath does not appear to be an Avian build directory"; exit 1; fi -appjar=$( readlink -f $2 ) -outputjardir=$( readlink -f $3 ) -proguard_jar=$( readlink -f $4 ) -proguard_conf=$( readlink -f $5 ) -openjdk_libs=$6/lib - -mkdir -p $outputjardir -if [ ! -e $openjdk_libs/jsse.jar ]; then - echo "$6 does not appear to be an OpenJDK directory." - exit 1 -fi - -cmd="java -jar $proguard_jar @$avianpath/../../vm.pro @$avianpath/../../openjdk.pro @$avianpath/../../corda.pro @$proguard_conf -injars $bootjar -injars $appjar -injars $openjdk_libs/jsse.jar -injars $openjdk_libs/jce.jar -outjars $outputjardir" -# echo $cmd -$cmd - -mkdir -p $outputjardir/temp -cd $outputjardir/temp -jar xf ../jce.jar -jar xf ../jsse.jar -jar xf $openjdk_libs/charsets.jar -jar xf $2 -rm -f META-INF/*.DSA -rm -f META-INF/*.RSA -rm -f META-INF/*.SF -rm -f META-INF/*.MF -jar cf ../app.jar * -cd .. -rm -r temp diff --git a/sgx-jvm/jvm-enclave/enclave/dispatch_table.cpp.template b/sgx-jvm/jvm-enclave/enclave/dispatch_table.cpp.template deleted file mode 100644 index f858619e27..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/dispatch_table.cpp.template +++ /dev/null @@ -1,53 +0,0 @@ -// Inside the enclave we don't have the rtld to do symbol lookups for us. So, we must manually compute -// the name->address mappings at compile time and then let the SGX ELF loader apply the relocs itself. -// -// Because there are quite a few symbols we might want to look up, the final file is generated using a script. -// This is just a template. -// - -#ifndef AVIAN_SGX_DISPATCH_TABLE_H -#define AVIAN_SGX_DISPATCH_TABLE_H - -#include -#include -#include - -using namespace std; - -extern "C" { -// EXTERNS HERE -} - -namespace { - struct entry { - const char *name; - const void *addr; - } entries[] = { -// ENTRIES HERE - { NULL, NULL } - }; - - static int symbol_table_size = -1; - - static int comparator(const void *e1, const void *e2) { - const struct entry *entry1 = static_cast(e1); - const struct entry *entry2 = static_cast(e2); - return strcmp(entry1->name, entry2->name); - } -} - -extern "C" const void *dlsym(void *handle, const char *name) { - if (symbol_table_size == -1) { - symbol_table_size = 0; - while (entries[symbol_table_size].name) symbol_table_size++; - } - struct entry key = {name, NULL}; - struct entry *result = (struct entry *) bsearch(&key, entries, symbol_table_size, sizeof(struct entry), comparator); - if (result) { - return result->addr; - } else { - return NULL; - } -} - -#endif //AVIAN_SGX_DISPATCH_TABLE_H diff --git a/sgx-jvm/jvm-enclave/enclave/enclave.cpp b/sgx-jvm/jvm-enclave/enclave/enclave.cpp deleted file mode 100644 index bb8e140ce5..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/enclave.cpp +++ /dev/null @@ -1,90 +0,0 @@ -// This code runs inside the SGX enclave. Its memory space is encrypted. - -#include -#include -#include -#include "internal/global_data.h" -#include - -extern "C" { - -extern void printf(const char *, ...); - -extern const uint8_t _binary_boot_jar_start[]; -extern const uint8_t _binary_boot_jar_end[]; - -__attribute__((visibility("default"))) __attribute__((used)) const uint8_t* embedded_file_boot_jar(size_t* size) { - *size = _binary_boot_jar_end - _binary_boot_jar_start; - return _binary_boot_jar_start; -} - -extern const uint8_t _binary_app_jar_start[]; -extern const uint8_t _binary_app_jar_end[]; - -__attribute__((visibility("default"))) __attribute__((used)) const uint8_t* embedded_file_app_jar(size_t* size) { - *size = _binary_app_jar_end - _binary_app_jar_start; - return _binary_app_jar_start; -} - -void check_transaction(void *reqbuf, size_t buflen, char *error) { - // TODO: Check buflen is sensible. - jsize argc = 0; - char **argv = NULL; - - JavaVMInitArgs vmArgs; - vmArgs.version = JNI_VERSION_1_2; - vmArgs.ignoreUnrecognized = JNI_TRUE; - - char xmxOption[32]; - snprintf(xmxOption, sizeof(xmxOption), "-Xmx%d", g_global_data.heap_size); - JavaVMOption options[] = { - // Tell Avian to call the functions above to find the embedded jar data. - // We separate the app into boot and app jars because some code does not - // expect to be loaded via the boot classloader. - { "-Xbootclasspath:[embedded_file_boot_jar]" }, - { "-Djava.class.path=[embedded_file_app_jar]" }, - { xmxOption } - }; - vmArgs.options = options; - vmArgs.nOptions = sizeof(options) / sizeof(JavaVMOption); - - JavaVM* vm = NULL; - JNIEnv* env = NULL; - JNI_CreateJavaVM(&vm, reinterpret_cast(&env), &vmArgs); - - env->FindClass("com/r3/enclaves/txverify/EnclaveletSerializationScheme"); - if (!env->ExceptionCheck()) { - jclass c = env->FindClass("com/r3/enclaves/txverify/Enclavelet"); - if (!env->ExceptionCheck()) { - jmethodID m = env->GetStaticMethodID(c, "verifyInEnclave", "([B)V"); - if (!env->ExceptionCheck()) { - jbyteArray reqbits = env->NewByteArray((jsize) buflen); - env->SetByteArrayRegion(reqbits, 0, buflen, static_cast(reqbuf)); - jobject result = env->CallStaticObjectMethod(c, m, reqbits); - } - } - } - - if (env->ExceptionCheck()) { - jthrowable exception = env->ExceptionOccurred(); - env->ExceptionDescribe(); - env->ExceptionClear(); // clears the exception; e seems to remain valid - - jclass clazz = env->GetObjectClass(exception); - jmethodID getMessage = - env->GetMethodID( - clazz, - "getMessage", - "()Ljava/lang/String;" - ); - jstring message = (jstring)env->CallObjectMethod(exception, getMessage); - const char *mstr = env->GetStringUTFChars(message, NULL); - strncpy(error, mstr, 1024); - // do whatever with mstr - env->ReleaseStringUTFChars(message, mstr); - } - - vm->DestroyJavaVM(); -} - -} // extern "C" diff --git a/sgx-jvm/jvm-enclave/enclave/enclave.xml b/sgx-jvm/jvm-enclave/enclave/enclave.xml deleted file mode 100644 index 323e50d364..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/enclave.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - 0 - 0 - 0x280000 - 0x8000000 - 1 - 10 - 1 - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/jvm-enclave/enclave/enclave_start_thread.cpp b/sgx-jvm/jvm-enclave/enclave/enclave_start_thread.cpp deleted file mode 100644 index a6f69c7efa..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/enclave_start_thread.cpp +++ /dev/null @@ -1,97 +0,0 @@ -#include "enclave_start_thread.h" -#include -#include -#include -#include -#include - -#include "aex_assert.h" -#include -#include - -struct new_thread_data { - void *param; - void (*thread_routine)(void *); - sgx_thread_cond_t *thread_started; - sgx_thread_completion *thread_completed; -}; - -typedef unsigned int nonce_t; -static sgx_thread_mutex_t new_thread_map_mutex; -static std::map new_thread_map; -static sgx_thread_mutex_t started_thread_data_map_mutex; -static std::map started_thread_data_map; -struct ThreadMutexInit { - ThreadMutexInit() noexcept { - sgx_thread_mutex_init(&new_thread_map_mutex, NULL); - sgx_thread_mutex_init(&started_thread_data_map_mutex, NULL); - } -}; -static ThreadMutexInit _thread_mutex_init; - -static sgx_status_t get_mr_enclave(sgx_measurement_t *mr_enclave) { - sgx_report_t report; - sgx_status_t ret = sgx_create_report(NULL, NULL, &report); - if (ret == SGX_SUCCESS) { - memcpy(mr_enclave, &report.body.mr_enclave, sizeof(sgx_measurement_t)); - } - return ret; -} - -thread_data_t *start_thread(void (*routine)(void *), void *param, sgx_thread_completion *thread_completed) { - sgx_measurement_t mr_enclave = { 0 }; - if (SGX_SUCCESS != get_mr_enclave(&mr_enclave)) { - return NULL; - } - - nonce_t nonce; - aex_assert(SGX_SUCCESS == sgx_read_rand((unsigned char*)&nonce, sizeof(nonce))); - sgx_thread_cond_t thread_started; - sgx_thread_cond_init(&thread_started, NULL); - sgx_thread_mutex_t thread_started_mutex; - sgx_thread_mutex_init(&thread_started_mutex, NULL); - sgx_thread_mutex_guard thread_started_guard(&thread_started_mutex); - new_thread_data thread_init_data = { - .param = param, - .thread_routine = routine, - .thread_started = &thread_started, - .thread_completed = thread_completed - }; - { - sgx_thread_mutex_guard new_thread_map_guard(&new_thread_map_mutex); - aex_assert(new_thread_map.find(nonce) == new_thread_map.end()); - new_thread_map[nonce] = thread_init_data; - } - request_new_thread(mr_enclave, nonce); - sgx_thread_cond_wait(&thread_started, &thread_started_mutex); - sgx_thread_mutex_guard started_thread_data_map_guard(&started_thread_data_map_mutex); - auto thread_data_iter = started_thread_data_map.find(nonce); - aex_assert(thread_data_iter != started_thread_data_map.end()); - auto thread_data = thread_data_iter->second; - started_thread_data_map.erase(thread_data_iter); - return thread_data; -} - -void create_new_thread(unsigned int nonce) { - auto thread_data = get_thread_data(); - bool thread_created = false; - new_thread_data thread_init_data; - { - sgx_thread_mutex_guard new_thread_map_guard(&new_thread_map_mutex); - auto thread_init_data_iter = new_thread_map.find(nonce); - aex_assert(thread_init_data_iter != new_thread_map.end()); - thread_init_data = thread_init_data_iter->second; - new_thread_map.erase(thread_init_data_iter); - { - sgx_thread_mutex_guard started_thread_data_map_guard(&started_thread_data_map_mutex); - aex_assert(started_thread_data_map.find(nonce) == started_thread_data_map.end()); - started_thread_data_map[nonce] = thread_data; - } - } - sgx_thread_cond_signal(thread_init_data.thread_started); - thread_init_data.thread_routine(thread_init_data.param); - if (thread_init_data.thread_completed != NULL) { - thread_init_data.thread_completed->complete(); - } -} - diff --git a/sgx-jvm/jvm-enclave/enclave/enclave_start_thread.h b/sgx-jvm/jvm-enclave/enclave/enclave_start_thread.h deleted file mode 100644 index 51316613b8..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/enclave_start_thread.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "internal/thread_data.h" - -class sgx_thread_completion; - -extern "C" { - thread_data_t *start_thread(void (*routine)(void *), void *param, sgx_thread_completion*); -} - diff --git a/sgx-jvm/jvm-enclave/enclave/gen-stubsyms.sh b/sgx-jvm/jvm-enclave/enclave/gen-stubsyms.sh deleted file mode 100755 index efe32e4976..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/gen-stubsyms.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# Pipe the output of make when stubsyms.cpp is empty to this script: -# -# sgx-experiments/enclave$ make 2>&1 | ../enclave/gen-stubsyms.sh - -workdir=`pwd`/../enclave -o=$workdir/stubsyms.cpp - -grep "undefined reference to" | tr -d "'"'`' | grep -o '[^ ]*$' | sort | uniq >$workdir/stubsyms.txt - -cat <$o -// Generated by gen-stubsyms.sh - -extern "C" { - -extern void debug_print(const char *str); -extern void abort(); - -#define STUB(x) void x() { debug_print(#x); abort(); } - -EOF - -cat $workdir/stubsyms.txt | while read; do - echo "STUB($REPLY)" >>$o -done - -echo "} // extern C" >>$o \ No newline at end of file diff --git a/sgx-jvm/jvm-enclave/enclave/gen_dispatch_table.py b/sgx-jvm/jvm-enclave/enclave/gen_dispatch_table.py deleted file mode 100755 index 5cdae3be13..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/gen_dispatch_table.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python - -# Generate a static symbol table suitable for an environment with no runtime dynamic linker. -# The table must be sorted as we scan it using a binary search. - -import os -import sys - -if len(sys.argv) < 4: - print("Usage: python gen_dispatch_table.py ") - sys.exit(1) - -libavian_a_path = sys.argv[1] -template_path = sys.argv[2] -output_dir = sys.argv[3] - -cmd = "nm --defined-only %s | awk '{print $3}' | egrep '^(Avian|Java|JVM)_.*'" % libavian_a_path -fname = "%s/dispatch_table.txt" % output_dir -os.system("echo '# This file lists all the JNI symbols that can be looked up. It was generated by gen_dispatch_table.py' >%s; %s >> %s" % (fname, cmd, fname)) - -entries = [l.strip() for l in open(fname, "r").readlines() if not l.startswith("#")] -entries.sort() -template_lines = file(template_path).readlines() -externs_index = template_lines.index("// EXTERNS HERE\n") -externs = ["void %s();\n" % entry for entry in entries] -template_lines[externs_index:externs_index + 1] = externs -dispatch_entries = ["{ \"%s\", vm::voidPointer(%s) },\n" % (e, e) for e in entries] -dispatch_entries_index = template_lines.index("// ENTRIES HERE\n") -template_lines[dispatch_entries_index:dispatch_entries_index + 1] = dispatch_entries -file("%s/dispatch_table.cpp" % output_dir, "w").writelines(template_lines) diff --git a/sgx-jvm/jvm-enclave/enclave/libz.a b/sgx-jvm/jvm-enclave/enclave/libz.a deleted file mode 100644 index 1db99f43b0..0000000000 Binary files a/sgx-jvm/jvm-enclave/enclave/libz.a and /dev/null differ diff --git a/sgx-jvm/jvm-enclave/enclave/linkerscript.lds b/sgx-jvm/jvm-enclave/enclave/linkerscript.lds deleted file mode 100644 index 3dfd7f41af..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/linkerscript.lds +++ /dev/null @@ -1,9 +0,0 @@ -cordaenclave.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - local: - *; -}; diff --git a/sgx-jvm/jvm-enclave/enclave/os_support.cpp b/sgx-jvm/jvm-enclave/enclave/os_support.cpp deleted file mode 100644 index 68ea8f495b..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/os_support.cpp +++ /dev/null @@ -1,393 +0,0 @@ -// -// Stubs for functionality that would normally be provided by the operating system. -// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -extern "C" { - -#undef stdout -#undef stderr -FILE *stdout = (FILE*) 0; -FILE *stderr = (FILE*) 1; - -int __vfprintf_chk(FILE *stream, int flag, const char *s, va_list va) { - int res = 0; - if (stream == stdout || stream == stderr) { - char msg[512]; - res = vsnprintf((char *) &msg, sizeof(msg), s, va); - debug_print(msg); - } else { - char msg[512]; - vsnprintf(msg, sizeof(msg), s, va); - printf("STUB: Attempt to write to file %s: %s\n", (char*)stream, msg); - } - return res; -} - -int vfprintf(FILE *stream, const char *s, va_list va) { - return __vfprintf_chk(stream, 0, s, va); -} - -int __printf_chk(int flag, char *s, ...) { - va_list va; - va_start(va, s); - int res = vfprintf(0, s, va); - va_end(va); - return res; -} - -int printf(const char *s, ...) { - va_list va; - va_start(va, s); - int res = vfprintf(stdout, s, va); - va_end(va); - return res; -} - -// puts/fputs calls are often the result of the compiler converting printf calls to them statically, to skip string parsing overhead. -int puts(const char *str) { - return printf("%s\n", str); -} - -int fputs(const char *s, FILE *stream) { - // Note that whilst puts adds a newline, fputs doesn't. - return fprintf(stream, "%s", s); -} - -int fputc(int c, FILE *stream) { - return fprintf(stream, "%c", c); -} - -int __fprintf_chk(FILE *f, int flag, const char *s, ...) { - va_list va; - va_start(va, s); - int res = vfprintf(f, s, va); - va_end(va); - return res; -} - -int fprintf(FILE *f, const char *s, ...) { - va_list va; - va_start(va, s); - int res = vfprintf(f, s, va); - va_end(va); - return res; -} - -int sprintf(char *str, const char *format, ...) { - // Unsafe version of snprintf. - va_list va; - va_start(va, format); - int res = vsnprintf(str, 1024*1024, format, va); - va_end(va); - return res; -} - -FILE *fopen(const char *path, const char *mode) { - printf("STUB: Attempt to open %s with mode %s\n", path, mode); - return (FILE*) strdup(path); -} - -int fclose(FILE *f) { - return 0; -} - -int fflush(FILE *stream) { - return 0; -} -__asm__(".symver fflush,fflush@@GLIBC_2.2.5"); - -size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { - printf("STUB: fread\n"); - errno = -EPERM; - return (size_t) -1; -} - -size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) { - printf("STUB: fwrite\n"); - errno = -EPERM; - return (size_t) -1; -} - -ssize_t read(int fd, void *buf, size_t count) { - printf("STUB: read\n"); - errno = -EPERM; - return (ssize_t) -1; -} - -ssize_t write(int fd, const void *buf, size_t count) { - if (fd == 0 || fd == 1 || fd == 2) { - if (fd != 2) - for (size_t i = 0; i < count; i++) { - printf("%c", ((const char*)buf)[i]); - } - } else { - printf("STUB: write(%d)\n", fd); - } - return count; -} - -int close(int fd) { - return 0; -} - -int open(const char *path, int flags) { - printf("STUB: open\n"); - errno = -EPERM; - return -1; -} - -int dup2(int fd1, int fd2) { - printf("STUB: dup2(%d, %d)\n", fd1, fd2); - return -1; -} - -int gettimeofday(struct timeval *tv, struct timezone *tz) { - if (tv) { - tv->tv_sec = 0; - tv->tv_usec = 0; - } - if (tz) { - tz->tz_dsttime = 0; - tz->tz_minuteswest = 0; - } - return 0; -} - -void exit(int status) { - printf("STUB: exit(%d)\n", status); - while(1); // Avoid warning about a noreturn function that actually returns. -} - -pid_t fork() { - printf("STUB: fork\n"); - errno = -ENOSYS; - return -1; -} - -int kill(pid_t pid, int sig) { - errno = -EPERM; - return -1; -} - -// Just some dummy environment variables. -const char *_environ[] = { "HOME=/", "HOSTNAME=enclave", NULL }; -char **environ = (char**) environ; - -char *getenv(const char *varname) { - // Could do a proper search here, but this isn't the right way to pass data into an enclave anyway. - if (!strcmp(varname, "HOME")) { - return (char*) "/"; - } else if (!strcmp(varname, "HOSTNAME")) { - return (char*) "enclave"; - } else { - return NULL; - } -} - -int putenv(char *envstr) { - return 0; -} - -char *getcwd(char *buf, size_t size) { - if (!buf) { - buf = (char*) malloc(size); - } - if (!buf) { - return NULL; - } - strncpy(buf, "/", size); - return buf; -} - -int execvp(const char *file, char *const argv[]) { - printf("STUB: execvp(%s)", file); - errno = -ENOSYS; - return -1; -} - -int waitpid(pid_t pid, int *status, int options) { - printf("STUB: waitpid"); - errno = -ENOSYS; - return -1; -} - -static struct utsname uname_data = { - /*sysname:*/ "linux-sgx", - /*nodename:*/ "enclave", - /*release:*/ "1.0", - /*version:*/ "1.0", - /*machine:*/ "enclave", -#ifdef _GNU_SOURCE - /*domainname:*/ "enclave" -#endif -}; - -int uname(struct utsname *buf) { - if (buf) { - memcpy(buf, &uname_data, sizeof(struct utsname)); - } else { - errno = -EFAULT; - return -1; - } - return 0; -} - -int pipe(int pipefd[2]) { - printf("STUB: pipe()"); - errno = -ENOSYS; - return -1; -} - -int fcntl(int fd, int cmd, ... ) { - printf("STUB: fcntl(%d)", fd); - errno = -ENOSYS; - return -1; -} - -const unsigned short * * __ctype_b_loc() { - printf("STUB: __ctype_b_loc"); - return NULL; -} - -static char ctime_buf[256] = {0}; - -char *ctime(const time_t *timep) { - return ctime_r(timep, ctime_buf); -} - -char *ctime_r(const time_t *timep, char *buf) { - if (!buf) { - errno = -EFAULT; - return NULL; - } - *buf = '\0'; - printf("STUB: ctime_r"); - return NULL; -} - -int getrlimit(int resource, struct rlimit *rlim) { - if (resource == RLIMIT_NOFILE) { - rlim->rlim_max = 64; // Fake FD limit. - } else { - printf("STUB: getrlimit\n"); - rlim->rlim_max = 0; - } - return 0; -} - - -int sigemptyset(sigset_t *set) { - return 0; -} - -int sigfillset(sigset_t *set) { - return 0; -} - -int sigaddset(sigset_t *set, int signum) { - return 0; -} - -int sigaction(int signum, const struct sigaction *act, - struct sigaction *oldact) { - return 0; -} - -int sigprocmask(int how, const sigset_t *set, sigset_t *oldset) { - return 0; -} - -char *setlocale(int category, const char *locale) { - if (locale && *locale != '\0') - printf("STUB: setlocale(%s)\n", locale); - return (char*) "C"; -} - -char *strcpy(char *dest, const char *src) { - return strncpy(dest, src, strlen(src) + 1); -} - -char *nl_langinfo(nl_item item) { - if (item != CODESET) { - printf("STUB: nl_langinfo(%d)\n", item); - } - return (char*) ""; -} - -uid_t getuid() { - return 1; // Not zero, don't tell the app it's root. -} - -static struct passwd passwd_info = { - (char*) "enclave", /* username */ - (char*) "", /* user password */ - 1, /* user ID */ - 1, /* group ID */ - (char*) "", /* user information */ - (char*) "/", /* home directory */ - (char*) "there is no shell" /* shell program */ -}; - -struct passwd *getpwuid(uid_t uid) { - if (uid != 1) - printf("STUB: getpwuid(%d)\n", uid); - return &passwd_info; -} - -void tzset() { -} - -long sysconf(int name) { - if (name == _SC_NPROCESSORS_ONLN) { - return 1; // 1 active processor. - } else { - printf("STUB: sysconf(%d)\n", name); - return -1; - } -} - -char *realpath(const char *path, char *resolved_path) { - if (!strcmp(path, "/.")) - strcpy(resolved_path, "/"); - else if (!strncmp(path, "/[", 2)) - strcpy(resolved_path, path + 1); - else { - printf("STUB: realpath(%s)\n", path); - return NULL; - } -} - -int stat64(const char *pathname, struct stat64 *buf) { - if (pathname[0] == '[') { - // stat64("[embedded_foo_jar]") - return -1; - } - printf("STUB: stat64(%s)\n", pathname); - return -1; -} - -int access(const char *pathname, int mode) { - printf("STUB: access(%s)\n", pathname); - errno = -EPERM; - return -1; -} - - -} \ No newline at end of file diff --git a/sgx-jvm/jvm-enclave/enclave/proguard.pro b/sgx-jvm/jvm-enclave/enclave/proguard.pro deleted file mode 100644 index 657eed8eb7..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/proguard.pro +++ /dev/null @@ -1,45 +0,0 @@ -# ProGuard config for how to strip the enclave JAR down to a size that actually fits. - --verbose - -# Renaming of class members would make it harder to dynamically load code. --dontoptimize - -# Bytecode optimizations can break things, disable for now. --dontobfuscate - -# OpenJDK generates so many warnings we have to disable them. --ignorewarnings --dontwarn --dontnote - -# Root the Corda code so the enclavelet and everything statically reachable from it is kept. --keep public class com.r3.enclaves.*.Enclavelet { - public static *; -} - -# Kryo accesses its own serialisers via reflection. --keep class com.esotericsoftware.kryo.serializers.** --keepclassmembers class com.esotericsoftware.kryo.serializers.** { - ; - ; -} - -# Ditto, this serializer is constructed using reflection, so we must not optimize out the constructor. --keepclassmembers class node.corda.core.serialization.ImmutableClassSerializer { - ; -} - -# Quick hack to stop things we need to deserialize being stripped out. --keep class com.r3.contracts.** --keepclassmembers class node.corda.contracts.** { - ; - ; -} - --keep class com.sun.crypto.provider.** { *; } --keep class sun.security.internal.** { *; } --keep class sun.security.provider.** { *; } --keep class javax.crypto.** { *; } --keep class sun.nio.cs.** { * ; } --keep class java.util.** { *; } \ No newline at end of file diff --git a/sgx-jvm/jvm-enclave/enclave/selfsigning.pem b/sgx-jvm/jvm-enclave/enclave/selfsigning.pem deleted file mode 100644 index 976edc7d8f..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/selfsigning.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4wIBAAKCAYEA0WN8oK1vGpJDTt81rc5csT5umw1rIkiymw8c9v5J1Yn+tXNd -GuaAqKj/xlbOtO4GjCvhOTsZnI0kklchrb4qYVs4SrLRecHjrwdACnwhgF/mkuMa -D9eOhNwgoVQTOsuLF7lHdUEN429Q9ER81S3wuEpOlQgU81Qiyi3UHVpmvxqoelzB -6ubDYWxCBGKpyGNflxcWE7Uic4Kp6S3b4gblRjmnuRipTV6aHh4vlKR69gNhGZst -LO5L/bqMb+kGKTbR537ouq0R8nfkhUGroP62UPkg7Uq0BktAMdo1pAJlKC2Rnzyq -kc3+05KWl+NSpEXN23BfPEL/Bx3AQ1lu0KlAuLTtT4zBkWqnAbo4UiP6/v+/o5L9 -RFu7oSQODTIrnfed7ojOll9SBxaG8jlXKx/o/ePoYfyDegzFyX1MkMY0fUrg8Li3 -CCzcDfPExl4r1gYEpVjACBBO8mBOsK3KSO6THm92bA7/alAEg7a5pTn/8NYwI6xH -dLlGizJ6idIYWervAgEDAoIBgQCLl6hrHkoRtteJ6iPJND3LfvRnXkdsMHcSChNP -VDE5BqnOTOi8masbG1Uu5InN9ARdcpYmJ2ZoXhhhj2vJKXGWPNAxzIumgUJ0r4AG -/Wuq6pm3QhFf5Qmt6BXA4rd8h7IP0NpOK16Xn4tNgv3jc/XQMYm4sA33jWyGyTgT -kZnUvHBRkyvx7yzrnYFYQcaFl5UPZLlieMGiVxvwyT1BWe4u0Rp7ZcYzlGa+vspj -GFH5V5YREh4d9DKpJwhKm1lwzzVlnIjerY9e7hIlM5R54R4lWb+C4+LF/mwHL8eU -Kp5EWno6+Hlr2TAnqLmZTunOG2uqfmJTvcP7G3KBTKd4WCk5IXYsJkIJBIzadp1F -mgzTTHe65nspGKaLQZpdyzecR/JWRjgu/Z9oDkDCUThHBu80Qr3dM+/R9OdanP4S -G3d3EjZKN6L151YOH/G5B1PiraX2f9BzZ9loP4OKvf103FCgg0z9sCb0j7n+g53l -xdy8eJ06WiSaV679lTp9AO4ErlsCgcEA6izSkT/2N2KPTqyEfEka7MHLtwp80Q4M -aK7OVR92bj70OSbtkwi5SunjBgoloAJhw3INq9c2Coz9/HJduviGVNBZWTOavOPf -NXtBIAPwDwyyxdli5zQP/s+M0Zu+LML3chMSIwDJHRtY3iE6ycIhW1KBqF2VoIVJ -jjRzw/t+wZqAE6Jmv/jZpyZ+pJuOUkPumELKfzpQzXuzJ+pMBCSH0DgI3LIu3ZLB -jD5wNKHvgBRX7Qtw92fKG/wQKhUDK8gFAoHBAOTnSNtoxKywOf7HyG3j7iwwtfHq -Yww/kb5ju/CjAVNm5g2hBtz/fU0rnSvizk8aSphAvhLPIwPnloT0FeEsfI4yYrQf -w8b/9ISNC0m497MAWUVf4Z+CsdFyGa7lmgbIuvsMaCziGc3lzPCeR/bTYNQtSe3R -Bh6YITNdW7GhgokVD23C29dZAVGdW4w3n6+9nRtWPNu6OAiFVjimghV/kl1yehLU -lh3lq/my3JfvRVYM7F8Zn5XN9fLWkqQ7sCcdYwKBwQCcHeG2KqQk7F+JyFhS22dI -gTJ6Bv3gtAhFyd7jak70KfgmGfO3WyYx8UIEBsPAAZaCTAkdOiQHCKlS9uknUFmN -4DuQzRHTQpTOUitqrUq0syHZO5dEzV//NQiLvSlzLKT2t2FsqzC+Ejs+wNHb1sDn -jFZwPmPAWNu0IvfX/P8rvFVibER/+zvExFRtvQmMLUm61zGqJuCI/SIanDKtba/g -JVs9zB8+YdZdfvV4a/UADY/zXPX6RTFn/WAcDgIdMAMCgcEAmJowkkXYcyAmqdqF -npf0HXXOoUbsstUL1EJ9SxdWN5nus8CvPf+o3h0Tcpc0NLwxutXUDIoXV++5rfgO -lh2oXsxBzWqChKqjAwiyMSX6d1WQ2OqWalchNkwRH0O8BIXR/LLwHewRM+6IoGmF -TzeV4sjb8+CuvxAWIj49IRZXBg4KSSySj5Cri749CCUVH9O+Ejl959F6sFjkJcRW -uP+26Pb8DI25aUPH+8yTD/TY5AidlLu/uTP5TI8MbX0gGhOXAoHAB0s/g7QLEiuf -KsbqhnH+6VWgjAMrlBI84lRM53UeM7YA2ww9np7lMMqGfHQPfWKKwMb3sTjRP5m0 -BWUpmP4Rivswhj1or8+7X7G2R4IYI34PjTMDlmsrihj4mVfpsi8eDhLEvBKDo+Nl -W/PImwd8eJtQLGw+dlFjnKbNFAUz42vcvDpK5jz1pfoXITzVvZNCoDFE7SUlzlJe -5dm68k56jbnvHP7gU+fCnxHlBbscWOE5HA17lA5tpJ1JUDrVea/4 ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/jvm-enclave/enclave/sgx_thread_completion.cpp b/sgx-jvm/jvm-enclave/enclave/sgx_thread_completion.cpp deleted file mode 100644 index 3b7b5fbe47..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/sgx_thread_completion.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include - -void sgx_thread_completion::complete() noexcept { - sgx_thread_mutex_lock(&mutex); - completed = true; - sgx_thread_mutex_unlock(&mutex); - sgx_thread_cond_signal(&thread_complete); -} - -void sgx_thread_completion::wait() noexcept { - sgx_thread_mutex_lock(&mutex); - if (!completed) { - sgx_thread_cond_wait(&thread_complete, &mutex); - } - sgx_thread_mutex_unlock(&mutex); -} diff --git a/sgx-jvm/jvm-enclave/enclave/stubsyms.cpp b/sgx-jvm/jvm-enclave/enclave/stubsyms.cpp deleted file mode 100644 index fbf091244b..0000000000 --- a/sgx-jvm/jvm-enclave/enclave/stubsyms.cpp +++ /dev/null @@ -1,117 +0,0 @@ -// Generated by gen-stubsyms.sh - -extern "C" { - -extern void debug_print(const char *str); -extern void abort(); - -#define STUB(x) void x() { debug_print(#x); abort(); } - -STUB(accept) -STUB(__assert_fail) -STUB(bind) -STUB(chdir) -STUB(chmod) -STUB(chown) -STUB(clone) -STUB(closedir) -STUB(connect) -STUB(dlclose) -STUB(dlopen) -STUB(dup) -STUB(epoll_create) -STUB(epoll_ctl) -STUB(epoll_wait) -STUB(execve) -STUB(_exit) -STUB(fchmod) -STUB(fchown) -STUB(fdatasync) -STUB(fgets) -STUB(fileno) -STUB(fpathconf) -STUB(freeaddrinfo) -STUB(fscanf) -STUB(fstat) -STUB(fstat64) -STUB(fsync) -STUB(ftruncate) -STUB(ftruncate64) -STUB(gai_strerror) -STUB(getaddrinfo) -STUB(getegid) -STUB(geteuid) -STUB(getgid) -STUB(getgrgid_r) -STUB(getgrnam_r) -STUB(gethostname) -STUB(getnameinfo) -STUB(getpeername) -STUB(getpid) -STUB(getpwnam_r) -STUB(getpwuid_r) -STUB(getsockname) -STUB(getsockopt) -STUB(htonl) -STUB(htons) -STUB(inet_pton) -STUB(ioctl) -STUB(isatty) -STUB(lchown) -STUB(link) -STUB(listen) -STUB(lseek) -STUB(lseek64) -STUB(lstat) -STUB(lstat64) -STUB(madvise) -STUB(mkdir) -STUB(mknod) -STUB(mmap64) -STUB(munmap) -STUB(ntohl) -STUB(ntohs) -STUB(open64) -STUB(opendir) -STUB(pathconf) -STUB(poll) -STUB(pread64) -STUB(pthread_kill) -STUB(pthread_mutex_lock) -STUB(pthread_mutex_unlock) -STUB(pthread_self) -STUB(putchar) -STUB(pwrite64) -STUB(readdir64) -STUB(readdir64_r) -STUB(readlink) -STUB(readv) -STUB(recv) -STUB(recvfrom) -STUB(recvmsg) -STUB(remove) -STUB(rename) -STUB(rmdir) -STUB(send) -STUB(sendfile64) -STUB(sendmsg) -STUB(sendto) -STUB(setsockopt) -STUB(shutdown) -STUB(socket) -STUB(socketpair) -STUB(stat) -STUB(statvfs64) -STUB(stdin) -STUB(strcat) -STUB(symlink) -STUB(syscall) -STUB(tcgetattr) -STUB(tcsetattr) -STUB(timezone) -STUB(umask) -STUB(unlink) -STUB(utimes) -STUB(vfork) -STUB(writev) -} // extern C diff --git a/sgx-jvm/jvm-enclave/jni/CMakeLists.txt b/sgx-jvm/jvm-enclave/jni/CMakeLists.txt deleted file mode 100644 index a58daf648a..0000000000 --- a/sgx-jvm/jvm-enclave/jni/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(jni_sgx) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../enclave ${CMAKE_CURRENT_SOURCE_DIR}/../enclave/build) - -set(VERIFY_ENCLAVE_JNI_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../verify-enclave/build/native/include) -include_directories("${JAVA_HOME}/include") -include_directories("${JAVA_HOME}/include/linux") -include_directories(${VERIFY_ENCLAVE_JNI_INCLUDE_DIR}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common) -include_directories(${GENERATED_RPC_DIR}) -include_directories(${SGX_SDK_INCLUDE}) - -add_library(urtslib SHARED IMPORTED) -set_target_properties(urtslib PROPERTIES IMPORTED_LOCATION ${SGX_LIBRARY_PATH}/lib${URTS_LIB}.so) - -add_library(untrusted_corda_sgx SHARED jni_sgx_api.cpp ${VERIFY_ENCLAVE_JNI_INCLUDE_DIR}/jni_sgx_api.h $) -target_link_libraries(untrusted_corda_sgx urtslib) -add_dependencies(untrusted_corda_sgx enclave common) diff --git a/sgx-jvm/jvm-enclave/jni/jni_sgx_api.cpp b/sgx-jvm/jvm-enclave/jni/jni_sgx_api.cpp deleted file mode 100644 index cc21532e7e..0000000000 --- a/sgx-jvm/jvm-enclave/jni/jni_sgx_api.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "jni_sgx_api.h" - -#include "java_u.h" -#include "sgx_utilities.h" -#include "enclave_map.h" -#include "enclave_metadata.h" -#include - -extern "C" { - -JNIEXPORT jstring JNICALL Java_com_r3_enclaves_txverify_NativeSgxApi_verify(JNIEnv *env, jclass, jstring enclave_path, jbyteArray transaction) { - sgx_launch_token_t token = {0}; - sgx_enclave_id_t enclave_id = {0}; - int updated = 0; - - const char *enclave_path_sz = env->GetStringUTFChars(enclave_path, NULL); - jbyte *transaction_bytes = env->GetByteArrayElements(transaction, NULL); - - sgx_measurement_t mr_enclave; - enclave_hash_result_t hash_result = retrieve_enclave_hash(enclave_path_sz, mr_enclave.m); - if (EHR_SUCCESS != hash_result) { - return NULL; - } - - CHECK_SGX(sgx_create_enclave(enclave_path_sz, SGX_DEBUG_FLAG, &token, &updated, &enclave_id, NULL)); - add_enclave_mapping(&mr_enclave, enclave_id); - - char error[1024] = {0}; - printf("Array length %d\n", env->GetArrayLength(transaction)); - CHECK_SGX(check_transaction(enclave_id, transaction_bytes, env->GetArrayLength(transaction), &error[0])); - if (error[0]) { - return env->NewStringUTF(error); - } else { - return NULL; - } -} - -} diff --git a/sgx-jvm/jvm-enclave/standalone/CMakeLists.txt b/sgx-jvm/jvm-enclave/standalone/CMakeLists.txt deleted file mode 100644 index 79cefc6e11..0000000000 --- a/sgx-jvm/jvm-enclave/standalone/CMakeLists.txt +++ /dev/null @@ -1,40 +0,0 @@ -cmake_minimum_required(VERSION 3.5) -project(standalone_sgx_verify) - -# -# Enclave library -# -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../enclave ${CMAKE_CURRENT_SOURCE_DIR}/../enclave/build) - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g") -set(CMAKE_CXX_FLAGS_DEBUG "-DNDEBUG -DEDEBUG -UDEBUG -g") # For "pre-release" mode - -# -# SGX SDK -# -include_directories("${SGX_SDK}/include") - -add_library(urtslib SHARED IMPORTED) -set_target_properties(urtslib PROPERTIES IMPORTED_LOCATION ${SGX_LIBRARY_PATH}/lib${URTS_LIB}.so) - -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_package(Threads REQUIRED) - - -# -# Untrusted loader app -# - -include_directories(${GENERATED_RPC_DIR}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../common) -# TODO: Do the "-fPIC -wno-attributes" flags matter? - -set(SOURCE_FILES main.cpp) -set_source_files_properties(${GENERATED_RPC_DIR}/java_u.c PROPERTIES GENERATED TRUE) -link_directories(${DEPENDENCIES_LIBRARY_PATH}) -add_executable(standalone_sgx_verify ${SOURCE_FILES} $) -target_include_directories(standalone_sgx_verify PUBLIC ${SGX_SDK_INCLUDE}) -target_link_libraries(standalone_sgx_verify urtslib Threads::Threads) -add_dependencies(standalone_sgx_verify enclave) diff --git a/sgx-jvm/jvm-enclave/standalone/main.cpp b/sgx-jvm/jvm-enclave/standalone/main.cpp deleted file mode 100644 index 1090ce922f..0000000000 --- a/sgx-jvm/jvm-enclave/standalone/main.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include -#include -#include -#include "sgx_utilities.h" -#include "java_u.h" -#include "enclave_map.h" -#include "enclave_metadata.h" - -static sgx_measurement_t mr_enclave; - -int main(int argc, char **argv) { - sgx_launch_token_t token = {0}; - sgx_enclave_id_t enclave_id = {0}; - int updated = 0; - - const char *enclave_path = "../../enclave/build/cordaenclave.signed.so"; - enclave_hash_result_t hash_result = retrieve_enclave_hash(enclave_path, mr_enclave.m); - if (EHR_SUCCESS != hash_result) { - printf("Unable to retrieve MRENCLAVE from enclave\n"); - exit(1); - } - - CHECK_SGX(sgx_create_enclave(enclave_path, SGX_DEBUG_FLAG, &token, &updated, &enclave_id, NULL)); - add_enclave_mapping(&mr_enclave, enclave_id); - - if (argc < 2) { - printf("Usage: /path/to/req/file\n"); - exit(1); - } - std::ifstream file(argv[1]); - std::vector reqbytes; - if (!file.eof() && !file.fail()) { - file.seekg(0, std::ios_base::end); - std::streampos fileSize = file.tellg(); - reqbytes.resize(fileSize); - - file.seekg(0, std::ios_base::beg); - file.read(&reqbytes[0], fileSize); - } - if (reqbytes.size() == 0) { - printf("Could not load %s\n", argv[1]); - } - - char error[1024]; - CHECK_SGX(check_transaction(enclave_id, reqbytes.data(), reqbytes.size(), &error[0])); - - sgx_destroy_enclave(enclave_id); - - return 0; -} diff --git a/sgx-jvm/jvm-enclave/test/Makefile b/sgx-jvm/jvm-enclave/test/Makefile deleted file mode 100644 index 3283fe5679..0000000000 --- a/sgx-jvm/jvm-enclave/test/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -.PHONY: all test clean - -LIBDIR = ../common -SDKDIR = ../../linux-sgx/common/inc -SOURCE = tests.cpp ${LIBDIR}/enclave_map.cpp -HEADERS = ${LIBDIR}/enclave_map.h ${LIBDIR}/elf_types.h ${LIBDIR}/sgx_types.h -RESULT = tests - -all: ${RESULT} - -${RESULT}: ${SOURCE} ${HEADERS} - g++ -std=c++11 -o $@ -I${LIBDIR} -I${SDKDIR} ${SOURCE} - -test: ${RESULT} - ./${RESULT} - -clean: - @rm -f ${RESULT} diff --git a/sgx-jvm/jvm-enclave/test/catch.hpp b/sgx-jvm/jvm-enclave/test/catch.hpp deleted file mode 100644 index 882699eabc..0000000000 --- a/sgx-jvm/jvm-enclave/test/catch.hpp +++ /dev/null @@ -1,12796 +0,0 @@ -/* - * Catch v2.1.2 - * Generated: 2018-02-09 17:05:21.506253 - * ---------------------------------------------------------- - * This file has been merged from multiple headers. Please don't edit it directly - * Copyright (c) 2018 Two Blue Cubes Ltd. All rights reserved. - * - * Distributed under the Boost Software License, Version 1.0. (See accompanying - * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - */ -#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -// start catch.hpp - - -#define CATCH_VERSION_MAJOR 2 -#define CATCH_VERSION_MINOR 1 -#define CATCH_VERSION_PATCH 2 - -#ifdef __clang__ -# pragma clang system_header -#elif defined __GNUC__ -# pragma GCC system_header -#endif - -// start catch_suppress_warnings.h - -#ifdef __clang__ -# ifdef __ICC // icpc defines the __clang__ macro -# pragma warning(push) -# pragma warning(disable: 161 1682) -# else // __ICC -# pragma clang diagnostic ignored "-Wunused-variable" -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wpadded" -# pragma clang diagnostic ignored "-Wswitch-enum" -# pragma clang diagnostic ignored "-Wcovered-switch-default" -# endif -#elif defined __GNUC__ -# pragma GCC diagnostic ignored "-Wunused-variable" -# pragma GCC diagnostic ignored "-Wparentheses" -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wpadded" -#endif -// end catch_suppress_warnings.h -#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) -# define CATCH_IMPL -# define CATCH_CONFIG_ALL_PARTS -#endif - -// In the impl file, we want to have access to all parts of the headers -// Can also be used to sanely support PCHs -#if defined(CATCH_CONFIG_ALL_PARTS) -# define CATCH_CONFIG_EXTERNAL_INTERFACES -# if defined(CATCH_CONFIG_DISABLE_MATCHERS) -# undef CATCH_CONFIG_DISABLE_MATCHERS -# endif -# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER -#endif - -#if !defined(CATCH_CONFIG_IMPL_ONLY) -// start catch_platform.h - -#ifdef __APPLE__ -# include -# if TARGET_OS_OSX == 1 -# define CATCH_PLATFORM_MAC -# elif TARGET_OS_IPHONE == 1 -# define CATCH_PLATFORM_IPHONE -# endif - -#elif defined(linux) || defined(__linux) || defined(__linux__) -# define CATCH_PLATFORM_LINUX - -#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) -# define CATCH_PLATFORM_WINDOWS -#endif - -// end catch_platform.h - -#ifdef CATCH_IMPL -# ifndef CLARA_CONFIG_MAIN -# define CLARA_CONFIG_MAIN_NOT_DEFINED -# define CLARA_CONFIG_MAIN -# endif -#endif - -// start catch_user_interfaces.h - -namespace Catch { - unsigned int rngSeed(); -} - -// end catch_user_interfaces.h -// start catch_tag_alias_autoregistrar.h - -// start catch_common.h - -// start catch_compiler_capabilities.h - -// Detect a number of compiler features - by compiler -// The following features are defined: -// -// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? -// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? -// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? -// **************** -// Note to maintainers: if new toggles are added please document them -// in configuration.md, too -// **************** - -// In general each macro has a _NO_ form -// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. -// Many features, at point of detection, define an _INTERNAL_ macro, so they -// can be combined, en-mass, with the _NO_ forms later. - -#ifdef __cplusplus - -# if __cplusplus >= 201402L -# define CATCH_CPP14_OR_GREATER -# endif - -# if __cplusplus >= 201703L -# define CATCH_CPP17_OR_GREATER -# endif - -#endif - -#if defined(CATCH_CPP17_OR_GREATER) -# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -#endif - -#ifdef __clang__ - -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ - _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") -# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) -# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -#endif // __clang__ - -//////////////////////////////////////////////////////////////////////////////// -// We know some environments not to support full POSIX signals -#if defined(__CYGWIN__) || defined(__QNX__) - -# if !defined(CATCH_CONFIG_POSIX_SIGNALS) -# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -# endif - -#endif - -#ifdef __OS400__ -# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -# define CATCH_CONFIG_COLOUR_NONE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Cygwin -#ifdef __CYGWIN__ - -// Required for some versions of Cygwin to declare gettimeofday -// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin -# define _BSD_SOURCE - -#endif // __CYGWIN__ - -//////////////////////////////////////////////////////////////////////////////// -// Visual C++ -#ifdef _MSC_VER - -# if _MSC_VER >= 1900 // Visual Studio 2015 or newer -# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -# endif - -// Universal Windows platform does not support SEH -// Or console colours (or console at all...) -# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -# define CATCH_CONFIG_COLOUR_NONE -# else -# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH -# endif - -#endif // _MSC_VER - -//////////////////////////////////////////////////////////////////////////////// - -// Use of __COUNTER__ is suppressed during code analysis in -// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly -// handled by it. -// Otherwise all supported compilers support COUNTER macro, -// but user still might want to turn it off -#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) - #define CATCH_INTERNAL_CONFIG_COUNTER -#endif - -#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) -# define CATCH_CONFIG_COUNTER -#endif -#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) -# define CATCH_CONFIG_WINDOWS_SEH -#endif -// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. -#if !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) -# define CATCH_CONFIG_POSIX_SIGNALS -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_INTERNAL_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) -# define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -#endif - -#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS -#endif - -// end catch_compiler_capabilities.h -#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line -#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) -#ifdef CATCH_CONFIG_COUNTER -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) -#else -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) -#endif - -#include -#include -#include - -namespace Catch { - - struct CaseSensitive { enum Choice { - Yes, - No - }; }; - - class NonCopyable { - NonCopyable( NonCopyable const& ) = delete; - NonCopyable( NonCopyable && ) = delete; - NonCopyable& operator = ( NonCopyable const& ) = delete; - NonCopyable& operator = ( NonCopyable && ) = delete; - - protected: - NonCopyable(); - virtual ~NonCopyable(); - }; - - struct SourceLineInfo { - - SourceLineInfo() = delete; - SourceLineInfo( char const* _file, std::size_t _line ) noexcept - : file( _file ), - line( _line ) - {} - - SourceLineInfo( SourceLineInfo const& other ) = default; - SourceLineInfo( SourceLineInfo && ) = default; - SourceLineInfo& operator = ( SourceLineInfo const& ) = default; - SourceLineInfo& operator = ( SourceLineInfo && ) = default; - - bool empty() const noexcept; - bool operator == ( SourceLineInfo const& other ) const noexcept; - bool operator < ( SourceLineInfo const& other ) const noexcept; - - char const* file; - std::size_t line; - }; - - std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); - - // Use this in variadic streaming macros to allow - // >> +StreamEndStop - // as well as - // >> stuff +StreamEndStop - struct StreamEndStop { - std::string operator+() const; - }; - template - T const& operator + ( T const& value, StreamEndStop ) { - return value; - } -} - -#define CATCH_INTERNAL_LINEINFO \ - ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) - -// end catch_common.h -namespace Catch { - - struct RegistrarForTagAliases { - RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); - }; - -} // end namespace Catch - -#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS - -// end catch_tag_alias_autoregistrar.h -// start catch_test_registry.h - -// start catch_interfaces_testcase.h - -#include -#include - -namespace Catch { - - class TestSpec; - - struct ITestInvoker { - virtual void invoke () const = 0; - virtual ~ITestInvoker(); - }; - - using ITestCasePtr = std::shared_ptr; - - class TestCase; - struct IConfig; - - struct ITestCaseRegistry { - virtual ~ITestCaseRegistry(); - virtual std::vector const& getAllTests() const = 0; - virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; - }; - - bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); - std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); - std::vector const& getAllTestCasesSorted( IConfig const& config ); - -} - -// end catch_interfaces_testcase.h -// start catch_stringref.h - -#include -#include -#include - -namespace Catch { - - class StringData; - - /// A non-owning string class (similar to the forthcoming std::string_view) - /// Note that, because a StringRef may be a substring of another string, - /// it may not be null terminated. c_str() must return a null terminated - /// string, however, and so the StringRef will internally take ownership - /// (taking a copy), if necessary. In theory this ownership is not externally - /// visible - but it does mean (substring) StringRefs should not be shared between - /// threads. - class StringRef { - public: - using size_type = std::size_t; - - private: - friend struct StringRefTestAccess; - - char const* m_start; - size_type m_size; - - char* m_data = nullptr; - - void takeOwnership(); - - static constexpr char const* const s_empty = ""; - - public: // construction/ assignment - StringRef() noexcept - : StringRef( s_empty, 0 ) - {} - - StringRef( StringRef const& other ) noexcept - : m_start( other.m_start ), - m_size( other.m_size ) - {} - - StringRef( StringRef&& other ) noexcept - : m_start( other.m_start ), - m_size( other.m_size ), - m_data( other.m_data ) - { - other.m_data = nullptr; - } - - StringRef( char const* rawChars ) noexcept; - - StringRef( char const* rawChars, size_type size ) noexcept - : m_start( rawChars ), - m_size( size ) - {} - - StringRef( std::string const& stdString ) noexcept - : m_start( stdString.c_str() ), - m_size( stdString.size() ) - {} - - ~StringRef() noexcept { - delete[] m_data; - } - - auto operator = ( StringRef const &other ) noexcept -> StringRef& { - delete[] m_data; - m_data = nullptr; - m_start = other.m_start; - m_size = other.m_size; - return *this; - } - - operator std::string() const; - - void swap( StringRef& other ) noexcept; - - public: // operators - auto operator == ( StringRef const& other ) const noexcept -> bool; - auto operator != ( StringRef const& other ) const noexcept -> bool; - - auto operator[] ( size_type index ) const noexcept -> char; - - public: // named queries - auto empty() const noexcept -> bool { - return m_size == 0; - } - auto size() const noexcept -> size_type { - return m_size; - } - - auto numberOfCharacters() const noexcept -> size_type; - auto c_str() const -> char const*; - - public: // substrings and searches - auto substr( size_type start, size_type size ) const noexcept -> StringRef; - - private: // ownership queries - may not be consistent between calls - auto isOwned() const noexcept -> bool; - auto isSubstring() const noexcept -> bool; - auto data() const noexcept -> char const*; - }; - - auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string; - auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string; - auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string; - - auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; - - inline auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { - return StringRef( rawChars, size ); - } - -} // namespace Catch - -// end catch_stringref.h -namespace Catch { - -template -class TestInvokerAsMethod : public ITestInvoker { - void (C::*m_testAsMethod)(); -public: - TestInvokerAsMethod( void (C::*testAsMethod)() ) noexcept : m_testAsMethod( testAsMethod ) {} - - void invoke() const override { - C obj; - (obj.*m_testAsMethod)(); - } -}; - -auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker*; - -template -auto makeTestInvoker( void (C::*testAsMethod)() ) noexcept -> ITestInvoker* { - return new(std::nothrow) TestInvokerAsMethod( testAsMethod ); -} - -struct NameAndTags { - NameAndTags( StringRef name_ = StringRef(), StringRef tags_ = StringRef() ) noexcept; - StringRef name; - StringRef tags; -}; - -struct AutoReg : NonCopyable { - AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef classOrMethod, NameAndTags const& nameAndTags ) noexcept; - ~AutoReg(); -}; - -} // end namespace Catch - -#if defined(CATCH_CONFIG_DISABLE) - #define INTERNAL_CATCH_TESTCASE_NO_REGISTRATION( TestName, ... ) \ - static void TestName() - #define INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION( TestName, ClassName, ... ) \ - namespace{ \ - struct TestName : ClassName { \ - void test(); \ - }; \ - } \ - void TestName::test() - -#endif - - /////////////////////////////////////////////////////////////////////////////// - #define INTERNAL_CATCH_TESTCASE2( TestName, ... ) \ - static void TestName(); \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &TestName ), CATCH_INTERNAL_LINEINFO, "", Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ - static void TestName() - #define INTERNAL_CATCH_TESTCASE( ... ) \ - INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), __VA_ARGS__ ) - - /////////////////////////////////////////////////////////////////////////////// - #define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( &QualifiedMethod ), CATCH_INTERNAL_LINEINFO, "&" #QualifiedMethod, Catch::NameAndTags{ __VA_ARGS__ } ); } /* NOLINT */ \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS - - /////////////////////////////////////////////////////////////////////////////// - #define INTERNAL_CATCH_TEST_CASE_METHOD2( TestName, ClassName, ... )\ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ \ - struct TestName : ClassName{ \ - void test(); \ - }; \ - Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar ) ( Catch::makeTestInvoker( &TestName::test ), CATCH_INTERNAL_LINEINFO, #ClassName, Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ - } \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ - void TestName::test() - #define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... ) \ - INTERNAL_CATCH_TEST_CASE_METHOD2( INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), ClassName, __VA_ARGS__ ) - - /////////////////////////////////////////////////////////////////////////////// - #define INTERNAL_CATCH_REGISTER_TESTCASE( Function, ... ) \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - Catch::AutoReg INTERNAL_CATCH_UNIQUE_NAME( autoRegistrar )( Catch::makeTestInvoker( Function ), CATCH_INTERNAL_LINEINFO, "", Catch::NameAndTags{ __VA_ARGS__ } ); /* NOLINT */ \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS - -// end catch_test_registry.h -// start catch_capture.hpp - -// start catch_assertionhandler.h - -// start catch_assertioninfo.h - -// start catch_result_type.h - -namespace Catch { - - // ResultWas::OfType enum - struct ResultWas { enum OfType { - Unknown = -1, - Ok = 0, - Info = 1, - Warning = 2, - - FailureBit = 0x10, - - ExpressionFailed = FailureBit | 1, - ExplicitFailure = FailureBit | 2, - - Exception = 0x100 | FailureBit, - - ThrewException = Exception | 1, - DidntThrowException = Exception | 2, - - FatalErrorCondition = 0x200 | FailureBit - - }; }; - - bool isOk( ResultWas::OfType resultType ); - bool isJustInfo( int flags ); - - // ResultDisposition::Flags enum - struct ResultDisposition { enum Flags { - Normal = 0x01, - - ContinueOnFailure = 0x02, // Failures fail test, but execution continues - FalseTest = 0x04, // Prefix expression with ! - SuppressFail = 0x08 // Failures are reported but do not fail the test - }; }; - - ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ); - - bool shouldContinueOnFailure( int flags ); - inline bool isFalseTest( int flags ) { return ( flags & ResultDisposition::FalseTest ) != 0; } - bool shouldSuppressFailure( int flags ); - -} // end namespace Catch - -// end catch_result_type.h -namespace Catch { - - struct AssertionInfo - { - StringRef macroName; - SourceLineInfo lineInfo; - StringRef capturedExpression; - ResultDisposition::Flags resultDisposition; - - // We want to delete this constructor but a compiler bug in 4.8 means - // the struct is then treated as non-aggregate - //AssertionInfo() = delete; - }; - -} // end namespace Catch - -// end catch_assertioninfo.h -// start catch_decomposer.h - -// start catch_tostring.h - -#include -#include -#include -#include -// start catch_stream.h - -#include -#include -#include - -namespace Catch { - - std::ostream& cout(); - std::ostream& cerr(); - std::ostream& clog(); - - class StringRef; - - struct IStream { - virtual ~IStream(); - virtual std::ostream& stream() const = 0; - }; - - auto makeStream( StringRef const &filename ) -> IStream const*; - - class ReusableStringStream { - std::size_t m_index; - std::ostream* m_oss; - public: - ReusableStringStream(); - ~ReusableStringStream(); - - auto str() const -> std::string; - - template - auto operator << ( T const& value ) -> ReusableStringStream& { - *m_oss << value; - return *this; - } - auto get() -> std::ostream& { return *m_oss; } - - static void cleanup(); - }; -} - -// end catch_stream.h - -#ifdef __OBJC__ -// start catch_objc_arc.hpp - -#import - -#ifdef __has_feature -#define CATCH_ARC_ENABLED __has_feature(objc_arc) -#else -#define CATCH_ARC_ENABLED 0 -#endif - -void arcSafeRelease( NSObject* obj ); -id performOptionalSelector( id obj, SEL sel ); - -#if !CATCH_ARC_ENABLED -inline void arcSafeRelease( NSObject* obj ) { - [obj release]; -} -inline id performOptionalSelector( id obj, SEL sel ) { - if( [obj respondsToSelector: sel] ) - return [obj performSelector: sel]; - return nil; -} -#define CATCH_UNSAFE_UNRETAINED -#define CATCH_ARC_STRONG -#else -inline void arcSafeRelease( NSObject* ){} -inline id performOptionalSelector( id obj, SEL sel ) { -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-performSelector-leaks" -#endif - if( [obj respondsToSelector: sel] ) - return [obj performSelector: sel]; -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - return nil; -} -#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained -#define CATCH_ARC_STRONG __strong -#endif - -// end catch_objc_arc.hpp -#endif - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless -#endif - -// We need a dummy global operator<< so we can bring it into Catch namespace later -struct Catch_global_namespace_dummy {}; -std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); - -namespace Catch { - // Bring in operator<< from global namespace into Catch namespace - using ::operator<<; - - namespace Detail { - - extern const std::string unprintableString; - - std::string rawMemoryToString( const void *object, std::size_t size ); - - template - std::string rawMemoryToString( const T& object ) { - return rawMemoryToString( &object, sizeof(object) ); - } - - template - class IsStreamInsertable { - template - static auto test(int) - -> decltype(std::declval() << std::declval(), std::true_type()); - - template - static auto test(...)->std::false_type; - - public: - static const bool value = decltype(test(0))::value; - }; - - template - std::string convertUnknownEnumToString( E e ); - - template - typename std::enable_if::value, std::string>::type convertUnstreamable( T const& ) { - return Detail::unprintableString; - } - template - typename std::enable_if::value, std::string>::type convertUnstreamable( T const& value ) { - return convertUnknownEnumToString( value ); - } - - } // namespace Detail - - // If we decide for C++14, change these to enable_if_ts - template - struct StringMaker { - template - static - typename std::enable_if<::Catch::Detail::IsStreamInsertable::value, std::string>::type - convert(const Fake& value) { - ReusableStringStream rss; - rss << value; - return rss.str(); - } - - template - static - typename std::enable_if::value, std::string>::type - convert( const Fake& value ) { - return Detail::convertUnstreamable( value ); - } - }; - - namespace Detail { - - // This function dispatches all stringification requests inside of Catch. - // Should be preferably called fully qualified, like ::Catch::Detail::stringify - template - std::string stringify(const T& e) { - return ::Catch::StringMaker::type>::type>::convert(e); - } - - template - std::string convertUnknownEnumToString( E e ) { - return ::Catch::Detail::stringify(static_cast::type>(e)); - } - - } // namespace Detail - - // Some predefined specializations - - template<> - struct StringMaker { - static std::string convert(const std::string& str); - }; - template<> - struct StringMaker { - static std::string convert(const std::wstring& wstr); - }; - - template<> - struct StringMaker { - static std::string convert(char const * str); - }; - template<> - struct StringMaker { - static std::string convert(char * str); - }; - template<> - struct StringMaker { - static std::string convert(wchar_t const * str); - }; - template<> - struct StringMaker { - static std::string convert(wchar_t * str); - }; - - template - struct StringMaker { - static std::string convert(const char* str) { - return ::Catch::Detail::stringify(std::string{ str }); - } - }; - template - struct StringMaker { - static std::string convert(const char* str) { - return ::Catch::Detail::stringify(std::string{ str }); - } - }; - template - struct StringMaker { - static std::string convert(const char* str) { - return ::Catch::Detail::stringify(std::string{ str }); - } - }; - - template<> - struct StringMaker { - static std::string convert(int value); - }; - template<> - struct StringMaker { - static std::string convert(long value); - }; - template<> - struct StringMaker { - static std::string convert(long long value); - }; - template<> - struct StringMaker { - static std::string convert(unsigned int value); - }; - template<> - struct StringMaker { - static std::string convert(unsigned long value); - }; - template<> - struct StringMaker { - static std::string convert(unsigned long long value); - }; - - template<> - struct StringMaker { - static std::string convert(bool b); - }; - - template<> - struct StringMaker { - static std::string convert(char c); - }; - template<> - struct StringMaker { - static std::string convert(signed char c); - }; - template<> - struct StringMaker { - static std::string convert(unsigned char c); - }; - - template<> - struct StringMaker { - static std::string convert(std::nullptr_t); - }; - - template<> - struct StringMaker { - static std::string convert(float value); - }; - template<> - struct StringMaker { - static std::string convert(double value); - }; - - template - struct StringMaker { - template - static std::string convert(U* p) { - if (p) { - return ::Catch::Detail::rawMemoryToString(p); - } else { - return "nullptr"; - } - } - }; - - template - struct StringMaker { - static std::string convert(R C::* p) { - if (p) { - return ::Catch::Detail::rawMemoryToString(p); - } else { - return "nullptr"; - } - } - }; - - namespace Detail { - template - std::string rangeToString(InputIterator first, InputIterator last) { - ReusableStringStream rss; - rss << "{ "; - if (first != last) { - rss << ::Catch::Detail::stringify(*first); - for (++first; first != last; ++first) - rss << ", " << ::Catch::Detail::stringify(*first); - } - rss << " }"; - return rss.str(); - } - } - -#ifdef __OBJC__ - template<> - struct StringMaker { - static std::string convert(NSString * nsstring) { - if (!nsstring) - return "nil"; - return std::string("@") + [nsstring UTF8String]; - } - }; - template<> - struct StringMaker { - static std::string convert(NSObject* nsObject) { - return ::Catch::Detail::stringify([nsObject description]); - } - - }; - namespace Detail { - inline std::string stringify( NSString* nsstring ) { - return StringMaker::convert( nsstring ); - } - - } // namespace Detail -#endif // __OBJC__ - -} // namespace Catch - -////////////////////////////////////////////////////// -// Separate std-lib types stringification, so it can be selectively enabled -// This means that we do not bring in - -#if defined(CATCH_CONFIG_ENABLE_ALL_STRINGMAKERS) -# define CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER -# define CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER -# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER -#endif - -// Separate std::pair specialization -#if defined(CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER) -#include -namespace Catch { - template - struct StringMaker > { - static std::string convert(const std::pair& pair) { - ReusableStringStream rss; - rss << "{ " - << ::Catch::Detail::stringify(pair.first) - << ", " - << ::Catch::Detail::stringify(pair.second) - << " }"; - return rss.str(); - } - }; -} -#endif // CATCH_CONFIG_ENABLE_PAIR_STRINGMAKER - -// Separate std::tuple specialization -#if defined(CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER) -#include -namespace Catch { - namespace Detail { - template< - typename Tuple, - std::size_t N = 0, - bool = (N < std::tuple_size::value) - > - struct TupleElementPrinter { - static void print(const Tuple& tuple, std::ostream& os) { - os << (N ? ", " : " ") - << ::Catch::Detail::stringify(std::get(tuple)); - TupleElementPrinter::print(tuple, os); - } - }; - - template< - typename Tuple, - std::size_t N - > - struct TupleElementPrinter { - static void print(const Tuple&, std::ostream&) {} - }; - - } - - template - struct StringMaker> { - static std::string convert(const std::tuple& tuple) { - ReusableStringStream rss; - rss << '{'; - Detail::TupleElementPrinter>::print(tuple, rss.get()); - rss << " }"; - return rss.str(); - } - }; -} -#endif // CATCH_CONFIG_ENABLE_TUPLE_STRINGMAKER - -namespace Catch { - struct not_this_one {}; // Tag type for detecting which begin/ end are being selected - - // Import begin/ end from std here so they are considered alongside the fallback (...) overloads in this namespace - using std::begin; - using std::end; - - not_this_one begin( ... ); - not_this_one end( ... ); - - template - struct is_range { - static const bool value = - !std::is_same())), not_this_one>::value && - !std::is_same())), not_this_one>::value; - }; - - template - std::string rangeToString( Range const& range ) { - return ::Catch::Detail::rangeToString( begin( range ), end( range ) ); - } - - // Handle vector specially - template - std::string rangeToString( std::vector const& v ) { - ReusableStringStream rss; - rss << "{ "; - bool first = true; - for( bool b : v ) { - if( first ) - first = false; - else - rss << ", "; - rss << ::Catch::Detail::stringify( b ); - } - rss << " }"; - return rss.str(); - } - - template - struct StringMaker::value && !::Catch::Detail::IsStreamInsertable::value>::type> { - static std::string convert( R const& range ) { - return rangeToString( range ); - } - }; - - template - struct StringMaker { - static std::string convert(T const(&arr)[SZ]) { - return rangeToString(arr); - } - }; - -} // namespace Catch - -// Separate std::chrono::duration specialization -#if defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) -#include -#include -#include - -namespace Catch { - -template -struct ratio_string { - static std::string symbol(); -}; - -template -std::string ratio_string::symbol() { - Catch::ReusableStringStream rss; - rss << '[' << Ratio::num << '/' - << Ratio::den << ']'; - return rss.str(); -} -template <> -struct ratio_string { - static std::string symbol(); -}; -template <> -struct ratio_string { - static std::string symbol(); -}; -template <> -struct ratio_string { - static std::string symbol(); -}; -template <> -struct ratio_string { - static std::string symbol(); -}; -template <> -struct ratio_string { - static std::string symbol(); -}; -template <> -struct ratio_string { - static std::string symbol(); -}; - - //////////// - // std::chrono::duration specializations - template - struct StringMaker> { - static std::string convert(std::chrono::duration const& duration) { - ReusableStringStream rss; - rss << duration.count() << ' ' << ratio_string::symbol() << 's'; - return rss.str(); - } - }; - template - struct StringMaker>> { - static std::string convert(std::chrono::duration> const& duration) { - ReusableStringStream rss; - rss << duration.count() << " s"; - return rss.str(); - } - }; - template - struct StringMaker>> { - static std::string convert(std::chrono::duration> const& duration) { - ReusableStringStream rss; - rss << duration.count() << " m"; - return rss.str(); - } - }; - template - struct StringMaker>> { - static std::string convert(std::chrono::duration> const& duration) { - ReusableStringStream rss; - rss << duration.count() << " h"; - return rss.str(); - } - }; - - //////////// - // std::chrono::time_point specialization - // Generic time_point cannot be specialized, only std::chrono::time_point - template - struct StringMaker> { - static std::string convert(std::chrono::time_point const& time_point) { - return ::Catch::Detail::stringify(time_point.time_since_epoch()) + " since epoch"; - } - }; - // std::chrono::time_point specialization - template - struct StringMaker> { - static std::string convert(std::chrono::time_point const& time_point) { - auto converted = std::chrono::system_clock::to_time_t(time_point); - -#ifdef _MSC_VER - std::tm timeInfo = {}; - gmtime_s(&timeInfo, &converted); -#else - std::tm* timeInfo = std::gmtime(&converted); -#endif - - auto const timeStampSize = sizeof("2017-01-16T17:06:45Z"); - char timeStamp[timeStampSize]; - const char * const fmt = "%Y-%m-%dT%H:%M:%SZ"; - -#ifdef _MSC_VER - std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); -#else - std::strftime(timeStamp, timeStampSize, fmt, timeInfo); -#endif - return std::string(timeStamp); - } - }; -} -#endif // CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -// end catch_tostring.h -#include - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4389) // '==' : signed/unsigned mismatch -#pragma warning(disable:4018) // more "signed/unsigned mismatch" -#pragma warning(disable:4312) // Converting int to T* using reinterpret_cast (issue on x64 platform) -#pragma warning(disable:4180) // qualifier applied to function type has no meaning -#endif - -namespace Catch { - - struct ITransientExpression { - auto isBinaryExpression() const -> bool { return m_isBinaryExpression; } - auto getResult() const -> bool { return m_result; } - virtual void streamReconstructedExpression( std::ostream &os ) const = 0; - - ITransientExpression( bool isBinaryExpression, bool result ) - : m_isBinaryExpression( isBinaryExpression ), - m_result( result ) - {} - - // We don't actually need a virtual destructor, but many static analysers - // complain if it's not here :-( - virtual ~ITransientExpression(); - - bool m_isBinaryExpression; - bool m_result; - - }; - - void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ); - - template - class BinaryExpr : public ITransientExpression { - LhsT m_lhs; - StringRef m_op; - RhsT m_rhs; - - void streamReconstructedExpression( std::ostream &os ) const override { - formatReconstructedExpression - ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) ); - } - - public: - BinaryExpr( bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs ) - : ITransientExpression{ true, comparisonResult }, - m_lhs( lhs ), - m_op( op ), - m_rhs( rhs ) - {} - }; - - template - class UnaryExpr : public ITransientExpression { - LhsT m_lhs; - - void streamReconstructedExpression( std::ostream &os ) const override { - os << Catch::Detail::stringify( m_lhs ); - } - - public: - explicit UnaryExpr( LhsT lhs ) - : ITransientExpression{ false, lhs ? true : false }, - m_lhs( lhs ) - {} - }; - - // Specialised comparison functions to handle equality comparisons between ints and pointers (NULL deduces as an int) - template - auto compareEqual( LhsT const& lhs, RhsT const& rhs ) -> bool { return static_cast(lhs == rhs); } - template - auto compareEqual( T* const& lhs, int rhs ) -> bool { return lhs == reinterpret_cast( rhs ); } - template - auto compareEqual( T* const& lhs, long rhs ) -> bool { return lhs == reinterpret_cast( rhs ); } - template - auto compareEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) == rhs; } - template - auto compareEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) == rhs; } - - template - auto compareNotEqual( LhsT const& lhs, RhsT&& rhs ) -> bool { return static_cast(lhs != rhs); } - template - auto compareNotEqual( T* const& lhs, int rhs ) -> bool { return lhs != reinterpret_cast( rhs ); } - template - auto compareNotEqual( T* const& lhs, long rhs ) -> bool { return lhs != reinterpret_cast( rhs ); } - template - auto compareNotEqual( int lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) != rhs; } - template - auto compareNotEqual( long lhs, T* const& rhs ) -> bool { return reinterpret_cast( lhs ) != rhs; } - - template - class ExprLhs { - LhsT m_lhs; - public: - explicit ExprLhs( LhsT lhs ) : m_lhs( lhs ) {} - - template - auto operator == ( RhsT const& rhs ) -> BinaryExpr const { - return { compareEqual( m_lhs, rhs ), m_lhs, "==", rhs }; - } - auto operator == ( bool rhs ) -> BinaryExpr const { - return { m_lhs == rhs, m_lhs, "==", rhs }; - } - - template - auto operator != ( RhsT const& rhs ) -> BinaryExpr const { - return { compareNotEqual( m_lhs, rhs ), m_lhs, "!=", rhs }; - } - auto operator != ( bool rhs ) -> BinaryExpr const { - return { m_lhs != rhs, m_lhs, "!=", rhs }; - } - - template - auto operator > ( RhsT const& rhs ) -> BinaryExpr const { - return { static_cast(m_lhs > rhs), m_lhs, ">", rhs }; - } - template - auto operator < ( RhsT const& rhs ) -> BinaryExpr const { - return { static_cast(m_lhs < rhs), m_lhs, "<", rhs }; - } - template - auto operator >= ( RhsT const& rhs ) -> BinaryExpr const { - return { static_cast(m_lhs >= rhs), m_lhs, ">=", rhs }; - } - template - auto operator <= ( RhsT const& rhs ) -> BinaryExpr const { - return { static_cast(m_lhs <= rhs), m_lhs, "<=", rhs }; - } - - auto makeUnaryExpr() const -> UnaryExpr { - return UnaryExpr{ m_lhs }; - } - }; - - void handleExpression( ITransientExpression const& expr ); - - template - void handleExpression( ExprLhs const& expr ) { - handleExpression( expr.makeUnaryExpr() ); - } - - struct Decomposer { - template - auto operator <= ( T const& lhs ) -> ExprLhs { - return ExprLhs{ lhs }; - } - - auto operator <=( bool value ) -> ExprLhs { - return ExprLhs{ value }; - } - }; - -} // end namespace Catch - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -// end catch_decomposer.h -// start catch_interfaces_capture.h - -#include - -namespace Catch { - - class AssertionResult; - struct AssertionInfo; - struct SectionInfo; - struct SectionEndInfo; - struct MessageInfo; - struct Counts; - struct BenchmarkInfo; - struct BenchmarkStats; - struct AssertionReaction; - - struct ITransientExpression; - - struct IResultCapture { - - virtual ~IResultCapture(); - - virtual bool sectionStarted( SectionInfo const& sectionInfo, - Counts& assertions ) = 0; - virtual void sectionEnded( SectionEndInfo const& endInfo ) = 0; - virtual void sectionEndedEarly( SectionEndInfo const& endInfo ) = 0; - - virtual void benchmarkStarting( BenchmarkInfo const& info ) = 0; - virtual void benchmarkEnded( BenchmarkStats const& stats ) = 0; - - virtual void pushScopedMessage( MessageInfo const& message ) = 0; - virtual void popScopedMessage( MessageInfo const& message ) = 0; - - virtual void handleFatalErrorCondition( StringRef message ) = 0; - - virtual void handleExpr - ( AssertionInfo const& info, - ITransientExpression const& expr, - AssertionReaction& reaction ) = 0; - virtual void handleMessage - ( AssertionInfo const& info, - ResultWas::OfType resultType, - StringRef const& message, - AssertionReaction& reaction ) = 0; - virtual void handleUnexpectedExceptionNotThrown - ( AssertionInfo const& info, - AssertionReaction& reaction ) = 0; - virtual void handleUnexpectedInflightException - ( AssertionInfo const& info, - std::string const& message, - AssertionReaction& reaction ) = 0; - virtual void handleIncomplete - ( AssertionInfo const& info ) = 0; - virtual void handleNonExpr - ( AssertionInfo const &info, - ResultWas::OfType resultType, - AssertionReaction &reaction ) = 0; - - virtual bool lastAssertionPassed() = 0; - virtual void assertionPassed() = 0; - - // Deprecated, do not use: - virtual std::string getCurrentTestName() const = 0; - virtual const AssertionResult* getLastResult() const = 0; - virtual void exceptionEarlyReported() = 0; - }; - - IResultCapture& getResultCapture(); -} - -// end catch_interfaces_capture.h -namespace Catch { - - struct TestFailureException{}; - struct AssertionResultData; - struct IResultCapture; - class RunContext; - - class LazyExpression { - friend class AssertionHandler; - friend struct AssertionStats; - friend class RunContext; - - ITransientExpression const* m_transientExpression = nullptr; - bool m_isNegated; - public: - LazyExpression( bool isNegated ); - LazyExpression( LazyExpression const& other ); - LazyExpression& operator = ( LazyExpression const& ) = delete; - - explicit operator bool() const; - - friend auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream&; - }; - - struct AssertionReaction { - bool shouldDebugBreak = false; - bool shouldThrow = false; - }; - - class AssertionHandler { - AssertionInfo m_assertionInfo; - AssertionReaction m_reaction; - bool m_completed = false; - IResultCapture& m_resultCapture; - - public: - AssertionHandler - ( StringRef macroName, - SourceLineInfo const& lineInfo, - StringRef capturedExpression, - ResultDisposition::Flags resultDisposition ); - ~AssertionHandler() { - if ( !m_completed ) { - m_resultCapture.handleIncomplete( m_assertionInfo ); - } - } - - template - void handleExpr( ExprLhs const& expr ) { - handleExpr( expr.makeUnaryExpr() ); - } - void handleExpr( ITransientExpression const& expr ); - - void handleMessage(ResultWas::OfType resultType, StringRef const& message); - - void handleExceptionThrownAsExpected(); - void handleUnexpectedExceptionNotThrown(); - void handleExceptionNotThrownAsExpected(); - void handleThrowingCallSkipped(); - void handleUnexpectedInflightException(); - - void complete(); - void setCompleted(); - - // query - auto allowThrows() const -> bool; - }; - - void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ); - -} // namespace Catch - -// end catch_assertionhandler.h -// start catch_message.h - -#include - -namespace Catch { - - struct MessageInfo { - MessageInfo( std::string const& _macroName, - SourceLineInfo const& _lineInfo, - ResultWas::OfType _type ); - - std::string macroName; - std::string message; - SourceLineInfo lineInfo; - ResultWas::OfType type; - unsigned int sequence; - - bool operator == ( MessageInfo const& other ) const; - bool operator < ( MessageInfo const& other ) const; - private: - static unsigned int globalCount; - }; - - struct MessageStream { - - template - MessageStream& operator << ( T const& value ) { - m_stream << value; - return *this; - } - - ReusableStringStream m_stream; - }; - - struct MessageBuilder : MessageStream { - MessageBuilder( std::string const& macroName, - SourceLineInfo const& lineInfo, - ResultWas::OfType type ); - - template - MessageBuilder& operator << ( T const& value ) { - m_stream << value; - return *this; - } - - MessageInfo m_info; - }; - - class ScopedMessage { - public: - explicit ScopedMessage( MessageBuilder const& builder ); - ~ScopedMessage(); - - MessageInfo m_info; - }; - -} // end namespace Catch - -// end catch_message.h -#if !defined(CATCH_CONFIG_DISABLE) - -#if !defined(CATCH_CONFIG_DISABLE_STRINGIFICATION) - #define CATCH_INTERNAL_STRINGIFY(...) #__VA_ARGS__ -#else - #define CATCH_INTERNAL_STRINGIFY(...) "Disabled by CATCH_CONFIG_DISABLE_STRINGIFICATION" -#endif - -#if defined(CATCH_CONFIG_FAST_COMPILE) - -/////////////////////////////////////////////////////////////////////////////// -// Another way to speed-up compilation is to omit local try-catch for REQUIRE* -// macros. -#define INTERNAL_CATCH_TRY -#define INTERNAL_CATCH_CATCH( capturer ) - -#else // CATCH_CONFIG_FAST_COMPILE - -#define INTERNAL_CATCH_TRY try -#define INTERNAL_CATCH_CATCH( handler ) catch(...) { handler.handleUnexpectedInflightException(); } - -#endif - -#define INTERNAL_CATCH_REACT( handler ) handler.complete(); - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_TEST( macroName, resultDisposition, ... ) \ - do { \ - Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \ - INTERNAL_CATCH_TRY { \ - CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ - catchAssertionHandler.handleExpr( Catch::Decomposer() <= __VA_ARGS__ ); \ - CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ - } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ - INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( (void)0, false && static_cast( !!(__VA_ARGS__) ) ) // the expression here is never evaluated at runtime but it forces the compiler to give it a look - // The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&. - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_IF( macroName, resultDisposition, ... ) \ - INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \ - if( Catch::getResultCapture().lastAssertionPassed() ) - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_ELSE( macroName, resultDisposition, ... ) \ - INTERNAL_CATCH_TEST( macroName, resultDisposition, __VA_ARGS__ ); \ - if( !Catch::getResultCapture().lastAssertionPassed() ) - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_NO_THROW( macroName, resultDisposition, ... ) \ - do { \ - Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition ); \ - try { \ - static_cast(__VA_ARGS__); \ - catchAssertionHandler.handleExceptionNotThrownAsExpected(); \ - } \ - catch( ... ) { \ - catchAssertionHandler.handleUnexpectedInflightException(); \ - } \ - INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( false ) - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_THROWS( macroName, resultDisposition, ... ) \ - do { \ - Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__), resultDisposition); \ - if( catchAssertionHandler.allowThrows() ) \ - try { \ - static_cast(__VA_ARGS__); \ - catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ - } \ - catch( ... ) { \ - catchAssertionHandler.handleExceptionThrownAsExpected(); \ - } \ - else \ - catchAssertionHandler.handleThrowingCallSkipped(); \ - INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( false ) - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_THROWS_AS( macroName, exceptionType, resultDisposition, expr ) \ - do { \ - Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(expr) ", " CATCH_INTERNAL_STRINGIFY(exceptionType), resultDisposition ); \ - if( catchAssertionHandler.allowThrows() ) \ - try { \ - static_cast(expr); \ - catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ - } \ - catch( exceptionType const& ) { \ - catchAssertionHandler.handleExceptionThrownAsExpected(); \ - } \ - catch( ... ) { \ - catchAssertionHandler.handleUnexpectedInflightException(); \ - } \ - else \ - catchAssertionHandler.handleThrowingCallSkipped(); \ - INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( false ) - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_MSG( macroName, messageType, resultDisposition, ... ) \ - do { \ - Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, "", resultDisposition ); \ - catchAssertionHandler.handleMessage( messageType, ( Catch::MessageStream() << __VA_ARGS__ + ::Catch::StreamEndStop() ).m_stream.str() ); \ - INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( false ) - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_INFO( macroName, log ) \ - Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log ); - -/////////////////////////////////////////////////////////////////////////////// -// Although this is matcher-based, it can be used with just a string -#define INTERNAL_CATCH_THROWS_STR_MATCHES( macroName, resultDisposition, matcher, ... ) \ - do { \ - Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ - if( catchAssertionHandler.allowThrows() ) \ - try { \ - static_cast(__VA_ARGS__); \ - catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ - } \ - catch( ... ) { \ - Catch::handleExceptionMatchExpr( catchAssertionHandler, matcher, #matcher ); \ - } \ - else \ - catchAssertionHandler.handleThrowingCallSkipped(); \ - INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( false ) - -#endif // CATCH_CONFIG_DISABLE - -// end catch_capture.hpp -// start catch_section.h - -// start catch_section_info.h - -// start catch_totals.h - -#include - -namespace Catch { - - struct Counts { - Counts operator - ( Counts const& other ) const; - Counts& operator += ( Counts const& other ); - - std::size_t total() const; - bool allPassed() const; - bool allOk() const; - - std::size_t passed = 0; - std::size_t failed = 0; - std::size_t failedButOk = 0; - }; - - struct Totals { - - Totals operator - ( Totals const& other ) const; - Totals& operator += ( Totals const& other ); - - Totals delta( Totals const& prevTotals ) const; - - Counts assertions; - Counts testCases; - }; -} - -// end catch_totals.h -#include - -namespace Catch { - - struct SectionInfo { - SectionInfo - ( SourceLineInfo const& _lineInfo, - std::string const& _name, - std::string const& _description = std::string() ); - - std::string name; - std::string description; - SourceLineInfo lineInfo; - }; - - struct SectionEndInfo { - SectionEndInfo( SectionInfo const& _sectionInfo, Counts const& _prevAssertions, double _durationInSeconds ); - - SectionInfo sectionInfo; - Counts prevAssertions; - double durationInSeconds; - }; - -} // end namespace Catch - -// end catch_section_info.h -// start catch_timer.h - -#include - -namespace Catch { - - auto getCurrentNanosecondsSinceEpoch() -> uint64_t; - auto getEstimatedClockResolution() -> uint64_t; - - class Timer { - uint64_t m_nanoseconds = 0; - public: - void start(); - auto getElapsedNanoseconds() const -> uint64_t; - auto getElapsedMicroseconds() const -> uint64_t; - auto getElapsedMilliseconds() const -> unsigned int; - auto getElapsedSeconds() const -> double; - }; - -} // namespace Catch - -// end catch_timer.h -#include - -namespace Catch { - - class Section : NonCopyable { - public: - Section( SectionInfo const& info ); - ~Section(); - - // This indicates whether the section should be executed or not - explicit operator bool() const; - - private: - SectionInfo m_info; - - std::string m_name; - Counts m_assertions; - bool m_sectionIncluded; - Timer m_timer; - }; - -} // end namespace Catch - - #define INTERNAL_CATCH_SECTION( ... ) \ - if( Catch::Section const& INTERNAL_CATCH_UNIQUE_NAME( catch_internal_Section ) = Catch::SectionInfo( CATCH_INTERNAL_LINEINFO, __VA_ARGS__ ) ) - -// end catch_section.h -// start catch_benchmark.h - -#include -#include - -namespace Catch { - - class BenchmarkLooper { - - std::string m_name; - std::size_t m_count = 0; - std::size_t m_iterationsToRun = 1; - uint64_t m_resolution; - Timer m_timer; - - static auto getResolution() -> uint64_t; - public: - // Keep most of this inline as it's on the code path that is being timed - BenchmarkLooper( StringRef name ) - : m_name( name ), - m_resolution( getResolution() ) - { - reportStart(); - m_timer.start(); - } - - explicit operator bool() { - if( m_count < m_iterationsToRun ) - return true; - return needsMoreIterations(); - } - - void increment() { - ++m_count; - } - - void reportStart(); - auto needsMoreIterations() -> bool; - }; - -} // end namespace Catch - -#define BENCHMARK( name ) \ - for( Catch::BenchmarkLooper looper( name ); looper; looper.increment() ) - -// end catch_benchmark.h -// start catch_interfaces_exception.h - -// start catch_interfaces_registry_hub.h - -#include -#include - -namespace Catch { - - class TestCase; - struct ITestCaseRegistry; - struct IExceptionTranslatorRegistry; - struct IExceptionTranslator; - struct IReporterRegistry; - struct IReporterFactory; - struct ITagAliasRegistry; - class StartupExceptionRegistry; - - using IReporterFactoryPtr = std::shared_ptr; - - struct IRegistryHub { - virtual ~IRegistryHub(); - - virtual IReporterRegistry const& getReporterRegistry() const = 0; - virtual ITestCaseRegistry const& getTestCaseRegistry() const = 0; - virtual ITagAliasRegistry const& getTagAliasRegistry() const = 0; - - virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() = 0; - - virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0; - }; - - struct IMutableRegistryHub { - virtual ~IMutableRegistryHub(); - virtual void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) = 0; - virtual void registerListener( IReporterFactoryPtr const& factory ) = 0; - virtual void registerTest( TestCase const& testInfo ) = 0; - virtual void registerTranslator( const IExceptionTranslator* translator ) = 0; - virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0; - virtual void registerStartupException() noexcept = 0; - }; - - IRegistryHub& getRegistryHub(); - IMutableRegistryHub& getMutableRegistryHub(); - void cleanUp(); - std::string translateActiveException(); - -} - -// end catch_interfaces_registry_hub.h -#if defined(CATCH_CONFIG_DISABLE) - #define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \ - static std::string translatorName( signature ) -#endif - -#include -#include -#include - -namespace Catch { - using exceptionTranslateFunction = std::string(*)(); - - struct IExceptionTranslator; - using ExceptionTranslators = std::vector>; - - struct IExceptionTranslator { - virtual ~IExceptionTranslator(); - virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0; - }; - - struct IExceptionTranslatorRegistry { - virtual ~IExceptionTranslatorRegistry(); - - virtual std::string translateActiveException() const = 0; - }; - - class ExceptionTranslatorRegistrar { - template - class ExceptionTranslator : public IExceptionTranslator { - public: - - ExceptionTranslator( std::string(*translateFunction)( T& ) ) - : m_translateFunction( translateFunction ) - {} - - std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override { - try { - if( it == itEnd ) - std::rethrow_exception(std::current_exception()); - else - return (*it)->translate( it+1, itEnd ); - } - catch( T& ex ) { - return m_translateFunction( ex ); - } - } - - protected: - std::string(*m_translateFunction)( T& ); - }; - - public: - template - ExceptionTranslatorRegistrar( std::string(*translateFunction)( T& ) ) { - getMutableRegistryHub().registerTranslator - ( new ExceptionTranslator( translateFunction ) ); - } - }; -} - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_TRANSLATE_EXCEPTION2( translatorName, signature ) \ - static std::string translatorName( signature ); \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::ExceptionTranslatorRegistrar INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionRegistrar )( &translatorName ); } \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ - static std::string translatorName( signature ) - -#define INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION2( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature ) - -// end catch_interfaces_exception.h -// start catch_approx.h - -#include -#include - -namespace Catch { -namespace Detail { - - class Approx { - private: - bool equalityComparisonImpl(double other) const; - - public: - explicit Approx ( double value ); - - static Approx custom(); - - template ::value>::type> - Approx operator()( T const& value ) { - Approx approx( static_cast(value) ); - approx.epsilon( m_epsilon ); - approx.margin( m_margin ); - approx.scale( m_scale ); - return approx; - } - - template ::value>::type> - explicit Approx( T const& value ): Approx(static_cast(value)) - {} - - template ::value>::type> - friend bool operator == ( const T& lhs, Approx const& rhs ) { - auto lhs_v = static_cast(lhs); - return rhs.equalityComparisonImpl(lhs_v); - } - - template ::value>::type> - friend bool operator == ( Approx const& lhs, const T& rhs ) { - return operator==( rhs, lhs ); - } - - template ::value>::type> - friend bool operator != ( T const& lhs, Approx const& rhs ) { - return !operator==( lhs, rhs ); - } - - template ::value>::type> - friend bool operator != ( Approx const& lhs, T const& rhs ) { - return !operator==( rhs, lhs ); - } - - template ::value>::type> - friend bool operator <= ( T const& lhs, Approx const& rhs ) { - return static_cast(lhs) < rhs.m_value || lhs == rhs; - } - - template ::value>::type> - friend bool operator <= ( Approx const& lhs, T const& rhs ) { - return lhs.m_value < static_cast(rhs) || lhs == rhs; - } - - template ::value>::type> - friend bool operator >= ( T const& lhs, Approx const& rhs ) { - return static_cast(lhs) > rhs.m_value || lhs == rhs; - } - - template ::value>::type> - friend bool operator >= ( Approx const& lhs, T const& rhs ) { - return lhs.m_value > static_cast(rhs) || lhs == rhs; - } - - template ::value>::type> - Approx& epsilon( T const& newEpsilon ) { - double epsilonAsDouble = static_cast(newEpsilon); - if( epsilonAsDouble < 0 || epsilonAsDouble > 1.0 ) { - throw std::domain_error - ( "Invalid Approx::epsilon: " + - Catch::Detail::stringify( epsilonAsDouble ) + - ", Approx::epsilon has to be between 0 and 1" ); - } - m_epsilon = epsilonAsDouble; - return *this; - } - - template ::value>::type> - Approx& margin( T const& newMargin ) { - double marginAsDouble = static_cast(newMargin); - if( marginAsDouble < 0 ) { - throw std::domain_error - ( "Invalid Approx::margin: " + - Catch::Detail::stringify( marginAsDouble ) + - ", Approx::Margin has to be non-negative." ); - - } - m_margin = marginAsDouble; - return *this; - } - - template ::value>::type> - Approx& scale( T const& newScale ) { - m_scale = static_cast(newScale); - return *this; - } - - std::string toString() const; - - private: - double m_epsilon; - double m_margin; - double m_scale; - double m_value; - }; -} - -template<> -struct StringMaker { - static std::string convert(Catch::Detail::Approx const& value); -}; - -} // end namespace Catch - -// end catch_approx.h -// start catch_string_manip.h - -#include -#include - -namespace Catch { - - bool startsWith( std::string const& s, std::string const& prefix ); - bool startsWith( std::string const& s, char prefix ); - bool endsWith( std::string const& s, std::string const& suffix ); - bool endsWith( std::string const& s, char suffix ); - bool contains( std::string const& s, std::string const& infix ); - void toLowerInPlace( std::string& s ); - std::string toLower( std::string const& s ); - std::string trim( std::string const& str ); - bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ); - - struct pluralise { - pluralise( std::size_t count, std::string const& label ); - - friend std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ); - - std::size_t m_count; - std::string m_label; - }; -} - -// end catch_string_manip.h -#ifndef CATCH_CONFIG_DISABLE_MATCHERS -// start catch_capture_matchers.h - -// start catch_matchers.h - -#include -#include - -namespace Catch { -namespace Matchers { - namespace Impl { - - template struct MatchAllOf; - template struct MatchAnyOf; - template struct MatchNotOf; - - class MatcherUntypedBase { - public: - MatcherUntypedBase() = default; - MatcherUntypedBase ( MatcherUntypedBase const& ) = default; - MatcherUntypedBase& operator = ( MatcherUntypedBase const& ) = delete; - std::string toString() const; - - protected: - virtual ~MatcherUntypedBase(); - virtual std::string describe() const = 0; - mutable std::string m_cachedToString; - }; - - template - struct MatcherMethod { - virtual bool match( ObjectT const& arg ) const = 0; - }; - template - struct MatcherMethod { - virtual bool match( PtrT* arg ) const = 0; - }; - - template - struct MatcherBase : MatcherUntypedBase, MatcherMethod { - - MatchAllOf operator && ( MatcherBase const& other ) const; - MatchAnyOf operator || ( MatcherBase const& other ) const; - MatchNotOf operator ! () const; - }; - - template - struct MatchAllOf : MatcherBase { - bool match( ArgT const& arg ) const override { - for( auto matcher : m_matchers ) { - if (!matcher->match(arg)) - return false; - } - return true; - } - std::string describe() const override { - std::string description; - description.reserve( 4 + m_matchers.size()*32 ); - description += "( "; - bool first = true; - for( auto matcher : m_matchers ) { - if( first ) - first = false; - else - description += " and "; - description += matcher->toString(); - } - description += " )"; - return description; - } - - MatchAllOf& operator && ( MatcherBase const& other ) { - m_matchers.push_back( &other ); - return *this; - } - - std::vector const*> m_matchers; - }; - template - struct MatchAnyOf : MatcherBase { - - bool match( ArgT const& arg ) const override { - for( auto matcher : m_matchers ) { - if (matcher->match(arg)) - return true; - } - return false; - } - std::string describe() const override { - std::string description; - description.reserve( 4 + m_matchers.size()*32 ); - description += "( "; - bool first = true; - for( auto matcher : m_matchers ) { - if( first ) - first = false; - else - description += " or "; - description += matcher->toString(); - } - description += " )"; - return description; - } - - MatchAnyOf& operator || ( MatcherBase const& other ) { - m_matchers.push_back( &other ); - return *this; - } - - std::vector const*> m_matchers; - }; - - template - struct MatchNotOf : MatcherBase { - - MatchNotOf( MatcherBase const& underlyingMatcher ) : m_underlyingMatcher( underlyingMatcher ) {} - - bool match( ArgT const& arg ) const override { - return !m_underlyingMatcher.match( arg ); - } - - std::string describe() const override { - return "not " + m_underlyingMatcher.toString(); - } - MatcherBase const& m_underlyingMatcher; - }; - - template - MatchAllOf MatcherBase::operator && ( MatcherBase const& other ) const { - return MatchAllOf() && *this && other; - } - template - MatchAnyOf MatcherBase::operator || ( MatcherBase const& other ) const { - return MatchAnyOf() || *this || other; - } - template - MatchNotOf MatcherBase::operator ! () const { - return MatchNotOf( *this ); - } - - } // namespace Impl - -} // namespace Matchers - -using namespace Matchers; -using Matchers::Impl::MatcherBase; - -} // namespace Catch - -// end catch_matchers.h -// start catch_matchers_floating.h - -#include -#include - -namespace Catch { -namespace Matchers { - - namespace Floating { - - enum class FloatingPointKind : uint8_t; - - struct WithinAbsMatcher : MatcherBase { - WithinAbsMatcher(double target, double margin); - bool match(double const& matchee) const override; - std::string describe() const override; - private: - double m_target; - double m_margin; - }; - - struct WithinUlpsMatcher : MatcherBase { - WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType); - bool match(double const& matchee) const override; - std::string describe() const override; - private: - double m_target; - int m_ulps; - FloatingPointKind m_type; - }; - - } // namespace Floating - - // The following functions create the actual matcher objects. - // This allows the types to be inferred - Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff); - Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff); - Floating::WithinAbsMatcher WithinAbs(double target, double margin); - -} // namespace Matchers -} // namespace Catch - -// end catch_matchers_floating.h -// start catch_matchers_string.h - -#include - -namespace Catch { -namespace Matchers { - - namespace StdString { - - struct CasedString - { - CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity ); - std::string adjustString( std::string const& str ) const; - std::string caseSensitivitySuffix() const; - - CaseSensitive::Choice m_caseSensitivity; - std::string m_str; - }; - - struct StringMatcherBase : MatcherBase { - StringMatcherBase( std::string const& operation, CasedString const& comparator ); - std::string describe() const override; - - CasedString m_comparator; - std::string m_operation; - }; - - struct EqualsMatcher : StringMatcherBase { - EqualsMatcher( CasedString const& comparator ); - bool match( std::string const& source ) const override; - }; - struct ContainsMatcher : StringMatcherBase { - ContainsMatcher( CasedString const& comparator ); - bool match( std::string const& source ) const override; - }; - struct StartsWithMatcher : StringMatcherBase { - StartsWithMatcher( CasedString const& comparator ); - bool match( std::string const& source ) const override; - }; - struct EndsWithMatcher : StringMatcherBase { - EndsWithMatcher( CasedString const& comparator ); - bool match( std::string const& source ) const override; - }; - - struct RegexMatcher : MatcherBase { - RegexMatcher( std::string regex, CaseSensitive::Choice caseSensitivity ); - bool match( std::string const& matchee ) const override; - std::string describe() const override; - - private: - std::string m_regex; - CaseSensitive::Choice m_caseSensitivity; - }; - - } // namespace StdString - - // The following functions create the actual matcher objects. - // This allows the types to be inferred - - StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); - StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); - StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); - StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); - StdString::RegexMatcher Matches( std::string const& regex, CaseSensitive::Choice caseSensitivity = CaseSensitive::Yes ); - -} // namespace Matchers -} // namespace Catch - -// end catch_matchers_string.h -// start catch_matchers_vector.h - -#include - -namespace Catch { -namespace Matchers { - - namespace Vector { - namespace Detail { - template - size_t count(InputIterator first, InputIterator last, T const& item) { - size_t cnt = 0; - for (; first != last; ++first) { - if (*first == item) { - ++cnt; - } - } - return cnt; - } - template - bool contains(InputIterator first, InputIterator last, T const& item) { - for (; first != last; ++first) { - if (*first == item) { - return true; - } - } - return false; - } - } - - template - struct ContainsElementMatcher : MatcherBase> { - - ContainsElementMatcher(T const &comparator) : m_comparator( comparator) {} - - bool match(std::vector const &v) const override { - for (auto const& el : v) { - if (el == m_comparator) { - return true; - } - } - return false; - } - - std::string describe() const override { - return "Contains: " + ::Catch::Detail::stringify( m_comparator ); - } - - T const& m_comparator; - }; - - template - struct ContainsMatcher : MatcherBase> { - - ContainsMatcher(std::vector const &comparator) : m_comparator( comparator ) {} - - bool match(std::vector const &v) const override { - // !TBD: see note in EqualsMatcher - if (m_comparator.size() > v.size()) - return false; - for (auto const& comparator : m_comparator) { - auto present = false; - for (const auto& el : v) { - if (el == comparator) { - present = true; - break; - } - } - if (!present) { - return false; - } - } - return true; - } - std::string describe() const override { - return "Contains: " + ::Catch::Detail::stringify( m_comparator ); - } - - std::vector const& m_comparator; - }; - - template - struct EqualsMatcher : MatcherBase> { - - EqualsMatcher(std::vector const &comparator) : m_comparator( comparator ) {} - - bool match(std::vector const &v) const override { - // !TBD: This currently works if all elements can be compared using != - // - a more general approach would be via a compare template that defaults - // to using !=. but could be specialised for, e.g. std::vector etc - // - then just call that directly - if (m_comparator.size() != v.size()) - return false; - for (std::size_t i = 0; i < v.size(); ++i) - if (m_comparator[i] != v[i]) - return false; - return true; - } - std::string describe() const override { - return "Equals: " + ::Catch::Detail::stringify( m_comparator ); - } - std::vector const& m_comparator; - }; - - template - struct UnorderedEqualsMatcher : MatcherBase> { - UnorderedEqualsMatcher(std::vector const& target) : m_target(target) {} - bool match(std::vector const& vec) const override { - // Note: This is a reimplementation of std::is_permutation, - // because I don't want to include inside the common path - if (m_target.size() != vec.size()) { - return false; - } - auto lfirst = m_target.begin(), llast = m_target.end(); - auto rfirst = vec.begin(), rlast = vec.end(); - // Cut common prefix to optimize checking of permuted parts - while (lfirst != llast && *lfirst != *rfirst) { - ++lfirst; ++rfirst; - } - if (lfirst == llast) { - return true; - } - - for (auto mid = lfirst; mid != llast; ++mid) { - // Skip already counted items - if (Detail::contains(lfirst, mid, *mid)) { - continue; - } - size_t num_vec = Detail::count(rfirst, rlast, *mid); - if (num_vec == 0 || Detail::count(lfirst, llast, *mid) != num_vec) { - return false; - } - } - - return true; - } - - std::string describe() const override { - return "UnorderedEquals: " + ::Catch::Detail::stringify(m_target); - } - private: - std::vector const& m_target; - }; - - } // namespace Vector - - // The following functions create the actual matcher objects. - // This allows the types to be inferred - - template - Vector::ContainsMatcher Contains( std::vector const& comparator ) { - return Vector::ContainsMatcher( comparator ); - } - - template - Vector::ContainsElementMatcher VectorContains( T const& comparator ) { - return Vector::ContainsElementMatcher( comparator ); - } - - template - Vector::EqualsMatcher Equals( std::vector const& comparator ) { - return Vector::EqualsMatcher( comparator ); - } - - template - Vector::UnorderedEqualsMatcher UnorderedEquals(std::vector const& target) { - return Vector::UnorderedEqualsMatcher(target); - } - -} // namespace Matchers -} // namespace Catch - -// end catch_matchers_vector.h -namespace Catch { - - template - class MatchExpr : public ITransientExpression { - ArgT const& m_arg; - MatcherT m_matcher; - StringRef m_matcherString; - public: - MatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef matcherString ) - : ITransientExpression{ true, matcher.match( arg ) }, - m_arg( arg ), - m_matcher( matcher ), - m_matcherString( matcherString ) - {} - - void streamReconstructedExpression( std::ostream &os ) const override { - auto matcherAsString = m_matcher.toString(); - os << Catch::Detail::stringify( m_arg ) << ' '; - if( matcherAsString == Detail::unprintableString ) - os << m_matcherString; - else - os << matcherAsString; - } - }; - - using StringMatcher = Matchers::Impl::MatcherBase; - - void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ); - - template - auto makeMatchExpr( ArgT const& arg, MatcherT const& matcher, StringRef matcherString ) -> MatchExpr { - return MatchExpr( arg, matcher, matcherString ); - } - -} // namespace Catch - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CHECK_THAT( macroName, matcher, resultDisposition, arg ) \ - do { \ - Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(arg) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ - INTERNAL_CATCH_TRY { \ - catchAssertionHandler.handleExpr( Catch::makeMatchExpr( arg, matcher, #matcher ) ); \ - } INTERNAL_CATCH_CATCH( catchAssertionHandler ) \ - INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( false ) - -/////////////////////////////////////////////////////////////////////////////// -#define INTERNAL_CATCH_THROWS_MATCHES( macroName, exceptionType, resultDisposition, matcher, ... ) \ - do { \ - Catch::AssertionHandler catchAssertionHandler( macroName, CATCH_INTERNAL_LINEINFO, CATCH_INTERNAL_STRINGIFY(__VA_ARGS__) ", " CATCH_INTERNAL_STRINGIFY(exceptionType) ", " CATCH_INTERNAL_STRINGIFY(matcher), resultDisposition ); \ - if( catchAssertionHandler.allowThrows() ) \ - try { \ - static_cast(__VA_ARGS__ ); \ - catchAssertionHandler.handleUnexpectedExceptionNotThrown(); \ - } \ - catch( exceptionType const& ex ) { \ - catchAssertionHandler.handleExpr( Catch::makeMatchExpr( ex, matcher, #matcher ) ); \ - } \ - catch( ... ) { \ - catchAssertionHandler.handleUnexpectedInflightException(); \ - } \ - else \ - catchAssertionHandler.handleThrowingCallSkipped(); \ - INTERNAL_CATCH_REACT( catchAssertionHandler ) \ - } while( false ) - -// end catch_capture_matchers.h -#endif - -// These files are included here so the single_include script doesn't put them -// in the conditionally compiled sections -// start catch_test_case_info.h - -#include -#include -#include - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpadded" -#endif - -namespace Catch { - - struct ITestInvoker; - - struct TestCaseInfo { - enum SpecialProperties{ - None = 0, - IsHidden = 1 << 1, - ShouldFail = 1 << 2, - MayFail = 1 << 3, - Throws = 1 << 4, - NonPortable = 1 << 5, - Benchmark = 1 << 6 - }; - - TestCaseInfo( std::string const& _name, - std::string const& _className, - std::string const& _description, - std::vector const& _tags, - SourceLineInfo const& _lineInfo ); - - friend void setTags( TestCaseInfo& testCaseInfo, std::vector tags ); - - bool isHidden() const; - bool throws() const; - bool okToFail() const; - bool expectedToFail() const; - - std::string tagsAsString() const; - - std::string name; - std::string className; - std::string description; - std::vector tags; - std::vector lcaseTags; - SourceLineInfo lineInfo; - SpecialProperties properties; - }; - - class TestCase : public TestCaseInfo { - public: - - TestCase( ITestInvoker* testCase, TestCaseInfo const& info ); - - TestCase withName( std::string const& _newName ) const; - - void invoke() const; - - TestCaseInfo const& getTestCaseInfo() const; - - bool operator == ( TestCase const& other ) const; - bool operator < ( TestCase const& other ) const; - - private: - std::shared_ptr test; - }; - - TestCase makeTestCase( ITestInvoker* testCase, - std::string const& className, - std::string const& name, - std::string const& description, - SourceLineInfo const& lineInfo ); -} - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -// end catch_test_case_info.h -// start catch_interfaces_runner.h - -namespace Catch { - - struct IRunner { - virtual ~IRunner(); - virtual bool aborting() const = 0; - }; -} - -// end catch_interfaces_runner.h - -#ifdef __OBJC__ -// start catch_objc.hpp - -#import - -#include - -// NB. Any general catch headers included here must be included -// in catch.hpp first to make sure they are included by the single -// header for non obj-usage - -/////////////////////////////////////////////////////////////////////////////// -// This protocol is really only here for (self) documenting purposes, since -// all its methods are optional. -@protocol OcFixture - -@optional - --(void) setUp; --(void) tearDown; - -@end - -namespace Catch { - - class OcMethod : public ITestInvoker { - - public: - OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {} - - virtual void invoke() const { - id obj = [[m_cls alloc] init]; - - performOptionalSelector( obj, @selector(setUp) ); - performOptionalSelector( obj, m_sel ); - performOptionalSelector( obj, @selector(tearDown) ); - - arcSafeRelease( obj ); - } - private: - virtual ~OcMethod() {} - - Class m_cls; - SEL m_sel; - }; - - namespace Detail{ - - inline std::string getAnnotation( Class cls, - std::string const& annotationName, - std::string const& testCaseName ) { - NSString* selStr = [[NSString alloc] initWithFormat:@"Catch_%s_%s", annotationName.c_str(), testCaseName.c_str()]; - SEL sel = NSSelectorFromString( selStr ); - arcSafeRelease( selStr ); - id value = performOptionalSelector( cls, sel ); - if( value ) - return [(NSString*)value UTF8String]; - return ""; - } - } - - inline std::size_t registerTestMethods() { - std::size_t noTestMethods = 0; - int noClasses = objc_getClassList( nullptr, 0 ); - - Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses); - objc_getClassList( classes, noClasses ); - - for( int c = 0; c < noClasses; c++ ) { - Class cls = classes[c]; - { - u_int count; - Method* methods = class_copyMethodList( cls, &count ); - for( u_int m = 0; m < count ; m++ ) { - SEL selector = method_getName(methods[m]); - std::string methodName = sel_getName(selector); - if( startsWith( methodName, "Catch_TestCase_" ) ) { - std::string testCaseName = methodName.substr( 15 ); - std::string name = Detail::getAnnotation( cls, "Name", testCaseName ); - std::string desc = Detail::getAnnotation( cls, "Description", testCaseName ); - const char* className = class_getName( cls ); - - getMutableRegistryHub().registerTest( makeTestCase( new OcMethod( cls, selector ), className, name.c_str(), desc.c_str(), SourceLineInfo("",0) ) ); - noTestMethods++; - } - } - free(methods); - } - } - return noTestMethods; - } - -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) - - namespace Matchers { - namespace Impl { - namespace NSStringMatchers { - - struct StringHolder : MatcherBase{ - StringHolder( NSString* substr ) : m_substr( [substr copy] ){} - StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){} - StringHolder() { - arcSafeRelease( m_substr ); - } - - bool match( NSString* arg ) const override { - return false; - } - - NSString* CATCH_ARC_STRONG m_substr; - }; - - struct Equals : StringHolder { - Equals( NSString* substr ) : StringHolder( substr ){} - - bool match( NSString* str ) const override { - return (str != nil || m_substr == nil ) && - [str isEqualToString:m_substr]; - } - - std::string describe() const override { - return "equals string: " + Catch::Detail::stringify( m_substr ); - } - }; - - struct Contains : StringHolder { - Contains( NSString* substr ) : StringHolder( substr ){} - - bool match( NSString* str ) const { - return (str != nil || m_substr == nil ) && - [str rangeOfString:m_substr].location != NSNotFound; - } - - std::string describe() const override { - return "contains string: " + Catch::Detail::stringify( m_substr ); - } - }; - - struct StartsWith : StringHolder { - StartsWith( NSString* substr ) : StringHolder( substr ){} - - bool match( NSString* str ) const override { - return (str != nil || m_substr == nil ) && - [str rangeOfString:m_substr].location == 0; - } - - std::string describe() const override { - return "starts with: " + Catch::Detail::stringify( m_substr ); - } - }; - struct EndsWith : StringHolder { - EndsWith( NSString* substr ) : StringHolder( substr ){} - - bool match( NSString* str ) const override { - return (str != nil || m_substr == nil ) && - [str rangeOfString:m_substr].location == [str length] - [m_substr length]; - } - - std::string describe() const override { - return "ends with: " + Catch::Detail::stringify( m_substr ); - } - }; - - } // namespace NSStringMatchers - } // namespace Impl - - inline Impl::NSStringMatchers::Equals - Equals( NSString* substr ){ return Impl::NSStringMatchers::Equals( substr ); } - - inline Impl::NSStringMatchers::Contains - Contains( NSString* substr ){ return Impl::NSStringMatchers::Contains( substr ); } - - inline Impl::NSStringMatchers::StartsWith - StartsWith( NSString* substr ){ return Impl::NSStringMatchers::StartsWith( substr ); } - - inline Impl::NSStringMatchers::EndsWith - EndsWith( NSString* substr ){ return Impl::NSStringMatchers::EndsWith( substr ); } - - } // namespace Matchers - - using namespace Matchers; - -#endif // CATCH_CONFIG_DISABLE_MATCHERS - -} // namespace Catch - -/////////////////////////////////////////////////////////////////////////////// -#define OC_MAKE_UNIQUE_NAME( root, uniqueSuffix ) root##uniqueSuffix -#define OC_TEST_CASE2( name, desc, uniqueSuffix ) \ -+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Name_test_, uniqueSuffix ) \ -{ \ -return @ name; \ -} \ -+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Description_test_, uniqueSuffix ) \ -{ \ -return @ desc; \ -} \ --(void) OC_MAKE_UNIQUE_NAME( Catch_TestCase_test_, uniqueSuffix ) - -#define OC_TEST_CASE( name, desc ) OC_TEST_CASE2( name, desc, __LINE__ ) - -// end catch_objc.hpp -#endif - -#ifdef CATCH_CONFIG_EXTERNAL_INTERFACES -// start catch_external_interfaces.h - -// start catch_reporter_bases.hpp - -// start catch_interfaces_reporter.h - -// start catch_config.hpp - -// start catch_test_spec_parser.h - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpadded" -#endif - -// start catch_test_spec.h - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wpadded" -#endif - -// start catch_wildcard_pattern.h - -namespace Catch -{ - class WildcardPattern { - enum WildcardPosition { - NoWildcard = 0, - WildcardAtStart = 1, - WildcardAtEnd = 2, - WildcardAtBothEnds = WildcardAtStart | WildcardAtEnd - }; - - public: - - WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity ); - virtual ~WildcardPattern() = default; - virtual bool matches( std::string const& str ) const; - - private: - std::string adjustCase( std::string const& str ) const; - CaseSensitive::Choice m_caseSensitivity; - WildcardPosition m_wildcard = NoWildcard; - std::string m_pattern; - }; -} - -// end catch_wildcard_pattern.h -#include -#include -#include - -namespace Catch { - - class TestSpec { - struct Pattern { - virtual ~Pattern(); - virtual bool matches( TestCaseInfo const& testCase ) const = 0; - }; - using PatternPtr = std::shared_ptr; - - class NamePattern : public Pattern { - public: - NamePattern( std::string const& name ); - virtual ~NamePattern(); - virtual bool matches( TestCaseInfo const& testCase ) const override; - private: - WildcardPattern m_wildcardPattern; - }; - - class TagPattern : public Pattern { - public: - TagPattern( std::string const& tag ); - virtual ~TagPattern(); - virtual bool matches( TestCaseInfo const& testCase ) const override; - private: - std::string m_tag; - }; - - class ExcludedPattern : public Pattern { - public: - ExcludedPattern( PatternPtr const& underlyingPattern ); - virtual ~ExcludedPattern(); - virtual bool matches( TestCaseInfo const& testCase ) const override; - private: - PatternPtr m_underlyingPattern; - }; - - struct Filter { - std::vector m_patterns; - - bool matches( TestCaseInfo const& testCase ) const; - }; - - public: - bool hasFilters() const; - bool matches( TestCaseInfo const& testCase ) const; - - private: - std::vector m_filters; - - friend class TestSpecParser; - }; -} - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -// end catch_test_spec.h -// start catch_interfaces_tag_alias_registry.h - -#include - -namespace Catch { - - struct TagAlias; - - struct ITagAliasRegistry { - virtual ~ITagAliasRegistry(); - // Nullptr if not present - virtual TagAlias const* find( std::string const& alias ) const = 0; - virtual std::string expandAliases( std::string const& unexpandedTestSpec ) const = 0; - - static ITagAliasRegistry const& get(); - }; - -} // end namespace Catch - -// end catch_interfaces_tag_alias_registry.h -namespace Catch { - - class TestSpecParser { - enum Mode{ None, Name, QuotedName, Tag, EscapedName }; - Mode m_mode = None; - bool m_exclusion = false; - std::size_t m_start = std::string::npos, m_pos = 0; - std::string m_arg; - std::vector m_escapeChars; - TestSpec::Filter m_currentFilter; - TestSpec m_testSpec; - ITagAliasRegistry const* m_tagAliases = nullptr; - - public: - TestSpecParser( ITagAliasRegistry const& tagAliases ); - - TestSpecParser& parse( std::string const& arg ); - TestSpec testSpec(); - - private: - void visitChar( char c ); - void startNewMode( Mode mode, std::size_t start ); - void escape(); - std::string subString() const; - - template - void addPattern() { - std::string token = subString(); - for( std::size_t i = 0; i < m_escapeChars.size(); ++i ) - token = token.substr( 0, m_escapeChars[i]-m_start-i ) + token.substr( m_escapeChars[i]-m_start-i+1 ); - m_escapeChars.clear(); - if( startsWith( token, "exclude:" ) ) { - m_exclusion = true; - token = token.substr( 8 ); - } - if( !token.empty() ) { - TestSpec::PatternPtr pattern = std::make_shared( token ); - if( m_exclusion ) - pattern = std::make_shared( pattern ); - m_currentFilter.m_patterns.push_back( pattern ); - } - m_exclusion = false; - m_mode = None; - } - - void addFilter(); - }; - TestSpec parseTestSpec( std::string const& arg ); - -} // namespace Catch - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -// end catch_test_spec_parser.h -// start catch_interfaces_config.h - -#include -#include -#include -#include - -namespace Catch { - - enum class Verbosity { - Quiet = 0, - Normal, - High - }; - - struct WarnAbout { enum What { - Nothing = 0x00, - NoAssertions = 0x01 - }; }; - - struct ShowDurations { enum OrNot { - DefaultForReporter, - Always, - Never - }; }; - struct RunTests { enum InWhatOrder { - InDeclarationOrder, - InLexicographicalOrder, - InRandomOrder - }; }; - struct UseColour { enum YesOrNo { - Auto, - Yes, - No - }; }; - struct WaitForKeypress { enum When { - Never, - BeforeStart = 1, - BeforeExit = 2, - BeforeStartAndExit = BeforeStart | BeforeExit - }; }; - - class TestSpec; - - struct IConfig : NonCopyable { - - virtual ~IConfig(); - - virtual bool allowThrows() const = 0; - virtual std::ostream& stream() const = 0; - virtual std::string name() const = 0; - virtual bool includeSuccessfulResults() const = 0; - virtual bool shouldDebugBreak() const = 0; - virtual bool warnAboutMissingAssertions() const = 0; - virtual int abortAfter() const = 0; - virtual bool showInvisibles() const = 0; - virtual ShowDurations::OrNot showDurations() const = 0; - virtual TestSpec const& testSpec() const = 0; - virtual RunTests::InWhatOrder runOrder() const = 0; - virtual unsigned int rngSeed() const = 0; - virtual int benchmarkResolutionMultiple() const = 0; - virtual UseColour::YesOrNo useColour() const = 0; - virtual std::vector const& getSectionsToRun() const = 0; - virtual Verbosity verbosity() const = 0; - }; - - using IConfigPtr = std::shared_ptr; -} - -// end catch_interfaces_config.h -// Libstdc++ doesn't like incomplete classes for unique_ptr - -#include -#include -#include - -#ifndef CATCH_CONFIG_CONSOLE_WIDTH -#define CATCH_CONFIG_CONSOLE_WIDTH 80 -#endif - -namespace Catch { - - struct IStream; - - struct ConfigData { - bool listTests = false; - bool listTags = false; - bool listReporters = false; - bool listTestNamesOnly = false; - - bool showSuccessfulTests = false; - bool shouldDebugBreak = false; - bool noThrow = false; - bool showHelp = false; - bool showInvisibles = false; - bool filenamesAsTags = false; - bool libIdentify = false; - - int abortAfter = -1; - unsigned int rngSeed = 0; - int benchmarkResolutionMultiple = 100; - - Verbosity verbosity = Verbosity::Normal; - WarnAbout::What warnings = WarnAbout::Nothing; - ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter; - RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder; - UseColour::YesOrNo useColour = UseColour::Auto; - WaitForKeypress::When waitForKeypress = WaitForKeypress::Never; - - std::string outputFilename; - std::string name; - std::string processName; - - std::vector reporterNames; - std::vector testsOrTags; - std::vector sectionsToRun; - }; - - class Config : public IConfig { - public: - - Config() = default; - Config( ConfigData const& data ); - virtual ~Config() = default; - - std::string const& getFilename() const; - - bool listTests() const; - bool listTestNamesOnly() const; - bool listTags() const; - bool listReporters() const; - - std::string getProcessName() const; - - std::vector const& getReporterNames() const; - std::vector const& getSectionsToRun() const override; - - virtual TestSpec const& testSpec() const override; - - bool showHelp() const; - - // IConfig interface - bool allowThrows() const override; - std::ostream& stream() const override; - std::string name() const override; - bool includeSuccessfulResults() const override; - bool warnAboutMissingAssertions() const override; - ShowDurations::OrNot showDurations() const override; - RunTests::InWhatOrder runOrder() const override; - unsigned int rngSeed() const override; - int benchmarkResolutionMultiple() const override; - UseColour::YesOrNo useColour() const override; - bool shouldDebugBreak() const override; - int abortAfter() const override; - bool showInvisibles() const override; - Verbosity verbosity() const override; - - private: - - IStream const* openStream(); - ConfigData m_data; - - std::unique_ptr m_stream; - TestSpec m_testSpec; - }; - -} // end namespace Catch - -// end catch_config.hpp -// start catch_assertionresult.h - -#include - -namespace Catch { - - struct AssertionResultData - { - AssertionResultData() = delete; - - AssertionResultData( ResultWas::OfType _resultType, LazyExpression const& _lazyExpression ); - - std::string message; - mutable std::string reconstructedExpression; - LazyExpression lazyExpression; - ResultWas::OfType resultType; - - std::string reconstructExpression() const; - }; - - class AssertionResult { - public: - AssertionResult() = delete; - AssertionResult( AssertionInfo const& info, AssertionResultData const& data ); - - bool isOk() const; - bool succeeded() const; - ResultWas::OfType getResultType() const; - bool hasExpression() const; - bool hasMessage() const; - std::string getExpression() const; - std::string getExpressionInMacro() const; - bool hasExpandedExpression() const; - std::string getExpandedExpression() const; - std::string getMessage() const; - SourceLineInfo getSourceInfo() const; - StringRef getTestMacroName() const; - - //protected: - AssertionInfo m_info; - AssertionResultData m_resultData; - }; - -} // end namespace Catch - -// end catch_assertionresult.h -// start catch_option.hpp - -namespace Catch { - - // An optional type - template - class Option { - public: - Option() : nullableValue( nullptr ) {} - Option( T const& _value ) - : nullableValue( new( storage ) T( _value ) ) - {} - Option( Option const& _other ) - : nullableValue( _other ? new( storage ) T( *_other ) : nullptr ) - {} - - ~Option() { - reset(); - } - - Option& operator= ( Option const& _other ) { - if( &_other != this ) { - reset(); - if( _other ) - nullableValue = new( storage ) T( *_other ); - } - return *this; - } - Option& operator = ( T const& _value ) { - reset(); - nullableValue = new( storage ) T( _value ); - return *this; - } - - void reset() { - if( nullableValue ) - nullableValue->~T(); - nullableValue = nullptr; - } - - T& operator*() { return *nullableValue; } - T const& operator*() const { return *nullableValue; } - T* operator->() { return nullableValue; } - const T* operator->() const { return nullableValue; } - - T valueOr( T const& defaultValue ) const { - return nullableValue ? *nullableValue : defaultValue; - } - - bool some() const { return nullableValue != nullptr; } - bool none() const { return nullableValue == nullptr; } - - bool operator !() const { return nullableValue == nullptr; } - explicit operator bool() const { - return some(); - } - - private: - T *nullableValue; - alignas(alignof(T)) char storage[sizeof(T)]; - }; - -} // end namespace Catch - -// end catch_option.hpp -#include -#include -#include -#include -#include - -namespace Catch { - - struct ReporterConfig { - explicit ReporterConfig( IConfigPtr const& _fullConfig ); - - ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream ); - - std::ostream& stream() const; - IConfigPtr fullConfig() const; - - private: - std::ostream* m_stream; - IConfigPtr m_fullConfig; - }; - - struct ReporterPreferences { - bool shouldRedirectStdOut = false; - }; - - template - struct LazyStat : Option { - LazyStat& operator=( T const& _value ) { - Option::operator=( _value ); - used = false; - return *this; - } - void reset() { - Option::reset(); - used = false; - } - bool used = false; - }; - - struct TestRunInfo { - TestRunInfo( std::string const& _name ); - std::string name; - }; - struct GroupInfo { - GroupInfo( std::string const& _name, - std::size_t _groupIndex, - std::size_t _groupsCount ); - - std::string name; - std::size_t groupIndex; - std::size_t groupsCounts; - }; - - struct AssertionStats { - AssertionStats( AssertionResult const& _assertionResult, - std::vector const& _infoMessages, - Totals const& _totals ); - - AssertionStats( AssertionStats const& ) = default; - AssertionStats( AssertionStats && ) = default; - AssertionStats& operator = ( AssertionStats const& ) = default; - AssertionStats& operator = ( AssertionStats && ) = default; - virtual ~AssertionStats(); - - AssertionResult assertionResult; - std::vector infoMessages; - Totals totals; - }; - - struct SectionStats { - SectionStats( SectionInfo const& _sectionInfo, - Counts const& _assertions, - double _durationInSeconds, - bool _missingAssertions ); - SectionStats( SectionStats const& ) = default; - SectionStats( SectionStats && ) = default; - SectionStats& operator = ( SectionStats const& ) = default; - SectionStats& operator = ( SectionStats && ) = default; - virtual ~SectionStats(); - - SectionInfo sectionInfo; - Counts assertions; - double durationInSeconds; - bool missingAssertions; - }; - - struct TestCaseStats { - TestCaseStats( TestCaseInfo const& _testInfo, - Totals const& _totals, - std::string const& _stdOut, - std::string const& _stdErr, - bool _aborting ); - - TestCaseStats( TestCaseStats const& ) = default; - TestCaseStats( TestCaseStats && ) = default; - TestCaseStats& operator = ( TestCaseStats const& ) = default; - TestCaseStats& operator = ( TestCaseStats && ) = default; - virtual ~TestCaseStats(); - - TestCaseInfo testInfo; - Totals totals; - std::string stdOut; - std::string stdErr; - bool aborting; - }; - - struct TestGroupStats { - TestGroupStats( GroupInfo const& _groupInfo, - Totals const& _totals, - bool _aborting ); - TestGroupStats( GroupInfo const& _groupInfo ); - - TestGroupStats( TestGroupStats const& ) = default; - TestGroupStats( TestGroupStats && ) = default; - TestGroupStats& operator = ( TestGroupStats const& ) = default; - TestGroupStats& operator = ( TestGroupStats && ) = default; - virtual ~TestGroupStats(); - - GroupInfo groupInfo; - Totals totals; - bool aborting; - }; - - struct TestRunStats { - TestRunStats( TestRunInfo const& _runInfo, - Totals const& _totals, - bool _aborting ); - - TestRunStats( TestRunStats const& ) = default; - TestRunStats( TestRunStats && ) = default; - TestRunStats& operator = ( TestRunStats const& ) = default; - TestRunStats& operator = ( TestRunStats && ) = default; - virtual ~TestRunStats(); - - TestRunInfo runInfo; - Totals totals; - bool aborting; - }; - - struct BenchmarkInfo { - std::string name; - }; - struct BenchmarkStats { - BenchmarkInfo info; - std::size_t iterations; - uint64_t elapsedTimeInNanoseconds; - }; - - struct IStreamingReporter { - virtual ~IStreamingReporter() = default; - - // Implementing class must also provide the following static methods: - // static std::string getDescription(); - // static std::set getSupportedVerbosities() - - virtual ReporterPreferences getPreferences() const = 0; - - virtual void noMatchingTestCases( std::string const& spec ) = 0; - - virtual void testRunStarting( TestRunInfo const& testRunInfo ) = 0; - virtual void testGroupStarting( GroupInfo const& groupInfo ) = 0; - - virtual void testCaseStarting( TestCaseInfo const& testInfo ) = 0; - virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0; - - // *** experimental *** - virtual void benchmarkStarting( BenchmarkInfo const& ) {} - - virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0; - - // The return value indicates if the messages buffer should be cleared: - virtual bool assertionEnded( AssertionStats const& assertionStats ) = 0; - - // *** experimental *** - virtual void benchmarkEnded( BenchmarkStats const& ) {} - - virtual void sectionEnded( SectionStats const& sectionStats ) = 0; - virtual void testCaseEnded( TestCaseStats const& testCaseStats ) = 0; - virtual void testGroupEnded( TestGroupStats const& testGroupStats ) = 0; - virtual void testRunEnded( TestRunStats const& testRunStats ) = 0; - - virtual void skipTest( TestCaseInfo const& testInfo ) = 0; - - // Default empty implementation provided - virtual void fatalErrorEncountered( StringRef name ); - - virtual bool isMulti() const; - }; - using IStreamingReporterPtr = std::unique_ptr; - - struct IReporterFactory { - virtual ~IReporterFactory(); - virtual IStreamingReporterPtr create( ReporterConfig const& config ) const = 0; - virtual std::string getDescription() const = 0; - }; - using IReporterFactoryPtr = std::shared_ptr; - - struct IReporterRegistry { - using FactoryMap = std::map; - using Listeners = std::vector; - - virtual ~IReporterRegistry(); - virtual IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const = 0; - virtual FactoryMap const& getFactories() const = 0; - virtual Listeners const& getListeners() const = 0; - }; - - void addReporter( IStreamingReporterPtr& existingReporter, IStreamingReporterPtr&& additionalReporter ); - -} // end namespace Catch - -// end catch_interfaces_reporter.h -#include -#include -#include -#include -#include -#include -#include - -namespace Catch { - void prepareExpandedExpression(AssertionResult& result); - - // Returns double formatted as %.3f (format expected on output) - std::string getFormattedDuration( double duration ); - - template - struct StreamingReporterBase : IStreamingReporter { - - StreamingReporterBase( ReporterConfig const& _config ) - : m_config( _config.fullConfig() ), - stream( _config.stream() ) - { - m_reporterPrefs.shouldRedirectStdOut = false; - if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) ) - throw std::domain_error( "Verbosity level not supported by this reporter" ); - } - - ReporterPreferences getPreferences() const override { - return m_reporterPrefs; - } - - static std::set getSupportedVerbosities() { - return { Verbosity::Normal }; - } - - ~StreamingReporterBase() override = default; - - void noMatchingTestCases(std::string const&) override {} - - void testRunStarting(TestRunInfo const& _testRunInfo) override { - currentTestRunInfo = _testRunInfo; - } - void testGroupStarting(GroupInfo const& _groupInfo) override { - currentGroupInfo = _groupInfo; - } - - void testCaseStarting(TestCaseInfo const& _testInfo) override { - currentTestCaseInfo = _testInfo; - } - void sectionStarting(SectionInfo const& _sectionInfo) override { - m_sectionStack.push_back(_sectionInfo); - } - - void sectionEnded(SectionStats const& /* _sectionStats */) override { - m_sectionStack.pop_back(); - } - void testCaseEnded(TestCaseStats const& /* _testCaseStats */) override { - currentTestCaseInfo.reset(); - } - void testGroupEnded(TestGroupStats const& /* _testGroupStats */) override { - currentGroupInfo.reset(); - } - void testRunEnded(TestRunStats const& /* _testRunStats */) override { - currentTestCaseInfo.reset(); - currentGroupInfo.reset(); - currentTestRunInfo.reset(); - } - - void skipTest(TestCaseInfo const&) override { - // Don't do anything with this by default. - // It can optionally be overridden in the derived class. - } - - IConfigPtr m_config; - std::ostream& stream; - - LazyStat currentTestRunInfo; - LazyStat currentGroupInfo; - LazyStat currentTestCaseInfo; - - std::vector m_sectionStack; - ReporterPreferences m_reporterPrefs; - }; - - template - struct CumulativeReporterBase : IStreamingReporter { - template - struct Node { - explicit Node( T const& _value ) : value( _value ) {} - virtual ~Node() {} - - using ChildNodes = std::vector>; - T value; - ChildNodes children; - }; - struct SectionNode { - explicit SectionNode(SectionStats const& _stats) : stats(_stats) {} - virtual ~SectionNode() = default; - - bool operator == (SectionNode const& other) const { - return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo; - } - bool operator == (std::shared_ptr const& other) const { - return operator==(*other); - } - - SectionStats stats; - using ChildSections = std::vector>; - using Assertions = std::vector; - ChildSections childSections; - Assertions assertions; - std::string stdOut; - std::string stdErr; - }; - - struct BySectionInfo { - BySectionInfo( SectionInfo const& other ) : m_other( other ) {} - BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} - bool operator() (std::shared_ptr const& node) const { - return ((node->stats.sectionInfo.name == m_other.name) && - (node->stats.sectionInfo.lineInfo == m_other.lineInfo)); - } - void operator=(BySectionInfo const&) = delete; - - private: - SectionInfo const& m_other; - }; - - using TestCaseNode = Node; - using TestGroupNode = Node; - using TestRunNode = Node; - - CumulativeReporterBase( ReporterConfig const& _config ) - : m_config( _config.fullConfig() ), - stream( _config.stream() ) - { - m_reporterPrefs.shouldRedirectStdOut = false; - if( !DerivedT::getSupportedVerbosities().count( m_config->verbosity() ) ) - throw std::domain_error( "Verbosity level not supported by this reporter" ); - } - ~CumulativeReporterBase() override = default; - - ReporterPreferences getPreferences() const override { - return m_reporterPrefs; - } - - static std::set getSupportedVerbosities() { - return { Verbosity::Normal }; - } - - void testRunStarting( TestRunInfo const& ) override {} - void testGroupStarting( GroupInfo const& ) override {} - - void testCaseStarting( TestCaseInfo const& ) override {} - - void sectionStarting( SectionInfo const& sectionInfo ) override { - SectionStats incompleteStats( sectionInfo, Counts(), 0, false ); - std::shared_ptr node; - if( m_sectionStack.empty() ) { - if( !m_rootSection ) - m_rootSection = std::make_shared( incompleteStats ); - node = m_rootSection; - } - else { - SectionNode& parentNode = *m_sectionStack.back(); - auto it = - std::find_if( parentNode.childSections.begin(), - parentNode.childSections.end(), - BySectionInfo( sectionInfo ) ); - if( it == parentNode.childSections.end() ) { - node = std::make_shared( incompleteStats ); - parentNode.childSections.push_back( node ); - } - else - node = *it; - } - m_sectionStack.push_back( node ); - m_deepestSection = std::move(node); - } - - void assertionStarting(AssertionInfo const&) override {} - - bool assertionEnded(AssertionStats const& assertionStats) override { - assert(!m_sectionStack.empty()); - // AssertionResult holds a pointer to a temporary DecomposedExpression, - // which getExpandedExpression() calls to build the expression string. - // Our section stack copy of the assertionResult will likely outlive the - // temporary, so it must be expanded or discarded now to avoid calling - // a destroyed object later. - prepareExpandedExpression(const_cast( assertionStats.assertionResult ) ); - SectionNode& sectionNode = *m_sectionStack.back(); - sectionNode.assertions.push_back(assertionStats); - return true; - } - void sectionEnded(SectionStats const& sectionStats) override { - assert(!m_sectionStack.empty()); - SectionNode& node = *m_sectionStack.back(); - node.stats = sectionStats; - m_sectionStack.pop_back(); - } - void testCaseEnded(TestCaseStats const& testCaseStats) override { - auto node = std::make_shared(testCaseStats); - assert(m_sectionStack.size() == 0); - node->children.push_back(m_rootSection); - m_testCases.push_back(node); - m_rootSection.reset(); - - assert(m_deepestSection); - m_deepestSection->stdOut = testCaseStats.stdOut; - m_deepestSection->stdErr = testCaseStats.stdErr; - } - void testGroupEnded(TestGroupStats const& testGroupStats) override { - auto node = std::make_shared(testGroupStats); - node->children.swap(m_testCases); - m_testGroups.push_back(node); - } - void testRunEnded(TestRunStats const& testRunStats) override { - auto node = std::make_shared(testRunStats); - node->children.swap(m_testGroups); - m_testRuns.push_back(node); - testRunEndedCumulative(); - } - virtual void testRunEndedCumulative() = 0; - - void skipTest(TestCaseInfo const&) override {} - - IConfigPtr m_config; - std::ostream& stream; - std::vector m_assertions; - std::vector>> m_sections; - std::vector> m_testCases; - std::vector> m_testGroups; - - std::vector> m_testRuns; - - std::shared_ptr m_rootSection; - std::shared_ptr m_deepestSection; - std::vector> m_sectionStack; - ReporterPreferences m_reporterPrefs; - }; - - template - char const* getLineOfChars() { - static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0}; - if( !*line ) { - std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 ); - line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0; - } - return line; - } - - struct TestEventListenerBase : StreamingReporterBase { - TestEventListenerBase( ReporterConfig const& _config ); - - void assertionStarting(AssertionInfo const&) override; - bool assertionEnded(AssertionStats const&) override; - }; - -} // end namespace Catch - -// end catch_reporter_bases.hpp -// start catch_console_colour.h - -namespace Catch { - - struct Colour { - enum Code { - None = 0, - - White, - Red, - Green, - Blue, - Cyan, - Yellow, - Grey, - - Bright = 0x10, - - BrightRed = Bright | Red, - BrightGreen = Bright | Green, - LightGrey = Bright | Grey, - BrightWhite = Bright | White, - BrightYellow = Bright | Yellow, - - // By intention - FileName = LightGrey, - Warning = BrightYellow, - ResultError = BrightRed, - ResultSuccess = BrightGreen, - ResultExpectedFailure = Warning, - - Error = BrightRed, - Success = Green, - - OriginalExpression = Cyan, - ReconstructedExpression = BrightYellow, - - SecondaryText = LightGrey, - Headers = White - }; - - // Use constructed object for RAII guard - Colour( Code _colourCode ); - Colour( Colour&& other ) noexcept; - Colour& operator=( Colour&& other ) noexcept; - ~Colour(); - - // Use static method for one-shot changes - static void use( Code _colourCode ); - - private: - bool m_moved = false; - }; - - std::ostream& operator << ( std::ostream& os, Colour const& ); - -} // end namespace Catch - -// end catch_console_colour.h -// start catch_reporter_registrars.hpp - - -namespace Catch { - - template - class ReporterRegistrar { - - class ReporterFactory : public IReporterFactory { - - virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override { - return std::unique_ptr( new T( config ) ); - } - - virtual std::string getDescription() const override { - return T::getDescription(); - } - }; - - public: - - explicit ReporterRegistrar( std::string const& name ) { - getMutableRegistryHub().registerReporter( name, std::make_shared() ); - } - }; - - template - class ListenerRegistrar { - - class ListenerFactory : public IReporterFactory { - - virtual IStreamingReporterPtr create( ReporterConfig const& config ) const override { - return std::unique_ptr( new T( config ) ); - } - virtual std::string getDescription() const override { - return std::string(); - } - }; - - public: - - ListenerRegistrar() { - getMutableRegistryHub().registerListener( std::make_shared() ); - } - }; -} - -#if !defined(CATCH_CONFIG_DISABLE) - -#define CATCH_REGISTER_REPORTER( name, reporterType ) \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::ReporterRegistrar catch_internal_RegistrarFor##reporterType( name ); } \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS - -#define CATCH_REGISTER_LISTENER( listenerType ) \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::ListenerRegistrar catch_internal_RegistrarFor##listenerType; } \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS -#else // CATCH_CONFIG_DISABLE - -#define CATCH_REGISTER_REPORTER(name, reporterType) -#define CATCH_REGISTER_LISTENER(listenerType) - -#endif // CATCH_CONFIG_DISABLE - -// end catch_reporter_registrars.hpp -// Allow users to base their work off existing reporters -// start catch_reporter_compact.h - -namespace Catch { - - struct CompactReporter : StreamingReporterBase { - - using StreamingReporterBase::StreamingReporterBase; - - ~CompactReporter() override; - - static std::string getDescription(); - - ReporterPreferences getPreferences() const override; - - void noMatchingTestCases(std::string const& spec) override; - - void assertionStarting(AssertionInfo const&) override; - - bool assertionEnded(AssertionStats const& _assertionStats) override; - - void sectionEnded(SectionStats const& _sectionStats) override; - - void testRunEnded(TestRunStats const& _testRunStats) override; - - }; - -} // end namespace Catch - -// end catch_reporter_compact.h -// start catch_reporter_console.h - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch - // Note that 4062 (not all labels are handled - // and default is missing) is enabled -#endif - -namespace Catch { - // Fwd decls - struct SummaryColumn; - class TablePrinter; - - struct ConsoleReporter : StreamingReporterBase { - std::unique_ptr m_tablePrinter; - - ConsoleReporter(ReporterConfig const& config); - ~ConsoleReporter() override; - static std::string getDescription(); - - void noMatchingTestCases(std::string const& spec) override; - - void assertionStarting(AssertionInfo const&) override; - - bool assertionEnded(AssertionStats const& _assertionStats) override; - - void sectionStarting(SectionInfo const& _sectionInfo) override; - void sectionEnded(SectionStats const& _sectionStats) override; - - void benchmarkStarting(BenchmarkInfo const& info) override; - void benchmarkEnded(BenchmarkStats const& stats) override; - - void testCaseEnded(TestCaseStats const& _testCaseStats) override; - void testGroupEnded(TestGroupStats const& _testGroupStats) override; - void testRunEnded(TestRunStats const& _testRunStats) override; - - private: - - void lazyPrint(); - - void lazyPrintWithoutClosingBenchmarkTable(); - void lazyPrintRunInfo(); - void lazyPrintGroupInfo(); - void printTestCaseAndSectionHeader(); - - void printClosedHeader(std::string const& _name); - void printOpenHeader(std::string const& _name); - - // if string has a : in first line will set indent to follow it on - // subsequent lines - void printHeaderString(std::string const& _string, std::size_t indent = 0); - - void printTotals(Totals const& totals); - void printSummaryRow(std::string const& label, std::vector const& cols, std::size_t row); - - void printTotalsDivider(Totals const& totals); - void printSummaryDivider(); - - private: - bool m_headerPrinted = false; - }; - -} // end namespace Catch - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif - -// end catch_reporter_console.h -// start catch_reporter_junit.h - -// start catch_xmlwriter.h - -#include - -namespace Catch { - - class XmlEncode { - public: - enum ForWhat { ForTextNodes, ForAttributes }; - - XmlEncode( std::string const& str, ForWhat forWhat = ForTextNodes ); - - void encodeTo( std::ostream& os ) const; - - friend std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ); - - private: - std::string m_str; - ForWhat m_forWhat; - }; - - class XmlWriter { - public: - - class ScopedElement { - public: - ScopedElement( XmlWriter* writer ); - - ScopedElement( ScopedElement&& other ) noexcept; - ScopedElement& operator=( ScopedElement&& other ) noexcept; - - ~ScopedElement(); - - ScopedElement& writeText( std::string const& text, bool indent = true ); - - template - ScopedElement& writeAttribute( std::string const& name, T const& attribute ) { - m_writer->writeAttribute( name, attribute ); - return *this; - } - - private: - mutable XmlWriter* m_writer = nullptr; - }; - - XmlWriter( std::ostream& os = Catch::cout() ); - ~XmlWriter(); - - XmlWriter( XmlWriter const& ) = delete; - XmlWriter& operator=( XmlWriter const& ) = delete; - - XmlWriter& startElement( std::string const& name ); - - ScopedElement scopedElement( std::string const& name ); - - XmlWriter& endElement(); - - XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ); - - XmlWriter& writeAttribute( std::string const& name, bool attribute ); - - template - XmlWriter& writeAttribute( std::string const& name, T const& attribute ) { - ReusableStringStream rss; - rss << attribute; - return writeAttribute( name, rss.str() ); - } - - XmlWriter& writeText( std::string const& text, bool indent = true ); - - XmlWriter& writeComment( std::string const& text ); - - void writeStylesheetRef( std::string const& url ); - - XmlWriter& writeBlankLine(); - - void ensureTagClosed(); - - private: - - void writeDeclaration(); - - void newlineIfNecessary(); - - bool m_tagIsOpen = false; - bool m_needsNewline = false; - std::vector m_tags; - std::string m_indent; - std::ostream& m_os; - }; - -} - -// end catch_xmlwriter.h -namespace Catch { - - class JunitReporter : public CumulativeReporterBase { - public: - JunitReporter(ReporterConfig const& _config); - - ~JunitReporter() override; - - static std::string getDescription(); - - void noMatchingTestCases(std::string const& /*spec*/) override; - - void testRunStarting(TestRunInfo const& runInfo) override; - - void testGroupStarting(GroupInfo const& groupInfo) override; - - void testCaseStarting(TestCaseInfo const& testCaseInfo) override; - bool assertionEnded(AssertionStats const& assertionStats) override; - - void testCaseEnded(TestCaseStats const& testCaseStats) override; - - void testGroupEnded(TestGroupStats const& testGroupStats) override; - - void testRunEndedCumulative() override; - - void writeGroup(TestGroupNode const& groupNode, double suiteTime); - - void writeTestCase(TestCaseNode const& testCaseNode); - - void writeSection(std::string const& className, - std::string const& rootName, - SectionNode const& sectionNode); - - void writeAssertions(SectionNode const& sectionNode); - void writeAssertion(AssertionStats const& stats); - - XmlWriter xml; - Timer suiteTimer; - std::string stdOutForSuite; - std::string stdErrForSuite; - unsigned int unexpectedExceptions = 0; - bool m_okToFail = false; - }; - -} // end namespace Catch - -// end catch_reporter_junit.h -// start catch_reporter_xml.h - -namespace Catch { - class XmlReporter : public StreamingReporterBase { - public: - XmlReporter(ReporterConfig const& _config); - - ~XmlReporter() override; - - static std::string getDescription(); - - virtual std::string getStylesheetRef() const; - - void writeSourceInfo(SourceLineInfo const& sourceInfo); - - public: // StreamingReporterBase - - void noMatchingTestCases(std::string const& s) override; - - void testRunStarting(TestRunInfo const& testInfo) override; - - void testGroupStarting(GroupInfo const& groupInfo) override; - - void testCaseStarting(TestCaseInfo const& testInfo) override; - - void sectionStarting(SectionInfo const& sectionInfo) override; - - void assertionStarting(AssertionInfo const&) override; - - bool assertionEnded(AssertionStats const& assertionStats) override; - - void sectionEnded(SectionStats const& sectionStats) override; - - void testCaseEnded(TestCaseStats const& testCaseStats) override; - - void testGroupEnded(TestGroupStats const& testGroupStats) override; - - void testRunEnded(TestRunStats const& testRunStats) override; - - private: - Timer m_testCaseTimer; - XmlWriter m_xml; - int m_sectionDepth = 0; - }; - -} // end namespace Catch - -// end catch_reporter_xml.h - -// end catch_external_interfaces.h -#endif - -#endif // ! CATCH_CONFIG_IMPL_ONLY - -#ifdef CATCH_IMPL -// start catch_impl.hpp - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wweak-vtables" -#endif - -// Keep these here for external reporters -// start catch_test_case_tracker.h - -#include -#include -#include - -namespace Catch { -namespace TestCaseTracking { - - struct NameAndLocation { - std::string name; - SourceLineInfo location; - - NameAndLocation( std::string const& _name, SourceLineInfo const& _location ); - }; - - struct ITracker; - - using ITrackerPtr = std::shared_ptr; - - struct ITracker { - virtual ~ITracker(); - - // static queries - virtual NameAndLocation const& nameAndLocation() const = 0; - - // dynamic queries - virtual bool isComplete() const = 0; // Successfully completed or failed - virtual bool isSuccessfullyCompleted() const = 0; - virtual bool isOpen() const = 0; // Started but not complete - virtual bool hasChildren() const = 0; - - virtual ITracker& parent() = 0; - - // actions - virtual void close() = 0; // Successfully complete - virtual void fail() = 0; - virtual void markAsNeedingAnotherRun() = 0; - - virtual void addChild( ITrackerPtr const& child ) = 0; - virtual ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) = 0; - virtual void openChild() = 0; - - // Debug/ checking - virtual bool isSectionTracker() const = 0; - virtual bool isIndexTracker() const = 0; - }; - - class TrackerContext { - - enum RunState { - NotStarted, - Executing, - CompletedCycle - }; - - ITrackerPtr m_rootTracker; - ITracker* m_currentTracker = nullptr; - RunState m_runState = NotStarted; - - public: - - static TrackerContext& instance(); - - ITracker& startRun(); - void endRun(); - - void startCycle(); - void completeCycle(); - - bool completedCycle() const; - ITracker& currentTracker(); - void setCurrentTracker( ITracker* tracker ); - }; - - class TrackerBase : public ITracker { - protected: - enum CycleState { - NotStarted, - Executing, - ExecutingChildren, - NeedsAnotherRun, - CompletedSuccessfully, - Failed - }; - - class TrackerHasName { - NameAndLocation m_nameAndLocation; - public: - TrackerHasName( NameAndLocation const& nameAndLocation ); - bool operator ()( ITrackerPtr const& tracker ) const; - }; - - using Children = std::vector; - NameAndLocation m_nameAndLocation; - TrackerContext& m_ctx; - ITracker* m_parent; - Children m_children; - CycleState m_runState = NotStarted; - - public: - TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); - - NameAndLocation const& nameAndLocation() const override; - bool isComplete() const override; - bool isSuccessfullyCompleted() const override; - bool isOpen() const override; - bool hasChildren() const override; - - void addChild( ITrackerPtr const& child ) override; - - ITrackerPtr findChild( NameAndLocation const& nameAndLocation ) override; - ITracker& parent() override; - - void openChild() override; - - bool isSectionTracker() const override; - bool isIndexTracker() const override; - - void open(); - - void close() override; - void fail() override; - void markAsNeedingAnotherRun() override; - - private: - void moveToParent(); - void moveToThis(); - }; - - class SectionTracker : public TrackerBase { - std::vector m_filters; - public: - SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ); - - bool isSectionTracker() const override; - - static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ); - - void tryOpen(); - - void addInitialFilters( std::vector const& filters ); - void addNextFilters( std::vector const& filters ); - }; - - class IndexTracker : public TrackerBase { - int m_size; - int m_index = -1; - public: - IndexTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent, int size ); - - bool isIndexTracker() const override; - void close() override; - - static IndexTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation, int size ); - - int index() const; - - void moveNext(); - }; - -} // namespace TestCaseTracking - -using TestCaseTracking::ITracker; -using TestCaseTracking::TrackerContext; -using TestCaseTracking::SectionTracker; -using TestCaseTracking::IndexTracker; - -} // namespace Catch - -// end catch_test_case_tracker.h - -// start catch_leak_detector.h - -namespace Catch { - - struct LeakDetector { - LeakDetector(); - }; - -} -// end catch_leak_detector.h -// Cpp files will be included in the single-header file here -// start catch_approx.cpp - -#include -#include - -namespace { - -// Performs equivalent check of std::fabs(lhs - rhs) <= margin -// But without the subtraction to allow for INFINITY in comparison -bool marginComparison(double lhs, double rhs, double margin) { - return (lhs + margin >= rhs) && (rhs + margin >= lhs); -} - -} - -namespace Catch { -namespace Detail { - - Approx::Approx ( double value ) - : m_epsilon( std::numeric_limits::epsilon()*100 ), - m_margin( 0.0 ), - m_scale( 0.0 ), - m_value( value ) - {} - - Approx Approx::custom() { - return Approx( 0 ); - } - - std::string Approx::toString() const { - ReusableStringStream rss; - rss << "Approx( " << ::Catch::Detail::stringify( m_value ) << " )"; - return rss.str(); - } - - bool Approx::equalityComparisonImpl(const double other) const { - // First try with fixed margin, then compute margin based on epsilon, scale and Approx's value - // Thanks to Richard Harris for his help refining the scaled margin value - return marginComparison(m_value, other, m_margin) || marginComparison(m_value, other, m_epsilon * (m_scale + std::fabs(m_value))); - } - -} // end namespace Detail - -std::string StringMaker::convert(Catch::Detail::Approx const& value) { - return value.toString(); -} - -} // end namespace Catch -// end catch_approx.cpp -// start catch_assertionhandler.cpp - -// start catch_context.h - -#include - -namespace Catch { - - struct IResultCapture; - struct IRunner; - struct IConfig; - struct IMutableContext; - - using IConfigPtr = std::shared_ptr; - - struct IContext - { - virtual ~IContext(); - - virtual IResultCapture* getResultCapture() = 0; - virtual IRunner* getRunner() = 0; - virtual IConfigPtr const& getConfig() const = 0; - }; - - struct IMutableContext : IContext - { - virtual ~IMutableContext(); - virtual void setResultCapture( IResultCapture* resultCapture ) = 0; - virtual void setRunner( IRunner* runner ) = 0; - virtual void setConfig( IConfigPtr const& config ) = 0; - - private: - static IMutableContext *currentContext; - friend IMutableContext& getCurrentMutableContext(); - friend void cleanUpContext(); - static void createContext(); - }; - - inline IMutableContext& getCurrentMutableContext() - { - if( !IMutableContext::currentContext ) - IMutableContext::createContext(); - return *IMutableContext::currentContext; - } - - inline IContext& getCurrentContext() - { - return getCurrentMutableContext(); - } - - void cleanUpContext(); -} - -// end catch_context.h -// start catch_debugger.h - -namespace Catch { - bool isDebuggerActive(); -} - -#ifdef CATCH_PLATFORM_MAC - - #define CATCH_TRAP() __asm__("int $3\n" : : ) /* NOLINT */ - -#elif defined(CATCH_PLATFORM_LINUX) - // If we can use inline assembler, do it because this allows us to break - // directly at the location of the failing check instead of breaking inside - // raise() called from it, i.e. one stack frame below. - #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) - #define CATCH_TRAP() asm volatile ("int $3") /* NOLINT */ - #else // Fall back to the generic way. - #include - - #define CATCH_TRAP() raise(SIGTRAP) - #endif -#elif defined(_MSC_VER) - #define CATCH_TRAP() __debugbreak() -#elif defined(__MINGW32__) - extern "C" __declspec(dllimport) void __stdcall DebugBreak(); - #define CATCH_TRAP() DebugBreak() -#endif - -#ifdef CATCH_TRAP - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } -#else - namespace Catch { - inline void doNothing() {} - } - #define CATCH_BREAK_INTO_DEBUGGER() Catch::doNothing() -#endif - -// end catch_debugger.h -// start catch_run_context.h - -// start catch_fatal_condition.h - -#include - -#if defined ( CATCH_PLATFORM_WINDOWS ) ///////////////////////////////////////// -// start catch_windows_h_proxy.h - - -#if defined(CATCH_PLATFORM_WINDOWS) - -#if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) -# define CATCH_DEFINED_NOMINMAX -# define NOMINMAX -#endif -#if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) -# define CATCH_DEFINED_WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -#endif - -#ifdef __AFXDLL -#include -#else -#include -#endif - -#ifdef CATCH_DEFINED_NOMINMAX -# undef NOMINMAX -#endif -#ifdef CATCH_DEFINED_WIN32_LEAN_AND_MEAN -# undef WIN32_LEAN_AND_MEAN -#endif - -#endif // defined(CATCH_PLATFORM_WINDOWS) - -// end catch_windows_h_proxy.h - -# if !defined ( CATCH_CONFIG_WINDOWS_SEH ) - -namespace Catch { - struct FatalConditionHandler { - void reset(); - }; -} - -# else // CATCH_CONFIG_WINDOWS_SEH is defined - -namespace Catch { - - struct FatalConditionHandler { - - static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo); - FatalConditionHandler(); - static void reset(); - ~FatalConditionHandler(); - - private: - static bool isSet; - static ULONG guaranteeSize; - static PVOID exceptionHandlerHandle; - }; - -} // namespace Catch - -# endif // CATCH_CONFIG_WINDOWS_SEH - -#else // Not Windows - assumed to be POSIX compatible ////////////////////////// - -# if !defined(CATCH_CONFIG_POSIX_SIGNALS) - -namespace Catch { - struct FatalConditionHandler { - void reset(); - }; -} - -# else // CATCH_CONFIG_POSIX_SIGNALS is defined - -#include - -namespace Catch { - - struct FatalConditionHandler { - - static bool isSet; - static struct sigaction oldSigActions[];// [sizeof(signalDefs) / sizeof(SignalDefs)]; - static stack_t oldSigStack; - static char altStackMem[]; - - static void handleSignal( int sig ); - - FatalConditionHandler(); - ~FatalConditionHandler(); - static void reset(); - }; - -} // namespace Catch - -# endif // CATCH_CONFIG_POSIX_SIGNALS - -#endif // not Windows - -// end catch_fatal_condition.h -#include - -namespace Catch { - - struct IMutableContext; - - /////////////////////////////////////////////////////////////////////////// - - class RunContext : public IResultCapture, public IRunner { - - public: - RunContext( RunContext const& ) = delete; - RunContext& operator =( RunContext const& ) = delete; - - explicit RunContext( IConfigPtr const& _config, IStreamingReporterPtr&& reporter ); - - ~RunContext() override; - - void testGroupStarting( std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount ); - void testGroupEnded( std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount ); - - Totals runTest(TestCase const& testCase); - - IConfigPtr config() const; - IStreamingReporter& reporter() const; - - public: // IResultCapture - - // Assertion handlers - void handleExpr - ( AssertionInfo const& info, - ITransientExpression const& expr, - AssertionReaction& reaction ) override; - void handleMessage - ( AssertionInfo const& info, - ResultWas::OfType resultType, - StringRef const& message, - AssertionReaction& reaction ) override; - void handleUnexpectedExceptionNotThrown - ( AssertionInfo const& info, - AssertionReaction& reaction ) override; - void handleUnexpectedInflightException - ( AssertionInfo const& info, - std::string const& message, - AssertionReaction& reaction ) override; - void handleIncomplete - ( AssertionInfo const& info ) override; - void handleNonExpr - ( AssertionInfo const &info, - ResultWas::OfType resultType, - AssertionReaction &reaction ) override; - - bool sectionStarted( SectionInfo const& sectionInfo, Counts& assertions ) override; - - void sectionEnded( SectionEndInfo const& endInfo ) override; - void sectionEndedEarly( SectionEndInfo const& endInfo ) override; - - void benchmarkStarting( BenchmarkInfo const& info ) override; - void benchmarkEnded( BenchmarkStats const& stats ) override; - - void pushScopedMessage( MessageInfo const& message ) override; - void popScopedMessage( MessageInfo const& message ) override; - - std::string getCurrentTestName() const override; - - const AssertionResult* getLastResult() const override; - - void exceptionEarlyReported() override; - - void handleFatalErrorCondition( StringRef message ) override; - - bool lastAssertionPassed() override; - - void assertionPassed() override; - - public: - // !TBD We need to do this another way! - bool aborting() const override; - - private: - - void runCurrentTest( std::string& redirectedCout, std::string& redirectedCerr ); - void invokeActiveTestCase(); - - void resetAssertionInfo(); - bool testForMissingAssertions( Counts& assertions ); - - void assertionEnded( AssertionResult const& result ); - void reportExpr - ( AssertionInfo const &info, - ResultWas::OfType resultType, - ITransientExpression const *expr, - bool negated ); - - void populateReaction( AssertionReaction& reaction ); - - private: - - void handleUnfinishedSections(); - - TestRunInfo m_runInfo; - IMutableContext& m_context; - TestCase const* m_activeTestCase = nullptr; - ITracker* m_testCaseTracker; - Option m_lastResult; - - IConfigPtr m_config; - Totals m_totals; - IStreamingReporterPtr m_reporter; - std::vector m_messages; - AssertionInfo m_lastAssertionInfo; - std::vector m_unfinishedSections; - std::vector m_activeSections; - TrackerContext m_trackerContext; - bool m_lastAssertionPassed = false; - bool m_shouldReportUnexpected = true; - bool m_includeSuccessfulResults; - }; - -} // end namespace Catch - -// end catch_run_context.h -namespace Catch { - - auto operator <<( std::ostream& os, ITransientExpression const& expr ) -> std::ostream& { - expr.streamReconstructedExpression( os ); - return os; - } - - LazyExpression::LazyExpression( bool isNegated ) - : m_isNegated( isNegated ) - {} - - LazyExpression::LazyExpression( LazyExpression const& other ) : m_isNegated( other.m_isNegated ) {} - - LazyExpression::operator bool() const { - return m_transientExpression != nullptr; - } - - auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream& { - if( lazyExpr.m_isNegated ) - os << "!"; - - if( lazyExpr ) { - if( lazyExpr.m_isNegated && lazyExpr.m_transientExpression->isBinaryExpression() ) - os << "(" << *lazyExpr.m_transientExpression << ")"; - else - os << *lazyExpr.m_transientExpression; - } - else { - os << "{** error - unchecked empty expression requested **}"; - } - return os; - } - - AssertionHandler::AssertionHandler - ( StringRef macroName, - SourceLineInfo const& lineInfo, - StringRef capturedExpression, - ResultDisposition::Flags resultDisposition ) - : m_assertionInfo{ macroName, lineInfo, capturedExpression, resultDisposition }, - m_resultCapture( getResultCapture() ) - {} - - void AssertionHandler::handleExpr( ITransientExpression const& expr ) { - m_resultCapture.handleExpr( m_assertionInfo, expr, m_reaction ); - } - void AssertionHandler::handleMessage(ResultWas::OfType resultType, StringRef const& message) { - m_resultCapture.handleMessage( m_assertionInfo, resultType, message, m_reaction ); - } - - auto AssertionHandler::allowThrows() const -> bool { - return getCurrentContext().getConfig()->allowThrows(); - } - - void AssertionHandler::complete() { - setCompleted(); - if( m_reaction.shouldDebugBreak ) { - - // If you find your debugger stopping you here then go one level up on the - // call-stack for the code that caused it (typically a failed assertion) - - // (To go back to the test and change execution, jump over the throw, next) - CATCH_BREAK_INTO_DEBUGGER(); - } - if( m_reaction.shouldThrow ) - throw Catch::TestFailureException(); - } - void AssertionHandler::setCompleted() { - m_completed = true; - } - - void AssertionHandler::handleUnexpectedInflightException() { - m_resultCapture.handleUnexpectedInflightException( m_assertionInfo, Catch::translateActiveException(), m_reaction ); - } - - void AssertionHandler::handleExceptionThrownAsExpected() { - m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction); - } - void AssertionHandler::handleExceptionNotThrownAsExpected() { - m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction); - } - - void AssertionHandler::handleUnexpectedExceptionNotThrown() { - m_resultCapture.handleUnexpectedExceptionNotThrown( m_assertionInfo, m_reaction ); - } - - void AssertionHandler::handleThrowingCallSkipped() { - m_resultCapture.handleNonExpr(m_assertionInfo, ResultWas::Ok, m_reaction); - } - - // This is the overload that takes a string and infers the Equals matcher from it - // The more general overload, that takes any string matcher, is in catch_capture_matchers.cpp - void handleExceptionMatchExpr( AssertionHandler& handler, std::string const& str, StringRef matcherString ) { - handleExceptionMatchExpr( handler, Matchers::Equals( str ), matcherString ); - } - -} // namespace Catch -// end catch_assertionhandler.cpp -// start catch_assertionresult.cpp - -namespace Catch { - AssertionResultData::AssertionResultData(ResultWas::OfType _resultType, LazyExpression const & _lazyExpression): - lazyExpression(_lazyExpression), - resultType(_resultType) {} - - std::string AssertionResultData::reconstructExpression() const { - - if( reconstructedExpression.empty() ) { - if( lazyExpression ) { - ReusableStringStream rss; - rss << lazyExpression; - reconstructedExpression = rss.str(); - } - } - return reconstructedExpression; - } - - AssertionResult::AssertionResult( AssertionInfo const& info, AssertionResultData const& data ) - : m_info( info ), - m_resultData( data ) - {} - - // Result was a success - bool AssertionResult::succeeded() const { - return Catch::isOk( m_resultData.resultType ); - } - - // Result was a success, or failure is suppressed - bool AssertionResult::isOk() const { - return Catch::isOk( m_resultData.resultType ) || shouldSuppressFailure( m_info.resultDisposition ); - } - - ResultWas::OfType AssertionResult::getResultType() const { - return m_resultData.resultType; - } - - bool AssertionResult::hasExpression() const { - return m_info.capturedExpression[0] != 0; - } - - bool AssertionResult::hasMessage() const { - return !m_resultData.message.empty(); - } - - std::string AssertionResult::getExpression() const { - if( isFalseTest( m_info.resultDisposition ) ) - return "!(" + m_info.capturedExpression + ")"; - else - return m_info.capturedExpression; - } - - std::string AssertionResult::getExpressionInMacro() const { - std::string expr; - if( m_info.macroName[0] == 0 ) - expr = m_info.capturedExpression; - else { - expr.reserve( m_info.macroName.size() + m_info.capturedExpression.size() + 4 ); - expr += m_info.macroName.c_str(); - expr += "( "; - expr += m_info.capturedExpression.c_str(); - expr += " )"; - } - return expr; - } - - bool AssertionResult::hasExpandedExpression() const { - return hasExpression() && getExpandedExpression() != getExpression(); - } - - std::string AssertionResult::getExpandedExpression() const { - std::string expr = m_resultData.reconstructExpression(); - return expr.empty() - ? getExpression() - : expr; - } - - std::string AssertionResult::getMessage() const { - return m_resultData.message; - } - SourceLineInfo AssertionResult::getSourceInfo() const { - return m_info.lineInfo; - } - - StringRef AssertionResult::getTestMacroName() const { - return m_info.macroName; - } - -} // end namespace Catch -// end catch_assertionresult.cpp -// start catch_benchmark.cpp - -namespace Catch { - - auto BenchmarkLooper::getResolution() -> uint64_t { - return getEstimatedClockResolution() * getCurrentContext().getConfig()->benchmarkResolutionMultiple(); - } - - void BenchmarkLooper::reportStart() { - getResultCapture().benchmarkStarting( { m_name } ); - } - auto BenchmarkLooper::needsMoreIterations() -> bool { - auto elapsed = m_timer.getElapsedNanoseconds(); - - // Exponentially increasing iterations until we're confident in our timer resolution - if( elapsed < m_resolution ) { - m_iterationsToRun *= 10; - return true; - } - - getResultCapture().benchmarkEnded( { { m_name }, m_count, elapsed } ); - return false; - } - -} // end namespace Catch -// end catch_benchmark.cpp -// start catch_capture_matchers.cpp - -namespace Catch { - - using StringMatcher = Matchers::Impl::MatcherBase; - - // This is the general overload that takes a any string matcher - // There is another overload, in catch_assertinhandler.h/.cpp, that only takes a string and infers - // the Equals matcher (so the header does not mention matchers) - void handleExceptionMatchExpr( AssertionHandler& handler, StringMatcher const& matcher, StringRef matcherString ) { - std::string exceptionMessage = Catch::translateActiveException(); - MatchExpr expr( exceptionMessage, matcher, matcherString ); - handler.handleExpr( expr ); - } - -} // namespace Catch -// end catch_capture_matchers.cpp -// start catch_commandline.cpp - -// start catch_commandline.h - -// start catch_clara.h - -// Use Catch's value for console width (store Clara's off to the side, if present) -#ifdef CLARA_CONFIG_CONSOLE_WIDTH -#define CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH -#undef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH -#endif -#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CONFIG_CONSOLE_WIDTH-1 - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wweak-vtables" -#pragma clang diagnostic ignored "-Wexit-time-destructors" -#pragma clang diagnostic ignored "-Wshadow" -#endif - -// start clara.hpp -// Copyright 2017 Two Blue Cubes Ltd. All rights reserved. -// -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See https://github.com/philsquared/Clara for more details - -// Clara v1.1.2 - - -#ifndef CATCH_CLARA_CONFIG_CONSOLE_WIDTH -#define CATCH_CLARA_CONFIG_CONSOLE_WIDTH 80 -#endif - -#ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH -#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_CLARA_CONFIG_CONSOLE_WIDTH -#endif - -// ----------- #included from clara_textflow.hpp ----------- - -// TextFlowCpp -// -// A single-header library for wrapping and laying out basic text, by Phil Nash -// -// This work is licensed under the BSD 2-Clause license. -// See the accompanying LICENSE file, or the one at https://opensource.org/licenses/BSD-2-Clause -// -// This project is hosted at https://github.com/philsquared/textflowcpp - - -#include -#include -#include -#include - -#ifndef CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH -#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH 80 -#endif - -namespace Catch { namespace clara { namespace TextFlow { - - inline auto isWhitespace( char c ) -> bool { - static std::string chars = " \t\n\r"; - return chars.find( c ) != std::string::npos; - } - inline auto isBreakableBefore( char c ) -> bool { - static std::string chars = "[({<|"; - return chars.find( c ) != std::string::npos; - } - inline auto isBreakableAfter( char c ) -> bool { - static std::string chars = "])}>.,:;*+-=&/\\"; - return chars.find( c ) != std::string::npos; - } - - class Columns; - - class Column { - std::vector m_strings; - size_t m_width = CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH; - size_t m_indent = 0; - size_t m_initialIndent = std::string::npos; - - public: - class iterator { - friend Column; - - Column const& m_column; - size_t m_stringIndex = 0; - size_t m_pos = 0; - - size_t m_len = 0; - size_t m_end = 0; - bool m_suffix = false; - - iterator( Column const& column, size_t stringIndex ) - : m_column( column ), - m_stringIndex( stringIndex ) - {} - - auto line() const -> std::string const& { return m_column.m_strings[m_stringIndex]; } - - auto isBoundary( size_t at ) const -> bool { - assert( at > 0 ); - assert( at <= line().size() ); - - return at == line().size() || - ( isWhitespace( line()[at] ) && !isWhitespace( line()[at-1] ) ) || - isBreakableBefore( line()[at] ) || - isBreakableAfter( line()[at-1] ); - } - - void calcLength() { - assert( m_stringIndex < m_column.m_strings.size() ); - - m_suffix = false; - auto width = m_column.m_width-indent(); - m_end = m_pos; - while( m_end < line().size() && line()[m_end] != '\n' ) - ++m_end; - - if( m_end < m_pos + width ) { - m_len = m_end - m_pos; - } - else { - size_t len = width; - while (len > 0 && !isBoundary(m_pos + len)) - --len; - while (len > 0 && isWhitespace( line()[m_pos + len - 1] )) - --len; - - if (len > 0) { - m_len = len; - } else { - m_suffix = true; - m_len = width - 1; - } - } - } - - auto indent() const -> size_t { - auto initial = m_pos == 0 && m_stringIndex == 0 ? m_column.m_initialIndent : std::string::npos; - return initial == std::string::npos ? m_column.m_indent : initial; - } - - auto addIndentAndSuffix(std::string const &plain) const -> std::string { - return std::string( indent(), ' ' ) + (m_suffix ? plain + "-" : plain); - } - - public: - explicit iterator( Column const& column ) : m_column( column ) { - assert( m_column.m_width > m_column.m_indent ); - assert( m_column.m_initialIndent == std::string::npos || m_column.m_width > m_column.m_initialIndent ); - calcLength(); - if( m_len == 0 ) - m_stringIndex++; // Empty string - } - - auto operator *() const -> std::string { - assert( m_stringIndex < m_column.m_strings.size() ); - assert( m_pos <= m_end ); - if( m_pos + m_column.m_width < m_end ) - return addIndentAndSuffix(line().substr(m_pos, m_len)); - else - return addIndentAndSuffix(line().substr(m_pos, m_end - m_pos)); - } - - auto operator ++() -> iterator& { - m_pos += m_len; - if( m_pos < line().size() && line()[m_pos] == '\n' ) - m_pos += 1; - else - while( m_pos < line().size() && isWhitespace( line()[m_pos] ) ) - ++m_pos; - - if( m_pos == line().size() ) { - m_pos = 0; - ++m_stringIndex; - } - if( m_stringIndex < m_column.m_strings.size() ) - calcLength(); - return *this; - } - auto operator ++(int) -> iterator { - iterator prev( *this ); - operator++(); - return prev; - } - - auto operator ==( iterator const& other ) const -> bool { - return - m_pos == other.m_pos && - m_stringIndex == other.m_stringIndex && - &m_column == &other.m_column; - } - auto operator !=( iterator const& other ) const -> bool { - return !operator==( other ); - } - }; - using const_iterator = iterator; - - explicit Column( std::string const& text ) { m_strings.push_back( text ); } - - auto width( size_t newWidth ) -> Column& { - assert( newWidth > 0 ); - m_width = newWidth; - return *this; - } - auto indent( size_t newIndent ) -> Column& { - m_indent = newIndent; - return *this; - } - auto initialIndent( size_t newIndent ) -> Column& { - m_initialIndent = newIndent; - return *this; - } - - auto width() const -> size_t { return m_width; } - auto begin() const -> iterator { return iterator( *this ); } - auto end() const -> iterator { return { *this, m_strings.size() }; } - - inline friend std::ostream& operator << ( std::ostream& os, Column const& col ) { - bool first = true; - for( auto line : col ) { - if( first ) - first = false; - else - os << "\n"; - os << line; - } - return os; - } - - auto operator + ( Column const& other ) -> Columns; - - auto toString() const -> std::string { - std::ostringstream oss; - oss << *this; - return oss.str(); - } - }; - - class Spacer : public Column { - - public: - explicit Spacer( size_t spaceWidth ) : Column( "" ) { - width( spaceWidth ); - } - }; - - class Columns { - std::vector m_columns; - - public: - - class iterator { - friend Columns; - struct EndTag {}; - - std::vector const& m_columns; - std::vector m_iterators; - size_t m_activeIterators; - - iterator( Columns const& columns, EndTag ) - : m_columns( columns.m_columns ), - m_activeIterators( 0 ) - { - m_iterators.reserve( m_columns.size() ); - - for( auto const& col : m_columns ) - m_iterators.push_back( col.end() ); - } - - public: - explicit iterator( Columns const& columns ) - : m_columns( columns.m_columns ), - m_activeIterators( m_columns.size() ) - { - m_iterators.reserve( m_columns.size() ); - - for( auto const& col : m_columns ) - m_iterators.push_back( col.begin() ); - } - - auto operator ==( iterator const& other ) const -> bool { - return m_iterators == other.m_iterators; - } - auto operator !=( iterator const& other ) const -> bool { - return m_iterators != other.m_iterators; - } - auto operator *() const -> std::string { - std::string row, padding; - - for( size_t i = 0; i < m_columns.size(); ++i ) { - auto width = m_columns[i].width(); - if( m_iterators[i] != m_columns[i].end() ) { - std::string col = *m_iterators[i]; - row += padding + col; - if( col.size() < width ) - padding = std::string( width - col.size(), ' ' ); - else - padding = ""; - } - else { - padding += std::string( width, ' ' ); - } - } - return row; - } - auto operator ++() -> iterator& { - for( size_t i = 0; i < m_columns.size(); ++i ) { - if (m_iterators[i] != m_columns[i].end()) - ++m_iterators[i]; - } - return *this; - } - auto operator ++(int) -> iterator { - iterator prev( *this ); - operator++(); - return prev; - } - }; - using const_iterator = iterator; - - auto begin() const -> iterator { return iterator( *this ); } - auto end() const -> iterator { return { *this, iterator::EndTag() }; } - - auto operator += ( Column const& col ) -> Columns& { - m_columns.push_back( col ); - return *this; - } - auto operator + ( Column const& col ) -> Columns { - Columns combined = *this; - combined += col; - return combined; - } - - inline friend std::ostream& operator << ( std::ostream& os, Columns const& cols ) { - - bool first = true; - for( auto line : cols ) { - if( first ) - first = false; - else - os << "\n"; - os << line; - } - return os; - } - - auto toString() const -> std::string { - std::ostringstream oss; - oss << *this; - return oss.str(); - } - }; - - inline auto Column::operator + ( Column const& other ) -> Columns { - Columns cols; - cols += *this; - cols += other; - return cols; - } -}}} // namespace Catch::clara::TextFlow - -// ----------- end of #include from clara_textflow.hpp ----------- -// ........... back in clara.hpp - -#include -#include -#include - -#if !defined(CATCH_PLATFORM_WINDOWS) && ( defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) ) -#define CATCH_PLATFORM_WINDOWS -#endif - -namespace Catch { namespace clara { -namespace detail { - - // Traits for extracting arg and return type of lambdas (for single argument lambdas) - template - struct UnaryLambdaTraits : UnaryLambdaTraits {}; - - template - struct UnaryLambdaTraits { - static const bool isValid = false; - }; - - template - struct UnaryLambdaTraits { - static const bool isValid = true; - using ArgType = typename std::remove_const::type>::type; - using ReturnType = ReturnT; - }; - - class TokenStream; - - // Transport for raw args (copied from main args, or supplied via init list for testing) - class Args { - friend TokenStream; - std::string m_exeName; - std::vector m_args; - - public: - Args( int argc, char *argv[] ) { - m_exeName = argv[0]; - for( int i = 1; i < argc; ++i ) - m_args.push_back( argv[i] ); - } - - Args( std::initializer_list args ) - : m_exeName( *args.begin() ), - m_args( args.begin()+1, args.end() ) - {} - - auto exeName() const -> std::string { - return m_exeName; - } - }; - - // Wraps a token coming from a token stream. These may not directly correspond to strings as a single string - // may encode an option + its argument if the : or = form is used - enum class TokenType { - Option, Argument - }; - struct Token { - TokenType type; - std::string token; - }; - - inline auto isOptPrefix( char c ) -> bool { - return c == '-' -#ifdef CATCH_PLATFORM_WINDOWS - || c == '/' -#endif - ; - } - - // Abstracts iterators into args as a stream of tokens, with option arguments uniformly handled - class TokenStream { - using Iterator = std::vector::const_iterator; - Iterator it; - Iterator itEnd; - std::vector m_tokenBuffer; - - void loadBuffer() { - m_tokenBuffer.resize( 0 ); - - // Skip any empty strings - while( it != itEnd && it->empty() ) - ++it; - - if( it != itEnd ) { - auto const &next = *it; - if( isOptPrefix( next[0] ) ) { - auto delimiterPos = next.find_first_of( " :=" ); - if( delimiterPos != std::string::npos ) { - m_tokenBuffer.push_back( { TokenType::Option, next.substr( 0, delimiterPos ) } ); - m_tokenBuffer.push_back( { TokenType::Argument, next.substr( delimiterPos + 1 ) } ); - } else { - if( next[1] != '-' && next.size() > 2 ) { - std::string opt = "- "; - for( size_t i = 1; i < next.size(); ++i ) { - opt[1] = next[i]; - m_tokenBuffer.push_back( { TokenType::Option, opt } ); - } - } else { - m_tokenBuffer.push_back( { TokenType::Option, next } ); - } - } - } else { - m_tokenBuffer.push_back( { TokenType::Argument, next } ); - } - } - } - - public: - explicit TokenStream( Args const &args ) : TokenStream( args.m_args.begin(), args.m_args.end() ) {} - - TokenStream( Iterator it, Iterator itEnd ) : it( it ), itEnd( itEnd ) { - loadBuffer(); - } - - explicit operator bool() const { - return !m_tokenBuffer.empty() || it != itEnd; - } - - auto count() const -> size_t { return m_tokenBuffer.size() + (itEnd - it); } - - auto operator*() const -> Token { - assert( !m_tokenBuffer.empty() ); - return m_tokenBuffer.front(); - } - - auto operator->() const -> Token const * { - assert( !m_tokenBuffer.empty() ); - return &m_tokenBuffer.front(); - } - - auto operator++() -> TokenStream & { - if( m_tokenBuffer.size() >= 2 ) { - m_tokenBuffer.erase( m_tokenBuffer.begin() ); - } else { - if( it != itEnd ) - ++it; - loadBuffer(); - } - return *this; - } - }; - - class ResultBase { - public: - enum Type { - Ok, LogicError, RuntimeError - }; - - protected: - ResultBase( Type type ) : m_type( type ) {} - virtual ~ResultBase() = default; - - virtual void enforceOk() const = 0; - - Type m_type; - }; - - template - class ResultValueBase : public ResultBase { - public: - auto value() const -> T const & { - enforceOk(); - return m_value; - } - - protected: - ResultValueBase( Type type ) : ResultBase( type ) {} - - ResultValueBase( ResultValueBase const &other ) : ResultBase( other ) { - if( m_type == ResultBase::Ok ) - new( &m_value ) T( other.m_value ); - } - - ResultValueBase( Type, T const &value ) : ResultBase( Ok ) { - new( &m_value ) T( value ); - } - - auto operator=( ResultValueBase const &other ) -> ResultValueBase & { - if( m_type == ResultBase::Ok ) - m_value.~T(); - ResultBase::operator=(other); - if( m_type == ResultBase::Ok ) - new( &m_value ) T( other.m_value ); - return *this; - } - - ~ResultValueBase() override { - if( m_type == Ok ) - m_value.~T(); - } - - union { - T m_value; - }; - }; - - template<> - class ResultValueBase : public ResultBase { - protected: - using ResultBase::ResultBase; - }; - - template - class BasicResult : public ResultValueBase { - public: - template - explicit BasicResult( BasicResult const &other ) - : ResultValueBase( other.type() ), - m_errorMessage( other.errorMessage() ) - { - assert( type() != ResultBase::Ok ); - } - - template - static auto ok( U const &value ) -> BasicResult { return { ResultBase::Ok, value }; } - static auto ok() -> BasicResult { return { ResultBase::Ok }; } - static auto logicError( std::string const &message ) -> BasicResult { return { ResultBase::LogicError, message }; } - static auto runtimeError( std::string const &message ) -> BasicResult { return { ResultBase::RuntimeError, message }; } - - explicit operator bool() const { return m_type == ResultBase::Ok; } - auto type() const -> ResultBase::Type { return m_type; } - auto errorMessage() const -> std::string { return m_errorMessage; } - - protected: - void enforceOk() const override { - // !TBD: If no exceptions, std::terminate here or something - switch( m_type ) { - case ResultBase::LogicError: - throw std::logic_error( m_errorMessage ); - case ResultBase::RuntimeError: - throw std::runtime_error( m_errorMessage ); - case ResultBase::Ok: - break; - } - } - - std::string m_errorMessage; // Only populated if resultType is an error - - BasicResult( ResultBase::Type type, std::string const &message ) - : ResultValueBase(type), - m_errorMessage(message) - { - assert( m_type != ResultBase::Ok ); - } - - using ResultValueBase::ResultValueBase; - using ResultBase::m_type; - }; - - enum class ParseResultType { - Matched, NoMatch, ShortCircuitAll, ShortCircuitSame - }; - - class ParseState { - public: - - ParseState( ParseResultType type, TokenStream const &remainingTokens ) - : m_type(type), - m_remainingTokens( remainingTokens ) - {} - - auto type() const -> ParseResultType { return m_type; } - auto remainingTokens() const -> TokenStream { return m_remainingTokens; } - - private: - ParseResultType m_type; - TokenStream m_remainingTokens; - }; - - using Result = BasicResult; - using ParserResult = BasicResult; - using InternalParseResult = BasicResult; - - struct HelpColumns { - std::string left; - std::string right; - }; - - template - inline auto convertInto( std::string const &source, T& target ) -> ParserResult { - std::stringstream ss; - ss << source; - ss >> target; - if( ss.fail() ) - return ParserResult::runtimeError( "Unable to convert '" + source + "' to destination type" ); - else - return ParserResult::ok( ParseResultType::Matched ); - } - inline auto convertInto( std::string const &source, std::string& target ) -> ParserResult { - target = source; - return ParserResult::ok( ParseResultType::Matched ); - } - inline auto convertInto( std::string const &source, bool &target ) -> ParserResult { - std::string srcLC = source; - std::transform( srcLC.begin(), srcLC.end(), srcLC.begin(), []( char c ) { return static_cast( ::tolower(c) ); } ); - if (srcLC == "y" || srcLC == "1" || srcLC == "true" || srcLC == "yes" || srcLC == "on") - target = true; - else if (srcLC == "n" || srcLC == "0" || srcLC == "false" || srcLC == "no" || srcLC == "off") - target = false; - else - return ParserResult::runtimeError( "Expected a boolean value but did not recognise: '" + source + "'" ); - return ParserResult::ok( ParseResultType::Matched ); - } - - struct NonCopyable { - NonCopyable() = default; - NonCopyable( NonCopyable const & ) = delete; - NonCopyable( NonCopyable && ) = delete; - NonCopyable &operator=( NonCopyable const & ) = delete; - NonCopyable &operator=( NonCopyable && ) = delete; - }; - - struct BoundRef : NonCopyable { - virtual ~BoundRef() = default; - virtual auto isContainer() const -> bool { return false; } - virtual auto isFlag() const -> bool { return false; } - }; - struct BoundValueRefBase : BoundRef { - virtual auto setValue( std::string const &arg ) -> ParserResult = 0; - }; - struct BoundFlagRefBase : BoundRef { - virtual auto setFlag( bool flag ) -> ParserResult = 0; - virtual auto isFlag() const -> bool { return true; } - }; - - template - struct BoundValueRef : BoundValueRefBase { - T &m_ref; - - explicit BoundValueRef( T &ref ) : m_ref( ref ) {} - - auto setValue( std::string const &arg ) -> ParserResult override { - return convertInto( arg, m_ref ); - } - }; - - template - struct BoundValueRef> : BoundValueRefBase { - std::vector &m_ref; - - explicit BoundValueRef( std::vector &ref ) : m_ref( ref ) {} - - auto isContainer() const -> bool override { return true; } - - auto setValue( std::string const &arg ) -> ParserResult override { - T temp; - auto result = convertInto( arg, temp ); - if( result ) - m_ref.push_back( temp ); - return result; - } - }; - - struct BoundFlagRef : BoundFlagRefBase { - bool &m_ref; - - explicit BoundFlagRef( bool &ref ) : m_ref( ref ) {} - - auto setFlag( bool flag ) -> ParserResult override { - m_ref = flag; - return ParserResult::ok( ParseResultType::Matched ); - } - }; - - template - struct LambdaInvoker { - static_assert( std::is_same::value, "Lambda must return void or clara::ParserResult" ); - - template - static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult { - return lambda( arg ); - } - }; - - template<> - struct LambdaInvoker { - template - static auto invoke( L const &lambda, ArgType const &arg ) -> ParserResult { - lambda( arg ); - return ParserResult::ok( ParseResultType::Matched ); - } - }; - - template - inline auto invokeLambda( L const &lambda, std::string const &arg ) -> ParserResult { - ArgType temp{}; - auto result = convertInto( arg, temp ); - return !result - ? result - : LambdaInvoker::ReturnType>::invoke( lambda, temp ); - } - - template - struct BoundLambda : BoundValueRefBase { - L m_lambda; - - static_assert( UnaryLambdaTraits::isValid, "Supplied lambda must take exactly one argument" ); - explicit BoundLambda( L const &lambda ) : m_lambda( lambda ) {} - - auto setValue( std::string const &arg ) -> ParserResult override { - return invokeLambda::ArgType>( m_lambda, arg ); - } - }; - - template - struct BoundFlagLambda : BoundFlagRefBase { - L m_lambda; - - static_assert( UnaryLambdaTraits::isValid, "Supplied lambda must take exactly one argument" ); - static_assert( std::is_same::ArgType, bool>::value, "flags must be boolean" ); - - explicit BoundFlagLambda( L const &lambda ) : m_lambda( lambda ) {} - - auto setFlag( bool flag ) -> ParserResult override { - return LambdaInvoker::ReturnType>::invoke( m_lambda, flag ); - } - }; - - enum class Optionality { Optional, Required }; - - struct Parser; - - class ParserBase { - public: - virtual ~ParserBase() = default; - virtual auto validate() const -> Result { return Result::ok(); } - virtual auto parse( std::string const& exeName, TokenStream const &tokens) const -> InternalParseResult = 0; - virtual auto cardinality() const -> size_t { return 1; } - - auto parse( Args const &args ) const -> InternalParseResult { - return parse( args.exeName(), TokenStream( args ) ); - } - }; - - template - class ComposableParserImpl : public ParserBase { - public: - template - auto operator|( T const &other ) const -> Parser; - - template - auto operator+( T const &other ) const -> Parser; - }; - - // Common code and state for Args and Opts - template - class ParserRefImpl : public ComposableParserImpl { - protected: - Optionality m_optionality = Optionality::Optional; - std::shared_ptr m_ref; - std::string m_hint; - std::string m_description; - - explicit ParserRefImpl( std::shared_ptr const &ref ) : m_ref( ref ) {} - - public: - template - ParserRefImpl( T &ref, std::string const &hint ) - : m_ref( std::make_shared>( ref ) ), - m_hint( hint ) - {} - - template - ParserRefImpl( LambdaT const &ref, std::string const &hint ) - : m_ref( std::make_shared>( ref ) ), - m_hint(hint) - {} - - auto operator()( std::string const &description ) -> DerivedT & { - m_description = description; - return static_cast( *this ); - } - - auto optional() -> DerivedT & { - m_optionality = Optionality::Optional; - return static_cast( *this ); - }; - - auto required() -> DerivedT & { - m_optionality = Optionality::Required; - return static_cast( *this ); - }; - - auto isOptional() const -> bool { - return m_optionality == Optionality::Optional; - } - - auto cardinality() const -> size_t override { - if( m_ref->isContainer() ) - return 0; - else - return 1; - } - - auto hint() const -> std::string { return m_hint; } - }; - - class ExeName : public ComposableParserImpl { - std::shared_ptr m_name; - std::shared_ptr m_ref; - - template - static auto makeRef(LambdaT const &lambda) -> std::shared_ptr { - return std::make_shared>( lambda) ; - } - - public: - ExeName() : m_name( std::make_shared( "" ) ) {} - - explicit ExeName( std::string &ref ) : ExeName() { - m_ref = std::make_shared>( ref ); - } - - template - explicit ExeName( LambdaT const& lambda ) : ExeName() { - m_ref = std::make_shared>( lambda ); - } - - // The exe name is not parsed out of the normal tokens, but is handled specially - auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override { - return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) ); - } - - auto name() const -> std::string { return *m_name; } - auto set( std::string const& newName ) -> ParserResult { - - auto lastSlash = newName.find_last_of( "\\/" ); - auto filename = ( lastSlash == std::string::npos ) - ? newName - : newName.substr( lastSlash+1 ); - - *m_name = filename; - if( m_ref ) - return m_ref->setValue( filename ); - else - return ParserResult::ok( ParseResultType::Matched ); - } - }; - - class Arg : public ParserRefImpl { - public: - using ParserRefImpl::ParserRefImpl; - - auto parse( std::string const &, TokenStream const &tokens ) const -> InternalParseResult override { - auto validationResult = validate(); - if( !validationResult ) - return InternalParseResult( validationResult ); - - auto remainingTokens = tokens; - auto const &token = *remainingTokens; - if( token.type != TokenType::Argument ) - return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) ); - - assert( !m_ref->isFlag() ); - auto valueRef = static_cast( m_ref.get() ); - - auto result = valueRef->setValue( remainingTokens->token ); - if( !result ) - return InternalParseResult( result ); - else - return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) ); - } - }; - - inline auto normaliseOpt( std::string const &optName ) -> std::string { -#ifdef CATCH_PLATFORM_WINDOWS - if( optName[0] == '/' ) - return "-" + optName.substr( 1 ); - else -#endif - return optName; - } - - class Opt : public ParserRefImpl { - protected: - std::vector m_optNames; - - public: - template - explicit Opt( LambdaT const &ref ) : ParserRefImpl( std::make_shared>( ref ) ) {} - - explicit Opt( bool &ref ) : ParserRefImpl( std::make_shared( ref ) ) {} - - template - Opt( LambdaT const &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {} - - template - Opt( T &ref, std::string const &hint ) : ParserRefImpl( ref, hint ) {} - - auto operator[]( std::string const &optName ) -> Opt & { - m_optNames.push_back( optName ); - return *this; - } - - auto getHelpColumns() const -> std::vector { - std::ostringstream oss; - bool first = true; - for( auto const &opt : m_optNames ) { - if (first) - first = false; - else - oss << ", "; - oss << opt; - } - if( !m_hint.empty() ) - oss << " <" << m_hint << ">"; - return { { oss.str(), m_description } }; - } - - auto isMatch( std::string const &optToken ) const -> bool { - auto normalisedToken = normaliseOpt( optToken ); - for( auto const &name : m_optNames ) { - if( normaliseOpt( name ) == normalisedToken ) - return true; - } - return false; - } - - using ParserBase::parse; - - auto parse( std::string const&, TokenStream const &tokens ) const -> InternalParseResult override { - auto validationResult = validate(); - if( !validationResult ) - return InternalParseResult( validationResult ); - - auto remainingTokens = tokens; - if( remainingTokens && remainingTokens->type == TokenType::Option ) { - auto const &token = *remainingTokens; - if( isMatch(token.token ) ) { - if( m_ref->isFlag() ) { - auto flagRef = static_cast( m_ref.get() ); - auto result = flagRef->setFlag( true ); - if( !result ) - return InternalParseResult( result ); - if( result.value() == ParseResultType::ShortCircuitAll ) - return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) ); - } else { - auto valueRef = static_cast( m_ref.get() ); - ++remainingTokens; - if( !remainingTokens ) - return InternalParseResult::runtimeError( "Expected argument following " + token.token ); - auto const &argToken = *remainingTokens; - if( argToken.type != TokenType::Argument ) - return InternalParseResult::runtimeError( "Expected argument following " + token.token ); - auto result = valueRef->setValue( argToken.token ); - if( !result ) - return InternalParseResult( result ); - if( result.value() == ParseResultType::ShortCircuitAll ) - return InternalParseResult::ok( ParseState( result.value(), remainingTokens ) ); - } - return InternalParseResult::ok( ParseState( ParseResultType::Matched, ++remainingTokens ) ); - } - } - return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, remainingTokens ) ); - } - - auto validate() const -> Result override { - if( m_optNames.empty() ) - return Result::logicError( "No options supplied to Opt" ); - for( auto const &name : m_optNames ) { - if( name.empty() ) - return Result::logicError( "Option name cannot be empty" ); -#ifdef CATCH_PLATFORM_WINDOWS - if( name[0] != '-' && name[0] != '/' ) - return Result::logicError( "Option name must begin with '-' or '/'" ); -#else - if( name[0] != '-' ) - return Result::logicError( "Option name must begin with '-'" ); -#endif - } - return ParserRefImpl::validate(); - } - }; - - struct Help : Opt { - Help( bool &showHelpFlag ) - : Opt([&]( bool flag ) { - showHelpFlag = flag; - return ParserResult::ok( ParseResultType::ShortCircuitAll ); - }) - { - static_cast( *this ) - ("display usage information") - ["-?"]["-h"]["--help"] - .optional(); - } - }; - - struct Parser : ParserBase { - - mutable ExeName m_exeName; - std::vector m_options; - std::vector m_args; - - auto operator|=( ExeName const &exeName ) -> Parser & { - m_exeName = exeName; - return *this; - } - - auto operator|=( Arg const &arg ) -> Parser & { - m_args.push_back(arg); - return *this; - } - - auto operator|=( Opt const &opt ) -> Parser & { - m_options.push_back(opt); - return *this; - } - - auto operator|=( Parser const &other ) -> Parser & { - m_options.insert(m_options.end(), other.m_options.begin(), other.m_options.end()); - m_args.insert(m_args.end(), other.m_args.begin(), other.m_args.end()); - return *this; - } - - template - auto operator|( T const &other ) const -> Parser { - return Parser( *this ) |= other; - } - - // Forward deprecated interface with '+' instead of '|' - template - auto operator+=( T const &other ) -> Parser & { return operator|=( other ); } - template - auto operator+( T const &other ) const -> Parser { return operator|( other ); } - - auto getHelpColumns() const -> std::vector { - std::vector cols; - for (auto const &o : m_options) { - auto childCols = o.getHelpColumns(); - cols.insert( cols.end(), childCols.begin(), childCols.end() ); - } - return cols; - } - - void writeToStream( std::ostream &os ) const { - if (!m_exeName.name().empty()) { - os << "usage:\n" << " " << m_exeName.name() << " "; - bool required = true, first = true; - for( auto const &arg : m_args ) { - if (first) - first = false; - else - os << " "; - if( arg.isOptional() && required ) { - os << "["; - required = false; - } - os << "<" << arg.hint() << ">"; - if( arg.cardinality() == 0 ) - os << " ... "; - } - if( !required ) - os << "]"; - if( !m_options.empty() ) - os << " options"; - os << "\n\nwhere options are:" << std::endl; - } - - auto rows = getHelpColumns(); - size_t consoleWidth = CATCH_CLARA_CONFIG_CONSOLE_WIDTH; - size_t optWidth = 0; - for( auto const &cols : rows ) - optWidth = (std::max)(optWidth, cols.left.size() + 2); - - optWidth = (std::min)(optWidth, consoleWidth/2); - - for( auto const &cols : rows ) { - auto row = - TextFlow::Column( cols.left ).width( optWidth ).indent( 2 ) + - TextFlow::Spacer(4) + - TextFlow::Column( cols.right ).width( consoleWidth - 7 - optWidth ); - os << row << std::endl; - } - } - - friend auto operator<<( std::ostream &os, Parser const &parser ) -> std::ostream& { - parser.writeToStream( os ); - return os; - } - - auto validate() const -> Result override { - for( auto const &opt : m_options ) { - auto result = opt.validate(); - if( !result ) - return result; - } - for( auto const &arg : m_args ) { - auto result = arg.validate(); - if( !result ) - return result; - } - return Result::ok(); - } - - using ParserBase::parse; - - auto parse( std::string const& exeName, TokenStream const &tokens ) const -> InternalParseResult override { - - struct ParserInfo { - ParserBase const* parser = nullptr; - size_t count = 0; - }; - const size_t totalParsers = m_options.size() + m_args.size(); - assert( totalParsers < 512 ); - // ParserInfo parseInfos[totalParsers]; // <-- this is what we really want to do - ParserInfo parseInfos[512]; - - { - size_t i = 0; - for (auto const &opt : m_options) parseInfos[i++].parser = &opt; - for (auto const &arg : m_args) parseInfos[i++].parser = &arg; - } - - m_exeName.set( exeName ); - - auto result = InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) ); - while( result.value().remainingTokens() ) { - bool tokenParsed = false; - - for( size_t i = 0; i < totalParsers; ++i ) { - auto& parseInfo = parseInfos[i]; - if( parseInfo.parser->cardinality() == 0 || parseInfo.count < parseInfo.parser->cardinality() ) { - result = parseInfo.parser->parse(exeName, result.value().remainingTokens()); - if (!result) - return result; - if (result.value().type() != ParseResultType::NoMatch) { - tokenParsed = true; - ++parseInfo.count; - break; - } - } - } - - if( result.value().type() == ParseResultType::ShortCircuitAll ) - return result; - if( !tokenParsed ) - return InternalParseResult::runtimeError( "Unrecognised token: " + result.value().remainingTokens()->token ); - } - // !TBD Check missing required options - return result; - } - }; - - template - template - auto ComposableParserImpl::operator|( T const &other ) const -> Parser { - return Parser() | static_cast( *this ) | other; - } -} // namespace detail - -// A Combined parser -using detail::Parser; - -// A parser for options -using detail::Opt; - -// A parser for arguments -using detail::Arg; - -// Wrapper for argc, argv from main() -using detail::Args; - -// Specifies the name of the executable -using detail::ExeName; - -// Convenience wrapper for option parser that specifies the help option -using detail::Help; - -// enum of result types from a parse -using detail::ParseResultType; - -// Result type for parser operation -using detail::ParserResult; - -}} // namespace Catch::clara - -// end clara.hpp -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -// Restore Clara's value for console width, if present -#ifdef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH -#define CATCH_CLARA_TEXTFLOW_CONFIG_CONSOLE_WIDTH CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH -#undef CATCH_TEMP_CLARA_CONFIG_CONSOLE_WIDTH -#endif - -// end catch_clara.h -namespace Catch { - - clara::Parser makeCommandLineParser( ConfigData& config ); - -} // end namespace Catch - -// end catch_commandline.h -#include -#include - -namespace Catch { - - clara::Parser makeCommandLineParser( ConfigData& config ) { - - using namespace clara; - - auto const setWarning = [&]( std::string const& warning ) { - if( warning != "NoAssertions" ) - return ParserResult::runtimeError( "Unrecognised warning: '" + warning + "'" ); - config.warnings = static_cast( config.warnings | WarnAbout::NoAssertions ); - return ParserResult::ok( ParseResultType::Matched ); - }; - auto const loadTestNamesFromFile = [&]( std::string const& filename ) { - std::ifstream f( filename.c_str() ); - if( !f.is_open() ) - return ParserResult::runtimeError( "Unable to load input file: '" + filename + "'" ); - - std::string line; - while( std::getline( f, line ) ) { - line = trim(line); - if( !line.empty() && !startsWith( line, '#' ) ) { - if( !startsWith( line, '"' ) ) - line = '"' + line + '"'; - config.testsOrTags.push_back( line + ',' ); - } - } - return ParserResult::ok( ParseResultType::Matched ); - }; - auto const setTestOrder = [&]( std::string const& order ) { - if( startsWith( "declared", order ) ) - config.runOrder = RunTests::InDeclarationOrder; - else if( startsWith( "lexical", order ) ) - config.runOrder = RunTests::InLexicographicalOrder; - else if( startsWith( "random", order ) ) - config.runOrder = RunTests::InRandomOrder; - else - return clara::ParserResult::runtimeError( "Unrecognised ordering: '" + order + "'" ); - return ParserResult::ok( ParseResultType::Matched ); - }; - auto const setRngSeed = [&]( std::string const& seed ) { - if( seed != "time" ) - return clara::detail::convertInto( seed, config.rngSeed ); - config.rngSeed = static_cast( std::time(nullptr) ); - return ParserResult::ok( ParseResultType::Matched ); - }; - auto const setColourUsage = [&]( std::string const& useColour ) { - auto mode = toLower( useColour ); - - if( mode == "yes" ) - config.useColour = UseColour::Yes; - else if( mode == "no" ) - config.useColour = UseColour::No; - else if( mode == "auto" ) - config.useColour = UseColour::Auto; - else - return ParserResult::runtimeError( "colour mode must be one of: auto, yes or no. '" + useColour + "' not recognised" ); - return ParserResult::ok( ParseResultType::Matched ); - }; - auto const setWaitForKeypress = [&]( std::string const& keypress ) { - auto keypressLc = toLower( keypress ); - if( keypressLc == "start" ) - config.waitForKeypress = WaitForKeypress::BeforeStart; - else if( keypressLc == "exit" ) - config.waitForKeypress = WaitForKeypress::BeforeExit; - else if( keypressLc == "both" ) - config.waitForKeypress = WaitForKeypress::BeforeStartAndExit; - else - return ParserResult::runtimeError( "keypress argument must be one of: start, exit or both. '" + keypress + "' not recognised" ); - return ParserResult::ok( ParseResultType::Matched ); - }; - auto const setVerbosity = [&]( std::string const& verbosity ) { - auto lcVerbosity = toLower( verbosity ); - if( lcVerbosity == "quiet" ) - config.verbosity = Verbosity::Quiet; - else if( lcVerbosity == "normal" ) - config.verbosity = Verbosity::Normal; - else if( lcVerbosity == "high" ) - config.verbosity = Verbosity::High; - else - return ParserResult::runtimeError( "Unrecognised verbosity, '" + verbosity + "'" ); - return ParserResult::ok( ParseResultType::Matched ); - }; - - auto cli - = ExeName( config.processName ) - | Help( config.showHelp ) - | Opt( config.listTests ) - ["-l"]["--list-tests"] - ( "list all/matching test cases" ) - | Opt( config.listTags ) - ["-t"]["--list-tags"] - ( "list all/matching tags" ) - | Opt( config.showSuccessfulTests ) - ["-s"]["--success"] - ( "include successful tests in output" ) - | Opt( config.shouldDebugBreak ) - ["-b"]["--break"] - ( "break into debugger on failure" ) - | Opt( config.noThrow ) - ["-e"]["--nothrow"] - ( "skip exception tests" ) - | Opt( config.showInvisibles ) - ["-i"]["--invisibles"] - ( "show invisibles (tabs, newlines)" ) - | Opt( config.outputFilename, "filename" ) - ["-o"]["--out"] - ( "output filename" ) - | Opt( config.reporterNames, "name" ) - ["-r"]["--reporter"] - ( "reporter to use (defaults to console)" ) - | Opt( config.name, "name" ) - ["-n"]["--name"] - ( "suite name" ) - | Opt( [&]( bool ){ config.abortAfter = 1; } ) - ["-a"]["--abort"] - ( "abort at first failure" ) - | Opt( [&]( int x ){ config.abortAfter = x; }, "no. failures" ) - ["-x"]["--abortx"] - ( "abort after x failures" ) - | Opt( setWarning, "warning name" ) - ["-w"]["--warn"] - ( "enable warnings" ) - | Opt( [&]( bool flag ) { config.showDurations = flag ? ShowDurations::Always : ShowDurations::Never; }, "yes|no" ) - ["-d"]["--durations"] - ( "show test durations" ) - | Opt( loadTestNamesFromFile, "filename" ) - ["-f"]["--input-file"] - ( "load test names to run from a file" ) - | Opt( config.filenamesAsTags ) - ["-#"]["--filenames-as-tags"] - ( "adds a tag for the filename" ) - | Opt( config.sectionsToRun, "section name" ) - ["-c"]["--section"] - ( "specify section to run" ) - | Opt( setVerbosity, "quiet|normal|high" ) - ["-v"]["--verbosity"] - ( "set output verbosity" ) - | Opt( config.listTestNamesOnly ) - ["--list-test-names-only"] - ( "list all/matching test cases names only" ) - | Opt( config.listReporters ) - ["--list-reporters"] - ( "list all reporters" ) - | Opt( setTestOrder, "decl|lex|rand" ) - ["--order"] - ( "test case order (defaults to decl)" ) - | Opt( setRngSeed, "'time'|number" ) - ["--rng-seed"] - ( "set a specific seed for random numbers" ) - | Opt( setColourUsage, "yes|no" ) - ["--use-colour"] - ( "should output be colourised" ) - | Opt( config.libIdentify ) - ["--libidentify"] - ( "report name and version according to libidentify standard" ) - | Opt( setWaitForKeypress, "start|exit|both" ) - ["--wait-for-keypress"] - ( "waits for a keypress before exiting" ) - | Opt( config.benchmarkResolutionMultiple, "multiplier" ) - ["--benchmark-resolution-multiple"] - ( "multiple of clock resolution to run benchmarks" ) - - | Arg( config.testsOrTags, "test name|pattern|tags" ) - ( "which test or tests to use" ); - - return cli; - } - -} // end namespace Catch -// end catch_commandline.cpp -// start catch_common.cpp - -#include -#include - -namespace Catch { - - bool SourceLineInfo::empty() const noexcept { - return file[0] == '\0'; - } - bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const noexcept { - return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0); - } - bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const noexcept { - return line < other.line || ( line == other.line && (std::strcmp(file, other.file) < 0)); - } - - std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) { -#ifndef __GNUG__ - os << info.file << '(' << info.line << ')'; -#else - os << info.file << ':' << info.line; -#endif - return os; - } - - std::string StreamEndStop::operator+() const { - return std::string(); - } - - NonCopyable::NonCopyable() = default; - NonCopyable::~NonCopyable() = default; - -} -// end catch_common.cpp -// start catch_config.cpp - -// start catch_enforce.h - -#include -#include - -#define CATCH_PREPARE_EXCEPTION( type, msg ) \ - type( static_cast( Catch::ReusableStringStream().get() << msg ).str() ) -#define CATCH_INTERNAL_ERROR( msg ) \ - throw CATCH_PREPARE_EXCEPTION( std::logic_error, CATCH_INTERNAL_LINEINFO << ": Internal Catch error: " << msg); -#define CATCH_ERROR( msg ) \ - throw CATCH_PREPARE_EXCEPTION( std::domain_error, msg ) -#define CATCH_ENFORCE( condition, msg ) \ - do{ if( !(condition) ) CATCH_ERROR( msg ); } while(false) - -// end catch_enforce.h -namespace Catch { - - Config::Config( ConfigData const& data ) - : m_data( data ), - m_stream( openStream() ) - { - if( !data.testsOrTags.empty() ) { - TestSpecParser parser( ITagAliasRegistry::get() ); - for( auto const& testOrTags : data.testsOrTags ) - parser.parse( testOrTags ); - m_testSpec = parser.testSpec(); - } - } - - std::string const& Config::getFilename() const { - return m_data.outputFilename ; - } - - bool Config::listTests() const { return m_data.listTests; } - bool Config::listTestNamesOnly() const { return m_data.listTestNamesOnly; } - bool Config::listTags() const { return m_data.listTags; } - bool Config::listReporters() const { return m_data.listReporters; } - - std::string Config::getProcessName() const { return m_data.processName; } - - std::vector const& Config::getReporterNames() const { return m_data.reporterNames; } - std::vector const& Config::getSectionsToRun() const { return m_data.sectionsToRun; } - - TestSpec const& Config::testSpec() const { return m_testSpec; } - - bool Config::showHelp() const { return m_data.showHelp; } - - // IConfig interface - bool Config::allowThrows() const { return !m_data.noThrow; } - std::ostream& Config::stream() const { return m_stream->stream(); } - std::string Config::name() const { return m_data.name.empty() ? m_data.processName : m_data.name; } - bool Config::includeSuccessfulResults() const { return m_data.showSuccessfulTests; } - bool Config::warnAboutMissingAssertions() const { return m_data.warnings & WarnAbout::NoAssertions; } - ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; } - RunTests::InWhatOrder Config::runOrder() const { return m_data.runOrder; } - unsigned int Config::rngSeed() const { return m_data.rngSeed; } - int Config::benchmarkResolutionMultiple() const { return m_data.benchmarkResolutionMultiple; } - UseColour::YesOrNo Config::useColour() const { return m_data.useColour; } - bool Config::shouldDebugBreak() const { return m_data.shouldDebugBreak; } - int Config::abortAfter() const { return m_data.abortAfter; } - bool Config::showInvisibles() const { return m_data.showInvisibles; } - Verbosity Config::verbosity() const { return m_data.verbosity; } - - IStream const* Config::openStream() { - return Catch::makeStream(m_data.outputFilename); - } - -} // end namespace Catch -// end catch_config.cpp -// start catch_console_colour.cpp - -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wexit-time-destructors" -#endif - -// start catch_errno_guard.h - -namespace Catch { - - class ErrnoGuard { - public: - ErrnoGuard(); - ~ErrnoGuard(); - private: - int m_oldErrno; - }; - -} - -// end catch_errno_guard.h -#include - -namespace Catch { - namespace { - - struct IColourImpl { - virtual ~IColourImpl() = default; - virtual void use( Colour::Code _colourCode ) = 0; - }; - - struct NoColourImpl : IColourImpl { - void use( Colour::Code ) {} - - static IColourImpl* instance() { - static NoColourImpl s_instance; - return &s_instance; - } - }; - - } // anon namespace -} // namespace Catch - -#if !defined( CATCH_CONFIG_COLOUR_NONE ) && !defined( CATCH_CONFIG_COLOUR_WINDOWS ) && !defined( CATCH_CONFIG_COLOUR_ANSI ) -# ifdef CATCH_PLATFORM_WINDOWS -# define CATCH_CONFIG_COLOUR_WINDOWS -# else -# define CATCH_CONFIG_COLOUR_ANSI -# endif -#endif - -#if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) ///////////////////////////////////////// - -namespace Catch { -namespace { - - class Win32ColourImpl : public IColourImpl { - public: - Win32ColourImpl() : stdoutHandle( GetStdHandle(STD_OUTPUT_HANDLE) ) - { - CONSOLE_SCREEN_BUFFER_INFO csbiInfo; - GetConsoleScreenBufferInfo( stdoutHandle, &csbiInfo ); - originalForegroundAttributes = csbiInfo.wAttributes & ~( BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE | BACKGROUND_INTENSITY ); - originalBackgroundAttributes = csbiInfo.wAttributes & ~( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_INTENSITY ); - } - - virtual void use( Colour::Code _colourCode ) override { - switch( _colourCode ) { - case Colour::None: return setTextAttribute( originalForegroundAttributes ); - case Colour::White: return setTextAttribute( FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE ); - case Colour::Red: return setTextAttribute( FOREGROUND_RED ); - case Colour::Green: return setTextAttribute( FOREGROUND_GREEN ); - case Colour::Blue: return setTextAttribute( FOREGROUND_BLUE ); - case Colour::Cyan: return setTextAttribute( FOREGROUND_BLUE | FOREGROUND_GREEN ); - case Colour::Yellow: return setTextAttribute( FOREGROUND_RED | FOREGROUND_GREEN ); - case Colour::Grey: return setTextAttribute( 0 ); - - case Colour::LightGrey: return setTextAttribute( FOREGROUND_INTENSITY ); - case Colour::BrightRed: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED ); - case Colour::BrightGreen: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN ); - case Colour::BrightWhite: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE ); - case Colour::BrightYellow: return setTextAttribute( FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN ); - - case Colour::Bright: CATCH_INTERNAL_ERROR( "not a colour" ); - - default: - CATCH_ERROR( "Unknown colour requested" ); - } - } - - private: - void setTextAttribute( WORD _textAttribute ) { - SetConsoleTextAttribute( stdoutHandle, _textAttribute | originalBackgroundAttributes ); - } - HANDLE stdoutHandle; - WORD originalForegroundAttributes; - WORD originalBackgroundAttributes; - }; - - IColourImpl* platformColourInstance() { - static Win32ColourImpl s_instance; - - IConfigPtr config = getCurrentContext().getConfig(); - UseColour::YesOrNo colourMode = config - ? config->useColour() - : UseColour::Auto; - if( colourMode == UseColour::Auto ) - colourMode = UseColour::Yes; - return colourMode == UseColour::Yes - ? &s_instance - : NoColourImpl::instance(); - } - -} // end anon namespace -} // end namespace Catch - -#elif defined( CATCH_CONFIG_COLOUR_ANSI ) ////////////////////////////////////// - -#include - -namespace Catch { -namespace { - - // use POSIX/ ANSI console terminal codes - // Thanks to Adam Strzelecki for original contribution - // (http://github.com/nanoant) - // https://github.com/philsquared/Catch/pull/131 - class PosixColourImpl : public IColourImpl { - public: - virtual void use( Colour::Code _colourCode ) override { - switch( _colourCode ) { - case Colour::None: - case Colour::White: return setColour( "[0m" ); - case Colour::Red: return setColour( "[0;31m" ); - case Colour::Green: return setColour( "[0;32m" ); - case Colour::Blue: return setColour( "[0;34m" ); - case Colour::Cyan: return setColour( "[0;36m" ); - case Colour::Yellow: return setColour( "[0;33m" ); - case Colour::Grey: return setColour( "[1;30m" ); - - case Colour::LightGrey: return setColour( "[0;37m" ); - case Colour::BrightRed: return setColour( "[1;31m" ); - case Colour::BrightGreen: return setColour( "[1;32m" ); - case Colour::BrightWhite: return setColour( "[1;37m" ); - case Colour::BrightYellow: return setColour( "[1;33m" ); - - case Colour::Bright: CATCH_INTERNAL_ERROR( "not a colour" ); - default: CATCH_INTERNAL_ERROR( "Unknown colour requested" ); - } - } - static IColourImpl* instance() { - static PosixColourImpl s_instance; - return &s_instance; - } - - private: - void setColour( const char* _escapeCode ) { - Catch::cout() << '\033' << _escapeCode; - } - }; - - bool useColourOnPlatform() { - return -#ifdef CATCH_PLATFORM_MAC - !isDebuggerActive() && -#endif - isatty(STDOUT_FILENO); - } - IColourImpl* platformColourInstance() { - ErrnoGuard guard; - IConfigPtr config = getCurrentContext().getConfig(); - UseColour::YesOrNo colourMode = config - ? config->useColour() - : UseColour::Auto; - if( colourMode == UseColour::Auto ) - colourMode = useColourOnPlatform() - ? UseColour::Yes - : UseColour::No; - return colourMode == UseColour::Yes - ? PosixColourImpl::instance() - : NoColourImpl::instance(); - } - -} // end anon namespace -} // end namespace Catch - -#else // not Windows or ANSI /////////////////////////////////////////////// - -namespace Catch { - - static IColourImpl* platformColourInstance() { return NoColourImpl::instance(); } - -} // end namespace Catch - -#endif // Windows/ ANSI/ None - -namespace Catch { - - Colour::Colour( Code _colourCode ) { use( _colourCode ); } - Colour::Colour( Colour&& rhs ) noexcept { - m_moved = rhs.m_moved; - rhs.m_moved = true; - } - Colour& Colour::operator=( Colour&& rhs ) noexcept { - m_moved = rhs.m_moved; - rhs.m_moved = true; - return *this; - } - - Colour::~Colour(){ if( !m_moved ) use( None ); } - - void Colour::use( Code _colourCode ) { - static IColourImpl* impl = platformColourInstance(); - impl->use( _colourCode ); - } - - std::ostream& operator << ( std::ostream& os, Colour const& ) { - return os; - } - -} // end namespace Catch - -#if defined(__clang__) -# pragma clang diagnostic pop -#endif - -// end catch_console_colour.cpp -// start catch_context.cpp - -namespace Catch { - - class Context : public IMutableContext, NonCopyable { - - public: // IContext - virtual IResultCapture* getResultCapture() override { - return m_resultCapture; - } - virtual IRunner* getRunner() override { - return m_runner; - } - - virtual IConfigPtr const& getConfig() const override { - return m_config; - } - - virtual ~Context() override; - - public: // IMutableContext - virtual void setResultCapture( IResultCapture* resultCapture ) override { - m_resultCapture = resultCapture; - } - virtual void setRunner( IRunner* runner ) override { - m_runner = runner; - } - virtual void setConfig( IConfigPtr const& config ) override { - m_config = config; - } - - friend IMutableContext& getCurrentMutableContext(); - - private: - IConfigPtr m_config; - IRunner* m_runner = nullptr; - IResultCapture* m_resultCapture = nullptr; - }; - - IMutableContext *IMutableContext::currentContext = nullptr; - - void IMutableContext::createContext() - { - currentContext = new Context(); - } - - void cleanUpContext() { - delete IMutableContext::currentContext; - IMutableContext::currentContext = nullptr; - } - IContext::~IContext() = default; - IMutableContext::~IMutableContext() = default; - Context::~Context() = default; -} -// end catch_context.cpp -// start catch_debug_console.cpp - -// start catch_debug_console.h - -#include - -namespace Catch { - void writeToDebugConsole( std::string const& text ); -} - -// end catch_debug_console.h -#ifdef CATCH_PLATFORM_WINDOWS - - namespace Catch { - void writeToDebugConsole( std::string const& text ) { - ::OutputDebugStringA( text.c_str() ); - } - } -#else - namespace Catch { - void writeToDebugConsole( std::string const& text ) { - // !TBD: Need a version for Mac/ XCode and other IDEs - Catch::cout() << text; - } - } -#endif // Platform -// end catch_debug_console.cpp -// start catch_debugger.cpp - -#ifdef CATCH_PLATFORM_MAC - -# include -# include -# include -# include -# include -# include -# include - -namespace Catch { - - // The following function is taken directly from the following technical note: - // http://developer.apple.com/library/mac/#qa/qa2004/qa1361.html - - // Returns true if the current process is being debugged (either - // running under the debugger or has a debugger attached post facto). - bool isDebuggerActive(){ - - int mib[4]; - struct kinfo_proc info; - std::size_t size; - - // Initialize the flags so that, if sysctl fails for some bizarre - // reason, we get a predictable result. - - info.kp_proc.p_flag = 0; - - // Initialize mib, which tells sysctl the info we want, in this case - // we're looking for information about a specific process ID. - - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PID; - mib[3] = getpid(); - - // Call sysctl. - - size = sizeof(info); - if( sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, nullptr, 0) != 0 ) { - Catch::cerr() << "\n** Call to sysctl failed - unable to determine if debugger is active **\n" << std::endl; - return false; - } - - // We're being debugged if the P_TRACED flag is set. - - return ( (info.kp_proc.p_flag & P_TRACED) != 0 ); - } - } // namespace Catch - -#elif defined(CATCH_PLATFORM_LINUX) - #include - #include - - namespace Catch{ - // The standard POSIX way of detecting a debugger is to attempt to - // ptrace() the process, but this needs to be done from a child and not - // this process itself to still allow attaching to this process later - // if wanted, so is rather heavy. Under Linux we have the PID of the - // "debugger" (which doesn't need to be gdb, of course, it could also - // be strace, for example) in /proc/$PID/status, so just get it from - // there instead. - bool isDebuggerActive(){ - // Libstdc++ has a bug, where std::ifstream sets errno to 0 - // This way our users can properly assert over errno values - ErrnoGuard guard; - std::ifstream in("/proc/self/status"); - for( std::string line; std::getline(in, line); ) { - static const int PREFIX_LEN = 11; - if( line.compare(0, PREFIX_LEN, "TracerPid:\t") == 0 ) { - // We're traced if the PID is not 0 and no other PID starts - // with 0 digit, so it's enough to check for just a single - // character. - return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0'; - } - } - - return false; - } - } // namespace Catch -#elif defined(_MSC_VER) - extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); - namespace Catch { - bool isDebuggerActive() { - return IsDebuggerPresent() != 0; - } - } -#elif defined(__MINGW32__) - extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); - namespace Catch { - bool isDebuggerActive() { - return IsDebuggerPresent() != 0; - } - } -#else - namespace Catch { - bool isDebuggerActive() { return false; } - } -#endif // Platform -// end catch_debugger.cpp -// start catch_decomposer.cpp - -namespace Catch { - - ITransientExpression::~ITransientExpression() = default; - - void formatReconstructedExpression( std::ostream &os, std::string const& lhs, StringRef op, std::string const& rhs ) { - if( lhs.size() + rhs.size() < 40 && - lhs.find('\n') == std::string::npos && - rhs.find('\n') == std::string::npos ) - os << lhs << " " << op << " " << rhs; - else - os << lhs << "\n" << op << "\n" << rhs; - } -} -// end catch_decomposer.cpp -// start catch_errno_guard.cpp - -#include - -namespace Catch { - ErrnoGuard::ErrnoGuard():m_oldErrno(errno){} - ErrnoGuard::~ErrnoGuard() { errno = m_oldErrno; } -} -// end catch_errno_guard.cpp -// start catch_exception_translator_registry.cpp - -// start catch_exception_translator_registry.h - -#include -#include -#include - -namespace Catch { - - class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry { - public: - ~ExceptionTranslatorRegistry(); - virtual void registerTranslator( const IExceptionTranslator* translator ); - virtual std::string translateActiveException() const override; - std::string tryTranslators() const; - - private: - std::vector> m_translators; - }; -} - -// end catch_exception_translator_registry.h -#ifdef __OBJC__ -#import "Foundation/Foundation.h" -#endif - -namespace Catch { - - ExceptionTranslatorRegistry::~ExceptionTranslatorRegistry() { - } - - void ExceptionTranslatorRegistry::registerTranslator( const IExceptionTranslator* translator ) { - m_translators.push_back( std::unique_ptr( translator ) ); - } - - std::string ExceptionTranslatorRegistry::translateActiveException() const { - try { -#ifdef __OBJC__ - // In Objective-C try objective-c exceptions first - @try { - return tryTranslators(); - } - @catch (NSException *exception) { - return Catch::Detail::stringify( [exception description] ); - } -#else - // Compiling a mixed mode project with MSVC means that CLR - // exceptions will be caught in (...) as well. However, these - // do not fill-in std::current_exception and thus lead to crash - // when attempting rethrow. - // /EHa switch also causes structured exceptions to be caught - // here, but they fill-in current_exception properly, so - // at worst the output should be a little weird, instead of - // causing a crash. - if (std::current_exception() == nullptr) { - return "Non C++ exception. Possibly a CLR exception."; - } - return tryTranslators(); -#endif - } - catch( TestFailureException& ) { - std::rethrow_exception(std::current_exception()); - } - catch( std::exception& ex ) { - return ex.what(); - } - catch( std::string& msg ) { - return msg; - } - catch( const char* msg ) { - return msg; - } - catch(...) { - return "Unknown exception"; - } - } - - std::string ExceptionTranslatorRegistry::tryTranslators() const { - if( m_translators.empty() ) - std::rethrow_exception(std::current_exception()); - else - return m_translators[0]->translate( m_translators.begin()+1, m_translators.end() ); - } -} -// end catch_exception_translator_registry.cpp -// start catch_fatal_condition.cpp - -#if defined(__GNUC__) -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wmissing-field-initializers" -#endif - -#if (defined(CATCH_PLATFORM_WINDOWS) && defined(CATCH_CONFIG_WINDOWS_SEH)) || defined(CATCH_CONFIG_POSIX_SIGNALS) -namespace { - // Report the error condition - void reportFatal( char const * const message ) { - Catch::getCurrentContext().getResultCapture()->handleFatalErrorCondition( message ); - } -} -#endif - -#if defined ( CATCH_PLATFORM_WINDOWS ) ///////////////////////////////////////// - -# if !defined ( CATCH_CONFIG_WINDOWS_SEH ) - -namespace Catch { - void FatalConditionHandler::reset() {} -} - -# else // CATCH_CONFIG_WINDOWS_SEH is defined - -namespace Catch { - struct SignalDefs { DWORD id; const char* name; }; - - // There is no 1-1 mapping between signals and windows exceptions. - // Windows can easily distinguish between SO and SigSegV, - // but SigInt, SigTerm, etc are handled differently. - static SignalDefs signalDefs[] = { - { EXCEPTION_ILLEGAL_INSTRUCTION, "SIGILL - Illegal instruction signal" }, - { EXCEPTION_STACK_OVERFLOW, "SIGSEGV - Stack overflow" }, - { EXCEPTION_ACCESS_VIOLATION, "SIGSEGV - Segmentation violation signal" }, - { EXCEPTION_INT_DIVIDE_BY_ZERO, "Divide by zero error" }, - }; - - LONG CALLBACK FatalConditionHandler::handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { - for (auto const& def : signalDefs) { - if (ExceptionInfo->ExceptionRecord->ExceptionCode == def.id) { - reportFatal(def.name); - } - } - // If its not an exception we care about, pass it along. - // This stops us from eating debugger breaks etc. - return EXCEPTION_CONTINUE_SEARCH; - } - - FatalConditionHandler::FatalConditionHandler() { - isSet = true; - // 32k seems enough for Catch to handle stack overflow, - // but the value was found experimentally, so there is no strong guarantee - guaranteeSize = 32 * 1024; - exceptionHandlerHandle = nullptr; - // Register as first handler in current chain - exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException); - // Pass in guarantee size to be filled - SetThreadStackGuarantee(&guaranteeSize); - } - - void FatalConditionHandler::reset() { - if (isSet) { - // Unregister handler and restore the old guarantee - RemoveVectoredExceptionHandler(exceptionHandlerHandle); - SetThreadStackGuarantee(&guaranteeSize); - exceptionHandlerHandle = nullptr; - isSet = false; - } - } - - FatalConditionHandler::~FatalConditionHandler() { - reset(); - } - -bool FatalConditionHandler::isSet = false; -ULONG FatalConditionHandler::guaranteeSize = 0; -PVOID FatalConditionHandler::exceptionHandlerHandle = nullptr; - -} // namespace Catch - -# endif // CATCH_CONFIG_WINDOWS_SEH - -#else // Not Windows - assumed to be POSIX compatible ////////////////////////// - -# if !defined(CATCH_CONFIG_POSIX_SIGNALS) - -namespace Catch { - void FatalConditionHandler::reset() {} -} - -# else // CATCH_CONFIG_POSIX_SIGNALS is defined - -#include - -namespace Catch { - - struct SignalDefs { - int id; - const char* name; - }; - static SignalDefs signalDefs[] = { - { SIGINT, "SIGINT - Terminal interrupt signal" }, - { SIGILL, "SIGILL - Illegal instruction signal" }, - { SIGFPE, "SIGFPE - Floating point error signal" }, - { SIGSEGV, "SIGSEGV - Segmentation violation signal" }, - { SIGTERM, "SIGTERM - Termination request signal" }, - { SIGABRT, "SIGABRT - Abort (abnormal termination) signal" } - }; - - void FatalConditionHandler::handleSignal( int sig ) { - char const * name = ""; - for (auto const& def : signalDefs) { - if (sig == def.id) { - name = def.name; - break; - } - } - reset(); - reportFatal(name); - raise( sig ); - } - - FatalConditionHandler::FatalConditionHandler() { - isSet = true; - stack_t sigStack; - sigStack.ss_sp = altStackMem; - sigStack.ss_size = SIGSTKSZ; - sigStack.ss_flags = 0; - sigaltstack(&sigStack, &oldSigStack); - struct sigaction sa = { }; - - sa.sa_handler = handleSignal; - sa.sa_flags = SA_ONSTACK; - for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) { - sigaction(signalDefs[i].id, &sa, &oldSigActions[i]); - } - } - - FatalConditionHandler::~FatalConditionHandler() { - reset(); - } - - void FatalConditionHandler::reset() { - if( isSet ) { - // Set signals back to previous values -- hopefully nobody overwrote them in the meantime - for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) { - sigaction(signalDefs[i].id, &oldSigActions[i], nullptr); - } - // Return the old stack - sigaltstack(&oldSigStack, nullptr); - isSet = false; - } - } - - bool FatalConditionHandler::isSet = false; - struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; - stack_t FatalConditionHandler::oldSigStack = {}; - char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; - -} // namespace Catch - -# endif // CATCH_CONFIG_POSIX_SIGNALS - -#endif // not Windows - -#if defined(__GNUC__) -# pragma GCC diagnostic pop -#endif -// end catch_fatal_condition.cpp -// start catch_interfaces_capture.cpp - -namespace Catch { - IResultCapture::~IResultCapture() = default; -} -// end catch_interfaces_capture.cpp -// start catch_interfaces_config.cpp - -namespace Catch { - IConfig::~IConfig() = default; -} -// end catch_interfaces_config.cpp -// start catch_interfaces_exception.cpp - -namespace Catch { - IExceptionTranslator::~IExceptionTranslator() = default; - IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() = default; -} -// end catch_interfaces_exception.cpp -// start catch_interfaces_registry_hub.cpp - -namespace Catch { - IRegistryHub::~IRegistryHub() = default; - IMutableRegistryHub::~IMutableRegistryHub() = default; -} -// end catch_interfaces_registry_hub.cpp -// start catch_interfaces_reporter.cpp - -// start catch_reporter_multi.h - -namespace Catch { - - class MultipleReporters : public IStreamingReporter { - using Reporters = std::vector; - Reporters m_reporters; - - public: - void add( IStreamingReporterPtr&& reporter ); - - public: // IStreamingReporter - - ReporterPreferences getPreferences() const override; - - void noMatchingTestCases( std::string const& spec ) override; - - static std::set getSupportedVerbosities(); - - void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) override; - void benchmarkEnded( BenchmarkStats const& benchmarkStats ) override; - - void testRunStarting( TestRunInfo const& testRunInfo ) override; - void testGroupStarting( GroupInfo const& groupInfo ) override; - void testCaseStarting( TestCaseInfo const& testInfo ) override; - void sectionStarting( SectionInfo const& sectionInfo ) override; - void assertionStarting( AssertionInfo const& assertionInfo ) override; - - // The return value indicates if the messages buffer should be cleared: - bool assertionEnded( AssertionStats const& assertionStats ) override; - void sectionEnded( SectionStats const& sectionStats ) override; - void testCaseEnded( TestCaseStats const& testCaseStats ) override; - void testGroupEnded( TestGroupStats const& testGroupStats ) override; - void testRunEnded( TestRunStats const& testRunStats ) override; - - void skipTest( TestCaseInfo const& testInfo ) override; - bool isMulti() const override; - - }; - -} // end namespace Catch - -// end catch_reporter_multi.h -namespace Catch { - - ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig ) - : m_stream( &_fullConfig->stream() ), m_fullConfig( _fullConfig ) {} - - ReporterConfig::ReporterConfig( IConfigPtr const& _fullConfig, std::ostream& _stream ) - : m_stream( &_stream ), m_fullConfig( _fullConfig ) {} - - std::ostream& ReporterConfig::stream() const { return *m_stream; } - IConfigPtr ReporterConfig::fullConfig() const { return m_fullConfig; } - - TestRunInfo::TestRunInfo( std::string const& _name ) : name( _name ) {} - - GroupInfo::GroupInfo( std::string const& _name, - std::size_t _groupIndex, - std::size_t _groupsCount ) - : name( _name ), - groupIndex( _groupIndex ), - groupsCounts( _groupsCount ) - {} - - AssertionStats::AssertionStats( AssertionResult const& _assertionResult, - std::vector const& _infoMessages, - Totals const& _totals ) - : assertionResult( _assertionResult ), - infoMessages( _infoMessages ), - totals( _totals ) - { - assertionResult.m_resultData.lazyExpression.m_transientExpression = _assertionResult.m_resultData.lazyExpression.m_transientExpression; - - if( assertionResult.hasMessage() ) { - // Copy message into messages list. - // !TBD This should have been done earlier, somewhere - MessageBuilder builder( assertionResult.getTestMacroName(), assertionResult.getSourceInfo(), assertionResult.getResultType() ); - builder << assertionResult.getMessage(); - builder.m_info.message = builder.m_stream.str(); - - infoMessages.push_back( builder.m_info ); - } - } - - AssertionStats::~AssertionStats() = default; - - SectionStats::SectionStats( SectionInfo const& _sectionInfo, - Counts const& _assertions, - double _durationInSeconds, - bool _missingAssertions ) - : sectionInfo( _sectionInfo ), - assertions( _assertions ), - durationInSeconds( _durationInSeconds ), - missingAssertions( _missingAssertions ) - {} - - SectionStats::~SectionStats() = default; - - TestCaseStats::TestCaseStats( TestCaseInfo const& _testInfo, - Totals const& _totals, - std::string const& _stdOut, - std::string const& _stdErr, - bool _aborting ) - : testInfo( _testInfo ), - totals( _totals ), - stdOut( _stdOut ), - stdErr( _stdErr ), - aborting( _aborting ) - {} - - TestCaseStats::~TestCaseStats() = default; - - TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo, - Totals const& _totals, - bool _aborting ) - : groupInfo( _groupInfo ), - totals( _totals ), - aborting( _aborting ) - {} - - TestGroupStats::TestGroupStats( GroupInfo const& _groupInfo ) - : groupInfo( _groupInfo ), - aborting( false ) - {} - - TestGroupStats::~TestGroupStats() = default; - - TestRunStats::TestRunStats( TestRunInfo const& _runInfo, - Totals const& _totals, - bool _aborting ) - : runInfo( _runInfo ), - totals( _totals ), - aborting( _aborting ) - {} - - TestRunStats::~TestRunStats() = default; - - void IStreamingReporter::fatalErrorEncountered( StringRef ) {} - bool IStreamingReporter::isMulti() const { return false; } - - IReporterFactory::~IReporterFactory() = default; - IReporterRegistry::~IReporterRegistry() = default; - - void addReporter( IStreamingReporterPtr& existingReporter, IStreamingReporterPtr&& additionalReporter ) { - - if( !existingReporter ) { - existingReporter = std::move( additionalReporter ); - return; - } - - MultipleReporters* multi = nullptr; - - if( existingReporter->isMulti() ) { - multi = static_cast( existingReporter.get() ); - } - else { - auto newMulti = std::unique_ptr( new MultipleReporters ); - newMulti->add( std::move( existingReporter ) ); - multi = newMulti.get(); - existingReporter = std::move( newMulti ); - } - multi->add( std::move( additionalReporter ) ); - } - -} // end namespace Catch -// end catch_interfaces_reporter.cpp -// start catch_interfaces_runner.cpp - -namespace Catch { - IRunner::~IRunner() = default; -} -// end catch_interfaces_runner.cpp -// start catch_interfaces_testcase.cpp - -namespace Catch { - ITestInvoker::~ITestInvoker() = default; - ITestCaseRegistry::~ITestCaseRegistry() = default; -} -// end catch_interfaces_testcase.cpp -// start catch_leak_detector.cpp - -#ifdef CATCH_CONFIG_WINDOWS_CRTDBG -#include - -namespace Catch { - - LeakDetector::LeakDetector() { - int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG); - flag |= _CRTDBG_LEAK_CHECK_DF; - flag |= _CRTDBG_ALLOC_MEM_DF; - _CrtSetDbgFlag(flag); - _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); - _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); - // Change this to leaking allocation's number to break there - _CrtSetBreakAlloc(-1); - } -} - -#else - - Catch::LeakDetector::LeakDetector() {} - -#endif -// end catch_leak_detector.cpp -// start catch_list.cpp - -// start catch_list.h - -#include - -namespace Catch { - - std::size_t listTests( Config const& config ); - - std::size_t listTestsNamesOnly( Config const& config ); - - struct TagInfo { - void add( std::string const& spelling ); - std::string all() const; - - std::set spellings; - std::size_t count = 0; - }; - - std::size_t listTags( Config const& config ); - - std::size_t listReporters( Config const& /*config*/ ); - - Option list( Config const& config ); - -} // end namespace Catch - -// end catch_list.h -// start catch_text.h - -namespace Catch { - using namespace clara::TextFlow; -} - -// end catch_text.h -#include -#include -#include - -namespace Catch { - - std::size_t listTests( Config const& config ) { - TestSpec testSpec = config.testSpec(); - if( config.testSpec().hasFilters() ) - Catch::cout() << "Matching test cases:\n"; - else { - Catch::cout() << "All available test cases:\n"; - testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec(); - } - - auto matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); - for( auto const& testCaseInfo : matchedTestCases ) { - Colour::Code colour = testCaseInfo.isHidden() - ? Colour::SecondaryText - : Colour::None; - Colour colourGuard( colour ); - - Catch::cout() << Column( testCaseInfo.name ).initialIndent( 2 ).indent( 4 ) << "\n"; - if( config.verbosity() >= Verbosity::High ) { - Catch::cout() << Column( Catch::Detail::stringify( testCaseInfo.lineInfo ) ).indent(4) << std::endl; - std::string description = testCaseInfo.description; - if( description.empty() ) - description = "(NO DESCRIPTION)"; - Catch::cout() << Column( description ).indent(4) << std::endl; - } - if( !testCaseInfo.tags.empty() ) - Catch::cout() << Column( testCaseInfo.tagsAsString() ).indent( 6 ) << "\n"; - } - - if( !config.testSpec().hasFilters() ) - Catch::cout() << pluralise( matchedTestCases.size(), "test case" ) << '\n' << std::endl; - else - Catch::cout() << pluralise( matchedTestCases.size(), "matching test case" ) << '\n' << std::endl; - return matchedTestCases.size(); - } - - std::size_t listTestsNamesOnly( Config const& config ) { - TestSpec testSpec = config.testSpec(); - if( !config.testSpec().hasFilters() ) - testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec(); - std::size_t matchedTests = 0; - std::vector matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); - for( auto const& testCaseInfo : matchedTestCases ) { - matchedTests++; - if( startsWith( testCaseInfo.name, '#' ) ) - Catch::cout() << '"' << testCaseInfo.name << '"'; - else - Catch::cout() << testCaseInfo.name; - if ( config.verbosity() >= Verbosity::High ) - Catch::cout() << "\t@" << testCaseInfo.lineInfo; - Catch::cout() << std::endl; - } - return matchedTests; - } - - void TagInfo::add( std::string const& spelling ) { - ++count; - spellings.insert( spelling ); - } - - std::string TagInfo::all() const { - std::string out; - for( auto const& spelling : spellings ) - out += "[" + spelling + "]"; - return out; - } - - std::size_t listTags( Config const& config ) { - TestSpec testSpec = config.testSpec(); - if( config.testSpec().hasFilters() ) - Catch::cout() << "Tags for matching test cases:\n"; - else { - Catch::cout() << "All available tags:\n"; - testSpec = TestSpecParser( ITagAliasRegistry::get() ).parse( "*" ).testSpec(); - } - - std::map tagCounts; - - std::vector matchedTestCases = filterTests( getAllTestCasesSorted( config ), testSpec, config ); - for( auto const& testCase : matchedTestCases ) { - for( auto const& tagName : testCase.getTestCaseInfo().tags ) { - std::string lcaseTagName = toLower( tagName ); - auto countIt = tagCounts.find( lcaseTagName ); - if( countIt == tagCounts.end() ) - countIt = tagCounts.insert( std::make_pair( lcaseTagName, TagInfo() ) ).first; - countIt->second.add( tagName ); - } - } - - for( auto const& tagCount : tagCounts ) { - ReusableStringStream rss; - rss << " " << std::setw(2) << tagCount.second.count << " "; - auto str = rss.str(); - auto wrapper = Column( tagCount.second.all() ) - .initialIndent( 0 ) - .indent( str.size() ) - .width( CATCH_CONFIG_CONSOLE_WIDTH-10 ); - Catch::cout() << str << wrapper << '\n'; - } - Catch::cout() << pluralise( tagCounts.size(), "tag" ) << '\n' << std::endl; - return tagCounts.size(); - } - - std::size_t listReporters( Config const& /*config*/ ) { - Catch::cout() << "Available reporters:\n"; - IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories(); - std::size_t maxNameLen = 0; - for( auto const& factoryKvp : factories ) - maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() ); - - for( auto const& factoryKvp : factories ) { - Catch::cout() - << Column( factoryKvp.first + ":" ) - .indent(2) - .width( 5+maxNameLen ) - + Column( factoryKvp.second->getDescription() ) - .initialIndent(0) - .indent(2) - .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 ) - << "\n"; - } - Catch::cout() << std::endl; - return factories.size(); - } - - Option list( Config const& config ) { - Option listedCount; - if( config.listTests() ) - listedCount = listedCount.valueOr(0) + listTests( config ); - if( config.listTestNamesOnly() ) - listedCount = listedCount.valueOr(0) + listTestsNamesOnly( config ); - if( config.listTags() ) - listedCount = listedCount.valueOr(0) + listTags( config ); - if( config.listReporters() ) - listedCount = listedCount.valueOr(0) + listReporters( config ); - return listedCount; - } - -} // end namespace Catch -// end catch_list.cpp -// start catch_matchers.cpp - -namespace Catch { -namespace Matchers { - namespace Impl { - - std::string MatcherUntypedBase::toString() const { - if( m_cachedToString.empty() ) - m_cachedToString = describe(); - return m_cachedToString; - } - - MatcherUntypedBase::~MatcherUntypedBase() = default; - - } // namespace Impl -} // namespace Matchers - -using namespace Matchers; -using Matchers::Impl::MatcherBase; - -} // namespace Catch -// end catch_matchers.cpp -// start catch_matchers_floating.cpp - -#include -#include -#include -#include - -namespace Catch { -namespace Matchers { -namespace Floating { -enum class FloatingPointKind : uint8_t { - Float, - Double -}; -} -} -} - -namespace { - -template -struct Converter; - -template <> -struct Converter { - static_assert(sizeof(float) == sizeof(int32_t), "Important ULP matcher assumption violated"); - Converter(float f) { - std::memcpy(&i, &f, sizeof(f)); - } - int32_t i; -}; - -template <> -struct Converter { - static_assert(sizeof(double) == sizeof(int64_t), "Important ULP matcher assumption violated"); - Converter(double d) { - std::memcpy(&i, &d, sizeof(d)); - } - int64_t i; -}; - -template -auto convert(T t) -> Converter { - return Converter(t); -} - -template -bool almostEqualUlps(FP lhs, FP rhs, int maxUlpDiff) { - // Comparison with NaN should always be false. - // This way we can rule it out before getting into the ugly details - if (std::isnan(lhs) || std::isnan(rhs)) { - return false; - } - - auto lc = convert(lhs); - auto rc = convert(rhs); - - if ((lc.i < 0) != (rc.i < 0)) { - // Potentially we can have +0 and -0 - return lhs == rhs; - } - - auto ulpDiff = std::abs(lc.i - rc.i); - return ulpDiff <= maxUlpDiff; -} - -} - -namespace Catch { -namespace Matchers { -namespace Floating { - WithinAbsMatcher::WithinAbsMatcher(double target, double margin) - :m_target{ target }, m_margin{ margin } { - if (m_margin < 0) { - throw std::domain_error("Allowed margin difference has to be >= 0"); - } - } - - // Performs equivalent check of std::fabs(lhs - rhs) <= margin - // But without the subtraction to allow for INFINITY in comparison - bool WithinAbsMatcher::match(double const& matchee) const { - return (matchee + m_margin >= m_target) && (m_target + m_margin >= m_margin); - } - - std::string WithinAbsMatcher::describe() const { - return "is within " + ::Catch::Detail::stringify(m_margin) + " of " + ::Catch::Detail::stringify(m_target); - } - - WithinUlpsMatcher::WithinUlpsMatcher(double target, int ulps, FloatingPointKind baseType) - :m_target{ target }, m_ulps{ ulps }, m_type{ baseType } { - if (m_ulps < 0) { - throw std::domain_error("Allowed ulp difference has to be >= 0"); - } - } - - bool WithinUlpsMatcher::match(double const& matchee) const { - switch (m_type) { - case FloatingPointKind::Float: - return almostEqualUlps(static_cast(matchee), static_cast(m_target), m_ulps); - case FloatingPointKind::Double: - return almostEqualUlps(matchee, m_target, m_ulps); - default: - throw std::domain_error("Unknown FloatingPointKind value"); - } - } - - std::string WithinUlpsMatcher::describe() const { - return "is within " + std::to_string(m_ulps) + " ULPs of " + ::Catch::Detail::stringify(m_target) + ((m_type == FloatingPointKind::Float)? "f" : ""); - } - -}// namespace Floating - -Floating::WithinUlpsMatcher WithinULP(double target, int maxUlpDiff) { - return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Double); -} - -Floating::WithinUlpsMatcher WithinULP(float target, int maxUlpDiff) { - return Floating::WithinUlpsMatcher(target, maxUlpDiff, Floating::FloatingPointKind::Float); -} - -Floating::WithinAbsMatcher WithinAbs(double target, double margin) { - return Floating::WithinAbsMatcher(target, margin); -} - -} // namespace Matchers -} // namespace Catch - -// end catch_matchers_floating.cpp -// start catch_matchers_string.cpp - -#include - -namespace Catch { -namespace Matchers { - - namespace StdString { - - CasedString::CasedString( std::string const& str, CaseSensitive::Choice caseSensitivity ) - : m_caseSensitivity( caseSensitivity ), - m_str( adjustString( str ) ) - {} - std::string CasedString::adjustString( std::string const& str ) const { - return m_caseSensitivity == CaseSensitive::No - ? toLower( str ) - : str; - } - std::string CasedString::caseSensitivitySuffix() const { - return m_caseSensitivity == CaseSensitive::No - ? " (case insensitive)" - : std::string(); - } - - StringMatcherBase::StringMatcherBase( std::string const& operation, CasedString const& comparator ) - : m_comparator( comparator ), - m_operation( operation ) { - } - - std::string StringMatcherBase::describe() const { - std::string description; - description.reserve(5 + m_operation.size() + m_comparator.m_str.size() + - m_comparator.caseSensitivitySuffix().size()); - description += m_operation; - description += ": \""; - description += m_comparator.m_str; - description += "\""; - description += m_comparator.caseSensitivitySuffix(); - return description; - } - - EqualsMatcher::EqualsMatcher( CasedString const& comparator ) : StringMatcherBase( "equals", comparator ) {} - - bool EqualsMatcher::match( std::string const& source ) const { - return m_comparator.adjustString( source ) == m_comparator.m_str; - } - - ContainsMatcher::ContainsMatcher( CasedString const& comparator ) : StringMatcherBase( "contains", comparator ) {} - - bool ContainsMatcher::match( std::string const& source ) const { - return contains( m_comparator.adjustString( source ), m_comparator.m_str ); - } - - StartsWithMatcher::StartsWithMatcher( CasedString const& comparator ) : StringMatcherBase( "starts with", comparator ) {} - - bool StartsWithMatcher::match( std::string const& source ) const { - return startsWith( m_comparator.adjustString( source ), m_comparator.m_str ); - } - - EndsWithMatcher::EndsWithMatcher( CasedString const& comparator ) : StringMatcherBase( "ends with", comparator ) {} - - bool EndsWithMatcher::match( std::string const& source ) const { - return endsWith( m_comparator.adjustString( source ), m_comparator.m_str ); - } - - RegexMatcher::RegexMatcher(std::string regex, CaseSensitive::Choice caseSensitivity): m_regex(std::move(regex)), m_caseSensitivity(caseSensitivity) {} - - bool RegexMatcher::match(std::string const& matchee) const { - auto flags = std::regex::ECMAScript; // ECMAScript is the default syntax option anyway - if (m_caseSensitivity == CaseSensitive::Choice::No) { - flags |= std::regex::icase; - } - auto reg = std::regex(m_regex, flags); - return std::regex_match(matchee, reg); - } - - std::string RegexMatcher::describe() const { - return "matches " + ::Catch::Detail::stringify(m_regex) + ((m_caseSensitivity == CaseSensitive::Choice::Yes)? " case sensitively" : " case insensitively"); - } - - } // namespace StdString - - StdString::EqualsMatcher Equals( std::string const& str, CaseSensitive::Choice caseSensitivity ) { - return StdString::EqualsMatcher( StdString::CasedString( str, caseSensitivity) ); - } - StdString::ContainsMatcher Contains( std::string const& str, CaseSensitive::Choice caseSensitivity ) { - return StdString::ContainsMatcher( StdString::CasedString( str, caseSensitivity) ); - } - StdString::EndsWithMatcher EndsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) { - return StdString::EndsWithMatcher( StdString::CasedString( str, caseSensitivity) ); - } - StdString::StartsWithMatcher StartsWith( std::string const& str, CaseSensitive::Choice caseSensitivity ) { - return StdString::StartsWithMatcher( StdString::CasedString( str, caseSensitivity) ); - } - - StdString::RegexMatcher Matches(std::string const& regex, CaseSensitive::Choice caseSensitivity) { - return StdString::RegexMatcher(regex, caseSensitivity); - } - -} // namespace Matchers -} // namespace Catch -// end catch_matchers_string.cpp -// start catch_message.cpp - -// start catch_uncaught_exceptions.h - -namespace Catch { - bool uncaught_exceptions(); -} // end namespace Catch - -// end catch_uncaught_exceptions.h -namespace Catch { - - MessageInfo::MessageInfo( std::string const& _macroName, - SourceLineInfo const& _lineInfo, - ResultWas::OfType _type ) - : macroName( _macroName ), - lineInfo( _lineInfo ), - type( _type ), - sequence( ++globalCount ) - {} - - bool MessageInfo::operator==( MessageInfo const& other ) const { - return sequence == other.sequence; - } - - bool MessageInfo::operator<( MessageInfo const& other ) const { - return sequence < other.sequence; - } - - // This may need protecting if threading support is added - unsigned int MessageInfo::globalCount = 0; - - //////////////////////////////////////////////////////////////////////////// - - Catch::MessageBuilder::MessageBuilder( std::string const& macroName, - SourceLineInfo const& lineInfo, - ResultWas::OfType type ) - :m_info(macroName, lineInfo, type) {} - - //////////////////////////////////////////////////////////////////////////// - - ScopedMessage::ScopedMessage( MessageBuilder const& builder ) - : m_info( builder.m_info ) - { - m_info.message = builder.m_stream.str(); - getResultCapture().pushScopedMessage( m_info ); - } - - ScopedMessage::~ScopedMessage() { - if ( !uncaught_exceptions() ){ - getResultCapture().popScopedMessage(m_info); - } - } -} // end namespace Catch -// end catch_message.cpp -// start catch_random_number_generator.cpp - -// start catch_random_number_generator.h - -#include - -namespace Catch { - - struct IConfig; - - void seedRng( IConfig const& config ); - - unsigned int rngSeed(); - - struct RandomNumberGenerator { - using result_type = unsigned int; - - static constexpr result_type (min)() { return 0; } - static constexpr result_type (max)() { return 1000000; } - - result_type operator()( result_type n ) const; - result_type operator()() const; - - template - static void shuffle( V& vector ) { - RandomNumberGenerator rng; - std::shuffle( vector.begin(), vector.end(), rng ); - } - }; - -} - -// end catch_random_number_generator.h -#include - -namespace Catch { - - void seedRng( IConfig const& config ) { - if( config.rngSeed() != 0 ) - std::srand( config.rngSeed() ); - } - unsigned int rngSeed() { - return getCurrentContext().getConfig()->rngSeed(); - } - - RandomNumberGenerator::result_type RandomNumberGenerator::operator()( result_type n ) const { - return std::rand() % n; - } - RandomNumberGenerator::result_type RandomNumberGenerator::operator()() const { - return std::rand() % (max)(); - } - -} -// end catch_random_number_generator.cpp -// start catch_registry_hub.cpp - -// start catch_test_case_registry_impl.h - -#include -#include -#include -#include - -namespace Catch { - - class TestCase; - struct IConfig; - - std::vector sortTests( IConfig const& config, std::vector const& unsortedTestCases ); - bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); - - void enforceNoDuplicateTestCases( std::vector const& functions ); - - std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); - std::vector const& getAllTestCasesSorted( IConfig const& config ); - - class TestRegistry : public ITestCaseRegistry { - public: - virtual ~TestRegistry() = default; - - virtual void registerTest( TestCase const& testCase ); - - std::vector const& getAllTests() const override; - std::vector const& getAllTestsSorted( IConfig const& config ) const override; - - private: - std::vector m_functions; - mutable RunTests::InWhatOrder m_currentSortOrder = RunTests::InDeclarationOrder; - mutable std::vector m_sortedFunctions; - std::size_t m_unnamedCount = 0; - std::ios_base::Init m_ostreamInit; // Forces cout/ cerr to be initialised - }; - - /////////////////////////////////////////////////////////////////////////// - - class TestInvokerAsFunction : public ITestInvoker { - void(*m_testAsFunction)(); - public: - TestInvokerAsFunction( void(*testAsFunction)() ) noexcept; - - void invoke() const override; - }; - - std::string extractClassName( std::string const& classOrQualifiedMethodName ); - - /////////////////////////////////////////////////////////////////////////// - -} // end namespace Catch - -// end catch_test_case_registry_impl.h -// start catch_reporter_registry.h - -#include - -namespace Catch { - - class ReporterRegistry : public IReporterRegistry { - - public: - - ~ReporterRegistry() override; - - IStreamingReporterPtr create( std::string const& name, IConfigPtr const& config ) const override; - - void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ); - void registerListener( IReporterFactoryPtr const& factory ); - - FactoryMap const& getFactories() const override; - Listeners const& getListeners() const override; - - private: - FactoryMap m_factories; - Listeners m_listeners; - }; -} - -// end catch_reporter_registry.h -// start catch_tag_alias_registry.h - -// start catch_tag_alias.h - -#include - -namespace Catch { - - struct TagAlias { - TagAlias(std::string const& _tag, SourceLineInfo _lineInfo); - - std::string tag; - SourceLineInfo lineInfo; - }; - -} // end namespace Catch - -// end catch_tag_alias.h -#include - -namespace Catch { - - class TagAliasRegistry : public ITagAliasRegistry { - public: - ~TagAliasRegistry() override; - TagAlias const* find( std::string const& alias ) const override; - std::string expandAliases( std::string const& unexpandedTestSpec ) const override; - void add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ); - - private: - std::map m_registry; - }; - -} // end namespace Catch - -// end catch_tag_alias_registry.h -// start catch_startup_exception_registry.h - -#include -#include - -namespace Catch { - - class StartupExceptionRegistry { - public: - void add(std::exception_ptr const& exception) noexcept; - std::vector const& getExceptions() const noexcept; - private: - std::vector m_exceptions; - }; - -} // end namespace Catch - -// end catch_startup_exception_registry.h -namespace Catch { - - namespace { - - class RegistryHub : public IRegistryHub, public IMutableRegistryHub, - private NonCopyable { - - public: // IRegistryHub - RegistryHub() = default; - IReporterRegistry const& getReporterRegistry() const override { - return m_reporterRegistry; - } - ITestCaseRegistry const& getTestCaseRegistry() const override { - return m_testCaseRegistry; - } - IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() override { - return m_exceptionTranslatorRegistry; - } - ITagAliasRegistry const& getTagAliasRegistry() const override { - return m_tagAliasRegistry; - } - StartupExceptionRegistry const& getStartupExceptionRegistry() const override { - return m_exceptionRegistry; - } - - public: // IMutableRegistryHub - void registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) override { - m_reporterRegistry.registerReporter( name, factory ); - } - void registerListener( IReporterFactoryPtr const& factory ) override { - m_reporterRegistry.registerListener( factory ); - } - void registerTest( TestCase const& testInfo ) override { - m_testCaseRegistry.registerTest( testInfo ); - } - void registerTranslator( const IExceptionTranslator* translator ) override { - m_exceptionTranslatorRegistry.registerTranslator( translator ); - } - void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) override { - m_tagAliasRegistry.add( alias, tag, lineInfo ); - } - void registerStartupException() noexcept override { - m_exceptionRegistry.add(std::current_exception()); - } - - private: - TestRegistry m_testCaseRegistry; - ReporterRegistry m_reporterRegistry; - ExceptionTranslatorRegistry m_exceptionTranslatorRegistry; - TagAliasRegistry m_tagAliasRegistry; - StartupExceptionRegistry m_exceptionRegistry; - }; - - // Single, global, instance - RegistryHub*& getTheRegistryHub() { - static RegistryHub* theRegistryHub = nullptr; - if( !theRegistryHub ) - theRegistryHub = new RegistryHub(); - return theRegistryHub; - } - } - - IRegistryHub& getRegistryHub() { - return *getTheRegistryHub(); - } - IMutableRegistryHub& getMutableRegistryHub() { - return *getTheRegistryHub(); - } - void cleanUp() { - delete getTheRegistryHub(); - getTheRegistryHub() = nullptr; - cleanUpContext(); - ReusableStringStream::cleanup(); - } - std::string translateActiveException() { - return getRegistryHub().getExceptionTranslatorRegistry().translateActiveException(); - } - -} // end namespace Catch -// end catch_registry_hub.cpp -// start catch_reporter_registry.cpp - -namespace Catch { - - ReporterRegistry::~ReporterRegistry() = default; - - IStreamingReporterPtr ReporterRegistry::create( std::string const& name, IConfigPtr const& config ) const { - auto it = m_factories.find( name ); - if( it == m_factories.end() ) - return nullptr; - return it->second->create( ReporterConfig( config ) ); - } - - void ReporterRegistry::registerReporter( std::string const& name, IReporterFactoryPtr const& factory ) { - m_factories.emplace(name, factory); - } - void ReporterRegistry::registerListener( IReporterFactoryPtr const& factory ) { - m_listeners.push_back( factory ); - } - - IReporterRegistry::FactoryMap const& ReporterRegistry::getFactories() const { - return m_factories; - } - IReporterRegistry::Listeners const& ReporterRegistry::getListeners() const { - return m_listeners; - } - -} -// end catch_reporter_registry.cpp -// start catch_result_type.cpp - -namespace Catch { - - bool isOk( ResultWas::OfType resultType ) { - return ( resultType & ResultWas::FailureBit ) == 0; - } - bool isJustInfo( int flags ) { - return flags == ResultWas::Info; - } - - ResultDisposition::Flags operator | ( ResultDisposition::Flags lhs, ResultDisposition::Flags rhs ) { - return static_cast( static_cast( lhs ) | static_cast( rhs ) ); - } - - bool shouldContinueOnFailure( int flags ) { return ( flags & ResultDisposition::ContinueOnFailure ) != 0; } - bool shouldSuppressFailure( int flags ) { return ( flags & ResultDisposition::SuppressFail ) != 0; } - -} // end namespace Catch -// end catch_result_type.cpp -// start catch_run_context.cpp - -#include -#include -#include - -namespace Catch { - - class RedirectedStream { - std::ostream& m_originalStream; - std::ostream& m_redirectionStream; - std::streambuf* m_prevBuf; - - public: - RedirectedStream( std::ostream& originalStream, std::ostream& redirectionStream ) - : m_originalStream( originalStream ), - m_redirectionStream( redirectionStream ), - m_prevBuf( m_originalStream.rdbuf() ) - { - m_originalStream.rdbuf( m_redirectionStream.rdbuf() ); - } - ~RedirectedStream() { - m_originalStream.rdbuf( m_prevBuf ); - } - }; - - class RedirectedStdOut { - ReusableStringStream m_rss; - RedirectedStream m_cout; - public: - RedirectedStdOut() : m_cout( Catch::cout(), m_rss.get() ) {} - auto str() const -> std::string { return m_rss.str(); } - }; - - // StdErr has two constituent streams in C++, std::cerr and std::clog - // This means that we need to redirect 2 streams into 1 to keep proper - // order of writes - class RedirectedStdErr { - ReusableStringStream m_rss; - RedirectedStream m_cerr; - RedirectedStream m_clog; - public: - RedirectedStdErr() - : m_cerr( Catch::cerr(), m_rss.get() ), - m_clog( Catch::clog(), m_rss.get() ) - {} - auto str() const -> std::string { return m_rss.str(); } - }; - - RunContext::RunContext(IConfigPtr const& _config, IStreamingReporterPtr&& reporter) - : m_runInfo(_config->name()), - m_context(getCurrentMutableContext()), - m_config(_config), - m_reporter(std::move(reporter)), - m_lastAssertionInfo{ "", SourceLineInfo("",0), "", ResultDisposition::Normal }, - m_includeSuccessfulResults( m_config->includeSuccessfulResults() ) - { - m_context.setRunner(this); - m_context.setConfig(m_config); - m_context.setResultCapture(this); - m_reporter->testRunStarting(m_runInfo); - } - - RunContext::~RunContext() { - m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, aborting())); - } - - void RunContext::testGroupStarting(std::string const& testSpec, std::size_t groupIndex, std::size_t groupsCount) { - m_reporter->testGroupStarting(GroupInfo(testSpec, groupIndex, groupsCount)); - } - - void RunContext::testGroupEnded(std::string const& testSpec, Totals const& totals, std::size_t groupIndex, std::size_t groupsCount) { - m_reporter->testGroupEnded(TestGroupStats(GroupInfo(testSpec, groupIndex, groupsCount), totals, aborting())); - } - - Totals RunContext::runTest(TestCase const& testCase) { - Totals prevTotals = m_totals; - - std::string redirectedCout; - std::string redirectedCerr; - - TestCaseInfo testInfo = testCase.getTestCaseInfo(); - - m_reporter->testCaseStarting(testInfo); - - m_activeTestCase = &testCase; - - ITracker& rootTracker = m_trackerContext.startRun(); - assert(rootTracker.isSectionTracker()); - static_cast(rootTracker).addInitialFilters(m_config->getSectionsToRun()); - do { - m_trackerContext.startCycle(); - m_testCaseTracker = &SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(testInfo.name, testInfo.lineInfo)); - runCurrentTest(redirectedCout, redirectedCerr); - } while (!m_testCaseTracker->isSuccessfullyCompleted() && !aborting()); - - Totals deltaTotals = m_totals.delta(prevTotals); - if (testInfo.expectedToFail() && deltaTotals.testCases.passed > 0) { - deltaTotals.assertions.failed++; - deltaTotals.testCases.passed--; - deltaTotals.testCases.failed++; - } - m_totals.testCases += deltaTotals.testCases; - m_reporter->testCaseEnded(TestCaseStats(testInfo, - deltaTotals, - redirectedCout, - redirectedCerr, - aborting())); - - m_activeTestCase = nullptr; - m_testCaseTracker = nullptr; - - return deltaTotals; - } - - IConfigPtr RunContext::config() const { - return m_config; - } - - IStreamingReporter& RunContext::reporter() const { - return *m_reporter; - } - - void RunContext::assertionEnded(AssertionResult const & result) { - if (result.getResultType() == ResultWas::Ok) { - m_totals.assertions.passed++; - m_lastAssertionPassed = true; - } else if (!result.isOk()) { - m_lastAssertionPassed = false; - if( m_activeTestCase->getTestCaseInfo().okToFail() ) - m_totals.assertions.failedButOk++; - else - m_totals.assertions.failed++; - } - else { - m_lastAssertionPassed = true; - } - - // We have no use for the return value (whether messages should be cleared), because messages were made scoped - // and should be let to clear themselves out. - static_cast(m_reporter->assertionEnded(AssertionStats(result, m_messages, m_totals))); - - // Reset working state - resetAssertionInfo(); - m_lastResult = result; - } - void RunContext::resetAssertionInfo() { - m_lastAssertionInfo.macroName = StringRef(); - m_lastAssertionInfo.capturedExpression = "{Unknown expression after the reported line}"_sr; - } - - bool RunContext::sectionStarted(SectionInfo const & sectionInfo, Counts & assertions) { - ITracker& sectionTracker = SectionTracker::acquire(m_trackerContext, TestCaseTracking::NameAndLocation(sectionInfo.name, sectionInfo.lineInfo)); - if (!sectionTracker.isOpen()) - return false; - m_activeSections.push_back(§ionTracker); - - m_lastAssertionInfo.lineInfo = sectionInfo.lineInfo; - - m_reporter->sectionStarting(sectionInfo); - - assertions = m_totals.assertions; - - return true; - } - - bool RunContext::testForMissingAssertions(Counts& assertions) { - if (assertions.total() != 0) - return false; - if (!m_config->warnAboutMissingAssertions()) - return false; - if (m_trackerContext.currentTracker().hasChildren()) - return false; - m_totals.assertions.failed++; - assertions.failed++; - return true; - } - - void RunContext::sectionEnded(SectionEndInfo const & endInfo) { - Counts assertions = m_totals.assertions - endInfo.prevAssertions; - bool missingAssertions = testForMissingAssertions(assertions); - - if (!m_activeSections.empty()) { - m_activeSections.back()->close(); - m_activeSections.pop_back(); - } - - m_reporter->sectionEnded(SectionStats(endInfo.sectionInfo, assertions, endInfo.durationInSeconds, missingAssertions)); - m_messages.clear(); - } - - void RunContext::sectionEndedEarly(SectionEndInfo const & endInfo) { - if (m_unfinishedSections.empty()) - m_activeSections.back()->fail(); - else - m_activeSections.back()->close(); - m_activeSections.pop_back(); - - m_unfinishedSections.push_back(endInfo); - } - void RunContext::benchmarkStarting( BenchmarkInfo const& info ) { - m_reporter->benchmarkStarting( info ); - } - void RunContext::benchmarkEnded( BenchmarkStats const& stats ) { - m_reporter->benchmarkEnded( stats ); - } - - void RunContext::pushScopedMessage(MessageInfo const & message) { - m_messages.push_back(message); - } - - void RunContext::popScopedMessage(MessageInfo const & message) { - m_messages.erase(std::remove(m_messages.begin(), m_messages.end(), message), m_messages.end()); - } - - std::string RunContext::getCurrentTestName() const { - return m_activeTestCase - ? m_activeTestCase->getTestCaseInfo().name - : std::string(); - } - - const AssertionResult * RunContext::getLastResult() const { - return &(*m_lastResult); - } - - void RunContext::exceptionEarlyReported() { - m_shouldReportUnexpected = false; - } - - void RunContext::handleFatalErrorCondition( StringRef message ) { - // First notify reporter that bad things happened - m_reporter->fatalErrorEncountered(message); - - // Don't rebuild the result -- the stringification itself can cause more fatal errors - // Instead, fake a result data. - AssertionResultData tempResult( ResultWas::FatalErrorCondition, { false } ); - tempResult.message = message; - AssertionResult result(m_lastAssertionInfo, tempResult); - - assertionEnded(result); - - handleUnfinishedSections(); - - // Recreate section for test case (as we will lose the one that was in scope) - auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo(); - SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name, testCaseInfo.description); - - Counts assertions; - assertions.failed = 1; - SectionStats testCaseSectionStats(testCaseSection, assertions, 0, false); - m_reporter->sectionEnded(testCaseSectionStats); - - auto const& testInfo = m_activeTestCase->getTestCaseInfo(); - - Totals deltaTotals; - deltaTotals.testCases.failed = 1; - deltaTotals.assertions.failed = 1; - m_reporter->testCaseEnded(TestCaseStats(testInfo, - deltaTotals, - std::string(), - std::string(), - false)); - m_totals.testCases.failed++; - testGroupEnded(std::string(), m_totals, 1, 1); - m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, false)); - } - - bool RunContext::lastAssertionPassed() { - return m_lastAssertionPassed; - } - - void RunContext::assertionPassed() { - m_lastAssertionPassed = true; - ++m_totals.assertions.passed; - resetAssertionInfo(); - } - - bool RunContext::aborting() const { - return m_totals.assertions.failed == static_cast(m_config->abortAfter()); - } - - void RunContext::runCurrentTest(std::string & redirectedCout, std::string & redirectedCerr) { - auto const& testCaseInfo = m_activeTestCase->getTestCaseInfo(); - SectionInfo testCaseSection(testCaseInfo.lineInfo, testCaseInfo.name, testCaseInfo.description); - m_reporter->sectionStarting(testCaseSection); - Counts prevAssertions = m_totals.assertions; - double duration = 0; - m_shouldReportUnexpected = true; - m_lastAssertionInfo = { "TEST_CASE", testCaseInfo.lineInfo, "", ResultDisposition::Normal }; - - seedRng(*m_config); - - Timer timer; - try { - if (m_reporter->getPreferences().shouldRedirectStdOut) { - RedirectedStdOut redirectedStdOut; - RedirectedStdErr redirectedStdErr; - timer.start(); - invokeActiveTestCase(); - redirectedCout += redirectedStdOut.str(); - redirectedCerr += redirectedStdErr.str(); - - } else { - timer.start(); - invokeActiveTestCase(); - } - duration = timer.getElapsedSeconds(); - } catch (TestFailureException&) { - // This just means the test was aborted due to failure - } catch (...) { - // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions - // are reported without translation at the point of origin. - if( m_shouldReportUnexpected ) { - AssertionReaction dummyReaction; - handleUnexpectedInflightException( m_lastAssertionInfo, translateActiveException(), dummyReaction ); - } - } - Counts assertions = m_totals.assertions - prevAssertions; - bool missingAssertions = testForMissingAssertions(assertions); - - m_testCaseTracker->close(); - handleUnfinishedSections(); - m_messages.clear(); - - SectionStats testCaseSectionStats(testCaseSection, assertions, duration, missingAssertions); - m_reporter->sectionEnded(testCaseSectionStats); - } - - void RunContext::invokeActiveTestCase() { - FatalConditionHandler fatalConditionHandler; // Handle signals - m_activeTestCase->invoke(); - fatalConditionHandler.reset(); - } - - void RunContext::handleUnfinishedSections() { - // If sections ended prematurely due to an exception we stored their - // infos here so we can tear them down outside the unwind process. - for (auto it = m_unfinishedSections.rbegin(), - itEnd = m_unfinishedSections.rend(); - it != itEnd; - ++it) - sectionEnded(*it); - m_unfinishedSections.clear(); - } - - void RunContext::handleExpr( - AssertionInfo const& info, - ITransientExpression const& expr, - AssertionReaction& reaction - ) { - m_reporter->assertionStarting( info ); - - bool negated = isFalseTest( info.resultDisposition ); - bool result = expr.getResult() != negated; - - if( result ) { - if (!m_includeSuccessfulResults) { - assertionPassed(); - } - else { - reportExpr(info, ResultWas::Ok, &expr, negated); - } - } - else { - reportExpr(info, ResultWas::ExpressionFailed, &expr, negated ); - populateReaction( reaction ); - } - } - void RunContext::reportExpr( - AssertionInfo const &info, - ResultWas::OfType resultType, - ITransientExpression const *expr, - bool negated ) { - - m_lastAssertionInfo = info; - AssertionResultData data( resultType, LazyExpression( negated ) ); - - AssertionResult assertionResult{ info, data }; - assertionResult.m_resultData.lazyExpression.m_transientExpression = expr; - - assertionEnded( assertionResult ); - } - - void RunContext::handleMessage( - AssertionInfo const& info, - ResultWas::OfType resultType, - StringRef const& message, - AssertionReaction& reaction - ) { - m_reporter->assertionStarting( info ); - - m_lastAssertionInfo = info; - - AssertionResultData data( resultType, LazyExpression( false ) ); - data.message = message; - AssertionResult assertionResult{ m_lastAssertionInfo, data }; - assertionEnded( assertionResult ); - if( !assertionResult.isOk() ) - populateReaction( reaction ); - } - void RunContext::handleUnexpectedExceptionNotThrown( - AssertionInfo const& info, - AssertionReaction& reaction - ) { - handleNonExpr(info, Catch::ResultWas::DidntThrowException, reaction); - } - - void RunContext::handleUnexpectedInflightException( - AssertionInfo const& info, - std::string const& message, - AssertionReaction& reaction - ) { - m_lastAssertionInfo = info; - - AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) ); - data.message = message; - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); - populateReaction( reaction ); - } - - void RunContext::populateReaction( AssertionReaction& reaction ) { - reaction.shouldDebugBreak = m_config->shouldDebugBreak(); - reaction.shouldThrow = aborting() || (m_lastAssertionInfo.resultDisposition & ResultDisposition::Normal); - } - - void RunContext::handleIncomplete( - AssertionInfo const& info - ) { - m_lastAssertionInfo = info; - - AssertionResultData data( ResultWas::ThrewException, LazyExpression( false ) ); - data.message = "Exception translation was disabled by CATCH_CONFIG_FAST_COMPILE"; - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); - } - void RunContext::handleNonExpr( - AssertionInfo const &info, - ResultWas::OfType resultType, - AssertionReaction &reaction - ) { - m_lastAssertionInfo = info; - - AssertionResultData data( resultType, LazyExpression( false ) ); - AssertionResult assertionResult{ info, data }; - assertionEnded( assertionResult ); - - if( !assertionResult.isOk() ) - populateReaction( reaction ); - } - - IResultCapture& getResultCapture() { - if (auto* capture = getCurrentContext().getResultCapture()) - return *capture; - else - CATCH_INTERNAL_ERROR("No result capture instance"); - } -} -// end catch_run_context.cpp -// start catch_section.cpp - -namespace Catch { - - Section::Section( SectionInfo const& info ) - : m_info( info ), - m_sectionIncluded( getResultCapture().sectionStarted( m_info, m_assertions ) ) - { - m_timer.start(); - } - - Section::~Section() { - if( m_sectionIncluded ) { - SectionEndInfo endInfo( m_info, m_assertions, m_timer.getElapsedSeconds() ); - if( uncaught_exceptions() ) - getResultCapture().sectionEndedEarly( endInfo ); - else - getResultCapture().sectionEnded( endInfo ); - } - } - - // This indicates whether the section should be executed or not - Section::operator bool() const { - return m_sectionIncluded; - } - -} // end namespace Catch -// end catch_section.cpp -// start catch_section_info.cpp - -namespace Catch { - - SectionInfo::SectionInfo - ( SourceLineInfo const& _lineInfo, - std::string const& _name, - std::string const& _description ) - : name( _name ), - description( _description ), - lineInfo( _lineInfo ) - {} - - SectionEndInfo::SectionEndInfo( SectionInfo const& _sectionInfo, Counts const& _prevAssertions, double _durationInSeconds ) - : sectionInfo( _sectionInfo ), prevAssertions( _prevAssertions ), durationInSeconds( _durationInSeconds ) - {} - -} // end namespace Catch -// end catch_section_info.cpp -// start catch_session.cpp - -// start catch_session.h - -#include - -namespace Catch { - - class Session : NonCopyable { - public: - - Session(); - ~Session() override; - - void showHelp() const; - void libIdentify(); - - int applyCommandLine( int argc, char* argv[] ); - - void useConfigData( ConfigData const& configData ); - - int run( int argc, char* argv[] ); - #if defined(WIN32) && defined(UNICODE) - int run( int argc, wchar_t* const argv[] ); - #endif - int run(); - - clara::Parser const& cli() const; - void cli( clara::Parser const& newParser ); - ConfigData& configData(); - Config& config(); - private: - int runInternal(); - - clara::Parser m_cli; - ConfigData m_configData; - std::shared_ptr m_config; - bool m_startupExceptions = false; - }; - -} // end namespace Catch - -// end catch_session.h -// start catch_version.h - -#include - -namespace Catch { - - // Versioning information - struct Version { - Version( Version const& ) = delete; - Version& operator=( Version const& ) = delete; - Version( unsigned int _majorVersion, - unsigned int _minorVersion, - unsigned int _patchNumber, - char const * const _branchName, - unsigned int _buildNumber ); - - unsigned int const majorVersion; - unsigned int const minorVersion; - unsigned int const patchNumber; - - // buildNumber is only used if branchName is not null - char const * const branchName; - unsigned int const buildNumber; - - friend std::ostream& operator << ( std::ostream& os, Version const& version ); - }; - - Version const& libraryVersion(); -} - -// end catch_version.h -#include -#include - -namespace Catch { - - namespace { - const int MaxExitCode = 255; - - IStreamingReporterPtr createReporter(std::string const& reporterName, IConfigPtr const& config) { - auto reporter = Catch::getRegistryHub().getReporterRegistry().create(reporterName, config); - CATCH_ENFORCE(reporter, "No reporter registered with name: '" << reporterName << "'"); - - return reporter; - } - -#ifndef CATCH_CONFIG_DEFAULT_REPORTER -#define CATCH_CONFIG_DEFAULT_REPORTER "console" -#endif - - IStreamingReporterPtr makeReporter(std::shared_ptr const& config) { - auto const& reporterNames = config->getReporterNames(); - if (reporterNames.empty()) - return createReporter(CATCH_CONFIG_DEFAULT_REPORTER, config); - - IStreamingReporterPtr reporter; - for (auto const& name : reporterNames) - addReporter(reporter, createReporter(name, config)); - return reporter; - } - -#undef CATCH_CONFIG_DEFAULT_REPORTER - - void addListeners(IStreamingReporterPtr& reporters, IConfigPtr const& config) { - auto const& listeners = Catch::getRegistryHub().getReporterRegistry().getListeners(); - for (auto const& listener : listeners) - addReporter(reporters, listener->create(Catch::ReporterConfig(config))); - } - - Catch::Totals runTests(std::shared_ptr const& config) { - IStreamingReporterPtr reporter = makeReporter(config); - addListeners(reporter, config); - - RunContext context(config, std::move(reporter)); - - Totals totals; - - context.testGroupStarting(config->name(), 1, 1); - - TestSpec testSpec = config->testSpec(); - if (!testSpec.hasFilters()) - testSpec = TestSpecParser(ITagAliasRegistry::get()).parse("~[.]").testSpec(); // All not hidden tests - - auto const& allTestCases = getAllTestCasesSorted(*config); - for (auto const& testCase : allTestCases) { - if (!context.aborting() && matchTest(testCase, testSpec, *config)) - totals += context.runTest(testCase); - else - context.reporter().skipTest(testCase); - } - - context.testGroupEnded(config->name(), totals, 1, 1); - return totals; - } - - void applyFilenamesAsTags(Catch::IConfig const& config) { - auto& tests = const_cast&>(getAllTestCasesSorted(config)); - for (auto& testCase : tests) { - auto tags = testCase.tags; - - std::string filename = testCase.lineInfo.file; - auto lastSlash = filename.find_last_of("\\/"); - if (lastSlash != std::string::npos) { - filename.erase(0, lastSlash); - filename[0] = '#'; - } - - auto lastDot = filename.find_last_of('.'); - if (lastDot != std::string::npos) { - filename.erase(lastDot); - } - - tags.push_back(std::move(filename)); - setTags(testCase, tags); - } - } - - } // anon namespace - - Session::Session() { - static bool alreadyInstantiated = false; - if( alreadyInstantiated ) { - try { CATCH_INTERNAL_ERROR( "Only one instance of Catch::Session can ever be used" ); } - catch(...) { getMutableRegistryHub().registerStartupException(); } - } - - const auto& exceptions = getRegistryHub().getStartupExceptionRegistry().getExceptions(); - if ( !exceptions.empty() ) { - m_startupExceptions = true; - Colour colourGuard( Colour::Red ); - Catch::cerr() << "Errors occured during startup!" << '\n'; - // iterate over all exceptions and notify user - for ( const auto& ex_ptr : exceptions ) { - try { - std::rethrow_exception(ex_ptr); - } catch ( std::exception const& ex ) { - Catch::cerr() << Column( ex.what() ).indent(2) << '\n'; - } - } - } - - alreadyInstantiated = true; - m_cli = makeCommandLineParser( m_configData ); - } - Session::~Session() { - Catch::cleanUp(); - } - - void Session::showHelp() const { - Catch::cout() - << "\nCatch v" << libraryVersion() << "\n" - << m_cli << std::endl - << "For more detailed usage please see the project docs\n" << std::endl; - } - void Session::libIdentify() { - Catch::cout() - << std::left << std::setw(16) << "description: " << "A Catch test executable\n" - << std::left << std::setw(16) << "category: " << "testframework\n" - << std::left << std::setw(16) << "framework: " << "Catch Test\n" - << std::left << std::setw(16) << "version: " << libraryVersion() << std::endl; - } - - int Session::applyCommandLine( int argc, char* argv[] ) { - if( m_startupExceptions ) - return 1; - - auto result = m_cli.parse( clara::Args( argc, argv ) ); - if( !result ) { - Catch::cerr() - << Colour( Colour::Red ) - << "\nError(s) in input:\n" - << Column( result.errorMessage() ).indent( 2 ) - << "\n\n"; - Catch::cerr() << "Run with -? for usage\n" << std::endl; - return MaxExitCode; - } - - if( m_configData.showHelp ) - showHelp(); - if( m_configData.libIdentify ) - libIdentify(); - m_config.reset(); - return 0; - } - - void Session::useConfigData( ConfigData const& configData ) { - m_configData = configData; - m_config.reset(); - } - - int Session::run( int argc, char* argv[] ) { - if( m_startupExceptions ) - return 1; - int returnCode = applyCommandLine( argc, argv ); - if( returnCode == 0 ) - returnCode = run(); - return returnCode; - } - -#if defined(WIN32) && defined(UNICODE) - int Session::run( int argc, wchar_t* const argv[] ) { - - char **utf8Argv = new char *[ argc ]; - - for ( int i = 0; i < argc; ++i ) { - int bufSize = WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, NULL, 0, NULL, NULL ); - - utf8Argv[ i ] = new char[ bufSize ]; - - WideCharToMultiByte( CP_UTF8, 0, argv[i], -1, utf8Argv[i], bufSize, NULL, NULL ); - } - - int returnCode = run( argc, utf8Argv ); - - for ( int i = 0; i < argc; ++i ) - delete [] utf8Argv[ i ]; - - delete [] utf8Argv; - - return returnCode; - } -#endif - int Session::run() { - if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeStart ) != 0 ) { - Catch::cout() << "...waiting for enter/ return before starting" << std::endl; - static_cast(std::getchar()); - } - int exitCode = runInternal(); - if( ( m_configData.waitForKeypress & WaitForKeypress::BeforeExit ) != 0 ) { - Catch::cout() << "...waiting for enter/ return before exiting, with code: " << exitCode << std::endl; - static_cast(std::getchar()); - } - return exitCode; - } - - clara::Parser const& Session::cli() const { - return m_cli; - } - void Session::cli( clara::Parser const& newParser ) { - m_cli = newParser; - } - ConfigData& Session::configData() { - return m_configData; - } - Config& Session::config() { - if( !m_config ) - m_config = std::make_shared( m_configData ); - return *m_config; - } - - int Session::runInternal() { - if( m_startupExceptions ) - return 1; - - if( m_configData.showHelp || m_configData.libIdentify ) - return 0; - - try - { - config(); // Force config to be constructed - - seedRng( *m_config ); - - if( m_configData.filenamesAsTags ) - applyFilenamesAsTags( *m_config ); - - // Handle list request - if( Option listed = list( config() ) ) - return static_cast( *listed ); - - // Note that on unices only the lower 8 bits are usually used, clamping - // the return value to 255 prevents false negative when some multiple - // of 256 tests has failed - return (std::min)( MaxExitCode, static_cast( runTests( m_config ).assertions.failed ) ); - } - catch( std::exception& ex ) { - Catch::cerr() << ex.what() << std::endl; - return MaxExitCode; - } - } - -} // end namespace Catch -// end catch_session.cpp -// start catch_startup_exception_registry.cpp - -namespace Catch { - void StartupExceptionRegistry::add( std::exception_ptr const& exception ) noexcept { - try { - m_exceptions.push_back(exception); - } - catch(...) { - // If we run out of memory during start-up there's really not a lot more we can do about it - std::terminate(); - } - } - - std::vector const& StartupExceptionRegistry::getExceptions() const noexcept { - return m_exceptions; - } - -} // end namespace Catch -// end catch_startup_exception_registry.cpp -// start catch_stream.cpp - -#include -#include -#include -#include -#include -#include - -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wexit-time-destructors" -#endif - -namespace Catch { - - Catch::IStream::~IStream() = default; - - namespace detail { namespace { - template - class StreamBufImpl : public std::streambuf { - char data[bufferSize]; - WriterF m_writer; - - public: - StreamBufImpl() { - setp( data, data + sizeof(data) ); - } - - ~StreamBufImpl() noexcept { - StreamBufImpl::sync(); - } - - private: - int overflow( int c ) override { - sync(); - - if( c != EOF ) { - if( pbase() == epptr() ) - m_writer( std::string( 1, static_cast( c ) ) ); - else - sputc( static_cast( c ) ); - } - return 0; - } - - int sync() override { - if( pbase() != pptr() ) { - m_writer( std::string( pbase(), static_cast( pptr() - pbase() ) ) ); - setp( pbase(), epptr() ); - } - return 0; - } - }; - - /////////////////////////////////////////////////////////////////////////// - - struct OutputDebugWriter { - - void operator()( std::string const&str ) { - writeToDebugConsole( str ); - } - }; - - /////////////////////////////////////////////////////////////////////////// - - class FileStream : public IStream { - mutable std::ofstream m_ofs; - public: - FileStream( StringRef filename ) { - m_ofs.open( filename.c_str() ); - CATCH_ENFORCE( !m_ofs.fail(), "Unable to open file: '" << filename << "'" ); - } - ~FileStream() override = default; - public: // IStream - std::ostream& stream() const override { - return m_ofs; - } - }; - - /////////////////////////////////////////////////////////////////////////// - - class CoutStream : public IStream { - mutable std::ostream m_os; - public: - // Store the streambuf from cout up-front because - // cout may get redirected when running tests - CoutStream() : m_os( Catch::cout().rdbuf() ) {} - ~CoutStream() override = default; - - public: // IStream - std::ostream& stream() const override { return m_os; } - }; - - /////////////////////////////////////////////////////////////////////////// - - class DebugOutStream : public IStream { - std::unique_ptr> m_streamBuf; - mutable std::ostream m_os; - public: - DebugOutStream() - : m_streamBuf( new StreamBufImpl() ), - m_os( m_streamBuf.get() ) - {} - - ~DebugOutStream() override = default; - - public: // IStream - std::ostream& stream() const override { return m_os; } - }; - - }} // namespace anon::detail - - /////////////////////////////////////////////////////////////////////////// - - auto makeStream( StringRef const &filename ) -> IStream const* { - if( filename.empty() ) - return new detail::CoutStream(); - else if( filename[0] == '%' ) { - if( filename == "%debug" ) - return new detail::DebugOutStream(); - else - CATCH_ERROR( "Unrecognised stream: '" << filename << "'" ); - } - else - return new detail::FileStream( filename ); - } - - // This class encapsulates the idea of a pool of ostringstreams that can be reused. - struct StringStreams { - std::vector> m_streams; - std::vector m_unused; - std::ostringstream m_referenceStream; // Used for copy state/ flags from - static StringStreams* s_instance; - - auto add() -> std::size_t { - if( m_unused.empty() ) { - m_streams.push_back( std::unique_ptr( new std::ostringstream ) ); - return m_streams.size()-1; - } - else { - auto index = m_unused.back(); - m_unused.pop_back(); - return index; - } - } - - void release( std::size_t index ) { - m_streams[index]->copyfmt( m_referenceStream ); // Restore initial flags and other state - m_unused.push_back(index); - } - - // !TBD: put in TLS - static auto instance() -> StringStreams& { - if( !s_instance ) - s_instance = new StringStreams(); - return *s_instance; - } - static void cleanup() { - delete s_instance; - s_instance = nullptr; - } - }; - - StringStreams* StringStreams::s_instance = nullptr; - - void ReusableStringStream::cleanup() { - StringStreams::cleanup(); - } - - ReusableStringStream::ReusableStringStream() - : m_index( StringStreams::instance().add() ), - m_oss( StringStreams::instance().m_streams[m_index].get() ) - {} - - ReusableStringStream::~ReusableStringStream() { - static_cast( m_oss )->str(""); - m_oss->clear(); - StringStreams::instance().release( m_index ); - } - - auto ReusableStringStream::str() const -> std::string { - return static_cast( m_oss )->str(); - } - - /////////////////////////////////////////////////////////////////////////// - -#ifndef CATCH_CONFIG_NOSTDOUT // If you #define this you must implement these functions - std::ostream& cout() { return std::cout; } - std::ostream& cerr() { return std::cerr; } - std::ostream& clog() { return std::clog; } -#endif -} - -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -// end catch_stream.cpp -// start catch_string_manip.cpp - -#include -#include -#include -#include - -namespace Catch { - - bool startsWith( std::string const& s, std::string const& prefix ) { - return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin()); - } - bool startsWith( std::string const& s, char prefix ) { - return !s.empty() && s[0] == prefix; - } - bool endsWith( std::string const& s, std::string const& suffix ) { - return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin()); - } - bool endsWith( std::string const& s, char suffix ) { - return !s.empty() && s[s.size()-1] == suffix; - } - bool contains( std::string const& s, std::string const& infix ) { - return s.find( infix ) != std::string::npos; - } - char toLowerCh(char c) { - return static_cast( std::tolower( c ) ); - } - void toLowerInPlace( std::string& s ) { - std::transform( s.begin(), s.end(), s.begin(), toLowerCh ); - } - std::string toLower( std::string const& s ) { - std::string lc = s; - toLowerInPlace( lc ); - return lc; - } - std::string trim( std::string const& str ) { - static char const* whitespaceChars = "\n\r\t "; - std::string::size_type start = str.find_first_not_of( whitespaceChars ); - std::string::size_type end = str.find_last_not_of( whitespaceChars ); - - return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string(); - } - - bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) { - bool replaced = false; - std::size_t i = str.find( replaceThis ); - while( i != std::string::npos ) { - replaced = true; - str = str.substr( 0, i ) + withThis + str.substr( i+replaceThis.size() ); - if( i < str.size()-withThis.size() ) - i = str.find( replaceThis, i+withThis.size() ); - else - i = std::string::npos; - } - return replaced; - } - - pluralise::pluralise( std::size_t count, std::string const& label ) - : m_count( count ), - m_label( label ) - {} - - std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) { - os << pluraliser.m_count << ' ' << pluraliser.m_label; - if( pluraliser.m_count != 1 ) - os << 's'; - return os; - } - -} -// end catch_string_manip.cpp -// start catch_stringref.cpp - -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wexit-time-destructors" -#endif - -#include -#include -#include - -namespace { - const uint32_t byte_2_lead = 0xC0; - const uint32_t byte_3_lead = 0xE0; - const uint32_t byte_4_lead = 0xF0; -} - -namespace Catch { - StringRef::StringRef( char const* rawChars ) noexcept - : StringRef( rawChars, static_cast(std::strlen(rawChars) ) ) - {} - - StringRef::operator std::string() const { - return std::string( m_start, m_size ); - } - - void StringRef::swap( StringRef& other ) noexcept { - std::swap( m_start, other.m_start ); - std::swap( m_size, other.m_size ); - std::swap( m_data, other.m_data ); - } - - auto StringRef::c_str() const -> char const* { - if( isSubstring() ) - const_cast( this )->takeOwnership(); - return m_start; - } - auto StringRef::data() const noexcept -> char const* { - return m_start; - } - - auto StringRef::isOwned() const noexcept -> bool { - return m_data != nullptr; - } - auto StringRef::isSubstring() const noexcept -> bool { - return m_start[m_size] != '\0'; - } - - void StringRef::takeOwnership() { - if( !isOwned() ) { - m_data = new char[m_size+1]; - memcpy( m_data, m_start, m_size ); - m_data[m_size] = '\0'; - m_start = m_data; - } - } - auto StringRef::substr( size_type start, size_type size ) const noexcept -> StringRef { - if( start < m_size ) - return StringRef( m_start+start, size ); - else - return StringRef(); - } - auto StringRef::operator == ( StringRef const& other ) const noexcept -> bool { - return - size() == other.size() && - (std::strncmp( m_start, other.m_start, size() ) == 0); - } - auto StringRef::operator != ( StringRef const& other ) const noexcept -> bool { - return !operator==( other ); - } - - auto StringRef::operator[](size_type index) const noexcept -> char { - return m_start[index]; - } - - auto StringRef::numberOfCharacters() const noexcept -> size_type { - size_type noChars = m_size; - // Make adjustments for uft encodings - for( size_type i=0; i < m_size; ++i ) { - char c = m_start[i]; - if( ( c & byte_2_lead ) == byte_2_lead ) { - noChars--; - if (( c & byte_3_lead ) == byte_3_lead ) - noChars--; - if( ( c & byte_4_lead ) == byte_4_lead ) - noChars--; - } - } - return noChars; - } - - auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string { - std::string str; - str.reserve( lhs.size() + rhs.size() ); - str += lhs; - str += rhs; - return str; - } - auto operator + ( StringRef const& lhs, const char* rhs ) -> std::string { - return std::string( lhs ) + std::string( rhs ); - } - auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string { - return std::string( lhs ) + std::string( rhs ); - } - - auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& { - return os << str.c_str(); - } - -} // namespace Catch - -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -// end catch_stringref.cpp -// start catch_tag_alias.cpp - -namespace Catch { - TagAlias::TagAlias(std::string const & _tag, SourceLineInfo _lineInfo): tag(_tag), lineInfo(_lineInfo) {} -} -// end catch_tag_alias.cpp -// start catch_tag_alias_autoregistrar.cpp - -namespace Catch { - - RegistrarForTagAliases::RegistrarForTagAliases(char const* alias, char const* tag, SourceLineInfo const& lineInfo) { - try { - getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo); - } catch (...) { - // Do not throw when constructing global objects, instead register the exception to be processed later - getMutableRegistryHub().registerStartupException(); - } - } - -} -// end catch_tag_alias_autoregistrar.cpp -// start catch_tag_alias_registry.cpp - -#include - -namespace Catch { - - TagAliasRegistry::~TagAliasRegistry() {} - - TagAlias const* TagAliasRegistry::find( std::string const& alias ) const { - auto it = m_registry.find( alias ); - if( it != m_registry.end() ) - return &(it->second); - else - return nullptr; - } - - std::string TagAliasRegistry::expandAliases( std::string const& unexpandedTestSpec ) const { - std::string expandedTestSpec = unexpandedTestSpec; - for( auto const& registryKvp : m_registry ) { - std::size_t pos = expandedTestSpec.find( registryKvp.first ); - if( pos != std::string::npos ) { - expandedTestSpec = expandedTestSpec.substr( 0, pos ) + - registryKvp.second.tag + - expandedTestSpec.substr( pos + registryKvp.first.size() ); - } - } - return expandedTestSpec; - } - - void TagAliasRegistry::add( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) { - CATCH_ENFORCE( startsWith(alias, "[@") && endsWith(alias, ']'), - "error: tag alias, '" << alias << "' is not of the form [@alias name].\n" << lineInfo ); - - CATCH_ENFORCE( m_registry.insert(std::make_pair(alias, TagAlias(tag, lineInfo))).second, - "error: tag alias, '" << alias << "' already registered.\n" - << "\tFirst seen at: " << find(alias)->lineInfo << "\n" - << "\tRedefined at: " << lineInfo ); - } - - ITagAliasRegistry::~ITagAliasRegistry() {} - - ITagAliasRegistry const& ITagAliasRegistry::get() { - return getRegistryHub().getTagAliasRegistry(); - } - -} // end namespace Catch -// end catch_tag_alias_registry.cpp -// start catch_test_case_info.cpp - -#include -#include -#include -#include - -namespace Catch { - - TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) { - if( startsWith( tag, '.' ) || - tag == "!hide" ) - return TestCaseInfo::IsHidden; - else if( tag == "!throws" ) - return TestCaseInfo::Throws; - else if( tag == "!shouldfail" ) - return TestCaseInfo::ShouldFail; - else if( tag == "!mayfail" ) - return TestCaseInfo::MayFail; - else if( tag == "!nonportable" ) - return TestCaseInfo::NonPortable; - else if( tag == "!benchmark" ) - return static_cast( TestCaseInfo::Benchmark | TestCaseInfo::IsHidden ); - else - return TestCaseInfo::None; - } - bool isReservedTag( std::string const& tag ) { - return parseSpecialTag( tag ) == TestCaseInfo::None && tag.size() > 0 && !std::isalnum( tag[0] ); - } - void enforceNotReservedTag( std::string const& tag, SourceLineInfo const& _lineInfo ) { - CATCH_ENFORCE( !isReservedTag(tag), - "Tag name: [" << tag << "] is not allowed.\n" - << "Tag names starting with non alpha-numeric characters are reserved\n" - << _lineInfo ); - } - - TestCase makeTestCase( ITestInvoker* _testCase, - std::string const& _className, - std::string const& _name, - std::string const& _descOrTags, - SourceLineInfo const& _lineInfo ) - { - bool isHidden = false; - - // Parse out tags - std::vector tags; - std::string desc, tag; - bool inTag = false; - for (char c : _descOrTags) { - if( !inTag ) { - if( c == '[' ) - inTag = true; - else - desc += c; - } - else { - if( c == ']' ) { - TestCaseInfo::SpecialProperties prop = parseSpecialTag( tag ); - if( ( prop & TestCaseInfo::IsHidden ) != 0 ) - isHidden = true; - else if( prop == TestCaseInfo::None ) - enforceNotReservedTag( tag, _lineInfo ); - - tags.push_back( tag ); - tag.clear(); - inTag = false; - } - else - tag += c; - } - } - if( isHidden ) { - tags.push_back( "." ); - } - - TestCaseInfo info( _name, _className, desc, tags, _lineInfo ); - return TestCase( _testCase, info ); - } - - void setTags( TestCaseInfo& testCaseInfo, std::vector tags ) { - std::sort(begin(tags), end(tags)); - tags.erase(std::unique(begin(tags), end(tags)), end(tags)); - testCaseInfo.lcaseTags.clear(); - - for( auto const& tag : tags ) { - std::string lcaseTag = toLower( tag ); - testCaseInfo.properties = static_cast( testCaseInfo.properties | parseSpecialTag( lcaseTag ) ); - testCaseInfo.lcaseTags.push_back( lcaseTag ); - } - testCaseInfo.tags = std::move(tags); - } - - TestCaseInfo::TestCaseInfo( std::string const& _name, - std::string const& _className, - std::string const& _description, - std::vector const& _tags, - SourceLineInfo const& _lineInfo ) - : name( _name ), - className( _className ), - description( _description ), - lineInfo( _lineInfo ), - properties( None ) - { - setTags( *this, _tags ); - } - - bool TestCaseInfo::isHidden() const { - return ( properties & IsHidden ) != 0; - } - bool TestCaseInfo::throws() const { - return ( properties & Throws ) != 0; - } - bool TestCaseInfo::okToFail() const { - return ( properties & (ShouldFail | MayFail ) ) != 0; - } - bool TestCaseInfo::expectedToFail() const { - return ( properties & (ShouldFail ) ) != 0; - } - - std::string TestCaseInfo::tagsAsString() const { - std::string ret; - // '[' and ']' per tag - std::size_t full_size = 2 * tags.size(); - for (const auto& tag : tags) { - full_size += tag.size(); - } - ret.reserve(full_size); - for (const auto& tag : tags) { - ret.push_back('['); - ret.append(tag); - ret.push_back(']'); - } - - return ret; - } - - TestCase::TestCase( ITestInvoker* testCase, TestCaseInfo const& info ) : TestCaseInfo( info ), test( testCase ) {} - - TestCase TestCase::withName( std::string const& _newName ) const { - TestCase other( *this ); - other.name = _newName; - return other; - } - - void TestCase::invoke() const { - test->invoke(); - } - - bool TestCase::operator == ( TestCase const& other ) const { - return test.get() == other.test.get() && - name == other.name && - className == other.className; - } - - bool TestCase::operator < ( TestCase const& other ) const { - return name < other.name; - } - - TestCaseInfo const& TestCase::getTestCaseInfo() const - { - return *this; - } - -} // end namespace Catch -// end catch_test_case_info.cpp -// start catch_test_case_registry_impl.cpp - -#include - -namespace Catch { - - std::vector sortTests( IConfig const& config, std::vector const& unsortedTestCases ) { - - std::vector sorted = unsortedTestCases; - - switch( config.runOrder() ) { - case RunTests::InLexicographicalOrder: - std::sort( sorted.begin(), sorted.end() ); - break; - case RunTests::InRandomOrder: - seedRng( config ); - RandomNumberGenerator::shuffle( sorted ); - break; - case RunTests::InDeclarationOrder: - // already in declaration order - break; - } - return sorted; - } - bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ) { - return testSpec.matches( testCase ) && ( config.allowThrows() || !testCase.throws() ); - } - - void enforceNoDuplicateTestCases( std::vector const& functions ) { - std::set seenFunctions; - for( auto const& function : functions ) { - auto prev = seenFunctions.insert( function ); - CATCH_ENFORCE( prev.second, - "error: TEST_CASE( \"" << function.name << "\" ) already defined.\n" - << "\tFirst seen at " << prev.first->getTestCaseInfo().lineInfo << "\n" - << "\tRedefined at " << function.getTestCaseInfo().lineInfo ); - } - } - - std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ) { - std::vector filtered; - filtered.reserve( testCases.size() ); - for( auto const& testCase : testCases ) - if( matchTest( testCase, testSpec, config ) ) - filtered.push_back( testCase ); - return filtered; - } - std::vector const& getAllTestCasesSorted( IConfig const& config ) { - return getRegistryHub().getTestCaseRegistry().getAllTestsSorted( config ); - } - - void TestRegistry::registerTest( TestCase const& testCase ) { - std::string name = testCase.getTestCaseInfo().name; - if( name.empty() ) { - ReusableStringStream rss; - rss << "Anonymous test case " << ++m_unnamedCount; - return registerTest( testCase.withName( rss.str() ) ); - } - m_functions.push_back( testCase ); - } - - std::vector const& TestRegistry::getAllTests() const { - return m_functions; - } - std::vector const& TestRegistry::getAllTestsSorted( IConfig const& config ) const { - if( m_sortedFunctions.empty() ) - enforceNoDuplicateTestCases( m_functions ); - - if( m_currentSortOrder != config.runOrder() || m_sortedFunctions.empty() ) { - m_sortedFunctions = sortTests( config, m_functions ); - m_currentSortOrder = config.runOrder(); - } - return m_sortedFunctions; - } - - /////////////////////////////////////////////////////////////////////////// - TestInvokerAsFunction::TestInvokerAsFunction( void(*testAsFunction)() ) noexcept : m_testAsFunction( testAsFunction ) {} - - void TestInvokerAsFunction::invoke() const { - m_testAsFunction(); - } - - std::string extractClassName( std::string const& classOrQualifiedMethodName ) { - std::string className = classOrQualifiedMethodName; - if( startsWith( className, '&' ) ) - { - std::size_t lastColons = className.rfind( "::" ); - std::size_t penultimateColons = className.rfind( "::", lastColons-1 ); - if( penultimateColons == std::string::npos ) - penultimateColons = 1; - className = className.substr( penultimateColons, lastColons-penultimateColons ); - } - return className; - } - -} // end namespace Catch -// end catch_test_case_registry_impl.cpp -// start catch_test_case_tracker.cpp - -#include -#include -#include -#include -#include - -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wexit-time-destructors" -#endif - -namespace Catch { -namespace TestCaseTracking { - - NameAndLocation::NameAndLocation( std::string const& _name, SourceLineInfo const& _location ) - : name( _name ), - location( _location ) - {} - - ITracker::~ITracker() = default; - - TrackerContext& TrackerContext::instance() { - static TrackerContext s_instance; - return s_instance; - } - - ITracker& TrackerContext::startRun() { - m_rootTracker = std::make_shared( NameAndLocation( "{root}", CATCH_INTERNAL_LINEINFO ), *this, nullptr ); - m_currentTracker = nullptr; - m_runState = Executing; - return *m_rootTracker; - } - - void TrackerContext::endRun() { - m_rootTracker.reset(); - m_currentTracker = nullptr; - m_runState = NotStarted; - } - - void TrackerContext::startCycle() { - m_currentTracker = m_rootTracker.get(); - m_runState = Executing; - } - void TrackerContext::completeCycle() { - m_runState = CompletedCycle; - } - - bool TrackerContext::completedCycle() const { - return m_runState == CompletedCycle; - } - ITracker& TrackerContext::currentTracker() { - return *m_currentTracker; - } - void TrackerContext::setCurrentTracker( ITracker* tracker ) { - m_currentTracker = tracker; - } - - TrackerBase::TrackerHasName::TrackerHasName( NameAndLocation const& nameAndLocation ) : m_nameAndLocation( nameAndLocation ) {} - bool TrackerBase::TrackerHasName::operator ()( ITrackerPtr const& tracker ) const { - return - tracker->nameAndLocation().name == m_nameAndLocation.name && - tracker->nameAndLocation().location == m_nameAndLocation.location; - } - - TrackerBase::TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : m_nameAndLocation( nameAndLocation ), - m_ctx( ctx ), - m_parent( parent ) - {} - - NameAndLocation const& TrackerBase::nameAndLocation() const { - return m_nameAndLocation; - } - bool TrackerBase::isComplete() const { - return m_runState == CompletedSuccessfully || m_runState == Failed; - } - bool TrackerBase::isSuccessfullyCompleted() const { - return m_runState == CompletedSuccessfully; - } - bool TrackerBase::isOpen() const { - return m_runState != NotStarted && !isComplete(); - } - bool TrackerBase::hasChildren() const { - return !m_children.empty(); - } - - void TrackerBase::addChild( ITrackerPtr const& child ) { - m_children.push_back( child ); - } - - ITrackerPtr TrackerBase::findChild( NameAndLocation const& nameAndLocation ) { - auto it = std::find_if( m_children.begin(), m_children.end(), TrackerHasName( nameAndLocation ) ); - return( it != m_children.end() ) - ? *it - : nullptr; - } - ITracker& TrackerBase::parent() { - assert( m_parent ); // Should always be non-null except for root - return *m_parent; - } - - void TrackerBase::openChild() { - if( m_runState != ExecutingChildren ) { - m_runState = ExecutingChildren; - if( m_parent ) - m_parent->openChild(); - } - } - - bool TrackerBase::isSectionTracker() const { return false; } - bool TrackerBase::isIndexTracker() const { return false; } - - void TrackerBase::open() { - m_runState = Executing; - moveToThis(); - if( m_parent ) - m_parent->openChild(); - } - - void TrackerBase::close() { - - // Close any still open children (e.g. generators) - while( &m_ctx.currentTracker() != this ) - m_ctx.currentTracker().close(); - - switch( m_runState ) { - case NeedsAnotherRun: - break; - - case Executing: - m_runState = CompletedSuccessfully; - break; - case ExecutingChildren: - if( m_children.empty() || m_children.back()->isComplete() ) - m_runState = CompletedSuccessfully; - break; - - case NotStarted: - case CompletedSuccessfully: - case Failed: - CATCH_INTERNAL_ERROR( "Illogical state: " << m_runState ); - - default: - CATCH_INTERNAL_ERROR( "Unknown state: " << m_runState ); - } - moveToParent(); - m_ctx.completeCycle(); - } - void TrackerBase::fail() { - m_runState = Failed; - if( m_parent ) - m_parent->markAsNeedingAnotherRun(); - moveToParent(); - m_ctx.completeCycle(); - } - void TrackerBase::markAsNeedingAnotherRun() { - m_runState = NeedsAnotherRun; - } - - void TrackerBase::moveToParent() { - assert( m_parent ); - m_ctx.setCurrentTracker( m_parent ); - } - void TrackerBase::moveToThis() { - m_ctx.setCurrentTracker( this ); - } - - SectionTracker::SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) - : TrackerBase( nameAndLocation, ctx, parent ) - { - if( parent ) { - while( !parent->isSectionTracker() ) - parent = &parent->parent(); - - SectionTracker& parentSection = static_cast( *parent ); - addNextFilters( parentSection.m_filters ); - } - } - - bool SectionTracker::isSectionTracker() const { return true; } - - SectionTracker& SectionTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) { - std::shared_ptr section; - - ITracker& currentTracker = ctx.currentTracker(); - if( ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { - assert( childTracker ); - assert( childTracker->isSectionTracker() ); - section = std::static_pointer_cast( childTracker ); - } - else { - section = std::make_shared( nameAndLocation, ctx, ¤tTracker ); - currentTracker.addChild( section ); - } - if( !ctx.completedCycle() ) - section->tryOpen(); - return *section; - } - - void SectionTracker::tryOpen() { - if( !isComplete() && (m_filters.empty() || m_filters[0].empty() || m_filters[0] == m_nameAndLocation.name ) ) - open(); - } - - void SectionTracker::addInitialFilters( std::vector const& filters ) { - if( !filters.empty() ) { - m_filters.push_back(""); // Root - should never be consulted - m_filters.push_back(""); // Test Case - not a section filter - m_filters.insert( m_filters.end(), filters.begin(), filters.end() ); - } - } - void SectionTracker::addNextFilters( std::vector const& filters ) { - if( filters.size() > 1 ) - m_filters.insert( m_filters.end(), ++filters.begin(), filters.end() ); - } - - IndexTracker::IndexTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent, int size ) - : TrackerBase( nameAndLocation, ctx, parent ), - m_size( size ) - {} - - bool IndexTracker::isIndexTracker() const { return true; } - - IndexTracker& IndexTracker::acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation, int size ) { - std::shared_ptr tracker; - - ITracker& currentTracker = ctx.currentTracker(); - if( ITrackerPtr childTracker = currentTracker.findChild( nameAndLocation ) ) { - assert( childTracker ); - assert( childTracker->isIndexTracker() ); - tracker = std::static_pointer_cast( childTracker ); - } - else { - tracker = std::make_shared( nameAndLocation, ctx, ¤tTracker, size ); - currentTracker.addChild( tracker ); - } - - if( !ctx.completedCycle() && !tracker->isComplete() ) { - if( tracker->m_runState != ExecutingChildren && tracker->m_runState != NeedsAnotherRun ) - tracker->moveNext(); - tracker->open(); - } - - return *tracker; - } - - int IndexTracker::index() const { return m_index; } - - void IndexTracker::moveNext() { - m_index++; - m_children.clear(); - } - - void IndexTracker::close() { - TrackerBase::close(); - if( m_runState == CompletedSuccessfully && m_index < m_size-1 ) - m_runState = Executing; - } - -} // namespace TestCaseTracking - -using TestCaseTracking::ITracker; -using TestCaseTracking::TrackerContext; -using TestCaseTracking::SectionTracker; -using TestCaseTracking::IndexTracker; - -} // namespace Catch - -#if defined(__clang__) -# pragma clang diagnostic pop -#endif -// end catch_test_case_tracker.cpp -// start catch_test_registry.cpp - -namespace Catch { - - auto makeTestInvoker( void(*testAsFunction)() ) noexcept -> ITestInvoker* { - return new(std::nothrow) TestInvokerAsFunction( testAsFunction ); - } - - NameAndTags::NameAndTags( StringRef name_ , StringRef tags_ ) noexcept : name( name_ ), tags( tags_ ) {} - - AutoReg::AutoReg( ITestInvoker* invoker, SourceLineInfo const& lineInfo, StringRef classOrMethod, NameAndTags const& nameAndTags ) noexcept { - try { - getMutableRegistryHub() - .registerTest( - makeTestCase( - invoker, - extractClassName( classOrMethod ), - nameAndTags.name, - nameAndTags.tags, - lineInfo)); - } catch (...) { - // Do not throw when constructing global objects, instead register the exception to be processed later - getMutableRegistryHub().registerStartupException(); - } - } - - AutoReg::~AutoReg() = default; -} -// end catch_test_registry.cpp -// start catch_test_spec.cpp - -#include -#include -#include -#include - -namespace Catch { - - TestSpec::Pattern::~Pattern() = default; - TestSpec::NamePattern::~NamePattern() = default; - TestSpec::TagPattern::~TagPattern() = default; - TestSpec::ExcludedPattern::~ExcludedPattern() = default; - - TestSpec::NamePattern::NamePattern( std::string const& name ) - : m_wildcardPattern( toLower( name ), CaseSensitive::No ) - {} - bool TestSpec::NamePattern::matches( TestCaseInfo const& testCase ) const { - return m_wildcardPattern.matches( toLower( testCase.name ) ); - } - - TestSpec::TagPattern::TagPattern( std::string const& tag ) : m_tag( toLower( tag ) ) {} - bool TestSpec::TagPattern::matches( TestCaseInfo const& testCase ) const { - return std::find(begin(testCase.lcaseTags), - end(testCase.lcaseTags), - m_tag) != end(testCase.lcaseTags); - } - - TestSpec::ExcludedPattern::ExcludedPattern( PatternPtr const& underlyingPattern ) : m_underlyingPattern( underlyingPattern ) {} - bool TestSpec::ExcludedPattern::matches( TestCaseInfo const& testCase ) const { return !m_underlyingPattern->matches( testCase ); } - - bool TestSpec::Filter::matches( TestCaseInfo const& testCase ) const { - // All patterns in a filter must match for the filter to be a match - for( auto const& pattern : m_patterns ) { - if( !pattern->matches( testCase ) ) - return false; - } - return true; - } - - bool TestSpec::hasFilters() const { - return !m_filters.empty(); - } - bool TestSpec::matches( TestCaseInfo const& testCase ) const { - // A TestSpec matches if any filter matches - for( auto const& filter : m_filters ) - if( filter.matches( testCase ) ) - return true; - return false; - } -} -// end catch_test_spec.cpp -// start catch_test_spec_parser.cpp - -namespace Catch { - - TestSpecParser::TestSpecParser( ITagAliasRegistry const& tagAliases ) : m_tagAliases( &tagAliases ) {} - - TestSpecParser& TestSpecParser::parse( std::string const& arg ) { - m_mode = None; - m_exclusion = false; - m_start = std::string::npos; - m_arg = m_tagAliases->expandAliases( arg ); - m_escapeChars.clear(); - for( m_pos = 0; m_pos < m_arg.size(); ++m_pos ) - visitChar( m_arg[m_pos] ); - if( m_mode == Name ) - addPattern(); - return *this; - } - TestSpec TestSpecParser::testSpec() { - addFilter(); - return m_testSpec; - } - - void TestSpecParser::visitChar( char c ) { - if( m_mode == None ) { - switch( c ) { - case ' ': return; - case '~': m_exclusion = true; return; - case '[': return startNewMode( Tag, ++m_pos ); - case '"': return startNewMode( QuotedName, ++m_pos ); - case '\\': return escape(); - default: startNewMode( Name, m_pos ); break; - } - } - if( m_mode == Name ) { - if( c == ',' ) { - addPattern(); - addFilter(); - } - else if( c == '[' ) { - if( subString() == "exclude:" ) - m_exclusion = true; - else - addPattern(); - startNewMode( Tag, ++m_pos ); - } - else if( c == '\\' ) - escape(); - } - else if( m_mode == EscapedName ) - m_mode = Name; - else if( m_mode == QuotedName && c == '"' ) - addPattern(); - else if( m_mode == Tag && c == ']' ) - addPattern(); - } - void TestSpecParser::startNewMode( Mode mode, std::size_t start ) { - m_mode = mode; - m_start = start; - } - void TestSpecParser::escape() { - if( m_mode == None ) - m_start = m_pos; - m_mode = EscapedName; - m_escapeChars.push_back( m_pos ); - } - std::string TestSpecParser::subString() const { return m_arg.substr( m_start, m_pos - m_start ); } - - void TestSpecParser::addFilter() { - if( !m_currentFilter.m_patterns.empty() ) { - m_testSpec.m_filters.push_back( m_currentFilter ); - m_currentFilter = TestSpec::Filter(); - } - } - - TestSpec parseTestSpec( std::string const& arg ) { - return TestSpecParser( ITagAliasRegistry::get() ).parse( arg ).testSpec(); - } - -} // namespace Catch -// end catch_test_spec_parser.cpp -// start catch_timer.cpp - -#include - -namespace Catch { - - auto getCurrentNanosecondsSinceEpoch() -> uint64_t { - return std::chrono::duration_cast( std::chrono::high_resolution_clock::now().time_since_epoch() ).count(); - } - - auto estimateClockResolution() -> uint64_t { - uint64_t sum = 0; - static const uint64_t iterations = 1000000; - - for( std::size_t i = 0; i < iterations; ++i ) { - - uint64_t ticks; - uint64_t baseTicks = getCurrentNanosecondsSinceEpoch(); - do { - ticks = getCurrentNanosecondsSinceEpoch(); - } - while( ticks == baseTicks ); - - auto delta = ticks - baseTicks; - sum += delta; - } - - // We're just taking the mean, here. To do better we could take the std. dev and exclude outliers - // - and potentially do more iterations if there's a high variance. - return sum/iterations; - } - auto getEstimatedClockResolution() -> uint64_t { - static auto s_resolution = estimateClockResolution(); - return s_resolution; - } - - void Timer::start() { - m_nanoseconds = getCurrentNanosecondsSinceEpoch(); - } - auto Timer::getElapsedNanoseconds() const -> uint64_t { - return getCurrentNanosecondsSinceEpoch() - m_nanoseconds; - } - auto Timer::getElapsedMicroseconds() const -> uint64_t { - return getElapsedNanoseconds()/1000; - } - auto Timer::getElapsedMilliseconds() const -> unsigned int { - return static_cast(getElapsedMicroseconds()/1000); - } - auto Timer::getElapsedSeconds() const -> double { - return getElapsedMicroseconds()/1000000.0; - } - -} // namespace Catch -// end catch_timer.cpp -// start catch_tostring.cpp - -#if defined(__clang__) -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wexit-time-destructors" -# pragma clang diagnostic ignored "-Wglobal-constructors" -#endif - -// Enable specific decls locally -#if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) -#define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER -#endif - -#include -#include - -namespace Catch { - -namespace Detail { - - const std::string unprintableString = "{?}"; - - namespace { - const int hexThreshold = 255; - - struct Endianness { - enum Arch { Big, Little }; - - static Arch which() { - union _{ - int asInt; - char asChar[sizeof (int)]; - } u; - - u.asInt = 1; - return ( u.asChar[sizeof(int)-1] == 1 ) ? Big : Little; - } - }; - } - - std::string rawMemoryToString( const void *object, std::size_t size ) { - // Reverse order for little endian architectures - int i = 0, end = static_cast( size ), inc = 1; - if( Endianness::which() == Endianness::Little ) { - i = end-1; - end = inc = -1; - } - - unsigned char const *bytes = static_cast(object); - ReusableStringStream rss; - rss << "0x" << std::setfill('0') << std::hex; - for( ; i != end; i += inc ) - rss << std::setw(2) << static_cast(bytes[i]); - return rss.str(); - } -} - -template -std::string fpToString( T value, int precision ) { - if (std::isnan(value)) { - return "nan"; - } - - ReusableStringStream rss; - rss << std::setprecision( precision ) - << std::fixed - << value; - std::string d = rss.str(); - std::size_t i = d.find_last_not_of( '0' ); - if( i != std::string::npos && i != d.size()-1 ) { - if( d[i] == '.' ) - i++; - d = d.substr( 0, i+1 ); - } - return d; -} - -//// ======================================================= //// -// -// Out-of-line defs for full specialization of StringMaker -// -//// ======================================================= //// - -std::string StringMaker::convert(const std::string& str) { - if (!getCurrentContext().getConfig()->showInvisibles()) { - return '"' + str + '"'; - } - - std::string s("\""); - for (char c : str) { - switch (c) { - case '\n': - s.append("\\n"); - break; - case '\t': - s.append("\\t"); - break; - default: - s.push_back(c); - break; - } - } - s.append("\""); - return s; -} - -std::string StringMaker::convert(const std::wstring& wstr) { - std::string s; - s.reserve(wstr.size()); - for (auto c : wstr) { - s += (c <= 0xff) ? static_cast(c) : '?'; - } - return ::Catch::Detail::stringify(s); -} - -std::string StringMaker::convert(char const* str) { - if (str) { - return ::Catch::Detail::stringify(std::string{ str }); - } else { - return{ "{null string}" }; - } -} -std::string StringMaker::convert(char* str) { - if (str) { - return ::Catch::Detail::stringify(std::string{ str }); - } else { - return{ "{null string}" }; - } -} -std::string StringMaker::convert(wchar_t const * str) { - if (str) { - return ::Catch::Detail::stringify(std::wstring{ str }); - } else { - return{ "{null string}" }; - } -} -std::string StringMaker::convert(wchar_t * str) { - if (str) { - return ::Catch::Detail::stringify(std::wstring{ str }); - } else { - return{ "{null string}" }; - } -} - -std::string StringMaker::convert(int value) { - return ::Catch::Detail::stringify(static_cast(value)); -} -std::string StringMaker::convert(long value) { - return ::Catch::Detail::stringify(static_cast(value)); -} -std::string StringMaker::convert(long long value) { - ReusableStringStream rss; - rss << value; - if (value > Detail::hexThreshold) { - rss << " (0x" << std::hex << value << ')'; - } - return rss.str(); -} - -std::string StringMaker::convert(unsigned int value) { - return ::Catch::Detail::stringify(static_cast(value)); -} -std::string StringMaker::convert(unsigned long value) { - return ::Catch::Detail::stringify(static_cast(value)); -} -std::string StringMaker::convert(unsigned long long value) { - ReusableStringStream rss; - rss << value; - if (value > Detail::hexThreshold) { - rss << " (0x" << std::hex << value << ')'; - } - return rss.str(); -} - -std::string StringMaker::convert(bool b) { - return b ? "true" : "false"; -} - -std::string StringMaker::convert(char value) { - if (value == '\r') { - return "'\\r'"; - } else if (value == '\f') { - return "'\\f'"; - } else if (value == '\n') { - return "'\\n'"; - } else if (value == '\t') { - return "'\\t'"; - } else if ('\0' <= value && value < ' ') { - return ::Catch::Detail::stringify(static_cast(value)); - } else { - char chstr[] = "' '"; - chstr[1] = value; - return chstr; - } -} -std::string StringMaker::convert(signed char c) { - return ::Catch::Detail::stringify(static_cast(c)); -} -std::string StringMaker::convert(unsigned char c) { - return ::Catch::Detail::stringify(static_cast(c)); -} - -std::string StringMaker::convert(std::nullptr_t) { - return "nullptr"; -} - -std::string StringMaker::convert(float value) { - return fpToString(value, 5) + 'f'; -} -std::string StringMaker::convert(double value) { - return fpToString(value, 10); -} - -std::string ratio_string::symbol() { return "a"; } -std::string ratio_string::symbol() { return "f"; } -std::string ratio_string::symbol() { return "p"; } -std::string ratio_string::symbol() { return "n"; } -std::string ratio_string::symbol() { return "u"; } -std::string ratio_string::symbol() { return "m"; } - -} // end namespace Catch - -#if defined(__clang__) -# pragma clang diagnostic pop -#endif - -// end catch_tostring.cpp -// start catch_totals.cpp - -namespace Catch { - - Counts Counts::operator - ( Counts const& other ) const { - Counts diff; - diff.passed = passed - other.passed; - diff.failed = failed - other.failed; - diff.failedButOk = failedButOk - other.failedButOk; - return diff; - } - - Counts& Counts::operator += ( Counts const& other ) { - passed += other.passed; - failed += other.failed; - failedButOk += other.failedButOk; - return *this; - } - - std::size_t Counts::total() const { - return passed + failed + failedButOk; - } - bool Counts::allPassed() const { - return failed == 0 && failedButOk == 0; - } - bool Counts::allOk() const { - return failed == 0; - } - - Totals Totals::operator - ( Totals const& other ) const { - Totals diff; - diff.assertions = assertions - other.assertions; - diff.testCases = testCases - other.testCases; - return diff; - } - - Totals& Totals::operator += ( Totals const& other ) { - assertions += other.assertions; - testCases += other.testCases; - return *this; - } - - Totals Totals::delta( Totals const& prevTotals ) const { - Totals diff = *this - prevTotals; - if( diff.assertions.failed > 0 ) - ++diff.testCases.failed; - else if( diff.assertions.failedButOk > 0 ) - ++diff.testCases.failedButOk; - else - ++diff.testCases.passed; - return diff; - } - -} -// end catch_totals.cpp -// start catch_uncaught_exceptions.cpp - -#include - -namespace Catch { - bool uncaught_exceptions() { -#if defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) - return std::uncaught_exceptions() > 0; -#else - return std::uncaught_exception(); -#endif - } -} // end namespace Catch -// end catch_uncaught_exceptions.cpp -// start catch_version.cpp - -#include - -namespace Catch { - - Version::Version - ( unsigned int _majorVersion, - unsigned int _minorVersion, - unsigned int _patchNumber, - char const * const _branchName, - unsigned int _buildNumber ) - : majorVersion( _majorVersion ), - minorVersion( _minorVersion ), - patchNumber( _patchNumber ), - branchName( _branchName ), - buildNumber( _buildNumber ) - {} - - std::ostream& operator << ( std::ostream& os, Version const& version ) { - os << version.majorVersion << '.' - << version.minorVersion << '.' - << version.patchNumber; - // branchName is never null -> 0th char is \0 if it is empty - if (version.branchName[0]) { - os << '-' << version.branchName - << '.' << version.buildNumber; - } - return os; - } - - Version const& libraryVersion() { - static Version version( 2, 1, 2, "", 0 ); - return version; - } - -} -// end catch_version.cpp -// start catch_wildcard_pattern.cpp - -#include - -namespace Catch { - - WildcardPattern::WildcardPattern( std::string const& pattern, - CaseSensitive::Choice caseSensitivity ) - : m_caseSensitivity( caseSensitivity ), - m_pattern( adjustCase( pattern ) ) - { - if( startsWith( m_pattern, '*' ) ) { - m_pattern = m_pattern.substr( 1 ); - m_wildcard = WildcardAtStart; - } - if( endsWith( m_pattern, '*' ) ) { - m_pattern = m_pattern.substr( 0, m_pattern.size()-1 ); - m_wildcard = static_cast( m_wildcard | WildcardAtEnd ); - } - } - - bool WildcardPattern::matches( std::string const& str ) const { - switch( m_wildcard ) { - case NoWildcard: - return m_pattern == adjustCase( str ); - case WildcardAtStart: - return endsWith( adjustCase( str ), m_pattern ); - case WildcardAtEnd: - return startsWith( adjustCase( str ), m_pattern ); - case WildcardAtBothEnds: - return contains( adjustCase( str ), m_pattern ); - default: - CATCH_INTERNAL_ERROR( "Unknown enum" ); - } - } - - std::string WildcardPattern::adjustCase( std::string const& str ) const { - return m_caseSensitivity == CaseSensitive::No ? toLower( str ) : str; - } -} -// end catch_wildcard_pattern.cpp -// start catch_xmlwriter.cpp - -#include - -namespace Catch { - - XmlEncode::XmlEncode( std::string const& str, ForWhat forWhat ) - : m_str( str ), - m_forWhat( forWhat ) - {} - - void XmlEncode::encodeTo( std::ostream& os ) const { - - // Apostrophe escaping not necessary if we always use " to write attributes - // (see: http://www.w3.org/TR/xml/#syntax) - - for( std::size_t i = 0; i < m_str.size(); ++ i ) { - char c = m_str[i]; - switch( c ) { - case '<': os << "<"; break; - case '&': os << "&"; break; - - case '>': - // See: http://www.w3.org/TR/xml/#syntax - if( i > 2 && m_str[i-1] == ']' && m_str[i-2] == ']' ) - os << ">"; - else - os << c; - break; - - case '\"': - if( m_forWhat == ForAttributes ) - os << """; - else - os << c; - break; - - default: - // Escape control chars - based on contribution by @espenalb in PR #465 and - // by @mrpi PR #588 - if ( ( c >= 0 && c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' ) { - // see http://stackoverflow.com/questions/404107/why-are-control-characters-illegal-in-xml-1-0 - os << "\\x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) - << static_cast( c ); - } - else - os << c; - } - } - } - - std::ostream& operator << ( std::ostream& os, XmlEncode const& xmlEncode ) { - xmlEncode.encodeTo( os ); - return os; - } - - XmlWriter::ScopedElement::ScopedElement( XmlWriter* writer ) - : m_writer( writer ) - {} - - XmlWriter::ScopedElement::ScopedElement( ScopedElement&& other ) noexcept - : m_writer( other.m_writer ){ - other.m_writer = nullptr; - } - XmlWriter::ScopedElement& XmlWriter::ScopedElement::operator=( ScopedElement&& other ) noexcept { - if ( m_writer ) { - m_writer->endElement(); - } - m_writer = other.m_writer; - other.m_writer = nullptr; - return *this; - } - - XmlWriter::ScopedElement::~ScopedElement() { - if( m_writer ) - m_writer->endElement(); - } - - XmlWriter::ScopedElement& XmlWriter::ScopedElement::writeText( std::string const& text, bool indent ) { - m_writer->writeText( text, indent ); - return *this; - } - - XmlWriter::XmlWriter( std::ostream& os ) : m_os( os ) - { - writeDeclaration(); - } - - XmlWriter::~XmlWriter() { - while( !m_tags.empty() ) - endElement(); - } - - XmlWriter& XmlWriter::startElement( std::string const& name ) { - ensureTagClosed(); - newlineIfNecessary(); - m_os << m_indent << '<' << name; - m_tags.push_back( name ); - m_indent += " "; - m_tagIsOpen = true; - return *this; - } - - XmlWriter::ScopedElement XmlWriter::scopedElement( std::string const& name ) { - ScopedElement scoped( this ); - startElement( name ); - return scoped; - } - - XmlWriter& XmlWriter::endElement() { - newlineIfNecessary(); - m_indent = m_indent.substr( 0, m_indent.size()-2 ); - if( m_tagIsOpen ) { - m_os << "/>"; - m_tagIsOpen = false; - } - else { - m_os << m_indent << ""; - } - m_os << std::endl; - m_tags.pop_back(); - return *this; - } - - XmlWriter& XmlWriter::writeAttribute( std::string const& name, std::string const& attribute ) { - if( !name.empty() && !attribute.empty() ) - m_os << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; - return *this; - } - - XmlWriter& XmlWriter::writeAttribute( std::string const& name, bool attribute ) { - m_os << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"'; - return *this; - } - - XmlWriter& XmlWriter::writeText( std::string const& text, bool indent ) { - if( !text.empty() ){ - bool tagWasOpen = m_tagIsOpen; - ensureTagClosed(); - if( tagWasOpen && indent ) - m_os << m_indent; - m_os << XmlEncode( text ); - m_needsNewline = true; - } - return *this; - } - - XmlWriter& XmlWriter::writeComment( std::string const& text ) { - ensureTagClosed(); - m_os << m_indent << ""; - m_needsNewline = true; - return *this; - } - - void XmlWriter::writeStylesheetRef( std::string const& url ) { - m_os << "\n"; - } - - XmlWriter& XmlWriter::writeBlankLine() { - ensureTagClosed(); - m_os << '\n'; - return *this; - } - - void XmlWriter::ensureTagClosed() { - if( m_tagIsOpen ) { - m_os << ">" << std::endl; - m_tagIsOpen = false; - } - } - - void XmlWriter::writeDeclaration() { - m_os << "\n"; - } - - void XmlWriter::newlineIfNecessary() { - if( m_needsNewline ) { - m_os << std::endl; - m_needsNewline = false; - } - } -} -// end catch_xmlwriter.cpp -// start catch_reporter_bases.cpp - -#include -#include -#include -#include -#include - -namespace Catch { - void prepareExpandedExpression(AssertionResult& result) { - result.getExpandedExpression(); - } - - // Because formatting using c++ streams is stateful, drop down to C is required - // Alternatively we could use stringstream, but its performance is... not good. - std::string getFormattedDuration( double duration ) { - // Max exponent + 1 is required to represent the whole part - // + 1 for decimal point - // + 3 for the 3 decimal places - // + 1 for null terminator - const std::size_t maxDoubleSize = DBL_MAX_10_EXP + 1 + 1 + 3 + 1; - char buffer[maxDoubleSize]; - - // Save previous errno, to prevent sprintf from overwriting it - ErrnoGuard guard; -#ifdef _MSC_VER - sprintf_s(buffer, "%.3f", duration); -#else - sprintf(buffer, "%.3f", duration); -#endif - return std::string(buffer); - } - - TestEventListenerBase::TestEventListenerBase(ReporterConfig const & _config) - :StreamingReporterBase(_config) {} - - void TestEventListenerBase::assertionStarting(AssertionInfo const &) {} - - bool TestEventListenerBase::assertionEnded(AssertionStats const &) { - return false; - } - -} // end namespace Catch -// end catch_reporter_bases.cpp -// start catch_reporter_compact.cpp - -namespace { - -#ifdef CATCH_PLATFORM_MAC - const char* failedString() { return "FAILED"; } - const char* passedString() { return "PASSED"; } -#else - const char* failedString() { return "failed"; } - const char* passedString() { return "passed"; } -#endif - - // Colour::LightGrey - Catch::Colour::Code dimColour() { return Catch::Colour::FileName; } - - std::string bothOrAll( std::size_t count ) { - return count == 1 ? std::string() : - count == 2 ? "both " : "all " ; - } - -} // anon namespace - -namespace Catch { -namespace { -// Colour, message variants: -// - white: No tests ran. -// - red: Failed [both/all] N test cases, failed [both/all] M assertions. -// - white: Passed [both/all] N test cases (no assertions). -// - red: Failed N tests cases, failed M assertions. -// - green: Passed [both/all] N tests cases with M assertions. -void printTotals(std::ostream& out, const Totals& totals) { - if (totals.testCases.total() == 0) { - out << "No tests ran."; - } else if (totals.testCases.failed == totals.testCases.total()) { - Colour colour(Colour::ResultError); - const std::string qualify_assertions_failed = - totals.assertions.failed == totals.assertions.total() ? - bothOrAll(totals.assertions.failed) : std::string(); - out << - "Failed " << bothOrAll(totals.testCases.failed) - << pluralise(totals.testCases.failed, "test case") << ", " - "failed " << qualify_assertions_failed << - pluralise(totals.assertions.failed, "assertion") << '.'; - } else if (totals.assertions.total() == 0) { - out << - "Passed " << bothOrAll(totals.testCases.total()) - << pluralise(totals.testCases.total(), "test case") - << " (no assertions)."; - } else if (totals.assertions.failed) { - Colour colour(Colour::ResultError); - out << - "Failed " << pluralise(totals.testCases.failed, "test case") << ", " - "failed " << pluralise(totals.assertions.failed, "assertion") << '.'; - } else { - Colour colour(Colour::ResultSuccess); - out << - "Passed " << bothOrAll(totals.testCases.passed) - << pluralise(totals.testCases.passed, "test case") << - " with " << pluralise(totals.assertions.passed, "assertion") << '.'; - } -} - -// Implementation of CompactReporter formatting -class AssertionPrinter { -public: - AssertionPrinter& operator= (AssertionPrinter const&) = delete; - AssertionPrinter(AssertionPrinter const&) = delete; - AssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages) - : stream(_stream) - , result(_stats.assertionResult) - , messages(_stats.infoMessages) - , itMessage(_stats.infoMessages.begin()) - , printInfoMessages(_printInfoMessages) {} - - void print() { - printSourceInfo(); - - itMessage = messages.begin(); - - switch (result.getResultType()) { - case ResultWas::Ok: - printResultType(Colour::ResultSuccess, passedString()); - printOriginalExpression(); - printReconstructedExpression(); - if (!result.hasExpression()) - printRemainingMessages(Colour::None); - else - printRemainingMessages(); - break; - case ResultWas::ExpressionFailed: - if (result.isOk()) - printResultType(Colour::ResultSuccess, failedString() + std::string(" - but was ok")); - else - printResultType(Colour::Error, failedString()); - printOriginalExpression(); - printReconstructedExpression(); - printRemainingMessages(); - break; - case ResultWas::ThrewException: - printResultType(Colour::Error, failedString()); - printIssue("unexpected exception with message:"); - printMessage(); - printExpressionWas(); - printRemainingMessages(); - break; - case ResultWas::FatalErrorCondition: - printResultType(Colour::Error, failedString()); - printIssue("fatal error condition with message:"); - printMessage(); - printExpressionWas(); - printRemainingMessages(); - break; - case ResultWas::DidntThrowException: - printResultType(Colour::Error, failedString()); - printIssue("expected exception, got none"); - printExpressionWas(); - printRemainingMessages(); - break; - case ResultWas::Info: - printResultType(Colour::None, "info"); - printMessage(); - printRemainingMessages(); - break; - case ResultWas::Warning: - printResultType(Colour::None, "warning"); - printMessage(); - printRemainingMessages(); - break; - case ResultWas::ExplicitFailure: - printResultType(Colour::Error, failedString()); - printIssue("explicitly"); - printRemainingMessages(Colour::None); - break; - // These cases are here to prevent compiler warnings - case ResultWas::Unknown: - case ResultWas::FailureBit: - case ResultWas::Exception: - printResultType(Colour::Error, "** internal error **"); - break; - } - } - -private: - void printSourceInfo() const { - Colour colourGuard(Colour::FileName); - stream << result.getSourceInfo() << ':'; - } - - void printResultType(Colour::Code colour, std::string const& passOrFail) const { - if (!passOrFail.empty()) { - { - Colour colourGuard(colour); - stream << ' ' << passOrFail; - } - stream << ':'; - } - } - - void printIssue(std::string const& issue) const { - stream << ' ' << issue; - } - - void printExpressionWas() { - if (result.hasExpression()) { - stream << ';'; - { - Colour colour(dimColour()); - stream << " expression was:"; - } - printOriginalExpression(); - } - } - - void printOriginalExpression() const { - if (result.hasExpression()) { - stream << ' ' << result.getExpression(); - } - } - - void printReconstructedExpression() const { - if (result.hasExpandedExpression()) { - { - Colour colour(dimColour()); - stream << " for: "; - } - stream << result.getExpandedExpression(); - } - } - - void printMessage() { - if (itMessage != messages.end()) { - stream << " '" << itMessage->message << '\''; - ++itMessage; - } - } - - void printRemainingMessages(Colour::Code colour = dimColour()) { - if (itMessage == messages.end()) - return; - - // using messages.end() directly yields (or auto) compilation error: - std::vector::const_iterator itEnd = messages.end(); - const std::size_t N = static_cast(std::distance(itMessage, itEnd)); - - { - Colour colourGuard(colour); - stream << " with " << pluralise(N, "message") << ':'; - } - - for (; itMessage != itEnd; ) { - // If this assertion is a warning ignore any INFO messages - if (printInfoMessages || itMessage->type != ResultWas::Info) { - stream << " '" << itMessage->message << '\''; - if (++itMessage != itEnd) { - Colour colourGuard(dimColour()); - stream << " and"; - } - } - } - } - -private: - std::ostream& stream; - AssertionResult const& result; - std::vector messages; - std::vector::const_iterator itMessage; - bool printInfoMessages; -}; - -} // anon namespace - - std::string CompactReporter::getDescription() { - return "Reports test results on a single line, suitable for IDEs"; - } - - ReporterPreferences CompactReporter::getPreferences() const { - ReporterPreferences prefs; - prefs.shouldRedirectStdOut = false; - return prefs; - } - - void CompactReporter::noMatchingTestCases( std::string const& spec ) { - stream << "No test cases matched '" << spec << '\'' << std::endl; - } - - void CompactReporter::assertionStarting( AssertionInfo const& ) {} - - bool CompactReporter::assertionEnded( AssertionStats const& _assertionStats ) { - AssertionResult const& result = _assertionStats.assertionResult; - - bool printInfoMessages = true; - - // Drop out if result was successful and we're not printing those - if( !m_config->includeSuccessfulResults() && result.isOk() ) { - if( result.getResultType() != ResultWas::Warning ) - return false; - printInfoMessages = false; - } - - AssertionPrinter printer( stream, _assertionStats, printInfoMessages ); - printer.print(); - - stream << std::endl; - return true; - } - - void CompactReporter::sectionEnded(SectionStats const& _sectionStats) { - if (m_config->showDurations() == ShowDurations::Always) { - stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; - } - } - - void CompactReporter::testRunEnded( TestRunStats const& _testRunStats ) { - printTotals( stream, _testRunStats.totals ); - stream << '\n' << std::endl; - StreamingReporterBase::testRunEnded( _testRunStats ); - } - - CompactReporter::~CompactReporter() {} - - CATCH_REGISTER_REPORTER( "compact", CompactReporter ) - -} // end namespace Catch -// end catch_reporter_compact.cpp -// start catch_reporter_console.cpp - -#include -#include - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch - // Note that 4062 (not all labels are handled - // and default is missing) is enabled -#endif - -namespace Catch { - -namespace { - -// Formatter impl for ConsoleReporter -class ConsoleAssertionPrinter { -public: - ConsoleAssertionPrinter& operator= (ConsoleAssertionPrinter const&) = delete; - ConsoleAssertionPrinter(ConsoleAssertionPrinter const&) = delete; - ConsoleAssertionPrinter(std::ostream& _stream, AssertionStats const& _stats, bool _printInfoMessages) - : stream(_stream), - stats(_stats), - result(_stats.assertionResult), - colour(Colour::None), - message(result.getMessage()), - messages(_stats.infoMessages), - printInfoMessages(_printInfoMessages) { - switch (result.getResultType()) { - case ResultWas::Ok: - colour = Colour::Success; - passOrFail = "PASSED"; - //if( result.hasMessage() ) - if (_stats.infoMessages.size() == 1) - messageLabel = "with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "with messages"; - break; - case ResultWas::ExpressionFailed: - if (result.isOk()) { - colour = Colour::Success; - passOrFail = "FAILED - but was ok"; - } else { - colour = Colour::Error; - passOrFail = "FAILED"; - } - if (_stats.infoMessages.size() == 1) - messageLabel = "with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "with messages"; - break; - case ResultWas::ThrewException: - colour = Colour::Error; - passOrFail = "FAILED"; - messageLabel = "due to unexpected exception with "; - if (_stats.infoMessages.size() == 1) - messageLabel += "message"; - if (_stats.infoMessages.size() > 1) - messageLabel += "messages"; - break; - case ResultWas::FatalErrorCondition: - colour = Colour::Error; - passOrFail = "FAILED"; - messageLabel = "due to a fatal error condition"; - break; - case ResultWas::DidntThrowException: - colour = Colour::Error; - passOrFail = "FAILED"; - messageLabel = "because no exception was thrown where one was expected"; - break; - case ResultWas::Info: - messageLabel = "info"; - break; - case ResultWas::Warning: - messageLabel = "warning"; - break; - case ResultWas::ExplicitFailure: - passOrFail = "FAILED"; - colour = Colour::Error; - if (_stats.infoMessages.size() == 1) - messageLabel = "explicitly with message"; - if (_stats.infoMessages.size() > 1) - messageLabel = "explicitly with messages"; - break; - // These cases are here to prevent compiler warnings - case ResultWas::Unknown: - case ResultWas::FailureBit: - case ResultWas::Exception: - passOrFail = "** internal error **"; - colour = Colour::Error; - break; - } - } - - void print() const { - printSourceInfo(); - if (stats.totals.assertions.total() > 0) { - if (result.isOk()) - stream << '\n'; - printResultType(); - printOriginalExpression(); - printReconstructedExpression(); - } else { - stream << '\n'; - } - printMessage(); - } - -private: - void printResultType() const { - if (!passOrFail.empty()) { - Colour colourGuard(colour); - stream << passOrFail << ":\n"; - } - } - void printOriginalExpression() const { - if (result.hasExpression()) { - Colour colourGuard(Colour::OriginalExpression); - stream << " "; - stream << result.getExpressionInMacro(); - stream << '\n'; - } - } - void printReconstructedExpression() const { - if (result.hasExpandedExpression()) { - stream << "with expansion:\n"; - Colour colourGuard(Colour::ReconstructedExpression); - stream << Column(result.getExpandedExpression()).indent(2) << '\n'; - } - } - void printMessage() const { - if (!messageLabel.empty()) - stream << messageLabel << ':' << '\n'; - for (auto const& msg : messages) { - // If this assertion is a warning ignore any INFO messages - if (printInfoMessages || msg.type != ResultWas::Info) - stream << Column(msg.message).indent(2) << '\n'; - } - } - void printSourceInfo() const { - Colour colourGuard(Colour::FileName); - stream << result.getSourceInfo() << ": "; - } - - std::ostream& stream; - AssertionStats const& stats; - AssertionResult const& result; - Colour::Code colour; - std::string passOrFail; - std::string messageLabel; - std::string message; - std::vector messages; - bool printInfoMessages; -}; - -std::size_t makeRatio(std::size_t number, std::size_t total) { - std::size_t ratio = total > 0 ? CATCH_CONFIG_CONSOLE_WIDTH * number / total : 0; - return (ratio == 0 && number > 0) ? 1 : ratio; -} - -std::size_t& findMax(std::size_t& i, std::size_t& j, std::size_t& k) { - if (i > j && i > k) - return i; - else if (j > k) - return j; - else - return k; -} - -struct ColumnInfo { - enum Justification { Left, Right }; - std::string name; - int width; - Justification justification; -}; -struct ColumnBreak {}; -struct RowBreak {}; - -class Duration { - enum class Unit { - Auto, - Nanoseconds, - Microseconds, - Milliseconds, - Seconds, - Minutes - }; - static const uint64_t s_nanosecondsInAMicrosecond = 1000; - static const uint64_t s_nanosecondsInAMillisecond = 1000 * s_nanosecondsInAMicrosecond; - static const uint64_t s_nanosecondsInASecond = 1000 * s_nanosecondsInAMillisecond; - static const uint64_t s_nanosecondsInAMinute = 60 * s_nanosecondsInASecond; - - uint64_t m_inNanoseconds; - Unit m_units; - -public: - explicit Duration(uint64_t inNanoseconds, Unit units = Unit::Auto) - : m_inNanoseconds(inNanoseconds), - m_units(units) { - if (m_units == Unit::Auto) { - if (m_inNanoseconds < s_nanosecondsInAMicrosecond) - m_units = Unit::Nanoseconds; - else if (m_inNanoseconds < s_nanosecondsInAMillisecond) - m_units = Unit::Microseconds; - else if (m_inNanoseconds < s_nanosecondsInASecond) - m_units = Unit::Milliseconds; - else if (m_inNanoseconds < s_nanosecondsInAMinute) - m_units = Unit::Seconds; - else - m_units = Unit::Minutes; - } - - } - - auto value() const -> double { - switch (m_units) { - case Unit::Microseconds: - return m_inNanoseconds / static_cast(s_nanosecondsInAMicrosecond); - case Unit::Milliseconds: - return m_inNanoseconds / static_cast(s_nanosecondsInAMillisecond); - case Unit::Seconds: - return m_inNanoseconds / static_cast(s_nanosecondsInASecond); - case Unit::Minutes: - return m_inNanoseconds / static_cast(s_nanosecondsInAMinute); - default: - return static_cast(m_inNanoseconds); - } - } - auto unitsAsString() const -> std::string { - switch (m_units) { - case Unit::Nanoseconds: - return "ns"; - case Unit::Microseconds: - return "µs"; - case Unit::Milliseconds: - return "ms"; - case Unit::Seconds: - return "s"; - case Unit::Minutes: - return "m"; - default: - return "** internal error **"; - } - - } - friend auto operator << (std::ostream& os, Duration const& duration) -> std::ostream& { - return os << duration.value() << " " << duration.unitsAsString(); - } -}; -} // end anon namespace - -class TablePrinter { - std::ostream& m_os; - std::vector m_columnInfos; - std::ostringstream m_oss; - int m_currentColumn = -1; - bool m_isOpen = false; - -public: - TablePrinter( std::ostream& os, std::vector columnInfos ) - : m_os( os ), - m_columnInfos( std::move( columnInfos ) ) {} - - auto columnInfos() const -> std::vector const& { - return m_columnInfos; - } - - void open() { - if (!m_isOpen) { - m_isOpen = true; - *this << RowBreak(); - for (auto const& info : m_columnInfos) - *this << info.name << ColumnBreak(); - *this << RowBreak(); - m_os << Catch::getLineOfChars<'-'>() << "\n"; - } - } - void close() { - if (m_isOpen) { - *this << RowBreak(); - m_os << std::endl; - m_isOpen = false; - } - } - - template - friend TablePrinter& operator << (TablePrinter& tp, T const& value) { - tp.m_oss << value; - return tp; - } - - friend TablePrinter& operator << (TablePrinter& tp, ColumnBreak) { - auto colStr = tp.m_oss.str(); - // This takes account of utf8 encodings - auto strSize = Catch::StringRef(colStr).numberOfCharacters(); - tp.m_oss.str(""); - tp.open(); - if (tp.m_currentColumn == static_cast(tp.m_columnInfos.size() - 1)) { - tp.m_currentColumn = -1; - tp.m_os << "\n"; - } - tp.m_currentColumn++; - - auto colInfo = tp.m_columnInfos[tp.m_currentColumn]; - auto padding = (strSize + 2 < static_cast(colInfo.width)) - ? std::string(colInfo.width - (strSize + 2), ' ') - : std::string(); - if (colInfo.justification == ColumnInfo::Left) - tp.m_os << colStr << padding << " "; - else - tp.m_os << padding << colStr << " "; - return tp; - } - - friend TablePrinter& operator << (TablePrinter& tp, RowBreak) { - if (tp.m_currentColumn > 0) { - tp.m_os << "\n"; - tp.m_currentColumn = -1; - } - return tp; - } -}; - -ConsoleReporter::ConsoleReporter(ReporterConfig const& config) - : StreamingReporterBase(config), - m_tablePrinter(new TablePrinter(config.stream(), - { - { "benchmark name", CATCH_CONFIG_CONSOLE_WIDTH - 32, ColumnInfo::Left }, - { "iters", 8, ColumnInfo::Right }, - { "elapsed ns", 14, ColumnInfo::Right }, - { "average", 14, ColumnInfo::Right } - })) {} -ConsoleReporter::~ConsoleReporter() = default; - -std::string ConsoleReporter::getDescription() { - return "Reports test results as plain lines of text"; -} - -void ConsoleReporter::noMatchingTestCases(std::string const& spec) { - stream << "No test cases matched '" << spec << '\'' << std::endl; -} - -void ConsoleReporter::assertionStarting(AssertionInfo const&) {} - -bool ConsoleReporter::assertionEnded(AssertionStats const& _assertionStats) { - AssertionResult const& result = _assertionStats.assertionResult; - - bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); - - // Drop out if result was successful but we're not printing them. - if (!includeResults && result.getResultType() != ResultWas::Warning) - return false; - - lazyPrint(); - - ConsoleAssertionPrinter printer(stream, _assertionStats, includeResults); - printer.print(); - stream << std::endl; - return true; -} - -void ConsoleReporter::sectionStarting(SectionInfo const& _sectionInfo) { - m_headerPrinted = false; - StreamingReporterBase::sectionStarting(_sectionInfo); -} -void ConsoleReporter::sectionEnded(SectionStats const& _sectionStats) { - m_tablePrinter->close(); - if (_sectionStats.missingAssertions) { - lazyPrint(); - Colour colour(Colour::ResultError); - if (m_sectionStack.size() > 1) - stream << "\nNo assertions in section"; - else - stream << "\nNo assertions in test case"; - stream << " '" << _sectionStats.sectionInfo.name << "'\n" << std::endl; - } - if (m_config->showDurations() == ShowDurations::Always) { - stream << getFormattedDuration(_sectionStats.durationInSeconds) << " s: " << _sectionStats.sectionInfo.name << std::endl; - } - if (m_headerPrinted) { - m_headerPrinted = false; - } - StreamingReporterBase::sectionEnded(_sectionStats); -} - -void ConsoleReporter::benchmarkStarting(BenchmarkInfo const& info) { - lazyPrintWithoutClosingBenchmarkTable(); - - auto nameCol = Column( info.name ).width( static_cast( m_tablePrinter->columnInfos()[0].width - 2 ) ); - - bool firstLine = true; - for (auto line : nameCol) { - if (!firstLine) - (*m_tablePrinter) << ColumnBreak() << ColumnBreak() << ColumnBreak(); - else - firstLine = false; - - (*m_tablePrinter) << line << ColumnBreak(); - } -} -void ConsoleReporter::benchmarkEnded(BenchmarkStats const& stats) { - Duration average(stats.elapsedTimeInNanoseconds / stats.iterations); - (*m_tablePrinter) - << stats.iterations << ColumnBreak() - << stats.elapsedTimeInNanoseconds << ColumnBreak() - << average << ColumnBreak(); -} - -void ConsoleReporter::testCaseEnded(TestCaseStats const& _testCaseStats) { - m_tablePrinter->close(); - StreamingReporterBase::testCaseEnded(_testCaseStats); - m_headerPrinted = false; -} -void ConsoleReporter::testGroupEnded(TestGroupStats const& _testGroupStats) { - if (currentGroupInfo.used) { - printSummaryDivider(); - stream << "Summary for group '" << _testGroupStats.groupInfo.name << "':\n"; - printTotals(_testGroupStats.totals); - stream << '\n' << std::endl; - } - StreamingReporterBase::testGroupEnded(_testGroupStats); -} -void ConsoleReporter::testRunEnded(TestRunStats const& _testRunStats) { - printTotalsDivider(_testRunStats.totals); - printTotals(_testRunStats.totals); - stream << std::endl; - StreamingReporterBase::testRunEnded(_testRunStats); -} - -void ConsoleReporter::lazyPrint() { - - m_tablePrinter->close(); - lazyPrintWithoutClosingBenchmarkTable(); -} - -void ConsoleReporter::lazyPrintWithoutClosingBenchmarkTable() { - - if (!currentTestRunInfo.used) - lazyPrintRunInfo(); - if (!currentGroupInfo.used) - lazyPrintGroupInfo(); - - if (!m_headerPrinted) { - printTestCaseAndSectionHeader(); - m_headerPrinted = true; - } -} -void ConsoleReporter::lazyPrintRunInfo() { - stream << '\n' << getLineOfChars<'~'>() << '\n'; - Colour colour(Colour::SecondaryText); - stream << currentTestRunInfo->name - << " is a Catch v" << libraryVersion() << " host application.\n" - << "Run with -? for options\n\n"; - - if (m_config->rngSeed() != 0) - stream << "Randomness seeded to: " << m_config->rngSeed() << "\n\n"; - - currentTestRunInfo.used = true; -} -void ConsoleReporter::lazyPrintGroupInfo() { - if (!currentGroupInfo->name.empty() && currentGroupInfo->groupsCounts > 1) { - printClosedHeader("Group: " + currentGroupInfo->name); - currentGroupInfo.used = true; - } -} -void ConsoleReporter::printTestCaseAndSectionHeader() { - assert(!m_sectionStack.empty()); - printOpenHeader(currentTestCaseInfo->name); - - if (m_sectionStack.size() > 1) { - Colour colourGuard(Colour::Headers); - - auto - it = m_sectionStack.begin() + 1, // Skip first section (test case) - itEnd = m_sectionStack.end(); - for (; it != itEnd; ++it) - printHeaderString(it->name, 2); - } - - SourceLineInfo lineInfo = m_sectionStack.back().lineInfo; - - if (!lineInfo.empty()) { - stream << getLineOfChars<'-'>() << '\n'; - Colour colourGuard(Colour::FileName); - stream << lineInfo << '\n'; - } - stream << getLineOfChars<'.'>() << '\n' << std::endl; -} - -void ConsoleReporter::printClosedHeader(std::string const& _name) { - printOpenHeader(_name); - stream << getLineOfChars<'.'>() << '\n'; -} -void ConsoleReporter::printOpenHeader(std::string const& _name) { - stream << getLineOfChars<'-'>() << '\n'; - { - Colour colourGuard(Colour::Headers); - printHeaderString(_name); - } -} - -// if string has a : in first line will set indent to follow it on -// subsequent lines -void ConsoleReporter::printHeaderString(std::string const& _string, std::size_t indent) { - std::size_t i = _string.find(": "); - if (i != std::string::npos) - i += 2; - else - i = 0; - stream << Column(_string).indent(indent + i).initialIndent(indent) << '\n'; -} - -struct SummaryColumn { - - SummaryColumn( std::string _label, Colour::Code _colour ) - : label( std::move( _label ) ), - colour( _colour ) {} - SummaryColumn addRow( std::size_t count ) { - ReusableStringStream rss; - rss << count; - std::string row = rss.str(); - for (auto& oldRow : rows) { - while (oldRow.size() < row.size()) - oldRow = ' ' + oldRow; - while (oldRow.size() > row.size()) - row = ' ' + row; - } - rows.push_back(row); - return *this; - } - - std::string label; - Colour::Code colour; - std::vector rows; - -}; - -void ConsoleReporter::printTotals( Totals const& totals ) { - if (totals.testCases.total() == 0) { - stream << Colour(Colour::Warning) << "No tests ran\n"; - } else if (totals.assertions.total() > 0 && totals.testCases.allPassed()) { - stream << Colour(Colour::ResultSuccess) << "All tests passed"; - stream << " (" - << pluralise(totals.assertions.passed, "assertion") << " in " - << pluralise(totals.testCases.passed, "test case") << ')' - << '\n'; - } else { - - std::vector columns; - columns.push_back(SummaryColumn("", Colour::None) - .addRow(totals.testCases.total()) - .addRow(totals.assertions.total())); - columns.push_back(SummaryColumn("passed", Colour::Success) - .addRow(totals.testCases.passed) - .addRow(totals.assertions.passed)); - columns.push_back(SummaryColumn("failed", Colour::ResultError) - .addRow(totals.testCases.failed) - .addRow(totals.assertions.failed)); - columns.push_back(SummaryColumn("failed as expected", Colour::ResultExpectedFailure) - .addRow(totals.testCases.failedButOk) - .addRow(totals.assertions.failedButOk)); - - printSummaryRow("test cases", columns, 0); - printSummaryRow("assertions", columns, 1); - } -} -void ConsoleReporter::printSummaryRow(std::string const& label, std::vector const& cols, std::size_t row) { - for (auto col : cols) { - std::string value = col.rows[row]; - if (col.label.empty()) { - stream << label << ": "; - if (value != "0") - stream << value; - else - stream << Colour(Colour::Warning) << "- none -"; - } else if (value != "0") { - stream << Colour(Colour::LightGrey) << " | "; - stream << Colour(col.colour) - << value << ' ' << col.label; - } - } - stream << '\n'; -} - -void ConsoleReporter::printTotalsDivider(Totals const& totals) { - if (totals.testCases.total() > 0) { - std::size_t failedRatio = makeRatio(totals.testCases.failed, totals.testCases.total()); - std::size_t failedButOkRatio = makeRatio(totals.testCases.failedButOk, totals.testCases.total()); - std::size_t passedRatio = makeRatio(totals.testCases.passed, totals.testCases.total()); - while (failedRatio + failedButOkRatio + passedRatio < CATCH_CONFIG_CONSOLE_WIDTH - 1) - findMax(failedRatio, failedButOkRatio, passedRatio)++; - while (failedRatio + failedButOkRatio + passedRatio > CATCH_CONFIG_CONSOLE_WIDTH - 1) - findMax(failedRatio, failedButOkRatio, passedRatio)--; - - stream << Colour(Colour::Error) << std::string(failedRatio, '='); - stream << Colour(Colour::ResultExpectedFailure) << std::string(failedButOkRatio, '='); - if (totals.testCases.allPassed()) - stream << Colour(Colour::ResultSuccess) << std::string(passedRatio, '='); - else - stream << Colour(Colour::Success) << std::string(passedRatio, '='); - } else { - stream << Colour(Colour::Warning) << std::string(CATCH_CONFIG_CONSOLE_WIDTH - 1, '='); - } - stream << '\n'; -} -void ConsoleReporter::printSummaryDivider() { - stream << getLineOfChars<'-'>() << '\n'; -} - -CATCH_REGISTER_REPORTER("console", ConsoleReporter) - -} // end namespace Catch - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif -// end catch_reporter_console.cpp -// start catch_reporter_junit.cpp - -#include -#include -#include -#include - -namespace Catch { - - namespace { - std::string getCurrentTimestamp() { - // Beware, this is not reentrant because of backward compatibility issues - // Also, UTC only, again because of backward compatibility (%z is C++11) - time_t rawtime; - std::time(&rawtime); - auto const timeStampSize = sizeof("2017-01-16T17:06:45Z"); - -#ifdef _MSC_VER - std::tm timeInfo = {}; - gmtime_s(&timeInfo, &rawtime); -#else - std::tm* timeInfo; - timeInfo = std::gmtime(&rawtime); -#endif - - char timeStamp[timeStampSize]; - const char * const fmt = "%Y-%m-%dT%H:%M:%SZ"; - -#ifdef _MSC_VER - std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); -#else - std::strftime(timeStamp, timeStampSize, fmt, timeInfo); -#endif - return std::string(timeStamp); - } - - std::string fileNameTag(const std::vector &tags) { - auto it = std::find_if(begin(tags), - end(tags), - [] (std::string const& tag) {return tag.front() == '#'; }); - if (it != tags.end()) - return it->substr(1); - return std::string(); - } - } // anonymous namespace - - JunitReporter::JunitReporter( ReporterConfig const& _config ) - : CumulativeReporterBase( _config ), - xml( _config.stream() ) - { - m_reporterPrefs.shouldRedirectStdOut = true; - } - - JunitReporter::~JunitReporter() {} - - std::string JunitReporter::getDescription() { - return "Reports test results in an XML format that looks like Ant's junitreport target"; - } - - void JunitReporter::noMatchingTestCases( std::string const& /*spec*/ ) {} - - void JunitReporter::testRunStarting( TestRunInfo const& runInfo ) { - CumulativeReporterBase::testRunStarting( runInfo ); - xml.startElement( "testsuites" ); - } - - void JunitReporter::testGroupStarting( GroupInfo const& groupInfo ) { - suiteTimer.start(); - stdOutForSuite.clear(); - stdErrForSuite.clear(); - unexpectedExceptions = 0; - CumulativeReporterBase::testGroupStarting( groupInfo ); - } - - void JunitReporter::testCaseStarting( TestCaseInfo const& testCaseInfo ) { - m_okToFail = testCaseInfo.okToFail(); - } - - bool JunitReporter::assertionEnded( AssertionStats const& assertionStats ) { - if( assertionStats.assertionResult.getResultType() == ResultWas::ThrewException && !m_okToFail ) - unexpectedExceptions++; - return CumulativeReporterBase::assertionEnded( assertionStats ); - } - - void JunitReporter::testCaseEnded( TestCaseStats const& testCaseStats ) { - stdOutForSuite += testCaseStats.stdOut; - stdErrForSuite += testCaseStats.stdErr; - CumulativeReporterBase::testCaseEnded( testCaseStats ); - } - - void JunitReporter::testGroupEnded( TestGroupStats const& testGroupStats ) { - double suiteTime = suiteTimer.getElapsedSeconds(); - CumulativeReporterBase::testGroupEnded( testGroupStats ); - writeGroup( *m_testGroups.back(), suiteTime ); - } - - void JunitReporter::testRunEndedCumulative() { - xml.endElement(); - } - - void JunitReporter::writeGroup( TestGroupNode const& groupNode, double suiteTime ) { - XmlWriter::ScopedElement e = xml.scopedElement( "testsuite" ); - TestGroupStats const& stats = groupNode.value; - xml.writeAttribute( "name", stats.groupInfo.name ); - xml.writeAttribute( "errors", unexpectedExceptions ); - xml.writeAttribute( "failures", stats.totals.assertions.failed-unexpectedExceptions ); - xml.writeAttribute( "tests", stats.totals.assertions.total() ); - xml.writeAttribute( "hostname", "tbd" ); // !TBD - if( m_config->showDurations() == ShowDurations::Never ) - xml.writeAttribute( "time", "" ); - else - xml.writeAttribute( "time", suiteTime ); - xml.writeAttribute( "timestamp", getCurrentTimestamp() ); - - // Write test cases - for( auto const& child : groupNode.children ) - writeTestCase( *child ); - - xml.scopedElement( "system-out" ).writeText( trim( stdOutForSuite ), false ); - xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite ), false ); - } - - void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) { - TestCaseStats const& stats = testCaseNode.value; - - // All test cases have exactly one section - which represents the - // test case itself. That section may have 0-n nested sections - assert( testCaseNode.children.size() == 1 ); - SectionNode const& rootSection = *testCaseNode.children.front(); - - std::string className = stats.testInfo.className; - - if( className.empty() ) { - className = fileNameTag(stats.testInfo.tags); - if ( className.empty() ) - className = "global"; - } - - if ( !m_config->name().empty() ) - className = m_config->name() + "." + className; - - writeSection( className, "", rootSection ); - } - - void JunitReporter::writeSection( std::string const& className, - std::string const& rootName, - SectionNode const& sectionNode ) { - std::string name = trim( sectionNode.stats.sectionInfo.name ); - if( !rootName.empty() ) - name = rootName + '/' + name; - - if( !sectionNode.assertions.empty() || - !sectionNode.stdOut.empty() || - !sectionNode.stdErr.empty() ) { - XmlWriter::ScopedElement e = xml.scopedElement( "testcase" ); - if( className.empty() ) { - xml.writeAttribute( "classname", name ); - xml.writeAttribute( "name", "root" ); - } - else { - xml.writeAttribute( "classname", className ); - xml.writeAttribute( "name", name ); - } - xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) ); - - writeAssertions( sectionNode ); - - if( !sectionNode.stdOut.empty() ) - xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), false ); - if( !sectionNode.stdErr.empty() ) - xml.scopedElement( "system-err" ).writeText( trim( sectionNode.stdErr ), false ); - } - for( auto const& childNode : sectionNode.childSections ) - if( className.empty() ) - writeSection( name, "", *childNode ); - else - writeSection( className, name, *childNode ); - } - - void JunitReporter::writeAssertions( SectionNode const& sectionNode ) { - for( auto const& assertion : sectionNode.assertions ) - writeAssertion( assertion ); - } - - void JunitReporter::writeAssertion( AssertionStats const& stats ) { - AssertionResult const& result = stats.assertionResult; - if( !result.isOk() ) { - std::string elementName; - switch( result.getResultType() ) { - case ResultWas::ThrewException: - case ResultWas::FatalErrorCondition: - elementName = "error"; - break; - case ResultWas::ExplicitFailure: - elementName = "failure"; - break; - case ResultWas::ExpressionFailed: - elementName = "failure"; - break; - case ResultWas::DidntThrowException: - elementName = "failure"; - break; - - // We should never see these here: - case ResultWas::Info: - case ResultWas::Warning: - case ResultWas::Ok: - case ResultWas::Unknown: - case ResultWas::FailureBit: - case ResultWas::Exception: - elementName = "internalError"; - break; - } - - XmlWriter::ScopedElement e = xml.scopedElement( elementName ); - - xml.writeAttribute( "message", result.getExpandedExpression() ); - xml.writeAttribute( "type", result.getTestMacroName() ); - - ReusableStringStream rss; - if( !result.getMessage().empty() ) - rss << result.getMessage() << '\n'; - for( auto const& msg : stats.infoMessages ) - if( msg.type == ResultWas::Info ) - rss << msg.message << '\n'; - - rss << "at " << result.getSourceInfo(); - xml.writeText( rss.str(), false ); - } - } - - CATCH_REGISTER_REPORTER( "junit", JunitReporter ) - -} // end namespace Catch -// end catch_reporter_junit.cpp -// start catch_reporter_multi.cpp - -namespace Catch { - - void MultipleReporters::add( IStreamingReporterPtr&& reporter ) { - m_reporters.push_back( std::move( reporter ) ); - } - - ReporterPreferences MultipleReporters::getPreferences() const { - return m_reporters[0]->getPreferences(); - } - - std::set MultipleReporters::getSupportedVerbosities() { - return std::set{ }; - } - - void MultipleReporters::noMatchingTestCases( std::string const& spec ) { - for( auto const& reporter : m_reporters ) - reporter->noMatchingTestCases( spec ); - } - - void MultipleReporters::benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) { - for( auto const& reporter : m_reporters ) - reporter->benchmarkStarting( benchmarkInfo ); - } - void MultipleReporters::benchmarkEnded( BenchmarkStats const& benchmarkStats ) { - for( auto const& reporter : m_reporters ) - reporter->benchmarkEnded( benchmarkStats ); - } - - void MultipleReporters::testRunStarting( TestRunInfo const& testRunInfo ) { - for( auto const& reporter : m_reporters ) - reporter->testRunStarting( testRunInfo ); - } - - void MultipleReporters::testGroupStarting( GroupInfo const& groupInfo ) { - for( auto const& reporter : m_reporters ) - reporter->testGroupStarting( groupInfo ); - } - - void MultipleReporters::testCaseStarting( TestCaseInfo const& testInfo ) { - for( auto const& reporter : m_reporters ) - reporter->testCaseStarting( testInfo ); - } - - void MultipleReporters::sectionStarting( SectionInfo const& sectionInfo ) { - for( auto const& reporter : m_reporters ) - reporter->sectionStarting( sectionInfo ); - } - - void MultipleReporters::assertionStarting( AssertionInfo const& assertionInfo ) { - for( auto const& reporter : m_reporters ) - reporter->assertionStarting( assertionInfo ); - } - - // The return value indicates if the messages buffer should be cleared: - bool MultipleReporters::assertionEnded( AssertionStats const& assertionStats ) { - bool clearBuffer = false; - for( auto const& reporter : m_reporters ) - clearBuffer |= reporter->assertionEnded( assertionStats ); - return clearBuffer; - } - - void MultipleReporters::sectionEnded( SectionStats const& sectionStats ) { - for( auto const& reporter : m_reporters ) - reporter->sectionEnded( sectionStats ); - } - - void MultipleReporters::testCaseEnded( TestCaseStats const& testCaseStats ) { - for( auto const& reporter : m_reporters ) - reporter->testCaseEnded( testCaseStats ); - } - - void MultipleReporters::testGroupEnded( TestGroupStats const& testGroupStats ) { - for( auto const& reporter : m_reporters ) - reporter->testGroupEnded( testGroupStats ); - } - - void MultipleReporters::testRunEnded( TestRunStats const& testRunStats ) { - for( auto const& reporter : m_reporters ) - reporter->testRunEnded( testRunStats ); - } - - void MultipleReporters::skipTest( TestCaseInfo const& testInfo ) { - for( auto const& reporter : m_reporters ) - reporter->skipTest( testInfo ); - } - - bool MultipleReporters::isMulti() const { - return true; - } - -} // end namespace Catch -// end catch_reporter_multi.cpp -// start catch_reporter_xml.cpp - -#if defined(_MSC_VER) -#pragma warning(push) -#pragma warning(disable:4061) // Not all labels are EXPLICITLY handled in switch - // Note that 4062 (not all labels are handled - // and default is missing) is enabled -#endif - -namespace Catch { - XmlReporter::XmlReporter( ReporterConfig const& _config ) - : StreamingReporterBase( _config ), - m_xml(_config.stream()) - { - m_reporterPrefs.shouldRedirectStdOut = true; - } - - XmlReporter::~XmlReporter() = default; - - std::string XmlReporter::getDescription() { - return "Reports test results as an XML document"; - } - - std::string XmlReporter::getStylesheetRef() const { - return std::string(); - } - - void XmlReporter::writeSourceInfo( SourceLineInfo const& sourceInfo ) { - m_xml - .writeAttribute( "filename", sourceInfo.file ) - .writeAttribute( "line", sourceInfo.line ); - } - - void XmlReporter::noMatchingTestCases( std::string const& s ) { - StreamingReporterBase::noMatchingTestCases( s ); - } - - void XmlReporter::testRunStarting( TestRunInfo const& testInfo ) { - StreamingReporterBase::testRunStarting( testInfo ); - std::string stylesheetRef = getStylesheetRef(); - if( !stylesheetRef.empty() ) - m_xml.writeStylesheetRef( stylesheetRef ); - m_xml.startElement( "Catch" ); - if( !m_config->name().empty() ) - m_xml.writeAttribute( "name", m_config->name() ); - } - - void XmlReporter::testGroupStarting( GroupInfo const& groupInfo ) { - StreamingReporterBase::testGroupStarting( groupInfo ); - m_xml.startElement( "Group" ) - .writeAttribute( "name", groupInfo.name ); - } - - void XmlReporter::testCaseStarting( TestCaseInfo const& testInfo ) { - StreamingReporterBase::testCaseStarting(testInfo); - m_xml.startElement( "TestCase" ) - .writeAttribute( "name", trim( testInfo.name ) ) - .writeAttribute( "description", testInfo.description ) - .writeAttribute( "tags", testInfo.tagsAsString() ); - - writeSourceInfo( testInfo.lineInfo ); - - if ( m_config->showDurations() == ShowDurations::Always ) - m_testCaseTimer.start(); - m_xml.ensureTagClosed(); - } - - void XmlReporter::sectionStarting( SectionInfo const& sectionInfo ) { - StreamingReporterBase::sectionStarting( sectionInfo ); - if( m_sectionDepth++ > 0 ) { - m_xml.startElement( "Section" ) - .writeAttribute( "name", trim( sectionInfo.name ) ) - .writeAttribute( "description", sectionInfo.description ); - writeSourceInfo( sectionInfo.lineInfo ); - m_xml.ensureTagClosed(); - } - } - - void XmlReporter::assertionStarting( AssertionInfo const& ) { } - - bool XmlReporter::assertionEnded( AssertionStats const& assertionStats ) { - - AssertionResult const& result = assertionStats.assertionResult; - - bool includeResults = m_config->includeSuccessfulResults() || !result.isOk(); - - if( includeResults || result.getResultType() == ResultWas::Warning ) { - // Print any info messages in tags. - for( auto const& msg : assertionStats.infoMessages ) { - if( msg.type == ResultWas::Info && includeResults ) { - m_xml.scopedElement( "Info" ) - .writeText( msg.message ); - } else if ( msg.type == ResultWas::Warning ) { - m_xml.scopedElement( "Warning" ) - .writeText( msg.message ); - } - } - } - - // Drop out if result was successful but we're not printing them. - if( !includeResults && result.getResultType() != ResultWas::Warning ) - return true; - - // Print the expression if there is one. - if( result.hasExpression() ) { - m_xml.startElement( "Expression" ) - .writeAttribute( "success", result.succeeded() ) - .writeAttribute( "type", result.getTestMacroName() ); - - writeSourceInfo( result.getSourceInfo() ); - - m_xml.scopedElement( "Original" ) - .writeText( result.getExpression() ); - m_xml.scopedElement( "Expanded" ) - .writeText( result.getExpandedExpression() ); - } - - // And... Print a result applicable to each result type. - switch( result.getResultType() ) { - case ResultWas::ThrewException: - m_xml.startElement( "Exception" ); - writeSourceInfo( result.getSourceInfo() ); - m_xml.writeText( result.getMessage() ); - m_xml.endElement(); - break; - case ResultWas::FatalErrorCondition: - m_xml.startElement( "FatalErrorCondition" ); - writeSourceInfo( result.getSourceInfo() ); - m_xml.writeText( result.getMessage() ); - m_xml.endElement(); - break; - case ResultWas::Info: - m_xml.scopedElement( "Info" ) - .writeText( result.getMessage() ); - break; - case ResultWas::Warning: - // Warning will already have been written - break; - case ResultWas::ExplicitFailure: - m_xml.startElement( "Failure" ); - writeSourceInfo( result.getSourceInfo() ); - m_xml.writeText( result.getMessage() ); - m_xml.endElement(); - break; - default: - break; - } - - if( result.hasExpression() ) - m_xml.endElement(); - - return true; - } - - void XmlReporter::sectionEnded( SectionStats const& sectionStats ) { - StreamingReporterBase::sectionEnded( sectionStats ); - if( --m_sectionDepth > 0 ) { - XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResults" ); - e.writeAttribute( "successes", sectionStats.assertions.passed ); - e.writeAttribute( "failures", sectionStats.assertions.failed ); - e.writeAttribute( "expectedFailures", sectionStats.assertions.failedButOk ); - - if ( m_config->showDurations() == ShowDurations::Always ) - e.writeAttribute( "durationInSeconds", sectionStats.durationInSeconds ); - - m_xml.endElement(); - } - } - - void XmlReporter::testCaseEnded( TestCaseStats const& testCaseStats ) { - StreamingReporterBase::testCaseEnded( testCaseStats ); - XmlWriter::ScopedElement e = m_xml.scopedElement( "OverallResult" ); - e.writeAttribute( "success", testCaseStats.totals.assertions.allOk() ); - - if ( m_config->showDurations() == ShowDurations::Always ) - e.writeAttribute( "durationInSeconds", m_testCaseTimer.getElapsedSeconds() ); - - if( !testCaseStats.stdOut.empty() ) - m_xml.scopedElement( "StdOut" ).writeText( trim( testCaseStats.stdOut ), false ); - if( !testCaseStats.stdErr.empty() ) - m_xml.scopedElement( "StdErr" ).writeText( trim( testCaseStats.stdErr ), false ); - - m_xml.endElement(); - } - - void XmlReporter::testGroupEnded( TestGroupStats const& testGroupStats ) { - StreamingReporterBase::testGroupEnded( testGroupStats ); - // TODO: Check testGroupStats.aborting and act accordingly. - m_xml.scopedElement( "OverallResults" ) - .writeAttribute( "successes", testGroupStats.totals.assertions.passed ) - .writeAttribute( "failures", testGroupStats.totals.assertions.failed ) - .writeAttribute( "expectedFailures", testGroupStats.totals.assertions.failedButOk ); - m_xml.endElement(); - } - - void XmlReporter::testRunEnded( TestRunStats const& testRunStats ) { - StreamingReporterBase::testRunEnded( testRunStats ); - m_xml.scopedElement( "OverallResults" ) - .writeAttribute( "successes", testRunStats.totals.assertions.passed ) - .writeAttribute( "failures", testRunStats.totals.assertions.failed ) - .writeAttribute( "expectedFailures", testRunStats.totals.assertions.failedButOk ); - m_xml.endElement(); - } - - CATCH_REGISTER_REPORTER( "xml", XmlReporter ) - -} // end namespace Catch - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif -// end catch_reporter_xml.cpp - -namespace Catch { - LeakDetector leakDetector; -} - -#ifdef __clang__ -#pragma clang diagnostic pop -#endif - -// end catch_impl.hpp -#endif - -#ifdef CATCH_CONFIG_MAIN -// start catch_default_main.hpp - -#ifndef __OBJC__ - -#if defined(WIN32) && defined(_UNICODE) && !defined(DO_NOT_USE_WMAIN) -// Standard C/C++ Win32 Unicode wmain entry point -extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) { -#else -// Standard C/C++ main entry point -int main (int argc, char * argv[]) { -#endif - - return Catch::Session().run( argc, argv ); -} - -#else // __OBJC__ - -// Objective-C entry point -int main (int argc, char * const argv[]) { -#if !CATCH_ARC_ENABLED - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; -#endif - - Catch::registerTestMethods(); - int result = Catch::Session().run( argc, (char**)argv ); - -#if !CATCH_ARC_ENABLED - [pool drain]; -#endif - - return result; -} - -#endif // __OBJC__ - -// end catch_default_main.hpp -#endif - -#if !defined(CATCH_CONFIG_IMPL_ONLY) - -#ifdef CLARA_CONFIG_MAIN_NOT_DEFINED -# undef CLARA_CONFIG_MAIN -#endif - -#if !defined(CATCH_CONFIG_DISABLE) -////// -// If this config identifier is defined then all CATCH macros are prefixed with CATCH_ -#ifdef CATCH_CONFIG_PREFIX_ALL - -#define CATCH_REQUIRE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ ) -#define CATCH_REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) - -#define CATCH_REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_REQUIRE_THROWS", Catch::ResultDisposition::Normal, "", __VA_ARGS__ ) -#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr ) -#define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr ) -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CATCH_REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr ) -#endif// CATCH_CONFIG_DISABLE_MATCHERS -#define CATCH_REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ ) - -#define CATCH_CHECK( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define CATCH_CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) -#define CATCH_CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CATCH_CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define CATCH_CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( "CATCH_CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define CATCH_CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( "CATCH_CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) - -#define CATCH_CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CATCH_CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, "", __VA_ARGS__ ) -#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CATCH_CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) -#define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CATCH_CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CATCH_CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) -#endif // CATCH_CONFIG_DISABLE_MATCHERS -#define CATCH_CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CATCH_CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) - -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg ) - -#define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CATCH_REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg ) -#endif // CATCH_CONFIG_DISABLE_MATCHERS - -#define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg ) -#define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) -#define CATCH_CAPTURE( msg ) INTERNAL_CATCH_INFO( "CATCH_CAPTURE", #msg " := " << ::Catch::Detail::stringify(msg) ) - -#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ) -#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ ) -#define CATCH_METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) -#define CATCH_REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) -#define CATCH_SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) -#define CATCH_FAIL( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) -#define CATCH_FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "CATCH_FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define CATCH_SUCCEED( ... ) INTERNAL_CATCH_MSG( "CATCH_SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) - -#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE() - -// "BDD-style" convenience wrappers -#define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( "Scenario: " __VA_ARGS__ ) -#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) -#define CATCH_GIVEN( desc ) CATCH_SECTION( std::string( "Given: ") + desc ) -#define CATCH_WHEN( desc ) CATCH_SECTION( std::string( " When: ") + desc ) -#define CATCH_AND_WHEN( desc ) CATCH_SECTION( std::string( " And: ") + desc ) -#define CATCH_THEN( desc ) CATCH_SECTION( std::string( " Then: ") + desc ) -#define CATCH_AND_THEN( desc ) CATCH_SECTION( std::string( " And: ") + desc ) - -// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required -#else - -#define REQUIRE( ... ) INTERNAL_CATCH_TEST( "REQUIRE", Catch::ResultDisposition::Normal, __VA_ARGS__ ) -#define REQUIRE_FALSE( ... ) INTERNAL_CATCH_TEST( "REQUIRE_FALSE", Catch::ResultDisposition::Normal | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) - -#define REQUIRE_THROWS( ... ) INTERNAL_CATCH_THROWS( "REQUIRE_THROWS", Catch::ResultDisposition::Normal, __VA_ARGS__ ) -#define REQUIRE_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "REQUIRE_THROWS_AS", exceptionType, Catch::ResultDisposition::Normal, expr ) -#define REQUIRE_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "REQUIRE_THROWS_WITH", Catch::ResultDisposition::Normal, matcher, expr ) -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "REQUIRE_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::Normal, matcher, expr ) -#endif // CATCH_CONFIG_DISABLE_MATCHERS -#define REQUIRE_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "REQUIRE_NOTHROW", Catch::ResultDisposition::Normal, __VA_ARGS__ ) - -#define CHECK( ... ) INTERNAL_CATCH_TEST( "CHECK", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define CHECK_FALSE( ... ) INTERNAL_CATCH_TEST( "CHECK_FALSE", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::FalseTest, __VA_ARGS__ ) -#define CHECKED_IF( ... ) INTERNAL_CATCH_IF( "CHECKED_IF", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define CHECKED_ELSE( ... ) INTERNAL_CATCH_ELSE( "CHECKED_ELSE", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define CHECK_NOFAIL( ... ) INTERNAL_CATCH_TEST( "CHECK_NOFAIL", Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, __VA_ARGS__ ) - -#define CHECK_THROWS( ... ) INTERNAL_CATCH_THROWS( "CHECK_THROWS", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( "CHECK_THROWS_AS", exceptionType, Catch::ResultDisposition::ContinueOnFailure, expr ) -#define CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS_STR_MATCHES( "CHECK_THROWS_WITH", Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) INTERNAL_CATCH_THROWS_MATCHES( "CHECK_THROWS_MATCHES", exceptionType, Catch::ResultDisposition::ContinueOnFailure, matcher, expr ) -#endif // CATCH_CONFIG_DISABLE_MATCHERS -#define CHECK_NOTHROW( ... ) INTERNAL_CATCH_NO_THROW( "CHECK_NOTHROW", Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) - -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "CHECK_THAT", matcher, Catch::ResultDisposition::ContinueOnFailure, arg ) - -#define REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( "REQUIRE_THAT", matcher, Catch::ResultDisposition::Normal, arg ) -#endif // CATCH_CONFIG_DISABLE_MATCHERS - -#define INFO( msg ) INTERNAL_CATCH_INFO( "INFO", msg ) -#define WARN( msg ) INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg ) -#define CAPTURE( msg ) INTERNAL_CATCH_INFO( "CAPTURE", #msg " := " << ::Catch::Detail::stringify(msg) ) - -#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE( __VA_ARGS__ ) -#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, __VA_ARGS__ ) -#define METHOD_AS_TEST_CASE( method, ... ) INTERNAL_CATCH_METHOD_AS_TEST_CASE( method, __VA_ARGS__ ) -#define REGISTER_TEST_CASE( Function, ... ) INTERNAL_CATCH_REGISTER_TESTCASE( Function, __VA_ARGS__ ) -#define SECTION( ... ) INTERNAL_CATCH_SECTION( __VA_ARGS__ ) -#define FAIL( ... ) INTERNAL_CATCH_MSG( "FAIL", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::Normal, __VA_ARGS__ ) -#define FAIL_CHECK( ... ) INTERNAL_CATCH_MSG( "FAIL_CHECK", Catch::ResultWas::ExplicitFailure, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ ) -#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE() - -#endif - -#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) - -// "BDD-style" convenience wrappers -#define SCENARIO( ... ) TEST_CASE( "Scenario: " __VA_ARGS__ ) -#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ ) - -#define GIVEN( desc ) SECTION( std::string(" Given: ") + desc ) -#define WHEN( desc ) SECTION( std::string(" When: ") + desc ) -#define AND_WHEN( desc ) SECTION( std::string("And when: ") + desc ) -#define THEN( desc ) SECTION( std::string(" Then: ") + desc ) -#define AND_THEN( desc ) SECTION( std::string(" And: ") + desc ) - -using Catch::Detail::Approx; - -#else -////// -// If this config identifier is defined then all CATCH macros are prefixed with CATCH_ -#ifdef CATCH_CONFIG_PREFIX_ALL - -#define CATCH_REQUIRE( ... ) (void)(0) -#define CATCH_REQUIRE_FALSE( ... ) (void)(0) - -#define CATCH_REQUIRE_THROWS( ... ) (void)(0) -#define CATCH_REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0) -#define CATCH_REQUIRE_THROWS_WITH( expr, matcher ) (void)(0) -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CATCH_REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0) -#endif// CATCH_CONFIG_DISABLE_MATCHERS -#define CATCH_REQUIRE_NOTHROW( ... ) (void)(0) - -#define CATCH_CHECK( ... ) (void)(0) -#define CATCH_CHECK_FALSE( ... ) (void)(0) -#define CATCH_CHECKED_IF( ... ) if (__VA_ARGS__) -#define CATCH_CHECKED_ELSE( ... ) if (!(__VA_ARGS__)) -#define CATCH_CHECK_NOFAIL( ... ) (void)(0) - -#define CATCH_CHECK_THROWS( ... ) (void)(0) -#define CATCH_CHECK_THROWS_AS( expr, exceptionType ) (void)(0) -#define CATCH_CHECK_THROWS_WITH( expr, matcher ) (void)(0) -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CATCH_CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0) -#endif // CATCH_CONFIG_DISABLE_MATCHERS -#define CATCH_CHECK_NOTHROW( ... ) (void)(0) - -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CATCH_CHECK_THAT( arg, matcher ) (void)(0) - -#define CATCH_REQUIRE_THAT( arg, matcher ) (void)(0) -#endif // CATCH_CONFIG_DISABLE_MATCHERS - -#define CATCH_INFO( msg ) (void)(0) -#define CATCH_WARN( msg ) (void)(0) -#define CATCH_CAPTURE( msg ) (void)(0) - -#define CATCH_TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define CATCH_TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define CATCH_METHOD_AS_TEST_CASE( method, ... ) -#define CATCH_REGISTER_TEST_CASE( Function, ... ) (void)(0) -#define CATCH_SECTION( ... ) -#define CATCH_FAIL( ... ) (void)(0) -#define CATCH_FAIL_CHECK( ... ) (void)(0) -#define CATCH_SUCCEED( ... ) (void)(0) - -#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) - -// "BDD-style" convenience wrappers -#define CATCH_SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), className ) -#define CATCH_GIVEN( desc ) -#define CATCH_WHEN( desc ) -#define CATCH_AND_WHEN( desc ) -#define CATCH_THEN( desc ) -#define CATCH_AND_THEN( desc ) - -// If CATCH_CONFIG_PREFIX_ALL is not defined then the CATCH_ prefix is not required -#else - -#define REQUIRE( ... ) (void)(0) -#define REQUIRE_FALSE( ... ) (void)(0) - -#define REQUIRE_THROWS( ... ) (void)(0) -#define REQUIRE_THROWS_AS( expr, exceptionType ) (void)(0) -#define REQUIRE_THROWS_WITH( expr, matcher ) (void)(0) -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define REQUIRE_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0) -#endif // CATCH_CONFIG_DISABLE_MATCHERS -#define REQUIRE_NOTHROW( ... ) (void)(0) - -#define CHECK( ... ) (void)(0) -#define CHECK_FALSE( ... ) (void)(0) -#define CHECKED_IF( ... ) if (__VA_ARGS__) -#define CHECKED_ELSE( ... ) if (!(__VA_ARGS__)) -#define CHECK_NOFAIL( ... ) (void)(0) - -#define CHECK_THROWS( ... ) (void)(0) -#define CHECK_THROWS_AS( expr, exceptionType ) (void)(0) -#define CHECK_THROWS_WITH( expr, matcher ) (void)(0) -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CHECK_THROWS_MATCHES( expr, exceptionType, matcher ) (void)(0) -#endif // CATCH_CONFIG_DISABLE_MATCHERS -#define CHECK_NOTHROW( ... ) (void)(0) - -#if !defined(CATCH_CONFIG_DISABLE_MATCHERS) -#define CHECK_THAT( arg, matcher ) (void)(0) - -#define REQUIRE_THAT( arg, matcher ) (void)(0) -#endif // CATCH_CONFIG_DISABLE_MATCHERS - -#define INFO( msg ) (void)(0) -#define WARN( msg ) (void)(0) -#define CAPTURE( msg ) (void)(0) - -#define TEST_CASE( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define TEST_CASE_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) -#define METHOD_AS_TEST_CASE( method, ... ) -#define REGISTER_TEST_CASE( Function, ... ) (void)(0) -#define SECTION( ... ) -#define FAIL( ... ) (void)(0) -#define FAIL_CHECK( ... ) (void)(0) -#define SUCCEED( ... ) (void)(0) -#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ )) - -#endif - -#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature ) - -// "BDD-style" convenience wrappers -#define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ) ) -#define SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TESTCASE_METHOD_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ), className ) - -#define GIVEN( desc ) -#define WHEN( desc ) -#define AND_WHEN( desc ) -#define THEN( desc ) -#define AND_THEN( desc ) - -using Catch::Detail::Approx; - -#endif - -#endif // ! CATCH_CONFIG_IMPL_ONLY - -// start catch_reenable_warnings.h - - -#ifdef __clang__ -# ifdef __ICC // icpc defines the __clang__ macro -# pragma warning(pop) -# else -# pragma clang diagnostic pop -# endif -#elif defined __GNUC__ -# pragma GCC diagnostic pop -#endif - -// end catch_reenable_warnings.h -// end catch.hpp -#endif // TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED - diff --git a/sgx-jvm/jvm-enclave/test/tests.cpp b/sgx-jvm/jvm-enclave/test/tests.cpp deleted file mode 100644 index 22f9538584..0000000000 --- a/sgx-jvm/jvm-enclave/test/tests.cpp +++ /dev/null @@ -1,103 +0,0 @@ -#define CATCH_CONFIG_MAIN -#include "catch.hpp" - -#include "enclave_map.h" - -SCENARIO( - "enclave identifiers can be looked up based on enclaves' measurements", - "[enclave-map]" -) { - - GIVEN( "an empty map" ) { - enclave_map_t map; - - REQUIRE( map.size() == 0 ); - - WHEN( "a new entry gets added" ) { - sgx_measurement_t mr_enclave = { 0 }; - sgx_enclave_id_t enclave_id = 1L; - map[&mr_enclave] = enclave_id; - - THEN( "the size of the map increases" ) { - REQUIRE( map.size() == 1 ); - } - - THEN( "the mapping can be found" ) { - auto result = map.find(&mr_enclave); - REQUIRE( result != map.end() ); - } - - THEN( "the mapping returns the correct value" ) { - auto result = map.find(&mr_enclave); - REQUIRE( result->second == 1L ); - } - - THEN( "a non-existent mapping cannot be looked up" ) { - sgx_measurement_t non_existent_mr_enclave = { 1 }; - auto result = map.find(&non_existent_mr_enclave); - REQUIRE( result == map.end() ); - } - } - } - - GIVEN( "a populated map" ) { - enclave_map_t map; - sgx_measurement_t mr_enclave_orig = { 0 }; - sgx_enclave_id_t enclave_id = 1L; - map[&mr_enclave_orig] = enclave_id; - - REQUIRE( map.size() == 1 ); - - WHEN( "a new entry gets added" ) { - sgx_measurement_t mr_enclave = { 1 }; - sgx_enclave_id_t enclave_id = 2L; - map[&mr_enclave] = enclave_id; - - THEN( "the size of the map increases" ) { - REQUIRE( map.size() == 2 ); - } - - THEN( "the mapping can be found" ) { - auto result = map.find(&mr_enclave); - REQUIRE( result != map.end() ); - } - - THEN( "the mapping returns the correct value" ) { - auto result = map.find(&mr_enclave); - REQUIRE( result->second == 2L ); - } - - THEN( "the value for the pre-existing entry is correct" ) { - auto result = map.find(&mr_enclave_orig); - REQUIRE( result->second == 1L ); - } - - THEN( "a non-existent mapping cannot be looked up" ) { - sgx_measurement_t non_existent_mr_enclave = { 2 }; - auto result = map.find(&non_existent_mr_enclave); - REQUIRE( result == map.end() ); - } - } - - WHEN( "a existing entry gets overwritten" ) { - sgx_measurement_t mr_enclave = { 0 }; - sgx_enclave_id_t enclave_id = 2L; - map[&mr_enclave] = enclave_id; - - THEN( "the size of the map stays the same" ) { - REQUIRE( map.size() == 1 ); - } - - THEN( "the mapping can be found" ) { - auto result = map.find(&mr_enclave); - REQUIRE( result != map.end() ); - } - - THEN( "the mapping returns the correct value" ) { - auto result = map.find(&mr_enclave); - REQUIRE( result->second == 2L ); - } - } - } - -} diff --git a/sgx-jvm/jvm-enclave/tools/Makefile b/sgx-jvm/jvm-enclave/tools/Makefile deleted file mode 100644 index 64242b495b..0000000000 --- a/sgx-jvm/jvm-enclave/tools/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -.PHONY: all clean - -LIBDIR = ../common -SOURCE = enclave-inspector.cpp ${LIBDIR}/enclave_metadata.cpp -HEADERS = ${LIBDIR}/enclave_metadata.h ${LIBDIR}/elf_types.h ${LIBDIR}/sgx_types.h -RESULT = enclave-inspector - -all: ${RESULT} - -${RESULT}: ${SOURCE} ${HEADERS} - g++ -std=c++11 -o $@ ${SOURCE} - -clean: - @rm -f ${RESULT} diff --git a/sgx-jvm/jvm-enclave/tools/enclave-inspector.cpp b/sgx-jvm/jvm-enclave/tools/enclave-inspector.cpp deleted file mode 100644 index 2f0d0b0b26..0000000000 --- a/sgx-jvm/jvm-enclave/tools/enclave-inspector.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include -#include - -#include "../common/enclave_metadata.h" - -using namespace std; - -static const char *status_messages[] = { - "Success", - "Unable to read the file", - "Unable to read the file header", - "The file is not an ELF file", - "The file is an ELF file, but only 64-bit ELF files are supported", - "Unable to allocate memory", - "Unable to read section headers from file", - "Unable to find note section named \".note.sgxmeta\"", - "Invalid name of note section", - "Invalid size of note section", - "Unable to read meta data from file", -}; - -static void print_hex(uint8_t *buffer, size_t len) { - for (int i = 0; i < len; i++) { - cout << setfill('0') << setw(2) << setbase(16) << static_cast(buffer[i]) << " "; - } - cout << endl; -} - -int main(int argc, char *argv[]) { - if (argc != 2) { - cout << "SGX Enclave Inspector" << endl; - cout << "Usage: " << argv[0] << " " << endl; - return 1; - } - - uint8_t enclave_hash[32] = { 0 }; - enclave_hash_result_t result = retrieve_enclave_hash(argv[1], enclave_hash); - - cout << "Outcome: " << status_messages[result] << endl; - if (EHR_SUCCESS == result) { - cout << " Path = " << argv[1] << endl; - cout << " Hash = "; - print_hex(enclave_hash, 32); - } - - return 0; -} diff --git a/sgx-jvm/linux-sgx-driver/.gitignore b/sgx-jvm/linux-sgx-driver/.gitignore deleted file mode 100644 index 1adf5a1b79..0000000000 --- a/sgx-jvm/linux-sgx-driver/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -*.ko -*.o -*.cmd -*.mod.* -*.symvers -*.order -*.tmp_versions diff --git a/sgx-jvm/linux-sgx-driver/License.txt b/sgx-jvm/linux-sgx-driver/License.txt deleted file mode 100644 index 0defa1cb24..0000000000 --- a/sgx-jvm/linux-sgx-driver/License.txt +++ /dev/null @@ -1,4 +0,0 @@ - -Intel(R) SGX driver is licensed under GNU General Public License, version 2 (GPL-2.0) -https://opensource.org/licenses/GPL-2.0 - diff --git a/sgx-jvm/linux-sgx-driver/Makefile b/sgx-jvm/linux-sgx-driver/Makefile deleted file mode 100644 index 4b5edafdc4..0000000000 --- a/sgx-jvm/linux-sgx-driver/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -ifneq ($(KERNELRELEASE),) - isgx-y := \ - sgx_main.o \ - sgx_page_cache.o \ - sgx_ioctl.o \ - sgx_vma.o \ - sgx_util.o\ - sgx_encl.o - obj-m += isgx.o -else -KDIR := /lib/modules/$(shell uname -r)/build -PWD := $(shell pwd) - -default: - $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) CFLAGS_MODULE="-DDEBUG -g -O0" modules - -install: default - $(MAKE) INSTALL_MOD_DIR=kernel/drivers/intel/sgx -C $(KDIR) M=$(PWD) modules_install - sh -c "cat /etc/modules | grep -Fxq isgx || echo isgx >> /etc/modules" - -endif - -clean: - rm -vrf *.o *.ko *.order *.symvers *.mod.c .tmp_versions .*o.cmd diff --git a/sgx-jvm/linux-sgx-driver/README.md b/sgx-jvm/linux-sgx-driver/README.md deleted file mode 100644 index faa7cb6fa3..0000000000 --- a/sgx-jvm/linux-sgx-driver/README.md +++ /dev/null @@ -1,81 +0,0 @@ -Intel(R) Software Guard Extensions for Linux\* OS -================================================ - -# linux-sgx-driver - -Introduction ------------- -Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification. - -The Linux SGX software stack is comprised of the Intel(R) SGX driver, the Intel(R) SGX SDK, and the Intel(R) SGX Platform Software. The Intel(R) SGX SDK and Intel(R) SGX PSW are hosted in the [linux-sgx](https://github.com/01org/linux-sgx) project. - -The [linux-sgx-driver](https://github.com/01org/linux-sgx-driver) project hosts the out-of-tree driver for the Linux Intel(R) SGX software stack, which will be used until the driver upstreaming process is complete. - -Within the linux-sgx-driver project, two versions of the out-of-tree driver are provided. Both versions are compatible with the linux-sgx PSW and SDK: -- SGX 2.0 Linux Driver (sgx2) - * The sgx2 branch of the linux-sgx-driver project contains the SGX 2.0 Linux Driver. This driver has additional support for SGX 2.0-based features available in upcoming CPUs. This driver has the same behavior as the SGX Linux Driver (master) on CPUs without SGX 2.0 support. -- SGX Linux Driver (master) - * The master branch of the linux-sgx-driver project tracks the proposed upstream version of the SGX driver and does not yet support SGX 2.0-based features. - - -License -------- -See License.txt for details. - -Contributing -------- -Starting from 05/2017, we are importing the sgx driver code from the in-kernel sgx repository located at git-hub: https://github.com/jsakkine-intel/linux-sgx.git. Any contribution should be done there. Future versions of the sgx driver code will be imported later on. The motivation behind this decision is to maintain a single source code of the sgx linux driver. -An additional directory inker2ext/ has been created, it contains a script and a patch file that can be used in order to separately generate the code base of the sgx external module; it can be used in case someone wants the newest sgx driver as an external module and does not want to wait for next update. - -The sgx2 branch hosts an initial implementation supporting SGX 2.0. This patch is maintained in inker2ext/sgx2.patch in the 2.0 branch and will be periodically rebased to take updates from the linux-sgx-driver:master branch. Contributions for this patch should be managed directly through the linux-sgx-driver project on Github. - -Documentation -------------- -- [Intel(R) SGX for Linux\* OS](https://01.org/intel-softwareguard-extensions) project home page on [01.org](http://01.org) -- [Intel(R) SGX Programming Reference](https://software.intel.com/sites/default/files/managed/48/88/329298-002.pdf) - -Build and Install the Intel(R) SGX Driver ------------------------------------------ - -### Prerequisites -- Ensure that you have the following required operating systems: - * Ubuntu* Desktop-16.04-LTS 64bits - * Red Hat Enterprise Linux Server release 7.2 64bits - * CentOS 7.3.1611 64bits -- Ensure that you have the following required hardware: - * 6th Generation Intel(R) Core(TM) Processor (code named Skylake) - * 7th Generation Intel(R) Core(TM) Processor (code named Kaby Lake) -- Configure the system with the **SGX hardware enabled** option. - -### Build the Intel(R) SGX Driver -**Note:** To use the SGX 2.0 driver, checkout or download the sgx2 branch and then follow the build instructions. - -To build Intel(R) SGX driver, change the directory to the driver path and enter the following command: -``` -$ make -``` -You can find the driver *isgx.ko* generated in the same directory. - -### Install the Intel(R) SGX Driver -To install the Intel(R) SGX driver, enter the following command with root privilege: -``` -$ sudo mkdir -p "/lib/modules/"`uname -r`"/kernel/drivers/intel/sgx" -$ sudo cp isgx.ko "/lib/modules/"`uname -r`"/kernel/drivers/intel/sgx" -$ sudo sh -c "cat /etc/modules | grep -Fxq isgx || echo isgx >> /etc/modules" -$ sudo /sbin/depmod -$ sudo /sbin/modprobe isgx -``` -On Red Hat Enterprise Linux Server or CentOS, need to run below command on each reboot -``` -$ sudo /sbin/modprobe isgx -``` - -### Uninstall the Intel(R) SGX Driver -Before uninstall the Intel(R) SGX driver, make sure the aesmd service is stopped. See the topic, Start or Stop aesmd Service, on how to stop the aesmd service. -To uninstall the Intel(R) SGX driver, enter the following commands: -``` -$ sudo /sbin/modprobe -r isgx -$ sudo rm -rf "/lib/modules/"`uname -r`"/kernel/drivers/intel/sgx" -$ sudo /sbin/depmod -$ sudo /bin/sed -i '/^isgx$/d' /etc/modules -``` diff --git a/sgx-jvm/linux-sgx-driver/inker2ext/internal-to-external-tree-changes.patch b/sgx-jvm/linux-sgx-driver/inker2ext/internal-to-external-tree-changes.patch deleted file mode 100644 index 947954887f..0000000000 --- a/sgx-jvm/linux-sgx-driver/inker2ext/internal-to-external-tree-changes.patch +++ /dev/null @@ -1,1106 +0,0 @@ -From 2ff2ed01f25da0e87eb7891594f32469eae1b0bc Mon Sep 17 00:00:00 2001 -From: Serge Ayoun -Date: Mon, 23 Oct 2017 17:30:10 +0300 -Subject: [PATCH] in kernel code to out of tree driver patch. - ---- - drivers/platform/x86/intel_sgx/Makefile | 37 ++-- - drivers/platform/x86/intel_sgx/sgx.h | 6 +- - drivers/platform/x86/intel_sgx/sgx_arch.h | 269 ++++++++++++++++++++++++ - drivers/platform/x86/intel_sgx/sgx_asm.h | 233 ++++++++++++++++++++ - drivers/platform/x86/intel_sgx/sgx_encl.c | 13 +- - drivers/platform/x86/intel_sgx/sgx_ioctl.c | 6 +- - drivers/platform/x86/intel_sgx/sgx_main.c | 151 ++++--------- - drivers/platform/x86/intel_sgx/sgx_page_cache.c | 6 +- - drivers/platform/x86/intel_sgx/sgx_user.h | 139 ++++++++++++ - drivers/platform/x86/intel_sgx/sgx_util.c | 6 +- - drivers/platform/x86/intel_sgx/sgx_vma.c | 11 + - 11 files changed, 749 insertions(+), 128 deletions(-) - create mode 100644 drivers/platform/x86/intel_sgx/sgx_arch.h - create mode 100644 drivers/platform/x86/intel_sgx/sgx_asm.h - create mode 100644 drivers/platform/x86/intel_sgx/sgx_user.h - -diff --git a/drivers/platform/x86/intel_sgx/Makefile b/drivers/platform/x86/intel_sgx/Makefile -index 92af946..4b5edaf 100644 ---- a/drivers/platform/x86/intel_sgx/Makefile -+++ b/drivers/platform/x86/intel_sgx/Makefile -@@ -1,13 +1,24 @@ --# --# Intel SGX --# -- --obj-$(CONFIG_INTEL_SGX) += intel_sgx.o -- --intel_sgx-$(CONFIG_INTEL_SGX) += \ -- sgx_ioctl.o \ -- sgx_encl.o \ -- sgx_main.o \ -- sgx_page_cache.o \ -- sgx_util.o \ -- sgx_vma.o \ -+ifneq ($(KERNELRELEASE),) -+ isgx-y := \ -+ sgx_main.o \ -+ sgx_page_cache.o \ -+ sgx_ioctl.o \ -+ sgx_vma.o \ -+ sgx_util.o\ -+ sgx_encl.o -+ obj-m += isgx.o -+else -+KDIR := /lib/modules/$(shell uname -r)/build -+PWD := $(shell pwd) -+ -+default: -+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) CFLAGS_MODULE="-DDEBUG -g -O0" modules -+ -+install: default -+ $(MAKE) INSTALL_MOD_DIR=kernel/drivers/intel/sgx -C $(KDIR) M=$(PWD) modules_install -+ sh -c "cat /etc/modules | grep -Fxq isgx || echo isgx >> /etc/modules" -+ -+endif -+ -+clean: -+ rm -vrf *.o *.ko *.order *.symvers *.mod.c .tmp_versions .*o.cmd -diff --git a/drivers/platform/x86/intel_sgx/sgx.h b/drivers/platform/x86/intel_sgx/sgx.h -index 24140a3..bfc24c0 100644 ---- a/drivers/platform/x86/intel_sgx/sgx.h -+++ b/drivers/platform/x86/intel_sgx/sgx.h -@@ -60,15 +60,17 @@ - #ifndef __ARCH_INTEL_SGX_H__ - #define __ARCH_INTEL_SGX_H__ - --#include -+#include "sgx_asm.h" - #include -+#include - #include - #include - #include - #include - #include - #include --#include -+#include "sgx_arch.h" -+#include "sgx_user.h" - - #define SGX_EINIT_SPIN_COUNT 20 - #define SGX_EINIT_SLEEP_COUNT 50 -diff --git a/drivers/platform/x86/intel_sgx/sgx_arch.h b/drivers/platform/x86/intel_sgx/sgx_arch.h -new file mode 100644 -index 0000000..dcb620e ---- /dev/null -+++ b/drivers/platform/x86/intel_sgx/sgx_arch.h -@@ -0,0 +1,269 @@ -+/* -+ * This file is provided under a dual BSD/GPLv2 license. When using or -+ * redistributing this file, you may do so under either license. -+ * -+ * GPL LICENSE SUMMARY -+ * -+ * Copyright(c) 2016-2017 Intel Corporation. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * Contact Information: -+ * Jarkko Sakkinen -+ * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo -+ * -+ * BSD LICENSE -+ * -+ * Copyright(c) 2016-2017 Intel Corporation. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * * Neither the name of Intel Corporation nor the names of its -+ * contributors may be used to endorse or promote products derived -+ * from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * Authors: -+ * -+ * Jarkko Sakkinen -+ */ -+ -+#include -+#ifndef _ASM_X86_SGX_ARCH_H -+#define _ASM_X86_SGX_ARCH_H -+ -+#define SGX_SSA_GPRS_SIZE 182 -+#define SGX_SSA_MISC_EXINFO_SIZE 16 -+ -+enum sgx_misc { -+ SGX_MISC_EXINFO = 0x01, -+}; -+ -+#define SGX_MISC_RESERVED_MASK 0xFFFFFFFFFFFFFFFEL -+ -+enum sgx_attribute { -+ SGX_ATTR_DEBUG = 0x02, -+ SGX_ATTR_MODE64BIT = 0x04, -+ SGX_ATTR_PROVISIONKEY = 0x10, -+ SGX_ATTR_EINITTOKENKEY = 0x20, -+}; -+ -+#define SGX_ATTR_RESERVED_MASK 0xFFFFFFFFFFFFFFC9L -+ -+#define SGX_SECS_RESERVED1_SIZE 24 -+#define SGX_SECS_RESERVED2_SIZE 32 -+#define SGX_SECS_RESERVED3_SIZE 96 -+#define SGX_SECS_RESERVED4_SIZE 3836 -+ -+struct sgx_secs { -+ uint64_t size; -+ uint64_t base; -+ uint32_t ssaframesize; -+ uint32_t miscselect; -+ uint8_t reserved1[SGX_SECS_RESERVED1_SIZE]; -+ uint64_t attributes; -+ uint64_t xfrm; -+ uint32_t mrenclave[8]; -+ uint8_t reserved2[SGX_SECS_RESERVED2_SIZE]; -+ uint32_t mrsigner[8]; -+ uint8_t reserved3[SGX_SECS_RESERVED3_SIZE]; -+ uint16_t isvvprodid; -+ uint16_t isvsvn; -+ uint8_t reserved4[SGX_SECS_RESERVED4_SIZE]; -+}; -+ -+enum sgx_tcs_flags { -+ SGX_TCS_DBGOPTIN = 0x01, /* cleared on EADD */ -+}; -+ -+#define SGX_TCS_RESERVED_MASK 0xFFFFFFFFFFFFFFFEL -+ -+struct sgx_tcs { -+ uint64_t state; -+ uint64_t flags; -+ uint64_t ossa; -+ uint32_t cssa; -+ uint32_t nssa; -+ uint64_t oentry; -+ uint64_t aep; -+ uint64_t ofsbase; -+ uint64_t ogsbase; -+ uint32_t fslimit; -+ uint32_t gslimit; -+ uint64_t reserved[503]; -+}; -+ -+struct sgx_pageinfo { -+ uint64_t linaddr; -+ uint64_t srcpge; -+ union { -+ uint64_t secinfo; -+ uint64_t pcmd; -+ }; -+ uint64_t secs; -+} __attribute__((aligned(32))); -+ -+ -+#define SGX_SECINFO_PERMISSION_MASK 0x0000000000000007L -+#define SGX_SECINFO_PAGE_TYPE_MASK 0x000000000000FF00L -+#define SGX_SECINFO_RESERVED_MASK 0xFFFFFFFFFFFF00F8L -+ -+enum sgx_page_type { -+ SGX_PAGE_TYPE_SECS = 0x00, -+ SGX_PAGE_TYPE_TCS = 0x01, -+ SGX_PAGE_TYPE_REG = 0x02, -+ SGX_PAGE_TYPE_VA = 0x03, -+}; -+ -+enum sgx_secinfo_flags { -+ SGX_SECINFO_R = 0x01, -+ SGX_SECINFO_W = 0x02, -+ SGX_SECINFO_X = 0x04, -+ SGX_SECINFO_SECS = (SGX_PAGE_TYPE_SECS << 8), -+ SGX_SECINFO_TCS = (SGX_PAGE_TYPE_TCS << 8), -+ SGX_SECINFO_REG = (SGX_PAGE_TYPE_REG << 8), -+}; -+ -+struct sgx_secinfo { -+ uint64_t flags; -+ uint64_t reserved[7]; -+} __attribute__((aligned(64))); -+ -+struct sgx_pcmd { -+ struct sgx_secinfo secinfo; -+ uint64_t enclave_id; -+ uint8_t reserved[40]; -+ uint8_t mac[16]; -+}; -+ -+#define SGX_MODULUS_SIZE 384 -+ -+struct sgx_sigstruct_header { -+ uint64_t header1[2]; -+ uint32_t vendor; -+ uint32_t date; -+ uint64_t header2[2]; -+ uint32_t swdefined; -+ uint8_t reserved1[84]; -+}; -+ -+struct sgx_sigstruct_body { -+ uint32_t miscselect; -+ uint32_t miscmask; -+ uint8_t reserved2[20]; -+ uint64_t attributes; -+ uint64_t xfrm; -+ uint8_t attributemask[16]; -+ uint8_t mrenclave[32]; -+ uint8_t reserved3[32]; -+ uint16_t isvprodid; -+ uint16_t isvsvn; -+} __attribute__((__packed__)); -+ -+struct sgx_sigstruct { -+ struct sgx_sigstruct_header header; -+ uint8_t modulus[SGX_MODULUS_SIZE]; -+ uint32_t exponent; -+ uint8_t signature[SGX_MODULUS_SIZE]; -+ struct sgx_sigstruct_body body; -+ uint8_t reserved4[12]; -+ uint8_t q1[SGX_MODULUS_SIZE]; -+ uint8_t q2[SGX_MODULUS_SIZE]; -+}; -+ -+struct sgx_sigstruct_payload { -+ struct sgx_sigstruct_header header; -+ struct sgx_sigstruct_body body; -+}; -+ -+struct sgx_einittoken_payload { -+ uint32_t valid; -+ uint32_t reserved1[11]; -+ uint64_t attributes; -+ uint64_t xfrm; -+ uint8_t mrenclave[32]; -+ uint8_t reserved2[32]; -+ uint8_t mrsigner[32]; -+ uint8_t reserved3[32]; -+}; -+ -+struct sgx_einittoken { -+ struct sgx_einittoken_payload payload; -+ uint8_t cpusvnle[16]; -+ uint16_t isvprodidle; -+ uint16_t isvsvnle; -+ uint8_t reserved2[24]; -+ uint32_t maskedmiscselectle; -+ uint64_t maskedattributesle; -+ uint64_t maskedxfrmle; -+ uint8_t keyid[32]; -+ uint8_t mac[16]; -+}; -+ -+struct sgx_report { -+ uint8_t cpusvn[16]; -+ uint32_t miscselect; -+ uint8_t reserved1[28]; -+ uint64_t attributes; -+ uint64_t xfrm; -+ uint8_t mrenclave[32]; -+ uint8_t reserved2[32]; -+ uint8_t mrsigner[32]; -+ uint8_t reserved3[96]; -+ uint16_t isvprodid; -+ uint16_t isvsvn; -+ uint8_t reserved4[60]; -+ uint8_t reportdata[64]; -+ uint8_t keyid[32]; -+ uint8_t mac[16]; -+}; -+ -+struct sgx_targetinfo { -+ uint8_t mrenclave[32]; -+ uint64_t attributes; -+ uint64_t xfrm; -+ uint8_t reserved1[4]; -+ uint32_t miscselect; -+ uint8_t reserved2[456]; -+}; -+ -+struct sgx_keyrequest { -+ uint16_t keyname; -+ uint16_t keypolicy; -+ uint16_t isvsvn; -+ uint16_t reserved1; -+ uint8_t cpusvn[16]; -+ uint64_t attributemask; -+ uint64_t xfrmmask; -+ uint8_t keyid[32]; -+ uint32_t miscmask; -+ uint8_t reserved2[436]; -+}; -+ -+#endif /* _ASM_X86_SGX_ARCH_H */ -diff --git a/drivers/platform/x86/intel_sgx/sgx_asm.h b/drivers/platform/x86/intel_sgx/sgx_asm.h -new file mode 100644 -index 0000000..b786f34 ---- /dev/null -+++ b/drivers/platform/x86/intel_sgx/sgx_asm.h -@@ -0,0 +1,233 @@ -+/* -+ * This file is provided under a dual BSD/GPLv2 license. When using or -+ * redistributing this file, you may do so under either license. -+ * -+ * GPL LICENSE SUMMARY -+ * -+ * Copyright(c) 2016-2017 Intel Corporation. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * Contact Information: -+ * Jarkko Sakkinen -+ * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo -+ * -+ * BSD LICENSE -+ * -+ * Copyright(c) 2016-2017 Intel Corporation. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * * Neither the name of Intel Corporation nor the names of its -+ * contributors may be used to endorse or promote products derived -+ * from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * Authors: -+ * -+ * Jarkko Sakkinen -+ * Suresh Siddha -+ */ -+ -+#ifndef _ASM_X86_SGX_H -+#define _ASM_X86_SGX_H -+ -+#include "sgx_arch.h" -+#include -+#include -+#include -+#include -+ -+#define SGX_CPUID 0x12 -+ -+enum sgx_cpuid { -+ SGX_CPUID_CAPABILITIES = 0, -+ SGX_CPUID_ATTRIBUTES = 1, -+ SGX_CPUID_EPC_BANKS = 2, -+}; -+ -+enum sgx_commands { -+ ECREATE = 0x0, -+ EADD = 0x1, -+ EINIT = 0x2, -+ EREMOVE = 0x3, -+ EDGBRD = 0x4, -+ EDGBWR = 0x5, -+ EEXTEND = 0x6, -+ ELDU = 0x8, -+ EBLOCK = 0x9, -+ EPA = 0xA, -+ EWB = 0xB, -+ ETRACK = 0xC, -+ EAUG = 0xD, -+ EMODPR = 0xE, -+ EMODT = 0xF, -+}; -+ -+#ifdef CONFIG_X86_64 -+#define XAX "%%rax" -+#else -+#define XAX "%%eax" -+#endif -+ -+#define __encls_ret(rax, rbx, rcx, rdx) \ -+ ({ \ -+ int ret; \ -+ asm volatile( \ -+ "1: .byte 0x0f, 0x01, 0xcf;\n\t" \ -+ "2:\n" \ -+ ".section .fixup,\"ax\"\n" \ -+ "3: mov $-14,"XAX"\n" \ -+ " jmp 2b\n" \ -+ ".previous\n" \ -+ _ASM_EXTABLE(1b, 3b) \ -+ : "=a"(ret) \ -+ : "a"(rax), "b"(rbx), "c"(rcx), "d"(rdx) \ -+ : "memory"); \ -+ ret; \ -+ }) -+ -+#define __encls(rax, rbx, rcx, rdx...) \ -+ ({ \ -+ int ret; \ -+ asm volatile( \ -+ "1: .byte 0x0f, 0x01, 0xcf;\n\t" \ -+ " xor "XAX","XAX"\n" \ -+ "2:\n" \ -+ ".section .fixup,\"ax\"\n" \ -+ "3: mov $-14,"XAX"\n" \ -+ " jmp 2b\n" \ -+ ".previous\n" \ -+ _ASM_EXTABLE(1b, 3b) \ -+ : "=a"(ret), "=b"(rbx), "=c"(rcx) \ -+ : "a"(rax), "b"(rbx), "c"(rcx), rdx \ -+ : "memory"); \ -+ ret; \ -+ }) -+ -+static inline unsigned long __ecreate(struct sgx_pageinfo *pginfo, void *secs) -+{ -+ return __encls(ECREATE, pginfo, secs, "d"(0)); -+} -+ -+static inline int __eextend(void *secs, void *epc) -+{ -+ return __encls(EEXTEND, secs, epc, "d"(0)); -+} -+ -+static inline int __eadd(struct sgx_pageinfo *pginfo, void *epc) -+{ -+ return __encls(EADD, pginfo, epc, "d"(0)); -+} -+ -+static inline int __einit(void *sigstruct, struct sgx_einittoken *einittoken, -+ void *secs) -+{ -+ return __encls_ret(EINIT, sigstruct, secs, einittoken); -+} -+ -+static inline int __eremove(void *epc) -+{ -+ unsigned long rbx = 0; -+ unsigned long rdx = 0; -+ -+ return __encls_ret(EREMOVE, rbx, epc, rdx); -+} -+ -+static inline int __edbgwr(void *epc, unsigned long *data) -+{ -+ return __encls(EDGBWR, *data, epc, "d"(0)); -+} -+ -+static inline int __edbgrd(void *epc, unsigned long *data) -+{ -+ unsigned long rbx = 0; -+ int ret; -+ -+ ret = __encls(EDGBRD, rbx, epc, "d"(0)); -+ if (!ret) -+ *(unsigned long *) data = rbx; -+ -+ return ret; -+} -+ -+static inline int __etrack(void *epc) -+{ -+ unsigned long rbx = 0; -+ unsigned long rdx = 0; -+ -+ return __encls_ret(ETRACK, rbx, epc, rdx); -+} -+ -+static inline int __eldu(unsigned long rbx, unsigned long rcx, -+ unsigned long rdx) -+{ -+ return __encls_ret(ELDU, rbx, rcx, rdx); -+} -+ -+static inline int __eblock(unsigned long rcx) -+{ -+ unsigned long rbx = 0; -+ unsigned long rdx = 0; -+ -+ return __encls_ret(EBLOCK, rbx, rcx, rdx); -+} -+ -+static inline int __epa(void *epc) -+{ -+ unsigned long rbx = SGX_PAGE_TYPE_VA; -+ -+ return __encls(EPA, rbx, epc, "d"(0)); -+} -+ -+static inline int __ewb(struct sgx_pageinfo *pginfo, void *epc, void *va) -+{ -+ return __encls_ret(EWB, pginfo, epc, va); -+} -+ -+static inline int __eaug(struct sgx_pageinfo *pginfo, void *epc) -+{ -+ return __encls(EAUG, pginfo, epc, "d"(0)); -+} -+ -+static inline int __emodpr(struct sgx_secinfo *secinfo, void *epc) -+{ -+ unsigned long rdx = 0; -+ -+ return __encls_ret(EMODPR, secinfo, epc, rdx); -+} -+ -+static inline int __emodt(struct sgx_secinfo *secinfo, void *epc) -+{ -+ unsigned long rdx = 0; -+ -+ return __encls_ret(EMODT, secinfo, epc, rdx); -+} -+ -+#endif /* _ASM_X86_SGX_H */ -diff --git a/drivers/platform/x86/intel_sgx/sgx_encl.c b/drivers/platform/x86/intel_sgx/sgx_encl.c -index 6f69126..2669509 100644 ---- a/drivers/platform/x86/intel_sgx/sgx_encl.c -+++ b/drivers/platform/x86/intel_sgx/sgx_encl.c -@@ -64,7 +64,12 @@ - #include - #include - #include --#include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) -+ #include -+#else -+ #include -+#endif -+#include "linux/file.h" - #include - #include - #include -@@ -576,7 +581,7 @@ int sgx_encl_create(struct sgx_secs *secs) - long ret; - - encl = sgx_encl_alloc(secs); -- if (IS_ERR(secs)) -+ if (IS_ERR(encl)) - return PTR_ERR(encl); - - secs_epc = sgx_alloc_page(0); -@@ -634,8 +639,8 @@ int sgx_encl_create(struct sgx_secs *secs) - } - - if (vma->vm_start != secs->base || -- vma->vm_end != (secs->base + secs->size) || -- vma->vm_pgoff != 0) { -+ vma->vm_end != (secs->base + secs->size) -+ /* vma->vm_pgoff != 0 */) { - ret = -EINVAL; - up_read(¤t->mm->mmap_sem); - goto out; -diff --git a/drivers/platform/x86/intel_sgx/sgx_ioctl.c b/drivers/platform/x86/intel_sgx/sgx_ioctl.c -index af8b6b6..f7540fc 100644 ---- a/drivers/platform/x86/intel_sgx/sgx_ioctl.c -+++ b/drivers/platform/x86/intel_sgx/sgx_ioctl.c -@@ -64,7 +64,11 @@ - #include - #include - #include --#include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) -+ #include -+#else -+ #include -+#endif - #include - #include - #include -diff --git a/drivers/platform/x86/intel_sgx/sgx_main.c b/drivers/platform/x86/intel_sgx/sgx_main.c -index dc50410..7ff3864 100644 ---- a/drivers/platform/x86/intel_sgx/sgx_main.c -+++ b/drivers/platform/x86/intel_sgx/sgx_main.c -@@ -58,16 +58,17 @@ - * Sean Christopherson - */ - -+#include "asm/msr-index.h" - #include "sgx.h" - #include - #include - #include -+#include - #include - #include - #include - #include - #include --#include - - #define DRV_DESCRIPTION "Intel SGX Driver" - #define DRV_VERSION "0.10" -@@ -75,6 +76,11 @@ - MODULE_DESCRIPTION(DRV_DESCRIPTION); - MODULE_AUTHOR("Jarkko Sakkinen "); - MODULE_VERSION(DRV_VERSION); -+#ifndef X86_FEATURE_SGX -+ #define X86_FEATURE_SGX (9 * 32 + 2) -+#endif -+ -+#define FEATURE_CONTROL_SGX_ENABLE (1<<18) - - /* - * Global data. -@@ -152,6 +158,13 @@ static const struct file_operations sgx_fops = { - .get_unmapped_area = sgx_get_unmapped_area, - }; - -+static struct miscdevice sgx_dev = { -+ .minor = MISC_DYNAMIC_MINOR, -+ .name = "isgx", -+ .fops = &sgx_fops, -+ .mode = 0666, -+}; -+ - static int sgx_pm_suspend(struct device *dev) - { - struct sgx_tgid_ctx *ctx; -@@ -170,71 +183,8 @@ static int sgx_pm_suspend(struct device *dev) - - static SIMPLE_DEV_PM_OPS(sgx_drv_pm, sgx_pm_suspend, NULL); - --static struct bus_type sgx_bus_type = { -- .name = "sgx", --}; -- --struct sgx_context { -- struct device dev; -- struct cdev cdev; --}; -- --static dev_t sgx_devt; -- --static void sgx_dev_release(struct device *dev) --{ -- struct sgx_context *ctx = container_of(dev, struct sgx_context, dev); -- -- kfree(ctx); --} -- --static struct sgx_context *sgx_ctx_alloc(struct device *parent) --{ -- struct sgx_context *ctx; -- -- ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); -- if (!ctx) -- return ERR_PTR(-ENOMEM); -- -- device_initialize(&ctx->dev); -- -- ctx->dev.bus = &sgx_bus_type; -- ctx->dev.parent = parent; -- ctx->dev.devt = MKDEV(MAJOR(sgx_devt), 0); -- ctx->dev.release = sgx_dev_release; -- -- dev_set_name(&ctx->dev, "sgx"); -- -- cdev_init(&ctx->cdev, &sgx_fops); -- ctx->cdev.owner = THIS_MODULE; -- -- dev_set_drvdata(parent, ctx); -- -- return ctx; --} -- --static struct sgx_context *sgxm_ctx_alloc(struct device *parent) --{ -- struct sgx_context *ctx; -- int rc; -- -- ctx = sgx_ctx_alloc(parent); -- if (IS_ERR(ctx)) -- return ctx; -- -- rc = devm_add_action_or_reset(parent, (void (*)(void *))put_device, -- &ctx->dev); -- if (rc) { -- kfree(ctx); -- return ERR_PTR(rc); -- } -- -- return ctx; --} -- - static int sgx_dev_init(struct device *parent) - { -- struct sgx_context *sgx_dev; - unsigned int eax, ebx, ecx, edx; - unsigned long pa; - unsigned long size; -@@ -243,8 +193,6 @@ static int sgx_dev_init(struct device *parent) - - pr_info("intel_sgx: " DRV_DESCRIPTION " v" DRV_VERSION "\n"); - -- sgx_dev = sgxm_ctx_alloc(parent); -- - cpuid_count(SGX_CPUID, SGX_CPUID_CAPABILITIES, &eax, &ebx, &ecx, &edx); - /* Only allow misc bits supported by the driver. */ - sgx_misc_reserved = ~ebx | SGX_MISC_RESERVED_MASK; -@@ -313,7 +261,13 @@ static int sgx_dev_init(struct device *parent) - goto out_iounmap; - } - -- ret = cdev_device_add(&sgx_dev->cdev, &sgx_dev->dev); -+ sgx_dev.parent = parent; -+ ret = misc_register(&sgx_dev); -+ if (ret) { -+ pr_err("intel_sgx: misc_register() failed\n"); -+ goto out_workqueue; -+ } -+ - if (ret) - goto out_workqueue; - -@@ -328,10 +282,16 @@ static int sgx_dev_init(struct device *parent) - return ret; - } - -+static atomic_t sgx_init_flag = ATOMIC_INIT(0); - static int sgx_drv_probe(struct platform_device *pdev) - { - unsigned int eax, ebx, ecx, edx; - unsigned long fc; -+ if (atomic_cmpxchg(&sgx_init_flag, 0, 1)) { -+ pr_warn("intel_sgx: second initialization call skipped\n"); -+ return 0; -+ } -+ - - if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) - return -ENODEV; -@@ -370,11 +330,14 @@ static int sgx_drv_probe(struct platform_device *pdev) - - static int sgx_drv_remove(struct platform_device *pdev) - { -- struct device *parent = &pdev->dev; -- struct sgx_context *ctx = dev_get_drvdata(parent); - int i; - -- cdev_device_del(&ctx->cdev, &ctx->dev); -+ if (!atomic_cmpxchg(&sgx_init_flag, 1, 0)) { -+ pr_warn("intel_sgx: second release call skipped\n"); -+ return 0; -+ } -+ -+ misc_deregister(&sgx_dev); - - destroy_workqueue(sgx_add_page_wq); - #ifdef CONFIG_X86_64 -@@ -404,48 +367,24 @@ static struct platform_driver sgx_drv = { - }, - }; - --static int __init sgx_drv_subsys_init(void) -+static struct platform_device *pdev; -+int init_sgx_module(void) - { -- int ret; -- -- ret = bus_register(&sgx_bus_type); -- if (ret) -- return ret; -- -- ret = alloc_chrdev_region(&sgx_devt, 0, 1, "sgx"); -- if (ret < 0) { -- bus_unregister(&sgx_bus_type); -- return ret; -- } -- -+ platform_driver_register(&sgx_drv); -+ pdev = platform_device_register_simple("intel_sgx", 0, NULL, 0); -+ if (IS_ERR(pdev)) -+ pr_err("platform_device_register_simple failed\n"); - return 0; - } - --static void sgx_drv_subsys_exit(void) --{ -- bus_unregister(&sgx_bus_type); -- unregister_chrdev_region(sgx_devt, 1); --} -- --static int __init sgx_drv_init(void) --{ -- int ret; -- -- ret = sgx_drv_subsys_init(); -- -- ret = platform_driver_register(&sgx_drv); -- if (ret) -- sgx_drv_subsys_exit(); -- -- return ret; --} --module_init(sgx_drv_init); -- --static void __exit sgx_drv_exit(void) -+void cleanup_sgx_module(void) - { -+ dev_set_uevent_suppress(&pdev->dev, true); -+ platform_device_unregister(pdev); - platform_driver_unregister(&sgx_drv); -- sgx_drv_subsys_exit(); - } --module_exit(sgx_drv_exit); -+ -+module_init(init_sgx_module); -+module_exit(cleanup_sgx_module); - - MODULE_LICENSE("Dual BSD/GPL"); -diff --git a/drivers/platform/x86/intel_sgx/sgx_page_cache.c b/drivers/platform/x86/intel_sgx/sgx_page_cache.c -index f8883d2..8472037 100644 ---- a/drivers/platform/x86/intel_sgx/sgx_page_cache.c -+++ b/drivers/platform/x86/intel_sgx/sgx_page_cache.c -@@ -63,7 +63,11 @@ - #include - #include - #include --#include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) -+ #include -+#else -+ #include -+#endif - #include - - #define SGX_NR_LOW_EPC_PAGES_DEFAULT 32 -diff --git a/drivers/platform/x86/intel_sgx/sgx_user.h b/drivers/platform/x86/intel_sgx/sgx_user.h -new file mode 100644 -index 0000000..a15f87b ---- /dev/null -+++ b/drivers/platform/x86/intel_sgx/sgx_user.h -@@ -0,0 +1,139 @@ -+/* -+ * This file is provided under a dual BSD/GPLv2 license. When using or -+ * redistributing this file, you may do so under either license. -+ * -+ * GPL LICENSE SUMMARY -+ * -+ * Copyright(c) 2016 Intel Corporation. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of version 2 of the GNU General Public License as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * General Public License for more details. -+ * -+ * Contact Information: -+ * Jarkko Sakkinen -+ * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo -+ * -+ * BSD LICENSE -+ * -+ * Copyright(c) 2016 Intel Corporation. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * * Neither the name of Intel Corporation nor the names of its -+ * contributors may be used to endorse or promote products derived -+ * from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ * -+ * Authors: -+ * -+ * Jarkko Sakkinen -+ * Suresh Siddha -+ */ -+ -+#ifndef _UAPI_ASM_X86_SGX_H -+#define _UAPI_ASM_X86_SGX_H -+ -+#include -+#include -+ -+#define SGX_MAGIC 0xA4 -+ -+#define SGX_IOC_ENCLAVE_CREATE \ -+ _IOW(SGX_MAGIC, 0x00, struct sgx_enclave_create) -+#define SGX_IOC_ENCLAVE_ADD_PAGE \ -+ _IOW(SGX_MAGIC, 0x01, struct sgx_enclave_add_page) -+#define SGX_IOC_ENCLAVE_INIT \ -+ _IOW(SGX_MAGIC, 0x02, struct sgx_enclave_init) -+ -+/* SGX leaf instruction return values */ -+#define SGX_SUCCESS 0 -+#define SGX_INVALID_SIG_STRUCT 1 -+#define SGX_INVALID_ATTRIBUTE 2 -+#define SGX_BLKSTATE 3 -+#define SGX_INVALID_MEASUREMENT 4 -+#define SGX_NOTBLOCKABLE 5 -+#define SGX_PG_INVLD 6 -+#define SGX_LOCKFAIL 7 -+#define SGX_INVALID_SIGNATURE 8 -+#define SGX_MAC_COMPARE_FAIL 9 -+#define SGX_PAGE_NOT_BLOCKED 10 -+#define SGX_NOT_TRACKED 11 -+#define SGX_VA_SLOT_OCCUPIED 12 -+#define SGX_CHILD_PRESENT 13 -+#define SGX_ENCLAVE_ACT 14 -+#define SGX_ENTRYEPOCH_LOCKED 15 -+#define SGX_INVALID_EINITTOKEN 16 -+#define SGX_PREV_TRK_INCMPL 17 -+#define SGX_PG_IS_SECS 18 -+#define SGX_INVALID_CPUSVN 32 -+#define SGX_INVALID_ISVSVN 64 -+#define SGX_UNMASKED_EVENT 128 -+#define SGX_INVALID_KEYNAME 256 -+ -+/* IOCTL return values */ -+#define SGX_POWER_LOST_ENCLAVE 0x40000000 -+#define SGX_LE_ROLLBACK 0x40000001 -+ -+/** -+ * struct sgx_enclave_create - parameter structure for the -+ * %SGX_IOC_ENCLAVE_CREATE ioctl -+ * @src: address for the SECS page data -+ */ -+struct sgx_enclave_create { -+ __u64 src; -+} __attribute__((__packed__)); -+ -+/** -+ * struct sgx_enclave_add_page - parameter structure for the -+ * %SGX_IOC_ENCLAVE_ADD_PAGE ioctl -+ * @addr: address in the ELRANGE -+ * @src: address for the page data -+ * @secinfo: address for the SECINFO data -+ * @mrmask: bitmask for the 256 byte chunks that are to be measured -+ */ -+struct sgx_enclave_add_page { -+ __u64 addr; -+ __u64 src; -+ __u64 secinfo; -+ __u16 mrmask; -+} __attribute__((__packed__)); -+ -+/** -+ * struct sgx_enclave_init - parameter structure for the -+ * %SGX_IOC_ENCLAVE_INIT ioctl -+ * @addr: address in the ELRANGE -+ * @sigstruct: address for the page data -+ * @einittoken: EINITTOKEN -+ */ -+struct sgx_enclave_init { -+ __u64 addr; -+ __u64 sigstruct; -+ __u64 einittoken; -+} __attribute__((__packed__)); -+ -+#endif /* _UAPI_ASM_X86_SGX_H */ -diff --git a/drivers/platform/x86/intel_sgx/sgx_util.c b/drivers/platform/x86/intel_sgx/sgx_util.c -index 6ef7949..ff0e40a 100644 ---- a/drivers/platform/x86/intel_sgx/sgx_util.c -+++ b/drivers/platform/x86/intel_sgx/sgx_util.c -@@ -61,7 +61,11 @@ - #include "sgx.h" - #include - #include --#include -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) -+ #include -+#else -+ #include -+#endif - - struct page *sgx_get_backing(struct sgx_encl *encl, - struct sgx_encl_page *entry, -diff --git a/drivers/platform/x86/intel_sgx/sgx_vma.c b/drivers/platform/x86/intel_sgx/sgx_vma.c -index 54b588f..dae9eb9 100644 ---- a/drivers/platform/x86/intel_sgx/sgx_vma.c -+++ b/drivers/platform/x86/intel_sgx/sgx_vma.c -@@ -96,10 +96,21 @@ static void sgx_vma_close(struct vm_area_struct *vma) - kref_put(&encl->refcount, sgx_encl_release); - } - -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) - static int sgx_vma_fault(struct vm_fault *vmf) - { - struct vm_area_struct *vma = vmf->vma; -+#else -+static int sgx_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) -+{ -+#endif -+ -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) - unsigned long addr = (unsigned long)vmf->address; -+#else -+ unsigned long addr = (unsigned long) vmf->virtual_address; -+#endif - struct sgx_encl_page *entry; - - entry = sgx_fault_page(vma, addr, 0); --- -2.7.4 - diff --git a/sgx-jvm/linux-sgx-driver/inker2ext/kernel_2_extern.sh b/sgx-jvm/linux-sgx-driver/inker2ext/kernel_2_extern.sh deleted file mode 100755 index 869c813d49..0000000000 --- a/sgx-jvm/linux-sgx-driver/inker2ext/kernel_2_extern.sh +++ /dev/null @@ -1,26 +0,0 @@ -#! /bin/bash -# Should be run from git-hub sgx driver root directory. -# Assumes in kernel sgx master branch code repo has been cloned -# -# Usage: -# kernel_2_extern -pa=`pwd` - -patchfile="$pa/inker2ext/internal-to-external-tree-changes.patch" - -if [ ! -f $file ]; then - echo "Missing patch file: $file" - echo "You should run the script from the out of tree driver repository root directory" - exit -fi - -cd $1 -git apply $patchfile - -cp *.c $pa -cp *.h $pa -cp Makefile $pa - -cd $pa - - diff --git a/sgx-jvm/linux-sgx-driver/sgx.h b/sgx-jvm/linux-sgx-driver/sgx.h deleted file mode 100644 index bfc24c08c3..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx.h +++ /dev/null @@ -1,254 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - * Serge Ayoun - * Shay Katz-zamir - */ - -#ifndef __ARCH_INTEL_SGX_H__ -#define __ARCH_INTEL_SGX_H__ - -#include "sgx_asm.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include "sgx_arch.h" -#include "sgx_user.h" - -#define SGX_EINIT_SPIN_COUNT 20 -#define SGX_EINIT_SLEEP_COUNT 50 -#define SGX_EINIT_SLEEP_TIME 20 - -#define SGX_VA_SLOT_COUNT 512 - -struct sgx_epc_page { - resource_size_t pa; - struct list_head list; - struct sgx_encl_page *encl_page; -}; - -enum sgx_alloc_flags { - SGX_ALLOC_ATOMIC = BIT(0), -}; - -struct sgx_va_page { - struct sgx_epc_page *epc_page; - DECLARE_BITMAP(slots, SGX_VA_SLOT_COUNT); - struct list_head list; -}; - -static inline unsigned int sgx_alloc_va_slot(struct sgx_va_page *page) -{ - int slot = find_first_zero_bit(page->slots, SGX_VA_SLOT_COUNT); - - if (slot < SGX_VA_SLOT_COUNT) - set_bit(slot, page->slots); - - return slot << 3; -} - -static inline void sgx_free_va_slot(struct sgx_va_page *page, - unsigned int offset) -{ - clear_bit(offset >> 3, page->slots); -} - -enum sgx_encl_page_flags { - SGX_ENCL_PAGE_TCS = BIT(0), - SGX_ENCL_PAGE_RESERVED = BIT(1), -}; - -struct sgx_encl_page { - unsigned long addr; - unsigned int flags; - struct sgx_epc_page *epc_page; - struct sgx_va_page *va_page; - unsigned int va_offset; -}; - -struct sgx_tgid_ctx { - struct pid *tgid; - struct kref refcount; - struct list_head encl_list; - struct list_head list; -}; - -enum sgx_encl_flags { - SGX_ENCL_INITIALIZED = BIT(0), - SGX_ENCL_DEBUG = BIT(1), - SGX_ENCL_SECS_EVICTED = BIT(2), - SGX_ENCL_SUSPEND = BIT(3), - SGX_ENCL_DEAD = BIT(4), -}; - -struct sgx_encl { - unsigned int flags; - uint64_t attributes; - uint64_t xfrm; - unsigned int secs_child_cnt; - struct mutex lock; - struct mm_struct *mm; - struct file *backing; - struct file *pcmd; - struct list_head load_list; - struct kref refcount; - unsigned long base; - unsigned long size; - unsigned long ssaframesize; - struct list_head va_pages; - struct radix_tree_root page_tree; - struct list_head add_page_reqs; - struct work_struct add_page_work; - struct sgx_encl_page secs; - struct sgx_tgid_ctx *tgid_ctx; - struct list_head encl_list; - struct mmu_notifier mmu_notifier; -}; - -struct sgx_epc_bank { - unsigned long pa; -#ifdef CONFIG_X86_64 - unsigned long va; -#endif - unsigned long size; -}; - -extern struct workqueue_struct *sgx_add_page_wq; -extern struct sgx_epc_bank sgx_epc_banks[]; -extern int sgx_nr_epc_banks; -extern u64 sgx_encl_size_max_32; -extern u64 sgx_encl_size_max_64; -extern u64 sgx_xfrm_mask; -extern u32 sgx_misc_reserved; -extern u32 sgx_xsave_size_tbl[64]; - -extern const struct vm_operations_struct sgx_vm_ops; - -#define sgx_pr_ratelimited(level, encl, fmt, ...) \ - pr_ ## level ## _ratelimited("intel_sgx: [%d:0x%p] " fmt, \ - pid_nr((encl)->tgid_ctx->tgid), \ - (void *)(encl)->base, ##__VA_ARGS__) - -#define sgx_dbg(encl, fmt, ...) \ - sgx_pr_ratelimited(debug, encl, fmt, ##__VA_ARGS__) -#define sgx_info(encl, fmt, ...) \ - sgx_pr_ratelimited(info, encl, fmt, ##__VA_ARGS__) -#define sgx_warn(encl, fmt, ...) \ - sgx_pr_ratelimited(warn, encl, fmt, ##__VA_ARGS__) -#define sgx_err(encl, fmt, ...) \ - sgx_pr_ratelimited(err, encl, fmt, ##__VA_ARGS__) -#define sgx_crit(encl, fmt, ...) \ - sgx_pr_ratelimited(crit, encl, fmt, ##__VA_ARGS__) - -int sgx_encl_find(struct mm_struct *mm, unsigned long addr, - struct vm_area_struct **vma); -void sgx_tgid_ctx_release(struct kref *ref); -int sgx_encl_create(struct sgx_secs *secs); -int sgx_encl_add_page(struct sgx_encl *encl, unsigned long addr, void *data, - struct sgx_secinfo *secinfo, unsigned int mrmask); -int sgx_encl_init(struct sgx_encl *encl, struct sgx_sigstruct *sigstruct, - struct sgx_einittoken *einittoken); -void sgx_encl_release(struct kref *ref); - -long sgx_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); -#ifdef CONFIG_COMPAT -long sgx_compat_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); -#endif - -/* Utility functions */ -int sgx_test_and_clear_young(struct sgx_encl_page *page, struct sgx_encl *encl); -struct page *sgx_get_backing(struct sgx_encl *encl, - struct sgx_encl_page *entry, - bool pcmd); -void sgx_put_backing(struct page *backing, bool write); -void sgx_insert_pte(struct sgx_encl *encl, - struct sgx_encl_page *encl_page, - struct sgx_epc_page *epc_page, - struct vm_area_struct *vma); -int sgx_eremove(struct sgx_epc_page *epc_page); -void sgx_zap_tcs_ptes(struct sgx_encl *encl, - struct vm_area_struct *vma); -void sgx_invalidate(struct sgx_encl *encl, bool flush_cpus); -void sgx_flush_cpus(struct sgx_encl *encl); - -enum sgx_fault_flags { - SGX_FAULT_RESERVE = BIT(0), -}; - -struct sgx_encl_page *sgx_fault_page(struct vm_area_struct *vma, - unsigned long addr, - unsigned int flags); - - -extern struct mutex sgx_tgid_ctx_mutex; -extern struct list_head sgx_tgid_ctx_list; -extern atomic_t sgx_va_pages_cnt; - -int sgx_add_epc_bank(resource_size_t start, unsigned long size, int bank); -int sgx_page_cache_init(void); -void sgx_page_cache_teardown(void); -struct sgx_epc_page *sgx_alloc_page(unsigned int flags); -void sgx_free_page(struct sgx_epc_page *entry, struct sgx_encl *encl); -void *sgx_get_page(struct sgx_epc_page *entry); -void sgx_put_page(void *epc_page_vaddr); -void sgx_eblock(struct sgx_encl *encl, struct sgx_epc_page *epc_page); -void sgx_etrack(struct sgx_encl *encl); - -#endif /* __ARCH_X86_INTEL_SGX_H__ */ diff --git a/sgx-jvm/linux-sgx-driver/sgx_arch.h b/sgx-jvm/linux-sgx-driver/sgx_arch.h deleted file mode 100644 index dcb620e23d..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_arch.h +++ /dev/null @@ -1,269 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - */ - -#include -#ifndef _ASM_X86_SGX_ARCH_H -#define _ASM_X86_SGX_ARCH_H - -#define SGX_SSA_GPRS_SIZE 182 -#define SGX_SSA_MISC_EXINFO_SIZE 16 - -enum sgx_misc { - SGX_MISC_EXINFO = 0x01, -}; - -#define SGX_MISC_RESERVED_MASK 0xFFFFFFFFFFFFFFFEL - -enum sgx_attribute { - SGX_ATTR_DEBUG = 0x02, - SGX_ATTR_MODE64BIT = 0x04, - SGX_ATTR_PROVISIONKEY = 0x10, - SGX_ATTR_EINITTOKENKEY = 0x20, -}; - -#define SGX_ATTR_RESERVED_MASK 0xFFFFFFFFFFFFFFC9L - -#define SGX_SECS_RESERVED1_SIZE 24 -#define SGX_SECS_RESERVED2_SIZE 32 -#define SGX_SECS_RESERVED3_SIZE 96 -#define SGX_SECS_RESERVED4_SIZE 3836 - -struct sgx_secs { - uint64_t size; - uint64_t base; - uint32_t ssaframesize; - uint32_t miscselect; - uint8_t reserved1[SGX_SECS_RESERVED1_SIZE]; - uint64_t attributes; - uint64_t xfrm; - uint32_t mrenclave[8]; - uint8_t reserved2[SGX_SECS_RESERVED2_SIZE]; - uint32_t mrsigner[8]; - uint8_t reserved3[SGX_SECS_RESERVED3_SIZE]; - uint16_t isvvprodid; - uint16_t isvsvn; - uint8_t reserved4[SGX_SECS_RESERVED4_SIZE]; -}; - -enum sgx_tcs_flags { - SGX_TCS_DBGOPTIN = 0x01, /* cleared on EADD */ -}; - -#define SGX_TCS_RESERVED_MASK 0xFFFFFFFFFFFFFFFEL - -struct sgx_tcs { - uint64_t state; - uint64_t flags; - uint64_t ossa; - uint32_t cssa; - uint32_t nssa; - uint64_t oentry; - uint64_t aep; - uint64_t ofsbase; - uint64_t ogsbase; - uint32_t fslimit; - uint32_t gslimit; - uint64_t reserved[503]; -}; - -struct sgx_pageinfo { - uint64_t linaddr; - uint64_t srcpge; - union { - uint64_t secinfo; - uint64_t pcmd; - }; - uint64_t secs; -} __attribute__((aligned(32))); - - -#define SGX_SECINFO_PERMISSION_MASK 0x0000000000000007L -#define SGX_SECINFO_PAGE_TYPE_MASK 0x000000000000FF00L -#define SGX_SECINFO_RESERVED_MASK 0xFFFFFFFFFFFF00F8L - -enum sgx_page_type { - SGX_PAGE_TYPE_SECS = 0x00, - SGX_PAGE_TYPE_TCS = 0x01, - SGX_PAGE_TYPE_REG = 0x02, - SGX_PAGE_TYPE_VA = 0x03, -}; - -enum sgx_secinfo_flags { - SGX_SECINFO_R = 0x01, - SGX_SECINFO_W = 0x02, - SGX_SECINFO_X = 0x04, - SGX_SECINFO_SECS = (SGX_PAGE_TYPE_SECS << 8), - SGX_SECINFO_TCS = (SGX_PAGE_TYPE_TCS << 8), - SGX_SECINFO_REG = (SGX_PAGE_TYPE_REG << 8), -}; - -struct sgx_secinfo { - uint64_t flags; - uint64_t reserved[7]; -} __attribute__((aligned(64))); - -struct sgx_pcmd { - struct sgx_secinfo secinfo; - uint64_t enclave_id; - uint8_t reserved[40]; - uint8_t mac[16]; -}; - -#define SGX_MODULUS_SIZE 384 - -struct sgx_sigstruct_header { - uint64_t header1[2]; - uint32_t vendor; - uint32_t date; - uint64_t header2[2]; - uint32_t swdefined; - uint8_t reserved1[84]; -}; - -struct sgx_sigstruct_body { - uint32_t miscselect; - uint32_t miscmask; - uint8_t reserved2[20]; - uint64_t attributes; - uint64_t xfrm; - uint8_t attributemask[16]; - uint8_t mrenclave[32]; - uint8_t reserved3[32]; - uint16_t isvprodid; - uint16_t isvsvn; -} __attribute__((__packed__)); - -struct sgx_sigstruct { - struct sgx_sigstruct_header header; - uint8_t modulus[SGX_MODULUS_SIZE]; - uint32_t exponent; - uint8_t signature[SGX_MODULUS_SIZE]; - struct sgx_sigstruct_body body; - uint8_t reserved4[12]; - uint8_t q1[SGX_MODULUS_SIZE]; - uint8_t q2[SGX_MODULUS_SIZE]; -}; - -struct sgx_sigstruct_payload { - struct sgx_sigstruct_header header; - struct sgx_sigstruct_body body; -}; - -struct sgx_einittoken_payload { - uint32_t valid; - uint32_t reserved1[11]; - uint64_t attributes; - uint64_t xfrm; - uint8_t mrenclave[32]; - uint8_t reserved2[32]; - uint8_t mrsigner[32]; - uint8_t reserved3[32]; -}; - -struct sgx_einittoken { - struct sgx_einittoken_payload payload; - uint8_t cpusvnle[16]; - uint16_t isvprodidle; - uint16_t isvsvnle; - uint8_t reserved2[24]; - uint32_t maskedmiscselectle; - uint64_t maskedattributesle; - uint64_t maskedxfrmle; - uint8_t keyid[32]; - uint8_t mac[16]; -}; - -struct sgx_report { - uint8_t cpusvn[16]; - uint32_t miscselect; - uint8_t reserved1[28]; - uint64_t attributes; - uint64_t xfrm; - uint8_t mrenclave[32]; - uint8_t reserved2[32]; - uint8_t mrsigner[32]; - uint8_t reserved3[96]; - uint16_t isvprodid; - uint16_t isvsvn; - uint8_t reserved4[60]; - uint8_t reportdata[64]; - uint8_t keyid[32]; - uint8_t mac[16]; -}; - -struct sgx_targetinfo { - uint8_t mrenclave[32]; - uint64_t attributes; - uint64_t xfrm; - uint8_t reserved1[4]; - uint32_t miscselect; - uint8_t reserved2[456]; -}; - -struct sgx_keyrequest { - uint16_t keyname; - uint16_t keypolicy; - uint16_t isvsvn; - uint16_t reserved1; - uint8_t cpusvn[16]; - uint64_t attributemask; - uint64_t xfrmmask; - uint8_t keyid[32]; - uint32_t miscmask; - uint8_t reserved2[436]; -}; - -#endif /* _ASM_X86_SGX_ARCH_H */ diff --git a/sgx-jvm/linux-sgx-driver/sgx_asm.h b/sgx-jvm/linux-sgx-driver/sgx_asm.h deleted file mode 100644 index b786f3459d..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_asm.h +++ /dev/null @@ -1,233 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - */ - -#ifndef _ASM_X86_SGX_H -#define _ASM_X86_SGX_H - -#include "sgx_arch.h" -#include -#include -#include -#include - -#define SGX_CPUID 0x12 - -enum sgx_cpuid { - SGX_CPUID_CAPABILITIES = 0, - SGX_CPUID_ATTRIBUTES = 1, - SGX_CPUID_EPC_BANKS = 2, -}; - -enum sgx_commands { - ECREATE = 0x0, - EADD = 0x1, - EINIT = 0x2, - EREMOVE = 0x3, - EDGBRD = 0x4, - EDGBWR = 0x5, - EEXTEND = 0x6, - ELDU = 0x8, - EBLOCK = 0x9, - EPA = 0xA, - EWB = 0xB, - ETRACK = 0xC, - EAUG = 0xD, - EMODPR = 0xE, - EMODT = 0xF, -}; - -#ifdef CONFIG_X86_64 -#define XAX "%%rax" -#else -#define XAX "%%eax" -#endif - -#define __encls_ret(rax, rbx, rcx, rdx) \ - ({ \ - int ret; \ - asm volatile( \ - "1: .byte 0x0f, 0x01, 0xcf;\n\t" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: mov $-14,"XAX"\n" \ - " jmp 2b\n" \ - ".previous\n" \ - _ASM_EXTABLE(1b, 3b) \ - : "=a"(ret) \ - : "a"(rax), "b"(rbx), "c"(rcx), "d"(rdx) \ - : "memory"); \ - ret; \ - }) - -#define __encls(rax, rbx, rcx, rdx...) \ - ({ \ - int ret; \ - asm volatile( \ - "1: .byte 0x0f, 0x01, 0xcf;\n\t" \ - " xor "XAX","XAX"\n" \ - "2:\n" \ - ".section .fixup,\"ax\"\n" \ - "3: mov $-14,"XAX"\n" \ - " jmp 2b\n" \ - ".previous\n" \ - _ASM_EXTABLE(1b, 3b) \ - : "=a"(ret), "=b"(rbx), "=c"(rcx) \ - : "a"(rax), "b"(rbx), "c"(rcx), rdx \ - : "memory"); \ - ret; \ - }) - -static inline unsigned long __ecreate(struct sgx_pageinfo *pginfo, void *secs) -{ - return __encls(ECREATE, pginfo, secs, "d"(0)); -} - -static inline int __eextend(void *secs, void *epc) -{ - return __encls(EEXTEND, secs, epc, "d"(0)); -} - -static inline int __eadd(struct sgx_pageinfo *pginfo, void *epc) -{ - return __encls(EADD, pginfo, epc, "d"(0)); -} - -static inline int __einit(void *sigstruct, struct sgx_einittoken *einittoken, - void *secs) -{ - return __encls_ret(EINIT, sigstruct, secs, einittoken); -} - -static inline int __eremove(void *epc) -{ - unsigned long rbx = 0; - unsigned long rdx = 0; - - return __encls_ret(EREMOVE, rbx, epc, rdx); -} - -static inline int __edbgwr(void *epc, unsigned long *data) -{ - return __encls(EDGBWR, *data, epc, "d"(0)); -} - -static inline int __edbgrd(void *epc, unsigned long *data) -{ - unsigned long rbx = 0; - int ret; - - ret = __encls(EDGBRD, rbx, epc, "d"(0)); - if (!ret) - *(unsigned long *) data = rbx; - - return ret; -} - -static inline int __etrack(void *epc) -{ - unsigned long rbx = 0; - unsigned long rdx = 0; - - return __encls_ret(ETRACK, rbx, epc, rdx); -} - -static inline int __eldu(unsigned long rbx, unsigned long rcx, - unsigned long rdx) -{ - return __encls_ret(ELDU, rbx, rcx, rdx); -} - -static inline int __eblock(unsigned long rcx) -{ - unsigned long rbx = 0; - unsigned long rdx = 0; - - return __encls_ret(EBLOCK, rbx, rcx, rdx); -} - -static inline int __epa(void *epc) -{ - unsigned long rbx = SGX_PAGE_TYPE_VA; - - return __encls(EPA, rbx, epc, "d"(0)); -} - -static inline int __ewb(struct sgx_pageinfo *pginfo, void *epc, void *va) -{ - return __encls_ret(EWB, pginfo, epc, va); -} - -static inline int __eaug(struct sgx_pageinfo *pginfo, void *epc) -{ - return __encls(EAUG, pginfo, epc, "d"(0)); -} - -static inline int __emodpr(struct sgx_secinfo *secinfo, void *epc) -{ - unsigned long rdx = 0; - - return __encls_ret(EMODPR, secinfo, epc, rdx); -} - -static inline int __emodt(struct sgx_secinfo *secinfo, void *epc) -{ - unsigned long rdx = 0; - - return __encls_ret(EMODT, secinfo, epc, rdx); -} - -#endif /* _ASM_X86_SGX_H */ diff --git a/sgx-jvm/linux-sgx-driver/sgx_encl.c b/sgx-jvm/linux-sgx-driver/sgx_encl.c deleted file mode 100644 index 2669509e96..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_encl.c +++ /dev/null @@ -1,993 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - * Serge Ayoun - * Shay Katz-zamir - * Sean Christopherson - */ - -#include "sgx.h" -#include -#include -#include -#include -#include -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) - #include -#else - #include -#endif -#include "linux/file.h" -#include -#include -#include - -struct sgx_add_page_req { - struct sgx_encl *encl; - struct sgx_encl_page *encl_page; - struct sgx_secinfo secinfo; - u16 mrmask; - struct list_head list; -}; - -/** - * sgx_encl_find - find an enclave - * @mm: mm struct of the current process - * @addr: address in the ELRANGE - * @vma: the resulting VMA - * - * Finds an enclave identified by the given address. Gives back the VMA, that - * is part of the enclave, located in that address. The VMA is given back if it - * is a proper enclave VMA even if a &struct sgx_encl instance does not exist - * yet (enclave creation has not been performed). - * - * Return: - * 0 on success, - * -EINVAL if an enclave was not found, - * -ENOENT if the enclave has not been created yet - */ -int sgx_encl_find(struct mm_struct *mm, unsigned long addr, - struct vm_area_struct **vma) -{ - struct vm_area_struct *result; - struct sgx_encl *encl; - - result = find_vma(mm, addr); - if (!result || result->vm_ops != &sgx_vm_ops || addr < result->vm_start) - return -EINVAL; - - encl = result->vm_private_data; - *vma = result; - - return encl ? 0 : -ENOENT; -} - -static struct sgx_tgid_ctx *sgx_find_tgid_ctx(struct pid *tgid) -{ - struct sgx_tgid_ctx *ctx; - - list_for_each_entry(ctx, &sgx_tgid_ctx_list, list) - if (pid_nr(ctx->tgid) == pid_nr(tgid)) - return ctx; - - return NULL; -} - -static int sgx_add_to_tgid_ctx(struct sgx_encl *encl) -{ - struct sgx_tgid_ctx *ctx; - struct pid *tgid = get_pid(task_tgid(current)); - - mutex_lock(&sgx_tgid_ctx_mutex); - - ctx = sgx_find_tgid_ctx(tgid); - if (ctx) { - if (kref_get_unless_zero(&ctx->refcount)) { - encl->tgid_ctx = ctx; - mutex_unlock(&sgx_tgid_ctx_mutex); - put_pid(tgid); - return 0; - } else { - list_del_init(&ctx->list); - } - } - - ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); - if (!ctx) { - mutex_unlock(&sgx_tgid_ctx_mutex); - put_pid(tgid); - return -ENOMEM; - } - - ctx->tgid = tgid; - kref_init(&ctx->refcount); - INIT_LIST_HEAD(&ctx->encl_list); - - list_add(&ctx->list, &sgx_tgid_ctx_list); - - encl->tgid_ctx = ctx; - - mutex_unlock(&sgx_tgid_ctx_mutex); - return 0; -} - -void sgx_tgid_ctx_release(struct kref *ref) -{ - struct sgx_tgid_ctx *pe = - container_of(ref, struct sgx_tgid_ctx, refcount); - mutex_lock(&sgx_tgid_ctx_mutex); - list_del(&pe->list); - mutex_unlock(&sgx_tgid_ctx_mutex); - put_pid(pe->tgid); - kfree(pe); -} - -static int sgx_measure(struct sgx_epc_page *secs_page, - struct sgx_epc_page *epc_page, - u16 mrmask) -{ - void *secs; - void *epc; - int ret = 0; - int i, j; - - for (i = 0, j = 1; i < 0x1000 && !ret; i += 0x100, j <<= 1) { - if (!(j & mrmask)) - continue; - - secs = sgx_get_page(secs_page); - epc = sgx_get_page(epc_page); - - ret = __eextend(secs, (void *)((unsigned long)epc + i)); - - sgx_put_page(epc); - sgx_put_page(secs); - } - - return ret; -} - -static int sgx_eadd(struct sgx_epc_page *secs_page, - struct sgx_epc_page *epc_page, - unsigned long linaddr, - struct sgx_secinfo *secinfo, - struct page *backing) -{ - struct sgx_pageinfo pginfo; - void *epc_page_vaddr; - int ret; - - pginfo.srcpge = (unsigned long)kmap_atomic(backing); - pginfo.secs = (unsigned long)sgx_get_page(secs_page); - epc_page_vaddr = sgx_get_page(epc_page); - - pginfo.linaddr = linaddr; - pginfo.secinfo = (unsigned long)secinfo; - ret = __eadd(&pginfo, epc_page_vaddr); - - sgx_put_page(epc_page_vaddr); - sgx_put_page((void *)(unsigned long)pginfo.secs); - kunmap_atomic((void *)(unsigned long)pginfo.srcpge); - - return ret; -} - -static bool sgx_process_add_page_req(struct sgx_add_page_req *req, - struct sgx_epc_page *epc_page) -{ - struct page *backing; - struct sgx_encl_page *encl_page = req->encl_page; - struct sgx_encl *encl = req->encl; - struct vm_area_struct *vma; - int ret; - - if (encl->flags & (SGX_ENCL_SUSPEND | SGX_ENCL_DEAD)) - return false; - - ret = sgx_encl_find(encl->mm, encl_page->addr, &vma); - if (ret) - return false; - - backing = sgx_get_backing(encl, encl_page, false); - if (IS_ERR(backing)) - return false; - - /* Do not race with do_exit() */ - if (!atomic_read(&encl->mm->mm_users)) { - sgx_put_backing(backing, 0); - return false; - } - - ret = vm_insert_pfn(vma, encl_page->addr, PFN_DOWN(epc_page->pa)); - if (ret) { - sgx_put_backing(backing, 0); - return false; - } - - ret = sgx_eadd(encl->secs.epc_page, epc_page, encl_page->addr, - &req->secinfo, backing); - - sgx_put_backing(backing, 0); - if (ret) { - sgx_warn(encl, "EADD returned %d\n", ret); - zap_vma_ptes(vma, encl_page->addr, PAGE_SIZE); - return false; - } - - encl->secs_child_cnt++; - - ret = sgx_measure(encl->secs.epc_page, epc_page, req->mrmask); - if (ret) { - sgx_warn(encl, "EEXTEND returned %d\n", ret); - zap_vma_ptes(vma, encl_page->addr, PAGE_SIZE); - return false; - } - - epc_page->encl_page = encl_page; - encl_page->epc_page = epc_page; - sgx_test_and_clear_young(encl_page, encl); - list_add_tail(&epc_page->list, &encl->load_list); - - return true; -} - -static void sgx_add_page_worker(struct work_struct *work) -{ - struct sgx_encl *encl; - struct sgx_add_page_req *req; - struct sgx_epc_page *epc_page; - bool skip_rest = false; - bool is_empty = false; - - encl = container_of(work, struct sgx_encl, add_page_work); - - do { - schedule(); - - if (encl->flags & SGX_ENCL_DEAD) - skip_rest = true; - - mutex_lock(&encl->lock); - req = list_first_entry(&encl->add_page_reqs, - struct sgx_add_page_req, list); - list_del(&req->list); - is_empty = list_empty(&encl->add_page_reqs); - mutex_unlock(&encl->lock); - - if (skip_rest) - goto next; - - epc_page = sgx_alloc_page(0); - if (IS_ERR(epc_page)) { - skip_rest = true; - goto next; - } - - down_read(&encl->mm->mmap_sem); - mutex_lock(&encl->lock); - - if (!sgx_process_add_page_req(req, epc_page)) { - sgx_free_page(epc_page, encl); - skip_rest = true; - } - - mutex_unlock(&encl->lock); - up_read(&encl->mm->mmap_sem); - -next: - kfree(req); - } while (!kref_put(&encl->refcount, sgx_encl_release) && !is_empty); -} - -static u32 sgx_calc_ssaframesize(u32 miscselect, u64 xfrm) -{ - u32 size_max = PAGE_SIZE; - u32 size; - int i; - - for (i = 2; i < 64; i++) { - if (!((1 << i) & xfrm)) - continue; - - size = SGX_SSA_GPRS_SIZE + sgx_xsave_size_tbl[i]; - if (miscselect & SGX_MISC_EXINFO) - size += SGX_SSA_MISC_EXINFO_SIZE; - - if (size > size_max) - size_max = size; - } - - return (size_max + PAGE_SIZE - 1) >> PAGE_SHIFT; -} - -static int sgx_validate_secs(const struct sgx_secs *secs, - unsigned long ssaframesize) -{ - int i; - - if (secs->size < (2 * PAGE_SIZE) || - (secs->size & (secs->size - 1)) != 0) - return -EINVAL; - - if (secs->base & (secs->size - 1)) - return -EINVAL; - - if (secs->attributes & SGX_ATTR_RESERVED_MASK || - secs->miscselect & sgx_misc_reserved) - return -EINVAL; - - if (secs->attributes & SGX_ATTR_MODE64BIT) { -#ifdef CONFIG_X86_64 - if (secs->size > sgx_encl_size_max_64) - return -EINVAL; -#else - return -EINVAL; -#endif - } else { - /* On 64-bit architecture allow 32-bit encls only in - * the compatibility mode. - */ -#ifdef CONFIG_X86_64 - if (!test_thread_flag(TIF_ADDR32)) - return -EINVAL; -#endif - if (secs->size > sgx_encl_size_max_32) - return -EINVAL; - } - - if ((secs->xfrm & 0x3) != 0x3 || (secs->xfrm & ~sgx_xfrm_mask)) - return -EINVAL; - - /* Check that BNDREGS and BNDCSR are equal. */ - if (((secs->xfrm >> 3) & 1) != ((secs->xfrm >> 4) & 1)) - return -EINVAL; - - if (!secs->ssaframesize || ssaframesize > secs->ssaframesize) - return -EINVAL; - - for (i = 0; i < SGX_SECS_RESERVED1_SIZE; i++) - if (secs->reserved1[i]) - return -EINVAL; - - for (i = 0; i < SGX_SECS_RESERVED2_SIZE; i++) - if (secs->reserved2[i]) - return -EINVAL; - - for (i = 0; i < SGX_SECS_RESERVED3_SIZE; i++) - if (secs->reserved3[i]) - return -EINVAL; - - for (i = 0; i < SGX_SECS_RESERVED4_SIZE; i++) - if (secs->reserved4[i]) - return -EINVAL; - - return 0; -} - -static void sgx_mmu_notifier_release(struct mmu_notifier *mn, - struct mm_struct *mm) -{ - struct sgx_encl *encl = - container_of(mn, struct sgx_encl, mmu_notifier); - - mutex_lock(&encl->lock); - encl->flags |= SGX_ENCL_DEAD; - mutex_unlock(&encl->lock); -} - -static const struct mmu_notifier_ops sgx_mmu_notifier_ops = { - .release = sgx_mmu_notifier_release, -}; - -static int sgx_init_page(struct sgx_encl *encl, struct sgx_encl_page *entry, - unsigned long addr, unsigned int alloc_flags) -{ - struct sgx_va_page *va_page; - struct sgx_epc_page *epc_page = NULL; - unsigned int va_offset = PAGE_SIZE; - void *vaddr; - int ret = 0; - - list_for_each_entry(va_page, &encl->va_pages, list) { - va_offset = sgx_alloc_va_slot(va_page); - if (va_offset < PAGE_SIZE) - break; - } - - if (va_offset == PAGE_SIZE) { - va_page = kzalloc(sizeof(*va_page), GFP_KERNEL); - if (!va_page) - return -ENOMEM; - - epc_page = sgx_alloc_page(alloc_flags); - if (IS_ERR(epc_page)) { - kfree(va_page); - return PTR_ERR(epc_page); - } - - vaddr = sgx_get_page(epc_page); - if (!vaddr) { - sgx_warn(encl, "kmap of a new VA page failed %d\n", - ret); - sgx_free_page(epc_page, encl); - kfree(va_page); - return -EFAULT; - } - - ret = __epa(vaddr); - sgx_put_page(vaddr); - - if (ret) { - sgx_warn(encl, "EPA returned %d\n", ret); - sgx_free_page(epc_page, encl); - kfree(va_page); - return -EFAULT; - } - - atomic_inc(&sgx_va_pages_cnt); - - va_page->epc_page = epc_page; - va_offset = sgx_alloc_va_slot(va_page); - - mutex_lock(&encl->lock); - list_add(&va_page->list, &encl->va_pages); - mutex_unlock(&encl->lock); - } - - entry->va_page = va_page; - entry->va_offset = va_offset; - entry->addr = addr; - - return 0; -} - -/** - * sgx_encl_alloc - allocate memory for an enclave and set attributes - * - * @secs: SECS data (must be page aligned) - * - * Allocates a new &struct sgx_encl instance. Validates SECS attributes, creates - * backing storage for the enclave and sets enclave attributes to sane initial - * values. - * - * Return: - * &struct sgx_encl instance on success, - * system error on failure - */ -static struct sgx_encl *sgx_encl_alloc(struct sgx_secs *secs) -{ - unsigned long ssaframesize; - struct sgx_encl *encl; - struct file *backing; - struct file *pcmd; - - ssaframesize = sgx_calc_ssaframesize(secs->miscselect, secs->xfrm); - if (sgx_validate_secs(secs, ssaframesize)) - return ERR_PTR(-EINVAL); - - backing = shmem_file_setup("[dev/sgx]", secs->size + PAGE_SIZE, - VM_NORESERVE); - if (IS_ERR(backing)) - return (void *)backing; - - pcmd = shmem_file_setup("[dev/sgx]", (secs->size + PAGE_SIZE) >> 5, - VM_NORESERVE); - if (IS_ERR(pcmd)) { - fput(backing); - return (void *)pcmd; - } - - encl = kzalloc(sizeof(*encl), GFP_KERNEL); - if (!encl) { - fput(backing); - fput(pcmd); - return ERR_PTR(-ENOMEM); - } - - encl->attributes = secs->attributes; - encl->xfrm = secs->xfrm; - - kref_init(&encl->refcount); - INIT_LIST_HEAD(&encl->add_page_reqs); - INIT_LIST_HEAD(&encl->va_pages); - INIT_RADIX_TREE(&encl->page_tree, GFP_KERNEL); - INIT_LIST_HEAD(&encl->load_list); - INIT_LIST_HEAD(&encl->encl_list); - mutex_init(&encl->lock); - INIT_WORK(&encl->add_page_work, sgx_add_page_worker); - - encl->mm = current->mm; - encl->base = secs->base; - encl->size = secs->size; - encl->ssaframesize = secs->ssaframesize; - encl->backing = backing; - encl->pcmd = pcmd; - - return encl; -} - -/** - * sgx_encl_create - create an enclave - * - * @secs: page aligned SECS data - * - * Validates SECS attributes, allocates an EPC page for the SECS and creates - * the enclave by performing ECREATE. - * - * Return: - * 0 on success, - * system error on failure - */ -int sgx_encl_create(struct sgx_secs *secs) -{ - struct sgx_pageinfo pginfo; - struct sgx_secinfo secinfo; - struct sgx_encl *encl; - struct sgx_epc_page *secs_epc; - struct vm_area_struct *vma; - void *secs_vaddr; - long ret; - - encl = sgx_encl_alloc(secs); - if (IS_ERR(encl)) - return PTR_ERR(encl); - - secs_epc = sgx_alloc_page(0); - if (IS_ERR(secs_epc)) { - ret = PTR_ERR(secs_epc); - goto out; - } - - encl->secs.epc_page = secs_epc; - - ret = sgx_add_to_tgid_ctx(encl); - if (ret) - goto out; - - ret = sgx_init_page(encl, &encl->secs, encl->base + encl->size, 0); - if (ret) - goto out; - - secs_vaddr = sgx_get_page(secs_epc); - - pginfo.srcpge = (unsigned long)secs; - pginfo.linaddr = 0; - pginfo.secinfo = (unsigned long)&secinfo; - pginfo.secs = 0; - memset(&secinfo, 0, sizeof(secinfo)); - ret = __ecreate((void *)&pginfo, secs_vaddr); - - sgx_put_page(secs_vaddr); - - if (ret) { - sgx_dbg(encl, "ECREATE returned %ld\n", ret); - ret = -EFAULT; - goto out; - } - - if (secs->attributes & SGX_ATTR_DEBUG) - encl->flags |= SGX_ENCL_DEBUG; - - encl->mmu_notifier.ops = &sgx_mmu_notifier_ops; - ret = mmu_notifier_register(&encl->mmu_notifier, encl->mm); - if (ret) { - if (ret == -EINTR) - ret = -ERESTARTSYS; - encl->mmu_notifier.ops = NULL; - goto out; - } - - down_read(¤t->mm->mmap_sem); - ret = sgx_encl_find(current->mm, secs->base, &vma); - if (ret != -ENOENT) { - if (!ret) - ret = -EINVAL; - up_read(¤t->mm->mmap_sem); - goto out; - } - - if (vma->vm_start != secs->base || - vma->vm_end != (secs->base + secs->size) - /* vma->vm_pgoff != 0 */) { - ret = -EINVAL; - up_read(¤t->mm->mmap_sem); - goto out; - } - - vma->vm_private_data = encl; - up_read(¤t->mm->mmap_sem); - - mutex_lock(&sgx_tgid_ctx_mutex); - list_add_tail(&encl->encl_list, &encl->tgid_ctx->encl_list); - mutex_unlock(&sgx_tgid_ctx_mutex); - - return 0; -out: - if (encl) - kref_put(&encl->refcount, sgx_encl_release); - return ret; -} - -static int sgx_validate_secinfo(struct sgx_secinfo *secinfo) -{ - u64 perm = secinfo->flags & SGX_SECINFO_PERMISSION_MASK; - u64 page_type = secinfo->flags & SGX_SECINFO_PAGE_TYPE_MASK; - int i; - - if ((secinfo->flags & SGX_SECINFO_RESERVED_MASK) || - ((perm & SGX_SECINFO_W) && !(perm & SGX_SECINFO_R)) || - (page_type != SGX_SECINFO_TCS && - page_type != SGX_SECINFO_REG)) - return -EINVAL; - - for (i = 0; i < sizeof(secinfo->reserved) / sizeof(u64); i++) - if (secinfo->reserved[i]) - return -EINVAL; - - return 0; -} - -static bool sgx_validate_offset(struct sgx_encl *encl, unsigned long offset) -{ - if (offset & (PAGE_SIZE - 1)) - return false; - - if (offset >= encl->size) - return false; - - return true; -} - -static int sgx_validate_tcs(struct sgx_encl *encl, struct sgx_tcs *tcs) -{ - int i; - - if (tcs->flags & SGX_TCS_RESERVED_MASK) { - sgx_dbg(encl, "%s: invalid TCS flags = 0x%lx\n", - __func__, (unsigned long)tcs->flags); - return -EINVAL; - } - - if (tcs->flags & SGX_TCS_DBGOPTIN) { - sgx_dbg(encl, "%s: DBGOPTIN TCS flag is set, EADD will clear it\n", - __func__); - return -EINVAL; - } - - if (!sgx_validate_offset(encl, tcs->ossa)) { - sgx_dbg(encl, "%s: invalid OSSA: 0x%lx\n", __func__, - (unsigned long)tcs->ossa); - return -EINVAL; - } - - if (!sgx_validate_offset(encl, tcs->ofsbase)) { - sgx_dbg(encl, "%s: invalid OFSBASE: 0x%lx\n", __func__, - (unsigned long)tcs->ofsbase); - return -EINVAL; - } - - if (!sgx_validate_offset(encl, tcs->ogsbase)) { - sgx_dbg(encl, "%s: invalid OGSBASE: 0x%lx\n", __func__, - (unsigned long)tcs->ogsbase); - return -EINVAL; - } - - if ((tcs->fslimit & 0xFFF) != 0xFFF) { - sgx_dbg(encl, "%s: invalid FSLIMIT: 0x%x\n", __func__, - tcs->fslimit); - return -EINVAL; - } - - if ((tcs->gslimit & 0xFFF) != 0xFFF) { - sgx_dbg(encl, "%s: invalid GSLIMIT: 0x%x\n", __func__, - tcs->gslimit); - return -EINVAL; - } - - for (i = 0; i < sizeof(tcs->reserved) / sizeof(u64); i++) - if (tcs->reserved[i]) - return -EINVAL; - - return 0; -} - -static int __sgx_encl_add_page(struct sgx_encl *encl, - struct sgx_encl_page *encl_page, - unsigned long addr, - void *data, - struct sgx_secinfo *secinfo, - unsigned int mrmask) -{ - u64 page_type = secinfo->flags & SGX_SECINFO_PAGE_TYPE_MASK; - struct page *backing; - struct sgx_add_page_req *req = NULL; - int ret; - int empty; - void *backing_ptr; - - if (sgx_validate_secinfo(secinfo)) - return -EINVAL; - - if (page_type == SGX_SECINFO_TCS) { - ret = sgx_validate_tcs(encl, data); - if (ret) - return ret; - } - - ret = sgx_init_page(encl, encl_page, addr, 0); - if (ret) - return ret; - - mutex_lock(&encl->lock); - - if (encl->flags & (SGX_ENCL_INITIALIZED | SGX_ENCL_DEAD)) { - ret = -EINVAL; - goto out; - } - - if (radix_tree_lookup(&encl->page_tree, addr >> PAGE_SHIFT)) { - ret = -EEXIST; - goto out; - } - - req = kzalloc(sizeof(*req), GFP_KERNEL); - if (!req) { - ret = -ENOMEM; - goto out; - } - - backing = sgx_get_backing(encl, encl_page, false); - if (IS_ERR((void *)backing)) { - ret = PTR_ERR((void *)backing); - goto out; - } - - ret = radix_tree_insert(&encl->page_tree, encl_page->addr >> PAGE_SHIFT, - encl_page); - if (ret) { - sgx_put_backing(backing, false /* write */); - goto out; - } - - backing_ptr = kmap(backing); - memcpy(backing_ptr, data, PAGE_SIZE); - kunmap(backing); - - if (page_type == SGX_SECINFO_TCS) - encl_page->flags |= SGX_ENCL_PAGE_TCS; - - memcpy(&req->secinfo, secinfo, sizeof(*secinfo)); - - req->encl = encl; - req->encl_page = encl_page; - req->mrmask = mrmask; - empty = list_empty(&encl->add_page_reqs); - kref_get(&encl->refcount); - list_add_tail(&req->list, &encl->add_page_reqs); - if (empty) - queue_work(sgx_add_page_wq, &encl->add_page_work); - - sgx_put_backing(backing, true /* write */); - - mutex_unlock(&encl->lock); - return 0; -out: - kfree(req); - sgx_free_va_slot(encl_page->va_page, encl_page->va_offset); - mutex_unlock(&encl->lock); - return ret; -} - -/** - * sgx_encl_add_page - add a page to the enclave - * - * @encl: an enclave - * @addr: page address in the ELRANGE - * @data: page data - * @secinfo: page permissions - * @mrmask: bitmask to select the 256 byte chunks to be measured - * - * Creates a new enclave page and enqueues an EADD operation that will be - * processed by a worker thread later on. - * - * Return: - * 0 on success, - * system error on failure - */ -int sgx_encl_add_page(struct sgx_encl *encl, unsigned long addr, void *data, - struct sgx_secinfo *secinfo, unsigned int mrmask) -{ - struct sgx_encl_page *page; - int ret; - - page = kzalloc(sizeof(*page), GFP_KERNEL); - if (!page) - return -ENOMEM; - - ret = __sgx_encl_add_page(encl, page, addr, data, secinfo, mrmask); - - if (ret) - kfree(page); - - return ret; -} - -static int sgx_einit(struct sgx_encl *encl, struct sgx_sigstruct *sigstruct, - struct sgx_einittoken *token) -{ - struct sgx_epc_page *secs_epc = encl->secs.epc_page; - void *secs_va; - int ret; - - secs_va = sgx_get_page(secs_epc); - ret = __einit(sigstruct, token, secs_va); - sgx_put_page(secs_va); - - return ret; -} - -/** - * sgx_encl_init - perform EINIT for the given enclave - * - * @encl: an enclave - * @sigstruct: SIGSTRUCT for the enclave - * @token: EINITTOKEN for the enclave - * - * Retries a few times in order to perform EINIT operation on an enclave - * because there could be potentially an interrupt storm. - * - * Return: - * 0 on success, - * -FAULT on a CPU exception during EINIT, - * SGX error code - */ -int sgx_encl_init(struct sgx_encl *encl, struct sgx_sigstruct *sigstruct, - struct sgx_einittoken *token) -{ - int ret; - int i; - int j; - - flush_work(&encl->add_page_work); - - mutex_lock(&encl->lock); - - if (encl->flags & SGX_ENCL_INITIALIZED) { - mutex_unlock(&encl->lock); - return 0; - } - - for (i = 0; i < SGX_EINIT_SLEEP_COUNT; i++) { - for (j = 0; j < SGX_EINIT_SPIN_COUNT; j++) { - ret = sgx_einit(encl, sigstruct, token); - - if (ret == SGX_UNMASKED_EVENT) - continue; - else - break; - } - - if (ret != SGX_UNMASKED_EVENT) - break; - - msleep_interruptible(SGX_EINIT_SLEEP_TIME); - if (signal_pending(current)) { - mutex_unlock(&encl->lock); - return -ERESTARTSYS; - } - } - - mutex_unlock(&encl->lock); - - if (ret) { - if (ret > 0) - sgx_dbg(encl, "EINIT returned %d\n", ret); - return ret; - } - - encl->flags |= SGX_ENCL_INITIALIZED; - return 0; -} - -void sgx_encl_release(struct kref *ref) -{ - struct sgx_encl_page *entry; - struct sgx_va_page *va_page; - struct sgx_encl *encl = container_of(ref, struct sgx_encl, refcount); - struct radix_tree_iter iter; - void **slot; - - mutex_lock(&sgx_tgid_ctx_mutex); - if (!list_empty(&encl->encl_list)) - list_del(&encl->encl_list); - mutex_unlock(&sgx_tgid_ctx_mutex); - - if (encl->mmu_notifier.ops) - mmu_notifier_unregister_no_release(&encl->mmu_notifier, - encl->mm); - - radix_tree_for_each_slot(slot, &encl->page_tree, &iter, 0) { - entry = *slot; - if (entry->epc_page) { - list_del(&entry->epc_page->list); - sgx_free_page(entry->epc_page, encl); - } - radix_tree_delete(&encl->page_tree, entry->addr >> PAGE_SHIFT); - kfree(entry); - } - - while (!list_empty(&encl->va_pages)) { - va_page = list_first_entry(&encl->va_pages, - struct sgx_va_page, list); - list_del(&va_page->list); - sgx_free_page(va_page->epc_page, encl); - kfree(va_page); - atomic_dec(&sgx_va_pages_cnt); - } - - if (encl->secs.epc_page) - sgx_free_page(encl->secs.epc_page, encl); - - if (encl->tgid_ctx) - kref_put(&encl->tgid_ctx->refcount, sgx_tgid_ctx_release); - - if (encl->backing) - fput(encl->backing); - - if (encl->pcmd) - fput(encl->pcmd); - - kfree(encl); -} diff --git a/sgx-jvm/linux-sgx-driver/sgx_ioctl.c b/sgx-jvm/linux-sgx-driver/sgx_ioctl.c deleted file mode 100644 index f7540fc6c3..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_ioctl.c +++ /dev/null @@ -1,287 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - * Serge Ayoun - * Shay Katz-zamir - * Sean Christopherson - */ - -#include "sgx.h" -#include -#include -#include -#include -#include -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) - #include -#else - #include -#endif -#include -#include -#include - -static int sgx_get_encl(unsigned long addr, struct sgx_encl **encl) -{ - struct mm_struct *mm = current->mm; - struct vm_area_struct *vma; - int ret; - - if (addr & (PAGE_SIZE - 1)) - return -EINVAL; - - down_read(&mm->mmap_sem); - - ret = sgx_encl_find(mm, addr, &vma); - if (!ret) { - *encl = vma->vm_private_data; - - if ((*encl)->flags & SGX_ENCL_SUSPEND) - ret = SGX_POWER_LOST_ENCLAVE; - else - kref_get(&(*encl)->refcount); - } - - up_read(&mm->mmap_sem); - return ret; -} - -/** - * sgx_ioc_enclave_create - handler for %SGX_IOC_ENCLAVE_CREATE - * @filep: open file to /dev/sgx - * @cmd: the command value - * @arg: pointer to the &struct sgx_enclave_create - * - * Validates SECS attributes, allocates an EPC page for the SECS and performs - * ECREATE. - * - * Return: - * 0 on success, - * system error on failure - */ -static long sgx_ioc_enclave_create(struct file *filep, unsigned int cmd, - unsigned long arg) -{ - struct sgx_enclave_create *createp = (struct sgx_enclave_create *)arg; - void __user *src = (void __user *)createp->src; - struct sgx_secs *secs; - int ret; - - secs = kzalloc(sizeof(*secs), GFP_KERNEL); - if (!secs) - return -ENOMEM; - - ret = copy_from_user(secs, src, sizeof(*secs)); - if (ret) { - kfree(secs); - return ret; - } - - ret = sgx_encl_create(secs); - - kfree(secs); - return ret; -} - -/** - * sgx_ioc_enclave_add_page - handler for %SGX_IOC_ENCLAVE_ADD_PAGE - * - * @filep: open file to /dev/sgx - * @cmd: the command value - * @arg: pointer to the &struct sgx_enclave_add_page - * - * Creates a new enclave page and enqueues an EADD operation that will be - * processed by a worker thread later on. - * - * Return: - * 0 on success, - * system error on failure - */ -static long sgx_ioc_enclave_add_page(struct file *filep, unsigned int cmd, - unsigned long arg) -{ - struct sgx_enclave_add_page *addp = (void *)arg; - unsigned long secinfop = (unsigned long)addp->secinfo; - struct sgx_secinfo secinfo; - struct sgx_encl *encl; - struct page *data_page; - void *data; - int ret; - - ret = sgx_get_encl(addp->addr, &encl); - if (ret) - return ret; - - if (copy_from_user(&secinfo, (void __user *)secinfop, - sizeof(secinfo))) { - kref_put(&encl->refcount, sgx_encl_release); - return -EFAULT; - } - - data_page = alloc_page(GFP_HIGHUSER); - if (!data_page) { - kref_put(&encl->refcount, sgx_encl_release); - return -ENOMEM; - } - - data = kmap(data_page); - - ret = copy_from_user((void *)data, (void __user *)addp->src, PAGE_SIZE); - if (ret) - goto out; - - ret = sgx_encl_add_page(encl, addp->addr, data, &secinfo, addp->mrmask); - if (ret) - goto out; - -out: - kref_put(&encl->refcount, sgx_encl_release); - kunmap(data_page); - __free_page(data_page); - return ret; -} - -/** - * sgx_ioc_enclave_init - handler for %SGX_IOC_ENCLAVE_INIT - * - * @filep: open file to /dev/sgx - * @cmd: the command value - * @arg: pointer to the &struct sgx_enclave_init - * - * Flushes the remaining enqueued EADD operations and performs EINIT. - * - * Return: - * 0 on success, - * system error on failure - */ -static long sgx_ioc_enclave_init(struct file *filep, unsigned int cmd, - unsigned long arg) -{ - struct sgx_enclave_init *initp = (struct sgx_enclave_init *)arg; - unsigned long sigstructp = (unsigned long)initp->sigstruct; - unsigned long einittokenp = (unsigned long)initp->einittoken; - unsigned long encl_id = initp->addr; - struct sgx_sigstruct *sigstruct; - struct sgx_einittoken *einittoken; - struct sgx_encl *encl; - struct page *initp_page; - int ret; - - initp_page = alloc_page(GFP_HIGHUSER); - if (!initp_page) - return -ENOMEM; - - sigstruct = kmap(initp_page); - einittoken = (struct sgx_einittoken *) - ((unsigned long)sigstruct + PAGE_SIZE / 2); - - ret = copy_from_user(sigstruct, (void __user *)sigstructp, - sizeof(*sigstruct)); - if (ret) - goto out; - - ret = copy_from_user(einittoken, (void __user *)einittokenp, - sizeof(*einittoken)); - if (ret) - goto out; - - ret = sgx_get_encl(encl_id, &encl); - if (ret) - goto out; - - ret = sgx_encl_init(encl, sigstruct, einittoken); - - kref_put(&encl->refcount, sgx_encl_release); - -out: - kunmap(initp_page); - __free_page(initp_page); - return ret; -} - -typedef long (*sgx_ioc_t)(struct file *filep, unsigned int cmd, - unsigned long arg); - -long sgx_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) -{ - char data[256]; - sgx_ioc_t handler = NULL; - long ret; - - switch (cmd) { - case SGX_IOC_ENCLAVE_CREATE: - handler = sgx_ioc_enclave_create; - break; - case SGX_IOC_ENCLAVE_ADD_PAGE: - handler = sgx_ioc_enclave_add_page; - break; - case SGX_IOC_ENCLAVE_INIT: - handler = sgx_ioc_enclave_init; - break; - default: - return -ENOIOCTLCMD; - } - - if (copy_from_user(data, (void __user *)arg, _IOC_SIZE(cmd))) - return -EFAULT; - - ret = handler(filep, cmd, (unsigned long)((void *)data)); - if (!ret && (cmd & IOC_OUT)) { - if (copy_to_user((void __user *)arg, data, _IOC_SIZE(cmd))) - return -EFAULT; - } - - return ret; -} diff --git a/sgx-jvm/linux-sgx-driver/sgx_main.c b/sgx-jvm/linux-sgx-driver/sgx_main.c deleted file mode 100644 index 7ff3864537..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_main.c +++ /dev/null @@ -1,390 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - * Serge Ayoun - * Shay Katz-zamir - * Sean Christopherson - */ - -#include "asm/msr-index.h" -#include "sgx.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define DRV_DESCRIPTION "Intel SGX Driver" -#define DRV_VERSION "0.10" - -MODULE_DESCRIPTION(DRV_DESCRIPTION); -MODULE_AUTHOR("Jarkko Sakkinen "); -MODULE_VERSION(DRV_VERSION); -#ifndef X86_FEATURE_SGX - #define X86_FEATURE_SGX (9 * 32 + 2) -#endif - -#define FEATURE_CONTROL_SGX_ENABLE (1<<18) - -/* - * Global data. - */ - -struct workqueue_struct *sgx_add_page_wq; -#define SGX_MAX_EPC_BANKS 8 -struct sgx_epc_bank sgx_epc_banks[SGX_MAX_EPC_BANKS]; -int sgx_nr_epc_banks; -u64 sgx_encl_size_max_32; -u64 sgx_encl_size_max_64; -u64 sgx_xfrm_mask = 0x3; -u32 sgx_misc_reserved; -u32 sgx_xsave_size_tbl[64]; - -#ifdef CONFIG_COMPAT -long sgx_compat_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) -{ - return sgx_ioctl(filep, cmd, arg); -} -#endif - -static int sgx_mmap(struct file *file, struct vm_area_struct *vma) -{ - vma->vm_ops = &sgx_vm_ops; - vma->vm_flags |= VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_IO | - VM_DONTCOPY; - - return 0; -} - -static unsigned long sgx_get_unmapped_area(struct file *file, - unsigned long addr, - unsigned long len, - unsigned long pgoff, - unsigned long flags) -{ - if (len < 2 * PAGE_SIZE || (len & (len - 1))) - return -EINVAL; - - /* On 64-bit architecture, allow mmap() to exceed 32-bit encl - * limit only if the task is not running in 32-bit compatibility - * mode. - */ - if (len > sgx_encl_size_max_32) -#ifdef CONFIG_X86_64 - if (test_thread_flag(TIF_ADDR32)) - return -EINVAL; -#else - return -EINVAL; -#endif - -#ifdef CONFIG_X86_64 - if (len > sgx_encl_size_max_64) - return -EINVAL; -#endif - - addr = current->mm->get_unmapped_area(file, addr, 2 * len, pgoff, - flags); - if (IS_ERR_VALUE(addr)) - return addr; - - addr = (addr + (len - 1)) & ~(len - 1); - - return addr; -} - -static const struct file_operations sgx_fops = { - .owner = THIS_MODULE, - .unlocked_ioctl = sgx_ioctl, -#ifdef CONFIG_COMPAT - .compat_ioctl = sgx_compat_ioctl, -#endif - .mmap = sgx_mmap, - .get_unmapped_area = sgx_get_unmapped_area, -}; - -static struct miscdevice sgx_dev = { - .minor = MISC_DYNAMIC_MINOR, - .name = "isgx", - .fops = &sgx_fops, - .mode = 0666, -}; - -static int sgx_pm_suspend(struct device *dev) -{ - struct sgx_tgid_ctx *ctx; - struct sgx_encl *encl; - - list_for_each_entry(ctx, &sgx_tgid_ctx_list, list) { - list_for_each_entry(encl, &ctx->encl_list, encl_list) { - sgx_invalidate(encl, false); - encl->flags |= SGX_ENCL_SUSPEND; - flush_work(&encl->add_page_work); - } - } - - return 0; -} - -static SIMPLE_DEV_PM_OPS(sgx_drv_pm, sgx_pm_suspend, NULL); - -static int sgx_dev_init(struct device *parent) -{ - unsigned int eax, ebx, ecx, edx; - unsigned long pa; - unsigned long size; - int ret; - int i; - - pr_info("intel_sgx: " DRV_DESCRIPTION " v" DRV_VERSION "\n"); - - cpuid_count(SGX_CPUID, SGX_CPUID_CAPABILITIES, &eax, &ebx, &ecx, &edx); - /* Only allow misc bits supported by the driver. */ - sgx_misc_reserved = ~ebx | SGX_MISC_RESERVED_MASK; -#ifdef CONFIG_X86_64 - sgx_encl_size_max_64 = 1ULL << ((edx >> 8) & 0xFF); -#endif - sgx_encl_size_max_32 = 1ULL << (edx & 0xFF); - - if (boot_cpu_has(X86_FEATURE_OSXSAVE)) { - cpuid_count(SGX_CPUID, SGX_CPUID_ATTRIBUTES, &eax, &ebx, &ecx, - &edx); - sgx_xfrm_mask = (((u64)edx) << 32) + (u64)ecx; - - for (i = 2; i < 64; i++) { - cpuid_count(0x0D, i, &eax, &ebx, &ecx, &edx); - if ((1 << i) & sgx_xfrm_mask) - sgx_xsave_size_tbl[i] = eax + ebx; - } - } - - for (i = 0; i < SGX_MAX_EPC_BANKS; i++) { - cpuid_count(SGX_CPUID, i + SGX_CPUID_EPC_BANKS, &eax, &ebx, - &ecx, &edx); - if (!(eax & 0xf)) - break; - - pa = ((u64)(ebx & 0xfffff) << 32) + (u64)(eax & 0xfffff000); - size = ((u64)(edx & 0xfffff) << 32) + (u64)(ecx & 0xfffff000); - - dev_info(parent, "EPC bank 0x%lx-0x%lx\n", pa, pa + size); - - sgx_epc_banks[i].pa = pa; - sgx_epc_banks[i].size = size; - } - - sgx_nr_epc_banks = i; - - for (i = 0; i < sgx_nr_epc_banks; i++) { -#ifdef CONFIG_X86_64 - sgx_epc_banks[i].va = (unsigned long) - ioremap_cache(sgx_epc_banks[i].pa, - sgx_epc_banks[i].size); - if (!sgx_epc_banks[i].va) { - sgx_nr_epc_banks = i; - ret = -ENOMEM; - goto out_iounmap; - } -#endif - ret = sgx_add_epc_bank(sgx_epc_banks[i].pa, - sgx_epc_banks[i].size, i); - if (ret) { - sgx_nr_epc_banks = i + 1; - goto out_iounmap; - } - } - - ret = sgx_page_cache_init(); - if (ret) - goto out_iounmap; - - sgx_add_page_wq = alloc_workqueue("intel_sgx-add-page-wq", - WQ_UNBOUND | WQ_FREEZABLE, 1); - if (!sgx_add_page_wq) { - pr_err("intel_sgx: alloc_workqueue() failed\n"); - ret = -ENOMEM; - goto out_iounmap; - } - - sgx_dev.parent = parent; - ret = misc_register(&sgx_dev); - if (ret) { - pr_err("intel_sgx: misc_register() failed\n"); - goto out_workqueue; - } - - if (ret) - goto out_workqueue; - - return 0; -out_workqueue: - destroy_workqueue(sgx_add_page_wq); -out_iounmap: -#ifdef CONFIG_X86_64 - for (i = 0; i < sgx_nr_epc_banks; i++) - iounmap((void *)sgx_epc_banks[i].va); -#endif - return ret; -} - -static atomic_t sgx_init_flag = ATOMIC_INIT(0); -static int sgx_drv_probe(struct platform_device *pdev) -{ - unsigned int eax, ebx, ecx, edx; - unsigned long fc; - if (atomic_cmpxchg(&sgx_init_flag, 0, 1)) { - pr_warn("intel_sgx: second initialization call skipped\n"); - return 0; - } - - - if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) - return -ENODEV; - - if (!boot_cpu_has(X86_FEATURE_SGX)) { - pr_err("intel_sgx: the CPU is missing SGX\n"); - return -ENODEV; - } - - rdmsrl(MSR_IA32_FEATURE_CONTROL, fc); - - if (!(fc & FEATURE_CONTROL_LOCKED)) { - pr_err("intel_sgx: the feature control MSR is not locked\n"); - return -ENODEV; - } - - if (!(fc & FEATURE_CONTROL_SGX_ENABLE)) { - pr_err("intel_sgx: SGX is not enabled\n"); - return -ENODEV; - } - - cpuid(0, &eax, &ebx, &ecx, &edx); - if (eax < SGX_CPUID) { - pr_err("intel_sgx: CPUID is missing the SGX leaf\n"); - return -ENODEV; - } - - cpuid_count(SGX_CPUID, SGX_CPUID_CAPABILITIES, &eax, &ebx, &ecx, &edx); - if (!(eax & 1)) { - pr_err("intel_sgx: CPU does not support the SGX1 instructions\n"); - return -ENODEV; - } - - return sgx_dev_init(&pdev->dev); -} - -static int sgx_drv_remove(struct platform_device *pdev) -{ - int i; - - if (!atomic_cmpxchg(&sgx_init_flag, 1, 0)) { - pr_warn("intel_sgx: second release call skipped\n"); - return 0; - } - - misc_deregister(&sgx_dev); - - destroy_workqueue(sgx_add_page_wq); -#ifdef CONFIG_X86_64 - for (i = 0; i < sgx_nr_epc_banks; i++) - iounmap((void *)sgx_epc_banks[i].va); -#endif - sgx_page_cache_teardown(); - - return 0; -} - -#ifdef CONFIG_ACPI -static struct acpi_device_id sgx_device_ids[] = { - {"INT0E0C", 0}, - {"", 0}, -}; -MODULE_DEVICE_TABLE(acpi, sgx_device_ids); -#endif - -static struct platform_driver sgx_drv = { - .probe = sgx_drv_probe, - .remove = sgx_drv_remove, - .driver = { - .name = "intel_sgx", - .pm = &sgx_drv_pm, - .acpi_match_table = ACPI_PTR(sgx_device_ids), - }, -}; - -static struct platform_device *pdev; -int init_sgx_module(void) -{ - platform_driver_register(&sgx_drv); - pdev = platform_device_register_simple("intel_sgx", 0, NULL, 0); - if (IS_ERR(pdev)) - pr_err("platform_device_register_simple failed\n"); - return 0; -} - -void cleanup_sgx_module(void) -{ - dev_set_uevent_suppress(&pdev->dev, true); - platform_device_unregister(pdev); - platform_driver_unregister(&sgx_drv); -} - -module_init(init_sgx_module); -module_exit(cleanup_sgx_module); - -MODULE_LICENSE("Dual BSD/GPL"); diff --git a/sgx-jvm/linux-sgx-driver/sgx_page_cache.c b/sgx-jvm/linux-sgx-driver/sgx_page_cache.c deleted file mode 100644 index 84720375cc..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_page_cache.c +++ /dev/null @@ -1,572 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - * Serge Ayoun - * Shay Katz-zamir - * Sean Christopherson - */ - -#include "sgx.h" -#include -#include -#include -#include -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) - #include -#else - #include -#endif -#include - -#define SGX_NR_LOW_EPC_PAGES_DEFAULT 32 -#define SGX_NR_SWAP_CLUSTER_MAX 16 - -static LIST_HEAD(sgx_free_list); -static DEFINE_SPINLOCK(sgx_free_list_lock); - -LIST_HEAD(sgx_tgid_ctx_list); -DEFINE_MUTEX(sgx_tgid_ctx_mutex); -atomic_t sgx_va_pages_cnt = ATOMIC_INIT(0); -static unsigned int sgx_nr_total_epc_pages; -static unsigned int sgx_nr_free_pages; -static unsigned int sgx_nr_low_pages = SGX_NR_LOW_EPC_PAGES_DEFAULT; -static unsigned int sgx_nr_high_pages; -static struct task_struct *ksgxswapd_tsk; -static DECLARE_WAIT_QUEUE_HEAD(ksgxswapd_waitq); - -static int sgx_test_and_clear_young_cb(pte_t *ptep, pgtable_t token, - unsigned long addr, void *data) -{ - pte_t pte; - int ret; - - ret = pte_young(*ptep); - if (ret) { - pte = pte_mkold(*ptep); - set_pte_at((struct mm_struct *)data, addr, ptep, pte); - } - - return ret; -} - -/** - * sgx_test_and_clear_young() - Test and reset the accessed bit - * @page: enclave EPC page to be tested for recent access - * @encl: enclave which owns @page - * - * Checks the Access (A) bit from the PTE corresponding to the - * enclave page and clears it. Returns 1 if the page has been - * recently accessed and 0 if not. - */ -int sgx_test_and_clear_young(struct sgx_encl_page *page, struct sgx_encl *encl) -{ - struct vm_area_struct *vma; - int ret; - - ret = sgx_encl_find(encl->mm, page->addr, &vma); - if (ret) - return 0; - - if (encl != vma->vm_private_data) - return 0; - - return apply_to_page_range(vma->vm_mm, page->addr, PAGE_SIZE, - sgx_test_and_clear_young_cb, vma->vm_mm); -} - -static struct sgx_tgid_ctx *sgx_isolate_tgid_ctx(unsigned long nr_to_scan) -{ - struct sgx_tgid_ctx *ctx = NULL; - int i; - - mutex_lock(&sgx_tgid_ctx_mutex); - - if (list_empty(&sgx_tgid_ctx_list)) { - mutex_unlock(&sgx_tgid_ctx_mutex); - return NULL; - } - - for (i = 0; i < nr_to_scan; i++) { - /* Peek TGID context from the head. */ - ctx = list_first_entry(&sgx_tgid_ctx_list, - struct sgx_tgid_ctx, - list); - - /* Move to the tail so that we do not encounter it in the - * next iteration. - */ - list_move_tail(&ctx->list, &sgx_tgid_ctx_list); - - /* Non-empty TGID context? */ - if (!list_empty(&ctx->encl_list) && - kref_get_unless_zero(&ctx->refcount)) - break; - - ctx = NULL; - } - - mutex_unlock(&sgx_tgid_ctx_mutex); - - return ctx; -} - -static struct sgx_encl *sgx_isolate_encl(struct sgx_tgid_ctx *ctx, - unsigned long nr_to_scan) -{ - struct sgx_encl *encl = NULL; - int i; - - mutex_lock(&sgx_tgid_ctx_mutex); - - if (list_empty(&ctx->encl_list)) { - mutex_unlock(&sgx_tgid_ctx_mutex); - return NULL; - } - - for (i = 0; i < nr_to_scan; i++) { - /* Peek encl from the head. */ - encl = list_first_entry(&ctx->encl_list, struct sgx_encl, - encl_list); - - /* Move to the tail so that we do not encounter it in the - * next iteration. - */ - list_move_tail(&encl->encl_list, &ctx->encl_list); - - /* Enclave with faulted pages? */ - if (!list_empty(&encl->load_list) && - kref_get_unless_zero(&encl->refcount)) - break; - - encl = NULL; - } - - mutex_unlock(&sgx_tgid_ctx_mutex); - - return encl; -} - -static void sgx_isolate_pages(struct sgx_encl *encl, - struct list_head *dst, - unsigned long nr_to_scan) -{ - struct sgx_epc_page *entry; - int i; - - mutex_lock(&encl->lock); - - if (encl->flags & SGX_ENCL_DEAD) - goto out; - - for (i = 0; i < nr_to_scan; i++) { - if (list_empty(&encl->load_list)) - break; - - entry = list_first_entry(&encl->load_list, - struct sgx_epc_page, - list); - - if (!sgx_test_and_clear_young(entry->encl_page, encl) && - !(entry->encl_page->flags & SGX_ENCL_PAGE_RESERVED)) { - entry->encl_page->flags |= SGX_ENCL_PAGE_RESERVED; - list_move_tail(&entry->list, dst); - } else { - list_move_tail(&entry->list, &encl->load_list); - } - } -out: - mutex_unlock(&encl->lock); -} - -static int __sgx_ewb(struct sgx_encl *encl, - struct sgx_encl_page *encl_page) -{ - struct sgx_pageinfo pginfo; - struct page *backing; - struct page *pcmd; - unsigned long pcmd_offset; - void *epc; - void *va; - int ret; - - pcmd_offset = ((encl_page->addr >> PAGE_SHIFT) & 31) * 128; - - backing = sgx_get_backing(encl, encl_page, false); - if (IS_ERR(backing)) { - ret = PTR_ERR(backing); - sgx_warn(encl, "pinning the backing page for EWB failed with %d\n", - ret); - return ret; - } - - pcmd = sgx_get_backing(encl, encl_page, true); - if (IS_ERR(pcmd)) { - ret = PTR_ERR(pcmd); - sgx_warn(encl, "pinning the pcmd page for EWB failed with %d\n", - ret); - goto out; - } - - epc = sgx_get_page(encl_page->epc_page); - va = sgx_get_page(encl_page->va_page->epc_page); - - pginfo.srcpge = (unsigned long)kmap_atomic(backing); - pginfo.pcmd = (unsigned long)kmap_atomic(pcmd) + pcmd_offset; - pginfo.linaddr = 0; - pginfo.secs = 0; - ret = __ewb(&pginfo, epc, - (void *)((unsigned long)va + encl_page->va_offset)); - kunmap_atomic((void *)(unsigned long)(pginfo.pcmd - pcmd_offset)); - kunmap_atomic((void *)(unsigned long)pginfo.srcpge); - - sgx_put_page(va); - sgx_put_page(epc); - sgx_put_backing(pcmd, true); - -out: - sgx_put_backing(backing, true); - return ret; -} - -static bool sgx_ewb(struct sgx_encl *encl, - struct sgx_encl_page *entry) -{ - int ret = __sgx_ewb(encl, entry); - - if (ret == SGX_NOT_TRACKED) { - /* slow path, IPI needed */ - sgx_flush_cpus(encl); - ret = __sgx_ewb(encl, entry); - } - - if (ret) { - /* make enclave inaccessible */ - sgx_invalidate(encl, true); - if (ret > 0) - sgx_err(encl, "EWB returned %d, enclave killed\n", ret); - return false; - } - - return true; -} - -static void sgx_evict_page(struct sgx_encl_page *entry, - struct sgx_encl *encl) -{ - sgx_ewb(encl, entry); - sgx_free_page(entry->epc_page, encl); - entry->epc_page = NULL; - entry->flags &= ~SGX_ENCL_PAGE_RESERVED; -} - -static void sgx_write_pages(struct sgx_encl *encl, struct list_head *src) -{ - struct sgx_epc_page *entry; - struct sgx_epc_page *tmp; - struct vm_area_struct *vma; - int ret; - - if (list_empty(src)) - return; - - entry = list_first_entry(src, struct sgx_epc_page, list); - - mutex_lock(&encl->lock); - - /* EBLOCK */ - list_for_each_entry_safe(entry, tmp, src, list) { - ret = sgx_encl_find(encl->mm, entry->encl_page->addr, &vma); - if (!ret && encl == vma->vm_private_data) - zap_vma_ptes(vma, entry->encl_page->addr, PAGE_SIZE); - - sgx_eblock(encl, entry); - } - - /* ETRACK */ - sgx_etrack(encl); - - /* EWB */ - while (!list_empty(src)) { - entry = list_first_entry(src, struct sgx_epc_page, list); - list_del(&entry->list); - sgx_evict_page(entry->encl_page, encl); - encl->secs_child_cnt--; - } - - if (!encl->secs_child_cnt && (encl->flags & SGX_ENCL_INITIALIZED)) { - sgx_evict_page(&encl->secs, encl); - encl->flags |= SGX_ENCL_SECS_EVICTED; - } - - mutex_unlock(&encl->lock); -} - -static void sgx_swap_pages(unsigned long nr_to_scan) -{ - struct sgx_tgid_ctx *ctx; - struct sgx_encl *encl; - LIST_HEAD(cluster); - - ctx = sgx_isolate_tgid_ctx(nr_to_scan); - if (!ctx) - return; - - encl = sgx_isolate_encl(ctx, nr_to_scan); - if (!encl) - goto out; - - down_read(&encl->mm->mmap_sem); - sgx_isolate_pages(encl, &cluster, nr_to_scan); - sgx_write_pages(encl, &cluster); - up_read(&encl->mm->mmap_sem); - - kref_put(&encl->refcount, sgx_encl_release); -out: - kref_put(&ctx->refcount, sgx_tgid_ctx_release); -} - -static int ksgxswapd(void *p) -{ - set_freezable(); - - while (!kthread_should_stop()) { - if (try_to_freeze()) - continue; - - wait_event_freezable(ksgxswapd_waitq, - kthread_should_stop() || - sgx_nr_free_pages < sgx_nr_high_pages); - - if (sgx_nr_free_pages < sgx_nr_high_pages) - sgx_swap_pages(SGX_NR_SWAP_CLUSTER_MAX); - } - - pr_info("%s: done\n", __func__); - return 0; -} - -int sgx_add_epc_bank(resource_size_t start, unsigned long size, int bank) -{ - unsigned long i; - struct sgx_epc_page *new_epc_page, *entry; - struct list_head *parser, *temp; - - for (i = 0; i < size; i += PAGE_SIZE) { - new_epc_page = kzalloc(sizeof(*new_epc_page), GFP_KERNEL); - if (!new_epc_page) - goto err_freelist; - new_epc_page->pa = (start + i) | bank; - - spin_lock(&sgx_free_list_lock); - list_add_tail(&new_epc_page->list, &sgx_free_list); - sgx_nr_total_epc_pages++; - sgx_nr_free_pages++; - spin_unlock(&sgx_free_list_lock); - } - - return 0; -err_freelist: - list_for_each_safe(parser, temp, &sgx_free_list) { - spin_lock(&sgx_free_list_lock); - entry = list_entry(parser, struct sgx_epc_page, list); - list_del(&entry->list); - spin_unlock(&sgx_free_list_lock); - kfree(entry); - } - return -ENOMEM; -} - -int sgx_page_cache_init(void) -{ - struct task_struct *tmp; - - sgx_nr_high_pages = 2 * sgx_nr_low_pages; - - tmp = kthread_run(ksgxswapd, NULL, "ksgxswapd"); - if (!IS_ERR(tmp)) - ksgxswapd_tsk = tmp; - return PTR_ERR_OR_ZERO(tmp); -} - -void sgx_page_cache_teardown(void) -{ - struct sgx_epc_page *entry; - struct list_head *parser, *temp; - - if (ksgxswapd_tsk) { - kthread_stop(ksgxswapd_tsk); - ksgxswapd_tsk = NULL; - } - - spin_lock(&sgx_free_list_lock); - list_for_each_safe(parser, temp, &sgx_free_list) { - entry = list_entry(parser, struct sgx_epc_page, list); - list_del(&entry->list); - kfree(entry); - } - spin_unlock(&sgx_free_list_lock); -} - -static struct sgx_epc_page *sgx_alloc_page_fast(void) -{ - struct sgx_epc_page *entry = NULL; - - spin_lock(&sgx_free_list_lock); - - if (!list_empty(&sgx_free_list)) { - entry = list_first_entry(&sgx_free_list, struct sgx_epc_page, - list); - list_del(&entry->list); - sgx_nr_free_pages--; - } - - spin_unlock(&sgx_free_list_lock); - - return entry; -} - -/** - * sgx_alloc_page - allocate an EPC page - * @flags: allocation flags - * - * Try to grab a page from the free EPC page list. If there is a free page - * available, it is returned to the caller. If called with SGX_ALLOC_ATOMIC, - * the function will return immediately if the list is empty. Otherwise, it - * will swap pages up until there is a free page available. Before returning - * the low watermark is checked and ksgxswapd is waken up if we are below it. - * - * Return: an EPC page or a system error code - */ -struct sgx_epc_page *sgx_alloc_page(unsigned int flags) -{ - struct sgx_epc_page *entry; - - for ( ; ; ) { - entry = sgx_alloc_page_fast(); - if (entry) - break; - - /* We need at minimum two pages for the #PF handler. */ - if (atomic_read(&sgx_va_pages_cnt) > - (sgx_nr_total_epc_pages - 2)) - return ERR_PTR(-ENOMEM); - - if (flags & SGX_ALLOC_ATOMIC) { - entry = ERR_PTR(-EBUSY); - break; - } - - if (signal_pending(current)) { - entry = ERR_PTR(-ERESTARTSYS); - break; - } - - sgx_swap_pages(SGX_NR_SWAP_CLUSTER_MAX); - schedule(); - } - - if (sgx_nr_free_pages < sgx_nr_low_pages) - wake_up(&ksgxswapd_waitq); - - return entry; -} - -/** - * sgx_free_page - free an EPC page - * - * EREMOVE an EPC page and insert it back to the list of free pages. - * If EREMOVE fails, the error is printed out loud as a critical error. - * It is an indicator of a driver bug if that would happen. - * - * @entry: any EPC page - * @encl: enclave that owns the given EPC page - */ -void sgx_free_page(struct sgx_epc_page *entry, struct sgx_encl *encl) -{ - void *epc; - int ret; - - epc = sgx_get_page(entry); - ret = __eremove(epc); - sgx_put_page(epc); - - if (ret) - sgx_crit(encl, "EREMOVE returned %d\n", ret); - - spin_lock(&sgx_free_list_lock); - list_add(&entry->list, &sgx_free_list); - sgx_nr_free_pages++; - spin_unlock(&sgx_free_list_lock); -} - -void *sgx_get_page(struct sgx_epc_page *entry) -{ -#ifdef CONFIG_X86_32 - return kmap_atomic_pfn(PFN_DOWN(entry->pa)); -#else - int i = ((entry->pa) & ~PAGE_MASK); - - return (void *)(sgx_epc_banks[i].va + - ((entry->pa & PAGE_MASK) - sgx_epc_banks[i].pa)); -#endif -} - -void sgx_put_page(void *epc_page_vaddr) -{ -#ifdef CONFIG_X86_32 - kunmap_atomic(epc_page_vaddr); -#else -#endif -} diff --git a/sgx-jvm/linux-sgx-driver/sgx_user.h b/sgx-jvm/linux-sgx-driver/sgx_user.h deleted file mode 100644 index a15f87b2ee..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_user.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - */ - -#ifndef _UAPI_ASM_X86_SGX_H -#define _UAPI_ASM_X86_SGX_H - -#include -#include - -#define SGX_MAGIC 0xA4 - -#define SGX_IOC_ENCLAVE_CREATE \ - _IOW(SGX_MAGIC, 0x00, struct sgx_enclave_create) -#define SGX_IOC_ENCLAVE_ADD_PAGE \ - _IOW(SGX_MAGIC, 0x01, struct sgx_enclave_add_page) -#define SGX_IOC_ENCLAVE_INIT \ - _IOW(SGX_MAGIC, 0x02, struct sgx_enclave_init) - -/* SGX leaf instruction return values */ -#define SGX_SUCCESS 0 -#define SGX_INVALID_SIG_STRUCT 1 -#define SGX_INVALID_ATTRIBUTE 2 -#define SGX_BLKSTATE 3 -#define SGX_INVALID_MEASUREMENT 4 -#define SGX_NOTBLOCKABLE 5 -#define SGX_PG_INVLD 6 -#define SGX_LOCKFAIL 7 -#define SGX_INVALID_SIGNATURE 8 -#define SGX_MAC_COMPARE_FAIL 9 -#define SGX_PAGE_NOT_BLOCKED 10 -#define SGX_NOT_TRACKED 11 -#define SGX_VA_SLOT_OCCUPIED 12 -#define SGX_CHILD_PRESENT 13 -#define SGX_ENCLAVE_ACT 14 -#define SGX_ENTRYEPOCH_LOCKED 15 -#define SGX_INVALID_EINITTOKEN 16 -#define SGX_PREV_TRK_INCMPL 17 -#define SGX_PG_IS_SECS 18 -#define SGX_INVALID_CPUSVN 32 -#define SGX_INVALID_ISVSVN 64 -#define SGX_UNMASKED_EVENT 128 -#define SGX_INVALID_KEYNAME 256 - -/* IOCTL return values */ -#define SGX_POWER_LOST_ENCLAVE 0x40000000 -#define SGX_LE_ROLLBACK 0x40000001 - -/** - * struct sgx_enclave_create - parameter structure for the - * %SGX_IOC_ENCLAVE_CREATE ioctl - * @src: address for the SECS page data - */ -struct sgx_enclave_create { - __u64 src; -} __attribute__((__packed__)); - -/** - * struct sgx_enclave_add_page - parameter structure for the - * %SGX_IOC_ENCLAVE_ADD_PAGE ioctl - * @addr: address in the ELRANGE - * @src: address for the page data - * @secinfo: address for the SECINFO data - * @mrmask: bitmask for the 256 byte chunks that are to be measured - */ -struct sgx_enclave_add_page { - __u64 addr; - __u64 src; - __u64 secinfo; - __u16 mrmask; -} __attribute__((__packed__)); - -/** - * struct sgx_enclave_init - parameter structure for the - * %SGX_IOC_ENCLAVE_INIT ioctl - * @addr: address in the ELRANGE - * @sigstruct: address for the page data - * @einittoken: EINITTOKEN - */ -struct sgx_enclave_init { - __u64 addr; - __u64 sigstruct; - __u64 einittoken; -} __attribute__((__packed__)); - -#endif /* _UAPI_ASM_X86_SGX_H */ diff --git a/sgx-jvm/linux-sgx-driver/sgx_util.c b/sgx-jvm/linux-sgx-driver/sgx_util.c deleted file mode 100644 index ff0e40a1ed..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_util.c +++ /dev/null @@ -1,376 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016-2017 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - * Serge Ayoun - * Shay Katz-zamir - * Sean Christopherson - */ - -#include "sgx.h" -#include -#include -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) - #include -#else - #include -#endif - -struct page *sgx_get_backing(struct sgx_encl *encl, - struct sgx_encl_page *entry, - bool pcmd) -{ - struct inode *inode; - struct address_space *mapping; - gfp_t gfpmask; - pgoff_t index; - - if (pcmd) - inode = encl->pcmd->f_path.dentry->d_inode; - else - inode = encl->backing->f_path.dentry->d_inode; - - mapping = inode->i_mapping; - gfpmask = mapping_gfp_mask(mapping); - - if (pcmd) - index = (entry->addr - encl->base) >> (PAGE_SHIFT + 5); - else - index = (entry->addr - encl->base) >> PAGE_SHIFT; - - return shmem_read_mapping_page_gfp(mapping, index, gfpmask); -} - -void sgx_put_backing(struct page *backing_page, bool write) -{ - if (write) - set_page_dirty(backing_page); - - put_page(backing_page); -} - -void sgx_zap_tcs_ptes(struct sgx_encl *encl, struct vm_area_struct *vma) -{ - struct sgx_epc_page *tmp; - struct sgx_encl_page *entry; - - list_for_each_entry(tmp, &encl->load_list, list) { - entry = tmp->encl_page; - if ((entry->flags & SGX_ENCL_PAGE_TCS) && - entry->addr >= vma->vm_start && - entry->addr < vma->vm_end) - zap_vma_ptes(vma, entry->addr, PAGE_SIZE); - } -} - -void sgx_invalidate(struct sgx_encl *encl, bool flush_cpus) -{ - struct vm_area_struct *vma; - unsigned long addr; - int ret; - - for (addr = encl->base; addr < (encl->base + encl->size); - addr = vma->vm_end) { - ret = sgx_encl_find(encl->mm, addr, &vma); - if (!ret && encl == vma->vm_private_data) - sgx_zap_tcs_ptes(encl, vma); - else - break; - } - - encl->flags |= SGX_ENCL_DEAD; - - if (flush_cpus) - sgx_flush_cpus(encl); -} - -static void sgx_ipi_cb(void *info) -{ -} - -void sgx_flush_cpus(struct sgx_encl *encl) -{ - on_each_cpu_mask(mm_cpumask(encl->mm), sgx_ipi_cb, NULL, 1); -} - -static int sgx_eldu(struct sgx_encl *encl, - struct sgx_encl_page *encl_page, - struct sgx_epc_page *epc_page, - bool is_secs) -{ - struct page *backing; - struct page *pcmd; - unsigned long pcmd_offset; - struct sgx_pageinfo pginfo; - void *secs_ptr = NULL; - void *epc_ptr; - void *va_ptr; - int ret; - - pcmd_offset = ((encl_page->addr >> PAGE_SHIFT) & 31) * 128; - - backing = sgx_get_backing(encl, encl_page, false); - if (IS_ERR(backing)) { - ret = PTR_ERR(backing); - sgx_warn(encl, "pinning the backing page for ELDU failed with %d\n", - ret); - return ret; - } - - pcmd = sgx_get_backing(encl, encl_page, true); - if (IS_ERR(pcmd)) { - ret = PTR_ERR(pcmd); - sgx_warn(encl, "pinning the pcmd page for EWB failed with %d\n", - ret); - goto out; - } - - if (!is_secs) - secs_ptr = sgx_get_page(encl->secs.epc_page); - - epc_ptr = sgx_get_page(epc_page); - va_ptr = sgx_get_page(encl_page->va_page->epc_page); - pginfo.srcpge = (unsigned long)kmap_atomic(backing); - pginfo.pcmd = (unsigned long)kmap_atomic(pcmd) + pcmd_offset; - pginfo.linaddr = is_secs ? 0 : encl_page->addr; - pginfo.secs = (unsigned long)secs_ptr; - - ret = __eldu((unsigned long)&pginfo, - (unsigned long)epc_ptr, - (unsigned long)va_ptr + - encl_page->va_offset); - if (ret) { - sgx_err(encl, "ELDU returned %d\n", ret); - ret = -EFAULT; - } - - kunmap_atomic((void *)(unsigned long)(pginfo.pcmd - pcmd_offset)); - kunmap_atomic((void *)(unsigned long)pginfo.srcpge); - sgx_put_page(va_ptr); - sgx_put_page(epc_ptr); - - if (!is_secs) - sgx_put_page(secs_ptr); - - sgx_put_backing(pcmd, false); - -out: - sgx_put_backing(backing, false); - return ret; -} - -static struct sgx_encl_page *sgx_do_fault(struct vm_area_struct *vma, - unsigned long addr, - unsigned int flags) -{ - struct sgx_encl *encl = vma->vm_private_data; - struct sgx_encl_page *entry; - struct sgx_epc_page *epc_page = NULL; - struct sgx_epc_page *secs_epc_page = NULL; - bool reserve = (flags & SGX_FAULT_RESERVE) != 0; - int rc = 0; - - /* If process was forked, VMA is still there but vm_private_data is set - * to NULL. - */ - if (!encl) - return ERR_PTR(-EFAULT); - - mutex_lock(&encl->lock); - - entry = radix_tree_lookup(&encl->page_tree, addr >> PAGE_SHIFT); - if (!entry) { - rc = -EFAULT; - goto out; - } - - if (encl->flags & SGX_ENCL_DEAD) { - rc = -EFAULT; - goto out; - } - - if (!(encl->flags & SGX_ENCL_INITIALIZED)) { - sgx_dbg(encl, "cannot fault, unitialized\n"); - rc = -EFAULT; - goto out; - } - - if (reserve && (entry->flags & SGX_ENCL_PAGE_RESERVED)) { - sgx_dbg(encl, "cannot fault, 0x%p is reserved\n", - (void *)entry->addr); - rc = -EBUSY; - goto out; - } - - /* Legal race condition, page is already faulted. */ - if (entry->epc_page) { - if (reserve) - entry->flags |= SGX_ENCL_PAGE_RESERVED; - goto out; - } - - epc_page = sgx_alloc_page(SGX_ALLOC_ATOMIC); - if (IS_ERR(epc_page)) { - rc = PTR_ERR(epc_page); - epc_page = NULL; - goto out; - } - - /* If SECS is evicted then reload it first */ - if (encl->flags & SGX_ENCL_SECS_EVICTED) { - secs_epc_page = sgx_alloc_page(SGX_ALLOC_ATOMIC); - if (IS_ERR(secs_epc_page)) { - rc = PTR_ERR(secs_epc_page); - secs_epc_page = NULL; - goto out; - } - - rc = sgx_eldu(encl, &encl->secs, secs_epc_page, true); - if (rc) - goto out; - - encl->secs.epc_page = secs_epc_page; - encl->flags &= ~SGX_ENCL_SECS_EVICTED; - - /* Do not free */ - secs_epc_page = NULL; - } - - rc = sgx_eldu(encl, entry, epc_page, false /* is_secs */); - if (rc) - goto out; - - /* Track the EPC page even if vm_insert_pfn fails; we need to ensure - * the EPC page is properly freed and we can't do EREMOVE right away - * because EREMOVE may fail due to an active cpu in the enclave. We - * can't call vm_insert_pfn before sgx_eldu because SKL signals #GP - * instead of #PF if the EPC page is invalid. - */ - encl->secs_child_cnt++; - - epc_page->encl_page = entry; - entry->epc_page = epc_page; - - if (reserve) - entry->flags |= SGX_ENCL_PAGE_RESERVED; - - /* Do not free */ - epc_page = NULL; - list_add_tail(&entry->epc_page->list, &encl->load_list); - - rc = vm_insert_pfn(vma, entry->addr, PFN_DOWN(entry->epc_page->pa)); - if (rc) { - /* Kill the enclave if vm_insert_pfn fails; failure only occurs - * if there is a driver bug or an unrecoverable issue, e.g. OOM. - */ - sgx_crit(encl, "vm_insert_pfn returned %d\n", rc); - sgx_invalidate(encl, true); - goto out; - } - - sgx_test_and_clear_young(entry, encl); -out: - mutex_unlock(&encl->lock); - if (epc_page) - sgx_free_page(epc_page, encl); - if (secs_epc_page) - sgx_free_page(secs_epc_page, encl); - return rc ? ERR_PTR(rc) : entry; -} - -struct sgx_encl_page *sgx_fault_page(struct vm_area_struct *vma, - unsigned long addr, - unsigned int flags) -{ - struct sgx_encl_page *entry; - - do { - entry = sgx_do_fault(vma, addr, flags); - if (!(flags & SGX_FAULT_RESERVE)) - break; - } while (PTR_ERR(entry) == -EBUSY); - - return entry; -} - -void sgx_eblock(struct sgx_encl *encl, struct sgx_epc_page *epc_page) -{ - void *vaddr; - int ret; - - vaddr = sgx_get_page(epc_page); - ret = __eblock((unsigned long)vaddr); - sgx_put_page(vaddr); - - if (ret) { - sgx_crit(encl, "EBLOCK returned %d\n", ret); - sgx_invalidate(encl, true); - } - -} - -void sgx_etrack(struct sgx_encl *encl) -{ - void *epc; - int ret; - - epc = sgx_get_page(encl->secs.epc_page); - ret = __etrack(epc); - sgx_put_page(epc); - - if (ret) { - sgx_crit(encl, "ETRACK returned %d\n", ret); - sgx_invalidate(encl, true); - } -} diff --git a/sgx-jvm/linux-sgx-driver/sgx_vma.c b/sgx-jvm/linux-sgx-driver/sgx_vma.c deleted file mode 100644 index dae9eb9c28..0000000000 --- a/sgx-jvm/linux-sgx-driver/sgx_vma.c +++ /dev/null @@ -1,243 +0,0 @@ -/* - * This file is provided under a dual BSD/GPLv2 license. When using or - * redistributing this file, you may do so under either license. - * - * GPL LICENSE SUMMARY - * - * Copyright(c) 2016 Intel Corporation. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * Contact Information: - * Jarkko Sakkinen - * Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo - * - * BSD LICENSE - * - * Copyright(c) 2016 Intel Corporation. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * Authors: - * - * Jarkko Sakkinen - * Suresh Siddha - * Serge Ayoun - * Shay Katz-zamir - * Sean Christopherson - */ - -#include "sgx.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static void sgx_vma_open(struct vm_area_struct *vma) -{ - struct sgx_encl *encl = vma->vm_private_data; - - if (!encl) - return; - - /* kref cannot underflow because ECREATE ioctl checks that there is only - * one single VMA for the enclave before proceeding. - */ - kref_get(&encl->refcount); -} - -static void sgx_vma_close(struct vm_area_struct *vma) -{ - struct sgx_encl *encl = vma->vm_private_data; - - if (!encl) - return; - - mutex_lock(&encl->lock); - zap_vma_ptes(vma, vma->vm_start, vma->vm_end - vma->vm_start); - encl->flags |= SGX_ENCL_DEAD; - mutex_unlock(&encl->lock); - kref_put(&encl->refcount, sgx_encl_release); -} - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)) -static int sgx_vma_fault(struct vm_fault *vmf) -{ - struct vm_area_struct *vma = vmf->vma; -#else -static int sgx_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf) -{ -#endif - - -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) - unsigned long addr = (unsigned long)vmf->address; -#else - unsigned long addr = (unsigned long) vmf->virtual_address; -#endif - struct sgx_encl_page *entry; - - entry = sgx_fault_page(vma, addr, 0); - - if (!IS_ERR(entry) || PTR_ERR(entry) == -EBUSY) - return VM_FAULT_NOPAGE; - else - return VM_FAULT_SIGBUS; -} - -static inline int sgx_vma_access_word(struct sgx_encl *encl, - unsigned long addr, - void *buf, - int len, - int write, - struct sgx_encl_page *encl_page, - int i) -{ - char data[sizeof(unsigned long)]; - int align, cnt, offset; - void *vaddr; - int ret; - - offset = ((addr + i) & (PAGE_SIZE - 1)) & ~(sizeof(unsigned long) - 1); - align = (addr + i) & (sizeof(unsigned long) - 1); - cnt = sizeof(unsigned long) - align; - cnt = min(cnt, len - i); - - if (write) { - if (encl_page->flags & SGX_ENCL_PAGE_TCS && - (offset < 8 || (offset + (len - i)) > 16)) - return -ECANCELED; - - if (align || (cnt != sizeof(unsigned long))) { - vaddr = sgx_get_page(encl_page->epc_page); - ret = __edbgrd((void *)((unsigned long)vaddr + offset), - (unsigned long *)data); - sgx_put_page(vaddr); - if (ret) { - sgx_dbg(encl, "EDBGRD returned %d\n", ret); - return -EFAULT; - } - } - - memcpy(data + align, buf + i, cnt); - vaddr = sgx_get_page(encl_page->epc_page); - ret = __edbgwr((void *)((unsigned long)vaddr + offset), - (unsigned long *)data); - sgx_put_page(vaddr); - if (ret) { - sgx_dbg(encl, "EDBGWR returned %d\n", ret); - return -EFAULT; - } - } else { - if (encl_page->flags & SGX_ENCL_PAGE_TCS && - (offset + (len - i)) > 72) - return -ECANCELED; - - vaddr = sgx_get_page(encl_page->epc_page); - ret = __edbgrd((void *)((unsigned long)vaddr + offset), - (unsigned long *)data); - sgx_put_page(vaddr); - if (ret) { - sgx_dbg(encl, "EDBGRD returned %d\n", ret); - return -EFAULT; - } - - memcpy(buf + i, data + align, cnt); - } - - return cnt; -} - -static int sgx_vma_access(struct vm_area_struct *vma, unsigned long addr, - void *buf, int len, int write) -{ - struct sgx_encl *encl = vma->vm_private_data; - struct sgx_encl_page *entry = NULL; - const char *op_str = write ? "EDBGWR" : "EDBGRD"; - int ret = 0; - int i; - - /* If process was forked, VMA is still there but vm_private_data is set - * to NULL. - */ - if (!encl) - return -EFAULT; - - if (!(encl->flags & SGX_ENCL_DEBUG) || - !(encl->flags & SGX_ENCL_INITIALIZED) || - (encl->flags & SGX_ENCL_DEAD)) - return -EFAULT; - - sgx_dbg(encl, "%s addr=0x%lx, len=%d\n", op_str, addr, len); - - for (i = 0; i < len; i += ret) { - if (!entry || !((addr + i) & (PAGE_SIZE - 1))) { - if (entry) - entry->flags &= ~SGX_ENCL_PAGE_RESERVED; - - entry = sgx_fault_page(vma, (addr + i) & PAGE_MASK, - SGX_FAULT_RESERVE); - if (IS_ERR(entry)) { - ret = PTR_ERR(entry); - entry = NULL; - break; - } - } - - /* No locks are needed because used fields are immutable after - * intialization. - */ - ret = sgx_vma_access_word(encl, addr, buf, len, write, - entry, i); - if (ret < 0) - break; - } - - if (entry) - entry->flags &= ~SGX_ENCL_PAGE_RESERVED; - - return (ret < 0 && ret != -ECANCELED) ? ret : i; -} - -const struct vm_operations_struct sgx_vm_ops = { - .close = sgx_vma_close, - .open = sgx_vma_open, - .fault = sgx_vma_fault, - .access = sgx_vma_access, -}; diff --git a/sgx-jvm/linux-sgx/.gitignore b/sgx-jvm/linux-sgx/.gitignore deleted file mode 100644 index 89a3585dc9..0000000000 --- a/sgx-jvm/linux-sgx/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -#object file -*.o - -#library -*.a - -#share object -*.so -*.so.* - -#generated proxy -*_u.c -*_u.h -*_t.c -*_t.h - -#output files -/build/ -/linux/installer/bin/*.bin diff --git a/sgx-jvm/linux-sgx/CONTRIBUTING.md b/sgx-jvm/linux-sgx/CONTRIBUTING.md deleted file mode 100644 index 660066e7e9..0000000000 --- a/sgx-jvm/linux-sgx/CONTRIBUTING.md +++ /dev/null @@ -1,79 +0,0 @@ -# Contributing - -## Issues - -GitHub Issues tracks SGX SDK and PSW design and development issues, bugs, and feature requests. -For usage, installation, or other requests for help, please use the [01.org](https://01.org/intel-software-guard-extensions/forum/forum) forum instead. - -When reporting a bug, please provide the following information, where applicable: - -* What are the steps to reproduce the bug? -* Can you reproduce the bug using the latest [master](https://github.com/01org/linux-sgx/tree/master)? -* What CPU, platform, operating system/distribution, and SGX driver are you running? The more specific, the better. -* For crashes, please provide the backtrace (use gdb). - - -### Contribution Guide - -We accept contributions as pull requests on GitHub. More detailed guidelines will be added later. Please follow these simple rules for now: - -* A PR should have a clear purpose, and do one thing only, and nothing more. This will enable us review your PR more quickly. -* Each commit in PR should be a small, atomic change representing one step in development. -* Please squash intermediate steps within PR for bugfixes, style cleanups, reversions, etc., so they would not appear in merged PR history. -* Please explain anything non-obvious from the code in comments, commit messages, or the PR description, as appropriate. - -### License - -linux-sgx is licensed under the terms in [LICENSE](https://github.com/01org/linux-sgx/blob/master/License.txt). By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms. - -### Sign your work - -Please use the sign-off line at the end of the patch. Your signature certifies that you wrote the patch or otherwise have the right to pass it on as an open-source patch. The rules are pretty simple: if you can certify -the below (from [developercertificate.org](http://developercertificate.org/)): - -``` -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -660 York Street, Suite 102, -San Francisco, CA 94110 USA - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. -``` - -Then you just add a line to every git commit message: - - Signed-off-by: Joe Smith - -Use your real name (sorry, no pseudonyms or anonymous contributions.) - -If you set your `user.name` and `user.email` git configs, you can sign your -commit automatically with `git commit -s`. diff --git a/sgx-jvm/linux-sgx/License.txt b/sgx-jvm/linux-sgx/License.txt deleted file mode 100644 index 5697f6155a..0000000000 --- a/sgx-jvm/linux-sgx/License.txt +++ /dev/null @@ -1,1442 +0,0 @@ -BSD License - -Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - * Neither the name of Intel Corporation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -================================================================= - -Intel(R) Software Guard Extensions (Intel(R) SGX) Eclipse plug-in is licensed under Eclipse Public License-v1.0 -http://www.eclipse.org/legal/epl-v10.html - - - -============================================================== - -libsgx_le.signed.so, libsgx_pce.signed.so, libsgx_pve.signed.so, libsgx_qe.signed.so, libsgx_pse_pr.signed.so and libsgx_pse_op.signed.so are licensed as Intel redistributable binary firmware and other blobs. - - -Copyright (c) Intel Corporation. - -Redistribution. Redistribution and use in binary form, without -modification, are permitted provided that the following conditions are -met: - -* Redistributions must reproduce the above copyright notice and the - following disclaimer in the documentation and/or other materials - provided with the distribution. -* Neither the name of Intel Corporation nor the names of its suppliers - may be used to endorse or promote products derived from this software - without specific prior written permission. -* No reverse engineering, decompilation, or disassembly of this software - is permitted. - -Limited patent license. Intel Corporation grants a world-wide, -royalty-free, non-exclusive license under patents it now or hereafter -owns or controls to make, have made, use, import, offer to sell and -sell ("Utilize") this software, but solely to the extent that any -such patent is necessary to Utilize the software alone, or in -combination with an operating system licensed under an approved Open -Source license as listed by the Open Source Initiative at -http://opensource.org/licenses. The patent license shall not apply to -any other combinations which include this software. No hardware per -se is licensed hereunder. - -DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - - - -=========================================================================================================================================================== - -Intel(R) SGX software for Linux also uses third-party projects that may be distributed under different licenses. Please see below for details. - - -1. Android Open Source Project - -Copyright (C) 2012 The Android Open Source Project -All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -2. compiler_rt and libc++ - -The compiler_rt library is dual licensed under both the University of Illinois -"BSD-Like" license and the MIT license. As a user of this code you may choose -to use it under either license. As a contributor, you agree to allow your code -to be used under both. - -The libc++ library is dual licensed under both the University of Illinois -"BSD-Like" license and the MIT license. As a user of this code you may choose -to use it under either license. As a contributor, you agree to allow your code -to be used under both. - -Full text of the relevant licenses is included below. - -============================================================================== - -University of Illinois/NCSA -Open Source License - -Copyright (c) 2009-2016 by the contributors listed in CREDITS.TXT - -All rights reserved. - -Developed by: - - LLVM Team - - University of Illinois at Urbana-Champaign - - http://llvm.org - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal with -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimers. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. - - * Neither the names of the LLVM Team, University of Illinois at - Urbana-Champaign, nor the names of its contributors may be used to - endorse or promote products derived from this Software without specific - prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE -SOFTWARE. - -============================================================================== - -Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -============================================================================= -Copyrights and Licenses for Third Party Software Distributed with LLVM: -============================================================================= -The LLVM software contains code written by third parties. Such software will -have its own individual LICENSE.TXT file in the directory in which it appears. -This file will describe the copyrights, license, and restrictions which apply -to that code. - -The disclaimer of warranty in the University of Illinois Open Source License -applies to all code in the LLVM Distribution, and nothing in any of the -other licenses gives permission to use the names of the LLVM Team or the -University of Illinois to endorse or promote products derived from this -Software. - - - - -3. DLmalloc - - -Public domain -http://g.oswego.edu/dl/html/malloc.html - -CC0 1.0 Universal - -CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. -DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. -CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS -MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS -PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF -THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. - -Statement of Purpose -The laws of most jurisdictions throughout the world automatically confer exclusive -Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) -(each and all, an "owner") of an original work of authorship and/or a database (each, -a "Work"). -Certain owners wish to permanently relinquish those rights to a Work for the purpose -of contributing to a commons of creative, cultural and scientific works ("Commons") -that the public can reliably and without fear of later claims of infringement build -upon, modify, incorporate in other works, reuse and redistribute as freely as possible -in any form whatsoever and for any purposes, including without limitation commercial -purposes. These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific works, or to -gain reputation or greater distribution for their Work in part through the use and -efforts of others. -For these and/or other purposes and motivations, and without any expectation of -additional consideration or compensation, the person associating CC0 with a Work -(the "Affirmer"), to the extent that he or she is an owner of Copyright and Related -Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute -the Work under its terms, with knowledge of his or her Copyright and Related Rights -in the Work and the meaning and intended legal effect of CC0 on those rights. -1. Copyright and Related Rights. A Work made available under CC0 may be protected by -copyright and related or neighboring rights ("Copyright and Related Rights"). -Copyright and Related Rights include, but are not limited to, the following: -i. the right to reproduce, adapt, distribute, perform, display, communicate, - and translate a Work; -ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or likeness -depicted in a Work; -iv. rights protecting against unfair competition in regards to a Work, subject -to the limitations in paragraph 4(a), below; -v. rights protecting the extraction, dissemination, use and reuse of data in a Work; -vi. database rights (such as those arising under Directive 96/9/EC of the European -Parliament and of the Council of 11 March 1996 on the legal protection of databases, -and under any national implementation thereof, including any amended or successor -version of such directive); and -vii. other similar, equivalent or corresponding rights throughout the world based on -applicable law or treaty, and any national implementations thereof. -2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable -law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, -abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated -claims and causes of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for -the maximum duration provided by applicable law or treaty (including future time extensions), - (iii) in any current or future medium and for any number of copies, and (iv) for any purpose - whatsoever, including without limitation commercial, advertising or promotional purposes -(the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at -large and to the detriment of Affirmer's heirs and successors, fully intending that such -Waiver shall not be subject to revocation, rescission, cancellation, termination, or any -other legal or equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. -3. Public License Fallback. Should any part of the Waiver for any reason be judged legally -invalid or ineffective under applicable law, then the Waiver shall be preserved to the -maximum extent permitted taking into account Affirmer's express Statement of Purpose. In -addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable -and unconditional license to exercise Affirmer's Copyright and Related Rights in the -Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable -law or treaty (including future time extensions), (iii) in any current or future medium and -for any number of copies, and (iv) for any purpose whatsoever, including without limitation -commercial, advertising or promotional purposes (the "License"). The License shall be deemed -effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the -License for any reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder of the License, -and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his -or her remaining Copyright and Related Rights in the Work or (ii) assert any associated -claims and causes of action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. -4. Limitations and Disclaimers. -a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, -licensed or otherwise affected by this document. -b. Affirmer offers the Work as-is and makes no representations or warranties of any -kind concerning the Work, express, implied, statutory or otherwise, including without limitation -warranties of title, merchantability, fitness for a particular purpose, non infringement, or -the absence of latent or other defects, accuracy, or the present or absence of errors, whether -or not discoverable, all to the greatest extent permissible under applicable law. -c. Affirmer disclaims responsibility for clearing rights of other persons that may apply - -to the Work or any use thereof, including without limitation any person's Copyright and Related -Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary -consents, permissions or other rights required for any use of the Work. -d. Affirmer understands and acknowledges that Creative Commons is not a party to this -document and has no duty or obligation with respect to this CC0 or use of the Work. - - - - -4. FreeBSD - -http://www.freebsd.org/ - -The FreeBSD* Copyright -Copyright 1992-2013 The FreeBSD Project. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation and/or -other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project. - - - - -5. libcxxrt - -The BSD License - -Copyright 2010-2011 PathScale, Inc. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list - of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or other - materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - -The views and conclusions contained in the software and documentation are those of -the authors and should not be interpreted as representing official policies, either -expressed or implied, of PathScale, Inc. - - - - - -6. NetBSD - -=============================================================================================== - -/*- - * Copyright (c) 2008 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -________________________________________ -For complete copyright and licensing terms, see: http://www.netbsd.org/about/redistribution.html - - - - -7. OpenBSD - -http://openbsd.org/ - -OpenBSD* Copyright Policy -________________________________________ -- Goal -Copyright law is complex, OpenBSD* policy is simple - OpenBSD strives to maintain the spirit -of the original Berkeley Unix copyrights. -OpenBSD can exist as it does today because of the example set by the Computer Systems Research -Group at Berkeley and the battles which they and others fought to create a relatively -un-encumbered Unix source distribution. -The ability of a freely redistributable "Berkeley" Unix to move forward on a competitive -basis with other operating systems depends on the willingness of the various development -groups to exchange code amongst themselves and with other projects. Understanding the legal -issues surrounding copyright is fundamental to the ability to exchange and re-distribute code, -while honoring the spirit of the copyright and concept of attribution is fundamental to -promoting the cooperation of the people involved. -- The Berkeley* Copyright -The Berkeley* copyright poses no restrictions on private or commercial use of the software -and imposes only simple and uniform requirements for maintaining copyright notices in -redistributed versions and crediting the originator of the material only in advertising. -For instance: - * Copyright (c) 1982, 1986, 1990, 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * -Berkeley rescinded the 3rd term (the advertising term) on 22 July 1999. Verbatim copies -of the Berkeley license in the OpenBSD tree have that term removed. In addition, many -3rd-party BSD-style licenses consist solely of the first two terms. -Because the OpenBSD copyright imposes no conditions beyond those imposed by the Berkeley -copyright, OpenBSD can hope to share the same wide distribution and applicability as the -Berkeley distributions. It follows however, that OpenBSD cannot include material which -includes copyrights which are more restrictive than the Berkeley copyright, or must -relegate this material to a secondary status, i.e. OpenBSD as a whole is freely -redistributable, but some optional components may not be. -- Copyright Law -While the overall subject of copyright law is far beyond the scope of this document, some -basics are in order. Under the current copyright law, copyrights are implicit in the -creation of a new work and reside with the creator, unless otherwise assigned. In general -the copyright applies only to the new work, not the material the work was derived from, -nor those portions of the derivative material included in the new work. -Copyright law admits to three general categories of works: -Original Work -A new work that is not derived from an existing work. -Derivative Work -Work that is derived from, includes or amends existing works. -Compilations -A work that is a compilation of existing new and derivative works. -The fundamental concept is that there is primacy of the copyright, that is a copyright of a -derivative work does not affect the rights held by the owner of the copyright of the original -work, rather only the part added. Likewise the copyright of a compilation does not affect the -rights of the owner of the included works, only the compilation as an entity. -It is vitally important to understand that copyrights are broad protections as defined by -national and international copyright law. The "copyright notices" usually included in source -files are not copyrights, but rather notices that a party asserts that they hold copyright -to the material or to part of the material. Typically these notices are associated with -license terms which grant permissions subject to copyright law and with disclaimers that -state the position of the copyright holder/distributor with respect to liability surrounding -use of the material. -- Permissions - the flip side -Because copyrights arise from the creation of a work, rather than through a registration process, -there needs to be a practical way to extend permission to use a work beyond what might be allowed -by "fair use" provisions of the copyright laws. -This permission typically takes the form of a "release" or "license" included in the work, which -grants the additional uses beyond those granted by copyright law, usually subject to a variety of -conditions. At one extreme sits "public domain" where the originator asserts that he imposes no -restrictions on use of the material, at the other restrictive clauses that actually grant no -additional rights or impose restrictive, discriminatory or impractical conditions on use of the -work. -Again, an important point to note is that the release and conditions can only apply to the -portion of the work that was originated by the copyright holder - the holder of a copyright -on a derivative work can neither grant additional permissions for use of the original work, -nor impose more restrictive conditions for use of that work. -Because copyright arises from the creation of a work and not the text or a registration process, -removing or altering a copyright notice or associated release terms has no bearing on the -existence of the copyright, rather all that is accomplished is to cast doubt upon whatever rights -the person making the modifications had to use the material in the first place. Likewise, adding -terms and conditions in conflict with the original terms and conditions does not supersede them, -rather it casts doubts on the rights of the person making the amendments to use the material and -creates confusion as to whether anyone can use the amended version or derivatives thereof. -Finally, releases are generally binding on the material that they are distributed with. This means -that if the originator of a work distributes that work with a release granting certain permissions, -those permissions apply as stated, without discrimination, to all persons legitimately possessing -a copy of the work. That means that having granted a permission, the copyright holder can not -retroactively say that an individual or class of individuals are no longer granted those permissions. -Likewise should the copyright holder decide to "go commercial" he can not revoke permissions already -granted for the use of the work as distributed, though he may impose more restrictive permissions in -his future distributions of that work. -- Specific Cases -This section attempts to summarize the position of OpenBSD relative to some commonly encountered -copyrights. -Berkeley* -The Berkeley copyright is the model for the OpenBSD copyright. It retains the rights of the -copyright holder, while imposing minimal conditions on the use of the copyrighted material. -Material with Berkeley copyrights, or copyrights closely adhering to the Berkeley model can -generally be included in OpenBSD. -AT&T* -As part of its settlement with AT&T*, Berkeley included an AT&T copyright notice on some of the -files in 4.4BSD lite and lite2. The terms of this license are identical to the standard Berkeley -license. -Additionally, OpenBSD includes some other AT&T code with non-restrictive copyrights, such as the -reference implementation of awk. -Caldera* -Caldera* (now known as the SCO group) is the current owner of the Unix code copyrights. On 23 -January 2002, the original Unix code (versions 1 through seven, including 32V) was freed by Caldera. -This code is now available under a 4-term BSD-style license. As a result, it is now possible to -incorporate real Unix code into OpenBSD (though this code is quite old and generally requires significant -changes to bring it up to date). -DEC*, Sun*, other manufacturers/software houses. -In general OpenBSD does not include material copyrighted by manufacturers or software houses. -Material may be included where the copyright owner has granted general permission for reuse -without conditions, with terms similar to the Berkeley copyright, or where the material is the -product of an employee and the employer's copyright notice effectively releases any rights they -might have to the work. -Carnegie-Mellon* (CMU, Mach) -The Carnegie-Mellon copyright is similar to the Berkeley copyright, except that it requests that -derivative works be made available to Carnegie-Mellon. Because this is only a request and not a -condition, such material can still be included in OpenBSD. It should be noted that existing -versions of Mach are still subject to AT&T copyrights, which prevents the general distribution -of Mach sources. -Apache* -The original Apache* copyright is similar to the Berkeley copyright, except that it stipulates -that products derived from the code may not have "Apache" in their name. The purpose of this -clause is to avoid a situation in which another party releases a modified version of the code -named in such a way to make users think that it is the "official" version. This is not an issue -with OpenBSD because OpenBSD is a Compilation, and not a Derived Work. Source code published under -version 2 of the Apache license cannot be included into OpenBSD. As a consequence, OpenBSD now -maintains its own version of Apache based on version 1.3.29. The OpenBSD version includes many -enhancements and bugfixes. -ISC* -The ISC* copyright is functionally equivalent to a two-term BSD copyright with language removed -that is made unnecessary by the Berne convention. This is the preferred license for new code -incorporated into OpenBSD. A sample license is included in the source tree as -/usr/src/share/misc/license.template. -GNU* General Public License, GPL, LGPL, copyleft, etc. -The GNU* Public License and licenses modeled on it impose the restriction that source code must -be distributed or made available for all works that are derivatives of the GNU copyrighted code. -While this may be a noble strategy in terms of software sharing, it is a condition that is -typically unacceptable for commercial use of software. As a consequence, software bound by the -GPL terms can not be included in the kernel or "runtime" of OpenBSD, though software subject to - GPL terms may be included as development tools or as part of the system that are "optional" as -long as such use does not result in OpenBSD as a whole becoming subject to the GPL terms. -As an example, GCC and other GNU tools are included in the OpenBSD tool chain. However, it is -quite possible to distribute a system for many applications without a tool chain, or the -distributor can choose to include a tool chain as an optional bundle which conforms to the -GPL terms. -NetBSD* -Much of OpenBSD is originally based on and evolved from NetBSD*, since some of the OpenBSD -developers were involved in the NetBSD project. The general NetBSD license terms are compatible -with the Berkeley license and permit such use. Material subject only to the general NetBSD license -can generally be included in OpenBSD. -In the past, NetBSD has included material copyrighted by individuals who have imposed license -conditions beyond that of the general NetBSD license, but granted the NetBSD Foundation license -to distribute the material. Such material can not be included in OpenBSD as long as the conditions -imposed are at odds with the OpenBSD license terms or releases from those terms are offered on a -discriminatory basis. -FreeBSD* -Most of FreeBSD* is also based on Berkeley licensed material or includes copyright notices based -on the Berkeley model. Such material can be included in OpenBSD, while those parts that are subject -to GPL or various individual copyright terms that are at odds with the OpenBSD license can not be -included in OpenBSD. -Linux* -Most of Linux* is subject to GPL style licensing terms and therefore can not be included in -OpenBSD. Individual components may be eligible, subject to the terms of the originator's copyright -notices. Note that Linux "distributions" may also be subject to additional copyright claims of the -distributing organization, either as a compilation or on material included that is not part of the -Linux core. -X*, XFree86*, X.Org* -X*, X.Org* or XFree86* are not parts of OpenBSD, rather X.Org and parts of XFree86 3.3.6 are -distributed with many OpenBSD ports as a convenience to the user, subject to applicable license -terms. -Shareware, Charityware, Freeware, etc. -Most "shareware" copyright notices impose conditions for redistribution, use or visibility that -are at conflict with the OpenBSD project goals. Review on a case-by-case basis is required as to -whether the wording of the conditions is acceptable in terms of conditions being requested vs. -demanded and whether the spirit of the conditions is compatible with goals of the OpenBSD project. -Public Domain -While material that is truly entered into the "Public Domain" can be included in OpenBSD, review -is required on a case by case basis. Frequently the "public domain" assertion is made by someone -who does not really hold all rights under Copyright law to grant that status or there are a variety -of conditions imposed on use. For a work to be truly in the "Public Domain" all rights are abandoned -and the material is offered without restrictions. - - - - -8. Openssl - - -http://www.openssl.org/ - - LICENSE ISSUES - ============== - - The OpenSSL* toolkit stays under a dual license, i.e. both the conditions of - the OpenSSL License and the original SSLeay license apply to the toolkit. - See below for the actual license texts. Actually both licenses are BSD-style - Open Source licenses. In case of any license issues related to OpenSSL - please contact openssl-core@openssl.org. - - OpenSSL License - --------------- - -/* ==================================================================== - * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. All advertising materials mentioning features or use of this - * software must display the following acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" - * - * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to - * endorse or promote products derived from this software without - * prior written permission. For written permission, please contact - * openssl-core@openssl.org. - * - * 5. Products derived from this software may not be called "OpenSSL" - * nor may "OpenSSL" appear in their names without prior written - * permission of the OpenSSL Project. - * - * 6. Redistributions of any form whatsoever must retain the following - * acknowledgment: - * "This product includes software developed by the OpenSSL Project - * for use in the OpenSSL Toolkit (http://www.openssl.org/)" - * - * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY - * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - * ==================================================================== - * - * This product includes cryptographic software written by Eric Young - * (eay@cryptsoft.com). This product includes software written by Tim - * Hudson (tjh@cryptsoft.com). - * - */ - - Original SSLeay* License - ----------------------- - -/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@cryptsoft.com). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@cryptsoft.com). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@cryptsoft.com)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - - - - -9. Protocol Buffers - -Protocol Buffers - Google's data interchange format -Copyright 2008 Google Inc. All rights reserved. -http://code.google.com/p/protobuf/ -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, this - list of conditions and the following disclaimer in the documentation and/or other - materials provided with the distribution. -3. Neither the name of the Google Inc. nor the names of its contributors may be used - to endorse or promote products derived from this software without specific prior - written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - - - - -10. rdrand - -Intel Sample Source Code license. - -This license governs use of the accompanying software. By installing or -copying all or any part of the software components in this package, you -("you" or "Licensee") agree to the terms of this agreement. Do -not install or copy the software until you have carefully read and -agreed to the following terms and conditions. If you do not agree to the -terms of this agreement, promptly return the software to Intel -Corporation ("Intel"). - -1. Definitions: - -A. "Materials" are defined as the software (including the -Redistributables and Sample Source as defined herein), documentation, -and other materials, including any updates and upgrade thereto, that are -provided to you under this Agreement. - -B. "Redistributables" are the files listed in the "redist.txt" file that -is included in the Materials or are otherwise clearly identified as -redistributable files by Intel. - -C. "Sample Source" is the source code file(s) that: (i) -demonstrate(s) certain functions for particular purposes; (ii) are -identified as sample source code; and (iii) are provided hereunder in -source code form. - -D. "Intel's Licensed Patent Claims" means those claims of -Intel's patents that (a) are infringed by the Sample Source or -Redistributables, alone and not in combination, in their unmodified -form, as furnished by Intel to Licensee and (b) Intel has the right to -license. - -2. License Grant: Subject to all of the terms and conditions of this -Agreement: - -A. Intel grants to you a non-exclusive, non-assignable, copyright -license to use the Material for your internal development purposes only. - -B. Intel grants to you a non-exclusive, non-assignable copyright license -to reproduce the Sample Source, prepare derivative works of the Sample -Source and distribute the Sample Source or any derivative works thereof -that you create, as part of the product or application you develop using -the Materials. - -C. Intel grants to you a non-exclusive, non-assignable copyright license -to distribute the Redistributables, or any portions thereof, as part of -the product or application you develop using the Materials. - -D. Intel grants Licensee a non-transferable, non-exclusive, worldwide, -non-sublicenseable license under Intel's Licensed Patent Claims to -make, use, sell, and import the Sample Source and the Redistributables. - -3. Conditions and Limitations: - -A. This license does not grant you any rights to use Intel's name, -logo or trademarks. - -B. Title to the Materials and all copies thereof remain with Intel. The -Materials are copyrighted and are protected by United States copyright -laws. You will not remove any copyright notice from the Materials. You -agree to prevent any unauthorized copying of the Materials. Except as -expressly provided herein, Intel does not grant any express or implied -right to you under Intel patents, copyrights, trademarks, or trade -secret information. - -C. You may NOT: (i) use or copy the Materials except as provided in this -Agreement; (ii) rent or lease the Materials to any third party; (iii) -assign this Agreement or transfer the Materials without the express -written consent of Intel; (iv) modify, adapt, or translate the Materials -in whole or in part except as provided in this Agreement; (v) reverse -engineer, decompile, or disassemble the Materials not provided to you in -source code form; or (vii) distribute, sublicense or transfer the source -code form of any components of the Materials and derivatives thereof to -any third party except as provided in this Agreement. - -D. Platform Limitation - The licenses granted in section 2 extend only -to the software or derivative works that you create that run directly on -a Microsoft Windows operating system product, Microsoft run-time -technology (such as the .NET Framework or Silverlight), or Microsoft -application platform (such as Microsoft Office or Microsoft Dynamics). - -4. No Warranty: - -THE MATERIALS ARE PROVIDED "AS IS". INTEL DISCLAIMS ALL EXPRESS OR -IMPLIED WARRANTIES WITH RESPECT TO THEM, INCLUDING ANY IMPLIED -WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, AND FITNESS FOR ANY -PARTICULAR PURPOSE. - -5. LIMITATION OF LIABILITY: NEITHER INTEL NOR ITS SUPPLIERS SHALL BE -LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF -BUSINESS INFORMATION, OR OTHER LOSS) ARISING OUT OF THE USE OF OR -INABILITY TO USE THE SOFTWARE, EVEN IF INTEL HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS PROHIBIT THE -EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL -DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU. - -6. USER SUBMISSIONS: You agree that any material, information or other -communication, including all data, images, sounds, text, and other -things embodied therein, you transmit or post to an Intel website or -provide to Intel under this Agreement will be considered -non-confidential ("Communications"). Intel will have no confidentiality -obligations with respect to the Communications. You agree that Intel and -its designees will be free to copy, modify, create derivative works, -publicly display, disclose, distribute, license and sublicense through -multiple tiers of distribution and licensees, incorporate and otherwise -use the Communications, including derivative works thereto, for any and -all commercial or non-commercial purposes - -7. TERMINATION OF THIS LICENSE: This Agreement becomes effective on the -date you accept this Agreement and will continue until terminated as -provided for in this Agreement. Intel may terminate this license at any -time if you are in breach of any of its terms and conditions. Upon -termination, you will immediately return to Intel or destroy the -Materials and all copies thereof. - -8. U.S. GOVERNMENT RESTRICTED RIGHTS: The Materials are provided with -"RESTRICTED RIGHTS". Use, duplication or disclosure by the Government is -subject to restrictions set forth in FAR52.227-14 and DFAR252.227-7013 -et seq. or its successor. Use of the Materials by the Government -constitutes acknowledgment of Intel's rights in them. - -9. APPLICABLE LAWS: Any claim arising under or relating to this -Agreement shall be governed by the internal substantive laws of the -State of Delaware, without regard to principles of conflict of laws. You -may not export the Materials in violation of applicable export laws. - - - - - - - - -11. SQLite - -http://sqlite.org/ - -SQLite* Copyright - -All of the code and documentation in SQLite has been dedicated to the public -domain by the authors. All code authors, and representatives of the companies -they work for, have signed affidavits dedicating their contributions to the -public domain and originals of those signed affidavits are stored in a firesafe -at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, -compile, sell, or distribute the original SQLite code, either in source code -form or as a compiled binary, for any purpose, commercial or non-commercial, -and by any means. -The previous paragraph applies to the deliverable code and documentation in -SQLite - those parts of the SQLite library that you actually bundle and ship -with a larger application. Some scripts used as part of the build process -(for example the "configure" scripts generated by autoconf) might fall under -other open-source licenses. Nothing from these build scripts ever reaches the -final deliverable SQLite library, however, and so the licenses associated with -those scripts should not be a factor in assessing your rights to copy and use -the SQLite library. -All of the deliverable code in SQLite has been written from scratch. No code -has been taken from other projects or from the open internet. Every line of -code can be traced back to its original author, and all of those authors have -public domain dedications on file. So the SQLite code base is clean and is -uncontaminated with licensed code from other projects. - - - - - - - -12. STLPort - -License Agreement - -Boris Fomitchev grants Licensee a non-exclusive, non-transferable, - -royalty-free license to use STLport* and its documentation without -fee. - -By downloading, using, -or copying STLport or any portion thereof, -Licensee agrees to abide by the intellectual -property laws and all -other applicable laws of the United States of America, and to all of - -the terms and conditions of this Agreement. - -Licensee shall maintain the following copyright -and permission notices -on STLport sources and its documentation unchanged: - -Copyright 1999,2000 -Boris Fomitchev - -This material is provided "as is", with absolutely no warranty -expressed or -implied. Any use is at your own risk. - -Permission to use or copy this software for any purpose -is hereby -granted without fee, provided the above notices are retained on all -copies. Permission -to modify the code and to distribute modified code -is granted, provided the above notices are -retained, and a notice that -the code was modified is included with the above copyright notice. - - -The Licensee may distribute binaries compiled with STLport whether -original or modified) without -any royalties or restrictions. - -The Licensee may distribute original or modified STLport sources, - -provided that: - - - The conditions indicated in the above permission notice are met; - - The -following copyright notices are retained when present, and - conditions provided in -accompanying permission notices are met : - -Copyright 1994 Hewlett-Packard Company -Copyright -1996,97 Silicon Graphics Computer Systems, Inc. -Copyright 1997 Moscow Center for SPARC -Technology. - - Permission to use, copy, modify, distribute and sell this software - and its -documentation for any purpose is hereby granted without fee, - provided that the above -copyright notice appear in all copies and - that both that copyright notice and this permission -notice appear in - supporting documentation. Hewlett-Packard Company makes no - representations -about the suitability of this software for any - purpose. It is provided "as is" without -express or implied warranty. - - Permission to use, copy, modify, distribute and sell this -software - and its documentation for any purpose is hereby granted without fee, - provided that -the above copyright notice appear in all copies and - that both that copyright notice and this -permission notice appear in - supporting documentation. Silicon Graphics makes no representations - -about the suitability of this software for any purpose. It is - provided "as is" without express -or implied warranty. - - Permission to use, copy, modify, distribute and sell this software - and -its documentation for any purpose is hereby granted without fee, - provided that the above -copyright notice appear in all copies and - that both that copyright notice and this permission -notice appear in - supporting documentation. Moscow Center for SPARC Technology?makes - no -representations about the suitability of this software for any - purpose. It is provided "as is" -without express or implied warranty. - - - -http://www.stlport.org/doc/license.html - - - - - - -13. TinyXML - -http://www.grinninglizard.com/tinyxml/ - - -The zlib/libpng License -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the -use of this software. -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject to -the following restrictions: -1. The origin of this software must not be misrepresented; you must not claim - that you wrote the original software. If you use this software in a product, - an acknowledgment in the product documentation would be appreciated but is - not required. -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. -3. This notice may not be removed or altered from any source distribution. - - - - - -14. libunwind - -Copyright (C) 1996 X Consortium -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. -X Window System is a trademark of X Consortium, Inc. - - - -15. ittnotify library - -BSD/GPLv2 dual license - -Copyright (c) 2011, Intel Corporation -All rights reserved. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -The GNU General Public License (GPL) -Version 2, June 1991 -Copyright (C) 1989, 1991 Free Software Foundation, Inc. -59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -Everyone is permitted to copy and distribute verbatim copies -of this license document, but changing it is not allowed. -Preamble -The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -The precise terms and conditions for copying, distribution and modification follow. -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - - - -16. Intel(R) Enhanced Privacy ID (Intel(R) EPID) SDK - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - - - -17. Eclipse Plug-in - -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: -i) changes to the Program, and -ii) additions to the Program; -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and -b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and -b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. - - - - -18. TCMALLOC - -TCMALLOC is part of Google Perf Tools, which is distributed under the terms of the BSD license. - - http://goog-perftools.sourceforge.net/ - - -Copyright (c) 2005, Google Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build.sh b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build.sh deleted file mode 100755 index e4bd19a937..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build.sh +++ /dev/null @@ -1,251 +0,0 @@ -#!/bin/bash -export PATH=/home/jenkins/jdk/bin/:$PATH - - -# Get the Eclipse launcher and build script to use -set -x -set -e - -TRUNK_HOME=$(cd $(pwd)/../../ ; pwd) -#gives you the posibility to overwrite eclipse, if you do not use URL -[ -n "${ECLIPSE_HOME}" ] || { echo "using default ECLIPSE_HOME=${TRUNK_HOME}/eclipse"; ECLIPSE_HOME=${TRUNK_HOME}/eclipse; } - - -BUILD_RELEASE_ID_PREFIX=Linux_SGX_1.5 - -if [ "$RELEASE_ID" != "${RELEASE_ID%$BUILD_RELEASE_ID_PREFIX*}" ]; then - echo "$BUILD_RELEASE_ID_PREFIX IS in $RELEASE_ID, so it is an triggered build. Change the RELEASE_ID to an accepted form." - temp=${RELEASE_ID#$BUILD_RELEASE_ID_PREFIX} - RELEASE_ID=v`echo ${temp} | tr -d _ | tr -d -` -else - echo "$BUILD_RELEASE_ID_PREFIX is NOT in $RELEASE_ID. Keeping the user specified RELEASE_ID." -fi - -function main() { - validate-jenkins-parameters - cleanupPreBuild - checkEnvironment - buildPlugin - archivePlugin -} - -function validate-jenkins-parameters { - validate-parameter "DELETE_CURRENT_ECLIPSE" "$DELETE_CURRENT_ECLIPSE" - [[ "ECLIPSE_DOWNLOAD_URL" != "" ]] && - echo "[WARNING] ECLIPSE_DOWNLOAD_URL is not set; assume eclipse archive is already downloaded" -} - -function validate-parameter { - local NAME="$1" - local VALUE="$2" - [[ ! -z "$VALUE" ]] || { - echo "Mandatory Jenkins parameter '\$$NAME' not set !" - exit 1 - } -} - -function cleanupPreBuild() { - ./clean.sh - - [[ "false" == "${DELETE_CURRENT_ECLIPSE}" ]] || { - forceRemoveEclipse - } -} - -function forceRemoveEclipse() { - pushd ${TRUNK_HOME} - rm -fr eclipse - popd -} - -function checkEnvironment() { - if [ ! -d "${ECLIPSE_HOME}" ]; then - echo "Eclipse does not exist" - echo "Downloading eclipse" - - getEclipse - fi - - if [ -z "$RELEASE_ID" ]; then - echo "Mandatory variable RELEASE_ID not defined; exiting" - exit - fi -} - -function getEclipse() { - local eclipseArchiveURL="${ECLIPSE_DOWNLOAD_URL}" - - pushd $TRUNK_HOME - cleanupEclipseArchive - downloadEclipse "${eclipseArchiveURL}" - unzipEclipse - installPDE - cleanupEclipseArchive - popd -} - -function cleanupEclipseArchive() { - find . -maxdepth 1 -mindepth 1 -name "*eclipse*.zip*" | xargs rm -f -} - -function downloadEclipse() { - local URL="$1" - if [[ "$1" != "" ]] ; then - echo " wget --no-proxy "$1"" - wget --no-proxy "$1" - else - echo "skip downloaded empty url" - fi - -} - -function unzipEclipse() { - pwd - rm -fr eclipse - local eclipseArchiveName="$(find . -maxdepth 1 -mindepth 1 -name "*eclipse*.zip*")" - unzip "${eclipseArchiveName}" - - [[ -d eclipse ]] || { - echo "Eclipse directory does not exist!" - exit - } - -# local eclipseFolderName=${eclipseArchiveName%.zip} -# local eclipseArchiveName="eclipse" -# mv "${eclipseFolderName}" eclipse -} - -function installPDE() { -echo "~~~~>" -pwd -${ECLIPSE_HOME}/eclipse -nosplash \ - -application org.eclipse.equinox.p2.director \ - -repository http://download.eclipse.org/eclipse/updates/4.4 \ - -destination ${ECLIPSE_HOME} \ - -installIU org.eclipse.pde.source.feature.group \ - -installIU org.eclipse.pde.feature.group -} - -function preBuild() { - local BUILDDIR="$1" - local BUILDDIRWORK="$2" - - local SITEFILE="$BUILDDIRWORK/sites/site.xml" - local FEATUREDIR="$BUILDDIRWORK/features" - local FEATUREFILE="feature.xml" - local PLUGINDIR="$BUILDDIRWORK/plugins" - local PLUGINFILE="META-INF/MANIFEST.MF" - - local ROOTDIR=$(dirname "$0")"/.." - local VERSION=$(awk '/STRFILEVER/ {print $3}' ${ROOTDIR}/common/inc/internal/se_version.h|sed 's/^\"\(.*\)\"$/\1/') - VERSION=$(echo "$VERSION" | awk -F'.' '{for(i=1; i<=NF&&i<=3; i++) if(i==1){version=$i} else{version=version"."$i}}; END{print version}') - - if [[ "$VERSION" =~ ^[0-9]{1,}(.[0-9]{1,}){2}$ ]]; then - rm -fr "$BUILDDIRWORK" - cp -fr "$BUILDDIR" "$BUILDDIRWORK" - - #site.xml - sed -i "s#[0-9]\{1,\}\(\.[0-9]\{1,\}\)\{0,2\}\.qualifier#$VERSION\.qualifier#g" "$SITEFILE" - - #feature - for DIR in $(ls "$FEATUREDIR"); do - sed -i "s#[0-9]\{1,\}\(\.[0-9]\{1,\}\)\{0,2\}\.qualifier#$VERSION\.qualifier#g" "$FEATUREDIR/$DIR/$FEATUREFILE" - done - - #plugin - for DIR in $(ls "$PLUGINDIR"); do - sed -i "s#[0-9]\{1,\}\(\.[0-9]\{1,\}\)\{0,2\}\.qualifier#$VERSION\.qualifier#g" "$PLUGINDIR/$DIR/$PLUGINFILE" - done - fi -} - -function postBuild() { - local BUILDDIR="$1" - local BUILDDIRWORK="$2" - local UPDATESITEDIR="updatesite" - - if [[ -d "$BUILDDIRWORK" ]] && [[ -d "$BUILDDIRWORK/$UPDATESITEDIR" ]]; then - rm -fr "$BUILDDIR/$UPDATESITEDIR" - cp -fr "$BUILDDIRWORK/$UPDATESITEDIR" "$BUILDDIR/$UPDATESITEDIR" - rm -fr "$BUILDDIRWORK" - fi -} - -function buildPlugin() { - pwd - - echo "PWD=`pwd`" - echo "ECLIPSE_HOME=$ECLIPSE_HOME" - - #BASELOCATION="$PWD/target_platform" - BASELOCATION="$ECLIPSE_HOME" - BUILDVERSION="$RELEASE_ID" - BUILDDIR="$PWD/build_directory" - BUILDDIRWORK="$PWD/.build_directory" - BUILDCONFIG="$PWD/build_config" - LAUNCHER=`findFirst "$ECLIPSE_HOME"/plugins/org.eclipse.equinox.launcher_*.jar` - BUILDFILE=`findFirst "$ECLIPSE_HOME"/plugins/org.eclipse.pde.build_*/scripts/build.xml` - - # make sure we found valid files - if [ ! -f "$LAUNCHER" ]; then - echo "Installation Error: Eclipse plugin org.eclipse.equinox.launcher...jar not detected. " \ - "Found '$LAUNCHER'. Aborting." - exit 1 - fi - if [ ! -f "$BUILDFILE" ]; then - echo "Installation Error: Eclipse build file org.eclipse.pde.build_.../scripts/build.xml " \ - "not detected. Found '$BUILDFILE'. Aborting." - exit 1 - fi - - preBuild "$BUILDDIR" "$BUILDDIRWORK" - - # - # -- Print configuration used and actually execute the build -- - # - echo "Eclipse configuration found:" - echo " Eclipse Home: $ECLIPSE_HOME" - echo " Launcher: $LAUNCHER" - echo " Build File: $BUILDFILE" - echo " Build Config: $BUILDCONFIG" - echo " Base Location: $BASELOCATION" - echo " Build Directory: $BUILDDIRWORK" - echo " Build Version: $BUILDVERSION" - echo " Java: " $(which java) - java -version - -# CURRENT_DIR=$(pwd) -# ${ECLIPSE_HOME}/eclipse -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:/${CURRENT_DIR}/build_directory/updatesite/sgx-eclipse-plugin -artifactRepository file:/${CURRENT_DIR}/build_directory/updatesite/featuresAndBundles -source ${CURRENT_DIR}/build_directory/ -config gtk.linux.x86 -compress -publishArtifacts -# cp ./build_directory/updatesite/featuresAndBundles/artifacts.jar ./build_directory/updatesite/sgx-eclipse-plugin/ - - java \ - -jar $LAUNCHER \ - -application org.eclipse.ant.core.antRunner \ - -buildfile $BUILDFILE \ - -DbuildDirectory=$BUILDDIRWORK \ - -DbaseLocation=$BASELOCATION \ - -Dbuilder=$BUILDCONFIG \ - -DforceContextQualifier=$BUILDVERSION \ - -v -v -v -v - - postBuild "$BUILDDIR" "$BUILDDIRWORK" -} - -function findFirst() { - echo "enter Find First, $@" 1>&2 - for i in "$@"; do - if [ -f "$i" ]; then - echo "found $i" 1>&2 - echo "$i" - return - fi - done -} - -function archivePlugin() { - pushd build_directory/updatesite/sgx-eclipse-plugin - zip -r Intel-sgx-eclipse-plugin.zip * - popd -} - -main diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/allElements.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/allElements.xml deleted file mode 100644 index 0bb5016556..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/allElements.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/build.properties b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/build.properties deleted file mode 100644 index beda7eaf99..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/build.properties +++ /dev/null @@ -1,307 +0,0 @@ - -############################################################################### -# Copyright (c) 2003, 2011 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -# Compuware Corporation - Sebastien Angers -# - Enabled additional mirror slicingOptions in Headless PDE Build -# - Enabled 'raw' attribute for mirror step in Headless PDE Build -# - https://bugs.eclipse.org/338878 -############################################################################### -##################### -# Parameters describing how and where to execute the build. -# Typical users need only update the following properties: -# baseLocation - where things you are building against are installed -# bootclasspath - The base jars to compile against (typicaly rt.jar) -# configs - the list of {os, ws, arch} configurations to build. -# -# Of course any of the settings here can be overridden by spec'ing -# them on the command line (e.g., -DbaseLocation=d:/eclipse - -#The type of the top level element we are building, generally "feature" -topLevelElementType = feature -#The id of the top level element we are building -# the following feature will not be include in the final archive -topLevelElementId = com.intel.sgx.build.driver - -############# PRODUCT/PACKAGING CONTROL ############# -#product=/plugin or feature id/path/to/.product -#product=com.intel.sgx.feature -runPackager=false - -#Set the name of the archive that will result from the product build. -#archiveNamePrefix= - -# The prefix that will be used in the generated archive. -archivePrefix=sgx-eclipse-plugin - -# The location underwhich all of the build output will be collected. -collectingFolder=${archivePrefix} - -# The list of {os, ws, arch} configurations to build. This -# value is a '&' separated list of ',' separate triples. For example, -# configs=win32,win32,x86 & linux,motif,x86 -# By default the value is *,*,* -configs = *, *, * -#configs=win32, win32, x86 & \ -# win32,win32,x86_64 & \ -# win32,win32,wpf & \ -# linux, gtk, ppc & \ -# linux, gtk, x86 & \ -# linux, gtk, x86_64 & \ -# linux, motif, x86 & \ -# solaris, motif, sparc & \ -# solaris, gtk, sparc & \ -# aix, motif, ppc & \ -# hpux, motif, ia64_32 & \ -# macosx, carbon, ppc & \ -# macosx, carbon, x86 & \ -# macosx, cocoa, ppc & \ -# macosx, cocoa, x86 & \ -# macosx, cocoa, x86_64 - -# By default PDE creates one archive (result) per entry listed in the configs property. -# Setting this value to true will cause PDE to only create one output containing all -# artifacts for all the platforms listed in the configs property. -# To control the output format for the group, add a "group, group, group - " entry to the -# archivesFormat. -#groupConfigurations=true - -#The format of the archive. By default a zip is created using antZip. -#The list can only contain the configuration for which the desired format is different than zip. -#archivesFormat=win32, win32, x86 - antZip& \ -# linux, gtk, ppc - antZip &\ -# linux, gtk, x86 - antZip& \ -# linux, gtk, x86_64 - antZip& \ -# linux, motif, x86 - antZip& \ -# solaris, motif, sparc - antZip& \ -# solaris, gtk, sparc - antZip& \ -# aix, motif, ppc - antZip& \ -# hpux, motif, PA_RISC - antZip& \ -# macosx, carbon, ppc - antZip - -#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles. -allowBinaryCycles = true - -#Sort bundles depenedencies across all features instead of just within a given feature. -#flattenDependencies = true - -#Parallel compilation, requires flattenedDependencies=true -#parallelCompilation=true -#parallelThreadCount= -#parallelThreadsPerProcessor= - -#Set to true if you want the output to be ready for an update jar (no site.xml generated) -outputUpdateJars = true - -#Set to true for Jnlp generation -#codebase should be a URL that will be used as the root of all relative URLs in the output. -#generateJnlp=false -#jnlp.codebase= -#jnlp.j2se= -#jnlp.locale= -#jnlp.generateOfflineAllowed=true or false generate attribute in the generated features -#jnlp.configs=${configs} #uncomment to filter the content of the generated jnlp files based on the configuration being built - -#Set to true if you want to sign jars -#signJars=false -#sign.alias= -#sign.keystore= -#sign.storepass= -#sign.keypass= - -#Arguments to send to the zip executable -zipargs= - -#Arguments to send to the tar executable -tarargs= - -#individualSourceBundles=true - -#Control the creation of a file containing the version included in each configuration - on by default -#generateVersionsLists=false - -############ REPO MIRROR OPTIONS CONTROL ############ -# Default values for the slicingOptions and raw attribute of the p2.mirror Ant target used to generate the p2 repo (buildRepo) -# Note that the default values used by PDE/Build are different from the default values for p2.mirror's slicingOptions and raw attribute -# See http://help.eclipse.org/topic//org.eclipse.platform.doc.isv/guide/p2_repositorytasks.htm for the details -# of each setting. -#p2.mirror.slicing.filter= -#p2.mirror.slicing.followOnlyFilteredRequirements=false -#p2.mirror.slicing.followStrict=false -#p2.mirror.slicing.includeFeatures=true -#p2.mirror.slicing.includeNonGreedy=false -#p2.mirror.slicing.includeOptional=true -#p2.mirror.slicing.platformFilter= -#p2.mirror.slicing.latestVersionOnly=false - -#p2.mirror.raw=false - -############## SOURCE BUNDLE CONTROL ################ -# Set this property to have source bundles created and output into build repository. -# This does NOT put them in the build output (e.g., product) itself. -# Valid values are: not set, built, all. -# built = only source for bundles that are actually built/compiled in this run are output -# all = all available source is collected and output -#sourceBundleMode=all - -# When outputting autogenerated source bundles a feature is created to contain all the automatic -# source bundles. Typically this feature is not needed and can be ignored. As such, it is given a default -# name and version. These properties can be used to override the defaults. -# sourceBundleTemplateFeature - can specify an existing feature which will be augmented to form the generated source feature -# sourceBundleFeatureId - will be the id of generated source feature which contains all the generated source bundles, default value -# is sourceBundleTemplateFeature + ".source" if sourceBundleTemplateFeature is specified -#sourceBundleTemplateFeature= -#sourceBundleFeatureId= -#sourceBundleFeatureVersion= - -############## BUILD NAMING CONTROL ################ -# The directory into which the build elements are fetched and where -# the build takes place. -#buildDirectory= - -# Type of build. Used in naming the build output. Typically this value is -# one of I, N, M, S, ... -buildType=build - -# ID of the build. Used in naming the build output. -buildId=${forceContextQualifier} - -# Label for the build. Used in naming the build output -buildLabel=${buildId} - -# Timestamp for the build. Used in naming the build output -timestamp=007 - -#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde. -#The value will only be applied to plugin or features indicating build.properties, qualifier = context -#forceContextQualifier= - -#Enable / disable the generation of a suffix for the features that use .qualifier. -#The generated suffix is computed according to the content of the feature -#generateFeatureVersionSuffix=true - -############# BASE CONTROL ############# -# Settings for the base Eclipse components and Java class libraries -# against which you are building. -# Base location for anything the build needs to compile against. For example, -# in most RCP app or a plug-in, the baseLocation should be the location of a previously -# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack. - -base= -#baseLocation= - -#Folder containing repositories whose content is needed to compile against -#repoBaseLocation=${base}/repos -#Folder where the content of the repositories from ${repoBaseLocation} will be made available as a form suitable to be compiled against -#transformedRepoLocation=${base}/transformedRepos - -#Os/Ws/Arch/nl of the eclipse specified by baseLocation -baseos=win32 -basews=win32 -basearch=x86 - -#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built -filteredDependencyCheck=false - -#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons) -resolution.devMode=false - -#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :) -#a location is one of: -#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo -#- a directory that contains a /plugins or /features subdirectory -#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml -#pluginPath= - -skipBase=true -eclipseURL= -eclipseBuildId= -eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip - - -############# MAP FILE CONTROL ################ -# This section defines CVS tags to use when fetching the map files from the repository. -# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml - -skipMaps=true -mapsRepo=:pserver:anonymous@example.com/path/to/repo -mapsRoot=path/to/maps -mapsCheckoutTag=HEAD - -#tagMaps=true -mapsTagTag=v${buildId} - - -############ REPOSITORY CONTROL ############### -# This section defines properties parameterizing the repositories where plugins, fragments -# bundles and features are being obtained from. - -# The tags to use when fetching elements to build. -# By default thebuilder will use whatever is in the maps. -# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the -# overriding value -# For example fetchTag=CVS=HEAD, SVN=v20050101 -# fetchTag=HEAD -skipFetch=true - - -############# JAVA COMPILER OPTIONS ############## -# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE -#bootclasspath=${java.home}/lib/rt.jar - -# specific JRE locations to compile against. These values are used to compile bundles specifying a -# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support -#CDC-1.0/Foundation-1.0= /path/to/rt.jar -#CDC-1.1/Foundation-1.1= -#OSGi/Minimum-1.0= -#OSGi/Minimum-1.1= -#JRE-1.1= -#J2SE-1.2= -#J2SE-1.3= -#J2SE-1.4= -#J2SE-1.5= -#JavaSE-1.6= -#PersonalJava-1.1= -#PersonalJava-1.2= -#CDC-1.0/PersonalBasis-1.0= -#CDC-1.0/PersonalJava-1.0= -#CDC-1.1/PersonalBasis-1.1= -#CDC-1.1/PersonalJava-1.1= - -# Specify the output format of the compiler log when eclipse jdt is used -logExtension=.log - -# Whether or not to include debug info in the output jars -javacDebugInfo=false - -# Whether or not to fail the build if there are compiler errors -javacFailOnError=true - -# Enable or disable verbose mode of the compiler -javacVerbose=true - -# Extra arguments for the compiler. These are specific to the java compiler being used. -#compilerArg= - -# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties -javacSource=1.6 - -# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties. -javacTarget=1.6 - -################### CUSTOM PROPERTIES ####################################### -# repository location for update site -# comment out - this is passed in from command line -updateSiteSource=${buildDirectory}/sites -# where to place update site build -#updateSiteRoot=${user.home}/www/no_crawl/ -updateSiteRoot=${buildDirectory}/updatesite -updateSiteFolder=${archivePrefix} -updateSiteDestination=${updateSiteRoot}/${updateSiteFolder} - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/buildUpdateSite.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/buildUpdateSite.xml deleted file mode 100644 index 968a22e109..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/buildUpdateSite.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/customAssembly.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/customAssembly.xml deleted file mode 100644 index ebe2861da3..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/customAssembly.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/customTargets.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/customTargets.xml deleted file mode 100644 index 24d4c339b4..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_config/customTargets.xml +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/.project b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/.project deleted file mode 100644 index 2320c4af2d..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - com.intel.sgx.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/build.properties b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/build.properties deleted file mode 100644 index 6fe048450c..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/build.properties +++ /dev/null @@ -1,15 +0,0 @@ -######################################################################### -# Copyright (c) 2016 Intel Corporation. # -# # -# All rights reserved. This program and the accompanying materials # -# are made available under the terms of the Eclipse Public License v1.0 # -# which accompanies this distribution, and is available at # -# http://www.eclipse.org/legal/epl-v10.html # -# # -# Contributors: # -# Intel Corporation - initial implementation and documentation # -######################################################################### - -bin.includes = feature.xml,\ - build.properties -generate.plugin@com.intel.sgx.source = com.intel.sgx.feature diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml deleted file mode 100644 index 0ed213014a..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/features/com.intel.sgx.feature/feature.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - - - - - - - - The Intel(R) Software Guard Extensions Plug-in enables Independent Service -Vendors in developing Linux applications -with Intel(R) Software Guard Extensions. The Plug-in extends the C/C++ Development -tools Plug-in to allow ISVs develop secure extensions in C or -C++. The Plug-in also allows conversion of an Linux Application -project into an Linux Application project with Software Guard -Extensions. -Using the Plug-in features and Intel(R) SGX Plug-in Menu options, a developer -can modify the Signing keys and Enclave Configuration for an -Enclave project and can add enclaves inside a project with Intel(R) SGX Nature. -Once development is complete, the developer can build the Enclave -and the Linux project using the Intel(R) SGX SDK for Linux with Release/Debug Configurations in Simulation/Hardware -mode and Hardware Prerelease mode. - - - - All rights reserved with Intel Corporation and its Licensors. - - - - Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - -a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and -b) in the case of each subsequent Contributor: -i) changes to the Program, and -ii) additions to the Program; -where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - -2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - -a) it complies with the terms and conditions of this Agreement; and -b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. -When the Program is made available in source code form: - -a) it must be made available under this Agreement; and -b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within the Program. - -Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.classpath b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.classpath deleted file mode 100644 index bd72e048b2..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.classpath +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.project b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.project deleted file mode 100644 index 85b69bd9ed..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/.project +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - com.intel.sgx.userguide - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/META-INF/MANIFEST.MF b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/META-INF/MANIFEST.MF deleted file mode 100644 index 0345f814b9..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/META-INF/MANIFEST.MF +++ /dev/null @@ -1,11 +0,0 @@ -License: Eclipse Public License Version 1.0 ("EPL") -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Intel(R) SGX Eclipse Plugin Userguide -Bundle-SymbolicName: com.intel.sgx.userguide;singleton:=true -Bundle-Version: 1.0.1.qualifier -Bundle-Activator: com.intel.sgx.userguide.Activator -Bundle-Vendor: INTEL -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-ActivationPolicy: lazy diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/build.properties b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/build.properties deleted file mode 100644 index 95f7743419..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/build.properties +++ /dev/null @@ -1,19 +0,0 @@ -######################################################################### -# Copyright (c) 2016 Intel Corporation. # -# # -# All rights reserved. This program and the accompanying materials # -# are made available under the terms of the Eclipse Public License v1.0 # -# which accompanies this distribution, and is available at # -# http://www.eclipse.org/legal/epl-v10.html # -# # -# Contributors: # -# Intel Corporation - initial implementation and documentation # -######################################################################### - -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - html/,\ - *.xml diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/A_Generated_Trusted_Library.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/A_Generated_Trusted_Library.png deleted file mode 100644 index 0f7841f88a..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/A_Generated_Trusted_Library.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_Intel_SGX_Enclave_Dialog.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_Intel_SGX_Enclave_Dialog.png deleted file mode 100644 index 615efec77f..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_Intel_SGX_Enclave_Dialog.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_SGX_Static_Trusted_Library_Dialog.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_SGX_Static_Trusted_Library_Dialog.png deleted file mode 100644 index ef31085c24..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_New_SGX_Static_Trusted_Library_Dialog.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_Repository_Dialog.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_Repository_Dialog.png deleted file mode 100644 index 39e382919c..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_Repository_Dialog.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Nature.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Nature.png deleted file mode 100644 index baa7992fdc..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Nature.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Untrusted_Module.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Untrusted_Module.png deleted file mode 100644 index 6c3625dad2..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Add_SGX_Untrusted_Module.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configurations_Specific_to_Intel_SGX_Technology.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configurations_Specific_to_Intel_SGX_Technology.png deleted file mode 100644 index e25f9b7293..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configurations_Specific_to_Intel_SGX_Technology.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configure_SGX_Hardware_Release_Mode.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configure_SGX_Hardware_Release_Mode.png deleted file mode 100644 index 7e9cb59b99..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Configure_SGX_Hardware_Release_Mode.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Copying_the_Untrusted_Module_to_a_Project.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Copying_the_Untrusted_Module_to_a_Project.png deleted file mode 100644 index 50d8073d30..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Copying_the_Untrusted_Module_to_a_Project.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Customization_of_SGX_build_command.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Customization_of_SGX_build_command.png deleted file mode 100644 index 178f41be60..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Customization_of_SGX_build_command.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Down_Arrow_Button.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Down_Arrow_Button.png deleted file mode 100644 index f85f93b486..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Down_Arrow_Button.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Enclave_Configuration_Settings.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Enclave_Configuration_Settings.png deleted file mode 100644 index a03abf1610..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Enclave_Configuration_Settings.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog.png deleted file mode 100644 index 0d71612fb2..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog_with_Pre_configurations.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog_with_Pre_configurations.png deleted file mode 100644 index 12e5d665ba..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generate_Signed_Enclave_Dialog_with_Pre_configurations.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Sample_Untrusted_Application.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Sample_Untrusted_Application.png deleted file mode 100644 index 66c9e992c6..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Sample_Untrusted_Application.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Skeleton_for_an_Enclave.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Skeleton_for_an_Enclave.png deleted file mode 100644 index ae332e0311..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generated_Skeleton_for_an_Enclave.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generating_Hash_Completion_Dialog.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generating_Hash_Completion_Dialog.png deleted file mode 100644 index 785bf796c1..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Generating_Hash_Completion_Dialog.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Import_or_Re_Generate_Enclave_Signing_Key.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Import_or_Re_Generate_Enclave_Signing_Key.png deleted file mode 100644 index a173f0132e..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Import_or_Re_Generate_Enclave_Signing_Key.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Configurations.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Configurations.png deleted file mode 100644 index d703ed50ce..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Configurations.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Tools.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Tools.png deleted file mode 100644 index a5ba02604f..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Intel_SGX_Tools.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Makefile_for_Intel_SGX.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Makefile_for_Intel_SGX.png deleted file mode 100644 index 4bca62c6b4..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Makefile_for_Intel_SGX.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/New_Project.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/New_Project.png deleted file mode 100644 index 251c5c7e7d..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/New_Project.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Explorer.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Explorer.png deleted file mode 100644 index ea030759c7..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Explorer.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Menu.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Menu.png deleted file mode 100644 index 700cf5d662..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Project_Menu.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/SGX_Preference_Page.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/SGX_Preference_Page.png deleted file mode 100644 index 53d2437a81..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/SGX_Preference_Page.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Sample_Application.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Sample_Application.png deleted file mode 100644 index 334a9fcfe8..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Sample_Application.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Select_Configuration_File.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Select_Configuration_File.png deleted file mode 100644 index c3b39b5035..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Select_Configuration_File.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Location_of_the_Plugin_zip_Archive.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Location_of_the_Plugin_zip_Archive.png deleted file mode 100644 index 15aef08a60..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Location_of_the_Plugin_zip_Archive.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Result_of_Running_Samples_Generated_for_Enclaves.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Result_of_Running_Samples_Generated_for_Enclaves.png deleted file mode 100644 index 146c0edfa7..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/The_Result_of_Running_Samples_Generated_for_Enclaves.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_StepSigne_Enclave_Generate_Hash.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_StepSigne_Enclave_Generate_Hash.png deleted file mode 100644 index 76207c8449..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_StepSigne_Enclave_Generate_Hash.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_Step_Sign_Enclave_Menu.png b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_Step_Sign_Enclave_Menu.png deleted file mode 100644 index f45f0dd92f..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Images/Two_Step_Sign_Enclave_Menu.png and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Stylesheets/intel_css_styles.css b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Stylesheets/intel_css_styles.css deleted file mode 100644 index b7f1f186ef..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/Resources/Stylesheets/intel_css_styles.css +++ /dev/null @@ -1,470 +0,0 @@ -/*************************************************************************/ -/* Copyright (c) 2016 Intel Corporation. */ -/* */ -/* All rights reserved. This program and the accompanying materials */ -/* are made available under the terms of the Eclipse Public License v1.0 */ -/* which accompanies this distribution, and is available at */ -/* http://www.eclipse.org/legal/epl-v10.html */ -/* */ -/* Contributors: */ -/* Intel Corporation - initial implementation and documentation */ -/*************************************************************************/ -/**/ - -/*begin-old-version{{*/ - -body -{ - color: #333333; - background-color: #ffffff; - font-family: "Intel Clear", Verdana, Arial, sans-serif; - margin-left: 30px; - margin-right: 30px; - margin-bottom: 7%; - color: #333333; - background-color: #ffffff; - font-family: "Intel Clear", Verdana, Arial, sans-serif; - margin-left: 30px; - margin-right: 30px; - margin-bottom: 7%; - font-size: 12pt; -} - -.RevUpdate -{ - background-color: #FFFF99; - font-weight: normal; - line-height: 100%; - background-color: #FFFF99; - font-weight: normal; - line-height: 100%; -} - -.NonStdFortran -{ - color: #007F00; - color: #007F00; -} - -body.OH_VSIP_body -{ - margin-left: 30px; - margin-left: 30px; -} - -DIV.OH_outerContent -{ - border: 0px none #FFFFFF; - border: 0px none #ffffff; -} - -h1 -{ - color: #0071c5; - font-size: 15pt; - font-weight: normal; - padding-bottom: 1px; - margin-left: 0pt; - margin-bottom: 0px; - color: #0071c5; - font-size: 15pt; - font-weight: normal; - padding-bottom: 1px; - margin-left: 0pt; - margin-bottom: 0px; -} - -h1.firsttitle -{ - font-weight: normal; - border-bottom: 0 none; - margin-left: 0; - font-size: 18pt; - border-bottom: 1px solid #0071c5; - line-height: 100%; - padding-bottom: 10px; - margin-bottom: 20px; - margin-top: 20px; - font-weight: normal; - border-bottom: 0 none; - margin-left: 0; - font-size: 18pt; - border-bottom: 1px solid #0071c5; - line-height: 100%; - padding-bottom: 10px; - margin-bottom: 20px; - margin-top: 20px; -} - -h2 -{ - color: #0071c5; - margin-top: 15pt; - margin-bottom: 5pt; - font-size: 12pt; - color: #0071c5; - margin-top: 15pt; - margin-bottom: 5pt; - font-size: 12pt; -} - -h3 -{ - color: #333333; - font-weight: bold; - margin-top: 15pt; - margin-bottom: 5pt; - font-size: 11pt; - color: #333333; - font-weight: bold; - margin-top: 15pt; - margin-bottom: 5pt; - font-size: 11pt; -} - -h4 -{ - color: #0071c5; - margin-top: 10pt; - margin-bottom: 5pt; - padding-left: 0px; - font-size: 10pt; - color: #0071c5; - margin-top: 10pt; - margin-bottom: 5pt; - padding-left: 0px; - font-size: 10pt; -} - -h5 -{ - color: #0071c5; - margin-top: 10pt; - margin-bottom: 5pt; - padding-left: 0px; - font-size: 10pt; - color: #0071c5; - margin-top: 10pt; - margin-bottom: 5pt; - padding-left: 0px; - font-size: 10pt; -} - -h6 -{ - color: #0071c5; - margin-top: 10pt; - margin-bottom: 5pt; - padding-left: 0px; - font-size: 10pt; - color: #0071c5; - margin-top: 10pt; - margin-bottom: 5pt; - padding-left: 0px; - font-size: 10pt; -} - -.relinfo -{ - padding-left: 30px; - padding-left: 30px; -} - -.tablecap -{ - color: #0071c5; -} - -caption -{ - font-weight: bold; - text-align: left; - font-weight: bold; - text-align: left; - font-size: 12pt; -} - -.figcap -{ - margin-left: 24px; - font-size: 10pt; - font-weight: bold; - text-align: center; - margin-left: 24px; - font-size: 10pt; - font-weight: bold; - text-align: center; -} - -.sectiontitle -{ - padding-left: 0px; - padding-left: 0px; -} - -.linklist -{ - padding-left: 0px; - padding-left: 0px; -} - -h1.topictitle1 -{ - color: #0071c5; - font-size: 18pt; - margin-left: 0pt; - margin-bottom: 15px; - color: #0071c5; - font-size: 18pt; - margin-left: 0pt; - margin-bottom: 15px; -} - -#header_text -{ - color: #0071C5; - text-align: right; - color: #0071C5; - text-align: right; -} - -.titlepage -{ - margin-right: 15%; - margin-right: 15%; -} - -.familylinks -{ - margin-top: 1em; - margin-top: 1em; -} - -a.start -{ - font-size: 18pt; - text-decoration: underline; - font-size: 18pt; - text-decoration: underline; -} - -a.underlined -{ - text-decoration: underline; - text-decoration: underline; -} - -.shortdesc -{ - font-size: inherit; - padding-left: inherit; - line-height: 16pt; - margin-top: 0px; - margin-bottom: 0.5em; - font-size: inherit; - padding-left: inherit; - line-height: 16pt; - margin-top: 0px; - margin-bottom: 0.5em; -} - -.shortdesc-it -{ - font-style: italic; - font-style: italic; -} - -p -{ - margin-left: 0px; - line-height: 120%; - margin-top: 0; - margin-bottom: 10px; - margin-left: 0px; - line-height: 120%; - margin-top: 0; - margin-bottom: 10px; - font-size: 12pt; -} - -.p -{ - font-size: inherit; - margin-left: 0px; - line-height: 170%; - margin-top: 0; - margin-bottom: 5pt; - padding-left: 0pt; - font-size: inherit; - margin-left: 0px; - line-height: 170%; - margin-top: 0; - margin-bottom: 5pt; - padding-left: 0pt; -} - -table -{ - margin-bottom: 5pt; - border-collapse: collapse; - margin-left: 0px; - margin-top: 0.3em; - font-size: 10pt; - margin-bottom: 5pt; - border-collapse: collapse; - margin-left: 0px; - margin-top: 0.3em; - font-size: 10pt; -} - -tr -{ - vertical-align: top; - vertical-align: top; -} - -DIV.Note -{ - margin-top: 20pt; - margin-bottom: 20pt; - margin-right: 0.46cm; - padding-left: 5px; - border-top-style: solid; - border-top-width: 1px; - border-bottom-style: solid; - border-bottom-width: 1px; - font-size: 10pt; -} - -p.NoteTipHead -{ - font-weight: bold; - font-style: italic; - margin-top: 9pt; - margin-bottom: 3pt; - line-height: 15pt; - margin-left: 0.202cm; - font-family: "Verdana", "sans-serif"; - text-transform: uppercase; - text-align: justify; - font-size: 12pt; -} - -MadCap|xref -{ - color: #0860a8; - mc-format: '{paratext}'; - text-decoration: none; - font-size: 12pt; -} - -div.NoteCont -{ - border-bottom-style: solid; - border-bottom-width: 1px; - border-top-style: solid; - border-top-width: 1px; - font-size: 10pt; -} - -p.figcap -{ - text-align: left; - font-size: 12pt; -} - -th -{ - text-align: left; - font-size: 12pt; -} - -ul -{ - font-size: 12pt; -} - -ol -{ - font-size: 12pt; -} - -li -{ - font-size: 12pt; -} - -b -{ - font-size: 12pt; -} - -code -{ - font-size: 12pt; -} - -a:link -{ - color: #0071c5; - text-decoration: none; - color: #0071c5; - text-decoration: none; -} - -a:visited -{ - color: #0071c5; - text-decoration: none; - color: #0071c5; - text-decoration: none; -} - -a:hover -{ - color: #00aeef; - text-decoration: underline; - color: #00aeef; - text-decoration: underline; -} - -a:active -{ - color: #0071c5; - text-decoration: underline; - color: #0071c5; - text-decoration: underline; -} - -a.start:visited -{ - color: #0071c5; - text-decoration: underline; - color: #0071c5; - text-decoration: underline; -} - -a.start:active -{ - color: #0071c5; - text-decoration: underline; - color: #0071c5; - text-decoration: underline; -} - -a.underlined:visited -{ - color: #0071c5; - text-decoration: underline; - color: #0071c5; - text-decoration: underline; -} - -a.underlined:active -{ - color: #0071c5; - text-decoration: underline; - color: #0071c5; - text-decoration: underline; -} - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html deleted file mode 100644 index dc5352018c..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/html/content.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - - - - - - -
-

Introduction

-

This Developer Guide is intended for use by Independent Service Vendors who wish to harden their Linux* applications using Intel(R) SGX Technology, code named Intel(R) Software Guard Extensions. The guide describes the procedure for installation of Intel(R) SGX Plugin for Eclipse* IDE and development of Intel(R) SGX components using the plugin. The Intel(R) SGX Plugin for Eclipse leverages on the Intel(R) Software Guard Extensions SDK, which is a collection of APIs, libraries and tools that enable you to develop, build and debug Intel(R) SGX applications in C/C++.

-

To learn more about the Intel(R) Software Guard Extensions SDK, see the Intel(R) Software Guard Extensions SDK for Linux* OS Developer Reference.

 
-
-

Introducing Intel(R) Software Guard Extensions

-

Intel(R) Software Guard Extensions is a new Intel technology, whose objective is to enable a high level of protection of secrets. It operates by allocating hardware-protected memory where code and data reside. The protected memory area within an application process is called an enclave. Data within the enclave memory can only be accessed by code that resides within that enclave. Enclave code can be invoked by special instructions.

-

An enclave can be built and loaded as a shared object.

-

Throughout this document, Intel(R) SGX refers to Intel(R) Software Guard Extensions.

-

An Intel(R) SGX application design is different from the design of non- Intel(R) SGX application as it specifies dividing the application into two logical parts:

-
    -
  • Trusted part. The code that accesses the secret resides here and it is called an enclave. More than one enclave can exist in an application.
  • -
  • Untrusted part. This includes the rest of the modules in the application, that is outside in an enclave.
  • -
-

The trusted components and untrusted components are developed as separate modules.

-

The trusted part or the enclave is implemented in C or C++. It is supplied as a collection of functions and data packaged in the form of a dynamically loaded library, a DLL in Windows* OS and a shared object in Linux* OS. It may be supplied either as a pre-built signed library or as a signed shared library built during compilation of the untrusted component.

-

Enclave functions within an enclave library are wrapped by auto-generated proxy and bridge functions that simplify the mechanism of using the Intel(R) SGX technology by developers.

-

The role of these functions is to handle the following tasks:

-
    -
  • Call an enclave function from untrusted code, also called an ECALL (enclave call).
  • -
  • Call an untrusted function from within an enclave, also called an OCALL (outside call).
  • -
  • Handle interrupts.
  • -
  • Handle exceptions.
  • -
-

The proxy and bridge functions are generated by the sgx_edger8r tool provided by Intel(R) SGX SDK. It reads an edl file (Enclave Descriptor Language) which describes the functions that form the trusted and untrusted component boundaries within the application.

-

After the enclave is built, a signed version of it is created using the tool sgx_sign also provided by Intel(R) SGX SDK. It is this signed version may be loaded and executed in the encrypted memory.

-

Enclaves may have some specific properties which are added as meta-information during the signing process. The meta-information is stored in one configuration xml file per enclave. See more details about meta-information in Intel(R) Software Guard Extensions SDK for Linux* OS Developer Reference.

-
-
-

Introducing Intel(R) Software Guard Extensions Eclipse* Plug-in

-

The Intel(R) Software Guard Extensions Eclipse* Plug-in helps the enclave developer to maintain enclaves and untrusted related code inside Eclipse* C/C++ projects. To use this support, add Intel(R) SGX nature to the C/C++ project. See Adding Intel(R) SGX Nature to a Project for details.

-

Once the Intel(R) SGX nature is added to a project, you will have access to the Intel(R) SGX commands. Intel(R) SGX nature adds also a folder called sgx to the root of the project, and a Makefile inside it. All resources of the project managed by Intel(R) Software Guard Extensions Eclipse Plug-in are located inside this directory. You can build and run enclaves related code using GNU* Make tool through the Makefile.

-

The plugin is generating minimal but ready-to-work code skeletons, complete with their own Makefile having all the required make targets as to call sgx_edger8r tool to generate the proxies and bridges, compile these source, generate a shared object and finally, to sign the enclave with the sgx_sign tool. This provide a starting point you may build upon.

-
-
-

Getting Started with Intel(R) Software Guard Extensions Eclipse* Plug-in

-

This section contains steps to set up your Intel(R) Software Guard Extensions Eclipse* Plug-in on a Linux* system, including necessary softwares, steps to install the product, and steps to configure your preferred product directory.

-

• Pre-requisites

-

• Installing Intel(R) Software Guard Extensions Eclipse* Plug-in

-

• Configuring Intel(R) Software Guard Extensions Eclipse* Plug-in

 
-
-

Pre-requisites

-

To use Intel(R) Software Guard Extensions Eclipse Plug-in, install the following softwares:

-
    -
  • Eclipse* Mars 1 with CDT IDE for C/C++ Developers (version 4.5.1). To use this version, install Java* Development Kit (JDK) or Java* Runtime Environment (JRE) version 1.8 or above.
  • -
  • gcc/g++ tools
  • -
  • Openssl*
  • -
  • Intel(R) SGX SDK for Linux* OS
  • -
-
-
-

Installing Intel(R) Software Guard Extensions Eclipse* Plug-in

-

Install Intel(R) Software Guard Extensions Eclipse* Plug-in as a regular Eclipse Plugin:

-
    -
  1. Download the zip archive of Intel(R) Software Guard Extensions Eclipse Plug-in from Intel Site
  2. -
  3. -

    Go to Help menu -> Install New Software. Click the Add button for the Work with field to open the Add Repository dialog as shown in the following graphic:

    -

    - -

    -

    Add Repository Dialog

    -
  4. -
  5. -

    Enter Intel(R) SGX Archive in the Name field . Click the Archive... button and select the location of the downloaded archive as shown in the following graphic:

    -

    - -

    -

    The Location of the Plugin zip Archive

    -
  6. -
  7. Press OK to add the archive as a repository.
  8. -
  9. In the Install dialog, select the Intel(R) Software Guard Extensions Plugin check-box and proceed with the usual steps.
  10. -
-
-
-

Configuring Intel(R) Software Guard Extensions Eclipse* Plug-in

-

If you do not install Intel(R) SGX SDK for Linux* OS in the default location, you need to specify the path for Intel(R) SGX SDK using the following steps:

-
    -
  1. -

    Go to Window menu ->Preferences. Enter Intel(R) SGX in the filter text field to quickly locate the Intel(R) SGX Preferences page.

    -

    - -

    -

    Intel(R) SGX Preference Page

    -
  2. -
  3. Enter the path for Intel(R) SGX SDK for Linux OS in the Intel(R) SGX SDK Directory field.
  4. -
-
-
-

Command Reference

-

This topic provides the command reference for the following scenarios of using Intel(R) Software Guard Extensions Eclipse* Plug-in:

-
    -
  • Adding Intel(R) SGX nature to a project
  • -
  • Adding an Intel(R) SGX enclave
  • -
  • Adding an Intel(R) SGX trusted library
  • -
  • Adding an Intel(R) SGX untrusted module
  • -
  • Updating Intel(R) SGX enclave signing key
  • -
  • Updating enclave configuration files
  • -
  • Two steps sign enclave
  • -
-

All commands brought by Intel(R) Software Guard Extensions Eclipse Plug-in are available by right-clicking on the Project root in Project explorer view in menu Intel(R) Software Guard Extensions Tools:

 

Project Explorer

 
-
-

Adding Intel(R) SGX Nature to a Project

-

The nature of an Eclipse project is a concept defined by an Eclipse Platform which allows a plug-in to tag a project as a specific kind of project. Intel(R) Software Guard Extensions uses an Intel(R) SGX nature to add Intel(R) SGX-specific behavior to projects. Project natures are defined by plug-ins, and are typically added or removed per-project when the user performs some action defined by the plug-in.

-

To use Intel(R) Software Guard Extensions Eclipse Plug-in in your project, you need to add Intel(R) SGX nature to it. You may either add Intel(R) SGX nature to a pre-existing C/C++ project or create a project with Intel(R) SGX nature from start. See Adding Intel(R) SGX Nature to a non-SGX project and Creating a New C/C++ Project with Intel(R) SGX Nature for how to complete these tasks.

-
-
-

Adding Intel(R) SGX Nature to a non-SGX project

-

When you have a C/C++ project created without Intel(R) SGX, you cannot use Intel(R) SGX support. In this case, you need to add Intel(R) SGX nature to this project to use Intel(R) SGX support:

-
    -
  1. Right-click on the project root
  2. -
  3. -

    Select Intel(R) Software Guard Extensions Tools → Add Intel(R) SGX Nature

    -

    - -

    -

    Add Intel(R) SGX Nature

    -
  4. -
-

After you add the Intel(R) SGX nature to your project, you should see:

-
    -
  • -

    A subdirectory sgx in the project which contains a Makefile file.

    -

    - -

    -

    Makefile for Intel(R) SGX

    -
  • -
  • -

    The Intel(R) SGX tools as shown in the following graphic:

    -

    - -

    -

    Intel(R) SGX Tools

    -
  • -
  • -

    New configurations specific to Intel(R) SGX technology. You may see the configurations for the project by clicking to the down arrow of button usually found at the top of the Eclipse window:

    -

    - -

    -

    Configurations Specific to Intel(R) SGX Technology

    -
  • -
-
-
-

Creating a New C/C++ Project with Intel(R) SGX Nature

-

You can create a new project with Intel(R) SGX nature. To create such a project, follow these steps:

-
    -
  1. -

    Open a standard Eclipse new project: File menu → Project... . If you have installed Intel(R) Software Guard Extensions Eclipse Plug-in, you can see the category C/C++ with Intel(R) SGX Enabled in the New Project dialog.

    -

    - -

    -

    New Project

    -

    This category has 2 sub-categories, C project and C++ project. These sub-categories are similar to the sub-categories C Project and C++ Project of standard C/C++ category.

    -
  2. -
  3. Select one of the 2 sub-categories, C project or C++ project, and click Next.
  4. -
  5. Complete creating the project using the regular process of creating a standard C or C++ project.
  6. -
-
-

NOTE:

-

Projects created following the subcategories under C/C++ with Intel(R) SGX Enabled are identical with their standard counterparts, except that they have Intel(R) SGX Nature added. There is no difference between creating a C or C++ project with Intel(R) SGX enabled, or creating a standard C/C++ project and launch Add Intel(R) SGX nature from it, as described in precedent paragraph.

-
-
-
-

Adding an Intel(R) SGX Enclave

-

After you add the Intel(R) SGX nature to a project, you can start creating a minimal but complete skeleton for a new enclave:

-
    -
  1. Right-click on the project root in Project Explorer.
  2. -
  3. -

    Open the dialog Add New Intel(R) SGX Enclave by selecting Intel(R) Software Guard Extensions Tools → Add Intel(R) SGX Enclave from the contextual menu.

    -

    - -

    -

    Add New Intel(R) SGX Enclave Dialog

    -
  4. -
  5. -

    Choose a name for the enclave in Enclave name field. This name is used in the process of generation of the skeleton to give unicity to the source files and the name of the resulting executable, so you can add more than one enclave to the same project.

    -
      -
    • -

      If you do not select the Generate sample untrusted application checkbox, the plugin generates only a trusted file and a Makefile fragment to build and compile the trusted part. See the following graphic. All the code for the enclave, including build Makefile, is put in a directory <root>/sgx/enclave_<name> . C/C++ code for the enclave proper are in <root>/sgx/enclave_<name>/trusted.

      -

      - -

      -

      Generated Skeleton for an Enclave. The option to Generate Sample was not Used

      -
    • -
    • -

      If you select Generate sample untrusted application checkbox, a simple ready to work sample application is generated, including untrusted stubs and implementation for a sample OCALL and ECALL.

      -

      - -

      -

      Generated Sample Untrusted Application

      -
    • -
    -
  6. -
-
-

NOTE:

-

If you select the Generate sample untrusted application checkbox, ecalls from the untrusted part are not be resolved by Eclipse C/C++ indexer. These functions are marked with a red line. The declaration of these ecalls resides in the unstrusted stub header which is generated during the build process and is not indexed by Eclipse. To resolve this problem, right-click on project root and select Index → Freshen All Files.

-
-
-
-

Adding an Intel(R) SGX Trusted Library

-

Trusted Static Libraries helps enclave author have libraries of shared code to be reused by enclaves, in exactly the same manner as usual static libxxx.a libraries are used to share code between regular non-SGX applications. The plugin adds a command to generate the skeleton of a trusted shared library.

-

To add a new Intel(R) SGX Trusted Library:

-
    -
  1. -

    Open Add New Intel(R) SGX Static Trusted Library dialog by right-click on the root of the project and select the appropriate command from Intel(R) Software Guard Extensions Tools menu:

    -

    - -

    -

    Add New Intel(R) SGX Static Trusted Library Dialog

    -
  2. -
  3. -

    Choose a name for the library and click OK. A skeleton for a trusted library is generated in directory <root>/sgx/trustedlib_<name>:

    -

    - -

    -

    A Generated Trusted Library

    -
  4. -
-
-
-

Adding an Intel(R) SGX Untrusted Module

-

Add an untrusted module to generate the untrusted stubs so you use an enclave, provided you have access to its .edl file. The enclave might have been built in the current project or in a different project.

-

To use trusted functionality of an enclave for which its *.edl is known, use the command Add Intel(R) SGX Untrusted Module:

-
    -
  1. -

    Open dialog Add Intel(R) SGX Untrusted Module by right-click-ing the project root in Package Explorer and chose the command from Intel(R) Software Guard Extensions Tools.

    -

    - -

    -

    Add Intel(R) SGX Untrusted Module

    -
  2. -
  3. -

    Use the Browse button to navigate the file system using a file dialog, and click OK. The untrusted module is copied to <root>/sgx/untrusted_<edl file name>. The selected *.edl is copied to the project.

    -

    - -

    -

    Copying the Untrusted Module to a Project

    -
  4. -
-
-
-

Updating Intel(R) SGX Enclave Signing Key

-

All skeletons enclave samples produced by the plugin contain a sample signing key. You might want to import another sign key that you already have, or generate a new one. Use the command Update Intel(R) SGX Enclave Signing Key to complete this task.

-
    -
  1. Choose Update Intel(R) SGX Enclave Signing Key by right-click on the project in Project Explorer -> Intel(R) Software Guard Extensions Tools menu. The Import or (Re)Generate Enclave Signing Key dialog appears.
  2. -
  3. In the Import or (Re)Generate Enclave Signing Key dialog, click Select to open a file dialog to select the output key.
  4. -
  5. -

    Click Import Key to update a selected signing key by copying another existing key or click Generate Key to update the selected signing key by generating a new key. In both cases, the new signature key is put into the file in text field Enclave Signing Key.

    -

    - -

    -

    Import or (Re)Generate Enclave Signing Key

    -
  6. -
  7. Click OK to update the enclave signing key.
  8. -
-

Under the hood, a new key is generated using openssl*, which needs to be installed on the machine:

-

openssl genrsa -out ../../../encl1_private.pem.key.pem -3 3072 -

-

-
-
-

Updating Enclave Configuration Files

-

A configuration file is an important part in the definition of an enclave. Intel(R) SGX SDK signer tool requires such *.xml configuration file as necessary input.

-

To update this configuration file, use the Update Config command:

-
    -
  1. -

    Right-click on the root project, Intel(R) Software Guard Extensions Tools->Select Config File.

    -

    - -

    -

    Select Configuration File

    -
  2. -
  3. -

    Click OK or double-click the selected configuration file to open the Enclave Configuration Settings dialog.

    -

    - -

    -

    Enclave Configuration Settings

    -

    For details on the meaning of the fields, see Intel(R) Software Guard Extensions Developer Guide.

    -
  4. -
-
-
-

Two Steps Sign Enclave

-

To help you develop enclaves, Intel(R) Software Guard Extensions Eclipse Plug-in generates all required structure including:

-
    -
  • c/c++ files and header files
  • -
  • .edl file
  • -
  • *.config.xml file
  • -
  • a sample Makefile
  • -
  • a sample signing key
  • -
-

While these structure might be appropriate for development and debugging, you need a 2-step process to integrate your own signing schema for generating production enclaves.

-
    -
  1. Generate hash: the signer tool generates signing material from the unsigned compiled enclave and from the configuration file for the enclave. The signed material comes as an opaque sequence of bytes which are put in a file with extension .hex. This file is used with the external signing facility. You come back with a signature for the .hex file plus the public key of your signing facility, and proceed to Step 2.
  2. -
  3. Generate signed enclaves : the signer tool generates the final signed enclave.
  4. -
-

To complete this task, provide the following input parameters:

-
    -
  • The unsigned enclave
  • -
  • The configuration file
  • -
  • The output file produced when you generate hash (the .hex file)
  • -
  • The files produced by the external signing facility: the signature of the .hex file and public key for it
  • -
  • The plugin checks if the input parameters are consistent:
  • -
  • The .hex file matches the unsigned enclave and the configuration file,
  • -
  • The signed material is verified with the public key
  • -
-

If the parameters are consistent, the production signed enclave is produced.

-
-

NOTE:

-

If you generate signed enclave right after generating hash, you can only enter the parameters specific for generating signed enclave.

-
-

To use the two-step signing function, activate the configuration Intel(R) SGX Hardware Release mode. When this configuration is active, the compilation does not produce a signed enclave, as in the other Intel(R) SGX configurations; the process only produces unsigned enclaves.

-

- -

-

Configure Intel(R) SGX Hardware Release Mode

-

When you configure the plugin in the Intel(R) SGX Hardware Release Mode, you can see the Generate Hash and Generate Signed Enclave options through Intel(R) Software Guard Extensions Tools->Two Step Sign Enclave.

-

- -

-

Two Step Sign Enclave Menu

-
-
-

Generate Hash

-

Generating hash is the first step in the 2-Steps signing process.To generate hash, use the following steps:

-
    -
  1. -

    Right-click on project root, go to Intel(R) Software Guard Extensions Tools menu → Two Step Enclave Sign → Generate Hash

    -

    - -

    -

    Two Step Enclave Sign - Generate Hash

    -
  2. -
  3. In the Generate Hash dialog, enter the required inputs to the corresponding fields:
    • Enter the path to the compiled enclave to be signed in the Enclave Path field. Click Select Enclave to open a file dialog to select the enclave.
    • In the Hash File Location field , enter the path of the output file that will contain signing materials. By default this file has the same file name as the unsigned enclave, with .hex extension added. To change the path, click Select File Path to open a file dialog to select the file path.
    • In the Configuration File path field, enter the path of the configuration file for the generated hash. Click Select Config to open a dialog to select from all enclave configuration files in the project (similar with the one of the command Update Config).
  4. -
  5. -

    Click OK after you fill in all the fields. The Intel(R) SGX SDK is launched under the hood with the provided parameters and the hash file is generated. A dialog box appears to confirm the completion:

    -

    - -

    -

    Generating Hash Completion Dialog

    -
  6. -
-

You complete the first step, generating hash, in the two step signing enclave. The *.hex file may be signed with the external facility, which generates a signature for it and a public verification key.

-

If you click OK, the Generate Signed Enclave dialog appears. The required fields in this dialog have been pre-configured with the paths of the unsigned enclave, the configuration file and of the *.hex file. To generated the final signed enclave ready for production immediately, click OK.

-

- -

-

Generate Signed Enclave Dialog with Pre-configurations

-

If you click Cancel in the Generate Signed Enclave dialog, you can continue the signing process later using the Generate Signed Enclave command.

-
-
-

Generate Signed Enclaves

-

Generating signed enclave is the second step in the 2-Steps signing process. You should have the following files to complete this step:

-
    -
  • The .hex file generated with Generate Hash command
  • -
  • The files produced from the external signing facility
  • -
  • The signature of the .hex file
  • -
  • The public verification key
  • -
-

To generate signed enclaves, use the following steps:

-
    -
  1. -

    Right-click on the project root, and go to Intel(R) Software Guard Extensions Tools menu → Two Step Sign Enclave → Generate Signed Enclave.

    -

    - -

    -

    Generate Signed Enclave Dialog

    -
  2. -
  3. Enter the inputs to all the fields and click OK.
  4. -
-
-
-

Building and Running Intel(R) SGX Code

-

This section describes the following topics about building and running Intel(R) SGX code:

-
    -
  • Intel(R) SGX build configurations
  • -
  • Running samples generated for enclaves
  • -
 
-
-

Intel(R) SGX Build Configurations

-

There are usually two types of builds that a regular non-SGX project defines:

-
    -
  • Debug
  • -
  • Release
  • -
-

Intel(R) SGX-enabled projects add to this picture support to build and test Intel(R) SGX-enabled application on non-SGX platforms (or emulator) using simulation libraries. This approach doubles the set of build types, creating four possible combinations. For these combinations, you need to use different sets of compilation and linking flags and link different libraries.

-

The non-debug hardware build is meant to give production code, so it requires the maximum attention when signed. The Two Steps Sign schema is required for production enclaves, which involves an external signing facility, not part of Intel(R) SGX SDK. The other configurations are not meant for production but they have to be signed too. The simplest and more convenient Single Step schema is used for them.

-

Again for testing purpose, you might want to experiment with a non-production enclave built with release compilation and linking flags, on a real hardware Intel(R) SGX-enabled platform. That would be an enclave built exactly as a production enclave, except for the sign process which would be Single Step. To support the construction of such enclave, there is a hardware non-debug build configuration dubbed Prerelease.

-

So there are five Intel(R) SGX related configurations when Intel(R) SGX Nature is added to a project:

-

- -

-

Intel(R) SGX Configurations

-

The following table resumes the existing Intel(R) SGX configurations and relate them with compilation/linking flags (debug/non-debug) and signing scheme (single vs. two steps):

-

Intel(R) SGX Configurations

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Configuration NameSimulation?Debug?Signing Schema
Intel(R) SGX Hardware DebugHardwareDebugSingle Step
Intel(R) SGX Hardware Pre-releaseHardwareNon-debugSingle Step
Intel(R) SGX Hardware ReleaseHardwareNon-debugTwo Step
Intel(R) SGX SimulationSimulationNon-debugSingle Step
Intel(R) SGX SimulationDebug SimulationDebugSingle step
-

Intel(R) Software Guard Extensions Eclipse Plug-in uses standard GNU* make tool to build the trusted and the untrusted code, using the generated file sgx/Makefile.

-

This fact does not impose any restriction on the build tool chosen for the hosting project. Intel(R) Software Guard Extensions Eclipse* Plug-in uses its own build configurations which do not interfere with the configurations that you might have in your project.

-

When Intel(R) SGX configurations are selected, by default only code under <root>/sgx directory get built.

-

You can customize Intel(R) SGX configurations as any other Eclipse build configurations from the project properties dialog. For example:

-
    -
  1. Right-click in Project Explorer Properties → C/C++ Build
  2. -
  3. Uncheck the Use default build command checkbox.
  4. -
-

Then you can customize and integrate Intel(R) SGX build process. You can use Makefile instead of sgx/Makefile in the example shown in the following figure:

-

- -

-

Customization of Intel(R) SGX Build Command

-

The build process is done using standard Eclipse interface for build, by example from the main Project menu:

-

- -

-

Project Menu

-
-
-

Running Samples Generated for Enclaves

-

Intel(R) Software Guard Extensions Eclipse* Plugin provides an option to generate a sample application together with the enclave code when the enclave is created. After the project is build, the sample application is built also and ready to run. You can see the sample application named sample in the enclave directory in Project Explorer. You can run this sample as a local C/C++ application as shown in the following figure:

-

- -

-

Sample Application

-

See the result of the execution in Eclipse console window as shown below:

-

- -

-

The Result of Running Samples Generated for Enclaves

-
- - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/plugin.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/plugin.xml deleted file mode 100644 index 91e36be341..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/plugin.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/src/com/intel/sgx/userguide/Activator.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/src/com/intel/sgx/userguide/Activator.java deleted file mode 100644 index 607af38562..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/src/com/intel/sgx/userguide/Activator.java +++ /dev/null @@ -1,73 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - -package com.intel.sgx.userguide; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "com.intel.sgx.userguide"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - - /** - * Returns an image descriptor for the image file at the given - * plug-in relative path - * - * @param path the path - * @return the image descriptor - */ - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/toc.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/toc.xml deleted file mode 100644 index 3d3fe8e174..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx.userguide/toc.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.classpath b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.classpath deleted file mode 100644 index 6c009435ce..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.classpath +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.project b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.project deleted file mode 100644 index aec7e39589..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.project +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - com.intel.sgx - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.settings/org.eclipse.jdt.core.prefs b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index a698e59674..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.8 diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/META-INF/MANIFEST.MF b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/META-INF/MANIFEST.MF deleted file mode 100644 index f06f84d713..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/META-INF/MANIFEST.MF +++ /dev/null @@ -1,26 +0,0 @@ -License: Eclipse Public License Version 1.0 ("EPL") -bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-SymbolicName: com.intel.sgx;singleton:=true -Bundle-Version: 1.0.1.qualifier -Bundle-Activator: com.intel.sgx.Activator -Bundle-Vendor: %Bundle-Vendor -Require-Bundle: org.eclipse.cdt.core;bundle-version="5.11.0", - org.eclipse.core.runtime;bundle-version="3.11.1", - org.eclipse.ui;bundle-version="3.107.0", - org.eclipse.cdt.managedbuilder.ui;bundle-version="8.2.2", - org.eclipse.cdt.managedbuilder.core;bundle-version="8.3.0", - org.eclipse.core.resources;bundle-version="3.10.1", - org.eclipse.cdt.ui;bundle-version="5.11.0", - org.eclipse.core.expressions;bundle-version="3.5.0", - org.eclipse.ui.ide;bundle-version="3.11.0" -Bundle-ActivationPolicy: lazy -Export-Package: com.intel.sgx, - com.intel.sgx.build, - com.intel.sgx.dialogs, - com.intel.sgx.discovery, - com.intel.sgx.handlers, - com.intel.sgx.natures, - com.intel.sgx.preferences, - com.intel.sgx.templates -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/OSGI-INF/l10n/bundle.properties b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/OSGI-INF/l10n/bundle.properties deleted file mode 100644 index 171c78c844..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/OSGI-INF/l10n/bundle.properties +++ /dev/null @@ -1,15 +0,0 @@ -######################################################################### -# Copyright (c) 2016 Intel Corporation. # -# # -# All rights reserved. This program and the accompanying materials # -# are made available under the terms of the Eclipse Public License v1.0 # -# which accompanies this distribution, and is available at # -# http://www.eclipse.org/legal/epl-v10.html # -# # -# Contributors: # -# Intel Corporation - initial implementation and documentation # -######################################################################### - - -Bundle-Vendor = Intel Corporation -Bundle-Name = SGX(R) Linux Eclipse Plugin \ No newline at end of file diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/build.properties b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/build.properties deleted file mode 100644 index c9a5f18598..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/build.properties +++ /dev/null @@ -1,24 +0,0 @@ -######################################################################### -# Copyright (c) 2016 Intel Corporation. # -# # -# All rights reserved. This program and the accompanying materials # -# are made available under the terms of the Eclipse Public License v1.0 # -# which accompanies this distribution, and is available at # -# http://www.eclipse.org/legal/epl-v10.html # -# # -# Contributors: # -# Intel Corporation - initial implementation and documentation # -######################################################################### - - -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - templates/,\ - discovery/,\ - build.properties,\ - OSGI-INF/,\ - OSGI-INF/l10n/bundle.properties -jre.compilation.profile = JavaSE-1.8 diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.c b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.c deleted file mode 100644 index 139597f9cb..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.c +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.cpp b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.cpp deleted file mode 100644 index 139597f9cb..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/discovery/test.cpp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/plugin.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/plugin.xml deleted file mode 100644 index e08a0a67e9..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/plugin.xml +++ /dev/null @@ -1,786 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An C project, with Intel(R) SGX Commands and Configurations - - - - - - An C++ project, with Intel(R) SGX Commands and Configurations - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Activator.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Activator.java deleted file mode 100644 index 2849bd0834..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Activator.java +++ /dev/null @@ -1,75 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - -package com.intel.sgx; - -import java.net.URL; - -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.Bundle; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - public static final String PLUGIN_ID = "com.intel.sgx";//$NON-NLS-1$ - - private static Activator plugin; - - public Activator() { - } - - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - public static Activator getDefault() { - return plugin; - } - - public static ImageDescriptor getImageDescriptor(String path) { - return imageDescriptorFromPlugin(PLUGIN_ID, path); - } - - public static void log(Exception e) { - plugin.getLog().log(newStatus(e)); - } - - public static IStatus newStatus(Exception e) { - return new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e); - } - - public static URL findFile(Path path) { - return FileLocator.find(plugin.getBundle(), path, null); - } - - public static Bundle getBundle(String id){ - for(Bundle bundle : plugin.getBundle().getBundleContext().getBundles()){ - if(bundle.getSymbolicName().equals(id)) - return bundle; - } - return null; - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/CConfigurationDataProvider2.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/CConfigurationDataProvider2.java deleted file mode 100644 index 94ec54bc28..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/CConfigurationDataProvider2.java +++ /dev/null @@ -1,46 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx; - -import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; -import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; -import org.eclipse.cdt.core.settings.model.extension.CConfigurationDataProvider; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; - -public class CConfigurationDataProvider2 extends CConfigurationDataProvider { - - public CConfigurationDataProvider2() { - } - - @Override - public CConfigurationData loadConfiguration(ICConfigurationDescription des, - IProgressMonitor monitor) throws CoreException { - return null; - } - - @Override - public CConfigurationData createConfiguration( - ICConfigurationDescription des, - ICConfigurationDescription baseDescription, - CConfigurationData baseData, boolean clone, IProgressMonitor monitor) - throws CoreException { - return null; - } - - @Override - public void removeConfiguration(ICConfigurationDescription des, - CConfigurationData data, IProgressMonitor monitor) { - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Messages.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Messages.java deleted file mode 100644 index d4133b2962..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/Messages.java +++ /dev/null @@ -1,37 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx; - -import org.eclipse.osgi.util.NLS; - -public class Messages extends NLS { - - private static final String BUNDLE_NAME = "com.intel.sgx.messages";//$NON-NLS-1$ - - /* - * TODO - These Strings can be used all through the package to control what messages are displayed. - * Todo here is to identify any message that needs to be made configurable. - */ - public static String CreateNativeFolders_No_folders; - public static String CreateNativeFolders_Missing_project_name; - public static String CreateNativeFolders_Project_does_not_exist; - - static{ - //Bundle initialization. - NLS.initializeMessages(BUNDLE_NAME, Messages.class); - } - - private Messages(){ - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/SdkPathVariableProvider.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/SdkPathVariableProvider.java deleted file mode 100644 index b205b73c64..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/SdkPathVariableProvider.java +++ /dev/null @@ -1,70 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx; -import java.io.File; - -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.variableresolvers.PathVariableResolver; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.preference.IPreferenceStore; - -import com.intel.sgx.preferences.PreferenceConstants; -import com.intel.sgx.preferences.SGXPreferencePage; - -public class SdkPathVariableProvider extends PathVariableResolver { - - public SdkPathVariableProvider() { - super(); - } - - @Override - public String[] getVariableNames(String variable, IResource resource) { - String variableNames[] = {"SGX_SDK_DIR_PATH"}; - return (variableNames); - } - - @Override - public String getValue(String variable, IResource resource) { - if(variable.equals("SGX_SDK_DIR_PATH")) { - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - String SDKPath = store.getString(PreferenceConstants.SDK_PATH); - IPath SDKCanonicalPath= new Path(SDKPath); - return(SDKCanonicalPath.append("Include").toOSString()); - } - return null; - } - - public static String getSGXSdkLocation() { - return Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.SDK_PATH); - } - - public static boolean isSGXSdkLocationValid() { - String location = getSGXSdkLocation(); - if (location.length() == 0) - return false; - - return isValidSGXSdkLocation(location); - } - - public static boolean isValidSGXSdkLocation(String location) { - File dir = new File(location); - if (!dir.isDirectory()) - return false; - - return new PreferenceConstants.SGXSDK64Descriptor(dir).getSignerPath().canExecute() - || new PreferenceConstants.SGXSDK32Descriptor(dir).getSignerPath().canExecute(); - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/build/SGXSDKCommandLauncher.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/build/SGXSDKCommandLauncher.java deleted file mode 100644 index d41e96140d..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/build/SGXSDKCommandLauncher.java +++ /dev/null @@ -1,38 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -/** - * This class follows the same solution provided in the NDK_PLUGIN for NDKCommandLauncher. - */ -package com.intel.sgx.build; - -import org.eclipse.cdt.core.CommandLauncher; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; - -import com.intel.sgx.SdkPathVariableProvider; -/** - * This launches the sgx-ndk-build. - */ -public class SGXSDKCommandLauncher extends CommandLauncher { - - @Override - public Process execute(IPath commandPath, String[] args, String[] env, IPath changeToDirectory, - IProgressMonitor monitor) - throws CoreException { - - return super.execute(commandPath, args, env, changeToDirectory, monitor); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddEnclaveFileDialog.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddEnclaveFileDialog.java deleted file mode 100644 index 3cd9bbd5a7..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddEnclaveFileDialog.java +++ /dev/null @@ -1,126 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import javax.swing.JOptionPane; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -import com.intel.sgx.handlers.AddEnclave; - -public class AddEnclaveFileDialog extends SGXDialogBase { - - private Text fileNameField; - private AddEnclave addHandler; - private boolean generateApp = true; - - public AddEnclaveFileDialog(Shell shell, AddEnclave addHandler) { - super(shell); - this.addHandler = addHandler; - this.shell = shell; - // setShellStyle(SWT.RESIZE | SWT.TITLE); - } - - public boolean generateApp() - { - return generateApp; - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1,false); - composite.setLayout(gridLayout); - - final Group container = new Group(composite, SWT.NONE); - container.setLayout(new GridLayout(3,false)); - GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL); - innergrid1.horizontalSpan = 3; - container.setLayoutData(innergrid1); - - addLabel(container, "Enter the name of the Enclave. Make sure the name is unique within the hosting application."); - - final Label fileNameLabel = new Label(container, SWT.NONE); - fileNameLabel.setText("Enclave name:"); - fileNameLabel.setLayoutData(new GridData(GridData.BEGINNING,GridData.CENTER, false, false)); - - fileNameField = new Text(container,SWT.SINGLE | SWT.BORDER); - GridData textGridData1 = new GridData(GridData.FILL_HORIZONTAL); - textGridData1.minimumWidth = 400; - textGridData1.grabExcessHorizontalSpace = true; - fileNameField.setLayoutData(textGridData1); - - Button generateUntrustedApp = new Button(container, SWT.CHECK); - generateUntrustedApp.setText("Generate sample untrusted application?"); - generateUntrustedApp.setLayoutData(new GridData(GridData.BEGINNING, GridData.END, false, false, 3, 1)); - generateUntrustedApp.setSelection(true); - - generateUntrustedApp.addSelectionListener(new SelectionAdapter() { - - @Override - public void widgetSelected(SelectionEvent event) { - Button btn = (Button) event.getSource(); - generateApp = btn.getSelection(); - } - }); - - container.layout(); - composite.layout(); - return composite; - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Add New Intel(R) SGX Enclave Dialog"); - newShell.layout(); - } - - @Override - protected - void okPressed() { - addHandler.edlFilename = fileNameField.getText(); - if(!fileNameField.getText().isEmpty() - ){ - if(Character.isDigit(fileNameField.getText().charAt(0))) - { - JOptionPane.showMessageDialog(null, "Enclave names starting with digits are not allowed.", "Error", - JOptionPane.ERROR_MESSAGE); - } - else - super.okPressed(); - } - } - - @Override - protected Point getInitialSize(){ - return new Point(675,200); - } - - public String getFileName() { - return fileNameField.getText(); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddTrustedStaticLibFileDialog.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddTrustedStaticLibFileDialog.java deleted file mode 100644 index f1e20a129f..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddTrustedStaticLibFileDialog.java +++ /dev/null @@ -1,109 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import javax.swing.JOptionPane; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -import com.intel.sgx.handlers.AddTrustedStaticLib; - -public class AddTrustedStaticLibFileDialog extends SGXDialogBase { - - private Text fileNameField; - private AddTrustedStaticLib addHandler; - private boolean generateApp = false; - - public AddTrustedStaticLibFileDialog(Shell shell, AddTrustedStaticLib addHandler) { - super(shell); - this.addHandler = addHandler; - this.shell = shell; - // setShellStyle(SWT.RESIZE | SWT.TITLE); - } - - public boolean generateApp() - { - return generateApp; - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1,false); - composite.setLayout(gridLayout); - - final Group container = new Group(composite, SWT.NONE); - container.setLayout(new GridLayout(3,false)); - GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL); - innergrid1.horizontalSpan = 3; - container.setLayoutData(innergrid1); - - addLabel(container, "Enter the name of the Static Trusted Library."); - addLabel(container, "Make sure the name is unique within the hosting application."); - - final Label fileNameLabel = new Label(container, SWT.NONE); - fileNameLabel.setText("Static Trusted Library Name:"); - fileNameLabel.setLayoutData(new GridData(GridData.BEGINNING,GridData.CENTER, false, false)); - - fileNameField = new Text(container,SWT.SINGLE | SWT.BORDER); - GridData textGridData1 = new GridData(GridData.FILL_HORIZONTAL); - textGridData1.minimumWidth = 400; - textGridData1.grabExcessHorizontalSpace = true; - fileNameField.setLayoutData(textGridData1); - - composite.layout(); - - return composite; - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Add New Intel(R) SGX Static Trusted Library Dialog"); - } - - @Override - protected - void okPressed(){ - addHandler.edlFilename = fileNameField.getText(); - if(!fileNameField.getText().isEmpty() - ){ - if(Character.isDigit(fileNameField.getText().charAt(0))) - { - JOptionPane.showMessageDialog(null, "Enclave names starting with digits are not allowed.", "Error", - JOptionPane.ERROR_MESSAGE); - } - else - super.okPressed(); - } - } - - @Override - protected Point getInitialSize(){ - return new Point(675,200); - } - - public String getFileName() { - return fileNameField.getText(); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddUntrustedModuleDialog.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddUntrustedModuleDialog.java deleted file mode 100644 index a99bf71978..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/AddUntrustedModuleDialog.java +++ /dev/null @@ -1,138 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import java.io.File; - -import javax.swing.JOptionPane; - -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -import com.intel.sgx.handlers.AddUntrustedModule; - -public class AddUntrustedModuleDialog extends Dialog { - - private Text fileNameField,makeFilePathField; - private Shell shell; - private AddUntrustedModule addHandler; - private boolean generateApp = false; - - public AddUntrustedModuleDialog(Shell shell, AddUntrustedModule addHandler) { - super(shell); - this.addHandler = addHandler; - this.shell = shell; - //setShellStyle(SWT.RESIZE | SWT.TITLE); - } - - public boolean generateApp() - { - return generateApp; - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1,false); - composite.setLayout(gridLayout); - - final Group container = new Group(composite, SWT.NONE); - container.setLayout(new GridLayout(3,false)); - GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL); - innergrid1.horizontalSpan = 3; - container.setLayoutData(innergrid1); - - final Label messageLabel = new Label(container, SWT.NONE); - messageLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1)); - messageLabel.setText("Enter the path to the Enclave Descriptor file (*.edl) of the enclave to host."); - - - final Label fileNameLabel = new Label(container, SWT.NONE); - fileNameLabel.setText("Filename:"); - fileNameLabel.setLayoutData(new GridData(GridData.BEGINNING,GridData.CENTER, false, false)); - - - fileNameField = new Text(container,SWT.SINGLE | SWT.BORDER); - GridData textGridData1 = new GridData(GridData.FILL_HORIZONTAL); - textGridData1.minimumWidth = 400; - textGridData1.grabExcessHorizontalSpace = true; - fileNameField.setLayoutData(textGridData1); - - final Button browseButton = new Button(container, SWT.PUSH); - browseButton.setText("Browse"); - GridData buttonGridData1 = new GridData(GridData.END); - buttonGridData1.horizontalAlignment = SWT.RIGHT; - buttonGridData1.horizontalSpan = 1; - buttonGridData1.minimumWidth = 120; - browseButton.setLayoutData(buttonGridData1); - browseButton.addSelectionListener(new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = null; - shell = new Shell(); - FileDialog dialog = new FileDialog(shell, SWT.OPEN); - dialog.setFilterExtensions(new String [] {"*.edl"}); - dialog.setFilterPath(""); - result = dialog.open(); - fileNameField.setText(result); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - - return composite; - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Add Intel(R) SGX Untrusted Module."); - } - - @Override - protected - void okPressed(){ - addHandler.edlFilename = fileNameField.getText(); - if(!fileNameField.getText().isEmpty()) - if((new File(fileNameField.getText())).isFile()) - super.okPressed(); - else - JOptionPane.showMessageDialog(null, "EDL file does not exist.", "Error", - JOptionPane.ERROR_MESSAGE); - } - - @Override - protected Point getInitialSize(){ - return new Point(675,200); - } - - public String getFileName() { - return fileNameField.getText(); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/EnclaveConfigDialog.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/EnclaveConfigDialog.java deleted file mode 100644 index 20595f8095..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/EnclaveConfigDialog.java +++ /dev/null @@ -1,257 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import org.eclipse.jface.preference.JFacePreferences; -import org.eclipse.jface.resource.JFaceResources; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ModifyEvent; -import org.eclipse.swt.events.ModifyListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -import com.intel.sgx.handlers.EnclaveConfigHandler; - -public class EnclaveConfigDialog extends SGXDialogBase { - - @SuppressWarnings("unused") - private Shell shell; - private EnclaveConfigHandler enclaveConfig; - private Label statusLabel; - private Text prodID; - private Text isvSvn; - private Text threadStackSize; - private Text globalHeapSize; - private Text tcsNum; - private Combo tcsPolicy; - private Button disableDebug; - - public EnclaveConfigDialog(Shell parentshell,EnclaveConfigHandler enclaveConfigHandler) { - super(parentshell); - this.shell = parentshell; - this.enclaveConfig = enclaveConfigHandler; - setShellStyle(SWT.RESIZE | SWT.TITLE); - } - - @Override - protected Control createDialogArea(Composite parent) { - - Composite container = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(3,false); - container.setLayout(gridLayout); - - final Group groupLabel1 = new Group(container, SWT.None); - groupLabel1.setLayout(new GridLayout(3,false)); - GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL); - innergrid1.horizontalSpan = 3; - groupLabel1.setLayoutData(innergrid1); - - Label warningLabel = new Label(groupLabel1,SWT.BEGINNING | SWT.WRAP); - warningLabel.setText("Note: Use this Menu to change the Enclave settings."); - - statusLabel = new Label(container,SWT.BEGINNING | SWT.WRAP); - GridData statusGrid = new GridData(GridData.FILL_HORIZONTAL); - statusGrid.horizontalSpan = 3; - statusLabel.setLayoutData(statusGrid); - statusLabel.setText(""); - statusLabel.setForeground(JFaceResources.getColorRegistry().get(JFacePreferences.ERROR_COLOR)); - - final Group groupLabel2 = new Group(container, SWT.None); - groupLabel2.setLayout(new GridLayout(3,false)); - groupLabel2.setText("Modify the Enclave Settings here..."); - GridData innergrid = new GridData(GridData.FILL_HORIZONTAL); - innergrid.horizontalSpan = 3; - groupLabel2.setLayoutData(innergrid); - - final Label messageLabel0 = new Label(groupLabel2, SWT.NONE); - messageLabel0.setText("Product ID:"); - messageLabel0.setLayoutData(new GridData(GridData.BEGINNING)); - - prodID = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - gridData.horizontalSpan = 2; - gridData.widthHint = 400; - prodID.setLayoutData(gridData); - prodID.setText(enclaveConfig.prodId); - prodID.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent modifyEvent) { - statusLabel.setText(""); - enclaveConfig.prodId = prodID.getText(); - } - }); - - final Label messageLabel1 = new Label(groupLabel2, SWT.NONE); - messageLabel1.setText("ISV SVN:"); - messageLabel1.setLayoutData(new GridData(GridData.BEGINNING)); - - isvSvn = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER); - isvSvn.setLayoutData(gridData); - isvSvn.setText(enclaveConfig.isvSvn); - isvSvn.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent modifyEvent) { - statusLabel.setText(""); - enclaveConfig.isvSvn = isvSvn.getText(); - } - }); - - final Label messageLabel2 = new Label(groupLabel2, SWT.NONE); - messageLabel2.setText("Thread Stack Size:"); - messageLabel2.setLayoutData(new GridData(GridData.BEGINNING)); - - threadStackSize = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER); - threadStackSize.setLayoutData(gridData); - threadStackSize.setText(enclaveConfig.threadStackSize); - threadStackSize.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent modifyEvent) { - enclaveConfig.threadStackSize = threadStackSize.getText(); - if(!(threadStackSize.getText().matches("0x[0-9a-fA-F]{1,}000"))) - { - statusLabel.setText("Error: The Thread Stack Size value must be Page Aligned."); - } - else - { - if(!(enclaveConfig.globalHeapSize.matches("0x[0-9a-fA-F]{1,}000"))) - statusLabel.setText("Error: The Global Heap Size value must be Page Aligned."); - else - statusLabel.setText(""); - } - } - }); - - final Label messageLabel3 = new Label(groupLabel2, SWT.NONE); - messageLabel3.setText("Global Heap Size:"); - messageLabel3.setLayoutData(new GridData(GridData.BEGINNING)); - - globalHeapSize = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER); - globalHeapSize.setLayoutData(gridData); - globalHeapSize.setText(enclaveConfig.globalHeapSize); - globalHeapSize.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent modifyEvent) { - enclaveConfig.globalHeapSize = globalHeapSize.getText(); - if(!(globalHeapSize.getText().matches("0x[0-9a-fA-F]{1,}000"))) - { - statusLabel.setText("Error: The Global Heap Size value must be Page Aligned."); - } - else - { - if(!(enclaveConfig.threadStackSize.matches("0x[0-9a-fA-F]{1,}000"))) - statusLabel.setText("Error: The Thread Stack Size value must be Page Aligned."); - else - statusLabel.setText(""); - - } - } - }); - - final Label messageLabel4 = new Label(groupLabel2, SWT.NONE); - messageLabel4.setText("TCS Number:"); - messageLabel4.setLayoutData(new GridData(GridData.BEGINNING)); - - tcsNum = new Text(groupLabel2, SWT.SINGLE | SWT.BORDER); - tcsNum.setLayoutData(gridData); - tcsNum.setText(enclaveConfig.tcsNum); - tcsNum.addModifyListener(new ModifyListener() { - @Override - public void modifyText(ModifyEvent modifyEvent) { - statusLabel.setText(""); - enclaveConfig.tcsNum = tcsNum.getText(); - } - }); - - final Label messageLabel5 = new Label(groupLabel2, SWT.NONE); - messageLabel5.setText("TCS Policy:"); - messageLabel5.setLayoutData(new GridData(GridData.BEGINNING)); - - final String[] items = {"Unbound","Bound"}; - tcsPolicy = new Combo(groupLabel2, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.BORDER); - tcsPolicy.setItems(items); - String item = items[Integer.parseInt(enclaveConfig.tcsPolicy)]; - int index = tcsPolicy.indexOf(item); - tcsPolicy.select(index < 0 ? 0 : index); - tcsPolicy.setLayoutData(gridData); - tcsPolicy.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent e){ - statusLabel.setText(""); - enclaveConfig.tcsPolicy = (tcsPolicy.getSelectionIndex() == 0 ? "0" : "1"); - } - }); - - - final Label messageLabel6 = new Label(groupLabel2, SWT.NONE); - messageLabel6.setText("Disable Debug:"); - messageLabel6.setLayoutData(new GridData(GridData.BEGINNING)); - - disableDebug = new Button(groupLabel2,SWT.CHECK); - GridData gridData1 = new GridData(GridData.FILL_HORIZONTAL); - disableDebug.setLayoutData(gridData1); - disableDebug.setSelection(enclaveConfig.disableDebug.equals("1")?true:false); - disableDebug.addSelectionListener(new SelectionAdapter(){ - public void widgetSelected(SelectionEvent e){ - statusLabel.setText(""); - enclaveConfig.disableDebug = disableDebug.getSelection()?"1":"0"; - } - }); - - if(statusLabel.getText() != null){ - statusLabel.setVisible(true); - } - else{ - statusLabel.setVisible(false); - } - - return container; - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Enclave Configuration Settings:"); - } - - @Override - protected Point getInitialSize(){ - return new Point(450,400); - } - - @Override - protected - void okPressed(){ - enclaveConfig.prodId = this.prodID.getText(); - enclaveConfig.isvSvn = this.isvSvn.getText(); - enclaveConfig.threadStackSize = this.threadStackSize.getText(); - enclaveConfig.globalHeapSize = this.globalHeapSize.getText(); - enclaveConfig.tcsNum = this.tcsNum.getText(); - enclaveConfig.tcsPolicy = this.tcsPolicy.getSelectionIndex() == 0 ? "0" : "1"; - enclaveConfig.disableDebug = disableDebug.getSelection()?"1":"0"; - - - if((statusLabel.getText() == "") && (enclaveConfig.globalHeapSize.matches("0x[0-9a-fA-F]{1,}000")) && (enclaveConfig.threadStackSize.matches("0x[0-9a-fA-F]{1,}000"))) - super.okPressed(); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/RemoveEnclaveFileDialog.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/RemoveEnclaveFileDialog.java deleted file mode 100644 index 6db3d2e1c4..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/RemoveEnclaveFileDialog.java +++ /dev/null @@ -1,122 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.DirectoryDialog; -//import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -import com.intel.sgx.handlers.RemoveEnclave; - -public class RemoveEnclaveFileDialog extends Dialog{ - - private Text fileNameField; - private Shell shell; - private RemoveEnclave removeHandler; - - public RemoveEnclaveFileDialog(Shell shell, RemoveEnclave removeHandler) { - super(shell); - this.removeHandler = removeHandler; - this.shell = shell; - setShellStyle(SWT.RESIZE | SWT.TITLE); - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1,false); - composite.setLayout(gridLayout); - - final Group container = new Group(composite, SWT.None); - container.setLayout(new GridLayout(3,false)); - GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL); - innergrid1.horizontalSpan = 3; - container.setLayoutData(innergrid1); - container.setText("Path to Enclave directory:"); - - final Label messageLabel = new Label(container, SWT.NONE); - messageLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1)); - messageLabel.setText("Enter the name of the Enclave Or Navigate to the Enclave folder to be removed from the host."); - - final Label fileNameLabel = new Label(container, SWT.NONE); - fileNameLabel.setLayoutData(new GridData(GridData.BEGINNING,GridData.CENTER, false, false)); - fileNameLabel.setText("Enclave Name:"); - - fileNameField = new Text(container, SWT.SINGLE | SWT.BORDER); - GridData textGridData1 = new GridData(GridData.FILL_HORIZONTAL); - textGridData1.minimumWidth = 400; - textGridData1.grabExcessHorizontalSpace = true; - fileNameField.setLayoutData(textGridData1); - - final Button browseButton = new Button(container, SWT.PUSH); - browseButton.setText("Browse"); - GridData buttonGridData1 = new GridData(GridData.END); - buttonGridData1.horizontalAlignment = SWT.RIGHT; - buttonGridData1.horizontalSpan = 1; - buttonGridData1.minimumWidth = 120; - browseButton.setLayoutData(buttonGridData1); - browseButton.addSelectionListener(new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = fileNameField.getText(); - - DirectoryDialog dialog = new DirectoryDialog(shell, SWT.OPEN); - dialog.setMessage("Select the Enclave Directory to remove."); - dialog.setFilterPath(""); - result = dialog.open(); - fileNameField.setText(result); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - - return container; - } - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Remove an Imported Enclave"); - } - - @Override - protected void okPressed(){ - removeHandler.edlFilename = fileNameField.getText(); - if(!fileNameField.getText().isEmpty()) - super.okPressed(); - } - - @Override - protected Point getInitialSize(){ - return new Point(675,205); - } - - public String getFileName() { - return fileNameField.getText(); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/SGXDialogBase.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/SGXDialogBase.java deleted file mode 100644 index 4b49a8bb31..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/SGXDialogBase.java +++ /dev/null @@ -1,222 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import java.io.InputStream; -import java.util.Scanner; - -import org.eclipse.core.resources.IContainer; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.window.IShellProvider; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog; - -import com.intel.sgx.Activator; - -public abstract class SGXDialogBase extends Dialog { - - protected Shell shell; - public Text configFileField; - public static FilteredResourcesSelectionDialog dialogForConfig(Shell shell) { - // final IContainer container = ResourcesPlugin.getWorkspace().getRoot(); - - final IContainer container = SGXDialogBase.getCurrentProject(); - - FilteredResourcesSelectionDialog d = new FilteredResourcesSelectionDialog( - shell, false, container, IResource.FILE) { - { - setInitialPattern("**"); - } - - @Override - protected IStatus validateItem(Object item) { - // return Status.OK_STATUS; - IFile f = (IFile) item; - if (f.getParent() instanceof IProject) { - return new Status(IStatus.ERROR, Activator.PLUGIN_ID, - "The selected resource has to be part of the source folder"); - } - - - return super.validateItem(item); - } - - protected ItemsFilter createFilter() { - return new ResourceFilter(container, true, IResource.FILE) { - - @Override - public boolean matchItem(Object item) { - return isConfigFile(item); - } - - private boolean isConfigFile(Object item) { - if (!(item.toString().endsWith(".xml") && super - .matchItem(item))) { - return false; - } - try { - IFile iFile = (IFile) item; - return streamContainsString(iFile.getContents(), - ""); - } catch (Throwable e) { - return false; - } - } - - }; - - } - - public boolean streamContainsString(InputStream is, - String searchString) { - Scanner streamScanner = new Scanner(is); - if (streamScanner.findWithinHorizon(searchString, 0) != null) { - return true; - } else { - return false; - } - } - - }; - return d; - } - - - - protected SelectionListener configFileSelectionListener = new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - - FilteredResourcesSelectionDialog d = dialogForConfig(shell); - d.setTitle("Select Config File"); - if (d.open() == Dialog.OK) { - IFile target = (IFile) d.getResult()[0]; - configFileField.setText(target.getLocation().toOSString()); - } - ; - } - - @Override - public void widgetDefaultSelected(SelectionEvent arg0) { - // TODO Auto-generated method stub - - } - - }; - - public SGXDialogBase(Shell parentShell) { - super(parentShell); - } - - public SGXDialogBase(IShellProvider parentShell) { - super(parentShell); - } - - protected Text addGroup(Composite composite, String title, String subtitle, - String label, String selectButtonLabel, SelectionListener selectionListener) { - final Group container = new Group(composite, SWT.None); - container.setLayout(new GridLayout(3, false)); - GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL); - innergrid1.horizontalSpan = 3; - container.setLayoutData(innergrid1); - container.setText(title); - - final Label messageLabel = new Label(container, SWT.NONE); - messageLabel.setLayoutData(new GridData(GridData.BEGINNING, - GridData.CENTER, false, false, 3, 1)); - messageLabel.setText(subtitle); - - final Label messageLabel1 = new Label(container, SWT.NONE); - messageLabel1.setText(label); - messageLabel1.setLayoutData(new GridData(GridData.BEGINNING)); - - Text directoryNameField = new Text(container, SWT.SINGLE | SWT.BORDER); - GridData gridData = new GridData(GridData.FILL_HORIZONTAL); - gridData.horizontalSpan = 1; - gridData.widthHint = 400; - directoryNameField.setLayoutData(gridData); - - final Button selectButton = new Button(container, SWT.PUSH); - selectButton.setText(selectButtonLabel); - GridData buttonGridData = new GridData(GridData.END); - buttonGridData.horizontalAlignment = SWT.RIGHT; - buttonGridData.horizontalSpan = 1; - buttonGridData.minimumWidth = 120; - selectButton.setLayoutData(buttonGridData); - selectButton.addSelectionListener(selectionListener); - return directoryNameField; - } - - - public IPath getCurrentProjectPath() { - IProject project = getCurrentProject(); - - IPath path = null; - if (project != null) { - path = project.getLocation(); - } - return path; - } - - static public IProject getCurrentProject() { - IProject project = null; - - - IWorkbenchWindow window = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow(); - if (window != null) { - IStructuredSelection selection = (IStructuredSelection) window - .getSelectionService().getSelection(); - Object firstElement = selection.getFirstElement(); - if (firstElement instanceof IAdaptable) { - project = (IProject) ((IAdaptable) firstElement) - .getAdapter(IProject.class); - } - } - return project; - } - - @Override - protected void configureShell(Shell newShell){ - super.configureShell(newShell); - } - - protected void addLabel(final Group container, String labelText) { - final Label messageLabel = new Label(container, SWT.NONE); - messageLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1)); - messageLabel.setText(labelText); - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignDialogBase.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignDialogBase.java deleted file mode 100644 index 07d25c7321..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignDialogBase.java +++ /dev/null @@ -1,174 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import java.io.File; -import java.util.Scanner; - -import javax.swing.JOptionPane; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -public abstract class TwoStepSignDialogBase extends SGXDialogBase { - - public Text enclaveFileField; - public Text hashFileField; - public Text externalSignPublicKeyFileField; - public Text externalSignedHashFileField; - public Text outputSignedEnclaveFileField; - - public TwoStepSignDialogBase(Shell parentShell) { - super(parentShell); - setShellStyle(SWT.RESIZE | SWT.TITLE); - this.shell = TwoStepSignDialogBase.this.getParentShell(); - - } - - // for each field, a corresponding listener - protected SelectionListener enclaveFileSelectionListener = new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = enclaveFileField.getText(); - FileDialog dialog = new FileDialog(shell, SWT.OPEN); - - - - dialog.setFilterExtensions(new String[]{"*.so"} ); - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - - if (result != null && !result.isEmpty()) { - dialog.setFilterPath(new File(result).getParent()); - } else { - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - } - - result = dialog.open(); - - enclaveFileField.setText(result); - - hashFileField.setText(result + ".hex"); - - if (outputSignedEnclaveFileField != null){ - String outputSignedEnclavePath = result; - if(outputSignedEnclavePath.endsWith(".so")) - { - outputSignedEnclavePath = - outputSignedEnclavePath.substring(0,outputSignedEnclavePath.length() - ".so".length()); - outputSignedEnclaveFileField.setText(outputSignedEnclavePath+".signed.so"); - } - - } - - - - } - - @Override - public void widgetDefaultSelected(SelectionEvent arg0) { - } - }; - - protected SelectionListener hashFileSelectionListener = new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = hashFileField.getText(); - - FileDialog dialog = new FileDialog(shell, SWT.OPEN); - - if (result != null && !result.isEmpty()) { - dialog.setFilterPath(new File(result).getParent()); - } else { - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - } - - result = dialog.open(); - - hashFileField.setText(result); - } - - @Override - public void widgetDefaultSelected(SelectionEvent arg0) { - } - - }; - - protected SelectionListener publicKeyLocationSelectionListener = new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = externalSignPublicKeyFileField.getText(); - FileDialog dialog = new FileDialog(shell, SWT.OPEN); - dialog.setFilterExtensions(new String [] {"*.pem", "*"}); - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - result = dialog.open(); - externalSignPublicKeyFileField.setText(result); - } - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }; - - protected SelectionListener externalSignedHashFileSelectionListener = new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = externalSignedHashFileField.getText(); - FileDialog dialog = new FileDialog(shell, SWT.OPEN); - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - result = dialog.open(); - externalSignedHashFileField.setText(result); - } - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }; - - protected SelectionListener outputSignedEnclaveListener = new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = outputSignedEnclaveFileField.getText(); - FileDialog dialog = new FileDialog(shell, SWT.OPEN); - - - dialog.setFilterExtensions(new String[]{"*.so", } ); - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - - if (result != null && !result.isEmpty()) { - dialog.setFilterPath(new File(result).getParent()); - } else { - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - } - - result = dialog.open(); - - outputSignedEnclaveFileField.setText(result); - - } - - @Override - public void widgetDefaultSelected(SelectionEvent arg0) { - } - }; - - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - } - - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog1.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog1.java deleted file mode 100644 index 3f972538c7..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog1.java +++ /dev/null @@ -1,72 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Shell; - -import com.intel.sgx.handlers.TwoStepSignHandlerBase; - -public class TwoStepSignStep1Dialog1 extends TwoStepSignDialogBase { - - final private TwoStepSignHandlerBase handler; - - public TwoStepSignStep1Dialog1(Shell parentShell, TwoStepSignHandlerBase handler) { - super(parentShell); - this.handler = handler; - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1, false); - composite.setLayout(gridLayout); - - enclaveFileField = addGroup(composite, "Unsigned Enclave Path:", - "Select Enclave for which to generate the Hash.", - "Enclave Path:", "Select Enclave", enclaveFileSelectionListener); - - hashFileField = addGroup(composite, "Generate Hash:", - "Select Location to Output Hash File.", "Hash File Location:", - "Select File Path", hashFileSelectionListener); - - configFileField = addGroup(composite, "Configuration File:", - "Select Input Configuration XML File. ", - "Configuration File:", "Select Config", - configFileSelectionListener); - - composite.pack(true); - return composite; - } - - @Override - protected void okPressed() { - handler.enclaveFile = enclaveFileField.getText(); - handler.hashFile = hashFileField.getText(); - handler.configFile = configFileField.getText(); - - super.okPressed(); - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Two Step Enclave Sign - Generate Hash"); - } - - - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog2.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog2.java deleted file mode 100644 index d66743e412..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog2.java +++ /dev/null @@ -1,89 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; - -public class TwoStepSignStep1Dialog2 extends TwoStepSignDialogBase { - - final private String hashFile; - - public TwoStepSignStep1Dialog2(Shell parentShell, String hashFile) { - super(parentShell); - this.hashFile = hashFile; - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1,false); - composite.setLayout(gridLayout); - - addGroup1(composite); - addGroup3(composite); - - - return composite; - } - - private void addGroup1(Composite composite) { - final Group container = new Group(composite, SWT.None); - container.setLayout(new GridLayout(3,false)); - GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL); - innergrid1.horizontalSpan = 3; - container.setLayoutData(innergrid1); - container.setText("Hash File:"); - - final Label messageLabel = new Label(container, SWT.NONE); - messageLabel.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1)); - messageLabel.setText("Hash File Generated at Location:"); - - final Label messageLabel1 = new Label(container, SWT.NONE); - messageLabel1.setText(hashFile); - - messageLabel1.setLayoutData(new GridData(GridData.BEGINNING)); - } - - private void addGroup3(Composite composite) { - final Group container3 = new Group(composite, SWT.None); - container3.setLayout(new GridLayout(3,false)); - GridData innergrid3 = new GridData(GridData.FILL_HORIZONTAL); - innergrid3.horizontalSpan = 3; - container3.setLayoutData(innergrid3); - container3.setText("Generate Signed Enclave (Step-2):"); - - final Label messageLabel4 = new Label(container3, SWT.NONE); - messageLabel4.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1)); - messageLabel4.setText("To Generate Signed Enclave Now: Click OK"); - - final Label messageLabel5 = new Label(container3, SWT.NONE); - messageLabel5.setLayoutData(new GridData(GridData.CENTER, GridData.END, false, false, 3, 1)); - messageLabel5.setText("To Generate Signed Enclave Later: Click Cancel"); - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Two Step Enclave Sign - Generate Hash"); - } - - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog3.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog3.java deleted file mode 100644 index f62801a705..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep1Dialog3.java +++ /dev/null @@ -1,105 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; - -import com.intel.sgx.handlers.TwoStepSignHandlerBase; - -public class TwoStepSignStep1Dialog3 extends TwoStepSignDialogBase { - - final private TwoStepSignHandlerBase handler; - - public TwoStepSignStep1Dialog3(Shell parentShell, TwoStepSignHandlerBase handler) { - super(parentShell); - this.handler = handler; - } - - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1, false); - composite.setLayout(gridLayout); - - addInfoGroup(composite); - - externalSignPublicKeyFileField = addGroup(composite, "Public Key:", - "Select the Public Key file obtained from signing facility", - "Public Key:", "Select", publicKeyLocationSelectionListener); - - externalSignedHashFileField = addGroup(composite, "Signature:", - "Select the Signature file obtained from signing facility.", - "Signature:", - "Select", externalSignedHashFileSelectionListener); - - - outputSignedEnclaveFileField = addGroup(composite, "Signed Enclave:", - "Select where to save the output Signed Enclave.", - "Signed Enclave:", - "Select", outputSignedEnclaveListener); - - return composite; - } - - protected void addInfoGroup(Composite composite) { - final Group container = new Group(composite, SWT.None); - container.setLayout(new GridLayout(3,false)); - GridData innergrid1 = new GridData(GridData.FILL_HORIZONTAL); - innergrid1.horizontalSpan = 3; - container.setLayoutData(innergrid1); - container.setText("Hash and Enclave:"); - - - addInfoKeyValue(container, "Enclave File:", handler.enclaveFile); - addInfoKeyValue(container, "Config File:", handler.configFile); - addInfoKeyValue(container, "Hash File:", handler.hashFile); - } - - private void addInfoKeyValue(final Group container, String key, - String value) { - final Label messageLabel2 = new Label(container, SWT.NONE); - messageLabel2.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1)); - messageLabel2.setText(key); - - final Label messageLabel3 = new Label(container, SWT.NONE); - messageLabel3.setText(value); - messageLabel3.setLayoutData(new GridData(GridData.BEGINNING)); - } - - @Override - protected void okPressed() { - handler.externalSignPublicKeyFile = externalSignPublicKeyFileField.getText(); - handler.externallySignedHashFile = externalSignedHashFileField.getText(); - handler.outputSignedEnclaveFile = outputSignedEnclaveFileField.getText(); - super.okPressed(); - } - - - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Two Step Enclave Sign - Generate Signed Enclave"); - } - - - - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep2Dialog.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep2Dialog.java deleted file mode 100644 index af2f981384..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/TwoStepSignStep2Dialog.java +++ /dev/null @@ -1,92 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Shell; - -import com.intel.sgx.handlers.TwoStepSignHandlerBase; -import com.intel.sgx.handlers.TwoStepSignStep2; - -public class TwoStepSignStep2Dialog extends TwoStepSignDialogBase{ - - final private TwoStepSignHandlerBase handler; - - - public TwoStepSignStep2Dialog(Shell parentShell, TwoStepSignHandlerBase handler) { - super(parentShell); - this.handler = handler; - } - - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1,false); - composite.setLayout(gridLayout); - - - - enclaveFileField= addGroup(composite, "Enclave:", - "Select the unsigned enclave file", - "Unsigned Enclave File:", "Select", enclaveFileSelectionListener); - - configFileField = addGroup(composite, "Configuration File:", - "Select Input Configuration XML File. ", - "Configuration File:", "Select Config", - configFileSelectionListener); - - hashFileField= addGroup(composite, "Hash:", - "Select the Hash file obtained from previous step", - "Hash File:", "Select", hashFileSelectionListener); - - externalSignPublicKeyFileField= addGroup(composite, "Public Key:", - "Select the Public Key file obtained from external signing facility", - "Public Key:", "Select", publicKeyLocationSelectionListener); - - externalSignedHashFileField = addGroup(composite, "Signature:", - "Select the Signature file obtained from signing facility.", - "Signature:", - "Select", externalSignedHashFileSelectionListener); - - outputSignedEnclaveFileField = addGroup(composite, "Signed Enclave:", - "Select where to save the output Signed Enclave.", - "Signed Enclave:", - "Select", outputSignedEnclaveListener); - - return composite; - } - - - @Override - protected void okPressed() { - handler.enclaveFile = enclaveFileField.getText(); - handler.hashFile = hashFileField.getText(); - handler.configFile = configFileField.getText(); - handler.externalSignPublicKeyFile = externalSignPublicKeyFileField.getText(); - handler.externallySignedHashFile = externalSignedHashFileField.getText(); - handler.outputSignedEnclaveFile = outputSignedEnclaveFileField.getText(); - - super.okPressed(); - } - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Two Step Enclave Sign - Generate Signed Enclave"); - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/UpdateSignKeyDialog.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/UpdateSignKeyDialog.java deleted file mode 100644 index 502fb2dcfa..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/dialogs/UpdateSignKeyDialog.java +++ /dev/null @@ -1,191 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.dialogs; - -import java.io.File; - -import javax.swing.JOptionPane; - -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Text; - -import com.intel.sgx.handlers.UpdateSigningKey; - -public class UpdateSignKeyDialog extends SGXDialogBase { - - private Shell shell; - public Text sourceKeyFileField; - public Text destinationKeyFileField; - public static boolean regenerate = false; - - private final SelectionListener destinationKeyFileSelectionListener = new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = destinationKeyFileField.getText(); - FileDialog dialog = new FileDialog(shell, SWT.OPEN); - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - dialog.setFilterExtensions(new String [] {"*.pem", "*"}); - result = dialog.open(); - destinationKeyFileField.setText(result); - } - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }; - - private final SelectionListener sourceKeyFileSelectionListener = new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - String result = sourceKeyFileField.getText(); - FileDialog dialog = new FileDialog(shell, SWT.OPEN); - dialog.setFilterExtensions(new String [] {"*.pem", "*"}); - dialog.setFilterPath(getCurrentProjectPath().toOSString()); - result = dialog.open(); - sourceKeyFileField.setText(result); - } - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }; - final private UpdateSigningKey handler; - - public UpdateSignKeyDialog(Shell parentShell, UpdateSigningKey handler) { - super(parentShell); - this.shell = parentShell; - this.handler = handler; - setShellStyle(SWT.RESIZE | SWT.TITLE); - } - - @Override - protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); - final GridLayout gridLayout = new GridLayout(1,false); - composite.setLayout(gridLayout); - - destinationKeyFileField = addGroup(composite, "Enclave Signing Key:", - "Select the Signing Key to be Updated or Generated.", - "Enclave Signing Key:", "Select", destinationKeyFileSelectionListener); - - sourceKeyFileField = addGroup(composite, "Import:", - "To import your own Signing Key use the Import Signing Key option.", - "Import Signing Key:", "Import Key", sourceKeyFileSelectionListener); - - addGroup2(composite); - - return composite; - } - - protected void addGroup2(Composite composite) { - final Group container2 = new Group(composite, SWT.None); - container2.setLayout(new GridLayout(3,false)); - GridData innergrid2 = new GridData(GridData.FILL_HORIZONTAL); - innergrid2.horizontalSpan = 3; - container2.setLayoutData(innergrid2); - container2.setText("Generate:"); - - final Label messageLabel3 = new Label(container2, SWT.NONE); - messageLabel3.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 3, 1)); - messageLabel3.setText("To Generate a new Signing Key use the Generate Signing Key option."); - - Label warningLabel2 = new Label(container2,SWT.FILL | SWT.WRAP); - warningLabel2.setText("Generate a new Signing Key:"); - warningLabel2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - Label dummy2 = new Label(container2,0); - dummy2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - final Button updateSigningKey = new Button(container2, SWT.PUSH); - updateSigningKey.setText("Generate Key"); - GridData buttonGridData2 = new GridData(GridData.END); - buttonGridData2.horizontalAlignment = SWT.RIGHT; - buttonGridData2.horizontalSpan = 1; - buttonGridData2.minimumWidth = 120; - updateSigningKey.setLayoutData(buttonGridData2); - updateSigningKey.addSelectionListener(new SelectionListener() { - @Override - public void widgetSelected(SelectionEvent event) { - if( !destinationKeyFileField.getText().isEmpty()) - { - regenerate = true; - UpdateSignKeyDialog.this.setReturnCode(InputDialog.OK); - okPressed(); - UpdateSignKeyDialog.this.close(); - } - else - JOptionPane.showMessageDialog(null, "Enclave Signing Key field is not provided.", "Error", - JOptionPane.ERROR_MESSAGE); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - } - - - @Override - protected void configureShell(Shell newShell) { - super.configureShell(newShell); - newShell.setText("Import or (Re)Generate Enclave Signing Key"); - } - - @Override - protected void okPressed() { - - handler.sourceKeyFile = sourceKeyFileField.getText(); - handler.destinationKeyFile = destinationKeyFileField.getText(); - if((!sourceKeyFileField.getText().isEmpty() && !destinationKeyFileField.getText().isEmpty() && - (new File(sourceKeyFileField.getText())).isFile()) - || regenerate == true ) - { - System.out.println("regenerate = " + regenerate); - super.okPressed(); - } - else - { - if(sourceKeyFileField.getText().isEmpty() && destinationKeyFileField.getText().isEmpty()) - JOptionPane.showMessageDialog(null, "Enclave Signing Key and Import Singing Key are not provided.", "Error", - JOptionPane.ERROR_MESSAGE); - else - { - if(sourceKeyFileField.getText().isEmpty()) - JOptionPane.showMessageDialog(null, "Import Singing Key is not provided.", "Error", - JOptionPane.ERROR_MESSAGE); - else - if(!(new File(sourceKeyFileField.getText())).isFile()) - JOptionPane.showMessageDialog(null, "Invalid Import Singing Key.", "Error", - JOptionPane.ERROR_MESSAGE); - - if(destinationKeyFileField.getText().isEmpty()) - JOptionPane.showMessageDialog(null, "Enclave Signing Key is not provided.", "Error", - JOptionPane.ERROR_MESSAGE); - } - } - - } - - - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKDiscoveredPathInfo.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKDiscoveredPathInfo.java deleted file mode 100644 index 5ee697b3de..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKDiscoveredPathInfo.java +++ /dev/null @@ -1,202 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.discovery; - -import java.util.List; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.PrintStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.model.CoreModel; -import org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo; -import org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredScannerInfoSerializable; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; - -import com.intel.sgx.Activator; -/* - * This code has been taken from the NDK plugin for Linux. If there is an update to this code there, then refactor this code. - */ -public class SGXSDKDiscoveredPathInfo implements IDiscoveredPathInfo { - - private final IProject mProject; - private long mLastUpdate = IFile.NULL_STAMP; - private IPath[] mIncludePaths; - private Map mSymbols; - private boolean mNeedReindexing = false; - private static final IPath LINUX_MK = new Path("sgx/Makefile"); - - //Keys for preferences - // public static final String LAST_UPDATE = "lastUpdate"; //$NON-NLS-1$ - - - public SGXSDKDiscoveredPathInfo(IProject project) { - this.mProject = project; - load(); - } - - @Override - public IProject getProject() { - return mProject; - } - - @Override - public IPath[] getIncludePaths() { - if (mNeedReindexing) { - CCorePlugin.getIndexManager().reindex(CoreModel.getDefault().create(mProject)); - mNeedReindexing = false; - } - return mIncludePaths; - } - - void setIncludePaths(List pathStrings) { - mIncludePaths = new IPath[pathStrings.size()]; - int i = 0; - for (String path : pathStrings) - mIncludePaths[i++] = new Path(path); - mNeedReindexing = true; - } - - @Override - public Map getSymbols() { - if (mSymbols == null) - mSymbols = new HashMap(); - return mSymbols; - } - - void setSymbols(Map symbols) { - this.mSymbols = symbols; - } - - @Override - public IDiscoveredScannerInfoSerializable getSerializable() { - return null; - } - - public void update(IProgressMonitor monitor) throws CoreException { - if (!needUpdating()) - return; - - new SGXSDKDiscoveryUpdater(this).runUpdate(monitor); - - if (mIncludePaths != null && mSymbols != null) { - recordUpdate(); - save(); - } - } - - private boolean needUpdating() { - - - if (mLastUpdate == IFile.NULL_STAMP) { - return true; - } - - return mProject.getFile(LINUX_MK).getLocalTimeStamp() > mLastUpdate; - } - - private void recordUpdate() { - mLastUpdate = mProject.getFile(LINUX_MK).getLocalTimeStamp(); - } - - public void delete() { - mLastUpdate = IFile.NULL_STAMP; - } - - private File getInfoFile() { - File stateLoc = Activator.getDefault().getStateLocation().toFile(); - return new File(stateLoc, mProject.getName() + ".pathInfo"); //$NON-NLS-1$ - } - - private void save() { - try { - File infoFile = getInfoFile(); - infoFile.getParentFile().mkdirs(); - PrintStream out = new PrintStream(infoFile); - - out.print("t,"); //$NON-NLS-1$ - out.print(mLastUpdate); - out.println(); - - for (IPath include : mIncludePaths) { - out.print("i,"); //$NON-NLS-1$ - out.print(include.toPortableString()); - out.println(); - } - - for (Entry symbol : mSymbols.entrySet()) { - out.print("d,"); //$NON-NLS-1$ - out.print(symbol.getKey()); - out.print(","); //$NON-NLS-1$ - out.print(symbol.getValue()); - out.println(); - } - - out.close(); - } catch (IOException e) { - Activator.log(e); - } - - } - - private void load() { - try { - File infoFile = getInfoFile(); - if (!infoFile.exists()) - return; - - long timestamp = IFile.NULL_STAMP; - List includes = new ArrayList(); - Map defines = new HashMap(); - - BufferedReader reader = new BufferedReader(new FileReader(infoFile)); - for (String line = reader.readLine(); line != null; line = reader.readLine()) { - switch (line.charAt(0)) { - case 't': - timestamp = Long.valueOf(line.substring(2)); - break; - case 'i': - includes.add(Path.fromPortableString(line.substring(2))); - break; - case 'd': - int n = line.indexOf(',', 2); - if (n == -1) - defines.put(line.substring(2), ""); //$NON-NLS-1$ - else - defines.put(line.substring(2, n), line.substring(n + 1)); - break; - } - } - reader.close(); - - mLastUpdate = timestamp; - mIncludePaths = includes.toArray(new IPath[includes.size()]); - mSymbols = defines; - } catch (IOException e) { - Activator.log(e); - } - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKDiscoveryUpdater.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKDiscoveryUpdater.java deleted file mode 100644 index 61e4618d7d..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKDiscoveryUpdater.java +++ /dev/null @@ -1,310 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.discovery; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.envvar.IEnvironmentVariable; -import org.eclipse.cdt.core.envvar.IEnvironmentVariableManager; -import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; -import org.eclipse.cdt.managedbuilder.core.IBuilder; -import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; -import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.FileLocator; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; - -import com.intel.sgx.Activator; -import com.intel.sgx.build.SGXSDKCommandLauncher; - -/* - * This code has been taken from the NDK plugin for Linux. If there is an update to this code there, then refactor this code. - */ -public class SGXSDKDiscoveryUpdater { - private final SGXSDKDiscoveredPathInfo mPathInfo; - private final IProject mProject; - - private boolean mCPlusPlus = false; - private String mCommand; - private List mArguments = new ArrayList(); - - public SGXSDKDiscoveryUpdater(SGXSDKDiscoveredPathInfo pathInfo) { - mPathInfo = pathInfo; - mProject = pathInfo.getProject(); - } - - public void runUpdate(IProgressMonitor monitor) throws CoreException { - try { - // Run make -nB to get the list of commands - IPath commandPath = new Path("make"); //$NON-NLS-1$ - String[] args = {"-f", "sgx/Makefile", "-n", "-B" }; //$NON-NLS-1$ - String[] env = calcEnvironment(); - File projectDir = new File(mProject.getLocationURI()); - IPath changeToDirectory = new Path(projectDir.getAbsolutePath()); - Process proc = new SGXSDKCommandLauncher().execute(commandPath, args, env,changeToDirectory, monitor); - if (proc == null) { - return; - } - - BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream())); - String line = reader.readLine(); - while (line != null) { - checkBuildLine(line); - line = reader.readLine(); - } - - if (mCommand == null) { - return; - } - - // Run the unique commands with special gcc options to extract the - // symbols and paths - // -E -P -v -dD - mArguments.add("-E"); //$NON-NLS-1$ - mArguments.add("-P"); //$NON-NLS-1$ - mArguments.add("-v"); //$NON-NLS-1$ - mArguments.add("-dD"); //$NON-NLS-1$ - - URL url = Activator.findFile(new Path("discovery/" + (mCPlusPlus ? "test.cpp" : "test.c"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - File testFile = new File(FileLocator.toFileURL(url).toURI()); - String testFileName = testFile.getAbsolutePath().replace('\\', '/'); - mArguments.add(testFileName); - - args = mArguments.toArray(new String[mArguments.size()]); - proc = new SGXSDKCommandLauncher().execute(new Path(mCommand), args, env,changeToDirectory, monitor); - - final InputStream errStream = proc.getErrorStream(); - new Thread() { - @Override - public void run() { - checkIncludes(errStream); - }; - }.start(); - - checkDefines(proc.getInputStream()); - } catch (IOException e) { - throw new CoreException(Activator.newStatus(e)); - } catch (URISyntaxException e) { - throw new CoreException(Activator.newStatus(e)); - } - } - - private String[] calcEnvironment() throws CoreException { - IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(mProject); - IBuilder builder = info.getDefaultConfiguration().getBuilder(); - HashMap envMap = new HashMap(); - if (builder.appendEnvironment()) { - ICConfigurationDescription cfgDes = ManagedBuildManager.getDescriptionForConfiguration(builder.getParent().getParent()); - IEnvironmentVariableManager mngr = CCorePlugin.getDefault().getBuildEnvironmentManager(); - IEnvironmentVariable[] vars = mngr.getVariables(cfgDes, true); - for (IEnvironmentVariable var : vars) { - envMap.put(var.getName(), var.getValue()); - } - } - // Add variables from build info - Map builderEnv = builder.getExpandedEnvironment(); - if (builderEnv != null) - envMap.putAll(builderEnv); - List strings = new ArrayList(envMap.size()); - for (Entry entry : envMap.entrySet()) { - StringBuffer buffer = new StringBuffer(entry.getKey()); - buffer.append('=').append(entry.getValue()); - strings.add(buffer.toString()); - } - return strings.toArray(new String[strings.size()]); - } - - private static class Line { - private final String line; - private int pos; - - public Line(String line) { - this.line = line; - } - - public Line(String line, int pos) { - this(line); - this.pos = pos; - } - - public String getToken() { - skipWhiteSpace(); - if (pos == line.length()) - return null; - - int start = pos; - boolean inQuote = false; - - while (true) { - char c = line.charAt(pos); - if (c == ' ') { - if (!inQuote) - return line.substring(start, pos); - } else if (c == '"') { - inQuote = !inQuote; - } - - if (++pos == line.length()) - return null; - } - - } - - private String getRemaining() { - if (pos == line.length()) - return null; - - skipWhiteSpace(); - String rc = line.substring(pos); - pos = line.length(); - return rc; - } - - private void skipWhiteSpace() { - while (true) { - if (pos == line.length()) - return; - char c = line.charAt(pos); - if (c == ' ') - pos++; - else - return; - } - } - } - - private void checkBuildLine(String text) { - Line line = new Line(text); - String cmd = line.getToken(); - if (cmd == null) { - return; - } else if (cmd.endsWith("g++")) { //$NON-NLS-1$ - if (mCommand == null || !mCPlusPlus) { - mCommand = cmd; - mCPlusPlus = true; - } - gatherOptions(line); - } else if (cmd.endsWith("gcc")) { //$NON-NLS-1$ - if (mCommand == null){ - mCommand = cmd; - } - gatherOptions(line); - } - - } - - private void gatherOptions(Line line) { - for (String option = line.getToken(); option != null; option = line.getToken()) { - if (option.startsWith("-")) { //$NON-NLS-1$ - // only look at options - if (option.equals("-I")) { //$NON-NLS-1$ - String dir = line.getToken(); - if (dir != null) - addArg(option + dir); - } else if (option.startsWith("-I")) { //$NON-NLS-1$ - addArg(option); - } else if (option.equals("-D")) { //$NON-NLS-1$ - String def = line.getToken(); - if (def != null) - addArg(option + def); - } else if (option.startsWith("-D")) { //$NON-NLS-1$ - addArg(option); - } else if (option.startsWith("-f")) { //$NON-NLS-1$ - addArg(option); - } else if (option.startsWith("-m")) { //$NON-NLS-1$ - addArg(option); - } else if (option.startsWith("--sysroot")) { //$NON-NLS-1$ - addArg(option); - } - } - } - } - - private void addArg(String arg) { - if (!mArguments.contains(arg)) - mArguments.add(arg); - } - - private void checkIncludes(InputStream in) { - try { - List includes = new ArrayList(); - boolean inIncludes1 = false; - boolean inIncludes2 = false; - BufferedReader reader = new BufferedReader(new InputStreamReader(in)); - String line = reader.readLine(); - while (line != null) { - if (!inIncludes1) { - if (line.equals("#include \"...\" search starts here:")) //$NON-NLS-1$ - inIncludes1 = true; - } else { - if (!inIncludes2) { - if (line.equals("#include <...> search starts here:")) //$NON-NLS-1$ - inIncludes2 = true; - else - includes.add(line.trim()); - } else { - if (line.equals("End of search list.")) { //$NON-NLS-1$ - mPathInfo.setIncludePaths(includes); - } else { - includes.add(line.trim()); - } - } - } - line = reader.readLine(); - } - } catch (IOException e) { - Activator.log(e); - } - } - - private void checkDefines(InputStream in) { - try { - Map defines = new HashMap(); - BufferedReader reader = new BufferedReader(new InputStreamReader(in)); - String line = reader.readLine(); - while (line != null) { - if (line.startsWith("#define")) { //$NON-NLS-1$ - Line l = new Line(line, 7); - String var = l.getToken(); - if (var == null) - continue; - String value = l.getRemaining(); - if (value == null) - value = ""; //$NON-NLS-1$ - defines.put(var, value); - } - line = reader.readLine(); - } - mPathInfo.setSymbols(defines); - } catch (IOException e) { - Activator.log(e); - } - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKScannerInfoCollector.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKScannerInfoCollector.java deleted file mode 100644 index fb21bff5cf..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/discovery/SGXSDKScannerInfoCollector.java +++ /dev/null @@ -1,103 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.discovery; - -import java.util.List; -import java.util.Map; - -import org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo; -import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector3; -import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollectorCleaner; -import org.eclipse.cdt.make.core.scannerconfig.InfoContext; -import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes; -import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; - -/* - * This code has been taken from the NDK plugin for Linux. If there is an update to this code there, then refactor this code. - */ -public class SGXSDKScannerInfoCollector implements IScannerInfoCollector3,IScannerInfoCollectorCleaner,IManagedScannerInfoCollector{ - - private SGXSDKDiscoveredPathInfo sgxPathInfo; - - @Override - public void setProject(IProject project) { - throw new Error("Not implemented"); - } - - @Override - public void updateScannerConfiguration(IProgressMonitor monitor) - throws CoreException { - sgxPathInfo.update(monitor); - } - - @Override - public IDiscoveredPathInfo createPathInfoObject() { - return sgxPathInfo; - } - - @Override - public void contributeToScannerConfig(Object resource, @SuppressWarnings("rawtypes") Map scannerInfo) { - throw new Error("Not implemented"); - } - - @SuppressWarnings("rawtypes") - @Override - public List getCollectedScannerInfo(Object resource, ScannerInfoTypes type) { - throw new Error("Not implemented"); - } - - @Override - public Map getDefinedSymbols() { - throw new Error("Not implemented"); - } - - @Override - public List getIncludePaths() { - throw new Error("Not implemented"); - } - - @Override - public void deleteAllPaths(IResource resource) { - throw new Error("Not implemented"); - } - - @Override - public void deleteAllSymbols(IResource resource) { - throw new Error("Not implemented"); - } - - @Override - public void deletePath(IResource resource, String path) { - throw new Error("Not implemented"); - } - - @Override - public void deleteSymbol(IResource resource, String symbol) { - throw new Error("Not implemented"); - } - - @Override - public void deleteAll(IResource resource) { - sgxPathInfo.delete(); - } - - @Override - public void setInfoContext(InfoContext context) { - sgxPathInfo = new SGXSDKDiscoveredPathInfo(context.getProject()); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddEnclave.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddEnclave.java deleted file mode 100644 index 8fdb6e6a48..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddEnclave.java +++ /dev/null @@ -1,213 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Map; - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.TemplateEngine; -import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.IHandlerListener; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.handlers.HandlerUtil; - -import com.intel.sgx.Activator; -import com.intel.sgx.dialogs.AddEnclaveFileDialog; -import com.intel.sgx.preferences.PreferenceConstants; - -public class AddEnclave extends ModuleCreationBaseHandler implements IHandler { - - public String edlFilename = ""; - public String linuxMakePath = ""; - @Override - public void addHandlerListener(IHandlerListener handlerListener) { - } - - @Override - public void dispose() { - } - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - String edlBasename,linuxPath,enclaveBasename; - IProject project = null; - - // Display display = Display.getCurrent(); - // Shell shell = new Shell(display); - Shell shell = null; - AddEnclaveFileDialog dialog = new AddEnclaveFileDialog(shell, this); - if (dialog.open() != InputDialog.OK) { - return null; - } - - if((edlFilename.isEmpty())){ - System.err.println("No Enclave selected to Import."); - return null; - } - - edlBasename = edlFilename; - ISelection selection = HandlerUtil.getCurrentSelection(event); - Object element = null; - if (selection instanceof IStructuredSelection) { - element = ((IStructuredSelection) selection).getFirstElement(); - if (element instanceof IResource) { - project = ((IResource) element).getProject(); - } - } - if (!project.exists()) { - System.err.println("Error: Project not found"); - return null; - } - - for (IConfigurationElement i : Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.core.resources.projectNature")){ - } - - - - - IPath linuxMkRelPath = (Path.fromOSString(linuxMakePath)).makeRelativeTo(project.getLocation().append("sgx").append("enclave_"+edlBasename)); - - - if(linuxMkRelPath.removeLastSegments(1).lastSegment().toString().equalsIgnoreCase("sgx")){ - linuxPath = linuxMkRelPath.removeLastSegments(3).toOSString(); - enclaveBasename = linuxMkRelPath.removeLastSegments(2).lastSegment().toString(); - } - - else{ - linuxPath = linuxMkRelPath.removeLastSegments(2).toOSString(); - enclaveBasename = linuxMkRelPath.removeLastSegments(1).lastSegment().toString(); - } - - IProgressMonitor monitor = new NullProgressMonitor(); - TemplateCore template = null; - if(isCPProject(project)) - if(dialog.generateApp()) - { - template = TemplateEngine.getDefault().getTemplateById("SGXEnclaveC++WithSample"); - } - else - { - template = TemplateEngine.getDefault().getTemplateById("SGXEnclaveC++Minimal"); - } - else - if(dialog.generateApp()) - { - template = TemplateEngine.getDefault().getTemplateById("SGXEnclaveCWithSample"); - } - else - { - template = TemplateEngine.getDefault().getTemplateById("SGXEnclaveCMinimal"); - } - - Map valueStore = template.getValueStore(); - valueStore.put("projectName", project.getName()); - valueStore.put("workspacePath", linuxPath); - valueStore.put("baseName", enclaveBasename); - valueStore.put("enclaveName",edlFilename); - valueStore.put("EnclaveName",capitalize(edlFilename)); - valueStore.put("ENCLAVENAME",edlFilename.toUpperCase()); - valueStore.put("SdkPathFromPlugin", Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.SDK_PATH)); - - IStatus[] statuses = template.executeTemplateProcesses(monitor, false); - for(IStatus e: statuses) - { - } - - ManagedBuildManager.saveBuildInfo(project, true); - try { - project.refreshLocal(IResource.DEPTH_INFINITE, null); - } catch (CoreException e) { - Activator.log(e); - e.printStackTrace(); - } - - - return null; - } - - private String capitalize(final String line) { - return Character.toUpperCase(line.charAt(0)) + line.substring(1); - } - - @Override - public boolean isEnabled() { - return true; - } - - @Override - public boolean isHandled() { - return true; - } - - @Override - public void removeHandlerListener(IHandlerListener handlerListener) { - } - - public void setFilename(String filename) { - edlFilename = filename; - } - - - - - public static void copyFile(File source, File dest) throws IOException { - byte[] bytes = new byte[4092]; - if (source != null && dest != null) { - if (source.isFile()) { - FileInputStream in = null; - FileOutputStream out = null; - try { - in = new FileInputStream(source); - out = new FileOutputStream(dest); - int len; - while ((len = in.read(bytes)) != -1) { - out.write(bytes, 0, len); - } - } catch (Exception e) { - Activator.log(e); - System.err.println("Error: " + e.toString()); - } finally { - try { - if (in != null) - in.close(); - } finally { - if (out != null) - out.close(); - } - } - } - } - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddSGXNature.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddSGXNature.java deleted file mode 100644 index 569b608adb..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddSGXNature.java +++ /dev/null @@ -1,163 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.util.Map; - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.TemplateEngine; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.IHandlerListener; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.IWorkspace; -//import org.eclipse.core.resources.IWorkspaceRunnable; -//import org.eclipse.core.resources.IWorkspaceRunnable; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -//import org.eclipse.jface.operation.IRunnableWithProgress; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.ui.handlers.HandlerUtil; - -import com.intel.sgx.Activator; -import com.intel.sgx.natures.SGXNature; - -public class AddSGXNature implements IHandler { - - private IProject project; - - public AddSGXNature() { - project = null; - } - - @Override - public void addHandlerListener(IHandlerListener arg0) { - } - - @Override - public void dispose() { - } - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - ISelection selection = HandlerUtil.getCurrentSelection(event); - Object element = null; - if (selection instanceof IStructuredSelection) { - element = ((IStructuredSelection) selection).getFirstElement(); - if (element instanceof IResource) { - project = ((IResource) element).getProject(); - } - } - if (!project.exists()) { - System.err.println("Error: Project not found"); - return null; - } else { - try { - TemplateCore template = TemplateEngine.getDefault().getTemplateById("AddSGXNature"); - - Map valueStore = template.getValueStore(); - valueStore.put("projectName",project.getName()); - valueStore.put("baseName",project.getName()); - - IProgressMonitor monitor = new NullProgressMonitor(); - template.executeTemplateProcesses(monitor, false); - - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - try{ - IProjectDescription description = project.getDescription(); - String[] natures = description.getNatureIds(); - - String[] newNatures = new String[natures.length + 1]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - newNatures[natures.length] = SGXNature.NATURE_ID; - IStatus status = workspace.validateNatureSet(newNatures); - - if (status.getCode() == IStatus.OK) { - description.setNatureIds(newNatures); - project.setDescription(description, null); - } - - project.refreshLocal(IResource.DEPTH_ONE,null); - } catch(CoreException e){ - Activator.log(e); - throw new InvocationTargetException(e); - } - } catch(InvocationTargetException e){ - Activator.log(e); - e.printStackTrace(); - } - - try { - project.refreshLocal(IResource.DEPTH_INFINITE,null); - } catch (CoreException e) { - e.printStackTrace(); - } - } - return null; - } - - @Override - public boolean isEnabled() { - return true; - } - - @Override - public boolean isHandled() { - return true; - } - - @Override - public void removeHandlerListener(IHandlerListener arg0) { - } - - public static void copyFile(File source, File dest) throws IOException { - byte[] bytes = new byte[4092]; - if (source != null && dest != null) { - if (source.isFile()) { - FileInputStream in = null; - FileOutputStream out = null; - try { - in = new FileInputStream(source); - out = new FileOutputStream(dest); - int len; - while ((len = in.read(bytes)) != -1) { - out.write(bytes, 0, len); - } - } catch (Exception e) { - System.err.println("Error: " + e.toString()); - - } finally { - try { - if (in != null) - in.close(); - } finally { - if (out != null) - out.close(); - } - } - } - } - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddTrustedStaticLib.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddTrustedStaticLib.java deleted file mode 100644 index 0fd9a87541..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddTrustedStaticLib.java +++ /dev/null @@ -1,193 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Map; - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.TemplateEngine; -import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.IHandlerListener; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.handlers.HandlerUtil; - -import com.intel.sgx.Activator; -import com.intel.sgx.dialogs.AddTrustedStaticLibFileDialog; -import com.intel.sgx.preferences.PreferenceConstants; - -public class AddTrustedStaticLib extends ModuleCreationBaseHandler implements IHandler { - - public String edlFilename = ""; - public String linuxMakePath = ""; - - @Override - public void addHandlerListener(IHandlerListener handlerListener) { - } - - @Override - public void dispose() { - } - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - String edlBasename,linuxPath,enclaveBasename; - IProject project = null; - - // Display display = Display.getCurrent(); - // Shell shell = new Shell(display); - Shell shell = null; - AddTrustedStaticLibFileDialog dialog = new AddTrustedStaticLibFileDialog(shell, this); - if (dialog.open() != InputDialog.OK) { - return null; - } - - if((edlFilename.isEmpty() )){ - System.err.println("No Enclave selected to Import."); - return null; - } - - edlBasename = edlFilename; - ISelection selection = HandlerUtil.getCurrentSelection(event); - Object element = null; - if (selection instanceof IStructuredSelection) { - element = ((IStructuredSelection) selection).getFirstElement(); - if (element instanceof IResource) { - project = ((IResource) element).getProject(); - } - } - if (!project.exists()) { - System.err.println("Error: Project not found"); - return null; - } - - for (IConfigurationElement i : Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.core.resources.projectNature")){ - } - - - - - IPath linuxMkRelPath = (Path.fromOSString(linuxMakePath)).makeRelativeTo(project.getLocation().append("sgx").append("enclave_"+edlBasename)); - - - if(linuxMkRelPath.removeLastSegments(1).lastSegment().toString().equalsIgnoreCase("sgx")){ - linuxPath = linuxMkRelPath.removeLastSegments(3).toOSString(); - enclaveBasename = linuxMkRelPath.removeLastSegments(2).lastSegment().toString(); - } - - else{ - linuxPath = linuxMkRelPath.removeLastSegments(2).toOSString(); - enclaveBasename = linuxMkRelPath.removeLastSegments(1).lastSegment().toString(); - } - - IProgressMonitor monitor = new NullProgressMonitor(); - TemplateCore template = null; - if(isCPProject(project)) - template = TemplateEngine.getDefault().getTemplateById("SGXTrustedStaticLibraryC++Minimal"); - else - template = TemplateEngine.getDefault().getTemplateById("SGXTrustedStaticLibraryCMinimal"); - - Map valueStore = template.getValueStore(); - valueStore.put("projectName", project.getName()); - valueStore.put("workspacePath", linuxPath); - valueStore.put("baseName", enclaveBasename); - valueStore.put("enclaveName",edlFilename); - valueStore.put("EnclaveName",capitalize(edlFilename)); - valueStore.put("ENCLAVENAME",edlFilename.toUpperCase()); - valueStore.put("SdkPathFromPlugin", Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.SDK_PATH)); - - IStatus[] statuses = template.executeTemplateProcesses(monitor, false); - - - ManagedBuildManager.saveBuildInfo(project, true); - try { - project.refreshLocal(IResource.DEPTH_INFINITE, null); - } catch (CoreException e) { - Activator.log(e); - e.printStackTrace(); - } - return null; - } - - private String capitalize(final String line) { - return Character.toUpperCase(line.charAt(0)) + line.substring(1); - } - - @Override - public boolean isEnabled() { - return true; - } - - @Override - public boolean isHandled() { - return true; - } - - @Override - public void removeHandlerListener(IHandlerListener handlerListener) { - } - - public void setFilename(String filename) { - edlFilename = filename; - } - - public static void copyFile(File source, File dest) throws IOException { - byte[] bytes = new byte[4092]; - if (source != null && dest != null) { - if (source.isFile()) { - FileInputStream in = null; - FileOutputStream out = null; - try { - in = new FileInputStream(source); - out = new FileOutputStream(dest); - int len; - while ((len = in.read(bytes)) != -1) { - out.write(bytes, 0, len); - } - } catch (Exception e) { - Activator.log(e); - System.err.println("Error: " + e.toString()); - } finally { - try { - if (in != null) - in.close(); - } finally { - if (out != null) - out.close(); - } - } - } - } - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddUntrustedModule.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddUntrustedModule.java deleted file mode 100644 index 4ebf8da34c..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/AddUntrustedModule.java +++ /dev/null @@ -1,231 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Map; - - - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.TemplateEngine; -import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.IHandlerListener; - -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; - -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.handlers.HandlerUtil; - -import com.intel.sgx.Activator; -import com.intel.sgx.dialogs.AddUntrustedModuleDialog; -import com.intel.sgx.preferences.PreferenceConstants; - -public class AddUntrustedModule extends ModuleCreationBaseHandler implements IHandler { - - public String edlFilename = ""; - public String libPath = ""; - private IPath edlCanonicalFilename; - private IPath libCanonicalPathname; - - @Override - public void addHandlerListener(IHandlerListener handlerListener) { - } - - @Override - public void dispose() { - } - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - String edlBasename,edlPath,linuxLibPath,modulePath,enclaveBasename; - IProject project = null; - - //Display display = Display.getCurrent(); - Shell shell = null; - - AddUntrustedModuleDialog dialog = new AddUntrustedModuleDialog(shell, this); - if (dialog.open() != InputDialog.OK) { - return null; - } - - if((edlFilename.isEmpty() && libPath.isEmpty())){ - System.err.println("No Enclave selected to Import."); - return null; - } - if( edlFilename.isEmpty() ){ - System.err.println("Edl File not selected."); - return null; - } - edlCanonicalFilename = Path.fromOSString(edlFilename); - if (!edlCanonicalFilename.getFileExtension().toLowerCase().equals("edl")) { - System.err.println("Error: EDL file extension = "+ edlCanonicalFilename.getFileExtension()); - return null; - } - edlBasename = edlCanonicalFilename.removeFileExtension().lastSegment(); - - - ISelection selection = HandlerUtil.getCurrentSelection(event); - Object element = null; - if (selection instanceof IStructuredSelection) { - element = ((IStructuredSelection) selection).getFirstElement(); - if (element instanceof IResource) { - project = ((IResource) element).getProject(); - } - } - if (!project.exists()) { - System.err.println("Error: Project not found"); - return null; - } - - IPath targetRelPath = project.getProjectRelativePath().append("sgx").append("untrusted_" + edlBasename); - - try { - for (int i = 1; i <= targetRelPath.segmentCount(); i++) { - IFolder subfolder = project.getFolder(targetRelPath.uptoSegment(i)); - - if (!subfolder.exists()) { - subfolder.create(true, true, null); - } - } - } catch (CoreException e) { - System.err.println("Error: Error creating enclave directory."); - Activator.log(e); - e.printStackTrace(); - } - - IPath edlRelPath = (Path.fromOSString(edlFilename)).makeRelativeTo(project.getLocation().append("sgx")); - edlPath = edlRelPath.toOSString(); - IPath linuxLibRelPath = (Path.fromOSString(libPath)).makeRelativeTo(project.getLocation().append("sgx")); - - if(linuxLibRelPath.removeLastSegments(1).lastSegment().toString().equalsIgnoreCase("sgx")){ - linuxLibPath = linuxLibRelPath.removeLastSegments(3).toOSString(); - modulePath = linuxLibRelPath.removeFirstSegments(linuxLibRelPath.segmentCount()-3).removeLastSegments(1).toOSString(); - } - else if(linuxLibRelPath.removeLastSegments(1).lastSegment().toString().equalsIgnoreCase("src")){ - linuxLibPath = linuxLibRelPath.removeLastSegments(3).toOSString(); - modulePath = linuxLibRelPath.removeFirstSegments(linuxLibRelPath.segmentCount()-3).removeLastSegments(1).toOSString(); - } - else{ - linuxLibPath = linuxLibRelPath.removeLastSegments(2).toOSString(); - modulePath = linuxLibRelPath.removeFirstSegments(linuxLibRelPath.segmentCount()-2).removeLastSegments(1).toOSString(); - } - - IProgressMonitor monitor = new NullProgressMonitor(); - TemplateCore template = null; - if(isCPProject(project)) - template = TemplateEngine.getDefault().getTemplateById("SGXUntrustedModuleC++Minimal"); - else - template = TemplateEngine.getDefault().getTemplateById("SGXUntrustedModuleCMinimal"); - - - - Map valueStore = template.getValueStore(); - - - valueStore.put("projectName", project.getName()); - valueStore.put("sourcepath",linuxLibPath); - valueStore.put("edlPath", edlPath); - valueStore.put("baseName", edlBasename); - valueStore.put("workspacePath", linuxLibPath);//deprecate - valueStore.put("modPath", modulePath); - valueStore.put("ENCLAVENAME",edlBasename.toUpperCase()); - valueStore.put("libPath",libPath); - valueStore.put("SdkPathFromPlugin", Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.SDK_PATH)); - - IStatus[] statuses = template.executeTemplateProcesses(monitor, false); - - try { - copyFile(new File(edlFilename), project.getLocation().append("sgx").append("untrusted_"+edlBasename).append(edlBasename+".edl").toFile()); - } catch (IOException e1) { - e1.printStackTrace(); - } - - - ManagedBuildManager.saveBuildInfo(project, true); - try { - project.refreshLocal(IResource.DEPTH_INFINITE, null); - } catch (CoreException e) { - Activator.log(e); - e.printStackTrace(); - } - return null; - } - - @Override - public boolean isEnabled() { - return true; - } - - @Override - public boolean isHandled() { - return true; - } - - @Override - public void removeHandlerListener(IHandlerListener handlerListener) { - } - - public void setFilename(String filename) { - edlFilename = filename; - } - - public static void copyFile(File source, File dest) throws IOException { - byte[] bytes = new byte[4092]; - if (source != null && dest != null) { - if (source.isFile()) { - FileInputStream in = null; - FileOutputStream out = null; - try { - in = new FileInputStream(source); - out = new FileOutputStream(dest); - int len; - while ((len = in.read(bytes)) != -1) { - out.write(bytes, 0, len); - } - } catch (Exception e) { - Activator.log(e); - System.err.println("Error: " + e.toString()); - } finally { - try { - if (in != null) - in.close(); - } finally { - if (out != null) - out.close(); - } - } - } - } - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/EnclaveConfigHandler.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/EnclaveConfigHandler.java deleted file mode 100644 index fffa912c4f..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/EnclaveConfigHandler.java +++ /dev/null @@ -1,156 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import java.io.File; -import java.io.IOException; -import java.util.Map; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.TemplateEngine; -import org.eclipse.core.commands.IHandlerListener; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -import com.intel.sgx.Activator; -import com.intel.sgx.dialogs.EnclaveConfigDialog; -import com.intel.sgx.dialogs.SGXDialogBase; - -public class EnclaveConfigHandler extends SGXHandler { - - public String prodId; - public String isvSvn; - public String threadStackSize; - public String globalHeapSize; - public String tcsNum; - public String tcsPolicy; - public String disableDebug; - private IFile configPath; - - @Override - public void addHandlerListener(IHandlerListener arg0) { - } - - @Override - public void dispose() { - } - - @Override - public Object executeSGXStuff() throws CancelException, ErrorException { - - FilteredResourcesSelectionDialog d = SGXDialogBase - .dialogForConfig(shell); - d.setTitle("Select Config File"); - if (d.open() != Dialog.OK) { - cancel(); - } - - configPath = ((IFile) d.getResult()[0]); - - readConfig(configPath.getLocation()); - EnclaveConfigDialog dialog = new EnclaveConfigDialog(shell, this); - if (dialog.open() != InputDialog.OK) { - return null; - } - writeConfig(); - refreshProject(); - - return null; - } - - protected void writeConfig() { - IProgressMonitor monitor = new NullProgressMonitor(); - TemplateCore template = TemplateEngine.getDefault().getTemplateById("SGXEnclaveConfig"); - - Map valueStore = template.getValueStore(); - valueStore.put("projectName", project.getName()); - valueStore.put("configFile", configPath.getProjectRelativePath().toOSString()); - valueStore.put("ProdID", this.prodId); - valueStore.put("IsvSvn", this.isvSvn); - valueStore.put("ThreadStackSize", this.threadStackSize); - valueStore.put("GlobalHeapSize", this.globalHeapSize); - valueStore.put("TcsNumber", this.tcsNum); - valueStore.put("TcsPolicy", this.tcsPolicy); - valueStore.put("DisableDebug", this.disableDebug); - IStatus[] result = template.executeTemplateProcesses(monitor, true); - - for (IStatus status: result) { - } - } - - - - protected void readConfig(IPath configPath) throws ErrorException { - - try { - String xmlFile = configPath.toString(); - File configFile = new File(xmlFile); - DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance(); - DocumentBuilder dBuilder; - dBuilder = dbFactory.newDocumentBuilder(); - Document doc = dBuilder.parse(configFile); - doc.getDocumentElement().normalize(); - - NodeList nList = doc.getElementsByTagName("EnclaveConfiguration"); - Node nNode = nList.item(0); - - if (nNode.getNodeType() == Node.ELEMENT_NODE) { - Element e = (Element) nNode; - this.prodId = e.getElementsByTagName("ProdID").item(0) - .getTextContent(); - this.isvSvn = e.getElementsByTagName("ISVSVN").item(0) - .getTextContent(); - this.threadStackSize = e.getElementsByTagName("StackMaxSize") - .item(0).getTextContent(); - this.globalHeapSize = e.getElementsByTagName("HeapMaxSize") - .item(0).getTextContent(); - this.tcsNum = e.getElementsByTagName("TCSNum").item(0) - .getTextContent(); - this.tcsPolicy = e.getElementsByTagName("TCSPolicy").item(0) - .getTextContent(); - this.disableDebug = e.getElementsByTagName("DisableDebug") - .item(0).getTextContent(); - } - - } catch (ParserConfigurationException e) { - Activator.log(e); - e.printStackTrace(); - quitWithError("Could not parse '"+configPath.toOSString()+"'"); - } catch (SAXException e) { - Activator.log(e); - e.printStackTrace(); - quitWithError("Could not parse '"+configPath.toOSString()+"'"); - } catch (IOException e) { - Activator.log(e); - e.printStackTrace(); - quitWithError("Could not read'"+configPath.toOSString()+"'"); - } - - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/ModuleCreationBaseHandler.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/ModuleCreationBaseHandler.java deleted file mode 100644 index 708208c6cb..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/ModuleCreationBaseHandler.java +++ /dev/null @@ -1,39 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.runtime.CoreException; - -public class ModuleCreationBaseHandler { - public boolean isCPProject(IProject project) - { - boolean isCPProject = false; - IProjectDescription description; - try { - description = project.getDescription(); - String[] natures = description.getNatureIds(); - for(String nature: natures){ - if(nature.equals("org.eclipse.cdt.core.ccnature")) - isCPProject = true; - } - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - return isCPProject; - - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/RemoveEnclave.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/RemoveEnclave.java deleted file mode 100644 index 160dc14b56..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/RemoveEnclave.java +++ /dev/null @@ -1,169 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.IHandlerListener; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.handlers.HandlerUtil; - -import com.intel.sgx.Activator; -import com.intel.sgx.dialogs.RemoveEnclaveFileDialog; - -public class RemoveEnclave implements IHandler { - - public String edlFilename = ""; - private IPath edlCanonicalFilename; - - @Override - public void addHandlerListener(IHandlerListener handlerListener) { - } - - @Override - public void dispose() { - } - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - String edlBasename; - IProject project = null; - - // Display display = Display.getCurrent(); - // Shell shell = new Shell(display); - - RemoveEnclaveFileDialog dialog = new RemoveEnclaveFileDialog(null, this); - - if (dialog.open() != InputDialog.OK) { - return null; - } - - edlCanonicalFilename = Path.fromOSString(edlFilename); - edlBasename = edlCanonicalFilename.lastSegment(); - - if(edlBasename.isEmpty()){ - return null; - } - - ISelection selection = HandlerUtil.getCurrentSelection(event); - Object element = null; - if(selection instanceof IStructuredSelection) { - element = ((IStructuredSelection)selection).getFirstElement(); - if (element instanceof IResource) { - project= ((IResource)element).getProject(); - } - } - if (!project.exists()) { - System.err.println("Error: Project not found"); - return null; - } - - IPath targetRelPath = project.getProjectRelativePath().append("sgx").append("enclave_" + edlBasename); - - try { - for (int i=1;i<=targetRelPath.segmentCount();i++) { - IFolder subfolder = project.getFolder(targetRelPath.uptoSegment(i)); - - if (subfolder.exists()){ - if(subfolder.getProjectRelativePath().toOSString().contains("enclave_"+edlBasename)){ - subfolder.delete(true, true, null); - break; - } - } - } - targetRelPath = project.getProjectRelativePath().append("sgx").append(edlBasename); - for (int i=1;i<=targetRelPath.segmentCount();i++) { - IFolder subfolder = project.getFolder(targetRelPath.uptoSegment(i)); - - if (subfolder.exists()){ - if(subfolder.getProjectRelativePath().toOSString().contains(edlBasename)){ - subfolder.delete(true, true, null); - break; - } - } - } - } catch (Exception e) { - Activator.log(e); - } - - try { - project.refreshLocal(IResource.DEPTH_INFINITE, null); - } catch (CoreException e) { - Activator.log(e); - } catch (IllegalArgumentException e){ - Activator.log(e); - } - - return null; - } - - @Override - public boolean isEnabled() { - return true; - } - - @Override - public boolean isHandled() { - return true; - } - - @Override - public void removeHandlerListener(IHandlerListener handlerListener) { - } - - public static void copyFile(File source, File dest) throws IOException { - byte[] bytes = new byte[4092]; - if (source != null && dest != null) { - if (source.isFile()) { - FileInputStream in = null; - FileOutputStream out = null; - try { - in = new FileInputStream(source); - out = new FileOutputStream(dest); - int len; - while ((len = in.read(bytes)) != -1) { - out.write(bytes, 0, len); - } - } catch (Exception e) { - System.err.println("Error: " + e.toString()); - Activator.log(e); - } finally { - try { - if (in != null) - in.close(); - } finally { - if (out != null) - out.close(); - } - } - } - } - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/SGXHandler.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/SGXHandler.java deleted file mode 100644 index bfd5bcb551..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/SGXHandler.java +++ /dev/null @@ -1,206 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; - -import javax.swing.JOptionPane; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.IHandlerListener; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.handlers.HandlerUtil; - -/** - * Utility base class for all Handlers The derived classes must implement - * executeSgxStuff() instead of execute(). The user may call methods cancel(), - * quitWithError() & info() - * - * @author mlutescu - * - */ -public abstract class SGXHandler implements IHandler { - - public String projectPath = null; - protected IProject project; - protected Shell shell; - - /** - * Throwing this IS an error. Means that the process can't continue - * - * @author mlutescu - * - */ - static protected class ErrorException extends Exception { - - public ErrorException(String message) { - super(message); - } - - } - - /** - * Throwing this is not an error; just signals stop of execution because the - * user cancels - * - * @author mlutescu - * - */ - static protected class CancelException extends Exception { - - public CancelException() { - super(); - } - - } - - @Override - public final Object execute(ExecutionEvent event) throws ExecutionException { - try { - initializeShell(); - initializeProject(event); - return executeSGXStuff(); - } catch (ErrorException e) { - e.printStackTrace(); - } catch (CancelException e) { - // do nothing by design ; it's Ok to not handle this exception. - } - return null; - } - - protected abstract Object executeSGXStuff() throws ErrorException, - CancelException; - - public SGXHandler() { - super(); - } - - public static void copyFile(File source, File dest) throws ErrorException { - byte[] bytes = new byte[4092]; - if (source != null && dest != null) { - if (source.isFile()) { - FileInputStream in = null; - FileOutputStream out = null; - try { - in = new FileInputStream(source); - out = new FileOutputStream(dest); - int len; - while ((len = in.read(bytes)) != -1) { - out.write(bytes, 0, len); - } - } catch (IOException e) { - System.err.println("Error: " + e.toString()); - quitWithError("Could not copy from\n" + "'" - + source.getAbsolutePath() + "'\n" + "to\n" + "'" - + dest.getAbsolutePath()); - } finally { - try { - if (in != null) { - in.close(); - } - } catch (IOException e) { - e.printStackTrace(); - } finally { - if (out != null) { - try { - out.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - } - } - } - } - - protected static void quitWithError(String message) throws ErrorException { - JOptionPane.showMessageDialog(null, message, "Two Step Enclave Sign", - JOptionPane.ERROR_MESSAGE); - throw new ErrorException(message); - } - - static protected void cancel() throws CancelException { - throw new CancelException(); - } - - protected void initializeProject(ExecutionEvent event) - throws ErrorException { - project = null; - ISelection selection = HandlerUtil.getCurrentSelection(event); - Object element = null; - if (selection instanceof IStructuredSelection) { - element = ((IStructuredSelection) selection).getFirstElement(); - if (element instanceof IResource) { - project = ((IResource) element).getProject(); - } - } - - if (!project.exists()) { - quitWithError("Project not found"); - } - - } - - @Override - public boolean isEnabled() { - return true; - } - - @Override - public boolean isHandled() { - return true; - } - - @Override - public void removeHandlerListener(IHandlerListener arg0) { - } - - @Override - public void addHandlerListener(IHandlerListener arg0) { - } - - @Override - public void dispose() { - } - - protected void initializeShell() { - shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); - } - - protected void refreshProject() throws ErrorException { - try { - project.refreshLocal(IResource.DEPTH_INFINITE, null); - } catch (CoreException e1) { - quitWithError(e1.getLocalizedMessage()); - } - } - - protected void info(String windowName, String message) { - JOptionPane.showMessageDialog(null, message,windowName, - JOptionPane.INFORMATION_MESSAGE); - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/SGXSDKWizardHandler.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/SGXSDKWizardHandler.java deleted file mode 100644 index 7fe93db380..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/SGXSDKWizardHandler.java +++ /dev/null @@ -1,38 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import org.eclipse.cdt.managedbuilder.core.IToolChain; -import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; -import org.eclipse.cdt.managedbuilder.ui.wizards.STDWizardHandler; - -public class SGXSDKWizardHandler extends STDWizardHandler { - - public SGXSDKWizardHandler() { - super(null, null); - } - - - @Override - public IToolChain[] getSelectedToolChains() { - IToolChain[] tcs = ManagedBuildManager.getRealToolChains(); - for (IToolChain tc : tcs) { - if (tc.getId().equals("com.intel.sgx.SGXtoolChain")) - return new IToolChain[] { - tc - }; - } - return super.getSelectedToolChains(); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignHandlerBase.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignHandlerBase.java deleted file mode 100644 index f96ed13078..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignHandlerBase.java +++ /dev/null @@ -1,196 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStreamReader; - -import com.intel.sgx.preferences.PreferenceConstants; - -public abstract class TwoStepSignHandlerBase extends SGXHandler { - - public String hashFile = null; - public String configFile = null; - public String enclaveFile = null; - public String externalSignPublicKeyFile = null; - public String externallySignedHashFile = null; - public String outputSignedEnclaveFile = null; - - protected File signtool; - - public TwoStepSignHandlerBase() { - super(); - } - - protected void executeGenData() throws ErrorException { - validateConfigFile(); - validateEnclaveFile(); - - refreshProject(); - executeSignTool(new String[] { "gendata", - "-enclave", enclaveFile, - "-config", configFile, - "-out", hashFile }); - refreshProject(); - - validateHashFile(); - - } - - protected void executeCatSig() throws ErrorException { - validateEnclaveFile(); - validateConfigFile(); - validateHashFile(); - - validateExternalSignPublicKeyFile(); - validateExternallySignedHashFile(); - - executeSignTool("catsig", - // enclave data: - "-enclave", enclaveFile, - "-config", configFile, - // previously generated: - "-unsigned", hashFile, - // externally generated - "-key", externalSignPublicKeyFile, - "-sig", externallySignedHashFile, - // output - "-out", outputSignedEnclaveFile - - ); - - refreshProject(); - - validateOutputSignedEnclaveFile(); - - info("Two Step Enclave Sign","Enclave signed successfully !"); - } - - void initializeSigntool() throws ErrorException { - signtool = PreferenceConstants.getSDKDescriptor().getSignerPath(); - if (!signtool.exists() || signtool.isDirectory()) { - quitWithError("Error generating hash! Sign Tool Not Found !\n Please make sure to have written in the box the value for Intel(R) SGX SDK Directory in Window->Preferences->Intel(R) SGX Preferences. \n Usually the path is in /opt/intel/sgxsdk/" ); - } - - } - - protected void validateEnclaveFile() throws ErrorException { - File enclave = new File(enclaveFile); - if (!enclave.exists() || enclave.isDirectory()) { - quitWithError("Error generating hash! Unsigned Enclave File Not Found! Try building the enclave first"); - } - } - - protected void validateConfigFile() throws ErrorException { - if (configFile == null || configFile.isEmpty()) { - quitWithError("Error Enclave Configuration File Not Found !"); - } - File config = new File(configFile); - if (!config.exists() || config.isDirectory()) { - quitWithError("Enclave Config File Not Found !"); - } - } - - protected void validateExternallySignedHashFile() throws ErrorException { - if (externallySignedHashFile == null || externallySignedHashFile.isEmpty()) { - quitWithError("Error signing enclave! Signature File Not Found !"); - } - - File signature = new File(externallySignedHashFile); - if (!signature.exists() || signature.isDirectory()) { - quitWithError("Error signing enclave! Signature File Not Found !"); - } - } - - protected void validateExternalSignPublicKeyFile() throws ErrorException { - if (externalSignPublicKeyFile == null || externalSignPublicKeyFile.isEmpty()) { - quitWithError("Public Key File Not Found !"); - } - - File publickkey = new File(externalSignPublicKeyFile); - if (!publickkey.exists() || publickkey.isDirectory()) { - quitWithError("Error signing enclave! Public Key File Not Found !"); - } - } - - private void validateOutputSignedEnclaveFile() throws ErrorException { - if(outputSignedEnclaveFile == null || outputSignedEnclaveFile.isEmpty()) - { - quitWithError("Output Signed File Not Found !"); - } - File outputSignedEnclave = new File(outputSignedEnclaveFile); - if(!outputSignedEnclave.exists() || outputSignedEnclave.isDirectory()) - { - quitWithError("Output Signed File Not Found !"); - } - - // TODO Auto-generated method stub - - } - - protected void validateHashFile() throws ErrorException { - if(hashFile == null || hashFile.isEmpty()) - { - quitWithError("Hash File Not Found !"); - } - File hash = new File(hashFile); - if(!hash.exists() || hash.isDirectory()) - { - quitWithError("Hash File Not Found !"); - } - } - - - protected void executeSignTool(String... args) throws ErrorException { - - Process q; - try { - - String[] allArgs = new String[args.length+1]; - allArgs[0] = signtool.getAbsolutePath(); - System.arraycopy(args, 0, allArgs, 1, args.length); - - for (String arg : args){ - } - String fullOutput = ""; - q = Runtime.getRuntime().exec(allArgs); - - BufferedReader stdInput = new BufferedReader(new InputStreamReader( - q.getInputStream())); - BufferedReader stdErr = new BufferedReader(new InputStreamReader( - q.getErrorStream())); - String s = null; - while ((s = stdInput.readLine()) != null) { - } - String[] out = new String[20]; - int i = 0; - while ((out[i] = stdErr.readLine()) != null) { - fullOutput += out[i]+"\n"; - i++; - } - String result = out[i - 1]; - - if (!result.equals("Succeed.")) { - // quitWithError("Error generating hash! " + out[i - 2]); - quitWithError("Error generating hash! " + fullOutput); - } - } catch (IOException e) { - quitWithError(e.getLocalizedMessage()); - } - - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignStep1.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignStep1.java deleted file mode 100644 index bd63c3818b..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignStep1.java +++ /dev/null @@ -1,74 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import org.eclipse.jface.dialogs.InputDialog; - -import com.intel.sgx.dialogs.SGXDialogBase; -import com.intel.sgx.dialogs.TwoStepSignStep1Dialog1; -import com.intel.sgx.dialogs.TwoStepSignStep1Dialog2; -import com.intel.sgx.dialogs.TwoStepSignStep1Dialog3; - -// Generate Hash -public class TwoStepSignStep1 extends TwoStepSignHandlerBase { - - public TwoStepSignStep1() { - } - - @Override - protected Object executeSGXStuff() throws ErrorException, CancelException { - - initializeSigntool(); - - showDialog1(); - showDialog2(); - showDialog3(); - return null; - } - - private void showDialog1() throws CancelException, ErrorException { - - TwoStepSignStep1Dialog1 dialog1 = new TwoStepSignStep1Dialog1(shell, this); - if (dialog1.open() != InputDialog.OK) { - cancel(); - } - - executeGenData(); - - } - - private void showDialog2() throws CancelException { - TwoStepSignStep1Dialog2 dialog2 = new TwoStepSignStep1Dialog2(shell, - hashFile); - - if (dialog2.open() != InputDialog.OK) { - cancel(); - } - } - - protected void showDialog3() throws CancelException, ErrorException { - SGXDialogBase dialog3 = new TwoStepSignStep1Dialog3(shell, this); - if (dialog3.open() != InputDialog.OK) { - cancel(); - } - - validateExternalSignPublicKeyFile(); - - validateExternallySignedHashFile(); - - executeCatSig(); - - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignStep2.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignStep2.java deleted file mode 100644 index 08fe8b68bf..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/TwoStepSignStep2.java +++ /dev/null @@ -1,39 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import org.eclipse.jface.dialogs.InputDialog; - -import com.intel.sgx.dialogs.TwoStepSignStep2Dialog; - -// Sign -public class TwoStepSignStep2 extends TwoStepSignHandlerBase { - - public TwoStepSignStep2() { - } - - @Override - protected Object executeSGXStuff() throws ErrorException, CancelException { - initializeSigntool(); - - TwoStepSignStep2Dialog dialog = new TwoStepSignStep2Dialog(shell, this); - if(dialog.open() != InputDialog.OK) { - cancel(); - } - - executeCatSig(); - return null; - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/UpdateSigningKey.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/UpdateSigningKey.java deleted file mode 100644 index cd55358060..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/UpdateSigningKey.java +++ /dev/null @@ -1,101 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.handlers; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -//import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -//import java.security.KeyPair; -//import java.security.KeyPairGenerator; -//import java.security.NoSuchAlgorithmException; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.core.commands.IHandler; -import org.eclipse.core.commands.IHandlerListener; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.eclipse.jface.dialogs.InputDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.handlers.HandlerUtil; - -//import org.bouncycastle.openssl.PEMWriter; -import com.intel.sgx.Activator; -import com.intel.sgx.dialogs.UpdateSignKeyDialog; - -public class UpdateSigningKey extends SGXHandler { - - public String sourceKeyFile = null; - public String destinationKeyFile = null; - public String projectPath = null; - - @Override - protected Object executeSGXStuff() throws ErrorException, CancelException { - - UpdateSignKeyDialog dialog = new UpdateSignKeyDialog(shell, this); - int result = dialog.open(); - if (result != InputDialog.OK) { - cancel(); - } - - if(UpdateSignKeyDialog.regenerate == false) - { - IPath sourceFile = Path.fromOSString(sourceKeyFile); - IPath destFile = Path.fromOSString(destinationKeyFile); - copyFile(sourceFile.toFile(), destFile.toFile()); - refreshProject(); - info("Update Intel(R) SGX Enclave Signing Key","copied \n'" + sourceKeyFile + "' into \n'" + destFile + "'"); - } else { - UpdateSignKeyDialog.regenerate = false; - try { - Process q; - String opensslCmd = "openssl genrsa -out " + destinationKeyFile - + " -3 3072"; - q = Runtime.getRuntime().exec(opensslCmd); - BufferedReader stdInput = new BufferedReader( - new InputStreamReader(q.getInputStream())); - BufferedReader stdErr = new BufferedReader( - new InputStreamReader(q.getErrorStream())); - String s = null; - while ((s = stdInput.readLine()) != null) { - } - while ((s = stdErr.readLine()) != null) { - } - project.refreshLocal(IResource.DEPTH_INFINITE, null); - if (q.exitValue() == 0){ - info("Update Intel(R) SGX Enclave Signing Key","'"+destinationKeyFile+"'"+" was generated!"); - } else { - quitWithError("Could not generate '"+destinationKeyFile+"'!!!"); - } - } catch (IOException e) { - Activator.log(e); - e.printStackTrace(); - } catch (CoreException e) { - Activator.log(e); - e.printStackTrace(); - } - } - return null; - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/about.html b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/about.html deleted file mode 100644 index a3b9ace448..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/handlers/about.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - -About - - -

About This Content

- -

June 22, 2007

-

License

- -

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise -indicated below, the Content is provided to you under the terms and conditions of the -Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available -at http://www.eclipse.org/legal/epl-v10.html. -For purposes of the EPL, "Program" will mean the Content.

- -

If you did not receive this Content directly from the Eclipse Foundation, the Content is -being redistributed by another party ("Redistributor") and different terms and conditions may -apply to your use of any object code in the Content. Check the Redistributor's license that was -provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise -indicated below, the terms and conditions of the EPL still apply to any source code in the Content -and such source code may be obtained at http://www.eclipse.org.

- - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/messages.properties b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/messages.properties deleted file mode 100644 index c0011fadda..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/messages.properties +++ /dev/null @@ -1,16 +0,0 @@ -######################################################################### -# Copyright (c) 2016 Intel Corporation. # -# # -# All rights reserved. This program and the accompanying materials # -# are made available under the terms of the Eclipse Public License v1.0 # -# which accompanies this distribution, and is available at # -# http://www.eclipse.org/legal/epl-v10.html # -# # -# Contributors: # -# Intel Corporation - initial implementation and documentation # -######################################################################### - - -CreateNativeFolders_No_folders=No folders. -CreateNativeFolders_Missing_project_name=Missing project Name. -CreateNativeFolders_Project_does_not_exist=Project does not exist. diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXCCNature.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXCCNature.java deleted file mode 100644 index fde7f7d29c..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXCCNature.java +++ /dev/null @@ -1,45 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.natures; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectNature; -import org.eclipse.core.runtime.CoreException; - -public class SGXCCNature implements IProjectNature { - - private IProject project; - public static final String NATURE_ID = "com.intel.sgx.sgxccnature"; - - public SGXCCNature() { - } - - @Override - public void configure() throws CoreException { - } - - @Override - public void deconfigure() throws CoreException { - } - - @Override - public IProject getProject() { - return project; - } - - @Override - public void setProject(IProject project) { - this.project = project; - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXNature.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXNature.java deleted file mode 100644 index 8db687e029..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXNature.java +++ /dev/null @@ -1,45 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.natures; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectNature; -import org.eclipse.core.runtime.CoreException; - -public class SGXNature implements IProjectNature { - - private IProject project; - public static final String NATURE_ID = "com.intel.sgx.sgxnature"; - - public SGXNature() { - } - - @Override - public void configure() throws CoreException { - } - - @Override - public void deconfigure() throws CoreException { - } - - @Override - public IProject getProject() { - return project; - } - - @Override - public void setProject(IProject project) { - this.project = project; - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXStaticCCNature.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXStaticCCNature.java deleted file mode 100644 index 0d642ee5c8..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/natures/SGXStaticCCNature.java +++ /dev/null @@ -1,45 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.natures; - -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectNature; -import org.eclipse.core.runtime.CoreException; - -public class SGXStaticCCNature implements IProjectNature { - - private IProject project; - public static final String NATURE_ID = "com.intel.sgx.sgxstaticccnature"; - - public SGXStaticCCNature() { - } - - @Override - public void configure() throws CoreException { - } - - @Override - public void deconfigure() throws CoreException { - } - - @Override - public IProject getProject() { - return project; - } - - @Override - public void setProject(IProject project) { - this.project = project; - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/ISDKDescriptor.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/ISDKDescriptor.java deleted file mode 100644 index ec8b274912..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/ISDKDescriptor.java +++ /dev/null @@ -1,29 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.preferences; - -import java.io.File; - - -public interface ISDKDescriptor { - - public abstract File getSdkDir(); - - public abstract File getToolsDir(); - - public abstract File getSignerPath(); - - public abstract File getEdger8rPath(); - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/PreferenceConstants.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/PreferenceConstants.java deleted file mode 100644 index 5ce1abc9cc..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/PreferenceConstants.java +++ /dev/null @@ -1,112 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.preferences; - -import java.io.File; - -import org.eclipse.jface.preference.IPreferenceStore; - -import com.intel.sgx.Activator; - -/** - * Constant definitions for plug-in preferences - */ -public class PreferenceConstants { - - public static final String SDK_PATH = "SDKPathPreference"; - - public static ISDKDescriptor getSDKDescriptor() { - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - File sdkDir = new File(store.getString(PreferenceConstants.SDK_PATH)); - - if (System.getProperty("os.arch").contains("64")) { - return new SGXSDK64Descriptor(sdkDir); - } else { - return new SGXSDK32Descriptor(sdkDir); - } - } - - - static public class SGXSDK32Descriptor implements ISDKDescriptor { - private final File sdkDir; - private final File toolDir; - private final File signerPath; - private final File edger8rPath; - - public SGXSDK32Descriptor(File location){ - this.sdkDir = location; - this.toolDir = new File(location, "bin/x86"); - this.signerPath = new File(toolDir, "sgx_sign"); - this.edger8rPath = new File(toolDir, "sgx_edger8r"); - } - - @Override - public File getSdkDir() { - return sdkDir; - } - - @Override - public File getToolsDir() { - return toolDir; - } - - @Override - public File getSignerPath() { - return signerPath; - } - - @Override - public File getEdger8rPath() { - return edger8rPath; - } - - } - - - static public class SGXSDK64Descriptor implements ISDKDescriptor { - private final File sdkDir; - private final File toolDir; - private final File signerPath; - private final File edger8rPath; - - public SGXSDK64Descriptor(File sdkDir){ - this.sdkDir = sdkDir; - this.toolDir = new File(sdkDir, "bin/x64"); - this.signerPath = new File(toolDir, "sgx_sign"); - this.edger8rPath = new File(toolDir, "sgx_edger8r"); - } - - @Override - public File getSdkDir() { - return sdkDir; - } - - @Override - public File getToolsDir() { - return toolDir; - } - - @Override - public File getSignerPath() { - return signerPath; - } - - @Override - public File getEdger8rPath() { - return edger8rPath; - } - - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/PreferenceInitializer.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/PreferenceInitializer.java deleted file mode 100644 index b85d5e5299..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/PreferenceInitializer.java +++ /dev/null @@ -1,32 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.preferences; - -import com.intel.sgx.Activator; - -import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; -import org.eclipse.jface.preference.IPreferenceStore; - -/** - * Class used to initialize default preference values. - */ -public class PreferenceInitializer extends AbstractPreferenceInitializer { - - public void initializeDefaultPreferences() { - IPreferenceStore store = Activator.getDefault().getPreferenceStore(); - store.setDefault(PreferenceConstants.SDK_PATH, ""); - Activator.getDefault().getPreferenceStore().setValue(PreferenceConstants.SDK_PATH, "/opt/intel/sgxsdk"); - Activator.getDefault().getPreferenceStore().setDefault(PreferenceConstants.SDK_PATH, "/opt/intel/sgxsdk"); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/SGXPreferencePage.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/SGXPreferencePage.java deleted file mode 100644 index fe4059f5ab..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/preferences/SGXPreferencePage.java +++ /dev/null @@ -1,110 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.preferences; - -import org.eclipse.jface.preference.DirectoryFieldEditor; -import org.eclipse.jface.preference.FieldEditorPreferencePage; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Text; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; - -import com.intel.sgx.Activator; -import com.intel.sgx.SdkPathVariableProvider; - -/** - * This class represents a preference page that - * is contributed to the Preferences dialog. By - * subclassing FieldEditorPreferencePage, we - * can use the field support built into JFace that allows - * us to create a page that is small and knows how to - * save, restore and apply itself. - *

- * This page is used to modify preferences only. They - * are stored in the preference store that belongs to - * the main plug-in class. That way, preferences can - * be accessed directly via the preference store. - */ - -public class SGXPreferencePage - extends FieldEditorPreferencePage - implements IWorkbenchPreferencePage { - - private SGXSdkDirectoryFieldEditor sgxSdkDirectoryEditor; - - public SGXPreferencePage() { - super(GRID); - setPreferenceStore(Activator.getDefault().getPreferenceStore()); - setDescription("Intel(R) SGX Preferences"); - } - - /** - * Creates the field editors. Field editors are abstractions of - * the common GUI blocks needed to manipulate various types - * of preferences. Each field editor knows how to save and - * restore itself. - */ - - @Override - protected void createFieldEditors() { - sgxSdkDirectoryEditor = new SGXSdkDirectoryFieldEditor(PreferenceConstants.SDK_PATH, - "&Intel(R) SGX SDK Directory:", getFieldEditorParent()); - addField(sgxSdkDirectoryEditor); - } - - /* - * Validates whether the path entered in the Intel(R) SGX SDK Preferences points to the Intel(R) SGX SDK or not. - */ - private static class SGXSdkDirectoryFieldEditor extends DirectoryFieldEditor { - public SGXSdkDirectoryFieldEditor(String name, String labelText, Composite parent) { - super(name, labelText, parent); - setEmptyStringAllowed(true); - } - - @Override - protected boolean doCheckState() { - if (!super.doCheckState()) { - setErrorMessage("Intel(R) SGX Preferences: Not a Valid directory"); - return false; - } - - String dirname = getTextControl().getText().trim(); - if (!dirname.isEmpty() && !SdkPathVariableProvider.isValidSGXSdkLocation(dirname)) { - setErrorMessage("Intel(R) SGX SDK: Not a Valid SGX SDK directory"); - return false; - } - return true; - } - - @Override - public Text getTextControl(Composite parent) { - setValidateStrategy(VALIDATE_ON_KEY_STROKE); - return super.getTextControl(parent); - } - } - - @Override - public void init(IWorkbench workbench) { - } - - @Override - public void dispose() { - super.dispose(); - - if (sgxSdkDirectoryEditor != null) { - sgxSdkDirectoryEditor.dispose(); - sgxSdkDirectoryEditor = null; - } - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/CreateNativeFolders.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/CreateNativeFolders.java deleted file mode 100644 index d493e146fe..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/CreateNativeFolders.java +++ /dev/null @@ -1,230 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.templates; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.model.CoreModel; -import org.eclipse.cdt.core.model.ICProject; -import org.eclipse.cdt.core.model.IPathEntry; -import org.eclipse.cdt.core.settings.model.CIncludePathEntry; -import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; -import org.eclipse.cdt.core.settings.model.ICFolderDescription; -import org.eclipse.cdt.core.settings.model.ICLanguageSetting; -import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry; -import org.eclipse.cdt.core.settings.model.ICProjectDescription; -import org.eclipse.cdt.core.settings.model.ICSettingEntry; -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.process.ProcessArgument; -import org.eclipse.cdt.core.templateengine.process.ProcessFailureException; -import org.eclipse.cdt.core.templateengine.process.ProcessRunner; -import org.eclipse.cdt.managedbuilder.core.IConfiguration; -import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; -import org.eclipse.cdt.managedbuilder.internal.core.Configuration; -import org.eclipse.cdt.managedbuilder.internal.core.ManagedProject; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; - -import com.intel.sgx.Activator; -import com.intel.sgx.Messages; -import com.intel.sgx.preferences.PreferenceConstants; - -@SuppressWarnings("restriction") -public class CreateNativeFolders extends ProcessRunner { - - @Override - public void process(TemplateCore template, ProcessArgument[] args, - String processId, IProgressMonitor monitor) - throws ProcessFailureException { - String projectName = null; - String[] sourceFolders = null; - String[] outputFolders = null; - - for (ProcessArgument arg : args) { - String argName = arg.getName(); - if (argName.equals("projectName")) { - projectName = arg.getSimpleValue(); - } else if (argName.equals("sourceFolders")) { - sourceFolders = arg.getSimpleArrayValue(); - } else if (argName.equals("outputFolders")) { - outputFolders = arg.getSimpleArrayValue(); - } - } - - if (projectName == null) - throw new ProcessFailureException( - Messages.CreateNativeFolders_Missing_project_name); - - IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); - if (!project.exists()) - throw new ProcessFailureException( - Messages.CreateNativeFolders_Project_does_not_exist); - - if (sourceFolders == null && outputFolders == null) - throw new ProcessFailureException( - Messages.CreateNativeFolders_No_folders); - - try { - ICProject cproject = CCorePlugin.getDefault().getCoreModel() - .create(project); - IPathEntry[] pathEntries = cproject.getRawPathEntries(); - List newEntries = new ArrayList( - pathEntries.length); - for (IPathEntry pathEntry : pathEntries) { - if (pathEntry.getEntryKind() != IPathEntry.CDT_SOURCE - && pathEntry.getEntryKind() != IPathEntry.CDT_OUTPUT) { - newEntries.add(pathEntry); - } - } - if (sourceFolders != null) - for (String sourceFolder : sourceFolders) { - IFolder folder = project.getFolder(new Path(sourceFolder)); - if (!folder.exists()) - folder.create(true, true, monitor); - newEntries.add(CoreModel.newSourceEntry(folder - .getFullPath())); - } - if (outputFolders != null) - for (String outputFolder : outputFolders) { - IFolder folder = project.getFolder(new Path(outputFolder)); - if (!folder.exists()) - folder.create(true, true, monitor); - newEntries.add(CoreModel.newOutputEntry(folder - .getFullPath())); - } - cproject.setRawPathEntries( - newEntries.toArray(new IPathEntry[newEntries.size()]), - monitor); - - // IConfiguration[] configs = managedProject.getConfigurations(); - // for(IConfiguration conf:configs){ - // managedProject.removeConfiguration(conf.getId()); - - // } - - IConfiguration conSimDebug = ManagedBuildManager - .getExtensionConfiguration("com.intel.sgx.configuration.Sim.Debug"); - IConfiguration conSimRelease = ManagedBuildManager - .getExtensionConfiguration("com.intel.sgx.configuration.Sim.Release"); - IConfiguration conHwDebug = ManagedBuildManager - .getExtensionConfiguration("com.intel.sgx.configuration.HW.Debug"); - IConfiguration conHwPrerelease = ManagedBuildManager - .getExtensionConfiguration("com.intel.sgx.configuration.HW.Prerelease"); - IConfiguration conHwRelease = ManagedBuildManager - .getExtensionConfiguration("com.intel.sgx.configuration.HW.Release"); - - addConfigurationToProject(project, conSimDebug); - addConfigurationToProject(project, conSimRelease); - addConfigurationToProject(project, conHwDebug); - addConfigurationToProject(project, conHwPrerelease); - addConfigurationToProject(project, conHwRelease); - - - changeProjectConfiguration(project, conSimDebug); - - project.refreshLocal(IResource.DEPTH_INFINITE, null); - } catch (CoreException e) { - throw new ProcessFailureException(e); - } - } - - void addConfigurationToProject(IProject project, IConfiguration config) { - createConfiguration(project, config); - addSGXIncludePathsToConfiguration(project, config); - } - - private void addSGXIncludePathsToConfiguration(IProject project, - IConfiguration config) { - ICProjectDescription projectDescription = CoreModel.getDefault() - .getProjectDescription(project, true); - ICConfigurationDescription configDecriptions[] = projectDescription - .getConfigurations(); - for (ICConfigurationDescription configDescription : configDecriptions) { - ICFolderDescription projectRoot = configDescription - .getRootFolderDescription(); - - ICLanguageSetting[] settings = projectRoot.getLanguageSettings(); - for (ICLanguageSetting setting : settings) { - - if (!"org.eclipse.cdt.core.gcc".equals(setting.getLanguageId()) && !"org.eclipse.cdt.core.g++".equals(setting.getLanguageId()) ) { - continue; - } - List includes = new ArrayList(); - - includes.add(new CIncludePathEntry( Activator.getDefault().getPreferenceStore().getString(PreferenceConstants.SDK_PATH) + - "/include/", - ICSettingEntry.LOCAL)); - - setting.setSettingEntries(ICSettingEntry.INCLUDE_PATH, includes); - } - } - try { - CoreModel.getDefault().setProjectDescription(project, - projectDescription); - } catch (CoreException e) { - e.printStackTrace(); - } - - } - - private void createConfiguration(IProject project, - IConfiguration config) { - ManagedProject managedProject = (ManagedProject) ManagedBuildManager.getBuildInfo(project) - .getManagedProject();; - - - Configuration cloneConfig1 = (Configuration) config; - Configuration cfg1 = new Configuration(managedProject, cloneConfig1, - cloneConfig1.getId(), false, false); - String target = cfg1.getArtifactName(); - if (target == null || target.length() == 0) - cfg1.setArtifactName(managedProject.getDefaultArtifactName()); - - cfg1.exportArtifactInfo(); - - ManagedBuildManager.saveBuildInfo(project, true); - } - - private void changeProjectConfiguration(IProject project, - IConfiguration conSimDebug) { - ICProjectDescription prjd = CCorePlugin.getDefault() - .getProjectDescriptionManager().getProjectDescription(project); - ICConfigurationDescription[] configs = prjd.getConfigurations(); - if (configs != null && configs.length > 0) { - for (ICConfigurationDescription config : configs) { - if (config.getConfiguration().getId() - .equals(conSimDebug.getId())) { - config.setActive(); - try { - CoreModel.getDefault().setProjectDescription(project, - prjd); - } catch (CoreException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - break; - } - } - } - - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/SetCCNature.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/SetCCNature.java deleted file mode 100644 index e85476b288..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/SetCCNature.java +++ /dev/null @@ -1,77 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.templates; - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.process.ProcessArgument; -import org.eclipse.cdt.core.templateengine.process.ProcessFailureException; -import org.eclipse.cdt.core.templateengine.process.ProcessRunner; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; - -import com.intel.sgx.Activator; -import com.intel.sgx.natures.SGXNature; - -public class SetCCNature extends ProcessRunner { - - public SetCCNature() { - } - - @Override - public void process(TemplateCore template, ProcessArgument[] args, - String processId, IProgressMonitor monitor) - throws ProcessFailureException { - String projectName = null; - IProject project = null; - - for(ProcessArgument arg: args){ - String argName = arg.getName(); - if(argName.equals("projectName")){ - projectName = arg.getSimpleValue(); - } - } - - - project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); - IWorkspace workspace = project.getWorkspace(); - IProjectDescription description; - try { - description = project.getDescription(); - - String[] natures = description.getNatureIds(); - String[] newNatures = new String[natures.length+1]; - System.arraycopy(natures,0,newNatures,0,natures.length); - newNatures[natures.length] = SGXNature.NATURE_ID; - IStatus status = workspace.validateNatureSet(newNatures); - - if(status.getCode() == IStatus.OK) - { - - description.setNatureIds(newNatures); - project.setDescription(description, null); - } - else { - System.err.println("Incorrect Project Nature. Please check Project Settings."); - } - } catch (CoreException e) { - Activator.log(e); - e.printStackTrace(); - } - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/SetStaticCCNature.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/SetStaticCCNature.java deleted file mode 100644 index 449a575262..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/templates/SetStaticCCNature.java +++ /dev/null @@ -1,75 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.templates; - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.process.ProcessArgument; -import org.eclipse.cdt.core.templateengine.process.ProcessFailureException; -import org.eclipse.cdt.core.templateengine.process.ProcessRunner; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; - -import com.intel.sgx.Activator; -import com.intel.sgx.natures.SGXStaticCCNature; - -public class SetStaticCCNature extends ProcessRunner { - - public SetStaticCCNature() { - } - - @Override - public void process(TemplateCore template, ProcessArgument[] args, - String processId, IProgressMonitor monitor) - throws ProcessFailureException { - - String projectName = null; - IProject project = null; - - for(ProcessArgument arg: args){ - String argName = arg.getName(); - if(argName.equals("projectName")){ - projectName = arg.getSimpleValue(); - } - } - - project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName); - IWorkspace workspace = project.getWorkspace(); - IProjectDescription description; - try { - description = project.getDescription(); - - String[] natures = description.getNatureIds(); - String[] newNatures = new String[natures.length+1]; - System.arraycopy(natures,0,newNatures,0,natures.length); - newNatures[natures.length] = SGXStaticCCNature.NATURE_ID; - IStatus status = workspace.validateNatureSet(newNatures); - - if(status.getCode() == IStatus.OK) - { - description.setNatureIds(newNatures); - project.setDescription(description, null); - } - else - System.err.println("Incorrect Project Nature. Please check Project Settings."); - } catch (CoreException e) { - Activator.log(e); - e.printStackTrace(); - } - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/testers/SGXPropertyTester.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/testers/SGXPropertyTester.java deleted file mode 100644 index 1b876c79c6..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/testers/SGXPropertyTester.java +++ /dev/null @@ -1,79 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.testers; - -import java.util.regex.Pattern; - -import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo; -import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; -import org.eclipse.core.expressions.PropertyTester; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.jface.viewers.StructuredSelection; - -public class SGXPropertyTester extends PropertyTester { - - private static final Pattern isRelease = Pattern.compile(".*Release.*"); - private static final Pattern isHW = Pattern.compile(".*Hardware.*"); - private static final Pattern isPreRelease = Pattern.compile(".*Prerelease.*");; - - public SGXPropertyTester() { - super(); - - // TODO Auto-generated constructor stub - } - - @Override - public boolean test(Object receiver, String property, Object[] args, - Object expectedValue) { - - - - - - if (property.equals("twoStepsActive")) { - IProject project = getProjectOfSelectedItem(receiver); - IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project); - return isHW(buildInfo) && isRelease(buildInfo) && !isPreRelease(buildInfo); - - } else if (property.equals("sgxNatureAdded")) { - IProject project = getProjectOfSelectedItem(receiver); - return true; - } else { - return false; - } - } - - private IProject getProjectOfSelectedItem(Object receiver) { - StructuredSelection selection = (StructuredSelection) receiver; - IResource resource = (IResource) selection.getFirstElement(); - IProject project = resource.getProject(); - return project; - } - - boolean isHW(IManagedBuildInfo buildInfo){ - return isHW.matcher(buildInfo.getConfigurationName()).matches(); - } - - - - boolean isRelease(IManagedBuildInfo buildInfo){ - return isRelease.matcher(buildInfo.getConfigurationName()).matches(); - } - - boolean isPreRelease(IManagedBuildInfo buildInfo){ - return isPreRelease.matcher(buildInfo.getConfigurationName()).matches(); - } - -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/wizards/SGXCCProjectWizard.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/wizards/SGXCCProjectWizard.java deleted file mode 100644 index be6ec1e51b..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/wizards/SGXCCProjectWizard.java +++ /dev/null @@ -1,145 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.wizards; - -import java.net.URI; -import java.util.Map; - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.TemplateEngine; -import org.eclipse.cdt.ui.wizards.CCProjectWizard; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; - -import com.intel.sgx.natures.SGXNature; - -public class SGXCCProjectWizard extends CCProjectWizard { - - private IProject project; - - @Override - protected boolean setCreated() throws CoreException { - boolean result = super.setCreated(); - doIt(project, new NullProgressMonitor()); - return result; - } - - @Override - public boolean performFinish() { - - return super.performFinish(); - } - - @Override - public void setInitializationData(IConfigurationElement config, - String propertyName, Object data) throws CoreException { - // TODO Auto-generated method stub - super.setInitializationData(config, propertyName, data); - } - - @Override - public IProject createIProject(String name, URI location) - throws CoreException { - // TODO Auto-generated method stub - return super.createIProject(name, location); - - } - - @Override - public IProject createIProject(String name, URI location, - IProgressMonitor monitor) throws CoreException { - project = super.createIProject(name, location, monitor); - return project; - } - - @Override - public String[] getExtensions() { - // TODO Auto-generated method stub - return super.getExtensions(); - } - - public SGXCCProjectWizard() { - // TODO Auto-generated constructor stub - } - - @Override - public String[] getNatures() { - // TODO Auto-generated method stub - return super.getNatures(); - } - - @Override - protected IProject continueCreation(IProject prj) { - // TODO Auto-generated method stub - return super.continueCreation(prj); - } - - @Override - public String[] getContentTypeIDs() { - // TODO Auto-generated method stub - return super.getContentTypeIDs(); - } - - @Override - public IProject getProject(boolean defaults) { - // TODO Auto-generated method stub - return super.getProject(defaults); - } - - @Override - public String[] getLanguageIDs() { - // TODO Auto-generated method stub - return super.getLanguageIDs(); - } - - void doIt(IProject project, IProgressMonitor monitor) throws CoreException { - TemplateCore template = TemplateEngine.getDefault().getTemplateById( - "AddSGXNature"); - Map valueStore = template.getValueStore(); - valueStore.put("projectName", project.getName()); - valueStore.put("baseName", project.getName()); - template.executeTemplateProcesses(monitor, false); - - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - IProjectDescription description = project.getDescription(); - String[] natures = description.getNatureIds(); - - String[] newNatures = new String[natures.length + 1]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - newNatures[natures.length] = SGXNature.NATURE_ID; - IStatus status = workspace.validateNatureSet(newNatures); - - if (status.getCode() == IStatus.OK) { - description.setNatureIds(newNatures); - project.setDescription(description, null); - } else { - System.err - .println("Incorrect Project Nature. Please check Project Settings.");// TODO - // throw - // an - // exception - // here. - System.err.println("Status is: " + status.getCode()); - } - - // project.refreshLocal(IResource.DEPTH_ONE,null); - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/wizards/SGXCProjectWizard.java b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/wizards/SGXCProjectWizard.java deleted file mode 100644 index 14ec8f8284..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/src/com/intel/sgx/wizards/SGXCProjectWizard.java +++ /dev/null @@ -1,146 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Copyright (c) 2016 Intel Corporation. // -// // -// All rights reserved. This program and the accompanying materials // -// are made available under the terms of the Eclipse Public License v1.0 // -// which accompanies this distribution, and is available at // -// http://www.eclipse.org/legal/epl-v10.html // -// // -// Contributors: // -// Intel Corporation - initial implementation and documentation // -/////////////////////////////////////////////////////////////////////////// - - -package com.intel.sgx.wizards; - -import java.net.URI; -import java.util.Map; - -import org.eclipse.cdt.core.templateengine.TemplateCore; -import org.eclipse.cdt.core.templateengine.TemplateEngine; -import org.eclipse.cdt.ui.wizards.CProjectWizard; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IProjectDescription; -import org.eclipse.core.resources.IWorkspace; -import org.eclipse.core.resources.ResourcesPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; - -import com.intel.sgx.natures.SGXNature; - -public class SGXCProjectWizard extends CProjectWizard { - - private IProject project; - - @Override - protected boolean setCreated() throws CoreException { - boolean result = super.setCreated(); - doIt(project, new NullProgressMonitor()); - return result; - } - - @Override - public boolean performFinish() { - - return super.performFinish(); - } - - @Override - public void setInitializationData(IConfigurationElement config, - String propertyName, Object data) throws CoreException { - // TODO Auto-generated method stub - super.setInitializationData(config, propertyName, data); - } - - @Override - public IProject createIProject(String name, URI location) - throws CoreException { - // TODO Auto-generated method stub - return super.createIProject(name, location); - - } - - @Override - public IProject createIProject(String name, URI location, - IProgressMonitor monitor) throws CoreException { - project = super.createIProject(name, location, monitor); - return project; - } - - @Override - public String[] getExtensions() { - // TODO Auto-generated method stub - return super.getExtensions(); - } - - public SGXCProjectWizard() { - // TODO Auto-generated constructor stub - } - - @Override - public String[] getNatures() { - // TODO Auto-generated method stub - return super.getNatures(); - } - - @Override - protected IProject continueCreation(IProject prj) { - // TODO Auto-generated method stub - return super.continueCreation(prj); - } - - @Override - public String[] getContentTypeIDs() { - // TODO Auto-generated method stub - return super.getContentTypeIDs(); - } - - @Override - public IProject getProject(boolean defaults) { - // TODO Auto-generated method stub - return super.getProject(defaults); - } - - @Override - public String[] getLanguageIDs() { - // TODO Auto-generated method stub - return super.getLanguageIDs(); - } - - void doIt(IProject project, IProgressMonitor monitor) throws CoreException { - TemplateCore template = TemplateEngine.getDefault().getTemplateById( - "AddSGXNature"); - Map valueStore = template.getValueStore(); - valueStore.put("projectName", project.getName()); - valueStore.put("baseName", project.getName()); - template.executeTemplateProcesses(monitor, false); - - IWorkspace workspace = ResourcesPlugin.getWorkspace(); - IProjectDescription description = project.getDescription(); - String[] natures = description.getNatureIds(); - for (String nature : natures) { - } - - String[] newNatures = new String[natures.length + 1]; - System.arraycopy(natures, 0, newNatures, 0, natures.length); - newNatures[natures.length] = SGXNature.NATURE_ID; - IStatus status = workspace.validateNatureSet(newNatures); - - if (status.getCode() == IStatus.OK) { - description.setNatureIds(newNatures); - project.setDescription(description, null); - } else { - System.err - .println("Incorrect Project Nature. Please check Project Settings.");// TODO - // throw - // an - // exception - // here. - System.err.println("Status is: " + status.getCode()); - } - - } -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGX.gif b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGX.gif deleted file mode 100644 index 21156bbf96..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGX.gif and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/enclavetemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/enclavetemplate.xml deleted file mode 100644 index 40d4b6b13a..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/enclavetemplate.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/trustedstatictemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/trustedstatictemplate.xml deleted file mode 100644 index 7b8649b17c..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/trustedstatictemplate.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/untrusted_module_template.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/untrusted_module_template.xml deleted file mode 100644 index 537100987e..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/minimal/untrusted_module_template.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/with_sample/enclavetemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/with_sample/enclavetemplate.xml deleted file mode 100644 index 7d9527dafb..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c++/with_sample/enclavetemplate.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/enclavetemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/enclavetemplate.xml deleted file mode 100644 index c32e20347a..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/enclavetemplate.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/trustedstatictemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/trustedstatictemplate.xml deleted file mode 100644 index 6fc320cbba..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/trustedstatictemplate.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/untrusted_module_template.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/untrusted_module_template.xml deleted file mode 100644 index b8aec6e666..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/minimal/untrusted_module_template.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/with_sample/enclavetemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/with_sample/enclavetemplate.xml deleted file mode 100644 index 66344d6636..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/c/with_sample/enclavetemplate.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/common/addnaturetemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/common/addnaturetemplate.xml deleted file mode 100644 index 9cf5663e3c..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/common/addnaturetemplate.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/configtemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/configtemplate.xml deleted file mode 100644 index 7ce22c45e3..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/configtemplate.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/ctemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/ctemplate.xml deleted file mode 100644 index 5f36a93377..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/ctemplate.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/cxxstaticlibtemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/cxxstaticlibtemplate.xml deleted file mode 100644 index 0f657a5fd3..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/cxxstaticlibtemplate.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/cxxtemplate.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/cxxtemplate.xml deleted file mode 100644 index c8c0ce106f..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/cxxtemplate.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/template.properties b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/template.properties deleted file mode 100644 index 58be4d9a7d..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/SGXtemplates/template.properties +++ /dev/null @@ -1,63 +0,0 @@ -######################################################################### -# Copyright (c) 2016 Intel Corporation. # -# # -# All rights reserved. This program and the accompanying materials # -# are made available under the terms of the Eclipse Public License v1.0 # -# which accompanies this distribution, and is available at # -# http://www.eclipse.org/legal/epl-v10.html # -# # -# Contributors: # -# Intel Corporation - initial implementation and documentation # -######################################################################### - SGX.author=Intel - - #Add Nature template Values - SGX.naturetemplate.title.description=A Intel Software Guard Extensions Project template. - SGX.naturetemplate.title.label=Intel SGX Project - SGX.naturetemplate.title.id=AddSGXNature - - #Enclave Config template Values - SGX.enclaveconfig.template.title.description=A Intel Software Guard Extensions Configuration template. - SGX.enclaveconfig.template.title.label=Intel SGX Enclave Configuration - SGX.enclaveconfig.template.title.id=SGXEnclaveConfig - - #Untrusted Module template values - SGX.untrustedModule.template.title.description= A Intel Software Guard Extensions Untrusted Module template. - SGX.untrustedModule.template.title.label=Intel SGX Untrusted Module - - #Enclave template values - SGX.enclave.template.title.description= A Intel Software Guard Extensions Project template. - SGX.enclave.template.title.label=Intel SGX Project - SGX.enclave.template.title.id=SGXProject - - #C template Values - SGX.Ctemplate.title.description=A Intel Software Guard Extensions C Enclave Project template. - SGX.Ctemplate.title.label=Intel SGX C Enclave Project - SGX.Ctemplate.title.id=SGXCProject - SGX.Ctemplate.enclaveSettings.label=Enclave Settings - SGX.Ctemplate.enclaveSettings.description=Initial settings required for a new enclave. - - #C Static lib template Values - SGX.CStatictemplate.title.description=A Intel Software Guard Extensions C Enclave Project template. - SGX.CStatictemplate.title.label=Intel SGX C Enclave Library Project - SGX.CStatictemplate.title.id=SGXCEnclaveLibProject - SGX.CStatictemplate.enclaveSettings.label=Enclave Settings - SGX.CStatictemplate.enclaveSettings.description=Initial settings required for a new enclave Library. - SGX.CStatictemplate.requiresEdl.label=Requires EDL - SGX.CStatictemplate.requiresEdl.description=De-select this option to create an Non-SGX trusted static library without an Edl file. By default, the project creates an Enclave library with an Edl file. - - #CXX template Values - SGX.CXXtemplate.title.description=A Intel Software Guard Extensions C++ Enclave Project template. - SGX.CXXtemplate.title.label=C/C++ Project with Intel SGX Nature - SGX.CXXtemplate.title.id=SGXCPPProject - SGX.CXXtemplate.enclaveSettings.label=Enclave Settings - SGX.CXXtemplate.enclaveSettings.description=Initial settings required for a new enclave. - - #CXX Static lib template Values - SGX.CXXStatictemplate.title.description=A Intel Software Guard Extensions C++ Enclave Library Project template. - SGX.CXXStatictemplate.title.label=Intel SGX C++ Enclave Library Project - SGX.CXXStatictemplate.title.id=SGXCPPEnclaveLibProject - SGX.CXXStatictemplate.enclaveSettings.label=Enclave Settings - SGX.CXXStatictemplate.enclaveSettings.description=Initial settings required for a new enclave Library. - SGX.CXXStatictemplate.requiresEdl.label=Requires EDL - SGX.CXXStatictemplate.requiresEdl.description=De-select this option to create an Non-SGX trusted static library without an Edl file. By default, the project creates an Enclave library with an Edl file. diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/newmngc_app.gif b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/newmngc_app.gif deleted file mode 100644 index 23b0284f84..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/newmngc_app.gif and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/newmngcc_app.gif b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/newmngcc_app.gif deleted file mode 100644 index 4b39411daf..0000000000 Binary files a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/newmngcc_app.gif and /dev/null differ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/resources/Basename.config.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/resources/Basename.config.xml deleted file mode 100644 index 0325b1601f..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/resources/Basename.config.xml +++ /dev/null @@ -1,9 +0,0 @@ - - $(ProdID) - $(IsvSvn) - $(ThreadStackSize) - $(GlobalHeapSize) - $(TcsNumber) - $(TcsPolicy) - $(DisableDebug) - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/resources/Basename_private.pem b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/resources/Basename_private.pem deleted file mode 100644 index 790839d391..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/resources/Basename_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4wIBAAKCAYEA8DLzZJpN7sN5J1PtKZAqWFeW+0/pPJVWRKEB8lfqXGJ0YIjG -1o0g0/+60ktlm0vVdWSqepmpRpTB2ZZjxxc+JHfZGQnvmlGx6qQxSFS9u+S8mSzD -MknsquLVsi7rojq34dTwSckMg0KQ/sGmsV6EgsUnldhdcPOJ8+NaaqtmAmjHYIpK -jLo3pJz0e7NqKvzE2YhmZZjrIZBNFHxX/lrQ36lW6Obp8xj9CqUMZp+2+/ntdFSl -7u9BK5y3ZHh8hUx6PkHfV8f1h9iG1jroINrrQwhftKmcsg/DPG7NOnjK/EvFaBku -6p0pnmeJM6VUihaLWYNAAjylVmMysenAjl4jsSzQeIe5idoPzYonCuAcASj8utgz -4OxxMHFYAXzgc2An6jp700NOgmYdhtoTMCUjohyd+RHJoSNJpE+ocKPVM72xucJB -o8dK55kI2/E19EVm59UyhXs2YGIjswziMK94H9KSl+TRthny7wYKju09lbdQAGid -rZcYTv2LVYP1Q5IDAgEDAoIBgQCgIfeYZt6fLPtvjUjGYBw65Q9SNUYoY47Ya1ah -j/GS7E2VsISPCMCNVSc23O5nh+OjmHGnERuEYyvmZEKEuiltpTtmBp+8NnacbXYw -OH59QyhmHdd22/MclzkhdJ0W0c/r40rb212s1wtUgRnLlFhXLhpj5ZOgolv37Obx -x5lW8ITrBtxd0XptvfhSd5wcqIM7sERDu0drtYi4UuVUPIs/xjnwmfFMu1NcbghE -ann9UUj4OG6fSityaHpC+v2uMvrexpJP3csYY/VbrYdzlp9GLHkm9mM3Y1tSYoU4 -GhsLstDSHIOZ5f2trh+Re6759SktXi+E9B4xQvJwwVAufmfU0aVESHtJDllt+UOK -LfINb3SmXX8uINqAlees+xJDm/ZcA8vvWWioD8Hv6c47qzrYH1JwvTJtk3G3orFs -syZe7KYwUUBxTREmTCdWoeHC9Hou4MxgiyViPl5SbIUz4yqJgcr3gPtoSRhwvY3v -r1GyeyRuB0CsAun5TQCcx31XwssCgcEA/hK8i1nKvEaTJ5GX9bGZo7BtjWftuGfa -qk0b4aZLWBeoJpGgivolaloTYE+aBAhPMFNKo9HT357o9SW48yk0kyReywJj6HBf -b82TSjt9wXmeo+6cE7EO7k1sINoJnlRiDkWqdpZLzty24dWMN27oXjO2ELUmAgnT -M8rzcshlhRsp/OSD+kIyEfVstx3H3hzPDMyHsNnlPv0Jycdp+1YfANLOaog+JHUZ -Kwb90RF2ePXnLbt2ts0N03kuJKgqS6xbAoHBAPIFR1Sheib8A6UlBP3HYrYVPGzQ -GiaS35aN6YSrVxKn5AZcyPjKB6+IRnkcNA8efmUirhb8pCzf3hOiD1V3U17N+ccY -nLPUKjjGrnFfsyuILx1dWQgKGoFDEF0qO2+h1FHvH3Wm5bdxw70l0Z81Yv+57D9A -1/q8S90QqtrOtiA/jnRj3P+RfxwxYSLgm3G54JS3eEPQmQ4HjG2isGeEmVC9E7ob -GnU3NRrit9ZUzJEIsi2iRfTFq4WQ3EWwjvRBeQKBwQCpYdMHkTHS2bdvtmVOdmZt -IEkI7/PQRTxxiL1BGYeQD8VvC8BcpsOcPAzq37wCsDTK4jHCi+KVFJtOGSX3cM23 -bZSHVu1FoD+f3mIxfP6A+78X9GgNILSe3kgV5rEUOEFe2RxPDt00kySWjl16SfA+ -zSQLI26sBozNMfeh2u5YvMaomFf8LCFhTkh6E9qUEzSzMwUgkUN/U1vb2kanjr9V -4d7xsClto2Ycr1Pgtk77TpoefPnPM16M+3QYcBwycucCgcEAoVjaOGumxKgCbhit -/oTseWN9neARbwyVDwlGWHI6DG/tWZMwpdwFH7Au+2gitL7+7hceuf3CyJU+t8Ff -jk+M6d6mhLsTIo1xey8e9j/Mx7AfaOjmBVwRq4IK6MbSSmvi4UoU+RnuekvX026L -v3jsqnvy1NXlUdLdPgsckd8kFX+0TZfoqmD/aCDrbJW89nvrDc+lgosQtAUISRcg -RQMQ4H4NJry8TiTOEex6juMzC1shc8GD+IPHrmCS2SBfTYD7AoHAOYqsSbLvkhWP -JCx3wicFIY4y+eJW2hNK19ho+PEcrmu7+HKZHMU7oslsoSnme5mMomK9pZnY8KSy -px0D13XyUmEmZluxKcdUDC6mRWH4qkPt/9DGbzHwNLfla+KbxoNLi7F6U5XU5J/6 -NzZeO9HrLzHy1ck/0xUDU7Y+WWniMbUdlOpXSd+SsZtKomRhnc+QljYqSJplJL7f -mfnQ4stcY3RcPHGwfDOQT9sVk0hoIGXKCzEl217Iw1P8UwKvBbNe ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_t.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_t.mk deleted file mode 100644 index 9e5bd81769..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_t.mk +++ /dev/null @@ -1,127 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif - -Crypto_Library_Name := sgx_tcrypto - -$(EnclaveName)_Cpp_Files := trusted/$(enclaveName).cpp -$(EnclaveName)_C_Files := -$(EnclaveName)_Include_Paths := -IInclude -Itrusted -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx - - -Flags_Just_For_C := -Wno-implicit-function-declaration -std=c11 -Common_C_Cpp_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $($(EnclaveName)_Include_Paths) -fno-builtin-printf -I. -$(EnclaveName)_C_Flags := $(Flags_Just_For_C) $(Common_C_Cpp_Flags) -$(EnclaveName)_Cpp_Flags := $(Common_C_Cpp_Flags) -std=c++11 -nostdinc++ -fno-builtin-printf -I. - -$(EnclaveName)_Cpp_Flags := $($(EnclaveName)_Cpp_Flags) -fno-builtin-printf - -$(EnclaveName)_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 \ - -Wl,--version-script=trusted/$(enclaveName).lds - -$(EnclaveName)_Cpp_Objects := $($(EnclaveName)_Cpp_Files:.cpp=.o) -$(EnclaveName)_C_Objects := $($(EnclaveName)_C_Files:.c=.o) - -ifeq ($(SGX_MODE), HW) -ifneq ($(SGX_DEBUG), 1) -ifneq ($(SGX_PRERELEASE), 1) -Build_Mode = HW_RELEASE -endif -endif -endif - - -.PHONY: all run - -ifeq ($(Build_Mode), HW_RELEASE) -all: $(enclaveName).so - @echo "Build enclave $(enclaveName).so [$(Build_Mode)|$(SGX_ARCH)] success!" - @echo - @echo "*********************************************************************************************************************************************************" - @echo "PLEASE NOTE: In this mode, please sign the $(enclaveName).so first using Two Step Sign mechanism before you run the app to launch and access the enclave." - @echo "*********************************************************************************************************************************************************" - @echo - - -else -all: $(enclaveName).signed.so -endif - -run: all -ifneq ($(Build_Mode), HW_RELEASE) - @$(CURDIR)/app - @echo "RUN => app [$(SGX_MODE)|$(SGX_ARCH), OK]" -endif - - -######## $(enclaveName) Objects ######## - -trusted/$(enclaveName)_t.c: $(SGX_EDGER8R) ./trusted/$(enclaveName).edl - @cd ./trusted && $(SGX_EDGER8R) --trusted ../trusted/$(enclaveName).edl --search-path ../trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -trusted/$(enclaveName)_t.o: ./trusted/$(enclaveName)_t.c - @$(CC) $($(EnclaveName)_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -trusted/%.o: trusted/%.cpp - @$(CXX) $($(EnclaveName)_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -trusted/%.o: trusted/%.c - @$(CC) $($(EnclaveName)_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -$(enclaveName).so: trusted/$(enclaveName)_t.o $($(EnclaveName)_Cpp_Objects) $($(EnclaveName)_C_Objects) - @$(CXX) $^ -o $@ $($(EnclaveName)_Link_Flags) - @echo "LINK => $@" - -$(enclaveName).signed.so: $(enclaveName).so - @$(SGX_ENCLAVE_SIGNER) sign -key trusted/$(enclaveName)_private.pem -enclave $(enclaveName).so -out $@ -config trusted/$(enclaveName).config.xml - @echo "SIGN => $@" -clean: - @rm -f $(enclaveName).* trusted/$(enclaveName)_t.* $($(EnclaveName)_Cpp_Objects) $($(EnclaveName)_C_Objects) diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_u.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_u.mk deleted file mode 100644 index f498e6513c..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_u.mk +++ /dev/null @@ -1,129 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 -UNTRUSTED_DIR=untrusted - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -ifneq ($(SGX_MODE), HW) - Urts_Library_Name := sgx_urts_sim -else - Urts_Library_Name := sgx_urts -endif - -# App_Cpp_Files := App/App.cpp $(wildcard App/Edger8rSyntax/*.cpp) $(wildcard App/TrustedLibrary/*.cpp) -App_Cpp_Files := $(UNTRUSTED_DIR)/sample.cpp # $(wildcard App/TrustedLibrary/*.cpp) -App_Include_Paths := -IInclude -I$(UNTRUSTED_DIR) -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 -App_Link_Flags := $(SGX_COMMON_CFLAGS) -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) -lpthread - -ifneq ($(SGX_MODE), HW) - App_Link_Flags += -lsgx_uae_service_sim -else - App_Link_Flags += -lsgx_uae_service -endif - -App_Cpp_Objects := $(App_Cpp_Files:.cpp=.o) - - - -ifeq ($(SGX_MODE), HW) -ifneq ($(SGX_DEBUG), 1) -ifneq ($(SGX_PRERELEASE), 1) -Build_Mode = HW_RELEASE -endif -endif -endif - - -.PHONY: all run - -ifeq ($(Build_Mode), HW_RELEASE) -all: sample - @echo "Build sample [$(Build_Mode)|$(SGX_ARCH)] success!" - @echo - @echo "*********************************************************************************************************************************************************" - @echo "PLEASE NOTE: In this mode, please sign the $(enclaveName).so first using Two Step Sign mechanism before you run the app to launch and access the enclave." - @echo "*********************************************************************************************************************************************************" - @echo - - -else -all: sample -endif - -run: all -ifneq ($(Build_Mode), HW_RELEASE) - @$(CURDIR)/sample - @echo "RUN => sample [$(SGX_MODE)|$(SGX_ARCH), OK]" -endif - -######## App Objects ######## - -$(UNTRUSTED_DIR)/$(enclaveName)_u.c: $(SGX_EDGER8R) trusted/$(enclaveName).edl - @cd $(UNTRUSTED_DIR) && $(SGX_EDGER8R) --untrusted ../trusted/$(enclaveName).edl --search-path ../trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(UNTRUSTED_DIR)/$(enclaveName)_u.o: $(UNTRUSTED_DIR)/$(enclaveName)_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -$(UNTRUSTED_DIR)/%.o: $(UNTRUSTED_DIR)/%.cpp - @$(CXX) $(App_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -sample: $(UNTRUSTED_DIR)/$(enclaveName)_u.o $(App_Cpp_Objects) - @$(CXX) $^ -o $@ $(App_Link_Flags) - @echo "LINK => $@" - - -.PHONY: clean - -clean: - @rm -f sample $(App_Cpp_Objects) $(UNTRUSTED_DIR)/$(enclaveName)_u.* diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_u.without_app.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_u.without_app.mk deleted file mode 100644 index f4b68ee975..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c++/sgx_u.without_app.mk +++ /dev/null @@ -1,71 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 -UNTRUSTED_DIR=untrusted - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -App_Include_Paths := -IInclude -I$(UNTRUSTED_DIR) -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 - -.PHONY: all run - -all: $(UNTRUSTED_DIR)/$(enclaveName)_u.o - -######## App Objects ######## - -$(UNTRUSTED_DIR)/$(enclaveName)_u.c: $(SGX_EDGER8R) trusted/$(enclaveName).edl - @mkdir -p $(UNTRUSTED_DIR) - @cd $(UNTRUSTED_DIR) && $(SGX_EDGER8R) --untrusted ../trusted/$(enclaveName).edl --search-path ../trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(UNTRUSTED_DIR)/$(enclaveName)_u.o: $(UNTRUSTED_DIR)/$(enclaveName)_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -.PHONY: clean - -clean: - @rm -f $(UNTRUSTED_DIR)/$(enclaveName)_u.* diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_t.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_t.mk deleted file mode 100644 index add92a56bd..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_t.mk +++ /dev/null @@ -1,115 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif - -Crypto_Library_Name := sgx_tcrypto - -$(EnclaveName)_C_Files := trusted/$(enclaveName).c -$(EnclaveName)_Include_Paths := -IInclude -Itrusted -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx - -Flags_Just_For_C := -Wno-implicit-function-declaration -std=c11 -Common_C_Cpp_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $($(EnclaveName)_Include_Paths) -fno-builtin-printf -I. -$(EnclaveName)_C_Flags := $(Flags_Just_For_C) $(Common_C_Cpp_Flags) - -$(EnclaveName)_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 \ - -Wl,--version-script=trusted/$(enclaveName).lds - -$(EnclaveName)_C_Objects := $($(EnclaveName)_C_Files:.c=.o) - -ifeq ($(SGX_MODE), HW) -ifneq ($(SGX_DEBUG), 1) -ifneq ($(SGX_PRERELEASE), 1) -Build_Mode = HW_RELEASE -endif -endif -endif - - -.PHONY: all run - -ifeq ($(Build_Mode), HW_RELEASE) -all: $(enclaveName).so - @echo "Build enclave $(enclaveName).so [$(Build_Mode)|$(SGX_ARCH)] success!" - @echo - @echo "*********************************************************************************************************************************************************" - @echo "PLEASE NOTE: In this mode, please sign the $(enclaveName).so first using Two Step Sign mechanism before you run the app to launch and access the enclave." - @echo "*********************************************************************************************************************************************************" - @echo -else -all: $(enclaveName).signed.so -endif - -run: all -ifneq ($(Build_Mode), HW_RELEASE) - @$(CURDIR)/app - @echo "RUN => app [$(SGX_MODE)|$(SGX_ARCH), OK]" -endif - - -######## $(enclaveName) Objects ######## - -trusted/$(enclaveName)_t.c: $(SGX_EDGER8R) ./trusted/$(enclaveName).edl - @cd ./trusted && $(SGX_EDGER8R) --trusted ../trusted/$(enclaveName).edl --search-path ../trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -trusted/$(enclaveName)_t.o: ./trusted/$(enclaveName)_t.c - @$(CC) $($(EnclaveName)_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -trusted/%.o: trusted/%.c - @$(CC) $($(EnclaveName)_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -$(enclaveName).so: trusted/$(enclaveName)_t.o $($(EnclaveName)_C_Objects) - @$(CXX) $^ -o $@ $($(EnclaveName)_Link_Flags) - @echo "LINK => $@" - -$(enclaveName).signed.so: $(enclaveName).so - @$(SGX_ENCLAVE_SIGNER) sign -key trusted/$(enclaveName)_private.pem -enclave $(enclaveName).so -out $@ -config trusted/$(enclaveName).config.xml - @echo "SIGN => $@" -clean: - @rm -f $(enclaveName).* trusted/$(enclaveName)_t.* $($(EnclaveName)_C_Objects) diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_u.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_u.mk deleted file mode 100644 index d4079d1055..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_u.mk +++ /dev/null @@ -1,126 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 -UNTRUSTED_DIR=untrusted - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -ifneq ($(SGX_MODE), HW) - Urts_Library_Name := sgx_urts_sim -else - Urts_Library_Name := sgx_urts -endif - -App_C_Files := $(UNTRUSTED_DIR)/sample.c -App_Include_Paths := -IInclude -I$(UNTRUSTED_DIR) -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Link_Flags := $(SGX_COMMON_CFLAGS) -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) -lpthread - -ifneq ($(SGX_MODE), HW) - App_Link_Flags += -lsgx_uae_service_sim -else - App_Link_Flags += -lsgx_uae_service -endif - -App_C_Objects := $(App_C_Files:.c=.o) - - - -ifeq ($(SGX_MODE), HW) -ifneq ($(SGX_DEBUG), 1) -ifneq ($(SGX_PRERELEASE), 1) -Build_Mode = HW_RELEASE -endif -endif -endif - - -.PHONY: all run - -ifeq ($(Build_Mode), HW_RELEASE) -all: sample - @echo "Build sample [$(Build_Mode)|$(SGX_ARCH)] success!" - @echo - @echo "*********************************************************************************************************************************************************" - @echo "PLEASE NOTE: In this mode, please sign the $(enclaveName).so first using Two Step Sign mechanism before you run the app to launch and access the enclave." - @echo "*********************************************************************************************************************************************************" - @echo - -else -all: sample -endif - -run: all -ifneq ($(Build_Mode), HW_RELEASE) - @$(CURDIR)/sample - @echo "RUN => sample [$(SGX_MODE)|$(SGX_ARCH), OK]" -endif - -######## App Objects ######## - -$(UNTRUSTED_DIR)/$(enclaveName)_u.c: $(SGX_EDGER8R) trusted/$(enclaveName).edl - @cd $(UNTRUSTED_DIR) && $(SGX_EDGER8R) --untrusted ../trusted/$(enclaveName).edl --search-path ../trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(UNTRUSTED_DIR)/$(enclaveName)_u.o: $(UNTRUSTED_DIR)/$(enclaveName)_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -$(UNTRUSTED_DIR)/%.o: $(UNTRUSTED_DIR)/%.c - @$(CXX) $(App_C_Flags) -c $< -o $@ - @echo "CXX <= $<" - -sample: $(UNTRUSTED_DIR)/$(enclaveName)_u.o $(App_C_Objects) - @$(CXX) $^ -o $@ $(App_Link_Flags) - @echo "LINK => $@" - - -.PHONY: clean - -clean: - @rm -f sample $(App_C_Objects) $(UNTRUSTED_DIR)/$(enclaveName)_u.* diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_u.without_app.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_u.without_app.mk deleted file mode 100644 index 82fcf5943d..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/c/sgx_u.without_app.mk +++ /dev/null @@ -1,70 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 -UNTRUSTED_DIR=untrusted - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -App_Include_Paths := -IInclude -I$(UNTRUSTED_DIR) -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - - -.PHONY: all run - -all: $(UNTRUSTED_DIR)/$(enclaveName)_u.o - -######## App Objects ######## - -$(UNTRUSTED_DIR)/$(enclaveName)_u.c: $(SGX_EDGER8R) trusted/$(enclaveName).edl - @mkdir -p $(UNTRUSTED_DIR) - @cd $(UNTRUSTED_DIR) && $(SGX_EDGER8R) --untrusted ../trusted/$(enclaveName).edl --search-path ../trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(UNTRUSTED_DIR)/$(enclaveName)_u.o: $(UNTRUSTED_DIR)/$(enclaveName)_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -.PHONY: clean - -clean: - @rm -f $(UNTRUSTED_DIR)/$(enclaveName)_u.* diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/common/Makefile b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/common/Makefile deleted file mode 100644 index 3defedc4c8..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/makefiles/common/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: - $(MAKE) -f sgx_u.mk all - $(MAKE) -f sgx_t.mk all - -clean: - $(MAKE) -f sgx_u.mk clean - $(MAKE) -f sgx_t.mk clean - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.config.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.config.xml deleted file mode 100644 index 1b2f224567..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.config.xml +++ /dev/null @@ -1,9 +0,0 @@ - - 0 - 0 - 0x40000 - 0x100000 - 10 - 1 - 0 - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.cpp b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.cpp deleted file mode 100644 index 78f55c1553..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include -#include /* vsnprintf */ - -#include "$(enclaveName).h" -#include "$(enclaveName)_t.h" /* print_string */ - -/* - * printf: - * Invokes OCALL to display the enclave buffer to the terminal. - */ -void printf(const char *fmt, ...) -{ - char buf[BUFSIZ] = {'\0'}; - va_list ap; - va_start(ap, fmt); - vsnprintf(buf, BUFSIZ, fmt, ap); - va_end(ap); - ocall_$(enclaveName)_sample(buf); -} - -int ecall_$(enclaveName)_sample() -{ - printf("IN $(ENCLAVENAME)\n"); - return 0; -} - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.edl b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.edl deleted file mode 100644 index e97f447eb3..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.edl +++ /dev/null @@ -1,18 +0,0 @@ -/* $(enclaveName).edl - Top EDL file. */ - -enclave { - - /* - * ocall_$(enclaveName)_sample - invokes OCALL to display string buffer inside the enclave. - * [in]: copy the string buffer to App outside. - * [string]: specifies 'str' is a NULL terminated buffer. - */ - untrusted { - void ocall_$(enclaveName)_sample([in, string] const char *str); - }; - - - trusted { - public int ecall_$(enclaveName)_sample(); - }; -}; diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.h b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.h deleted file mode 100644 index 2d29332f3f..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _$(ENCLAVENAME)_H_ -#define _$(ENCLAVENAME)_H_ - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -void printf(const char *fmt, ...); - -#if defined(__cplusplus) -} -#endif - -#endif /* !_$(ENCLAVENAME)_H_ */ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.lds b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.lds deleted file mode 100644 index 9019f79f5d..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1.lds +++ /dev/null @@ -1,9 +0,0 @@ -$(enclaveName).so -{ - global: - g_global_data_sim; - g_global_data; - $(enclaveName)_entry; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_minimal.cpp b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_minimal.cpp deleted file mode 100644 index 79700c42b7..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_minimal.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "$(enclaveName)_t.h" /* print_string */ - -int ecall_$(enclaveName)_sample() -{ - return 0; -} - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_minimal.edl b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_minimal.edl deleted file mode 100644 index f332f81910..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_minimal.edl +++ /dev/null @@ -1,10 +0,0 @@ -/* $(enclaveName).edl - Top EDL file. */ - -enclave { - untrusted { - }; - - trusted { - public int ecall_$(enclaveName)_sample(); - }; -}; diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_private.pem b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_private.pem deleted file mode 100644 index 529d07be35..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/trusted/Enclave1_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4gIBAAKCAYEAroOogvsj/fZDZY8XFdkl6dJmky0lRvnWMmpeH41Bla6U1qLZ -AmZuyIF+mQC/cgojIsrBMzBxb1kKqzATF4+XwPwgKz7fmiddmHyYz2WDJfAjIveJ -ZjdMjM4+EytGlkkJ52T8V8ds0/L2qKexJ+NBLxkeQLfV8n1mIk7zX7jguwbCG1Pr -nEMdJ3Sew20vnje+RsngAzdPChoJpVsWi/K7cettX/tbnre1DL02GXc5qJoQYk7b -3zkmhz31TgFrd9VVtmUGyFXAysuSAb3EN+5VnHGr0xKkeg8utErea2FNtNIgua8H -ONfm9Eiyaav1SVKzPHlyqLtcdxH3I8Wg7yqMsaprZ1n5A1v/levxnL8+It02KseD -5HqV4rf/cImSlCt3lpRg8U5E1pyFQ2IVEC/XTDMiI3c+AR+w2jSRB3Bwn9zJtFlW -KHG3m1xGI4ck+Lci1JvWWLXQagQSPtZTsubxTQNx1gsgZhgv1JHVZMdbVlAbbRMC -1nSuJNl7KPAS/VfzAgEDAoIBgHRXxaynbVP5gkO0ug6Qw/E27wzIw4SmjsxG6Wpe -K7kfDeRskKxESdsA/xCrKkwGwhcx1iIgS5+Qscd1Yg+1D9X9asd/P7waPmWoZd+Z -AhlKwhdPsO7PiF3e1AzHhGQwsUTt/Y/aSI1MpHBvy2/s1h9mFCslOUxTmWw0oj/Q -ldIEgWeNR72CE2+jFIJIyml6ftnb6qzPiga8Bm48ubKh0kvySOqnkmnPzgh+JBD6 -JnBmtZbfPT97bwTT+N6rnPqOOApvfHPf15kWI8yDbprG1l4OCUaIUH1AszxLd826 -5IPM+8gINLRDP1MA6azECPjTyHXhtnSIBZCyWSVkc05vYmNXYUNiXWMajcxW9M02 -wKzFELO8NCEAkaTPxwo4SCyIjUxiK1LbQ9h8PSy4c1+gGP4LAMR8xqP4QKg6zdu9 -osUGG/xRe/uufgTBFkcjqBHtK5L5VI0jeNIUAgW/6iNbYXjBMJ0GfauLs+g1VsOm -WfdgXzsb9DYdMa0OXXHypmV4GwKBwQDUwQj8RKJ6c8cT4vcWCoJvJF00+RFL+P3i -Gx2DLERxRrDa8AVGfqaCjsR+3vLgG8V/py+z+dxZYSqeB80Qeo6PDITcRKoeAYh9 -xlT3LJOS+k1cJcEmlbbO2IjLkTmzSwa80fWexKu8/Xv6vv15gpqYl1ngYoqJM3pd -vzmTIOi7MKSZ0WmEQavrZj8zK4endE3v0eAEeQ55j1GImbypSf7Idh7wOXtjZ7WD -Dg6yWDrri+AP/L3gClMj8wsAxMV4ZR8CgcEA0fzDHkFa6raVOxWnObmRoDhAtE0a -cjUj976NM5yyfdf2MrKy4/RhdTiPZ6b08/lBC/+xRfV3xKVGzacm6QjqjZrUpgHC -0LKiZaMtccCJjLtPwQd0jGQEnKfMFaPsnhOc5y8qVkCzVOSthY5qhz0XNotHHFmJ -gffVgB0iqrMTvSL7IA2yqqpOqNRlhaYhNl8TiFP3gIeMtVa9rZy31JPgT2uJ+kfo -gV7sdTPEjPWZd7OshGxWpT6QfVDj/T9T7L6tAoHBAI3WBf2DFvxNL2KXT2QHAZ9t -k3imC4f7U+wSE6zILaDZyzygA4RUbwG0gv8/TJVn2P/Eynf76DuWHGlaiLWnCbSz -Az2DHBQBBaku409zDQym3j1ugMRjzzSQWzJg0SIyBH3hTmnYcn3+Uqcp/lEBvGW6 -O+rsXFt3pukqJmIV8HzLGGaLm62BHUeZf3dyWm+i3p/hQAL7Xvu04QW70xuGqdr5 -afV7p5eaeQIJXyGQJ0eylV/90+qxjMKiB1XYg6WYvwKBwQCL/ddpgOdHJGN8uRom -e7Zq0Csi3hGheMKlKbN3vcxT5U7MdyHtTZZOJbTvxKNNUNYH/8uD+PqDGNneb29G -BfGzvI3EASyLIcGZF3OhKwZd0jUrWk2y7Vhob91jwp2+t73vdMbkKyI4mHOuXvGv -fg95si9oO7EBT+Oqvhccd2J+F1IVXncccYnF4u5ZGWt5lLewN/pVr7MjjykeaHqN -t+rfnQam2psA6fL4zS2zTmZPzR2tnY8Y1GBTi0Ko1OKd1HMCgcAb5cB/7/AQlhP9 -yQa04PLH9ygQkKKptZp7dy5WcWRx0K/hAHRoi2aw1wZqfm7VBNu2SLcs90kCCCxp -6C5sfJi6b8NpNbIPC+sc9wsFr7pGo9SFzQ78UlcWYK2Gu2FxlMjonhka5hvo4zvg -WxlpXKEkaFt3gLd92m/dMqBrHfafH7VwOJY2zT3WIpjwuk0ZzmRg5p0pG/svVQEH -NZmwRwlopysbR69B/n1nefJ84UO50fLh5s5Zr3gBRwbWNZyzhXk= ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/untrusted/sample.cpp b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/untrusted/sample.cpp deleted file mode 100644 index 25d9737f59..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/untrusted/sample.cpp +++ /dev/null @@ -1,247 +0,0 @@ -#include -#include - -#include -#include -#include -#include - -# define MAX_PATH FILENAME_MAX - - -#include -#include "sample.h" - -#include "$(enclaveName)_u.h" - - - -/* Global EID shared by multiple threads */ -sgx_enclave_id_t global_eid = 0; - -typedef struct _sgx_errlist_t { - sgx_status_t err; - const char *msg; - const char *sug; /* Suggestion */ -} sgx_errlist_t; - -/* Error code returned by sgx_create_enclave */ -static sgx_errlist_t sgx_errlist[] = { - { - SGX_ERROR_UNEXPECTED, - "Unexpected error occurred.", - NULL - }, - { - SGX_ERROR_INVALID_PARAMETER, - "Invalid parameter.", - NULL - }, - { - SGX_ERROR_OUT_OF_MEMORY, - "Out of memory.", - NULL - }, - { - SGX_ERROR_ENCLAVE_LOST, - "Power transition occurred.", - "Please refer to the sample \"PowerTransition\" for details." - }, - { - SGX_ERROR_INVALID_ENCLAVE, - "Invalid enclave image.", - NULL - }, - { - SGX_ERROR_INVALID_ENCLAVE_ID, - "Invalid enclave identification.", - NULL - }, - { - SGX_ERROR_INVALID_SIGNATURE, - "Invalid enclave signature.", - NULL - }, - { - SGX_ERROR_OUT_OF_EPC, - "Out of EPC memory.", - NULL - }, - { - SGX_ERROR_NO_DEVICE, - "Invalid Intel(R) SGX device.", - "Please make sure Intel(R) SGX module is enabled in the BIOS, and install Intel(R) SGX driver afterwards." - }, - { - SGX_ERROR_MEMORY_MAP_CONFLICT, - "Memory map conflicted.", - NULL - }, - { - SGX_ERROR_INVALID_METADATA, - "Invalid enclave metadata.", - NULL - }, - { - SGX_ERROR_DEVICE_BUSY, - "Intel(R) SGX device was busy.", - NULL - }, - { - SGX_ERROR_INVALID_VERSION, - "Enclave version was invalid.", - NULL - }, - { - SGX_ERROR_INVALID_ATTRIBUTE, - "Enclave was not authorized.", - NULL - }, - { - SGX_ERROR_ENCLAVE_FILE_ACCESS, - "Can't open enclave file.", - NULL - }, -}; - -/* Check error conditions for loading enclave */ -void print_error_message(sgx_status_t ret) -{ - size_t idx = 0; - size_t ttl = sizeof sgx_errlist/sizeof sgx_errlist[0]; - - for (idx = 0; idx < ttl; idx++) { - if(ret == sgx_errlist[idx].err) { - if(NULL != sgx_errlist[idx].sug) - printf("Info: %s\n", sgx_errlist[idx].sug); - printf("Error: %s\n", sgx_errlist[idx].msg); - break; - } - } - - if (idx == ttl) - printf("Error: Unexpected error occurred.\n"); -} - -/* Initialize the enclave: - * Step 1: retrive the launch token saved by last transaction - * Step 2: call sgx_create_enclave to initialize an enclave instance - * Step 3: save the launch token if it is updated - */ -int initialize_enclave(void) -{ - char token_path[MAX_PATH] = {'\0'}; - sgx_launch_token_t token = {0}; - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - int updated = 0; - /* Step 1: retrive the launch token saved by last transaction */ - - /* try to get the token saved in $HOME */ - const char *home_dir = getpwuid(getuid())->pw_dir; - if (home_dir != NULL && - (strlen(home_dir)+strlen("/")+sizeof(TOKEN_FILENAME)+1) <= MAX_PATH) { - /* compose the token path */ - strncpy(token_path, home_dir, strlen(home_dir)); - strncat(token_path, "/", strlen("/")); - strncat(token_path, TOKEN_FILENAME, sizeof(TOKEN_FILENAME)+1); - } else { - /* if token path is too long or $HOME is NULL */ - strncpy(token_path, TOKEN_FILENAME, sizeof(TOKEN_FILENAME)); - } - - FILE *fp = fopen(token_path, "rb"); - if (fp == NULL && (fp = fopen(token_path, "wb")) == NULL) { - printf("Warning: Failed to create/open the launch token file \"%s\".\n", token_path); - } - printf("token_path: %s\n", token_path); - if (fp != NULL) { - /* read the token from saved file */ - size_t read_num = fread(token, 1, sizeof(sgx_launch_token_t), fp); - if (read_num != 0 && read_num != sizeof(sgx_launch_token_t)) { - /* if token is invalid, clear the buffer */ - memset(&token, 0x0, sizeof(sgx_launch_token_t)); - printf("Warning: Invalid launch token read from \"%s\".\n", token_path); - } - } - - /* Step 2: call sgx_create_enclave to initialize an enclave instance */ - /* Debug Support: set 2nd parameter to 1 */ - - ret = sgx_create_enclave($(ENCLAVENAME)_FILENAME, SGX_DEBUG_FLAG, &token, &updated, &global_eid, NULL); - - if (ret != SGX_SUCCESS) { - print_error_message(ret); - if (fp != NULL) fclose(fp); - - return -1; - } - - /* Step 3: save the launch token if it is updated */ - - if (updated == FALSE || fp == NULL) { - /* if the token is not updated, or file handler is invalid, do not perform saving */ - if (fp != NULL) fclose(fp); - return 0; - } - - /* reopen the file with write capablity */ - fp = freopen(token_path, "wb", fp); - if (fp == NULL) return 0; - size_t write_num = fwrite(token, 1, sizeof(sgx_launch_token_t), fp); - if (write_num != sizeof(sgx_launch_token_t)) - printf("Warning: Failed to save launch token to \"%s\".\n", token_path); - fclose(fp); - - return 0; -} - -/* OCall functions */ -void ocall_$(enclaveName)_sample(const char *str) -{ - /* Proxy/Bridge will check the length and null-terminate - * the input string to prevent buffer overflow. - */ - printf("%s", str); -} - - -/* Application entry */ -int SGX_CDECL main(int argc, char *argv[]) -{ - (void)(argc); - (void)(argv); - - /* Changing dir to where the executable is.*/ - char absolutePath [MAX_PATH]; - char *ptr = NULL; - - ptr = realpath(dirname(argv[0]),absolutePath); - - if( chdir(absolutePath) != 0) - abort(); - - /* Initialize the enclave */ - if(initialize_enclave() < 0){ - - return -1; - } - - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - int ecall_return = 0; - - ret = ecall_$(enclaveName)_sample(global_eid, &ecall_return); - if (ret != SGX_SUCCESS) - abort(); - - if (ecall_return == 0) { - printf("Application ran with success\n"); - } - else - { - printf("Application failed %d \n", ecall_return); - } - - sgx_destroy_enclave(global_eid); - - return ecall_return; -} diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/untrusted/sample.h b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/untrusted/sample.h deleted file mode 100644 index a0fb5e780e..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXEnclave/untrusted/sample.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _APP_H_ -#define _APP_H_ - -#include -#include -#include -#include - -#include "sgx_error.h" /* sgx_status_t */ -#include "sgx_eid.h" /* sgx_enclave_id_t */ - -#ifndef TRUE -# define TRUE 1 -#endif - -#ifndef FALSE -# define FALSE 0 -#endif - - -# define TOKEN_FILENAME "enclave.token" -# define $(ENCLAVENAME)_FILENAME "$(enclaveName).signed.so" - -extern sgx_enclave_id_t global_eid; /* global enclave id */ - -#if defined(__cplusplus) -extern "C" { -#endif - -#if defined(__cplusplus) -} -#endif - -#endif /* !_APP_H_ */ diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXNature/Makefile b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXNature/Makefile deleted file mode 100644 index 5a67151653..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXNature/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -ALL_UNTRUSTED_MK=$(shell find . -name '*sgx_u.mk') -ALL_TRUSTED_MK=$(shell find . -name '*sgx_t.mk') -ALL_STATIC_MK=$(shell find . -name '*sgx_t_static.mk') - - - -.PHONY: all clean run - - -all clean: - $(foreach U_MK, $(ALL_UNTRUSTED_MK), $(MAKE) -C $(shell dirname $(U_MK)) -f $(shell basename $(U_MK)) $@;) - $(foreach T_MK, $(ALL_TRUSTED_MK), $(MAKE) -C $(shell dirname $(T_MK)) -f $(shell basename $(T_MK)) $@;) - $(foreach U_MK, $(ALL_STATIC_MK), $(MAKE) -C $(shell dirname $(U_MK)) -f $(shell basename $(U_MK)) $@;) - -run: - $(foreach U_MK, $(ALL_UNTRUSTED_MK), $(MAKE) -C $(shell dirname $(U_MK)) -f $(shell basename $(U_MK)) $@;) - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c++/sgx_t_static.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c++/sgx_t_static.mk deleted file mode 100644 index bd24da045b..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c++/sgx_t_static.mk +++ /dev/null @@ -1,105 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif - -Crypto_Library_Name := sgx_tcrypto - -$(EnclaveName)_Cpp_Files := static_trusted/$(enclaveName).cpp -$(EnclaveName)_C_Files := -$(EnclaveName)_Include_Paths := -IInclude -I$(EnclaveName) -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx - -Flags_Just_For_C := -Wno-implicit-function-declaration -std=c11 -Common_C_Cpp_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $($(EnclaveName)_Include_Paths) -fno-builtin-printf -I. -$(EnclaveName)_C_Flags := $(Flags_Just_For_C) $(Common_C_Cpp_Flags) -$(EnclaveName)_Cpp_Flags := $(Common_C_Cpp_Flags) -std=c++11 -nostdinc++ -fno-builtin-printf -I. - -$(EnclaveName)_Cpp_Flags := $($(EnclaveName)_Cpp_Flags) -fno-builtin-printf - -$(EnclaveName)_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 \ - -Wl,--version-script=trusted/$(enclaveName).lds - - -$(EnclaveName)_Cpp_Objects := $($(EnclaveName)_Cpp_Files:.cpp=.o) -$(EnclaveName)_C_Objects := $($(EnclaveName)_C_Files:.c=.o) - -ifeq ($(SGX_MODE), HW) -ifneq ($(SGX_DEBUG), 1) -ifneq ($(SGX_PRERELEASE), 1) -Build_Mode = HW_RELEASE -endif -endif -endif - - -.PHONY: all run - -all: lib$(enclaveName).sgx.static.lib.a - -######## $(enclaveName) Objects ######## - -static_trusted/$(enclaveName)_t.h: $(SGX_EDGER8R) ./static_trusted/$(enclaveName).edl - @cd ./static_trusted && $(SGX_EDGER8R) --header-only --trusted ../static_trusted/$(enclaveName).edl --search-path ../static_trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -static_trusted/$(enclaveName)_t.o: ./trusted/$(enclaveName)_t.c - @$(CC) $($(EnclaveName)_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -static_trusted/%.o: static_trusted/%.cpp - @$(CXX) $($(EnclaveName)_Include_Paths) $($(EnclaveName)_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -static_trusted/%.o: static_trusted/%.c - @$(CC) $($(EnclaveName)_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -lib$(enclaveName).sgx.static.lib.a: static_trusted/$(enclaveName)_t.h $($(EnclaveName)_Cpp_Objects) $($(EnclaveName)_C_Objects) - ar rcs lib$(enclaveName).sgx.static.lib.a $($(EnclaveName)_Cpp_Objects) $($(EnclaveName)_C_Objects) - @echo "LINK => $@" - -clean: - @rm -f $(enclaveName).* static_trusted/$(enclaveName)_t.* $($(EnclaveName)_Cpp_Objects) $($(EnclaveName)_C_Objects) diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c++/sgx_u.without_app.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c++/sgx_u.without_app.mk deleted file mode 100644 index 0603b3c51e..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c++/sgx_u.without_app.mk +++ /dev/null @@ -1,71 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 -UNTRUSTED_DIR=untrusted - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -App_Include_Paths := -IInclude -I$(UNTRUSTED_DIR) -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 - -.PHONY: all run - -all: $(UNTRUSTED_DIR)/$(enclaveName)_u.o - -######## App Objects ######## - -$(UNTRUSTED_DIR)/$(enclaveName)_u.c: $(SGX_EDGER8R) static_trusted/$(enclaveName).edl - @mkdir -p $(UNTRUSTED_DIR) - @cd $(UNTRUSTED_DIR) && $(SGX_EDGER8R) --untrusted ../static_trusted/$(enclaveName).edl --search-path ../static_trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(UNTRUSTED_DIR)/$(enclaveName)_u.o: $(UNTRUSTED_DIR)/$(enclaveName)_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -.PHONY: clean - -clean: - @rm -f $(UNTRUSTED_DIR)/$(enclaveName)_u.* diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c/sgx_t_static.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c/sgx_t_static.mk deleted file mode 100644 index 84f202e843..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c/sgx_t_static.mk +++ /dev/null @@ -1,95 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif - -Crypto_Library_Name := sgx_tcrypto - -$(EnclaveName)_C_Files := static_trusted/$(enclaveName).c -$(EnclaveName)_Include_Paths := -IInclude -I$(EnclaveName) -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx - -Flags_Just_For_C := -Wno-implicit-function-declaration -std=c11 -Common_C_Cpp_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $($(EnclaveName)_Include_Paths) -fno-builtin-printf -I. -$(EnclaveName)_C_Flags := $(Flags_Just_For_C) $(Common_C_Cpp_Flags) - -$(EnclaveName)_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 \ - -Wl,--version-script=trusted/$(enclaveName).lds - -$(EnclaveName)_C_Objects := $($(EnclaveName)_C_Files:.c=.o) - -ifeq ($(SGX_MODE), HW) -ifneq ($(SGX_DEBUG), 1) -ifneq ($(SGX_PRERELEASE), 1) -Build_Mode = HW_RELEASE -endif -endif -endif - - -.PHONY: all run - -all: lib$(enclaveName).sgx.static.lib.a - -######## $(enclaveName) Objects ######## - -static_trusted/$(enclaveName)_t.h: $(SGX_EDGER8R) ./static_trusted/$(enclaveName).edl - @cd ./static_trusted && $(SGX_EDGER8R) --header-only --trusted ../static_trusted/$(enclaveName).edl --search-path ../static_trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -static_trusted/$(enclaveName)_t.o: ./trusted/$(enclaveName)_t.c - @$(CC) $($(EnclaveName)_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -static_trusted/%.o: static_trusted/%.c - @$(CC) $($(EnclaveName)_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -lib$(enclaveName).sgx.static.lib.a: static_trusted/$(enclaveName)_t.h $($(EnclaveName)_C_Objects) - ar rcs lib$(enclaveName).sgx.static.lib.a $($(EnclaveName)_Cpp_Objects) $($(EnclaveName)_C_Objects) - @echo "LINK => $@" - -clean: - @rm -f $(enclaveName).* static_trusted/$(enclaveName)_t.* $($(EnclaveName)_C_Objects) diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c/sgx_u.without_app.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c/sgx_u.without_app.mk deleted file mode 100644 index e82817f599..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/c/sgx_u.without_app.mk +++ /dev/null @@ -1,70 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 -UNTRUSTED_DIR=untrusted - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -App_Include_Paths := -IInclude -I$(UNTRUSTED_DIR) -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - - -.PHONY: all run - -all: $(UNTRUSTED_DIR)/$(enclaveName)_u.o - -######## App Objects ######## - -$(UNTRUSTED_DIR)/$(enclaveName)_u.c: $(SGX_EDGER8R) static_trusted/$(enclaveName).edl - @mkdir -p $(UNTRUSTED_DIR) - @cd $(UNTRUSTED_DIR) && $(SGX_EDGER8R) --untrusted ../static_trusted/$(enclaveName).edl --search-path ../static_trusted --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(UNTRUSTED_DIR)/$(enclaveName)_u.o: $(UNTRUSTED_DIR)/$(enclaveName)_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -.PHONY: clean - -clean: - @rm -f $(UNTRUSTED_DIR)/$(enclaveName)_u.* diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/common/Makefile b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/common/Makefile deleted file mode 100644 index 3defedc4c8..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/common/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -all: - $(MAKE) -f sgx_u.mk all - $(MAKE) -f sgx_t.mk all - -clean: - $(MAKE) -f sgx_u.mk clean - $(MAKE) -f sgx_t.mk clean - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/common/Makefile.without_app b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/common/Makefile.without_app deleted file mode 100644 index 28aa5c8f1e..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/makefiles/common/Makefile.without_app +++ /dev/null @@ -1,8 +0,0 @@ -all: - $(MAKE) -f sgx_u.mk all - $(MAKE) -f sgx_t_static.mk all - -clean: - $(MAKE) -f sgx_u.mk clean - $(MAKE) -f sgx_t.mk clean - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/static_trusted/Enclave2_minimal.cpp b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/static_trusted/Enclave2_minimal.cpp deleted file mode 100644 index 79700c42b7..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/static_trusted/Enclave2_minimal.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "$(enclaveName)_t.h" /* print_string */ - -int ecall_$(enclaveName)_sample() -{ - return 0; -} - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/static_trusted/Enclave2_minimal.edl b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/static_trusted/Enclave2_minimal.edl deleted file mode 100644 index 7af749e545..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXTrustedStaticLibrary/static_trusted/Enclave2_minimal.edl +++ /dev/null @@ -1,11 +0,0 @@ -/* $(enclaveName).edl - Top EDL file. */ - -enclave { - - untrusted { - }; - - trusted { - public int ecall_$(enclaveName)_sample(); - }; -}; diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/c++/sgx_u.without_app.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/c++/sgx_u.without_app.mk deleted file mode 100644 index f4945a4d61..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/c++/sgx_u.without_app.mk +++ /dev/null @@ -1,75 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 -UNTRUSTED_DIR=untrusted -SGX_EDL_FILE := $(baseName).edl - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -App_Include_Paths := -IInclude -I$(UNTRUSTED_DIR) -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 - -.PHONY: all run - -all: $(UNTRUSTED_DIR)/$(baseName)_u.o $(UNTRUSTED_DIR)/$(baseName).o - -######## App Objects ######## - -$(UNTRUSTED_DIR)/$(baseName)_u.c: $(SGX_EDGER8R) $(SGX_EDL_FILE) - @mkdir -p $(UNTRUSTED_DIR) && cd $(UNTRUSTED_DIR) && $(SGX_EDGER8R) --untrusted $(SGX_EDL_FILE) --search-path .. --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(UNTRUSTED_DIR)/$(baseName)_u.o: $(UNTRUSTED_DIR)/$(baseName)_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -$(UNTRUSTED_DIR)/$(baseName).o: $(UNTRUSTED_DIR)/$(baseName).cpp - @$(CC) $(App_Cpp_Flags) -c $< -o $@ - @echo "CC <= $<" - -.PHONY: clean - -clean: - @rm -f $(UNTRUSTED_DIR)/$(baseName)_u.* $(UNTRUSTED_DIR)/$(baseName).o diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/c/sgx_u.without_app.mk b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/c/sgx_u.without_app.mk deleted file mode 100644 index 717d15f15c..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/c/sgx_u.without_app.mk +++ /dev/null @@ -1,75 +0,0 @@ -######## Intel(R) SGX SDK Settings ######## -SGX_SDK ?= $(SdkPathFromPlugin) -SGX_MODE ?= SIM -SGX_ARCH ?= x64 -UNTRUSTED_DIR=untrusted -SGX_EDL_FILE := $(baseName).edl - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -App_Include_Paths := -IInclude -I$(UNTRUSTED_DIR) -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 - -.PHONY: all run - -all: $(UNTRUSTED_DIR)/$(baseName)_u.o $(UNTRUSTED_DIR)/$(baseName).o - -######## App Objects ######## - -$(UNTRUSTED_DIR)/$(baseName)_u.c: $(SGX_EDGER8R) $(SGX_EDL_FILE) - @mkdir -p $(UNTRUSTED_DIR) && cd $(UNTRUSTED_DIR) && $(SGX_EDGER8R) --untrusted $(SGX_EDL_FILE) --search-path .. --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(UNTRUSTED_DIR)/$(baseName)_u.o: $(UNTRUSTED_DIR)/$(baseName)_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -$(UNTRUSTED_DIR)/$(baseName).o: $(UNTRUSTED_DIR)/$(baseName).c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -.PHONY: clean - -clean: - @rm -f $(UNTRUSTED_DIR)/$(baseName)_u.* $(UNTRUSTED_DIR)/$(baseName).o diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/common/Makefile b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/common/Makefile deleted file mode 100644 index af0747ec6d..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/makefiles/common/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -all: - $(MAKE) -f sgx_u.mk all - -clean: - $(MAKE) -f sgx_u.mk clean - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/untrusted/untrusted_module.cpp b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/untrusted/untrusted_module.cpp deleted file mode 100644 index f4d2acdc38..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/plugins/com.intel.sgx/templates/sgx/SGXUntrustedModule/untrusted/untrusted_module.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "$(baseName)_u.h" diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/sites/site.xml b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/sites/site.xml deleted file mode 100644 index 2883e3e2ed..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/build_directory/sites/site.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - This website hosts an evaluation version of the Eclipse Plug-in developed for Secure Guard Extensions Application development for Linux platforms. - - - - - - Intel(R) SGX Eclipse Plugin 1.0.1.qualifier - - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/clean.sh b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/clean.sh deleted file mode 100755 index ba0f7bc78a..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/clean.sh +++ /dev/null @@ -1,20 +0,0 @@ -# clean input directories to make sure there's nothing left from previous run - -rm -rfv ./build_directory/features/com.intel.sgx.build.driver -rm -fv build_directory/*.properties -rm -fv build_directory/*.xml -rm -fv build_directory/plugins/com.intel.sgx/build.xml -rm -fv build_directory/plugins/com.intel.sgx.userguide/build.xml -rm -rfv build_directory/plugins/com.intel.sgx/bin -rm -rfv build_directory/plugins/com.intel.sgx.userguide/bin -rm -rfv build_directory/plugins/com.intel.sgx.source_1.0.0.* -rm -rfv build_directory/features/com.intel.sgx.source -rm -fv build_directory/features/com.intel.sgx.feature/build.xml -rm -fv build_directory/features/com.intel.sgx.feature/*.zip -rm -rfv build_directory/nestedJars -rm -rfv build_directory/updatesite/sgx-eclipse-plugin -find . -name "*.zip" ! -name "eclipse_mars.v4.5.1_x64.zip" | xargs rm -rfv -find . -name "javaCompiler*" | xargs rm -rfv -find . -name "@*" | xargs rm -rfv -find build_directory -maxdepth 1 -mindepth 1 | grep -v "features" | grep -v "plugins" | grep -v "sites" | grep -v "updatesite" | xargs rm -frv - diff --git a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/readme.txt b/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/readme.txt deleted file mode 100644 index a767f8ca32..0000000000 --- a/sgx-jvm/linux-sgx/Linux_SGXEclipsePlugin/readme.txt +++ /dev/null @@ -1,22 +0,0 @@ -The eclipse plugin build from command line requires the following variables to be set. - -$ECLIPSE_HOME - Path to eclipse home. In order to build the plugin eclipse needs to be installed. -$RELEASE_ID - The release id for the plugin. The release id should be changed for each source codes updates. -$DELETE_CURRENT_ECLIPSE - Delete current eclipse or not. Generally this variable is set to false. - -The following plugins are pre-requisites to be installed in Eclipse before trying to build the plugin. - -1. Eclipse IDE for C/C++ Developers 4.5.1.20150917-1200 (tested_version) -2. Eclipse PDE Plug-in Developer Resources 3.11.1.v20150904-0345 (tested_version) - -run ./build.sh from command line under current directory. -Once the build script is run, the folder build_directory/updatesite/sgx-eclipse-plugin contains the update site. This is the path that needs to be provided to the eclipse while doing installation. - -If the Intel(R) Software Guard Extensions (Intel(R) SGX) eclipse plugin is already installed to eclipse and to build and install a newer version, uninstall the old version and start eclipse with the -clean option. -Then try to build the new version of the plugin and install it in eclipse. - -http://wiki.eclipse.org/FAQ_How_do_I_remove_a_plug-in%3F - -The plugin has been tested with the following Eclipse ADT version - -Build: v22.3.0-887826 diff --git a/sgx-jvm/linux-sgx/Makefile b/sgx-jvm/linux-sgx/Makefile deleted file mode 100644 index 5900ab2f5d..0000000000 --- a/sgx-jvm/linux-sgx/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -include buildenv.mk -.PHONY: all psw sdk clean rebuild sdk_install_pkg psw_install_pkg - -all: sdk psw - -psw: sdk - $(MAKE) -C psw/ USE_OPT_LIBS=$(USE_OPT_LIBS) - -sdk: - $(MAKE) -C sdk/ USE_OPT_LIBS=$(USE_OPT_LIBS) - -# Generate SE SDK Install package -sdk_install_pkg: sdk - ./linux/installer/bin/build-installpkg.sh sdk - -psw_install_pkg: psw - ./linux/installer/bin/build-installpkg.sh psw - -clean: - @$(MAKE) -C sdk/ clean - @$(MAKE) -C psw/ clean - @$(RM) -r $(ROOT_DIR)/build - @$(RM) -r linux/installer/bin/sgx_linux*.bin - @$(RM) -rf linux/installer/common/psw/output - @$(RM) -rf linux/installer/common/psw/gen_source.py - @$(RM) -rf linux/installer/common/sdk/output - @$(RM) -rf linux/installer/common/sdk/pkgconfig/x64 - @$(RM) -rf linux/installer/common/sdk/pkgconfig/x86 - @$(RM) -rf linux/installer/common/sdk/gen_source.py - -rebuild: - $(MAKE) clean - $(MAKE) all diff --git a/sgx-jvm/linux-sgx/README.md b/sgx-jvm/linux-sgx/README.md deleted file mode 100644 index 948d0f5104..0000000000 --- a/sgx-jvm/linux-sgx/README.md +++ /dev/null @@ -1,236 +0,0 @@ -Intel(R) Software Guard Extensions for Linux\* OS -================================================ - -# linux-sgx - -Introduction ------------- -Intel(R) Software Guard Extensions (Intel(R) SGX) is an Intel technology for application developers seeking to protect select code and data from disclosure or modification. - -The Linux\* Intel(R) SGX software stack is comprised of the Intel(R) SGX driver, the Intel(R) SGX SDK, and the Intel(R) SGX Platform Software (PSW). The Intel(R) SGX SDK and Intel(R) SGX PSW are hosted in the [linux-sgx](https://github.com/01org/linux-sgx) project. - -The [linux-sgx-driver](https://github.com/01org/linux-sgx-driver) project hosts the out-of-tree driver for the Linux\* Intel(R) SGX software stack, which will be used until the driver upstreaming process is complete. - -License -------- -See [License.txt](License.txt) for details. - -Contributing -------- -See [CONTRIBUTING.md](CONTRIBUTING.md) for details. - -Documentation -------------- -- [Intel(R) SGX for Linux\* OS](https://01.org/intel-softwareguard-extensions) project home page on [01.org](https://01.org) -- [Intel(R) SGX Programming Reference](https://software.intel.com/sites/default/files/managed/48/88/329298-002.pdf) - -Build and Install the Intel(R) SGX Driver ------------------------------------------ -Follow the instructions in the [linux-sgx-driver](https://github.com/01org/linux-sgx-driver) project to build and install the Intel(R) SGX driver. - -**Note:** **SGX 2.0** feature support in the SDK and PSW depends on processor and driver support for the SGX 2.0 instruction set. Please consult the README in the driver for instructions on building the SGX 2.0 Linux Driver. Upcoming CPU releases will include hardware support for SGX 2.0. - -Build the Intel(R) SGX SDK and Intel(R) SGX PSW Package -------------------------------------------------------- -### Prerequisites: -- Ensure that you have one of the following required operating systems: - * Ubuntu\* Desktop-16.04-LTS 64bits - * Red Hat Enterprise Linux Server release 7.4 64bits - * CentOS 7.3.1611 64bits - -- Use the following command(s) to install the required tools to build the Intel(R) SGX SDK: - * On Ubuntu 16.04: - ``` - $ sudo apt-get install build-essential ocaml automake autoconf libtool wget python - ``` - * On Red Hat Enterprise Linux 7.4 and CentOS 7.3: - ``` - $ sudo yum groupinstall 'Development Tools' - $ sudo yum install ocaml wget python - ``` -- Use the following command to install additional required tools to build the Intel(R) SGX PSW: - * On Ubuntu 16.04: - ``` - $ sudo apt-get install libssl-dev libcurl4-openssl-dev protobuf-compiler libprotobuf-dev - ``` - * On Red Hat Enterprise Linux 7.4 and CentOS 7.3: - ``` - $ sudo yum install openssl-devel libcurl-devel protobuf-devel - ``` -- Use the script ``download_prebuilt.sh`` inside source code package to download prebuilt binaries to prebuilt folder - You may need set an https proxy for the `wget` tool used by the script (such as ``export https_proxy=http://test-proxy:test-port``) -``` - $ ./download_prebuilt.sh -``` - -### Build the Intel(R) SGX SDK and Intel(R) SGX PSW -The following steps describe how to build the Intel(R) SGX SDK and PSW. You can build the project according to your requirements. -- To build both Intel(R) SGX SDK and PSW with default configuration, enter the following command: -``` - $ make -``` - You can find the tools and libraries generated in the `build/linux` directory. - **Note**: You can also go to the `sdk` folder and use the `make` command to build the Intel(R) SGX SDK component only. However, building the PSW component is dependent on the result of building the Intel(R) SGX SDK. - -- This repository supports to build the Intel(R) SGX SDK based on either precompiled optimized IPP/string/math libraries or open sourced version of SGXSSL/string/math libraries. - The default build uses precompiled optimized libraries, which are downloaded by the script ``./download_prebuilt.sh``. - You can also use the open sourced version implementation instead by entering the following command: -``` - $ make USE_OPT_LIBS=0 -``` - **Note**: Building the Intel(R) SGX PSW with open sourced SGXSSL/string/math libraries is not supported. The above command builds Intel(R) SGX SDK only and the build of PSW part will be skipped. - -- To build Intel(R) SGX SDK and PSW with debug information, enter the following command: -``` - $ make DEBUG=1 -``` -- To clean the files generated by previous `make` command, enter the following command: -``` - $ make clean -``` - -- The build above uses prebuilt Intel(R) Architecture Enclaves(LE/PvE/QE/PCE/PSE-OP/PSE-PR) and applet(PSDA) - the files ``psw/ae/data/prebuilt/libsgx_*.signed.so`` and ``psw/ae/data/prebuilt/PSDA.dalp``, which have been signed by Intel in advance. - To build those enclaves by yourself (without a signature), first you need to build both Intel(R) SGX SDK and PSW with the default configuration. After that, you can build each Architecture Enclave by using the `make` command from the corresponding folder: -``` - $ cd psw/ae/le - $ make -``` - -### Build the Intel(R) SGX SDK Installer -To build the Intel(R) SGX SDK installer, enter the following command: -``` -$ make sdk_install_pkg -``` -You can find the generated Intel(R) SGX SDK installer ``sgx_linux_x64_sdk_${version}.bin`` located under `linux/installer/bin/`, where `${version}` refers to the version number. - -**Note**: The above command builds the Intel(R) SGX SDK with default configuration firstly and then generates the target SDK Installer. To build the Intel(R) SGX SDK Installer with debug information kept in the tools and libraries, enter the following command: -``` -$ make sdk_install_pkg DEBUG=1 -``` - -### Build the Intel(R) SGX PSW Installer -To build the Intel(R) SGX PSW installer, enter the following command: -``` -$ make psw_install_pkg -``` -You can find the generated Intel(R) SGX PSW installer ``sgx_linux_x64_psw_${version}.bin`` located under `linux/installer/bin/`, where `${version}` refers to the version number. - -**Note**: The above command builds the Intel(R) SGX SDK and PSW with default configuration firstly and then generates the target PSW Installer. To build the Intel(R) SGX PSW Installer with debug information kept in the tools and libraries, enter the following command: -``` -$ make psw_install_pkg DEBUG=1 -``` - - -Install the Intel(R) SGX SDK ------------------------- -### Prerequisites -- Ensure that you have one of the following operating systems: - * Ubuntu\* Desktop-16.04-LTS 64bits - * Red Hat Enterprise Linux Server release 7.4 64bits - * CentOS 7.3.1611 64bits -- Use the following command to install the required tool to use Intel(R) SGX SDK: - * On Ubuntu 16.04: - ``` - $ sudo apt-get install build-essential python - ``` - * On Red Hat Enterprise Linux 7.4 and CentOS 7.3: - ``` - $ sudo yum groupinstall 'Development Tools' - $ sudo yum install python - ``` - -### Install the Intel(R) SGX SDK -To install the Intel(R) SGX SDK, invoke the installer, as follows: -``` -$ cd linux/installer/bin -$ ./sgx_linux_x64_sdk_${version}.bin -``` -NOTE: You need to set up the needed environment variables before compiling your code. To do so, run: -``` - $ source ${sgx-sdk-install-path}/environment -``` -### Test the Intel(R) SGX SDK Package with the Code Samples -- Compile and run each code sample in Simulation mode to make sure the package works well: -``` - $ cd SampleCode/LocalAttestation - $ make SGX_MODE=SIM - $ ./app -``` - Use similar commands for other sample codes. - -### Compile and Run the Code Samples in the Hardware Mode -If you use an Intel SGX hardware enabled machine, you can run the code samples in Hardware mode. -Ensure that you install Intel(R) SGX driver and Intel(R) SGX PSW installer on the machine. -See the earlier topic, *Build and Install the Intel(R) SGX Driver*, for information on how to install the Intel(R) SGX driver. -See the later topic, *Install Intel(R) SGX PSW*, for information on how to install the PSW package. -- Compile and run each code sample in Hardware mode, Debug build, as follows: -``` - $ cd SampleCode/LocalAttestation - $ make - $ ./app -``` - Use similar commands for other code samples. - -Install the Intel(R) SGX PSW ----------------------------- -### Prerequisites -- Ensure that you have one of the following operating systems: - * Ubuntu\* Desktop-16.04-LTS 64bits - * Red Hat Enterprise Linux Server release 7.4 64bits - * CentOS 7.3.1611 64bits -- Ensure that you have a system with the following required hardware: - * 6th Generation Intel(R) Core(TM) Processor or newer -- Configure the system with the **Intel SGX hardware enabled** option and install Intel(R) SGX driver in advance. - See the earlier topic, *Build and Install the Intel(R) SGX Driver*, for information on how to install the Intel(R) SGX driver. -- Install the library using the following command: - * On Ubuntu 16.04: - ``` - $ sudo apt-get install libssl-dev libcurl4-openssl-dev libprotobuf-dev - ``` - * On Red Hat Enterprise Linux 7.4 and CentOS 7.3: - ``` - $ sudo yum install openssl-devel libcurl-devel protobuf-devel - ``` -- To use Trusted Platform Service functions: - Ensure `mei_me` driver is enabled and `/dev/mei0` exists. - Download [iclsClient](https://software.intel.com/en-us/sgx-sdk/download) and install it using the following commands: - * On Ubuntu 16.04: - ``` - $ sudo apt-get install alien - $ sudo alien --scripts iclsClient-1.45.449.12-1.x86_64.rpm - $ sudo dpkg -i iclsclient_1.45.449.12-2_amd64.deb - ``` - * On Red Hat Enterprise Linux 7.4 and CentOS 7.3: - ``` - $ sudo yum install iclsClient-1.45.449.12-1.x86_64.rpm - ``` - Download source code from [dynamic-application-loader-host-interface](https://github.com/01org/dynamic-application-loader-host-interface) project. In the source code folder, build and install the `JHI` service using the following commands: - * On Ubuntu 16.04: - ``` - $ sudo apt-get install uuid-dev libxml2-dev cmake pkg-config - $ cmake .;make;sudo make install;sudo systemctl enable jhi - ``` - * On Red Hat Enterprise Linux 7.4 and CentOS 7.3: - ``` - $ sudo yum install libuuid-devel libxml2-devel cmake pkgconfig - $ cmake .;make;sudo make install;sudo ldconfig;sudo systemctl enable jhi - ``` - -### Install the Intel(R) SGX PSW -To install the Intel(R) SGX PSW, invoke the installer with root privilege: -``` -$ cd linux/installer/bin -$ sudo ./sgx_linux_x64_psw_${version}.bin -``` - -### Start or Stop aesmd Service -The Intel(R) SGX PSW installer installs an aesmd service in your machine, which is running in a special linux account `aesmd`. -To stop the service: `$ sudo service aesmd stop` -To start the service: `$ sudo service aesmd start` -To restart the service: `$ sudo service aesmd restart` - -### Configure the Proxy for aesmd Service -The aesmd service uses the HTTP protocol to initialize some services. -If a proxy is required for the HTTP protocol, you may need to manually set up the proxy for the aesmd service. -You should manually edit the file `/etc/aesmd.conf` (refer to the comments in the file) to set the proxy for the aesmd service. -After you configure the proxy, you need to restart the service to enable the proxy. diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.cproject b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.cproject deleted file mode 100644 index 6fff949bc8..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.cproject +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.project b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.project deleted file mode 100644 index 8feb490168..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - Cxx11SGXDemo - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.core.ccnature - com.intel.sgx.sgxnature - - diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.settings/language.settings.xml b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.settings/language.settings.xml deleted file mode 100644 index bb1f9221e3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/.settings/language.settings.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/App.cpp b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/App.cpp deleted file mode 100644 index bc5e7b3e2e..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/App.cpp +++ /dev/null @@ -1,263 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include - -# include -# include -# define MAX_PATH FILENAME_MAX - -#include "sgx_urts.h" -#include "sgx_uae_service.h" -#include "App.h" -#include "Enclave_u.h" - -/* Global EID shared by multiple threads */ -sgx_enclave_id_t global_eid = 0; - -typedef struct _sgx_errlist_t { - sgx_status_t err; - const char *msg; - const char *sug; /* Suggestion */ -} sgx_errlist_t; - -/* Error code returned by sgx_create_enclave */ -static sgx_errlist_t sgx_errlist[] = { - { - SGX_ERROR_UNEXPECTED, - "Unexpected error occurred.", - NULL - }, - { - SGX_ERROR_INVALID_PARAMETER, - "Invalid parameter.", - NULL - }, - { - SGX_ERROR_OUT_OF_MEMORY, - "Out of memory.", - NULL - }, - { - SGX_ERROR_ENCLAVE_LOST, - "Power transition occurred.", - "Please refer to the sample \"PowerTransition\" for details." - }, - { - SGX_ERROR_INVALID_ENCLAVE, - "Invalid enclave image.", - NULL - }, - { - SGX_ERROR_INVALID_ENCLAVE_ID, - "Invalid enclave identification.", - NULL - }, - { - SGX_ERROR_INVALID_SIGNATURE, - "Invalid enclave signature.", - NULL - }, - { - SGX_ERROR_OUT_OF_EPC, - "Out of EPC memory.", - NULL - }, - { - SGX_ERROR_NO_DEVICE, - "Invalid SGX device.", - "Please make sure SGX module is enabled in the BIOS, and install SGX driver afterwards." - }, - { - SGX_ERROR_MEMORY_MAP_CONFLICT, - "Memory map conflicted.", - NULL - }, - { - SGX_ERROR_INVALID_METADATA, - "Invalid enclave metadata.", - NULL - }, - { - SGX_ERROR_DEVICE_BUSY, - "SGX device was busy.", - NULL - }, - { - SGX_ERROR_INVALID_VERSION, - "Enclave version was invalid.", - NULL - }, - { - SGX_ERROR_INVALID_ATTRIBUTE, - "Enclave was not authorized.", - NULL - }, - { - SGX_ERROR_ENCLAVE_FILE_ACCESS, - "Can't open enclave file.", - NULL - }, - { - SGX_ERROR_NDEBUG_ENCLAVE, - "The enclave is signed as product enclave, and can not be created as debuggable enclave.", - NULL - }, -}; - -/* Check error conditions for loading enclave */ -void print_error_message(sgx_status_t ret) -{ - size_t idx = 0; - size_t ttl = sizeof sgx_errlist/sizeof sgx_errlist[0]; - - for (idx = 0; idx < ttl; idx++) { - if(ret == sgx_errlist[idx].err) { - if(NULL != sgx_errlist[idx].sug) - printf("Info: %s\n", sgx_errlist[idx].sug); - printf("Error: %s\n", sgx_errlist[idx].msg); - break; - } - } - - if (idx == ttl) - printf("Error: Unexpected error occurred.\n"); -} - -/* Initialize the enclave: - * Step 1: try to retrieve the launch token saved by last transaction - * Step 2: call sgx_create_enclave to initialize an enclave instance - * Step 3: save the launch token if it is updated - */ -int initialize_enclave(void) -{ - char token_path[MAX_PATH] = {'\0'}; - sgx_launch_token_t token = {0}; - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - int updated = 0; - - /* Step 1: try to retrieve the launch token saved by last transaction - * if there is no token, then create a new one. - */ - /* try to get the token saved in $HOME */ - const char *home_dir = getpwuid(getuid())->pw_dir; - - if (home_dir != NULL && - (strlen(home_dir)+strlen("/")+sizeof(TOKEN_FILENAME)+1) <= MAX_PATH) { - /* compose the token path */ - strncpy(token_path, home_dir, strlen(home_dir)); - strncat(token_path, "/", strlen("/")); - strncat(token_path, TOKEN_FILENAME, sizeof(TOKEN_FILENAME)+1); - } else { - /* if token path is too long or $HOME is NULL */ - strncpy(token_path, TOKEN_FILENAME, sizeof(TOKEN_FILENAME)); - } - - FILE *fp = fopen(token_path, "rb"); - if (fp == NULL && (fp = fopen(token_path, "wb")) == NULL) { - printf("Warning: Failed to create/open the launch token file \"%s\".\n", token_path); - } - - if (fp != NULL) { - /* read the token from saved file */ - size_t read_num = fread(token, 1, sizeof(sgx_launch_token_t), fp); - if (read_num != 0 && read_num != sizeof(sgx_launch_token_t)) { - /* if token is invalid, clear the buffer */ - memset(&token, 0x0, sizeof(sgx_launch_token_t)); - printf("Warning: Invalid launch token read from \"%s\".\n", token_path); - } - } - /* Step 2: call sgx_create_enclave to initialize an enclave instance */ - /* Debug Support: set 2nd parameter to 1 */ - ret = sgx_create_enclave(ENCLAVE_FILENAME, SGX_DEBUG_FLAG, &token, &updated, &global_eid, NULL); - if (ret != SGX_SUCCESS) { - print_error_message(ret); - if (fp != NULL) fclose(fp); - return -1; - } - - /* Step 3: save the launch token if it is updated */ - if (updated == FALSE || fp == NULL) { - /* if the token is not updated, or file handler is invalid, do not perform saving */ - if (fp != NULL) fclose(fp); - return 0; - } - - /* reopen the file with write capablity */ - fp = freopen(token_path, "wb", fp); - if (fp == NULL) return 0; - size_t write_num = fwrite(token, 1, sizeof(sgx_launch_token_t), fp); - if (write_num != sizeof(sgx_launch_token_t)) - printf("Warning: Failed to save launch token to \"%s\".\n", token_path); - fclose(fp); - return 0; -} - -/* OCall functions */ -void ocall_print_string(const char *str) -{ - /* Proxy/Bridge will check the length and null-terminate - * the input string to prevent buffer overflow. - */ - printf("%s", str); -} - - -/* Application entry */ -int SGX_CDECL main(int argc, char *argv[]) -{ - (void)(argc); - (void)(argv); - - - /* Initialize the enclave */ - if(initialize_enclave() < 0){ - printf("Enter a character before exit ...\n"); - getchar(); - return -1; - } - - - /* Utilize trusted libraries */ - ecall_libcxx_functions(); - - /* Destroy the enclave */ - sgx_destroy_enclave(global_eid); - - printf("Info: Cxx11DemoEnclave successfully returned.\n"); - - //printf("Enter a character before exit ...\n"); - //getchar(); - return 0; -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/App.h b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/App.h deleted file mode 100644 index 4c088ff38c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/App.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _APP_H_ -#define _APP_H_ - -#include -#include -#include -#include - -#include "sgx_error.h" /* sgx_status_t */ -#include "sgx_eid.h" /* sgx_enclave_id_t */ - -#ifndef TRUE -# define TRUE 1 -#endif - -#ifndef FALSE -# define FALSE 0 -#endif - -#if defined(__GNUC__) -# define TOKEN_FILENAME "enclave.token" -# define ENCLAVE_FILENAME "enclave.signed.so" -#endif - -extern sgx_enclave_id_t global_eid; /* global enclave id */ - -#if defined(__cplusplus) -extern "C" { -#endif - -void ecall_libcxx_functions(void); - - -#if defined(__cplusplus) -} -#endif - -#endif /* !_APP_H_ */ diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/TrustedLibrary/Libcxx.cpp b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/TrustedLibrary/Libcxx.cpp deleted file mode 100644 index c04e5eae60..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/App/TrustedLibrary/Libcxx.cpp +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -#include - -#include "../App.h" -#include "Enclave_u.h" -#include - -/* ecall_libcxx_functions: - * Invokes standard C++11 functions. - */ - - //This function is part of mutex demo -void demo_counter_without_mutex() -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - ret = ecall_mutex_demo_no_protection(global_eid); - if (ret != SGX_SUCCESS) - abort(); -} - -//This function is part of mutex demo -void demo_counter_mutex() -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - ret = ecall_mutex_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); -} - -//This function is used by processing thread of condition variable demo -void demo_cond_var_run() -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - ret = ecall_condition_variable_run(global_eid); - if (ret != SGX_SUCCESS) - abort(); -} - -//This function is used by the loader thread of condition variable demo -void demo_cond_var_load() -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - ret = ecall_condition_variable_load(global_eid); - if (ret != SGX_SUCCESS) - abort(); -} - -// Examples for C++11 library and compiler features -void ecall_libcxx_functions(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - // Example for lambda function feature: - ret = ecall_lambdas_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for auto feature: - ret = ecall_auto_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for decltype: - ret = ecall_decltype_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for strongly_typed_enum: - ret = ecall_strongly_typed_enum_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for range based for loops: - ret = ecall_range_based_for_loops_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for static_assert: - ret = ecall_static_assert_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for virtual function controls : override, final, default, and delete - ret = ecall_virtual_function_control_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for delegating_constructors: - ret = ecall_delegating_constructors_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for std::function: - ret = ecall_std_function_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for algorithms (std::all_of, std::any_of, std::none_of): - ret = ecall_cxx11_algorithms_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for variadic_templates feature: - ret = ecall_variadic_templates_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for SFINAE: - ret = ecall_SFINAE_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for initializer_list: - ret = ecall_initializer_list_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for rvalue: - ret = ecall_rvalue_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for nullptr: - ret = ecall_nullptr_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for enum class: - ret = ecall_enum_class_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for new container classes (unordered_set, unordered_map, unordered_multiset, and unordered_multimap): - ret = ecall_new_container_classes_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for tuple: - ret = ecall_tuple_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - // Example for shared_ptr: - ret = ecall_shared_ptr_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - // Example for atomic: - ret = ecall_atomic_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - -//The following threads are part of mutex demo - std::thread t1(demo_counter_without_mutex); - std::thread t2(demo_counter_without_mutex); - std::thread t3(demo_counter_without_mutex); - t1.join(); - t2.join(); - t3.join(); - ret = ecall_print_final_value_no_protection(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - - -//The following threads are part of mutex demo - std::thread tm1(demo_counter_mutex); - std::thread tm2(demo_counter_mutex); - std::thread tm3(demo_counter_mutex); - tm1.join(); - tm2.join(); - tm3.join(); - ret = ecall_print_final_value_mutex_demo(global_eid); - if (ret != SGX_SUCCESS) - abort(); - -//The following threads are part of condition variable demo - std::thread th1(demo_cond_var_run); - std::thread th2(demo_cond_var_load); - th2.join(); - th1.join(); - -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.config.xml b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.config.xml deleted file mode 100644 index a94d12f001..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - 0 - 0 - 0x40000 - 0x100000 - 10 - 1 - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.cpp b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.cpp deleted file mode 100644 index 91a096ade6..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include /* vsnprintf */ - -#include "Enclave.h" -#include "Enclave_t.h" /* print_string */ - -/* - * printf: - * Invokes OCALL to display the enclave buffer to the terminal. - */ -void printf(const char *fmt, ...) -{ - char buf[BUFSIZ] = {'\0'}; - va_list ap; - va_start(ap, fmt); - vsnprintf(buf, BUFSIZ, fmt, ap); - va_end(ap); - ocall_print_string(buf); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.edl b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.edl deleted file mode 100644 index b3de60cd9c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.edl +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* Enclave.edl - Top EDL file. */ - -enclave { - - - /* Import ECALL/OCALL from sub-directory EDLs. - * [from]: specifies the location of EDL file. - * [import]: specifies the functions to import, - * [*]: implies to import all functions. - */ - - from "TrustedLibrary/Libcxx.edl" import *; - from "sgx_tstdc.edl" import *; - - /* - * ocall_print_string - invokes OCALL to display string buffer inside the enclave. - * [in]: copy the string buffer to App outside. - * [string]: specifies 'str' is a NULL terminated buffer. - */ - untrusted { - void ocall_print_string([in, string] const char *str); - }; - -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.h b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.h deleted file mode 100644 index eb2da002bb..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _ENCLAVE_H_ -#define _ENCLAVE_H_ - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -void printf(const char *fmt, ...); - -#if defined(__cplusplus) -} -#endif - -#endif /* !_ENCLAVE_H_ */ diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.lds b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.lds deleted file mode 100644 index e3d9d0ee0d..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave.lds +++ /dev/null @@ -1,9 +0,0 @@ -enclave.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave_debug.lds b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave_debug.lds deleted file mode 100644 index f5f35d5b7c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave_debug.lds +++ /dev/null @@ -1,10 +0,0 @@ -enclave.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - g_peak_heap_used; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave_private.pem b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave_private.pem deleted file mode 100644 index 529d07be35..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/Enclave_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4gIBAAKCAYEAroOogvsj/fZDZY8XFdkl6dJmky0lRvnWMmpeH41Bla6U1qLZ -AmZuyIF+mQC/cgojIsrBMzBxb1kKqzATF4+XwPwgKz7fmiddmHyYz2WDJfAjIveJ -ZjdMjM4+EytGlkkJ52T8V8ds0/L2qKexJ+NBLxkeQLfV8n1mIk7zX7jguwbCG1Pr -nEMdJ3Sew20vnje+RsngAzdPChoJpVsWi/K7cettX/tbnre1DL02GXc5qJoQYk7b -3zkmhz31TgFrd9VVtmUGyFXAysuSAb3EN+5VnHGr0xKkeg8utErea2FNtNIgua8H -ONfm9Eiyaav1SVKzPHlyqLtcdxH3I8Wg7yqMsaprZ1n5A1v/levxnL8+It02KseD -5HqV4rf/cImSlCt3lpRg8U5E1pyFQ2IVEC/XTDMiI3c+AR+w2jSRB3Bwn9zJtFlW -KHG3m1xGI4ck+Lci1JvWWLXQagQSPtZTsubxTQNx1gsgZhgv1JHVZMdbVlAbbRMC -1nSuJNl7KPAS/VfzAgEDAoIBgHRXxaynbVP5gkO0ug6Qw/E27wzIw4SmjsxG6Wpe -K7kfDeRskKxESdsA/xCrKkwGwhcx1iIgS5+Qscd1Yg+1D9X9asd/P7waPmWoZd+Z -AhlKwhdPsO7PiF3e1AzHhGQwsUTt/Y/aSI1MpHBvy2/s1h9mFCslOUxTmWw0oj/Q -ldIEgWeNR72CE2+jFIJIyml6ftnb6qzPiga8Bm48ubKh0kvySOqnkmnPzgh+JBD6 -JnBmtZbfPT97bwTT+N6rnPqOOApvfHPf15kWI8yDbprG1l4OCUaIUH1AszxLd826 -5IPM+8gINLRDP1MA6azECPjTyHXhtnSIBZCyWSVkc05vYmNXYUNiXWMajcxW9M02 -wKzFELO8NCEAkaTPxwo4SCyIjUxiK1LbQ9h8PSy4c1+gGP4LAMR8xqP4QKg6zdu9 -osUGG/xRe/uufgTBFkcjqBHtK5L5VI0jeNIUAgW/6iNbYXjBMJ0GfauLs+g1VsOm -WfdgXzsb9DYdMa0OXXHypmV4GwKBwQDUwQj8RKJ6c8cT4vcWCoJvJF00+RFL+P3i -Gx2DLERxRrDa8AVGfqaCjsR+3vLgG8V/py+z+dxZYSqeB80Qeo6PDITcRKoeAYh9 -xlT3LJOS+k1cJcEmlbbO2IjLkTmzSwa80fWexKu8/Xv6vv15gpqYl1ngYoqJM3pd -vzmTIOi7MKSZ0WmEQavrZj8zK4endE3v0eAEeQ55j1GImbypSf7Idh7wOXtjZ7WD -Dg6yWDrri+AP/L3gClMj8wsAxMV4ZR8CgcEA0fzDHkFa6raVOxWnObmRoDhAtE0a -cjUj976NM5yyfdf2MrKy4/RhdTiPZ6b08/lBC/+xRfV3xKVGzacm6QjqjZrUpgHC -0LKiZaMtccCJjLtPwQd0jGQEnKfMFaPsnhOc5y8qVkCzVOSthY5qhz0XNotHHFmJ -gffVgB0iqrMTvSL7IA2yqqpOqNRlhaYhNl8TiFP3gIeMtVa9rZy31JPgT2uJ+kfo -gV7sdTPEjPWZd7OshGxWpT6QfVDj/T9T7L6tAoHBAI3WBf2DFvxNL2KXT2QHAZ9t -k3imC4f7U+wSE6zILaDZyzygA4RUbwG0gv8/TJVn2P/Eynf76DuWHGlaiLWnCbSz -Az2DHBQBBaku409zDQym3j1ugMRjzzSQWzJg0SIyBH3hTmnYcn3+Uqcp/lEBvGW6 -O+rsXFt3pukqJmIV8HzLGGaLm62BHUeZf3dyWm+i3p/hQAL7Xvu04QW70xuGqdr5 -afV7p5eaeQIJXyGQJ0eylV/90+qxjMKiB1XYg6WYvwKBwQCL/ddpgOdHJGN8uRom -e7Zq0Csi3hGheMKlKbN3vcxT5U7MdyHtTZZOJbTvxKNNUNYH/8uD+PqDGNneb29G -BfGzvI3EASyLIcGZF3OhKwZd0jUrWk2y7Vhob91jwp2+t73vdMbkKyI4mHOuXvGv -fg95si9oO7EBT+Oqvhccd2J+F1IVXncccYnF4u5ZGWt5lLewN/pVr7MjjykeaHqN -t+rfnQam2psA6fL4zS2zTmZPzR2tnY8Y1GBTi0Ko1OKd1HMCgcAb5cB/7/AQlhP9 -yQa04PLH9ygQkKKptZp7dy5WcWRx0K/hAHRoi2aw1wZqfm7VBNu2SLcs90kCCCxp -6C5sfJi6b8NpNbIPC+sc9wsFr7pGo9SFzQ78UlcWYK2Gu2FxlMjonhka5hvo4zvg -WxlpXKEkaFt3gLd92m/dMqBrHfafH7VwOJY2zT3WIpjwuk0ZzmRg5p0pG/svVQEH -NZmwRwlopysbR69B/n1nefJ84UO50fLh5s5Zr3gBRwbWNZyzhXk= ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/Libcxx.cpp b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/Libcxx.cpp deleted file mode 100644 index 0059adc846..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/Libcxx.cpp +++ /dev/null @@ -1,917 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "../Enclave.h" -#include "Enclave_t.h" - - -// Feature name : Lambda functions -// Feature description : It is used to create a function object that can capture variables in scope. -// Demo description : Shows lambda capture options and a some basic usages. -void ecall_lambdas_demo() -{ - // Lambdas capture options: - int local_var = 0; - - [] { return true; }; // captures nothing - - [&] { return ++local_var; }; // captures all variable by reference - [&local_var] { return ++local_var; }; // captures local_var by reference - [&, local_var] { return local_var; }; // captures all by reference except local_var - - [=] { return local_var; }; // captures all variable by value - [local_var] { return local_var; }; // captures local_var by value - [=, &local_var] { return ++local_var; }; // captures all variable by value except local_var - - // Sample usages for lamdbas: - std::vector< int> v { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - printf("[Lambdas] Initial array using lambdas: { "); - - // Print the elements in an array using lambdas - std::for_each(std::begin(v), std::end(v), [](int elem) { printf("%d ", elem); }); //capture specification - printf("}.\n"); - - // Find the first odd number using lambda as an unary predicate when calling find_if. - auto first_odd_element = std::find_if(std::begin(v), std::end(v), [=](int elem) { return elem % 2 == 1; }); - - if (first_odd_element != std::end(v)) - printf("[Lambdas] First odd element in the array is %d. \n", *first_odd_element); - else - printf("[Lambdas] No odd element found in the array.\n"); - - // Count the even numbers using a lambda function as an unary predicate when calling count_if. - long long number_of_even_elements = std::count_if(std::begin(v), std::end(v), [=](int val) { return val % 2 == 0; }); - printf("[Lambdas] Number of even elements in the array is %lld.\n", number_of_even_elements); - - // Sort the elements of an array using lambdas - std::sort(std::begin(v), std::end(v), [](int e1, int e2) {return e2 < e1; }); - - // Print the elements in an array using lambdas - printf("[Lambdas] Array after sort: { "); - std::for_each(std::begin(v), std::end(v), [](int elem) { printf("%d ", elem); }); - printf("}. \n"); - printf("\n"); // end of demo -} - - -// Feature name : auto -// Feature description : It is used for type deduction -// Demo description : Shows basic usages of auto specifier with different types. - -// Helper function for ecall_auto_demo: -void sample_func_auto_demo() -{ - printf("[auto] Function sample_func_auto_demo is called. \n"); -} - -void ecall_auto_demo() -{ - double local_var = 0.0; - - auto a = 7; // Type of variable a is deduced to be int - printf("[auto] Type of a is int. typeid = %s.\n", typeid(a).name()); - - const auto b1 = local_var, *b2 = &local_var; // auto can be used with modifiers like const or &. - printf("[auto] Type of b1 is const double. typeid = %s.\n", typeid(b1).name()); - printf("[auto] Type of b2 is const double*. typeid = %s.\n", typeid(b2).name()); - (void)b1; - (void)b2; - - auto c = 0, *d = &a; // multiple variable initialization if the deduced type does match - printf("[auto] Type of c is int. typeid = %s.\n", typeid(c).name()); - printf("[auto] Type of d is int*. typeid = %s.\n", typeid(d).name()); - (void)c; - (void)d; - - auto lambda = [] {}; // can be used to define lambdas - printf("[auto] Type of lambda is [] {}. typeid = %s.\n", typeid(lambda).name()); - (void)lambda; - - auto func = sample_func_auto_demo; // can be used to deduce type of function - printf("[auto] Type of func is void(__cdecl*)(void). typeid = %s.\n", typeid(func).name()); - func(); - - printf("\n"); // end of demo -} - -// Feature name : decltype -// Feature description : It is used for type deduction -// Demo description : Shows basic usages of decltype specifier with different types. -void ecall_decltype_demo() -{ - int a = 0 ; - decltype(a) b = 0; // create an element of the same type as another element - printf("[decltype] Type of b is int. typeid = %s.\n", typeid(b).name()); - - double c = 0; - decltype(a + c) sum = a + c; // deduce type of a sum of elements of different types and create an element of that type. - // most usefull in templates. - printf("[decltype] Type of sum is double. typeid = %s.\n", typeid(sum).name()); - (void)sum; - (void)b; - printf("\n"); // end of demo -} - -// Feature name : enum classes -// Feature description : A new type of enum that solves problems found in old enum like : -// unscoping of enum values and the possibility to compare them with int -// Demo description : Shows basic usages of enum classes. -void ecall_strongly_typed_enum_demo() -{ - // In enum class the underlying type can be set. In the case bellow it is char. - enum class DaysOfWeek : char { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY }; - - // initialization of variable of type DaysOfWeek - DaysOfWeek random_day = DaysOfWeek::MONDAY; - (void)random_day; - - // In is not mandatory to specify the underlying type. - enum class Weekend { SATURDAY, SUNDAY }; - - // The two enum classes above: days_of_week and weekend ilustrate that it is now possible to have two enum classes with the same values in them. - - // end of demo -} - -// Feature name : Range based for loops -// Feature description : Easy to read way of accessing elements in an container. -// Demo description : Shows basic usage of range based for loop with c array and vector. -void ecall_range_based_for_loops_demo() -{ - char array_of_letters[] = { 'a','b','c','d' }; - std::vector vector_of_letters = { 'a','b','c','d' }; - - printf("[range_based_for_loops] Using range based for loops to print the content of an array: { "); - for (auto elem : array_of_letters) - printf("%c ", elem); - printf("}. \n"); - - printf("[range_based_for_loops] Using range based for loops to print the content of an vector: { "); - for (auto elem : vector_of_letters) - printf("%c ", elem); - printf("}.\n"); - - printf("\n"); // end of demo -} - - -// Feature name : static_assert -// Feature description : It is used to make assertions at compile time. -// Demo description : Shows basic usage of static_assert with compile time operation. -void ecall_static_assert_demo() -{ - static_assert(sizeof(int) < sizeof(double), "Error : sizeof(int) < sizeof(double) "); - const int a = 0; - static_assert(a == 0, "Error: value of a is not 0"); - - // end of demo -} - - -// Feature name : New virtual function controls : override, final, default, and delete -// Feature description : - delete : a deleted function cannot be inherited -// - final : a final function cannot be overrided in the derived class -// - default : intruction to the compiler to generate a default function -// - override : ensures that a virtual function from derived class overrides a function from base -// Demo description : Shows basic usage of new virtual function control. - -/* Helper class for ecall_virtual_function_control_demo.*/ -class Base -{ -public: - - virtual void f_cannot_be_inherited() final {}; - Base(const Base &) = delete; - Base() = default; - virtual void f_must_be_overrided() {}; -}; - -/* Helper class for ecall_virtual_function_control_demo.*/ -class Derived : Base -{ -public: - /* The code bellow in this comment does not compile. - The function cannot be override because it is declared with keyword final in base - virtual double f_cannot_be_inherited() {}; - */ - - /*The keyword override assures that the function overrides a base class member*/ - virtual void f_must_be_overrided() override {}; -}; - -void ecall_virtual_function_control_demo() -{ - // The default constructor will be called generated by the compiler with explicit keyword default - Base a; - // Trying to use the copy contructor will generate code that does not compile because it is deleted - // Base b = a; - - // end of demo -} - -// Feature name : Delegating constructors -// Feature description : A class constructors may have common code which can be delegated to a constructor to avoid code repetion -// Demo description : Shows basic usage of delegating constructors - -// Helper class for ecall_delegating_constructors -class DemoDelegatingConstructors -{ - int a, b, c; -public: - DemoDelegatingConstructors(int param_a, int param_b, int param_c) - { - this->a = param_a; - this->b = param_b; - this->c = param_c; - /*common initialization*/ - switch (c) - { - case 1: - printf("[delegating constructors] Called from DemoDelegatingConstructors(int a, int b). \n"); - break; - case 2: - printf("[delegating constructors] Called from DemoDelegatingConstructors(int a). \n"); - break; - default: - printf("[delegating constructors] Called from DemoDelegatingConstructors(int a, int b, int c).\n"); - break; - } - } - DemoDelegatingConstructors(int param_a, int param_b) : DemoDelegatingConstructors(param_a, param_b, 1) {} - DemoDelegatingConstructors(int param_a) : DemoDelegatingConstructors(param_a, 0, 2) {} -}; - -void ecall_delegating_constructors_demo() -{ - DemoDelegatingConstructors a(1, 2, 3); - DemoDelegatingConstructors b(1, 2); - DemoDelegatingConstructors c(1); - - printf("\n"); // end of demo -} - -// Feature name : std::function -// Feature description : It is used to store and invoke a callable -// Demo description : Shows basic usage of std::function - -// Helper class for ecall_std_function_demo: -void sample_std_function1() -{ - printf("[std_function] calling sample_std_function1\n"); -} - -void ecall_std_function_demo() -{ - // Example with functions - std::function funct = sample_std_function1; - funct(); - - //Example with lambda - std::function funct_lambda = [] { printf("[std_function] calling a lambda function\n"); }; - funct_lambda(); - - printf("\n"); // end of demo -} - -// Feature name : std::all_of, std::any_of, std::none_of -// Feature description : New C++11 algorithms -// Demo description : Shows basic usage of the std::all_of, std::any_of, std::none_of. -void ecall_cxx11_algorithms_demo() -{ - std::vector v = { 0, 1, 2, 3, 4, 5 }; - bool are_all_of = all_of(begin(v), end(v), [](int e) { return e % 2 == 0; }); - printf("[cxx11_algorithms] All elements in { 0 1 2 3 4 5 } are even is %s. \n", are_all_of ? "true" : "false"); - - bool are_any_of = any_of(begin(v), end(v), [](int e) { return e % 2 == 0; }); - printf("[cxx11_algorithms] Some elements in { 0 1 2 3 4 5 } are even is %s. \n", are_any_of ? "true" : "false"); - - bool are_none_of = none_of(begin(v), end(v), [](int e) { return e % 2 == 0; }); - printf("[cxx11_algorithms] None elements in { 0 1 2 3 4 5 } are even is %s. \n", are_none_of ? "true" : "false"); - - printf("\n"); // end of demo -} - - -// Feature name : variadic templates -// Feature description : Templates that can have multiple arguments -// Demo description : Shows basic usage of variadic templates - -// Helper template for ecall_variadic_templates_demo: -template -T sum(T elem) -{ - return elem; -} - -template -T sum(T elem1, T elem2, Args... args) -{ - return elem1 + elem2 + sum(args...); -} - -void ecall_variadic_templates_demo() -{ - int computed_sum = sum(1, 2, 3, 4, 5); - printf("[variadic_templates] The sum of paramters (1, 2, 3, 4, 5) is %d. \n", computed_sum); - printf("\n"); // end of demo -} - -// Feature name : Substitution failure is not an error (SFINAE) -// Feature description : Describes the case where a substitution error in templates does not cause errors -// Demo description : Shows basic usage of SFINAE - -/*first candidate for substitution*/ -template void f(typename T::A*) { printf("[sfinae] First candidate for substitution is matched.\n"); }; - -/*second candidate for substitution*/ -template void f(T) { printf("[sfinae] Second candidate for substitution is matched.\n"); } - -void ecall_SFINAE_demo() -{ - f(0x0); // even if the first canditate substition will fail, the second one will pass - printf("\n"); // end of demo -} - -//Feature name : Initializer lists -//Feature description : An object of type std::initializer_list is a lightweight proxy object that provides access to an array of objects of type const T. -//Demo description : Demonstrates the usage of initializer list in the constructor of an object in enclave. -class Number -{ -public: - Number(const std::initializer_list &v) { - for (auto i : v) { - elements.push_back(i); - } - } - - void print_elements() { - printf("[initializer_list] The elements of the vector are:"); - for (auto item : elements) { - printf(" %d", item); - } - printf(".\n"); - } -private: - std::vector elements; -}; - -void ecall_initializer_list_demo() -{ - printf("[initializer_list] Using initializer list in the constructor. \n"); - Number m = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; - m.print_elements(); - - printf("\n"); //end of demo -} - - -// Feature name : Rvalue references and move semantics; -// Feature description : They are used for memory usage optimazation by eliminating copy operations -// Demo description : Shows basic usage of rvalue, move constructor, and move operator - -// Helper class for ecall_rvalue_demo -class DemoBuffer -{ -public: - unsigned int size = 100; - char *buffer; - - DemoBuffer(int param_size) - { - this->size = param_size; - buffer = new char[size]; - printf("[rvalue] Called constructor : DemoBuffer(int size).\n"); - } - - // A typical copy constructor needs to alocate memory for a new copy - // Copying an big array is an expensive operation - DemoBuffer(const DemoBuffer & rhs) - { - this->size = rhs.size; - buffer = new char[rhs.size]; - memcpy(buffer, rhs.buffer, size); - printf("[rvalue] Called copy constructor : DemoBuffer(const DemoBuffer & rhs).\n"); - } - - // A typical move constructor can reuse the memory pointed by the buffer - DemoBuffer(DemoBuffer && rhs) - { - buffer = rhs.buffer; - size = rhs.size; - // reset state of rhs - rhs.buffer = NULL; - rhs.size = 0; - printf("[rvalue] Called move constructor : DemoBuffer(DemoBuffer && rhs).\n"); - } - ~DemoBuffer() - { - delete buffer; - } - -}; - -// Helper class for ecall_rvalue_demo -DemoBuffer foobar(int a) -{ - DemoBuffer x(100); - DemoBuffer y(100); - - if (a > 0) - return x; - else - return y; -} -void ecall_rvalue_demo() -{ - // This will call the constructor - printf("[rvalue] DemoBuffer a(100).\n"); - DemoBuffer a(100); - - printf("[rvalue] DemoBuffer foobar(100). \n"); - // Initializing variable d using a temporary object will result in a call to move constructor - // This is usefull because it reduces the memory cost of the operation. - DemoBuffer d(foobar(100)); - - // This will call the copy constructor. State of a will not change. - printf("[rvalue] DemoBuffer b(a).\n"); - DemoBuffer b(a); - - printf("[rvalue] DemoBuffer c(std::move(a)).\n"); - // explicitly cast a to an rvalue so that c will be created using move constructor. - // State of a is going to be reseted. - DemoBuffer c(std::move(a)); - - printf("\n"); // end of demo -} - -// Feature name : Nullptr -// Feature description : Resolves the issues of converting NULL to integral types -// Demo description : Shows basic usage of nullptr - -// overload candidate 1 -void nullptr_overload_candidate(int i) { - (void)i; - printf("[nullptr] called void nullptr_overload_candidate(int i).\n"); -} - -// overload candidate 2 -void nullptr_overload_candidate(int* ptr) { - (void)ptr; - printf("[nullptr] called void nullptr_overload_candidate(int* ptr).\n"); -} - -template -void Fwd(F f, A a) -{ - f(a); -} - -void g(int* i) -{ - (void)i; - printf("[nullptr] Function %s called\n", __FUNCTION__); -} - -// Feature name : -// Feature description : -// Demo description : -void ecall_nullptr_demo() -{ - // NULL can be converted to integral types() like int and will call overload candidate 1 - nullptr_overload_candidate(NULL); - - // nullptr can't be converted to integral types() like int and will call overload candidate 2 - nullptr_overload_candidate(nullptr); - - g(NULL); // Fine - g(0); // Fine - Fwd(g, nullptr); // Fine - //Fwd(g, NULL); // ERROR: No function g(int) - - printf("\n"); // end of demo -} - -// Feature name : Scoped enums -// Feature description : -// Demo description : -enum class Color { orange, brown, green = 30, blue, red }; - -void ecall_enum_class_demo() -{ - int n = 0; - Color color1 = Color::brown; - switch (color1) - { - case Color::orange: printf("[enum class] orange"); break; - case Color::brown: printf("[enum class] brown"); break; - case Color::green: printf("[enum class] green"); break; - case Color::blue: printf("[enum class] blue"); break; - case Color::red: printf("[enum class] red"); break; - } - // n = color1; // Not allowed: no scoped enum to int conversion - n = static_cast(color1); // OK, n = 1 - printf(" - int = %d\n", n); - - Color color2 = Color::red; - switch (color2) - { - case Color::orange: printf("[enum class] orange"); break; - case Color::brown: printf("[enum class] brown"); break; - case Color::green: printf("[enum class] green"); break; - case Color::blue: printf("[enum class] blue"); break; - case Color::red: printf("[enum class] red"); break; - } - n = static_cast(color2); // OK, n = 32 - printf(" - int = %d\n", n); - - Color color3 = Color::green; - switch (color3) - { - case Color::orange: printf("[enum class] orange"); break; - case Color::brown: printf("[enum class] brown"); break; - case Color::green: printf("[enum class] green"); break; - case Color::blue: printf("[enum class] blue"); break; - case Color::red: printf("[enum class] red"); break; - } - n = static_cast(color3); // OK, n = 30 - printf(" - int = %d\n", n); - printf("\n"); -} - -// Feature name : new container classes -// Feature description : unordered_set, unordered_map, unordered_multiset, and unordered_multimap -// Demo description : Shows basic usage of new container classes -void ecall_new_container_classes_demo() -{ - // unordered_set - // container used for fast acces that groups elements in buckets based on their hash - - std::unordered_set set_of_numbers = { 0, 1, 2, 3, 4, 5 }; - const int searchVal = 3; - std::unordered_set::const_iterator got = set_of_numbers.find(searchVal); - - if (got != set_of_numbers.end()) - printf("[new_container_classes] unordered_set { 0, 1, 2, 3, 4, 5} has value 3.\n"); - else - printf("[new_container_classes] unordered_set { 0, 1, 2, 3, 4, 5} does not have value 3.\n"); - - // unordered_multiset - // container used for fast acces that groups non unique elements in buckets based on their hash - std::unordered_multiset multiset_of_numbers = { 0, 1, 2, 3, 3, 3 }; - printf("[new_container_classes] multiset_set { 0, 1, 2, 3, 3, 3} has %d elements with value %d.\n", - (int)multiset_of_numbers.count(searchVal), searchVal); - - // unordered_map - std::unordered_map grades{ { "A", 10 },{ "B", 8 },{ "C", 7 },{ "D", 5 },{ "E", 3 } }; - printf("[new_container_classes] unordered_map elements: {"); - for (auto pair : grades) { - printf("[%s %d] ", pair.first.c_str(), pair.second); - } - - printf("}.\n"); - - // unordered_multimap - std::unordered_multimap multimap_grades{ { "A", 10 },{ "B", 8 },{ "B", 7 },{ "E", 5 },{ "E", 3 },{ "E",1 } }; - - printf("[new_container_classes] unordered_multimap elements: {"); - for (auto pair : multimap_grades) { - printf("[%s %d] ", pair.first.c_str(), pair.second); - } - printf("}.\n"); - - printf("\n"); // end of demo -} - -// Feature name : Tuple -// Feature description : Objects that pack elements of multiple types which can be accessed by index -// Demo description : Shows basic usage of tuple: creation and access -void ecall_tuple_demo() -{ - // Create tuple using std::make_tuple - char array_of_letters[4] = {'A','B','C','D'}; - std::vector vector_of_letters = { 'A','B','C','D' }; - std::map map_of_letters = { {'B','b' } }; - - // Creating a tuple using a tuple constructor - std::tuple tuple_sample_with_constructor(42, "Sample tuple"); - (void)tuple_sample_with_constructor; - - // Creating a tuple using std::make_tuple - auto tuple_sample = std::make_tuple("", 1, 7.9, vector_of_letters, array_of_letters, map_of_letters); - - // Access the elements in tupleSample using std::get - printf("[tuple] show first element in TupleSample: %s. \n", std::get<0>(tuple_sample)); - printf("[tuple] show second element in TupleSample: %d. \n", std::get<1>(tuple_sample)); - printf("[tuple] show third element in TupleSample: %f. \n", std::get<2>(tuple_sample)); - - // Getting vector from a tuple - std::vector temp_vector = std::get<3>(tuple_sample); - (void)temp_vector; - - // Getting array from a tuple - int first_elem_of_array = std::get<4>(tuple_sample)[0]; - (void)first_elem_of_array; - - // Getting map from a tuple - std::map temp_map = std::get<5>(tuple_sample); - (void)temp_map; - printf("\n"); // end of demo -} - -// Feature name : new smart pointer -// Feature description : shared_ptr and unique_ptr -// Demo decription : Shows basic usage of smart pointers -// Helper class for ecall_shared_ptr_demo -class DemoSmartPtr -{ - std::string smartPointerType; -public: - DemoSmartPtr(std::string param_smartPointerType) - { - printf("[smart_ptr] In construct of object demo_smart_ptr using %s. \n", param_smartPointerType.c_str()); - this->smartPointerType = param_smartPointerType; - } - ~DemoSmartPtr() - { - printf("[smart_ptr] In deconstructor of object demo_smart_ptr using %s. \n", smartPointerType.c_str()); - } -}; - -void ecall_shared_ptr_demo() -{ - // std::shared_ptr is smart pointer that takes ownership of an object using a pointer - // The object is freed when the last smart_pointer does not point to it. - - // Creating a shared pointer using std::make_shared - auto shared_ptr = std::make_shared("smart_ptr."); // The constructor of DemoSmartPtr will be called here - - printf("[smart_ptr] shared_ptr reference count = %ld. \n", shared_ptr.use_count()); - auto shared_ptr2 = shared_ptr; - printf("[smart_ptr] shared_ptr reference count = %ld incresead after creating another shared pointer.\n", shared_ptr.use_count()); - shared_ptr2.reset(); - printf("[smart_ptr] shared_ptr reference count = %ld decresead after calling releasing ownership. \n", shared_ptr.use_count()); - - // std::unique_ptr is smart pointer that takes ownership of an object using a pointer - // it is different from smart_ptr in the sense that only one unique_ptr can take ownership - - std::unique_ptr unique_ptr(new DemoSmartPtr("unique_ptr")); - // When going out of scope both shared_ptr and unique_ptr release the objects they own - - // end of demo -} - -//Feature name : atomic -//Feature description: The atomic library provides components for fine-grained atomic operations allowing for lockless concurrent programming. -// Each atomic operation is indivisible with regards to any other atomic operation that involves the same object. -// Atomic objects are free of data races. -//Demo description : Demonstrates the usage of atomic types, objects and functions in enclave. -void ecall_atomic_demo() -{ - printf("[atomic] Atomic types, objects and functions demo.\n"); - - printf("[atomic_store] Defining an atomic_char object with an initial value of 5.\n"); - std::atomic_char atc(5); - printf("[atomic_store] The current value stored in the atomic object is: %d\n", atc.load()); - printf("[atomic_store] Replacing the value of the atomic object with a non-atomic value of 3.\n"); - std::atomic_store(&atc, 3); - printf("[atomic_store] The new value of the atomic object is: %d.\n", atc.load()); - - printf("\n"); - - printf("[atomic_store_explicit] Defining an atomic_short object with an initial value of 5.\n"); - std::atomic_short ats(5); - printf("[atomic_store_explicit] The current value stored in the atomic object is: %d.\n", ats.load()); - printf("[atomic_store_explicit] Replacing the value of the atomic object with a non-atomic value of 3.\n"); - std::atomic_store_explicit(&ats, 3, std::memory_order_seq_cst); - printf("[atomic_store] The new value of the atomic object is: %d.\n", ats.load()); - - printf("\n"); - - printf("[atomic_load] Defining an atomic_int object with an initial value of 4.\n"); - std::atomic_int ati1(4); - printf("[atomic_load] Obtaining the value of the atomic object and saving it in a int variable.\n"); - int val = std::atomic_load(&ati1); - printf("[atomic_load] The obtained value is %d.\n", val); - - printf("\n"); - - printf("[atomic_load_explicit] Defining an atomic_int object with an initial value of 2.\n"); - std::atomic_int ati2(2); - printf("[atomic_load_explicit] Obtaining the value of the atomic object and saving it in a int variable.\n"); - int val1 = std::atomic_load_explicit(&ati2, std::memory_order_seq_cst); - printf("[atomic_load_explicit] The obtained value is %d.\n", val1); - - printf("\n"); - - printf("[atomic_fetch_add] Defining an atomic_int object with an initial value of 7.\n"); - std::atomic_int ati(7); - printf("[atomic_fetch_add] The current value stored in the atomic object is: %d.\n", ati.load()); - printf("[atomic_fetch_add] Adding a non-atomic value of 8 to the atomic object.\n"); - std::atomic_fetch_add(&ati, 8); - printf("[atomic_fetch_add] The new value of the atomic object is: %d.\n", ati.load()); - - printf("\n"); - - printf("[atomic_fetch_add_explicit] Defining an atomic_uint object with an initial value of 7.\n"); - std::atomic_uint atui(7); - printf("[atomic_fetch_add_explicit] The current value stored in the atomic object is: %u.\n", atui.load()); - printf("[atomic_fetch_add_explicit] Adding a non-atomic value of 8 to the atomic object.\n"); - std::atomic_fetch_add_explicit(&atui, 8, std::memory_order_seq_cst); - printf("[atomic_fetch_add_explicit] The new value of the atomic object is: %u.\n", atui.load()); - - printf("\n"); - - printf("[atomic_fetch_sub] Defining an atomic_long object with an initial value of 20.\n"); - std::atomic_long atl(20); - printf("[atomic_fetch_sub] The current value stored in the atomic object is: %ld.\n", atl.load()); - printf("[atomic_fetch_sub] Substracting a non-atomic value of 8 from the value of the atomic object.\n"); - std::atomic_fetch_sub(&atl, 8); - printf("[atomic_fetch_sub] The new value of the atomic object is: %ld.\n", atl.load()); - - printf("\n"); - - printf("[atomic_fetch_sub_explicit] Defining an atomic_llong object with an initial value of 20.\n"); - std::atomic_llong atll(20); - printf("[atomic_fetch_sub_explicit] The current value stored in the atomic object is: %lld.\n", atll.load()); - printf("[atomic_fetch_sub_explicit] Substracting a non-atomic value of 8 from the value of the atomic object.\n"); - std::atomic_fetch_sub_explicit(&atll, 8, std::memory_order_seq_cst); - printf("[atomic_fetch_sub_explicit] The new value of the atomic object is: %lld.\n", atll.load()); - - printf("\n"); // end of demo -} - -//Feature name : mutex -//Feature description : The mutex class is a synchronization primitive that can be used to protect shared data -// from being simultaneously accessed by multiple threads. -//Demo description : Demonstrates mutex protection when incrementing values in multiple threads. - -//Structure used in mutex demo to show the behavior without using a mutex -struct CounterWithoutMutex { - int value; - - CounterWithoutMutex() : value(0) {} - - void increment() { - ++value; - } -}; - -CounterWithoutMutex counter_without_protection; - -//E-call used by mutex demo to perform the incrementation using a counter without mutex protection -void ecall_mutex_demo_no_protection() -{ - for (int i = 0; i < 100000; ++i) { - counter_without_protection.increment(); - } -} - -//E-call used by mutex demo to get the final value of the counter from enclave -void ecall_print_final_value_no_protection() -{ - printf("[mutex] Incrementing values in three threads without mutex protection, using a 100000 times loop. \n[mutex]Expected value is 300000. The final value is %d.\n", counter_without_protection.value); -} - - -//Structure used in mutex demo -struct CounterProtectedByMutex { - std::mutex mutex; - int value; - - CounterProtectedByMutex() : value(0) {} - - void increment() { - //locking the mutex to avoid simultaneous incrementation in different threads - mutex.lock(); - ++value; - //unlocking the mutex - mutex.unlock(); - } -}; - -CounterProtectedByMutex counter_with_protection; - -//E-call used by mutex demo to perform the actual incrementation -void ecall_mutex_demo() -{ - for (int i = 0; i < 100000; ++i) { - counter_with_protection.increment(); - } -} - -//E-call used by mutex demo to get the final value of the counter from enclave -void ecall_print_final_value_mutex_demo() -{ - printf("[mutex] Mutex protection when incrementing a value in 3 threads, using a 100000 times loop. \n[mutex]Expected value is 300000. The final value is %d.\n", counter_with_protection.value); -} - -//Feature name : condition_variable -//Feature description: The condition_variable class is a synchronization primitive that can be used to block a thread, -// or multiple threads at the same time, until another thread both modifies a shared variable (the condition), -// and notifies the condition_variable. -//Demo description : Demonstrates condition_variable usage in a two threads environment. One thread is used for loading the data and -// the other processes the loaded data. The thread for processing the data waits untill the data is loaded in the -// other thread and gets notified when loading is completed. - -//This class is used by condition variable demo -class DemoConditionVariable -{ - std::mutex mtx; - std::condition_variable cond_var; - bool data_loaded; -public: - DemoConditionVariable() - { - data_loaded = false; - } - void load_data() - { - //Simulating loading of the data - printf("[condition_variable] Loading Data...\n"); - { - // Locking the data structure - std::lock_guard guard(mtx); - // Setting the flag to true to signal load data completion - data_loaded = true; - } - // Notify to unblock the waiting thread - cond_var.notify_one(); - } - bool is_data_loaded() - { - return data_loaded; - } - void main_task() - { - printf("\n"); - printf("[condition_variable] Running condition variable demo.\n"); - - // Acquire the lock - std::unique_lock lck(mtx); - - printf("[condition_variable] Waiting for the data to be loaded in the other thread.\n"); - cond_var.wait(lck, std::bind(&DemoConditionVariable::is_data_loaded, this)); - printf("[condition_variable] Processing the loaded data.\n"); - printf("[condition_variable] Done.\n"); - } -}; - - -DemoConditionVariable app; - -//E-call used by condition_variable demo - processing thread - -void ecall_condition_variable_run() -{ - app.main_task(); -} - -//E-call used by condifion_variable demo - loader thread -void ecall_condition_variable_load() -{ - app.load_data(); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/Libcxx.edl b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/Libcxx.edl deleted file mode 100644 index 47a7d10315..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Enclave/TrustedLibrary/Libcxx.edl +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* Libcxx.edl - EDL sample for trusted C++ library. */ - -enclave { - - /* - * A subset of the C++03 standard is supported. - */ - - trusted { - - public void ecall_lambdas_demo(void); - public void ecall_auto_demo(void); - public void ecall_decltype_demo(void); - public void ecall_strongly_typed_enum_demo(void); - public void ecall_range_based_for_loops_demo(void); - public void ecall_static_assert_demo(void); - public void ecall_virtual_function_control_demo(void); - public void ecall_delegating_constructors_demo(void); - public void ecall_std_function_demo(void); - public void ecall_cxx11_algorithms_demo(void); - public void ecall_variadic_templates_demo(void); - public void ecall_SFINAE_demo(void); - public void ecall_initializer_list_demo(void); - public void ecall_rvalue_demo(void); - public void ecall_nullptr_demo(void); - public void ecall_enum_class_demo(void); - public void ecall_new_container_classes_demo(void); - public void ecall_tuple_demo(void); - public void ecall_shared_ptr_demo(void); - public void ecall_atomic_demo(void); - public void ecall_mutex_demo(void); - public void ecall_print_final_value_mutex_demo(void); - public void ecall_mutex_demo_no_protection(void); - public void ecall_print_final_value_no_protection(void); - public void ecall_condition_variable_run(void); - public void ecall_condition_variable_load(void); - - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Makefile b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Makefile deleted file mode 100644 index 4b5239e300..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/Makefile +++ /dev/null @@ -1,252 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -######## SGX SDK Settings ######## - -SGX_SDK ?= /opt/intel/sgxsdk -SGX_MODE ?= HW -SGX_ARCH ?= x64 -SGX_DEBUG ?= 1 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -ifneq ($(SGX_MODE), HW) - Urts_Library_Name := sgx_urts_sim -else - Urts_Library_Name := sgx_urts -endif - -App_Cpp_Files := App/App.cpp $(wildcard App/TrustedLibrary/*.cpp) -App_Include_Paths := -IInclude -IApp -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 -App_Link_Flags := $(SGX_COMMON_CFLAGS) -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) -lpthread - -ifneq ($(SGX_MODE), HW) - App_Link_Flags += -lsgx_uae_service_sim -else - App_Link_Flags += -lsgx_uae_service -endif - -App_Cpp_Objects := $(App_Cpp_Files:.cpp=.o) - -App_Name := app - -######## Enclave Settings ######## - -Enclave_Version_Script := Enclave/Enclave_debug.lds -ifeq ($(SGX_MODE), HW) -ifneq ($(SGX_DEBUG), 1) -ifneq ($(SGX_PRERELEASE), 1) - # Choose to use 'Enclave.lds' for HW release mode - Enclave_Version_Script = Enclave/Enclave.lds -endif -endif -endif - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif -Crypto_Library_Name := sgx_tcrypto - -Enclave_Cpp_Files := Enclave/Enclave.cpp $(wildcard Enclave/TrustedLibrary/*.cpp) -Enclave_Include_Paths := -IInclude -IEnclave -I$(SGX_SDK)/include -I$(SGX_SDK)/include/libcxx -I$(SGX_SDK)/include/tlibc - -Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $(Enclave_Include_Paths) -Enclave_Cpp_Flags := $(Enclave_C_Flags) -nostdinc++ -std=c++11 - -# To generate a proper enclave, it is recommended to follow below guideline to link the trusted libraries: -# 1. Link sgx_trts with the `--whole-archive' and `--no-whole-archive' options, -# so that the whole content of trts is included in the enclave. -# 2. For other libraries, you just need to pull the required symbols. -# Use `--start-group' and `--end-group' to link these libraries. -# Do NOT move the libraries linked with `--start-group' and `--end-group' within `--whole-archive' and `--no-whole-archive' options. -# Otherwise, you may get some undesirable errors. -Enclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 \ - -Wl,--version-script=$(Enclave_Version_Script) - -Enclave_Cpp_Objects := $(Enclave_Cpp_Files:.cpp=.o) - -Enclave_Name := enclave.so -Signed_Enclave_Name := enclave.signed.so -Enclave_Config_File := Enclave/Enclave.config.xml - -ifeq ($(SGX_MODE), HW) -ifeq ($(SGX_DEBUG), 1) - Build_Mode = HW_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = HW_PRERELEASE -else - Build_Mode = HW_RELEASE -endif -else -ifeq ($(SGX_DEBUG), 1) - Build_Mode = SIM_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = SIM_PRERELEASE -else - Build_Mode = SIM_RELEASE -endif -endif - - -.PHONY: all run - -ifeq ($(Build_Mode), HW_RELEASE) -all: .config_$(Build_Mode)_$(SGX_ARCH) $(App_Name) $(Enclave_Name) - @echo "The project has been built in release hardware mode." - @echo "Please sign the $(Enclave_Name) first with your signing key before you run the $(App_Name) to launch and access the enclave." - @echo "To sign the enclave use the command:" - @echo " $(SGX_ENCLAVE_SIGNER) sign -key -enclave $(Enclave_Name) -out <$(Signed_Enclave_Name)> -config $(Enclave_Config_File)" - @echo "You can also sign the enclave using an external signing tool." - @echo "To build the project in simulation mode set SGX_MODE=SIM. To build the project in prerelease mode set SGX_PRERELEASE=1 and SGX_MODE=HW." -else -all: .config_$(Build_Mode)_$(SGX_ARCH) $(App_Name) $(Signed_Enclave_Name) -ifeq ($(Build_Mode), HW_DEBUG) - @echo "The project has been built in debug hardware mode." -else ifeq ($(Build_Mode), SIM_DEBUG) - @echo "The project has been built in debug simulation mode." -else ifeq ($(Build_Mode), HW_PRERELEASE) - @echo "The project has been built in pre-release hardware mode." -else ifeq ($(Build_Mode), SIM_PRERELEASE) - @echo "The project has been built in pre-release simulation mode." -else - @echo "The project has been built in release simulation mode." -endif -endif - -run: all -ifneq ($(Build_Mode), HW_RELEASE) - @$(CURDIR)/$(App_Name) - @echo "RUN => $(App_Name) [$(SGX_MODE)|$(SGX_ARCH), OK]" -endif - -######## App Objects ######## - -App/Enclave_u.c: $(SGX_EDGER8R) Enclave/Enclave.edl - @cd App && $(SGX_EDGER8R) --untrusted ../Enclave/Enclave.edl --search-path ../Enclave --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -App/Enclave_u.o: App/Enclave_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -App/%.o: App/%.cpp - @$(CXX) $(App_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(App_Name): App/Enclave_u.o $(App_Cpp_Objects) - @$(CXX) $^ -o $@ $(App_Link_Flags) - @echo "LINK => $@" - -.config_$(Build_Mode)_$(SGX_ARCH): - @rm -f .config_* $(App_Name) $(Enclave_Name) $(Signed_Enclave_Name) $(App_Cpp_Objects) App/Enclave_u.* $(Enclave_Cpp_Objects) Enclave/Enclave_t.* - @touch .config_$(Build_Mode)_$(SGX_ARCH) - -######## Enclave Objects ######## - -Enclave/Enclave_t.c: $(SGX_EDGER8R) Enclave/Enclave.edl - @cd Enclave && $(SGX_EDGER8R) --trusted ../Enclave/Enclave.edl --search-path ../Enclave --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -Enclave/Enclave_t.o: Enclave/Enclave_t.c - @$(CC) $(Enclave_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -Enclave/%.o: Enclave/%.cpp - @$(CXX) $(Enclave_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(Enclave_Name): Enclave/Enclave_t.o $(Enclave_Cpp_Objects) - @$(CXX) $^ -o $@ $(Enclave_Link_Flags) - @echo "LINK => $@" - -$(Signed_Enclave_Name): $(Enclave_Name) - @$(SGX_ENCLAVE_SIGNER) sign -key Enclave/Enclave_private.pem -enclave $(Enclave_Name) -out $@ -config $(Enclave_Config_File) - @echo "SIGN => $@" - -.PHONY: clean - -clean: - @rm -f .config_* $(App_Name) $(Enclave_Name) $(Signed_Enclave_Name) $(App_Cpp_Objects) App/Enclave_u.* $(Enclave_Cpp_Objects) Enclave/Enclave_t.* diff --git a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/README.txt b/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/README.txt deleted file mode 100644 index 0acdaee937..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/Cxx11SGXDemo/README.txt +++ /dev/null @@ -1,46 +0,0 @@ ------------------------ -Purpose of Cxx11SGXDemo ------------------------ - -The project demonstrates serveral C++11 features inside the Enclave: -- lambda expressions; -- rvalue references and move semantics; -- automatic type deduction with auto and decltype; -- nullptr type; -- strongly typed enum classes; -- Range-based for statements; -- static_assert keyword for compile-time assertion; -- initializer lists and uniform initialization syntax; -- New virtual function controls: override, final, default, and delete; -- delegating constructors; -- new container classes (unordered_set, unordered_map, unordered_multiset, and unordered_multimap); -- tuple class; -- function object wrapper; -- atomic, mutexes, condition_variables; -- new smart pointer classes: shared_ptr, unique_ptr; -- new c++ algorithms: all_of, any_of, none_of; -- variadic templates; -- SFINAE; - ---------------------------------------------- -How to Build/Execute the C++11 sample program ---------------------------------------------- -1. Install Intel(R) Software Guard Extensions (Intel(R) SGX) SDK for Linux* OS -2. Make sure your environment is set: - $ source ${sgx-sdk-install-path}/environment -3. Build the project with the prepared Makefile: - a. Hardware Mode, Debug build: - $ make - b. Hardware Mode, Pre-release build: - $ make SGX_PRERELEASE=1 SGX_DEBUG=0 - c. Hardware Mode, Release build: - $ make SGX_DEBUG=0 - d. Simulation Mode, Debug build: - $ make SGX_MODE=SIM - e. Simulation Mode, Pre-release build: - $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0 - f. Simulation Mode, Release build: - $ make SGX_MODE=SIM SGX_DEBUG=0 -4. Execute the binary directly: - $ ./app -5. Remember to "make clean" before switching build mode diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.cproject b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.cproject deleted file mode 100644 index 12d5e297b8..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.cproject +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.project b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.project deleted file mode 100644 index df8b1a4d24..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - LocalAttestation - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.core.ccnature - com.intel.sgx.sgxnature - - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.settings/language.settings.xml b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.settings/language.settings.xml deleted file mode 100644 index bb1f9221e3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/.settings/language.settings.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/App/App.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/App/App.cpp deleted file mode 100644 index a80ce7607e..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/App/App.cpp +++ /dev/null @@ -1,450 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -// App.cpp : Defines the entry point for the console application. -#include -#include -#include "../Enclave1/Enclave1_u.h" -#include "../Enclave2/Enclave2_u.h" -#include "../Enclave3/Enclave3_u.h" -#include "sgx_eid.h" -#include "sgx_urts.h" -#define __STDC_FORMAT_MACROS -#include - - -#define UNUSED(val) (void)(val) -#define TCHAR char -#define _TCHAR char -#define _T(str) str -#define scanf_s scanf -#define _tmain main - -extern std::mapg_enclave_id_map; - - -sgx_enclave_id_t e1_enclave_id = 0; -sgx_enclave_id_t e2_enclave_id = 0; -sgx_enclave_id_t e3_enclave_id = 0; - -#define ENCLAVE1_PATH "libenclave1.so" -#define ENCLAVE2_PATH "libenclave2.so" -#define ENCLAVE3_PATH "libenclave3.so" - -void waitForKeyPress() -{ - char ch; - int temp; - printf("\n\nHit a key....\n"); - temp = scanf_s("%c", &ch); -} - -uint32_t load_enclaves() -{ - uint32_t enclave_temp_no; - int ret, launch_token_updated; - sgx_launch_token_t launch_token; - - enclave_temp_no = 0; - - ret = sgx_create_enclave(ENCLAVE1_PATH, SGX_DEBUG_FLAG, &launch_token, &launch_token_updated, &e1_enclave_id, NULL); - if (ret != SGX_SUCCESS) { - return ret; - } - - enclave_temp_no++; - g_enclave_id_map.insert(std::pair(e1_enclave_id, enclave_temp_no)); - - ret = sgx_create_enclave(ENCLAVE2_PATH, SGX_DEBUG_FLAG, &launch_token, &launch_token_updated, &e2_enclave_id, NULL); - if (ret != SGX_SUCCESS) { - return ret; - } - - enclave_temp_no++; - g_enclave_id_map.insert(std::pair(e2_enclave_id, enclave_temp_no)); - - ret = sgx_create_enclave(ENCLAVE3_PATH, SGX_DEBUG_FLAG, &launch_token, &launch_token_updated, &e3_enclave_id, NULL); - if (ret != SGX_SUCCESS) { - return ret; - } - - enclave_temp_no++; - g_enclave_id_map.insert(std::pair(e3_enclave_id, enclave_temp_no)); - - - - return SGX_SUCCESS; -} - -int _tmain(int argc, _TCHAR* argv[]) -{ - uint32_t ret_status; - sgx_status_t status; - - UNUSED(argc); - UNUSED(argv); - - if(load_enclaves() != SGX_SUCCESS) - { - printf("\nLoad Enclave Failure"); - } - - printf("\nAvailable Enclaves"); - printf("\nEnclave1 - EnclaveID %" PRIx64, e1_enclave_id); - printf("\nEnclave2 - EnclaveID %" PRIx64, e2_enclave_id); - printf("\nEnclave3 - EnclaveID %" PRIx64, e3_enclave_id); - - do - { - //Test Create session between Enclave1(Source) and Enclave2(Destination) - status = Enclave1_test_create_session(e1_enclave_id, &ret_status, e1_enclave_id, e2_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave1_test_create_session Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nSecure Channel Establishment between Source (E1) and Destination (E2) Enclaves successful !!!"); - } - else - { - printf("\nSession establishment and key exchange failure between Source (E1) and Destination (E2): Error code is %x", ret_status); - break; - } - } - - //Test Enclave to Enclave call between Enclave1(Source) and Enclave2(Destination) - status = Enclave1_test_enclave_to_enclave_call(e1_enclave_id, &ret_status, e1_enclave_id, e2_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave1_test_enclave_to_enclave_call Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nEnclave to Enclave Call between Source (E1) and Destination (E2) Enclaves successful !!!"); - } - else - { - printf("\n\nEnclave to Enclave Call failure between Source (E1) and Destination (E2): Error code is %x", ret_status); - break; - } - } - //Test message exchange between Enclave1(Source) and Enclave2(Destination) - status = Enclave1_test_message_exchange(e1_enclave_id, &ret_status, e1_enclave_id, e2_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave1_test_message_exchange Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nMessage Exchange between Source (E1) and Destination (E2) Enclaves successful !!!"); - } - else - { - printf("\n\nMessage Exchange failure between Source (E1) and Destination (E2): Error code is %x", ret_status); - break; - } - } - //Test Create session between Enclave1(Source) and Enclave3(Destination) - status = Enclave1_test_create_session(e1_enclave_id, &ret_status, e1_enclave_id, e3_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave1_test_create_session Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nSecure Channel Establishment between Source (E1) and Destination (E3) Enclaves successful !!!"); - } - else - { - printf("\n\nSession establishment and key exchange failure between Source (E1) and Destination (E3): Error code is %x", ret_status); - break; - } - } - //Test Enclave to Enclave call between Enclave1(Source) and Enclave3(Destination) - status = Enclave1_test_enclave_to_enclave_call(e1_enclave_id, &ret_status, e1_enclave_id, e3_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave1_test_enclave_to_enclave_call Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nEnclave to Enclave Call between Source (E1) and Destination (E3) Enclaves successful !!!"); - } - else - { - printf("\n\nEnclave to Enclave Call failure between Source (E1) and Destination (E3): Error code is %x", ret_status); - break; - } - } - //Test message exchange between Enclave1(Source) and Enclave3(Destination) - status = Enclave1_test_message_exchange(e1_enclave_id, &ret_status, e1_enclave_id, e3_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave1_test_message_exchange Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nMessage Exchange between Source (E1) and Destination (E3) Enclaves successful !!!"); - } - else - { - printf("\n\nMessage Exchange failure between Source (E1) and Destination (E3): Error code is %x", ret_status); - break; - } - } - - //Test Create session between Enclave2(Source) and Enclave3(Destination) - status = Enclave2_test_create_session(e2_enclave_id, &ret_status, e2_enclave_id, e3_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave2_test_create_session Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nSecure Channel Establishment between Source (E2) and Destination (E3) Enclaves successful !!!"); - } - else - { - printf("\n\nSession establishment and key exchange failure between Source (E2) and Destination (E3): Error code is %x", ret_status); - break; - } - } - //Test Enclave to Enclave call between Enclave2(Source) and Enclave3(Destination) - status = Enclave2_test_enclave_to_enclave_call(e2_enclave_id, &ret_status, e2_enclave_id, e3_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave2_test_enclave_to_enclave_call Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nEnclave to Enclave Call between Source (E2) and Destination (E3) Enclaves successful !!!"); - } - else - { - printf("\n\nEnclave to Enclave Call failure between Source (E2) and Destination (E3): Error code is %x", ret_status); - break; - } - } - //Test message exchange between Enclave2(Source) and Enclave3(Destination) - status = Enclave2_test_message_exchange(e2_enclave_id, &ret_status, e2_enclave_id, e3_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave2_test_message_exchange Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nMessage Exchange between Source (E2) and Destination (E3) Enclaves successful !!!"); - } - else - { - printf("\n\nMessage Exchange failure between Source (E2) and Destination (E3): Error code is %x", ret_status); - break; - } - } - - //Test Create session between Enclave3(Source) and Enclave1(Destination) - status = Enclave3_test_create_session(e3_enclave_id, &ret_status, e3_enclave_id, e1_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave3_test_create_session Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nSecure Channel Establishment between Source (E3) and Destination (E1) Enclaves successful !!!"); - } - else - { - printf("\n\nSession establishment and key exchange failure between Source (E3) and Destination (E1): Error code is %x", ret_status); - break; - } - } - //Test Enclave to Enclave call between Enclave3(Source) and Enclave1(Destination) - status = Enclave3_test_enclave_to_enclave_call(e3_enclave_id, &ret_status, e3_enclave_id, e1_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave3_test_enclave_to_enclave_call Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nEnclave to Enclave Call between Source (E3) and Destination (E1) Enclaves successful !!!"); - } - else - { - printf("\n\nEnclave to Enclave Call failure between Source (E3) and Destination (E1): Error code is %x", ret_status); - break; - } - } - //Test message exchange between Enclave3(Source) and Enclave1(Destination) - status = Enclave3_test_message_exchange(e3_enclave_id, &ret_status, e3_enclave_id, e1_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave3_test_message_exchange Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nMessage Exchange between Source (E3) and Destination (E1) Enclaves successful !!!"); - } - else - { - printf("\n\nMessage Exchange failure between Source (E3) and Destination (E1): Error code is %x", ret_status); - break; - } - } - - - //Test Closing Session between Enclave1(Source) and Enclave2(Destination) - status = Enclave1_test_close_session(e1_enclave_id, &ret_status, e1_enclave_id, e2_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave1_test_close_session Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nClose Session between Source (E1) and Destination (E2) Enclaves successful !!!"); - } - else - { - printf("\n\nClose session failure between Source (E1) and Destination (E2): Error code is %x", ret_status); - break; - } - } - //Test Closing Session between Enclave1(Source) and Enclave3(Destination) - status = Enclave1_test_close_session(e1_enclave_id, &ret_status, e1_enclave_id, e3_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave1_test_close_session Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nClose Session between Source (E1) and Destination (E3) Enclaves successful !!!"); - } - else - { - printf("\n\nClose session failure between Source (E1) and Destination (E3): Error code is %x", ret_status); - break; - } - } - //Test Closing Session between Enclave2(Source) and Enclave3(Destination) - status = Enclave2_test_close_session(e2_enclave_id, &ret_status, e2_enclave_id, e3_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave2_test_close_session Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nClose Session between Source (E2) and Destination (E3) Enclaves successful !!!"); - } - else - { - printf("\n\nClose session failure between Source (E2) and Destination (E3): Error code is %x", ret_status); - break; - } - } - //Test Closing Session between Enclave3(Source) and Enclave1(Destination) - status = Enclave3_test_close_session(e3_enclave_id, &ret_status, e3_enclave_id, e1_enclave_id); - if (status!=SGX_SUCCESS) - { - printf("Enclave3_test_close_session Ecall failed: Error code is %x", status); - break; - } - else - { - if(ret_status==0) - { - printf("\n\nClose Session between Source (E3) and Destination (E1) Enclaves successful !!!"); - } - else - { - printf("\n\nClose session failure between Source (E3) and Destination (E1): Error code is %x", ret_status); - break; - } - } - -#pragma warning (push) -#pragma warning (disable : 4127) - }while(0); -#pragma warning (pop) - - sgx_destroy_enclave(e1_enclave_id); - sgx_destroy_enclave(e2_enclave_id); - sgx_destroy_enclave(e3_enclave_id); - - waitForKeyPress(); - - return 0; -} diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.config.xml b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.config.xml deleted file mode 100644 index 95549474f2..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 0 - 0 - 0x40000 - 0x100000 - 1 - 1 - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.cpp deleted file mode 100644 index d062362739..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.cpp +++ /dev/null @@ -1,373 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -// Enclave1.cpp : Defines the exported functions for the .so application -#include "sgx_eid.h" -#include "Enclave1_t.h" -#include "EnclaveMessageExchange.h" -#include "error_codes.h" -#include "Utility_E1.h" -#include "sgx_thread.h" -#include "sgx_dh.h" -#include - -#define UNUSED(val) (void)(val) - -std::mapg_src_session_info_map; - -static uint32_t e1_foo1_wrapper(ms_in_msg_exchange_t *ms, size_t param_lenth, char** resp_buffer, size_t* resp_length); - -//Function pointer table containing the list of functions that the enclave exposes -const struct { - size_t num_funcs; - const void* table[1]; -} func_table = { - 1, - { - (const void*)e1_foo1_wrapper, - } -}; - -//Makes use of the sample code function to establish a secure channel with the destination enclave (Test Vector) -uint32_t test_create_session(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - dh_session_t dest_session_info; - - //Core reference code function for creating a session - ke_status = create_session(src_enclave_id, dest_enclave_id, &dest_session_info); - - //Insert the session information into the map under the corresponding destination enclave id - if(ke_status == SUCCESS) - { - g_src_session_info_map.insert(std::pair(dest_enclave_id, dest_session_info)); - } - memset(&dest_session_info, 0, sizeof(dh_session_t)); - return ke_status; -} - -//Makes use of the sample code function to do an enclave to enclave call (Test Vector) -uint32_t test_enclave_to_enclave_call(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - uint32_t var1,var2; - uint32_t target_fn_id, msg_type; - char* marshalled_inp_buff; - size_t marshalled_inp_buff_len; - char* out_buff; - size_t out_buff_len; - dh_session_t *dest_session_info; - size_t max_out_buff_size; - char* retval; - - var1 = 0x4; - var2 = 0x5; - target_fn_id = 0; - msg_type = ENCLAVE_TO_ENCLAVE_CALL; - max_out_buff_size = 50; - - //Marshals the input parameters for calling function foo1 in Enclave2 into a input buffer - ke_status = marshal_input_parameters_e2_foo1(target_fn_id, msg_type, var1, var2, &marshalled_inp_buff, &marshalled_inp_buff_len); - if(ke_status != SUCCESS) - { - return ke_status; - } - - //Search the map for the session information associated with the destination enclave id of Enclave2 passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = &it->second; - } - else - { - SAFE_FREE(marshalled_inp_buff); - return INVALID_SESSION; - } - - //Core Reference Code function - ke_status = send_request_receive_response(src_enclave_id, dest_enclave_id, dest_session_info, marshalled_inp_buff, - marshalled_inp_buff_len, max_out_buff_size, &out_buff, &out_buff_len); - - - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - //Un-marshal the return value and output parameters from foo1 of Enclave 2 - ke_status = unmarshal_retval_and_output_parameters_e2_foo1(out_buff, &retval); - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - SAFE_FREE(retval); - return SUCCESS; -} - -//Makes use of the sample code function to do a generic secret message exchange (Test Vector) -uint32_t test_message_exchange(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - uint32_t target_fn_id, msg_type; - char* marshalled_inp_buff; - size_t marshalled_inp_buff_len; - char* out_buff; - size_t out_buff_len; - dh_session_t *dest_session_info; - size_t max_out_buff_size; - char* secret_response; - uint32_t secret_data; - - target_fn_id = 0; - msg_type = MESSAGE_EXCHANGE; - max_out_buff_size = 50; - secret_data = 0x12345678; //Secret Data here is shown only for purpose of demonstration. - - //Marshals the secret data into a buffer - ke_status = marshal_message_exchange_request(target_fn_id, msg_type, secret_data, &marshalled_inp_buff, &marshalled_inp_buff_len); - if(ke_status != SUCCESS) - { - return ke_status; - } - //Search the map for the session information associated with the destination enclave id passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = &it->second; - } - else - { - SAFE_FREE(marshalled_inp_buff); - return INVALID_SESSION; - } - - //Core Reference Code function - ke_status = send_request_receive_response(src_enclave_id, dest_enclave_id, dest_session_info, marshalled_inp_buff, - marshalled_inp_buff_len, max_out_buff_size, &out_buff, &out_buff_len); - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - //Un-marshal the secret response data - ke_status = umarshal_message_exchange_response(out_buff, &secret_response); - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - SAFE_FREE(secret_response); - return SUCCESS; -} - - -//Makes use of the sample code function to close a current session -uint32_t test_close_session(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - dh_session_t dest_session_info; - ATTESTATION_STATUS ke_status = SUCCESS; - //Search the map for the session information associated with the destination enclave id passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = it->second; - } - else - { - return NULL; - } - - //Core reference code function for closing a session - ke_status = close_session(src_enclave_id, dest_enclave_id); - - //Erase the session information associated with the destination enclave id - g_src_session_info_map.erase(dest_enclave_id); - return ke_status; -} - -//Function that is used to verify the trust of the other enclave -//Each enclave can have its own way verifying the peer enclave identity -extern "C" uint32_t verify_peer_enclave_trust(sgx_dh_session_enclave_identity_t* peer_enclave_identity) -{ - if(!peer_enclave_identity) - { - return INVALID_PARAMETER_ERROR; - } - if(peer_enclave_identity->isv_prod_id != 0 || !(peer_enclave_identity->attributes.flags & SGX_FLAGS_INITTED)) - // || peer_enclave_identity->attributes.xfrm !=3)// || peer_enclave_identity->mr_signer != xx //TODO: To be hardcoded with values to check - { - return ENCLAVE_TRUST_ERROR; - } - else - { - return SUCCESS; - } -} - - -//Dispatcher function that calls the approriate enclave function based on the function id -//Each enclave can have its own way of dispatching the calls from other enclave -extern "C" uint32_t enclave_to_enclave_call_dispatcher(char* decrypted_data, - size_t decrypted_data_length, - char** resp_buffer, - size_t* resp_length) -{ - ms_in_msg_exchange_t *ms; - uint32_t (*fn1)(ms_in_msg_exchange_t *ms, size_t, char**, size_t*); - if(!decrypted_data || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - ms = (ms_in_msg_exchange_t *)decrypted_data; - if(ms->target_fn_id >= func_table.num_funcs) - { - return INVALID_PARAMETER_ERROR; - } - fn1 = (uint32_t (*)(ms_in_msg_exchange_t*, size_t, char**, size_t*))func_table.table[ms->target_fn_id]; - return fn1(ms, decrypted_data_length, resp_buffer, resp_length); -} - -//Operates on the input secret and generates the output secret -uint32_t get_message_exchange_response(uint32_t inp_secret_data) -{ - uint32_t secret_response; - - //User should use more complex encryption method to protect their secret, below is just a simple example - secret_response = inp_secret_data & 0x11111111; - - return secret_response; - -} - -//Generates the response from the request message -extern "C" uint32_t message_exchange_response_generator(char* decrypted_data, - char** resp_buffer, - size_t* resp_length) -{ - ms_in_msg_exchange_t *ms; - uint32_t inp_secret_data; - uint32_t out_secret_data; - if(!decrypted_data || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - ms = (ms_in_msg_exchange_t *)decrypted_data; - - if(umarshal_message_exchange_request(&inp_secret_data,ms) != SUCCESS) - return ATTESTATION_ERROR; - - out_secret_data = get_message_exchange_response(inp_secret_data); - - if(marshal_message_exchange_response(resp_buffer, resp_length, out_secret_data) != SUCCESS) - return MALLOC_ERROR; - - return SUCCESS; - -} - - -static uint32_t e1_foo1(external_param_struct_t *p_struct_var) -{ - if(!p_struct_var) - { - return INVALID_PARAMETER_ERROR; - } - (p_struct_var->var1)++; - (p_struct_var->var2)++; - (p_struct_var->p_internal_struct->ivar1)++; - (p_struct_var->p_internal_struct->ivar2)++; - - return (p_struct_var->var1 + p_struct_var->var2 + p_struct_var->p_internal_struct->ivar1 + p_struct_var->p_internal_struct->ivar2); -} - -//Function which is executed on request from the source enclave -static uint32_t e1_foo1_wrapper(ms_in_msg_exchange_t *ms, - size_t param_lenth, - char** resp_buffer, - size_t* resp_length) -{ - UNUSED(param_lenth); - - uint32_t ret; - size_t len_data, len_ptr_data; - external_param_struct_t *p_struct_var; - internal_param_struct_t internal_struct_var; - - if(!ms || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - - p_struct_var = (external_param_struct_t*)malloc(sizeof(external_param_struct_t)); - if(!p_struct_var) - return MALLOC_ERROR; - - p_struct_var->p_internal_struct = &internal_struct_var; - - if(unmarshal_input_parameters_e1_foo1(p_struct_var, ms) != SUCCESS)//can use the stack - { - SAFE_FREE(p_struct_var); - return ATTESTATION_ERROR; - } - - ret = e1_foo1(p_struct_var); - - len_data = sizeof(external_param_struct_t) - sizeof(p_struct_var->p_internal_struct); - len_ptr_data = sizeof(internal_struct_var); - - if(marshal_retval_and_output_parameters_e1_foo1(resp_buffer, resp_length, ret, p_struct_var, len_data, len_ptr_data) != SUCCESS) - { - SAFE_FREE(p_struct_var); - return MALLOC_ERROR; - } - SAFE_FREE(p_struct_var); - return SUCCESS; -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.edl b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.edl deleted file mode 100644 index e1e2b25676..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.edl +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -enclave { - include "sgx_eid.h" - from "../LocalAttestationCode/LocalAttestationCode.edl" import *; - from "sgx_tstdc.edl" import *; - trusted{ - public uint32_t test_create_session(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_enclave_to_enclave_call(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_message_exchange(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_close_session(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - }; - -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.lds b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.lds deleted file mode 100644 index f2ee453e1b..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1.lds +++ /dev/null @@ -1,10 +0,0 @@ -Enclave1.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - g_peak_heap_used; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1_private.pem b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1_private.pem deleted file mode 100644 index 75d7f88cb9..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Enclave1_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4wIBAAKCAYEAuJh4w/KzndQhzEqwH6Ut/3BmOom5CN117KT1/cemEbDLPhn0 -c5yjAfe4NL1qtGqz0RTK9X9BBSi89b6BrsM9S6c2cUJaeYAPrAtJ+IuzN/5BAmmf -RXbPccETd7rHvDdQ9KBRjCipTx+H0D5nOB76S5PZPVrduwrCmSqVFmLNVWWfPYQx -YewbJ2QfEfioICZFYR0Jou38mJqDTl+CH0gLAuQ4n1kdpQ3VGymzt3oUiPzf5ImJ -oZh5HjarRRiWV+cyNyXYJTnx0dOtFQDgd8HhniagbRB0ZOIt6599JjMkWGkVP0Ni -U/NIlXG5musU35GfLB8MbTcxblMNm9sMYz1R8y/eAreoPTXUhtK8NG2TEywRh3UP -RF9/jM9WczjQXxJ3RznKOwNVwg4cRY2AOqD2vb1iGSqyc/WMzVULgfclkcScp75/ -Auz9Y6473CQvaxyrseSWHGwCG7KG1GxYE8Bg8T6OlYD4mzKggoMdwVLAzUepRaPZ -5hqRDZzbTGUxJ+GLAgEDAoIBgHsQUIKhzRPiwTLcdWpuHqpK7tGxJgXo+Uht+VPa -brZ13NQRTaJobKv6es3TnHhHIotjMfj/gK4bKKPUVnSCKN0aJEuBkaZVX8gHhqWy -d3qpgKxGai5PNPaAt6UnL9LPi03ANl1wcN9qWorURNAUpt0NO348k9IHLGYcY2RB -3jjuaikCy5adZ2+YFLalxWrELkC+BmyeqGW8V4mVAWowB1dC0Go7aRiz42dxInpR -YwX96phbsRZlphQkci4QZDqaIFg3ndzTO5bo704zaMcbWtEjmFrYRyb519tRoDkN -Y0rGwOxFANeRV5dSfGGLm7K5JztiuHN0nMu3PhY4LOV0SeZ4+5sYn0LzB2nyKqgy -/c3AA2OG34DEdGxxh94kD66iKFVPyJG38/gnu9CsGmrLl3n4fgutPEVIbPdSSjex -4Y9EQfcnqImPxTrpP9CqD208VPcQHD/uy8s9q3961Ew3RPdHMZ8amIJdXkOmPEme -KZ7SG+VENBaj8r038iq1mPzcWwKBwQDcvJg75LfVuKX+cWMrTO2+MFVcEFiZ/NB/ -gh7mgL6lCleROVa9P6iR2Wn6vHq8nP5BkChehm/rXEG78fgXEMoArimF7FrrICfI -4yB0opDJz/tWrE/62impN7OR8Ce+RQThFj4RTnibQEEVt++JMUXFiMKLdWDSpC2i -tNWnlTOb7d89bk0yk62IoLElCZK/MIMxkCHBKW6YgrmvlPJKQwpA6Z3wQbUpE6Rb -9f8xJfxZGEJPH0s3Ds9A0CVuEt8OOXcCgcEA1hXTHhhgmb2gIUJgIcvrpkDmiLux -EG6ZoyLt6h5QwzScS6KKU1mcoJyVDd0wlt7mEXrPYYHWUWPuvpTQ8/4ZGMw7FCZe -bakhnwRbw36FlLwRG35wCF6nQO1XFBKRGto15ivfTyDvMpJBdtNpET5NwT/ifDF3 -OWS7t6TGhtcfnvBad5S1AgGoAq+q/huFiBGpDbxJ+1xh0lNL5Z8nVypvPWomNpde -rpLuwRPEIb+GBfQ9Hp5AjRXVsPjKnkHsnl2NAoHBAJMoZX1DJTklw/72Qhzd89Qg -OOgK5bv94FUBae8Afxixj7YmOdN/xbaQ8VHS/H29/tZgGumu9UeS1n1L+roLMVXJ -cQPy50dqxTCXavhsYIaKp48diqc8G8YlImFKxSmDWJYO1AuJpbzVgLklSlt2LoOw -gbJOQIxtc8HN48UOImfz6ij0M3cNHlsVy24GYdTLAiEKwStw9GWse8pjTDGCBtXx -E/WBI3C3wuf5VMtuqDtlgYoU3M9fNNXgGPQMlLQmTwKBwQCOuTdpZZW708AWLEAW -h/Ju1e8F0nYK9GZswfPxaYsszb2HwbGM5mhrEw4JPiBklJlg/IpBATmLl/R/DeCi -qWYQiCdixD7zxhZqAufXqa5jKAtnqaAFlG+AnjoNYbYR5s6ZcpTfa0ohttZPN5tg -1DPWKpb9dk97mH0lGIRZ5L+/Sub6YyNWq8VXH8dUElkFYRtefYankuvhjN1Dv2+P -cZ9+RsQkZOnJt0nWDS1r1QQD+Ci/FCsIuTkgpdxpgUhpk7MCgcEAkfkmaBDb7DG2 -Kc39R6ZZuPnV10w+WOpph7ugwcguG/E0wGq+jFWv6HFckCPeHT4BNtOk8Dem/kPp -teF51eAuFWEefj2tScvlSBBPcnla+WzMWXrlxVnajTt73w+oT2Ql//WhgREpsNfx -SvU80YPVu4GJfl+hhxBifLx+0FM20OESW93qFRc3p040bNrDY9JIZuly/y5zaiBa -mRZF9H8P+x3Lu5AJpdXQEOMZ/XJ/xkoWWjbTojkmgOmmZSMLd5Te ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Utility_E1.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Utility_E1.cpp deleted file mode 100644 index 7787de30af..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Utility_E1.cpp +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "sgx_eid.h" -#include "EnclaveMessageExchange.h" -#include "error_codes.h" -#include "Utility_E1.h" -#include "stdlib.h" -#include "string.h" - -uint32_t marshal_input_parameters_e2_foo1(uint32_t target_fn_id, uint32_t msg_type, uint32_t var1, uint32_t var2, char** marshalled_buff, size_t* marshalled_buff_len) -{ - ms_in_msg_exchange_t *ms; - size_t param_len, ms_len; - char *temp_buff; - - param_len = sizeof(var1)+sizeof(var2); - temp_buff = (char*)malloc(param_len); - if(!temp_buff) - return MALLOC_ERROR; - - memcpy(temp_buff,&var1,sizeof(var1)); - memcpy(temp_buff+sizeof(var1),&var2,sizeof(var2)); - ms_len = sizeof(ms_in_msg_exchange_t) + param_len; - ms = (ms_in_msg_exchange_t *)malloc(ms_len); - if(!ms) - { - SAFE_FREE(temp_buff); - return MALLOC_ERROR; - } - ms->msg_type = msg_type; - ms->target_fn_id = target_fn_id; - ms->inparam_buff_len = (uint32_t)param_len; - memcpy(&ms->inparam_buff, temp_buff, param_len); - *marshalled_buff = (char*)ms; - *marshalled_buff_len = ms_len; - SAFE_FREE(temp_buff); - return SUCCESS; -} - -uint32_t unmarshal_retval_and_output_parameters_e2_foo1(char* out_buff, char** retval) -{ - size_t retval_len; - ms_out_msg_exchange_t *ms; - if(!out_buff) - return INVALID_PARAMETER_ERROR; - ms = (ms_out_msg_exchange_t *)out_buff; - retval_len = ms->retval_len; - *retval = (char*)malloc(retval_len); - if(!*retval) - return MALLOC_ERROR; - - memcpy(*retval, ms->ret_outparam_buff, retval_len); - return SUCCESS; -} - -uint32_t unmarshal_input_parameters_e1_foo1(external_param_struct_t *pstruct, ms_in_msg_exchange_t* ms) -{ - char* buff; - size_t len; - if(!pstruct || !ms) - return INVALID_PARAMETER_ERROR; - - buff = ms->inparam_buff; - len = ms->inparam_buff_len; - if(len != (sizeof(pstruct->var1)+sizeof(pstruct->var2)+sizeof(pstruct->p_internal_struct->ivar1)+sizeof(pstruct->p_internal_struct->ivar2))) - return ATTESTATION_ERROR; - - memcpy(&pstruct->var1, buff, sizeof(pstruct->var1)); - memcpy(&pstruct->var2, buff + sizeof(pstruct->var1), sizeof(pstruct->var2)); - memcpy(&pstruct->p_internal_struct->ivar1, buff+(sizeof(pstruct->var1)+sizeof(pstruct->var2)), sizeof(pstruct->p_internal_struct->ivar1)); - memcpy(&pstruct->p_internal_struct->ivar2, buff+(sizeof(pstruct->var1)+sizeof(pstruct->var2)+sizeof(pstruct->p_internal_struct->ivar1)), sizeof(pstruct->p_internal_struct->ivar2)); - - return SUCCESS; -} - -uint32_t marshal_retval_and_output_parameters_e1_foo1(char** resp_buffer, size_t* resp_length, uint32_t retval, external_param_struct_t *p_struct_var, size_t len_data, size_t len_ptr_data) -{ - ms_out_msg_exchange_t *ms; - size_t param_len, ms_len, ret_param_len;; - char *temp_buff; - int* addr; - char* struct_data; - size_t retval_len; - - if(!resp_length || !p_struct_var) - return INVALID_PARAMETER_ERROR; - - retval_len = sizeof(retval); - struct_data = (char*)p_struct_var; - param_len = len_data + len_ptr_data; - ret_param_len = param_len + retval_len; - addr = *(int **)(struct_data + len_data); - temp_buff = (char*)malloc(ret_param_len); - if(!temp_buff) - return MALLOC_ERROR; - - memcpy(temp_buff, &retval, sizeof(retval)); - memcpy(temp_buff + sizeof(retval), struct_data, len_data); - memcpy(temp_buff + sizeof(retval) + len_data, addr, len_ptr_data); - ms_len = sizeof(ms_out_msg_exchange_t) + ret_param_len; - ms = (ms_out_msg_exchange_t *)malloc(ms_len); - if(!ms) - { - SAFE_FREE(temp_buff); - return MALLOC_ERROR; - } - ms->retval_len = (uint32_t)retval_len; - ms->ret_outparam_buff_len = (uint32_t)ret_param_len; - memcpy(&ms->ret_outparam_buff, temp_buff, ret_param_len); - *resp_buffer = (char*)ms; - *resp_length = ms_len; - - SAFE_FREE(temp_buff); - return SUCCESS; -} - -uint32_t marshal_message_exchange_request(uint32_t target_fn_id, uint32_t msg_type, uint32_t secret_data, char** marshalled_buff, size_t* marshalled_buff_len) -{ - ms_in_msg_exchange_t *ms; - size_t secret_data_len, ms_len; - if(!marshalled_buff_len) - return INVALID_PARAMETER_ERROR; - secret_data_len = sizeof(secret_data); - ms_len = sizeof(ms_in_msg_exchange_t) + secret_data_len; - ms = (ms_in_msg_exchange_t *)malloc(ms_len); - if(!ms) - return MALLOC_ERROR; - - ms->msg_type = msg_type; - ms->target_fn_id = target_fn_id; - ms->inparam_buff_len = (uint32_t)secret_data_len; - memcpy(&ms->inparam_buff, &secret_data, secret_data_len); - *marshalled_buff = (char*)ms; - *marshalled_buff_len = ms_len; - return SUCCESS; -} - -uint32_t umarshal_message_exchange_request(uint32_t* inp_secret_data, ms_in_msg_exchange_t* ms) -{ - char* buff; - size_t len; - if(!inp_secret_data || !ms) - return INVALID_PARAMETER_ERROR; - buff = ms->inparam_buff; - len = ms->inparam_buff_len; - if(len != sizeof(uint32_t)) - return ATTESTATION_ERROR; - - memcpy(inp_secret_data, buff, sizeof(uint32_t)); - - return SUCCESS; -} - -uint32_t marshal_message_exchange_response(char** resp_buffer, size_t* resp_length, uint32_t secret_response) -{ - ms_out_msg_exchange_t *ms; - size_t secret_response_len, ms_len; - size_t retval_len, ret_param_len; - if(!resp_length) - return INVALID_PARAMETER_ERROR; - secret_response_len = sizeof(secret_response); - retval_len = secret_response_len; - ret_param_len = secret_response_len; - ms_len = sizeof(ms_out_msg_exchange_t) + ret_param_len; - ms = (ms_out_msg_exchange_t *)malloc(ms_len); - if(!ms) - return MALLOC_ERROR; - - ms->retval_len = (uint32_t)retval_len; - ms->ret_outparam_buff_len = (uint32_t)ret_param_len; - memcpy(&ms->ret_outparam_buff, &secret_response, secret_response_len); - *resp_buffer = (char*)ms; - *resp_length = ms_len; - return SUCCESS; -} - -uint32_t umarshal_message_exchange_response(char* out_buff, char** secret_response) -{ - size_t retval_len; - ms_out_msg_exchange_t *ms; - if(!out_buff) - return INVALID_PARAMETER_ERROR; - ms = (ms_out_msg_exchange_t *)out_buff; - retval_len = ms->retval_len; - *secret_response = (char*)malloc(retval_len); - if(!*secret_response) - { - return MALLOC_ERROR; - } - memcpy(*secret_response, ms->ret_outparam_buff, retval_len); - return SUCCESS; -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Utility_E1.h b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Utility_E1.h deleted file mode 100644 index a0f14eac51..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave1/Utility_E1.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef UTILITY_E1_H__ -#define UTILITY_E1_H__ - -#include "stdint.h" - -typedef struct _internal_param_struct_t -{ - uint32_t ivar1; - uint32_t ivar2; -}internal_param_struct_t; - -typedef struct _external_param_struct_t -{ - uint32_t var1; - uint32_t var2; - internal_param_struct_t *p_internal_struct; -}external_param_struct_t; - -#ifdef __cplusplus -extern "C" { -#endif - -uint32_t marshal_input_parameters_e2_foo1(uint32_t target_fn_id, uint32_t msg_type, uint32_t var1, uint32_t var2, char** marshalled_buff, size_t* marshalled_buff_len); -uint32_t unmarshal_retval_and_output_parameters_e2_foo1(char* out_buff, char** retval); -uint32_t unmarshal_input_parameters_e1_foo1(external_param_struct_t *pstruct, ms_in_msg_exchange_t* ms); -uint32_t marshal_retval_and_output_parameters_e1_foo1(char** resp_buffer, size_t* resp_length, uint32_t retval, external_param_struct_t *p_struct_var, size_t len_data, size_t len_ptr_data); -uint32_t marshal_message_exchange_request(uint32_t target_fn_id, uint32_t msg_type, uint32_t secret_data, char** marshalled_buff, size_t* marshalled_buff_len); -uint32_t umarshal_message_exchange_request(uint32_t* inp_secret_data, ms_in_msg_exchange_t* ms); -uint32_t marshal_message_exchange_response(char** resp_buffer, size_t* resp_length, uint32_t secret_response); -uint32_t umarshal_message_exchange_response(char* out_buff, char** secret_response); -#ifdef __cplusplus - } -#endif -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.config.xml b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.config.xml deleted file mode 100644 index 3ca2c12ad8..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 0 - 0 - 0x40000 - 0x100000 - 1 - 1 - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.cpp deleted file mode 100644 index b6a88ea6aa..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.cpp +++ /dev/null @@ -1,339 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -// Enclave2.cpp : Defines the exported functions for the DLL application -#include "sgx_eid.h" -#include "Enclave2_t.h" -#include "EnclaveMessageExchange.h" -#include "error_codes.h" -#include "Utility_E2.h" -#include "sgx_thread.h" -#include "sgx_dh.h" -#include - -#define UNUSED(val) (void)(val) - -std::mapg_src_session_info_map; - -static uint32_t e2_foo1_wrapper(ms_in_msg_exchange_t *ms, size_t param_lenth, char** resp_buffer, size_t* resp_length); - -//Function pointer table containing the list of functions that the enclave exposes -const struct { - size_t num_funcs; - const void* table[1]; -} func_table = { - 1, - { - (const void*)e2_foo1_wrapper, - } -}; - -//Makes use of the sample code function to establish a secure channel with the destination enclave -uint32_t test_create_session(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - dh_session_t dest_session_info; - //Core reference code function for creating a session - ke_status = create_session(src_enclave_id, dest_enclave_id,&dest_session_info); - if(ke_status == SUCCESS) - { - //Insert the session information into the map under the corresponding destination enclave id - g_src_session_info_map.insert(std::pair(dest_enclave_id, dest_session_info)); - } - memset(&dest_session_info, 0, sizeof(dh_session_t)); - return ke_status; -} - -//Makes use of the sample code function to do an enclave to enclave call (Test Vector) -uint32_t test_enclave_to_enclave_call(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - param_struct_t *p_struct_var, struct_var; - uint32_t target_fn_id, msg_type; - char* marshalled_inp_buff; - size_t marshalled_inp_buff_len; - char* out_buff; - size_t out_buff_len; - dh_session_t *dest_session_info; - size_t max_out_buff_size; - char* retval; - - max_out_buff_size = 50; - target_fn_id = 0; - msg_type = ENCLAVE_TO_ENCLAVE_CALL; - - struct_var.var1 = 0x3; - struct_var.var2 = 0x4; - p_struct_var = &struct_var; - - //Marshals the input parameters for calling function foo1 in Enclave3 into a input buffer - ke_status = marshal_input_parameters_e3_foo1(target_fn_id, msg_type, p_struct_var, &marshalled_inp_buff, &marshalled_inp_buff_len); - if(ke_status != SUCCESS) - { - return ke_status; - } - - //Search the map for the session information associated with the destination enclave id passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = &it->second; - } - else - { - SAFE_FREE(marshalled_inp_buff); - return INVALID_SESSION; - } - - //Core Reference Code function - ke_status = send_request_receive_response(src_enclave_id, dest_enclave_id, dest_session_info, marshalled_inp_buff, - marshalled_inp_buff_len, max_out_buff_size, &out_buff, &out_buff_len); - - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - //Un-marshal the return value and output parameters from foo1 of Enclave3 - ke_status = unmarshal_retval_and_output_parameters_e3_foo1(out_buff, p_struct_var, &retval); - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - SAFE_FREE(retval); - return SUCCESS; -} - -//Makes use of the sample code function to do a generic secret message exchange (Test Vector) -uint32_t test_message_exchange(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - uint32_t target_fn_id, msg_type; - char* marshalled_inp_buff; - size_t marshalled_inp_buff_len; - char* out_buff; - size_t out_buff_len; - dh_session_t *dest_session_info; - size_t max_out_buff_size; - char* secret_response; - uint32_t secret_data; - - target_fn_id = 0; - msg_type = MESSAGE_EXCHANGE; - max_out_buff_size = 50; - secret_data = 0x12345678; //Secret Data here is shown only for purpose of demonstration. - - //Marshals the secret data into a buffer - ke_status = marshal_message_exchange_request(target_fn_id, msg_type, secret_data, &marshalled_inp_buff, &marshalled_inp_buff_len); - if(ke_status != SUCCESS) - { - return ke_status; - } - //Search the map for the session information associated with the destination enclave id passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = &it->second; - } - else - { - SAFE_FREE(marshalled_inp_buff); - return INVALID_SESSION; - } - - //Core Reference Code function - ke_status = send_request_receive_response(src_enclave_id, dest_enclave_id, dest_session_info, marshalled_inp_buff, - marshalled_inp_buff_len, max_out_buff_size, &out_buff, &out_buff_len); - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - //Un-marshal the secret response data - ke_status = umarshal_message_exchange_response(out_buff, &secret_response); - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - SAFE_FREE(secret_response); - return SUCCESS; -} - - -//Makes use of the sample code function to close a current session -uint32_t test_close_session(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - dh_session_t dest_session_info; - ATTESTATION_STATUS ke_status = SUCCESS; - //Search the map for the session information associated with the destination enclave id passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = it->second; - } - else - { - return NULL; - } - //Core reference code function for closing a session - ke_status = close_session(src_enclave_id, dest_enclave_id); - - //Erase the session information associated with the destination enclave id - g_src_session_info_map.erase(dest_enclave_id); - return ke_status; -} - -//Function that is used to verify the trust of the other enclave -//Each enclave can have its own way verifying the peer enclave identity -extern "C" uint32_t verify_peer_enclave_trust(sgx_dh_session_enclave_identity_t* peer_enclave_identity) -{ - if(!peer_enclave_identity) - { - return INVALID_PARAMETER_ERROR; - } - if(peer_enclave_identity->isv_prod_id != 0 || !(peer_enclave_identity->attributes.flags & SGX_FLAGS_INITTED)) - // || peer_enclave_identity->attributes.xfrm !=3)// || peer_enclave_identity->mr_signer != xx //TODO: To be hardcoded with values to check - { - return ENCLAVE_TRUST_ERROR; - } - else - { - return SUCCESS; - } -} - -//Dispatch function that calls the approriate enclave function based on the function id -//Each enclave can have its own way of dispatching the calls from other enclave -extern "C" uint32_t enclave_to_enclave_call_dispatcher(char* decrypted_data, - size_t decrypted_data_length, - char** resp_buffer, - size_t* resp_length) -{ - ms_in_msg_exchange_t *ms; - uint32_t (*fn1)(ms_in_msg_exchange_t *ms, size_t, char**, size_t*); - if(!decrypted_data || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - ms = (ms_in_msg_exchange_t *)decrypted_data; - if(ms->target_fn_id >= func_table.num_funcs) - { - return INVALID_PARAMETER_ERROR; - } - fn1 = (uint32_t (*)(ms_in_msg_exchange_t*, size_t, char**, size_t*))func_table.table[ms->target_fn_id]; - return fn1(ms, decrypted_data_length, resp_buffer, resp_length); -} - -//Operates on the input secret and generates the output secret -uint32_t get_message_exchange_response(uint32_t inp_secret_data) -{ - uint32_t secret_response; - - //User should use more complex encryption method to protect their secret, below is just a simple example - secret_response = inp_secret_data & 0x11111111; - - return secret_response; - -} - -//Generates the response from the request message -extern "C" uint32_t message_exchange_response_generator(char* decrypted_data, - char** resp_buffer, - size_t* resp_length) -{ - ms_in_msg_exchange_t *ms; - uint32_t inp_secret_data; - uint32_t out_secret_data; - if(!decrypted_data || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - ms = (ms_in_msg_exchange_t *)decrypted_data; - - if(umarshal_message_exchange_request(&inp_secret_data,ms) != SUCCESS) - return ATTESTATION_ERROR; - - out_secret_data = get_message_exchange_response(inp_secret_data); - - if(marshal_message_exchange_response(resp_buffer, resp_length, out_secret_data) != SUCCESS) - return MALLOC_ERROR; - - return SUCCESS; - -} - -static uint32_t e2_foo1(uint32_t var1, uint32_t var2) -{ - return(var1 + var2); -} - -//Function which is executed on request from the source enclave -static uint32_t e2_foo1_wrapper(ms_in_msg_exchange_t *ms, - size_t param_lenth, - char** resp_buffer, - size_t* resp_length) -{ - UNUSED(param_lenth); - - uint32_t var1,var2,ret; - if(!ms || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - if(unmarshal_input_parameters_e2_foo1(&var1, &var2, ms) != SUCCESS) - return ATTESTATION_ERROR; - - ret = e2_foo1(var1, var2); - - if(marshal_retval_and_output_parameters_e2_foo1(resp_buffer, resp_length, ret) != SUCCESS ) - return MALLOC_ERROR; //can set resp buffer to null here - - return SUCCESS; -} diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.edl b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.edl deleted file mode 100644 index c2b9129163..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.edl +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -enclave { - include "sgx_eid.h" - from "../LocalAttestationCode/LocalAttestationCode.edl" import *; - from "sgx_tstdc.edl" import *; - trusted{ - public uint32_t test_create_session(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_enclave_to_enclave_call(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_message_exchange(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_close_session(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.lds b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.lds deleted file mode 100644 index 1507368237..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2.lds +++ /dev/null @@ -1,10 +0,0 @@ -Enclave2.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - g_peak_heap_used; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2_private.pem b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2_private.pem deleted file mode 100644 index 529d07be35..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Enclave2_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4gIBAAKCAYEAroOogvsj/fZDZY8XFdkl6dJmky0lRvnWMmpeH41Bla6U1qLZ -AmZuyIF+mQC/cgojIsrBMzBxb1kKqzATF4+XwPwgKz7fmiddmHyYz2WDJfAjIveJ -ZjdMjM4+EytGlkkJ52T8V8ds0/L2qKexJ+NBLxkeQLfV8n1mIk7zX7jguwbCG1Pr -nEMdJ3Sew20vnje+RsngAzdPChoJpVsWi/K7cettX/tbnre1DL02GXc5qJoQYk7b -3zkmhz31TgFrd9VVtmUGyFXAysuSAb3EN+5VnHGr0xKkeg8utErea2FNtNIgua8H -ONfm9Eiyaav1SVKzPHlyqLtcdxH3I8Wg7yqMsaprZ1n5A1v/levxnL8+It02KseD -5HqV4rf/cImSlCt3lpRg8U5E1pyFQ2IVEC/XTDMiI3c+AR+w2jSRB3Bwn9zJtFlW -KHG3m1xGI4ck+Lci1JvWWLXQagQSPtZTsubxTQNx1gsgZhgv1JHVZMdbVlAbbRMC -1nSuJNl7KPAS/VfzAgEDAoIBgHRXxaynbVP5gkO0ug6Qw/E27wzIw4SmjsxG6Wpe -K7kfDeRskKxESdsA/xCrKkwGwhcx1iIgS5+Qscd1Yg+1D9X9asd/P7waPmWoZd+Z -AhlKwhdPsO7PiF3e1AzHhGQwsUTt/Y/aSI1MpHBvy2/s1h9mFCslOUxTmWw0oj/Q -ldIEgWeNR72CE2+jFIJIyml6ftnb6qzPiga8Bm48ubKh0kvySOqnkmnPzgh+JBD6 -JnBmtZbfPT97bwTT+N6rnPqOOApvfHPf15kWI8yDbprG1l4OCUaIUH1AszxLd826 -5IPM+8gINLRDP1MA6azECPjTyHXhtnSIBZCyWSVkc05vYmNXYUNiXWMajcxW9M02 -wKzFELO8NCEAkaTPxwo4SCyIjUxiK1LbQ9h8PSy4c1+gGP4LAMR8xqP4QKg6zdu9 -osUGG/xRe/uufgTBFkcjqBHtK5L5VI0jeNIUAgW/6iNbYXjBMJ0GfauLs+g1VsOm -WfdgXzsb9DYdMa0OXXHypmV4GwKBwQDUwQj8RKJ6c8cT4vcWCoJvJF00+RFL+P3i -Gx2DLERxRrDa8AVGfqaCjsR+3vLgG8V/py+z+dxZYSqeB80Qeo6PDITcRKoeAYh9 -xlT3LJOS+k1cJcEmlbbO2IjLkTmzSwa80fWexKu8/Xv6vv15gpqYl1ngYoqJM3pd -vzmTIOi7MKSZ0WmEQavrZj8zK4endE3v0eAEeQ55j1GImbypSf7Idh7wOXtjZ7WD -Dg6yWDrri+AP/L3gClMj8wsAxMV4ZR8CgcEA0fzDHkFa6raVOxWnObmRoDhAtE0a -cjUj976NM5yyfdf2MrKy4/RhdTiPZ6b08/lBC/+xRfV3xKVGzacm6QjqjZrUpgHC -0LKiZaMtccCJjLtPwQd0jGQEnKfMFaPsnhOc5y8qVkCzVOSthY5qhz0XNotHHFmJ -gffVgB0iqrMTvSL7IA2yqqpOqNRlhaYhNl8TiFP3gIeMtVa9rZy31JPgT2uJ+kfo -gV7sdTPEjPWZd7OshGxWpT6QfVDj/T9T7L6tAoHBAI3WBf2DFvxNL2KXT2QHAZ9t -k3imC4f7U+wSE6zILaDZyzygA4RUbwG0gv8/TJVn2P/Eynf76DuWHGlaiLWnCbSz -Az2DHBQBBaku409zDQym3j1ugMRjzzSQWzJg0SIyBH3hTmnYcn3+Uqcp/lEBvGW6 -O+rsXFt3pukqJmIV8HzLGGaLm62BHUeZf3dyWm+i3p/hQAL7Xvu04QW70xuGqdr5 -afV7p5eaeQIJXyGQJ0eylV/90+qxjMKiB1XYg6WYvwKBwQCL/ddpgOdHJGN8uRom -e7Zq0Csi3hGheMKlKbN3vcxT5U7MdyHtTZZOJbTvxKNNUNYH/8uD+PqDGNneb29G -BfGzvI3EASyLIcGZF3OhKwZd0jUrWk2y7Vhob91jwp2+t73vdMbkKyI4mHOuXvGv -fg95si9oO7EBT+Oqvhccd2J+F1IVXncccYnF4u5ZGWt5lLewN/pVr7MjjykeaHqN -t+rfnQam2psA6fL4zS2zTmZPzR2tnY8Y1GBTi0Ko1OKd1HMCgcAb5cB/7/AQlhP9 -yQa04PLH9ygQkKKptZp7dy5WcWRx0K/hAHRoi2aw1wZqfm7VBNu2SLcs90kCCCxp -6C5sfJi6b8NpNbIPC+sc9wsFr7pGo9SFzQ78UlcWYK2Gu2FxlMjonhka5hvo4zvg -WxlpXKEkaFt3gLd92m/dMqBrHfafH7VwOJY2zT3WIpjwuk0ZzmRg5p0pG/svVQEH -NZmwRwlopysbR69B/n1nefJ84UO50fLh5s5Zr3gBRwbWNZyzhXk= ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Utility_E2.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Utility_E2.cpp deleted file mode 100644 index 27230848fe..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Utility_E2.cpp +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "sgx_eid.h" -#include "EnclaveMessageExchange.h" -#include "error_codes.h" -#include "Utility_E2.h" -#include "stdlib.h" -#include "string.h" - -uint32_t marshal_input_parameters_e3_foo1(uint32_t target_fn_id, uint32_t msg_type, param_struct_t *p_struct_var, char** marshalled_buff, size_t* marshalled_buff_len) -{ - ms_in_msg_exchange_t *ms; - size_t param_len, ms_len; - char *temp_buff; - if(!p_struct_var || !marshalled_buff_len) - return INVALID_PARAMETER_ERROR; - param_len = sizeof(param_struct_t); - temp_buff = (char*)malloc(param_len); - if(!temp_buff) - return MALLOC_ERROR; - memcpy(temp_buff, p_struct_var, sizeof(param_struct_t)); //can be optimized - ms_len = sizeof(ms_in_msg_exchange_t) + param_len; - ms = (ms_in_msg_exchange_t *)malloc(ms_len); - if(!ms) - { - SAFE_FREE(temp_buff); - return MALLOC_ERROR; - } - ms->msg_type = msg_type; - ms->target_fn_id = target_fn_id; - ms->inparam_buff_len = (uint32_t)param_len; - memcpy(&ms->inparam_buff, temp_buff, param_len); - *marshalled_buff = (char*)ms; - *marshalled_buff_len = ms_len; - SAFE_FREE(temp_buff); - return SUCCESS; -} - -uint32_t unmarshal_retval_and_output_parameters_e3_foo1(char* out_buff, param_struct_t *p_struct_var, char** retval) -{ - size_t retval_len; - ms_out_msg_exchange_t *ms; - if(!out_buff) - return INVALID_PARAMETER_ERROR; - ms = (ms_out_msg_exchange_t *)out_buff; - retval_len = ms->retval_len; - *retval = (char*)malloc(retval_len); - if(!*retval) - { - return MALLOC_ERROR; - } - memcpy(*retval, ms->ret_outparam_buff, retval_len); - memcpy(&p_struct_var->var1, (ms->ret_outparam_buff) + retval_len, sizeof(p_struct_var->var1)); - memcpy(&p_struct_var->var2, (ms->ret_outparam_buff) + retval_len + sizeof(p_struct_var->var1), sizeof(p_struct_var->var2)); - return SUCCESS; -} - - -uint32_t unmarshal_input_parameters_e2_foo1(uint32_t* var1, uint32_t* var2, ms_in_msg_exchange_t* ms) -{ - char* buff; - size_t len; - if(!var1 || !var2 || !ms) - return INVALID_PARAMETER_ERROR; - - buff = ms->inparam_buff; - len = ms->inparam_buff_len; - - if(len != (sizeof(*var1) + sizeof(*var2))) - return ATTESTATION_ERROR; - - memcpy(var1, buff, sizeof(*var1)); - memcpy(var2, buff + sizeof(*var1), sizeof(*var2)); - - return SUCCESS; -} - -uint32_t marshal_retval_and_output_parameters_e2_foo1(char** resp_buffer, size_t* resp_length, uint32_t retval) -{ - ms_out_msg_exchange_t *ms; - size_t ret_param_len, ms_len; - char *temp_buff; - size_t retval_len; - if(!resp_length) - return INVALID_PARAMETER_ERROR; - retval_len = sizeof(retval); - ret_param_len = retval_len; //no out parameters - temp_buff = (char*)malloc(ret_param_len); - if(!temp_buff) - return MALLOC_ERROR; - - memcpy(temp_buff, &retval, sizeof(retval)); - ms_len = sizeof(ms_out_msg_exchange_t) + ret_param_len; - ms = (ms_out_msg_exchange_t *)malloc(ms_len); - if(!ms) - { - SAFE_FREE(temp_buff); - return MALLOC_ERROR; - } - ms->retval_len = (uint32_t)retval_len; - ms->ret_outparam_buff_len = (uint32_t)ret_param_len; - memcpy(&ms->ret_outparam_buff, temp_buff, ret_param_len); - *resp_buffer = (char*)ms; - *resp_length = ms_len; - SAFE_FREE(temp_buff); - return SUCCESS; -} - -uint32_t marshal_message_exchange_request(uint32_t target_fn_id, uint32_t msg_type, uint32_t secret_data, char** marshalled_buff, size_t* marshalled_buff_len) -{ - ms_in_msg_exchange_t *ms; - size_t secret_data_len, ms_len; - if(!marshalled_buff_len) - return INVALID_PARAMETER_ERROR; - secret_data_len = sizeof(secret_data); - ms_len = sizeof(ms_in_msg_exchange_t) + secret_data_len; - ms = (ms_in_msg_exchange_t *)malloc(ms_len); - if(!ms) - return MALLOC_ERROR; - - ms->msg_type = msg_type; - ms->target_fn_id = target_fn_id; - ms->inparam_buff_len = (uint32_t)secret_data_len; - memcpy(&ms->inparam_buff, &secret_data, secret_data_len); - *marshalled_buff = (char*)ms; - *marshalled_buff_len = ms_len; - return SUCCESS; -} - -uint32_t umarshal_message_exchange_request(uint32_t* inp_secret_data, ms_in_msg_exchange_t* ms) -{ - char* buff; - size_t len; - if(!inp_secret_data || !ms) - return INVALID_PARAMETER_ERROR; - buff = ms->inparam_buff; - len = ms->inparam_buff_len; - if(len != sizeof(uint32_t)) - return ATTESTATION_ERROR; - - memcpy(inp_secret_data, buff, sizeof(uint32_t)); - - return SUCCESS; -} - - -uint32_t marshal_message_exchange_response(char** resp_buffer, size_t* resp_length, uint32_t secret_response) -{ - ms_out_msg_exchange_t *ms; - size_t secret_response_len, ms_len; - size_t retval_len, ret_param_len; - if(!resp_length) - return INVALID_PARAMETER_ERROR; - secret_response_len = sizeof(secret_response); - retval_len = secret_response_len; - ret_param_len = secret_response_len; - ms_len = sizeof(ms_out_msg_exchange_t) + ret_param_len; - ms = (ms_out_msg_exchange_t *)malloc(ms_len); - if(!ms) - return MALLOC_ERROR; - ms->retval_len = (uint32_t)retval_len; - ms->ret_outparam_buff_len = (uint32_t)ret_param_len; - memcpy(&ms->ret_outparam_buff, &secret_response, secret_response_len); - *resp_buffer = (char*)ms; - *resp_length = ms_len; - return SUCCESS; -} - -uint32_t umarshal_message_exchange_response(char* out_buff, char** secret_response) -{ - size_t retval_len; - ms_out_msg_exchange_t *ms; - if(!out_buff) - return INVALID_PARAMETER_ERROR; - ms = (ms_out_msg_exchange_t *)out_buff; - retval_len = ms->retval_len; - *secret_response = (char*)malloc(retval_len); - if(!*secret_response) - { - return MALLOC_ERROR; - } - memcpy(*secret_response, ms->ret_outparam_buff, retval_len); - return SUCCESS; -} diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Utility_E2.h b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Utility_E2.h deleted file mode 100644 index 7cdd206ae4..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave2/Utility_E2.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef UTILITY_E2_H__ -#define UTILITY_E2_H__ -#include "stdint.h" - -typedef struct _param_struct_t -{ - uint32_t var1; - uint32_t var2; -}param_struct_t; - -#ifdef __cplusplus -extern "C" { -#endif - -uint32_t marshal_input_parameters_e3_foo1(uint32_t target_fn_id, uint32_t msg_type, param_struct_t *p_struct_var, char** marshalled_buff, size_t* marshalled_buff_len); -uint32_t unmarshal_retval_and_output_parameters_e3_foo1(char* out_buff, param_struct_t *p_struct_var, char** retval); -uint32_t unmarshal_input_parameters_e2_foo1(uint32_t* var1, uint32_t* var2, ms_in_msg_exchange_t* ms); -uint32_t marshal_retval_and_output_parameters_e2_foo1(char** resp_buffer, size_t* resp_length, uint32_t retval); -uint32_t marshal_message_exchange_request(uint32_t target_fn_id, uint32_t msg_type, uint32_t secret_data, char** marshalled_buff, size_t* marshalled_buff_len); -uint32_t umarshal_message_exchange_request(uint32_t* inp_secret_data, ms_in_msg_exchange_t* ms); -uint32_t marshal_message_exchange_response(char** resp_buffer, size_t* resp_length, uint32_t secret_response); -uint32_t umarshal_message_exchange_response(char* out_buff, char** secret_response); - -#ifdef __cplusplus - } -#endif -#endif - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.config.xml b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.config.xml deleted file mode 100644 index d5fcaa4e78..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 0 - 0 - 0x40000 - 0x100000 - 1 - 1 - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.cpp deleted file mode 100644 index 19b456423d..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.cpp +++ /dev/null @@ -1,366 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -// Enclave3.cpp : Defines the exported functions for the DLL application -#include "sgx_eid.h" -#include "Enclave3_t.h" -#include "EnclaveMessageExchange.h" -#include "error_codes.h" -#include "Utility_E3.h" -#include "sgx_thread.h" -#include "sgx_dh.h" -#include - -#define UNUSED(val) (void)(val) - -std::mapg_src_session_info_map; - -static uint32_t e3_foo1_wrapper(ms_in_msg_exchange_t *ms, size_t param_lenth, char** resp_buffer, size_t* resp_length); - -//Function pointer table containing the list of functions that the enclave exposes -const struct { - size_t num_funcs; - const void* table[1]; -} func_table = { - 1, - { - (const void*)e3_foo1_wrapper, - } -}; - -//Makes use of the sample code function to establish a secure channel with the destination enclave -uint32_t test_create_session(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - dh_session_t dest_session_info; - //Core reference code function for creating a session - ke_status = create_session(src_enclave_id, dest_enclave_id,&dest_session_info); - if(ke_status == SUCCESS) - { - //Insert the session information into the map under the corresponding destination enclave id - g_src_session_info_map.insert(std::pair(dest_enclave_id, dest_session_info)); - } - memset(&dest_session_info, 0, sizeof(dh_session_t)); - return ke_status; -} - -//Makes use of the sample code function to do an enclave to enclave call (Test Vector) -uint32_t test_enclave_to_enclave_call(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - external_param_struct_t *p_struct_var, struct_var; - internal_param_struct_t internal_struct_var; - uint32_t target_fn_id, msg_type; - char* marshalled_inp_buff; - size_t marshalled_inp_buff_len; - char* out_buff; - size_t out_buff_len; - dh_session_t *dest_session_info; - size_t max_out_buff_size; - char* retval; - - max_out_buff_size = 50; - msg_type = ENCLAVE_TO_ENCLAVE_CALL; - target_fn_id = 0; - internal_struct_var.ivar1 = 0x5; - internal_struct_var.ivar2 = 0x6; - struct_var.var1 = 0x3; - struct_var.var2 = 0x4; - struct_var.p_internal_struct = &internal_struct_var; - p_struct_var = &struct_var; - - size_t len_data = sizeof(struct_var) - sizeof(struct_var.p_internal_struct); - size_t len_ptr_data = sizeof(internal_struct_var); - - //Marshals the input parameters for calling function foo1 in Enclave1 into a input buffer - ke_status = marshal_input_parameters_e1_foo1(target_fn_id, msg_type, p_struct_var, len_data, - len_ptr_data, &marshalled_inp_buff, &marshalled_inp_buff_len); - - if(ke_status != SUCCESS) - { - return ke_status; - } - - //Search the map for the session information associated with the destination enclave id passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = &it->second; - } - else - { - SAFE_FREE(marshalled_inp_buff); - return INVALID_SESSION; - } - - //Core Reference Code function - ke_status = send_request_receive_response(src_enclave_id, dest_enclave_id, dest_session_info, - marshalled_inp_buff, marshalled_inp_buff_len, max_out_buff_size, &out_buff, &out_buff_len); - - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - ////Un-marshal the return value and output parameters from foo1 of Enclave1 - ke_status = unmarshal_retval_and_output_parameters_e1_foo1(out_buff, p_struct_var, &retval); - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - SAFE_FREE(retval); - return SUCCESS; -} - -//Makes use of the sample code function to do a generic secret message exchange (Test Vector) -uint32_t test_message_exchange(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - ATTESTATION_STATUS ke_status = SUCCESS; - uint32_t target_fn_id, msg_type; - char* marshalled_inp_buff; - size_t marshalled_inp_buff_len; - char* out_buff; - size_t out_buff_len; - dh_session_t *dest_session_info; - size_t max_out_buff_size; - char* secret_response; - uint32_t secret_data; - - target_fn_id = 0; - msg_type = MESSAGE_EXCHANGE; - max_out_buff_size = 50; - secret_data = 0x12345678; //Secret Data here is shown only for purpose of demonstration. - - //Marshals the parameters into a buffer - ke_status = marshal_message_exchange_request(target_fn_id, msg_type, secret_data, &marshalled_inp_buff, &marshalled_inp_buff_len); - if(ke_status != SUCCESS) - { - return ke_status; - } - //Search the map for the session information associated with the destination enclave id passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = &it->second; - } - else - { - SAFE_FREE(marshalled_inp_buff); - return INVALID_SESSION; - } - - //Core Reference Code function - ke_status = send_request_receive_response(src_enclave_id, dest_enclave_id, dest_session_info, marshalled_inp_buff, - marshalled_inp_buff_len, max_out_buff_size, &out_buff, &out_buff_len); - - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - //Un-marshal the secret response data - ke_status = umarshal_message_exchange_response(out_buff, &secret_response); - if(ke_status != SUCCESS) - { - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - return ke_status; - } - - SAFE_FREE(marshalled_inp_buff); - SAFE_FREE(out_buff); - SAFE_FREE(secret_response); - return SUCCESS; -} - - -//Makes use of the sample code function to close a current session -uint32_t test_close_session(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - dh_session_t dest_session_info; - ATTESTATION_STATUS ke_status = SUCCESS; - //Search the map for the session information associated with the destination enclave id passed in - std::map::iterator it = g_src_session_info_map.find(dest_enclave_id); - if(it != g_src_session_info_map.end()) - { - dest_session_info = it->second; - } - else - { - return NULL; - } - //Core reference code function for closing a session - ke_status = close_session(src_enclave_id, dest_enclave_id); - - //Erase the session information associated with the destination enclave id - g_src_session_info_map.erase(dest_enclave_id); - return ke_status; -} - -//Function that is used to verify the trust of the other enclave -//Each enclave can have its own way verifying the peer enclave identity -extern "C" uint32_t verify_peer_enclave_trust(sgx_dh_session_enclave_identity_t* peer_enclave_identity) -{ - if(!peer_enclave_identity) - { - return INVALID_PARAMETER_ERROR; - } - if(peer_enclave_identity->isv_prod_id != 0 || !(peer_enclave_identity->attributes.flags & SGX_FLAGS_INITTED)) - // || peer_enclave_identity->attributes.xfrm !=3)// || peer_enclave_identity->mr_signer != xx //TODO: To be hardcoded with values to check - { - return ENCLAVE_TRUST_ERROR; - } - else - { - return SUCCESS; - } -} - - -//Dispatch function that calls the approriate enclave function based on the function id -//Each enclave can have its own way of dispatching the calls from other enclave -extern "C" uint32_t enclave_to_enclave_call_dispatcher(char* decrypted_data, - size_t decrypted_data_length, - char** resp_buffer, - size_t* resp_length) -{ - ms_in_msg_exchange_t *ms; - uint32_t (*fn1)(ms_in_msg_exchange_t *ms, size_t, char**, size_t*); - if(!decrypted_data || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - ms = (ms_in_msg_exchange_t *)decrypted_data; - if(ms->target_fn_id >= func_table.num_funcs) - { - return INVALID_PARAMETER_ERROR; - } - fn1 = (uint32_t (*)(ms_in_msg_exchange_t*, size_t, char**, size_t*))func_table.table[ms->target_fn_id]; - return fn1(ms, decrypted_data_length, resp_buffer, resp_length); -} - -//Operates on the input secret and generates the output secret -uint32_t get_message_exchange_response(uint32_t inp_secret_data) -{ - uint32_t secret_response; - - //User should use more complex encryption method to protect their secret, below is just a simple example - secret_response = inp_secret_data & 0x11111111; - - return secret_response; - -} -//Generates the response from the request message -extern "C" uint32_t message_exchange_response_generator(char* decrypted_data, - char** resp_buffer, - size_t* resp_length) -{ - ms_in_msg_exchange_t *ms; - uint32_t inp_secret_data; - uint32_t out_secret_data; - if(!decrypted_data || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - ms = (ms_in_msg_exchange_t *)decrypted_data; - - if(umarshal_message_exchange_request(&inp_secret_data,ms) != SUCCESS) - return ATTESTATION_ERROR; - - out_secret_data = get_message_exchange_response(inp_secret_data); - - if(marshal_message_exchange_response(resp_buffer, resp_length, out_secret_data) != SUCCESS) - return MALLOC_ERROR; - - return SUCCESS; - -} - - -static uint32_t e3_foo1(param_struct_t *p_struct_var) -{ - if(!p_struct_var) - { - return INVALID_PARAMETER_ERROR; - } - p_struct_var->var1++; - p_struct_var->var2++; - - return(p_struct_var->var1 * p_struct_var->var2); -} - -//Function which is executed on request from the source enclave -static uint32_t e3_foo1_wrapper(ms_in_msg_exchange_t *ms, - size_t param_lenth, - char** resp_buffer, - size_t* resp_length) -{ - UNUSED(param_lenth); - - uint32_t ret; - param_struct_t *p_struct_var; - if(!ms || !resp_length) - { - return INVALID_PARAMETER_ERROR; - } - p_struct_var = (param_struct_t*)malloc(sizeof(param_struct_t)); - if(!p_struct_var) - return MALLOC_ERROR; - - if(unmarshal_input_parameters_e3_foo1(p_struct_var, ms) != SUCCESS) - { - SAFE_FREE(p_struct_var); - return ATTESTATION_ERROR; - } - - ret = e3_foo1(p_struct_var); - - if(marshal_retval_and_output_parameters_e3_foo1(resp_buffer, resp_length, ret, p_struct_var) != SUCCESS) - { - SAFE_FREE(p_struct_var); - return MALLOC_ERROR; - } - SAFE_FREE(p_struct_var); - return SUCCESS; -} diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.edl b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.edl deleted file mode 100644 index 375fbf65d2..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.edl +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -enclave { - include "sgx_eid.h" - from "../LocalAttestationCode/LocalAttestationCode.edl" import *; - from "sgx_tstdc.edl" import *; - trusted{ - public uint32_t test_create_session(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_enclave_to_enclave_call(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_message_exchange(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - public uint32_t test_close_session(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.lds b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.lds deleted file mode 100644 index 5dc1d0aa5c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3.lds +++ /dev/null @@ -1,10 +0,0 @@ -Enclave3.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - g_peak_heap_used; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3_private.pem b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3_private.pem deleted file mode 100644 index b8ace89eb3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Enclave3_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4wIBAAKCAYEA0MvI9NpdP4GEqCvtlJQv00OybzTXzxBhPu/257VYt9cYw/ph -BN1WRyxBBcrZs15xmcvlb3xNmFGWs4w5oUgrFBNgi6g+CUOCsj0cM8xw7P/y3K0H -XaZUf+T3CXCp8NvlkZHzfdWAFA5lGGR9g6kmuk7SojE3h87Zm1KjPU/PvAe+BaMU -trlRr4gPNVnu19Vho60xwuswPxfl/pBFUIk7qWEUR3l2hiqWMeLgf3Ays/WSnkXA -uijwPt5g0hxsgIlyDrI3jKbf0zkFB56jvPwSykfU8aw4Gkbo5qSZxUAKnwH2L8Uf -yM6inBaaYtM79icRwsu45Yt6X0GAt7CSb/1TKBrnm5exmK1sug3YSQ/YuK1FYawU -vIaDD0YfzOndTNVBewA+Hr5xNPvqGJoRKHuGbyu2lI9jrKYpVxQWsmx38wnxF6kE -zX6N4m7KZiLeLpDdBVQtLuOzIdIE4wT3t/ckeqElxO/1Ut9bj765GcTTrYwMKHRw -ukWIH7ZtHtAjj0KzAgEDAoIBgQCLMoX4kZN/q63Fcp5jDXU3gnb0zeU0tZYp9U9F -I5B6j2XX/ECt6OQvctYD3JEiPvZmh+5KUt5li7nNCCZrhXINYkBdGtQGLQHMKL13 -3aCd//c9yK+TxDhVQ09boHFLPUO2YUz+jlVitENlmFOtG28m3zcWy3paieZnjGzT -iop9Wn6ubLh50OEfsAojkUnlOOvCc3aB8iAqD+6ptYOLBifGQLgvpk8EHGQhQer/ -oCHNTmG+2SsmxfV/Pus2vZ2rBkrUbZU0hwrnvKOIPhnt3Qwtmx9xsC67jF+MpWko -UisJXC27FAGz2gpIGMhBp35HEppwG9hhCuMQdK2g62bvweyr1tC4qOVdQrKvhksN -r6CMjS9eSXvmWdF7lU4oxStN0V56/LICSIsLbggUaxTPKhAVEgfTSqwEJoQuFA3Q -4GmgTydPhcRH1L/lhbWJqZQm7V1Gt+5i5J6iATD32uNQQ2iZi5GsUhr+jZC+WlE5 -6lS813cRNiaK52HIk62bG7IXOksCgcEA+6RxZhQ5GaCPYZNsk7TqxqsKopXKoYAr -2R4KWuexJTd+1kcNMk0ETX8OSgpY2cYL2uPFWmdutxPpLfpr8S2u92Da/Wxs70Ti -QSb0426ybTmnS5L7nOnGOHiddXILhW175liAszTeoR7nQ6vpr9YjfcnrXiB8bKIm -akft2DQoxrBPzEe9tA8gfkyDTsSG2j7kncSbvYRtkKcJOmmypotVU6uhRPSrSXCc -J59uBQkg6Bk4CKA1mz8ctG07MluFY0/ZAoHBANRpZlfIFl39gFmuEER7lb80GySO -J190LbqOca3dGOvAMsDgEAi6juJyX7ZNpbHFHj++LvmTtw9+kxhVDBcswS7304kt -7J2EfnGdctEZtXif1wiq30YWAp1tjRpQENKtt9wssmgcwgK39rZNiEHmStHGv3l+ -5TnKPKeuFCDnsLvi5lQYoK2wTYvZtsjf+Rnt7H17q90IV54pMjTS8BkGskCkKf2A -IYuaZkqX0T3cM6ovoYYDAU6rWL5rrYPLEwkbawKBwQCnwvZEDXtmawpBDPMNI0cv -HLHBuTHBAB07aVw8mnYYz6nkL14hiK2I/17cBuXmhAfnQoORmknPYptz/Ef2HnSk -6zyo8vNKLewrb03s9Hbze8TdDKe98S7QUGj49rJY86fu5asiIz8WFJotHUZ1OWz+ -hpzpav2dwW7xhUk6zXCEdYqIL9PNX2r+3azfLa88Ke2+gxJ+WEkLGgYm8SHEXOON -HRYt+HIw9b1vv56uBhXwENAFwCO81L3Nnid2565CNTsCgcEAjZuZj9q5k/5VkR61 -gv0Of3gSGF7E6k1z0bRLyT4QnSrMgJVgBdG0lvbqeYkZIS4UKn7J+7fPX6m3ZY4I -D3MrdKU3sMlIaQL+9mj3NhEjpb/ksHHqLrlXE55eEYq14cklPXMhmr3WrHqkeYkF -gUQx4S8qUP9De9wob8liwJp10pdEOBBrHnWJB+Z52z/7Zp6dqP0dPgWPvsYheIyg -EK8hgG1xU6rBB7xEMbqLfpLNHB/BBAIA3xzl1EfJAodiBhJHAoHAeTS2znDHYayI -TvK86tBAPVORiBVTSdRUONdGF3dipo24hyeyrI5MtiOoMc3sKWXnSTkDQWa3WiPx -qStBmmO/SbGTuz7T6+oOwGeMiYzYBe87Ayn8Y0KYYshFikieJbGusHjUlIGmCVPy -UHrDMYGwFGUGBwW47gBsnZa+YPHtxWCPDe/U80et2Trx0RXJJQPmupAVMSiJWObI -9k5gRU+xDqkHanyD1gkGGwhFTUNX94EJEOdQEWw3hxLnVtePoke/ ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Utility_E3.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Utility_E3.cpp deleted file mode 100644 index 45fed38d7c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Utility_E3.cpp +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "sgx_eid.h" -#include "EnclaveMessageExchange.h" -#include "error_codes.h" -#include "Utility_E3.h" -#include "stdlib.h" -#include "string.h" - -uint32_t marshal_input_parameters_e1_foo1(uint32_t target_fn_id, uint32_t msg_type, external_param_struct_t *p_struct_var, size_t len_data, size_t len_ptr_data, char** marshalled_buff, size_t* marshalled_buff_len) -{ - ms_in_msg_exchange_t *ms; - size_t param_len, ms_len; - char *temp_buff; - int* addr; - char* struct_data; - if(!p_struct_var || !marshalled_buff_len) - return INVALID_PARAMETER_ERROR; - struct_data = (char*)p_struct_var; - temp_buff = (char*)malloc(len_data + len_ptr_data); - if(!temp_buff) - return MALLOC_ERROR; - memcpy(temp_buff, struct_data, len_data); - addr = *(int **)(struct_data + len_data); - memcpy(temp_buff + len_data, addr, len_ptr_data); //can be optimized - param_len = len_data + len_ptr_data; - ms_len = sizeof(ms_in_msg_exchange_t) + param_len; - ms = (ms_in_msg_exchange_t *)malloc(ms_len); - if(!ms) - { - SAFE_FREE(temp_buff); - return MALLOC_ERROR; - } - ms->msg_type = msg_type; - ms->target_fn_id = target_fn_id; - ms->inparam_buff_len = (uint32_t)param_len; - memcpy(&ms->inparam_buff, temp_buff, param_len); - *marshalled_buff = (char*)ms; - *marshalled_buff_len = ms_len; - - SAFE_FREE(temp_buff); - return SUCCESS; -} - -uint32_t marshal_retval_and_output_parameters_e3_foo1(char** resp_buffer, size_t* resp_length, uint32_t retval, param_struct_t *p_struct_var) -{ - ms_out_msg_exchange_t *ms; - size_t ret_param_len, ms_len; - char *temp_buff; - size_t retval_len; - if(!resp_length || !p_struct_var) - return INVALID_PARAMETER_ERROR; - retval_len = sizeof(retval); - ret_param_len = sizeof(retval) + sizeof(param_struct_t); - temp_buff = (char*)malloc(ret_param_len); - if(!temp_buff) - return MALLOC_ERROR; - memcpy(temp_buff, &retval, sizeof(retval)); - memcpy(temp_buff + sizeof(retval), p_struct_var, sizeof(param_struct_t)); - ms_len = sizeof(ms_out_msg_exchange_t) + ret_param_len; - ms = (ms_out_msg_exchange_t *)malloc(ms_len); - if(!ms) - { - SAFE_FREE(temp_buff); - return MALLOC_ERROR; - } - ms->retval_len = (uint32_t)retval_len; - ms->ret_outparam_buff_len = (uint32_t)ret_param_len; - memcpy(&ms->ret_outparam_buff, temp_buff, ret_param_len); - *resp_buffer = (char*)ms; - *resp_length = ms_len; - SAFE_FREE(temp_buff); - return SUCCESS; -} - -uint32_t unmarshal_input_parameters_e3_foo1(param_struct_t *pstruct, ms_in_msg_exchange_t* ms) -{ - char* buff; - size_t len; - if(!pstruct || !ms) - return INVALID_PARAMETER_ERROR; - buff = ms->inparam_buff; - len = ms->inparam_buff_len; - - if(len != (sizeof(pstruct->var1) + sizeof(pstruct->var2))) - return ATTESTATION_ERROR; - - memcpy(&pstruct->var1, buff, sizeof(pstruct->var1)); - memcpy(&pstruct->var2, buff + sizeof(pstruct->var1), sizeof(pstruct->var2)); - - return SUCCESS; -} - - -uint32_t unmarshal_retval_and_output_parameters_e1_foo1(char* out_buff, external_param_struct_t *p_struct_var, char** retval) -{ - size_t retval_len; - ms_out_msg_exchange_t *ms; - if(!out_buff || !p_struct_var) - return INVALID_PARAMETER_ERROR; - ms = (ms_out_msg_exchange_t *)out_buff; - retval_len = ms->retval_len; - *retval = (char*)malloc(retval_len); - if(!*retval) - { - return MALLOC_ERROR; - } - memcpy(*retval, ms->ret_outparam_buff, retval_len); - memcpy(&p_struct_var->var1, (ms->ret_outparam_buff) + retval_len, sizeof(p_struct_var->var1)); - memcpy(&p_struct_var->var2, (ms->ret_outparam_buff) + retval_len + sizeof(p_struct_var->var1), sizeof(p_struct_var->var2)); - memcpy(&p_struct_var->p_internal_struct->ivar1, (ms->ret_outparam_buff) + retval_len + sizeof(p_struct_var->var1)+ sizeof(p_struct_var->var2), sizeof(p_struct_var->p_internal_struct->ivar1)); - memcpy(&p_struct_var->p_internal_struct->ivar2, (ms->ret_outparam_buff) + retval_len + sizeof(p_struct_var->var1)+ sizeof(p_struct_var->var2) + sizeof(p_struct_var->p_internal_struct->ivar1), sizeof(p_struct_var->p_internal_struct->ivar2)); - return SUCCESS; -} - - -uint32_t marshal_message_exchange_request(uint32_t target_fn_id, uint32_t msg_type, uint32_t secret_data, char** marshalled_buff, size_t* marshalled_buff_len) -{ - ms_in_msg_exchange_t *ms; - size_t secret_data_len, ms_len; - if(!marshalled_buff_len) - return INVALID_PARAMETER_ERROR; - secret_data_len = sizeof(secret_data); - ms_len = sizeof(ms_in_msg_exchange_t) + secret_data_len; - ms = (ms_in_msg_exchange_t *)malloc(ms_len); - if(!ms) - return MALLOC_ERROR; - - ms->msg_type = msg_type; - ms->target_fn_id = target_fn_id; - ms->inparam_buff_len = (uint32_t)secret_data_len; - memcpy(&ms->inparam_buff, &secret_data, secret_data_len); - - *marshalled_buff = (char*)ms; - *marshalled_buff_len = ms_len; - return SUCCESS; -} - -uint32_t umarshal_message_exchange_request(uint32_t* inp_secret_data, ms_in_msg_exchange_t* ms) -{ - char* buff; - size_t len; - if(!inp_secret_data || !ms) - return INVALID_PARAMETER_ERROR; - buff = ms->inparam_buff; - len = ms->inparam_buff_len; - - if(len != sizeof(uint32_t)) - return ATTESTATION_ERROR; - - memcpy(inp_secret_data, buff, sizeof(uint32_t)); - - return SUCCESS; -} - -uint32_t marshal_message_exchange_response(char** resp_buffer, size_t* resp_length, uint32_t secret_response) -{ - ms_out_msg_exchange_t *ms; - size_t secret_response_len, ms_len; - size_t retval_len, ret_param_len; - if(!resp_length) - return INVALID_PARAMETER_ERROR; - secret_response_len = sizeof(secret_response); - retval_len = secret_response_len; - ret_param_len = secret_response_len; - ms_len = sizeof(ms_out_msg_exchange_t) + ret_param_len; - ms = (ms_out_msg_exchange_t *)malloc(ms_len); - if(!ms) - return MALLOC_ERROR; - ms->retval_len = (uint32_t)retval_len; - ms->ret_outparam_buff_len = (uint32_t)ret_param_len; - memcpy(&ms->ret_outparam_buff, &secret_response, secret_response_len); - *resp_buffer = (char*)ms; - *resp_length = ms_len; - return SUCCESS; -} - -uint32_t umarshal_message_exchange_response(char* out_buff, char** secret_response) -{ - size_t retval_len; - ms_out_msg_exchange_t *ms; - if(!out_buff) - return INVALID_PARAMETER_ERROR; - ms = (ms_out_msg_exchange_t *)out_buff; - retval_len = ms->retval_len; - *secret_response = (char*)malloc(retval_len); - if(!*secret_response) - { - return MALLOC_ERROR; - } - memcpy(*secret_response, ms->ret_outparam_buff, retval_len); - return SUCCESS; -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Utility_E3.h b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Utility_E3.h deleted file mode 100644 index 2c690bc870..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Enclave3/Utility_E3.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef UTILITY_E3_H__ -#define UTILITY_E3_H__ - -#include "stdint.h" - - -typedef struct _internal_param_struct_t -{ - uint32_t ivar1; - uint32_t ivar2; -}internal_param_struct_t; - -typedef struct _external_param_struct_t -{ - uint32_t var1; - uint32_t var2; - internal_param_struct_t *p_internal_struct; -}external_param_struct_t; - -typedef struct _param_struct_t -{ - uint32_t var1; - uint32_t var2; -}param_struct_t; - -#ifdef __cplusplus -extern "C" { -#endif - -uint32_t marshal_input_parameters_e1_foo1(uint32_t target_fn_id, uint32_t msg_type, external_param_struct_t *p_struct_var, size_t len_data, size_t len_ptr_data, char** marshalled_buff, size_t* marshalled_buff_len); -uint32_t unmarshal_retval_and_output_parameters_e1_foo1(char* out_buff, external_param_struct_t *p_struct_var, char** retval); -uint32_t unmarshal_input_parameters_e3_foo1(param_struct_t *pstruct, ms_in_msg_exchange_t* ms); -uint32_t marshal_retval_and_output_parameters_e3_foo1(char** resp_buffer, size_t* resp_length, uint32_t retval, param_struct_t *p_struct_var); -uint32_t marshal_message_exchange_request(uint32_t target_fn_id, uint32_t msg_type, uint32_t secret_data, char** marshalled_buff, size_t* marshalled_buff_len); -uint32_t umarshal_message_exchange_request(uint32_t* inp_secret_data, ms_in_msg_exchange_t* ms); -uint32_t marshal_message_exchange_response(char** resp_buffer, size_t* resp_length, uint32_t secret_response); -uint32_t umarshal_message_exchange_response(char* out_buff, char** secret_response); - -#ifdef __cplusplus - } -#endif -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Include/dh_session_protocol.h b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Include/dh_session_protocol.h deleted file mode 100644 index a7b2f75bb3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Include/dh_session_protocol.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _DH_SESSION_PROROCOL_H -#define _DH_SESSION_PROROCOL_H - -#include "sgx_ecp_types.h" -#include "sgx_key.h" -#include "sgx_report.h" -#include "sgx_attributes.h" - -#define NONCE_SIZE 16 -#define MAC_SIZE 16 - -#define MSG_BUF_LEN sizeof(ec_pub_t)*2 -#define MSG_HASH_SZ 32 - - -//Session information structure -typedef struct _la_dh_session_t -{ - uint32_t session_id; //Identifies the current session - uint32_t status; //Indicates session is in progress, active or closed - union - { - struct - { - sgx_dh_session_t dh_session; - }in_progress; - - struct - { - sgx_key_128bit_t AEK; //Session Key - uint32_t counter; //Used to store Message Sequence Number - }active; - }; -} dh_session_t; - - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/EnclaveMessageExchange.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/EnclaveMessageExchange.cpp deleted file mode 100644 index 67fe17ac59..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/EnclaveMessageExchange.cpp +++ /dev/null @@ -1,721 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "sgx_trts.h" -#include "sgx_utils.h" -#include "EnclaveMessageExchange.h" -#include "sgx_eid.h" -#include "error_codes.h" -#include "sgx_ecp_types.h" -#include "sgx_thread.h" -#include -#include "dh_session_protocol.h" -#include "sgx_dh.h" -#include "sgx_tcrypto.h" -#include "LocalAttestationCode_t.h" - -#ifdef __cplusplus -extern "C" { -#endif - -uint32_t enclave_to_enclave_call_dispatcher(char* decrypted_data, size_t decrypted_data_length, char** resp_buffer, size_t* resp_length); -uint32_t message_exchange_response_generator(char* decrypted_data, char** resp_buffer, size_t* resp_length); -uint32_t verify_peer_enclave_trust(sgx_dh_session_enclave_identity_t* peer_enclave_identity); - -#ifdef __cplusplus -} -#endif - -#define MAX_SESSION_COUNT 16 - -//number of open sessions -uint32_t g_session_count = 0; - -ATTESTATION_STATUS generate_session_id(uint32_t *session_id); -ATTESTATION_STATUS end_session(sgx_enclave_id_t src_enclave_id); - -//Array of open session ids -session_id_tracker_t *g_session_id_tracker[MAX_SESSION_COUNT]; - -//Map between the source enclave id and the session information associated with that particular session -std::mapg_dest_session_info_map; - -//Create a session with the destination enclave -ATTESTATION_STATUS create_session(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id, - dh_session_t *session_info) -{ - sgx_dh_msg1_t dh_msg1; //Diffie-Hellman Message 1 - sgx_key_128bit_t dh_aek; // Session Key - sgx_dh_msg2_t dh_msg2; //Diffie-Hellman Message 2 - sgx_dh_msg3_t dh_msg3; //Diffie-Hellman Message 3 - uint32_t session_id; - uint32_t retstatus; - sgx_status_t status = SGX_SUCCESS; - sgx_dh_session_t sgx_dh_session; - sgx_dh_session_enclave_identity_t responder_identity; - - if(!session_info) - { - return INVALID_PARAMETER_ERROR; - } - - memset(&dh_aek,0, sizeof(sgx_key_128bit_t)); - memset(&dh_msg1, 0, sizeof(sgx_dh_msg1_t)); - memset(&dh_msg2, 0, sizeof(sgx_dh_msg2_t)); - memset(&dh_msg3, 0, sizeof(sgx_dh_msg3_t)); - memset(session_info, 0, sizeof(dh_session_t)); - - //Intialize the session as a session initiator - status = sgx_dh_init_session(SGX_DH_SESSION_INITIATOR, &sgx_dh_session); - if(SGX_SUCCESS != status) - { - return status; - } - - //Ocall to request for a session with the destination enclave and obtain session id and Message 1 if successful - status = session_request_ocall(&retstatus, src_enclave_id, dest_enclave_id, &dh_msg1, &session_id); - if (status == SGX_SUCCESS) - { - if ((ATTESTATION_STATUS)retstatus != SUCCESS) - return ((ATTESTATION_STATUS)retstatus); - } - else - { - return ATTESTATION_SE_ERROR; - } - //Process the message 1 obtained from desination enclave and generate message 2 - status = sgx_dh_initiator_proc_msg1(&dh_msg1, &dh_msg2, &sgx_dh_session); - if(SGX_SUCCESS != status) - { - return status; - } - - //Send Message 2 to Destination Enclave and get Message 3 in return - status = exchange_report_ocall(&retstatus, src_enclave_id, dest_enclave_id, &dh_msg2, &dh_msg3, session_id); - if (status == SGX_SUCCESS) - { - if ((ATTESTATION_STATUS)retstatus != SUCCESS) - return ((ATTESTATION_STATUS)retstatus); - } - else - { - return ATTESTATION_SE_ERROR; - } - - //Process Message 3 obtained from the destination enclave - status = sgx_dh_initiator_proc_msg3(&dh_msg3, &sgx_dh_session, &dh_aek, &responder_identity); - if(SGX_SUCCESS != status) - { - return status; - } - - // Verify the identity of the destination enclave - if(verify_peer_enclave_trust(&responder_identity) != SUCCESS) - { - return INVALID_SESSION; - } - - memcpy(session_info->active.AEK, &dh_aek, sizeof(sgx_key_128bit_t)); - session_info->session_id = session_id; - session_info->active.counter = 0; - session_info->status = ACTIVE; - memset(&dh_aek,0, sizeof(sgx_key_128bit_t)); - return status; -} - -//Handle the request from Source Enclave for a session -ATTESTATION_STATUS session_request(sgx_enclave_id_t src_enclave_id, - sgx_dh_msg1_t *dh_msg1, - uint32_t *session_id ) -{ - dh_session_t session_info; - sgx_dh_session_t sgx_dh_session; - sgx_status_t status = SGX_SUCCESS; - - if(!session_id || !dh_msg1) - { - return INVALID_PARAMETER_ERROR; - } - //Intialize the session as a session responder - status = sgx_dh_init_session(SGX_DH_SESSION_RESPONDER, &sgx_dh_session); - if(SGX_SUCCESS != status) - { - return status; - } - - //get a new SessionID - if ((status = (sgx_status_t)generate_session_id(session_id)) != SUCCESS) - return status; //no more sessions available - - //Allocate memory for the session id tracker - g_session_id_tracker[*session_id] = (session_id_tracker_t *)malloc(sizeof(session_id_tracker_t)); - if(!g_session_id_tracker[*session_id]) - { - return MALLOC_ERROR; - } - - memset(g_session_id_tracker[*session_id], 0, sizeof(session_id_tracker_t)); - g_session_id_tracker[*session_id]->session_id = *session_id; - session_info.status = IN_PROGRESS; - - //Generate Message1 that will be returned to Source Enclave - status = sgx_dh_responder_gen_msg1((sgx_dh_msg1_t*)dh_msg1, &sgx_dh_session); - if(SGX_SUCCESS != status) - { - SAFE_FREE(g_session_id_tracker[*session_id]); - return status; - } - memcpy(&session_info.in_progress.dh_session, &sgx_dh_session, sizeof(sgx_dh_session_t)); - //Store the session information under the correspoding source enlave id key - g_dest_session_info_map.insert(std::pair(src_enclave_id, session_info)); - - return status; -} - -//Verify Message 2, generate Message3 and exchange Message 3 with Source Enclave -ATTESTATION_STATUS exchange_report(sgx_enclave_id_t src_enclave_id, - sgx_dh_msg2_t *dh_msg2, - sgx_dh_msg3_t *dh_msg3, - uint32_t session_id) -{ - - sgx_key_128bit_t dh_aek; // Session key - dh_session_t *session_info; - ATTESTATION_STATUS status = SUCCESS; - sgx_dh_session_t sgx_dh_session; - sgx_dh_session_enclave_identity_t initiator_identity; - - if(!dh_msg2 || !dh_msg3) - { - return INVALID_PARAMETER_ERROR; - } - - memset(&dh_aek,0, sizeof(sgx_key_128bit_t)); - do - { - //Retreive the session information for the corresponding source enclave id - std::map::iterator it = g_dest_session_info_map.find(src_enclave_id); - if(it != g_dest_session_info_map.end()) - { - session_info = &it->second; - } - else - { - status = INVALID_SESSION; - break; - } - - if(session_info->status != IN_PROGRESS) - { - status = INVALID_SESSION; - break; - } - - memcpy(&sgx_dh_session, &session_info->in_progress.dh_session, sizeof(sgx_dh_session_t)); - - dh_msg3->msg3_body.additional_prop_length = 0; - //Process message 2 from source enclave and obtain message 3 - sgx_status_t se_ret = sgx_dh_responder_proc_msg2(dh_msg2, - dh_msg3, - &sgx_dh_session, - &dh_aek, - &initiator_identity); - if(SGX_SUCCESS != se_ret) - { - status = se_ret; - break; - } - - //Verify source enclave's trust - if(verify_peer_enclave_trust(&initiator_identity) != SUCCESS) - { - return INVALID_SESSION; - } - - //save the session ID, status and initialize the session nonce - session_info->session_id = session_id; - session_info->status = ACTIVE; - session_info->active.counter = 0; - memcpy(session_info->active.AEK, &dh_aek, sizeof(sgx_key_128bit_t)); - memset(&dh_aek,0, sizeof(sgx_key_128bit_t)); - g_session_count++; - }while(0); - - if(status != SUCCESS) - { - end_session(src_enclave_id); - } - - return status; -} - -//Request for the response size, send the request message to the destination enclave and receive the response message back -ATTESTATION_STATUS send_request_receive_response(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id, - dh_session_t *session_info, - char *inp_buff, - size_t inp_buff_len, - size_t max_out_buff_size, - char **out_buff, - size_t* out_buff_len) -{ - const uint8_t* plaintext; - uint32_t plaintext_length; - sgx_status_t status; - uint32_t retstatus; - secure_message_t* req_message; - secure_message_t* resp_message; - uint8_t *decrypted_data; - uint32_t decrypted_data_length; - uint32_t plain_text_offset; - uint8_t l_tag[TAG_SIZE]; - size_t max_resp_message_length; - plaintext = (const uint8_t*)(" "); - plaintext_length = 0; - - if(!session_info || !inp_buff) - { - return INVALID_PARAMETER_ERROR; - } - //Check if the nonce for the session has not exceeded 2^32-2 if so end session and start a new session - if(session_info->active.counter == ((uint32_t) - 2)) - { - close_session(src_enclave_id, dest_enclave_id); - create_session(src_enclave_id, dest_enclave_id, session_info); - } - - //Allocate memory for the AES-GCM request message - req_message = (secure_message_t*)malloc(sizeof(secure_message_t)+ inp_buff_len); - if(!req_message) - { - return MALLOC_ERROR; - } - - memset(req_message,0,sizeof(secure_message_t)+ inp_buff_len); - const uint32_t data2encrypt_length = (uint32_t)inp_buff_len; - //Set the payload size to data to encrypt length - req_message->message_aes_gcm_data.payload_size = data2encrypt_length; - - //Use the session nonce as the payload IV - memcpy(req_message->message_aes_gcm_data.reserved,&session_info->active.counter,sizeof(session_info->active.counter)); - - //Set the session ID of the message to the current session id - req_message->session_id = session_info->session_id; - - //Prepare the request message with the encrypted payload - status = sgx_rijndael128GCM_encrypt(&session_info->active.AEK, (uint8_t*)inp_buff, data2encrypt_length, - reinterpret_cast(&(req_message->message_aes_gcm_data.payload)), - reinterpret_cast(&(req_message->message_aes_gcm_data.reserved)), - sizeof(req_message->message_aes_gcm_data.reserved), plaintext, plaintext_length, - &(req_message->message_aes_gcm_data.payload_tag)); - - if(SGX_SUCCESS != status) - { - SAFE_FREE(req_message); - return status; - } - - //Allocate memory for the response payload to be copied - *out_buff = (char*)malloc(max_out_buff_size); - if(!*out_buff) - { - SAFE_FREE(req_message); - return MALLOC_ERROR; - } - - memset(*out_buff, 0, max_out_buff_size); - - //Allocate memory for the response message - resp_message = (secure_message_t*)malloc(sizeof(secure_message_t)+ max_out_buff_size); - if(!resp_message) - { - SAFE_FREE(req_message); - return MALLOC_ERROR; - } - - memset(resp_message, 0, sizeof(secure_message_t)+ max_out_buff_size); - - //Ocall to send the request to the Destination Enclave and get the response message back - status = send_request_ocall(&retstatus, src_enclave_id, dest_enclave_id, req_message, - (sizeof(secure_message_t)+ inp_buff_len), max_out_buff_size, - resp_message, (sizeof(secure_message_t)+ max_out_buff_size)); - if (status == SGX_SUCCESS) - { - if ((ATTESTATION_STATUS)retstatus != SUCCESS) - { - SAFE_FREE(req_message); - SAFE_FREE(resp_message); - return ((ATTESTATION_STATUS)retstatus); - } - } - else - { - SAFE_FREE(req_message); - SAFE_FREE(resp_message); - return ATTESTATION_SE_ERROR; - } - - max_resp_message_length = sizeof(secure_message_t)+ max_out_buff_size; - - if(sizeof(resp_message) > max_resp_message_length) - { - SAFE_FREE(req_message); - SAFE_FREE(resp_message); - return INVALID_PARAMETER_ERROR; - } - - //Code to process the response message from the Destination Enclave - - decrypted_data_length = resp_message->message_aes_gcm_data.payload_size; - plain_text_offset = decrypted_data_length; - decrypted_data = (uint8_t*)malloc(decrypted_data_length); - if(!decrypted_data) - { - SAFE_FREE(req_message); - SAFE_FREE(resp_message); - return MALLOC_ERROR; - } - memset(&l_tag, 0, 16); - - memset(decrypted_data, 0, decrypted_data_length); - - //Decrypt the response message payload - status = sgx_rijndael128GCM_decrypt(&session_info->active.AEK, resp_message->message_aes_gcm_data.payload, - decrypted_data_length, decrypted_data, - reinterpret_cast(&(resp_message->message_aes_gcm_data.reserved)), - sizeof(resp_message->message_aes_gcm_data.reserved), &(resp_message->message_aes_gcm_data.payload[plain_text_offset]), plaintext_length, - &resp_message->message_aes_gcm_data.payload_tag); - - if(SGX_SUCCESS != status) - { - SAFE_FREE(req_message); - SAFE_FREE(decrypted_data); - SAFE_FREE(resp_message); - return status; - } - - // Verify if the nonce obtained in the response is equal to the session nonce + 1 (Prevents replay attacks) - if(*(resp_message->message_aes_gcm_data.reserved) != (session_info->active.counter + 1 )) - { - SAFE_FREE(req_message); - SAFE_FREE(resp_message); - SAFE_FREE(decrypted_data); - return INVALID_PARAMETER_ERROR; - } - - //Update the value of the session nonce in the source enclave - session_info->active.counter = session_info->active.counter + 1; - - memcpy(out_buff_len, &decrypted_data_length, sizeof(decrypted_data_length)); - memcpy(*out_buff, decrypted_data, decrypted_data_length); - - SAFE_FREE(decrypted_data); - SAFE_FREE(req_message); - SAFE_FREE(resp_message); - return SUCCESS; - - -} - -//Process the request from the Source enclave and send the response message back to the Source enclave -ATTESTATION_STATUS generate_response(sgx_enclave_id_t src_enclave_id, - secure_message_t* req_message, - size_t req_message_size, - size_t max_payload_size, - secure_message_t* resp_message, - size_t resp_message_size) -{ - const uint8_t* plaintext; - uint32_t plaintext_length; - uint8_t *decrypted_data; - uint32_t decrypted_data_length; - uint32_t plain_text_offset; - ms_in_msg_exchange_t * ms; - size_t resp_data_length; - size_t resp_message_calc_size; - char* resp_data; - uint8_t l_tag[TAG_SIZE]; - size_t header_size, expected_payload_size; - dh_session_t *session_info; - secure_message_t* temp_resp_message; - uint32_t ret; - sgx_status_t status; - - plaintext = (const uint8_t*)(" "); - plaintext_length = 0; - - if(!req_message || !resp_message) - { - return INVALID_PARAMETER_ERROR; - } - - //Get the session information from the map corresponding to the source enclave id - std::map::iterator it = g_dest_session_info_map.find(src_enclave_id); - if(it != g_dest_session_info_map.end()) - { - session_info = &it->second; - } - else - { - return INVALID_SESSION; - } - - if(session_info->status != ACTIVE) - { - return INVALID_SESSION; - } - - //Set the decrypted data length to the payload size obtained from the message - decrypted_data_length = req_message->message_aes_gcm_data.payload_size; - - header_size = sizeof(secure_message_t); - expected_payload_size = req_message_size - header_size; - - //Verify the size of the payload - if(expected_payload_size != decrypted_data_length) - return INVALID_PARAMETER_ERROR; - - memset(&l_tag, 0, 16); - plain_text_offset = decrypted_data_length; - decrypted_data = (uint8_t*)malloc(decrypted_data_length); - if(!decrypted_data) - { - return MALLOC_ERROR; - } - - memset(decrypted_data, 0, decrypted_data_length); - - //Decrypt the request message payload from source enclave - status = sgx_rijndael128GCM_decrypt(&session_info->active.AEK, req_message->message_aes_gcm_data.payload, - decrypted_data_length, decrypted_data, - reinterpret_cast(&(req_message->message_aes_gcm_data.reserved)), - sizeof(req_message->message_aes_gcm_data.reserved), &(req_message->message_aes_gcm_data.payload[plain_text_offset]), plaintext_length, - &req_message->message_aes_gcm_data.payload_tag); - - if(SGX_SUCCESS != status) - { - SAFE_FREE(decrypted_data); - return status; - } - - //Casting the decrypted data to the marshaling structure type to obtain type of request (generic message exchange/enclave to enclave call) - ms = (ms_in_msg_exchange_t *)decrypted_data; - - - // Verify if the nonce obtained in the request is equal to the session nonce - if((uint32_t)*(req_message->message_aes_gcm_data.reserved) != session_info->active.counter || *(req_message->message_aes_gcm_data.reserved) > ((2^32)-2)) - { - SAFE_FREE(decrypted_data); - return INVALID_PARAMETER_ERROR; - } - - if(ms->msg_type == MESSAGE_EXCHANGE) - { - //Call the generic secret response generator for message exchange - ret = message_exchange_response_generator((char*)decrypted_data, &resp_data, &resp_data_length); - if(ret !=0) - { - SAFE_FREE(decrypted_data); - SAFE_FREE(resp_data); - return INVALID_SESSION; - } - } - else if(ms->msg_type == ENCLAVE_TO_ENCLAVE_CALL) - { - //Call the destination enclave's dispatcher to call the appropriate function in the destination enclave - ret = enclave_to_enclave_call_dispatcher((char*)decrypted_data, decrypted_data_length, &resp_data, &resp_data_length); - if(ret !=0) - { - SAFE_FREE(decrypted_data); - SAFE_FREE(resp_data); - return INVALID_SESSION; - } - } - else - { - SAFE_FREE(decrypted_data); - return INVALID_REQUEST_TYPE_ERROR; - } - - - if(resp_data_length > max_payload_size) - { - SAFE_FREE(resp_data); - SAFE_FREE(decrypted_data); - return OUT_BUFFER_LENGTH_ERROR; - } - - resp_message_calc_size = sizeof(secure_message_t)+ resp_data_length; - - if(resp_message_calc_size > resp_message_size) - { - SAFE_FREE(resp_data); - SAFE_FREE(decrypted_data); - return OUT_BUFFER_LENGTH_ERROR; - } - - //Code to build the response back to the Source Enclave - temp_resp_message = (secure_message_t*)malloc(resp_message_calc_size); - if(!temp_resp_message) - { - SAFE_FREE(resp_data); - SAFE_FREE(decrypted_data); - return MALLOC_ERROR; - } - - memset(temp_resp_message,0,sizeof(secure_message_t)+ resp_data_length); - const uint32_t data2encrypt_length = (uint32_t)resp_data_length; - temp_resp_message->session_id = session_info->session_id; - temp_resp_message->message_aes_gcm_data.payload_size = data2encrypt_length; - - //Increment the Session Nonce (Replay Protection) - session_info->active.counter = session_info->active.counter + 1; - - //Set the response nonce as the session nonce - memcpy(&temp_resp_message->message_aes_gcm_data.reserved,&session_info->active.counter,sizeof(session_info->active.counter)); - - //Prepare the response message with the encrypted payload - status = sgx_rijndael128GCM_encrypt(&session_info->active.AEK, (uint8_t*)resp_data, data2encrypt_length, - reinterpret_cast(&(temp_resp_message->message_aes_gcm_data.payload)), - reinterpret_cast(&(temp_resp_message->message_aes_gcm_data.reserved)), - sizeof(temp_resp_message->message_aes_gcm_data.reserved), plaintext, plaintext_length, - &(temp_resp_message->message_aes_gcm_data.payload_tag)); - - if(SGX_SUCCESS != status) - { - SAFE_FREE(resp_data); - SAFE_FREE(decrypted_data); - SAFE_FREE(temp_resp_message); - return status; - } - - memset(resp_message, 0, sizeof(secure_message_t)+ resp_data_length); - memcpy(resp_message, temp_resp_message, sizeof(secure_message_t)+ resp_data_length); - - SAFE_FREE(decrypted_data); - SAFE_FREE(resp_data); - SAFE_FREE(temp_resp_message); - - return SUCCESS; -} - -//Close a current session -ATTESTATION_STATUS close_session(sgx_enclave_id_t src_enclave_id, - sgx_enclave_id_t dest_enclave_id) -{ - sgx_status_t status; - - uint32_t retstatus; - - //Ocall to ask the destination enclave to end the session - status = end_session_ocall(&retstatus, src_enclave_id, dest_enclave_id); - if (status == SGX_SUCCESS) - { - if ((ATTESTATION_STATUS)retstatus != SUCCESS) - return ((ATTESTATION_STATUS)retstatus); - } - else - { - return ATTESTATION_SE_ERROR; - } - return SUCCESS; -} - -//Respond to the request from the Source Enclave to close the session -ATTESTATION_STATUS end_session(sgx_enclave_id_t src_enclave_id) -{ - ATTESTATION_STATUS status = SUCCESS; - int i; - dh_session_t session_info; - uint32_t session_id; - - //Get the session information from the map corresponding to the source enclave id - std::map::iterator it = g_dest_session_info_map.find(src_enclave_id); - if(it != g_dest_session_info_map.end()) - { - session_info = it->second; - } - else - { - return INVALID_SESSION; - } - - session_id = session_info.session_id; - //Erase the session information for the current session - g_dest_session_info_map.erase(src_enclave_id); - - //Update the session id tracker - if (g_session_count > 0) - { - //check if session exists - for (i=1; i <= MAX_SESSION_COUNT; i++) - { - if(g_session_id_tracker[i-1] != NULL && g_session_id_tracker[i-1]->session_id == session_id) - { - memset(g_session_id_tracker[i-1], 0, sizeof(session_id_tracker_t)); - SAFE_FREE(g_session_id_tracker[i-1]); - g_session_count--; - break; - } - } - } - - return status; - -} - - -//Returns a new sessionID for the source destination session -ATTESTATION_STATUS generate_session_id(uint32_t *session_id) -{ - ATTESTATION_STATUS status = SUCCESS; - - if(!session_id) - { - return INVALID_PARAMETER_ERROR; - } - //if the session structure is untintialized, set that as the next session ID - for (int i = 0; i < MAX_SESSION_COUNT; i++) - { - if (g_session_id_tracker[i] == NULL) - { - *session_id = i; - return status; - } - } - - status = NO_AVAILABLE_SESSION_ERROR; - - return status; - -} diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/EnclaveMessageExchange.h b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/EnclaveMessageExchange.h deleted file mode 100644 index e89fd088bf..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/EnclaveMessageExchange.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "datatypes.h" -#include "sgx_eid.h" -#include "sgx_trts.h" -#include -#include "dh_session_protocol.h" - -#ifndef LOCALATTESTATION_H_ -#define LOCALATTESTATION_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -uint32_t SGXAPI create_session(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, dh_session_t *p_session_info); -uint32_t SGXAPI send_request_receive_response(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, dh_session_t *p_session_info, char *inp_buff, size_t inp_buff_len, size_t max_out_buff_size, char **out_buff, size_t* out_buff_len); -uint32_t SGXAPI close_session(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/LocalAttestationCode.edl b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/LocalAttestationCode.edl deleted file mode 100644 index e4518c0c15..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/LocalAttestationCode.edl +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -enclave { - include "sgx_eid.h" - include "datatypes.h" - include "../Include/dh_session_protocol.h" - trusted{ - public uint32_t session_request(sgx_enclave_id_t src_enclave_id, [out] sgx_dh_msg1_t *dh_msg1, [out] uint32_t *session_id); - public uint32_t exchange_report(sgx_enclave_id_t src_enclave_id, [in] sgx_dh_msg2_t *dh_msg2, [out] sgx_dh_msg3_t *dh_msg3, uint32_t session_id); - public uint32_t generate_response(sgx_enclave_id_t src_enclave_id, [in, size = req_message_size] secure_message_t* req_message, size_t req_message_size, size_t max_payload_size, [out, size=resp_message_size] secure_message_t* resp_message, size_t resp_message_size ); - public uint32_t end_session(sgx_enclave_id_t src_enclave_id); - }; - - untrusted{ - uint32_t session_request_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, [out] sgx_dh_msg1_t *dh_msg1,[out] uint32_t *session_id); - uint32_t exchange_report_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, [in] sgx_dh_msg2_t *dh_msg2, [out] sgx_dh_msg3_t *dh_msg3, uint32_t session_id); - uint32_t send_request_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, [in, size = req_message_size] secure_message_t* req_message, size_t req_message_size, size_t max_payload_size, [out, size=resp_message_size] secure_message_t* resp_message, size_t resp_message_size); - uint32_t end_session_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/datatypes.h b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/datatypes.h deleted file mode 100644 index bf51c30ade..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/datatypes.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "sgx_report.h" -#include "sgx_eid.h" -#include "sgx_ecp_types.h" -#include "sgx_dh.h" -#include "sgx_tseal.h" - -#ifndef DATATYPES_H_ -#define DATATYPES_H_ - -#define DH_KEY_SIZE 20 -#define NONCE_SIZE 16 -#define MAC_SIZE 16 -#define MAC_KEY_SIZE 16 -#define PADDING_SIZE 16 - -#define TAG_SIZE 16 -#define IV_SIZE 12 - -#define DERIVE_MAC_KEY 0x0 -#define DERIVE_SESSION_KEY 0x1 -#define DERIVE_VK1_KEY 0x3 -#define DERIVE_VK2_KEY 0x4 - -#define CLOSED 0x0 -#define IN_PROGRESS 0x1 -#define ACTIVE 0x2 - -#define MESSAGE_EXCHANGE 0x0 -#define ENCLAVE_TO_ENCLAVE_CALL 0x1 - -#define INVALID_ARGUMENT -2 ///< Invalid function argument -#define LOGIC_ERROR -3 ///< Functional logic error -#define FILE_NOT_FOUND -4 ///< File not found - -#define SAFE_FREE(ptr) {if (NULL != (ptr)) {free(ptr); (ptr)=NULL;}} - -#define VMC_ATTRIBUTE_MASK 0xFFFFFFFFFFFFFFCB - -typedef uint8_t dh_nonce[NONCE_SIZE]; -typedef uint8_t cmac_128[MAC_SIZE]; - -#pragma pack(push, 1) - -//Format of the AES-GCM message being exchanged between the source and the destination enclaves -typedef struct _secure_message_t -{ - uint32_t session_id; //Session ID identifyting the session to which the message belongs - sgx_aes_gcm_data_t message_aes_gcm_data; -}secure_message_t; - -//Format of the input function parameter structure -typedef struct _ms_in_msg_exchange_t { - uint32_t msg_type; //Type of Call E2E or general message exchange - uint32_t target_fn_id; //Function Id to be called in Destination. Is valid only when msg_type=ENCLAVE_TO_ENCLAVE_CALL - uint32_t inparam_buff_len; //Length of the serialized input parameters - char inparam_buff[]; //Serialized input parameters -} ms_in_msg_exchange_t; - -//Format of the return value and output function parameter structure -typedef struct _ms_out_msg_exchange_t { - uint32_t retval_len; //Length of the return value - uint32_t ret_outparam_buff_len; //Length of the serialized return value and output parameters - char ret_outparam_buff[]; //Serialized return value and output parameters -} ms_out_msg_exchange_t; - -//Session Tracker to generate session ids -typedef struct _session_id_tracker_t -{ - uint32_t session_id; -}session_id_tracker_t; - -#pragma pack(pop) - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/error_codes.h b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/error_codes.h deleted file mode 100644 index 8f1e26b5b7..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/LocalAttestationCode/error_codes.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef ERROR_CODES_H_ -#define ERROR_CODES_H_ - -typedef uint32_t ATTESTATION_STATUS; - -#define SUCCESS 0x00 -#define INVALID_PARAMETER 0xE1 -#define VALID_SESSION 0xE2 -#define INVALID_SESSION 0xE3 -#define ATTESTATION_ERROR 0xE4 -#define ATTESTATION_SE_ERROR 0xE5 -#define IPP_ERROR 0xE6 -#define NO_AVAILABLE_SESSION_ERROR 0xE7 -#define MALLOC_ERROR 0xE8 -#define ERROR_TAG_MISMATCH 0xE9 -#define OUT_BUFFER_LENGTH_ERROR 0xEA -#define INVALID_REQUEST_TYPE_ERROR 0xEB -#define INVALID_PARAMETER_ERROR 0xEC -#define ENCLAVE_TRUST_ERROR 0xED -#define ENCRYPT_DECRYPT_ERROR 0xEE -#define DUPLICATE_SESSION 0xEF -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Makefile b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Makefile deleted file mode 100644 index 9401f77059..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Makefile +++ /dev/null @@ -1,346 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -######## SGX SDK Settings ######## - -SGX_SDK ?= /opt/intel/sgxsdk -SGX_MODE ?= HW -SGX_ARCH ?= x64 -SGX_DEBUG ?= 1 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## Library Settings ######## - -Trust_Lib_Name := libLocalAttestation_Trusted.a -TrustLib_Cpp_Files := $(wildcard LocalAttestationCode/*.cpp) -TrustLib_Cpp_Objects := $(TrustLib_Cpp_Files:.cpp=.o) -TrustLib_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx -I$(SGX_SDK)/include/epid -I./Include -TrustLib_Compile_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $(TrustLib_Include_Paths) -TrustLib_Compile_Cxx_Flags := -std=c++11 -nostdinc++ - -UnTrustLib_Name := libLocalAttestation_unTrusted.a -UnTrustLib_Cpp_Files := $(wildcard Untrusted_LocalAttestation/*.cpp) -UnTrustLib_Cpp_Objects := $(UnTrustLib_Cpp_Files:.cpp=.o) -UnTrustLib_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/ippcp -I./Include -I./LocalAttestationCode -UnTrustLib_Compile_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes -std=c++11 $(UnTrustLib_Include_Paths) - -######## App Settings ######## - -ifneq ($(SGX_MODE), HW) - Urts_Library_Name := sgx_urts_sim -else - Urts_Library_Name := sgx_urts -endif - -App_Cpp_Files := $(wildcard App/*.cpp) -App_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/ippcp -I./Include -I./LocalAttestationCode - -App_Compile_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_Compile_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_Compile_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_Compile_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Link_Flags := $(SGX_COMMON_CFLAGS) -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) -L. -lpthread -lLocalAttestation_unTrusted - -ifneq ($(SGX_MODE), HW) - App_Link_Flags += -lsgx_uae_service_sim -else - App_Link_Flags += -lsgx_uae_service -endif - -App_Cpp_Objects := $(App_Cpp_Files:.cpp=.o) -App_Name := app - -######## Enclave Settings ######## - -Enclave1_Version_Script := Enclave1/Enclave1.lds -Enclave2_Version_Script := Enclave2/Enclave2.lds -Enclave3_Version_Script := Enclave3/Enclave3.lds - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif -Crypto_Library_Name := sgx_tcrypto - -Enclave_Cpp_Files_1 := $(wildcard Enclave1/*.cpp) -Enclave_Cpp_Files_2 := $(wildcard Enclave2/*.cpp) -Enclave_Cpp_Files_3 := $(wildcard Enclave3/*.cpp) -Enclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx -I./LocalAttestationCode -I./Include - -CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9") -ifeq ($(CC_BELOW_4_9), 1) - Enclave_Compile_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector -else - Enclave_Compile_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector-strong -endif - -Enclave_Compile_Flags += $(Enclave_Include_Paths) - -# To generate a proper enclave, it is recommended to follow below guideline to link the trusted libraries: -# 1. Link sgx_trts with the `--whole-archive' and `--no-whole-archive' options, -# so that the whole content of trts is included in the enclave. -# 2. For other libraries, you just need to pull the required symbols. -# Use `--start-group' and `--end-group' to link these libraries. -# Do NOT move the libraries linked with `--start-group' and `--end-group' within `--whole-archive' and `--no-whole-archive' options. -# Otherwise, you may get some undesirable errors. -Common_Enclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -L. -lLocalAttestation_Trusted -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 -Wl,--gc-sections -Enclave1_Link_Flags := $(Common_Enclave_Link_Flags) -Wl,--version-script=$(Enclave1_Version_Script) -Enclave2_Link_Flags := $(Common_Enclave_Link_Flags) -Wl,--version-script=$(Enclave2_Version_Script) -Enclave3_Link_Flags := $(Common_Enclave_Link_Flags) -Wl,--version-script=$(Enclave3_Version_Script) - -Enclave_Cpp_Objects_1 := $(Enclave_Cpp_Files_1:.cpp=.o) -Enclave_Cpp_Objects_2 := $(Enclave_Cpp_Files_2:.cpp=.o) -Enclave_Cpp_Objects_3 := $(Enclave_Cpp_Files_3:.cpp=.o) - -Enclave_Name_1 := libenclave1.so -Enclave_Name_2 := libenclave2.so -Enclave_Name_3 := libenclave3.so - -ifeq ($(SGX_MODE), HW) -ifeq ($(SGX_DEBUG), 1) - Build_Mode = HW_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = HW_PRERELEASE -else - Build_Mode = HW_RELEASE -endif -else -ifeq ($(SGX_DEBUG), 1) - Build_Mode = SIM_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = SIM_PRERELEASE -else - Build_Mode = SIM_RELEASE -endif -endif - -ifeq ($(Build_Mode), HW_RELEASE) -all: .config_$(Build_Mode)_$(SGX_ARCH) $(Trust_Lib_Name) $(UnTrustLib_Name) Enclave1.so Enclave2.so Enclave3.so $(App_Name) - @echo "The project has been built in release hardware mode." - @echo "Please sign the enclaves (Enclave1.so, Enclave2.so, Enclave3.so) first with your signing keys before you run the $(App_Name) to launch and access the enclave." - @echo "To sign the enclaves use the following commands:" - @echo " $(SGX_ENCLAVE_SIGNER) sign -key -enclave Enclave1.so -out <$(Enclave_Name_1)> -config Enclave1/Enclave1.config.xml" - @echo " $(SGX_ENCLAVE_SIGNER) sign -key -enclave Enclave2.so -out <$(Enclave_Name_2)> -config Enclave2/Enclave2.config.xml" - @echo " $(SGX_ENCLAVE_SIGNER) sign -key -enclave Enclave3.so -out <$(Enclave_Name_3)> -config Enclave3/Enclave3.config.xml" - @echo "You can also sign the enclaves using an external signing tool." - @echo "To build the project in simulation mode set SGX_MODE=SIM. To build the project in prerelease mode set SGX_PRERELEASE=1 and SGX_MODE=HW." -else -all: .config_$(Build_Mode)_$(SGX_ARCH) $(Trust_Lib_Name) $(UnTrustLib_Name) $(Enclave_Name_1) $(Enclave_Name_2) $(Enclave_Name_3) $(App_Name) -ifeq ($(Build_Mode), HW_DEBUG) - @echo "The project has been built in debug hardware mode." -else ifeq ($(Build_Mode), SIM_DEBUG) - @echo "The project has been built in debug simulation mode." -else ifeq ($(Build_Mode), HW_PRERELEASE) - @echo "The project has been built in pre-release hardware mode." -else ifeq ($(Build_Mode), SIM_PRERELEASE) - @echo "The project has been built in pre-release simulation mode." -else - @echo "The project has been built in release simulation mode." -endif -endif - -.config_$(Build_Mode)_$(SGX_ARCH): - @rm -rf .config_* $(App_Name) *.so *.a App/*.o Enclave1/*.o Enclave1/*_t.* Enclave1/*_u.* Enclave2/*.o Enclave2/*_t.* Enclave2/*_u.* Enclave3/*.o Enclave3/*_t.* Enclave3/*_u.* LocalAttestationCode/*.o Untrusted_LocalAttestation/*.o LocalAttestationCode/*_t.* - @touch .config_$(Build_Mode)_$(SGX_ARCH) - -######## Library Objects ######## - -LocalAttestationCode/LocalAttestationCode_t.c LocalAttestationCode/LocalAttestationCode_t.h : $(SGX_EDGER8R) LocalAttestationCode/LocalAttestationCode.edl - @cd LocalAttestationCode && $(SGX_EDGER8R) --trusted ../LocalAttestationCode/LocalAttestationCode.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -LocalAttestationCode/LocalAttestationCode_t.o: LocalAttestationCode/LocalAttestationCode_t.c - @$(CC) $(TrustLib_Compile_Flags) -c $< -o $@ - @echo "CC <= $<" - -LocalAttestationCode/%.o: LocalAttestationCode/%.cpp LocalAttestationCode/LocalAttestationCode_t.h - @$(CXX) $(TrustLib_Compile_Flags) $(TrustLib_Compile_Cxx_Flags) -c $< -o $@ - @echo "CC <= $<" - -$(Trust_Lib_Name): LocalAttestationCode/LocalAttestationCode_t.o $(TrustLib_Cpp_Objects) - @$(AR) rcs $@ $^ - @echo "GEN => $@" - -Untrusted_LocalAttestation/%.o: Untrusted_LocalAttestation/%.cpp - @$(CXX) $(UnTrustLib_Compile_Flags) -c $< -o $@ - @echo "CC <= $<" - -$(UnTrustLib_Name): $(UnTrustLib_Cpp_Objects) - @$(AR) rcs $@ $^ - @echo "GEN => $@" - -######## App Objects ######## -Enclave1/Enclave1_u.c Enclave1/Enclave1_u.h: $(SGX_EDGER8R) Enclave1/Enclave1.edl - @cd Enclave1 && $(SGX_EDGER8R) --use-prefix --untrusted ../Enclave1/Enclave1.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -App/Enclave1_u.o: Enclave1/Enclave1_u.c - @$(CC) $(App_Compile_Flags) -c $< -o $@ - @echo "CC <= $<" - -Enclave2/Enclave2_u.c Enclave2/Enclave2_u.h: $(SGX_EDGER8R) Enclave2/Enclave2.edl - @cd Enclave2 && $(SGX_EDGER8R) --use-prefix --untrusted ../Enclave2/Enclave2.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -App/Enclave2_u.o: Enclave2/Enclave2_u.c - @$(CC) $(App_Compile_Flags) -c $< -o $@ - @echo "CC <= $<" - -Enclave3/Enclave3_u.c Enclave3/Enclave3_u.h: $(SGX_EDGER8R) Enclave3/Enclave3.edl - @cd Enclave3 && $(SGX_EDGER8R) --use-prefix --untrusted ../Enclave3/Enclave3.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -App/Enclave3_u.o: Enclave3/Enclave3_u.c - @$(CC) $(App_Compile_Flags) -c $< -o $@ - @echo "CC <= $<" - -App/%.o: App/%.cpp Enclave1/Enclave1_u.h Enclave2/Enclave2_u.h Enclave3/Enclave3_u.h - @$(CXX) $(App_Compile_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(App_Name): App/Enclave1_u.o App/Enclave2_u.o App/Enclave3_u.o $(App_Cpp_Objects) $(UnTrustLib_Name) - @$(CXX) $^ -o $@ $(App_Link_Flags) - @echo "LINK => $@" - - -######## Enclave Objects ######## - -Enclave1/Enclave1_t.c Enclave1/Enclave1_t.h: $(SGX_EDGER8R) Enclave1/Enclave1.edl - @cd Enclave1 && $(SGX_EDGER8R) --use-prefix --trusted ../Enclave1/Enclave1.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -Enclave1/Enclave1_t.o: Enclave1/Enclave1_t.c - @$(CC) $(Enclave_Compile_Flags) -c $< -o $@ - @echo "CC <= $<" - -Enclave1/%.o: Enclave1/%.cpp Enclave1/Enclave1_t.h - @$(CXX) -std=c++11 -nostdinc++ $(Enclave_Compile_Flags) -c $< -o $@ - @echo "CXX <= $<" - -Enclave1.so: Enclave1/Enclave1_t.o $(Enclave_Cpp_Objects_1) $(Trust_Lib_Name) - @$(CXX) Enclave1/Enclave1_t.o $(Enclave_Cpp_Objects_1) -o $@ $(Enclave1_Link_Flags) - @echo "LINK => $@" - -$(Enclave_Name_1): Enclave1.so - @$(SGX_ENCLAVE_SIGNER) sign -key Enclave1/Enclave1_private.pem -enclave Enclave1.so -out $@ -config Enclave1/Enclave1.config.xml - @echo "SIGN => $@" - -Enclave2/Enclave2_t.c: $(SGX_EDGER8R) Enclave2/Enclave2.edl - @cd Enclave2 && $(SGX_EDGER8R) --use-prefix --trusted ../Enclave2/Enclave2.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -Enclave2/Enclave2_t.o: Enclave2/Enclave2_t.c - @$(CC) $(Enclave_Compile_Flags) -c $< -o $@ - @echo "CC <= $<" - -Enclave2/%.o: Enclave2/%.cpp - @$(CXX) -std=c++11 -nostdinc++ $(Enclave_Compile_Flags) -c $< -o $@ - @echo "CXX <= $<" - -Enclave2.so: Enclave2/Enclave2_t.o $(Enclave_Cpp_Objects_2) $(Trust_Lib_Name) - @$(CXX) Enclave2/Enclave2_t.o $(Enclave_Cpp_Objects_2) -o $@ $(Enclave2_Link_Flags) - @echo "LINK => $@" - -$(Enclave_Name_2): Enclave2.so - @$(SGX_ENCLAVE_SIGNER) sign -key Enclave2/Enclave2_private.pem -enclave Enclave2.so -out $@ -config Enclave2/Enclave2.config.xml - @echo "SIGN => $@" - -Enclave3/Enclave3_t.c: $(SGX_EDGER8R) Enclave3/Enclave3.edl - @cd Enclave3 && $(SGX_EDGER8R) --use-prefix --trusted ../Enclave3/Enclave3.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -Enclave3/Enclave3_t.o: Enclave3/Enclave3_t.c - @$(CC) $(Enclave_Compile_Flags) -c $< -o $@ - @echo "CC <= $<" - -Enclave3/%.o: Enclave3/%.cpp - @$(CXX) -std=c++11 -nostdinc++ $(Enclave_Compile_Flags) -c $< -o $@ - @echo "CXX <= $<" - -Enclave3.so: Enclave3/Enclave3_t.o $(Enclave_Cpp_Objects_3) $(Trust_Lib_Name) - @$(CXX) Enclave3/Enclave3_t.o $(Enclave_Cpp_Objects_3) -o $@ $(Enclave3_Link_Flags) - @echo "LINK => $@" - -$(Enclave_Name_3): Enclave3.so - @$(SGX_ENCLAVE_SIGNER) sign -key Enclave3/Enclave3_private.pem -enclave Enclave3.so -out $@ -config Enclave3/Enclave3.config.xml - @echo "SIGN => $@" - -######## Clean ######## -.PHONY: clean - -clean: - @rm -rf .config_* $(App_Name) *.so *.a App/*.o Enclave1/*.o Enclave1/*_t.* Enclave1/*_u.* Enclave2/*.o Enclave2/*_t.* Enclave2/*_u.* Enclave3/*.o Enclave3/*_t.* Enclave3/*_u.* LocalAttestationCode/*.o Untrusted_LocalAttestation/*.o LocalAttestationCode/*_t.* diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/README.txt b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/README.txt deleted file mode 100644 index 6117cee435..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/README.txt +++ /dev/null @@ -1,29 +0,0 @@ ---------------------------- -Purpose of LocalAttestation ---------------------------- -The project demonstrates: -- How to establish a protected channel -- Secret message exchange using enclave to enclave function calls - ------------------------------------- -How to Build/Execute the Sample Code ------------------------------------- -1. Install Intel(R) Software Guard Extensions (Intel(R) SGX) SDK for Linux* OS -2. Make sure your environment is set: - $ source ${sgx-sdk-install-path}/environment -3. Build the project with the prepared Makefile: - a. Hardware Mode, Debug build: - $ make - b. Hardware Mode, Pre-release build: - $ make SGX_PRERELEASE=1 SGX_DEBUG=0 - c. Hardware Mode, Release build: - $ make SGX_DEBUG=0 - d. Simulation Mode, Debug build: - $ make SGX_MODE=SIM - e. Simulation Mode, Pre-release build: - $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0 - f. Simulation Mode, Release build: - $ make SGX_MODE=SIM SGX_DEBUG=0 -4. Execute the binary directly: - $ ./app -5. Remember to "make clean" before switching build mode diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Untrusted_LocalAttestation/UntrustedEnclaveMessageExchange.cpp b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Untrusted_LocalAttestation/UntrustedEnclaveMessageExchange.cpp deleted file mode 100644 index bc87f59dde..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Untrusted_LocalAttestation/UntrustedEnclaveMessageExchange.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "sgx_eid.h" -#include "error_codes.h" -#include "datatypes.h" -#include "sgx_urts.h" -#include "UntrustedEnclaveMessageExchange.h" -#include "sgx_dh.h" -#include - -std::mapg_enclave_id_map; - -//Makes an sgx_ecall to the destination enclave to get session id and message1 -ATTESTATION_STATUS session_request_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, sgx_dh_msg1_t* dh_msg1, uint32_t* session_id) -{ - uint32_t status = 0; - sgx_status_t ret = SGX_SUCCESS; - uint32_t temp_enclave_no; - - std::map::iterator it = g_enclave_id_map.find(dest_enclave_id); - if(it != g_enclave_id_map.end()) - { - temp_enclave_no = it->second; - } - else - { - return INVALID_SESSION; - } - - switch(temp_enclave_no) - { - case 1: - ret = Enclave1_session_request(dest_enclave_id, &status, src_enclave_id, dh_msg1, session_id); - break; - case 2: - ret = Enclave2_session_request(dest_enclave_id, &status, src_enclave_id, dh_msg1, session_id); - break; - case 3: - ret = Enclave3_session_request(dest_enclave_id, &status, src_enclave_id, dh_msg1, session_id); - break; - } - if (ret == SGX_SUCCESS) - return (ATTESTATION_STATUS)status; - else - return INVALID_SESSION; - -} -//Makes an sgx_ecall to the destination enclave sends message2 from the source enclave and gets message 3 from the destination enclave -ATTESTATION_STATUS exchange_report_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, sgx_dh_msg2_t *dh_msg2, sgx_dh_msg3_t *dh_msg3, uint32_t session_id) -{ - uint32_t status = 0; - sgx_status_t ret = SGX_SUCCESS; - uint32_t temp_enclave_no; - - std::map::iterator it = g_enclave_id_map.find(dest_enclave_id); - if(it != g_enclave_id_map.end()) - { - temp_enclave_no = it->second; - } - else - { - return INVALID_SESSION; - } - - switch(temp_enclave_no) - { - case 1: - ret = Enclave1_exchange_report(dest_enclave_id, &status, src_enclave_id, dh_msg2, dh_msg3, session_id); - break; - case 2: - ret = Enclave2_exchange_report(dest_enclave_id, &status, src_enclave_id, dh_msg2, dh_msg3, session_id); - break; - case 3: - ret = Enclave3_exchange_report(dest_enclave_id, &status, src_enclave_id, dh_msg2, dh_msg3, session_id); - break; - } - if (ret == SGX_SUCCESS) - return (ATTESTATION_STATUS)status; - else - return INVALID_SESSION; - -} - -//Make an sgx_ecall to the destination enclave function that generates the actual response -ATTESTATION_STATUS send_request_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id,secure_message_t* req_message, size_t req_message_size, size_t max_payload_size, secure_message_t* resp_message, size_t resp_message_size) -{ - uint32_t status = 0; - sgx_status_t ret = SGX_SUCCESS; - uint32_t temp_enclave_no; - - std::map::iterator it = g_enclave_id_map.find(dest_enclave_id); - if(it != g_enclave_id_map.end()) - { - temp_enclave_no = it->second; - } - else - { - return INVALID_SESSION; - } - - switch(temp_enclave_no) - { - case 1: - ret = Enclave1_generate_response(dest_enclave_id, &status, src_enclave_id, req_message, req_message_size, max_payload_size, resp_message, resp_message_size); - break; - case 2: - ret = Enclave2_generate_response(dest_enclave_id, &status, src_enclave_id, req_message, req_message_size, max_payload_size, resp_message, resp_message_size); - break; - case 3: - ret = Enclave3_generate_response(dest_enclave_id, &status, src_enclave_id, req_message, req_message_size, max_payload_size, resp_message, resp_message_size); - break; - } - if (ret == SGX_SUCCESS) - return (ATTESTATION_STATUS)status; - else - return INVALID_SESSION; - -} - -//Make an sgx_ecall to the destination enclave to close the session -ATTESTATION_STATUS end_session_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id) -{ - uint32_t status = 0; - sgx_status_t ret = SGX_SUCCESS; - uint32_t temp_enclave_no; - - std::map::iterator it = g_enclave_id_map.find(dest_enclave_id); - if(it != g_enclave_id_map.end()) - { - temp_enclave_no = it->second; - } - else - { - return INVALID_SESSION; - } - - switch(temp_enclave_no) - { - case 1: - ret = Enclave1_end_session(dest_enclave_id, &status, src_enclave_id); - break; - case 2: - ret = Enclave2_end_session(dest_enclave_id, &status, src_enclave_id); - break; - case 3: - ret = Enclave3_end_session(dest_enclave_id, &status, src_enclave_id); - break; - } - if (ret == SGX_SUCCESS) - return (ATTESTATION_STATUS)status; - else - return INVALID_SESSION; - -} diff --git a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Untrusted_LocalAttestation/UntrustedEnclaveMessageExchange.h b/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Untrusted_LocalAttestation/UntrustedEnclaveMessageExchange.h deleted file mode 100644 index 9c6dcfa886..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/LocalAttestation/Untrusted_LocalAttestation/UntrustedEnclaveMessageExchange.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "sgx_eid.h" -#include "error_codes.h" -#include "datatypes.h" -#include "sgx_urts.h" -#include "dh_session_protocol.h" -#include "sgx_dh.h" -#include - - -#ifndef ULOCALATTESTATION_H_ -#define ULOCALATTESTATION_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -sgx_status_t Enclave1_session_request(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, sgx_dh_msg1_t* dh_msg1, uint32_t* session_id); -sgx_status_t Enclave1_exchange_report(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, sgx_dh_msg2_t* dh_msg2, sgx_dh_msg3_t* dh_msg3, uint32_t session_id); -sgx_status_t Enclave1_generate_response(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, secure_message_t* req_message, size_t req_message_size, size_t max_payload_size, secure_message_t* resp_message, size_t resp_message_size); -sgx_status_t Enclave1_end_session(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id); - -sgx_status_t Enclave2_session_request(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, sgx_dh_msg1_t* dh_msg1, uint32_t* session_id); -sgx_status_t Enclave2_exchange_report(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, sgx_dh_msg2_t* dh_msg2, sgx_dh_msg3_t* dh_msg3, uint32_t session_id); -sgx_status_t Enclave2_generate_response(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, secure_message_t* req_message, size_t req_message_size, size_t max_payload_size, secure_message_t* resp_message, size_t resp_message_size); -sgx_status_t Enclave2_end_session(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id); - -sgx_status_t Enclave3_session_request(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, sgx_dh_msg1_t* dh_msg1, uint32_t* session_id); -sgx_status_t Enclave3_exchange_report(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, sgx_dh_msg2_t* dh_msg2, sgx_dh_msg3_t* dh_msg3, uint32_t session_id); -sgx_status_t Enclave3_generate_response(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id, secure_message_t* req_message, size_t req_message_size, size_t max_payload_size, secure_message_t* resp_message, size_t resp_message_size); -sgx_status_t Enclave3_end_session(sgx_enclave_id_t eid, uint32_t* retval, sgx_enclave_id_t src_enclave_id); - -uint32_t session_request_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, sgx_dh_msg1_t* dh_msg1, uint32_t* session_id); -uint32_t exchange_report_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, sgx_dh_msg2_t* dh_msg2, sgx_dh_msg3_t* dh_msg3, uint32_t session_id); -uint32_t send_request_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id, secure_message_t* req_message, size_t req_message_size, size_t max_payload_size, secure_message_t* resp_message, size_t resp_message_size); -uint32_t end_session_ocall(sgx_enclave_id_t src_enclave_id, sgx_enclave_id_t dest_enclave_id); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.cproject b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.cproject deleted file mode 100644 index 2894234136..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.cproject +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.project b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.project deleted file mode 100644 index 7f1ef0688c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - PowerTransition - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.core.ccnature - com.intel.sgx.sgxnature - - diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.settings/language.settings.xml b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.settings/language.settings.xml deleted file mode 100644 index bb1f9221e3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/.settings/language.settings.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/App.cpp b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/App.cpp deleted file mode 100644 index c70f8d1a1c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/App.cpp +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -// App.cpp : Define the entry point for the console application. -// - -#include -#include -#include -#include -#include - -#include "Enclave_u.h" -#include "sgx_urts.h" -#include "sgx_tseal.h" - -#include "rwlock.h" -#include "ErrorSupport.h" - -#define ENCLAVE_NAME "libenclave.signed.so" -#define TOKEN_NAME "Enclave.token" - -#define THREAD_NUM 3 - -// Global data -sgx_enclave_id_t global_eid = 0; -sgx_launch_token_t token = {0}; -rwlock_t lock_eid; -struct sealed_buf_t sealed_buf; - -using namespace std; - -// Ocall function -void print(const char *str) -{ - cout<()(std::this_thread::get_id()); - sgx_status_t ret = SGX_SUCCESS; - int retval = 0; - sgx_enclave_id_t current_eid = 0; - - // Enter the enclave to increase and seal the secret data for 100 times. - for(unsigned int i = 0; i< 50000; i++) - { - for( ; ; ) - { - // If power transition occurs, all the data inside the enclave will be lost when the system resumes. - // Therefore, if there are some secret data which need to be backed up for recover, - // users can choose to seal the secret data inside the enclave and back up the sealed data. - - // Enter the enclave to increase the secret data and back up the sealed data - rdlock(&lock_eid); - current_eid = global_eid; - rdunlock(&lock_eid); - ret = increase_and_seal_data(current_eid, &retval, thread_id, &sealed_buf); - - if(ret == SGX_ERROR_ENCLAVE_LOST) - { - // SGX_ERROR_ENCLAVE_LOST indicates the power transition occurs before the system resumes. - // Lock here is to make sure there is only one thread to load and initialize the enclave at the same time - wtlock(&lock_eid); - // The loading and initialization operations happen in current thread only if there is no other thread reloads and initializes the enclave before - if(current_eid == global_eid) - { - cout <<"power transition occured in increase_and_seal_data()." << endl; - // Use the backup sealed data to reload and initialize the enclave. - if((ret = load_and_initialize_enclave(¤t_eid, &sealed_buf)) != SGX_SUCCESS) - { - ret_error_support(ret); - wtunlock(&lock_eid); - return false; - } - else - { - // Update the global_eid after initializing the enclave successfully - global_eid = current_eid; - } - } - else - { - // The enclave has been reloaded by another thread. - // Update the current EID and do increase_and_seal_data() again. - current_eid = global_eid; - } - wtunlock(&lock_eid); - } - else - { - // No power transition occurs - break; - } - } - if(ret != SGX_SUCCESS) - { - ret_error_support(ret); - return false; - } - else if(retval != 0) - { - return false; - } - } - return true; -} - - -void thread_func() -{ - if(increase_and_seal_data_in_enclave() != true) - { - abort(); - } -} - -bool set_global_data() -{ - // Initialize the read/write lock. - init_rwlock(&lock_eid); - - // Get the saved launch token. - // If error occures, zero the token. - ifstream ifs(TOKEN_NAME, std::ios::binary | std::ios::in); - if(!ifs.good()) - { - memset(token, 0, sizeof(sgx_launch_token_t)); - } - else - { - ifs.read(reinterpret_cast(&token), sizeof(sgx_launch_token_t)); - if(ifs.fail()) - { - memset(&token, 0, sizeof(sgx_launch_token_t)); - } - } - - // Allocate memory to save the sealed data. - uint32_t sealed_len = sizeof(sgx_sealed_data_t) + sizeof(uint32_t); - for(int i = 0; i < BUF_NUM; i++) - { - sealed_buf.sealed_buf_ptr[i] = (uint8_t *)malloc(sealed_len); - if(sealed_buf.sealed_buf_ptr[i] == NULL) - { - cout << "Out of memory" << endl; - return false; - } - memset(sealed_buf.sealed_buf_ptr[i], 0, sealed_len); - } - sealed_buf.index = 0; // index indicates which buffer contains current sealed data and which contains the backup sealed data - - return true; -} - -void release_source() -{ - for(int i = 0; i < BUF_NUM; i++) - { - if(sealed_buf.sealed_buf_ptr[i] != NULL) - { - free(sealed_buf.sealed_buf_ptr[i]); - sealed_buf.sealed_buf_ptr[i] = NULL; - } - } - fini_rwlock(&lock_eid); - return; -} - -int main(int argc, char* argv[]) -{ - (void)argc, (void)argv; - - - // Initialize the global data - if(!set_global_data()) - { - release_source(); - cout << "Enter a character before exit ..." << endl; - getchar(); - return -1; - } - - // Load and initialize the signed enclave - // sealed_buf == NULL indicates it is the first time to initialize the enclave. - sgx_status_t ret = load_and_initialize_enclave(&global_eid , NULL); - if(ret != SGX_SUCCESS) - { - ret_error_support(ret); - release_source(); - cout << "Enter a character before exit ..." << endl; - getchar(); - return -1; - } - - cout << "****************************************************************" << endl; - cout << "Demonstrating Power transition needs your cooperation." << endl - << "Please take the following actions:" << endl - << " 1. Enter a character;" << endl - << " 2. Manually put the OS into a sleep or hibernate state;" << endl - << " 3. Resume the OS from that state;" << endl - << "Then you will see the application continues." << endl; - cout << "****************************************************************" << endl; - cout << "Now enter a character ..."; - getchar(); - - // Create multiple threads to calculate the sum - thread trd[THREAD_NUM]; - for (int i = 0; i< THREAD_NUM; i++) - { - trd[i] = thread(thread_func); - } - for (int i = 0; i < THREAD_NUM; i++) - { - trd[i].join(); - } - - // Release resources - release_source(); - - // Destroy the enclave - sgx_destroy_enclave(global_eid); - - cout << "Enter a character before exit ..." << endl; - getchar(); - return 0; -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/ErrorSupport.cpp b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/ErrorSupport.cpp deleted file mode 100644 index e6c82f77cc..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/ErrorSupport.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include -#include "ErrorSupport.h" - - -typedef struct _sgx_errlist_t { - sgx_status_t err; - const char * msg; -} sgx_errlist_t; - -static sgx_errlist_t sgx_errlist[] = { - {SGX_ERROR_UNEXPECTED, "Unexpected error occurred."}, - {SGX_ERROR_INVALID_PARAMETER, "Invalid parameter."}, - {SGX_ERROR_OUT_OF_MEMORY, "Out of memory."}, - {SGX_ERROR_ENCLAVE_LOST, "Power transition occurred."}, - {SGX_ERROR_INVALID_ENCLAVE, "Invalid enclave image."}, - {SGX_ERROR_INVALID_ENCLAVE_ID, "Invalid enclave identification."}, - {SGX_ERROR_INVALID_SIGNATURE, "Invalid enclave signature."}, - {SGX_ERROR_OUT_OF_EPC, "Out of EPC memory."}, - {SGX_ERROR_NO_DEVICE, "Invalid SGX device."}, - {SGX_ERROR_MEMORY_MAP_CONFLICT, "Memory map conflicted."}, - {SGX_ERROR_INVALID_METADATA, "Invalid encalve metadata."}, - {SGX_ERROR_DEVICE_BUSY, "SGX device is busy."}, - {SGX_ERROR_INVALID_VERSION, "Enclave metadata version is invalid."}, - {SGX_ERROR_ENCLAVE_FILE_ACCESS, "Can't open enclave file."}, - - {SGX_ERROR_INVALID_FUNCTION, "Invalid function name."}, - {SGX_ERROR_OUT_OF_TCS, "Out of TCS."}, - {SGX_ERROR_ENCLAVE_CRASHED, "The enclave is crashed."}, - - {SGX_ERROR_MAC_MISMATCH, "Report varification error occurred."}, - {SGX_ERROR_INVALID_ATTRIBUTE, "The enclave is not authorized."}, - {SGX_ERROR_INVALID_CPUSVN, "Invalid CPUSVN."}, - {SGX_ERROR_INVALID_ISVSVN, "Invalid ISVSVN."}, - {SGX_ERROR_INVALID_KEYNAME, "The requested key name is invalid."}, - - {SGX_ERROR_SERVICE_UNAVAILABLE, "AESM service is not responsive."}, - {SGX_ERROR_SERVICE_TIMEOUT, "Request to AESM is time out."}, - {SGX_ERROR_SERVICE_INVALID_PRIVILEGE, "Error occurred while getting launch token."}, -}; - - -void ret_error_support(sgx_status_t ret) -{ - size_t idx = 0; - size_t ttl = sizeof sgx_errlist/sizeof sgx_errlist[0]; - - for (idx = 0; idx < ttl; idx++) { - if(ret == sgx_errlist[idx].err) { - std::cout << "Error: "<< sgx_errlist[idx].msg << std::endl; - break; - } - } - if (idx == ttl) - std::cout << "Error: Unexpected error occurred." < -void wtlock(prwlock_t lock) -{ - int ret = pthread_rwlock_wrlock(lock); - if(0 != ret) - abort(); -} - -void wtunlock(prwlock_t lock) -{ - int ret = pthread_rwlock_unlock(lock); - if(0 != ret) - abort(); -} - - -void rdlock(prwlock_t lock) -{ - int ret = pthread_rwlock_rdlock(lock); - if(0 != ret) - abort(); -} - -void rdunlock(prwlock_t lock) -{ - int ret = pthread_rwlock_unlock(lock); - if(0 != ret) - abort(); -} - -void init_rwlock(prwlock_t lock) -{ - //use the default attribute. - int ret = pthread_rwlock_init(lock, NULL); - if(0 != ret) - abort(); -} - -void fini_rwlock(prwlock_t lock) -{ - int ret = pthread_rwlock_destroy(lock); - if(0 != ret) - abort(); -} - - diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/rwlock.h b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/rwlock.h deleted file mode 100644 index f25031c92c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/App/rwlock.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - - -#ifndef _RWLOCK_H -#define _RWLOCK_H - -#include -typedef pthread_rwlock_t rwlock_t; -typedef pthread_rwlock_t* prwlock_t; - -#ifdef __cplusplus -extern "C" { -#endif - - void wtlock(prwlock_t lock); - void rdlock(prwlock_t lock); - void rdunlock(prwlock_t lock); - void wtunlock(prwlock_t lock); - void init_rwlock(prwlock_t lock); - void fini_rwlock(prwlock_t lock); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Common/types.h b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Common/types.h deleted file mode 100644 index cb40720ff7..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Common/types.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _TYPES_H_ -#define _TYPES_H_ - -#define BUF_NUM 2 - -#define MOD2(x) ((x) % BUF_NUM) - -struct sealed_buf_t -{ - unsigned int index; - void * sealed_buf_ptr[BUF_NUM]; -}; - - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.config.xml b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.config.xml deleted file mode 100644 index 6187e8ba72..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 0 - 0 - 0x40000 - 0x100000 - 3 - 1 - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.cpp b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.cpp deleted file mode 100644 index 5f95011b49..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include "string.h" -#include "stdlib.h" -#include "stdio.h" -#include "sgx_trts.h" -#include "sgx_thread.h" -#include "sgx_tseal.h" - -#include "Enclave_t.h" - -uint32_t g_secret; -sgx_thread_mutex_t g_mutex = SGX_THREAD_MUTEX_INITIALIZER; - -static inline void free_allocated_memory(void *pointer) -{ - if(pointer != NULL) - { - free(pointer); - pointer = NULL; - } -} - - -int initialize_enclave(struct sealed_buf_t *sealed_buf) -{ - // sealed_buf == NULL indicates it is the first time to initialize the enclave - if(sealed_buf == NULL) - { - sgx_thread_mutex_lock(&g_mutex); - g_secret = 0; - sgx_thread_mutex_unlock(&g_mutex); - return 0; - } - - // It is not the first time to initialize the enclave - // Reinitialize the enclave to recover the secret data from the input backup sealed data. - - uint32_t len = sizeof(sgx_sealed_data_t) + sizeof(uint32_t); - //Check the sealed_buf length and check the outside pointers deeply - if(sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index)] == NULL || - sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index + 1)] == NULL || - !sgx_is_outside_enclave(sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index)], len) || - !sgx_is_outside_enclave(sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index + 1)], len)) - { - print("Incorrect input parameter(s).\n"); - return -1; - } - - // Retrieve the secret from current backup sealed data - uint32_t unsealed_data = 0; - uint32_t unsealed_data_length = sizeof(g_secret); - uint8_t *plain_text = NULL; - uint32_t plain_text_length = 0; - uint8_t *temp_sealed_buf = (uint8_t *)malloc(len); - if(temp_sealed_buf == NULL) - { - print("Out of memory.\n"); - return -1; - } - - sgx_thread_mutex_lock(&g_mutex); - memcpy(temp_sealed_buf, sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index)], len); - - // Unseal current sealed buf - sgx_status_t ret = sgx_unseal_data((sgx_sealed_data_t *)temp_sealed_buf, plain_text, &plain_text_length, (uint8_t *)&unsealed_data, &unsealed_data_length); - if(ret == SGX_SUCCESS) - { - g_secret = unsealed_data; - sgx_thread_mutex_unlock(&g_mutex); - free_allocated_memory(temp_sealed_buf); - return 0; - } - else - { - sgx_thread_mutex_unlock(&g_mutex); - print("Failed to reinitialize the enclave.\n"); - free_allocated_memory(temp_sealed_buf); - return -1; - } -} - -int increase_and_seal_data(size_t tid, struct sealed_buf_t* sealed_buf) -{ - uint32_t sealed_len = sizeof(sgx_sealed_data_t) + sizeof(g_secret); - // Check the sealed_buf length and check the outside pointers deeply - if(sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index)] == NULL || - sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index + 1)] == NULL || - !sgx_is_outside_enclave(sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index)], sealed_len) || - !sgx_is_outside_enclave(sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index + 1)], sealed_len)) - { - print("Incorrect input parameter(s).\n"); - return -1; - } - - char string_buf[BUFSIZ] = {'\0'}; - uint32_t temp_secret = 0; - uint8_t *plain_text = NULL; - uint32_t plain_text_length = 0; - uint8_t *temp_sealed_buf = (uint8_t *)malloc(sealed_len); - if(temp_sealed_buf == NULL) - { - print("Out of memory.\n"); - return -1; - } - memset(temp_sealed_buf, 0, sealed_len); - - sgx_thread_mutex_lock(&g_mutex); - - // Increase and seal the secret data - temp_secret = ++g_secret; - sgx_status_t ret = sgx_seal_data(plain_text_length, plain_text, sizeof(g_secret), (uint8_t *)&g_secret, sealed_len, (sgx_sealed_data_t *)temp_sealed_buf); - if(ret != SGX_SUCCESS) - { - sgx_thread_mutex_unlock(&g_mutex); - print("Failed to seal data\n"); - free_allocated_memory(temp_sealed_buf); - return -1; - } - // Backup the sealed data to outside buffer - memcpy(sealed_buf->sealed_buf_ptr[MOD2(sealed_buf->index + 1)], temp_sealed_buf, sealed_len); - sealed_buf->index++; - - sgx_thread_mutex_unlock(&g_mutex); - free_allocated_memory(temp_sealed_buf); - - // Ocall to print the unsealed secret data outside. - // In theory, the secret data(s) SHOULD NOT be transferred outside the enclave as clear text(s). - // So please DO NOT print any secret outside. Here printing the secret data to outside is only for demo. - snprintf(string_buf, BUFSIZ, "Thread %#x>: %u\n", (unsigned int)tid, (unsigned int)temp_secret); - print(string_buf); - return 0; -} diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.edl b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.edl deleted file mode 100644 index 6b687f4bb5..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.edl +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -enclave { - - // Import the Ocalls for trusted mutex - from "sgx_tstdc.edl" import *; - include "types.h" - - trusted { - public int initialize_enclave([in]struct sealed_buf_t* sealed_buf); - public int increase_and_seal_data(size_t tid, [in, out]struct sealed_buf_t* sealed_buf); - }; - - untrusted { - void print([in, string] const char *string); - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.lds b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.lds deleted file mode 100644 index 20fa0d090f..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave.lds +++ /dev/null @@ -1,10 +0,0 @@ -libenclave.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - g_peak_heap_used; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave_private.pem b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave_private.pem deleted file mode 100644 index 529d07be35..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Enclave/Enclave_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4gIBAAKCAYEAroOogvsj/fZDZY8XFdkl6dJmky0lRvnWMmpeH41Bla6U1qLZ -AmZuyIF+mQC/cgojIsrBMzBxb1kKqzATF4+XwPwgKz7fmiddmHyYz2WDJfAjIveJ -ZjdMjM4+EytGlkkJ52T8V8ds0/L2qKexJ+NBLxkeQLfV8n1mIk7zX7jguwbCG1Pr -nEMdJ3Sew20vnje+RsngAzdPChoJpVsWi/K7cettX/tbnre1DL02GXc5qJoQYk7b -3zkmhz31TgFrd9VVtmUGyFXAysuSAb3EN+5VnHGr0xKkeg8utErea2FNtNIgua8H -ONfm9Eiyaav1SVKzPHlyqLtcdxH3I8Wg7yqMsaprZ1n5A1v/levxnL8+It02KseD -5HqV4rf/cImSlCt3lpRg8U5E1pyFQ2IVEC/XTDMiI3c+AR+w2jSRB3Bwn9zJtFlW -KHG3m1xGI4ck+Lci1JvWWLXQagQSPtZTsubxTQNx1gsgZhgv1JHVZMdbVlAbbRMC -1nSuJNl7KPAS/VfzAgEDAoIBgHRXxaynbVP5gkO0ug6Qw/E27wzIw4SmjsxG6Wpe -K7kfDeRskKxESdsA/xCrKkwGwhcx1iIgS5+Qscd1Yg+1D9X9asd/P7waPmWoZd+Z -AhlKwhdPsO7PiF3e1AzHhGQwsUTt/Y/aSI1MpHBvy2/s1h9mFCslOUxTmWw0oj/Q -ldIEgWeNR72CE2+jFIJIyml6ftnb6qzPiga8Bm48ubKh0kvySOqnkmnPzgh+JBD6 -JnBmtZbfPT97bwTT+N6rnPqOOApvfHPf15kWI8yDbprG1l4OCUaIUH1AszxLd826 -5IPM+8gINLRDP1MA6azECPjTyHXhtnSIBZCyWSVkc05vYmNXYUNiXWMajcxW9M02 -wKzFELO8NCEAkaTPxwo4SCyIjUxiK1LbQ9h8PSy4c1+gGP4LAMR8xqP4QKg6zdu9 -osUGG/xRe/uufgTBFkcjqBHtK5L5VI0jeNIUAgW/6iNbYXjBMJ0GfauLs+g1VsOm -WfdgXzsb9DYdMa0OXXHypmV4GwKBwQDUwQj8RKJ6c8cT4vcWCoJvJF00+RFL+P3i -Gx2DLERxRrDa8AVGfqaCjsR+3vLgG8V/py+z+dxZYSqeB80Qeo6PDITcRKoeAYh9 -xlT3LJOS+k1cJcEmlbbO2IjLkTmzSwa80fWexKu8/Xv6vv15gpqYl1ngYoqJM3pd -vzmTIOi7MKSZ0WmEQavrZj8zK4endE3v0eAEeQ55j1GImbypSf7Idh7wOXtjZ7WD -Dg6yWDrri+AP/L3gClMj8wsAxMV4ZR8CgcEA0fzDHkFa6raVOxWnObmRoDhAtE0a -cjUj976NM5yyfdf2MrKy4/RhdTiPZ6b08/lBC/+xRfV3xKVGzacm6QjqjZrUpgHC -0LKiZaMtccCJjLtPwQd0jGQEnKfMFaPsnhOc5y8qVkCzVOSthY5qhz0XNotHHFmJ -gffVgB0iqrMTvSL7IA2yqqpOqNRlhaYhNl8TiFP3gIeMtVa9rZy31JPgT2uJ+kfo -gV7sdTPEjPWZd7OshGxWpT6QfVDj/T9T7L6tAoHBAI3WBf2DFvxNL2KXT2QHAZ9t -k3imC4f7U+wSE6zILaDZyzygA4RUbwG0gv8/TJVn2P/Eynf76DuWHGlaiLWnCbSz -Az2DHBQBBaku409zDQym3j1ugMRjzzSQWzJg0SIyBH3hTmnYcn3+Uqcp/lEBvGW6 -O+rsXFt3pukqJmIV8HzLGGaLm62BHUeZf3dyWm+i3p/hQAL7Xvu04QW70xuGqdr5 -afV7p5eaeQIJXyGQJ0eylV/90+qxjMKiB1XYg6WYvwKBwQCL/ddpgOdHJGN8uRom -e7Zq0Csi3hGheMKlKbN3vcxT5U7MdyHtTZZOJbTvxKNNUNYH/8uD+PqDGNneb29G -BfGzvI3EASyLIcGZF3OhKwZd0jUrWk2y7Vhob91jwp2+t73vdMbkKyI4mHOuXvGv -fg95si9oO7EBT+Oqvhccd2J+F1IVXncccYnF4u5ZGWt5lLewN/pVr7MjjykeaHqN -t+rfnQam2psA6fL4zS2zTmZPzR2tnY8Y1GBTi0Ko1OKd1HMCgcAb5cB/7/AQlhP9 -yQa04PLH9ygQkKKptZp7dy5WcWRx0K/hAHRoi2aw1wZqfm7VBNu2SLcs90kCCCxp -6C5sfJi6b8NpNbIPC+sc9wsFr7pGo9SFzQ78UlcWYK2Gu2FxlMjonhka5hvo4zvg -WxlpXKEkaFt3gLd92m/dMqBrHfafH7VwOJY2zT3WIpjwuk0ZzmRg5p0pG/svVQEH -NZmwRwlopysbR69B/n1nefJ84UO50fLh5s5Zr3gBRwbWNZyzhXk= ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Makefile b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Makefile deleted file mode 100644 index ca977307f0..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/Makefile +++ /dev/null @@ -1,248 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -####### SGX SDK Settings ######## - -SGX_SDK ?= /opt/intel/sgxsdk -SGX_MODE ?= HW -SGX_ARCH ?= x64 -SGX_DEBUG ?= 1 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -ifneq ($(SGX_MODE), HW) - Urts_Library_Name := sgx_urts_sim -else - Urts_Library_Name := sgx_urts -endif - -App_Cpp_Files := $(wildcard App/*.cpp) -App_Include_Paths := -I$(SGX_SDK)/include -I./Common - -App_Compile_CFlags := -fPIC -Wno-attributes $(App_Include_Paths) -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_Compile_CFlags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_Compile_CFlags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_Compile_CFlags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Compile_CXXFlags := -std=c++11 $(App_Compile_CFlags) -App_Link_Flags := -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) -lpthread - -ifneq ($(SGX_MODE), HW) - App_Link_Flags += -lsgx_uae_service_sim -else - App_Link_Flags += -lsgx_uae_service -endif - -Gen_Untrusted_Source := App/Enclave_u.c -Gen_Untrusted_Object := App/Enclave_u.o - -App_Objects := $(Gen_Untrusted_Object) $(App_Cpp_Files:.cpp=.o) - -App_Name := app - - -######## Enclave Settings ######## - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif -Crypto_Library_Name := sgx_tcrypto - -Enclave_Cpp_Files := $(wildcard Enclave/*.cpp) - -Enclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx -I./Common - -CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9") -ifeq ($(CC_BELOW_4_9), 1) - Enclave_Compile_CFlags := -fstack-protector -else - Enclave_Compile_CFlags := -fstack-protector-strong -endif -Enclave_Compile_CFlags += -nostdinc -ffreestanding -fvisibility=hidden -fpie -ffunction-sections -fdata-sections $(Enclave_Include_Paths) -Enclave_Compile_CXXFlags := -nostdinc++ -std=c++11 $(Enclave_Compile_CFlags) - -# To generate a proper enclave, it is recommended to follow below guideline to link the trusted libraries: -# 1. Link sgx_trts with the `--whole-archive' and `--no-whole-archive' options, -# so that the whole content of trts is included in the enclave. -# 2. For other libraries, you just need to pull the required symbols. -# Use `--start-group' and `--end-group' to link these libraries. -# Do NOT move the libraries linked with `--start-group' and `--end-group' within `--whole-archive' and `--no-whole-archive' options. -# Otherwise, you may get some undesirable errors. -Enclave_Link_Flags := -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,--version-script=Enclave/Enclave.lds -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic -Wl,--defsym,__ImageBase=0 -Wl,--gc-sections - -Enclave_Cpp_Objects := $(Enclave_Cpp_Files:.cpp=.o) -Gen_Trusted_Source := Enclave/Enclave_t.c -Gen_Trusted_Object := Enclave/Enclave_t.o - -Enclave_Objects := $(Gen_Trusted_Object) $(Enclave_Cpp_Files:.cpp=.o) - -Enclave_Name := libenclave.so -Signed_Enclave_Name := libenclave.signed.so -Enclave_Config_File := Enclave/Enclave.config.xml - -ifeq ($(SGX_MODE), HW) -ifeq ($(SGX_DEBUG), 1) - Build_Mode = HW_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = HW_PRERELEASE -else - Build_Mode = HW_RELEASE -endif -else -ifeq ($(SGX_DEBUG), 1) - Build_Mode = SIM_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = SIM_PRERELEASE -else - Build_Mode = SIM_RELEASE -endif -endif - -ifeq ($(Build_Mode), HW_RELEASE) -all: .config_$(Build_Mode)_$(SGX_ARCH) $(App_Name) $(Enclave_Name) - @echo "The project has been built in release hardware mode." - @echo "Please sign the $(Enclave_Name) first with your signing key before you run the $(App_Name) to launch and access the enclave." - @echo "To sign the enclave use the command:" - @echo " $(SGX_ENCLAVE_SIGNER) sign -key -enclave $(Enclave_Name) -out <$(Signed_Enclave_Name)> -config $(Enclave_Config_File)" - @echo "You can also sign the enclave using an external signing tool." - @echo "To build the project in simulation mode set SGX_MODE=SIM. To build the project in prerelease mode set SGX_PRERELEASE=1 and SGX_MODE=HW." -else -all: .config_$(Build_Mode)_$(SGX_ARCH) $(App_Name) $(Signed_Enclave_Name) -ifeq ($(Build_Mode), HW_DEBUG) - @echo "The project has been built in debug hardware mode." -else ifeq ($(Build_Mode), SIM_DEBUG) - @echo "The project has been built in debug simulation mode." -else ifeq ($(Build_Mode), HW_PRERELEASE) - @echo "The project has been built in pre-release hardware mode." -else ifeq ($(Build_Mode), SIM_PRERELEASE) - @echo "The project has been built in pre-release simulation mode." -else - @echo "The project has been built in release simulation mode." -endif -endif - -.config_$(Build_Mode)_$(SGX_ARCH): - @rm -f .config_* $(App_Name) $(App_Objects) $(Enclave_Name) $(Enclave_Objects) App/Enclave_u.* Enclave/Enclave_t.* $(Signed_Enclave_Name) - @touch .config_$(Build_Mode)_$(SGX_ARCH) - -######## App Objects ######## - -$(Gen_Untrusted_Source): $(SGX_EDGER8R) Enclave/Enclave.edl - @cd App && $(SGX_EDGER8R) --untrusted ../Enclave/Enclave.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -$(Gen_Untrusted_Object): $(Gen_Untrusted_Source) - @$(CC) $(SGX_COMMON_CFLAGS) $(App_Compile_CFlags) -c $< -o $@ - @echo "CC <= $<" - -App/%.o: App/%.cpp - @$(CXX) $(SGX_COMMON_CFLAGS) $(App_Compile_CXXFlags) -c $< -o $@ - @echo "CXX <= $<" - -$(App_Name): $(App_Objects) - @$(CXX) $(SGX_COMMON_CFLAGS) $^ -o $@ $(App_Link_Flags) - @echo "LINK => $@" - - -######## Enclave Objects ######## - -$(Gen_Trusted_Source): $(SGX_EDGER8R) Enclave/Enclave.edl - @cd Enclave && $(SGX_EDGER8R) --trusted Enclave.edl --search-path $(SGX_SDK)/include - @echo "GEN => $@" -$(Gen_Trusted_Object): $(Gen_Trusted_Source) - @$(CC) $(SGX_COMMON_CFLAGS) $(Enclave_Compile_CFlags) -c $< -o $@ - @echo "CC <= $<" - -Enclave/%.o: Enclave/%.cpp - @$(CXX) $(SGX_COMMON_CFLAGS) $(Enclave_Compile_CXXFlags) -c $< -o $@ - @echo "CXX <= $<" - -$(Enclave_Name): $(Enclave_Objects) - @$(CXX) $(SGX_COMMON_CFLAGS) $(Enclave_Objects) -o $@ $(Enclave_Link_Flags) - @echo "LINK => $@" - -$(Signed_Enclave_Name): $(Enclave_Name) - @$(SGX_ENCLAVE_SIGNER) sign -key Enclave/Enclave_private.pem -enclave $(Enclave_Name) -out $@ -config $(Enclave_Config_File) - @echo "SIGN => $@" - - -######### clean up ######## -.PHONY: clean - - -clean: - @rm -f .config_* $(App_Name) $(App_Objects) $(Enclave_Name) $(Enclave_Objects) App/Enclave_u.* Enclave/Enclave_t.* $(Signed_Enclave_Name) diff --git a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/README.txt b/sgx-jvm/linux-sgx/SampleCode/PowerTransition/README.txt deleted file mode 100644 index fe2c4b93ca..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/PowerTransition/README.txt +++ /dev/null @@ -1,28 +0,0 @@ --------------------------- -Purpose of PowerTransition --------------------------- -The project demonstrates one method about power transition handling for Intel(R) -Software Guard Extensions projects development. - ------------------------------------- -How to Build/Execute the Sample Code ------------------------------------- -1. Install Intel(R) Software Guard Extensions (Intel(R) SGX) SDK for Linux* OS -2. Make sure your environment is set: - $ source ${sgx-sdk-install-path}/environment -3. Build the project with the prepared Makefile: - a. Hardware Mode, Debug build: - $ make - b. Hardware Mode, Pre-release build: - $ make SGX_PRERELEASE=1 SGX_DEBUG=0 - c. Hardware Mode, Release build: - $ make SGX_DEBUG=0 - d. Simulation Mode, Debug build: - $ make SGX_MODE=SIM - e. Simulation Mode, Pre-release build: - $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0 - f. Simulation Mode, Release build: - $ make SGX_MODE=SIM SGX_DEBUG=0 -4. Execute the binary directly: - $ ./app -5. Remember to "make clean" before switching build mode diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.cproject b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.cproject deleted file mode 100644 index 28718ebf6f..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.cproject +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.project b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.project deleted file mode 100644 index 3cc71f6a6a..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - RemoteAttestation - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.core.ccnature - com.intel.sgx.sgxnature - - diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.settings/language.settings.xml b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.settings/language.settings.xml deleted file mode 100644 index bb1f9221e3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/.settings/language.settings.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/Makefile b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/Makefile deleted file mode 100644 index aae43b4215..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/Makefile +++ /dev/null @@ -1,274 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -######## SGX SDK Settings ######## - -SGX_SDK ?= /opt/intel/sgxsdk -SGX_MODE ?= HW -SGX_ARCH ?= x64 -SGX_DEBUG ?= 1 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -ifeq ($(SUPPLIED_KEY_DERIVATION), 1) - SGX_COMMON_CFLAGS += -DSUPPLIED_KEY_DERIVATION -endif -######## App Settings ######## - -ifneq ($(SGX_MODE), HW) - Urts_Library_Name := sgx_urts_sim -else - Urts_Library_Name := sgx_urts -endif - -App_Cpp_Files := isv_app/isv_app.cpp -App_Include_Paths := -Iservice_provider -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 -App_Link_Flags := $(SGX_COMMON_CFLAGS) -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) -L. -lsgx_ukey_exchange -lpthread -lservice_provider -Wl,-rpath=$(CURDIR)/sample_libcrypto -Wl,-rpath=$(CURDIR) - -ifneq ($(SGX_MODE), HW) - App_Link_Flags += -lsgx_uae_service_sim -else - App_Link_Flags += -lsgx_uae_service -endif - -App_Cpp_Objects := $(App_Cpp_Files:.cpp=.o) - -App_Name := app - -######## Service Provider Settings ######## - -ServiceProvider_Cpp_Files := service_provider/ecp.cpp service_provider/network_ra.cpp service_provider/service_provider.cpp service_provider/ias_ra.cpp -ServiceProvider_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx -Isample_libcrypto - -ServiceProvider_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes -I$(SGX_SDK)/include -Isample_libcrypto -ServiceProvider_Cpp_Flags := $(ServiceProvider_C_Flags) -std=c++11 -ServiceProvider_Link_Flags := -shared $(SGX_COMMON_CFLAGS) -L$(SGX_LIBRARY_PATH) -lsample_libcrypto -Lsample_libcrypto - -ServiceProvider_Cpp_Objects := $(ServiceProvider_Cpp_Files:.cpp=.o) - -######## Enclave Settings ######## - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif -Crypto_Library_Name := sgx_tcrypto - -Enclave_Cpp_Files := isv_enclave/isv_enclave.cpp -Enclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx - -CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9") -ifeq ($(CC_BELOW_4_9), 1) - Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector -else - Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector-strong -endif -Enclave_C_Flags += $(Enclave_Include_Paths) -Enclave_Cpp_Flags := $(Enclave_C_Flags) -std=c++11 -nostdinc++ - -# To generate a proper enclave, it is recommended to follow below guideline to link the trusted libraries: -# 1. Link sgx_trts with the `--whole-archive' and `--no-whole-archive' options, -# so that the whole content of trts is included in the enclave. -# 2. For other libraries, you just need to pull the required symbols. -# Use `--start-group' and `--end-group' to link these libraries. -# Do NOT move the libraries linked with `--start-group' and `--end-group' within `--whole-archive' and `--no-whole-archive' options. -# Otherwise, you may get some undesirable errors. -Enclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -lsgx_tkey_exchange -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 -Wl,--gc-sections \ - -Wl,--version-script=isv_enclave/isv_enclave.lds - -Enclave_Cpp_Objects := $(Enclave_Cpp_Files:.cpp=.o) - -Enclave_Name := isv_enclave.so -Signed_Enclave_Name := isv_enclave.signed.so -Enclave_Config_File := isv_enclave/isv_enclave.config.xml - -ifeq ($(SGX_MODE), HW) -ifeq ($(SGX_DEBUG), 1) - Build_Mode = HW_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = HW_PRERELEASE -else - Build_Mode = HW_RELEASE -endif -else -ifeq ($(SGX_DEBUG), 1) - Build_Mode = SIM_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = SIM_PRERELEASE -else - Build_Mode = SIM_RELEASE -endif -endif - - -.PHONY: all run - -ifeq ($(Build_Mode), HW_RELEASE) -all: .config_$(Build_Mode)_$(SGX_ARCH) libservice_provider.so $(App_Name) $(Enclave_Name) - @echo "The project has been built in release hardware mode." - @echo "Please sign the $(Enclave_Name) first with your signing key before you run the $(App_Name) to launch and access the enclave." - @echo "To sign the enclave use the command:" - @echo " $(SGX_ENCLAVE_SIGNER) sign -key -enclave $(Enclave_Name) -out <$(Signed_Enclave_Name)> -config $(Enclave_Config_File)" - @echo "You can also sign the enclave using an external signing tool." - @echo "To build the project in simulation mode set SGX_MODE=SIM. To build the project in prerelease mode set SGX_PRERELEASE=1 and SGX_MODE=HW." -else -all: .config_$(Build_Mode)_$(SGX_ARCH) libservice_provider.so $(App_Name) $(Signed_Enclave_Name) -ifeq ($(Build_Mode), HW_DEBUG) - @echo "The project has been built in debug hardware mode." -else ifeq ($(Build_Mode), SIM_DEBUG) - @echo "The project has been built in debug simulation mode." -else ifeq ($(Build_Mode), HW_PRERELEASE) - @echo "The project has been built in pre-release hardware mode." -else ifeq ($(Build_Mode), SIM_PRERELEASE) - @echo "The project has been built in pre-release simulation mode." -else - @echo "The project has been built in release simulation mode." -endif -endif - -run: all -ifneq ($(Build_Mode), HW_RELEASE) - @$(CURDIR)/$(App_Name) - @echo "RUN => $(App_Name) [$(SGX_MODE)|$(SGX_ARCH), OK]" -endif - -.config_$(Build_Mode)_$(SGX_ARCH): - @rm -f .config_* $(App_Name) $(App_Name) $(Enclave_Name) $(Signed_Enclave_Name) $(App_Cpp_Objects) isv_app/isv_enclave_u.* $(Enclave_Cpp_Objects) isv_enclave/isv_enclave_t.* libservice_provider.* $(ServiceProvider_Cpp_Objects) - @touch .config_$(Build_Mode)_$(SGX_ARCH) - - -######## App Objects ######## - -isv_app/isv_enclave_u.c: $(SGX_EDGER8R) isv_enclave/isv_enclave.edl - @cd isv_app && $(SGX_EDGER8R) --untrusted ../isv_enclave/isv_enclave.edl --search-path ../isv_enclave --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -isv_app/isv_enclave_u.o: isv_app/isv_enclave_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -isv_app/%.o: isv_app/%.cpp - @$(CXX) $(App_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(App_Name): isv_app/isv_enclave_u.o $(App_Cpp_Objects) - @$(CXX) $^ -o $@ $(App_Link_Flags) - @echo "LINK => $@" - -######## Service Provider Objects ######## - - -service_provider/%.o: service_provider/%.cpp - @$(CXX) $(ServiceProvider_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -libservice_provider.so: $(ServiceProvider_Cpp_Objects) - @$(CXX) $^ -o $@ $(ServiceProvider_Link_Flags) - @echo "LINK => $@" - -######## Enclave Objects ######## - -isv_enclave/isv_enclave_t.c: $(SGX_EDGER8R) isv_enclave/isv_enclave.edl - @cd isv_enclave && $(SGX_EDGER8R) --trusted ../isv_enclave/isv_enclave.edl --search-path ../isv_enclave --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -isv_enclave/isv_enclave_t.o: isv_enclave/isv_enclave_t.c - @$(CC) $(Enclave_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -isv_enclave/%.o: isv_enclave/%.cpp - @$(CXX) $(Enclave_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(Enclave_Name): isv_enclave/isv_enclave_t.o $(Enclave_Cpp_Objects) - @$(CXX) $^ -o $@ $(Enclave_Link_Flags) - @echo "LINK => $@" - -$(Signed_Enclave_Name): $(Enclave_Name) - @$(SGX_ENCLAVE_SIGNER) sign -key isv_enclave/isv_enclave_private.pem -enclave $(Enclave_Name) -out $@ -config $(Enclave_Config_File) - @echo "SIGN => $@" - -.PHONY: clean - -clean: - @rm -f .config_* $(App_Name) $(App_Name) $(Enclave_Name) $(Signed_Enclave_Name) $(App_Cpp_Objects) isv_app/isv_enclave_u.* $(Enclave_Cpp_Objects) isv_enclave/isv_enclave_t.* libservice_provider.* $(ServiceProvider_Cpp_Objects) diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/README.txt b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/README.txt deleted file mode 100644 index c39090047a..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/README.txt +++ /dev/null @@ -1,29 +0,0 @@ ----------------------------- -Purpose of RemoteAttestation ----------------------------- -The project demonstrates: -- How an application enclave can attest to a remote party -- How an application enclave and the remote party can establish a secure session - ------------------------------------- -How to Build/Execute the Sample Code ------------------------------------- -1. Install Intel(R) Software Guard Extensions (Intel(R) SGX) SDK for Linux* OS -2. Make sure your environment is set: - $ source ${sgx-sdk-install-path}/environment -3. Build the project with the prepared Makefile: - a. Hardware Mode, Debug build: - $ make - b. Hardware Mode, Pre-release build: - $ make SGX_PRERELEASE=1 SGX_DEBUG=0 - c. Hardware Mode, Release build: - $ make SGX_DEBUG=0 - d. Simulation Mode, Debug build: - $ make SGX_MODE=SIM - e. Simulation Mode, Pre-release build: - $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0 - f. Simulation Mode, Release build: - $ make SGX_MODE=SIM SGX_DEBUG=0 -4. Execute the binary directly: - $ ./app -5. Remember to "make clean" before switching build mode diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_app/isv_app.cpp b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_app/isv_app.cpp deleted file mode 100644 index 6046a0f430..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_app/isv_app.cpp +++ /dev/null @@ -1,719 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -// This sample is confined to the communication between a SGX client platform -// and an ISV Application Server. - - - -#include -#include -#include -// Needed for definition of remote attestation messages. -#include "remote_attestation_result.h" - -#include "isv_enclave_u.h" - -// Needed to call untrusted key exchange library APIs, i.e. sgx_ra_proc_msg2. -#include "sgx_ukey_exchange.h" - -// Needed to get service provider's information, in your real project, you will -// need to talk to real server. -#include "network_ra.h" - -// Needed to create enclave and do ecall. -#include "sgx_urts.h" - -// Needed to query extended epid group id. -#include "sgx_uae_service.h" - -#include "service_provider.h" - -#ifndef SAFE_FREE -#define SAFE_FREE(ptr) {if (NULL != (ptr)) {free(ptr); (ptr) = NULL;}} -#endif - -// In addition to generating and sending messages, this application -// can use pre-generated messages to verify the generation of -// messages and the information flow. -#include "sample_messages.h" - - -#define ENCLAVE_PATH "isv_enclave.signed.so" - -uint8_t* msg1_samples[] = { msg1_sample1, msg1_sample2 }; -uint8_t* msg2_samples[] = { msg2_sample1, msg2_sample2 }; -uint8_t* msg3_samples[] = { msg3_sample1, msg3_sample2 }; -uint8_t* attestation_msg_samples[] = - { attestation_msg_sample1, attestation_msg_sample2}; - -// Some utility functions to output some of the data structures passed between -// the ISV app and the remote attestation service provider. -void PRINT_BYTE_ARRAY( - FILE *file, void *mem, uint32_t len) -{ - if(!mem || !len) - { - fprintf(file, "\n( null )\n"); - return; - } - uint8_t *array = (uint8_t *)mem; - fprintf(file, "%u bytes:\n{\n", len); - uint32_t i = 0; - for(i = 0; i < len - 1; i++) - { - fprintf(file, "0x%x, ", array[i]); - if(i % 8 == 7) fprintf(file, "\n"); - } - fprintf(file, "0x%x ", array[i]); - fprintf(file, "\n}\n"); -} - - -void PRINT_ATTESTATION_SERVICE_RESPONSE( - FILE *file, - ra_samp_response_header_t *response) -{ - if(!response) - { - fprintf(file, "\t\n( null )\n"); - return; - } - - fprintf(file, "RESPONSE TYPE: 0x%x\n", response->type); - fprintf(file, "RESPONSE STATUS: 0x%x 0x%x\n", response->status[0], - response->status[1]); - fprintf(file, "RESPONSE BODY SIZE: %u\n", response->size); - - if(response->type == TYPE_RA_MSG2) - { - sgx_ra_msg2_t* p_msg2_body = (sgx_ra_msg2_t*)(response->body); - - fprintf(file, "MSG2 gb - "); - PRINT_BYTE_ARRAY(file, &(p_msg2_body->g_b), sizeof(p_msg2_body->g_b)); - - fprintf(file, "MSG2 spid - "); - PRINT_BYTE_ARRAY(file, &(p_msg2_body->spid), sizeof(p_msg2_body->spid)); - - fprintf(file, "MSG2 quote_type : %hx\n", p_msg2_body->quote_type); - - fprintf(file, "MSG2 kdf_id : %hx\n", p_msg2_body->kdf_id); - - fprintf(file, "MSG2 sign_gb_ga - "); - PRINT_BYTE_ARRAY(file, &(p_msg2_body->sign_gb_ga), - sizeof(p_msg2_body->sign_gb_ga)); - - fprintf(file, "MSG2 mac - "); - PRINT_BYTE_ARRAY(file, &(p_msg2_body->mac), sizeof(p_msg2_body->mac)); - - fprintf(file, "MSG2 sig_rl - "); - PRINT_BYTE_ARRAY(file, &(p_msg2_body->sig_rl), - p_msg2_body->sig_rl_size); - } - else if(response->type == TYPE_RA_ATT_RESULT) - { - sample_ra_att_result_msg_t *p_att_result = - (sample_ra_att_result_msg_t *)(response->body); - fprintf(file, "ATTESTATION RESULT MSG platform_info_blob - "); - PRINT_BYTE_ARRAY(file, &(p_att_result->platform_info_blob), - sizeof(p_att_result->platform_info_blob)); - - fprintf(file, "ATTESTATION RESULT MSG mac - "); - PRINT_BYTE_ARRAY(file, &(p_att_result->mac), sizeof(p_att_result->mac)); - - fprintf(file, "ATTESTATION RESULT MSG secret.payload_tag - %u bytes\n", - p_att_result->secret.payload_size); - - fprintf(file, "ATTESTATION RESULT MSG secret.payload - "); - PRINT_BYTE_ARRAY(file, p_att_result->secret.payload, - p_att_result->secret.payload_size); - } - else - { - fprintf(file, "\nERROR in printing out the response. " - "Response of type not supported %d\n", response->type); - } -} - -// This sample code doesn't have any recovery/retry mechanisms for the remote -// attestation. Since the enclave can be lost due S3 transitions, apps -// susceptible to S3 transitions should have logic to restart attestation in -// these scenarios. -#define _T(x) x -int main(int argc, char* argv[]) -{ - int ret = 0; - ra_samp_request_header_t *p_msg0_full = NULL; - ra_samp_response_header_t *p_msg0_resp_full = NULL; - ra_samp_request_header_t *p_msg1_full = NULL; - ra_samp_response_header_t *p_msg2_full = NULL; - sgx_ra_msg3_t *p_msg3 = NULL; - ra_samp_response_header_t* p_att_result_msg_full = NULL; - sgx_enclave_id_t enclave_id = 0; - int enclave_lost_retry_time = 1; - int busy_retry_time = 4; - sgx_ra_context_t context = INT_MAX; - sgx_status_t status = SGX_SUCCESS; - ra_samp_request_header_t* p_msg3_full = NULL; - - int32_t verify_index = -1; - int32_t verification_samples = sizeof(msg1_samples)/sizeof(msg1_samples[0]); - - FILE* OUTPUT = stdout; - -#define VERIFICATION_INDEX_IS_VALID() (verify_index > 0 && \ - verify_index <= verification_samples) -#define GET_VERIFICATION_ARRAY_INDEX() (verify_index-1) - - if(argc > 1) - { - - verify_index = atoi(argv[1]); - - if( VERIFICATION_INDEX_IS_VALID()) - { - fprintf(OUTPUT, "\nVerifying precomputed attestation messages " - "using precomputed values# %d\n", verify_index); - } - else - { - fprintf(OUTPUT, "\nValid invocations are:\n"); - fprintf(OUTPUT, "\n\tisv_app\n"); - fprintf(OUTPUT, "\n\tisv_app \n"); - fprintf(OUTPUT, "\nValid indices are [1 - %d]\n", - verification_samples); - fprintf(OUTPUT, "\nUsing a verification index uses precomputed " - "messages to assist debugging the remote attestation " - "service provider.\n"); - return -1; - } - } - - // Preparation for remote attestation by configuring extended epid group id. - { - uint32_t extended_epid_group_id = 0; - ret = sgx_get_extended_epid_group_id(&extended_epid_group_id); - if (SGX_SUCCESS != ret) - { - ret = -1; - fprintf(OUTPUT, "\nError, call sgx_get_extended_epid_group_id fail [%s].", - __FUNCTION__); - return ret; - } - fprintf(OUTPUT, "\nCall sgx_get_extended_epid_group_id success."); - - p_msg0_full = (ra_samp_request_header_t*) - malloc(sizeof(ra_samp_request_header_t) - +sizeof(uint32_t)); - if (NULL == p_msg0_full) - { - ret = -1; - goto CLEANUP; - } - p_msg0_full->type = TYPE_RA_MSG0; - p_msg0_full->size = sizeof(uint32_t); - - *(uint32_t*)((uint8_t*)p_msg0_full + sizeof(ra_samp_request_header_t)) = extended_epid_group_id; - { - - fprintf(OUTPUT, "\nMSG0 body generated -\n"); - - PRINT_BYTE_ARRAY(OUTPUT, p_msg0_full->body, p_msg0_full->size); - - } - // The ISV application sends msg0 to the SP. - // The ISV decides whether to support this extended epid group id. - fprintf(OUTPUT, "\nSending msg0 to remote attestation service provider.\n"); - - ret = ra_network_send_receive("http://SampleServiceProvider.intel.com/", - p_msg0_full, - &p_msg0_resp_full); - if (ret != 0) - { - fprintf(OUTPUT, "\nError, ra_network_send_receive for msg0 failed " - "[%s].", __FUNCTION__); - goto CLEANUP; - } - fprintf(OUTPUT, "\nSent MSG0 to remote attestation service.\n"); - } - // Remote attestation will be initiated the ISV server challenges the ISV - // app or if the ISV app detects it doesn't have the credentials - // (shared secret) from a previous attestation required for secure - // communication with the server. - { - // ISV application creates the ISV enclave. - int launch_token_update = 0; - sgx_launch_token_t launch_token = {0}; - memset(&launch_token, 0, sizeof(sgx_launch_token_t)); - do - { - ret = sgx_create_enclave(_T(ENCLAVE_PATH), - SGX_DEBUG_FLAG, - &launch_token, - &launch_token_update, - &enclave_id, NULL); - if(SGX_SUCCESS != ret) - { - ret = -1; - fprintf(OUTPUT, "\nError, call sgx_create_enclave fail [%s].", - __FUNCTION__); - goto CLEANUP; - } - fprintf(OUTPUT, "\nCall sgx_create_enclave success."); - - ret = enclave_init_ra(enclave_id, - &status, - false, - &context); - //Ideally, this check would be around the full attestation flow. - } while (SGX_ERROR_ENCLAVE_LOST == ret && enclave_lost_retry_time--); - - if(SGX_SUCCESS != ret || status) - { - ret = -1; - fprintf(OUTPUT, "\nError, call enclave_init_ra fail [%s].", - __FUNCTION__); - goto CLEANUP; - } - fprintf(OUTPUT, "\nCall enclave_init_ra success."); - - // isv application call uke sgx_ra_get_msg1 - p_msg1_full = (ra_samp_request_header_t*) - malloc(sizeof(ra_samp_request_header_t) - + sizeof(sgx_ra_msg1_t)); - if(NULL == p_msg1_full) - { - ret = -1; - goto CLEANUP; - } - p_msg1_full->type = TYPE_RA_MSG1; - p_msg1_full->size = sizeof(sgx_ra_msg1_t); - do - { - ret = sgx_ra_get_msg1(context, enclave_id, sgx_ra_get_ga, - (sgx_ra_msg1_t*)((uint8_t*)p_msg1_full - + sizeof(ra_samp_request_header_t))); - sleep(3); // Wait 3s between retries - } while (SGX_ERROR_BUSY == ret && busy_retry_time--); - if(SGX_SUCCESS != ret) - { - ret = -1; - fprintf(OUTPUT, "\nError, call sgx_ra_get_msg1 fail [%s].", - __FUNCTION__); - goto CLEANUP; - } - else - { - fprintf(OUTPUT, "\nCall sgx_ra_get_msg1 success.\n"); - - fprintf(OUTPUT, "\nMSG1 body generated -\n"); - - PRINT_BYTE_ARRAY(OUTPUT, p_msg1_full->body, p_msg1_full->size); - - } - - if(VERIFICATION_INDEX_IS_VALID()) - { - - memcpy_s(p_msg1_full->body, p_msg1_full->size, - msg1_samples[GET_VERIFICATION_ARRAY_INDEX()], - p_msg1_full->size); - - fprintf(OUTPUT, "\nInstead of using the recently generated MSG1, " - "we will use the following precomputed MSG1 -\n"); - - PRINT_BYTE_ARRAY(OUTPUT, p_msg1_full->body, p_msg1_full->size); - } - - - // The ISV application sends msg1 to the SP to get msg2, - // msg2 needs to be freed when no longer needed. - // The ISV decides whether to use linkable or unlinkable signatures. - fprintf(OUTPUT, "\nSending msg1 to remote attestation service provider." - "Expecting msg2 back.\n"); - - - ret = ra_network_send_receive("http://SampleServiceProvider.intel.com/", - p_msg1_full, - &p_msg2_full); - - if(ret != 0 || !p_msg2_full) - { - fprintf(OUTPUT, "\nError, ra_network_send_receive for msg1 failed " - "[%s].", __FUNCTION__); - if(VERIFICATION_INDEX_IS_VALID()) - { - fprintf(OUTPUT, "\nBecause we are in verification mode we will " - "ignore this error.\n"); - fprintf(OUTPUT, "\nInstead, we will pretend we received the " - "following MSG2 - \n"); - - SAFE_FREE(p_msg2_full); - ra_samp_response_header_t* precomputed_msg2 = - (ra_samp_response_header_t*)msg2_samples[ - GET_VERIFICATION_ARRAY_INDEX()]; - const size_t msg2_full_size = sizeof(ra_samp_response_header_t) - + precomputed_msg2->size; - p_msg2_full = - (ra_samp_response_header_t*)malloc(msg2_full_size); - if(NULL == p_msg2_full) - { - ret = -1; - goto CLEANUP; - } - memcpy_s(p_msg2_full, msg2_full_size, precomputed_msg2, - msg2_full_size); - - PRINT_BYTE_ARRAY(OUTPUT, p_msg2_full, - sizeof(ra_samp_response_header_t) - + p_msg2_full->size); - } - else - { - goto CLEANUP; - } - } - else - { - // Successfully sent msg1 and received a msg2 back. - // Time now to check msg2. - if(TYPE_RA_MSG2 != p_msg2_full->type) - { - - fprintf(OUTPUT, "\nError, didn't get MSG2 in response to MSG1. " - "[%s].", __FUNCTION__); - - if(VERIFICATION_INDEX_IS_VALID()) - { - fprintf(OUTPUT, "\nBecause we are in verification mode we " - "will ignore this error."); - } - else - { - goto CLEANUP; - } - } - - fprintf(OUTPUT, "\nSent MSG1 to remote attestation service " - "provider. Received the following MSG2:\n"); - PRINT_BYTE_ARRAY(OUTPUT, p_msg2_full, - sizeof(ra_samp_response_header_t) - + p_msg2_full->size); - - fprintf(OUTPUT, "\nA more descriptive representation of MSG2:\n"); - PRINT_ATTESTATION_SERVICE_RESPONSE(OUTPUT, p_msg2_full); - - if( VERIFICATION_INDEX_IS_VALID() ) - { - // The response should match the precomputed MSG2: - ra_samp_response_header_t* precomputed_msg2 = - (ra_samp_response_header_t *) - msg2_samples[GET_VERIFICATION_ARRAY_INDEX()]; - if(MSG2_BODY_SIZE != - sizeof(ra_samp_response_header_t) + p_msg2_full->size || - memcmp( precomputed_msg2, p_msg2_full, - sizeof(ra_samp_response_header_t) + p_msg2_full->size)) - { - fprintf(OUTPUT, "\nVerification ERROR. Our precomputed " - "value for MSG2 does NOT match.\n"); - fprintf(OUTPUT, "\nPrecomputed value for MSG2:\n"); - PRINT_BYTE_ARRAY(OUTPUT, precomputed_msg2, - sizeof(ra_samp_response_header_t) - + precomputed_msg2->size); - fprintf(OUTPUT, "\nA more descriptive representation " - "of precomputed value for MSG2:\n"); - PRINT_ATTESTATION_SERVICE_RESPONSE(OUTPUT, - precomputed_msg2); - } - else - { - fprintf(OUTPUT, "\nVerification COMPLETE. Remote " - "attestation service provider generated a " - "matching MSG2.\n"); - } - } - - } - - sgx_ra_msg2_t* p_msg2_body = (sgx_ra_msg2_t*)((uint8_t*)p_msg2_full - + sizeof(ra_samp_response_header_t)); - - - uint32_t msg3_size = 0; - if( VERIFICATION_INDEX_IS_VALID()) - { - // We cannot generate a valid MSG3 using the precomputed messages - // we have been using. We will use the precomputed msg3 instead. - msg3_size = MSG3_BODY_SIZE; - p_msg3 = (sgx_ra_msg3_t*)malloc(msg3_size); - if(NULL == p_msg3) - { - ret = -1; - goto CLEANUP; - } - memcpy_s(p_msg3, msg3_size, - msg3_samples[GET_VERIFICATION_ARRAY_INDEX()], msg3_size); - fprintf(OUTPUT, "\nBecause MSG1 was a precomputed value, the MSG3 " - "we use will also be. PRECOMPUTED MSG3 - \n"); - } - else - { - busy_retry_time = 2; - // The ISV app now calls uKE sgx_ra_proc_msg2, - // The ISV app is responsible for freeing the returned p_msg3!! - do - { - ret = sgx_ra_proc_msg2(context, - enclave_id, - sgx_ra_proc_msg2_trusted, - sgx_ra_get_msg3_trusted, - p_msg2_body, - p_msg2_full->size, - &p_msg3, - &msg3_size); - } while (SGX_ERROR_BUSY == ret && busy_retry_time--); - if(!p_msg3) - { - fprintf(OUTPUT, "\nError, call sgx_ra_proc_msg2 fail. " - "p_msg3 = 0x%p [%s].", p_msg3, __FUNCTION__); - ret = -1; - goto CLEANUP; - } - if(SGX_SUCCESS != (sgx_status_t)ret) - { - fprintf(OUTPUT, "\nError, call sgx_ra_proc_msg2 fail. " - "ret = 0x%08x [%s].", ret, __FUNCTION__); - ret = -1; - goto CLEANUP; - } - else - { - fprintf(OUTPUT, "\nCall sgx_ra_proc_msg2 success.\n"); - fprintf(OUTPUT, "\nMSG3 - \n"); - } - } - - PRINT_BYTE_ARRAY(OUTPUT, p_msg3, msg3_size); - - p_msg3_full = (ra_samp_request_header_t*)malloc( - sizeof(ra_samp_request_header_t) + msg3_size); - if(NULL == p_msg3_full) - { - ret = -1; - goto CLEANUP; - } - p_msg3_full->type = TYPE_RA_MSG3; - p_msg3_full->size = msg3_size; - if(memcpy_s(p_msg3_full->body, msg3_size, p_msg3, msg3_size)) - { - fprintf(OUTPUT,"\nError: INTERNAL ERROR - memcpy failed in [%s].", - __FUNCTION__); - ret = -1; - goto CLEANUP; - } - - // The ISV application sends msg3 to the SP to get the attestation - // result message, attestation result message needs to be freed when - // no longer needed. The ISV service provider decides whether to use - // linkable or unlinkable signatures. The format of the attestation - // result is up to the service provider. This format is used for - // demonstration. Note that the attestation result message makes use - // of both the MK for the MAC and the SK for the secret. These keys are - // established from the SIGMA secure channel binding. - ret = ra_network_send_receive("http://SampleServiceProvider.intel.com/", - p_msg3_full, - &p_att_result_msg_full); - if(ret || !p_att_result_msg_full) - { - ret = -1; - fprintf(OUTPUT, "\nError, sending msg3 failed [%s].", __FUNCTION__); - goto CLEANUP; - } - - - sample_ra_att_result_msg_t * p_att_result_msg_body = - (sample_ra_att_result_msg_t *)((uint8_t*)p_att_result_msg_full - + sizeof(ra_samp_response_header_t)); - if(TYPE_RA_ATT_RESULT != p_att_result_msg_full->type) - { - ret = -1; - fprintf(OUTPUT, "\nError. Sent MSG3 successfully, but the message " - "received was NOT of type att_msg_result. Type = " - "%d. [%s].", p_att_result_msg_full->type, - __FUNCTION__); - goto CLEANUP; - } - else - { - fprintf(OUTPUT, "\nSent MSG3 successfully. Received an attestation " - "result message back\n."); - if( VERIFICATION_INDEX_IS_VALID() ) - { - if(ATTESTATION_MSG_BODY_SIZE != p_att_result_msg_full->size || - memcmp(p_att_result_msg_full->body, - attestation_msg_samples[GET_VERIFICATION_ARRAY_INDEX()], - p_att_result_msg_full->size) ) - { - fprintf(OUTPUT, "\nSent MSG3 successfully. Received an " - "attestation result message back that did " - "NOT match the expected value.\n"); - fprintf(OUTPUT, "\nEXPECTED ATTESTATION RESULT -"); - PRINT_BYTE_ARRAY(OUTPUT, - attestation_msg_samples[GET_VERIFICATION_ARRAY_INDEX()], - ATTESTATION_MSG_BODY_SIZE); - } - } - } - - fprintf(OUTPUT, "\nATTESTATION RESULT RECEIVED - "); - PRINT_BYTE_ARRAY(OUTPUT, p_att_result_msg_full->body, - p_att_result_msg_full->size); - - - if( VERIFICATION_INDEX_IS_VALID() ) - { - fprintf(OUTPUT, "\nBecause we used precomputed values for the " - "messages, the attestation result message will " - "not pass further verification tests, so we will " - "skip them.\n"); - goto CLEANUP; - } - - // Check the MAC using MK on the attestation result message. - // The format of the attestation result message is ISV specific. - // This is a simple form for demonstration. In a real product, - // the ISV may want to communicate more information. - ret = verify_att_result_mac(enclave_id, - &status, - context, - (uint8_t*)&p_att_result_msg_body->platform_info_blob, - sizeof(ias_platform_info_blob_t), - (uint8_t*)&p_att_result_msg_body->mac, - sizeof(sgx_mac_t)); - if((SGX_SUCCESS != ret) || - (SGX_SUCCESS != status)) - { - ret = -1; - fprintf(OUTPUT, "\nError: INTEGRITY FAILED - attestation result " - "message MK based cmac failed in [%s].", - __FUNCTION__); - goto CLEANUP; - } - - bool attestation_passed = true; - // Check the attestation result for pass or fail. - // Whether attestation passes or fails is a decision made by the ISV Server. - // When the ISV server decides to trust the enclave, then it will return success. - // When the ISV server decided to not trust the enclave, then it will return failure. - if(0 != p_att_result_msg_full->status[0] - || 0 != p_att_result_msg_full->status[1]) - { - fprintf(OUTPUT, "\nError, attestation result message MK based cmac " - "failed in [%s].", __FUNCTION__); - attestation_passed = false; - } - - // The attestation result message should contain a field for the Platform - // Info Blob (PIB). The PIB is returned by attestation server in the attestation report. - // It is not returned in all cases, but when it is, the ISV app - // should pass it to the blob analysis API called sgx_report_attestation_status() - // along with the trust decision from the ISV server. - // The ISV application will take action based on the update_info. - // returned in update_info by the API. - // This call is stubbed out for the sample. - // - // sgx_update_info_bit_t update_info; - // ret = sgx_report_attestation_status( - // &p_att_result_msg_body->platform_info_blob, - // attestation_passed ? 0 : 1, &update_info); - - // Get the shared secret sent by the server using SK (if attestation - // passed) - if(attestation_passed) - { - ret = put_secret_data(enclave_id, - &status, - context, - p_att_result_msg_body->secret.payload, - p_att_result_msg_body->secret.payload_size, - p_att_result_msg_body->secret.payload_tag); - if((SGX_SUCCESS != ret) || (SGX_SUCCESS != status)) - { - fprintf(OUTPUT, "\nError, attestation result message secret " - "using SK based AESGCM failed in [%s]. ret = " - "0x%0x. status = 0x%0x", __FUNCTION__, ret, - status); - goto CLEANUP; - } - } - fprintf(OUTPUT, "\nSecret successfully received from server."); - fprintf(OUTPUT, "\nRemote attestation success!"); - } - -CLEANUP: - // Clean-up - // Need to close the RA key state. - if(INT_MAX != context) - { - int ret_save = ret; - ret = enclave_ra_close(enclave_id, &status, context); - if(SGX_SUCCESS != ret || status) - { - ret = -1; - fprintf(OUTPUT, "\nError, call enclave_ra_close fail [%s].", - __FUNCTION__); - } - else - { - // enclave_ra_close was successful, let's restore the value that - // led us to this point in the code. - ret = ret_save; - } - fprintf(OUTPUT, "\nCall enclave_ra_close success."); - } - - sgx_destroy_enclave(enclave_id); - - - ra_free_network_response_buffer(p_msg0_resp_full); - ra_free_network_response_buffer(p_msg2_full); - ra_free_network_response_buffer(p_att_result_msg_full); - - // p_msg3 is malloc'd by the untrusted KE library. App needs to free. - SAFE_FREE(p_msg3); - SAFE_FREE(p_msg3_full); - SAFE_FREE(p_msg1_full); - SAFE_FREE(p_msg0_full); - printf("\nEnter a character before exit ...\n"); - getchar(); - return ret; -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_app/sample_messages.h b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_app/sample_messages.h deleted file mode 100644 index 2b42864008..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_app/sample_messages.h +++ /dev/null @@ -1,543 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -//This file contains samples of messages sent between the sample ISV application -//and the sample service provider. It is intended to be used so that authors -//of other service providers can verify that the messages generated by their -//remote attestation service matches. - -#include - -#define MSG1_BODY_SIZE 68 - -uint8_t msg1_sample1[MSG1_BODY_SIZE] = -{ - 0xe8, 0xcf, 0xf, 0x97, 0x8a, 0xf4, 0x24, 0x8a, - 0xf5, 0x5b, 0x56, 0xf0, 0xac, 0x7f, 0x78, 0x39, - 0x71, 0x10, 0xb8, 0xdc, 0x88, 0xd, 0x50, 0xf0, - 0x39, 0x85, 0x37, 0xfe, 0xad, 0x1f, 0xc7, 0x59, - 0xc7, 0x23, 0x81, 0xfd, 0x4a, 0x2, 0x48, 0xdf, - 0xd3, 0x74, 0xda, 0x45, 0x48, 0x62, 0xc8, 0xb6, - 0x73, 0x43, 0x26, 0x42, 0x8f, 0x1f, 0x89, 0x17, - 0xe7, 0xa9, 0x2a, 0xf5, 0x27, 0xb3, 0xcc, 0x4d, - 0x3, 0x1, 0x0, 0x0 -}; - -uint8_t msg1_sample2[MSG1_BODY_SIZE] = -{ - 0xa8, 0x56, 0x72, 0xc1, 0x14, 0x41, 0xa, 0x2f, - 0xdc, 0xb0, 0xa8, 0xa1, 0x3a, 0x51, 0x40, 0xf9, - 0x12, 0x9f, 0x11, 0x86, 0xe9, 0x1a, 0xf1, 0x16, - 0xbc, 0xd4, 0x6, 0x2f, 0x47, 0x2c, 0xc3, 0x37, - 0x8e, 0x65, 0x7, 0x29, 0x85, 0xb0, 0x8, 0x61, - 0x6b, 0x6d, 0xc7, 0x22, 0x7d, 0x22, 0x61, 0x7f, - 0x40, 0x43, 0x40, 0x5a, 0x7a, 0xf4, 0x94, 0x0, - 0x60, 0x36, 0xf6, 0xa4, 0x22, 0x22, 0x41, 0x82, - 0x3, 0x1, 0x0, 0x0 -}; - -#define MSG2_BODY_SIZE 176 - -uint8_t msg2_sample1[MSG2_BODY_SIZE] = -{ - 0x2, 0x0, 0x0, 0xa8, 0x0, 0x0, 0x0, 0x0, - 0x6a, 0x83, 0xdc, 0x84, 0xd4, 0x4c, 0x8a, 0xbb, - 0x5e, 0x42, 0xaf, 0xee, 0x8d, 0xe9, 0xf4, 0x57, - 0x71, 0xfd, 0x73, 0x66, 0xd7, 0xfa, 0xad, 0xfa, - 0xf2, 0x17, 0x14, 0xdd, 0x5a, 0xb9, 0x9e, 0x97, - 0x79, 0xa7, 0x38, 0x72, 0xf2, 0xb8, 0xd6, 0xbe, - 0x18, 0x91, 0x7f, 0xf7, 0xb5, 0xd3, 0xe5, 0x64, - 0x9b, 0x12, 0x18, 0xaf, 0x39, 0x29, 0x6c, 0x24, - 0x19, 0x38, 0x29, 0xb, 0xc6, 0xac, 0xc, 0x62, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, - 0x58, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x1, 0x0, 0x1, 0x0, 0x6a, 0x83, 0xdc, 0x84, - 0xd4, 0x4c, 0x8a, 0xbb, 0x5e, 0x42, 0xaf, 0xee, - 0x8d, 0xe9, 0xf4, 0x57, 0x71, 0xfd, 0x73, 0x66, - 0xd7, 0xfa, 0xad, 0xfa, 0xf2, 0x17, 0x14, 0xdd, - 0x5a, 0xb9, 0x9e, 0x97, 0x6, 0x10, 0x58, 0x61, - 0xa5, 0xbf, 0x7d, 0x2e, 0xab, 0xcc, 0x1a, 0x3e, - 0x4f, 0x44, 0x15, 0xe7, 0x91, 0xca, 0x64, 0x2b, - 0x42, 0xb7, 0x53, 0xd9, 0x71, 0x37, 0xf1, 0x9b, - 0x31, 0xb5, 0xa5, 0x6b, 0xf8, 0xfa, 0x64, 0xfe, - 0x7a, 0x9e, 0xdc, 0xf4, 0xf0, 0x59, 0xbd, 0x78, - 0x27, 0xc2, 0x55, 0xb9, 0x0, 0x0, 0x0, 0x0 -}; - -uint8_t msg2_sample2[MSG2_BODY_SIZE] = -{ - 0x2, 0x0, 0x0, 0xa8, 0x0, 0x0, 0x0, 0x0, - 0x6a, 0x83, 0xdc, 0x84, 0xd4, 0x4c, 0x8a, 0xbb, - 0x5e, 0x42, 0xaf, 0xee, 0x8d, 0xe9, 0xf4, 0x57, - 0x71, 0xfd, 0x73, 0x66, 0xd7, 0xfa, 0xad, 0xfa, - 0xf2, 0x17, 0x14, 0xdd, 0x5a, 0xb9, 0x9e, 0x97, - 0x79, 0xa7, 0x38, 0x72, 0xf2, 0xb8, 0xd6, 0xbe, - 0x18, 0x91, 0x7f, 0xf7, 0xb5, 0xd3, 0xe5, 0x64, - 0x9b, 0x12, 0x18, 0xaf, 0x39, 0x29, 0x6c, 0x24, - 0x19, 0x38, 0x29, 0xb, 0xc6, 0xac, 0xc, 0x62, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, - 0x58, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x1, 0x0, 0x1, 0x0, 0x6a, 0x83, 0xdc, 0x84, - 0xd4, 0x4c, 0x8a, 0xbb, 0x5e, 0x42, 0xaf, 0xee, - 0x8d, 0xe9, 0xf4, 0x57, 0x71, 0xfd, 0x73, 0x66, - 0xd7, 0xfa, 0xad, 0xfa, 0xf2, 0x17, 0x14, 0xdd, - 0x5a, 0xb9, 0x9e, 0x97, 0x75, 0x39, 0x23, 0x1b, - 0xc2, 0x5a, 0xd4, 0xfa, 0x41, 0xe9, 0xd4, 0x42, - 0x72, 0x8a, 0x75, 0x4b, 0x48, 0x5a, 0xfb, 0xc0, - 0x90, 0x42, 0xef, 0x9c, 0xed, 0xcb, 0xc1, 0x45, - 0x2d, 0xfe, 0x86, 0xbc, 0xee, 0x3, 0xa8, 0x97, - 0x68, 0xf0, 0xb4, 0xf, 0xa, 0x5b, 0x5f, 0xc1, - 0xe4, 0xf9, 0xa9, 0xa6, 0x0, 0x0, 0x0, 0x0 -}; - -#define MSG3_BODY_SIZE 1452 - -uint8_t msg3_sample1[MSG3_BODY_SIZE] = -{ - 0x57, 0x19, 0x8, 0xa1, 0x3b, 0xd0, 0x37, 0xa8, - 0x4a, 0x32, 0xf1, 0x31, 0xc1, 0x14, 0xff, 0xdf, - 0xe8, 0xcf, 0xf, 0x97, 0x8a, 0xf4, 0x24, 0x8a, - 0xf5, 0x5b, 0x56, 0xf0, 0xac, 0x7f, 0x78, 0x39, - 0x71, 0x10, 0xb8, 0xdc, 0x88, 0xd, 0x50, 0xf0, - 0x39, 0x85, 0x37, 0xfe, 0xad, 0x1f, 0xc7, 0x59, - 0xc7, 0x23, 0x81, 0xfd, 0x4a, 0x2, 0x48, 0xdf, - 0xd3, 0x74, 0xda, 0x45, 0x48, 0x62, 0xc8, 0xb6, - 0x73, 0x43, 0x26, 0x42, 0x8f, 0x1f, 0x89, 0x17, - 0xe7, 0xa9, 0x2a, 0xf5, 0x27, 0xb3, 0xcc, 0x4d, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x2, 0x0, 0x1, 0x0, 0x3, 0x1, 0x0, 0x0, - 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, - 0x58, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x2, 0x2, 0xff, 0xff, 0xff, 0x1, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xe2, 0x55, 0x5d, 0xc6, 0xe6, 0x69, 0x53, 0xc0, - 0x8d, 0x52, 0x5b, 0xc0, 0x2a, 0x2c, 0x5c, 0x2f, - 0xc, 0x8c, 0xfe, 0x5b, 0x1, 0xae, 0x89, 0xff, - 0x2, 0x2f, 0x97, 0xea, 0x9b, 0x45, 0xb6, 0x2e, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x60, 0x27, 0x7a, 0xd2, 0xfd, 0xfc, 0x57, 0xe9, - 0x80, 0xe8, 0x76, 0xe7, 0xf8, 0x78, 0xac, 0x19, - 0x9, 0x88, 0xe, 0xa5, 0x38, 0x7, 0x95, 0xa7, - 0xe8, 0xea, 0x98, 0xb1, 0x57, 0x84, 0x1f, 0x85, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x2a, 0xe, 0x9, 0x4c, 0xe2, 0xd9, 0x44, 0x73, - 0x36, 0x42, 0xfa, 0xe0, 0x44, 0x5b, 0x7b, 0x1f, - 0xc2, 0x85, 0x16, 0xca, 0xf1, 0xc5, 0xcd, 0xd2, - 0xf, 0xe4, 0xdf, 0xf, 0x31, 0xca, 0x36, 0x28, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xa8, 0x2, 0x0, 0x0, 0x68, 0xe3, 0x1d, 0x2, - 0xd1, 0x6, 0x2a, 0x16, 0xab, 0x1c, 0xfd, 0x43, - 0x5c, 0x1f, 0x34, 0x5, 0x15, 0xc4, 0x84, 0xdd, - 0xee, 0x73, 0x79, 0xe7, 0x2e, 0xc8, 0x95, 0x77, - 0x6b, 0xca, 0xff, 0xb9, 0xf4, 0xf8, 0x5a, 0x42, - 0x9d, 0x32, 0x73, 0x62, 0xab, 0x49, 0x8, 0xa4, - 0xc3, 0x5c, 0x5a, 0x66, 0x38, 0x76, 0xcd, 0x58, - 0x5b, 0x85, 0xbf, 0xf0, 0x52, 0x12, 0xd2, 0xc8, - 0xd, 0xf8, 0x6d, 0x91, 0xb8, 0xcf, 0x3f, 0x1d, - 0xe0, 0x1d, 0x63, 0xb2, 0x58, 0xa7, 0xbc, 0x8, - 0x97, 0xbb, 0xcc, 0x19, 0x31, 0xdb, 0x47, 0xf3, - 0x8e, 0x54, 0x7d, 0x36, 0x6e, 0x6, 0xd3, 0x20, - 0xca, 0x5e, 0x8a, 0x5, 0x30, 0x50, 0x56, 0xe9, - 0x91, 0x9, 0x35, 0x13, 0x69, 0xd, 0x24, 0x71, - 0x55, 0xca, 0xe8, 0xef, 0x4d, 0x1c, 0xe6, 0x1f, - 0x51, 0xeb, 0x12, 0x32, 0x97, 0xa2, 0xbb, 0x1e, - 0xf2, 0x26, 0xc5, 0xe9, 0x3f, 0xda, 0x79, 0xc3, - 0x89, 0x28, 0x9, 0x6c, 0x59, 0x9e, 0x2d, 0x60, - 0x5f, 0x35, 0x33, 0x76, 0xfe, 0xf5, 0xba, 0x73, - 0xc5, 0xb6, 0x44, 0x9d, 0xb9, 0x3a, 0x90, 0x8, - 0x5e, 0xba, 0x33, 0x3d, 0xe5, 0xff, 0xc0, 0x5b, - 0xbb, 0x7b, 0xbc, 0x39, 0x52, 0x6f, 0x54, 0x8b, - 0xb5, 0x44, 0xf7, 0x75, 0xc5, 0x28, 0xa7, 0x51, - 0xd, 0x69, 0x2b, 0x3a, 0xfd, 0xc0, 0x7c, 0x6f, - 0xf, 0xcf, 0x76, 0x32, 0xea, 0x38, 0xd2, 0x8d, - 0xbe, 0x9c, 0xef, 0x3b, 0x56, 0xdc, 0x8e, 0x29, - 0x40, 0x87, 0x4, 0xe6, 0x15, 0xa1, 0x12, 0x9f, - 0x21, 0x12, 0xe8, 0xd8, 0x5, 0x26, 0x22, 0x23, - 0x12, 0x57, 0xd1, 0xb6, 0x3, 0x59, 0xfa, 0xa6, - 0xfe, 0x24, 0xe1, 0x84, 0xfb, 0x63, 0xf3, 0x3d, - 0xf1, 0xe2, 0x70, 0x2c, 0x94, 0xf1, 0xa4, 0xdc, - 0x70, 0x31, 0xda, 0x9e, 0xb9, 0xf7, 0xc6, 0xba, - 0xd3, 0x4e, 0x5c, 0x63, 0xf1, 0x78, 0xcc, 0x38, - 0xc2, 0x1a, 0xd6, 0x2, 0x34, 0x23, 0x1a, 0x4b, - 0x1, 0x4e, 0xf4, 0xe6, 0xe, 0x6b, 0xfa, 0x27, - 0x8d, 0xe3, 0x67, 0x5d, 0xec, 0x79, 0x13, 0x66, - 0x46, 0xbb, 0xd0, 0x8e, 0xc8, 0x21, 0x6f, 0x37, - 0x5c, 0x5e, 0x5d, 0xed, 0x8e, 0x2d, 0x8d, 0x94, - 0x68, 0x1, 0x0, 0x0, 0x84, 0xd5, 0x35, 0x93, - 0x3a, 0xb1, 0x19, 0x8e, 0xb6, 0xb0, 0x5f, 0x4f, - 0x66, 0x8a, 0xb3, 0xe0, 0x12, 0xbb, 0x7, 0xe0, - 0xa3, 0x6b, 0x54, 0xd5, 0xf6, 0xc8, 0x2, 0xdd, - 0x33, 0x78, 0x3c, 0x4f, 0xdc, 0xa3, 0x3e, 0x5c, - 0x99, 0xb8, 0x2f, 0x3f, 0xdf, 0xf0, 0xf0, 0x63, - 0x24, 0x6f, 0xc2, 0x17, 0xeb, 0x45, 0xd5, 0x79, - 0xaa, 0xb5, 0x46, 0x4b, 0x77, 0x6d, 0x3d, 0xbf, - 0xe8, 0xca, 0xaf, 0x4d, 0xb5, 0x5d, 0xee, 0x9e, - 0xf5, 0x73, 0x8d, 0x1, 0xff, 0x84, 0x1e, 0xc9, - 0x78, 0x2e, 0xde, 0x3, 0x97, 0x36, 0x1c, 0x47, - 0xc, 0x46, 0x5, 0xfc, 0x8b, 0xf5, 0xd5, 0x13, - 0xa3, 0x8, 0xd4, 0x29, 0x83, 0xfb, 0x4b, 0x3e, - 0xf1, 0x3d, 0xe8, 0x54, 0x28, 0x2f, 0x3d, 0x9c, - 0x8b, 0x91, 0xcc, 0xf0, 0x45, 0x40, 0x3, 0xb, - 0xaa, 0x41, 0x38, 0x2f, 0xad, 0xc3, 0x1d, 0x61, - 0x15, 0x20, 0x9, 0xea, 0xfd, 0xdb, 0xf9, 0x17, - 0x84, 0x19, 0xae, 0xf3, 0x4b, 0x4d, 0x8e, 0xa2, - 0x3e, 0x9c, 0xb3, 0x70, 0x4d, 0x38, 0x1, 0x5, - 0xb7, 0xc, 0xb2, 0xf6, 0x84, 0xbe, 0xbc, 0xd5, - 0xd1, 0x8a, 0x22, 0xfc, 0x82, 0xb4, 0x3b, 0x96, - 0x8f, 0xc0, 0x49, 0xaa, 0xf0, 0x52, 0x25, 0xda, - 0x39, 0xc2, 0x4c, 0xbc, 0xe2, 0x47, 0xe3, 0xc, - 0x59, 0xad, 0x40, 0x42, 0x17, 0x30, 0x4d, 0x1c, - 0x34, 0xd3, 0xdb, 0xa7, 0xc5, 0x9c, 0xef, 0x83, - 0xd, 0xb8, 0x9a, 0xa9, 0x29, 0x1b, 0x11, 0x32, - 0x74, 0x53, 0x17, 0x34, 0xd6, 0xa2, 0x14, 0x6, - 0x8b, 0xae, 0x8c, 0xb4, 0xcb, 0x20, 0xec, 0xb3, - 0x2f, 0xe, 0xf3, 0x8f, 0xc3, 0x84, 0xe3, 0xb8, - 0x46, 0x51, 0xea, 0xa6, 0x1c, 0x27, 0x31, 0x1e, - 0x69, 0xb, 0xc7, 0x47, 0xad, 0x7d, 0xde, 0x3f, - 0x13, 0x2b, 0x5e, 0x2a, 0x24, 0x37, 0x85, 0xa4, - 0x8d, 0x45, 0x39, 0xeb, 0x95, 0x47, 0xb8, 0x57, - 0x5d, 0x88, 0xeb, 0x56, 0xb0, 0xa8, 0x58, 0xd, - 0x9e, 0x1b, 0x80, 0x3a, 0x74, 0x86, 0x3a, 0x58, - 0xfc, 0xa6, 0xa, 0xc5, 0x66, 0x5f, 0xc7, 0xa9, - 0xd5, 0xc, 0x37, 0xd1, 0x23, 0xff, 0xfd, 0x1d, - 0x38, 0x1c, 0x98, 0xd1, 0xa9, 0x24, 0x3b, 0x23, - 0xa2, 0x1a, 0xee, 0x8, 0x31, 0x4f, 0xd5, 0xaa, - 0x1d, 0x67, 0xe7, 0x77, 0x5c, 0x46, 0xcc, 0xb, - 0x18, 0xf6, 0xdd, 0x86, 0xf4, 0xcc, 0xb4, 0xd5, - 0xcd, 0xe6, 0xae, 0xb3, 0xf0, 0x24, 0x15, 0x71, - 0xb3, 0x65, 0xff, 0xfa, 0xe5, 0x1a, 0x6d, 0xc3, - 0x6f, 0x43, 0x73, 0xe0, 0xe8, 0xa9, 0x6f, 0x68, - 0xf8, 0x4, 0xf2, 0x73, 0x1, 0x36, 0xeb, 0x83, - 0xa5, 0xf2, 0x6e, 0x4e, 0x36, 0xa5, 0x63, 0xab, - 0x7d, 0xa1, 0xd2, 0x24, 0x17, 0xb7, 0x3b, 0x96, - 0x4b, 0xbe, 0x4c, 0xcb -}; - - -uint8_t msg3_sample2[MSG3_BODY_SIZE] = -{ - 0x4f, 0x85, 0xd3, 0x93, 0xc, 0x44, 0x9c, 0xdd, - 0x3e, 0x81, 0xbd, 0xb6, 0xa2, 0x44, 0x16, 0x5f, - 0xa8, 0x56, 0x72, 0xc1, 0x14, 0x41, 0xa, 0x2f, - 0xdc, 0xb0, 0xa8, 0xa1, 0x3a, 0x51, 0x40, 0xf9, - 0x12, 0x9f, 0x11, 0x86, 0xe9, 0x1a, 0xf1, 0x16, - 0xbc, 0xd4, 0x6, 0x2f, 0x47, 0x2c, 0xc3, 0x37, - 0x8e, 0x65, 0x7, 0x29, 0x85, 0xb0, 0x8, 0x61, - 0x6b, 0x6d, 0xc7, 0x22, 0x7d, 0x22, 0x61, 0x7f, - 0x40, 0x43, 0x40, 0x5a, 0x7a, 0xf4, 0x94, 0x0, - 0x60, 0x36, 0xf6, 0xa4, 0x22, 0x22, 0x41, 0x82, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x2, 0x0, 0x1, 0x0, 0x3, 0x1, 0x0, 0x0, - 0x1, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, - 0x58, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x2, 0x2, 0xff, 0xff, 0xff, 0x1, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xe2, 0x55, 0x5d, 0xc6, 0xe6, 0x69, 0x53, 0xc0, - 0x8d, 0x52, 0x5b, 0xc0, 0x2a, 0x2c, 0x5c, 0x2f, - 0xc, 0x8c, 0xfe, 0x5b, 0x1, 0xae, 0x89, 0xff, - 0x2, 0x2f, 0x97, 0xea, 0x9b, 0x45, 0xb6, 0x2e, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x60, 0x27, 0x7a, 0xd2, 0xfd, 0xfc, 0x57, 0xe9, - 0x80, 0xe8, 0x76, 0xe7, 0xf8, 0x78, 0xac, 0x19, - 0x9, 0x88, 0xe, 0xa5, 0x38, 0x7, 0x95, 0xa7, - 0xe8, 0xea, 0x98, 0xb1, 0x57, 0x84, 0x1f, 0x85, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xdd, 0xda, 0x3e, 0x6b, 0x72, 0xa2, 0xd7, 0x31, - 0x31, 0x32, 0xbd, 0xf3, 0xf4, 0xc0, 0xe3, 0xaa, - 0x16, 0x19, 0x72, 0x47, 0x92, 0xe7, 0x8f, 0xf8, - 0x40, 0x2b, 0xa7, 0xc0, 0xb9, 0x77, 0xb1, 0x1c, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xa8, 0x2, 0x0, 0x0, 0x2e, 0x23, 0x7d, 0xe8, - 0x5d, 0xcd, 0x6d, 0x88, 0x6f, 0xad, 0xd3, 0x4c, - 0x7e, 0xed, 0xff, 0xa2, 0xea, 0x1c, 0xd5, 0xc8, - 0x54, 0xbb, 0x93, 0xc8, 0x1b, 0xbe, 0xbe, 0x51, - 0x6b, 0x8d, 0xb7, 0x90, 0x7f, 0x87, 0x9f, 0x9b, - 0x66, 0x4f, 0xeb, 0xf4, 0x34, 0xbb, 0x90, 0x5d, - 0xc5, 0x20, 0x7b, 0xd2, 0x5a, 0x92, 0x42, 0x80, - 0x2f, 0x3f, 0xc2, 0x64, 0x7e, 0x77, 0xa, 0x49, - 0xdb, 0xde, 0x77, 0x88, 0xd7, 0xce, 0xdb, 0x2e, - 0x44, 0x50, 0x26, 0xd8, 0x7a, 0xe, 0x1c, 0x7f, - 0x63, 0x36, 0x62, 0xa8, 0xa7, 0x2e, 0x60, 0x56, - 0xf4, 0xbc, 0xb5, 0xca, 0xc3, 0x81, 0x9e, 0x84, - 0xb8, 0xc, 0xef, 0x7a, 0x18, 0x4a, 0x5b, 0x3, - 0x0, 0xe3, 0x8c, 0x3f, 0x2e, 0xf9, 0x9a, 0xf7, - 0x72, 0xe1, 0xa0, 0x5e, 0x6a, 0x4c, 0x68, 0xea, - 0x67, 0xfc, 0xe8, 0x21, 0x27, 0x90, 0xae, 0xbf, - 0x51, 0xa4, 0xc9, 0xae, 0x3d, 0x3b, 0x5c, 0x53, - 0x7e, 0x25, 0xa4, 0x6f, 0x78, 0x99, 0x35, 0x2e, - 0x48, 0x50, 0xf9, 0xf0, 0x63, 0x90, 0x19, 0x6a, - 0xc, 0x3d, 0x48, 0x2a, 0x5f, 0x6f, 0xb, 0xd7, - 0x26, 0x64, 0xb5, 0xe0, 0x60, 0x36, 0x69, 0x40, - 0x9c, 0x21, 0x29, 0xe0, 0xca, 0xae, 0xd1, 0x7a, - 0x4, 0xb8, 0x8d, 0x96, 0x74, 0xa3, 0x7, 0xa4, - 0x41, 0x9e, 0xf7, 0x9, 0xbe, 0x8f, 0xe8, 0x65, - 0xd9, 0x26, 0x16, 0xa1, 0xef, 0x1b, 0xf4, 0xb7, - 0xd5, 0xfe, 0xd6, 0x7d, 0xa6, 0x6c, 0x50, 0x8c, - 0x90, 0x34, 0x1f, 0x17, 0x8c, 0x14, 0x38, 0x6d, - 0xd7, 0x83, 0x1a, 0x1e, 0xcf, 0xf5, 0xb, 0xdb, - 0x26, 0x8f, 0x23, 0xf9, 0x4f, 0x41, 0x73, 0xac, - 0x9d, 0xfa, 0x77, 0x3, 0x6a, 0x32, 0xbb, 0x37, - 0x93, 0x47, 0x38, 0x93, 0x39, 0xd2, 0x51, 0x46, - 0xaf, 0xfd, 0x71, 0xda, 0x89, 0xc7, 0x44, 0xb0, - 0xf3, 0x95, 0x74, 0x3b, 0xbc, 0x7d, 0x86, 0xc1, - 0x6e, 0x49, 0xd8, 0x52, 0xc, 0xc1, 0x88, 0x72, - 0x5, 0x5c, 0x92, 0x12, 0x22, 0x95, 0xc5, 0x12, - 0xf5, 0xfa, 0x11, 0x8d, 0x50, 0x42, 0x33, 0x4, - 0x41, 0x17, 0x90, 0xc8, 0xb3, 0x1d, 0x2e, 0xe5, - 0x13, 0xf5, 0xd6, 0xb1, 0xc5, 0xd4, 0x6d, 0xe1, - 0x68, 0x1, 0x0, 0x0, 0xc4, 0x15, 0xbf, 0x91, - 0xf1, 0xad, 0xb1, 0x9f, 0x9b, 0x6b, 0x8d, 0xa2, - 0xdf, 0x7d, 0x6, 0xf8, 0xba, 0x73, 0xb7, 0xb, - 0x72, 0xcc, 0x34, 0x4d, 0x52, 0x3b, 0x76, 0xfd, - 0x8e, 0x3a, 0x67, 0xcc, 0x36, 0xb, 0xa9, 0xc2, - 0x90, 0x37, 0x77, 0x75, 0x90, 0xb8, 0x97, 0x44, - 0xed, 0xb4, 0x61, 0xe8, 0x11, 0xe9, 0x2, 0x50, - 0xde, 0x98, 0x99, 0x3e, 0xf6, 0x5c, 0x71, 0x92, - 0x49, 0xcb, 0x0, 0x72, 0xe0, 0x55, 0xa9, 0x6e, - 0xc7, 0x2, 0xf4, 0x2b, 0x3c, 0xe3, 0x42, 0x7e, - 0x8b, 0xf, 0x26, 0xd9, 0x42, 0x21, 0xd5, 0x74, - 0xe3, 0x35, 0xb3, 0xb8, 0xfe, 0x25, 0x1d, 0x47, - 0x5b, 0x35, 0x8d, 0xfd, 0x18, 0x77, 0x29, 0xd9, - 0x69, 0x2b, 0x67, 0x54, 0x8c, 0xf5, 0xd7, 0x84, - 0x36, 0xf3, 0x96, 0xca, 0xb9, 0x42, 0xad, 0xd6, - 0xba, 0x8d, 0x2f, 0xfc, 0x21, 0xfe, 0xa7, 0xea, - 0x59, 0x94, 0xfe, 0x95, 0x1f, 0x1e, 0xb9, 0xca, - 0x5e, 0x4d, 0xf1, 0x2, 0x68, 0x91, 0xf7, 0xa1, - 0xea, 0x11, 0x90, 0x95, 0x1c, 0xf7, 0x85, 0xd4, - 0x70, 0xf9, 0x49, 0xae, 0x5e, 0xa5, 0x62, 0x3d, - 0x35, 0xc5, 0xdf, 0xc1, 0x7f, 0xc7, 0x39, 0x5a, - 0x3b, 0x89, 0x8c, 0x80, 0x71, 0xe7, 0xbc, 0xbf, - 0x4e, 0x72, 0x6d, 0xd7, 0xe0, 0xa2, 0xb0, 0x7d, - 0xca, 0x89, 0x22, 0x6, 0xb2, 0xb4, 0x3c, 0xa2, - 0xed, 0x51, 0xf, 0xa2, 0xf7, 0xc9, 0x89, 0xf0, - 0x27, 0x2f, 0xf6, 0x41, 0x4e, 0xa, 0x2b, 0x67, - 0x49, 0x44, 0x8e, 0x40, 0xc6, 0xb8, 0xad, 0xb8, - 0x40, 0xb, 0xba, 0x73, 0x2e, 0x1d, 0x4, 0xc9, - 0x28, 0x62, 0x6b, 0x3d, 0xe6, 0x5f, 0x1c, 0xdd, - 0xae, 0x27, 0x6d, 0x3c, 0x2d, 0xf6, 0x42, 0x3b, - 0x91, 0x1, 0x37, 0x47, 0x76, 0x5, 0xbc, 0x7, - 0x8c, 0x6, 0x81, 0x77, 0x70, 0x9d, 0x8a, 0x75, - 0x34, 0x1, 0x68, 0x1a, 0x38, 0x13, 0x11, 0x74, - 0xf2, 0x70, 0x4f, 0x9b, 0x86, 0x15, 0xc6, 0xbc, - 0x6b, 0x1a, 0x56, 0x3f, 0x4f, 0xfa, 0xd4, 0x17, - 0x97, 0xbb, 0x4b, 0x91, 0x3b, 0x54, 0xf7, 0x8e, - 0x53, 0xf5, 0x2, 0x21, 0x3b, 0x66, 0xf9, 0xe5, - 0x79, 0xff, 0xeb, 0x5c, 0x66, 0x1b, 0x34, 0xf4, - 0x41, 0xd1, 0x9a, 0xdb, 0x1f, 0x3e, 0xe3, 0x8a, - 0x90, 0x98, 0x9e, 0x73, 0xb9, 0xa8, 0x20, 0xfe, - 0xe7, 0xe3, 0x9f, 0x83, 0xd3, 0x95, 0x5f, 0xa, - 0x40, 0x53, 0x6a, 0xd3, 0x72, 0x32, 0xde, 0xf1, - 0xf, 0x98, 0x2b, 0x7d, 0x6e, 0x76, 0xbd, 0x31, - 0x84, 0x99, 0x1c, 0xdc, 0xac, 0x78, 0x44, 0xbf, - 0x29, 0xdd, 0x2e, 0xe3, 0x39, 0x9d, 0x38, 0x83, - 0xa, 0x3e, 0x83, 0xb6, 0x74, 0x44, 0x4d, 0x78, - 0x55, 0xb2, 0xe0, 0x74, 0x25, 0x61, 0x67, 0xc0, - 0xe8, 0x1e, 0x5e, 0xd8 -}; - -#define ATTESTATION_MSG_BODY_SIZE 145 - -uint8_t attestation_msg_sample1[ATTESTATION_MSG_BODY_SIZE] = -{ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x97, 0x9e, 0xb9, 0x5a, 0xdd, 0x14, 0x17, - 0xf2, 0xfa, 0xad, 0xfa, 0xd7, 0x66, 0x73, 0xfd, - 0x71, 0x57, 0xf4, 0xe9, 0x8d, 0xee, 0xaf, 0x42, - 0x5e, 0xbb, 0x8a, 0x4c, 0xd4, 0x84, 0xdc, 0x83, - 0x6a, 0x8, 0x70, 0xd, 0xf2, 0x42, 0x8b, 0x2b, - 0xee, 0x42, 0xb0, 0x85, 0xe5, 0xbf, 0x99, 0xc5, - 0x22, 0xf8, 0x37, 0xf7, 0xee, 0xb6, 0x2c, 0xd5, - 0x8c, 0x37, 0xa2, 0xd2, 0x51, 0xed, 0x45, 0xf9, - 0x65, 0xf2, 0x25, 0x8a, 0xf9, 0x9, 0x2d, 0xdb, - 0xdc, 0x4a, 0x73, 0xbd, 0x15, 0x49, 0x2, 0x10, - 0xd, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x54, 0x1c, 0xdd, 0x52, 0x93, 0xd8, 0xd4, - 0x28, 0x9d, 0x24, 0x7d, 0x4b, 0xe5, 0xcc, 0xe8, - 0xc0 -}; - -uint8_t attestation_msg_sample2[ATTESTATION_MSG_BODY_SIZE] = -{ - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x97, 0x9e, 0xb9, 0x5a, 0xdd, 0x14, 0x17, - 0xf2, 0xfa, 0xad, 0xfa, 0xd7, 0x66, 0x73, 0xfd, - 0x71, 0x57, 0xf4, 0xe9, 0x8d, 0xee, 0xaf, 0x42, - 0x5e, 0xbb, 0x8a, 0x4c, 0xd4, 0x84, 0xdc, 0x83, - 0x6a, 0x8, 0x70, 0xd, 0xf2, 0x42, 0x8b, 0x2b, - 0xee, 0x42, 0xb0, 0x85, 0xe5, 0xbf, 0x99, 0xc5, - 0x22, 0xf8, 0x37, 0xf7, 0xee, 0xb6, 0x2c, 0xd5, - 0x8c, 0x37, 0xa2, 0xd2, 0x51, 0xed, 0x45, 0xf9, - 0x65, 0x82, 0x12, 0xa8, 0x53, 0x84, 0x65, 0x62, - 0x33, 0xc0, 0x6, 0x86, 0x9f, 0x82, 0xbb, 0x6d, - 0xd6, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0xb1, 0x60, 0x31, 0x45, 0xd1, 0xa9, 0x23, - 0x7b, 0x85, 0x3f, 0x8, 0x3f, 0x48, 0x6d, 0x2d, - 0xad -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.config.xml b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.config.xml deleted file mode 100644 index 5e7af47444..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 0 - 0 - 0x40000 - 0x100000 - 1 - 1 - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.cpp b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.cpp deleted file mode 100644 index 07c1e0f505..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/isv_enclave/isv_enclave.cpp +++ /dev/null @@ -1,397 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include "isv_enclave_t.h" -#include "sgx_tkey_exchange.h" -#include "sgx_tcrypto.h" -#include "string.h" - -// This is the public EC key of the SP. The corresponding private EC key is -// used by the SP to sign data used in the remote attestation SIGMA protocol -// to sign channel binding data in MSG2. A successful verification of the -// signature confirms the identity of the SP to the ISV app in remote -// attestation secure channel binding. The public EC key should be hardcoded in -// the enclave or delivered in a trustworthy manner. The use of a spoofed public -// EC key in the remote attestation with secure channel binding session may lead -// to a security compromise. Every different SP the enlcave communicates to -// must have a unique SP public key. Delivery of the SP public key is -// determined by the ISV. The TKE SIGMA protocl expects an Elliptical Curve key -// based on NIST P-256 -static const sgx_ec256_public_t g_sp_pub_key = { - { - 0x72, 0x12, 0x8a, 0x7a, 0x17, 0x52, 0x6e, 0xbf, - 0x85, 0xd0, 0x3a, 0x62, 0x37, 0x30, 0xae, 0xad, - 0x3e, 0x3d, 0xaa, 0xee, 0x9c, 0x60, 0x73, 0x1d, - 0xb0, 0x5b, 0xe8, 0x62, 0x1c, 0x4b, 0xeb, 0x38 - }, - { - 0xd4, 0x81, 0x40, 0xd9, 0x50, 0xe2, 0x57, 0x7b, - 0x26, 0xee, 0xb7, 0x41, 0xe7, 0xc6, 0x14, 0xe2, - 0x24, 0xb7, 0xbd, 0xc9, 0x03, 0xf2, 0x9a, 0x28, - 0xa8, 0x3c, 0xc8, 0x10, 0x11, 0x14, 0x5e, 0x06 - } - -}; - -// Used to store the secret passed by the SP in the sample code. The -// size is forced to be 8 bytes. Expected value is -// 0x01,0x02,0x03,0x04,0x0x5,0x0x6,0x0x7 -uint8_t g_secret[8] = {0}; - - -#ifdef SUPPLIED_KEY_DERIVATION - -#pragma message ("Supplied key derivation function is used.") - -typedef struct _hash_buffer_t -{ - uint8_t counter[4]; - sgx_ec256_dh_shared_t shared_secret; - uint8_t algorithm_id[4]; -} hash_buffer_t; - -const char ID_U[] = "SGXRAENCLAVE"; -const char ID_V[] = "SGXRASERVER"; - -// Derive two keys from shared key and key id. -bool derive_key( - const sgx_ec256_dh_shared_t *p_shared_key, - uint8_t key_id, - sgx_ec_key_128bit_t *first_derived_key, - sgx_ec_key_128bit_t *second_derived_key) -{ - sgx_status_t sgx_ret = SGX_SUCCESS; - hash_buffer_t hash_buffer; - sgx_sha_state_handle_t sha_context; - sgx_sha256_hash_t key_material; - - memset(&hash_buffer, 0, sizeof(hash_buffer_t)); - /* counter in big endian */ - hash_buffer.counter[3] = key_id; - - /*convert from little endian to big endian */ - for (size_t i = 0; i < sizeof(sgx_ec256_dh_shared_t); i++) - { - hash_buffer.shared_secret.s[i] = p_shared_key->s[sizeof(p_shared_key->s)-1 - i]; - } - - sgx_ret = sgx_sha256_init(&sha_context); - if (sgx_ret != SGX_SUCCESS) - { - return false; - } - sgx_ret = sgx_sha256_update((uint8_t*)&hash_buffer, sizeof(hash_buffer_t), sha_context); - if (sgx_ret != SGX_SUCCESS) - { - sgx_sha256_close(sha_context); - return false; - } - sgx_ret = sgx_sha256_update((uint8_t*)&ID_U, sizeof(ID_U), sha_context); - if (sgx_ret != SGX_SUCCESS) - { - sgx_sha256_close(sha_context); - return false; - } - sgx_ret = sgx_sha256_update((uint8_t*)&ID_V, sizeof(ID_V), sha_context); - if (sgx_ret != SGX_SUCCESS) - { - sgx_sha256_close(sha_context); - return false; - } - sgx_ret = sgx_sha256_get_hash(sha_context, &key_material); - if (sgx_ret != SGX_SUCCESS) - { - sgx_sha256_close(sha_context); - return false; - } - sgx_ret = sgx_sha256_close(sha_context); - - assert(sizeof(sgx_ec_key_128bit_t)* 2 == sizeof(sgx_sha256_hash_t)); - memcpy(first_derived_key, &key_material, sizeof(sgx_ec_key_128bit_t)); - memcpy(second_derived_key, (uint8_t*)&key_material + sizeof(sgx_ec_key_128bit_t), sizeof(sgx_ec_key_128bit_t)); - - // memset here can be optimized away by compiler, so please use memset_s on - // windows for production code and similar functions on other OSes. - memset(&key_material, 0, sizeof(sgx_sha256_hash_t)); - - return true; -} - -//isv defined key derivation function id -#define ISV_KDF_ID 2 - -typedef enum _derive_key_type_t -{ - DERIVE_KEY_SMK_SK = 0, - DERIVE_KEY_MK_VK, -} derive_key_type_t; - -sgx_status_t key_derivation(const sgx_ec256_dh_shared_t* shared_key, - uint16_t kdf_id, - sgx_ec_key_128bit_t* smk_key, - sgx_ec_key_128bit_t* sk_key, - sgx_ec_key_128bit_t* mk_key, - sgx_ec_key_128bit_t* vk_key) -{ - bool derive_ret = false; - - if (NULL == shared_key) - { - return SGX_ERROR_INVALID_PARAMETER; - } - - if (ISV_KDF_ID != kdf_id) - { - //fprintf(stderr, "\nError, key derivation id mismatch in [%s].", __FUNCTION__); - return SGX_ERROR_KDF_MISMATCH; - } - - derive_ret = derive_key(shared_key, DERIVE_KEY_SMK_SK, - smk_key, sk_key); - if (derive_ret != true) - { - //fprintf(stderr, "\nError, derive key fail in [%s].", __FUNCTION__); - return SGX_ERROR_UNEXPECTED; - } - - derive_ret = derive_key(shared_key, DERIVE_KEY_MK_VK, - mk_key, vk_key); - if (derive_ret != true) - { - //fprintf(stderr, "\nError, derive key fail in [%s].", __FUNCTION__); - return SGX_ERROR_UNEXPECTED; - } - return SGX_SUCCESS; -} -#else -#pragma message ("Default key derivation function is used.") -#endif - -// This ecall is a wrapper of sgx_ra_init to create the trusted -// KE exchange key context needed for the remote attestation -// SIGMA API's. Input pointers aren't checked since the trusted stubs -// copy them into EPC memory. -// -// @param b_pse Indicates whether the ISV app is using the -// platform services. -// @param p_context Pointer to the location where the returned -// key context is to be copied. -// -// @return Any error return from the create PSE session if b_pse -// is true. -// @return Any error returned from the trusted key exchange API -// for creating a key context. - -sgx_status_t enclave_init_ra( - int b_pse, - sgx_ra_context_t *p_context) -{ - // isv enclave call to trusted key exchange library. - sgx_status_t ret; - if(b_pse) - { - int busy_retry_times = 2; - do{ - ret = sgx_create_pse_session(); - }while (ret == SGX_ERROR_BUSY && busy_retry_times--); - if (ret != SGX_SUCCESS) - return ret; - } -#ifdef SUPPLIED_KEY_DERIVATION - ret = sgx_ra_init_ex(&g_sp_pub_key, b_pse, key_derivation, p_context); -#else - ret = sgx_ra_init(&g_sp_pub_key, b_pse, p_context); -#endif - if(b_pse) - { - sgx_close_pse_session(); - return ret; - } - return ret; -} - - -// Closes the tKE key context used during the SIGMA key -// exchange. -// -// @param context The trusted KE library key context. -// -// @return Return value from the key context close API - -sgx_status_t SGXAPI enclave_ra_close( - sgx_ra_context_t context) -{ - sgx_status_t ret; - ret = sgx_ra_close(context); - return ret; -} - - -// Verify the mac sent in att_result_msg from the SP using the -// MK key. Input pointers aren't checked since the trusted stubs -// copy them into EPC memory. -// -// -// @param context The trusted KE library key context. -// @param p_message Pointer to the message used to produce MAC -// @param message_size Size in bytes of the message. -// @param p_mac Pointer to the MAC to compare to. -// @param mac_size Size in bytes of the MAC -// -// @return SGX_ERROR_INVALID_PARAMETER - MAC size is incorrect. -// @return Any error produced by tKE API to get SK key. -// @return Any error produced by the AESCMAC function. -// @return SGX_ERROR_MAC_MISMATCH - MAC compare fails. - -sgx_status_t verify_att_result_mac(sgx_ra_context_t context, - uint8_t* p_message, - size_t message_size, - uint8_t* p_mac, - size_t mac_size) -{ - sgx_status_t ret; - sgx_ec_key_128bit_t mk_key; - - if(mac_size != sizeof(sgx_mac_t)) - { - ret = SGX_ERROR_INVALID_PARAMETER; - return ret; - } - if(message_size > UINT32_MAX) - { - ret = SGX_ERROR_INVALID_PARAMETER; - return ret; - } - - do { - uint8_t mac[SGX_CMAC_MAC_SIZE] = {0}; - - ret = sgx_ra_get_keys(context, SGX_RA_KEY_MK, &mk_key); - if(SGX_SUCCESS != ret) - { - break; - } - ret = sgx_rijndael128_cmac_msg(&mk_key, - p_message, - (uint32_t)message_size, - &mac); - if(SGX_SUCCESS != ret) - { - break; - } - if(0 == consttime_memequal(p_mac, mac, sizeof(mac))) - { - ret = SGX_ERROR_MAC_MISMATCH; - break; - } - - } - while(0); - - return ret; -} - - -// Generate a secret information for the SP encrypted with SK. -// Input pointers aren't checked since the trusted stubs copy -// them into EPC memory. -// -// @param context The trusted KE library key context. -// @param p_secret Message containing the secret. -// @param secret_size Size in bytes of the secret message. -// @param p_gcm_mac The pointer the the AESGCM MAC for the -// message. -// -// @return SGX_ERROR_INVALID_PARAMETER - secret size if -// incorrect. -// @return Any error produced by tKE API to get SK key. -// @return Any error produced by the AESGCM function. -// @return SGX_ERROR_UNEXPECTED - the secret doesn't match the -// expected value. - -sgx_status_t put_secret_data( - sgx_ra_context_t context, - uint8_t *p_secret, - uint32_t secret_size, - uint8_t *p_gcm_mac) -{ - sgx_status_t ret = SGX_SUCCESS; - sgx_ec_key_128bit_t sk_key; - - do { - if(secret_size != 8) - { - ret = SGX_ERROR_INVALID_PARAMETER; - break; - } - - ret = sgx_ra_get_keys(context, SGX_RA_KEY_SK, &sk_key); - if(SGX_SUCCESS != ret) - { - break; - } - - uint8_t aes_gcm_iv[12] = {0}; - ret = sgx_rijndael128GCM_decrypt(&sk_key, - p_secret, - secret_size, - &g_secret[0], - &aes_gcm_iv[0], - 12, - NULL, - 0, - (const sgx_aes_gcm_128bit_tag_t *) - (p_gcm_mac)); - - uint32_t i; - bool secret_match = true; - for(i=0;i -#include -#include "ecp.h" - -#include "sample_libcrypto.h" - - -#define MAC_KEY_SIZE 16 - -errno_t memcpy_s( - void *dest, - size_t numberOfElements, - const void *src, - size_t count) -{ - if(numberOfElementss[sizeof(p_shared_key->s) - 1 - i]; - } - - sample_ret = sample_sha256_init(&sha_context); - if (sample_ret != SAMPLE_SUCCESS) - { - return false; - } - sample_ret = sample_sha256_update((uint8_t*)&hash_buffer, sizeof(hash_buffer_t), sha_context); - if (sample_ret != SAMPLE_SUCCESS) - { - sample_sha256_close(sha_context); - return false; - } - sample_ret = sample_sha256_update((uint8_t*)ID_U, sizeof(ID_U), sha_context); - if (sample_ret != SAMPLE_SUCCESS) - { - sample_sha256_close(sha_context); - return false; - } - sample_ret = sample_sha256_update((uint8_t*)ID_V, sizeof(ID_V), sha_context); - if (sample_ret != SAMPLE_SUCCESS) - { - sample_sha256_close(sha_context); - return false; - } - sample_ret = sample_sha256_get_hash(sha_context, &key_material); - if (sample_ret != SAMPLE_SUCCESS) - { - sample_sha256_close(sha_context); - return false; - } - sample_ret = sample_sha256_close(sha_context); - - static_assert(sizeof(sample_ec_key_128bit_t)* 2 == sizeof(sample_sha256_hash_t), "structure size mismatch."); - memcpy_s(first_derived_key, sizeof(sample_ec_key_128bit_t), &key_material, sizeof(sample_ec_key_128bit_t)); - memcpy_s(second_derived_key, sizeof(sample_ec_key_128bit_t), (uint8_t*)&key_material + sizeof(sample_ec_key_128bit_t), sizeof(sample_ec_key_128bit_t)); - - // memset here can be optimized away by compiler, so please use memset_s on - // windows for production code and similar functions on other OSes. - memset(&key_material, 0, sizeof(sample_sha256_hash_t)); - - return true; -} - -#else - -#pragma message ("Default key derivation function is used.") - -#define EC_DERIVATION_BUFFER_SIZE(label_length) ((label_length) +4) - -const char str_SMK[] = "SMK"; -const char str_SK[] = "SK"; -const char str_MK[] = "MK"; -const char str_VK[] = "VK"; - -// Derive key from shared key and key id. -// key id should be sample_derive_key_type_t. -bool derive_key( - const sample_ec_dh_shared_t *p_shared_key, - uint8_t key_id, - sample_ec_key_128bit_t* derived_key) -{ - sample_status_t sample_ret = SAMPLE_SUCCESS; - uint8_t cmac_key[MAC_KEY_SIZE]; - sample_ec_key_128bit_t key_derive_key; - - memset(&cmac_key, 0, MAC_KEY_SIZE); - - sample_ret = sample_rijndael128_cmac_msg( - (sample_cmac_128bit_key_t *)&cmac_key, - (uint8_t*)p_shared_key, - sizeof(sample_ec_dh_shared_t), - (sample_cmac_128bit_tag_t *)&key_derive_key); - if (sample_ret != SAMPLE_SUCCESS) - { - // memset here can be optimized away by compiler, so please use memset_s on - // windows for production code and similar functions on other OSes. - memset(&key_derive_key, 0, sizeof(key_derive_key)); - return false; - } - - const char *label = NULL; - uint32_t label_length = 0; - switch (key_id) - { - case SAMPLE_DERIVE_KEY_SMK: - label = str_SMK; - label_length = sizeof(str_SMK) -1; - break; - case SAMPLE_DERIVE_KEY_SK: - label = str_SK; - label_length = sizeof(str_SK) -1; - break; - case SAMPLE_DERIVE_KEY_MK: - label = str_MK; - label_length = sizeof(str_MK) -1; - break; - case SAMPLE_DERIVE_KEY_VK: - label = str_VK; - label_length = sizeof(str_VK) -1; - break; - default: - // memset here can be optimized away by compiler, so please use memset_s on - // windows for production code and similar functions on other OSes. - memset(&key_derive_key, 0, sizeof(key_derive_key)); - return false; - break; - } - /* derivation_buffer = counter(0x01) || label || 0x00 || output_key_len(0x0080) */ - uint32_t derivation_buffer_length = EC_DERIVATION_BUFFER_SIZE(label_length); - uint8_t *p_derivation_buffer = (uint8_t *)malloc(derivation_buffer_length); - if (p_derivation_buffer == NULL) - { - // memset here can be optimized away by compiler, so please use memset_s on - // windows for production code and similar functions on other OSes. - memset(&key_derive_key, 0, sizeof(key_derive_key)); - return false; - } - memset(p_derivation_buffer, 0, derivation_buffer_length); - - /*counter = 0x01 */ - p_derivation_buffer[0] = 0x01; - /*label*/ - memcpy_s(&p_derivation_buffer[1], derivation_buffer_length - 1, label, label_length); - /*output_key_len=0x0080*/ - uint16_t *key_len = (uint16_t *)(&(p_derivation_buffer[derivation_buffer_length - 2])); - *key_len = 0x0080; - - - sample_ret = sample_rijndael128_cmac_msg( - (sample_cmac_128bit_key_t *)&key_derive_key, - p_derivation_buffer, - derivation_buffer_length, - (sample_cmac_128bit_tag_t *)derived_key); - free(p_derivation_buffer); - // memset here can be optimized away by compiler, so please use memset_s on - // windows for production code and similar functions on other OSes. - memset(&key_derive_key, 0, sizeof(key_derive_key)); - if (sample_ret != SAMPLE_SUCCESS) - { - return false; - } - return true; -} -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ecp.h b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ecp.h deleted file mode 100644 index 6a18bd44ba..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ecp.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _ECP_H -#define _ECP_H - -#include -#include - -#include "remote_attestation_result.h" - -#ifndef SAMPLE_FEBITSIZE - #define SAMPLE_FEBITSIZE 256 -#endif - -#define SAMPLE_ECP_KEY_SIZE (SAMPLE_FEBITSIZE/8) - -typedef struct sample_ec_priv_t -{ - uint8_t r[SAMPLE_ECP_KEY_SIZE]; -} sample_ec_priv_t; - -typedef struct sample_ec_dh_shared_t -{ - uint8_t s[SAMPLE_ECP_KEY_SIZE]; -}sample_ec_dh_shared_t; - -typedef uint8_t sample_ec_key_128bit_t[16]; - -#define SAMPLE_EC_MAC_SIZE 16 - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifndef _ERRNO_T_DEFINED -#define _ERRNO_T_DEFINED -typedef int errno_t; -#endif -errno_t memcpy_s(void *dest, size_t numberOfElements, const void *src, - size_t count); - - -#ifdef SUPPLIED_KEY_DERIVATION - -typedef enum _sample_derive_key_type_t -{ - SAMPLE_DERIVE_KEY_SMK_SK = 0, - SAMPLE_DERIVE_KEY_MK_VK, -} sample_derive_key_type_t; - -bool derive_key( - const sample_ec_dh_shared_t *p_shared_key, - uint8_t key_id, - sample_ec_key_128bit_t *first_derived_key, - sample_ec_key_128bit_t *second_derived_key); - -#else - -typedef enum _sample_derive_key_type_t -{ - SAMPLE_DERIVE_KEY_SMK = 0, - SAMPLE_DERIVE_KEY_SK, - SAMPLE_DERIVE_KEY_MK, - SAMPLE_DERIVE_KEY_VK, -} sample_derive_key_type_t; - -bool derive_key( - const sample_ec_dh_shared_t *p_shared_key, - uint8_t key_id, - sample_ec_key_128bit_t *derived_key); - -#endif - -bool verify_cmac128( - sample_ec_key_128bit_t mac_key, - const uint8_t *p_data_buf, - uint32_t buf_size, - const uint8_t *p_mac_buf); -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ias_ra.cpp b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ias_ra.cpp deleted file mode 100644 index 91b1a36966..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ias_ra.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include "service_provider.h" -#include "sample_libcrypto.h" -#include "ecp.h" -#include -#include -#include -#include -#include -#include "ias_ra.h" - -//This whole file is used as simulation of the interfaces to be -// delivered an attestation server. - - -#define UNUSED(expr) do { (void)(expr); } while (0) - -#if !defined(SWAP_ENDIAN_DW) - #define SWAP_ENDIAN_DW(dw) ((((dw) & 0x000000ff) << 24) \ - | (((dw) & 0x0000ff00) << 8) \ - | (((dw) & 0x00ff0000) >> 8) \ - | (((dw) & 0xff000000) >> 24)) -#endif -#if !defined(SWAP_ENDIAN_32B) - #define SWAP_ENDIAN_32B(ptr) \ -{\ - unsigned int temp = 0; \ - temp = SWAP_ENDIAN_DW(((unsigned int*)(ptr))[0]); \ - ((unsigned int*)(ptr))[0] = SWAP_ENDIAN_DW(((unsigned int*)(ptr))[7]); \ - ((unsigned int*)(ptr))[7] = temp; \ - temp = SWAP_ENDIAN_DW(((unsigned int*)(ptr))[1]); \ - ((unsigned int*)(ptr))[1] = SWAP_ENDIAN_DW(((unsigned int*)(ptr))[6]); \ - ((unsigned int*)(ptr))[6] = temp; \ - temp = SWAP_ENDIAN_DW(((unsigned int*)(ptr))[2]); \ - ((unsigned int*)(ptr))[2] = SWAP_ENDIAN_DW(((unsigned int*)(ptr))[5]); \ - ((unsigned int*)(ptr))[5] = temp; \ - temp = SWAP_ENDIAN_DW(((unsigned int*)(ptr))[3]); \ - ((unsigned int*)(ptr))[3] = SWAP_ENDIAN_DW(((unsigned int*)(ptr))[4]); \ - ((unsigned int*)(ptr))[4] = temp; \ -} -#endif - -// This is the ECDSA NIST P-256 private key used to sign platform_info_blob. -// This private -// key and the public key in SDK untrusted KElibrary should be a temporary key -// pair. For production parts an attestation server will sign the platform_info_blob with the -// production private key and the SDK untrusted KE library will have the public -// key for verifcation. - -static const sample_ec256_private_t g_rk_priv_key = -{{ - 0x63,0x2c,0xd4,0x02,0x7a,0xdc,0x56,0xa5, - 0x59,0x6c,0x44,0x3e,0x43,0xca,0x4e,0x0b, - 0x58,0xcd,0x78,0xcb,0x3c,0x7e,0xd5,0xb9, - 0xf2,0x91,0x5b,0x39,0x0d,0xb3,0xb5,0xfb -}}; - -static sample_spid_t g_sim_spid = {"Service X"}; - - -// Simulates the attestation server function for verifying the quote produce by -// the ISV enclave. It doesn't decrypt or verify the quote in -// the simulation. Just produces the attestaion verification -// report with the platform info blob. -// -// @param p_isv_quote Pointer to the quote generated by the ISV -// enclave. -// @param pse_manifest Pointer to the PSE manifest if used. -// @param p_attestation_verification_report Pointer the outputed -// verification report. -// -// @return int - -int ias_verify_attestation_evidence( - sample_quote_t *p_isv_quote, - uint8_t* pse_manifest, - ias_att_report_t* p_attestation_verification_report) -{ - int ret = 0; - sample_ecc_state_handle_t ecc_state = NULL; - - //unused parameters - UNUSED(pse_manifest); - - if((NULL == p_isv_quote) || - (NULL == p_attestation_verification_report)) - { - return -1; - } - //Decrypt the Quote signature and verify. - - p_attestation_verification_report->id = 0x12345678; - p_attestation_verification_report->status = IAS_QUOTE_OK; - p_attestation_verification_report->revocation_reason = - IAS_REVOC_REASON_NONE; - p_attestation_verification_report->info_blob.sample_epid_group_status = - 0 << IAS_EPID_GROUP_STATUS_REVOKED_BIT_POS - | 0 << IAS_EPID_GROUP_STATUS_REKEY_AVAILABLE_BIT_POS; - p_attestation_verification_report->info_blob.sample_tcb_evaluation_status = - 0 << IAS_TCB_EVAL_STATUS_CPUSVN_OUT_OF_DATE_BIT_POS - | 0 << IAS_TCB_EVAL_STATUS_ISVSVN_OUT_OF_DATE_BIT_POS; - p_attestation_verification_report->info_blob.pse_evaluation_status = - 0 << IAS_PSE_EVAL_STATUS_ISVSVN_OUT_OF_DATE_BIT_POS - | 0 << IAS_PSE_EVAL_STATUS_EPID_GROUP_REVOKED_BIT_POS - | 0 << IAS_PSE_EVAL_STATUS_PSDASVN_OUT_OF_DATE_BIT_POS - | 0 << IAS_PSE_EVAL_STATUS_SIGRL_OUT_OF_DATE_BIT_POS - | 0 << IAS_PSE_EVAL_STATUS_PRIVRL_OUT_OF_DATE_BIT_POS; - memset(p_attestation_verification_report-> - info_blob.latest_equivalent_tcb_psvn, 0, PSVN_SIZE); - memset(p_attestation_verification_report->info_blob.latest_pse_isvsvn, - 0, ISVSVN_SIZE); - memset(p_attestation_verification_report->info_blob.latest_psda_svn, - 0, PSDA_SVN_SIZE); - memset(p_attestation_verification_report->info_blob.performance_rekey_gid, - 0, GID_SIZE); - - // @TODO: Product signing algorithm still TBD. May be RSA2048 signing. - // Generate the Service providers ECCDH key pair. - do { - ret = sample_ecc256_open_context(&ecc_state); - if (SAMPLE_SUCCESS != ret) { - fprintf(stderr, "\nError, cannot get ECC cotext in [%s].", - __FUNCTION__); - ret = -1; - break; - } - // Sign - ret = sample_ecdsa_sign( - (uint8_t *)&p_attestation_verification_report-> - info_blob.sample_epid_group_status, - sizeof(ias_platform_info_blob_t) - sizeof(sample_ec_sign256_t), - (sample_ec256_private_t *)&g_rk_priv_key, - (sample_ec256_signature_t *)&p_attestation_verification_report-> - info_blob.signature, - ecc_state); - if (SAMPLE_SUCCESS != ret) { - fprintf(stderr, "\nError, sign ga_gb fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - SWAP_ENDIAN_32B(p_attestation_verification_report-> - info_blob.signature.x); - SWAP_ENDIAN_32B(p_attestation_verification_report-> - info_blob.signature.y); - - }while (0); - if (ecc_state) { - sample_ecc256_close_context(ecc_state); - } - p_attestation_verification_report->pse_status = IAS_PSE_OK; - - // For now, don't simulate the policy reports. - p_attestation_verification_report->policy_report_size = 0; - return(ret); -} - - -// Simulates retrieving the SIGRL for upon the SP request. -// -// @param gid Group ID for the EPID key. -// @param p_sig_rl_size Pointer to the output value of the full -// SIGRL size in bytes. (including the -// signature). -// @param p_sig_rl Pointer to the output of the SIGRL. -// -// @return int - -int ias_get_sigrl( - const sample_epid_group_id_t gid, - uint32_t *p_sig_rl_size, - uint8_t **p_sig_rl) -{ - int ret = 0; - - UNUSED(gid); - - do { - - if (NULL == p_sig_rl || NULL == p_sig_rl_size) { - ret = -1; - break; - } - *p_sig_rl_size = 0; - *p_sig_rl = NULL; - // we should try to get sig_rl from an attestation server - break; - }while (0); - - return(ret); -} - - -// Used to simulate the enrollment function of an attestation server. It only -// gives back the SPID right now. In production, the enrollment -// occurs out of context from an attestation attempt and only -// occurs once. -// -// -// @param sp_credentials -// @param p_spid -// @param p_authentication_token -// -// @return int - -int ias_enroll( - int sp_credentials, - sample_spid_t *p_spid, - int *p_authentication_token) -{ - UNUSED(sp_credentials); - UNUSED(p_authentication_token); - - if (NULL != p_spid) { - memcpy_s(p_spid, sizeof(sample_spid_t), &g_sim_spid, - sizeof(sample_spid_t)); - } else { - return(1); - } - return(0); -} - - diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ias_ra.h b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ias_ra.h deleted file mode 100644 index 8dbde08dd1..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/ias_ra.h +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _IAS_RA_H -#define _IAS_RA_H - -#include "ecp.h" - -typedef enum { - IAS_QUOTE_OK, - IAS_QUOTE_SIGNATURE_INVALID, - IAS_QUOTE_GROUP_REVOKED, - IAS_QUOTE_SIGNATURE_REVOKED, - IAS_QUOTE_KEY_REVOKED, - IAS_QUOTE_SIGRL_VERSION_MISMATCH, - IAS_QUOTE_GROUP_OUT_OF_DATE, -} ias_quote_status_t; - -// These status should align with the definition in IAS API spec(rev 0.6) -typedef enum { - IAS_PSE_OK, - IAS_PSE_DESC_TYPE_NOT_SUPPORTED, - IAS_PSE_ISVSVN_OUT_OF_DATE, - IAS_PSE_MISCSELECT_INVALID, - IAS_PSE_ATTRIBUTES_INVALID, - IAS_PSE_MRSIGNER_INVALID, - IAS_PS_HW_GID_REVOKED, - IAS_PS_HW_PRIVKEY_RLVER_MISMATCH, - IAS_PS_HW_SIG_RLVER_MISMATCH, - IAS_PS_HW_CA_ID_INVALID, - IAS_PS_HW_SEC_INFO_INVALID, - IAS_PS_HW_PSDA_SVN_OUT_OF_DATE, -} ias_pse_status_t; - -// Revocation Reasons from RFC5280 -typedef enum { - IAS_REVOC_REASON_NONE, - IAS_REVOC_REASON_KEY_COMPROMISE, - IAS_REVOC_REASON_CA_COMPROMISED, - IAS_REVOC_REASON_SUPERCEDED, - IAS_REVOC_REASON_CESSATION_OF_OPERATION, - IAS_REVOC_REASON_CERTIFICATE_HOLD, - IAS_REVOC_REASON_PRIVILEGE_WITHDRAWN, - IAS_REVOC_REASON_AA_COMPROMISE, -} ias_revoc_reason_t; - -// These status should align with the definition in IAS API spec(rev 0.6) -#define IAS_EPID_GROUP_STATUS_REVOKED_BIT_POS 0x00 -#define IAS_EPID_GROUP_STATUS_REKEY_AVAILABLE_BIT_POS 0x01 - -#define IAS_TCB_EVAL_STATUS_CPUSVN_OUT_OF_DATE_BIT_POS 0x00 -#define IAS_TCB_EVAL_STATUS_ISVSVN_OUT_OF_DATE_BIT_POS 0x01 - -#define IAS_PSE_EVAL_STATUS_ISVSVN_OUT_OF_DATE_BIT_POS 0x00 -#define IAS_PSE_EVAL_STATUS_EPID_GROUP_REVOKED_BIT_POS 0x01 -#define IAS_PSE_EVAL_STATUS_PSDASVN_OUT_OF_DATE_BIT_POS 0x02 -#define IAS_PSE_EVAL_STATUS_SIGRL_OUT_OF_DATE_BIT_POS 0x03 -#define IAS_PSE_EVAL_STATUS_PRIVRL_OUT_OF_DATE_BIT_POS 0x04 - -// These status should align with the definition in IAS API spec(rev 0.6) -#define ISVSVN_SIZE 2 -#define PSDA_SVN_SIZE 4 -#define GID_SIZE 4 -#define PSVN_SIZE 18 - -#define SAMPLE_HASH_SIZE 32 // SHA256 -#define SAMPLE_MAC_SIZE 16 // Message Authentication Code - // - 16 bytes - -#define SAMPLE_REPORT_DATA_SIZE 64 - -typedef uint8_t sample_measurement_t[SAMPLE_HASH_SIZE]; -typedef uint8_t sample_mac_t[SAMPLE_MAC_SIZE]; -typedef uint8_t sample_report_data_t[SAMPLE_REPORT_DATA_SIZE]; -typedef uint16_t sample_prod_id_t; - -#define SAMPLE_CPUSVN_SIZE 16 - -typedef uint8_t sample_cpu_svn_t[SAMPLE_CPUSVN_SIZE]; -typedef uint16_t sample_isv_svn_t; - -typedef struct sample_attributes_t -{ - uint64_t flags; - uint64_t xfrm; -} sample_attributes_t; - -typedef struct sample_report_body_t { - sample_cpu_svn_t cpu_svn; // ( 0) Security Version of the CPU - uint8_t reserved1[32]; // ( 16) - sample_attributes_t attributes; // ( 48) Any special Capabilities - // the Enclave possess - sample_measurement_t mr_enclave; // ( 64) The value of the enclave's - // ENCLAVE measurement - uint8_t reserved2[32]; // ( 96) - sample_measurement_t mr_signer; // (128) The value of the enclave's - // SIGNER measurement - uint8_t reserved3[32]; // (160) - sample_measurement_t mr_reserved1; // (192) - sample_measurement_t mr_reserved2; // (224) - sample_prod_id_t isv_prod_id; // (256) Product ID of the Enclave - sample_isv_svn_t isv_svn; // (258) Security Version of the - // Enclave - uint8_t reserved4[60]; // (260) - sample_report_data_t report_data; // (320) Data provided by the user -} sample_report_body_t; - -#pragma pack(push, 1) - - -// This is a context data structure used in SP side -// @TODO: Modify at production to use the values specified by the Production -// IAS API -typedef struct _ias_att_report_t -{ - uint32_t id; - ias_quote_status_t status; - uint32_t revocation_reason; - ias_platform_info_blob_t info_blob; - ias_pse_status_t pse_status; - uint32_t policy_report_size; - - uint8_t policy_report[];// IAS_Q: Why does it specify a - // list of reports? - - -} ias_att_report_t; - -typedef uint8_t sample_epid_group_id_t[4]; - -typedef struct sample_spid_t -{ - uint8_t id[16]; -} sample_spid_t; - -typedef struct sample_basename_t -{ - uint8_t name[32]; -} sample_basename_t; - - -typedef struct sample_quote_nonce_t -{ - uint8_t rand[16]; -} sample_quote_nonce_t; - -#define SAMPLE_QUOTE_UNLINKABLE_SIGNATURE 0 -#define SAMPLE_QUOTE_LINKABLE_SIGNATURE 1 - -typedef struct sample_quote_t { - uint16_t version; // 0 - uint16_t sign_type; // 2 - sample_epid_group_id_t epid_group_id; // 4 - sample_isv_svn_t qe_svn; // 8 - uint8_t reserved[6]; // 10 - sample_basename_t basename; // 16 - sample_report_body_t report_body; // 48 - uint32_t signature_len; // 432 - uint8_t signature[]; // 436 -} sample_quote_t; - -#pragma pack(pop) - -#ifdef __cplusplus -extern "C" { -#endif - -int ias_enroll(int sp_credentials, sample_spid_t* spid, - int* authentication_token); -int ias_get_sigrl(const sample_epid_group_id_t gid, uint32_t* p_sig_rl_size, - uint8_t** p_sig_rl); -int ias_verify_attestation_evidence(sample_quote_t* p_isv_quote, - uint8_t* pse_manifest, - ias_att_report_t* attestation_verification_report); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/network_ra.cpp b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/network_ra.cpp deleted file mode 100644 index a5277382a0..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/network_ra.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include -#include -#include -#include "network_ra.h" -#include "service_provider.h" - - -// Used to send requests to the service provider sample. It -// simulates network communication between the ISV app and the -// ISV service provider. This would be modified in a real -// product to use the proper IP communication. -// -// @param server_url String name of the server URL -// @param p_req Pointer to the message to be sent. -// @param p_resp Pointer to a pointer of the response message. - -// @return int - -int ra_network_send_receive(const char *server_url, - const ra_samp_request_header_t *p_req, - ra_samp_response_header_t **p_resp) -{ - int ret = 0; - ra_samp_response_header_t* p_resp_msg; - - if((NULL == server_url) || - (NULL == p_req) || - (NULL == p_resp)) - { - return -1; - } - - switch(p_req->type) - { - - case TYPE_RA_MSG0: - ret = sp_ra_proc_msg0_req((const sample_ra_msg0_t*)((uint8_t*)p_req - + sizeof(ra_samp_request_header_t)), - p_req->size); - if (0 != ret) - { - fprintf(stderr, "\nError, call sp_ra_proc_msg1_req fail [%s].", - __FUNCTION__); - } - break; - - case TYPE_RA_MSG1: - ret = sp_ra_proc_msg1_req((const sample_ra_msg1_t*)((uint8_t*)p_req - + sizeof(ra_samp_request_header_t)), - p_req->size, - &p_resp_msg); - if(0 != ret) - { - fprintf(stderr, "\nError, call sp_ra_proc_msg1_req fail [%s].", - __FUNCTION__); - } - else - { - *p_resp = p_resp_msg; - } - break; - - case TYPE_RA_MSG3: - ret =sp_ra_proc_msg3_req((const sample_ra_msg3_t*)((uint8_t*)p_req + - sizeof(ra_samp_request_header_t)), - p_req->size, - &p_resp_msg); - if(0 != ret) - { - fprintf(stderr, "\nError, call sp_ra_proc_msg3_req fail [%s].", - __FUNCTION__); - } - else - { - *p_resp = p_resp_msg; - } - break; - - default: - ret = -1; - fprintf(stderr, "\nError, unknown ra message type. Type = %d [%s].", - p_req->type, __FUNCTION__); - break; - } - - return ret; -} - -// Used to free the response messages. In the sample code, the -// response messages are allocated by the SP code. -// -// -// @param resp Pointer to the response buffer to be freed. - -void ra_free_network_response_buffer(ra_samp_response_header_t *resp) -{ - if(resp!=NULL) - { - free(resp); - } -} diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/network_ra.h b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/network_ra.h deleted file mode 100644 index 8b23d7ef7f..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/network_ra.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _NETWORK_RA_H -#define _NETWORK_RA_H - - -/* Enum for all possible message types between the ISV app and - * the ISV SP. Requests and responses in the remote attestation - * sample. - */ -typedef enum _ra_msg_type_t -{ - TYPE_RA_MSG0, - TYPE_RA_MSG1, - TYPE_RA_MSG2, - TYPE_RA_MSG3, - TYPE_RA_ATT_RESULT, -}ra_msg_type_t; - -/* Enum for all possible message types between the SP and IAS. - * Network communication is not simulated in the remote - * attestation sample. Currently these aren't used. - */ -typedef enum _ias_msg_type_t -{ - TYPE_IAS_ENROLL, - TYPE_IAS_GET_SIGRL, - TYPE_IAS_SIGRL, - TYPE_IAS_ATT_EVIDENCE, - TYPE_IAS_ATT_RESULT, -}ias_msg_type_t; - -#pragma pack(1) -typedef struct _ra_samp_request_header_t{ - uint8_t type; /* set to one of ra_msg_type_t*/ - uint32_t size; /*size of request body*/ - uint8_t align[3]; - uint8_t body[]; -}ra_samp_request_header_t; - -typedef struct _ra_samp_response_header_t{ - uint8_t type; /* set to one of ra_msg_type_t*/ - uint8_t status[2]; - uint32_t size; /*size of the response body*/ - uint8_t align[1]; - uint8_t body[]; -}ra_samp_response_header_t; - -#pragma pack() - -#ifdef __cplusplus -extern "C" { -#endif - -int ra_network_send_receive(const char *server_url, - const ra_samp_request_header_t *req, - ra_samp_response_header_t **p_resp); -void ra_free_network_response_buffer(ra_samp_response_header_t *resp); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/remote_attestation_result.h b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/remote_attestation_result.h deleted file mode 100644 index a84d80745f..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/remote_attestation_result.h +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _REMOTE_ATTESTATION_RESULT_H_ -#define _REMOTE_ATTESTATION_RESULT_H_ - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#define SAMPLE_MAC_SIZE 16 /* Message Authentication Code*/ - /* - 16 bytes*/ -typedef uint8_t sample_mac_t[SAMPLE_MAC_SIZE]; - -#ifndef SAMPLE_FEBITSIZE - #define SAMPLE_FEBITSIZE 256 -#endif - -#define SAMPLE_NISTP256_KEY_SIZE (SAMPLE_FEBITSIZE/ 8 /sizeof(uint32_t)) - -typedef struct sample_ec_sign256_t -{ - uint32_t x[SAMPLE_NISTP256_KEY_SIZE]; - uint32_t y[SAMPLE_NISTP256_KEY_SIZE]; -} sample_ec_sign256_t; - -#pragma pack(push,1) - -#define SAMPLE_SP_TAG_SIZE 16 - -typedef struct sp_aes_gcm_data_t { - uint32_t payload_size; /* 0: Size of the payload which is*/ - /* encrypted*/ - uint8_t reserved[12]; /* 4: Reserved bits*/ - uint8_t payload_tag[SAMPLE_SP_TAG_SIZE]; - /* 16: AES-GMAC of the plain text,*/ - /* payload, and the sizes*/ - uint8_t payload[]; /* 32: Ciphertext of the payload*/ - /* followed by the plain text*/ -} sp_aes_gcm_data_t; - - -#define ISVSVN_SIZE 2 -#define PSDA_SVN_SIZE 4 -#define GID_SIZE 4 -#define PSVN_SIZE 18 - -/* @TODO: Modify at production to use the values specified by an Production*/ -/* attestation server API*/ -typedef struct ias_platform_info_blob_t -{ - uint8_t sample_epid_group_status; - uint16_t sample_tcb_evaluation_status; - uint16_t pse_evaluation_status; - uint8_t latest_equivalent_tcb_psvn[PSVN_SIZE]; - uint8_t latest_pse_isvsvn[ISVSVN_SIZE]; - uint8_t latest_psda_svn[PSDA_SVN_SIZE]; - uint8_t performance_rekey_gid[GID_SIZE]; - sample_ec_sign256_t signature; -} ias_platform_info_blob_t; - - -typedef struct sample_ra_att_result_msg_t { - ias_platform_info_blob_t platform_info_blob; - sample_mac_t mac; /* mac_smk(attestation_status)*/ - sp_aes_gcm_data_t secret; -} sample_ra_att_result_msg_t; - -#pragma pack(pop) - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/service_provider.cpp b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/service_provider.cpp deleted file mode 100644 index ac391dacd1..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/service_provider.cpp +++ /dev/null @@ -1,738 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include "service_provider.h" - -#include "sample_libcrypto.h" - -#include "ecp.h" - -#include -#include -#include -#include -#include -#include "ias_ra.h" - -#ifndef SAFE_FREE -#define SAFE_FREE(ptr) {if (NULL != (ptr)) {free(ptr); (ptr) = NULL;}} -#endif - -// This is supported extended epid group of SP. SP can support more than one -// extended epid group with different extended epid group id and credentials. -static const sample_extended_epid_group g_extended_epid_groups[] = { - { - 0, - ias_enroll, - ias_get_sigrl, - ias_verify_attestation_evidence - } -}; - -// This is the private EC key of SP, the corresponding public EC key is -// hard coded in isv_enclave. It is based on NIST P-256 curve. -static const sample_ec256_private_t g_sp_priv_key = { - { - 0x90, 0xe7, 0x6c, 0xbb, 0x2d, 0x52, 0xa1, 0xce, - 0x3b, 0x66, 0xde, 0x11, 0x43, 0x9c, 0x87, 0xec, - 0x1f, 0x86, 0x6a, 0x3b, 0x65, 0xb6, 0xae, 0xea, - 0xad, 0x57, 0x34, 0x53, 0xd1, 0x03, 0x8c, 0x01 - } -}; - -// This is the public EC key of SP, this key is hard coded in isv_enclave. -// It is based on NIST P-256 curve. Not used in the SP code. -static const sample_ec_pub_t g_sp_pub_key = { - { - 0x72, 0x12, 0x8a, 0x7a, 0x17, 0x52, 0x6e, 0xbf, - 0x85, 0xd0, 0x3a, 0x62, 0x37, 0x30, 0xae, 0xad, - 0x3e, 0x3d, 0xaa, 0xee, 0x9c, 0x60, 0x73, 0x1d, - 0xb0, 0x5b, 0xe8, 0x62, 0x1c, 0x4b, 0xeb, 0x38 - }, - { - 0xd4, 0x81, 0x40, 0xd9, 0x50, 0xe2, 0x57, 0x7b, - 0x26, 0xee, 0xb7, 0x41, 0xe7, 0xc6, 0x14, 0xe2, - 0x24, 0xb7, 0xbd, 0xc9, 0x03, 0xf2, 0x9a, 0x28, - 0xa8, 0x3c, 0xc8, 0x10, 0x11, 0x14, 0x5e, 0x06 - } -}; - -// This is a context data structure used on SP side -typedef struct _sp_db_item_t -{ - sample_ec_pub_t g_a; - sample_ec_pub_t g_b; - sample_ec_key_128bit_t vk_key;// Shared secret key for the REPORT_DATA - sample_ec_key_128bit_t mk_key;// Shared secret key for generating MAC's - sample_ec_key_128bit_t sk_key;// Shared secret key for encryption - sample_ec_key_128bit_t smk_key;// Used only for SIGMA protocol - sample_ec_priv_t b; - sample_ps_sec_prop_desc_t ps_sec_prop; -}sp_db_item_t; -static sp_db_item_t g_sp_db; - -static const sample_extended_epid_group* g_sp_extended_epid_group_id= NULL; -static bool g_is_sp_registered = false; -static int g_sp_credentials = 0; -static int g_authentication_token = 0; - -uint8_t g_secret[8] = {0,1,2,3,4,5,6,7}; - -sample_spid_t g_spid; - - -// Verify message 0 then configure extended epid group. -int sp_ra_proc_msg0_req(const sample_ra_msg0_t *p_msg0, - uint32_t msg0_size) -{ - int ret = -1; - - if (!p_msg0 || - (msg0_size != sizeof(sample_ra_msg0_t))) - { - return -1; - } - uint32_t extended_epid_group_id = p_msg0->extended_epid_group_id; - - // Check to see if we have registered with the attestation server yet? - if (!g_is_sp_registered || - (g_sp_extended_epid_group_id != NULL && g_sp_extended_epid_group_id->extended_epid_group_id != extended_epid_group_id)) - { - // Check to see if the extended_epid_group_id is supported? - ret = SP_UNSUPPORTED_EXTENDED_EPID_GROUP; - for (size_t i = 0; i < sizeof(g_extended_epid_groups) / sizeof(sample_extended_epid_group); i++) - { - if (g_extended_epid_groups[i].extended_epid_group_id == extended_epid_group_id) - { - g_sp_extended_epid_group_id = &(g_extended_epid_groups[i]); - // In the product, the SP will establish a mutually - // authenticated SSL channel. During the enrollment process, the ISV - // registers it exchanges TLS certs with attestation server and obtains an SPID and - // Report Key from the attestation server. - // For a product attestation server, enrollment is an offline process. See the 'on-boarding' - // documentation to get the information required. The enrollment process is - // simulated by a call in this sample. - ret = g_sp_extended_epid_group_id->enroll(g_sp_credentials, &g_spid, - &g_authentication_token); - if (0 != ret) - { - ret = SP_IAS_FAILED; - break; - } - - g_is_sp_registered = true; - ret = SP_OK; - break; - } - } - } - else - { - ret = SP_OK; - } - - return ret; -} - -// Verify message 1 then generate and return message 2 to isv. -int sp_ra_proc_msg1_req(const sample_ra_msg1_t *p_msg1, - uint32_t msg1_size, - ra_samp_response_header_t **pp_msg2) -{ - int ret = 0; - ra_samp_response_header_t* p_msg2_full = NULL; - sample_ra_msg2_t *p_msg2 = NULL; - sample_ecc_state_handle_t ecc_state = NULL; - sample_status_t sample_ret = SAMPLE_SUCCESS; - bool derive_ret = false; - - if(!p_msg1 || - !pp_msg2 || - (msg1_size != sizeof(sample_ra_msg1_t))) - { - return -1; - } - - // Check to see if we have registered? - if (!g_is_sp_registered) - { - return SP_UNSUPPORTED_EXTENDED_EPID_GROUP; - } - - do - { - // Get the sig_rl from attestation server using GID. - // GID is Base-16 encoded of EPID GID in little-endian format. - // In the product, the SP and attesation server uses an established channel for - // communication. - uint8_t* sig_rl; - uint32_t sig_rl_size = 0; - - // The product interface uses a REST based message to get the SigRL. - - ret = g_sp_extended_epid_group_id->get_sigrl(p_msg1->gid, &sig_rl_size, &sig_rl); - if(0 != ret) - { - fprintf(stderr, "\nError, ias_get_sigrl [%s].", __FUNCTION__); - ret = SP_IAS_FAILED; - break; - } - - // Need to save the client's public ECCDH key to local storage - if (memcpy_s(&g_sp_db.g_a, sizeof(g_sp_db.g_a), &p_msg1->g_a, - sizeof(p_msg1->g_a))) - { - fprintf(stderr, "\nError, cannot do memcpy in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // Generate the Service providers ECCDH key pair. - sample_ret = sample_ecc256_open_context(&ecc_state); - if(SAMPLE_SUCCESS != sample_ret) - { - fprintf(stderr, "\nError, cannot get ECC context in [%s].", - __FUNCTION__); - ret = -1; - break; - } - sample_ec256_public_t pub_key = {{0},{0}}; - sample_ec256_private_t priv_key = {{0}}; - sample_ret = sample_ecc256_create_key_pair(&priv_key, &pub_key, - ecc_state); - if(SAMPLE_SUCCESS != sample_ret) - { - fprintf(stderr, "\nError, cannot generate key pair in [%s].", - __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // Need to save the SP ECCDH key pair to local storage. - if(memcpy_s(&g_sp_db.b, sizeof(g_sp_db.b), &priv_key,sizeof(priv_key)) - || memcpy_s(&g_sp_db.g_b, sizeof(g_sp_db.g_b), - &pub_key,sizeof(pub_key))) - { - fprintf(stderr, "\nError, cannot do memcpy in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // Generate the client/SP shared secret - sample_ec_dh_shared_t dh_key = {{0}}; - sample_ret = sample_ecc256_compute_shared_dhkey(&priv_key, - (sample_ec256_public_t *)&p_msg1->g_a, - (sample_ec256_dh_shared_t *)&dh_key, - ecc_state); - if(SAMPLE_SUCCESS != sample_ret) - { - fprintf(stderr, "\nError, compute share key fail in [%s].", - __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - -#ifdef SUPPLIED_KEY_DERIVATION - - // smk is only needed for msg2 generation. - derive_ret = derive_key(&dh_key, SAMPLE_DERIVE_KEY_SMK_SK, - &g_sp_db.smk_key, &g_sp_db.sk_key); - if(derive_ret != true) - { - fprintf(stderr, "\nError, derive key fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // The rest of the keys are the shared secrets for future communication. - derive_ret = derive_key(&dh_key, SAMPLE_DERIVE_KEY_MK_VK, - &g_sp_db.mk_key, &g_sp_db.vk_key); - if(derive_ret != true) - { - fprintf(stderr, "\nError, derive key fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } -#else - // smk is only needed for msg2 generation. - derive_ret = derive_key(&dh_key, SAMPLE_DERIVE_KEY_SMK, - &g_sp_db.smk_key); - if(derive_ret != true) - { - fprintf(stderr, "\nError, derive key fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // The rest of the keys are the shared secrets for future communication. - derive_ret = derive_key(&dh_key, SAMPLE_DERIVE_KEY_MK, - &g_sp_db.mk_key); - if(derive_ret != true) - { - fprintf(stderr, "\nError, derive key fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - derive_ret = derive_key(&dh_key, SAMPLE_DERIVE_KEY_SK, - &g_sp_db.sk_key); - if(derive_ret != true) - { - fprintf(stderr, "\nError, derive key fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - derive_ret = derive_key(&dh_key, SAMPLE_DERIVE_KEY_VK, - &g_sp_db.vk_key); - if(derive_ret != true) - { - fprintf(stderr, "\nError, derive key fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } -#endif - - uint32_t msg2_size = sizeof(sample_ra_msg2_t) + sig_rl_size; - p_msg2_full = (ra_samp_response_header_t*)malloc(msg2_size - + sizeof(ra_samp_response_header_t)); - if(!p_msg2_full) - { - fprintf(stderr, "\nError, out of memory in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - memset(p_msg2_full, 0, msg2_size + sizeof(ra_samp_response_header_t)); - p_msg2_full->type = TYPE_RA_MSG2; - p_msg2_full->size = msg2_size; - // The simulated message2 always passes. This would need to be set - // accordingly in a real service provider implementation. - p_msg2_full->status[0] = 0; - p_msg2_full->status[1] = 0; - p_msg2 = (sample_ra_msg2_t *)p_msg2_full->body; - - // Assemble MSG2 - if(memcpy_s(&p_msg2->g_b, sizeof(p_msg2->g_b), &g_sp_db.g_b, - sizeof(g_sp_db.g_b)) || - memcpy_s(&p_msg2->spid, sizeof(sample_spid_t), - &g_spid, sizeof(g_spid))) - { - fprintf(stderr,"\nError, memcpy failed in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // The service provider is responsible for selecting the proper EPID - // signature type and to understand the implications of the choice! - p_msg2->quote_type = SAMPLE_QUOTE_LINKABLE_SIGNATURE; - -#ifdef SUPPLIED_KEY_DERIVATION -//isv defined key derivation function id -#define ISV_KDF_ID 2 - p_msg2->kdf_id = ISV_KDF_ID; -#else - p_msg2->kdf_id = SAMPLE_AES_CMAC_KDF_ID; -#endif - // Create gb_ga - sample_ec_pub_t gb_ga[2]; - if(memcpy_s(&gb_ga[0], sizeof(gb_ga[0]), &g_sp_db.g_b, - sizeof(g_sp_db.g_b)) - || memcpy_s(&gb_ga[1], sizeof(gb_ga[1]), &g_sp_db.g_a, - sizeof(g_sp_db.g_a))) - { - fprintf(stderr,"\nError, memcpy failed in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // Sign gb_ga - sample_ret = sample_ecdsa_sign((uint8_t *)&gb_ga, sizeof(gb_ga), - (sample_ec256_private_t *)&g_sp_priv_key, - (sample_ec256_signature_t *)&p_msg2->sign_gb_ga, - ecc_state); - if(SAMPLE_SUCCESS != sample_ret) - { - fprintf(stderr, "\nError, sign ga_gb fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // Generate the CMACsmk for gb||SPID||TYPE||KDF_ID||Sigsp(gb,ga) - uint8_t mac[SAMPLE_EC_MAC_SIZE] = {0}; - uint32_t cmac_size = offsetof(sample_ra_msg2_t, mac); - sample_ret = sample_rijndael128_cmac_msg(&g_sp_db.smk_key, - (uint8_t *)&p_msg2->g_b, cmac_size, &mac); - if(SAMPLE_SUCCESS != sample_ret) - { - fprintf(stderr, "\nError, cmac fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - if(memcpy_s(&p_msg2->mac, sizeof(p_msg2->mac), mac, sizeof(mac))) - { - fprintf(stderr,"\nError, memcpy failed in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - if(memcpy_s(&p_msg2->sig_rl[0], sig_rl_size, sig_rl, sig_rl_size)) - { - fprintf(stderr,"\nError, memcpy failed in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - p_msg2->sig_rl_size = sig_rl_size; - - }while(0); - - if(ret) - { - *pp_msg2 = NULL; - SAFE_FREE(p_msg2_full); - } - else - { - // Freed by the network simulator in ra_free_network_response_buffer - *pp_msg2 = p_msg2_full; - } - - if(ecc_state) - { - sample_ecc256_close_context(ecc_state); - } - - return ret; -} - -// Process remote attestation message 3 -int sp_ra_proc_msg3_req(const sample_ra_msg3_t *p_msg3, - uint32_t msg3_size, - ra_samp_response_header_t **pp_att_result_msg) -{ - int ret = 0; - sample_status_t sample_ret = SAMPLE_SUCCESS; - const uint8_t *p_msg3_cmaced = NULL; - sample_quote_t *p_quote = NULL; - sample_sha_state_handle_t sha_handle = NULL; - sample_report_data_t report_data = {0}; - sample_ra_att_result_msg_t *p_att_result_msg = NULL; - ra_samp_response_header_t* p_att_result_msg_full = NULL; - uint32_t i; - - if((!p_msg3) || - (msg3_size < sizeof(sample_ra_msg3_t)) || - (!pp_att_result_msg)) - { - return SP_INTERNAL_ERROR; - } - - // Check to see if we have registered? - if (!g_is_sp_registered) - { - return SP_UNSUPPORTED_EXTENDED_EPID_GROUP; - } - do - { - // Compare g_a in message 3 with local g_a. - ret = memcmp(&g_sp_db.g_a, &p_msg3->g_a, sizeof(sample_ec_pub_t)); - if(ret) - { - fprintf(stderr, "\nError, g_a is not same [%s].", __FUNCTION__); - ret = SP_PROTOCOL_ERROR; - break; - } - //Make sure that msg3_size is bigger than sample_mac_t. - uint32_t mac_size = msg3_size - sizeof(sample_mac_t); - p_msg3_cmaced = reinterpret_cast(p_msg3); - p_msg3_cmaced += sizeof(sample_mac_t); - - // Verify the message mac using SMK - sample_cmac_128bit_tag_t mac = {0}; - sample_ret = sample_rijndael128_cmac_msg(&g_sp_db.smk_key, - p_msg3_cmaced, - mac_size, - &mac); - if(SAMPLE_SUCCESS != sample_ret) - { - fprintf(stderr, "\nError, cmac fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - // In real implementation, should use a time safe version of memcmp here, - // in order to avoid side channel attack. - ret = memcmp(&p_msg3->mac, mac, sizeof(mac)); - if(ret) - { - fprintf(stderr, "\nError, verify cmac fail [%s].", __FUNCTION__); - ret = SP_INTEGRITY_FAILED; - break; - } - - if(memcpy_s(&g_sp_db.ps_sec_prop, sizeof(g_sp_db.ps_sec_prop), - &p_msg3->ps_sec_prop, sizeof(p_msg3->ps_sec_prop))) - { - fprintf(stderr,"\nError, memcpy failed in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - p_quote = (sample_quote_t *)p_msg3->quote; - - // Check the quote version if needed. Only check the Quote.version field if the enclave - // identity fields have changed or the size of the quote has changed. The version may - // change without affecting the legacy fields or size of the quote structure. - //if(p_quote->version < ACCEPTED_QUOTE_VERSION) - //{ - // fprintf(stderr,"\nError, quote version is too old.", __FUNCTION__); - // ret = SP_QUOTE_VERSION_ERROR; - // break; - //} - - // Verify the report_data in the Quote matches the expected value. - // The first 32 bytes of report_data are SHA256 HASH of {ga|gb|vk}. - // The second 32 bytes of report_data are set to zero. - sample_ret = sample_sha256_init(&sha_handle); - if(sample_ret != SAMPLE_SUCCESS) - { - fprintf(stderr,"\nError, init hash failed in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - sample_ret = sample_sha256_update((uint8_t *)&(g_sp_db.g_a), - sizeof(g_sp_db.g_a), sha_handle); - if(sample_ret != SAMPLE_SUCCESS) - { - fprintf(stderr,"\nError, udpate hash failed in [%s].", - __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - sample_ret = sample_sha256_update((uint8_t *)&(g_sp_db.g_b), - sizeof(g_sp_db.g_b), sha_handle); - if(sample_ret != SAMPLE_SUCCESS) - { - fprintf(stderr,"\nError, udpate hash failed in [%s].", - __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - sample_ret = sample_sha256_update((uint8_t *)&(g_sp_db.vk_key), - sizeof(g_sp_db.vk_key), sha_handle); - if(sample_ret != SAMPLE_SUCCESS) - { - fprintf(stderr,"\nError, udpate hash failed in [%s].", - __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - sample_ret = sample_sha256_get_hash(sha_handle, - (sample_sha256_hash_t *)&report_data); - if(sample_ret != SAMPLE_SUCCESS) - { - fprintf(stderr,"\nError, Get hash failed in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - ret = memcmp((uint8_t *)&report_data, - (uint8_t *)&(p_quote->report_body.report_data), - sizeof(report_data)); - if(ret) - { - fprintf(stderr, "\nError, verify hash fail [%s].", __FUNCTION__); - ret = SP_INTEGRITY_FAILED; - break; - } - - // Verify Enclave policy (an attestation server may provide an API for this if we - // registered an Enclave policy) - - // Verify quote with attestation server. - // In the product, an attestation server could use a REST message and JSON formatting to request - // attestation Quote verification. The sample only simulates this interface. - ias_att_report_t attestation_report = {0}; - ret = g_sp_extended_epid_group_id->verify_attestation_evidence(p_quote, NULL, - &attestation_report); - if(0 != ret) - { - ret = SP_IAS_FAILED; - break; - } - FILE* OUTPUT = stdout; - fprintf(OUTPUT, "\n\n\tAtestation Report:"); - fprintf(OUTPUT, "\n\tid: 0x%0x.", attestation_report.id); - fprintf(OUTPUT, "\n\tstatus: %d.", attestation_report.status); - fprintf(OUTPUT, "\n\trevocation_reason: %u.", - attestation_report.revocation_reason); - // attestation_report.info_blob; - fprintf(OUTPUT, "\n\tpse_status: %d.", attestation_report.pse_status); - // Note: This sample always assumes the PIB is sent by attestation server. In the product - // implementation, the attestation server could only send the PIB for certain attestation - // report statuses. A product SP implementation needs to handle cases - // where the PIB is zero length. - - // Respond the client with the results of the attestation. - uint32_t att_result_msg_size = sizeof(sample_ra_att_result_msg_t); - p_att_result_msg_full = - (ra_samp_response_header_t*)malloc(att_result_msg_size - + sizeof(ra_samp_response_header_t) + sizeof(g_secret)); - if(!p_att_result_msg_full) - { - fprintf(stderr, "\nError, out of memory in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - memset(p_att_result_msg_full, 0, att_result_msg_size - + sizeof(ra_samp_response_header_t) + sizeof(g_secret)); - p_att_result_msg_full->type = TYPE_RA_ATT_RESULT; - p_att_result_msg_full->size = att_result_msg_size; - if(IAS_QUOTE_OK != attestation_report.status) - { - p_att_result_msg_full->status[0] = 0xFF; - } - if(IAS_PSE_OK != attestation_report.pse_status) - { - p_att_result_msg_full->status[1] = 0xFF; - } - - p_att_result_msg = - (sample_ra_att_result_msg_t *)p_att_result_msg_full->body; - - // In a product implementation of attestation server, the HTTP response header itself could have - // an RK based signature that the service provider needs to check here. - - // The platform_info_blob signature will be verified by the client - // when sent. No need to have the Service Provider to check it. The SP - // should pass it down to the application for further analysis. - - fprintf(OUTPUT, "\n\n\tEnclave Report:"); - fprintf(OUTPUT, "\n\tSignature Type: 0x%x", p_quote->sign_type); - fprintf(OUTPUT, "\n\tSignature Basename: "); - for(i=0; ibasename.name) && p_quote->basename.name[i]; - i++) - { - fprintf(OUTPUT, "%c", p_quote->basename.name[i]); - } -#ifdef __x86_64__ - fprintf(OUTPUT, "\n\tattributes.flags: 0x%0lx", - p_quote->report_body.attributes.flags); - fprintf(OUTPUT, "\n\tattributes.xfrm: 0x%0lx", - p_quote->report_body.attributes.xfrm); -#else - fprintf(OUTPUT, "\n\tattributes.flags: 0x%0llx", - p_quote->report_body.attributes.flags); - fprintf(OUTPUT, "\n\tattributes.xfrm: 0x%0llx", - p_quote->report_body.attributes.xfrm); -#endif - fprintf(OUTPUT, "\n\tmr_enclave: "); - for(i=0;ireport_body.mr_enclave[i]); - - //fprintf(stderr, "%02x",p_quote->report_body.mr_enclave.m[i]); - - } - fprintf(OUTPUT, "\n\tmr_signer: "); - for(i=0;ireport_body.mr_signer[i]); - - //fprintf(stderr, "%02x",p_quote->report_body.mr_signer.m[i]); - - } - fprintf(OUTPUT, "\n\tisv_prod_id: 0x%0x", - p_quote->report_body.isv_prod_id); - fprintf(OUTPUT, "\n\tisv_svn: 0x%0x",p_quote->report_body.isv_svn); - fprintf(OUTPUT, "\n"); - - // A product service provider needs to verify that its enclave properties - // match what is expected. The SP needs to check these values before - // trusting the enclave. For the sample, we always pass the policy check. - // Attestation server only verifies the quote structure and signature. It does not - // check the identity of the enclave. - bool isv_policy_passed = true; - - // Assemble Attestation Result Message - // Note, this is a structure copy. We don't copy the policy reports - // right now. - p_att_result_msg->platform_info_blob = attestation_report.info_blob; - - // Generate mac based on the mk key. - mac_size = sizeof(ias_platform_info_blob_t); - sample_ret = sample_rijndael128_cmac_msg(&g_sp_db.mk_key, - (const uint8_t*)&p_att_result_msg->platform_info_blob, - mac_size, - &p_att_result_msg->mac); - if(SAMPLE_SUCCESS != sample_ret) - { - fprintf(stderr, "\nError, cmac fail in [%s].", __FUNCTION__); - ret = SP_INTERNAL_ERROR; - break; - } - - // Generate shared secret and encrypt it with SK, if attestation passed. - uint8_t aes_gcm_iv[SAMPLE_SP_IV_SIZE] = {0}; - p_att_result_msg->secret.payload_size = 8; - if((IAS_QUOTE_OK == attestation_report.status) && - (IAS_PSE_OK == attestation_report.pse_status) && - (isv_policy_passed == true)) - { - ret = sample_rijndael128GCM_encrypt(&g_sp_db.sk_key, - &g_secret[0], - p_att_result_msg->secret.payload_size, - p_att_result_msg->secret.payload, - &aes_gcm_iv[0], - SAMPLE_SP_IV_SIZE, - NULL, - 0, - &p_att_result_msg->secret.payload_tag); - } - }while(0); - - if(ret) - { - *pp_att_result_msg = NULL; - SAFE_FREE(p_att_result_msg_full); - } - else - { - // Freed by the network simulator in ra_free_network_response_buffer - *pp_att_result_msg = p_att_result_msg_full; - } - return ret; -} - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/service_provider.h b/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/service_provider.h deleted file mode 100644 index fa1d03ea7e..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/RemoteAttestation/service_provider/service_provider.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _SERVICE_PROVIDER_H -#define _SERVICE_PROVIDER_H - -#include "remote_attestation_result.h" -#include "ias_ra.h" -#include "network_ra.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum { - SP_OK, - SP_UNSUPPORTED_EXTENDED_EPID_GROUP, - SP_INTEGRITY_FAILED, - SP_QUOTE_VERIFICATION_FAILED, - SP_IAS_FAILED, - SP_INTERNAL_ERROR, - SP_PROTOCOL_ERROR, - SP_QUOTE_VERSION_ERROR, -} sp_ra_msg_status_t; - -#pragma pack(push,1) - -#define SAMPLE_SP_TAG_SIZE 16 -#define SAMPLE_SP_IV_SIZE 12 - -typedef struct sample_ec_pub_t -{ - uint8_t gx[SAMPLE_ECP_KEY_SIZE]; - uint8_t gy[SAMPLE_ECP_KEY_SIZE]; -} sample_ec_pub_t; - -/*fixed length to align with internal structure*/ -typedef struct sample_ps_sec_prop_desc_t -{ - uint8_t sample_ps_sec_prop_desc[256]; -} sample_ps_sec_prop_desc_t; - -#pragma pack(pop) - -typedef uint32_t sample_ra_context_t; - -typedef uint8_t sample_key_128bit_t[16]; - -typedef sample_key_128bit_t sample_ra_key_128_t; - -typedef struct sample_ra_msg0_t -{ - uint32_t extended_epid_group_id; -} sample_ra_msg0_t; - - -typedef struct sample_ra_msg1_t -{ - sample_ec_pub_t g_a; /* the Endian-ness of Ga is - Little-Endian*/ - sample_epid_group_id_t gid; /* the Endian-ness of GID is - Little-Endian*/ -} sample_ra_msg1_t; - -/*Key Derivation Function ID : 0x0001 AES-CMAC Entropy Extraction and Key Expansion*/ -const uint16_t SAMPLE_AES_CMAC_KDF_ID = 0x0001; - -typedef struct sample_ra_msg2_t -{ - sample_ec_pub_t g_b; /* the Endian-ness of Gb is - Little-Endian*/ - sample_spid_t spid; /* In little endian*/ - uint16_t quote_type; /* unlinkable Quote(0) or linkable Quote(0) in little endian*/ - uint16_t kdf_id; /* key derivation function id in little endian. - 0x0001 for AES-CMAC Entropy Extraction and Key Derivation */ - sample_ec_sign256_t sign_gb_ga; /* In little endian*/ - sample_mac_t mac; /* mac_smk(g_b||spid||quote_type|| - sign_gb_ga)*/ - uint32_t sig_rl_size; - uint8_t sig_rl[]; -} sample_ra_msg2_t; - -typedef struct sample_ra_msg3_t -{ - sample_mac_t mac; /* mac_smk(g_a||ps_sec_prop||quote)*/ - sample_ec_pub_t g_a; /* the Endian-ness of Ga is*/ - /* Little-Endian*/ - sample_ps_sec_prop_desc_t ps_sec_prop; - uint8_t quote[]; -} sample_ra_msg3_t; - -int sp_ra_proc_msg0_req(const sample_ra_msg0_t *p_msg0, - uint32_t msg0_size); - -int sp_ra_proc_msg1_req(const sample_ra_msg1_t *p_msg1, - uint32_t msg1_size, - ra_samp_response_header_t **pp_msg2); - -int sp_ra_proc_msg3_req(const sample_ra_msg3_t *p_msg3, - uint32_t msg3_size, - ra_samp_response_header_t **pp_att_result_msg); - -int sp_ra_free_msg2( - sample_ra_msg2_t *p_msg2); - - - -typedef int (*sample_enroll)(int sp_credentials, sample_spid_t* spid, - int* authentication_token); - -typedef int(*sample_get_sigrl)(const sample_epid_group_id_t gid, uint32_t* p_sig_rl_size, - uint8_t** p_sig_rl); - -typedef int(*sample_verify_attestation_evidence)(sample_quote_t* p_isv_quote, - uint8_t* pse_manifest, - ias_att_report_t* attestation_verification_report); - - -typedef struct sample_extended_epid_group -{ - uint32_t extended_epid_group_id; - sample_enroll enroll; - sample_get_sigrl get_sigrl; - sample_verify_attestation_evidence verify_attestation_evidence; -} sample_extended_epid_group; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.cproject b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.cproject deleted file mode 100644 index 690134a3a4..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.cproject +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.project b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.project deleted file mode 100644 index 102c105873..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - SampleEnclave - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.core.ccnature - com.intel.sgx.sgxnature - - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.settings/language.settings.xml b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.settings/language.settings.xml deleted file mode 100644 index bb1f9221e3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/.settings/language.settings.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/App.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/App.cpp deleted file mode 100644 index 30723b697d..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/App.cpp +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include -#include - -# include -# include -# define MAX_PATH FILENAME_MAX - -#include "sgx_urts.h" -#include "App.h" -#include "Enclave_u.h" - -/* Global EID shared by multiple threads */ -sgx_enclave_id_t global_eid = 0; - -typedef struct _sgx_errlist_t { - sgx_status_t err; - const char *msg; - const char *sug; /* Suggestion */ -} sgx_errlist_t; - -/* Error code returned by sgx_create_enclave */ -static sgx_errlist_t sgx_errlist[] = { - { - SGX_ERROR_UNEXPECTED, - "Unexpected error occurred.", - NULL - }, - { - SGX_ERROR_INVALID_PARAMETER, - "Invalid parameter.", - NULL - }, - { - SGX_ERROR_OUT_OF_MEMORY, - "Out of memory.", - NULL - }, - { - SGX_ERROR_ENCLAVE_LOST, - "Power transition occurred.", - "Please refer to the sample \"PowerTransition\" for details." - }, - { - SGX_ERROR_INVALID_ENCLAVE, - "Invalid enclave image.", - NULL - }, - { - SGX_ERROR_INVALID_ENCLAVE_ID, - "Invalid enclave identification.", - NULL - }, - { - SGX_ERROR_INVALID_SIGNATURE, - "Invalid enclave signature.", - NULL - }, - { - SGX_ERROR_OUT_OF_EPC, - "Out of EPC memory.", - NULL - }, - { - SGX_ERROR_NO_DEVICE, - "Invalid SGX device.", - "Please make sure SGX module is enabled in the BIOS, and install SGX driver afterwards." - }, - { - SGX_ERROR_MEMORY_MAP_CONFLICT, - "Memory map conflicted.", - NULL - }, - { - SGX_ERROR_INVALID_METADATA, - "Invalid enclave metadata.", - NULL - }, - { - SGX_ERROR_DEVICE_BUSY, - "SGX device was busy.", - NULL - }, - { - SGX_ERROR_INVALID_VERSION, - "Enclave version was invalid.", - NULL - }, - { - SGX_ERROR_INVALID_ATTRIBUTE, - "Enclave was not authorized.", - NULL - }, - { - SGX_ERROR_ENCLAVE_FILE_ACCESS, - "Can't open enclave file.", - NULL - }, -}; - -/* Check error conditions for loading enclave */ -void print_error_message(sgx_status_t ret) -{ - size_t idx = 0; - size_t ttl = sizeof sgx_errlist/sizeof sgx_errlist[0]; - - for (idx = 0; idx < ttl; idx++) { - if(ret == sgx_errlist[idx].err) { - if(NULL != sgx_errlist[idx].sug) - printf("Info: %s\n", sgx_errlist[idx].sug); - printf("Error: %s\n", sgx_errlist[idx].msg); - break; - } - } - - if (idx == ttl) - printf("Error code is 0x%X. Please refer to the \"Intel SGX SDK Developer Reference\" for more details.\n", ret); -} - -/* Initialize the enclave: - * Step 1: try to retrieve the launch token saved by last transaction - * Step 2: call sgx_create_enclave to initialize an enclave instance - * Step 3: save the launch token if it is updated - */ -int initialize_enclave(void) -{ - char token_path[MAX_PATH] = {'\0'}; - sgx_launch_token_t token = {0}; - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - int updated = 0; - - /* Step 1: try to retrieve the launch token saved by last transaction - * if there is no token, then create a new one. - */ - /* try to get the token saved in $HOME */ - const char *home_dir = getpwuid(getuid())->pw_dir; - - if (home_dir != NULL && - (strlen(home_dir)+strlen("/")+sizeof(TOKEN_FILENAME)+1) <= MAX_PATH) { - /* compose the token path */ - strncpy(token_path, home_dir, strlen(home_dir)); - strncat(token_path, "/", strlen("/")); - strncat(token_path, TOKEN_FILENAME, sizeof(TOKEN_FILENAME)+1); - } else { - /* if token path is too long or $HOME is NULL */ - strncpy(token_path, TOKEN_FILENAME, sizeof(TOKEN_FILENAME)); - } - - FILE *fp = fopen(token_path, "rb"); - if (fp == NULL && (fp = fopen(token_path, "wb")) == NULL) { - printf("Warning: Failed to create/open the launch token file \"%s\".\n", token_path); - } - - if (fp != NULL) { - /* read the token from saved file */ - size_t read_num = fread(token, 1, sizeof(sgx_launch_token_t), fp); - if (read_num != 0 && read_num != sizeof(sgx_launch_token_t)) { - /* if token is invalid, clear the buffer */ - memset(&token, 0x0, sizeof(sgx_launch_token_t)); - printf("Warning: Invalid launch token read from \"%s\".\n", token_path); - } - } - /* Step 2: call sgx_create_enclave to initialize an enclave instance */ - /* Debug Support: set 2nd parameter to 1 */ - ret = sgx_create_enclave(ENCLAVE_FILENAME, SGX_DEBUG_FLAG, &token, &updated, &global_eid, NULL); - if (ret != SGX_SUCCESS) { - print_error_message(ret); - if (fp != NULL) fclose(fp); - return -1; - } - - /* Step 3: save the launch token if it is updated */ - if (updated == FALSE || fp == NULL) { - /* if the token is not updated, or file handler is invalid, do not perform saving */ - if (fp != NULL) fclose(fp); - return 0; - } - - /* reopen the file with write capablity */ - fp = freopen(token_path, "wb", fp); - if (fp == NULL) return 0; - size_t write_num = fwrite(token, 1, sizeof(sgx_launch_token_t), fp); - if (write_num != sizeof(sgx_launch_token_t)) - printf("Warning: Failed to save launch token to \"%s\".\n", token_path); - fclose(fp); - return 0; -} - -/* OCall functions */ -void ocall_print_string(const char *str) -{ - /* Proxy/Bridge will check the length and null-terminate - * the input string to prevent buffer overflow. - */ - printf("%s", str); -} - - -/* Application entry */ -int SGX_CDECL main(int argc, char *argv[]) -{ - (void)(argc); - (void)(argv); - - - /* Initialize the enclave */ - if(initialize_enclave() < 0){ - printf("Enter a character before exit ...\n"); - getchar(); - return -1; - } - - /* Utilize edger8r attributes */ - edger8r_array_attributes(); - edger8r_pointer_attributes(); - edger8r_type_attributes(); - edger8r_function_attributes(); - - /* Utilize trusted libraries */ - ecall_libc_functions(); - ecall_libcxx_functions(); - ecall_thread_functions(); - - /* Destroy the enclave */ - sgx_destroy_enclave(global_eid); - - printf("Info: SampleEnclave successfully returned.\n"); - - printf("Enter a character before exit ...\n"); - getchar(); - return 0; -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/App.h b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/App.h deleted file mode 100644 index f44fdc6a82..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/App.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _APP_H_ -#define _APP_H_ - -#include -#include -#include -#include - -#include "sgx_error.h" /* sgx_status_t */ -#include "sgx_eid.h" /* sgx_enclave_id_t */ - -#ifndef TRUE -# define TRUE 1 -#endif - -#ifndef FALSE -# define FALSE 0 -#endif - -# define TOKEN_FILENAME "enclave.token" -# define ENCLAVE_FILENAME "enclave.signed.so" - -extern sgx_enclave_id_t global_eid; /* global enclave id */ - -#if defined(__cplusplus) -extern "C" { -#endif - -void edger8r_array_attributes(void); -void edger8r_type_attributes(void); -void edger8r_pointer_attributes(void); -void edger8r_function_attributes(void); - -void ecall_libc_functions(void); -void ecall_libcxx_functions(void); -void ecall_thread_functions(void); - -#if defined(__cplusplus) -} -#endif - -#endif /* !_APP_H_ */ diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Arrays.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Arrays.cpp deleted file mode 100644 index 81e7d72bc5..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Arrays.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "../App.h" -#include "Enclave_u.h" - -/* edger8r_array_attributes: - * Invokes ECALLs declared with array attributes. - */ -void edger8r_array_attributes(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - /* user_check */ - int arr1[4] = {0, 1, 2, 3}; - ret = ecall_array_user_check(global_eid, arr1); - if (ret != SGX_SUCCESS) - abort(); - - /* make sure arr1 is changed */ - for (int i = 0; i < 4; i++) - assert(arr1[i] == (3 - i)); - - /* in */ - int arr2[4] = {0, 1, 2, 3}; - ret = ecall_array_in(global_eid, arr2); - if (ret != SGX_SUCCESS) - abort(); - - /* arr2 is not changed */ - for (int i = 0; i < 4; i++) - assert(arr2[i] == i); - - /* out */ - int arr3[4] = {0, 1, 2, 3}; - ret = ecall_array_out(global_eid, arr3); - if (ret != SGX_SUCCESS) - abort(); - - /* arr3 is changed */ - for (int i = 0; i < 4; i++) - assert(arr3[i] == (3 - i)); - - /* in, out */ - int arr4[4] = {0, 1, 2, 3}; - ret = ecall_array_in_out(global_eid, arr4); - if (ret != SGX_SUCCESS) - abort(); - - /* arr4 is changed */ - for (int i = 0; i < 4; i++) - assert(arr4[i] == (3 - i)); - - /* isary */ - array_t arr5 = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; - ret = ecall_array_isary(global_eid, arr5); - if (ret != SGX_SUCCESS) - abort(); - - /* arr5 is changed */ - for (int i = 0; i < 10; i++) - assert(arr5[i] == (9 - i)); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Functions.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Functions.cpp deleted file mode 100644 index 25fcf70341..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Functions.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "../App.h" -#include "Enclave_u.h" - -/* No need to implement memccpy here! */ - -/* edger8r_function_attributes: - * Invokes ECALL declared with calling convention attributes. - * Invokes ECALL declared with [public]. - */ -void edger8r_function_attributes(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - ret = ecall_function_calling_convs(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - ret = ecall_function_public(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - /* user shall not invoke private function here */ - int runned = 0; - ret = ecall_function_private(global_eid, &runned); - if (ret != SGX_ERROR_ECALL_NOT_ALLOWED || runned != 0) - abort(); -} - -/* ocall_function_allow: - * The OCALL invokes the [allow]ed ECALL 'edger8r_private'. - */ -void ocall_function_allow(void) -{ - int runned = 0; - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - ret = ecall_function_private(global_eid, &runned); - if (ret != SGX_SUCCESS || runned != 1) - abort(); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Pointers.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Pointers.cpp deleted file mode 100644 index 08308dcce6..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Pointers.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "../App.h" -#include "Enclave_u.h" - -/* edger8r_pointer_attributes: - * Invokes the ECALLs declared with pointer attributes. - */ -void edger8r_pointer_attributes(void) -{ - int val = 0; - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - char c[128] = {0}; - size_t len = 0; - memset(c, 0xe, 128); - ret = ecall_pointer_user_check(global_eid, &len, &c, 128); - if (ret != SGX_SUCCESS) - abort(); - assert(strcmp(c, "SGX_SUCCESS") == 0); - - - val = 0; - ret = ecall_pointer_in(global_eid, &val); - if (ret != SGX_SUCCESS) - abort(); - assert(val == 0); - - val = 0; - ret = ecall_pointer_out(global_eid, &val); - if (ret != SGX_SUCCESS) - abort(); - assert(val == 1234); - - val = 0; - ret = ecall_pointer_in_out(global_eid, &val); - if (ret != SGX_SUCCESS) - abort(); - assert(val == 1234); - - ret = ocall_pointer_attr(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - char str1[] = "1234567890"; - ret = ecall_pointer_string(global_eid, str1); - if (ret != SGX_SUCCESS) - abort(); - assert(strlen(str1) == 10 && memcmp(str1, "0987654321", strlen(str1)) == 0); - - const char str2[] = "1234567890"; - ret = ecall_pointer_string_const(global_eid, str2); - if (ret != SGX_SUCCESS) - abort(); - assert(strlen(str2) == 10 && memcmp(str2, "1234567890", strlen(str2)) == 0); - - char str3[] = "1234567890"; - ret = ecall_pointer_size(global_eid, (void*)str3, strlen(str3)); - if (ret != SGX_SUCCESS) - abort(); - assert(strlen(str3) == 10 && memcmp(str3, "0987654321", strlen(str3)) == 0); - - char str4[] = "1234567890"; - ret = ecall_pointer_isptr_readonly(global_eid, (buffer_t)str4, strlen(str4)); - if (ret != SGX_SUCCESS) - abort(); - assert(strlen(str4) == 10 && memcmp(str4, "1234567890", strlen(str4)) == 0); - - int arr[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; - ret = ecall_pointer_count(global_eid, arr, 10); - if (ret != SGX_SUCCESS) - abort(); - - for (int i = 0; i < 10; i++) - assert(arr[i] == (9 - i)); - - memset(arr, 0x0, sizeof(arr)); - ret = ecall_pointer_sizefunc(global_eid, (char *)arr); - if (ret != SGX_SUCCESS) - abort(); - - for (int i = 0; i < 10; i++) - assert(arr[i] == i); - - return; -} - -/* ocall_pointer_user_check: - * The OCALL declared with [user_check]. - */ -void ocall_pointer_user_check(int* val) -{ - (void)val; - assert(val != NULL); -} - -/* ocall_pointer_in: - * The OCALL declared with [in]. - */ -void ocall_pointer_in(int* val) -{ - *val = 1234; -} - -/* ocall_pointer_out: - * The OCALL declared with [out]. - */ -void ocall_pointer_out(int* val) -{ - *val = 1234; -} - -/* ocall_pointer_in_out: - * The OCALL declared with [in, out]. - */ -void ocall_pointer_in_out(int* val) -{ - *val = 1234; -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Types.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Types.cpp deleted file mode 100644 index 19bdd302e9..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/Edger8rSyntax/Types.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "../App.h" -#include "Enclave_u.h" - -/* edger8r_type_attributes: - * Invokes ECALLs declared with basic types. - */ -void edger8r_type_attributes(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - ret = ecall_type_char(global_eid, (char)0x12); - if (ret != SGX_SUCCESS) - abort(); - - ret = ecall_type_int(global_eid, (int)1234); - if (ret != SGX_SUCCESS) - abort(); - - ret = ecall_type_float(global_eid, (float)1234.0); - if (ret != SGX_SUCCESS) - abort(); - - ret = ecall_type_double(global_eid, (double)1234.5678); - if (ret != SGX_SUCCESS) - abort(); - - ret = ecall_type_size_t(global_eid, (size_t)12345678); - if (ret != SGX_SUCCESS) - abort(); - - ret = ecall_type_wchar_t(global_eid, (wchar_t)0x1234); - if (ret != SGX_SUCCESS) - abort(); - - struct struct_foo_t g = {1234, 5678}; - ret = ecall_type_struct(global_eid, g); - if (ret != SGX_SUCCESS) - abort(); - - union union_foo_t val = {0}; - ret = ecall_type_enum_union(global_eid, ENUM_FOO_0, &val); - if (ret != SGX_SUCCESS) - abort(); - assert(val.union_foo_0 == 2); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Libc.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Libc.cpp deleted file mode 100644 index 85c26cd7ef..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Libc.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "../App.h" -#include "Enclave_u.h" - -/* ecall_libc_functions: - * Invokes standard C functions. - */ -void ecall_libc_functions(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - ret = ecall_malloc_free(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - int cpuid[4] = {0x0, 0x0, 0x0, 0x0}; - ret = ecall_sgx_cpuid(global_eid, cpuid, 0x0); - if (ret != SGX_SUCCESS) - abort(); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Libcxx.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Libcxx.cpp deleted file mode 100644 index 238d3b0591..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Libcxx.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include "../App.h" -#include "Enclave_u.h" - -/* ecall_libcxx_functions: - * Invokes standard C++ functions. - */ -void ecall_libcxx_functions(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - ret = ecall_exception(global_eid); - if (ret != SGX_SUCCESS) - abort(); - - ret = ecall_map(global_eid); - if (ret != SGX_SUCCESS) - abort(); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Thread.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Thread.cpp deleted file mode 100644 index d4b8626f3e..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/App/TrustedLibrary/Thread.cpp +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include -using namespace std; - -#include "../App.h" -#include "Enclave_u.h" - -static size_t counter = 0; - -void increase_counter(void) -{ - size_t cnr = 0; - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - ret = ecall_increase_counter(global_eid, &cnr); - if (cnr != 0) counter = cnr; - if (ret != SGX_SUCCESS) - abort(); -} - -void data_producer(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - ret = ecall_producer(global_eid); - if (ret != SGX_SUCCESS) - abort(); -} - -void data_consumer(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - ret = ecall_consumer(global_eid); - if (ret != SGX_SUCCESS) - abort(); -} - -/* ecall_thread_functions: - * Invokes thread functions including mutex, condition variable, etc. - */ -void ecall_thread_functions(void) -{ - thread adder1(increase_counter); - thread adder2(increase_counter); - thread adder3(increase_counter); - thread adder4(increase_counter); - - adder1.join(); - adder2.join(); - adder3.join(); - adder4.join(); - - assert(counter == 4*LOOPS_PER_THREAD); - - printf("Info: executing thread synchronization, please wait... \n"); - /* condition variable */ - thread consumer1(data_consumer); - thread producer0(data_producer); - thread consumer2(data_consumer); - thread consumer3(data_consumer); - thread consumer4(data_consumer); - - consumer1.join(); - consumer2.join(); - consumer3.join(); - consumer4.join(); - producer0.join(); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Arrays.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Arrays.cpp deleted file mode 100644 index 85236d57d0..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Arrays.cpp +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* Test Array Attributes */ - -#include "sgx_trts.h" -#include "../Enclave.h" -#include "Enclave_t.h" - -/* ecall_array_user_check: - * [user_check] parameter does not perfrom copy operations. - */ -void ecall_array_user_check(int arr[4]) -{ - if (sgx_is_outside_enclave(arr, 4 * sizeof(int)) != 1) - abort(); - - for (int i = 0; i < 4; i++) { - assert(arr[i] == i); - arr[i] = 3 - i; - } -} - -/* ecall_array_in: - * arr[] is copied to trusted domain, but modified - * results will not be reflected to the untrusted side. - */ -void ecall_array_in(int arr[4]) -{ - for (int i = 0; i < 4; i++) { - assert(arr[i] == i); - arr[i] = (3 - i); - } -} - -/* ecall_array_out: - * arr[] is allocated inside the enclave, and it will be copied - * to the untrusted side - */ -void ecall_array_out(int arr[4]) -{ - for (int i = 0; i < 4; i++) { - /* arr is not copied from App */ - assert(arr[i] == 0); - arr[i] = (3 - i); - } -} - -/* ecall_array_in_out: - * arr[] will be allocated inside the enclave, content of arr[] will be copied either. - * After ECALL returns, the results will be copied to the outside. - */ -void ecall_array_in_out(int arr[4]) -{ - for (int i = 0; i < 4; i++) { - assert(arr[i] == i); - arr[i] = (3 - i); - } -} - -/* ecall_array_isary: - * [isary] tells Edger8r that user defined 'array_t' is an array type. - */ -void ecall_array_isary(array_t arr) -{ - if (sgx_is_outside_enclave(arr, sizeof(array_t)) != 1) - abort(); - - int n = sizeof(array_t)/sizeof(arr[0]); - for (int i = 0; i < n; i++) { - assert(arr[i] == i); - arr[i] = (n - 1 - i); - } -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Arrays.edl b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Arrays.edl deleted file mode 100644 index 9ef6b49a19..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Arrays.edl +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Arrays.edl - Samples for array attributes. */ - -enclave { - - /* - * Only for fixed-size array (size is explicitly specified). - */ - - trusted { - - /* - * []: can be used to declare an array. - * [user_check]: - * pointer of the array won't be valified, and the buffer pointed by 'arr' - * is not copied into the enclave either. But enclave can modify the memory outside. - */ - - public void ecall_array_user_check([user_check] int arr[4]); - - /* - * [in]: - * buffer for the array will be allocated inside the enclave, - * content of the array will be copied into the new allocated memory inside. - * Any changes performed inside the enclave will not affect the array outside. - */ - - public void ecall_array_in([in] int arr[4]); - - /* - * [out]: - * buffer for the array will be allocated inside the enclave, - * but the content of the array won't be copied. After ECALL returns, - * the buffer inside the enclave will copied into outside array. - */ - - public void ecall_array_out([out] int arr[4]); - - /* - * [in, out]: - * buffer for the array will be allocated inside the enclave, - * the content of the array will be copied either. After ECALL returns, - * the buffer inside the enclave will by copied into outside array again. - */ - - public void ecall_array_in_out([in, out] int arr[4]); - - /* - * [isary]: - * tells Edger8r the user defined 'array_t' is an array type, 'arr' will be - * treated as a pointer, no memory copied either due to [user_check]. - * For OCALLs, 'arr' shall point to the memory outside the enclave. - */ - - public void ecall_array_isary([user_check, isary] array_t arr); - - }; - - untrusted { - - /* - * [user_check|in|out|in,out|isary] can also be used in OCALLs, refer to the "User Guide" for details. - */ - - }; - -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Functions.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Functions.cpp deleted file mode 100644 index 2d53dcf063..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Functions.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Test Calling Conventions */ - -#include -#include - -#include "../Enclave.h" -#include "Enclave_t.h" - -/* ecall_function_calling_convs: - * memccpy is defined in system C library. - */ -void ecall_function_calling_convs(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - char s1[] = "1234567890"; - char s2[] = "0987654321"; - - char buf[BUFSIZ] = {'\0'}; - memcpy(buf, s1, strlen(s1)); - - ret = memccpy(NULL, s1, s2, '\0', strlen(s1)); - - if (ret != SGX_SUCCESS) - abort(); - assert(memcmp(s1, s2, strlen(s1)) == 0); - - return; -} - -/* ecall_function_public: - * The public ECALL that invokes the OCALL 'ocall_function_allow'. - */ -void ecall_function_public(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - ret = ocall_function_allow(); - if (ret != SGX_SUCCESS) - abort(); - - return; -} - -/* ecall_function_private: - * The private ECALL that only can be invoked in the OCALL 'ocall_function_allow'. - */ -int ecall_function_private(void) -{ - return 1; -} - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Functions.edl b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Functions.edl deleted file mode 100644 index bdb21ce3b2..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Functions.edl +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Functions.edl - Samples for function attributes. */ - -enclave { - - /* - * Following keywords/attributes are supported for untrusted functions: - * cdecl, stdcall, fastcall, dllimport (only for Windows). - * [public] is only supported for the trusted functions. - * Trusted function will be treated as [private] w/o the [public]. - */ - - trusted { - - public void ecall_function_calling_convs(void); - - /* - * [public]: - * public ECALL can be called directly in App. - */ - - public void ecall_function_public(void); - - /* - * [private]: - * private ECALL cannot be called directly in App. - */ - - int ecall_function_private(void); - - }; - - untrusted { - - /* - * [cdecl]: - * tells edger8r the calling convention of the OCALLs is 'cdecl'. - * [dllimport]: - * indicats the OCALL is provided in DLLs. - * - * Note: memccpy() is provided by MS system DLL, we don't need to implement it in App side. - */ - - [cdecl, dllimport] void *memccpy([in, out, size=len] void *dest, [in, size=len] const void *src, int val, size_t len); - - /* - * [allow]: - * OCALL 'ocall_function_allow' can invoke ECALL 'ecall_function_private' in App side. - * - * Note: No ECALL can be called in OCALL w/o [allow]. - */ - - void ocall_function_allow(void) allow(ecall_function_private); - - }; - -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.cpp deleted file mode 100644 index 788cbf06d5..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Test Pointer Auttributes */ - -#include -#include - -#include "sgx_trts.h" -#include "../Enclave.h" -#include "Enclave_t.h" - -/* checksum_internal: - * get simple checksum of input buffer and length - */ -int32_t checksum_internal(char *buf, size_t count) -{ - register int32_t sum = 0; - int16_t *ptr = (int16_t *)buf; - - /* Main summing loop */ - while(count > 1) { - sum = sum + *ptr++; - count = count - 2; - } - - /* Add left-over byte, if any */ - if (count > 0) - sum = sum + *((char *)ptr); - - return ~sum; -} - -/* ecall_pointer_user_check, ecall_pointer_in, ecall_pointer_out, ecall_pointer_in_out: - * The root ECALLs to test [in], [out], [user_check] attributes. - */ -size_t ecall_pointer_user_check(void *val, size_t sz) -{ - /* check if the buffer is allocated outside */ - if (sgx_is_outside_enclave(val, sz) != 1) - abort(); - - char tmp[100] = {0}; - size_t len = sz>100?100:sz; - - /* copy the memory into the enclave to make sure 'val' - * is not being changed in checksum_internal() */ - memcpy(tmp, val, len); - - int32_t sum = checksum_internal((char *)tmp, len); - printf("Checksum(0x%p, %zu) = 0x%x\n", - val, len, (unsigned int)sum); - - /* modify outside memory directly */ - memcpy(val, "SGX_SUCCESS", len>12?12:len); - - return len; -} - -/* ecall_pointer_in: - * the buffer of val is copied to the enclave. - */ - -void ecall_pointer_in(int *val) -{ - if (sgx_is_within_enclave(val, sizeof(int)) != 1) - abort(); - *val = 1234; -} - -/* ecall_pointer_out: - * the buffer of val is copied to the untrusted side. - */ -void ecall_pointer_out(int *val) -{ - if (sgx_is_within_enclave(val, sizeof(int)) != 1) - abort(); - assert(*val == 0); - *val = 1234; -} - -/* ecall_pointer_in_out: - * the buffer of val is double-copied. - */ -void ecall_pointer_in_out(int *val) -{ - if (sgx_is_within_enclave(val, sizeof(int)) != 1) - abort(); - *val = 1234; -} - -/* ocall_pointer_attr: - * The root ECALL that test OCALL [in], [out], [user_check]. - */ -void ocall_pointer_attr(void) -{ - sgx_status_t ret = SGX_ERROR_UNEXPECTED; - - int val = 0; - ret = ocall_pointer_user_check(&val); - if (ret != SGX_SUCCESS) - abort(); - - val = 0; - ret = ocall_pointer_in(&val); - if (ret != SGX_SUCCESS) - abort(); - assert(val == 0); - - val = 0; - ret = ocall_pointer_out(&val); - if (ret != SGX_SUCCESS) - abort(); - assert(val == 1234); - - val = 0; - ret = ocall_pointer_in_out(&val); - if (ret != SGX_SUCCESS) - abort(); - assert(val == 1234); - - return; -} - -/* ecall_pointer_string: - * [string] defines a string. - */ -void ecall_pointer_string(char *str) -{ - strncpy(str, "0987654321", strlen(str)); -} - -/* ecall_pointer_string_const: - * const [string] defines a string that cannot be modified. - */ -void ecall_pointer_string_const(const char *str) -{ - char* temp = new char[strlen(str)]; - strncpy(temp, str, strlen(str)); - delete []temp; -} - -/* ecall_pointer_size: - * 'len' needs to be specified to tell Edger8r the length of 'str'. - */ -void ecall_pointer_size(void *ptr, size_t len) -{ - strncpy((char*)ptr, "0987654321", len); -} - -/* ecall_pointer_count: - * 'cnt' needs to be specified to tell Edger8r the number of elements in 'arr'. - */ -void ecall_pointer_count(int *arr, int cnt) -{ - for (int i = (cnt - 1); i >= 0; i--) - arr[i] = (cnt - 1 - i); -} - -/* ecall_pointer_isptr_readonly: - * 'buf' is user defined type, shall be tagged with [isptr]. - * if it's not writable, [readonly] shall be specified. - */ -void ecall_pointer_isptr_readonly(buffer_t buf, size_t len) -{ - strncpy((char*)buf, "0987654321", len); -} - -/* get_buffer_len: - * get the length of input buffer 'buf'. - */ -size_t get_buffer_len(const char* buf) -{ - (void)buf; - return 10*sizeof(int); -} - -/* ecall_pointer_sizefunc: - * call get_buffer_len to determin the length of 'buf'. - */ -void ecall_pointer_sizefunc(char *buf) -{ - int *tmp = (int*)buf; - for (int i = 0; i < 10; i++) { - assert(tmp[i] == 0); - tmp[i] = i; - } -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.edl b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.edl deleted file mode 100644 index 3719f445c2..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Pointers.edl +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Pointers.edl - Samples for pointer attributes. */ - -enclave { - - /* - * Following keywords/attributes are supported for pointers in Edger8r: - * in, out, user_check, - * string, wstring, - * const, size, count, sizefunc, isptr, readonly - */ - - trusted { - - /* - * [user_check]: - * the pointer won't be validated, and the buffer pointed by - * 'val' is not copied into the enclave either. But Enclave - * can modify the memory pointed by 'val'. - */ - - public size_t ecall_pointer_user_check([user_check] void *val, size_t sz); - - /* - * [in]: - * buffer with the same size will be allocated inside the enclave, - * content pointed by 'val' will be copied into the new allocated - * memory inside. Any changes performed inside the enclave will not - * affect the buffer outside. - */ - - public void ecall_pointer_in([in] int *val); - - /* - * [out]: - * buffer with the same size will be allocated inside the enclave, - * but the content pointed by 'val' won't be copied. But after return, - * the buffer inside the enclave will copied into outside 'val'. - */ - - public void ecall_pointer_out([out] int *val); - - /* - * [in, out]: - * buffer with the same size will be allocated inside the enclave, - * the content pointed by 'val' will be copied either. After return, - * the buffer inside the enclave will by copied into outside 'val' again. - */ - - public void ecall_pointer_in_out([in, out] int *val); - - /* - * [string]: - * the attribute tells Edger8r 'str' is NULL terminated string, so strlen - * will be used to count the length of buffer pointed by 'str'. - */ - - public void ecall_pointer_string([in, out, string] char *str); - - /* - * [const]: - * the attribute tells Edger8r the buffer pointed by 'str' cannot be modified, - * so users cannot decorate 'str' with [out] attribute anymore. - */ - - public void ecall_pointer_string_const([in, string] const char *str); - - /* - * [size]: - * the attribute tells Edger8r the length of buffer in byte pointed by 'ptr' - * (shall be copied or not). - * Note: Users shall not specify [size] on [string] parameters. - */ - - public void ecall_pointer_size([in, out, size=len] void *ptr, size_t len); - - /* - * [count]: - * the attribute tells Edger8r the number of integers to be copied from 'arr'. - */ - - public void ecall_pointer_count([in, out, count=cnt] int *arr, int cnt); - - /* - * [isptr]: - * tells Edger8r the user defined type is a pointer; - * [readonly]: - * forbids the buffer allocated inside the enclave to be copied back to App - * (cannot use with [out]). - */ - - public void ecall_pointer_isptr_readonly([in, isptr, readonly, size=len] buffer_t buf, size_t len); - - /* - * [sizefunc]: - * call a function to decide the size/length of the parameter; - * Note: - * User need to define and implement `get_buf_len' as: - * size_t get_buf_len(const char* buf); - */ - - public void ecall_pointer_sizefunc([sizefunc = get_buffer_len, in, out] char *buf); - - }; - - /* - * Users can define multiple trusted/untrusted blocks, - * edger8r will merged them into one trusted/untrusted block. - */ - trusted { - /* - * Test pointer attributes in OCALLs - */ - - public void ocall_pointer_attr(void); - - }; - - untrusted { - - /* - * [user_check]: - * the pointer won't be valified, and the buffer pointed by 'val' is not - * copied to outside buffer either. Besides 'App' cannot modify the memory - * pointer by 'val'. - */ - - void ocall_pointer_user_check([user_check] int *val); - - /* - * [in]: - * buffer with the same size will be allocated in 'App' side, the content - * pointed by 'val' will be copied into the new allocated memory outside. - * Any changes performed by 'App' will not affect the buffer pointed by 'val'. - */ - - void ocall_pointer_in([in] int *val); - - /* - * [out]: - * buffer with the same size will be allocated in 'App' side, the content - * pointed by 'val' won't be copied. But after return, the buffer outside - * will be copied into the enclave. - */ - - void ocall_pointer_out([out] int *val); - - /* - * [in, out]: - * buffer with the same size will be allocated in 'App' side, the content - * pointed by 'val' will be copied either. After return, the buffer outside - * will copied into the enclave. - */ - - void ocall_pointer_in_out([in, out] int *val); - - }; - -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Types.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Types.cpp deleted file mode 100644 index ea4cca3958..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Types.cpp +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Test Basic Types */ - -#include "sgx_trts.h" -#include "../Enclave.h" -#include "Enclave_t.h" -#include -#include - -/* used to eliminate `unused variable' warning */ -#define UNUSED(val) (void)(val) - -#define ULP 2 - -/* used to compare double variables in order to avoid compile warnings */ -bool almost_equal(double x, double y) -{ - /* the machine epsilon has to be scaled to the magnitude of the larger value - and multiplied by the desired precision in ULPs (units in the last place) */ - return std::abs(x-y) <= std::numeric_limits::epsilon() * std::abs(x+y) * ULP; -} - -/* used to compare double variables in order to avoid compile warnings */ -bool almost_equal(float x, float y) -{ - /* the machine epsilon has to be scaled to the magnitude of the larger value - and multiplied by the desired precision in ULPs (units in the last place) */ - return std::abs(x-y) <= std::numeric_limits::epsilon() * std::abs(x+y) * ULP; -} - -/* ecall_type_char: - * [char] value passed by App. - */ -void ecall_type_char(char val) -{ - assert(val == 0x12); -#ifndef DEBUG - UNUSED(val); -#endif -} - -/* ecall_type_int: - * [int] value passed by App. - */ -void ecall_type_int(int val) -{ - assert(val == 1234); -#ifndef DEBUG - UNUSED(val); -#endif -} - -/* ecall_type_float: - * [float] value passed by App. - */ -void ecall_type_float(float val) -{ - assert(almost_equal(val, (float)1234.0)); -#ifndef DEBUG - UNUSED(val); -#endif -} - -/* ecall_type_double: - * [double] value passed by App. - */ -void ecall_type_double(double val) -{ - assert(almost_equal(val, (double)1234.5678)); -#ifndef DEBUG - UNUSED(val); -#endif -} - -/* ecall_type_size_t: - * [size_t] value passed by App. - */ -void ecall_type_size_t(size_t val) -{ - assert(val == (size_t)12345678); -#ifndef DEBUG - UNUSED(val); -#endif -} - -/* ecall_type_wchar_t: - * [wchar_t] value passed by App. - */ -void ecall_type_wchar_t(wchar_t val) -{ - assert(val == (wchar_t)0x1234); -#ifndef DEBUG - UNUSED(val); -#endif -} - -/* ecall_type_struct: - * struct_foo_t is defined in EDL and can be used in ECALL. - */ -void ecall_type_struct(struct struct_foo_t val) -{ - assert(val.struct_foo_0 == 1234); - assert(val.struct_foo_1 == 5678); -#ifndef DEBUG - UNUSED(val); -#endif -} - -/* - * ecall_type_enum_union: - * enum_foo_t/union_foo_t is defined in EDL - * and can be used in ECALL. - */ -void ecall_type_enum_union(enum enum_foo_t val1, union union_foo_t *val2) -{ - if (sgx_is_outside_enclave(val2, sizeof(union union_foo_t)) != 1) - abort(); - val2->union_foo_0 = 1; - val2->union_foo_1 = 2; /* overwrite union_foo_0 */ - assert(val1 == ENUM_FOO_0); -#ifndef DEBUG - UNUSED(val1); -#endif -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Types.edl b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Types.edl deleted file mode 100644 index 736dd19727..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Edger8rSyntax/Types.edl +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* Types.edl - Samples for basic types. */ - -enclave { - - /* - * Following types can be supported in Edger8r: - * char, short, int, float, double, void, - * int8_t, int16_t, int32_t, int64_t, - * size_t, wchar_t, - * uint8_t, uint16_t, uint32_t, uint64_t, - * unsigned, struct, enum, union. - */ - - /* - * We will demo few types in ECALL functions, data - * types in OCALL functions can be handled either. - */ - - /* structure definition */ - struct struct_foo_t { - /* Basic types can be used in structure. */ - uint32_t struct_foo_0; - uint64_t struct_foo_1; - }; - - /* enum definition */ - enum enum_foo_t { - ENUM_FOO_0 = 0, - ENUM_FOO_1 = 1 - }; - - /* union definition */ - union union_foo_t { - uint32_t union_foo_0; - uint32_t union_foo_1; - uint64_t union_foo_3; - }; - - trusted { - - public void ecall_type_char(char val); - public void ecall_type_int(int val); - - public void ecall_type_float(float val); - public void ecall_type_double(double val); - - public void ecall_type_size_t(size_t val); - public void ecall_type_wchar_t(wchar_t val); - - public void ecall_type_struct(struct struct_foo_t val); - public void ecall_type_enum_union(enum enum_foo_t val1, [user_check] union union_foo_t *val2); - - /* for using user defined types, please refer to Pointers.edl, Arrays.edl. */ - }; - -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.config.xml b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.config.xml deleted file mode 100644 index e94c9bc50a..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - 0 - 0 - 0x40000 - 0x100000 - 10 - 1 - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.cpp deleted file mode 100644 index e1df4dc2d6..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include /* vsnprintf */ - -#include "Enclave.h" -#include "Enclave_t.h" /* print_string */ - -/* - * printf: - * Invokes OCALL to display the enclave buffer to the terminal. - */ -void printf(const char *fmt, ...) -{ - char buf[BUFSIZ] = {'\0'}; - va_list ap; - va_start(ap, fmt); - vsnprintf(buf, BUFSIZ, fmt, ap); - va_end(ap); - ocall_print_string(buf); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.edl b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.edl deleted file mode 100644 index 6318f66165..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.edl +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* Enclave.edl - Top EDL file. */ - -enclave { - - include "user_types.h" /* buffer_t */ - - /* Import ECALL/OCALL from sub-directory EDLs. - * [from]: specifies the location of EDL file. - * [import]: specifies the functions to import, - * [*]: implies to import all functions. - */ - - from "Edger8rSyntax/Types.edl" import *; - from "Edger8rSyntax/Pointers.edl" import *; - from "Edger8rSyntax/Arrays.edl" import *; - from "Edger8rSyntax/Functions.edl" import *; - - from "TrustedLibrary/Libc.edl" import *; - from "TrustedLibrary/Libcxx.edl" import ecall_exception, ecall_map; - from "TrustedLibrary/Thread.edl" import *; - - /* - * ocall_print_string - invokes OCALL to display string buffer inside the enclave. - * [in]: copy the string buffer to App outside. - * [string]: specifies 'str' is a NULL terminated buffer. - */ - untrusted { - void ocall_print_string([in, string] const char *str); - }; - -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.h b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.h deleted file mode 100644 index b38a5c1db3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _ENCLAVE_H_ -#define _ENCLAVE_H_ - -#include -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -void printf(const char *fmt, ...); - -#if defined(__cplusplus) -} -#endif - -#endif /* !_ENCLAVE_H_ */ diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.lds b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.lds deleted file mode 100644 index f5f35d5b7c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave.lds +++ /dev/null @@ -1,10 +0,0 @@ -enclave.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - g_peak_heap_used; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave_private.pem b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave_private.pem deleted file mode 100644 index 529d07be35..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/Enclave_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG4gIBAAKCAYEAroOogvsj/fZDZY8XFdkl6dJmky0lRvnWMmpeH41Bla6U1qLZ -AmZuyIF+mQC/cgojIsrBMzBxb1kKqzATF4+XwPwgKz7fmiddmHyYz2WDJfAjIveJ -ZjdMjM4+EytGlkkJ52T8V8ds0/L2qKexJ+NBLxkeQLfV8n1mIk7zX7jguwbCG1Pr -nEMdJ3Sew20vnje+RsngAzdPChoJpVsWi/K7cettX/tbnre1DL02GXc5qJoQYk7b -3zkmhz31TgFrd9VVtmUGyFXAysuSAb3EN+5VnHGr0xKkeg8utErea2FNtNIgua8H -ONfm9Eiyaav1SVKzPHlyqLtcdxH3I8Wg7yqMsaprZ1n5A1v/levxnL8+It02KseD -5HqV4rf/cImSlCt3lpRg8U5E1pyFQ2IVEC/XTDMiI3c+AR+w2jSRB3Bwn9zJtFlW -KHG3m1xGI4ck+Lci1JvWWLXQagQSPtZTsubxTQNx1gsgZhgv1JHVZMdbVlAbbRMC -1nSuJNl7KPAS/VfzAgEDAoIBgHRXxaynbVP5gkO0ug6Qw/E27wzIw4SmjsxG6Wpe -K7kfDeRskKxESdsA/xCrKkwGwhcx1iIgS5+Qscd1Yg+1D9X9asd/P7waPmWoZd+Z -AhlKwhdPsO7PiF3e1AzHhGQwsUTt/Y/aSI1MpHBvy2/s1h9mFCslOUxTmWw0oj/Q -ldIEgWeNR72CE2+jFIJIyml6ftnb6qzPiga8Bm48ubKh0kvySOqnkmnPzgh+JBD6 -JnBmtZbfPT97bwTT+N6rnPqOOApvfHPf15kWI8yDbprG1l4OCUaIUH1AszxLd826 -5IPM+8gINLRDP1MA6azECPjTyHXhtnSIBZCyWSVkc05vYmNXYUNiXWMajcxW9M02 -wKzFELO8NCEAkaTPxwo4SCyIjUxiK1LbQ9h8PSy4c1+gGP4LAMR8xqP4QKg6zdu9 -osUGG/xRe/uufgTBFkcjqBHtK5L5VI0jeNIUAgW/6iNbYXjBMJ0GfauLs+g1VsOm -WfdgXzsb9DYdMa0OXXHypmV4GwKBwQDUwQj8RKJ6c8cT4vcWCoJvJF00+RFL+P3i -Gx2DLERxRrDa8AVGfqaCjsR+3vLgG8V/py+z+dxZYSqeB80Qeo6PDITcRKoeAYh9 -xlT3LJOS+k1cJcEmlbbO2IjLkTmzSwa80fWexKu8/Xv6vv15gpqYl1ngYoqJM3pd -vzmTIOi7MKSZ0WmEQavrZj8zK4endE3v0eAEeQ55j1GImbypSf7Idh7wOXtjZ7WD -Dg6yWDrri+AP/L3gClMj8wsAxMV4ZR8CgcEA0fzDHkFa6raVOxWnObmRoDhAtE0a -cjUj976NM5yyfdf2MrKy4/RhdTiPZ6b08/lBC/+xRfV3xKVGzacm6QjqjZrUpgHC -0LKiZaMtccCJjLtPwQd0jGQEnKfMFaPsnhOc5y8qVkCzVOSthY5qhz0XNotHHFmJ -gffVgB0iqrMTvSL7IA2yqqpOqNRlhaYhNl8TiFP3gIeMtVa9rZy31JPgT2uJ+kfo -gV7sdTPEjPWZd7OshGxWpT6QfVDj/T9T7L6tAoHBAI3WBf2DFvxNL2KXT2QHAZ9t -k3imC4f7U+wSE6zILaDZyzygA4RUbwG0gv8/TJVn2P/Eynf76DuWHGlaiLWnCbSz -Az2DHBQBBaku409zDQym3j1ugMRjzzSQWzJg0SIyBH3hTmnYcn3+Uqcp/lEBvGW6 -O+rsXFt3pukqJmIV8HzLGGaLm62BHUeZf3dyWm+i3p/hQAL7Xvu04QW70xuGqdr5 -afV7p5eaeQIJXyGQJ0eylV/90+qxjMKiB1XYg6WYvwKBwQCL/ddpgOdHJGN8uRom -e7Zq0Csi3hGheMKlKbN3vcxT5U7MdyHtTZZOJbTvxKNNUNYH/8uD+PqDGNneb29G -BfGzvI3EASyLIcGZF3OhKwZd0jUrWk2y7Vhob91jwp2+t73vdMbkKyI4mHOuXvGv -fg95si9oO7EBT+Oqvhccd2J+F1IVXncccYnF4u5ZGWt5lLewN/pVr7MjjykeaHqN -t+rfnQam2psA6fL4zS2zTmZPzR2tnY8Y1GBTi0Ko1OKd1HMCgcAb5cB/7/AQlhP9 -yQa04PLH9ygQkKKptZp7dy5WcWRx0K/hAHRoi2aw1wZqfm7VBNu2SLcs90kCCCxp -6C5sfJi6b8NpNbIPC+sc9wsFr7pGo9SFzQ78UlcWYK2Gu2FxlMjonhka5hvo4zvg -WxlpXKEkaFt3gLd92m/dMqBrHfafH7VwOJY2zT3WIpjwuk0ZzmRg5p0pG/svVQEH -NZmwRwlopysbR69B/n1nefJ84UO50fLh5s5Zr3gBRwbWNZyzhXk= ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libc.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libc.cpp deleted file mode 100644 index 952c21908f..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libc.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include "sgx_cpuid.h" - -#include "sgx_trts.h" -#include "../Enclave.h" -#include "Enclave_t.h" - -/* ecall_malloc_free: - * Uses malloc/free to allocate/free trusted memory. - */ -void ecall_malloc_free(void) -{ - void *ptr = malloc(100); - assert(ptr != NULL); - memset(ptr, 0x0, 100); - free(ptr); -} - -/* ecall_sgx_cpuid: - * Uses sgx_cpuid to get CPU features and types. - */ -void ecall_sgx_cpuid(int cpuinfo[4], int leaf) -{ - sgx_status_t ret = sgx_cpuid(cpuinfo, leaf); - if (ret != SGX_SUCCESS) - abort(); -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libc.edl b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libc.edl deleted file mode 100644 index eff2f53ae5..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libc.edl +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Libc.edl - EDL sample for trusted C library. */ - -enclave { - - from "sgx_tstdc.edl" import sgx_oc_cpuidex; - - /* - * A subset of the C99 standard is supported as well as SGX customized functions: - * sgx_cpuid, etc. - */ - - trusted { - /* - * Utilize malloc/free in enclave. - */ - public void ecall_malloc_free(void); - - /* - * Utilize SGX version __cpuid() in enclave. - */ - public void ecall_sgx_cpuid([out] int cpuinfo[4], int leaf); - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libcxx.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libcxx.cpp deleted file mode 100644 index 223e9453d4..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libcxx.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include -#include - -#include "../Enclave.h" -#include "Enclave_t.h" - -/* - * ecall_exception: - * throw/catch C++ exception inside the enclave. - */ - -void ecall_exception(void) -{ - std::string foo = "foo"; - try { - throw std::runtime_error(foo); - } - catch (std::runtime_error const& e) { - assert( foo == e.what() ); - std::runtime_error clone(""); - clone = e; - assert(foo == clone.what() ); - } - catch (...) { - assert( false ); - } -} - -#include -#include - -using namespace std; - -/* - * ecall_map: - * Utilize STL in the enclave. - */ -void ecall_map(void) -{ - typedef map > map_t; - typedef map_t::value_type map_value; - map_t m; - - m.insert(map_value('a', 1)); - m.insert(map_value('b', 2)); - m.insert(map_value('c', 3)); - m.insert(map_value('d', 4)); - - assert(m['a'] == 1); - assert(m['b'] == 2); - assert(m['c'] == 3); - assert(m['d'] == 4); - - assert(m.find('e') == m.end()); - - return; -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libcxx.edl b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libcxx.edl deleted file mode 100644 index f6eb7ee7cc..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Libcxx.edl +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Libcxx.edl - EDL sample for trusted C++ library. */ - -enclave { - - /* - * A subset of the C++03 standard is supported. - */ - - trusted { - /* - * Throw/catch exception inside the enclave. - */ - public void ecall_exception(void); - - /* - * Utilize inside the enclave. - */ - public void ecall_map(void); - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Thread.cpp b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Thread.cpp deleted file mode 100644 index ea40e338e6..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Thread.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "../Enclave.h" -#include "Enclave_t.h" - -#include "sgx_thread.h" - -static size_t global_counter = 0; -static sgx_thread_mutex_t global_mutex = SGX_THREAD_MUTEX_INITIALIZER; - -#define BUFFER_SIZE 50 - -typedef struct { - int buf[BUFFER_SIZE]; - int occupied; - int nextin; - int nextout; - sgx_thread_mutex_t mutex; - sgx_thread_cond_t more; - sgx_thread_cond_t less; -} cond_buffer_t; - -static cond_buffer_t buffer = {{0, 0, 0, 0, 0, 0}, 0, 0, 0, - SGX_THREAD_MUTEX_INITIALIZER, SGX_THREAD_COND_INITIALIZER, SGX_THREAD_COND_INITIALIZER}; - -/* - * ecall_increase_counter: - * Utilize thread APIs inside the enclave. - */ -size_t ecall_increase_counter(void) -{ - size_t ret = 0; - for (int i = 0; i < LOOPS_PER_THREAD; i++) { - sgx_thread_mutex_lock(&global_mutex); - /* mutually exclusive adding */ - size_t tmp = global_counter; - global_counter = ++tmp; - if (4*LOOPS_PER_THREAD == global_counter) - ret = global_counter; - sgx_thread_mutex_unlock(&global_mutex); - } - return ret; -} - -void ecall_producer(void) -{ - for (int i = 0; i < 4*LOOPS_PER_THREAD; i++) { - cond_buffer_t *b = &buffer; - sgx_thread_mutex_lock(&b->mutex); - while (b->occupied >= BUFFER_SIZE) - sgx_thread_cond_wait(&b->less, &b->mutex); - b->buf[b->nextin] = b->nextin; - b->nextin++; - b->nextin %= BUFFER_SIZE; - b->occupied++; - sgx_thread_cond_signal(&b->more); - sgx_thread_mutex_unlock(&b->mutex); - } -} - -void ecall_consumer(void) -{ - for (int i = 0; i < LOOPS_PER_THREAD; i++) { - cond_buffer_t *b = &buffer; - sgx_thread_mutex_lock(&b->mutex); - while(b->occupied <= 0) - sgx_thread_cond_wait(&b->more, &b->mutex); - b->buf[b->nextout++] = 0; - b->nextout %= BUFFER_SIZE; - b->occupied--; - sgx_thread_cond_signal(&b->less); - sgx_thread_mutex_unlock(&b->mutex); - } -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Thread.edl b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Thread.edl deleted file mode 100644 index f9ec4d29e9..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/TrustedLibrary/Thread.edl +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* Thread.edl - EDL sample for trusted thread library. */ - -enclave { - - from "sgx_tstdc.edl" import sgx_thread_wait_untrusted_event_ocall, sgx_thread_set_untrusted_event_ocall, sgx_thread_setwait_untrusted_events_ocall, sgx_thread_set_multiple_untrusted_events_ocall; - - trusted { - /* - * Use SGX mutex. - */ - public size_t ecall_increase_counter(); - - /* - * Use SGX condition variables. - */ - public void ecall_producer(); - public void ecall_consumer(); - - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.01.xml b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.01.xml deleted file mode 100644 index ca652963fc..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.01.xml +++ /dev/null @@ -1,28 +0,0 @@ - - 0 - 0 - - - - - 10 - 10 - 10 - - 1 - - - 0x40000 - - - - 0x100000 - 0x100000 - 0x100000 - - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.02.xml b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.02.xml deleted file mode 100644 index 126eac07b5..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.02.xml +++ /dev/null @@ -1,25 +0,0 @@ - - 0 - 0 - 0x40000 - - - 0x100000 - 0x40000 - 0x1000 - - 10 - 10 - 10 - 1 - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.03.xml b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.03.xml deleted file mode 100644 index ef642799b2..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.03.xml +++ /dev/null @@ -1,27 +0,0 @@ - - 0 - 0 - - - 10 - 3 - 1 - - - - 0x40000 - 0x40000 - - - - 0x100000 - - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.04.xml b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.04.xml deleted file mode 100644 index a72d611b57..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Enclave/config.04.xml +++ /dev/null @@ -1,23 +0,0 @@ - - 0 - 0 - - 10 - 3 - 1 - - - - 0x40000 - 0x2000 - - 0x100000 - - - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Include/user_types.h b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Include/user_types.h deleted file mode 100644 index 4d3a4a99e2..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Include/user_types.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* User defined types */ - - -#define LOOPS_PER_THREAD 500 - -typedef void *buffer_t; -typedef int array_t[10]; - diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Makefile b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Makefile deleted file mode 100644 index e44755fb6c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/Makefile +++ /dev/null @@ -1,249 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -######## SGX SDK Settings ######## - -SGX_SDK ?= /opt/intel/sgxsdk -SGX_MODE ?= HW -SGX_ARCH ?= x64 -SGX_DEBUG ?= 1 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -ifneq ($(SGX_MODE), HW) - Urts_Library_Name := sgx_urts_sim -else - Urts_Library_Name := sgx_urts -endif - -App_Cpp_Files := App/App.cpp $(wildcard App/Edger8rSyntax/*.cpp) $(wildcard App/TrustedLibrary/*.cpp) -App_Include_Paths := -IInclude -IApp -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 -App_Link_Flags := $(SGX_COMMON_CFLAGS) -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) -lpthread - -ifneq ($(SGX_MODE), HW) - App_Link_Flags += -lsgx_uae_service_sim -else - App_Link_Flags += -lsgx_uae_service -endif - -App_Cpp_Objects := $(App_Cpp_Files:.cpp=.o) - -App_Name := app - -######## Enclave Settings ######## - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif -Crypto_Library_Name := sgx_tcrypto - -Enclave_Cpp_Files := Enclave/Enclave.cpp $(wildcard Enclave/Edger8rSyntax/*.cpp) $(wildcard Enclave/TrustedLibrary/*.cpp) -Enclave_Include_Paths := -IInclude -IEnclave -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx - -CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9") -ifeq ($(CC_BELOW_4_9), 1) - Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector -else - Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector-strong -endif - -Enclave_C_Flags += $(Enclave_Include_Paths) -Enclave_Cpp_Flags := $(Enclave_C_Flags) -std=c++11 -nostdinc++ - -# To generate a proper enclave, it is recommended to follow below guideline to link the trusted libraries: -# 1. Link sgx_trts with the `--whole-archive' and `--no-whole-archive' options, -# so that the whole content of trts is included in the enclave. -# 2. For other libraries, you just need to pull the required symbols. -# Use `--start-group' and `--end-group' to link these libraries. -# Do NOT move the libraries linked with `--start-group' and `--end-group' within `--whole-archive' and `--no-whole-archive' options. -# Otherwise, you may get some undesirable errors. -Enclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 -Wl,--gc-sections \ - -Wl,--version-script=Enclave/Enclave.lds - -Enclave_Cpp_Objects := $(Enclave_Cpp_Files:.cpp=.o) - -Enclave_Name := enclave.so -Signed_Enclave_Name := enclave.signed.so -Enclave_Config_File := Enclave/Enclave.config.xml - -ifeq ($(SGX_MODE), HW) -ifeq ($(SGX_DEBUG), 1) - Build_Mode = HW_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = HW_PRERELEASE -else - Build_Mode = HW_RELEASE -endif -else -ifeq ($(SGX_DEBUG), 1) - Build_Mode = SIM_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = SIM_PRERELEASE -else - Build_Mode = SIM_RELEASE -endif -endif - - -.PHONY: all run - -ifeq ($(Build_Mode), HW_RELEASE) -all: .config_$(Build_Mode)_$(SGX_ARCH) $(App_Name) $(Enclave_Name) - @echo "The project has been built in release hardware mode." - @echo "Please sign the $(Enclave_Name) first with your signing key before you run the $(App_Name) to launch and access the enclave." - @echo "To sign the enclave use the command:" - @echo " $(SGX_ENCLAVE_SIGNER) sign -key -enclave $(Enclave_Name) -out <$(Signed_Enclave_Name)> -config $(Enclave_Config_File)" - @echo "You can also sign the enclave using an external signing tool." - @echo "To build the project in simulation mode set SGX_MODE=SIM. To build the project in prerelease mode set SGX_PRERELEASE=1 and SGX_MODE=HW." -else -all: .config_$(Build_Mode)_$(SGX_ARCH) $(App_Name) $(Signed_Enclave_Name) -ifeq ($(Build_Mode), HW_DEBUG) - @echo "The project has been built in debug hardware mode." -else ifeq ($(Build_Mode), SIM_DEBUG) - @echo "The project has been built in debug simulation mode." -else ifeq ($(Build_Mode), HW_PRERELEASE) - @echo "The project has been built in pre-release hardware mode." -else ifeq ($(Build_Mode), SIM_PRERELEASE) - @echo "The project has been built in pre-release simulation mode." -else - @echo "The project has been built in release simulation mode." -endif -endif - -run: all -ifneq ($(Build_Mode), HW_RELEASE) - @$(CURDIR)/$(App_Name) - @echo "RUN => $(App_Name) [$(SGX_MODE)|$(SGX_ARCH), OK]" -endif - -######## App Objects ######## - -App/Enclave_u.c: $(SGX_EDGER8R) Enclave/Enclave.edl - @cd App && $(SGX_EDGER8R) --untrusted ../Enclave/Enclave.edl --search-path ../Enclave --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -App/Enclave_u.o: App/Enclave_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -App/%.o: App/%.cpp - @$(CXX) $(App_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(App_Name): App/Enclave_u.o $(App_Cpp_Objects) - @$(CXX) $^ -o $@ $(App_Link_Flags) - @echo "LINK => $@" - -.config_$(Build_Mode)_$(SGX_ARCH): - @rm -f .config_* $(App_Name) $(Enclave_Name) $(Signed_Enclave_Name) $(App_Cpp_Objects) App/Enclave_u.* $(Enclave_Cpp_Objects) Enclave/Enclave_t.* - @touch .config_$(Build_Mode)_$(SGX_ARCH) - -######## Enclave Objects ######## - -Enclave/Enclave_t.c: $(SGX_EDGER8R) Enclave/Enclave.edl - @cd Enclave && $(SGX_EDGER8R) --trusted ../Enclave/Enclave.edl --search-path ../Enclave --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -Enclave/Enclave_t.o: Enclave/Enclave_t.c - @$(CC) $(Enclave_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -Enclave/%.o: Enclave/%.cpp - @$(CXX) $(Enclave_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(Enclave_Name): Enclave/Enclave_t.o $(Enclave_Cpp_Objects) - @$(CXX) $^ -o $@ $(Enclave_Link_Flags) - @echo "LINK => $@" - -$(Signed_Enclave_Name): $(Enclave_Name) - @$(SGX_ENCLAVE_SIGNER) sign -key Enclave/Enclave_private.pem -enclave $(Enclave_Name) -out $@ -config $(Enclave_Config_File) - @echo "SIGN => $@" - -.PHONY: clean - -clean: - @rm -f .config_* $(App_Name) $(Enclave_Name) $(Signed_Enclave_Name) $(App_Cpp_Objects) App/Enclave_u.* $(Enclave_Cpp_Objects) Enclave/Enclave_t.* diff --git a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/README.txt b/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/README.txt deleted file mode 100644 index 055a950c0c..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SampleEnclave/README.txt +++ /dev/null @@ -1,69 +0,0 @@ ------------------------- -Purpose of SampleEnclave ------------------------- -The project demonstrates several fundamental usages of Intel(R) Software Guard -Extensions (Intel(R) SGX) SDK: -- Initializing and destroying an enclave -- Creating ECALLs or OCALLs -- Calling trusted libraries inside the enclave - ------------------------------------- -How to Build/Execute the Sample Code ------------------------------------- -1. Install Intel(R) SGX SDK for Linux* OS -2. Make sure your environment is set: - $ source ${sgx-sdk-install-path}/environment -3. Build the project with the prepared Makefile: - a. Hardware Mode, Debug build: - $ make - b. Hardware Mode, Pre-release build: - $ make SGX_PRERELEASE=1 SGX_DEBUG=0 - c. Hardware Mode, Release build: - $ make SGX_DEBUG=0 - d. Simulation Mode, Debug build: - $ make SGX_MODE=SIM - e. Simulation Mode, Pre-release build: - $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0 - f. Simulation Mode, Release build: - $ make SGX_MODE=SIM SGX_DEBUG=0 -4. Execute the binary directly: - $ ./app -5. Remember to "make clean" before switching build mode - ------------------------------------------- -Explanation about Configuration Parameters ------------------------------------------- -TCSMaxNum, TCSNum, TCSMinPool - - These three parameters will determine whether a thread will be created - dynamically when there is no available thread to do the work. - - -StackMaxSize, StackMinSize - - For a dynamically created thread, StackMinSize is the amount of stack available - once the thread is created and StackMaxSize is the total amount of stack that - thread can use. The gap between StackMinSize and StackMaxSize is the stack - dynamically expanded as necessary at runtime. - - For a static thread, only StackMaxSize is relevant which specifies the total - amount of stack available to the thread. - - -HeapMaxSize, HeapInitSize, HeapMinSize - - HeapMinSize is the amount of heap available once the enclave is initialized. - - HeapMaxSize is the total amount of heap an enclave can use. The gap between - HeapMinSize and HeapMaxSize is the heap dynamically expanded as necessary - at runtime. - - HeapInitSize is here for compatibility. - -------------------------------------------------- -Sample configuration files for the Sample Enclave -------------------------------------------------- -config.01.xml: There is no dynamic thread, no dynamic heap expansion. -config.02.xml: There is no dynamic thread. But dynamic heap expansion can happen. -config.03.xml: There are dynamic threads. For a dynamic thread, there's no stack expansion. -config.04.xml: There are dynamic threads. For a dynamic thread, stack will expanded as necessary. diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/.cproject b/sgx-jvm/linux-sgx/SampleCode/SealedData/.cproject deleted file mode 100644 index 16ae3171e6..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/.cproject +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/.project b/sgx-jvm/linux-sgx/SampleCode/SealedData/.project deleted file mode 100644 index b04a0ddcc2..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - SealedData - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.core.ccnature - com.intel.sgx.sgxnature - - diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/.settings/language.settings.xml b/sgx-jvm/linux-sgx/SampleCode/SealedData/.settings/language.settings.xml deleted file mode 100644 index bb1f9221e3..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/.settings/language.settings.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_app/DRM_app.cpp b/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_app/DRM_app.cpp deleted file mode 100644 index 0baa771da2..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_app/DRM_app.cpp +++ /dev/null @@ -1,307 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include "ReplayProtectedDRM.h" -#include "TimeBasedDRM.h" -#include -using namespace std; - - -#include -#include -#define memcpy_s(dst,dst_size,src,max_count) memcpy(dst,src,max_count) -#define Sleep(n) usleep((n)*1000) - -uint32_t test_replay_protected_drm_operation() -{ - cout<=REPLAY_PROTECTED_PAY_LOAD_MAX_RELEASE_VERSION) - { - cout<<"\tExpected failure."< -#include "sgx.h" -#include "sgx_urts.h" -#include "sgx_uae_service.h" -#include "DRM_enclave_u.h" -#include "ReplayProtectedDRM.h" -#include "sgx_tseal.h" - -using namespace std; - -#define ENCLAVE_NAME "DRM_enclave.signed.so" - - -ReplayProtectedDRM::ReplayProtectedDRM(): enclave_id(0) -{ - int updated = 0; - sgx_status_t sgx_ret = SGX_ERROR_UNEXPECTED; - sgx_ret = sgx_create_enclave(ENCLAVE_NAME, SGX_DEBUG_FLAG, - &launch_token, &updated, &enclave_id, NULL); - if (sgx_ret) - { - cerr<<"cannot create enclave, error code = 0x"<< hex<< sgx_ret < -using namespace std; - -#define ENCLAVE_NAME "DRM_enclave.signed.so" - -TimeBasedDRM::TimeBasedDRM(void): enclave_id(0) -{ - int updated = 0; - sgx_status_t sgx_ret = SGX_ERROR_UNEXPECTED; - sgx_ret = sgx_create_enclave(ENCLAVE_NAME, SGX_DEBUG_FLAG, - &launch_token, &updated, &enclave_id, NULL); - if (sgx_ret) - { - cerr<<"cannot create enclave, error code = 0x"<< hex<< sgx_ret < - 0 - 0 - 0x4000 - 0x10000 - 1 - 1 - 0 - 0 - 0xFFFFFFFF - diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.cpp b/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.cpp deleted file mode 100644 index 042f1cde30..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.cpp +++ /dev/null @@ -1,598 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include "DRM_enclave_t.h" - -#include "sgx_trts.h" -#include "sgx_tseal.h" -#include "sgx_tae_service.h" -#include "string.h" -#include "../include/sealed_data_defines.h" - -#define REPLAY_PROTECTED_SECRET_SIZE 32 -typedef struct _activity_log -{ - uint32_t release_version; - uint32_t max_release_version; -}activity_log; - -typedef struct _replay_protected_pay_load -{ - sgx_mc_uuid_t mc; - uint32_t mc_value; - uint8_t secret[REPLAY_PROTECTED_SECRET_SIZE]; - activity_log log; -}replay_protected_pay_load; - - - - -static uint32_t verify_mc(replay_protected_pay_load* data2verify) -{ - uint32_t ret = 0; - uint32_t mc_value; - ret = sgx_read_monotonic_counter(&data2verify->mc,&mc_value); - if(ret != SGX_SUCCESS) - { - switch(ret) - { - case SGX_ERROR_SERVICE_UNAVAILABLE: - /* Architecture Enclave Service Manager is not installed or not - working properly.*/ - break; - case SGX_ERROR_SERVICE_TIMEOUT: - /* retry the operation later*/ - break; - case SGX_ERROR_BUSY: - /* retry the operation later*/ - break; - case SGX_ERROR_MC_NOT_FOUND: - /* the the Monotonic Counter ID is invalid.*/ - break; - default: - /*other errors*/ - break; - } - } - else if(mc_value!=data2verify->mc_value) - { - ret = REPLAY_DETECTED; - } - return ret; -} - -static uint32_t verify_sealed_data( - const sgx_sealed_data_t* data2unseal, - replay_protected_pay_load* data_unsealed) -{ - uint32_t ret = 0; - replay_protected_pay_load temp_unseal; - uint32_t unseal_length = sizeof(replay_protected_pay_load); - - ret = sgx_unseal_data(data2unseal, NULL, 0, - (uint8_t*)&temp_unseal, &unseal_length); - if(ret != SGX_SUCCESS) - { - switch(ret) - { - case SGX_ERROR_MAC_MISMATCH: - /* MAC of the sealed data is incorrect. - The sealed data has been tampered.*/ - break; - case SGX_ERROR_INVALID_ATTRIBUTE: - /*Indicates attribute field of the sealed data is incorrect.*/ - break; - case SGX_ERROR_INVALID_ISVSVN: - /* Indicates isv_svn field of the sealed data is greater than - the enclave's ISVSVN. This is a downgraded enclave.*/ - break; - case SGX_ERROR_INVALID_CPUSVN: - /* Indicates cpu_svn field of the sealed data is greater than - the platform's cpu_svn. enclave is on a downgraded platform.*/ - break; - case SGX_ERROR_INVALID_KEYNAME: - /*Indicates key_name field of the sealed data is incorrect.*/ - break; - default: - /*other errors*/ - break; - } - return ret; - } - ret = verify_mc(&temp_unseal); - if (ret == SGX_SUCCESS) - memcpy(data_unsealed,&temp_unseal,sizeof(replay_protected_pay_load)); - /* remember to clear secret data after been used by memset_s */ - memset_s(&temp_unseal, sizeof(replay_protected_pay_load), 0, - sizeof(replay_protected_pay_load)); - return ret; -} - - - - - -uint32_t create_sealed_policy(uint8_t* sealed_log, uint32_t sealed_log_size ) -{ - uint32_t ret = 0; - int busy_retry_times = 2; - replay_protected_pay_load data2seal; - memset(&data2seal, 0, sizeof(data2seal)); - uint32_t size = sgx_calc_sealed_data_size(0, - sizeof(replay_protected_pay_load)); - if(sealed_log_size != size) - return SGX_ERROR_INVALID_PARAMETER; - do{ - ret = sgx_create_pse_session(); - }while (ret == SGX_ERROR_BUSY && busy_retry_times--); - if (ret != SGX_SUCCESS) - return ret; - do - { - ret = sgx_create_monotonic_counter(&data2seal.mc,&data2seal.mc_value); - if(ret != SGX_SUCCESS) - { - switch(ret) - { - case SGX_ERROR_SERVICE_UNAVAILABLE: - /* Architecture Enclave Service Manager is not installed or not - working properly.*/ - break; - case SGX_ERROR_SERVICE_TIMEOUT: - /* retry the operation later*/ - break; - case SGX_ERROR_BUSY: - /* retry the operation later*/ - break; - case SGX_ERROR_MC_OVER_QUOTA: - /* SGX Platform Service enforces a quota scheme on the Monotonic - Counters a SGX app can maintain. the enclave has reached the - quota.*/ - break; - case SGX_ERROR_MC_USED_UP: - /* the Monotonic Counter has been used up and cannot create - Monotonic Counter anymore.*/ - break; - default: - /*other errors*/ - break; - } - break; - } - - /* secret should be provisioned into enclave after the enclave attests to - the secret owner. - For example, the server that delivers the encrypted DRM content. - In this sample code, a random number is used to represent the secret */ - ret = sgx_read_rand(data2seal.secret, REPLAY_PROTECTED_SECRET_SIZE); - if(ret != SGX_SUCCESS) - break; - data2seal.log.release_version = 0; - /* the secret can be updated for 5 times */ - data2seal.log.max_release_version = - REPLAY_PROTECTED_PAY_LOAD_MAX_RELEASE_VERSION; - - /*sealing the plaintext to ciphertext. The ciphertext can be delivered - outside of enclave.*/ - ret = sgx_seal_data(0, NULL,sizeof(data2seal),(uint8_t*)&data2seal, - sealed_log_size, (sgx_sealed_data_t*)sealed_log); - } while (0); - - /* remember to clear secret data after been used by memset_s */ - memset_s(&data2seal, sizeof(replay_protected_pay_load), 0, - sizeof(replay_protected_pay_load)); - sgx_close_pse_session(); - return ret; -} -uint32_t perform_sealed_policy(const uint8_t* sealed_log, - uint32_t sealed_log_size) -{ - uint32_t ret = 0; - int busy_retry_times = 2; - replay_protected_pay_load data_unsealed; - if(sealed_log_size != sgx_calc_sealed_data_size(0, - sizeof(replay_protected_pay_load))) - return SGX_ERROR_INVALID_PARAMETER; - do{ - ret = sgx_create_pse_session(); - }while (ret == SGX_ERROR_BUSY && busy_retry_times--); - if (ret != SGX_SUCCESS) - return ret; - ret = verify_sealed_data((const sgx_sealed_data_t*) sealed_log, - &data_unsealed); - if (SGX_SUCCESS == ret) - { - /* release the secret to perform the requested functions, - for example, decrypt the DRM content*/ - } - else - { - /* activity log update fail to verify activity log, - refuse to release the secret */ - } - sgx_close_pse_session(); - - /* remember to clear secret data after been used by memset_s */ - memset_s(&data_unsealed, sizeof(data_unsealed), - 0, sizeof(replay_protected_pay_load) ); - return ret; - -} - - -uint32_t update_sealed_policy(uint8_t* sealed_log, uint32_t sealed_log_size) -{ - uint32_t ret = 0; - int busy_retry_times = 2; - replay_protected_pay_load data_unsealed; - replay_protected_pay_load data2seal; - if(sealed_log_size != sgx_calc_sealed_data_size(0, - sizeof(replay_protected_pay_load))) - return SGX_ERROR_INVALID_PARAMETER; - do{ - ret = sgx_create_pse_session(); - }while (ret == SGX_ERROR_BUSY && busy_retry_times--); - if (ret != SGX_SUCCESS) - return ret; - do - { - ret = verify_sealed_data((sgx_sealed_data_t*) sealed_log, - &data_unsealed); - if(ret != SGX_SUCCESS) - break; - - memcpy(&data2seal,&data_unsealed, sizeof(replay_protected_pay_load)); - - ret = sgx_increment_monotonic_counter(&data2seal.mc, - &data2seal.mc_value); - if(ret != SGX_SUCCESS) - { - switch(ret) - { - case SGX_ERROR_SERVICE_UNAVAILABLE: - /* Architecture Enclave Service Manager is not installed or not - working properly.*/ - break; - case SGX_ERROR_SERVICE_TIMEOUT: - /* retry the operation*/ - break; - case SGX_ERROR_BUSY: - /* retry the operation later*/ - break; - case SGX_ERROR_MC_NOT_FOUND: - /* The Monotonic Counter was deleted or invalidated. - This might happen under certain conditions. - For example, the Monotonic Counter has been deleted, the SGX - Platform Service lost its data or the system is under attack. */ - break; - case SGX_ERROR_MC_NO_ACCESS_RIGHT: - /* The Monotonic Counter is not accessible by this enclave. - This might happen under certain conditions. - For example, the SGX Platform Service lost its data or the - system is under attack. */ - break; - default: - /*other errors*/ - break; - } - break; - } - - /* If the counter value returns doesn't match the expected value, - some other entity has updated the counter, for example, another instance - of this enclave. The system might be under attack */ - if(data2seal.mc_value!= data_unsealed.mc_value+1) - { - ret = REPLAY_DETECTED; - break; - } - - if(data2seal.log.release_version >= data2seal.log.max_release_version) - { - /* the max release version has reached, cannot update. Delete the - monotonic_counter, whether the deleting is successful or not. */ - (void)sgx_destroy_monotonic_counter(&data2seal.mc); - ret= MAX_RELEASE_REACHED; - break; - } - - /* next release versiona */ - data2seal.log.release_version++; - /* release next data2seal.secret, here is a sample */ - for(int i = 0; i< REPLAY_PROTECTED_SECRET_SIZE; i++) - data2seal.secret[i]++; - - /* seal the new log */ - ret = sgx_seal_data(0, NULL, sizeof(data2seal), (uint8_t*)&data2seal, - sealed_log_size, (sgx_sealed_data_t*)sealed_log); - } while (0); - - /* remember to clear secret data after been used by memset_s */ - memset_s(&data_unsealed, sizeof(replay_protected_pay_load), 0, - sizeof(replay_protected_pay_load)); - - /* remember to clear secret data after been used by memset_s */ - memset_s(&data2seal, sizeof(replay_protected_pay_load), 0, - sizeof(replay_protected_pay_load)); - sgx_close_pse_session(); - return ret; -} -uint32_t delete_sealed_policy(const uint8_t* sealed_log, - uint32_t sealed_log_size) -{ - uint32_t ret = 0; - int busy_retry_times = 2; - replay_protected_pay_load data_unsealed; - if(sealed_log_size != sgx_calc_sealed_data_size(0, - sizeof(replay_protected_pay_load))) - return SGX_ERROR_INVALID_PARAMETER; - do{ - ret = sgx_create_pse_session(); - }while (ret == SGX_ERROR_BUSY && busy_retry_times--); - if (ret != SGX_SUCCESS) - return ret; - do - { - ret = verify_sealed_data((const sgx_sealed_data_t*) sealed_log, - &data_unsealed); - if(ret != SGX_SUCCESS) - break; - ret = sgx_destroy_monotonic_counter(&data_unsealed.mc); - if(ret != SGX_SUCCESS) - { - switch(ret) - { - case SGX_ERROR_SERVICE_UNAVAILABLE: - /* Architecture Enclave Service Manager is not installed or not - working properly.*/ - break; - case SGX_ERROR_SERVICE_TIMEOUT: - /* retry the operation later*/ - break; - case SGX_ERROR_BUSY: - /* retry the operation later*/ - break; - case SGX_ERROR_MC_NOT_FOUND: - /* the the Monotonic Counter ID is invalid.*/ - break; - case SGX_ERROR_MC_NO_ACCESS_RIGHT: - /* the Monotonic Counter is not accessible by this enclave. - This might happen under certain conditions. - For example, the SGX Platform Service lost its data or - the system is under attack. */ - break; - default: - /*other errors*/ - break; - } - } - } while (0); - /* remember to clear secret data after been used by memset_s */ - memset_s(&data_unsealed, sizeof(replay_protected_pay_load), 0, - sizeof(replay_protected_pay_load)); - sgx_close_pse_session(); - return ret; -} - -/* The secret required to render service is stored together with the time based -policy.If an attack tampered with or destroyed the time based policy data, the -service won't be rendered */ -#define TIME_BASED_SECRET_SIZE 16 -typedef struct _time_based_pay_load -{ - sgx_time_source_nonce_t nonce; - sgx_time_t timestamp_base; - uint8_t secret[TIME_BASED_SECRET_SIZE]; - sgx_time_t lease_duration; -}time_based_pay_load; - - -uint32_t create_time_based_policy(uint8_t* sealed_log, - uint32_t sealed_log_size ) -{ - uint32_t ret = 0; - int busy_retry_times = 2; - time_based_pay_load payload2seal; - memset(&payload2seal, 0, sizeof(time_based_pay_load)); - uint32_t size = sgx_calc_sealed_data_size(0,sizeof(payload2seal)); - if(sealed_log_size != size) - return SGX_ERROR_INVALID_PARAMETER; - do{ - ret = sgx_create_pse_session(); - }while (ret == SGX_ERROR_BUSY && busy_retry_times--); - if (ret != SGX_SUCCESS) - return ret; - do - { - ret = sgx_get_trusted_time(&payload2seal.timestamp_base, - &payload2seal.nonce); - if(ret != SGX_SUCCESS) - { - switch(ret) - { - case SGX_ERROR_SERVICE_UNAVAILABLE: - /* Architecture Enclave Service Manager is not installed or not - working properly.*/ - break; - case SGX_ERROR_SERVICE_TIMEOUT: - /* retry the operation*/ - break; - case SGX_ERROR_BUSY: - /* retry the operation later*/ - break; - default: - /*other errors*/ - break; - } - break; - } - /*secret should be provisioned into enclave after the enclave attests to - the secret owner, for example, the server that delivers the encrypted - DRM content. - In this sample code, a random number is used to represent the secret*/ - ret = sgx_read_rand(payload2seal.secret, TIME_BASED_SECRET_SIZE); - if(ret != SGX_SUCCESS) - break; - payload2seal.lease_duration = TIME_BASED_LEASE_DURATION_SECOND; - /* sead the pay load */ - ret = sgx_seal_data(0, NULL, - sizeof(payload2seal), (uint8_t*)&payload2seal, - sealed_log_size, (sgx_sealed_data_t*)sealed_log); - }while(0); - /* clear the plaintext secret after used */ - memset_s(&payload2seal, sizeof(payload2seal), 0, - sizeof(time_based_pay_load)); - sgx_close_pse_session(); - return ret; -} - -uint32_t perform_time_based_policy(const uint8_t* sealed_log, - uint32_t sealed_log_size ) -{ - uint32_t ret = 0; - int busy_retry_times = 2; - time_based_pay_load unsealed_data; - uint32_t data2seal_length = sizeof(time_based_pay_load); - - uint32_t size = sgx_calc_sealed_data_size(0,sizeof(time_based_pay_load)); - if(sealed_log_size != size) - return SGX_ERROR_INVALID_PARAMETER; - - - ret = sgx_unseal_data((const sgx_sealed_data_t*)sealed_log, NULL, 0, - (uint8_t*)&unsealed_data, &data2seal_length); - if(ret != SGX_SUCCESS) - { - switch(ret) - { - case SGX_ERROR_MAC_MISMATCH: - /* MAC of the sealed data is incorrect. the sealed data has been - tampered.*/ - break; - case SGX_ERROR_INVALID_ATTRIBUTE: - /*Indicates attribute field of the sealed data is incorrect.*/ - break; - case SGX_ERROR_INVALID_ISVSVN: - /* Indicates isv_svn field of the sealed data is greater than the - enclave's ISVSVN. This is a downgraded enclave.*/ - break; - case SGX_ERROR_INVALID_CPUSVN: - /* Indicates cpu_svn field of the sealed data is greater than the - platform's cpu_svn. enclave is on a downgraded platform.*/ - break; - case SGX_ERROR_INVALID_KEYNAME: - /*Indicates key_name field of the sealed data is incorrect.*/ - break; - default: - /*other errors*/ - break; - } - return ret; - } - do{ - ret = sgx_create_pse_session(); - }while (ret == SGX_ERROR_BUSY && busy_retry_times--); - if (ret != SGX_SUCCESS) - { - memset_s(&unsealed_data, sizeof(unsealed_data), 0, - sizeof(time_based_pay_load)); - return ret; - } - do - { - sgx_time_source_nonce_t nonce = {0}; - sgx_time_t current_timestamp; - ret = sgx_get_trusted_time(¤t_timestamp, &nonce); - if(ret != SGX_SUCCESS) - { - switch(ret) - { - case SGX_ERROR_SERVICE_UNAVAILABLE: - /* Architecture Enclave Service Manager is not installed or not - working properly.*/ - break; - case SGX_ERROR_SERVICE_TIMEOUT: - /* retry the operation*/ - break; - case SGX_ERROR_BUSY: - /* retry the operation later*/ - break; - default: - /*other errors*/ - break; - } - break; - } - /*source nonce must be the same, otherwise time source is changed and - the two timestamps are not comparable.*/ - if (memcmp(&nonce,&unsealed_data.nonce, - sizeof(sgx_time_source_nonce_t))) - { - ret = TIMESOURCE_CHANGED; - break; - } - - /* This should not happen. - SGX Platform service guarantees that the time stamp reading moves - forward, unless the time source is changed.*/ - if(current_timestamp < unsealed_data.timestamp_base) - { - ret = TIMESTAMP_UNEXPECTED; - break; - } - /*compare lease_duration and timestamp_diff - if lease_duration is less than difference of current time and base time, - lease tern has expired.*/ - if(current_timestamp - unsealed_data.timestamp_base > - unsealed_data.lease_duration) - { - ret = LEASE_EXPIRED; - break; - } - }while(0); - if (SGX_SUCCESS == ret) - { - /* release the secret to render service, for example, decrypt the DRM - content*/ - } - else - { - /* The secret is not released. the service won't be rendered and the DRM - content can be deleted.*/ - } - /* clear the plaintext secret after used */ - memset_s(&unsealed_data, sizeof(unsealed_data), 0, - sizeof(time_based_pay_load)); - sgx_close_pse_session(); - return ret; -} diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.edl b/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.edl deleted file mode 100644 index 734c069443..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.edl +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -enclave { - from "sgx_tae_service.edl" import *; - trusted { - /* define ECALLs here. */ - public uint32_t create_sealed_policy([out, size=sealed_log_size] - uint8_t* sealed_log, uint32_t sealed_log_size ); - public uint32_t perform_sealed_policy([in, size=sealed_log_size] - const uint8_t* sealed_log, uint32_t sealed_log_size); - public uint32_t update_sealed_policy([in,out, size=sealed_log_size] - uint8_t* sealed_log, uint32_t sealed_log_size); - public uint32_t delete_sealed_policy([in, size=sealed_log_size] - const uint8_t* sealed_log, uint32_t sealed_log_size); - public uint32_t create_time_based_policy([out, size=sealed_log_size] - uint8_t* sealed_log, uint32_t sealed_log_size ); - public uint32_t perform_time_based_policy([in, size=sealed_log_size] - const uint8_t* sealed_log, uint32_t sealed_log_size ); - }; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.lds b/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.lds deleted file mode 100644 index 59398b53ab..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave.lds +++ /dev/null @@ -1,9 +0,0 @@ -DRM_enclave.so -{ - global: - g_global_data_sim; - g_global_data; - enclave_entry; - local: - *; -}; diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave_private.pem b/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave_private.pem deleted file mode 100644 index 0213c3b29a..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/DRM_enclave/DRM_enclave_private.pem +++ /dev/null @@ -1,39 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIG5AIBAAKCAYEA6z8U4C+5v4kDzMO8cn7PkXrql2VVaKqF2cygZgfhKpaDTT67 -QkXIcOW4EbBYFlQffQYH528lmaETZD+WXFrMjlb/l51XRJT9dXqAcV+rhIAd4hTZ -onWjjQVAwwuiLvcknjk8KvP7scLKh+8JfN5SSoY4iNPL1/9E59Kkfo7kbLAMLEKo -Lp7H26vU8euSD/5gbnz21bIwpsRHnZcTQqMK2McSscCjuzpEg3a7ebEo0bHeykjN -X/0Ci6Ef9h42XdoyMR7bXVCf97m9Y7wMbPFodmI4yBLoTnRL1dp4rgV+CvOv5bUX -lYnZVHfkCAuhiFh+mPmct6dBvpXcA38/0CIHn0X6B393r5G5EyttcDi8COUWR/gu -wo2j5cDVDgvDptR90gOCm630jRvN8LDA/UDBxCX4SGLdTupg+vmQZ63xaAcLJ4la -1vQrta7YWiLBzn21KXN+uSHaaphlbcNNtE2iR+Cy/SMTUsPuNgS5QZS4z0Joi0UT -AbW+MX+1+KlanX6dAgEDAoIBgQCc1LiVdSZ/sK0zLShMVIpg/Jxk7jjwca6RMxWZ -WpYcZFeI1HzW2TBLQ9ALyuVkOBT+BAVE9MO7wLeYKmQ9kd20Of+6aOTYY1OjpwBL -lR0DABPsDeZsTm0IrisssmwfT22+0NLHTVJ2gdxan1uolDbcWXsF4oflVNiajG2p -tJhIdV1y1xrJvy/nx+NL8mFf/ur0U085IXXEgtppD2IsbLHl2gx2gG0nfC2s+dJR -IMXhIT8xhd4//gGya2qkFCQ+kXWEL6vwbPK+Ki/Vv/64357294JUIqUajbqtlMQs -oDiatOKgl6KvnjikDFLXwV1T7Y9VsQyDdiEFrFhKunQrYe15euCT21OxAl8JSLF9 -7VO6SzrfMxL4+gOIotCuTuXnu8wgJSNehKQLTjmVRjHxSx+aMnstiXQAtE95HXxV -wSmpxlKL3dZcho0RU19Nm6Ctb8ZRT6eTRiUDAcC61oPb7nbqq7xWhEBniTRJwW9d -eOwsy1Ua7/dkWA3F0jqu+WxO3SsCgcEA+EheAwG6GJ+4q2cPTqu11jFbjTWBjPQS -pH7vGdb9w+5ZfdokJw+NPZ9ZS+UNqRliLQr1u55g/pZxBqvE0Z7VqpP7jo2gutqS -WGAOkwDudF39h8zoGee1cSI7bTIHD9XCp9xbsUdIAxZB9pfnC7LcFZjGRE20daqD -onpcPQiHX0a1IIalW8eI+xH2NFiBHlTeQsRZZZYJFFVX9ilywYug9L6VRIPWFzHw -TTqOZqlO8DVK41s76nRQEea6FpA7ftKNAoHBAPKO+3GrecHavPe0/wj2RC29mbyp -bxmroSz8Y1E+K172Anb3f2cM9yDGDniEh+FaxWtlFDbXrzd85oy7zL1wTb55rZso -2WszmCzeVKBTz/0WQHFeqjMu6SeqYJtjY7tlCPnvcdyftnkQNZovjwedNkdBeT/G -+tgxZiLS+aoDq4oW2jU18/BizyCf0zFgz6wBLWy3qfaimdHAbF9YFSjcTvMggzbY -3KBEL3ooA862B5vcHf+B5AC9WXbdo9ui/KhgUQKBwQClhZQCASa7FSXHmgo0cnk5 -dj0IzlZd+AxtqfS75KktSZD+kW1vX7N+ajuH7gkbZkFzXKPSaZX/DvYEcoM2aePH -DVJfCRXR5ww66rRiAJ74PqkFM0Vmmnj2FtJIzAS1OSxv6D0g2jACDtakZUSydz1j -uy7YM82jxwJsUZLTWwTqLyNrBG49L7CnYU7NkFYUOJQsguZDuVti44/5cPcrsmtN -1GODAo66IUreJwmZxjSgI4dCPNKcTYq2mdFkYCep4bMCgcEAobSnoRz71pHTT83/ -W07YHn5mfcZKER0WHf2Xi37HlKQBpKT/mgikwIQJpa2v65HY8kNizzp0z6iZsyfd -06Az1FEeZ3CQ8iJlcz7jFY01U2Qq9j8cIh9GGnGVvOztJ5iwpp+hPb/O+2AjvB+0 -r74kL4D7f9n8kCDuweH7xq0dBrnmziP39Zc0wGqMy5XfyADI8yUb+cG74Sry6jq4 -xeg0ohWszzs9wC10/BqtNHlaZ+gT/6vtVdOQ+ekX58H9xZWLAoHBANWGCebDFakk -3DQNsd/U1U0j43uLmbxUAvuA9kNr/sHl7TiZH7dWg/IGZHmHh6tlCTvx9ylTSddR -/x8vVS8OEzujZqfmW0ZYXp153cQIgsuPNWOqRildGo/5NZ08vCFN4kdEMO6E3v/i -Ph0rq8CWnkwTgMjw3ohHdgDEOq0Spvm2pt7DmlcNXas6YImBEjetSXOzQ02GWSma -8zeqi62mm8d75KhGLTgMYo7xZpXzxnQnUmRoh/c1XLCrnoj3dXK6kw== ------END RSA PRIVATE KEY----- diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/Makefile b/sgx-jvm/linux-sgx/SampleCode/SealedData/Makefile deleted file mode 100644 index 07f6819ca0..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/Makefile +++ /dev/null @@ -1,248 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -######## SGX SDK Settings ######## - -SGX_SDK ?= /opt/intel/sgxsdk -SGX_MODE ?= HW -SGX_ARCH ?= x64 -SGX_DEBUG ?= 1 - -ifeq ($(shell getconf LONG_BIT), 32) - SGX_ARCH := x86 -else ifeq ($(findstring -m32, $(CXXFLAGS)), -m32) - SGX_ARCH := x86 -endif - -ifeq ($(SGX_ARCH), x86) - SGX_COMMON_CFLAGS := -m32 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x86/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x86/sgx_edger8r -else - SGX_COMMON_CFLAGS := -m64 - SGX_LIBRARY_PATH := $(SGX_SDK)/lib64 - SGX_ENCLAVE_SIGNER := $(SGX_SDK)/bin/x64/sgx_sign - SGX_EDGER8R := $(SGX_SDK)/bin/x64/sgx_edger8r -endif - -ifeq ($(SGX_DEBUG), 1) -ifeq ($(SGX_PRERELEASE), 1) -$(error Cannot set SGX_DEBUG and SGX_PRERELEASE at the same time!!) -endif -endif - -ifeq ($(SGX_DEBUG), 1) - SGX_COMMON_CFLAGS += -O0 -g -else - SGX_COMMON_CFLAGS += -O2 -endif - -######## App Settings ######## - -ifneq ($(SGX_MODE), HW) - Urts_Library_Name := sgx_urts_sim -else - Urts_Library_Name := sgx_urts -endif - -App_Cpp_Files := $(wildcard DRM_app/*.cpp) -App_Include_Paths := -I$(SGX_SDK)/include - -App_C_Flags := $(SGX_COMMON_CFLAGS) -fPIC -Wno-attributes $(App_Include_Paths) - -# Three configuration modes - Debug, prerelease, release -# Debug - Macro DEBUG enabled. -# Prerelease - Macro NDEBUG and EDEBUG enabled. -# Release - Macro NDEBUG enabled. -ifeq ($(SGX_DEBUG), 1) - App_C_Flags += -DDEBUG -UNDEBUG -UEDEBUG -else ifeq ($(SGX_PRERELEASE), 1) - App_C_Flags += -DNDEBUG -DEDEBUG -UDEBUG -else - App_C_Flags += -DNDEBUG -UEDEBUG -UDEBUG -endif - -App_Cpp_Flags := $(App_C_Flags) -std=c++11 -App_Link_Flags := $(SGX_COMMON_CFLAGS) -L$(SGX_LIBRARY_PATH) -l$(Urts_Library_Name) -L. -lpthread -Wl,-rpath=$(CURDIR)/sample_libcrypto -Wl,-rpath=$(CURDIR) - -ifneq ($(SGX_MODE), HW) - App_Link_Flags += -lsgx_uae_service_sim -else - App_Link_Flags += -lsgx_uae_service -endif - -App_Cpp_Objects := $(App_Cpp_Files:.cpp=.o) - -App_Name := app - -######## Enclave Settings ######## - -ifneq ($(SGX_MODE), HW) - Trts_Library_Name := sgx_trts_sim - Service_Library_Name := sgx_tservice_sim -else - Trts_Library_Name := sgx_trts - Service_Library_Name := sgx_tservice -endif -Crypto_Library_Name := sgx_tcrypto - -Enclave_Cpp_Files := DRM_enclave/DRM_enclave.cpp -Enclave_Include_Paths := -I$(SGX_SDK)/include -I$(SGX_SDK)/include/tlibc -I$(SGX_SDK)/include/libcxx - -CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9") -ifeq ($(CC_BELOW_4_9), 1) - Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector -else - Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -ffunction-sections -fdata-sections -fstack-protector-strong -endif -Enclave_C_Flags += $(Enclave_Include_Paths) -Enclave_Cpp_Flags := $(Enclave_C_Flags) -std=c++11 -nostdinc++ - -# To generate a proper enclave, it is recommended to follow below guideline to link the trusted libraries: -# 1. Link sgx_trts with the `--whole-archive' and `--no-whole-archive' options, -# so that the whole content of trts is included in the enclave. -# 2. For other libraries, you just need to pull the required symbols. -# Use `--start-group' and `--end-group' to link these libraries. -# Do NOT move the libraries linked with `--start-group' and `--end-group' within `--whole-archive' and `--no-whole-archive' options. -# Otherwise, you may get some undesirable errors. -Enclave_Link_Flags := $(SGX_COMMON_CFLAGS) -Wl,--no-undefined -nostdlib -nodefaultlibs -nostartfiles -L$(SGX_LIBRARY_PATH) \ - -Wl,--whole-archive -l$(Trts_Library_Name) -Wl,--no-whole-archive \ - -Wl,--start-group -lsgx_tstdc -lsgx_tcxx -l$(Crypto_Library_Name) -l$(Service_Library_Name) -Wl,--end-group \ - -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 -Wl,--gc-sections \ - -Wl,--version-script=DRM_enclave/DRM_enclave.lds - -Enclave_Cpp_Objects := $(Enclave_Cpp_Files:.cpp=.o) - -Enclave_Name := DRM_enclave.so -Signed_Enclave_Name := DRM_enclave.signed.so -Enclave_Config_File := DRM_enclave/DRM_enclave.config.xml - -ifeq ($(SGX_MODE), HW) -ifeq ($(SGX_DEBUG), 1) - Build_Mode = HW_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = HW_PRERELEASE -else - Build_Mode = HW_RELEASE -endif -else -ifeq ($(SGX_DEBUG), 1) - Build_Mode = SIM_DEBUG -else ifeq ($(SGX_PRERELEASE), 1) - Build_Mode = SIM_PRERELEASE -else - Build_Mode = SIM_RELEASE -endif -endif - - -.PHONY: all run - -ifeq ($(Build_Mode), HW_RELEASE) -all: .config_$(Build_Mode)_$(SGX_ARCH) $(App_Name) $(Enclave_Name) - @echo "The project has been built in release hardware mode." - @echo "Please sign the $(Enclave_Name) first with your signing key before you run the $(App_Name) to launch and access the enclave." - @echo "To sign the enclave use the command:" - @echo " $(SGX_ENCLAVE_SIGNER) sign -key -enclave $(Enclave_Name) -out <$(Signed_Enclave_Name)> -config $(Enclave_Config_File)" - @echo "You can also sign the enclave using an external signing tool." - @echo "To build the project in simulation mode set SGX_MODE=SIM. To build the project in prerelease mode set SGX_PRERELEASE=1 and SGX_MODE=HW." -else -all: .config_$(Build_Mode)_$(SGX_ARCH) $(App_Name) $(Signed_Enclave_Name) -ifeq ($(Build_Mode), HW_DEBUG) - @echo "The project has been built in debug hardware mode." -else ifeq ($(Build_Mode), SIM_DEBUG) - @echo "The project has been built in debug simulation mode." -else ifeq ($(Build_Mode), HW_PRERELEASE) - @echo "The project has been built in pre-release hardware mode." -else ifeq ($(Build_Mode), SIM_PRERELEASE) - @echo "The project has been built in pre-release simulation mode." -else - @echo "The project has been built in release simulation mode." -endif -endif - -run: all -ifneq ($(Build_Mode), HW_RELEASE) - @$(CURDIR)/$(App_Name) - @echo "RUN => $(App_Name) [$(SGX_MODE)|$(SGX_ARCH), OK]" -endif - -.config_$(Build_Mode)_$(SGX_ARCH): - @rm -f .config_* $(App_Name) $(Enclave_Name) $(Signed_Enclave_Name) $(App_Cpp_Objects) DRM_app/DRM_enclave_u.* $(Enclave_Cpp_Objects) DRM_enclave/DRM_enclave_t.* - @touch .config_$(Build_Mode)_$(SGX_ARCH) - -######## App Objects ######## - -DRM_app/DRM_enclave_u.c: $(SGX_EDGER8R) DRM_enclave/DRM_enclave.edl - @cd DRM_app && $(SGX_EDGER8R) --untrusted ../DRM_enclave/DRM_enclave.edl --search-path ../DRM_enclave --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -DRM_app/DRM_enclave_u.o: DRM_app/DRM_enclave_u.c - @$(CC) $(App_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -DRM_app/%.o: DRM_app/%.cpp - @$(CXX) $(App_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(App_Name): DRM_app/DRM_enclave_u.o $(App_Cpp_Objects) - @$(CXX) $^ -o $@ $(App_Link_Flags) - @echo "LINK => $@" - -######## Enclave Objects ######## - -DRM_enclave/DRM_enclave_t.c: $(SGX_EDGER8R) DRM_enclave/DRM_enclave.edl - @cd DRM_enclave && $(SGX_EDGER8R) --trusted ../DRM_enclave/DRM_enclave.edl --search-path ../DRM_enclave --search-path $(SGX_SDK)/include - @echo "GEN => $@" - -DRM_enclave/DRM_enclave_t.o: DRM_enclave/DRM_enclave_t.c - @$(CC) $(Enclave_C_Flags) -c $< -o $@ - @echo "CC <= $<" - -DRM_enclave/%.o: DRM_enclave/%.cpp - @$(CXX) $(Enclave_Cpp_Flags) -c $< -o $@ - @echo "CXX <= $<" - -$(Enclave_Name): DRM_enclave/DRM_enclave_t.o $(Enclave_Cpp_Objects) - @$(CXX) $^ -o $@ $(Enclave_Link_Flags) - @echo "LINK => $@" - -$(Signed_Enclave_Name): $(Enclave_Name) - @$(SGX_ENCLAVE_SIGNER) sign -key DRM_enclave/DRM_enclave_private.pem -enclave $(Enclave_Name) -out $@ -config $(Enclave_Config_File) - @echo "SIGN => $@" - -.PHONY: clean - -clean: - @rm -f .config_* $(App_Name) $(Enclave_Name) $(Signed_Enclave_Name) $(App_Cpp_Objects) DRM_app/DRM_enclave_u.* $(Enclave_Cpp_Objects) DRM_enclave/DRM_enclave_t.* diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/README.txt b/sgx-jvm/linux-sgx/SampleCode/SealedData/README.txt deleted file mode 100644 index 3a3a3c26b6..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/README.txt +++ /dev/null @@ -1,31 +0,0 @@ ----------------------------- -Purpose of SealedData ----------------------------- -The project demonstrates: -- How an application enclave can encrypt and integrity-protect enclave secrets -to store them outside the enclave -- How an application enclave can use Monotonic Counter to implement -replay-protected policy, and Trusted Time to enforce time based policy - ------------------------------------- -How to Build/Execute the Sample Code ------------------------------------- -1. Install Intel(R) Software Guard Extensions (Intel(R) SGX) SDK for Linux* OS -2. Make sure your environment is set: - $ source ${sgx-sdk-install-path}/environment -3. Build the project with the prepared Makefile: - a. Hardware Mode, Debug build: - $ make - b. Hardware Mode, Pre-release build: - $ make SGX_PRERELEASE=1 SGX_DEBUG=0 - c. Hardware Mode, Release build: - $ make SGX_DEBUG=0 - d. Simulation Mode, Debug build: - $ make SGX_MODE=SIM - e. Simulation Mode, Pre-release build: - $ make SGX_MODE=SIM SGX_PRERELEASE=1 SGX_DEBUG=0 - f. Simulation Mode, Release build: - $ make SGX_MODE=SIM SGX_DEBUG=0 -4. Execute the binary directly: - $ ./app -5. Remember to "make clean" before switching build mode diff --git a/sgx-jvm/linux-sgx/SampleCode/SealedData/include/sealed_data_defines.h b/sgx-jvm/linux-sgx/SampleCode/SealedData/include/sealed_data_defines.h deleted file mode 100644 index dcf569cbc9..0000000000 --- a/sgx-jvm/linux-sgx/SampleCode/SealedData/include/sealed_data_defines.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#pragma once -#ifndef _SEALED_DATA_DEFINES_H_ -#define _SEALED_DATA_DEFINES_H_ - -#include "sgx_error.h" - -#define PLATFORM_SERVICE_DOWNGRADED 0xF001 - -#define REPLAY_DETECTED 0xF002 -#define MAX_RELEASE_REACHED 0xF003 - -/* equal to sgx_calc_sealed_data_size(0,sizeof(replay_protected_pay_load))) */ -#define SEALED_REPLAY_PROTECTED_PAY_LOAD_SIZE 620 -#define REPLAY_PROTECTED_PAY_LOAD_MAX_RELEASE_VERSION 5 - -#define TIMESOURCE_CHANGED 0xF004 -#define TIMESTAMP_UNEXPECTED 0xF005 -#define LEASE_EXPIRED 0xF006 - -/* equal tosgx_calc_sealed_data_size(0,sizeof(time_based_pay_load))) */ -#define TIME_BASED_PAY_LOAD_SIZE 624 -#define TIME_BASED_LEASE_DURATION_SECOND 3 - -#endif diff --git a/sgx-jvm/linux-sgx/build-scripts/enclave.lds b/sgx-jvm/linux-sgx/build-scripts/enclave.lds deleted file mode 100644 index 975b185f3c..0000000000 --- a/sgx-jvm/linux-sgx/build-scripts/enclave.lds +++ /dev/null @@ -1,9 +0,0 @@ -{ -global: - enclave_entry; - g_global_data_sim; - g_peak_heap_used; - g_global_data; -local: - *; -}; diff --git a/sgx-jvm/linux-sgx/buildenv.mk b/sgx-jvm/linux-sgx/buildenv.mk deleted file mode 100644 index 759c07ac55..0000000000 --- a/sgx-jvm/linux-sgx/buildenv.mk +++ /dev/null @@ -1,184 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - - -# ----------------------------------------------------------------------------- -# Function : parent-dir -# Arguments: 1: path -# Returns : Parent dir or path of $1, with final separator removed. -# ----------------------------------------------------------------------------- -parent-dir = $(patsubst %/,%,$(dir $(1:%/=%))) - -# ----------------------------------------------------------------------------- -# Macro : my-dir -# Returns : the directory of the current Makefile -# Usage : $(my-dir) -# ----------------------------------------------------------------------------- -my-dir = $(realpath $(call parent-dir,$(lastword $(MAKEFILE_LIST)))) - - -ROOT_DIR := $(call my-dir) -COMMON_DIR := $(ROOT_DIR)/common -LINUX_EXTERNAL_DIR := $(ROOT_DIR)/external -LINUX_PSW_DIR := $(ROOT_DIR)/psw -LINUX_SDK_DIR := $(ROOT_DIR)/sdk -LINUX_UNITTESTS := $(ROOT_DIR)/unittests - - -CP := /bin/cp -f -MKDIR := mkdir -p -STRIP := strip -OBJCOPY := objcopy - -# clean the content of 'INCLUDE' - this variable will be set by vcvars32.bat -# thus it will cause build error when this variable is used by our Makefile, -# when compiling the code under Cygwin tainted by MSVC environment settings. -INCLUDE := - -# this will return the path to the file that included the buildenv.mk file -CUR_DIR := $(realpath $(call parent-dir,$(lastword $(wordlist 2,$(words $(MAKEFILE_LIST)),x $(MAKEFILE_LIST))))) - -# turn on stack protector for SDK -CC_BELOW_4_9 := $(shell expr "`$(CC) -dumpversion`" \< "4.9") -ifeq ($(CC_BELOW_4_9), 1) - COMMON_FLAGS += -fstack-protector -else - COMMON_FLAGS += -fstack-protector-strong -endif - -ifdef DEBUG - COMMON_FLAGS += -O0 -ggdb -DDEBUG -UNDEBUG - COMMON_FLAGS += -DSE_DEBUG_LEVEL=SE_TRACE_DEBUG -else - COMMON_FLAGS += -O2 -D_FORTIFY_SOURCE=2 -UDEBUG -DNDEBUG -endif - -ifdef SE_SIM - COMMON_FLAGS += -DSE_SIM -endif - -COMMON_FLAGS += -ffunction-sections -fdata-sections - -# turn on compiler warnings as much as possible -COMMON_FLAGS += -Wall -Wextra -Winit-self -Wpointer-arith -Wreturn-type \ - -Waddress -Wsequence-point -Wformat-security \ - -Wmissing-include-dirs -Wfloat-equal -Wundef -Wshadow \ - -Wcast-align -Wconversion -Wredundant-decls - -# additional warnings flags for C -CFLAGS += -Wjump-misses-init -Wstrict-prototypes -Wunsuffixed-float-constants - -# additional warnings flags for C++ -CXXFLAGS += -Wnon-virtual-dtor - -CXXFLAGS += -std=c++11 - -.DEFAULT_GOAL := all -# this turns off the RCS / SCCS implicit rules of GNU Make -% : RCS/%,v -% : RCS/% -% : %,v -% : s.% -% : SCCS/s.% - -# If a rule fails, delete $@. -.DELETE_ON_ERROR: - -HOST_FILE_PROGRAM := file - -UNAME := $(shell uname -m) -ifneq (,$(findstring 86,$(UNAME))) - HOST_ARCH := x86 - ifneq (,$(shell $(HOST_FILE_PROGRAM) -L $(SHELL) | grep 'x86[_-]64')) - HOST_ARCH := x86_64 - endif -else - $(info Unknown host CPU arhitecture $(UNAME)) - $(error Aborting) -endif - -BUILD_DIR := $(ROOT_DIR)/build/linux - -ifeq "$(findstring __INTEL_COMPILER, $(shell $(CC) -E -dM -xc /dev/null))" "__INTEL_COMPILER" - ifeq ($(shell test -f /usr/bin/dpkg; echo $$?), 0) - ADDED_INC := -I /usr/include/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH) - endif -endif - -ARCH := $(HOST_ARCH) -ifeq "$(findstring -m32, $(CXXFLAGS))" "-m32" - ARCH := x86 -endif - -ifeq ($(ARCH), x86) -COMMON_FLAGS += -DITT_ARCH_IA32 -else -COMMON_FLAGS += -DITT_ARCH_IA64 -endif - -CFLAGS += $(COMMON_FLAGS) -CXXFLAGS += $(COMMON_FLAGS) - -# Enable the security flags -COMMON_LDFLAGS := -Wl,-z,relro,-z,now,-z,noexecstack - -# Compiler and linker options for an Enclave -# -# We are using '--export-dynamic' so that `g_global_data_sim' etc. -# will be exported to dynamic symbol table. -# -# When `pie' is enabled, the linker (both BFD and Gold) under Ubuntu 14.04 -# will hide all symbols from dynamic symbol table even if they are marked -# as `global' in the LD version script. -ENCLAVE_CFLAGS = -ffreestanding -nostdinc -fvisibility=hidden -fpie -ENCLAVE_CXXFLAGS = $(ENCLAVE_CFLAGS) -nostdinc++ -ENCLAVE_LDFLAGS = $(COMMON_LDFLAGS) -Wl,-Bstatic -Wl,-Bsymbolic -Wl,--no-undefined \ - -Wl,-pie,-eenclave_entry -Wl,--export-dynamic \ - -Wl,--defsym,__ImageBase=0 - - -# Choose to use the optimized libraries (IPP/String/Math) by default. -# Users could also use the source code version (SGXSSL/String/Math) by -# explicitly specifying 'USE_OPT_LIBS=0' -USE_OPT_LIBS ?= 1 - - -ifeq ($(ARCH), x86_64) -IPP_SUBDIR = intel64 -else -IPP_SUBDIR = ia32 -endif - -SGX_IPP_DIR := $(ROOT_DIR)/external/ippcp_internal -SGX_IPP_INC := $(SGX_IPP_DIR)/inc -IPP_LIBS_DIR := $(SGX_IPP_DIR)/lib/linux/$(IPP_SUBDIR) -LD_IPP := -lippcp -lippcore - diff --git a/sgx-jvm/linux-sgx/common/inc/internal/ae_ipp.h b/sgx-jvm/linux-sgx/common/inc/internal/ae_ipp.h deleted file mode 100644 index dc652a5a14..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/ae_ipp.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _AE_IPP_H -#define _AE_IPP_H - -#include "ippcore.h" -#include "ippcp.h" - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/arch.h b/sgx-jvm/linux-sgx/common/inc/internal/arch.h deleted file mode 100644 index bb372f2663..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/arch.h +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_ARCH_H_ -#define _SE_ARCH_H_ - -#include "inst.h" -#include "se_types.h" -#include "sgx_attributes.h" -#include "sgx_key.h" -#include "sgx_report.h" -#include "sgx_tcrypto.h" - -#define SE_PAGE_SIZE 0x1000 -#define TCS_SIZE SE_PAGE_SIZE - -#pragma pack(push, 1) - -#define STATIC_ASSERT_UNUSED_ATTRIBUTE __attribute__((unused)) -#define _ASSERT_CONCAT(a, b) a##b -#define ASSERT_CONCAT(a, b) _ASSERT_CONCAT(a, b) -#define se_static_assert(e) typedef char ASSERT_CONCAT(assert_line, __LINE__)[(e)?1:-1] STATIC_ASSERT_UNUSED_ATTRIBUTE - -se_static_assert(sizeof(sgx_key_request_t) == 512); -se_static_assert(sizeof(sgx_target_info_t) == 512); - -/*SECS data structure*/ -typedef struct _secs_t -{ - uint64_t size; /* ( 0) Size of the enclave in bytes */ - PADDED_POINTER(void, base); /* ( 8) Base address of enclave */ - uint32_t ssa_frame_size; /* ( 16) size of 1 SSA frame in pages */ - sgx_misc_select_t misc_select; /* ( 20) Which fields defined in SSA.MISC */ -#define SECS_RESERVED1_LENGTH 24 - uint8_t reserved1[SECS_RESERVED1_LENGTH]; /* ( 24) reserved */ - sgx_attributes_t attributes; /* ( 48) ATTRIBUTES Flags Field */ - sgx_measurement_t mr_enclave; /* ( 64) Integrity Reg 0 - Enclave measurement */ -#define SECS_RESERVED2_LENGTH 32 - uint8_t reserved2[SECS_RESERVED2_LENGTH]; /* ( 96) reserved */ - sgx_measurement_t mr_signer; /* (128) Integrity Reg 1 - Enclave signing key */ -#define SECS_RESERVED3_LENGTH 96 - uint8_t reserved3[SECS_RESERVED3_LENGTH]; /* (160) reserved */ - sgx_prod_id_t isv_prod_id; /* (256) product ID of enclave */ - sgx_isv_svn_t isv_svn; /* (258) Security Version of the Enclave */ -#define SECS_RESERVED4_LENGTH 3836 - uint8_t reserved4[SECS_RESERVED4_LENGTH];/* (260) reserved */ -} secs_t; - -/* -TCS -flags definitions -*/ -#define DBGOPTIN 1 /* used by debugger */ - -typedef struct _tcs_t -{ - uint64_t reserved0; /* (0) */ - uint64_t flags; /* (8)bit 0: DBGOPTION */ - uint64_t ossa; /* (16)State Save Area */ - uint32_t cssa; /* (24)Current SSA slot */ - uint32_t nssa; /* (28)Number of SSA slots */ - uint64_t oentry; /* (32)Offset in enclave to which control is transferred on EENTER if enclave INACTIVE state */ - uint64_t reserved1; /* (40) */ - uint64_t ofs_base; /* (48)When added to the base address of the enclave, produces the base address FS segment inside the enclave */ - uint64_t ogs_base; /* (56)When added to the base address of the enclave, produces the base address GS segment inside the enclave */ - uint32_t ofs_limit; /* (64)Size to become the new FS limit in 32-bit mode */ - uint32_t ogs_limit; /* (68)Size to become the new GS limit in 32-bit mode */ -#define TCS_RESERVED_LENGTH 4024 - uint8_t reserved[TCS_RESERVED_LENGTH]; /* (72) */ -}tcs_t; - -se_static_assert(sizeof(tcs_t) == SE_PAGE_SIZE); - -/**************************************************************************** - * Definitions for SSA - ****************************************************************************/ -typedef struct _exit_info_t -{ - uint32_t vector:8; /* Exception number of exceptions reported inside enclave */ - uint32_t exit_type:3; /* 3: Hardware exceptions, 6: Software exceptions */ - uint32_t reserved:20; - uint32_t valid:1; /* 0: unsupported exceptions, 1: Supported exceptions */ -} exit_info_t; - -#define SE_VECTOR_DE 0 -#define SE_VECTOR_DB 1 -#define SE_VECTOR_BP 3 -#define SE_VECTOR_BR 5 -#define SE_VECTOR_UD 6 -#define SE_VECTOR_MF 16 -#define SE_VECTOR_AC 17 -#define SE_VECTOR_XM 19 - -typedef struct _ssa_gpr_t -{ - REGISTER( ax); /* (0) */ - REGISTER( cx); /* (8) */ - REGISTER( dx); /* (16) */ - REGISTER( bx); /* (24) */ - REGISTER( sp); /* (32) */ - REGISTER( bp); /* (40) */ - REGISTER( si); /* (48) */ - REGISTER( di); /* (56) */ - uint64_t r8; /* (64) */ - uint64_t r9; /* (72) */ - uint64_t r10; /* (80) */ - uint64_t r11; /* (88) */ - uint64_t r12; /* (96) */ - uint64_t r13; /* (104) */ - uint64_t r14; /* (112) */ - uint64_t r15; /* (120) */ - REGISTER(flags); /* (128) */ - REGISTER( ip); /* (136) */ - REGISTER( sp_u); /* (144) untrusted stack pointer. saved by EENTER */ - REGISTER( bp_u); /* (152) untrusted frame pointer. saved by EENTER */ - exit_info_t exit_info; /* (160) contain information for exits */ - uint32_t reserved; /* (164) padding to multiple of 8 bytes */ - uint64_t fs; /* (168) FS register */ - uint64_t gs; /* (176) GS register */ -} ssa_gpr_t; - -typedef uint64_t si_flags_t; - -#define SI_FLAG_NONE 0x0 -#define SI_FLAG_R 0x1 /* Read Access */ -#define SI_FLAG_W 0x2 /* Write Access */ -#define SI_FLAG_X 0x4 /* Execute Access */ -#define SI_FLAG_PT_LOW_BIT 0x8 /* PT low bit */ -#define SI_FLAG_PT_MASK (0xFF< -#include - -namespace { - template - void delete_ptrs_from_container(T& vec) - { - typename T::iterator iter = vec.begin(); - typename T::iterator end = vec.end(); - typename T::iterator this_iter; - - while (iter != end) - { - this_iter = iter; - ++iter; - delete *this_iter; - } - } - - /* Each pair is well-formed (p.first <= p.second) */ - template - bool is_overlap(const std::pair& p1, - const std::pair& p2) - { - assert(p1.first <= p1.second); - assert(p2.first <= p2.second); - - return ((p1.first <= p2.second) && (p2.first <= p1.second)); - } -} - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/cpuid.h b/sgx-jvm/linux-sgx/common/inc/internal/cpuid.h deleted file mode 100644 index a16c45db2d..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/cpuid.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _CPUID_H_ -#define _CPUID_H_ - -#include "linux/cpuid_gnu.h" - - -#endif /* _CPUID_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/internal/crypto_wrapper.h b/sgx-jvm/linux-sgx/common/inc/internal/crypto_wrapper.h deleted file mode 100644 index fb84d0b7ab..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/crypto_wrapper.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _CRYPTO_WRAPPER_H -#define _CRYPTO_WRAPPER_H - -#include -#include "sgx_report.h" -#include "sgx_error.h" - -#ifdef __cplusplus -extern "C" { -#endif - -sgx_status_t sgx_EVP_Digest(const EVP_MD *type, const uint8_t *p_src, unsigned int src_len, uint8_t *digest, unsigned int *digest_len); -sgx_status_t sgx_cmac128_msg(const sgx_key_128bit_t key, const uint8_t *p_src, unsigned int src_len, sgx_mac_t *p_mac); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/sgx-jvm/linux-sgx/common/inc/internal/dh.h b/sgx-jvm/linux-sgx/common/inc/internal/dh.h deleted file mode 100644 index a3fff26aad..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/dh.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _DH_H -#define _DH_H - -#include "utility.h" - -/*return true if encrypt message successfully */ -bool encrypt_msg(pse_message_t* pse_msg, uint8_t* data, sgx_key_128bit_t* authenticated_encryption_key); - -/*return true if decrypt message successfully */ -bool decrypt_msg(pse_message_t* pse_msg, uint8_t* data, sgx_key_128bit_t* authenticated_encryption_key); -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/driver_api.h b/sgx-jvm/linux-sgx/common/inc/internal/driver_api.h deleted file mode 100644 index ba02aa4f04..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/driver_api.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _DRIVER_API_H_ -#define _DRIVER_API_H_ - -#include "arch.h" -#include "sgx_eid.h" - -/* -@enclave_id identify the unique enclave; -@start_addr is the linear address that driver allocate for app; -*/ -int create_enclave(secs_t *secs, sgx_enclave_id_t *enclave_id, void **start_addr); -/* -*@attr can be REMOVABLE -*/ -int add_enclave_page(sgx_enclave_id_t enclave_id, void *source, size_t offset, const sec_info_t &secinfo, uint32_t attr); -int init_enclave(sgx_enclave_id_t enclave_id, enclave_css_t *enclave_css, token_t *launch); -int destroy_enclave(sgx_enclave_id_t enclave_id); - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/ecp_interface.h b/sgx-jvm/linux-sgx/common/inc/internal/ecp_interface.h deleted file mode 100644 index d3e1150729..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/ecp_interface.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _ECP_INTERFACE_H -#define _ECP_INTERFACE_H - -#include "sgx_ecp_types.h" -#include "sgx_tcrypto.h" - -//Key Derivation Function ID : 0x0001 AES-CMAC Entropy Extraction and Key Expansion -const uint16_t AES_CMAC_KDF_ID = 0x0001; - -sgx_status_t derive_key( - const sgx_ec256_dh_shared_t* shared_key, - const char* label, - uint32_t label_length, - sgx_ec_key_128bit_t* derived_key); - -#ifndef INTERNAL_SGX_ERROR_CODE_CONVERTOR -#define INTERNAL_SGX_ERROR_CODE_CONVERTOR(x) if(x != SGX_ERROR_OUT_OF_MEMORY){x = SGX_ERROR_UNEXPECTED;} -#endif - -#endif - diff --git a/sgx-jvm/linux-sgx/common/inc/internal/elf_util.h b/sgx-jvm/linux-sgx/common/inc/internal/elf_util.h deleted file mode 100644 index 40296309ac..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/elf_util.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -#ifndef _ELF_UTIL_H_ -#define _ELF_UTIL_H_ - -#include "elfheader/elf_common.h" -#include "elfheader/elfstructs.h" - -#ifndef __ELF_NATIVE_CLASS -# if defined(_M_X64) || defined(__x86_64) || defined(__amd64) -# include /* for UINT_MAX */ -# define __ELF_NATIVE_CLASS 64 -# else -# define __ELF_NATIVE_CLASS 32 -# endif -#endif - -#if __ELF_NATIVE_CLASS == 64 -# define Rel Rela - -# define RTS_DT_REL DT_RELA -# define RTS_DT_RELSZ DT_RELASZ -# define RTS_DT_RELENT DT_RELAENT -# else -# define RTS_DT_REL DT_REL -# define RTS_DT_RELSZ DT_RELSZ -# define RTS_DT_RELENT DT_RELENT -#endif - -/* We use this macro to refer to ELF types independent of the native wordsize. - `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */ -#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type) - -/* We use this macro to refer to ELF macro constants. For example, - `ELFW(R_SYM)' is used in place of `ELF32_R_SYM' or `ELF64_R_SYM'. */ -#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type) - -#define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) -#define _ElfW_1(e,w,t) e##w##t - -/* GNU header uses `JUMP_SLOT' while `JMP_SLOT' in FreeBSD. */ -#define R_X86_64_JUMP_SLOT R_X86_64_JMP_SLOT - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/elfheader/README.txt b/sgx-jvm/linux-sgx/common/inc/internal/elfheader/README.txt deleted file mode 100644 index 654a5ecadd..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/elfheader/README.txt +++ /dev/null @@ -1,59 +0,0 @@ -Note, the files `elf_common.h' and `elfstructs.h' are from FreeBSD. - git://github.com/freebsd/freebsd.git - -But with slight modifications shown below: - -diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h -index 8f02ef1..7601abb 100644 ---- a/sys/sys/elf_common.h -+++ b/sys/sys/elf_common.h -@@ -30,6 +30,9 @@ - #ifndef _SYS_ELF_COMMON_H_ - #define _SYS_ELF_COMMON_H_ 1 - -+typedef uint32_t u_int32_t; -+typedef uint32_t Elf_Symndx; -+ - /* - * ELF definitions that are independent of architecture or word size. - */ -@@ -117,9 +120,6 @@ typedef struct { - #define ELFOSABI_ARM 97 /* ARM */ - #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ - --#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */ --#define ELFOSABI_MONTEREY ELFOSABI_AIX /* Monterey */ -- - /* e_ident */ - #define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ - (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ -@@ -242,7 +242,6 @@ typedef struct { - #define EM_486 6 /* Intel i486. */ - #define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ - #define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */ --#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI) */ - - /* Special section indexes. */ - #define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */ -@@ -441,6 +440,8 @@ typedef struct { - #define DT_MOVETAB 0x6ffffefe /* move table */ - #define DT_SYMINFO 0x6ffffeff /* syminfo table */ - #define DT_ADDRRNGHI 0x6ffffeff -+#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) /* Reverse order! */ -+#define DT_ADDRNUM 11 - - #define DT_VERSYM 0x6ffffff0 /* Address of versym section. */ - #define DT_RELACOUNT 0x6ffffff9 /* number of RELATIVE relocations */ -@@ -505,12 +506,9 @@ typedef struct { - #define STT_FILE 4 /* Source file. */ - #define STT_COMMON 5 /* Uninitialized common block. */ - #define STT_TLS 6 /* TLS object. */ --#define STT_NUM 7 - #define STT_LOOS 10 /* Reserved range for operating system */ - #define STT_GNU_IFUNC 10 - #define STT_HIOS 12 /* specific semantics. */ --#define STT_LOPROC 13 /* reserved range for processor */ --#define STT_HIPROC 15 /* specific semantics. */ - - /* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */ - #define STV_DEFAULT 0x0 /* Default visibility (see binding). */ diff --git a/sgx-jvm/linux-sgx/common/inc/internal/elfheader/elf_common.h b/sgx-jvm/linux-sgx/common/inc/internal/elfheader/elf_common.h deleted file mode 100644 index 7601abb189..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/elfheader/elf_common.h +++ /dev/null @@ -1,975 +0,0 @@ -/*- - * Copyright (c) 2000, 2001, 2008, 2011, David E. O'Brien - * Copyright (c) 1998 John D. Polstra. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef _SYS_ELF_COMMON_H_ -#define _SYS_ELF_COMMON_H_ 1 - -typedef uint32_t u_int32_t; -typedef uint32_t Elf_Symndx; - -/* - * ELF definitions that are independent of architecture or word size. - */ - -/* - * Note header. The ".note" section contains an array of notes. Each - * begins with this header, aligned to a word boundary. Immediately - * following the note header is n_namesz bytes of name, padded to the - * next word boundary. Then comes n_descsz bytes of descriptor, again - * padded to a word boundary. The values of n_namesz and n_descsz do - * not include the padding. - */ - -typedef struct { - u_int32_t n_namesz; /* Length of name. */ - u_int32_t n_descsz; /* Length of descriptor. */ - u_int32_t n_type; /* Type of this note. */ -} Elf_Note; - -/* - * The header for GNU-style hash sections. - */ - -typedef struct { - u_int32_t gh_nbuckets; /* Number of hash buckets. */ - u_int32_t gh_symndx; /* First visible symbol in .dynsym. */ - u_int32_t gh_maskwords; /* #maskwords used in bloom filter. */ - u_int32_t gh_shift2; /* Bloom filter shift count. */ -} Elf_GNU_Hash_Header; - -/* Indexes into the e_ident array. Keep synced with - http://www.sco.com/developers/gabi/latest/ch4.eheader.html */ -#define EI_MAG0 0 /* Magic number, byte 0. */ -#define EI_MAG1 1 /* Magic number, byte 1. */ -#define EI_MAG2 2 /* Magic number, byte 2. */ -#define EI_MAG3 3 /* Magic number, byte 3. */ -#define EI_CLASS 4 /* Class of machine. */ -#define EI_DATA 5 /* Data format. */ -#define EI_VERSION 6 /* ELF format version. */ -#define EI_OSABI 7 /* Operating system / ABI identification */ -#define EI_ABIVERSION 8 /* ABI version */ -#define OLD_EI_BRAND 8 /* Start of architecture identification. */ -#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */ -#define EI_NIDENT 16 /* Size of e_ident array. */ - -/* Values for the magic number bytes. */ -#define ELFMAG0 0x7f -#define ELFMAG1 'E' -#define ELFMAG2 'L' -#define ELFMAG3 'F' -#define ELFMAG "\177ELF" /* magic string */ -#define SELFMAG 4 /* magic string size */ - -/* Values for e_ident[EI_VERSION] and e_version. */ -#define EV_NONE 0 -#define EV_CURRENT 1 - -/* Values for e_ident[EI_CLASS]. */ -#define ELFCLASSNONE 0 /* Unknown class. */ -#define ELFCLASS32 1 /* 32-bit architecture. */ -#define ELFCLASS64 2 /* 64-bit architecture. */ - -/* Values for e_ident[EI_DATA]. */ -#define ELFDATANONE 0 /* Unknown data format. */ -#define ELFDATA2LSB 1 /* 2's complement little-endian. */ -#define ELFDATA2MSB 2 /* 2's complement big-endian. */ - -/* Values for e_ident[EI_OSABI]. */ -#define ELFOSABI_NONE 0 /* UNIX System V ABI */ -#define ELFOSABI_HPUX 1 /* HP-UX operating system */ -#define ELFOSABI_NETBSD 2 /* NetBSD */ -#define ELFOSABI_LINUX 3 /* GNU/Linux */ -#define ELFOSABI_HURD 4 /* GNU/Hurd */ -#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */ -#define ELFOSABI_SOLARIS 6 /* Solaris */ -#define ELFOSABI_AIX 7 /* AIX */ -#define ELFOSABI_IRIX 8 /* IRIX */ -#define ELFOSABI_FREEBSD 9 /* FreeBSD */ -#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ -#define ELFOSABI_MODESTO 11 /* Novell Modesto */ -#define ELFOSABI_OPENBSD 12 /* OpenBSD */ -#define ELFOSABI_OPENVMS 13 /* Open VMS */ -#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */ -#define ELFOSABI_AROS 15 /* Amiga Research OS */ -#define ELFOSABI_ARM 97 /* ARM */ -#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ - -/* e_ident */ -#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ - (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ - (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \ - (ehdr).e_ident[EI_MAG3] == ELFMAG3) - -/* Values for e_type. */ -#define ET_NONE 0 /* Unknown type. */ -#define ET_REL 1 /* Relocatable. */ -#define ET_EXEC 2 /* Executable. */ -#define ET_DYN 3 /* Shared object. */ -#define ET_CORE 4 /* Core file. */ -#define ET_LOOS 0xfe00 /* First operating system specific. */ -#define ET_HIOS 0xfeff /* Last operating system-specific. */ -#define ET_LOPROC 0xff00 /* First processor-specific. */ -#define ET_HIPROC 0xffff /* Last processor-specific. */ - -/* Values for e_machine. */ -#define EM_NONE 0 /* Unknown machine. */ -#define EM_M32 1 /* AT&T WE32100. */ -#define EM_SPARC 2 /* Sun SPARC. */ -#define EM_386 3 /* Intel i386. */ -#define EM_68K 4 /* Motorola 68000. */ -#define EM_88K 5 /* Motorola 88000. */ -#define EM_860 7 /* Intel i860. */ -#define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */ -#define EM_S370 9 /* IBM System/370. */ -#define EM_MIPS_RS3_LE 10 /* MIPS R3000 Little-Endian. */ -#define EM_PARISC 15 /* HP PA-RISC. */ -#define EM_VPP500 17 /* Fujitsu VPP500. */ -#define EM_SPARC32PLUS 18 /* SPARC v8plus. */ -#define EM_960 19 /* Intel 80960. */ -#define EM_PPC 20 /* PowerPC 32-bit. */ -#define EM_PPC64 21 /* PowerPC 64-bit. */ -#define EM_S390 22 /* IBM System/390. */ -#define EM_V800 36 /* NEC V800. */ -#define EM_FR20 37 /* Fujitsu FR20. */ -#define EM_RH32 38 /* TRW RH-32. */ -#define EM_RCE 39 /* Motorola RCE. */ -#define EM_ARM 40 /* ARM. */ -#define EM_SH 42 /* Hitachi SH. */ -#define EM_SPARCV9 43 /* SPARC v9 64-bit. */ -#define EM_TRICORE 44 /* Siemens TriCore embedded processor. */ -#define EM_ARC 45 /* Argonaut RISC Core. */ -#define EM_H8_300 46 /* Hitachi H8/300. */ -#define EM_H8_300H 47 /* Hitachi H8/300H. */ -#define EM_H8S 48 /* Hitachi H8S. */ -#define EM_H8_500 49 /* Hitachi H8/500. */ -#define EM_IA_64 50 /* Intel IA-64 Processor. */ -#define EM_MIPS_X 51 /* Stanford MIPS-X. */ -#define EM_COLDFIRE 52 /* Motorola ColdFire. */ -#define EM_68HC12 53 /* Motorola M68HC12. */ -#define EM_MMA 54 /* Fujitsu MMA. */ -#define EM_PCP 55 /* Siemens PCP. */ -#define EM_NCPU 56 /* Sony nCPU. */ -#define EM_NDR1 57 /* Denso NDR1 microprocessor. */ -#define EM_STARCORE 58 /* Motorola Star*Core processor. */ -#define EM_ME16 59 /* Toyota ME16 processor. */ -#define EM_ST100 60 /* STMicroelectronics ST100 processor. */ -#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ processor. */ -#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */ -#define EM_AMD64 EM_X86_64 /* Advanced Micro Devices x86-64 (compat) */ -#define EM_PDSP 63 /* Sony DSP Processor. */ -#define EM_FX66 66 /* Siemens FX66 microcontroller. */ -#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 - microcontroller. */ -#define EM_ST7 68 /* STmicroelectronics ST7 8-bit - microcontroller. */ -#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller. */ -#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller. */ -#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller. */ -#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller. */ -#define EM_SVX 73 /* Silicon Graphics SVx. */ -#define EM_ST19 74 /* STMicroelectronics ST19 8-bit mc. */ -#define EM_VAX 75 /* Digital VAX. */ -#define EM_CRIS 76 /* Axis Communications 32-bit embedded - processor. */ -#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded - processor. */ -#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor. */ -#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor. */ -#define EM_MMIX 80 /* Donald Knuth's educational 64-bit proc. */ -#define EM_HUANY 81 /* Harvard University machine-independent - object files. */ -#define EM_PRISM 82 /* SiTera Prism. */ -#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller. */ -#define EM_FR30 84 /* Fujitsu FR30. */ -#define EM_D10V 85 /* Mitsubishi D10V. */ -#define EM_D30V 86 /* Mitsubishi D30V. */ -#define EM_V850 87 /* NEC v850. */ -#define EM_M32R 88 /* Mitsubishi M32R. */ -#define EM_MN10300 89 /* Matsushita MN10300. */ -#define EM_MN10200 90 /* Matsushita MN10200. */ -#define EM_PJ 91 /* picoJava. */ -#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor. */ -#define EM_ARC_A5 93 /* ARC Cores Tangent-A5. */ -#define EM_XTENSA 94 /* Tensilica Xtensa Architecture. */ -#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor. */ -#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose - Processor. */ -#define EM_NS32K 97 /* National Semiconductor 32000 series. */ -#define EM_TPC 98 /* Tenor Network TPC processor. */ -#define EM_SNP1K 99 /* Trebia SNP 1000 processor. */ -#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller. */ -#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family. */ -#define EM_MAX 102 /* MAX Processor. */ -#define EM_CR 103 /* National Semiconductor CompactRISC - microprocessor. */ -#define EM_F2MC16 104 /* Fujitsu F2MC16. */ -#define EM_MSP430 105 /* Texas Instruments embedded microcontroller - msp430. */ -#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor. */ -#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors. */ -#define EM_SEP 108 /* Sharp embedded microprocessor. */ -#define EM_ARCA 109 /* Arca RISC Microprocessor. */ -#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. - and MPRC of Peking University */ - -/* Non-standard or deprecated. */ -#define EM_486 6 /* Intel i486. */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ -#define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */ - -/* Special section indexes. */ -#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */ -#define SHN_LORESERVE 0xff00 /* First of reserved range. */ -#define SHN_LOPROC 0xff00 /* First processor-specific. */ -#define SHN_HIPROC 0xff1f /* Last processor-specific. */ -#define SHN_LOOS 0xff20 /* First operating system-specific. */ -#define SHN_HIOS 0xff3f /* Last operating system-specific. */ -#define SHN_ABS 0xfff1 /* Absolute values. */ -#define SHN_COMMON 0xfff2 /* Common data. */ -#define SHN_XINDEX 0xffff /* Escape -- index stored elsewhere. */ -#define SHN_HIRESERVE 0xffff /* Last of reserved range. */ - -/* sh_type */ -#define SHT_NULL 0 /* inactive */ -#define SHT_PROGBITS 1 /* program defined information */ -#define SHT_SYMTAB 2 /* symbol table section */ -#define SHT_STRTAB 3 /* string table section */ -#define SHT_RELA 4 /* relocation section with addends */ -#define SHT_HASH 5 /* symbol hash table section */ -#define SHT_DYNAMIC 6 /* dynamic section */ -#define SHT_NOTE 7 /* note section */ -#define SHT_NOBITS 8 /* no space section */ -#define SHT_REL 9 /* relocation section - no addends */ -#define SHT_SHLIB 10 /* reserved - purpose unknown */ -#define SHT_DYNSYM 11 /* dynamic symbol table section */ -#define SHT_INIT_ARRAY 14 /* Initialization function pointers. */ -#define SHT_FINI_ARRAY 15 /* Termination function pointers. */ -#define SHT_PREINIT_ARRAY 16 /* Pre-initialization function ptrs. */ -#define SHT_GROUP 17 /* Section group. */ -#define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */ -#define SHT_LOOS 0x60000000 /* First of OS specific semantics */ -#define SHT_LOSUNW 0x6ffffff4 -#define SHT_SUNW_dof 0x6ffffff4 -#define SHT_SUNW_cap 0x6ffffff5 -#define SHT_SUNW_SIGNATURE 0x6ffffff6 -#define SHT_GNU_HASH 0x6ffffff6 -#define SHT_SUNW_ANNOTATE 0x6ffffff7 -#define SHT_SUNW_DEBUGSTR 0x6ffffff8 -#define SHT_SUNW_DEBUG 0x6ffffff9 -#define SHT_SUNW_move 0x6ffffffa -#define SHT_SUNW_COMDAT 0x6ffffffb -#define SHT_SUNW_syminfo 0x6ffffffc -#define SHT_SUNW_verdef 0x6ffffffd -#define SHT_GNU_verdef 0x6ffffffd /* Symbol versions provided */ -#define SHT_SUNW_verneed 0x6ffffffe -#define SHT_GNU_verneed 0x6ffffffe /* Symbol versions required */ -#define SHT_SUNW_versym 0x6fffffff -#define SHT_GNU_versym 0x6fffffff /* Symbol version table */ -#define SHT_HISUNW 0x6fffffff -#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ -#define SHT_LOPROC 0x70000000 /* reserved range for processor */ -#define SHT_AMD64_UNWIND 0x70000001 /* unwind information */ -#define SHT_MIPS_REGINFO 0x70000006 -#define SHT_MIPS_OPTIONS 0x7000000d -#define SHT_MIPS_DWARF 0x7000001e /* MIPS gcc uses MIPS_DWARF */ -#define SHT_HIPROC 0x7fffffff /* specific section header types */ -#define SHT_LOUSER 0x80000000 /* reserved range for application */ -#define SHT_HIUSER 0xffffffff /* specific indexes */ - -/* Flags for sh_flags. */ -#define SHF_WRITE 0x1 /* Section contains writable data. */ -#define SHF_ALLOC 0x2 /* Section occupies memory. */ -#define SHF_EXECINSTR 0x4 /* Section contains instructions. */ -#define SHF_MERGE 0x10 /* Section may be merged. */ -#define SHF_STRINGS 0x20 /* Section contains strings. */ -#define SHF_INFO_LINK 0x40 /* sh_info holds section index. */ -#define SHF_LINK_ORDER 0x80 /* Special ordering requirements. */ -#define SHF_OS_NONCONFORMING 0x100 /* OS-specific processing required. */ -#define SHF_GROUP 0x200 /* Member of section group. */ -#define SHF_TLS 0x400 /* Section contains TLS data. */ -#define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */ -#define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */ - -/* Values for p_type. */ -#define PT_NULL 0 /* Unused entry. */ -#define PT_LOAD 1 /* Loadable segment. */ -#define PT_DYNAMIC 2 /* Dynamic linking information segment. */ -#define PT_INTERP 3 /* Pathname of interpreter. */ -#define PT_NOTE 4 /* Auxiliary information. */ -#define PT_SHLIB 5 /* Reserved (not used). */ -#define PT_PHDR 6 /* Location of program header itself. */ -#define PT_TLS 7 /* Thread local storage segment */ -#define PT_LOOS 0x60000000 /* First OS-specific. */ -#define PT_SUNW_UNWIND 0x6464e550 /* amd64 UNWIND program header */ -#define PT_GNU_EH_FRAME 0x6474e550 -#define PT_GNU_STACK 0x6474e551 -#define PT_GNU_RELRO 0x6474e552 -#define PT_LOSUNW 0x6ffffffa -#define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ -#define PT_SUNWSTACK 0x6ffffffb /* describes the stack segment */ -#define PT_SUNWDTRACE 0x6ffffffc /* private */ -#define PT_SUNWCAP 0x6ffffffd /* hard/soft capabilities segment */ -#define PT_HISUNW 0x6fffffff -#define PT_HIOS 0x6fffffff /* Last OS-specific. */ -#define PT_LOPROC 0x70000000 /* First processor-specific type. */ -#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */ - -/* Values for p_flags. */ -#define PF_X 0x1 /* Executable. */ -#define PF_W 0x2 /* Writable. */ -#define PF_R 0x4 /* Readable. */ -#define PF_MASKOS 0x0ff00000 /* Operating system-specific. */ -#define PF_MASKPROC 0xf0000000 /* Processor-specific. */ - -/* Extended program header index. */ -#define PN_XNUM 0xffff - -/* Values for d_tag. */ -#define DT_NULL 0 /* Terminating entry. */ -#define DT_NEEDED 1 /* String table offset of a needed shared - library. */ -#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */ -#define DT_PLTGOT 3 /* Processor-dependent address. */ -#define DT_HASH 4 /* Address of symbol hash table. */ -#define DT_STRTAB 5 /* Address of string table. */ -#define DT_SYMTAB 6 /* Address of symbol table. */ -#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */ -#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */ -#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */ -#define DT_STRSZ 10 /* Size of string table. */ -#define DT_SYMENT 11 /* Size of each symbol table entry. */ -#define DT_INIT 12 /* Address of initialization function. */ -#define DT_FINI 13 /* Address of finalization function. */ -#define DT_SONAME 14 /* String table offset of shared object - name. */ -#define DT_RPATH 15 /* String table offset of library path. [sup] */ -#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */ -#define DT_REL 17 /* Address of ElfNN_Rel relocations. */ -#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */ -#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */ -#define DT_PLTREL 20 /* Type of relocation used for PLT. */ -#define DT_DEBUG 21 /* Reserved (not used). */ -#define DT_TEXTREL 22 /* Indicates there may be relocations in - non-writable segments. [sup] */ -#define DT_JMPREL 23 /* Address of PLT relocations. */ -#define DT_BIND_NOW 24 /* [sup] */ -#define DT_INIT_ARRAY 25 /* Address of the array of pointers to - initialization functions */ -#define DT_FINI_ARRAY 26 /* Address of the array of pointers to - termination functions */ -#define DT_INIT_ARRAYSZ 27 /* Size in bytes of the array of - initialization functions. */ -#define DT_FINI_ARRAYSZ 28 /* Size in bytes of the array of - termination functions. */ -#define DT_RUNPATH 29 /* String table offset of a null-terminated - library search path string. */ -#define DT_FLAGS 30 /* Object specific flag values. */ -#define DT_ENCODING 32 /* Values greater than or equal to DT_ENCODING - and less than DT_LOOS follow the rules for - the interpretation of the d_un union - as follows: even == 'd_ptr', odd == 'd_val' - or none */ -#define DT_PREINIT_ARRAY 32 /* Address of the array of pointers to - pre-initialization functions. */ -#define DT_PREINIT_ARRAYSZ 33 /* Size in bytes of the array of - pre-initialization functions. */ -#define DT_MAXPOSTAGS 34 /* number of positive tags */ -#define DT_LOOS 0x6000000d /* First OS-specific */ -#define DT_SUNW_AUXILIARY 0x6000000d /* symbol auxiliary name */ -#define DT_SUNW_RTLDINF 0x6000000e /* ld.so.1 info (private) */ -#define DT_SUNW_FILTER 0x6000000f /* symbol filter name */ -#define DT_SUNW_CAP 0x60000010 /* hardware/software */ -#define DT_HIOS 0x6ffff000 /* Last OS-specific */ - -/* - * DT_* entries which fall between DT_VALRNGHI & DT_VALRNGLO use the - * Dyn.d_un.d_val field of the Elf*_Dyn structure. - */ -#define DT_VALRNGLO 0x6ffffd00 -#define DT_CHECKSUM 0x6ffffdf8 /* elf checksum */ -#define DT_PLTPADSZ 0x6ffffdf9 /* pltpadding size */ -#define DT_MOVEENT 0x6ffffdfa /* move table entry size */ -#define DT_MOVESZ 0x6ffffdfb /* move table size */ -#define DT_FEATURE_1 0x6ffffdfc /* feature holder */ -#define DT_POSFLAG_1 0x6ffffdfd /* flags for DT_* entries, effecting */ - /* the following DT_* entry. */ - /* See DF_P1_* definitions */ -#define DT_SYMINSZ 0x6ffffdfe /* syminfo table size (in bytes) */ -#define DT_SYMINENT 0x6ffffdff /* syminfo entry size (in bytes) */ -#define DT_VALRNGHI 0x6ffffdff - -/* - * DT_* entries which fall between DT_ADDRRNGHI & DT_ADDRRNGLO use the - * Dyn.d_un.d_ptr field of the Elf*_Dyn structure. - * - * If any adjustment is made to the ELF object after it has been - * built, these entries will need to be adjusted. - */ -#define DT_ADDRRNGLO 0x6ffffe00 -#define DT_GNU_HASH 0x6ffffef5 /* GNU-style hash table */ -#define DT_CONFIG 0x6ffffefa /* configuration information */ -#define DT_DEPAUDIT 0x6ffffefb /* dependency auditing */ -#define DT_AUDIT 0x6ffffefc /* object auditing */ -#define DT_PLTPAD 0x6ffffefd /* pltpadding (sparcv9) */ -#define DT_MOVETAB 0x6ffffefe /* move table */ -#define DT_SYMINFO 0x6ffffeff /* syminfo table */ -#define DT_ADDRRNGHI 0x6ffffeff -#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) /* Reverse order! */ -#define DT_ADDRNUM 11 - -#define DT_VERSYM 0x6ffffff0 /* Address of versym section. */ -#define DT_RELACOUNT 0x6ffffff9 /* number of RELATIVE relocations */ -#define DT_RELCOUNT 0x6ffffffa /* number of RELATIVE relocations */ -#define DT_FLAGS_1 0x6ffffffb /* state flags - see DF_1_* defs */ -#define DT_VERDEF 0x6ffffffc /* Address of verdef section. */ -#define DT_VERDEFNUM 0x6ffffffd /* Number of elems in verdef section */ -#define DT_VERNEED 0x6ffffffe /* Address of verneed section. */ -#define DT_VERNEEDNUM 0x6fffffff /* Number of elems in verneed section */ - -#define DT_LOPROC 0x70000000 /* First processor-specific type. */ -#define DT_DEPRECATED_SPARC_REGISTER 0x7000001 -#define DT_AUXILIARY 0x7ffffffd /* shared library auxiliary name */ -#define DT_USED 0x7ffffffe /* ignored - same as needed */ -#define DT_FILTER 0x7fffffff /* shared library filter name */ -#define DT_HIPROC 0x7fffffff /* Last processor-specific type. */ - -/* Values for DT_FLAGS */ -#define DF_ORIGIN 0x0001 /* Indicates that the object being loaded may - make reference to the $ORIGIN substitution - string */ -#define DF_SYMBOLIC 0x0002 /* Indicates "symbolic" linking. */ -#define DF_TEXTREL 0x0004 /* Indicates there may be relocations in - non-writable segments. */ -#define DF_BIND_NOW 0x0008 /* Indicates that the dynamic linker should - process all relocations for the object - containing this entry before transferring - control to the program. */ -#define DF_STATIC_TLS 0x0010 /* Indicates that the shared object or - executable contains code using a static - thread-local storage scheme. */ - -/* Values for DT_FLAGS_1 */ -#define DF_1_BIND_NOW 0x00000001 /* Same as DF_BIND_NOW */ -#define DF_1_GLOBAL 0x00000002 /* Set the RTLD_GLOBAL for object */ -#define DF_1_NODELETE 0x00000008 /* Set the RTLD_NODELETE for object */ -#define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filtees */ -#define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */ -#define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */ -#define DF_1_NODEFLIB 0x00000800 /* Do not search default paths */ - -/* Values for n_type. Used in core files. */ -#define NT_PRSTATUS 1 /* Process status. */ -#define NT_FPREGSET 2 /* Floating point registers. */ -#define NT_PRPSINFO 3 /* Process state info. */ -#define NT_THRMISC 7 /* Thread miscellaneous info. */ - -/* Symbol Binding - ELFNN_ST_BIND - st_info */ -#define STB_LOCAL 0 /* Local symbol */ -#define STB_GLOBAL 1 /* Global symbol */ -#define STB_WEAK 2 /* like global - lower precedence */ -#define STB_LOOS 10 /* Reserved range for operating system */ -#define STB_HIOS 12 /* specific semantics. */ -#define STB_LOPROC 13 /* reserved range for processor */ -#define STB_HIPROC 15 /* specific semantics. */ - -/* Symbol type - ELFNN_ST_TYPE - st_info */ -#define STT_NOTYPE 0 /* Unspecified type. */ -#define STT_OBJECT 1 /* Data object. */ -#define STT_FUNC 2 /* Function. */ -#define STT_SECTION 3 /* Section. */ -#define STT_FILE 4 /* Source file. */ -#define STT_COMMON 5 /* Uninitialized common block. */ -#define STT_TLS 6 /* TLS object. */ -#define STT_LOOS 10 /* Reserved range for operating system */ -#define STT_GNU_IFUNC 10 -#define STT_HIOS 12 /* specific semantics. */ - -/* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */ -#define STV_DEFAULT 0x0 /* Default visibility (see binding). */ -#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */ -#define STV_HIDDEN 0x2 /* Not visible. */ -#define STV_PROTECTED 0x3 /* Visible but not preemptible. */ -#define STV_EXPORTED 0x4 -#define STV_SINGLETON 0x5 -#define STV_ELIMINATE 0x6 - -/* Special symbol table indexes. */ -#define STN_UNDEF 0 /* Undefined symbol index. */ - -/* Symbol versioning flags. */ -#define VER_DEF_CURRENT 1 -#define VER_DEF_IDX(x) VER_NDX(x) - -#define VER_FLG_BASE 0x01 -#define VER_FLG_WEAK 0x02 - -#define VER_NEED_CURRENT 1 -#define VER_NEED_WEAK (1u << 15) -#define VER_NEED_HIDDEN VER_NDX_HIDDEN -#define VER_NEED_IDX(x) VER_NDX(x) - -#define VER_NDX_LOCAL 0 -#define VER_NDX_GLOBAL 1 -#define VER_NDX_GIVEN 2 - -#define VER_NDX_HIDDEN (1u << 15) -#define VER_NDX(x) ((x) & ~(1u << 15)) - -#define CA_SUNW_NULL 0 -#define CA_SUNW_HW_1 1 /* first hardware capabilities entry */ -#define CA_SUNW_SF_1 2 /* first software capabilities entry */ - -/* - * Syminfo flag values - */ -#define SYMINFO_FLG_DIRECT 0x0001 /* symbol ref has direct association */ - /* to object containing defn. */ -#define SYMINFO_FLG_PASSTHRU 0x0002 /* ignored - see SYMINFO_FLG_FILTER */ -#define SYMINFO_FLG_COPY 0x0004 /* symbol is a copy-reloc */ -#define SYMINFO_FLG_LAZYLOAD 0x0008 /* object containing defn should be */ - /* lazily-loaded */ -#define SYMINFO_FLG_DIRECTBIND 0x0010 /* ref should be bound directly to */ - /* object containing defn. */ -#define SYMINFO_FLG_NOEXTDIRECT 0x0020 /* don't let an external reference */ - /* directly bind to this symbol */ -#define SYMINFO_FLG_FILTER 0x0002 /* symbol ref is associated to a */ -#define SYMINFO_FLG_AUXILIARY 0x0040 /* standard or auxiliary filter */ - -/* - * Syminfo.si_boundto values. - */ -#define SYMINFO_BT_SELF 0xffff /* symbol bound to self */ -#define SYMINFO_BT_PARENT 0xfffe /* symbol bound to parent */ -#define SYMINFO_BT_NONE 0xfffd /* no special symbol binding */ -#define SYMINFO_BT_EXTERN 0xfffc /* symbol defined as external */ -#define SYMINFO_BT_LOWRESERVE 0xff00 /* beginning of reserved entries */ - -/* - * Syminfo version values. - */ -#define SYMINFO_NONE 0 /* Syminfo version */ -#define SYMINFO_CURRENT 1 -#define SYMINFO_NUM 2 - -/* - * Relocation types. - * - * All machine architectures are defined here to allow tools on one to - * handle others. - */ - -#define R_386_NONE 0 /* No relocation. */ -#define R_386_32 1 /* Add symbol value. */ -#define R_386_PC32 2 /* Add PC-relative symbol value. */ -#define R_386_GOT32 3 /* Add PC-relative GOT offset. */ -#define R_386_PLT32 4 /* Add PC-relative PLT offset. */ -#define R_386_COPY 5 /* Copy data from shared object. */ -#define R_386_GLOB_DAT 6 /* Set GOT entry to data address. */ -#define R_386_JMP_SLOT 7 /* Set GOT entry to code address. */ -#define R_386_RELATIVE 8 /* Add load address of shared object. */ -#define R_386_GOTOFF 9 /* Add GOT-relative symbol address. */ -#define R_386_GOTPC 10 /* Add PC-relative GOT table address. */ -#define R_386_TLS_TPOFF 14 /* Negative offset in static TLS block */ -#define R_386_TLS_IE 15 /* Absolute address of GOT for -ve static TLS */ -#define R_386_TLS_GOTIE 16 /* GOT entry for negative static TLS block */ -#define R_386_TLS_LE 17 /* Negative offset relative to static TLS */ -#define R_386_TLS_GD 18 /* 32 bit offset to GOT (index,off) pair */ -#define R_386_TLS_LDM 19 /* 32 bit offset to GOT (index,zero) pair */ -#define R_386_TLS_GD_32 24 /* 32 bit offset to GOT (index,off) pair */ -#define R_386_TLS_GD_PUSH 25 /* pushl instruction for Sun ABI GD sequence */ -#define R_386_TLS_GD_CALL 26 /* call instruction for Sun ABI GD sequence */ -#define R_386_TLS_GD_POP 27 /* popl instruction for Sun ABI GD sequence */ -#define R_386_TLS_LDM_32 28 /* 32 bit offset to GOT (index,zero) pair */ -#define R_386_TLS_LDM_PUSH 29 /* pushl instruction for Sun ABI LD sequence */ -#define R_386_TLS_LDM_CALL 30 /* call instruction for Sun ABI LD sequence */ -#define R_386_TLS_LDM_POP 31 /* popl instruction for Sun ABI LD sequence */ -#define R_386_TLS_LDO_32 32 /* 32 bit offset from start of TLS block */ -#define R_386_TLS_IE_32 33 /* 32 bit offset to GOT static TLS offset entry */ -#define R_386_TLS_LE_32 34 /* 32 bit offset within static TLS block */ -#define R_386_TLS_DTPMOD32 35 /* GOT entry containing TLS index */ -#define R_386_TLS_DTPOFF32 36 /* GOT entry containing TLS offset */ -#define R_386_TLS_TPOFF32 37 /* GOT entry of -ve static TLS offset */ -#define R_386_IRELATIVE 42 /* PLT entry resolved indirectly at runtime */ - -#define R_ARM_NONE 0 /* No relocation. */ -#define R_ARM_PC24 1 -#define R_ARM_ABS32 2 -#define R_ARM_REL32 3 -#define R_ARM_PC13 4 -#define R_ARM_ABS16 5 -#define R_ARM_ABS12 6 -#define R_ARM_THM_ABS5 7 -#define R_ARM_ABS8 8 -#define R_ARM_SBREL32 9 -#define R_ARM_THM_PC22 10 -#define R_ARM_THM_PC8 11 -#define R_ARM_AMP_VCALL9 12 -#define R_ARM_SWI24 13 -#define R_ARM_THM_SWI8 14 -#define R_ARM_XPC25 15 -#define R_ARM_THM_XPC22 16 -/* TLS relocations */ -#define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */ -#define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */ -#define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */ -#define R_ARM_COPY 20 /* Copy data from shared object. */ -#define R_ARM_GLOB_DAT 21 /* Set GOT entry to data address. */ -#define R_ARM_JUMP_SLOT 22 /* Set GOT entry to code address. */ -#define R_ARM_RELATIVE 23 /* Add load address of shared object. */ -#define R_ARM_GOTOFF 24 /* Add GOT-relative symbol address. */ -#define R_ARM_GOTPC 25 /* Add PC-relative GOT table address. */ -#define R_ARM_GOT32 26 /* Add PC-relative GOT offset. */ -#define R_ARM_PLT32 27 /* Add PC-relative PLT offset. */ -#define R_ARM_GNU_VTENTRY 100 -#define R_ARM_GNU_VTINHERIT 101 -#define R_ARM_RSBREL32 250 -#define R_ARM_THM_RPC22 251 -#define R_ARM_RREL32 252 -#define R_ARM_RABS32 253 -#define R_ARM_RPC24 254 -#define R_ARM_RBASE 255 - -/* Name Value Field Calculation */ -#define R_IA_64_NONE 0 /* None */ -#define R_IA_64_IMM14 0x21 /* immediate14 S + A */ -#define R_IA_64_IMM22 0x22 /* immediate22 S + A */ -#define R_IA_64_IMM64 0x23 /* immediate64 S + A */ -#define R_IA_64_DIR32MSB 0x24 /* word32 MSB S + A */ -#define R_IA_64_DIR32LSB 0x25 /* word32 LSB S + A */ -#define R_IA_64_DIR64MSB 0x26 /* word64 MSB S + A */ -#define R_IA_64_DIR64LSB 0x27 /* word64 LSB S + A */ -#define R_IA_64_GPREL22 0x2a /* immediate22 @gprel(S + A) */ -#define R_IA_64_GPREL64I 0x2b /* immediate64 @gprel(S + A) */ -#define R_IA_64_GPREL32MSB 0x2c /* word32 MSB @gprel(S + A) */ -#define R_IA_64_GPREL32LSB 0x2d /* word32 LSB @gprel(S + A) */ -#define R_IA_64_GPREL64MSB 0x2e /* word64 MSB @gprel(S + A) */ -#define R_IA_64_GPREL64LSB 0x2f /* word64 LSB @gprel(S + A) */ -#define R_IA_64_LTOFF22 0x32 /* immediate22 @ltoff(S + A) */ -#define R_IA_64_LTOFF64I 0x33 /* immediate64 @ltoff(S + A) */ -#define R_IA_64_PLTOFF22 0x3a /* immediate22 @pltoff(S + A) */ -#define R_IA_64_PLTOFF64I 0x3b /* immediate64 @pltoff(S + A) */ -#define R_IA_64_PLTOFF64MSB 0x3e /* word64 MSB @pltoff(S + A) */ -#define R_IA_64_PLTOFF64LSB 0x3f /* word64 LSB @pltoff(S + A) */ -#define R_IA_64_FPTR64I 0x43 /* immediate64 @fptr(S + A) */ -#define R_IA_64_FPTR32MSB 0x44 /* word32 MSB @fptr(S + A) */ -#define R_IA_64_FPTR32LSB 0x45 /* word32 LSB @fptr(S + A) */ -#define R_IA_64_FPTR64MSB 0x46 /* word64 MSB @fptr(S + A) */ -#define R_IA_64_FPTR64LSB 0x47 /* word64 LSB @fptr(S + A) */ -#define R_IA_64_PCREL60B 0x48 /* immediate60 form1 S + A - P */ -#define R_IA_64_PCREL21B 0x49 /* immediate21 form1 S + A - P */ -#define R_IA_64_PCREL21M 0x4a /* immediate21 form2 S + A - P */ -#define R_IA_64_PCREL21F 0x4b /* immediate21 form3 S + A - P */ -#define R_IA_64_PCREL32MSB 0x4c /* word32 MSB S + A - P */ -#define R_IA_64_PCREL32LSB 0x4d /* word32 LSB S + A - P */ -#define R_IA_64_PCREL64MSB 0x4e /* word64 MSB S + A - P */ -#define R_IA_64_PCREL64LSB 0x4f /* word64 LSB S + A - P */ -#define R_IA_64_LTOFF_FPTR22 0x52 /* immediate22 @ltoff(@fptr(S + A)) */ -#define R_IA_64_LTOFF_FPTR64I 0x53 /* immediate64 @ltoff(@fptr(S + A)) */ -#define R_IA_64_LTOFF_FPTR32MSB 0x54 /* word32 MSB @ltoff(@fptr(S + A)) */ -#define R_IA_64_LTOFF_FPTR32LSB 0x55 /* word32 LSB @ltoff(@fptr(S + A)) */ -#define R_IA_64_LTOFF_FPTR64MSB 0x56 /* word64 MSB @ltoff(@fptr(S + A)) */ -#define R_IA_64_LTOFF_FPTR64LSB 0x57 /* word64 LSB @ltoff(@fptr(S + A)) */ -#define R_IA_64_SEGREL32MSB 0x5c /* word32 MSB @segrel(S + A) */ -#define R_IA_64_SEGREL32LSB 0x5d /* word32 LSB @segrel(S + A) */ -#define R_IA_64_SEGREL64MSB 0x5e /* word64 MSB @segrel(S + A) */ -#define R_IA_64_SEGREL64LSB 0x5f /* word64 LSB @segrel(S + A) */ -#define R_IA_64_SECREL32MSB 0x64 /* word32 MSB @secrel(S + A) */ -#define R_IA_64_SECREL32LSB 0x65 /* word32 LSB @secrel(S + A) */ -#define R_IA_64_SECREL64MSB 0x66 /* word64 MSB @secrel(S + A) */ -#define R_IA_64_SECREL64LSB 0x67 /* word64 LSB @secrel(S + A) */ -#define R_IA_64_REL32MSB 0x6c /* word32 MSB BD + A */ -#define R_IA_64_REL32LSB 0x6d /* word32 LSB BD + A */ -#define R_IA_64_REL64MSB 0x6e /* word64 MSB BD + A */ -#define R_IA_64_REL64LSB 0x6f /* word64 LSB BD + A */ -#define R_IA_64_LTV32MSB 0x74 /* word32 MSB S + A */ -#define R_IA_64_LTV32LSB 0x75 /* word32 LSB S + A */ -#define R_IA_64_LTV64MSB 0x76 /* word64 MSB S + A */ -#define R_IA_64_LTV64LSB 0x77 /* word64 LSB S + A */ -#define R_IA_64_PCREL21BI 0x79 /* immediate21 form1 S + A - P */ -#define R_IA_64_PCREL22 0x7a /* immediate22 S + A - P */ -#define R_IA_64_PCREL64I 0x7b /* immediate64 S + A - P */ -#define R_IA_64_IPLTMSB 0x80 /* function descriptor MSB special */ -#define R_IA_64_IPLTLSB 0x81 /* function descriptor LSB speciaal */ -#define R_IA_64_SUB 0x85 /* immediate64 A - S */ -#define R_IA_64_LTOFF22X 0x86 /* immediate22 special */ -#define R_IA_64_LDXMOV 0x87 /* immediate22 special */ -#define R_IA_64_TPREL14 0x91 /* imm14 @tprel(S + A) */ -#define R_IA_64_TPREL22 0x92 /* imm22 @tprel(S + A) */ -#define R_IA_64_TPREL64I 0x93 /* imm64 @tprel(S + A) */ -#define R_IA_64_TPREL64MSB 0x96 /* word64 MSB @tprel(S + A) */ -#define R_IA_64_TPREL64LSB 0x97 /* word64 LSB @tprel(S + A) */ -#define R_IA_64_LTOFF_TPREL22 0x9a /* imm22 @ltoff(@tprel(S+A)) */ -#define R_IA_64_DTPMOD64MSB 0xa6 /* word64 MSB @dtpmod(S + A) */ -#define R_IA_64_DTPMOD64LSB 0xa7 /* word64 LSB @dtpmod(S + A) */ -#define R_IA_64_LTOFF_DTPMOD22 0xaa /* imm22 @ltoff(@dtpmod(S+A)) */ -#define R_IA_64_DTPREL14 0xb1 /* imm14 @dtprel(S + A) */ -#define R_IA_64_DTPREL22 0xb2 /* imm22 @dtprel(S + A) */ -#define R_IA_64_DTPREL64I 0xb3 /* imm64 @dtprel(S + A) */ -#define R_IA_64_DTPREL32MSB 0xb4 /* word32 MSB @dtprel(S + A) */ -#define R_IA_64_DTPREL32LSB 0xb5 /* word32 LSB @dtprel(S + A) */ -#define R_IA_64_DTPREL64MSB 0xb6 /* word64 MSB @dtprel(S + A) */ -#define R_IA_64_DTPREL64LSB 0xb7 /* word64 LSB @dtprel(S + A) */ -#define R_IA_64_LTOFF_DTPREL22 0xba /* imm22 @ltoff(@dtprel(S+A)) */ - -#define R_MIPS_NONE 0 /* No reloc */ -#define R_MIPS_16 1 /* Direct 16 bit */ -#define R_MIPS_32 2 /* Direct 32 bit */ -#define R_MIPS_REL32 3 /* PC relative 32 bit */ -#define R_MIPS_26 4 /* Direct 26 bit shifted */ -#define R_MIPS_HI16 5 /* High 16 bit */ -#define R_MIPS_LO16 6 /* Low 16 bit */ -#define R_MIPS_GPREL16 7 /* GP relative 16 bit */ -#define R_MIPS_LITERAL 8 /* 16 bit literal entry */ -#define R_MIPS_GOT16 9 /* 16 bit GOT entry */ -#define R_MIPS_PC16 10 /* PC relative 16 bit */ -#define R_MIPS_CALL16 11 /* 16 bit GOT entry for function */ -#define R_MIPS_GPREL32 12 /* GP relative 32 bit */ -#define R_MIPS_GOTHI16 21 /* GOT HI 16 bit */ -#define R_MIPS_GOTLO16 22 /* GOT LO 16 bit */ -#define R_MIPS_CALLHI16 30 /* upper 16 bit GOT entry for function */ -#define R_MIPS_CALLLO16 31 /* lower 16 bit GOT entry for function */ - -#define R_PPC_NONE 0 /* No relocation. */ -#define R_PPC_ADDR32 1 -#define R_PPC_ADDR24 2 -#define R_PPC_ADDR16 3 -#define R_PPC_ADDR16_LO 4 -#define R_PPC_ADDR16_HI 5 -#define R_PPC_ADDR16_HA 6 -#define R_PPC_ADDR14 7 -#define R_PPC_ADDR14_BRTAKEN 8 -#define R_PPC_ADDR14_BRNTAKEN 9 -#define R_PPC_REL24 10 -#define R_PPC_REL14 11 -#define R_PPC_REL14_BRTAKEN 12 -#define R_PPC_REL14_BRNTAKEN 13 -#define R_PPC_GOT16 14 -#define R_PPC_GOT16_LO 15 -#define R_PPC_GOT16_HI 16 -#define R_PPC_GOT16_HA 17 -#define R_PPC_PLTREL24 18 -#define R_PPC_COPY 19 -#define R_PPC_GLOB_DAT 20 -#define R_PPC_JMP_SLOT 21 -#define R_PPC_RELATIVE 22 -#define R_PPC_LOCAL24PC 23 -#define R_PPC_UADDR32 24 -#define R_PPC_UADDR16 25 -#define R_PPC_REL32 26 -#define R_PPC_PLT32 27 -#define R_PPC_PLTREL32 28 -#define R_PPC_PLT16_LO 29 -#define R_PPC_PLT16_HI 30 -#define R_PPC_PLT16_HA 31 -#define R_PPC_SDAREL16 32 -#define R_PPC_SECTOFF 33 -#define R_PPC_SECTOFF_LO 34 -#define R_PPC_SECTOFF_HI 35 -#define R_PPC_SECTOFF_HA 36 - -/* - * 64-bit relocations - */ -#define R_PPC64_ADDR64 38 -#define R_PPC64_ADDR16_HIGHER 39 -#define R_PPC64_ADDR16_HIGHERA 40 -#define R_PPC64_ADDR16_HIGHEST 41 -#define R_PPC64_ADDR16_HIGHESTA 42 -#define R_PPC64_UADDR64 43 -#define R_PPC64_REL64 44 -#define R_PPC64_PLT64 45 -#define R_PPC64_PLTREL64 46 -#define R_PPC64_TOC16 47 -#define R_PPC64_TOC16_LO 48 -#define R_PPC64_TOC16_HI 49 -#define R_PPC64_TOC16_HA 50 -#define R_PPC64_TOC 51 -#define R_PPC64_DTPMOD64 68 -#define R_PPC64_TPREL64 73 -#define R_PPC64_DTPREL64 78 - -/* - * TLS relocations - */ -#define R_PPC_TLS 67 -#define R_PPC_DTPMOD32 68 -#define R_PPC_TPREL16 69 -#define R_PPC_TPREL16_LO 70 -#define R_PPC_TPREL16_HI 71 -#define R_PPC_TPREL16_HA 72 -#define R_PPC_TPREL32 73 -#define R_PPC_DTPREL16 74 -#define R_PPC_DTPREL16_LO 75 -#define R_PPC_DTPREL16_HI 76 -#define R_PPC_DTPREL16_HA 77 -#define R_PPC_DTPREL32 78 -#define R_PPC_GOT_TLSGD16 79 -#define R_PPC_GOT_TLSGD16_LO 80 -#define R_PPC_GOT_TLSGD16_HI 81 -#define R_PPC_GOT_TLSGD16_HA 82 -#define R_PPC_GOT_TLSLD16 83 -#define R_PPC_GOT_TLSLD16_LO 84 -#define R_PPC_GOT_TLSLD16_HI 85 -#define R_PPC_GOT_TLSLD16_HA 86 -#define R_PPC_GOT_TPREL16 87 -#define R_PPC_GOT_TPREL16_LO 88 -#define R_PPC_GOT_TPREL16_HI 89 -#define R_PPC_GOT_TPREL16_HA 90 - -/* - * The remaining relocs are from the Embedded ELF ABI, and are not in the - * SVR4 ELF ABI. - */ - -#define R_PPC_EMB_NADDR32 101 -#define R_PPC_EMB_NADDR16 102 -#define R_PPC_EMB_NADDR16_LO 103 -#define R_PPC_EMB_NADDR16_HI 104 -#define R_PPC_EMB_NADDR16_HA 105 -#define R_PPC_EMB_SDAI16 106 -#define R_PPC_EMB_SDA2I16 107 -#define R_PPC_EMB_SDA2REL 108 -#define R_PPC_EMB_SDA21 109 -#define R_PPC_EMB_MRKREF 110 -#define R_PPC_EMB_RELSEC16 111 -#define R_PPC_EMB_RELST_LO 112 -#define R_PPC_EMB_RELST_HI 113 -#define R_PPC_EMB_RELST_HA 114 -#define R_PPC_EMB_BIT_FLD 115 -#define R_PPC_EMB_RELSDA 116 - -#define R_SPARC_NONE 0 -#define R_SPARC_8 1 -#define R_SPARC_16 2 -#define R_SPARC_32 3 -#define R_SPARC_DISP8 4 -#define R_SPARC_DISP16 5 -#define R_SPARC_DISP32 6 -#define R_SPARC_WDISP30 7 -#define R_SPARC_WDISP22 8 -#define R_SPARC_HI22 9 -#define R_SPARC_22 10 -#define R_SPARC_13 11 -#define R_SPARC_LO10 12 -#define R_SPARC_GOT10 13 -#define R_SPARC_GOT13 14 -#define R_SPARC_GOT22 15 -#define R_SPARC_PC10 16 -#define R_SPARC_PC22 17 -#define R_SPARC_WPLT30 18 -#define R_SPARC_COPY 19 -#define R_SPARC_GLOB_DAT 20 -#define R_SPARC_JMP_SLOT 21 -#define R_SPARC_RELATIVE 22 -#define R_SPARC_UA32 23 -#define R_SPARC_PLT32 24 -#define R_SPARC_HIPLT22 25 -#define R_SPARC_LOPLT10 26 -#define R_SPARC_PCPLT32 27 -#define R_SPARC_PCPLT22 28 -#define R_SPARC_PCPLT10 29 -#define R_SPARC_10 30 -#define R_SPARC_11 31 -#define R_SPARC_64 32 -#define R_SPARC_OLO10 33 -#define R_SPARC_HH22 34 -#define R_SPARC_HM10 35 -#define R_SPARC_LM22 36 -#define R_SPARC_PC_HH22 37 -#define R_SPARC_PC_HM10 38 -#define R_SPARC_PC_LM22 39 -#define R_SPARC_WDISP16 40 -#define R_SPARC_WDISP19 41 -#define R_SPARC_GLOB_JMP 42 -#define R_SPARC_7 43 -#define R_SPARC_5 44 -#define R_SPARC_6 45 -#define R_SPARC_DISP64 46 -#define R_SPARC_PLT64 47 -#define R_SPARC_HIX22 48 -#define R_SPARC_LOX10 49 -#define R_SPARC_H44 50 -#define R_SPARC_M44 51 -#define R_SPARC_L44 52 -#define R_SPARC_REGISTER 53 -#define R_SPARC_UA64 54 -#define R_SPARC_UA16 55 -#define R_SPARC_TLS_GD_HI22 56 -#define R_SPARC_TLS_GD_LO10 57 -#define R_SPARC_TLS_GD_ADD 58 -#define R_SPARC_TLS_GD_CALL 59 -#define R_SPARC_TLS_LDM_HI22 60 -#define R_SPARC_TLS_LDM_LO10 61 -#define R_SPARC_TLS_LDM_ADD 62 -#define R_SPARC_TLS_LDM_CALL 63 -#define R_SPARC_TLS_LDO_HIX22 64 -#define R_SPARC_TLS_LDO_LOX10 65 -#define R_SPARC_TLS_LDO_ADD 66 -#define R_SPARC_TLS_IE_HI22 67 -#define R_SPARC_TLS_IE_LO10 68 -#define R_SPARC_TLS_IE_LD 69 -#define R_SPARC_TLS_IE_LDX 70 -#define R_SPARC_TLS_IE_ADD 71 -#define R_SPARC_TLS_LE_HIX22 72 -#define R_SPARC_TLS_LE_LOX10 73 -#define R_SPARC_TLS_DTPMOD32 74 -#define R_SPARC_TLS_DTPMOD64 75 -#define R_SPARC_TLS_DTPOFF32 76 -#define R_SPARC_TLS_DTPOFF64 77 -#define R_SPARC_TLS_TPOFF32 78 -#define R_SPARC_TLS_TPOFF64 79 - -#define R_X86_64_NONE 0 /* No relocation. */ -#define R_X86_64_64 1 /* Add 64 bit symbol value. */ -#define R_X86_64_PC32 2 /* PC-relative 32 bit signed sym value. */ -#define R_X86_64_GOT32 3 /* PC-relative 32 bit GOT offset. */ -#define R_X86_64_PLT32 4 /* PC-relative 32 bit PLT offset. */ -#define R_X86_64_COPY 5 /* Copy data from shared object. */ -#define R_X86_64_GLOB_DAT 6 /* Set GOT entry to data address. */ -#define R_X86_64_JMP_SLOT 7 /* Set GOT entry to code address. */ -#define R_X86_64_RELATIVE 8 /* Add load address of shared object. */ -#define R_X86_64_GOTPCREL 9 /* Add 32 bit signed pcrel offset to GOT. */ -#define R_X86_64_32 10 /* Add 32 bit zero extended symbol value */ -#define R_X86_64_32S 11 /* Add 32 bit sign extended symbol value */ -#define R_X86_64_16 12 /* Add 16 bit zero extended symbol value */ -#define R_X86_64_PC16 13 /* Add 16 bit signed extended pc relative symbol value */ -#define R_X86_64_8 14 /* Add 8 bit zero extended symbol value */ -#define R_X86_64_PC8 15 /* Add 8 bit signed extended pc relative symbol value */ -#define R_X86_64_DTPMOD64 16 /* ID of module containing symbol */ -#define R_X86_64_DTPOFF64 17 /* Offset in TLS block */ -#define R_X86_64_TPOFF64 18 /* Offset in static TLS block */ -#define R_X86_64_TLSGD 19 /* PC relative offset to GD GOT entry */ -#define R_X86_64_TLSLD 20 /* PC relative offset to LD GOT entry */ -#define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ -#define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ -#define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ -#define R_X86_64_IRELATIVE 37 - - -#endif /* !_SYS_ELF_COMMON_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/internal/elfheader/elfstructs.h b/sgx-jvm/linux-sgx/common/inc/internal/elfheader/elfstructs.h deleted file mode 100644 index 77362f3b9e..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/elfheader/elfstructs.h +++ /dev/null @@ -1,527 +0,0 @@ -#ifndef __XEN_PUBLIC_ELFSTRUCTS_H__ -#define __XEN_PUBLIC_ELFSTRUCTS_H__ 1 -/* - * Copyright (c) 1995, 1996 Erik Theisen. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -typedef uint8_t Elf_Byte; - -typedef uint32_t Elf32_Addr; /* Unsigned program address */ -typedef uint32_t Elf32_Off; /* Unsigned file offset */ -typedef int32_t Elf32_Sword; /* Signed large integer */ -typedef uint32_t Elf32_Word; /* Unsigned large integer */ -typedef uint16_t Elf32_Half; /* Unsigned medium integer */ - -typedef uint64_t Elf64_Addr; -typedef uint64_t Elf64_Off; -typedef int32_t Elf64_Shalf; - -typedef int32_t Elf64_Sword; -typedef uint32_t Elf64_Word; - -typedef int64_t Elf64_Sxword; -typedef uint64_t Elf64_Xword; - -typedef uint32_t Elf64_Half; -typedef uint16_t Elf64_Quarter; - -/* - * e_ident[] identification indexes - * See http://www.caldera.com/developers/gabi/2000-07-17/ch4.eheader.html - */ -#define EI_MAG0 0 /* file ID */ -#define EI_MAG1 1 /* file ID */ -#define EI_MAG2 2 /* file ID */ -#define EI_MAG3 3 /* file ID */ -#define EI_CLASS 4 /* file class */ -#define EI_DATA 5 /* data encoding */ -#define EI_VERSION 6 /* ELF header version */ -#define EI_OSABI 7 /* OS/ABI ID */ -#define EI_ABIVERSION 8 /* ABI version */ -#define EI_PAD 9 /* start of pad bytes */ -#define EI_NIDENT 16 /* Size of e_ident[] */ - -/* e_ident[] magic number */ -#define ELFMAG0 0x7f /* e_ident[EI_MAG0] */ -#define ELFMAG1 'E' /* e_ident[EI_MAG1] */ -#define ELFMAG2 'L' /* e_ident[EI_MAG2] */ -#define ELFMAG3 'F' /* e_ident[EI_MAG3] */ -#define ELFMAG "\177ELF" /* magic */ -#define SELFMAG 4 /* size of magic */ - -/* e_ident[] file class */ -#define ELFCLASSNONE 0 /* invalid */ -#define ELFCLASS32 1 /* 32-bit objs */ -#define ELFCLASS64 2 /* 64-bit objs */ -#define ELFCLASSNUM 3 /* number of classes */ - -/* e_ident[] data encoding */ -#define ELFDATANONE 0 /* invalid */ -#define ELFDATA2LSB 1 /* Little-Endian */ -#define ELFDATA2MSB 2 /* Big-Endian */ -#define ELFDATANUM 3 /* number of data encode defines */ - -/* e_ident[] Operating System/ABI */ -#define ELFOSABI_SYSV 0 /* UNIX System V ABI */ -#define ELFOSABI_HPUX 1 /* HP-UX operating system */ -#define ELFOSABI_NETBSD 2 /* NetBSD */ -#define ELFOSABI_LINUX 3 /* GNU/Linux */ -#define ELFOSABI_HURD 4 /* GNU/Hurd */ -#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */ -#define ELFOSABI_SOLARIS 6 /* Solaris */ -#define ELFOSABI_MONTEREY 7 /* Monterey */ -#define ELFOSABI_IRIX 8 /* IRIX */ -#define ELFOSABI_FREEBSD 9 /* FreeBSD */ -#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ -#define ELFOSABI_MODESTO 11 /* Novell Modesto */ -#define ELFOSABI_OPENBSD 12 /* OpenBSD */ -#define ELFOSABI_ARM 97 /* ARM */ -#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ - -/* e_ident */ -#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ - (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ - (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \ - (ehdr).e_ident[EI_MAG3] == ELFMAG3) - -/* ELF Header */ -typedef struct elfhdr { - unsigned char e_ident[EI_NIDENT]; /* ELF Identification */ - Elf32_Half e_type; /* object file type */ - Elf32_Half e_machine; /* machine */ - Elf32_Word e_version; /* object file version */ - Elf32_Addr e_entry; /* virtual entry point */ - Elf32_Off e_phoff; /* program header table offset */ - Elf32_Off e_shoff; /* section header table offset */ - Elf32_Word e_flags; /* processor-specific flags */ - Elf32_Half e_ehsize; /* ELF header size */ - Elf32_Half e_phentsize; /* program header entry size */ - Elf32_Half e_phnum; /* number of program header entries */ - Elf32_Half e_shentsize; /* section header entry size */ - Elf32_Half e_shnum; /* number of section header entries */ - Elf32_Half e_shstrndx; /* section header table's "section - header string table" entry offset */ -} Elf32_Ehdr; - -typedef struct { - unsigned char e_ident[EI_NIDENT]; /* Id bytes */ - Elf64_Quarter e_type; /* file type */ - Elf64_Quarter e_machine; /* machine type */ - Elf64_Half e_version; /* version number */ - Elf64_Addr e_entry; /* entry point */ - Elf64_Off e_phoff; /* Program hdr offset */ - Elf64_Off e_shoff; /* Section hdr offset */ - Elf64_Half e_flags; /* Processor flags */ - Elf64_Quarter e_ehsize; /* sizeof ehdr */ - Elf64_Quarter e_phentsize; /* Program header entry size */ - Elf64_Quarter e_phnum; /* Number of program headers */ - Elf64_Quarter e_shentsize; /* Section header entry size */ - Elf64_Quarter e_shnum; /* Number of section headers */ - Elf64_Quarter e_shstrndx; /* String table index */ -} Elf64_Ehdr; - -/* e_type */ -#define ET_NONE 0 /* No file type */ -#define ET_REL 1 /* relocatable file */ -#define ET_EXEC 2 /* executable file */ -#define ET_DYN 3 /* shared object file */ -#define ET_CORE 4 /* core file */ -#define ET_NUM 5 /* number of types */ -#define ET_LOPROC 0xff00 /* reserved range for processor */ -#define ET_HIPROC 0xffff /* specific e_type */ - -/* e_machine */ -#define EM_NONE 0 /* No Machine */ -#define EM_M32 1 /* AT&T WE 32100 */ -#define EM_SPARC 2 /* SPARC */ -#define EM_386 3 /* Intel 80386 */ -#define EM_68K 4 /* Motorola 68000 */ -#define EM_88K 5 /* Motorola 88000 */ -#define EM_486 6 /* Intel 80486 - unused? */ -#define EM_860 7 /* Intel 80860 */ -#define EM_MIPS 8 /* MIPS R3000 Big-Endian only */ -/* - * Don't know if EM_MIPS_RS4_BE, - * EM_SPARC64, EM_PARISC, - * or EM_PPC are ABI compliant - */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ -#define EM_SPARC64 11 /* SPARC v9 64-bit unoffical */ -#define EM_PARISC 15 /* HPPA */ -#define EM_SPARC32PLUS 18 /* Enhanced instruction set SPARC */ -#define EM_PPC 20 /* PowerPC */ -#define EM_PPC64 21 /* PowerPC 64-bit */ -#define EM_ARM 40 /* Advanced RISC Machines ARM */ -#define EM_ALPHA 41 /* DEC ALPHA */ -#define EM_SPARCV9 43 /* SPARC version 9 */ -#define EM_ALPHA_EXP 0x9026 /* DEC ALPHA */ -#define EM_IA_64 50 /* Intel Merced */ -#define EM_X86_64 62 /* AMD x86-64 architecture */ -#define EM_VAX 75 /* DEC VAX */ - -/* Version */ -#define EV_NONE 0 /* Invalid */ -#define EV_CURRENT 1 /* Current */ -#define EV_NUM 2 /* number of versions */ - -/* Section Header */ -typedef struct { - Elf32_Word sh_name; /* name - index into section header - string table section */ - Elf32_Word sh_type; /* type */ - Elf32_Word sh_flags; /* flags */ - Elf32_Addr sh_addr; /* address */ - Elf32_Off sh_offset; /* file offset */ - Elf32_Word sh_size; /* section size */ - Elf32_Word sh_link; /* section header table index link */ - Elf32_Word sh_info; /* extra information */ - Elf32_Word sh_addralign; /* address alignment */ - Elf32_Word sh_entsize; /* section entry size */ -} Elf32_Shdr; - -typedef struct { - Elf64_Half sh_name; /* section name */ - Elf64_Half sh_type; /* section type */ - Elf64_Xword sh_flags; /* section flags */ - Elf64_Addr sh_addr; /* virtual address */ - Elf64_Off sh_offset; /* file offset */ - Elf64_Xword sh_size; /* section size */ - Elf64_Half sh_link; /* link to another */ - Elf64_Half sh_info; /* misc info */ - Elf64_Xword sh_addralign; /* memory alignment */ - Elf64_Xword sh_entsize; /* table entry size */ -} Elf64_Shdr; - -/* Special Section Indexes */ -#define SHN_UNDEF 0 /* undefined */ -#define SHN_LORESERVE 0xff00 /* lower bounds of reserved indexes */ -#define SHN_LOPROC 0xff00 /* reserved range for processor */ -#define SHN_HIPROC 0xff1f /* specific section indexes */ -#define SHN_ABS 0xfff1 /* absolute value */ -#define SHN_COMMON 0xfff2 /* common symbol */ -#define SHN_HIRESERVE 0xffff /* upper bounds of reserved indexes */ - -/* sh_type */ -#define SHT_NULL 0 /* inactive */ -#define SHT_PROGBITS 1 /* program defined information */ -#define SHT_SYMTAB 2 /* symbol table section */ -#define SHT_STRTAB 3 /* string table section */ -#define SHT_RELA 4 /* relocation section with addends*/ -#define SHT_HASH 5 /* symbol hash table section */ -#define SHT_DYNAMIC 6 /* dynamic section */ -#define SHT_NOTE 7 /* note section */ -#define SHT_NOBITS 8 /* no space section */ -#define SHT_REL 9 /* relation section without addends */ -#define SHT_SHLIB 10 /* reserved - purpose unknown */ -#define SHT_DYNSYM 11 /* dynamic symbol table section */ -#define SHT_NUM 12 /* number of section types */ -#define SHT_LOPROC 0x70000000 /* reserved range for processor */ -#define SHT_HIPROC 0x7fffffff /* specific section header types */ -#define SHT_LOUSER 0x80000000 /* reserved range for application */ -#define SHT_HIUSER 0xffffffff /* specific indexes */ - -/* Section names */ -#define ELF_BSS ".bss" /* uninitialized data */ -#define ELF_DATA ".data" /* initialized data */ -#define ELF_DEBUG ".debug" /* debug */ -#define ELF_DYNAMIC ".dynamic" /* dynamic linking information */ -#define ELF_DYNSTR ".dynstr" /* dynamic string table */ -#define ELF_DYNSYM ".dynsym" /* dynamic symbol table */ -#define ELF_FINI ".fini" /* termination code */ -#define ELF_GOT ".got" /* global offset table */ -#define ELF_HASH ".hash" /* symbol hash table */ -#define ELF_INIT ".init" /* initialization code */ -#define ELF_REL_DATA ".rel.data" /* relocation data */ -#define ELF_REL_FINI ".rel.fini" /* relocation termination code */ -#define ELF_REL_INIT ".rel.init" /* relocation initialization code */ -#define ELF_REL_DYN ".rel.dyn" /* relocaltion dynamic link info */ -#define ELF_REL_RODATA ".rel.rodata" /* relocation read-only data */ -#define ELF_REL_TEXT ".rel.text" /* relocation code */ -#define ELF_RODATA ".rodata" /* read-only data */ -#define ELF_SHSTRTAB ".shstrtab" /* section header string table */ -#define ELF_STRTAB ".strtab" /* string table */ -#define ELF_SYMTAB ".symtab" /* symbol table */ -#define ELF_TEXT ".text" /* code */ - - -/* Section Attribute Flags - sh_flags */ -#define SHF_WRITE 0x1 /* Writable */ -#define SHF_ALLOC 0x2 /* occupies memory */ -#define SHF_EXECINSTR 0x4 /* executable */ -#define SHF_MASKPROC 0xf0000000 /* reserved bits for processor */ - /* specific section attributes */ - -/* Symbol Table Entry */ -typedef struct elf32_sym { - Elf32_Word st_name; /* name - index into string table */ - Elf32_Addr st_value; /* symbol value */ - Elf32_Word st_size; /* symbol size */ - unsigned char st_info; /* type and binding */ - unsigned char st_other; /* 0 - no defined meaning */ - Elf32_Half st_shndx; /* section header index */ -} Elf32_Sym; - -typedef struct { - Elf64_Half st_name; /* Symbol name index in str table */ - Elf_Byte st_info; /* type / binding attrs */ - Elf_Byte st_other; /* unused */ - Elf64_Quarter st_shndx; /* section index of symbol */ - Elf64_Xword st_value; /* value of symbol */ - Elf64_Xword st_size; /* size of symbol */ -} Elf64_Sym; - -/* Symbol table index */ -#define STN_UNDEF 0 /* undefined */ - -/* Extract symbol info - st_info */ -#define ELF32_ST_BIND(x) ((x) >> 4) -#define ELF32_ST_TYPE(x) (((unsigned int) x) & 0xf) -#define ELF32_ST_INFO(b,t) (((b) << 4) + ((t) & 0xf)) - -#define ELF64_ST_BIND(x) ((x) >> 4) -#define ELF64_ST_TYPE(x) (((unsigned int) x) & 0xf) -#define ELF64_ST_INFO(b,t) (((b) << 4) + ((t) & 0xf)) - -/* Symbol Binding - ELF32_ST_BIND - st_info */ -#define STB_LOCAL 0 /* Local symbol */ -#define STB_GLOBAL 1 /* Global symbol */ -#define STB_WEAK 2 /* like global - lower precedence */ -#define STB_NUM 3 /* number of symbol bindings */ -#define STB_LOPROC 13 /* reserved range for processor */ -#define STB_HIPROC 15 /* specific symbol bindings */ - -/* Symbol type - ELF32_ST_TYPE - st_info */ -#define STT_NOTYPE 0 /* not specified */ -#define STT_OBJECT 1 /* data object */ -#define STT_FUNC 2 /* function */ -#define STT_SECTION 3 /* section */ -#define STT_FILE 4 /* file */ -#define STT_NUM 5 /* number of symbol types */ -#define STT_LOPROC 13 /* reserved range for processor */ -#define STT_HIPROC 15 /* specific symbol types */ - -/* Relocation entry with implicit addend */ -typedef struct { - Elf32_Addr r_offset; /* offset of relocation */ - Elf32_Word r_info; /* symbol table index and type */ -} Elf32_Rel; - -/* Relocation entry with explicit addend */ -typedef struct { - Elf32_Addr r_offset; /* offset of relocation */ - Elf32_Word r_info; /* symbol table index and type */ - Elf32_Sword r_addend; -} Elf32_Rela; - -/* Extract relocation info - r_info */ -#define ELF32_R_SYM(i) ((i) >> 8) -#define ELF32_R_TYPE(i) ((unsigned char) (i)) -#define ELF32_R_INFO(s,t) (((s) << 8) + (unsigned char)(t)) - -typedef struct { - Elf64_Xword r_offset; /* where to do it */ - Elf64_Xword r_info; /* index & type of relocation */ -} Elf64_Rel; - -typedef struct { - Elf64_Xword r_offset; /* where to do it */ - Elf64_Xword r_info; /* index & type of relocation */ - Elf64_Sxword r_addend; /* adjustment value */ -} Elf64_Rela; - -#define ELF64_R_SYM(info) ((info) >> 32) -#define ELF64_R_TYPE(info) ((info) & 0xFFFFFFFF) -#define ELF64_R_INFO(s,t) (((s) << 32) + (u_int32_t)(t)) - -/* Program Header */ -typedef struct { - Elf32_Word p_type; /* segment type */ - Elf32_Off p_offset; /* segment offset */ - Elf32_Addr p_vaddr; /* virtual address of segment */ - Elf32_Addr p_paddr; /* physical address - ignored? */ - Elf32_Word p_filesz; /* number of bytes in file for seg. */ - Elf32_Word p_memsz; /* number of bytes in mem. for seg. */ - Elf32_Word p_flags; /* flags */ - Elf32_Word p_align; /* memory alignment */ -} Elf32_Phdr; - -typedef struct { - Elf64_Half p_type; /* entry type */ - Elf64_Half p_flags; /* flags */ - Elf64_Off p_offset; /* offset */ - Elf64_Addr p_vaddr; /* virtual address */ - Elf64_Addr p_paddr; /* physical address */ - Elf64_Xword p_filesz; /* file size */ - Elf64_Xword p_memsz; /* memory size */ - Elf64_Xword p_align; /* memory & file alignment */ -} Elf64_Phdr; - -/* Segment types - p_type */ -#define PT_NULL 0 /* unused */ -#define PT_LOAD 1 /* loadable segment */ -#define PT_DYNAMIC 2 /* dynamic linking section */ -#define PT_INTERP 3 /* the RTLD */ -#define PT_NOTE 4 /* auxiliary information */ -#define PT_SHLIB 5 /* reserved - purpose undefined */ -#define PT_PHDR 6 /* program header */ -#define PT_NUM 7 /* Number of segment types */ -#define PT_LOPROC 0x70000000 /* reserved range for processor */ -#define PT_HIPROC 0x7fffffff /* specific segment types */ - -/* Segment flags - p_flags */ -#define PF_X 0x1 /* Executable */ -#define PF_W 0x2 /* Writable */ -#define PF_R 0x4 /* Readable */ -#define PF_MASKPROC 0xf0000000 /* reserved bits for processor */ - /* specific segment flags */ - -/* Dynamic structure */ -typedef struct { - Elf32_Sword d_tag; /* controls meaning of d_val */ - union { - Elf32_Word d_val; /* Multiple meanings - see d_tag */ - Elf32_Addr d_ptr; /* program virtual address */ - } d_un; -} Elf32_Dyn; - -typedef struct { - Elf64_Xword d_tag; /* controls meaning of d_val */ - union { - Elf64_Addr d_ptr; - Elf64_Xword d_val; - } d_un; -} Elf64_Dyn; - -/* Dynamic Array Tags - d_tag */ -#define DT_NULL 0 /* marks end of _DYNAMIC array */ -#define DT_NEEDED 1 /* string table offset of needed lib */ -#define DT_PLTRELSZ 2 /* size of relocation entries in PLT */ -#define DT_PLTGOT 3 /* address PLT/GOT */ -#define DT_HASH 4 /* address of symbol hash table */ -#define DT_STRTAB 5 /* address of string table */ -#define DT_SYMTAB 6 /* address of symbol table */ -#define DT_RELA 7 /* address of relocation table */ -#define DT_RELASZ 8 /* size of relocation table */ -#define DT_RELAENT 9 /* size of relocation entry */ -#define DT_STRSZ 10 /* size of string table */ -#define DT_SYMENT 11 /* size of symbol table entry */ -#define DT_INIT 12 /* address of initialization func. */ -#define DT_FINI 13 /* address of termination function */ -#define DT_SONAME 14 /* string table offset of shared obj */ -#define DT_RPATH 15 /* string table offset of library - search path */ -#define DT_SYMBOLIC 16 /* start sym search in shared obj. */ -#define DT_REL 17 /* address of rel. tbl. w addends */ -#define DT_RELSZ 18 /* size of DT_REL relocation table */ -#define DT_RELENT 19 /* size of DT_REL relocation entry */ -#define DT_PLTREL 20 /* PLT referenced relocation entry */ -#define DT_DEBUG 21 /* bugger */ -#define DT_TEXTREL 22 /* Allow rel. mod. to unwritable seg */ -#define DT_JMPREL 23 /* add. of PLT's relocation entries */ -#define DT_BIND_NOW 24 /* Bind now regardless of env setting */ -#define DT_NUM 25 /* Number used. */ -#define DT_LOPROC 0x70000000 /* reserved range for processor */ -#define DT_HIPROC 0x7fffffff /* specific dynamic array tags */ - -/* Standard ELF hashing function */ -unsigned int elf_hash(const unsigned char *name); - -/* - * Note Definitions - */ -typedef struct { - Elf32_Word namesz; - Elf32_Word descsz; - Elf32_Word type; -} Elf32_Note; - -typedef struct { - Elf64_Half namesz; - Elf64_Half descsz; - Elf64_Half type; -} Elf64_Note; - - -#if defined(ELFSIZE) -#define CONCAT(x,y) __CONCAT(x,y) -#define ELFNAME(x) CONCAT(elf,CONCAT(ELFSIZE,CONCAT(_,x))) -#define ELFNAME2(x,y) CONCAT(x,CONCAT(_elf,CONCAT(ELFSIZE,CONCAT(_,y)))) -#define ELFNAMEEND(x) CONCAT(x,CONCAT(_elf,ELFSIZE)) -#define ELFDEFNNAME(x) CONCAT(ELF,CONCAT(ELFSIZE,CONCAT(_,x))) -#endif - -#if defined(ELFSIZE) && (ELFSIZE == 32) -#define Elf_Ehdr Elf32_Ehdr -#define Elf_Phdr Elf32_Phdr -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Rel Elf32_Rel -#define Elf_RelA Elf32_Rela -#define Elf_Dyn Elf32_Dyn -#define Elf_Word Elf32_Word -#define Elf_Sword Elf32_Sword -#define Elf_Addr Elf32_Addr -#define Elf_Off Elf32_Off -#define Elf_Nhdr Elf32_Nhdr -#define Elf_Note Elf32_Note - -#define ELF_R_SYM ELF32_R_SYM -#define ELF_R_TYPE ELF32_R_TYPE -#define ELF_R_INFO ELF32_R_INFO -#define ELFCLASS ELFCLASS32 - -#define ELF_ST_BIND ELF32_ST_BIND -#define ELF_ST_TYPE ELF32_ST_TYPE -#define ELF_ST_INFO ELF32_ST_INFO - -#define AuxInfo Aux32Info -#elif defined(ELFSIZE) && (ELFSIZE == 64) -#define Elf_Ehdr Elf64_Ehdr -#define Elf_Phdr Elf64_Phdr -#define Elf_Shdr Elf64_Shdr -#define Elf_Sym Elf64_Sym -#define Elf_Rel Elf64_Rel -#define Elf_RelA Elf64_Rela -#define Elf_Dyn Elf64_Dyn -#define Elf_Word Elf64_Word -#define Elf_Sword Elf64_Sword -#define Elf_Addr Elf64_Addr -#define Elf_Off Elf64_Off -#define Elf_Nhdr Elf64_Nhdr -#define Elf_Note Elf64_Note - -#define ELF_R_SYM ELF64_R_SYM -#define ELF_R_TYPE ELF64_R_TYPE -#define ELF_R_INFO ELF64_R_INFO -#define ELFCLASS ELFCLASS64 - -#define ELF_ST_BIND ELF64_ST_BIND -#define ELF_ST_TYPE ELF64_ST_TYPE -#define ELF_ST_INFO ELF64_ST_INFO - -#define AuxInfo Aux64Info -#endif - -#endif /* __XEN_PUBLIC_ELFSTRUCTS_H__ */ diff --git a/sgx-jvm/linux-sgx/common/inc/internal/enclave_creator.h b/sgx-jvm/linux-sgx/common/inc/internal/enclave_creator.h deleted file mode 100644 index 6a01c86340..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/enclave_creator.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** - * File: enclave_creator.h - * Description: this header file defines the interface used by Enclave loader to create the Enclave - * - * The hardware, simulation and signing mode shall inherit from this class and - * implement all the virtual functions - */ - -#ifndef _ENCLAVE_CREATOR_H -#define _ENCLAVE_CREATOR_H - -#include "arch.h" -#include "sgx_eid.h" -#include "metadata.h" -#include "sgx_error.h" -#include "util.h" -#include "launch_checker.h" -#include "uncopyable.h" -#include -#include "file.h" -#include "isgx_user.h" - - -// this is the interface to both hardware, simulation and signing mode -class EnclaveCreator : private Uncopyable -{ -public: - /* - @quote the EPC reserved; - @enclave_id identify the unique enclave; - @start_addr is the linear address allocated for Enclave; - */ - virtual int create_enclave(secs_t *secs, sgx_enclave_id_t *enclave_id, void **start_addr, bool ae = false) = 0; - /* - *@attr can be REMOVABLE - */ - virtual int add_enclave_page(sgx_enclave_id_t enclave_id, void *source, uint64_t offset, const sec_info_t &sinfo, uint32_t attr) = 0; - virtual int init_enclave(sgx_enclave_id_t enclave_id, enclave_css_t *enclave_css, SGXLaunchToken *lc, le_prd_css_file_t *prd_css_file = NULL) = 0; - virtual int destroy_enclave(sgx_enclave_id_t enclave_id, uint64_t enclave_size = 0) = 0; - virtual int initialize(sgx_enclave_id_t enclave_id) = 0; - virtual bool use_se_hw() const = 0; - virtual bool is_EDMM_supported(sgx_enclave_id_t enclave_id) = 0; - virtual bool is_driver_compatible() = 0; - - virtual int get_misc_attr(sgx_misc_attribute_t *sgx_misc_attr, metadata_t *metadata, SGXLaunchToken * const lc, uint32_t flag) = 0; - virtual bool get_plat_cap(sgx_misc_attribute_t *se_attr) = 0; -#ifdef SE_1P5_VERTICAL - virtual uint32_t handle_page_fault(uint64_t pf_address) { UNUSED(pf_address); return (uint32_t)SGX_ERROR_UNEXPECTED; } -#endif - virtual int emodpr(uint64_t addr, uint64_t size, uint64_t flag) = 0; - virtual int mktcs(uint64_t tcs_addr) = 0; - virtual int trim_range(uint64_t fromaddr, uint64_t toaddr) = 0; - virtual int trim_accept(uint64_t addr) = 0; - virtual int remove_range(uint64_t fromaddr, uint64_t numpages) = 0; - // destructor - virtual ~EnclaveCreator() {}; -}; - -EnclaveCreator* get_enclave_creator(void); - -extern EnclaveCreator* g_enclave_creator; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/global_data.h b/sgx-jvm/linux-sgx/common/inc/internal/global_data.h deleted file mode 100644 index fa9f6d4a0e..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/global_data.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/** - * File: global_data.h - * Description: - * The file defines the structure global_data_t. - */ - -#ifndef _TRTS_GLOBAL_DATA_H_ -#define _TRTS_GLOBAL_DATA_H_ - -#include "se_types.h" -#include "thread_data.h" -#include "metadata.h" -#include "rts.h" - -#define LAYOUT_ENTRY_NUM 38 -typedef struct _global_data_t -{ - sys_word_t enclave_size; - sys_word_t heap_offset; - sys_word_t heap_size; - sys_word_t thread_policy; - thread_data_t td_template; - uint8_t tcs_template[TCS_TEMPLATE_SIZE]; - uint32_t layout_entry_num; - uint32_t reserved; - layout_t layout_table[LAYOUT_ENTRY_NUM]; -} global_data_t; - -#define ENCLAVE_INIT_NOT_STARTED 0 -#define ENCLAVE_INIT_IN_PROGRESS 1 -#define ENCLAVE_INIT_DONE 2 -#define ENCLAVE_CRASHED 3 - -#ifdef __cplusplus -extern "C" { -#endif -extern SE_DECLSPEC_EXPORT global_data_t const volatile g_global_data; -extern uint32_t g_enclave_state; -extern sdk_version_t g_sdk_version; -extern int EDMM_supported; -extern uint8_t __ImageBase; -extern int g_xsave_enabled; - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/global_init.h b/sgx-jvm/linux-sgx/common/inc/internal/global_init.h deleted file mode 100644 index 783daf20ce..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/global_init.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GLOBAL_INIT_H -#define GLOBAL_INIT_H - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - -void init_global_object(void); -void uninit_global_object(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/inst.h b/sgx-jvm/linux-sgx/common/inc/internal/inst.h deleted file mode 100644 index 5f406141b4..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/inst.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_ARCH_H_ -# error "never include inst.h directly; use arch.h instead." -#endif - - -#ifndef _SE_INST_H_ -#define _SE_INST_H_ - -#define ENCLU 0xd7010f - -typedef enum { - SE_EREPORT = 0x0, - SE_EGETKEY, - SE_EENTER, - SE_ERESUME, - SE_EEXIT, - SE_EACCEPT, - SE_LAST_RING3, - - SE_ECREATE = 0x0, - SE_EADD, - SE_EINIT, - SE_EREMOVE, - SE_EDBGRD, - SE_EDBGWR, - SE_EEXTEND, - SE_LAST_RING0 -} se_opcode_t; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/ipp_wrapper.h b/sgx-jvm/linux-sgx/common/inc/internal/ipp_wrapper.h deleted file mode 100644 index da6cb384e0..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/ipp_wrapper.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _IPP_WRAPPER_H -#define _IPP_WRAPPER_H - -#include "ippcp.h" - -#ifndef SAFE_FREE_MM -#define SAFE_FREE_MM(ptr) {\ - if(ptr != NULL) \ - { \ - free(ptr); \ - ptr = NULL; \ - }} -#endif - -#ifndef ERROR_BREAK -#define ERROR_BREAK(x) if(x != ippStsNoErr){break;} -#endif -#ifndef NULL_BREAK -#define NULL_BREAK(x) if(!x){break;} -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -IppStatus newBN(const Ipp32u *data, int size_in_bytes, IppsBigNumState **p_new_BN); - -IppStatus create_rsa_priv1_key(int n_byte_size, int d_byte_size, const Ipp32u *n, const Ipp32u *d, IppsRSAPrivateKeyState **new_pri_key1); - -IppStatus create_rsa_priv2_key(int p_byte_size, const Ipp32u *p, const Ipp32u *q, - const Ipp32u *dmp1, const Ipp32u *dmq1, const Ipp32u *iqmp, - IppsRSAPrivateKeyState **new_pri_key2); - -IppStatus create_rsa_pub_key(int n_byte_size, int e_byte_size, const Ipp32u *n, const Ipp32u *e, IppsRSAPublicKeyState **new_pub_key); - -IppStatus create_validate_rsa_key_pair(int n_byte_size, int e_byte_size, const Ipp32u *n, const Ipp32u *d, const Ipp32u *e, const Ipp32u *p, const Ipp32u *q, - const Ipp32u *dmp1, const Ipp32u *dmq1, const Ipp32u *iqmp, - IppsRSAPrivateKeyState **new_pri_key, IppsRSAPublicKeyState **new_pub_key, int *validate_result); - -IppStatus get_pub_key(const IppsRSAPublicKeyState *pub_key, int *e_byte_size, Ipp32u *e, int *n_byte_size, Ipp32u *n); - -void secure_free_BN(IppsBigNumState *pBN, int size_in_bytes); - -void secure_free_rsa_pri1_key(int n_byte_size, int d_byte_size, IppsRSAPrivateKeyState *pri_key1); - -void secure_free_rsa_pri2_key(int p_byte_size, IppsRSAPrivateKeyState *pri_key2); - -void secure_free_rsa_pub_key(int n_byte_size, int e_byte_size, IppsRSAPublicKeyState *pub_key); - - - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/sgx-jvm/linux-sgx/common/inc/internal/linux/cpuid_gnu.h b/sgx-jvm/linux-sgx/common/inc/internal/linux/cpuid_gnu.h deleted file mode 100644 index 06473f9278..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/linux/cpuid_gnu.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _CPUID_GNU_H_ -#define _CPUID_GNU_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* This is a PIC-compliant version of CPUID */ -static inline void cpuid(int *eax, int *ebx, int *ecx, int *edx) -{ -#if defined(__x86_64__) - asm("cpuid" - : "=a" (*eax), - "=b" (*ebx), - "=c" (*ecx), - "=d" (*edx) - : "0" (*eax), "2" (*ecx)); - -#else - /*on 32bit, ebx can NOT be used as PIC code*/ - asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" - : "=a" (*eax), "=r" (*ebx), "=c" (*ecx), "=d" (*edx) - : "0" (*eax), "2" (*ecx)); -#endif -} - -static inline void __cpuid(int a[4], int b) -{ - a[0] = b; - a[2] = 0; - cpuid(&a[0], &a[1], &a[2], &a[3]); -} - -static inline void __cpuidex(int a[4], int b, int c) -{ - a[0] = b; - a[2] = c; - cpuid(&a[0], &a[1], &a[2], &a[3]); -} - -#ifdef __cplusplus -} -#endif - -#endif /*_CPUID_GNU_H_*/ diff --git a/sgx-jvm/linux-sgx/common/inc/internal/linux/linux-regs.h b/sgx-jvm/linux-sgx/common/inc/internal/linux/linux-regs.h deleted file mode 100644 index befc4283a7..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/linux/linux-regs.h +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* - * This header wraps the register names for x86/x64. - */ - -#ifndef LINUX_REGS_H__ -#define LINUX_REGS_H__ - -#if defined(__i386) || defined(__i386__) -# define LINUX32 1 -# define SE_WORDSIZE 4 - -/* Generic argument picker for `naked' functions */ -# define naked_arg0 4(%esp) -# define naked_arg1 8(%esp) -# define naked_arg2 12(%esp) -# define naked_arg3 16(%esp) - -# define xax eax -# define xbx ebx -# define xcx ecx -# define xdx edx - -# define xsi esi -# define xdi edi -# define xbp ebp -# define xsp esp -#elif defined(__x86_64) || defined(__x86_64__) -# define LINUX64 1 -# define SE_WORDSIZE 8 - -/* For x86_64, the first six parameters are passed by - * rdi, rsi, rdx, rcx, r8, r9. - */ -# define naked_arg0 %rdi -# define naked_arg1 %rsi -# define naked_arg2 %rdx -# define naked_arg3 %rcx - -# define xax rax -# define xbx rbx -# define xcx rcx -# define xdx rdx - -# define xsi rsi -# define xdi rdi -# define xbp rbp -# define xsp rsp -#else -# error unknown platform! -#endif - -/* SE instructions - needs to be sync-up with inst70.h */ -#define SE_EREPORT 0 -#define SE_EGETKEY 1 -#define SE_EENTER 2 -#define SE_EEXIT 4 -#define SE_EACCEPT 5 -#define SE_EMODPE 6 - - -#define SE_ECREATE 0 -#define SE_EADD 1 -#define SE_EINIT 2 -#define SE_EREMOVE 3 - -/* - * Macros for GNU assembly - */ -.macro ENCLU -#ifdef SE_SIM - cmp $SE_EEXIT, %xax - jne 1f - - /* if leaf is EEXIT, xbp and xsp need to be passed by xdx and xcx */ - mov %xbp, %xdx - mov %xsp, %xcx -1: - push %xdi - push %xsi - push %xdx - push %xcx - push %xbx - push %xax - -# ifdef LINUX64 - pop %rdi - pop %rsi - pop %rdx - pop %rcx - pop %r8 - pop %r9 -# endif - -.type _SE3,@function -.protected _SE3 - call _SE3 - -# ifdef LINUX32 - add $(SE_WORDSIZE * 6), %esp -# endif - -#else /* SE_SIM */ -.byte 0x0f, 0x01, 0xd7 /* 0xf3 */ -#endif /* !SE_SIM */ -.endm - -/* declare a function with default visibility */ -.macro DECLARE_GLOBAL_FUNC name - .globl \name - .type \name, @function -\name: -.endm - -/* declare a function with visibility='hidden' */ -.macro DECLARE_LOCAL_FUNC name - .globl \name - .hidden \name - .type \name, @function -\name: -.endm - -.macro NAKED_PROLOG - push %xbp - mov %xsp, %xbp - sub $(7 * SE_WORDSIZE), %xsp -.endm - -.macro NAKED_EPILOG - mov %xbp, %xsp - pop %xbp -.endm - -/* `paramN' (N = 1,2,3,4) should be registers. */ -.macro SET_PARAMS param1:req, param2, param3, param4 -#if defined(LINUX32) - -.ifnb \param4 - mov \param4, 3*SE_WORDSIZE(%esp) -.endif - -.ifnb \param3 - mov \param3, 2*SE_WORDSIZE(%esp) -.endif - -.ifnb \param2 - mov \param2, 1*SE_WORDSIZE(%esp) -.endif - - mov \param1, 0*SE_WORDSIZE(%esp) - -#else /* LINUX32 */ - -.ifnb \param4 -.ifnc \param4, %rcx - mov \param4, %rcx -.endif -.endif - -.ifnb \param3 -.ifnc \param3, %rdx - mov \param3, %rdx -.endif -.endif - -.ifnb \param2 -.ifnc \param2, %rsi - mov \param2, %rsi -.endif -.endif - -.ifnc \param1, %rdi - mov \param1, %rdi -.endif - -#endif /* LINUX64 */ -.endm - -/*******************************************************************/ - -.macro SE_PROLOG - .cfi_startproc - -#ifdef LINUX32 - pushl %ebp - movl %esp, %ebp -#endif - - push %xbx - push %xcx - push %xdx - -#if defined LINUX64 - movq %rdi, %rbx - movq %rsi, %rcx - /* rdx remains the same, rdi/rsi is not used by _SE0 - */ -#elif defined LINUX32 - movl 2*SE_WORDSIZE(%ebp), %ebx - movl 3*SE_WORDSIZE(%ebp), %ecx - movl 4*SE_WORDSIZE(%ebp), %edx -#endif - -.endm - -/*******************************************************************/ - -.macro SE_EPILOG - pop %xdx - pop %xcx - pop %xbx - -#ifdef LINUX32 - movl %ebp, %esp - popl %ebp -#endif - - ret - .cfi_endproc -.endm - -/*******************************************************************/ - -/* load the address of `symbol' to the register `reg' in PIC way. */ -.macro lea_pic symbol, reg -#ifdef LINUX64 - lea \symbol(%rip), \reg -#else -/* The real code on x86 would look like this (get `bar' from `foo'): - * - * 00000198 : - * 198: c3 ret - * - * 00000199 : - * 199: e8 00 00 00 00 call 19e - * 19e: 58 pop %eax - * 19f: 8d 40 fa lea -0x6(%eax),%eax - */ - call . + 0x5 /* No label here to avoid interfering w/ calling code */ - pop \reg - lea (\symbol - . + 1)(\reg), \reg -#endif -.endm - -#endif /* LINUX_REGS_H__ */ diff --git a/sgx-jvm/linux-sgx/common/inc/internal/metadata.h b/sgx-jvm/linux-sgx/common/inc/internal/metadata.h deleted file mode 100644 index 9a25cabc10..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/metadata.h +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _METADATA_H_ -#define _METADATA_H_ -#include "arch.h" -#include "se_macro.h" - -#pragma pack(1) - - /* version of metadata */ -#define MAJOR_VERSION 2 //MAJOR_VERSION should not larger than 0ffffffff -#define MINOR_VERSION 1 //MINOR_VERSION should not larger than 0ffffffff - -#define SGX_1_9_MAJOR_VERSION 1 //MAJOR_VERSION should not larger than 0ffffffff -#define SGX_1_9_MINOR_VERSION 4 //MINOR_VERSION should not larger than 0ffffffff - -#define SGX_1_5_MAJOR_VERSION 1 //MAJOR_VERSION should not larger than 0ffffffff -#define SGX_1_5_MINOR_VERSION 3 //MINOR_VERSION should not larger than 0ffffffff - - -#define META_DATA_MAKE_VERSION(major, minor) (((uint64_t)major)<<32 | minor) - -#define METADATA_MAGIC 0x86A80294635D0E4CULL -#define METADATA_SIZE 0x3000 -#define TCS_TEMPLATE_SIZE 72 - -/* TCS Policy bit masks */ -#define TCS_POLICY_BIND 0x00000000 /* If set, the TCS is bound to the application thread */ -#define TCS_POLICY_UNBIND 0x00000001 - -#define MAX_SAVE_BUF_SIZE 2632 - -#define TCS_NUM_MIN 1 -#define SSA_NUM_MIN 2 -#define SSA_FRAME_SIZE_MIN 1 -#define SSA_FRAME_SIZE_MAX 2 -#define STACK_SIZE_MIN 0x1000 -#define STACK_SIZE_MAX 0x40000 -#define HEAP_SIZE_MIN 0x1000 -#define HEAP_SIZE_MAX 0x1000000 -#define DEFAULT_MISC_SELECT 0 -#define DEFAULT_MISC_MASK 0xFFFFFFFF - -typedef struct _data_directory_t -{ - uint32_t offset; - uint32_t size; -} data_directory_t; - -typedef enum -{ - DIR_PATCH, - DIR_LAYOUT, - DIR_NUM, -} dir_index_t; - -#define GROUP_FLAG (1<<12) -#define GROUP_ID(x) (GROUP_FLAG | x) -#define IS_GROUP_ID(x) !!((x) & GROUP_FLAG) -#define LAYOUT_ID_HEAP_MIN 1 -#define LAYOUT_ID_HEAP_INIT 2 -#define LAYOUT_ID_HEAP_MAX 3 -#define LAYOUT_ID_TCS 4 -#define LAYOUT_ID_TD 5 -#define LAYOUT_ID_SSA 6 -#define LAYOUT_ID_STACK_MAX 7 -#define LAYOUT_ID_STACK_MIN 8 -#define LAYOUT_ID_THREAD_GROUP GROUP_ID(9) -#define LAYOUT_ID_GUARD 10 -#define LAYOUT_ID_HEAP_DYN_MIN 11 -#define LAYOUT_ID_HEAP_DYN_INIT 12 -#define LAYOUT_ID_HEAP_DYN_MAX 13 -#define LAYOUT_ID_TCS_DYN 14 -#define LAYOUT_ID_TD_DYN 15 -#define LAYOUT_ID_SSA_DYN 16 -#define LAYOUT_ID_STACK_DYN_MAX 17 -#define LAYOUT_ID_STACK_DYN_MIN 18 -#define LAYOUT_ID_THREAD_GROUP_DYN GROUP_ID(19) - - - -/* -** layout table example -** entry0 - entry1 - entry2 - group3 (entry_count=2, load_times=3) ... -** the load sequence should be: -** entry0 - entry1 - entry2 - entry1 - entry2 - entry1 - entry2 - entry1 - entry2 ... -** -------------- -------------- -------------- -** group3 1st time group3 2nd time group3 3rd time -*/ -typedef struct _layout_entry_t -{ - uint16_t id; /* unique ID to identify the purpose for this entry */ - uint16_t attributes; /* EADD/EEXTEND/EREMOVE... */ - uint32_t page_count; /* map size in page. Biggest chunk = 2^32 pages = 2^44 bytes. */ - uint64_t rva; /* map offset, relative to encalve base */ - uint32_t content_size; /* if content_offset = 0, content_size is the initial data to fill the whole page. */ - uint32_t content_offset; /* offset to the initial content, relative to metadata */ - si_flags_t si_flags; /* security info, R/W/X, SECS/TCS/REG/VA */ -} layout_entry_t; - -typedef struct _layout_group_t -{ - uint16_t id; /* unique ID to identify the purpose for this entry */ - uint16_t entry_count; /* reversely count entry_count entries for the group loading. */ - uint32_t load_times; /* the repeated times of loading */ - uint64_t load_step; /* the group size. the entry load rva should be adjusted with the load_step */ - /* rva = entry.rva + group.load_step * load_times */ - uint32_t reserved[4]; -} layout_group_t; - -typedef union _layout_t -{ - layout_entry_t entry; - layout_group_t group; -} layout_t; - -typedef struct _patch_entry_t -{ - uint64_t dst; /* relative to enclave file base */ - uint32_t src; /* relative to metadata base */ - uint32_t size; /* patched size */ - uint32_t reserved[4]; -} patch_entry_t; - -typedef struct _metadata_t -{ - uint64_t magic_num; /* The magic number identifying the file as a signed enclave image */ - uint64_t version; /* The metadata version */ - uint32_t size; /* The size of this structure */ - uint32_t tcs_policy; /* TCS management policy */ - uint32_t ssa_frame_size; /* The size of SSA frame in page */ - uint32_t max_save_buffer_size; /* Max buffer size is 2632 */ - uint32_t desired_misc_select; - uint32_t tcs_min_pool; /* TCS min pool*/ - uint64_t enclave_size; /* enclave virtual size */ - sgx_attributes_t attributes; /* XFeatureMask to be set in SECS. */ - enclave_css_t enclave_css; /* The enclave signature */ - data_directory_t dirs[DIR_NUM]; - uint8_t data[10400]; -}metadata_t; - -se_static_assert(sizeof(metadata_t) == METADATA_SIZE); - -#pragma pack() - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/oal/uae_oal_api.h b/sgx-jvm/linux-sgx/common/inc/internal/oal/uae_oal_api.h deleted file mode 100644 index 74b13e37f8..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/oal/uae_oal_api.h +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -#ifndef _UAE_OAL_H -#define _UAE_OAL_H - -#include "sgx_quote.h" -#include "sgx_error.h" -#include "sgx_urts.h" -#include -#include - -typedef enum{ - UAE_OAL_SUCCESS = 0, - UAE_OAL_ERROR_UNEXPECTED , - UAE_OAL_ERROR_AESM_UNAVAILABLE , - UAE_OAL_ERROR_TIMEOUT , - UAE_OAL_ERROR_INVALID , -} uae_oal_status_t; - -/*OAL methods from here forward */ - -extern "C" -{ - -uae_oal_status_t SGXAPI oal_get_launch_token( - const enclave_css_t* signature, - const sgx_attributes_t* attribute, - sgx_launch_token_t* launch_token, - uint32_t timeout_usec, - aesm_error_t *result); - - -uae_oal_status_t SGXAPI oal_init_quote( - sgx_target_info_t *p_target_info, - sgx_epid_group_id_t *p_gid, - uint32_t timeout_usec, - aesm_error_t *result); - - -uae_oal_status_t SGXAPI oal_get_quote( - const sgx_report_t *p_report, - sgx_quote_sign_type_t quote_type, - const sgx_spid_t *p_spid, - const sgx_quote_nonce_t *p_nonce, - const uint8_t *p_sig_rl, - uint32_t sig_rl_size, - sgx_report_t *p_qe_report, - sgx_quote_t *p_quote, - uint32_t quote_size, - uint32_t timeout_usec, - aesm_error_t *result); - -uae_oal_status_t SGXAPI oal_get_ps_cap( - uint64_t* p_ps_cap, - uint32_t timeout_usec, - aesm_error_t *result); - -uae_oal_status_t SGXAPI oal_report_attestation_status( - const sgx_platform_info_t* p_platform_info, - int attestation_status, - sgx_update_info_bit_t* p_update_info, - uint32_t timeout_usec, - aesm_error_t *result); - -uae_oal_status_t oal_create_session( - uint32_t *session_id, - uint8_t *se_dh_msg1, - uint32_t dh_msg1_size, - uint32_t timeout_usec, - aesm_error_t *result); - -uae_oal_status_t oal_exchange_report( - uint32_t session_id, - const uint8_t *se_dh_msg2, - uint32_t dh_msg2_size, - uint8_t *se_dh_msg3, - uint32_t dh_msg3_size, - uint32_t timeout_usec, - aesm_error_t *result); - -uae_oal_status_t oal_close_session( - uint32_t session_id, - uint32_t timeout_usec, - aesm_error_t *result); - -uae_oal_status_t oal_invoke_service( - const uint8_t *pse_message_req, - uint32_t pse_message_req_size, - uint8_t *pse_message_resp, - uint32_t pse_message_resp_size, - uint32_t timeout_usec, - aesm_error_t *response); - -uae_oal_status_t oal_get_whitelist_size( - uint32_t* p_whitelist_size, - uint32_t timeout_usec, - aesm_error_t* result); - -uae_oal_status_t oal_get_whitelist( - uint8_t* p_whitelist, - uint32_t whitelist_size, - uint32_t timeout_usec, - aesm_error_t *result); - -uae_oal_status_t oal_get_extended_epid_group_id( - uint32_t* extended_group_id, - uint32_t timeout_usec, - aesm_error_t *result); - -uae_oal_status_t oal_switch_extended_epid_group( - uint32_t x_group_id, - uint32_t timeout_usec, - aesm_error_t *result); - -sgx_status_t oal_map_status(uae_oal_status_t status); -sgx_status_t oal_map_result(aesm_error_t result); - -} /* end of extern "C" */ -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/routine.h b/sgx-jvm/linux-sgx/common/inc/internal/routine.h deleted file mode 100644 index c08884a7d0..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/routine.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _ROUTINE_H_ -#define _ROUTINE_H_ -#include "sgx_eid.h" -#include "sgx_error.h" -#include "sgx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _ocall_table_t -{ - uint32_t count; - void *ocall[]; -} sgx_ocall_table_t; - -sgx_status_t SGXAPI sgx_ecall(const sgx_enclave_id_t enclave_id, const int proc, const void *ocall_table, void *ms); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/rts.h b/sgx-jvm/linux-sgx/common/inc/internal/rts.h deleted file mode 100644 index 4c737c8800..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/rts.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _RTS_H_ -#define _RTS_H_ - -#include "se_types.h" -#include "rts_cmd.h" - -typedef struct _ocall_context_t -{ - uintptr_t shadow0; - uintptr_t shadow1; - uintptr_t shadow2; - uintptr_t shadow3; - uintptr_t ocall_flag; - uintptr_t ocall_index; - uintptr_t pre_last_sp; - uintptr_t r15; - uintptr_t r14; - uintptr_t r13; - uintptr_t r12; - uintptr_t xbp; - uintptr_t xdi; - uintptr_t xsi; - uintptr_t xbx; - uintptr_t reserved[3]; - uintptr_t ocall_depth; - uintptr_t ocall_ret; -} ocall_context_t; - -typedef enum -{ - SDK_VERSION_1_5, - SDK_VERSION_2_0 -} sdk_version_t; - -typedef struct _system_features -{ - uint64_t cpu_features; - sdk_version_t version; - /* system feature set array. MSb of each element indicates whether this is - * the last element. This will help tRTS to know when it can stop walking - * through the array searching for certain features. - */ - uint64_t system_feature_set[1]; -}system_features_t; - -// current system_feature_set only contains one element of type uint64_t, the highest -// bit is bit 63 -#define SYS_FEATURE_MSb 63 - -#define OCALL_FLAG 0x4F434944 - -typedef enum -{ - EDMM_TRIM = -2, - EDMM_TRIM_COMMIT = -3, - EDMM_MODPR = -4, -}edmm_ocall_t; - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/rts_cmd.h b/sgx-jvm/linux-sgx/common/inc/internal/rts_cmd.h deleted file mode 100644 index 831ca19057..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/rts_cmd.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* ECALL command */ -#define ECMD_ECALL 0 -#define ECMD_INIT_ENCLAVE -1 -#define ECMD_ORET -2 -#define ECMD_EXCEPT -3 -#define ECMD_MKTCS -4 -#define ECMD_UNINIT_ENCLAVE -5 - -/* OCALL command */ -#define OCMD_ERET -1 - diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_atomic.h b/sgx-jvm/linux-sgx/common/inc/internal/se_atomic.h deleted file mode 100644 index c471ea266e..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_atomic.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_ATOMIC_H_ -#define _SE_ATOMIC_H_ - - -inline uint32_t se_atomic_inc(volatile uint32_t *mem) -{ - return __sync_add_and_fetch(mem, 1); -} - -inline uint32_t se_atomic_dec(uint32_t volatile *mem) -{ - return __sync_sub_and_fetch(mem, 1); -} - -inline uint64_t se_atomic_inc64(volatile uint64_t *mem) -{ - return __sync_add_and_fetch(mem, 1); -} - -inline uint64_t se_atomic_dec64(uint64_t volatile *mem) -{ - return __sync_sub_and_fetch(mem, 1); -} - - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_cdefs.h b/sgx-jvm/linux-sgx/common/inc/internal/se_cdefs.h deleted file mode 100644 index c1572add78..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_cdefs.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _SE_CDEFS_H_ -#define _SE_CDEFS_H_ - - -#define SGX_WEAK __attribute__((weak)) - -# if (__GNUC__ >= 3) -# define likely(x) __builtin_expect ((x), 1) -# define unlikely(x) __builtin_expect ((x), 0) -# else -# define likely(x) (x) -# define unlikely(x) (x) -# endif - -#ifndef SE_DECLSPEC_EXPORT -#define SE_DECLSPEC_EXPORT __attribute__((visibility("default"))) -#endif - -#ifndef SE_DECLSPEC_IMPORT -#define SE_DECLSPEC_IMPORT -#endif - -#ifndef SE_DECLSPEC_ALIGN -#define SE_DECLSPEC_ALIGN(x) __attribute__((aligned(x))) -#endif - -#ifndef SE_DECLSPEC_THREAD -#define SE_DECLSPEC_THREAD /*__thread*/ -#endif - -/* disable __try, __except on linux */ -#ifndef __try -#define __try try -#endif - -#ifndef __except -#define __except(x) catch(...) -#endif - - -#ifndef SE_DRIVER - -# define SE_GNU -# if defined(__x86_64__) -# define SE_64 -# define SE_GNU64 -# else -# define SE_32 -# define SE_GNU32 -# endif - -#endif - - #define INITIALIZER(f) \ - static void f(void) __attribute__((constructor)); - -#ifdef __cplusplus -#define MY_EXTERN extern "C" -#else -#define MY_EXTERN extern -#endif - -#define SGX_ACCESS_VERSION(libname, num) \ - MY_EXTERN char sgx_##libname##_version[]; \ - MY_EXTERN char * __attribute__((destructor)) libname##_access_version_dummy##num() \ - { \ - sgx_##libname##_version[0] = 's'; \ - return sgx_##libname##_version; \ - } - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_cpu_feature.h b/sgx-jvm/linux-sgx/common/inc/internal/se_cpu_feature.h deleted file mode 100644 index 48e281a681..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_cpu_feature.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _SE_CPU_FEATURE_H_ -#define _SE_CPU_FEATURE_H_ - -#include -#include "se_cpu_feature_defs.h" - - -#ifdef __cplusplus -extern "C" uint64_t g_cpu_feature_indicator; -#else -extern uint64_t g_cpu_feature_indicator; -#endif - -#define TEST_CPU_HAS_RDRAND (g_cpu_feature_indicator & CPU_FEATURE_RDRND) - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_cpu_feature_defs.h b/sgx-jvm/linux-sgx/common/inc/internal/se_cpu_feature_defs.h deleted file mode 100644 index 581168f25d..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_cpu_feature_defs.h +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_CPU_FEATURE_DEFS_H_ -#define _SE_CPU_FEATURE_DEFS_H_ - -/* - * Different extended model + model values for Silverthorn. - */ -#define CPU_ATOM1 0x1c -#define CPU_ATOM2 0x26 -#define CPU_ATOM3 0x27 - -/* - * The processor family is an 8-bit value obtained by adding the - * Extended Family field of the processor signature returned by - * CPUID Function 1 with the Family field. - * F = (CPUID(1).EAX[27:20] >> 20) + (CPUID(1).EAX[11:8] >> 8) - */ -#define CPU_FAMILY(x) (((((x) >> 20) & 0xffU) | (((x) >> 8) & 0xfU)) & 0xffU) - -/* The processor model is an 8-bit value obtained by shifting left 4 - * the Extended Model field of the processor signature returned by - * CPUID Function 1 then adding the Model field. - * M = (CPUID(1).EAX[19:16] >> 12) + (CPUID(1).EAX[7:4] >> 4) - */ -#define CPU_MODEL(x) ((((x) >> 12) & 0xf0U) | (((x) >> 4) & 0xfU)) -#define CPU_STEPPING(x) (((x) >> 0) & 0xf) - -#define CPU_HAS_MMX(x) (((x) & (1 << 23)) != 0) -#define CPU_HAS_FXSAVE(x) (((x) & (1 << 24)) != 0) -#define CPU_HAS_SSE(x) (((x) & (1 << 25)) != 0) -#define CPU_HAS_SSE2(x) (((x) & (1 << 26)) != 0) -#define CPU_HAS_PNI(x) (((x) & (1 << 0)) != 0) -#define CPU_HAS_MNI(x) (((x) & (1 << 9)) != 0) -#define CPU_HAS_SNI(x) (((x) & (1 << 19)) != 0) -#define CPU_HAS_MOVBE(x) (((x) & (1 << 22)) != 0) -#define CPU_HAS_SSE4_2(x) (((x) & (1 << 20)) != 0) -#define CPU_HAS_POPCNT(x) (((x) & (1 << 23)) != 0) -#define CPU_HAS_PCLMULQDQ(x) (((x) & (1 << 1)) != 0) -#define CPU_HAS_AES(x) (((x) & (1 << 25)) != 0) -#define CPU_HAS_XSAVE(x) (((x) & (1 << 27)) != 0) -#define CPU_HAS_AVX(x) (((x) & (1 << 28)) != 0) -#define XFEATURE_ENABLED_AVX(x) \ - (((x) & 0x06) == 0x06) -#define CPU_HAS_F16C(x) (((x) & (1 << 29)) != 0) -#define CPU_HAS_RDRAND(x) (((x) & (1 << 30)) != 0) -#define CPU_HAS_IVB(x) (CPU_HAS_F16C(x) && CPU_HAS_RDRAND(x)) -#define CPU_HAS_IVB_NORDRAND(x) (CPU_HAS_F16C(x)) -#define CPU_HAS_AVX2(x) (((x) & (1 << 5)) != 0) -#define CPU_HAS_HLE(x) (((x) & (1 << 4)) != 0) -#define CPU_HAS_RTM(x) (((x) & (1 << 11)) != 0) -#define CPU_HAS_ADCOX(x) (((x) & (1 << 19)) != 0) -#define CPU_HAS_RDSEED(x) (((x) & (1 << 18)) != 0) -#define CPU_HAS_BMI(x) (((x) & (1 << 3)) != 0 && \ - ((x) & (1 << 8)) != 0) -#define CPU_HAS_LZCNT(x) (((x) & (1 << 5)) != 0) -#define CPU_HAS_PREFETCHW(x) (((x) & (1 << 8)) != 0) -#define CPU_HAS_FMA(x) (((x) & (1 << 12)) != 0) -#define CPU_HAS_HSW(cpuid7_ebx, ecpuid1_ecx, cpuid1_ecx) \ - (CPU_HAS_AVX2(cpuid7_ebx) && CPU_HAS_BMI(cpuid7_ebx) && \ - CPU_HAS_LZCNT(ecpuid1_ecx) && CPU_HAS_FMA(cpuid1_ecx) && \ - CPU_HAS_HLE(cpuid7_ebx) && CPU_HAS_RTM(cpuid7_ebx)) - -#define CPU_HAS_FPU(x) (((x) & (1 << 0)) != 0) -#define CPU_HAS_CMOV(x) (((x) & (1 << 15)) != 0) - -#define CPU_HAS_SSE3(x) (((x) & (1 << 0)) != 0) -#define CPU_HAS_SSSE3(x) (((x) & (1 << 9)) != 0) - -#define CPU_HAS_SSE4_1(x) (((x) & (1 << 19)) != 0) - -#define CPU_HAS_LRBNI(x) (((x) & (1 << 1)) != 0) -#define CPU_HAS_LRB2(x) (((x) & (1 << 4)) != 0) - - -#define CPU_GENU_VAL ('G' << 0 | 'e' << 8 | 'n' << 16 | 'u' << 24) -#define CPU_INEI_VAL ('i' << 0 | 'n' << 8 | 'e' << 16 | 'I' << 24) -#define CPU_NTEL_VAL ('n' << 0 | 't' << 8 | 'e' << 16 | 'l' << 24) - -/* - * These values must be in sync with dev/proton/globals/glob_cpu_info.c - * c_legacy_cpu_set_xxx constants. - */ -#define CPU_GENERIC 0x1 -#define CPU_PENTIUM 0x2 -#define CPU_PENTIUM_PRO 0x4 -#define CPU_PENTIUM_MMX 0x8 -#define CPU_PENTIUM_II 0x10 -#define CPU_PENTIUM_II_FXSV 0x20 -#define CPU_PENTIUM_III 0x40 -#define CPU_PENTIUM_III_SSE 0x80 -#define CPU_PENTIUM_4 0x100 -#define CPU_PENTIUM_4_SSE2 0x200 -#define CPU_BNI 0x400 -#define CPU_PENTIUM_4_PNI 0x800 -#define CPU_MNI 0x1000 -#define CPU_SNI 0x2000 -#define CPU_BNL 0x4000 -#define CPU_NHM 0x8000 -#define CPU_WSM 0x10000 -#define CPU_SNB 0x20000 -#define CPU_IVB 0x40000 -#define CPU_HSW 0x400000 - -#define CPU_PENTIUM_FAMILY 5 -#define CPU_PPRO_FAMILY 6 -#define CPU_WMT_FAMILY 15 - -/* - * The processor is a generic IA32 CPU - */ -#define CPU_FEATURE_GENERIC_IA32 0x00000001ULL - -/* - * Floating point unit is on-chip. - */ -#define CPU_FEATURE_FPU 0x00000002ULL - -/* - * Conditional mov instructions are supported. - */ -#define CPU_FEATURE_CMOV 0x00000004ULL - -/* - * The processor supports the MMX technology instruction set extensions - * to Intel Architecture. - */ -#define CPU_FEATURE_MMX 0x00000008ULL - -/* - * The FXSAVE and FXRSTOR instructions are supported for fast - * save and restore of the floating point context. - */ -#define CPU_FEATURE_FXSAVE 0x00000010ULL - -/* - * Indicates the processor supports the Streaming SIMD Extensions Instructions. - */ -#define CPU_FEATURE_SSE 0x00000020ULL - -/* - * Indicates the processor supports the Streaming SIMD - * Extensions 2 Instructions. - */ -#define CPU_FEATURE_SSE2 0x00000040ULL - -/* - * Indicates the processor supports the Streaming SIMD - * Extensions 3 Instructions. (PNI) - */ -#define CPU_FEATURE_SSE3 0x00000080ULL - -/* - * The processor supports the Supplemental Streaming SIMD Extensions 3 - * instructions. (MNI) - */ -#define CPU_FEATURE_SSSE3 0x00000100ULL - -/* - * The processor supports the Streaming SIMD Extensions 4.1 instructions.(SNI) - */ -#define CPU_FEATURE_SSE4_1 0x00000200ULL - -/* - * The processor supports the Streaming SIMD Extensions 4.1 instructions. - * (NNI + STTNI) - */ -#define CPU_FEATURE_SSE4_2 0x00000400ULL - - -/* - * The processor supports POPCNT instruction. - */ -#define CPU_FEATURE_POPCNT 0x00000800ULL - -/* - * The processor supports MOVBE instruction. - */ -#define CPU_FEATURE_MOVBE 0x00001000ULL - -/* - * The processor supports PCLMULQDQ instruction. - */ -#define CPU_FEATURE_PCLMULQDQ 0x00002000ULL - -/* - * The processor supports instruction extension for encryption. - */ -#define CPU_FEATURE_AES 0x00004000ULL - -/* - * The processor supports 16-bit floating-point conversions instructions. - */ -#define CPU_FEATURE_F16C 0x00008000ULL - -/* - * The processor supports AVX instruction extension. - */ -#define CPU_FEATURE_AVX 0x00010000ULL - -/* - * The processor supports RDRND (read random value) instruction. - */ -#define CPU_FEATURE_RDRND 0x00020000ULL - -/* - * The processor supports FMA instructions. - */ -#define CPU_FEATURE_FMA 0x00040000ULL - -/* - * The processor supports two groups of advanced bit manipulation extensions. - Haswell introduced, AVX2 related - */ -#define CPU_FEATURE_BMI 0x00080000ULL - -/* - * The processor supports LZCNT instruction (counts the number of leading zero - * bits). - Haswell introduced - */ -#define CPU_FEATURE_LZCNT 0x00100000ULL - -/* - * The processor supports HLE extension (hardware lock elision). - Haswell introduced - */ -#define CPU_FEATURE_HLE 0x00200000ULL - -/* - * The processor supports RTM extension (restricted transactional memory) - Haswell AVX2 related. - */ -#define CPU_FEATURE_RTM 0x00400000ULL - -/* - * The processor supports AVX2 instruction extension. - */ -#define CPU_FEATURE_AVX2 0x00800000ULL - -/* - * The processor supports AVX512 instruction extension. - */ -#define CPU_FEATURE_AVX512 0x01000000ULL - -/* - * The processor supports the PREFETCHW instruction. - */ -#define CPU_FEATURE_PREFETCHW 0x02000000ULL - -/* - * The processor supports RDSEED instruction. - */ -#define CPU_FEATURE_RDSEED 0x04000000ULL - -/* - * The processor supports ADCX and ADOX instructions. - */ -#define CPU_FEATURE_ADCOX 0x08000000ULL - -/* - * The processor is a full inorder (Silverthorne) processor - */ -#define CPU_FEATURE_FULL_INORDER 0x10000000ULL - -/* Reserved feature bits which includes the unset bit CPU_FEATURE_AVX512 */ -#define RESERVED_CPU_FEATURE_BIT ((~(0x20000000ULL - 1)) | 0x01000000ULL) - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_debugger_lib.h b/sgx-jvm/linux-sgx/common/inc/internal/se_debugger_lib.h deleted file mode 100644 index c9eb6c4001..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_debugger_lib.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SEDEBUGGERLIB_H_ -#define _SEDEBUGGERLIB_H_ - -#include "arch.h" -#include "se_types.h" -#include "se_macro.h" -#include - -#define URTS_EXCEPTION_PRECREATEENCLAVE 0xa1a01ec0 -#define URTS_EXCEPTION_POSTINITENCLAVE 0xa1a01ec1 -#define URTS_EXCEPTION_PREREMOVEENCLAVE 0xa1a01ec3 -#define URTS_EXCEPTION_PREEENTER 0xa1a01ec7 - -#define FIRST_CHANCE_EXCEPTION 1 -#define SECOND_CHANCE_EXCEPTION 0 - -#define DBWIN_BUFFER 0xa1a01ec5 -#define CXX_EXCEPTION 0xe06d7363 - -#define SE_UNICODE 1 -#define SE_ANSI 0 -#define DEBUGGER_ENABLED 1 - -#define DEBUG_INFO_STRUCT_VERSION 0x83d0ce23 - -const size_t BUF_SIZE = sizeof(void*); - -typedef struct _debug_tcs_info_t -{ - struct _debug_tcs_info_t* next_tcs_info; - void* TCS_address; - uintptr_t ocall_frame; /* ocall_frame_t** */ - unsigned long thread_id; -}debug_tcs_info_t; - - -#define DEBUG_INFO_MAX_PARAMETERS 10 -typedef struct _debug_info_t -{ - uintptr_t param_array[DEBUG_INFO_MAX_PARAMETERS]; -}debug_info_t; - -//enclave_type bit map -#define ET_SIM_SHIFT 0 /*bits[0]=0 hw, bits[0]=1 sim*/ -#define ET_DEBUG_SHIFT 1 /*bits[1]=0 product enclave, bits[1]=1 debug enclave*/ -#define ET_SIM (1 << ET_SIM_SHIFT) -#define ET_DEBUG (1 << ET_DEBUG_SHIFT) - -typedef struct _debug_enclave_info_t -{ - PADDED_POINTER(struct _debug_enclave_info_t, next_enclave_info); - PADDED_POINTER(void, start_addr); - PADDED_POINTER(debug_tcs_info_t, tcs_list); - uint32_t enclave_type; - uint32_t file_name_size; - PADDED_POINTER(void, lpFileName); - PADDED_POINTER(void, g_peak_heap_used_addr); - PADDED_POINTER(void, dyn_sec); - sgx_misc_select_t misc_select; - /* The following members are optional or unused */ - uint32_t struct_version; - uint32_t unicode; -}debug_enclave_info_t; -typedef struct _ocall_frame_t -{ - uintptr_t pre_last_frame; - uintptr_t index; - uintptr_t xbp; - uintptr_t ret; -}ocall_frame_t; - -static inline void destory_debug_info(debug_enclave_info_t *debug_info) -{ - if(debug_info->lpFileName) - { - free(debug_info->lpFileName); - debug_info->lpFileName = NULL; - } - - /*tcs_list is just a pointer, the instance is maintained in CTrustThread, so don't free it.*/ - debug_info->tcs_list = NULL; -} -#endif /*_SEDEBUGGERLIB_H_*/ - diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_enclave_type.h b/sgx-jvm/linux-sgx/common/inc/internal/se_enclave_type.h deleted file mode 100644 index f3c24f75c9..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_enclave_type.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_ENCLAVE_TYPE_H_ -#define _SE_ENCLAVE_TYPE_H_ - -typedef enum -{ - enclave_type_general = 0, - enclave_type_architecture, -} enclave_type_t; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_error_internal.h b/sgx-jvm/linux-sgx/common/inc/internal/se_error_internal.h deleted file mode 100644 index 4f4e493e8b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_error_internal.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_ERROR_INTERNAL_H_ -#define _SE_ERROR_INTERNAL_H_ - -#include "sgx_error.h" - -/* -bit[31:30] - main module id - 00 - external error - 11---internal error -bit[29:16] - reserved -bit[15:12] - sub-module id -bit[11:0] - specific error -*/ - -#define MAIN_MOD_SHIFT 30 -#define SUB_MOD_SHIFT 12 - -#define INTERNAL_ERROR 3 -#define EXTERNAL_ERROR 0 - -#define SE_INTERNAL_ERROR(x) (0xC0000000|(x)) - -typedef enum _se_status_internal_t -{ - SE_ERROR_SUCCESS = 0, /*same value as SGX_SUCCESS*/ - /*error code for driver return to uRTS*/ - SE_ERROR_DRIVER_UNEXPECTED = SE_INTERNAL_ERROR(0X2001), - SE_ERROR_DRIVER_INVALID_ID = SE_INTERNAL_ERROR(0X2002), - SE_ERROR_DRIVER_INVALID_PARAMETER = SE_INTERNAL_ERROR(0X2003), - SE_ERROR_DRIVER_INVALID_REQUEST = SE_INTERNAL_ERROR(0X2004), - SE_ERROR_DRIVER_OUTOF_MEMORY_R0 = SE_INTERNAL_ERROR(0X2005), - SE_ERROR_DRIVER_OUTOF_MEMORY_R3 = SE_INTERNAL_ERROR(0X2006), - SE_ERROR_DRIVER_OUTOF_EPC = SE_INTERNAL_ERROR(0X2007), - SE_ERROR_DRIVER_HW_CAPABILITY = SE_INTERNAL_ERROR(0X2008), - SE_ERROR_DRIVER_MEMORY_MAP_CONFLICT = SE_INTERNAL_ERROR(0X2009), - SE_ERROR_DRIVER_POWER = SE_INTERNAL_ERROR(0X200a), - SE_ERROR_DRIVER_INVALID_PRIVILEGE = SE_INTERNAL_ERROR(0X200b), - SE_ERROR_DRIVER_INVALID_ISVSVNLE = SE_INTERNAL_ERROR(0X200c), - - SE_ERROR_DRIVER_INVALID_SIG_STRUCT = SE_INTERNAL_ERROR(0X2100), - SE_ERROR_DRIVER_INVALID_ATTRIBUTE = SE_INTERNAL_ERROR(0X2101), - SE_ERROR_DRIVER_INVALID_MEASUREMENT = SE_INTERNAL_ERROR(0X2102), - SE_ERROR_DRIVER_INVALID_SIGNATURE = SE_INTERNAL_ERROR(0X2103), - SE_ERROR_DRIVER_INVALID_LAUNCH_TOKEN= SE_INTERNAL_ERROR(0X2104), - SE_ERROR_DRIVER_INVALID_CPUSVN = SE_INTERNAL_ERROR(0X2105), - SE_ERROR_DRIVER_UNMASKED_EVENT = SE_INTERNAL_ERROR(0X2106), - - SE_ERROR_INVALID_LAUNCH_TOKEN = SE_INTERNAL_ERROR(0x2200), /* the license is invalid*/ - SE_ERROR_INVALID_MEASUREMENT = SE_INTERNAL_ERROR(0x2201), /* The measurement of the enclave is invalid. May caused by signature or launch token*/ - SE_ERROR_READ_LOCK_FAIL = SE_INTERNAL_ERROR(0x2202), - SE_ERROR_INVALID_ISVSVNLE = SE_INTERNAL_ERROR(0X2203), - - /*error code for untrusted event of SE mutex*/ - SE_ERROR_MUTEX_GET_EVENT = SE_INTERNAL_ERROR(0x3001), - SE_ERROR_MUTEX_WAIT_EVENT = SE_INTERNAL_ERROR(0x3002), - SE_ERROR_MUTEX_WAKE_EVENT = SE_INTERNAL_ERROR(0x3003), -} se_status_internal_t; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_event.h b/sgx-jvm/linux-sgx/common/inc/internal/se_event.h deleted file mode 100644 index 354f78c5c3..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_event.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_EVENT_H_ -#define _SE_EVENT_H_ - -# include -# include -# include -typedef void * se_handle_t; - -#include "sgx_defs.h" - -#define SE_MUTEX_SUCCESS 0x0 -#define SE_MUTEX_INVALID 0x1 -#define SE_MUTEX_ERROR_WAKE 0x2 -#define SE_MUTEX_ERROR_WAIT 0x3 - -#ifdef __cplusplus -extern "C" { -#endif - -se_handle_t SGXAPI se_event_init(void); -void SGXAPI se_event_destroy(se_handle_t); - -int SGXAPI se_event_wait(se_handle_t); -int SGXAPI se_event_wake(se_handle_t); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_lock.hpp b/sgx-jvm/linux-sgx/common/inc/internal/se_lock.hpp deleted file mode 100644 index 7d5dcb9d44..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_lock.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* This file implement lock guard */ - -#ifndef SE_LOCK_HPP -#define SE_LOCK_HPP - -#include "util.h" -#include "se_thread.h" -#include "uncopyable.h" - -class Mutex: private Uncopyable -{ -public: - Mutex(){se_mutex_init(&m_mutex);} - ~Mutex(){se_mutex_destroy(&m_mutex);} - void lock(){se_mutex_lock(&m_mutex);} - void unlock(){se_mutex_unlock(&m_mutex);} -private: - se_mutex_t m_mutex; -}; - -class Cond: private Uncopyable -{ -public: - Cond(){se_mutex_init(&m_mutex); se_thread_cond_init(&m_cond);} - ~Cond(){se_mutex_destroy(&m_mutex); se_thread_cond_destroy(&m_cond);} - void lock(){se_mutex_lock(&m_mutex);} - void unlock(){se_mutex_unlock(&m_mutex);} - void wait(){se_thread_cond_wait(&m_cond, &m_mutex);} - void signal(){se_thread_cond_signal(&m_cond);} - void broadcast(){se_thread_cond_broadcast(&m_cond);} -private: - se_mutex_t m_mutex; - se_cond_t m_cond; -}; - -class LockGuard: private Uncopyable -{ -public: - LockGuard(Mutex* mutex):m_mutex(mutex){m_mutex->lock();} - ~LockGuard(){m_mutex->unlock();} -private: - Mutex* m_mutex; -}; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_macro.h b/sgx-jvm/linux-sgx/common/inc/internal/se_macro.h deleted file mode 100644 index 88866a0066..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_macro.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - #ifndef SE_MACRO_H_ - #define SE_MACRO_H_ - -#ifndef SGX_HYPERV_ECO -#define SGX_HYPERV_ECO -#endif - - #endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_map.h b/sgx-jvm/linux-sgx/common/inc/internal/se_map.h deleted file mode 100644 index 69234f1263..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_map.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_MAP_H_ -#define _SE_MAP_H_ - -#include -#include -#include -#include - -#include "se_types.h" - -#include -#include -#include -#include -typedef int se_file_handle_t; - -typedef struct { - uint8_t* base_addr; /* pointer to the mapped area */ - size_t length; /* the length of the mapping */ -} map_handle_t; - -#ifdef __cplusplus -extern "C" { -#endif - -/* Map a file to memory and get its size. */ -map_handle_t* map_file(se_file_handle_t fd, uint32_t *size); - -/* Unmap a mapped file. */ -void unmap_file(map_handle_t* mh); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_memcpy.h b/sgx-jvm/linux-sgx/common/inc/internal/se_memcpy.h deleted file mode 100644 index ce2984b678..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_memcpy.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_MEMCPY_H_ -#define _SE_MEMCPY_H_ - -#include - - -/* memcpy_s always return 0 under Linux */ - -#ifndef _ERRNO_T_DEFINED -#define _ERRNO_T_DEFINED -typedef int errno_t; -#endif - -static inline errno_t memcpy_s(void *dest, size_t numberOfElements, const void *src, size_t count) -{ - if(numberOfElements -#include -#include -#include - -#ifndef MEM_COMMIT -#define MEM_COMMIT 0x1000 -#endif - -#ifndef MEM_RESERVE -#define MEM_RESERVE 0x2000 -#endif - -#ifdef MEM_RELEASE -#warning "MEM_RELEASE define conflict" -#else -#define MEM_RELEASE 0x8000 -#endif - -#ifdef MEM_DECOMMIT -#warning "MEM_DECOMMIT define conflict" -#else -#define MEM_DECOMMIT 0x4000 -#endif - -#include "se_types.h" -#include "arch.h" -#include - -#ifdef __cplusplus -extern "C" { -#endif - -/* -Reserves or commits a region of pages in the virtual address space of the calling process. -Memory allocated by this function is automatically initialized to zero, unless MEM_RESET is specified. -@address: the starting address of the region to allocate. -@size: size of region in bytes. -@type: Only MEM_COMMIT accepted. - MEM_COMMIT - Allocates memory charges for the specified reserved memory pages. - Actual physical pages are not allocated until the virtual addresses are actually accessed. - The function initializes the memory to zero. -@return value: If the function succeeds, the return value is the base address of the allocated region of pages. - If the function fails, the return value is NULL. -*/ -void* se_virtual_alloc(void* address, size_t size, uint32_t type); -/* -Releases, decommits, or releases and decommits a region of pages within the virtual address space of the calling process. -@address:A pointer to the base address of the region of pages to be freed. If the dwFreeType parameter is MEM_RELEASE, - this parameter must be the base address returned by the se_virtual_alloc function when the region of pages is reserved. -@size: The size of the region of memory to be freed, in bytes. -@type: Only MEM_RELEASE accepted - MEM_RELEASE - releases the specified region of pages. After this operation, the pages are in the free state. -@return value:If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. -*/ -int se_virtual_free(void* address, size_t size, uint32_t type); -/* -Locks the specified region of the process's virtual address space into physical memory, ensuring that subsequent access to the region will not incur a page fault. -@address: A pointer to the base address of the region of pages to be locked. - The region of affected pages includes all pages that contain one or more bytes in the range from the address parameter to (address+size). -@size: The size of the region to be locked, in bytes. -@return value: If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. -*/ -int se_virtual_lock(void* address, size_t size); -/* -Changes the protection on a region of committed pages in the virtual address space of the calling process. -@address: A pointer an address that describes the starting page of the region of pages whose access protection attributes are to be changed. -@size: The size of the region whose access protection attributes are to be changed, in bytes. -@prot: The memory protection option. The option can be SI_FLAG_R, SI_FLAG_W, SI_FLAG_X. -@return value: If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. -*/ - -#define SGX_PROT_NONE PROT_NONE - -int se_virtual_protect(void* address, size_t size, uint32_t prot); - - -#include -#include -#include -#include -typedef pid_t se_proc_t; - -/* -@return value: on success, return TRUE else return FALSE -*/ -se_proc_t get_self_proc(void); -/* -** If the function succeeds, the return value is nonzero. -** If the function fails, the return value is zero. -*/ -int put_self_proc(se_proc_t proc); -int se_read_process_mem(se_proc_t proc, void* base_addr, void* buffer, size_t size, size_t* read_nr); -int se_write_process_mem(se_proc_t proc, void* base_addr, void* buffer, size_t size, size_t* write_ndr); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_page_attr.h b/sgx-jvm/linux-sgx/common/inc/internal/se_page_attr.h deleted file mode 100644 index 9253e1a36a..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_page_attr.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_PAGE_ATTR_H_ -#define _SE_PAGE_ATTR_H_ - -// layout.entry.attribute is 16-bit length -typedef enum -{ - DoEADD = 0, - DoEEXTEND, - DoEREMOVE, - DoPostADD, - DoPostREMOVE, - DynTHREAD, - GrowDOWN, -} ATTRIBUTE_BITS_t; - -#define PAGE_ATTR_EADD (1< - -typedef pthread_rwlock_t se_rwlock_t; -typedef pthread_rwlock_t* se_prwlock_t; - -#ifdef __cplusplus -extern "C" { -#endif - -void se_wtlock(se_prwlock_t); -void se_wtunlock(se_prwlock_t); -int se_try_rdlock(se_prwlock_t); -void se_rdlock(se_prwlock_t lock); -void se_rdunlock(se_prwlock_t); -void se_init_rwlock(se_prwlock_t lock); -void se_fini_rwlock(se_prwlock_t lock); - -#ifdef __cplusplus -} -#endif - -#endif /* _RWLOCK_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_stdio.h b/sgx-jvm/linux-sgx/common/inc/internal/se_stdio.h deleted file mode 100644 index d516142d30..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_stdio.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef SE_STDIO_H -#define SE_STDIO_H - -#include -#include -#include "se_memcpy.h" -#include -#include -#include -#include -#include - -#ifndef MAX_PATH -#define MAX_PATH 260 -#endif - -static inline int se_delete_file(const char *path_name) -{ - return unlink(path_name); -} - -#define se_delete_tfile se_delete_file - -static inline int sprintf_s(char *dst_buf, size_t size_in_bytes, const char *format, ...) -{ - va_list argptr; - int cnt; - va_start(argptr, format); - cnt = vsnprintf(dst_buf, size_in_bytes, format, argptr); - va_end(argptr); - return cnt; -} - -static inline int _snprintf_s(char *dst_buf, size_t size_in_bytes, size_t max_count, const char *format, ...) -{ - (void) size_in_bytes; - va_list argptr; - int cnt; - va_start(argptr, format); - cnt = vsnprintf(dst_buf, max_count, format, argptr); - va_end(argptr); - return cnt; -} - -static inline errno_t fopen_s(FILE **f, const char *filename, const char *mode) -{ - errno_t err = 0; - *f = fopen(filename, mode); - if(*f==NULL){ - err = -1; - } - return err; -} - -static inline int se_copy_file(const char *dst_name, const char *src_name) -{ - int dest = -1; - int source = -1; - ssize_t nr_read; - struct stat stat_buf; - -#ifndef BUF_SIZE -#define BUF_SIZE 4096 -#endif - char buf[BUF_SIZE]; - - /* open the input file */ - source = open(src_name, O_RDONLY); - if(source < 0) - goto error; - - /* get size and permissions of the prebuild DB file */ - if (fstat(source, &stat_buf) != 0) - goto error; - - dest = open(dst_name, O_WRONLY|O_CREAT|O_TRUNC, stat_buf.st_mode); - if(dest < 0) - goto error; - - while ((nr_read = read(source, buf, BUF_SIZE)) > 0) - { - if (write(dest, buf, nr_read) != nr_read) - goto error; - } -#undef BUF_SIZE - - close(dest); - close(source); - return 0; - -error: - if(dest>=0)close(dest); - if(source>=0)close(source); - return -1; -} - -#ifdef __cplusplus -template -int sprintf_s(char (&dst)[_Size], const char *format, ...) -{ - va_list argptr; - int cnt; - va_start(argptr, format); - cnt = vsprintf(dst, format, argptr); - va_end(argptr); - return cnt; -} - -template -int _snprintf_s(char (&dst)[_Size], size_t max_count, const char *format, ...) -{ - va_list argptr; - int cnt; - va_start(argptr, format); - cnt = vsnprintf(dst, max_count, format, argptr); - va_end(argptr); - return cnt; -} - -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_string.h b/sgx-jvm/linux-sgx/common/inc/internal/se_string.h deleted file mode 100644 index b36c292516..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_string.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_STRING_H_ -#define _SE_STRING_H_ - -#include "se_memcpy.h" -#include - - -#ifndef _ERRNO_T_DEFINED -#define _ERRNO_T_DEFINED -typedef int errno_t; -#endif - -static inline errno_t strcat_s(char *dst, size_t max_size, const char *src) -{ - if(strlen(dst)+strlen(src)+1>max_size)return -1; - strcat(dst, src); - return 0; -} - -static inline errno_t strcpy_s(char *dst, size_t max_size, const char *src) -{ - if(strnlen(src, max_size)+1>max_size)return -1; - strcpy(dst, src); - return 0; -} - -#define _strnicmp strncasecmp -static inline errno_t strncat_s(char *dst, size_t max_size, const char *src, size_t max_count) -{ - size_t len = strnlen(src,max_count); - len+=strnlen(dst, max_size)+1; - if(len>max_size)return -1; - strncat(dst, src, max_count); - return 0; -} - -#define _strdup strdup -#define strnlen_s strnlen - - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_tcrypto_common.h b/sgx-jvm/linux-sgx/common/inc/internal/se_tcrypto_common.h deleted file mode 100644 index be3a25171e..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_tcrypto_common.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _SE_TCRYPTO_COMMON_H_ -#define _SE_TCRYPTO_COMMON_H_ - -#ifdef USE_SGXSSL - - -#ifdef DEBUG - -extern unsigned long openssl_last_err; - -#define CLEAR_OPENSSL_ERROR_QUEUE while ((openssl_last_err = ERR_get_error())) { } \ - openssl_last_err = 0 -#define GET_LAST_OPENSSL_ERROR openssl_last_err = ERR_get_error() - -#else - -#define CLEAR_OPENSSL_ERROR_QUEUE {} -#define GET_LAST_OPENSSL_ERROR {} - - -#endif //DEBUG - - -#endif //USE_SGXSSL - -#endif //_SE_TCRYPTO_COMMON_H_ diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_thread.h b/sgx-jvm/linux-sgx/common/inc/internal/se_thread.h deleted file mode 100644 index c68fe018e4..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_thread.h +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _SE_THREAD_H_ -#define _SE_THREAD_H_ - - -#ifndef _GNU_SOURCE -#define _GNU_SOURCE /* for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP */ -#endif -#include -#include -#include -#include -typedef pthread_mutex_t se_mutex_t; -typedef pthread_cond_t se_cond_t; -typedef pid_t se_thread_id_t; -typedef pthread_key_t se_tls_index_t; - -#ifdef __cplusplus -extern "C" { -#endif -/* -@mutex: A pointer to the critical section object. -@return value: If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. -*/ -void se_mutex_init(se_mutex_t* mutex); -int se_mutex_lock(se_mutex_t* mutex); -int se_mutex_unlock(se_mutex_t* mutex); -int se_mutex_destroy(se_mutex_t* mutex); - -void se_thread_cond_init(se_cond_t* cond); -int se_thread_cond_wait(se_cond_t *cond, se_mutex_t *mutex); -int se_thread_cond_signal(se_cond_t *cond); -int se_thread_cond_broadcast(se_cond_t *cond); -int se_thread_cond_destroy(se_cond_t* cond); - -unsigned int se_get_threadid(void); - -/* tls functions */ -int se_tls_alloc(se_tls_index_t *tls_index); -int se_tls_free(se_tls_index_t tls_index); -void * se_tls_get_value(se_tls_index_t tls_index); -int se_tls_set_value(se_tls_index_t tls_index, void *tls_value); - -/* se_thread_handle_t se_create_thread(size_t stack_size, thread_start_routine_t start_routine, void *param, se_thread_t* thread); */ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_time.h b/sgx-jvm/linux-sgx/common/inc/internal/se_time.h deleted file mode 100644 index d623ee2c2d..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_time.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_TIME_H_ -#define _SE_TIME_H_ - -#include "se_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* -*@milli_seconds: the time range for sleep. It is milliseconds. -*/ -void se_sleep(uint32_t milli_seconds); -uint64_t se_get_tick_count_freq(void); -uint64_t se_get_tick_count(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_trace.h b/sgx-jvm/linux-sgx/common/inc/internal/se_trace.h deleted file mode 100644 index bae2630973..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_trace.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* - *This file wrapper some trace output. -*/ - -#ifndef _SE_DEBUG_H_ -#define _SE_DEBUG_H_ - -#include -#include - -typedef enum -{ - SE_TRACE_ERROR, - SE_TRACE_WARNING, - SE_TRACE_NOTICE, - SE_TRACE_DEBUG -} se_trace_t; - -#ifndef SE_DEBUG_LEVEL -/* Each module need define their own SE_DEBUG_LEVEL */ -#define SE_DEBUG_LEVEL SE_TRACE_ERROR -#endif - -#ifdef __cplusplus -extern "C" { -#endif -int se_trace_internal(int debug_level, const char *fmt, ...); - -#ifdef __cplusplus -} -#endif - -/* For libraries, we usually define DISABLE_TRACE to disable any trace. */ -/* For apps, we usually enable trace. */ -#ifdef DISABLE_TRACE -#define SE_TRACE(...) -#define se_trace(...) -#else /* DISABLE_TRACE */ -#define se_trace(debug_level, fmt, ...) \ - do { \ - if(debug_level <= SE_DEBUG_LEVEL) \ - se_trace_internal(debug_level, fmt, ##__VA_ARGS__); \ - }while(0) - -/* For compatibility, SE_TRACE/se_trace is used in old code. */ -/* New code should use SE_TRACE_DEBUG, SE_TRACE_NOTICE, SE_TRACE_WARNING, SE_TRACE_ERROR */ -#define SE_TRACE(debug_level, fmt, ...) \ - se_trace(debug_level, "[%s %s:%d] " fmt, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__) -#endif/* DISABLE_TRACE */ - -/* SE_TRACE_DEBUG and SE_TRACE_NOTICE print the debug information plus message. */ -#define SE_TRACE_DEBUG(fmt, ...) se_trace(SE_TRACE_DEBUG, "[%s %s:%d] " fmt, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__) -#define SE_TRACE_NOTICE(fmt, ...) se_trace(SE_TRACE_NOTICE, "[%s %s:%d] " fmt, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__) -/* SE_TRACE_WARNING and SE_TRACE_ERROR only print message. */ -#define SE_TRACE_WARNING(fmt, ...) se_trace(SE_TRACE_WARNING, fmt, ##__VA_ARGS__) -#define SE_TRACE_ERROR(fmt, ...) se_trace(SE_TRACE_ERROR, fmt, ##__VA_ARGS__) - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_types.h b/sgx-jvm/linux-sgx/common/inc/internal/se_types.h deleted file mode 100644 index f5e414692c..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_types.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* - * This file is to define some types that is platform independent. -*/ - -#ifndef _SE_TYPE_H_ -#define _SE_TYPE_H_ -#include "se_cdefs.h" - -#ifdef SE_DRIVER - -typedef INT8 int8_t; -typedef UINT8 uint8_t; -typedef INT16 int16_t; -typedef UINT16 uint16_t; -typedef INT32 int32_t; -typedef UINT32 uint32_t; -typedef INT64 int64_t; -typedef UINT64 uint64_t; - -#else - -#include -#include - -#ifndef TRUE -#define TRUE 1 -#endif - -#ifndef FALSE -#define FALSE 0 -#endif - -#endif - -#if defined(SE_64) - -#define PADDED_POINTER(t, p) t* p -#define PADDED_DWORD(d) uint64_t d -#define PADDED_LONG(l) int64_t l -#define REG(name) r##name -#ifdef SE_SIM_EXCEPTION -#define REG_ALIAS(name) R##name -#endif -#define REGISTER(name) uint64_t REG(name) - -#else /* !defined(SE_64) */ - -#define PADDED_POINTER(t, p) t* p; void* ___##p##_pad_to64_bit -#define PADDED_DWORD(d) uint32_t d; uint32_t ___##d##_pad_to64_bit -#define PADDED_LONG(l) int32_t l; int32_t ___##l##_pad_to64_bit - -#define REG(name) e##name - -#ifdef SE_SIM_EXCEPTION -#define REG_ALIAS(name) E##name -#endif - -#define REGISTER(name) uint32_t REG(name); uint32_t ___##e##name##_pad_to64_bit - -#endif /* !defined(SE_64) */ - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_vendor.h b/sgx-jvm/linux-sgx/common/inc/internal/se_vendor.h deleted file mode 100644 index 2896f6bea4..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_vendor.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_VENDOR_H_ -#define _SE_VENDOR_H_ - -#define INTEL_VENDOR_ID 0x8086 -#define AE_PRODUCT_ID 0x1 - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_version.h b/sgx-jvm/linux-sgx/common/inc/internal/se_version.h deleted file mode 100644 index 316ae446c9..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_version.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -#define STRFILEVER "2.0.40950" - diff --git a/sgx-jvm/linux-sgx/common/inc/internal/se_wrapper.h b/sgx-jvm/linux-sgx/common/inc/internal/se_wrapper.h deleted file mode 100644 index c2cb3a89cd..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/se_wrapper.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* - *This file wrapper all the head file that is platform dependent. -*/ -#ifndef _SE_WRAPPER_H_ -#define _SE_WRAPPER_H_ - -#include "se_cdefs.h" -#include "se_types.h" -#include "se_thread.h" -#include "se_trace.h" -#include "se_time.h" -#include "se_event.h" -#include "se_rwlock.h" -#include "se_atomic.h" -#include "se_memcpy.h" -#include "se_string.h" -#include "se_stdio.h" - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/sgx_ecc256_internal.h b/sgx-jvm/linux-sgx/common/inc/internal/sgx_ecc256_internal.h deleted file mode 100644 index 6882e8ae13..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/sgx_ecc256_internal.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_ECC256_INTERNAL_H -#define _SGX_ECC256_INTERNAL_H - -#include "sgx_tcrypto.h" - -typedef struct _sgx_ec256_shared_point_t -{ - uint8_t x[SGX_ECP256_KEY_SIZE]; - uint8_t y[SGX_ECP256_KEY_SIZE]; -} sgx_ec256_shared_point_t; - -#ifdef __cplusplus -extern "C" -#endif - -/* NOTE: The function is for internal use ONLY - * - * Computes a point with scalar multiplication based on private B key (local) and remote public Ga Key - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: sgx_ecc_state_handle_t ecc_handle - Handle to the ECC crypto system - * sgx_ec256_private_t *p_private_b - Pointer to the local private key - * sgx_ec256_public_t *p_public_ga - Pointer to the remote public key - * Output: sgx_ec256_shared_point_t *p_shared_key - Pointer to the target shared point - */ -sgx_status_t SGXAPI sgx_ecc256_compute_shared_point(sgx_ec256_private_t *p_private_b, - sgx_ec256_public_t *p_public_ga, - sgx_ec256_shared_point_t *p_shared_key, - sgx_ecc_state_handle_t ecc_handle); - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/sgx_memset_s.h b/sgx-jvm/linux-sgx/common/inc/internal/sgx_memset_s.h deleted file mode 100644 index 2324513a65..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/sgx_memset_s.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SE_MEMSET_S_H -#define _SE_MEMSET_S_H -#include -#ifdef __cplusplus -extern "C" -#endif -int memset_s(void *s, size_t smax, int c, size_t n); - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/sgx_profile.h b/sgx-jvm/linux-sgx/common/inc/internal/sgx_profile.h deleted file mode 100644 index 07c3e08607..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/sgx_profile.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* -Some notes for using the profiling macros - -1. Define _PROFILE_ before including "sgx_profile.h" will enable the profiling, - also need to include sgx_profile.cpp in the compiling process -2. When use it in multi-threaded application, please don't trigger profiling in multiple threads at the same time. - The implementation is not thread-safe now, to avoid additional latency introduced by locks -3. PROFILE_OUTPUT macro should only be used once before application exits -4. PROFILE_START and PROFILE_END should be paired, otherwise PROFILE_OUTPUT will abort the program when detects the mismatch - -A simple example to use PROFILE macro - -#define _PROFILE_ -#include "sgx_profile.h" - -... -PROFILE_INIT(); -... - -PROFILE_START("func1"); -func1(); -PROFILE_END("func1"); - -... - -PROFILE_START("func2"); -func2(); -PROFILE_END("func2"); - -... - -PROFILE_OUTPUT("C:\\work\\output.csv"); -... -*/ - - -#ifndef _SGX_PROFILE_H_ -#define _SGX_PROFILE_H_ - - -#if defined(_PROFILE_) -#define PRO_START 0 -#define PRO_END 1 - -#if defined(__cplusplus) -extern "C" -{ -#endif - -void profile_init(); -void profile_start(const char* str); /* 'str' must be global string. Do not use string in stack. */ -void profile_end(const char * str); -void profile_output(const char* filename); - -#if defined(__cplusplus) -} -#endif - -#define PROFILE_INIT() profile_init() -#define PROFILE_START(x) profile_start(x) -#define PROFILE_END(x) profile_end(x) -#define PROFILE_OUTPUT(x) profile_output(x) - -#else -#define PROFILE_INIT() -#define PROFILE_START(x) -#define PROFILE_END(x) -#define PROFILE_OUTPUT(x) -#endif - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/sgx_read_rand.h b/sgx-jvm/linux-sgx/common/inc/internal/sgx_read_rand.h deleted file mode 100644 index 6aa178014b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/sgx_read_rand.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef __SGX_READ_RAND_H__ -#define __SGX_READ_RAND_H__ -#include "sgx.h" -#include "sgx_defs.h" -#ifdef __cplusplus -extern "C" -#endif -sgx_status_t SGXAPI sgx_read_rand(unsigned char *buf, size_t size); -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/sgx_sha256_128.h b/sgx-jvm/linux-sgx/common/inc/internal/sgx_sha256_128.h deleted file mode 100644 index 03882b5182..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/sgx_sha256_128.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifndef _SHA256_128_H -#define _SHA256_128_H - -#include "stdlib.h" -#include "sgx_utils.h" -#include "sgx_tcrypto.h" -#include "math.h" -#include "string.h" - -#define SGX_SHA256_128_HASH_SIZE 16 -typedef uint8_t sgx_sha256_128_hash_t[SGX_SHA256_128_HASH_SIZE]; - -sgx_status_t SGXAPI sgx_sha256_128_msg(const uint8_t *p_src, uint32_t src_len, sgx_sha256_128_hash_t *p_hash); - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/tae_service_internal.h b/sgx-jvm/linux-sgx/common/inc/internal/tae_service_internal.h deleted file mode 100644 index f707574fe3..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/tae_service_internal.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _TAE_SERVICE_INTERNAL_H_ -#define _TAE_SERVICE_INTERNAL_H_ - -#include -#include "sgx.h" -#include "arch.h" -#include "sgx_tae_service.h" -#include "pse_types.h" - -#pragma pack(push, 1) - -typedef struct _se_ps_sec_prop_desc_internal -{ - uint32_t desc_type; /* Type of this descriptor. Must be 0 */ - sgx_prod_id_t pse_prod_id; /* REPORT(PSE).ProdID */ - sgx_isv_svn_t pse_isvsvn; /* REPORT(PSE).ISVSVN */ - uint32_t pse_miscselect; /* REPORT(PSE).MISC_SELECT */ - uint32_t reserved1; /* For DESC_TYPE=0, MBZ */ - sgx_attributes_t pse_attributes; /* REPORT(PSE).ATTRIBUTES */ - sgx_measurement_t pse_mr_signer; /* REPORT(PSE).MRSIGNER */ - uint32_t reserved2[16]; - /*the following will be provided by PSE from CSE_SEC_PROP */ - cse_sec_prop_t cse_sec_prop; -} se_ps_sec_prop_desc_internal_t; - -se_static_assert(sizeof(se_ps_sec_prop_desc_internal_t) == sizeof(sgx_ps_sec_prop_desc_t)); - -#pragma pack(pop) - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/thread_data.h b/sgx-jvm/linux-sgx/common/inc/internal/thread_data.h deleted file mode 100644 index 108d8b8b8f..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/thread_data.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _THREAD_DATA_H_ -#define _THREAD_DATA_H_ - -#include "se_types.h" -#include "se_cdefs.h" - -#ifdef TD_SUPPORT_MULTI_PLATFORM -/* To enable the SignTool to sign both 32/64-bit Enclave for ELF, - * we need to make the struct `thread_data_t' have a consistent - * definition for 32/64-bit compiler. - * - * We achieve it by forcing the compiler to check pre-defined macros - * `RTS_SYSTEM_WORDSIZE' - * - * |--------------------------+-------| - * | RTS_SYSTEM_WORDSIZE = 32 | ELF32 | - * |--------------------------+-------| - * | RTS_SYSTEM_WORDSIZE = 64 | ELF64 | - * - */ -# ifndef RTS_SYSTEM_WORDSIZE -# error RTS_SYSTEM_WORDSIZE should be pre-defined. -# endif - -/* Avoid to use `uintptr_t' in the struct `thread_data_t' and its members. */ -# if RTS_SYSTEM_WORDSIZE == 32 -typedef uint32_t sys_word_t; -# elif RTS_SYSTEM_WORDSIZE == 64 -typedef uint64_t sys_word_t; -# else -# error Invalid value for 'RTS_SYSTEM_WORDSIZE'. -# endif - -#else - -/* For uRTS, there is no need to define the macro 'TD_SUPPORT_MULTI_PLATFORM' */ -typedef size_t sys_word_t; - -/* SE_32 and SE_64 are defined in "se_cdefs.h" */ -# ifdef SE_32 -# define RTS_SYSTEM_WORDSIZE 32 -# elif defined(SE_64) -# define RTS_SYSTEM_WORDSIZE 64 -# else -# error Unknown system word size. -# endif - -#endif /* ! TD_SUPPORT_MULTI_PLATFORM */ - -/* The data structure currently is naturally aligned regardless of the value of - * RTS_SYSTEM_WORDSIZE. - * - * However, we need to take care when modifying the data structure in future. - */ - -typedef struct _thread_data_t -{ - sys_word_t self_addr; - sys_word_t last_sp; /* set by urts, relative to TCS */ - sys_word_t stack_base_addr; /* set by urts, relative to TCS */ - sys_word_t stack_limit_addr; /* set by urts, relative to TCS */ - sys_word_t first_ssa_gpr; /* set by urts, relative to TCS */ - sys_word_t stack_guard; /* GCC expects start_guard at 0x14 on x86 and 0x28 on x64 */ - - sys_word_t reserved; - sys_word_t xsave_size; /* in bytes (se_ptrace.c needs to know its offset).*/ - sys_word_t last_error; /* init to be 0. Used by trts. */ - -#ifdef TD_SUPPORT_MULTI_PLATFORM - sys_word_t m_next; /* next TD used by trusted thread library (of type "struct _thread_data *") */ -#else - struct _thread_data_t *m_next; -#endif - sys_word_t tls_addr; /* points to TLS pages */ - sys_word_t tls_array; /* points to TD.tls_addr relative to TCS */ -#ifdef TD_SUPPORT_MULTI_PLATFORM - sys_word_t exception_flag; /* mark how many exceptions are being handled */ -#else - intptr_t exception_flag; -#endif - sys_word_t cxx_thread_info[6]; - sys_word_t stack_commit_addr; -} thread_data_t; - -#ifdef __cplusplus -extern "C" { -#endif - -thread_data_t *get_thread_data(void); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/trts_inst.h b/sgx-jvm/linux-sgx/common/inc/internal/trts_inst.h deleted file mode 100644 index 6a96dc1ae9..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/trts_inst.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _TRTS_INST_H_ -#define _TRTS_INST_H_ - -#include "sgx.h" -#include "arch.h" - -/* Attention: - * if the following alignment requirement changes, go to selib to - * review the memory allocation of sgx_create_report and sgx_get_key. - */ -#define TARGET_INFO_ALIGN_SIZE 512 -#define REPORT_DATA_ALIGN_SIZE 128 -#define REPORT_ALIGN_SIZE 512 -#define KEY_REQUEST_ALIGN_SIZE 512 -#define KEY_ALIGN_SIZE 16 - -#define BIT_ERROR(x) (1 << (x)) - -typedef enum _egetkey_status_t -{ - EGETKEY_SUCCESS = 0, - EGETKEY_INVALID_ATTRIBUTE = BIT_ERROR(1), - EGETKEY_INVALID_CPUSVN = BIT_ERROR(5), - EGETKEY_INVALID_ISVSVN = BIT_ERROR(6), - EGETKEY_INVALID_KEYNAME = BIT_ERROR(8), -} egetkey_status_t; - -struct ms_tcs -{ - void * ptcs; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -int sgx_accept_forward(si_flags_t sfl, size_t lo, size_t hi); -void do_ereport(const sgx_target_info_t *target_info, const sgx_report_data_t *report_data, sgx_report_t *report); -int do_egetkey(const sgx_key_request_t *key_request, sgx_key_128bit_t *key); -uint32_t do_rdrand(uint32_t *rand); -int do_eaccept(const sec_info_t *, size_t); -int do_emodpe(const sec_info_t*, size_t); -int apply_EPC_pages(void *start_address, size_t page_number); -int apply_pages_within_exception(void *start_address, size_t page_count); -int trim_EPC_pages(void *start_address, size_t page_number); -sgx_status_t SGXAPI sgx_trts_mprotect(size_t start, size_t size, uint64_t perms); -sgx_status_t do_add_thread(void *ms); -int is_dynamic_thread(void *tcs); -uint32_t get_dynamic_stack_max_page(void); -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/uae_service_internal.h b/sgx-jvm/linux-sgx/common/inc/internal/uae_service_internal.h deleted file mode 100644 index ab929f558b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/uae_service_internal.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _UAE_SERVICE_INTERNAL_H_ -#define _UAE_SERVICE_INTERNAL_H_ - -#include -#include "arch.h" -#include "sgx_urts.h" - -#ifdef __cplusplus -extern "C" { -#endif -/** - * Function to get launch token of a enclave - * - * @param signature[in] Signature of enclave to be launched. - * @param attribute[in] Attribute of enclave to be launched. - * @param launch_token[out] Vontains launch token. - * @return if a launch token is generated,return SGX_SCCUESS, otherwise return general error code SGX_ERROR_SERVICE_UNAVAILABLE - * SGX_ERROR_SERVICE_TIMEOUT, or SGX_ERROR_SERVICE_INVALID_PRIVILEGE, SGX_ERROR_INVALID_PARAMETER - * to indicate special error condition. - */ -sgx_status_t SGXAPI get_launch_token(const enclave_css_t* signature, const sgx_attributes_t* attribute, sgx_launch_token_t* launch_token); - -/* Return SGX_SUCCESS on success */ -sgx_status_t create_session_ocall(uint32_t* sid, uint8_t* dh_msg1, uint32_t dh_msg1_size, uint32_t timeout); - -/* Return SGX_SUCCESS on success */ -sgx_status_t exchange_report_ocall(uint32_t sid, const uint8_t* dh_msg2, uint32_t dh_msg2_size, uint8_t* dh_msg3, uint32_t dh_msg3_size, uint32_t timeout); - -/* Return SGX_SUCCESS on success */ -sgx_status_t close_session_ocall(uint32_t sid, uint32_t timeout); - -/* Return SGX_SUCCESS on success */ -sgx_status_t invoke_service_ocall( - const uint8_t* pse_message_req, uint32_t pse_message_req_size, - uint8_t* pse_message_resp, uint32_t pse_message_resp_size, - uint32_t timeout - ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/uncopyable.h b/sgx-jvm/linux-sgx/common/inc/internal/uncopyable.h deleted file mode 100644 index a34f8b6f1e..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/uncopyable.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _UNCOPYABLE_H_ -#define _UNCOPYABLE_H_ - -/* Similiar to boost::noncopyable */ -class Uncopyable { -protected: - Uncopyable() {} - ~Uncopyable() {} - -private: - /* Disable copying */ - Uncopyable(const Uncopyable&); - Uncopyable& operator=(const Uncopyable&); -}; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/util.h b/sgx-jvm/linux-sgx/common/inc/internal/util.h deleted file mode 100644 index d572d6464c..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/util.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _UTIL_H_ -#define _UTIL_H_ - -#include "arch.h" -#include - -#ifdef __cplusplus -#define GET_PTR(t, p, offset) reinterpret_cast( reinterpret_cast(p) + static_cast(offset) ) -#define PTR_DIFF(p1, p2) ((reinterpret_cast(p1) - reinterpret_cast(p2))) -#else -#define GET_PTR(t, p, offset) (t*)( (size_t)(p) + (size_t)(offset) ) -#define PTR_DIFF(p1, p2) ((size_t)(p1) - (size_t)(p2)) -#endif - -#define DIFF(p1, p2) (assert((size_t)(p1) >= (size_t)(p2)), ((size_t)(p1) - (size_t)(p2))) -#define DIFF64(p1, p2) (assert((uint64_t)(p1) >= (uint64_t)(p2)), ((uint64_t)(p1) - (uint64_t)(p2))) - -#define SE_PAGE_SHIFT 12 -#define SE_BULK_PAGE_FRAME_SHIFT 4 -#define SE_BULK_PAGE_FRAME_SIZE (1 << SE_BULK_PAGE_FRAME_SHIFT) -#define SE_BULK_PAGE_FRAME_MASK (SE_BULK_PAGE_FRAME_SIZE-1) -#define SE_BULK_PAGE_SHIFT (SE_PAGE_SHIFT + SE_BULK_PAGE_FRAME_SHIFT) -#define SE_BULK_PAGE_SIZE (1 << SE_BULK_PAGE_SHIFT) -#define SE_GUARD_PAGE_SHIFT 16 -#define SE_GUARD_PAGE_SIZE (1 << SE_GUARD_PAGE_SHIFT) - -#define ROUND_TO(x, align) (((x) + ((align)-1)) & ~((align)-1)) -#define ROUND_TO_PAGE(x) ROUND_TO(x, SE_PAGE_SIZE) -#define TRIM_TO_PAGE(x) ((x) & ~(SE_PAGE_SIZE-1)) -#define PAGE_OFFSET(x) ((x) & (SE_PAGE_SIZE -1)) -#ifdef __cplusplus -#define PAGE_ALIGN(t, x) reinterpret_cast((reinterpret_cast(x)+(SE_PAGE_SIZE-1)) & (~(SE_PAGE_SIZE-1))) -#else -#define PAGE_ALIGN(t, x) (t*)( ((size_t)(x)+(SE_PAGE_SIZE-1)) & (~(SE_PAGE_SIZE-1)) ) -#endif - -#define IS_PAGE_ALIGNED(x) (!((size_t)(x)&(SE_PAGE_SIZE-1))) - -#define MIN(x, y) (((x)>(y))?(y):(x)) -#define MAX(x, y) (((x)>(y))?(x):(y)) -#define ARRAY_LENGTH(x) (sizeof(x)/sizeof(x[0])) - -/* used to eliminate `unused variable' warning */ -#define UNUSED(val) (void)(val) - -#include -#define container_of(ptr, type, member) (type *)( (char *)(ptr) - offsetof(type,member) ) - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/internal/xsave.h b/sgx-jvm/linux-sgx/common/inc/internal/xsave.h deleted file mode 100644 index 188378b04b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/internal/xsave.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _XSAVE_H_ -#define _XSAVE_H_ - -#include "se_types.h" - - -#define XSAVE_ALIGN_SIZE 64 -#define FXSAVE_ALIGN_SIZE 16 -#define FXSAVE_SIZE 528 -/* 512 + 16, the alignment is handled in internal functions */ - -#define CLEAN_XFEATURE_REGS save_and_clean_xfeature_regs(NULL); - -#ifdef __cplusplus -extern "C" { -#endif - -void init_xsave_info(); - - -/* trts_xsave.cpp */ -uint64_t get_xfeature_state(); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx.h b/sgx-jvm/linux-sgx/common/inc/sgx.h deleted file mode 100644 index 47fc9f165a..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_H_ -#define _SGX_H_ - -#include "sgx_error.h" -#include "sgx_attributes.h" -#include "sgx_key.h" -#include "sgx_report.h" - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_attributes.h b/sgx-jvm/linux-sgx/common/inc/sgx_attributes.h deleted file mode 100644 index b314c300f3..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_attributes.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_ATTRIBUTES_H_ -#define _SGX_ATTRIBUTES_H_ - -#include - -/* Enclave Flags Bit Masks */ -#define SGX_FLAGS_INITTED 0x0000000000000001ULL /* If set, then the enclave is initialized */ -#define SGX_FLAGS_DEBUG 0x0000000000000002ULL /* If set, then the enclave is debug */ -#define SGX_FLAGS_MODE64BIT 0x0000000000000004ULL /* If set, then the enclave is 64 bit */ -#define SGX_FLAGS_PROVISION_KEY 0x0000000000000010ULL /* If set, then the enclave has access to provision key */ -#define SGX_FLAGS_EINITTOKEN_KEY 0x0000000000000020ULL /* If set, then the enclave has access to EINITTOKEN key */ -#define SGX_FLAGS_RESERVED (~(SGX_FLAGS_INITTED | SGX_FLAGS_DEBUG | SGX_FLAGS_MODE64BIT | SGX_FLAGS_PROVISION_KEY | SGX_FLAGS_EINITTOKEN_KEY)) - -/* XSAVE Feature Request Mask */ -#define SGX_XFRM_LEGACY 0x0000000000000003ULL /* Legacy XFRM which includes the basic feature bits required by SGX, x87 state(0x01) and SSE state(0x02) */ -#define SGX_XFRM_AVX 0x0000000000000006ULL /* AVX XFRM which includes AVX state(0x04) and SSE state(0x02) required by AVX */ -#define SGX_XFRM_AVX512 0x00000000000000E6ULL /* AVX-512 XFRM - not supported */ -#define SGX_XFRM_MPX 0x0000000000000018ULL /* MPX XFRM - not supported */ - -#define SGX_XFRM_RESERVED (~(SGX_XFRM_LEGACY | SGX_XFRM_AVX)) - -typedef struct _attributes_t -{ - uint64_t flags; - uint64_t xfrm; -} sgx_attributes_t; - -/* define MISCSELECT - all bits are currently reserved */ -typedef uint32_t sgx_misc_select_t; - -typedef struct _sgx_misc_attribute_t { - sgx_attributes_t secs_attr; - sgx_misc_select_t misc_select; -} sgx_misc_attribute_t; - -#endif/* _SGX_ATTRIBUTES_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_capable.h b/sgx-jvm/linux-sgx/common/inc/sgx_capable.h deleted file mode 100644 index 97cfc72ecf..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_capable.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#pragma once - -#ifndef _SGX_CAPABLE_H_ -#define _SGX_CAPABLE_H_ - -#include "sgx_error.h" -#include "sgx_defs.h" - -typedef enum _sgx_device_status_t { - SGX_ENABLED, - SGX_DISABLED_REBOOT_REQUIRED, /* A reboot is required to finish enabling SGX */ - SGX_DISABLED_LEGACY_OS, /* SGX is disabled and a Software Control Interface is not available to enable it */ - SGX_DISABLED, /* SGX is not enabled on this platform. More details are unavailable. */ - SGX_DISABLED_SCI_AVAILABLE, /* SGX is disabled, but a Software Control Interface is available to enable it */ - SGX_DISABLED_MANUAL_ENABLE, /* SGX is disabled, but can be enabled manually in the BIOS setup */ - SGX_DISABLED_HYPERV_ENABLED, /* Detected an unsupported version of Windows* 10 with Hyper-V enabled */ - SGX_DISABLED_UNSUPPORTED_CPU, /* SGX is not supported by this CPU */ -} sgx_device_status_t; - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Function to check if the client platform is SGX enabled. - * - * @param sgx_capable[out] The SGX capable status of the client platform. - * 1 - Platform is SGX enabled or the Software Control Interface is available to configure SGX - * 0 - SGX not available - * @return If the function succeeds, return SGX_SUCCESS, any other value indicates an error. - */ -sgx_status_t sgx_is_capable(int* sgx_capable); - -/* - * Function used to enable SGX device through EFI. - * - * @param sgx_device_status[out] The status of SGX device. - * @return If the function succeeds, return SGX_SUCCESS, any other value indicates an error. - */ -sgx_status_t sgx_cap_enable_device(sgx_device_status_t* sgx_device_status); - -/* -* Function used to query SGX device status. -* -* @param sgx_device_status[out] The status of SGX device. -* @return If the function succeeds, return SGX_SUCCESS, any other value indicates an error. -*/ -sgx_status_t SGXAPI sgx_cap_get_status(sgx_device_status_t* sgx_device_status); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_cpuid.h b/sgx-jvm/linux-sgx/common/inc/sgx_cpuid.h deleted file mode 100644 index d0bb8f0388..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_cpuid.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -/** - * File: sgx_cpuid.h - * Description: - * Enquire CPU capabilities via OCALLs. - */ - -#ifndef _SGX_CPUID_H_ -#define _SGX_CPUID_H_ - -#include "sgx_defs.h" -#include "sgx_error.h" - -#ifdef __cplusplus -extern "C" { -#endif - -sgx_status_t SGXAPI sgx_cpuid(int cpuinfo[4], int leaf); -sgx_status_t SGXAPI sgx_cpuidex(int cpuinfo[4], int leaf, int subleaf); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_defs.h b/sgx-jvm/linux-sgx/common/inc/sgx_defs.h deleted file mode 100644 index 8cf1b8882b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_defs.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_DEFS_H_ -#define _SGX_DEFS_H_ - -/* The following macros are for GCC only */ - -# define SGXAPI - -# ifdef linux -# undef linux -# endif -# define SGX_CXX_NATIVE_HEADER(header) - -# define SGX_CDECL -# define SGX_STDCALL -# define SGX_FASTCALL - -# define SGX_DLLIMPORT -# define SGX_UBRIDGE(attr, fname, args...) attr fname args - -# define SGX_DEPRECATED __attribute__((deprecated)) - - -#define SGX_NOCONVENTION /* Empty. No calling convention specified. */ - -#endif /* !_SGX_DEFS_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_dh.h b/sgx-jvm/linux-sgx/common/inc/sgx_dh.h deleted file mode 100644 index f7f14de1f3..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_dh.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _SGX_DH_H_ -#define _SGX_DH_H_ - -#include "sgx.h" -#include "sgx_defs.h" -#include "sgx_ecp_types.h" - -#pragma pack(push, 1) - -#define SGX_DH_MAC_SIZE 16 - -#define SGX_DH_SESSION_DATA_SIZE 200 - -typedef struct _sgx_dh_msg1_t -{ - sgx_ec256_public_t g_a; /* the Endian-ness of Ga is Little-Endian */ - sgx_target_info_t target; -} sgx_dh_msg1_t; - -typedef struct _sgx_dh_msg2_t -{ - sgx_ec256_public_t g_b; /* the Endian-ness of Gb is Little-Endian */ - sgx_report_t report; - uint8_t cmac[SGX_DH_MAC_SIZE]; -} sgx_dh_msg2_t; - -typedef struct _sgx_dh_msg3_body_t -{ - sgx_report_t report; - uint32_t additional_prop_length; - uint8_t additional_prop[0]; -} sgx_dh_msg3_body_t; - - -typedef struct _sgx_dh_msg3_t -{ - uint8_t cmac[SGX_DH_MAC_SIZE]; - sgx_dh_msg3_body_t msg3_body; -} sgx_dh_msg3_t; - -typedef struct _sgx_dh_session_enclave_identity_t -{ - sgx_cpu_svn_t cpu_svn; - sgx_misc_select_t misc_select; - uint8_t reserved_1[28]; - sgx_attributes_t attributes; - sgx_measurement_t mr_enclave; - uint8_t reserved_2[32]; - sgx_measurement_t mr_signer; - uint8_t reserved_3[96]; - sgx_prod_id_t isv_prod_id; - sgx_isv_svn_t isv_svn; -} sgx_dh_session_enclave_identity_t; - -typedef enum _sgx_dh_session_role_t -{ - SGX_DH_SESSION_INITIATOR, - SGX_DH_SESSION_RESPONDER -} sgx_dh_session_role_t; - -typedef struct _sgx_dh_session_t -{ - uint8_t sgx_dh_session[SGX_DH_SESSION_DATA_SIZE]; -} sgx_dh_session_t; -#pragma pack(pop) -#ifdef __cplusplus -extern "C" { -#endif - -/* The order of calling SGX DH Library APIs is restricted as below */ -/* As session initiator : Step.1 sgx_dh_init_session --> Step.2 sgx_dh_initiator_proc_msg1 --> Step.3 sgx_dh_initiator_proc_msg3 */ -/* As session responder : Step.1 sgx_dh_init_session --> Step.2 sgx_dh_responder_gen_msg1 --> Step.3 sgx_dh_responder_proc_msg2*/ -/* Any out of order calling will cause session establishment failure. */ - -/*Function name: sgx_dh_init_session -** parameter description -**@ [input] role: caller's role in dh session establishment -**@ [output] session: point to dh session structure that is used during establishment, the buffer must be in enclave address space -*/ -sgx_status_t SGXAPI sgx_dh_init_session(sgx_dh_session_role_t role, - sgx_dh_session_t* session); -/*Function name: sgx_dh_responder_gen_msg1 -** parameter description -**@ [output] msg1: point to dh message 1 buffer, and the buffer must be in enclave address space -**@ [input/output] dh_session: point to dh session structure that is used during establishment, and the buffer must be in enclave address space -*/ -sgx_status_t SGXAPI sgx_dh_responder_gen_msg1(sgx_dh_msg1_t* msg1, - sgx_dh_session_t* dh_session); -/*Function name: sgx_dh_initiator_proc_msg1 -** parameter description -**@ [input] msg1: point to dh message 1 buffer generated by session responder, and the buffer must be in enclave address space -**@ [output] msg2: point to dh message 2 buffer, and the buffer must be in enclave address space -**@ [input/output] dh_session: point to dh session structure that is used during establishment, and the buffer must be in enclave address space -*/ -sgx_status_t SGXAPI sgx_dh_initiator_proc_msg1(const sgx_dh_msg1_t* msg1, - sgx_dh_msg2_t* msg2, - sgx_dh_session_t* dh_session); -/*Function name: sgx_dh_responder_proc_msg2 -** parameter description -**@ [input] msg2: point to dh message 2 buffer generated by session initiator, and the buffer must be in enclave address space -**@ [output] msg3: point to dh message 3 buffer generated by session responder in this function, and the buffer must be in enclave address space -**@ [input/output] dh_session: point to dh session structure that is used during establishment, and the buffer must be in enclave address space -**@ [output] aek: AEK derived from shared key. the buffer must be in enclave address space. -**@ [output] initiator_identity: identity information of initiator including isv svn, isv product id, sgx attributes, mr signer, and mr enclave. the buffer must be in enclave address space. -*/ -sgx_status_t SGXAPI sgx_dh_responder_proc_msg2(const sgx_dh_msg2_t* msg2, - sgx_dh_msg3_t* msg3, - sgx_dh_session_t* dh_session, - sgx_key_128bit_t* aek, - sgx_dh_session_enclave_identity_t* initiator_identity); -/*Function name: sgx_dh_initiator_proc_msg3 -** parameter description -**@ [input] msg3: point to dh message 3 buffer generated by session responder, and the buffer must be in enclave address space -**@ [input/output] dh_session: point to dh session structure that is used during establishment, and the buffer must be in enclave address space -**@ [output] aek: AEK derived from shared key. the buffer must be in enclave address space. -**@ [output] responder_identity: identity information of responder including isv svn, isv product id, sgx attributes, mr signer, and mr enclave. the buffer must be in enclave address space. -*/ -sgx_status_t SGXAPI sgx_dh_initiator_proc_msg3(const sgx_dh_msg3_t* msg3, - sgx_dh_session_t* dh_session, - sgx_key_128bit_t* aek, - sgx_dh_session_enclave_identity_t* responder_identity); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_ecp_types.h b/sgx-jvm/linux-sgx/common/inc/sgx_ecp_types.h deleted file mode 100644 index 833440a130..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_ecp_types.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _SGX_ECP_TYPES_H_ -#define _SGX_ECP_TYPES_H_ - -#include - -#pragma pack(push, 1) - -#include "sgx_tcrypto.h" - -#ifndef SGX_FEBITSIZE -#define SGX_FEBITSIZE 256 -#endif - -typedef struct _ecc_param_t -{ - uint32_t eccP[SGX_NISTP_ECP256_KEY_SIZE]; /* EC prime field */ - uint32_t eccA[SGX_NISTP_ECP256_KEY_SIZE]; /* EC curve coefficient A */ - uint32_t eccB[SGX_NISTP_ECP256_KEY_SIZE]; /* EC curve coefficient B */ - uint32_t eccG[2][SGX_NISTP_ECP256_KEY_SIZE]; /* ECC base point */ - uint32_t eccR[SGX_NISTP_ECP256_KEY_SIZE]; /* ECC base point order */ -} sgx_ecc_param_t; - -typedef uint8_t sgx_ec_key_128bit_t[SGX_CMAC_KEY_SIZE]; - -#pragma pack(pop) - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_edger8r.h b/sgx-jvm/linux-sgx/common/inc/sgx_edger8r.h deleted file mode 100644 index 5d159a7b02..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_edger8r.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -/* - * Here contains functions intended to be used by `sgx_edger8r' only. - * - * ------------------------------------- - * Be warned: use them at your own risk. - * ------------------------------------- - * - */ - -#ifndef _SGX_EDGER8R_H_ -#define _SGX_EDGER8R_H_ - -#include "sgx_defs.h" -#include "sgx_error.h" -#include "sgx_eid.h" -#include /* for size_t */ - -/* The `sgx_edger8r' tool will generate C interfaces. */ -#ifdef __cplusplus -# define SGX_EXTERNC extern "C" -#else -# define SGX_EXTERNC -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* sgx_ocalloc() - * Parameters: - * size - bytes to allocate on the outside stack - * Return Value: - * the pointer to the allocated space on the outside stack - * NULL - fail to allocate -*/ -void* SGXAPI sgx_ocalloc(size_t size); - -/* sgx_ocfree() - * Parameters: - * N/A - * Return Value: - * N/A -*/ -void SGXAPI sgx_ocfree(void); - -/* sgx_ecall() - * Parameters: - * eid - the enclave id - * index - the index of the trusted function - * ocall_table - the address of the OCALL table - * ms - the pointer to the marshaling struct - * Return Value: - * SGX_SUCCESS on success -*/ -sgx_status_t SGXAPI sgx_ecall(const sgx_enclave_id_t eid, - const int index, - const void* ocall_table, - void* ms); - -/* sgx_ocall() - * Parameters: - * index - the index of the untrusted function - * ms - the pointer to the marshaling struct - * Return Value: - * SGX_SUCCESS on success -*/ -sgx_status_t SGXAPI sgx_ocall(const unsigned int index, - void* ms); - -#ifdef __cplusplus -} -#endif - -#endif /* !_SGX_EDGER8R_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_eid.h b/sgx-jvm/linux-sgx/common/inc/sgx_eid.h deleted file mode 100644 index b47273c75e..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_eid.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_EID_H_ -#define _SGX_EID_H_ - -#include - -typedef uint64_t sgx_enclave_id_t; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_error.h b/sgx-jvm/linux-sgx/common/inc/sgx_error.h deleted file mode 100644 index a991776f81..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_error.h +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_ERROR_H_ -#define _SGX_ERROR_H_ - -#define SGX_MK_ERROR(x) (0x00000000|(x)) - -typedef enum _status_t -{ - SGX_SUCCESS = SGX_MK_ERROR(0x0000), - - SGX_ERROR_UNEXPECTED = SGX_MK_ERROR(0x0001), /* Unexpected error */ - SGX_ERROR_INVALID_PARAMETER = SGX_MK_ERROR(0x0002), /* The parameter is incorrect */ - SGX_ERROR_OUT_OF_MEMORY = SGX_MK_ERROR(0x0003), /* Not enough memory is available to complete this operation */ - SGX_ERROR_ENCLAVE_LOST = SGX_MK_ERROR(0x0004), /* Enclave lost after power transition or used in child process created by linux:fork() */ - SGX_ERROR_INVALID_STATE = SGX_MK_ERROR(0x0005), /* SGX API is invoked in incorrect order or state */ - - SGX_ERROR_INVALID_FUNCTION = SGX_MK_ERROR(0x1001), /* The ecall/ocall index is invalid */ - SGX_ERROR_OUT_OF_TCS = SGX_MK_ERROR(0x1003), /* The enclave is out of TCS */ - SGX_ERROR_ENCLAVE_CRASHED = SGX_MK_ERROR(0x1006), /* The enclave is crashed */ - SGX_ERROR_ECALL_NOT_ALLOWED = SGX_MK_ERROR(0x1007), /* The ECALL is not allowed at this time, e.g. ecall is blocked by the dynamic entry table, or nested ecall is not allowed during initialization */ - SGX_ERROR_OCALL_NOT_ALLOWED = SGX_MK_ERROR(0x1008), /* The OCALL is not allowed at this time, e.g. ocall is not allowed during exception handling */ - SGX_ERROR_STACK_OVERRUN = SGX_MK_ERROR(0x1009), /* The enclave is running out of stack */ - - SGX_ERROR_UNDEFINED_SYMBOL = SGX_MK_ERROR(0x2000), /* The enclave image has undefined symbol. */ - SGX_ERROR_INVALID_ENCLAVE = SGX_MK_ERROR(0x2001), /* The enclave image is not correct. */ - SGX_ERROR_INVALID_ENCLAVE_ID = SGX_MK_ERROR(0x2002), /* The enclave id is invalid */ - SGX_ERROR_INVALID_SIGNATURE = SGX_MK_ERROR(0x2003), /* The signature is invalid */ - SGX_ERROR_NDEBUG_ENCLAVE = SGX_MK_ERROR(0x2004), /* The enclave is signed as product enclave, and can not be created as debuggable enclave. */ - SGX_ERROR_OUT_OF_EPC = SGX_MK_ERROR(0x2005), /* Not enough EPC is available to load the enclave */ - SGX_ERROR_NO_DEVICE = SGX_MK_ERROR(0x2006), /* Can't open SGX device */ - SGX_ERROR_MEMORY_MAP_CONFLICT= SGX_MK_ERROR(0x2007), /* Page mapping failed in driver */ - SGX_ERROR_INVALID_METADATA = SGX_MK_ERROR(0x2009), /* The metadata is incorrect. */ - SGX_ERROR_DEVICE_BUSY = SGX_MK_ERROR(0x200c), /* Device is busy, mostly EINIT failed. */ - SGX_ERROR_INVALID_VERSION = SGX_MK_ERROR(0x200d), /* Metadata version is inconsistent between uRTS and sgx_sign or uRTS is incompatible with current platform. */ - SGX_ERROR_MODE_INCOMPATIBLE = SGX_MK_ERROR(0x200e), /* The target enclave 32/64 bit mode or sim/hw mode is incompatible with the mode of current uRTS. */ - SGX_ERROR_ENCLAVE_FILE_ACCESS = SGX_MK_ERROR(0x200f), /* Can't open enclave file. */ - SGX_ERROR_INVALID_MISC = SGX_MK_ERROR(0x2010), /* The MiscSelct/MiscMask settings are not correct.*/ - SGX_ERROR_INVALID_LAUNCH_TOKEN = SGX_MK_ERROR(0x2011), /* The launch token is not correct.*/ - - SGX_ERROR_MAC_MISMATCH = SGX_MK_ERROR(0x3001), /* Indicates verification error for reports, sealed datas, etc */ - SGX_ERROR_INVALID_ATTRIBUTE = SGX_MK_ERROR(0x3002), /* The enclave is not authorized */ - SGX_ERROR_INVALID_CPUSVN = SGX_MK_ERROR(0x3003), /* The cpu svn is beyond platform's cpu svn value */ - SGX_ERROR_INVALID_ISVSVN = SGX_MK_ERROR(0x3004), /* The isv svn is greater than the enclave's isv svn */ - SGX_ERROR_INVALID_KEYNAME = SGX_MK_ERROR(0x3005), /* The key name is an unsupported value */ - - SGX_ERROR_SERVICE_UNAVAILABLE = SGX_MK_ERROR(0x4001), /* Indicates aesm didn't respond or the requested service is not supported */ - SGX_ERROR_SERVICE_TIMEOUT = SGX_MK_ERROR(0x4002), /* The request to aesm timed out */ - SGX_ERROR_AE_INVALID_EPIDBLOB = SGX_MK_ERROR(0x4003), /* Indicates epid blob verification error */ - SGX_ERROR_SERVICE_INVALID_PRIVILEGE = SGX_MK_ERROR(0x4004), /* Enclave has no privilege to get launch token */ - SGX_ERROR_EPID_MEMBER_REVOKED = SGX_MK_ERROR(0x4005), /* The EPID group membership is revoked. */ - SGX_ERROR_UPDATE_NEEDED = SGX_MK_ERROR(0x4006), /* SGX needs to be updated */ - SGX_ERROR_NETWORK_FAILURE = SGX_MK_ERROR(0x4007), /* Network connecting or proxy setting issue is encountered */ - SGX_ERROR_AE_SESSION_INVALID = SGX_MK_ERROR(0x4008), /* Session is invalid or ended by server */ - SGX_ERROR_BUSY = SGX_MK_ERROR(0x400a), /* The requested service is temporarily not availabe */ - SGX_ERROR_MC_NOT_FOUND = SGX_MK_ERROR(0x400c), /* The Monotonic Counter doesn't exist or has been invalided */ - SGX_ERROR_MC_NO_ACCESS_RIGHT = SGX_MK_ERROR(0x400d), /* Caller doesn't have the access right to specified VMC */ - SGX_ERROR_MC_USED_UP = SGX_MK_ERROR(0x400e), /* Monotonic counters are used out */ - SGX_ERROR_MC_OVER_QUOTA = SGX_MK_ERROR(0x400f), /* Monotonic counters exceeds quota limitation */ - SGX_ERROR_KDF_MISMATCH = SGX_MK_ERROR(0x4011), /* Key derivation function doesn't match during key exchange */ - SGX_ERROR_UNRECOGNIZED_PLATFORM = SGX_MK_ERROR(0x4012), /* EPID Provisioning failed due to platform not recognized by backend server*/ - - SGX_ERROR_NO_PRIVILEGE = SGX_MK_ERROR(0x5002), /* Not enough privilege to perform the operation */ - - - /* SGX errors are only used in the file API when there is no appropriate EXXX (EINVAL, EIO etc.) error code */ - SGX_ERROR_FILE_BAD_STATUS = SGX_MK_ERROR(0x7001), /* The file is in bad status, run sgx_clearerr to try and fix it */ - SGX_ERROR_FILE_NO_KEY_ID = SGX_MK_ERROR(0x7002), /* The Key ID field is all zeros, can't re-generate the encryption key */ - SGX_ERROR_FILE_NAME_MISMATCH = SGX_MK_ERROR(0x7003), /* The current file name is different then the original file name (not allowed, substitution attack) */ - SGX_ERROR_FILE_NOT_SGX_FILE = SGX_MK_ERROR(0x7004), /* The file is not an SGX file */ - SGX_ERROR_FILE_CANT_OPEN_RECOVERY_FILE = SGX_MK_ERROR(0x7005), /* A recovery file can't be opened, so flush operation can't continue (only used when no EXXX is returned) */ - SGX_ERROR_FILE_CANT_WRITE_RECOVERY_FILE = SGX_MK_ERROR(0x7006), /* A recovery file can't be written, so flush operation can't continue (only used when no EXXX is returned) */ - SGX_ERROR_FILE_RECOVERY_NEEDED = SGX_MK_ERROR(0x7007), /* When openeing the file, recovery is needed, but the recovery process failed */ - SGX_ERROR_FILE_FLUSH_FAILED = SGX_MK_ERROR(0x7008), /* fflush operation (to disk) failed (only used when no EXXX is returned) */ - SGX_ERROR_FILE_CLOSE_FAILED = SGX_MK_ERROR(0x7009), /* fclose operation (to disk) failed (only used when no EXXX is returned) */ - -} sgx_status_t; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_intrin.h b/sgx-jvm/linux-sgx/common/inc/sgx_intrin.h deleted file mode 100644 index 253a68e8dd..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_intrin.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _SGX_INTRIN_H_ -#define _SGX_INTRIN_H_ - -#if defined(__STDC__) || defined(__cplusplus) -# define __STRING(x) #x -#else -# define __STRING(x) "x" -#endif - -#define _DEPR_MESSAGE(func) __STRING(func)" is deprecated in enclave." - -/* Deprecated GCC Built-ins */ - -# include - -/*#pragma GCC diagnostic error "-Wdeprecated-declarations" */ -#define _SGX_DEPRECATED(__ret_type, __func_name, ...) \ - __attribute__((deprecated(_DEPR_MESSAGE(__func_name)))) \ - __ret_type __func_name(__VA_ARGS__) - -_SGX_DEPRECATED(void, _writefsbase_u32, unsigned int); -_SGX_DEPRECATED(void, _writefsbase_u64, unsigned long long); -_SGX_DEPRECATED(void, _writegsbase_u32, unsigned int); -_SGX_DEPRECATED(void, _writegsbase_u64, unsigned long long); - -_SGX_DEPRECATED(unsigned long long, __rdpmc, int); -_SGX_DEPRECATED(unsigned long long, __rdtsc, void); -_SGX_DEPRECATED(unsigned long long, __rdtscp, unsigned int *); - - -#endif /* _SGX_INTRIN_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_key.h b/sgx-jvm/linux-sgx/common/inc/sgx_key.h deleted file mode 100644 index 113b720315..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_key.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - - -/* - * This file is to define Enclave's keys -*/ - -#ifndef _SGX_KEY_H_ -#define _SGX_KEY_H_ - -#include -#include "sgx_attributes.h" - -/* Key Name */ -#define SGX_KEYSELECT_EINITTOKEN 0x0000 -#define SGX_KEYSELECT_PROVISION 0x0001 -#define SGX_KEYSELECT_PROVISION_SEAL 0x0002 -#define SGX_KEYSELECT_REPORT 0x0003 -#define SGX_KEYSELECT_SEAL 0x0004 - -/* Key Policy */ -#define SGX_KEYPOLICY_MRENCLAVE 0x0001 /* Derive key using the enclave's ENCLAVE measurement register */ -#define SGX_KEYPOLICY_MRSIGNER 0x0002 /* Derive key using the enclave's SINGER measurement register */ - -#define SGX_KEYID_SIZE 32 -#define SGX_CPUSVN_SIZE 16 - -typedef uint8_t sgx_key_128bit_t[16]; -typedef uint16_t sgx_isv_svn_t; - -typedef struct _sgx_cpu_svn_t -{ - uint8_t svn[SGX_CPUSVN_SIZE]; -} sgx_cpu_svn_t; - -typedef struct _sgx_key_id_t -{ - uint8_t id[SGX_KEYID_SIZE]; -} sgx_key_id_t; - -#define SGX_KEY_REQUEST_RESERVED2_BYTES 436 - -typedef struct _key_request_t -{ - uint16_t key_name; /* Identifies the key required */ - uint16_t key_policy; /* Identifies which inputs should be used in the key derivation */ - sgx_isv_svn_t isv_svn; /* Security Version of the Enclave */ - uint16_t reserved1; /* Must be 0 */ - sgx_cpu_svn_t cpu_svn; /* Security Version of the CPU */ - sgx_attributes_t attribute_mask; /* Mask which ATTRIBUTES Seal keys should be bound to */ - sgx_key_id_t key_id; /* Value for key wear-out protection */ - sgx_misc_select_t misc_mask; /* Mask what MISCSELECT Seal keys bound to */ - uint8_t reserved2[SGX_KEY_REQUEST_RESERVED2_BYTES]; /* Struct size is 512 bytes */ -} sgx_key_request_t; - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_key_exchange.h b/sgx-jvm/linux-sgx/common/inc/sgx_key_exchange.h deleted file mode 100644 index be065b568b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_key_exchange.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_KEY_EXCHANGE_H_ -#define _SGX_KEY_EXCHANGE_H_ - -#include -#include "sgx_quote.h" -#include "sgx_ecp_types.h" -#include "sgx_tae_service.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef uint32_t sgx_ra_context_t; - -typedef sgx_key_128bit_t sgx_ra_key_128_t; - -typedef enum _ra_key_type_t -{ - SGX_RA_KEY_SK = 1, - SGX_RA_KEY_MK, - SGX_RA_KEY_VK, -} sgx_ra_key_type_t; - -typedef struct _ra_msg1_t -{ - sgx_ec256_public_t g_a; /* the Endian-ness of Ga is Little-Endian */ - sgx_epid_group_id_t gid; /* the Endian-ness of GID is Little-Endian */ -} sgx_ra_msg1_t; - - -typedef struct _ra_msg2_t -{ - sgx_ec256_public_t g_b; /* the Endian-ness of Gb is Little-Endian */ - sgx_spid_t spid; - uint16_t quote_type; /* unlinkable Quote(0) or linkable Quote(1) in little endian*/ - uint16_t kdf_id; /* key derivation function id in little endian. */ - sgx_ec256_signature_t sign_gb_ga; /* In little endian */ - sgx_mac_t mac; /* mac_smk(g_b||spid||quote_type||kdf_id||sign_gb_ga) */ - uint32_t sig_rl_size; - uint8_t sig_rl[]; -} sgx_ra_msg2_t; - -typedef struct _ra_msg3_t -{ - sgx_mac_t mac; /* mac_smk(g_a||ps_sec_prop||quote) */ - sgx_ec256_public_t g_a; /* the Endian-ness of Ga is Little-Endian */ - sgx_ps_sec_prop_desc_t ps_sec_prop; - uint8_t quote[]; -} sgx_ra_msg3_t; - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_quote.h b/sgx-jvm/linux-sgx/common/inc/sgx_quote.h deleted file mode 100644 index 8c85b54c90..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_quote.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - - /** - * File: sgx_quote.h - * Description: Definition for quote structure. - * - * Quote structure and all relative structure will be defined in this file. - */ - -#ifndef _SGX_QUOTE_H_ -#define _SGX_QUOTE_H_ - -#include "sgx_report.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#pragma pack(push, 1) -typedef uint8_t sgx_epid_group_id_t[4]; - -typedef struct _spid_t -{ - uint8_t id[16]; -} sgx_spid_t; - -typedef struct _basename_t -{ - uint8_t name[32]; -} sgx_basename_t; - - -typedef struct _quote_nonce -{ - uint8_t rand[16]; -} sgx_quote_nonce_t; - -typedef enum -{ - SGX_UNLINKABLE_SIGNATURE, - SGX_LINKABLE_SIGNATURE -} sgx_quote_sign_type_t; - -typedef struct _quote_t -{ - uint16_t version; /* 0 */ - uint16_t sign_type; /* 2 */ - sgx_epid_group_id_t epid_group_id; /* 4 */ - sgx_isv_svn_t qe_svn; /* 8 */ - sgx_isv_svn_t pce_svn; /* 10 */ - uint32_t xeid; /* 12 */ - sgx_basename_t basename; /* 16 */ - sgx_report_body_t report_body; /* 48 */ - uint32_t signature_len; /* 432 */ - uint8_t signature[]; /* 436 */ -} sgx_quote_t; - -#define SGX_PLATFORM_INFO_SIZE 101 -typedef struct _platform_info -{ - uint8_t platform_info[SGX_PLATFORM_INFO_SIZE]; -} sgx_platform_info_t; - -typedef struct _update_info_bit -{ - int ucodeUpdate; - int csmeFwUpdate; - int pswUpdate; -} sgx_update_info_bit_t; - -#pragma pack(pop) - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_report.h b/sgx-jvm/linux-sgx/common/inc/sgx_report.h deleted file mode 100644 index 51dfde29c2..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_report.h +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -/* - * This file is to define Enclave's Report -*/ - -#ifndef _SGX_REPORT_H_ -#define _SGX_REPORT_H_ - -#include "sgx_attributes.h" -#include "sgx_key.h" - -#define SGX_HASH_SIZE 32 /* SHA256 */ -#define SGX_MAC_SIZE 16 /* Message Authentication Code - 16 bytes */ - -#define SGX_REPORT_DATA_SIZE 64 - -typedef struct _sgx_measurement_t -{ - uint8_t m[SGX_HASH_SIZE]; -} sgx_measurement_t; - -typedef uint8_t sgx_mac_t[SGX_MAC_SIZE]; - -typedef struct _sgx_report_data_t -{ - uint8_t d[SGX_REPORT_DATA_SIZE]; -} sgx_report_data_t; - -typedef uint16_t sgx_prod_id_t; - -#define SGX_TARGET_INFO_RESERVED1_BYTES 4 -#define SGX_TARGET_INFO_RESERVED2_BYTES 456 - -typedef struct _target_info_t -{ - sgx_measurement_t mr_enclave; /* ( 0) The MRENCLAVE of the target enclave */ - sgx_attributes_t attributes; /* ( 32) The ATTRIBUTES field of the target enclave */ - uint8_t reserved1[SGX_TARGET_INFO_RESERVED1_BYTES]; /* ( 48) Reserved */ - sgx_misc_select_t misc_select; /* ( 52) The MISCSELECT of the target enclave */ - uint8_t reserved2[SGX_TARGET_INFO_RESERVED2_BYTES]; /* ( 56) Struct size is 512 bytes */ -} sgx_target_info_t; - -typedef struct _report_body_t -{ - sgx_cpu_svn_t cpu_svn; /* ( 0) Security Version of the CPU */ - sgx_misc_select_t misc_select; /* ( 16) Which fields defined in SSA.MISC */ - uint8_t reserved1[28]; /* ( 20) */ - sgx_attributes_t attributes; /* ( 48) Any special Capabilities the Enclave possess */ - sgx_measurement_t mr_enclave; /* ( 64) The value of the enclave's ENCLAVE measurement */ - uint8_t reserved2[32]; /* ( 96) */ - sgx_measurement_t mr_signer; /* (128) The value of the enclave's SIGNER measurement */ - uint8_t reserved3[96]; /* (160) */ - sgx_prod_id_t isv_prod_id; /* (256) Product ID of the Enclave */ - sgx_isv_svn_t isv_svn; /* (258) Security Version of the Enclave */ - uint8_t reserved4[60]; /* (260) */ - sgx_report_data_t report_data; /* (320) Data provided by the user */ -} sgx_report_body_t; - -typedef struct _report_t /* 432 bytes */ -{ - sgx_report_body_t body; - sgx_key_id_t key_id; /* (384) KeyID used for diversifying the key tree */ - sgx_mac_t mac; /* (416) The Message Authentication Code over this structure. */ -} sgx_report_t; - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_spinlock.h b/sgx-jvm/linux-sgx/common/inc/sgx_spinlock.h deleted file mode 100644 index 87562c951a..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_spinlock.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - - - -#ifndef _SGX_SPINLOCK_H_ -#define _SGX_SPINLOCK_H_ - -#include "sgx_defs.h" -#include - -typedef volatile uint32_t sgx_spinlock_t; - -#define SGX_SPINLOCK_INITIALIZER 0 - -#if defined(__cplusplus) -extern "C" { -#endif - -uint32_t SGXAPI sgx_spin_lock(sgx_spinlock_t *lock); -uint32_t SGXAPI sgx_spin_unlock(sgx_spinlock_t *lock); - -#if defined(__cplusplus) -} -#endif - -#endif /* !_SGX_SPINLOCK_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tae_service.edl b/sgx-jvm/linux-sgx/common/inc/sgx_tae_service.edl deleted file mode 100644 index 46fcf33b18..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tae_service.edl +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -enclave{ - from "sgx_tstdc.edl" import *; - untrusted { - sgx_status_t create_session_ocall([out] uint32_t* sid, - [size = dh_msg1_size, out] uint8_t* dh_msg1, - uint32_t dh_msg1_size, - uint32_t timeout); - - sgx_status_t exchange_report_ocall(uint32_t sid, - [size = dh_msg2_size, in] uint8_t* dh_msg2, uint32_t dh_msg2_size, - [size = dh_msg3_size, out] uint8_t* dh_msg3, uint32_t dh_msg3_size, - uint32_t timeout); - - sgx_status_t close_session_ocall(uint32_t sid, uint32_t timeout); - - sgx_status_t invoke_service_ocall([size = pse_message_req_size, in] uint8_t* pse_message_req, - uint32_t pse_message_req_size, - [size = pse_message_resp_size, out] uint8_t* pse_message_resp, uint32_t pse_message_resp_size, - uint32_t timeout); - }; -}; diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tae_service.h b/sgx-jvm/linux-sgx/common/inc/sgx_tae_service.h deleted file mode 100644 index 7887b9cda8..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tae_service.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_TAE_SERVICE_H_ -#define _SGX_TAE_SERVICE_H_ - -/** -* File: -* sgx_tae_service.h -*Description: -* header for trusted AE support library. -* ADD from path/sgx_tae_service.edl import *; to your edl file -* to use sgx_tae_service.lib -*/ - -#include "sgx.h" -#include "sgx_defs.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -#pragma pack(push, 1) - -typedef uint64_t sgx_time_t; - -typedef uint8_t sgx_time_source_nonce_t[32]; - -#define SGX_MC_UUID_COUNTER_ID_SIZE 3 -#define SGX_MC_UUID_NONCE_SIZE 13 -typedef struct _mc_uuid { - uint8_t counter_id[SGX_MC_UUID_COUNTER_ID_SIZE]; - uint8_t nonce[SGX_MC_UUID_NONCE_SIZE]; -} sgx_mc_uuid_t; - -/* fixed length to align with internal structure */ -typedef struct _ps_sec_prop_desc -{ - uint8_t sgx_ps_sec_prop_desc[256]; -} sgx_ps_sec_prop_desc_t; - -typedef struct _ps_sec_prop_desc_ex -{ - sgx_ps_sec_prop_desc_t ps_sec_prop_desc; - sgx_measurement_t pse_mrsigner; - sgx_prod_id_t pse_prod_id; - sgx_isv_svn_t pse_isv_svn; -} sgx_ps_sec_prop_desc_ex_t; - -#pragma pack(pop) - -/* create a session, call it before using Platform Service */ -sgx_status_t SGXAPI sgx_create_pse_session(void); - -/* close a created session, call it after finishing using Platform Service */ -sgx_status_t SGXAPI sgx_close_pse_session(void); - -/* get a data structure describing the Security Property of the Platform Service */ -sgx_status_t SGXAPI sgx_get_ps_sec_prop(sgx_ps_sec_prop_desc_t* security_property); - -/* get a data structure describing the Security Property of the Platform Service */ -sgx_status_t SGXAPI sgx_get_ps_sec_prop_ex(sgx_ps_sec_prop_desc_ex_t* security_property); - -/* provides the trusted platform current time */ -sgx_status_t SGXAPI sgx_get_trusted_time( - sgx_time_t* current_time, - sgx_time_source_nonce_t* time_source_nonce - ); - -/* monotonic counter policy */ -#define SGX_MC_POLICY_SIGNER 0x1 -#define SGX_MC_POLICY_ENCLAVE 0x2 -/* create a monotonic counter using given policy(SIGNER 0x1 or ENCLAVE 0x2) and attribute_mask */ -sgx_status_t SGXAPI sgx_create_monotonic_counter_ex( - uint16_t owner_policy, - const sgx_attributes_t* owner_attribute_mask, - sgx_mc_uuid_t* counter_uuid, - uint32_t* counter_value - ); - -/* create a monotonic counter using default policy SIGNER and default attribute_mask */ -sgx_status_t SGXAPI sgx_create_monotonic_counter( - sgx_mc_uuid_t* counter_uuid, - uint32_t* counter_value - ); - -/* destroy a specified monotonic counter */ -sgx_status_t SGXAPI sgx_destroy_monotonic_counter(const sgx_mc_uuid_t* counter_uuid); - -/* increment a specified monotonic counter by 1 */ -sgx_status_t SGXAPI sgx_increment_monotonic_counter( - const sgx_mc_uuid_t* counter_uuid, - uint32_t* counter_value - ); - -/* read a specified monotonic counter */ -sgx_status_t SGXAPI sgx_read_monotonic_counter( - const sgx_mc_uuid_t* counter_uuid, - uint32_t* counter_value - ); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tcrypto.h b/sgx-jvm/linux-sgx/common/inc/sgx_tcrypto.h deleted file mode 100644 index 72cba8a2aa..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tcrypto.h +++ /dev/null @@ -1,663 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -/** -* File: sgx_tcrypto.h -* Description: -* Interface for generic crypto library APIs required in SDK implementation. -*/ - -#ifndef _SGX_TCRYPTO_H_ -#define _SGX_TCRYPTO_H_ - -#include "sgx.h" -#include "sgx_defs.h" - -#define SGX_SHA256_HASH_SIZE 32 -#define SGX_ECP256_KEY_SIZE 32 -#define SGX_NISTP_ECP256_KEY_SIZE (SGX_ECP256_KEY_SIZE/sizeof(uint32_t)) -#define SGX_AESGCM_IV_SIZE 12 -#define SGX_AESGCM_KEY_SIZE 16 -#define SGX_AESGCM_MAC_SIZE 16 -#define SGX_CMAC_KEY_SIZE 16 -#define SGX_CMAC_MAC_SIZE 16 -#define SGX_AESCTR_KEY_SIZE 16 -#define SGX_RSA3072_KEY_SIZE 384 -#define SGX_RSA3072_PRI_EXP_SIZE 384 -#define SGX_RSA3072_PUB_EXP_SIZE 4 - -typedef struct _sgx_ec256_dh_shared_t -{ - uint8_t s[SGX_ECP256_KEY_SIZE]; -} sgx_ec256_dh_shared_t; - -typedef struct _sgx_ec256_private_t -{ - uint8_t r[SGX_ECP256_KEY_SIZE]; -} sgx_ec256_private_t; - -typedef struct _sgx_ec256_public_t -{ - uint8_t gx[SGX_ECP256_KEY_SIZE]; - uint8_t gy[SGX_ECP256_KEY_SIZE]; -} sgx_ec256_public_t; - -typedef struct _sgx_ec256_signature_t -{ - uint32_t x[SGX_NISTP_ECP256_KEY_SIZE]; - uint32_t y[SGX_NISTP_ECP256_KEY_SIZE]; -} sgx_ec256_signature_t; - -typedef struct _sgx_rsa3072_public_key_t -{ - uint8_t mod[SGX_RSA3072_KEY_SIZE]; - uint8_t exp[SGX_RSA3072_PUB_EXP_SIZE]; -} sgx_rsa3072_public_key_t; - -typedef struct _sgx_rsa3072_key_t -{ - uint8_t mod[SGX_RSA3072_KEY_SIZE]; - uint8_t d[SGX_RSA3072_PRI_EXP_SIZE]; - uint8_t e[SGX_RSA3072_PUB_EXP_SIZE]; -} sgx_rsa3072_key_t; - -typedef uint8_t sgx_rsa3072_signature_t[SGX_RSA3072_KEY_SIZE]; - -typedef void* sgx_sha_state_handle_t; -typedef void* sgx_cmac_state_handle_t; -typedef void* sgx_ecc_state_handle_t; - -typedef uint8_t sgx_sha256_hash_t[SGX_SHA256_HASH_SIZE]; - -typedef uint8_t sgx_aes_gcm_128bit_key_t[SGX_AESGCM_KEY_SIZE]; -typedef uint8_t sgx_aes_gcm_128bit_tag_t[SGX_AESGCM_MAC_SIZE]; -typedef uint8_t sgx_cmac_128bit_key_t[SGX_CMAC_KEY_SIZE]; -typedef uint8_t sgx_cmac_128bit_tag_t[SGX_CMAC_MAC_SIZE]; -typedef uint8_t sgx_aes_ctr_128bit_key_t[SGX_AESCTR_KEY_SIZE]; - -typedef enum { - SGX_EC_VALID, /* validation pass successfully */ - - SGX_EC_COMPOSITE_BASE, /* field based on composite */ - SGX_EC_COMPLICATED_BASE, /* number of non-zero terms in the polynomial (> PRIME_ARR_MAX) */ - SGX_EC_IS_ZERO_DISCRIMINANT,/* zero discriminant */ - SGX_EC_COMPOSITE_ORDER, /* composite order of base point */ - SGX_EC_INVALID_ORDER, /* invalid base point order */ - SGX_EC_IS_WEAK_MOV, /* weak Meneze-Okamoto-Vanstone reduction attack */ - SGX_EC_IS_WEAK_SSA, /* weak Semaev-Smart,Satoh-Araki reduction attack */ - SGX_EC_IS_SUPER_SINGULAR, /* supersingular curve */ - - SGX_EC_INVALID_PRIVATE_KEY, /* !(0 < Private < order) */ - SGX_EC_INVALID_PUBLIC_KEY, /* (order*PublicKey != Infinity) */ - SGX_EC_INVALID_KEY_PAIR, /* (Private*BasePoint != PublicKey) */ - - SGX_EC_POINT_OUT_OF_GROUP, /* out of group (order*P != Infinity) */ - SGX_EC_POINT_IS_AT_INFINITY,/* point (P=(Px,Py)) at Infinity */ - SGX_EC_POINT_IS_NOT_VALID, /* point (P=(Px,Py)) out-of EC */ - - SGX_EC_POINT_IS_EQUAL, /* compared points are equal */ - SGX_EC_POINT_IS_NOT_EQUAL, /* compared points are different */ - - SGX_EC_INVALID_SIGNATURE /* invalid signature */ -} sgx_generic_ecresult_t; - - -typedef enum { - SGX_RSA_VALID, /* validation pass successfully */ - - SGX_RSA_INVALID_SIGNATURE /* invalid signature */ -} sgx_rsa_result_t; - -#ifdef __cplusplus -extern "C" { -#endif - - /** SHA Hashing functions - NOTE: ONLY 256-bit is supported. - * - * NOTE: Use sgx_sha256_msg if the src pointer contains the complete msg to perform hash (Option 1) - * Else use the Init, Update, Update, ..., Final procedure (Option 2) - * Option 1: If the complete dataset is available for hashing, sgx_sha256_msg - * is a single API call for generating the 256bit hash for the given dataset. - * Return: If source pointer or hash pointer are NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If hash function fails then SGX_ERROR_UNEXPECTED is returned. - * Option 2: If the hash is to be performed over multiple data sets, then use: - * A. sgx_sha256_init - to create the context - context memory is allocated by this function. - * Return: If out of enclave memory, SGX_ERROR_OUT_OF_MEMORY is returned. - * If context creation fails then SGX_ERROR_UNEXPECTED is returned. - * B. sgx_sha256_update - updates hash based on input source data - * This function should be called for each chunk of data to be - * included in the hash including the 1st and final chunks. - * Return: If source pointer or context pointer are NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If hash function fails then SGX_ERROR_UNEXPECTED is returned. - * C. sgx_sha256_get_hash - function obtains the hash value - * Return: If hash pointer or context pointer are NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If the function fails then SGX_ERROR_UNEXPECTED is returned. - * D. sgx_sha256_close - SHOULD BE CALLED to FREE context memory - * Upon completing the process of computing a hash over a set of data - * or sets of data, this function is used to free the context. - * Return: If context pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: uint8_t *p_src - Pointer to the input stream to be hashed - * uint32_t src_len - Length of the input stream to be hashed - * Output: sgx_sha256_hash_t *p_hash - Resultant hash from operation - */ - sgx_status_t SGXAPI sgx_sha256_msg(const uint8_t *p_src, uint32_t src_len, sgx_sha256_hash_t *p_hash); - - /** Allocates and initializes sha256 state - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Output: sgx_sha_state_handle_t *p_sha_handle - Pointer to the handle of the SHA256 state - */ - sgx_status_t SGXAPI sgx_sha256_init(sgx_sha_state_handle_t* p_sha_handle); - - /** Updates sha256 has calculation based on the input message - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Input: sgx_sha_state_handle_t sha_handle - Handle to the SHA256 state - * uint8_t *p_src - Pointer to the input stream to be hashed - * uint32_t src_len - Length of the input stream to be hashed - */ - sgx_status_t SGXAPI sgx_sha256_update(const uint8_t *p_src, uint32_t src_len, sgx_sha_state_handle_t sha_handle); - - /** Returns Hash calculation - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Input: sgx_sha_state_handle_t sha_handle - Handle to the SHA256 state - * Output: sgx_sha256_hash_t *p_hash - Resultant hash from operation - */ - sgx_status_t SGXAPI sgx_sha256_get_hash(sgx_sha_state_handle_t sha_handle, sgx_sha256_hash_t *p_hash); - - /** Cleans up SHA state - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Input: sgx_sha_state_handle_t sha_handle - Handle to the SHA256 state - */ - sgx_status_t SGXAPI sgx_sha256_close(sgx_sha_state_handle_t sha_handle); - - /**Rijndael AES-GCM - Only 128-bit key AES-GCM Encryption/Decryption is supported - * - * The Galois/Counter Mode (GCM) is a mode of operation of the AES algorithm. - * GCM [NIST SP 800-38D] uses a variation of the Counter mode of operation for encryption. - * GCM assures authenticity of the confidential data (of up to about 64 GB per invocation) - * using a universal hash function defined over a binary finite field (the Galois field). - * - * GCM can also provide authentication assurance for additional data - * (of practically unlimited length per invocation) that is not encrypted. - * GCM provides stronger authentication assurance than a (non-cryptographic) checksum or - * error detecting code. In particular, GCM can detect both accidental modifications of - * the data and intentional, unauthorized modifications. - * - * sgx_rijndael128GCM_encrypt: - * Return: If key, source, destination, MAC, or IV pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If AAD size is > 0 and the AAD pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If the Source Length is < 1, SGX_ERROR_INVALID_PARAMETER is returned. - * IV Length must = 12 (bytes) or SGX_ERROR_INVALID_PARAMETER is returned. - * If out of enclave memory then SGX_ERROR_OUT_OF_MEMORY is returned. - * If the encryption process fails then SGX_ERROR_UNEXPECTED is returned. - * - * sgx_rijndael128GCM_decrypt: - * Return: If key, source, destination, MAC, or IV pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If AAD size is > 0 and the AAD pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If the Source Length is < 1, SGX_ERROR_INVALID_PARAMETER is returned. - * IV Length must = 12 (bytes) or SGX_ERROR_INVALID_PARAMETER is returned. - * If the decryption process fails then SGX_ERROR_UNEXPECTED is returned. - * If the input MAC does not match the calculated MAC, SGX_ERROR_MAC_MISMATCH is returned. - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: sgx_aes_gcm_128bit_key_t *p_key - Pointer to the key used in encryption/decryption operation - * Size MUST BE 128-bits - * uint8_t *p_src - Pointer to the input stream to be encrypted/decrypted - * uint32_t src_len - Length of the input stream to be encrypted/decrypted - * uint8_t *p_iv - Pointer to the initialization vector - * uint32_t iv_len - Length of the initialization vector - MUST BE 12 (bytes) - * NIST AES-GCM recommended IV size = 96 bits - * uint8_t *p_aad - Pointer to the input stream of additional authentication data - * uint32_t aad_len - Length of the additional authentication data stream - * sgx_aes_gcm_128bit_tag_t *p_in_mac - Pointer to the expected MAC in decryption process - * Output: uint8_t *p_dst - Pointer to the cipher text for encryption or clear text for decryption. Size of buffer should be >= src_len. - * sgx_aes_gcm_128bit_tag_t *p_out_mac - Pointer to the MAC generated from encryption process - * NOTE: Wrapper is responsible for confirming decryption tag matches encryption tag - */ - sgx_status_t SGXAPI sgx_rijndael128GCM_encrypt(const sgx_aes_gcm_128bit_key_t *p_key, - const uint8_t *p_src, - uint32_t src_len, - uint8_t *p_dst, - const uint8_t *p_iv, - uint32_t iv_len, - const uint8_t *p_aad, - uint32_t aad_len, - sgx_aes_gcm_128bit_tag_t *p_out_mac); - sgx_status_t SGXAPI sgx_rijndael128GCM_decrypt(const sgx_aes_gcm_128bit_key_t *p_key, - const uint8_t *p_src, - uint32_t src_len, - uint8_t *p_dst, - const uint8_t *p_iv, - uint32_t iv_len, - const uint8_t *p_aad, - uint32_t aad_len, - const sgx_aes_gcm_128bit_tag_t *p_in_mac); - - /** Message Authentication Rijndael 128 CMAC - Only 128-bit key size is supported. - * NOTE: Use sgx_rijndael128_cmac_msg if the src ptr contains the complete msg to perform hash (Option 1) - * Else use the Init, Update, Update, ..., Final, Close procedure (Option 2) - * Option 1: If the complete dataset is available for hashing, sgx_rijndael128_cmac_msg - * is a single API call for generating the 128-bit hash for the given dataset. - * Return: If source, key, or MAC pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If out of enclave memory, SGX_ERROR_OUT_OF_MEMORY is returned. - * If hash function fails then SGX_ERROR_UNEXPECTED is returned. - * Option 2: If the hash is to be performed over multiple data sets, then use: - * A. sgx_cmac128_init - to create the context - context memory is allocated by this function. - * Return: If key pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If out of enclave memory, SGX_ERROR_OUT_OF_MEMORY is returned. - * If context creation fails then SGX_ERROR_UNEXPECTED is returned. - * B. sgx_cmac128_update - updates hash based on input source data - * This function should be called for each chunk of data to be - * included in the hash including the 1st and final chunks. - * Return: If source pointer or context pointer are NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If hash function fails then SGX_ERROR_UNEXPECTED is returned. - * C. sgx_cmac128_final - function obtains the hash value - * Upon completing the process of computing a hash over a set of data or sets of data, - * this function populates the hash value. - * Return: If hash pointer or context pointer are NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * If the function fails then SGX_ERROR_UNEXPECTED is returned. - * D. sgx_cmac128_close - SHOULD BE CALLED to clean up the CMAC state - * Upon populating the hash value over a set of data or sets of data, - * this function is used to free the CMAC state. - * Return: If CMAC state pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: sgx_cmac_128bit_key_t *p_key - Pointer to the key used in encryption/decryption operation - * uint8_t *p_src - Pointer to the input stream to be MAC'd - * uint32_t src_len - Length of the input stream to be MAC'd - * Output: sgx_cmac_gcm_128bit_tag_t *p_mac - Pointer to the resultant MAC - */ - sgx_status_t SGXAPI sgx_rijndael128_cmac_msg(const sgx_cmac_128bit_key_t *p_key, - const uint8_t *p_src, - uint32_t src_len, - sgx_cmac_128bit_tag_t *p_mac); - /** Allocates and initializes CMAC state. - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: sgx_cmac_128bit_key_t *p_key - Pointer to the key used in encryption/decryption operation - * Output: sgx_cmac_state_handle_t *p_cmac_handle - Pointer to the handle of the CMAC state - */ - sgx_status_t SGXAPI sgx_cmac128_init(const sgx_cmac_128bit_key_t *p_key, sgx_cmac_state_handle_t* p_cmac_handle); - - /** Updates CMAC has calculation based on the input message. - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Input: sgx_cmac_state_handle_t cmac_handle - Handle to the CMAC state - * uint8_t *p_src - Pointer to the input stream to be hashed - * uint32_t src_len - Length of the input stream to be hashed - */ - sgx_status_t SGXAPI sgx_cmac128_update(const uint8_t *p_src, uint32_t src_len, sgx_cmac_state_handle_t cmac_handle); - - /** Returns Hash calculation and clean up CMAC state. - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Input: sgx_cmac_state_handle_t cmac_handle - Handle to the CMAC state - * Output: sgx_cmac_128bit_tag_t *p_hash - Resultant hash from operation - */ - sgx_status_t SGXAPI sgx_cmac128_final(sgx_cmac_state_handle_t cmac_handle, sgx_cmac_128bit_tag_t *p_hash); - - /** Clean up the CMAC state - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Input: sgx_cmac_state_handle_t cmac_handle - Handle to the CMAC state - */ - sgx_status_t SGXAPI sgx_cmac128_close(sgx_cmac_state_handle_t cmac_handle); - - /** AES-CTR 128-bit - Only 128-bit key size is supported. - * - * These functions encrypt/decrypt the input data stream of a variable length according - * to the CTR mode as specified in [NIST SP 800-38A]. The counter can be thought of as - * an IV which increments on successive encryption or decryption calls. For a given - * dataset or data stream the incremented counter block should be used on successive - * calls of the encryption/decryption process for that given stream. However for - * new or different datasets/streams, the same counter should not be reused, instead - * intialize the counter for the new data set. - * Note: SGXSSL based version doesn't support user given ctr_inc_bits. It use OpenSSL's implementation - * which divide the counter block into two parts ([IV][counter]) - * - * sgx_aes_ctr_encrypt - * Return: If source, key, counter, or destination pointer is NULL, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If out of enclave memory, SGX_ERROR_OUT_OF_MEMORY is returned. - * If the encryption process fails then SGX_ERROR_UNEXPECTED is returned. - * sgx_aes_ctr_decrypt - * Return: If source, key, counter, or destination pointer is NULL, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If out of enclave memory, SGX_ERROR_OUT_OF_MEMORY is returned. - * If the decryption process fails then SGX_ERROR_UNEXPECTED is returned. - * - * Parameters: - * Return: - * sgx_status_t - SGX_SUCCESS or failure as defined - * in sgx_error.h - * Inputs: - * sgx_aes_128bit_key_t *p_key - Pointer to the key used in - * encryption/decryption operation - * uint8_t *p_src - Pointer to the input stream to be - * encrypted/decrypted - * uint32_t src_len - Length of the input stream to be - * encrypted/decrypted - * uint8_t *p_ctr - Pointer to the counter block - * uint32_t ctr_inc_bits - Number of bits in counter to be - * incremented - * Output: - * uint8_t *p_dst - Pointer to the cipher text. - * Size of buffer should be >= src_len. - */ - sgx_status_t SGXAPI sgx_aes_ctr_encrypt( - const sgx_aes_ctr_128bit_key_t *p_key, - const uint8_t *p_src, - const uint32_t src_len, - uint8_t *p_ctr, - const uint32_t ctr_inc_bits, - uint8_t *p_dst); - - sgx_status_t SGXAPI sgx_aes_ctr_decrypt( - const sgx_aes_ctr_128bit_key_t *p_key, - const uint8_t *p_src, - const uint32_t src_len, - uint8_t *p_ctr, - const uint32_t ctr_inc_bits, - uint8_t *p_dst); - - - - /** - * Elliptic Curve Cryptography based on GF(p), 256 bit. - * - * Elliptic curve cryptosystems (ECCs) implement a different way of creating public keys. - * Because elliptic curve calculation is based on the addition of the rational points in - * the (x,y) plane and it is difficult to solve a discrete logarithm from these points, - * a higher level of security is achieved through the cryptographic schemes that use the - * elliptic curves. The cryptographic systems that encrypt messages by using the properties - * of elliptic curves are hard to attack due to the extreme complexity of deciphering the - * private key. - * - * Use of elliptic curves allows for shorter public key length and encourage cryptographers - * to create cryptosystems with the same or higher encryption strength as the RSA or DSA - * cryptosystems. Because of the relatively short key length, ECCs do encryption and decryption - * faster on the hardware that requires less computation processing volumes. For example, with - * a key length of 150-350 bits, ECCs provide the same encryption strength as the cryptosystems - * who have to use 600 -1400 bits. - * - * ECCP stands for Elliptic Curve Cryptography Prime and these functions include operations - * over a prime finite field GF(p). - * - */ - /** Allocates and initializes ecc context. - * The function initializes the context of the elliptic curve cryptosystem over the - * prime finite field GF(p). This function allocates and initializes the ecc context. - * Return: If out of enclave memory, SGX_ERROR_OUT_OF_MEMORY is returned. - * If context creation fails then SGX_ERROR_UNEXPECTED is returned. - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Output: sgx_ecc_state_handle_t *p_ecc_handle - Pointer to the handle of the ECC crypto system - */ - sgx_status_t SGXAPI sgx_ecc256_open_context(sgx_ecc_state_handle_t* p_ecc_handle); - - /** Cleans up ecc context. - * Return: If context pointer is NULL, SGX_ERROR_INVALID_PARAMETER is returned. - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Output: sgx_ecc_state_handle_t ecc_handle - Handle to the ECC crypto system - */ - sgx_status_t SGXAPI sgx_ecc256_close_context(sgx_ecc_state_handle_t ecc_handle); - - /** Populates private/public key pair. - * NOTE: Caller code allocates memory for Private & Public key pointers to be populated - * - * The function generates a private key p_private and computes a public key p_public of the - * elliptic cryptosystem over a finite field GF(p). - * - * The private key p_private is a number that lies in the range of [1, n-1] where n is - * the order of the elliptic curve base point. - * - * The public key p_public is an elliptic curve point such that p_public = p_private *G, - * where G is the base point of the elliptic curve. - * - * The context of the point p_public as an elliptic curve point must be created by using - * the function sgx_ecc256_open_context. - * - * Return: If context, public key, or private key pointer is NULL, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If the key creation process fails then SGX_ERROR_UNEXPECTED is returned. - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: sgx_ecc_state_handle_t ecc_handle - Handle to the ECC crypto system - * Outputs: sgx_ec256_private_t *p_private - Pointer to the private key - LITTLE ENDIAN - * sgx_ec256_public_t *p_public - Pointer to the public key - LITTLE ENDIAN - */ - sgx_status_t SGXAPI sgx_ecc256_create_key_pair(sgx_ec256_private_t *p_private, - sgx_ec256_public_t *p_public, - sgx_ecc_state_handle_t ecc_handle); - - - /** Checks whether the input point is a valid point on the given elliptic curve. - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined sgx_error.h - * Inputs: sgx_ecc_state_handle_t ecc_handle - Handle to ECC crypto system - * sgx_ec256_public_t *p_point - Pointer to perform validity check on - LITTLE ENDIAN - * Output: int *p_valid - Return 0 if the point is an invalid point on ECC curve - */ - sgx_status_t SGXAPI sgx_ecc256_check_point(const sgx_ec256_public_t *p_point, - const sgx_ecc_state_handle_t ecc_handle, - int *p_valid); - - - /** Computes DH shared key based on own (local) private key and remote public Ga Key. - * NOTE: Caller code allocates memory for Shared key pointer to be populated - * - * The function computes a secret number bnShare, which is a secret key shared between - * two participants of the cryptosystem. - * - * In cryptography, metasyntactic names such as Alice as Bob are normally used as examples - * and in discussions and stand for participant A and participant B. - * - * Both participants (Alice and Bob) use the cryptosystem for receiving a common secret point - * on the elliptic curve called a secret key. To receive a secret key, participants apply the - * Diffie-Hellman key-agreement scheme involving public key exchange. The value of the secret - * key entirely depends on participants. - * - * According to the scheme, Alice and Bob perform the following operations: - * 1. Alice calculates her own public key pubKeyA by using her private key - * privKeyA: pubKeyA = privKeyA *G, where G is the base point of the elliptic curve. - * 2. Alice passes the public key to Bob. - * 3. Bob calculates his own public key pubKeyB by using his private key - * privKeyB: pubKeyB = privKeyB *G, where G is a base point of the elliptic curve. - * 4. Bob passes the public key to Alice. - * 5. Alice gets Bob's public key and calculates the secret point shareA. When calculating, - * she uses her own private key and Bob's public key and applies the following formula: - * shareA = privKeyA *pubKeyB = privKeyA *privKeyB *G. - * 6. Bob gets Alice's public key and calculates the secret point shareB. When calculating, - * he uses his own private key and Alice's public key and applies the following formula: - * shareB = privKeyB *pubKeyA = privKeyB *privKeyA *G. - * - * Because the following equation is true privKeyA *privKeyB *G = privKeyB *privKeyA *G, - * the result of both calculations is the same, that is, the equation shareA = shareB is true. - * The secret point serves as a secret key. - * - * Shared secret bnShare is an x-coordinate of the secret point on the elliptic curve. The elliptic - * curve domain parameters must be hitherto defined by the function: sgx_ecc256_open_context. - * - * Return: If context, public key, private key, or shared key pointer is NULL, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If the remote public key is not a valid point on the elliptic curve, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If the key creation process fails then SGX_ERROR_UNEXPECTED is returned. - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: sgx_ecc_state_handle_t ecc_handle - Handle to the ECC crypto system - * sgx_ec256_private_t *p_private_b - Pointer to the local private key - LITTLE ENDIAN - * sgx_ec256_public_t *p_public_ga - Pointer to the remote public key - LITTLE ENDIAN - * Output: sgx_ec256_dh_shared_t *p_shared_key - Pointer to the shared DH key - LITTLE ENDIAN - */ - sgx_status_t SGXAPI sgx_ecc256_compute_shared_dhkey(sgx_ec256_private_t *p_private_b, - sgx_ec256_public_t *p_public_ga, - sgx_ec256_dh_shared_t *p_shared_key, - sgx_ecc_state_handle_t ecc_handle); - - - /** Computes signature for data based on private key. - * - * A message digest is a fixed size number derived from the original message with - * an applied hash function over the binary code of the message. (SHA256 in this case) - * The signer's private key and the message digest are used to create a signature. - * - * A digital signature over a message consists of a pair of large numbers, 256-bits each, - * which the given function computes. - * - * The scheme used for computing a digital signature is of the ECDSA scheme, - * an elliptic curve of the DSA scheme. - * - * The keys can be generated and set up by the function: sgx_ecc256_create_key_pair. - * - * The elliptic curve domain parameters must be created by function: - * sgx_ecc256_open_context - * - * Return: If context, private key, signature or data pointer is NULL, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If the signature creation process fails then SGX_ERROR_UNEXPECTED is returned. - * - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: sgx_ecc_state_handle_t ecc_handle - Handle to the ECC crypto system - * sgx_ec256_private_t *p_private - Pointer to the private key - LITTLE ENDIAN - * uint8_t *p_data - Pointer to the data to be signed - * uint32_t data_size - Size of the data to be signed - * Output: ec256_signature_t *p_signature - Pointer to the signature - LITTLE ENDIAN - */ - sgx_status_t SGXAPI sgx_ecdsa_sign(const uint8_t *p_data, - uint32_t data_size, - sgx_ec256_private_t *p_private, - sgx_ec256_signature_t *p_signature, - sgx_ecc_state_handle_t ecc_handle); - - /** Verifies the signature for the given data based on the public key. - * - * A digital signature over a message consists of a pair of large numbers, 256-bits each, - * which could be created by function: sgx_ecdsa_sign. The scheme used for computing a - * digital signature is of the ECDSA scheme, an elliptic curve of the DSA scheme. - * - * The typical result of the digital signature verification is one of the two values: - * SGX_Generic_ECValid - Digital signature is valid - * SGX_Generic_ECInvalidSignature - Digital signature is not valid - * - * The elliptic curve domain parameters must be created by function: - * sgx_ecc256_open_context - * - * Return: If context, public key, signature, result or data pointer is NULL, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If the verification process fails then SGX_ERROR_UNEXPECTED is returned. - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: sgx_ecc_state_handle_t ecc_handle - Handle to the ECC crypto system - * sgx_ec256_public_t *p_public - Pointer to the public key - * uint8_t *p_data - Pointer to the data to be signed - * uint32_t data_size - Size of the data to be signed - * sgx_ec256_signature_t *p_signature - Pointer to the signature - * Output: uint8_t *p_result - Pointer to the result of verification check - */ - sgx_status_t SGXAPI sgx_ecdsa_verify(const uint8_t *p_data, - uint32_t data_size, - const sgx_ec256_public_t *p_public, - sgx_ec256_signature_t *p_signature, - uint8_t *p_result, - sgx_ecc_state_handle_t ecc_handle); - - /** Computes signature for a given data based on RSA 3072 private key - * - * A digital signature over a message consists of a 3072 bit number. - * - * Return: If private key, signature or data pointer is NULL, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If the signing process fails then SGX_ERROR_UNEXPECTED is returned. - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: uint8_t *p_data - Pointer to the data to be signed - * uint32_t data_size - Size of the data to be signed - * sgx_rsa3072_key_t *p_key - Pointer to the RSA key. - * Note: In IPP based version p_key->e is unused, hence it can be NULL. - * Output: sgx_rsa3072_signature_t *p_signature - Pointer to the signature output - */ - sgx_status_t sgx_rsa3072_sign(const uint8_t *p_data, - uint32_t data_size, - const sgx_rsa3072_key_t *p_key, - sgx_rsa3072_signature_t *p_signature); - - /** Verifies the signature for the given data based on the RSA 3072 public key. - * - * A digital signature over a message consists of a 3072 bit number. - * - * The typical result of the digital signature verification is one of the two values: - * SGX_Generic_ECValid - Digital signature is valid - * SGX_Generic_ECInvalidSignature - Digital signature is not valid - * - * Return: If public key, signature, result or data pointer is NULL, - * SGX_ERROR_INVALID_PARAMETER is returned. - * If the verification process fails then SGX_ERROR_UNEXPECTED is returned. - * Parameters: - * Return: sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h - * Inputs: uint8_t *p_data - Pointer to the data to be verified - * uint32_t data_size - Size of the data to be verified - * sgx_rsa3072_public_key_t *p_public - Pointer to the public key - * sgx_rsa3072_signature_t *p_signature - Pointer to the signature - * Output: sgx_rsa_result_t *p_result - Pointer to the result of verification check - */ - sgx_status_t sgx_rsa3072_verify(const uint8_t *p_data, - uint32_t data_size, - const sgx_rsa3072_public_key_t *p_public, - const sgx_rsa3072_signature_t *p_signature, - sgx_rsa_result_t *p_result); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_thread.h b/sgx-jvm/linux-sgx/common/inc/sgx_thread.h deleted file mode 100644 index f90c5a3a8c..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_thread.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_THREAD_H_ -#define _SGX_THREAD_H_ - -#include -#include -#include "sgx_defs.h" - -typedef uintptr_t sgx_thread_t; - -typedef struct _sgx_thread_queue_t -{ - sgx_thread_t m_first; /* first element */ - sgx_thread_t m_last; /* last element */ -} sgx_thread_queue_t; - -/* Mutex */ -typedef struct _sgx_thread_mutex_t -{ - size_t m_refcount; - uint32_t m_control; - volatile uint32_t m_lock; /* use sgx_spinlock_t */ - sgx_thread_t m_owner; - sgx_thread_queue_t m_queue; -} sgx_thread_mutex_t; - -#define SGX_THREAD_T_NULL ((sgx_thread_t)(NULL)) - -#define SGX_THREAD_MUTEX_NONRECURSIVE 0x01 -#define SGX_THREAD_MUTEX_RECURSIVE 0x02 -#define SGX_THREAD_NONRECURSIVE_MUTEX_INITIALIZER \ - {0, SGX_THREAD_MUTEX_NONRECURSIVE, 0, SGX_THREAD_T_NULL, {SGX_THREAD_T_NULL, SGX_THREAD_T_NULL}} -#define SGX_THREAD_RECURSIVE_MUTEX_INITIALIZER \ - {0, SGX_THREAD_MUTEX_RECURSIVE, 0, SGX_THREAD_T_NULL, {SGX_THREAD_T_NULL, SGX_THREAD_T_NULL}} -#define SGX_THREAD_MUTEX_INITIALIZER \ - SGX_THREAD_NONRECURSIVE_MUTEX_INITIALIZER - -typedef struct _sgx_thread_mutex_attr_t -{ - unsigned char m_dummy; /* for C syntax check */ -} sgx_thread_mutexattr_t; - -/* Condition Variable */ -typedef struct _sgx_thread_cond_t -{ - volatile uint32_t m_lock; /* use sgx_spinlock_t */ - sgx_thread_queue_t m_queue; -} sgx_thread_cond_t; - -#define SGX_THREAD_COND_INITIALIZER {0, {SGX_THREAD_T_NULL, SGX_THREAD_T_NULL}} - -typedef struct _sgx_thread_cond_attr_t -{ - unsigned char m_dummy; /* for C syntax check */ -} sgx_thread_condattr_t; - -#ifdef __cplusplus -extern "C" { -#endif - -/* Mutex */ -int SGXAPI sgx_thread_mutex_init(sgx_thread_mutex_t *mutex, const sgx_thread_mutexattr_t *unused); -int SGXAPI sgx_thread_mutex_destroy(sgx_thread_mutex_t *mutex); - -int SGXAPI sgx_thread_mutex_lock(sgx_thread_mutex_t *mutex); -int SGXAPI sgx_thread_mutex_trylock(sgx_thread_mutex_t *mutex); -int SGXAPI sgx_thread_mutex_unlock(sgx_thread_mutex_t *mutex); - -/* Condition Variable */ -int SGXAPI sgx_thread_cond_init(sgx_thread_cond_t *cond, const sgx_thread_condattr_t *unused); -int SGXAPI sgx_thread_cond_destroy(sgx_thread_cond_t *cond); - -int SGXAPI sgx_thread_cond_wait(sgx_thread_cond_t *cond, sgx_thread_mutex_t *mutex); -int SGXAPI sgx_thread_cond_signal(sgx_thread_cond_t *cond); -int SGXAPI sgx_thread_cond_broadcast(sgx_thread_cond_t *cond); - -sgx_thread_t SGXAPI sgx_thread_self(void); -int sgx_thread_equal(sgx_thread_t a, sgx_thread_t b); - -#ifdef __cplusplus -} -#endif - -#endif /* _SGX_THREAD_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tkey_exchange.edl b/sgx-jvm/linux-sgx/common/inc/sgx_tkey_exchange.edl deleted file mode 100644 index fa231e9406..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tkey_exchange.edl +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -enclave { - from "sgx_tae_service.edl" import *; - trusted { - public sgx_status_t sgx_ra_get_ga(sgx_ra_context_t context, - [out] sgx_ec256_public_t *g_a); - - public sgx_status_t sgx_ra_proc_msg2_trusted(sgx_ra_context_t context, - [in]const sgx_ra_msg2_t *p_msg2, /*copy msg2 except quote into enclave */ - [in] const sgx_target_info_t *p_qe_target, - [out] sgx_report_t *p_report, - [out] sgx_quote_nonce_t *p_nonce); - - public sgx_status_t sgx_ra_get_msg3_trusted(sgx_ra_context_t context, - uint32_t quote_size, - [in]sgx_report_t* qe_report, - [user_check]sgx_ra_msg3_t *p_msg3, - uint32_t msg3_size); - }; -}; diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tkey_exchange.h b/sgx-jvm/linux-sgx/common/inc/sgx_tkey_exchange.h deleted file mode 100644 index f69f7b1346..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tkey_exchange.h +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_TKEY_EXCHANGE_H_ -#define _SGX_TKEY_EXCHANGE_H_ - -#include "sgx.h" -#include "sgx_defs.h" -#include "sgx_key_exchange.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * The sgx_ra_init function creates a context for the remote attestation and - * key exchange process. - * - * @param p_pub_key The EC public key of the service provider based on the NIST - * P-256 elliptic curve. - * @param b_pse If true, platform service information is needed in message - * 3. The caller should make sure a PSE session has been - * established using sgx_create_pse_session before attempting - * to establish a remote attestation and key exchange session - * involving platform service information. - * @param p_context The output context for the subsequent remote attestation - * and key exchange process, to be used in sgx_ra_get_msg1 and - * sgx_ra_proc_msg2. - * @return sgx_status_t SGX_SUCCESS Indicates success. - * SGX_ERROR_INVALID_PARAMETER Indicates an error that - * the input parameters are - * invalid. - * SGX_ERROR_OUT_OF_MEMORY There is not enough - * memory available to - * complete this operation. - * SGX_ERROR_AE_SESSION_INVALID Session is invalid or - * ended by server. - * SGX_ERROR_UNEXPECTED Indicates an unexpected - * error occurs. - */ -sgx_status_t SGXAPI sgx_ra_init( - const sgx_ec256_public_t *p_pub_key, - int b_pse, - sgx_ra_context_t *p_context); - -/* - * The sgx_ra_derive_secret_keys_t function should takes the Diffie-Hellman - * shared secret as input to allow the ISV enclave to generate their own derived - * shared keys (SMK, SK, MK and VK). - * - * @param p_shared_key The the Diffie-Hellman shared secret. - * @param kdf_id, Key Derivation Function ID - * @param p_smk_key The output SMK. - * @param p_sk_key The output SK. - * @param p_mk_key The output MK. - * @param p_vk_key The output VK. - * @return sgx_status_t SGX_SUCCESS Indicates success. - * SGX_ERROR_INVALID_PARAMETER Indicates an error that - * the input parameters are - * invalid. - * SGX_ERROR_KDF_MISMATCH Indicates key derivation - * function doesn't match. - * SGX_ERROR_OUT_OF_MEMORY There is not enough - * memory available to - * complete this operation. - * SGX_ERROR_UNEXPECTED Indicates an unexpected - * error occurs. - */ - -typedef sgx_status_t(*sgx_ra_derive_secret_keys_t)( - const sgx_ec256_dh_shared_t* p_shared_key, - uint16_t kdf_id, - sgx_ec_key_128bit_t* p_smk_key, - sgx_ec_key_128bit_t* p_sk_key, - sgx_ec_key_128bit_t* p_mk_key, - sgx_ec_key_128bit_t* p_vk_key); - -/* - * The sgx_ra_init_ex function creates a context for the remote attestation and - * key exchange process asociated with a key derive function. - * - * @param p_pub_key The EC public key of the service provider based on the NIST - * P-256 elliptic curve. - * @param b_pse If true, platform service information is needed in message - * 3. The caller should make sure a PSE session has been - * established using sgx_create_pse_session before attempting - * to establish a remote attestation and key exchange session - * involving platform service information. - * @param derive_key_cb A pointer to a call back routine matching the - * function prototype of sgx_ra_derive_secret_keys_t. This - * function takes the Diffie-Hellman shared secret as input - * to allow the ISV enclave to generate their own derived - * shared keys (SMK, SK, MK and VK). - * @param p_context The output context for the subsequent remote attestation - * and key exchange process, to be used in sgx_ra_get_msg1 and - * sgx_ra_proc_msg2. - * @return sgx_status_t SGX_SUCCESS Indicates success. - * SGX_ERROR_INVALID_PARAMETER Indicates an error that - * the input parameters are - * invalid. - * SGX_ERROR_OUT_OF_MEMORY There is not enough - * memory available to - * complete this operation. - * SGX_ERROR_AE_SESSION_INVALID Session is invalid or - * ended by server. - * SGX_ERROR_UNEXPECTED Indicates an unexpected - * error occurs. - */ - -sgx_status_t SGXAPI sgx_ra_init_ex( - const sgx_ec256_public_t *p_pub_key, - int b_pse, - sgx_ra_derive_secret_keys_t derive_key_cb, - sgx_ra_context_t *p_context); -/* - * The sgx_ra_get_keys function is used to get the negotiated keys of a remote - * attestation and key exchange session. This function should only be called - * after the service provider accepts the remote attestation and key exchange - * protocol message 3 produced by sgx_ra_proc_msg2. - * - * @param context Context returned by sgx_ra_init. - * @param type The specifier of keys, can be SGX_RA_KEY_MK, SGX_RA_KEY_SK - * and SGX_RA_VK. - * @param p_key The key returned. - * @return sgx_status_t SGX_SUCCESS Indicates success. - * SGX_ERROR_INVALID_PARAMETER Indicates an error that - * the input parameters are - * invalid. - * SGX_ERROR_INVALID_STATE Indicates this function - * is called out of order. - */ -sgx_status_t SGXAPI sgx_ra_get_keys( - sgx_ra_context_t context, - sgx_ra_key_type_t type, - sgx_ra_key_128_t *p_key); - -/* - * Call the sgx_ra_close function to release the remote attestation and key - * exchange context after the process is done and the context isn't needed - * anymore. - * - * @param context Context returned by sgx_ra_init. - * @return sgx_status_t SGX_SUCCESS Indicates success. - * SGX_ERROR_INVALID_PARAMETER Indicates an error that - * the input parameters are - * invalid. - */ -sgx_status_t SGXAPI sgx_ra_close( - sgx_ra_context_t context); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tprotected_fs.edl b/sgx-jvm/linux-sgx/common/inc/sgx_tprotected_fs.edl deleted file mode 100644 index 6371de5d60..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tprotected_fs.edl +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -enclave { - -from "sgx_tae_service.edl" import *; - - untrusted { - void* u_sgxprotectedfs_exclusive_file_open([in, string] const char* filename, uint8_t read_only, [out] int64_t* file_size, [out] int32_t* error_code); - uint8_t u_sgxprotectedfs_check_if_file_exists([in, string] const char* filename); - int32_t u_sgxprotectedfs_fread_node([user_check] void* f, uint64_t node_number, [out, size=node_size] uint8_t* buffer, uint32_t node_size); - int32_t u_sgxprotectedfs_fwrite_node([user_check] void* f, uint64_t node_number, [in, size=node_size] uint8_t* buffer, uint32_t node_size); - int32_t u_sgxprotectedfs_fclose([user_check] void* f); - uint8_t u_sgxprotectedfs_fflush([user_check] void* f); - int32_t u_sgxprotectedfs_remove([in, string] const char* filename); - - void* u_sgxprotectedfs_recovery_file_open([in, string] const char* filename); - uint8_t u_sgxprotectedfs_fwrite_recovery_node([user_check] void* f, [in, count=data_length] uint8_t* data, uint32_t data_length); - int32_t u_sgxprotectedfs_do_file_recovery([in, string] const char* filename, [in, string] const char* recovery_filename, uint32_t node_size); - }; -}; diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tprotected_fs.h b/sgx-jvm/linux-sgx/common/inc/sgx_tprotected_fs.h deleted file mode 100644 index 104439c21b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tprotected_fs.h +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/** -* File: sgx_tprotected_fs.h -* Description: -* Interface for file API -*/ - -#pragma once - -#ifndef _SGX_TPROTECTED_FS_H_ -#define _SGX_TPROTECTED_FS_H_ - -#include - -#include "sgx_defs.h" -#include "sgx_key.h" - -#define SGX_FILE void - -#define EOF (-1) - -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 - -#define FILENAME_MAX 260 -#define FOPEN_MAX 20 - -#ifdef __cplusplus -extern "C" { -#endif - -/* sgx_fopen - * Purpose: open existing protected file (created with previous call to sgc_fopen) or create a new one (see c++ fopen documentation for more details). - * - * Parameters: - * filename - [IN] the name of the file to open/create. - * mode - [IN] open mode. only supports 'r' or 'w' or 'a' (one and only one of them must be present), and optionally 'b' and/or '+'. - * key - [IN] encryption key that will be used for the file encryption - * NOTE - the key is actually used as a KDK (key derivation key) and only for the meta-data node, and not used directly for the encryption of any part of the file - * this is important in order to prevent hitting the key wear-out problem, and some other issues with GCM encryptions using the same key - * - * Return value: - * SGX_FILE* - pointer to the newly created file handle, NULL if an error occurred - check errno for the error code. -*/ -SGX_FILE* SGXAPI sgx_fopen(const char* filename, const char* mode, const sgx_key_128bit_t *key); - - -/* sgx_fopen_auto_key -* Purpose: open existing protected file (created with previous call to sgc_fopen_auto_key) or create a new one (see c++ fopen documentation for more details). -* this API doesn't require a key from the user, and instead uses the enclave's SEAL key as a KDK for deriving the mete-data encryption keys -* using the SEAL key as a KDK, may result losing file access in cases of disaster-recovery or in cases of VM migration in servers -* users that any of these scenarious apply to them, are advised to use sgx_fopen, where they can provide their own key and manage the keys provisioning for those scenarious -* for further information, please read the SGX SDK manual -* -* Parameters: -* filename - [IN] the name of the file to open/create. -* mode - [IN] open mode. only supports 'r' or 'w' or 'a' (one and only one of them must be present), and optionally 'b' and/or '+'. -* -* Return value: -* SGX_FILE* - pointer to the newly created file handle, NULL if an error occurred - check errno for the error code. -*/ -SGX_FILE* SGXAPI sgx_fopen_auto_key(const char* filename, const char* mode); - - -/* sgx_fwrite - * Purpose: write data to a file (see c++ fwrite documentation for more details). - * - * Parameters: - * ptr - [IN] pointer to the input data buffer - * size - [IN] size of data block - * count - [IN] count of data blocks to write - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * - * Return value: - * size_t - number of 'size' blocks written to the file, 0 in case of an error - check sgx_ferror for error code -*/ -size_t SGXAPI sgx_fwrite(const void* ptr, size_t size, size_t count, SGX_FILE* stream); - - -/* sgx_fread - * Purpose: read data from a file (see c++ fread documentation for more details). - * - * Parameters: - * ptr - [OUT] pointer to the output data buffer - * size - [IN] size of data block - * count - [IN] count of data blocks to write - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * - * Return value: - * size_t - number of 'size' blocks read from the file, 0 in case of an error - check sgx_ferror for error code -*/ -size_t SGXAPI sgx_fread(void* ptr, size_t size, size_t count, SGX_FILE* stream); - - -/* sgx_ftell - * Purpose: get the current value of the position indicator of the file (see c++ ftell documentation for more details). - * - * Parameters: - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * - * Return value: - * int64_t - the current value of the position indicator, -1 on error - check errno for the error code -*/ -int64_t SGXAPI sgx_ftell(SGX_FILE* stream); - - -/* sgx_fseek - * Purpose: set the current value of the position indicator of the file (see c++ fseek documentation for more details). - * - * Parameters: - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * offset - [IN] the new required value, relative to the origin parameter - * origin - [IN] the origin from which to calculate the offset (SEEK_SET, SEEK_CUR or SEEK_END) - * - * Return value: - * int32_t - result, 0 on success, -1 in case of an error - check sgx_ferror for error code -*/ -int32_t SGXAPI sgx_fseek(SGX_FILE* stream, int64_t offset, int origin); - - -/* sgx_fflush - * Purpose: force actual write of all the cached data to the disk (see c++ fflush documentation for more details). - * - * Parameters: - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * - * Return value: - * int32_t - result, 0 on success, 1 in case of an error - check sgx_ferror for error code -*/ -int32_t SGXAPI sgx_fflush(SGX_FILE* stream); - - -/* sgx_ferror - * Purpose: get the latest operation error code (see c++ ferror documentation for more details). - * - * Parameters: - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * - * Return value: - * int32_t - the error code, 0 means no error, anything else is the latest operation error code -*/ -int32_t SGXAPI sgx_ferror(SGX_FILE* stream); - - -/* sgx_feof - * Purpose: did the file's position indicator hit the end of the file in a previous read operation (see c++ feof documentation for more details). - * - * Parameters: - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * - * Return value: - * int32_t - 1 - end of file was reached, 0 - end of file wasn't reached -*/ -int32_t SGXAPI sgx_feof(SGX_FILE* stream); - - -/* sgx_clearerr - * Purpose: try to clear an error in the file status, also clears the end-of-file flag (see c++ clearerr documentation for more details). - * call sgx_ferror or sgx_feof after a call to this function to learn if it was successful or not - * - * Parameters: - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * - * Return value: - * none -*/ -void SGXAPI sgx_clearerr(SGX_FILE* stream); - - -/* sgx_fclose - * Purpose: close an open file handle (see c++ fclose documentation for more details). - * after a call to this function, the handle is invalid even if an error is returned - * - * Parameters: - * stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key) - * - * Return value: - * int32_t - result, 0 - file was closed successfully, 1 - there were errors during the operation -*/ -int32_t SGXAPI sgx_fclose(SGX_FILE* stream); - - -/* sgx_remove - * Purpose: delete a file from the file system (see c++ remove documentation for more details). - * - * Parameters: - * filename - [IN] the name of the file to remvoe. - * - * Return value: - * int32_t - result, 0 - success, 1 - there was an error, check errno for the error code -*/ -int32_t SGXAPI sgx_remove(const char* filename); - - -/* sgx_fexport_auto_key -* Purpose: export the last key that was used in the encryption of the file. -* with this key we can import the file in a different enclave/system -* NOTE - 1. in order for this function to work, the file should not be opened in any other process -* 2. this function only works with files created with sgx_fopen_auto_key -* -* Parameters: -* filename - [IN] the name of the file to export the encryption key from. -* key - [OUT] the exported encryption key -* -* Return value: -* int32_t - result, 0 - success, 1 - there was an error, check errno for the error code -*/ -int32_t SGXAPI sgx_fexport_auto_key(const char* filename, sgx_key_128bit_t *key); - - -/* sgx_fimport_auto_key -* Purpose: import a file that was created in a different enclave/system and make it a local file -* after this call return successfully, the file can be opened with sgx_fopen_auto_key -* NOTE - this function only works with files created with sgx_fopen_auto_key -* -* Parameters: -* filename - [IN] the name of the file to be imported. -* key - [IN] the encryption key, exported with a call to sgx_fexport_auto_key in the source enclave/system -* -* Return value: -* int32_t - result, 0 - success, 1 - there was an error, check errno for the error code -*/ -int32_t SGXAPI sgx_fimport_auto_key(const char* filename, const sgx_key_128bit_t *key); - - -/* sgx_fclear_cache -* Purpose: scrubs and delete the internal cache used by the file, any changed data is flushed to disk before deletion -* Note - only the secrets that were in the cache are deleted, the file structure itself still holds keys and plain file data -* if a user wishes to remove all secrets from memory, he should close the file handle with sgx_fclose -* -* Parameters: -* stream - [IN] the file handle (opened with sgx_fopen or sgx_fopen_auto_key -* -* Return value: -* int32_t - result, 0 - success, 1 - there was an error, check errno for the error code -*/ -int32_t SGXAPI sgx_fclear_cache(SGX_FILE* stream); - - -#ifdef __cplusplus -} -#endif - -#endif // _SGX_TPROTECTED_FS_H_ diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_trts.h b/sgx-jvm/linux-sgx/common/inc/sgx_trts.h deleted file mode 100644 index de55921481..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_trts.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_TRTS_H_ -#define _SGX_TRTS_H_ - -#include "sgx_error.h" -#include "stddef.h" -#include "sgx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* sgx_is_within_enclave() - * Parameters: - * addr - the start address of the buffer - * size - the size of the buffer - * Return Value: - * 1 - the buffer is strictly within the enclave - * 0 - the whole buffer or part of the buffer is not within the enclave, - * or the buffer is wrap around -*/ -int SGXAPI sgx_is_within_enclave(const void *addr, size_t size); - -/* sgx_is_outside_enclave() - * Parameters: - * addr - the start address of the buffer - * size - the size of the buffer - * Return Value: - * 1 - the buffer is strictly outside the enclave - * 0 - the whole buffer or part of the buffer is not outside the enclave, - * or the buffer is wrap around -*/ -int SGXAPI sgx_is_outside_enclave(const void *addr, size_t size); - - -/* sgx_read_rand() - * Parameters: - * rand - the buffer to receive the random number - * length_in_bytes - the number of bytes to read the random number - * Return Value: - * SGX_SUCCESS - success - * SGX_ERROR_INVALID_PARAMETER - the parameter is invalid - * SGX_ERROR_UNEXPECTED - HW failure of RDRAND instruction -*/ -sgx_status_t SGXAPI sgx_read_rand(unsigned char *rand, size_t length_in_bytes); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_trts_exception.h b/sgx-jvm/linux-sgx/common/inc/sgx_trts_exception.h deleted file mode 100644 index b71f418a0d..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_trts_exception.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -/** - * File: sgx_trts_exception.h - * Description: - * Header file for custom exception handling support. - */ - -#ifndef _SGX_TRTS_EXCEPTION_H_ -#define _SGX_TRTS_EXCEPTION_H_ - -#include -#include -#include "sgx_defs.h" - -#define EXCEPTION_CONTINUE_SEARCH 0 -#define EXCEPTION_CONTINUE_EXECUTION -1 - -typedef enum _sgx_exception_vector_t -{ - SGX_EXCEPTION_VECTOR_DE = 0, /* DIV and DIV instructions */ - SGX_EXCEPTION_VECTOR_DB = 1, /* For Intel use only */ - SGX_EXCEPTION_VECTOR_BP = 3, /* INT 3 instruction */ - SGX_EXCEPTION_VECTOR_BR = 5, /* BOUND instruction */ - SGX_EXCEPTION_VECTOR_UD = 6, /* UD2 instruction or reserved opcode */ - SGX_EXCEPTION_VECTOR_MF = 16, /* x87 FPU floating-point or WAIT/FWAIT instruction */ - SGX_EXCEPTION_VECTOR_AC = 17, /* Any data reference in memory */ - SGX_EXCEPTION_VECTOR_XM = 19, /* SSE/SSE2/SSE3 floating-point instruction */ -} sgx_exception_vector_t; - -typedef enum _sgx_exception_type_t -{ - SGX_EXCEPTION_HARDWARE = 3, - SGX_EXCEPTION_SOFTWARE = 6, -} sgx_exception_type_t; - -#if defined (_M_X64) || defined (__x86_64__) -typedef struct _cpu_context_t -{ - uint64_t rax; - uint64_t rcx; - uint64_t rdx; - uint64_t rbx; - uint64_t rsp; - uint64_t rbp; - uint64_t rsi; - uint64_t rdi; - uint64_t r8; - uint64_t r9; - uint64_t r10; - uint64_t r11; - uint64_t r12; - uint64_t r13; - uint64_t r14; - uint64_t r15; - uint64_t rflags; - uint64_t rip; -} sgx_cpu_context_t; -#else -typedef struct _cpu_context_t -{ - uint32_t eax; - uint32_t ecx; - uint32_t edx; - uint32_t ebx; - uint32_t esp; - uint32_t ebp; - uint32_t esi; - uint32_t edi; - uint32_t eflags; - uint32_t eip; -} sgx_cpu_context_t; -#endif - -typedef struct _exception_info_t -{ - sgx_cpu_context_t cpu_context; - sgx_exception_vector_t exception_vector; - sgx_exception_type_t exception_type; -} sgx_exception_info_t; - -typedef int (*sgx_exception_handler_t)(sgx_exception_info_t *info); - -#ifdef __cplusplus -extern "C" { -#endif - -/* sgx_register_exception_handler() - * register a custom exception handler - * Parameter - * is_first_handler - the order in which the handler should be called. - * If the parameter is nonzero, the handler is the first handler to be called. - * If the parameter is zero, the handler is the last handler to be called. - * exception_handler - a pointer to the handler to be called. - * Return Value - * handler - success - * NULL - fail -*/ -void * SGXAPI sgx_register_exception_handler(int is_first_handler, sgx_exception_handler_t exception_handler); - -/* sgx_unregister_exception_handler() - * unregister a custom exception handler. - * Parameter - * handler - a handler to the custom excepetion handler previously - * registered using the sgx_register_exception_handler function. - * Return Value - * none zero - success - * 0 - fail -*/ -int SGXAPI sgx_unregister_exception_handler(void *handler); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tseal.h b/sgx-jvm/linux-sgx/common/inc/sgx_tseal.h deleted file mode 100644 index 57cabd430f..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tseal.h +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _SGX_TSEAL_H_ -#define _SGX_TSEAL_H_ - -#include -#include -#include "sgx_key.h" -#include "sgx_error.h" -#include "sgx_defs.h" -#include "sgx_attributes.h" -#include "sgx_tcrypto.h" - -#define SGX_SEAL_TAG_SIZE SGX_AESGCM_MAC_SIZE -#define SGX_SEAL_IV_SIZE 12 - -typedef struct _aes_gcm_data_t -{ - uint32_t payload_size; /* 0: Size of the payload which includes both the encrypted data and the optional additional MAC text */ - uint8_t reserved[12]; /* 4: Reserved bits */ - uint8_t payload_tag[SGX_SEAL_TAG_SIZE]; /* 16: AES-GMAC of the plain text, payload, and the sizes */ - uint8_t payload[]; /* 32: The payload data which includes the encrypted data followed by the optional additional MAC text */ -} sgx_aes_gcm_data_t; - -typedef struct _sealed_data_t -{ - sgx_key_request_t key_request; /* 00: The key request used to obtain the sealing key */ - uint32_t plain_text_offset; /* 64: Offset within aes_data.playload to the start of the optional additional MAC text */ - uint8_t reserved[12]; /* 68: Reserved bits */ - sgx_aes_gcm_data_t aes_data; /* 80: Data structure holding the AES/GCM related data */ -} sgx_sealed_data_t; - -#ifdef __cplusplus -extern "C" { -#endif - /* sgx_calc_sealed_data_size - * Purpose: This function is used to determine how much memory to allocate for sgx_sealed_data_t structure. - * - * Paramters: - * add_mac_txt_size - [IN] Length of the optional additional data stream in bytes - * txt_encrypt_size - [IN] Length of the data stream to be encrypted in bytes - * - * Return Value: - * uint32_t - The minimum number of bytes that need to be allocated for the sgx_sealed_data_t structure - * If the function fails, the return value is UINT32_MAX - */ - uint32_t sgx_calc_sealed_data_size(const uint32_t add_mac_txt_size, const uint32_t txt_encrypt_size); - - /* sgx_get_add_mac_txt_len - * Purpose: This function is used to determine how much memory to allocate for the additional_MAC_text buffer - * - * Parameter: - * p_sealed_data - [IN] Pointer to the sgx_sealed_data_t structure which was populated by the sgx_seal_data function - * - * Return Value: - * uint32_t - The number of bytes in the optional additional MAC buffer - * If the function fails, the return value is UINT32_MAX - */ - uint32_t sgx_get_add_mac_txt_len(const sgx_sealed_data_t* p_sealed_data); - - /* sgx_get_encrypt_txt_len - * Purpose: This function is used to determine how much memory to allocate for the decrypted data returned by the sgx_unseal_data function - * - * Parameter: - * p_sealed_data - [IN] Pointer to the sgx_sealed_data_t structure which was populated by the sgx_seal_data function - * - * Return Value: - * uint32_t - The number of bytes in the encrypted data buffer - * If the function fails, the return value is UINT32_MAX - */ - uint32_t sgx_get_encrypt_txt_len(const sgx_sealed_data_t* p_sealed_data); - - - /* sgx_seal_data - * Purpose: This algorithm is used to AES-GCM encrypt the input data. Specifically, - * two input data sets can be provided, one is the text to encrypt (p_text2encrypt) - * the second being optional additional text that should not be encrypted but will - * be part of the GCM MAC calculation. - * The sgx_sealed_data_t structure should be allocated prior to the API call and - * should include buffer storage for the MAC text and encrypted text. - * The sgx_sealed_data_t structure contains the data required to unseal the data on - * the same system it was sealed. - * - * Parameters: - * additional_MACtext_length - [IN] length of the plaintext data stream in bytes - * The additional data is optional and thus the length - * can be zero if no data is provided - * p_additional_MACtext - [IN] pointer to the plaintext data stream to be GCM protected - * The additional data is optional. You may pass a NULL pointer - * but additional_MACtext_length must be zero in that case - * text2encrypt_length - [IN] length of the data stream to encrypt in bytes - * p_text2encrypt - [IN] pointer to data stream to encrypt - * sealed_data_size - [IN] Size of the sealed data buffer passed in - * p_sealed_data - [OUT] pointer to the sealed data structure containing protected data - * - * Return Value: - * sgx_status_t - SGX Error code - */ - sgx_status_t SGXAPI sgx_seal_data(const uint32_t additional_MACtext_length, - const uint8_t *p_additional_MACtext, - const uint32_t text2encrypt_length, - const uint8_t *p_text2encrypt, - const uint32_t sealed_data_size, - sgx_sealed_data_t *p_sealed_data); - - /* sgx_seal_data_ex - * Purpose: Expert version of sgx_seal_data which is used if the key_policy/attribute_mask/misc_mask - * need to be modified from the default values. - * - * Parameters: - * key_policy - [IN] Specifies the measurement to use in key derivation - * attribute_mask - [IN] Identifies which platform/enclave attributes to use in key derivation - * misc_mask - [IN] The mask for MISC_SELECT - * additional_MACtext_length - [IN] length of the plaintext data stream in bytes - * The additional data is optional and thus the length - * can be zero if no data is provided - * p_additional_MACtext - [IN] pointer to the plaintext data stream to be GCM protected - * The additional data is optional. You may pass a NULL pointer - * but additional_MACtext_length must be zero in that case - * text2encrypt_length - [IN] length of the data stream to encrypt in bytes - * p_text2encrypt - [IN] pointer to data stream to encrypt - * sealed_data_size - [IN] Size of the sealed data buffer passed in - * p_sealed_data - [OUT] pointer to the sealed data structure containing protected data - * - * Return Value: - * sgx_status_t - SGX Error code - */ - sgx_status_t SGXAPI sgx_seal_data_ex(const uint16_t key_policy, - const sgx_attributes_t attribute_mask, - const sgx_misc_select_t misc_mask, - const uint32_t additional_MACtext_length, - const uint8_t *p_additional_MACtext, - const uint32_t text2encrypt_length, - const uint8_t *p_text2encrypt, - const uint32_t sealed_data_size, - sgx_sealed_data_t *p_sealed_data); - - /* sgx_unseal_data - * Purpose: Unseal the sealed data structure passed in and populate the MAC text and decrypted text - * buffers with the appropriate data from the sealed data structure. - * - * Parameters: - * p_sealed_data - [IN] pointer to the sealed data structure containing protected data - * p_additional_MACtext - [OUT] pointer to the plaintext data stream which was GCM protected - * The additiona data is optional. You may pass a NULL pointer but - * p_additional_MACtext_length must be zero in that case - * p_additional_MACtext_length - [IN/OUT] pointer to length of the plaintext data stream in bytes - * If there is not additional data, this parameter should be zero. - * p_decrypted_text - [OUT] pointer to decrypted data stream - * p_decrypted_text_length - [IN/OUT] pointer to length of the decrypted data stream to encrypt in bytes - * - * Return Value: - * sgx_status_t - SGX Error code - */ - sgx_status_t SGXAPI sgx_unseal_data(const sgx_sealed_data_t *p_sealed_data, - uint8_t *p_additional_MACtext, - uint32_t *p_additional_MACtext_length, - uint8_t *p_decrypted_text, - uint32_t *p_decrypted_text_length); - - /* sgx_mac_aadata - * Purpose: Use AES-GCM algorithm to generate a sealed data structure with integrity protection. - * Specifically, the input data set is ONLY the plaintext data stream, or - * additional authenticated data(AAD), no encrypt data. - * The sgx_sealed_data_t structure should be allocated prior to the API call and - * should include buffer storage for the plaintext data. - * The sgx_sealed_data_t structure contains the data required to unseal the data on - * the same system it was sealed. - * - * Parameters: - * additional_MACtext_length - [IN] length of the plaintext data stream in bytes - * p_additional_MACtext - [IN] pointer to the plaintext data stream to be GCM protected - * sealed_data_size - [IN] Size of the sealed data buffer passed in - * p_sealed_data - [OUT] pointer to the sealed data structure containing protected data - * - * Return Value: - * sgx_status_t - SGX Error code - */ - sgx_status_t sgx_mac_aadata(const uint32_t additional_MACtext_length, - const uint8_t *p_additional_MACtext, - const uint32_t sealed_data_size, - sgx_sealed_data_t *p_sealed_data); - - /* sgx_mac_aadata_ex - * Purpose: Expert version of sgx_mac_aadata which is used if the key_policy/attribute_mask/misc_mask - * need to be modified from the default values. - * - * Parameters: - * key_policy - [IN] Specifies the measurement to use in key derivation - * attribute_mask - [IN] Identifies which platform/enclave attributes to use in key derivation - * misc_mask - [IN] The mask for MISC_SELECT - * additional_MACtext_length - [IN] length of the plaintext data stream in bytes - * p_additional_MACtext - [IN] pointer to the plaintext data stream to be GCM protected - * sealed_data_size - [IN] Size of the sealed data buffer passed in - * p_sealed_data - [OUT] pointer to the sealed data structure containing protected data - * - * Return Value: - * sgx_status_t - SGX Error code - */ - sgx_status_t sgx_mac_aadata_ex(const uint16_t key_policy, - const sgx_attributes_t attribute_mask, - const sgx_misc_select_t misc_mask, - const uint32_t additional_MACtext_length, - const uint8_t *p_additional_MACtext, - const uint32_t sealed_data_size, - sgx_sealed_data_t *p_sealed_data); - - /* sgx_unmac_aadata - * Purpose: Unseal the sealed data structure passed in and populate the plaintext data stream - * with the appropriate data from the sealed data structure. - * - * Parameters: - * p_sealed_data - [IN] pointer to the sealed data structure containing protected data - * p_additional_MACtext - [OUT] pointer to the plaintext data stream which was GCM protected - * p_additional_MACtext_length - [IN/OUT] pointer to length of the plaintext data stream in bytes - * - * Return Value: - * sgx_status_t - SGX Error code - */ - sgx_status_t sgx_unmac_aadata(const sgx_sealed_data_t *p_sealed_data, - uint8_t *p_additional_MACtext, - uint32_t *p_additional_MACtext_length); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_tstdc.edl b/sgx-jvm/linux-sgx/common/inc/sgx_tstdc.edl deleted file mode 100644 index d561c6d384..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_tstdc.edl +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -enclave { - untrusted { - [cdecl] void sgx_oc_cpuidex([out] int cpuinfo[4], int leaf, int subleaf); - - /* Go outside and wait on my untrusted event */ - [cdecl] int sgx_thread_wait_untrusted_event_ocall([user_check] const void *self); - - /* Wake a thread waiting on its untrusted event */ - [cdecl] int sgx_thread_set_untrusted_event_ocall([user_check] const void *waiter); - - /* Wake a thread waiting on its untrusted event, and wait on my untrusted event */ - [cdecl] int sgx_thread_setwait_untrusted_events_ocall([user_check] const void *waiter, [user_check] const void *self); - - /* Wake multiple threads waiting on their untrusted events */ - [cdecl] int sgx_thread_set_multiple_untrusted_events_ocall([in, count = total] const void **waiters, size_t total); - }; -}; diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_uae_service.h b/sgx-jvm/linux-sgx/common/inc/sgx_uae_service.h deleted file mode 100644 index 59990edcd4..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_uae_service.h +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_UAE_SERVICE_H_ -#define _SGX_UAE_SERVICE_H_ - -#include - -#include "sgx_quote.h" -#include "sgx_error.h" -#include "sgx_urts.h" - -#define PS_CAP_TRUSTED_TIME 0x1 -#define PS_CAP_MONOTONIC_COUNTER 0x2 - -/** - * Platform service capabilities - * ps_cap0 - * Bit 0 : Trusted Time - * Bit 1 : Monotonic Counter - * Bit 2-31 : Reserved - * ps_cap1 - * Bit 0-31 : Reserved - */ -typedef struct _sgx_ps_cap_t -{ - uint32_t ps_cap0; - uint32_t ps_cap1; -} sgx_ps_cap_t; - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Function used to initialize the process of quoting. - * - * @param p_target_info[out] Target info of quoting enclave. - * @param p_gid[out] ID of platform's current EPID group. - * @return If outputs are generated, return SGX_SCCUESS, otherwise return general error code - * or SGX_ERROR_AE_INVALID_EPIDBLOB to indicate special error condition. - */ -sgx_status_t SGXAPI sgx_init_quote( - sgx_target_info_t *p_target_info, - sgx_epid_group_id_t *p_gid); - - -/* - * Function used to calculate quote size. - * - * @param p_sig_rl[in] OPTIONAL Signature Revocation List. - * @param sig_rl_size[in] Signature Revocation List size, in bytes. - * @param p_quote_size[out] Quote size, in bytes. - * @return If quote size is calculated,return SGX_SUCCESS, otherwise return - * SGX_ERROR_INVALID_PARAMETER to indicate special error condition. - */ -sgx_status_t SGXAPI sgx_calc_quote_size( - const uint8_t *p_sig_rl, - uint32_t sig_rl_size, - uint32_t* p_quote_size); - -/* - * [DEPRECATED] Use sgx_calc_quote_size function instead of this one - * Function used to get quote size. - * - * @param p_sig_rl[in] OPTIONAL Signature Revocation List. - * @param p_quote_size[out] Quote size, in bytes. - * @return If quote size is calculated,return SGX_SCCUESS, otherwise return - * SGX_ERROR_INVALID_PARAMETER to indicate special error condition. - */ -SGX_DEPRECATED -sgx_status_t SGXAPI sgx_get_quote_size( - const uint8_t *p_sig_rl, - uint32_t* p_quote_size); - -/* - * Function used to get quote. - * - * @param p_report[in] Report of enclave for which quote is being calculated. - * @param quote_type[in] Linkable or unlinkable quote. - * @param p_spid[in] Pointer of SPID. - * @param p_nonce[in] OPTIONAL nonce. - * @param p_sig_rl[in] OPTIONAL list of signature made fore EPID. - * @param sig_rl_size[in] The size of p_sig_rl, in bytes. - * @param p_qe_report[out] OPTIONAL The QE report. - * @param p_quote[out] The quote buffer, can not be NULL. - * @param quote_size[in] Quote buffer size, in bytes. - * @return If quote is generated,return SGX_SCCUESS, - * error code or SGX_ERROR_AE_INVALID_EPIDBLOB, - * SGX_ERROR_INVALID_PARAMETER to indicate special error condition. - * SGX_ERROR_EPID_MEMBER_REVOKED to indicate the EPID group membership has been revoked. - */ -sgx_status_t SGXAPI sgx_get_quote( - const sgx_report_t *p_report, - sgx_quote_sign_type_t quote_type, - const sgx_spid_t *p_spid, - const sgx_quote_nonce_t *p_nonce, - const uint8_t *p_sig_rl, - uint32_t sig_rl_size, - sgx_report_t *p_qe_report, - sgx_quote_t *p_quote, - uint32_t quote_size); - -/** - * Get the platform service capabilities - * - * @param sgx_ps_cap Platform capabilities reported by AESM. - * @return if OK, return SGX_SUCCESS - */ -sgx_status_t SGXAPI sgx_get_ps_cap(sgx_ps_cap_t* p_sgx_ps_cap); - -/** - * Get the white list's size - * - * @param p_whitelist_size Save the size of the white list. - * @return if OK, return SGX_SUCCESS - */ -sgx_status_t SGXAPI sgx_get_whitelist_size(uint32_t* p_whitelist_size); - -/** - * Get the white list value - * - * @param p_whitelist Save the white list value - * @param whitelist_size The size of the white list and the read data size is whitelist_size - * @return if OK, return SGX_SUCCESS - */ -sgx_status_t SGXAPI sgx_get_whitelist(uint8_t* p_whitelist, uint32_t whitelist_size); - -/** - * Get the extended epid group id - * - * @param p_extended_epid_group_id Save the extended epid group id. - * @return if OK, return SGX_SUCCESS - */ -sgx_status_t SGXAPI sgx_get_extended_epid_group_id(uint32_t* p_extended_epid_group_id); - -#define SGX_IS_TRUSTED_TIME_AVAILABLE(cap) ((((uint32_t)PS_CAP_TRUSTED_TIME)&((cap).ps_cap0))!=0) -#define SGX_IS_MONOTONIC_COUNTER_AVAILABLE(cap) ((((uint32_t)PS_CAP_MONOTONIC_COUNTER)&((cap).ps_cap0))!=0) - -/* - * Function used to report the status of the attestation. - * - * @param p_platform_info[in] platform information received from Intel Attestation Server. - * @param attestation_status[in] Value representing status during attestation. 0 if attestation succeeds. - * @param p_update_info[out] update information of the SGX platform. - * @return If OK, return SGX_SUCCESS. If update is needed, return SGX_ERROR_UPDATE_NEEDED and update_info contains update information. - */ - -sgx_status_t SGXAPI sgx_report_attestation_status( - const sgx_platform_info_t* p_platform_info, - int attestation_status, - sgx_update_info_bit_t* p_update_info); - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_ukey_exchange.h b/sgx-jvm/linux-sgx/common/inc/sgx_ukey_exchange.h deleted file mode 100644 index 03b993b794..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_ukey_exchange.h +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _SGX_UKEY_EXCHANGE_H_ -#define _SGX_UKEY_EXCHANGE_H_ - -#include "sgx_eid.h" -#include "sgx_defs.h" -#include "sgx_key_exchange.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -typedef sgx_status_t (* sgx_ecall_get_ga_trusted_t)( - sgx_enclave_id_t eid, - sgx_status_t* retval, - sgx_ra_context_t context, - sgx_ec256_public_t *g_a); - -typedef sgx_status_t (* sgx_ecall_proc_msg2_trusted_t)( - sgx_enclave_id_t eid, - sgx_status_t* retval, - sgx_ra_context_t context, - const sgx_ra_msg2_t *p_msg2, - const sgx_target_info_t *p_qe_target, - sgx_report_t *p_report, - sgx_quote_nonce_t* nonce); - -typedef sgx_status_t (* sgx_ecall_get_msg3_trusted_t)( - sgx_enclave_id_t eid, - sgx_status_t* retval, - sgx_ra_context_t context, - uint32_t quote_size, - sgx_report_t* qe_report, - sgx_ra_msg3_t *p_msg3, - uint32_t msg3_size); - -/* - * sgx_ra_get_msg1 is used to get the remote attestation and key exchange - * protocol message 1 to send to a service provider. The application enclave - * should use sgx_ra_init function to create the remote attestation and key - * exchange process context and return to the untrusted code, before the - * untrusted code can invoke this function. - * - * @param context Context returned by the sgx_ra_init function inside the - * application enclave. - * @param eid ID of the application enclave which is going to be - * attested. - * @param p_get_ga Function pointer of the ECALL proxy sgx_ra_get_ga - * generated by sgx_edger8r. The application enclave should - * link with sgx_tkey_exchange library and import - * sgx_tkey_exchange.edl in the enclave's EDL file to - * expose the ECALL proxy for sgx_ra_get_ga. - * @param p_msg1 Message 1 used by the remote attestation and key - * exchange protocol. - * @return sgx_status_t SGX_SUCCESS Indicates success. - * SGX_ERROR_INVALID_PARAMETER Invalid input parameters - * detected. - * SGX_ERROR_AE_INVALID_EPIDBLOB The EPID blob is - * corrupted. - * SGX_ERROR_INVALID_STATE SGX API is invoked in - * incorrect order or - * state. - * SGX_ERROR_EPID_MEMBER_REVOKED The EPID group - * membership revoked. - * SGX_ERROR_BUSY The requested service is - * temporarily not - * available. - * SGX_ERROR_UPDATE_NEEDED SGX needs to be updated. - * SGX_ERROR_SERVICE_UNAVAILABLE The AE service did not - * respond. - * SGX_ERROR_SERVICE_TIMEOUT A request to the AE - * service timed out. - * SGX_ERROR_NETWORK_FAILURE Network connecting or - * proxy setting issue was - * encountered. - * SGX_ERROR_OUT_OF_MEMORY There is not enough - * memory available to - * complete this operation. - * SGX_ERROR_UNEXPECTED Indicates an unexpected - * error occurs. - * And other possible return code from sgx_ecall. - */ -sgx_status_t SGXAPI sgx_ra_get_msg1( - sgx_ra_context_t context, - sgx_enclave_id_t eid, - sgx_ecall_get_ga_trusted_t p_get_ga, - sgx_ra_msg1_t *p_msg1); - -/* - * sgx_ra_proc_msg2 is used to process the remote attestation and key exchange - * protocol message 2 from the service provider and generate message 3 to send - * to the service provider. If the service provider accepts message 3, - * negotiated session keys between the application enclave and the service - * provider are ready for use. The application enclave can use sgx_ra_get_keys - * function to retrieve the negotiated keys and use sgx_ra_close function to - * release the context of the remote attestation and key exchange process. - * - * @param context Context returned by the sgx_ra_init function inside the - * application enclave. - * @param eid ID of the application enclave which is going to be - * attested. - * @param p_proc_msg2 Function pointer of the ECALL proxy sgx_ra_proc_msg2_trusted - * generated by sgx_edger8r. The application enclave should - * link with sgx_tkey_exchange library and import the - * sgx_tkey_exchange.edl in the application enclave's EDL - * file to expose the ECALL proxy for sgx_ra_proc_msg2. - * @param p_get_msg3 Function pointer of the ECALL proxy sgx_ra_get_msg3_trusted - * generated by sgx_edger8r. The application enclave should - * link with sgx_tkey_exchange library and import the - * sgx_tkey_exchange.edl in the application enclave's EDL - * file to expose the ECALL proxy for sgx_ra_get_msg3. - * @param p_msg2 sgx_ra_msg2_t message 2 from the service provider - * received by application. - * @param msg2_size The length of msg2 (in bytes). - * @param pp_msg3 sgx_ra_msg3_t message 3 to be sent to the service - * provider. The message buffer is allocated by the - * sgx_ukey_exchange library. The caller should free the - * buffer after use. - * @param p_msg3_size The length of msg3 (in bytes). - * @return sgx_status_t SGX_SUCCESS Indicates success. - * SGX_ERROR_INVALID_PARAMETER Invalid input parameters - * detected. - * SGX_ERROR_AE_INVALID_EPIDBLOB The EPID blob is - * corrupted. - * SGX_ERROR_INVALID_STATE SGX API is invoked in - * incorrect order or - * state. - * SGX_ERROR_EPID_MEMBER_REVOKED The EPID group - * membership revoked. - * SGX_ERROR_INVALID_SIGNATURE The signature is invalid. - * SGX_ERROR_MAC_MISMATCH Indicates verification - * error for reports, sealed - * data, etc. - * SGX_ERROR_KDF_MISMATCH Indicates key derivation - * function doesn't match. - * SGX_ERROR_BUSY The requested service is - * temporarily not - * available. - * SGX_ERROR_UPDATE_NEEDED SGX needs to be updated. - * SGX_ERROR_SERVICE_UNAVAILABLE The AE service did not - * respond. - * SGX_ERROR_SERVICE_TIMEOUT A request to the AE - * service timed out. - * SGX_ERROR_NETWORK_FAILURE Network connecting or - * proxy setting issue was - * encountered. - * SGX_ERROR_OUT_OF_MEMORY There is not enough - * memory available to - * complete this operation. - * SGX_ERROR_UNEXPECTED Indicates an unexpected - * error occurs. - * And other possible return code from sgx_ecall. - */ -sgx_status_t SGXAPI sgx_ra_proc_msg2( - sgx_ra_context_t context, - sgx_enclave_id_t eid, - sgx_ecall_proc_msg2_trusted_t p_proc_msg2, - sgx_ecall_get_msg3_trusted_t p_get_msg3, - const sgx_ra_msg2_t *p_msg2, - uint32_t msg2_size, - sgx_ra_msg3_t **pp_msg3, - uint32_t *p_msg3_size); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_urts.h b/sgx-jvm/linux-sgx/common/inc/sgx_urts.h deleted file mode 100644 index f90a2d084e..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_urts.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#ifndef _SGX_URTS_H_ -#define _SGX_URTS_H_ - -#include "sgx_attributes.h" -#include "sgx_error.h" -#include "sgx_eid.h" -#include "sgx_defs.h" -#include "sgx_key.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef uint8_t sgx_launch_token_t[1024]; - -/* Convenient macro to be passed to sgx_create_enclave(). */ -#if !defined(NDEBUG) || defined(EDEBUG) -#define SGX_DEBUG_FLAG ((int)1) -#else -#define SGX_DEBUG_FLAG ((int)0) -#endif - -sgx_status_t SGXAPI sgx_create_enclave(const char *file_name, const int debug, sgx_launch_token_t *launch_token, int *launch_token_updated, sgx_enclave_id_t *enclave_id, sgx_misc_attribute_t *misc_attr); - -sgx_status_t SGXAPI sgx_destroy_enclave(const sgx_enclave_id_t enclave_id); - -#ifdef __cplusplus -} -#endif - - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/sgx_utils.h b/sgx-jvm/linux-sgx/common/inc/sgx_utils.h deleted file mode 100644 index 37b600b319..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/sgx_utils.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -/** - * File: sgx_utils.h - * Description: - * Trusted library for SGX instructions - */ - -#ifndef _SGX_UTILS_H_ -#define _SGX_UTILS_H_ - -#include "sgx.h" -#include "sgx_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/*sgx_create_report - * Purpose: Create a cryptographic report of the enclave using the input information if any. - * - * Parameters: - * target_info - [IN] pointer to the information of the target enclave. - * report_data - [IN] pointer to a set of data used for communication between the enclaves. - * report - [OUT] pointer to the cryptographic report of the enclave - * - * Return value: - * sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h. -*/ -sgx_status_t SGXAPI sgx_create_report(const sgx_target_info_t *target_info, const sgx_report_data_t *report_data, sgx_report_t *report); - -/* sgx_verify_report - * Purpose: Software verification for the input report - * - * Paramters: - * report - [IN] ponter to the cryptographic report to be verified. - * - * Return value: - * sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h. -*/ -sgx_status_t SGXAPI sgx_verify_report(const sgx_report_t *report); - -/*sgx_get_key - * Purpose: Generate a 128-bit secret key with the input information. - * - * Parameters: - * key_request - [IN] pointer to the sgx_key_request_t object used for selecting the appropriate key. - * key - [OUT] Pointer to the buffer that receives the cryptographic key output. - * - * Return value: - * sgx_status_t - SGX_SUCCESS or failure as defined in sgx_error.h. -*/ -sgx_status_t SGXAPI sgx_get_key(const sgx_key_request_t *key_request, sgx_key_128bit_t *key); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/sgx-jvm/linux-sgx/common/inc/stdc++/exception b/sgx-jvm/linux-sgx/common/inc/stdc++/exception deleted file mode 100644 index 5a0118c48f..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/stdc++/exception +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _EXCEPTION_ -#define _EXCEPTION_ - -#include -#include SGX_CXX_NATIVE_HEADER(exception) - -#endif /* _EXCEPTION_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/stdc++/linux/exception b/sgx-jvm/linux-sgx/common/inc/stdc++/linux/exception deleted file mode 100644 index afcb0feac1..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/stdc++/linux/exception +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2010-2011 PathScale, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS - * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _LINUX_EXCEPTION_ -#define _LINUX_EXCEPTION_ - - -namespace std -{ - class exception - { - public: - exception() throw(); - exception(const exception&) throw(); - exception& operator=(const exception&) throw(); - virtual ~exception(); - virtual const char* what() const throw(); - }; - - /** - * Bad allocation exception. Thrown by ::operator new() if it fails. - */ - class bad_alloc: public exception - { - public: - bad_alloc() throw(); - bad_alloc(const bad_alloc&) throw(); - bad_alloc& operator=(const bad_alloc&) throw(); - ~bad_alloc(); - virtual const char* what() const throw(); - }; - - class bad_exception : public exception - { - public: - bad_exception() throw(); - virtual ~bad_exception() throw(); - virtual const char* what() const throw(); - }; - - bool uncaught_exception() throw(); - - typedef void (*unexpected_handler)(); - unexpected_handler set_unexpected(unexpected_handler) throw(); - void unexpected(); - - typedef void (*terminate_handler)(); - terminate_handler set_terminate(terminate_handler) throw(); - void terminate(); - -} // namespace std - - -#endif /* _LINUX_EXCEPTION_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/stdc++/linux/typeinfo b/sgx-jvm/linux-sgx/common/inc/stdc++/linux/typeinfo deleted file mode 100644 index 6c6d9dd536..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/stdc++/linux/typeinfo +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright 2010-2011 PathScale, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS - * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _LINUX_TYPEINFO_ -#define _LINUX_TYPEINFO_ - -#include -#include "exception" - -namespace __cxxabiv1 -{ - struct __class_type_info; -} -namespace std -{ - /** - * Standard type info class. The layout of this class is specified by the - * ABI. The layout of the vtable is not, but is intended to be - * compatible with the GNU ABI. - * - * Unlike the GNU version, the vtable layout is considered semi-private. - */ - class type_info - { - public: - /** - * Virtual destructor. This class must have one virtual function to - * ensure that it has a vtable. - */ - virtual ~type_info(); - bool operator==(const type_info &) const; - bool operator!=(const type_info &) const; - bool before(const type_info &) const; - const char* name() const; - type_info(); - private: - type_info(const type_info& rhs); - type_info& operator= (const type_info& rhs); - const char *__type_name; - /* - * The following functions are in this order to match the - * vtable layout of libsupc++. This allows libcxxrt to be used - * with libraries that depend on this. - * - * These functions are in the public headers for libstdc++, so - * we have to assume that someone will probably call them and - * expect them to work. Their names must also match the names used in - * libsupc++, so that code linking against this library can subclass - * type_info and correctly fill in the values in the vtables. - */ - public: - /** - * Returns true if this is some pointer type, false otherwise. - */ - virtual bool __is_pointer_p() const { return false; } - /** - * Returns true if this is some function type, false otherwise. - */ - virtual bool __is_function_p() const { return false; } - /** - * Catch function. Allows external libraries to implement - * their own basic types. This is used, for example, in the - * GNUstep Objective-C runtime to allow Objective-C types to be - * caught in G++ catch blocks. - * - * The outer parameter indicates the number of outer pointers - * in the high bits. The low bit indicates whether the - * pointers are const qualified. - */ - virtual bool __do_catch(const type_info *thrown_type, - void **thrown_object, - unsigned outer) const; - /** - * Performs an upcast. This is used in exception handling to - * cast from subclasses to superclasses. If the upcast is - * possible, it returns true and adjusts the pointer. If the - * upcast is not possible, it returns false and does not adjust - * the pointer. - */ - virtual bool __do_upcast( - const __cxxabiv1::__class_type_info *target, - void **thrown_object) const - { - (void)target, (void)thrown_object; - return false; - } - }; - - /** - * Bad cast exception. Thrown by the __cxa_bad_cast() helper function. - */ - class bad_cast: public exception { - public: - bad_cast() throw(); - bad_cast(const bad_cast&) throw(); - bad_cast& operator=(const bad_cast&) throw(); - virtual ~bad_cast(); - virtual const char* what() const throw(); - }; - - /** - * Bad typeidexception. Thrown by the __cxa_bad_typeid() helper function. - */ - class bad_typeid: public exception - { - public: - bad_typeid() throw(); - bad_typeid(const bad_typeid &__rhs) throw(); - virtual ~bad_typeid(); - bad_typeid& operator=(const bad_typeid &__rhs) throw(); - virtual const char* what() const throw(); - }; - - class bad_array_new_length: public bad_alloc - { - public: - bad_array_new_length() throw(); - bad_array_new_length(const bad_array_new_length&) throw(); - bad_array_new_length& operator=(const bad_array_new_length&) throw(); - virtual ~bad_array_new_length(); - virtual const char *what() const throw(); - }; -} - -#endif /* _LINUX_TYPEINFO_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/stdc++/new b/sgx-jvm/linux-sgx/common/inc/stdc++/new deleted file mode 100644 index dbed7840e1..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/stdc++/new +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _NEW_ -#define _NEW_ - -#include -#include -#include - - -namespace std -{ - typedef void (*new_handler)(); // The type of the function called when allocation fails. - - struct nothrow_t {}; // placement new tag type to suppress exceptions - const nothrow_t nothrow = {}; // constant for placement new tag - - /* - * The function to call when allocation fails. By default, there is no - * handler and a bad allocation exception is thrown if an allocation fails. - */ - new_handler set_new_handler(new_handler handler); -}; - -void* SGXAPI operator new (size_t); -void* SGXAPI operator new[] (size_t); - -void* SGXAPI operator new (size_t, const std::nothrow_t&); -void* SGXAPI operator new (size_t, void*); -void* SGXAPI operator new[] (size_t, const std::nothrow_t&); -void* SGXAPI operator new[] (size_t, void*); - -void SGXAPI operator delete (void*); -void SGXAPI operator delete (void*, const std::nothrow_t&); -void SGXAPI operator delete (void*, void*); -void SGXAPI operator delete[] (void*); -void SGXAPI operator delete[] (void*, const std::nothrow_t&); -void SGXAPI operator delete[] (void*, void*); - -#endif /* _NEW_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/stdc++/typeinfo b/sgx-jvm/linux-sgx/common/inc/stdc++/typeinfo deleted file mode 100644 index 0496dec68f..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/stdc++/typeinfo +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef _TYPEINFO_ -#define _TYPEINFO_ - -#include -#include SGX_CXX_NATIVE_HEADER(typeinfo) - -#endif /* _TYPEINFO_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/assert.h b/sgx-jvm/linux-sgx/common/inc/tlibc/assert.h deleted file mode 100644 index 82489e80c0..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/assert.h +++ /dev/null @@ -1,63 +0,0 @@ -/* $OpenBSD: assert.h,v 1.12 2006/01/31 10:53:51 hshoexer Exp $ */ -/* $NetBSD: assert.h,v 1.6 1994/10/26 00:55:44 cgd Exp $ */ - -/*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)assert.h 8.2 (Berkeley) 1/21/94 - */ - -/* - * Unlike other ANSI header files, may usefully be included - * multiple times, with and without NDEBUG defined. - */ - -#include - -#undef assert - -#ifdef NDEBUG -# define assert(e) ((void)0) -#else -# define assert(e) ((e) ? (void)0 : __assert(__FILE__, __LINE__, __func__, #e)) -#endif - -#ifndef _ASSERT_H_DECLS -#define _ASSERT_H_DECLS -__BEGIN_DECLS - -void _TLIBC_CDECL_ __assert(const char *, int, const char *, const char *); - -__END_DECLS -#endif /* Not _ASSERT_H_DECLS */ - diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/complex.h b/sgx-jvm/linux-sgx/common/inc/tlibc/complex.h deleted file mode 100644 index 7d92d63e87..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/complex.h +++ /dev/null @@ -1,134 +0,0 @@ -/* $OpenBSD: complex.h,v 1.3 2010/07/24 22:17:03 guenther Exp $ */ -/* - * Copyright (c) 2008 Martynas Venckus - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _COMPLEX_H_ -#define _COMPLEX_H_ - -#include - -/* - * C99 - */ -#ifdef __GNUC__ -#if __STDC_VERSION__ < 199901 -#define _Complex __complex__ -#endif -#define _Complex_I 1.0fi -#elif defined(lint) -#define _Complex_I 1.0fi -#endif - -#define complex _Complex - -/* XXX switch to _Imaginary_I */ -#undef I -#define I _Complex_I - -__BEGIN_DECLS -/* - * Double versions of C99 functions - */ -double complex cacos(double complex); -double complex casin(double complex); -double complex catan(double complex); -double complex ccos(double complex); -double complex csin(double complex); -double complex ctan(double complex); -double complex cacosh(double complex); -double complex casinh(double complex); -double complex catanh(double complex); -double complex ccosh(double complex); -double complex csinh(double complex); -double complex ctanh(double complex); -double complex cexp(double complex); -double complex clog(double complex); -double cabs(double complex); -double complex cpow(double complex, double complex); -double complex csqrt(double complex); -double carg(double complex); -double cimag(double complex); -double complex conj(double complex); -double complex cproj(double complex); -double creal(double complex); -/* - * C99 reserved - */ -double complex clog10(double complex); - -/* - * Float versions of C99 functions - */ -float complex cacosf(float complex); -float complex casinf(float complex); -float complex catanf(float complex); -float complex ccosf(float complex); -float complex csinf(float complex); -float complex ctanf(float complex); -float complex cacoshf(float complex); -float complex casinhf(float complex); -float complex catanhf(float complex); -float complex ccoshf(float complex); -float complex csinhf(float complex); -float complex ctanhf(float complex); -float complex cexpf(float complex); -float complex clogf(float complex); -float cabsf(float complex); -float complex cpowf(float complex, float complex); -float complex csqrtf(float complex); -float cargf(float complex); -float cimagf(float complex); -float complex conjf(float complex); -float complex cprojf(float complex); -float crealf(float complex); -/* - * C99 reserved - */ -float complex clog10f(float complex); - -/* - * Long double versions of C99 functions - */ -long double complex cacosl(long double complex); -long double complex casinl(long double complex); -long double complex catanl(long double complex); -long double complex ccosl(long double complex); -long double complex csinl(long double complex); -long double complex ctanl(long double complex); -long double complex cacoshl(long double complex); -long double complex casinhl(long double complex); -long double complex catanhl(long double complex); -long double complex ccoshl(long double complex); -long double complex csinhl(long double complex); -long double complex ctanhl(long double complex); -long double complex cexpl(long double complex); -long double complex clogl(long double complex); -long double cabsl(long double complex); -long double complex cpowl(long double complex, long double complex); -long double complex csqrtl(long double complex); -long double cargl(long double complex); -long double cimagl(long double complex); -long double complex conjl(long double complex); -long double complex cprojl(long double complex); -long double creall(long double complex); -/* - * C99 reserved - */ -long double complex clog10l(long double complex); - -__END_DECLS - -#endif /* !_COMPLEX_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/ctype.h b/sgx-jvm/linux-sgx/common/inc/tlibc/ctype.h deleted file mode 100644 index 1408447059..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/ctype.h +++ /dev/null @@ -1,64 +0,0 @@ -/* $OpenBSD: ctype.h,v 1.22 2010/10/01 20:10:24 guenther Exp $ */ -/* $NetBSD: ctype.h,v 1.14 1994/10/26 00:55:47 cgd Exp $ */ - -/* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ctype.h 5.3 (Berkeley) 4/3/91 - */ - -#ifndef _CTYPE_H_ -#define _CTYPE_H_ - -#include - -__BEGIN_DECLS - -int _TLIBC_CDECL_ isalnum(int); -int _TLIBC_CDECL_ isalpha(int); -int _TLIBC_CDECL_ iscntrl(int); -int _TLIBC_CDECL_ isdigit(int); -int _TLIBC_CDECL_ isgraph(int); -int _TLIBC_CDECL_ islower(int); -int _TLIBC_CDECL_ isprint(int); -int _TLIBC_CDECL_ ispunct(int); -int _TLIBC_CDECL_ isspace(int); -int _TLIBC_CDECL_ isupper(int); -int _TLIBC_CDECL_ isxdigit(int); -int _TLIBC_CDECL_ tolower(int); -int _TLIBC_CDECL_ toupper(int); -int _TLIBC_CDECL_ isblank(int); - -__END_DECLS - -#endif /* _CTYPE_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/endian.h b/sgx-jvm/linux-sgx/common/inc/tlibc/endian.h deleted file mode 100644 index fcd74c9a14..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/endian.h +++ /dev/null @@ -1,33 +0,0 @@ -/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */ - -/*- - * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _ENDIAN_H_ -#define _ENDIAN_H_ - -#include - -#endif /* _ENDIAN_H_ */ - diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/errno.h b/sgx-jvm/linux-sgx/common/inc/tlibc/errno.h deleted file mode 100644 index 0924d5ac4b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/errno.h +++ /dev/null @@ -1,187 +0,0 @@ -/* $OpenBSD: errno.h,v 1.1 2005/12/28 16:33:56 millert Exp $ */ - -/* - * Copyright (c) 1982, 1986, 1989, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)errno.h 8.5 (Berkeley) 1/21/94 - */ - -#ifndef _ERRNO_H_ -#define _ERRNO_H_ - -#include - -#define EPERM 1 -#define ENOENT 2 -#define ESRCH 3 -#define EINTR 4 -#define EIO 5 -#define ENXIO 6 -#define E2BIG 7 -#define ENOEXEC 8 -#define EBADF 9 -#define ECHILD 10 -#define EAGAIN 11 -#define ENOMEM 12 -#define EACCES 13 -#define EFAULT 14 -#define ENOTBLK 15 -#define EBUSY 16 -#define EEXIST 17 -#define EXDEV 18 -#define ENODEV 19 -#define ENOTDIR 20 -#define EISDIR 21 -#define EINVAL 22 -#define ENFILE 23 -#define EMFILE 24 -#define ENOTTY 25 -#define ETXTBSY 26 -#define EFBIG 27 -#define ENOSPC 28 -#define ESPIPE 29 -#define EROFS 30 -#define EMLINK 31 -#define EPIPE 32 -#define EDOM 33 -#define ERANGE 34 -#define EDEADLK 35 -#define ENAMETOOLONG 36 -#define ENOLCK 37 -#define ENOSYS 38 -#define ENOTEMPTY 39 -#define ELOOP 40 -#define EWOULDBLOCK EAGAIN -#define ENOMSG 42 -#define EIDRM 43 -#define ECHRNG 44 -#define EL2NSYNC 45 -#define EL3HLT 46 -#define EL3RST 47 -#define ELNRNG 48 -#define EUNATCH 49 -#define ENOCSI 50 -#define EL2HLT 51 -#define EBADE 52 -#define EBADR 53 -#define EXFULL 54 -#define ENOANO 55 -#define EBADRQC 56 -#define EBADSLT 57 -#define EDEADLOCK EDEADLK -#define EBFONT 59 -#define ENOSTR 60 -#define ENODATA 61 -#define ETIME 62 -#define ENOSR 63 -#define ENONET 64 -#define ENOPKG 65 -#define EREMOTE 66 -#define ENOLINK 67 -#define EADV 68 -#define ESRMNT 69 -#define ECOMM 70 -#define EPROTO 71 -#define EMULTIHOP 72 -#define EDOTDOT 73 -#define EBADMSG 74 -#define EOVERFLOW 75 -#define ENOTUNIQ 76 -#define EBADFD 77 -#define EREMCHG 78 -#define ELIBACC 79 -#define ELIBBAD 80 -#define ELIBSCN 81 -#define ELIBMAX 82 -#define ELIBEXEC 83 -#define EILSEQ 84 -#define ERESTART 85 -#define ESTRPIPE 86 -#define EUSERS 87 -#define ENOTSOCK 88 -#define EDESTADDRREQ 89 -#define EMSGSIZE 90 -#define EPROTOTYPE 91 -#define ENOPROTOOPT 92 -#define EPROTONOSUPPORT 93 -#define ESOCKTNOSUPPORT 94 -#define EOPNOTSUPP 95 -#define EPFNOSUPPORT 96 -#define EAFNOSUPPORT 97 -#define EADDRINUSE 98 -#define EADDRNOTAVAIL 99 -#define ENETDOWN 100 -#define ENETUNREACH 101 -#define ENETRESET 102 -#define ECONNABORTED 103 -#define ECONNRESET 104 -#define ENOBUFS 105 -#define EISCONN 106 -#define ENOTCONN 107 -#define ESHUTDOWN 108 -#define ETOOMANYREFS 109 -#define ETIMEDOUT 110 -#define ECONNREFUSED 111 -#define EHOSTDOWN 112 -#define EHOSTUNREACH 113 -#define EALREADY 114 -#define EINPROGRESS 115 -#define ESTALE 116 -#define EUCLEAN 117 -#define ENOTNAM 118 -#define ENAVAIL 119 -#define EISNAM 120 -#define EREMOTEIO 121 -#define EDQUOT 122 -#define ENOMEDIUM 123 -#define EMEDIUMTYPE 124 -#define ECANCELED 125 -#define ENOKEY 126 -#define EKEYEXPIRED 127 -#define EKEYREVOKED 128 -#define EKEYREJECTED 129 -#define EOWNERDEAD 130 -#define ENOTRECOVERABLE 131 -#define ERFKILL 132 -#define EHWPOISON 133 -#define ENOTSUP EOPNOTSUPP - -__BEGIN_DECLS - -#ifndef errno -int * _TLIBC_CDECL_ __errno(void); -#define errno (*__errno()) -#endif /* errno */ -__END_DECLS - -#endif /* _ERRNO_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/float.h b/sgx-jvm/linux-sgx/common/inc/tlibc/float.h deleted file mode 100644 index 99ae58de83..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/float.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $OpenBSD: float.h,v 1.3 2008/07/21 20:50:54 martynas Exp $ */ -/* $NetBSD: float.h,v 1.8 1995/06/20 20:45:37 jtc Exp $ */ - -/* - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)float.h 7.1 (Berkeley) 5/8/90 - */ - -#ifndef _FLOAT_H_ -#define _FLOAT_H_ - -#include - -#define FLT_RADIX 2 /* b */ - -// The rounding direction can be specified by fesetround() in -#define FLT_ROUNDS 1 /* addition rounding: near */ -#define DECIMAL_DIG 21 /* max precision in decimal digits */ - -// NOTE: FLT_EVAL_METHOD is -1 under FREEBSD x86. -#ifdef __i386__ -#define FLT_EVAL_METHOD 2 /* long double */ -#else -#define FLT_EVAL_METHOD 0 /* no promotions */ -#endif - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX_10_EXP 308 - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP (-125) /* emin */ -#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ - -#define DBL_MAX 1.7976931348623157E+308 -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ - -#define LDBL_MANT_DIG 64 -#define LDBL_EPSILON 1.08420217248550443401e-19L -#define LDBL_DIG 18 -#define LDBL_MIN_EXP (-16381) -#define LDBL_MIN 3.36210314311209350626e-4932L -#define LDBL_MIN_10_EXP (-4931) -#define LDBL_MAX_EXP 16384 -#define LDBL_MAX 1.18973149535723176502e+4932L -#define LDBL_MAX_10_EXP 4932 - -#endif /* _FLOAT_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/inttypes.h b/sgx-jvm/linux-sgx/common/inc/tlibc/inttypes.h deleted file mode 100644 index c4fbcafc32..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/inttypes.h +++ /dev/null @@ -1,330 +0,0 @@ -/* $OpenBSD: inttypes.h,v 1.10 2009/01/13 18:13:51 kettenis Exp $ */ - -/* - * Copyright (c) 1997, 2005 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _INTTYPES_H_ -#define _INTTYPES_H_ - -#include - -/* - * 7.8.1 Macros for format specifiers - * - * Each of the following object-like macros expands to a string - * literal containing a conversion specifier, possibly modified by - * a prefix such as hh, h, l, or ll, suitable for use within the - * format argument of a formatted input/output function when - * converting the corresponding integer type. These macro names - * have the general form of PRI (character string literals for the - * fprintf family) or SCN (character string literals for the fscanf - * family), followed by the conversion specifier, followed by a - * name corresponding to a similar typedef name. For example, - * PRIdFAST32 can be used in a format string to print the value of - * an integer of type int_fast32_t. - */ - -/* fprintf macros for signed integers */ -#define PRId8 "d" /* int8_t */ -#define PRId16 "d" /* int16_t */ -#define PRId32 "d" /* int32_t */ -#ifdef __x86_64__ -#define PRId64 "ld" /* int64_t */ -#else -#define PRId64 "lld" /* int64_t */ -#endif - -#define PRIdLEAST8 "d" /* int_least8_t */ -#define PRIdLEAST16 "d" /* int_least16_t */ -#define PRIdLEAST32 "d" /* int_least32_t */ -#ifdef __x86_64__ -#define PRIdLEAST64 "ld" /* int_least64_t */ -#else -#define PRIdLEAST64 "lld" /* int_least64_t */ -#endif - -#define PRIdFAST8 "d" /* int_fast8_t */ -#ifdef __x86_64__ -#define PRIdFAST16 "ld" /* int_fast16_t */ -#define PRIdFAST32 "ld" /* int_fast32_t */ -#define PRIdFAST64 "ld" /* int_fast64_t */ -#else -#define PRIdFAST16 "d" /* int_fast16_t */ -#define PRIdFAST32 "d" /* int_fast32_t */ -#define PRIdFAST64 "lld" /* int_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIdMAX "ld" /* intmax_t */ -#else -#if defined(__i386__) -#define PRIdMAX "lld" /* intmax_t */ -#else -#define PRIdMAX "jd" /* intmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIdPTR "d" /* intptr_t */ -#else -#define PRIdPTR "ld" /* intptr_t */ -#endif - -#define PRIi8 "i" /* int8_t */ -#define PRIi16 "i" /* int16_t */ -#define PRIi32 "i" /* int32_t */ -#ifdef __x86_64__ -#define PRIi64 "li" /* int64_t */ -#else -#define PRIi64 "lli" /* int64_t */ -#endif - -#define PRIiLEAST8 "i" /* int_least8_t */ -#define PRIiLEAST16 "i" /* int_least16_t */ -#define PRIiLEAST32 "i" /* int_least32_t */ -#ifdef __x86_64__ -#define PRIiLEAST64 "li" /* int_least64_t */ -#else -#define PRIiLEAST64 "lli" /* int_least64_t */ -#endif - -#define PRIiFAST8 "i" /* int_fast8_t */ -#ifdef __x86_64__ -#define PRIiFAST16 "li" /* int_fast16_t */ -#define PRIiFAST32 "li" /* int_fast32_t */ -#define PRIiFAST64 "li" /* int_fast64_t */ -#else -#define PRIiFAST16 "i" /* int_fast16_t */ -#define PRIiFAST32 "i" /* int_fast32_t */ -#define PRIiFAST64 "lli" /* int_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIiMAX "li" /* intmax_t */ -#else -#if defined(__i386__) -#define PRIiMAX "lli" /* intmax_t */ -#else -#define PRIiMAX "ji" /* intmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIiPTR "i" /* intptr_t */ -#else -#define PRIiPTR "li" /* intptr_t */ -#endif - -/* fprintf macros for unsigned integers */ -#define PRIo8 "o" /* int8_t */ -#define PRIo16 "o" /* int16_t */ -#define PRIo32 "o" /* int32_t */ -#ifdef __x86_64__ -#define PRIo64 "lo" /* int64_t */ -#else -#define PRIo64 "llo" /* int64_t */ -#endif - -#define PRIoLEAST8 "o" /* int_least8_t */ -#define PRIoLEAST16 "o" /* int_least16_t */ -#define PRIoLEAST32 "o" /* int_least32_t */ -#ifdef __x86_64__ -#define PRIoLEAST64 "lo" /* int_least64_t */ -#else -#define PRIoLEAST64 "llo" /* int_least64_t */ -#endif - -#define PRIoFAST8 "o" /* int_fast8_t */ -#ifdef __x86_64__ -#define PRIoFAST16 "lo" /* int_fast16_t */ -#define PRIoFAST32 "lo" /* int_fast32_t */ -#define PRIoFAST64 "lo" /* int_fast64_t */ -#else -#define PRIoFAST16 "o" /* int_fast16_t */ -#define PRIoFAST32 "o" /* int_fast32_t */ -#define PRIoFAST64 "llo" /* int_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIoMAX "lo" /* intmax_t */ -#else -#if defined(__i386__) -#define PRIoMAX "llo" /* intmax_t */ -#else -#define PRIoMAX "jo" /* intmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIoPTR "o" /* intptr_t */ -#else -#define PRIoPTR "lo" /* intptr_t */ -#endif - -#define PRIu8 "u" /* uint8_t */ -#define PRIu16 "u" /* uint16_t */ -#define PRIu32 "u" /* uint32_t */ - -#ifdef __x86_64__ -#define PRIu64 "lu" /* uint64_t */ -#else -#define PRIu64 "llu" /* uint64_t */ -#endif - -#define PRIuLEAST8 "u" /* uint_least8_t */ -#define PRIuLEAST16 "u" /* uint_least16_t */ -#define PRIuLEAST32 "u" /* uint_least32_t */ - -#ifdef __x86_64__ -#define PRIuLEAST64 "lu" /* uint_least64_t */ -#else -#define PRIuLEAST64 "llu" /* uint_least64_t */ -#endif - -#define PRIuFAST8 "u" /* uint_fast8_t */ - -#ifdef __x86_64__ -#define PRIuFAST16 "lu" /* uint_fast16_t */ -#define PRIuFAST32 "lu" /* uint_fast32_t */ -#define PRIuFAST64 "lu" /* uint_fast64_t */ -#else -#define PRIuFAST16 "u" /* uint_fast16_t */ -#define PRIuFAST32 "u" /* uint_fast32_t */ -#define PRIuFAST64 "llu" /* uint_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIuMAX "lu" /* uintmax_t */ -#else -#if defined(__i386__) -#define PRIuMAX "llu" /* uintmax_t */ -#else -#define PRIuMAX "ju" /* uintmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIuPTR "u" /* uintptr_t */ -#else -#define PRIuPTR "lu" /* uintptr_t */ -#endif - -#define PRIx8 "x" /* uint8_t */ -#define PRIx16 "x" /* uint16_t */ -#define PRIx32 "x" /* uint32_t */ -#ifdef __x86_64__ -#define PRIx64 "lx" /* uint64_t */ -#else -#define PRIx64 "llx" /* uint64_t */ -#endif - -#define PRIxLEAST8 "x" /* uint_least8_t */ -#define PRIxLEAST16 "x" /* uint_least16_t */ -#define PRIxLEAST32 "x" /* uint_least32_t */ -#ifdef __x86_64__ -#define PRIxLEAST64 "lx" /* uint_least64_t */ -#else -#define PRIxLEAST64 "llx" /* uint_least64_t */ -#endif - -#define PRIxFAST8 "x" /* uint_fast8_t */ -#ifdef __x86_64__ -#define PRIxFAST16 "lx" /* uint_fast16_t */ -#define PRIxFAST32 "lx" /* uint_fast32_t */ -#define PRIxFAST64 "lx" /* uint_fast64_t */ -#else -#define PRIxFAST16 "x" /* uint_fast16_t */ -#define PRIxFAST32 "x" /* uint_fast32_t */ -#define PRIxFAST64 "llx" /* uint_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIxMAX "lx" /* uintmax_t */ -#else -#if defined(__i386__) -#define PRIxMAX "llx" /* uintmax_t */ -#else -#define PRIxMAX "jx" /* uintmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIxPTR "x" /* uintptr_t */ -#else -#define PRIxPTR "lx" /* uintptr_t */ -#endif - -#define PRIX8 "X" /* uint8_t */ -#define PRIX16 "X" /* uint16_t */ -#define PRIX32 "X" /* uint32_t */ - -#ifdef __x86_64__ -#define PRIX64 "lX" /* uint64_t */ -#else -#define PRIX64 "llX" /* uint64_t */ -#endif - -#define PRIXLEAST8 "X" /* uint_least8_t */ -#define PRIXLEAST16 "X" /* uint_least16_t */ -#define PRIXLEAST32 "X" /* uint_least32_t */ -#ifdef __x86_64__ -#define PRIXLEAST64 "lX" /* uint_least64_t */ -#else -#define PRIXLEAST64 "llX" /* uint_least64_t */ -#endif - -#define PRIXFAST8 "X" /* uint_fast8_t */ -#ifdef __x86_64__ -#define PRIXFAST16 "lX" /* uint_fast16_t */ -#define PRIXFAST32 "lX" /* uint_fast32_t */ -#define PRIXFAST64 "lX" /* uint_fast64_t */ -#else -#define PRIXFAST16 "X" /* uint_fast16_t */ -#define PRIXFAST32 "X" /* uint_fast32_t */ -#define PRIXFAST64 "llX" /* uint_fast64_t */ -#endif - -#ifdef __x86_64__ -#define PRIXMAX "lX" /* uintmax_t */ -#else -#if defined(__i386__) -#define PRIXMAX "llX" /* uintmax_t */ -#else -#define PRIXMAX "jX" /* uintmax_t */ -#endif -#endif - -#ifdef __i386__ -#define PRIXPTR "X" /* uintptr_t */ -#else -#define PRIXPTR "lX" /* uintptr_t */ -#endif - -typedef struct { - intmax_t quot; /* quotient */ - intmax_t rem; /* remainder */ -} imaxdiv_t; - -__BEGIN_DECLS - -intmax_t _TLIBC_CDECL_ imaxabs(intmax_t); -imaxdiv_t _TLIBC_CDECL_ imaxdiv(intmax_t, intmax_t); -intmax_t _TLIBC_CDECL_ strtoimax(const char *, char **, int); -uintmax_t _TLIBC_CDECL_ strtoumax(const char *, char **, int); - -__END_DECLS - -#endif /* _INTTYPES_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/iso646.h b/sgx-jvm/linux-sgx/common/inc/tlibc/iso646.h deleted file mode 100644 index d711cace6d..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/iso646.h +++ /dev/null @@ -1,26 +0,0 @@ -/* $OpenBSD: iso646.h,v 1.3 2001/10/11 00:05:21 espie Exp $ */ -/* $NetBSD: iso646.h,v 1.1 1995/02/17 09:08:10 jtc Exp $ */ - -/* - * Written by J.T. Conklin 02/16/95. - * Public domain. - */ - -#ifndef _ISO646_H_ -#define _ISO646_H_ - -#ifndef __cplusplus -#define and && -#define and_eq &= -#define bitand & -#define bitor | -#define compl ~ -#define not ! -#define not_eq != -#define or || -#define or_eq |= -#define xor ^ -#define xor_eq ^= -#endif - -#endif /* !_ISO646_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/limits.h b/sgx-jvm/linux-sgx/common/inc/tlibc/limits.h deleted file mode 100644 index fab59c9b8e..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/limits.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $OpenBSD: limits.h,v 1.15 2008/02/10 09:59:54 kettenis Exp $ */ -/* $NetBSD: limits.h,v 1.7 1994/10/26 00:56:00 cgd Exp $ */ - -/* - * Copyright (c) 1988 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)limits.h 5.9 (Berkeley) 4/3/91 - */ - - -#ifndef _LIMITS_H_ -#define _LIMITS_H_ - -#include - -#endif /* !_LIMITS_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/math.h b/sgx-jvm/linux-sgx/common/inc/tlibc/math.h deleted file mode 100644 index 104ac7f156..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/math.h +++ /dev/null @@ -1,430 +0,0 @@ -/* $OpenBSD: math.h,v 1.27 2010/12/14 11:16:15 martynas Exp $ */ -/* - * ==================================================== - * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - * - * Developed at SunPro, a Sun Microsystems, Inc. business. - * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice - * is preserved. - * ==================================================== - */ - -/* - * from: @(#)fdlibm.h 5.1 93/09/24 - */ - -#ifndef _MATH_H_ -#define _MATH_H_ - -#include -#include -#include - -#include - -typedef __float_t float_t; -typedef __double_t double_t; - -#define FP_NAN 0x00 -#define FP_INFINITE 0x01 -#define FP_ZERO 0x02 -#define FP_SUBNORMAL 0x03 -#define FP_NORMAL 0x04 - -#define FP_ILOGB0 (-INT_MAX - 1) -#define FP_ILOGBNAN (-INT_MAX - 1) - -#define fpclassify(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __fpclassifyf(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __fpclassify(x) \ - : __fpclassifyl(x)) -#define isfinite(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __isfinitef(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __isfinite(x) \ - : __isfinitel(x)) -#define isnormal(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __isnormalf(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __isnormal(x) \ - : __isnormall(x)) -#define signbit(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __signbitf(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __signbit(x) \ - : __signbitl(x)) -#define isinf(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __isinff(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __isinf(x) \ - : __isinfl(x)) -#define isnan(x) \ - ((sizeof (x) == sizeof (float)) ? \ - __isnanf(x) \ - : (sizeof (x) == sizeof (double)) ? \ - __isnan(x) \ - : __isnanl(x)) - -#define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y)) -#define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y)) -#define isless(x, y) (!isunordered((x), (y)) && (x) < (y)) -#define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y)) -#define islessgreater(x, y) (!isunordered((x), (y)) && ((x) > (y) || (y) > (x))) -#define isunordered(x, y) (isnan(x) || isnan(y)) - -__BEGIN_DECLS - -extern char __infinity[]; -#define HUGE_VAL (*(double *)(void *)__infinity) -#define HUGE_VALF ((float)HUGE_VAL) -#define HUGE_VALL ((long double)HUGE_VAL) -#define INFINITY HUGE_VALF -extern char __nan[]; -#define NAN (*(float *)(void *)__nan) - -/* - * ANSI/POSIX - */ -double _TLIBC_CDECL_ acos(double); -double _TLIBC_CDECL_ asin(double); -double _TLIBC_CDECL_ atan(double); -double _TLIBC_CDECL_ atan2(double, double); -double _TLIBC_CDECL_ cos(double); -double _TLIBC_CDECL_ sin(double); -double _TLIBC_CDECL_ tan(double); - -double _TLIBC_CDECL_ cosh(double); -double _TLIBC_CDECL_ sinh(double); -double _TLIBC_CDECL_ tanh(double); - -double _TLIBC_CDECL_ exp(double); -double _TLIBC_CDECL_ frexp(double, int *); -double _TLIBC_CDECL_ ldexp(double, int); -double _TLIBC_CDECL_ log(double); -double _TLIBC_CDECL_ log10(double); -double _TLIBC_CDECL_ modf(double, double *); - -double _TLIBC_CDECL_ pow(double, double); -double _TLIBC_CDECL_ sqrt(double); - -double _TLIBC_CDECL_ ceil(double); -double _TLIBC_CDECL_ fabs(double); -double _TLIBC_CDECL_ floor(double); -double _TLIBC_CDECL_ fmod(double, double); - -/* - * C99 - */ -double _TLIBC_CDECL_ acosh(double); -double _TLIBC_CDECL_ asinh(double); -double _TLIBC_CDECL_ atanh(double); - -double _TLIBC_CDECL_ exp2(double); -double _TLIBC_CDECL_ expm1(double); -int _TLIBC_CDECL_ ilogb(double); -double _TLIBC_CDECL_ log1p(double); -double _TLIBC_CDECL_ log2(double); -double _TLIBC_CDECL_ logb(double); -double _TLIBC_CDECL_ scalbn(double, int); -double _TLIBC_CDECL_ scalbln(double, long int); - -double _TLIBC_CDECL_ cbrt(double); -double _TLIBC_CDECL_ hypot(double, double); - -double _TLIBC_CDECL_ erf(double); -double _TLIBC_CDECL_ erfc(double); -double _TLIBC_CDECL_ lgamma(double); -double _TLIBC_CDECL_ tgamma(double); - -double _TLIBC_CDECL_ nearbyint(double); -double _TLIBC_CDECL_ rint(double); -long int _TLIBC_CDECL_ lrint(double); -long long int _TLIBC_CDECL_ llrint(double); -double _TLIBC_CDECL_ round(double); -long int _TLIBC_CDECL_ lround(double); -long long int _TLIBC_CDECL_ llround(double); -double _TLIBC_CDECL_ trunc(double); - -double _TLIBC_CDECL_ remainder(double, double); -double _TLIBC_CDECL_ remquo(double, double, int *); - -double _TLIBC_CDECL_ copysign(double, double); -double _TLIBC_CDECL_ nan(const char *); -double _TLIBC_CDECL_ nextafter(double, double); - -double _TLIBC_CDECL_ fdim(double, double); -double _TLIBC_CDECL_ fmax(double, double); -double _TLIBC_CDECL_ fmin(double, double); - -double _TLIBC_CDECL_ fma(double, double, double); - -/* - * Float versions of C99 functions - */ - -float _TLIBC_CDECL_ acosf(float); -float _TLIBC_CDECL_ asinf(float); -float _TLIBC_CDECL_ atanf(float); -float _TLIBC_CDECL_ atan2f(float, float); -float _TLIBC_CDECL_ cosf(float); -float _TLIBC_CDECL_ sinf(float); -float _TLIBC_CDECL_ tanf(float); - -float _TLIBC_CDECL_ acoshf(float); -float _TLIBC_CDECL_ asinhf(float); -float _TLIBC_CDECL_ atanhf(float); -float _TLIBC_CDECL_ coshf(float); -float _TLIBC_CDECL_ sinhf(float); -float _TLIBC_CDECL_ tanhf(float); - -float _TLIBC_CDECL_ expf(float); -float _TLIBC_CDECL_ exp2f(float); -float _TLIBC_CDECL_ expm1f(float); -float _TLIBC_CDECL_ frexpf(float, int *); -int _TLIBC_CDECL_ ilogbf(float); -float _TLIBC_CDECL_ ldexpf(float, int); -float _TLIBC_CDECL_ logf(float); -float _TLIBC_CDECL_ log10f(float); -float _TLIBC_CDECL_ log1pf(float); -float _TLIBC_CDECL_ log2f(float); -float _TLIBC_CDECL_ logbf(float); -float _TLIBC_CDECL_ modff(float, float *); -float _TLIBC_CDECL_ scalbnf(float, int); -float _TLIBC_CDECL_ scalblnf(float, long int); - -float _TLIBC_CDECL_ cbrtf(float); -float _TLIBC_CDECL_ fabsf(float); -float _TLIBC_CDECL_ hypotf(float, float); -float _TLIBC_CDECL_ powf(float, float); -float _TLIBC_CDECL_ sqrtf(float); - -float _TLIBC_CDECL_ erff(float); -float _TLIBC_CDECL_ erfcf(float); -float _TLIBC_CDECL_ lgammaf(float); -float _TLIBC_CDECL_ tgammaf(float); - -float _TLIBC_CDECL_ ceilf(float); -float _TLIBC_CDECL_ floorf(float); -float _TLIBC_CDECL_ nearbyintf(float); - -float _TLIBC_CDECL_ rintf(float); -long int _TLIBC_CDECL_ lrintf(float); -long long int _TLIBC_CDECL_ llrintf(float); -float _TLIBC_CDECL_ roundf(float); -long int _TLIBC_CDECL_ lroundf(float); -long long int _TLIBC_CDECL_ llroundf(float); -float _TLIBC_CDECL_ truncf(float); - -float _TLIBC_CDECL_ fmodf(float, float); -float _TLIBC_CDECL_ remainderf(float, float); -float _TLIBC_CDECL_ remquof(float, float, int *); - -float _TLIBC_CDECL_ copysignf(float, float); -float _TLIBC_CDECL_ nanf(const char *); -float _TLIBC_CDECL_ nextafterf(float, float); - -float _TLIBC_CDECL_ fdimf(float, float); -float _TLIBC_CDECL_ fmaxf(float, float); -float _TLIBC_CDECL_ fminf(float, float); - -float _TLIBC_CDECL_ fmaf(float, float, float); - -/* - * Long double versions of C99 functions - */ - -/* Macros defining long double functions to be their double counterparts - * (long double is synonymous with double in this implementation). - */ - -long double _TLIBC_CDECL_ acosl(long double); -long double _TLIBC_CDECL_ asinl(long double); -long double _TLIBC_CDECL_ atanl(long double); -long double _TLIBC_CDECL_ atan2l(long double, long double); -long double _TLIBC_CDECL_ cosl(long double); -long double _TLIBC_CDECL_ sinl(long double); -long double _TLIBC_CDECL_ tanl(long double); - -long double _TLIBC_CDECL_ acoshl(long double); -long double _TLIBC_CDECL_ asinhl(long double); -long double _TLIBC_CDECL_ atanhl(long double); -long double _TLIBC_CDECL_ coshl(long double); -long double _TLIBC_CDECL_ sinhl(long double); -long double _TLIBC_CDECL_ tanhl(long double); - -long double _TLIBC_CDECL_ expl(long double); -long double _TLIBC_CDECL_ exp2l(long double); -long double _TLIBC_CDECL_ expm1l(long double); -long double _TLIBC_CDECL_ frexpl(long double, int *); -int _TLIBC_CDECL_ ilogbl(long double); -long double _TLIBC_CDECL_ ldexpl(long double, int); -long double _TLIBC_CDECL_ logl(long double); -long double _TLIBC_CDECL_ log10l(long double); -long double _TLIBC_CDECL_ log1pl(long double); -long double _TLIBC_CDECL_ log2l(long double); -long double _TLIBC_CDECL_ logbl(long double); -long double _TLIBC_CDECL_ modfl(long double, long double *); -long double _TLIBC_CDECL_ scalbnl(long double, int); -long double _TLIBC_CDECL_ scalblnl(long double, long int); - -long double _TLIBC_CDECL_ cbrtl(long double); -long double _TLIBC_CDECL_ fabsl(long double); -long double _TLIBC_CDECL_ hypotl(long double, long double); -long double _TLIBC_CDECL_ powl(long double, long double); -long double _TLIBC_CDECL_ sqrtl(long double); - -long double _TLIBC_CDECL_ erfl(long double); -long double _TLIBC_CDECL_ erfcl(long double); -long double _TLIBC_CDECL_ lgammal(long double); -long double _TLIBC_CDECL_ tgammal(long double); - -long double _TLIBC_CDECL_ ceill(long double); -long double _TLIBC_CDECL_ floorl(long double); -long double _TLIBC_CDECL_ nearbyintl(long double); -long double _TLIBC_CDECL_ rintl(long double); -long int _TLIBC_CDECL_ lrintl(long double); -long long int _TLIBC_CDECL_ llrintl(long double); -long double _TLIBC_CDECL_ roundl(long double); -long int _TLIBC_CDECL_ lroundl(long double); -long long int _TLIBC_CDECL_ llroundl(long double); -long double _TLIBC_CDECL_ truncl(long double); - -long double _TLIBC_CDECL_ fmodl(long double, long double); -long double _TLIBC_CDECL_ remainderl(long double, long double); -long double _TLIBC_CDECL_ remquol(long double, long double, int *); - -long double _TLIBC_CDECL_ copysignl(long double, long double); -long double _TLIBC_CDECL_ nanl(const char *); -long double _TLIBC_CDECL_ nextafterl(long double, long double); - -long double _TLIBC_CDECL_ fdiml(long double, long double); -long double _TLIBC_CDECL_ fmaxl(long double, long double); -long double _TLIBC_CDECL_ fminl(long double, long double); -long double _TLIBC_CDECL_ fmal(long double, long double, long double); - -/* nexttoward(): -* The implementation in Intel math library is incompatible with MSVC. -* Because sizeof(long double) is 8bytes with MSVC, -* but the expected long double size is 10bytes. -* And by default, MSVC doesn't provide nexttoward(). -* So we only provide Linux version here. -*/ -double _TLIBC_CDECL_ nexttoward(double, long double); -float _TLIBC_CDECL_ nexttowardf(float, long double); - -long double _TLIBC_CDECL_ nexttowardl(long double, long double); - -/* - * Library implementation - */ -int _TLIBC_CDECL_ __fpclassify(double); -int _TLIBC_CDECL_ __fpclassifyf(float); -int _TLIBC_CDECL_ __isfinite(double); -int _TLIBC_CDECL_ __isfinitef(float); -int _TLIBC_CDECL_ __isinf(double); -int _TLIBC_CDECL_ __isinff(float); -int _TLIBC_CDECL_ __isnan(double); -int _TLIBC_CDECL_ __isnanf(float); -int _TLIBC_CDECL_ __isnormal(double); -int _TLIBC_CDECL_ __isnormalf(float); -int _TLIBC_CDECL_ __signbit(double); -int _TLIBC_CDECL_ __signbitf(float); - -int _TLIBC_CDECL_ __fpclassifyl(long double); -int _TLIBC_CDECL_ __isfinitel(long double); -int _TLIBC_CDECL_ __isinfl(long double); -int _TLIBC_CDECL_ __isnanl(long double); -int _TLIBC_CDECL_ __isnormall(long double); -int _TLIBC_CDECL_ __signbitl(long double); - -/* - * Non-C99 functions. - */ -double _TLIBC_CDECL_ drem(double, double); -double _TLIBC_CDECL_ exp10(double); -double _TLIBC_CDECL_ gamma(double); -double _TLIBC_CDECL_ gamma_r(double, int *); -double _TLIBC_CDECL_ j0(double); -double _TLIBC_CDECL_ j1(double); -double _TLIBC_CDECL_ jn(int, double); -double _TLIBC_CDECL_ lgamma_r(double, int *); -double _TLIBC_CDECL_ pow10(double); -double _TLIBC_CDECL_ scalb(double, double); -/* C99 Macro signbit.*/ -double _TLIBC_CDECL_ significand(double); -void _TLIBC_CDECL_ sincos(double, double *, double *); -double _TLIBC_CDECL_ y0(double); -double _TLIBC_CDECL_ y1(double); -double _TLIBC_CDECL_ yn(int, double); -/* C99 Macro isinf.*/ -/* C99 Macro isnan.*/ -int _TLIBC_CDECL_ finite(double); - -float _TLIBC_CDECL_ dremf(float, float); -float _TLIBC_CDECL_ exp10f(float); -float _TLIBC_CDECL_ gammaf(float); -float _TLIBC_CDECL_ gammaf_r(float, int *); -float _TLIBC_CDECL_ j0f(float); -float _TLIBC_CDECL_ j1f(float); -float _TLIBC_CDECL_ jnf(int, float); -float _TLIBC_CDECL_ lgammaf_r(float, int *); -float _TLIBC_CDECL_ pow10f(float); -float _TLIBC_CDECL_ scalbf(float, float); -int _TLIBC_CDECL_ signbitf(float); -float _TLIBC_CDECL_ significandf(float); -void _TLIBC_CDECL_ sincosf(float, float *, float *); -float _TLIBC_CDECL_ y0f(float); -float _TLIBC_CDECL_ y1f(float); -float _TLIBC_CDECL_ ynf(int, float); -int _TLIBC_CDECL_ finitef(float); -int _TLIBC_CDECL_ isinff(float); -int _TLIBC_CDECL_ isnanf(float); - -long double _TLIBC_CDECL_ dreml(long double, long double); -long double _TLIBC_CDECL_ exp10l(long double); -long double _TLIBC_CDECL_ gammal(long double); -long double _TLIBC_CDECL_ gammal_r(long double, int *); -long double _TLIBC_CDECL_ j0l(long double); -long double _TLIBC_CDECL_ j1l(long double); -long double _TLIBC_CDECL_ jnl(int, long double); -long double _TLIBC_CDECL_ lgammal_r(long double, int *); -long double _TLIBC_CDECL_ pow10l(long double); -long double _TLIBC_CDECL_ scalbl(long double, long double); -int _TLIBC_CDECL_ signbitl(long double); -long double _TLIBC_CDECL_ significandl(long double); -void _TLIBC_CDECL_ sincosl(long double, long double *, long double *); -long double _TLIBC_CDECL_ y1l(long double); -long double _TLIBC_CDECL_ y0l(long double); -long double _TLIBC_CDECL_ ynl(int, long double); -int _TLIBC_CDECL_ finitel(long double); -int _TLIBC_CDECL_ isinfl(long double); -int _TLIBC_CDECL_ isnanl(long double); - -/* - * TODO: From Intel Decimal Floating-Point Math Library - * signbitd32/signbitd64/signbitd128, finited32/finited64/finited128 - * isinfd32/isinfd64/isinfd128, isnand32/isnand64/isnand128 - */ -#if defined(__cplusplus) -/* Clang does not support decimal floating point types. - * - * c.f.: - * http://clang.llvm.org/docs/UsersManual.html#gcc-extensions-not-implemented-yet - */ -#if !defined(__clang__) -typedef float _Decimal32 __attribute__((mode(SD))); -typedef float _Decimal64 __attribute__((mode(DD))); -typedef float _Decimal128 __attribute__((mode(TD))); -#endif -#endif - -__END_DECLS - -#endif /* !_MATH_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/mbusafecrt.h b/sgx-jvm/linux-sgx/common/inc/tlibc/mbusafecrt.h deleted file mode 100644 index 466c55041b..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/mbusafecrt.h +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -/*** -* mbusafecrt.h - public declarations for SafeCRT lib -* - -* -* Purpose: -* This file contains the public declarations SafeCRT -* functions ported to MacOS. These are the safe versions of -* functions standard functions banned by SWI -* - -****/ - -/* shields! */ - -#ifndef MBUSAFECRT_H -#define MBUSAFECRT_H -#include -#include -#include -typedef wchar_t WCHAR; - -#ifdef __cplusplus - extern "C" { -#endif - -extern errno_t strcat_s( char* ioDest, size_t inDestBufferSize, const char* inSrc ); -extern errno_t wcscat_s( WCHAR* ioDest, size_t inDestBufferSize, const WCHAR* inSrc ); - -extern errno_t strncat_s( char* ioDest, size_t inDestBufferSize, const char* inSrc, size_t inCount ); -extern errno_t wcsncat_s( WCHAR* ioDest, size_t inDestBufferSize, const WCHAR* inSrc, size_t inCount ); - -extern errno_t strcpy_s( char* outDest, size_t inDestBufferSize, const char* inSrc ); -extern errno_t wcscpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inSrc ); - -extern errno_t strncpy_s( char* outDest, size_t inDestBufferSize, const char* inSrc, size_t inCount ); -extern errno_t wcsncpy_s( WCHAR* outDest, size_t inDestBufferSize, const WCHAR* inSrc, size_t inCount ); - -extern char* strtok_s( char* inString, const char* inControl, char** ioContext ); -extern WCHAR* wcstok_s( WCHAR* inString, const WCHAR* inControl, WCHAR** ioContext ); - -extern size_t wcsnlen( const WCHAR* inString, size_t inMaxSize ); - -extern errno_t _itoa_s( int inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _itow_s( int inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern errno_t _ltoa_s( long inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _ltow_s( long inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern errno_t _ultoa_s( unsigned long inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _ultow_s( unsigned long inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern errno_t _i64toa_s( long long inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _i64tow_s( long long inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern errno_t _ui64toa_s( unsigned long long inValue, char* outBuffer, size_t inDestBufferSize, int inRadix ); -extern errno_t _ui64tow_s( unsigned long long inValue, WCHAR* outBuffer, size_t inDestBufferSize, int inRadix ); - -extern int sprintf_s( char *string, size_t sizeInBytes, const char *format, ... ); -extern int swprintf_s( WCHAR *string, size_t sizeInWords, const WCHAR *format, ... ); - -extern int _snprintf_s( char *string, size_t sizeInBytes, size_t count, const char *format, ... ); -extern int _snwprintf_s( WCHAR *string, size_t sizeInWords, size_t count, const WCHAR *format, ... ); - -extern int _vsprintf_s( char* string, size_t sizeInBytes, const char* format, va_list arglist ); -extern int _vsnprintf_s( char* string, size_t sizeInBytes, size_t count, const char* format, va_list arglist ); - -extern int _vswprintf_s( WCHAR* string, size_t sizeInWords, const WCHAR* format, va_list arglist ); -extern int _vsnwprintf_s( WCHAR* string, size_t sizeInWords, size_t count, const WCHAR* format, va_list arglist ); - -extern errno_t memcpy_s( void * dst, size_t sizeInBytes, const void * src, size_t count ); -extern errno_t memmove_s( void * dst, size_t sizeInBytes, const void * src, size_t count ); - -#ifdef __cplusplus - } -#endif - -#endif /* MBUSAFECRT_H */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/setjmp.h b/sgx-jvm/linux-sgx/common/inc/tlibc/setjmp.h deleted file mode 100644 index 0c198cae02..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/setjmp.h +++ /dev/null @@ -1,65 +0,0 @@ -/* $NetBSD: setjmp.h,v 1.26 2011/11/05 09:27:06 joerg Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)setjmp.h 8.2 (Berkeley) 1/21/94 - */ - -#ifndef _SETJMP_H_ -#define _SETJMP_H_ - -#ifndef _JB_ATTRIBUTES -#define _JB_ATTRIBUTES /**/ -#else -#endif -#ifndef _BSD_JBSLOT_T_ -#define _BSD_JBSLOT_T_ long -#endif - -#define _JBLEN 8 - -typedef _BSD_JBSLOT_T_ jmp_buf[_JBLEN] _JB_ATTRIBUTES; - -#include -#define __returns_twice __attribute__((__returns_twice__)) -#define __dead - - -__BEGIN_DECLS -int setjmp(jmp_buf) __returns_twice; -void longjmp(jmp_buf, int) __dead; -__END_DECLS - -#endif /* !_SETJMP_H_ */ - diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/stdarg.h b/sgx-jvm/linux-sgx/common/inc/tlibc/stdarg.h deleted file mode 100644 index ed73e246a6..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/stdarg.h +++ /dev/null @@ -1,48 +0,0 @@ -/* $OpenBSD: stdarg.h,v 1.14 2010/12/30 05:01:36 tedu Exp $ */ -/* $NetBSD: stdarg.h,v 1.12 1995/12/25 23:15:31 mycroft Exp $ */ - -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)stdarg.h 8.1 (Berkeley) 6/10/93 - */ - -#ifndef _STDARG_H_ -#define _STDARG_H_ - -#include -#include - -typedef __va_list va_list; - -#define va_start(ap, last) __builtin_va_start((ap), last) -#define va_end __builtin_va_end -#define va_arg __builtin_va_arg -#define va_copy(dst, src) __builtin_va_copy((dst),(src)) - -#endif /* !_STDARG_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/stdbool.h b/sgx-jvm/linux-sgx/common/inc/tlibc/stdbool.h deleted file mode 100644 index bd1837ec46..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/stdbool.h +++ /dev/null @@ -1,44 +0,0 @@ -/* $OpenBSD: stdbool.h,v 1.5 2010/07/24 22:17:03 guenther Exp $ */ - -/* - * Written by Marc Espie, September 25, 1999 - * Public domain. - */ - -#ifndef _STDBOOL_H_ -#define _STDBOOL_H_ - -#ifndef __cplusplus - -#ifndef __GNUC__ -/* Support for _C99: type _Bool is already built-in. */ -/* `_Bool' type must promote to `int' or `unsigned int'. */ -typedef enum { - false = 0, - true = 1 -} _Bool; - -/* And those constants must also be available as macros. */ -# define false false -# define true true -#else /* __GNUC__ */ -# define false 0 -# define true 1 -#endif - -/* User visible type `bool' is provided as a macro which may be redefined */ -#define bool _Bool - -#else /* __cplusplus */ - -# define _Bool bool -# define bool bool -# define false false -# define true true - -#endif - -/* Inform that everything is fine */ -#define __bool_true_false_are_defined 1 - -#endif /* _STDBOOL_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/stddef.h b/sgx-jvm/linux-sgx/common/inc/tlibc/stddef.h deleted file mode 100644 index 84509c5025..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/stddef.h +++ /dev/null @@ -1,70 +0,0 @@ -/* $OpenBSD: stddef.h,v 1.10 2009/09/22 21:40:02 jsg Exp $ */ -/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)stddef.h 5.5 (Berkeley) 4/3/91 - */ - -#ifndef _STDDEF_H_ -#define _STDDEF_H_ - -#include -#include - -#ifndef _PTRDIFF_T_DEFINED_ -#define _PTRDIFF_T_DEFINED_ -typedef __ptrdiff_t ptrdiff_t; -#endif - -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef __size_t size_t; -#endif - -#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus) -#define _WCHAR_T_DEFINED_ -#ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ int -#endif -typedef __WCHAR_TYPE__ wchar_t; -#endif - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#define offsetof(type, member) ((size_t)(&((type *)0)->member)) - -#endif /* _STDDEF_H_ */ - diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/stdint.h b/sgx-jvm/linux-sgx/common/inc/tlibc/stdint.h deleted file mode 100644 index d283ae9214..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/stdint.h +++ /dev/null @@ -1,24 +0,0 @@ -/* $OpenBSD: stdint.h,v 1.4 2006/12/10 22:17:55 deraadt Exp $ */ - -/* - * Copyright (c) 1997, 2005 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _STDINT_H_ -#define _STDINT_H_ - -#include - -#endif /* _STDINT_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/stdio.h b/sgx-jvm/linux-sgx/common/inc/tlibc/stdio.h deleted file mode 100644 index 0175a3ace3..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/stdio.h +++ /dev/null @@ -1,95 +0,0 @@ -/* $OpenBSD: stdio.h,v 1.38 2009/11/09 00:18:27 kurt Exp $ */ -/* $NetBSD: stdio.h,v 1.18 1996/04/25 18:29:21 jtc Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Chris Torek. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)stdio.h 5.17 (Berkeley) 6/3/91 - */ - -#ifndef _STDIO_H_ -#define _STDIO_H_ - -#include -#include - -#include - -#ifndef _SIZE_T_DEFINED_ -typedef __size_t size_t; -#define _SIZE_T_DEFINED_ -#endif - -#ifndef NULL -# ifdef __cplusplus -# define NULL 0 -# else -# define NULL ((void *)0) -# endif -#endif - -# define BUFSIZ 8192 - -#define EOF (-1) - -__BEGIN_DECLS - -int _TLIBC_CDECL_ snprintf(char *, size_t, const char *, ...) _GCC_PRINTF_FORMAT_(3, 4); -int _TLIBC_CDECL_ vsnprintf(char *, size_t, const char *, __va_list) _GCC_PRINTF_FORMAT_(3, 0); - -/* - * Deprecated definitions. - */ -#if 0 /* No FILE */ -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, fprintf, FILE *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, putc, int, FILE *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, fputc, int, FILE *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, fputs, const char *, FILE *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, fscanf, FILE *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(size_t _TLIBC_CDECL_, fwrite, const void *, size_t, size_t, FILE *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, printf, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, putchar, int); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, puts, const char *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, scanf, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, sprintf, char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, sscanf, const char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vfprintf, FILE *, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vfscanf, FILE *, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vprintf, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vscanf, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vsprintf, char *, const char *, __va_list); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, vsscanf, const char *, const char *, __va_list); -#endif - -__END_DECLS - - -#endif /* !_STDIO_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/stdlib.h b/sgx-jvm/linux-sgx/common/inc/tlibc/stdlib.h deleted file mode 100644 index 6b811a83e3..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/stdlib.h +++ /dev/null @@ -1,160 +0,0 @@ -/* $OpenBSD: stdlib.h,v 1.47 2010/05/18 22:24:55 tedu Exp $ */ -/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */ - -/*- -* Copyright (c) 1990 The Regents of the University of California. -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* 1. Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* 2. Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* 3. Neither the name of the University nor the names of its contributors -* may be used to endorse or promote products derived from this software -* without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -* SUCH DAMAGE. -* -* @(#)stdlib.h 5.13 (Berkeley) 6/4/91 -*/ - -#ifndef _STDLIB_H_ -#define _STDLIB_H_ - -#include -#include - -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef __size_t size_t; -#endif - -#ifdef _TLIBC_WIN_ -#if !defined(_WCHAR_T_DEFINED) && !defined (_NATIVE_WCHAR_T_DEFINED) -#define _WCHAR_T_DEFINED -typedef unsigned short wchar_t; -#endif -#else -#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus) -#define _WCHAR_T_DEFINED_ -#ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ int -#endif -typedef __WCHAR_TYPE__ wchar_t; -#endif -#endif - -#ifndef _DIV_T_DEFINED -typedef struct { - int quot; /* quotient */ - int rem; /* remainder */ -} div_t; - -typedef struct { - long quot; /* quotient */ - long rem; /* remainder */ -} ldiv_t; - -typedef struct { - long long quot; /* quotient */ - long long rem; /* remainder */ -} lldiv_t; -#define _DIV_T_DEFINED -#endif - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - -#define RAND_MAX 0x7fffffff -#define MB_CUR_MAX 1 - -__BEGIN_DECLS - -_TLIBC_NORETURN_ void _TLIBC_CDECL_ abort(void); -int _TLIBC_CDECL_ atexit(void (*)(void)); -int _TLIBC_CDECL_ abs(int); -double _TLIBC_CDECL_ atof(const char *); -int _TLIBC_CDECL_ atoi(const char *); -long _TLIBC_CDECL_ atol(const char *); -void * _TLIBC_CDECL_ bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); -void * _TLIBC_CDECL_ calloc(size_t, size_t); -div_t _TLIBC_CDECL_ div(int, int); -void _TLIBC_CDECL_ free(void *); -long _TLIBC_CDECL_ labs(long); -ldiv_t _TLIBC_CDECL_ ldiv(long, long); -void * _TLIBC_CDECL_ malloc(size_t); -void * _TLIBC_CDECL_ memalign(size_t, size_t); -void _TLIBC_CDECL_ qsort(void *, size_t, size_t, int (*)(const void *, const void *)); -void * _TLIBC_CDECL_ realloc(void *, size_t); -double _TLIBC_CDECL_ strtod(const char *, char **); -long _TLIBC_CDECL_ strtol(const char *, char **, int); -float _TLIBC_CDECL_ strtof(const char *, char **); - -long long - _TLIBC_CDECL_ atoll(const char *); -long long - _TLIBC_CDECL_ llabs(long long); -lldiv_t - _TLIBC_CDECL_ lldiv(long long, long long); -long long - _TLIBC_CDECL_ strtoll(const char *, char **, int); -unsigned long - _TLIBC_CDECL_ strtoul(const char *, char **, int); -long double - _TLIBC_CDECL_ strtold(const char *, char **); -unsigned long long - _TLIBC_CDECL_ strtoull(const char *, char **, int); - -int _TLIBC_CDECL_ mblen(const char *, size_t); -size_t _TLIBC_CDECL_ mbstowcs(wchar_t *, const char *, size_t); -int _TLIBC_CDECL_ wctomb(char *, wchar_t); -int _TLIBC_CDECL_ mbtowc(wchar_t *, const char *, size_t); -size_t _TLIBC_CDECL_ wcstombs(char *, const wchar_t *, size_t); - - -/* - * Deprecated C99. - */ -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, atexit, void (_TLIBC_CDECL_ *)(void)); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, rand, void); -_TLIBC_DEPRECATED_FUNCTION_(void _TLIBC_CDECL_, srand, unsigned); -_TLIBC_DEPRECATED_FUNCTION_(void _TLIBC_CDECL_, exit, int); -_TLIBC_DEPRECATED_FUNCTION_(void _TLIBC_CDECL_, _Exit, int); -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, getenv, const char *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, system, const char *); - -/* - * Non-C99 Functions. - */ -void * _TLIBC_CDECL_ alloca(size_t); - -/* - * Deprecated Non-C99. - */ -//_TLIBC_DEPRECATED_FUNCTION_(void _TLIBC_CDECL_, _exit, int); - -__END_DECLS - -#endif /* !_STDLIB_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/string.h b/sgx-jvm/linux-sgx/common/inc/tlibc/string.h deleted file mode 100644 index c8e458f477..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/string.h +++ /dev/null @@ -1,125 +0,0 @@ -/* $OpenBSD: string.h,v 1.20 2010/09/24 13:33:00 matthew Exp $ */ -/* $NetBSD: string.h,v 1.6 1994/10/26 00:56:30 cgd Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)string.h 5.10 (Berkeley) 3/9/91 - */ - -#ifndef _STRING_H_ -#define _STRING_H_ - -#include -#include - -#ifndef _SIZE_T_DEFINED_ -typedef __size_t size_t; -#define _SIZE_T_DEFINED_ -#endif - -#ifndef _ERRNO_T_DEFINED -#define _ERRNO_T_DEFINED -typedef int errno_t; -#endif - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -__BEGIN_DECLS - -void * _TLIBC_CDECL_ memchr(const void *, int, size_t); -int _TLIBC_CDECL_ memcmp(const void *, const void *, size_t); -void * _TLIBC_CDECL_ memcpy(void *, const void *, size_t); -void * _TLIBC_CDECL_ memmove(void *, const void *, size_t); -void * _TLIBC_CDECL_ memset(void *, int, size_t); -char * _TLIBC_CDECL_ strchr(const char *, int); -int _TLIBC_CDECL_ strcmp(const char *, const char *); -int _TLIBC_CDECL_ strcoll(const char *, const char *); -size_t _TLIBC_CDECL_ strcspn(const char *, const char *); -char * _TLIBC_CDECL_ strerror(int); -size_t _TLIBC_CDECL_ strlen(const char *); -char * _TLIBC_CDECL_ strncat(char *, const char *, size_t); -int _TLIBC_CDECL_ strncmp(const char *, const char *, size_t); -char * _TLIBC_CDECL_ strncpy(char *, const char *, size_t); -char * _TLIBC_CDECL_ strpbrk(const char *, const char *); -char * _TLIBC_CDECL_ strrchr(const char *, int); -size_t _TLIBC_CDECL_ strspn(const char *, const char *); -char * _TLIBC_CDECL_ strstr(const char *, const char *); -char * _TLIBC_CDECL_ strtok(char *, const char *); -size_t _TLIBC_CDECL_ strxfrm(char *, const char *, size_t); -size_t _TLIBC_CDECL_ strlcpy(char *, const char *, size_t); -errno_t _TLIBC_CDECL_ memset_s(void *s, size_t smax, int c, size_t n); - -/* - * Deprecated C99. - */ -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, strcat, char *, const char *); -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, strcpy, char *, const char *); - -/* - * Common used non-C99 functions. - */ -char * _TLIBC_CDECL_ strndup(const char *, size_t); -size_t _TLIBC_CDECL_ strnlen(const char *, size_t); -int _TLIBC_CDECL_ consttime_memequal(const void *b1, const void *b2, size_t len); - -/* - * Non-C99 - */ -int _TLIBC_CDECL_ bcmp(const void *, const void *, size_t); -void _TLIBC_CDECL_ bcopy(const void *, void *, size_t); -void _TLIBC_CDECL_ bzero(void *, size_t); -char * _TLIBC_CDECL_ index(const char *, int); -void * _TLIBC_CDECL_ mempcpy(void *, const void *, size_t); -char * _TLIBC_CDECL_ rindex(const char *, int); -char * _TLIBC_CDECL_ stpncpy(char *dest, const char *src, size_t n); -int _TLIBC_CDECL_ strcasecmp(const char *, const char *); -int _TLIBC_CDECL_ strncasecmp(const char *, const char *, size_t); - -int _TLIBC_CDECL_ ffs(int); -int _TLIBC_CDECL_ ffsl(long int); -int _TLIBC_CDECL_ ffsll(long long int); - -char * _TLIBC_CDECL_ strtok_r(char *, const char *, char **); -int _TLIBC_CDECL_ strerror_r(int, char *, size_t); - -/* - * Deprecated Non-C99. - */ -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, strdup, const char *); -_TLIBC_DEPRECATED_FUNCTION_(char * _TLIBC_CDECL_, stpcpy, char *dest, const char *src); - -__END_DECLS - -#endif /* _STRING_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/_types.h b/sgx-jvm/linux-sgx/common/inc/tlibc/sys/_types.h deleted file mode 100644 index 0fd68f914f..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/_types.h +++ /dev/null @@ -1,138 +0,0 @@ -/* $OpenBSD: _types.h,v 1.2 2008/03/16 19:42:57 otto Exp $ */ - -/*- - * Copyright (c) 1990, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)types.h 8.3 (Berkeley) 1/5/94 - */ - -#ifndef _SYS__TYPES_H_ -#define _SYS__TYPES_H_ - -#include -/* 7.18.1.1 Exact-width integer types */ -typedef signed char __int8_t; -typedef unsigned char __uint8_t; -typedef short __int16_t; -typedef unsigned short __uint16_t; -typedef int __int32_t; -typedef unsigned int __uint32_t; -#ifdef __x86_64__ -typedef long __int64_t; -typedef unsigned long __uint64_t; -#else -typedef long long __int64_t; -typedef unsigned long long __uint64_t; -#endif - -/* 7.18.1.2 Minimum-width integer types */ -typedef __int8_t __int_least8_t; -typedef __uint8_t __uint_least8_t; -typedef __int16_t __int_least16_t; -typedef __uint16_t __uint_least16_t; -typedef __int32_t __int_least32_t; -typedef __uint32_t __uint_least32_t; -typedef __int64_t __int_least64_t; -typedef __uint64_t __uint_least64_t; - -/* 7.18.1.3 Fastest minimum-width integer types */ -typedef __int8_t __int_fast8_t; -typedef __uint8_t __uint_fast8_t; -#ifdef __x86_64__ -/* Linux x86_64, from stdint.h */ -typedef long int __int_fast16_t; -typedef unsigned long int __uint_fast16_t; -typedef long int __int_fast32_t; -typedef unsigned long int __uint_fast32_t; -typedef long int __int_fast64_t; -typedef unsigned long int __uint_fast64_t; -#else -/* Android x86, and Linux x86 */ -typedef __int32_t __int_fast16_t; -typedef __uint32_t __uint_fast16_t; -typedef __int32_t __int_fast32_t; -typedef __uint32_t __uint_fast32_t; -typedef __int64_t __int_fast64_t; -typedef __uint64_t __uint_fast64_t; -#endif - -typedef long __off_t; - -/* 7.18.1.4 Integer types capable of holding object pointers */ -#ifdef __i386__ -typedef __int32_t __intptr_t; -typedef __uint32_t __uintptr_t; -typedef __int32_t __ptrdiff_t; -/* Standard system types */ -typedef __uint32_t __size_t; -typedef __int32_t __ssize_t; -typedef long double __double_t; -typedef long double __float_t; -#else -typedef __int64_t __intptr_t; -typedef __uint64_t __uintptr_t; -typedef __int64_t __ptrdiff_t; - -/* Standard system types */ -typedef unsigned long __size_t; -typedef long __ssize_t; -typedef double __double_t; -typedef float __float_t; - -#endif /* !__i386__ */ - -typedef long __clock_t; - -typedef long __time_t; -typedef __builtin_va_list __va_list; -typedef unsigned int __wint_t; -/* wctype_t and wctrans_t are defined in wchar.h */ -typedef unsigned long int __wctype_t; -typedef int * __wctrans_t; - -/* - * mbstate_t is an opaque object to keep conversion state, during multibyte - * stream conversions. The content must not be referenced by user programs. - */ -/* For Linux, __mbstate_t is defined in wchar.h */ -typedef struct { - int __c; - union { - __wint_t __wc; - char __wcb[4]; - } __v; -} __mbstate_t; - -/* 7.18.1.5 Greatest-width integer types */ -typedef __int64_t __intmax_t; -typedef __uint64_t __uintmax_t; - -#endif /* !_SYS__TYPES_H_ */ - - - diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/cdefs.h b/sgx-jvm/linux-sgx/common/inc/tlibc/sys/cdefs.h deleted file mode 100644 index 398a12bbc7..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/cdefs.h +++ /dev/null @@ -1,132 +0,0 @@ -/* $OpenBSD: cdefs.h,v 1.34 2012/08/14 20:11:37 matthew Exp $ */ -/* $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ */ - -/* - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Berkeley Software Design, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)cdefs.h 8.7 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_CDEFS_H_ -#define _SYS_CDEFS_H_ - -/* Declaration field in C/C++ headers */ -#if defined(__cplusplus) -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif - -#if defined(__STDC__) || defined(__cplusplus) -# define __CONCAT(x,y) x ## y -# define __STRING(x) #x -#else -# define __CONCAT(x,y) x/**/y -# define __STRING(x) "x" -#endif -/* - * Macro to test if we're using a specific version of gcc or later. - */ -#if defined __GNUC__ && defined __GNUC_MINOR_ -# define __GNUC_PREREQ__(ma, mi) \ - ((__GNUC__ > (ma)) || (__GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))) -#else -# define __GNUC_PREREQ__(ma, mi) 0 -#endif - -/* Calling Convention: cdecl */ -#define _TLIBC_CDECL_ - -/* Thread Directive */ -#define _TLIBC_THREAD_ /* __thread */ - -/* Deprecated Warnings */ -#define _TLIBC_DEPRECATED_MSG(x) __STRING(x)" is deprecated in tlibc." -#define _TLIBC_DEPRECATED_(x) __attribute__((deprecated(_TLIBC_DEPRECATED_MSG(x)))) - -#ifndef _TLIBC_WARN_DEPRECATED_FUNCTIONS_ -# define _TLIBC_DEPRECATED_FUNCTION_(__ret, __func, ...) -#else -# define _TLIBC_DEPRECATED_FUNCTION_(__ret, __func, ...) \ - _TLIBC_DEPRECATED_(__func) \ - __ret __func(__VA_ARGS__) -#endif - -/* Static analysis for printf format strings. - * _MSC_PRINTF_FORMAT_: MSVC SAL annotation for specifying format strings. - * _GCC_PRINTF_FORMAT_(x, y): GCC declaring attribute for checking format strings. - * x - index of the format string. In C++ non-static method, index 1 is reseved for 'this'. - * y - index of first variadic agrument in '...'. - */ -#define _GCC_PRINTF_FORMAT_(x, y) __attribute__((__format__ (printf, x, y))) - -/* Attribute - noreturn */ -#define _TLIBC_NORETURN_ __attribute__ ((__noreturn__)) - -/* - * GNU C version 2.96 adds explicit branch prediction so that - * the CPU back-end can hint the processor and also so that - * code blocks can be reordered such that the predicted path - * sees a more linear flow, thus improving cache behavior, etc. - * - * The following two macros provide us with a way to utilize this - * compiler feature. Use __predict_true() if you expect the expression - * to evaluate to true, and __predict_false() if you expect the - * expression to evaluate to false. - * - * A few notes about usage: - * - * * Generally, __predict_false() error condition checks (unless - * you have some _strong_ reason to do otherwise, in which case - * document it), and/or __predict_true() `no-error' condition - * checks, assuming you want to optimize for the no-error case. - * - * * Other than that, if you don't know the likelihood of a test - * succeeding from empirical or other `hard' evidence, don't - * make predictions. - * - * * These are meant to be used in places that are run `a lot'. - * It is wasteful to make predictions in code that is run - * seldomly (e.g. at subsystem initialization time) as the - * basic block reordering that this affects can often generate - * larger code. - */ -#if defined(__GNUC__) && __GNUC_PREREQ__(2, 96) -#define __predict_true(exp) __builtin_expect(((exp) != 0), 1) -#define __predict_false(exp) __builtin_expect(((exp) != 0), 0) -#else -#define __predict_true(exp) ((exp) != 0) -#define __predict_false(exp) ((exp) != 0) -#endif - -#endif /* !_SYS_CDEFS_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/endian.h b/sgx-jvm/linux-sgx/common/inc/tlibc/sys/endian.h deleted file mode 100644 index 29edd81c5c..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/endian.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $OpenBSD: endian.h,v 1.18 2006/03/27 07:09:24 otto Exp $ */ - -/*- - * Copyright (c) 1997 Niklas Hallqvist. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Generic definitions for little- and big-endian systems. Other endianesses - * has to be dealt with in the specific machine/endian.h file for that port. - * - * This file is meant to be included from a little- or big-endian port's - * machine/endian.h after setting _BYTE_ORDER to either 1234 for little endian - * or 4321 for big.. - */ - -#ifndef _SYS_ENDIAN_H_ -#define _SYS_ENDIAN_H_ - -#define _LITTLE_ENDIAN 1234 -#define _BIG_ENDIAN 4321 -#define _PDP_ENDIAN 3412 -#define _BYTE_ORDER _LITTLE_ENDIAN - -#define LITTLE_ENDIAN _LITTLE_ENDIAN -#define BIG_ENDIAN _BIG_ENDIAN -#define PDP_ENDIAN _PDP_ENDIAN -#define BYTE_ORDER _BYTE_ORDER - -#define __BYTE_ORDER _BYTE_ORDER -#define __BIG_ENDIAN _BIG_ENDIAN -#define __LITTLE_ENDIAN _LITTLE_ENDIAN - -#endif /* _SYS_ENDIAN_H_ */ - diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/ieee.h b/sgx-jvm/linux-sgx/common/inc/tlibc/sys/ieee.h deleted file mode 100644 index 8370cd8295..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/ieee.h +++ /dev/null @@ -1,145 +0,0 @@ -/* $OpenBSD: ieee.h,v 1.2 2008/09/07 20:36:06 martynas Exp $ */ -/* $NetBSD: ieee.h,v 1.1 1996/09/30 16:34:25 ws Exp $ */ - -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Lawrence Berkeley Laboratory. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ieee.h 8.1 (Berkeley) 6/11/93 - */ - -/* - * ieee.h defines the machine-dependent layout of the machine's IEEE - * floating point. It does *not* define (yet?) any of the rounding - * mode bits, exceptions, and so forth. - */ - -/* - * Define the number of bits in each fraction and exponent. - * - * k k+1 - * Note that 1.0 x 2 == 0.1 x 2 and that denorms are represented - * - * (-exp_bias+1) - * as fractions that look like 0.fffff x 2 . This means that - * - * -126 - * the number 0.10000 x 2 , for instance, is the same as the normalized - * - * -127 -128 - * float 1.0 x 2 . Thus, to represent 2 , we need one leading zero - * - * -129 - * in the fraction; to represent 2 , we need two, and so on. This - * - * (-exp_bias-fracbits+1) - * implies that the smallest denormalized number is 2 - * - * for whichever format we are talking about: for single precision, for - * - * -126 -149 - * instance, we get .00000000000000000000001 x 2 , or 1.0 x 2 , and - * - * -149 == -127 - 23 + 1. - */ - -#include - -#define SNG_EXPBITS 8 -#define SNG_FRACBITS 23 - -#define DBL_EXPBITS 11 -#define DBL_FRACHBITS 20 -#define DBL_FRACLBITS 32 -#define DBL_FRACBITS 52 - -#define EXT_EXPBITS 15 -#define EXT_FRACHBITS 32 -#define EXT_FRACLBITS 32 -#define EXT_FRACBITS 64 - -#define EXT_TO_ARRAY32(p, a) do { \ - (a)[0] = (uint32_t)(p)->ext_fracl; \ - (a)[1] = (uint32_t)(p)->ext_frach; \ -} while(0) - -struct ieee_single { - u_int sng_frac:23; - u_int sng_exp:8; - u_int sng_sign:1; -}; - -struct ieee_double { - u_int dbl_fracl; - u_int dbl_frach:20; - u_int dbl_exp:11; - u_int dbl_sign:1; -}; - -struct ieee_ext { - u_int ext_fracl; - u_int ext_frach; - u_int ext_exp:15; - u_int ext_sign:1; - u_int ext_padl:16; - u_int ext_padh; -}; - -/* - * Floats whose exponent is in [1..INFNAN) (of whatever type) are - * `normal'. Floats whose exponent is INFNAN are either Inf or NaN. - * Floats whose exponent is zero are either zero (iff all fraction - * bits are zero) or subnormal values. - * - * A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its - * high fraction; if the bit is set, it is a `quiet NaN'. - */ -#define SNG_EXP_INFNAN 255 -#define DBL_EXP_INFNAN 2047 -#define EXT_EXP_INFNAN 32767 - -#if 0 -#define SNG_QUIETNAN (1 << 22) -#define DBL_QUIETNAN (1 << 19) -#define EXT_QUIETNAN (1 << 15) -#endif - -/* - * Exponent biases. - */ -#define SNG_EXP_BIAS 127 -#define DBL_EXP_BIAS 1023 -#define EXT_EXP_BIAS 16383 diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/limits.h b/sgx-jvm/linux-sgx/common/inc/tlibc/sys/limits.h deleted file mode 100644 index 3d1f9673ad..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/limits.h +++ /dev/null @@ -1,77 +0,0 @@ -/* $OpenBSD: limits.h,v 1.8 2009/11/27 19:54:35 guenther Exp $ */ -/* - * Copyright (c) 2002 Marc Espie. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD - * PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _SYS_LIMITS_H_ -#define _SYS_LIMITS_H_ - -#include - -/* Common definitions for limits.h. */ - -#define CHAR_BIT 8 /* number of bits in a char */ - -#define SCHAR_MAX 0x7f /* max value for a signed char */ -#define SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ - -#define UCHAR_MAX 0xff /* max value for an unsigned char */ -#ifdef __CHAR_UNSIGNED__ -# define CHAR_MIN 0 /* min value for a char */ -# define CHAR_MAX 0xff /* max value for a char */ -#else -# define CHAR_MAX 0x7f -# define CHAR_MIN (-0x7f-1) -#endif - -#define MB_LEN_MAX 1 /* Allow UTF-8 (RFC 3629) */ - -#define USHRT_MAX 0xffff /* max value for an unsigned short */ -#define SHRT_MAX 0x7fff /* max value for a short */ -#define SHRT_MIN (-0x7fff-1) /* min value for a short */ - -#define UINT_MAX 0xffffffffU /* max value for an unsigned int */ -#define INT_MAX 0x7fffffff /* max value for an int */ -#define INT_MIN (-0x7fffffff-1) /* min value for an int */ - -#ifdef __x86_64__ -# define ULONG_MAX 0xffffffffffffffffUL /* max value for unsigned long */ -# define LONG_MAX 0x7fffffffffffffffL /* max value for a signed long */ -# define LONG_MIN (-0x7fffffffffffffffL-1) /* min value for a signed long */ -#else -# define ULONG_MAX 0xffffffffUL /* max value for an unsigned long */ -# define LONG_MAX 0x7fffffffL /* max value for a long */ -# define LONG_MIN (-0x7fffffffL-1) /* min value for a long */ -#endif - -#define ULLONG_MAX 0xffffffffffffffffULL /* max value for unsigned long long */ -#define LLONG_MAX 0x7fffffffffffffffLL /* max value for a signed long long */ -#define LLONG_MIN (-0x7fffffffffffffffLL-1) /* min value for a signed long long */ - -#ifdef __x86_64__ -# define LONG_BIT 64 -#else -# define LONG_BIT 32 -#endif - -#endif /* !_SYS_LIMITS_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/stdint.h b/sgx-jvm/linux-sgx/common/inc/tlibc/sys/stdint.h deleted file mode 100644 index 7149079afc..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/stdint.h +++ /dev/null @@ -1,265 +0,0 @@ -/* $OpenBSD: stdint.h,v 1.4 2006/12/10 22:17:55 deraadt Exp $ */ - -/* - * Copyright (c) 1997, 2005 Todd C. Miller - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _SYS_STDINT_H_ -#define _SYS_STDINT_H_ - -#include -#include - -/* 7.18.1.1 Exact-width integer types (also in sys/types.h) */ -#ifndef _INT8_T_DEFINED_ -#define _INT8_T_DEFINED_ -typedef __int8_t int8_t; -#endif - -#ifndef _UINT8_T_DEFINED_ -#define _UINT8_T_DEFINED_ -typedef __uint8_t uint8_t; -#endif - -#ifndef _INT16_T_DEFINED_ -#define _INT16_T_DEFINED_ -typedef __int16_t int16_t; -#endif - -#ifndef _UINT16_T_DEFINED_ -#define _UINT16_T_DEFINED_ -typedef __uint16_t uint16_t; -#endif - -#ifndef _INT32_T_DEFINED_ -#define _INT32_T_DEFINED_ -typedef __int32_t int32_t; -#endif - -#ifndef _UINT32_T_DEFINED_ -#define _UINT32_T_DEFINED_ -typedef __uint32_t uint32_t; -#endif - -#ifndef _INT64_T_DEFINED_ -#define _INT64_T_DEFINED_ -typedef __int64_t int64_t; -#endif - -#ifndef _UINT64_T_DEFINED_ -#define _UINT64_T_DEFINED_ -typedef __uint64_t uint64_t; -#endif - -/* 7.18.1.2 Minimum-width integer types */ -typedef __int_least8_t int_least8_t; -typedef __uint_least8_t uint_least8_t; -typedef __int_least16_t int_least16_t; -typedef __uint_least16_t uint_least16_t; -typedef __int_least32_t int_least32_t; -typedef __uint_least32_t uint_least32_t; -typedef __int_least64_t int_least64_t; -typedef __uint_least64_t uint_least64_t; - -/* 7.18.1.3 Fastest minimum-width integer types */ -typedef __int_fast8_t int_fast8_t; -typedef __uint_fast8_t uint_fast8_t; -typedef __int_fast16_t int_fast16_t; -typedef __uint_fast16_t uint_fast16_t; -typedef __int_fast32_t int_fast32_t; -typedef __uint_fast32_t uint_fast32_t; -typedef __int_fast64_t int_fast64_t; -typedef __uint_fast64_t uint_fast64_t; - -/* 7.18.1.4 Integer types capable of holding object pointers */ -#ifndef _INTPTR_T_DEFINED_ -#define _INTPTR_T_DEFINED_ -typedef __intptr_t intptr_t; -#endif - -#ifndef _UINTPTR_T_DEFINED_ -#define _UINTPTR_T_DEFINED_ -typedef __uintptr_t uintptr_t; -#endif - -/* 7.18.1.5 Greatest-width integer types */ -typedef __intmax_t intmax_t; -typedef __uintmax_t uintmax_t; - -//#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) -/* - * 7.18.2 Limits of specified-width integer types. - * - * The following object-like macros specify the minimum and maximum limits - * of integer types corresponding to the typedef names defined above. - */ - -/* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MIN (-0x7f - 1) -#define INT16_MIN (-0x7fff - 1) -#define INT32_MIN (-0x7fffffff - 1) -#ifdef __x86_64__ -#define INT64_MIN (-0x7fffffffffffffffL - 1) -#else -#define INT64_MIN (-0x7fffffffffffffffLL - 1) -#endif - -#define INT8_MAX 0x7f -#define INT16_MAX 0x7fff -#define INT32_MAX 0x7fffffff -#ifdef __x86_64__ -#define INT64_MAX 0x7fffffffffffffffL -#else -#define INT64_MAX 0x7fffffffffffffffLL -#endif - -#define UINT8_MAX 0xff -#define UINT16_MAX 0xffff -#define UINT32_MAX 0xffffffffU -#ifdef __x86_64__ -#define UINT64_MAX 0xffffffffffffffffUL -#else -#define UINT64_MAX 0xffffffffffffffffULL -#endif - -/* 7.18.2.2 Limits of minimum-width integer types */ -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST64_MIN INT64_MIN - -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MAX INT64_MAX - -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -/* 7.18.2.3 Limits of fastest minimum-width integer types */ -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST64_MIN INT64_MIN - -#define INT_FAST8_MAX INT8_MAX -#ifdef __x86_64__ -#define INT_FAST16_MAX INT64_MAX -#define INT_FAST32_MAX INT64_MAX -#else -#define INT_FAST16_MAX INT32_MAX -#define INT_FAST32_MAX INT32_MAX -#endif -#define INT_FAST64_MAX INT64_MAX - -#define UINT_FAST8_MAX UINT8_MAX -#ifdef __x86_64__ -#define UINT_FAST16_MAX UINT64_MAX -#define UINT_FAST32_MAX UINT64_MAX -#else -#define UINT_FAST16_MAX UINT32_MAX -#define UINT_FAST32_MAX UINT32_MAX -#endif -#define UINT_FAST64_MAX UINT64_MAX - -/* 7.18.2.4 Limits of integer types capable of holding object pointers */ -#ifdef __x86_64__ -#define INTPTR_MIN INT64_MIN -#define INTPTR_MAX INT64_MAX -#define UINTPTR_MAX UINT64_MAX -#else -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#endif - -/* 7.18.2.5 Limits of greatest-width integer types */ -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -/* - * 7.18.3 Limits of other integer types. - * - * The following object-like macros specify the minimum and maximum limits - * of integer types corresponding to types specified in other standard - * header files. - */ - -/* Limits of ptrdiff_t */ -#define PTRDIFF_MIN INTPTR_MIN -#define PTRDIFF_MAX INTPTR_MAX - -/* Limits of size_t (also in limits.h) */ -#ifndef SIZE_MAX -#define SIZE_MAX UINTPTR_MAX -#endif - -/* Limits of wchar_t */ -#ifdef _TLIBC_WIN_ -# define WCHAR_MIN 0x0000 -# define WCHAR_MAX 0xffff -#else -# ifdef __WCHAR_MAX__ -# define WCHAR_MAX __WCHAR_MAX__ -# else -# define WCHAR_MAX (2147483647) -# endif -# ifdef __WCHAR_MIN__ -# define WCHAR_MIN __WCHAR_MIN__ -# elif L'\0' - 1 > 0 -# define WCHAR_MIN L'\0' -# else -# define WCHAR_MIN (-WCHAR_MAX - 1) -# endif -#endif - -/* Limits of wint_t */ -# define WINT_MIN (0u) -# define WINT_MAX (4294967295u) - -//#endif /* __cplusplus || __STDC_LIMIT_MACROS */ - -//#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) -/* - * 7.18.4 Macros for integer constants. - * - * The following function-like macros expand to integer constants - * suitable for initializing objects that have integer types corresponding - * to types defined in . The argument in any instance of - * these macros shall be a decimal, octal, or hexadecimal constant with - * a value that does not exceed the limits for the corresponding type. - */ - -/* 7.18.4.1 Macros for minimum-width integer constants. */ -#define INT8_C(_c) (_c) -#define INT16_C(_c) (_c) -#define INT32_C(_c) (_c) -#define INT64_C(_c) __CONCAT(_c, LL) - -#define UINT8_C(_c) (_c) -#define UINT16_C(_c) (_c) -#define UINT32_C(_c) __CONCAT(_c, U) -#define UINT64_C(_c) __CONCAT(_c, ULL) - -/* 7.18.4.2 Macros for greatest-width integer constants. */ -#define INTMAX_C(_c) __CONCAT(_c, LL) -#define UINTMAX_C(_c) __CONCAT(_c, ULL) - -//#endif /* __cplusplus || __STDC_CONSTANT_MACROS */ - -#endif /* _SYS_STDINT_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/types.h b/sgx-jvm/linux-sgx/common/inc/tlibc/sys/types.h deleted file mode 100644 index 474f3e93d9..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/sys/types.h +++ /dev/null @@ -1,128 +0,0 @@ -/* $OpenBSD: types.h,v 1.31 2008/03/16 19:42:57 otto Exp $ */ -/* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */ - -/*- - * Copyright (c) 1982, 1986, 1991, 1993 - * The Regents of the University of California. All rights reserved. - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)types.h 8.4 (Berkeley) 1/21/94 - */ - -#ifndef _SYS_TYPES_H_ -#define _SYS_TYPES_H_ - -#include -#include - -typedef unsigned char u_char; -typedef unsigned short u_short; -typedef unsigned int u_int; -typedef unsigned long u_long; - -typedef unsigned char unchar; /* Sys V compatibility */ -typedef unsigned short ushort; /* Sys V compatibility */ -typedef unsigned int uint; /* Sys V compatibility */ -typedef unsigned long ulong; /* Sys V compatibility */ - -#ifndef _INT8_T_DEFINED_ -#define _INT8_T_DEFINED_ -typedef __int8_t int8_t; -#endif - -#ifndef _UINT8_T_DEFINED_ -#define _UINT8_T_DEFINED_ -typedef __uint8_t uint8_t; -#endif - -#ifndef _INT16_T_DEFINED_ -#define _INT16_T_DEFINED_ -typedef __int16_t int16_t; -#endif - -#ifndef _UINT16_T_DEFINED_ -#define _UINT16_T_DEFINED_ -typedef __uint16_t uint16_t; -#endif - -#ifndef _INT32_T_DEFINED_ -#define _INT32_T_DEFINED_ -typedef __int32_t int32_t; -#endif - -#ifndef _UINT32_T_DEFINED_ -#define _UINT32_T_DEFINED_ -typedef __uint32_t uint32_t; -#endif - -#ifndef _INT64_T_DEFINED_ -#define _INT64_T_DEFINED_ -typedef __int64_t int64_t; -#endif - -#ifndef _UINT64_T_DEFINED_ -#define _UINT64_T_DEFINED_ -typedef __uint64_t uint64_t; -#endif - -#ifndef _INTPTR_T_DEFINED_ -#define _INTPTR_T_DEFINED_ -typedef __intptr_t intptr_t; -#endif - -#ifndef _UINTPTR_T_DEFINED_ -#define _UINTPTR_T_DEFINED_ -typedef __uintptr_t uintptr_t; -#endif - -/* BSD-style unsigned bits types */ -typedef __uint8_t u_int8_t; -typedef __uint16_t u_int16_t; -typedef __uint32_t u_int32_t; -typedef __uint64_t u_int64_t; - - -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef __size_t size_t; -#endif - -#ifndef _SSIZE_T_DEFINED_ -#define _SSIZE_T_DEFINED_ -typedef __ssize_t ssize_t; -#endif - -#ifndef _OFF_T_DEFINED_ -#define _OFF_T_DEFINED_ -typedef __off_t off_t; -#endif - -#endif /* !_SYS_TYPES_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/time.h b/sgx-jvm/linux-sgx/common/inc/tlibc/time.h deleted file mode 100644 index 3880d3e9ac..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/time.h +++ /dev/null @@ -1,104 +0,0 @@ -/* $OpenBSD: time.h,v 1.18 2006/01/06 18:53:04 millert Exp $ */ -/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */ - -/* - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. - * - * (c) UNIX System Laboratories, Inc. - * All or some portions of this file are derived from material licensed - * to the University of California by American Telephone and Telegraph - * Co. or Unix System Laboratories, Inc. and are reproduced herein with - * the permission of UNIX System Laboratories, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)time.h 5.12 (Berkeley) 3/9/91 - */ - -#ifndef _TIME_H_ -#define _TIME_H_ - -#include -#include - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#if !defined (_CLOCK_T_DEFINED_) && !defined (_CLOCK_T_DEFINED) -#define _CLOCK_T_DEFINED_ -#define _CLOCK_T_DEFINED -typedef __clock_t clock_t; -#endif - -#if !defined (_TIME_T_DEFINED_) && !defined (_TIME_T_DEFINED) -#define _TIME_T_DEFINED_ -#define _TIME_T_DEFINED -typedef __time_t time_t; -#endif - -#if !defined (_SIZE_T_DEFINED_) && !defined (_SIZE_T_DEFINED) -#define _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED -typedef __size_t size_t; -#endif - -#if !defined (_TM_DEFINED) -#define _TM_DEFINED -struct tm { - int tm_sec; /* seconds after the minute [0-60] */ - int tm_min; /* minutes after the hour [0-59] */ - int tm_hour; /* hours since midnight [0-23] */ - int tm_mday; /* day of the month [1-31] */ - int tm_mon; /* months since January [0-11] */ - int tm_year; /* years since 1900 */ - int tm_wday; /* days since Sunday [0-6] */ - int tm_yday; /* days since January 1 [0-365] */ - int tm_isdst; /* Daylight Saving Time flag */ - /* FIXME: naming issue exists on Fedora/Ubuntu */ - long tm_gmtoff; /* offset from UTC in seconds */ - char *tm_zone; /* timezone abbreviation */ -}; -#endif - -__BEGIN_DECLS - -double _TLIBC_CDECL_ difftime(time_t, time_t); -char * _TLIBC_CDECL_ asctime(const struct tm *); -size_t _TLIBC_CDECL_ strftime(char *, size_t, const char *, const struct tm *); - -/* - * Non-C99 - */ -char * _TLIBC_CDECL_ asctime_r(const struct tm *, char *); - -__END_DECLS - -#endif /* !_TIME_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/unistd.h b/sgx-jvm/linux-sgx/common/inc/tlibc/unistd.h deleted file mode 100644 index 2958a6ccc6..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/unistd.h +++ /dev/null @@ -1,59 +0,0 @@ -/* $OpenBSD: unistd.h,v 1.62 2008/06/25 14:58:54 millert Exp $ */ -/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ - -/*- - * Copyright (c) 1991 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)unistd.h 5.13 (Berkeley) 6/17/91 - */ - -#ifndef _UNISTD_H_ -#define _UNISTD_H_ - -#include -#include - -__BEGIN_DECLS - -void * _TLIBC_CDECL_ sbrk(intptr_t); - -/* - * Deprecated Non-C99. - */ -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execl, const char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execlp, const char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execle, const char *, const char *, ...); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execv, const char *, char * const *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execve, const char *, char * const *, char * const *); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, execvp, const char *, char * const *); - -//_TLIBC_DEPRECATED_FUNCTION_(pid_t _TLIBC_CDECL_, fork, void); /* no pid_t */ - -__END_DECLS - -#endif /* !_UNISTD_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/wchar.h b/sgx-jvm/linux-sgx/common/inc/tlibc/wchar.h deleted file mode 100644 index 4ca0b39f40..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/wchar.h +++ /dev/null @@ -1,139 +0,0 @@ -/* $OpenBSD: wchar.h,v 1.11 2010/07/24 09:58:39 guenther Exp $ */ -/* $NetBSD: wchar.h,v 1.16 2003/03/07 07:11:35 tshiozak Exp $ */ - -/*- - * Copyright (c)1999 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/*- - * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Julian Coleman. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _WCHAR_H_ -#define _WCHAR_H_ - -#include -#include -#include /* WCHAR_MAX/WCHAR_MIN */ - -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#if !defined(_WCHAR_T_DEFINED_) && !defined(__cplusplus) -#define _WCHAR_T_DEFINED_ -#ifndef __WCHAR_TYPE__ -#define __WCHAR_TYPE__ int -#endif -typedef __WCHAR_TYPE__ wchar_t; -#endif - -#ifndef _MBSTATE_T_DEFINED_ -#define _MBSTATE_T_DEFINED_ -typedef __mbstate_t mbstate_t; -#endif - -#ifndef _WINT_T_DEFINED_ -#define _WINT_T_DEFINED_ -typedef __wint_t wint_t; -#endif - -#ifndef _SIZE_T_DEFINED_ -#define _SIZE_T_DEFINED_ -typedef __size_t size_t; -#endif - -#ifndef WEOF -#define WEOF ((wint_t)-1) -#endif - -__BEGIN_DECLS - -wint_t _TLIBC_CDECL_ btowc(int); -int _TLIBC_CDECL_ wctob(wint_t); -size_t _TLIBC_CDECL_ mbrlen(const char *, size_t, mbstate_t *); -size_t _TLIBC_CDECL_ mbrtowc(wchar_t *, const char *, size_t, mbstate_t *); -int _TLIBC_CDECL_ mbsinit(const mbstate_t *); -size_t _TLIBC_CDECL_ mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *); -size_t _TLIBC_CDECL_ wcrtomb(char *, wchar_t, mbstate_t *); -wchar_t * _TLIBC_CDECL_ wcschr(const wchar_t *, wchar_t); -int _TLIBC_CDECL_ wcscmp(const wchar_t *, const wchar_t *); -int _TLIBC_CDECL_ wcscoll(const wchar_t *, const wchar_t *); -size_t _TLIBC_CDECL_ wcscspn(const wchar_t *, const wchar_t *); -size_t _TLIBC_CDECL_ wcslen(const wchar_t *); -wchar_t * _TLIBC_CDECL_ wcsncat(wchar_t *, const wchar_t *, size_t); -int _TLIBC_CDECL_ wcsncmp(const wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wcsncpy(wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wcspbrk(const wchar_t *, const wchar_t *); -wchar_t * _TLIBC_CDECL_ wcsrchr(const wchar_t *, wchar_t); -size_t _TLIBC_CDECL_ wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *); -size_t _TLIBC_CDECL_ wcsspn(const wchar_t *, const wchar_t *); -wchar_t * _TLIBC_CDECL_ wcsstr(const wchar_t *, const wchar_t *); -wchar_t * _TLIBC_CDECL_ wcstok(wchar_t *, const wchar_t *, wchar_t **); -size_t _TLIBC_CDECL_ wcsxfrm(wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wmemchr(const wchar_t *, wchar_t, size_t); -int _TLIBC_CDECL_ wmemcmp(const wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wmemcpy(wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wmemmove(wchar_t *, const wchar_t *, size_t); -wchar_t * _TLIBC_CDECL_ wmemset(wchar_t *, wchar_t, size_t); - -int _TLIBC_CDECL_ swprintf(wchar_t *, size_t, const wchar_t *, ...); -int _TLIBC_CDECL_ vswprintf(wchar_t *, size_t, const wchar_t *, __va_list); - -/* leagcy version of wcsstr */ -wchar_t * _TLIBC_CDECL_ wcswcs(const wchar_t *, const wchar_t *); - -__END_DECLS - -#endif /* !_WCHAR_H_ */ diff --git a/sgx-jvm/linux-sgx/common/inc/tlibc/wctype.h b/sgx-jvm/linux-sgx/common/inc/tlibc/wctype.h deleted file mode 100644 index 25466f15d1..0000000000 --- a/sgx-jvm/linux-sgx/common/inc/tlibc/wctype.h +++ /dev/null @@ -1,83 +0,0 @@ -/* $OpenBSD: wctype.h,v 1.5 2006/01/06 18:53:04 millert Exp $ */ -/* $NetBSD: wctype.h,v 1.5 2003/03/02 22:18:11 tshiozak Exp $ */ - -/*- - * Copyright (c)1999 Citrus Project, - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * citrus Id: wctype.h,v 1.4 2000/12/21 01:50:21 itojun Exp - */ - -#ifndef _WCTYPE_H_ -#define _WCTYPE_H_ - -#include -#include - -#ifndef _WINT_T_DEFINED_ -#define _WINT_T_DEFINED_ -typedef __wint_t wint_t; -#endif - -#ifndef _WCTRANS_T_DEFINED_ -#define _WCTRANS_T_DEFINED_ -typedef __wctrans_t wctrans_t; -#endif - -#ifndef _WCTYPE_T_DEFINED_ -#define _WCTYPE_T_DEFINED_ -typedef __wctype_t wctype_t; -#endif - -#ifndef WEOF -#define WEOF ((wint_t)-1) -#endif - -__BEGIN_DECLS - -/* - * Deprecated definitions. - */ -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswalnum, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswalpha, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswblank, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswcntrl, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswdigit, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswgraph, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswlower, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswprint, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswpunct, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswspace, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswupper, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswxdigit, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(int _TLIBC_CDECL_, iswctype, wint_t, wctype_t); -_TLIBC_DEPRECATED_FUNCTION_(wint_t _TLIBC_CDECL_, towctrans, wint_t, wctrans_t); -_TLIBC_DEPRECATED_FUNCTION_(wint_t _TLIBC_CDECL_, towlower, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(wint_t _TLIBC_CDECL_, towupper, wint_t); -_TLIBC_DEPRECATED_FUNCTION_(wctrans_t _TLIBC_CDECL_, wctrans, const char *); -_TLIBC_DEPRECATED_FUNCTION_(wctype_t _TLIBC_CDECL_, wctype, const char *); - -__END_DECLS - -#endif /* _WCTYPE_H_ */ diff --git a/sgx-jvm/linux-sgx/common/se_wrapper/Makefile b/sgx-jvm/linux-sgx/common/se_wrapper/Makefile deleted file mode 100644 index d1481ebd01..0000000000 --- a/sgx-jvm/linux-sgx/common/se_wrapper/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -include ../../buildenv.mk - -CFLAGS += -Werror -D_GNU_SOURCE -fPIC -CFLAGS += $(ADDED_INC) - -CPPFLAGS := -I$(COMMON_DIR)/inc/ \ - -I$(COMMON_DIR)/inc/internal - -OBJS := se_memory.o \ - se_thread.o \ - se_trace.o \ - se_event.o \ - se_rwlock.o \ - se_time.o \ - se_map.o - -LIBWRAPPER := libwrapper.a - -.PHONY: clean all -all: $(LIBWRAPPER) - -$(LIBWRAPPER): $(OBJS) - $(AR) rcs $@ $^ - -$(OBJS): %.o: $(COMMON_DIR)/src/%.c - $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@ - -.PHONY: clean -clean: - @$(RM) $(LIBWRAPPER) $(OBJS) diff --git a/sgx-jvm/linux-sgx/common/src/crypto_cmac_128.cpp b/sgx-jvm/linux-sgx/common/src/crypto_cmac_128.cpp deleted file mode 100644 index be8a52a4ea..0000000000 --- a/sgx-jvm/linux-sgx/common/src/crypto_cmac_128.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "crypto_wrapper.h" -#include -#include -#include -#include -#include - -sgx_status_t sgx_cmac128_msg(const sgx_key_128bit_t key, const uint8_t *p_src, unsigned int src_len, sgx_mac_t *p_mac) -{ - if(!key || !p_src || src_len == 0 || !p_mac) - { - return SGX_ERROR_INVALID_PARAMETER; - } - CMAC_CTX *cmac_ctx = NULL; - size_t mac_len; - - if(!(cmac_ctx = CMAC_CTX_new())) - { - return SGX_ERROR_OUT_OF_MEMORY; - } - if(!CMAC_Init(cmac_ctx, key, sizeof(sgx_key_128bit_t), EVP_aes_128_cbc(), NULL)) - { - CMAC_CTX_free(cmac_ctx); - return SGX_ERROR_UNEXPECTED; - } - if(!CMAC_Update(cmac_ctx, p_src, src_len)) - { - CMAC_CTX_free(cmac_ctx); - return SGX_ERROR_UNEXPECTED; - } - if(!CMAC_Final(cmac_ctx, (uint8_t *)p_mac, &mac_len)) - { - CMAC_CTX_free(cmac_ctx); - return SGX_ERROR_UNEXPECTED; - } - CMAC_CTX_free(cmac_ctx); - assert(mac_len == sizeof(sgx_mac_t)); - return SGX_SUCCESS; - -} diff --git a/sgx-jvm/linux-sgx/common/src/crypto_evp_digest.cpp b/sgx-jvm/linux-sgx/common/src/crypto_evp_digest.cpp deleted file mode 100644 index c38a01ee30..0000000000 --- a/sgx-jvm/linux-sgx/common/src/crypto_evp_digest.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include -#include "crypto_wrapper.h" - - -sgx_status_t sgx_EVP_Digest(const EVP_MD *type, const uint8_t *p_src, unsigned int src_len, uint8_t *digest, unsigned int *digest_len) -{ - if(!type || !p_src || src_len == 0 || !digest || digest_len == 0) - return SGX_ERROR_INVALID_PARAMETER; - - uint8_t tmp_digest[EVP_MAX_MD_SIZE]; - memset(tmp_digest, 0, EVP_MAX_MD_SIZE); - unsigned int tmp_digest_len; - - unsigned int digest_buf_len = *digest_len; - - EVP_MD_CTX *ctx; - if(NULL == (ctx = EVP_MD_CTX_create())) - return SGX_ERROR_OUT_OF_MEMORY; - - if(!EVP_DigestInit_ex(ctx, type, NULL)) - { - EVP_MD_CTX_destroy(ctx); - return SGX_ERROR_UNEXPECTED; - } - if(!EVP_DigestUpdate(ctx, p_src, src_len)) - { - EVP_MD_CTX_destroy(ctx); - return SGX_ERROR_UNEXPECTED; - } - if(!EVP_DigestFinal_ex(ctx, tmp_digest, &tmp_digest_len)) - { - EVP_MD_CTX_destroy(ctx); - return SGX_ERROR_UNEXPECTED; - } - EVP_MD_CTX_destroy(ctx); - - if(tmp_digest_len > digest_buf_len) - { - return SGX_ERROR_UNEXPECTED; - } - if(memcpy_s(digest, digest_buf_len, tmp_digest, tmp_digest_len)) - return SGX_ERROR_UNEXPECTED; - - *digest_len = tmp_digest_len; - return SGX_SUCCESS; -} diff --git a/sgx-jvm/linux-sgx/common/src/dh.cpp b/sgx-jvm/linux-sgx/common/src/dh.cpp deleted file mode 100644 index 72079de936..0000000000 --- a/sgx-jvm/linux-sgx/common/src/dh.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/** -* File: -* dh.cpp -*Description: -* Encrypt and decrypt messages over DH session -*/ -#include "dh.h" -#include "sgx_tcrypto.h" - -bool encrypt_msg(pse_message_t* pse_msg, uint8_t* data, sgx_key_128bit_t* authenticated_encryption_key) -{ - /* get random IV */ - if(sgx_read_rand(pse_msg->payload_iv, PAYLOAD_IV_SIZE) != SGX_SUCCESS) - { - return false; - } - - return (SGX_SUCCESS == sgx_rijndael128GCM_encrypt( - authenticated_encryption_key, - data, - pse_msg->payload_size, - reinterpret_cast(&(pse_msg->payload)), - reinterpret_cast(&(pse_msg->payload_iv)), - 12, - NULL, - 0, - &pse_msg->payload_tag - )); -} - -bool decrypt_msg(pse_message_t* pse_msg, uint8_t* data, sgx_key_128bit_t* authenticated_encryption_key) -{ - return(SGX_SUCCESS == sgx_rijndael128GCM_decrypt( - authenticated_encryption_key, - pse_msg->payload, - pse_msg->payload_size, - data, - reinterpret_cast(&(pse_msg->payload_iv)), - 12, - NULL, - 0, - &pse_msg->payload_tag - )); -} - diff --git a/sgx-jvm/linux-sgx/common/src/ecp.cpp b/sgx-jvm/linux-sgx/common/src/ecp.cpp deleted file mode 100644 index c542106b85..0000000000 --- a/sgx-jvm/linux-sgx/common/src/ecp.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "sgx_ecp_types.h" -#include "ecp_interface.h" -#include "stdlib.h" -#include "string.h" - -#ifndef ERROR_BREAK -#define ERROR_BREAK(x) if(x != ippStsNoErr){break;} -#endif -#ifndef NULL_BREAK -#define NULL_BREAK(x) if(!x){break;} -#endif -#ifndef SAFE_FREE -#define SAFE_FREE(ptr) {if (NULL != (ptr)) {free(ptr); (ptr)=NULL;}} -#endif - -#define MAC_KEY_SIZE 16 - -#define EC_DERIVATION_BUFFER_SIZE(label_length) ((label_length) +4) - -sgx_status_t derive_key( - const sgx_ec256_dh_shared_t* shared_key, - const char* label, - uint32_t label_length, - sgx_ec_key_128bit_t* derived_key) -{ - sgx_status_t se_ret = SGX_SUCCESS; - uint8_t cmac_key[MAC_KEY_SIZE]; - sgx_ec_key_128bit_t key_derive_key; - if (!shared_key || !derived_key || !label) - { - return SGX_ERROR_INVALID_PARAMETER; - } - - /*check integer overflow */ - if (label_length > EC_DERIVATION_BUFFER_SIZE(label_length)) - { - return SGX_ERROR_INVALID_PARAMETER; - } - - memset(cmac_key, 0, MAC_KEY_SIZE); - se_ret = sgx_rijndael128_cmac_msg((sgx_cmac_128bit_key_t *)cmac_key, - (uint8_t*)shared_key, - sizeof(sgx_ec256_dh_shared_t), - (sgx_cmac_128bit_tag_t *)&key_derive_key); - if (SGX_SUCCESS != se_ret) - { - memset_s(&key_derive_key, sizeof(key_derive_key), 0, sizeof(key_derive_key)); - INTERNAL_SGX_ERROR_CODE_CONVERTOR(se_ret); - return se_ret; - } - /* derivation_buffer = counter(0x01) || label || 0x00 || output_key_len(0x0080) */ - uint32_t derivation_buffer_length = EC_DERIVATION_BUFFER_SIZE(label_length); - uint8_t *p_derivation_buffer = (uint8_t *)malloc(derivation_buffer_length); - if (p_derivation_buffer == NULL) - { - return SGX_ERROR_OUT_OF_MEMORY; - } - memset(p_derivation_buffer, 0, derivation_buffer_length); - - /*counter = 0x01 */ - p_derivation_buffer[0] = 0x01; - /*label*/ - memcpy(&p_derivation_buffer[1], label, label_length); - /*output_key_len=0x0080*/ - uint16_t *key_len = (uint16_t *)&p_derivation_buffer[derivation_buffer_length - 2]; - *key_len = 0x0080; - - se_ret = sgx_rijndael128_cmac_msg((sgx_cmac_128bit_key_t *)&key_derive_key, - p_derivation_buffer, - derivation_buffer_length, - (sgx_cmac_128bit_tag_t *)derived_key); - memset_s(&key_derive_key, sizeof(key_derive_key), 0, sizeof(key_derive_key)); - free(p_derivation_buffer); - if(SGX_SUCCESS != se_ret) - { - INTERNAL_SGX_ERROR_CODE_CONVERTOR(se_ret); - } - return se_ret; -} diff --git a/sgx-jvm/linux-sgx/common/src/ipp_bn.cpp b/sgx-jvm/linux-sgx/common/src/ipp_bn.cpp deleted file mode 100644 index 853b23c73e..0000000000 --- a/sgx-jvm/linux-sgx/common/src/ipp_bn.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/** -* File: -* ipp_bn.cpp -*Description: -* Wrappers for Big number generation and free functions -* -*/ - - - -#include "ipp_wrapper.h" - -#include -#include - -#ifndef _TLIBC_CDECL_ -extern "C" int memset_s(void *s, size_t smax, int c, size_t n); -#endif - -extern "C" IppStatus - newBN(const Ipp32u *data, int size_in_bytes, IppsBigNumState **p_new_BN) -{ - IppsBigNumState *pBN=0; - int bn_size = 0; - - if(p_new_BN == NULL || size_in_bytes <= 0 || size_in_bytes % sizeof(Ipp32u)) - return ippStsBadArgErr; - - /* Get the size of the IppsBigNumState context in bytes */ - IppStatus error_code = ippsBigNumGetSize(size_in_bytes/(int)sizeof(Ipp32u), &bn_size); - if(error_code != ippStsNoErr) - { - *p_new_BN = 0; - return error_code; - } - pBN = (IppsBigNumState *) malloc(bn_size); - if(!pBN) - { - error_code = ippStsMemAllocErr; - *p_new_BN = 0; - return error_code; - } - /* Initializes context and partitions allocated buffer */ - error_code = ippsBigNumInit(size_in_bytes/(int)sizeof(Ipp32u), pBN); - if(error_code != ippStsNoErr) - { - SAFE_FREE_MM(pBN); - *p_new_BN = 0; - return error_code; - } - if(data) - { - error_code = ippsSet_BN(IppsBigNumPOS, size_in_bytes/(int)sizeof(Ipp32u), data, pBN); - if(error_code != ippStsNoErr) - { - SAFE_FREE_MM(pBN); - *p_new_BN = 0; - return error_code; - } - } - *p_new_BN = pBN; - return error_code; - -} - - -extern "C" void secure_free_BN(IppsBigNumState *pBN, int size_in_bytes) -{ - if(pBN == NULL || size_in_bytes <= 0 || size_in_bytes % sizeof(Ipp32u)) - { - if(pBN) - { - free(pBN); - } - return; - } - - int bn_size = 0; - - /* Get the size of the IppsBigNumState context in bytes - * Since we have checked the size_in_bytes before and the &bn_size is not NULL, - * ippsBigNumGetSize never returns failure - */ - if(ippsBigNumGetSize(size_in_bytes/(int)sizeof(Ipp32u), &bn_size) != ippStsNoErr) - { - free(pBN); - return; - } - /* Clear the buffer before free. */ - memset_s(pBN, bn_size, 0, bn_size); - free(pBN); - return; -} diff --git a/sgx-jvm/linux-sgx/common/src/ipp_rsa_key.cpp b/sgx-jvm/linux-sgx/common/src/ipp_rsa_key.cpp deleted file mode 100644 index acf0ecee60..0000000000 --- a/sgx-jvm/linux-sgx/common/src/ipp_rsa_key.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/** -* File: -* ipp_rsa_key.cpp -*Description: -* Wrapper for rsa key operation functions (public key generation and free excluded) -* -*/ - -#include "ipp_wrapper.h" -#include "util.h" - -#include -#include -#include -#include - -extern "C" int memset_s(void *s, size_t smax, int c, size_t n); - -static IppStatus newPRNG(IppsPRNGState **pRandGen) -{ - if(pRandGen == NULL) - return ippStsBadArgErr; - int ctxSize = 0; - IppStatus error_code = ippsPRNGGetSize(&ctxSize); - if(error_code != ippStsNoErr) - return error_code; - IppsPRNGState* pCtx = (IppsPRNGState *) malloc(ctxSize); - if(pCtx == NULL) - return ippStsMemAllocErr; - - error_code = ippsPRNGInit(160, pCtx); - if(error_code != ippStsNoErr) - { - free(pCtx); - return error_code; - } - - *pRandGen = pCtx; - return error_code; -} - -static IppStatus newPrimeGen(int nMaxBits, IppsPrimeState ** pPrimeG) -{ - if(pPrimeG == NULL || nMaxBits <= 0 ) - return ippStsBadArgErr; - int ctxSize = 0; - IppStatus error_code = ippsPrimeGetSize(nMaxBits, &ctxSize); - if(error_code != ippStsNoErr) - return error_code; - IppsPrimeState* pCtx = (IppsPrimeState *) malloc(ctxSize); - if(pCtx == NULL) - return ippStsMemAllocErr; - - error_code = ippsPrimeInit(nMaxBits, pCtx); - if(error_code != ippStsNoErr) - { - free(pCtx); - return error_code; - } - - *pPrimeG = pCtx; - return error_code; -} - - -extern "C" IppStatus create_rsa_priv2_key(int p_byte_size, const Ipp32u *p, const Ipp32u *q, - const Ipp32u *dmp1, const Ipp32u *dmq1, const Ipp32u *iqmp, - IppsRSAPrivateKeyState **new_pri_key2) -{ - IppsRSAPrivateKeyState *p_rsa2 = NULL; - IppsBigNumState *p_p = NULL, *p_q = NULL, *p_dmp1 = NULL, *p_dmq1 = NULL, *p_iqmp = NULL; - int rsa2_size = 0; - - if(p_byte_size <= 0 || p == NULL || q == NULL || dmp1 == NULL || dmq1 == NULL || iqmp == NULL || new_pri_key2 == NULL) - { - return ippStsBadArgErr; - } - - IppStatus error_code = ippStsNoErr; - do{ - error_code = newBN(p, p_byte_size, &p_p); - ERROR_BREAK(error_code); - error_code = newBN(q, p_byte_size, &p_q); - ERROR_BREAK(error_code); - error_code = newBN(dmp1, p_byte_size, &p_dmp1); - ERROR_BREAK(error_code); - error_code = newBN(dmq1, p_byte_size, &p_dmq1); - ERROR_BREAK(error_code); - error_code = newBN(iqmp, p_byte_size, &p_iqmp); - ERROR_BREAK(error_code); - error_code = ippsRSA_GetSizePrivateKeyType2(p_byte_size * 8, p_byte_size * 8, &rsa2_size); - ERROR_BREAK(error_code); - p_rsa2 = (IppsRSAPrivateKeyState *)malloc(rsa2_size); - NULL_BREAK(p_rsa2); - - error_code = ippsRSA_InitPrivateKeyType2(p_byte_size * 8, p_byte_size * 8, p_rsa2, rsa2_size); - ERROR_BREAK(error_code); - error_code = ippsRSA_SetPrivateKeyType2(p_p, p_q, p_dmp1, p_dmq1, p_iqmp, p_rsa2); - ERROR_BREAK(error_code); - }while(0); - - secure_free_BN(p_p, p_byte_size); - secure_free_BN(p_q, p_byte_size); - secure_free_BN(p_dmp1, p_byte_size); - secure_free_BN(p_dmq1, p_byte_size); - secure_free_BN(p_iqmp, p_byte_size); - - if(error_code != ippStsNoErr || p_rsa2 == NULL) - { - if(error_code == ippStsNoErr ) - error_code = ippStsMemAllocErr; - - /* Clear sensitive data before free */ - secure_free_rsa_pri2_key(p_byte_size, p_rsa2); - return error_code; - } - - *new_pri_key2 = p_rsa2; - return error_code; -} - -extern "C" IppStatus create_rsa_priv1_key(int n_byte_size, int d_byte_size, const Ipp32u *n, const Ipp32u *d, IppsRSAPrivateKeyState **new_pri_key1) -{ - IppsRSAPrivateKeyState *p_rsa1 = NULL; - IppsBigNumState *p_n = NULL, *p_d = NULL; - int rsa1_size = 0; - if(n_byte_size <= 0 || d_byte_size <= 0 || n == NULL || d == NULL || new_pri_key1 == NULL) - { - return ippStsBadArgErr; - } - IppStatus error_code = ippStsNoErr; - do{ - error_code = newBN(n, n_byte_size, &p_n); - ERROR_BREAK(error_code); - error_code = newBN(d, d_byte_size, &p_d); - ERROR_BREAK(error_code); - - error_code = ippsRSA_GetSizePrivateKeyType1(n_byte_size * 8, d_byte_size * 8, &rsa1_size); - ERROR_BREAK(error_code); - p_rsa1 = (IppsRSAPrivateKeyState *)malloc(rsa1_size); - NULL_BREAK(p_rsa1); - error_code = ippsRSA_InitPrivateKeyType1(n_byte_size * 8, d_byte_size * 8, p_rsa1, rsa1_size); - ERROR_BREAK(error_code); - error_code = ippsRSA_SetPrivateKeyType1(p_n, p_d, p_rsa1); - ERROR_BREAK(error_code); - }while(0); - secure_free_BN(p_n, n_byte_size); - secure_free_BN(p_d, d_byte_size); - if(error_code != ippStsNoErr || p_rsa1 == NULL) - { - if(error_code == ippStsNoErr ) - error_code = ippStsMemAllocErr; - - /* Clear sensitive data before free */ - secure_free_rsa_pri1_key(n_byte_size, d_byte_size, p_rsa1); - return error_code; - } - - *new_pri_key1 = p_rsa1; - return error_code; -} - - -extern "C" IppStatus create_validate_rsa_key_pair(int n_byte_size, int e_byte_size, const Ipp32u *n, const Ipp32u *d, const Ipp32u *e, const Ipp32u *p, const Ipp32u *q, - const Ipp32u *dmp1, const Ipp32u *dmq1, const Ipp32u *iqmp, - IppsRSAPrivateKeyState **new_pri_key, IppsRSAPublicKeyState **new_pub_key, int *validate_result) -{ - if(n_byte_size <= 0 || e_byte_size <= 0 || n == NULL || d == NULL || e == NULL || - p == NULL || q == NULL || dmp1 == NULL || dmq1 == NULL || iqmp == NULL || new_pri_key == NULL || - new_pub_key == NULL || validate_result == NULL) - { - return ippStsBadArgErr; - } - IppsRSAPrivateKeyState *p_pri_key1 = NULL, *p_pri_key2 = NULL; - IppsRSAPublicKeyState *p_pub_key = NULL; - IppStatus error_code = ippStsNoErr; - IppsPRNGState *p_rand = NULL; - IppsPrimeState *p_prime = NULL; - Ipp8u * scratch_buffer = NULL; - int result = IPP_IS_VALID; - int max_size = 0, pri1_size = 0, pri2_size = 0, pub_size = 0; - - do - { - /* Generate the pri_key1, pri_key2 and pub_key */ - error_code = create_rsa_priv1_key(n_byte_size, n_byte_size, n, d, &p_pri_key1); - ERROR_BREAK(error_code); - error_code = create_rsa_priv2_key(n_byte_size/2, p, q, dmp1, dmq1, iqmp, &p_pri_key2); - ERROR_BREAK(error_code); - error_code = create_rsa_pub_key(n_byte_size, e_byte_size, n, e, &p_pub_key); - ERROR_BREAK(error_code); - - /* Generate random state and prime state */ - error_code = newPRNG(&p_rand); - ERROR_BREAK(error_code); - error_code = newPrimeGen(n_byte_size * 8 / 2, &p_prime); - ERROR_BREAK(error_code); - - /* Allocate scratch buffer */ - error_code = ippsRSA_GetBufferSizePrivateKey(&pri1_size, p_pri_key1); - ERROR_BREAK(error_code); - error_code = ippsRSA_GetBufferSizePrivateKey(&pri2_size, p_pri_key2); - ERROR_BREAK(error_code); - max_size = MAX(pri1_size, pri2_size); - error_code = ippsRSA_GetBufferSizePublicKey(&pub_size, p_pub_key); - ERROR_BREAK(error_code); - max_size = MAX(max_size, pub_size); - scratch_buffer = (Ipp8u *)malloc(max_size); - NULL_BREAK(scratch_buffer); - memset(scratch_buffer, 0, max_size); - - /* Validate keys */ - error_code = ippsRSA_ValidateKeys(&result, p_pub_key, p_pri_key2, p_pri_key1, scratch_buffer, 10, p_prime, ippsPRNGen, p_rand); - ERROR_BREAK(error_code); - }while(0); - SAFE_FREE_MM(p_rand); - SAFE_FREE_MM(p_prime); - secure_free_rsa_pri2_key(n_byte_size/2, p_pri_key2); - - if(error_code != ippStsNoErr || scratch_buffer == NULL) - { - if(error_code == ippStsNoErr) - error_code = ippStsMemAllocErr; - - SAFE_FREE_MM(scratch_buffer); - secure_free_rsa_pri1_key(n_byte_size, n_byte_size, p_pri_key1); - secure_free_rsa_pub_key(n_byte_size, e_byte_size, p_pub_key); - return error_code; - } - SAFE_FREE_MM(scratch_buffer); - *new_pri_key = p_pri_key1; - *new_pub_key = p_pub_key; - *validate_result = result; - return error_code; -} - -extern "C" IppStatus get_pub_key(const IppsRSAPublicKeyState *pub_key, int *e_byte_size, Ipp32u *e, int *n_byte_size, Ipp32u *n) -{ - IppStatus error_code = ippStsNoErr; - IppsBigNumState *p_n=NULL, *p_e=NULL; - - if(!pub_key || !e_byte_size || !e || !n_byte_size || !n) - { - return ippStsBadArgErr; - } - do - { - error_code = newBN(NULL, SE_KEY_SIZE, &p_n); - ERROR_BREAK(error_code); - error_code = newBN(NULL, sizeof(Ipp32u), &p_e); - ERROR_BREAK(error_code); - - error_code = ippsRSA_GetPublicKey(p_n, p_e, pub_key); - ERROR_BREAK(error_code); - - IppsBigNumSGN sgn = IppsBigNumPOS; - Ipp32u *pdata = NULL; - int length_in_bit = 0; - - - error_code = ippsRef_BN(&sgn, &length_in_bit, &pdata, p_n); - ERROR_BREAK(error_code); - *n_byte_size = ROUND_TO(length_in_bit, 8)/8; - memset(n, 0, *n_byte_size); - memcpy(n, pdata, ROUND_TO(length_in_bit, 8)/8); - - error_code = ippsRef_BN(&sgn, &length_in_bit, &pdata, p_e); - ERROR_BREAK(error_code); - *e_byte_size = ROUND_TO(length_in_bit, 8)/8; - memset(e, 0, *e_byte_size); - memcpy(e, pdata, ROUND_TO(length_in_bit, 8)/8); - } while(0); - - secure_free_BN(p_n, SE_KEY_SIZE); - secure_free_BN(p_e, sizeof(Ipp32u)); - return error_code; -} - -extern "C" void secure_free_rsa_pri1_key(int n_byte_size, int d_byte_size, IppsRSAPrivateKeyState *pri_key1) -{ - if(n_byte_size <= 0 || d_byte_size <= 0 || pri_key1 == NULL) - { - if(pri_key1) - free(pri_key1); - return; - } - - int rsa1_size = 0; - if(ippsRSA_GetSizePrivateKeyType1(n_byte_size * 8, d_byte_size * 8, &rsa1_size) != ippStsNoErr) - { - free(pri_key1); - return; - } - /* Clear the buffer before free. */ - memset_s(pri_key1, rsa1_size, 0, rsa1_size); - free(pri_key1); - return; -} - -extern "C" void secure_free_rsa_pri2_key(int p_byte_size, IppsRSAPrivateKeyState *pri_key2) -{ - if(p_byte_size <= 0 || pri_key2 == NULL) - { - if(pri_key2) - free(pri_key2); - return; - } - - int rsa2_size = 0; - if(ippsRSA_GetSizePrivateKeyType2(p_byte_size * 8, p_byte_size * 8, &rsa2_size) != ippStsNoErr) - { - free(pri_key2); - return; - } - /* Clear the buffer before free. */ - memset_s(pri_key2, rsa2_size, 0, rsa2_size); - free(pri_key2); - return; -} diff --git a/sgx-jvm/linux-sgx/common/src/ipp_rsa_pub_key.cpp b/sgx-jvm/linux-sgx/common/src/ipp_rsa_pub_key.cpp deleted file mode 100644 index a7cc4ae69a..0000000000 --- a/sgx-jvm/linux-sgx/common/src/ipp_rsa_pub_key.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/** -* File: -* ipp_rsa_pub_key.cpp -*Description: -* Wrapper for rsa public key generation and free -* -*/ - -#include "ipp_wrapper.h" - -#include -#include - -#ifndef _TLIBC_CDECL_ -extern "C" int memset_s(void *s, size_t smax, int c, size_t n); -#endif - -extern "C" IppStatus create_rsa_pub_key(int n_byte_size, int e_byte_size, const Ipp32u *n, const Ipp32u *e, IppsRSAPublicKeyState **new_pub_key) -{ - IppsRSAPublicKeyState *p_pub_key = NULL; - IppsBigNumState *p_n = NULL, *p_e = NULL; - int rsa_size = 0; - if(n_byte_size <= 0 || e_byte_size <= 0 || n == NULL || e == NULL || new_pub_key == NULL) - { - return ippStsBadArgErr; - } - - IppStatus error_code = ippStsNoErr; - do{ - error_code = newBN(n, n_byte_size, &p_n); - ERROR_BREAK(error_code); - error_code = newBN(e, e_byte_size, &p_e); - ERROR_BREAK(error_code); - - error_code = ippsRSA_GetSizePublicKey(n_byte_size * 8, e_byte_size * 8, &rsa_size); - ERROR_BREAK(error_code); - p_pub_key = (IppsRSAPublicKeyState *)malloc(rsa_size); - NULL_BREAK(p_pub_key); - error_code = ippsRSA_InitPublicKey(n_byte_size * 8, e_byte_size * 8, p_pub_key, rsa_size); - ERROR_BREAK(error_code); - error_code = ippsRSA_SetPublicKey(p_n, p_e, p_pub_key); - ERROR_BREAK(error_code); - }while(0); - secure_free_BN(p_n, n_byte_size); - secure_free_BN(p_e, e_byte_size); - if(error_code != ippStsNoErr || p_pub_key == NULL) - { - if(error_code == ippStsNoErr ) - error_code = ippStsMemAllocErr; - - secure_free_rsa_pub_key(n_byte_size, e_byte_size, p_pub_key); - return error_code; - } - - *new_pub_key = p_pub_key; - return error_code; - -} - -extern "C" void secure_free_rsa_pub_key(int n_byte_size, int e_byte_size, IppsRSAPublicKeyState *pub_key) -{ - if(n_byte_size <= 0 || e_byte_size <= 0 || pub_key == NULL) - { - if(pub_key) - free(pub_key); - return; - } - int rsa_size = 0; - if(ippsRSA_GetSizePublicKey(n_byte_size * 8, e_byte_size * 8, &rsa_size) != ippStsNoErr) - { - free(pub_key); - return; - } - /* Clear the buffer before free. */ - memset_s(pub_key, rsa_size, 0, rsa_size); - free(pub_key); - return; -} diff --git a/sgx-jvm/linux-sgx/common/src/linux/xsave_gnu.S b/sgx-jvm/linux-sgx/common/src/linux/xsave_gnu.S deleted file mode 100644 index 364e1d3e8a..0000000000 --- a/sgx-jvm/linux-sgx/common/src/linux/xsave_gnu.S +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -.file "xsave_gnu.S" - -#include "linux/linux-regs.h" - -.macro DO_XSAVEC -#if defined(LINUX64) - .byte 0x48, 0x0f, 0xc7, 0x21 -#else - .byte 0x0f, 0xc7, 0x21 -#endif -.endm -.macro DO_XRSTOR -#if defined(LINUX64) - .byte 0x48, 0x0f, 0xae, 0x29 -#else - .byte 0x0f, 0xae, 0x29 -#endif -.endm -.macro DO_FXSAVE -#if defined(LINUX64) - .byte 0x48, 0x0f, 0xae, 0x01 -#else - .byte 0x0f, 0xae, 0x01 -#endif -.endm -.macro DO_FXRSTOR -#if defined(LINUX64) - .byte 0x48, 0x0f, 0xae, 0x09 -#else - .byte 0x0f, 0xae, 0x09 -#endif -.endm - -.text -DECLARE_LOCAL_FUNC restore_xregs -#if defined(LINUX32) - mov SE_WORDSIZE(%esp), %ecx - lea g_xsave_enabled, %eax -#else - mov %rdi, %rcx - mov g_xsave_enabled@GOTPCREL(%rip), %rax -#endif - movl (%xax), %eax - cmpl $0, %eax - jz 1f - xor %xax, %xax - xor %xdx, %xdx - mov $0xFFFFFFFF, %eax - mov $0xFFFFFFFF, %edx - DO_XRSTOR - jmp 2f -1: - DO_FXRSTOR -2: - ret - -DECLARE_LOCAL_FUNC save_xregs -#if defined(LINUX32) - mov SE_WORDSIZE(%esp), %ecx - lea g_xsave_enabled, %eax -#else - mov %rdi, %rcx - mov g_xsave_enabled@GOTPCREL(%rip), %rax -#endif - fwait - movl (%xax), %eax - cmpl $0, %eax - jz 1f - xor %xax, %xax - xor %xdx, %xdx - mov $0xFFFFFFFF, %eax - mov $0xFFFFFFFF, %edx - DO_XSAVEC - jmp 2f -1: - DO_FXSAVE -2: - ret - diff --git a/sgx-jvm/linux-sgx/common/src/se_event.c b/sgx-jvm/linux-sgx/common/src/se_event.c deleted file mode 100644 index 290c06b50c..0000000000 --- a/sgx-jvm/linux-sgx/common/src/se_event.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "se_event.h" - -#include - -se_handle_t se_event_init(void) -{ - return calloc(1, sizeof(int)); -} - -void se_event_destroy(se_handle_t se_event) -{ - if (se_event != NULL) - free(se_event); -} - -int se_event_wait(se_handle_t se_event) -{ - if (se_event == NULL) - return SE_MUTEX_INVALID; - - if (__sync_fetch_and_add((int*)se_event, -1) == 0) - syscall(__NR_futex, se_event, FUTEX_WAIT, -1, NULL, NULL, 0); - - return SE_MUTEX_SUCCESS; -} - -int se_event_wake(se_handle_t se_event) -{ - if (se_event == NULL) - return SE_MUTEX_INVALID; - - if (__sync_fetch_and_add((int*)se_event, 1) != 0) - syscall(__NR_futex, se_event, FUTEX_WAKE, 1, NULL, NULL, 0); - - return SE_MUTEX_SUCCESS; -} diff --git a/sgx-jvm/linux-sgx/common/src/se_map.c b/sgx-jvm/linux-sgx/common/src/se_map.c deleted file mode 100644 index 4041bd11ca..0000000000 --- a/sgx-jvm/linux-sgx/common/src/se_map.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include "se_map.h" -#include "se_trace.h" -#include - -map_handle_t* map_file(se_file_handle_t fd, uint32_t *size) -{ - struct stat st; - memset(&st, 0, sizeof(st)); - if (-1 == fstat(fd, &st)) - return NULL; - - map_handle_t* mh = (map_handle_t *)calloc(1, sizeof(map_handle_t)); - if (mh == NULL) - return NULL; - - mh->base_addr = (uint8_t *)mmap(NULL, (size_t)st.st_size, - PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0); - if(MAP_FAILED == mh->base_addr) - { - free(mh); - SE_TRACE(SE_TRACE_WARNING, "Couldn't map view of file, error code %x\n", errno); - return NULL; - } - - mh->length = (size_t)st.st_size; - if (size) *size = (uint32_t)st.st_size; - return mh; -} - -void unmap_file(map_handle_t* mh) -{ - munmap(mh->base_addr, mh->length); - free(mh); -} - - diff --git a/sgx-jvm/linux-sgx/common/src/se_memory.c b/sgx-jvm/linux-sgx/common/src/se_memory.c deleted file mode 100644 index afc447c010..0000000000 --- a/sgx-jvm/linux-sgx/common/src/se_memory.c +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - - -#include "se_memory.h" -#include "se_trace.h" -#include "util.h" - -void* se_virtual_alloc(void* address, size_t size, uint32_t type) -{ - UNUSED(type); - void* pRet = mmap(address, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); - if(MAP_FAILED == pRet) - return NULL; - return pRet; -} - -int se_virtual_free(void* address, size_t size, uint32_t type) -{ - UNUSED(type); - - return !(munmap(address, size)); - -} - -int se_virtual_lock(void* address, size_t size) -{ - return !mlock(address, size); -} - -static unsigned int get_prot(uint64_t flags) -{ - if ((flags & SI_FLAG_PT_MASK) == SI_FLAG_TCS) - return PROT_READ|PROT_WRITE|PROT_EXEC; - - switch (flags & (SI_FLAG_R | SI_FLAG_W | SI_FLAG_X)) - { - case SI_FLAG_X: return PROT_EXEC; break; - case SI_FLAG_R | SI_FLAG_X: return PROT_READ|PROT_EXEC; break; - case SI_FLAG_R | SI_FLAG_W | SI_FLAG_X: return PROT_READ|PROT_WRITE|PROT_EXEC; break; - case SI_FLAG_R: return PROT_READ; break; - case SI_FLAG_R | SI_FLAG_W: return PROT_READ|PROT_WRITE; break; - /* This covers no access, W and WX */ - default: return PROT_NONE; break; - } - -} -int se_virtual_protect(void* address, size_t size, uint32_t prot) -{ - return !mprotect(address, size, (int)get_prot(prot)); -} - -se_proc_t get_self_proc() -{ - return getpid(); -} - -int put_self_proc(se_proc_t proc) -{ - UNUSED(proc); - return 1; -} - -int se_read_process_mem(se_proc_t proc, void* base_addr, void* buffer, size_t size, size_t* read_nr) -{ - char filename[64]; - int fd = -1; - int ret = FALSE; - ssize_t len = 0; - off64_t offset = (off64_t)(size_t) base_addr; - - snprintf (filename, 64, "/proc/%d/mem", (int)proc); - fd = open(filename, O_RDONLY | O_LARGEFILE); - if(fd == -1) - return FALSE; - - if(lseek64(fd, offset, SEEK_SET) == -1) - { - goto out; - } - if((len = read(fd, buffer, size)) < 0) - { - goto out; - } - else if(read_nr) - *read_nr = (size_t)len; /* len is a non-negative number */ - - ret = TRUE; - -out: - close (fd); - return ret; -} - -int se_write_process_mem(se_proc_t proc, void* base_addr, void* buffer, size_t size, size_t* write_nr) -{ - char filename[64]; - int fd = -1; - int ret = FALSE; - ssize_t len = 0; - off64_t offset = (off64_t)(size_t)base_addr; - - snprintf (filename, 64, "/proc/%d/mem", (int)proc); - fd = open(filename, O_RDWR | O_LARGEFILE); - if(fd == -1) - return FALSE; - - if(lseek64(fd, offset, SEEK_SET) == -1) - { - goto out; - } - if((len = write(fd, buffer, size)) < 0) - { - goto out; - } - else if(write_nr) - *write_nr = (size_t)len; /* len is a non-negative number */ - - ret = TRUE; -out: - close (fd); - return ret; -} - diff --git a/sgx-jvm/linux-sgx/common/src/se_rwlock.c b/sgx-jvm/linux-sgx/common/src/se_rwlock.c deleted file mode 100644 index 204ea7a172..0000000000 --- a/sgx-jvm/linux-sgx/common/src/se_rwlock.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "se_rwlock.h" -#include "internal/util.h" - - -#include -void se_wtlock(se_prwlock_t lock) -{ - int ret = pthread_rwlock_wrlock(lock); - if(0 != ret) - abort(); -} - -void se_wtunlock(se_prwlock_t lock) -{ - int ret = pthread_rwlock_unlock(lock); - if(0 != ret) - abort(); -} - -int se_try_rdlock(se_prwlock_t lock) -{ - return (0 == pthread_rwlock_tryrdlock(lock)); -} - -void se_rdlock(se_prwlock_t lock) -{ - int ret = pthread_rwlock_rdlock(lock); - if(0 != ret) - abort(); -} - -void se_rdunlock(se_prwlock_t lock) -{ - int ret = pthread_rwlock_unlock(lock); - if(0 != ret) - abort(); -} - -void se_init_rwlock(se_prwlock_t lock) -{ - /* use the default attribute. */ - int ret = pthread_rwlock_init(lock, NULL); - if(0 != ret) - abort(); -} - -void se_fini_rwlock(se_prwlock_t lock) -{ - int ret = pthread_rwlock_destroy(lock); - if(0 != ret) - abort(); -} - diff --git a/sgx-jvm/linux-sgx/common/src/se_thread.c b/sgx-jvm/linux-sgx/common/src/se_thread.c deleted file mode 100644 index 59f9ea1805..0000000000 --- a/sgx-jvm/linux-sgx/common/src/se_thread.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -#include "se_thread.h" -#include "se_types.h" - -void se_mutex_init(se_mutex_t* mutex) -{ -#ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - se_mutex_t tmp = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; -#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER) - se_mutex_t tmp = PTHREAD_RECURSIVE_MUTEX_INITIALIZER; -#else -#error no pre-defined RECURSIVE_MUTEX found. -#endif - - /* C doesn't allow `*mutex = PTHREAD_..._INITIALIZER'.*/ - memcpy(mutex, &tmp, sizeof(tmp)); -} - -int se_mutex_lock(se_mutex_t* mutex) { return (0 == pthread_mutex_lock(mutex)); } -int se_mutex_unlock(se_mutex_t* mutex) { return (0 == pthread_mutex_unlock(mutex)); } -int se_mutex_destroy(se_mutex_t* mutex) { return (0 == pthread_mutex_destroy(mutex));} - -void se_thread_cond_init(se_cond_t* cond) -{ - se_cond_t tmp = PTHREAD_COND_INITIALIZER; - memcpy(cond, &tmp, sizeof(tmp)); -} - -int se_thread_cond_wait(se_cond_t *cond, se_mutex_t *mutex){return (0 == pthread_cond_wait(cond, mutex));} -int se_thread_cond_signal(se_cond_t *cond){return (0 == pthread_cond_signal(cond));} -int se_thread_cond_broadcast(se_cond_t *cond){return (0 == pthread_cond_broadcast(cond));} -int se_thread_cond_destroy(se_cond_t* cond){return (0 == pthread_cond_destroy(cond));} - -unsigned int se_get_threadid(void) { return (unsigned)syscall(__NR_gettid);} -/* tls functions */ -int se_tls_alloc(se_tls_index_t *tls_index) { return !pthread_key_create(tls_index, NULL); } -int se_tls_free(se_tls_index_t tls_index) { return !pthread_key_delete(tls_index); } -void * se_tls_get_value(se_tls_index_t tls_index) { return pthread_getspecific(tls_index); } -int se_tls_set_value(se_tls_index_t tls_index, void *tls_value) { return !pthread_setspecific(tls_index, tls_value); } -/* -se_thread_handle_t se_create_thread(size_t stack_size, thread_start_routine_t start_routine, void *param, se_thread_t *thread) -{ - pthread_attr_t attr, *attr_ptr = NULL; - int ret; - - if(stack_size > 0) - { - ret = pthread_attr_init(&attr); - if(ret) - return NULL; - ret = pthread_attr_setstacksize(&attr, stack_size); - if(ret) - return NULL; - attr_ptr = &attr; - } - else - { - attr_ptr = NULL; - } - ret = pthread_create(thread, attr_ptr, start_routine, param); - if(ret) - return NULL; - if(attr_ptr) - pthread_attr_destroy(&attr); - - return thread; - -} -*/ diff --git a/sgx-jvm/linux-sgx/common/src/se_time.c b/sgx-jvm/linux-sgx/common/src/se_time.c deleted file mode 100644 index 413a9e3a39..0000000000 --- a/sgx-jvm/linux-sgx/common/src/se_time.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "se_time.h" - - -#include -#include -void se_sleep(uint32_t milli_seconds) -{ - usleep(milli_seconds * 1000); -} - -uint64_t se_get_tick_count_freq(void) -{ - return 1000000000ULL; -} - -uint64_t se_get_tick_count(void) -{ - struct timespec tm; - if (clock_gettime(CLOCK_MONOTONIC, &tm) != 0) - return 0; - return ((uint64_t)tm.tv_sec * 1000000000ULL) + ((uint64_t)tm.tv_nsec ); -} diff --git a/sgx-jvm/linux-sgx/common/src/se_trace.c b/sgx-jvm/linux-sgx/common/src/se_trace.c deleted file mode 100644 index 77fb09d8f6..0000000000 --- a/sgx-jvm/linux-sgx/common/src/se_trace.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "se_trace.h" -#include -int se_trace_internal(int debug_level, const char *fmt, ...) -{ - va_list args; - int ret = 0; - - va_start(args, fmt); - if(SE_TRACE_NOTICE == debug_level) - ret = vfprintf(stdout, fmt, args); - else - ret = vfprintf(stderr, fmt, args); - va_end(args); - - return ret; -} diff --git a/sgx-jvm/linux-sgx/common/src/sgx_memset_s.cpp b/sgx-jvm/linux-sgx/common/src/sgx_memset_s.cpp deleted file mode 100644 index 816c1504e5..0000000000 --- a/sgx-jvm/linux-sgx/common/src/sgx_memset_s.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/*- - * Copyright (c) 2012 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Alan Barrett - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * ISO/IEC 9899:2011 section K.3.7.4.1 The memset_s function - */ - -#include "sgx_memset_s.h" -#include -#include -#include -/* - * __memset_vp is a volatile pointer to a function. - * It is initialised to point to memset, and should never be changed. - */ -static void * (* const volatile __memset_vp)(void *, int, size_t) - = (memset); - -#ifdef memset_s -#undef memset_s /* in case it was defined as a macro */ -#endif - -#ifdef __cplusplus -extern "C" -#endif -int memset_s(void *s, size_t smax, int c, size_t n) -{ - int err = 0; - - if (s == NULL) { - err = EINVAL; - goto out; - } - - if (n > smax) { - err = EOVERFLOW; - n = smax; - } - - /* Calling through a volatile pointer should never be optimised away. */ - (*__memset_vp)(s, c, n); - - out: - if (err == 0) - return 0; - else { - errno = err; - /* XXX call runtime-constraint handler */ - return err; - } -} - diff --git a/sgx-jvm/linux-sgx/common/src/sgx_profile.cpp b/sgx-jvm/linux-sgx/common/src/sgx_profile.cpp deleted file mode 100644 index 59d2ede74a..0000000000 --- a/sgx-jvm/linux-sgx/common/src/sgx_profile.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#ifdef _PROFILE_ - -#include -#include -#include -#include "sgx_profile.h" -#include "se_time.h" -#include -using namespace std; - -typedef struct _profile_item_t{ - const char *str; /* tag */ - int flag; /* 0: start, 1: end */ - long long time; /* current time */ -} profile_item_t; - -static vector profile_items; -static int alloc_size; -static int used_size; -const int MALLOC_SIZE = 1000; -static long long freq = {0}; - -#define MALLOC_TAG "PROFILE_MALLOC_CONSUMED_TIME" - -extern "C" void profile_init() -{ - freq = se_get_tick_count_freq(); - profile_items.resize(MALLOC_SIZE); - alloc_size = MALLOC_SIZE; - used_size = 0; -} - -static void profile_add_info(const char *str, int flag) -{ - long long cur_time = se_get_tick_count(); - if(used_size==alloc_size){ - alloc_size+=MALLOC_SIZE; - profile_items.resize(alloc_size); - profile_items[used_size].flag = PRO_START; - profile_items[used_size].str = MALLOC_TAG; - profile_items[used_size].time = cur_time; - cur_time = se_get_tick_count(); - used_size++; - profile_items[used_size].flag = PRO_END; - profile_items[used_size].str = MALLOC_TAG; - profile_items[used_size].time = cur_time; - used_size++; - } - profile_items[used_size].flag = flag; - profile_items[used_size].str = str; - profile_items[used_size].time = cur_time; - used_size++; -} - -extern "C" void profile_start(const char* str) -{ - profile_add_info(str, PRO_START); -} - -extern "C" void profile_end(const char * str) -{ - profile_add_info(str, PRO_END); -} - -#include -std::string get_prof_fun_name(const char *s) -{ - std::string input(s); - size_t end = input.find("("); - size_t begin = input.substr(0,end).rfind(" ")+1; - end = end - begin; - return input.substr(begin,end); -} - -extern "C" void profile_output(const char* filename) -{ - int i,j; - - ofstream fs; - fs.open(filename); /* do not overwritten previous value */ - - fs << "freq: " << freq <str << endl; */ - return; - } - } - } - - if(j == used_size) - { - /* cout << "Error: not find end for " << it->str << endl; */ - return; - } - - fs << get_prof_fun_name(profile_items[i].str) << "," << profile_items[i].time << "," << profile_items[j].time << endl; - } - profile_items.clear(); - used_size=0; - alloc_size=0; - fs.close(); - -} -#endif diff --git a/sgx-jvm/linux-sgx/common/src/sgx_read_rand.cpp b/sgx-jvm/linux-sgx/common/src/sgx_read_rand.cpp deleted file mode 100644 index 5268d24689..0000000000 --- a/sgx-jvm/linux-sgx/common/src/sgx_read_rand.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -/* Please add external/rdrand into INCLUDE path and correpondent library to project */ - -#include -#include -#include -#include "sgx.h" -#include "sgx_defs.h" -#include "se_wrapper.h" -#include "rdrand.h" -#include "cpuid.h" -#include -#ifndef UINT32_MAX -#define UINT32_MAX 0xFFFFFFFFU -#endif - -static int g_is_rdrand_supported=-1; - -#define RDRAND_MASK 0x40000000 - -static int rdrand_cpuid() -{ - int info[4] = {-1, -1, -1, -1}; - - /* Are we on an Intel processor? */ - - __cpuid(info, 0); - - if (memcmp(&info[1], "Genu", 4) != 0 || - memcmp(&info[3], "ineI", 4) != 0 || - memcmp(&info[2], "ntel", 4) != 0 ) { - return 0; - } - - /* Do we have RDRAND? */ - - __cpuid(info, /*feature bits*/1); - - int ecx = info[2]; - if ((ecx & RDRAND_MASK) == RDRAND_MASK) - return 1; - else - return 0; -} - - -extern "C" sgx_status_t SGXAPI sgx_read_rand(uint8_t *buf, size_t size) -{ - if(buf == NULL || size == 0 || size> UINT32_MAX ){ - return SGX_ERROR_INVALID_PARAMETER; - } - if(g_is_rdrand_supported==-1){ - g_is_rdrand_supported = rdrand_cpuid(); - } - if(!g_is_rdrand_supported){ - uint32_t i; - for(i=0;i<(uint32_t)size;++i){ - buf[i]=(uint8_t)rand(); - } - }else{ - int rd_ret =rdrand_get_bytes((uint32_t)size, buf); - if(rd_ret != RDRAND_SUCCESS){ - rd_ret = rdrand_get_bytes((uint32_t)size, buf); - if(rd_ret != RDRAND_SUCCESS){ - return SGX_ERROR_UNEXPECTED; - } - } - } - return SGX_SUCCESS; -} diff --git a/sgx-jvm/linux-sgx/common/src/sgx_sha256_128.cpp b/sgx-jvm/linux-sgx/common/src/sgx_sha256_128.cpp deleted file mode 100644 index 352d5c288d..0000000000 --- a/sgx-jvm/linux-sgx/common/src/sgx_sha256_128.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (C) 2011-2017 Intel Corporation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -#include "sgx_sha256_128.h" - -/* -** SHA256-128 implementation: -** out-length := x ¨C number of bits to output -** prefix := SHA-256(out-length) -** digest := SHA-256(prefix || m) -** output := truncate(digest, out-length) ? always return first out-length bits -*/ -sgx_status_t SGXAPI sgx_sha256_128_msg(const uint8_t *p_src, uint32_t src_len, sgx_sha256_128_hash_t *p_hash) -{ - uint32_t outlength = 128; /*number of bits to output */ - uint32_t sha256_128_digest_length; - sgx_status_t ret; - sgx_sha256_hash_t digest = {0}; - uint8_t* digest_buffer = NULL; - - /* check potential overflow and NULL pointer */ - if( (UINT32_MAX-src_len) < sizeof(sgx_sha256_hash_t) || !p_hash || !p_src) - return SGX_ERROR_INVALID_PARAMETER; - - sha256_128_digest_length = (uint32_t)sizeof(sgx_sha256_hash_t)+ src_len; - - digest_buffer = (uint8_t*)malloc(sha256_128_digest_length); - if(!digest_buffer) - return SGX_ERROR_OUT_OF_MEMORY; - memset(digest_buffer, 0, sha256_128_digest_length); - - /* get prefix := SHA-256(out-length) */ - ret = sgx_sha256_msg((const uint8_t*)&outlength, sizeof(uint32_t), (sgx_sha256_hash_t*)digest_buffer); - if(SGX_SUCCESS != ret) - goto clean_up; - - /* get digest := SHA-256(prefix || m) */ - memcpy(digest_buffer+sizeof(sgx_sha256_hash_t), p_src, src_len); /* copy m to digest_buffer */ - ret = sgx_sha256_msg((const uint8_t*)digest_buffer, sha256_128_digest_length, &digest); - if(SGX_SUCCESS != ret) - goto clean_up; - - /* output truncated hash - return the first 128 bits */ - memcpy(p_hash, &digest, sizeof(sgx_sha256_128_hash_t)); - -clean_up: - if(digest_buffer) - free(digest_buffer); - - return ret; -} diff --git a/sgx-jvm/linux-sgx/download_prebuilt.sh b/sgx-jvm/linux-sgx/download_prebuilt.sh deleted file mode 100755 index f3a656ed01..0000000000 --- a/sgx-jvm/linux-sgx/download_prebuilt.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - - -top_dir=`dirname $0` -out_dir=$top_dir -optlib_name=optimized_libs-2.0.tar -ae_file_name=prebuilt-ae-2.0.tar -server_url_path=https://download.01.org/intel-sgx/linux-2.0/ -server_optlib_url=$server_url_path/$optlib_name -server_ae_url=$server_url_path/$ae_file_name -optlib_sha256=239cae39f87934d56c4eb919a4702c6ac82c19957b9a8d56c02b10eb4e27f573 -ae_sha256=3dfac14590a74aa860ea88ca9d1e2e112efb300c622e9ea02b3fa4bd69c50b07 -rm -rf $out_dir/$optlib_name -wget $server_optlib_url -P $out_dir -if [ $? -ne 0 ]; then - echo "Fail to download file $server_optlib_url" - exit -1 -fi -sha256sum $out_dir/$optlib_name > check_sum.txt -grep $optlib_sha256 check_sum.txt -if [ $? -ne 0 ]; then - echo "File $server_optlib_url checksum failure" - exit -1 -fi -rm -rf $out_dir/$ae_file_name -wget $server_ae_url -P $out_dir -if [ $? -ne 0 ]; then - echo "Fail to download file $server_ae_url" - exit -1 -fi -sha256sum $out_dir/$ae_file_name > check_sum.txt -grep $ae_sha256 check_sum.txt -if [ $? -ne 0 ]; then - echo "File $server_ae_url checksum failure" - exit -1 -fi - -pushd $out_dir;tar -xf $optlib_name;tar -xf $ae_file_name;rm -f $optlib_name;rm -f $ae_file_name;popd diff --git a/sgx-jvm/linux-sgx/external/DALSdk/JHI/linux/jhi.h b/sgx-jvm/linux-sgx/external/DALSdk/JHI/linux/jhi.h deleted file mode 100644 index ddf94bdc28..0000000000 --- a/sgx-jvm/linux-sgx/external/DALSdk/JHI/linux/jhi.h +++ /dev/null @@ -1,521 +0,0 @@ -/* - Copyright 2010-2016 Intel Corporation - - This software is licensed to you in accordance - with the agreement between you and Intel Corporation. - - Alternatively, you can use this file in compliance - with the Apache license, Version 2. - - - Apache License, Version 2.0 - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** -******************************************************************************** -** -** @file jhi.h -** -** @brief Defines exported interfaces for JHI.DLL -** -** @author Elad Dabool -** -******************************************************************************** -*/ - -#ifndef __JHI_H__ -#define __JHI_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "typedefs.h" - -// Format: Major.Minor.ReverseDate -#define JHI_VERSION "1.13.20161115" - -//------------------------------------------------------------ -// Common & External Interfaces -//------------------------------------------------------------ - -typedef PVOID JHI_HANDLE ; -typedef UINT32 JHI_RET ; -typedef PVOID JHI_SESSION_HANDLE; - -//------------------------------------------------------------ -// Define Linkage for the functions -//------------------------------------------------------------ - -#define JHI_EXPORT __declspec(dllexport) JHI_RET - - -//---------------------------------------------------------------------------------------------------------------- -// JHI 7.1 return codes - not used in 8.0 and above (backward compatibility only), JHI 8.0 return codes are listed below -//---------------------------------------------------------------------------------------------------------------- -#define JHI_FILE_MISSING_SRC 0x101 // Source File not found in install/uninstall or unable to load - // file in SendAndRecv -#define JHI_FILE_ERROR_AUTH 0x102 // Attempted to load the file, but FW returned back - // a manifest failure check and rejected it -#define JHI_FILE_ERROR_DELETE 0x104 // Unable to remove file corresponding to the UUID in uninstall - // Maybe permission issues -#define JHI_FILE_INVALID 0x105 // Invalid file - bad characters or larger than 64K -#define JHI_FILE_ERROR_OPEN 0x106 // Unable to open file. Maybe permission issues -#define JHI_FILE_UUID_MISMATCH 0x107 // UUIDs dont match between applet file and function input -#define JHI_FILE_IDENTICAL 0x108 // downloaded applet matches existing one in Jom - -#define JHI_INVALID_COMMAND 0x202 // invalid JHI interface command -#define JHI_ILLEGAL_VALUE 0x204 // validation failed on input parameters - -#define JHI_COMMS_ERROR 0x300 // Communications error due to HECI timeouts - // or ME auto resets or any other COMMS error -#define JHI_SERVICE_INVALID_GUID 0x302 // Invalid COM guid (from DLL) - -#define JHI_APPLET_TIMEOUT 0x401 // This may be a result of a Java code in VM in an infinite loop. - // TL will kill applet in JOM and return error code -#define JHI_APPID_NOT_EXIST 0x402 // If appid is not present in app table -#define JHI_JOM_FATAL 0x403 //JOM fatal error -#define JHI_JOM_OVERFLOW 0x404 //exceeds max installed applets or active sessions in JOM -#define JHI_JOM_ERROR_DOWNLOAD 0x405 //JOM download error -#define JHI_JOM_ERROR_UNLOAD 0x406 //JOM unload error - -#define JHI_ERROR_LOGGING 0x500 // Error in logging - -#define JHI_UNKNOWN_ERROR 0x600 // Any other error - -//---------------------------------------------------------------------------------------------------------------- -// JHI 8.0 return codes -//---------------------------------------------------------------------------------------------------------------- - -// General JHI Return Code -#define JHI_SUCCESS 0x00 // general success response -#define JHI_INVALID_HANDLE 0x201 // invalid JHI handle -#define JHI_INVALID_PARAMS 0x203 // passed a null pointer to a required argument / illegal arguments passed to API function -#define JHI_INVALID_APPLET_GUID JHI_ILLEGAL_VALUE // the applet UUID is invalid -#define JHI_SERVICE_UNAVAILABLE 0x301 // there is no connection to JHI service -#define JHI_ERROR_REGISTRY 0x501 // error for any registry based access or registry corruption -#define JHI_ERROR_REPOSITORY_NOT_FOUND 0x1000 // when cannot find applets repository directory -#define JHI_INTERNAL_ERROR 0x601 // an unexpected internal error happened. -#define JHI_INVALID_BUFFER_SIZE 0x1001 // used a buffer that is larger than JHI_BUFFER_MAX -#define JHI_INVALID_COMM_BUFFER 0x1002 // JVM_COMM_BUFFER passed to function is invalid - -// Install errors -#define JHI_INVALID_INSTALL_FILE 0x1003 // the dalp file path is invalid -#define JHI_READ_FROM_FILE_FAILED 0x1004 // failed to read DALP file -#define JHI_INVALID_PACKAGE_FORMAT 0x1005 // dalp file format is not a valid -#define JHI_FILE_ERROR_COPY 0x103 // applet file could not be copied to repository -#define JHI_INVALID_INIT_BUFFER 0x1006 // passed an invalid init buffer to the function -#define JHI_FILE_NOT_FOUND JHI_FILE_MISSING_SRC // could not find the specified dalp file -#define JHI_INVALID_FILE_EXTENSION 0x1007 // applets package file must end with .dalp extension. -#define JHI_MAX_INSTALLED_APPLETS_REACHED JHI_JOM_OVERFLOW // exceeds max applets allowed, need to uninstall an applet. -#define JHI_INSTALL_FAILURE_SESSIONS_EXISTS 0x1008 // could not install because there are open sessions. -#define JHI_INSTALL_FAILED 0x1009 // no compatible applet was found in the DALP file -#define JHI_SVL_CHECK_FAIL 0x1040 // install failed due to an svl check -#define JHI_ILLEGAL_PLATFORM_ID 0x1041 // install failed due to an illegal platform id - -// Uninstall errors -#define JHI_DELETE_FROM_REPOSITORY_FAILURE JHI_FILE_ERROR_DELETE // unable to delete applet DALP file from repository -#define JHI_UNINSTALL_FAILURE_SESSIONS_EXISTS 0x100A // for app uninstallation errors - -// Create Session errors -#define JHI_APPLET_NOT_INSTALLED JHI_APPID_NOT_EXIST // trying to create a session of uninstalled applet -#define JHI_MAX_SESSIONS_REACHED 0x100C // exceeds max sessions allowed, need to close a session. -#define JHI_SHARED_SESSION_NOT_SUPPORTED 0x100D // the applet does not support shared sessions. -#define JHI_MAX_SHARED_SESSION_REACHED 0x100E // failed to get session handle due to maximun handles limit. -#define JHI_FIRMWARE_OUT_OF_RESOURCES 0x1018 // request causes the VM to exceed its memory quota -#define JHI_ONLY_SINGLE_INSTANCE_ALLOWED 0x1019 // trying to create more than a single instance of an applet -#define JHI_OPERATION_NOT_PERMITTED 0x101A // userspace tried to perform a kernel space operation - -// Close Session errors -#define JHI_INVALID_SESSION_HANDLE 0x100F // the session handle is not of an active session. - -// Send And Recieve errors -#define JHI_INSUFFICIENT_BUFFER 0x200 // buffer overflow - response greater than supplied Rx buffer -#define JHI_APPLET_FATAL 0x400 // This may be a result of uncaught exception or unusual applet - // error that results in applet being terminated by TL VM. -#define JHI_APPLET_BAD_STATE 0x407 // Applet in bad state, need to reopen the session - -// Register/Unregister session events -#define JHI_SESSION_NOT_REGISTERED 0x1010 // trying to unregister a session that is not registered for events. -#define JHI_SESSION_ALREADY_REGSITERED 0x1011 // Registration to an event is done only once. -#define JHI_EVENTS_NOT_SUPPORTED 0x1012 // events are not supported for this type of session - -// Get Applet Property errors: -#define JHI_APPLET_PROPERTY_NOT_SUPPORTED 0x1013 // Returned when calling GetAppletProperty with invalid property - -// Init errors -#define JHI_SPOOLER_NOT_FOUND 0x1014 // cannot find the spooler file -#define JHI_INVALID_SPOOLER 0x1015 // cannot download spooler / create an instance of the spooler -#define JHI_NO_CONNECTION_TO_FIRMWARE JHI_COMMS_ERROR // JHI has no connection to the VM - -// DLL errors -#define JHI_VM_DLL_FILE_NOT_FOUND 0x1016 // VM DLL is missing from the exe path -#define JHI_VM_DLL_VERIFY_FAILED 0x1017 // DLL Signature or Publisher name are not valid. - -// IAC errors -#define JHI_IAC_SERVER_SESSION_EXIST 0x1020 // May occur when trying to create two sessions on an IAC server applet -#define JHI_IAC_SERVER_INTERNAL_SESSIONS_EXIST 0x1021 // May occur when trying to close an IAC server applet session that has internal sessions - -// Access control errors -#define JHI_MISSING_ACCESS_CONTROL 0x1030 // Will return from install when trying to install an applet which uses an API that it is not permitted to. - -// SD session errors -#define JHI_ERROR_OEM_SIGNING_DISABLED 0x1050 // May occur if DAL OEAM signing is disabled -#define JHI_ERROR_SD_PUBLICKEY_HASH_FAILED 0x1051 // May occur if there is a mismatch in the public key hash of an SD -#define JHI_ERROR_SD_DB_NO_FREE_SLOT 0x1052 // In case reached max installed SDs in DB -#define JHI_ERROR_SD_TA_INSTALLATION_UNALLOWED 0x1053 // TA installation is not allowed for SD - -// ----------------------------------------------------------- -// Buffer size limitation is 2MB -// JHI will not accept any buffer with greater size. -// -// Note that this size limitiation does not mark the maximum buffer size an applet can recieve, -// applet max buffer size changes from one applet to another. -// -// This applies for all JHI API function that use buffers such as: -// SendAndRecieve, CreateSession, GetAppletProperty. -// ----------------------------------------------------------- -#define JHI_BUFFER_MAX 2097152 - - -//------------------------------------------------------------ -// Applet version macros -//------------------------------------------------------------ -// While applet version is represented in a Major.Minor format (i.e. 1.0) -// the VM repersntation of an applet version (that can be obtained using JHI_GetAppletProperty) is as an integer that combine both major and minor version. -// in order to perform the transition between to two representation we offer the following macros: - -/* - Make VM Applet Version (32bit) from a Major.Minor format - - Bits: - 00-07 - Major - 08-15 - Minor - 15-31 - Reserved (All Zero) -*/ -#define MK_APPLET_VER(maj, min) ( (UINT32) \ - (maj & 0x000000FFUL) | \ - ((min << 8) & 0x0000FF00UL) & \ - (0x0000FFFFUL) ) - -/* Extract Applet Major Version from a VM integer representation (num) */ -#define MAJOR_APPLET_VER(num) ((UINT8) (num & 0x000000FFUL)) - -/* Extract Applet Minor Version from a VM integer representation (num) */ -#define MINOR_APPLET_VER(num) ((UINT8) ((num & 0x0000FF00UL) >> 8)) - - -//------------------------------------------------------------ -// JHI Events -//------------------------------------------------------------ - -// this enum lists the types of data received by JHI event -typedef enum _JHI_EVENT_DATA_TYPE -{ - JHI_DATA_FROM_APPLET = 0, // the event raised by an applet session - JHI_DATA_FROM_SERVICE = 1 // the event raised by JHI service -}JHI_EVENT_DATA_TYPE; - -//this struct repersents the data received upon a JHI event -typedef struct { - UINT32 datalen; // byte length of the event data - UINT8* data; // the buffer that contains the event data - JHI_EVENT_DATA_TYPE dataType; // the event type -}JHI_EVENT_DATA; - -// This is the format for a callback function that is used in order to -// receive session events. -typedef void (*JHI_EventFunc)(JHI_SESSION_HANDLE SessionHandle, JHI_EVENT_DATA EventData); - - -//------------------------------------------------------------ -// JHI Version info. -//------------------------------------------------------------ - -// this enum lists the communication types that are used -// by JHI in order to communicate with the firmware -typedef enum _JHI_COMMUNICATION_TYPE -{ - JHI_SOCKETS = 0, // communication by sockets - JHI_HECI = 1 // communication by HECI -} JHI_COMMUNICATION_TYPE; - -#define VERSION_BUFFER_SIZE 50 - -// this enum lists the platfom types that are supported by JHI -typedef enum _JHI_PLATFROM_ID -{ - ME = 0, // Intel(R) Management Engine (Intel(R) ME) - SEC = 1, - CSE = 2, - INVALID_PLATFORM_ID = -1 -} JHI_PLATFROM_ID; - -// This enum lists the VM types that are supported by JHI -typedef enum _JHI_VM_TYPE -{ - JHI_VM_TYPE_INVALID = -1, - JHI_VM_TYPE_TL = 0, - JHI_VM_TYPE_BEIHAI = 1, // Alias of BHv1 for backward compatibility - JHI_VM_TYPE_BEIHAI_V1 = 1, - JHI_VM_TYPE_BEIHAI_V2 = 2 -} JHI_VM_TYPE; - -// Different VM plugin types used by JHI -typedef enum _JHI_PLUGIN_TYPE -{ - JHI_PLUGIN_TYPE_INVALID = 0, - JHI_PLUGIN_TYPE_TL = 1, - JHI_PLUGIN_TYPE_BEIHAI_V1 = 2, - JHI_PLUGIN_TYPE_BEIHAI_V2 = 3 -} JHI_PLUGIN_TYPE; - - -// this struct contains information about the JHI service and the -// firmware versions, and additional info -typedef struct -{ - char jhi_version[VERSION_BUFFER_SIZE]; // the version of the JHI service - char fw_version[VERSION_BUFFER_SIZE]; // the version of the firmware - JHI_COMMUNICATION_TYPE comm_type; // the communication type between JHI and the firmware - JHI_PLATFROM_ID platform_id; // the platform supported by the JHI service - JHI_VM_TYPE vm_type; // the VM type supported by the JHI service - UINT32 reserved[19]; // reserved bits -} JHI_VERSION_INFO; - - -//------------------------------------------------------------ -// Session info -//------------------------------------------------------------ - -// this enum lists the states of a session -typedef enum _JHI_SESSION_STATE -{ - JHI_SESSION_STATE_ACTIVE = 0, // the session is active - JHI_SESSION_STATE_NOT_EXISTS = 1 // the session does not exists -} JHI_SESSION_STATE; - -// this struct contains information for a given session -typedef struct -{ - JHI_SESSION_STATE state; // the session state - UINT32 flags; // the flags used when this session created - UINT32 reserved[20]; // reserved bits -} JHI_SESSION_INFO; - -//------------------------------------------------------------ -// Create Session flags -//------------------------------------------------------------ -// this enum lists the flags that used when creating a session -// -#define JHI_NO_FLAGS 0 // no flags to be used -#define JHI_SHARED_SESSION 1 // create a shared session, or receive a handle for an existing shared session - -//------------------------------------------------------------ -// Data Buffer -//------------------------------------------------------------ -typedef struct -{ - PVOID buffer; - UINT32 length ; -} DATA_BUFFER ; - - -//------------------------------------------------------------ -// For Tx and Rx downto the MEI routine -// DON'T ADD MEMBERS IN -//------------------------------------------------------------ -typedef struct -{ - DATA_BUFFER TxBuf [1] ; - - //--------------------!!!!!!!!!!!--------------------// - // Dont add members in between TxBuf[1] & RxBuf[1] // - // The code that uses this depends on it // - //--------------------!!!!!!!!!!!--------------------// - - DATA_BUFFER RxBuf [1] ; - - // You may add anything here -} JVM_COMM_BUFFER ; - - - - -//------------------------------------------------------------ -// Function Prototypes - - -//------------------------------------------------------------ -// Function: JHI_Initialize -//------------------------------------------------------------ -JHI_EXPORT -JHI_Initialize ( - OUT JHI_HANDLE* ppHandle, - IN PVOID context, - IN UINT32 flags -) ; - -//------------------------------------------------------------ -// Function: JHI_Deinit -//------------------------------------------------------------ -JHI_EXPORT JHI_Deinit(IN JHI_HANDLE handle) ; - - -//------------------------------------------------------------ -// Function: JHI_SendAndRecv -//------------------------------------------------------------ -JHI_EXPORT -JHI_SendAndRecv2( - IN JHI_HANDLE handle, - IN JHI_SESSION_HANDLE SessionHandle, - IN INT32 nCommandId, - INOUT JVM_COMM_BUFFER* pComm, - OUT INT32* responseCode); - -//------------------------------------------------------------ -// Function: JHI_Install -//------------------------------------------------------------ -JHI_EXPORT -JHI_Install2 ( - IN const JHI_HANDLE handle, - IN const char* AppId, - IN const FILECHAR* srcFile -); - -//------------------------------------------------------------ -// Function: JHI_Uninstall -//------------------------------------------------------------ -JHI_EXPORT -JHI_Uninstall( - IN JHI_HANDLE handle, - IN const char* AppId -); - -//------------------------------------------------------------ -// Function: JHI_GetAppletProperty -//------------------------------------------------------------ -JHI_EXPORT -JHI_GetAppletProperty( - IN JHI_HANDLE handle, - IN const char* AppId, - INOUT JVM_COMM_BUFFER* pComm -); - -//------------------------------------------------------------ -// Function: JHI_CreateSession -//------------------------------------------------------------ -JHI_EXPORT -JHI_CreateSession ( - IN const JHI_HANDLE handle, - IN const char* AppId, - IN UINT32 flags, - IN DATA_BUFFER* initBuffer, - OUT JHI_SESSION_HANDLE* pSessionHandle -); - -//------------------------------------------------------------ -// Function: JHI_GetSessionsCount -//------------------------------------------------------------ -JHI_EXPORT -JHI_GetSessionsCount( - IN const JHI_HANDLE handle, - IN const char* AppId, - OUT UINT32* SessionsCount -); - -//------------------------------------------------------------ -// Function: JHI_CloseSession -//------------------------------------------------------------ -JHI_EXPORT -JHI_CloseSession( - IN const JHI_HANDLE handle, - IN JHI_SESSION_HANDLE* pSessionHandle -); - -//------------------------------------------------------------ -// Function: JHI_ForceCloseSession -//------------------------------------------------------------ -JHI_EXPORT -JHI_ForceCloseSession( -IN const JHI_HANDLE handle, -IN JHI_SESSION_HANDLE* pSessionHandle -); - -//------------------------------------------------------------ -// Function: JHI_GetSessionInfo -//------------------------------------------------------------ -JHI_EXPORT -JHI_GetSessionInfo( - IN const JHI_HANDLE handle, - IN JHI_SESSION_HANDLE SessionHandle, - OUT JHI_SESSION_INFO* SessionInfo -); - -#ifdef __ANDROID__ -//------------------------------------------------------------ -// Function: JHI_ClearSessions -// -JHI_RET -JHI_ClearSessions( - IN const JHI_HANDLE handle, - IN int ApplicationPid -); - -//------------------------------------------------------------ -// Function: JHI_GetSessionsCount -//------------------------------------------------------------ -JHI_EXPORT -JHI_CreateSessionProcess ( - IN const JHI_HANDLE handle, - IN const char* AppId, - IN int SessionPid, - IN UINT32 flags, - IN DATA_BUFFER* initBuffer, - OUT JHI_SESSION_HANDLE* pSessionHandle -); -#endif //__ANDROID__ - -//------------------------------------------------------------ -// Function: JHI_RegisterEvent -//------------------------------------------------------------ -JHI_EXPORT -JHI_RegisterEvents( - IN const JHI_HANDLE handle, - IN JHI_SESSION_HANDLE SessionHandle, - IN JHI_EventFunc pEventFunction); - -//------------------------------------------------------------ -// Function: JHI_UnRegisterEvent -//------------------------------------------------------------ -JHI_EXPORT -JHI_UnRegisterEvents( - IN const JHI_HANDLE handle, - IN JHI_SESSION_HANDLE SessionHandle); - -//------------------------------------------------------------ -// Function: JHI_GetVersionInfo -//------------------------------------------------------------ -JHI_EXPORT -JHI_GetVersionInfo ( - IN const JHI_HANDLE handle, - OUT JHI_VERSION_INFO* pVersionInfo); - -#ifdef __cplusplus -}; -#endif - - -#endif diff --git a/sgx-jvm/linux-sgx/external/DALSdk/JHI/linux/typedefs.h b/sgx-jvm/linux-sgx/external/DALSdk/JHI/linux/typedefs.h deleted file mode 100644 index bd591791f4..0000000000 --- a/sgx-jvm/linux-sgx/external/DALSdk/JHI/linux/typedefs.h +++ /dev/null @@ -1,101 +0,0 @@ -/* - Copyright 2010-2016 Intel Corporation - - This software is licensed to you in accordance - with the agreement between you and Intel Corporation. - - Alternatively, you can use this file in compliance - with the Apache license, Version 2. - - - Apache License, Version 2.0 - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** -******************************************************************************** -** -** @file typedefs.h -** -** @brief Contains common type declarations used throughout the code -** -** @author Ranjit Narjala -** -******************************************************************************** -*/ - -#ifndef _TYPEDEFS_H_ -#define _TYPEDEFS_H_ - -#include -#include - -#ifdef _WIN32 -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -typedef uint8_t UINT8; -typedef uint16_t UINT16; -typedef uint32_t UINT32; -typedef int8_t INT8; -typedef int16_t INT16; -typedef int32_t INT32; -typedef void * PVOID; - -#ifdef _WIN32 -typedef wchar_t FILECHAR; -#else -typedef char TCHAR; -typedef char FILECHAR; -#define __declspec(x) -#endif /* _WIN32 */ - -#ifndef IN -#define IN // Defines an input parameter -#endif - -#ifndef OUT -#define OUT // Defines an output parameter -#endif - -#ifndef INOUT -#define INOUT // Defines an input/output parameter -#endif - -#ifndef TRUE -#define TRUE 1 // True value for a BOOLEAN -#endif -#ifndef FALSE -#define FALSE 0 // False value for a BOOLEAN -#endif - -#ifdef __cplusplus -} // extern "C" -#endif - -#ifndef NULL -#ifdef __cplusplus -// Define NULL pointer value under C++ -#define NULL 0 -#else -// Define NULL pointer value non-C++ -#define NULL ((void *)0) -#endif -#endif - -#endif // _TYPEDEFS_H diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/CHANGELOG.md b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/CHANGELOG.md deleted file mode 100644 index 36657a302c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/CHANGELOG.md +++ /dev/null @@ -1,87 +0,0 @@ -# Intel(R) EPID SDK ChangeLog {#ChangeLog} - -## [3.0.0] - -### New in This Release - -* Support for verification of EPID 1.1 members. - -* Make-based build system support. - -* Sample material includes compressed keys. - -* Enhanced documentation, including step-by-step walkthroughs of - example applications. - -* Validated on additional IoT platforms. - - - Ostro Linux - - - Snappy Ubuntu Core - - -### Changes - -* A new verifier API has been added to set the basename to be used for - verification. Verifier APIs that used to accept basenames now use - the basename set via EpidVerifierSetBasename. - -* The verifier pre-computation structure has been changed to include - the group ID to allow detection of errors that result from providing - a pre-computation blob from a different group to EpidVerifierCreate. - - -### Fixes - -* The kEpidxxxRevoked enums have been renamed to be consistent with - other result return values. - - -### Known Issues - -* SHA-512/256 hash algorithm is not supported. - - -## [2.0.0] - 2016-07-20 - -### New in This Release - -* Signed binary issuer material support. - - - Binary issuer material validation APIs. - - - Updated sample issuer material. - - - Updated samples that parse signed binary issuer material. - -* Compressed member private key support. - -* Validated on additional IoT platforms. - - - Windows 10 IoT Core - - - WindRiver IDP - - -### Changes - -* The default hash algorithm has changed. It is now SHA-512. - -* Functions that returned `EpidNullPtrErr` now return `EpidBadArgErr` - instead. - - -### Fixes - -* Updated build flags to work around GCC 4.8.5 defect. - - -## [1.0.0] - 2016-03-03 - -### New in This Release - -* Basic sign and verify functionality - -* Dynamic join support for member - -* Apache 2.0 License diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/LICENSE.txt b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/LICENSE.txt deleted file mode 100644 index 2afcf387aa..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/LICENSE.txt +++ /dev/null @@ -1,249 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - -======================================================================= - -Intel(R) Enhanced Privacy ID (Intel(R) EPID) SDK Subcomponents: - -The Intel(R) EPID SDK contains subcomponents with separate copyright notices -and license terms. Your use of the source code for these subcomponents -is subject to the terms and conditions of the following licenses. - - ------------------------------------------------------------------------ -The BSD 3-Clause License ------------------------------------------------------------------------ - -The Intel(R) EPID SDK bundles portions of the following under the BSD 3-Clause -License: - - - Google Test (https://github.com/google/googletest) - Copyright 2008, Google Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/Makefile.in b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/Makefile.in deleted file mode 100644 index ef815352b9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/Makefile.in +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/make -f -include ../../buildenv.mk - -#variables are set by configure -prefix = @prefix@ -installdir = $(prefix)/ -epidinstalldir = $(installdir)/epid-sdk -CFLAGS = @CFLAGS@ - -#g++ flags -CXX_FLAGS := $(CFLAGS) -O2 -Werror -Wall -Wextra -Wno-missing-braces \ - -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-unused-function \ - -fno-strict-aliasing -Wno-unused-but-set-variable -Wno-comment -DNDEBUG -fPIC -#gcc flags -CC_FLAGS := $(CXX_FLAGS) -D_IPP_v50_ -D_IPP_DEBUG - -#intel c++ compiler flags -ICPC_FLAGS := $(CFLAGS) -O2 -Werror -Wall -Wextra -DNDEBUG -#intel c compiler flags -ICC_FLAGS := $(ICPC_FLAGS) -D_IPP_v50_ -D_IPP_DEBUG - -#check if architecture was specified -#or take it by shell command -ifeq ($(findstring -m32,$(CFLAGS)),-m32) - ARCH = x86 - CXXFLAGS += -m32 -else ifeq ($(findstring -m64,$(CFLAGS)),-m64) - ARCH = x86_64 - CXXFLAGS += -m64 -else - ARCH := $(shell uname -m) -endif - -#set tools and flags depending on specified compiler -ifeq ($(CC),icc) - CFLAGS := $(ICC_FLAGS) - CXXFLAGS := $(ICPC_FLAGS) - AR = xiar -else ifeq ($(CC),cc) - CFLAGS := $(CC_FLAGS) -ifeq ($(ARCH),x86) - CFLAGS += -m32 -endif -else - CFLAGS := $(CC_FLAGS) - CXXFLAGS := $(CXX_FLAGS) - ARCH = x86 -endif - -#set c++11 for all c++ compilers -CXXFLAGS += -std=c++0x - -#set flags for unit tests executables -GTEST_FLAGS = --gtest_color=yes \ - --gtest_print_time=1 \ - --gtest_output=xml - -export CC AR LDFLAGS ARCH CFLAGS -export CXX CXXFLAGS -export epidinstalldir -export GTEST_FLAGS - -#just output -$(info $$ccompiler is [${CC}]) -$(info $$cxxcompiler is [${CXX}]) -$(info $$architecture is [${ARCH}]) - -#targets part -all: ipp common member verifier dropt - -clean: - $(MAKE) -C ./ext/ipp/sources/ippcp clean - $(MAKE) -C ./ext/ipp/sources/ippcpepid clean - $(MAKE) -C ./epid/common/ clean - $(MAKE) -C ./epid/member/ clean - $(MAKE) -C ./epid/verifier/ clean - $(MAKE) -C ./example/util/ clean - $(MAKE) -C ./example/ clean - $(MAKE) -C ./tools/ clean - $(MAKE) -C ./epid/common-testhelper/ clean - $(MAKE) -C ./ext/dropt/ clean - -install: - $(MAKE) -C ./ext/ipp/sources/ippcp install - $(MAKE) -C ./ext/ipp/sources/ippcpepid install - $(MAKE) -C ./epid/common/ install - $(MAKE) -C ./epid/member/ install - $(MAKE) -C ./epid/verifier/ install - $(MAKE) -C ./example/ install - $(MAKE) -C ./tools/ install - $(MAKE) -C ./epid/common-testhelper/ install - -uninstall: - rm -rf $(epidinstalldir) - -ipp: - $(MAKE) -C ./ext/ipp/sources/ippcp all - $(MAKE) -C ./ext/ipp/sources/ippcpepid all ARCH=$(ARCH) - -common: - $(MAKE) -C ./epid/common/ all - -member: - $(MAKE) -C ./epid/member/ all - -verifier: - $(MAKE) -C ./epid/verifier/ all - -dropt: - $(MAKE) -C ./ext/dropt/ all - -examples_util: - $(MAKE) -C ./example/util/ all - -check: - $(MAKE) -C ./ext/gtest/ all - $(MAKE) -C ./epid/common-testhelper/ all - $(MAKE) -C ./epid/common-testhelper/ check - $(MAKE) -C ./epid/common/ check - $(MAKE) -C ./epid/member/ check - $(MAKE) -C ./epid/verifier/ check - -examples: - $(MAKE) -C ./example/ all - -epid_tools: - $(MAKE) -C ./tools/ all - -build: all check install diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/NOTICE.txt b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/NOTICE.txt deleted file mode 100644 index 3a89982c85..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/NOTICE.txt +++ /dev/null @@ -1,23 +0,0 @@ -Intel(R) Enhanced Privacy ID (Intel(R) EPID) SDK -Copyright 2016 Intel Corporation - -========== - -The Intel(R) EPID SDK contains subcomponents with separate copyright notices -and license terms. - -Your use of the source code for the these subcomponents is subject to -the terms and conditions of their respective licenses. - -See the LICENSE.txt file for a list of subcomponents and dependencies and -their respective licenses. - ----------- - -The source code used for math primitives in the Intel(R) EPID SDK is a -subset of the Intel(R) Integrated Performance Primitives (Intel(R) IPP) -Cryptography library (v9.0.3) written in C. -For higher performance, you can use the commercial version of the -Intel(R) IPP Cryptography libraries, which are available at -https://software.intel.com/articles/download-ipp-cryptography-libraries. - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/README.md b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/README.md deleted file mode 100644 index 5cb5c5f4ac..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# Intel(R) EPID SDK - -The Intel(R) Enhanced Privacy ID Software Development Kit - -Intel(R) EPID SDK enables adding Intel(R) EPID support to applications -and platforms. - -Intel(R) EPID is a cryptographic protocol which enables the remote -authentication of a trusted platform whilst preserving the user's -privacy. - -* For a given public key there are many (e.g., millions) of private - keys. The key holders form a group. - -* Any key holder may sign against the one public key. - -* No one can tell which private key signed the data. This is the - privacy property. - -You can use Intel(R) EPID as a foundational building block for a -multitude of security solutions. - - -## Prerequisites - -* [Python](http://www.python.org) - -* [SCons](http://www.scons.org/) - -* [Parts](https://bitbucket.org/sconsparts/parts) - -* A C/C++ compiler supported by Parts - - -## What's New in This Release - -See [CHANGELOG.md](CHANGELOG.md). - - -## Documentation - -See [doc/index.html](doc/index.html) to browse the html -documentation. - - -## License - -See [LICENSE.txt](LICENSE.txt). - - -## Math Primitives - -The source code used for math primitives in the Intel(R) EPID SDK is a -subset of the Intel(R) IPP Cryptography library (v9.0.3) written in -C. For higher performance, you can use the commercial version of the -IPP Cryptography libraries, which are available at -https://software.intel.com/articles/download-ipp-cryptography-libraries. diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/SConstruct b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/SConstruct deleted file mode 100644 index 195222d8c4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/SConstruct +++ /dev/null @@ -1,237 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -"""use scons -k to invoke all builds regardless of unit test failures -""" -import string -import sys -import SCons.Script -import os.path -from parts import * - -print "**************** TOOLS ****************" -print '* Python Version:', string.split(sys.version, " ", 1)[0] -print '* SCons Version:', SCons.__version__ -print '* Parts Version:', PartsExtensionVersion() -print "***************************************" - -def PrintCompilerVersion(env): - """ - Function to print version of compilers used for build - Args: - env: Environment to get compilers version - """ - res = '' - if 'INTELC_VERSION' in env: - res += 'ICC ' + env['INTELC_VERSION'] + ';' - if 'MSVC_VERSION' in env: - res += 'MS ' + env['MSVC_VERSION'] + ';' - if 'GXX_VERSION' in env: - res += 'GXX ' + env['GXX_VERSION'] + ';' - if 'GCC_VERSION' in env: - res += 'GCC ' + env['GCC_VERSION'] + ';' - print 'Compiler Version: ', res - -def include_parts(part_list, **kwargs): - for parts_file in part_list: - if os.path.isfile(DefaultEnvironment().subst(parts_file)): - Part(parts_file=parts_file, **kwargs) - -######## Part groups #################################################### -ipp_parts = ['ext/ipp/ippcp.parts', - 'ext/ipp/ippcpepid.parts', - 'ext/ipp/ippcommon.parts'] -utest_parts = ['ext/gtest/gtest.parts', - 'epid/common-testhelper/common-testhelper.parts'] -common_parts = ['epid/common/common.parts'] -member_parts = ['epid/member/member.parts'] -verifier_parts = ['epid/verifier/verifier.parts'] -util_parts = ['example/util/util.parts'] -example_parts = ['ext/dropt/dropt.parts', - 'example/verifysig/verifysig.parts', - 'example/signmsg/signmsg.parts', - 'example/data/data.parts', - 'example/compressed_data/compressed_data.parts'] -tools_parts = ['tools/revokegrp/revokegrp.parts', - 'tools/revokekey/revokekey.parts', - 'tools/revokesig/revokesig.parts', - 'tools/extractkeys/extractkeys.parts', - 'tools/extractgrps/extractgrps.parts'] -testbot_test_parts = ['test/testbot/testbot.parts', - 'test/testbot/signmsg/signmsg_testbot.parts', - 'test/testbot/verifysig/verifysig_testbot.parts', - 'test/testbot/integration/integration_testbot.parts', - 'test/testbot/ssh_remote/ssh_remote_testbot.parts', - 'test/testbot/revokegrp/revokegrp_testbot.parts', - 'test/testbot/revokekey/revokekey_testbot.parts', - 'test/testbot/revokesig/revokesig_testbot.parts', - 'test/testbot/extractkeys/extractkeys_testbot.parts', - 'test/testbot/extractgrps/extractgrps_testbot.parts'] -package_parts = ['ext/gtest/gtest.parts', - 'ext/ipp/ippcommon.parts', - 'ext/ipp/ippcp.parts', - 'ext/ipp/ippcpepid.parts', - 'package.parts'] -internal_tools_parts = ['ext/dropt/dropt.parts', - 'tools/ikgfwrapper/ikgfwrapper.parts'] -######## End Part groups ############################################### -######## Commandline option setup ####################################### -product_variants = [ - 'production', - 'internal-test', - 'package-epid-sdk', - 'internal-tools' -] - -default_variant = 'production' - -def is_production(): - return GetOption("product-variant") == 'production' - -def is_internal_test(): - return GetOption("product-variant") == 'internal-test' - -def is_internal_tools(): - return GetOption("product-variant") == 'internal-tools' - -def is_package(): - return GetOption("product-variant") == 'package-epid-sdk' - -def use_commercial_ipp(): - return GetOption("use-commercial-ipp") - -def variant_dirname(): - s = GetOption("product-variant") - if s == 'production': - return 'epid-sdk' - elif s == 'package-epid-sdk': - return 'epid-sdk' - else: - return s - -AddOption("--product-variant", "--prod-var", nargs=1, - help=("Select product variant to build. Possible " - "options are: {0}. The default is {1} if no option " - "is specified").format(", ".join(product_variants), - default_variant), - action='store', dest='product-variant', type='choice', - choices=product_variants, default=default_variant) - -AddOption("--use-commercial-ipp", - help=("Link with commercial IPP. The IPPROOT environment variable " - "must be set."), - action='store_true', dest='use-commercial-ipp', - default=False) - -SetOptionDefault("PRODUCT_VARIANT", variant_dirname()) - -######## End Commandline option setup ################################### - - -# fix for parts 0.10.8 until we get better logic to extract ${CC} -SetOptionDefault('PARTS_USE_SHORT_TOOL_NAMES', 1) - -def set_default_production_options(): - SetOptionDefault('TARGET_PLATFORM', 'x86_64') - SetOptionDefault('CONFIG', 'release') - - SetOptionDefault('TARGET_VARIANT', '${TARGET_OS}-${TARGET_ARCH}') - - SetOptionDefault('INSTALL_ROOT', - '#_install/${PRODUCT_VARIANT}') - - SetOptionDefault('INSTALL_TOOLS_BIN', - '$INSTALL_ROOT/tools') - - SetOptionDefault('INSTALL_SAMPLE_BIN', - '$INSTALL_ROOT/example') - - SetOptionDefault('INSTALL_EPID_INCLUDE', - '$INSTALL_ROOT/include/epid') - - SetOptionDefault('INSTALL_IPP_INCLUDE', - '$INSTALL_ROOT/include/ext/ipp/include') - - SetOptionDefault('INSTALL_TEST_BIN', - '$INSTALL_ROOT/test') - - SetOptionDefault('INSTALL_LIB', - '$INSTALL_ROOT/lib/${TARGET_VARIANT}') - - SetOptionDefault('INSTALL_SAMPLE_DATA', - '$INSTALL_ROOT/example') - - SetOptionDefault('INSTALL_TOOLS_DATA', - '$INSTALL_ROOT/tools') - - SetOptionDefault('PACKAGE_DIR', - '#_package') - - SetOptionDefault('PACKAGE_ROOT', - '#_package/${PRODUCT_VARIANT}') - - SetOptionDefault('ROOT', - '#') - - SetOptionDefault('PACKAGE_NAME', - '{PRODUCT_VARIANT}') - -if is_production(): - set_default_production_options() - ipp_mode = ['install_lib'] - if use_commercial_ipp(): - ipp_mode.append('use_commercial_ipp') - include_parts(ipp_parts, mode=ipp_mode, - INSTALL_INCLUDE='${INSTALL_IPP_INCLUDE}') - include_parts(utest_parts + common_parts + - member_parts + verifier_parts, - mode=['install_lib'], - INSTALL_INCLUDE='${INSTALL_EPID_INCLUDE}') - include_parts(util_parts + example_parts, - INSTALL_INCLUDE='${INSTALL_EPID_INCLUDE}', - INSTALL_BIN='${INSTALL_SAMPLE_BIN}', - INSTALL_DATA='${INSTALL_SAMPLE_DATA}') - include_parts(tools_parts, - INSTALL_BIN='${INSTALL_TOOLS_BIN}', - INSTALL_DATA='${INSTALL_TOOLS_DATA}') - PrintCompilerVersion(DefaultEnvironment()) - Default('all') - Default('run_utest::') - -if is_internal_test(): - set_default_production_options() - include_parts(ipp_parts) - include_parts(utest_parts + common_parts + - member_parts + verifier_parts) - include_parts(util_parts + example_parts, - INSTALL_BIN='${INSTALL_SAMPLE_BIN}', - INSTALL_DATA='${INSTALL_SAMPLE_DATA}') - include_parts(tools_parts, INSTALL_BIN='${INSTALL_TOOLS_BIN}') - include_parts(testbot_test_parts) - Default('all') - -if is_internal_tools(): - set_default_production_options() - include_parts(ipp_parts + utest_parts + common_parts + util_parts) - include_parts(internal_tools_parts, INSTALL_BIN='${INSTALL_TOOLS_BIN}') - Default('ikgfwrapper') - -if is_package(): - set_default_production_options() - include_parts(package_parts, - mode=['install_package'], - INSTALL_TOP_LEVEL='${PACKAGE_ROOT}') - Default('package') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/configure b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/configure deleted file mode 100755 index 02a6d411ea..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/configure +++ /dev/null @@ -1,3799 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Intel(R) EPID SDK . -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# Use a proper internal environment variable to ensure we don't fall - # into an infinite loop, continuously re-executing ourselves. - if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then - _as_can_reexec=no; export _as_can_reexec; - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 - fi - # We don't want this to propagate to other subprocesses. - { _as_can_reexec=; unset _as_can_reexec;} -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1 -test -x / || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - export CONFIG_SHELL - # We cannot yet assume a decent shell, so we have to provide a -# neutralization value for shells without unset; and this also -# works around shells that cannot unset nonexistent variables. -# Preserve -v and -x to the replacement shell. -BASH_ENV=/dev/null -ENV=/dev/null -(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; -esac -exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} -# Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -exit 255 -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # If we had to re-execute with $CONFIG_SHELL, we're ensured to have - # already done that, so ensure we don't try to do so again and fall - # in an infinite loop. This has already happened in practice. - _as_can_reexec=no; export _as_can_reexec - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='Intel(R) EPID SDK' -PACKAGE_TARNAME='intel-r--epid-sdk' -PACKAGE_VERSION=' ' -PACKAGE_STRING='Intel(R) EPID SDK ' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' - -ac_default_prefix=`pwd`/_install -ac_subst_vars='LTLIBOBJS -LIBOBJS -ac_ct_CXX -CXXFLAGS -CXX -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CXX -CXXFLAGS -CCC' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures Intel(R) EPID SDK to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root - [DATAROOTDIR/doc/intel-r--epid-sdk] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of Intel(R) EPID SDK :";; - esac - cat <<\_ACEOF - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CXX C++ compiler command - CXXFLAGS C++ compiler flags - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -Intel(R) EPID SDK configure -generated by GNU Autoconf 2.69 - -Copyright (C) 2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_cxx_try_compile -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by Intel(R) EPID SDK $as_me , which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -# save flags -CFLAGS_OLD="$CFLAGS" -CPPFLAGS_OLD="$CPPFLAGS" - -#c compiler priority -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in gcc icc cc - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in gcc icc cc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -#c++ compiler priority -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ icpc c++ - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ icpc c++ -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CXX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if ${ac_cv_cxx_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if ${ac_cv_prog_cxx_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# restore flags -CFLAGS="$CFLAGS_OLD" -CPPFLAGS="$CPPFLAGS_OLD" - -# default install path is current directory - -ac_config_files="$ac_config_files Makefile" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -:mline -/\\$/{ - N - s,\\\n,, - b mline -} -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` - - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by Intel(R) EPID SDK $as_me , which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to the package provider." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -Intel(R) EPID SDK config.status -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - - -eval set X " :F $CONFIG_FILES " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/configure.ac b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/configure.ac deleted file mode 100644 index c5d3082725..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/configure.ac +++ /dev/null @@ -1,20 +0,0 @@ -AC_INIT([Intel(R) EPID SDK],[ ]) - -# save flags -CFLAGS_OLD="$CFLAGS" -CPPFLAGS_OLD="$CPPFLAGS" - -#c compiler priority -AC_PROG_CC([gcc icc cc]) -#c++ compiler priority -AC_PROG_CXX([g++ icpc c++]) - -# restore flags -CFLAGS="$CFLAGS_OLD" -CPPFLAGS="$CPPFLAGS_OLD" - -# default install path is current directory -AC_PREFIX_DEFAULT([`pwd`/_install]) -AC_CONFIG_FILES([Makefile]) -AC_OUTPUT - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/epid_params-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/epid_params-testhelper.cc deleted file mode 100644 index f1be7e9e1a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/epid_params-testhelper.cc +++ /dev/null @@ -1,216 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Intel(R) EPID 1.1 parameters C++ wrapper implementation. - */ - -#include - -#include "epid/common-testhelper/1.1/epid_params-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/src/ecgroup-internal.h" -#include "epid/common/math/src/finitefield-internal.h" -#include "epid/common/math/src/pairing-internal.h" -} - -#ifndef COUNT_OF -#define COUNT_OF(a) (sizeof(a) / sizeof((a)[0])) -#endif // COUNT_OF - -Epid11ParamsObj::Epid11ParamsObj() { - // construct Fq finite field - FiniteFieldObj fq(this->q_str_); - - // Create G1 - // G1 is an elliptic curve group E(Fq).It can be initialized as follows: - // Set G1 = E(Fq).init(p, q, h, a, b, g1.x, g1.y) - G1 = EcGroupObj(&fq, FfElementObj(&fq, a_str_), FfElementObj(&fq, b_str_), - FfElementObj(&fq, g1_str_.x), FfElementObj(&fq, g1_str_.y), - BigNumObj(p_str_), BigNumObj(h_str_)); - - // construct Fq1 finite field - FiniteFieldObj fq1(this->q1_str_); - - // Create G3 - // G3 is an elliptic curve group E(Fq) as well (but with different - // parameters). - // It can be initialized as follows: - // Set G3 = Fq.init(p', q', h', a', b', g3.x, g3.y) - G3 = - EcGroupObj(&fq1, FfElementObj(&fq1, a1_str_), FfElementObj(&fq1, b1_str_), - FfElementObj(&fq1, g3_str_.x), FfElementObj(&fq1, g3_str_.y), - BigNumObj(p1_str_), BigNumObj(h1_str_)); - - // construct Fqd finite field - FiniteFieldObj fqd(fq, this->coeffs_str_, COUNT_OF(this->coeffs_str_)); - - // Fqk ground element is {-qnr, 0, 0} - FfElementObj neg_qnr(&fq); - THROW_ON_EPIDERR(FfNeg(fq, FfElementObj(&fq, qnr_str), neg_qnr)); - Fq3ElemStr ground_element_str = {0}; - THROW_ON_EPIDERR(WriteFfElement(fq, neg_qnr, &ground_element_str.a[0], - sizeof(ground_element_str.a[0]))); - FfElementObj ground_element(&fqd, ground_element_str); - - // construct GT:=Fqk finite field - GT = FiniteFieldObj(fqd, ground_element, 2); - - // G2 is an elliptic curve group E(Fqd).It can be initialized as follows: - - FfElementObj qnr(&fq, qnr_str); - - // twista = (a * qnr * qnr) mod q - FfElementObj twista_fq(&fq, a_str_); - THROW_ON_EPIDERR(FfMul(fq, twista_fq, qnr, twista_fq)); - THROW_ON_EPIDERR(FfMul(fq, twista_fq, qnr, twista_fq)); - Fq3ElemStr twista_str = {0}; - THROW_ON_EPIDERR( - WriteFfElement(fq, twista_fq, &twista_str.a[0], sizeof(twista_str.a[0]))); - - // twistb = (b * qnr * qnr * qnr) mod q - FfElementObj twistb_fq(&fq, b_str_); - THROW_ON_EPIDERR(FfMul(fq, twistb_fq, qnr, twistb_fq)); - THROW_ON_EPIDERR(FfMul(fq, twistb_fq, qnr, twistb_fq)); - THROW_ON_EPIDERR(FfMul(fq, twistb_fq, qnr, twistb_fq)); - Fq3ElemStr twistb_str = {0}; - THROW_ON_EPIDERR( - WriteFfElement(fq, twistb_fq, &twistb_str.a[0], sizeof(twistb_str.a[0]))); - - // cofactor is 1 for G2 - const BigNumStr h2_str_ = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}; - - // Create G2 - // Set G2 = E(Fqd).init(orderG2, param(Fqd), twista, twistb, g2.x, g2.y). - G2 = EcGroupObj(&fqd, FfElementObj(&fqd, twista_str), - FfElementObj(&fqd, twistb_str), FfElementObj(&fqd, g2x_str_), - FfElementObj(&fqd, g2y_str_), BigNumObj(orderG2_str), - BigNumObj(h2_str_)); -} - -const BigNumStr Epid11ParamsObj::p_str_ = { - {{0x00, 0x00, 0x89, 0x57, 0x3F, 0x17, 0x47, 0x30, 0x8C, 0x43, 0xD5, 0xEE, - 0x41, 0x97, 0x96, 0x19, 0x72, 0xBB, 0x86, 0x88, 0xED, 0x4B, 0xEF, 0x04, - 0xAB, 0xAE, 0xC3, 0x8E, 0xEC, 0x51, 0xC3, 0xD3}}}; - -const BigNumStr Epid11ParamsObj::q_str_ = { - {{0x09, 0xF9, 0x24, 0xE5, 0xD9, 0xBC, 0x67, 0x7F, 0x81, 0x0D, 0xF0, 0x25, - 0x58, 0xF7, 0x53, 0x13, 0xA9, 0x8A, 0xA6, 0x10, 0x47, 0x65, 0x5D, 0x73, - 0x9E, 0xF1, 0x94, 0xEB, 0x05, 0xB1, 0xA7, 0x11}}}; - -const std::vector Epid11ParamsObj::h_str_ = {0x00, 0x00, 0x12, 0x97}; -const FqElemStr Epid11ParamsObj::a_str_ = { - {{0x05, 0x53, 0xD7, 0xC8, 0x81, 0xF7, 0x78, 0xC2, 0x2C, 0x37, 0xB6, 0xC0, - 0x16, 0x3E, 0x68, 0x24, 0x3A, 0x84, 0x78, 0x1C, 0x0A, 0xDF, 0x9B, 0xB3, - 0xED, 0x21, 0xC4, 0x46, 0xE5, 0xA7, 0xA3, 0x92}}}; -const FqElemStr Epid11ParamsObj::b_str_ = { - {{0x00, 0x3A, 0x2E, 0x39, 0x0E, 0x10, 0xD8, 0xAC, 0x47, 0xCB, 0x29, 0xC8, - 0xF1, 0x2C, 0x7F, 0x11, 0x99, 0x2A, 0x18, 0xB7, 0xEF, 0x73, 0x48, 0xA6, - 0xBE, 0x70, 0xA6, 0x8B, 0x97, 0x34, 0x8A, 0xB1}}}; - -const BigNumStr Epid11ParamsObj::coeffs_str_[3] = { - {{{0x02, 0x16, 0x7A, 0x61, 0x53, 0xDD, 0xF6, 0xE2, 0x89, 0x15, 0xA0, 0x94, - 0xF1, 0xB5, 0xDC, 0x65, 0x21, 0x15, 0x62, 0xE1, 0x7D, 0xC5, 0x43, 0x89, - 0xEE, 0xB4, 0xEF, 0xC8, 0xA0, 0x8E, 0x34, 0x0F}}}, - - {{{0x04, 0x82, 0x27, 0xE1, 0xEB, 0x98, 0x64, 0xC2, 0x8D, 0x8F, 0xDD, 0x0E, - 0x82, 0x40, 0xAE, 0xD4, 0x31, 0x63, 0xD6, 0x46, 0x32, 0x16, 0x85, 0x7A, - 0xB7, 0x18, 0x68, 0xB8, 0x17, 0x02, 0x81, 0xA6}}}, - - {{{0x06, 0x20, 0x76, 0xE8, 0x54, 0x54, 0x53, 0xB4, 0xA9, 0xD8, 0x44, 0x4B, - 0xAA, 0xFB, 0x1C, 0xFD, 0xAE, 0x15, 0xCA, 0x29, 0x79, 0xA6, 0x24, 0xA4, - 0x0A, 0xF6, 0x1E, 0xAC, 0xED, 0xFB, 0x10, 0x41}}}}; - -const FqElemStr Epid11ParamsObj::qnr_str = { - {0x08, 0x66, 0xA7, 0x67, 0x36, 0x6E, 0x62, 0x71, 0xB7, 0xA6, 0x52, 0x94, - 0x8F, 0xFB, 0x25, 0x9E, 0xE6, 0x4F, 0x25, 0xE5, 0x26, 0x9A, 0x2B, 0x6E, - 0x7E, 0xF8, 0xA6, 0x39, 0xAE, 0x46, 0xAA, 0x24}}; - -const std::vector Epid11ParamsObj::orderG2_str = { - 0x00, 0x03, 0xDF, 0xFC, 0xBE, 0x2F, 0x5C, 0x2E, 0x45, 0x49, 0x7A, 0x2A, - 0x91, 0xBA, 0xD1, 0x3E, 0x01, 0xEC, 0x5F, 0xC2, 0x15, 0x14, 0x10, 0xB3, - 0x28, 0x5E, 0x56, 0xCC, 0x26, 0x51, 0x24, 0x93, 0x0E, 0x6C, 0x99, 0x96, - 0x38, 0xE0, 0x7D, 0x68, 0x8C, 0xB7, 0x97, 0x23, 0xF4, 0xAC, 0x4D, 0xBC, - 0x5E, 0x01, 0x15, 0xFF, 0x45, 0x60, 0x08, 0x13, 0xCD, 0x59, 0xD7, 0x73, - 0xB0, 0x0C, 0x20, 0x5E, 0xAB, 0xAA, 0x24, 0x31, 0xE2, 0x2A, 0xA2, 0x53, - 0x8A, 0xF7, 0x86, 0xD5, 0x19, 0x78, 0xC5, 0x55, 0x9C, 0x08, 0xB7, 0xE2, - 0xF4, 0xD0, 0x37, 0x74, 0x93, 0x56, 0x62, 0x7B, 0x95, 0xCC, 0x2C, 0xB0}; - -const BigNumStr Epid11ParamsObj::p1_str_ = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE6, 0xFA, 0xAD, 0xA7, 0x17, 0x9E, 0x84, - 0xF3, 0xB9, 0xCA, 0xC2, 0xFC, 0x63, 0x25, 0x51}}}; - -const BigNumStr Epid11ParamsObj::q1_str_ = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}}}; - -const std::vector Epid11ParamsObj::h1_str_ = {0x00, 0x00, 0x00, 0x01}; - -const FqElemStr Epid11ParamsObj::a1_str_ = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC}}}; -const FqElemStr Epid11ParamsObj::b1_str_ = { - {{0x5A, 0xC6, 0x35, 0xD8, 0xAA, 0x3A, 0x93, 0xE7, 0xB3, 0xEB, 0xBD, 0x55, - 0x76, 0x98, 0x86, 0xBC, 0x65, 0x1D, 0x06, 0xB0, 0xCC, 0x53, 0xB0, 0xF6, - 0x3B, 0xCE, 0x3C, 0x3E, 0x27, 0xD2, 0x60, 0x4B}}}; - -const Epid11G1ElemStr Epid11ParamsObj::g1_str_ = { - {{{0x07, 0x78, 0x3B, 0x0D, 0xFE, 0x4A, 0xA3, 0x19, 0x49, 0xB0, 0xCE, 0xAF, - 0x3F, 0x74, 0x0F, 0x32, 0x16, 0x0C, 0x8B, 0x46, 0x94, 0x5B, 0xA5, 0xB0, - 0xE4, 0x8A, 0xDA, 0xD8, 0x88, 0x32, 0x90, 0x53}}}, - {{{0x08, 0xF7, 0xA2, 0xAA, 0xBA, 0x62, 0xB3, 0xFE, 0x29, 0x80, 0xC9, 0x5B, - 0x63, 0x53, 0xC8, 0x24, 0x3C, 0x7C, 0x1F, 0x4C, 0xDA, 0xCD, 0xE5, 0x5F, - 0xA2, 0x36, 0x93, 0x04, 0x3C, 0x3A, 0xBC, 0x2E}}}}; -const Fq3ElemStr Epid11ParamsObj::g2x_str_ = { - {{{{0x02, 0x10, 0x9A, 0xF4, 0x06, 0x32, 0x30, 0x89, 0xCB, 0x95, 0xE9, 0x55, - 0x0E, 0x9D, 0xAF, 0x0E, 0x98, 0xCD, 0xCA, 0xDC, 0xB1, 0xFF, 0xFC, 0xD1, - 0x45, 0x66, 0xBB, 0x86, 0x46, 0x1E, 0x8C, 0x30}}}, - {{{0x04, 0x78, 0x53, 0xE1, 0x3F, 0x96, 0xC5, 0xE4, 0x15, 0x23, 0x7B, 0x1F, - 0x3F, 0x2C, 0xD3, 0x95, 0x40, 0xBC, 0x7A, 0x31, 0x1F, 0x14, 0x38, 0x9E, - 0x1A, 0xA5, 0xD6, 0x63, 0x10, 0x91, 0xE4, 0xD3}}}, - {{{0x00, 0xB4, 0x02, 0xBC, 0x47, 0xFA, 0xA6, 0x29, 0x82, 0x0B, 0xB1, 0xD5, - 0xFF, 0xF2, 0xE6, 0xB0, 0xC6, 0xAE, 0xE8, 0x7B, 0x91, 0xD9, 0xEE, 0x66, - 0x07, 0x1F, 0xFD, 0xA2, 0xE7, 0x02, 0x66, 0xDD}}}}}; - -const Fq3ElemStr Epid11ParamsObj::g2y_str_ = { - {{{{0x05, 0x2E, 0xF8, 0xC6, 0xC1, 0x6A, 0xEF, 0x3C, 0xC1, 0x95, 0xF6, 0x26, - 0xCE, 0x5E, 0x55, 0xD1, 0x64, 0x13, 0x28, 0xB1, 0x18, 0x57, 0xD8, 0x1B, - 0x84, 0xFA, 0xEC, 0x7E, 0x5D, 0x99, 0x06, 0x49}}}, - {{{0x05, 0x73, 0x35, 0xA9, 0xA7, 0xF2, 0xA1, 0x92, 0x5F, 0x3E, 0x7C, 0xDF, - 0xAC, 0xFE, 0x0F, 0xF5, 0x08, 0xD0, 0x3C, 0xAE, 0xCD, 0x58, 0x00, 0x5F, - 0xD0, 0x84, 0x7E, 0xEA, 0x63, 0x57, 0xFE, 0xC6}}}, - {{{0x01, 0x56, 0xDA, 0xF3, 0x72, 0x61, 0xDA, 0xC6, 0x93, 0xB0, 0xAC, 0xEF, - 0xAA, 0xD4, 0x51, 0x6D, 0xCA, 0x71, 0x1E, 0x06, 0x73, 0xEA, 0x83, 0xB2, - 0xB1, 0x99, 0x4A, 0x4D, 0x4A, 0x0D, 0x35, 0x07}}}}}; -const Epid11G3ElemStr Epid11ParamsObj::g3_str_ = { - {{{0x6B, 0x17, 0xD1, 0xF2, 0xE1, 0x2C, 0x42, 0x47, 0xF8, 0xBC, 0xE6, 0xE5, - 0x63, 0xA4, 0x40, 0xF2, 0x77, 0x03, 0x7D, 0x81, 0x2D, 0xEB, 0x33, 0xA0, - 0xF4, 0xA1, 0x39, 0x45, 0xD8, 0x98, 0xC2, 0x96}}}, - {{{0x4F, 0xE3, 0x42, 0xE2, 0xFE, 0x1A, 0x7F, 0x9B, 0x8E, 0xE7, 0xEB, 0x4A, - 0x7C, 0x0F, 0x9E, 0x16, 0x2B, 0xCE, 0x33, 0x57, 0x6B, 0x31, 0x5E, 0xCE, - 0xCB, 0xB6, 0x40, 0x68, 0x37, 0xBF, 0x51, 0xF5}}}}; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/epid_params-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/epid_params-testhelper.h deleted file mode 100644 index 82b80d3cd3..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/epid_params-testhelper.h +++ /dev/null @@ -1,78 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Intel(R) EPID 1.1 parameters C++ wrapper interface. -*/ -#ifndef EPID_COMMON_TESTHELPER_1_1_EPID_PARAMS_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_1_1_EPID_PARAMS_TESTHELPER_H_ - -#include -#include - -extern "C" { -#include "epid/common/math/bignum.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/1.1/types.h" -} - -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" - -class Epid11ParamsObj { - public: - Epid11ParamsObj(); - - // This class instances are not meant to be copied. - // Explicitly delete copy constructor and assignment operator. - Epid11ParamsObj(const Epid11ParamsObj&) = delete; - Epid11ParamsObj& operator=(const Epid11ParamsObj&) = delete; - - virtual ~Epid11ParamsObj() {} - - FiniteFieldObj GT; - EcGroupObj G1; - EcGroupObj G2; - EcGroupObj G3; - - private: - static const BigNumStr p_str_; - static const BigNumStr q_str_; - static const std::vector h_str_; - static const FqElemStr a_str_; - static const FqElemStr b_str_; - static const BigNumStr coeffs_str_[3]; - static const FqElemStr qnr_str; - - static const std::vector orderG2_str; - - static const BigNumStr p1_str_; - static const BigNumStr q1_str_; - static const std::vector h1_str_; - static const FqElemStr a1_str_; - static const FqElemStr b1_str_; - - static const Epid11G1ElemStr g1_str_; - static const Fq3ElemStr g2x_str_; - static const Fq3ElemStr g2y_str_; - static const Epid11G3ElemStr g3_str_; -}; - -#endif // EPID_COMMON_TESTHELPER_1_1_EPID_PARAMS_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/epid_grpcrt.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/epid_grpcrt.inc deleted file mode 100644 index b3ba691bd4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/epid_grpcrt.inc +++ /dev/null @@ -1,52 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 group public key - * Group : grpX - */ -//unsigned char epid_grpcrt_dat[] = { - 0x00, 0x00, 0x00, 0x7b, 0x08, 0x4a, 0x9d, 0x2e, 0xf9, 0x4f, 0x78, 0x02, - 0xd7, 0x89, 0x75, 0xb4, 0xe7, 0x25, 0x26, 0x9f, 0x00, 0x57, 0xad, 0x33, - 0x30, 0xea, 0xa9, 0x6c, 0x00, 0x9e, 0x8b, 0xc8, 0x13, 0x23, 0xcb, 0x06, - 0x04, 0xbe, 0x42, 0x74, 0x11, 0x07, 0xb1, 0x06, 0xd7, 0xef, 0x5f, 0x66, - 0x87, 0xd9, 0xfa, 0xdd, 0x53, 0xae, 0xd7, 0xf4, 0x54, 0xf8, 0xd0, 0x21, - 0x75, 0xe0, 0x07, 0x44, 0xc9, 0xc3, 0x4e, 0xf7, 0x06, 0xd8, 0xa9, 0x90, - 0x02, 0x8f, 0xca, 0xa5, 0x73, 0x36, 0x24, 0x03, 0xc9, 0xa8, 0x7e, 0x9d, - 0x64, 0x12, 0xac, 0xa7, 0xbd, 0x17, 0x7f, 0x7c, 0x96, 0x8d, 0x2e, 0x13, - 0xd9, 0xb2, 0x69, 0x47, 0x09, 0xdb, 0xe3, 0xbf, 0xbc, 0xa1, 0x34, 0x0f, - 0xc6, 0xe2, 0x00, 0x3d, 0x98, 0xa3, 0x7d, 0xab, 0xd4, 0x0e, 0xec, 0xde, - 0x4f, 0x97, 0xa9, 0xbb, 0xdd, 0x60, 0x94, 0x24, 0x7b, 0xb3, 0xf5, 0x94, - 0x02, 0x43, 0x78, 0x9f, 0x54, 0xc1, 0x21, 0x3a, 0x2b, 0x4d, 0x12, 0x65, - 0x2f, 0x51, 0x94, 0xc6, 0x34, 0x24, 0xd9, 0x7b, 0x06, 0x3a, 0xc4, 0xf5, - 0x56, 0xeb, 0x32, 0xe3, 0xee, 0x7b, 0xad, 0x6b, 0x04, 0x90, 0x86, 0x31, - 0x18, 0x2a, 0xa4, 0xcf, 0xa3, 0x90, 0xa5, 0x80, 0x7b, 0xae, 0x3b, 0xb1, - 0x77, 0x03, 0xe7, 0x7e, 0xf2, 0xfc, 0x6d, 0x3a, 0xab, 0x8f, 0xbf, 0x95, - 0x40, 0xed, 0x08, 0x03, 0x01, 0x05, 0x86, 0xf5, 0x42, 0xea, 0x4d, 0xf7, - 0x4f, 0xef, 0x46, 0xdf, 0x8f, 0xe8, 0x2d, 0xbb, 0x5d, 0x0d, 0x2f, 0x4f, - 0xf4, 0xd8, 0x31, 0xc6, 0x5a, 0x97, 0x98, 0x44, 0xcf, 0x42, 0x5a, 0xf3, - 0x03, 0x5f, 0xb6, 0x38, 0x45, 0x5a, 0x15, 0x1e, 0xb9, 0x54, 0xfa, 0x2c, - 0x3f, 0x68, 0x7b, 0x4e, 0x85, 0x35, 0xf3, 0x5b, 0xe5, 0xdc, 0x96, 0x2b, - 0x18, 0x84, 0x5e, 0x1e, 0x53, 0xdc, 0x22, 0x23, 0x06, 0x08, 0x91, 0x5a, - 0x2d, 0x27, 0xe2, 0x12, 0x69, 0xfa, 0xab, 0x19, 0x7c, 0x47, 0x6b, 0xec, - 0xde, 0xc6, 0x25, 0xd4, 0x43, 0xb4, 0x65, 0x23, 0x61, 0x0f, 0x1f, 0x2d, - 0xfd, 0xb1, 0x18, 0xb0, 0x04, 0x8e, 0x1a, 0xc5, 0x95, 0x9a, 0x0e, 0x37, - 0x7c, 0x5e, 0x95, 0x38, 0xc2, 0xcf, 0xfa, 0x1f, 0xe3, 0x3a, 0x2b, 0x85, - 0xa5, 0xfd, 0x6b, 0xc4, 0x1d, 0xfb, 0x47, 0x27, 0xaf, 0xc1, 0x94, 0xcd -// }; -//unsigned int epid_grpcrt_dat_len = 392; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0.inc deleted file mode 100644 index 75b62e0446..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "test message" - * Basename: "basename1" - * SigRl : group x sigrl - */ - //unsigned char sig_sha256_bsn0_msg0_dat[] = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, - 0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, - 0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, - 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, - 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, - 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, - 0x7b, 0xfc, 0x0a, 0x6c, 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, - 0x3a, 0xc6, 0x01, 0x3a, 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, - 0x84, 0xde, 0xc3, 0x3b, 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, - 0x25, 0x98, 0x89, 0xdb, 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, - 0x63, 0x8c, 0xe1, 0x93, 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, - 0x05, 0x39, 0x5a, 0xef, 0x26, 0xf8, 0x6c, 0x41, 0x5d, 0x7f, 0xb2, 0x63, - 0x92, 0x5c, 0xf4, 0x82, 0xa3, 0x93, 0xe3, 0x02, 0x14, 0x55, 0x47, 0x99, - 0xa5, 0xf9, 0xf7, 0xad, 0x1f, 0x66, 0x23, 0x50, 0x08, 0xab, 0x10, 0x95, - 0x9a, 0x0c, 0x0f, 0x62, 0xca, 0xcb, 0x63, 0x6f, 0xc6, 0xb3, 0xb1, 0x06, - 0x52, 0x33, 0x56, 0xad, 0x8e, 0xac, 0xfe, 0xe4, 0x56, 0x88, 0xed, 0x8e, - 0xdd, 0xa4, 0x20, 0x7f, 0x03, 0xb7, 0x4c, 0xda, 0xb1, 0x70, 0x9d, 0x8c, - 0x5b, 0x34, 0x08, 0x37, 0x84, 0xbc, 0xd0, 0x54, 0xdf, 0x52, 0x40, 0x41, - 0xfe, 0x58, 0x48, 0x86, 0x43, 0x51, 0xa9, 0x7d, 0x53, 0x21, 0x01, 0xe6, - 0x06, 0x2b, 0xd0, 0xd3, 0x8a, 0xe0, 0xb6, 0xc3, 0xad, 0xb3, 0x6c, 0x12, - 0x75, 0x50, 0x19, 0xd2, 0x69, 0xc7, 0x41, 0x98, 0xf3, 0xfb, 0x5c, 0x58, - 0xe0, 0x8c, 0x0b, 0x22, 0x6f, 0x05, 0xa1, 0x0e, 0x45, 0xce, 0x2e, 0x83, - 0xd8, 0xd9, 0xeb, 0xc9, 0x9a, 0x81, 0x38, 0x1d, 0x33, 0x9a, 0x16, 0x9f, - 0x4c, 0x06, 0xf0, 0xb2, 0xc1, 0x1d, 0xb8, 0x54, 0xe4, 0x0f, 0x61, 0x36, - 0xd8, 0xbc, 0xbf, 0x0c, 0x60, 0x71, 0xde, 0x72, 0x10, 0x0e, 0x0a, 0x30, - 0x04, 0x60, 0x00, 0x00, 0x78, 0xb5, 0xb6, 0xc2, 0xdd, 0x20, 0x6a, 0xb5, - 0xdf, 0x61, 0x64, 0xd0, 0xa9, 0x02, 0x88, 0x4c, 0xdd, 0x2b, 0x81, 0x79, - 0x2e, 0x50, 0xb6, 0x1c, 0xaa, 0xf0, 0x74, 0x31, 0x31, 0x34, 0x00, 0x00, - 0x0a, 0xd1, 0xbf, 0x34, 0xa2, 0x84, 0xc8, 0x9b, 0xdf, 0xdc, 0xb5, 0x95, - 0x4a, 0xad, 0x76, 0xc2, 0xc6, 0xb0, 0xa3, 0x77, 0x25, 0x76, 0xb3, 0x2e, - 0x34, 0xfb, 0x79, 0x16, 0x0a, 0x7c, 0x00, 0xaf, 0x5b, 0x22, 0x71, 0x98, - 0xb6, 0xeb, 0x67, 0x3d, 0x94, 0x4a, 0xb6, 0x5e, 0x99, 0x81, 0xc5, 0x96, - 0x91, 0x55, 0xba, 0x2f, 0x16, 0x01, 0x4e, 0xe1, 0x25, 0xad, 0xca, 0x94, - 0x88, 0x60, 0x3b, 0xa2, 0x56, 0x0a, 0x94, 0x0b, 0x2c, 0x3e, 0xd0, 0x8f, - 0x15, 0x07, 0x3d, 0xd5, 0xbe, 0x72, 0x3e, 0x2d, 0x06, 0x74, 0xff, 0x06, - 0xed, 0x47, 0x28, 0x08, 0x0c, 0xa0, 0x6f, 0xdb, 0x75, 0x55, 0x32, 0xdc, - 0x97, 0x47, 0x60, 0x4e, 0x6f, 0xb4, 0x29, 0x89, 0x0c, 0x00, 0x00, 0x37, - 0x1e, 0xcd, 0x0f, 0x66, 0x09, 0x7d, 0x33, 0x9a, 0xdc, 0x47, 0x28, 0xf7, - 0x91, 0xf3, 0xc2, 0xbc, 0x3a, 0xa9, 0x05, 0x62, 0xfc, 0xdd, 0x8c, 0x65, - 0xc2, 0xa8, 0x14, 0x55, 0x52, 0x00, 0x00, 0x11, 0xed, 0x83, 0xfc, 0x60, - 0x97, 0x7e, 0x5e, 0x15, 0xe0, 0x43, 0xdb, 0x01, 0x0b, 0xc7, 0x93, 0xa0, - 0xef, 0x08, 0xf6, 0x4f, 0x91, 0xda, 0x83, 0x14, 0x34, 0x0d, 0x4f, 0x25, - 0xaf, 0x00, 0x00, 0x80, 0x3d, 0xc0, 0x9e, 0x85, 0xc8, 0x48, 0x35, 0xf8, - 0xd2, 0x7b, 0x6b, 0xcf, 0xfc, 0xe9, 0xe4, 0x59, 0x6d, 0x06, 0x4e, 0x12, - 0x56, 0x00, 0xbc, 0xb4, 0x6e, 0x20, 0x3a, 0xf4, 0x34, 0x00, 0x00, 0x2e, - 0x06, 0xcd, 0x93, 0x4f, 0x39, 0x62, 0x0b, 0xb1, 0x12, 0xf4, 0x49, 0x22, - 0xe5, 0x55, 0x29, 0x08, 0xd0, 0x51, 0x02, 0x14, 0xc3, 0xc5, 0x6d, 0xa3, - 0xb0, 0xd9, 0x67, 0x61, 0xec, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_bsn0_msg0_dat_len = 577; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0_single_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0_single_entry.inc deleted file mode 100644 index f00bee5460..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0_single_entry.inc +++ /dev/null @@ -1,97 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "test message" - * Basename: "basename1" - * SigRl : group x sigrl - */ -//unsigned char sig_sha256_bsn0_msg0_dat[] = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, - 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, - 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, - 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, - 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, - 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, 0x05, 0x39, 0x5a, 0xef, - 0x26, 0xf8, 0x6c, 0x41, 0x5d, 0x7f, 0xb2, 0x63, 0x92, 0x5c, 0xf4, 0x82, - 0xa3, 0x93, 0xe3, 0x02, 0x14, 0x55, 0x47, 0x99, 0xa5, 0xf9, 0xf7, 0xad, - 0x1f, 0x66, 0x23, 0x50, 0x08, 0xab, 0x10, 0x95, 0x9a, 0x0c, 0x0f, 0x62, - 0xca, 0xcb, 0x63, 0x6f, 0xc6, 0xb3, 0xb1, 0x06, 0x52, 0x33, 0x56, 0xad, - 0x8e, 0xac, 0xfe, 0xe4, 0x56, 0x88, 0xed, 0x8e, 0xdd, 0xa4, 0x20, 0x7f, - 0x03, 0xb7, 0x4c, 0xda, 0xb1, 0x70, 0x9d, 0x8c, 0x5b, 0x34, 0x08, 0x37, - 0x84, 0xbc, 0xd0, 0x54, 0xdf, 0x52, 0x40, 0x41, 0xfe, 0x58, 0x48, 0x86, - 0x43, 0x51, 0xa9, 0x7d, 0x53, 0x21, 0x01, 0xe6, 0x06, 0x2b, 0xd0, 0xd3, - 0x8a, 0xe0, 0xb6, 0xc3, 0xad, 0xb3, 0x6c, 0x12, 0x75, 0x50, 0x19, 0xd2, - 0x69, 0xc7, 0x41, 0x98, 0xf3, 0xfb, 0x5c, 0x58, 0xe0, 0x8c, 0x0b, 0x22, - 0x6f, 0x05, 0xa1, 0x0e, 0x45, 0xce, 0x2e, 0x83, 0xd8, 0xd9, 0xeb, 0xc9, - 0x9a, 0x81, 0x38, 0x1d, 0x33, 0x9a, 0x16, 0x9f, 0x4c, 0x06, 0xf0, 0xb2, - 0xc1, 0x1d, 0xb8, 0x54, 0xe4, 0x0f, 0x61, 0x36, 0xd8, 0xbc, 0xbf, 0x0c, - 0x60, 0x71, 0xde, 0x72, 0x10, 0x0e, 0x0a, 0x30, 0x04, 0x60, 0x00, 0x00, - 0x78, 0xb5, 0xb6, 0xc2, 0xdd, 0x20, 0x6a, 0xb5, 0xdf, 0x61, 0x64, 0xd0, - 0xa9, 0x02, 0x88, 0x4c, 0xdd, 0x2b, 0x81, 0x79, 0x2e, 0x50, 0xb6, 0x1c, - 0xaa, 0xf0, 0x74, 0x31, 0x31, 0x34, 0x00, 0x00, 0x0a, 0xd1, 0xbf, 0x34, - 0xa2, 0x84, 0xc8, 0x9b, 0xdf, 0xdc, 0xb5, 0x95, 0x4a, 0xad, 0x76, 0xc2, - 0xc6, 0xb0, 0xa3, 0x77, 0x25, 0x76, 0xb3, 0x2e, 0x34, 0xfb, 0x79, 0x16, - 0x0a, 0x7c, 0x00, 0xaf, 0x5b, 0x22, 0x71, 0x98, 0xb6, 0xeb, 0x67, 0x3d, - 0x94, 0x4a, 0xb6, 0x5e, 0x99, 0x81, 0xc5, 0x96, 0x91, 0x55, 0xba, 0x2f, - 0x16, 0x01, 0x4e, 0xe1, 0x25, 0xad, 0xca, 0x94, 0x88, 0x60, 0x3b, 0xa2, - 0x56, 0x0a, 0x94, 0x0b, 0x2c, 0x3e, 0xd0, 0x8f, 0x15, 0x07, 0x3d, 0xd5, - 0xbe, 0x72, 0x3e, 0x2d, 0x06, 0x74, 0xff, 0x06, 0xed, 0x47, 0x28, 0x08, - 0x0c, 0xa0, 0x6f, 0xdb, 0x75, 0x55, 0x32, 0xdc, 0x97, 0x47, 0x60, 0x4e, - 0x6f, 0xb4, 0x29, 0x89, 0x0c, 0x00, 0x00, 0x37, 0x1e, 0xcd, 0x0f, 0x66, - 0x09, 0x7d, 0x33, 0x9a, 0xdc, 0x47, 0x28, 0xf7, 0x91, 0xf3, 0xc2, 0xbc, - 0x3a, 0xa9, 0x05, 0x62, 0xfc, 0xdd, 0x8c, 0x65, 0xc2, 0xa8, 0x14, 0x55, - 0x52, 0x00, 0x00, 0x11, 0xed, 0x83, 0xfc, 0x60, 0x97, 0x7e, 0x5e, 0x15, - 0xe0, 0x43, 0xdb, 0x01, 0x0b, 0xc7, 0x93, 0xa0, 0xef, 0x08, 0xf6, 0x4f, - 0x91, 0xda, 0x83, 0x14, 0x34, 0x0d, 0x4f, 0x25, 0xaf, 0x00, 0x00, 0x80, - 0x3d, 0xc0, 0x9e, 0x85, 0xc8, 0x48, 0x35, 0xf8, 0xd2, 0x7b, 0x6b, 0xcf, - 0xfc, 0xe9, 0xe4, 0x59, 0x6d, 0x06, 0x4e, 0x12, 0x56, 0x00, 0xbc, 0xb4, - 0x6e, 0x20, 0x3a, 0xf4, 0x34, 0x00, 0x00, 0x2e, 0x06, 0xcd, 0x93, 0x4f, - 0x39, 0x62, 0x0b, 0xb1, 0x12, 0xf4, 0x49, 0x22, 0xe5, 0x55, 0x29, 0x08, - 0xd0, 0x51, 0x02, 0x14, 0xc3, 0xc5, 0x6d, 0xa3, 0xb0, 0xd9, 0x67, 0x61, - 0xec, - - 0x00, 0x00, 0x00, 0x01, - - 0x00, 0x00, 0x00, 0x01, - - 0x70, 0x1a, 0x63, 0xed, 0x78, 0xb4, 0xfa, 0xe1, 0x22, 0xc8, 0xfc, 0xd7, - 0xfb, 0xf4, 0x63, 0x1f, 0xcf, 0x82, 0x02, 0x28, 0xe5, 0x70, 0xe0, 0x4e, - 0x73, 0xbd, 0xdf, 0xa2, 0xaf, 0x5a, 0xfe, 0xc8, 0x58, 0x95, 0xed, 0x67, - 0xc9, 0xcf, 0x41, 0xe9, 0x5c, 0xd9, 0x71, 0x30, 0x7a, 0xa2, 0x8e, 0xfb, - 0xb2, 0x59, 0xd8, 0x12, 0x47, 0x5d, 0x9f, 0x8b, 0x2f, 0x8c, 0xb9, 0x2c, - 0xb5, 0x12, 0x3d, 0x4c, 0x46, 0x06, 0x99, 0x02, 0xe5, 0x20, 0x99, 0x77, - 0x98, 0x29, 0x51, 0xb2, 0xee, 0x7b, 0x6e, 0xd9, 0xed, 0xbc, 0x1d, 0xf3, - 0xfe, 0xe5, 0xdb, 0x98, 0x02, 0x1e, 0xc7, 0x6b, 0x87, 0xdb, 0x81, 0x74, - 0x3c, 0x40, 0xbf, 0x24, 0xcb, 0xce, 0xc5, 0x3a, 0xd0, 0xd3, 0x5d, 0xd9, - 0x2c, 0xaf, 0xe0, 0x33, 0x84, 0xb6, 0xc4, 0xa3, 0xd5, 0x54, 0xdb, 0x18, - 0x6d, 0x10, 0x02, 0x90, 0x00, 0xc1, 0xdc, 0x59, 0x76, 0xdb, 0x0e, 0x72, - 0x49, 0xa8, 0x6f, 0xb1, 0x8e, 0x7b, 0xbe, 0xf8, 0xf6, 0x93, 0xe0, 0x1a, - 0xcc, 0xac, 0xe8, 0x4d, 0xe4, 0x41, 0xc3, 0xe8, 0xaa, 0x4a, 0x25, 0x96, - 0xd4, 0xc2, 0x9a, 0x87 -//}; -// unsigned int sig_sha256_bsn0_msg0_dat_len = 733; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0_three_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0_three_entry.inc deleted file mode 100644 index 7c80fe71b6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0_three_entry.inc +++ /dev/null @@ -1,127 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ -/*! -* \file -* \brief Test data. -* -* Type : Intel(R) EPID 1.1 Signature -* Group : grpX -* Signer : member0 -* HashAlg : Sha256 -* Message : "test message" -* Basename: "basename1" -* SigRl : group x sigrl -*/ -//unsigned char epid_sig_dat[] = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, - 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, - 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, - 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, - 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, - 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, 0x06, 0x88, 0x3b, 0x78, - 0xf9, 0x69, 0x8f, 0x4f, 0x80, 0x9b, 0xc6, 0x38, 0x30, 0x10, 0x12, 0x82, - 0x31, 0x00, 0x61, 0x15, 0x2f, 0x4d, 0x56, 0x14, 0x67, 0x30, 0x24, 0xb9, - 0xeb, 0xed, 0x75, 0x80, 0x06, 0x23, 0xbe, 0x49, 0x73, 0x18, 0x07, 0xf0, - 0xd7, 0xd1, 0xe9, 0x20, 0x39, 0xfc, 0x94, 0xb2, 0xaf, 0x72, 0xd6, 0xe5, - 0x3d, 0x29, 0x40, 0xc0, 0x6c, 0x58, 0x4e, 0xe9, 0xe8, 0x49, 0x5d, 0x8e, - 0x08, 0x04, 0x55, 0xec, 0x09, 0x9e, 0x63, 0x24, 0x50, 0x5b, 0xc5, 0x08, - 0x5d, 0xb9, 0xd2, 0xcf, 0x70, 0x48, 0xd3, 0x2e, 0x53, 0x12, 0x97, 0x5e, - 0xa4, 0xa5, 0x9f, 0xb5, 0xc4, 0xd3, 0x5e, 0xc3, 0x05, 0x33, 0x98, 0x86, - 0xcd, 0xac, 0x34, 0x41, 0xee, 0xf5, 0x03, 0x05, 0xed, 0x4b, 0xca, 0x08, - 0xc8, 0x31, 0x63, 0xce, 0x9e, 0xd8, 0xe2, 0xba, 0x9a, 0x0d, 0x7e, 0x5e, - 0x79, 0xc1, 0x13, 0xd4, 0xa4, 0xe6, 0x5e, 0x44, 0x54, 0xad, 0x61, 0xb8, - 0x99, 0xb7, 0xaf, 0xdc, 0x54, 0xf8, 0x3e, 0x5d, 0x47, 0xa9, 0x05, 0xdb, - 0xb6, 0xc1, 0x85, 0x1f, 0xaf, 0xb1, 0xe1, 0x0d, 0xd4, 0x71, 0x1b, 0x91, - 0x29, 0x69, 0x02, 0xd6, 0x0b, 0xd4, 0x33, 0x66, 0x4b, 0x5e, 0x00, 0x00, - 0x13, 0x3e, 0x2c, 0x68, 0xd2, 0x0b, 0x68, 0x2c, 0x22, 0x9d, 0x2d, 0xf0, - 0x74, 0x29, 0x87, 0x58, 0xb9, 0xa0, 0xc2, 0xdb, 0xd8, 0x68, 0xba, 0x46, - 0xc7, 0x75, 0x5b, 0x94, 0x4c, 0x4c, 0x00, 0x00, 0x41, 0x7b, 0xde, 0xfb, - 0xe0, 0x3c, 0x45, 0xf4, 0xf1, 0x9e, 0x70, 0x52, 0x37, 0x39, 0x20, 0xf6, - 0xb9, 0xa8, 0x0f, 0x49, 0x58, 0x4a, 0x72, 0x46, 0x31, 0xe5, 0xad, 0x92, - 0x47, 0x88, 0x00, 0xf1, 0x59, 0x15, 0x9e, 0x42, 0x7a, 0x60, 0x15, 0x74, - 0xc9, 0x37, 0x64, 0x10, 0x21, 0x83, 0x2d, 0x3c, 0xcd, 0xd1, 0xc1, 0xa1, - 0x85, 0x1b, 0x08, 0x2e, 0x8c, 0xb8, 0xfd, 0xe7, 0xb7, 0x82, 0xc4, 0xa2, - 0xa4, 0x71, 0x40, 0x1c, 0x1f, 0xf9, 0x7d, 0x7d, 0xf5, 0x2c, 0xd6, 0x63, - 0x2e, 0x7e, 0x34, 0x69, 0x8a, 0x1b, 0xdf, 0x7b, 0x01, 0x01, 0x92, 0xfc, - 0xa3, 0xc8, 0xb4, 0xa1, 0x0e, 0x18, 0x40, 0x96, 0xa1, 0xdf, 0xf2, 0xcb, - 0x75, 0x9d, 0x90, 0x54, 0xb0, 0x00, 0x00, 0x53, 0x86, 0xa4, 0x1c, 0xa8, - 0x29, 0x33, 0xda, 0x92, 0xe4, 0xab, 0x77, 0x79, 0x70, 0xe4, 0x84, 0xa9, - 0x5f, 0xdf, 0x8a, 0x23, 0x7d, 0xb0, 0xc6, 0x57, 0x22, 0x41, 0x7f, 0x99, - 0x5b, 0x00, 0x00, 0x4f, 0x52, 0x39, 0xde, 0xce, 0x9e, 0xc3, 0xf8, 0xa1, - 0x42, 0xf0, 0x71, 0xda, 0x5c, 0x43, 0xde, 0xe0, 0xdd, 0x88, 0x8a, 0xe5, - 0xb8, 0x38, 0xb1, 0x60, 0x75, 0xee, 0x1b, 0x04, 0xbb, 0x00, 0x00, 0x47, - 0xd6, 0xef, 0x11, 0x6f, 0xb8, 0x98, 0x06, 0x17, 0x14, 0x2d, 0x40, 0x5a, - 0xbd, 0x6a, 0x2d, 0xae, 0xb6, 0x04, 0x70, 0x56, 0x52, 0x4d, 0x6c, 0x1f, - 0x2d, 0x43, 0x1f, 0xad, 0x82, 0x00, 0x00, 0x1f, 0xb9, 0xdf, 0x3c, 0xf7, - 0xac, 0x90, 0x1c, 0x7a, 0xfc, 0x07, 0xf8, 0x01, 0x50, 0x52, 0x30, 0xba, - 0xc2, 0xb4, 0x7c, 0x0a, 0x0c, 0x25, 0xae, 0xd6, 0x6a, 0x38, 0x8d, 0xe1, - 0x13, - - 0x00, 0x00, 0x00, 0x03, - - 0x00, 0x00, 0x00, 0x03, - - 0x98, 0x4f, 0xd9, 0x6a, 0x1f, 0xaa, 0xfc, 0xfb, 0x38, 0xbf, 0x49, 0x9e, - 0xd5, 0x1b, 0xc6, 0x48, 0xac, 0xeb, 0xc4, 0x1a, 0xec, 0x7c, 0xeb, 0xd9, - 0x1b, 0x02, 0xa4, 0xbc, 0x1d, 0x1a, 0x73, 0x79, 0x3f, 0x56, 0x15, 0x80, - 0x70, 0x94, 0x7b, 0xfe, 0xfc, 0x7a, 0x02, 0x4a, 0x16, 0xd1, 0x6b, 0x71, - 0xaa, 0x89, 0x12, 0xbe, 0x34, 0xc1, 0x08, 0xbf, 0xd7, 0xf8, 0xae, 0xc9, - 0xeb, 0xe9, 0xb3, 0xb8, 0xa5, 0x5f, 0x11, 0xfc, 0x6d, 0x4e, 0x9a, 0x86, - 0xe4, 0x67, 0xdf, 0xcc, 0xb6, 0xab, 0xf8, 0xee, 0x65, 0xf7, 0x19, 0x28, - 0x8c, 0x71, 0x60, 0xb0, 0x70, 0xc3, 0x7f, 0x20, 0xf0, 0xfa, 0x5f, 0xc8, - 0x09, 0xe4, 0xd1, 0x9f, 0xf4, 0x69, 0x00, 0xb9, 0x63, 0xc9, 0xc0, 0xa9, - 0xad, 0x62, 0x1f, 0x7c, 0xbb, 0xfc, 0x81, 0xe7, 0xc7, 0x37, 0xd1, 0xb4, - 0x59, 0x8f, 0x9a, 0xcf, 0x20, 0x2d, 0x9b, 0x6b, 0x9a, 0x1a, 0x4f, 0x28, - 0xdd, 0x4f, 0x9b, 0x2d, 0x4f, 0x20, 0x47, 0x70, 0xed, 0x85, 0xbc, 0x55, - 0x63, 0x9a, 0x37, 0xfd, 0xf1, 0xd7, 0xf1, 0x19, 0x37, 0x85, 0x2b, 0x55, - 0xcc, 0x8a, 0xfd, 0x67, - - 0x49, 0x3a, 0x78, 0x1c, 0x57, 0x03, 0x7d, 0x84, 0x3c, 0xf4, 0x19, 0x6a, - 0xd2, 0x98, 0xcb, 0xe6, 0x6c, 0x7f, 0xf9, 0xa4, 0x80, 0xf8, 0x86, 0xc1, - 0x6f, 0xe2, 0x31, 0xd9, 0xeb, 0x92, 0x39, 0xd8, 0x9e, 0xcd, 0x78, 0xbf, - 0x50, 0xc5, 0xb8, 0xeb, 0xec, 0xcb, 0x3f, 0x96, 0x2c, 0x11, 0x01, 0x7f, - 0xb2, 0xd2, 0xc6, 0xf9, 0x01, 0xe5, 0x5d, 0x69, 0xed, 0xf0, 0xd5, 0xf4, - 0x2e, 0x1f, 0x68, 0x6f, 0xde, 0x76, 0x65, 0x91, 0x25, 0x86, 0xfe, 0xe4, - 0x55, 0xd1, 0x43, 0x2a, 0x19, 0x2e, 0xd8, 0x38, 0x1a, 0xec, 0x2b, 0xc9, - 0x14, 0xc3, 0x54, 0xd6, 0xe2, 0x7e, 0xd3, 0xe7, 0x77, 0xc8, 0x77, 0x75, - 0x28, 0x3d, 0xb6, 0x6e, 0xac, 0x29, 0x4c, 0x70, 0xcc, 0xa5, 0x50, 0xad, - 0xf1, 0x29, 0xf5, 0xea, 0xa5, 0x44, 0xda, 0xc1, 0xc5, 0x47, 0x39, 0x8e, - 0xbb, 0xa9, 0x63, 0xf9, 0x4c, 0xe9, 0x5a, 0xa4, 0x58, 0x2c, 0x33, 0xc7, - 0x24, 0x4b, 0x03, 0x54, 0xb4, 0xdb, 0x41, 0x51, 0xa7, 0x9a, 0x89, 0x46, - 0x27, 0x49, 0x08, 0xe6, 0x64, 0xca, 0xb7, 0xd2, 0x1c, 0xfa, 0x62, 0x2b, - 0x01, 0xb0, 0xb7, 0x98, - - 0xd3, 0x7d, 0x29, 0xfb, 0x5e, 0x1f, 0x3a, 0x27, 0xc1, 0x26, 0xdc, 0x52, - 0x48, 0x16, 0xfa, 0x89, 0xb9, 0x68, 0x2e, 0xfb, 0xb8, 0xa2, 0xc0, 0x1a, - 0x74, 0xc5, 0x39, 0x1e, 0xe1, 0x9f, 0x25, 0x09, 0x02, 0xe6, 0x26, 0xda, - 0x39, 0x8c, 0xf0, 0x73, 0xa5, 0x2d, 0x59, 0x6e, 0xde, 0x5d, 0x64, 0x66, - 0x96, 0x87, 0x0e, 0x08, 0xa2, 0x78, 0x96, 0x7c, 0x8c, 0x54, 0xa4, 0x54, - 0xf1, 0x3c, 0x81, 0x44, 0xd5, 0x30, 0x4c, 0x2a, 0xdb, 0x5a, 0xbd, 0x13, - 0x5f, 0xa5, 0x7e, 0xbf, 0x7c, 0x9d, 0x51, 0x8b, 0x17, 0x49, 0xce, 0x4c, - 0x33, 0xaa, 0x7f, 0x6e, 0x8d, 0xdb, 0x18, 0x77, 0x02, 0x5b, 0xc6, 0x88, - 0x65, 0xf3, 0x94, 0x99, 0x6d, 0xcd, 0xa5, 0xa7, 0xa4, 0xbd, 0x62, 0xfa, - 0x36, 0x7c, 0xa5, 0xd7, 0x3c, 0xe3, 0x6b, 0x7e, 0x36, 0x02, 0x57, 0xa5, - 0xd2, 0x8e, 0x28, 0xa9, 0x4b, 0xc0, 0xca, 0xf2, 0xe9, 0x92, 0x86, 0x55, - 0xeb, 0x63, 0xc4, 0x7f, 0x45, 0x7f, 0x2f, 0xbb, 0x89, 0xa5, 0xa6, 0x10, - 0xe9, 0x4f, 0x98, 0x08, 0x43, 0xc8, 0x53, 0xad, 0x07, 0x8a, 0xb0, 0xe7, - 0x8e, 0x8f, 0x7b, 0x45, -//}; -//unsigned int epid_sig_dat_len = 1053; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg1.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg1.inc deleted file mode 100644 index 0c42c86000..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg1.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "test1" - * Basename: "basename1" - * SigRl : group x sigrl - */ - //unsigned char sig_sha256_bsn0_msg1_dat[] = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, - 0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, - 0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, - 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, - 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, - 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, - 0x7b, 0xfc, 0x0a, 0x6c, 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, - 0x3a, 0xc6, 0x01, 0x3a, 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, - 0x84, 0xde, 0xc3, 0x3b, 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, - 0x25, 0x98, 0x89, 0xdb, 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, - 0x63, 0x8c, 0xe1, 0x93, 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, - 0x03, 0xf0, 0x18, 0x3e, 0x21, 0xd3, 0x65, 0xa6, 0x2f, 0x7e, 0x85, 0xa9, - 0x9f, 0x7b, 0x28, 0x4e, 0xf0, 0x9c, 0xd1, 0xda, 0xc4, 0x4b, 0xe4, 0x8f, - 0xc0, 0xe1, 0x4c, 0xaf, 0xcf, 0x85, 0xf7, 0x5c, 0x01, 0x1a, 0x15, 0xd9, - 0x4c, 0xf5, 0xdc, 0xc6, 0xce, 0xc5, 0x95, 0x3c, 0x1f, 0xe6, 0x57, 0x3c, - 0xbd, 0x8f, 0x5d, 0x05, 0x6e, 0xf9, 0xa3, 0x1e, 0xfb, 0x11, 0x18, 0x0e, - 0xfa, 0x07, 0x3b, 0xfd, 0x06, 0xdb, 0x21, 0xaa, 0x13, 0x05, 0xf3, 0x49, - 0x63, 0xb2, 0x8e, 0x1d, 0x22, 0x58, 0x53, 0x32, 0xd5, 0x86, 0xcf, 0xd2, - 0x2b, 0xfb, 0xf0, 0xe7, 0x56, 0x63, 0xd7, 0x12, 0xd5, 0xe0, 0xa8, 0x71, - 0x03, 0x1c, 0xe4, 0x83, 0x1d, 0x58, 0x63, 0xad, 0xa0, 0x48, 0xf3, 0x69, - 0x6b, 0xbd, 0x04, 0x4b, 0x81, 0xc7, 0x11, 0xa0, 0x26, 0x48, 0x9d, 0x12, - 0xe7, 0x13, 0x20, 0xb4, 0x15, 0xec, 0xbb, 0x06, 0xd1, 0x8e, 0x61, 0xb1, - 0xac, 0x11, 0x77, 0x86, 0x4c, 0x03, 0x6a, 0x9a, 0xe6, 0x3a, 0xd7, 0x2b, - 0xc8, 0x12, 0xf5, 0xa7, 0x0a, 0x8b, 0x3d, 0xa3, 0x23, 0xdc, 0x66, 0x66, - 0x7e, 0x67, 0x19, 0x62, 0x65, 0x60, 0xe8, 0x36, 0x48, 0x97, 0x18, 0xfd, - 0xbf, 0x43, 0x00, 0x00, 0x12, 0xa8, 0x4b, 0x8b, 0xf4, 0x38, 0x73, 0x30, - 0x84, 0xbd, 0x3e, 0xeb, 0x88, 0xe4, 0x52, 0xd1, 0xd2, 0xb4, 0x35, 0x05, - 0x38, 0x66, 0x5c, 0x4f, 0x56, 0xa1, 0x9a, 0x71, 0x82, 0x30, 0x00, 0x00, - 0x3f, 0x2e, 0x31, 0x92, 0x93, 0x40, 0x32, 0x64, 0xf0, 0x5c, 0xfa, 0x4e, - 0x69, 0xf8, 0xe6, 0x13, 0x7e, 0x7d, 0x1f, 0xb0, 0x32, 0x76, 0x1c, 0x39, - 0x42, 0xcf, 0x58, 0xa4, 0xe7, 0x16, 0x00, 0x6f, 0x16, 0x43, 0x7f, 0xa4, - 0x4e, 0x58, 0x7d, 0x50, 0xd0, 0x4a, 0x02, 0x89, 0xeb, 0x57, 0x06, 0x8e, - 0x61, 0x90, 0x50, 0x1d, 0x29, 0xbf, 0x31, 0xaa, 0x58, 0x2b, 0xa2, 0xc2, - 0x0d, 0x23, 0x37, 0x25, 0x15, 0xfd, 0xfc, 0x9c, 0x64, 0xa1, 0xea, 0x12, - 0x32, 0x2c, 0x96, 0x24, 0xa9, 0xa8, 0x75, 0x18, 0x5f, 0xb4, 0xf8, 0xfe, - 0xd9, 0xf2, 0xd9, 0x44, 0x45, 0xfe, 0x4e, 0x8a, 0xb7, 0x68, 0x0f, 0x6b, - 0x5e, 0x05, 0xab, 0xec, 0x1b, 0x5e, 0xcd, 0x44, 0x6a, 0x00, 0x00, 0x33, - 0x45, 0xea, 0x26, 0x29, 0x78, 0xe5, 0x0b, 0x40, 0xe5, 0xe0, 0xe2, 0x78, - 0xdb, 0x9a, 0xf8, 0xef, 0xa5, 0x3b, 0x54, 0x57, 0x0a, 0x4a, 0x2c, 0x47, - 0xd0, 0x1d, 0x55, 0xd8, 0x5e, 0x00, 0x00, 0x30, 0xc0, 0x99, 0xac, 0xcf, - 0xb3, 0x0e, 0xd1, 0xf0, 0xc3, 0xfb, 0x47, 0xf5, 0x7e, 0xaa, 0xb7, 0xba, - 0x05, 0x21, 0x04, 0xcd, 0x12, 0x07, 0x3f, 0xb6, 0x12, 0x1b, 0x3b, 0x19, - 0x12, 0x00, 0x00, 0x3a, 0x2b, 0x9e, 0x80, 0x2a, 0x14, 0x1b, 0x21, 0x81, - 0xf8, 0x79, 0xfb, 0xe7, 0x9a, 0x60, 0x90, 0x66, 0x81, 0x65, 0x24, 0x49, - 0x27, 0x80, 0x18, 0x29, 0x42, 0x8c, 0xaa, 0xd9, 0xb8, 0x00, 0x00, 0x4e, - 0x0b, 0x8c, 0x7e, 0x01, 0xad, 0x83, 0xd1, 0xaa, 0xb4, 0xa3, 0x75, 0xd9, - 0x42, 0xa0, 0x9f, 0x1c, 0xd9, 0x05, 0x10, 0x78, 0x78, 0x60, 0xe6, 0xe5, - 0xa3, 0x24, 0x79, 0x47, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_bsn0_msg1_dat_len = 577; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn1_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn1_msg0.inc deleted file mode 100644 index a13cf0431e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn1_msg0.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "test message" - * Basename: "basename2" - * SigRl : group x sigrl - */ - //unsigned char sig_sha256_bsn1_msg0_dat[] = { - 0x67, 0x58, 0xb2, 0x9c, 0xad, 0x61, 0x1f, 0xfb, - 0x74, 0x23, 0xea, 0x40, 0xe9, 0x66, 0x26, 0xb0, 0x43, 0xdc, 0x7e, 0xc7, - 0x48, 0x88, 0x56, 0x59, 0xf3, 0x35, 0x9f, 0xdb, 0xfa, 0xa2, 0x49, 0x51, - 0x85, 0x35, 0x42, 0x50, 0x8e, 0x79, 0x79, 0xc0, 0x6c, 0xcc, 0x39, 0x0b, - 0xad, 0x3b, 0x39, 0x33, 0xae, 0xb2, 0xa1, 0xc5, 0x28, 0x6f, 0x48, 0x3a, - 0xd2, 0x63, 0x5d, 0xfb, 0x1b, 0x1f, 0x8a, 0x63, 0x84, 0xdc, 0x2d, 0xad, - 0x3b, 0x98, 0x3f, 0xc3, 0x8e, 0x18, 0xd7, 0xea, 0x18, 0x50, 0x0c, 0x50, - 0x42, 0x77, 0xb2, 0x59, 0xf5, 0xd5, 0x38, 0xc3, 0x8d, 0x57, 0xf4, 0xe7, - 0xb8, 0x74, 0x5a, 0x9e, 0x32, 0x75, 0xd1, 0xb4, 0xb3, 0x64, 0xbc, 0x23, - 0xcd, 0x98, 0x29, 0x7a, 0x77, 0x51, 0xfc, 0x26, 0x81, 0x41, 0x9b, 0xf6, - 0x21, 0xad, 0xc1, 0xd9, 0xab, 0x30, 0x25, 0x8d, 0x0c, 0x3b, 0x62, 0xe2, - 0x05, 0xe1, 0x05, 0xdd, 0x55, 0x7e, 0xf6, 0x7a, 0x66, 0xf9, 0x64, 0x67, - 0x2b, 0x57, 0x0b, 0xd1, 0x83, 0x12, 0xfa, 0x67, 0x4d, 0x29, 0x3e, 0x86, - 0x91, 0xbb, 0x4c, 0x9a, 0x50, 0xf4, 0xba, 0xab, 0x02, 0x46, 0x36, 0x83, - 0x12, 0x54, 0xf6, 0x5e, 0xcb, 0xd7, 0xcd, 0x8c, 0x47, 0x72, 0x43, 0xf4, - 0x5f, 0x8b, 0x9f, 0xa6, 0x31, 0x38, 0x8c, 0x52, 0xde, 0x16, 0x0f, 0xe5, - 0xea, 0x3b, 0x51, 0x18, 0x06, 0xda, 0xec, 0x18, 0x94, 0xdc, 0xb2, 0x32, - 0xc8, 0x0f, 0xfd, 0x43, 0x15, 0x9c, 0x91, 0xb2, 0xf4, 0x90, 0xb6, 0x9c, - 0xb8, 0xcd, 0x49, 0xfc, 0x27, 0xff, 0x68, 0x33, 0xc3, 0x06, 0xb9, 0x05, - 0x04, 0x9b, 0x71, 0x83, 0x6b, 0xf0, 0x95, 0x31, 0x16, 0x70, 0x30, 0xc9, - 0x4b, 0xcd, 0x63, 0x85, 0xc6, 0xf4, 0x3f, 0xe9, 0x35, 0x19, 0x02, 0x61, - 0x91, 0x52, 0xda, 0x47, 0xcf, 0x40, 0xed, 0x40, 0xda, 0x8d, 0xe3, 0xbb, - 0x31, 0xee, 0xf6, 0x3e, 0x83, 0x6a, 0x20, 0xc0, 0x38, 0xc6, 0xb1, 0x5d, - 0x78, 0xff, 0x2b, 0x5e, 0x90, 0x53, 0x04, 0xb0, 0x25, 0x49, 0x04, 0xb4, - 0x38, 0x1f, 0x56, 0xfe, 0x15, 0x23, 0x7d, 0xbc, 0x31, 0xc6, 0x38, 0x71, - 0xe5, 0xa3, 0x00, 0x00, 0x0b, 0x8c, 0x01, 0xef, 0x56, 0x72, 0x20, 0x1d, - 0x30, 0x95, 0x62, 0x3c, 0x37, 0x91, 0x32, 0x94, 0xf3, 0xa4, 0x73, 0x68, - 0x6c, 0xda, 0x11, 0x7f, 0x3e, 0x33, 0xa2, 0x35, 0xcb, 0x7c, 0x00, 0x00, - 0x43, 0xb9, 0x97, 0x4e, 0x4b, 0xcc, 0x01, 0x30, 0xea, 0xba, 0xcf, 0x5a, - 0x4a, 0x4c, 0x35, 0xdc, 0x2a, 0xfa, 0x3a, 0xa7, 0x8b, 0x07, 0x50, 0x1b, - 0x28, 0x83, 0x5f, 0x12, 0xd5, 0x3f, 0x00, 0x93, 0x24, 0x59, 0x9b, 0x1c, - 0x46, 0xd6, 0x1b, 0x85, 0x23, 0x4d, 0x05, 0xf2, 0x14, 0x00, 0x31, 0xe0, - 0x53, 0x85, 0x0b, 0x0a, 0xa5, 0x75, 0x6d, 0x74, 0x65, 0x87, 0x12, 0xa5, - 0x2f, 0x98, 0x23, 0x2f, 0x93, 0x21, 0x24, 0x93, 0x1e, 0x4e, 0x51, 0x0e, - 0x7a, 0x46, 0x01, 0x0b, 0x9b, 0xc8, 0xc7, 0xb0, 0xd0, 0x5d, 0x6a, 0x54, - 0xc5, 0x76, 0xf3, 0xdb, 0x40, 0xe1, 0x9e, 0xd0, 0x33, 0x32, 0xd5, 0x13, - 0x57, 0xf9, 0x74, 0x20, 0x86, 0x6b, 0xa8, 0xfb, 0xb9, 0x00, 0x00, 0x17, - 0xb0, 0xa5, 0x95, 0x02, 0x3c, 0x4e, 0x02, 0x73, 0x38, 0xc7, 0xbb, 0x5f, - 0xef, 0x48, 0x70, 0xde, 0xf4, 0xa4, 0x45, 0x4c, 0x7d, 0x9c, 0x19, 0xc8, - 0x98, 0x56, 0x13, 0xe3, 0x31, 0x00, 0x00, 0x6b, 0xdb, 0xe4, 0x38, 0x71, - 0xdc, 0x95, 0xf0, 0x40, 0xb1, 0xc8, 0xcd, 0x88, 0xe2, 0x75, 0xc1, 0xeb, - 0x7f, 0xb0, 0x6f, 0x9a, 0x46, 0xca, 0x1a, 0xb3, 0xf3, 0xc9, 0xe4, 0x56, - 0xaa, 0x00, 0x00, 0x6b, 0x89, 0xf7, 0xd9, 0x55, 0x3c, 0x9f, 0xd6, 0xf6, - 0x71, 0x0e, 0xc3, 0xe8, 0xbf, 0xe1, 0x3a, 0x91, 0x1d, 0xe8, 0x8d, 0x9d, - 0x1d, 0x20, 0x08, 0x4e, 0x2e, 0x04, 0x9c, 0xd0, 0x06, 0x00, 0x00, 0x23, - 0x5c, 0x31, 0x9b, 0x46, 0x4a, 0xff, 0x19, 0x16, 0x89, 0x06, 0x35, 0x58, - 0xdf, 0xf4, 0x2d, 0x17, 0x04, 0x21, 0x28, 0x80, 0x66, 0x2c, 0x48, 0xb6, - 0x4f, 0xee, 0xd0, 0xe5, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_bsn1_msg0_dat_len = 577; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_rndbase_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_rndbase_msg0.inc deleted file mode 100644 index 470e82cfa4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_rndbase_msg0.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "test message" - * Basename: None (random base) - * SigRl : group x sigrl - */ -//unsigned char sig_sha256_rndbase_msg0_dat[] = { - 0x0a, 0x53, 0xeb, 0x13, 0xda, 0x3e, 0xc9, 0xe9, - 0x7d, 0xed, 0x23, 0xd3, 0xd0, 0x71, 0xf4, 0xdb, 0xf7, 0x36, 0x83, 0x24, - 0x09, 0x87, 0x20, 0x5d, 0x48, 0x2d, 0x6c, 0x3a, 0xf3, 0xe2, 0x46, 0xcd, - 0x8b, 0x2a, 0xaf, 0x60, 0x6b, 0xe3, 0x64, 0x9c, 0x9e, 0x6a, 0x6d, 0x05, - 0xb0, 0xf9, 0x61, 0xc6, 0x60, 0xd6, 0x70, 0xcf, 0xa6, 0x9f, 0x4a, 0xc0, - 0x7b, 0x3a, 0xb6, 0xa2, 0xbd, 0x85, 0xcf, 0x2b, 0xce, 0x9e, 0xf0, 0x48, - 0x85, 0xf9, 0x65, 0xf5, 0x73, 0x2c, 0xfc, 0x52, 0x21, 0x7e, 0xfa, 0x85, - 0xfc, 0x6a, 0x06, 0xad, 0xa5, 0xce, 0x3d, 0xb6, 0xe0, 0xc8, 0x34, 0x38, - 0x01, 0x8e, 0xea, 0x76, 0x99, 0xb4, 0x52, 0x99, 0xa7, 0x89, 0x86, 0x18, - 0x5f, 0xd9, 0xef, 0x06, 0x99, 0xeb, 0x63, 0x54, 0xd5, 0x8d, 0x44, 0x9b, - 0xb0, 0xa2, 0x86, 0xed, 0x1f, 0x85, 0xf7, 0x2e, 0x26, 0xfd, 0x31, 0xd9, - 0x05, 0x9b, 0x64, 0x1c, 0x73, 0x26, 0xeb, 0xce, 0xce, 0x77, 0xa1, 0xef, - 0x58, 0x16, 0x56, 0x7f, 0xaa, 0xa9, 0xc0, 0x21, 0x94, 0xa5, 0xa2, 0xdb, - 0xe8, 0x12, 0x00, 0x5f, 0x1e, 0x87, 0x42, 0x53, 0x08, 0x04, 0xa7, 0xe9, - 0x14, 0xd9, 0x9a, 0x56, 0xb1, 0x63, 0x5a, 0x64, 0x67, 0xa8, 0xb9, 0x96, - 0xff, 0xa6, 0x89, 0x47, 0xf3, 0xd9, 0x15, 0x82, 0xf6, 0x11, 0x9a, 0x39, - 0xc1, 0x85, 0x87, 0xac, 0x09, 0xdd, 0x35, 0xcf, 0x01, 0x34, 0xd7, 0x7f, - 0x6f, 0xe6, 0xfa, 0xa8, 0x5d, 0x12, 0x42, 0xa4, 0x32, 0x3a, 0x63, 0x76, - 0x46, 0xe5, 0xbe, 0x4d, 0xfb, 0xb4, 0xba, 0xa3, 0x64, 0x8e, 0x97, 0xfe, - 0x05, 0xe4, 0x86, 0xc6, 0x3d, 0xd7, 0x2e, 0xaf, 0xcf, 0xa4, 0x83, 0x66, - 0xe2, 0x84, 0x99, 0xf5, 0x55, 0x3f, 0xdf, 0x1e, 0x86, 0x2b, 0x61, 0x35, - 0xc2, 0x4b, 0x07, 0xc6, 0xa7, 0xe2, 0x59, 0x3e, 0xa8, 0xc7, 0x47, 0x34, - 0x42, 0xdb, 0x72, 0xec, 0xe6, 0x67, 0x85, 0xeb, 0xbe, 0xdd, 0x02, 0x37, - 0x1a, 0xc1, 0x7c, 0xea, 0xf1, 0x43, 0x19, 0xe1, 0x38, 0xb6, 0x82, 0x13, - 0x78, 0xeb, 0xe4, 0xa2, 0xe6, 0xd7, 0x26, 0x27, 0x4f, 0x33, 0x75, 0xaa, - 0x4c, 0x76, 0x00, 0x00, 0x75, 0x35, 0x2a, 0xdf, 0x8a, 0x7e, 0x29, 0xa8, - 0x12, 0xb7, 0x53, 0xaa, 0x51, 0x8a, 0x69, 0x2f, 0xa1, 0xf2, 0x4b, 0xac, - 0x33, 0x8e, 0xc6, 0xaa, 0xb3, 0x89, 0x2d, 0xa0, 0xf1, 0x61, 0x00, 0x00, - 0x5c, 0xb7, 0x83, 0x21, 0x28, 0x00, 0x91, 0xbd, 0x39, 0x38, 0xf0, 0x45, - 0x9b, 0xf7, 0xd3, 0x36, 0x13, 0x22, 0x04, 0x39, 0x6c, 0x5b, 0x0e, 0xb0, - 0x7b, 0x31, 0x8f, 0xa6, 0xe6, 0xd2, 0x00, 0x15, 0xa8, 0xec, 0xf1, 0xc2, - 0x68, 0xc8, 0x68, 0x75, 0xf3, 0xef, 0x66, 0x60, 0x35, 0x88, 0x5f, 0xae, - 0x3d, 0xd9, 0x26, 0x8e, 0x54, 0xdb, 0xc4, 0x5d, 0xf1, 0xb5, 0x57, 0xc2, - 0x1b, 0xca, 0x18, 0x65, 0xd8, 0xb5, 0x4d, 0xa8, 0xfa, 0x7a, 0x12, 0x6d, - 0xca, 0x65, 0x19, 0x26, 0x4d, 0x2c, 0xf6, 0x15, 0x3d, 0xbf, 0x18, 0xce, - 0xc8, 0x83, 0xbd, 0x7f, 0xe8, 0x73, 0xb4, 0xba, 0xbd, 0xcd, 0xc9, 0xe1, - 0x03, 0xa6, 0x36, 0x1d, 0xe6, 0x4b, 0xf1, 0x79, 0xc2, 0x00, 0x00, 0x86, - 0x29, 0x09, 0x23, 0xe9, 0x08, 0x76, 0x02, 0xc2, 0xea, 0x06, 0xc6, 0x46, - 0xfd, 0x41, 0x5e, 0x10, 0x9e, 0x45, 0xf2, 0x68, 0xb1, 0x7c, 0xbf, 0x27, - 0x7e, 0x5f, 0x35, 0xa1, 0x61, 0x00, 0x00, 0x00, 0xef, 0x17, 0x44, 0x9a, - 0xf0, 0xe7, 0xb7, 0xb1, 0xef, 0x64, 0xc1, 0xe9, 0x1c, 0xec, 0x23, 0x28, - 0x38, 0xb2, 0x68, 0x5d, 0x57, 0x22, 0x8d, 0x17, 0x34, 0x39, 0x90, 0x73, - 0x9e, 0x00, 0x00, 0x32, 0xca, 0xac, 0xa4, 0xf3, 0xe0, 0xf1, 0xd4, 0x76, - 0xc8, 0x66, 0x52, 0xa1, 0x1c, 0x77, 0x12, 0x1b, 0x12, 0xa4, 0xf1, 0xa7, - 0x61, 0x58, 0xb3, 0xd8, 0x6d, 0xa4, 0x38, 0x6f, 0xd7, 0x00, 0x00, 0x0b, - 0xf7, 0xc6, 0xc9, 0xa2, 0x7b, 0x65, 0x26, 0x33, 0xaf, 0xbc, 0xd9, 0x5c, - 0x07, 0x57, 0x59, 0x14, 0xac, 0x40, 0x71, 0xbd, 0x25, 0x9c, 0xbb, 0x52, - 0x9e, 0x2a, 0x64, 0x70, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_rndbase_msg0_dat_len = 577; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_rndbase_msg1.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_rndbase_msg1.inc deleted file mode 100644 index 4682ed3d8f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_rndbase_msg1.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "test1" - * Basename: None (random base) - * SigRl : group x sigrl - */ -//unsigned char sig_sha256_rndbase_msg1_dat[] = { - 0x35, 0xac, 0x96, 0x37, 0xa4, 0x82, 0x58, 0xa1, - 0xf5, 0xa1, 0xd2, 0x6b, 0x65, 0x56, 0xb6, 0xee, 0x8f, 0x8d, 0xc8, 0xc7, - 0x8f, 0x54, 0x66, 0xad, 0xcc, 0x84, 0x5f, 0x7b, 0x97, 0x16, 0x3e, 0xa8, - 0x66, 0x20, 0x05, 0xb5, 0x3c, 0x84, 0xf9, 0xa2, 0x00, 0xd8, 0x0d, 0x61, - 0x93, 0x93, 0x0e, 0x81, 0x86, 0x1b, 0xe5, 0x53, 0xc0, 0xbe, 0xf1, 0x84, - 0x42, 0x75, 0x22, 0x60, 0xa3, 0xcf, 0x88, 0x35, 0x41, 0xf0, 0x0e, 0xd8, - 0x1c, 0x2f, 0xa0, 0x46, 0x2d, 0xbd, 0x5c, 0xee, 0xa1, 0xdb, 0xe3, 0x20, - 0x4c, 0xd3, 0x27, 0xe0, 0x92, 0x28, 0x85, 0x01, 0xbd, 0xe4, 0x13, 0x47, - 0x37, 0xaf, 0x30, 0xb7, 0x93, 0xce, 0x4d, 0x2c, 0x43, 0x31, 0xa7, 0x96, - 0x62, 0x53, 0xa5, 0x1b, 0x93, 0x49, 0x37, 0xb0, 0x7c, 0x67, 0x8e, 0x9e, - 0xf6, 0xe2, 0x5e, 0x3c, 0xcb, 0xcc, 0x2f, 0xc0, 0x50, 0x8f, 0xf4, 0xaa, - 0x04, 0x8d, 0x7b, 0x15, 0xf9, 0x89, 0xa6, 0x2f, 0x8a, 0xc3, 0xa0, 0x07, - 0x32, 0x6f, 0x25, 0x3c, 0x88, 0xa4, 0xf2, 0x93, 0x3c, 0x49, 0xe7, 0x84, - 0xb0, 0xc6, 0x77, 0xb3, 0x84, 0xcb, 0x0b, 0xb9, 0x00, 0x44, 0xd1, 0xca, - 0xea, 0x1e, 0xcc, 0xe2, 0x6f, 0xe9, 0x2b, 0x73, 0xfe, 0x13, 0x07, 0x27, - 0x36, 0x36, 0xc7, 0x0b, 0x7d, 0x76, 0xa2, 0xde, 0x96, 0xb1, 0x4a, 0xe4, - 0x05, 0x5f, 0x35, 0x1e, 0x01, 0x01, 0xfd, 0x80, 0x5f, 0x5a, 0xfd, 0x55, - 0x80, 0xe6, 0x76, 0xd9, 0xec, 0xfc, 0x1c, 0x4a, 0xf0, 0x3c, 0xec, 0x47, - 0x62, 0xca, 0x80, 0x12, 0x94, 0x7f, 0x3d, 0xc8, 0xe1, 0x7d, 0xdd, 0x20, - 0x01, 0xe3, 0x48, 0xdc, 0x78, 0xef, 0x45, 0x49, 0x30, 0x8d, 0xeb, 0xae, - 0x2a, 0x5a, 0x82, 0x40, 0x61, 0x16, 0xdb, 0x5c, 0x4c, 0x04, 0x0b, 0xc1, - 0x51, 0x64, 0xfb, 0x43, 0x2d, 0x71, 0xef, 0xf1, 0x76, 0xe4, 0xb6, 0xb8, - 0x9d, 0x27, 0x4f, 0xf4, 0x23, 0xaf, 0x56, 0x9f, 0x44, 0x7c, 0xb0, 0xb7, - 0x87, 0x89, 0xce, 0x05, 0xec, 0x06, 0xc3, 0x7f, 0xa1, 0x6c, 0xc3, 0xe1, - 0xa7, 0xd8, 0x02, 0xfc, 0x70, 0xd0, 0xd3, 0x40, 0x95, 0x85, 0x1c, 0x4b, - 0x15, 0x62, 0x00, 0x00, 0x62, 0xfb, 0xc3, 0x15, 0x6d, 0xf8, 0x4b, 0x50, - 0x52, 0xfd, 0xc9, 0x3a, 0xaf, 0x43, 0x22, 0x5e, 0xab, 0x76, 0x5a, 0x35, - 0x25, 0x32, 0x4c, 0x07, 0xf4, 0x03, 0xb6, 0x01, 0x09, 0xd8, 0x00, 0x00, - 0x32, 0x15, 0x7f, 0x79, 0xfe, 0x69, 0x79, 0x1c, 0x34, 0xe3, 0xdf, 0x9a, - 0xef, 0x31, 0xf4, 0x79, 0xad, 0x38, 0xf1, 0xee, 0x89, 0x95, 0x46, 0x56, - 0x82, 0x04, 0x7a, 0xda, 0xd5, 0x23, 0x00, 0x2b, 0x11, 0xa1, 0x5a, 0xc6, - 0x23, 0x46, 0xde, 0x9c, 0x86, 0x99, 0x4f, 0xd0, 0xf7, 0x10, 0xe7, 0x1d, - 0xd7, 0xed, 0xbd, 0xb1, 0x95, 0xcf, 0x2b, 0x2d, 0x97, 0x46, 0x1e, 0x95, - 0x69, 0x7d, 0x21, 0x11, 0x33, 0x37, 0x10, 0x17, 0xee, 0xb7, 0x64, 0x48, - 0x08, 0xf9, 0xd3, 0x56, 0xb5, 0xa8, 0x74, 0xb2, 0xc6, 0xe4, 0x07, 0x42, - 0x42, 0x30, 0x4c, 0x5e, 0x30, 0x1f, 0xce, 0x0e, 0x65, 0x03, 0x23, 0xfd, - 0x1b, 0x19, 0x73, 0xa5, 0xdb, 0xb0, 0x91, 0x11, 0xcd, 0x00, 0x00, 0x21, - 0x27, 0xb7, 0x3b, 0x45, 0x88, 0xc4, 0xbc, 0x47, 0xfb, 0x2d, 0xaf, 0x28, - 0x25, 0xb9, 0x7b, 0x38, 0xa6, 0xdd, 0x9c, 0x86, 0x56, 0xcc, 0xf2, 0x24, - 0xd0, 0x9a, 0xc9, 0x9e, 0x94, 0x00, 0x00, 0x76, 0xf1, 0xe7, 0xb1, 0xad, - 0x26, 0xbf, 0x5e, 0x04, 0xd1, 0x6e, 0x95, 0x18, 0x12, 0x8d, 0xce, 0x45, - 0xeb, 0x91, 0xce, 0xaa, 0x88, 0x7c, 0x65, 0xd5, 0x74, 0x9b, 0x05, 0xa4, - 0x3d, 0x00, 0x00, 0x11, 0x70, 0x70, 0xcc, 0x62, 0xe4, 0x70, 0xa3, 0x65, - 0x0a, 0x3e, 0xbe, 0xac, 0xbe, 0xdc, 0xeb, 0x2f, 0xe4, 0xe6, 0xec, 0x10, - 0x3a, 0x5a, 0x90, 0xd8, 0xb6, 0xa2, 0x4a, 0x3f, 0x27, 0x00, 0x00, 0x10, - 0x15, 0x11, 0xc1, 0x14, 0x9e, 0x53, 0x4e, 0x02, 0xe3, 0x1b, 0x90, 0x3e, - 0x3a, 0x65, 0xa4, 0x87, 0xaa, 0x24, 0xa0, 0x16, 0x59, 0x54, 0x7f, 0x10, - 0xb4, 0x73, 0x67, 0x55, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_rndbase_msg1_dat_len = 577; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member1/sig_sha256_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member1/sig_sha256_bsn0_msg0.inc deleted file mode 100644 index 13704b18bb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/member1/sig_sha256_bsn0_msg0.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : member1 - * HashAlg : Sha256 - * Message : "test message" - * Basename: "basename1" - * SigRl : group x sigrl - */ -//unsigned char sig_sha256_bsn0_msg0_dat[] = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, - 0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, - 0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, - 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, - 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, - 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, 0x2e, 0x50, 0xd9, 0xca, - 0x8f, 0x12, 0x5b, 0xfc, 0xc8, 0x02, 0x58, 0xff, 0xc9, 0xb8, 0xc1, 0x91, - 0x59, 0x33, 0x1e, 0xdb, 0x17, 0x8c, 0x2b, 0x24, 0x03, 0x8f, 0x1a, 0xcd, - 0x6b, 0x69, 0x1d, 0xd0, 0xa5, 0x79, 0x11, 0x92, 0x6b, 0x26, 0xe2, 0xc5, - 0xec, 0xa8, 0x85, 0x7b, 0xe0, 0x4f, 0xb0, 0x3c, 0x41, 0xc2, 0xa5, 0x8e, - 0xb9, 0x74, 0xe6, 0xa5, 0x69, 0xca, 0x86, 0x34, 0xf0, 0x74, 0xaa, 0x95, - 0x03, 0x5a, 0xbe, 0x40, 0xcd, 0x53, 0x62, 0x56, 0x50, 0x42, 0x0c, 0x75, - 0xe3, 0x93, 0x3a, 0x87, 0x69, 0x0d, 0x18, 0x71, 0xd0, 0xfb, 0x5e, 0xd9, - 0xf9, 0x58, 0xb0, 0x8b, 0x64, 0xd5, 0x35, 0x17, 0x03, 0x45, 0x25, 0x4e, - 0x6b, 0x10, 0x1c, 0x1e, 0x87, 0x4d, 0xe1, 0x79, 0xf4, 0x41, 0x61, 0xf5, - 0x45, 0xf0, 0x72, 0x37, 0x41, 0x0c, 0x11, 0x74, 0x48, 0x98, 0x0e, 0xb4, - 0x65, 0x25, 0xcf, 0xad, 0x06, 0x2c, 0x1f, 0x4f, 0x01, 0xf8, 0x8b, 0xa6, - 0x79, 0xe3, 0x53, 0xf9, 0xe6, 0x26, 0xa1, 0x08, 0xdf, 0x0f, 0x6f, 0xff, - 0x92, 0x6b, 0xcb, 0x4c, 0x6a, 0x66, 0xe2, 0xb0, 0xad, 0x37, 0x05, 0xba, - 0x03, 0x27, 0xef, 0xad, 0x48, 0xb9, 0xd3, 0xe3, 0x10, 0xba, 0x28, 0xf7, - 0x76, 0xf6, 0xd1, 0xe3, 0x8d, 0x17, 0x3d, 0xdc, 0x38, 0xd0, 0x2c, 0xa4, - 0x34, 0xc8, 0x04, 0x39, 0xe8, 0xfb, 0xd6, 0xa0, 0x98, 0x64, 0x75, 0xbd, - 0xa9, 0xfb, 0x8e, 0x8b, 0x3a, 0x51, 0xa8, 0x0d, 0x75, 0x89, 0x9f, 0xe9, - 0x23, 0xe0, 0xfe, 0x3d, 0x52, 0x67, 0x95, 0xf6, 0x12, 0xe7, 0x9f, 0x23, - 0xfd, 0xba, 0xcb, 0xc8, 0xc5, 0x76, 0xca, 0x19, 0xb6, 0xfe, 0x00, 0x78, - 0x63, 0x0c, 0x00, 0x00, 0x17, 0x98, 0x13, 0xf3, 0x2e, 0xd1, 0x6c, 0xa1, - 0x58, 0x54, 0x4f, 0xcb, 0x68, 0xae, 0xe9, 0xbc, 0x52, 0xfc, 0x95, 0x4b, - 0x31, 0x23, 0x44, 0x30, 0x99, 0xdf, 0x40, 0x7f, 0xb8, 0xb1, 0x00, 0x00, - 0x3b, 0x35, 0x7b, 0x2b, 0xaf, 0xd7, 0x5f, 0x53, 0xeb, 0x10, 0x66, 0xa9, - 0x68, 0x23, 0xea, 0xbc, 0xa0, 0xdc, 0xb4, 0x4a, 0x1f, 0xd5, 0x15, 0x46, - 0x99, 0xb3, 0x7b, 0x44, 0xc9, 0xfc, 0x00, 0x47, 0x6e, 0xac, 0x44, 0xeb, - 0x65, 0x06, 0x7a, 0x3a, 0x57, 0xa1, 0x18, 0x4a, 0x70, 0x33, 0x7a, 0x5b, - 0x8f, 0x26, 0x5f, 0xfb, 0x13, 0x72, 0x58, 0xbd, 0xec, 0xc4, 0xe7, 0x7a, - 0x65, 0x18, 0xb4, 0x8b, 0x68, 0xa0, 0x53, 0x3f, 0xc0, 0x26, 0x67, 0xca, - 0x1c, 0xd4, 0x3d, 0x60, 0x62, 0x2f, 0x9f, 0x8c, 0xac, 0xd1, 0x80, 0xfd, - 0x9b, 0x6f, 0xe1, 0xd1, 0x3c, 0x65, 0x4e, 0x0d, 0x34, 0xca, 0x85, 0xe4, - 0x55, 0xf7, 0x4e, 0x41, 0x28, 0xea, 0xab, 0xef, 0x96, 0x00, 0x00, 0x54, - 0xbf, 0x83, 0x72, 0x76, 0x1c, 0xe5, 0xe5, 0x2e, 0xfc, 0xc7, 0x8a, 0x13, - 0xd8, 0x92, 0x5c, 0xab, 0x9e, 0x00, 0xf2, 0xbe, 0xf9, 0xfb, 0x63, 0x30, - 0xf5, 0x53, 0xa2, 0x99, 0x49, 0x00, 0x00, 0x0b, 0x9f, 0x78, 0x17, 0xc2, - 0xa5, 0x4f, 0xc1, 0x38, 0xe1, 0x75, 0xf6, 0x46, 0x2a, 0x8e, 0x45, 0xdf, - 0xbd, 0x39, 0xa0, 0x6d, 0xf8, 0x75, 0x68, 0xce, 0x73, 0xad, 0x56, 0xea, - 0xe0, 0x00, 0x00, 0x0e, 0xc6, 0xa7, 0x88, 0x43, 0xc2, 0xdb, 0xbf, 0x73, - 0xa3, 0xa1, 0xdb, 0x46, 0xd8, 0x89, 0xca, 0xea, 0x11, 0xf7, 0x6c, 0x47, - 0xea, 0x0d, 0xdd, 0x52, 0x7d, 0x33, 0xef, 0x65, 0xdb, 0x00, 0x00, 0x0f, - 0x48, 0xd4, 0x3f, 0xbc, 0x4e, 0xc3, 0xd9, 0x59, 0x52, 0x65, 0xbb, 0xbc, - 0x13, 0xa0, 0xb8, 0x51, 0xef, 0xdc, 0x11, 0x94, 0xa6, 0xc4, 0x09, 0x83, - 0x3d, 0xe2, 0x7e, 0x09, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_bsn0_msg0_dat_len = 577; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey000.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey000.inc deleted file mode 100644 index b1dc8e888b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey000.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data for revoked privrl. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : privrevoked->member000 - * HashAlg : Sha256 - * Message : "test message" - * Basename: "basename1" - * SigRl : groupx empty sigrl - */ - //unsigned char sig_sha256_bsn0_msg0_revkey000_dat[] = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, - 0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, - 0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, - 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, - 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, - 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, 0x06, 0x29, 0x78, 0xfc, - 0x10, 0xfc, 0x2c, 0xde, 0x10, 0xe7, 0xe0, 0x6b, 0xdd, 0x0a, 0x9a, 0xb7, - 0x0e, 0xad, 0x06, 0x41, 0x61, 0x2b, 0x4f, 0xc8, 0x31, 0x84, 0x64, 0x22, - 0xbb, 0xe1, 0x83, 0x77, 0x98, 0x03, 0x0e, 0x5c, 0x01, 0x38, 0xd1, 0x9b, - 0x29, 0x3f, 0xc3, 0x6f, 0x1d, 0x1a, 0x92, 0x9f, 0xab, 0x47, 0x6f, 0x42, - 0xf4, 0x79, 0x96, 0xae, 0x74, 0x45, 0xbf, 0x33, 0xb5, 0x93, 0xf6, 0x74, - 0x06, 0xbb, 0xf0, 0x0c, 0x9f, 0x2a, 0x41, 0x1f, 0xc9, 0x90, 0x34, 0x41, - 0xf5, 0xdc, 0xcc, 0x65, 0x7e, 0xfc, 0x00, 0xec, 0x9a, 0x50, 0x76, 0x2c, - 0xc9, 0x39, 0x1b, 0x17, 0x19, 0x4e, 0x41, 0xa6, 0x03, 0xcc, 0xc6, 0xd9, - 0xcd, 0x5e, 0x24, 0xeb, 0x5b, 0xaf, 0x2c, 0x44, 0xdc, 0x29, 0x71, 0x8f, - 0x6e, 0x24, 0x86, 0xfa, 0x58, 0x6c, 0x0b, 0x67, 0x8a, 0xf9, 0xb9, 0x36, - 0x41, 0xdb, 0xa4, 0x3f, 0x00, 0x8c, 0xa8, 0x10, 0x9c, 0xca, 0xc8, 0xbd, - 0x7b, 0x08, 0x9c, 0xb0, 0x20, 0x10, 0x2b, 0x63, 0xff, 0x25, 0x19, 0x48, - 0x69, 0x85, 0x92, 0x74, 0xc1, 0x3c, 0x26, 0x9a, 0x9c, 0x10, 0x42, 0x42, - 0x08, 0xe2, 0x9f, 0x98, 0xee, 0xb8, 0xc7, 0x6e, 0x0a, 0x87, 0x8a, 0x27, - 0x6d, 0xe7, 0x27, 0x22, 0xcf, 0x23, 0x14, 0x8c, 0x4e, 0xfe, 0x33, 0x3b, - 0xa4, 0x14, 0x3e, 0x37, 0x6a, 0x39, 0xfe, 0x12, 0xd0, 0x5b, 0xa5, 0x08, - 0x3d, 0x85, 0x71, 0xeb, 0xa5, 0xe8, 0x5a, 0x9f, 0xcb, 0xb4, 0xdb, 0xce, - 0x32, 0x49, 0x9a, 0xba, 0xda, 0x37, 0x23, 0x45, 0x16, 0x50, 0x60, 0x15, - 0x4b, 0xc1, 0xfd, 0xfb, 0x00, 0x9c, 0x67, 0xae, 0xc0, 0x98, 0xbb, 0x63, - 0x52, 0x7b, 0x00, 0x00, 0x82, 0xec, 0xd1, 0xd1, 0x45, 0xd6, 0x9e, 0x42, - 0x9a, 0x18, 0xe7, 0x1e, 0x52, 0x27, 0xed, 0x65, 0x90, 0x95, 0xc1, 0x79, - 0x3d, 0x0b, 0x2e, 0x84, 0xdd, 0xcc, 0xdc, 0xc3, 0x46, 0x17, 0x00, 0x00, - 0x7c, 0xce, 0x2e, 0x41, 0xd1, 0x68, 0xa8, 0xdb, 0xea, 0x42, 0x7a, 0x67, - 0xf7, 0x6b, 0xae, 0xb4, 0xc2, 0xdf, 0x8d, 0xbb, 0xd5, 0xdb, 0x1c, 0x88, - 0xca, 0x68, 0x4a, 0xc9, 0xdb, 0x18, 0x00, 0x9a, 0x1b, 0x74, 0xf0, 0x79, - 0xfc, 0xa8, 0x10, 0xb3, 0xec, 0x6b, 0x48, 0xdf, 0xbc, 0x89, 0xd6, 0x78, - 0xb4, 0xff, 0xb1, 0xae, 0x76, 0xec, 0x97, 0xa1, 0x72, 0x8e, 0xfe, 0x1d, - 0x30, 0xa3, 0xda, 0x64, 0x59, 0xf8, 0x28, 0x5b, 0xa5, 0x9c, 0x05, 0x2c, - 0x96, 0x45, 0x00, 0xd4, 0xb5, 0xab, 0x93, 0x2e, 0x34, 0x04, 0x09, 0x15, - 0x22, 0x9e, 0xf3, 0x44, 0x5e, 0xaa, 0xfc, 0xce, 0x1f, 0x05, 0x67, 0xe2, - 0x58, 0xa8, 0x88, 0xb2, 0x77, 0x5d, 0x23, 0x41, 0x9a, 0x00, 0x00, 0x5f, - 0xed, 0x04, 0x87, 0x17, 0x46, 0xcb, 0xb3, 0x94, 0x07, 0x58, 0xa5, 0xc2, - 0x98, 0xaa, 0xc1, 0x58, 0x30, 0x1f, 0x45, 0x28, 0xad, 0xbf, 0xce, 0x7d, - 0xb6, 0xb7, 0x80, 0x8f, 0x57, 0x00, 0x00, 0x2d, 0x5b, 0xc3, 0x9f, 0x99, - 0xb6, 0xb4, 0x15, 0x98, 0x4b, 0xb7, 0x3c, 0xb1, 0x1a, 0x7a, 0x78, 0xcd, - 0x03, 0xd0, 0xe7, 0x36, 0x1e, 0xdc, 0x13, 0x28, 0x5d, 0xdc, 0x4b, 0x47, - 0x18, 0x00, 0x00, 0x61, 0x3d, 0xa0, 0x18, 0x14, 0xbd, 0x62, 0xdc, 0x75, - 0xf5, 0xfc, 0xf4, 0xcc, 0x34, 0x9b, 0x9a, 0x7f, 0x61, 0xaa, 0x18, 0x1c, - 0xe3, 0x54, 0x51, 0xb5, 0x0c, 0xe2, 0xa6, 0x90, 0x0b, 0x00, 0x00, 0x19, - 0x92, 0x07, 0x28, 0xc1, 0x79, 0xd1, 0xb2, 0xba, 0x4b, 0xcb, 0x7e, 0x85, - 0x67, 0x24, 0xab, 0x74, 0x63, 0xe8, 0x47, 0x4a, 0x30, 0x1c, 0x26, 0x18, - 0x98, 0x43, 0x16, 0xc6, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_bsn0_msg0_revkey000_dat_len = 573; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey001.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey001.inc deleted file mode 100644 index 151527fee6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey001.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data for revoked privrl. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : privrevoked->member001 - * HashAlg : Sha256 - * Message : "test message" - * Basename: "basename1" - * SigRl : groupx empty sigrl - */ - //unsigned char sig_sha256_bsn0_msg0_revkey000_dat[] = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, - 0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, - 0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, - 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, - 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, - 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, 0x26, 0xbb, 0xb1, 0x25, - 0x06, 0xa9, 0xaf, 0xff, 0x35, 0xc2, 0xb5, 0x36, 0x4b, 0xbd, 0x36, 0xc3, - 0x64, 0x50, 0x9a, 0x59, 0xf6, 0x50, 0x84, 0x70, 0xfd, 0xcd, 0xfb, 0x13, - 0x9a, 0x07, 0x32, 0x7b, 0xc7, 0x7c, 0xff, 0x33, 0x99, 0x8e, 0xb1, 0x86, - 0x45, 0xb6, 0xea, 0xc2, 0x90, 0x33, 0xdc, 0x1e, 0x63, 0x26, 0x26, 0xe1, - 0xe4, 0x57, 0x3d, 0x9c, 0x61, 0x3a, 0x50, 0x14, 0x3d, 0xbb, 0x22, 0x9b, - 0x00, 0xfc, 0x22, 0xec, 0x97, 0xe9, 0x65, 0xdd, 0x83, 0x81, 0xf3, 0xf2, - 0x21, 0x66, 0x73, 0xa3, 0x5a, 0x43, 0x9c, 0x0e, 0x00, 0x19, 0x89, 0x3b, - 0x0a, 0xad, 0xa1, 0xa8, 0xad, 0x86, 0x5c, 0xc2, 0x07, 0xd3, 0x9c, 0xa0, - 0xa7, 0x08, 0xb0, 0x5e, 0x01, 0xe2, 0xf9, 0xcc, 0x55, 0x3c, 0x13, 0x40, - 0x8c, 0x8f, 0x9f, 0x2d, 0x6d, 0xb0, 0x94, 0x5c, 0x7b, 0xb3, 0x2d, 0xea, - 0x12, 0xd4, 0x3f, 0x84, 0x03, 0x6d, 0x19, 0xbc, 0x4d, 0x29, 0x44, 0x8d, - 0xa5, 0x5c, 0xc2, 0x5e, 0x20, 0x1f, 0x1f, 0xdd, 0x1d, 0x02, 0x96, 0x4c, - 0x23, 0xa1, 0xe0, 0xe6, 0x66, 0x67, 0x41, 0x2f, 0xcb, 0xb7, 0x61, 0x60, - 0x05, 0xa9, 0x80, 0x8a, 0xd0, 0x7b, 0x4e, 0xb4, 0xc0, 0xdd, 0xf4, 0xd7, - 0xd1, 0x6d, 0x7f, 0xab, 0x50, 0xbf, 0xbc, 0x9b, 0x68, 0xf3, 0x4b, 0xd9, - 0xee, 0x25, 0x4e, 0x32, 0x93, 0xc2, 0x3d, 0x2d, 0x2e, 0xa8, 0xc8, 0x40, - 0xc6, 0xca, 0xa4, 0xb4, 0xf2, 0xb9, 0xc8, 0x76, 0xb0, 0x48, 0x71, 0xe3, - 0xf7, 0x2d, 0x55, 0x0b, 0xdb, 0x17, 0xc6, 0x15, 0x07, 0x96, 0x45, 0x65, - 0x4e, 0xd8, 0xb1, 0x08, 0xc4, 0xd6, 0x6b, 0x40, 0x1f, 0x6d, 0xb9, 0xc0, - 0x35, 0x31, 0x00, 0x00, 0x2b, 0x55, 0xb4, 0x60, 0x26, 0x2c, 0x5d, 0xab, - 0xf3, 0x66, 0x09, 0x2d, 0x33, 0xd6, 0x74, 0x34, 0x39, 0xba, 0x76, 0xfc, - 0xc3, 0xfd, 0x10, 0x3a, 0x72, 0x30, 0x53, 0x8d, 0x8b, 0x82, 0x00, 0x00, - 0x50, 0x41, 0x2f, 0x3f, 0x08, 0x27, 0x68, 0x63, 0x02, 0xdd, 0xb1, 0x1b, - 0x42, 0xd2, 0x2d, 0x26, 0x97, 0xa3, 0x13, 0x04, 0xe3, 0x6e, 0x8b, 0x19, - 0x5a, 0x14, 0xf9, 0x0d, 0xa2, 0x67, 0x00, 0xd0, 0x38, 0x85, 0x83, 0xf7, - 0x0b, 0x26, 0x97, 0x66, 0x91, 0x20, 0xbb, 0x27, 0x22, 0xaa, 0x6e, 0x6b, - 0x36, 0x1a, 0xa6, 0x1e, 0x0a, 0xb2, 0x83, 0x37, 0xf8, 0xea, 0xc2, 0x6c, - 0x35, 0xa5, 0x71, 0xfd, 0xec, 0x97, 0x69, 0x28, 0xa0, 0x22, 0xcd, 0x4a, - 0x2f, 0x7b, 0x64, 0x48, 0x5c, 0xfe, 0x6d, 0xdc, 0x71, 0x2d, 0x1e, 0x66, - 0xea, 0x89, 0x9f, 0x52, 0x0c, 0xc4, 0x48, 0x91, 0x7e, 0xae, 0x02, 0xbf, - 0x92, 0xe7, 0xa5, 0xcb, 0x38, 0xe7, 0xe1, 0x2a, 0xc2, 0x00, 0x00, 0x11, - 0x06, 0xe4, 0x48, 0x68, 0xe7, 0xe1, 0x35, 0x4c, 0xd5, 0x21, 0x1f, 0x47, - 0x3f, 0x1f, 0x60, 0xd3, 0x54, 0x8f, 0x5c, 0xf6, 0xba, 0x39, 0xaa, 0x3e, - 0x25, 0x83, 0x9c, 0xd2, 0xbe, 0x00, 0x00, 0x60, 0xda, 0xd4, 0xae, 0x6b, - 0xb3, 0x48, 0xbc, 0x59, 0x10, 0x01, 0x25, 0xe5, 0xe1, 0x8f, 0x24, 0x3f, - 0x32, 0x34, 0x29, 0x73, 0x42, 0x22, 0x6f, 0xa4, 0x32, 0x47, 0x8d, 0xde, - 0x82, 0x00, 0x00, 0x35, 0x27, 0x8b, 0xfb, 0x4d, 0x69, 0x4d, 0xb0, 0xcb, - 0xf0, 0x02, 0x19, 0xde, 0xe1, 0x64, 0x82, 0x66, 0xd6, 0x44, 0x51, 0x7c, - 0x25, 0x95, 0xf7, 0x6c, 0x1a, 0x68, 0xd9, 0xbf, 0x77, 0x00, 0x00, 0x66, - 0x94, 0x58, 0x4c, 0x22, 0x52, 0x46, 0xa5, 0x8c, 0x26, 0x13, 0xa1, 0xdd, - 0x3e, 0x2b, 0xd1, 0x81, 0x09, 0x64, 0xb9, 0xc3, 0x1a, 0x2e, 0xb7, 0xc6, - 0xee, 0xbc, 0x28, 0xc9, 0xef, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_bsn0_msg0_revkey000_dat_len = 573; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey002.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey002.inc deleted file mode 100644 index c2ddb24965..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey002.inc +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data for revoked privrl. - * - * Type : Intel(R) EPID 1.1 Signature - * Group : grpX - * Signer : privrevoked->member002 - * HashAlg : Sha256 - * Message : "test message" - * Basename: "basename1" - * SigRl : groupx empty sigrl - */ - //unsigned char sig_sha256_bsn0_msg0_revkey000_dat[] = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, - 0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, - 0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, - 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, - 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, - 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, 0x09, 0xbd, 0x15, 0x9f, - 0x7f, 0x5f, 0x39, 0x6a, 0xe4, 0x92, 0x3b, 0x9c, 0x63, 0xed, 0xd4, 0x84, - 0xb7, 0xda, 0xff, 0xea, 0xb5, 0x5d, 0x17, 0xc2, 0xeb, 0x29, 0x16, 0xd8, - 0xbc, 0x59, 0x33, 0xd2, 0xd5, 0x6d, 0x89, 0xdf, 0xe4, 0x17, 0x8a, 0xa0, - 0x94, 0x9d, 0x29, 0xcb, 0xc7, 0x97, 0x63, 0x35, 0x5a, 0x50, 0xa4, 0x0d, - 0x93, 0x34, 0x39, 0x39, 0xf9, 0x46, 0xa1, 0xa8, 0x81, 0x18, 0xf7, 0xc9, - 0x05, 0xb5, 0x07, 0xcf, 0x2e, 0xa4, 0xbf, 0x69, 0x99, 0x98, 0x32, 0x2f, - 0xa9, 0x1d, 0x65, 0x0c, 0x48, 0x5f, 0xd8, 0x1f, 0x9f, 0xba, 0x21, 0x3a, - 0xf5, 0x34, 0xae, 0x30, 0xa7, 0xbc, 0xa0, 0x0a, 0x06, 0x9f, 0xfc, 0xe0, - 0x7c, 0xea, 0x0c, 0xc4, 0xbc, 0x59, 0x6e, 0x71, 0x90, 0x2e, 0x5d, 0x76, - 0x31, 0x12, 0x2d, 0x62, 0x05, 0xd1, 0x72, 0xe6, 0xb7, 0x5d, 0x11, 0x5f, - 0xd4, 0x67, 0x8e, 0x50, 0x02, 0x19, 0xb0, 0x26, 0x74, 0xdb, 0x7c, 0x21, - 0x8c, 0xd8, 0xff, 0x12, 0xb7, 0xa6, 0x49, 0xfc, 0x3f, 0x9a, 0xed, 0x8c, - 0x5e, 0x99, 0xfb, 0xa2, 0xd7, 0xff, 0x88, 0x54, 0x09, 0xd6, 0x26, 0x2c, - 0x04, 0xa6, 0x4d, 0xb3, 0xec, 0x6c, 0x76, 0xc1, 0x67, 0x2d, 0xfd, 0xa4, - 0xfb, 0x69, 0x61, 0x49, 0xf7, 0x38, 0x4d, 0x25, 0xd6, 0x93, 0x0b, 0xee, - 0x3d, 0x19, 0x92, 0xb4, 0x6b, 0x36, 0x4c, 0x63, 0x33, 0x90, 0x51, 0xc4, - 0x5e, 0x41, 0x0c, 0xe8, 0x4c, 0x3d, 0x50, 0xd9, 0x88, 0x27, 0xe7, 0xfb, - 0x40, 0xe6, 0x1d, 0x12, 0x0c, 0x6e, 0x63, 0x45, 0x46, 0xa2, 0x89, 0x60, - 0x14, 0x14, 0xc3, 0x75, 0xe0, 0xf1, 0x86, 0x74, 0x7d, 0x8d, 0xf4, 0x81, - 0xd7, 0x35, 0x00, 0x00, 0x35, 0x79, 0x11, 0x1d, 0xc0, 0x44, 0x4b, 0x09, - 0x72, 0x8d, 0x46, 0x63, 0xc7, 0xfa, 0x37, 0x4a, 0xe8, 0xcd, 0x9f, 0x1b, - 0x3e, 0xb6, 0x3b, 0x51, 0x46, 0x2a, 0x33, 0xde, 0xdd, 0x2a, 0x00, 0x00, - 0x3f, 0x8e, 0x95, 0xe4, 0x17, 0x26, 0xf4, 0x6a, 0x99, 0xf6, 0x19, 0x0b, - 0x4d, 0x44, 0x32, 0x63, 0x95, 0xff, 0x2b, 0x23, 0x79, 0xa4, 0xfe, 0xd7, - 0x16, 0x91, 0x5b, 0x88, 0x6d, 0x54, 0x00, 0x76, 0xae, 0xc3, 0xca, 0x2b, - 0x12, 0x25, 0x9a, 0x14, 0xde, 0x25, 0x96, 0x40, 0xdf, 0x54, 0x7b, 0x4c, - 0x79, 0x1e, 0xe0, 0x1d, 0x91, 0xdc, 0xd1, 0x90, 0x71, 0x52, 0x1a, 0x70, - 0xad, 0xd8, 0xc2, 0x53, 0x7e, 0xf1, 0x8c, 0xbd, 0x6b, 0x25, 0xab, 0x8e, - 0xd6, 0x93, 0x7a, 0xa9, 0x03, 0x96, 0xde, 0x7b, 0xad, 0x06, 0x5d, 0x26, - 0x5a, 0xdf, 0x9f, 0x1f, 0x2e, 0x57, 0xf9, 0x5d, 0xde, 0xe2, 0xe6, 0xf3, - 0x70, 0x2a, 0xac, 0xfd, 0x43, 0xa1, 0x8e, 0xc6, 0xf1, 0x00, 0x00, 0x72, - 0x7e, 0xb4, 0x6d, 0xbf, 0x32, 0x69, 0xeb, 0x71, 0x19, 0x03, 0x91, 0x9d, - 0xca, 0x98, 0xe9, 0x84, 0x34, 0xb7, 0xab, 0x33, 0x00, 0x1a, 0xf4, 0x4e, - 0x48, 0x0d, 0xc3, 0xe9, 0xe7, 0x00, 0x00, 0x08, 0x05, 0x73, 0xf4, 0xb0, - 0x38, 0xaa, 0xe1, 0xba, 0xd5, 0x11, 0x49, 0x21, 0xb2, 0x04, 0x8c, 0xba, - 0xd5, 0xb8, 0xcc, 0xf8, 0x29, 0x78, 0x4a, 0x80, 0xd8, 0x0e, 0xac, 0x04, - 0x00, 0x00, 0x00, 0x0c, 0xc1, 0xe7, 0xcd, 0xac, 0xb9, 0xea, 0x87, 0xae, - 0x15, 0xa2, 0x47, 0xf1, 0x4e, 0x28, 0x03, 0x38, 0x59, 0x11, 0xd5, 0x08, - 0xc0, 0x71, 0x23, 0xfe, 0x8e, 0x3e, 0xbc, 0x2d, 0xde, 0x00, 0x00, 0x05, - 0xd9, 0x48, 0xc2, 0x69, 0x3b, 0x6d, 0x03, 0x3b, 0x3b, 0xc5, 0xfe, 0x1d, - 0xd9, 0x7b, 0xb7, 0x20, 0x2f, 0xa8, 0x3c, 0x03, 0xc4, 0x5a, 0x74, 0xeb, - 0xed, 0x9b, 0x18, 0xb6, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 -//}; -//unsigned int sig_sha256_bsn0_msg0_revkey000_dat_len = 573; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrl.inc deleted file mode 100644 index 3b55ca6bb9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrl.inc +++ /dev/null @@ -1,43 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 private-key based revocation list - * Group : grpX - */ -//unsigned char privrl_dat[] = { - // Group ID - 0x00, 0x00, 0x00, 0x7b, - // RLver - 0x00, 0x00, 0x00, 0x03, - // n1 - 0x00, 0x00, 0x00, 0x03, - // f[1] - 0x00, 0x00, 0x3f, 0x47, 0x7d, 0x79, 0x63, 0x82, - 0x72, 0x64, 0x0e, 0x44, 0xd4, 0x1a, 0x05, 0xae, 0xf0, 0x04, 0x15, 0x15, - 0xc7, 0x3f, 0x31, 0xdf, 0x1e, 0x57, 0x5b, 0x59, 0xcb, 0x85, 0xd4, 0xbd, - // f[2] - 0x00, 0x00, 0x47, 0xe5, 0xea, 0x2e, 0x35, 0x1c, - 0x6e, 0xcb, 0x99, 0xfc, 0xa6, 0x30, 0xd2, 0xf4, 0x31, 0x38, 0xc3, 0x6e, - 0x28, 0xee, 0xfb, 0x02, 0x5a, 0x33, 0xc1, 0xe7, 0xf7, 0x5c, 0xb4, 0xcf, - // f[3] - 0x00, 0x00, 0x06, 0x77, 0x9f, 0xc2, 0xf7, 0x86, - 0x3e, 0x45, 0x56, 0xfe, 0x8b, 0xd1, 0x03, 0x5a, 0x0d, 0xe5, 0xc5, 0x24, - 0x11, 0x4b, 0x22, 0x29, 0x04, 0x48, 0xa5, 0x7b, 0x09, 0xc9, 0x61, 0xcc, -//}; -// unsigned int privrl_dat_len = 108; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrl_single_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrl_single_entry.inc deleted file mode 100644 index b7eb7444a6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/privrl_single_entry.inc +++ /dev/null @@ -1,35 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 private-key based revocation list - * Group : grpX - */ -//unsigned char privrl_dat[] = { - // Group ID - 0x00, 0x00, 0x00, 0x7b, - // RLver - 0x00, 0x00, 0x00, 0x01, - // n1 - 0x00, 0x00, 0x00, 0x01, - // f[1] - 0x00, 0x00, 0x3f, 0x47, 0x7d, 0x79, 0x63, 0x82, - 0x72, 0x64, 0x0e, 0x44, 0xd4, 0x1a, 0x05, 0xae, 0xf0, 0x04, 0x15, 0x15, - 0xc7, 0x3f, 0x31, 0xdf, 0x1e, 0x57, 0x5b, 0x59, 0xcb, 0x85, 0xd4, 0xbd, -//}; -//unsigned int privrl_dat_len = 44; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sig_sha256_bsnrnd_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sig_sha256_bsnrnd_msg0.inc deleted file mode 100644 index 00a0d120fe..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sig_sha256_bsnrnd_msg0.inc +++ /dev/null @@ -1,78 +0,0 @@ -//unsigned char sig_sha256_bsnrnd_msg0_dat[] = { -//Basic sig -0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, -0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, -0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, -0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, -0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, -0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, 0xaa, 0x5f, 0x63, 0xcf, -0x9d, 0x40, 0x8b, 0xba, 0xe7, 0x33, 0xd7, 0x8b, 0xd4, 0x05, 0x91, 0x30, -0x28, 0xcb, 0x41, 0xb6, 0x8c, 0x3a, 0x90, 0x10, 0x37, 0x06, 0x14, 0x17, -0x5f, 0xfd, 0x56, 0x71, 0x66, 0xaf, 0x13, 0xc8, 0xfc, 0xdd, 0x9d, 0xf2, -0x0d, 0xc2, 0x8a, 0x06, 0x5c, 0x6d, 0x0b, 0xf8, 0x25, 0xcd, 0xe2, 0x9e, -0xad, 0x52, 0xf3, 0x29, 0x4e, 0xb0, 0x5b, 0x3f, 0x22, 0xe8, 0x1f, 0xb2, -0x06, 0xc7, 0x32, 0x18, 0x81, 0xbf, 0xd4, 0x19, 0x03, 0xcc, 0x09, 0x78, -0x72, 0xcc, 0x40, 0x88, 0x38, 0x27, 0x25, 0x14, 0x7a, 0x9b, 0x25, 0xb9, -0x92, 0x67, 0x98, 0x92, 0x5d, 0x5c, 0xaf, 0x1d, 0x08, 0xc6, 0x26, 0xa5, -0x68, 0xa3, 0x89, 0xc4, 0x28, 0x9f, 0x9c, 0x7a, 0x0e, 0x02, 0xcf, 0x34, -0x3b, 0x37, 0x78, 0x5b, 0x1d, 0x64, 0x17, 0x47, 0x4f, 0x75, 0xb4, 0xcc, -0x8b, 0x7d, 0xa7, 0xe1, 0x04, 0x3b, 0x70, 0x67, 0xfb, 0xae, 0x06, 0xb9, -0x38, 0xdf, 0x13, 0x2e, 0x40, 0x95, 0x2c, 0x09, 0x2a, 0xca, 0xfd, 0x18, -0x32, 0x1c, 0x8b, 0x11, 0x1e, 0x43, 0xd2, 0x1c, 0x25, 0xd9, 0x72, 0x0b, -0x04, 0xb8, 0x46, 0x6d, 0xc5, 0xf9, 0xf8, 0x1c, 0xf2, 0x7b, 0xe6, 0x8a, -0xec, 0xa8, 0x2f, 0xd8, 0x05, 0x1f, 0x82, 0x4f, 0x9f, 0xd7, 0xf7, 0x15, -0x4e, 0xe2, 0xd2, 0x1b, 0xe0, 0xf7, 0xef, 0x90, 0x48, 0x77, 0x13, 0x24, -0x5d, 0xcb, 0x79, 0x7d, 0x0f, 0xc0, 0x1e, 0x6e, 0x87, 0x79, 0x04, 0x41, -0xcd, 0xfb, 0x4d, 0x47, 0xa6, 0x6c, 0x39, 0x10, 0xed, 0x45, 0x5f, 0xd1, -0x5f, 0x18, 0x5d, 0x68, 0x1d, 0x80, 0xfd, 0x68, 0xf1, 0x7c, 0xaf, 0x9a, -0xd7, 0x34, 0x00, 0x00, 0x75, 0xdb, 0xe0, 0x83, 0x3c, 0x49, 0x9d, 0x2e, -0xd1, 0x6c, 0x94, 0x7e, 0x7d, 0xb7, 0x35, 0x63, 0x2f, 0x5a, 0x45, 0x6c, -0x96, 0x9d, 0x97, 0x38, 0xf4, 0xa9, 0x99, 0xe9, 0x2c, 0x55, 0x00, 0x00, -0x4d, 0x8d, 0xac, 0x38, 0x12, 0x22, 0x42, 0x2e, 0xdc, 0x38, 0x05, 0xa3, -0xc8, 0x13, 0x81, 0x4c, 0x6d, 0x92, 0x13, 0x2e, 0x25, 0x95, 0x96, 0x81, -0x61, 0xf3, 0xe5, 0x45, 0xa0, 0x85, 0x00, 0xa2, 0x2d, 0x0f, 0xc3, 0x4d, -0xbe, 0xd9, 0x0a, 0xc0, 0x24, 0x48, 0xf4, 0x5e, 0xb3, 0x58, 0xd9, 0x2a, -0x89, 0x1b, 0x2b, 0x83, 0x75, 0xea, 0xd7, 0x2d, 0x85, 0x7a, 0xa4, 0x06, -0x4f, 0x2b, 0x9d, 0x0d, 0x32, 0xeb, 0x9f, 0x94, 0xe1, 0x68, 0xe5, 0x66, -0x16, 0xc3, 0xf5, 0x75, 0xed, 0x66, 0xef, 0x97, 0xb5, 0x3f, 0x70, 0x20, -0x23, 0x01, 0x0d, 0x0f, 0x56, 0xfd, 0x18, 0xe2, 0xe1, 0x18, 0x2d, 0xdc, -0x83, 0xb9, 0x16, 0xd4, 0x4e, 0xc6, 0x3b, 0x29, 0x76, 0x00, 0x00, 0x85, -0x6c, 0x54, 0x1b, 0x03, 0x74, 0xa7, 0x9f, 0xcf, 0x8c, 0x47, 0x02, 0xc9, -0xcd, 0x59, 0xb3, 0xc9, 0x51, 0xf2, 0xf7, 0x1f, 0x48, 0x8d, 0x70, 0x7b, -0x4d, 0xd3, 0xaf, 0xc4, 0x07, 0x00, 0x00, 0x87, 0xcc, 0x24, 0x58, 0x59, -0x80, 0x79, 0x14, 0xff, 0xce, 0x74, 0xf2, 0xe6, 0x24, 0x5e, 0x5c, 0x41, -0x9b, 0x5f, 0x9d, 0x64, 0x1b, 0x11, 0x60, 0x64, 0x77, 0x60, 0xd0, 0x52, -0xac, 0x00, 0x00, 0x15, 0x44, 0x28, 0x8f, 0x55, 0xb0, 0x45, 0x5b, 0x82, -0x40, 0x57, 0x8b, 0x45, 0xcf, 0x71, 0x79, 0x72, 0xc3, 0x47, 0x0e, 0x65, -0x6e, 0xc8, 0x1a, 0x29, 0x87, 0xa7, 0xe3, 0x1f, 0x57, 0x00, 0x00, 0x64, -0x32, 0xfc, 0xe8, 0x2a, 0x2e, 0x94, 0xbd, 0x62, 0xa0, 0xcc, 0xb2, 0x67, -0x65, 0x57, 0xa6, 0x28, 0x8a, 0xd6, 0x46, 0x9d, 0xac, 0x08, 0xca, 0x3a, -0x79, 0xe4, 0x04, 0x95, 0xb8, -//RLver -0x00, 0x00, 0x00, 0x02, -//n2 -0x00, 0x00, 0x00, 0x01, -//NrProof1 = 160 - //T -0x5e, 0xcc, 0x94, 0xe3, 0x67, 0x5d, 0xb5, 0x71, 0xe0, 0x28, 0x34, -0x2e, 0xd1, 0x10, 0xff, 0x25, 0xc0, 0x3a, 0x1a, 0x2c, 0xde, 0x13, 0xe9, -0x7e, 0x5a, 0xde, 0xc3, 0xa6, 0x04, 0x02, 0xbd, 0xf6, 0xaa, 0x4a, 0xf4, -0xf9, 0x82, 0x31, 0xda, 0x8b, 0x44, 0xfb, 0x35, 0xcf, 0xb5, 0x4e, 0x5a, -0x82, 0x5c, 0x11, 0xa6, 0xab, 0xdf, 0x13, 0xa9, 0x00, 0x2c, 0x95, 0xf9, -0x9a, 0x2c, 0x9b, 0x12, 0x15, - //c -0x1f, 0x7f, 0x9a, 0xc0, 0x84, 0xaa, 0x74, -0x3e, 0x19, 0x8b, 0xb6, 0x10, 0xb6, 0xc3, 0x99, 0xaa, 0x02, 0x18, 0x62, -0xc9, 0xa9, 0x0c, 0x26, 0x66, 0x9a, 0x1c, 0x9b, 0xc8, 0x6f, 0xaf, 0xac, -0x06, - //smu -0x9a, 0x84, 0xf4, 0xf0, 0x29, 0x48, 0x08, 0x6e, 0x43, 0xa8, 0x98, -0xc6, 0x9f, 0x36, 0x91, 0x06, 0x25, 0x32, 0xa3, 0x57, 0x52, 0x68, 0x81, -0x18, 0xac, 0xdc, 0xb8, 0xb4, 0x75, 0xa8, 0x85, 0xb0, - //snu -0x5b, 0x3d, 0xd6, -0xaa, 0x6e, 0xb7, 0x9a, 0x96, 0x01, 0x19, 0xb3, 0x36, 0xaa, 0x88, 0x91, -0xff, 0x69, 0x5d, 0xf0, 0xa3, 0x9c, 0xfa, 0xd0, 0xcb, 0x60, 0xc8, 0xe7, -0xeb, 0xab, 0xd4, 0x62, 0xff, -//}; -//unsigned int sig_sha256_bsnrnd_msg0_dat_len = 733; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_first_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_first_entry.inc deleted file mode 100644 index bef6878401..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_first_entry.inc +++ /dev/null @@ -1,68 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ -/*! -* \file -* \brief Test data. -* -* Type : Intel(R) EPID 1.1 signature based revocation list -* Group : grpX -* Revoked signature : Member0/sig_sha256_bsn0_msg0 last entry -*/ -//unsigned char epid_sigrevlist_dat[] = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // RLver - 0x00, 0x00, 0x00, 0x03, - // n2 - 0x00, 0x00, 0x00, 0x03, - // B, K - revoked signature to test - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, - 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, - 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, - 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, - 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, - 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x6e, 0xdf, 0x9f, 0xe3, 0xe0, 0x8d, 0xe4, 0x0b, - 0xbb, 0x86, 0x12, 0xd7, 0xc5, 0xd8, 0x14, 0x5e, 0x67, 0xbd, 0x1d, 0xa5, - 0x0b, 0xdb, 0xf5, 0x87, 0x36, 0x6c, 0xda, 0x81, 0x2a, 0x8c, 0x2e, 0x78, - 0xef, 0x6c, 0x42, 0xb2, 0xcd, 0x40, 0xda, 0xd3, 0x22, 0xf4, 0xd9, 0x7e, - 0x34, 0x78, 0x49, 0x41, 0x0d, 0x1e, 0x64, 0xc1, 0x43, 0xa1, 0xb0, 0xe9, - 0x6c, 0x45, 0xe2, 0x2d, 0xc3, 0xeb, 0xc8, 0x14, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x95, 0x8b, 0x05, 0x1e, 0x8b, 0xa5, 0x21, 0xdd, - 0x63, 0xfd, 0x1a, 0x36, 0xb7, 0x42, 0x04, 0x92, 0x10, 0xe6, 0x29, 0x22, - 0xc8, 0x97, 0xb1, 0x28, 0x01, 0x45, 0x95, 0xf1, 0x2a, 0xa0, 0x86, 0x41, - 0xc4, 0x4c, 0xb6, 0x3b, 0x45, 0x23, 0x6e, 0x8d, 0x6e, 0x07, 0xc7, 0x5b, - 0xe5, 0x46, 0xca, 0xd0, 0x68, 0x99, 0xb6, 0x30, 0x7b, 0x70, 0xb0, 0x92, - 0x48, 0xc2, 0x89, 0xb6, 0x27, 0x3b, 0x95, 0x89, -// }; -// unsigned int epid_sigrevlist_dat_len = 400; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_last_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_last_entry.inc deleted file mode 100644 index ebd42ab37b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_last_entry.inc +++ /dev/null @@ -1,68 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ -/*! -* \file -* \brief Test data. -* -* Type : Intel(R) EPID 1.1 signature based revocation list -* Group : grpX -* Revoked signature : Member0/sig_sha256_bsn0_msg0 last entry -*/ -//unsigned char epid_sigrevlist_dat[] = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // RLver - 0x00, 0x00, 0x00, 0x03, - // n2 - 0x00, 0x00, 0x00, 0x03, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x6e, 0xdf, 0x9f, 0xe3, 0xe0, 0x8d, 0xe4, 0x0b, - 0xbb, 0x86, 0x12, 0xd7, 0xc5, 0xd8, 0x14, 0x5e, 0x67, 0xbd, 0x1d, 0xa5, - 0x0b, 0xdb, 0xf5, 0x87, 0x36, 0x6c, 0xda, 0x81, 0x2a, 0x8c, 0x2e, 0x78, - 0xef, 0x6c, 0x42, 0xb2, 0xcd, 0x40, 0xda, 0xd3, 0x22, 0xf4, 0xd9, 0x7e, - 0x34, 0x78, 0x49, 0x41, 0x0d, 0x1e, 0x64, 0xc1, 0x43, 0xa1, 0xb0, 0xe9, - 0x6c, 0x45, 0xe2, 0x2d, 0xc3, 0xeb, 0xc8, 0x14, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x95, 0x8b, 0x05, 0x1e, 0x8b, 0xa5, 0x21, 0xdd, - 0x63, 0xfd, 0x1a, 0x36, 0xb7, 0x42, 0x04, 0x92, 0x10, 0xe6, 0x29, 0x22, - 0xc8, 0x97, 0xb1, 0x28, 0x01, 0x45, 0x95, 0xf1, 0x2a, 0xa0, 0x86, 0x41, - 0xc4, 0x4c, 0xb6, 0x3b, 0x45, 0x23, 0x6e, 0x8d, 0x6e, 0x07, 0xc7, 0x5b, - 0xe5, 0x46, 0xca, 0xd0, 0x68, 0x99, 0xb6, 0x30, 0x7b, 0x70, 0xb0, 0x92, - 0x48, 0xc2, 0x89, 0xb6, 0x27, 0x3b, 0x95, 0x89, - // B, K - revoked signature to test - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, - 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, - 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, - 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, - 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, - 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, -// }; -// unsigned int epid_sigrevlist_dat_len = 400; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_middle_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_middle_entry.inc deleted file mode 100644 index c8c01c7cc1..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_middle_entry.inc +++ /dev/null @@ -1,68 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ -/*! -* \file -* \brief Test data. -* -* Type : Intel(R) EPID 1.1 signature based revocation list -* Group : grpX -* Revoked signature : Member0/sig_sha256_bsn0_msg0 last entry -*/ -//unsigned char epid_sigrevlist_dat[] = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // RLver - 0x00, 0x00, 0x00, 0x03, - // n2 - 0x00, 0x00, 0x00, 0x03, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x6e, 0xdf, 0x9f, 0xe3, 0xe0, 0x8d, 0xe4, 0x0b, - 0xbb, 0x86, 0x12, 0xd7, 0xc5, 0xd8, 0x14, 0x5e, 0x67, 0xbd, 0x1d, 0xa5, - 0x0b, 0xdb, 0xf5, 0x87, 0x36, 0x6c, 0xda, 0x81, 0x2a, 0x8c, 0x2e, 0x78, - 0xef, 0x6c, 0x42, 0xb2, 0xcd, 0x40, 0xda, 0xd3, 0x22, 0xf4, 0xd9, 0x7e, - 0x34, 0x78, 0x49, 0x41, 0x0d, 0x1e, 0x64, 0xc1, 0x43, 0xa1, 0xb0, 0xe9, - 0x6c, 0x45, 0xe2, 0x2d, 0xc3, 0xeb, 0xc8, 0x14, - // B, K - revoked signature to test - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, - 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, - 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, - 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, - 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, - 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x95, 0x8b, 0x05, 0x1e, 0x8b, 0xa5, 0x21, 0xdd, - 0x63, 0xfd, 0x1a, 0x36, 0xb7, 0x42, 0x04, 0x92, 0x10, 0xe6, 0x29, 0x22, - 0xc8, 0x97, 0xb1, 0x28, 0x01, 0x45, 0x95, 0xf1, 0x2a, 0xa0, 0x86, 0x41, - 0xc4, 0x4c, 0xb6, 0x3b, 0x45, 0x23, 0x6e, 0x8d, 0x6e, 0x07, 0xc7, 0x5b, - 0xe5, 0x46, 0xca, 0xd0, 0x68, 0x99, 0xb6, 0x30, 0x7b, 0x70, 0xb0, 0x92, - 0x48, 0xc2, 0x89, 0xb6, 0x27, 0x3b, 0x95, 0x89, -// }; -// unsigned int epid_sigrevlist_dat_len = 400; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_single_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_single_entry.inc deleted file mode 100644 index aaa0a8bbdf..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_single_entry.inc +++ /dev/null @@ -1,44 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 signature based revocation list - * Group : grpX - * Revoked signature : Member0/sig_sha256_bsn0_msg0 single entry - */ -//unsigned char sigrl_dat[] = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // RLver - 0x00, 0x00, 0x00, 0x01, - // n2 - 0x00, 0x00, 0x00, 0x01, - // B, K - revoked signature to test - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, - 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, - 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, - 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, - 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, - 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, -//}; -//unsigned int sigrl_dat_len = 140; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_first_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_first_entry.inc deleted file mode 100644 index c005e32234..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_first_entry.inc +++ /dev/null @@ -1,38 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 group revocation list grpX revoked first entry - * 0 32 64 96 128 Bit - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | RLVer = 3 | n3 = 3 | gid[1] = 0x7b | gid[2] = 0x12 | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * - * 128 160 Bit - * +-+-+-+-+-+-+-+-+ - * | gid[2] = 0x5f | - * +-+-+-+-+-+-+-+-+ - * - * 0x7b is revoked gid - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x7b, 0x00, 0x00, 0x00, 0x12, - 0x00, 0x00, 0x00, 0x5f -//}; -//unsigned int grprl_dat_len = 20; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_last_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_last_entry.inc deleted file mode 100644 index c239ce2e91..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_last_entry.inc +++ /dev/null @@ -1,38 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 group revocation list grpX revoked last entry - * 0 32 64 96 128 Bit - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | RLVer = 3 | n3 = 3 | gid[1] = 0x4e | gid[2] = 0x12 | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * - * 128 160 Bit - * +-+-+-+-+-+-+-+-+ - * | gid[2] = 0x7b | - * +-+-+-+-+-+-+-+-+ - * - * 0x7b is revoked gid - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x12, - 0x00, 0x00, 0x00, 0x7b -//}; -//unsigned int grprl_dat_len = 20; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_middle_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_middle_entry.inc deleted file mode 100644 index bbddb315c3..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_middle_entry.inc +++ /dev/null @@ -1,38 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 group revocation list grpX revoked middle entry - * 0 32 64 96 128 Bit - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | RLVer = 3 | n3 = 3 | gid[1] = 0x4e | gid[2] = 0x7b | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * - * 128 160 Bit - * +-+-+-+-+-+-+-+-+ - * | gid[2] = 0x6c | - * +-+-+-+-+-+-+-+-+ - * - * 0x7b is revoked gid - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x4e, 0x00, 0x00, 0x00, 0x7b, - 0x00, 0x00, 0x00, 0x6c -//}; -//unsigned int grprl_dat_len = 20; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_single_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_single_entry.inc deleted file mode 100644 index e25cce391a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_single_entry.inc +++ /dev/null @@ -1,32 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 group revocation list single entry grpX revoked - * 0 32 64 96 Bit - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * | RLVer = 3 | n3 = 1 | gid[0] = 0x7b | - * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - * - * 0x7b is revoked gid - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x7b -//}; -//unsigned int grprl_dat_len = 12; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/verifier_wrapper-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/verifier_wrapper-testhelper.cc deleted file mode 100644 index cea2e06d72..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/verifier_wrapper-testhelper.cc +++ /dev/null @@ -1,54 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcGroup C++ wrapper implementation. - */ -#include -#include -#include - -#include "epid/common-testhelper/1.1/verifier_wrapper-testhelper.h" - -Epid11VerifierCtxObj::Epid11VerifierCtxObj(Epid11GroupPubKey const& pub_key) - : ctx_(nullptr) { - auto sts = Epid11VerifierCreate(&pub_key, nullptr, &ctx_); - if (kEpidNoErr != sts) { - printf("%s(%d): %s\n", __FILE__, __LINE__, "test defect:"); - throw std::logic_error(std::string("Failed to call: ") + - "Epid11VerifierCreate()"); - } -} - -Epid11VerifierCtxObj::Epid11VerifierCtxObj(Epid11GroupPubKey const& pub_key, - Epid11VerifierPrecomp const& precomp) - : ctx_(nullptr) { - auto sts = Epid11VerifierCreate(&pub_key, &precomp, &ctx_); - if (kEpidNoErr != sts) { - printf("%s(%d): %s\n", __FILE__, __LINE__, "test defect:"); - throw std::logic_error(std::string("Failed to call: ") + - "Epid11VerifierCreate()"); - } -} - -Epid11VerifierCtxObj::~Epid11VerifierCtxObj() { Epid11VerifierDelete(&ctx_); } - -Epid11VerifierCtx* Epid11VerifierCtxObj::ctx() const { return ctx_; } - -Epid11VerifierCtxObj::operator Epid11VerifierCtx*() const { return ctx_; } - -Epid11VerifierCtxObj::operator const Epid11VerifierCtx*() const { return ctx_; } diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/verifier_wrapper-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/verifier_wrapper-testhelper.h deleted file mode 100644 index f3c351ac05..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/1.1/verifier_wrapper-testhelper.h +++ /dev/null @@ -1,56 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Verifier C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_1_1_VERIFIER_WRAPPER_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_1_1_VERIFIER_WRAPPER_TESTHELPER_H_ - -extern "C" { -#include "epid/verifier/1.1/api.h" -} - -/// C++ Wrapper to manage memory for VerifierCtx via RAII -class Epid11VerifierCtxObj { - public: - /// Create an Epid11VerifierCtx - explicit Epid11VerifierCtxObj(Epid11GroupPubKey const& pub_key); - /// Create an Epid11VerifierCtx given precomputation blob - Epid11VerifierCtxObj(Epid11GroupPubKey const& pub_key, - Epid11VerifierPrecomp const& precomp); - - // This class instances are not meant to be copied. - // Explicitly delete copy constructor and assignment operator. - Epid11VerifierCtxObj(const Epid11VerifierCtxObj&) = delete; - Epid11VerifierCtxObj& operator=(const Epid11VerifierCtxObj&) = delete; - - /// Destroy the Epid11VerifierCtx - ~Epid11VerifierCtxObj(); - /// get a pointer to the stored Epid11VerifierCtx - Epid11VerifierCtx* ctx() const; - /// cast operator to get the pointer to the stored Epid11VerifierCtx - operator Epid11VerifierCtx*() const; - /// const cast operator to get the pointer to the stored Epid11VerifierCtx - operator const Epid11VerifierCtx*() const; - - private: - /// The stored VerifierCtx - Epid11VerifierCtx* ctx_; -}; - -#endif // EPID_COMMON_TESTHELPER_1_1_VERIFIER_WRAPPER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/Makefile deleted file mode 100644 index 74e9749008..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/make -f - -#define variables -GTEST_INCLUDE_DIR = ../../ext -TEST_INSTALL_DIR = $(epidinstalldir)/test/ - -COMMON_TESTHELPER_INCLUDE_DIR = ../.. -COMMON_TESTHELPER_11_INCLUDE_DIR = ../../1.1 -COMMON_TESTHELPER_SRC = $(wildcard ./*.cc) -COMMON_TESTHELPER_SRC += $(wildcard ./1.1/*.cc) -COMMON_TESTHELPER_UTEST_SRC = $(wildcard ./unittests/*.cc) -COMMON_TESTHELPER_OBJ = $(sort $(COMMON_TESTHELPER_SRC:.cc=.o)) -COMMON_TESTHELPER_UTEST_OBJ = $(sort $(COMMON_TESTHELPER_UTEST_SRC:.cc=.o)) -COMMON_TESTHELPER_LIB = ./libcommon-testhelper.a -COMMON_TESTHELPER_UTEST_EXE = ./unittests/common-testhelper-utest - -LIB_COMMON_TESTHELPER_DIR = . -LIB_COMMON_DIR = ../common -LIB_IPPCP_DIR = ../../ext/ipp/sources/ippcp/src -LIB_IPPCPEPID_DIR = ../../ext/ipp/sources/ippcpepid/src - -#set flags for linker -LDFLAGS += -L$(GTEST_INCLUDE_DIR)/gtest -L$(LIB_COMMON_TESTHELPER_DIR) \ - -L$(LIB_COMMON_DIR) -L$(LIB_IPPCPEPID_DIR) -L$(LIB_IPPCP_DIR) \ - -lgtest -lcommon-testhelper -lcommon -lippcpepid -lippcp - -#target part -$(COMMON_TESTHELPER_LIB): $(COMMON_TESTHELPER_OBJ) - $(AR) rc $(COMMON_TESTHELPER_LIB) $(COMMON_TESTHELPER_OBJ) - ranlib $(COMMON_TESTHELPER_LIB) - -$(COMMON_TESTHELPER_OBJ): %.o: %.cc - $(CXX) -o $@ $(CXXFLAGS) -I$(COMMON_TESTHELPER_INCLUDE_DIR) -c $^ - -$(COMMON_TESTHELPER_UTEST_EXE): $(COMMON_TESTHELPER_UTEST_OBJ) - $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) - -$(COMMON_TESTHELPER_UTEST_OBJ): %.o: %.cc - $(CXX) -o $@ $(CXXFLAGS) -I$(COMMON_TESTHELPER_INCLUDE_DIR) \ - -I$(COMMON_TESTHELPER_11_INCLUDE_DIR) -I$(GTEST_INCLUDE_DIR) -c $^ - -build: all - -all: $(COMMON_TESTHELPER_LIB) - -install: -#install tests if they exist -ifneq (,$(wildcard $(COMMON_TESTHELPER_UTEST_EXE))) - mkdir -p '$(TEST_INSTALL_DIR)' - cp $(COMMON_TESTHELPER_UTEST_EXE) '$(TEST_INSTALL_DIR)' -endif - -check: $(COMMON_TESTHELPER_UTEST_EXE) run - -run: - $(COMMON_TESTHELPER_UTEST_EXE) $(GTEST_FLAGS) - -clean: - rm -f $(COMMON_TESTHELPER_OBJ) \ - $(COMMON_TESTHELPER_LIB) \ - $(COMMON_TESTHELPER_UTEST_OBJ) \ - $(COMMON_TESTHELPER_UTEST_EXE) \ - *.xml diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/bignum_wrapper-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/bignum_wrapper-testhelper.cc deleted file mode 100644 index 75585e2a38..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/bignum_wrapper-testhelper.cc +++ /dev/null @@ -1,123 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Bignum C++ wrapper implementation. - */ -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" -#include "epid/common/math/bignum.h" - -/// bignum deleter type -struct BigNumDeleter { - /// bignum deleter - void operator()(BigNum* bn) { - if (bn) { - DeleteBigNum(&bn); - } - } -}; - -/// bignum deleter singlton -BigNumDeleter bignum_deleter; - -/// Internal state of the bignum wrapper -struct BigNumObj::State { - /// size of the stored BigNum - size_t size; - - /// The stored BigNum - std::shared_ptr bn_; - - /// Default initializing constructor - State() : size(0), bn_() {} - - /// write a new value - void write(unsigned char const* buf, size_t buflen, size_t len) { - bool orig_has_data = (buf != nullptr) && (buflen > 0); - std::shared_ptr bn; - BigNum* bn_ptr = nullptr; - THROW_ON_EPIDERR(NewBigNum(len, &bn_ptr)); - bn.reset(bn_ptr, bignum_deleter); - size = len; - if (orig_has_data) { - THROW_ON_EPIDERR(ReadBigNum(buf, buflen, bn.get())); - } - bn_ = bn; - } -}; - -BigNumObj::BigNumObj() : state_(new State) { - state_->write(nullptr, 0, sizeof(BigNumStr)); -} - -BigNumObj::BigNumObj(BigNumObj const& other) : state_(new State) { - bool orig_has_data = other.state_->bn_.get() != nullptr; - std::vector buf; - if (orig_has_data) { - buf.resize(other.state_->size); - THROW_ON_EPIDERR(WriteBigNum(other.state_->bn_.get(), buf.size(), &buf[0])); - } - state_->write(&buf[0], other.state_->size, buf.size()); -} - -BigNumObj& BigNumObj::operator=(BigNumObj const& other) { - bool orig_has_data = other.state_->bn_.get() != nullptr; - std::vector buf; - if (orig_has_data) { - buf.resize(other.state_->size); - THROW_ON_EPIDERR(WriteBigNum(other.state_->bn_.get(), buf.size(), &buf[0])); - } - state_->write(&buf[0], other.state_->size, buf.size()); - return *this; -} - -BigNumObj::BigNumObj(size_t data_size_bytes) : state_(new State) { - state_->write(nullptr, 0, data_size_bytes); -} - -BigNumObj::BigNumObj(size_t data_size_bytes, - std::vector const& bytes) - : state_(new State) { - state_->write(&bytes[0], bytes.size(), data_size_bytes); -} - -BigNumObj::BigNumObj(size_t data_size_bytes, BigNumStr const& bytes) - : state_(new State) { - state_->write((unsigned char const*)&bytes, sizeof(BigNumStr), - data_size_bytes); -} - -BigNumObj::BigNumObj(std::vector const& bytes) - : state_(new State) { - state_->write(&bytes[0], bytes.size(), bytes.size()); -} - -BigNumObj::BigNumObj(BigNumStr const& bytes) : state_(new State) { - state_->write((unsigned char const*)&bytes, sizeof(BigNumStr), - sizeof(BigNumStr)); -} - -BigNumObj::~BigNumObj() {} - -BigNumObj::operator BigNum*() { return state_->bn_.get(); } - -BigNumObj::operator const BigNum*() const { return state_->bn_.get(); } - -BigNum* BigNumObj::get() { return state_->bn_.get(); } - -BigNum const* BigNumObj::getc() const { return state_->bn_.get(); } diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/bignum_wrapper-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/bignum_wrapper-testhelper.h deleted file mode 100644 index 6008e65928..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/bignum_wrapper-testhelper.h +++ /dev/null @@ -1,69 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Bignum C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_BIGNUM_WRAPPER_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_BIGNUM_WRAPPER_TESTHELPER_H_ - -#include -#include - -extern "C" { -#include "epid/common/math/bignum.h" -} - -/*! -Wrapper class to provide Resource Allocation is Initialization handling -for BigNum -*/ -class BigNumObj { - public: - /// Create a BigNum of default size ( sizeof(BigNumStr) ) - BigNumObj(); - /// copy constructor - BigNumObj(BigNumObj const& other); - /// assignment operator - BigNumObj& operator=(BigNumObj const& other); - /// Create a BigNum of specific size - explicit BigNumObj(size_t data_size_bytes); - /// Create a BigNum of specific size and initialize it to bytes - BigNumObj(size_t data_size_bytes, std::vector const& bytes); - /// Create a BigNum of specific size and initialize it to bytes - BigNumObj(size_t data_size_bytes, BigNumStr const& bytes); - /// Create a BigNum the same size as bytes and initialize it to bytes - explicit BigNumObj(std::vector const& bytes); - /// Create a BigNum the same size as bytes and initialize it to bytes - explicit BigNumObj(BigNumStr const& bytes); - /// Destroy the Bignum - ~BigNumObj(); - /// cast operator to get the pointer to the stored BigNum - operator BigNum*(); - /// const cast operator to get the pointer to the stored BigNum - operator const BigNum*() const; - /// Get the underlying pointer - BigNum* get(); - /// Get the underlying pointer - BigNum const* getc() const; - - private: - struct State; - std::unique_ptr state_; -}; - -#endif // EPID_COMMON_TESTHELPER_BIGNUM_WRAPPER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/common-testhelper.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/common-testhelper.parts deleted file mode 100644 index 99365c9dcd..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/common-testhelper.parts +++ /dev/null @@ -1,91 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ -Import('*') -env.PartName('common-testhelper') - -src_files = Pattern(src_dir='.', - includes=['*-testhelper.cc'], - excludes=[], - recursive=False).files() -inc_files = Pattern(src_dir='.', - includes=['*-testhelper.h'], - excludes=[], - recursive=False).files() -epid11_src_files = Pattern(src_dir='1.1', - includes=['*-testhelper.cc'], - excludes=[], - recursive=False).files() -epid11_inc_files = Pattern(src_dir='1.1', - includes=['*-testhelper.h'], - excludes=[], - recursive=False).files() -test_data_files = Pattern(src_dir='testdata', - includes=['*'], - excludes=[], - recursive=True) -epid11_test_data_files = Pattern(src_dir='1.1/testdata', - includes=['*'], - excludes=[], - recursive=True) - -# unit tests -utest_files = Pattern(src_dir='.', - includes=['*-test.cc'], - excludes=[], - recursive=True).files() - -if 'install_package' in env['MODE']: - env.InstallTopLevel(src_files, sub_dir='epid/${PART_SHORT_NAME}') - env.InstallTopLevel(inc_files, sub_dir='epid/${PART_SHORT_NAME}') - env.InstallTopLevel(utest_files, - sub_dir='epid/${PART_SHORT_NAME}/unittests') - env.InstallTopLevel(test_data_files, - sub_dir='epid/${PART_SHORT_NAME}/testdata') - - env.InstallTopLevel(epid11_src_files, sub_dir='epid/${PART_SHORT_NAME}/1.1') - env.InstallTopLevel(epid11_inc_files, sub_dir='epid/${PART_SHORT_NAME}/1.1') - env.InstallTopLevel(epid11_test_data_files, - sub_dir='epid/${PART_SHORT_NAME}/1.1/testdata') - - parts_file = ['common-testhelper.parts'] - env.InstallTopLevel(parts_file, sub_dir='epid/${PART_SHORT_NAME}') - makefile = ['Makefile'] - env.InstallTopLevel(makefile, sub_dir='epid/${PART_SHORT_NAME}') -else: - env.DependsOn([ - Component('common'), - ]) - - env.Append(CPPPATH='#') - - testenv = env.Clone() - - outputs = env.Library('${PART_NAME}', src_files + epid11_src_files) - env.Sdk(outputs) - - testenv['UNIT_TEST_TARGET_NAME'] = "${PART_NAME}-${UNIT_TEST_TARGET}" - testenv.UnitTest("utest", - utest_files, - command_args=[ - '--gtest_color=yes', - '--gtest_print_time=1', - '--gtest_output=xml', - '--gtest_filter=**', - ], - make_pdb=(env.isConfigBasedOn('debug')), - depends=[Component('gtest'), - Component('common-testhelper')], - INSTALL_BIN='${INSTALL_TEST_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecgroup_wrapper-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecgroup_wrapper-testhelper.cc deleted file mode 100644 index 3ce5959515..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecgroup_wrapper-testhelper.cc +++ /dev/null @@ -1,126 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcGroup C++ wrapper implementation. - */ -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common/math/bignum.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" - -/// ecgroup deleter type -struct EcGroupDeleter { - /// ecgroup deleter - void operator()(EcGroup* ptr) { - if (ptr) { - DeleteEcGroup(&ptr); - } - } -}; - -/// ecgroup deleter singlton -EcGroupDeleter ecgroup_deleter; - -/// Internal state of the ecgroup wrapper -struct EcGroupObj::State { - /// The stored EcGroup - std::shared_ptr group_; - FiniteFieldObj fintefield_; - - /// constructor - State() : group_(nullptr, ecgroup_deleter) {} - - // State instances are not meant to be copied. - // Explicitly delete copy constructor and assignment operator. - State(const State&) = delete; - State& operator=(const State&) = delete; - - /// destructor - ~State() {} -}; - -EcGroupObj::EcGroupObj() : state_(new State()) { - const BigNumStr q_str = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, - 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x13}}}; - const FqElemStr b_str = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}}}; - const BigNumStr p_str = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, 0x92, 0x1A, - 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}}}; - const BigNumStr h1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}; - const G1ElemStr g1_str = { - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}}; - FiniteFieldObj fq(q_str); - EcGroup* temp = nullptr; - NewEcGroup(fq, FfElementObj(&fq), FfElementObj(&fq, b_str), - FfElementObj(&fq, g1_str.x), FfElementObj(&fq, g1_str.y), - BigNumObj(p_str), BigNumObj(h1), &temp); - state_->group_.reset(temp, ecgroup_deleter); - state_->fintefield_ = fq; -} - -EcGroupObj::EcGroupObj(EcGroupObj const& other) : state_(new State) { - state_->group_ = other.state_->group_; - state_->fintefield_ = other.state_->fintefield_; -} - -EcGroupObj& EcGroupObj::operator=(EcGroupObj const& other) { - state_->group_ = other.state_->group_; - state_->fintefield_ = other.state_->fintefield_; - return *this; -} - -EcGroupObj::EcGroupObj(FiniteFieldObj* ff, FfElement const* a, - FfElement const* b, FfElement const* x, - FfElement const* y, BigNum const* order, - BigNum const* cofactor) - : state_(new State) { - EcGroup* temp = nullptr; - NewEcGroup(*ff, a, b, x, y, order, cofactor, &temp); - state_->group_.reset(temp, ecgroup_deleter); - state_->fintefield_ = *ff; -} - -EcGroupObj::~EcGroupObj() {} - -EcGroupObj::operator EcGroup*() { return state_->group_.get(); } - -EcGroupObj::operator const EcGroup*() const { return state_->group_.get(); } - -EcGroup* EcGroupObj::get() { return state_->group_.get(); } - -EcGroup const* EcGroupObj::getc() const { return state_->group_.get(); } - -size_t EcGroupObj::GetElementMaxSize() const { - return 2 * state_->fintefield_.GetElementMaxSize(); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecgroup_wrapper-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecgroup_wrapper-testhelper.h deleted file mode 100644 index 4969134eb8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecgroup_wrapper-testhelper.h +++ /dev/null @@ -1,68 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcGroup C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_ECGROUP_WRAPPER_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_ECGROUP_WRAPPER_TESTHELPER_H_ - -#include -#include - -extern "C" { -#include "epid/common/math/ecgroup.h" -} - -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" - -/*! -Wrapper class to provide Resource Allocation is Initialization handling -for EcGroup -*/ -class EcGroupObj { - public: - /// constructor - EcGroupObj(); - /// copy constructor - EcGroupObj(EcGroupObj const& other); - /// assignment operator - EcGroupObj& operator=(EcGroupObj const& other); - /// Create a EcGroup - explicit EcGroupObj(FiniteFieldObj* ff, FfElement const* a, - FfElement const* b, FfElement const* x, - FfElement const* y, BigNum const* order, - BigNum const* cofactor); - /// Destroy the EcGroup - ~EcGroupObj(); - /// cast operator to get the pointer to the stored EcGroup - operator EcGroup*(); - /// const cast operator to get the pointer to the stored EcGroup - operator const EcGroup*() const; - /// Get the underlying pointer - EcGroup* get(); - /// Get the underlying pointer - EcGroup const* getc() const; - /// Get maximum size of group element - size_t GetElementMaxSize() const; - - private: - struct State; - std::unique_ptr state_; -}; - -#endif // EPID_COMMON_TESTHELPER_ECGROUP_WRAPPER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecpoint_wrapper-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecpoint_wrapper-testhelper.cc deleted file mode 100644 index f1aa18ce41..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecpoint_wrapper-testhelper.cc +++ /dev/null @@ -1,128 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcPoint C++ wrapper implementation. - */ -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common/math/bignum.h" - -/// ecpoint deleter type -struct EcPointDeleter { - /// ecpoint deleter - void operator()(EcPoint* ptr) { - if (ptr) { - DeleteEcPoint(&ptr); - } - } -}; - -/// ecpoint deleter singlton -EcPointDeleter ecpoint_deleter; - -/// Internal state of the ecpoint wrapper -struct EcPointObj::State { - /// The containing field - EcGroupObj group_; - /// The stored EcPoint - std::shared_ptr point_; - - State() : group_(), point_() {} - /// write a new value - void write(EcGroupObj* group, unsigned char const* buf, size_t buflen) { - group_ = *group; - bool orig_has_data = (buf != nullptr) && (buflen > 0); - std::shared_ptr point; - EcPoint* point_ptr; - THROW_ON_EPIDERR(NewEcPoint(group_, &point_ptr)); - point.reset(point_ptr, ecpoint_deleter); - if (orig_has_data) { - THROW_ON_EPIDERR(ReadEcPoint(group_, buf, buflen, point.get())); - } - point_ = point; - } -}; - -EcPointObj::EcPointObj() : state_(new State) {} - -EcPointObj::EcPointObj(EcPointObj const& other) : state_(new State) { - std::vector buf = other.data(); - state_->write(&other.state_->group_, &buf[0], buf.size()); -} - -EcPointObj& EcPointObj::operator=(EcPointObj const& other) { - std::vector buf = other.data(); - state_->write(&other.state_->group_, &buf[0], buf.size()); - return *this; -} - -EcPointObj::EcPointObj(EcGroupObj* group) : state_(new State) { - state_->write(group, nullptr, 0); -} - -EcPointObj::EcPointObj(EcGroupObj* group, G1ElemStr const& bytes) - : state_(new State) { - init(group, (unsigned char*)&bytes, sizeof(bytes)); -} - -EcPointObj::EcPointObj(EcGroupObj* group, G2ElemStr const& bytes) - : state_(new State) { - init(group, (unsigned char*)&bytes, sizeof(bytes)); -} - -EcPointObj::EcPointObj(EcGroupObj* group, Epid11G2ElemStr const& bytes) - : state_(new State) { - init(group, (unsigned char*)&bytes, sizeof(bytes)); -} - -EcPointObj::EcPointObj(EcGroupObj* group, - std::vector const& bytes) - : state_(new State) { - init(group, &bytes[0], bytes.size()); -} - -EcPointObj::EcPointObj(EcGroupObj* group, void const* bytes, size_t size) - : state_(new State) { - init(group, (unsigned char const*)bytes, size); -} - -void EcPointObj::init(EcGroupObj* group, unsigned char const* bytes, - size_t size) { - state_->write(group, bytes, size); -} - -EcPointObj::~EcPointObj() {} - -EcPointObj::operator EcPoint*() { return state_->point_.get(); } - -EcPointObj::operator const EcPoint*() const { return state_->point_.get(); } - -EcPoint* EcPointObj::get() { return state_->point_.get(); } - -EcPoint const* EcPointObj::getc() const { return state_->point_.get(); } - -std::vector EcPointObj::data() const { - std::vector buf; - if (state_->point_.get() != nullptr) { - buf.resize(state_->group_.GetElementMaxSize()); - THROW_ON_EPIDERR(WriteEcPoint(state_->group_, state_->point_.get(), &buf[0], - buf.size())); - } - return buf; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecpoint_wrapper-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecpoint_wrapper-testhelper.h deleted file mode 100644 index 87b3af2442..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ecpoint_wrapper-testhelper.h +++ /dev/null @@ -1,78 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcPoint C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_ECPOINT_WRAPPER_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_ECPOINT_WRAPPER_TESTHELPER_H_ - -#include -#include - -extern "C" { -#include "epid/common/math/bignum.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/1.1/types.h" -} - -class EcGroupObj; - -/*! -Wrapper class to provide Resource Allocation is Initialization handling -for EcPoint -*/ -class EcPointObj { - public: - /// constructor - EcPointObj(); - /// copy constructor - EcPointObj(EcPointObj const& other); - /// assignment operator - EcPointObj& operator=(EcPointObj const& other); - /// Create an EcPoint - explicit EcPointObj(EcGroupObj* group); - /// Create an EcPoint - EcPointObj(EcGroupObj* group, G1ElemStr const& bytes); - /// Create an EcPoint - EcPointObj(EcGroupObj* group, G2ElemStr const& bytes); - /// Create an EcPoint - EcPointObj(EcGroupObj* group, Epid11G2ElemStr const& bytes); - /// Create an EcPoint - EcPointObj(EcGroupObj* group, std::vector const& bytes); - /// Create an EcPoint - EcPointObj(EcGroupObj* group, void const* bytes, size_t size); - /// Destroy the EcPoint - ~EcPointObj(); - /// cast operator to get the pointer to the stored EcPoint - operator EcPoint*(); - /// const cast operator to get the pointer to the stored EcPoint - operator const EcPoint*() const; - /// Get the underlying pointer - EcPoint* get(); - /// Get the underlying pointer - EcPoint const* getc() const; - /// Get element bytes - std::vector data() const; - - private: - void init(EcGroupObj* group, unsigned char const* bytes, size_t size); - struct State; - std::unique_ptr state_; -}; - -#endif // EPID_COMMON_TESTHELPER_ECPOINT_WRAPPER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/epid_params-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/epid_params-testhelper.cc deleted file mode 100644 index 57fa53bc2b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/epid_params-testhelper.cc +++ /dev/null @@ -1,164 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Intel(R) EPID parameters C++ wrapper implementation. - */ - -#include -#include - -#include "epid/common-testhelper/epid_params-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/src/ecgroup-internal.h" -#include "epid/common/math/src/finitefield-internal.h" -#include "epid/common/math/src/pairing-internal.h" -} - -Epid20Params::Epid20Params() { - // construct Fq finite field - fq = FiniteFieldObj(q_str_); - - // construct Fq^2 finite field - FfElementObj neg_beta(&fq); - THROW_ON_EPIDERR(FfNeg(fq, FfElementObj(&fq, beta_str_), neg_beta)); - fq2 = FiniteFieldObj(fq, neg_beta, 2); - - // construct Fq^6 finite field - FfElementObj neg_xi(&fq2); - THROW_ON_EPIDERR(FfNeg(fq2, FfElementObj(&fq2, xi_str_), neg_xi)); - fq6 = FiniteFieldObj(fq2, neg_xi, 3); - - // construct Fq^12 finite field - FfElementObj neg_v(&fq6); - THROW_ON_EPIDERR(FfNeg(fq6, FfElementObj(&fq6, v_str_), neg_v)); - GT = FiniteFieldObj(fq6, neg_v, 2); - - const BigNumStr h1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}; - - // Create G1 - // G1 is an elliptic curve group E(Fq).It can be initialized as follows : - // Set G1 = E(Fq).init(p, q, n = p, h = 1, a = 0, b, g1.x, g1.y). - G1 = EcGroupObj(&fq, FfElementObj(&fq), FfElementObj(&fq, b_str_), - FfElementObj(&fq, g1_str_.x), FfElementObj(&fq, g1_str_.y), - BigNumObj(p_str_), BigNumObj(h1)); - - // set h = 2q - p, aka cofactor - std::vector cofactor_str( - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfc, 0xf0, 0xcd, 0x46, 0xe5, 0xf2, 0x5e, 0xee, 0x71, 0xa4, 0xa0, - 0x0c, 0xdc, 0x65, 0xfb, 0x12, 0x96, 0x82, 0xea, 0xb0, 0x25, 0x08, 0x4a, - 0x8c, 0x9b, 0x10, 0x19}); - // set n = p * h, AKA order - std::vector order_str( - {0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xe1, 0x9a, 0x8d, 0xcb, 0xe4, 0xc7, - 0x38, 0xfa, 0x9b, 0x98, 0x4d, 0x1c, 0x12, 0x9f, 0x64, 0x97, 0xe8, 0x54, - 0xa3, 0x0a, 0x81, 0xac, 0x42, 0xf9, 0x39, 0x16, 0xa7, 0x70, 0x21, 0xdc, - 0xfb, 0xb6, 0xe7, 0x7e, 0x1f, 0x5b, 0x55, 0xcc, 0x4e, 0x84, 0xcd, 0x19, - 0x4f, 0x49, 0x20, 0x94, 0xb5, 0xd8, 0x12, 0xa0, 0x2e, 0x7f, 0x40, 0x13, - 0xb2, 0xfa, 0xa1, 0x45}); - - // Compute xi' = Fq2.inverse(xi). - FfElementObj inv_xi(&fq2); - THROW_ON_EPIDERR(FfInv(fq2, FfElementObj(&fq2, xi_str_), inv_xi)); - // Compute b' = Fq2.mul(xi', b). - FfElementObj b_dash(&fq2); - THROW_ON_EPIDERR(FfMul(fq2, inv_xi.get(), FfElementObj(&fq, b_str_), b_dash)); - - // Set G2 = E(Fq2).init(p, param(Fq2), n, h, 0, b', g2.x, g2.y) - G2 = EcGroupObj(&fq2, FfElementObj(&fq2), b_dash, - FfElementObj(&fq2, &g2_str_.x, sizeof(g2_str_.x)), - FfElementObj(&fq2, &g2_str_.y, sizeof(g2_str_.y)), - BigNumObj(order_str), BigNumObj(cofactor_str)); -} - -const BigNumStr Epid20Params::q_str_ = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, - 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x13}}}; -const FqElemStr Epid20Params::beta_str_ = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, - 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x12}}}; -const Fq6ElemStr Epid20Params::v_str_ = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}; - -const BigNumStr Epid20Params::p_str_ = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, 0x92, 0x1A, - 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}}}; -const FqElemStr Epid20Params::b_str_ = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}}}; -const FqElemStr Epid20Params::h_str_ = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}; -const G1ElemStr Epid20Params::g1_str_ = { - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}}; -const Fq2ElemStr Epid20Params::xi_str_ = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}}}; -const G2ElemStr Epid20Params::g2_str_ = { - {{{{0xE2, 0x01, 0x71, 0xC5, 0x4A, 0xA3, 0xDA, 0x05, 0x21, 0x67, 0x04, 0x13, - 0x74, 0x3C, 0xCF, 0x22, 0xD2, 0x5D, 0x52, 0x68, 0x3D, 0x32, 0x47, 0x0E, - 0xF6, 0x02, 0x13, 0x43, 0xBF, 0x28, 0x23, 0x94}}}, - {{{0x59, 0x2D, 0x1E, 0xF6, 0x53, 0xA8, 0x5A, 0x80, 0x46, 0xCC, 0xDC, 0x25, - 0x4F, 0xBB, 0x56, 0x56, 0x43, 0x43, 0x3B, 0xF6, 0x28, 0x96, 0x53, 0xE2, - 0x7D, 0xF7, 0xB2, 0x12, 0xBA, 0xA1, 0x89, 0xBE}}}}, - {{{{0xAE, 0x60, 0xA4, 0xE7, 0x51, 0xFF, 0xD3, 0x50, 0xC6, 0x21, 0xE7, 0x03, - 0x31, 0x28, 0x26, 0xBD, 0x55, 0xE8, 0xB5, 0x9A, 0x4D, 0x91, 0x68, 0x38, - 0x41, 0x4D, 0xB8, 0x22, 0xDD, 0x23, 0x35, 0xAE}}}, - {{{0x1A, 0xB4, 0x42, 0xF9, 0x89, 0xAF, 0xE5, 0xAD, 0xF8, 0x02, 0x74, 0xF8, - 0x76, 0x45, 0xE2, 0x53, 0x2C, 0xDC, 0x61, 0x81, 0x90, 0x93, 0xD6, 0x13, - 0x2C, 0x90, 0xFE, 0x89, 0x51, 0xB9, 0x24, 0x21}}}}}; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/epid_params-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/epid_params-testhelper.h deleted file mode 100644 index 42e2a5cfab..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/epid_params-testhelper.h +++ /dev/null @@ -1,72 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Intel(R) EPID 2.0 parameters C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_EPID_PARAMS_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_EPID_PARAMS_TESTHELPER_H_ - -#include -#include "epid/common/types.h" - -extern "C" { -#include "epid/common/math/bignum.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/ecgroup.h" -} - -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" - -class Epid20Params { - public: - Epid20Params(); - - // This class instances are not meant to be copied. - // Explicitly delete copy constructor and assignment operator. - Epid20Params(const Epid20Params&) = delete; - Epid20Params& operator=(const Epid20Params&) = delete; - - virtual ~Epid20Params() {} - - FiniteFieldObj GT; - EcGroupObj G1; - EcGroupObj G2; - - private: - static const BigNumStr q_str_; - static const FqElemStr beta_str_; - static const Fq6ElemStr v_str_; - - static const BigNumStr p_str_; - static const FqElemStr b_str_; - static const FqElemStr h_str_; - static const G1ElemStr g1_str_; - - static const Fq2ElemStr xi_str_; - static const G2ElemStr g2_str_; - - FiniteFieldObj fq; - FiniteFieldObj fq2; - FiniteFieldObj fq6; -}; - -#endif // EPID_COMMON_TESTHELPER_EPID_PARAMS_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/errors-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/errors-testhelper.h deleted file mode 100644 index f61de1b3de..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/errors-testhelper.h +++ /dev/null @@ -1,41 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Error handling C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_ERRORS_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_ERRORS_TESTHELPER_H_ - -#include -#include -#include -#include -#include - -extern "C" { -#include "epid/common/math/bignum.h" -} - -/// Macro used to indicate fatal error during unit test run -#define THROW_ON_EPIDERR(actual) \ - if (kEpidNoErr != actual) { \ - printf("%s(%d): error: %s\n", __FILE__, __LINE__, "test defect"); \ - throw std::logic_error(std::string("Failed to call: ") + #actual); \ - } - -#endif // EPID_COMMON_TESTHELPER_ERRORS_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ffelement_wrapper-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ffelement_wrapper-testhelper.cc deleted file mode 100644 index 675142e0af..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ffelement_wrapper-testhelper.cc +++ /dev/null @@ -1,146 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief FfElement C++ wrapper implementation. - */ -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common/math/bignum.h" - -/// ffelement deleter type -struct FfElementDeleter { - /// ffelement deleter - void operator()(FfElement* ffe) { - if (ffe) { - DeleteFfElement(&ffe); - } - } -}; - -/// ffelement deleter singlton -FfElementDeleter ff_element_deleter; - -/// Internal state of the ffelement wrapper -struct FfElementObj::State { - /// The containing field - FiniteFieldObj ff_; - /// size of the element data - size_t size; - /// The stored FfElement - std::shared_ptr ffe_; - - State() : ff_(), size(0), ffe_() {} - /// write a new value - void write(FiniteFieldObj* ff, unsigned char const* buf, size_t buflen) { - ff_ = *ff; - bool orig_has_data = (buf != nullptr) && (buflen > 0); - std::shared_ptr ffe; - FfElement* ffe_ptr; - THROW_ON_EPIDERR(NewFfElement(ff_, &ffe_ptr)); - ffe.reset(ffe_ptr, ff_element_deleter); - size = buflen; - if (orig_has_data) { - THROW_ON_EPIDERR(ReadFfElement(ff_, buf, buflen, ffe.get())); - } - ffe_ = ffe; - } -}; - -FfElementObj::FfElementObj() : state_(new State) {} - -FfElementObj::FfElementObj(FfElementObj const& other) : state_(new State) { - std::vector buf = other.data(); - state_->write(&other.state_->ff_, &buf[0], buf.size()); -} - -FfElementObj& FfElementObj::operator=(FfElementObj const& other) { - std::vector buf = other.data(); - state_->write(&other.state_->ff_, &buf[0], buf.size()); - return *this; -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff) : state_(new State) { - state_->write(ff, nullptr, 0); -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff, FpElemStr const& bytes) - : state_(new State) { - init(ff, (unsigned char*)&bytes, sizeof(bytes)); -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff, FqElemStr const& bytes) - : state_(new State) { - init(ff, (unsigned char*)&bytes, sizeof(bytes)); -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff, Fq2ElemStr const& bytes) - : state_(new State) { - init(ff, (unsigned char*)&bytes, sizeof(bytes)); -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff, Fq3ElemStr const& bytes) - : state_(new State) { - init(ff, (unsigned char*)&bytes, sizeof(bytes)); -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff, Fq6ElemStr const& bytes) - : state_(new State) { - init(ff, (unsigned char*)&bytes, sizeof(bytes)); -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff, Fq12ElemStr const& bytes) - : state_(new State) { - init(ff, (unsigned char*)&bytes, sizeof(bytes)); -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff, - std::vector const& bytes) - : state_(new State) { - init(ff, &bytes[0], bytes.size()); -} - -FfElementObj::FfElementObj(FiniteFieldObj* ff, void const* bytes, size_t size) - : state_(new State) { - init(ff, (unsigned char const*)bytes, size); -} - -void FfElementObj::init(FiniteFieldObj* ff, unsigned char const* bytes, - size_t size) { - state_->write(ff, bytes, size); -} - -FfElementObj::~FfElementObj() {} - -FfElementObj::operator FfElement*() { return state_->ffe_.get(); } - -FfElementObj::operator const FfElement*() const { return state_->ffe_.get(); } - -FfElement* FfElementObj::get() { return state_->ffe_.get(); } - -FfElement const* FfElementObj::getc() const { return state_->ffe_.get(); } - -std::vector FfElementObj::data() const { - std::vector buf; - if (state_->ffe_.get() != nullptr) { - buf.resize(state_->ff_.GetElementMaxSize()); - THROW_ON_EPIDERR( - WriteFfElement(state_->ff_, state_->ffe_.get(), &buf[0], buf.size())); - } - return buf; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ffelement_wrapper-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ffelement_wrapper-testhelper.h deleted file mode 100644 index df09065b8b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/ffelement_wrapper-testhelper.h +++ /dev/null @@ -1,84 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief FfElement C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_FFELEMENT_WRAPPER_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_FFELEMENT_WRAPPER_TESTHELPER_H_ - -#include -#include - -extern "C" { -#include "epid/common/math/bignum.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/1.1/types.h" -} - -class FiniteFieldObj; - -/*! -Wrapper class to provide Resource Allocation is Initialization handling -for FfElement -*/ -class FfElementObj { - public: - /// constructor - FfElementObj(); - /// copy constructor - FfElementObj(FfElementObj const& other); - /// assignment operator - FfElementObj& operator=(FfElementObj const& other); - /// Create a FfElement - explicit FfElementObj(FiniteFieldObj* ff); - /// Create a FfElement - FfElementObj(FiniteFieldObj* ff, FpElemStr const& bytes); - /// Create a FfElement - FfElementObj(FiniteFieldObj* ff, FqElemStr const& bytes); - /// Create a FfElement - FfElementObj(FiniteFieldObj* ff, Fq2ElemStr const& bytes); - /// Create a FfElement - FfElementObj(FiniteFieldObj* ff, Fq3ElemStr const& bytes); - /// Create a FfElement - FfElementObj(FiniteFieldObj* ff, Fq6ElemStr const& bytes); - /// Create a FfElement - FfElementObj(FiniteFieldObj* ff, Fq12ElemStr const& bytes); - /// Create a FfElement - FfElementObj(FiniteFieldObj* ff, std::vector const& bytes); - /// Create a FfElement - FfElementObj(FiniteFieldObj* ff, void const* bytes, size_t size); - /// Destroy the FfElement - ~FfElementObj(); - /// cast operator to get the pointer to the stored FfElement - operator FfElement*(); - /// const cast operator to get the pointer to the stored FfElement - operator const FfElement*() const; - /// Get the underlying pointer - FfElement* get(); - /// Get the underlying pointer - FfElement const* getc() const; - /// Get element bytes - std::vector data() const; - - private: - void init(FiniteFieldObj* ff, unsigned char const* bytes, size_t size); - struct State; - std::unique_ptr state_; -}; - -#endif // EPID_COMMON_TESTHELPER_FFELEMENT_WRAPPER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/finite_field_wrapper-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/finite_field_wrapper-testhelper.cc deleted file mode 100644 index 12bf5d3df1..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/finite_field_wrapper-testhelper.cc +++ /dev/null @@ -1,177 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief FiniteField C++ wrapper implementation. - */ -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common/math/bignum.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" - -/// finite field deleter type -struct FiniteFieldDeleter { - /// finite field deleter - void operator()(FiniteField* ff) { - if (ff) { - DeleteFiniteField(&ff); - } - } -}; - -/// finite field deleter singlton -FiniteFieldDeleter finite_field_deleter; - -/// Internal state of the finite field wrapper -struct FiniteFieldObj::State { - /// Inner state of complex fields - struct InnerState { - /// The ground field - FiniteFieldObj gf_; - }; - /// Inner state - /*! - We store a pointer to InnerState so simple fields - that are not composed from other fields do not result - in an infinite series of fields. - - Instead simple fields have a NULL inner_state and - complex fields have it set. - */ - InnerState* inner_state; - - /// The stored FiniteField - std::shared_ptr ff_; - - /// Maximum size of field element - size_t size_; - - /// constructor - State() : ff_(nullptr, finite_field_deleter), size_(0) { - inner_state = nullptr; - } - - // State instances are not meant to be copied. - // Explicitly delete copy constructor and assignment operator. - State(const State&) = delete; - State& operator=(const State&) = delete; - - /// destructor - ~State() { - if (inner_state) { - delete inner_state; - inner_state = nullptr; - } - } - - /// setter for inner_state - void SetInnerState(FiniteFieldObj const& gf) { - if (!inner_state) { - inner_state = new InnerState; - inner_state->gf_ = gf; - } - } - - /// setter for inner_state - void SetInnerState(InnerState* state) { - if (state) { - if (!inner_state) { - inner_state = new InnerState; - } - if (!inner_state) { - inner_state->gf_ = state->gf_; - } - } else { - if (inner_state) { - delete inner_state; - inner_state = nullptr; - } - } - } -}; - -FiniteFieldObj::FiniteFieldObj() : state_(new State()) { - /* - to avoid a bug in ipp this is one less than the - actual max value we could take. - */ - const BigNumStr max_prime = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFe}; - FiniteField* temp = nullptr; - NewFiniteField(&max_prime, &temp); - state_->ff_.reset(temp, finite_field_deleter); - state_->size_ = sizeof(max_prime); -} - -FiniteFieldObj::FiniteFieldObj(FiniteFieldObj const& other) - : state_(new State) { - state_->ff_ = other.state_->ff_; - state_->size_ = other.state_->size_; - state_->SetInnerState(other.state_->inner_state); -} - -FiniteFieldObj& FiniteFieldObj::operator=(FiniteFieldObj const& other) { - state_->ff_ = other.state_->ff_; - state_->size_ = other.state_->size_; - state_->SetInnerState(other.state_->inner_state); - return *this; -} - -FiniteFieldObj::FiniteFieldObj(BigNumStr const& prime) : state_(new State) { - FiniteField* temp = nullptr; - NewFiniteField(&prime, &temp); - state_->ff_.reset(temp, finite_field_deleter); - state_->size_ = sizeof(prime); -} - -FiniteFieldObj::FiniteFieldObj(FiniteFieldObj const& ground_field, - FfElementObj const& ground_element, int degree) - : state_(new State) { - FiniteField* temp = nullptr; - state_->SetInnerState(ground_field); - NewFiniteFieldViaBinomalExtension(ground_field, ground_element, degree, - &temp); - state_->ff_.reset(temp, finite_field_deleter); - state_->size_ = ground_field.GetElementMaxSize() * degree; -} - -FiniteFieldObj::FiniteFieldObj(FiniteFieldObj const& ground_field, - BigNumStr const* irr_polynomial, int degree) - : state_(new State) { - FiniteField* temp = nullptr; - state_->SetInnerState(ground_field); - NewFiniteFieldViaPolynomialExtension(ground_field, irr_polynomial, degree, - &temp); - state_->ff_.reset(temp, finite_field_deleter); - state_->size_ = ground_field.GetElementMaxSize() * degree; -} - -FiniteFieldObj::~FiniteFieldObj() {} - -FiniteFieldObj::operator FiniteField*() { return state_->ff_.get(); } - -FiniteFieldObj::operator const FiniteField*() const { - return state_->ff_.get(); -} - -FiniteField* FiniteFieldObj::get() { return state_->ff_.get(); } - -FiniteField const* FiniteFieldObj::getc() const { return state_->ff_.get(); } - -size_t FiniteFieldObj::GetElementMaxSize() const { return state_->size_; } diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/finite_field_wrapper-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/finite_field_wrapper-testhelper.h deleted file mode 100644 index ceebc4c0ea..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/finite_field_wrapper-testhelper.h +++ /dev/null @@ -1,71 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief FiniteField C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_FINITE_FIELD_WRAPPER_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_FINITE_FIELD_WRAPPER_TESTHELPER_H_ - -#include -#include - -extern "C" { -#include "epid/common/math/finitefield.h" -} - -class FfElementObj; - -/*! -Wrapper class to provide Resource Allocation is Initialization handling -for FiniteField -*/ -class FiniteFieldObj { - public: - /// constructor - FiniteFieldObj(); - /// copy constructor - FiniteFieldObj(FiniteFieldObj const& other); - /// assignment operator - FiniteFieldObj& operator=(FiniteFieldObj const& other); - /// Create a FiniteField - explicit FiniteFieldObj(BigNumStr const& prime); - /// Create a FiniteField - FiniteFieldObj(FiniteFieldObj const& ground_field, - FfElementObj const& ground_element, int degree); - /// Create a FiniteField - FiniteFieldObj(FiniteFieldObj const& ground_field, - BigNumStr const* irr_polynomial, int degree); - /// Destroy the FiniteField - ~FiniteFieldObj(); - /// cast operator to get the pointer to the stored FiniteField - operator FiniteField*(); - /// const cast operator to get the pointer to the stored FiniteField - operator const FiniteField*() const; - /// Get the underlying pointer - FiniteField* get(); - /// Get the underlying pointer - FiniteField const* getc() const; - /// Get maximum size of field element - size_t GetElementMaxSize() const; - - private: - struct State; - std::unique_ptr state_; -}; - -#endif // EPID_COMMON_TESTHELPER_FINITE_FIELD_WRAPPER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/octstr-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/octstr-testhelper.cc deleted file mode 100644 index 86ce1931f3..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/octstr-testhelper.cc +++ /dev/null @@ -1,126 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief OctString handling utility implementation. - */ -#include "epid/common-testhelper/octstr-testhelper.h" -extern "C" { -#include "epid/common/src/memory.h" -} -#include "ext/ipp/include/ippcp.h" - -/// Internal function to delete BigNum -void delete_BigNum(IppsBigNumState** bn) { - if (*bn) { - SAFE_FREE(*bn); - } -} -/// Internal function to create BigNum from an OctStr256 -EpidStatus create_BigNum(IppsBigNumState** bn, const OctStr256* str) { - EpidStatus result = kEpidErr; - IppsBigNumState* ipp_bn_ctx = nullptr; - do { - IppStatus sts = ippStsNoErr; - unsigned int byte_size = sizeof(OctStr256); - unsigned int word_size = - (unsigned int)((byte_size + sizeof(Ipp32u) - 1) / sizeof(Ipp32u)); - int bignum_ctx_size = 0; - - if (!bn || !str) { - return kEpidBadArgErr; - } - - sts = ippsBigNumGetSize(word_size, &bignum_ctx_size); - if (ippStsNoErr != sts) { - if (ippStsLengthErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - // Allocate space for ipp bignum context - ipp_bn_ctx = (IppsBigNumState*)SAFE_ALLOC(bignum_ctx_size); - if (!ipp_bn_ctx) { - result = kEpidMemAllocErr; - break; - } - // Initialize ipp bignum context - sts = ippsBigNumInit(word_size, ipp_bn_ctx); - if (sts != ippStsNoErr) { - if (sts == ippStsLengthErr) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - - sts = ippsSetOctString_BN((Ipp8u*)str, byte_size, ipp_bn_ctx); - if (sts != ippStsNoErr) { - if (sts == ippStsLengthErr) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - *bn = ipp_bn_ctx; - result = kEpidNoErr; - } while (0); - - if (result != kEpidNoErr) { - SAFE_FREE(ipp_bn_ctx); - } - return result; -} - -EpidStatus Cmp_OctStr256(const OctStr256* pA, const OctStr256* pB, - unsigned int* pResult) { - EpidStatus result = kEpidErr; - IppsBigNumState* ipp_a_ctx = nullptr; - IppsBigNumState* ipp_b_ctx = nullptr; - - do { - IppStatus sts = ippStsNoErr; - if (!pA || !pB || !pResult) { - return kEpidBadArgErr; - } - result = create_BigNum(&ipp_a_ctx, pA); - if (kEpidNoErr != result) { - break; - } - result = create_BigNum(&ipp_b_ctx, pB); - if (kEpidNoErr != result) { - break; - } - sts = ippsCmp_BN(ipp_a_ctx, ipp_b_ctx, pResult); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsLengthErr == sts || ippStsOutOfRangeErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - } - } while (0); - - delete_BigNum(&ipp_a_ctx); - delete_BigNum(&ipp_b_ctx); - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/octstr-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/octstr-testhelper.h deleted file mode 100644 index 1d60062d75..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/octstr-testhelper.h +++ /dev/null @@ -1,47 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief OctString handling utility interface. - */ -#ifndef EPID_COMMON_TESTHELPER_OCTSTR_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_OCTSTR_TESTHELPER_H_ - -#include "epid/common/errors.h" -#include "epid/common/types.h" - -/// Compares 2 OctStr256 -/*! - -if A==B, then pResult = 0 -if A > B, then pResult = 1 -if A < B, then pResult = 2 - -\param[in] pA -OctStr256 A -\param[in] pB -OctStr256 B -\param[out] pResult -Comparison Result - -\returns ::EpidStatus - -*/ -EpidStatus Cmp_OctStr256(const OctStr256* pA, const OctStr256* pB, - unsigned int* pResult); - -#endif // EPID_COMMON_TESTHELPER_OCTSTR_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/prng-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/prng-testhelper.h deleted file mode 100644 index f3008e1ae4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/prng-testhelper.h +++ /dev/null @@ -1,90 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Pseudo random number generator interface. - */ -#ifndef EPID_COMMON_TESTHELPER_PRNG_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_PRNG_TESTHELPER_H_ - -#if defined(_WIN32) || defined(_WIN64) -#define __STDCALL __stdcall -#else -#define __STDCALL -#endif -#include // for CHAR_BIT -#include - -/// Return status for Prng Generate function -typedef enum { - kPrngNoErr = 0, //!< no error - kPrngErr = -999, //!< unspecified error - kPrngNotImpl, //!< not implemented error - kPrngBadArgErr //!< incorrect arg to function -} PrngStatus; - -/// Pseudo random number generator (prng) class. -class Prng { - public: - Prng() : seed_(1) { set_seed(seed_); } - ~Prng() {} - /// Retrieve seed - unsigned int get_seed() const { return seed_; } - /// Set seed for random number generator - void set_seed(unsigned int val) { - seed_ = val; - generator_.seed(seed_); - } - /// Generates random number - static int __STDCALL Generate(unsigned int* random_data, int num_bits, - void* user_data) { - unsigned int num_bytes = num_bits / CHAR_BIT; - unsigned int num_words = num_bytes / sizeof(unsigned int); - unsigned int extra_bytes = num_bytes % sizeof(unsigned int); - if (!random_data) { - return kPrngBadArgErr; - } - if (num_bits <= 0) { - return kPrngBadArgErr; - } - Prng* myprng = (Prng*)user_data; - std::uniform_int_distribution<> dis(0x0, 0xffff); - if (num_words > 0) { - for (unsigned int n = 0; n < num_words; n++) { - random_data[n] = - (dis(myprng->generator_) << 16) + dis(myprng->generator_); - } - } - if (extra_bytes > 0) { - unsigned int data = - (dis(myprng->generator_) << 16) + dis(myprng->generator_); - unsigned char* byte_data = (unsigned char*)&data; - unsigned char* random_bytes = (unsigned char*)&random_data[num_words]; - for (unsigned int n = 0; n < extra_bytes; n++) { - random_bytes[n] = byte_data[n]; - } - } - - return kPrngNoErr; - } - - private: - unsigned int seed_; - std::mt19937 generator_; -}; - -#endif // EPID_COMMON_TESTHELPER_PRNG_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/gpubkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/gpubkey.inc deleted file mode 100644 index 0ed0ded412..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/gpubkey.inc +++ /dev/null @@ -1,53 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -// gpubkey -0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, -0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88, - -0x89, 0x33, 0xA7, 0x86, 0xD7, 0x71, 0xCC, 0x80, -0x46, 0x4B, 0x42, 0xC3, 0xE7, 0xBA, 0x1A, 0x54, -0x85, 0x8A, 0x21, 0x8E, 0x29, 0x91, 0xA9, 0x60, -0x41, 0xF9, 0xA5, 0xD9, 0x7B, 0x5F, 0x54, 0x49, -0x2A, 0x89, 0x8C, 0x10, 0x0E, 0x26, 0x0D, 0xE8, -0x36, 0x6A, 0x9E, 0x6F, 0x79, 0xFF, 0xF1, 0xCD, -0xA7, 0xCD, 0xAC, 0x1F, 0x92, 0x33, 0x3A, 0xD9, -0x7C, 0xF5, 0xCD, 0x38, 0x48, 0x01, 0x4F, 0xC5, -0x6F, 0xEA, 0x50, 0x60, 0x59, 0x09, 0xDA, 0x44, -0x21, 0xC2, 0xD0, 0x86, 0xE6, 0x00, 0x63, 0x59, -0xA9, 0xFB, 0x35, 0x13, 0x4E, 0x13, 0xB1, 0x47, -0x36, 0xD7, 0xBD, 0xF6, 0x0A, 0x35, 0x74, 0x7D, -0x36, 0xC5, 0x67, 0xA2, 0x03, 0xB7, 0x38, 0x31, -0x16, 0xA8, 0x5D, 0x64, 0x3F, 0xE6, 0xF1, 0x94, -0x37, 0x09, 0x8C, 0x20, 0x17, 0xAC, 0x2F, 0x55, -0x9E, 0xED, 0xB3, 0xC7, 0x73, 0xC0, 0x1C, 0xBB, -0xBF, 0xF7, 0x18, 0xCE, 0x4F, 0xD4, 0xE3, 0x67, -0x75, 0xE4, 0xD9, 0x51, 0xFB, 0x1B, 0x22, 0xF9, -0x72, 0x2E, 0xC1, 0x76, 0x2A, 0xE1, 0x4A, 0x6E, -0x88, 0xD6, 0x2D, 0x71, 0xF4, 0xC4, 0x6D, 0xAC, -0x8C, 0xBD, 0xE7, 0x2B, 0xB1, 0x40, 0x15, 0x93, -0xBD, 0x97, 0xD4, 0x84, 0x90, 0xEF, 0x4E, 0xFD, -0x78, 0x25, 0xAB, 0xDF, 0x16, 0xF3, 0x46, 0x52, -0x16, 0x96, 0xAE, 0x50, 0x88, 0x96, 0x18, 0x73, -0xC1, 0xD1, 0x73, 0xF0, 0x67, 0xC8, 0x8D, 0xBB, -0x4E, 0xBC, 0x6A, 0x40, 0xE6, 0x1E, 0x7D, 0x36, -0x8C, 0xF4, 0xB1, 0xF1, 0x5F, 0x26, 0x4F, 0x43, -0x0A, 0x36, 0xD4, 0x67, 0xD4, 0x79, 0x3F, 0xB8, -0x69, 0x6F, 0x9C, 0x33, 0xD3, 0xDB, 0xC6, 0xCE, -0x42, 0xE3, 0x46, 0x87, 0xD6, 0x65, 0xAC, 0xC9, -0x71, 0xF1, 0xA9, 0x8F, 0x78, 0x45, 0x9A, 0xEF, -0x1C, 0xE4, 0x45, 0x84, 0x3D, 0x8A, 0x27, 0x51, - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha256_sigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha256_sigrl.inc deleted file mode 100644 index c009b344a9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha256_sigrl.inc +++ /dev/null @@ -1,1222 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: grp01 - * Signer: member0 - * HashAlg: Sha256 - * Message: "test message" - * Basename: None (random base) - * SigRl: SigRl of group - */ -0xb3, 0x6f, 0xff, 0x81, 0xe2, 0x1b, 0x17, -0xeb, 0x3d, 0x75, 0x3d, 0x61, 0x7e, 0x27, -0xb0, 0xcb, 0xd0, 0x6d, 0x8f, 0x9d, 0x64, -0xce, 0xe3, 0xce, 0x43, 0x4c, 0x62, 0xfd, -0xb5, 0x80, 0xe0, 0x99, 0x3a, 0x7, 0x56, -0x80, 0xe0, 0x88, 0x59, 0xa4, 0xfd, 0xb5, -0xb7, 0x9d, 0xe9, 0x4d, 0xae, 0x9c, 0xee, -0x3d, 0x66, 0x42, 0x82, 0x45, 0x7e, 0x7f, -0xd8, 0x69, 0x3e, 0xa1, 0x74, 0xf4, 0x59, -0xee, 0x50, 0xda, 0xbf, 0xc4, 0x59, 0xcc, -0x11, 0xf3, 0x49, 0xd8, 0xbb, 0x51, 0xfc, -0xa7, 0x15, 0xf9, 0x4d, 0xbb, 0x7c, 0x27, -0xaa, 0x0, 0x2c, 0xa2, 0x91, 0x7b, 0x36, -0xa3, 0x2c, 0x60, 0x96, 0x16, 0x38, 0xff, -0xe4, 0x4a, 0x42, 0x13, 0x3, 0xdb, 0x88, -0x6f, 0xe3, 0x4f, 0xd6, 0xf2, 0x47, 0x10, -0xed, 0xeb, 0xa0, 0xaf, 0x71, 0xc3, 0x6, -0x10, 0x30, 0x55, 0x91, 0xf0, 0xf2, 0x70, -0xe0, 0x10, 0x1b, 0x7f, 0xb4, 0x3, 0xc2, -0x0, 0x70, 0xb2, 0x77, 0x20, 0xbf, 0x6c, -0x49, 0xee, 0xfa, 0xf2, 0xca, 0x6, 0x99, -0x9c, 0x54, 0xe3, 0x29, 0x1b, 0x17, 0x6a, -0xb1, 0x5e, 0x92, 0xa0, 0x27, 0xac, 0x81, -0x91, 0x33, 0x39, 0x6a, 0xf9, 0x60, 0xb, -0xe4, 0xcd, 0xa2, 0xe8, 0xde, 0x74, 0xb2, -0xbe, 0x58, 0xaa, 0x96, 0x3e, 0xdd, 0x5f, -0xc0, 0x3c, 0xe5, 0x94, 0x1b, 0xfd, 0x78, -0xa8, 0x44, 0x48, 0x32, 0x91, 0x89, 0xb0, -0xf0, 0x9e, 0x56, 0x87, 0x76, 0xee, 0x24, -0xfe, 0xf5, 0xf, 0x69, 0x95, 0xc, 0xfe, -0xcc, 0xce, 0x22, 0xd7, 0x33, 0xe3, 0xe5, -0x86, 0xa3, 0xb9, 0x42, 0x6f, 0x7b, 0xe4, -0x86, 0x95, 0xec, 0xc3, 0x8, 0x43, 0xf6, -0xba, 0x26, 0x1c, 0xbd, 0x8b, 0x21, 0xa7, -0x82, 0x91, 0x22, 0xdb, 0x62, 0x4c, 0xff, -0x85, 0x8f, 0x10, 0xb7, 0xb1, 0x40, 0xa7, -0x44, 0x80, 0x20, 0xb4, 0x61, 0xf9, 0xf4, -0x98, 0xad, 0xb4, 0x35, 0xf7, 0x1e, 0x11, -0xa1, 0x77, 0xe4, 0xf2, 0x60, 0x68, 0x96, -0x9, 0x62, 0x6c, 0x35, 0xd2, 0x73, 0x43, -0x6a, 0x12, 0xc3, 0x2b, 0x5d, 0xe3, 0xc4, -0x68, 0x2f, 0x5a, 0x69, 0x56, 0xb6, 0x40, -0x26, 0x11, 0xb9, 0xff, 0x67, 0xb, 0xec, -0xdc, 0x53, 0x86, 0xe2, 0x83, 0xfb, 0x75, -0xa1, 0x48, 0xd1, 0x3a, 0xaf, 0xaf, 0x29, -0x53, 0xce, 0xd1, 0x24, 0xb5, 0xf8, 0x6e, -0x9, 0xab, 0x2b, 0xe4, 0xf0, 0xfe, 0x19, -0x66, 0x65, 0xc1, 0x73, 0x91, 0x9d, 0xe5, -0xe1, 0x89, 0x24, 0x17, 0xa8, 0xba, 0x73, -0x10, 0xbe, 0x6b, 0xf6, 0x45, 0xbc, 0xe5, -0x3e, 0x97, 0x0, 0x0, 0x0, 0x0, 0x0, -0x0, 0x0, 0x32, 0x27, 0xce, 0xbd, 0x3d, -0xe0, 0xa, 0x5a, 0x61, 0x29, 0xaa, 0xe0, -0xda, 0x63, 0x27, 0x6f, 0x7a, 0xae, 0x85, -0xf9, 0x9a, 0x4d, 0x38, 0xe, 0x7, 0x7d, -0xc4, 0xbc, 0x3e, 0xef, 0x50, 0xc5, 0x39, -0x43, 0x3d, 0x1f, 0xb1, 0xd3, 0x86, 0x5a, -0x47, 0x4c, 0x19, 0xf6, 0xf3, 0x13, 0x22, -0x92, 0x6c, 0x3d, 0xe2, 0x29, 0x6a, 0xe6, -0xb7, 0xf1, 0x26, 0xd8, 0x31, 0xa1, 0xe9, -0x8f, 0x97, 0xd7, 0xc8, 0x2e, 0x80, 0x1d, -0x98, 0xc, 0x1a, 0xbe, 0x7b, 0xef, 0xd5, -0x7c, 0x1, 0x86, 0xcd, 0x4d, 0xe0, 0xcd, -0xc9, 0x75, 0xe8, 0x43, 0x11, 0x2, 0x5c, -0x12, 0x54, 0xe6, 0x79, 0xbd, 0x81, 0x75, -0xd, 0x7e, 0xd, 0x2, 0xc3, 0x73, 0x85, -0xee, 0x9e, 0x41, 0x81, 0x6a, 0xf9, 0x7, -0x95, 0x21, 0x2f, 0x45, 0x60, 0xb2, 0x1a, -0x3b, 0x83, 0x1, 0x76, 0x9e, 0xf6, 0x4, -0x5c, 0x52, 0xa1, 0x53, 0x4c, 0x0, 0xfc, -0x4f, 0x2c, 0xe, 0x70, 0xd9, 0x9, 0x6c, -0x2b, 0x5b, 0x8c, 0xed, 0xc3, 0xfe, 0xbb, -0xbc, 0xa4, 0x2d, 0x51, 0x9f, 0xa8, 0x69, -0x43, 0x7c, 0xe3, 0x82, 0x49, 0x1a, 0x90, -0xc0, 0xfd, 0x9c, 0x69, 0xe0, 0x20, 0xdb, -0x40, 0x5c, 0xf7, 0x16, 0x15, 0x24, 0xaa, -0x6, 0x5e, 0xb5, 0x39, 0xb8, 0x0, 0x79, -0x5d, 0xc1, 0x72, 0x89, 0xa2, 0x14, 0xdf, -0xdc, 0x2b, 0x6b, 0x70, 0x66, 0xd9, 0xd, -0x23, 0x47, 0x67, 0xb3, 0x8c, 0x9c, 0x8a, -0xea, 0xa5, 0x5c, 0x79, 0x4b, 0xaa, 0x16, -0x82, 0xb7, 0x4f, 0xdf, 0x55, 0x24, 0xf7, -0x72, 0x4e, 0x4b, 0xaf, 0xc2, 0x8c, 0xfe, -0x82, 0x70, 0x49, 0x30, 0xa6, 0xd4, 0x97, -0xa5, 0x7c, 0xec, 0x42, 0xd6, 0x1, 0xbe, -0x66, 0x35, 0xf7, 0x28, 0xce, 0xe0, 0xab, -0x6a, 0xfc, 0x69, 0xf3, 0x6b, 0xea, 0xd5, -0xa5, 0xbf, 0xd, 0x6d, 0xc3, 0xbf, 0xaa, -0xb2, 0x69, 0x35, 0xe7, 0xdb, 0x51, 0x3a, -0x59, 0x8, 0x1, 0xb7, 0xd8, 0x7a, 0x95, -0xa8, 0xa5, 0xc8, 0x6a, 0xaa, 0x30, 0x25, -0x4f, 0x59, 0x45, 0x70, 0xce, 0x95, 0x70, -0x70, 0xec, 0xf2, 0xaa, 0x3c, 0xa2, 0x3, -0xcb, 0xb8, 0x3f, 0x1d, 0x64, 0x66, 0x26, -0xc2, 0x2d, 0xa, 0xfc, 0x1a, 0x1e, 0x89, -0xfd, 0xfd, 0xaa, 0x51, 0xb7, 0x72, 0xad, -0xb3, 0x98, 0xe1, 0x8, 0x58, 0x10, 0x56, -0x87, 0xaf, 0x5a, 0x71, 0x68, 0x94, 0x11, -0x50, 0x3b, 0xae, 0x96, 0xfe, 0x34, 0x73, -0x41, 0xcd, 0x9f, 0xf3, 0x70, 0xbc, 0xad, -0xb, 0xb5, 0x76, 0x6a, 0x7d, 0x9c, 0x64, -0x5d, 0x0, 0xed, 0xf1, 0xfa, 0xd4, 0xed, -0x73, 0xdf, 0x25, 0xe, 0x74, 0xd1, 0x5d, -0x5f, 0xf3, 0x86, 0x69, 0x61, 0x4a, 0xda, -0x39, 0xd5, 0x4b, 0xf, 0x94, 0xd, 0x14, -0xc8, 0x43, 0x33, 0xf9, 0xfd, 0x92, 0x46, -0x77, 0x8f, 0xef, 0xc8, 0xb8, 0x35, 0xa3, -0x6b, 0x3b, 0xf4, 0x29, 0x6e, 0x58, 0xa8, -0xe4, 0x9a, 0xbd, 0xe6, 0x17, 0x18, 0x12, -0x5f, 0x78, 0xde, 0xf9, 0xa9, 0x54, 0x83, -0xd1, 0xa3, 0xbe, 0xf9, 0xe7, 0x3, 0xab, -0xe1, 0x7, 0xe4, 0xa9, 0x4, 0x9f, 0x86, -0xff, 0xf7, 0x88, 0x2, 0x3, 0xe8, 0xe9, -0xa, 0xf2, 0x8a, 0xf8, 0x70, 0xbb, 0xc9, -0xc1, 0xb9, 0x6, 0x29, 0x25, 0x94, 0x70, -0xc4, 0x3, 0xdd, 0x9a, 0x51, 0x3a, 0xfc, -0x45, 0x1a, 0xc6, 0xac, 0x56, 0x80, 0x18, -0x3c, 0x4b, 0x1d, 0xb, 0x6c, 0x1a, 0x73, -0xd1, 0xdd, 0xae, 0x7f, 0xe2, 0x48, 0x3a, -0xe5, 0xb6, 0xf5, 0x1a, 0xf3, 0xc5, 0x2a, -0x79, 0x93, 0x3, 0x41, 0x88, 0x5d, 0x86, -0x2, 0x26, 0xbd, 0x93, 0x7f, 0xdf, 0xc9, -0x49, 0xaa, 0x79, 0x66, 0x62, 0x50, 0x81, -0xf5, 0xef, 0x1, 0xeb, 0x61, 0xd1, 0x64, -0x6c, 0xe0, 0xa8, 0x2, 0xb8, 0xff, 0x3e, -0x6e, 0x3c, 0xf5, 0xd2, 0x81, 0xbe, 0x9c, -0x45, 0x7a, 0x77, 0x83, 0x38, 0x76, 0x7f, -0x28, 0x25, 0x47, 0xc7, 0xe1, 0x8c, 0xae, -0x99, 0x81, 0x79, 0xa9, 0xd1, 0x3d, 0x9e, -0x6a, 0xfc, 0x40, 0x8b, 0xc5, 0xbd, 0x2d, -0xf7, 0x91, 0x8f, 0x5, 0x83, 0x13, 0x10, -0x2, 0x84, 0xc2, 0xc6, 0x8d, 0x18, 0x5f, -0x23, 0x7e, 0x1b, 0x60, 0xc6, 0x66, 0x24, -0xba, 0xd8, 0xf4, 0x3d, 0x76, 0xc6, 0xd2, -0x1, 0xe9, 0x85, 0xb7, 0x44, 0x1c, 0xd4, -0x59, 0xe8, 0xa4, 0xe0, 0x88, 0x8b, 0xad, -0x34, 0xd5, 0x36, 0x2e, 0xc2, 0x16, 0x82, -0x1, 0x2f, 0x92, 0x75, 0x98, 0x88, 0xb2, -0xcb, 0x34, 0xcd, 0xb8, 0x6, 0x40, 0x84, -0xbb, 0x99, 0xd, 0x79, 0x5f, 0xca, 0xca, -0x9c, 0xbf, 0x2f, 0xd3, 0x2a, 0x1, 0x8f, -0xea, 0xff, 0xcd, 0x24, 0x2b, 0x4b, 0xfd, -0xef, 0xeb, 0x96, 0xc3, 0xca, 0xa5, 0x39, -0x91, 0x3, 0x6f, 0x73, 0xc5, 0x72, 0x41, -0x42, 0x17, 0xd, 0x4a, 0x2f, 0xa, 0x7e, -0x12, 0x1f, 0x73, 0xd6, 0x80, 0x64, 0x69, -0xf0, 0xe1, 0xd3, 0x74, 0x31, 0xa8, 0x8a, -0x24, 0xaa, 0xd6, 0x8f, 0x39, 0x95, 0xbd, -0x13, 0x39, 0x99, 0xa5, 0xa4, 0x7b, 0x78, -0x80, 0x3f, 0xad, 0x19, 0x18, 0x28, 0x37, -0x54, 0xd3, 0x42, 0x43, 0x95, 0x9d, 0x22, -0xc3, 0x1b, 0x63, 0x9a, 0x2f, 0xea, 0xa7, -0x94, 0x88, 0x62, 0x34, 0x5b, 0xae, 0x44, -0xf1, 0xda, 0xd8, 0x55, 0x8b, 0xe6, 0x24, -0xd5, 0xce, 0x77, 0x75, 0xd9, 0x71, 0x2b, -0xb7, 0xb7, 0x62, 0x2d, 0xb8, 0xa2, 0xd8, -0x2c, 0x38, 0xc4, 0x3a, 0x6, 0x34, 0xd0, -0xe9, 0x74, 0xb9, 0xba, 0xe7, 0xb9, 0xe8, -0x97, 0x80, 0xdd, 0x65, 0xd6, 0x5b, 0xeb, -0x7f, 0xdf, 0x38, 0xe9, 0x30, 0x43, 0x3e, -0xc5, 0x28, 0xb4, 0xb7, 0x47, 0xae, 0xfa, -0xf9, 0x53, 0xa7, 0xd, 0x3e, 0x82, 0xd4, -0x60, 0xf8, 0xa9, 0xa4, 0x16, 0x6d, 0xfb, -0x84, 0x57, 0x7a, 0xeb, 0x80, 0x71, 0xff, -0x55, 0xbd, 0x42, 0xe8, 0xd0, 0x1c, 0xf, -0xd, 0xe1, 0x38, 0xac, 0x69, 0xd0, 0xb1, -0x4c, 0x8f, 0x26, 0x5b, 0xe0, 0x4, 0xa2, -0xe8, 0xd1, 0x72, 0x15, 0x24, 0x97, 0x51, -0x7, 0x85, 0x54, 0xed, 0x6f, 0xc4, 0xa0, -0xac, 0xed, 0x67, 0x6, 0x7d, 0x92, 0x5, -0x79, 0x4, 0x2f, 0x5e, 0x4e, 0x9e, 0x69, -0x33, 0xc3, 0x43, 0xc9, 0x89, 0x8, 0xfa, -0x7a, 0x8d, 0x86, 0x2d, 0x27, 0x37, 0x32, -0xdf, 0x9, 0x94, 0x86, 0x5f, 0x21, 0x97, -0x25, 0xc, 0xb3, 0xbd, 0xe, 0x61, 0xf4, -0x53, 0xfd, 0xac, 0xbb, 0xd2, 0x4d, 0x9a, -0xd1, 0x6e, 0xfc, 0x99, 0x3, 0xc1, 0x3f, -0x4c, 0x1a, 0xcb, 0x0, 0x4a, 0x54, 0xd2, -0xa9, 0x26, 0x32, 0x46, 0xe0, 0x5a, 0x60, -0x1, 0x58, 0x59, 0xca, 0x2d, 0x19, 0xf4, -0xc0, 0x18, 0x4b, 0x7a, 0xc6, 0x83, 0xab, -0xf0, 0xbf, 0xb2, 0x82, 0x49, 0x9b, 0x15, -0x31, 0xa0, 0x65, 0x4, 0x72, 0xc, 0xbe, -0x1b, 0x70, 0x34, 0x7d, 0xe4, 0x44, 0xbf, -0x78, 0x5e, 0xca, 0x41, 0x27, 0x8b, 0x8c, -0xba, 0x53, 0xa7, 0x7b, 0xb7, 0x77, 0xe2, -0xa3, 0x2e, 0x69, 0x6, 0x12, 0xcc, 0x5f, -0x8, 0xea, 0x7a, 0x72, 0x23, 0xc9, 0x66, -0xa6, 0x3a, 0x56, 0x23, 0x3d, 0xee, 0x93, -0x57, 0x2a, 0xca, 0x63, 0x6a, 0xb3, 0x77, -0x82, 0xac, 0xe0, 0xe4, 0x23, 0xd0, 0x16, -0x3, 0x7c, 0x3a, 0x74, 0x7b, 0xc3, 0xa6, -0xbe, 0x72, 0xe1, 0x9a, 0xe7, 0x73, 0x6e, -0xcb, 0x70, 0x74, 0x7e, 0xab, 0xac, 0xec, -0x80, 0x57, 0xa6, 0x38, 0x68, 0x8f, 0x54, -0x41, 0xa9, 0xb, 0x0, 0x77, 0x2, 0xa8, -0xad, 0x92, 0x64, 0x6d, 0xd2, 0xee, 0x2f, -0x2c, 0x42, 0x40, 0xec, 0x4a, 0x45, 0x33, -0x4f, 0x55, 0xc, 0x4b, 0x51, 0x3c, 0x10, -0x22, 0x27, 0xa4, 0xe1, 0x89, 0x3a, 0x90, -0xe5, 0xe0, 0x97, 0x10, 0xe2, 0x89, 0x63, -0x16, 0xb9, 0x59, 0x1e, 0xcb, 0xf2, 0xb0, -0xe8, 0xbf, 0x7b, 0x5a, 0x8f, 0x67, 0xec, -0xb0, 0x98, 0xb0, 0x4b, 0xed, 0x5b, 0xd8, -0xbe, 0x4f, 0x33, 0xb9, 0x5, 0xb4, 0x4d, -0x40, 0x91, 0x83, 0x5d, 0xc, 0x9b, 0x56, -0x60, 0xa8, 0xdc, 0xf9, 0xdd, 0xfb, 0xb5, -0x6, 0xcd, 0x6d, 0xc2, 0x44, 0x9a, 0xdd, -0xf, 0x1a, 0xe0, 0x18, 0x62, 0xb0, 0x90, -0xb1, 0xed, 0xa9, 0x11, 0xcb, 0x8c, 0x1, -0xb2, 0x78, 0x62, 0x9a, 0x8f, 0x37, 0x2, -0xac, 0xbc, 0xc5, 0x23, 0x36, 0xfd, 0xe, -0x73, 0x15, 0x27, 0x1, 0x17, 0xc9, 0xc6, -0xf5, 0x79, 0x80, 0xee, 0x68, 0x47, 0xb4, -0x8f, 0xfd, 0xdb, 0x11, 0x1c, 0x7f, 0x3e, -0xcd, 0x78, 0xdd, 0x7, 0x80, 0x55, 0xe7, -0xbc, 0xfb, 0x11, 0xe1, 0xca, 0xcf, 0x65, -0x75, 0x5c, 0x73, 0xf2, 0x28, 0x9b, 0x7a, -0x24, 0xd0, 0x9f, 0x43, 0x85, 0xe4, 0x62, -0x8d, 0x90, 0x53, 0xec, 0xcd, 0xba, 0xdc, -0xc3, 0x96, 0x3e, 0x12, 0x22, 0xc, 0x52, -0x59, 0x8c, 0xa3, 0x18, 0x86, 0x6b, 0xbe, -0xc8, 0x65, 0x66, 0xe2, 0x6e, 0x1c, 0xfc, -0x7b, 0x8c, 0xd5, 0xaa, 0xcc, 0xc2, 0xb9, -0x3, 0x1e, 0xf2, 0x10, 0x92, 0x45, 0xf1, -0xf0, 0xe0, 0xf, 0x68, 0x4a, 0x92, 0xf8, -0x6d, 0x19, 0x83, 0xf9, 0xe7, 0xe9, 0xb2, -0x47, 0x17, 0xd6, 0x39, 0x59, 0x55, 0xd3, -0x96, 0xd0, 0xfd, 0xe7, 0xdc, 0xb7, 0x12, -0x35, 0xbe, 0xaa, 0xb0, 0xc4, 0xe8, 0x83, -0x25, 0xc0, 0x42, 0xc4, 0x42, 0xd9, 0x41, -0x38, 0xcd, 0xcb, 0x86, 0x58, 0x83, 0x2c, -0xef, 0xf4, 0x90, 0x95, 0x56, 0x6, 0x24, -0x1, 0x5, 0x4c, 0xdc, 0xcd, 0x80, 0xa6, -0xd6, 0x4, 0xc0, 0xd4, 0xc3, 0x42, 0x99, -0x8c, 0xa4, 0x97, 0x98, 0x4f, 0xaf, 0x98, -0x27, 0x47, 0x62, 0x9b, 0x25, 0x94, 0xaf, -0x27, 0x61, 0x6c, 0x13, 0x7d, 0x5f, 0x1a, -0x3d, 0x43, 0x3d, 0x49, 0x3e, 0x96, 0x1f, -0x8d, 0xc3, 0x5c, 0x17, 0x3, 0x3c, 0xe, -0xd, 0xc5, 0xf7, 0x21, 0x5c, 0xcc, 0x81, -0x3c, 0x49, 0xfa, 0xfd, 0x1c, 0xc5, 0x7d, -0x51, 0x34, 0x5d, 0xcd, 0x6a, 0x67, 0x7e, -0x63, 0x9a, 0x57, 0xd3, 0x49, 0x94, 0xda, -0x7b, 0xb1, 0xa7, 0xf, 0xc0, 0xcb, 0xe6, -0x8a, 0x94, 0x2e, 0x6e, 0xc7, 0x49, 0xf8, -0x7f, 0xea, 0xe2, 0xe3, 0xb3, 0x46, 0x19, -0x5, 0xaf, 0x9f, 0x7e, 0x65, 0x42, 0xd8, -0x18, 0xa4, 0xf2, 0x31, 0xa3, 0x1f, 0xb3, -0x93, 0x8b, 0xe5, 0x5c, 0x5e, 0x44, 0xd3, -0xc5, 0xce, 0xd0, 0xe, 0x4d, 0xe9, 0x70, -0x4f, 0x57, 0xa4, 0x18, 0x5f, 0x26, 0xc, -0x46, 0x74, 0x7e, 0xf4, 0x55, 0x5d, 0xc, -0x16, 0xc9, 0xcc, 0xc5, 0xe9, 0x42, 0xfa, -0x60, 0xbf, 0x62, 0x4f, 0x46, 0x38, 0x9c, -0x2a, 0x26, 0x86, 0x73, 0xab, 0x24, 0x29, -0x23, 0x49, 0x72, 0x9e, 0x8c, 0x97, 0xf2, -0x5b, 0x54, 0xbe, 0xf8, 0x4, 0x1d, 0xa5, -0xe7, 0x21, 0x9d, 0xa0, 0x5e, 0xf7, 0xbf, -0x1c, 0xfe, 0xec, 0xee, 0x28, 0xac, 0x6, -0x6e, 0xc6, 0x3a, 0x4f, 0xe4, 0xf3, 0xb5, -0x27, 0x98, 0x28, 0x84, 0xef, 0x62, 0xf, -0xc0, 0x14, 0x1c, 0xf6, 0x63, 0x88, 0xdf, -0x2, 0xfb, 0x84, 0x76, 0x6a, 0x1f, 0x30, -0x3e, 0x77, 0x79, 0x46, 0x9b, 0x24, 0x5b, -0x63, 0x5e, 0x82, 0x7f, 0x43, 0x0, 0xdd, -0x41, 0xc9, 0x61, 0xf6, 0x25, 0x38, 0xee, -0x6b, 0xf, 0xcd, 0xa2, 0x19, 0xcd, 0x21, -0x8e, 0x57, 0x94, 0xcb, 0xda, 0x87, 0x3a, -0xe1, 0xf4, 0xc6, 0x91, 0xce, 0xf6, 0x85, -0x92, 0xf6, 0xf9, 0x55, 0x84, 0x16, 0x7e, -0x88, 0x69, 0x43, 0xbf, 0x9b, 0xd5, 0x14, -0xc6, 0xf2, 0x86, 0xf2, 0x79, 0xae, 0xb8, -0x1d, 0xf, 0xde, 0xcd, 0xf, 0xbf, 0x5f, -0x18, 0x11, 0xd2, 0x83, 0xc1, 0x55, 0x77, -0x6b, 0xdc, 0x13, 0x6d, 0x6e, 0x6, 0x76, -0x9, 0xdc, 0xa2, 0xe5, 0x13, 0xe0, 0xa5, -0x40, 0x30, 0xa7, 0x67, 0x85, 0x82, 0x92, -0xec, 0xaa, 0xa1, 0x1, 0x32, 0x76, 0xd9, -0x20, 0x21, 0xef, 0xe, 0xb, 0x51, 0xee, -0xbd, 0xf1, 0xca, 0x7, 0x8b, 0x3d, 0xb0, -0xca, 0xc1, 0x23, 0x4b, 0x2e, 0x4b, 0x55, -0x1e, 0x82, 0xea, 0x5d, 0x9f, 0x4b, 0x77, -0xc9, 0x7e, 0xb6, 0xe, 0x4b, 0xc6, 0x45, -0x53, 0xa8, 0xfd, 0xcf, 0x8f, 0x66, 0x41, -0x4a, 0x1, 0x79, 0x4f, 0x41, 0x53, 0x67, -0xc2, 0x50, 0xc5, 0xfe, 0xea, 0x66, 0xab, -0x63, 0xe4, 0xed, 0xaa, 0x78, 0xba, 0x59, -0xef, 0x91, 0x15, 0xe7, 0xc1, 0xcf, 0x6b, -0x0, 0xc3, 0x9, 0xba, 0x66, 0x7d, 0x3f, -0x1a, 0x5c, 0x39, 0x89, 0xaf, 0x44, 0x7e, -0x37, 0xe6, 0x8e, 0x5, 0x75, 0xd9, 0xcb, -0xe8, 0x3c, 0x6, 0xc0, 0xca, 0xce, 0xba, -0x27, 0x13, 0x58, 0x5e, 0x17, 0x86, 0x22, -0xfd, 0x57, 0x29, 0xb5, 0x55, 0xb, 0xf7, -0xdc, 0x7d, 0x6b, 0x4e, 0xd6, 0x4c, 0x39, -0x10, 0x71, 0x1f, 0x55, 0xcd, 0x58, 0x5d, -0x4e, 0x4e, 0x5a, 0xee, 0x80, 0x66, 0xae, -0x6e, 0xe6, 0x4e, 0x8f, 0x97, 0xfd, 0x88, -0xba, 0x92, 0xc4, 0x2e, 0x9a, 0xe, 0x15, -0xff, 0xad, 0x1c, 0x21, 0xda, 0x5, 0x8d, -0x6, 0x61, 0x54, 0x2e, 0x6, 0xb1, 0xd1, -0xa1, 0xb, 0x87, 0xe, 0xf6, 0x95, 0x7f, -0xa5, 0xf7, 0x1c, 0x24, 0xa7, 0x5f, 0xab, -0xf7, 0x33, 0x26, 0x6e, 0xb3, 0x53, 0x3, -0xd7, 0x8b, 0x24, 0x8a, 0x83, 0xfe, 0x21, -0x7d, 0xcb, 0x55, 0x37, 0x34, 0x58, 0xdc, -0x7a, 0x1d, 0x62, 0x2a, 0x79, 0xaf, 0x1d, -0xe1, 0x97, 0xfb, 0xbe, 0x37, 0x1d, 0xa7, -0xcd, 0x7f, 0x65, 0x9a, 0x5, 0x8d, 0x4e, -0xe, 0x83, 0x66, 0x9d, 0xb8, 0xbf, 0x30, -0x57, 0xe8, 0xbf, 0x8, 0x8d, 0x91, 0xa3, -0x9b, 0xe4, 0xf6, 0x7, 0xd2, 0xc5, 0x14, -0x0, 0x42, 0x6, 0xaa, 0xe8, 0x32, 0x8e, -0x63, 0x99, 0x5c, 0x88, 0x6a, 0x3a, 0x50, -0xb6, 0x40, 0xf9, 0x0, 0x63, 0xbc, 0x1b, -0x9d, 0xcf, 0xa7, 0x39, 0x18, 0xab, 0x76, -0x87, 0xa1, 0xad, 0x4b, 0xeb, 0x7d, 0x0, -0xab, 0x45, 0x79, 0xb9, 0x17, 0x8b, 0x2a, -0xf8, 0x1c, 0x1, 0x1a, 0x11, 0xda, 0xf2, -0x8, 0x7e, 0x4, 0x66, 0x67, 0xc0, 0xb8, -0xa3, 0x12, 0x4f, 0x57, 0xb2, 0x45, 0xda, -0xbb, 0x93, 0x54, 0x5b, 0xc5, 0xaf, 0x2f, -0xe5, 0x6a, 0x2c, 0xcc, 0x6a, 0x44, 0x9c, -0xe5, 0x10, 0xba, 0x6, 0x27, 0x25, 0xe7, -0x24, 0x31, 0x3a, 0xaf, 0x7d, 0xb1, 0x86, -0x1e, 0xb1, 0xa9, 0x3c, 0xc8, 0xea, 0x9c, -0xa6, 0x93, 0xf2, 0x45, 0x6a, 0xde, 0x13, -0xfb, 0x6, 0x32, 0xd3, 0x4b, 0x4d, 0x83, -0x76, 0x9, 0x12, 0xf2, 0x1e, 0xdc, 0xb2, -0xae, 0x5d, 0x6a, 0x87, 0x5d, 0xbc, 0xd1, -0x94, 0x8, 0xec, 0x1c, 0xf4, 0x61, 0x82, -0x67, 0xa1, 0x33, 0x7c, 0x98, 0x3c, 0xfc, -0x14, 0xdb, 0x4e, 0x0, 0x3f, 0x16, 0x5f, -0x4b, 0x72, 0xe4, 0x89, 0xbc, 0xf4, 0x4c, -0x99, 0x5f, 0x51, 0x4e, 0xfb, 0xb0, 0xaf, -0x29, 0xf4, 0xe2, 0x30, 0x8e, 0x74, 0x5, -0xc0, 0x45, 0xc1, 0xc2, 0xe, 0xde, 0x70, -0x58, 0x9e, 0x80, 0x6d, 0x87, 0x49, 0x83, -0xc2, 0xaa, 0x25, 0x46, 0x94, 0x8e, 0x23, -0x21, 0x0, 0x3a, 0x43, 0xcf, 0x34, 0x34, -0x1c, 0x42, 0x13, 0x3e, 0x10, 0xd4, 0x1d, -0x35, 0xf3, 0x60, 0x26, 0xe5, 0x69, 0xbd, -0x2c, 0x3c, 0xc6, 0xb, 0xb6, 0xa4, 0xd1, -0x51, 0x22, 0x1, 0xac, 0xb2, 0xab, 0x84, -0x21, 0xdd, 0x7e, 0x50, 0x8b, 0x11, 0x77, -0x1, 0x32, 0x6, 0xd0, 0xf3, 0x7f, 0x28, -0x2c, 0xb5, 0x7e, 0x83, 0x84, 0xc7, 0x41, -0x5e, 0xc1, 0xd6, 0x14, 0x21, 0xcf, 0x84, -0x69, 0xff, 0x1a, 0xf4, 0x3d, 0xca, 0x53, -0x8b, 0x30, 0x83, 0x96, 0xc9, 0xef, 0xa1, -0xc6, 0x9e, 0xc6, 0x7d, 0x55, 0x5d, 0xb7, -0x7, 0x16, 0x4, 0x77, 0x12, 0xb2, 0xc5, -0x55, 0xa0, 0x32, 0xc0, 0x1, 0xae, 0xdb, -0x1, 0x9b, 0x8f, 0x81, 0xf2, 0xc7, 0xb1, -0xef, 0x75, 0x87, 0x1, 0x5e, 0x8c, 0x75, -0x7f, 0x42, 0x3, 0x45, 0x2f, 0x45, 0x15, -0x69, 0xa6, 0x81, 0xd0, 0x31, 0x69, 0x30, -0x7c, 0xc0, 0xc0, 0xa6, 0x24, 0xd5, 0xca, -0xc2, 0xe0, 0x26, 0xee, 0xc7, 0xa0, 0x6b, -0x83, 0xe0, 0x83, 0x6b, 0xee, 0xab, 0xa8, -0xe4, 0x1e, 0x5f, 0x48, 0x54, 0xd4, 0x40, -0x5c, 0xd, 0x2e, 0x63, 0xf4, 0xde, 0x9a, -0x76, 0xb, 0xc1, 0x26, 0x73, 0x53, 0xfd, -0x1b, 0xac, 0xf1, 0x60, 0x5a, 0x9d, 0xb6, -0x7a, 0x54, 0x81, 0xcd, 0x31, 0xb5, 0xd9, -0x66, 0x40, 0xae, 0x11, 0xc6, 0xf3, 0x93, -0x8f, 0xfe, 0x28, 0x3, 0x8e, 0x20, 0x36, -0xb7, 0x1f, 0xab, 0xd3, 0x99, 0xb9, 0x4c, -0x5, 0x72, 0xfc, 0x16, 0xe1, 0x78, 0xb8, -0xa4, 0x1b, 0x8c, 0xe2, 0xf7, 0x1e, 0x62, -0x9e, 0x4b, 0x57, 0x2d, 0x47, 0x87, 0x34, -0x55, 0xaa, 0x7f, 0xfd, 0x6b, 0x5e, 0x3a, -0x3f, 0xc0, 0xb3, 0x69, 0xe8, 0x58, 0x11, -0x3d, 0x7, 0xb, 0x79, 0x4c, 0xae, 0xc9, -0x39, 0x87, 0x27, 0xba, 0x67, 0x79, 0xcd, -0x2a, 0x78, 0x81, 0x47, 0x24, 0xaf, 0x83, -0xc, 0xd, 0xfb, 0xe1, 0xc5, 0x1a, 0xc2, -0x38, 0x36, 0xe6, 0xfa, 0x4f, 0xb3, 0xe4, -0xa3, 0x1a, 0xc5, 0x9b, 0x16, 0x87, 0xb4, -0x7f, 0xd2, 0x9d, 0xf5, 0xde, 0xba, 0x9d, -0x13, 0xc, 0x75, 0x30, 0x48, 0xe6, 0x91, -0x11, 0x98, 0x30, 0x6d, 0xa8, 0x9, 0xc5, -0x76, 0x45, 0x64, 0x54, 0x8a, 0xa1, 0xd6, -0xa0, 0xdd, 0x5f, 0x9e, 0x6b, 0x86, 0x49, -0xbe, 0xf8, 0x99, 0xdf, 0x40, 0x5a, 0x18, -0x2e, 0xe8, 0x98, 0x68, 0x2, 0xbc, 0xa6, -0xfe, 0x15, 0xe9, 0x4a, 0x7, 0x9f, 0x18, -0x34, 0x41, 0x9, 0x73, 0x47, 0xd7, 0x0, -0x5, 0x99, 0x80, 0x4, 0x58, 0x3, 0x24, -0x12, 0x59, 0x69, 0xcf, 0x2b, 0xb4, 0x11, -0xd7, 0x8, 0xa6, 0xfa, 0x86, 0xb4, 0xe0, -0x32, 0x5e, 0x9f, 0x8d, 0xbb, 0x91, 0xe3, -0x83, 0x83, 0x8c, 0x26, 0x9e, 0x71, 0x26, -0x8c, 0xbc, 0x3a, 0x84, 0x2a, 0xba, 0xe2, -0x55, 0x75, 0xa8, 0x52, 0x9, 0x91, 0xeb, -0xef, 0x8f, 0x6c, 0x2a, 0xa8, 0x88, 0x8a, -0xc5, 0xd1, 0x5d, 0x4a, 0x5f, 0xe, 0xac, -0xe2, 0xc9, 0xd3, 0x36, 0xf4, 0xa9, 0x1a, -0x37, 0xbd, 0x1, 0xb9, 0x4, 0x4d, 0x86, -0x8c, 0x4d, 0x6b, 0xce, 0x6a, 0x6c, 0xba, -0x6c, 0x4d, 0xc5, 0x34, 0x54, 0x1d, 0xe5, -0x61, 0x85, 0x6d, 0x53, 0xc3, 0xf8, 0x75, -0x17, 0xad, 0xbc, 0xd4, 0x66, 0x76, 0x8a, -0x84, 0xb6, 0xd7, 0x42, 0xaf, 0x9b, 0xaf, -0xbd, 0xee, 0xaf, 0x51, 0xe5, 0x1c, 0x17, -0x57, 0x66, 0x6e, 0xac, 0x93, 0x8d, 0xef, -0xaf, 0xaf, 0xb4, 0xa1, 0x3, 0xfe, 0x82, -0x86, 0xa6, 0xa6, 0xc4, 0x30, 0x17, 0x5c, -0x90, 0x8e, 0xa1, 0x17, 0xa8, 0x92, 0x23, -0x1d, 0xc, 0x57, 0xbc, 0x24, 0xcb, 0x7b, -0x7c, 0x72, 0x93, 0x2a, 0xf0, 0x78, 0xf6, -0xa6, 0x71, 0xb, 0x81, 0x2a, 0x41, 0x37, -0xda, 0xfd, 0xc1, 0xc1, 0xc3, 0x5d, 0x29, -0x59, 0x99, 0xe1, 0x78, 0x9d, 0x7e, 0x2c, -0xba, 0xf7, 0xf5, 0x99, 0xb1, 0x2b, 0x51, -0x26, 0xb5, 0x93, 0xae, 0x1e, 0xd1, 0x94, -0xdf, 0x30, 0x55, 0x10, 0xa4, 0xe6, 0xb9, -0x33, 0x74, 0xb2, 0x4c, 0x5e, 0xdf, 0x83, -0xf1, 0xd4, 0x2c, 0x3e, 0x46, 0x55, 0xed, -0xb, 0x16, 0x71, 0xb2, 0xf7, 0xac, 0x69, -0x3d, 0x7b, 0x31, 0x70, 0xf9, 0xc3, 0x38, -0xdc, 0x8d, 0xaa, 0x56, 0x81, 0x2c, 0x21, -0x3c, 0xb5, 0x16, 0x5c, 0x98, 0xfe, 0x53, -0x6c, 0x7d, 0x8b, 0x3c, 0xc9, 0x35, 0x1f, -0x8, 0xd2, 0x41, 0x4e, 0x2b, 0x7, 0xaa, -0xde, 0x85, 0xc4, 0x77, 0xe5, 0xfb, 0xec, -0x7f, 0x48, 0x6a, 0x94, 0x73, 0xbf, 0xa3, -0x77, 0x34, 0xb7, 0xe3, 0x90, 0xa6, 0x99, -0xb8, 0x2f, 0x7d, 0x0, 0xef, 0x5f, 0xd7, -0xa7, 0x10, 0x16, 0xf9, 0xd5, 0x98, 0x79, -0xd4, 0x49, 0x57, 0xf0, 0x4b, 0x70, 0xed, -0x2f, 0x81, 0x53, 0x35, 0x1d, 0xef, 0x82, -0xa7, 0x15, 0xcb, 0x69, 0x59, 0x90, 0x1d, -0x5c, 0x58, 0xc2, 0x1c, 0x73, 0x2a, 0x5a, -0xd4, 0x13, 0x6e, 0xa, 0x15, 0xc0, 0xc5, -0x64, 0xea, 0xd1, 0xf1, 0x14, 0x62, 0x97, -0xb1, 0x7e, 0x8c, 0xa0, 0x8c, 0xbd, 0xe3, -0x6b, 0x11, 0x71, 0xb0, 0xff, 0xf7, 0xe0, -0xa, 0x2d, 0xaa, 0x8, 0x64, 0x65, 0x6b, -0x32, 0xe5, 0x87, 0x40, 0x4d, 0x87, 0xa7, -0xb3, 0x8b, 0x26, 0x79, 0xd, 0xed, 0x99, -0x5c, 0xae, 0x4e, 0x2b, 0x5d, 0x21, 0xb6, -0xc4, 0xf0, 0x1b, 0x47, 0xc4, 0xcc, 0xc3, -0x62, 0xc3, 0x77, 0x54, 0x45, 0x4, 0x66, -0x99, 0xeb, 0x51, 0x44, 0x6e, 0xb9, 0x7c, -0xd5, 0x90, 0x68, 0xa8, 0x77, 0xcf, 0x3e, -0xe6, 0x20, 0xc9, 0xbc, 0x2f, 0xf1, 0x91, -0x11, 0xc, 0x36, 0x12, 0xec, 0xd6, 0xcb, -0xfe, 0xcf, 0x38, 0x5, 0x39, 0x9e, 0x9, -0xae, 0x54, 0x25, 0x78, 0xa9, 0x64, 0xc4, -0xd1, 0x83, 0x45, 0xac, 0x73, 0xdd, 0x96, -0x88, 0x52, 0x7, 0xf, 0x6e, 0x2d, 0xa4, -0x0, 0xc3, 0xbd, 0xd2, 0xcc, 0xd1, 0xb0, -0xd2, 0x9d, 0xf4, 0xc6, 0xbe, 0xcd, 0x95, -0x11, 0xed, 0x62, 0x4, 0x8, 0x23, 0x5, -0x88, 0xc7, 0x3d, 0x76, 0x81, 0x5, 0x9a, -0x6f, 0x5a, 0x2a, 0xd6, 0xbb, 0x7c, 0x3, -0x34, 0xea, 0x35, 0x9b, 0x75, 0x6c, 0x44, -0x18, 0xb0, 0x61, 0xd6, 0x6c, 0x6e, 0xf9, -0xfd, 0x12, 0x9c, 0x17, 0xc3, 0x89, 0x16, -0x3d, 0x8d, 0x6, 0x47, 0x5d, 0x99, 0xc9, -0x9a, 0x7c, 0xdf, 0xb3, 0xc2, 0x5f, 0x4, -0xf2, 0xf3, 0xb7, 0x72, 0xf8, 0x3, 0x4c, -0xe1, 0x53, 0x18, 0x13, 0x5f, 0xbd, 0x74, -0x9f, 0xa1, 0xc9, 0xa8, 0x5, 0x4c, 0xb6, -0x9d, 0xa1, 0xd5, 0x29, 0xec, 0x44, 0x7a, -0x61, 0xe8, 0x74, 0x12, 0x30, 0x32, 0xa4, -0x1f, 0x32, 0xaf, 0x44, 0x4, 0xe3, 0x8, -0x94, 0xbd, 0x13, 0x9f, 0x19, 0x12, 0x68, -0x87, 0x2e, 0x9c, 0xa0, 0xe5, 0x5a, 0xd, -0x4d, 0x88, 0x8f, 0x3b, 0xfb, 0x7c, 0xd6, -0xf7, 0x76, 0x7c, 0x69, 0x9c, 0x41, 0x8c, -0xa0, 0xeb, 0x3c, 0x2a, 0xdd, 0xbd, 0x26, -0x85, 0x61, 0xd2, 0x80, 0x25, 0xa1, 0xdc, -0xc7, 0x92, 0xd7, 0xe6, 0xa9, 0xdf, 0x6c, -0xf3, 0x64, 0xc3, 0x93, 0xaf, 0xef, 0xe8, -0xd1, 0xc4, 0x23, 0x1a, 0xe1, 0xa0, 0xac, -0xc2, 0x9c, 0x3e, 0x54, 0xaf, 0x7a, 0xe1, -0x67, 0xe1, 0x2b, 0x9d, 0xa, 0xa4, 0xe9, -0x6, 0x2, 0xfa, 0x98, 0xd, 0xd8, 0xdf, -0x37, 0xa6, 0x21, 0xe2, 0x8b, 0xd0, 0xe0, -0x27, 0xee, 0xa0, 0x9b, 0xf0, 0xc9, 0xe, -0xfc, 0xad, 0x8, 0x9f, 0x5e, 0x8b, 0x2d, -0xf0, 0x45, 0x45, 0x55, 0x29, 0xd1, 0xe3, -0xb3, 0x95, 0x81, 0x0, 0x86, 0x44, 0x36, -0x99, 0x78, 0x3e, 0x76, 0xb7, 0xa, 0x88, -0xda, 0xb6, 0x6f, 0xb6, 0xd2, 0xcd, 0xe0, -0x41, 0x8d, 0x49, 0x49, 0x7b, 0x36, 0xa0, -0x52, 0x22, 0x51, 0xa8, 0xb7, 0xd0, 0x4f, -0x20, 0xef, 0xb, 0xf6, 0x7d, 0x6b, 0x10, -0xde, 0x6e, 0xaf, 0xe8, 0x4a, 0xe6, 0x91, -0xea, 0x2b, 0x7f, 0x7d, 0x97, 0x98, 0xb6, -0xcb, 0x9a, 0x31, 0x76, 0x78, 0xeb, 0x9, -0x10, 0xed, 0x27, 0x29, 0xcd, 0xe6, 0x34, -0x48, 0x9e, 0xb9, 0x3f, 0x89, 0xc, 0x93, -0x65, 0xc0, 0x5, 0x8, 0x2b, 0x5c, 0x82, -0x77, 0x4e, 0x46, 0xdd, 0x7e, 0x5e, 0x42, -0xe0, 0x43, 0xb8, 0x30, 0xd8, 0xb, 0xfc, -0xab, 0xb2, 0x35, 0x55, 0x50, 0x1c, 0xfa, -0xc6, 0x6, 0xaf, 0xff, 0xfe, 0xeb, 0x64, -0x3, 0x5, 0x6e, 0x33, 0x19, 0x57, 0xb0, -0x4f, 0xc6, 0x86, 0x99, 0x1b, 0x3e, 0x9c, -0xb2, 0xb3, 0xf9, 0x2c, 0xba, 0xaf, 0xbb, -0xe6, 0x87, 0x63, 0x2b, 0xd7, 0x22, 0xa0, -0x79, 0xce, 0x17, 0x9f, 0x45, 0x68, 0x3b, -0xd6, 0x55, 0xf1, 0xe0, 0x22, 0x9c, 0x25, -0x9a, 0x5b, 0xa5, 0xd1, 0xcd, 0x8f, 0x2c, -0x3c, 0x35, 0x93, 0x36, 0x66, 0x3a, 0x32, -0xa1, 0x43, 0x3, 0xd4, 0xe3, 0xf3, 0xbe, -0xdd, 0x36, 0xd7, 0x1c, 0xdb, 0xf9, 0x33, -0xab, 0x59, 0x3c, 0x18, 0xb1, 0x79, 0xd5, -0x24, 0x7, 0x70, 0xd0, 0x43, 0xf6, 0xf7, -0x61, 0x72, 0xef, 0xc5, 0x8e, 0x7b, 0xd0, -0x92, 0x7b, 0x6a, 0x4d, 0x98, 0x43, 0xf6, -0xfa, 0xb2, 0x4d, 0xde, 0x1f, 0xbf, 0xe2, -0x69, 0x75, 0x9d, 0x3a, 0x12, 0x24, 0xe6, -0xf2, 0xd0, 0xb2, 0x6e, 0x35, 0x43, 0x1c, -0x14, 0xc6, 0x7f, 0xa4, 0x5d, 0x6f, 0x80, -0xfe, 0x64, 0x60, 0x88, 0xbe, 0x74, 0x85, -0x88, 0x24, 0x6, 0xe2, 0xe5, 0xb5, 0xdc, -0xc7, 0x4b, 0x16, 0xcc, 0x11, 0xec, 0xb5, -0xbc, 0x31, 0xc8, 0xa3, 0x24, 0x13, 0x16, -0xe6, 0xa5, 0xdb, 0x14, 0x9b, 0x75, 0x25, -0x9, 0xc8, 0x28, 0x68, 0xa6, 0x8c, 0x7f, -0x80, 0x5c, 0x48, 0x70, 0x47, 0x1e, 0x6a, -0x14, 0x17, 0xbc, 0x84, 0x16, 0xb7, 0x7, -0x5f, 0x25, 0x3a, 0x7d, 0x6f, 0x3, 0x8f, -0xe8, 0xb7, 0x1c, 0x14, 0xff, 0x73, 0xc8, -0xd4, 0x94, 0x3c, 0x37, 0x77, 0xec, 0x8f, -0x95, 0xf4, 0xf3, 0x8a, 0x0, 0x4, 0x8a, -0x3e, 0xb5, 0x77, 0xc0, 0x7b, 0x5f, 0x7b, -0xb3, 0xe0, 0xe8, 0xd4, 0x9a, 0xfd, 0x90, -0xb6, 0x61, 0xe7, 0x61, 0x9, 0x80, 0xfd, -0x47, 0x68, 0xb0, 0x28, 0x92, 0x94, 0x3a, -0x3e, 0xcd, 0x1b, 0x3e, 0xed, 0xc0, 0xc0, -0x24, 0x14, 0x9a, 0xce, 0x32, 0x46, 0xe3, -0x6d, 0xef, 0x29, 0xa0, 0x8b, 0x14, 0xc, -0x8a, 0x7b, 0x2f, 0xde, 0xba, 0xb6, 0x4e, -0xf4, 0x46, 0x39, 0xe5, 0x2c, 0x76, 0xa1, -0x9d, 0xf2, 0x64, 0xfa, 0xbc, 0xac, 0x7a, -0x9d, 0xef, 0x8, 0x38, 0xc, 0xaf, 0xc, -0xff, 0xd3, 0x3a, 0x58, 0x9c, 0xdb, 0xae, -0x7c, 0x16, 0x36, 0x45, 0xba, 0x4f, 0xd1, -0xcf, 0xbf, 0x3a, 0x5a, 0x99, 0xf8, 0x66, -0x65, 0x7a, 0xcb, 0x93, 0xad, 0xba, 0x40, -0x66, 0x60, 0xb5, 0x32, 0x10, 0x88, 0xe5, -0xd5, 0xc5, 0xfe, 0xf3, 0x18, 0xa4, 0x62, -0xff, 0x3, 0x9, 0x9a, 0xf6, 0x13, 0x1d, -0x1d, 0x6f, 0xa1, 0xf9, 0xa9, 0xe0, 0x21, -0x40, 0x57, 0x59, 0x4f, 0x52, 0xa5, 0x22, -0xb1, 0x30, 0xa8, 0xa1, 0x55, 0x5f, 0x82, -0x2d, 0xf4, 0x58, 0x94, 0x77, 0x3f, 0x7b, -0xaf, 0x30, 0xaf, 0x91, 0xcd, 0xb0, 0x63, -0x60, 0x80, 0x9f, 0xf3, 0xd9, 0xb2, 0xd, -0x15, 0xc5, 0xab, 0xa4, 0x18, 0xa5, 0x5c, -0x9b, 0x2a, 0x3e, 0x5f, 0x52, 0x26, 0xa2, -0x71, 0xe, 0x64, 0xcb, 0xb0, 0x59, 0x9d, -0x1a, 0x65, 0xa4, 0x8a, 0x7, 0xcd, 0x6a, -0x31, 0xe8, 0xf9, 0x1, 0x41, 0x7e, 0x69, -0x98, 0x55, 0x4a, 0xee, 0xcc, 0x28, 0x35, -0x23, 0x38, 0xd7, 0xeb, 0xe6, 0x41, 0x91, -0x5e, 0xf8, 0xa8, 0x25, 0x67, 0x44, 0x75, -0xd, 0xaf, 0x0, 0xff, 0x83, 0xd2, 0xd2, -0xc2, 0xd4, 0xf7, 0xbb, 0xcd, 0x87, 0x84, -0xe1, 0x90, 0x0, 0xfb, 0x85, 0xd1, 0x12, -0xac, 0x36, 0x72, 0xb6, 0x57, 0xae, 0x41, -0x47, 0x1e, 0x1, 0x5d, 0x38, 0x48, 0xb2, -0x6e, 0xd9, 0xe4, 0xda, 0x9b, 0xba, 0xcc, -0xf5, 0x7, 0x91, 0xf6, 0xb0, 0xe8, 0x1d, -0x4c, 0x88, 0x6e, 0x28, 0xf2, 0x1b, 0x3d, -0xe0, 0x33, 0xd1, 0xdd, 0x4b, 0x68, 0xd7, -0x8f, 0xcd, 0xc9, 0x43, 0x74, 0x36, 0x69, -0xa7, 0xe9, 0x2d, 0xa6, 0x75, 0x59, 0xb, -0x49, 0x24, 0x27, 0xb6, 0x1d, 0xc9, 0xa, -0x4, 0x61, 0xce, 0x6e, 0x8b, 0x0, 0x88, -0x72, 0x46, 0x40, 0xaa, 0xc5, 0x92, 0xf2, -0x2e, 0xf, 0x29, 0x9d, 0xc9, 0xa3, 0x5b, -0x39, 0xe5, 0xde, 0xf1, 0x26, 0x2a, 0xd4, -0x1a, 0x1e, 0x1c, 0x33, 0x20, 0x58, 0x6e, -0x2b, 0xd9, 0xf4, 0x81, 0x77, 0xcd, 0x47, -0xba, 0x98, 0x2c, 0x2f, 0xf5, 0x9, 0x8d, -0xe5, 0xd0, 0xa2, 0x9f, 0x11, 0x4, 0xf9, -0xc2, 0x5e, 0xe8, 0x66, 0xa9, 0x66, 0xb5, -0xee, 0x12, 0x2d, 0x43, 0x85, 0xa3, 0x57, -0x9a, 0x7a, 0x29, 0xc3, 0x6a, 0x65, 0xca, -0xa2, 0x3b, 0x34, 0x84, 0x35, 0xd8, 0x39, -0xda, 0x71, 0xb6, 0xd0, 0xda, 0xe9, 0x4, -0x3e, 0x95, 0x3, 0x72, 0x6e, 0x4b, 0x4d, -0x58, 0x97, 0x1b, 0x4c, 0x31, 0xb2, 0x5d, -0xf, 0x3b, 0x44, 0x4, 0x0, 0x8c, 0x9f, -0xfa, 0x40, 0x3d, 0x8f, 0xa4, 0x70, 0x4b, -0x38, 0x69, 0xcf, 0x4f, 0xc, 0xd5, 0xc7, -0x2a, 0x24, 0xec, 0xb6, 0x5d, 0x6, 0xcd, -0x69, 0x88, 0x41, 0x27, 0x37, 0xc3, 0x23, -0x43, 0x87, 0x28, 0x70, 0x31, 0x74, 0x77, -0x8b, 0xca, 0x4b, 0x73, 0x4a, 0x33, 0xbb, -0xb7, 0xa0, 0x68, 0xe6, 0x27, 0x1e, 0x6d, -0xc5, 0xf5, 0x49, 0x74, 0x5e, 0x7c, 0xbe, -0xb1, 0x25, 0x5b, 0x2, 0x91, 0x8f, 0xde, -0x35, 0x5d, 0x5b, 0xfd, 0xc0, 0xe0, 0x3d, -0x7e, 0x5b, 0x56, 0x1a, 0x15, 0x77, 0x69, -0x1, 0x7b, 0x2d, 0x4e, 0x86, 0xb9, 0x1b, -0x5a, 0x1d, 0xc4, 0x4e, 0x7f, 0x5, 0x31, -0x58, 0x2c, 0xf5, 0xdd, 0xeb, 0xb8, 0x2d, -0x4e, 0x5c, 0xa2, 0xc0, 0x94, 0x60, 0xde, -0xc0, 0x2c, 0xb7, 0x1b, 0x9d, 0xff, 0x15, -0x99, 0x9d, 0x34, 0x84, 0x8e, 0xf8, 0x32, -0xa, 0xb4, 0xc3, 0xe4, 0x8c, 0xf6, 0x9e, -0x5f, 0xc1, 0xde, 0x71, 0x85, 0xe7, 0xc8, -0x8f, 0x77, 0x5b, 0xf4, 0x69, 0x50, 0xcf, -0x86, 0xda, 0x9a, 0x52, 0x11, 0x1e, 0x9d, -0x93, 0xb2, 0xb7, 0x5, 0x4a, 0x3b, 0xf3, -0x30, 0xd9, 0x6d, 0xe0, 0x6f, 0x50, 0x28, -0xcd, 0x8, 0x1a, 0x99, 0x3e, 0x7e, 0xd3, -0x90, 0x97, 0x66, 0xb9, 0x3a, 0x97, 0xb2, -0xb5, 0xea, 0x6d, 0x28, 0xa9, 0x35, 0x50, -0x0, 0x12, 0x94, 0xc5, 0xd3, 0xcc, 0x4b, -0x52, 0x7d, 0x2a, 0x2e, 0x92, 0x19, 0xde, -0x61, 0xf8, 0x21, 0x33, 0x13, 0xc5, 0x3, -0x7f, 0x33, 0x3, 0x13, 0x2e, 0xa7, 0x9f, -0x38, 0xe9, 0x5c, 0xd, 0xa3, 0xda, 0x4f, -0xd9, 0xb3, 0x5f, 0x9, 0xdd, 0x58, 0xa2, -0x80, 0x20, 0x89, 0x30, 0x14, 0x34, 0xb5, -0x5, 0x71, 0x84, 0x25, 0x68, 0x24, 0x37, -0x30, 0x53, 0x19, 0xa1, 0xe0, 0xac, 0x52, -0x65, 0x49, 0x5e, 0x3b, 0xca, 0xcc, 0xb7, -0xc3, 0xe2, 0xce, 0xfb, 0x90, 0x42, 0x1e, -0xbe, 0x94, 0xb0, 0xa1, 0x19, 0x8f, 0xde, -0x5, 0xde, 0x69, 0x16, 0x39, 0x72, 0x4e, -0x94, 0x45, 0x6a, 0xe4, 0xf1, 0x30, 0x25, -0xc1, 0xd5, 0xf, 0xcb, 0xe7, 0xa1, 0x31, -0x66, 0x4b, 0xae, 0x36, 0x7b, 0xfd, 0x88, -0x48, 0x25, 0x44, 0xd7, 0x85, 0xeb, 0xce, -0xcd, 0x2b, 0xec, 0x63, 0x82, 0xbf, 0xc5, -0x17, 0xb9, 0x5, 0xb, 0x14, 0x9, 0x1f, -0x98, 0xb6, 0x6, 0x38, 0xc8, 0x20, 0x58, -0x4, 0xc7, 0xf8, 0x95, 0xc8, 0xaa, 0xee, -0x1f, 0x88, 0x2f, 0xc1, 0x3f, 0x4f, 0x3d, -0x7b, 0x4a, 0xdd, 0xfc, 0x11, 0x2a, 0xaf, -0x11, 0xd, 0xbf, 0xe6, 0xd3, 0xa3, 0x2c, -0xd1, 0x2b, 0xb9, 0x7a, 0xaa, 0xad, 0xc6, -0x2d, 0xbb, 0x22, 0x84, 0x98, 0x2, 0x4d, -0x1f, 0x37, 0x6b, 0x86, 0xd7, 0xdd, 0xbc, -0x1f, 0x69, 0x44, 0x87, 0x70, 0xe, 0x3f, -0x4e, 0xe, 0x76, 0xdb, 0x18, 0x4a, 0x8e, -0x3d, 0x65, 0x3b, 0xae, 0x7e, 0xca, 0x6c, -0x8d, 0x7f, 0x6a, 0xf9, 0x38, 0xf6, 0x25, -0x55, 0xc1, 0xd8, 0x4c, 0xd0, 0xb6, 0x2c, -0x8e, 0x15, 0xa, 0x88, 0x63, 0xd3, 0xda, -0xda, 0xab, 0xf3, 0x22, 0x9d, 0xd1, 0x26, -0x1b, 0x13, 0x3d, 0x9d, 0x90, 0x3b, 0xd6, -0xb9, 0x92, 0xfd, 0x21, 0x5f, 0xb2, 0xb8, -0xe6, 0xa6, 0xd7, 0xb9, 0x29, 0x13, 0x5e, -0xa3, 0x22, 0x1c, 0x31, 0xc2, 0xd6, 0xd7, -0xa9, 0x5a, 0x14, 0xf6, 0x4, 0x7f, 0xba, -0x92, 0x49, 0x41, 0x4c, 0x14, 0xb1, 0xe, -0x26, 0xc0, 0x6c, 0xa9, 0xe3, 0x8c, 0xf7, -0xd3, 0xa8, 0x1f, 0x2, 0xd6, 0xc0, 0x1a, -0xf1, 0x5f, 0x7e, 0xd2, 0x13, 0xb5, 0xd2, -0xb1, 0xf9, 0x44, 0x57, 0x9d, 0xd1, 0x1d, -0xb6, 0x55, 0x20, 0x2a, 0x68, 0x52, 0xaf, -0xa9, 0x6e, 0x28, 0x41, 0x9, 0x2b, 0xe8, -0x49, 0x6d, 0x13, 0x32, 0x83, 0xd8, 0x1d, -0x86, 0xf2, 0x73, 0x53, 0xcb, 0x89, 0x92, -0xf1, 0xd8, 0x8e, 0xab, 0xab, 0xce, 0x32, -0xe5, 0x8e, 0xda, 0xab, 0xbe, 0xcd, 0x8b, -0x9c, 0xe0, 0xd0, 0x23, 0xfc, 0x1e, 0x1f, -0xf9, 0x94, 0x4f, 0x26, 0xa2, 0x86, 0xfe, -0x26, 0x50, 0x51, 0xf6, 0xdd, 0x1b, 0x7f, -0x7c, 0x13, 0xe8, 0xcc, 0x91, 0x77, 0x1f, -0xe7, 0xc0, 0x54, 0x2a, 0xe9, 0x60, 0xf3, -0x8b, 0x8e, 0x58, 0x2a, 0x24, 0x15, 0x0, -0x48, 0xa3, 0x9c, 0x68, 0xa3, 0x6a, 0x21, -0x89, 0xf1, 0x62, 0x92, 0xa8, 0x78, 0x18, -0x3e, 0x95, 0x62, 0x2b, 0xfa, 0x76, 0xa1, -0xa1, 0xfb, 0xed, 0x16, 0x89, 0xef, 0x74, -0xbb, 0x16, 0xef, 0x78, 0x9c, 0x4, 0xb2, -0x51, 0xe1, 0x15, 0x5f, 0xf3, 0xd5, 0x21, -0xf8, 0x54, 0x76, 0xfd, 0xda, 0xd9, 0x70, -0x81, 0xd2, 0x45, 0x29, 0x8, 0xf8, 0xfd, -0x21, 0x56, 0x82, 0x59, 0x5, 0x70, 0x29, -0xe9, 0x1, 0x55, 0xb6, 0xc5, 0x53, 0xee, -0x30, 0x18, 0xa7, 0xae, 0x9f, 0xc4, 0x2c, -0xd, 0x4d, 0x13, 0x9, 0x48, 0xde, 0x91, -0xcf, 0x3, 0xdd, 0xf5, 0xe8, 0xb3, 0x50, -0x82, 0x99, 0x75, 0x83, 0x72, 0x55, 0xb2, -0x6b, 0x95, 0x1e, 0xeb, 0x5a, 0x2c, 0xd1, -0xc3, 0x38, 0xc8, 0xd5, 0x5f, 0x2d, 0x3e, -0xd9, 0xc, 0xea, 0xc7, 0xb8, 0x5c, 0x9, -0x24, 0x21, 0xbd, 0x2a, 0x31, 0x75, 0x94, -0xe7, 0x8, 0x35, 0x25, 0x5a, 0xf, 0x25, -0x59, 0xfe, 0xf7, 0x96, 0x75, 0x5b, 0xd1, -0xd6, 0x91, 0x3b, 0xcf, 0x6d, 0x5f, 0xbd, -0x40, 0x59, 0x5e, 0xbe, 0xde, 0xf, 0x36, -0x97, 0x85, 0x9e, 0xa6, 0x95, 0xf6, 0xa0, -0x18, 0x44, 0xaf, 0x56, 0x8c, 0x65, 0x48, -0x81, 0x91, 0xfe, 0x87, 0x60, 0x7, 0xa9, -0x91, 0xb7, 0xed, 0xb5, 0x7c, 0x63, 0x1d, -0x84, 0x51, 0xd7, 0x15, 0x0, 0xda, 0xa0, -0x39, 0x96, 0xb6, 0x4d, 0x3a, 0x3c, 0x7b, -0xd9, 0xe3, 0x7a, 0x6, 0x31, 0x62, 0x17, -0xfe, 0x84, 0x5f, 0x59, 0xed, 0xa2, 0x45, -0x6, 0xda, 0x41, 0xa9, 0x0, 0xca, 0x60, -0x62, 0x77, 0x27, 0xdf, 0x9a, 0xa, 0x64, -0xc4, 0x7d, 0xbe, 0x8, 0x98, 0x6b, 0xd7, -0x67, 0xe1, 0xca, 0x90, 0x24, 0xc4, 0x34, -0xa5, 0x84, 0x9f, 0xc9, 0xa, 0xdd, 0x36, -0xd1, 0x58, 0x94, 0xcf, 0x68, 0xf7, 0x4b, -0xfd, 0x1f, 0x9a, 0x7f, 0xc0, 0x9c, 0xa0, -0x63, 0x5d, 0x3f, 0x27, 0x60, 0x33, 0x13, -0xef, 0x6d, 0x58, 0xd8, 0x9d, 0x75, 0xfc, -0x9d, 0x73, 0x89, 0xb3, 0x4, 0x8, 0xe, -0x79, 0x8f, 0xe8, 0xfa, 0xde, 0xd8, 0x94, -0x21, 0x97, 0x22, 0x37, 0x2b, 0xdb, 0xe9, -0x2, 0x9f, 0x7, 0xa7, 0xe4, 0xad, 0x79, -0x51, 0xe3, 0xcd, 0x92, 0xeb, 0x72, 0x1b, -0xf1, 0x3d, 0x3f, 0xf4, 0x16, 0xa3, 0x40, -0x50, 0x2, 0x8f, 0xcf, 0x2, 0xfc, 0x33, -0x61, 0x11, 0xea, 0xfb, 0x37, 0x1, 0xbe, -0xa1, 0xc6, 0xee, 0xe8, 0x37, 0x84, 0xd1, -0x9c, 0xfe, 0xbf, 0x23, 0x98, 0x60, 0xb3, -0x49, 0x71, 0x1e, 0xfa, 0xbf, 0x90, 0x73, -0x8f, 0x41, 0xc0, 0xef, 0x70, 0x46, 0xa2, -0x9d, 0x4c, 0x22, 0x92, 0x90, 0xae, 0xd8, -0xee, 0x2a, 0xe2, 0x24, 0xfa, 0x75, 0xe7, -0x63, 0x1a, 0xaa, 0xfa, 0xcf, 0xdc, 0x54, -0x1f, 0x73, 0x63, 0xe3, 0xf9, 0x5e, 0x73, -0xff, 0x11, 0xd2, 0x39, 0x1a, 0xa, 0x38, -0x56, 0x3e, 0xa0, 0xaa, 0xf6, 0x72, 0x4c, -0x36, 0x1a, 0xf, 0xd7, 0xe2, 0x91, 0x46, -0xe6, 0xaa, 0xe2, 0xdc, 0x3f, 0xf0, 0xac, -0x0, 0x98, 0x32, 0xcc, 0x3a, 0x4a, 0xa8, -0xab, 0x8b, 0xa6, 0xfd, 0x59, 0xd, 0xed, -0x1, 0xc7, 0xee, 0x38, 0x80, 0xb3, 0x52, -0x9e, 0x8, 0x69, 0x44, 0xf9, 0x7, 0x4b, -0xf6, 0xf7, 0xb4, 0x34, 0xa8, 0xa1, 0xfa, -0x36, 0xf2, 0x96, 0xf0, 0xf5, 0xc4, 0x8f, -0x29, 0x80, 0x8c, 0x3e, 0xa1, 0x15, 0x6a, -0xb6, 0x33, 0xfe, 0x91, 0x4a, 0x4d, 0x8c, -0x5f, 0x8, 0xdf, 0x5c, 0xb3, 0xda, 0x4b, -0xb3, 0xa5, 0xad, 0xcb, 0xec, 0x19, 0xc9, -0xf0, 0xe2, 0x93, 0xc9, 0x1f, 0x5f, 0xc3, -0xed, 0x9d, 0x3f, 0x52, 0x20, 0x4a, 0x5a, -0x10, 0x46, 0x72, 0xc8, 0x1, 0xa7, 0x43, -0xed, 0x58, 0x87, 0xd4, 0x96, 0xf1, 0x61, -0xea, 0xce, 0xbd, 0x42, 0xa3, 0x1c, 0xf, -0x67, 0xb6, 0xb5, 0x75, 0xe6, 0x7a, 0xad, -0x70, 0x9f, 0x25, 0x99, 0x0, 0xd3, 0x19, -0x15, 0xc4, 0x17, 0xe0, 0xe6, 0xb1, 0x81, -0xbc, 0xd9, 0x34, 0xc4, 0x96, 0x9e, 0x6, -0xf4, 0x89, 0xfe, 0x28, 0xac, 0x51, 0x8, -0x1c, 0x60, 0x1b, 0x5, 0x8b, 0x1b, 0x79, -0x2, 0x74, 0xb9, 0xa7, 0x55, 0x6f, 0x7a, -0x94, 0xc7, 0x5a, 0x84, 0x6d, 0x6a, 0x3e, -0x19, 0xe, 0xd1, 0xe9, 0x76, 0xf5, 0x5d, -0x6a, 0x7e, 0x3c, 0x3c, 0x3b, 0xb3, 0x73, -0x28, 0x5a, 0x89, 0xa2, 0x33, 0x42, 0x67, -0xf, 0xd, 0x33, 0x1a, 0x1a, 0xf6, 0xfe, -0x3c, 0x3a, 0xf2, 0xd7, 0x6d, 0x67, 0x40, -0xfc, 0x70, 0xde, 0xc1, 0xf6, 0x46, 0xa2, -0x36, 0xde, 0xb1, 0x19, 0x2a, 0x3e, 0x39, -0xb, 0xa7, 0xf9, 0x42, 0x69, 0xc0, 0xd9, -0xfc, 0xfb, 0x56, 0xe7, 0x73, 0x3e, 0xf8, -0xd8, 0x92, 0xe7, 0xfa, 0xe, 0x6c, 0x9d, -0x81, 0x2, 0x7f, 0xe6, 0x2f, 0x1e, 0x6f, -0x59, 0x81, 0x7c, 0xe8, 0x10, 0x34, 0x76, -0x4, 0x57, 0x56, 0xed, 0x15, 0x20, 0x4b, -0x4e, 0x16, 0x2c, 0x99, 0x57, 0xdb, 0xd, -0x18, 0xf7, 0xaa, 0xd3, 0x89, 0x24, 0x50, -0x18, 0x32, 0xf, 0x75, 0xea, 0x10, 0x5, -0xe9, 0x1b, 0xfb, 0x6c, 0x6c, 0xf, 0xf1, -0x27, 0x83, 0x1f, 0x13, 0x91, 0x69, 0xe7, -0x9f, 0x60, 0xc4, 0x93, 0x7c, 0xe0, 0x37, -0x30, 0x8b, 0x4b, 0xb1, 0xd9, 0x4f, 0x82, -0x4c, 0xa9, 0xce, 0x1d, 0xc9, 0x48, 0x2f, -0xcc, 0x21, 0x1b, 0x8c, 0x6a, 0xc1, 0xa, -0xa5, 0x44, 0x57, 0x98, 0xec, 0x10, 0x1d, -0xd7, 0x5f, 0xf3, 0x53, 0x76, 0x96, 0x6c, -0xe2, 0x46, 0x38, 0xac, 0x47, 0xb7, 0x77, -0xc9, 0x49, 0xaa, 0xae, 0xe7, 0xab, 0x20, -0xaa, 0x8e, 0x2a, 0x58, 0x5a, 0x80, 0xe3, -0x88, 0xde, 0x7, 0x1c, 0x3, 0xfd, 0xe6, -0x69, 0x29, 0x16, 0xc6, 0x2d, 0xa7, 0x12, -0x66, 0xb2, 0x3f, 0x8a, 0xb0, 0x74, 0xb1, -0x0, 0x3c, 0x4d, 0xd9, 0x6b, 0x12, 0xf9, -0xbf, 0x4e, 0xda, 0x29, 0x32, 0x27, 0xd5, -0x5b, 0x9a, 0xb9, 0xc5, 0x2b, 0x58, 0x78, -0x6c, 0x4, 0x5a, 0xb, 0xa1, 0x16, 0xb9, -0xc1, 0x27, 0xb6, 0x93, 0x7c, 0x74, 0x52, -0x53, 0xa, 0xec, 0x63, 0x67, 0x62, 0x8a, -0x3a, 0xf1, 0x6d, 0x73, 0x32, 0x4e, 0x93, -0x2a, 0xce, 0x1f, 0x32, 0x9e, 0xa6, 0x5e, -0xa9, 0xcc, 0xd3, 0xe0, 0x30, 0x29, 0x85, -0x36, 0x13, 0xe9, 0xdd, 0x8a, 0x26, 0x78, -0xe8, 0xa2, 0x8d, 0xd3, 0xf9, 0xf2, 0x14, -0xf4, 0xb0, 0x55, 0x8f, 0x6e, 0x93, 0x90, -0x70, 0x42, 0xaa, 0x93, 0x7c, 0xaa, 0x3c, -0x14, 0xee, 0x2c, 0xa6, 0x4c, 0x79, 0x5d, -0xd1, 0x15, 0xcb, 0x18, 0x45, 0x2c, 0x15, -0x4d, 0x96, 0x9a, 0x8, 0xec, 0xde, 0xfb, -0xa6, 0x26, 0x64, 0xcd, 0x3f, 0x85, 0x46, -0xa6, 0x20, 0xe7, 0x1b, 0xc4, 0xa1, 0xe4, -0xbf, 0x57, 0x40, 0x8d, 0x12, 0x2b, 0x8, -0x88, 0xa3, 0x7a, 0x7d, 0x82, 0xfa, 0xc4, -0xe3, 0x5b, 0xa6, 0x55, 0x63, 0xec, 0x7c, -0x23, 0xd0, 0xbc, 0x9a, 0xbb, 0x1b, 0xce, -0x21, 0x6a, 0x92, 0xf, 0xa3, 0xd2, 0xcd, -0x93, 0x74, 0x81, 0x2a, 0xa0, 0x26, 0xde, -0xf1, 0x70, 0x5b, 0x7e, 0xbf, 0x2b, 0xc3, -0x91, 0x8a, 0xbf, 0xfb, 0xa0, 0xf, 0x10, -0x4, 0x9e, 0xa5, 0xad, 0xdd, 0xbd, 0x90, -0xe, 0x3f, 0xbb, 0xc4, 0xc0, 0xb3, 0xc6, -0x15, 0x8a, 0xb2, 0x0, 0x6a, 0xcc, 0x4e, -0x7c, 0xca, 0x21, 0x51, 0x63, 0xb6, 0xc2, -0x71, 0x38, 0xf6, 0x5f, 0x50, 0x91, 0xab, -0x87, 0xd3, 0xb9, 0xad, 0x44, 0x37, 0x3d, -0x2e, 0x93, 0x43, 0xd2, 0x5b, 0xcd, 0xa9, -0x8c, 0xec, 0xfb, 0xcc, 0x49, 0xb0, 0xa9, -0x77, 0x66, 0x12, 0x15, 0x6, 0xbd, 0x43, -0x86, 0x6c, 0x2a, 0xeb, 0x62, 0x58, 0x25, -0xa5, 0x23, 0xaf, 0xe2, 0x4, 0x7a, 0x61, -0xb8, 0x25, 0x3a, 0x4, 0x39, 0xe3, 0x15, -0x10, 0x1e, 0x8d, 0x4a, 0x42, 0x5f, 0x81, -0xe2, 0xac, 0x28, 0x4a, 0x25, 0x35, 0x5, -0xb7, 0x20, 0xab, 0xbb, 0xc4, 0x45, 0xef, -0xc4, 0xf7, 0xf1, 0x41, 0xf9, 0x58, 0x3a, -0x67, 0x14, 0xba, 0xc3, 0x76, 0x41, 0x58, -0x8, 0x6f, 0x90, 0x6e, 0xe0, 0x51, 0x19, -0xf, 0x94, 0x60, 0x7c, 0x8, 0x81, 0xd4, -0xc9, 0xbc, 0x7, 0xfd, 0x2b, 0xf2, 0xa8, -0x1b, 0xfa, 0x4a, 0xe5, 0x3d, 0xf3, 0xe7, -0x84, 0xff, 0x9e, 0xee, 0x44, 0xb8, 0xee, -0xbb, 0xd0, 0xd5, 0xfb, 0xc9, 0xd7, 0x7c, -0xc8, 0x28, 0xd2, 0x2c, 0x46, 0x3f, 0xee, -0xd3, 0x7, 0x5c, 0xed, 0x50, 0x3a, 0x92, -0x6e, 0xd, 0xdf, 0x75, 0x55, 0x2f, 0xf8, -0x46, 0x58, 0x17, 0x0, 0x94, 0xc9, 0x1d, -0xc, 0x96, 0xee, 0x44, 0x33, 0xcc, 0x7d, -0xf7, 0xd3, 0x52, 0x4d, 0x92, 0x66, 0x4e, -0xdd, 0xe1, 0x18, 0xa3, 0x94, 0xae, 0x82, -0x6d, 0x80, 0x75, 0xc1, 0x65, 0x42, 0x3f, -0xc8, 0x96, 0x2c, 0xb, 0xb, 0x7b, 0x18, -0x65, 0x90, 0x57, 0xc6, 0x22, 0x38, 0xf2, -0xce, 0x5, 0x9e, 0xd6, 0xcc, 0x7d, 0x7b, -0x75, 0x90, 0x4e, 0xda, 0xd, 0x28, 0x63, -0xea, 0x8c, 0xd6, 0x8a, 0x8a, 0x74, 0x38, -0x61, 0xf7, 0xbd, 0xd, 0x5b, 0x5f, 0x50, -0x70, 0x23, 0x78, 0x2b, 0xc5, 0xb1, 0x2c, -0xac, 0x26, 0x37, 0xf9, 0xf1, 0xa8, 0x95, -0x74, 0xb7, 0x2d, 0xf3, 0xeb, 0xb4, 0x78, -0x9e, 0xfe, 0xd5, 0x7c, 0xad, 0xd1, 0x18, -0x26, 0xb5, 0x84, 0x64, 0x6f, 0x80, 0xc, -0x9a, 0xe9, 0x9, 0xbc, 0x47, 0x26, 0x88, -0x52, 0x95, 0x3c, 0xab, 0x4d, 0x8, 0x42, -0x81, 0x69, 0x3, 0xd8, 0xf4, 0x31, 0x9a, -0x2f, 0x3, 0xa3, 0xcc, 0x1f, 0xb4, 0x11, -0xd1, 0x82, 0x7, 0xa7, 0x93, 0xac, 0xb2, -0x8b, 0x7, 0xba, 0x46, 0x67, 0x6a, 0x2c, -0xde, 0x62, 0x53, 0x15, 0xd1, 0x70, 0x6d, -0x9, 0x30, 0xa9, 0xf, 0xb3, 0x3d, 0x8b, -0xb1, 0xc, 0xd6, 0x88, 0xcd, 0xa6, 0xf4, -0xee, 0x22, 0xc0, 0x1a, 0x18, 0x1b, 0x42, -0xbc, 0x34, 0xb1, 0x57, 0x48, 0x9, 0x5b, -0x5b, 0xb1, 0x7, 0xfb, 0x45, 0x97, 0x8e, -0x25, 0x40, 0x2, 0xd8, 0xaa, 0x64, 0x6f, -0x8c, 0xa, 0xd7, 0xfd, 0x4c, 0xad, 0x35, -0x97, 0xc5, 0xbe, 0xf9, 0x3d, 0x86, 0x15, -0x3c, 0x7c, 0xd9, 0x72, 0x8, 0x6b, 0xdf, -0xff, 0x30, 0x32, 0x94, 0x23, 0xa7, 0x71, -0x27, 0x39, 0xa6, 0x16, 0x75, 0x4f, 0x6a, -0x45, 0x51, 0x74, 0xcc, 0xe7, 0xfe, 0xa2, -0x7d, 0xf8, 0xe8, 0x2e, 0x1d, 0x8c, 0xe9, -0xba, 0xca, 0x89, 0xc4, 0x29, 0x1c, 0x9a, -0x24, 0x4f, 0x50, 0xe5, 0x2c, 0x55, 0x12, -0x9, 0x17, 0xae, 0x75, 0x31, 0xac, 0x2, -0x86, 0x1f, 0x85, 0xf4, 0x1d, 0x5c, 0x3, -0x13, 0x3f, 0xe0, 0x12, 0xdb, 0xfc, 0x6d, -0x7c, 0x30, 0xfd, 0x53, 0x56, 0xbe, 0x14, -0xce, 0x19, 0x19, 0xab, 0x43, 0x62, 0xcd, -0xd7, 0x4b, 0x24, 0x11, 0xc7, 0x6a, 0x80, -0xe7, 0xcb, 0x98, 0x47, 0x79, 0x8a, 0xf, -0x72, 0x5b, 0xd2, 0xf8, 0xf7, 0x10, 0x3e, -0x21, 0xfa, 0x37, 0xdf, 0xe3, 0xa6, 0xfb, -0x21, 0x47, 0xf4, 0x95, 0x9a, 0x88, 0xe3, -0x51, 0x82, 0x5c, 0xa6, 0xe0, 0x24, 0xf4, -0x5f, 0x74, 0x25, 0x24, 0x78, 0x81, 0xe7, -0x3d, 0x37, 0x1c, 0xda, 0xbc, 0x0, 0x46, -0x86, 0x3a, 0x7d, 0x36, 0xe5, 0x35, 0x6d, -0xdc, 0x6d, 0x64, 0xbf, 0xe1, 0x26, 0x7b, -0x5c, 0xb0, 0xe5, 0x75, 0xd3, 0xcd, 0x4c, -0x12, 0xf, 0x0, 0x3e, 0x2d, 0x8a, 0x9e, -0xc, 0xa6, 0xb1, 0xf1, 0x18, 0xc3, 0x74, -0xc5, 0xc2, 0xf7, 0xdb, 0xc4, 0x70, 0xf, -0x21, 0x41, 0xa5, 0xb7, 0x67, 0x16, 0x2f, -0xef, 0xd6, 0x3c, 0xa5, 0x96, 0xa7, 0xb8, -0x5c, 0x87, 0x39, 0x4e, 0x85, 0xbc, 0x80, -0xdd, 0x66, 0x5b, 0xa7, 0xfc, 0x53, 0xb3, -0x1c, 0x14, 0xae, 0xb9, 0xd4, 0xef, 0xce, -0x7b, 0xb5, 0x10, 0x89, 0x7e, 0xd2, 0xc9, -0xb4, 0x6b, 0xfe, 0xb5, 0x9d, 0x35, 0xf2, -0x6f, 0xb6, 0x79, 0xfb, 0x5, 0x7, 0x6e, -0xdc, 0x8e, 0xa8, 0x2f, 0xdf, 0x73, 0x87, -0xed, 0x33, 0x14, 0x4e, 0xbb, 0x88, 0x68, -0x3c, 0x82, 0x44, 0x3b, 0xce, 0xba, 0xa8, -0x72, 0xf5, 0x3e, 0xdd, 0xcc, 0x48, 0x9, -0xe, 0xfe, 0xb3, 0x3, 0x1f, 0xd9, 0x4, -0x85, 0xbc, 0x2, 0xa7, 0x84, 0x3d, 0xc2, -0x4d, 0xf0, 0x1d, 0x14, 0x6b, 0xd0, 0x99, -0xb3, 0xe, 0x7b, 0xdd, 0xdd, 0x82, 0xd6, -0x9b, 0xf8, 0x8c, 0xf8, 0x9e, 0xf8, 0x3, -0x10, 0x49, 0xfb, 0x24, 0x5d, 0xe2, 0x35, -0xc3, 0xb1, 0x50, 0xdc, 0x53, 0xd2, 0xa3, -0xce, 0xa1, 0xc5, 0x75, 0x4b, 0x9e, 0x63, -0x7a, 0xd3, 0x1f, 0x6d, 0x4c, 0xb0, 0xee, -0x16, 0x90, 0x1a, 0x51, 0x59, 0x8, 0x9a, -0xd8, 0x3, 0xac, 0x6b, 0x0, 0xb8, 0x71, -0xb7, 0x26, 0xc8, 0x14, 0x35, 0xe, 0x99, -0x27, 0xd5, 0x36, 0xd2, 0xee, 0x6c, 0xf, -0xed, 0x7a, 0x29, 0x89, 0xeb, 0x1c, 0x60, -0x73, 0xd8, 0x50, 0x4d, 0x4a, 0x74, 0x30, -0xa0, 0x85, 0xe4, 0x52, 0x59, 0x56, 0xca, -0xcf, 0xa4, 0xad, 0x80, 0x59, 0x57, 0x13, -0xae, 0xd7, 0x99, 0x26, 0x7a, 0x7d, 0xbe, -0xbf, 0xf7, 0xf2, 0x30, 0xc9, 0xc2, 0x12, -0xd6, 0x54, 0x53, 0x9d, 0x2e, 0xca, 0x56, -0x4d, 0xc0, 0xff, 0x8d, 0x24, 0xe8, 0x5e, -0x4b, 0x97, 0xb, 0x27, 0x77, 0x5a, 0x60, -0x2e, 0x72, 0x36, 0xdb, 0xde, 0x48, 0x27, -0x7c, 0xe4, 0xb2, 0xed, 0x38, 0xf8, 0x13, -0x9e, 0xfd, 0x5c, 0x48, 0xf, 0x6f, 0x6e, -0x74, 0xd6, 0x69, 0x2, 0x9b, 0x54, 0xec, -0xda, 0xc9, 0x8f, 0x77, 0xa0, 0x49, 0x42, -0x1, 0x74, 0x2, 0x6, 0x17, 0x5e, 0x85, -0x9e, 0x85, 0x13, 0x5f, 0x12, 0x2e, 0xf4, -0xd, 0xcc, 0x7f, 0x41, 0xdc, 0xd5, 0xa2, -0xd6, 0x4a, 0x1e, 0x16, 0xd5, 0xdf, 0x39, -0xd2, 0x36, 0x43, 0x1d, 0x8f, 0xb5, 0xc5, -0x90, 0x71, 0xec, 0xb1, 0x9e, 0x32, 0x54, -0xb2, 0x2e, 0x10, 0xe4, 0x92, 0x21, 0x79, -0x3b, 0xa2, 0x25, 0xf0, 0x49, 0x19, 0xb5, -0xf4, 0x8c, 0xff, 0xf2, 0x85, 0x81, 0xc0, -0x53, 0xc8, 0xa8, 0x8e, 0x61, 0x7d, 0x50, -0xd4, 0x3a, 0x6a, 0x7b, 0x9f, 0xb2, 0xd9, -0x7b, 0xf6, 0x8a, 0xe4, 0x6, 0x70, 0xe6, -0x6e, 0xb9, 0x78, 0x26, 0x9b, 0x9c, 0xcd, -0x90, 0x27, 0xdc, 0xed, 0xc4, 0xd6, 0x93, -0xd0, 0x89, 0xe4, 0xd0, 0x15, 0x77, 0x24, -0x4d, 0x64, 0x81, 0x60, 0xa8, 0x8a, 0xd7, -0xfd, 0xd6, 0x4c, 0x47, 0x27, 0xf7, 0x9, -0xea, 0xa1, 0xfa, 0x1c, 0x75, 0x6f, 0xe5, -0xf4, 0xdb, 0xa6, 0xa6, 0xc4, 0xa1, 0xc0, -0x40, 0x4d, 0x46, 0xa5, 0xc1, 0x66, 0xc1, -0x1b, 0x1, 0x2b, 0x9e, 0x91, 0xd4, 0xb8, -0x68, 0xa0, 0x24, 0x2a, 0x1c, 0x37, 0x42, -0x4b, 0xd8, 0x3b, 0x7f, 0x4e, 0x1d, 0x4e, -0xb, 0x5f, 0x6a, 0x17, 0xfa, 0xb8, 0x21, -0x88, 0x87, 0x58, 0x42, 0x77, 0x86, 0xea, -0x3, 0xf, 0xf2, 0x15, 0x95, 0xf3, 0x16, -0xf1, 0x8e, 0xee, 0x95, 0xba, 0x7d, 0x75, -0x8c, 0xd0, 0x4e, 0x63, 0x2, 0x1a, 0xc6, -0x5e, 0x1, 0x20, 0x44, 0xd7, 0x21, 0x43, -0x40, 0xd9, 0xd1, 0x82, 0xa9, 0x23, 0x4c, -0x68, 0x88, 0x94, 0xfa, 0x47, 0x56, 0x45, -0x31, 0x58, 0x2c, 0x1c, 0x6e, 0x56, 0x31, -0x37, 0x10, 0x6b, 0x2e, 0xda, 0xac, 0x69, -0x8c, 0xd2, 0x7a, 0x66, 0x8d, 0xa5, 0x26, -0x1f, 0xf6, 0x3e, 0xe0, 0x1, 0xb0, 0x7, -0xe1, 0xd9, 0xff, 0x8c, 0x4b, 0x8e, 0x17, -0x1b, 0xcc, 0x47, 0x76, 0xed, 0xbd, 0xd6, -0x94, 0x21, 0xb7, 0x8f, 0x5e, 0xb4, 0x1c, -0xd1, 0x49, 0x83, 0x25, 0x6f, 0x63, 0xe8, -0x28, 0xa5, 0x51, 0xd7, 0xdb, 0x82, 0x9f, -0xd9, 0xb1, 0x32, 0x38, 0xa5, 0xd0, 0x59, -0x2d, 0x97, 0xd, 0xb5, 0x14, 0xe5, 0x2f, -0xb9, 0xb2, 0x2a, 0xb, 0x96, 0xf6, 0x77, -0x86, 0xf3, 0xa9, 0xe0, 0x96, 0x76, 0x1f, -0x66, 0xc0, 0x78, 0xff, 0xd1, 0x26, 0xfb, -0xe7, 0x94, 0x81, 0x72, 0xe9, 0xdd, 0xa4, -0x1a, 0x7a, 0xdc, 0x95, 0x9e, 0x2c, 0x6d, -0x41, 0xfb, 0x3c, 0x67, 0x66, 0xa5, 0xa, -0x84, 0x43, 0xb8, 0x80, 0x45, 0x54, 0xd9, -0x69, 0x70, 0x93, 0x52, 0xaf, 0xbb, 0xe7, -0xd4, 0x39, 0x22, 0xd5, 0x40, 0xa2, 0xf7, -0xee, 0x21, 0xe8, 0x8e, 0x81, 0xb6, 0x33, -0x12, 0x72, 0x7, 0x70, 0x7c, 0x52, 0x9a, -0x62, 0xd1, 0x52, 0x33, 0x51, 0x11, 0x7f, -0x1c, 0x9f, 0x43, 0xe6, 0xa0, 0xc2, 0x99, -0xea, 0xc4, 0xd6, 0x92, 0xb8, 0x75, 0x64, -0x42, 0x83, 0x4, 0x9d, 0x42, 0xd4, 0x4b, -0x55, 0x4e, 0xef, 0xd9, 0x10, 0x7e, 0xe4, -0x5e, 0xa0, 0x4f, 0x47, 0x16, 0xc2, 0x54, -0x22, 0x3f, 0x37, 0x1, 0x31, 0x90, 0x34, -0xc5, 0x15, 0x5a, 0x4a, 0x88, 0x9, 0xdb, -0x49, 0x9, 0xd7, 0xd2, 0x34, 0x54, 0xd7, -0xb4, 0xdc, 0xa5, 0x6d, 0x10, 0x3b, 0x19, -0x4c, 0x81, 0x5f, 0x2f, 0x5a, 0xe2, 0x54, -0xc5, 0xd0, 0x2, 0xf0, 0x6c, 0xc5, 0x3a, -0x1d, 0x59, 0x41, 0xf3, 0x30, 0x33, 0xf7, -0xfc, 0x1, 0x69, 0xba, 0x87, 0xbc, 0x9f, -0x30, 0x3b, 0x68, 0xb7, 0xb1, 0xf5, 0x19, -0x33, 0xdb, 0xd2, 0xf5, 0x3a, 0x8b, 0xb0, -0xdf, 0x8, 0x63, 0xce, 0x7a, 0x8, 0xcc, -0x81, 0x97, 0x9b, 0x3f, 0xc, 0x91, 0x46, -0x8d, 0x3c, 0x9d, 0x7b, 0xea, 0x27, 0x3b, -0x3f, 0xa5, 0x16, 0x27, 0xe9, 0x54, 0x87, -0xda, 0x84, 0xfd, 0x16, 0x24, 0x71, 0xd3, -0xce, 0x9d, 0xa3, 0x4d, 0x34, 0xeb, 0x92, -0xf8, 0x5f, 0xa9, 0x1a, 0x47, 0x6d, 0xc, -0x44, 0x7b, 0xd3, 0x4d, 0xe7, 0xfe, 0x7, -0xa4, 0x25, 0xfe, 0x9d, 0x9a, 0x94, 0x9a, -0x34, 0x6a, 0x3b, 0x50, 0xcc, 0x41, 0xdc, -0x5f, 0x28, 0x4, 0x3d, 0x3a, 0xc2, 0x58, -0x40, 0xc0, 0xa, 0x63, 0x1, 0x6e, 0xb, -0x9, 0xc1, 0xc7, 0x42, 0x0, 0x72, 0xa0, -0x45, 0xa6, 0x11, 0x53, 0x23, 0x7b, 0x42, -0x0, 0x46, 0x9b, 0x1e, 0x7a, 0xde, 0x96, -0x7b, 0x48, 0x40, 0xda, 0x5b, 0x20, 0xf, -0xb6, 0x79, 0xc6, 0x5c, 0x4b, 0xb0, 0x4f, -0xf7, 0xa1, 0x93, 0x34, 0x6, 0x73, 0xb5, -0x9d, 0x94, 0xc0, 0xd, 0x11, 0x4e, 0xfa, -0xc2, 0x71, 0xb4, 0x2d, 0x68, 0xf6, 0x72, -0x4a, 0xe4, 0x40, 0xa3, 0xc5, 0x3c, 0x2f, -0x5e, 0x70, 0x1d, 0xfb, 0x66, 0xff, 0xed, -0x9a, 0x22, 0x85, 0x96, 0x41, 0xf, 0x7c, -0xc, 0xc7, 0x86, 0x6a, 0xc4, 0xd8, 0xa9, -0x59, 0x55, 0x69, 0xa3, 0xd0, 0x85, 0x6c, -0xae, 0xd2, 0x97, 0xf1, 0x54, 0xeb, 0xf1, -0x59, 0x29, 0xa6, 0x89, 0xb5, 0xfa, 0xd, -0x10, 0xe7, 0xd6, 0xb5, 0xfe, 0xb0, 0xc7, -0x1a, 0x65, 0x62, 0xfa, 0xce, 0x31, 0xb7, -0x8d, 0x64, 0x93, 0x5b, 0xfb, 0x6, 0x31, -0x19, 0xee, 0xb2, 0x54, 0xc9, 0x3c, 0xdb, -0xbe, 0xb0, 0xc1, 0xc3, 0x95, 0xb, 0x9f, -0xcd, 0xa2, 0x35, 0x29, 0xcf, 0x2b, 0xa0, -0xf2, 0x9b, 0x21, 0x5a, 0xa, 0xbe, 0x2a, -0x99, 0xfa, 0x60, 0xa1, 0x4c, 0x15, 0x2a, -0x6d, 0xec, 0xc6, 0x86, 0x49, 0x6, 0xcc, -0x50, 0xe6, 0xf9, 0xe4, 0xa9, 0xa2, 0x39, -0x24, 0x8e, 0xcb, 0xa0, 0xb7, 0x32, 0x2b, -0xab, 0x2f, 0xfb, 0x8f, 0xdf, 0x31, 0x9f, -0xfe, 0x5b, 0x55, 0xbd, 0xb4, 0x61, 0xb4, -0xfe, 0xe1, 0x26, 0xd5, 0x6e, 0x61, 0xde, -0xd9, 0x7a, 0x56, 0xa8, 0x57, 0x56, 0x74, -0xf2, 0xcb, 0xd3, 0xc2, 0xf8, 0xe8, 0x4, -0x49, 0x4c, 0x22, 0x45, 0x6d, 0x46, 0x30, -0x92, 0xf2, 0xdd, 0x45, 0x98, 0xe3, 0x8e, -0x71, 0xaf, 0x7d, 0x1b, 0x3, 0xa6, 0x7c, -0x42, 0x88, 0xae, 0xc8, 0xe1, 0x11, 0x55, -0x1a, 0x10, 0x42, 0x9a, 0x7a, 0x11, 0x4a, -0xe, 0x53, 0x36, 0xcc, 0x6b, 0x4b, 0x86, -0x7, 0x38, 0xe9, 0xf9, 0x66, 0xcc, 0x71, -0xa1, 0xf, 0x16, 0xd7, 0x92, 0x16, 0x9, -0x9d, 0xc0, 0xc3, 0x38, 0xdb, 0xcb, 0xb5, -0xd4, 0x42, 0xf0, 0xc, 0x90, 0xb, 0xad, -0x93, 0x1e, 0x50, 0x23, 0xe8, 0x9a, 0xe1, -0xd0, 0xf9, 0x67, 0xc4, 0x89, 0xc9, 0x7, -0xdc, 0x96, 0xfd, 0xa6, 0x9a, 0x2a, 0x6, -0xff, 0x12, 0x44, 0x30, 0xa3, 0x62, 0xe2, -0x82, 0x8a, 0x62, 0x61, 0xa5, 0x22, 0x2d, -0x65, 0xcf, 0x2c, 0x39, 0x32, 0x65, 0x94, -0x8b, 0xb5, 0x14, 0xbb, 0xbe, 0xfb, 0x83, -0xe4, 0x83, 0x4c, 0x84, 0x38, 0x35, 0xa4, -0xbc, 0x11, 0x13, 0x2b, 0xc6, 0x45, 0x67, -0x48, 0x42, 0x79, 0xf4, 0xbe, 0x65, 0xe9, -0x38, 0xdc, 0xea, 0x96, 0xc1, 0xb5, 0x35, -0xd3, 0xa5, 0x7d, 0x52, 0x16, 0xf2, 0x3c, -0xbd, 0x2d, 0x9c, 0x67, 0xb0, 0x5c, 0x69, -0x21, 0x7a, 0x22, 0xdd, 0xc6, 0x80, 0x4, -0x9e, 0xcd, 0x1a, 0xfd, 0x77, 0xa9, 0xa0, -0x40, 0x1f, 0xd9, 0xfb, 0x17, 0x99, 0xec, -0x4e, 0x69, 0x86, 0x7f, 0xf, 0x32, 0xea, -0x1e, 0xe9, 0x12, 0x64, 0xe, 0xef, 0x30, -0x9b, 0xfd, 0xf7, 0xfb, 0x9c, 0x24, 0x2f, -0x5f, 0x79, 0x83, 0x7c, 0x41, 0x57, 0x85, -0xa1, 0xcf, 0x55, 0xda, 0xf, 0xce, 0xd7, -0x43, 0xa1, 0x3c, 0xe3, 0x17, 0xa7, 0x66, -0x44, 0xac, 0x51, 0xc2, 0x46, 0x2e, 0x2d, -0x88, 0x61, 0xc5, 0xea, 0xc9, 0x9d, 0x3, -0xdc, 0xc2, 0x9f, 0x21, 0x6, 0xfe, 0xed, -0xb1, 0x38, 0xef, 0x7a, 0x88, 0xfd, 0x9, -0xfe, 0x2b, 0x50, 0xd8, 0xcc, 0x2b, 0xb, -0xb1, 0x2b, 0x8c, 0x7e, 0xd7, 0x7d, 0x54, -0x1, 0xb8, 0xd7, 0x2b, 0xf7, 0xfd, 0xdf, -0x3f, 0xe6, 0xde, 0x5a, 0xa2, 0x9e, 0x45, -0xc, 0x37, 0xf1, 0x1a, 0xa0, 0xd1, 0x87, -0x7c, 0xd9, 0x16, 0x7e, 0x66, 0x97, 0xd2, -0x7e, 0x4a, 0xb3, 0x2f, 0x53, 0x24, 0xd5, -0xd6, 0x22, 0xa2, 0x2e, 0xf9, 0x22, 0x43, -0x8d, 0x65, 0x6b, 0x6a, 0xb7, 0xdf, 0xb4, -0x60, 0x3d, 0x4b, 0x10, 0x72, 0xc, 0x82, -0x3a, 0x72, 0x13, 0xe5, 0x76, 0x1e, 0x6d, -0x21, 0xce, 0xec, 0x6, 0x8b, 0x98, 0x73, -0xb7, 0x6b, 0x9d, 0xed, 0x52, 0x42, 0x10, -0x38, 0xf1, 0x6d, 0xeb, 0xd2, 0x77, 0x9c, -0xc9, 0x8d, 0x44, 0x9e, 0xf1, 0x26, 0x5, -0xc7, 0x94, 0xdd, 0x8e, 0xe0, 0xc7, 0x7b, -0xe2, 0x98, 0x8b, 0xd, 0x36, 0x92, 0x74, -0xf7, 0x7c, 0xf2, 0x98, 0xd5, 0x19, 0x34, -0xab, 0x59, 0xd, 0xcb, 0x7a, 0x2b, 0x71, -0x3f, 0xfc, 0x73, 0xa0, 0x51, 0x8a, 0xe6, -0xd8, 0xa1, 0x76, 0x25, 0xe3, 0x7, 0xd1, -0xc2, 0xf6, 0x4f, 0x84, 0x50, 0xd6, 0xdd, -0x92, 0xeb, 0x8c, 0x45, 0xfe, 0xbf, 0xdd, -0x40, 0x1a, 0x4b, 0xff, 0x84, 0x47, 0x44, -0xad, 0x78, 0x75, 0x42, 0x20, 0xae, 0xa7, -0x91, 0x23, 0xda, 0xde, 0xc6, 0x68, 0x9f, -0xb3, 0x10, 0xc4, 0x3, 0xf, 0xa8, 0x5, -0x5d, 0xb0, 0xec, 0x33, 0x1f, 0xf5, 0xd3, -0x57, 0x9b, 0xab, 0xcd, 0xb3, 0xe2, 0xdc, -0x2d, 0xf7, 0xa3, 0xd3, 0x78, 0x56, 0xb1, -0xcf, 0x82, 0x8d, 0x2c, 0x65, 0x4a, 0xde, -0x17, 0xe7, 0xcc, 0xb8, 0xf2, 0xe, 0x9b, -0x67, 0xf4, 0x3a, 0x76, 0xeb, 0x66, 0xd5, -0x15, 0x2a, 0xc, 0xa0, 0x5b, 0xc, 0xfb, -0xcd, 0x7f, 0x65, 0x7d, 0xee, 0x12, 0xba, -0x2b, 0xd7, 0x2a, 0x5f, 0xc, 0x1c, 0x8d, -0x89, 0x51, 0x60, 0x9c, 0x17, 0x24, 0xe1, -0x48, 0xa2, 0x9c, 0xd5, 0x72, 0xa1, 0x25, -0x95, 0x9a, 0xa6, 0x4a, 0x2, 0x54, 0x68, -0x53, 0xe1, 0x5c, 0xea, 0x6a, 0xc2, 0xcd, -0x63, 0x86, 0x96, 0xaa, 0xbf, 0xd0, 0x52, -0x92, 0x3d, 0x5d, 0x3, 0x76, 0x67, 0xe8, -0x4c, 0xf5, 0x33, 0xc0, 0x7, 0xcd, 0xa6, -0x75, 0x8f, 0x5c, 0x82, 0x8e, 0x8e, 0xbf, -0x1f, 0xdb, 0x91, 0x94, 0x41, 0x51, 0x11, -0x78, 0x9a, 0x53, 0x40, 0x99, 0x74, 0x1c, -0x2f, 0x46, 0x37, 0x2b, 0x26, 0x2a, 0xcf, -0x1e, 0x4f, 0x43, 0x7b, 0x72, 0x61, 0x94, -0x9d, 0xd9, 0xf5, 0xb7, 0x37, 0x4e, 0x6f, -0x63, 0x25, 0xfc, 0x0, 0xc0, 0x72, 0x17, -0x6a, 0xec, 0x15, 0x37, 0x2, 0x3e, 0xc8, -0x78, 0xd0, 0xf3, 0xe4, 0x32, 0xa6, 0x60, -0xcf, 0xf8, 0xe8, 0xb8, 0x23, 0x37, 0x43, -0x94, 0xff, 0xbe, 0xfd, 0xa7, 0x3b, 0x54, -0x4d, 0x40, 0x3f, 0x8, 0x3a, 0x7d, 0x57, -0x7e, 0x7b, 0x79, 0xe8, 0x91, 0x1c, 0x47, -0x50, 0xe6, 0xde, 0xa3, 0x27, 0x50, 0x21, -0x8, 0xef, 0x89, 0x64, 0xec, 0x77, 0x0, -0x49, 0xd5, 0xab, 0xcf, 0xc0, 0xd6, 0xbe, -0x3c, 0x3f, 0x8, 0xae, 0x6, 0x73, 0x24, -0x56, 0x91, 0xff, 0xb, 0xe0, 0xa5, 0xe7, -0x2d, 0x69, 0x7, 0xa5, 0xb5, 0xe3, 0x4e, -0xa9, 0xc7, 0x19, 0x7e, 0xc4, 0xa1, 0x8a, -0xc1, 0xc1, 0x9f, 0x22, 0xbf, 0x76, 0xf2, -0x10, 0x8d, 0x78, 0xd8, 0xad, 0x4f, 0xef, -0xd8, 0x90, 0x97, 0x37, 0x13, 0x38, 0x99, -0x36, 0xab, 0x2b, 0x7d, 0x77, 0xe4, 0x34, -0x43, 0x17, 0x5a, 0x4e, 0x3c, 0xc7, 0xcd, -0xb7, 0xbb, 0x69, 0x79, 0x75, 0x43, 0x3d, -0xc2, 0x79, 0x7b, 0xfb, 0xff, 0xf5, 0x1, -0x2f, 0xb2, 0x79, 0x82, 0x6, 0x28, 0x74, -0xd9, 0x4d, 0x79, 0x23, 0xb4, 0xb2, 0xfb, -0x26, 0x12, 0x8e, 0x42, 0x2f, 0x5e, 0xf9, -0x62, 0xb2, 0x5e, 0x57, 0x13, 0x29, 0x75, -0x49, 0x35, 0x7e, 0x11, 0x46, 0xdd, 0xf6, -0x8d, 0x38, 0x6d, 0xea, 0x2d, 0x29, 0xce, -0x22, 0x14, 0x77, 0xe0, 0xd3, 0x4f, 0x91, -0x45, 0x7a, 0xb9, 0x43, 0x5d, 0xbf, 0xdc, -0x9f, 0x71, 0xaf, 0x48, 0x52, 0xe6, 0x15, -0x9f, 0xdb, 0xd9, 0xb2, 0x1b, 0x78, 0x6, -0x4e, 0x7f, 0xfa, 0x13, 0x54, 0xf9, 0x82, -0x4c, 0x21, 0x17, 0xe4, 0x53, 0x3, 0xdb, -0x2f, 0x8, 0x7a, 0x29, 0xb6, 0x2e, 0xde, -0x11, 0xce, 0xf7, 0x57, 0x5, 0x5, 0xdc, -0xb5, 0xcf, 0x3, 0xe1, 0x98, 0x77, 0xe7, -0xd5, 0x8b, 0x63, 0x74, 0x26, 0xea, 0xdd, -0xfe, 0x5c, 0x59, 0x90, 0x44, 0x31, 0x73, -0x51, 0x4e, 0x62, 0xcd, 0x5, 0x23, 0xed, -0x24, 0x79, 0x52, 0x4a, 0x69, 0x64, 0x6b, -0x2b, 0x7e, 0xf8, 0x51, 0x6e, 0xd1, 0x56, -0x5b, 0x5a, 0xa3, 0x48, 0xcd, 0x5b, 0xc9, -0x1b, 0xf7, 0x5e, 0x5f, 0x84, 0xf7, 0x3d, -0x8a, 0xf7, 0x25, 0xbf, 0xc8, 0x80, 0x6, -0x44, 0x96, 0x3e, 0x9c, 0x85, 0xbf, 0xad, -0x64, 0xd4, 0x6e, 0xab, 0x2e, 0x4e, 0x8d, -0x1b, 0xaa, 0x8a, 0x6a, 0xb9, 0x4e, 0x2a, -0x73, 0xad, 0x2c, 0x14, 0xb2, 0xa2, 0xd4, -0x4a, 0x75, 0x5c, 0x62, 0xa3, 0xf2, 0x53, -0xef, 0xf2, 0x5b, 0x5a, 0x4a, 0xeb, 0x1b, -0xba, 0x34, 0x5f, 0x66, 0x73, 0xd2, 0x19, -0x55, 0x3d, 0x8c, 0x18, 0x32, 0x4c, 0x8, -0x99, 0xf5, 0x4a, 0x52, 0xbd, 0x78, 0xbe, -0x1f, 0x29, 0x91, 0xf0, 0x26, 0x25, 0xb5, -0xb2, 0x6d, 0x2f, 0x22, 0xd8, 0x4d, 0x4, -0xe1, 0x5e, 0x4d, 0x55, 0xec, 0x6f, 0x29, -0x99, 0x1b, 0xe6, 0x4e, 0x8, 0xc1, 0x35, -0x11, 0x28, 0x59, 0xdc, 0xd4, 0xa4, 0x3e, -0x72, 0xdc, 0x31, 0x7a, 0x2b, 0x64, 0x83, -0xa9, 0xdb, 0xd5, 0xfa, 0x46, 0x29, 0xaa, -0x27, 0x34, 0x98, 0x36, 0xcc, 0x72, 0xa6, -0xe2, 0x1c, 0x86, 0x7a, 0x94, 0xa4, 0x50, -0xd8, 0x23, 0x3, 0x33, 0x7b, 0x14, 0xe, -0xa2, 0x16, 0x77, 0x4d, 0x8b, 0x7c, 0x3c, -0xda, 0xe2 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha384_sigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha384_sigrl.inc deleted file mode 100644 index c3e1b0a84e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha384_sigrl.inc +++ /dev/null @@ -1,1222 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: grp01 - * Signer: member0 - * HashAlg: Sha384 - * Message: "test message" - * Basename: None (random base) - * SigRl: SigRl of group - */ -0x36, 0x19, 0x27, 0x2c, 0xcf, 0xa0, 0x7a, -0x44, 0x9c, 0xea, 0xe5, 0x77, 0x7e, 0x7d, -0x12, 0x33, 0xd9, 0x21, 0x41, 0x58, 0x9b, -0xaf, 0xcc, 0xa2, 0x2e, 0xe1, 0xe1, 0x27, -0x70, 0xe6, 0x2f, 0x8e, 0x70, 0x9d, 0x7c, -0x2b, 0x65, 0xf0, 0xd6, 0xe3, 0x89, 0x5b, -0x8a, 0x82, 0x68, 0x2a, 0x2f, 0x44, 0xbb, -0xba, 0xbe, 0xbf, 0xed, 0x94, 0x87, 0x5b, -0xf4, 0x2a, 0xde, 0xb2, 0xe6, 0xee, 0x57, -0x17, 0x71, 0xec, 0xf4, 0x3d, 0x7c, 0x44, -0x2d, 0x77, 0x42, 0xc6, 0x22, 0x88, 0xc4, -0x80, 0xe3, 0x99, 0x79, 0x7d, 0xe8, 0xf0, -0xaf, 0x37, 0x67, 0x66, 0xe8, 0xa8, 0x63, -0xd7, 0x88, 0xd6, 0xf7, 0x2e, 0x2b, 0x98, -0xcc, 0x0a, 0x96, 0xef, 0x72, 0xfe, 0x47, -0xf7, 0x46, 0x4c, 0x0b, 0x79, 0x94, 0x8c, -0x6a, 0x1f, 0x09, 0x30, 0x31, 0x29, 0xd2, -0x86, 0xed, 0x93, 0xd9, 0xed, 0x9e, 0x88, -0xd2, 0x9b, 0x44, 0x15, 0x36, 0x91, 0x33, -0x62, 0x44, 0xcf, 0xab, 0x0d, 0xf0, 0x24, -0x86, 0x3f, 0x10, 0x74, 0x42, 0x37, 0xbb, -0x1a, 0x67, 0xf4, 0x16, 0x61, 0xc7, 0x5e, -0x30, 0x18, 0x86, 0x28, 0xa2, 0x3a, 0x68, -0xe2, 0xec, 0x6e, 0xa4, 0x5f, 0x1e, 0x81, -0xf1, 0x09, 0xcc, 0x8c, 0xde, 0xe5, 0x3f, -0xc3, 0x6e, 0xfe, 0x19, 0x4f, 0x51, 0xa6, -0x66, 0x69, 0xf2, 0x38, 0xac, 0xad, 0xd9, -0xe8, 0xe2, 0x81, 0xdd, 0x0c, 0x74, 0x9a, -0x76, 0x49, 0x7e, 0x33, 0x7a, 0xa8, 0x15, -0xc0, 0x49, 0xee, 0xd5, 0xff, 0x6f, 0x53, -0x27, 0x69, 0xcc, 0xb6, 0x4b, 0x55, 0xf7, -0x64, 0xa1, 0x08, 0x46, 0x09, 0xb9, 0x18, -0x0e, 0x97, 0x87, 0x2a, 0x41, 0x48, 0x5d, -0x45, 0x3b, 0xea, 0xc5, 0x15, 0x7a, 0xe2, -0x91, 0xee, 0x35, 0xea, 0x34, 0xd4, 0x89, -0x96, 0xf1, 0x74, 0x63, 0x06, 0xc7, 0x43, -0x69, 0xc6, 0x9a, 0x75, 0x30, 0x45, 0x87, -0x8a, 0x3b, 0x64, 0x60, 0xa0, 0xfb, 0x73, -0xc3, 0x77, 0xde, 0x9d, 0xfb, 0x2d, 0x1a, -0x03, 0xc2, 0xc6, 0x2d, 0x72, 0x31, 0x93, -0xd9, 0xb1, 0x26, 0xd3, 0xb7, 0x51, 0xcb, -0x4c, 0x95, 0x42, 0x55, 0xfc, 0x30, 0xa4, -0x13, 0x4b, 0x2b, 0xe2, 0x99, 0x10, 0x3c, -0x5c, 0x4d, 0xf6, 0xe5, 0x1b, 0x7a, 0x5a, -0xbe, 0xb4, 0x23, 0x4b, 0x99, 0x3c, 0x93, -0x63, 0x38, 0x84, 0x2b, 0xfe, 0xc1, 0x01, -0xdd, 0x0b, 0xc7, 0x6f, 0x3c, 0x06, 0xbc, -0x6f, 0x17, 0xb4, 0x95, 0x9d, 0xd3, 0xd1, -0xfd, 0xea, 0xf3, 0x15, 0x47, 0xec, 0x07, -0xa1, 0x22, 0xd0, 0x2d, 0xe8, 0xb8, 0xfb, -0x33, 0x5e, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x32, 0x97, 0x36, 0xc2, 0x28, -0x13, 0xa6, 0xce, 0x2a, 0x82, 0xf5, 0x7e, -0xce, 0xdb, 0x7e, 0x95, 0x97, 0x71, 0xce, -0xf0, 0xa6, 0xbd, 0x9a, 0x09, 0x6c, 0x4b, -0x5c, 0x64, 0xbc, 0xb6, 0x56, 0xfb, 0x5c, -0xec, 0x0e, 0xc6, 0x33, 0x54, 0xa0, 0x4d, -0x21, 0xdf, 0x03, 0xc4, 0xc8, 0x6a, 0x28, -0xa3, 0xde, 0x94, 0x2c, 0x1b, 0x81, 0x47, -0x71, 0xe9, 0xe0, 0xe7, 0x2a, 0x2e, 0x37, -0x04, 0x0a, 0x86, 0x0f, 0x57, 0x49, 0xfc, -0x58, 0xc2, 0x79, 0xfa, 0x8f, 0x4a, 0xfa, -0x41, 0x7a, 0x8e, 0xb1, 0xe0, 0x57, 0x41, -0xe6, 0x7b, 0xad, 0xa9, 0x2f, 0x66, 0x89, -0x76, 0x88, 0x72, 0x5f, 0xd7, 0xf8, 0xc9, -0xdd, 0x64, 0x6d, 0x92, 0xe8, 0x5e, 0xce, -0x15, 0xb3, 0xa0, 0xf1, 0x2a, 0x24, 0xe0, -0x09, 0xf7, 0xb5, 0x77, 0x27, 0xff, 0x15, -0xd3, 0xaf, 0x33, 0x45, 0xe0, 0x33, 0x15, -0xef, 0xb7, 0x38, 0x23, 0xf2, 0x20, 0x1d, -0xd6, 0xc1, 0x6a, 0x37, 0x1d, 0xda, 0xfb, -0xf4, 0xa7, 0x29, 0x60, 0xf7, 0x45, 0x50, -0x0a, 0x9f, 0xcb, 0xa7, 0xc4, 0x17, 0x8d, -0x7d, 0x91, 0x3f, 0xb8, 0xa9, 0xcb, 0x0f, -0x89, 0x16, 0x2a, 0x1d, 0xc6, 0xef, 0xc7, -0x53, 0xe6, 0x53, 0xbf, 0x7c, 0x3d, 0xed, -0x79, 0x88, 0xd6, 0xbb, 0xf8, 0x2d, 0xeb, -0x1a, 0x87, 0xd4, 0xee, 0xc4, 0x30, 0xbd, -0xa0, 0x36, 0x98, 0xe5, 0x0a, 0xa5, 0x04, -0xb5, 0xaa, 0x25, 0x00, 0xc8, 0x0b, 0xee, -0x66, 0xe8, 0xc4, 0x6e, 0x9f, 0xb9, 0xea, -0x29, 0xdb, 0xb2, 0x70, 0xfc, 0x75, 0xc8, -0xef, 0x52, 0xd7, 0x4b, 0xa0, 0x15, 0x9c, -0xf0, 0x4a, 0xc5, 0xbe, 0xe0, 0xbd, 0x4f, -0xe7, 0x07, 0x61, 0x69, 0xa4, 0xd8, 0xf0, -0x6a, 0x2e, 0x8e, 0x7f, 0xf2, 0x1f, 0x98, -0x77, 0x9f, 0x19, 0xed, 0x1b, 0x39, 0x5a, -0xa1, 0xec, 0x26, 0xcd, 0xae, 0xe9, 0x13, -0xd5, 0x33, 0x86, 0xc7, 0x68, 0xc7, 0x18, -0xcf, 0xb0, 0x58, 0x11, 0x08, 0xe1, 0xe3, -0x79, 0x91, 0x29, 0x60, 0xc6, 0x3a, 0x31, -0x20, 0xc5, 0x82, 0xbb, 0x63, 0x7f, 0x57, -0x31, 0xef, 0x91, 0xf5, 0xe7, 0x68, 0x19, -0x29, 0x99, 0x01, 0x22, 0x53, 0x86, 0x41, -0x34, 0xf9, 0xb6, 0x46, 0x03, 0x78, 0xfb, -0xf3, 0x67, 0x33, 0x8a, 0x18, 0x7e, 0x0e, -0x18, 0x6e, 0xa0, 0x93, 0xfe, 0x3c, 0xa8, -0x47, 0xb0, 0xe9, 0xee, 0x27, 0x4f, 0x25, -0x29, 0x0f, 0x96, 0xa0, 0x26, 0xe7, 0xa6, -0xd6, 0xf2, 0x03, 0x85, 0x3b, 0x2e, 0xc6, -0x78, 0xe7, 0x77, 0x8d, 0x4f, 0xba, 0x03, -0x55, 0xeb, 0xdb, 0xac, 0x3d, 0x77, 0xdf, -0xdc, 0x27, 0xad, 0x71, 0x6c, 0xb9, 0xee, -0x87, 0xc8, 0x51, 0x3f, 0xe5, 0xe1, 0xa0, -0x3d, 0x42, 0xc9, 0xf2, 0x87, 0x7b, 0x0b, -0xe3, 0x68, 0xbc, 0xbc, 0xea, 0x79, 0xd2, -0x99, 0x0a, 0x9c, 0x29, 0x38, 0xb9, 0x96, -0x3a, 0xaa, 0xd5, 0x0f, 0xdf, 0xf8, 0xb7, -0x3b, 0xab, 0x35, 0x51, 0xbf, 0xa4, 0x60, -0xd2, 0xc8, 0xeb, 0x22, 0x9d, 0xc6, 0x51, -0x85, 0xc9, 0xc1, 0xd7, 0xe3, 0xd5, 0xa4, -0x2b, 0x76, 0x6f, 0xd1, 0x2a, 0x9a, 0xd3, -0x73, 0xca, 0xe7, 0x48, 0xc4, 0xa4, 0xa6, -0x11, 0xa9, 0x91, 0x03, 0xb8, 0xaa, 0xaf, -0xb0, 0xf7, 0x51, 0x7b, 0x4b, 0xed, 0x49, -0x65, 0x39, 0x76, 0xf4, 0x60, 0xbf, 0x01, -0x2f, 0xeb, 0x80, 0x9b, 0x4e, 0x51, 0xf2, -0x7d, 0xd4, 0x99, 0xab, 0x78, 0x49, 0x43, -0x05, 0x88, 0x8d, 0xee, 0xcc, 0x39, 0x32, -0xf8, 0xc2, 0x51, 0x7e, 0xd3, 0x58, 0x26, -0x01, 0xb2, 0x41, 0xc1, 0x9e, 0x38, 0x7e, -0xab, 0x05, 0x48, 0xbe, 0x95, 0x09, 0x9f, -0x02, 0x01, 0x15, 0xa6, 0x3d, 0xfa, 0xa7, -0xf9, 0xac, 0xe4, 0xc0, 0xb1, 0x22, 0x82, -0xfc, 0x37, 0x9b, 0xbd, 0xdb, 0xec, 0x23, -0x3e, 0xec, 0xd8, 0x64, 0x35, 0xe9, 0x81, -0xab, 0x15, 0x54, 0x28, 0x65, 0xf3, 0x2b, -0xe1, 0x3e, 0x9e, 0x6c, 0x45, 0x43, 0xdf, -0x76, 0x00, 0x37, 0xf4, 0x52, 0x8b, 0x68, -0xce, 0xb4, 0xe6, 0x24, 0x0f, 0x39, 0x03, -0x8a, 0x75, 0x78, 0x62, 0x68, 0xa6, 0x4d, -0x37, 0x32, 0x8e, 0xf6, 0x8c, 0x3e, 0xa3, -0xc8, 0xb2, 0xbf, 0x43, 0x03, 0x29, 0x2c, -0x1c, 0xa4, 0xde, 0x60, 0x54, 0xaa, 0x0e, -0x7a, 0xe2, 0x4e, 0xf0, 0x8f, 0x46, 0x95, -0xdf, 0x00, 0xbc, 0x53, 0xf2, 0x64, 0x96, -0xa2, 0x20, 0x7e, 0x45, 0xfa, 0x81, 0xa9, -0x93, 0x3a, 0x69, 0xa8, 0x5a, 0x17, 0xd8, -0xf0, 0x49, 0x3d, 0x1d, 0x82, 0x88, 0x5f, -0x37, 0x83, 0x7b, 0x08, 0xa9, 0x22, 0xc3, -0xa4, 0x2f, 0x2c, 0x21, 0x9f, 0x01, 0x9c, -0x61, 0xc4, 0x6a, 0x3a, 0x45, 0x59, 0xc0, -0x0e, 0x8b, 0x5d, 0xf8, 0xc6, 0xbf, 0x30, -0xc3, 0xec, 0xa0, 0xff, 0xdb, 0xda, 0xd3, -0x3e, 0x7d, 0x72, 0x04, 0x8f, 0x68, 0x76, -0xe6, 0x30, 0xb2, 0x13, 0xde, 0x8c, 0xe9, -0x07, 0xc2, 0xbf, 0x3a, 0x78, 0xf0, 0xf0, -0xd4, 0xc1, 0xdb, 0x64, 0x69, 0x26, 0x5d, -0x4f, 0xac, 0x98, 0x66, 0x4d, 0x20, 0x0d, -0xc0, 0x9c, 0x56, 0x94, 0xd8, 0xe2, 0x84, -0xa9, 0x32, 0x4c, 0x10, 0x47, 0x68, 0x2b, -0x33, 0x8c, 0x16, 0xb0, 0xf9, 0x35, 0x36, -0x2f, 0xcd, 0x3b, 0xbd, 0x31, 0x03, 0x70, -0xcf, 0x5b, 0x4c, 0x50, 0xdf, 0xd7, 0x54, -0xc0, 0x2f, 0x85, 0x7f, 0xee, 0xd1, 0x9a, -0xde, 0xfe, 0x9f, 0x3d, 0xce, 0x08, 0xc4, -0xd0, 0x8d, 0x96, 0x0f, 0x30, 0xdd, 0x60, -0x4f, 0x37, 0xf8, 0xf1, 0x10, 0x5e, 0x10, -0x3f, 0xfc, 0xbb, 0x6b, 0x7b, 0x7d, 0x9c, -0xe3, 0xf0, 0x27, 0xab, 0xa6, 0x9a, 0x70, -0xae, 0x18, 0xa0, 0x9a, 0xa7, 0x48, 0xb2, -0xf8, 0x28, 0xe3, 0x20, 0x76, 0x67, 0xaf, -0x3f, 0xb2, 0x5e, 0x59, 0x4c, 0x84, 0x9c, -0xc7, 0x6e, 0x41, 0x30, 0xbf, 0xfe, 0x9b, -0xb8, 0x9b, 0xab, 0x40, 0x09, 0xfd, 0x02, -0x99, 0x79, 0x9f, 0x39, 0xb4, 0x40, 0x73, -0xb3, 0x3e, 0xa0, 0x5e, 0xa0, 0x5c, 0x74, -0x5d, 0x21, 0xfc, 0x00, 0x57, 0xbf, 0x23, -0xda, 0xae, 0x49, 0xac, 0x6a, 0x10, 0xe6, -0x1e, 0x1b, 0x19, 0xe6, 0xce, 0x41, 0x6c, -0x3c, 0xe7, 0x45, 0x3c, 0xcb, 0x75, 0xa9, -0xd7, 0x60, 0x0d, 0x43, 0x69, 0x1e, 0xc2, -0x47, 0xea, 0x07, 0x46, 0x2c, 0x58, 0x25, -0x1e, 0x10, 0xe9, 0xc8, 0x8a, 0x14, 0x85, -0x6f, 0x49, 0x37, 0xd7, 0xfb, 0x07, 0xbb, -0xfa, 0xc2, 0x4e, 0x9d, 0xaf, 0x4c, 0xe6, -0xb8, 0xad, 0x1b, 0x70, 0x8c, 0x74, 0xda, -0xb4, 0x38, 0x57, 0xa7, 0x42, 0x4e, 0xe2, -0x84, 0xfb, 0x97, 0x4e, 0x46, 0x2c, 0xad, -0x37, 0xc0, 0x10, 0x62, 0x6c, 0x07, 0xea, -0x06, 0xc4, 0x5a, 0x29, 0xfb, 0x4c, 0x0f, -0xc6, 0x9e, 0x5f, 0xcd, 0xd6, 0x33, 0xc6, -0x1b, 0x92, 0x76, 0x99, 0xa3, 0xe7, 0x13, -0x92, 0x0b, 0x27, 0x3b, 0x75, 0xb2, 0x3f, -0x9c, 0x6b, 0x4e, 0x96, 0x9f, 0xfc, 0xed, -0x36, 0xb7, 0x69, 0x3d, 0xe2, 0x64, 0xa9, -0xb8, 0xdf, 0x46, 0x67, 0x6e, 0xc2, 0x2f, -0x5e, 0xf9, 0x24, 0x2b, 0xea, 0x6c, 0xde, -0x00, 0x14, 0x4a, 0xe0, 0x8e, 0x43, 0x0b, -0x2b, 0xcb, 0xf4, 0x93, 0x76, 0x97, 0x74, -0x61, 0xaf, 0x2e, 0x7d, 0xfe, 0x11, 0x74, -0x03, 0x8f, 0x38, 0x32, 0x7c, 0x1f, 0xf6, -0x46, 0x68, 0xac, 0x29, 0x48, 0x3e, 0x63, -0xac, 0x64, 0x10, 0x97, 0x1a, 0x22, 0x67, -0x09, 0x51, 0x0c, 0x46, 0x7e, 0xab, 0x21, -0x72, 0xbf, 0x12, 0x69, 0x99, 0x7c, 0xef, -0x07, 0x39, 0x33, 0x63, 0xf8, 0x16, 0x70, -0xe8, 0x25, 0x62, 0x90, 0xa4, 0xa4, 0x37, -0x0e, 0xcc, 0x8b, 0xc4, 0x6b, 0x77, 0x3f, -0xbd, 0xe7, 0xe8, 0xaa, 0xf1, 0x2c, 0x70, -0x00, 0xb3, 0x13, 0x91, 0xa9, 0x01, 0x2e, -0x8b, 0xc4, 0xf7, 0x4b, 0xe9, 0xc8, 0x6c, -0x3f, 0xfe, 0x3d, 0x99, 0x71, 0x95, 0x04, -0x01, 0x58, 0x62, 0x43, 0x2b, 0x38, 0xdc, -0x11, 0x03, 0x08, 0x98, 0x14, 0x7e, 0x71, -0xf4, 0xa6, 0x3d, 0xac, 0x02, 0x05, 0x97, -0xfe, 0xf0, 0x54, 0xd8, 0x4c, 0xd3, 0x11, -0xbc, 0x9f, 0x6a, 0x4b, 0x40, 0xd0, 0x5c, -0x53, 0xd5, 0x5c, 0x8d, 0xfa, 0x90, 0x95, -0x73, 0x7e, 0xb6, 0xba, 0x4d, 0x08, 0xf5, -0xb7, 0x46, 0x89, 0xf6, 0x9d, 0x82, 0x72, -0xce, 0x0d, 0xfc, 0x0e, 0x01, 0x07, 0x5a, -0xd8, 0xee, 0x8d, 0x20, 0x09, 0xfe, 0x2b, -0x08, 0x63, 0x62, 0xc6, 0xdb, 0x1d, 0xac, -0x9b, 0xbc, 0x97, 0x15, 0xba, 0x45, 0x1f, -0x05, 0x1a, 0xe4, 0xbb, 0x1a, 0xeb, 0x2a, -0xc6, 0x3a, 0xd5, 0xdc, 0x14, 0x90, 0x90, -0x29, 0x8d, 0xe1, 0x2b, 0x37, 0x50, 0x63, -0x1f, 0xcc, 0x73, 0xbe, 0x46, 0x69, 0xeb, -0x67, 0x75, 0xd6, 0x18, 0xc7, 0xde, 0x39, -0xd3, 0x26, 0x1f, 0xd3, 0xca, 0x39, 0x5f, -0x93, 0xf2, 0x5d, 0x94, 0x69, 0x3b, 0xbc, -0x68, 0x2e, 0x02, 0x6c, 0x07, 0x7d, 0xa9, -0x2a, 0xc7, 0xf7, 0xf9, 0x5c, 0xfd, 0x05, -0xb5, 0x5b, 0x5c, 0x07, 0xab, 0x26, 0xf5, -0xd5, 0xbd, 0x34, 0xdc, 0xf7, 0x73, 0x6e, -0x07, 0xc4, 0xca, 0x72, 0xe9, 0x82, 0x3f, -0x6f, 0x79, 0xff, 0xd7, 0xb6, 0xbe, 0x7a, -0xf7, 0xab, 0x49, 0x8c, 0xd5, 0xa2, 0x34, -0xb8, 0x9b, 0xe7, 0xca, 0x1f, 0x6e, 0x29, -0x08, 0x7e, 0xd9, 0x44, 0x7f, 0xda, 0x23, -0x0e, 0x99, 0xf7, 0xd0, 0x2f, 0x12, 0x68, -0xac, 0xbc, 0x41, 0xe0, 0x40, 0x5a, 0x3b, -0xee, 0x85, 0xb2, 0x49, 0x67, 0xd3, 0xee, -0xe2, 0x24, 0x5f, 0xb8, 0x89, 0x45, 0xad, -0xeb, 0x92, 0xf1, 0x86, 0x43, 0x15, 0x7e, -0x21, 0xbc, 0x06, 0xba, 0xe3, 0x78, 0xf8, -0x85, 0xc0, 0x90, 0x71, 0x16, 0xdb, 0x6f, -0x21, 0x0b, 0xd4, 0x69, 0x34, 0x35, 0x4e, -0x1c, 0xc1, 0x83, 0x2b, 0x4e, 0x2f, 0x2f, -0xb4, 0xf5, 0x2b, 0x94, 0x91, 0xdf, 0x97, -0x65, 0xd0, 0x79, 0x74, 0xd7, 0x61, 0x12, -0x3e, 0xf8, 0xaa, 0xfe, 0x74, 0x54, 0x09, -0x38, 0x0c, 0xdf, 0x0f, 0x2c, 0x21, 0xb7, -0x75, 0xf7, 0xb7, 0x39, 0x48, 0xdb, 0xbe, -0xee, 0x88, 0x61, 0xb9, 0x46, 0x2a, 0x5e, -0x34, 0xf9, 0x27, 0x9b, 0xeb, 0x9a, 0x68, -0xba, 0xc6, 0x9f, 0x5d, 0xc7, 0xf3, 0x02, -0x93, 0x9a, 0xf5, 0x2f, 0xa8, 0xe0, 0xac, -0x9d, 0xb8, 0x2d, 0x2e, 0xd2, 0x2e, 0x19, -0x40, 0x31, 0xa2, 0xe9, 0x40, 0x8d, 0xb5, -0x0c, 0xda, 0x09, 0xe2, 0x70, 0x5a, 0x57, -0x78, 0x50, 0x26, 0xfe, 0xa1, 0x75, 0x37, -0x74, 0xa3, 0x19, 0xd9, 0xf3, 0x9b, 0xf5, -0x66, 0x12, 0x1e, 0xb9, 0x1a, 0x25, 0xad, -0x94, 0x64, 0x5e, 0x82, 0x93, 0xc6, 0x66, -0xd6, 0xeb, 0x48, 0xff, 0x8f, 0x7d, 0xa1, -0x9d, 0x24, 0xd2, 0xf5, 0x84, 0xf9, 0x1b, -0xa5, 0xaa, 0xed, 0xec, 0xb5, 0xc4, 0x9e, -0xaf, 0xda, 0x54, 0x5d, 0x32, 0xfd, 0xe1, -0x4f, 0x77, 0xa9, 0xdb, 0x77, 0x50, 0x54, -0x75, 0xcd, 0x4e, 0x9a, 0xd9, 0x87, 0x25, -0xae, 0x5a, 0x73, 0x36, 0x5d, 0x80, 0xa8, -0x70, 0x76, 0x8a, 0xc5, 0x42, 0xb2, 0xc1, -0xed, 0x8e, 0x3b, 0xf8, 0x1c, 0xbf, 0x99, -0x8a, 0x9b, 0x5d, 0x83, 0xf8, 0x55, 0x91, -0xd9, 0xd9, 0xc0, 0xa8, 0xfc, 0x42, 0xdb, -0xd8, 0x42, 0xcf, 0x65, 0x45, 0x14, 0xac, -0x06, 0x65, 0x93, 0x74, 0x3c, 0xa0, 0x61, -0x24, 0xb1, 0x17, 0x4c, 0xab, 0xb4, 0x67, -0xd5, 0xbc, 0x0a, 0x2d, 0x42, 0xea, 0x87, -0xad, 0x56, 0xb4, 0xf7, 0xb0, 0xed, 0x44, -0xff, 0xe6, 0x10, 0xec, 0x19, 0x22, 0xb6, -0xfc, 0x1f, 0xc4, 0x3c, 0x6c, 0x43, 0x7f, -0x0a, 0xb6, 0x9c, 0xed, 0x3d, 0x66, 0xd3, -0x43, 0xc8, 0xe5, 0x33, 0x13, 0x1d, 0xd1, -0xaa, 0x0b, 0xa6, 0x59, 0xed, 0x60, 0xb2, -0xa8, 0x5e, 0xee, 0x00, 0x2f, 0x73, 0xf3, -0xa3, 0xdc, 0x8d, 0x9a, 0xb6, 0xa3, 0x6f, -0x9a, 0x20, 0x9f, 0xfe, 0xb9, 0xb8, 0xe8, -0x49, 0x22, 0x93, 0xe2, 0xc0, 0xf1, 0x66, -0xe0, 0xbe, 0x32, 0x94, 0x13, 0x4b, 0x4a, -0x70, 0xa0, 0xfe, 0xfb, 0xa3, 0xe7, 0x99, -0xd0, 0x9d, 0xc1, 0x89, 0x91, 0xe4, 0x78, -0xc3, 0xf0, 0xb2, 0xae, 0x27, 0x71, 0xc8, -0x87, 0x1d, 0xaa, 0x40, 0x44, 0x23, 0x68, -0x9f, 0x51, 0xd5, 0x8b, 0x88, 0xf3, 0x29, -0x2f, 0xf5, 0xdf, 0x31, 0xa5, 0xcd, 0x8e, -0xc2, 0x16, 0x2f, 0x0f, 0x69, 0x45, 0xb8, -0x9b, 0x23, 0xda, 0x29, 0xa6, 0x3c, 0xb8, -0xc4, 0x81, 0x5c, 0x25, 0x1e, 0x88, 0x7e, -0x30, 0x47, 0xe4, 0x4b, 0xea, 0x6a, 0xb2, -0xe7, 0x78, 0x21, 0xe0, 0xec, 0x4f, 0x36, -0xad, 0x1a, 0xe1, 0x1c, 0x9c, 0x83, 0xfb, -0x51, 0xb1, 0x0b, 0x92, 0x1d, 0x04, 0xb2, -0xe3, 0xf8, 0xf9, 0xb0, 0x67, 0x7a, 0x55, -0x11, 0xb9, 0x24, 0xc5, 0x8d, 0x25, 0x74, -0x49, 0x47, 0xb8, 0x6b, 0xc2, 0xe3, 0x84, -0xef, 0x3a, 0x32, 0x46, 0x60, 0x1f, 0x5e, -0xa4, 0x5f, 0x9e, 0x20, 0x3a, 0x6e, 0xc5, -0x7e, 0x4b, 0xa5, 0x05, 0x46, 0xa4, 0x15, -0xdd, 0x60, 0x3c, 0xda, 0xd9, 0x52, 0x20, -0x59, 0xa3, 0x12, 0x6d, 0x03, 0xda, 0x88, -0x60, 0xd6, 0xeb, 0x6b, 0x2a, 0x38, 0x35, -0xe6, 0x4a, 0xbf, 0x57, 0xe9, 0x1d, 0x50, -0x40, 0xd9, 0x74, 0xe9, 0xc5, 0x03, 0x2a, -0xde, 0x1e, 0x95, 0xc7, 0xd4, 0xd2, 0x58, -0x70, 0xdb, 0x20, 0xaa, 0x46, 0x94, 0x55, -0xd8, 0x19, 0xc7, 0xe6, 0xd4, 0x9b, 0x25, -0x4f, 0x5d, 0xf9, 0x57, 0x9d, 0xb3, 0x21, -0x31, 0x95, 0x7c, 0xb6, 0xcb, 0x67, 0x4d, -0x2f, 0xd7, 0xa7, 0xdd, 0xe5, 0x08, 0xf7, -0x2e, 0xab, 0x37, 0xee, 0xb0, 0x78, 0x51, -0x9b, 0xfd, 0xda, 0x9f, 0xe2, 0x8f, 0xc0, -0x7d, 0xfd, 0x72, 0xd6, 0xa1, 0x5f, 0x05, -0x73, 0x9b, 0x8d, 0xbf, 0xb1, 0x21, 0xd1, -0x6f, 0x9b, 0x6d, 0x40, 0x68, 0x0e, 0x68, -0x5c, 0x56, 0xfe, 0xae, 0xf1, 0xa6, 0x19, -0x18, 0x16, 0xb9, 0xa5, 0xc3, 0x3b, 0x2c, -0xcc, 0x15, 0x6d, 0xad, 0x01, 0xc3, 0x9c, -0xcd, 0xce, 0xd2, 0xdb, 0x17, 0x07, 0x54, -0x44, 0x2b, 0xa5, 0xaf, 0xe7, 0x65, 0xe8, -0x2e, 0x71, 0xf3, 0xe3, 0x0d, 0xb1, 0xe4, -0x07, 0x57, 0xb9, 0x83, 0x9f, 0xae, 0x98, -0x1f, 0xc0, 0x1a, 0xc9, 0x94, 0x22, 0xe1, -0x4c, 0xad, 0x1e, 0xc8, 0x6b, 0x34, 0x9a, -0x0a, 0xeb, 0xd4, 0x83, 0x0e, 0xb1, 0x34, -0x56, 0xdb, 0x9a, 0xca, 0xbb, 0x0d, 0x34, -0x9c, 0x38, 0x74, 0x6b, 0xee, 0x67, 0x65, -0xb4, 0xee, 0xb3, 0x65, 0xc4, 0x22, 0xeb, -0x4b, 0x7d, 0x67, 0xe5, 0x83, 0x8d, 0xf4, -0x92, 0x02, 0x88, 0xad, 0x85, 0xe7, 0xbd, -0xfd, 0x9f, 0xd8, 0x55, 0x86, 0x8e, 0x0d, -0x1a, 0xff, 0x1a, 0x0a, 0x5d, 0xf9, 0x0a, -0xc3, 0xa3, 0x66, 0x35, 0xab, 0x09, 0x3c, -0xfc, 0x3e, 0x81, 0xe7, 0xd2, 0xa2, 0x7c, -0xf2, 0xb3, 0x0a, 0x18, 0x1b, 0xcb, 0xfa, -0x3f, 0x6c, 0x2a, 0x9c, 0x56, 0x54, 0x6c, -0xf6, 0xf6, 0xb8, 0xae, 0x63, 0xd0, 0x3b, -0x03, 0xad, 0xc2, 0xb5, 0xe3, 0x17, 0x7e, -0x60, 0x04, 0x76, 0x12, 0x2b, 0x86, 0x6a, -0x9e, 0x7d, 0xa4, 0x92, 0x14, 0x61, 0x47, -0x76, 0xb4, 0x8c, 0x27, 0x4e, 0x4b, 0xc6, -0x52, 0x63, 0x8f, 0xa0, 0x17, 0xf6, 0x32, -0x2c, 0x91, 0x5c, 0x14, 0x20, 0xb5, 0xf7, -0x5a, 0xf2, 0x4e, 0xcf, 0xd3, 0x7b, 0x04, -0xe6, 0xb9, 0xe5, 0x09, 0xa0, 0x53, 0xfd, -0x60, 0x0c, 0x83, 0xb2, 0xb9, 0xcb, 0xd2, -0xfb, 0xc3, 0x16, 0x48, 0x8d, 0xcf, 0xec, -0xd8, 0xf2, 0x68, 0x46, 0x8f, 0x5a, 0x26, -0x1c, 0x4e, 0x31, 0x7e, 0x65, 0x4b, 0xc7, -0xd6, 0x4e, 0x9d, 0xe4, 0x06, 0x98, 0x1e, -0xef, 0x79, 0x41, 0xfe, 0x9d, 0xe1, 0x68, -0xbf, 0x45, 0x17, 0xb7, 0x34, 0x90, 0x7c, -0xa6, 0xf2, 0xe7, 0xa7, 0x59, 0xc0, 0x12, -0xb0, 0xce, 0x62, 0x1c, 0x22, 0x31, 0x52, -0x8d, 0x3f, 0x55, 0x41, 0x92, 0x0a, 0xa5, -0x1e, 0x1d, 0x3c, 0x84, 0xd2, 0x51, 0xe7, -0x6b, 0x4a, 0xb5, 0x10, 0x01, 0xec, 0x76, -0x5b, 0xda, 0x57, 0xe4, 0x11, 0xcd, 0x6f, -0x40, 0x3e, 0xe6, 0x48, 0x22, 0x86, 0xd6, -0xb6, 0x7c, 0x43, 0x84, 0x82, 0x70, 0x3e, -0x35, 0x24, 0xaf, 0x79, 0x55, 0xe5, 0x36, -0xcf, 0x3e, 0x02, 0xcf, 0x25, 0x02, 0xb6, -0xd4, 0xc3, 0x17, 0x68, 0xba, 0x60, 0x94, -0xf4, 0x3d, 0x7a, 0x0b, 0x48, 0xc1, 0xc6, -0xd6, 0xf3, 0x1a, 0x08, 0x05, 0x20, 0x3e, -0x88, 0x59, 0x83, 0x75, 0xa9, 0x1f, 0xd3, -0x79, 0x81, 0x81, 0xac, 0xb3, 0x94, 0xd1, -0x67, 0x5b, 0x6e, 0xcd, 0x04, 0x79, 0x91, -0x8e, 0x6e, 0xa5, 0x2a, 0x06, 0x9d, 0x49, -0x7c, 0x58, 0x91, 0xcf, 0xae, 0x88, 0xc0, -0xc9, 0x19, 0xb4, 0xcc, 0x4e, 0x6e, 0x06, -0x50, 0xf6, 0x3c, 0x3e, 0xc7, 0x48, 0xb1, -0x9e, 0x32, 0xe3, 0x54, 0x05, 0xac, 0x41, -0xd8, 0x31, 0xb6, 0xb3, 0x6e, 0xf1, 0x4d, -0xfe, 0xd4, 0x38, 0x2e, 0xff, 0x2f, 0x3a, -0x61, 0xa3, 0xe7, 0x77, 0x99, 0xcb, 0x27, -0xb8, 0x26, 0xab, 0xc4, 0x10, 0xe3, 0xdf, -0x93, 0x05, 0x2b, 0x95, 0x7e, 0xca, 0x2e, -0x6c, 0xe2, 0x9b, 0x29, 0x67, 0xfd, 0x73, -0x91, 0x61, 0x2b, 0xa4, 0x5d, 0xea, 0x95, -0xe2, 0x63, 0xae, 0xe8, 0x43, 0x98, 0x2e, -0x15, 0x09, 0xf4, 0x98, 0x5d, 0x9c, 0x98, -0x4f, 0x74, 0x63, 0x9d, 0x5d, 0x93, 0xda, -0x26, 0x36, 0xb7, 0xb0, 0xf9, 0xe5, 0x04, -0x9c, 0xeb, 0xaf, 0x94, 0x72, 0xa1, 0xf5, -0xf1, 0x7f, 0xa1, 0xeb, 0x32, 0x0a, 0x9a, -0x90, 0xc5, 0xbb, 0xb8, 0x55, 0x05, 0x91, -0xe0, 0x0c, 0xd6, 0x1e, 0x8f, 0xfd, 0xd8, -0xe7, 0xf5, 0xb4, 0x2f, 0xf3, 0xa4, 0xe1, -0x1b, 0x95, 0x30, 0xcf, 0x1f, 0x72, 0xfc, -0xbb, 0x6d, 0x4d, 0x06, 0x80, 0x68, 0xe0, -0x98, 0x77, 0x97, 0x66, 0x2c, 0x48, 0x3b, -0xa6, 0xb9, 0x1d, 0x76, 0x02, 0x6c, 0x7a, -0x9e, 0x3e, 0xf9, 0x2f, 0x4b, 0x1a, 0xae, -0x34, 0x03, 0x39, 0xe2, 0x7f, 0x1e, 0x5a, -0x29, 0x8d, 0x45, 0xac, 0x2e, 0x85, 0x91, -0xd0, 0x37, 0xcf, 0xe0, 0x84, 0x02, 0x13, -0x13, 0x69, 0xd7, 0x8a, 0xc6, 0xbc, 0x07, -0xb4, 0x1c, 0xa0, 0xa7, 0x18, 0x73, 0x26, -0x8d, 0xad, 0xae, 0x67, 0xc3, 0x83, 0x88, -0x46, 0x52, 0x90, 0x23, 0x40, 0xd1, 0x04, -0x50, 0xbe, 0x57, 0x0c, 0x37, 0x13, 0x8f, -0x29, 0x8a, 0xcd, 0xc0, 0x67, 0xb7, 0x97, -0xfa, 0x41, 0xf5, 0x88, 0x2f, 0x63, 0x4a, -0x5b, 0xd2, 0x60, 0xc0, 0x76, 0xfa, 0xa8, -0xbb, 0xfc, 0x8a, 0xc1, 0x07, 0x2a, 0x31, -0x01, 0xf8, 0x31, 0x43, 0xdc, 0x13, 0x86, -0xb1, 0x46, 0x6d, 0xb8, 0xd5, 0xc7, 0x14, -0xa8, 0xab, 0x99, 0xd6, 0x54, 0x48, 0x9e, -0x60, 0xf9, 0xf5, 0x74, 0xd9, 0xa9, 0xcc, -0xbd, 0x1c, 0xa9, 0xce, 0xc2, 0xa6, 0x18, -0x21, 0xad, 0x44, 0x72, 0x71, 0x8d, 0xd7, -0x91, 0xcd, 0x4f, 0x9d, 0x98, 0x39, 0x2e, -0x62, 0xe2, 0xbf, 0x8b, 0xab, 0xb0, 0x8c, -0xda, 0xa7, 0x44, 0x45, 0xcf, 0xff, 0xfd, -0x0e, 0xee, 0xd7, 0xcb, 0xbb, 0x09, 0x6d, -0x86, 0xb2, 0x31, 0x54, 0xcd, 0xca, 0x49, -0x67, 0x5c, 0x7f, 0x49, 0x90, 0xf3, 0xb3, -0x95, 0x8d, 0x25, 0xed, 0x4e, 0x84, 0x28, -0xb3, 0xbf, 0x68, 0xc1, 0xc6, 0x32, 0xa0, -0x66, 0xb0, 0x07, 0x25, 0xc5, 0x26, 0xfb, -0x76, 0x9e, 0x73, 0xed, 0x63, 0x19, 0x2f, -0xb1, 0x3e, 0xb0, 0xc7, 0x8c, 0xd8, 0x7d, -0x60, 0xb5, 0x0a, 0x0c, 0x57, 0x0d, 0xac, -0xa5, 0xa3, 0xa4, 0x94, 0x4b, 0x07, 0x7d, -0xc3, 0x4e, 0x99, 0x32, 0x34, 0x95, 0x7b, -0x99, 0xea, 0x30, 0x93, 0x16, 0x81, 0x61, -0x86, 0x6b, 0xa7, 0x28, 0xd9, 0x62, 0xf0, -0x0e, 0x48, 0x5f, 0xad, 0x97, 0x1b, 0x8b, -0x14, 0x4e, 0x10, 0xa7, 0xac, 0xf7, 0xa1, -0x86, 0x43, 0x53, 0x73, 0x90, 0xc4, 0x4b, -0xb9, 0xcb, 0x56, 0x8a, 0x54, 0xd0, 0xbb, -0xa5, 0xcb, 0xbb, 0x7b, 0xb1, 0xb0, 0x22, -0x82, 0x58, 0x85, 0xdd, 0x80, 0x78, 0xfb, -0x2d, 0x67, 0x23, 0x38, 0xdb, 0x96, 0xe1, -0x98, 0xc6, 0x07, 0xed, 0xd0, 0x8a, 0xeb, -0x29, 0xda, 0xdd, 0xc9, 0x14, 0xea, 0xe9, -0xeb, 0x3b, 0x5e, 0xd1, 0x06, 0x80, 0xb8, -0x3e, 0x87, 0x49, 0x23, 0x5c, 0xcf, 0x47, -0x20, 0xd4, 0x84, 0x2c, 0xba, 0xc7, 0x4b, -0x0c, 0xf5, 0xfd, 0xa9, 0x36, 0xdd, 0x32, -0x97, 0x78, 0x6b, 0x52, 0x4a, 0xac, 0x73, -0xb6, 0x38, 0x58, 0x6c, 0xc4, 0x2c, 0xbe, -0x57, 0xbc, 0xd2, 0x29, 0xad, 0xb0, 0xfc, -0xd9, 0xcf, 0x0d, 0x4d, 0x8d, 0x85, 0x80, -0x50, 0x8e, 0x35, 0xf1, 0x9a, 0x9f, 0x19, -0x05, 0xb8, 0x65, 0x0f, 0x1b, 0xc5, 0xca, -0xb9, 0xbb, 0x66, 0xf9, 0x18, 0x6a, 0x2b, -0x45, 0x6f, 0x98, 0xe5, 0x09, 0xd4, 0x7b, -0x84, 0x50, 0x3d, 0x44, 0x58, 0xf7, 0xa7, -0xc8, 0xf3, 0xef, 0xa1, 0x5c, 0x0e, 0x9c, -0x7f, 0xbf, 0x6d, 0xfd, 0x54, 0xcc, 0xe0, -0xf8, 0xa9, 0x41, 0x85, 0x55, 0xfa, 0x0e, -0xa2, 0x89, 0xc8, 0xcf, 0xd8, 0x6e, 0x6b, -0x1d, 0x96, 0x9f, 0x48, 0xf9, 0xa2, 0x67, -0xff, 0xf0, 0x86, 0x3d, 0x03, 0xc5, 0x73, -0x5c, 0xeb, 0x9f, 0xe1, 0x1e, 0x5d, 0x06, -0x59, 0x2e, 0xfa, 0x69, 0x41, 0x6f, 0x8b, -0x5a, 0x51, 0x9a, 0x75, 0x0d, 0x6a, 0x94, -0x51, 0xac, 0xb9, 0xb4, 0x31, 0xe1, 0xea, -0x38, 0xe4, 0x91, 0x1a, 0x59, 0xb1, 0xd5, -0x94, 0x3a, 0x7a, 0x9f, 0x5d, 0xb6, 0xe0, -0x46, 0x33, 0x5c, 0x2d, 0xb4, 0x5e, 0x5d, -0xaf, 0x0a, 0x24, 0x0a, 0xae, 0x39, 0xe5, -0xef, 0xc4, 0xb1, 0x26, 0xad, 0x42, 0x1f, -0xc3, 0x12, 0x79, 0xb8, 0x60, 0xcc, 0x23, -0x28, 0x6d, 0x11, 0x41, 0x27, 0x08, 0x8f, -0xbd, 0x12, 0xbe, 0x71, 0x5f, 0x48, 0x99, -0x88, 0xa0, 0xa0, 0x34, 0xb5, 0x0e, 0x72, -0xe3, 0x99, 0x7d, 0x88, 0x14, 0x1c, 0x3e, -0x3d, 0x9b, 0x1e, 0xe0, 0x6b, 0x2b, 0xb6, -0xd6, 0x3d, 0xe3, 0x86, 0xdf, 0x31, 0x61, -0x5e, 0x4a, 0xba, 0xf6, 0x9d, 0xd4, 0xf9, -0x8c, 0xdf, 0x59, 0x8a, 0x47, 0x2d, 0x04, -0x95, 0x64, 0x2c, 0x0f, 0x9e, 0xcb, 0xf9, -0x08, 0x37, 0x47, 0x43, 0x23, 0xe5, 0x16, -0x5b, 0x73, 0xbe, 0xc1, 0x8f, 0x24, 0x59, -0x36, 0xa7, 0xa9, 0xa8, 0x63, 0xd5, 0x25, -0xfc, 0xf7, 0x64, 0x6a, 0x16, 0x2d, 0x03, -0xe3, 0x44, 0x2a, 0xc8, 0xa9, 0x0a, 0xe4, -0xb8, 0x11, 0xc0, 0xd8, 0x7f, 0x82, 0x96, -0x79, 0x79, 0x0c, 0xdb, 0xe0, 0x09, 0xfb, -0x0b, 0x84, 0x7a, 0x44, 0x91, 0x68, 0x15, -0xec, 0x7d, 0x20, 0x43, 0x87, 0xd8, 0x99, -0x4c, 0xda, 0xa5, 0xf1, 0xe1, 0xa8, 0xfb, -0x7e, 0x07, 0x2a, 0x98, 0x43, 0x87, 0x69, -0xa3, 0xb0, 0x68, 0xce, 0xdd, 0xad, 0xb0, -0x1f, 0x26, 0x1e, 0x60, 0x4f, 0x92, 0xc8, -0x74, 0xb3, 0xee, 0xee, 0x53, 0x73, 0x97, -0x03, 0xa0, 0x5a, 0x84, 0x9f, 0x9b, 0x79, -0x2b, 0x6b, 0xbb, 0xec, 0x95, 0xa6, 0x97, -0x01, 0x47, 0x45, 0xd7, 0x07, 0x77, 0x86, -0x19, 0x43, 0x8d, 0x9a, 0x44, 0x7c, 0xb5, -0xfc, 0xa3, 0x47, 0x2b, 0xaf, 0x60, 0x26, -0x6e, 0x7e, 0x85, 0xb6, 0x72, 0x26, 0xec, -0x11, 0xe4, 0xf9, 0x11, 0xea, 0x0f, 0xba, -0xe1, 0x17, 0x3c, 0xe6, 0x73, 0x4d, 0x03, -0x25, 0x1d, 0xcf, 0x45, 0x07, 0x78, 0x01, -0xfa, 0x31, 0x88, 0xc9, 0xe1, 0x23, 0x72, -0x0f, 0x29, 0x19, 0x54, 0xa9, 0x81, 0xaa, -0x0e, 0xa5, 0x76, 0x1a, 0xb9, 0x38, 0xbd, -0xae, 0x53, 0xf8, 0xa6, 0x53, 0x4b, 0xc9, -0xa8, 0x80, 0xeb, 0xbc, 0x24, 0xf6, 0xf3, -0xb9, 0x3d, 0x53, 0x53, 0xf0, 0x13, 0xfe, -0x3b, 0x5a, 0x60, 0xb9, 0x8a, 0x32, 0x7e, -0x7a, 0x6f, 0xd2, 0xe5, 0x1b, 0x23, 0x66, -0xb4, 0x3b, 0xc3, 0xf6, 0x1f, 0x62, 0xd5, -0xe4, 0x26, 0x62, 0x38, 0xc0, 0x7f, 0xce, -0xa4, 0x14, 0x11, 0xe9, 0xfa, 0x97, 0x64, -0x4e, 0x0f, 0x82, 0x6f, 0x82, 0x82, 0x2d, -0x2a, 0xd0, 0xc0, 0xd3, 0x66, 0x37, 0x87, -0x1b, 0x9d, 0xaf, 0x2c, 0xbd, 0xe3, 0xb2, -0x15, 0x36, 0x75, 0x65, 0x1c, 0x68, 0xbc, -0x4d, 0x64, 0xe6, 0x50, 0x82, 0x0a, 0x4f, -0x4b, 0x0d, 0x2c, 0x89, 0x63, 0x50, 0x18, -0x48, 0x3c, 0xcf, 0xa8, 0xa8, 0xd8, 0x03, -0xb8, 0xab, 0xed, 0x3a, 0x81, 0x1e, 0x90, -0x00, 0x37, 0xd6, 0x45, 0xb5, 0x3b, 0xaf, -0x3f, 0xa2, 0x65, 0xed, 0x94, 0xcf, 0x64, -0xb7, 0xa5, 0x8c, 0xc5, 0xed, 0x82, 0xac, -0x80, 0x08, 0x7e, 0xd2, 0x5b, 0x80, 0xfd, -0xf3, 0xc7, 0x7c, 0x1b, 0xb0, 0x94, 0xb3, -0xd4, 0x75, 0x3c, 0xf6, 0x66, 0x84, 0xb1, -0xc5, 0x3c, 0x16, 0x9c, 0x02, 0x65, 0xb6, -0x32, 0x7c, 0xd6, 0xbf, 0xf7, 0x38, 0xab, -0xc3, 0x66, 0xa3, 0x2f, 0x19, 0x00, 0x40, -0xd3, 0xd0, 0x97, 0xf2, 0x77, 0x09, 0x57, -0x68, 0xcf, 0xce, 0x25, 0x7e, 0x7c, 0xec, -0x31, 0xf6, 0xed, 0x1d, 0xdc, 0xbb, 0xa3, -0x4b, 0x24, 0xb3, 0x94, 0x56, 0xed, 0xd8, -0x59, 0x01, 0x4c, 0x45, 0xff, 0x9d, 0x8c, -0xbf, 0xa1, 0x40, 0x19, 0xdc, 0x17, 0x04, -0x8d, 0xd4, 0x43, 0x9e, 0xa0, 0x0a, 0xca, -0x9d, 0x1e, 0xc7, 0xf5, 0x50, 0xad, 0x6b, -0x99, 0x75, 0xda, 0x4b, 0xfc, 0x4f, 0x92, -0x5e, 0x3c, 0x49, 0xb7, 0x0e, 0xf6, 0xda, -0x35, 0xa7, 0x17, 0xd3, 0xb7, 0x30, 0xc9, -0x7b, 0x50, 0xcc, 0x09, 0x29, 0xa4, 0xfa, -0xc0, 0x63, 0xaf, 0xee, 0x0e, 0xfb, 0x06, -0x69, 0x4a, 0x2f, 0x38, 0xf9, 0x3e, 0x42, -0x22, 0xd1, 0x08, 0xe6, 0x75, 0xd1, 0x07, -0xb6, 0x76, 0x11, 0x60, 0xe7, 0x03, 0x07, -0x11, 0x3a, 0x2f, 0x38, 0x5e, 0x2b, 0xc7, -0x65, 0xb6, 0x2c, 0x62, 0xf6, 0x4c, 0xb7, -0xb6, 0xae, 0x56, 0x4c, 0x6d, 0xfe, 0x86, -0xd6, 0x8b, 0x25, 0x04, 0xc1, 0x9c, 0x8c, -0x87, 0x66, 0x1a, 0x7b, 0xe9, 0xf4, 0x0c, -0xc0, 0xdb, 0xca, 0xf2, 0x8a, 0x8f, 0x0b, -0xdb, 0x9d, 0xfe, 0xf5, 0x38, 0x09, 0x74, -0xac, 0xd8, 0x7e, 0x7c, 0x1b, 0xc4, 0xda, -0x71, 0x73, 0x00, 0x0b, 0x3f, 0x1b, 0xb0, -0xbc, 0xd4, 0xe4, 0xf3, 0x14, 0x43, 0xb7, -0x51, 0xd0, 0x38, 0x82, 0x77, 0x39, 0xa2, -0x16, 0x0e, 0xc5, 0xd5, 0x90, 0x70, 0xb2, -0x92, 0x4b, 0xb7, 0xb3, 0x7c, 0xad, 0x3a, -0xf9, 0xd6, 0x53, 0x3f, 0xf8, 0xdb, 0x03, -0x10, 0x14, 0x4f, 0x7c, 0x47, 0x64, 0x24, -0xd2, 0xd8, 0xec, 0x72, 0x73, 0xc8, 0x21, -0x81, 0xcc, 0xb5, 0x11, 0xd2, 0x8c, 0xbc, -0xe1, 0x27, 0xa7, 0xe5, 0x76, 0xae, 0x92, -0x19, 0x23, 0x99, 0x43, 0x8f, 0x3b, 0xee, -0xd5, 0x62, 0xf8, 0x5c, 0xbf, 0x9f, 0xb9, -0xa8, 0x65, 0xdb, 0xf6, 0x86, 0xff, 0x9b, -0x2c, 0xe6, 0x80, 0x0b, 0x80, 0x17, 0x12, -0x48, 0x81, 0x81, 0x79, 0x7d, 0xae, 0xc9, -0x15, 0x79, 0x45, 0xa7, 0x45, 0x3a, 0x97, -0xf5, 0x9a, 0x67, 0xaf, 0x07, 0x35, 0x28, -0x61, 0xf1, 0x16, 0x0b, 0x89, 0x5e, 0xa8, -0x63, 0x38, 0x24, 0xd9, 0x21, 0x7b, 0xa4, -0x4e, 0x63, 0x4e, 0x26, 0xc5, 0x31, 0xcf, -0x9e, 0x9b, 0x7e, 0xce, 0x94, 0x58, 0x95, -0x63, 0x36, 0x88, 0xa8, 0x96, 0x1b, 0xd5, -0xfd, 0x24, 0xfc, 0xc3, 0xaf, 0x39, 0xb2, -0x12, 0x18, 0xb7, 0xe4, 0x93, 0xb3, 0x7c, -0x73, 0x38, 0x2d, 0x63, 0xb6, 0x3b, 0xce, -0xa9, 0x0e, 0xb8, 0xa5, 0x4b, 0x97, 0x63, -0x92, 0xcf, 0xd9, 0xd9, 0x67, 0x40, 0x17, -0x42, 0x4b, 0xc8, 0xdf, 0x4c, 0x14, 0x3b, -0x3c, 0x23, 0x91, 0xf2, 0x57, 0x38, 0x23, -0x8e, 0x66, 0xf0, 0xfd, 0x3b, 0x9e, 0x4d, -0x93, 0x23, 0x49, 0xed, 0x96, 0xf7, 0x1b, -0x11, 0x55, 0x55, 0x86, 0x2f, 0x09, 0xe1, -0x57, 0xa8, 0xc2, 0x54, 0x1a, 0x81, 0x85, -0x50, 0x64, 0xfc, 0x16, 0x0b, 0x0c, 0x20, -0x24, 0xb5, 0x62, 0x8f, 0x21, 0xc1, 0xe8, -0x14, 0x7e, 0xec, 0x8c, 0xa4, 0x82, 0x3b, -0xb9, 0xfc, 0x3e, 0xfd, 0x96, 0x17, 0xe0, -0xcf, 0x6f, 0x21, 0x67, 0xb5, 0x76, 0x39, -0x8b, 0xf6, 0x98, 0xff, 0xbb, 0x7f, 0xd6, -0x8c, 0xdb, 0x4a, 0xba, 0xdf, 0xd6, 0x52, -0xfa, 0x53, 0x2e, 0x82, 0x7e, 0x1c, 0x1e, -0x63, 0x7c, 0x35, 0x39, 0xde, 0x9f, 0x5f, -0xc4, 0xbe, 0xe2, 0xcd, 0xcf, 0x43, 0x40, -0x55, 0x98, 0x6a, 0x21, 0x8e, 0xac, 0x93, -0x90, 0x98, 0x6f, 0xcf, 0xe5, 0x88, 0x13, -0x27, 0x5c, 0x88, 0xad, 0x16, 0x9a, 0x2f, -0x5f, 0x8b, 0x88, 0xfd, 0x01, 0x9a, 0x75, -0x56, 0x5f, 0xd4, 0x6f, 0xc7, 0x20, 0x30, -0xe2, 0xf6, 0x97, 0x77, 0xee, 0xa1, 0xd4, -0x50, 0x26, 0x3a, 0x3f, 0x9e, 0x5a, 0x75, -0xa8, 0xce, 0xf5, 0x4f, 0x2e, 0xfc, 0xee, -0x87, 0xb2, 0xe9, 0x92, 0x5e, 0xce, 0x09, -0x12, 0x1b, 0x56, 0x3e, 0x28, 0xb1, 0x2c, -0x1f, 0xe4, 0x59, 0x09, 0x75, 0x1a, 0xdf, -0x3e, 0x91, 0x79, 0x0f, 0x71, 0x36, 0x6d, -0xb2, 0xcd, 0x82, 0x0c, 0x9d, 0x3d, 0xfa, -0x0f, 0x8c, 0xf8, 0xc2, 0x65, 0xa6, 0xae, -0x42, 0xe5, 0x73, 0x0d, 0x6e, 0x26, 0x92, -0x8e, 0x1d, 0x88, 0x2f, 0x2c, 0xa5, 0x92, -0x8b, 0xac, 0xa8, 0x60, 0x1d, 0xbc, 0xbe, -0x03, 0x04, 0x53, 0x5d, 0xf9, 0x33, 0x12, -0x8b, 0xc2, 0x6c, 0x5a, 0xf4, 0x68, 0x4d, -0x94, 0x65, 0x06, 0xa5, 0xa3, 0x06, 0x62, -0x82, 0xb6, 0x4d, 0xf3, 0x76, 0x9d, 0xdc, -0x69, 0xb8, 0xef, 0xf5, 0x80, 0xa5, 0xc6, -0xfe, 0xe1, 0xcc, 0xb3, 0x5a, 0xa9, 0x8a, -0x70, 0x33, 0xc6, 0x9f, 0x33, 0xdb, 0x51, -0xc1, 0x10, 0x00, 0xea, 0x2d, 0x37, 0x51, -0x63, 0x55, 0xe7, 0x7f, 0x75, 0x41, 0x9f, -0x7a, 0x79, 0xb7, 0x05, 0xfa, 0xf4, 0x11, -0x05, 0xf2, 0x8b, 0x5e, 0xc0, 0x34, 0x26, -0x25, 0xa0, 0x00, 0xe5, 0xf5, 0x7a, 0x82, -0xec, 0x11, 0xdf, 0xd4, 0x68, 0x87, 0x69, -0x81, 0x40, 0xff, 0x1a, 0x3d, 0xc7, 0x37, -0xe1, 0x94, 0x42, 0xa5, 0xdf, 0xc0, 0xeb, -0x38, 0x82, 0x2d, 0x33, 0xf7, 0x9d, 0x6c, -0x7c, 0xee, 0xa4, 0x3e, 0x37, 0x73, 0xfc, -0x3b, 0x2c, 0xd9, 0x0c, 0x5b, 0x7a, 0x18, -0x9c, 0xe3, 0x53, 0xc5, 0xbb, 0x02, 0xc2, -0x4a, 0x03, 0xb3, 0xeb, 0xe9, 0x74, 0xc3, -0xf6, 0xeb, 0xab, 0xe9, 0x24, 0xbf, 0x7a, -0x0f, 0xfd, 0x35, 0xe1, 0x7f, 0xb2, 0x38, -0x60, 0xb9, 0x4d, 0x24, 0x15, 0x5d, 0x74, -0x27, 0x16, 0xe9, 0x57, 0x63, 0x2d, 0x62, -0x82, 0x7e, 0x41, 0xc4, 0xe9, 0xc7, 0x64, -0x91, 0x6e, 0x41, 0xbe, 0x01, 0x19, 0xce, -0x0f, 0x14, 0x42, 0xd5, 0x7f, 0xbb, 0x8b, -0x28, 0x7f, 0x79, 0xa8, 0xf7, 0xdc, 0x70, -0xe2, 0x09, 0xc9, 0x93, 0x23, 0xae, 0x13, -0x96, 0x7d, 0xb2, 0x75, 0x18, 0xbd, 0xee, -0x88, 0x76, 0xb1, 0x97, 0xb5, 0xf7, 0x7b, -0x85, 0x32, 0x43, 0xb8, 0xec, 0xf7, 0x2b, -0x77, 0x99, 0x59, 0xbd, 0xc5, 0x15, 0x3c, -0x3f, 0x6f, 0xa2, 0x16, 0x1e, 0x47, 0x1c, -0x9c, 0x80, 0x3a, 0x7e, 0xcd, 0xb8, 0xad, -0x53, 0xf5, 0x04, 0xcc, 0x7e, 0x8b, 0x4e, -0x6c, 0x65, 0x52, 0x1c, 0x8a, 0x7a, 0xa6, -0x30, 0x6a, 0x6f, 0xc2, 0xf5, 0x26, 0xf8, -0xc9, 0xa6, 0xb1, 0x47, 0x18, 0x16, 0x3d, -0x38, 0x47, 0x95, 0xa5, 0x16, 0xb2, 0x95, -0x77, 0xad, 0x2b, 0xdf, 0xf8, 0x27, 0xc8, -0x7c, 0xf7, 0xa0, 0x12, 0x13, 0xa1, 0xcb, -0xd0, 0xd3, 0x01, 0x7f, 0x51, 0x89, 0x88, -0x55, 0x73, 0x66, 0x18, 0x4b, 0xa5, 0xfa, -0xd9, 0xde, 0xb5, 0xde, 0x2d, 0x4f, 0xe5, -0x99, 0xda, 0x1c, 0x0d, 0xaf, 0x8d, 0xaf, -0xaa, 0x33, 0x37, 0x97, 0xd9, 0xca, 0x53, -0x1a, 0x9f, 0x8c, 0xd0, 0x56, 0xb9, 0x5b, -0xb2, 0x99, 0xad, 0x8e, 0x85, 0x00, 0x97, -0xf1, 0x23, 0xb0, 0x2c, 0xd7, 0x6c, 0x22, -0xb8, 0x55, 0xcf, 0xb9, 0x96, 0x49, 0xbb, -0xe2, 0x02, 0x58, 0x07, 0xd1, 0xb0, 0x05, -0xc5, 0xe5, 0x9a, 0xd9, 0xce, 0x3e, 0xa9, -0xd0, 0x27, 0x32, 0x8a, 0x59, 0xd4, 0xde, -0xde, 0x7a, 0x9a, 0x7e, 0x34, 0x08, 0xfc, -0xbc, 0xbe, 0x32, 0x96, 0xd0, 0x4d, 0x70, -0x16, 0xac, 0x9f, 0xa9, 0xca, 0x0d, 0xe8, -0x50, 0xcd, 0x0c, 0x41, 0xfe, 0x43, 0xe0, -0x97, 0x75, 0xb9, 0x11, 0xc3, 0x48, 0xe7, -0xfa, 0x5b, 0xf3, 0x92, 0x7f, 0x3a, 0x50, -0xe4, 0xd7, 0x49, 0xe0, 0x22, 0x79, 0x2a, -0x19, 0x7e, 0x21, 0x08, 0xf9, 0x5b, 0x87, -0x13, 0x8d, 0xf1, 0x02, 0x10, 0x14, 0xe9, -0x11, 0xfa, 0xb2, 0xd5, 0x08, 0xdb, 0xbc, -0x95, 0x79, 0x8d, 0xce, 0x53, 0x41, 0xd7, -0xf9, 0x72, 0x6d, 0xe3, 0x95, 0x0e, 0x51, -0x18, 0x30, 0x2a, 0xe5, 0x3c, 0x57, 0xb1, -0x3a, 0x5a, 0xbb, 0x3c, 0x8e, 0x90, 0x20, -0x1e, 0x70, 0x2c, 0x97, 0x17, 0x5b, 0x02, -0x0b, 0x4f, 0x78, 0x9c, 0x91, 0x9a, 0x77, -0x87, 0xbc, 0x40, 0x9d, 0x15, 0xbe, 0xf4, -0x19, 0x1f, 0xb3, 0x60, 0x6b, 0x31, 0x2c, -0xd2, 0xdf, 0xf5, 0xae, 0xaa, 0x2d, 0xb1, -0x52, 0xb5, 0x2b, 0x0d, 0x44, 0x79, 0x30, -0x3e, 0x60, 0x5b, 0x35, 0xd5, 0x21, 0xaf, -0xec, 0xed, 0xbb, 0x94, 0xf9, 0xf4, 0x76, -0x05, 0x16, 0x50, 0x1e, 0x57, 0x7f, 0xfc, -0x76, 0xf1, 0x30, 0x95, 0xae, 0xa2, 0xad, -0xce, 0x24, 0x4a, 0x08, 0xc6, 0xf8, 0xd8, -0x8d, 0x88, 0xb7, 0x5d, 0x59, 0x27, 0x93, -0xe1, 0x74, 0xbe, 0xa2, 0x48, 0x15, 0x1f, -0x44, 0x88, 0x4f, 0x72, 0xd8, 0x51, 0x3b, -0xdf, 0x74, 0x4c, 0xd7, 0x60, 0x6c, 0x99, -0x79, 0xf3, 0xdc, 0xd5, 0xbc, 0xf8, 0x57, -0x13, 0x4d, 0x2b, 0x91, 0xbe, 0x94, 0xa8, -0x31, 0x74, 0x49, 0x7e, 0x40, 0xca, 0x8b, -0xe9, 0xf5, 0x83, 0x90, 0x86, 0x8f, 0xa3, -0x46, 0xcf, 0x4a, 0xbc, 0xf5, 0xc9, 0x03, -0xb4, 0x25, 0xaa, 0xe6, 0xd5, 0xeb, 0xcc, -0x20, 0x0d, 0x58, 0x05, 0x2c, 0x6d, 0xd5, -0xbe, 0x38, 0xd5, 0x97, 0x40, 0x1b, 0x9e, -0xfc, 0x5f, 0x56, 0xe5, 0x3c, 0xb3, 0x99, -0x7a, 0x44, 0x62, 0x2f, 0xef, 0x5a, 0x1b, -0x36, 0x3e, 0x84, 0xf1, 0xde, 0x24, 0xf6, -0x48, 0x24, 0xc0, 0x20, 0xf3, 0xb3, 0x8c, -0x77, 0xd0, 0xb4, 0xa3, 0xba, 0xad, 0x1d, -0xf9, 0x27, 0xc4, 0x79, 0x4c, 0x2a, 0x8a, -0x05, 0xfc, 0x84, 0x9c, 0x11, 0x71, 0xce, -0x12, 0x00, 0xdf, 0x5c, 0xaa, 0xc2, 0x4e, -0xdf, 0x7b, 0xdb, 0x2f, 0x22, 0x19, 0x9e, -0xb2, 0xf6, 0x34, 0x35, 0xc5, 0x22, 0xcf, -0x07, 0x4b, 0x99, 0xc6, 0x39, 0x3b, 0x9d, -0x5e, 0xd0, 0x4f, 0x06, 0x41, 0xb4, 0x2e, -0xd1, 0x8d, 0x22, 0x41, 0x45, 0x58, 0x46, -0x29, 0xe0, 0x26, 0x38, 0x45, 0x00, 0xdb, -0x6c, 0xfc, 0xc4, 0x9f, 0xe5, 0xb3, 0x3b, -0xba, 0x57, 0x82, 0x51, 0x2d, 0xef, 0x3e, -0xc1, 0x65, 0x89, 0x3d, 0x85, 0x62, 0xe9, -0x58, 0x1c, 0x27, 0x77, 0xa0, 0xcb, 0x2d, -0x33, 0x88, 0x2c, 0xb7, 0x32, 0xa5, 0x55, -0xdb, 0xe5, 0x33, 0x88, 0x5f, 0x72, 0xb1, -0x91, 0x9b, 0xe0, 0xab, 0x41, 0x59, 0x85, -0x8e, 0xd1, 0x4f, 0xb9, 0x64, 0x43, 0x82, -0x31, 0x1e, 0x39, 0x43, 0x9c, 0x78, 0xfd, -0x1c, 0x77, 0xa5, 0x87, 0x09, 0x9e, 0x13, -0x22, 0x45, 0x0c, 0x9a, 0xf7, 0xa9, 0x57, -0x19, 0x7a, 0x40, 0xfa, 0x81, 0x66, 0xd6, -0x89, 0x41, 0x92, 0xb4, 0x97, 0x13, 0xf9, -0xf4, 0x84, 0xde, 0xe3, 0x37, 0x6e, 0xce, -0x49, 0xd8, 0xa7, 0x1a, 0x27, 0xad, 0xb5, -0xe1, 0x06, 0x8e, 0x3d, 0xf5, 0xa0, 0x79, -0xd8, 0x91, 0xca, 0x15, 0x0b, 0xca, 0x80, -0x82, 0xbc, 0xf8, 0x68, 0x9b, 0xa5, 0x3f, -0x68, 0x1c, 0x9f, 0x68, 0xd1, 0x25, 0xc3, -0x2c, 0xb3, 0xe9, 0x45, 0x2d, 0x01, 0x81, -0x75, 0x2f, 0xf2, 0x50, 0x7b, 0xca, 0x7c, -0xe2, 0x1e, 0x17, 0x47, 0x34, 0x25, 0x8e, -0x5a, 0x04, 0xe4, 0x6c, 0xd2, 0xad, 0x7f, -0xaa, 0xaa, 0xc8, 0x1d, 0x2a, 0xaa, 0x62, -0x16, 0x31, 0x4b, 0x88, 0x1d, 0x2d, 0xd5, -0x31, 0x96, 0x15, 0xa7, 0xb0, 0xa6, 0x0c, -0xc4, 0xef, 0xcb, 0xb9, 0x86, 0x8a, 0xfe, -0xb9, 0x99, 0xc8, 0x73, 0xd5, 0x3a, 0xa0, -0x24, 0x06, 0x1b, 0x89, 0x45, 0xc0, 0x38, -0x33, 0xcc, 0xae, 0xab, 0x10, 0x31, 0xed, -0x68, 0x0d, 0x9b, 0x3c, 0xa7, 0xde, 0xac, -0x3f, 0x97, 0x0c, 0x3e, 0xca, 0x02, 0xaa, -0xe2, 0x87, 0x7c, 0x61, 0xfe, 0x7e, 0x82, -0x32, 0x20, 0xcf, 0x84, 0x12, 0x78, 0x37, -0x1e, 0x4c, 0xb0, 0xe6, 0x4e, 0x54, 0x84, -0x5e, 0xa0, 0x93, 0x6b, 0xa3, 0x59, 0x71, -0xcf, 0x40, 0x7a, 0xda, 0x28, 0x19, 0xf1, -0x6a, 0x6f, 0xb7, 0x1e, 0xe0, 0xcd, 0xbc, -0x99, 0xb7, 0x6e, 0x2d, 0x2b, 0xdd, 0xf7, -0xea, 0x81, 0x65, 0x39, 0xd2, 0x90, 0xd3, -0xbc, 0x64, 0xb5, 0x2c, 0xeb, 0xb4, 0xaf, -0x4e, 0x9c, 0x50, 0x67, 0x60, 0xc3, 0xd2, -0x56, 0xb3, 0x34, 0x94, 0xbb, 0x4d, 0xeb, -0x4c, 0x8f, 0x7f, 0x31, 0x8a, 0xe1, 0xd8, -0xf9, 0x18, 0x62, 0x4d, 0xa4, 0xb6, 0x4a, -0x80, 0xa8, 0x09, 0x85, 0x2c, 0x1a, 0x14, -0x3c, 0xa9, 0xab, 0x28, 0xef, 0x35, 0x37, -0x7c, 0xdc, 0x69, 0x0e, 0x8f, 0x82, 0xa0, -0xfb, 0xb4, 0x86, 0xcc, 0xd9, 0x07, 0x1a, -0x2d, 0x53, 0xa9, 0x5b, 0x46, 0xf7, 0xf2, -0xcb, 0x7a, 0x85, 0x62, 0x89, 0xc8, 0x53, -0x08, 0x24, 0xfc, 0x11, 0x10, 0xfb, 0x4f, -0x31, 0xa3, 0xcd, 0xd5, 0x75, 0x91, 0xbd, -0x18, 0xb3, 0xaa, 0x40, 0xed, 0xda, 0xe9, -0x83, 0xcc, 0x46, 0xb4, 0x1f, 0xb8, 0xd8, -0x11, 0xbf, 0xa6, 0x83, 0x58, 0x93, 0xfc, -0xe2, 0xc7, 0x0d, 0xa0, 0x13, 0xd0, 0x6d, -0xe2, 0xb7, 0x50, 0xc9, 0xcb, 0x41, 0x8b, -0xfd, 0xa6, 0xf7, 0x25, 0xe1, 0xb6, 0x40, -0x69, 0xbc, 0xd5, 0x80, 0x3d, 0xbb, 0x7b, -0x30, 0xf7, 0x84, 0x2f, 0x04, 0xb8, 0x22, -0xc8, 0x33, 0xc4, 0x26, 0x30, 0xd1, 0x50, -0x53, 0x13, 0xd1, 0x45, 0xfc, 0x0c, 0x33, -0xb9, 0xa8, 0xc2, 0x41, 0x29, 0x0c, 0x4e, -0x98, 0xb9, 0x43, 0xc2, 0x7b, 0x24, 0x68, -0x77, 0xcc, 0xad, 0x7e, 0x62, 0x51, 0x7d, -0x1d, 0x34, 0xaf, 0x08, 0xa8, 0x15, 0x24, -0x2d, 0xbe, 0x9c, 0x9f, 0xb3, 0xb8, 0x6b, -0x29, 0x68, 0x4e, 0x07, 0x6f, 0xfb, 0xe1, -0xc8, 0x27, 0x5b, 0x3c, 0xef, 0x8f, 0x85, -0x79, 0x75, 0x42, 0xfb, 0xab, 0x59, 0x9c, -0x8c, 0x18, 0x10, 0x0f, 0xc4, 0x74, 0x24, -0xfe, 0x82, 0x7f, 0xb6, 0x6c, 0xfd, 0xc0, -0xc5, 0xd6, 0xa6, 0x23, 0x7c, 0x26, 0xf1, -0x28, 0x09, 0x32, 0xa3, 0x59, 0x5f, 0x98, -0x52, 0x70, 0x40, 0x1e, 0x75, 0xfc, 0x3f, -0xad, 0xa2, 0xa6, 0xc2, 0xea, 0xf9, 0x1d, -0xbc, 0xd9, 0x6a, 0xa3, 0x48, 0x18, 0x15, -0x01, 0x99, 0x5c, 0xe1, 0x23, 0x76, 0xeb, -0x35, 0x1a, 0xfb, 0xdb, 0xcc, 0xc8, 0x49, -0xf0, 0x4a, 0xfd, 0xf6, 0x5d, 0x20, 0x42, -0x78, 0xf5, 0xf5, 0x44, 0x0b, 0x11, 0x77, -0xc4, 0xd4, 0x0f, 0x60, 0xb3, 0xc9, 0xe1, -0x04, 0xa0, 0xe6, 0xc1, 0x2e, 0xb6, 0x1d, -0x9d, 0x1d, 0xeb, 0x1c, 0xa2, 0x85, 0x0c, -0x1b, 0x8d, 0xb0, 0xa8, 0xea, 0x4c, 0x12, -0x2d, 0xf6, 0x85, 0xf0, 0xe9, 0x3f, 0x17, -0x2f, 0x3d, 0xe4, 0x03, 0x29, 0x5a, 0xe7, -0x95, 0x1e, 0x6c, 0xea, 0x8e, 0x92, 0x15, -0x98, 0x83, 0xcb, 0xec, 0x4a, 0x84, 0x39, -0x7a, 0xc0, 0xc7, 0xd8, 0x97, 0x79, 0xcc, -0x6a, 0x9a, 0x4a, 0x3e, 0xfb, 0x4f, 0xd1, -0x64, 0xd9, 0xf7, 0xb2, 0xc4, 0xcc, 0xd3, -0x9c, 0x22, 0x55, 0xc3, 0xbc, 0xf8, 0xf8, -0x2e, 0x35, 0x37, 0x05, 0x47, 0x43, 0x26, -0x43, 0xb3, 0x96, 0x1c, 0xd4, 0x1a, 0xc7, -0x2b, 0xdd, 0x5a, 0x9c, 0xb4, 0x58, 0x3a, -0x9f, 0x24, 0x9d, 0x82, 0x31, 0x21, 0x44, -0x81, 0x44, 0x67, 0x78, 0xcb, 0x57, 0x20, -0xd3, 0xdc, 0x54, 0x4b, 0x2b, 0xd6, 0xa7, -0xff, 0x83, 0x8e, 0x6b, 0xa9, 0xac, 0xb1, -0x25, 0xf7, 0x33, 0xad, 0xbe, 0xc6, 0x83, -0xd1, 0x9c, 0x72, 0x12, 0x61, 0xc9, 0xf2, -0xc2, 0x4a, 0xe0, 0x7f, 0x5d, 0xab, 0xb8, -0x6f, 0x94, 0xad, 0x78, 0x8c, 0x98, 0x58, -0xa0, 0x31, 0xf8, 0x73, 0xec, 0x61, 0x54, -0xd1, 0x3f, 0x46, 0xd1, 0xa2, 0xe9, 0x9a, -0x99, 0x8f, 0x32, 0xa2, 0x23, 0x9f, 0xf3, -0xc0, 0xa2, 0xfd, 0x23, 0x5c, 0x93, 0x82, -0xfa, 0xfe, 0xce, 0x28, 0xdf, 0xa2, 0x32, -0xf6, 0x2c, 0x67, 0xeb, 0x0f, 0x7c, 0x43, -0xab, 0xd9, 0xbd, 0x1c, 0x38, 0xf4, 0x80, -0x12, 0xb8, 0x14, 0x05, 0x8e, 0xab, 0x62, -0x47, 0x6a, 0xa8, 0xa4, 0x89, 0xfd, 0xf5, -0x85, 0x8a, 0xea, 0x2c, 0x58, 0x3e, 0x95, -0xe5, 0x6a, 0x6f, 0xd3, 0x63, 0x47, 0x3c, -0xfb, 0xdb, 0x6c, 0x94, 0xb0, 0xcf, 0x97, -0xdd, 0xfc, 0xde, 0xa9, 0x5e, 0x67, 0x49, -0x37, 0x55, 0xe5, 0xd4, 0x25, 0xbc, 0x95, -0x58, 0x9d, 0xf7, 0x08, 0x05, 0x34, 0x32, -0xbf, 0x4f, 0xf1, 0xf5, 0x3a, 0x59, 0x1c, -0x55, 0x6b, 0xbd, 0x14, 0x83, 0x29, 0xbe, -0x4f, 0xab, 0xe2, 0xc0, 0xc7, 0x52, 0xf6, -0x6e, 0x73, 0x60, 0x35, 0x35, 0x27, 0x73, -0x9f, 0xcc, 0x07, 0xee, 0xbd, 0x2c, 0xbb, -0x47, 0x46, 0x1f, 0xdf, 0x05, 0xd8, 0xcf, -0x5e, 0xc9, 0x5a, 0xa7, 0x46, 0xdb, 0xcd, -0x98, 0xb4, 0xf1, 0x2a, 0x90, 0xbf, 0xad, -0x39, 0x73, 0x9e, 0x78, 0xf7, 0x40, 0xda, -0x1b, 0xc9, 0xe0, 0x1f, 0x24, 0xd4, 0x4f, -0xee, 0x3c, 0x97, 0x15, 0xa9, 0x05, 0xd0, -0xa1, 0x8b, 0x81, 0x57, 0xb1, 0xe8, 0x55, -0x25, 0xa2, 0x2b, 0x2c, 0x10, 0xf2, 0x3e, -0x0e, 0xb2, 0xea, 0x7c, 0x63, 0x9b, 0x01, -0x54, 0x26, 0x20, 0xd3, 0xc5, 0x2b, 0x76, -0xe6, 0xc9, 0x34, 0x84, 0xf0, 0xf5, 0xb5, -0x50, 0xb9, 0xd9, 0x9a, 0xba, 0x2a, 0x7a, -0xd6, 0xea, 0xec, 0x1a, 0xee, 0xbe, 0x5a, -0x6b, 0x9e, 0xa7, 0x7a, 0x34, 0xe6, 0xf7, -0xb7, 0x97, 0x57, 0xba, 0x6f, 0x56, 0xe8, -0xc7, 0xc0, 0xa1, 0xfe, 0x5d, 0xf0, 0x0f, -0x06, 0xf5, 0xbc, 0x4d, 0x68, 0x75, 0x39, -0x3d, 0x93, 0x4e, 0x1f, 0xb7, 0xcd, 0xc6, -0x3f, 0x5a, 0xf2, 0x71, 0x79, 0xbe, 0x8a, -0x44, 0xe4, 0x8f, 0xad, 0x1b, 0xaf, 0x6d, -0x2e, 0x27, 0xd2, 0xd3, 0x0e, 0xfb, 0x1c, -0x62, 0x75, 0x7d, 0xaf, 0x0d, 0xf0, 0x45, -0x77, 0xf0, 0xfc, 0xbd, 0x4b, 0xae, 0xe9, -0x0e, 0xb4, 0xed, 0x4a, 0xf9, 0x6c, 0x34, -0xbf, 0x94, 0x94, 0x0c, 0xf9, 0xd1, 0x66, -0x37, 0x90, 0xba, 0x1e, 0x62, 0x61, 0xbf, -0xc8, 0xed, 0x9f, 0xf0, 0x9d, 0xf5, 0xa2, -0x5f, 0x22, 0x5b, 0xcf, 0x22, 0xb0, 0x91, -0xe8, 0x17, 0x56, 0x0d, 0xf4, 0x60, 0x5e, -0x77, 0x97, 0x42, 0xb6, 0x33, 0xdb, 0xcd, -0x5f, 0x04, 0xa2, 0x7c, 0x1e, 0xb2, 0xd7, -0xc9, 0xf5, 0x4d, 0xdf, 0x76, 0xe7, 0xb1, -0x83, 0xa5, 0x72, 0x13, 0xf1, 0x27, 0x65, -0x49, 0x7f, 0x05, 0x6e, 0x35, 0xab, 0x73, -0xcb, 0x09, 0x49, 0x14, 0x1f, 0xf1, 0xa6, -0x85, 0x8b, 0x61, 0x3a, 0xb7, 0xe0, 0x1d, -0x87, 0xeb, 0x34, 0x44, 0xd8, 0xd4, 0x12, -0x7b, 0x82, 0xa1, 0xb6, 0x77, 0x53, 0xd7, -0x36, 0x39, 0x64, 0x49, 0xbd, 0xd1, 0xb4, -0x3d, 0xea, 0x4d, 0x0b, 0x50, 0x5d, 0x0a, -0x5d, 0x64, 0xa2, 0xac, 0x7d, 0x6c, 0x6a, -0x2c, 0x01, 0x75, 0x1b, 0xbd, 0x19, 0xf6, -0x4a, 0xe6, 0x83, 0x0b, 0x23, 0x5f, 0xe2, -0xe8, 0x15, 0x70, 0x2c, 0x63, 0x68, 0xde, -0x1c, 0xf8, 0xd4, 0x41, 0xab, 0x0e, 0xf0, -0x39, 0xbe, 0x3c, 0x46, 0xfd, 0x2b, 0xcb, -0x21, 0x88, 0x4c, 0xdf, 0xf8, 0x91, 0x3b, -0x83, 0xa1, 0x3e, 0xaa, 0xc6, 0xc0, 0xd9, -0x1d, 0xac, 0x0c, 0x79, 0xec, 0x23, 0xed, -0xde, 0x4a, 0xcc, 0x33, 0xdb, 0x5a, 0x81, -0x3b, 0xee, 0xa6, 0x22, 0x4d, 0x87, 0x43, -0x29, 0x1a, 0x3f, 0xdd, 0xe3, 0xc5, 0x1a, -0x3b, 0x8f, 0x22, 0x42, 0xa9, 0x43, 0xdf, -0x07, 0x2e, 0x0c, 0xc0, 0x6f, 0x69, 0x9d, -0x1f, 0x03, 0x4a, 0xc2, 0x8f, 0x2e, 0x07, -0x09, 0x20, 0xa8, 0xbb, 0xb4, 0x63, 0xd1, -0x12, 0x09, 0xf6, 0xd6, 0x01, 0xa4, 0x25, -0x74, 0xa8, 0xb9, 0x56, 0x82, 0xdb, 0x78, -0xe8, 0x41, 0xbb, 0xc6, 0x18, 0xc5, 0x86, -0xa3, 0xea, 0xbf, 0x90, 0x2c, 0xdd, 0x15, -0xe0, 0x4a, 0x21, 0xd4, 0x42, 0x94, 0x94, -0xf4, 0x48, 0x62, 0x97, 0x25, 0xc7, 0xcd, -0x44, 0x88, 0x20, 0xd6, 0x05, 0x4b, 0x96, -0x89, 0xd0, 0x3e, 0x0d, 0x9f, 0xa3, 0x24, -0xf8, 0xf8, 0xed, 0x7e, 0xe1, 0x64, 0xa9, -0x03, 0x04, 0x07, 0x19, 0x5f, 0x1c, 0x08, -0x59, 0xef, 0x5e, 0xa6, 0xe0, 0xe4, 0x79, -0xd7, 0xd9, 0x15, 0x83, 0xc8, 0x67, 0xf4, -0xaa, 0x89, 0xaf, 0xa1, 0x85, 0x09, 0x6d, -0xc5, 0x4c, 0x09, 0xd2, 0xf9, 0x91, 0x37, -0x73, 0xa1, 0x87, 0x5e, 0x2e, 0x00, 0x81, -0x1b, 0xea, 0xf2, 0x01, 0xf0, 0x30, 0x36, -0xdd, 0x69, 0x9d, 0xf5, 0x30, 0x3d, 0x25, -0x9f, 0xef, 0xd9, 0xf3, 0x18, 0x23, 0x1a, -0x49, 0x72, 0x66, 0x7f, 0xda, 0x95, 0xea, -0x50, 0x7c, 0xe8, 0x98, 0x1a, 0x11, 0xdc, -0xec, 0xb8, 0x0b, 0x10, 0x65, 0x9c, 0xfe, -0xdd, 0xf1, 0x09, 0x13, 0xfb, 0xc4, 0xea, -0x49, 0x12, 0x30, 0x07, 0x6a, 0x0c, 0x52, -0x2f, 0x63, 0xf8, 0x53, 0xe5, 0x9e, 0x66, -0xaf, 0x6d, 0xe3, 0xc3, 0xbd, 0x1f, 0xf7, -0x9b, 0x1f, 0x52, 0xb8, 0x9b, 0x8e, 0x63, -0x4c, 0x95, 0xb4, 0x92, 0x7c, 0x7f, 0x23, -0x76, 0x07, 0x3a, 0x48, 0xdc, 0x88, 0x4b, -0x43, 0xf2, 0xea, 0x57, 0x07, 0xf6, 0xcc, -0x8a, 0x9c, 0x0e, 0x7f, 0x9e, 0x75, 0x98, -0xf5, 0x25, 0x9e, 0x19, 0x41, 0x4f, 0x5b, -0xb1, 0xee, 0x70, 0x69, 0xf4, 0x23, 0xb5, -0xba, 0x59, 0x5f, 0x7c, 0x1e, 0x76, 0x6b, -0xb4, 0xd6, 0x77, 0x51, 0xf8, 0xd7, 0xdf, -0x55, 0x5c, 0x85, 0x50, 0x5c, 0xd0, 0x12, -0xd0, 0x38, 0x4e, 0x7b, 0xee, 0xa8, 0x6c, -0xd8, 0x33, 0x04, 0xf1, 0x9d, 0x90, 0xd3, -0xf1, 0x78, 0x88, 0x79, 0xce, 0x72, 0xc1, -0x0c, 0xad, 0x9b, 0xae, 0x50, 0x1b, 0x9e, -0xfd, 0xb4, 0x44, 0x31, 0x85, 0x82, 0xe6, -0x9e, 0xe4, 0xe8, 0x5f, 0x14, 0xe2, 0x37, -0x87, 0x2f, 0x79, 0x8e, 0xb0, 0xd8, 0x6d, -0xae, 0x2d, 0xa5, 0xcc, 0x9c, 0xeb, 0xd0, -0x49, 0x8b, 0xa1, 0xa7, 0xc1, 0x5e, 0x2c, -0xfe, 0x61, 0x6b, 0x3b, 0x39, 0xd3, 0x20, -0x6a, 0x77, 0x4c, 0xa0, 0x13, 0xa7, 0x68, -0xc8, 0x34, 0x95, 0x71, 0x26, 0x31, 0x02, -0x7e, 0x26, 0x87, 0x5a, 0x2c, 0x8b, 0xd3, -0x3b, 0x30, 0x94, 0xa6, 0x04, 0x03, 0xcd, -0xbf, 0x4b, 0x53, 0x46, 0xe5, 0x37, 0xf1, -0xa7, 0x16, 0xad, 0x23, 0x3a, 0x7f, 0x5d, -0x43, 0x22, 0x5c, 0xdb, 0xfd, 0x6c, 0xd1, -0x41, 0x69, 0xc1, 0x2a, 0x63, 0x6c, 0x02, -0xe9, 0x9c, 0xa1, 0x26, 0xa6, 0x4a, 0xa5, -0xaa, 0x18, 0xa9, 0xb7, 0x71, 0x6f, 0x4b, -0x52, 0x06, 0xc7, 0x52, 0xfd, 0x33, 0xe3, -0x1d, 0x48, 0x16, 0x3b, 0x76, 0x96, 0x83, -0xd8, 0xc1, 0xb6, 0x8e, 0xdb, 0xf9, 0x19, -0xb0, 0xc3, 0xae, 0xf8, 0x73, 0xa3, 0x90, -0x56, 0xba, 0x83, 0x60, 0xaa, 0x56, 0x5b, -0xbd, 0xa7, 0x2d, 0x38, 0xc0, 0xc4, 0xac, -0xe9, 0x13, 0xdf, 0x29, 0xd8, 0xf7, 0x9e, -0xc4, 0xf0, 0x9b, 0x7b, 0x15, 0xbf, 0xd7, -0x50, 0x8f, 0xf6, 0x61, 0xd9, 0x30, 0x59, -0xb6, 0x05, 0xd5, 0xfe, 0x9e, 0xf5, 0x5c, -0x5b, 0x54, 0x3a, 0x18, 0x7a, 0xd2, 0x68, -0x47, 0x42, 0x82, 0x39, 0xf0, 0xdd, 0x9a, -0x1b, 0x90, 0x1c, 0x52, 0xe7, 0xed, 0xac, -0xb3, 0x52, 0xbd, 0x6b, 0x19, 0x90, 0x8f, -0xc4, 0xe4, 0x80, 0x2a, 0x86, 0xb4, 0x9c, -0x8c, 0x83, 0x45, 0x6b, 0x3b, 0x03, 0x99, -0xa7, 0xe8, 0x7b, 0x34, 0xda, 0x8a, 0x0c, -0xc7, 0x1d, 0xcd, 0x31, 0x41, 0xe6, 0x44, -0xd9, 0xcf, 0xea, 0x58, 0x2f, 0x0f, 0x56, -0x6e, 0xe1, 0xc1, 0x8b, 0x53, 0xa6, 0xdb, -0xf2, 0xad, 0x68, 0x13, 0x54, 0x43, 0xb5, -0x2d, 0xb8, 0x0d, 0x77, 0xbd, 0x48, 0xae, -0xbc, 0x80, 0x27, 0x61, 0xdc, 0x20, 0xca, -0x8c, 0x41, 0xb0, 0x51, 0xd6, 0xfb, 0xd2, -0x93, 0x39, 0xb7, 0x59, 0x41, 0x91, 0xd5, -0x5d, 0xdc, 0xbd, 0xd7, 0x3a, 0xad, 0xaa, -0x41, 0xe2, 0xcb, 0x6b, 0xbe, 0xd1, 0x97, -0x50, 0x6b, 0x38, 0xaa, 0x64, 0x38, 0x3f, -0x08, 0xe2, 0xf8, 0xa8, 0x64, 0x3c, 0xc4, -0x33, 0xdc, 0x19, 0x00, 0xbb, 0x19, 0x63, -0xc0, 0xd1, 0x74, 0x9c, 0x2a, 0x4e, 0x82, -0x17, 0x12, 0xda, 0x0e, 0x7f, 0x30, 0x86, -0x3d, 0x49, 0x6a, 0xce, 0xbd, 0xbc, 0x2f, -0xc8, 0xc5, 0x3d, 0xaa, 0xf0, 0x31, 0xa4, -0xe8, 0x50, 0x7e, 0xb6, 0xf0, 0xfd, 0xe9, -0x8c, 0x00, 0x7f, 0xfa, 0x56, 0xba, 0x29, -0x82, 0xc1, 0x2a, 0xfa, 0x70, 0x2b, 0x8f, -0x42, 0xc2, 0x54, 0x61, 0xd2, 0xec, 0xe4, -0x9c, 0x8a, 0xe3, 0x28, 0xa1, 0x88, 0x3d, -0x96, 0xfd, 0x36, 0x64, 0x5e, 0x63, 0xa9, -0xc8, 0x6c, 0x65, 0x69, 0x46, 0x74, 0x23, -0x7a, 0x30, 0x08, 0xe3, 0x37, 0x01, 0xe8, -0xe5, 0x2d, 0xed, 0xd9, 0xb9, 0x14, 0x53, -0x76, 0x87, 0x0e, 0x9f, 0xf3, 0x36, 0xc4, -0xec, 0xef, 0x3b, 0xee, 0xd2, 0x04, 0x8f, -0xb1, 0xca, 0x5f, 0xbd, 0xbf, 0xd2, 0xa4, -0xbb, 0x63, 0x2f, 0x00, 0x59, 0xb6, 0x78, -0x03, 0x56, 0x74, 0x42, 0x14, 0x27, 0x21, -0x09, 0x05, 0xa5, 0xfd, 0x61, 0x03, 0x39, -0xff, 0x23, 0x51, 0xa4, 0x45, 0x40, 0x9c, -0x0e, 0x1e, 0xaa, 0x93, 0xdc, 0x28, 0xe0, -0xd4, 0xfc, 0x7d, 0x4d, 0x80, 0x6a, 0x1a, -0x0e, 0xfc, 0xe5, 0xdb, 0x3a, 0x05, 0x49, -0xed, 0x56, 0x9d, 0x4f, 0x17, 0x79, 0x9b, -0x6d, 0x0f, 0x1e, 0xd0, 0x10, 0x5a, 0xfa, -0xd7, 0x08, 0x25, 0x2f, 0x1d, 0xef, 0x5e, -0x9a, 0xc4, 0x44, 0xff, 0x41, 0x50, 0xfb, -0x5a, 0x5f, 0x14, 0x60, 0x49, 0xbc, 0x52, -0x68, 0xf2, 0xf0, 0x44, 0xc9, 0x20, 0x72, -0xc5, 0xbf, 0x91, 0xc6, 0x93, 0x7d, 0x9f, -0xde, 0x0f, 0x66, 0x90, 0xa6, 0x0b, 0x66, -0x74, 0xc8, 0x71, 0x54, 0xc3, 0x42, 0xd8, -0xa5, 0xe0, 0xba, 0xf1, 0x50, 0x1d, 0x39, -0x33, 0x0b, 0xa1, 0x9d, 0xfa, 0xf7, 0xe7, -0xa0, 0xf9, 0xf6, 0xe6, 0xb7, 0xe0, 0x20, -0xe6, 0x95, 0xcc, 0xe1, 0x84, 0x9c, 0xce, -0xab, 0x61, 0x14, 0xdc, 0xa6, 0x22, 0xda, -0xf7, 0x14, 0xc5, 0x58, 0x4b, 0xae, 0x1c, -0xd6, 0xcf, 0xce, 0x32, 0x4d, 0x20, 0x1d, -0x1c, 0xae, 0x26, 0xf5, 0xa8, 0x47, 0x18, -0x28, 0x05, 0x83, 0xcd, 0xd7, 0x11, 0xc5, -0x4c, 0xf4, 0x39, 0xe6, 0x1b, 0x54, 0xf9, -0x6c, 0x1a, 0x43, 0xc4, 0x02, 0xf4, 0xb7, -0x06, 0xaa, 0xca, 0xda, 0x13, 0x64, 0xee, -0xf4, 0xfc, 0xc7, 0x28, 0x13, 0x57, 0xeb, -0x9c, 0x2c, 0xa0, 0x2e, 0x1d, 0x3c, 0xd4, -0x8f, 0xcd, 0x15, 0x9d, 0x3d, 0x5a, 0x0b, -0xe8, 0xce, 0x70, 0x70, 0xe1, 0x8f, 0x46, -0x0b, 0xeb, 0x63, 0x7c, 0xd1, 0x2c, 0x7e, -0xe5, 0x6b, 0x4b, 0x1d, 0x4e, 0x22, 0xd1, -0x1a, 0x10, 0xc4, 0x00, 0x04, 0xf6, 0x37, -0x9f, 0x67, 0xe4, 0x37, 0xef, 0x3a, 0xa6, -0x28, 0x09, 0x9d, 0x2b, 0xd2, 0x6b, 0xf8, -0x95, 0xe1, 0xf7, 0x19, 0x22, 0x34, 0xd0, -0xca, 0x8a, 0x05, 0x2d, 0x1f, 0x4d, 0x8a, -0x02, 0x59, 0x8e, 0x06, 0x3b, 0x36, 0xd8, -0x7d, 0x70, 0x52, 0xcd, 0x55, 0xd3, 0x94, -0x5c, 0x7b, 0xb4, 0x84, 0x91, 0x29, 0x4b, -0xb2, 0x86, 0xba, 0xdd, 0xc7, 0xb5, 0x48, -0xd5, 0xde, 0x6f, 0x9c, 0x2c, 0xcf, 0xd8, -0xd8, 0xcc, 0x34, 0xcf, 0x54, 0x0a, 0xc4, -0xb5, 0xb0, 0x79, 0x87, 0x50, 0xdb, 0xdf, -0x39, 0xa7, 0x8a, 0x38, 0x9e, 0x97, 0xa9, -0xac, 0x5e, 0x42, 0xaa, 0xc0, 0xfb, 0xe4, -0xf5, 0x08, 0xfb, 0xd7, 0xa9, 0x80, 0x1e, -0x13, 0x22, 0xa3, 0x44, 0x46, 0x99, 0x96, -0xc9, 0x77, 0xa1, 0xc1, 0xdf, 0xdf, 0x93, -0x8f, 0xf2, 0xd0, 0xda, 0x1f, 0x0f, 0xfb, -0xb1, 0x8e, 0x06, 0x17, 0x4a, 0x10, 0xb2, -0x73, 0xa5, 0x2a, 0x26, 0x59, 0x81, 0x33, -0xba, 0xd7, 0x26, 0x5a, 0x60, 0x1f, 0x02, -0x42, 0xd9, 0xca, 0xde, 0x01, 0x85, 0xb3, -0xb6, 0x4d, 0x38, 0x00, 0x98, 0xbd, 0xab, -0xd1, 0xc3, 0x9c, 0x18, 0x67, 0x76, 0x73, -0xc6, 0x55, 0x3a, 0xbf, 0x5d, 0x3d, 0x65, -0x1e, 0x50, 0x74, 0x31, 0x4f, 0x2d, 0x2a, -0x81, 0x91, 0x98, 0x91, 0xfb, 0x67, 0x5d, -0xdb, 0x13, 0x5d, 0xaf, 0xdc, 0x90, 0x87, -0x9d, 0x55, 0xb4, 0xbc, 0xa9, 0x3a, 0x73, -0xca, 0x2e, 0x22, 0xad, 0x64, 0xb2, 0xdf, -0x61, 0xbe, 0x85, 0x3b, 0xee, 0x50, 0xda, -0x90, 0x80, 0xb4, 0xaf, 0x13, 0xcb, 0xb6, -0x5c, 0xd0, 0x68, 0xc2, 0x21, 0x8e, 0x26, -0x34, 0xd1, 0xd6, 0x1b, 0x67, 0x3b, 0xce, -0xc3, 0x22, 0x45, 0x00, 0x1c, 0x2e, 0xe5, -0xbc, 0x10, 0x6f, 0x8d, 0x45, 0x0f, 0x1e, -0x8e, 0x77, 0x3d, 0xee, 0x8f, 0x7d, 0x94, -0x34, 0x24, 0xf9, 0xca, 0x55, 0xaa, 0x99, -0x63, 0x24, 0x55, 0x22, 0x3c, 0x3a, 0xee, -0x42, 0x9f, 0x2e, 0xfd, 0xb2, 0xad, 0x10, -0xe7, 0x34, 0xec, 0x9f, 0x1b, 0x06, 0x88, -0x7a, 0xba, 0x5d, 0xf8, 0xb7, 0x62, 0x0e, -0x6a, 0x84, 0x23, 0x1c, 0xfa, 0x15, 0xba, -0xe1, 0xcf, 0xa1, 0xb8, 0x88, 0xe2, 0x16, -0x5c, 0xdf, 0x15, 0x18, 0x42, 0xd5, 0x9c, -0xc7, 0x08, 0xfe, 0x9d, 0x50, 0x56, 0x72, -0x53, 0x99, 0x19, 0xb5, 0x67, 0x40, 0x96, -0x5f, 0x0c, 0x94, 0xcf, 0xa8, 0xc9, 0xbe, -0xcf, 0xb1, 0x7d, 0xf4, 0x55, 0xa4, 0x5e, -0xc0, 0xae, 0x03, 0x91, 0x98, 0x6e, 0x29, -0x56, 0xbb, 0xa3, 0xb2, 0xea, 0x45, 0xfb, -0xcb, 0x45, 0x33, 0x84, 0x0c, 0x14, 0x2d, -0x9d, 0x09, 0x72, 0x4f, 0x01, 0x58, 0x86, -0x07, 0x83, 0x3e, 0xfc, 0xa5, 0x89, 0x4e, -0xa7, 0xe4, 0xfd, 0x5e, 0x61, 0x47, 0x98, -0xa8, 0xec, 0x05, 0xdc, 0xe4, 0x92, 0x85, -0x5f, 0xd5, 0xeb, 0x26, 0x4f, 0x19, 0xde, -0xa1, 0xf6, 0xcd, 0xd4, 0xfa, 0x5e, 0x45, -0x25, 0x13, 0x39, 0x93, 0x80, 0x59, 0x90, -0xbf, 0xee, 0x0e, 0x74, 0x41, 0xdd, 0x41, -0xe2, 0x85, 0x9d, 0x39, 0xa1, 0xa1, 0xdf, -0xa0, 0x89, 0x7e, 0x79, 0x7c, 0xb9, 0x78, -0x12, 0x6b, 0x3f, 0x11, 0x59, 0x47, 0x34, -0x5b, 0x14, 0xb9, 0x98, 0x4e, 0x73, 0x46, -0x5a, 0xdf, 0xeb, 0x2f, 0x24, 0x22, 0x6a, -0x1c, 0x26, 0xe5, 0x07, 0x51, 0xee, 0x43, -0x95, 0xdd, 0xb0, 0xb2, 0x7a, 0x10, 0x0a, -0xcd, 0xdb, 0x8f, 0x62, 0x0c, 0xca, 0xb9, -0xd5, 0x07, 0x87, 0xde, 0x94, 0xb0, 0xc8, -0xa8, 0xa4, 0x32, 0xb6, 0x48, 0xb7, 0xbe, -0xce, 0x02, 0x43, 0x7e, 0x1f, 0x67, 0xbe, -0x60, 0x26, 0xa3, 0xb8, 0xa8, 0xb0, 0x89, -0xca, 0xd3, 0x92, 0x1f, 0xbb, 0xf8, 0x6a, -0xcb, 0xb3, 0x65, 0x44, 0x9e, 0x8b, 0xaa, -0x94, 0x77, 0x68, 0x1b, 0x38, 0xa1, 0x41, -0x9f, 0x54, 0xae, 0xd4, 0x4e, 0x61, 0x71, -0x8e, 0x78, 0x59, 0x93, 0x9c, 0xc5, 0x00, -0xa6, 0xd1, 0x0c, 0x69, 0x09, 0xbe, 0x59, -0x7c, 0xd7, 0x82, 0x30, 0x8b, 0xa2, 0x4a, -0xba, 0x7f, 0xb7, 0xe5, 0x5e, 0x91, 0x72, -0x5f, 0xb9, 0x06, 0xfe, 0x72, 0x06, 0xd9, -0xd3, 0xa4, 0xd3, 0xfa, 0xa2, 0xdb, 0xdb, -0xfc, 0x5c, 0x41, 0xcf, 0x3f, 0x84, 0xc4, -0x18, 0x9d, 0xe6, 0x93, 0x00, 0xe9, 0x19, -0x4b, 0x99, 0x4a, 0xf6, 0x56, 0xd8, 0x89, -0xd9, 0xbe, 0x7b, 0x75, 0xfd, 0x9b, 0x76, -0xa0, 0xa7, 0x62, 0x27, 0xe1, 0xca, 0xd2, -0x77, 0x06, 0x94, 0xd5, 0xc9, 0x0f, 0x32, -0xaf, 0x46, 0x9e, 0xc9, 0xd1, 0x0d, 0xc2, -0xfa, 0x62, 0x34, 0x9d, 0xe9, 0x67, 0x17, -0xf3, 0x49, 0x8e, 0x10, 0x12, 0x69, 0x8b, -0xe3, 0x3b, 0xfc, 0x73, 0x16, 0xf9, 0x81, -0xea, 0xa1, 0x5a, 0x11, 0xa5, 0xfe, 0x7a, -0x1b, 0xf4, 0x6c, 0xc1, 0xc0, 0xf9, 0x56, -0x1b, 0xad, 0xe5, 0xc6, 0xf2, 0xfe, 0x44, -0x5d, 0x5d, 0x16, 0x15, 0x5e, 0xe3, 0xdf, -0x30, 0x21, 0x13, 0x7b, 0x3d, 0x84, 0x09, -0x8c, 0x1c, 0x59, 0xa5, 0x22, 0x56, 0x28, -0xa6, 0xac, 0x36, 0xf1, 0x9f, 0x76, 0x21, -0x42, 0xc6, 0xf7, 0xb3, 0x12, 0xd6, 0x63, -0x2c, 0x89, 0xf3, 0x96, 0xf8, 0x9f, 0x66, -0xf2, 0x5c, 0xc8, 0x08, 0x59, 0xdd, 0x5d, -0xe8, 0x1e, 0xee, 0x1b, 0xaa, 0xb5, 0x47, -0x14, 0x77, 0xf0, 0x1f, 0x48, 0x59, 0x8a, -0x59, 0x6b, 0x6e, 0x06, 0xfe, 0x10, 0x03, -0x74, 0xef, 0xa1, 0xef, 0xed, 0x46, 0x78, -0xac, 0x62, 0x9c, 0xf2, 0xd3, 0x77, 0x1d, -0x40, 0xad, 0xdb, 0xab, 0xc7, 0x22, 0xf4, -0xd1, 0x34, 0x71, 0xfc, 0x7e, 0xb1, 0xc5, -0x4d, 0x85, 0x65, 0xb5, 0x3a, 0xba, 0xe4, -0xe3, 0xa9, 0xe6, 0xd4, 0xd6, 0x68, 0xe5, -0x5f, 0x06, 0x1b, 0x36, 0xdf, 0x86, 0x97, -0xa0, 0x08, 0x4a, 0x40, 0x74, 0x75, 0x5c, -0x21, 0x14, 0xe3, 0x2b, 0xb7, 0x88, 0x73, -0x52, 0x10, 0x70, 0x94, 0x99, 0x85, 0x8f, -0x08, 0xba, 0xac, 0xba, 0x73, 0x2e, 0x94, -0x9b, 0xc4, 0xcf, 0xa6, 0x09, 0x9d, 0x46, -0xcb, 0x71, 0x75, 0x42, 0x85, 0xba, 0xdf, -0x94, 0xb4, 0x3c, 0xff, 0xcb, 0x57, 0x27, -0xd2, 0x7c, 0xec, 0xd5, 0x24, 0x8c, 0xa6, -0x5a, 0x04, 0x5d, 0x98, 0x65, 0x57, 0x1c, -0xcb, 0x11, 0x1e, 0xfa, 0xe4, 0xfc, 0x53, -0xb3, 0x4b, 0x62, 0x10, 0xb7, 0x64, 0xf0, -0x54, 0x1a, 0x39, 0xf7, 0xcc, 0x15, 0x03, -0x8d, 0xf6, 0xaf, 0x34, 0x05, 0x50, 0xce, -0xc0, 0xc1, 0xd1, 0x14, 0x5d, 0x80, 0x37, -0xd4, 0x51, 0x54, 0x3d, 0xdc, 0xa9, 0x8c, -0x5e, 0xe2, 0xc2, 0x01, 0x86, 0x8c, 0x4b, -0x71, 0xf5, 0xf2, 0x3a, 0xfa, 0xb9, 0x2c, -0xec, 0x1b, 0xf8, 0xce, 0xce, 0xcf, 0xb5, -0x63, 0x31, 0x66, 0xa3, 0x21, 0xe6, 0xfd, -0x8b, 0x15, 0xd2, 0xff, 0xa5, 0x16, 0xab, -0x93, 0x23, 0xf5, 0xf4, 0x33, 0x92, 0xd3, -0x52, 0x05, 0x01, 0x42, 0x33, 0x36, 0x37, -0x6c, 0x58, 0xa2, 0x21, 0x3d, 0x86, 0xbb, -0x1e, 0x20, 0xc2, 0x6c, 0x50, 0x17, 0xc0, -0x31, 0xcc, 0x55, 0xdc, 0x76, 0x5e, 0x32, -0x9e, 0x5d, 0x54, 0x9d, 0xd3, 0xc9, 0xd9, -0x2d, 0x1c, 0xbf, 0x2d, 0x27, 0x8c, 0xf2, -0xf5, 0x22, 0x75, 0xbb, 0x8d, 0x27, 0x43, -0xd6, 0xc2, 0x84, 0x28, 0x63, 0x95, 0x4d, -0x13, 0x42, 0x80, 0x0a, 0x69, 0xaa, 0xef, -0xa2, 0x79, 0x56, 0xb9, 0x9f, 0x35, 0x75, -0x67, 0xaf, 0x13, 0x84, 0x68, 0xcb, 0xf5, -0x1f, 0x35, 0x6f, 0xe1, 0x45, 0x9b, 0x22, -0x69, 0x0a, 0x8f, 0x90, 0x7d, 0x37, 0x8e, -0x7e, 0xaa, 0x8e, 0xef, 0x25, 0x22, 0xf5, -0xe2, 0xa6, 0x69, 0xfb, 0x56, 0x79, 0xdc, -0xcb, 0x9c, 0xcb, 0xf2, 0xc5, 0x8b, 0xbe, -0x28, 0xc7, 0x75, 0x2f, 0x95, 0xf8, 0x36, -0xac, 0x3c, 0x52, 0x4d, 0x96, 0x95, 0xc3, -0xda, 0xb6, 0x0d, 0x45, 0x20, 0x1a, 0x25, -0x80, 0x1e, 0x7b, 0xa5, 0x33, 0x62, 0xbf, -0xb5, 0x66, 0xb5, 0x39, 0x0a, 0x86, 0xfb, -0xcf, 0xb5, 0xfe, 0x66, 0x81, 0xc8, 0x87, -0x0c, 0x69, 0x60, 0xbb, 0xc0, 0x39, 0xad, -0x21, 0x04, 0xbe, 0x57, 0xea, 0xa2, 0x8b, -0xf4, 0xde, 0x12, 0xbd, 0x58, 0x84, 0x21, -0xe3, 0x95, 0x4f, 0x1c, 0x5f, 0x35, 0xea, -0x2f, 0xed, 0x84, 0x43, 0x31, 0x88, 0x12, -0x98, 0x4a, 0x68, 0xe1, 0x66, 0x7c, 0x81, -0xc6, 0x57, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha512_sigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha512_sigrl.inc deleted file mode 100644 index 265b16633c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test0_sha512_sigrl.inc +++ /dev/null @@ -1,1222 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: grp01 - * Signer: member0 - * HashAlg: Sha512 - * Message: "test message" - * Basename: None (random base) - * SigRl: SigRl of group - */ -0x36, 0x19, 0x27, 0x2c, 0xcf, 0xa0, 0x7a, -0x44, 0x9c, 0xea, 0xe5, 0x77, 0x7e, 0x7d, -0x12, 0x33, 0xd9, 0x21, 0x41, 0x58, 0x9b, -0xaf, 0xcc, 0xa2, 0x2e, 0xe1, 0xe1, 0x27, -0x70, 0xe6, 0x2f, 0x8e, 0x70, 0x9d, 0x7c, -0x2b, 0x65, 0xf0, 0xd6, 0xe3, 0x89, 0x5b, -0x8a, 0x82, 0x68, 0x2a, 0x2f, 0x44, 0xbb, -0xba, 0xbe, 0xbf, 0xed, 0x94, 0x87, 0x5b, -0xf4, 0x2a, 0xde, 0xb2, 0xe6, 0xee, 0x57, -0x17, 0x71, 0xec, 0xf4, 0x3d, 0x7c, 0x44, -0x2d, 0x77, 0x42, 0xc6, 0x22, 0x88, 0xc4, -0x80, 0xe3, 0x99, 0x79, 0x7d, 0xe8, 0xf0, -0xaf, 0x37, 0x67, 0x66, 0xe8, 0xa8, 0x63, -0xd7, 0x88, 0xd6, 0xf7, 0x2e, 0x2b, 0x98, -0xcc, 0x0a, 0x96, 0xef, 0x72, 0xfe, 0x47, -0xf7, 0x46, 0x4c, 0x0b, 0x79, 0x94, 0x8c, -0x6a, 0x1f, 0x09, 0x30, 0x31, 0x29, 0xd2, -0x86, 0xed, 0x93, 0xd9, 0xed, 0x9e, 0x88, -0xd2, 0x9b, 0x44, 0x15, 0x36, 0x91, 0x33, -0x62, 0x44, 0xcf, 0xab, 0x0d, 0xf0, 0x24, -0x86, 0x3f, 0x10, 0x74, 0x42, 0x37, 0xbb, -0x1a, 0x67, 0xf4, 0x16, 0x61, 0xc7, 0x5e, -0x30, 0x18, 0x86, 0x28, 0xa2, 0x3a, 0x68, -0xe2, 0xec, 0x6e, 0xa4, 0x5f, 0x1e, 0x81, -0xf1, 0x09, 0xcc, 0x8c, 0xde, 0xe5, 0x3f, -0xc3, 0x6e, 0xfe, 0x19, 0x4f, 0x51, 0xa6, -0x66, 0x69, 0xf2, 0x38, 0xac, 0xad, 0xd9, -0xe8, 0xe2, 0x81, 0x5d, 0xde, 0x68, 0xa8, -0x7e, 0x87, 0xfc, 0x67, 0xda, 0x14, 0xab, -0x14, 0xf0, 0x42, 0x73, 0x8b, 0x2f, 0x82, -0x3b, 0xce, 0x2e, 0x1f, 0x8d, 0xc8, 0x6e, -0x3a, 0x6a, 0x0e, 0x8b, 0x9f, 0x8d, 0x58, -0xbc, 0x32, 0x42, 0x14, 0x07, 0x5c, 0x4c, -0x51, 0xd8, 0xb6, 0x59, 0x29, 0xf7, 0xe7, -0x68, 0xa7, 0x27, 0x43, 0x75, 0x2d, 0x6b, -0x0b, 0x0a, 0x4f, 0x9e, 0x85, 0xe0, 0x84, -0xf2, 0x65, 0x25, 0xbd, 0x33, 0x76, 0xb7, -0xee, 0x5d, 0xab, 0x4d, 0x2e, 0x33, 0xfd, -0x93, 0xff, 0x74, 0x4d, 0x23, 0x99, 0xb4, -0xaa, 0x10, 0x3a, 0xa5, 0x41, 0xb4, 0x18, -0x38, 0xfc, 0x20, 0x04, 0x69, 0xb9, 0x8e, -0xae, 0x5f, 0x77, 0xd8, 0x92, 0x15, 0xa4, -0x5b, 0x4b, 0x46, 0x75, 0xdc, 0x77, 0xf8, -0xdb, 0x58, 0x7a, 0xf8, 0xd3, 0x50, 0xa6, -0x3b, 0x52, 0x10, 0x8b, 0x0f, 0x5c, 0x3d, -0xeb, 0xb9, 0xf0, 0x11, 0xe7, 0xab, 0x1d, -0x24, 0xc6, 0x99, 0x13, 0xbf, 0xc6, 0x41, -0xbd, 0xf8, 0x13, 0xe1, 0x06, 0xb8, 0xb5, -0xb3, 0x94, 0xcb, 0xc1, 0x65, 0xf2, 0x9a, -0x47, 0x05, 0x87, 0xb6, 0x81, 0x8d, 0xd9, -0x19, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x32, 0x97, 0x36, 0xc2, 0x28, -0x13, 0xa6, 0xce, 0x2a, 0x82, 0xf5, 0x7e, -0xce, 0xdb, 0x7e, 0x95, 0x97, 0x71, 0xce, -0xf0, 0xa6, 0xbd, 0x9a, 0x09, 0x6c, 0x4b, -0x5c, 0x64, 0xbc, 0xb6, 0x56, 0xfb, 0x5c, -0xec, 0x0e, 0xc6, 0x33, 0x54, 0xa0, 0x4d, -0x21, 0xdf, 0x03, 0xc4, 0xc8, 0x6a, 0x28, -0xa3, 0xde, 0x94, 0x2c, 0x1b, 0x81, 0x47, -0x71, 0xe9, 0xe0, 0xe7, 0x2a, 0x2e, 0x37, -0x04, 0x0a, 0x86, 0x0f, 0x9f, 0xa4, 0x25, -0x70, 0xd8, 0x52, 0xf4, 0x03, 0xdc, 0x10, -0x93, 0x37, 0x9e, 0x23, 0xd9, 0x95, 0x59, -0x66, 0xa0, 0x65, 0x00, 0x10, 0x27, 0xb3, -0x78, 0xf2, 0x4a, 0xef, 0xab, 0x60, 0xed, -0x21, 0x22, 0xb6, 0x5d, 0x1e, 0x90, 0x16, -0xdf, 0xcc, 0x94, 0x54, 0x01, 0x3f, 0x06, -0xfa, 0xdc, 0x59, 0xb9, 0x68, 0x95, 0xd1, -0x71, 0x59, 0x06, 0x1d, 0xfe, 0xf4, 0x16, -0x57, 0x19, 0x01, 0xc1, 0xd0, 0x7d, 0x6d, -0x41, 0xee, 0x8e, 0xe0, 0x11, 0xd1, 0x95, -0xde, 0xb5, 0x11, 0xa5, 0x61, 0xc6, 0xbf, -0xb4, 0x4c, 0x9b, 0xb2, 0xc1, 0xb7, 0x32, -0xb0, 0x45, 0x1c, 0xd5, 0x9d, 0x4e, 0x50, -0x52, 0xa6, 0x2a, 0x1d, 0xc6, 0xef, 0xc7, -0x53, 0xe6, 0x53, 0xbf, 0x7c, 0x3d, 0xed, -0x79, 0x88, 0xd6, 0xbb, 0xf8, 0x2d, 0xeb, -0x1a, 0x87, 0xd4, 0xee, 0xc4, 0x30, 0xbd, -0xa0, 0x36, 0x98, 0xe5, 0x0a, 0xa5, 0x04, -0xb5, 0xaa, 0x25, 0x00, 0xc8, 0x0b, 0xee, -0x66, 0xe8, 0xc4, 0x6e, 0x9f, 0xb9, 0xea, -0x29, 0xdb, 0xb2, 0x70, 0xfc, 0x75, 0xc8, -0xef, 0x52, 0xd7, 0x4b, 0xa0, 0x15, 0x9c, -0xf0, 0x4a, 0xc5, 0x1a, 0x8f, 0x1e, 0xb3, -0xf3, 0xdc, 0xe0, 0x95, 0x5a, 0x07, 0x7d, -0x8c, 0xfd, 0x2d, 0xeb, 0x20, 0x3e, 0xce, -0x59, 0x63, 0x65, 0x59, 0x41, 0xf5, 0xde, -0x3b, 0xb9, 0xd3, 0x0d, 0x88, 0xbc, 0xf4, -0xf2, 0x95, 0x89, 0x29, 0x75, 0xeb, 0xbc, -0xc3, 0x80, 0xe3, 0x5e, 0x06, 0x84, 0x10, -0xc6, 0xb2, 0xd4, 0x61, 0x99, 0x4f, 0xe8, -0x34, 0xcc, 0xfb, 0x22, 0x61, 0x9f, 0x24, -0xe1, 0x5f, 0xf2, 0x56, 0x54, 0x01, 0x05, -0xde, 0x2c, 0x21, 0xb4, 0x20, 0xbf, 0x86, -0x1e, 0xef, 0x88, 0x35, 0xfb, 0xac, 0xcf, -0x94, 0xcf, 0xb3, 0x66, 0x58, 0x2c, 0x53, -0xdf, 0x87, 0xc9, 0xa2, 0x27, 0xa8, 0xe4, -0x10, 0xb0, 0xe9, 0xee, 0x27, 0x4f, 0x25, -0x29, 0x0f, 0x96, 0xa0, 0x26, 0xe7, 0xa6, -0xd6, 0xf2, 0x03, 0x85, 0x3b, 0x2e, 0xc6, -0x78, 0xe7, 0x77, 0x8d, 0x4f, 0xba, 0x03, -0x55, 0xeb, 0xdb, 0xac, 0x3d, 0x77, 0xdf, -0xdc, 0x27, 0xad, 0x71, 0x6c, 0xb9, 0xee, -0x87, 0xc8, 0x51, 0x3f, 0xe5, 0xe1, 0xa0, -0x3d, 0x42, 0xc9, 0xf2, 0x87, 0x7b, 0x0b, -0xe3, 0x68, 0xbc, 0xbc, 0xea, 0x79, 0xd2, -0x99, 0x0a, 0xdc, 0x37, 0x39, 0x68, 0xf2, -0x5d, 0x09, 0xe4, 0xba, 0xc6, 0xf6, 0xd9, -0xfa, 0xab, 0x90, 0x2c, 0x0f, 0x08, 0x8d, -0xca, 0x14, 0xe1, 0xd8, 0xe9, 0xc8, 0x38, -0x63, 0x00, 0x5f, 0x87, 0xba, 0x7e, 0x83, -0x1b, 0x7d, 0x31, 0xcb, 0x54, 0x50, 0xca, -0xe0, 0x96, 0x34, 0x4b, 0xdc, 0x71, 0x17, -0xcb, 0x79, 0x1b, 0xa2, 0xae, 0x6f, 0xf2, -0x1f, 0x62, 0xc1, 0x24, 0xc2, 0x30, 0x77, -0x6c, 0x51, 0x23, 0x62, 0x1c, 0x4b, 0x0f, -0xb5, 0x63, 0xc1, 0xd6, 0x12, 0x10, 0x77, -0x11, 0x35, 0x01, 0xd9, 0xbd, 0x90, 0x02, -0x39, 0x8c, 0x2d, 0x12, 0xbe, 0x77, 0x02, -0x65, 0x9c, 0x66, 0xa5, 0x5d, 0xbe, 0x18, -0x01, 0xb2, 0x41, 0xc1, 0x9e, 0x38, 0x7e, -0xab, 0x05, 0x48, 0xbe, 0x95, 0x09, 0x9f, -0x02, 0x01, 0x15, 0xa6, 0x3d, 0xfa, 0xa7, -0xf9, 0xac, 0xe4, 0xc0, 0xb1, 0x22, 0x82, -0xfc, 0x37, 0x9b, 0xbd, 0xdb, 0xec, 0x23, -0x3e, 0xec, 0xd8, 0x64, 0x35, 0xe9, 0x81, -0xab, 0x15, 0x54, 0x28, 0x65, 0xf3, 0x2b, -0xe1, 0x3e, 0x9e, 0x6c, 0x45, 0x43, 0xdf, -0x76, 0x00, 0x37, 0xf4, 0x52, 0x8b, 0x68, -0xce, 0xdb, 0x29, 0x71, 0x1d, 0x5e, 0x1f, -0x94, 0x7f, 0x46, 0xfc, 0x2b, 0x34, 0x1b, -0xbb, 0xee, 0x0e, 0xa5, 0x57, 0x8e, 0xe1, -0x51, 0x4d, 0x54, 0xbc, 0x62, 0x19, 0xe3, -0xec, 0x5d, 0x10, 0xa0, 0x94, 0x8d, 0x8d, -0xb2, 0xca, 0x19, 0xac, 0x49, 0xa9, 0x4e, -0x9a, 0x9f, 0xcc, 0x77, 0x1d, 0x3e, 0x14, -0xe2, 0x99, 0xac, 0x58, 0x1d, 0xe0, 0xd0, -0x7e, 0x01, 0xe2, 0x46, 0x4b, 0x22, 0x10, -0x66, 0x04, 0x6a, 0x18, 0x3d, 0x60, 0x3c, -0xc7, 0x13, 0x65, 0xb9, 0xba, 0x8e, 0xfe, -0xf8, 0x2a, 0x37, 0x06, 0xf1, 0xd2, 0x84, -0xc7, 0x80, 0xfc, 0x51, 0x8b, 0xbf, 0x7d, -0xe1, 0x70, 0xd1, 0xc4, 0xf8, 0xa9, 0x30, -0xc3, 0xec, 0xa0, 0xff, 0xdb, 0xda, 0xd3, -0x3e, 0x7d, 0x72, 0x04, 0x8f, 0x68, 0x76, -0xe6, 0x30, 0xb2, 0x13, 0xde, 0x8c, 0xe9, -0x07, 0xc2, 0xbf, 0x3a, 0x78, 0xf0, 0xf0, -0xd4, 0xc1, 0xdb, 0x64, 0x69, 0x26, 0x5d, -0x4f, 0xac, 0x98, 0x66, 0x4d, 0x20, 0x0d, -0xc0, 0x9c, 0x56, 0x94, 0xd8, 0xe2, 0x84, -0xa9, 0x32, 0x4c, 0x10, 0x47, 0x68, 0x2b, -0x33, 0x8c, 0x16, 0xb0, 0xf9, 0x35, 0x36, -0x65, 0x53, 0xc8, 0x23, 0x7e, 0x6b, 0x07, -0x2d, 0x2d, 0x32, 0x20, 0x1a, 0x4c, 0xe9, -0xe9, 0x84, 0x25, 0x4d, 0xc3, 0x8e, 0x70, -0xa6, 0x47, 0xd1, 0xe5, 0xfd, 0x72, 0xa6, -0xf5, 0x7c, 0x9a, 0x93, 0x0e, 0x23, 0xe0, -0x98, 0xb9, 0x64, 0x1f, 0x9a, 0x64, 0xc0, -0xd4, 0x0a, 0xe5, 0xbb, 0x17, 0x3e, 0x3a, -0x94, 0xe3, 0x81, 0xd6, 0x75, 0x5c, 0x8e, -0xf3, 0xf6, 0x9f, 0x80, 0xb5, 0x1e, 0xef, -0xd6, 0x58, 0x31, 0x8b, 0x94, 0xe0, 0xed, -0x3a, 0x5b, 0xcf, 0xca, 0x26, 0x34, 0xe8, -0xa1, 0x70, 0xc3, 0xbe, 0x23, 0x0a, 0x47, -0x36, 0xeb, 0xc8, 0xfc, 0x8a, 0x26, 0xf7, -0x60, 0x44, 0x48, 0x4e, 0x08, 0x40, 0x73, -0xb3, 0x3e, 0xa0, 0x5e, 0xa0, 0x5c, 0x74, -0x5d, 0x21, 0xfc, 0x00, 0x57, 0xbf, 0x23, -0xda, 0xae, 0x49, 0xac, 0x6a, 0x10, 0xe6, -0x1e, 0x1b, 0x19, 0xe6, 0xce, 0x41, 0x6c, -0x3c, 0xe7, 0x45, 0x3c, 0xcb, 0x75, 0xa9, -0xd7, 0x60, 0x0d, 0x43, 0x69, 0x1e, 0xc2, -0x47, 0xea, 0x07, 0x46, 0x2c, 0x58, 0x25, -0x1e, 0x10, 0xe9, 0xc8, 0x8a, 0x14, 0x85, -0x6f, 0x49, 0x37, 0xd7, 0xfb, 0x07, 0x82, -0x4a, 0x6a, 0x5a, 0x3e, 0x95, 0x7c, 0x2c, -0x05, 0xc4, 0x50, 0x82, 0xaa, 0x9e, 0x6b, -0x27, 0x35, 0x48, 0x42, 0x8e, 0x5a, 0x5f, -0x4c, 0x7e, 0xd4, 0x7c, 0x08, 0x77, 0x1e, -0x91, 0x42, 0xd8, 0x3f, 0xbe, 0xed, 0x3b, -0x64, 0x58, 0x57, 0x95, 0xc7, 0x92, 0x94, -0xcf, 0xce, 0x22, 0x73, 0xe3, 0x32, 0xe5, -0x15, 0xa9, 0xbb, 0x6f, 0x27, 0xb9, 0xf3, -0xf1, 0xe4, 0xfd, 0xaf, 0xf5, 0x02, 0x86, -0xb2, 0x4e, 0x50, 0x5b, 0xef, 0xa0, 0xac, -0x0c, 0xa9, 0xba, 0x78, 0xe1, 0xbe, 0x4d, -0x1b, 0x74, 0x9f, 0x36, 0xa4, 0x58, 0x4b, -0xcf, 0x7b, 0xc2, 0xac, 0x3f, 0x1d, 0x8a, -0x9f, 0x81, 0x15, 0x70, 0x8e, 0x43, 0x0b, -0x2b, 0xcb, 0xf4, 0x93, 0x76, 0x97, 0x74, -0x61, 0xaf, 0x2e, 0x7d, 0xfe, 0x11, 0x74, -0x03, 0x8f, 0x38, 0x32, 0x7c, 0x1f, 0xf6, -0x46, 0x68, 0xac, 0x29, 0x48, 0x3e, 0x63, -0xac, 0x64, 0x10, 0x97, 0x1a, 0x22, 0x67, -0x09, 0x51, 0x0c, 0x46, 0x7e, 0xab, 0x21, -0x72, 0xbf, 0x12, 0x69, 0x99, 0x7c, 0xef, -0x07, 0x39, 0x33, 0x63, 0xf8, 0x16, 0x70, -0xe8, 0x25, 0x62, 0x90, 0xa4, 0xd4, 0x10, -0x77, 0xbf, 0x20, 0xac, 0x00, 0xc8, 0x85, -0x12, 0x34, 0x52, 0x1a, 0x77, 0x2a, 0xb7, -0x42, 0x27, 0xcf, 0x2d, 0x1b, 0x15, 0x29, -0x60, 0xdc, 0x61, 0xdf, 0x0d, 0x97, 0xac, -0x71, 0x86, 0xae, 0x93, 0x78, 0xdf, 0xc4, -0xa2, 0x1a, 0xb9, 0x30, 0x23, 0xd0, 0x37, -0xd4, 0x3a, 0x14, 0x67, 0x80, 0xb7, 0xfd, -0x41, 0x89, 0xc3, 0x5b, 0x72, 0xa7, 0x55, -0x76, 0xdf, 0x73, 0x43, 0x9d, 0x40, 0xd6, -0xd8, 0x93, 0xee, 0x39, 0x54, 0xf3, 0x65, -0x15, 0x76, 0xa9, 0x90, 0xe3, 0x5a, 0xea, -0xda, 0xc9, 0x19, 0x9e, 0x4e, 0x30, 0x43, -0x07, 0xcc, 0x24, 0x40, 0x73, 0x91, 0xaf, -0x8d, 0x42, 0x65, 0x0e, 0x01, 0x07, 0x5a, -0xd8, 0xee, 0x8d, 0x20, 0x09, 0xfe, 0x2b, -0x08, 0x63, 0x62, 0xc6, 0xdb, 0x1d, 0xac, -0x9b, 0xbc, 0x97, 0x15, 0xba, 0x45, 0x1f, -0x05, 0x1a, 0xe4, 0xbb, 0x1a, 0xeb, 0x2a, -0xc6, 0x3a, 0xd5, 0xdc, 0x14, 0x90, 0x90, -0x29, 0x8d, 0xe1, 0x2b, 0x37, 0x50, 0x63, -0x1f, 0xcc, 0x73, 0xbe, 0x46, 0x69, 0xeb, -0x67, 0x75, 0xd6, 0x18, 0xc7, 0xde, 0x39, -0xd3, 0x26, 0x1f, 0xd3, 0x92, 0x27, 0x65, -0xec, 0xd0, 0x6a, 0xb3, 0xca, 0x84, 0x47, -0x97, 0xb9, 0x07, 0x70, 0xc5, 0xcf, 0xa1, -0xf0, 0x54, 0x99, 0x32, 0x1b, 0x1a, 0x15, -0xd7, 0x49, 0xd3, 0x50, 0x36, 0x20, 0x99, -0xde, 0xf8, 0xc3, 0x06, 0xa9, 0x99, 0x29, -0x91, 0x9c, 0xed, 0xf5, 0xad, 0x30, 0x78, -0x6f, 0xdb, 0xca, 0x37, 0x10, 0xf1, 0x8c, -0xf5, 0x23, 0x0b, 0x08, 0x81, 0xf3, 0x89, -0x1d, 0x82, 0xc2, 0x5c, 0x52, 0x69, 0x28, -0x5e, 0x63, 0x82, 0x85, 0xc6, 0xc3, 0x7d, -0x31, 0x64, 0x09, 0x7d, 0xac, 0xbc, 0x03, -0x1e, 0xe0, 0xe9, 0xba, 0xf3, 0xc3, 0xfd, -0xdd, 0xd2, 0x6d, 0x21, 0xd7, 0xa3, 0x9d, -0x2c, 0x80, 0x5f, 0xb8, 0x89, 0x45, 0xad, -0xeb, 0x92, 0xf1, 0x86, 0x43, 0x15, 0x7e, -0x21, 0xbc, 0x06, 0xba, 0xe3, 0x78, 0xf8, -0x85, 0xc0, 0x90, 0x71, 0x16, 0xdb, 0x6f, -0x21, 0x0b, 0xd4, 0x69, 0x34, 0x35, 0x4e, -0x1c, 0xc1, 0x83, 0x2b, 0x4e, 0x2f, 0x2f, -0xb4, 0xf5, 0x2b, 0x94, 0x91, 0xdf, 0x97, -0x65, 0xd0, 0x79, 0x74, 0xd7, 0x61, 0x12, -0x3e, 0xf8, 0xaa, 0xfe, 0x74, 0x54, 0x09, -0x38, 0x0c, 0xdf, 0xb7, 0x50, 0x9e, 0x03, -0xab, 0x6d, 0xe4, 0x7c, 0x62, 0xe0, 0xc7, -0x9d, 0x80, 0xa4, 0x02, 0x64, 0x1f, 0x4f, -0x4b, 0x22, 0x5c, 0xf9, 0x10, 0xc1, 0xc8, -0x5e, 0x73, 0x65, 0xd8, 0xd7, 0xf3, 0x5f, -0xb4, 0xc9, 0x25, 0xbf, 0x55, 0xea, 0x09, -0x14, 0x42, 0x69, 0x19, 0x5c, 0x2b, 0xfa, -0x3d, 0x79, 0x2c, 0x66, 0xa4, 0x99, 0x63, -0x96, 0x1c, 0xe0, 0xbb, 0x5a, 0x52, 0x65, -0x56, 0x77, 0x2e, 0x47, 0x94, 0xc6, 0x4d, -0x12, 0x03, 0xb0, 0x23, 0x89, 0x25, 0xc8, -0x59, 0xdf, 0x1a, 0xb6, 0x01, 0x42, 0x45, -0x12, 0x3a, 0xbd, 0xb6, 0x22, 0xbe, 0x7c, -0x64, 0x04, 0x07, 0xe4, 0x90, 0xca, 0x55, -0x94, 0x24, 0xd2, 0xf5, 0x84, 0xf9, 0x1b, -0xa5, 0xaa, 0xed, 0xec, 0xb5, 0xc4, 0x9e, -0xaf, 0xda, 0x54, 0x5d, 0x32, 0xfd, 0xe1, -0x4f, 0x77, 0xa9, 0xdb, 0x77, 0x50, 0x54, -0x75, 0xcd, 0x4e, 0x9a, 0xd9, 0x87, 0x25, -0xae, 0x5a, 0x73, 0x36, 0x5d, 0x80, 0xa8, -0x70, 0x76, 0x8a, 0xc5, 0x42, 0xb2, 0xc1, -0xed, 0x8e, 0x3b, 0xf8, 0x1c, 0xbf, 0x99, -0x8a, 0x9b, 0x5d, 0x83, 0xf8, 0x55, 0x91, -0xd9, 0xd9, 0x80, 0x17, 0xde, 0xea, 0xa1, -0xf2, 0x47, 0xc2, 0xbd, 0xfa, 0x3b, 0x47, -0x1b, 0x57, 0xe0, 0xbd, 0x7d, 0xa5, 0x67, -0x7a, 0x86, 0xae, 0x64, 0x74, 0x57, 0xd6, -0x9d, 0x34, 0xe8, 0x48, 0xf8, 0x1d, 0xce, -0x40, 0x32, 0x6e, 0xb4, 0x80, 0xaa, 0xae, -0xb8, 0x10, 0x23, 0x1c, 0x03, 0x2d, 0x68, -0x7c, 0x17, 0xb2, 0x10, 0xec, 0x22, 0xa4, -0x11, 0x0a, 0xcb, 0xe8, 0xcc, 0x56, 0x11, -0xe4, 0x61, 0xf2, 0x13, 0xf7, 0x9a, 0x67, -0x3f, 0x82, 0x92, 0xcc, 0x56, 0xd7, 0xc4, -0x2a, 0xd1, 0x49, 0x22, 0x9a, 0xa1, 0xcf, -0x2a, 0xea, 0xe8, 0xd6, 0xac, 0x49, 0x3d, -0x8a, 0x77, 0xc7, 0x3f, 0x29, 0xbf, 0x93, -0x49, 0x22, 0x93, 0xe2, 0xc0, 0xf1, 0x66, -0xe0, 0xbe, 0x32, 0x94, 0x13, 0x4b, 0x4a, -0x70, 0xa0, 0xfe, 0xfb, 0xa3, 0xe7, 0x99, -0xd0, 0x9d, 0xc1, 0x89, 0x91, 0xe4, 0x78, -0xc3, 0xf0, 0xb2, 0xae, 0x27, 0x71, 0xc8, -0x87, 0x1d, 0xaa, 0x40, 0x44, 0x23, 0x68, -0x9f, 0x51, 0xd5, 0x8b, 0x88, 0xf3, 0x29, -0x2f, 0xf5, 0xdf, 0x31, 0xa5, 0xcd, 0x8e, -0xc2, 0x16, 0x2f, 0x0f, 0x69, 0x45, 0xb8, -0x9b, 0xa5, 0x6f, 0x06, 0x43, 0x15, 0xbb, -0xaa, 0xf0, 0xa1, 0xd4, 0x5e, 0xf8, 0xbb, -0xe5, 0x8c, 0x83, 0x6a, 0x4b, 0x87, 0xf2, -0xa9, 0x61, 0x48, 0xe2, 0xcb, 0x8a, 0xcf, -0x0c, 0x77, 0x7d, 0x0b, 0xb9, 0x29, 0x80, -0x69, 0x90, 0x41, 0x31, 0x6b, 0x02, 0x49, -0xb7, 0xb6, 0x27, 0xca, 0x64, 0x2a, 0x1e, -0xa4, 0x3c, 0xda, 0x95, 0xa1, 0xb0, 0xa2, -0x81, 0x90, 0xce, 0xcd, 0x93, 0xc2, 0x88, -0xac, 0xb2, 0x5f, 0x2c, 0x0e, 0x72, 0x05, -0x9d, 0x93, 0xb3, 0x46, 0x30, 0x1f, 0xef, -0xf4, 0xe9, 0xaf, 0x92, 0xb9, 0x92, 0x89, -0xfc, 0xa6, 0x2e, 0xb4, 0x2a, 0xee, 0x34, -0x27, 0xcf, 0xb7, 0xdb, 0x36, 0xf4, 0x88, -0x60, 0xd6, 0xeb, 0x6b, 0x2a, 0x38, 0x35, -0xe6, 0x4a, 0xbf, 0x57, 0xe9, 0x1d, 0x50, -0x40, 0xd9, 0x74, 0xe9, 0xc5, 0x03, 0x2a, -0xde, 0x1e, 0x95, 0xc7, 0xd4, 0xd2, 0x58, -0x70, 0xdb, 0x20, 0xaa, 0x46, 0x94, 0x55, -0xd8, 0x19, 0xc7, 0xe6, 0xd4, 0x9b, 0x25, -0x4f, 0x5d, 0xf9, 0x57, 0x9d, 0xb3, 0x21, -0x31, 0x95, 0x7c, 0xb6, 0xcb, 0x67, 0x4d, -0x2f, 0xd7, 0xa7, 0xdd, 0xe5, 0x08, 0xf7, -0xf2, 0x13, 0x99, 0x98, 0x84, 0x8d, 0xef, -0x7d, 0xed, 0x17, 0xa1, 0x8c, 0x78, 0x45, -0x36, 0x54, 0x78, 0xf3, 0xcb, 0x3d, 0x23, -0x34, 0xcd, 0x94, 0xd8, 0x79, 0x88, 0x7d, -0xca, 0x3b, 0x0b, 0x69, 0x21, 0xe0, 0x4b, -0x5f, 0x5f, 0x56, 0x34, 0xba, 0x73, 0xb3, -0xe5, 0x04, 0xf2, 0x76, 0xaf, 0x19, 0x8c, -0x4b, 0x3c, 0xf2, 0xd7, 0x9d, 0x5e, 0x3e, -0x0e, 0x0b, 0x74, 0xb1, 0xf4, 0x51, 0x5b, -0x5f, 0x9f, 0xdc, 0xa5, 0x4f, 0x95, 0x05, -0x3a, 0xb9, 0x60, 0x87, 0xc2, 0xda, 0xb1, -0xa9, 0xc0, 0x85, 0xf6, 0xf4, 0x3c, 0xd9, -0x3a, 0x39, 0x5d, 0x80, 0xfa, 0x93, 0x56, -0xbc, 0x4c, 0x7e, 0xb1, 0x8a, 0x34, 0x9a, -0x0a, 0xeb, 0xd4, 0x83, 0x0e, 0xb1, 0x34, -0x56, 0xdb, 0x9a, 0xca, 0xbb, 0x0d, 0x34, -0x9c, 0x38, 0x74, 0x6b, 0xee, 0x67, 0x65, -0xb4, 0xee, 0xb3, 0x65, 0xc4, 0x22, 0xeb, -0x4b, 0x7d, 0x67, 0xe5, 0x83, 0x8d, 0xf4, -0x92, 0x02, 0x88, 0xad, 0x85, 0xe7, 0xbd, -0xfd, 0x9f, 0xd8, 0x55, 0x86, 0x8e, 0x0d, -0x1a, 0xff, 0x1a, 0x0a, 0x5d, 0xf9, 0x0a, -0xc3, 0xa3, 0x66, 0x35, 0xab, 0x09, 0xe2, -0x64, 0x25, 0x02, 0x6e, 0xbb, 0xca, 0x62, -0xd2, 0xbe, 0x1e, 0xb1, 0x8f, 0x16, 0xb5, -0x40, 0x56, 0x86, 0x97, 0x57, 0x35, 0xbf, -0x1d, 0xdd, 0x70, 0x28, 0x1d, 0xd5, 0x0a, -0x92, 0x9e, 0x94, 0x35, 0xcb, 0xdc, 0xe2, -0x56, 0xc3, 0x6f, 0x46, 0x35, 0x73, 0xee, -0xfd, 0x02, 0x6e, 0x63, 0xad, 0x46, 0x26, -0xb8, 0x71, 0x6f, 0x4a, 0x67, 0x0d, 0x70, -0x33, 0x82, 0x90, 0x90, 0x16, 0x00, 0xcd, -0x54, 0x93, 0xb3, 0xc2, 0x67, 0xdf, 0x6f, -0x23, 0x34, 0x29, 0x19, 0x02, 0xad, 0x0b, -0xd0, 0x8e, 0xd9, 0xc8, 0x3d, 0x17, 0x10, -0xc8, 0x0a, 0x6c, 0x1f, 0x62, 0x3e, 0xed, -0x72, 0xde, 0x5c, 0x1b, 0x8d, 0xcf, 0xec, -0xd8, 0xf2, 0x68, 0x46, 0x8f, 0x5a, 0x26, -0x1c, 0x4e, 0x31, 0x7e, 0x65, 0x4b, 0xc7, -0xd6, 0x4e, 0x9d, 0xe4, 0x06, 0x98, 0x1e, -0xef, 0x79, 0x41, 0xfe, 0x9d, 0xe1, 0x68, -0xbf, 0x45, 0x17, 0xb7, 0x34, 0x90, 0x7c, -0xa6, 0xf2, 0xe7, 0xa7, 0x59, 0xc0, 0x12, -0xb0, 0xce, 0x62, 0x1c, 0x22, 0x31, 0x52, -0x8d, 0x3f, 0x55, 0x41, 0x92, 0x0a, 0xa5, -0x1e, 0x1d, 0x3c, 0x84, 0xd2, 0xba, 0x5d, -0x83, 0x83, 0xe9, 0x8e, 0xca, 0xbc, 0xb4, -0x44, 0xc7, 0x9b, 0x7c, 0xdd, 0x3b, 0xcf, -0xe2, 0xe3, 0x82, 0x3b, 0x05, 0x12, 0x2f, -0xf1, 0x7a, 0x62, 0x72, 0xcb, 0xce, 0x3f, -0xc4, 0xbc, 0xe9, 0x22, 0x34, 0x2f, 0x76, -0xe7, 0x0f, 0xa3, 0xda, 0x73, 0x1c, 0xe9, -0xe6, 0x51, 0x39, 0x85, 0xb0, 0xf2, 0xab, -0xc3, 0x65, 0xd3, 0x18, 0xe5, 0xd7, 0xc4, -0x64, 0x90, 0xee, 0xe4, 0x9c, 0xc3, 0x69, -0xe7, 0x9a, 0x1a, 0x7d, 0x1e, 0x43, 0xc8, -0xe2, 0x31, 0x50, 0x07, 0xd1, 0xb5, 0xb6, -0x25, 0x56, 0x90, 0x19, 0x38, 0xb9, 0x3e, -0x2b, 0x3e, 0xcd, 0xcd, 0x74, 0xc1, 0x40, -0x61, 0xdb, 0xd4, 0xcf, 0xae, 0x88, 0xc0, -0xc9, 0x19, 0xb4, 0xcc, 0x4e, 0x6e, 0x06, -0x50, 0xf6, 0x3c, 0x3e, 0xc7, 0x48, 0xb1, -0x9e, 0x32, 0xe3, 0x54, 0x05, 0xac, 0x41, -0xd8, 0x31, 0xb6, 0xb3, 0x6e, 0xf1, 0x4d, -0xfe, 0xd4, 0x38, 0x2e, 0xff, 0x2f, 0x3a, -0x61, 0xa3, 0xe7, 0x77, 0x99, 0xcb, 0x27, -0xb8, 0x26, 0xab, 0xc4, 0x10, 0xe3, 0xdf, -0x93, 0x05, 0x2b, 0x95, 0x7e, 0xca, 0x2e, -0x6c, 0xe2, 0x9b, 0x29, 0x84, 0xca, 0x6c, -0xad, 0x9b, 0x59, 0xc6, 0x69, 0x03, 0x78, -0x34, 0x13, 0xd6, 0x7f, 0xf9, 0x94, 0xcd, -0xce, 0x79, 0x2b, 0x98, 0x2d, 0xc6, 0xb7, -0xbe, 0xe2, 0x05, 0x2d, 0xdd, 0xae, 0x62, -0x4c, 0xb9, 0x12, 0xc9, 0xfe, 0x0d, 0x8b, -0x90, 0x19, 0xd1, 0x75, 0xfc, 0x5f, 0x6d, -0x21, 0x86, 0x0b, 0x2d, 0x5f, 0xd1, 0x1c, -0xde, 0xb4, 0x32, 0x69, 0x6b, 0x41, 0x6d, -0xbe, 0xfe, 0xb9, 0x62, 0xba, 0x5d, 0x5b, -0x28, 0x73, 0xd5, 0xdb, 0x7b, 0x71, 0x88, -0x28, 0x86, 0xb2, 0x1a, 0x6c, 0xa7, 0x52, -0x79, 0x84, 0x74, 0xd7, 0x40, 0xcf, 0x45, -0xd7, 0x5a, 0xf3, 0x16, 0xa6, 0x32, 0x5c, -0x82, 0x6d, 0x1d, 0x76, 0x02, 0x6c, 0x7a, -0x9e, 0x3e, 0xf9, 0x2f, 0x4b, 0x1a, 0xae, -0x34, 0x03, 0x39, 0xe2, 0x7f, 0x1e, 0x5a, -0x29, 0x8d, 0x45, 0xac, 0x2e, 0x85, 0x91, -0xd0, 0x37, 0xcf, 0xe0, 0x84, 0x02, 0x13, -0x13, 0x69, 0xd7, 0x8a, 0xc6, 0xbc, 0x07, -0xb4, 0x1c, 0xa0, 0xa7, 0x18, 0x73, 0x26, -0x8d, 0xad, 0xae, 0x67, 0xc3, 0x83, 0x88, -0x46, 0x52, 0x90, 0x23, 0x40, 0xd1, 0x04, -0x50, 0xbe, 0x57, 0x2a, 0xb5, 0x53, 0x39, -0x9e, 0x53, 0xb5, 0xcc, 0x15, 0xf2, 0xa7, -0xae, 0xb1, 0x82, 0x64, 0xa1, 0x05, 0xfe, -0xd5, 0xf7, 0x39, 0x8b, 0xbe, 0xe5, 0xbb, -0xae, 0xab, 0xce, 0x4f, 0x60, 0x7b, 0x4c, -0x2e, 0xc4, 0x3c, 0x32, 0x2c, 0xb1, 0x95, -0x36, 0xb4, 0x10, 0xd6, 0xfc, 0xf3, 0xcc, -0x03, 0x69, 0x82, 0xfa, 0xdd, 0x02, 0xfb, -0xf6, 0xed, 0x44, 0x90, 0xec, 0x7a, 0xfa, -0x74, 0xd4, 0xd9, 0x97, 0x1c, 0xd1, 0x69, -0x5f, 0x87, 0xa9, 0x51, 0x1b, 0x00, 0x5d, -0xf7, 0x12, 0xe0, 0xf1, 0xb0, 0xae, 0x33, -0x09, 0xbc, 0xe9, 0xd0, 0x50, 0xac, 0x80, -0x80, 0xb8, 0xe1, 0xa5, 0x7a, 0xd5, 0x65, -0x1c, 0xee, 0xd7, 0xcb, 0xbb, 0x09, 0x6d, -0x86, 0xb2, 0x31, 0x54, 0xcd, 0xca, 0x49, -0x67, 0x5c, 0x7f, 0x49, 0x90, 0xf3, 0xb3, -0x95, 0x8d, 0x25, 0xed, 0x4e, 0x84, 0x28, -0xb3, 0xbf, 0x68, 0xc1, 0xc6, 0x32, 0xa0, -0x66, 0xb0, 0x07, 0x25, 0xc5, 0x26, 0xfb, -0x76, 0x9e, 0x73, 0xed, 0x63, 0x19, 0x2f, -0xb1, 0x3e, 0xb0, 0xc7, 0x8c, 0xd8, 0x7d, -0x60, 0xb5, 0x0a, 0x0c, 0x57, 0x0d, 0xac, -0xa5, 0xa3, 0x12, 0x1e, 0x3a, 0xa3, 0x82, -0xeb, 0xfb, 0x0d, 0x1a, 0x26, 0x22, 0xd6, -0x25, 0x14, 0xa7, 0x4e, 0x72, 0x87, 0x62, -0x8d, 0x7a, 0x25, 0x31, 0xbb, 0xb8, 0x89, -0x62, 0x69, 0xf1, 0xff, 0xb4, 0xb7, 0x26, -0x45, 0x80, 0x59, 0xce, 0x1b, 0x19, 0x22, -0x4b, 0x6d, 0x31, 0x8f, 0xf7, 0x9c, 0xf2, -0xf7, 0xe0, 0x1e, 0x4a, 0x7d, 0x5e, 0x6c, -0xc2, 0x3e, 0x2d, 0x42, 0x96, 0xe6, 0xe8, -0x7d, 0x3d, 0xdf, 0x8b, 0xbb, 0x8c, 0x64, -0xc3, 0x45, 0x91, 0x67, 0x39, 0x6c, 0xcb, -0x9b, 0x58, 0x4b, 0xde, 0x32, 0x6c, 0xc4, -0xf2, 0x19, 0x5e, 0x27, 0x7e, 0xdc, 0xee, -0x14, 0x69, 0x14, 0x83, 0x62, 0xa6, 0xb5, -0x3e, 0x87, 0x49, 0x23, 0x5c, 0xcf, 0x47, -0x20, 0xd4, 0x84, 0x2c, 0xba, 0xc7, 0x4b, -0x0c, 0xf5, 0xfd, 0xa9, 0x36, 0xdd, 0x32, -0x97, 0x78, 0x6b, 0x52, 0x4a, 0xac, 0x73, -0xb6, 0x38, 0x58, 0x6c, 0xc4, 0x2c, 0xbe, -0x57, 0xbc, 0xd2, 0x29, 0xad, 0xb0, 0xfc, -0xd9, 0xcf, 0x0d, 0x4d, 0x8d, 0x85, 0x80, -0x50, 0x8e, 0x35, 0xf1, 0x9a, 0x9f, 0x19, -0x05, 0xb8, 0x65, 0x0f, 0x1b, 0xc5, 0xca, -0xb9, 0x77, 0xb1, 0x00, 0xa1, 0x9a, 0x95, -0xd7, 0x11, 0xcd, 0x8f, 0x56, 0xe3, 0x62, -0xc9, 0xc5, 0x47, 0xf1, 0x2c, 0x0c, 0xd1, -0xc2, 0x49, 0x17, 0xc0, 0xe4, 0xeb, 0xe4, -0xa9, 0x1f, 0x34, 0x10, 0x0a, 0xc5, 0x54, -0x8d, 0xb1, 0xb9, 0x4d, 0xf6, 0x89, 0xc2, -0x86, 0x2c, 0xde, 0x32, 0xdd, 0x67, 0x01, -0x0a, 0x37, 0xad, 0x0a, 0xa7, 0xa9, 0x6a, -0x75, 0xdf, 0x18, 0x53, 0xf8, 0x54, 0xee, -0x4e, 0x2a, 0x0b, 0x94, 0x09, 0x92, 0x54, -0x20, 0x92, 0x93, 0x5a, 0x22, 0xb5, 0xc6, -0x1a, 0x94, 0xed, 0xd5, 0x2b, 0xe7, 0xb6, -0xe2, 0xdf, 0xc5, 0x4f, 0x17, 0xce, 0xfc, -0xc2, 0x5a, 0xdb, 0x3b, 0xf9, 0x9d, 0xd5, -0x94, 0x3a, 0x7a, 0x9f, 0x5d, 0xb6, 0xe0, -0x46, 0x33, 0x5c, 0x2d, 0xb4, 0x5e, 0x5d, -0xaf, 0x0a, 0x24, 0x0a, 0xae, 0x39, 0xe5, -0xef, 0xc4, 0xb1, 0x26, 0xad, 0x42, 0x1f, -0xc3, 0x12, 0x79, 0xb8, 0x60, 0xcc, 0x23, -0x28, 0x6d, 0x11, 0x41, 0x27, 0x08, 0x8f, -0xbd, 0x12, 0xbe, 0x71, 0x5f, 0x48, 0x99, -0x88, 0xa0, 0xa0, 0x34, 0xb5, 0x0e, 0x72, -0xe3, 0x99, 0x7d, 0x88, 0x14, 0x1c, 0x3e, -0x13, 0xd6, 0xcd, 0x56, 0xb5, 0x46, 0xc6, -0xed, 0x80, 0x78, 0x23, 0xb5, 0xfb, 0x53, -0x7c, 0x5f, 0x9f, 0xb4, 0x21, 0x2c, 0xb7, -0x4b, 0xbf, 0x5a, 0x67, 0xc7, 0x9a, 0x4f, -0x59, 0x2f, 0x8f, 0x3b, 0x8a, 0x11, 0xde, -0x5a, 0xa7, 0x66, 0xc5, 0x2b, 0xa7, 0x2d, -0xde, 0xad, 0x85, 0x0c, 0x5d, 0x80, 0xf6, -0x41, 0x38, 0x99, 0xdf, 0x1f, 0x27, 0x64, -0x5c, 0xe5, 0x26, 0x6f, 0x2e, 0xbc, 0xb3, -0x5e, 0x00, 0xf7, 0x9d, 0x1e, 0xdb, 0x35, -0x7e, 0x70, 0x9d, 0xaf, 0x33, 0x5f, 0x01, -0x79, 0xe2, 0x08, 0x4f, 0x50, 0x7b, 0xf0, -0x10, 0xa5, 0xe8, 0x63, 0x36, 0x34, 0xe5, -0x2e, 0x25, 0x1b, 0xfa, 0x1d, 0xd8, 0x99, -0x4c, 0xda, 0xa5, 0xf1, 0xe1, 0xa8, 0xfb, -0x7e, 0x07, 0x2a, 0x98, 0x43, 0x87, 0x69, -0xa3, 0xb0, 0x68, 0xce, 0xdd, 0xad, 0xb0, -0x1f, 0x26, 0x1e, 0x60, 0x4f, 0x92, 0xc8, -0x74, 0xb3, 0xee, 0xee, 0x53, 0x73, 0x97, -0x03, 0xa0, 0x5a, 0x84, 0x9f, 0x9b, 0x79, -0x2b, 0x6b, 0xbb, 0xec, 0x95, 0xa6, 0x97, -0x01, 0x47, 0x45, 0xd7, 0x07, 0x77, 0x86, -0x19, 0x43, 0x8d, 0x9a, 0x44, 0x7c, 0xb4, -0x85, 0x48, 0xcd, 0xa0, 0x9e, 0x94, 0xc3, -0x41, 0x46, 0x40, 0xd5, 0x51, 0x75, 0x64, -0x58, 0x36, 0x5a, 0xc9, 0x52, 0x48, 0x08, -0xa4, 0xd3, 0xd9, 0x7e, 0x07, 0x74, 0x22, -0xd9, 0xf3, 0x2d, 0x4d, 0x93, 0x8b, 0xad, -0x79, 0xc1, 0x6a, 0x6d, 0xd6, 0x57, 0xc4, -0xbf, 0x37, 0x03, 0xb1, 0x78, 0xf2, 0xf3, -0x1c, 0x01, 0xd6, 0x09, 0x53, 0xb8, 0xb4, -0x23, 0x54, 0xaf, 0x39, 0x8c, 0xa6, 0xf7, -0x54, 0x19, 0x99, 0x53, 0xd1, 0x3a, 0x14, -0x68, 0xf2, 0x00, 0x69, 0x03, 0xa3, 0xae, -0x75, 0x46, 0x2e, 0x70, 0xe5, 0xde, 0x4c, -0xe0, 0xec, 0x46, 0x94, 0xa6, 0x6d, 0x7b, -0x9c, 0x96, 0x65, 0xeb, 0x1f, 0x62, 0xd5, -0xe4, 0x26, 0x62, 0x38, 0xc0, 0x7f, 0xce, -0xa4, 0x14, 0x11, 0xe9, 0xfa, 0x97, 0x64, -0x4e, 0x0f, 0x82, 0x6f, 0x82, 0x82, 0x2d, -0x2a, 0xd0, 0xc0, 0xd3, 0x66, 0x37, 0x87, -0x1b, 0x9d, 0xaf, 0x2c, 0xbd, 0xe3, 0xb2, -0x15, 0x36, 0x75, 0x65, 0x1c, 0x68, 0xbc, -0x4d, 0x64, 0xe6, 0x50, 0x82, 0x0a, 0x4f, -0x4b, 0x0d, 0x2c, 0x89, 0x63, 0x50, 0x18, -0x48, 0x3c, 0xcf, 0xa8, 0xa8, 0x1b, 0xaa, -0x62, 0x38, 0x79, 0x4d, 0x93, 0x79, 0xeb, -0xcb, 0x54, 0x17, 0x76, 0xc2, 0x29, 0xf5, -0x54, 0x34, 0x36, 0xe8, 0xfb, 0x87, 0x30, -0xec, 0x67, 0xf1, 0x16, 0x26, 0x10, 0x6f, -0xab, 0x0a, 0x9b, 0xea, 0x38, 0x16, 0x42, -0x9f, 0x45, 0xbb, 0xbc, 0x88, 0x5c, 0x2d, -0x03, 0xe0, 0xc0, 0xd9, 0xc9, 0x99, 0x8e, -0xab, 0x5e, 0x6f, 0x57, 0xff, 0xe4, 0xe2, -0xc4, 0x5a, 0xf8, 0x3d, 0x59, 0x12, 0x82, -0x35, 0x2d, 0x92, 0x0f, 0x5b, 0xa3, 0xd0, -0x25, 0xd7, 0xe5, 0xa9, 0xd1, 0xde, 0x73, -0x78, 0x0b, 0x17, 0x6e, 0xa1, 0xf2, 0xfe, -0x68, 0xba, 0xe0, 0x24, 0x26, 0x75, 0x58, -0x18, 0x07, 0xa1, 0x94, 0x56, 0xed, 0xd8, -0x59, 0x01, 0x4c, 0x45, 0xff, 0x9d, 0x8c, -0xbf, 0xa1, 0x40, 0x19, 0xdc, 0x17, 0x04, -0x8d, 0xd4, 0x43, 0x9e, 0xa0, 0x0a, 0xca, -0x9d, 0x1e, 0xc7, 0xf5, 0x50, 0xad, 0x6b, -0x99, 0x75, 0xda, 0x4b, 0xfc, 0x4f, 0x92, -0x5e, 0x3c, 0x49, 0xb7, 0x0e, 0xf6, 0xda, -0x35, 0xa7, 0x17, 0xd3, 0xb7, 0x30, 0xc9, -0x7b, 0x50, 0xcc, 0x09, 0x29, 0xa4, 0xfa, -0xc0, 0x63, 0xaf, 0xee, 0x71, 0x1d, 0x57, -0xdf, 0x64, 0xfd, 0x32, 0x18, 0x7d, 0x28, -0xb8, 0xca, 0xbe, 0x81, 0x5e, 0x89, 0x70, -0xfe, 0x5f, 0xae, 0x82, 0x79, 0xf6, 0xf5, -0x8f, 0x54, 0xfe, 0xe0, 0xc4, 0x12, 0x07, -0x5e, 0x80, 0x4e, 0x74, 0x7b, 0x74, 0x1c, -0xe2, 0x81, 0x77, 0xf8, 0x13, 0xae, 0xd9, -0xf7, 0x2c, 0xc0, 0xc1, 0x0f, 0xbb, 0xcb, -0xe1, 0xb3, 0x27, 0x2f, 0x08, 0x9d, 0x4a, -0xc8, 0xdc, 0x09, 0xc3, 0x78, 0xba, 0x85, -0x17, 0xb0, 0xa9, 0x2c, 0xaa, 0x1a, 0x0a, -0x67, 0xea, 0x33, 0x3e, 0x03, 0x5f, 0xc6, -0xd3, 0x0d, 0x50, 0xfd, 0x22, 0xb6, 0x12, -0x35, 0x24, 0x82, 0xd7, 0x55, 0xc4, 0x6d, -0x0e, 0xac, 0x38, 0x82, 0x77, 0x39, 0xa2, -0x16, 0x0e, 0xc5, 0xd5, 0x90, 0x70, 0xb2, -0x92, 0x4b, 0xb7, 0xb3, 0x7c, 0xad, 0x3a, -0xf9, 0xd6, 0x53, 0x3f, 0xf8, 0xdb, 0x03, -0x10, 0x14, 0x4f, 0x7c, 0x47, 0x64, 0x24, -0xd2, 0xd8, 0xec, 0x72, 0x73, 0xc8, 0x21, -0x81, 0xcc, 0xb5, 0x11, 0xd2, 0x8c, 0xbc, -0xe1, 0x27, 0xa7, 0xe5, 0x76, 0xae, 0x92, -0x19, 0x23, 0x99, 0x43, 0x8f, 0x3b, 0xee, -0xd5, 0x62, 0xf8, 0xb5, 0x66, 0xc9, 0x66, -0xee, 0xdc, 0x99, 0x49, 0xcc, 0x7f, 0x24, -0xce, 0x25, 0xbc, 0xe1, 0x4e, 0xa4, 0x07, -0x1c, 0xe8, 0x60, 0xe8, 0x2d, 0xdd, 0x0a, -0x4f, 0x3f, 0x09, 0xf4, 0x28, 0xe6, 0x1b, -0x74, 0xb0, 0xfa, 0xa8, 0xa9, 0x7d, 0xed, -0xae, 0x9f, 0x3c, 0x5b, 0x32, 0xb6, 0x7f, -0xfa, 0x3a, 0xc3, 0xbc, 0xb4, 0xe5, 0x81, -0x63, 0x08, 0xc4, 0x4e, 0xa0, 0xaf, 0xd7, -0x6e, 0xa1, 0x2d, 0x7f, 0xf1, 0x49, 0x97, -0xde, 0xf0, 0xca, 0xe2, 0x94, 0xf5, 0x7f, -0xd5, 0xf3, 0x96, 0x15, 0xb9, 0xc1, 0x1d, -0x49, 0x0a, 0x05, 0xcb, 0xfd, 0x6a, 0xfd, -0x3c, 0xc5, 0xcb, 0x0a, 0xaf, 0xde, 0x15, -0x34, 0x0e, 0xb8, 0xa5, 0x4b, 0x97, 0x63, -0x92, 0xcf, 0xd9, 0xd9, 0x67, 0x40, 0x17, -0x42, 0x4b, 0xc8, 0xdf, 0x4c, 0x14, 0x3b, -0x3c, 0x23, 0x91, 0xf2, 0x57, 0x38, 0x23, -0x8e, 0x66, 0xf0, 0xfd, 0x3b, 0x9e, 0x4d, -0x93, 0x23, 0x49, 0xed, 0x96, 0xf7, 0x1b, -0x11, 0x55, 0x55, 0x86, 0x2f, 0x09, 0xe1, -0x57, 0xa8, 0xc2, 0x54, 0x1a, 0x81, 0x85, -0x50, 0x64, 0xfc, 0x16, 0x0b, 0x0c, 0x20, -0x24, 0xb5, 0xce, 0x38, 0x21, 0xf4, 0xb1, -0x84, 0xc4, 0xcb, 0x5a, 0x37, 0x47, 0xfc, -0x24, 0x07, 0x00, 0x24, 0x6c, 0x94, 0xdf, -0xa8, 0xaf, 0xd0, 0x3c, 0x80, 0xe7, 0x19, -0xb1, 0xe2, 0xaa, 0x1c, 0xfb, 0xfc, 0xce, -0xe0, 0x6b, 0x5c, 0xbe, 0x4a, 0xb0, 0xad, -0x17, 0xf2, 0x47, 0xb3, 0x97, 0x70, 0x78, -0x5d, 0x89, 0xe0, 0x7f, 0x8e, 0x8e, 0x19, -0xe2, 0xc0, 0x11, 0x4e, 0x10, 0x0d, 0x67, -0x4d, 0x21, 0x8e, 0x97, 0x90, 0xbb, 0xac, -0xc0, 0x4a, 0x85, 0xdb, 0x5b, 0x9a, 0x91, -0x62, 0x76, 0x39, 0x67, 0xb6, 0xe0, 0xfc, -0x3f, 0xa4, 0x71, 0x1f, 0xa7, 0xae, 0x84, -0x5b, 0xad, 0x84, 0x56, 0xae, 0x90, 0xe2, -0xe2, 0xf6, 0x97, 0x77, 0xee, 0xa1, 0xd4, -0x50, 0x26, 0x3a, 0x3f, 0x9e, 0x5a, 0x75, -0xa8, 0xce, 0xf5, 0x4f, 0x2e, 0xfc, 0xee, -0x87, 0xb2, 0xe9, 0x92, 0x5e, 0xce, 0x09, -0x12, 0x1b, 0x56, 0x3e, 0x28, 0xb1, 0x2c, -0x1f, 0xe4, 0x59, 0x09, 0x75, 0x1a, 0xdf, -0x3e, 0x91, 0x79, 0x0f, 0x71, 0x36, 0x6d, -0xb2, 0xcd, 0x82, 0x0c, 0x9d, 0x3d, 0xfa, -0x0f, 0x8c, 0xf8, 0xc2, 0x65, 0xa6, 0xae, -0x42, 0x93, 0x2c, 0xcd, 0x8b, 0x76, 0x4d, -0x0e, 0xec, 0xd2, 0xd5, 0x43, 0xe3, 0xd6, -0x61, 0xcc, 0xd9, 0x7e, 0x42, 0x09, 0xbd, -0x0b, 0xaa, 0x95, 0xb0, 0x03, 0x5d, 0x87, -0xd6, 0x15, 0xe8, 0x3e, 0x65, 0x1f, 0xc6, -0xd8, 0x79, 0xfe, 0xa9, 0xc4, 0xbc, 0xc8, -0x81, 0xf5, 0x0b, 0x75, 0xab, 0xc4, 0x12, -0x1a, 0x6e, 0x76, 0xd9, 0xea, 0x58, 0xea, -0x81, 0x99, 0x72, 0x8b, 0x3c, 0x2b, 0xca, -0xff, 0xfd, 0xff, 0xb4, 0x07, 0xb5, 0x1d, -0x0c, 0x7a, 0x55, 0x76, 0xf9, 0xb6, 0x7e, -0xbd, 0xd7, 0x46, 0x07, 0x3e, 0x17, 0x96, -0x24, 0xba, 0x94, 0xdf, 0xe4, 0x10, 0xeb, -0xed, 0x37, 0xd0, 0xe2, 0xc2, 0x33, 0x26, -0x25, 0xa0, 0x00, 0xe5, 0xf5, 0x7a, 0x82, -0xec, 0x11, 0xdf, 0xd4, 0x68, 0x87, 0x69, -0x81, 0x40, 0xff, 0x1a, 0x3d, 0xc7, 0x37, -0xe1, 0x94, 0x42, 0xa5, 0xdf, 0xc0, 0xeb, -0x38, 0x82, 0x2d, 0x33, 0xf7, 0x9d, 0x6c, -0x7c, 0xee, 0xa4, 0x3e, 0x37, 0x73, 0xfc, -0x3b, 0x2c, 0xd9, 0x0c, 0x5b, 0x7a, 0x18, -0x9c, 0xe3, 0x53, 0xc5, 0xbb, 0x02, 0xc2, -0x4a, 0x03, 0xb3, 0xeb, 0xe9, 0x74, 0xc3, -0xb4, 0x2f, 0xfa, 0xc1, 0xf9, 0xa9, 0x22, -0xf0, 0x53, 0xc4, 0x2a, 0x33, 0x24, 0x3c, -0xbe, 0xb2, 0xf4, 0x72, 0xdf, 0x71, 0xf6, -0x8c, 0x85, 0xb8, 0xb4, 0xef, 0xd3, 0x17, -0x52, 0x68, 0xdc, 0xcd, 0xb8, 0x0d, 0x09, -0xb5, 0x40, 0xdf, 0x0b, 0x4a, 0xbd, 0xee, -0xd3, 0x92, 0x03, 0xbd, 0xff, 0x1f, 0x5c, -0x6f, 0xb0, 0x4d, 0x94, 0x01, 0xf4, 0xca, -0xdd, 0x86, 0xdc, 0x4e, 0x41, 0xe9, 0x49, -0x08, 0x55, 0x01, 0x03, 0x49, 0x89, 0x9b, -0xc1, 0x0b, 0x23, 0x52, 0xf8, 0xea, 0x2d, -0x75, 0xdd, 0xb1, 0xb1, 0x2e, 0xa1, 0x91, -0x10, 0x7c, 0x13, 0xe6, 0xe4, 0x47, 0x2c, -0x08, 0x6e, 0xfc, 0xca, 0xf9, 0x47, 0x1c, -0x9c, 0x80, 0x3a, 0x7e, 0xcd, 0xb8, 0xad, -0x53, 0xf5, 0x04, 0xcc, 0x7e, 0x8b, 0x4e, -0x6c, 0x65, 0x52, 0x1c, 0x8a, 0x7a, 0xa6, -0x30, 0x6a, 0x6f, 0xc2, 0xf5, 0x26, 0xf8, -0xc9, 0xa6, 0xb1, 0x47, 0x18, 0x16, 0x3d, -0x38, 0x47, 0x95, 0xa5, 0x16, 0xb2, 0x95, -0x77, 0xad, 0x2b, 0xdf, 0xf8, 0x27, 0xc8, -0x7c, 0xf7, 0xa0, 0x12, 0x13, 0xa1, 0xcb, -0xd0, 0xd3, 0x01, 0x7f, 0x51, 0x89, 0x0e, -0xb1, 0x72, 0x5c, 0x08, 0x15, 0xa0, 0x20, -0xd6, 0x10, 0x3e, 0xbe, 0xcb, 0x45, 0x30, -0x92, 0x3d, 0xb7, 0xca, 0x4d, 0xff, 0xe0, -0x0c, 0x17, 0x77, 0xbc, 0x92, 0x84, 0xf0, -0x63, 0x39, 0xde, 0xb3, 0x31, 0x4b, 0x0b, -0xe6, 0x4d, 0x8b, 0x8d, 0x81, 0xf7, 0xfb, -0x51, 0xbf, 0x53, 0xeb, 0x23, 0x12, 0x6e, -0x48, 0x28, 0xbe, 0xaa, 0x18, 0xff, 0x70, -0x9f, 0x81, 0x87, 0x7e, 0xb3, 0x21, 0xba, -0x44, 0x5a, 0x63, 0x60, 0x31, 0xf2, 0x62, -0x2a, 0x92, 0x74, 0x31, 0x6a, 0x98, 0x4c, -0xbd, 0x90, 0xe4, 0xd7, 0xbc, 0xab, 0xe7, -0x51, 0xde, 0x08, 0x68, 0xa7, 0xcc, 0x28, -0xdf, 0xac, 0xb1, 0x05, 0xca, 0x0d, 0xe8, -0x50, 0xcd, 0x0c, 0x41, 0xfe, 0x43, 0xe0, -0x97, 0x75, 0xb9, 0x11, 0xc3, 0x48, 0xe7, -0xfa, 0x5b, 0xf3, 0x92, 0x7f, 0x3a, 0x50, -0xe4, 0xd7, 0x49, 0xe0, 0x22, 0x79, 0x2a, -0x19, 0x7e, 0x21, 0x08, 0xf9, 0x5b, 0x87, -0x13, 0x8d, 0xf1, 0x02, 0x10, 0x14, 0xe9, -0x11, 0xfa, 0xb2, 0xd5, 0x08, 0xdb, 0xbc, -0x95, 0x79, 0x8d, 0xce, 0x53, 0x41, 0xd7, -0xf9, 0x72, 0x6d, 0xe3, 0x95, 0x56, 0xb6, -0xbb, 0x71, 0x77, 0xab, 0x07, 0xbd, 0xdd, -0xeb, 0xc9, 0xb7, 0x26, 0xcd, 0x15, 0xbd, -0x19, 0x88, 0xe9, 0x7c, 0xa0, 0xaa, 0x3e, -0x64, 0xd1, 0xd9, 0x66, 0x91, 0xdd, 0x89, -0x5d, 0xfc, 0x26, 0x2e, 0x0a, 0x9c, 0x87, -0x88, 0x44, 0x2e, 0x54, 0x68, 0x98, 0x8b, -0xa7, 0x23, 0xd6, 0xe2, 0x3a, 0x17, 0x2f, -0xd9, 0x71, 0x89, 0xa6, 0xcb, 0x1d, 0xb8, -0x21, 0xe6, 0x8d, 0x37, 0x30, 0xca, 0xcb, -0xc5, 0x87, 0x61, 0x1b, 0x39, 0xca, 0xf5, -0xe8, 0xd4, 0x3b, 0xa6, 0x3f, 0xdf, 0x19, -0x34, 0x70, 0xeb, 0xb0, 0x5b, 0xb5, 0x2c, -0x3f, 0x6f, 0x99, 0x4e, 0x21, 0x64, 0x64, -0x3f, 0xb7, 0x01, 0x5d, 0x59, 0x27, 0x93, -0xe1, 0x74, 0xbe, 0xa2, 0x48, 0x15, 0x1f, -0x44, 0x88, 0x4f, 0x72, 0xd8, 0x51, 0x3b, -0xdf, 0x74, 0x4c, 0xd7, 0x60, 0x6c, 0x99, -0x79, 0xf3, 0xdc, 0xd5, 0xbc, 0xf8, 0x57, -0x13, 0x4d, 0x2b, 0x91, 0xbe, 0x94, 0xa8, -0x31, 0x74, 0x49, 0x7e, 0x40, 0xca, 0x8b, -0xe9, 0xf5, 0x83, 0x90, 0x86, 0x8f, 0xa3, -0x46, 0xcf, 0x4a, 0xbc, 0xf5, 0xc9, 0x03, -0xb4, 0x25, 0xaa, 0xe6, 0x6c, 0xcf, 0xc6, -0xbf, 0x90, 0x74, 0xf2, 0x6f, 0xa9, 0x5e, -0xba, 0xee, 0x5f, 0x90, 0x07, 0x19, 0x75, -0x41, 0xf4, 0x35, 0xe6, 0xd5, 0x05, 0xbe, -0xdb, 0xc4, 0xc8, 0xc8, 0xce, 0x21, 0xe6, -0xbf, 0xd9, 0xa3, 0x5f, 0xce, 0x63, 0x89, -0xa0, 0xd4, 0x30, 0x5e, 0x48, 0xca, 0xb1, -0x04, 0x5e, 0x78, 0xfa, 0xac, 0x9f, 0x98, -0x2f, 0xb2, 0xe1, 0xfc, 0x2e, 0x76, 0xda, -0xc5, 0x55, 0x7c, 0xcc, 0x40, 0x9e, 0xf0, -0x42, 0x84, 0xb3, 0x69, 0x5a, 0x3c, 0x78, -0xe7, 0x34, 0x7b, 0xf1, 0x6b, 0x8f, 0xc3, -0x34, 0xfc, 0x4b, 0x56, 0xfc, 0x33, 0x93, -0xb6, 0x01, 0x35, 0xbb, 0x94, 0xcd, 0xb3, -0xef, 0x00, 0x4f, 0x06, 0x41, 0xb4, 0x2e, -0xd1, 0x8d, 0x22, 0x41, 0x45, 0x58, 0x46, -0x29, 0xe0, 0x26, 0x38, 0x45, 0x00, 0xdb, -0x6c, 0xfc, 0xc4, 0x9f, 0xe5, 0xb3, 0x3b, -0xba, 0x57, 0x82, 0x51, 0x2d, 0xef, 0x3e, -0xc1, 0x65, 0x89, 0x3d, 0x85, 0x62, 0xe9, -0x58, 0x1c, 0x27, 0x77, 0xa0, 0xcb, 0x2d, -0x33, 0x88, 0x2c, 0xb7, 0x32, 0xa5, 0x55, -0xdb, 0xe5, 0x33, 0x88, 0x5f, 0x72, 0xb1, -0x91, 0x9b, 0xe0, 0x25, 0x31, 0x3b, 0x35, -0x67, 0x27, 0x30, 0xda, 0x75, 0xcd, 0x78, -0xa3, 0x2a, 0x6f, 0x0e, 0x80, 0xc9, 0xa7, -0x69, 0x00, 0xed, 0x5d, 0x3f, 0x87, 0xa3, -0x87, 0x11, 0xf5, 0x65, 0x07, 0xcb, 0xcd, -0xb7, 0x31, 0x2b, 0x5a, 0x52, 0x19, 0x1e, -0xa4, 0x7e, 0x93, 0x9e, 0xf5, 0x60, 0x7b, -0xea, 0x8b, 0x0b, 0x6e, 0xbb, 0xe3, 0x85, -0x04, 0xe6, 0x5b, 0xb9, 0x78, 0x61, 0x7f, -0xe1, 0x1c, 0x6c, 0xff, 0x5d, 0x25, 0x8c, -0x12, 0x86, 0xa6, 0xec, 0x30, 0x5d, 0x57, -0x29, 0x6a, 0x3e, 0x8f, 0x96, 0xaf, 0xca, -0x88, 0xf0, 0x17, 0xeb, 0xf1, 0x2f, 0xe0, -0x07, 0x41, 0xe1, 0x47, 0x81, 0x48, 0x28, -0x09, 0x2f, 0xf2, 0x50, 0x7b, 0xca, 0x7c, -0xe2, 0x1e, 0x17, 0x47, 0x34, 0x25, 0x8e, -0x5a, 0x04, 0xe4, 0x6c, 0xd2, 0xad, 0x7f, -0xaa, 0xaa, 0xc8, 0x1d, 0x2a, 0xaa, 0x62, -0x16, 0x31, 0x4b, 0x88, 0x1d, 0x2d, 0xd5, -0x31, 0x96, 0x15, 0xa7, 0xb0, 0xa6, 0x0c, -0xc4, 0xef, 0xcb, 0xb9, 0x86, 0x8a, 0xfe, -0xb9, 0x99, 0xc8, 0x73, 0xd5, 0x3a, 0xa0, -0x24, 0x06, 0x1b, 0x89, 0x45, 0xc0, 0x38, -0x33, 0xcc, 0x25, 0xb0, 0xc9, 0xeb, 0xee, -0x0b, 0xd3, 0xfe, 0xa6, 0x51, 0x84, 0xef, -0xd4, 0x1c, 0x42, 0xc6, 0x04, 0x15, 0x33, -0x98, 0xd6, 0xd7, 0x01, 0xf8, 0xc3, 0x29, -0xe0, 0xeb, 0x5f, 0x28, 0x5a, 0xd1, 0xa6, -0x90, 0x26, 0xac, 0x0a, 0x58, 0xed, 0x08, -0x41, 0xe8, 0x5f, 0x84, 0x8f, 0xaf, 0x04, -0x82, 0x1f, 0xa1, 0xf7, 0x3b, 0xbf, 0xd9, -0x69, 0x98, 0xcc, 0x59, 0xb3, 0x7f, 0xde, -0xa2, 0x55, 0x81, 0x8b, 0x88, 0xb2, 0x98, -0xfd, 0x77, 0x7a, 0x32, 0x7b, 0x42, 0xe1, -0x14, 0x94, 0xbf, 0x7c, 0xcf, 0x43, 0x73, -0x51, 0x97, 0xda, 0xc3, 0x96, 0x79, 0x3a, -0x0a, 0xf5, 0x0b, 0x5a, 0x9d, 0x60, 0x5d, -0x4c, 0x8f, 0x7f, 0x31, 0x8a, 0xe1, 0xd8, -0xf9, 0x18, 0x62, 0x4d, 0xa4, 0xb6, 0x4a, -0x80, 0xa8, 0x09, 0x85, 0x2c, 0x1a, 0x14, -0x3c, 0xa9, 0xab, 0x28, 0xef, 0x35, 0x37, -0x7c, 0xdc, 0x69, 0x0e, 0x8f, 0x82, 0xa0, -0xfb, 0xb4, 0x86, 0xcc, 0xd9, 0x07, 0x1a, -0x2d, 0x53, 0xa9, 0x5b, 0x46, 0xf7, 0xf2, -0xcb, 0x7a, 0x85, 0x62, 0x89, 0xc8, 0x53, -0x08, 0x24, 0xfc, 0x11, 0x10, 0xfb, 0x4f, -0x31, 0x21, 0x6f, 0x01, 0x10, 0xff, 0x2f, -0x21, 0x48, 0x8e, 0x91, 0xa0, 0x91, 0xc7, -0xaf, 0x0a, 0xf9, 0xb2, 0x3f, 0xe4, 0x61, -0x83, 0x1b, 0x03, 0xb8, 0x66, 0x96, 0xd1, -0x54, 0x85, 0xfc, 0xf1, 0x7d, 0x10, 0x3e, -0xec, 0xcf, 0x2d, 0xe5, 0xaa, 0xe0, 0xde, -0xa7, 0x20, 0x8a, 0x22, 0xca, 0x1a, 0x56, -0x98, 0xb2, 0x7c, 0xe7, 0x6c, 0xf5, 0x2f, -0x9e, 0x9e, 0x95, 0x43, 0xbc, 0x8a, 0x3d, -0xcc, 0xa0, 0xdb, 0x49, 0x78, 0x36, 0x84, -0x2e, 0x55, 0x49, 0x02, 0xb2, 0xdf, 0x5f, -0x21, 0x1c, 0x2b, 0x97, 0xca, 0xc1, 0x8f, -0xc1, 0x5d, 0xf2, 0xa4, 0x3c, 0xb7, 0x69, -0xd0, 0x19, 0x5d, 0xea, 0xe6, 0x95, 0x7d, -0x1d, 0x34, 0xaf, 0x08, 0xa8, 0x15, 0x24, -0x2d, 0xbe, 0x9c, 0x9f, 0xb3, 0xb8, 0x6b, -0x29, 0x68, 0x4e, 0x07, 0x6f, 0xfb, 0xe1, -0xc8, 0x27, 0x5b, 0x3c, 0xef, 0x8f, 0x85, -0x79, 0x75, 0x42, 0xfb, 0xab, 0x59, 0x9c, -0x8c, 0x18, 0x10, 0x0f, 0xc4, 0x74, 0x24, -0xfe, 0x82, 0x7f, 0xb6, 0x6c, 0xfd, 0xc0, -0xc5, 0xd6, 0xa6, 0x23, 0x7c, 0x26, 0xf1, -0x28, 0x09, 0x32, 0xa3, 0x59, 0x5f, 0x98, -0x89, 0x6c, 0x22, 0xd6, 0x6b, 0x7d, 0x52, -0x1c, 0xce, 0xbd, 0xbb, 0xf5, 0x1b, 0x8d, -0x8d, 0xa2, 0xd4, 0x98, 0x30, 0x14, 0x69, -0xd8, 0xae, 0x66, 0x36, 0x6e, 0x7c, 0xd8, -0x82, 0x97, 0xa3, 0xac, 0x84, 0x35, 0xe3, -0xeb, 0x09, 0x4b, 0x72, 0x43, 0xd7, 0x2b, -0xc9, 0xc4, 0x72, 0xbe, 0x84, 0x2b, 0xfa, -0x23, 0x95, 0x9c, 0x2f, 0x18, 0x45, 0x03, -0xeb, 0x92, 0x9e, 0x0a, 0x46, 0xad, 0x01, -0xc6, 0xea, 0xe1, 0xd3, 0xd8, 0x25, 0x50, -0x1f, 0x8a, 0xb8, 0x19, 0xdb, 0x05, 0x17, -0x74, 0x6d, 0x28, 0x1d, 0x8c, 0x4c, 0x29, -0xde, 0xc2, 0x64, 0x96, 0x0a, 0x07, 0xf8, -0xc5, 0xad, 0xcd, 0x5c, 0x1a, 0x92, 0x15, -0x98, 0x83, 0xcb, 0xec, 0x4a, 0x84, 0x39, -0x7a, 0xc0, 0xc7, 0xd8, 0x97, 0x79, 0xcc, -0x6a, 0x9a, 0x4a, 0x3e, 0xfb, 0x4f, 0xd1, -0x64, 0xd9, 0xf7, 0xb2, 0xc4, 0xcc, 0xd3, -0x9c, 0x22, 0x55, 0xc3, 0xbc, 0xf8, 0xf8, -0x2e, 0x35, 0x37, 0x05, 0x47, 0x43, 0x26, -0x43, 0xb3, 0x96, 0x1c, 0xd4, 0x1a, 0xc7, -0x2b, 0xdd, 0x5a, 0x9c, 0xb4, 0x58, 0x3a, -0x9f, 0x24, 0x9d, 0x82, 0x31, 0x21, 0x43, -0xa7, 0xc7, 0xb0, 0xe8, 0xf5, 0xf0, 0xd1, -0xcd, 0x86, 0xe4, 0xf8, 0x98, 0x5e, 0x50, -0x10, 0x87, 0xac, 0x79, 0x6f, 0x56, 0x3f, -0xf6, 0x27, 0x87, 0x83, 0xa7, 0xc4, 0x45, -0x10, 0x20, 0xca, 0x77, 0xca, 0x65, 0x04, -0x6f, 0xd5, 0x54, 0x8f, 0xf8, 0xf3, 0x3c, -0xd2, 0x4d, 0x6f, 0x46, 0xaa, 0xa8, 0x3d, -0xb6, 0xdf, 0x24, 0xc3, 0xf8, 0xfe, 0x59, -0x88, 0x47, 0x2c, 0x2d, 0xed, 0x76, 0x08, -0x89, 0x55, 0x10, 0x42, 0xfc, 0xa4, 0x74, -0x2b, 0xbf, 0x26, 0xe9, 0x9c, 0x52, 0x6b, -0xa4, 0x3c, 0xad, 0x31, 0x76, 0x1d, 0x9f, -0x09, 0xbf, 0xda, 0xde, 0xb1, 0x12, 0x3b, -0xcb, 0x34, 0x6b, 0x44, 0x38, 0xf4, 0x80, -0x12, 0xb8, 0x14, 0x05, 0x8e, 0xab, 0x62, -0x47, 0x6a, 0xa8, 0xa4, 0x89, 0xfd, 0xf5, -0x85, 0x8a, 0xea, 0x2c, 0x58, 0x3e, 0x95, -0xe5, 0x6a, 0x6f, 0xd3, 0x63, 0x47, 0x3c, -0xfb, 0xdb, 0x6c, 0x94, 0xb0, 0xcf, 0x97, -0xdd, 0xfc, 0xde, 0xa9, 0x5e, 0x67, 0x49, -0x37, 0x55, 0xe5, 0xd4, 0x25, 0xbc, 0x95, -0x58, 0x9d, 0xf7, 0x08, 0x05, 0x34, 0x32, -0xbf, 0x4f, 0xf1, 0xf5, 0x3a, 0x96, 0x7c, -0xe5, 0xb7, 0xe3, 0x71, 0xac, 0x9e, 0x89, -0xb6, 0x1c, 0xce, 0x7d, 0x10, 0x33, 0xc3, -0x41, 0x5e, 0x9d, 0xa0, 0xff, 0x67, 0xcc, -0xe6, 0xdb, 0x27, 0xa4, 0xe8, 0xe1, 0x80, -0xf7, 0x67, 0x76, 0x42, 0xef, 0xd2, 0x48, -0x65, 0x45, 0xd6, 0xea, 0x69, 0xd5, 0xb4, -0x6f, 0xc7, 0x3c, 0xe7, 0xe3, 0x71, 0x88, -0x23, 0x27, 0x77, 0x23, 0xb3, 0x65, 0x89, -0x19, 0x52, 0x31, 0x7e, 0xe3, 0x78, 0x78, -0xa5, 0x38, 0x4f, 0xff, 0x64, 0x18, 0x87, -0x09, 0x5d, 0xc5, 0x82, 0x5f, 0xd4, 0xa4, -0x28, 0x3a, 0x69, 0xb3, 0x80, 0xb1, 0x9f, -0x04, 0xa1, 0x24, 0x9a, 0x6f, 0x15, 0xe2, -0x09, 0xd6, 0xe2, 0xd3, 0xc5, 0x2b, 0x76, -0xe6, 0xc9, 0x34, 0x84, 0xf0, 0xf5, 0xb5, -0x50, 0xb9, 0xd9, 0x9a, 0xba, 0x2a, 0x7a, -0xd6, 0xea, 0xec, 0x1a, 0xee, 0xbe, 0x5a, -0x6b, 0x9e, 0xa7, 0x7a, 0x34, 0xe6, 0xf7, -0xb7, 0x97, 0x57, 0xba, 0x6f, 0x56, 0xe8, -0xc7, 0xc0, 0xa1, 0xfe, 0x5d, 0xf0, 0x0f, -0x06, 0xf5, 0xbc, 0x4d, 0x68, 0x75, 0x39, -0x3d, 0x93, 0x4e, 0x1f, 0xb7, 0xcd, 0xc6, -0x3f, 0x5a, 0xf2, 0x71, 0xa3, 0x44, 0x5e, -0x15, 0xd3, 0x84, 0x6c, 0xf8, 0xc8, 0xe8, -0xb5, 0x31, 0xa3, 0x45, 0x58, 0xdd, 0xa6, -0x63, 0x43, 0x73, 0xe2, 0x06, 0x52, 0x40, -0x34, 0x0e, 0xb4, 0xea, 0x59, 0x5b, 0x9f, -0xcb, 0xed, 0xd9, 0x41, 0x9d, 0xd4, 0x92, -0x46, 0xa4, 0x47, 0x0a, 0x38, 0xde, 0x19, -0xab, 0xdd, 0x98, 0x25, 0x2a, 0x46, 0xc9, -0xb4, 0xb0, 0x15, 0xa2, 0xcf, 0x34, 0xff, -0x82, 0x39, 0xa7, 0x17, 0xa3, 0x62, 0xe3, -0xed, 0xa7, 0x7b, 0x62, 0x32, 0x0c, 0x46, -0x96, 0xfd, 0x6c, 0x1b, 0x6d, 0x47, 0xb9, -0x73, 0xb0, 0x65, 0x39, 0xea, 0x25, 0x71, -0xd7, 0x77, 0x8a, 0x43, 0x58, 0x2b, 0x8c, -0xa3, 0x1b, 0x72, 0x13, 0xf1, 0x27, 0x65, -0x49, 0x7f, 0x05, 0x6e, 0x35, 0xab, 0x73, -0xcb, 0x09, 0x49, 0x14, 0x1f, 0xf1, 0xa6, -0x85, 0x8b, 0x61, 0x3a, 0xb7, 0xe0, 0x1d, -0x87, 0xeb, 0x34, 0x44, 0xd8, 0xd4, 0x12, -0x7b, 0x82, 0xa1, 0xb6, 0x77, 0x53, 0xd7, -0x36, 0x39, 0x64, 0x49, 0xbd, 0xd1, 0xb4, -0x3d, 0xea, 0x4d, 0x0b, 0x50, 0x5d, 0x0a, -0x5d, 0x64, 0xa2, 0xac, 0x7d, 0x6c, 0x6a, -0x2c, 0x01, 0x75, 0x04, 0xf8, 0x50, 0xfe, -0x58, 0xb2, 0xe5, 0xaa, 0x7a, 0x30, 0x96, -0x82, 0x98, 0x8b, 0x4c, 0xd5, 0x97, 0x5c, -0xf8, 0xb6, 0xf0, 0x7d, 0xdd, 0xba, 0xdd, -0xfd, 0xf2, 0xd6, 0xea, 0x6b, 0xbd, 0x9d, -0xcd, 0x63, 0x33, 0x9b, 0x4f, 0xf2, 0x3c, -0x3b, 0x17, 0x2e, 0x46, 0xbf, 0xaf, 0xc5, -0x97, 0x32, 0x14, 0x34, 0x99, 0x94, 0xc9, -0xa9, 0x10, 0x91, 0xe7, 0x51, 0x3b, 0x42, -0x8d, 0x74, 0x8b, 0x57, 0x28, 0x20, 0x3f, -0xd1, 0xdc, 0xf9, 0xd4, 0x0f, 0x87, 0x5b, -0xd5, 0x2f, 0x74, 0x44, 0xc3, 0xc7, 0xbe, -0xcd, 0x17, 0x0c, 0xbf, 0xe4, 0x62, 0xa1, -0x43, 0x34, 0x17, 0x08, 0x46, 0x30, 0xa0, -0x85, 0x20, 0xa8, 0xbb, 0xb4, 0x63, 0xd1, -0x12, 0x09, 0xf6, 0xd6, 0x01, 0xa4, 0x25, -0x74, 0xa8, 0xb9, 0x56, 0x82, 0xdb, 0x78, -0xe8, 0x41, 0xbb, 0xc6, 0x18, 0xc5, 0x86, -0xa3, 0xea, 0xbf, 0x90, 0x2c, 0xdd, 0x15, -0xe0, 0x4a, 0x21, 0xd4, 0x42, 0x94, 0x94, -0xf4, 0x48, 0x62, 0x97, 0x25, 0xc7, 0xcd, -0x44, 0x88, 0x20, 0xd6, 0x05, 0x4b, 0x96, -0x89, 0xd0, 0x3e, 0x0d, 0x9f, 0xa3, 0x24, -0xf8, 0xf8, 0xb1, 0x44, 0xa9, 0x37, 0x55, -0xdb, 0x2c, 0x51, 0xb8, 0x8c, 0x6b, 0x4e, -0x36, 0xaa, 0xb9, 0x56, 0x0b, 0xda, 0x62, -0x49, 0x97, 0xac, 0x9b, 0x62, 0xaa, 0x90, -0x4e, 0xe3, 0xce, 0xa9, 0x04, 0x5f, 0x7f, -0xcc, 0x3d, 0x97, 0xaf, 0x73, 0xb8, 0x4a, -0x2f, 0xdc, 0x5b, 0xd8, 0x3a, 0xc3, 0xb4, -0x98, 0x7a, 0x2b, 0xd5, 0x24, 0x6b, 0x50, -0xe1, 0xbe, 0x1f, 0x24, 0x1d, 0xff, 0xb6, -0xfb, 0x93, 0xe3, 0xb5, 0x06, 0x75, 0x07, -0x64, 0xb1, 0xb0, 0x78, 0x0d, 0xf7, 0xa9, -0x06, 0x1f, 0x9f, 0x80, 0x57, 0xb1, 0x25, -0xca, 0xdb, 0x58, 0xc7, 0x79, 0xfd, 0x18, -0xac, 0x71, 0xc2, 0x3b, 0x54, 0xd7, 0x38, -0x49, 0x12, 0x30, 0x07, 0x6a, 0x0c, 0x52, -0x2f, 0x63, 0xf8, 0x53, 0xe5, 0x9e, 0x66, -0xaf, 0x6d, 0xe3, 0xc3, 0xbd, 0x1f, 0xf7, -0x9b, 0x1f, 0x52, 0xb8, 0x9b, 0x8e, 0x63, -0x4c, 0x95, 0xb4, 0x92, 0x7c, 0x7f, 0x23, -0x76, 0x07, 0x3a, 0x48, 0xdc, 0x88, 0x4b, -0x43, 0xf2, 0xea, 0x57, 0x07, 0xf6, 0xcc, -0x8a, 0x9c, 0x0e, 0x7f, 0x9e, 0x75, 0x98, -0xf5, 0x25, 0x9e, 0x19, 0x41, 0x4f, 0x5b, -0xb1, 0x86, 0x94, 0x7a, 0x52, 0xf6, 0xdc, -0x0f, 0x8f, 0x2f, 0x29, 0x52, 0x9f, 0x0a, -0x50, 0x3a, 0xac, 0xe4, 0x59, 0xbb, 0x6d, -0xae, 0x3a, 0x89, 0xf8, 0x5d, 0x9a, 0xd5, -0x1f, 0x6b, 0x58, 0x1e, 0xc9, 0xe9, 0x1a, -0xdf, 0x63, 0xd1, 0xea, 0xb6, 0x51, 0x10, -0x91, 0xe2, 0x9c, 0xa0, 0x48, 0xc3, 0x39, -0xa2, 0x80, 0xfc, 0x3f, 0x21, 0x74, 0xe5, -0xd4, 0x4f, 0x83, 0x95, 0x09, 0x00, 0x82, -0x59, 0x94, 0x78, 0xad, 0x63, 0x7f, 0x97, -0xbf, 0x27, 0x7d, 0x93, 0x4f, 0x4f, 0x8e, -0x98, 0x74, 0x76, 0xa1, 0x8a, 0x91, 0xb5, -0x22, 0xf0, 0x81, 0x03, 0x53, 0xc9, 0xc0, -0xd0, 0x5a, 0x30, 0xe5, 0x63, 0x66, 0x20, -0x6a, 0x77, 0x4c, 0xa0, 0x13, 0xa7, 0x68, -0xc8, 0x34, 0x95, 0x71, 0x26, 0x31, 0x02, -0x7e, 0x26, 0x87, 0x5a, 0x2c, 0x8b, 0xd3, -0x3b, 0x30, 0x94, 0xa6, 0x04, 0x03, 0xcd, -0xbf, 0x4b, 0x53, 0x46, 0xe5, 0x37, 0xf1, -0xa7, 0x16, 0xad, 0x23, 0x3a, 0x7f, 0x5d, -0x43, 0x22, 0x5c, 0xdb, 0xfd, 0x6c, 0xd1, -0x41, 0x69, 0xc1, 0x2a, 0x63, 0x6c, 0x02, -0xe9, 0x9c, 0xa1, 0x26, 0xa6, 0x4a, 0xa5, -0xe3, 0xd1, 0xd3, 0x75, 0x73, 0x0b, 0x6b, -0x7c, 0x52, 0x84, 0x0d, 0x1e, 0x7c, 0xdc, -0xb2, 0xf8, 0x61, 0x74, 0x83, 0x26, 0x91, -0x59, 0xf2, 0x6d, 0x6f, 0x08, 0x0e, 0x31, -0xd8, 0xc6, 0xdd, 0x4c, 0xb5, 0x4a, 0x16, -0x62, 0x83, 0x21, 0xf2, 0x93, 0xe2, 0x4e, -0x32, 0x22, 0x0b, 0x29, 0x79, 0xcc, 0x9f, -0x7e, 0xaf, 0x39, 0x5f, 0x5f, 0x70, 0xf3, -0x60, 0x3c, 0xc2, 0x52, 0x03, 0x4b, 0x7c, -0xef, 0x98, 0x95, 0xd2, 0xb1, 0xf0, 0x33, -0xdf, 0xa9, 0x82, 0x2e, 0x17, 0x9d, 0x89, -0xe2, 0xa9, 0xd8, 0x61, 0x62, 0x30, 0x7b, -0x1c, 0x07, 0x2b, 0xc3, 0xe1, 0x29, 0x80, -0x4e, 0x36, 0x98, 0x14, 0x75, 0xed, 0xac, -0xb3, 0x52, 0xbd, 0x6b, 0x19, 0x90, 0x8f, -0xc4, 0xe4, 0x80, 0x2a, 0x86, 0xb4, 0x9c, -0x8c, 0x83, 0x45, 0x6b, 0x3b, 0x03, 0x99, -0xa7, 0xe8, 0x7b, 0x34, 0xda, 0x8a, 0x0c, -0xc7, 0x1d, 0xcd, 0x31, 0x41, 0xe6, 0x44, -0xd9, 0xcf, 0xea, 0x58, 0x2f, 0x0f, 0x56, -0x6e, 0xe1, 0xc1, 0x8b, 0x53, 0xa6, 0xdb, -0xf2, 0xad, 0x68, 0x13, 0x54, 0x43, 0xb5, -0x2d, 0xb8, 0x0d, 0x77, 0xbd, 0x48, 0x2a, -0x50, 0xe8, 0x47, 0xac, 0xbc, 0xb5, 0x15, -0x58, 0x45, 0xa9, 0x6d, 0xfb, 0x62, 0x13, -0xe1, 0x77, 0xb7, 0x21, 0x17, 0x18, 0x8a, -0xd8, 0xf8, 0x96, 0xdb, 0xdf, 0x33, 0x92, -0x0b, 0xea, 0x18, 0x66, 0x08, 0x28, 0x47, -0xbd, 0xa1, 0xd7, 0x3b, 0x00, 0x50, 0x84, -0xa0, 0xd6, 0xc9, 0xf9, 0x9a, 0x9e, 0x25, -0xab, 0x43, 0x07, 0x4d, 0x89, 0x11, 0xe4, -0xaf, 0x01, 0xf1, 0xf3, 0x2a, 0x42, 0xa8, -0xbe, 0xea, 0xcd, 0x17, 0x5b, 0x99, 0x5d, -0xdf, 0xf4, 0x2e, 0xe8, 0x1d, 0xee, 0x1b, -0x3a, 0x91, 0x70, 0x50, 0x82, 0xa7, 0xb5, -0x17, 0x7c, 0xe1, 0x35, 0x8b, 0xe4, 0x43, -0x29, 0x8d, 0x52, 0xb9, 0x56, 0xba, 0x29, -0x82, 0xc1, 0x2a, 0xfa, 0x70, 0x2b, 0x8f, -0x42, 0xc2, 0x54, 0x61, 0xd2, 0xec, 0xe4, -0x9c, 0x8a, 0xe3, 0x28, 0xa1, 0x88, 0x3d, -0x96, 0xfd, 0x36, 0x64, 0x5e, 0x63, 0xa9, -0xc8, 0x6c, 0x65, 0x69, 0x46, 0x74, 0x23, -0x7a, 0x30, 0x08, 0xe3, 0x37, 0x01, 0xe8, -0xe5, 0x2d, 0xed, 0xd9, 0xb9, 0x14, 0x53, -0x76, 0x87, 0x0e, 0x9f, 0xf3, 0x36, 0xc4, -0xec, 0xef, 0x3b, 0xee, 0xd2, 0x2d, 0x97, -0x94, 0x1d, 0xe7, 0x94, 0xe7, 0xe0, 0xb3, -0x03, 0x52, 0xb1, 0x65, 0xdd, 0x9e, 0xe3, -0x44, 0xaf, 0xba, 0x77, 0x09, 0x1e, 0x70, -0xc8, 0xc2, 0xc5, 0x32, 0x52, 0xcf, 0xa3, -0x0b, 0x74, 0x50, 0xda, 0x9e, 0xfa, 0xa7, -0x66, 0x02, 0x1d, 0xac, 0xd5, 0xc5, 0x0c, -0x87, 0xbd, 0x48, 0xd5, 0x43, 0x8c, 0xbc, -0xd7, 0x93, 0x54, 0x76, 0x9e, 0xbe, 0x99, -0x24, 0x18, 0xb2, 0xc0, 0xcb, 0x51, 0x38, -0x08, 0xd0, 0x2b, 0x72, 0x4b, 0xa5, 0xeb, -0xc2, 0x3f, 0x08, 0x5e, 0x0a, 0x75, 0x0c, -0x96, 0xdb, 0xe0, 0xf0, 0x40, 0x0d, 0x9d, -0xf0, 0xcb, 0x20, 0x38, 0xf3, 0x7e, 0xce, -0x5a, 0x73, 0x7e, 0x44, 0xc9, 0x20, 0x72, -0xc5, 0xbf, 0x91, 0xc6, 0x93, 0x7d, 0x9f, -0xde, 0x0f, 0x66, 0x90, 0xa6, 0x0b, 0x66, -0x74, 0xc8, 0x71, 0x54, 0xc3, 0x42, 0xd8, -0xa5, 0xe0, 0xba, 0xf1, 0x50, 0x1d, 0x39, -0x33, 0x0b, 0xa1, 0x9d, 0xfa, 0xf7, 0xe7, -0xa0, 0xf9, 0xf6, 0xe6, 0xb7, 0xe0, 0x20, -0xe6, 0x95, 0xcc, 0xe1, 0x84, 0x9c, 0xce, -0xab, 0x61, 0x14, 0xdc, 0xa6, 0x22, 0xda, -0xf7, 0x14, 0xc5, 0x58, 0x90, 0x20, 0xa0, -0x8b, 0x0b, 0x0f, 0xb3, 0x70, 0xcd, 0xbc, -0xe0, 0xc9, 0xa5, 0x33, 0x1e, 0xfd, 0x94, -0xe8, 0x7c, 0xe4, 0x0b, 0xc9, 0x65, 0x25, -0xa1, 0xed, 0x44, 0x87, 0xb5, 0xb0, 0x23, -0x85, 0xad, 0x67, 0xcb, 0xf4, 0x3b, 0xeb, -0xd5, 0x6c, 0xfb, 0x9e, 0xe2, 0x3f, 0xed, -0x99, 0x48, 0x99, 0xf4, 0xbe, 0x9a, 0x88, -0x72, 0x82, 0x71, 0x6c, 0x07, 0x3b, 0x77, -0x9b, 0xd7, 0xd9, 0xb1, 0x89, 0x0c, 0x62, -0x07, 0x67, 0xeb, 0xca, 0x1d, 0xf4, 0x1b, -0x39, 0x03, 0x7c, 0xd7, 0xf9, 0x07, 0x89, -0xc1, 0x80, 0xca, 0xfd, 0xf2, 0x19, 0xa2, -0x58, 0xef, 0x8f, 0xea, 0x93, 0x15, 0x4a, -0xfd, 0x90, 0xe4, 0x37, 0xef, 0x3a, 0xa6, -0x28, 0x09, 0x9d, 0x2b, 0xd2, 0x6b, 0xf8, -0x95, 0xe1, 0xf7, 0x19, 0x22, 0x34, 0xd0, -0xca, 0x8a, 0x05, 0x2d, 0x1f, 0x4d, 0x8a, -0x02, 0x59, 0x8e, 0x06, 0x3b, 0x36, 0xd8, -0x7d, 0x70, 0x52, 0xcd, 0x55, 0xd3, 0x94, -0x5c, 0x7b, 0xb4, 0x84, 0x91, 0x29, 0x4b, -0xb2, 0x86, 0xba, 0xdd, 0xc7, 0xb5, 0x48, -0xd5, 0xde, 0x6f, 0x9c, 0x2c, 0xcf, 0xd8, -0xd8, 0xcc, 0x34, 0xb0, 0x6a, 0x59, 0xc7, -0x3e, 0x3d, 0xe7, 0xe6, 0x89, 0x98, 0x83, -0xa4, 0x5d, 0xa9, 0x8d, 0x54, 0xa0, 0xb8, -0x9a, 0x32, 0xe3, 0x49, 0xc0, 0x25, 0x4e, -0x29, 0x1b, 0xb9, 0x49, 0x8b, 0x65, 0x16, -0x1f, 0xaa, 0x90, 0xbf, 0x2a, 0x64, 0x0f, -0x7a, 0x86, 0x57, 0x84, 0x47, 0xd6, 0x0e, -0xf2, 0x52, 0xaa, 0xe2, 0x0a, 0xc9, 0xb3, -0xdd, 0x5e, 0xda, 0xf1, 0xca, 0x81, 0x5c, -0x11, 0xed, 0x03, 0xdc, 0xc6, 0xff, 0x82, -0x8a, 0xa8, 0xac, 0x93, 0x9a, 0x77, 0xd7, -0xdf, 0x22, 0x33, 0xf8, 0xb6, 0xf5, 0x04, -0xb5, 0x25, 0x96, 0x1a, 0x78, 0x28, 0x75, -0x75, 0xaf, 0xc7, 0xbf, 0x14, 0xe3, 0x48, -0xb2, 0x55, 0x3a, 0xbf, 0x5d, 0x3d, 0x65, -0x1e, 0x50, 0x74, 0x31, 0x4f, 0x2d, 0x2a, -0x81, 0x91, 0x98, 0x91, 0xfb, 0x67, 0x5d, -0xdb, 0x13, 0x5d, 0xaf, 0xdc, 0x90, 0x87, -0x9d, 0x55, 0xb4, 0xbc, 0xa9, 0x3a, 0x73, -0xca, 0x2e, 0x22, 0xad, 0x64, 0xb2, 0xdf, -0x61, 0xbe, 0x85, 0x3b, 0xee, 0x50, 0xda, -0x90, 0x80, 0xb4, 0xaf, 0x13, 0xcb, 0xb6, -0x5c, 0xd0, 0x68, 0xc2, 0x21, 0x8e, 0x26, -0x34, 0xd1, 0x6f, 0xf6, 0xe2, 0x3e, 0x25, -0xdd, 0x38, 0x3e, 0xc7, 0xa4, 0x8f, 0x95, -0xb6, 0xc9, 0x1d, 0xe4, 0xc7, 0x46, 0x59, -0x9e, 0xf8, 0x46, 0xcd, 0x60, 0x59, 0x66, -0x0c, 0x7c, 0xf8, 0xe3, 0x61, 0xd4, 0x3f, -0xcd, 0x5d, 0xf7, 0xb9, 0x7c, 0x7d, 0x44, -0x1a, 0x86, 0x58, 0x62, 0xfd, 0x0b, 0x7c, -0x42, 0x78, 0x4e, 0x20, 0xe0, 0x81, 0x74, -0x15, 0xe4, 0xb9, 0x45, 0x85, 0x5f, 0x22, -0x79, 0x05, 0x4d, 0x35, 0xbb, 0x4b, 0xd7, -0x04, 0x55, 0xf9, 0x3f, 0x72, 0xb5, 0xfa, -0x2f, 0xbb, 0xcf, 0xce, 0xb6, 0x39, 0x2e, -0xf6, 0xbe, 0x76, 0x77, 0x34, 0x72, 0xc2, -0x1d, 0x38, 0x31, 0x25, 0x45, 0x74, 0x95, -0x5f, 0x0c, 0x94, 0xcf, 0xa8, 0xc9, 0xbe, -0xcf, 0xb1, 0x7d, 0xf4, 0x55, 0xa4, 0x5e, -0xc0, 0xae, 0x03, 0x91, 0x98, 0x6e, 0x29, -0x56, 0xbb, 0xa3, 0xb2, 0xea, 0x45, 0xfb, -0xcb, 0x45, 0x33, 0x84, 0x0c, 0x14, 0x2d, -0x9d, 0x09, 0x72, 0x4f, 0x01, 0x58, 0x86, -0x07, 0x83, 0x3e, 0xfc, 0xa5, 0x89, 0x4e, -0xa7, 0xe4, 0xfd, 0x5e, 0x61, 0x47, 0x98, -0xa8, 0xec, 0x05, 0xdc, 0xe4, 0x92, 0x85, -0x5f, 0x53, 0xa5, 0xeb, 0x5f, 0x06, 0x46, -0x23, 0xfd, 0xad, 0x25, 0x9c, 0xd4, 0xe5, -0xbe, 0x8c, 0x74, 0x5f, 0xc6, 0xbe, 0x62, -0x81, 0x13, 0xb5, 0xa0, 0x71, 0x90, 0x71, -0x56, 0x0b, 0x35, 0xef, 0x12, 0x9c, 0x8e, -0x45, 0xdf, 0xd8, 0x89, 0xbe, 0x35, 0x92, -0x2b, 0x46, 0x9e, 0xab, 0x62, 0x74, 0x0d, -0xa7, 0x51, 0x1b, 0x75, 0x4e, 0x67, 0x84, -0xa8, 0xc2, 0x06, 0x00, 0xc9, 0x6a, 0xdd, -0xa7, 0x17, 0xc6, 0xb0, 0xf1, 0x24, 0xcd, -0x42, 0x7a, 0xbe, 0x4f, 0x24, 0xa2, 0x3e, -0xf7, 0x54, 0x5b, 0xba, 0xd3, 0xfc, 0xc8, -0x4d, 0x37, 0x8f, 0xc5, 0x6f, 0x96, 0xd8, -0x2e, 0xab, 0x66, 0xfa, 0xba, 0x64, 0xbe, -0xce, 0x02, 0x43, 0x7e, 0x1f, 0x67, 0xbe, -0x60, 0x26, 0xa3, 0xb8, 0xa8, 0xb0, 0x89, -0xca, 0xd3, 0x92, 0x1f, 0xbb, 0xf8, 0x6a, -0xcb, 0xb3, 0x65, 0x44, 0x9e, 0x8b, 0xaa, -0x94, 0x77, 0x68, 0x1b, 0x38, 0xa1, 0x41, -0x9f, 0x54, 0xae, 0xd4, 0x4e, 0x61, 0x71, -0x8e, 0x78, 0x59, 0x93, 0x9c, 0xc5, 0x00, -0xa6, 0xd1, 0x0c, 0x69, 0x09, 0xbe, 0x59, -0x7c, 0xd7, 0x82, 0x30, 0x8b, 0xa2, 0x4a, -0x5c, 0x91, 0x8d, 0xe8, 0x6d, 0x8d, 0xe0, -0x77, 0x14, 0x91, 0x12, 0x4f, 0xda, 0x0d, -0x0e, 0x7d, 0x9e, 0xdf, 0x1a, 0x24, 0x48, -0x01, 0x47, 0x67, 0xba, 0x5a, 0x03, 0xec, -0x71, 0xa6, 0xde, 0x85, 0x86, 0xff, 0x0f, -0xbc, 0x6e, 0xc6, 0x1b, 0x13, 0xf3, 0x92, -0x7f, 0x38, 0x67, 0x61, 0x92, 0xfa, 0x6d, -0xe8, 0x43, 0x89, 0x75, 0x2d, 0xd5, 0xa9, -0xda, 0x44, 0x74, 0x43, 0xbd, 0xee, 0x16, -0x76, 0xa0, 0xc4, 0x42, 0xed, 0x77, 0xe2, -0x9b, 0x59, 0x11, 0x73, 0x16, 0x11, 0x1d, -0x36, 0xfc, 0x1c, 0xfd, 0x4b, 0xd3, 0x03, -0xa5, 0xad, 0xca, 0x9e, 0x9f, 0x92, 0x5d, -0x42, 0xb5, 0x62, 0xae, 0xdd, 0xfe, 0x7a, -0x1b, 0xf4, 0x6c, 0xc1, 0xc0, 0xf9, 0x56, -0x1b, 0xad, 0xe5, 0xc6, 0xf2, 0xfe, 0x44, -0x5d, 0x5d, 0x16, 0x15, 0x5e, 0xe3, 0xdf, -0x30, 0x21, 0x13, 0x7b, 0x3d, 0x84, 0x09, -0x8c, 0x1c, 0x59, 0xa5, 0x22, 0x56, 0x28, -0xa6, 0xac, 0x36, 0xf1, 0x9f, 0x76, 0x21, -0x42, 0xc6, 0xf7, 0xb3, 0x12, 0xd6, 0x63, -0x2c, 0x89, 0xf3, 0x96, 0xf8, 0x9f, 0x66, -0xf2, 0x5c, 0xc8, 0x08, 0x59, 0xdd, 0x7e, -0x79, 0xde, 0x0d, 0x3c, 0x41, 0xa9, 0x7e, -0xcc, 0xc1, 0x35, 0x6c, 0x60, 0x65, 0x02, -0xdc, 0xd1, 0x9e, 0x71, 0xc0, 0x99, 0x1e, -0x77, 0x63, 0x18, 0xa6, 0x42, 0x6a, 0x23, -0x51, 0x9c, 0xc3, 0xd3, 0xfd, 0x0f, 0x6b, -0xc9, 0x88, 0xb5, 0x7e, 0x7a, 0x9c, 0xf6, -0xd5, 0xdc, 0x53, 0xdb, 0x2e, 0x42, 0xdb, -0xd7, 0xcf, 0xe0, 0x8b, 0x80, 0x3f, 0x70, -0x53, 0x1e, 0xf5, 0x89, 0x6c, 0xa4, 0x23, -0x6e, 0x48, 0x5e, 0xd8, 0x34, 0xac, 0xf4, -0x69, 0x6b, 0x29, 0x45, 0x7d, 0xee, 0xbc, -0x90, 0xe7, 0x00, 0x99, 0xe1, 0x75, 0x4c, -0xe6, 0x42, 0x3f, 0xda, 0xc1, 0xe9, 0x26, -0x73, 0x38, 0xe7, 0xe9, 0x73, 0x2e, 0x94, -0x9b, 0xc4, 0xcf, 0xa6, 0x09, 0x9d, 0x46, -0xcb, 0x71, 0x75, 0x42, 0x85, 0xba, 0xdf, -0x94, 0xb4, 0x3c, 0xff, 0xcb, 0x57, 0x27, -0xd2, 0x7c, 0xec, 0xd5, 0x24, 0x8c, 0xa6, -0x5a, 0x04, 0x5d, 0x98, 0x65, 0x57, 0x1c, -0xcb, 0x11, 0x1e, 0xfa, 0xe4, 0xfc, 0x53, -0xb3, 0x4b, 0x62, 0x10, 0xb7, 0x64, 0xf0, -0x54, 0x1a, 0x39, 0xf7, 0xcc, 0x15, 0x03, -0x8d, 0xf6, 0xaf, 0x34, 0x05, 0x44, 0xaa, -0xa8, 0xe7, 0x51, 0xe0, 0x0a, 0xe9, 0xaa, -0xc6, 0x85, 0x5f, 0x73, 0x8e, 0xa6, 0xd4, -0xe6, 0x5d, 0x45, 0xab, 0x7d, 0xbf, 0x6f, -0x0b, 0xf9, 0x52, 0x17, 0x32, 0x54, 0x43, -0x29, 0x1b, 0x97, 0x6a, 0x6c, 0x68, 0x77, -0x31, 0x76, 0x72, 0x27, 0x04, 0x40, 0x16, -0x41, 0xb1, 0xfa, 0xc9, 0xb9, 0xa7, 0xaf, -0xce, 0xf4, 0xe5, 0x70, 0x19, 0x55, 0x19, -0xf2, 0x53, 0x19, 0x2d, 0x6f, 0x3f, 0x10, -0x81, 0xc4, 0x6c, 0xa6, 0x42, 0xa5, 0x86, -0x48, 0xce, 0x94, 0xd4, 0x3f, 0xcd, 0xc6, -0x87, 0x3d, 0xa9, 0x7c, 0xcb, 0x68, 0x30, -0x0d, 0xb1, 0x8f, 0x15, 0xb6, 0xeb, 0x67, -0x9e, 0x03, 0x25, 0x2d, 0x27, 0x8c, 0xf2, -0xf5, 0x22, 0x75, 0xbb, 0x8d, 0x27, 0x43, -0xd6, 0xc2, 0x84, 0x28, 0x63, 0x95, 0x4d, -0x13, 0x42, 0x80, 0x0a, 0x69, 0xaa, 0xef, -0xa2, 0x79, 0x56, 0xb9, 0x9f, 0x35, 0x75, -0x67, 0xaf, 0x13, 0x84, 0x68, 0xcb, 0xf5, -0x1f, 0x35, 0x6f, 0xe1, 0x45, 0x9b, 0x22, -0x69, 0x0a, 0x8f, 0x90, 0x7d, 0x37, 0x8e, -0x7e, 0xaa, 0x8e, 0xef, 0x25, 0x22, 0xf5, -0xe2, 0xa6, 0x69, 0xfb, 0xcd, 0xab, 0x02, -0xfe, 0xcc, 0x09, 0xc1, 0x59, 0x6c, 0x4b, -0xc4, 0xb9, 0xf0, 0xa1, 0x25, 0x3a, 0xec, -0x58, 0x76, 0xa4, 0xec, 0x27, 0x86, 0x05, -0xf3, 0x3e, 0x02, 0x05, 0x47, 0xfa, 0xb4, -0xf0, 0xde, 0xd3, 0xd1, 0x2a, 0x88, 0xf4, -0x47, 0x35, 0xd6, 0xba, 0x59, 0xe4, 0x7e, -0x42, 0x3c, 0x77, 0x1e, 0xf6, 0x00, 0xc4, -0x7c, 0x2c, 0x2e, 0x60, 0xdd, 0x5d, 0xcf, -0xc4, 0x25, 0x1f, 0x5d, 0x37, 0xf2, 0x37, -0x63, 0x7b, 0x88, 0x84, 0x64, 0x06, 0x07, -0xfa, 0x90, 0x66, 0x9b, 0x9a, 0x3e, 0x5a, -0x1f, 0x91, 0x62, 0xaf, 0x4d, 0xcb, 0x24, -0x39, 0x7f, 0x9e, 0x57, 0xf8, 0xc1, 0x97, -0xb9, 0x2e, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1.inc deleted file mode 100644 index ee582e3b8a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1.inc +++ /dev/null @@ -1,74 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: grp01 - * Signer: member0 - * HashAlg: Sha256 - * Message: "test1" - * Basename: None (random base) - * SigRl: Empty - */ - 0xF7, 0xEE, 0x2C, 0x94, 0x30, 0x89, 0xA3, 0x9D, 0x6F, 0x1B, 0xF4, - 0xC9, 0xEA, 0xFA, 0x17, 0xF0, 0x01, 0x3F, 0x48, 0xA0, 0x90, 0xB9, - 0x73, 0xA6, 0x52, 0xC4, 0xF0, 0xDD, 0xDD, 0xFF, 0xFC, 0x72, - - 0x15, 0x08, 0x6C, 0x6B, 0xE7, 0x8B, 0xFE, 0x27, 0x7B, 0x51, 0x39, - 0x7D, 0xE1, 0xB2, 0x2A, 0x17, 0xDF, 0x80, 0xF5, 0xC9, 0x55, 0x6A, - 0x30, 0xF2, 0xA9, 0xE7, 0x0E, 0xF9, 0x4F, 0x50, 0x32, 0xDB, - - 0xE0, 0x46, 0xF9, 0xFA, 0x48, 0xD1, 0xE9, 0xA4, 0x6E, 0xC1, 0x47, - 0xDE, 0x95, 0xD6, 0x03, 0x0B, 0x92, 0x38, 0xD2, 0x86, 0xE0, 0x0E, - 0x97, 0x9C, 0x4B, 0x74, 0x9E, 0x3E, 0xCE, 0x08, 0xA3, 0x97, - - 0xEB, 0x08, 0x67, 0x0F, 0x88, 0x9C, 0xB3, 0xCE, 0x5B, 0x13, 0x45, - 0x97, 0xFA, 0xA5, 0xE8, 0xC9, 0xEF, 0xEA, 0xD5, 0xFC, 0x4D, 0xE2, - 0x33, 0xC8, 0x43, 0x90, 0x40, 0x13, 0xFC, 0xA5, 0x7B, 0xDF, - - 0xA6, 0x1F, 0xE5, 0x33, 0x84, 0x9B, 0x59, 0x7B, 0x34, 0x13, 0x8E, - 0x87, 0x78, 0x53, 0xC2, 0x50, 0x83, 0x81, 0x8B, 0xE2, 0x16, 0x52, - 0x22, 0x89, 0x9C, 0xA6, 0xDA, 0xF5, 0x04, 0x4B, 0x76, 0x64, - - 0xBB, 0xBB, 0x2E, 0x80, 0x00, 0x80, 0xF0, 0xBF, 0x3F, 0xC0, 0x1A, - 0x8F, 0x6A, 0x76, 0xBB, 0x91, 0x36, 0xC7, 0x3B, 0x35, 0xFE, 0x1C, - 0x3E, 0x2A, 0x77, 0x11, 0xE4, 0x43, 0xBB, 0x98, 0xBF, 0xB4, - - 0xA1, 0x3F, 0xEA, 0x99, 0x7E, 0xC7, 0x65, 0xF5, 0x41, 0xA6, 0xD6, - 0xD3, 0x77, 0xEC, 0x27, 0xF8, 0x6C, 0x18, 0x28, 0x69, 0x97, 0x08, - 0x0E, 0x63, 0x5A, 0xDA, 0xFE, 0x9F, 0xD1, 0x4A, 0x61, 0x4F, - - 0xE2, 0x21, 0xD1, 0xBC, 0x14, 0x8A, 0xCB, 0xF5, 0xB4, 0xE0, 0x24, - 0xB8, 0xB7, 0x6B, 0xDD, 0x2A, 0xC5, 0xF8, 0x10, 0x3B, 0xD3, 0x77, - 0xC8, 0x8B, 0x19, 0xBF, 0x5E, 0xFB, 0x2B, 0xB1, 0xC9, 0xE1, - - 0x14, 0x92, 0xD1, 0x1F, 0xAC, 0x90, 0x4D, 0xC3, 0x3E, 0xB8, 0xA7, - 0xFE, 0x35, 0x98, 0xDA, 0x94, 0xD6, 0xF3, 0x27, 0x29, 0x4B, 0x70, - 0xCF, 0x0F, 0xDA, 0x14, 0x97, 0xA1, 0x9B, 0x6B, 0x24, 0x08, - - 0x50, 0x38, 0x60, 0x31, 0xAB, 0x05, 0xCC, 0xB1, 0xC2, 0x06, 0xA0, - 0xD7, 0x92, 0x12, 0xBD, 0x17, 0x81, 0xB9, 0x7E, 0x07, 0x9B, 0xD4, - 0x3B, 0x2D, 0x3C, 0x15, 0x3A, 0x5A, 0xF1, 0xC0, 0xC4, 0x75, - - 0x76, 0x8D, 0xE5, 0xC2, 0xAB, 0x78, 0xD9, 0x76, 0x98, 0xFF, 0x92, - 0xEA, 0x95, 0x58, 0xC5, 0x0C, 0x6F, 0x1B, 0x35, 0xC4, 0xBF, 0x4A, - 0x9E, 0xC2, 0x6A, 0xEC, 0xE2, 0xF6, 0xAF, 0xEB, 0xAC, 0x06, - - 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_basename1_sha256.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_basename1_sha256.inc deleted file mode 100644 index 9d2680fe08..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_basename1_sha256.inc +++ /dev/null @@ -1,85 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: grp01 - * Signer: member0 - * HashAlg: Sha256 - * Message: "test1" - * Basename: "basename1" - * SigRl: Empty - */ - 0xa6, 0x13, 0x29, 0xb6, 0x61, 0xa2, 0xb8, 0xd7, - 0x49, 0x86, 0xcb, 0xaf, 0x94, 0x4d, 0x9e, 0x51, - 0xcf, 0xd3, 0x5d, 0x0f, 0x33, 0x9a, 0x59, 0x0d, - 0xe7, 0xc9, 0xb9, 0x7f, 0x83, 0xae, 0x27, 0xe6, - - 0x40, 0xf0, 0x88, 0x13, 0xe2, 0xb6, 0x6a, 0x43, - 0x26, 0xa3, 0x21, 0xea, 0x00, 0x78, 0xcd, 0xce, - 0x0e, 0x14, 0x7a, 0xde, 0xcf, 0xaa, 0x7b, 0xc5, - 0x7e, 0x7c, 0xaf, 0xe4, 0x5e, 0x8a, 0xdd, 0xc7, - - 0x0b, 0x5e, 0x4e, 0xc6, 0x94, 0xf0, 0xef, 0xf3, - 0xbe, 0xd6, 0x12, 0x28, 0x01, 0xa5, 0xf0, 0x4d, - 0xcc, 0xbe, 0xeb, 0x0e, 0xb9, 0xa1, 0x39, 0x4a, - 0x7e, 0xb3, 0x46, 0x74, 0xc3, 0xb1, 0xdf, 0x91, - - 0x74, 0x3b, 0xa1, 0x5b, 0x29, 0xae, 0x57, 0xf1, - 0x9d, 0xfa, 0xda, 0x57, 0x06, 0x90, 0x4a, 0xa6, - 0x30, 0x16, 0x1a, 0xe9, 0x47, 0xad, 0xd1, 0xc2, - 0xda, 0x8d, 0xbb, 0x5b, 0x46, 0x17, 0x48, 0x58, - - 0x2d, 0xd2, 0x44, 0xc4, 0x7e, 0xd7, 0xb2, 0x73, - 0x91, 0x8c, 0xb2, 0xa7, 0xff, 0xb0, 0xd3, 0xab, - 0x6f, 0x10, 0x14, 0xeb, 0x30, 0x33, 0x90, 0x14, - 0x5b, 0x3b, 0x83, 0x6c, 0xe1, 0xa5, 0x0f, 0x8b, - - 0x6f, 0x9f, 0xf1, 0x1a, 0xbe, 0xc3, 0x75, 0xd2, - 0x0b, 0xb9, 0xa1, 0x1a, 0x2b, 0x01, 0x86, 0xc3, - 0xc2, 0xf8, 0xd7, 0x14, 0x1d, 0xc1, 0x8b, 0x97, - 0x0c, 0x20, 0xce, 0xce, 0xf4, 0x9a, 0xee, 0xc9, - - 0x77, 0x3b, 0x42, 0x0d, 0xe4, 0x87, 0xb2, 0x4a, - 0x44, 0x4e, 0x3e, 0xed, 0x39, 0xaa, 0xad, 0xe4, - 0xe8, 0x4d, 0xa3, 0x5d, 0x6f, 0xa4, 0xb7, 0x22, - 0x32, 0xae, 0xa5, 0xfb, 0x85, 0x71, 0x42, 0xc7, - - 0x02, 0x70, 0xa1, 0xae, 0x70, 0x4f, 0xfe, 0xfc, - 0x1e, 0x52, 0x0f, 0xc0, 0xbe, 0x0a, 0xaf, 0xbc, - 0x1a, 0x4a, 0xd6, 0x25, 0x91, 0x1f, 0xca, 0x0d, - 0x83, 0x89, 0x18, 0xd3, 0xbd, 0x35, 0xbd, 0x58, - - 0x5d, 0xda, 0x73, 0x4f, 0x82, 0xa4, 0xdc, 0x58, - 0x9a, 0x66, 0x02, 0x16, 0xa0, 0x85, 0x77, 0x8f, - 0x38, 0x84, 0x68, 0xcf, 0x08, 0xcd, 0x88, 0x7f, - 0x75, 0xe5, 0x6c, 0x16, 0x96, 0xd1, 0x0b, 0xea, - - 0x97, 0x74, 0xaa, 0x93, 0xcb, 0xe6, 0x6c, 0xab, - 0x9f, 0x62, 0x68, 0x8a, 0x07, 0x93, 0x5c, 0x67, - 0xb3, 0xa8, 0x7a, 0x5a, 0x1c, 0xc3, 0xc3, 0xbe, - 0x44, 0x73, 0x79, 0x65, 0xa5, 0x5a, 0x62, 0x9e, - - 0xc1, 0x52, 0xd9, 0xd1, 0xb2, 0x40, 0x0f, 0x95, - 0x4e, 0x53, 0x95, 0xc0, 0x3e, 0x5b, 0xba, 0x5f, - 0x54, 0x25, 0x05, 0xde, 0xea, 0x5a, 0x4c, 0xa1, - 0x25, 0xa6, 0x2c, 0x05, 0x0c, 0x79, 0x53, 0x15, - - 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha256.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha256.inc deleted file mode 100644 index b14d51849e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha256.inc +++ /dev/null @@ -1,85 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: grp01 - * Signer: member0 - * HashAlg: Sha256 - * Message: "test1" - * Basename: None (random base) - * SigRl: Empty - */ - 0x04, 0x16, 0x79, 0x8e, 0xf9, 0xff, 0x2b, 0xc3, - 0x63, 0x0a, 0x40, 0x68, 0x87, 0x4a, 0x5b, 0xb5, - 0xba, 0x0f, 0xe4, 0x23, 0x05, 0xca, 0xd1, 0xf8, - 0x4e, 0xa6, 0x40, 0x18, 0xed, 0xb5, 0xb3, 0x0d, - - 0x16, 0x58, 0x87, 0x51, 0xd1, 0x83, 0xb6, 0x9a, - 0x41, 0x03, 0xd9, 0xdc, 0xb3, 0xca, 0xc7, 0x0e, - 0xbe, 0xbc, 0xf5, 0xc7, 0x31, 0xe3, 0x8d, 0x0b, - 0x14, 0x0c, 0xe4, 0x2d, 0x2b, 0xcb, 0x3c, 0xf5, - - 0xc0, 0x23, 0x82, 0xe0, 0x69, 0xe7, 0x41, 0x78, - 0x7f, 0x50, 0xc6, 0x61, 0x5c, 0x1b, 0x07, 0x3a, - 0xf6, 0x83, 0xbc, 0xb0, 0x46, 0xae, 0x5c, 0x4f, - 0x13, 0xf3, 0xef, 0x0c, 0xe6, 0x24, 0xe5, 0xdf, - - 0x5e, 0x62, 0xa1, 0x09, 0x1a, 0xe3, 0xa1, 0xda, - 0x72, 0x34, 0x51, 0x18, 0xbc, 0x91, 0x7d, 0x11, - 0x0d, 0x4d, 0x9a, 0xd9, 0x47, 0x40, 0x69, 0xbf, - 0xc6, 0xaf, 0x06, 0xb2, 0xf6, 0xee, 0x76, 0xde, - - 0x1f, 0xb6, 0xb9, 0x55, 0xab, 0xe7, 0x7b, 0xb1, - 0xe7, 0x9e, 0xaf, 0xe4, 0x60, 0x9f, 0x6d, 0x1b, - 0xd9, 0xc8, 0xee, 0xcc, 0x49, 0xea, 0x52, 0x41, - 0x26, 0x06, 0x0b, 0x75, 0x13, 0x63, 0x4a, 0x15, - - 0x18, 0x50, 0xb4, 0x49, 0x35, 0xf8, 0xc7, 0xf7, - 0x77, 0xc3, 0xa7, 0x69, 0xc3, 0xb3, 0xaa, 0x19, - 0xc1, 0x57, 0x21, 0x44, 0x00, 0x95, 0x99, 0xef, - 0x09, 0xbe, 0x9b, 0xc5, 0x82, 0xbd, 0x3b, 0xc2, - - 0x0d, 0x85, 0xbb, 0x4a, 0x12, 0x0f, 0xd0, 0xfc, - 0x2d, 0x66, 0x8f, 0xda, 0x79, 0xb4, 0x28, 0x8e, - 0x3c, 0x74, 0xa8, 0xf8, 0x55, 0xe4, 0x6d, 0xc6, - 0x67, 0xa2, 0x7d, 0x1c, 0xfa, 0xcb, 0x59, 0x2d, - - 0x41, 0x4c, 0xd6, 0x9b, 0x89, 0xd3, 0xef, 0x3b, - 0x87, 0xae, 0x3c, 0x11, 0x6b, 0xc6, 0x6c, 0xab, - 0xe0, 0x9b, 0x68, 0x89, 0xa5, 0xcb, 0x9f, 0x87, - 0x49, 0x9f, 0xe6, 0x6b, 0xf7, 0xbb, 0x11, 0x70, - - 0x13, 0xee, 0x94, 0x8e, 0x35, 0x6a, 0xa5, 0x0c, - 0x8f, 0x71, 0x16, 0x65, 0xe4, 0x83, 0x8b, 0x15, - 0xc9, 0xa7, 0x27, 0x0c, 0x07, 0x86, 0x6c, 0x8b, - 0x5f, 0x4f, 0x69, 0xf3, 0x12, 0x7e, 0x4b, 0x27, - - 0x5c, 0x0f, 0x22, 0x26, 0xe4, 0x4a, 0x96, 0xe7, - 0x5b, 0x5a, 0xaf, 0x9e, 0xb4, 0xc8, 0xc5, 0x5e, - 0x12, 0xa7, 0x66, 0x50, 0xe4, 0x2a, 0x24, 0xb4, - 0x06, 0x93, 0x80, 0x1b, 0x39, 0xc2, 0x07, 0x20, - - 0x32, 0x82, 0xe5, 0xde, 0x81, 0xb6, 0x7c, 0x3a, - 0x55, 0x88, 0xa8, 0x4f, 0x12, 0xdb, 0xd4, 0x0c, - 0x75, 0x02, 0x9d, 0xdb, 0x0b, 0x8b, 0xf7, 0xc8, - 0x7e, 0xbc, 0x34, 0x66, 0x5e, 0x9a, 0xb2, 0x8f, - - 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha384.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha384.inc deleted file mode 100644 index 6191f5db47..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha384.inc +++ /dev/null @@ -1,85 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: grp01 - * Signer: member0 - * HashAlg: Sha384 - * Message: "test1" - * Basename: None (random base) - * SigRl: Empty - */ - 0x79, 0xb5, 0x73, 0xf5, 0xb2, 0x63, 0x6e, 0x0c, - 0xbb, 0x99, 0x14, 0xa8, 0x86, 0xbf, 0x23, 0xd6, - 0xc8, 0x03, 0x5f, 0x5e, 0x0b, 0xd9, 0xc6, 0x74, - 0x23, 0xc0, 0x4d, 0x0d, 0xa3, 0xdf, 0x88, 0x17, - - 0x67, 0x31, 0x05, 0xb8, 0x29, 0x9e, 0x58, 0x06, - 0xaa, 0x1f, 0xf1, 0x9f, 0xe7, 0x65, 0x7a, 0xda, - 0x9a, 0x45, 0x93, 0x27, 0xb2, 0x61, 0x51, 0x94, - 0xa4, 0x8c, 0x4a, 0x4e, 0xcd, 0xf4, 0x5c, 0x7c, - - 0xf7, 0xa4, 0x67, 0x40, 0x4e, 0xf4, 0x20, 0x90, - 0x77, 0x91, 0x37, 0x09, 0xfe, 0xe7, 0x4b, 0x9e, - 0x2e, 0xa9, 0x80, 0xfe, 0xda, 0x19, 0x4c, 0xe0, - 0x29, 0xab, 0x8e, 0xa8, 0x60, 0x59, 0x8b, 0x8e, - - 0xe1, 0x11, 0x52, 0x83, 0xdb, 0xbb, 0xff, 0x1b, - 0xc6, 0x94, 0xc2, 0xc9, 0xc9, 0x3d, 0x1f, 0xd9, - 0x3b, 0x9a, 0x14, 0x0c, 0x5e, 0x98, 0xae, 0x66, - 0x2a, 0xe1, 0x75, 0xd7, 0x19, 0x08, 0x5f, 0xf5, - - 0x01, 0xed, 0x5f, 0x18, 0xc1, 0x7e, 0xde, 0xb6, - 0x4f, 0x9c, 0xb2, 0xe7, 0x21, 0xeb, 0x94, 0xdc, - 0xaf, 0x2c, 0xf1, 0x4a, 0xef, 0x98, 0x9a, 0x8c, - 0x8d, 0xb2, 0xb5, 0x72, 0xab, 0x31, 0xf5, 0x10, - - 0xe5, 0x9c, 0x32, 0x35, 0xa7, 0x41, 0x56, 0x71, - 0xc2, 0x16, 0xcd, 0x05, 0x68, 0x2e, 0xc6, 0x00, - 0xc9, 0x3b, 0x0d, 0x43, 0x04, 0x7a, 0x6c, 0x32, - 0x96, 0x44, 0xeb, 0x75, 0xb2, 0xd9, 0xd5, 0xb1, - - 0x28, 0x91, 0x45, 0x6c, 0x28, 0x85, 0xae, 0x68, - 0xb0, 0xa6, 0x5e, 0x35, 0x1b, 0x46, 0xcf, 0x86, - 0x7a, 0xd1, 0x3a, 0xf0, 0xc6, 0x6c, 0x4a, 0x07, - 0x7a, 0xcb, 0x40, 0x90, 0x55, 0xb7, 0xdc, 0x63, - - 0xa9, 0x58, 0xae, 0x04, 0xe7, 0x65, 0x63, 0x4a, - 0x94, 0xcc, 0x32, 0x6f, 0xe3, 0xef, 0xac, 0x41, - 0x09, 0x1b, 0x06, 0x55, 0x27, 0x3a, 0x26, 0x87, - 0xb7, 0x4a, 0x1d, 0x76, 0x27, 0x2c, 0xab, 0x8a, - - 0x18, 0x64, 0x25, 0x70, 0x8b, 0x4f, 0xab, 0x0f, - 0x4b, 0x20, 0x14, 0xbf, 0x25, 0x49, 0xcc, 0x98, - 0xbd, 0x2d, 0xee, 0x33, 0x90, 0xd8, 0x37, 0x12, - 0x15, 0x7e, 0x0e, 0x39, 0x5e, 0xf1, 0x0f, 0xbd, - - 0xaf, 0x38, 0xb3, 0x0b, 0x9d, 0x98, 0x28, 0xa0, - 0xc3, 0x3f, 0x70, 0xc8, 0xe4, 0xc2, 0xa9, 0xac, - 0xeb, 0x24, 0xe1, 0x0a, 0xfa, 0xd4, 0xe3, 0x2e, - 0xdd, 0x8d, 0x15, 0xc9, 0x32, 0x01, 0x77, 0xcb, - - 0xdc, 0x99, 0x4c, 0xba, 0x99, 0xd3, 0xd0, 0xf1, - 0x22, 0x1a, 0xd7, 0x6e, 0x93, 0xe4, 0xd6, 0x46, - 0x41, 0x88, 0x7f, 0x5c, 0xda, 0x21, 0xa6, 0x1f, - 0x12, 0x9f, 0x77, 0x98, 0xae, 0x4a, 0x50, 0xc9, - - 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha512.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha512.inc deleted file mode 100644 index fe9eff17ff..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/member0/sig_test1_sha512.inc +++ /dev/null @@ -1,85 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: grp01 - * Signer: member0 - * HashAlg: Sha512 - * Message: "test1" - * Basename: None (random base) - * SigRl: Empty - */ - 0xb8, 0x56, 0xe4, 0xb3, 0x1a, 0xba, 0xcf, 0xaa, - 0xee, 0x6a, 0xc6, 0xaa, 0xc6, 0x43, 0xcf, 0x24, - 0x38, 0xb5, 0x95, 0xd9, 0x60, 0x40, 0xfd, 0xb1, - 0xa5, 0x0b, 0x49, 0x72, 0x8c, 0x1a, 0x32, 0x8b, - - 0x50, 0x9f, 0xed, 0xc0, 0x90, 0x46, 0x0f, 0xe5, - 0x26, 0x72, 0xb1, 0x7a, 0xf9, 0xfe, 0x67, 0xa2, - 0x81, 0xab, 0x7a, 0x6f, 0x8e, 0xc6, 0x26, 0x8b, - 0x9f, 0x5a, 0x07, 0xd7, 0xc1, 0x8a, 0x94, 0x53, - - 0x0b, 0x0a, 0xd3, 0xd9, 0xa2, 0x10, 0xc5, 0xc2, - 0x14, 0x13, 0xe2, 0xc0, 0x53, 0x5a, 0xa3, 0x13, - 0x25, 0xfd, 0xd7, 0x4c, 0xec, 0xc4, 0x57, 0x36, - 0xfc, 0x34, 0xb0, 0x7c, 0xcc, 0x17, 0x9c, 0xf4, - - 0x68, 0x9d, 0xd0, 0x8c, 0xb9, 0xb4, 0xb2, 0x35, - 0x7c, 0x9b, 0xeb, 0x24, 0x00, 0x05, 0x96, 0x0b, - 0xa2, 0xf2, 0xe4, 0x87, 0x38, 0x80, 0xcb, 0xd5, - 0x0c, 0x01, 0xc1, 0xb1, 0xe4, 0x21, 0x63, 0x41, - - 0x73, 0x44, 0xf4, 0xe4, 0x20, 0xb0, 0x0c, 0xb7, - 0x6b, 0x49, 0x4b, 0xe8, 0xb3, 0x09, 0x5f, 0x16, - 0x35, 0x08, 0x5e, 0x97, 0x5b, 0xe1, 0x77, 0x94, - 0x2c, 0x47, 0xba, 0x1b, 0x3b, 0x37, 0x71, 0x1b, - - 0x28, 0xb7, 0x7d, 0x9b, 0x61, 0x50, 0xc0, 0x85, - 0x38, 0xb7, 0xb4, 0xd7, 0x27, 0x22, 0x5b, 0xf1, - 0x72, 0xb6, 0x0d, 0x19, 0x60, 0xdc, 0x70, 0x38, - 0xe5, 0x01, 0x31, 0x04, 0x8a, 0xee, 0x1f, 0xd8, - - 0x45, 0x1d, 0x0c, 0x4c, 0xe3, 0x5f, 0xbc, 0xb0, - 0x6e, 0x9b, 0x7b, 0x01, 0x42, 0xcf, 0xb5, 0x56, - 0x32, 0xdc, 0xf2, 0xea, 0xb5, 0x66, 0xdc, 0x10, - 0xea, 0xb8, 0x2b, 0xa0, 0xb7, 0xbb, 0x55, 0x45, - - 0xf7, 0x50, 0xf5, 0x14, 0x02, 0x91, 0xf4, 0x2f, - 0x10, 0xa8, 0x94, 0xaf, 0x6a, 0x4a, 0xab, 0x87, - 0xdf, 0xd5, 0xeb, 0xc3, 0x22, 0x38, 0xaf, 0xef, - 0x79, 0xf4, 0xed, 0x1c, 0xe8, 0x5d, 0xd0, 0x19, - - 0x7a, 0x9c, 0x7c, 0x05, 0x23, 0x24, 0xb3, 0xfb, - 0x2c, 0x54, 0x4d, 0xee, 0x55, 0x51, 0xab, 0xff, - 0x52, 0xc6, 0x79, 0xe8, 0xd4, 0x64, 0x5b, 0xc5, - 0x3b, 0x65, 0xee, 0xaf, 0x69, 0xb5, 0x81, 0x51, - - 0x3a, 0x23, 0x0b, 0x6c, 0xf8, 0x0c, 0xe5, 0x72, - 0xd7, 0x16, 0x61, 0x3b, 0x73, 0x4c, 0x2b, 0x23, - 0x51, 0x64, 0x02, 0xa2, 0x60, 0xac, 0xda, 0x17, - 0x4d, 0x49, 0x38, 0xaf, 0x9c, 0xcd, 0x83, 0x3a, - - 0x88, 0x73, 0xb4, 0x5b, 0x86, 0x2c, 0xa7, 0x7f, - 0x95, 0xf1, 0x9f, 0xa9, 0x9b, 0x49, 0xca, 0xef, - 0xd7, 0x07, 0xdf, 0x06, 0x3e, 0xb9, 0xa8, 0x7f, - 0x45, 0x9d, 0x6e, 0x24, 0xf8, 0xf3, 0xee, 0x5e, - - 0x00, 0x00, - - 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/privrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/privrl.inc deleted file mode 100644 index 3c373a1e3f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/privrl.inc +++ /dev/null @@ -1,277 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -// privRL -// gid -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, - -// version -0x00, 0x00, 0x00, 0x00, - -// n1 -0x00, 0x00, 0x00, 0x32, - -// f's -0x8a, 0xdc, 0xc0, 0xc8, 0xcd, 0x29, 0x9e, 0x8, -0x9e, 0x4e, 0xd, 0xa7, 0xf6, 0x46, 0xee, 0x80, -0xca, 0x91, 0x86, 0x54, 0x3c, 0x7f, 0x8d, 0xb5, -0x49, 0xf9, 0x6d, 0x00, 0x39, 0x39, 0x62, 0xc7, - -0xe9, 0xa2, 0x59, 0x31, 0xbc, 0xc6, 0x6, 0xe1, -0xf5, 0x45, 0xc6, 0xe1, 0x1a, 0x8e, 0xd6, 0xc6, -0xc7, 0x25, 0x94, 0x7f, 0x82, 0x99, 0x3d, 0x1d, -0x32, 0x39, 0xd9, 0x37, 0x2a, 0x12, 0x89, 0x03, - -0x83, 0xe7, 0x53, 0xa9, 0x99, 0xba, 0x3f, 0xae, -0x3e, 0xa0, 0x86, 0x91, 0x1c, 0xee, 0xe3, 0x76, -0x4b, 0xf0, 0x7a, 0x11, 0xb3, 0x9d, 0x35, 0x42, -0x00, 0xcf, 0x40, 0x5e, 0x36, 0x74, 0x2a, 0x94, - -0xb9, 0x2f, 0x96, 0xa7, 0xbf, 0x5d, 0x8c, 0x5b, -0x47, 0xc4, 0xac, 0xe9, 0x9a, 0x8a, 0x2d, 0x38, -0x4, 0xb5, 0xe6, 0x56, 0x30, 0xa7, 0xe4, 0x9a, -0xcc, 0x73, 0x81, 0x9a, 0x4f, 0x75, 0x6c, 0xef, - -0x91, 0x52, 0xb2, 0x6, 0x20, 0x83, 0x7c, 0x22, -0x27, 0x83, 0xd, 0x77, 0x5c, 0xff, 0x20, 0xf5, -0x53, 0xad, 0x9e, 0xd9, 0x9c, 0x76, 0x6f, 0xc, -0x4b, 0xa9, 0xb9, 0xc0, 0x51, 0xe7, 0x32, 0xd5, - -0x10, 0x01, 0xa7, 0xbf, 0xc5, 0xad, 0x96, 0xb9, -0x40, 0xdc, 0x6f, 0xdb, 0xca, 0xd5, 0xf8, 0x03, -0xe, 0x47, 0x6e, 0xe8, 0x76, 0x4b, 0x87, 0x1e, -0x59, 0x17, 0x99, 0x88, 0x15, 0xe4, 0xc5, 0x4d, - -0xf2, 0x38, 0xb7, 0x1d, 0x30, 0x89, 0xa5, 0xbe, -0x15, 0xb6, 0x9d, 0x8e, 0x8e, 0x85, 0x33, 0x99, -0xe3, 0x6a, 0x8, 0x3f, 0xba, 0xeb, 0x40, 0x8b, -0x17, 0xfc, 0xa8, 0x2e, 0xe0, 0x34, 0x94, 0x4e, - -0x50, 0xb6, 0x8d, 0x45, 0xac, 0x8, 0x10, 0xb1, -0xb7, 0xa4, 0xbe, 0xd6, 0x00, 0xd0, 0x96, 0xc, -0xa3, 0xb5, 0x74, 0xc6, 0xe9, 0xa7, 0xe1, 0x80, -0x6f, 0x5d, 0x71, 0x37, 0x4d, 0xf4, 0xee, 0x9a, - -0xc5, 0x46, 0xa4, 0x21, 0xff, 0xd2, 0x73, 0x47, -0x40, 0xe3, 0xa2, 0xf0, 0xe2, 0x4a, 0xed, 0xde, -0x35, 0xca, 0x92, 0xba, 0xfa, 0x92, 0xa4, 0x21, -0x03, 0x46, 0xb5, 0x28, 0x88, 0xea, 0xcc, 0xd2, - -0x38, 0x95, 0x8d, 0x4a, 0x3a, 0xcf, 0xc2, 0x8c, -0xc3, 0x88, 0x81, 0x5, 0x8d, 0x94, 0x7c, 0xd2, -0xf9, 0x7d, 0x6c, 0x68, 0x6f, 0x69, 0x54, 0xc4, -0x9d, 0xf5, 0x38, 0x9b, 0x40, 0xb6, 0xee, 0xe6, - -0xb, 0x50, 0x76, 0x23, 0x1b, 0x19, 0xf6, 0xf9, -0x1b, 0xf7, 0x63, 0xe4, 0x38, 0xd0, 0x1c, 0xff, -0x32, 0x6, 0x86, 0xa8, 0x89, 0x87, 0x5c, 0xc, -0x23, 0x2c, 0xaa, 0xe, 0x6, 0xa8, 0xfa, 0x91, - -0xfa, 0x93, 0xea, 0xdc, 0x3d, 0xc, 0x4d, 0x84, -0x89, 0x21, 0xc1, 0x3e, 0xb4, 0xa1, 0x30, 0x8e, -0x7e, 0xb, 0xa5, 0x4c, 0x51, 0x11, 0xff, 0x00, -0x95, 0x5a, 0xa4, 0x47, 0x94, 0x2f, 0x43, 0x56, - -0x2c, 0x53, 0xb8, 0x93, 0xf4, 0x38, 0xd7, 0x30, -0x15, 0x73, 0x53, 0xfa, 0xd9, 0x75, 0x4a, 0xda, -0xe5, 0xb, 0xdc, 0xc, 0x01, 0x73, 0x2e, 0x57, -0x1c, 0xdd, 0xf9, 0x9, 0x9e, 0x22, 0xf6, 0x4b, - -0xfd, 0xcd, 0x91, 0x57, 0x7f, 0xb9, 0x3d, 0xd1, -0xb6, 0xc9, 0x25, 0xe5, 0x18, 0x1a, 0x94, 0xe8, -0xe0, 0x52, 0x7d, 0xbe, 0x93, 0x28, 0xf, 0xa1, -0x69, 0x86, 0xc1, 0xb0, 0x47, 0xa4, 0x48, 0xa4, - -0x7d, 0xee, 0x16, 0x67, 0xe8, 0x23, 0x9d, 0xf9, -0xc4, 0xc6, 0x2f, 0xc1, 0x6f, 0x8, 0xa, 0x52, -0x2b, 0xd7, 0x33, 0x40, 0x3a, 0xf7, 0xc0, 0x60, -0x72, 0xa9, 0xf1, 0x34, 0x9e, 0xd8, 0x3b, 0x9c, - -0x7a, 0xc0, 0x2f, 0x2f, 0xe9, 0xae, 0xb2, 0xe1, -0x10, 0x8d, 0x30, 0xd7, 0xb5, 0x4e, 0x49, 0x1c, -0xac, 0xfc, 0x1d, 0x39, 0xc4, 0x36, 0x46, 0xd9, -0x82, 0x2d, 0xc1, 0xec, 0x27, 0xba, 0xe2, 0xea, - -0x3d, 0x9e, 0xfd, 0xe0, 0x81, 0x33, 0xe1, 0x17, -0xda, 0x5a, 0x29, 0x13, 0x03, 0xf0, 0xb5, 0xf, -0xf5, 0x78, 0x37, 0x64, 0xda, 0x20, 0x87, 0xf9, -0xf5, 0xbb, 0xff, 0x9e, 0x9c, 0xf4, 0xcc, 0xb0, - -0xeb, 0x30, 0xcf, 0x10, 0x34, 0xd0, 0xc2, 0x6b, -0x2b, 0xae, 0xc5, 0x8c, 0x1a, 0xf2, 0x1e, 0x19, -0x16, 0xe1, 0x31, 0xc0, 0x77, 0x32, 0x4e, 0x2a, -0x1a, 0x54, 0xb3, 0xbf, 0x52, 0x87, 0xa5, 0xb6, - -0x9e, 0x10, 0xba, 0x1a, 0x2f, 0x49, 0xe9, 0x6, -0xf4, 0x00, 0x84, 0xb8, 0x13, 0x94, 0x91, 0xfb, -0xaf, 0x43, 0x8f, 0x4a, 0xa3, 0x42, 0xce, 0xb7, -0x01, 0xf5, 0x2a, 0xde, 0xad, 0x36, 0x7f, 0xde, - -0x4e, 0xea, 0x64, 0x98, 0x8e, 0x13, 0x95, 0xae, -0xdf, 0xca, 0xa, 0x3f, 0x39, 0x65, 0xda, 0xe4, -0x4c, 0xa4, 0x1d, 0x80, 0x16, 0x25, 0x8b, 0x1e, -0xf4, 0x9e, 0x92, 0x7d, 0xe2, 0xb4, 0x5, 0xd3, - -0x18, 0x11, 0x18, 0x4c, 0xab, 0x71, 0x23, 0xf4, -0xeb, 0x2c, 0xc, 0x82, 0x15, 0x1c, 0x8c, 0xde, -0x24, 0x8d, 0xa1, 0x74, 0xf1, 0xe7, 0x54, 0x7a, -0x10, 0x3c, 0xd3, 0x39, 0x7a, 0x2e, 0x3e, 0x30, - -0x37, 0xc8, 0x39, 0x90, 0xf5, 0xca, 0x5e, 0x4c, -0xc1, 0x79, 0x40, 0x65, 0x97, 0x5d, 0x1a, 0x27, -0xb7, 0x7c, 0x10, 0xb3, 0x50, 0x61, 0x51, 0xc0, -0xe8, 0xac, 0x78, 0x1e, 0xcb, 0x88, 0x01, 0xbd, - -0x7, 0xb0, 0x2e, 0xd4, 0xe8, 0x6, 0xd, 0xb8, -0xb5, 0xa3, 0xe1, 0x54, 0xb6, 0xe7, 0xaf, 0x3a, -0x65, 0xdb, 0x3b, 0x76, 0x5c, 0xdd, 0x83, 0x15, -0xc0, 0x84, 0xf4, 0xda, 0xff, 0xf3, 0x40, 0xc5, - -0x2e, 0xe5, 0xab, 0x73, 0x4b, 0x14, 0xde, 0xb6, -0x5a, 0xfc, 0x3d, 0x77, 0x03, 0x5a, 0xa3, 0x9f, -0x88, 0x69, 0x58, 0xa6, 0x8, 0x87, 0x28, 0x33, -0xa3, 0x34, 0x4b, 0x83, 0x14, 0x8b, 0x1e, 0x50, - -0x9c, 0x6, 0x6b, 0x6a, 0xc1, 0x62, 0x82, 0xab, -0x8f, 0x82, 0xae, 0x3d, 0x91, 0xd7, 0xfd, 0xd5, -0xd2, 0x19, 0x3f, 0x4f, 0xae, 0x1f, 0x01, 0xcc, -0x50, 0x96, 0xfc, 0x79, 0x2f, 0x67, 0xa3, 0xdd, - -0x9b, 0x86, 0x6b, 0xd7, 0xd6, 0x8e, 0x62, 0x26, -0x59, 0x28, 0xd1, 0x9f, 0x25, 0x12, 0xe7, 0xbd, -0x16, 0x7b, 0x22, 0xd3, 0x7c, 0xfe, 0xcd, 0x7e, -0x60, 0x93, 0x59, 0xc9, 0x48, 0xd4, 0xab, 0xd8, - -0x95, 0x29, 0x50, 0xe4, 0x98, 0xe6, 0xb4, 0x4b, -0x41, 0x78, 0xb7, 0x01, 0x5d, 0x88, 0x3e, 0x3d, -0xd4, 0x4a, 0x59, 0x5, 0xc7, 0x8, 0xb9, 0x5c, -0xff, 0xcb, 0x6e, 0x3e, 0x1b, 0xe6, 0xf3, 0x9b, - -0xae, 0x75, 0x86, 0xc, 0x12, 0xb8, 0x5b, 0xb3, -0x62, 0x53, 0xb3, 0xf6, 0xa8, 0xdd, 0xa2, 0xc3, -0x6a, 0xc1, 0x54, 0x19, 0xfb, 0xd8, 0x51, 0x5b, -0x4c, 0x31, 0xc4, 0x58, 0xc6, 0x11, 0x89, 0x18, - -0x73, 0x93, 0xc, 0xda, 0x48, 0x73, 0x3a, 0x5e, -0x67, 0xa, 0xd1, 0x3c, 0x8e, 0xb7, 0xbe, 0x18, -0x1b, 0x84, 0xe5, 0x72, 0x59, 0x19, 0x5f, 0x44, -0x84, 0x41, 0x8a, 0xf5, 0xac, 0xa0, 0xa2, 0x85, - -0xcf, 0x50, 0xb0, 0x73, 0x9a, 0x2b, 0x6, 0x93, -0xaa, 0x26, 0xc4, 0xc7, 0xca, 0x30, 0xb, 0x2e, -0x3e, 0xca, 0xa9, 0xa4, 0x47, 0xe7, 0x44, 0x9f, -0xae, 0x7e, 0xda, 0xc0, 0x4b, 0xb7, 0xa1, 0x74, - -0x78, 0x86, 0xe6, 0xc4, 0x59, 0xbd, 0xb5, 0x41, -0xc0, 0x48, 0x57, 0x4f, 0x5b, 0x6a, 0xda, 0x9d, -0x27, 0xf6, 0xb6, 0x4f, 0xc5, 0x30, 0x94, 0x8e, -0xe3, 0x5d, 0x84, 0x67, 0xd7, 0xd4, 0x79, 0x37, - -0x31, 0x41, 0x4, 0xb0, 0xf0, 0xa8, 0xe3, 0x80, -0xf3, 0x3a, 0x6b, 0x5b, 0x03, 0x9d, 0x41, 0x37, -0x98, 0x3b, 0x03, 0xac, 0x1b, 0xca, 0xe9, 0xe1, -0x91, 0xc, 0x2b, 0x8b, 0x52, 0x7a, 0xf7, 0x6, - -0x4f, 0xdc, 0x6f, 0x6b, 0x9a, 0x2a, 0x88, 0x52, -0xf5, 0x65, 0x11, 0xc9, 0x27, 0x14, 0x90, 0xf6, -0xab, 0x73, 0xe0, 0x71, 0x50, 0x52, 0xb3, 0xb7, -0x27, 0x6e, 0xe7, 0xa, 0x17, 0x7a, 0x7e, 0xb3, - -0xc5, 0x67, 0x79, 0x19, 0xb9, 0xf1, 0x2b, 0x4b, -0x4e, 0x2f, 0xc6, 0xda, 0xee, 0x76, 0x1d, 0xb7, -0x91, 0x66, 0x30, 0x61, 0xa4, 0xca, 0xc3, 0x47, -0x68, 0xba, 0x5b, 0xe8, 0x1c, 0xd9, 0x7c, 0xb8, - -0x22, 0xfd, 0x1a, 0xe0, 0x39, 0x84, 0x8c, 0x9e, -0xb2, 0x1e, 0x5d, 0xbe, 0x86, 0x8d, 0xbb, 0x76, -0x12, 0xd3, 0x9d, 0x7c, 0xa9, 0x2a, 0xa5, 0xae, -0x11, 0xdd, 0x01, 0x96, 0xc6, 0x01, 0x5d, 0x5a, - -0x98, 0x55, 0x5e, 0x5a, 0xd3, 0xc9, 0x10, 0x11, -0x01, 0x62, 0xa7, 0x82, 0x01, 0xd3, 0xea, 0x5e, -0x49, 0x21, 0x54, 0x8e, 0x99, 0x35, 0x95, 0x15, -0x26, 0xfb, 0xbd, 0x82, 0x41, 0x2e, 0x66, 0x03, - -0xd9, 0x2b, 0xed, 0xd9, 0xb4, 0x44, 0x62, 0x4a, -0x11, 0x73, 0x6e, 0x54, 0xab, 0xdd, 0x5c, 0x24, -0x46, 0xdc, 0x47, 0xf, 0x2c, 0xbb, 0x4b, 0x71, -0x6a, 0xbd, 0xd2, 0xf9, 0xbf, 0x6b, 0x23, 0xb1, - -0xdb, 0xe8, 0xd0, 0x45, 0xbf, 0x20, 0x90, 0x9f, -0x89, 0xea, 0x8b, 0x8a, 0xbe, 0x52, 0xd5, 0xe4, -0xb0, 0x68, 0xf5, 0x80, 0x74, 0xad, 0xc, 0xe3, -0x9f, 0xa, 0xee, 0xec, 0x1b, 0x4, 0x7c, 0xf0, - -0x35, 0xf7, 0x80, 0xd7, 0xd8, 0xf3, 0x88, 0xee, -0xfb, 0x9, 0xc9, 0xd3, 0x5, 0x92, 0x77, 0xe3, -0xe3, 0x80, 0xe6, 0x6d, 0x7b, 0xc6, 0xc2, 0xe1, -0xfe, 0x5f, 0x5d, 0x53, 0xc7, 0x94, 0xf8, 0x9c, - -0x5f, 0xad, 0x9c, 0x1a, 0xf5, 0x2, 0xe5, 0xcf, -0x01, 0xe4, 0x87, 0x29, 0xaf, 0xb9, 0xa7, 0x2, -0xcb, 0xe0, 0x57, 0x00, 0xfd, 0x56, 0x35, 0x54, -0xb, 0xb5, 0x71, 0xa0, 0xf3, 0xdc, 0x34, 0x5a, - -0xbd, 0x7c, 0xe0, 0xc6, 0x99, 0x50, 0x58, 0x72, -0x53, 0x5d, 0x90, 0x70, 0x7d, 0x27, 0x6f, 0x99, -0x28, 0x6, 0x80, 0x20, 0x15, 0xd4, 0xcb, 0x7a, -0xb2, 0x6b, 0xd0, 0xe5, 0x14, 0xcf, 0x80, 0x79, - -0x6, 0x81, 0x62, 0x5f, 0x5, 0x2, 0xe6, 0x71, -0x77, 0xcc, 0xaf, 0x29, 0x46, 0x35, 0xe2, 0x20, -0x18, 0xb8, 0x47, 0x7d, 0x72, 0x34, 0x74, 0x3d, -0x19, 0x10, 0x6c, 0x11, 0x73, 0xe9, 0x3b, 0x48, - -0xec, 0xe9, 0x54, 0xc3, 0x4, 0xba, 0xa6, 0x78, -0xa2, 0xeb, 0x54, 0x6d, 0xf, 0x8f, 0xb2, 0x5f, -0x9a, 0xc3, 0x3a, 0xb8, 0x7e, 0x5b, 0x01, 0xac, -0x6b, 0x45, 0x65, 0xf5, 0x9a, 0x43, 0x4a, 0x46, - -0xef, 0x99, 0x9, 0x46, 0xa5, 0xa7, 0x6, 0xa5, -0xc3, 0x54, 0x7, 0xbe, 0x3b, 0x35, 0x4d, 0xdc, -0xc8, 0x8e, 0xa4, 0x44, 0x4a, 0x81, 0xdf, 0xdd, -0x92, 0xa8, 0xee, 0xcf, 0x1a, 0x5b, 0x2c, 0x6d, - -0x2e, 0x3e, 0xce, 0x64, 0xe7, 0x9, 0x9b, 0x23, -0xf6, 0xd8, 0x92, 0xca, 0x60, 0x6b, 0xf0, 0x21, -0xf9, 0x76, 0x4f, 0xf7, 0x56, 0x5, 0xe1, 0x89, -0xd1, 0x83, 0xe9, 0xd3, 0xc3, 0x4a, 0x8f, 0xd8, - -0x3e, 0xd6, 0x1c, 0xda, 0xdf, 0x9, 0x25, 0x7b, -0xf9, 0xc, 0x61, 0x93, 0x21, 0x12, 0x6b, 0xbb, -0x83, 0x2d, 0xfe, 0x3f, 0x81, 0x40, 0x34, 0x1c, -0x3c, 0xb6, 0x93, 0xe6, 0x27, 0x80, 0xfe, 0xde, - -0xbd, 0x53, 0xfb, 0x7c, 0x1c, 0xe5, 0x1e, 0xaa, -0xa0, 0x77, 0xe0, 0x60, 0xcd, 0xb6, 0x81, 0x30, -0xbe, 0x27, 0x59, 0x6a, 0x33, 0x8, 0x58, 0xa1, -0x23, 0x9d, 0x7f, 0x6e, 0x47, 0xf5, 0x45, 0xd9, - -0xa8, 0x7a, 0xc7, 0x01, 0x8, 0x40, 0x4a, 0x66, -0xbe, 0x6d, 0x12, 0xe9, 0xf, 0xc6, 0xca, 0xa5, -0x83, 0xd8, 0xda, 0x3e, 0xe5, 0xb5, 0x3d, 0x78, -0x60, 0x86, 0xdc, 0xfc, 0x9b, 0xd6, 0xb6, 0x33, - -0xd8, 0x2a, 0xa1, 0x5d, 0x1e, 0xc9, 0xab, 0xde, -0x6e, 0x10, 0x00, 0x74, 0x51, 0xa8, 0x5e, 0x94, -0x84, 0x6c, 0xf6, 0x73, 0xfd, 0x7, 0x38, 0xdc, -0x7e, 0x6a, 0x6d, 0xc, 0x50, 0x3f, 0x4, 0x13, - -0x55, 0xdd, 0x03, 0xd3, 0xdc, 0x5f, 0x11, 0x18, -0x97, 0xe9, 0x4a, 0xb5, 0x2b, 0xd, 0x88, 0x69, -0x18, 0x99, 0xc4, 0xe, 0x24, 0x5c, 0xac, 0x7f, -0x49, 0xc9, 0x33, 0xb9, 0xa9, 0xba, 0x6e, 0xc1 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/sigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/sigrl.inc deleted file mode 100644 index 52de07b8f1..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/sigrl.inc +++ /dev/null @@ -1,878 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -// sigRL - -// gid -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, - -// version -0x00, 0x00, 0x00, 0x00, - -// n2 -0x00, 0x00, 0x00, 0x32, - -// bk's -0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, -0x33, 0x35, 0x27, 0xd, 0x8, 0xb1, 0xbe, 0x5d, -0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, -0x2e, 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, -0x56, 0x43, 0xc6, 0x94, 0x67, 0xa6, 0x72, 0xf6, -0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, -0x9d, 0xc7, 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, -0x90, 0x23, 0x18, 0x8, 0xad, 0x7d, 0xfe, 0xf5, -0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, -0xc2, 0x89, 0xb2, 0x6b, 0x4e, 0xb4, 0xc1, 0x55, -0x87, 0x98, 0xbd, 0x72, 0xf9, 0xcf, 0xd, 0x40, -0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, -0x61, 0x9d, 0x4f, 0x7a, 0xb5, 0x2b, 0x16, 0xa9, -0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, 0x33, 0xad, -0xf6, 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, -0x98, 0x37, 0xce, 0xec, 0xd1, 0xa8, 0xc, 0x8b, - -0x71, 0x8a, 0xb5, 0x1, 0x7f, 0x7c, 0x92, 0x9a, -0xa2, 0xc9, 0x81, 0x10, 0xfe, 0xbf, 0xc, 0x53, -0xa4, 0x43, 0xaf, 0x31, 0x74, 0x12, 0x25, 0x60, -0x3e, 0xc0, 0x21, 0xe6, 0x63, 0x9a, 0xd2, 0x67, -0x2d, 0xb5, 0xd5, 0x82, 0xc4, 0x49, 0x29, 0x51, -0x42, 0x8f, 0xe0, 0xe, 0xd1, 0x73, 0x27, 0xf5, -0x77, 0x16, 0x4, 0x40, 0x8a, 0x0, 0xe, 0x3a, -0x5d, 0x37, 0x42, 0xd3, 0x8, 0x40, 0xbd, 0x69, -0xf7, 0x5f, 0x74, 0x21, 0x50, 0xf4, 0xce, 0xfe, -0xd9, 0xdd, 0x97, 0x6c, 0xa8, 0xa5, 0x60, 0x6b, -0xf8, 0x1b, 0xba, 0x2, 0xb2, 0xca, 0x5, 0x44, -0x9b, 0xb1, 0x5e, 0x3a, 0xa4, 0x35, 0x7a, 0x51, -0xfa, 0xcf, 0xa4, 0x4, 0xe9, 0xf3, 0xbf, 0x38, -0xd4, 0x24, 0x9, 0x52, 0xf3, 0x58, 0x3d, 0x9d, -0x4b, 0xb3, 0x37, 0x4b, 0xec, 0x87, 0xe1, 0x64, -0x60, 0x3c, 0xb6, 0xf7, 0x7b, 0xff, 0x40, 0x11, - -0x6e, 0x22, 0xaa, 0x10, 0x84, 0x58, 0x8b, 0xff, -0xd8, 0x37, 0x8, 0xa9, 0xe9, 0xdb, 0xf6, 0x1f, -0x69, 0x10, 0x95, 0x6c, 0xbf, 0xd, 0x11, 0x48, -0x6f, 0x1b, 0x3c, 0x62, 0x46, 0x13, 0x89, 0x13, -0x5f, 0xa1, 0x3, 0x62, 0xed, 0x62, 0xdf, 0x3d, -0xbf, 0xcd, 0xb7, 0x41, 0x48, 0x81, 0x3, 0x9f, -0x54, 0xa, 0xe, 0xb3, 0x35, 0xf9, 0xde, 0x24, -0xba, 0x6d, 0x4c, 0x7f, 0xfc, 0xc1, 0xb4, 0xce, -0x6d, 0xa1, 0x73, 0x7c, 0xaa, 0xb, 0xad, 0x2, -0xd6, 0x37, 0x85, 0xe, 0xbb, 0x48, 0x11, 0x38, -0xc4, 0xaa, 0x1b, 0xf, 0xcf, 0xc1, 0x9c, 0x26, -0xcc, 0x95, 0xc2, 0x5b, 0x49, 0x9, 0x3d, 0xe9, -0x7d, 0xce, 0xc7, 0xa6, 0x4, 0x3e, 0x7c, 0x9e, -0x28, 0xde, 0x8, 0x11, 0xe, 0x61, 0x3b, 0xc0, -0x9c, 0x6b, 0x58, 0x23, 0xe6, 0x40, 0x7b, 0xbd, -0xb8, 0x72, 0xf, 0xe0, 0xee, 0xcf, 0xba, 0xb4, - -0xc4, 0xff, 0xaf, 0x48, 0x15, 0xda, 0x60, 0x40, -0xcc, 0xd7, 0xf2, 0x68, 0xf7, 0xe2, 0x70, 0x12, -0x8d, 0x15, 0xa5, 0xb7, 0xe6, 0x4c, 0x23, 0xea, -0x4d, 0x8a, 0x51, 0x6, 0x67, 0x3, 0x4c, 0x83, -0x6f, 0x28, 0x67, 0xcf, 0x63, 0x46, 0x3e, 0x8a, -0x45, 0x9f, 0xed, 0x1a, 0xde, 0xa7, 0xad, 0xb2, -0x2b, 0xf, 0x8b, 0xab, 0x7c, 0x70, 0xff, 0xc3, -0xa8, 0x6e, 0x8c, 0xaa, 0xb1, 0xf6, 0x20, 0xe3, -0xb9, 0xf1, 0xc3, 0x3d, 0x5, 0x6a, 0x1e, 0x26, -0x2d, 0xf4, 0xd, 0xe4, 0x53, 0x63, 0x67, 0x23, -0x48, 0xa8, 0x1, 0xa8, 0xee, 0xe1, 0x5f, 0x64, -0xe3, 0x2c, 0x71, 0xe2, 0x10, 0x82, 0x0, 0x52, -0xd7, 0x74, 0x87, 0xff, 0x1c, 0x0, 0x19, 0xe6, -0x4d, 0x15, 0x91, 0x6d, 0xf3, 0x38, 0x3b, 0xee, -0xf3, 0xd5, 0xd1, 0xc7, 0x6d, 0xd9, 0x8e, 0x55, -0x70, 0x90, 0xb0, 0xb, 0x3c, 0x4a, 0x67, 0x19, - -0x4f, 0x98, 0x92, 0xf9, 0x18, 0x38, 0xf5, 0xb4, -0xf7, 0x2f, 0xa7, 0x21, 0x71, 0x52, 0x27, 0xd0, -0x57, 0x4f, 0x9c, 0x30, 0xe, 0xb2, 0x27, 0xce, -0xd7, 0xb2, 0x9f, 0xc0, 0xf6, 0xc3, 0xb0, 0x7c, -0x40, 0x18, 0x75, 0x4a, 0xde, 0xb0, 0x9f, 0x46, -0x8a, 0x5a, 0xeb, 0x4f, 0xcb, 0x5e, 0x60, 0xf5, -0xca, 0xf4, 0x98, 0xaf, 0x62, 0x9b, 0x7e, 0x10, -0xda, 0xba, 0x2f, 0x47, 0x64, 0xf2, 0xc0, 0x84, -0x19, 0x75, 0xe0, 0xe4, 0xff, 0x20, 0xda, 0x7d, -0xe5, 0xd, 0xc8, 0xf8, 0xe3, 0x83, 0x61, 0x19, -0x17, 0xf1, 0xa9, 0x1b, 0xff, 0x39, 0x79, 0x88, -0x1, 0xfb, 0xe7, 0x23, 0xd2, 0xac, 0xe0, 0x49, -0x12, 0x2a, 0x38, 0xb4, 0x7c, 0xc2, 0x1b, 0x88, -0x5f, 0x68, 0x32, 0x11, 0xd9, 0xfd, 0xdc, 0x65, -0x2, 0xb3, 0x74, 0x2c, 0x13, 0xf2, 0xd8, 0xf1, -0x45, 0xc5, 0xd1, 0xf4, 0xa3, 0x38, 0x81, 0x92, - -0x4f, 0xde, 0x62, 0x9d, 0xde, 0xfb, 0x23, 0x29, -0x9c, 0x4, 0xed, 0x19, 0xa8, 0x86, 0x5f, 0xed, -0x99, 0x5d, 0xc0, 0xe, 0xcf, 0x2c, 0x2e, 0x27, -0x93, 0x91, 0x47, 0x75, 0xa5, 0xf3, 0x87, 0x99, -0x15, 0x47, 0xb4, 0xee, 0x79, 0xda, 0xf9, 0x7a, -0xd9, 0x8d, 0x67, 0xf2, 0xac, 0xe5, 0xc8, 0x30, -0xbe, 0xa2, 0xee, 0xe1, 0x85, 0x35, 0x93, 0xab, -0xf1, 0x46, 0xe, 0xb4, 0x4c, 0xa3, 0xe0, 0x9b, -0xb0, 0x8d, 0x54, 0x5b, 0xa8, 0x53, 0xbb, 0xd5, -0x9e, 0xc0, 0xa9, 0xd4, 0xae, 0x46, 0x4c, 0x1a, -0x1, 0xac, 0x80, 0x92, 0xee, 0x46, 0x39, 0xad, -0x69, 0x9b, 0x8b, 0x15, 0xc9, 0xa3, 0x88, 0x24, -0x96, 0x32, 0x2b, 0xae, 0xc8, 0xdb, 0x98, 0xc6, -0xbd, 0x32, 0xe9, 0x12, 0xbb, 0xb9, 0x5d, 0xa5, -0xfc, 0x4f, 0x2, 0xde, 0x64, 0xc5, 0x94, 0x15, -0x25, 0x19, 0x44, 0xc0, 0xa, 0xfe, 0xb3, 0x40, - -0xf, 0x8, 0xd2, 0x35, 0x1a, 0xca, 0x75, 0xb0, -0xdf, 0x4a, 0xc1, 0x5f, 0x93, 0x1f, 0x86, 0x7, -0x78, 0x4b, 0x31, 0x2, 0xb6, 0xe6, 0x9e, 0x93, -0x30, 0x19, 0x7e, 0x2f, 0x67, 0x40, 0xde, 0x3b, -0x71, 0x32, 0x71, 0x1a, 0x35, 0x2c, 0xe4, 0xb8, -0xeb, 0xf4, 0x9, 0xf1, 0xd2, 0x8, 0xcd, 0x15, -0xb3, 0xdf, 0xd, 0xf5, 0xe8, 0x3a, 0x65, 0x3e, -0xd6, 0x46, 0x87, 0xd8, 0x91, 0x70, 0xe, 0x73, -0x62, 0x11, 0xd6, 0x99, 0x36, 0xa5, 0xb7, 0x40, -0x98, 0xb1, 0x74, 0xfb, 0xbd, 0x99, 0xae, 0xfb, -0x5f, 0xac, 0xe5, 0x46, 0xb7, 0x71, 0x22, 0xd, -0xfa, 0xe2, 0x20, 0x8c, 0x1, 0x58, 0x61, 0x13, -0xd, 0xc, 0x33, 0x49, 0x64, 0xd4, 0x51, 0xe0, -0x13, 0xea, 0xa5, 0xe5, 0xc3, 0x2a, 0x7, 0x8d, -0x6f, 0x6e, 0x35, 0x28, 0x55, 0x82, 0xdd, 0x75, -0x5b, 0xab, 0x8e, 0xfe, 0x2a, 0x42, 0x3f, 0xd2, - -0x15, 0x50, 0xd8, 0xf6, 0x51, 0xc2, 0xf3, 0x9f, -0x4, 0xca, 0xb5, 0x5e, 0x8b, 0x4f, 0xc1, 0x2b, -0x6a, 0x19, 0x99, 0x32, 0x57, 0x88, 0xf5, 0xbf, -0x9c, 0x20, 0x37, 0x70, 0x29, 0x35, 0x8a, 0x5c, -0x74, 0x3c, 0x72, 0xe9, 0x47, 0x31, 0x2d, 0xd2, -0x23, 0xa5, 0x5b, 0xbb, 0x5, 0x36, 0x62, 0x57, -0x60, 0x98, 0xb6, 0x75, 0xc, 0x5a, 0xa8, 0x9b, -0x32, 0x47, 0xe6, 0x7e, 0x18, 0x67, 0xe6, 0x35, -0x8, 0x96, 0x14, 0x94, 0xd3, 0x86, 0xae, 0x25, -0x13, 0x66, 0xf0, 0xee, 0x6, 0x1b, 0x6e, 0x37, -0xba, 0xcd, 0x96, 0xa7, 0x35, 0x5c, 0x5b, 0xdd, -0x83, 0xdc, 0xb8, 0xa1, 0x22, 0x38, 0x66, 0x8c, -0xeb, 0xcd, 0x62, 0x9a, 0xc4, 0xf1, 0xc2, 0x4e, -0x2a, 0xf6, 0x5, 0x94, 0xfe, 0xa5, 0x33, 0xd7, -0xca, 0x59, 0x95, 0x72, 0xf1, 0x77, 0xe9, 0x48, -0x11, 0xe5, 0x78, 0x7a, 0x89, 0x98, 0xab, 0x1d, - -0x9d, 0x9e, 0xb0, 0x78, 0x78, 0xa4, 0xf, 0x23, -0xe9, 0x68, 0xb5, 0x63, 0xa, 0x59, 0x9e, 0xb7, -0xed, 0x92, 0x46, 0xf3, 0x52, 0x4b, 0x3b, 0x38, -0xec, 0xeb, 0x4a, 0xcd, 0xb5, 0x61, 0xf1, 0xc0, -0xe, 0xc8, 0x99, 0xc6, 0x8f, 0xfa, 0x7b, 0xcf, -0x4a, 0x58, 0xa5, 0x58, 0x51, 0x88, 0xe9, 0xe2, -0xb9, 0xbe, 0x2f, 0x9b, 0xa4, 0x4c, 0x16, 0x1b, -0xbe, 0x9e, 0xc6, 0x55, 0xd9, 0xe9, 0x2c, 0x77, -0x28, 0xdc, 0x7c, 0x35, 0x19, 0x3c, 0x19, 0x40, -0x6c, 0x6b, 0x28, 0x77, 0x37, 0x98, 0x15, 0x7f, -0xa8, 0xe9, 0x3e, 0x99, 0x66, 0xed, 0x7a, 0xe6, -0x79, 0x7c, 0xf9, 0x27, 0x75, 0x9, 0xb9, 0xc0, -0xd8, 0x88, 0xc2, 0xff, 0x79, 0x90, 0x4e, 0x1d, -0x61, 0x5c, 0x88, 0x81, 0x2, 0xbf, 0x4b, 0x2d, -0x2f, 0x18, 0x2a, 0xfb, 0x4, 0x5c, 0x1c, 0x17, -0xae, 0xd4, 0x6e, 0x97, 0x44, 0x61, 0xfd, 0x95, - -0x23, 0x91, 0x6e, 0xe5, 0x8a, 0xc4, 0x97, 0x21, -0xc9, 0x21, 0x6, 0x8d, 0xa3, 0xbe, 0x7f, 0x7a, -0xf5, 0xf8, 0x68, 0x86, 0xa, 0xc6, 0xf4, 0x57, -0x3e, 0x3f, 0xed, 0x48, 0xa1, 0xdf, 0xec, 0x77, -0x78, 0x82, 0x82, 0x7, 0xf4, 0x58, 0xd8, 0x9a, -0x8a, 0x52, 0x57, 0x69, 0x69, 0x2b, 0x9c, 0xf9, -0x85, 0x94, 0x53, 0x78, 0x2c, 0xa2, 0x21, 0x12, -0xc4, 0x50, 0xfe, 0xd3, 0x7d, 0x89, 0xf, 0x5f, -0x4c, 0xa5, 0xbc, 0x1d, 0x74, 0x99, 0xc7, 0x86, -0xc5, 0xbd, 0x25, 0xc0, 0xa1, 0x2, 0x99, 0xa4, -0xa8, 0xdf, 0x41, 0x9e, 0xed, 0xa9, 0x71, 0x0, -0x7f, 0xc7, 0x81, 0xd4, 0xbf, 0x70, 0xf6, 0x59, -0x77, 0x29, 0x44, 0x86, 0xae, 0xa9, 0xa, 0x3f, -0xc6, 0x7a, 0x4e, 0xe6, 0x5, 0x8c, 0x0, 0x6d, -0x4d, 0xc4, 0x82, 0xfc, 0x41, 0x3f, 0x11, 0xcb, -0x90, 0x9c, 0xee, 0xdf, 0x2, 0xc3, 0x26, 0xa2, - -0x32, 0x2e, 0xff, 0x9d, 0xa5, 0x5a, 0xee, 0xff, -0x5d, 0x42, 0xf2, 0x8b, 0xf1, 0xb6, 0x46, 0xe8, -0x93, 0x21, 0x8a, 0x1f, 0xc, 0x1d, 0x5e, 0x63, -0x36, 0xd0, 0x45, 0x22, 0x24, 0x74, 0x38, 0x5b, -0x5e, 0x22, 0xcd, 0xe4, 0x37, 0xa1, 0x9c, 0xe0, -0x34, 0xf7, 0x78, 0x5e, 0x79, 0x98, 0x56, 0xe8, -0xe5, 0xd5, 0x49, 0x1f, 0x1b, 0x3c, 0xf5, 0x8f, -0xd4, 0xa1, 0x8d, 0x4a, 0x4b, 0x71, 0xa, 0xb4, -0x4e, 0xde, 0x7e, 0x45, 0xa2, 0x59, 0xb3, 0x5, -0x82, 0xfb, 0x2, 0x23, 0xfe, 0x60, 0xf8, 0xec, -0xb7, 0xc7, 0xff, 0x23, 0x7e, 0xee, 0xc5, 0x60, -0xf, 0x7b, 0xc6, 0xb6, 0x90, 0x9c, 0x90, 0x67, -0xf9, 0x8c, 0x3, 0xf, 0x2a, 0x91, 0xfc, 0x57, -0x91, 0x1c, 0x77, 0xf4, 0xdd, 0xe7, 0x83, 0x68, -0x3, 0xf, 0x9b, 0xfd, 0x7a, 0xf0, 0x9a, 0xfc, -0x13, 0xe0, 0xae, 0x11, 0x26, 0xfe, 0x5f, 0xab, - -0xb0, 0xe, 0x1a, 0xa7, 0x1, 0x3d, 0xfa, 0xd4, -0xc2, 0x96, 0xce, 0x18, 0x53, 0x5f, 0x82, 0xe4, -0x30, 0x91, 0x9, 0x6, 0x68, 0xf, 0x94, 0x20, -0xb0, 0x58, 0x65, 0x8, 0xb5, 0xce, 0x69, 0x34, -0x5, 0x6c, 0x3, 0xea, 0x92, 0x96, 0xa9, 0xf0, -0x23, 0xb4, 0x93, 0xbc, 0xf8, 0x99, 0xd6, 0xda, -0x97, 0x3e, 0xea, 0x92, 0x70, 0x9b, 0x7a, 0xc6, -0x8c, 0xaf, 0x69, 0x3e, 0x5b, 0x5a, 0xd9, 0x59, -0x4a, 0x59, 0xa5, 0xbe, 0x29, 0xf1, 0x79, 0x79, -0x56, 0x2d, 0x92, 0x7e, 0x56, 0xe9, 0x56, 0x8b, -0x71, 0xac, 0xf7, 0xe9, 0xc1, 0x59, 0x28, 0xe1, -0x3f, 0x96, 0x4d, 0x28, 0xc6, 0x83, 0xbf, 0xf3, -0xb, 0x8, 0x26, 0x39, 0x90, 0x22, 0x1e, 0x93, -0xb2, 0x50, 0xa4, 0x4e, 0xa6, 0xcb, 0xa, 0x28, -0xa7, 0xb9, 0xe5, 0x1a, 0x84, 0x8d, 0x98, 0xc1, -0x8f, 0x7d, 0xc5, 0xe3, 0xea, 0xe6, 0x16, 0x83, - -0xed, 0xfc, 0x46, 0x11, 0x79, 0x69, 0xbe, 0x73, -0x6e, 0x86, 0xa0, 0x58, 0x7, 0x14, 0x8, 0x92, -0x9e, 0x26, 0x3, 0x72, 0xb1, 0x5b, 0x85, 0x5c, -0x1f, 0x96, 0xfb, 0x59, 0x52, 0x48, 0x99, 0x7d, -0x34, 0xd6, 0x68, 0x62, 0x3, 0xf3, 0x65, 0xcf, -0x64, 0x78, 0x50, 0xc3, 0xe5, 0xbb, 0x57, 0x4e, -0xc1, 0xce, 0xdf, 0x0, 0x63, 0x57, 0xd2, 0x6, -0x75, 0x3d, 0x7b, 0x0, 0xa6, 0x7f, 0x88, 0x1c, -0x96, 0x47, 0x7, 0xa3, 0x9, 0x61, 0x79, 0xed, -0x86, 0x1e, 0xd9, 0xc2, 0xf0, 0x73, 0x6, 0x2b, -0x74, 0x57, 0x5f, 0x5c, 0xea, 0xfc, 0x1a, 0xdf, -0x67, 0x98, 0xa4, 0x72, 0x3f, 0x73, 0x10, 0x8a, -0x9b, 0xd1, 0xbf, 0x8e, 0x22, 0x5b, 0x7d, 0x1e, -0xc6, 0x8a, 0x9b, 0x6b, 0xbd, 0xdb, 0x43, 0x33, -0xfb, 0x30, 0xf2, 0x24, 0xda, 0x2f, 0x54, 0xea, -0xfc, 0xcc, 0x9, 0x98, 0x31, 0xc7, 0xfd, 0x3a, - -0xf1, 0xea, 0x2c, 0xbc, 0x2d, 0xfe, 0xfd, 0xb1, -0x86, 0x1c, 0x3, 0x10, 0x59, 0xa5, 0x66, 0x5c, -0xc2, 0x5e, 0x94, 0x23, 0x12, 0x3d, 0x52, 0x75, -0x95, 0x5b, 0xa2, 0xaf, 0xf0, 0x11, 0x83, 0x9a, -0x4, 0x96, 0xba, 0xaa, 0x6f, 0x5c, 0x26, 0x15, -0x43, 0xd4, 0xc5, 0xbc, 0x74, 0xa9, 0xbf, 0xd8, -0x5e, 0x92, 0x55, 0xa, 0x2e, 0xb6, 0xcf, 0xe6, -0x6f, 0x11, 0x44, 0xf3, 0x39, 0x32, 0x69, 0xc8, -0xe1, 0x74, 0x50, 0x34, 0x62, 0x14, 0x20, 0xd3, -0xc2, 0xc8, 0x9c, 0x4e, 0x58, 0xb, 0xad, 0x7c, -0xc0, 0xf5, 0xe8, 0xfe, 0x35, 0xd5, 0x2b, 0xb0, -0x24, 0x83, 0x77, 0x1d, 0x69, 0x7a, 0x29, 0xd8, -0x3c, 0x4d, 0xdf, 0xe5, 0x5b, 0x4c, 0xc5, 0x86, -0xf2, 0xf8, 0x6b, 0x4e, 0x44, 0xad, 0xae, 0x92, -0xa5, 0x24, 0xdd, 0x54, 0x66, 0x75, 0x83, 0x4a, -0x89, 0xea, 0xc6, 0xef, 0xc6, 0xfb, 0xbd, 0x85, - -0xf8, 0x5b, 0xa, 0xc1, 0xf2, 0x3d, 0xbc, 0x3c, -0xb7, 0x59, 0x5d, 0xbf, 0xac, 0x28, 0xd7, 0x99, -0xbb, 0x95, 0x18, 0x98, 0x3d, 0xf6, 0xbd, 0x5a, -0x35, 0xb2, 0x60, 0x97, 0x12, 0x8, 0xfd, 0x48, -0xc, 0xfb, 0xf3, 0x9e, 0x6, 0x8, 0x22, 0xa5, -0xa4, 0x92, 0xdb, 0xd4, 0x67, 0x85, 0xb2, 0x84, -0x32, 0x6a, 0x45, 0xed, 0x5c, 0x63, 0x16, 0xe2, -0xb1, 0x9b, 0xb9, 0x6a, 0x15, 0xd4, 0x53, 0x65, -0xda, 0x4d, 0xac, 0xe7, 0xb7, 0x43, 0x2b, 0x1a, -0x0, 0xaa, 0x62, 0xfd, 0xc, 0x3e, 0xed, 0xcc, -0xb8, 0x25, 0x4d, 0x61, 0x12, 0xe5, 0xf6, 0x4c, -0x79, 0xe, 0x7e, 0xe4, 0x88, 0x32, 0xf9, 0x88, -0xd2, 0xd0, 0xd2, 0xf7, 0x83, 0xb0, 0xa3, 0xc1, -0xf0, 0x1e, 0x43, 0x8c, 0x1b, 0xc5, 0xc0, 0xf7, -0x39, 0x5d, 0x8, 0x79, 0xf6, 0xb1, 0x59, 0x33, -0x94, 0xcd, 0xee, 0xcd, 0xd, 0x13, 0x11, 0xbd, - -0xba, 0x7b, 0x86, 0x3d, 0x31, 0x42, 0x89, 0xe1, -0xde, 0xf9, 0xc0, 0x79, 0x94, 0x8, 0x93, 0xc3, -0x45, 0xd5, 0xba, 0x55, 0x77, 0x66, 0x56, 0xce, -0xdc, 0xbc, 0x50, 0x96, 0x49, 0xe2, 0xd1, 0xf9, -0x20, 0xc1, 0x88, 0x8f, 0xe0, 0xd3, 0xaf, 0xc1, -0xe4, 0xdf, 0x7c, 0xa2, 0xce, 0x92, 0xd1, 0x1e, -0xd1, 0xbb, 0xe0, 0x26, 0xaf, 0x1f, 0x36, 0x40, -0x8c, 0x22, 0xca, 0xe1, 0xe, 0x2f, 0x5d, 0x90, -0x5a, 0x9b, 0x88, 0x91, 0x1f, 0x35, 0x74, 0xd6, -0x13, 0x6f, 0xd1, 0xfe, 0xf6, 0x4, 0x80, 0xba, -0x15, 0x27, 0x12, 0x27, 0x6a, 0x6, 0xf2, 0x94, -0xeb, 0xd6, 0xf3, 0x1d, 0x89, 0x2f, 0xac, 0xb0, -0x68, 0x2e, 0x8a, 0x51, 0x3d, 0x4e, 0xfc, 0xf6, -0x6f, 0xc2, 0x24, 0x36, 0x0, 0x1, 0x34, 0xd6, -0xa6, 0x35, 0x7b, 0x4b, 0xd1, 0x4a, 0x3f, 0xd1, -0x8b, 0x44, 0xb, 0xe1, 0xe6, 0x35, 0x22, 0xdf, - -0x80, 0x71, 0xf1, 0xef, 0x8d, 0x26, 0x7e, 0x30, -0x4e, 0x47, 0xde, 0xcf, 0x64, 0xdd, 0x28, 0xbe, -0x1b, 0xbf, 0x95, 0x1b, 0x54, 0xda, 0x36, 0xad, -0xf0, 0x9b, 0x92, 0x9e, 0x35, 0x74, 0x93, 0xd0, -0x14, 0x8, 0x82, 0xfe, 0x29, 0xd7, 0xa1, 0x50, -0x3, 0xc2, 0x21, 0xf3, 0x20, 0xa8, 0x53, 0x32, -0xd9, 0x23, 0x6d, 0x9e, 0x9c, 0xb8, 0x93, 0x9a, -0x8c, 0xb3, 0xa3, 0x69, 0xa6, 0x33, 0xba, 0x92, -0x8, 0x96, 0xc5, 0x84, 0x89, 0x94, 0x2c, 0x81, -0x3e, 0xe2, 0xd9, 0x57, 0x63, 0x8a, 0x89, 0x78, -0x14, 0x17, 0x46, 0xac, 0x26, 0x21, 0x8f, 0xb, -0x7, 0x4d, 0x5f, 0xff, 0xc1, 0xa5, 0xad, 0xbd, -0xf2, 0x62, 0x79, 0x59, 0x56, 0x9a, 0x94, 0xd5, -0xfe, 0x50, 0xba, 0xba, 0x6f, 0xd7, 0xb, 0xf, -0xea, 0x9e, 0x49, 0xbb, 0x4, 0x5f, 0x2b, 0x3c, -0x81, 0xe0, 0xab, 0xcb, 0xa6, 0x64, 0x7a, 0x2b, - -0x89, 0xfd, 0x2b, 0x3e, 0x3b, 0xc4, 0x15, 0x91, -0x6c, 0x10, 0x47, 0x4a, 0xd4, 0x8d, 0xde, 0x36, -0x3f, 0xbf, 0x3e, 0x70, 0xb3, 0x83, 0xb, 0x13, -0xf2, 0x73, 0xa7, 0xe6, 0xfb, 0xc5, 0x4f, 0xbc, -0xe, 0xc8, 0xc, 0xee, 0x61, 0x7b, 0x71, 0xce, -0x29, 0xb9, 0xa6, 0xb8, 0xee, 0xbc, 0x27, 0x76, -0x4a, 0x60, 0x2d, 0x11, 0xf, 0x64, 0x8c, 0x7, -0x27, 0x6, 0xd8, 0x4e, 0x75, 0xeb, 0x98, 0x10, -0x86, 0x49, 0x6c, 0x2d, 0x5f, 0xc, 0x15, 0xb0, -0x35, 0x37, 0x29, 0xe5, 0xbd, 0xa9, 0xba, 0xea, -0x3e, 0x4d, 0xc7, 0xd0, 0xdd, 0x1c, 0x57, 0x17, -0xe5, 0xb7, 0x16, 0x46, 0x70, 0x1e, 0x47, 0x75, -0x29, 0x2c, 0xd, 0x39, 0x85, 0xe8, 0xdf, 0xad, -0x74, 0x2e, 0xf1, 0xda, 0x63, 0x9, 0xdc, 0x32, -0xb8, 0x99, 0x66, 0xb1, 0x0, 0xc, 0x81, 0x5d, -0x6f, 0x2b, 0xd4, 0xb4, 0xbf, 0xbc, 0x70, 0x3e, - -0x2c, 0xef, 0xd7, 0x19, 0xac, 0x86, 0x1e, 0xbc, -0x99, 0xf9, 0xe, 0x18, 0xb1, 0x5b, 0x6, 0x22, -0x67, 0xcb, 0x1a, 0x81, 0xb6, 0x96, 0x53, 0xf, -0x31, 0xb5, 0x1d, 0x6c, 0xd2, 0x4a, 0xf8, 0x4b, -0x3b, 0x8a, 0x4c, 0x30, 0x4e, 0x3c, 0xde, 0xc9, -0x14, 0x63, 0x5a, 0xe1, 0x32, 0x4a, 0x66, 0x88, -0x67, 0x93, 0x7c, 0xf9, 0xbe, 0x5d, 0x84, 0x4, -0x28, 0x56, 0x21, 0xd4, 0x33, 0x6, 0x79, 0x30, -0xd5, 0x17, 0xd5, 0x30, 0x63, 0x7c, 0x23, 0x67, -0x3d, 0x30, 0x66, 0x63, 0x5d, 0xd9, 0xde, 0x20, -0xd9, 0xfa, 0xcc, 0x13, 0x5c, 0x45, 0xef, 0xd8, -0x83, 0xdd, 0xeb, 0x7e, 0xe2, 0x13, 0x1a, 0x74, -0xe4, 0xad, 0x46, 0xfa, 0x33, 0x7, 0xe2, 0xa7, -0x57, 0xf5, 0x86, 0xa1, 0xe6, 0xce, 0x12, 0x5b, -0x21, 0xff, 0x43, 0x3d, 0x70, 0xf1, 0x59, 0x4b, -0x53, 0x1c, 0xf, 0x56, 0x5e, 0xc0, 0x78, 0xd7, - -0x30, 0x32, 0xbe, 0xcb, 0xdf, 0x3c, 0xce, 0xb5, -0xbe, 0x2e, 0x6c, 0x52, 0xd2, 0x74, 0x7e, 0x2e, -0x84, 0x65, 0xcb, 0xfd, 0x90, 0x43, 0x60, 0x10, -0x88, 0xa1, 0x4f, 0x63, 0xa1, 0x54, 0x7d, 0xbe, -0x5e, 0x40, 0xbf, 0x7a, 0x77, 0x6d, 0xa, 0xca, -0xa4, 0xaf, 0xbc, 0xe7, 0xe3, 0x85, 0xa7, 0x9c, -0xcd, 0x2a, 0xde, 0xdc, 0xce, 0x29, 0x61, 0x0, -0x9e, 0x89, 0x5, 0xf4, 0xf3, 0x6f, 0xb8, 0x3b, -0xf6, 0x8c, 0x58, 0xd3, 0x43, 0x96, 0x10, 0x23, -0x5a, 0xff, 0x3b, 0xc7, 0x7, 0x81, 0xdf, 0x53, -0xda, 0x5e, 0x26, 0x82, 0xe3, 0xe7, 0xb0, 0xd9, -0xca, 0x56, 0x71, 0xc6, 0x5, 0x1c, 0x9b, 0x7a, -0x8e, 0x11, 0x16, 0xfd, 0x5e, 0x22, 0x9a, 0xd7, -0x9e, 0x5e, 0x43, 0x8f, 0x8f, 0xe0, 0x2a, 0x7d, -0xc0, 0x21, 0xc4, 0xf3, 0x3b, 0x42, 0xb, 0x44, -0x7b, 0xac, 0x24, 0xf, 0x8b, 0x4c, 0x65, 0xd5, - -0xdf, 0x8f, 0x1, 0xec, 0xe, 0xa9, 0x96, 0x5f, -0x91, 0x94, 0x83, 0x69, 0x8f, 0x9, 0xfb, 0x59, -0x6, 0xa9, 0xd6, 0xa0, 0xa3, 0x8b, 0xb2, 0xb1, -0xc8, 0xcd, 0xc1, 0xb1, 0xdf, 0xb0, 0x50, 0x80, -0x6b, 0xed, 0x99, 0x37, 0x3b, 0x69, 0x36, 0x9c, -0xd2, 0xc6, 0xb0, 0x44, 0x3f, 0x89, 0x4, 0x15, -0x6a, 0xe1, 0xde, 0xd, 0x8c, 0x27, 0x81, 0x9b, -0xb9, 0xcf, 0xdc, 0x8c, 0x9a, 0xdd, 0xf0, 0x8e, -0xed, 0x6c, 0xe4, 0xfa, 0x11, 0xbf, 0xef, 0x54, -0x83, 0xed, 0x8, 0xf1, 0x9a, 0x5a, 0x1f, 0xf, -0xf6, 0xa0, 0xd4, 0xd6, 0x1d, 0x0, 0xca, 0x93, -0x8d, 0x33, 0x15, 0x93, 0x38, 0x2f, 0x24, 0xed, -0xd0, 0xe7, 0x16, 0x50, 0x9c, 0xf, 0x82, 0x6f, -0xf1, 0xd1, 0x10, 0x24, 0xbc, 0x21, 0x41, 0x26, -0x2d, 0x2b, 0xa8, 0xce, 0x34, 0xe4, 0x7c, 0x55, -0x2c, 0x8b, 0x30, 0xa2, 0xbe, 0x5b, 0x47, 0xa3, - -0x1d, 0xa0, 0xf4, 0xc, 0xa4, 0xf8, 0x4c, 0x5f, -0x9a, 0x97, 0xda, 0xca, 0x11, 0x5d, 0x78, 0xef, -0x4e, 0x97, 0x71, 0xc5, 0xd7, 0x48, 0xa8, 0x68, -0x3e, 0xfc, 0x6f, 0xc2, 0x29, 0x2f, 0x62, 0x80, -0x72, 0x58, 0xbf, 0x54, 0xc1, 0x86, 0x23, 0x11, -0xa2, 0x49, 0xa3, 0xf7, 0x19, 0x1b, 0xd6, 0xb1, -0x50, 0xca, 0x1c, 0x1a, 0x7f, 0xb7, 0xd4, 0x15, -0xc8, 0x88, 0x11, 0xf2, 0xc1, 0x53, 0x3b, 0xac, -0x2, 0xef, 0x3, 0x67, 0xea, 0x3d, 0x69, 0x40, -0xa6, 0x76, 0xd7, 0x20, 0x8d, 0x9b, 0x94, 0x54, -0x5f, 0x72, 0x32, 0xd9, 0x79, 0x22, 0xe, 0x63, -0x0, 0x86, 0x5f, 0xba, 0x4, 0xf4, 0xd2, 0xb3, -0xa, 0xbe, 0x23, 0x30, 0x9d, 0x44, 0x97, 0x50, -0x83, 0x74, 0x45, 0x33, 0x12, 0x60, 0x1, 0xe2, -0x95, 0x1b, 0x7e, 0xd, 0x78, 0x3f, 0xa0, 0x9d, -0xe0, 0x72, 0xfa, 0x9a, 0x6a, 0xc3, 0x7e, 0x47, - -0x5f, 0x32, 0x87, 0x6c, 0x2d, 0x88, 0xd8, 0x57, -0x9, 0x43, 0x81, 0xc5, 0x76, 0xe7, 0x67, 0x44, -0x19, 0x41, 0xea, 0x76, 0xdc, 0xd5, 0xd6, 0x38, -0x43, 0x59, 0xa4, 0xda, 0x13, 0xd1, 0x8f, 0xa0, -0x42, 0x8f, 0xf9, 0x64, 0x2f, 0x5a, 0x3e, 0x9c, -0xee, 0x22, 0x2d, 0xe0, 0xcf, 0x20, 0x89, 0x6, -0x57, 0x1, 0x17, 0x51, 0x19, 0x7a, 0x1c, 0xb4, -0x18, 0x21, 0xec, 0x88, 0xad, 0x96, 0xe4, 0xfa, -0xa, 0x98, 0x94, 0xaa, 0x76, 0xe7, 0x8, 0x68, -0x45, 0xdb, 0xa5, 0xc0, 0xb2, 0xab, 0xc1, 0x14, -0x38, 0xf1, 0x3b, 0x43, 0xec, 0x7d, 0x5e, 0xe3, -0xfa, 0x82, 0x2b, 0x23, 0xfe, 0x50, 0x3e, 0x7b, -0x27, 0xed, 0x24, 0x5e, 0x9d, 0xa0, 0xf7, 0x67, -0x3f, 0x3a, 0xc1, 0xdd, 0x9b, 0x79, 0xf4, 0x86, -0xab, 0xac, 0x27, 0xb0, 0xbf, 0x6b, 0xa5, 0xd7, -0x7a, 0x7, 0xc6, 0xb0, 0xfc, 0xa6, 0xf9, 0xbf, - -0x47, 0x3, 0xfc, 0x4, 0xc3, 0x71, 0xd5, 0xb0, -0xaa, 0xe4, 0x3e, 0xe8, 0x5c, 0x36, 0xfa, 0x89, -0x21, 0x94, 0xba, 0x7c, 0x16, 0xbf, 0x1e, 0xff, -0xd0, 0x47, 0xd5, 0x2a, 0x98, 0x46, 0x2a, 0x60, -0x42, 0x13, 0xdb, 0xca, 0xe1, 0x3a, 0xd, 0xaf, -0x89, 0xf2, 0x7c, 0x99, 0x6b, 0xbe, 0xb4, 0xd6, -0x58, 0x8a, 0xf2, 0x99, 0x2, 0x81, 0xc4, 0x1f, -0x10, 0x8f, 0x7c, 0x81, 0xe4, 0x23, 0x9f, 0x25, -0x96, 0x1, 0x26, 0x44, 0x4, 0xa3, 0xef, 0x45, -0x8, 0x8b, 0x1e, 0x20, 0x67, 0x89, 0x9b, 0xea, -0xd8, 0x59, 0x22, 0xa6, 0xe0, 0x5f, 0x5c, 0xde, -0x45, 0x97, 0x52, 0xb5, 0x45, 0x76, 0xe2, 0x13, -0xdd, 0x29, 0x9a, 0x77, 0x2f, 0xb8, 0xf, 0x83, -0xb0, 0x73, 0x3d, 0x96, 0x1c, 0xe5, 0xfc, 0xc2, -0x31, 0x24, 0x6f, 0xa5, 0x9, 0x1f, 0x9b, 0xc7, -0x58, 0x80, 0x32, 0xd, 0x25, 0xd7, 0x42, 0x7f, - -0x8a, 0x55, 0x23, 0x5, 0x68, 0xe5, 0x4c, 0xb3, -0x8d, 0x17, 0xb8, 0x4f, 0xe5, 0xaa, 0x91, 0x15, -0x46, 0xb5, 0x96, 0x6c, 0x4, 0xac, 0x93, 0x93, -0xe4, 0xa5, 0x48, 0x42, 0x50, 0x18, 0x1d, 0x84, -0x5b, 0xd2, 0x79, 0xb1, 0x44, 0x7f, 0x92, 0x7, -0x14, 0xc3, 0x87, 0x7c, 0x1a, 0x32, 0xa0, 0x32, -0xd3, 0x79, 0xc1, 0x1d, 0xec, 0x86, 0x98, 0x4, -0xd, 0x65, 0xb6, 0x40, 0x1d, 0x31, 0x73, 0xdd, -0x8c, 0x91, 0x23, 0x99, 0x9a, 0xa6, 0x82, 0xad, -0xf6, 0xd4, 0x74, 0x6, 0x46, 0x46, 0x97, 0x5, -0x42, 0xcf, 0x82, 0x7e, 0xc8, 0x8c, 0x4, 0xdc, -0xff, 0x99, 0x8b, 0xa0, 0x18, 0x8f, 0xff, 0x44, -0xdf, 0x2f, 0x8c, 0xd3, 0x67, 0x7b, 0x87, 0x8a, -0xf4, 0xd, 0xe1, 0x5d, 0x70, 0xcc, 0x42, 0x69, -0xa9, 0xb5, 0xff, 0x33, 0xac, 0xfe, 0xf6, 0x69, -0xc1, 0x1f, 0xa5, 0x8d, 0x76, 0x0, 0xc7, 0xee, - -0xd7, 0xa5, 0x87, 0x51, 0xe0, 0x70, 0xf, 0x6d, -0xf7, 0x3c, 0x72, 0x1e, 0x7, 0xd, 0xa, 0xa1, -0x64, 0xce, 0xd7, 0x1c, 0xfb, 0xc, 0xd1, 0x53, -0xb2, 0x39, 0xeb, 0x50, 0x59, 0x64, 0x8, 0x76, -0x73, 0x56, 0x31, 0xf8, 0x24, 0xfd, 0x64, 0x8, -0xbf, 0xb3, 0x3, 0xcf, 0x86, 0x80, 0xf1, 0x5a, -0xa0, 0x79, 0x12, 0xe4, 0x80, 0x85, 0x52, 0x76, -0x2f, 0xd9, 0x52, 0x16, 0x1a, 0xbb, 0x7e, 0x65, -0x52, 0x65, 0x5e, 0xd, 0x85, 0x17, 0x2f, 0x2e, -0x41, 0xc, 0x48, 0xe7, 0x19, 0x51, 0x3e, 0x6e, -0x88, 0x22, 0xf, 0xb4, 0xfb, 0x30, 0x70, 0xf7, -0x77, 0xa9, 0xd6, 0x90, 0xcd, 0x1b, 0x9b, 0x6b, -0x28, 0x35, 0x9c, 0x36, 0xbf, 0xd4, 0x6f, 0xb7, -0xd0, 0xc2, 0x29, 0x14, 0x22, 0xdf, 0x72, 0xc7, -0x6e, 0x60, 0x34, 0xca, 0xe, 0x46, 0x14, 0xf1, -0x54, 0x3e, 0x25, 0x49, 0x7c, 0x42, 0x3e, 0x38, - -0x7b, 0x17, 0x81, 0xf6, 0x4c, 0xf3, 0x84, 0x2, -0x8e, 0x2c, 0xe7, 0x62, 0xa, 0x82, 0xbc, 0xb6, -0x8f, 0x77, 0x3a, 0x1, 0x30, 0x77, 0xc5, 0xbf, -0x58, 0x43, 0xcd, 0xfc, 0xfd, 0xba, 0x9, 0xe1, -0x65, 0x5, 0xe5, 0x8f, 0xad, 0x64, 0x9f, 0xe7, -0x5d, 0xa9, 0xb2, 0x6a, 0x7d, 0xca, 0xbd, 0x29, -0xd0, 0xfe, 0xba, 0xac, 0xad, 0x46, 0xca, 0xa5, -0xfe, 0xf0, 0x38, 0xef, 0x73, 0x0, 0x3a, 0x94, -0xbb, 0x69, 0xcc, 0x7c, 0xdb, 0x4d, 0x83, 0xe8, -0x7b, 0x4b, 0x2e, 0xd1, 0x37, 0xe3, 0x5b, 0x79, -0xd, 0x1, 0x9c, 0x17, 0xe5, 0x88, 0x48, 0x65, -0x1f, 0x9d, 0xc0, 0x2d, 0xe5, 0xcf, 0x56, 0x2f, -0xac, 0x74, 0xf3, 0x23, 0xd, 0x51, 0x4e, 0x66, -0x22, 0x3e, 0xa7, 0x39, 0xcc, 0xe2, 0xef, 0x1d, -0xd2, 0x80, 0x35, 0x5b, 0xec, 0x5c, 0xe9, 0xf8, -0xb7, 0x70, 0x5c, 0xf1, 0x9a, 0x6e, 0xfa, 0xda, - -0x0, 0xeb, 0x6a, 0x69, 0xfd, 0x26, 0x7d, 0xbb, -0xcd, 0xc, 0x62, 0xa, 0x90, 0x3d, 0x9c, 0x37, -0xfa, 0x9a, 0x84, 0x9e, 0x93, 0xac, 0xc4, 0xb9, -0x32, 0x2d, 0xf5, 0x69, 0x27, 0x35, 0x86, 0x2, -0x56, 0xbd, 0x85, 0x22, 0x54, 0x87, 0xf6, 0x77, -0xfa, 0xc9, 0x62, 0xfb, 0xd3, 0x6f, 0x8f, 0x3, -0x0, 0x56, 0x30, 0x6e, 0xc7, 0xd7, 0xd1, 0xd0, -0x45, 0x6f, 0xe8, 0xcd, 0x8b, 0xbc, 0x81, 0xd0, -0x3a, 0x1, 0x7, 0x85, 0x6d, 0x3b, 0xb0, 0x42, -0x6c, 0xa2, 0x54, 0xeb, 0x5b, 0x60, 0x59, 0xa1, -0x70, 0x34, 0x86, 0x1d, 0xb1, 0xba, 0xfb, 0x28, -0x29, 0x73, 0xb, 0xa8, 0xb3, 0x31, 0x42, 0x4e, -0xa6, 0x23, 0xee, 0x1e, 0x34, 0x8d, 0x8f, 0xc8, -0xf3, 0x5b, 0xcd, 0x8e, 0x64, 0x15, 0x2e, 0xa1, -0x81, 0x12, 0xad, 0x13, 0x8d, 0x8, 0x68, 0xe8, -0xe2, 0xf2, 0xf4, 0xc4, 0x2a, 0x73, 0x30, 0x9b, - -0xb0, 0x12, 0x3b, 0x5e, 0xd0, 0x7a, 0x6c, 0x93, -0x6f, 0x7c, 0x3f, 0xe4, 0x2c, 0xb2, 0x61, 0xb1, -0xe1, 0xc4, 0x61, 0xfa, 0x9b, 0x92, 0xe, 0xe3, -0x27, 0x85, 0x9c, 0xb6, 0xa2, 0x54, 0x62, 0x38, -0x4a, 0xb8, 0x72, 0x8, 0xa3, 0xd8, 0x8d, 0xa1, -0xef, 0x20, 0x75, 0x46, 0x76, 0xba, 0xae, 0x40, -0x68, 0x14, 0x49, 0xd9, 0xfc, 0x2, 0x42, 0xca, -0x83, 0xb2, 0x2b, 0xb6, 0x34, 0x58, 0x80, 0x26, -0x82, 0xe8, 0xbe, 0x17, 0xe7, 0x26, 0xab, 0x11, -0xc0, 0xea, 0xb0, 0x5b, 0x19, 0xef, 0xea, 0x61, -0x9d, 0xe6, 0xa9, 0x82, 0xf1, 0xa0, 0xe6, 0xb3, -0xda, 0xaf, 0xd2, 0xcf, 0x41, 0x8c, 0x32, 0xd4, -0xa, 0xf0, 0xd2, 0xca, 0xe6, 0x41, 0x3d, 0x41, -0x29, 0x93, 0x96, 0x39, 0x87, 0x5b, 0x85, 0x1f, -0x61, 0xd8, 0x63, 0x45, 0xee, 0x4c, 0x2e, 0x42, -0x4b, 0x7c, 0xa7, 0xe4, 0x20, 0xf6, 0x37, 0x63, - -0xfe, 0xb1, 0x28, 0xb9, 0xf0, 0x76, 0x30, 0xe7, -0xce, 0x9e, 0xf6, 0xe9, 0x65, 0x5d, 0xcc, 0x20, -0x70, 0xd8, 0x70, 0x3d, 0x87, 0x24, 0xa2, 0x56, -0xc4, 0x93, 0xd3, 0xaa, 0xd0, 0xd6, 0x5c, 0x3d, -0xd, 0xfc, 0x49, 0x61, 0x23, 0x94, 0x2c, 0x22, -0xc3, 0x7e, 0xdc, 0xf7, 0x3f, 0x2, 0xcc, 0x2c, -0xd2, 0xe0, 0x77, 0xc4, 0xda, 0xd2, 0x99, 0xe6, -0x9, 0x6b, 0x60, 0x65, 0x82, 0x38, 0x7b, 0x60, -0x53, 0x30, 0xc2, 0xb7, 0xd4, 0xe3, 0xec, 0xb0, -0xc4, 0x50, 0x41, 0xcc, 0xe7, 0xa4, 0x3f, 0xed, -0xc0, 0x27, 0x2b, 0xc4, 0x17, 0xb7, 0x98, 0x7f, -0xcc, 0xe9, 0xb0, 0xfd, 0x1e, 0x9, 0x49, 0x20, -0x88, 0x9e, 0x2d, 0xa6, 0x9, 0x32, 0x42, 0xc7, -0x21, 0x2a, 0x85, 0x84, 0x42, 0xd8, 0x2d, 0x94, -0x6b, 0x18, 0x45, 0x46, 0xd8, 0x69, 0xee, 0xff, -0x15, 0xfb, 0x20, 0x4d, 0x6, 0xce, 0xf, 0x14, - -0x6c, 0x8d, 0xf3, 0xd, 0x53, 0x39, 0x80, 0x8, -0x4f, 0x41, 0xe9, 0xe9, 0xae, 0x97, 0x1c, 0x53, -0xae, 0x21, 0x1e, 0x99, 0xf8, 0x98, 0xe9, 0x6a, -0xa0, 0x1f, 0x93, 0xd1, 0xd2, 0x5f, 0xb8, 0x26, -0x25, 0x82, 0x34, 0xa9, 0x2a, 0xa7, 0xe7, 0x53, -0x48, 0x37, 0x3e, 0x4f, 0x3d, 0xa9, 0x11, 0x28, -0x4f, 0xa6, 0x1f, 0x34, 0xf4, 0x62, 0x44, 0x3c, -0xf6, 0xe6, 0x84, 0xf9, 0xd, 0x59, 0x82, 0xc3, -0xb1, 0x7f, 0x36, 0x6c, 0x95, 0x1a, 0x8e, 0x55, -0x5c, 0x95, 0x53, 0xfe, 0xb0, 0x2c, 0xc7, 0xd, -0xfe, 0x1c, 0x4a, 0xc5, 0x85, 0xe4, 0x23, 0xb3, -0x46, 0xaa, 0x17, 0xd9, 0x24, 0x6e, 0xf6, 0x6b, -0x8e, 0x5d, 0x6c, 0x48, 0x1c, 0x61, 0x16, 0x6d, -0x94, 0xf7, 0xc6, 0xf3, 0xb6, 0xde, 0xb2, 0x4d, -0xee, 0x25, 0x1a, 0x45, 0xb8, 0xd5, 0xdf, 0x46, -0xcd, 0xc7, 0x93, 0xfe, 0x49, 0xd0, 0xc9, 0x63, - -0xd3, 0x9a, 0x16, 0xee, 0x5a, 0x93, 0xd7, 0x63, -0x89, 0x9a, 0x6a, 0x68, 0x45, 0xb0, 0x2, 0x49, -0xac, 0xb2, 0x8e, 0x1e, 0xb5, 0x8d, 0x4e, 0x61, -0xb, 0xab, 0x35, 0x9c, 0x84, 0x51, 0xca, 0x2, -0x15, 0x7c, 0x2b, 0x8d, 0x34, 0x92, 0xc2, 0x29, -0x6c, 0xa7, 0x64, 0x1b, 0xbe, 0x6e, 0x8c, 0x7c, -0x8d, 0x16, 0x31, 0x3f, 0x66, 0x65, 0xf7, 0xf1, -0x56, 0x7b, 0x89, 0x5e, 0x21, 0x6f, 0xd9, 0x64, -0x5e, 0x87, 0x20, 0x18, 0xb0, 0x94, 0x28, 0x78, -0x42, 0x3, 0x5f, 0x34, 0x59, 0xd8, 0x96, 0x53, -0xd1, 0xef, 0x4, 0xbc, 0xfb, 0x3b, 0xce, 0x65, -0x7d, 0x16, 0xad, 0x60, 0x7e, 0xf, 0x5a, 0x57, -0x76, 0xfa, 0x5, 0x79, 0x85, 0xba, 0x96, 0xab, -0x50, 0xd4, 0x1f, 0x49, 0x8, 0xdd, 0xfc, 0x8e, -0xa9, 0xa1, 0x46, 0x96, 0x47, 0xbe, 0x94, 0x5b, -0x78, 0xb1, 0x29, 0x35, 0x6e, 0x42, 0x62, 0xb7, - -0x39, 0xcc, 0xbd, 0x7d, 0xfa, 0xc5, 0xcf, 0x4b, -0x17, 0x1, 0x9a, 0xaf, 0xca, 0xd, 0xb2, 0xe8, -0x21, 0x6f, 0x15, 0xa5, 0x74, 0x47, 0xea, 0x19, -0xe4, 0x5d, 0x95, 0x4b, 0x6c, 0xc3, 0x78, 0xad, -0x2, 0x2b, 0xed, 0xb4, 0xc3, 0x4e, 0xd5, 0x8, -0x9, 0xde, 0xf9, 0x59, 0x1, 0xf3, 0x4e, 0xf6, -0xac, 0x6f, 0xb2, 0x44, 0xa4, 0xd6, 0x3f, 0x8c, -0x48, 0xb7, 0xf0, 0xbb, 0xd7, 0xa5, 0xd5, 0xc9, -0xfe, 0x6b, 0x77, 0xdd, 0x2d, 0xda, 0x97, 0xff, -0x8e, 0xbc, 0xd6, 0x43, 0x40, 0xa2, 0x69, 0x6b, -0x38, 0x13, 0x8d, 0x53, 0xd2, 0xe0, 0xc1, 0x5a, -0xe1, 0x97, 0xdc, 0x6c, 0x6d, 0x46, 0xce, 0x5a, -0x71, 0xa7, 0x98, 0xf2, 0x38, 0xa, 0x82, 0x9d, -0xe4, 0x5, 0xa2, 0xe5, 0x16, 0xcc, 0xb1, 0x0, -0x73, 0x7, 0x73, 0x21, 0xf2, 0x46, 0xf7, 0xb6, -0xed, 0x9a, 0x81, 0x1c, 0xae, 0x19, 0x59, 0x76, - -0x79, 0xdc, 0x3b, 0x6f, 0x6b, 0x96, 0xfc, 0x1a, -0x9, 0x6, 0x55, 0x8a, 0x8, 0xa2, 0x6, 0x8a, -0x32, 0x6, 0x38, 0x3a, 0xba, 0xc9, 0x40, 0xc, -0xb0, 0x9c, 0x9, 0x29, 0xe1, 0x7b, 0x9, 0xae, -0x30, 0xb8, 0x21, 0xbf, 0x8a, 0x64, 0x89, 0x43, -0x47, 0xd, 0xc4, 0xee, 0xfd, 0xec, 0x75, 0x61, -0xe8, 0xf7, 0x4c, 0xd2, 0x4b, 0xdb, 0x58, 0x2d, -0x8a, 0xd9, 0x4c, 0xe4, 0xc8, 0xf5, 0xe, 0x42, -0x4b, 0x7d, 0xdd, 0xa1, 0xdb, 0xe3, 0x97, 0x4e, -0x34, 0x19, 0xed, 0xab, 0xfa, 0x4f, 0xb3, 0x32, -0xd9, 0x3a, 0x6, 0x44, 0x30, 0x70, 0xa8, 0x94, -0x11, 0x37, 0xc2, 0x18, 0x1f, 0xb3, 0x38, 0x7f, -0xf, 0xc5, 0xad, 0xfa, 0xfd, 0x76, 0x2e, 0x34, -0xa9, 0x6d, 0x50, 0x80, 0xf3, 0x84, 0xd4, 0x6f, -0xd6, 0x1c, 0x4d, 0x70, 0xcb, 0xe, 0xf6, 0x36, -0x6a, 0xf3, 0xbb, 0x83, 0xc5, 0x4c, 0x9c, 0x6b, - -0x32, 0x41, 0x4d, 0x3e, 0xf, 0x84, 0x41, 0xe8, -0xbe, 0x7e, 0x23, 0x4c, 0x5a, 0x71, 0x48, 0xe7, -0xe7, 0x4a, 0xb3, 0x88, 0xee, 0xe4, 0x47, 0xd5, -0xde, 0x56, 0x89, 0x1d, 0x2b, 0xc2, 0xcc, 0xb5, -0x3, 0x4d, 0xcc, 0x9a, 0xa4, 0x3, 0x40, 0xce, -0x1f, 0xbc, 0xb8, 0x9d, 0x2b, 0x88, 0x11, 0xda, -0xe2, 0x6f, 0x66, 0x86, 0xeb, 0x68, 0x91, 0x2b, -0xf9, 0x18, 0xc7, 0x67, 0x81, 0xfa, 0xf5, 0xee, -0xf0, 0x21, 0x1a, 0x6b, 0xcb, 0x5d, 0xfc, 0x9a, -0x64, 0xd3, 0x12, 0xe, 0xa1, 0x81, 0xfd, 0xec, -0xe9, 0x6a, 0xb1, 0x20, 0x23, 0xd6, 0xfe, 0x77, -0xc8, 0x99, 0x1b, 0x21, 0x1e, 0x8b, 0xc, 0x57, -0x11, 0x6, 0xc9, 0x88, 0xbc, 0x92, 0xff, 0xa0, -0xa4, 0x54, 0x45, 0xc5, 0x47, 0x2c, 0x81, 0x2a, -0x32, 0x69, 0xfb, 0x2c, 0xa7, 0x99, 0x6f, 0x79, -0x41, 0xf2, 0x22, 0xe9, 0x3b, 0x59, 0xa, 0x41, - -0xb7, 0x85, 0x32, 0xa9, 0xe0, 0x96, 0xcd, 0x1c, -0xf7, 0x10, 0x94, 0xa0, 0xa6, 0x1, 0x66, 0x2b, -0xf3, 0x9a, 0x82, 0x3d, 0x34, 0x20, 0xa9, 0x7a, -0x1, 0xcb, 0x10, 0x91, 0x6b, 0xb0, 0x2a, 0xec, -0x77, 0xb1, 0x35, 0x53, 0xe6, 0xc9, 0x42, 0xe9, -0x59, 0xc2, 0xd8, 0x6, 0x3e, 0x50, 0xba, 0xe2, -0xcf, 0xe0, 0x65, 0x5f, 0xde, 0x58, 0xc6, 0x22, -0x6c, 0x16, 0x70, 0x96, 0x4c, 0x8c, 0xd1, 0xe2, -0x4f, 0x82, 0x3a, 0x98, 0x6, 0x4e, 0x67, 0xae, -0x9c, 0x0, 0x9f, 0x3f, 0x20, 0xa2, 0x7a, 0x69, -0xc3, 0x7a, 0xd6, 0x73, 0xef, 0x5f, 0xf3, 0xb9, -0xbd, 0x68, 0xe5, 0x9b, 0xeb, 0xdb, 0x1c, 0x1, -0x83, 0x5, 0x48, 0x94, 0x63, 0x8e, 0xfb, 0x23, -0x17, 0x66, 0xfc, 0xa0, 0x66, 0x26, 0x9d, 0x69, -0xdb, 0xca, 0xef, 0x20, 0x3b, 0x41, 0x4e, 0x10, -0x8d, 0x5c, 0x1a, 0x46, 0xef, 0x48, 0x13, 0xb7, - -0xfc, 0x1c, 0x63, 0xaf, 0x63, 0x54, 0x72, 0x88, -0x46, 0xf0, 0xe6, 0x2d, 0x14, 0x7f, 0x3b, 0x8b, -0xd0, 0x2c, 0xb0, 0x5d, 0x8f, 0x82, 0x33, 0x36, -0x76, 0xa0, 0xa8, 0x2d, 0x8, 0x1a, 0x4e, 0xd1, -0x34, 0xb8, 0xac, 0x3c, 0xe9, 0x75, 0x97, 0xa1, -0x96, 0x36, 0xfe, 0xad, 0xcd, 0x9d, 0x7d, 0xc9, -0xb6, 0x58, 0xbc, 0xa3, 0x1b, 0x47, 0xb, 0x87, -0x4c, 0x3a, 0xae, 0x85, 0xb7, 0xd5, 0xb7, 0x94, -0xc1, 0x2e, 0x39, 0x85, 0x74, 0x2e, 0xc1, 0x7f, -0x7c, 0x81, 0xd6, 0x17, 0xbd, 0x7a, 0x4d, 0xb8, -0x95, 0x8c, 0x4b, 0x9c, 0x8c, 0x33, 0x30, 0xc1, -0x45, 0xf6, 0x2f, 0x74, 0xc6, 0x89, 0x24, 0x87, -0x3a, 0xb6, 0x7d, 0x89, 0x13, 0x40, 0x1e, 0xf9, -0x8a, 0xf8, 0xf1, 0xcd, 0x7, 0xc3, 0x29, 0x4e, -0x1, 0xc4, 0x1f, 0xf9, 0x81, 0xca, 0x5e, 0x1, -0xc8, 0xb3, 0xb7, 0xf6, 0x6d, 0x38, 0x31, 0x18, - -0x4f, 0xd, 0x10, 0x96, 0x61, 0xfc, 0x72, 0xce, -0xc2, 0xbb, 0xfe, 0x11, 0xfa, 0xf4, 0x26, 0x54, -0xf, 0x40, 0x26, 0xe0, 0x5, 0x93, 0xf8, 0xe9, -0x7f, 0x7b, 0x44, 0x75, 0xeb, 0x30, 0xa7, 0xde, -0x2f, 0xb3, 0x29, 0x93, 0x17, 0x8b, 0x19, 0x1a, -0xcf, 0xf, 0xb9, 0xee, 0xb2, 0xbb, 0xc1, 0xf3, -0x4, 0x7b, 0xb0, 0xd, 0xf5, 0x4a, 0x57, 0xdd, -0xf5, 0xac, 0x9e, 0xf5, 0x97, 0x7e, 0x87, 0xbb, -0x3b, 0xb5, 0x8e, 0x53, 0xc7, 0x81, 0x9, 0xa3, -0x12, 0x8a, 0x42, 0x2b, 0xa, 0x7a, 0xfc, 0x1f, -0xba, 0x4b, 0xab, 0xe9, 0xe8, 0x21, 0xda, 0xae, -0x33, 0x47, 0xd9, 0x1b, 0x44, 0x7a, 0x2f, 0xdc, -0x53, 0xf7, 0xf2, 0xa8, 0xab, 0x76, 0x3f, 0x7b, -0xaa, 0xa2, 0x6a, 0xd0, 0x88, 0xc1, 0x1b, 0x47, -0x16, 0x66, 0x69, 0xe, 0x75, 0x97, 0x9c, 0x17, -0xe, 0x60, 0x2a, 0x68, 0xc3, 0x11, 0xdf, 0x4, - -0xc8, 0xc4, 0xce, 0x61, 0x25, 0xf6, 0x34, 0x2b, -0x61, 0x50, 0x91, 0x1d, 0x35, 0xcb, 0x6b, 0x91, -0x2f, 0x8e, 0x9c, 0x69, 0xce, 0xfe, 0x1f, 0x62, -0x22, 0x3f, 0x8f, 0xb4, 0x5f, 0x29, 0x5a, 0x8f, -0x1e, 0x8a, 0xbd, 0x6, 0x5d, 0xe, 0xb, 0xd9, -0xd6, 0x53, 0x68, 0xd0, 0x14, 0xb4, 0xb5, 0xf5, -0xa0, 0x5e, 0x4e, 0x2e, 0x91, 0x5b, 0xd4, 0xfc, -0xcf, 0x58, 0x38, 0x10, 0xa5, 0x78, 0x8a, 0xdb, -0xa5, 0xa, 0xad, 0x7a, 0xa, 0x72, 0xc0, 0xe2, -0xe2, 0xf5, 0x40, 0xb9, 0x7b, 0x47, 0xad, 0xa3, -0xfe, 0x11, 0x9d, 0x3f, 0x37, 0xc4, 0x82, 0x44, -0x3, 0xa4, 0x29, 0xf1, 0xe4, 0x29, 0x29, 0x27, -0xb6, 0x30, 0x85, 0x95, 0x2b, 0x82, 0xb2, 0x55, -0x4b, 0x69, 0x5a, 0x4, 0x89, 0x84, 0x1f, 0x96, -0xa8, 0x5b, 0x59, 0x83, 0x6e, 0x62, 0xeb, 0x9c, -0xfe, 0x97, 0x30, 0x1d, 0x9c, 0x16, 0x26, 0x7d, - -0x7d, 0x9c, 0x59, 0x60, 0x81, 0x8b, 0x65, 0x29, -0xb1, 0x2f, 0xb3, 0x34, 0x11, 0xa8, 0x19, 0x5f, -0xde, 0xf5, 0x65, 0xea, 0xb8, 0x55, 0xc3, 0xe1, -0x1c, 0xac, 0x3a, 0x7, 0xd8, 0xeb, 0x91, 0x51, -0x3e, 0x4e, 0x24, 0xb, 0xa3, 0x7f, 0x59, 0x86, -0xeb, 0x7d, 0x33, 0xe9, 0x3e, 0x58, 0xa9, 0x68, -0x6d, 0x70, 0x12, 0xb3, 0xbb, 0xf7, 0x21, 0x2d, -0x30, 0xca, 0x83, 0x2, 0x11, 0xb9, 0xc2, 0x52, -0xb8, 0xd4, 0xc1, 0x52, 0xdc, 0x8c, 0xd, 0x2e, -0x95, 0x84, 0x58, 0x54, 0xa0, 0x22, 0xe4, 0xa4, -0xf1, 0xa3, 0xa4, 0xd4, 0x5d, 0x27, 0x6c, 0x83, -0x3d, 0xfe, 0x90, 0xd9, 0x61, 0x43, 0x40, 0x2, -0x4d, 0x64, 0x6f, 0xd6, 0x74, 0xc, 0x58, 0x38, -0x7c, 0x3, 0xf3, 0x77, 0x30, 0xcc, 0x29, 0x8d, -0x9d, 0xf9, 0x56, 0xea, 0x6b, 0xa8, 0x1a, 0x7, -0xd0, 0xa0, 0xe8, 0x48, 0x93, 0xa3, 0x19, 0x9b, - -0xc4, 0x4, 0x57, 0x5, 0xec, 0x63, 0xd6, 0x6f, -0xb2, 0xf7, 0x48, 0x65, 0x24, 0x19, 0xcb, 0x20, -0x78, 0xb4, 0xaf, 0xe8, 0x6c, 0x92, 0x7d, 0x86, -0x49, 0xab, 0x5, 0x7, 0xfc, 0x11, 0xc6, 0x70, -0x66, 0xac, 0xbc, 0x70, 0x7e, 0x9d, 0x34, 0xb0, -0x50, 0x41, 0x35, 0xf9, 0xc2, 0x6c, 0xf4, 0xf, -0x17, 0xe0, 0xa7, 0xc2, 0x7a, 0xbf, 0xf4, 0xa1, -0x11, 0xb, 0xe4, 0x52, 0xbf, 0x7c, 0x38, 0x29, -0xfa, 0x34, 0x32, 0x44, 0x14, 0x99, 0x79, 0x6b, -0xb3, 0x5b, 0xd, 0x1, 0x5f, 0xc3, 0x33, 0x57, -0xb0, 0x4b, 0xe, 0x28, 0x36, 0xcf, 0xff, 0xf4, -0x19, 0xf, 0x91, 0x4b, 0xcb, 0x93, 0xcc, 0x6c, -0xc7, 0xfd, 0x2b, 0x57, 0x38, 0x15, 0x7b, 0x6e, -0xda, 0x83, 0xed, 0xcf, 0x28, 0x32, 0x2b, 0xda, -0x82, 0x55, 0x49, 0x68, 0xf8, 0x66, 0xb1, 0x13, -0x11, 0xa9, 0xe0, 0xef, 0xb0, 0x87, 0xec, 0x2, - -0xe7, 0x64, 0x49, 0x58, 0x93, 0xd9, 0x87, 0xb3, -0xfa, 0x50, 0x39, 0x3e, 0xe8, 0x3c, 0xdc, 0x7c, -0x41, 0x21, 0x95, 0xf7, 0xae, 0xa8, 0xa6, 0xc2, -0xab, 0x1b, 0xec, 0x67, 0xd9, 0xd5, 0xca, 0xac, -0x2, 0xe5, 0x72, 0x59, 0xab, 0x29, 0x74, 0x52, -0xc8, 0xf8, 0x1b, 0x10, 0xd4, 0xe9, 0xc2, 0x1a, -0x25, 0xfc, 0xa8, 0xca, 0x41, 0x4b, 0x16, 0x2c, -0x4d, 0x11, 0x20, 0xa5, 0x4a, 0xa9, 0xbc, 0x55, -0xbc, 0x8, 0x79, 0x92, 0x4b, 0xe2, 0x4e, 0x30, -0x26, 0x76, 0xf4, 0xd3, 0x37, 0x68, 0x17, 0xca, -0xcc, 0xd0, 0x71, 0x38, 0x5, 0x44, 0x7e, 0xd4, -0x69, 0xbe, 0xd7, 0xdd, 0xd4, 0x2f, 0x76, 0x8f, -0x41, 0x13, 0x51, 0x5, 0x15, 0x4e, 0x56, 0x75, -0x1a, 0x4f, 0x93, 0x4e, 0x89, 0x1f, 0xef, 0x77, -0x59, 0xe2, 0xbf, 0x4a, 0x86, 0xcc, 0x76, 0x20, -0x9a, 0xfe, 0x3a, 0xbb, 0x7f, 0xb5, 0xed, 0x27, - -0x7a, 0xee, 0x1, 0xca, 0xda, 0x8a, 0xd6, 0x6, -0xe4, 0xdc, 0xe, 0xb4, 0x43, 0xa7, 0x21, 0x55, -0x71, 0x38, 0xc4, 0x44, 0xf, 0x9d, 0x77, 0xad, -0x32, 0xea, 0x41, 0x9a, 0xa8, 0x99, 0x39, 0xb2, -0xc, 0x28, 0xf3, 0x89, 0x7b, 0xee, 0x2a, 0x76, -0x23, 0xc8, 0xc4, 0xa, 0x8e, 0x2, 0xc0, 0xa6, -0x96, 0xe, 0x4e, 0xf6, 0x91, 0xb1, 0x1a, 0x38, -0x46, 0x62, 0x24, 0x37, 0x60, 0xf8, 0x3e, 0x8d, -0xe9, 0x7, 0x1f, 0x88, 0xcf, 0xab, 0xae, 0x3e, -0x80, 0x74, 0xc9, 0x1, 0x8c, 0x81, 0xc1, 0xa, -0x7, 0x10, 0x7c, 0x72, 0xf5, 0xb7, 0x0, 0x3f, -0x7b, 0xfa, 0xe4, 0x4, 0xf4, 0x6d, 0x87, 0x6e, -0xbb, 0x55, 0xce, 0xaf, 0xd9, 0x8e, 0xbd, 0xfc, -0x67, 0x8c, 0x1d, 0x9, 0x98, 0x65, 0x84, 0xda, -0xc6, 0xb8, 0x6f, 0xba, 0x9c, 0x20, 0x83, 0xeb, -0x6e, 0xa1, 0x92, 0x29, 0xb3, 0xe7, 0x35, 0xf3, - -0x7e, 0xaa, 0xc6, 0xcb, 0xb7, 0x7b, 0x73, 0xbd, -0xd2, 0xca, 0x8, 0xa3, 0xb4, 0x12, 0x94, 0x8c, -0xe9, 0xf4, 0x20, 0xa2, 0xbb, 0x22, 0xc, 0x7e, -0x83, 0x1a, 0x58, 0xe9, 0xd2, 0x5, 0x49, 0x5, -0x53, 0xe6, 0x44, 0x81, 0x5c, 0x4d, 0x67, 0x7d, -0x81, 0xcd, 0xb0, 0x69, 0xf6, 0x46, 0x11, 0xf5, -0x42, 0x9c, 0xa3, 0xce, 0x8e, 0x3b, 0x81, 0x53, -0x1d, 0x34, 0x29, 0xcc, 0x50, 0x38, 0x8, 0x5c, -0x71, 0xf4, 0xbe, 0x48, 0x44, 0x8f, 0x9, 0x1f, -0xa1, 0x3e, 0xfc, 0xa8, 0x4c, 0x3, 0x4, 0x5e, -0x7f, 0xed, 0x8f, 0xc8, 0x26, 0x45, 0x8, 0xaf, -0x83, 0xa8, 0xa7, 0x96, 0xb5, 0xd5, 0x53, 0x9c, -0xc2, 0x82, 0x9, 0xe3, 0x77, 0x5, 0x48, 0xf6, -0x87, 0x98, 0x74, 0x32, 0x93, 0x56, 0x7e, 0xb, -0x7e, 0x59, 0x5, 0xfe, 0x77, 0x5f, 0xa1, 0x2a, -0x28, 0x16, 0xf0, 0xb9, 0x85, 0x9c, 0x19, 0xc2, - -0x21, 0x97, 0x11, 0x13, 0xb5, 0x8, 0x6, 0xe8, -0x10, 0xe8, 0xdc, 0x87, 0xc3, 0x2c, 0x26, 0xa8, -0x3f, 0xdd, 0x20, 0x60, 0x58, 0x5c, 0x56, 0x34, -0xb8, 0x5c, 0xb6, 0x57, 0xe0, 0xf1, 0x9b, 0x3f, -0x41, 0x16, 0xac, 0x18, 0x9c, 0x83, 0xcf, 0xa2, -0x81, 0xdd, 0xc8, 0xf3, 0x5e, 0xda, 0x3a, 0x91, -0xb1, 0x77, 0xb9, 0x49, 0x4a, 0x83, 0x89, 0x79, -0x47, 0x8a, 0xb8, 0xa8, 0x42, 0xa6, 0x3, 0x31, -0x1b, 0xe6, 0xc0, 0xed, 0x41, 0x51, 0xf8, 0x7a, -0x40, 0x1, 0x93, 0x45, 0x9, 0x53, 0x2b, 0x5c, -0x8d, 0xf6, 0x42, 0x42, 0xd3, 0xfe, 0xef, 0x5, -0x87, 0x6e, 0x16, 0x43, 0xe5, 0xcf, 0x49, 0x7d, -0xc6, 0xc7, 0x1, 0xc3, 0x4f, 0x44, 0xa2, 0x51, -0x8, 0xe8, 0xd4, 0x7a, 0x4c, 0x7f, 0xae, 0x89, -0xd8, 0x37, 0xd2, 0x33, 0xcc, 0xb7, 0x9a, 0xc3, -0x59, 0x83, 0xe0, 0xc9, 0xa7, 0xe4, 0x83, 0x13, - -0xa1, 0xd7, 0xd7, 0x18, 0x5, 0x55, 0x43, 0x5a, -0xbc, 0x5e, 0x7c, 0x95, 0x59, 0x4e, 0x77, 0xe6, -0x15, 0x44, 0xf5, 0x4c, 0x65, 0x8f, 0x2, 0xdc, -0xa, 0x15, 0x83, 0x9f, 0x95, 0x5b, 0x18, 0x4e, -0x6e, 0x4d, 0x6f, 0x6c, 0xce, 0x99, 0x7e, 0xa5, -0x34, 0x3e, 0x1b, 0xb4, 0xb4, 0x1c, 0xa1, 0x70, -0x35, 0xb9, 0x3b, 0xe4, 0x86, 0xcb, 0xfe, 0xc8, -0x67, 0x86, 0xd6, 0x5a, 0x8a, 0x2, 0x9e, 0xc9, -0x23, 0xfc, 0xe3, 0x50, 0x5a, 0xaa, 0xb4, 0xd, -0xb9, 0xb6, 0x6f, 0xc2, 0xdf, 0xc8, 0x9, 0x5a, -0x9, 0xf, 0xf9, 0x5f, 0xaf, 0xd7, 0x26, 0x7e, -0xb7, 0x15, 0xbf, 0x6d, 0xb9, 0xc8, 0x10, 0x61, -0x1a, 0x8f, 0xaf, 0xcb, 0x82, 0xe1, 0xc0, 0x3e, -0xce, 0x43, 0x44, 0x82, 0x22, 0xcb, 0x64, 0x5f, -0xa8, 0xd0, 0xfc, 0x9e, 0x5f, 0x6c, 0x3f, 0x78, -0xe9, 0x67, 0xa, 0xac, 0x22, 0x66, 0x57, 0x95, - -0xa, 0x95, 0xf0, 0xa7, 0xae, 0x1, 0x32, 0x8, -0xb3, 0xe1, 0x5c, 0x3d, 0xa4, 0x65, 0xac, 0xa0, -0x0, 0x3f, 0xad, 0xbd, 0xbb, 0xce, 0xfc, 0xb4, -0x37, 0xf1, 0xd, 0xfa, 0x6c, 0x22, 0x75, 0xea, -0x70, 0x7b, 0x6, 0x18, 0xcf, 0x50, 0x33, 0xc2, -0xe2, 0x7f, 0x35, 0xd1, 0x47, 0xd8, 0x74, 0x83, -0x5a, 0x8e, 0xe2, 0xf6, 0x2d, 0xa3, 0xa5, 0x90, -0xc2, 0x52, 0xf4, 0xd2, 0xbd, 0xa6, 0xde, 0xc2, -0x5b, 0xc6, 0xaf, 0xdc, 0xc4, 0xec, 0xd2, 0xb1, -0x17, 0xb9, 0x50, 0x8d, 0xc7, 0x57, 0xa5, 0x31, -0xa8, 0x50, 0xe6, 0xa, 0xcd, 0xe1, 0x93, 0xa1, -0xd8, 0x84, 0xf6, 0x4, 0xa5, 0x4, 0xf3, 0x4e, -0x16, 0xea, 0x91, 0x22, 0xd2, 0xeb, 0xd7, 0x82, -0xe3, 0xdb, 0x4e, 0x55, 0x5, 0xd7, 0xfd, 0x74, -0xaa, 0x87, 0xa7, 0x87, 0xb3, 0xf3, 0x9, 0x4b, -0xfe, 0x69, 0x27, 0xa, 0x1a, 0x5e, 0x67, 0xcb, - -0xe9, 0x23, 0xb, 0x62, 0xe3, 0xd9, 0xb7, 0xc4, -0x1c, 0x7a, 0xe9, 0x78, 0x3f, 0x98, 0x25, 0xef, -0x2, 0x2c, 0x2a, 0xa4, 0x71, 0x5, 0xa6, 0xa0, -0x5e, 0x1c, 0x5d, 0x4e, 0x48, 0x97, 0x9b, 0x12, -0x71, 0xe1, 0x2f, 0xf9, 0x14, 0xfd, 0xa4, 0x9d, -0x93, 0xd0, 0x64, 0x93, 0xda, 0xda, 0x8, 0x4, -0x16, 0x9b, 0xbc, 0xa7, 0xd1, 0x2, 0xbf, 0x1f, -0xed, 0x5a, 0x4c, 0x4a, 0x94, 0x29, 0xc, 0x77, -0x8b, 0xcd, 0x10, 0x37, 0xca, 0x92, 0x98, 0x1b, -0x30, 0x2f, 0x83, 0x4d, 0x53, 0x35, 0x29, 0x53, -0x87, 0x90, 0xb9, 0x38, 0x41, 0x68, 0xd0, 0x79, -0xf9, 0xf4, 0xb, 0x2e, 0x76, 0x5e, 0x39, 0xc3, -0x99, 0xa3, 0x91, 0x90, 0xf9, 0x9, 0x85, 0x9, -0x20, 0xca, 0xa1, 0x49, 0xd7, 0xd2, 0xc6, 0x8f, -0xe0, 0x15, 0x61, 0xc, 0xd6, 0xa1, 0x88, 0xdd, -0x49, 0x72, 0xa2, 0x50, 0xd2, 0xf4, 0x71, 0x3, - -0xc4, 0x7e, 0xa4, 0x9b, 0x7c, 0xf2, 0x78, 0x3f, -0x3e, 0xcc, 0x67, 0xda, 0xa9, 0x5e, 0x19, 0x27, -0x48, 0x7b, 0xbd, 0x36, 0xb9, 0xc1, 0x55, 0x34, -0x99, 0xaf, 0xb6, 0xe6, 0x29, 0xc9, 0xcc, 0x62, -0x5a, 0x5f, 0xfd, 0xa0, 0x92, 0xab, 0x61, 0x75, -0x3b, 0x17, 0x2c, 0x9, 0x3a, 0xed, 0xfd, 0x14, -0x35, 0xc0, 0xcb, 0xb9, 0x4d, 0xa2, 0x64, 0x60, -0x7, 0xe, 0x61, 0x78, 0xe1, 0x1a, 0xdd, 0xda, -0x57, 0xe9, 0xff, 0xf2, 0x6c, 0x22, 0x37, 0xa5, -0x3d, 0xfb, 0xb, 0x67, 0x40, 0x34, 0xf1, 0x8e, -0x7, 0xe4, 0x2a, 0xe4, 0x85, 0x5e, 0xa7, 0x9d, -0x9f, 0xed, 0x88, 0xc2, 0xcf, 0x0, 0xed, 0xd3, -0x77, 0x6a, 0xfc, 0x3e, 0x87, 0x56, 0x39, 0xa3, -0xa6, 0x79, 0xa7, 0xf1, 0xad, 0x98, 0x94, 0x86, -0x41, 0x68, 0x4c, 0xc6, 0xf5, 0xc3, 0xeb, 0x80, -0xc5, 0x68, 0x5f, 0x1f, 0x83, 0x20, 0x5c, 0xa3, - -0x45, 0xde, 0xf9, 0x2, 0xcf, 0xe0, 0x57, 0xc8, -0x76, 0x43, 0x75, 0x4e, 0x21, 0xa4, 0x75, 0x42, -0x81, 0xa0, 0x18, 0xe2, 0xee, 0x4, 0xed, 0x88, -0x50, 0xcc, 0xde, 0xd8, 0xa4, 0x58, 0x13, 0xe7, -0x7d, 0x88, 0x54, 0x71, 0x2c, 0x5d, 0x9a, 0xe0, -0x91, 0xf9, 0x83, 0x84, 0x1c, 0x73, 0xff, 0x6a, -0x79, 0x8b, 0x54, 0x25, 0x2f, 0x7f, 0x2f, 0xae, -0x4b, 0x9c, 0x95, 0xc8, 0x88, 0xb1, 0x75, 0xc6, -0xb6, 0xdc, 0xcf, 0x84, 0x91, 0x44, 0xb7, 0x73, -0x22, 0x30, 0x38, 0x49, 0xda, 0x1d, 0xe3, 0x19, -0xdd, 0xf1, 0x32, 0xb6, 0xaf, 0xed, 0x36, 0xde, -0xf2, 0x3e, 0xfb, 0x42, 0x11, 0x8c, 0xdc, 0x3d, -0x8c, 0xd0, 0x71, 0xdc, 0x8a, 0xe3, 0x22, 0xfb, -0xca, 0x87, 0xfb, 0x9c, 0x9a, 0xa1, 0xfb, 0xbb, -0x5b, 0x4b, 0x6b, 0xd0, 0xf5, 0x67, 0x8b, 0xd7, -0x85, 0x43, 0xb2, 0x4f, 0x9d, 0x34, 0x46, 0x23 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/verrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/verrl.inc deleted file mode 100644 index 36c5f922f9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp01/verrl.inc +++ /dev/null @@ -1,151 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -// VerRl - -// gid -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x2A, -// B -0x41, 0x63, 0xfd, 0x06, 0xb8, 0xb1, 0xa6, 0x32, 0xa5, 0xe3, 0xeb, 0xc4, -0x40, 0x11, 0x37, 0xc0, 0x62, 0x0d, 0xe1, 0xca, 0xe9, 0x79, 0xad, 0xff, -0x1d, 0x13, 0xb3, 0xda, 0xa0, 0x10, 0x8a, 0xa8, 0x30, 0x72, 0xa4, 0xe8, -0x27, 0xb5, 0xad, 0xdb, 0xac, 0x89, 0xd8, 0x37, 0x79, 0xd9, 0x8c, 0xd0, -0xb3, 0xef, 0x94, 0x17, 0x4f, 0x05, 0x53, 0x4c, 0x4d, 0xf0, 0x77, 0xf7, -0xb6, 0xaf, 0xb8, 0xfa, -// version -0x00, 0x00, 0x00, 0x00, -// n4 -0x00, 0x00, 0x00, 0x11, -// k's -0xdc, 0x41, 0x24, 0xe7, 0xb8, 0xf2, 0x6d, 0xc4, 0x01, 0xf9, 0x5d, 0xf8, -0xd9, 0x23, 0x32, 0x29, 0x0a, 0xe1, 0xf6, 0xdc, 0xa1, 0xef, 0x52, 0xf7, -0x3a, 0x3c, 0xe6, 0x7e, 0x3d, 0x0e, 0xe8, 0x86, 0xa9, 0x58, 0xf4, 0xfe, -0xfa, 0x8b, 0xe4, 0x1c, 0xad, 0x58, 0x5b, 0x1c, 0xc7, 0x54, 0xee, 0x7e, -0xe7, 0x12, 0x6a, 0x4b, 0x01, 0x63, 0xb4, 0xdb, 0x6e, 0xe7, 0x7a, 0xe9, -0x62, 0xa5, 0xb4, 0xe3, - -0xc3, 0x22, 0x1c, 0x3c, 0x75, 0x2e, 0x7a, 0xe2, 0xc6, 0x86, 0xf7, 0x0b, -0xba, 0x1f, 0x2d, 0xe8, 0xfa, 0xd8, 0x21, 0x59, 0xe1, 0x41, 0xd1, 0xbd, -0x78, 0xfe, 0xcd, 0x10, 0x70, 0xb9, 0xe3, 0x46, 0x9c, 0x62, 0x13, 0x53, -0x93, 0xd5, 0xf0, 0x3f, 0xfe, 0x00, 0x4c, 0x78, 0xc4, 0x4c, 0x24, 0x70, -0x56, 0xde, 0x40, 0x1a, 0x47, 0xea, 0x2b, 0xcc, 0xc7, 0x18, 0xdc, 0xa2, -0x91, 0x97, 0x0c, 0xec, - -0x64, 0x87, 0x4a, 0x72, 0x28, 0x6e, 0x35, 0xa7, 0x38, 0x21, 0x8c, 0x44, -0x74, 0xde, 0x34, 0x2c, 0x64, 0xba, 0x9e, 0xf1, 0x53, 0x09, 0xa8, 0x75, -0x85, 0xcc, 0x29, 0x8c, 0x58, 0x1f, 0xf9, 0xde, 0x2d, 0xab, 0xca, 0xc3, -0x46, 0xf4, 0xb9, 0x21, 0x63, 0x19, 0xbc, 0xf4, 0x1a, 0x18, 0xb3, 0xc5, -0x1e, 0xbc, 0x37, 0xde, 0x99, 0xef, 0xa7, 0x32, 0x2b, 0x4d, 0xb1, 0xe9, -0xe8, 0xb7, 0x8c, 0xff, - -0xdd, 0x77, 0x59, 0x88, 0xd7, 0x91, 0xee, 0x4c, 0x30, 0x8b, 0x8e, 0x81, -0x6f, 0x83, 0x4f, 0x82, 0x76, 0xca, 0xfa, 0xbc, 0x34, 0xa2, 0x48, 0xe4, -0xde, 0x4b, 0x55, 0x18, 0xcc, 0xf6, 0xdd, 0x11, 0x97, 0x6a, 0xf7, 0x3a, -0x25, 0x4c, 0x84, 0x06, 0xd9, 0xc4, 0x58, 0x1d, 0xc5, 0xac, 0xf9, 0x47, -0x33, 0x48, 0x14, 0x61, 0xcb, 0xba, 0x10, 0x83, 0x6b, 0x20, 0xb3, 0x72, -0x8e, 0xee, 0x72, 0x26, - -0x9e, 0x5e, 0xb2, 0x19, 0x23, 0x86, 0x14, 0x5a, 0x5c, 0xb0, 0x0a, 0x41, -0x71, 0x6c, 0x88, 0xde, 0xd1, 0x1c, 0xa5, 0xa4, 0x80, 0xba, 0x41, 0x9c, -0xd3, 0xd8, 0xa6, 0x8f, 0x6f, 0x3e, 0xd8, 0x04, 0x8f, 0x8b, 0x78, 0x13, -0x7b, 0xd4, 0x9d, 0x92, 0xe4, 0xda, 0x0e, 0xfe, 0xa3, 0xd1, 0xda, 0x8f, -0x6a, 0x62, 0x8d, 0x7c, 0x7c, 0x00, 0x33, 0x2e, 0x68, 0xa8, 0x39, 0x3c, -0x86, 0x7b, 0x02, 0x20, - -0x6d, 0x53, 0x62, 0x9e, 0xd3, 0x2a, 0x14, 0x3c, 0xec, 0x3f, 0x2c, 0x22, -0x37, 0xe4, 0xb7, 0xf4, 0x4b, 0x44, 0xad, 0xcb, 0xa4, 0xf0, 0xb6, 0x4a, -0x5a, 0x1c, 0x74, 0x41, 0x7c, 0x57, 0xe5, 0xbc, 0xa9, 0x60, 0xfc, 0xf6, -0x45, 0x53, 0xa1, 0x6f, 0x9f, 0x76, 0xf3, 0x15, 0x00, 0x8f, 0xae, 0xd8, -0xf6, 0x5e, 0x3d, 0x39, 0x85, 0xa2, 0xbe, 0xc2, 0xc0, 0x53, 0xaf, 0xd5, -0xa6, 0x5f, 0x57, 0xf3, - -0x24, 0x4d, 0x10, 0x98, 0xde, 0xbc, 0x37, 0x64, 0x60, 0xf5, 0x9d, 0x92, -0x65, 0x03, 0x36, 0xbb, 0x40, 0x03, 0x64, 0x12, 0x5f, 0xca, 0x63, 0x2d, -0x53, 0xe8, 0xa5, 0xa5, 0x7b, 0x5f, 0x82, 0x76, 0xbb, 0xd6, 0xb2, 0xf8, -0x26, 0xc3, 0x9d, 0xfa, 0x2a, 0xb2, 0x73, 0xe3, 0xab, 0x6c, 0x9e, 0xbd, -0x6a, 0xa4, 0x3c, 0x29, 0x4b, 0x70, 0xf8, 0x22, 0x0d, 0xde, 0x78, 0xe1, -0x05, 0x50, 0x76, 0xba, - -0x08, 0xf1, 0x64, 0xbc, 0x00, 0x43, 0xac, 0x2e, 0x11, 0x46, 0xad, 0xb9, -0x02, 0x48, 0x05, 0xd1, 0xfd, 0x9f, 0x63, 0x65, 0x1c, 0xcc, 0x62, 0x33, -0x12, 0x95, 0xdb, 0xd2, 0xff, 0xd7, 0x0e, 0x8b, 0x64, 0x92, 0xd5, 0x44, -0x3e, 0x30, 0xf8, 0xfc, 0x49, 0xe3, 0x4b, 0x27, 0x82, 0xa8, 0x90, 0x4b, -0xca, 0xa1, 0x0b, 0xfd, 0x1e, 0xe1, 0x9b, 0xad, 0xcc, 0x08, 0x7e, 0x6a, -0x03, 0xef, 0xec, 0x07, - -0x03, 0xf8, 0x09, 0xa5, 0x9e, 0xd3, 0x5e, 0x75, 0x0c, 0x80, 0x8b, 0x13, -0x54, 0xa2, 0x25, 0x05, 0x5a, 0xa8, 0x82, 0xb4, 0xa2, 0x33, 0xc4, 0xb3, -0xb5, 0xf7, 0xa8, 0x78, 0x33, 0x6a, 0xef, 0x50, 0x14, 0xf1, 0x17, 0xff, -0x30, 0x59, 0x87, 0xe4, 0x2c, 0xb7, 0x20, 0x9f, 0x17, 0xb8, 0x7b, 0x32, -0xe1, 0x6a, 0x3c, 0xda, 0x51, 0x09, 0x79, 0x33, 0x0b, 0x8d, 0x9c, 0x11, -0xbe, 0x0c, 0xcb, 0x98, - -0xd7, 0x9f, 0xa6, 0x0b, 0x21, 0xab, 0x8b, 0x56, 0xc1, 0xae, 0xca, 0x76, -0xa9, 0x4e, 0x41, 0xcd, 0x9d, 0xfd, 0xa1, 0x15, 0xc0, 0x3a, 0x51, 0xd7, -0x1d, 0x12, 0x7c, 0x9a, 0xe4, 0x11, 0x0b, 0xee, 0x1f, 0x5f, 0x2b, 0x1c, -0x39, 0xca, 0x6a, 0x87, 0x37, 0xe0, 0xd4, 0xa2, 0xef, 0x05, 0xc1, 0x92, -0xcd, 0x2a, 0x5a, 0x7d, 0x1b, 0xc6, 0xde, 0xf7, 0x57, 0xa2, 0xea, 0x17, -0x63, 0x94, 0x00, 0x81, - -0xd6, 0xf7, 0x2d, 0x50, 0x48, 0x25, 0x69, 0xed, 0x4f, 0x19, 0x42, 0x19, -0x72, 0xcd, 0x57, 0x83, 0xde, 0x1b, 0x3f, 0x46, 0xa6, 0x95, 0x50, 0x60, -0x48, 0xbc, 0xb9, 0xe3, 0xe6, 0x05, 0x08, 0x58, 0xa5, 0x15, 0x80, 0x35, -0xcd, 0x27, 0x2d, 0xd0, 0xc5, 0xe5, 0x29, 0x7f, 0x43, 0x02, 0xc1, 0x0a, -0xe4, 0x47, 0x0e, 0x55, 0x7a, 0xbd, 0x44, 0xb0, 0x31, 0x90, 0x55, 0xa0, -0x38, 0x16, 0x0e, 0x2a, - -0xb5, 0x12, 0xe8, 0x99, 0x4e, 0xaf, 0x15, 0xa7, 0x39, 0xa2, 0xf2, 0x50, -0x88, 0xc4, 0x48, 0x70, 0xb4, 0xf1, 0x54, 0xd0, 0x58, 0xdb, 0x91, 0x43, -0xc1, 0x64, 0x49, 0x0b, 0xc6, 0x06, 0xb6, 0x4a, 0x25, 0x78, 0x9d, 0xa9, -0x8b, 0x4e, 0x1b, 0x33, 0xa9, 0x6f, 0xa3, 0x5c, 0x53, 0xd5, 0xab, 0x0a, -0xf4, 0x49, 0x9d, 0x67, 0xc5, 0x6a, 0x4b, 0x81, 0x84, 0x4d, 0x6c, 0xd8, -0x8f, 0xe4, 0xca, 0x1f, - -0x80, 0xe6, 0x23, 0x82, 0xf5, 0x0c, 0x24, 0x37, 0x4e, 0xd6, 0x2d, 0x29, -0x80, 0x69, 0x8d, 0x04, 0x72, 0x82, 0x7f, 0xe5, 0x81, 0x50, 0xfd, 0x53, -0x7c, 0xc3, 0xd6, 0xc8, 0x80, 0xea, 0x67, 0x76, 0xe4, 0x17, 0x98, 0xac, -0x3c, 0x4a, 0x01, 0x86, 0xb6, 0xb7, 0x07, 0x20, 0x31, 0x0a, 0x4d, 0x08, -0xf0, 0xe0, 0xc0, 0xea, 0xb8, 0x82, 0xfa, 0x91, 0x76, 0x01, 0xe6, 0xe4, -0x45, 0x54, 0xdf, 0x75, - -0x32, 0xdb, 0x43, 0x97, 0x5e, 0x3b, 0x23, 0x42, 0x9d, 0xc7, 0xbc, 0x2a, -0x05, 0x8f, 0xc0, 0xfb, 0x8b, 0xd6, 0xd7, 0x4b, 0xbf, 0x51, 0x34, 0x11, -0xcf, 0xaa, 0x15, 0x6b, 0x0c, 0x4e, 0xf1, 0x05, 0xff, 0x2e, 0x1e, 0x09, -0x4a, 0xa0, 0xfa, 0xf4, 0x59, 0x61, 0x2a, 0x0f, 0x62, 0x09, 0x75, 0x55, -0x87, 0x21, 0x7d, 0xc1, 0x97, 0xef, 0x89, 0x5d, 0xb8, 0x45, 0x63, 0xc6, -0x28, 0x4f, 0x84, 0x22, - -0x42, 0x71, 0xbc, 0xc5, 0x4c, 0xf2, 0x5e, 0xe8, 0x91, 0xda, 0x0c, 0x86, -0xb7, 0x81, 0x66, 0xad, 0xef, 0xcd, 0x89, 0x35, 0xb8, 0xdc, 0x8f, 0x24, -0x38, 0x17, 0x91, 0x65, 0xf4, 0x45, 0x71, 0xf9, 0x89, 0xcf, 0x54, 0x0b, -0x8c, 0x35, 0xa5, 0x74, 0x89, 0x41, 0x9f, 0x1e, 0xc1, 0xef, 0x5d, 0xc3, -0xba, 0x46, 0x27, 0xc3, 0xe6, 0x88, 0x4b, 0xc7, 0xfe, 0x8b, 0x8f, 0x0e, -0x7c, 0xcd, 0xdc, 0xce, - -0x0c, 0x81, 0x66, 0xa5, 0x23, 0xa8, 0x87, 0x81, 0x03, 0x09, 0x36, 0x04, -0x88, 0xd7, 0xbf, 0x33, 0xb5, 0x40, 0x65, 0xf6, 0x65, 0xcc, 0x05, 0x6c, -0xa1, 0x3c, 0xfa, 0x5d, 0x0c, 0x2a, 0x28, 0x53, 0x03, 0xae, 0x59, 0xdd, -0x99, 0x80, 0xb7, 0x81, 0x68, 0xaf, 0xf0, 0xf4, 0xcb, 0xd0, 0xa3, 0xde, -0x7d, 0x1f, 0x5c, 0x53, 0x20, 0x25, 0xe2, 0x0f, 0x08, 0x40, 0xb2, 0xca, -0xc5, 0x81, 0x02, 0xf4, - -0x40, 0xcf, 0x75, 0xb0, 0x18, 0x9c, 0x82, 0x40, 0xea, 0x98, 0x2d, 0x24, -0x97, 0xb3, 0x1a, 0x2d, 0x78, 0x56, 0x2a, 0x21, 0x51, 0x38, 0x19, 0x1a, -0x47, 0x58, 0x16, 0xa9, 0xf8, 0x9c, 0xe9, 0x16, 0xad, 0xa4, 0x9c, 0x11, -0xce, 0xcf, 0x19, 0x8a, 0x37, 0x64, 0xab, 0x81, 0xe9, 0x35, 0x9e, 0x18, -0x3e, 0x06, 0x6f, 0xb8, 0x89, 0xf0, 0x67, 0x75, 0xeb, 0xbc, 0x4e, 0xff, -0x95, 0xea, 0x12, 0x40, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/cmember9/cmpprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/cmember9/cmpprivkey.inc deleted file mode 100644 index 902ee73a63..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/cmember9/cmpprivkey.inc +++ /dev/null @@ -1,36 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 compressed private key - * Group : grpX - * Signer : member9 - */ -//unsigned char cmpprivkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xaf, 0x49, 0xd9, 0xba, 0x72, 0x81, 0xa7, 0x2f, - 0xcc, 0x5a, 0xe3, 0x13, 0xed, 0x5c, 0xf2, 0x5b, - 0xf9, 0x56, 0x23, 0x39, 0x4b, 0xc2, 0xf6, 0x29, - 0xb7, 0x14, 0x61, 0x4c, 0x4e, 0x46, 0x9c, 0x35, - 0xaf, 0x5a, 0x70, 0xdd, 0x2d, 0x06, 0x13, 0x55, - 0xc9, 0x70, 0xb6, 0xa9, 0x90, 0xd6, 0x2f, 0x98, - 0x69, 0x92, 0x82, 0x7c, 0x44, 0x77, 0x81, 0x9e, - 0xe9, 0x35, 0x57, 0x87, 0x5b, 0x3a, 0xd3, 0xbf -//}; -//unsigned int cmpprivkey_dat_len = 80; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/cmember9/mprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/cmember9/mprivkey.inc deleted file mode 100644 index 58db4cdc0e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/cmember9/mprivkey.inc +++ /dev/null @@ -1,44 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : member9 - */ -//unsigned char mprivkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xaf, 0x49, 0xd9, 0xba, 0x72, 0x81, 0xa7, 0x2f, - 0xcc, 0x5a, 0xe3, 0x13, 0xed, 0x5c, 0xf2, 0x5b, - 0xf9, 0x56, 0x23, 0x39, 0x4b, 0xc2, 0xf6, 0x29, - 0xb7, 0x14, 0x61, 0x4c, 0x4e, 0x46, 0x9c, 0x35, - 0xae, 0x8d, 0xc4, 0x20, 0xb1, 0x9a, 0x2f, 0x21, - 0x66, 0xae, 0x93, 0xd9, 0xe3, 0xfb, 0x65, 0xd6, - 0xbf, 0x3c, 0x97, 0x59, 0x43, 0x37, 0x51, 0x5e, - 0x94, 0x9f, 0xb7, 0xcd, 0x49, 0x71, 0xee, 0xef, - 0x92, 0x9c, 0xdc, 0xfc, 0x54, 0x9d, 0xa5, 0x42, - 0x51, 0x5e, 0xec, 0x41, 0x1a, 0x4c, 0xb7, 0xf1, - 0x5f, 0x34, 0x8d, 0x3a, 0x4c, 0x75, 0x0e, 0xc9, - 0x3f, 0xc6, 0x46, 0x08, 0x8d, 0xbb, 0xbf, 0xe1, - 0xc1, 0xb0, 0xb5, 0x16, 0x13, 0xaa, 0x45, 0x66, - 0xaa, 0x57, 0x3f, 0x96, 0x0f, 0x54, 0x62, 0xd9, - 0x90, 0x13, 0x5e, 0x5b, 0xdd, 0x2a, 0xb1, 0xfd, - 0x51, 0xef, 0x85, 0xa9, 0x8b, 0xf8, 0x3d, 0x78 -//}; -//unsigned int mprivkey_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/iprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/iprivkey.inc deleted file mode 100644 index b3adabd4f8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/iprivkey.inc +++ /dev/null @@ -1,31 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 issuing private key - * Group : grpX - */ -//unsigned char iprivkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xb5, 0xd4, 0xfe, 0x09, 0x91, 0x97, 0xd0, 0x9c, - 0x39, 0x20, 0x94, 0x7f, 0xe2, 0x30, 0xbb, 0x5a, - 0xea, 0x00, 0x35, 0xfe, 0x8d, 0x49, 0x3c, 0x86, - 0x56, 0xd8, 0xec, 0x55, 0xc8, 0x86, 0xe5, 0xb5 -//}; -//unsigned int iprivkey_dat_len = 48; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/mprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/mprivkey.inc deleted file mode 100644 index 67f52a093b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/mprivkey.inc +++ /dev/null @@ -1,44 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : member0 - */ -//unsigned char mprivkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x63, 0xd3, 0x48, 0x19, 0x93, 0x92, 0x3d, 0xfc, - 0x78, 0xcc, 0x01, 0x3f, 0x2a, 0x29, 0x73, 0xd8, - 0x1b, 0x9a, 0xbe, 0x70, 0x66, 0x71, 0xfa, 0x47, - 0x66, 0xc5, 0xd4, 0xe5, 0x07, 0xcb, 0xe2, 0x51, - 0x47, 0x4a, 0x06, 0x9a, 0x29, 0xeb, 0x99, 0x0e, - 0x1b, 0x6b, 0x24, 0x88, 0x8f, 0x11, 0x4b, 0x9d, - 0xb4, 0x82, 0xf6, 0x04, 0x79, 0xde, 0x9b, 0xe7, - 0x83, 0x63, 0x27, 0x91, 0x46, 0xa8, 0x52, 0x27, - 0xb2, 0xed, 0xf0, 0x3b, 0x61, 0x78, 0x50, 0x20, - 0x61, 0x97, 0x3f, 0x4d, 0xba, 0x17, 0xfc, 0x50, - 0x65, 0x0a, 0xff, 0xec, 0x64, 0x14, 0xa2, 0x53, - 0xee, 0x2d, 0xff, 0xc9, 0x2d, 0xb3, 0xbe, 0xa0, - 0xc4, 0x80, 0xd8, 0xd9, 0xfa, 0xa9, 0xb6, 0x1a, - 0xa0, 0x24, 0xcc, 0xfa, 0x4f, 0x03, 0x37, 0xe2, - 0xdf, 0xff, 0x35, 0x2e, 0x87, 0xd3, 0x3a, 0x2b, - 0x58, 0x00, 0x54, 0x32, 0x8b, 0xe4, 0x83, 0xb5 -//}; -//unsigned int mprivkey_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg0.inc deleted file mode 100644 index 3b033accc6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha256_bsn0_msg0_dat[] = { - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x81, 0xa5, 0xa5, 0x8f, 0xe6, 0x4e, 0x18, 0x04, - 0x05, 0x46, 0xa1, 0x30, 0x84, 0xde, 0x4f, 0x09, - 0x36, 0x5f, 0x59, 0xbe, 0xc0, 0x4f, 0x4f, 0xbc, - 0xde, 0xd1, 0xd1, 0x11, 0x11, 0x07, 0x7a, 0x2d, - 0x89, 0x9c, 0x1b, 0x21, 0x34, 0xeb, 0x84, 0xc4, - 0x2c, 0x82, 0x63, 0xce, 0x98, 0x30, 0x22, 0xee, - 0x2c, 0xec, 0x90, 0x95, 0x66, 0x94, 0x74, 0xf5, - 0xef, 0xff, 0x74, 0xfa, 0xad, 0x61, 0x6f, 0x59, - 0x15, 0xdb, 0xf7, 0x26, 0xde, 0xc4, 0x1f, 0x31, - 0xe8, 0x4c, 0x11, 0xe6, 0x60, 0xdf, 0xc4, 0xde, - 0xa1, 0x42, 0xbb, 0x55, 0x22, 0x0e, 0xea, 0x5f, - 0xc0, 0xf7, 0x78, 0x8a, 0x15, 0xcd, 0xf4, 0x03, - 0x97, 0x1b, 0x88, 0xd7, 0xcc, 0x86, 0xaf, 0x54, - 0x65, 0xa1, 0x18, 0x10, 0x39, 0x53, 0x95, 0x1f, - 0x93, 0x74, 0x9b, 0xb7, 0x39, 0xc7, 0x9a, 0x81, - 0x72, 0x2b, 0x67, 0x12, 0xe3, 0x42, 0xbc, 0x76, - 0xb6, 0x03, 0xbe, 0xc2, 0x13, 0x7f, 0xb2, 0x86, - 0xc7, 0x20, 0x27, 0xcc, 0x30, 0x1e, 0xa7, 0xf2, - 0xfe, 0x96, 0x5b, 0x85, 0xa6, 0xac, 0xef, 0x41, - 0x1f, 0x12, 0xe7, 0x6f, 0x22, 0xea, 0xf1, 0xac, - 0xb3, 0x48, 0xef, 0xdf, 0x39, 0x11, 0xe3, 0x2f, - 0x16, 0x98, 0x77, 0x4f, 0x6f, 0x71, 0x40, 0x03, - 0xdf, 0xb7, 0xa3, 0x10, 0x08, 0xc7, 0xae, 0x77, - 0x87, 0x3d, 0xd6, 0x8b, 0xc8, 0xd4, 0x00, 0x05, - 0x4f, 0xd3, 0xb2, 0x21, 0x71, 0x28, 0x97, 0x2b, - 0xda, 0x05, 0x07, 0x87, 0x9e, 0x32, 0x24, 0xe7, - 0x0c, 0xa2, 0x37, 0x32, 0xf0, 0xfa, 0xec, 0x07, - 0x5e, 0x5e, 0xec, 0x45, 0xdd, 0xa3, 0x68, 0x4d, - 0x8a, 0x8b, 0xd5, 0xc3, 0x0d, 0x91, 0xd2, 0xc4, - 0x3d, 0x04, 0x24, 0xe9, 0xbc, 0x65, 0xb9, 0xee, - 0x2d, 0x52, 0xf7, 0x97, 0xe5, 0xa0, 0x84, 0x16, - 0x57, 0x53, 0xd5, 0x7b, 0xee, 0xb2, 0xa6, 0x9c, - 0x77, 0xad, 0x9d, 0x73, 0x0b, 0x53, 0xd8, 0x33, - 0x83, 0x8f, 0xb2, 0x7c, 0x2e, 0x4b, 0x12, 0xf2, - 0xbd, 0xbb, 0x7c, 0x25, 0x80, 0xa8, 0x04, 0x24, - 0x39, 0x90, 0x61, 0xdf, 0x72, 0x21, 0x05, 0xd3, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x5b, 0x9f, 0xd9, 0x96, 0x82, 0x57, 0x4c, 0xa7, - 0xd8, 0x66, 0xe6, 0x2f, 0x56, 0x46, 0x7a, 0xa4, - 0xa6, 0x74, 0x28, 0x38, 0xa2, 0x38, 0x28, 0xb3, - 0xb6, 0x5b, 0x95, 0xf5, 0xd6, 0x6c, 0x37, 0xb1, - 0x14, 0x59, 0xf6, 0x42, 0xe9, 0x5c, 0xee, 0x45, - 0x51, 0x5b, 0xe7, 0x3b, 0xd9, 0x0c, 0x44, 0x40, - 0x3a, 0x9b, 0x2d, 0x9a, 0xfb, 0x07, 0xdf, 0xe3, - 0x58, 0xdc, 0x3d, 0x62, 0xc0, 0x7c, 0x8f, 0xa9, - 0x32, 0x48, 0x7d, 0x8f, 0x4d, 0xe0, 0x26, 0x72, - 0xe9, 0x1e, 0xcb, 0x7f, 0x10, 0x93, 0x00, 0xf8, - 0xca, 0x02, 0x3e, 0x21, 0x99, 0xee, 0xae, 0x57, - 0x8d, 0xef, 0xa3, 0x29, 0xef, 0xb7, 0xfc, 0x11, - 0xf5, 0x8b, 0x19, 0xc7, 0xfb, 0x9c, 0xc7, 0xc1, - 0x7e, 0x35, 0x2c, 0x78, 0xd8, 0x15, 0x60, 0xe6, - 0xbf, 0xf5, 0xba, 0x21, 0xeb, 0x60, 0x94, 0x2e, - 0x37, 0xe2, 0xa8, 0x11, 0xab, 0xfd, 0xea, 0x26, - 0xab, 0x82, 0x6c, 0x24, 0x38, 0xbb, 0x56, 0x10, - 0x5b, 0xb9, 0xcb, 0xe7, 0xc2, 0xbe, 0x4c, 0xf7, - 0x43, 0xe8, 0xca, 0xeb, 0x6c, 0x57, 0xcb, 0x01, - 0xb7, 0x54, 0x84, 0x6a, 0x61, 0xe0, 0x37, 0x3a, - 0xe1, 0xfa, 0xae, 0x67, 0x06, 0x81, 0xbe, 0x4c, - 0x2a, 0xc8, 0xf1, 0x17, 0x75, 0xd3, 0xa9, 0x75, - 0xa7, 0xa9, 0x72, 0x6b, 0xe9, 0xd2, 0x32, 0x63, - 0x8b, 0x37, 0xf7, 0x45, 0xa4, 0x43, 0x9c, 0x2d, - 0x12, 0x40, 0x05, 0x9f, 0xe1, 0x97, 0xee, 0xdb, - 0x92, 0x6a, 0x98, 0xe4, 0x66, 0x83, 0xdb, 0x6e, - 0xdf, 0xbe, 0x53, 0x36, 0x68, 0x38, 0xb2, 0x6b, - 0x1c, 0x66, 0xe6, 0xc8, 0xfc, 0x1c, 0x25, 0x39, - 0xbf, 0xd7, 0x0e, 0x4c, 0x2d, 0x36, 0x78, 0xfe, - 0xdf, 0x47, 0x51, 0x19, 0xb1, 0xf2, 0x4b, 0xd8, - 0x55, 0xed, 0xab, 0x3d, 0x2e, 0x4a, 0x18, 0x78, - 0xb1, 0x29, 0x4a, 0xe9, 0xad, 0xab, 0xe8, 0xcf, - 0xa2, 0x8f, 0xf4, 0xc3, 0x70, 0x6b, 0x4d, 0x18, - 0xfa, 0x0d, 0xea, 0x9d, 0xf1, 0x81, 0x51, 0x05, - 0x85, 0x8f, 0x00, 0xb2, 0x6b, 0xfe, 0x64, 0xfe, - 0xbc, 0x65, 0xcd, 0x14, 0xcd, 0x65, 0xe8, 0xc6, - 0xe2, 0x21, 0xb8, 0x95, 0x5e, 0x62, 0xb5, 0x4d, - 0x98, 0x0e, 0x8e, 0xb2, 0xba, 0x9b, 0x07, 0xd4, - 0xa8, 0xb6, 0x01, 0xe4, 0xe6, 0x8f, 0xdc, 0x69, - 0x06, 0xe0, 0x0a, 0x53, 0x94, 0xef, 0x07, 0x05, - 0xb2, 0x33, 0x1d, 0xb4, 0x5a, 0x8f, 0x88, 0x24, - 0xee, 0x28, 0x61, 0x80, 0x58, 0x95, 0xc6, 0x1c, - 0x8d, 0xb3, 0xb1, 0x9c, 0x9c, 0x7a, 0x5e, 0xc6, - 0x75, 0xe1, 0x0a, 0x75, 0xce, 0xb6, 0xb2, 0x60, - 0x7b, 0xf8, 0x48, 0xb9, 0xd3, 0x62, 0x44, 0xa4, - 0x32, 0x00, 0xd7, 0xf5, 0xc9, 0x4e, 0xc4, 0xba, - 0x76, 0xf3, 0x6c, 0x25, 0x55, 0xd0, 0x69, 0x92, - 0x19, 0x10, 0xb5, 0xf6, 0x27, 0x50, 0xaa, 0x99, - 0x61, 0xfe, 0x6e, 0x6b, 0x94, 0xb2, 0x55, 0x69, - 0x9b, 0xd1, 0x93, 0x92, 0xdc, 0x68, 0xe3, 0x26, - 0x6a, 0xc7, 0xf4, 0xdf, 0x50, 0xcb, 0x94, 0x82, - 0x57, 0xe8, 0xc0, 0x50, 0xee, 0x21, 0xd0, 0x11, - 0xcc, 0x17, 0x9a, 0x40, 0xb9, 0x11, 0x54, 0xe9, - 0x20, 0x43, 0x97, 0x33, 0xfb, 0xda, 0x25, 0x67, - 0x94, 0x0d, 0x6e, 0x08, 0x59, 0x54, 0x75, 0xb5, - 0x3c, 0x85, 0x4f, 0xfe, 0x21, 0x1a, 0xc4, 0x74, - 0xdc, 0x1f, 0x3c, 0x1b, 0x6e, 0x8d, 0x66, 0xc2, - 0xdb, 0x6f, 0x02, 0x1a, 0x3d, 0x23, 0xc5, 0x14, - 0xbf, 0x9c, 0xb1, 0x87, 0x3f, 0x14, 0x82, 0x8b, - 0xe2, 0x20, 0x2a, 0x64, 0xe5, 0xb3, 0x1d, 0x2e -//}; -//unsigned int sig_grpx_member0_sha256_bsn0_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg0_rl_singleentry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg0_rl_singleentry.inc deleted file mode 100644 index ba9b3f4470..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg0_rl_singleentry.inc +++ /dev/null @@ -1,95 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha256_bsn0_msg0_dat[] = { - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x81, 0xa5, 0xa5, 0x8f, 0xe6, 0x4e, 0x18, 0x04, - 0x05, 0x46, 0xa1, 0x30, 0x84, 0xde, 0x4f, 0x09, - 0x36, 0x5f, 0x59, 0xbe, 0xc0, 0x4f, 0x4f, 0xbc, - 0xde, 0xd1, 0xd1, 0x11, 0x11, 0x07, 0x7a, 0x2d, - 0x89, 0x9c, 0x1b, 0x21, 0x34, 0xeb, 0x84, 0xc4, - 0x2c, 0x82, 0x63, 0xce, 0x98, 0x30, 0x22, 0xee, - 0x2c, 0xec, 0x90, 0x95, 0x66, 0x94, 0x74, 0xf5, - 0xef, 0xff, 0x74, 0xfa, 0xad, 0x61, 0x6f, 0x59, - 0x15, 0xdb, 0xf7, 0x26, 0xde, 0xc4, 0x1f, 0x31, - 0xe8, 0x4c, 0x11, 0xe6, 0x60, 0xdf, 0xc4, 0xde, - 0xa1, 0x42, 0xbb, 0x55, 0x22, 0x0e, 0xea, 0x5f, - 0xc0, 0xf7, 0x78, 0x8a, 0x15, 0xcd, 0xf4, 0x03, - 0x97, 0x1b, 0x88, 0xd7, 0xcc, 0x86, 0xaf, 0x54, - 0x65, 0xa1, 0x18, 0x10, 0x39, 0x53, 0x95, 0x1f, - 0x93, 0x74, 0x9b, 0xb7, 0x39, 0xc7, 0x9a, 0x81, - 0x72, 0x2b, 0x67, 0x12, 0xe3, 0x42, 0xbc, 0x76, - 0xb6, 0x03, 0xbe, 0xc2, 0x13, 0x7f, 0xb2, 0x86, - 0xc7, 0x20, 0x27, 0xcc, 0x30, 0x1e, 0xa7, 0xf2, - 0xfe, 0x96, 0x5b, 0x85, 0xa6, 0xac, 0xef, 0x41, - 0x1f, 0x12, 0xe7, 0x6f, 0x22, 0xea, 0xf1, 0xac, - 0xb3, 0x48, 0xef, 0xdf, 0x39, 0x11, 0xe3, 0x2f, - 0x16, 0x98, 0x77, 0x4f, 0x6f, 0x71, 0x40, 0x03, - 0xdf, 0xb7, 0xa3, 0x10, 0x08, 0xc7, 0xae, 0x77, - 0x87, 0x3d, 0xd6, 0x8b, 0xc8, 0xd4, 0x00, 0x05, - 0x4f, 0xd3, 0xb2, 0x21, 0x71, 0x28, 0x97, 0x2b, - 0xda, 0x05, 0x07, 0x87, 0x9e, 0x32, 0x24, 0xe7, - 0x0c, 0xa2, 0x37, 0x32, 0xf0, 0xfa, 0xec, 0x07, - 0x5e, 0x5e, 0xec, 0x45, 0xdd, 0xa3, 0x68, 0x4d, - 0x8a, 0x8b, 0xd5, 0xc3, 0x0d, 0x91, 0xd2, 0xc4, - 0x3d, 0x04, 0x24, 0xe9, 0xbc, 0x65, 0xb9, 0xee, - 0x2d, 0x52, 0xf7, 0x97, 0xe5, 0xa0, 0x84, 0x16, - 0x57, 0x53, 0xd5, 0x7b, 0xee, 0xb2, 0xa6, 0x9c, - 0x77, 0xad, 0x9d, 0x73, 0x0b, 0x53, 0xd8, 0x33, - 0x83, 0x8f, 0xb2, 0x7c, 0x2e, 0x4b, 0x12, 0xf2, - 0xbd, 0xbb, 0x7c, 0x25, 0x80, 0xa8, 0x04, 0x24, - 0x39, 0x90, 0x61, 0xdf, 0x72, 0x21, 0x05, 0xd3, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x5b, 0x9f, 0xd9, 0x96, 0x82, 0x57, 0x4c, 0xa7, - 0xd8, 0x66, 0xe6, 0x2f, 0x56, 0x46, 0x7a, 0xa4, - 0xa6, 0x74, 0x28, 0x38, 0xa2, 0x38, 0x28, 0xb3, - 0xb6, 0x5b, 0x95, 0xf5, 0xd6, 0x6c, 0x37, 0xb1, - 0x14, 0x59, 0xf6, 0x42, 0xe9, 0x5c, 0xee, 0x45, - 0x51, 0x5b, 0xe7, 0x3b, 0xd9, 0x0c, 0x44, 0x40, - 0x3a, 0x9b, 0x2d, 0x9a, 0xfb, 0x07, 0xdf, 0xe3, - 0x58, 0xdc, 0x3d, 0x62, 0xc0, 0x7c, 0x8f, 0xa9, - 0x32, 0x48, 0x7d, 0x8f, 0x4d, 0xe0, 0x26, 0x72, - 0xe9, 0x1e, 0xcb, 0x7f, 0x10, 0x93, 0x00, 0xf8, - 0xca, 0x02, 0x3e, 0x21, 0x99, 0xee, 0xae, 0x57, - 0x8d, 0xef, 0xa3, 0x29, 0xef, 0xb7, 0xfc, 0x11, - 0xf5, 0x8b, 0x19, 0xc7, 0xfb, 0x9c, 0xc7, 0xc1, - 0x7e, 0x35, 0x2c, 0x78, 0xd8, 0x15, 0x60, 0xe6, - 0xbf, 0xf5, 0xba, 0x21, 0xeb, 0x60, 0x94, 0x2e, - 0x37, 0xe2, 0xa8, 0x11, 0xab, 0xfd, 0xea, 0x26, - 0xab, 0x82, 0x6c, 0x24, 0x38, 0xbb, 0x56, 0x10, - 0x5b, 0xb9, 0xcb, 0xe7, 0xc2, 0xbe, 0x4c, 0xf7, - 0x43, 0xe8, 0xca, 0xeb, 0x6c, 0x57, 0xcb, 0x01, - 0xb7, 0x54, 0x84, 0x6a, 0x61, 0xe0, 0x37, 0x3a -//}; -//unsigned int sig_grpx_member0_sha256_bsn0_msg0_dat_len = 520; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg1.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg1.inc deleted file mode 100644 index 28a6a45def..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg1.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "msg1" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_sha256_bsn0_msg1_dat[] = { - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x81, 0xa5, 0xa5, 0x8f, 0xe6, 0x4e, 0x18, 0x04, - 0x05, 0x46, 0xa1, 0x30, 0x84, 0xde, 0x4f, 0x09, - 0x36, 0x5f, 0x59, 0xbe, 0xc0, 0x4f, 0x4f, 0xbc, - 0xde, 0xd1, 0xd1, 0x11, 0x11, 0x07, 0x7a, 0x2d, - 0x89, 0x9c, 0x1b, 0x21, 0x34, 0xeb, 0x84, 0xc4, - 0x2c, 0x82, 0x63, 0xce, 0x98, 0x30, 0x22, 0xee, - 0x2c, 0xec, 0x90, 0x95, 0x66, 0x94, 0x74, 0xf5, - 0xef, 0xff, 0x74, 0xfa, 0xad, 0x61, 0x6f, 0x59, - 0x52, 0xbb, 0x68, 0x9d, 0x22, 0x68, 0x8c, 0xc4, - 0x51, 0x27, 0x21, 0x02, 0x87, 0x4a, 0xb0, 0x39, - 0x7e, 0xdc, 0xb8, 0xbb, 0x39, 0x08, 0x76, 0xac, - 0xbb, 0x39, 0xc7, 0x46, 0xed, 0xfa, 0xb2, 0x43, - 0xb2, 0xdb, 0xf9, 0xd5, 0x46, 0x9a, 0xc7, 0x6c, - 0xbd, 0xb3, 0x0b, 0x70, 0x4f, 0xcd, 0xf0, 0x12, - 0x15, 0x5f, 0x42, 0x56, 0x8c, 0xd9, 0x04, 0xef, - 0x67, 0xa0, 0x21, 0xe1, 0x97, 0x99, 0x50, 0x11, - 0x38, 0x67, 0x95, 0x92, 0x63, 0x14, 0xed, 0xa2, - 0x34, 0xdb, 0x2f, 0x70, 0x01, 0x3e, 0xf2, 0x68, - 0x86, 0x44, 0x76, 0x31, 0xd2, 0x82, 0xaa, 0x82, - 0x4f, 0x63, 0x86, 0xdb, 0xed, 0xa4, 0x9c, 0xff, - 0x3d, 0xeb, 0x80, 0xfe, 0x39, 0xf9, 0x27, 0xd0, - 0x27, 0x63, 0x25, 0xb0, 0x3f, 0x27, 0x6d, 0x53, - 0x74, 0xc7, 0x4c, 0xae, 0x75, 0x4e, 0x1c, 0xd0, - 0xb4, 0x0a, 0xd0, 0x15, 0x24, 0x40, 0x87, 0x17, - 0x56, 0x5d, 0xa6, 0xfb, 0x4d, 0x12, 0xc7, 0x2a, - 0x1c, 0x11, 0x5c, 0x81, 0x1d, 0x80, 0x82, 0x01, - 0xa5, 0x9b, 0x2b, 0x8a, 0xe5, 0x1a, 0x77, 0x36, - 0xcb, 0x40, 0xb1, 0xbd, 0x60, 0x1c, 0x92, 0x0c, - 0xbf, 0xa6, 0xe5, 0xd4, 0x2b, 0x26, 0xa9, 0x99, - 0xf4, 0x64, 0x8e, 0x35, 0xaa, 0xab, 0x3f, 0x5f, - 0x8c, 0x35, 0x09, 0xb6, 0x96, 0x09, 0x93, 0x35, - 0xe3, 0x77, 0xfb, 0xb0, 0x2f, 0xa0, 0xd2, 0x69, - 0x8f, 0x13, 0xe1, 0x03, 0x87, 0x4e, 0xdf, 0xdd, - 0x67, 0x14, 0x3b, 0xb0, 0x1e, 0x43, 0xbe, 0x75, - 0x38, 0x1a, 0x06, 0xee, 0xab, 0xa8, 0x67, 0xf2, - 0x67, 0x97, 0x2c, 0x36, 0x24, 0x62, 0x48, 0x61, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x69, 0x60, 0x39, 0xdb, 0xa7, 0x11, 0xf4, 0xa3, - 0xee, 0x42, 0x45, 0xcf, 0x2a, 0x2b, 0xfc, 0xe0, - 0x95, 0x0c, 0x30, 0x14, 0xee, 0x49, 0xdc, 0x75, - 0xf1, 0xcc, 0xeb, 0xec, 0x6e, 0xdc, 0xd2, 0xf3, - 0x89, 0x9f, 0xfc, 0xd3, 0x18, 0xfe, 0xb1, 0x49, - 0x0f, 0x97, 0xea, 0xa1, 0x43, 0xb4, 0xef, 0xac, - 0xd8, 0x5f, 0x29, 0x87, 0x00, 0x7a, 0x81, 0xdc, - 0x89, 0xb1, 0x74, 0x18, 0x93, 0xa0, 0x19, 0x3b, - 0x22, 0x27, 0xe3, 0x8c, 0x3f, 0x09, 0x20, 0x4d, - 0x23, 0x8b, 0xab, 0x97, 0xa3, 0xfa, 0xc5, 0x03, - 0x7e, 0x62, 0xa0, 0xcc, 0x8b, 0x0e, 0x3a, 0x17, - 0xb7, 0x5d, 0xcd, 0x51, 0xf2, 0x52, 0x1a, 0x0f, - 0x6d, 0xb2, 0xd8, 0xf6, 0xc4, 0x2b, 0xbd, 0xcb, - 0xe8, 0x80, 0x6d, 0xe8, 0x29, 0x64, 0xdb, 0xb9, - 0x7f, 0x63, 0xb0, 0x42, 0x12, 0xdd, 0x57, 0x89, - 0x3b, 0x65, 0xee, 0xc0, 0x5a, 0x53, 0x83, 0x81, - 0xf6, 0xe1, 0x96, 0x33, 0xc0, 0x59, 0x7d, 0x65, - 0x20, 0x37, 0xd6, 0xd0, 0xcf, 0xae, 0xbb, 0x00, - 0x19, 0x29, 0xbc, 0x03, 0xe1, 0xb4, 0x97, 0x8a, - 0x00, 0xde, 0xd3, 0xce, 0x52, 0x52, 0xd4, 0x48, - 0x16, 0xed, 0xe6, 0xee, 0x09, 0x83, 0x12, 0xc8, - 0x70, 0xc9, 0x4a, 0x0c, 0x11, 0x3a, 0xa1, 0x2a, - 0x4a, 0xd4, 0xf4, 0x22, 0xa6, 0x6d, 0x3e, 0xb8, - 0x35, 0x6b, 0x1e, 0x75, 0xa0, 0xb4, 0x43, 0xcd, - 0x65, 0xe7, 0x62, 0x17, 0x3d, 0x2e, 0x83, 0xda, - 0x79, 0xea, 0x23, 0x5f, 0xba, 0x73, 0x2c, 0x15, - 0x0b, 0x38, 0x0a, 0x9b, 0x28, 0x66, 0x5f, 0x4e, - 0x2e, 0x0d, 0x41, 0x21, 0x83, 0x4a, 0x8d, 0xa1, - 0x0e, 0xf6, 0xc4, 0xf5, 0x7d, 0x77, 0x65, 0x75, - 0xba, 0xcd, 0xc9, 0x97, 0xc7, 0x45, 0xd1, 0x84, - 0xcb, 0xac, 0xe6, 0x75, 0x60, 0xd0, 0x1f, 0xff, - 0x07, 0xe1, 0x81, 0x50, 0x76, 0x64, 0x62, 0x2a, - 0x82, 0xc3, 0x85, 0x08, 0x0c, 0xe1, 0x96, 0xbd, - 0xf3, 0x92, 0x4d, 0x24, 0x58, 0x0f, 0x02, 0x45, - 0x23, 0x92, 0x6d, 0xab, 0x30, 0x2e, 0x91, 0x7a, - 0xab, 0x99, 0xb6, 0xc8, 0xe4, 0xea, 0x51, 0x84, - 0x54, 0xc7, 0xe3, 0x37, 0x8f, 0x90, 0xd0, 0x71, - 0x4b, 0x34, 0xfc, 0xaf, 0x41, 0xcf, 0x78, 0xe7, - 0x0a, 0xe8, 0x83, 0xf5, 0xa6, 0x5c, 0x6d, 0x83, - 0x24, 0xed, 0x52, 0xb5, 0x0f, 0x65, 0xf8, 0x9c, - 0x3b, 0xa3, 0x15, 0xd6, 0xa5, 0xf4, 0x00, 0xd4, - 0xf4, 0xdb, 0x43, 0xc2, 0x02, 0x40, 0x14, 0x75, - 0x13, 0x7e, 0xdb, 0xc5, 0xf2, 0x9c, 0xea, 0x44, - 0x9b, 0x0a, 0x56, 0xfd, 0x97, 0xa5, 0xc5, 0x14, - 0xc4, 0xe2, 0x0d, 0x79, 0xe3, 0xd3, 0x7a, 0x64, - 0x83, 0x7c, 0x82, 0xba, 0x94, 0x0e, 0xba, 0xef, - 0x9a, 0x8a, 0x87, 0xf7, 0x8b, 0x53, 0x62, 0xae, - 0xa4, 0x9f, 0xff, 0xe4, 0xdf, 0x30, 0x71, 0x8f, - 0x72, 0x3d, 0xd1, 0xfa, 0xff, 0x5f, 0x8f, 0x13, - 0x8f, 0xf8, 0x65, 0xe9, 0xa2, 0xd9, 0x07, 0x2a, - 0x5b, 0x87, 0x2b, 0x3c, 0x43, 0x33, 0xdd, 0xf6, - 0x95, 0x0d, 0x43, 0x77, 0xc6, 0x65, 0x74, 0xe4, - 0xbc, 0xcf, 0x6a, 0x88, 0xcc, 0xda, 0x16, 0xe0, - 0xd7, 0xab, 0xe7, 0x46, 0xbe, 0x08, 0x0f, 0x6a, - 0x4b, 0x8d, 0xa3, 0xf4, 0xee, 0xc5, 0x83, 0xff, - 0x98, 0xee, 0x19, 0x2c, 0x7b, 0x81, 0xd4, 0x2e, - 0xb8, 0x04, 0x3c, 0x4f, 0xdb, 0xc7, 0x9c, 0x9c, - 0x8e, 0x2f, 0x77, 0x86, 0x6e, 0x7c, 0xbe, 0xc6, - 0x5e, 0x70, 0xc1, 0x4b, 0x0b, 0x2d, 0x07, 0x2a, - 0xa1, 0xfd, 0x63, 0x2d, 0xc5, 0x4c, 0x63, 0x36 -//}; -//unsigned int sig_sha256_bsn0_msg1_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn1_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn1_msg0.inc deleted file mode 100644 index fd1131e6d1..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn1_msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn1" - * SigRl : group x sigrl - */ -//unsigned char sig_sha256_bsn1_msg0_dat[] = { - 0x4b, 0xb3, 0x62, 0x6c, 0xa5, 0x12, 0xaa, 0x7a, - 0x22, 0x7f, 0xde, 0xf0, 0x8f, 0x1e, 0x3c, 0xc8, - 0xda, 0x5f, 0x2f, 0x6d, 0x3b, 0xd0, 0x42, 0xec, - 0x62, 0xbf, 0x3c, 0x0f, 0xae, 0xd4, 0xf9, 0xa0, - 0x56, 0xc9, 0xd5, 0x33, 0xaa, 0x60, 0xab, 0x86, - 0x15, 0x48, 0xc2, 0xbb, 0xda, 0x3f, 0x37, 0x71, - 0x3e, 0xf2, 0xd5, 0x3c, 0xd3, 0xb9, 0x08, 0xa0, - 0x63, 0x26, 0x6e, 0x26, 0xca, 0x93, 0xc1, 0xe1, - 0x03, 0x2e, 0xff, 0xad, 0xc8, 0xb1, 0x8f, 0x26, - 0x16, 0x61, 0x4f, 0x33, 0x19, 0x45, 0xb8, 0x0c, - 0xb3, 0x0e, 0x19, 0x98, 0xfc, 0x32, 0x83, 0xc2, - 0x58, 0x60, 0x12, 0x5c, 0xc6, 0xa8, 0x36, 0xc2, - 0xf6, 0xd4, 0x99, 0xb2, 0x44, 0x19, 0xef, 0xf0, - 0x75, 0x76, 0x6e, 0x63, 0xc4, 0x3f, 0x21, 0x5d, - 0x47, 0xa4, 0xf6, 0x90, 0x16, 0xa6, 0x18, 0xa4, - 0xe7, 0xc6, 0xff, 0x47, 0xb9, 0x9d, 0x99, 0x8a, - 0x12, 0x4d, 0xb7, 0xe4, 0xf1, 0x42, 0x1d, 0x8b, - 0x0f, 0x71, 0xac, 0xc7, 0xd4, 0xe0, 0x46, 0x7e, - 0x71, 0x36, 0x6c, 0x10, 0xa5, 0x93, 0xdc, 0x17, - 0xb6, 0x40, 0x7d, 0xa4, 0x8a, 0xf7, 0xf1, 0x9d, - 0x48, 0x41, 0xd3, 0xd1, 0x01, 0xbe, 0x28, 0xdf, - 0x50, 0x56, 0x1e, 0xf2, 0x0d, 0x47, 0x4e, 0x8d, - 0x11, 0x57, 0xe1, 0x5f, 0x41, 0xb2, 0x8e, 0x05, - 0xa2, 0xac, 0xb9, 0x05, 0x5a, 0xc4, 0x71, 0xb8, - 0x8a, 0xf2, 0xf1, 0xb0, 0x9e, 0x5e, 0xcf, 0xa9, - 0x83, 0xb4, 0x57, 0x1d, 0xe9, 0x6c, 0xda, 0xf5, - 0x3c, 0x90, 0xc0, 0x0e, 0xc2, 0xc3, 0x60, 0xd7, - 0x19, 0x61, 0xf7, 0x9b, 0x95, 0x3d, 0x16, 0xed, - 0x01, 0x60, 0xd0, 0xe2, 0x3b, 0x83, 0xd9, 0x3b, - 0xda, 0xe7, 0x8a, 0x4b, 0xdd, 0xfa, 0xcd, 0x4e, - 0xbf, 0xd1, 0x70, 0x57, 0xd0, 0x63, 0x56, 0xee, - 0xea, 0x76, 0x33, 0x59, 0xcc, 0xfb, 0x25, 0xc7, - 0x20, 0x9d, 0x74, 0x8f, 0x13, 0x68, 0xdb, 0x64, - 0x02, 0x20, 0x5b, 0x3a, 0xd2, 0x59, 0x78, 0xd4, - 0xf3, 0x53, 0x43, 0x9f, 0xcc, 0x3f, 0x4d, 0x9a, - 0x23, 0x2d, 0xdb, 0x71, 0xda, 0x25, 0x94, 0x0c, - 0xaa, 0xd9, 0x9a, 0x6a, 0x1c, 0x5d, 0xd1, 0xfe, - 0xf5, 0x19, 0xf7, 0x03, 0xe7, 0x74, 0x1b, 0x6f, - 0x37, 0x93, 0x3a, 0xc4, 0x4e, 0xdb, 0x72, 0xfb, - 0xfc, 0x81, 0xcc, 0xf9, 0x0e, 0x27, 0x55, 0x0d, - 0xb5, 0x48, 0xe9, 0xb7, 0x26, 0xa7, 0xf4, 0x2a, - 0x74, 0x93, 0xb8, 0x0d, 0x2b, 0xf8, 0x48, 0x18, - 0xde, 0x13, 0x7b, 0x5a, 0x33, 0xda, 0x46, 0x5b, - 0x10, 0xce, 0xe9, 0x94, 0x98, 0x97, 0xaf, 0x67, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xa2, 0xa8, 0xe1, 0x74, 0xe4, 0x4e, 0x10, 0xcc, - 0xbe, 0x17, 0x43, 0xb0, 0x5f, 0xd5, 0x66, 0x1c, - 0xbe, 0xf8, 0xfe, 0x35, 0xa0, 0x99, 0x9b, 0x24, - 0x16, 0x73, 0xd3, 0xcb, 0x31, 0x96, 0x2f, 0xab, - 0xd1, 0x7c, 0xdb, 0xf9, 0x82, 0xfc, 0xd5, 0x38, - 0x2d, 0x76, 0x3e, 0x9a, 0x13, 0x39, 0x63, 0x71, - 0xe8, 0x1a, 0xea, 0x20, 0xbf, 0xcb, 0x81, 0x4d, - 0xe7, 0xc6, 0xb9, 0xbb, 0x9f, 0x9e, 0x97, 0x93, - 0xc9, 0xe3, 0x6a, 0xca, 0xc0, 0x3b, 0xd6, 0x23, - 0xb3, 0x66, 0xf5, 0x6a, 0x02, 0x63, 0x46, 0xbf, - 0xa0, 0xbd, 0x94, 0x92, 0x59, 0x2b, 0x06, 0x71, - 0xb7, 0xcc, 0x00, 0xc0, 0xb1, 0x12, 0x21, 0x34, - 0xb7, 0xdb, 0x08, 0x1e, 0x57, 0x12, 0x72, 0x5b, - 0x9c, 0xee, 0x22, 0x73, 0x7a, 0xf8, 0x75, 0x31, - 0x2f, 0xa3, 0x1f, 0xea, 0x3d, 0x45, 0x3e, 0xfd, - 0xf6, 0x13, 0xcf, 0xa9, 0x16, 0xc6, 0xe5, 0xb7, - 0x7c, 0xf7, 0x87, 0x95, 0x6a, 0xc7, 0xc9, 0x79, - 0x09, 0x17, 0x9e, 0xe6, 0xb1, 0x8f, 0x96, 0x14, - 0x86, 0xc6, 0xa2, 0xbe, 0xb0, 0x4a, 0x54, 0x65, - 0xb3, 0x80, 0xef, 0xf5, 0xc0, 0x40, 0xa3, 0xde, - 0x6b, 0x31, 0xaa, 0x49, 0x21, 0xfa, 0x0c, 0x83, - 0x54, 0xdf, 0xe3, 0x17, 0xf1, 0x2a, 0xa4, 0x73, - 0x6d, 0x1f, 0x97, 0xcb, 0x23, 0x29, 0x1d, 0x7e, - 0xf3, 0x9f, 0x7b, 0xcc, 0x3c, 0x48, 0xc1, 0x18, - 0xe3, 0x07, 0xb6, 0x7d, 0x32, 0x32, 0xce, 0xfa, - 0x8d, 0x9d, 0xba, 0x42, 0x4a, 0x45, 0xe6, 0x7b, - 0x02, 0x7c, 0x53, 0x7d, 0x21, 0x8e, 0x6f, 0x35, - 0x4f, 0xb2, 0x1b, 0xe2, 0x2d, 0xdb, 0x9c, 0xef, - 0x3e, 0x58, 0x58, 0x8d, 0x11, 0xc2, 0xec, 0xfa, - 0x99, 0x13, 0x86, 0x1a, 0xe6, 0x14, 0x95, 0x70, - 0x4d, 0xf4, 0xe4, 0x7f, 0xde, 0x95, 0x29, 0xcf, - 0x93, 0x4c, 0xac, 0x79, 0x99, 0xcf, 0xbe, 0x1f, - 0x1c, 0x4b, 0x29, 0x29, 0x24, 0xf6, 0xbe, 0x9f, - 0xf2, 0x0f, 0x67, 0xae, 0x4d, 0x0d, 0xe3, 0x17, - 0x79, 0xcf, 0x65, 0xfd, 0x6f, 0x12, 0x64, 0xc6, - 0x9e, 0x2d, 0xcc, 0x3b, 0x2c, 0x94, 0x42, 0x63, - 0x86, 0x06, 0x00, 0xa7, 0x37, 0x06, 0x92, 0x15, - 0x02, 0xc6, 0x34, 0xeb, 0xa6, 0x17, 0xfe, 0x90, - 0x0d, 0xd1, 0x85, 0x5c, 0x77, 0x3a, 0x2b, 0x96, - 0xf1, 0x21, 0x07, 0xb5, 0x7c, 0x38, 0xb1, 0x4d, - 0x02, 0x43, 0xa9, 0x11, 0x65, 0x4d, 0x34, 0x64, - 0x72, 0x6a, 0x41, 0xb3, 0x8f, 0xf5, 0x2c, 0x9c, - 0xec, 0x3b, 0x48, 0xd0, 0xd5, 0xa9, 0x37, 0xf5, - 0x1f, 0x3e, 0x54, 0x62, 0xde, 0xed, 0x9e, 0x8a, - 0x0e, 0x22, 0x36, 0x2c, 0xc8, 0x2c, 0xf5, 0xc0, - 0xf6, 0xc9, 0x08, 0x73, 0x4a, 0xaf, 0x83, 0x8f, - 0xd6, 0x17, 0xe9, 0xf3, 0x01, 0xe3, 0xa3, 0x55, - 0xfd, 0x2d, 0x9d, 0xa7, 0x04, 0xa8, 0x09, 0x23, - 0xc0, 0x22, 0x74, 0x8e, 0xd4, 0xd4, 0x78, 0x75, - 0x6f, 0x33, 0xe8, 0xb9, 0xd7, 0x3c, 0x72, 0xb5, - 0x73, 0x78, 0x60, 0x4b, 0xcf, 0x2e, 0x22, 0x60, - 0x28, 0xa1, 0x8e, 0xcc, 0x1d, 0x20, 0xfa, 0x32, - 0x16, 0xce, 0x2b, 0x90, 0x62, 0xf3, 0x4d, 0x52, - 0x26, 0x05, 0x7d, 0xad, 0x07, 0x6d, 0x21, 0x55, - 0x34, 0x24, 0x21, 0xb2, 0x79, 0x14, 0x1c, 0x64, - 0x16, 0x1c, 0x14, 0x8b, 0x19, 0xf7, 0x03, 0x87, - 0xde, 0xe1, 0xdf, 0x9b, 0xa9, 0x86, 0x79, 0xdf, - 0x0f, 0x99, 0x09, 0x93, 0x96, 0x15, 0x79, 0x27, - 0x40, 0x53, 0x06, 0x73, 0x59, 0x19, 0x8d, 0x4f, - 0xd0, 0x09, 0xd3, 0x09, 0x23, 0x4f, 0x12, 0xec -//}; -//unsigned int sig_sha256_bsn1_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_rndbase_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_rndbase_msg0.inc deleted file mode 100644 index 824f0ef856..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_rndbase_msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: None (random base) - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha256_rndbase_msg0_dat[] = { - 0x69, 0x77, 0x85, 0xee, 0xf5, 0x5f, 0x69, 0xd7, - 0x6f, 0x22, 0x49, 0x4f, 0xbb, 0x83, 0x73, 0x2e, - 0x91, 0xf1, 0x94, 0x48, 0x1b, 0x06, 0x4a, 0xf7, - 0x90, 0x07, 0x07, 0x2e, 0xb5, 0x65, 0xc8, 0xed, - 0x3e, 0x48, 0xb8, 0xc1, 0x7e, 0x20, 0x79, 0xd3, - 0xe0, 0x49, 0x3f, 0x10, 0x40, 0x41, 0x39, 0x59, - 0xa6, 0xfe, 0xe7, 0xcf, 0x21, 0x29, 0x37, 0x1b, - 0xef, 0xc0, 0xf0, 0x37, 0x49, 0x75, 0x6d, 0x66, - 0x4f, 0x31, 0x71, 0x23, 0x0e, 0x3a, 0x03, 0x00, - 0x9e, 0xcd, 0xc4, 0x70, 0xaa, 0x97, 0x02, 0xf7, - 0x1c, 0x49, 0x45, 0xac, 0xd9, 0xe7, 0x46, 0x20, - 0x36, 0xe8, 0x23, 0x57, 0xee, 0x5e, 0x6b, 0x6d, - 0x1a, 0xf4, 0x04, 0x1d, 0xd5, 0xb0, 0x81, 0x0c, - 0xe4, 0xd6, 0x01, 0x39, 0x35, 0xe2, 0x38, 0xb9, - 0xea, 0xc1, 0x35, 0xc0, 0x91, 0x39, 0x0e, 0xe6, - 0x6a, 0x45, 0x5e, 0xe1, 0x06, 0xa3, 0x5b, 0x09, - 0x6a, 0xd8, 0xe4, 0x61, 0x35, 0x72, 0x8d, 0x22, - 0x53, 0xd0, 0x96, 0xc3, 0xd9, 0x32, 0x21, 0x87, - 0x6f, 0xaa, 0x41, 0x4f, 0x90, 0x75, 0x01, 0x57, - 0x2a, 0xab, 0x38, 0xc7, 0x5d, 0xd5, 0xdd, 0x6b, - 0xfb, 0xde, 0xd8, 0x25, 0xa4, 0x14, 0x7f, 0x87, - 0x55, 0x78, 0x4b, 0xf5, 0x87, 0x15, 0x1d, 0xdb, - 0x59, 0xc1, 0xb4, 0x92, 0x52, 0x06, 0xfb, 0x96, - 0x9a, 0xf2, 0x05, 0x9e, 0xa7, 0x57, 0xf2, 0xa5, - 0xcf, 0xe8, 0x5e, 0x61, 0x59, 0xd0, 0x81, 0xab, - 0x97, 0xdd, 0x5c, 0x90, 0x1c, 0x21, 0x5b, 0x48, - 0x5d, 0x93, 0x71, 0x98, 0x46, 0x6b, 0x2c, 0x8b, - 0xa3, 0xce, 0x5a, 0xed, 0x8e, 0x76, 0x92, 0x75, - 0x5b, 0x9b, 0x09, 0x5a, 0x9a, 0x06, 0xde, 0xc5, - 0x33, 0x73, 0xc5, 0xdb, 0x14, 0x5b, 0x82, 0x8b, - 0xd2, 0xdd, 0xf1, 0x1d, 0xc8, 0x1a, 0x6b, 0x16, - 0xba, 0x19, 0xa4, 0x0d, 0xaa, 0x11, 0xb7, 0x2c, - 0x88, 0x8d, 0xde, 0x94, 0x6a, 0x3d, 0xbf, 0x52, - 0x95, 0x10, 0xad, 0xa5, 0x2b, 0x9d, 0xd3, 0xc3, - 0x07, 0x60, 0x4e, 0x37, 0xed, 0x0f, 0xb5, 0xeb, - 0xd1, 0xda, 0x8a, 0xec, 0x54, 0xbd, 0xad, 0xbf, - 0x88, 0xaf, 0xca, 0x23, 0xdf, 0xd5, 0x84, 0xc4, - 0xa5, 0x21, 0x3f, 0x53, 0x8b, 0xe9, 0x3c, 0xbe, - 0x2c, 0xf6, 0xa5, 0x27, 0xe2, 0x18, 0x16, 0xe4, - 0x9f, 0xfb, 0xe3, 0x17, 0x58, 0x6e, 0xc6, 0x87, - 0x5e, 0x2a, 0x33, 0xcd, 0x02, 0xa3, 0x94, 0x2a, - 0x8f, 0x09, 0x6d, 0x6b, 0x0a, 0x4e, 0x62, 0x29, - 0xe9, 0x40, 0xf2, 0xba, 0xfc, 0x6b, 0x7d, 0x96, - 0x3f, 0x7e, 0x86, 0x19, 0x5d, 0x5f, 0xb4, 0xdd, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x9a, 0x32, 0x23, 0x75, 0xc3, 0x6c, 0x8a, 0x37, - 0xc0, 0xf2, 0x2a, 0xd6, 0x8e, 0xbc, 0x91, 0x68, - 0xf9, 0xd5, 0xc2, 0x85, 0x26, 0x61, 0x9c, 0xed, - 0x01, 0xcd, 0x5b, 0xd9, 0xa0, 0xc0, 0x75, 0xa8, - 0x36, 0x7c, 0xc3, 0x2f, 0x57, 0x3c, 0x46, 0xc5, - 0x57, 0x6a, 0x0b, 0x96, 0xe5, 0x6b, 0x3d, 0x45, - 0x10, 0xe1, 0x4f, 0xd1, 0x11, 0xa9, 0x3b, 0xe1, - 0x34, 0xbb, 0x30, 0xbc, 0x6b, 0x86, 0x2c, 0x01, - 0x35, 0x38, 0x26, 0x75, 0x15, 0x9f, 0x35, 0x7a, - 0xb7, 0x47, 0xe0, 0x72, 0xa4, 0x42, 0x90, 0x00, - 0x86, 0xea, 0xdf, 0xc1, 0x19, 0xee, 0x9d, 0x44, - 0xe4, 0x2c, 0x4a, 0x33, 0xea, 0x5c, 0x8c, 0x1e, - 0xc3, 0x93, 0x1b, 0x51, 0x00, 0x5f, 0x71, 0xb6, - 0xc5, 0xb0, 0x94, 0x9c, 0x45, 0x1f, 0xef, 0x1d, - 0x1f, 0xd6, 0x1b, 0xb9, 0xa4, 0xcf, 0xe6, 0xf1, - 0x48, 0xcd, 0xbe, 0x78, 0xb1, 0xf7, 0x0c, 0x01, - 0xd7, 0x64, 0xc7, 0xeb, 0x23, 0x20, 0x21, 0x49, - 0xfb, 0x71, 0xf3, 0xc3, 0x63, 0x94, 0x9c, 0x91, - 0x2f, 0xd6, 0xbe, 0x79, 0x43, 0x83, 0x14, 0x17, - 0xe4, 0x2a, 0x8c, 0xac, 0x02, 0x68, 0xec, 0x71, - 0x88, 0xc5, 0xfa, 0xb8, 0x98, 0x0e, 0xd7, 0x19, - 0x1d, 0x1a, 0x3d, 0x86, 0x2c, 0xb4, 0xc3, 0x03, - 0x7b, 0x2a, 0xa7, 0xb5, 0x69, 0x73, 0x0e, 0x0e, - 0xe0, 0x67, 0x04, 0xc1, 0x71, 0xa9, 0x29, 0x46, - 0x71, 0x96, 0x4f, 0x64, 0x27, 0xac, 0x7a, 0x10, - 0x70, 0xc5, 0x5f, 0x5b, 0xca, 0x3e, 0xb3, 0xcc, - 0x9a, 0xe9, 0xa5, 0x03, 0x7b, 0x93, 0x2b, 0x77, - 0xdd, 0xd5, 0xc2, 0x0a, 0x78, 0xef, 0x7c, 0x3a, - 0xea, 0x6e, 0xa4, 0xf7, 0x65, 0x50, 0x01, 0xdd, - 0x0e, 0x60, 0xef, 0x40, 0xb2, 0x28, 0xdc, 0xa9, - 0x7f, 0x1a, 0x98, 0x3d, 0x8d, 0xd4, 0xa0, 0xd6, - 0xec, 0xe3, 0x2f, 0x1e, 0x48, 0xa6, 0x88, 0x8f, - 0xe4, 0x25, 0xdc, 0xdf, 0xd5, 0xfa, 0x6d, 0x16, - 0x94, 0xbb, 0xf7, 0xe0, 0x4f, 0x6b, 0xb7, 0x49, - 0x5c, 0x89, 0xde, 0x9f, 0xeb, 0x7b, 0xad, 0xda, - 0x57, 0x5e, 0xae, 0xa5, 0xd6, 0xfd, 0xa4, 0x20, - 0x07, 0x12, 0x12, 0x73, 0x56, 0x6d, 0xb8, 0x65, - 0x41, 0x7a, 0xdb, 0xc6, 0x25, 0x19, 0xea, 0x1c, - 0x83, 0x4c, 0x48, 0x77, 0x92, 0x14, 0x97, 0xe5, - 0x3c, 0x90, 0x4d, 0x5a, 0xb0, 0x7a, 0xab, 0xc5, - 0xa4, 0xdc, 0x52, 0x24, 0x75, 0xe1, 0x8f, 0x8e, - 0x53, 0x39, 0x1e, 0x2d, 0x95, 0x2d, 0xd3, 0xa4, - 0x01, 0x6a, 0x9f, 0x85, 0x5b, 0xd2, 0xe5, 0xa9, - 0x56, 0x0e, 0xdf, 0x89, 0x6e, 0xaa, 0x0a, 0x68, - 0x9c, 0x47, 0x94, 0x0d, 0xb7, 0xeb, 0x8b, 0x2e, - 0xdb, 0x8d, 0x99, 0xf5, 0x7b, 0x34, 0xc1, 0x19, - 0xd6, 0xf3, 0x42, 0x8a, 0xba, 0x50, 0xe1, 0xb1, - 0x26, 0xf6, 0x8a, 0x21, 0x24, 0xa4, 0xe3, 0xb5, - 0x93, 0x84, 0xed, 0x41, 0x74, 0x8a, 0x39, 0x6a, - 0xf9, 0xb9, 0x25, 0x2e, 0x71, 0x8e, 0x37, 0x6a, - 0x17, 0x8a, 0x3b, 0x91, 0x4e, 0x3f, 0x93, 0x10, - 0x6e, 0xe9, 0xa9, 0xde, 0x10, 0x87, 0x3b, 0xbb, - 0x8c, 0x80, 0xc8, 0xd0, 0x23, 0x01, 0xfc, 0x46, - 0x38, 0x39, 0x6c, 0xf9, 0x3b, 0xff, 0x4b, 0xbf, - 0xd8, 0xee, 0xf1, 0xf7, 0x5a, 0x71, 0x6c, 0x17, - 0xd9, 0x7b, 0x0e, 0x5d, 0x14, 0x02, 0x6b, 0xd9, - 0x2d, 0x6d, 0xe2, 0xb4, 0xc8, 0xa2, 0xc1, 0xad, - 0x1c, 0x5f, 0x27, 0x0e, 0xd1, 0xd7, 0xf4, 0xa0, - 0xd6, 0x54, 0xc2, 0x94, 0x02, 0x50, 0xe1, 0xdc, - 0x82, 0xf2, 0x33, 0x2e, 0x46, 0xf2, 0x80, 0x83 -//}; -//unsigned int sig_grpx_member0_sha256_rndbase_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_rndbase_msg1.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_rndbase_msg1.inc deleted file mode 100644 index 27de6e3ed1..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha256_rndbase_msg1.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha256 - * Message : "msg1" - * Basename: None (random base) - * SigRl : group x sigrl - */ -//unsigned char sig_sha256_rndbase_msg1_dat[] = { - 0xfc, 0x15, 0xdf, 0x05, 0x15, 0xad, 0xda, 0xbe, - 0x91, 0x78, 0xba, 0x72, 0x1f, 0x32, 0xd0, 0x5d, - 0xcb, 0x08, 0xbd, 0x8f, 0x37, 0xa8, 0x6b, 0xfe, - 0x58, 0x5f, 0xe4, 0x66, 0xb9, 0xbc, 0x2d, 0x68, - 0x21, 0xa2, 0xa7, 0x4b, 0x37, 0x50, 0x56, 0x1f, - 0xae, 0x20, 0xf0, 0x33, 0x29, 0xd0, 0xec, 0x64, - 0xde, 0xd5, 0xf4, 0x08, 0x75, 0xa1, 0xf1, 0x73, - 0xea, 0x20, 0x1e, 0x4e, 0x9d, 0x7f, 0x26, 0xdb, - 0x19, 0xb7, 0x3e, 0xe9, 0x16, 0x76, 0xc8, 0x24, - 0x89, 0x08, 0x03, 0xfd, 0xad, 0x7f, 0x9e, 0x88, - 0x5f, 0x4a, 0x99, 0x0c, 0xcf, 0x60, 0x9b, 0xaf, - 0x14, 0xcc, 0x1f, 0xc8, 0x0e, 0x5a, 0xe6, 0x97, - 0x13, 0xbf, 0x26, 0x98, 0x64, 0xd8, 0xc7, 0x7e, - 0xba, 0x94, 0x6b, 0x85, 0x7d, 0xda, 0xc6, 0x2f, - 0x37, 0x21, 0xd7, 0xc8, 0x57, 0xa4, 0xff, 0x43, - 0x66, 0xd0, 0xf1, 0x9f, 0x2c, 0xc3, 0xda, 0x28, - 0x9d, 0x1d, 0x29, 0x02, 0xd0, 0x2e, 0xf9, 0x3a, - 0xa6, 0xb2, 0x24, 0x60, 0x9c, 0x6f, 0x71, 0x90, - 0xc4, 0x32, 0x71, 0x24, 0xfb, 0xec, 0xbe, 0xca, - 0x66, 0x44, 0x12, 0x4f, 0x39, 0x5f, 0x1e, 0xbe, - 0x55, 0xb1, 0x33, 0xff, 0x1a, 0xf9, 0x73, 0xfc, - 0x57, 0xfe, 0x0d, 0x6e, 0xd5, 0x55, 0x22, 0xc2, - 0x02, 0x41, 0x10, 0x11, 0x77, 0xb7, 0x12, 0x67, - 0xc6, 0xc9, 0x24, 0x89, 0x4b, 0x4c, 0x55, 0xf0, - 0xa1, 0xfb, 0x06, 0xb6, 0x35, 0x52, 0xbd, 0x06, - 0xb9, 0x6a, 0xc3, 0x8d, 0xd9, 0x8f, 0x03, 0x35, - 0x49, 0x78, 0x93, 0xdc, 0xef, 0xd8, 0xf1, 0xdf, - 0x82, 0x7f, 0x72, 0xf8, 0x61, 0x43, 0x09, 0xef, - 0xa2, 0x85, 0x88, 0x12, 0xb8, 0x71, 0x39, 0x27, - 0x46, 0xa0, 0x6a, 0x9a, 0x07, 0x12, 0x76, 0xd8, - 0x3b, 0x38, 0x65, 0xc0, 0x11, 0x46, 0x14, 0xd4, - 0x00, 0x90, 0x69, 0x3b, 0x66, 0xbe, 0xcb, 0xcc, - 0x61, 0x71, 0x4a, 0xc7, 0x03, 0xfc, 0x35, 0xcd, - 0x77, 0x89, 0xea, 0xdd, 0x30, 0x1f, 0x40, 0xa8, - 0xea, 0xd2, 0x12, 0x22, 0x51, 0xbd, 0x49, 0xa4, - 0x52, 0x80, 0x3e, 0xa2, 0xa5, 0x8e, 0xea, 0xd0, - 0xec, 0x43, 0x3e, 0xa8, 0x23, 0x5e, 0xac, 0x5c, - 0x0f, 0x6b, 0x34, 0xbd, 0x76, 0x77, 0x5a, 0x2d, - 0x78, 0x3e, 0x42, 0x11, 0xfc, 0x96, 0x8b, 0xe2, - 0x35, 0x87, 0x00, 0x93, 0x34, 0xf2, 0xf0, 0xb0, - 0x03, 0xba, 0x82, 0x0a, 0x38, 0x5b, 0xa6, 0xe9, - 0xaa, 0xf3, 0x8f, 0xb3, 0x66, 0xb5, 0x84, 0x80, - 0x40, 0x2f, 0xac, 0x3b, 0xcf, 0x49, 0x38, 0x17, - 0xde, 0x0f, 0xce, 0x57, 0x07, 0x2b, 0xb8, 0xd1, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x33, 0x99, 0x88, 0x92, 0x66, 0x39, 0xe7, 0x42, - 0xc8, 0x21, 0xad, 0xbd, 0x71, 0xa7, 0xb5, 0xea, - 0x6b, 0xef, 0x02, 0x48, 0x85, 0xc7, 0x53, 0xb0, - 0xca, 0xc7, 0x63, 0xe0, 0xe8, 0x3d, 0x80, 0x01, - 0x55, 0x6a, 0x6f, 0x1b, 0x2d, 0x4f, 0x33, 0x53, - 0x85, 0xb4, 0x47, 0x12, 0x9a, 0x1f, 0xcc, 0x7b, - 0x37, 0x32, 0xec, 0x68, 0xa4, 0x97, 0xfc, 0x25, - 0xe6, 0x69, 0x48, 0xd1, 0x65, 0xc9, 0xd2, 0x17, - 0x38, 0x07, 0x6d, 0x49, 0xbe, 0x06, 0xd5, 0x28, - 0xb2, 0xe6, 0x16, 0x16, 0x67, 0x82, 0x3c, 0xdb, - 0x2c, 0x5b, 0xb0, 0x64, 0x7f, 0x44, 0x11, 0x53, - 0xc6, 0x6f, 0xed, 0xbc, 0x8f, 0x1e, 0xd0, 0xca, - 0x29, 0xea, 0x97, 0xc4, 0x84, 0xe3, 0xfc, 0xf5, - 0xc1, 0xb4, 0xa2, 0x31, 0x13, 0x0c, 0x30, 0x08, - 0x32, 0x4c, 0x2e, 0x11, 0x38, 0x63, 0xb1, 0x5c, - 0x9b, 0xf3, 0xca, 0xf2, 0x9a, 0x4f, 0x5d, 0x75, - 0x5c, 0xa9, 0xe3, 0x62, 0x2e, 0xd8, 0x8b, 0xe8, - 0x14, 0x5f, 0x9f, 0x27, 0x0b, 0x36, 0x26, 0x08, - 0x54, 0x9f, 0xac, 0xf8, 0xc6, 0x81, 0x47, 0xd6, - 0x28, 0x0b, 0xbf, 0x99, 0xb1, 0x94, 0x92, 0xeb, - 0x02, 0x9a, 0x0d, 0xde, 0x32, 0xd9, 0xc9, 0x7f, - 0x0f, 0x26, 0xba, 0x5f, 0x76, 0x5e, 0xdc, 0x2d, - 0xf7, 0x61, 0x3c, 0x57, 0x73, 0xc5, 0xbc, 0x61, - 0x1e, 0xc7, 0xcd, 0x6c, 0x1f, 0xe8, 0xc9, 0x00, - 0x1f, 0x70, 0x41, 0x0b, 0x08, 0x35, 0x0c, 0x04, - 0xaa, 0x99, 0x5e, 0xf4, 0x45, 0xf0, 0xfb, 0xfb, - 0x97, 0x72, 0x1d, 0x72, 0xd5, 0xe2, 0x7e, 0xba, - 0x2e, 0x69, 0x2c, 0x08, 0x3d, 0x59, 0xb3, 0xc6, - 0x89, 0xbd, 0xed, 0x2b, 0x29, 0x9e, 0x8e, 0x04, - 0x46, 0x29, 0xc4, 0x40, 0x77, 0x60, 0x76, 0x58, - 0x47, 0x90, 0x23, 0x65, 0x20, 0x40, 0x84, 0xb2, - 0xc7, 0xd3, 0x1c, 0x15, 0x77, 0x94, 0x38, 0x49, - 0x49, 0x22, 0x21, 0x87, 0x41, 0x04, 0x17, 0xca, - 0x87, 0xb8, 0xdf, 0x3f, 0xb5, 0xa6, 0x2a, 0xce, - 0x19, 0xd2, 0xd3, 0x51, 0xd8, 0x32, 0xd7, 0x78, - 0x12, 0x66, 0x6c, 0x23, 0x22, 0xbc, 0x50, 0x99, - 0x2f, 0x53, 0xa9, 0x1d, 0xf0, 0x26, 0x9b, 0x5b, - 0xab, 0xd0, 0x14, 0x6d, 0x20, 0xd6, 0x5d, 0x48, - 0x05, 0x97, 0x6b, 0xbe, 0xa4, 0x9e, 0xf8, 0xbd, - 0x3e, 0x52, 0xe9, 0xcb, 0x66, 0xc0, 0xbf, 0xe1, - 0x25, 0x45, 0x48, 0xb1, 0x26, 0xb6, 0xe5, 0x65, - 0x17, 0x33, 0x4e, 0x4b, 0x0b, 0x74, 0x84, 0x0d, - 0xcd, 0x9c, 0x9a, 0x98, 0xaa, 0x75, 0x2e, 0xb5, - 0xb4, 0x3f, 0x4a, 0x0d, 0x29, 0x18, 0xa2, 0xed, - 0x18, 0xc9, 0x79, 0xc6, 0xb1, 0x0b, 0x23, 0x86, - 0x87, 0x67, 0xd2, 0x80, 0xcc, 0x82, 0xda, 0x43, - 0x98, 0x39, 0x10, 0x68, 0x78, 0x8f, 0xf9, 0xaa, - 0x8f, 0xa9, 0xcc, 0xd8, 0x52, 0xfc, 0xda, 0xd4, - 0x98, 0xa5, 0xaa, 0xcc, 0x7f, 0x43, 0x6d, 0x94, - 0xcc, 0x7f, 0x69, 0xa8, 0xc2, 0x30, 0x3d, 0x7b, - 0x1d, 0x87, 0x24, 0xcf, 0x14, 0x16, 0x37, 0xc8, - 0x59, 0x97, 0x0a, 0x31, 0xaa, 0xeb, 0x38, 0xf8, - 0xaf, 0xdc, 0x85, 0x0a, 0x37, 0x47, 0x19, 0x3f, - 0xab, 0xcd, 0x48, 0xdc, 0x2b, 0xf6, 0x42, 0xf1, - 0x41, 0xc2, 0xcc, 0x8a, 0xfc, 0xbb, 0xbd, 0xe3, - 0xd1, 0x2e, 0x39, 0x07, 0x91, 0x36, 0x40, 0x33, - 0x95, 0xa6, 0x0e, 0xcf, 0x9a, 0xcf, 0xbb, 0xb2, - 0x9b, 0x63, 0x86, 0x31, 0xec, 0x12, 0xb3, 0x1e, - 0xe3, 0xcb, 0xd1, 0x2c, 0x55, 0xca, 0x07, 0xec, - 0x23, 0x97, 0xc2, 0xa1, 0x4d, 0xa4, 0x11, 0x13 -//}; -//unsigned int sig_sha256_rndbase_msg1_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha384_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha384_bsn0_msg0.inc deleted file mode 100644 index b9855f06e2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha384_bsn0_msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha384 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha384_bsn0_msg0_dat[] = { - 0x57, 0xe7, 0x8f, 0xfb, 0xf9, 0xa3, 0xba, 0x5e, - 0xac, 0xec, 0xb3, 0xa4, 0xf4, 0x13, 0x95, 0xa1, - 0x1c, 0x1d, 0xe1, 0xaf, 0xea, 0x16, 0xba, 0x6d, - 0xde, 0x4c, 0x43, 0xf0, 0x89, 0x59, 0x5e, 0xfa, - 0x0f, 0x18, 0xdd, 0x22, 0xf6, 0xd6, 0xfc, 0xe5, - 0x0f, 0xb2, 0x81, 0xb5, 0xa9, 0xa6, 0xe8, 0xee, - 0x14, 0x04, 0xec, 0x1b, 0x4e, 0x65, 0x82, 0x7f, - 0x96, 0x53, 0xc4, 0x3b, 0x29, 0x17, 0x39, 0xc0, - 0x8a, 0x3a, 0x3d, 0xef, 0x79, 0xe7, 0x7d, 0x06, - 0x00, 0x32, 0xc7, 0x4f, 0x82, 0x01, 0x71, 0x10, - 0xb1, 0x5b, 0x7b, 0x7c, 0x82, 0x10, 0xfd, 0xb4, - 0x8e, 0x7e, 0x87, 0x50, 0x9d, 0xc4, 0xf8, 0x4c, - 0x8b, 0xb2, 0xf9, 0x34, 0x17, 0x9e, 0x44, 0x93, - 0x47, 0xb4, 0x8c, 0x42, 0x55, 0x8a, 0xd9, 0xd8, - 0x12, 0x4a, 0xd9, 0x01, 0xce, 0x1a, 0x6b, 0x96, - 0x9d, 0x4c, 0x9b, 0xa9, 0x48, 0xae, 0x3c, 0xd6, - 0xc0, 0xb7, 0x0a, 0x62, 0xe7, 0xa9, 0xc8, 0xda, - 0x02, 0xc0, 0x1a, 0xb4, 0x8c, 0x8c, 0xda, 0x1d, - 0xe8, 0x2e, 0x8b, 0x16, 0x49, 0xd8, 0xe2, 0xd7, - 0x86, 0xab, 0x76, 0x20, 0x08, 0x9a, 0x66, 0x2e, - 0x60, 0x4f, 0x8d, 0xd9, 0x20, 0x0f, 0x85, 0x2a, - 0x9e, 0xa5, 0x95, 0x04, 0x3f, 0x82, 0xae, 0xbb, - 0x84, 0x35, 0xb4, 0xda, 0x93, 0x46, 0x46, 0x8c, - 0x6b, 0x14, 0x4a, 0x70, 0x26, 0xa4, 0xf7, 0xba, - 0xcd, 0x9d, 0x8e, 0x5a, 0x9d, 0x66, 0x87, 0xa6, - 0x50, 0x97, 0x1c, 0xea, 0x01, 0xea, 0x7e, 0xa5, - 0x1f, 0xf3, 0xc7, 0xff, 0x17, 0x75, 0x05, 0x0a, - 0xb8, 0x71, 0x79, 0x75, 0x5b, 0xfa, 0xee, 0xc7, - 0xb3, 0x1f, 0xed, 0xc5, 0x8c, 0x65, 0x05, 0x41, - 0x04, 0x82, 0xb6, 0xd9, 0xa4, 0x00, 0x12, 0xeb, - 0x1a, 0x26, 0xba, 0xad, 0x97, 0x3e, 0xe3, 0x0b, - 0x15, 0x98, 0x5d, 0xcd, 0xb3, 0x66, 0x58, 0xff, - 0x1d, 0x40, 0x99, 0xaf, 0xad, 0x19, 0x05, 0x06, - 0x7f, 0x42, 0x1e, 0xfc, 0x88, 0x23, 0x7b, 0xd4, - 0x6c, 0xd7, 0x3e, 0xa2, 0x16, 0x12, 0x83, 0x28, - 0x47, 0xf9, 0xe1, 0xed, 0x94, 0x29, 0xab, 0x7b, - 0xef, 0x20, 0x53, 0x9a, 0x8b, 0xdf, 0x0e, 0xd7, - 0x3e, 0x26, 0x26, 0x5a, 0x4a, 0x25, 0xa8, 0x09, - 0x76, 0x5e, 0xd0, 0x6a, 0x6c, 0xe5, 0x39, 0x10, - 0xcc, 0x77, 0xaa, 0x75, 0x28, 0x17, 0x43, 0xb9, - 0xd9, 0x7a, 0x4a, 0x36, 0xfb, 0x02, 0x42, 0x30, - 0xac, 0x9e, 0x28, 0x93, 0x54, 0x94, 0x9f, 0xbf, - 0xc2, 0x7c, 0xd7, 0xa4, 0x84, 0x89, 0x90, 0x74, - 0xf0, 0xcf, 0xcc, 0x0b, 0x1e, 0x8f, 0x98, 0x62, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x80, 0x71, 0x05, 0x55, 0xae, 0x18, 0xc1, 0x77, - 0x38, 0x6e, 0x5f, 0x17, 0xe1, 0xcb, 0x89, 0x00, - 0xc2, 0x43, 0x20, 0x3d, 0x63, 0x2a, 0xd8, 0xe2, - 0x3a, 0x7a, 0x20, 0xf0, 0x72, 0x21, 0x7d, 0x22, - 0xaf, 0x37, 0x4f, 0x98, 0x3a, 0x2b, 0x4f, 0x76, - 0x84, 0xed, 0x09, 0x74, 0x6c, 0x37, 0xf0, 0x44, - 0x17, 0x7e, 0xd6, 0x8c, 0x87, 0x5c, 0x98, 0x36, - 0xe1, 0xd9, 0x32, 0x30, 0x73, 0x31, 0x8a, 0x73, - 0x53, 0xf8, 0x5f, 0xa9, 0x0a, 0x72, 0xd8, 0x68, - 0x17, 0x8f, 0x8c, 0x97, 0xf9, 0xd2, 0x45, 0x42, - 0xcf, 0xd0, 0x82, 0x4a, 0x9c, 0xde, 0xca, 0xe1, - 0xbc, 0x63, 0xbd, 0xea, 0x75, 0xff, 0xe0, 0x61, - 0x89, 0x51, 0xb5, 0xbf, 0x08, 0x67, 0x19, 0x11, - 0x8e, 0x6b, 0x05, 0xe5, 0xc5, 0x52, 0xff, 0xb5, - 0x1c, 0x5a, 0xe3, 0x9a, 0xef, 0xc6, 0x52, 0xbc, - 0xe9, 0xc7, 0x4b, 0x1c, 0x21, 0xd8, 0xdc, 0x39, - 0x0e, 0x6b, 0x44, 0x5d, 0xae, 0x30, 0x98, 0xfc, - 0xdc, 0x54, 0xbe, 0xa5, 0xef, 0x90, 0x15, 0x9a, - 0x13, 0xac, 0x9f, 0xa8, 0xf7, 0xb0, 0xc7, 0xc5, - 0x67, 0xbd, 0xae, 0x8b, 0xa6, 0xc8, 0x20, 0xa2, - 0x2f, 0x26, 0x42, 0xe3, 0x8e, 0x56, 0xcc, 0xf0, - 0xfc, 0x24, 0x33, 0x93, 0x78, 0xa7, 0xdd, 0x5b, - 0x0b, 0x77, 0x7b, 0x36, 0xc4, 0xad, 0x95, 0x25, - 0x9b, 0x8a, 0x9f, 0xbc, 0xfb, 0xa0, 0x40, 0x18, - 0xc5, 0x3f, 0x32, 0x84, 0x85, 0xcb, 0xf4, 0xfd, - 0xf2, 0x03, 0xa9, 0xf4, 0x95, 0x50, 0x92, 0xe8, - 0xa8, 0x44, 0xe8, 0x92, 0xe0, 0x09, 0x71, 0x25, - 0x6c, 0xfb, 0x50, 0x38, 0x77, 0x6a, 0x7d, 0x6c, - 0xc6, 0x34, 0x72, 0xec, 0x50, 0x02, 0x0d, 0xce, - 0x2d, 0xfd, 0xe9, 0x2a, 0xf6, 0x8a, 0x90, 0x82, - 0x44, 0x45, 0xfb, 0x9f, 0x03, 0x22, 0xd0, 0x5e, - 0x8e, 0x01, 0xac, 0xa4, 0xb8, 0x20, 0xa1, 0x2d, - 0xff, 0xb2, 0x22, 0x4e, 0xe4, 0xe0, 0x68, 0x33, - 0x85, 0x29, 0x6b, 0xb6, 0x3c, 0xc8, 0x17, 0x40, - 0x80, 0x2c, 0x9a, 0x19, 0x58, 0x7c, 0x77, 0xdc, - 0xc9, 0xf7, 0x91, 0xa1, 0x6e, 0xfd, 0xd6, 0x3c, - 0x5e, 0x38, 0x9b, 0x90, 0xbf, 0xab, 0xab, 0x94, - 0x3d, 0x39, 0xc0, 0xe3, 0x90, 0x5c, 0xaf, 0xd1, - 0x81, 0x06, 0xe4, 0x03, 0x88, 0x90, 0xe1, 0x9a, - 0x09, 0x9d, 0x8a, 0xed, 0x81, 0xdf, 0x30, 0x85, - 0xc1, 0xe3, 0xd0, 0x72, 0x4e, 0x14, 0x03, 0x0b, - 0x72, 0x5f, 0x36, 0x7b, 0x13, 0xd7, 0xe9, 0x07, - 0x94, 0x89, 0xf3, 0x68, 0x6d, 0x86, 0x6b, 0x6a, - 0xa6, 0xdf, 0x68, 0x97, 0xf8, 0x15, 0x0f, 0xd1, - 0x8d, 0xeb, 0xd0, 0x43, 0xe6, 0x1d, 0x1e, 0x1a, - 0xc6, 0x31, 0x0c, 0x1d, 0xf0, 0x34, 0xe8, 0x8c, - 0x34, 0x39, 0xca, 0xf6, 0x35, 0xfe, 0xa4, 0xd2, - 0x1c, 0xb5, 0x96, 0x07, 0x3a, 0x40, 0xd0, 0x0b, - 0x7d, 0x20, 0x76, 0xeb, 0x24, 0xa1, 0xa8, 0x99, - 0x7c, 0xd1, 0x51, 0x3c, 0xe2, 0xf0, 0x96, 0xa6, - 0xeb, 0x0e, 0x8f, 0x8c, 0x35, 0xf4, 0x08, 0x26, - 0xf7, 0xd4, 0xbb, 0xf1, 0xd6, 0x4e, 0xa0, 0x9e, - 0xb8, 0x72, 0x60, 0xdf, 0x8f, 0x1d, 0xef, 0x86, - 0x86, 0x76, 0x56, 0x49, 0x4e, 0x31, 0x40, 0x47, - 0xce, 0xdf, 0x9d, 0x75, 0x5f, 0x7a, 0xe4, 0xc3, - 0x9c, 0xdf, 0xd7, 0x40, 0x2b, 0xf9, 0xb9, 0x12, - 0xf7, 0x1b, 0x9a, 0x55, 0x3f, 0x87, 0x3a, 0x67, - 0x75, 0xc4, 0xd9, 0xda, 0xd6, 0xc4, 0x30, 0xe6, - 0xc1, 0x53, 0xd1, 0x5c, 0x38, 0xdb, 0xff, 0x8d, - 0x21, 0x18, 0x6a, 0xb7, 0x1e, 0x05, 0x61, 0x05 -//}; -//unsigned int sig_grpx_member0_sha384_bsn0_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha384_rndbase_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha384_rndbase_msg0.inc deleted file mode 100644 index b3b5888d49..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha384_rndbase_msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha384 - * Message : "msg0" - * Basename: None (random base) - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha384_rndbase_msg0_dat[] = { - 0xa6, 0x0b, 0xac, 0x7d, 0xed, 0x65, 0xaa, 0x55, - 0xc7, 0xfc, 0x20, 0xde, 0x29, 0x02, 0x4d, 0x7f, - 0x24, 0xec, 0x24, 0x98, 0x94, 0xc9, 0x06, 0xd8, - 0x24, 0x14, 0x82, 0x06, 0xe6, 0xf0, 0x13, 0x6a, - 0x28, 0xfb, 0xed, 0xbf, 0x47, 0x25, 0x20, 0x14, - 0x5e, 0x68, 0x78, 0x1f, 0xc4, 0x41, 0x8c, 0x47, - 0x4a, 0xac, 0xdd, 0x88, 0x89, 0x95, 0xa6, 0x3a, - 0x52, 0x01, 0x87, 0xf0, 0xee, 0xf2, 0x8c, 0x19, - 0x4c, 0xe6, 0xb4, 0xc2, 0x2d, 0x8b, 0xdb, 0x45, - 0x91, 0x43, 0x79, 0xa5, 0x8f, 0x5b, 0x66, 0x54, - 0x34, 0x28, 0x1b, 0xe7, 0x10, 0x94, 0xbc, 0x88, - 0xcb, 0xf5, 0x4e, 0x6d, 0x3b, 0x46, 0x70, 0xb4, - 0xb6, 0x67, 0xf1, 0x64, 0xee, 0x1a, 0xe0, 0xb6, - 0x5d, 0x8c, 0xe6, 0xbd, 0xd0, 0x54, 0x7f, 0x51, - 0x1e, 0x4b, 0x55, 0x08, 0xb2, 0x1a, 0x22, 0x70, - 0x29, 0xba, 0x76, 0x59, 0xdb, 0x81, 0x95, 0x7b, - 0xc6, 0xd0, 0x7a, 0x0e, 0x4c, 0x6b, 0x54, 0xfb, - 0x01, 0xf7, 0x48, 0xc6, 0x62, 0x58, 0x3a, 0x68, - 0xa6, 0xb0, 0x31, 0x9f, 0x1c, 0x51, 0x90, 0x8b, - 0x59, 0xb4, 0x24, 0x8f, 0xd9, 0x56, 0xe4, 0xc0, - 0x58, 0x58, 0x5a, 0x1e, 0x8c, 0x75, 0x98, 0xcf, - 0xc8, 0x1c, 0x89, 0xc0, 0x94, 0x46, 0x82, 0xfc, - 0xc8, 0x10, 0x53, 0xc8, 0x55, 0xcd, 0x7e, 0x5b, - 0x7b, 0xd7, 0xfb, 0xa9, 0xe7, 0xcb, 0x9a, 0x9c, - 0x00, 0x8f, 0x95, 0x98, 0x7e, 0xe3, 0x24, 0x8b, - 0x7a, 0x8f, 0x19, 0x31, 0x1f, 0x7f, 0xcf, 0x75, - 0x39, 0x9a, 0x86, 0x21, 0x59, 0xf3, 0x66, 0xf6, - 0x7b, 0xf5, 0x0f, 0x36, 0x65, 0xe8, 0xbd, 0xca, - 0xed, 0x0e, 0x23, 0x62, 0x1c, 0x95, 0xb8, 0xfc, - 0x3d, 0x25, 0x63, 0x1a, 0x35, 0xd9, 0xbb, 0x88, - 0xed, 0xf9, 0x40, 0xe1, 0x93, 0xe8, 0x46, 0x59, - 0x40, 0x11, 0x58, 0x37, 0x82, 0x12, 0x85, 0xaf, - 0xf9, 0x76, 0x28, 0xcf, 0x26, 0x15, 0xdd, 0x1d, - 0xd5, 0x17, 0x03, 0x8f, 0xab, 0x79, 0xda, 0x93, - 0x1e, 0x7c, 0x03, 0xfd, 0x40, 0x3f, 0xaa, 0xb8, - 0xd1, 0x96, 0xe3, 0x64, 0x72, 0x6a, 0x0e, 0x62, - 0x21, 0x1a, 0x9c, 0x0b, 0xff, 0x4e, 0xea, 0x82, - 0xb2, 0xe2, 0xac, 0xa5, 0xab, 0x17, 0xb5, 0x58, - 0xae, 0x53, 0xc1, 0xa7, 0xeb, 0xd1, 0x7e, 0xc0, - 0xba, 0x26, 0xbf, 0x61, 0xc1, 0xe4, 0xe1, 0x19, - 0xfe, 0x7c, 0x41, 0x81, 0xc4, 0x82, 0x95, 0x51, - 0x1c, 0xc6, 0xd5, 0xf2, 0x7f, 0xa5, 0xee, 0x59, - 0xf7, 0xd1, 0x5e, 0x9c, 0xda, 0xf7, 0xe8, 0xa5, - 0x22, 0x2f, 0xc5, 0xf0, 0xa0, 0x73, 0xbd, 0xda, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x45, 0x60, 0xe3, 0x04, 0xa4, 0xff, 0xe1, 0xf0, - 0x26, 0x4e, 0x1d, 0xee, 0x9a, 0xe2, 0xdb, 0x9c, - 0x04, 0x7d, 0xf2, 0x88, 0x30, 0x44, 0x0b, 0x76, - 0x71, 0x64, 0x57, 0xfc, 0x43, 0xe0, 0x10, 0x32, - 0x03, 0xfe, 0x51, 0xfc, 0x0a, 0x57, 0x58, 0x31, - 0x19, 0x10, 0xce, 0xa3, 0x9b, 0xc1, 0x27, 0x65, - 0xad, 0xd7, 0x81, 0xd6, 0xe2, 0x59, 0xbf, 0xbd, - 0xe3, 0x59, 0x98, 0xcd, 0x37, 0xe0, 0xa9, 0xff, - 0x0d, 0x8f, 0x7e, 0xc8, 0x8e, 0xab, 0xd6, 0xb6, - 0xb6, 0x74, 0x6e, 0x5d, 0x7f, 0x60, 0x0e, 0x96, - 0x8c, 0x26, 0x27, 0xaf, 0x20, 0x8f, 0xee, 0x5c, - 0xcc, 0x61, 0x84, 0x3f, 0x39, 0x39, 0xb7, 0x07, - 0xbf, 0xf7, 0xcb, 0x75, 0x61, 0x34, 0xea, 0x06, - 0xb3, 0xc3, 0xd2, 0x2a, 0x51, 0x33, 0xce, 0x5e, - 0xb0, 0x26, 0x04, 0x48, 0x83, 0x5e, 0x3d, 0x59, - 0x8f, 0x50, 0x2b, 0xc6, 0xcd, 0x55, 0xf5, 0xb7, - 0x01, 0xd6, 0x84, 0x52, 0x1d, 0x22, 0x10, 0x92, - 0x10, 0x08, 0x3a, 0x63, 0xc2, 0x72, 0xfe, 0x9e, - 0x7e, 0x81, 0x0d, 0xa9, 0x16, 0x91, 0x0a, 0x55, - 0x9a, 0xf5, 0xae, 0x23, 0x2b, 0x8d, 0x67, 0x55, - 0x8c, 0x51, 0x19, 0x30, 0x1f, 0x9f, 0x8b, 0xc4, - 0xf4, 0x17, 0xab, 0xd1, 0x9d, 0x7a, 0xd8, 0xfa, - 0x5d, 0xdc, 0xe8, 0xc3, 0x24, 0x97, 0xae, 0x8a, - 0x64, 0x27, 0x86, 0x5f, 0x88, 0xf0, 0x92, 0xc3, - 0xa9, 0x13, 0x15, 0x1a, 0xc3, 0xbc, 0xba, 0x0a, - 0x3c, 0xb7, 0x8b, 0x46, 0xa9, 0x40, 0x94, 0x0e, - 0x17, 0x46, 0x3f, 0x6d, 0xcf, 0x0e, 0x0f, 0xf6, - 0xe6, 0xd7, 0x5c, 0x86, 0x44, 0xf7, 0x1a, 0x42, - 0xa0, 0xbc, 0x93, 0x9c, 0x66, 0x9d, 0x26, 0xa7, - 0x54, 0xad, 0x85, 0x03, 0x3c, 0x12, 0xa9, 0xab, - 0x56, 0xcc, 0xe7, 0x60, 0xb2, 0x5b, 0x06, 0x88, - 0x81, 0x47, 0xe4, 0x52, 0xde, 0x3d, 0xe0, 0x14, - 0x17, 0xea, 0xd1, 0x78, 0x30, 0xf2, 0xca, 0x6b, - 0xc4, 0x15, 0xad, 0x2f, 0x8e, 0x36, 0xa9, 0x18, - 0x88, 0x74, 0x62, 0xba, 0xf4, 0x6a, 0x64, 0x8c, - 0x20, 0x1a, 0x8f, 0x92, 0x00, 0x6d, 0x12, 0x68, - 0x52, 0x41, 0x3b, 0xc8, 0x88, 0xd9, 0xda, 0x6d, - 0x19, 0xc1, 0x32, 0x82, 0x6e, 0xd8, 0xe2, 0xd7, - 0x3b, 0x68, 0xf4, 0x87, 0x96, 0xe4, 0xf4, 0x91, - 0x52, 0x02, 0xf0, 0x02, 0xf6, 0x8e, 0xdd, 0x49, - 0x4d, 0xc6, 0x03, 0x0d, 0xf9, 0x27, 0x5c, 0x81, - 0xf0, 0xb8, 0xf4, 0xa1, 0x5f, 0x01, 0x88, 0x2a, - 0x05, 0x96, 0xbd, 0xbc, 0xe8, 0x0f, 0xec, 0xe5, - 0x83, 0xe9, 0xfc, 0x4c, 0xe1, 0xcb, 0xec, 0x51, - 0xaa, 0xb3, 0xc7, 0xd6, 0x64, 0x63, 0x5c, 0x66, - 0x46, 0xed, 0x7f, 0x49, 0x5a, 0x76, 0xb2, 0x8f, - 0x13, 0x19, 0x61, 0x3d, 0x95, 0x10, 0xb0, 0x5a, - 0x63, 0x35, 0xed, 0x0f, 0xdc, 0xf6, 0xd5, 0xf6, - 0x90, 0x52, 0xa3, 0x0c, 0x7c, 0xbc, 0x1f, 0x60, - 0xc4, 0x30, 0xd9, 0xe8, 0xe5, 0x70, 0xfa, 0x67, - 0xf2, 0x79, 0x76, 0x14, 0x4d, 0x5f, 0xae, 0x4f, - 0x2f, 0x93, 0x9d, 0x37, 0x1d, 0x53, 0xca, 0xd8, - 0x20, 0x1d, 0x5a, 0x2e, 0x3c, 0x9b, 0x6f, 0x3c, - 0xdb, 0xa9, 0xac, 0x4d, 0xe3, 0x46, 0x8c, 0x70, - 0xe7, 0x8b, 0xdd, 0x9c, 0x57, 0xd0, 0x5d, 0x6f, - 0x8c, 0x62, 0xc1, 0xd1, 0x83, 0xbc, 0x83, 0xa2, - 0x92, 0x6d, 0xad, 0xc5, 0xbd, 0xab, 0x48, 0xd0, - 0x43, 0xe0, 0xff, 0x5b, 0x90, 0x57, 0xa3, 0x6f, - 0xd6, 0xa3, 0x9e, 0x70, 0x23, 0x18, 0x9d, 0xa0, - 0x06, 0x5d, 0xa2, 0xe0, 0x43, 0xed, 0x3b, 0xd3 -//}; -//unsigned int sig_grpx_member0_sha384_rndbase_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha512_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha512_bsn0_msg0.inc deleted file mode 100644 index 072a2248b0..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha512_bsn0_msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha512 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha512_bsn0_msg0_dat[] = { - 0x72, 0xed, 0x4f, 0x01, 0xf2, 0xfe, 0xc9, 0xf4, - 0x56, 0x4f, 0x11, 0x31, 0x62, 0x07, 0x02, 0x0f, - 0xed, 0xd0, 0x6b, 0xe8, 0xbf, 0xa9, 0x0b, 0x55, - 0xb8, 0xf7, 0xe9, 0x6e, 0xaa, 0x13, 0x2e, 0x6f, - 0xa7, 0xd5, 0xec, 0x4b, 0x3e, 0x23, 0x5f, 0x4f, - 0x61, 0x44, 0x52, 0xc1, 0x75, 0x0b, 0x13, 0xad, - 0xa1, 0x53, 0x0d, 0x6a, 0x73, 0xed, 0x5e, 0x49, - 0xa9, 0xed, 0x1d, 0x88, 0xde, 0xa6, 0x93, 0x18, - 0x4a, 0x58, 0xea, 0xc3, 0x7c, 0x9e, 0xf1, 0x2a, - 0x1a, 0xbf, 0x5a, 0xf8, 0xd5, 0xb4, 0xae, 0xa8, - 0x9a, 0x37, 0xdc, 0x1b, 0xe1, 0xab, 0xb0, 0xef, - 0x45, 0x88, 0x94, 0x48, 0x99, 0xc8, 0x70, 0x3b, - 0x25, 0x70, 0x5a, 0x84, 0x4c, 0x65, 0x29, 0x64, - 0xe2, 0x2b, 0x28, 0x84, 0xcf, 0x05, 0x83, 0xfb, - 0x00, 0xe9, 0x20, 0xc2, 0xb2, 0x12, 0x3c, 0x90, - 0x12, 0xeb, 0x85, 0x3a, 0x70, 0xe4, 0xed, 0x64, - 0x73, 0xc2, 0xef, 0x1b, 0x33, 0x7b, 0xa9, 0xf1, - 0x76, 0xae, 0xac, 0x99, 0xd1, 0xaa, 0x9c, 0xb1, - 0xcb, 0x17, 0x40, 0xf9, 0x9d, 0xa9, 0x75, 0x7f, - 0xe6, 0x9e, 0x8d, 0x31, 0xf0, 0x07, 0x7b, 0x33, - 0xb6, 0x11, 0x7e, 0xf3, 0xa0, 0xf2, 0x42, 0xdf, - 0xe2, 0x6a, 0xa0, 0x10, 0xb6, 0x6a, 0xda, 0x6d, - 0x1e, 0xf3, 0x18, 0xf1, 0xd7, 0x0c, 0x9b, 0x67, - 0x97, 0x62, 0xd6, 0xc7, 0x92, 0x61, 0xa0, 0x23, - 0x4e, 0xb2, 0xd3, 0x08, 0x5e, 0x74, 0x65, 0xd0, - 0xca, 0x0c, 0x9d, 0x5d, 0x81, 0x13, 0xa3, 0x16, - 0x6d, 0x44, 0xc4, 0x74, 0x4f, 0xf4, 0x33, 0x97, - 0xd5, 0xb5, 0x46, 0xc7, 0xde, 0x7c, 0xef, 0xbb, - 0xfc, 0x58, 0x16, 0xe3, 0x13, 0xc3, 0x7d, 0x24, - 0x1c, 0x8a, 0x50, 0x98, 0x31, 0x81, 0x66, 0xc3, - 0x4f, 0x75, 0xd7, 0xa8, 0xc4, 0xec, 0xe0, 0x63, - 0xf4, 0x48, 0x79, 0xdf, 0x5a, 0xec, 0xad, 0x64, - 0x48, 0x21, 0x28, 0x3b, 0x8a, 0x75, 0xcc, 0x37, - 0x78, 0x0f, 0x56, 0x4a, 0x1e, 0xbe, 0xc1, 0xd4, - 0x24, 0x6d, 0x0a, 0x62, 0x35, 0x3d, 0x87, 0xcf, - 0xd4, 0x45, 0xb7, 0x16, 0xab, 0xe7, 0xce, 0x2a, - 0xb3, 0xda, 0x32, 0xd1, 0x5d, 0xa8, 0x23, 0x51, - 0x3c, 0x6e, 0x24, 0x3e, 0x19, 0x34, 0xd1, 0xe7, - 0x69, 0x59, 0x2e, 0x2c, 0x56, 0x40, 0x92, 0x51, - 0x90, 0xbe, 0xcd, 0x7d, 0x42, 0x5c, 0xa9, 0xf0, - 0x4b, 0xcb, 0x5e, 0x2b, 0xb3, 0xa6, 0x15, 0xf3, - 0xfb, 0x60, 0x27, 0xad, 0x8e, 0x57, 0xff, 0x41, - 0x45, 0xa0, 0xb2, 0xb9, 0x89, 0xcc, 0x9e, 0x9e, - 0x36, 0x12, 0x3d, 0x5e, 0xdd, 0xcf, 0x54, 0xbc, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x78, 0xe5, 0x54, 0xb7, 0x82, 0x81, 0xb6, 0xf2, - 0xab, 0x11, 0x73, 0x08, 0x4f, 0x9a, 0xda, 0xcc, - 0xc5, 0x94, 0x78, 0x08, 0xc0, 0x22, 0xda, 0x06, - 0x87, 0xd4, 0xa0, 0x9f, 0x50, 0xb3, 0x04, 0xdc, - 0xbe, 0x5b, 0x02, 0x28, 0x71, 0x8f, 0x4f, 0x18, - 0x2b, 0xb1, 0xab, 0x62, 0x83, 0x9c, 0xb7, 0x1b, - 0x87, 0x48, 0x8f, 0xbe, 0x4f, 0x1c, 0x8d, 0x16, - 0xa4, 0xed, 0x4f, 0xe4, 0x10, 0x4c, 0x83, 0xd9, - 0xcb, 0xa3, 0xdc, 0xd2, 0x5e, 0xdd, 0xab, 0x2d, - 0x5d, 0x73, 0x88, 0x5f, 0x92, 0x66, 0x0f, 0xaa, - 0xed, 0x5c, 0x1e, 0xf5, 0xca, 0x82, 0xd7, 0xcb, - 0x04, 0x98, 0xb1, 0x4d, 0xb1, 0x6e, 0xd0, 0x04, - 0x48, 0xf8, 0x84, 0x66, 0xae, 0x01, 0x3e, 0x24, - 0x9f, 0xdf, 0x0c, 0x7a, 0x9a, 0x22, 0xd3, 0x46, - 0xe0, 0x0b, 0xb2, 0x68, 0x65, 0x64, 0x95, 0x8d, - 0x45, 0xa2, 0xb2, 0xd9, 0x49, 0x8b, 0xd7, 0x7d, - 0x0f, 0x1a, 0x80, 0xd3, 0x71, 0xd9, 0x05, 0xb3, - 0xff, 0x65, 0x2f, 0x7f, 0xe1, 0xb7, 0x68, 0xc6, - 0x4f, 0x22, 0x69, 0x2a, 0xcb, 0x5e, 0x45, 0xed, - 0x40, 0x30, 0xd5, 0xc7, 0xda, 0xf8, 0xb9, 0x22, - 0xa6, 0xe8, 0x00, 0x6c, 0xa2, 0x30, 0x37, 0x36, - 0xf8, 0xe6, 0xcb, 0xca, 0x5f, 0xc8, 0x9b, 0xc0, - 0x03, 0xba, 0x08, 0x5f, 0x81, 0xa4, 0x1d, 0x55, - 0x11, 0x5b, 0x34, 0x3c, 0x6b, 0x55, 0x5a, 0xc6, - 0xe2, 0x3b, 0xf3, 0xbc, 0x15, 0xa5, 0x70, 0x9a, - 0x1a, 0x4c, 0x9e, 0x53, 0x8b, 0xa3, 0x46, 0x5f, - 0xbc, 0x20, 0x15, 0x8a, 0xc7, 0x95, 0xb4, 0xdc, - 0x87, 0xbf, 0xce, 0x75, 0x8a, 0xa7, 0x5f, 0xc7, - 0x77, 0x8f, 0x4c, 0xd9, 0x72, 0x36, 0xc6, 0xb6, - 0xb6, 0x2a, 0x11, 0x59, 0xaf, 0x0f, 0x6c, 0xac, - 0x4d, 0xdd, 0x99, 0xd6, 0xa5, 0x85, 0x12, 0x08, - 0xeb, 0x38, 0x20, 0x0f, 0xb7, 0xe0, 0x09, 0x72, - 0x15, 0xfb, 0x11, 0x1e, 0x35, 0x4e, 0x01, 0xba, - 0x96, 0x0a, 0x0e, 0x51, 0x10, 0x8b, 0x68, 0x7c, - 0xf8, 0x8e, 0x56, 0x65, 0xe2, 0x25, 0x42, 0x43, - 0xeb, 0xf4, 0xca, 0xf2, 0xb7, 0x66, 0x3c, 0x38, - 0xb2, 0x99, 0xd1, 0x2f, 0x2d, 0x30, 0xbd, 0xa3, - 0x05, 0x41, 0x40, 0x26, 0x5b, 0x83, 0x06, 0x1f, - 0x2a, 0xad, 0xd2, 0x86, 0x1c, 0x7f, 0x1a, 0x80, - 0x79, 0x88, 0xa1, 0xc6, 0xd2, 0x9f, 0xf3, 0x51, - 0x7b, 0xd3, 0xe9, 0x6c, 0xd6, 0xe4, 0xaa, 0x21, - 0x4d, 0xe6, 0x42, 0xea, 0x53, 0x6f, 0xfe, 0xcd, - 0xf8, 0x67, 0x6d, 0xb3, 0x16, 0x67, 0x55, 0x51, - 0x60, 0xa5, 0xe4, 0x1e, 0x5f, 0xd0, 0xfc, 0xcd, - 0x82, 0xb1, 0x8f, 0xeb, 0x5f, 0xe3, 0xf3, 0xd5, - 0xc7, 0x9e, 0xa2, 0x31, 0x31, 0xee, 0x61, 0x29, - 0xe8, 0xe1, 0x8f, 0xe7, 0x9b, 0x94, 0x34, 0xec, - 0x18, 0xd4, 0xac, 0x30, 0xd9, 0xd5, 0x83, 0x08, - 0xba, 0x1d, 0x27, 0x08, 0xad, 0x89, 0x74, 0xcc, - 0xff, 0x5a, 0x8f, 0xc7, 0xca, 0x91, 0x57, 0xb3, - 0xf9, 0x8a, 0xc4, 0x33, 0xa2, 0xea, 0xa1, 0x60, - 0xc2, 0xfb, 0xea, 0xca, 0xf7, 0x97, 0xff, 0xb3, - 0x5a, 0xe3, 0x06, 0x45, 0x37, 0xf8, 0x48, 0xa8, - 0x51, 0x93, 0x71, 0xea, 0x5a, 0xfa, 0x7e, 0x32, - 0x68, 0x0a, 0x2f, 0x9d, 0x55, 0x94, 0x94, 0xe1, - 0x1c, 0x41, 0xce, 0x8d, 0xe6, 0x3b, 0xda, 0x32, - 0xb4, 0xf4, 0x90, 0xe6, 0xb0, 0x94, 0x17, 0x2e, - 0x5a, 0x36, 0xbb, 0x9b, 0xa1, 0x39, 0x1e, 0x69, - 0xf6, 0x2c, 0xca, 0x6e, 0xe1, 0xbb, 0x70, 0xd4, - 0x32, 0xdf, 0xd8, 0x88, 0x6b, 0x28, 0x14, 0x31 -//}; -//unsigned int sig_grpx_member0_sha512_bsn0_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha512_rndbase_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha512_rndbase_msg0.inc deleted file mode 100644 index e6a7db1da1..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member0/sig_sha512_rndbase_msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member0 - * HashAlg : Sha512 - * Message : "msg0" - * Basename: None (random base) - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha512_rndbase_msg0_dat[] = { - 0x43, 0xa4, 0x74, 0x4b, 0xcb, 0x17, 0xfa, 0xaf, - 0xb8, 0x6e, 0xb4, 0xca, 0x94, 0x4d, 0xe8, 0x5b, - 0x40, 0x88, 0x6c, 0x9c, 0xfa, 0xba, 0x4a, 0x4c, - 0x65, 0x94, 0xd1, 0x17, 0x90, 0x5b, 0x66, 0x12, - 0x46, 0xcf, 0xcc, 0x6e, 0x47, 0x2c, 0x0c, 0xa7, - 0x4e, 0xb4, 0x62, 0x57, 0xdc, 0x70, 0xbb, 0xd0, - 0x52, 0xa7, 0x38, 0x97, 0xec, 0x34, 0x8c, 0xfd, - 0xe6, 0x5f, 0xa1, 0x8b, 0x8a, 0x1e, 0x0c, 0x41, - 0xa9, 0x86, 0x53, 0x85, 0x0e, 0xaa, 0xc2, 0x1d, - 0xe9, 0x42, 0x18, 0x2e, 0x1f, 0xca, 0xa0, 0x41, - 0x46, 0x04, 0x10, 0xb9, 0xc7, 0x15, 0x88, 0x41, - 0x92, 0x53, 0x7b, 0xb0, 0xc2, 0xf1, 0x96, 0x8f, - 0xc8, 0xe7, 0x4a, 0x43, 0x0a, 0xa2, 0x92, 0x08, - 0xd3, 0xdb, 0x09, 0xae, 0x31, 0x6c, 0xef, 0x9f, - 0xb7, 0x58, 0x4b, 0x41, 0x69, 0xf7, 0x5b, 0xbc, - 0x62, 0x3b, 0xa9, 0x9f, 0x4b, 0xcb, 0x17, 0x6f, - 0x26, 0xce, 0x54, 0x7e, 0xaa, 0x3c, 0x1a, 0xfd, - 0xab, 0x3a, 0x67, 0x11, 0x89, 0x16, 0xac, 0xfa, - 0xbf, 0xfb, 0x17, 0x6e, 0x39, 0xd1, 0x5a, 0x88, - 0x02, 0xf3, 0x14, 0xaa, 0x5c, 0xef, 0xa1, 0x69, - 0xb1, 0x76, 0x82, 0x72, 0x9c, 0xaa, 0x20, 0xb2, - 0xa6, 0x21, 0xac, 0x60, 0x77, 0x0b, 0xbb, 0x24, - 0x6f, 0x14, 0x9e, 0xea, 0x87, 0xb0, 0x91, 0x70, - 0xf9, 0x05, 0x18, 0x62, 0x32, 0x03, 0xb9, 0x95, - 0xad, 0xce, 0x40, 0x1f, 0x00, 0x33, 0x64, 0xf7, - 0x2a, 0xd9, 0xea, 0xeb, 0x4f, 0x5b, 0x6a, 0xbb, - 0x23, 0x56, 0x74, 0x31, 0xa7, 0x44, 0xae, 0xdd, - 0x60, 0x01, 0xa9, 0xb4, 0x82, 0xed, 0x55, 0xcd, - 0x81, 0x39, 0x40, 0xf1, 0xf3, 0x25, 0x7e, 0x27, - 0xfa, 0x5e, 0x44, 0xc6, 0x40, 0xfd, 0xde, 0x0b, - 0xab, 0xae, 0x53, 0xf5, 0x05, 0x78, 0xd3, 0xeb, - 0x1f, 0x4f, 0xb2, 0x56, 0x48, 0xe9, 0x08, 0xb1, - 0xa4, 0xc6, 0xbc, 0x20, 0x8c, 0xf4, 0x5e, 0x65, - 0xd7, 0x52, 0x59, 0x66, 0xe3, 0xf6, 0xbc, 0xc2, - 0x23, 0x29, 0x4a, 0x98, 0x53, 0x1c, 0xf5, 0x37, - 0x2a, 0x8b, 0x3b, 0x42, 0xf2, 0x10, 0xb4, 0x33, - 0x8b, 0xd6, 0x54, 0x83, 0xc3, 0x8d, 0x2c, 0x77, - 0x46, 0xae, 0x09, 0xc0, 0x47, 0xb7, 0x33, 0x59, - 0xe0, 0xc7, 0x0f, 0xbb, 0xea, 0x42, 0xdf, 0xb6, - 0xa9, 0x19, 0xd4, 0x9a, 0xfd, 0x5f, 0x82, 0x18, - 0x3e, 0x97, 0x89, 0x79, 0xca, 0x92, 0xed, 0x33, - 0xa3, 0xc3, 0x8e, 0x34, 0xf0, 0x03, 0xb5, 0x83, - 0x28, 0x6f, 0x5f, 0x0c, 0x35, 0xee, 0x0f, 0x16, - 0x3e, 0xdd, 0xb3, 0xd4, 0x5d, 0x0b, 0xa5, 0x26, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xce, 0x9d, 0x84, 0x2d, 0xf0, 0x21, 0xe7, 0x25, - 0x11, 0xb5, 0xee, 0xb0, 0x4a, 0x4e, 0x8c, 0x3f, - 0x83, 0xd0, 0x91, 0xf2, 0x15, 0x88, 0xe3, 0x8c, - 0x9a, 0x24, 0xca, 0xea, 0x34, 0x4f, 0xa8, 0xee, - 0x3c, 0xf6, 0x8c, 0x62, 0xff, 0xa2, 0x93, 0x49, - 0x4d, 0xb9, 0x39, 0x25, 0xcb, 0x1b, 0x7e, 0x9b, - 0xef, 0xb6, 0xde, 0x4e, 0xc0, 0x80, 0x27, 0xac, - 0xdd, 0xf8, 0x34, 0xa2, 0xb4, 0x4b, 0x29, 0x04, - 0xd6, 0xc4, 0x98, 0x3a, 0x9c, 0x23, 0xec, 0xf5, - 0x90, 0x44, 0xfb, 0x04, 0x15, 0x77, 0xdd, 0x1c, - 0x3e, 0x6e, 0xc2, 0x97, 0x0c, 0x77, 0x83, 0x95, - 0xe4, 0x49, 0xdf, 0x28, 0x38, 0x80, 0x97, 0x70, - 0xa0, 0xf2, 0xa2, 0xb0, 0x23, 0x64, 0xce, 0x4b, - 0x7e, 0x1e, 0xd5, 0x07, 0x80, 0x3a, 0xe0, 0xb5, - 0xa6, 0xf2, 0x82, 0xa3, 0x3a, 0xd0, 0x5f, 0xe9, - 0x2b, 0x61, 0xb2, 0x15, 0x8e, 0x19, 0x81, 0x84, - 0x64, 0x4f, 0x9e, 0x3d, 0xc4, 0x94, 0xad, 0x9f, - 0x7c, 0x81, 0x16, 0x70, 0xb0, 0x93, 0xea, 0x7d, - 0x34, 0x55, 0xe7, 0xd0, 0xae, 0x24, 0xa7, 0x54, - 0xa5, 0x19, 0x0c, 0x71, 0x50, 0xea, 0x93, 0x07, - 0xbd, 0x67, 0xdf, 0xa3, 0x9a, 0xbe, 0xf8, 0x89, - 0xca, 0xe2, 0xab, 0xb3, 0xb1, 0xd2, 0xf2, 0x05, - 0xab, 0xa2, 0x1e, 0xa7, 0xda, 0xf4, 0x27, 0x83, - 0x8f, 0xee, 0xe1, 0x31, 0x82, 0x1b, 0x5d, 0x29, - 0xb1, 0x23, 0x11, 0x64, 0x86, 0x70, 0x99, 0x06, - 0x6d, 0xaf, 0xc2, 0xeb, 0xd2, 0x1a, 0xb7, 0x2f, - 0x92, 0x0b, 0x33, 0xfe, 0x5d, 0x9b, 0xc6, 0xdd, - 0x39, 0x84, 0xbe, 0xbf, 0x05, 0xff, 0x92, 0x9a, - 0x52, 0x08, 0x24, 0xb6, 0xc3, 0xa8, 0x84, 0x39, - 0xda, 0xf8, 0x26, 0xcb, 0x56, 0x12, 0xb5, 0xd3, - 0x03, 0x54, 0x3d, 0xf3, 0xf9, 0x36, 0xf4, 0xff, - 0xc4, 0xf6, 0x1f, 0x15, 0xed, 0x70, 0x18, 0x0a, - 0x38, 0x08, 0x6f, 0xf6, 0x3a, 0x61, 0x2d, 0x43, - 0x4a, 0x04, 0x48, 0x3f, 0xe9, 0xe8, 0x8c, 0xc7, - 0xd9, 0x18, 0x86, 0xfb, 0x7c, 0xc3, 0xa6, 0x87, - 0x66, 0xdc, 0x94, 0x65, 0x19, 0x0f, 0xe3, 0x69, - 0x09, 0x34, 0x4c, 0x47, 0x0a, 0xc1, 0x5f, 0x41, - 0xb6, 0x18, 0x3d, 0x5a, 0xfb, 0xf2, 0x52, 0x9a, - 0xc1, 0xbe, 0x1e, 0x86, 0x25, 0xe8, 0xd4, 0xa7, - 0xa9, 0x79, 0x03, 0x7b, 0xea, 0x44, 0x5e, 0x84, - 0x2d, 0x21, 0x27, 0x52, 0x65, 0xf4, 0x36, 0x78, - 0x89, 0x0a, 0xcb, 0x3e, 0x00, 0x08, 0xb9, 0x43, - 0xc9, 0x50, 0xf2, 0xfe, 0x1a, 0x15, 0x8b, 0xdf, - 0xac, 0xa8, 0x23, 0x73, 0xc8, 0xab, 0x8d, 0xa2, - 0x62, 0x62, 0x7b, 0xdd, 0x5c, 0x05, 0x36, 0x3a, - 0x08, 0xe5, 0xca, 0x9f, 0x1b, 0x38, 0x11, 0x43, - 0xb9, 0xc5, 0x5d, 0x84, 0x7f, 0xfc, 0x8c, 0x88, - 0x28, 0x84, 0x0a, 0xda, 0x90, 0xe0, 0x98, 0x29, - 0x9a, 0xae, 0x3a, 0x2d, 0xae, 0xc2, 0x45, 0xa3, - 0x92, 0xbd, 0xb6, 0x2b, 0x2c, 0xae, 0xb2, 0x7a, - 0x91, 0x73, 0x27, 0x09, 0xcf, 0xf3, 0x71, 0xdf, - 0xf9, 0xbd, 0x6d, 0xee, 0xd6, 0x1c, 0xd8, 0x8b, - 0xf5, 0xc1, 0x84, 0x93, 0xc1, 0x8d, 0x60, 0xec, - 0x6d, 0x98, 0x19, 0xf5, 0x39, 0xbd, 0x51, 0x31, - 0xd6, 0xc8, 0x3c, 0x28, 0xf9, 0xf5, 0x36, 0xfe, - 0x43, 0xd9, 0xf5, 0x3b, 0x13, 0x41, 0xda, 0x48, - 0xbc, 0x1f, 0x64, 0xb3, 0x70, 0x68, 0xa0, 0xda, - 0xea, 0xad, 0x70, 0xed, 0x5c, 0x80, 0x40, 0x3c, - 0xc0, 0x77, 0x18, 0x97, 0x0a, 0x60, 0x11, 0x05, - 0xcc, 0x2a, 0x91, 0x40, 0xa5, 0x5e, 0x0b, 0x14 -//}; -//unsigned int sig_grpx_member0_sha512_rndbase_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member1/mprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member1/mprivkey.inc deleted file mode 100644 index 62a5e29941..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member1/mprivkey.inc +++ /dev/null @@ -1,44 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : member1 - */ -//unsigned char mprivkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x14, 0x26, 0x0f, 0x4c, 0x15, 0xb6, 0xea, 0x44, - 0x5f, 0x3c, 0x01, 0xc2, 0xad, 0xe7, 0x00, 0x63, - 0x41, 0xa8, 0xff, 0xa3, 0x7a, 0x10, 0x00, 0x80, - 0xdf, 0xb0, 0x9c, 0x1e, 0x77, 0x19, 0x72, 0x6e, - 0x47, 0x4e, 0x27, 0x8c, 0xfb, 0x1d, 0x86, 0xf7, - 0x03, 0x85, 0x27, 0x93, 0xac, 0x0a, 0xbe, 0x94, - 0x24, 0x79, 0x23, 0x21, 0x0a, 0x80, 0xac, 0x00, - 0xdd, 0x78, 0xd8, 0x68, 0xb4, 0xf4, 0x81, 0x6c, - 0x0c, 0x89, 0x68, 0x9d, 0x6b, 0x0a, 0x77, 0x6c, - 0x7a, 0xdb, 0x96, 0xea, 0xaa, 0x8a, 0x47, 0xd2, - 0x59, 0xc6, 0x98, 0xde, 0x47, 0xb2, 0xc7, 0xab, - 0xf0, 0xb4, 0xac, 0x1c, 0x58, 0xe7, 0x20, 0x1f, - 0x5b, 0xcc, 0xd0, 0xef, 0x05, 0x3c, 0x02, 0x94, - 0xee, 0xaf, 0x1e, 0x12, 0x90, 0xd9, 0xc6, 0x05, - 0x36, 0x75, 0xc7, 0x46, 0x3c, 0x6c, 0x19, 0xaf, - 0xbe, 0xe7, 0x43, 0x88, 0x6c, 0x08, 0xa2, 0xb5 -//}; -//unsigned int mprivkey_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member1/sig_sha256_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member1/sig_sha256_bsn0_msg0.inc deleted file mode 100644 index 0b729f5218..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/member1/sig_sha256_bsn0_msg0.inc +++ /dev/null @@ -1,136 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : member1 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ - -//unsigned char sig_sha256_bsn0_msg0_dat[] = { - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0xfa, 0xd0, 0x0a, 0x0a, 0x32, 0xc3, 0xf4, 0x37, - 0x41, 0x79, 0x5d, 0xfe, 0xe4, 0x86, 0x46, 0x9b, - 0x92, 0x68, 0xae, 0xd4, 0xd0, 0xc9, 0x6f, 0xfa, - 0x2c, 0xe4, 0xf8, 0x19, 0x62, 0x8f, 0x63, 0x59, - 0x34, 0xf2, 0x9c, 0xae, 0x5e, 0x09, 0x42, 0x91, - 0x16, 0x5b, 0x78, 0x3f, 0x77, 0xa4, 0xb7, 0xef, - 0x33, 0xf7, 0x50, 0x0b, 0x7d, 0x6b, 0xa9, 0x0e, - 0xce, 0x78, 0x21, 0xd7, 0xdd, 0x63, 0x21, 0x20, - 0xda, 0xdc, 0xa0, 0x5f, 0xa0, 0x1e, 0xf3, 0x08, - 0x18, 0xd4, 0x0d, 0x33, 0x90, 0x36, 0x2b, 0xc6, - 0x30, 0xa8, 0x4a, 0xce, 0x8b, 0xf4, 0xfa, 0x09, - 0x8e, 0x37, 0x01, 0x19, 0x56, 0xd7, 0x73, 0xec, - 0x78, 0xd4, 0x2d, 0x3f, 0x64, 0x51, 0xe8, 0xf8, - 0x98, 0x70, 0x9e, 0x13, 0xd0, 0xca, 0xcf, 0x91, - 0x86, 0x54, 0x47, 0xea, 0xe7, 0x37, 0x3e, 0x8a, - 0x98, 0x0f, 0x16, 0x4b, 0xfb, 0xe0, 0x39, 0xa7, - 0x94, 0x12, 0x20, 0x27, 0x95, 0x40, 0xc0, 0x80, - 0x1c, 0x22, 0x36, 0x27, 0xd4, 0x67, 0x3e, 0xc2, - 0x8a, 0x68, 0xfb, 0x60, 0x15, 0x16, 0x52, 0xf1, - 0x6c, 0xdd, 0x8f, 0xf6, 0xbb, 0x28, 0x13, 0x0e, - 0xb4, 0x00, 0x22, 0x81, 0xf0, 0x4a, 0xeb, 0x1a, - 0x74, 0x07, 0x1e, 0x5f, 0xd6, 0xa1, 0x03, 0x35, - 0xa4, 0x48, 0x4a, 0x0f, 0x0a, 0xa4, 0x30, 0x4a, - 0x02, 0x52, 0xa7, 0xac, 0xdf, 0xf0, 0xf4, 0x3c, - 0xe1, 0xc6, 0xbd, 0xe1, 0x12, 0x70, 0x09, 0x0a, - 0x79, 0x83, 0x35, 0x85, 0x64, 0x93, 0xca, 0xb5, - 0xd7, 0x3d, 0x9b, 0xe7, 0xf0, 0x8f, 0xcf, 0x53, - 0xb5, 0xb0, 0x37, 0x95, 0x08, 0x72, 0x39, 0x89, - 0x3a, 0x3a, 0xf2, 0x9e, 0x5e, 0x04, 0xdd, 0x1d, - 0x0e, 0x55, 0x60, 0xef, 0x01, 0xe2, 0x51, 0x58, - 0xef, 0x3b, 0xe4, 0xab, 0x7f, 0x5d, 0x50, 0x5a, - 0x2d, 0xfd, 0x5f, 0x86, 0xd6, 0x0f, 0xbf, 0x77, - 0x7f, 0x64, 0xba, 0x95, 0xe8, 0x81, 0x4d, 0x8b, - 0xb9, 0xf4, 0x4d, 0x02, 0x29, 0x22, 0x37, 0x45, - 0xb4, 0x83, 0x31, 0x84, 0x39, 0x49, 0x97, 0xac, - 0x70, 0xe9, 0x15, 0xf3, 0xe5, 0x38, 0x01, 0x53, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xcb, 0xd2, 0x73, 0x50, 0x7b, 0x1d, 0xb4, 0x93, - 0xde, 0xe8, 0x23, 0x9c, 0xee, 0x77, 0x21, 0x0f, - 0x76, 0xf6, 0xec, 0x66, 0x0d, 0x26, 0xd9, 0x8a, - 0x08, 0x29, 0x7c, 0x40, 0x16, 0xf8, 0x9d, 0xdf, - 0x84, 0x0c, 0xf7, 0x7c, 0x74, 0x01, 0xd8, 0xe7, - 0xed, 0x83, 0x82, 0x2f, 0x0d, 0xfc, 0x77, 0x63, - 0xb6, 0x72, 0xba, 0xc1, 0x8e, 0x13, 0xd4, 0xcd, - 0x1f, 0x50, 0x95, 0x8f, 0x56, 0x89, 0x64, 0x1a, - 0x38, 0xbe, 0x82, 0x38, 0x24, 0x2b, 0xcc, 0x1b, - 0x76, 0xac, 0x31, 0xf7, 0x91, 0x49, 0x33, 0x48, - 0x05, 0x71, 0x73, 0x3c, 0xed, 0x26, 0x22, 0x26, - 0x2b, 0xca, 0x11, 0x5b, 0xb5, 0xc4, 0x13, 0x33, - 0x70, 0x43, 0xa6, 0x6f, 0x0f, 0x97, 0x92, 0xe7, - 0x71, 0xa4, 0x96, 0x79, 0x9f, 0xa3, 0x21, 0x10, - 0xb8, 0xc2, 0x9c, 0x30, 0x73, 0x72, 0x16, 0x85, - 0x2f, 0xac, 0x76, 0xfd, 0x90, 0x88, 0x03, 0x58, - 0x5b, 0xb5, 0x40, 0x40, 0xf9, 0x76, 0x39, 0x50, - 0x15, 0x8a, 0x39, 0xb5, 0x93, 0x68, 0xe1, 0x1d, - 0xcb, 0xce, 0x54, 0xe1, 0x50, 0xd9, 0xed, 0x75, - 0x6e, 0x28, 0x67, 0x9d, 0xb6, 0x80, 0x91, 0x7e, - 0x8e, 0xd9, 0x01, 0xd0, 0x45, 0xd7, 0xa9, 0x32, - 0xd1, 0xd6, 0x62, 0x48, 0x5e, 0xa9, 0xb9, 0x08, - 0x3a, 0x01, 0xa7, 0x7b, 0xa1, 0x1e, 0x58, 0x13, - 0xb3, 0x63, 0x4b, 0x1c, 0x14, 0x17, 0x3e, 0xe6, - 0x02, 0xe1, 0x76, 0x80, 0xda, 0xd5, 0x5b, 0xed, - 0x9d, 0xae, 0x05, 0x7e, 0x69, 0xb1, 0xbd, 0xc6, - 0x2c, 0x46, 0x28, 0x9d, 0x74, 0xd6, 0x19, 0xd8, - 0xb4, 0x50, 0x08, 0xb5, 0xb9, 0x51, 0x9a, 0xef, - 0xf7, 0x1d, 0x74, 0xf0, 0xf8, 0x65, 0x6f, 0x9e, - 0x8a, 0xb6, 0x77, 0x12, 0x95, 0x92, 0x91, 0xec, - 0x6b, 0x64, 0xfa, 0xd3, 0xc1, 0x08, 0x52, 0x0f, - 0xc9, 0x97, 0xcd, 0xd6, 0xda, 0x1b, 0x04, 0x01, - 0x2c, 0x51, 0xbd, 0x09, 0x39, 0x26, 0x8c, 0x70, - 0x46, 0x68, 0x4d, 0xf6, 0x07, 0xb8, 0x26, 0xb4, - 0xb2, 0xf9, 0x7a, 0x3b, 0x9b, 0x23, 0xbf, 0xed, - 0xfe, 0xca, 0x42, 0x73, 0x50, 0xe2, 0xf8, 0x9b, - 0x95, 0xf6, 0x22, 0x82, 0xa6, 0xfd, 0xfe, 0x75, - 0x9c, 0x9d, 0x0e, 0x13, 0xdd, 0xb5, 0xfc, 0x2a, - 0xc7, 0x59, 0x8f, 0xa8, 0xf5, 0x8c, 0xe1, 0x8b, - 0xd3, 0x95, 0xc2, 0x24, 0x9e, 0x62, 0x54, 0x34, - 0x17, 0x78, 0x84, 0xd8, 0x26, 0x82, 0x82, 0x41, - 0xbd, 0x66, 0xd2, 0xa1, 0x0a, 0x6a, 0xef, 0x98, - 0x0f, 0x3b, 0x79, 0xed, 0x1e, 0xb1, 0xb0, 0xce, - 0x33, 0x7a, 0x33, 0xfe, 0x73, 0x5e, 0x3f, 0x22, - 0xea, 0xb2, 0x08, 0xc3, 0x65, 0xa6, 0x5d, 0x00, - 0x07, 0xd4, 0xa9, 0x17, 0x86, 0xa7, 0x50, 0xa9, - 0x4f, 0xdf, 0xe0, 0x80, 0x3a, 0xcd, 0x16, 0x09, - 0x42, 0xa5, 0xc0, 0x50, 0xff, 0xba, 0xf2, 0xd3, - 0x6e, 0x6a, 0x20, 0x66, 0x15, 0x52, 0x51, 0x7b, - 0xb8, 0x0b, 0x71, 0x69, 0x5c, 0x4c, 0xd0, 0x74, - 0x60, 0x44, 0x65, 0x58, 0x19, 0x62, 0x1d, 0x0f, - 0x4b, 0xea, 0x7a, 0xb6, 0x3c, 0x54, 0x81, 0xd2, - 0xec, 0x53, 0xcf, 0x16, 0x4a, 0x1d, 0xfa, 0x01, - 0x94, 0xc7, 0x9e, 0x53, 0xbb, 0xa6, 0xe0, 0xb5, - 0x33, 0x6f, 0x9d, 0x6e, 0x81, 0x79, 0x18, 0x30, - 0xf9, 0x7b, 0xbb, 0x97, 0xf5, 0x9f, 0xa6, 0x1c, - 0xaa, 0x59, 0xd2, 0xe0, 0xf8, 0xc8, 0xc8, 0x56, - 0xbb, 0x91, 0x97, 0x29, 0xaf, 0xad, 0xc1, 0x5f, - 0x0d, 0x8e, 0x5a, 0x12, 0x8a, 0xc1, 0x64, 0x3c, - 0x2a, 0x82, 0x7b, 0xef, 0xfb, 0x67, 0xdc, 0x58 -//}; -//unsigned int sig_sha256_bsn0_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey000.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey000.inc deleted file mode 100644 index 895fc7d395..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey000.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : privrevokedmember000 (revoked in grpX privrl) - */ - -//unsigned char mprivatekey000_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x1b, 0x31, 0xd8, 0x78, 0x27, 0xc5, 0x4a, 0x53, - 0x64, 0xe2, 0xcb, 0x12, 0x10, 0xcb, 0xfb, 0xb5, - 0x12, 0x03, 0x81, 0x3c, 0xee, 0x99, 0xbe, 0xb3, - 0x8b, 0xfe, 0xe9, 0xb9, 0x3f, 0x79, 0xcf, 0xe4, - 0xa3, 0x0f, 0x5c, 0xba, 0x7f, 0x4a, 0x9e, 0x34, - 0xda, 0x75, 0x97, 0x3d, 0x85, 0x44, 0x0b, 0x75, - 0x00, 0x80, 0x65, 0x53, 0x51, 0x07, 0x40, 0xcc, - 0xe7, 0x0f, 0x52, 0x49, 0xf4, 0xb6, 0x90, 0xe0, - 0x8f, 0xf3, 0x60, 0xe2, 0xe8, 0x01, 0x1d, 0xbb, - 0x02, 0xa3, 0x49, 0x99, 0xc5, 0x89, 0xfa, 0x40, - 0xbc, 0x65, 0xe7, 0x64, 0x1e, 0x1a, 0x0e, 0xe1, - 0xa0, 0x8e, 0xe0, 0x4a, 0x69, 0xeb, 0x65, 0x23, - 0xb1, 0x58, 0x6e, 0x93, 0x42, 0x67, 0x51, 0xfb, - 0x1b, 0x42, 0x4f, 0x0b, 0xe5, 0x11, 0x44, 0x6b, - 0xdd, 0x8b, 0xe8, 0xe9, 0x44, 0x09, 0x70, 0x6a, - 0xab, 0xaf, 0x54, 0xd8, 0x4a, 0xd3, 0x3d, 0x7c -//}; -//unsigned int mprivatekey000_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey001.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey001.inc deleted file mode 100644 index e9d5161359..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey001.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : privrevokedmember001 (revoked in grpX privrl) - */ - -//unsigned char mprivatekey001_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xae, 0x8f, 0x73, 0x56, 0xd4, 0xd4, 0x95, 0x28, - 0x0a, 0x9b, 0xb4, 0x57, 0x65, 0x8b, 0x68, 0x82, - 0x58, 0x42, 0x3f, 0x75, 0x0f, 0x60, 0x15, 0xc2, - 0x83, 0x26, 0x3b, 0xa6, 0x74, 0xab, 0x5f, 0x7a, - 0xc7, 0x99, 0x84, 0x0d, 0xe4, 0xed, 0xa7, 0x11, - 0xd9, 0x8a, 0xd0, 0x08, 0xb0, 0x1c, 0x29, 0x75, - 0x71, 0x99, 0xf5, 0x11, 0x7d, 0xf3, 0xa5, 0x55, - 0xae, 0xaf, 0x71, 0x1b, 0x25, 0x93, 0xbd, 0x30, - 0x50, 0x08, 0x2f, 0xb9, 0x46, 0x89, 0xbf, 0x9d, - 0xf5, 0xae, 0x5f, 0x4d, 0x28, 0x5c, 0x5c, 0x19, - 0x58, 0xfb, 0xec, 0xac, 0xac, 0xe1, 0x16, 0x27, - 0xd3, 0x19, 0x07, 0x76, 0x2c, 0x20, 0x29, 0xec, - 0xfb, 0x9c, 0x7f, 0x54, 0x34, 0xba, 0xc2, 0xdb, - 0x2b, 0xec, 0xca, 0x08, 0xf8, 0x19, 0x3f, 0x79, - 0xee, 0x02, 0x01, 0x1f, 0x7c, 0x6a, 0x3a, 0xdb, - 0x6b, 0x42, 0x31, 0xc7, 0x09, 0x4e, 0xb0, 0x1b -//}; -//unsigned int mprivatekey001_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey002.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey002.inc deleted file mode 100644 index 8e9af9d1ef..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/mprivatekey002.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : privrevokedmember002 (revoked in grpX privrl) - */ - -//unsigned char mprivatekey002_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xbb, 0x31, 0x32, 0x47, 0xde, 0xe1, 0xd5, 0x97, - 0xe9, 0xdf, 0x2a, 0xa1, 0x3b, 0xb4, 0x0d, 0x84, - 0xf0, 0x01, 0x61, 0x74, 0x9e, 0xde, 0x47, 0x9c, - 0xfa, 0xcc, 0x73, 0x63, 0x6e, 0x63, 0x8d, 0x5c, - 0xf8, 0x1c, 0xe8, 0x32, 0x5f, 0x1c, 0xed, 0xde, - 0x82, 0xc4, 0x29, 0x28, 0x8d, 0xf2, 0x5e, 0x4f, - 0xd6, 0x16, 0x9e, 0x87, 0xa2, 0x65, 0x61, 0x31, - 0x25, 0x8a, 0x81, 0xb5, 0x60, 0xf2, 0x08, 0xc9, - 0x83, 0x8d, 0xbe, 0x69, 0xb1, 0x8d, 0x0f, 0x4a, - 0x55, 0x1d, 0xdb, 0x72, 0x84, 0x33, 0x45, 0x02, - 0x34, 0xcd, 0x76, 0x94, 0x2b, 0xd6, 0x89, 0xab, - 0xa6, 0x9a, 0x87, 0x60, 0x54, 0x37, 0x5f, 0x04, - 0x8d, 0xa3, 0xbf, 0xfa, 0xd1, 0x1d, 0x03, 0x29, - 0x17, 0xca, 0xcd, 0x01, 0xda, 0x76, 0x49, 0x3b, - 0x97, 0xc9, 0xd3, 0xf5, 0x13, 0x75, 0xbe, 0x70, - 0xc4, 0x24, 0x43, 0xff, 0xaa, 0x44, 0x67, 0xba -//}; -//unsigned int mprivatekey002_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey000.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey000.inc deleted file mode 100644 index a27ba107ea..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey000.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data for revoked privrl. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : privrevoked/member000 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha256_bsn0_msg0_dat[] = { - 0x70, 0x91, 0x63, 0x2C, 0xBB, 0xFE, 0x06, 0x26, - 0x5F, 0x20, 0xBD, 0x9E, 0x49, 0x11, 0x31, 0xE0, - 0x7C, 0x99, 0x5E, 0xA0, 0x58, 0x4F, 0x1B, 0x3F, - 0xB4, 0x6E, 0xCD, 0x17, 0x61, 0x79, 0xA0, 0xFD, - 0x64, 0x60, 0xA4, 0xF8, 0x17, 0x81, 0xC3, 0x0A, - 0x4B, 0x6A, 0x72, 0x86, 0x96, 0xE3, 0xFA, 0x95, - 0x47, 0x45, 0xFB, 0x57, 0xEF, 0xCA, 0x82, 0x99, - 0x72, 0xDC, 0xE6, 0x78, 0xE3, 0x70, 0xA8, 0x28, - 0x38, 0xF7, 0x31, 0x44, 0xE9, 0xD3, 0xC8, 0xA8, - 0xF9, 0x72, 0x0D, 0x4F, 0xB5, 0x5E, 0x64, 0xD0, - 0x36, 0x0C, 0xEE, 0x7D, 0x67, 0x92, 0xD8, 0xF7, - 0xCB, 0x3C, 0xA3, 0x86, 0x06, 0x14, 0x6F, 0x79, - 0xAB, 0xB6, 0x8E, 0x27, 0x72, 0xBF, 0x87, 0x3D, - 0x3C, 0x28, 0xB6, 0xC4, 0x2D, 0x21, 0x2E, 0xBA, - 0x4E, 0x15, 0xA7, 0xFE, 0xD3, 0xF9, 0x5D, 0x8B, - 0x86, 0xD9, 0x1D, 0x6E, 0xD3, 0xAA, 0x3C, 0x8D, - 0xF4, 0xE8, 0x5D, 0x34, 0xEB, 0xB1, 0x28, 0x15, - 0x86, 0x0C, 0x17, 0x5E, 0x9F, 0x37, 0x02, 0x3C, - 0xDA, 0xF2, 0xAD, 0x95, 0xF8, 0x55, 0xB2, 0xCD, - 0x19, 0x12, 0x8F, 0xD8, 0xAB, 0x23, 0xC2, 0x51, - 0x22, 0x58, 0x2F, 0x9A, 0x86, 0x6D, 0x89, 0x44, - 0x78, 0x78, 0xEB, 0x4F, 0xA2, 0xD7, 0x06, 0x3A, - 0xBE, 0xCC, 0x27, 0x8E, 0x24, 0x07, 0x84, 0x10, - 0x9B, 0xBB, 0x1E, 0xC3, 0x1F, 0x96, 0xE8, 0x5F, - 0xDF, 0xC9, 0xFA, 0x8A, 0xDF, 0xB7, 0x1E, 0x4A, - 0x0E, 0x65, 0xE0, 0x1A, 0x1C, 0x74, 0xA0, 0xFE, - 0x4C, 0xD0, 0xDC, 0xB4, 0xEB, 0xA8, 0x03, 0xE0, - 0x89, 0xBC, 0x85, 0x5E, 0x82, 0xC8, 0xC5, 0x3D, - 0x0F, 0x29, 0xB9, 0x90, 0xA0, 0xBC, 0xB3, 0x73, - 0xAF, 0xF5, 0xEF, 0xA6, 0x55, 0x66, 0x23, 0x80, - 0x82, 0x6D, 0x53, 0xAB, 0x75, 0xAA, 0x9B, 0x08, - 0xDB, 0x2A, 0x72, 0x73, 0x88, 0x25, 0x91, 0x52, - 0xC3, 0x89, 0x4C, 0xD6, 0x24, 0x65, 0xB0, 0x30, - 0x09, 0x03, 0xAE, 0x24, 0x4D, 0x4B, 0x65, 0x66, - 0x7B, 0xA1, 0x2B, 0x36, 0xE6, 0xD8, 0x5C, 0x71, - 0xE6, 0xE0, 0xBB, 0x9F, 0x82, 0x0C, 0x53, 0x61, - 0xF8, 0xAB, 0x62, 0x48, 0x96, 0x4F, 0x04, 0xB9, - 0x31, 0x0C, 0x76, 0x62, 0x8A, 0xFB, 0x58, 0x56, - 0xA5, 0x3B, 0xF0, 0xB8, 0xE9, 0x8F, 0xE1, 0x47, - 0x12, 0x75, 0x2A, 0x30, 0x28, 0x93, 0xA9, 0xF0, - 0xEE, 0x22, 0xB0, 0x66, 0xFB, 0x0C, 0x2B, 0x09, - 0xAD, 0x07, 0x3C, 0x51, 0xFE, 0xD6, 0x8E, 0xED, - 0xC3, 0xFC, 0x68, 0x29, 0x0A, 0x1A, 0xB9, 0xD1, - 0x27, 0xAC, 0x52, 0xA0, 0x79, 0x5D, 0x44, 0x08, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xBC, 0xB0, 0x1D, 0x71, 0x43, 0xB1, 0x9C, 0x54, - 0x8E, 0x87, 0xE6, 0x61, 0x77, 0x78, 0xF6, 0x37, - 0x82, 0x49, 0xFB, 0xDA, 0x62, 0x38, 0x49, 0xE1, - 0xBA, 0x59, 0x89, 0x47, 0x40, 0xF1, 0xAE, 0x8D, - 0x80, 0x7B, 0xAC, 0xEF, 0x9E, 0x80, 0x43, 0xF4, - 0xF0, 0xDE, 0x7E, 0x77, 0x2A, 0x2B, 0x20, 0xAD, - 0x2C, 0x74, 0x19, 0xD8, 0x73, 0x64, 0xE9, 0xC1, - 0x00, 0x35, 0x77, 0xE2, 0x16, 0x02, 0x81, 0xE1, - 0x3D, 0x97, 0x90, 0x2F, 0x50, 0x46, 0xB4, 0x55, - 0x0F, 0x64, 0x1B, 0xEF, 0xA5, 0xA4, 0x80, 0x59, - 0x5D, 0xF2, 0xD5, 0x4D, 0x0C, 0x46, 0xBD, 0x28, - 0xCC, 0x98, 0xE8, 0x04, 0xB8, 0x07, 0x2A, 0x57, - 0xBD, 0xCE, 0x84, 0x1B, 0x8F, 0x85, 0x62, 0x5F, - 0x73, 0xBF, 0x71, 0x8C, 0xB5, 0xD5, 0x78, 0x45, - 0xB9, 0x7F, 0x93, 0xC3, 0x92, 0xCF, 0x06, 0xE9, - 0xD9, 0x25, 0x8E, 0x28, 0x51, 0x88, 0x26, 0x1D, - 0xE0, 0xAE, 0x4F, 0x9C, 0xED, 0xD2, 0x93, 0xA2, - 0xC8, 0x80, 0x32, 0x02, 0x67, 0xBB, 0x27, 0xDC, - 0x19, 0xF7, 0xB7, 0x67, 0xD1, 0xE3, 0x7E, 0xF1, - 0xB6, 0x16, 0x5A, 0xFE, 0xB6, 0x1C, 0x55, 0x5D, - 0x02, 0x86, 0x4F, 0xAB, 0x1E, 0xB2, 0x2A, 0xFD, - 0x91, 0xB6, 0x2B, 0x1A, 0x86, 0xFC, 0x14, 0x77, - 0xCB, 0xAD, 0x50, 0xC5, 0x9F, 0x7F, 0x9B, 0x86, - 0x0C, 0xD8, 0xAD, 0x3B, 0x17, 0xE6, 0x86, 0x6E, - 0x5B, 0x3B, 0xEE, 0x28, 0x9E, 0x79, 0xC5, 0x19, - 0x88, 0x5E, 0x9C, 0x5D, 0xD8, 0x44, 0x9C, 0x37, - 0xAD, 0x0E, 0x0E, 0x54, 0x8D, 0xB5, 0x42, 0x4C, - 0x52, 0xFB, 0xE4, 0x61, 0x2D, 0x32, 0x94, 0x77, - 0xF8, 0x19, 0x31, 0x92, 0x1A, 0x4B, 0x73, 0xB3, - 0xDE, 0x0E, 0x84, 0xD0, 0xBD, 0x55, 0xC4, 0xA6, - 0x5A, 0xDA, 0xD4, 0x3F, 0x86, 0xF5, 0xEB, 0x48, - 0x6B, 0xDA, 0xF5, 0xE9, 0x0A, 0x57, 0x4C, 0x87, - 0x87, 0x5C, 0x15, 0xFD, 0x48, 0x4E, 0xE3, 0xA0, - 0xC2, 0x7F, 0xE7, 0x3F, 0x25, 0x3D, 0x82, 0x1F, - 0xC8, 0xB0, 0x75, 0x59, 0x55, 0x9F, 0x5B, 0x51, - 0x97, 0xF0, 0xF5, 0xBC, 0xE1, 0xB0, 0xC1, 0x7D, - 0xD7, 0x32, 0xFB, 0xAE, 0x76, 0x96, 0xCE, 0x08, - 0xC0, 0xBA, 0x59, 0x4D, 0xE5, 0xDA, 0xFE, 0x4E, - 0xDD, 0x6D, 0xA8, 0x44, 0xC1, 0x0D, 0xEC, 0x1D, - 0xE0, 0xC1, 0xDF, 0x0B, 0xB8, 0x72, 0x5B, 0x2B, - 0x33, 0xBC, 0x50, 0xB4, 0x0C, 0x60, 0x14, 0x6A, - 0x3B, 0x47, 0xBC, 0x24, 0x68, 0x84, 0xEE, 0xD2, - 0x5F, 0xA5, 0xAC, 0x72, 0x87, 0xE4, 0x85, 0x23, - 0x36, 0x2B, 0x59, 0x51, 0x56, 0x71, 0x38, 0xB6, - 0x0D, 0x29, 0xC1, 0xFD, 0x07, 0xB0, 0x96, 0x7C, - 0xC2, 0x3F, 0x91, 0x17, 0x19, 0xC3, 0x1D, 0x4B, - 0xFE, 0x2A, 0xE8, 0x26, 0xB4, 0x11, 0x70, 0x54, - 0xB4, 0x44, 0x59, 0xCB, 0xB3, 0x16, 0xD4, 0x78, - 0x0E, 0xB6, 0x52, 0x47, 0x5F, 0xF5, 0x04, 0x61, - 0x71, 0xEA, 0x76, 0x53, 0x33, 0x6E, 0xEE, 0x84, - 0xF3, 0x8C, 0xCC, 0xC9, 0x67, 0xB7, 0xDE, 0xDF, - 0x2C, 0x49, 0x43, 0xD6, 0x7A, 0x8A, 0xB8, 0xFB, - 0x14, 0x9F, 0xD9, 0xC6, 0x00, 0x4D, 0xA3, 0x73, - 0x92, 0x50, 0x85, 0x9D, 0x92, 0x5A, 0x77, 0xC5, - 0x5A, 0xB2, 0x29, 0xB9, 0x97, 0x64, 0xE6, 0xF6, - 0x84, 0xE8, 0x9C, 0x68, 0x0D, 0xD7, 0x0E, 0xC2, - 0x63, 0x88, 0x9D, 0x83, 0x91, 0x14, 0x64, 0x99, - 0xAD, 0xBE, 0xBC, 0x35, 0x99, 0x76, 0x71, 0x4E, - 0x65, 0x79, 0x5E, 0xF5, 0x37, 0x09, 0x71, 0xF8, - 0x21, 0x00, 0xCA, 0x1B, 0x3F, 0xEF, 0x51, 0x1D -//}; -//unsigned int sig_grpx_member0_sha256_bsn0_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey001.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey001.inc deleted file mode 100644 index 58144224bc..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey001.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data for revoked privrl. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : privrevoked/member001 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha256_bsn0_msg0_dat[] = { - 0x70, 0x91, 0x63, 0x2C, 0xBB, 0xFE, 0x06, 0x26, - 0x5F, 0x20, 0xBD, 0x9E, 0x49, 0x11, 0x31, 0xE0, - 0x7C, 0x99, 0x5E, 0xA0, 0x58, 0x4F, 0x1B, 0x3F, - 0xB4, 0x6E, 0xCD, 0x17, 0x61, 0x79, 0xA0, 0xFD, - 0x64, 0x60, 0xA4, 0xF8, 0x17, 0x81, 0xC3, 0x0A, - 0x4B, 0x6A, 0x72, 0x86, 0x96, 0xE3, 0xFA, 0x95, - 0x47, 0x45, 0xFB, 0x57, 0xEF, 0xCA, 0x82, 0x99, - 0x72, 0xDC, 0xE6, 0x78, 0xE3, 0x70, 0xA8, 0x28, - 0x97, 0xD9, 0xAF, 0x30, 0xFA, 0x73, 0xBC, 0x33, - 0xA8, 0x5F, 0x52, 0x1A, 0x72, 0x93, 0xCF, 0xC3, - 0xA0, 0xE2, 0x73, 0x3C, 0xAA, 0x2A, 0x27, 0x52, - 0x21, 0x78, 0xD0, 0x7C, 0x74, 0x2E, 0xCB, 0xD5, - 0x80, 0x52, 0xCC, 0xDF, 0x55, 0x2A, 0xB9, 0x71, - 0x77, 0xE3, 0xCB, 0xAE, 0xC7, 0x55, 0x8A, 0xBF, - 0xDC, 0x55, 0x57, 0xD2, 0xFC, 0xE7, 0x33, 0xE9, - 0x58, 0x38, 0x0F, 0x36, 0x98, 0xD1, 0x50, 0xEE, - 0xB2, 0xCA, 0x4E, 0x22, 0x4B, 0xEB, 0xB8, 0x03, - 0x4A, 0x4F, 0x4D, 0xF6, 0x1A, 0x3D, 0xDD, 0x77, - 0x85, 0x4B, 0xC3, 0x8E, 0x3A, 0x26, 0x05, 0x7D, - 0x9B, 0xAF, 0x72, 0xC9, 0x04, 0x2C, 0x53, 0x4D, - 0x6B, 0x35, 0x26, 0x03, 0x2D, 0xA6, 0xB9, 0xFA, - 0x3D, 0x60, 0xCD, 0x95, 0x15, 0x81, 0x89, 0x72, - 0x88, 0x1E, 0x53, 0x20, 0x63, 0xC2, 0x1B, 0x5A, - 0x59, 0x48, 0xE5, 0x0F, 0xD6, 0xF5, 0x63, 0x3E, - 0x0C, 0x94, 0x8C, 0x3C, 0x18, 0x4C, 0x6A, 0x7C, - 0x6E, 0x51, 0xB2, 0x31, 0xFC, 0x35, 0xB4, 0x35, - 0xF3, 0x63, 0x69, 0x75, 0x31, 0x95, 0x2B, 0x1D, - 0x53, 0x2F, 0xC8, 0x59, 0x8F, 0xFD, 0xBA, 0x81, - 0xAE, 0xF8, 0x0A, 0x1B, 0xFE, 0xD1, 0xF0, 0x60, - 0xA8, 0x9C, 0xC6, 0x4E, 0x39, 0x7C, 0xC4, 0xFF, - 0xBB, 0xED, 0x4B, 0xC4, 0x66, 0xF2, 0xBE, 0xEA, - 0x83, 0x15, 0x7F, 0x62, 0xA7, 0xA0, 0x0E, 0x6A, - 0x68, 0xBF, 0xD6, 0xA5, 0xCE, 0xF4, 0x64, 0x85, - 0x9B, 0xAC, 0x97, 0xE8, 0x19, 0xDA, 0xCF, 0xCC, - 0xDF, 0xB5, 0x3E, 0xA5, 0xFC, 0xFD, 0x9C, 0x88, - 0x41, 0x54, 0x43, 0xA8, 0xF7, 0x86, 0xD3, 0x2E, - 0xC3, 0x27, 0x26, 0x23, 0x1C, 0x5C, 0xF8, 0xA8, - 0x4A, 0x9F, 0x52, 0x89, 0xEC, 0x71, 0x4D, 0x14, - 0xE1, 0x0E, 0x1A, 0x9C, 0x49, 0x2B, 0x39, 0xFD, - 0x8E, 0x87, 0x0A, 0x74, 0x2E, 0xAA, 0x91, 0xE8, - 0x7F, 0x06, 0xAD, 0x11, 0x9A, 0xA9, 0x33, 0x36, - 0x26, 0xA3, 0x21, 0xE8, 0xEF, 0x06, 0x7F, 0x36, - 0x2D, 0xEF, 0xAE, 0x63, 0x8A, 0x1A, 0xFC, 0xAD, - 0x72, 0xFF, 0xCA, 0x7B, 0xFF, 0xED, 0xD2, 0xCB, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x11, 0xBC, 0x6D, 0x79, 0x07, 0x9D, 0x50, 0x47, - 0xA4, 0x1D, 0x04, 0xBB, 0xEC, 0xBE, 0xEB, 0x07, - 0xCF, 0xB3, 0x5A, 0xC8, 0xBA, 0xB7, 0xCE, 0x92, - 0x72, 0x5F, 0xA5, 0xDA, 0x89, 0xDF, 0xC6, 0xEB, - 0x35, 0xDC, 0x53, 0x3C, 0xD8, 0x32, 0x7B, 0xD3, - 0xE7, 0xBD, 0x76, 0x28, 0xFA, 0x71, 0x3A, 0xD5, - 0x64, 0xD3, 0xC9, 0x39, 0x12, 0xA0, 0x86, 0x60, - 0xBB, 0x7B, 0xBA, 0xD3, 0xAF, 0xAC, 0x06, 0x07, - 0x0E, 0x15, 0xAA, 0xD7, 0x86, 0xD3, 0x2F, 0x56, - 0x9D, 0xE0, 0xE3, 0xAE, 0xBF, 0xE3, 0x53, 0x64, - 0x57, 0x98, 0xF3, 0x90, 0x12, 0xC9, 0xDD, 0x54, - 0xE3, 0x31, 0xAE, 0xB9, 0xF4, 0x3F, 0x3A, 0x0F, - 0xB5, 0xC0, 0x08, 0x30, 0x41, 0xE1, 0x9B, 0x3C, - 0xFD, 0x55, 0xDA, 0xD7, 0x7D, 0xB5, 0x6A, 0xB6, - 0x21, 0x4A, 0xAC, 0x4B, 0x7C, 0x41, 0x4E, 0x46, - 0xC6, 0x42, 0x87, 0x3B, 0xE1, 0x2D, 0xCB, 0xFE, - 0x66, 0xA7, 0x1E, 0xC1, 0xFD, 0xAC, 0xA3, 0xE5, - 0x8C, 0x8A, 0xB1, 0x6E, 0x90, 0xBA, 0x45, 0x8C, - 0x5C, 0xA5, 0x57, 0xB9, 0x0B, 0x58, 0x6B, 0x59, - 0x29, 0x5D, 0x98, 0x32, 0x85, 0xA7, 0x5A, 0x2F, - 0x95, 0x2D, 0x83, 0x16, 0x43, 0x04, 0x16, 0xB0, - 0x80, 0x32, 0xD0, 0x22, 0x8D, 0xFF, 0x21, 0xA4, - 0x04, 0x6A, 0x54, 0xE0, 0x0D, 0x4D, 0xBF, 0xA7, - 0x48, 0x1A, 0xDB, 0xD2, 0xDB, 0x84, 0xDE, 0x77, - 0x1A, 0x43, 0x36, 0x61, 0xF0, 0x7F, 0xB4, 0x99, - 0x75, 0xE5, 0x5D, 0xD6, 0xE2, 0x56, 0xC7, 0x17, - 0x9B, 0x38, 0x3E, 0x53, 0xF4, 0x4F, 0xBE, 0x82, - 0x3C, 0xEE, 0x89, 0x8A, 0x81, 0xD4, 0x9B, 0x72, - 0xD4, 0x55, 0xD1, 0x90, 0x34, 0x12, 0xA6, 0xED, - 0xA2, 0x6E, 0x7C, 0x50, 0xDB, 0x2C, 0x7C, 0xF9, - 0x34, 0xE7, 0xB8, 0xE1, 0xD2, 0xC8, 0x9E, 0x17, - 0x15, 0xA3, 0x22, 0xEC, 0x5A, 0xC4, 0x91, 0x2A, - 0x96, 0x19, 0x88, 0xBA, 0x73, 0xBE, 0x83, 0xA1, - 0x9F, 0x95, 0x17, 0x6F, 0x6A, 0xCE, 0x14, 0xF7, - 0x95, 0x60, 0xE8, 0xA9, 0xDF, 0x0B, 0xD9, 0xD7, - 0xE2, 0x98, 0xC0, 0x5C, 0x86, 0x83, 0x43, 0xE7, - 0xE1, 0x4F, 0xDA, 0x57, 0x27, 0xC7, 0x52, 0xE6, - 0x77, 0x05, 0x0B, 0x84, 0x46, 0x4B, 0xCB, 0x4D, - 0x2A, 0x4F, 0x39, 0xCC, 0xA3, 0x93, 0x42, 0xE0, - 0x9E, 0xA2, 0x4D, 0xAC, 0xC8, 0x9D, 0x1A, 0xAD, - 0x37, 0x01, 0xA4, 0x33, 0x58, 0xB7, 0x46, 0x60, - 0x82, 0xF9, 0xCB, 0xA6, 0x4D, 0x6B, 0xB5, 0x54, - 0x9E, 0xD8, 0xBA, 0x32, 0x96, 0xD8, 0xE0, 0x14, - 0x5E, 0xF8, 0x79, 0x53, 0x5B, 0xED, 0xC6, 0x93, - 0x3F, 0xEA, 0x3C, 0xD2, 0x34, 0xA2, 0xB8, 0x68, - 0x56, 0xC7, 0x2D, 0xA5, 0x0C, 0xB3, 0x5A, 0xFD, - 0x34, 0x93, 0x5B, 0x59, 0x08, 0x4E, 0x77, 0x7C, - 0x78, 0x81, 0x89, 0x10, 0xB4, 0x8A, 0x95, 0x8E, - 0x5A, 0xB7, 0x66, 0xF1, 0x26, 0xC1, 0x71, 0xA8, - 0x09, 0x0E, 0x5D, 0x60, 0x57, 0xC2, 0x79, 0xFD, - 0xE9, 0x59, 0xFC, 0x5A, 0xD2, 0x46, 0x0B, 0x3D, - 0x76, 0xC3, 0x65, 0xF0, 0x26, 0xAF, 0x8E, 0xF9, - 0x16, 0xFC, 0x6B, 0xC7, 0x4F, 0x8F, 0x36, 0x2A, - 0x7F, 0x20, 0x24, 0x70, 0x10, 0xF8, 0x32, 0x7D, - 0xF6, 0x64, 0xE3, 0x18, 0x37, 0x14, 0x0C, 0xD3, - 0xBC, 0x2C, 0x1F, 0x88, 0x39, 0xD0, 0xF7, 0x97, - 0xAC, 0x15, 0xFA, 0xED, 0x33, 0xEE, 0x10, 0x1A, - 0xB0, 0xEB, 0x98, 0x36, 0xB2, 0x5C, 0x82, 0x20, - 0xA2, 0x75, 0xF9, 0xE4, 0x72, 0xA9, 0xB2, 0x0C, - 0x6C, 0x12, 0xC1, 0x4D, 0x86, 0x3A, 0x42, 0x7F -//}; -//unsigned int sig_grpx_member0_sha256_bsn0_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey002.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey002.inc deleted file mode 100644 index 2737b16fbb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey002.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data for revoked privrl. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : privrevoked/member002 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_grpx_member0_sha256_bsn0_msg0_dat[] = { - 0x70, 0x91, 0x63, 0x2C, 0xBB, 0xFE, 0x06, 0x26, - 0x5F, 0x20, 0xBD, 0x9E, 0x49, 0x11, 0x31, 0xE0, - 0x7C, 0x99, 0x5E, 0xA0, 0x58, 0x4F, 0x1B, 0x3F, - 0xB4, 0x6E, 0xCD, 0x17, 0x61, 0x79, 0xA0, 0xFD, - 0x64, 0x60, 0xA4, 0xF8, 0x17, 0x81, 0xC3, 0x0A, - 0x4B, 0x6A, 0x72, 0x86, 0x96, 0xE3, 0xFA, 0x95, - 0x47, 0x45, 0xFB, 0x57, 0xEF, 0xCA, 0x82, 0x99, - 0x72, 0xDC, 0xE6, 0x78, 0xE3, 0x70, 0xA8, 0x28, - 0x1D, 0xFB, 0xB5, 0x81, 0x0D, 0xDB, 0x30, 0x3B, - 0xD9, 0x3A, 0xFE, 0x9D, 0x94, 0xCD, 0x7D, 0x9F, - 0x7D, 0x68, 0xB6, 0x57, 0xE8, 0x26, 0x78, 0x2B, - 0x32, 0xC3, 0x14, 0xC7, 0xE4, 0xDE, 0x04, 0x7B, - 0x27, 0xBE, 0x27, 0xDA, 0x79, 0x25, 0x4E, 0x36, - 0x75, 0x0E, 0x6E, 0xD0, 0x78, 0x36, 0xA6, 0x23, - 0x57, 0x63, 0x71, 0xCC, 0x07, 0xFA, 0x57, 0xB6, - 0xF6, 0x9D, 0xA6, 0x00, 0x36, 0xA2, 0xAB, 0xBB, - 0x81, 0xC9, 0xAE, 0xA8, 0x3B, 0xA0, 0xA7, 0xCE, - 0x0B, 0xC6, 0xE3, 0x40, 0x32, 0xE5, 0x29, 0x8F, - 0x4E, 0x5E, 0xFD, 0x1B, 0x7A, 0x7E, 0x83, 0x8B, - 0x26, 0xC1, 0x7B, 0xEC, 0x62, 0x30, 0x1E, 0x6F, - 0xDD, 0x18, 0xD0, 0x89, 0x5B, 0xD9, 0xC5, 0xD7, - 0x1B, 0x94, 0x29, 0x81, 0xBC, 0xD8, 0x2D, 0xF3, - 0xE2, 0xD5, 0x2E, 0x7E, 0x4A, 0xA0, 0x87, 0xA9, - 0xAB, 0x73, 0xB1, 0x8C, 0x7B, 0x18, 0x1E, 0xDA, - 0x4E, 0x5D, 0x7B, 0x49, 0xA7, 0x0E, 0xD9, 0xD7, - 0x1A, 0x6C, 0xC6, 0x18, 0x25, 0x1F, 0x36, 0x49, - 0xFA, 0xB6, 0x54, 0xCE, 0x2D, 0x73, 0x70, 0x52, - 0xC8, 0xC3, 0xFE, 0x22, 0x5C, 0x58, 0x6A, 0x6E, - 0x60, 0xE1, 0x86, 0xA0, 0x7F, 0x38, 0x48, 0xEE, - 0xDC, 0x4B, 0xBC, 0xD1, 0xF4, 0x3D, 0x1A, 0x2B, - 0x6E, 0x95, 0x61, 0x41, 0x17, 0x66, 0xC3, 0xAE, - 0x05, 0xD4, 0x67, 0x6D, 0x29, 0x79, 0xB9, 0x3A, - 0x81, 0x28, 0xA9, 0x0C, 0xFA, 0xE3, 0xBD, 0x60, - 0x16, 0x53, 0xFF, 0x5C, 0x2B, 0x25, 0x29, 0x66, - 0x2D, 0x91, 0x5E, 0x97, 0xF2, 0x8C, 0x42, 0xE7, - 0xAE, 0x50, 0x08, 0x7E, 0xEF, 0x1B, 0xB0, 0xB2, - 0xA0, 0x5E, 0xDF, 0xB0, 0x49, 0x2A, 0xA8, 0x3D, - 0xA0, 0x95, 0x1A, 0xF6, 0x0B, 0xB1, 0x0D, 0x70, - 0x3E, 0x6B, 0xFC, 0x1B, 0x57, 0x4F, 0x01, 0xF8, - 0x1F, 0xF0, 0xDC, 0x7F, 0x7E, 0xF9, 0xF6, 0xA4, - 0xD3, 0x1B, 0x4C, 0x72, 0x9C, 0xB5, 0xAF, 0x9E, - 0xEF, 0x0B, 0x24, 0x39, 0xC0, 0x89, 0x6B, 0xE6, - 0x16, 0x4D, 0xFA, 0x2B, 0x71, 0xF1, 0x58, 0xC7, - 0x3E, 0xF1, 0xB3, 0x47, 0x48, 0xD9, 0xD5, 0x03, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x05, 0xED, 0x13, 0xC4, 0xB7, 0x70, 0x01, 0xA9, - 0x1F, 0x36, 0x29, 0x8E, 0x1F, 0x0B, 0x43, 0x0E, - 0xD9, 0x23, 0x1A, 0x80, 0xCD, 0x75, 0x2F, 0x84, - 0x44, 0x2D, 0x2B, 0xF2, 0xFD, 0x78, 0x9F, 0xF0, - 0xA8, 0xEC, 0xDC, 0x53, 0x38, 0x6B, 0x11, 0x9B, - 0x42, 0x7E, 0x3B, 0x8A, 0xBB, 0x48, 0x8A, 0x79, - 0x58, 0x99, 0xFD, 0xE2, 0x35, 0x63, 0x2F, 0xA1, - 0xDF, 0x1C, 0x3B, 0x2C, 0x93, 0xFA, 0xD4, 0x71, - 0x7A, 0xDC, 0x01, 0xFF, 0x9C, 0x5A, 0x3B, 0xD8, - 0xA4, 0x86, 0xBD, 0x51, 0x99, 0x13, 0x31, 0xDE, - 0x84, 0x8B, 0x44, 0x9F, 0x7C, 0x29, 0xED, 0x3E, - 0xB7, 0xE9, 0x81, 0x82, 0x87, 0xB1, 0x05, 0xD0, - 0x4B, 0xC5, 0x9B, 0x7D, 0x91, 0x67, 0xE9, 0x11, - 0x56, 0x79, 0x84, 0xEF, 0x59, 0x95, 0x6C, 0xF8, - 0xA7, 0xB7, 0x0B, 0x61, 0x4A, 0xF5, 0x73, 0x41, - 0xFD, 0x39, 0x82, 0xEC, 0xEB, 0x22, 0xA0, 0x22, - 0xF0, 0xAB, 0xDD, 0x15, 0x9D, 0x93, 0x73, 0xF1, - 0x31, 0xF2, 0xE7, 0x5E, 0xA1, 0x04, 0x95, 0x1D, - 0x88, 0xA5, 0x80, 0x05, 0x87, 0xF2, 0xBC, 0xAB, - 0xFE, 0x0A, 0x7B, 0x3F, 0xF3, 0x2E, 0xA9, 0x8A, - 0x98, 0x6D, 0xCB, 0x0A, 0xFA, 0x7B, 0x43, 0x98, - 0xFC, 0x5A, 0xC7, 0x4F, 0x17, 0x15, 0x45, 0xFA, - 0xC4, 0x5B, 0x4B, 0x79, 0xDE, 0x21, 0x1F, 0x1D, - 0x0F, 0xFF, 0x1B, 0xFB, 0xCF, 0x87, 0x9D, 0x11, - 0x0D, 0x3A, 0x29, 0x17, 0xAF, 0xC6, 0xDA, 0x22, - 0x5B, 0x58, 0xC7, 0xF6, 0xFB, 0x4F, 0x46, 0x8A, - 0xCA, 0x9B, 0x5E, 0xAA, 0x5A, 0xF7, 0xAE, 0xB5, - 0xAC, 0x0B, 0x0E, 0xE1, 0x54, 0xD5, 0x6A, 0x20, - 0x20, 0xC1, 0x8A, 0x31, 0xCC, 0xE8, 0xCE, 0x92, - 0xFA, 0x7F, 0xF7, 0xD0, 0x73, 0x42, 0xDA, 0x47, - 0xFB, 0x08, 0x63, 0x38, 0xA0, 0x0D, 0xB6, 0x73, - 0x06, 0x48, 0xCA, 0x10, 0x8C, 0xE3, 0xA3, 0xE4, - 0xC3, 0x2A, 0x77, 0xDB, 0x1E, 0x47, 0x6A, 0x95, - 0xF4, 0x99, 0x0C, 0xA6, 0x29, 0x8C, 0x4E, 0x20, - 0x8D, 0xB6, 0x8D, 0x77, 0x8A, 0x3E, 0x35, 0xB7, - 0x8A, 0x0B, 0xCE, 0x71, 0x92, 0xD8, 0x32, 0xBA, - 0xB1, 0xA0, 0x40, 0x28, 0x7B, 0xA3, 0x19, 0x12, - 0x05, 0xA7, 0x13, 0xC1, 0xDB, 0xE3, 0x2A, 0x9A, - 0xDC, 0x41, 0x95, 0x69, 0x47, 0x81, 0xC1, 0x3B, - 0x88, 0x78, 0xBA, 0x08, 0xC0, 0xDC, 0xAF, 0x24, - 0x1C, 0x17, 0xEF, 0xD0, 0xB3, 0x3E, 0xFA, 0x0B, - 0x9A, 0x62, 0xF8, 0x6F, 0xEC, 0x84, 0xA0, 0xC1, - 0xB7, 0x9E, 0x24, 0x9B, 0x05, 0x77, 0x80, 0x7E, - 0x2D, 0x5A, 0xBF, 0xD9, 0x90, 0xBB, 0x99, 0xF0, - 0x2D, 0xF7, 0x66, 0xB6, 0x77, 0xF5, 0xF2, 0xD3, - 0xA7, 0x57, 0x85, 0xAF, 0x39, 0x9A, 0x3D, 0x05, - 0x1E, 0xD7, 0x87, 0x6C, 0xF4, 0xA6, 0xDD, 0x36, - 0x57, 0x10, 0xB9, 0x4C, 0x55, 0xC7, 0x83, 0xFA, - 0x29, 0xAF, 0x4D, 0x8C, 0xCC, 0x13, 0x4B, 0x2D, - 0x0E, 0x9D, 0x8B, 0xFF, 0xCE, 0x70, 0x3D, 0x27, - 0x52, 0x99, 0x32, 0x69, 0xC2, 0xDC, 0xA1, 0x27, - 0x61, 0x98, 0x11, 0x3C, 0xC8, 0x60, 0x6F, 0xF1, - 0x8C, 0x86, 0x27, 0xA5, 0x18, 0x2C, 0xEE, 0x7B, - 0xF8, 0xEE, 0x72, 0x8A, 0x12, 0x59, 0xDF, 0x90, - 0x0F, 0x34, 0x4D, 0x38, 0x19, 0x6E, 0xBD, 0xE3, - 0x08, 0x77, 0x60, 0x88, 0x2F, 0x69, 0x5B, 0xF7, - 0x3B, 0x7E, 0x81, 0xD0, 0x04, 0xE7, 0x8C, 0x17, - 0xD5, 0x60, 0xC6, 0xED, 0xF0, 0x65, 0xAD, 0x54, - 0x60, 0xE7, 0x76, 0x34, 0x4F, 0x8D, 0xB6, 0x44, - 0x57, 0xBD, 0x20, 0xEB, 0x15, 0x89, 0xE4, 0xB1 -//}; -//unsigned int sig_grpx_member0_sha256_bsn0_msg0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrl.inc deleted file mode 100644 index a16a36ae2e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrl.inc +++ /dev/null @@ -1,40 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 private-key based revocation list - * Group : grpX - */ -//unsigned char privrl_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xb1, 0x58, 0x6e, 0x93, 0x42, 0x67, 0x51, 0xfb, - 0x1b, 0x42, 0x4f, 0x0b, 0xe5, 0x11, 0x44, 0x6b, - 0xdd, 0x8b, 0xe8, 0xe9, 0x44, 0x09, 0x70, 0x6a, - 0xab, 0xaf, 0x54, 0xd8, 0x4a, 0xd3, 0x3d, 0x7c, - 0xfb, 0x9c, 0x7f, 0x54, 0x34, 0xba, 0xc2, 0xdb, - 0x2b, 0xec, 0xca, 0x08, 0xf8, 0x19, 0x3f, 0x79, - 0xee, 0x02, 0x01, 0x1f, 0x7c, 0x6a, 0x3a, 0xdb, - 0x6b, 0x42, 0x31, 0xc7, 0x09, 0x4e, 0xb0, 0x1b, - 0x8d, 0xa3, 0xbf, 0xfa, 0xd1, 0x1d, 0x03, 0x29, - 0x17, 0xca, 0xcd, 0x01, 0xda, 0x76, 0x49, 0x3b, - 0x97, 0xc9, 0xd3, 0xf5, 0x13, 0x75, 0xbe, 0x70, - 0xc4, 0x24, 0x43, 0xff, 0xaa, 0x44, 0x67, 0xba -//}; -//unsigned int privrl_dat_len = 120; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrl_single_entry_revoked_key000.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrl_single_entry_revoked_key000.inc deleted file mode 100644 index abd8fb5d35..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/privrl_single_entry_revoked_key000.inc +++ /dev/null @@ -1,33 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 private-key based revocation list - * single entry, privrevoked/member000 - * Group : grpX - */ -//unsigned char privrl_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0xb1, 0x58, 0x6e, 0x93, 0x42, 0x67, 0x51, 0xfb, - 0x1b, 0x42, 0x4f, 0x0b, 0xe5, 0x11, 0x44, 0x6b, - 0xdd, 0x8b, 0xe8, 0xe9, 0x44, 0x09, 0x70, 0x6a, - 0xab, 0xaf, 0x54, 0xd8, 0x4a, 0xd3, 0x3d, 0x7c -//}; -//unsigned int privrl_dat_len = 56; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/pubkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/pubkey.inc deleted file mode 100644 index a7d7484393..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/pubkey.inc +++ /dev/null @@ -1,59 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group public key - * Group : grpX - */ -//unsigned char pubkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x3d, 0x4b, 0x62, 0xf9, 0xf9, 0x1a, 0x0f, 0xb1, - 0x58, 0x7b, 0x0e, 0x42, 0x0c, 0xba, 0x94, 0x10, - 0xb4, 0x4e, 0x75, 0x33, 0x37, 0x24, 0xc0, 0xd0, - 0x9e, 0xf6, 0xb8, 0xe6, 0x8b, 0x69, 0xaa, 0xb1, - 0x29, 0x8f, 0x2a, 0xc3, 0xd9, 0x1d, 0x50, 0x4d, - 0xa3, 0x75, 0x20, 0x07, 0x1a, 0xa1, 0x7b, 0x2f, - 0xad, 0x72, 0x47, 0xff, 0x46, 0x8e, 0x69, 0xb2, - 0x05, 0x9e, 0xda, 0x68, 0xca, 0xc7, 0x81, 0x4c, - 0x48, 0x7a, 0x66, 0x7d, 0x9f, 0x52, 0xb3, 0x45, - 0x59, 0x5e, 0xde, 0x15, 0xdc, 0x29, 0xea, 0x7e, - 0x0e, 0xbf, 0x5e, 0xf3, 0xd0, 0x7b, 0xf1, 0x79, - 0x00, 0x1a, 0xcb, 0xd2, 0x56, 0xdc, 0x6f, 0xb1, - 0x50, 0xe8, 0xa8, 0x37, 0x22, 0x44, 0xa5, 0x6b, - 0x8f, 0x11, 0x92, 0xe5, 0x02, 0xd4, 0x9f, 0x89, - 0x4f, 0x97, 0x3a, 0x46, 0x5a, 0xe7, 0x00, 0xf3, - 0xbf, 0xf2, 0x47, 0x28, 0xa5, 0xf9, 0x07, 0xf5, - 0xb0, 0x63, 0x98, 0x76, 0x04, 0xcf, 0x85, 0xd9, - 0xad, 0xf2, 0x02, 0x0c, 0x13, 0x2c, 0x45, 0x10, - 0x5b, 0xcb, 0xa8, 0x76, 0xde, 0x1e, 0xe6, 0x92, - 0x06, 0x91, 0x49, 0xc2, 0x1a, 0xe8, 0x80, 0x90, - 0x46, 0x20, 0xd0, 0xd6, 0x73, 0xae, 0x29, 0x02, - 0xc2, 0x3f, 0x85, 0x13, 0x1a, 0x66, 0xae, 0xc1, - 0x61, 0x52, 0x62, 0xbf, 0x70, 0x1b, 0x1b, 0x52, - 0xde, 0x76, 0x8c, 0x9b, 0x35, 0x42, 0xa8, 0x19, - 0x32, 0x6c, 0xa2, 0x9b, 0x44, 0x24, 0x96, 0x1e, - 0x48, 0x68, 0xc8, 0x83, 0x16, 0xfb, 0xc3, 0xf6, - 0xed, 0x73, 0x94, 0xd9, 0xd4, 0x60, 0x63, 0xc0, - 0x2c, 0x44, 0x54, 0x36, 0x20, 0x38, 0x5b, 0x12, - 0x23, 0x32, 0x63, 0x6d, 0x79, 0x40, 0xf0, 0x3c, - 0x60, 0x35, 0xe9, 0xfe, 0xa3, 0xb3, 0xad, 0xe7, - 0xfa, 0x9c, 0xf1, 0xd7, 0x98, 0xfe, 0x28, 0x9e, - 0xc1, 0x81, 0xe7, 0x51, 0xce, 0x07, 0xbc, 0xc5 -//}; -//unsigned int pubkey_dat_len = 272; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey000.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey000.inc deleted file mode 100644 index d05d3b8230..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey000.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : sigrevokedmember000 (revoked in grpX sigrl) - */ - -//unsigned char mprivatekey000_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xa6, 0x7f, 0x17, 0xb8, 0xef, 0xe3, 0xab, 0x01, - 0x3f, 0x25, 0x02, 0x5e, 0x19, 0x93, 0xa5, 0x34, - 0x3a, 0x23, 0xec, 0xe5, 0x71, 0x87, 0x7d, 0x33, - 0x7c, 0x6b, 0xbf, 0x2e, 0x63, 0xb6, 0x85, 0xeb, - 0xe6, 0x1a, 0x60, 0xd9, 0x1c, 0xef, 0xd1, 0xae, - 0x85, 0x96, 0xd9, 0x8e, 0xf8, 0xf9, 0x8b, 0x68, - 0xfe, 0x7c, 0x3a, 0xde, 0x0b, 0xea, 0xa7, 0x7f, - 0x1c, 0x65, 0x81, 0xda, 0x3a, 0xc5, 0xea, 0xe0, - 0x67, 0x80, 0xf0, 0x53, 0x2c, 0xfa, 0xe3, 0xec, - 0xfd, 0x35, 0x7b, 0xd8, 0xa6, 0xf6, 0x54, 0x4b, - 0xc0, 0xb3, 0x38, 0x6b, 0x40, 0xae, 0xd9, 0x50, - 0x3f, 0x9f, 0x01, 0x87, 0x70, 0x0f, 0x9f, 0xcd, - 0x79, 0xa7, 0x3b, 0x7c, 0xb3, 0xd3, 0xd1, 0xc0, - 0x75, 0xf1, 0x50, 0xd6, 0x03, 0x40, 0xf8, 0xd6, - 0xc5, 0xf5, 0x7b, 0x1f, 0xfa, 0x61, 0xd9, 0x58, - 0xbc, 0x1b, 0xcd, 0x92, 0x35, 0x97, 0xa2, 0xb9 -//}; -//unsigned int mprivatekey000_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey001.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey001.inc deleted file mode 100644 index e9d28775ff..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey001.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : sigrevokedmember001 (revoked in grpX sigrl) - */ - -//unsigned char mprivatekey001_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xdb, 0x1b, 0x7b, 0xaa, 0x93, 0xed, 0x33, 0x68, - 0x8d, 0x20, 0x80, 0x66, 0x12, 0xaa, 0xfb, 0x6c, - 0x84, 0x02, 0xf0, 0xbd, 0x4b, 0xa4, 0xac, 0x12, - 0xcc, 0xbf, 0xfb, 0xd2, 0x19, 0x64, 0x14, 0xa2, - 0xdc, 0xf6, 0x85, 0xcc, 0xd1, 0xb7, 0x15, 0x65, - 0x76, 0xf2, 0xf5, 0xdd, 0x91, 0x98, 0xa1, 0x6e, - 0x21, 0x64, 0xcc, 0x74, 0xe1, 0x9b, 0x7c, 0x56, - 0xd4, 0x2f, 0xf5, 0x5f, 0xd4, 0xec, 0x03, 0x69, - 0x27, 0x49, 0xcd, 0xd3, 0x90, 0x18, 0xb2, 0x82, - 0x74, 0x46, 0x2b, 0x70, 0xc3, 0xe9, 0xcb, 0x30, - 0xde, 0x4e, 0x9c, 0x19, 0x97, 0x93, 0x24, 0x8b, - 0x10, 0xe9, 0x68, 0xca, 0x64, 0xbf, 0xcd, 0x81, - 0x02, 0x5c, 0x15, 0x7e, 0x0f, 0x00, 0x82, 0x32, - 0x45, 0xcf, 0x91, 0xd3, 0x64, 0x5f, 0xf6, 0x0a, - 0x83, 0x83, 0xc6, 0x3c, 0x0a, 0x68, 0x2c, 0x1e, - 0x96, 0x4b, 0xfa, 0xde, 0x06, 0xfe, 0x1a, 0x73 -//}; -//unsigned int mprivatekey001_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey002.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey002.inc deleted file mode 100644 index 9bb5536bc2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrevoked/mprivatekey002.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : sigrevokedmember002 (revoked in grpX sigrl) - */ - -//unsigned char mprivatekey002_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x77, 0xb7, 0x7d, 0xd1, 0x1c, 0xd3, 0xb5, 0x42, - 0x0b, 0x4c, 0xfb, 0x15, 0x97, 0x14, 0x5c, 0x44, - 0x24, 0xea, 0x32, 0xc4, 0x8f, 0x36, 0xfd, 0x20, - 0x19, 0x5f, 0x68, 0x61, 0x09, 0xf5, 0xd0, 0x78, - 0xa9, 0xc4, 0x07, 0x83, 0x02, 0x49, 0xf7, 0x8f, - 0x31, 0x3d, 0xb2, 0x0d, 0x91, 0x15, 0xfa, 0x38, - 0x76, 0x09, 0xce, 0x7e, 0xc0, 0x4e, 0x16, 0x08, - 0x79, 0x8f, 0x8b, 0xe4, 0xc9, 0x11, 0x40, 0x21, - 0x41, 0x34, 0x3d, 0x59, 0xc1, 0x65, 0x6d, 0x14, - 0x23, 0x82, 0x83, 0x66, 0xef, 0x04, 0x7b, 0xfb, - 0x7b, 0x43, 0x87, 0xfe, 0x46, 0xdb, 0x92, 0x97, - 0x5f, 0xe4, 0x2e, 0xe4, 0x76, 0x40, 0x50, 0x66, - 0xdf, 0x41, 0x0e, 0xe7, 0x5d, 0xa2, 0xd2, 0x17, - 0x72, 0xae, 0x43, 0x56, 0x05, 0xee, 0x7d, 0x43, - 0xbb, 0x84, 0xbc, 0x28, 0x55, 0x56, 0xaf, 0x0d, - 0x71, 0x41, 0x1a, 0x4a, 0x26, 0x63, 0x83, 0x87 -//}; -//unsigned int mprivatekey002_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl.inc deleted file mode 100644 index 6aba0eb710..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl.inc +++ /dev/null @@ -1,76 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 signature based revocation list - * Group : grpX - */ -//unsigned char sigrl_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xa6, 0xad, 0xdd, 0xbe, 0x45, 0xcc, 0x88, 0xcc, - 0x18, 0x30, 0x68, 0x49, 0x77, 0xfe, 0xc0, 0x4f, - 0xf9, 0x27, 0xa9, 0x49, 0x66, 0x03, 0x1a, 0x3c, - 0x3c, 0x4f, 0xac, 0xb6, 0x94, 0x2e, 0xd7, 0xb0, - 0x01, 0xa3, 0x8c, 0x5e, 0x73, 0x1d, 0x2f, 0x20, - 0x86, 0xb7, 0x10, 0xbd, 0x8e, 0x63, 0x5b, 0x41, - 0x21, 0x23, 0x8d, 0xac, 0x87, 0xc0, 0x7e, 0x78, - 0xb2, 0x11, 0x33, 0x52, 0x50, 0xa7, 0x6f, 0x7a, - 0x09, 0x95, 0x63, 0x1b, 0x04, 0xce, 0x6b, 0x93, - 0x47, 0xa2, 0xb0, 0x1f, 0x2c, 0x89, 0x1c, 0xd7, - 0xaa, 0xd6, 0x88, 0xbd, 0xd5, 0x45, 0x6f, 0x06, - 0x2b, 0xcc, 0x3e, 0x02, 0x4f, 0xeb, 0xef, 0x9d, - 0xb2, 0xf9, 0x71, 0xea, 0xca, 0x8c, 0x9c, 0x00, - 0xcd, 0x7e, 0x1c, 0x15, 0x7d, 0x69, 0xe8, 0x52, - 0x03, 0x81, 0xc4, 0x31, 0x2e, 0x8f, 0x0d, 0x31, - 0xef, 0x18, 0x03, 0x37, 0x0f, 0xa3, 0x19, 0x7b, - 0x19, 0x6a, 0x11, 0x7c, 0xfb, 0x88, 0xd3, 0x08, - 0x17, 0x98, 0x9d, 0xd6, 0x5a, 0x87, 0xd3, 0xe8, - 0x69, 0x3f, 0x6c, 0x8b, 0xd8, 0xd4, 0x6c, 0x11, - 0x17, 0x2b, 0xae, 0xf2, 0x8d, 0xa4, 0x35, 0x55, - 0x32, 0x9e, 0x85, 0x6a, 0xc2, 0x9e, 0xee, 0x5b, - 0xcd, 0x23, 0x7a, 0x11, 0xa7, 0xdd, 0xde, 0xb2, - 0xd1, 0xc6, 0xb8, 0x02, 0x93, 0xdb, 0x1e, 0x69, - 0x99, 0x6d, 0xc6, 0x2f, 0x98, 0xab, 0x26, 0x89, - 0x02, 0x83, 0xfa, 0xa6, 0x65, 0xe9, 0xc6, 0x9f, - 0xf7, 0xc9, 0x7b, 0xda, 0x73, 0x1c, 0x60, 0x11, - 0x32, 0x85, 0x17, 0x49, 0xca, 0x0b, 0x96, 0x0c, - 0x47, 0x0d, 0xef, 0x94, 0x9c, 0x15, 0x05, 0xbe, - 0x4b, 0xed, 0xd6, 0xee, 0x7b, 0xbb, 0x14, 0x23, - 0x54, 0x31, 0x04, 0xf0, 0x81, 0x04, 0x44, 0xd2, - 0x02, 0x33, 0x60, 0xba, 0x5f, 0x4f, 0xae, 0x1f, - 0x2d, 0xce, 0xbb, 0xff, 0xe8, 0x55, 0xc7, 0xa8, - 0xa6, 0x50, 0xbe, 0xa7, 0xfb, 0x41, 0x9d, 0xf8, - 0x41, 0x9c, 0xdd, 0x92, 0x47, 0x9f, 0x6f, 0xf3, - 0x56, 0x25, 0x0e, 0xbc, 0xa0, 0x89, 0xf2, 0x7f, - 0x12, 0x45, 0x5b, 0xb4, 0xd6, 0xa5, 0xb5, 0x71, - 0x31, 0x70, 0xae, 0xaf, 0x65, 0x55, 0x0e, 0xa9, - 0x1a, 0x5d, 0xc0, 0x1f, 0x20, 0x71, 0x07, 0xce, - 0x3e, 0x5e, 0xd3, 0xee, 0x5b, 0x4c, 0x67, 0x21, - 0x64, 0x0c, 0x5c, 0x1c, 0xd3, 0x2d, 0x24, 0xc4, - 0xf8, 0xad, 0x31, 0x02, 0xc5, 0xb0, 0x45, 0xe8, - 0x60, 0xd2, 0x50, 0xf4, 0xd1, 0xd6, 0x2b, 0x85, - 0x53, 0xac, 0x73, 0x96, 0x98, 0xf9, 0x1b, 0x5e, - 0xb8, 0x0f, 0xa1, 0xd3, 0xba, 0x6e, 0x43, 0x92, - 0x31, 0x69, 0x82, 0x14, 0x4a, 0xff, 0x36, 0x44, - 0x58, 0xf6, 0x41, 0xe3, 0x46, 0x85, 0x83, 0x05, - 0x96, 0x87, 0x7c, 0x0c, 0x0b, 0x70, 0x24, 0x8e, - 0x42, 0xb0, 0xd5, 0x9e, 0x7f, 0xcb, 0x26, 0xe8 -//}; -//unsigned int sigrl_dat_len = 408; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_first_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_first_entry.inc deleted file mode 100644 index 3ca0386b69..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_first_entry.inc +++ /dev/null @@ -1,77 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 signature based revocation list - * Group : grpX - * Revoked signature : Member0/sig_sha256_bsn0_msg0 first entry - */ -//unsigned char sigrl_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x81, 0xa5, 0xa5, 0x8f, 0xe6, 0x4e, 0x18, 0x04, - 0x05, 0x46, 0xa1, 0x30, 0x84, 0xde, 0x4f, 0x09, - 0x36, 0x5f, 0x59, 0xbe, 0xc0, 0x4f, 0x4f, 0xbc, - 0xde, 0xd1, 0xd1, 0x11, 0x11, 0x07, 0x7a, 0x2d, - 0x89, 0x9c, 0x1b, 0x21, 0x34, 0xeb, 0x84, 0xc4, - 0x2c, 0x82, 0x63, 0xce, 0x98, 0x30, 0x22, 0xee, - 0x2c, 0xec, 0x90, 0x95, 0x66, 0x94, 0x74, 0xf5, - 0xef, 0xff, 0x74, 0xfa, 0xad, 0x61, 0x6f, 0x59, - 0x19, 0x6a, 0x11, 0x7c, 0xfb, 0x88, 0xd3, 0x08, - 0x17, 0x98, 0x9d, 0xd6, 0x5a, 0x87, 0xd3, 0xe8, - 0x69, 0x3f, 0x6c, 0x8b, 0xd8, 0xd4, 0x6c, 0x11, - 0x17, 0x2b, 0xae, 0xf2, 0x8d, 0xa4, 0x35, 0x55, - 0x32, 0x9e, 0x85, 0x6a, 0xc2, 0x9e, 0xee, 0x5b, - 0xcd, 0x23, 0x7a, 0x11, 0xa7, 0xdd, 0xde, 0xb2, - 0xd1, 0xc6, 0xb8, 0x02, 0x93, 0xdb, 0x1e, 0x69, - 0x99, 0x6d, 0xc6, 0x2f, 0x98, 0xab, 0x26, 0x89, - 0x02, 0x83, 0xfa, 0xa6, 0x65, 0xe9, 0xc6, 0x9f, - 0xf7, 0xc9, 0x7b, 0xda, 0x73, 0x1c, 0x60, 0x11, - 0x32, 0x85, 0x17, 0x49, 0xca, 0x0b, 0x96, 0x0c, - 0x47, 0x0d, 0xef, 0x94, 0x9c, 0x15, 0x05, 0xbe, - 0x4b, 0xed, 0xd6, 0xee, 0x7b, 0xbb, 0x14, 0x23, - 0x54, 0x31, 0x04, 0xf0, 0x81, 0x04, 0x44, 0xd2, - 0x02, 0x33, 0x60, 0xba, 0x5f, 0x4f, 0xae, 0x1f, - 0x2d, 0xce, 0xbb, 0xff, 0xe8, 0x55, 0xc7, 0xa8, - 0xa6, 0x50, 0xbe, 0xa7, 0xfb, 0x41, 0x9d, 0xf8, - 0x41, 0x9c, 0xdd, 0x92, 0x47, 0x9f, 0x6f, 0xf3, - 0x56, 0x25, 0x0e, 0xbc, 0xa0, 0x89, 0xf2, 0x7f, - 0x12, 0x45, 0x5b, 0xb4, 0xd6, 0xa5, 0xb5, 0x71, - 0x31, 0x70, 0xae, 0xaf, 0x65, 0x55, 0x0e, 0xa9, - 0x1a, 0x5d, 0xc0, 0x1f, 0x20, 0x71, 0x07, 0xce, - 0x3e, 0x5e, 0xd3, 0xee, 0x5b, 0x4c, 0x67, 0x21, - 0x64, 0x0c, 0x5c, 0x1c, 0xd3, 0x2d, 0x24, 0xc4, - 0xf8, 0xad, 0x31, 0x02, 0xc5, 0xb0, 0x45, 0xe8, - 0x60, 0xd2, 0x50, 0xf4, 0xd1, 0xd6, 0x2b, 0x85, - 0x53, 0xac, 0x73, 0x96, 0x98, 0xf9, 0x1b, 0x5e, - 0xb8, 0x0f, 0xa1, 0xd3, 0xba, 0x6e, 0x43, 0x92, - 0x31, 0x69, 0x82, 0x14, 0x4a, 0xff, 0x36, 0x44, - 0x58, 0xf6, 0x41, 0xe3, 0x46, 0x85, 0x83, 0x05, - 0x96, 0x87, 0x7c, 0x0c, 0x0b, 0x70, 0x24, 0x8e, - 0x42, 0xb0, 0xd5, 0x9e, 0x7f, 0xcb, 0x26, 0xe8 -//}; -//unsigned int sigrl_dat_len = 408; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_last_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_last_entry.inc deleted file mode 100644 index f92cde6539..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_last_entry.inc +++ /dev/null @@ -1,77 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 signature based revocation list - * Group : grpX - * Revoked signature : Member0/sig_sha256_bsn0_msg0 last entry - */ -//unsigned char sigrl_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xa6, 0xad, 0xdd, 0xbe, 0x45, 0xcc, 0x88, 0xcc, - 0x18, 0x30, 0x68, 0x49, 0x77, 0xfe, 0xc0, 0x4f, - 0xf9, 0x27, 0xa9, 0x49, 0x66, 0x03, 0x1a, 0x3c, - 0x3c, 0x4f, 0xac, 0xb6, 0x94, 0x2e, 0xd7, 0xb0, - 0x01, 0xa3, 0x8c, 0x5e, 0x73, 0x1d, 0x2f, 0x20, - 0x86, 0xb7, 0x10, 0xbd, 0x8e, 0x63, 0x5b, 0x41, - 0x21, 0x23, 0x8d, 0xac, 0x87, 0xc0, 0x7e, 0x78, - 0xb2, 0x11, 0x33, 0x52, 0x50, 0xa7, 0x6f, 0x7a, - 0x09, 0x95, 0x63, 0x1b, 0x04, 0xce, 0x6b, 0x93, - 0x47, 0xa2, 0xb0, 0x1f, 0x2c, 0x89, 0x1c, 0xd7, - 0xaa, 0xd6, 0x88, 0xbd, 0xd5, 0x45, 0x6f, 0x06, - 0x2b, 0xcc, 0x3e, 0x02, 0x4f, 0xeb, 0xef, 0x9d, - 0xb2, 0xf9, 0x71, 0xea, 0xca, 0x8c, 0x9c, 0x00, - 0xcd, 0x7e, 0x1c, 0x15, 0x7d, 0x69, 0xe8, 0x52, - 0x03, 0x81, 0xc4, 0x31, 0x2e, 0x8f, 0x0d, 0x31, - 0xef, 0x18, 0x03, 0x37, 0x0f, 0xa3, 0x19, 0x7b, - 0x19, 0x6a, 0x11, 0x7c, 0xfb, 0x88, 0xd3, 0x08, - 0x17, 0x98, 0x9d, 0xd6, 0x5a, 0x87, 0xd3, 0xe8, - 0x69, 0x3f, 0x6c, 0x8b, 0xd8, 0xd4, 0x6c, 0x11, - 0x17, 0x2b, 0xae, 0xf2, 0x8d, 0xa4, 0x35, 0x55, - 0x32, 0x9e, 0x85, 0x6a, 0xc2, 0x9e, 0xee, 0x5b, - 0xcd, 0x23, 0x7a, 0x11, 0xa7, 0xdd, 0xde, 0xb2, - 0xd1, 0xc6, 0xb8, 0x02, 0x93, 0xdb, 0x1e, 0x69, - 0x99, 0x6d, 0xc6, 0x2f, 0x98, 0xab, 0x26, 0x89, - 0x02, 0x83, 0xfa, 0xa6, 0x65, 0xe9, 0xc6, 0x9f, - 0xf7, 0xc9, 0x7b, 0xda, 0x73, 0x1c, 0x60, 0x11, - 0x32, 0x85, 0x17, 0x49, 0xca, 0x0b, 0x96, 0x0c, - 0x47, 0x0d, 0xef, 0x94, 0x9c, 0x15, 0x05, 0xbe, - 0x4b, 0xed, 0xd6, 0xee, 0x7b, 0xbb, 0x14, 0x23, - 0x54, 0x31, 0x04, 0xf0, 0x81, 0x04, 0x44, 0xd2, - 0x02, 0x33, 0x60, 0xba, 0x5f, 0x4f, 0xae, 0x1f, - 0x2d, 0xce, 0xbb, 0xff, 0xe8, 0x55, 0xc7, 0xa8, - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x81, 0xa5, 0xa5, 0x8f, 0xe6, 0x4e, 0x18, 0x04, - 0x05, 0x46, 0xa1, 0x30, 0x84, 0xde, 0x4f, 0x09, - 0x36, 0x5f, 0x59, 0xbe, 0xc0, 0x4f, 0x4f, 0xbc, - 0xde, 0xd1, 0xd1, 0x11, 0x11, 0x07, 0x7a, 0x2d, - 0x89, 0x9c, 0x1b, 0x21, 0x34, 0xeb, 0x84, 0xc4, - 0x2c, 0x82, 0x63, 0xce, 0x98, 0x30, 0x22, 0xee, - 0x2c, 0xec, 0x90, 0x95, 0x66, 0x94, 0x74, 0xf5, - 0xef, 0xff, 0x74, 0xfa, 0xad, 0x61, 0x6f, 0x59 -//}; -//unsigned int sigrl_dat_len = 408; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_middle_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_middle_entry.inc deleted file mode 100644 index ecd9138f0e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_middle_entry.inc +++ /dev/null @@ -1,77 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 signature based revocation list - * Group : grpX - * Revoked signature : Member0/sig_sha256_bsn0_msg0 middle entry - */ -//unsigned char sigrl_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xa6, 0xad, 0xdd, 0xbe, 0x45, 0xcc, 0x88, 0xcc, - 0x18, 0x30, 0x68, 0x49, 0x77, 0xfe, 0xc0, 0x4f, - 0xf9, 0x27, 0xa9, 0x49, 0x66, 0x03, 0x1a, 0x3c, - 0x3c, 0x4f, 0xac, 0xb6, 0x94, 0x2e, 0xd7, 0xb0, - 0x01, 0xa3, 0x8c, 0x5e, 0x73, 0x1d, 0x2f, 0x20, - 0x86, 0xb7, 0x10, 0xbd, 0x8e, 0x63, 0x5b, 0x41, - 0x21, 0x23, 0x8d, 0xac, 0x87, 0xc0, 0x7e, 0x78, - 0xb2, 0x11, 0x33, 0x52, 0x50, 0xa7, 0x6f, 0x7a, - 0x09, 0x95, 0x63, 0x1b, 0x04, 0xce, 0x6b, 0x93, - 0x47, 0xa2, 0xb0, 0x1f, 0x2c, 0x89, 0x1c, 0xd7, - 0xaa, 0xd6, 0x88, 0xbd, 0xd5, 0x45, 0x6f, 0x06, - 0x2b, 0xcc, 0x3e, 0x02, 0x4f, 0xeb, 0xef, 0x9d, - 0xb2, 0xf9, 0x71, 0xea, 0xca, 0x8c, 0x9c, 0x00, - 0xcd, 0x7e, 0x1c, 0x15, 0x7d, 0x69, 0xe8, 0x52, - 0x03, 0x81, 0xc4, 0x31, 0x2e, 0x8f, 0x0d, 0x31, - 0xef, 0x18, 0x03, 0x37, 0x0f, 0xa3, 0x19, 0x7b, - 0x19, 0x6a, 0x11, 0x7c, 0xfb, 0x88, 0xd3, 0x08, - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x81, 0xa5, 0xa5, 0x8f, 0xe6, 0x4e, 0x18, 0x04, - 0x05, 0x46, 0xa1, 0x30, 0x84, 0xde, 0x4f, 0x09, - 0x36, 0x5f, 0x59, 0xbe, 0xc0, 0x4f, 0x4f, 0xbc, - 0xde, 0xd1, 0xd1, 0x11, 0x11, 0x07, 0x7a, 0x2d, - 0x89, 0x9c, 0x1b, 0x21, 0x34, 0xeb, 0x84, 0xc4, - 0x2c, 0x82, 0x63, 0xce, 0x98, 0x30, 0x22, 0xee, - 0x2c, 0xec, 0x90, 0x95, 0x66, 0x94, 0x74, 0xf5, - 0xef, 0xff, 0x74, 0xfa, 0xad, 0x61, 0x6f, 0x59, - 0x41, 0x9c, 0xdd, 0x92, 0x47, 0x9f, 0x6f, 0xf3, - 0x56, 0x25, 0x0e, 0xbc, 0xa0, 0x89, 0xf2, 0x7f, - 0x12, 0x45, 0x5b, 0xb4, 0xd6, 0xa5, 0xb5, 0x71, - 0x31, 0x70, 0xae, 0xaf, 0x65, 0x55, 0x0e, 0xa9, - 0x1a, 0x5d, 0xc0, 0x1f, 0x20, 0x71, 0x07, 0xce, - 0x3e, 0x5e, 0xd3, 0xee, 0x5b, 0x4c, 0x67, 0x21, - 0x64, 0x0c, 0x5c, 0x1c, 0xd3, 0x2d, 0x24, 0xc4, - 0xf8, 0xad, 0x31, 0x02, 0xc5, 0xb0, 0x45, 0xe8, - 0x60, 0xd2, 0x50, 0xf4, 0xd1, 0xd6, 0x2b, 0x85, - 0x53, 0xac, 0x73, 0x96, 0x98, 0xf9, 0x1b, 0x5e, - 0xb8, 0x0f, 0xa1, 0xd3, 0xba, 0x6e, 0x43, 0x92, - 0x31, 0x69, 0x82, 0x14, 0x4a, 0xff, 0x36, 0x44, - 0x58, 0xf6, 0x41, 0xe3, 0x46, 0x85, 0x83, 0x05, - 0x96, 0x87, 0x7c, 0x0c, 0x0b, 0x70, 0x24, 0x8e, - 0x42, 0xb0, 0xd5, 0x9e, 0x7f, 0xcb, 0x26, 0xe8 -//}; -//unsigned int sigrl_dat_len = 408; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_single_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_single_entry.inc deleted file mode 100644 index 95a6f0dc3f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_single_entry.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 signature based revocation list - * Group : grpX - * Revoked signature : Member0/sig_sha256_bsn0_msg0 - */ -//unsigned char sigrl_empty_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x81, 0xa5, 0xa5, 0x8f, 0xe6, 0x4e, 0x18, 0x04, - 0x05, 0x46, 0xa1, 0x30, 0x84, 0xde, 0x4f, 0x09, - 0x36, 0x5f, 0x59, 0xbe, 0xc0, 0x4f, 0x4f, 0xbc, - 0xde, 0xd1, 0xd1, 0x11, 0x11, 0x07, 0x7a, 0x2d, - 0x89, 0x9c, 0x1b, 0x21, 0x34, 0xeb, 0x84, 0xc4, - 0x2c, 0x82, 0x63, 0xce, 0x98, 0x30, 0x22, 0xee, - 0x2c, 0xec, 0x90, 0x95, 0x66, 0x94, 0x74, 0xf5, - 0xef, 0xff, 0x74, 0xfa, 0xad, 0x61, 0x6f, 0x59 -//}; -//unsigned int sigrl_empty_dat_len = 152; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_ver_2.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_ver_2.inc deleted file mode 100644 index d72268454d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/sigrl_ver_2.inc +++ /dev/null @@ -1,76 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 signature based revocation list - * Group : grpX - */ -//unsigned char sigrl_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, - 0xa6, 0xad, 0xdd, 0xbe, 0x45, 0xcc, 0x88, 0xcc, - 0x18, 0x30, 0x68, 0x49, 0x77, 0xfe, 0xc0, 0x4f, - 0xf9, 0x27, 0xa9, 0x49, 0x66, 0x03, 0x1a, 0x3c, - 0x3c, 0x4f, 0xac, 0xb6, 0x94, 0x2e, 0xd7, 0xb0, - 0x01, 0xa3, 0x8c, 0x5e, 0x73, 0x1d, 0x2f, 0x20, - 0x86, 0xb7, 0x10, 0xbd, 0x8e, 0x63, 0x5b, 0x41, - 0x21, 0x23, 0x8d, 0xac, 0x87, 0xc0, 0x7e, 0x78, - 0xb2, 0x11, 0x33, 0x52, 0x50, 0xa7, 0x6f, 0x7a, - 0x09, 0x95, 0x63, 0x1b, 0x04, 0xce, 0x6b, 0x93, - 0x47, 0xa2, 0xb0, 0x1f, 0x2c, 0x89, 0x1c, 0xd7, - 0xaa, 0xd6, 0x88, 0xbd, 0xd5, 0x45, 0x6f, 0x06, - 0x2b, 0xcc, 0x3e, 0x02, 0x4f, 0xeb, 0xef, 0x9d, - 0xb2, 0xf9, 0x71, 0xea, 0xca, 0x8c, 0x9c, 0x00, - 0xcd, 0x7e, 0x1c, 0x15, 0x7d, 0x69, 0xe8, 0x52, - 0x03, 0x81, 0xc4, 0x31, 0x2e, 0x8f, 0x0d, 0x31, - 0xef, 0x18, 0x03, 0x37, 0x0f, 0xa3, 0x19, 0x7b, - 0x19, 0x6a, 0x11, 0x7c, 0xfb, 0x88, 0xd3, 0x08, - 0x17, 0x98, 0x9d, 0xd6, 0x5a, 0x87, 0xd3, 0xe8, - 0x69, 0x3f, 0x6c, 0x8b, 0xd8, 0xd4, 0x6c, 0x11, - 0x17, 0x2b, 0xae, 0xf2, 0x8d, 0xa4, 0x35, 0x55, - 0x32, 0x9e, 0x85, 0x6a, 0xc2, 0x9e, 0xee, 0x5b, - 0xcd, 0x23, 0x7a, 0x11, 0xa7, 0xdd, 0xde, 0xb2, - 0xd1, 0xc6, 0xb8, 0x02, 0x93, 0xdb, 0x1e, 0x69, - 0x99, 0x6d, 0xc6, 0x2f, 0x98, 0xab, 0x26, 0x89, - 0x02, 0x83, 0xfa, 0xa6, 0x65, 0xe9, 0xc6, 0x9f, - 0xf7, 0xc9, 0x7b, 0xda, 0x73, 0x1c, 0x60, 0x11, - 0x32, 0x85, 0x17, 0x49, 0xca, 0x0b, 0x96, 0x0c, - 0x47, 0x0d, 0xef, 0x94, 0x9c, 0x15, 0x05, 0xbe, - 0x4b, 0xed, 0xd6, 0xee, 0x7b, 0xbb, 0x14, 0x23, - 0x54, 0x31, 0x04, 0xf0, 0x81, 0x04, 0x44, 0xd2, - 0x02, 0x33, 0x60, 0xba, 0x5f, 0x4f, 0xae, 0x1f, - 0x2d, 0xce, 0xbb, 0xff, 0xe8, 0x55, 0xc7, 0xa8, - 0xa6, 0x50, 0xbe, 0xa7, 0xfb, 0x41, 0x9d, 0xf8, - 0x41, 0x9c, 0xdd, 0x92, 0x47, 0x9f, 0x6f, 0xf3, - 0x56, 0x25, 0x0e, 0xbc, 0xa0, 0x89, 0xf2, 0x7f, - 0x12, 0x45, 0x5b, 0xb4, 0xd6, 0xa5, 0xb5, 0x71, - 0x31, 0x70, 0xae, 0xaf, 0x65, 0x55, 0x0e, 0xa9, - 0x1a, 0x5d, 0xc0, 0x1f, 0x20, 0x71, 0x07, 0xce, - 0x3e, 0x5e, 0xd3, 0xee, 0x5b, 0x4c, 0x67, 0x21, - 0x64, 0x0c, 0x5c, 0x1c, 0xd3, 0x2d, 0x24, 0xc4, - 0xf8, 0xad, 0x31, 0x02, 0xc5, 0xb0, 0x45, 0xe8, - 0x60, 0xd2, 0x50, 0xf4, 0xd1, 0xd6, 0x2b, 0x85, - 0x53, 0xac, 0x73, 0x96, 0x98, 0xf9, 0x1b, 0x5e, - 0xb8, 0x0f, 0xa1, 0xd3, 0xba, 0x6e, 0x43, 0x92, - 0x31, 0x69, 0x82, 0x14, 0x4a, 0xff, 0x36, 0x44, - 0x58, 0xf6, 0x41, 0xe3, 0x46, 0x85, 0x83, 0x05, - 0x96, 0x87, 0x7c, 0x0c, 0x0b, 0x70, 0x24, 0x8e, - 0x42, 0xb0, 0xd5, 0x9e, 0x7f, 0xcb, 0x26, 0xe8 -//}; -//unsigned int sigrl_dat_len = 408; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey000.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey000.inc deleted file mode 100644 index 4dc89ff16a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey000.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : verrevokedmember000 (revoked in grpX bsn0 verrl) - */ - -//unsigned char mprivkey000_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x91, 0xd6, 0xcd, 0x65, 0x09, 0xbc, 0x30, 0x13, - 0x43, 0x50, 0x09, 0x25, 0x1c, 0x05, 0x66, 0x77, - 0xb0, 0x69, 0x38, 0x5b, 0x61, 0x49, 0x25, 0xec, - 0xf3, 0xa0, 0x00, 0x4b, 0xcb, 0xc9, 0xa3, 0x58, - 0xee, 0x72, 0xb6, 0x75, 0xf6, 0x79, 0xb8, 0xf1, - 0x8e, 0x1f, 0xe8, 0x8b, 0xf7, 0x1b, 0x84, 0xf9, - 0xd0, 0x27, 0x28, 0x8b, 0xf6, 0x2a, 0xe2, 0xf0, - 0xd9, 0xb7, 0xf7, 0xdf, 0x8d, 0x65, 0x75, 0xee, - 0xc8, 0xa3, 0xf2, 0xcd, 0xc3, 0x26, 0x5a, 0x13, - 0xf8, 0xa5, 0x39, 0x57, 0x44, 0x57, 0xb7, 0x96, - 0x2e, 0x5c, 0x3a, 0x7a, 0xe6, 0x38, 0x5a, 0x99, - 0xec, 0xe3, 0x4b, 0x6c, 0x77, 0x7a, 0x14, 0x8b, - 0xb2, 0x17, 0x61, 0x7d, 0x51, 0x64, 0xf6, 0xa4, - 0xbc, 0x97, 0xcd, 0x67, 0xde, 0x98, 0xce, 0xee, - 0x8d, 0x5e, 0x78, 0x84, 0x77, 0x9b, 0x99, 0x84, - 0x01, 0x9f, 0x66, 0x7c, 0xd4, 0x67, 0x81, 0x48 -//}; -//unsigned int mprivkey000_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey001.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey001.inc deleted file mode 100644 index c42eaadb88..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey001.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : verrevokedmember001 (revoked in grpX bsn0 verrl) - */ - -//unsigned char mprivkey001_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x2e, 0xcb, 0xb7, 0x36, 0x9b, 0x2b, 0x8d, 0xd1, - 0x03, 0x25, 0xd8, 0xe7, 0x57, 0x21, 0xac, 0x47, - 0x60, 0xe3, 0x1d, 0xb5, 0x78, 0xfa, 0x6d, 0x8c, - 0x00, 0x7d, 0x95, 0x91, 0x64, 0x31, 0xb6, 0x7d, - 0xdb, 0x18, 0x3a, 0x11, 0x99, 0x22, 0x93, 0x93, - 0x57, 0x8d, 0x9b, 0x23, 0x1d, 0x65, 0xa2, 0x78, - 0x18, 0xa0, 0xf4, 0x99, 0x1b, 0x67, 0xe2, 0xc7, - 0x4a, 0xb1, 0xfc, 0xa6, 0xdd, 0xae, 0x05, 0x20, - 0x3b, 0x26, 0xd9, 0xc6, 0x41, 0x2f, 0x38, 0x64, - 0xb4, 0xd7, 0x7b, 0xf3, 0x86, 0x01, 0x33, 0xc1, - 0x5f, 0x22, 0x30, 0xeb, 0x20, 0x94, 0x76, 0xad, - 0xb1, 0x15, 0xc3, 0xe0, 0x1c, 0xfe, 0x8d, 0x61, - 0x3f, 0xf7, 0xef, 0xfc, 0xcb, 0xfb, 0xeb, 0xa6, - 0xf9, 0x31, 0x3b, 0x9f, 0xd4, 0xa7, 0x21, 0x61, - 0xaa, 0x98, 0xf4, 0x8d, 0x79, 0x3c, 0xf0, 0x33, - 0x04, 0x0c, 0x79, 0x6d, 0x88, 0x02, 0xba, 0x1c -//}; -//unsigned int mprivkey001_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey002.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey002.inc deleted file mode 100644 index ef60d525de..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/mprivkey002.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : verrevokedmember002 (revoked in grpX bsn0 verrl) - */ - -//unsigned char mprivkey002_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xab, 0x31, 0xae, 0x14, 0x0c, 0xcf, 0x08, 0x26, - 0xfb, 0x6e, 0x67, 0x2c, 0xca, 0x71, 0x49, 0xba, - 0x84, 0x53, 0xc7, 0xe6, 0x2b, 0xee, 0xc7, 0xff, - 0x3a, 0x1e, 0x7e, 0x63, 0x1d, 0xf7, 0x2e, 0xee, - 0xc3, 0xa7, 0xfc, 0x69, 0x69, 0x44, 0x09, 0x5d, - 0xf9, 0xf0, 0xf4, 0x27, 0xca, 0x26, 0xe2, 0x3a, - 0x85, 0x8c, 0x8f, 0x01, 0x7b, 0xcf, 0xef, 0xac, - 0x1c, 0x07, 0x89, 0x0b, 0x41, 0x5f, 0x15, 0x42, - 0x9d, 0x62, 0xfc, 0x19, 0x8e, 0xe1, 0xde, 0x1f, - 0x37, 0x47, 0xe3, 0xc0, 0x72, 0xff, 0xdb, 0x0c, - 0x18, 0x3f, 0x21, 0x6d, 0x8e, 0xb0, 0xfb, 0xb6, - 0x6a, 0x15, 0x19, 0xc7, 0x47, 0x88, 0x88, 0x4a, - 0x90, 0xdb, 0xd9, 0x11, 0xf1, 0xef, 0x1a, 0x68, - 0x8d, 0x1c, 0x07, 0xfe, 0x04, 0xbd, 0xf2, 0x6c, - 0x8b, 0x1b, 0xd0, 0x7f, 0x96, 0x9a, 0x90, 0xed, - 0x34, 0x0c, 0x13, 0x6d, 0x7c, 0x0c, 0x32, 0x58 -//}; -//unsigned int mprivkey002_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha256bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha256bsn0msg0.inc deleted file mode 100644 index 338a3b8142..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha256bsn0msg0.inc +++ /dev/null @@ -1,136 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey000 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ - -//unsigned char sig_revoked0msg0bsn0_dat[] = { - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x8b, 0xc9, 0x6e, 0xc0, 0x86, 0x04, 0x6f, 0x6c, - 0x89, 0xc2, 0x27, 0xfd, 0x61, 0x59, 0xb5, 0xd2, - 0x73, 0x96, 0xfa, 0xd6, 0xf8, 0xfa, 0x2c, 0x39, - 0xfe, 0xee, 0xef, 0x3e, 0x73, 0xd2, 0x38, 0x3f, - 0x3c, 0x04, 0x07, 0x78, 0xfd, 0x32, 0x9b, 0xc3, - 0x74, 0x90, 0xf2, 0xf5, 0x50, 0xe4, 0x69, 0x5d, - 0x30, 0x0c, 0x6a, 0x8a, 0x9c, 0xcf, 0xff, 0x78, - 0x28, 0x52, 0x6d, 0x20, 0x29, 0xef, 0x2d, 0x7a, - 0x70, 0x75, 0x91, 0x2d, 0xbd, 0x56, 0x9f, 0x18, - 0x65, 0x25, 0x5f, 0x3a, 0x15, 0x36, 0x10, 0x91, - 0xf9, 0x02, 0x37, 0x30, 0xb1, 0x75, 0x8a, 0x9b, - 0xb0, 0x99, 0xc1, 0x28, 0xb7, 0x7b, 0x15, 0x4d, - 0xfc, 0x66, 0x4d, 0xe3, 0x3c, 0x37, 0x57, 0xf2, - 0x64, 0xbb, 0x24, 0xe4, 0xfc, 0xbd, 0x56, 0x7a, - 0x3f, 0x3a, 0xa5, 0xcb, 0x66, 0xd3, 0xd2, 0x9f, - 0xe2, 0x51, 0x4b, 0xa8, 0x5d, 0x8f, 0x79, 0x38, - 0xa1, 0x25, 0xe4, 0x3c, 0xc0, 0xa5, 0x4e, 0x83, - 0xd5, 0x0a, 0x9f, 0xfa, 0x6f, 0x9d, 0xc2, 0x49, - 0x35, 0x71, 0x54, 0x2e, 0x62, 0x7b, 0x06, 0xb3, - 0x60, 0x57, 0x79, 0x77, 0xf4, 0x0e, 0x91, 0x6f, - 0xec, 0x58, 0xdc, 0xb2, 0x80, 0xe3, 0xd3, 0x5b, - 0xa7, 0x68, 0x31, 0x18, 0x6f, 0x9e, 0x47, 0x5f, - 0x99, 0xc8, 0x85, 0xd2, 0x25, 0xbb, 0x68, 0xb4, - 0x8f, 0x4c, 0x21, 0x85, 0x77, 0x2f, 0x62, 0x92, - 0xd0, 0xe1, 0x70, 0x5a, 0x02, 0xbc, 0xed, 0x69, - 0x46, 0xc0, 0xca, 0x83, 0xcc, 0xe6, 0xb9, 0xff, - 0x17, 0x90, 0xb7, 0xc3, 0xbb, 0x86, 0xa5, 0x41, - 0x55, 0x25, 0xcb, 0x3d, 0x18, 0x6e, 0x60, 0xaf, - 0x52, 0x70, 0xfc, 0xe5, 0x55, 0xfc, 0x7d, 0x8e, - 0xf2, 0x5b, 0xa1, 0x1c, 0xc2, 0x34, 0x31, 0x77, - 0xbc, 0x9d, 0x23, 0xc5, 0xbb, 0x01, 0xf0, 0x2b, - 0xa7, 0xaf, 0x52, 0xaa, 0x9a, 0xd9, 0x74, 0x58, - 0x96, 0x87, 0x54, 0x6c, 0xb6, 0x93, 0x0c, 0x9a, - 0x8f, 0x0f, 0xb6, 0x0e, 0x89, 0xb6, 0xb9, 0x0b, - 0xd3, 0x5c, 0xe4, 0x83, 0xad, 0x1c, 0x79, 0x7c, - 0x12, 0x36, 0x0d, 0xe2, 0xa7, 0xab, 0xd7, 0xd0, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xc5, 0x3b, 0x02, 0x5f, 0xcd, 0x67, 0x05, 0x99, - 0x74, 0x1f, 0x65, 0xa1, 0xdb, 0xee, 0xa2, 0x18, - 0x5d, 0xee, 0x82, 0xa9, 0x98, 0xab, 0xa6, 0x92, - 0x84, 0xf1, 0x08, 0x98, 0x36, 0x56, 0xe0, 0x63, - 0xa0, 0xc0, 0xd2, 0xff, 0xc3, 0x34, 0xc1, 0xc2, - 0x87, 0x00, 0x0d, 0x8b, 0x78, 0xc9, 0x68, 0x49, - 0xdf, 0xd8, 0xfa, 0xdc, 0x00, 0x80, 0xf7, 0xf4, - 0xa7, 0xf8, 0x1c, 0x8c, 0x96, 0xf3, 0x00, 0x3b, - 0xcf, 0x06, 0x8f, 0x66, 0x18, 0x68, 0x9b, 0xe6, - 0xca, 0x20, 0xe5, 0x5a, 0x4c, 0xf4, 0x87, 0x43, - 0xc8, 0xf4, 0x5c, 0x28, 0x8d, 0x35, 0x85, 0x1c, - 0xa5, 0x27, 0xd7, 0xcc, 0x8b, 0x7f, 0x96, 0x70, - 0xdd, 0xf2, 0x50, 0x60, 0xde, 0x45, 0x83, 0x8c, - 0x9b, 0x64, 0xe2, 0xd2, 0x49, 0x46, 0x48, 0xb0, - 0x7a, 0x67, 0x32, 0x2b, 0xb6, 0xea, 0xa8, 0x40, - 0x8d, 0x08, 0x2f, 0xd7, 0xd7, 0x2a, 0x2b, 0x4a, - 0x45, 0x9e, 0x5c, 0x56, 0x8c, 0x50, 0xaa, 0x81, - 0x46, 0x18, 0xc8, 0x46, 0x8a, 0x11, 0xf8, 0x89, - 0x3e, 0x32, 0x20, 0xb8, 0xf5, 0x7f, 0xc8, 0x25, - 0xda, 0xe0, 0x51, 0x39, 0xe9, 0x57, 0x87, 0x26, - 0xe9, 0x79, 0x70, 0xce, 0x75, 0x99, 0xe5, 0xab, - 0x6e, 0x6f, 0x73, 0xe9, 0xc2, 0x99, 0xc8, 0xb7, - 0x30, 0xdc, 0xe3, 0xd8, 0x95, 0x92, 0x4e, 0xb8, - 0xac, 0xf3, 0xc1, 0x9c, 0x97, 0x6e, 0xfe, 0x48, - 0x5e, 0xff, 0xce, 0x7a, 0x1b, 0x95, 0xb8, 0x90, - 0xb9, 0xd5, 0x8d, 0x44, 0xdc, 0x92, 0xf5, 0xf7, - 0x91, 0xe5, 0x2f, 0x28, 0x31, 0x7d, 0x21, 0x91, - 0x2b, 0xf0, 0x1d, 0x27, 0xd6, 0x46, 0x7a, 0x6d, - 0xdc, 0x70, 0x2e, 0x85, 0x55, 0x58, 0x8a, 0xd4, - 0xdb, 0x09, 0xea, 0xf7, 0x6a, 0x2c, 0x35, 0xcb, - 0xc5, 0xd1, 0x53, 0x07, 0x12, 0xbd, 0x25, 0x5e, - 0x05, 0x61, 0x43, 0xb8, 0xb3, 0x87, 0xf1, 0xb8, - 0x88, 0x58, 0xaf, 0x47, 0x04, 0x7e, 0x52, 0x6c, - 0x6c, 0x04, 0x58, 0xfb, 0x00, 0x67, 0x8f, 0xa5, - 0xb2, 0x99, 0x09, 0xed, 0x86, 0xa4, 0x5d, 0xdf, - 0x4b, 0xea, 0x4d, 0xa0, 0xb9, 0x1a, 0x4d, 0x98, - 0x1f, 0x76, 0x19, 0x84, 0x9c, 0x2a, 0x8e, 0xdb, - 0x8b, 0xdb, 0x5c, 0x60, 0xa5, 0x8c, 0x09, 0xea, - 0x0d, 0xff, 0x3e, 0x3e, 0x18, 0xf5, 0xa8, 0xf5, - 0xa0, 0x82, 0x15, 0xa0, 0xf5, 0x36, 0xc3, 0xb6, - 0x72, 0xab, 0x81, 0x8f, 0xae, 0x9c, 0x67, 0x63, - 0x49, 0xfe, 0x01, 0x66, 0xd2, 0x53, 0x9c, 0x97, - 0x0e, 0x58, 0x1c, 0x6f, 0xb6, 0x49, 0x16, 0x7a, - 0x43, 0xfc, 0x61, 0x0d, 0x36, 0x31, 0x28, 0x65, - 0x32, 0x62, 0x28, 0x44, 0x50, 0xda, 0xb1, 0x1b, - 0x7a, 0xd6, 0x27, 0x69, 0xc0, 0xe9, 0xab, 0x78, - 0xda, 0x27, 0xd7, 0x9e, 0x7e, 0x35, 0xcf, 0x8b, - 0x09, 0xc7, 0x2f, 0x5f, 0x8d, 0xa4, 0x29, 0xdb, - 0x83, 0x62, 0x89, 0x36, 0x86, 0x53, 0xcc, 0xe9, - 0x6f, 0xb9, 0x4a, 0x31, 0x9e, 0xf8, 0xa5, 0x7b, - 0x2f, 0xb6, 0xff, 0x2a, 0x5f, 0xbe, 0xb1, 0x71, - 0x42, 0xc0, 0xf8, 0x36, 0x51, 0xdb, 0xe9, 0x1a, - 0xe0, 0xcd, 0xaa, 0xc1, 0x0c, 0x1d, 0x74, 0x4c, - 0x00, 0x98, 0x38, 0xbd, 0x70, 0x39, 0xc9, 0xd3, - 0xdf, 0x4c, 0xeb, 0xde, 0x19, 0x2f, 0xf8, 0x52, - 0x5b, 0x1a, 0x2a, 0x91, 0x50, 0xb8, 0xd3, 0xca, - 0x67, 0x2e, 0x4e, 0xaf, 0xa5, 0xce, 0x54, 0xa6, - 0x02, 0x34, 0xa5, 0x8b, 0x0b, 0xf8, 0x96, 0x46, - 0x04, 0xe2, 0x45, 0xaa, 0xb3, 0x24, 0x99, 0x60, - 0x24, 0x42, 0xde, 0x75, 0x91, 0xcf, 0x5b, 0xfb -//}; -//unsigned int sig_revoked0msg0bsn0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha384bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha384bsn0msg0.inc deleted file mode 100644 index 51cbdfdae5..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha384bsn0msg0.inc +++ /dev/null @@ -1,60 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey000 - * HashAlg : Sha384 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : empty sigrl - */ -//unsigned char sig000_sha384_dat[] = { - 0x57, 0xe7, 0x8f, 0xfb, 0xf9, 0xa3, 0xba, 0x5e, 0xac, 0xec, 0xb3, 0xa4, - 0xf4, 0x13, 0x95, 0xa1, 0x1c, 0x1d, 0xe1, 0xaf, 0xea, 0x16, 0xba, 0x6d, - 0xde, 0x4c, 0x43, 0xf0, 0x89, 0x59, 0x5e, 0xfa, 0x0f, 0x18, 0xdd, 0x22, - 0xf6, 0xd6, 0xfc, 0xe5, 0x0f, 0xb2, 0x81, 0xb5, 0xa9, 0xa6, 0xe8, 0xee, - 0x14, 0x04, 0xec, 0x1b, 0x4e, 0x65, 0x82, 0x7f, 0x96, 0x53, 0xc4, 0x3b, - 0x29, 0x17, 0x39, 0xc0, 0x9d, 0x3e, 0x8e, 0xd2, 0x45, 0xfd, 0x1b, 0xcd, - 0x33, 0x6c, 0xdb, 0x1a, 0xda, 0x34, 0x59, 0x2e, 0x38, 0x72, 0x75, 0x17, - 0x25, 0xee, 0xa8, 0x9b, 0xf9, 0xd0, 0x1b, 0x15, 0x82, 0x03, 0x8c, 0x72, - 0x5d, 0xb7, 0x3c, 0x7c, 0x7e, 0x17, 0x81, 0x55, 0x52, 0x7d, 0x87, 0x7c, - 0x90, 0xd8, 0x17, 0xee, 0x35, 0xdb, 0xe1, 0x67, 0x59, 0xa4, 0xd6, 0xb3, - 0x24, 0x54, 0xd2, 0x70, 0x0f, 0xc0, 0x37, 0x39, 0x54, 0xfd, 0xce, 0xff, - 0x03, 0x33, 0xe4, 0xe9, 0x3d, 0x5e, 0xef, 0x0c, 0x2b, 0x7b, 0x54, 0xf4, - 0x9e, 0x45, 0x45, 0xe3, 0x7b, 0x41, 0xa5, 0x91, 0x68, 0x8a, 0x56, 0xca, - 0xdb, 0xb0, 0xb4, 0x2c, 0x62, 0x14, 0x5e, 0x29, 0xf9, 0x54, 0x03, 0xaa, - 0xb0, 0xff, 0x60, 0x2a, 0xc1, 0x41, 0xe6, 0x1c, 0xbc, 0xbc, 0x7d, 0xc5, - 0x40, 0x67, 0xae, 0x72, 0x81, 0xcb, 0xc7, 0x91, 0xaa, 0x57, 0xb2, 0x78, - 0xaf, 0xc2, 0x44, 0x85, 0x56, 0x6d, 0xcc, 0x42, 0x72, 0xdc, 0x0f, 0x6e, - 0x85, 0x47, 0xb6, 0x09, 0xa8, 0x7e, 0x10, 0x78, 0xe7, 0x37, 0xfd, 0xbe, - 0x9a, 0x80, 0x3b, 0x51, 0x48, 0x58, 0xa4, 0x36, 0xbd, 0x2b, 0xe5, 0xbf, - 0x1e, 0x0b, 0x10, 0xf4, 0xc1, 0xf1, 0xf8, 0x4d, 0xb0, 0x99, 0xba, 0xdb, - 0xc5, 0x61, 0xd1, 0x0d, 0x8a, 0x37, 0x9d, 0x97, 0x5d, 0x50, 0x26, 0x32, - 0x5b, 0x3d, 0x43, 0x11, 0xd7, 0xf1, 0x79, 0xf3, 0xf5, 0x7d, 0xd5, 0xe6, - 0xab, 0x60, 0xe5, 0xed, 0x27, 0x8f, 0x9f, 0xd8, 0x7e, 0x79, 0x51, 0x0a, - 0x11, 0x56, 0x94, 0x06, 0x49, 0x83, 0x74, 0xbe, 0x08, 0x3e, 0xbe, 0xc7, - 0x0b, 0x3e, 0xfe, 0x1b, 0x04, 0x1b, 0xd5, 0x8f, 0xd3, 0xee, 0xcc, 0xcd, - 0x13, 0xf3, 0x51, 0xae, 0xcd, 0x61, 0x02, 0x1f, 0x00, 0x00, 0xf9, 0x7d, - 0x19, 0xac, 0xee, 0x09, 0x84, 0xf9, 0x9d, 0x67, 0x1b, 0x7b, 0xe6, 0x60, - 0x8c, 0xfc, 0xa1, 0x66, 0xc4, 0xbf, 0x01, 0x75, 0x1a, 0x12, 0xfc, 0x9f, - 0x92, 0xd9, 0x47, 0x8b, 0x7f, 0x6a, 0x03, 0x93, 0x16, 0x5b, 0x76, 0xf8, - 0x62, 0x26, 0x3e, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -//}; -//unsigned int sig000_sha384_dat_len = 360; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha512bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha512bsn0msg0.inc deleted file mode 100644 index e10dc03ec2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha512bsn0msg0.inc +++ /dev/null @@ -1,60 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey000 - * HashAlg : Sha512 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : empty sigrl - */ -//unsigned char sig000_sha512_dat[] = { - 0x72, 0xed, 0x4f, 0x01, 0xf2, 0xfe, 0xc9, 0xf4, 0x56, 0x4f, 0x11, 0x31, - 0x62, 0x07, 0x02, 0x0f, 0xed, 0xd0, 0x6b, 0xe8, 0xbf, 0xa9, 0x0b, 0x55, - 0xb8, 0xf7, 0xe9, 0x6e, 0xaa, 0x13, 0x2e, 0x6f, 0xa7, 0xd5, 0xec, 0x4b, - 0x3e, 0x23, 0x5f, 0x4f, 0x61, 0x44, 0x52, 0xc1, 0x75, 0x0b, 0x13, 0xad, - 0xa1, 0x53, 0x0d, 0x6a, 0x73, 0xed, 0x5e, 0x49, 0xa9, 0xed, 0x1d, 0x88, - 0xde, 0xa6, 0x93, 0x18, 0xe6, 0xec, 0xb1, 0xff, 0xca, 0xad, 0x04, 0x8a, - 0x1a, 0x04, 0xac, 0xf9, 0x6c, 0xe4, 0x7a, 0xa1, 0xfe, 0xe0, 0x7b, 0xd7, - 0xbb, 0x64, 0x25, 0xa7, 0x5b, 0xfa, 0x3c, 0xa4, 0xd6, 0x30, 0x9e, 0x25, - 0xa0, 0x85, 0xad, 0x9f, 0x81, 0x61, 0x87, 0x6f, 0x1b, 0x34, 0x01, 0x67, - 0x30, 0x31, 0xbc, 0x3c, 0x9f, 0x37, 0x62, 0x79, 0x51, 0x13, 0x57, 0x6d, - 0xa8, 0xd3, 0xca, 0x73, 0x8d, 0xe2, 0x76, 0x42, 0x68, 0xe0, 0x76, 0xb3, - 0xde, 0x5d, 0xeb, 0x23, 0x26, 0xdd, 0x41, 0xad, 0x4c, 0x67, 0x8c, 0x7d, - 0x35, 0x55, 0x2b, 0x5c, 0x1c, 0x68, 0xa6, 0x0e, 0x17, 0x1b, 0x9a, 0xa7, - 0x0a, 0x07, 0x21, 0xaf, 0x2b, 0x5a, 0x69, 0x06, 0x8e, 0x66, 0xe5, 0x18, - 0x85, 0x83, 0x5a, 0x20, 0x4b, 0x14, 0x0e, 0xfa, 0x62, 0x13, 0x1d, 0x7c, - 0x22, 0x6a, 0xd7, 0xff, 0x04, 0x19, 0x93, 0x06, 0x91, 0xc0, 0x83, 0x82, - 0xdc, 0x34, 0x2a, 0x66, 0x3a, 0x73, 0x49, 0x1f, 0xc8, 0x36, 0x1f, 0xa8, - 0x37, 0x6b, 0x93, 0xe2, 0x66, 0xb6, 0x91, 0xbe, 0xd8, 0xcc, 0xd3, 0x84, - 0xda, 0x09, 0x6b, 0xa9, 0xb3, 0xa5, 0x32, 0x8e, 0x92, 0x99, 0x61, 0xdc, - 0xa7, 0xbe, 0xbe, 0x59, 0x30, 0x44, 0x62, 0x96, 0x25, 0x2e, 0xcf, 0xcb, - 0x79, 0xf6, 0xb5, 0x9c, 0x38, 0xce, 0xac, 0x89, 0x76, 0x99, 0x7e, 0x50, - 0x7f, 0x46, 0xce, 0x61, 0xde, 0x4a, 0xd9, 0xa9, 0x72, 0x38, 0xa9, 0xe4, - 0x3b, 0x92, 0x83, 0x63, 0xe9, 0xf1, 0xea, 0x8c, 0x03, 0x1b, 0xba, 0xe4, - 0x63, 0xea, 0x52, 0x79, 0xad, 0x87, 0x8e, 0xad, 0x36, 0x7f, 0x35, 0x90, - 0x6b, 0xdb, 0x29, 0xf6, 0x1d, 0x2b, 0x55, 0x28, 0x15, 0x6e, 0xac, 0x72, - 0xb0, 0x60, 0x9c, 0x08, 0xc0, 0x76, 0xfe, 0x56, 0xa4, 0xc2, 0x4c, 0x58, - 0xcf, 0xd2, 0xb8, 0x79, 0xf2, 0x3c, 0x90, 0xfd, 0x79, 0x92, 0x17, 0x05, - 0x68, 0x5b, 0xce, 0x4d, 0xc3, 0x82, 0xca, 0xd9, 0x9b, 0x45, 0xc6, 0x3c, - 0xe5, 0xff, 0x17, 0x07, 0x47, 0x3c, 0x86, 0x3c, 0x38, 0x9a, 0x02, 0x18, - 0xdc, 0x87, 0xfc, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -//}; -//unsigned int sig000_sha512_dat_len = 360; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha256bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha256bsn0msg0.inc deleted file mode 100644 index b27b723a9e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha256bsn0msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey001 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_revoked1msg0bsn0_dat[] = { - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x07, 0x46, 0xed, 0xb8, 0x6a, 0x4e, 0x7f, 0x4b, - 0x9d, 0xcc, 0x18, 0x91, 0x88, 0xf6, 0x76, 0x4d, - 0x74, 0x02, 0x36, 0x62, 0xe6, 0xd4, 0xb5, 0xf0, - 0x2d, 0x70, 0x91, 0x49, 0x65, 0xdf, 0x19, 0x02, - 0x30, 0x6c, 0x11, 0xaa, 0x74, 0x8c, 0x55, 0x2e, - 0x4b, 0xa3, 0x00, 0x00, 0xb0, 0x38, 0xf4, 0xcd, - 0x5d, 0xc9, 0x1d, 0xaa, 0x1e, 0x44, 0x98, 0xa4, - 0xe1, 0x3f, 0x2f, 0x4f, 0x6c, 0xc9, 0x15, 0xb0, - 0xb4, 0x9c, 0xb0, 0xe1, 0x0d, 0x9e, 0x27, 0x6c, - 0xc4, 0x1f, 0x77, 0x8c, 0x93, 0x98, 0x19, 0x8f, - 0xfa, 0xf5, 0xa2, 0x29, 0x09, 0x88, 0x51, 0xfc, - 0x76, 0xd8, 0xcd, 0xe6, 0xc7, 0x88, 0xeb, 0xba, - 0x19, 0x28, 0xa2, 0xd4, 0x25, 0x76, 0x13, 0x9d, - 0x0f, 0xee, 0x7c, 0x24, 0xbe, 0xc6, 0x67, 0x41, - 0xee, 0xce, 0x35, 0xf5, 0x6e, 0x83, 0xef, 0xb7, - 0x28, 0x28, 0xaa, 0x4f, 0x81, 0x3c, 0xc5, 0xb1, - 0x26, 0xc0, 0x76, 0x1b, 0x34, 0xab, 0x95, 0xfc, - 0x3a, 0x8f, 0x55, 0x93, 0x0a, 0x14, 0x2c, 0x3a, - 0x4c, 0xac, 0x6d, 0xd8, 0x3f, 0xa3, 0x0d, 0x57, - 0x6f, 0xe3, 0xd7, 0x46, 0xe4, 0x0a, 0x74, 0x27, - 0x27, 0x7c, 0x11, 0x25, 0xc9, 0x39, 0xe4, 0xee, - 0xf6, 0xfb, 0x08, 0xd1, 0xee, 0xa0, 0xbd, 0x67, - 0x0d, 0x16, 0x5b, 0xf6, 0x58, 0x22, 0x86, 0x4c, - 0xcd, 0x6f, 0x96, 0x8e, 0x5e, 0xb9, 0xa8, 0x23, - 0x2a, 0x8c, 0x35, 0x1a, 0x56, 0x81, 0x44, 0xfd, - 0xd6, 0xb5, 0x4a, 0x9c, 0xc5, 0xad, 0x95, 0x63, - 0xff, 0x20, 0x57, 0x56, 0xd8, 0x4c, 0x7e, 0x65, - 0x91, 0xd4, 0x81, 0xee, 0xa6, 0xdf, 0x43, 0x5e, - 0x82, 0x21, 0xcd, 0xda, 0x13, 0xc0, 0x9e, 0xef, - 0xa7, 0x42, 0xff, 0x30, 0x0a, 0x74, 0x2d, 0x18, - 0x88, 0xe8, 0x69, 0x9d, 0xbc, 0x51, 0x9e, 0x8e, - 0x64, 0x5c, 0x05, 0x7f, 0x4d, 0xac, 0x64, 0xd4, - 0x88, 0xc7, 0xa5, 0xac, 0xf4, 0x25, 0x40, 0x9e, - 0x46, 0x67, 0x4d, 0x2a, 0x1e, 0x58, 0xe6, 0x41, - 0xcc, 0xbb, 0x6a, 0x10, 0x98, 0x46, 0xd1, 0x33, - 0x8c, 0xe6, 0x97, 0xb4, 0x1e, 0x0f, 0x61, 0x24, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xe0, 0x9c, 0xd6, 0x62, 0x37, 0xb4, 0xf4, 0xf1, - 0x84, 0x29, 0xe0, 0x3f, 0x0f, 0x55, 0xbb, 0x4b, - 0xc7, 0xac, 0xac, 0x55, 0xd9, 0xc7, 0x80, 0xfb, - 0x8b, 0xd7, 0x25, 0x7a, 0x03, 0x0d, 0x5a, 0xc9, - 0xa7, 0x14, 0xb1, 0x3d, 0xd8, 0x23, 0x25, 0x92, - 0x30, 0x7a, 0xb8, 0x1e, 0xe9, 0x35, 0x7d, 0x0f, - 0x61, 0x77, 0x5d, 0xb8, 0x08, 0x97, 0xf0, 0xfe, - 0x93, 0xf1, 0xdc, 0xcb, 0x36, 0x2f, 0x3c, 0x40, - 0xde, 0xaf, 0xa5, 0xd4, 0x91, 0x76, 0x08, 0xdf, - 0x67, 0x0c, 0xce, 0xe3, 0xdc, 0x68, 0xba, 0x89, - 0x0e, 0xf0, 0x9d, 0xd5, 0xdf, 0x2d, 0x52, 0xfa, - 0x6a, 0x59, 0xd3, 0x68, 0x78, 0x01, 0x6a, 0x66, - 0xa5, 0x8a, 0x39, 0x2d, 0x7e, 0x66, 0xbf, 0x71, - 0x21, 0x31, 0xa3, 0x3a, 0xff, 0x4d, 0x1d, 0xd5, - 0x68, 0x21, 0x4a, 0x6a, 0x80, 0x77, 0xab, 0x56, - 0xcb, 0x11, 0x43, 0x7c, 0xf4, 0x5e, 0x84, 0x9a, - 0xc5, 0xea, 0x5c, 0x00, 0x2d, 0x94, 0xf4, 0xcb, - 0x05, 0xbe, 0x56, 0x8f, 0x95, 0x62, 0x02, 0xe1, - 0xa8, 0x82, 0xa5, 0x96, 0x3b, 0x3f, 0x36, 0xbf, - 0x41, 0x44, 0x6a, 0xe3, 0x0b, 0xeb, 0x90, 0x81, - 0x32, 0x1a, 0x8e, 0x1d, 0x1e, 0xf4, 0x9a, 0x6e, - 0xcf, 0xf6, 0x7d, 0x1e, 0x25, 0xf7, 0xa6, 0x67, - 0x10, 0xed, 0x3b, 0x95, 0xf5, 0x23, 0xd3, 0xb8, - 0x7e, 0x91, 0x16, 0x10, 0x78, 0x81, 0xbb, 0x7c, - 0x9f, 0x76, 0x17, 0x8a, 0x90, 0x1a, 0x6c, 0x9d, - 0x24, 0x45, 0x58, 0xf2, 0x81, 0x36, 0x53, 0x77, - 0xf4, 0xa6, 0x1f, 0xd2, 0xef, 0x58, 0x19, 0x15, - 0xe4, 0x99, 0x03, 0x4d, 0x1f, 0x96, 0xc0, 0x81, - 0x3c, 0xf2, 0x92, 0x15, 0xca, 0x3c, 0x4e, 0x0f, - 0x96, 0x01, 0xdf, 0xeb, 0x1f, 0x07, 0xec, 0x91, - 0x22, 0x8a, 0x66, 0x15, 0x44, 0x28, 0xf4, 0xeb, - 0x20, 0xb6, 0x1b, 0x8c, 0xbe, 0x06, 0x45, 0x31, - 0x44, 0x4a, 0x5f, 0x9a, 0x2c, 0xac, 0x19, 0x13, - 0x52, 0x10, 0xad, 0xb5, 0x69, 0x23, 0xd8, 0xdf, - 0x41, 0x24, 0x5e, 0x33, 0x8e, 0xc1, 0x6e, 0xd1, - 0x42, 0x18, 0x9d, 0x1c, 0x4e, 0x2b, 0x92, 0x06, - 0x4f, 0x90, 0x63, 0x24, 0x6b, 0xd6, 0x7f, 0x14, - 0x63, 0x66, 0xf1, 0x84, 0xef, 0x3d, 0x92, 0x81, - 0xa2, 0xfb, 0x1b, 0xb5, 0x12, 0x44, 0x45, 0x1d, - 0x0c, 0x78, 0x52, 0x12, 0x80, 0x05, 0xcd, 0x57, - 0xea, 0xd4, 0x65, 0xc8, 0x61, 0x3d, 0x12, 0x5f, - 0x79, 0x32, 0xdc, 0xe4, 0xc2, 0xb2, 0x3e, 0xeb, - 0xcf, 0xed, 0x1c, 0x8d, 0x89, 0x3b, 0xfd, 0x4a, - 0xcd, 0x7b, 0x05, 0xa4, 0xe5, 0xee, 0x90, 0xa0, - 0x33, 0xcd, 0xee, 0x7e, 0xfd, 0xd0, 0xb9, 0x1c, - 0x47, 0x9f, 0x29, 0xa3, 0x60, 0x51, 0x7d, 0x4d, - 0x86, 0x3c, 0x03, 0x73, 0xd7, 0x26, 0x67, 0x6b, - 0x86, 0x0b, 0x29, 0x1e, 0x0d, 0x94, 0x93, 0xc0, - 0x37, 0xf2, 0xc3, 0x65, 0x96, 0x61, 0x40, 0x51, - 0x2a, 0x0f, 0xf3, 0xce, 0xb1, 0x85, 0x03, 0x29, - 0x34, 0x77, 0x37, 0x5a, 0x2c, 0xd3, 0xa5, 0x96, - 0xf9, 0x6e, 0x92, 0xba, 0x78, 0xca, 0xfb, 0x41, - 0x2f, 0x10, 0xee, 0x43, 0xd4, 0x35, 0xfd, 0x00, - 0x8b, 0x99, 0x31, 0xe2, 0x58, 0x40, 0x5a, 0x5c, - 0xc8, 0x20, 0x68, 0x3d, 0x8a, 0x97, 0x58, 0xbb, - 0x86, 0x11, 0x09, 0xeb, 0xe9, 0xd7, 0xf2, 0x71, - 0x3f, 0x45, 0xdc, 0x8f, 0x7e, 0xbe, 0x5b, 0x11, - 0x3b, 0xa2, 0x00, 0x35, 0x94, 0x47, 0xb7, 0x22, - 0xca, 0xae, 0x30, 0x20, 0x10, 0xf7, 0xbb, 0x10, - 0xc1, 0x54, 0xc0, 0x7d, 0xfe, 0xca, 0x17, 0x5e -//}; -//unsigned int sig_revoked1msg0bsn0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha384bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha384bsn0msg0.inc deleted file mode 100644 index a1af06041f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha384bsn0msg0.inc +++ /dev/null @@ -1,60 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey001 - * HashAlg : Sha384 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : empty sigrl - */ -//unsigned char sig001_sha384_dat[] = { - 0x57, 0xe7, 0x8f, 0xfb, 0xf9, 0xa3, 0xba, 0x5e, 0xac, 0xec, 0xb3, 0xa4, - 0xf4, 0x13, 0x95, 0xa1, 0x1c, 0x1d, 0xe1, 0xaf, 0xea, 0x16, 0xba, 0x6d, - 0xde, 0x4c, 0x43, 0xf0, 0x89, 0x59, 0x5e, 0xfa, 0x0f, 0x18, 0xdd, 0x22, - 0xf6, 0xd6, 0xfc, 0xe5, 0x0f, 0xb2, 0x81, 0xb5, 0xa9, 0xa6, 0xe8, 0xee, - 0x14, 0x04, 0xec, 0x1b, 0x4e, 0x65, 0x82, 0x7f, 0x96, 0x53, 0xc4, 0x3b, - 0x29, 0x17, 0x39, 0xc0, 0x40, 0x45, 0x1d, 0xa1, 0xe4, 0x5c, 0x0a, 0xc9, - 0x81, 0xd7, 0x52, 0xe2, 0x75, 0x49, 0xf8, 0x36, 0x2d, 0xf0, 0x60, 0xd2, - 0x18, 0x1f, 0xd0, 0x98, 0x5b, 0xde, 0xdb, 0x4a, 0x99, 0x05, 0xeb, 0xba, - 0xab, 0x56, 0x75, 0x7b, 0x76, 0xaa, 0xc8, 0x52, 0xa9, 0x90, 0x95, 0x01, - 0xda, 0xfb, 0x0f, 0x1b, 0xe3, 0x04, 0x96, 0x9c, 0x27, 0x9d, 0x2b, 0xb3, - 0xc2, 0x48, 0x16, 0x3f, 0x4c, 0xc3, 0xe6, 0x6f, 0x71, 0x8a, 0xc6, 0x62, - 0x1f, 0x41, 0xc0, 0xe1, 0x2f, 0xb6, 0xd9, 0xee, 0x20, 0x47, 0x43, 0xe0, - 0xbd, 0x24, 0x16, 0xf7, 0xd5, 0x5e, 0xb4, 0x28, 0xb9, 0x62, 0xb4, 0xb4, - 0x2f, 0x1c, 0xef, 0x0a, 0x26, 0x77, 0xd2, 0x11, 0xc7, 0xf0, 0xa4, 0x05, - 0xf7, 0xc3, 0x27, 0xaa, 0x5b, 0x1c, 0x5b, 0x46, 0xce, 0x4b, 0xea, 0xe0, - 0x94, 0xef, 0xeb, 0x6e, 0x55, 0xa4, 0x57, 0xd8, 0xa8, 0x18, 0x8b, 0xf4, - 0x86, 0xc7, 0x2b, 0x9e, 0xce, 0xef, 0x1c, 0x30, 0x10, 0x18, 0x56, 0x2b, - 0xcf, 0x94, 0x21, 0x24, 0xaf, 0x8e, 0xd4, 0xb7, 0x40, 0xdf, 0xab, 0x14, - 0x3f, 0x55, 0x65, 0x72, 0x9f, 0xaf, 0x99, 0xed, 0xe1, 0x0a, 0x6d, 0x95, - 0x71, 0x1d, 0x38, 0x83, 0x4e, 0xba, 0xb3, 0x7e, 0xed, 0xe5, 0x9e, 0xfd, - 0xd0, 0xbf, 0xb4, 0x6a, 0x5f, 0xeb, 0x12, 0x94, 0xb2, 0xac, 0x27, 0x55, - 0x34, 0xa8, 0x2d, 0x77, 0x06, 0x0d, 0x7c, 0x56, 0x8b, 0x96, 0x3c, 0xc5, - 0xa2, 0xcf, 0x14, 0x52, 0x0c, 0x1f, 0x40, 0xcf, 0x0f, 0x46, 0x55, 0x0a, - 0x4a, 0x2b, 0x8f, 0xe0, 0xe7, 0xa3, 0xd5, 0xf5, 0x29, 0x10, 0x2a, 0x7d, - 0xd6, 0x43, 0xf3, 0x13, 0x7a, 0x77, 0x29, 0x2a, 0x56, 0x4b, 0x8c, 0x90, - 0x73, 0x73, 0x3e, 0x19, 0x58, 0x81, 0x3c, 0x69, 0x98, 0x4e, 0x96, 0x50, - 0xdd, 0xe8, 0x7e, 0x6b, 0x94, 0x45, 0xc4, 0xc5, 0x3d, 0xcb, 0x0c, 0x42, - 0xd9, 0x69, 0x29, 0x6c, 0x8d, 0xeb, 0x9e, 0x6a, 0xda, 0x8a, 0x4c, 0xfb, - 0x2d, 0xb7, 0x33, 0xe8, 0xe8, 0xeb, 0x05, 0x6a, 0x9e, 0x12, 0xb5, 0xb1, - 0x21, 0x39, 0xbc, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -//}; -//unsigned int sig001_sha384_dat_len = 360; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha512bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha512bsn0msg0.inc deleted file mode 100644 index 370251a3c2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha512bsn0msg0.inc +++ /dev/null @@ -1,60 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey001 - * HashAlg : Sha512 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : empty sigrl - */ -//unsigned char sig001_sha512_dat[] = { - 0x72, 0xed, 0x4f, 0x01, 0xf2, 0xfe, 0xc9, 0xf4, 0x56, 0x4f, 0x11, 0x31, - 0x62, 0x07, 0x02, 0x0f, 0xed, 0xd0, 0x6b, 0xe8, 0xbf, 0xa9, 0x0b, 0x55, - 0xb8, 0xf7, 0xe9, 0x6e, 0xaa, 0x13, 0x2e, 0x6f, 0xa7, 0xd5, 0xec, 0x4b, - 0x3e, 0x23, 0x5f, 0x4f, 0x61, 0x44, 0x52, 0xc1, 0x75, 0x0b, 0x13, 0xad, - 0xa1, 0x53, 0x0d, 0x6a, 0x73, 0xed, 0x5e, 0x49, 0xa9, 0xed, 0x1d, 0x88, - 0xde, 0xa6, 0x93, 0x18, 0xe1, 0xd0, 0x28, 0x79, 0xa1, 0xb8, 0xfb, 0x8d, - 0x5b, 0xcf, 0xd8, 0x53, 0x7b, 0x27, 0xcf, 0xf0, 0x7b, 0x3c, 0xfd, 0xec, - 0x2d, 0x32, 0x75, 0xa9, 0xb0, 0x12, 0xf7, 0xb5, 0x04, 0x9b, 0x4a, 0x89, - 0x09, 0xd5, 0xc2, 0xf9, 0x81, 0x3b, 0x02, 0x38, 0x18, 0x7a, 0x8e, 0x0a, - 0x94, 0x22, 0x22, 0x32, 0x20, 0xf9, 0x41, 0x12, 0x02, 0x11, 0xbc, 0x0e, - 0x43, 0x94, 0x7e, 0x3d, 0x35, 0x98, 0xe8, 0xac, 0xf2, 0x6b, 0xcf, 0xdf, - 0xf8, 0x4f, 0x0e, 0x42, 0x5b, 0xaa, 0x07, 0xb9, 0x55, 0x2b, 0xad, 0xb4, - 0xbc, 0x3c, 0x2f, 0xc7, 0xc9, 0x5b, 0xe2, 0xaa, 0x9b, 0xca, 0x80, 0xf4, - 0x92, 0x58, 0xbe, 0x3b, 0x43, 0xea, 0xaf, 0xb6, 0x1b, 0xd2, 0x6a, 0xda, - 0x6f, 0xd8, 0x89, 0x88, 0xbf, 0xbd, 0x7c, 0x8e, 0xa9, 0x47, 0x62, 0x7d, - 0xd5, 0x88, 0x7c, 0xb0, 0x24, 0x20, 0xfe, 0x71, 0x8f, 0xc6, 0x3a, 0xfb, - 0x44, 0xe1, 0xe8, 0x33, 0x45, 0x26, 0x12, 0x72, 0xe9, 0x2e, 0xbe, 0xf2, - 0xea, 0x0a, 0x21, 0x68, 0xc7, 0x1c, 0xea, 0x18, 0x7c, 0x3c, 0x01, 0x44, - 0xf1, 0xb5, 0xf7, 0xc6, 0x4b, 0xd7, 0xeb, 0x33, 0x1e, 0x1e, 0x7a, 0xe5, - 0xce, 0x76, 0xd6, 0x2b, 0x28, 0xe6, 0xb0, 0xfb, 0xc5, 0xda, 0x0b, 0xc0, - 0xbe, 0x39, 0xc1, 0x52, 0x9f, 0x69, 0xb3, 0xc7, 0xd7, 0x90, 0xc5, 0x63, - 0x07, 0xd1, 0x22, 0xa2, 0x25, 0x21, 0x8b, 0x12, 0x7a, 0x0c, 0xc7, 0xbb, - 0xad, 0xc2, 0xf7, 0xd2, 0xfa, 0x6f, 0x63, 0x04, 0x4d, 0x98, 0x74, 0x7a, - 0x96, 0x47, 0x9c, 0x3c, 0x5d, 0xbf, 0x1b, 0x58, 0x79, 0xee, 0xe2, 0x76, - 0xae, 0x6b, 0x23, 0xbe, 0xb1, 0x7c, 0xd5, 0x24, 0xe9, 0xae, 0xee, 0x34, - 0xf1, 0x73, 0x8b, 0x0e, 0x71, 0xcb, 0x0a, 0xd0, 0xae, 0x16, 0xc3, 0x4a, - 0x5a, 0x6c, 0xed, 0x3c, 0x1e, 0xaa, 0x7f, 0x48, 0xca, 0x6b, 0x20, 0x67, - 0x16, 0x93, 0xc8, 0xd9, 0x26, 0x21, 0xe9, 0x05, 0x0d, 0x4a, 0x6d, 0x30, - 0x86, 0xdd, 0x90, 0x95, 0x53, 0xd3, 0x73, 0x88, 0x6b, 0xec, 0x50, 0x25, - 0x29, 0x05, 0xeb, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -//}; -//unsigned int sig001_sha512_dat_len = 360; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha256bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha256bsn0msg0.inc deleted file mode 100644 index 5dc82aa2a6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha256bsn0msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey002 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : group x sigrl - */ -//unsigned char sig_revoked2msg0bsn0_dat[] = { - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - 0x8c, 0x10, 0x2f, 0x17, 0xa0, 0xe4, 0x1f, 0xc6, - 0xaa, 0xea, 0xd4, 0x82, 0x67, 0x61, 0x96, 0x47, - 0x9b, 0x46, 0x2c, 0x31, 0xbd, 0x29, 0x62, 0x2d, - 0xd8, 0x40, 0x44, 0xbc, 0x1d, 0xf0, 0x19, 0x02, - 0x4e, 0x4c, 0x2e, 0xc1, 0x0d, 0x43, 0x59, 0x8b, - 0xe0, 0x0d, 0xb4, 0x29, 0x20, 0x35, 0x1f, 0xb6, - 0x00, 0x07, 0xa3, 0xd9, 0x28, 0xd9, 0x48, 0x08, - 0x5e, 0x14, 0xca, 0x56, 0x72, 0xa4, 0xb6, 0x5a, - 0xfb, 0xda, 0x6b, 0x4c, 0xa0, 0xdc, 0xa8, 0x92, - 0x71, 0x65, 0x55, 0xb1, 0xe5, 0x56, 0x06, 0xb6, - 0xb1, 0xb0, 0x88, 0xe8, 0x05, 0xa6, 0x81, 0x1d, - 0x06, 0xb7, 0x88, 0xe8, 0x8d, 0xc3, 0xce, 0xf5, - 0x7a, 0x56, 0x3f, 0xb8, 0xdb, 0x73, 0xbc, 0x41, - 0xa9, 0xd9, 0xb7, 0x1f, 0x23, 0x1f, 0x4d, 0xae, - 0xd1, 0x83, 0x3d, 0xaf, 0xb9, 0x01, 0xfc, 0x94, - 0x4b, 0x06, 0x7b, 0x53, 0x9f, 0xaa, 0x92, 0xac, - 0xc6, 0x8a, 0x89, 0x5b, 0xcc, 0x1d, 0x35, 0x9e, - 0x27, 0xe6, 0x4e, 0x77, 0x02, 0x89, 0x4e, 0xd2, - 0xd7, 0xed, 0xdb, 0x6e, 0xce, 0xb9, 0x3c, 0xc6, - 0x77, 0x3c, 0x18, 0x6c, 0x6f, 0x48, 0x3b, 0xfc, - 0x6e, 0x6c, 0x89, 0xd7, 0x6c, 0xd6, 0xb1, 0x23, - 0xd0, 0x19, 0x58, 0xd4, 0x87, 0xbf, 0x30, 0x3e, - 0x84, 0xe3, 0x47, 0x43, 0xa0, 0xe3, 0xcf, 0x3a, - 0x68, 0x07, 0x46, 0x73, 0x0d, 0x87, 0x5f, 0x1b, - 0x51, 0x31, 0x5a, 0x76, 0xd7, 0x6e, 0x7f, 0x99, - 0x5b, 0xc5, 0x30, 0x76, 0xac, 0xf2, 0x74, 0xbc, - 0x8a, 0xc8, 0x80, 0xc0, 0x22, 0x65, 0xa2, 0x41, - 0x51, 0xde, 0x18, 0x65, 0xc4, 0x02, 0x8f, 0x8e, - 0x19, 0x27, 0xb4, 0x47, 0x18, 0x2c, 0xb6, 0x87, - 0x7e, 0xd6, 0x44, 0x33, 0xaa, 0xa4, 0xed, 0x07, - 0xeb, 0x40, 0xc3, 0x95, 0x60, 0x24, 0x4b, 0x5b, - 0xc9, 0x2b, 0x4d, 0xae, 0x9e, 0x94, 0x6c, 0x07, - 0xb8, 0xd5, 0x2a, 0x3c, 0xa3, 0x39, 0x55, 0x17, - 0xde, 0xee, 0x77, 0x43, 0x63, 0x09, 0xb1, 0xbd, - 0xab, 0x57, 0x08, 0x8e, 0x66, 0xd8, 0xec, 0x23, - 0x10, 0x62, 0x19, 0xb3, 0x4e, 0xa3, 0x55, 0x7b, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x5d, 0x9b, 0xdc, 0x23, 0x31, 0xbe, 0x5a, 0xbf, - 0x04, 0x51, 0x20, 0xd0, 0xea, 0xb0, 0x3f, 0x13, - 0x12, 0x53, 0x94, 0xdb, 0xa8, 0x11, 0xc7, 0x98, - 0xef, 0x2f, 0x6b, 0xbc, 0xbc, 0x1a, 0x73, 0xa5, - 0x2c, 0xac, 0x63, 0x8d, 0x67, 0x09, 0x65, 0x6d, - 0xe9, 0xc0, 0x2a, 0x61, 0x2d, 0xce, 0xe8, 0xc0, - 0xa2, 0xa4, 0xf5, 0x85, 0xfd, 0x91, 0x70, 0x80, - 0x32, 0xb7, 0xd8, 0x2f, 0x0d, 0x8a, 0x06, 0xc1, - 0x81, 0xe2, 0xee, 0x73, 0xa1, 0x5d, 0xbe, 0xca, - 0xaf, 0xe9, 0x2d, 0x12, 0xd6, 0xdd, 0x0a, 0xc2, - 0xa0, 0x33, 0x09, 0x1f, 0x53, 0x9b, 0x8e, 0xc2, - 0x13, 0x8d, 0x2d, 0x6c, 0xe0, 0xe3, 0x49, 0xd7, - 0xb4, 0xf4, 0xd4, 0xae, 0x7a, 0x5c, 0x19, 0xe2, - 0x68, 0x8a, 0xff, 0xfa, 0x07, 0x2a, 0x9b, 0x64, - 0x9c, 0x14, 0x0d, 0xd5, 0x06, 0xb3, 0xb2, 0x5a, - 0x58, 0x45, 0xd7, 0xe9, 0x22, 0x75, 0x7a, 0x2d, - 0x00, 0xe0, 0x6a, 0xff, 0xbf, 0xad, 0x3f, 0x58, - 0xc6, 0x8a, 0x45, 0x25, 0x9d, 0x97, 0x85, 0x8c, - 0x1c, 0x58, 0xcd, 0xf8, 0x35, 0xbc, 0x87, 0x6b, - 0x71, 0x14, 0xb7, 0x80, 0xba, 0xe8, 0x84, 0x17, - 0x80, 0x32, 0x94, 0x1f, 0x7c, 0xaa, 0xb5, 0xd4, - 0x8a, 0xe8, 0xa4, 0xe0, 0x55, 0xaf, 0x16, 0x4a, - 0xcf, 0xa0, 0x32, 0xc5, 0xd0, 0xc6, 0x22, 0xd9, - 0x5f, 0x08, 0x0f, 0xe5, 0x7c, 0x43, 0xc6, 0x2e, - 0x79, 0x82, 0x33, 0x67, 0xdd, 0xd9, 0xb4, 0xda, - 0x2b, 0x7e, 0x36, 0x5d, 0x2c, 0x6a, 0xaf, 0x5d, - 0xe9, 0x45, 0xa0, 0xc8, 0x2b, 0x8d, 0x0b, 0xa4, - 0xb3, 0x79, 0x87, 0xd4, 0xe6, 0x37, 0xed, 0xfa, - 0x87, 0x7a, 0x3d, 0x8e, 0xa7, 0x1f, 0xdd, 0xa7, - 0xe3, 0x71, 0x9f, 0x6f, 0xe3, 0xb7, 0xc8, 0x50, - 0x1b, 0xfc, 0x74, 0x33, 0x66, 0x0f, 0x2a, 0xff, - 0xd7, 0xbb, 0xbd, 0x0d, 0xed, 0x36, 0x57, 0x4f, - 0x0d, 0x0a, 0x49, 0xe2, 0x29, 0xd3, 0x23, 0xfc, - 0x3e, 0x70, 0x04, 0x4b, 0x45, 0x35, 0xa7, 0xe9, - 0x11, 0x26, 0x0a, 0xbd, 0xf6, 0x78, 0x8b, 0xf1, - 0x7a, 0x9e, 0x69, 0xff, 0xcb, 0x5f, 0x6d, 0x76, - 0x3e, 0xc0, 0xd9, 0xf4, 0x02, 0xf6, 0x62, 0xc5, - 0x11, 0x62, 0x9e, 0xcb, 0xc8, 0xc4, 0x42, 0x2b, - 0x01, 0xcb, 0xc5, 0x5a, 0x54, 0x7c, 0xd0, 0x9e, - 0xa4, 0x59, 0xc7, 0x3d, 0x22, 0x13, 0xb4, 0x0e, - 0x1a, 0xfc, 0xaa, 0x9d, 0xc1, 0x45, 0x74, 0xd0, - 0xe3, 0xec, 0xf4, 0xc4, 0x38, 0x7e, 0x7d, 0xb6, - 0xe0, 0xee, 0x3a, 0x3f, 0x9b, 0x89, 0xaa, 0x01, - 0x17, 0xc3, 0xfe, 0xe7, 0x3d, 0x45, 0x24, 0x3d, - 0x69, 0xd2, 0xed, 0x3d, 0x68, 0xd7, 0xca, 0x4a, - 0xe4, 0x7f, 0x17, 0xfb, 0x78, 0x84, 0x41, 0xd0, - 0x26, 0x36, 0xf2, 0x52, 0x57, 0x73, 0xce, 0xa1, - 0x0f, 0x77, 0x06, 0x8e, 0xdf, 0x3a, 0x55, 0x94, - 0x9b, 0xf7, 0xf4, 0xc6, 0x2d, 0x77, 0x93, 0x77, - 0xc3, 0x88, 0xc1, 0x11, 0x0a, 0x99, 0xf7, 0x56, - 0xfd, 0x0b, 0xbc, 0x1e, 0xd8, 0x55, 0x6f, 0xc7, - 0x48, 0x60, 0xa4, 0x2d, 0x6b, 0x47, 0x12, 0x2e, - 0x23, 0x07, 0x71, 0x53, 0x64, 0x2c, 0xbe, 0xb2, - 0xde, 0xcb, 0xf7, 0xe3, 0x19, 0x18, 0xf8, 0x8f, - 0x10, 0xd6, 0xfd, 0x44, 0xbe, 0x7b, 0x0e, 0xe6, - 0x8b, 0xca, 0xf1, 0x36, 0xaa, 0x8d, 0xac, 0x7e, - 0x1e, 0x3b, 0x13, 0xee, 0x4a, 0xaf, 0x87, 0xf5, - 0xf0, 0x25, 0xce, 0x5b, 0xf5, 0x4a, 0x3a, 0xa4, - 0x71, 0x2e, 0x53, 0x74, 0xa9, 0xbe, 0x49, 0x97, - 0xab, 0x49, 0xca, 0x73, 0x47, 0x59, 0x41, 0xde -//}; -//unsigned int sig_revoked2msg0bsn0_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha384bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha384bsn0msg0.inc deleted file mode 100644 index 8bc7618a80..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha384bsn0msg0.inc +++ /dev/null @@ -1,60 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey002 - * HashAlg : Sha384 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : empty sigrl - */ -//unsigned char sig002_sha384_dat[] = { - 0x57, 0xe7, 0x8f, 0xfb, 0xf9, 0xa3, 0xba, 0x5e, 0xac, 0xec, 0xb3, 0xa4, - 0xf4, 0x13, 0x95, 0xa1, 0x1c, 0x1d, 0xe1, 0xaf, 0xea, 0x16, 0xba, 0x6d, - 0xde, 0x4c, 0x43, 0xf0, 0x89, 0x59, 0x5e, 0xfa, 0x0f, 0x18, 0xdd, 0x22, - 0xf6, 0xd6, 0xfc, 0xe5, 0x0f, 0xb2, 0x81, 0xb5, 0xa9, 0xa6, 0xe8, 0xee, - 0x14, 0x04, 0xec, 0x1b, 0x4e, 0x65, 0x82, 0x7f, 0x96, 0x53, 0xc4, 0x3b, - 0x29, 0x17, 0x39, 0xc0, 0x9c, 0x72, 0x76, 0x06, 0xe0, 0xbd, 0x59, 0xba, - 0xc5, 0x0b, 0x58, 0x76, 0xf9, 0x32, 0xb7, 0xd1, 0x62, 0x68, 0x66, 0x97, - 0xc3, 0xaf, 0xfd, 0xa4, 0x76, 0x62, 0x40, 0xed, 0x19, 0xaa, 0x75, 0x54, - 0x17, 0x8b, 0xb4, 0x6a, 0xce, 0x16, 0x43, 0x46, 0xb4, 0xe0, 0x5d, 0xac, - 0xcf, 0xf8, 0xa8, 0xcf, 0x23, 0x6b, 0x08, 0x95, 0x28, 0xb4, 0x07, 0x44, - 0xc5, 0xe9, 0x7f, 0x16, 0x60, 0x2a, 0x1d, 0x23, 0xaf, 0x23, 0x6b, 0xe5, - 0x0f, 0x85, 0x6f, 0x62, 0x06, 0x26, 0xec, 0xaa, 0x08, 0x88, 0x39, 0x79, - 0x6c, 0xa4, 0x45, 0xf2, 0xda, 0xac, 0x08, 0x7d, 0x1c, 0xe3, 0x75, 0xa9, - 0xd4, 0x56, 0x18, 0x27, 0xa5, 0xc2, 0xbf, 0x5d, 0x9c, 0x98, 0x1c, 0xa6, - 0xec, 0x4e, 0x21, 0x20, 0x88, 0x1d, 0x53, 0x51, 0x4d, 0x1f, 0x86, 0xa3, - 0x67, 0x54, 0xc4, 0xfd, 0x43, 0xb9, 0x06, 0xcb, 0x0d, 0xb8, 0x06, 0x48, - 0x83, 0xe8, 0x80, 0x94, 0x04, 0x11, 0xe6, 0xd3, 0xbe, 0xb6, 0x28, 0x94, - 0x6e, 0x5b, 0x2b, 0xa4, 0x48, 0x4d, 0x7b, 0xef, 0xab, 0x90, 0x8b, 0x59, - 0x25, 0xcc, 0xcb, 0x0f, 0x51, 0x8a, 0x49, 0xcf, 0x58, 0xd3, 0x80, 0xc8, - 0xb0, 0xea, 0x84, 0x23, 0x65, 0xe4, 0x6f, 0x49, 0xc1, 0x64, 0x30, 0x44, - 0xf3, 0x4f, 0x96, 0x46, 0x96, 0x46, 0xd9, 0x5a, 0xce, 0xb0, 0xac, 0x59, - 0xc3, 0xa4, 0xbe, 0x47, 0x9c, 0x50, 0xb9, 0xb2, 0x9d, 0x60, 0xcb, 0x63, - 0x15, 0x44, 0x3a, 0x3d, 0xee, 0x8e, 0xf4, 0x05, 0xaf, 0x8b, 0xa5, 0xa8, - 0x76, 0x4e, 0x9f, 0xf9, 0x89, 0x4c, 0x94, 0x98, 0xfa, 0x05, 0xf3, 0xb5, - 0x5c, 0xe2, 0x10, 0xdd, 0x0a, 0x4c, 0x10, 0x95, 0x69, 0xc8, 0xe0, 0xbf, - 0x8e, 0x65, 0x79, 0x90, 0x2c, 0x9b, 0x5f, 0x00, 0x27, 0x04, 0x3f, 0x09, - 0x3a, 0xce, 0x8d, 0x0e, 0x6a, 0x4e, 0x53, 0x6b, 0x67, 0x87, 0xf7, 0x3b, - 0xe1, 0x15, 0x05, 0xe1, 0x93, 0x77, 0x53, 0x1b, 0x6b, 0xfa, 0xdb, 0xd4, - 0xee, 0x57, 0x1e, 0xe2, 0xd8, 0xc8, 0x41, 0x89, 0xc0, 0x71, 0x47, 0x80, - 0x2e, 0x6d, 0x8d, 0x8c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -//}; -//unsigned int sig002_sha384_dat_len = 360; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha512bsn0msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha512bsn0msg0.inc deleted file mode 100644 index eb022fa19d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha512bsn0msg0.inc +++ /dev/null @@ -1,60 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn0/mprivkey002 - * HashAlg : Sha512 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : empty sigrl - */ -//unsigned char sig002_sha512_dat[] = { - 0x72, 0xed, 0x4f, 0x01, 0xf2, 0xfe, 0xc9, 0xf4, 0x56, 0x4f, 0x11, 0x31, - 0x62, 0x07, 0x02, 0x0f, 0xed, 0xd0, 0x6b, 0xe8, 0xbf, 0xa9, 0x0b, 0x55, - 0xb8, 0xf7, 0xe9, 0x6e, 0xaa, 0x13, 0x2e, 0x6f, 0xa7, 0xd5, 0xec, 0x4b, - 0x3e, 0x23, 0x5f, 0x4f, 0x61, 0x44, 0x52, 0xc1, 0x75, 0x0b, 0x13, 0xad, - 0xa1, 0x53, 0x0d, 0x6a, 0x73, 0xed, 0x5e, 0x49, 0xa9, 0xed, 0x1d, 0x88, - 0xde, 0xa6, 0x93, 0x18, 0x5b, 0x0a, 0xb1, 0xd7, 0x8e, 0x50, 0xf3, 0x3c, - 0xed, 0x19, 0x00, 0xdb, 0x98, 0xdf, 0x1d, 0x5a, 0xf2, 0x2a, 0x54, 0x57, - 0xfd, 0x1f, 0xdb, 0xbd, 0x64, 0x83, 0xe0, 0x1e, 0x1d, 0x08, 0x14, 0x59, - 0x3a, 0xf6, 0xd2, 0x6a, 0xd7, 0xba, 0x42, 0x7f, 0xca, 0xb4, 0xe9, 0x06, - 0x24, 0x9b, 0xbf, 0x67, 0xed, 0x56, 0x3c, 0x65, 0xd6, 0x7f, 0xcf, 0x7c, - 0x17, 0xa5, 0x5f, 0x90, 0x22, 0x71, 0x05, 0x00, 0x05, 0x3a, 0x09, 0x77, - 0x8a, 0x0f, 0xca, 0x75, 0x10, 0xb5, 0xdf, 0xc6, 0x86, 0x3a, 0xf6, 0x0d, - 0x9e, 0xb8, 0x28, 0xae, 0x53, 0x93, 0x4d, 0x8a, 0x4a, 0x91, 0x77, 0xdf, - 0x5b, 0xeb, 0x08, 0x39, 0xab, 0x96, 0x72, 0x32, 0x5c, 0x8b, 0x8d, 0xb4, - 0x6b, 0xcc, 0x94, 0x62, 0x69, 0xd3, 0x73, 0xf5, 0x96, 0x49, 0xfe, 0x92, - 0x46, 0xe9, 0x0e, 0xae, 0x05, 0xc3, 0xc8, 0xd2, 0x35, 0x86, 0x98, 0xec, - 0x86, 0x56, 0xec, 0x74, 0xa3, 0x52, 0x2f, 0x5a, 0xc8, 0x0c, 0x26, 0xb5, - 0x9c, 0xd6, 0xab, 0xcf, 0xc0, 0x4f, 0xcb, 0xa4, 0xee, 0xe8, 0xd9, 0xc3, - 0x6e, 0xb4, 0x6f, 0x2d, 0x2e, 0x94, 0x7a, 0xb2, 0x99, 0xe2, 0x3f, 0x26, - 0x89, 0x10, 0x20, 0x72, 0x24, 0x9e, 0xbe, 0xbc, 0xcd, 0x81, 0xaa, 0x42, - 0x09, 0x4f, 0x02, 0x8e, 0x09, 0xff, 0x40, 0x9e, 0x52, 0xae, 0x0d, 0x01, - 0xf8, 0x0b, 0x39, 0x55, 0x68, 0x27, 0xf6, 0xb5, 0x93, 0xc5, 0x19, 0x13, - 0x4b, 0xa9, 0x9e, 0x91, 0xa2, 0xf8, 0x49, 0xb5, 0xbe, 0x6c, 0x13, 0x5a, - 0x97, 0x5f, 0x33, 0x85, 0x2b, 0xbd, 0x79, 0xea, 0xe2, 0x35, 0xb8, 0x60, - 0x27, 0xa1, 0x87, 0x88, 0x68, 0x92, 0x98, 0x96, 0xcd, 0x0b, 0x4f, 0x9c, - 0x99, 0x27, 0x0d, 0xb7, 0x85, 0x88, 0x5e, 0x9d, 0x61, 0x3b, 0x66, 0x94, - 0x1e, 0x97, 0xd4, 0x4f, 0x3b, 0xb7, 0xba, 0x0e, 0xaa, 0x31, 0x5b, 0x10, - 0x70, 0x2d, 0x5b, 0x28, 0x95, 0xe9, 0xb8, 0x40, 0x90, 0x12, 0x1e, 0x02, - 0xa8, 0x41, 0x0a, 0xc4, 0x05, 0x94, 0xf4, 0x99, 0x74, 0x0b, 0xed, 0x27, - 0xb9, 0x74, 0x3a, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -//}; -//unsigned int sig002_sha512_dat_len = 360; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl.inc deleted file mode 100644 index 468c0ec4f7..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl.inc +++ /dev/null @@ -1,69 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 verifier revocation list - * Group : grpX - * Bsn : "bsn0" - * HashAlg : Sha256 - * Revoked : verrevoked/mprivatekey000 - * verrevoked/mprivatekey001 - * verrevoked/mprivatekey002 - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - -// B - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - -// version | n4 - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - - 0x8b, 0xc9, 0x6e, 0xc0, 0x86, 0x04, 0x6f, 0x6c, - 0x89, 0xc2, 0x27, 0xfd, 0x61, 0x59, 0xb5, 0xd2, - 0x73, 0x96, 0xfa, 0xd6, 0xf8, 0xfa, 0x2c, 0x39, - 0xfe, 0xee, 0xef, 0x3e, 0x73, 0xd2, 0x38, 0x3f, - 0x3c, 0x04, 0x07, 0x78, 0xfd, 0x32, 0x9b, 0xc3, - 0x74, 0x90, 0xf2, 0xf5, 0x50, 0xe4, 0x69, 0x5d, - 0x30, 0x0c, 0x6a, 0x8a, 0x9c, 0xcf, 0xff, 0x78, - 0x28, 0x52, 0x6d, 0x20, 0x29, 0xef, 0x2d, 0x7a, - - 0x07, 0x46, 0xed, 0xb8, 0x6a, 0x4e, 0x7f, 0x4b, - 0x9d, 0xcc, 0x18, 0x91, 0x88, 0xf6, 0x76, 0x4d, - 0x74, 0x02, 0x36, 0x62, 0xe6, 0xd4, 0xb5, 0xf0, - 0x2d, 0x70, 0x91, 0x49, 0x65, 0xdf, 0x19, 0x02, - 0x30, 0x6c, 0x11, 0xaa, 0x74, 0x8c, 0x55, 0x2e, - 0x4b, 0xa3, 0x00, 0x00, 0xb0, 0x38, 0xf4, 0xcd, - 0x5d, 0xc9, 0x1d, 0xaa, 0x1e, 0x44, 0x98, 0xa4, - 0xe1, 0x3f, 0x2f, 0x4f, 0x6c, 0xc9, 0x15, 0xb0, - - 0x8c, 0x10, 0x2f, 0x17, 0xa0, 0xe4, 0x1f, 0xc6, - 0xaa, 0xea, 0xd4, 0x82, 0x67, 0x61, 0x96, 0x47, - 0x9b, 0x46, 0x2c, 0x31, 0xbd, 0x29, 0x62, 0x2d, - 0xd8, 0x40, 0x44, 0xbc, 0x1d, 0xf0, 0x19, 0x02, - 0x4e, 0x4c, 0x2e, 0xc1, 0x0d, 0x43, 0x59, 0x8b, - 0xe0, 0x0d, 0xb4, 0x29, 0x20, 0x35, 0x1f, 0xb6, - 0x00, 0x07, 0xa3, 0xd9, 0x28, 0xd9, 0x48, 0x08, - 0x5e, 0x14, 0xca, 0x56, 0x72, 0xa4, 0xb6, 0x5a, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_1entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_1entry.inc deleted file mode 100644 index aa2b295b9a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_1entry.inc +++ /dev/null @@ -1,51 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 verifier revocation list - * Group : grpX - * Bsn : "bsn0" - * HashAlg : Sha256 - * Revoked : verrevoked/mprivatekey000 - * verrevoked/mprivatekey001 - * verrevoked/mprivatekey002 - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - -// B - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, - 0x5f, 0x20, 0xbd, 0x9e, 0x49, 0x11, 0x31, 0xe0, - 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, - 0x64, 0x60, 0xa4, 0xf8, 0x17, 0x81, 0xc3, 0x0a, - 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, - 0x72, 0xdc, 0xe6, 0x78, 0xe3, 0x70, 0xa8, 0x28, - -// version | n4 - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - - 0x8b, 0xc9, 0x6e, 0xc0, 0x86, 0x04, 0x6f, 0x6c, - 0x89, 0xc2, 0x27, 0xfd, 0x61, 0x59, 0xb5, 0xd2, - 0x73, 0x96, 0xfa, 0xd6, 0xf8, 0xfa, 0x2c, 0x39, - 0xfe, 0xee, 0xef, 0x3e, 0x73, 0xd2, 0x38, 0x3f, - 0x3c, 0x04, 0x07, 0x78, 0xfd, 0x32, 0x9b, 0xc3, - 0x74, 0x90, 0xf2, 0xf5, 0x50, 0xe4, 0x69, 0x5d, - 0x30, 0x0c, 0x6a, 0x8a, 0x9c, 0xcf, 0xff, 0x78, - 0x28, 0x52, 0x6d, 0x20, 0x29, 0xef, 0x2d, 0x7a, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_sha384.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_sha384.inc deleted file mode 100644 index ee7eccb6aa..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_sha384.inc +++ /dev/null @@ -1,69 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 verifier revocation list - * Group : grpX - * Bsn : "bsn0" - * HashAlg : Sha384 - * Revoked : verrevoked/mprivatekey000 - * verrevoked/mprivatekey001 - * verrevoked/mprivatekey002 - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - -// B - 0x57, 0xe7, 0x8f, 0xfb, 0xf9, 0xa3, 0xba, 0x5e, - 0xac, 0xec, 0xb3, 0xa4, 0xf4, 0x13, 0x95, 0xa1, - 0x1c, 0x1d, 0xe1, 0xaf, 0xea, 0x16, 0xba, 0x6d, - 0xde, 0x4c, 0x43, 0xf0, 0x89, 0x59, 0x5e, 0xfa, - 0x0f, 0x18, 0xdd, 0x22, 0xf6, 0xd6, 0xfc, 0xe5, - 0x0f, 0xb2, 0x81, 0xb5, 0xa9, 0xa6, 0xe8, 0xee, - 0x14, 0x04, 0xec, 0x1b, 0x4e, 0x65, 0x82, 0x7f, - 0x96, 0x53, 0xc4, 0x3b, 0x29, 0x17, 0x39, 0xc0, - -// version | n4 - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - - 0x9d, 0x3e, 0x8e, 0xd2, 0x45, 0xfd, 0x1b, 0xcd, - 0x33, 0x6c, 0xdb, 0x1a, 0xda, 0x34, 0x59, 0x2e, - 0x38, 0x72, 0x75, 0x17, 0x25, 0xee, 0xa8, 0x9b, - 0xf9, 0xd0, 0x1b, 0x15, 0x82, 0x03, 0x8c, 0x72, - 0x5d, 0xb7, 0x3c, 0x7c, 0x7e, 0x17, 0x81, 0x55, - 0x52, 0x7d, 0x87, 0x7c, 0x90, 0xd8, 0x17, 0xee, - 0x35, 0xdb, 0xe1, 0x67, 0x59, 0xa4, 0xd6, 0xb3, - 0x24, 0x54, 0xd2, 0x70, 0x0f, 0xc0, 0x37, 0x39, - - 0x40, 0x45, 0x1d, 0xa1, 0xe4, 0x5c, 0x0a, 0xc9, - 0x81, 0xd7, 0x52, 0xe2, 0x75, 0x49, 0xf8, 0x36, - 0x2d, 0xf0, 0x60, 0xd2, 0x18, 0x1f, 0xd0, 0x98, - 0x5b, 0xde, 0xdb, 0x4a, 0x99, 0x05, 0xeb, 0xba, - 0xab, 0x56, 0x75, 0x7b, 0x76, 0xaa, 0xc8, 0x52, - 0xa9, 0x90, 0x95, 0x01, 0xda, 0xfb, 0x0f, 0x1b, - 0xe3, 0x04, 0x96, 0x9c, 0x27, 0x9d, 0x2b, 0xb3, - 0xc2, 0x48, 0x16, 0x3f, 0x4c, 0xc3, 0xe6, 0x6f, - - 0x9c, 0x72, 0x76, 0x06, 0xe0, 0xbd, 0x59, 0xba, - 0xc5, 0x0b, 0x58, 0x76, 0xf9, 0x32, 0xb7, 0xd1, - 0x62, 0x68, 0x66, 0x97, 0xc3, 0xaf, 0xfd, 0xa4, - 0x76, 0x62, 0x40, 0xed, 0x19, 0xaa, 0x75, 0x54, - 0x17, 0x8b, 0xb4, 0x6a, 0xce, 0x16, 0x43, 0x46, - 0xb4, 0xe0, 0x5d, 0xac, 0xcf, 0xf8, 0xa8, 0xcf, - 0x23, 0x6b, 0x08, 0x95, 0x28, 0xb4, 0x07, 0x44, - 0xc5, 0xe9, 0x7f, 0x16, 0x60, 0x2a, 0x1d, 0x23, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_sha512.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_sha512.inc deleted file mode 100644 index 7b8fbfc1a8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_sha512.inc +++ /dev/null @@ -1,69 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 verifier revocation list - * Group : grpX - * Bsn : "bsn0" - * HashAlg : Sha512 - * Revoked : verrevoked/mprivatekey000 - * verrevoked/mprivatekey001 - * verrevoked/mprivatekey002 - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - -// B - 0x72, 0xed, 0x4f, 0x01, 0xf2, 0xfe, 0xc9, 0xf4, - 0x56, 0x4f, 0x11, 0x31, 0x62, 0x07, 0x02, 0x0f, - 0xed, 0xd0, 0x6b, 0xe8, 0xbf, 0xa9, 0x0b, 0x55, - 0xb8, 0xf7, 0xe9, 0x6e, 0xaa, 0x13, 0x2e, 0x6f, - 0xa7, 0xd5, 0xec, 0x4b, 0x3e, 0x23, 0x5f, 0x4f, - 0x61, 0x44, 0x52, 0xc1, 0x75, 0x0b, 0x13, 0xad, - 0xa1, 0x53, 0x0d, 0x6a, 0x73, 0xed, 0x5e, 0x49, - 0xa9, 0xed, 0x1d, 0x88, 0xde, 0xa6, 0x93, 0x18, - -// version | n4 - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - - 0xe6, 0xec, 0xb1, 0xff, 0xca, 0xad, 0x04, 0x8a, - 0x1a, 0x04, 0xac, 0xf9, 0x6c, 0xe4, 0x7a, 0xa1, - 0xfe, 0xe0, 0x7b, 0xd7, 0xbb, 0x64, 0x25, 0xa7, - 0x5b, 0xfa, 0x3c, 0xa4, 0xd6, 0x30, 0x9e, 0x25, - 0xa0, 0x85, 0xad, 0x9f, 0x81, 0x61, 0x87, 0x6f, - 0x1b, 0x34, 0x01, 0x67, 0x30, 0x31, 0xbc, 0x3c, - 0x9f, 0x37, 0x62, 0x79, 0x51, 0x13, 0x57, 0x6d, - 0xa8, 0xd3, 0xca, 0x73, 0x8d, 0xe2, 0x76, 0x42, - - 0xe1, 0xd0, 0x28, 0x79, 0xa1, 0xb8, 0xfb, 0x8d, - 0x5b, 0xcf, 0xd8, 0x53, 0x7b, 0x27, 0xcf, 0xf0, - 0x7b, 0x3c, 0xfd, 0xec, 0x2d, 0x32, 0x75, 0xa9, - 0xb0, 0x12, 0xf7, 0xb5, 0x04, 0x9b, 0x4a, 0x89, - 0x09, 0xd5, 0xc2, 0xf9, 0x81, 0x3b, 0x02, 0x38, - 0x18, 0x7a, 0x8e, 0x0a, 0x94, 0x22, 0x22, 0x32, - 0x20, 0xf9, 0x41, 0x12, 0x02, 0x11, 0xbc, 0x0e, - 0x43, 0x94, 0x7e, 0x3d, 0x35, 0x98, 0xe8, 0xac, - - 0x5b, 0x0a, 0xb1, 0xd7, 0x8e, 0x50, 0xf3, 0x3c, - 0xed, 0x19, 0x00, 0xdb, 0x98, 0xdf, 0x1d, 0x5a, - 0xf2, 0x2a, 0x54, 0x57, 0xfd, 0x1f, 0xdb, 0xbd, - 0x64, 0x83, 0xe0, 0x1e, 0x1d, 0x08, 0x14, 0x59, - 0x3a, 0xf6, 0xd2, 0x6a, 0xd7, 0xba, 0x42, 0x7f, - 0xca, 0xb4, 0xe9, 0x06, 0x24, 0x9b, 0xbf, 0x67, - 0xed, 0x56, 0x3c, 0x65, 0xd6, 0x7f, 0xcf, 0x7c, - 0x17, 0xa5, 0x5f, 0x90, 0x22, 0x71, 0x05, 0x00, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey003.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey003.inc deleted file mode 100644 index 3009049dbd..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey003.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : verrevokedmember003 (revoked in grpX bsn0 verrl) - */ - -//unsigned char mprivkey003_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xdd, 0x5d, 0x03, 0xfb, 0xd2, 0x60, 0x36, 0xbc, - 0x5c, 0x16, 0xea, 0x9c, 0xd3, 0x47, 0x66, 0xec, - 0xc0, 0x71, 0x8b, 0xf8, 0x8e, 0x1c, 0xfb, 0x5b, - 0xaf, 0x60, 0x59, 0x78, 0xd0, 0x60, 0xde, 0x20, - 0xb3, 0x5c, 0x59, 0xb3, 0x29, 0x2e, 0x71, 0xbc, - 0x6d, 0xe9, 0x9d, 0xb5, 0x18, 0xce, 0xfb, 0x44, - 0x0f, 0x79, 0xf7, 0xb5, 0x45, 0x4d, 0xcd, 0x6b, - 0x6b, 0x42, 0x6b, 0x09, 0x38, 0x1e, 0xca, 0x30, - 0x6b, 0xda, 0xf8, 0xef, 0xef, 0x20, 0x38, 0x5a, - 0x30, 0xd3, 0xb8, 0x01, 0x0a, 0x3e, 0x76, 0x1e, - 0xaa, 0x60, 0x64, 0x43, 0x7c, 0x68, 0xcc, 0xfc, - 0xaf, 0x94, 0x4b, 0x61, 0x00, 0x54, 0x08, 0xa9, - 0x15, 0xa3, 0x46, 0xeb, 0x8d, 0x36, 0xcc, 0x1e, - 0x4c, 0x00, 0xe5, 0x71, 0xef, 0xea, 0xb2, 0x6a, - 0x7a, 0x1e, 0xba, 0x98, 0x68, 0x58, 0xd3, 0x02, - 0x98, 0xdd, 0x9b, 0xd1, 0x9c, 0x8e, 0x98, 0xec -//}; -//unsigned int mprivkey003_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey004.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey004.inc deleted file mode 100644 index 253228e91e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey004.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : verrevokedmember004 (revoked in grpX bsn0 verrl) - */ - -//unsigned char mprivkey004_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0xe9, 0x8d, 0x15, 0x88, 0xd4, 0x83, 0xc0, 0x70, - 0x60, 0xa8, 0xce, 0x0f, 0x13, 0x03, 0x4b, 0xc8, - 0x8d, 0xec, 0x33, 0xc0, 0x85, 0x1e, 0x3c, 0x69, - 0x6f, 0x87, 0x79, 0x51, 0x95, 0xe6, 0x1b, 0x35, - 0xf6, 0x15, 0x84, 0x40, 0x00, 0x91, 0xc8, 0x6c, - 0x67, 0xd0, 0x64, 0xd9, 0x1a, 0x45, 0xbb, 0x12, - 0x4f, 0xb1, 0xfd, 0x09, 0x8c, 0x1c, 0x8d, 0x5e, - 0xee, 0x8d, 0x69, 0x4f, 0x83, 0x19, 0x68, 0x0c, - 0x6e, 0xfe, 0xc2, 0x46, 0x89, 0xef, 0x6d, 0x26, - 0x7d, 0xd2, 0xd4, 0x6f, 0x05, 0xc2, 0x6e, 0x51, - 0x04, 0x2c, 0x6c, 0x7a, 0xfb, 0x5b, 0x25, 0x71, - 0x46, 0x39, 0xff, 0x88, 0x6d, 0xea, 0x16, 0x9a, - 0x90, 0x18, 0x15, 0xdd, 0x12, 0x04, 0x86, 0xba, - 0x8c, 0xfb, 0x41, 0x5f, 0x9f, 0xc8, 0x36, 0x4f, - 0xd5, 0x44, 0xa8, 0xdc, 0x16, 0x1f, 0xd2, 0x3a, - 0x30, 0x4b, 0xb3, 0xfa, 0xbf, 0x57, 0x46, 0xe2 -//}; -//unsigned int mprivkey004_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey005.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey005.inc deleted file mode 100644 index 0bf76c8ec6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/mprivkey005.inc +++ /dev/null @@ -1,45 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Member private key - * Group : grpX - * Signer : verrevokedmember005 (revoked in grpX bsn0 verrl) - */ - -//unsigned char mprivkey005_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x0c, 0x1e, 0x00, 0x97, 0x9e, 0xc0, 0x35, 0xfb, - 0x1d, 0xca, 0x18, 0xb5, 0xef, 0x29, 0x5c, 0x04, - 0xe1, 0xcc, 0xec, 0x37, 0x6e, 0x5b, 0x45, 0x23, - 0xf6, 0xb2, 0xf4, 0x34, 0x36, 0x19, 0x6c, 0xc1, - 0x0c, 0xb4, 0x29, 0xa6, 0xe0, 0x1d, 0x53, 0x3a, - 0xdd, 0xeb, 0xcb, 0x72, 0x2c, 0x76, 0x75, 0x99, - 0x67, 0xc7, 0x4f, 0xf9, 0x8f, 0x37, 0x6f, 0x49, - 0x0a, 0xe3, 0xe6, 0xa3, 0x0b, 0xfb, 0xb7, 0xfc, - 0xe5, 0x36, 0x11, 0x6d, 0x5d, 0xc1, 0x8b, 0x72, - 0x75, 0xc6, 0x1d, 0xe3, 0x5a, 0x98, 0x77, 0x20, - 0xcd, 0x27, 0xb7, 0x26, 0xfb, 0x7f, 0xfc, 0x94, - 0x35, 0x58, 0xfc, 0x3f, 0x35, 0x87, 0x32, 0x05, - 0x77, 0x1c, 0x5b, 0xc0, 0xc7, 0xe5, 0x00, 0xa2, - 0x47, 0xd2, 0x0a, 0x67, 0xa7, 0x1b, 0x15, 0x0c, - 0xc6, 0xb9, 0x7a, 0xd2, 0xad, 0x55, 0x58, 0x8d, - 0x7f, 0xa9, 0x6e, 0x44, 0x57, 0xc2, 0x5f, 0xe8 -//}; -//unsigned int mprivkey005_dat_len = 144; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/sig_revoked3sha256bsn1msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/sig_revoked3sha256bsn1msg0.inc deleted file mode 100644 index 25a00f85e8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/sig_revoked3sha256bsn1msg0.inc +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : grpX - * Signer : verrevoked/bsn1/mprivkey003 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn1" - * SigRl : group x sigrl - */ -//unsigned char sig_revoked3msg0bsn1_dat[] = { - 0x4b, 0xb3, 0x62, 0x6c, 0xa5, 0x12, 0xaa, 0x7a, - 0x22, 0x7f, 0xde, 0xf0, 0x8f, 0x1e, 0x3c, 0xc8, - 0xda, 0x5f, 0x2f, 0x6d, 0x3b, 0xd0, 0x42, 0xec, - 0x62, 0xbf, 0x3c, 0x0f, 0xae, 0xd4, 0xf9, 0xa0, - 0x56, 0xc9, 0xd5, 0x33, 0xaa, 0x60, 0xab, 0x86, - 0x15, 0x48, 0xc2, 0xbb, 0xda, 0x3f, 0x37, 0x71, - 0x3e, 0xf2, 0xd5, 0x3c, 0xd3, 0xb9, 0x08, 0xa0, - 0x63, 0x26, 0x6e, 0x26, 0xca, 0x93, 0xc1, 0xe1, - 0x5a, 0x6b, 0xd9, 0x27, 0x3a, 0x6e, 0x51, 0xd6, - 0xe4, 0xc0, 0x83, 0xa7, 0x2d, 0xab, 0xd4, 0x57, - 0x07, 0xf3, 0xaa, 0xb2, 0xac, 0xbf, 0x21, 0x46, - 0x2e, 0xba, 0x8c, 0xc6, 0xb9, 0x6c, 0xcd, 0xbb, - 0xc0, 0x94, 0x3b, 0x1b, 0x45, 0xa9, 0x0a, 0x64, - 0x3e, 0x2c, 0x92, 0x02, 0x69, 0xfb, 0x72, 0x9b, - 0xe6, 0xf9, 0x06, 0x82, 0x01, 0x01, 0x43, 0x19, - 0xca, 0xea, 0x70, 0x01, 0x51, 0xae, 0x91, 0xad, - 0x1c, 0x6f, 0x78, 0x8c, 0xfd, 0x47, 0xdc, 0xb2, - 0xaa, 0xa4, 0x85, 0x1b, 0xb4, 0xa1, 0x2e, 0xcd, - 0x17, 0xad, 0x60, 0x11, 0x85, 0x01, 0x97, 0xe6, - 0x73, 0xd3, 0x19, 0x1b, 0x92, 0xb5, 0xd8, 0x75, - 0xf0, 0x26, 0x11, 0x44, 0xef, 0x03, 0x69, 0x39, - 0xb3, 0x00, 0xdc, 0x18, 0x79, 0xaf, 0x7a, 0x2c, - 0xc7, 0xdf, 0x26, 0xdb, 0x48, 0xb3, 0x39, 0x1f, - 0x5f, 0x29, 0xda, 0x3e, 0x43, 0x7f, 0xf3, 0x8e, - 0x81, 0x8c, 0x56, 0x3a, 0xec, 0xc8, 0xb8, 0x7c, - 0x53, 0xfc, 0x14, 0x8e, 0x84, 0x68, 0xff, 0x17, - 0x3d, 0x0c, 0x97, 0x42, 0xf7, 0x42, 0x09, 0xa5, - 0xcf, 0x5d, 0x29, 0x1b, 0xdb, 0x97, 0x32, 0xb1, - 0x39, 0x42, 0x66, 0xe2, 0x7b, 0x24, 0x47, 0x61, - 0xf3, 0x0b, 0x2a, 0x84, 0x74, 0xd4, 0xb0, 0x1b, - 0x88, 0x93, 0xc0, 0xa7, 0xf3, 0x6d, 0x28, 0x17, - 0x46, 0x15, 0xd9, 0x32, 0x86, 0xf2, 0x9a, 0x56, - 0xfa, 0x72, 0xf7, 0xa0, 0x60, 0x75, 0xb0, 0x40, - 0x76, 0x7c, 0xe4, 0x7f, 0x97, 0xd6, 0xc2, 0x1d, - 0x1e, 0xaf, 0xd8, 0xaf, 0x32, 0xeb, 0x7b, 0x2c, - 0xc1, 0x45, 0xcc, 0xe1, 0xec, 0x2c, 0xe5, 0x46, - 0x09, 0x60, 0x12, 0xd7, 0xae, 0xa1, 0xa4, 0xf0, - 0x4d, 0x46, 0xd6, 0x6d, 0x79, 0xba, 0x34, 0x37, - 0x5d, 0xc5, 0x3b, 0x2c, 0xba, 0x88, 0x7b, 0xf4, - 0xf6, 0xbe, 0x47, 0x18, 0x60, 0xb5, 0x47, 0xfc, - 0x1e, 0xaf, 0xf8, 0xaf, 0x71, 0x94, 0xe5, 0xeb, - 0xf2, 0x68, 0xc0, 0x73, 0x16, 0xdf, 0x6d, 0x1f, - 0x7e, 0x25, 0x1f, 0x17, 0x96, 0x6f, 0x93, 0x26, - 0xb4, 0x56, 0x63, 0xe7, 0x45, 0x7f, 0x33, 0xc6, - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0xeb, 0xcf, 0x05, 0xca, 0xa9, 0x85, 0xed, 0xc1, - 0x61, 0xd4, 0x73, 0xe8, 0xd9, 0xe3, 0x9a, 0xee, - 0x9e, 0x3c, 0x9e, 0x2a, 0x9e, 0x9f, 0xc8, 0x83, - 0x3a, 0x31, 0x92, 0xf0, 0x46, 0x57, 0xb9, 0x9e, - 0xab, 0xfe, 0xee, 0xdd, 0x1c, 0x63, 0x24, 0x5a, - 0x97, 0x61, 0xa6, 0x76, 0x5b, 0xa4, 0x03, 0x70, - 0x65, 0xc5, 0x2b, 0x97, 0x5b, 0xce, 0x97, 0x90, - 0xdb, 0x55, 0x90, 0xb1, 0x1d, 0x3c, 0xf4, 0x2e, - 0xf7, 0x3b, 0x1c, 0x29, 0xd4, 0x80, 0x07, 0x19, - 0x68, 0x04, 0x65, 0x7c, 0x35, 0x43, 0x71, 0x19, - 0xe9, 0x32, 0x03, 0x1f, 0xa5, 0xf7, 0x99, 0x32, - 0x0b, 0xa8, 0xe4, 0xf0, 0x63, 0xb9, 0x1a, 0x79, - 0x4f, 0x82, 0xe2, 0xab, 0x2c, 0xb3, 0xb0, 0xff, - 0x33, 0xdc, 0xa9, 0xaf, 0x52, 0x2c, 0x16, 0x3d, - 0xf3, 0x49, 0x17, 0xd4, 0xaf, 0xf3, 0xbe, 0x51, - 0xca, 0xa8, 0x46, 0xf6, 0x15, 0xac, 0xea, 0x99, - 0x71, 0x37, 0xd5, 0x12, 0x57, 0xf0, 0xa1, 0x75, - 0xe5, 0x87, 0xe3, 0x42, 0xbc, 0xc5, 0xbb, 0xcf, - 0x7a, 0x53, 0xca, 0x9d, 0xd0, 0xb7, 0x15, 0x29, - 0x72, 0xfc, 0x75, 0x97, 0x55, 0x0b, 0xbf, 0xc7, - 0x6d, 0x54, 0x7a, 0x47, 0x0e, 0xb9, 0x30, 0xe1, - 0xf1, 0x0e, 0x98, 0x96, 0x33, 0x0f, 0x86, 0xbf, - 0x95, 0xf9, 0xa0, 0x74, 0x16, 0xbb, 0x64, 0xa0, - 0x4c, 0x91, 0x01, 0x9c, 0xa6, 0x17, 0x25, 0xab, - 0xe5, 0x87, 0xcb, 0x9b, 0x47, 0x10, 0x2d, 0x69, - 0xb8, 0x50, 0x67, 0x59, 0x26, 0xfe, 0xf5, 0x02, - 0x64, 0x82, 0x5e, 0xcd, 0x8e, 0x32, 0x0b, 0x5d, - 0x81, 0x65, 0x20, 0x9c, 0xd7, 0x6a, 0x46, 0xdd, - 0xb4, 0x86, 0xf9, 0x39, 0x20, 0xc7, 0xd8, 0x1a, - 0x29, 0xf2, 0xc6, 0x46, 0x7d, 0x08, 0xcc, 0x2e, - 0xba, 0xe4, 0x36, 0x0e, 0x52, 0xb3, 0xa8, 0xdf, - 0x25, 0xcd, 0x68, 0x5e, 0xeb, 0xb6, 0x4a, 0xd1, - 0xc9, 0x15, 0xef, 0x47, 0x0a, 0x5b, 0xeb, 0xf5, - 0xd2, 0xc4, 0x00, 0xc9, 0x43, 0x00, 0xe2, 0xba, - 0xca, 0xf4, 0x71, 0xbc, 0x39, 0xe5, 0x68, 0x8a, - 0x1a, 0x48, 0xc6, 0x71, 0x34, 0xaf, 0x75, 0x6d, - 0xdc, 0xb2, 0x3c, 0xd3, 0x31, 0x21, 0xd0, 0xd0, - 0x00, 0x2a, 0xa1, 0x5d, 0xe4, 0xc8, 0x8c, 0x86, - 0x07, 0x55, 0x2d, 0x2d, 0x8f, 0x94, 0x55, 0x05, - 0xd8, 0x2d, 0x4f, 0x26, 0xfe, 0x54, 0x88, 0xb0, - 0xac, 0xbd, 0xfc, 0x20, 0x13, 0xe8, 0x63, 0xf0, - 0x22, 0x17, 0x56, 0x6f, 0x3d, 0xe4, 0xc4, 0x08, - 0x28, 0xe5, 0x5b, 0x58, 0xed, 0x59, 0xf5, 0xe4, - 0x14, 0xf5, 0x10, 0xf6, 0x75, 0x3c, 0xe4, 0xaf, - 0xdf, 0xb2, 0x47, 0xa8, 0xb5, 0xc5, 0x25, 0x5a, - 0x5e, 0xeb, 0x03, 0x06, 0x18, 0x27, 0xfe, 0x96, - 0x92, 0x0b, 0x83, 0x7e, 0x23, 0x54, 0x7f, 0x87, - 0x1e, 0xfc, 0x63, 0x40, 0xab, 0xf0, 0xc7, 0x6a, - 0x64, 0x31, 0xed, 0xaf, 0xab, 0xbd, 0xbc, 0xa9, - 0x40, 0xf6, 0xde, 0xf5, 0xdd, 0x92, 0x98, 0xd4, - 0xb1, 0xa0, 0xe2, 0x13, 0x55, 0x05, 0x65, 0xb8, - 0x2c, 0x5f, 0x7e, 0xd3, 0x3f, 0xb6, 0xf4, 0x9b, - 0x3c, 0x2c, 0x1a, 0xc3, 0x30, 0x21, 0x15, 0xcc, - 0x98, 0x41, 0x01, 0x05, 0xa6, 0x9a, 0x2a, 0xd8, - 0x38, 0xd8, 0x55, 0x3f, 0xb7, 0x62, 0xaf, 0x36, - 0xc3, 0xc7, 0x0a, 0x16, 0x17, 0x98, 0x5c, 0xe5, - 0x57, 0x10, 0x6b, 0xdd, 0x1d, 0x9b, 0xb6, 0x40, - 0x85, 0xe5, 0xc1, 0xb0, 0x97, 0x8c, 0xbf, 0x31, - 0x54, 0x73, 0x62, 0xef, 0xa0, 0x05, 0x49, 0xf0, - 0xb0, 0xe7, 0x11, 0x1d, 0xf7, 0xae, 0x17, 0x1d -//}; -//unsigned int sig_revoked3msg0bsn1_dat_len = 840; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/verrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/verrl.inc deleted file mode 100644 index 3f1b7849b6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/verrl.inc +++ /dev/null @@ -1,70 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 verifier revocation list - * Group : grpX - * Bsn : "bsn1" - * HashAlg : Sha256 - * Revoked : verrevoked/mprivatekey003 - * verrevoked/mprivatekey004 - * verrevoked/mprivatekey005 - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - -// B - 0x4b, 0xb3, 0x62, 0x6c, 0xa5, 0x12, 0xaa, 0x7a, - 0x22, 0x7f, 0xde, 0xf0, 0x8f, 0x1e, 0x3c, 0xc8, - 0xda, 0x5f, 0x2f, 0x6d, 0x3b, 0xd0, 0x42, 0xec, - 0x62, 0xbf, 0x3c, 0x0f, 0xae, 0xd4, 0xf9, 0xa0, - 0x56, 0xc9, 0xd5, 0x33, 0xaa, 0x60, 0xab, 0x86, - 0x15, 0x48, 0xc2, 0xbb, 0xda, 0x3f, 0x37, 0x71, - 0x3e, 0xf2, 0xd5, 0x3c, 0xd3, 0xb9, 0x08, 0xa0, - 0x63, 0x26, 0x6e, 0x26, 0xca, 0x93, 0xc1, 0xe1, - -// version | n4 - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - - 0x5a, 0x6b, 0xd9, 0x27, 0x3a, 0x6e, 0x51, 0xd6, - 0xe4, 0xc0, 0x83, 0xa7, 0x2d, 0xab, 0xd4, 0x57, - 0x07, 0xf3, 0xaa, 0xb2, 0xac, 0xbf, 0x21, 0x46, - 0x2e, 0xba, 0x8c, 0xc6, 0xb9, 0x6c, 0xcd, 0xbb, - 0xc0, 0x94, 0x3b, 0x1b, 0x45, 0xa9, 0x0a, 0x64, - 0x3e, 0x2c, 0x92, 0x02, 0x69, 0xfb, 0x72, 0x9b, - 0xe6, 0xf9, 0x06, 0x82, 0x01, 0x01, 0x43, 0x19, - 0xca, 0xea, 0x70, 0x01, 0x51, 0xae, 0x91, 0xad, - 0x5d, 0xb7, 0x24, 0xf8, 0xbc, 0xff, 0x55, 0x1a, - - 0x34, 0xd9, 0x4d, 0xf5, 0xa8, 0x13, 0x4c, 0x41, - 0x3c, 0x52, 0x9c, 0xde, 0x8b, 0x08, 0x9d, 0x3a, - 0xa0, 0xc9, 0xe9, 0xd6, 0x33, 0x9c, 0x05, 0x43, - 0x8c, 0x78, 0x63, 0xaf, 0x6d, 0x64, 0x5a, 0x0e, - 0x36, 0xce, 0xc4, 0xba, 0x94, 0xf9, 0x2f, 0xa9, - 0xce, 0x81, 0xea, 0xa9, 0x2a, 0xe4, 0x4d, 0x6b, - 0xec, 0xd3, 0xdd, 0xe1, 0x8b, 0x82, 0x1a, 0x54, - 0xeb, 0x23, 0x56, 0x4b, 0xb1, 0xe5, 0xa4, 0x25, - - 0x34, 0x89, 0xd7, 0x46, 0xb8, 0xcb, 0xed, 0xa1, - 0x1c, 0x92, 0xa9, 0xfd, 0x57, 0x56, 0xdf, 0x62, - 0x2e, 0x7d, 0x31, 0x44, 0x4a, 0x7d, 0xa2, 0x29, - 0x07, 0x1e, 0x51, 0xcc, 0x89, 0x8e, 0xee, 0xc4, - 0xda, 0x34, 0x93, 0x0f, 0x6a, 0xd0, 0x7b, 0x17, - 0x06, 0x78, 0x84, 0x37, 0x59, 0x5c, 0xcc, 0xa3, - 0x84, 0xb2, 0x95, 0x15, 0x5a, 0x58, 0xbe, 0x1f, - 0xe4, 0x21, 0x01, 0x39, 0xba, 0x27, 0x3e, 0xc8, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/verrl_012revoked.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/verrl_012revoked.inc deleted file mode 100644 index dc6e732fad..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/verrl_012revoked.inc +++ /dev/null @@ -1,69 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 verifier revocation list - * Group : grpX - * Bsn : "bsn1" - * HashAlg : Sha256 - * Revoked : verrevoked/mprivatekey000 - * verrevoked/mprivatekey001 - * verrevoked/mprivatekey002 - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - -// B - 0x4b, 0xb3, 0x62, 0x6c, 0xa5, 0x12, 0xaa, 0x7a, - 0x22, 0x7f, 0xde, 0xf0, 0x8f, 0x1e, 0x3c, 0xc8, - 0xda, 0x5f, 0x2f, 0x6d, 0x3b, 0xd0, 0x42, 0xec, - 0x62, 0xbf, 0x3c, 0x0f, 0xae, 0xd4, 0xf9, 0xa0, - 0x56, 0xc9, 0xd5, 0x33, 0xaa, 0x60, 0xab, 0x86, - 0x15, 0x48, 0xc2, 0xbb, 0xda, 0x3f, 0x37, 0x71, - 0x3e, 0xf2, 0xd5, 0x3c, 0xd3, 0xb9, 0x08, 0xa0, - 0x63, 0x26, 0x6e, 0x26, 0xca, 0x93, 0xc1, 0xe1, - -// version | n4 - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - - 0x8b, 0xc9, 0x6e, 0xc0, 0x86, 0x04, 0x6f, 0x6c, - 0x89, 0xc2, 0x27, 0xfd, 0x61, 0x59, 0xb5, 0xd2, - 0x73, 0x96, 0xfa, 0xd6, 0xf8, 0xfa, 0x2c, 0x39, - 0xfe, 0xee, 0xef, 0x3e, 0x73, 0xd2, 0x38, 0x3f, - 0x3c, 0x04, 0x07, 0x78, 0xfd, 0x32, 0x9b, 0xc3, - 0x74, 0x90, 0xf2, 0xf5, 0x50, 0xe4, 0x69, 0x5d, - 0x30, 0x0c, 0x6a, 0x8a, 0x9c, 0xcf, 0xff, 0x78, - 0x28, 0x52, 0x6d, 0x20, 0x29, 0xef, 0x2d, 0x7a, - - 0x07, 0x46, 0xed, 0xb8, 0x6a, 0x4e, 0x7f, 0x4b, - 0x9d, 0xcc, 0x18, 0x91, 0x88, 0xf6, 0x76, 0x4d, - 0x74, 0x02, 0x36, 0x62, 0xe6, 0xd4, 0xb5, 0xf0, - 0x2d, 0x70, 0x91, 0x49, 0x65, 0xdf, 0x19, 0x02, - 0x30, 0x6c, 0x11, 0xaa, 0x74, 0x8c, 0x55, 0x2e, - 0x4b, 0xa3, 0x00, 0x00, 0xb0, 0x38, 0xf4, 0xcd, - 0x5d, 0xc9, 0x1d, 0xaa, 0x1e, 0x44, 0x98, 0xa4, - 0xe1, 0x3f, 0x2f, 0x4f, 0x6c, 0xc9, 0x15, 0xb0, - - 0x8c, 0x10, 0x2f, 0x17, 0xa0, 0xe4, 0x1f, 0xc6, - 0xaa, 0xea, 0xd4, 0x82, 0x67, 0x61, 0x96, 0x47, - 0x9b, 0x46, 0x2c, 0x31, 0xbd, 0x29, 0x62, 0x2d, - 0xd8, 0x40, 0x44, 0xbc, 0x1d, 0xf0, 0x19, 0x02, - 0x4e, 0x4c, 0x2e, 0xc1, 0x0d, 0x43, 0x59, 0x8b, - 0xe0, 0x0d, 0xb4, 0x29, 0x20, 0x35, 0x1f, 0xb6, - 0x00, 0x07, 0xa3, 0xd9, 0x28, 0xd9, 0x48, 0x08, - 0x5e, 0x14, 0xca, 0x56, 0x72, 0xa4, 0xb6, 0x5a, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/cmember9/cmpprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/cmember9/cmpprivkey.dat deleted file mode 100644 index 9c0f0a4c0d..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/cmember9/cmpprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/cmember9/cmpprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/cmember9/cmpprivkey.inc deleted file mode 100644 index c1fc635d16..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/cmember9/cmpprivkey.inc +++ /dev/null @@ -1,36 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 compressed private key - * Group : grpY - * Signer : member9 - */ -//unsigned char cmpprivkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, - 0x27, 0x8d, 0x99, 0x27, 0x35, 0x78, 0x6d, 0xf6, - 0x24, 0xdc, 0x18, 0x4d, 0xc0, 0xd5, 0x2c, 0xde, - 0x0d, 0xb1, 0x2c, 0x26, 0x6f, 0x02, 0xae, 0x41, - 0x80, 0xc2, 0xab, 0x2a, 0xa9, 0xd8, 0x3a, 0xbc, - 0x1d, 0x41, 0xca, 0x59, 0x4f, 0x40, 0xfe, 0x20, - 0x59, 0x1e, 0xdb, 0x28, 0x5a, 0x23, 0x6b, 0xce, - 0x21, 0x27, 0x66, 0xa2, 0x05, 0x97, 0xb7, 0x8d, - 0x27, 0xd8, 0x9d, 0xca, 0x37, 0x7d, 0x77, 0x30 -//}; -//unsigned int cmpprivkey_dat_len = 80; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/iprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/iprivkey.inc deleted file mode 100644 index d5444a83f5..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/iprivkey.inc +++ /dev/null @@ -1,32 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 issuing private key - * Group : grpY - */ - -//unsigned char iprivkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, - 0x77, 0x65, 0xc8, 0xd0, 0x47, 0x53, 0x1e, 0xab, - 0x30, 0x57, 0x01, 0x49, 0x51, 0x26, 0xbf, 0xa2, - 0x00, 0xa4, 0x67, 0x12, 0x7a, 0x70, 0x40, 0x29, - 0x32, 0x95, 0x0d, 0x37, 0x6a, 0x53, 0xd7, 0x9e -//}; -//unsigned int iprivkey_dat_len = 48; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/pubkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/pubkey.inc deleted file mode 100644 index 592241af83..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grp_y/pubkey.inc +++ /dev/null @@ -1,59 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group public key - * Group : grpY - */ -//unsigned char pubkey_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, - 0x8f, 0x23, 0xda, 0x77, 0xed, 0xda, 0x2f, 0x0b, - 0x5b, 0xe8, 0x99, 0x6b, 0xf4, 0x52, 0x09, 0x5b, - 0xf2, 0x00, 0x77, 0x4e, 0xea, 0x44, 0x58, 0x4e, - 0x1c, 0x5c, 0xd6, 0x02, 0x77, 0xea, 0x99, 0x2f, - 0x75, 0xef, 0x33, 0xd6, 0x83, 0xe0, 0xc4, 0xdb, - 0x57, 0x48, 0x69, 0x27, 0xad, 0x69, 0xe5, 0x05, - 0xef, 0xda, 0xaa, 0x0e, 0xef, 0x41, 0xc5, 0x09, - 0xcd, 0x3e, 0x27, 0xb9, 0xce, 0x80, 0x28, 0xc9, - 0x76, 0x9d, 0x10, 0x18, 0x26, 0xa3, 0x51, 0xe8, - 0x3e, 0x3c, 0xb6, 0x29, 0xaa, 0x57, 0x84, 0x68, - 0x2f, 0x75, 0xc8, 0x51, 0xd4, 0xab, 0xed, 0x76, - 0x87, 0xb8, 0xbf, 0xf2, 0x14, 0x2f, 0xd2, 0x1e, - 0x18, 0xc8, 0x6a, 0xe1, 0xf4, 0xaf, 0xec, 0x47, - 0xe7, 0x00, 0xea, 0x18, 0x8e, 0xcf, 0x05, 0xdb, - 0x46, 0x78, 0xf5, 0xd8, 0xe7, 0xa8, 0x08, 0x5c, - 0xa1, 0xcb, 0x12, 0x14, 0x73, 0x74, 0x75, 0x35, - 0x09, 0x3b, 0x39, 0x52, 0x02, 0xa1, 0xbf, 0xcf, - 0x0b, 0xb0, 0x77, 0xc6, 0x9d, 0x3e, 0x50, 0x67, - 0x7d, 0x36, 0x9a, 0xb6, 0x84, 0x62, 0xd4, 0x09, - 0x6c, 0xef, 0xd7, 0x11, 0xce, 0x64, 0xf4, 0xe2, - 0x79, 0x58, 0x3c, 0x7a, 0x96, 0x2a, 0x8f, 0xaa, - 0x0f, 0xe1, 0x1a, 0xbd, 0x3a, 0x50, 0x1c, 0x29, - 0x24, 0x0d, 0xe7, 0xfc, 0xb5, 0xf4, 0x02, 0xaf, - 0x5e, 0xb0, 0xda, 0x52, 0x23, 0x40, 0x33, 0x2c, - 0xcf, 0xf9, 0xda, 0xf7, 0x38, 0x9a, 0xd3, 0x0f, - 0x69, 0x38, 0xec, 0x77, 0xd0, 0xe0, 0x30, 0x8a, - 0x66, 0x03, 0x5c, 0xd0, 0x05, 0x03, 0x87, 0xe6, - 0x5d, 0xef, 0x86, 0xe7, 0xf6, 0x8b, 0x04, 0xf8, - 0x30, 0x28, 0x9d, 0x22, 0xe6, 0xee, 0x40, 0x48, - 0x46, 0x5a, 0x2b, 0xff, 0xf2, 0xd4, 0x70, 0xf8, - 0x7e, 0x91, 0xea, 0x51, 0xac, 0x0b, 0xbd, 0xfc, - 0xe1, 0x91, 0xe1, 0x37, 0xb8, 0x11, 0xce, 0x6e -//}; -//unsigned int pubkey_dat_len = 272; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl.inc deleted file mode 100644 index 3968e0dbe7..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl.inc +++ /dev/null @@ -1,26 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group revocation list - * Group : grpX - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -//}; -//unsigned int grprl_dat_len = 8; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_first_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_first_entry.inc deleted file mode 100644 index 5cad583bbf..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_first_entry.inc +++ /dev/null @@ -1,31 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group revocation list grpX revoked first entry - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x67, 0x56, 0x34, 0x21 -//}; -//unsigned int grprl_dat_len = 56; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_last_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_last_entry.inc deleted file mode 100644 index 0c9dcadb27..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_last_entry.inc +++ /dev/null @@ -1,31 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group revocation list grpX revoked last entry - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x67, 0x56, 0x34, 0x21, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, -//}; -//unsigned int grprl_dat_len = 56; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_middle_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_middle_entry.inc deleted file mode 100644 index 258273ef43..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_revoked_grp_x_middle_entry.inc +++ /dev/null @@ -1,31 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group revocation list grpX revoked middle entry - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x67, 0x56, 0x34, 0x21 -//}; -//unsigned int grprl_dat_len = 56; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_single_entry_revoked_grp_x.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_single_entry_revoked_grp_x.inc deleted file mode 100644 index 17573e48ec..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/grprl_single_entry_revoked_grp_x.inc +++ /dev/null @@ -1,27 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group revocation list single entry grpX revoked - */ -//unsigned char grprl_dat[] = { - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xee -//}; -//unsigned int grprl_dat_len = 24; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/member0/mprecomp.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/member0/mprecomp.inc deleted file mode 100644 index 219579787f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/member0/mprecomp.inc +++ /dev/null @@ -1,106 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 member precomp - * Group : GroupA - * Member : 0 - * Issuer : Ikgf - */ - 0xbc, 0x74, 0xd9, 0xd2, 0xcc, 0x56, 0x28, 0xfd, 0x3d, 0x0b, 0x2b, 0x86, - 0xf4, 0xc6, 0xb2, 0x25, 0x19, 0x6b, 0x5b, 0x42, 0x35, 0x6a, 0xd9, 0x9c, - 0xf9, 0xb4, 0x30, 0xcb, 0xff, 0x39, 0xbb, 0x92, 0x41, 0x71, 0xf4, 0x49, - 0xc3, 0xfd, 0x36, 0xa3, 0xe0, 0xdd, 0x83, 0xf1, 0x34, 0x53, 0x2e, 0x16, - 0x2f, 0x45, 0x06, 0x10, 0x3d, 0x9a, 0xfd, 0x22, 0xb8, 0xf1, 0xfd, 0x52, - 0x3a, 0x24, 0xc5, 0x9c, 0xdd, 0x54, 0x9c, 0xff, 0xb0, 0x4d, 0xb9, 0xe5, - 0x21, 0x62, 0x61, 0xaa, 0x76, 0xc3, 0xc1, 0x25, 0x47, 0xe4, 0x3b, 0x62, - 0xab, 0x5f, 0x2c, 0x56, 0xe1, 0x24, 0x9c, 0x21, 0xec, 0x6b, 0x1d, 0x80, - 0x1d, 0xca, 0xc5, 0x45, 0x34, 0xee, 0x4e, 0xc6, 0x20, 0x94, 0x14, 0x98, - 0x0e, 0xd6, 0x88, 0x1d, 0x69, 0xfd, 0x25, 0xd3, 0xe3, 0x08, 0x3f, 0x62, - 0x82, 0xa9, 0xf2, 0x13, 0xd6, 0x54, 0xda, 0x12, 0xec, 0x4e, 0xd2, 0x92, - 0xe1, 0x82, 0x3f, 0x54, 0xf8, 0xc7, 0x0e, 0x21, 0x90, 0x49, 0xa1, 0x73, - 0xa2, 0x03, 0xd0, 0xc7, 0x1c, 0xc2, 0x36, 0x1f, 0xb5, 0x8e, 0x22, 0xaf, - 0xb5, 0x96, 0xad, 0xba, 0xde, 0xe6, 0x45, 0xb9, 0xee, 0x39, 0x74, 0x53, - 0x62, 0x68, 0xa6, 0x37, 0x33, 0x65, 0x47, 0x3b, 0xf2, 0xa3, 0x35, 0xd0, - 0xe9, 0x50, 0x49, 0x68, 0x23, 0x9a, 0xa0, 0x33, 0x66, 0x2f, 0x84, 0x23, - 0x43, 0x95, 0x35, 0xea, 0x1d, 0xfe, 0x3a, 0xe4, 0x45, 0x6f, 0xad, 0x86, - 0x7a, 0x4b, 0xf8, 0xb7, 0x32, 0xaf, 0x79, 0x7c, 0x45, 0x8d, 0xd9, 0x36, - 0x0d, 0x66, 0xcb, 0x47, 0x07, 0xf4, 0x75, 0xae, 0x38, 0xe1, 0x32, 0x67, - 0x80, 0x73, 0x0b, 0x98, 0xb7, 0x8d, 0xa3, 0x03, 0x94, 0x59, 0x0c, 0x04, - 0xa8, 0x3e, 0xf8, 0x39, 0xc9, 0x25, 0x74, 0xb5, 0x9c, 0x62, 0x79, 0xb9, - 0xf0, 0x20, 0x0b, 0x41, 0xb1, 0x76, 0x2a, 0x93, 0x15, 0xfa, 0x7a, 0x55, - 0xe4, 0x50, 0xf3, 0xe1, 0x54, 0xf8, 0x9e, 0x42, 0x84, 0xaf, 0xb6, 0xc2, - 0x2e, 0x98, 0xd5, 0xfd, 0x31, 0xe4, 0x16, 0x2b, 0x4d, 0x32, 0x96, 0x04, - 0x4f, 0xca, 0x8b, 0x8d, 0x3c, 0x24, 0xb4, 0xc3, 0x86, 0x3b, 0x06, 0xc9, - 0x45, 0xc9, 0xb1, 0x90, 0xac, 0xc3, 0xd6, 0xec, 0x80, 0x5b, 0x84, 0xcb, - 0x5e, 0x7b, 0xc4, 0xcb, 0x63, 0x9e, 0xca, 0x09, 0x92, 0xca, 0x70, 0xfd, - 0x24, 0x2a, 0x81, 0x37, 0x5a, 0x85, 0x72, 0x4a, 0x46, 0x2d, 0x29, 0x38, - 0x8f, 0xc3, 0x59, 0xc7, 0xe9, 0x76, 0x24, 0xea, 0xd4, 0xef, 0x06, 0x12, - 0xf5, 0xab, 0xab, 0xa1, 0x59, 0x13, 0xc8, 0x1d, 0xdf, 0x0f, 0x41, 0xbe, - 0x98, 0x65, 0x00, 0x11, 0x41, 0x7c, 0x6e, 0x29, 0x83, 0x73, 0xfd, 0x81, - 0xff, 0xe8, 0xd8, 0x7f, 0xa1, 0x00, 0x62, 0x11, 0x14, 0x38, 0x06, 0x57, - 0x20, 0x81, 0xaa, 0x9e, 0xaf, 0xfe, 0xee, 0x68, 0xee, 0x30, 0x1a, 0x83, - 0xe7, 0x32, 0xc3, 0xfc, 0x69, 0xe5, 0x19, 0x29, 0x4e, 0xee, 0xb0, 0xf1, - 0x63, 0xaf, 0x41, 0x3d, 0x3b, 0xb9, 0xbb, 0x2e, 0xde, 0xd7, 0x0b, 0xbe, - 0x11, 0x8f, 0x4a, 0x94, 0x4c, 0x57, 0xf3, 0x64, 0x38, 0x5a, 0xc6, 0xb8, - 0x5d, 0xa1, 0x9d, 0xc8, 0xfa, 0x32, 0xe2, 0x08, 0xf4, 0x26, 0x3f, 0x75, - 0xb5, 0x35, 0x9a, 0xe9, 0xd6, 0x1d, 0x35, 0x41, 0x9b, 0x20, 0x2b, 0x54, - 0xb9, 0x66, 0x6c, 0xc6, 0xb7, 0x44, 0x82, 0x9b, 0x74, 0xe8, 0x09, 0x04, - 0xa4, 0xf2, 0x7a, 0x8f, 0xe8, 0x6f, 0x3c, 0xa0, 0x18, 0xab, 0x66, 0xf6, - 0x39, 0x34, 0x70, 0xf3, 0xa6, 0xd3, 0xc9, 0xe1, 0x97, 0xe2, 0xdc, 0x4d, - 0xca, 0x02, 0xb6, 0x73, 0x07, 0xf3, 0x8c, 0xd0, 0xab, 0xd9, 0x12, 0x45, - 0x70, 0x7c, 0x3a, 0x24, 0x64, 0xce, 0x9e, 0x38, 0x4d, 0x5d, 0xe1, 0x9d, - 0xf2, 0x4b, 0x58, 0xdc, 0x71, 0xb3, 0x61, 0x56, 0x14, 0x62, 0x2a, 0x1b, - 0x36, 0x5e, 0xc9, 0x15, 0xf3, 0x50, 0xe6, 0xc0, 0x93, 0x62, 0xd0, 0x69, - 0xab, 0xd4, 0xe5, 0x9b, 0xa6, 0xa7, 0xa3, 0x0c, 0x51, 0xad, 0xf7, 0x38, - 0x6f, 0x1d, 0xcf, 0x43, 0xda, 0x83, 0x95, 0xc6, 0xfb, 0xd8, 0x90, 0x5e, - 0x35, 0x30, 0x0b, 0x7b, 0x45, 0xd0, 0x12, 0x32, 0x95, 0xc3, 0x96, 0xdc, - 0x0a, 0x68, 0xcc, 0xcf, 0x19, 0x0b, 0x13, 0xc7, 0x6a, 0x7a, 0x53, 0x36, - 0x5b, 0x24, 0xc5, 0x84, 0x5c, 0xeb, 0x9e, 0xeb, 0xdc, 0x91, 0x17, 0xb3, - 0x29, 0xfd, 0xee, 0x55, 0xc9, 0x8c, 0xcd, 0xbe, 0x3a, 0x66, 0xf3, 0xba, - 0x79, 0xfe, 0xc7, 0xf8, 0x08, 0xeb, 0xd2, 0x3a, 0x17, 0x3c, 0x36, 0x29, - 0xc1, 0xde, 0xa9, 0xab, 0x80, 0xdb, 0x6c, 0xdd, 0xfb, 0xe5, 0xb1, 0x12, - 0x25, 0x2f, 0xa3, 0x3d, 0x0e, 0x72, 0xde, 0xaf, 0x86, 0x93, 0x35, 0x18, - 0x96, 0x19, 0x47, 0xfd, 0x8f, 0xae, 0x7b, 0xe7, 0xac, 0x6e, 0x53, 0x10, - 0x1e, 0x66, 0x54, 0xc0, 0x36, 0x0e, 0x73, 0x35, 0xb3, 0x20, 0xf9, 0xaa, - 0x25, 0x4a, 0x66, 0xaf, 0xc9, 0x2f, 0xd1, 0x19, 0x8b, 0x8f, 0x93, 0xbe, - 0x3a, 0x30, 0xa5, 0x24, 0xc2, 0xad, 0x30, 0xfc, 0x97, 0xfe, 0x6c, 0xe0, - 0x7f, 0x98, 0x71, 0x37, 0x33, 0x26, 0xc3, 0x75, 0xc8, 0x51, 0xe6, 0xf2, - 0x99, 0xf0, 0x0f, 0x7d, 0x5d, 0x12, 0x26, 0x9d, 0x96, 0xeb, 0xd5, 0x08, - 0x28, 0x34, 0x90, 0x1c, 0xdb, 0x98, 0xbd, 0x8a, 0xeb, 0x93, 0x0d, 0xd0, - 0x57, 0x3e, 0xb8, 0x65, 0xdd, 0xa6, 0xa9, 0x81, 0xd6, 0xca, 0x62, 0x4b, - 0x24, 0xed, 0xf4, 0x36, 0xf0, 0x83, 0xd6, 0x0e, 0x53, 0xf2, 0x50, 0x89, - 0x70, 0x23, 0x19, 0x7b, 0xd0, 0x7e, 0x67, 0xa3, 0x45, 0x72, 0x9d, 0x11, - 0xbe, 0xbb, 0xe1, 0x72, 0x51, 0xf6, 0x5f, 0x4e, 0x2c, 0xca, 0x61, 0x3d, - 0xaa, 0xfd, 0xb7, 0x61, 0xbc, 0x3a, 0xd2, 0x20, 0x18, 0xa2, 0xee, 0x04, - 0xe4, 0x6b, 0xf3, 0x84, 0x26, 0xc2, 0x43, 0xa4, 0xfe, 0x4e, 0x14, 0x5c, - 0xbe, 0xe7, 0x11, 0x4a, 0x61, 0x33, 0x7d, 0xeb, 0x71, 0x98, 0x7c, 0xf0, - 0x44, 0xe2, 0x41, 0x17, 0x39, 0xd0, 0x4e, 0xe2, 0x9c, 0xcc, 0x8d, 0x76, - 0x3c, 0xb8, 0x0f, 0x63, 0x4a, 0x56, 0x7c, 0xf8, 0xab, 0xbd, 0x87, 0xcc, - 0xa2, 0x29, 0xb9, 0x3c, 0xcc, 0x12, 0xd2, 0x9d, 0x6f, 0xbd, 0x28, 0xc3, - 0x0c, 0x2f, 0x83, 0x8c, 0xf3, 0xad, 0x3d, 0xc6, 0x92, 0xba, 0x0b, 0x28, - 0x47, 0x81, 0x78, 0xbe, 0x2b, 0xe0, 0x6a, 0x47, 0xba, 0xf3, 0xbe, 0x39, - 0x30, 0x49, 0x0b, 0x35, 0x34, 0x80, 0x70, 0xc2, 0x75, 0x54, 0x65, 0xd8, - 0xc8, 0x1c, 0x26, 0xb8, 0x97, 0x61, 0x57, 0xcf, 0x2d, 0xb8, 0xd1, 0xdd, - 0xb0, 0xf1, 0xa9, 0x0f, 0x3f, 0x7e, 0xfe, 0xd3, 0xee, 0xdc, 0x75, 0xbf, - 0xc2, 0xf1, 0x30, 0xd6, 0x60, 0x1b, 0xcd, 0x7b, 0x87, 0xde, 0x0b, 0x58, - 0x5c, 0xac, 0x84, 0xda, 0xef, 0x86, 0x86, 0x8d, 0x8e, 0xfd, 0x6f, 0x93, - 0x32, 0x8d, 0xac, 0x7b, 0x8f, 0x2a, 0x8a, 0x5f, 0xf1, 0xea, 0xbb, 0x8e, - 0x6d, 0xbf, 0xe0, 0x59, 0x90, 0xc2, 0xd3, 0x3d, 0x8a, 0x03, 0x64, 0x11, - 0xdd, 0xf1, 0xfc, 0x2d, 0x26, 0x8a, 0x6f, 0x39, 0x25, 0xa9, 0xaa, 0x61, - 0x45, 0x5b, 0x7b, 0x36, 0xfd, 0x82, 0xd2, 0x6a, 0x8c, 0x9a, 0xf1, 0xc2 \ No newline at end of file diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/member0/mprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/member0/mprivkey.inc deleted file mode 100644 index 2017fa0dd8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/member0/mprivkey.inc +++ /dev/null @@ -1,36 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 member private-key - * Group : GroupA - * Member : 0 - * Issuer : Ikgf - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xca, 0x24, 0x49, 0x67, 0x86, 0x98, 0xfe, 0x05, - 0xd2, 0x66, 0xc5, 0x7c, 0xd2, 0x40, 0xb6, 0xed, 0x4f, 0x76, 0xc0, 0xb8, - 0x08, 0x62, 0x9a, 0x56, 0x46, 0x76, 0x01, 0x40, 0xd8, 0xa3, 0xe1, 0xb8, - 0x2f, 0x83, 0x64, 0x88, 0x99, 0xca, 0xd3, 0x2b, 0xd9, 0x50, 0xfb, 0x74, - 0x8b, 0xa5, 0x32, 0xb8, 0xce, 0x31, 0xd7, 0x56, 0x4b, 0xdd, 0xdd, 0x1c, - 0x0e, 0x5e, 0xba, 0x34, 0x68, 0x66, 0xbc, 0xb6, 0x9c, 0x92, 0xf0, 0x2f, - 0xa2, 0x27, 0x56, 0xc1, 0xef, 0x3a, 0x21, 0x5e, 0x9a, 0x05, 0x13, 0x63, - 0x0e, 0x2f, 0x12, 0xac, 0x95, 0xb9, 0x26, 0x6d, 0x1d, 0xe2, 0xcf, 0x64, - 0x4a, 0x09, 0xdd, 0x4f, 0x15, 0x9d, 0x08, 0x6b, 0x93, 0xbf, 0x95, 0x89, - 0x11, 0xb8, 0x31, 0x11, 0xb1, 0x36, 0x76, 0x4d, 0x0a, 0xbe, 0x5a, 0x42, - 0xe7, 0x44, 0xbb, 0x17, 0x6d, 0x36, 0x7b, 0x80, 0x0b, 0x10, 0x1e, 0xc6 \ No newline at end of file diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/privrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/privrl.inc deleted file mode 100644 index 2b2edc3539..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/privrl.inc +++ /dev/null @@ -1,38 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 private-key based revocation list - * Group : GroupA - * Issuer : iKGF - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x1d, 0x79, 0x15, 0xee, 0xc2, 0x0b, 0x17, 0xc4, - 0xd4, 0xcb, 0x43, 0x3c, 0x5c, 0xad, 0x68, 0x3a, - 0x03, 0x6d, 0xdf, 0xea, 0x78, 0x42, 0x9a, 0xc3, - 0xfc, 0xc9, 0x93, 0xdd, 0x71, 0x44, 0xba, 0xcb, - 0x36, 0xcd, 0x95, 0x0d, 0xa2, 0x77, 0x96, 0x89, - 0x91, 0xca, 0xf6, 0x02, 0xca, 0x20, 0xff, 0x73, - 0x37, 0x97, 0xb1, 0x46, 0x8c, 0xaf, 0x64, 0xb6, - 0x0c, 0x48, 0xa6, 0x3e, 0xbd, 0x92, 0x71, 0xf8, - 0x52, 0x21, 0x71, 0x2b, 0x5a, 0x9f, 0x9d, 0xc9, - 0x44, 0x41, 0x15, 0xa0, 0xd8, 0x39, 0xa9, 0xad, - 0x49, 0x64, 0x68, 0x38, 0xa8, 0xef, 0xa5, 0x95, - 0x14, 0x6a, 0xe2, 0x7d, 0xee, 0x96, 0xae, 0x9e diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/privrl_empty.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/privrl_empty.inc deleted file mode 100644 index cf9237ef1e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/privrl_empty.inc +++ /dev/null @@ -1,27 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 private-key based revocation list - * Group : GroupA - * Issuer : iKGF - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00 - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/pubkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/pubkey.inc deleted file mode 100644 index 00fabe210e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/pubkey.inc +++ /dev/null @@ -1,46 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group public-key - * Group : GroupA - * Issuer : Ikgf - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x45, 0xcb, 0x06, 0x04, 0xb3, 0xf7, 0x23, 0xb2, - 0xd1, 0xd1, 0x0d, 0x4f, 0x51, 0x7b, 0xbb, 0x8f, 0x71, 0x15, 0xd7, 0xf1, - 0xdc, 0x15, 0x37, 0xc8, 0xb8, 0x3d, 0x68, 0x0a, 0x18, 0xa5, 0x34, 0x14, - 0x0c, 0xdc, 0xd9, 0x15, 0x7e, 0xba, 0x56, 0xc5, 0xe5, 0x61, 0xfa, 0x6a, - 0x86, 0xa0, 0xac, 0x6a, 0x81, 0x36, 0x6d, 0x01, 0x5f, 0x86, 0xc0, 0x04, - 0x8b, 0x1e, 0xff, 0x49, 0xd9, 0x37, 0x96, 0x66, 0xf1, 0xc3, 0x16, 0xb5, - 0xc5, 0x1c, 0x67, 0xb6, 0xff, 0x28, 0x23, 0x79, 0x59, 0xea, 0x80, 0xe6, - 0x09, 0x07, 0xe7, 0xd3, 0x38, 0xec, 0xb9, 0x16, 0x83, 0x88, 0xda, 0x64, - 0xdd, 0xc4, 0x9d, 0x6a, 0x5c, 0xb2, 0x1c, 0x88, 0x97, 0xea, 0xaf, 0xa9, - 0xf3, 0x3e, 0x07, 0xea, 0xb6, 0x2a, 0xd5, 0x7a, 0xed, 0x32, 0xd9, 0x3d, - 0x90, 0xd7, 0xb9, 0x91, 0x08, 0x05, 0x9e, 0xe3, 0x22, 0x75, 0x06, 0x35, - 0xe5, 0xc4, 0x77, 0xad, 0x52, 0xb9, 0x7c, 0x04, 0x2d, 0x7e, 0x81, 0xf2, - 0x5d, 0x5d, 0x52, 0x7d, 0xd7, 0x1d, 0x29, 0xfb, 0x6a, 0xa7, 0xbc, 0xb5, - 0xa9, 0x1a, 0xa6, 0xfd, 0x20, 0xea, 0xf2, 0x98, 0xe2, 0x67, 0x33, 0x28, - 0x67, 0x5f, 0xbe, 0x23, 0xa0, 0x43, 0xe8, 0x71, 0xaa, 0xab, 0xf6, 0xf0, - 0x6a, 0x2b, 0x52, 0xa8, 0x61, 0x51, 0x22, 0x44, 0x00, 0x91, 0xd7, 0xf1, - 0x7e, 0x05, 0x48, 0xdc, 0x51, 0x0c, 0xef, 0xa0, 0xf3, 0x72, 0xcd, 0x59, - 0xd4, 0x7a, 0x2a, 0x60, 0xa3, 0x62, 0x54, 0xa8, 0xb6, 0x8f, 0xed, 0x90, - 0xdf, 0x3e, 0x94, 0xe8, 0xa4, 0x89, 0x32, 0xaa, 0x52, 0x5a, 0x97, 0xae, - 0x4c, 0x86, 0xf4, 0xba, 0xec, 0xc6, 0x36, 0x13, 0x87, 0x42, 0x5d, 0x16, - 0x49, 0x12, 0x66, 0xc5, 0xe0, 0xe4, 0x9b, 0xf9, 0x68, 0xaa, 0xa9, 0x95, - 0x81, 0x16, 0x5c, 0xd2, 0xca, 0xd4, 0x2e, 0x61 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_msg0_sha256_sigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_msg0_sha256_sigrl.inc deleted file mode 100644 index 0cc91af29a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_msg0_sha256_sigrl.inc +++ /dev/null @@ -1,98 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - /*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: groupA - * Issuer : iKGF - * Signer: member0 - * HashAlg: Sha256 - * Message: "msg0" - * Basename: None (random base) - * SigRl: SigRl of group - */ - 0x9e, 0x45, 0x73, 0x32, 0x27, 0x75, 0xb0, 0x65, 0x22, 0xd4, 0x90, 0xbf, - 0x5b, 0xcd, 0x4d, 0xfd, 0xd1, 0x6e, 0xe7, 0xa0, 0x18, 0xe4, 0x3b, 0xdb, - 0x2e, 0xf2, 0xb7, 0x58, 0xfb, 0xa6, 0xb5, 0xc3, 0x22, 0x3c, 0x62, 0x88, - 0x26, 0xc4, 0x20, 0x5f, 0xf2, 0x76, 0x8b, 0xc5, 0x2e, 0x09, 0x4f, 0x4d, - 0xee, 0xd9, 0xc6, 0x87, 0xe8, 0xba, 0xba, 0x51, 0x00, 0x98, 0x3c, 0x37, - 0x26, 0x13, 0x1c, 0x8e, 0x1a, 0x72, 0x0b, 0xd3, 0x26, 0xce, 0xd2, 0x78, - 0x3c, 0xd8, 0x70, 0x4a, 0xa6, 0xd5, 0x44, 0xb9, 0xa5, 0xac, 0x0f, 0x5a, - 0x7a, 0x0e, 0xdf, 0x71, 0xc0, 0xa8, 0xdd, 0x84, 0xf8, 0xc3, 0x4e, 0xfe, - 0x53, 0xdb, 0x54, 0x97, 0x0a, 0x23, 0xbe, 0x80, 0x7f, 0xb8, 0x91, 0x92, - 0x83, 0x30, 0x10, 0x65, 0x62, 0x1c, 0xfa, 0x4b, 0xe5, 0x5c, 0x07, 0xde, - 0x0b, 0x41, 0x3e, 0xf3, 0xcf, 0x8f, 0x24, 0xc9, 0xb6, 0xe5, 0xfb, 0xee, - 0xa6, 0x0e, 0x19, 0x0f, 0xa7, 0x16, 0xcf, 0x7e, 0xac, 0xb6, 0xa2, 0xb7, - 0x57, 0x30, 0x9f, 0x13, 0x84, 0x71, 0x6a, 0x9c, 0x0e, 0x3d, 0x6f, 0x0c, - 0x37, 0xb6, 0xde, 0xdb, 0x15, 0x95, 0x30, 0xe7, 0xba, 0x1f, 0x7e, 0xc7, - 0x1e, 0x3f, 0x02, 0x66, 0x0f, 0xb8, 0x50, 0xd7, 0xcf, 0xde, 0xe1, 0x28, - 0xd1, 0x61, 0x95, 0x4d, 0xfd, 0x6c, 0xd2, 0xb0, 0x39, 0xca, 0xf9, 0xf1, - 0xce, 0x42, 0x8d, 0xe1, 0x67, 0x40, 0x84, 0xe8, 0xef, 0x9c, 0x9b, 0x27, - 0x9f, 0x32, 0x7f, 0x72, 0xb8, 0x15, 0x99, 0xb9, 0xad, 0x02, 0x5b, 0x66, - 0xa7, 0x5f, 0xb6, 0x4d, 0xcc, 0x23, 0x2e, 0xc6, 0xa6, 0x24, 0x9d, 0xf2, - 0x31, 0xfd, 0x5b, 0x7a, 0x9e, 0x62, 0xb6, 0x4e, 0x9a, 0x26, 0xff, 0x92, - 0xd6, 0x2d, 0x59, 0xd4, 0x65, 0xdc, 0x67, 0x58, 0x2e, 0xf4, 0x8b, 0x7e, - 0xd7, 0x5d, 0xc2, 0x8b, 0x24, 0x77, 0xa4, 0x51, 0x67, 0xcb, 0x14, 0x90, - 0x8f, 0xf1, 0xb8, 0xee, 0x85, 0xa5, 0xd8, 0x66, 0x7b, 0xa5, 0x5e, 0xf6, - 0xfa, 0xe2, 0x50, 0xbd, 0x9b, 0xf0, 0xfb, 0xc7, 0x4a, 0xea, 0x95, 0xcf, - 0x27, 0x02, 0x37, 0xa9, 0xec, 0x43, 0xe5, 0xa1, 0xa0, 0x53, 0xf7, 0x2c, - 0x4e, 0xd0, 0x84, 0x7a, 0x56, 0xe7, 0x55, 0x80, 0x91, 0x11, 0x53, 0xb7, - 0xbc, 0xc6, 0x73, 0x1d, 0x7d, 0x24, 0x06, 0x52, 0x5e, 0x86, 0xd4, 0x43, - 0xde, 0xde, 0xe9, 0x95, 0x9f, 0x86, 0x03, 0xcc, 0x2e, 0x0d, 0xec, 0xa0, - 0x1a, 0x5c, 0xe5, 0x93, 0x89, 0xfb, 0x7a, 0x9e, 0x79, 0x4f, 0x85, 0x8e, - 0xe8, 0x91, 0x18, 0x4f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0xcf, 0x8a, 0x04, 0x78, 0x6d, 0xcc, 0x0b, 0xac, 0x42, 0x2e, 0xe3, 0x46, - 0xeb, 0x20, 0xcb, 0x19, 0x64, 0x23, 0x2d, 0xd2, 0xf6, 0xef, 0xa0, 0xf0, - 0xd1, 0xf2, 0x84, 0x53, 0xb3, 0x91, 0xec, 0x3c, 0xa0, 0x1c, 0xb8, 0x66, - 0xb3, 0x6e, 0xb1, 0x2b, 0x72, 0x65, 0x3e, 0x30, 0xfe, 0xef, 0x58, 0xd0, - 0x3b, 0x31, 0x3b, 0xb9, 0x5a, 0x61, 0x26, 0x77, 0xea, 0x87, 0xf3, 0x09, - 0x47, 0xc2, 0x8d, 0x96, 0xb9, 0x05, 0x40, 0xf3, 0x48, 0xe8, 0x1b, 0x71, - 0x39, 0x2f, 0xd3, 0x6f, 0xad, 0x1b, 0x7e, 0x33, 0xd2, 0x8f, 0x5b, 0xf4, - 0x5a, 0xdc, 0x66, 0xcb, 0xd5, 0xcf, 0xc9, 0x91, 0xb6, 0x7a, 0xd8, 0xe4, - 0x81, 0x86, 0xb6, 0x88, 0xc4, 0x59, 0x8e, 0x03, 0x09, 0x8e, 0x29, 0xba, - 0x16, 0x23, 0x84, 0x5f, 0x30, 0x93, 0x13, 0xb4, 0xe9, 0xdf, 0x28, 0x49, - 0xa8, 0x4a, 0xce, 0x69, 0xd1, 0xc6, 0x25, 0x26, 0xf2, 0x5c, 0x4d, 0x0b, - 0xa0, 0x2b, 0xbe, 0xec, 0xb2, 0x09, 0x30, 0x8b, 0xd8, 0xb4, 0x09, 0x68, - 0x01, 0x82, 0x00, 0x9d, 0x65, 0x54, 0x19, 0xf0, 0x4f, 0xd1, 0x4d, 0xe9, - 0x60, 0xcf, 0x8c, 0xab, 0xd3, 0xb6, 0x06, 0xa4, 0x78, 0xea, 0xf1, 0xd0, - 0xba, 0x9f, 0x53, 0x89, 0x9b, 0xdf, 0xc9, 0xe4, 0xf5, 0x7b, 0x98, 0x5f, - 0x41, 0x59, 0x0c, 0x78, 0x71, 0x6b, 0xf9, 0xa8, 0xf1, 0x82, 0x1b, 0xf6, - 0xb1, 0x92, 0xa8, 0xd9, 0xbf, 0x65, 0xe7, 0xf0, 0x3a, 0x05, 0xe1, 0xba, - 0x03, 0xb6, 0xc6, 0x52, 0x0f, 0xb2, 0x6c, 0x5d, 0x70, 0x01, 0x1b, 0x30, - 0x3e, 0x65, 0x28, 0xbd, 0x90, 0xa5, 0x2d, 0x6c, 0xdf, 0xac, 0xe7, 0xa0, - 0xe2, 0x3a, 0xe6, 0x3a, 0xe9, 0xe6, 0x21, 0x5f, 0x27, 0xe4, 0x53, 0x4b, - 0xa2, 0x88, 0x7b, 0x66, 0x42, 0x77, 0x5b, 0x25, 0xe0, 0x76, 0x27, 0xbd, - 0x5b, 0x13, 0x7b, 0x7e, 0x81, 0x92, 0x74, 0xcf, 0xcd, 0x4a, 0xf6, 0x6d, - 0x61, 0xcd, 0x99, 0x4c, 0x54, 0x91, 0x48, 0x6f, 0xb6, 0xf3, 0xb7, 0xde, - 0xf3, 0x75, 0xe9, 0xd6, 0xbb, 0x43, 0x0c, 0xaf, 0x31, 0x76, 0x7f, 0x3c, - 0x87, 0x6e, 0xf8, 0xbe, 0x04, 0x99, 0xf5, 0x00, 0x15, 0x76, 0xc2, 0x0e, - 0x65, 0xfd, 0xe5, 0x26, 0x2d, 0x41, 0x36, 0xca, 0x2d, 0x17, 0xc0, 0x27, - 0xdf, 0xdd, 0xcc, 0xaa, 0x04, 0x96, 0x62, 0x50, 0x43, 0xce, 0x49, 0x86, - 0xb5, 0xf7, 0xd9, 0x11, 0xaf, 0x2c, 0xe5, 0x7c, 0xc8, 0x01, 0x6b, 0xb9, - 0xfe, 0x0c, 0x19, 0x47, 0x3f, 0xac, 0x56, 0x69, 0xb0, 0xb8, 0xd5, 0x5f, - 0x6b, 0xd8, 0xc7, 0x85, 0xd9, 0xe1, 0xc2, 0x85, 0xf8, 0x90, 0xd6, 0xa7, - 0xc9, 0x18, 0xe3, 0x48, 0x8b, 0xc8, 0x61, 0xb5, 0x60, 0x0c, 0x6b, 0x94, - 0xce, 0x0b, 0x00, 0x5e, 0xaf, 0x01, 0xde, 0xfd, 0x68, 0x25, 0x01, 0xef, - 0x4f, 0xa5, 0xe4, 0xeb, 0x96, 0xba, 0x58, 0x50, 0x0b, 0xb1, 0xd1, 0xfa, - 0x2e, 0x3d, 0xc3, 0x5a, 0xc7, 0x68, 0x73, 0x78, 0x36, 0x9b, 0x0b, 0x86, - 0xcf, 0x0b, 0x34, 0x19, 0x35, 0x53, 0x23, 0x12, 0xd7, 0x21, 0xaa, 0xe3, - 0xc0, 0x0b, 0xec, 0xe1, 0xbc, 0x26, 0x0d, 0x70, 0xf6, 0xd0, 0x68, 0xf2, - 0x94, 0x79, 0x37, 0x0a, 0x2e, 0x98, 0xb3, 0x09, 0x97, 0x0f, 0xa3, 0x8e, - 0x40, 0xeb, 0x61, 0xa4, 0x06, 0x19, 0x7f, 0x0a, 0x04, 0x9a, 0x29, 0x9f, - 0xfa, 0xe4, 0x2c, 0x0b, 0xc6, 0xc0, 0xfa, 0x1d, 0xa0, 0x24, 0x7c, 0x58, - 0x8e, 0xce, 0x08, 0x82, 0x14, 0x4c, 0xf0, 0x78, 0x0d, 0x31, 0xdc, 0x97 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0.inc deleted file mode 100644 index 0feea00c7f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0.inc +++ /dev/null @@ -1,58 +0,0 @@ - /*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - /*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : groupA - * Issuer : iKGF - * Signer : member0 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : SigRl of group - */ - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, 0x5f, 0x20, 0xbd, 0x9e, - 0x49, 0x11, 0x31, 0xe0, 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, 0x64, 0x60, 0xa4, 0xf8, - 0x17, 0x81, 0xc3, 0x0a, 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, 0x72, 0xdc, 0xe6, 0x78, - 0xe3, 0x70, 0xa8, 0x28, 0x1f, 0x63, 0x25, 0xf1, 0xb0, 0x2f, 0x03, 0x92, - 0xc7, 0x15, 0x23, 0x27, 0xd7, 0xb3, 0x16, 0x3f, 0x91, 0x29, 0xa1, 0x72, - 0x1d, 0xb7, 0x74, 0x34, 0xc2, 0xe4, 0x8d, 0x71, 0x4f, 0x43, 0xcd, 0x48, - 0x73, 0x72, 0xaa, 0x7d, 0x58, 0x7a, 0x91, 0x17, 0x42, 0x56, 0x5c, 0xe1, - 0x50, 0x6b, 0x13, 0x39, 0x7a, 0x54, 0x7b, 0x0c, 0xa4, 0xe4, 0xaa, 0xc0, - 0x98, 0x20, 0xb8, 0x29, 0xb3, 0x2f, 0x9b, 0x40, 0xff, 0x48, 0x6b, 0xa5, - 0x8e, 0xdb, 0xe4, 0x31, 0xc8, 0xd2, 0xe7, 0x2a, 0x95, 0xdf, 0x72, 0x86, - 0x79, 0x80, 0x91, 0x1b, 0x73, 0x26, 0x81, 0x3f, 0x06, 0x28, 0x92, 0x46, - 0x4c, 0xa1, 0x41, 0x38, 0xc5, 0x12, 0xe7, 0x51, 0x42, 0x49, 0xe8, 0x41, - 0x28, 0xb4, 0xd1, 0x42, 0xf4, 0xc4, 0x38, 0x13, 0x64, 0x58, 0x13, 0x05, - 0x65, 0xdd, 0x85, 0x76, 0x5a, 0x25, 0xe9, 0x46, 0xfc, 0x19, 0x64, 0x78, - 0xc2, 0xe6, 0x57, 0xba, 0x6b, 0x77, 0xf6, 0x64, 0xea, 0x27, 0x27, 0x9c, - 0x8c, 0x05, 0xc2, 0xb9, 0x23, 0x83, 0xd4, 0xa6, 0x3f, 0x3e, 0x57, 0x43, - 0x8a, 0xa2, 0x2f, 0x9b, 0x2c, 0x82, 0x4c, 0x9c, 0xd0, 0x8a, 0xfa, 0x4b, - 0xf3, 0x49, 0x5e, 0x84, 0x53, 0x69, 0x92, 0xbc, 0xb1, 0xfd, 0xd2, 0x88, - 0x46, 0x71, 0x16, 0x71, 0xe0, 0x97, 0x81, 0x36, 0x70, 0xc5, 0x0f, 0xd6, - 0x00, 0x64, 0x53, 0x81, 0xe7, 0x56, 0xc4, 0x56, 0xf7, 0xeb, 0x84, 0x72, - 0xb0, 0xd8, 0x52, 0x61, 0x9c, 0xfb, 0xc9, 0x4f, 0x90, 0x94, 0xf8, 0x6a, - 0x90, 0xf4, 0x0a, 0xaa, 0x54, 0xf5, 0xb4, 0xd6, 0xde, 0xfb, 0xa7, 0x5c, - 0xf7, 0xe6, 0xb7, 0x55, 0xa1, 0x07, 0x19, 0x3c, 0x32, 0xfb, 0x09, 0xa0, - 0x54, 0x20, 0xba, 0x73, 0x2a, 0xed, 0xea, 0x91, 0xc6, 0x62, 0x64, 0x48, - 0x6c, 0x91, 0x4b, 0x0e, 0xd1, 0x1e, 0x20, 0x4c, 0x4b, 0x13, 0x9f, 0xe1, - 0x9f, 0x0a, 0x84, 0x41, 0x4b, 0x29, 0xb8, 0x90, 0x46, 0x09, 0x00, 0xde, - 0x48, 0xd2, 0xb9, 0x8a, 0x6f, 0x61, 0xd3, 0x1e, 0xc4, 0x7b, 0x59, 0x16, - 0xa6, 0xc4, 0x4a, 0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_empty_sigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_empty_sigrl.inc deleted file mode 100644 index e48b648d59..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_empty_sigrl.inc +++ /dev/null @@ -1,58 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - /*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: groupA - * Issuer : iKGF - * Signer: member0 - * HashAlg: Sha256 - * Message: "msg0" - * Basename: "bsn0" - * SigRl: Empty SigRl of group - */ - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, 0x5f, 0x20, 0xbd, 0x9e, - 0x49, 0x11, 0x31, 0xe0, 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, 0x64, 0x60, 0xa4, 0xf8, - 0x17, 0x81, 0xc3, 0x0a, 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, 0x72, 0xdc, 0xe6, 0x78, - 0xe3, 0x70, 0xa8, 0x28, 0x1f, 0x63, 0x25, 0xf1, 0xb0, 0x2f, 0x03, 0x92, - 0xc7, 0x15, 0x23, 0x27, 0xd7, 0xb3, 0x16, 0x3f, 0x91, 0x29, 0xa1, 0x72, - 0x1d, 0xb7, 0x74, 0x34, 0xc2, 0xe4, 0x8d, 0x71, 0x4f, 0x43, 0xcd, 0x48, - 0x73, 0x72, 0xaa, 0x7d, 0x58, 0x7a, 0x91, 0x17, 0x42, 0x56, 0x5c, 0xe1, - 0x50, 0x6b, 0x13, 0x39, 0x7a, 0x54, 0x7b, 0x0c, 0xa4, 0xe4, 0xaa, 0xc0, - 0x98, 0x20, 0xb8, 0x29, 0xb3, 0x2f, 0x9b, 0x40, 0x95, 0x66, 0x30, 0x8d, - 0xd8, 0x4c, 0xfc, 0xd5, 0xb4, 0x51, 0xcf, 0x6f, 0xd1, 0x25, 0xf0, 0xe4, - 0x2f, 0xe1, 0x2f, 0x85, 0x7d, 0x84, 0x10, 0x35, 0xe0, 0x29, 0xa9, 0x0f, - 0xc2, 0x92, 0x93, 0x40, 0x67, 0xc1, 0x34, 0x23, 0xb8, 0xe0, 0xf6, 0x5e, - 0x68, 0xde, 0xe7, 0x50, 0xed, 0x2d, 0xfc, 0xe1, 0x45, 0x27, 0x19, 0x66, - 0xf3, 0xe7, 0xb9, 0x2e, 0x3d, 0xc7, 0xfa, 0xa9, 0xd9, 0x7c, 0x51, 0xc0, - 0x80, 0x9e, 0x3d, 0x64, 0x73, 0x37, 0xa0, 0x14, 0x3e, 0xa6, 0x8c, 0xfa, - 0xec, 0x11, 0x64, 0x7e, 0x4f, 0xcf, 0x04, 0x5d, 0x5e, 0x30, 0xaa, 0x23, - 0xd6, 0xcf, 0x5e, 0xc5, 0x78, 0x26, 0x28, 0x24, 0x21, 0xcf, 0xdb, 0x6c, - 0x4a, 0x58, 0x82, 0x44, 0x6e, 0xda, 0xed, 0x24, 0xe3, 0x2a, 0x80, 0xa7, - 0x28, 0x69, 0x93, 0x3b, 0x71, 0xe1, 0x8c, 0x77, 0x3c, 0x90, 0x5b, 0x96, - 0x17, 0x95, 0x3e, 0x5f, 0xf0, 0xda, 0xab, 0x1c, 0xc0, 0x04, 0x6f, 0x29, - 0x13, 0xe7, 0x89, 0x51, 0x20, 0xc8, 0xeb, 0x90, 0xee, 0x8f, 0x84, 0x1e, - 0xd7, 0x9c, 0x1e, 0x15, 0x3d, 0x50, 0x11, 0x91, 0x29, 0x58, 0xde, 0xa6, - 0x6a, 0x35, 0x08, 0xc1, 0x17, 0x85, 0x67, 0xa8, 0xe2, 0x0a, 0x13, 0xb2, - 0x8e, 0x64, 0xd6, 0xb6, 0xdb, 0x5d, 0xfe, 0xcd, 0x09, 0x37, 0x68, 0xea, - 0x4c, 0x9e, 0x16, 0x29, 0x80, 0x9d, 0x32, 0x5a, 0xd3, 0x7a, 0x26, 0xf2, - 0x5e, 0x49, 0x64, 0xb9, 0xd2, 0x71, 0x1f, 0x68, 0xab, 0xdf, 0x62, 0xa7, - 0x3c, 0xf7, 0xdd, 0x54, 0x8f, 0xa7, 0x14, 0xa5, 0x99, 0xce, 0xc8, 0x93, - 0xa2, 0xf9, 0xd8, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_nosigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_nosigrl.inc deleted file mode 100644 index c0c37bc251..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_nosigrl.inc +++ /dev/null @@ -1,58 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - /*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: groupA - * Issuer : iKGF - * Signer: member0 - * HashAlg: Sha256 - * Message: "msg0" - * Basename: "bsn0" - * SigRl: no SigRl - */ - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, 0x5f, 0x20, 0xbd, 0x9e, - 0x49, 0x11, 0x31, 0xe0, 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, 0x64, 0x60, 0xa4, 0xf8, - 0x17, 0x81, 0xc3, 0x0a, 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, 0x72, 0xdc, 0xe6, 0x78, - 0xe3, 0x70, 0xa8, 0x28, 0x1f, 0x63, 0x25, 0xf1, 0xb0, 0x2f, 0x03, 0x92, - 0xc7, 0x15, 0x23, 0x27, 0xd7, 0xb3, 0x16, 0x3f, 0x91, 0x29, 0xa1, 0x72, - 0x1d, 0xb7, 0x74, 0x34, 0xc2, 0xe4, 0x8d, 0x71, 0x4f, 0x43, 0xcd, 0x48, - 0x73, 0x72, 0xaa, 0x7d, 0x58, 0x7a, 0x91, 0x17, 0x42, 0x56, 0x5c, 0xe1, - 0x50, 0x6b, 0x13, 0x39, 0x7a, 0x54, 0x7b, 0x0c, 0xa4, 0xe4, 0xaa, 0xc0, - 0x98, 0x20, 0xb8, 0x29, 0xb3, 0x2f, 0x9b, 0x40, 0xc8, 0x62, 0x1b, 0x96, - 0xe6, 0xfb, 0x4f, 0x62, 0xcb, 0xbd, 0x35, 0xae, 0xa6, 0x2f, 0x5f, 0x8c, - 0x3a, 0x49, 0x52, 0x6c, 0x35, 0xfa, 0x00, 0xf8, 0x7d, 0x30, 0xbb, 0x9a, - 0x62, 0x7e, 0xfa, 0x0a, 0xcf, 0x57, 0xce, 0x2a, 0x17, 0x41, 0x10, 0x89, - 0x89, 0x8f, 0x65, 0x31, 0x69, 0xaf, 0x0b, 0x96, 0xd2, 0x19, 0x78, 0x5f, - 0x7a, 0x32, 0x0c, 0x13, 0x58, 0xde, 0x00, 0x32, 0x0a, 0xd6, 0xc5, 0x22, - 0x14, 0xbf, 0x63, 0xa0, 0x21, 0x94, 0x65, 0x04, 0x4e, 0x7e, 0x75, 0xdd, - 0xd0, 0x9f, 0xeb, 0x01, 0xe6, 0xdc, 0x1f, 0x88, 0x34, 0xc9, 0xc1, 0xef, - 0xea, 0xc9, 0xe1, 0x55, 0x89, 0x8d, 0x20, 0xc2, 0x46, 0xc9, 0x67, 0xd8, - 0x97, 0x2e, 0x84, 0x63, 0x2e, 0x38, 0x76, 0xaa, 0xcf, 0x02, 0xcb, 0x17, - 0xbc, 0xfa, 0xf8, 0x80, 0xb1, 0x16, 0x1f, 0x05, 0x1c, 0xa7, 0x92, 0x6b, - 0xe9, 0x1a, 0xf0, 0x7e, 0x33, 0x24, 0x22, 0xde, 0x8c, 0xb0, 0xa6, 0xb1, - 0x74, 0x65, 0x83, 0x44, 0x55, 0xe0, 0xc7, 0xa5, 0x1a, 0x76, 0xba, 0x04, - 0x66, 0xca, 0x12, 0xf5, 0x9d, 0x52, 0x8a, 0xeb, 0x52, 0xaf, 0xed, 0xeb, - 0x28, 0xbd, 0x27, 0xd2, 0x72, 0xa4, 0xe5, 0x3f, 0x47, 0x82, 0x04, 0x91, - 0x10, 0xfc, 0xc2, 0xfc, 0x07, 0x56, 0x77, 0x99, 0x4e, 0xf5, 0xb4, 0xc6, - 0x5a, 0x0c, 0x86, 0xd4, 0x4c, 0xc3, 0xd2, 0x2f, 0x6d, 0x30, 0x3e, 0xff, - 0xd7, 0xfe, 0x90, 0x8a, 0x12, 0xb9, 0x77, 0x29, 0x16, 0x39, 0xe1, 0xe4, - 0x9b, 0xeb, 0xcc, 0x1c, 0xac, 0x8e, 0x64, 0x59, 0xfb, 0x1f, 0xd6, 0x5c, - 0xde, 0x2b, 0xd9, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_revkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_revkey.inc deleted file mode 100644 index c3f1160bcb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_revkey.inc +++ /dev/null @@ -1,61 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - /*! - * \file - * \brief Test data for revoked privrl. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : groupA - * Issuer : iKGF - * Signer : privrevokedmember0 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : SigRl of group - */ - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, 0x5f, 0x20, 0xbd, 0x9e, - 0x49, 0x11, 0x31, 0xe0, 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, 0x64, 0x60, 0xa4, 0xf8, - 0x17, 0x81, 0xc3, 0x0a, 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, 0x72, 0xdc, 0xe6, 0x78, - 0xe3, 0x70, 0xa8, 0x28, 0xc8, 0x0b, 0x3e, 0xdf, 0xfc, 0xde, 0x52, 0xee, - 0xf7, 0xe7, 0xe7, 0x01, 0x85, 0xda, 0xef, 0x3f, 0xdb, 0x54, 0x46, 0x8f, - 0xdf, 0x78, 0x57, 0x38, 0x5a, 0x7c, 0x96, 0xcd, 0x44, 0x04, 0x95, 0x97, - 0xc8, 0x6c, 0xc7, 0x58, 0x5f, 0xbb, 0x9a, 0xcf, 0xb1, 0x78, 0xae, 0xef, - 0x65, 0xd6, 0xe0, 0xdb, 0x4f, 0xd5, 0x66, 0x93, 0x7c, 0xe6, 0x02, 0x2a, - 0x28, 0x45, 0x6f, 0x40, 0x8f, 0xe2, 0x5b, 0x29, 0x8b, 0x54, 0x37, 0xe9, - 0xee, 0xc8, 0x3e, 0x57, 0x3f, 0xd8, 0x80, 0xb2, 0x95, 0x97, 0xa2, 0x13, - 0x21, 0xf4, 0x5c, 0xbd, 0x44, 0xd3, 0x3e, 0x43, 0xb9, 0x23, 0xe9, 0xdd, - 0xd5, 0x9b, 0x88, 0xd3, 0xda, 0x1e, 0x17, 0x00, 0x1b, 0x00, 0x6e, 0x52, - 0xde, 0xb2, 0xa5, 0xbd, 0x9b, 0x32, 0xee, 0x9b, 0x9e, 0x75, 0x14, 0xe8, - 0x0e, 0xcb, 0xfc, 0x38, 0x44, 0x99, 0x08, 0x66, 0xc6, 0x66, 0xe0, 0x4f, - 0xf2, 0xac, 0x26, 0x16, 0x6f, 0x4a, 0xd9, 0x49, 0xad, 0x1e, 0x59, 0x6c, - 0xd3, 0x50, 0x3c, 0xb4, 0x55, 0xe4, 0xa3, 0x5f, 0xfb, 0x5b, 0xc5, 0xcd, - 0x7f, 0xc1, 0x2d, 0x17, 0xad, 0xde, 0x6e, 0x76, 0x3a, 0x87, 0x40, 0xc4, - 0xb9, 0xd9, 0xef, 0x13, 0x2f, 0x70, 0x77, 0x0d, 0xff, 0xf0, 0x1a, 0x08, - 0x36, 0xd3, 0xb9, 0xec, 0x13, 0x93, 0x96, 0x7a, 0x8f, 0x3a, 0x07, 0xe2, - 0xaa, 0x51, 0x89, 0x75, 0xa9, 0x6a, 0xe0, 0xef, 0x35, 0xf7, 0x59, 0xa4, - 0x08, 0xf0, 0xf8, 0x0b, 0x83, 0xda, 0xfd, 0x15, 0xb7, 0x9b, 0xb6, 0x70, - 0x61, 0xe9, 0xd1, 0x67, 0xae, 0x33, 0x65, 0x92, 0x3a, 0x1e, 0x6a, 0x9f, - 0x76, 0xa4, 0x7a, 0xf2, 0xe9, 0xd9, 0x79, 0x19, 0x88, 0xb4, 0x98, 0x20, - 0xbb, 0x75, 0x02, 0x3c, 0xc7, 0x28, 0x7b, 0x9d, 0xde, 0xf1, 0xac, 0x04, - 0xef, 0x64, 0xe4, 0xf9, 0xc0, 0x6d, 0x9e, 0xbc, 0x2e, 0x5c, 0x0b, 0x2a, - 0x80, 0x03, 0xb7, 0xdf, 0x22, 0xcf, 0xe0, 0x7d, 0x7f, 0xc9, 0x08, 0x61, - 0x87, 0xea, 0x28, 0xf4, 0xec, 0xd2, 0x07, 0x9b, 0x47, 0x39, 0x34, 0x0e, - 0xda, 0x29, 0x8a, 0xae, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - - - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_rndbase_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_rndbase_msg0.inc deleted file mode 100644 index d8a19f2438..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_rndbase_msg0.inc +++ /dev/null @@ -1,98 +0,0 @@ - /*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : groupA - * Signer : member0 - * Issuer : iKGF - * HashAlg : Sha256 - * Message : "msg0" - * Basename: None (random base) - * SigRl : SigRl of group - */ - 0xa9, 0x4b, 0x40, 0x3c, 0xdb, 0x6b, 0x14, 0xec, 0x93, 0x51, 0x6e, 0x2a, - 0x44, 0x81, 0xa5, 0x92, 0x96, 0x03, 0x2c, 0x77, 0x20, 0x41, 0xad, 0x10, - 0xce, 0xe1, 0xe9, 0xab, 0xcb, 0x3f, 0x6b, 0xbe, 0x65, 0xa1, 0xe6, 0xa9, - 0x27, 0xbb, 0x2d, 0x44, 0x63, 0xf2, 0xf9, 0x81, 0xf3, 0x19, 0x57, 0x4d, - 0xb8, 0xd0, 0x47, 0xd2, 0xaf, 0x4c, 0xa9, 0x64, 0xfd, 0xfc, 0xc4, 0x48, - 0x13, 0x61, 0xd2, 0xfe, 0x60, 0x50, 0xdd, 0xe4, 0x96, 0xfc, 0x39, 0x57, - 0x5f, 0xbd, 0xa5, 0x18, 0x21, 0x5a, 0x12, 0x42, 0x03, 0xdd, 0xb3, 0xb3, - 0xc5, 0xc4, 0x1b, 0x9a, 0xb8, 0x31, 0x4f, 0xd2, 0x3d, 0x71, 0x6f, 0x46, - 0x8d, 0x2a, 0x85, 0x12, 0x0d, 0x88, 0xeb, 0xee, 0x27, 0xa6, 0xd5, 0x75, - 0x82, 0x09, 0x66, 0xf5, 0xab, 0x9e, 0x92, 0xeb, 0x58, 0xce, 0x8b, 0x5c, - 0x67, 0x75, 0x0e, 0x5f, 0xd2, 0x22, 0xcb, 0x92, 0x2f, 0x8a, 0xc5, 0x4a, - 0x2d, 0x9b, 0x6f, 0x9a, 0x39, 0x91, 0x9a, 0xc2, 0x9b, 0x89, 0x91, 0x6b, - 0xdd, 0x5c, 0xc9, 0x66, 0xcb, 0xf7, 0x58, 0xa8, 0x2b, 0x6d, 0xb8, 0x2b, - 0xe0, 0x39, 0xec, 0x95, 0x0e, 0x4c, 0x3b, 0x74, 0x39, 0x34, 0x1b, 0xd8, - 0x8c, 0xe7, 0xf5, 0x3b, 0xdb, 0xba, 0xd2, 0xc7, 0xee, 0x65, 0x90, 0xcf, - 0xcb, 0x65, 0x52, 0x3b, 0x2a, 0xc4, 0x05, 0x5a, 0x72, 0xd2, 0xbb, 0xdd, - 0x8e, 0x3b, 0x2a, 0x02, 0xec, 0xec, 0x36, 0x37, 0xb5, 0x44, 0x1a, 0x9a, - 0xee, 0x8b, 0x49, 0x37, 0xc6, 0x4a, 0x7e, 0x7e, 0xa1, 0x8c, 0x57, 0x3f, - 0x8b, 0xec, 0xd5, 0x29, 0xee, 0x2a, 0xf9, 0x95, 0x52, 0xe1, 0xde, 0x8a, - 0xd5, 0xcd, 0xfe, 0x68, 0x4b, 0xe8, 0x4f, 0xd4, 0x4f, 0x02, 0xdd, 0x0f, - 0xe1, 0x22, 0xe7, 0x95, 0xfb, 0xc4, 0x7c, 0x8a, 0xa6, 0x82, 0x72, 0xd2, - 0x43, 0x88, 0x9e, 0x67, 0xd9, 0xa5, 0x04, 0x2a, 0x71, 0x24, 0x02, 0x52, - 0x6c, 0x67, 0x6c, 0xa3, 0xfd, 0x47, 0xf2, 0xcc, 0x0c, 0xbd, 0x81, 0x2b, - 0x16, 0x84, 0x90, 0x35, 0x44, 0xcf, 0x75, 0xf5, 0xc1, 0xd7, 0x63, 0x89, - 0x65, 0x2f, 0xec, 0x61, 0xa2, 0xad, 0x10, 0x77, 0x95, 0xb8, 0x21, 0xf2, - 0x7c, 0x36, 0x56, 0x24, 0x99, 0xf0, 0x27, 0x11, 0x02, 0x03, 0x31, 0x32, - 0xee, 0x86, 0x71, 0x06, 0xd3, 0xfd, 0xe7, 0xc7, 0x6d, 0x30, 0xbe, 0x39, - 0x07, 0xa5, 0xd0, 0x2d, 0xb3, 0x00, 0x1c, 0x8c, 0x4e, 0x74, 0xdc, 0x07, - 0xd3, 0x60, 0x95, 0xc1, 0x2c, 0xaa, 0x93, 0x67, 0xb3, 0x8d, 0x42, 0x2e, - 0x6d, 0x22, 0x50, 0x1e, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0xe7, 0x2a, 0x73, 0x9d, 0xc0, 0x60, 0x48, 0xed, 0xf1, 0xef, 0x0a, 0x93, - 0xf7, 0x12, 0x70, 0x39, 0xb5, 0x54, 0x5b, 0xc9, 0x8d, 0xc5, 0x6a, 0x48, - 0xd3, 0xc1, 0xe9, 0xef, 0x77, 0x7b, 0x16, 0x3d, 0x54, 0x35, 0xca, 0xbb, - 0xa0, 0x71, 0x69, 0x69, 0xfc, 0x81, 0x5c, 0x29, 0x7d, 0x55, 0x7c, 0x99, - 0x2a, 0xfc, 0xd6, 0x08, 0xed, 0xdd, 0xe0, 0x35, 0x29, 0x7d, 0xe6, 0xb5, - 0x45, 0x60, 0xb7, 0x34, 0x7b, 0xeb, 0x1a, 0xb7, 0x03, 0x41, 0xdd, 0x89, - 0xaa, 0x4d, 0xdf, 0x34, 0x1e, 0xc1, 0xb8, 0xd4, 0x26, 0xc9, 0xdb, 0x38, - 0x78, 0x1c, 0x20, 0x88, 0x78, 0x4a, 0x0e, 0xe5, 0x65, 0x20, 0x54, 0xab, - 0xc9, 0x61, 0x85, 0x02, 0x24, 0x36, 0x79, 0xbe, 0xea, 0xc7, 0x6b, 0x6e, - 0x2f, 0x3c, 0xea, 0x78, 0x38, 0x89, 0xb6, 0x88, 0x07, 0xdd, 0xb1, 0x2f, - 0xda, 0x20, 0x48, 0x91, 0x34, 0x05, 0x0e, 0x70, 0xe7, 0x96, 0x67, 0x40, - 0xa4, 0xda, 0xa0, 0xfb, 0x88, 0x2d, 0x8b, 0x49, 0x40, 0xa6, 0x42, 0x81, - 0xf6, 0x2e, 0x23, 0xe8, 0x10, 0x03, 0x46, 0x0e, 0x77, 0x4a, 0x53, 0xab, - 0xdc, 0xd2, 0x39, 0x9c, 0x27, 0xd8, 0x61, 0x7c, 0x58, 0x1f, 0xf1, 0x31, - 0xd7, 0x0c, 0x38, 0xa7, 0xd3, 0x23, 0x5b, 0x22, 0xb8, 0x25, 0xb9, 0x43, - 0x78, 0xe6, 0xd8, 0xcc, 0x00, 0x8e, 0xf1, 0x4f, 0xbd, 0x84, 0x8d, 0x09, - 0x27, 0x45, 0xbd, 0x4c, 0xb9, 0x3e, 0x6d, 0x65, 0xeb, 0xed, 0xfd, 0xc5, - 0x3e, 0x28, 0x89, 0x2b, 0x76, 0xc4, 0x56, 0xcf, 0xbb, 0x9e, 0xec, 0xd2, - 0x21, 0x41, 0xcf, 0x44, 0x6c, 0x86, 0xb0, 0x46, 0x46, 0xef, 0xa0, 0x24, - 0x64, 0xf6, 0xb8, 0xbc, 0x66, 0xf0, 0x26, 0x0d, 0x80, 0x25, 0xb0, 0xa4, - 0x9f, 0x5b, 0xb9, 0x82, 0x40, 0xea, 0xde, 0xb5, 0x84, 0x1a, 0x77, 0xd0, - 0xa5, 0x24, 0xc5, 0xae, 0x5c, 0xe7, 0x2a, 0xbf, 0x1d, 0x9c, 0x76, 0x4c, - 0xcd, 0xf1, 0x68, 0xa8, 0xa6, 0x30, 0xb5, 0xbb, 0x99, 0x8c, 0x23, 0x94, - 0xd3, 0x1d, 0xa1, 0x90, 0xee, 0x6e, 0xba, 0xd6, 0xc0, 0xa5, 0x0a, 0x84, - 0xfd, 0xc5, 0x4e, 0x81, 0xb4, 0x33, 0x22, 0x3b, 0xf3, 0x51, 0xb3, 0x18, - 0x06, 0x5d, 0x2d, 0xf0, 0xfd, 0x9b, 0x34, 0xbc, 0x30, 0x02, 0x7f, 0xcb, - 0x24, 0x38, 0xeb, 0x7c, 0xeb, 0x55, 0x46, 0x9b, 0x0f, 0xfb, 0x1e, 0x7a, - 0xfd, 0xe2, 0xe3, 0x7a, 0x46, 0x45, 0x8f, 0xe2, 0x78, 0x88, 0xfa, 0xa8, - 0x8f, 0x4e, 0x85, 0x14, 0xfa, 0x3e, 0x4c, 0x67, 0xe2, 0x76, 0x9e, 0x82, - 0xe4, 0x70, 0x7e, 0x69, 0x48, 0xec, 0xdb, 0x0b, 0xd0, 0xc2, 0x3c, 0xc6, - 0xce, 0x51, 0x7d, 0x0f, 0x5d, 0xb7, 0x2f, 0x31, 0xd7, 0x69, 0x8a, 0x74, - 0xd6, 0x81, 0x89, 0xb3, 0x7a, 0x16, 0xd7, 0xf4, 0xb3, 0x74, 0x41, 0x40, - 0xf7, 0x39, 0xf5, 0x66, 0x94, 0xa6, 0xf5, 0x7b, 0x8f, 0xf7, 0x2e, 0x66, - 0x47, 0x5f, 0x2d, 0x1e, 0x52, 0xc7, 0x93, 0xd6, 0xed, 0xa8, 0x06, 0x8e, - 0x73, 0x2e, 0xce, 0x21, 0xf4, 0xe6, 0xa3, 0x89, 0x26, 0xa4, 0x07, 0x49, - 0x58, 0x6c, 0x22, 0xef, 0xa1, 0x18, 0xe8, 0x1d, 0x4b, 0x4a, 0x26, 0xdd, - 0xa0, 0x09, 0xe3, 0xfd, 0x64, 0x99, 0xff, 0x88, 0xf9, 0xb6, 0xe6, 0xfb, - 0x7b, 0x66, 0x0a, 0x82, 0x3b, 0xa1, 0x31, 0xab, 0x31, 0x75, 0xe8, 0xc0, - 0xb9, 0xf2, 0x0d, 0xa3, 0x78, 0xf8, 0x02, 0x0b, 0xe4, 0x3c, 0x20, 0xdc, - 0x4c, 0x6e, 0x2b, 0xa8, 0xd5, 0x81, 0x33, 0x1f, 0x51, 0xf9, 0x25, 0x7f diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sigrevoked_sha256_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sigrevoked_sha256_bsn0_msg0.inc deleted file mode 100644 index a65e1c38e5..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_sigrevoked_sha256_bsn0_msg0.inc +++ /dev/null @@ -1,98 +0,0 @@ - /*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : groupA - * Issuer : iKGF - * Signer : member0 revoked in SigRl - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : SigRl of group - */ - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, 0x5f, 0x20, 0xbd, 0x9e, - 0x49, 0x11, 0x31, 0xe0, 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, 0x64, 0x60, 0xa4, 0xf8, - 0x17, 0x81, 0xc3, 0x0a, 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, 0x72, 0xdc, 0xe6, 0x78, - 0xe3, 0x70, 0xa8, 0x28, 0x62, 0x54, 0xa2, 0xdf, 0x64, 0x8d, 0xe9, 0x24, - 0xd5, 0x67, 0x49, 0xf0, 0x0f, 0x23, 0x35, 0xbd, 0xfd, 0x1e, 0xa2, 0x80, - 0x47, 0x26, 0x41, 0x00, 0xb9, 0xac, 0x71, 0xde, 0x03, 0x21, 0x79, 0x53, - 0xfc, 0x50, 0x4d, 0x48, 0x1c, 0xda, 0xd5, 0x1d, 0x8b, 0x1d, 0x14, 0xd3, - 0xd0, 0x1e, 0x17, 0x74, 0x85, 0x7a, 0xa7, 0xc8, 0x8e, 0x8f, 0x0a, 0x49, - 0x9c, 0xe6, 0x57, 0x7e, 0xbc, 0xbd, 0xf3, 0xd0, 0x40, 0x1d, 0xd2, 0x66, - 0x68, 0x0f, 0xa8, 0xc4, 0xa0, 0x8b, 0x58, 0x33, 0x9b, 0x8a, 0x09, 0xc5, - 0x72, 0x35, 0x27, 0xa6, 0xb9, 0x83, 0xd0, 0xe3, 0x9e, 0xf4, 0xca, 0x3f, - 0xab, 0x69, 0xcb, 0x5d, 0xca, 0xcc, 0x36, 0x40, 0xbc, 0x80, 0x5b, 0x81, - 0x25, 0xcc, 0x31, 0xe5, 0x7d, 0x3f, 0x1d, 0xe9, 0x1b, 0xc6, 0x64, 0x4a, - 0x00, 0x58, 0xfa, 0xe2, 0x3c, 0x4f, 0x4c, 0xc6, 0xa7, 0x14, 0xa6, 0xf6, - 0x5f, 0xad, 0xf5, 0x7e, 0x5f, 0x78, 0x98, 0x1c, 0xe4, 0xca, 0xfb, 0x9a, - 0x96, 0xdd, 0x53, 0x64, 0x4b, 0x67, 0xd1, 0x1e, 0xd8, 0xf5, 0xc2, 0xdb, - 0x46, 0x21, 0x14, 0xfd, 0xcc, 0x54, 0x35, 0x0a, 0x4a, 0xd6, 0x96, 0xe7, - 0xc6, 0xdc, 0xc2, 0x12, 0x4e, 0x54, 0x81, 0x8c, 0xf6, 0xca, 0xa5, 0xad, - 0xab, 0x07, 0xe0, 0x8b, 0x78, 0x56, 0x99, 0x5e, 0x26, 0x94, 0xd7, 0x6d, - 0x93, 0x9a, 0x0f, 0xab, 0x35, 0xc0, 0xc9, 0x82, 0x54, 0xef, 0xf5, 0xed, - 0x56, 0x26, 0xda, 0x82, 0xb9, 0x8e, 0x26, 0x2b, 0xda, 0x8f, 0xba, 0x81, - 0xba, 0xfe, 0x9d, 0x89, 0x45, 0x02, 0xb0, 0x38, 0x4b, 0x4e, 0x36, 0x4f, - 0xe0, 0xb6, 0xb6, 0x70, 0xad, 0x05, 0xd9, 0xe4, 0xbe, 0xc9, 0xcb, 0x43, - 0x19, 0x54, 0x8d, 0x65, 0xb9, 0x97, 0x85, 0x3a, 0x96, 0xee, 0xaf, 0x92, - 0x49, 0xbb, 0xa5, 0xb5, 0x92, 0xbd, 0x1e, 0xa4, 0x8f, 0xdd, 0xc4, 0x62, - 0xfc, 0xc8, 0x25, 0x11, 0x4a, 0x6f, 0xe6, 0xfa, 0xbc, 0xd5, 0xf5, 0xf6, - 0x79, 0x13, 0xd4, 0x9b, 0x46, 0x1e, 0x97, 0xb3, 0x13, 0xf2, 0x65, 0x7f, - 0xe1, 0xb9, 0x30, 0xa0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_test1_basename1_sha256.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_test1_basename1_sha256.inc deleted file mode 100644 index a7a956b9f0..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sig_test1_basename1_sha256.inc +++ /dev/null @@ -1,59 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type: Intel(R) EPID 2.0 Signature - * Group: groupA - * Issuer : iKGF - * Signer: member0 - * HashAlg: Sha256 - * Message: "test1" - * Basename: "basename1" - * SigRl: Empty - */ - 0xa6, 0x13, 0x29, 0xb6, 0x61, 0xa2, 0xb8, 0xd7, 0x49, 0x86, 0xcb, 0xaf, - 0x94, 0x4d, 0x9e, 0x51, 0xcf, 0xd3, 0x5d, 0x0f, 0x33, 0x9a, 0x59, 0x0d, - 0xe7, 0xc9, 0xb9, 0x7f, 0x83, 0xae, 0x27, 0xe6, 0x40, 0xf0, 0x88, 0x13, - 0xe2, 0xb6, 0x6a, 0x43, 0x26, 0xa3, 0x21, 0xea, 0x00, 0x78, 0xcd, 0xce, - 0x0e, 0x14, 0x7a, 0xde, 0xcf, 0xaa, 0x7b, 0xc5, 0x7e, 0x7c, 0xaf, 0xe4, - 0x5e, 0x8a, 0xdd, 0xc7, 0x2b, 0x4e, 0x81, 0x50, 0xcc, 0xf9, 0xcc, 0x85, - 0xcb, 0x8c, 0xe5, 0x76, 0x26, 0xd2, 0x30, 0x62, 0x12, 0x6b, 0xbc, 0xfb, - 0xf9, 0x91, 0x47, 0x55, 0x54, 0x5c, 0x5b, 0xce, 0x75, 0xaf, 0x69, 0xa3, - 0x26, 0xa6, 0xb7, 0xd5, 0x33, 0xe1, 0xbb, 0xd4, 0x94, 0xca, 0x05, 0xc5, - 0xc3, 0x64, 0xe8, 0xd8, 0x12, 0xa8, 0x5b, 0x0d, 0x12, 0xf6, 0x53, 0xa2, - 0xfa, 0x28, 0x59, 0xc4, 0xc3, 0x6f, 0x6a, 0xd8, 0x7d, 0x77, 0x17, 0x11, - 0xa2, 0xf3, 0x70, 0xa4, 0x85, 0xc8, 0x65, 0xb2, 0x8b, 0x30, 0x1b, 0x75, - 0x2b, 0x96, 0x95, 0xa7, 0xd5, 0x1c, 0x4e, 0xae, 0xc4, 0xdc, 0xa3, 0x48, - 0x84, 0x53, 0xee, 0xaa, 0xc5, 0xe0, 0x26, 0x9e, 0xde, 0x4c, 0x21, 0x78, - 0xea, 0x38, 0xb4, 0x53, 0xce, 0xe4, 0xea, 0x4f, 0x08, 0x08, 0x4f, 0x08, - 0x21, 0xca, 0xfc, 0x01, 0xa4, 0xc9, 0x23, 0xa8, 0x9a, 0x00, 0xe0, 0x14, - 0x8b, 0xec, 0x5f, 0x2e, 0xbb, 0x22, 0x6a, 0x63, 0xda, 0x99, 0xd6, 0xf8, - 0xa1, 0x7d, 0x4c, 0x1a, 0xde, 0x19, 0xa4, 0x52, 0x1b, 0x54, 0xa9, 0x42, - 0x2c, 0xb4, 0x7a, 0x8d, 0xc8, 0xe6, 0x0b, 0x35, 0x70, 0x03, 0x08, 0x88, - 0xfe, 0x0f, 0xab, 0x62, 0x95, 0x35, 0xf4, 0xfc, 0x46, 0x26, 0x99, 0x59, - 0xdf, 0x25, 0x96, 0x0d, 0x10, 0x89, 0xcb, 0x52, 0x95, 0xba, 0xa7, 0xe9, - 0xc4, 0x34, 0xf2, 0xee, 0xbd, 0x02, 0x99, 0x38, 0x8d, 0xef, 0x80, 0xa5, - 0xc3, 0x54, 0xb1, 0x78, 0xf3, 0xf5, 0xc5, 0xf3, 0xf4, 0x08, 0xc6, 0x51, - 0xf1, 0x4d, 0x6d, 0x28, 0x95, 0x02, 0x55, 0xc9, 0x60, 0xba, 0x23, 0x81, - 0x2f, 0xe6, 0xb0, 0x47, 0x23, 0x40, 0x85, 0xf6, 0x11, 0x8f, 0xa3, 0x71, - 0xa2, 0x69, 0x47, 0xc4, 0x79, 0x26, 0x67, 0x84, 0xb1, 0x43, 0xde, 0xe4, - 0xb2, 0xad, 0xb4, 0x71, 0xba, 0xb6, 0xbb, 0xf8, 0xae, 0x77, 0xcd, 0x3f, - 0x40, 0xe9, 0x9c, 0x7c, 0x90, 0xb6, 0x98, 0xac, 0xa8, 0x6f, 0x67, 0x94, - 0xe1, 0x97, 0xc1, 0x38, 0xd5, 0x05, 0xd0, 0x7b, 0x77, 0x8e, 0xc9, 0x17, - 0xb7, 0x21, 0x15, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrevokedmember0/mprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrevokedmember0/mprivkey.inc deleted file mode 100644 index e8059b8d7b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrevokedmember0/mprivkey.inc +++ /dev/null @@ -1,36 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 member private-key - * Group : GroupA - * Member : sigrevokedmember0 - * Issuer : Ikgf - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x39, 0x88, 0x2e, 0xee, 0xbb, 0x26, 0xa6, 0x85, - 0xa0, 0x06, 0x6b, 0xb4, 0x7f, 0x81, 0x2a, 0x02, 0x13, 0xf3, 0x2e, 0xcf, - 0x10, 0xeb, 0xfd, 0xce, 0xa0, 0x39, 0xd2, 0xb7, 0xb3, 0x52, 0xd0, 0x5a, - 0x9b, 0x2d, 0x47, 0xbc, 0x5f, 0x30, 0x57, 0x5b, 0x60, 0xdf, 0xa1, 0x5a, - 0x16, 0xb6, 0xff, 0x5f, 0x55, 0xc5, 0x34, 0xf9, 0x59, 0x55, 0x78, 0xa6, - 0xa6, 0x5d, 0xc6, 0x52, 0x81, 0x41, 0x35, 0x83, 0x56, 0xe0, 0x5e, 0x7b, - 0xaa, 0x17, 0x8d, 0x0d, 0x8f, 0xc5, 0xaf, 0xf7, 0xcc, 0x3a, 0xc1, 0xb8, - 0x96, 0xfd, 0xdc, 0x71, 0x8a, 0x88, 0x5c, 0x13, 0x55, 0x1b, 0x22, 0xbd, - 0x42, 0x0e, 0xc2, 0x49, 0x48, 0x5b, 0xa0, 0x03, 0xea, 0x4b, 0x79, 0x0b, - 0xb5, 0xed, 0x1a, 0x81, 0x6d, 0xb2, 0xe8, 0x41, 0xca, 0x1b, 0xb1, 0xc0, - 0xf7, 0x11, 0x42, 0x3f, 0x24, 0xea, 0x55, 0x02, 0x82, 0x4d, 0x11, 0x48 \ No newline at end of file diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrl.inc deleted file mode 100644 index e0b631f18c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrl.inc +++ /dev/null @@ -1,57 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - /*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 signature based revocation list - * Group : GroupA - * Issuer : iKGF - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x4d, 0xaa, 0xa4, 0xb2, 0x80, 0xa9, 0x7a, 0x51, 0xfd, 0x1a, 0x3c, 0x44, - 0x5b, 0x17, 0x35, 0x3a, 0x88, 0x02, 0xce, 0x92, 0xfa, 0xac, 0x3e, 0x74, - 0x4a, 0xb7, 0x0b, 0xbe, 0xce, 0x77, 0x83, 0x71, 0x3c, 0x2d, 0xfd, 0xf4, - 0x56, 0x5a, 0x8a, 0x22, 0x10, 0x28, 0x8c, 0x2a, 0x73, 0x0f, 0x84, 0x11, - 0xb5, 0x97, 0x15, 0x17, 0x57, 0x04, 0x7d, 0x1c, 0x40, 0xce, 0x7d, 0xa1, - 0xe0, 0x75, 0xaa, 0x19, 0x5b, 0x62, 0xe7, 0x53, 0x26, 0xfc, 0xae, 0x2b, - 0x9d, 0x21, 0x7d, 0x0e, 0xf8, 0xc2, 0x80, 0xc6, 0x64, 0x20, 0xea, 0x04, - 0x32, 0xb8, 0x96, 0xd9, 0x72, 0x56, 0x6c, 0xea, 0xdd, 0xe8, 0x49, 0xa0, - 0xea, 0x5f, 0xbe, 0x0a, 0x8b, 0x2d, 0x17, 0x03, 0xd9, 0xe0, 0x0a, 0x24, - 0xc2, 0xa6, 0xf4, 0x97, 0x7d, 0x0f, 0xfd, 0xee, 0x09, 0x62, 0xba, 0x31, - 0x51, 0x6b, 0x3d, 0x1e, 0x91, 0xe3, 0xbc, 0xd5, 0x4d, 0xaa, 0xa4, 0xb2, - 0x80, 0xa9, 0x7a, 0x51, 0xfd, 0x1a, 0x3c, 0x44, 0x5b, 0x17, 0x35, 0x3a, - 0x88, 0x02, 0xce, 0x92, 0xfa, 0xac, 0x3e, 0x74, 0x4a, 0xb7, 0x0b, 0xbe, - 0xce, 0x77, 0x83, 0x71, 0x3c, 0x2d, 0xfd, 0xf4, 0x56, 0x5a, 0x8a, 0x22, - 0x10, 0x28, 0x8c, 0x2a, 0x73, 0x0f, 0x84, 0x11, 0xb5, 0x97, 0x15, 0x17, - 0x57, 0x04, 0x7d, 0x1c, 0x40, 0xce, 0x7d, 0xa1, 0xe0, 0x75, 0xaa, 0x19, - 0xda, 0x7f, 0x40, 0x65, 0x27, 0x0c, 0x47, 0x39, 0x5e, 0xcb, 0xbc, 0xca, - 0xc6, 0x5b, 0xdc, 0x48, 0xe0, 0x7a, 0x71, 0x54, 0x15, 0x21, 0xea, 0x40, - 0xb8, 0x49, 0x9e, 0x6b, 0x6a, 0xdd, 0x97, 0xc1, 0x77, 0xcf, 0x43, 0x55, - 0x64, 0x97, 0x2d, 0x14, 0x9c, 0x64, 0x22, 0xb2, 0x29, 0xa0, 0xe2, 0x90, - 0x1b, 0x00, 0xb2, 0xcd, 0x58, 0xf7, 0xd3, 0x90, 0x10, 0x1e, 0x0f, 0x61, - 0xad, 0xad, 0x71, 0x93, 0x4d, 0xaa, 0xa4, 0xb2, 0x80, 0xa9, 0x7a, 0x51, - 0xfd, 0x1a, 0x3c, 0x44, 0x5b, 0x17, 0x35, 0x3a, 0x88, 0x02, 0xce, 0x92, - 0xfa, 0xac, 0x3e, 0x74, 0x4a, 0xb7, 0x0b, 0xbe, 0xce, 0x77, 0x83, 0x71, - 0x3c, 0x2d, 0xfd, 0xf4, 0x56, 0x5a, 0x8a, 0x22, 0x10, 0x28, 0x8c, 0x2a, - 0x73, 0x0f, 0x84, 0x11, 0xb5, 0x97, 0x15, 0x17, 0x57, 0x04, 0x7d, 0x1c, - 0x40, 0xce, 0x7d, 0xa1, 0xe0, 0x75, 0xaa, 0x19, 0x3d, 0xa2, 0xbd, 0xc5, - 0x15, 0x67, 0x50, 0x88, 0x02, 0x0a, 0x37, 0xa3, 0x77, 0xef, 0x89, 0xf4, - 0x1b, 0x2a, 0x20, 0x04, 0xc8, 0x2c, 0x3f, 0xb5, 0x82, 0x9d, 0x55, 0xd1, - 0xb1, 0x4b, 0x18, 0x4d, 0xbb, 0x21, 0x5d, 0x09, 0x48, 0x44, 0x2c, 0xd3, - 0x4f, 0xc8, 0x29, 0xcb, 0x2e, 0xf9, 0xbf, 0xc5, 0x34, 0xb2, 0x94, 0x4e, - 0x1b, 0xf0, 0xa6, 0x9c, 0x32, 0x4f, 0x56, 0x0b, 0x68, 0x7b, 0xa9, 0x7b diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrl_empty.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrl_empty.inc deleted file mode 100644 index 54dbb94181..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupa/sigrl_empty.inc +++ /dev/null @@ -1,30 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - /*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 signature based revocation list - * Group : GroupA - * Issuer : iKGF - */ - // GID - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - // RL ver - 0x00, 0x00, 0x00, 0x01, - // n2 - 0x00, 0x00, 0x00, 0x00 diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupb/member0/mprivkey.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupb/member0/mprivkey.inc deleted file mode 100644 index 33408c977c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupb/member0/mprivkey.inc +++ /dev/null @@ -1,36 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 member private-key - * Group : GroupB - * Member : 0 - * Issuer : Ikgf - */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x5e, 0xbe, 0x58, 0xb5, 0xc5, 0xdb, 0xee, 0x60, - 0x7a, 0xdb, 0x17, 0x93, 0xf8, 0x15, 0xb8, 0x0c, 0xec, 0x9b, 0xd0, 0x8c, - 0x0f, 0x5d, 0x71, 0xf8, 0xe6, 0xd3, 0xcf, 0x85, 0x74, 0xe2, 0xc1, 0xa3, - 0x89, 0x74, 0xb2, 0xcd, 0x77, 0x9a, 0x25, 0xad, 0x6f, 0x85, 0xe2, 0x26, - 0x89, 0xa1, 0xc7, 0xef, 0x70, 0x5e, 0x5c, 0xb4, 0xde, 0x3c, 0x3b, 0xbf, - 0x27, 0x8c, 0x6f, 0x25, 0x24, 0xa4, 0x10, 0xe2, 0x83, 0x91, 0xa3, 0x01, - 0x60, 0xf4, 0x47, 0x2e, 0xe2, 0x55, 0x10, 0x55, 0xcc, 0x18, 0xef, 0xdc, - 0x9f, 0xe1, 0xb0, 0x93, 0x74, 0x58, 0xdd, 0x13, 0x8f, 0xc8, 0xce, 0x87, - 0x76, 0x80, 0x02, 0x8b, 0x8f, 0xb9, 0x5d, 0x46, 0x25, 0xcb, 0x20, 0x43, - 0xda, 0x66, 0xd3, 0x50, 0x6e, 0x10, 0xf2, 0x32, 0x6a, 0x39, 0x36, 0xd2, - 0x97, 0x01, 0x08, 0x6c, 0x8e, 0x9e, 0x25, 0xa7, 0x7c, 0x86, 0xd4, 0xad \ No newline at end of file diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupb/sig_grouprevoked_sha256_bsn0_msg0.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupb/sig_grouprevoked_sha256_bsn0_msg0.inc deleted file mode 100644 index ecdbeb7e8d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/groupb/sig_grouprevoked_sha256_bsn0_msg0.inc +++ /dev/null @@ -1,98 +0,0 @@ - /*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 Signature - * Group : groupB - * Issuer : iKGF - * Signer : member0 - * HashAlg : Sha256 - * Message : "msg0" - * Basename: "bsn0" - * SigRl : SigRl of group - */ - 0x70, 0x91, 0x63, 0x2c, 0xbb, 0xfe, 0x06, 0x26, 0x5f, 0x20, 0xbd, 0x9e, - 0x49, 0x11, 0x31, 0xe0, 0x7c, 0x99, 0x5e, 0xa0, 0x58, 0x4f, 0x1b, 0x3f, - 0xb4, 0x6e, 0xcd, 0x17, 0x61, 0x79, 0xa0, 0xfd, 0x64, 0x60, 0xa4, 0xf8, - 0x17, 0x81, 0xc3, 0x0a, 0x4b, 0x6a, 0x72, 0x86, 0x96, 0xe3, 0xfa, 0x95, - 0x47, 0x45, 0xfb, 0x57, 0xef, 0xca, 0x82, 0x99, 0x72, 0xdc, 0xe6, 0x78, - 0xe3, 0x70, 0xa8, 0x28, 0x9e, 0x33, 0x16, 0x72, 0x80, 0x10, 0x54, 0x16, - 0x58, 0x56, 0x74, 0x64, 0xd2, 0x8e, 0x6f, 0x5c, 0x17, 0xbc, 0x34, 0xcf, - 0xaa, 0x09, 0xbe, 0x2e, 0xef, 0x3d, 0xa2, 0xf2, 0xbd, 0x22, 0xaa, 0xac, - 0xf3, 0x42, 0xc1, 0xfe, 0xdc, 0x7d, 0xd6, 0x48, 0xe9, 0x03, 0x21, 0xda, - 0x45, 0x99, 0x41, 0x8e, 0xe0, 0x31, 0xd3, 0x3b, 0x4a, 0x87, 0x09, 0x13, - 0xcf, 0x1d, 0xf9, 0xad, 0xbc, 0xc0, 0x95, 0x44, 0x32, 0x12, 0x35, 0xa4, - 0x7d, 0x36, 0xbe, 0xff, 0xa4, 0x49, 0x33, 0xc8, 0x1f, 0x96, 0xf0, 0xfe, - 0x2d, 0xbc, 0xec, 0xef, 0xfd, 0x5e, 0xb4, 0x7d, 0xe6, 0x12, 0xd5, 0x1b, - 0x2a, 0x4f, 0x72, 0x47, 0x22, 0x0d, 0xdc, 0xf8, 0x20, 0xbf, 0x08, 0xf6, - 0xfc, 0x28, 0xff, 0x9f, 0x0f, 0x87, 0x5d, 0x80, 0x4e, 0x7a, 0xf8, 0xdd, - 0x4e, 0x73, 0x9e, 0x26, 0x1b, 0x7b, 0xcd, 0x56, 0xfc, 0x4c, 0x2a, 0xd8, - 0x51, 0x5a, 0x38, 0x11, 0x4a, 0x5c, 0x10, 0xe2, 0x8f, 0x0c, 0x1c, 0x18, - 0x04, 0x01, 0x96, 0x6d, 0x21, 0xdd, 0x02, 0xd2, 0xf5, 0xa5, 0xcc, 0xf4, - 0x78, 0x35, 0x96, 0x99, 0xae, 0xc5, 0x1d, 0xc4, 0xd9, 0xe1, 0x02, 0x53, - 0x76, 0xe1, 0x4a, 0x0e, 0xd8, 0x19, 0x9b, 0x61, 0x87, 0xea, 0x30, 0x83, - 0x8a, 0xa0, 0x8f, 0x19, 0xab, 0x38, 0x4d, 0x1b, 0x07, 0xc1, 0xea, 0x91, - 0x6e, 0x71, 0x73, 0x9a, 0x35, 0xe9, 0x97, 0x75, 0x20, 0x91, 0xbb, 0x37, - 0xb1, 0x01, 0x77, 0xad, 0xec, 0x2c, 0x68, 0x47, 0xd5, 0x08, 0x95, 0x3b, - 0xf5, 0x14, 0x4a, 0x19, 0x2e, 0xad, 0xb8, 0xac, 0xfc, 0x93, 0x00, 0xa4, - 0x83, 0xdd, 0x52, 0x23, 0xe6, 0x4e, 0x20, 0xeb, 0x67, 0xc7, 0x84, 0xa9, - 0x14, 0x4f, 0x90, 0x18, 0x90, 0x55, 0xad, 0xa3, 0x68, 0x7e, 0xcf, 0xd3, - 0xf2, 0xe5, 0xfe, 0x13, 0xd4, 0x47, 0x76, 0x29, 0x6e, 0x8c, 0xfc, 0x7f, - 0xad, 0x1c, 0x80, 0x64, 0xbf, 0xb5, 0xd7, 0x62, 0x08, 0x8e, 0x1c, 0xb2, - 0xb7, 0x4b, 0x8f, 0x6e, 0x11, 0xfd, 0x48, 0xe4, 0x8c, 0x13, 0x16, 0x75, - 0xe7, 0x83, 0xf8, 0xef, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, - 0x86, 0x92, 0xbc, 0x07, 0x76, 0x7a, 0xff, 0x03, 0x70, 0x26, 0xe5, 0xef, - 0x13, 0x7a, 0x5a, 0xdd, 0x8f, 0x3a, 0x4d, 0x8a, 0xe0, 0xbb, 0x87, 0xff, - 0xd7, 0xed, 0xce, 0xd1, 0x84, 0x1b, 0xa8, 0x70, 0x8b, 0x35, 0xf2, 0xab, - 0xa6, 0x85, 0x8a, 0xd6, 0xb6, 0x31, 0x99, 0x13, 0xdd, 0x29, 0x64, 0xa9, - 0x7f, 0xbe, 0x12, 0x58, 0x1b, 0x86, 0x55, 0x66, 0x7e, 0x03, 0x9e, 0x37, - 0xbb, 0x8a, 0xf3, 0x44, 0x94, 0x35, 0x32, 0x96, 0x6f, 0x4a, 0x31, 0x1a, - 0xf3, 0xa8, 0x09, 0x19, 0x08, 0x29, 0x83, 0x65, 0x51, 0x1f, 0xd4, 0x4c, - 0x43, 0x8f, 0xf2, 0x93, 0x8f, 0x1a, 0x7f, 0x3c, 0x4c, 0x00, 0x80, 0x0f, - 0x31, 0x06, 0xb1, 0x59, 0x62, 0x8a, 0xb1, 0x37, 0xa7, 0xb9, 0xfc, 0xc9, - 0xbd, 0xf1, 0xca, 0xf2, 0xd4, 0x41, 0xa0, 0xc9, 0xb8, 0x62, 0x84, 0x4f, - 0x55, 0x80, 0xa0, 0x33, 0xdf, 0x80, 0xb7, 0x71, 0x6d, 0xda, 0x75, 0xd6, - 0xc9, 0x91, 0xed, 0x43, 0x0e, 0x44, 0x96, 0xd6, 0x97, 0x2a, 0x38, 0x87, - 0x07, 0x1e, 0x3a, 0xa8, 0xc2, 0x48, 0x38, 0x3c, 0x8c, 0x8f, 0xd0, 0xfe, - 0xa7, 0xbe, 0x05, 0xa0, 0x21, 0x83, 0x7e, 0xbc, 0x2e, 0xa8, 0x66, 0x04, - 0xfe, 0x90, 0x44, 0xa6, 0xc7, 0xe0, 0xa6, 0xb5, 0xf9, 0x42, 0xd9, 0x24, - 0xe4, 0x48, 0xa4, 0x14, 0x3c, 0xf9, 0x69, 0xc5, 0x4c, 0x07, 0x49, 0xa4, - 0xfe, 0x3d, 0xae, 0x18, 0xb2, 0x15, 0x01, 0xa7, 0xec, 0xbf, 0xc4, 0x33, - 0xd6, 0x44, 0xd6, 0x27, 0x4c, 0xcd, 0x58, 0x61, 0x97, 0x15, 0xd2, 0x15, - 0xa4, 0xd6, 0x62, 0xfe, 0x9c, 0x56, 0x8e, 0xfc, 0xdf, 0x40, 0x17, 0xbb, - 0x64, 0x76, 0x95, 0x76, 0x74, 0xbb, 0xe6, 0xcd, 0xbc, 0x41, 0x33, 0xaf, - 0x3e, 0xac, 0x44, 0x41, 0x95, 0xb9, 0x93, 0xff, 0xb0, 0xe2, 0x98, 0x0e, - 0x30, 0x8c, 0x03, 0x06, 0x68, 0xc8, 0x7e, 0x64, 0xeb, 0xdb, 0xa9, 0x65, - 0x5f, 0xf2, 0x76, 0xc8, 0xa4, 0x75, 0x28, 0xf4, 0x7c, 0xc4, 0xb3, 0xa0, - 0x5e, 0xd7, 0x10, 0x45, 0x51, 0x0d, 0x13, 0x1c, 0x18, 0x2f, 0x6a, 0x16, - 0x6f, 0x64, 0xc4, 0x09, 0xd7, 0x7c, 0x41, 0x94, 0xd4, 0x23, 0x82, 0xbe, - 0x08, 0xca, 0x48, 0x84, 0x9a, 0x72, 0x96, 0xe2, 0x1c, 0x8e, 0x95, 0x59, - 0xc4, 0xd7, 0x25, 0xc0, 0x5d, 0x91, 0xb5, 0xd9, 0x4c, 0xd1, 0x75, 0xe8, - 0xda, 0x55, 0xdf, 0x44, 0x0f, 0x20, 0x18, 0xfb, 0x49, 0xdf, 0xe5, 0xcb, - 0xdf, 0xfe, 0x75, 0xfd, 0x44, 0x01, 0x5d, 0x28, 0x8f, 0xf9, 0xc2, 0xcb, - 0xa3, 0xed, 0x3b, 0x1e, 0x78, 0xe3, 0x0c, 0x3a, 0xac, 0xbc, 0xfe, 0x9e, - 0xff, 0x99, 0x1b, 0x35, 0xca, 0xf7, 0x00, 0x51, 0xa2, 0x6d, 0xb1, 0x0a, - 0xec, 0xaa, 0x99, 0x48, 0x07, 0x1a, 0x68, 0x99, 0xf0, 0xeb, 0x09, 0x07, - 0xc5, 0x68, 0xb4, 0xb5, 0x41, 0xb8, 0xd1, 0x18, 0x99, 0x4e, 0x68, 0x25, - 0xc9, 0x4d, 0x32, 0x58, 0xeb, 0xcb, 0x3b, 0x73, 0x8a, 0x26, 0x50, 0x58, - 0x00, 0x41, 0xc6, 0xf8, 0xc6, 0x6c, 0xf8, 0x28, 0xe3, 0x99, 0xf2, 0xcd, - 0xa0, 0x6f, 0xc3, 0x22, 0xd4, 0x00, 0x87, 0xd2, 0x75, 0x7f, 0xaa, 0x84, - 0x11, 0x10, 0x7f, 0x7a, 0x28, 0x4b, 0x69, 0xf9, 0xfa, 0x22, 0xa7, 0x95, - 0x37, 0x61, 0x46, 0x61, 0xf0, 0x66, 0x5e, 0x92, 0x5c, 0x2e, 0xd8, 0x97, - 0x86, 0xa5, 0x3b, 0x2c, 0x45, 0x98, 0x1a, 0x6a, 0xc0, 0xb2, 0xff, 0x1d, - 0x99, 0x5c, 0x32, 0x10, 0x82, 0xd3, 0x63, 0x82, 0x8c, 0x89, 0xa2, 0x5d diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/grprl.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/grprl.inc deleted file mode 100644 index 4059011ee5..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/testdata/ikgf/grprl.inc +++ /dev/null @@ -1,124 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 2.0 group revocation list - * Group : GroupA - * Issuer : iKGF - */ - 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x32, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1d, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x25, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x29, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2c, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2e, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/bignum_wrapper-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/bignum_wrapper-test.cc deleted file mode 100644 index 83dba24f6b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/bignum_wrapper-test.cc +++ /dev/null @@ -1,173 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Bignum C++ wrapper unit tests. - */ - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/bignum.h" -#include "epid/common/src/memory.h" -} - -namespace { - -// Use Test Fixture for SetUp and TearDown -class BigNumObjTest : public ::testing::Test { - public: - static const BigNumStr str_0; - static const std::vector vec_0; -}; - -const BigNumStr BigNumObjTest::str_0 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -const std::vector BigNumObjTest::vec_0 = {0, 0, 0, 0, - 0, 0, 0, 0}; - -TEST_F(BigNumObjTest, ObjDefaultConstructedIsNotNull) { - BigNumObj bn; - EXPECT_NE(nullptr, (BigNum*)bn); -} - -TEST_F(BigNumObjTest, ObjConstructedWithSizeIsNotNull) { - BigNumObj bn1(1); - EXPECT_NE(nullptr, (BigNum*)bn1); - BigNumObj bn32(32); - EXPECT_NE(nullptr, (BigNum*)bn32); -} - -TEST_F(BigNumObjTest, AssignmentDoesNotCopyPointer) { - BigNumObj bn1; - BigNumObj bn2; - EXPECT_NE((BigNum*)bn1, (BigNum*)bn2); - bn1 = bn2; - EXPECT_NE((BigNum*)bn1, (BigNum*)bn2); -} - -TEST_F(BigNumObjTest, CopyConstructorDoesNotCopyPointer) { - BigNumObj bn1; - BigNumObj bn2(bn1); - EXPECT_NE((BigNum*)bn1, (BigNum*)bn2); -} - -TEST_F(BigNumObjTest, ConstructorDoesNotThrow) { - BigNumObj bn1; - BigNumObj bn2(32); - BigNumObj bn3(32, this->str_0); - BigNumObj bn4(32, this->vec_0); - BigNumObj bn5(this->str_0); - BigNumObj bn6(this->vec_0); - - EXPECT_NE((BigNum*)bn1, (BigNum*)bn2); - EXPECT_NE((BigNum*)bn1, (BigNum*)bn3); - EXPECT_NE((BigNum*)bn1, (BigNum*)bn4); - EXPECT_NE((BigNum*)bn1, (BigNum*)bn5); - EXPECT_NE((BigNum*)bn1, (BigNum*)bn6); - - EXPECT_NE((BigNum*)bn2, (BigNum*)bn1); - EXPECT_NE((BigNum*)bn2, (BigNum*)bn3); - EXPECT_NE((BigNum*)bn2, (BigNum*)bn4); - EXPECT_NE((BigNum*)bn2, (BigNum*)bn5); - EXPECT_NE((BigNum*)bn2, (BigNum*)bn6); - - EXPECT_NE((BigNum*)bn3, (BigNum*)bn1); - EXPECT_NE((BigNum*)bn3, (BigNum*)bn2); - EXPECT_NE((BigNum*)bn3, (BigNum*)bn4); - EXPECT_NE((BigNum*)bn3, (BigNum*)bn5); - EXPECT_NE((BigNum*)bn3, (BigNum*)bn6); - - EXPECT_NE((BigNum*)bn4, (BigNum*)bn1); - EXPECT_NE((BigNum*)bn4, (BigNum*)bn2); - EXPECT_NE((BigNum*)bn4, (BigNum*)bn3); - EXPECT_NE((BigNum*)bn4, (BigNum*)bn5); - EXPECT_NE((BigNum*)bn4, (BigNum*)bn6); - - EXPECT_NE((BigNum*)bn5, (BigNum*)bn1); - EXPECT_NE((BigNum*)bn5, (BigNum*)bn2); - EXPECT_NE((BigNum*)bn5, (BigNum*)bn3); - EXPECT_NE((BigNum*)bn5, (BigNum*)bn4); - EXPECT_NE((BigNum*)bn5, (BigNum*)bn6); - - EXPECT_NE((BigNum*)bn6, (BigNum*)bn1); - EXPECT_NE((BigNum*)bn6, (BigNum*)bn2); - EXPECT_NE((BigNum*)bn6, (BigNum*)bn3); - EXPECT_NE((BigNum*)bn6, (BigNum*)bn4); - EXPECT_NE((BigNum*)bn6, (BigNum*)bn5); -} - -TEST_F(BigNumObjTest, CanCastConstToConstPointer) { - BigNumObj const bn; - BigNum const* bn_ptr = bn; - (void)bn_ptr; -} - -TEST_F(BigNumObjTest, CanGetConstPointerFromConst) { - BigNumObj const bn; - BigNum const* bn_ptr = bn.getc(); - (void)bn_ptr; -} - -/* -The following tests are expected to result in -compile time errors (by design) -*/ -/* -TEST_F(BigNumObjTest, CannotCastConstToNonConstPointer) { - BigNumObj const bn; - BigNum * bn_ptr = bn; - (void) bn_ptr; -} - -TEST_F(BigNumObjTest, CannotGetNonConstPointerFromConst) { - BigNumObj const bn; - BigNum * bn_ptr = bn.get(); - (void) bn_ptr; -} -*/ - -TEST_F(BigNumObjTest, CanCastNonConstToConstPointer) { - BigNumObj bn; - BigNum const* bn_ptr = bn; - (void)bn_ptr; -} - -TEST_F(BigNumObjTest, CanGetConstPointerFromNonConst) { - BigNumObj bn; - BigNum const* bn_ptr = bn.getc(); - (void)bn_ptr; -} - -TEST_F(BigNumObjTest, CanCastNonConstToNonConstPointer) { - BigNumObj bn; - BigNum* bn_ptr = bn; - (void)bn_ptr; -} - -TEST_F(BigNumObjTest, CanGetNonConstPointerFromNonConst) { - BigNumObj bn; - BigNum* bn_ptr = bn.get(); - (void)bn_ptr; -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ecgroup_wrapper-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ecgroup_wrapper-test.cc deleted file mode 100644 index 4cc399c7a4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ecgroup_wrapper-test.cc +++ /dev/null @@ -1,153 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcGroup C++ wrapper unit tests. - */ - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/bignum.h" -#include "epid/common/types.h" -} - -namespace { - -// Use Test Fixture for SetUp and TearDown -class EcGroupObjTest : public ::testing::Test { - public: - static const BigNumStr q_str; - static const FqElemStr b_str; - static const BigNumStr p_str; - static const BigNumStr h1; - static const G1ElemStr g1_str; -}; -const BigNumStr EcGroupObjTest::q_str = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, - 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x13}}}; -const FqElemStr EcGroupObjTest::b_str = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}}}; -const BigNumStr EcGroupObjTest::p_str = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, 0x92, 0x1A, - 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}}}; -const BigNumStr EcGroupObjTest::h1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}; -const G1ElemStr EcGroupObjTest::g1_str = { - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}}; - -TEST_F(EcGroupObjTest, ObjDefaultConstructedIsNotNull) { - EcGroupObj group; - EXPECT_NE(nullptr, (EcGroup*)group); -} - -TEST_F(EcGroupObjTest, AssignmentCopiesPointer) { - EcGroupObj group1; - EcGroupObj group2; - EXPECT_NE((EcGroup*)group1, (EcGroup*)group2); - group1 = group2; - EXPECT_EQ((EcGroup*)group1, (EcGroup*)group2); -} - -TEST_F(EcGroupObjTest, CopyConstructorCopiesPointer) { - EcGroupObj group1; - EcGroupObj group2(group1); - EXPECT_EQ((EcGroup*)group1, (EcGroup*)group2); -} - -TEST_F(EcGroupObjTest, ConstructorDoesNotThrow) { - EcGroupObj group1; - FiniteFieldObj fq(this->q_str); - EcGroupObj group2(&fq, FfElementObj(&fq), FfElementObj(&fq, this->b_str), - FfElementObj(&fq, this->g1_str.x), - FfElementObj(&fq, this->g1_str.y), BigNumObj(this->p_str), - BigNumObj(this->h1)); -} - -TEST_F(EcGroupObjTest, CanCastConstToConstPointer) { - EcGroupObj const group; - EcGroup const* group_ptr = group; - (void)group_ptr; -} - -TEST_F(EcGroupObjTest, CanGetConstPointerFromConst) { - EcGroupObj const group; - EcGroup const* group_ptr = group.getc(); - (void)group_ptr; -} - -/* -The following tests are expected to result in -compile time errors (by design) -*/ -/* -TEST_F(EcGroupObjTest, CannotCastConstToNonConstPointer) { - EcGroupObj const group; - EcGroup * group_ptr = group; - (void) group_ptr; -} - -TEST_F(EcGroupObjTest, CannotGetNonConstPointerFromConst) { - EcGroupObj const group; - EcGroup * group_ptr = group.get(); - (void) group_ptr; -} -*/ - -TEST_F(EcGroupObjTest, CanCastNonConstToConstPointer) { - EcGroupObj group; - EcGroup const* group_ptr = group; - (void)group_ptr; -} - -TEST_F(EcGroupObjTest, CanGetConstPointerFromNonConst) { - EcGroupObj group; - EcGroup const* group_ptr = group.getc(); - (void)group_ptr; -} - -TEST_F(EcGroupObjTest, CanCastNonConstToNonConstPointer) { - EcGroupObj group; - EcGroup* group_ptr = group; - (void)group_ptr; -} - -TEST_F(EcGroupObjTest, CanGetNonConstPointerFromNonConst) { - EcGroupObj group; - EcGroup* group_ptr = group.get(); - (void)group_ptr; -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ecpoint_wrapper-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ecpoint_wrapper-test.cc deleted file mode 100644 index 780b70fe4a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ecpoint_wrapper-test.cc +++ /dev/null @@ -1,133 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcPoint C++ wrapper unit tests. - */ - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/bignum.h" -} - -namespace { - -// Use Test Fixture for SetUp and TearDown -class EcPointObjTest : public ::testing::Test { - public: - static EcGroupObj group; - static const G1ElemStr group_str_1; - static const G1ElemStr group_str_2; -}; - -const G1ElemStr EcPointObjTest::group_str_1 = { - {{{0x12, 0xA6, 0x5B, 0xD6, 0x91, 0x8D, 0x50, 0xA7, 0x66, 0xEB, 0x7D, 0x52, - 0xE3, 0x40, 0x17, 0x60, 0x7F, 0xDF, 0x6C, 0xA1, 0x2C, 0x1A, 0x37, 0xE0, - 0x92, 0xC0, 0xF7, 0xB9, 0x76, 0xAB, 0xB1, 0x8A}}}, - {{{0x78, 0x65, 0x28, 0xCB, 0xAF, 0x07, 0x52, 0x50, 0x55, 0x7A, 0x5F, 0x30, - 0x0A, 0xC0, 0xB4, 0x6B, 0xEA, 0x6F, 0xE2, 0xF6, 0x6D, 0x96, 0xF7, 0xCD, - 0xC8, 0xD3, 0x12, 0x7F, 0x1F, 0x3A, 0x8B, 0x42}}}}; - -const G1ElemStr EcPointObjTest::group_str_2 = { - {{{0xE6, 0x65, 0x23, 0x9B, 0xD4, 0x07, 0x16, 0x83, 0x38, 0x23, 0xB2, 0x67, - 0x57, 0xEB, 0x0F, 0x23, 0x3A, 0xF4, 0x8E, 0xDA, 0x71, 0x5E, 0xD9, 0x98, - 0x63, 0x98, 0x2B, 0xBC, 0x78, 0xD1, 0x94, 0xF2}}}, - {{{0x63, 0xB0, 0xAD, 0xB8, 0x2C, 0xE8, 0x14, 0xFD, 0xA2, 0x39, 0x0E, 0x66, - 0xB7, 0xD0, 0x6A, 0xAB, 0xEE, 0xFA, 0x2E, 0x24, 0x9B, 0xB5, 0x14, 0x35, - 0xFE, 0xB6, 0xB0, 0xFF, 0xFD, 0x5F, 0x73, 0x19}}}}; - -EcGroupObj EcPointObjTest::group; - -TEST_F(EcPointObjTest, ObjDefaultConstructedIsNotNull) { - EcPointObj point(&group); - EXPECT_NE(nullptr, (EcPoint*)point); -} - -TEST_F(EcPointObjTest, AssignmentDoesNotCopyPointer) { - EcPointObj point1(&group, group_str_1); - EcPointObj point2(&group, group_str_2); - EXPECT_NE((EcPoint*)point1, (EcPoint*)point2); - point1 = point2; - EXPECT_NE((EcPoint*)point1, (EcPoint*)point2); -} - -TEST_F(EcPointObjTest, CopyConstructorDoesNotCopyPointer) { - EcPointObj point1(&group, group_str_1); - EcPointObj point2(point1); - EXPECT_NE((EcPoint*)point1, (EcPoint*)point2); -} - -TEST_F(EcPointObjTest, CanCastConstToConstPointer) { - EcPointObj const point(&group); - EcPoint const* point_ptr = point; - (void)point_ptr; -} - -TEST_F(EcPointObjTest, CanGetConstPointerFromConst) { - EcPointObj const point(&group); - EcPoint const* point_ptr = point.getc(); - (void)point_ptr; -} - -/* -The following tests are expected to result in -compile time errors (by design) -*/ -/* -TEST_F(EcPointObjTest, CannotCastConstToNonConstPointer) { - EcPointObj const point(&group); - EcPoint * point_ptr = point; - (void) point_ptr; -} - -TEST_F(EcPointObjTest, CannotGetNonConstPointerFromConst) { - EcPointObj const point(&group); - EcPoint * point_ptr = point.get(); - (void) point_ptr; -} -*/ - -TEST_F(EcPointObjTest, CanCastNonConstToConstPointer) { - EcPointObj point(&group); - EcPoint const* point_ptr = point; - (void)point_ptr; -} - -TEST_F(EcPointObjTest, CanGetConstPointerFromNonConst) { - EcPointObj point(&group); - EcPoint const* point_ptr = point.getc(); - (void)point_ptr; -} - -TEST_F(EcPointObjTest, CanCastNonConstToNonConstPointer) { - EcPointObj point(&group); - EcPoint* point_ptr = point; - (void)point_ptr; -} - -TEST_F(EcPointObjTest, CanGetNonConstPointerFromNonConst) { - EcPointObj point(&group); - EcPoint* point_ptr = point.get(); - (void)point_ptr; -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ffelement_wrapper-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ffelement_wrapper-test.cc deleted file mode 100644 index 6f835ca420..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/ffelement_wrapper-test.cc +++ /dev/null @@ -1,155 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief FfElement C++ wrapper unit tests. - */ - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/bignum.h" -} - -namespace { - -// Use Test Fixture for SetUp and TearDown -class FfElementObjTest : public ::testing::Test { - public: - static FiniteFieldObj ff; - static const BigNumStr prime_str; - - static const FpElemStr ff_str_1; - static const FpElemStr ff_str_2; - static const Fq2ElemStr ff_2_str; -}; - -/// Intel(R) EPID 2.0 parameter p -const BigNumStr FfElementObjTest::prime_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}; - -const FpElemStr FfElementObjTest::ff_str_1 = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, -}; - -const FpElemStr FfElementObjTest::ff_str_2 = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA4, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, -}; - -const Fq2ElemStr FfElementObjTest::ff_2_str = { - // 1 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - // 2 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20}; - -FiniteFieldObj FfElementObjTest::ff(prime_str); - -TEST_F(FfElementObjTest, ObjDefaultConstructedIsNotNull) { - FfElementObj ffe(&ff); - EXPECT_NE(nullptr, (FfElement*)ffe); -} - -TEST_F(FfElementObjTest, AssignmentDoesNotCopyPointer) { - FfElementObj ffe1(&ff, ff_str_1); - FfElementObj ffe2(&ff, ff_str_2); - EXPECT_NE((FfElement*)ffe1, (FfElement*)ffe2); - ffe1 = ffe2; - EXPECT_NE((FfElement*)ffe1, (FfElement*)ffe2); -} - -TEST_F(FfElementObjTest, CopyConstructorDoesNotCopyPointer) { - FfElementObj ffe1(&ff, ff_str_1); - FfElementObj ffe2(ffe1); - EXPECT_NE((FfElement*)ffe1, (FfElement*)ffe2); -} - -TEST_F(FfElementObjTest, CanConstructBinomialElement) { - FfElementObj ffe1(&ff, ff_str_1); - FiniteFieldObj ff2(ff, ffe1, 2); - FfElementObj ff2_e1(&ff2, ff_2_str); - EXPECT_NE(nullptr, (FfElement*)ff2_e1); -} - -TEST_F(FfElementObjTest, CanCastConstToConstPointer) { - FfElementObj const ffe(&ff); - FfElement const* ffe_ptr = ffe; - (void)ffe_ptr; -} - -TEST_F(FfElementObjTest, CanGetConstPointerFromConst) { - FfElementObj const ffe(&ff); - FfElement const* ffe_ptr = ffe.getc(); - (void)ffe_ptr; -} - -/* -The following tests are expected to result in -compile time errors (by design) -*/ -/* -TEST_F(FfElementObjTest, CannotCastConstToNonConstPointer) { - FfElementObj const ffe(&ff); - FfElement * ffe_ptr = ffe; - (void) ffe_ptr; -} - -TEST_F(FfElementObjTest, CannotGetNonConstPointerFromConst) { - FfElementObj const ffe(&ff); - FfElement * ffe_ptr = ffe.get(); - (void) ffe_ptr; -} -*/ - -TEST_F(FfElementObjTest, CanCastNonConstToConstPointer) { - FfElementObj ffe(&ff); - FfElement const* ffe_ptr = ffe; - (void)ffe_ptr; -} - -TEST_F(FfElementObjTest, CanGetConstPointerFromNonConst) { - FfElementObj ffe(&ff); - FfElement const* ffe_ptr = ffe.getc(); - (void)ffe_ptr; -} - -TEST_F(FfElementObjTest, CanCastNonConstToNonConstPointer) { - FfElementObj ffe(&ff); - FfElement* ffe_ptr = ffe; - (void)ffe_ptr; -} - -TEST_F(FfElementObjTest, CanGetNonConstPointerFromNonConst) { - FfElementObj ffe(&ff); - FfElement* ffe_ptr = ffe.get(); - (void)ffe_ptr; -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/finite_field_wrapper-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/finite_field_wrapper-test.cc deleted file mode 100644 index 1ce59d0c73..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/finite_field_wrapper-test.cc +++ /dev/null @@ -1,134 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief FiniteField C++ wrapper unit tests. - */ - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/bignum.h" -#include "epid/common/types.h" -} - -namespace { - -// Use Test Fixture for SetUp and TearDown -class FiniteFieldObjTest : public ::testing::Test { - public: - static const BigNumStr prime_str; - static const FpElemStr ground_str; -}; - -/// Intel(R) EPID 2.0 parameter p -const BigNumStr FiniteFieldObjTest::prime_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}; - -const FpElemStr FiniteFieldObjTest::ground_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -TEST_F(FiniteFieldObjTest, ObjDefaultConstructedIsNotNull) { - FiniteFieldObj ff; - EXPECT_NE(nullptr, (FiniteField*)ff); -} - -TEST_F(FiniteFieldObjTest, AssignmentCopiesPointer) { - FiniteFieldObj ff1; - FiniteFieldObj ff2; - EXPECT_NE((FiniteField*)ff1, (FiniteField*)ff2); - ff1 = ff2; - EXPECT_EQ((FiniteField*)ff1, (FiniteField*)ff2); -} - -TEST_F(FiniteFieldObjTest, CopyConstructorCopiesPointer) { - FiniteFieldObj ff1; - FiniteFieldObj ff2(ff1); - EXPECT_EQ((FiniteField*)ff1, (FiniteField*)ff2); -} - -TEST_F(FiniteFieldObjTest, ConstructorDoesNotThrow) { - FiniteFieldObj ff1; - FiniteFieldObj ff2(this->prime_str); - FfElementObj ffe(&ff2, this->ground_str); - FiniteFieldObj ff3(ff2, ffe, 2); -} - -TEST_F(FiniteFieldObjTest, CanCastConstToConstPointer) { - FiniteFieldObj const ff; - FiniteField const* ff_ptr = ff; - (void)ff_ptr; -} - -TEST_F(FiniteFieldObjTest, CanGetConstPointerFromConst) { - FiniteFieldObj const ff; - FiniteField const* ff_ptr = ff.getc(); - (void)ff_ptr; -} - -/* -The following tests are expected to result in -compile time errors (by design) -*/ -/* -TEST_F(FiniteFieldObjTest, CannotCastConstToNonConstPointer) { - FiniteFieldObj const ff; - FiniteField * ff_ptr = ff; - (void) ff_ptr; -} - -TEST_F(FiniteFieldObjTest, CannotGetNonConstPointerFromConst) { - FiniteFieldObj const ff; - FiniteField * ff_ptr = ff.get(); - (void) ff_ptr; -} -*/ - -TEST_F(FiniteFieldObjTest, CanCastNonConstToConstPointer) { - FiniteFieldObj ff; - FiniteField const* ff_ptr = ff; - (void)ff_ptr; -} - -TEST_F(FiniteFieldObjTest, CanGetConstPointerFromNonConst) { - FiniteFieldObj ff; - FiniteField const* ff_ptr = ff.getc(); - (void)ff_ptr; -} - -TEST_F(FiniteFieldObjTest, CanCastNonConstToNonConstPointer) { - FiniteFieldObj ff; - FiniteField* ff_ptr = ff; - (void)ff_ptr; -} - -TEST_F(FiniteFieldObjTest, CanGetNonConstPointerFromNonConst) { - FiniteFieldObj ff; - FiniteField* ff_ptr = ff.get(); - (void)ff_ptr; -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/main-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/main-test.cc deleted file mode 100644 index 70f2d3a182..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/unittests/main-test.cc +++ /dev/null @@ -1,26 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Main entry point for unit tests. - */ - -#include "gtest/gtest.h" - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/verifier_wrapper-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/verifier_wrapper-testhelper.cc deleted file mode 100644 index ef9ba8b2b9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/verifier_wrapper-testhelper.cc +++ /dev/null @@ -1,53 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Verifier C++ wrapper implementation. - */ -#include -#include -#include - -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" - -VerifierCtxObj::VerifierCtxObj(GroupPubKey const& pub_key) : ctx_(nullptr) { - auto sts = EpidVerifierCreate(&pub_key, nullptr, &ctx_); - if (kEpidNoErr != sts) { - printf("%s(%d): %s\n", __FILE__, __LINE__, "test defect:"); - throw std::logic_error(std::string("Failed to call: ") + - "EpidVerifierCreate()"); - } -} - -VerifierCtxObj::VerifierCtxObj(GroupPubKey const& pub_key, - VerifierPrecomp const& precomp) - : ctx_(nullptr) { - auto sts = EpidVerifierCreate(&pub_key, &precomp, &ctx_); - if (kEpidNoErr != sts) { - printf("%s(%d): %s\n", __FILE__, __LINE__, "test defect:"); - throw std::logic_error(std::string("Failed to call: ") + - "EpidVerifierCreate()"); - } -} - -VerifierCtxObj::~VerifierCtxObj() { EpidVerifierDelete(&ctx_); } - -VerifierCtx* VerifierCtxObj::ctx() const { return ctx_; } - -VerifierCtxObj::operator VerifierCtx*() const { return ctx_; } - -VerifierCtxObj::operator const VerifierCtx*() const { return ctx_; } diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/verifier_wrapper-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/verifier_wrapper-testhelper.h deleted file mode 100644 index 1a42f0f813..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common-testhelper/verifier_wrapper-testhelper.h +++ /dev/null @@ -1,55 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Verifier C++ wrapper interface. - */ -#ifndef EPID_COMMON_TESTHELPER_VERIFIER_WRAPPER_TESTHELPER_H_ -#define EPID_COMMON_TESTHELPER_VERIFIER_WRAPPER_TESTHELPER_H_ - -extern "C" { -#include "epid/verifier/api.h" -} - -/// C++ Wrapper to manage memory for VerifierCtx via RAII -class VerifierCtxObj { - public: - /// Create a VerifierCtx - explicit VerifierCtxObj(GroupPubKey const& pub_key); - /// Create a VerifierCtx given precomputation blob - VerifierCtxObj(GroupPubKey const& pub_key, VerifierPrecomp const& precomp); - - // This class instances are not meant to be copied. - // Explicitly delete copy constructor and assignment operator. - VerifierCtxObj(const VerifierCtxObj&) = delete; - VerifierCtxObj& operator=(const VerifierCtxObj&) = delete; - - /// Destroy the VerifierCtx - ~VerifierCtxObj(); - /// get a pointer to the stored VerifierCtx - VerifierCtx* ctx() const; - /// cast operator to get the pointer to the stored VerifierCtx - operator VerifierCtx*() const; - /// const cast operator to get the pointer to the stored VerifierCtx - operator const VerifierCtx*() const; - - private: - /// The stored VerifierCtx - VerifierCtx* ctx_; -}; - -#endif // EPID_COMMON_TESTHELPER_VERIFIER_WRAPPER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/file_parser.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/file_parser.h deleted file mode 100644 index d6d5c8937e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/file_parser.h +++ /dev/null @@ -1,219 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/// Epid 1.1 issuer material parsing utilities. -/*! - * \file - */ -#ifndef EPID_COMMON_1_1_FILE_PARSER_H_ -#define EPID_COMMON_1_1_FILE_PARSER_H_ - -#include - -#include "epid/common/1.1/types.h" -#include "epid/common/errors.h" -#include "epid/common/file_parser.h" - -/// Parser for 1.1 issuer material -/*! - \defgroup Epid11FileParserModule EPID 1.1 support - - Defines the APIs needed to parse Intel(R) EPID 1.1 issuer material. - - \ingroup FileParser - \see EPID 1.1 -support - @{ -*/ - -/// Extracts group public key from buffer in issuer binary format -/*! - - Extracts the first group public key from a buffer with format of - Intel(R) EPID 1.1 Group Public Key Certificate Binary File. The - function validates that the first public key was signed by the - private key corresponding to the provided CA certificate and the - size of the input buffer is correct. - - \warning - It is the responsibility of the caller to authenticate the - EpidCaCertificate. - - \param[in] buf - Pointer to buffer containing public key to extract. - - \param[in] len - The size of buf in bytes. - - \param[in] cert - The issuing CA public key certificate. - - \param[out] pubkey - The extracted group public key. - - \returns ::EpidStatus - - \retval ::kEpidSigInvalid - Parsing failed due to data authentication failure. - - \see EPID 1.1 - support - - */ -EpidStatus Epid11ParseGroupPubKeyFile(void const* buf, size_t len, - EpidCaCertificate const* cert, - Epid11GroupPubKey* pubkey); - -/// Extracts private key revocation list from buffer in issuer binary format -/*! - - Extracts the private key revocation list from a buffer with format of - Intel(R) EPID 1.1 Binary Private Key Revocation List File. The function - validates that the revocation list was signed by the private - key corresponding to the provided CA certificate and the size of the - input buffer is correct. - - To determine the required size of the revocation list output buffer, - provide a null pointer for the output buffer. - - \warning - It is the responsibility of the caller to authenticate the - EpidCaCertificate. - - \param[in] buf - Pointer to buffer containing the revocation list to extract. - - \param[in] len - The size of buf in bytes. - - \param[in] cert - The issuing CA public key certificate. - - \param[out] rl - The extracted revocation list. If Null, rl_len is filled with - the required output buffer size. - - \param[in,out] rl_len - The size of rl in bytes. - - \returns ::EpidStatus - - \retval ::kEpidSigInvalid - Parsing failed due to data authentication failure. - - \see EPID 1.1 - support - - */ -EpidStatus Epid11ParsePrivRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, - Epid11PrivRl* rl, size_t* rl_len); - -/// Extracts signature revocation list from buffer in issuer binary format -/*! - - Extracts the signature based revocation list from a buffer with - format of Intel(R) EPID 1.1 Binary Signature Revocation List File. The - function - validates that the revocation list was signed by the private key - corresponding to the provided CA certificate and the size of the - input buffer is correct. - - To determine the required size of the revocation list output buffer, - provide a null pointer for the output buffer. - - \warning - It is the responsibility of the caller to authenticate the - EpidCaCertificate. - - \param[in] buf - Pointer to buffer containing the revocation list to extract. - - \param[in] len - The size of buf in bytes. - - \param[in] cert - The issuing CA public key certificate. - - \param[out] rl - The extracted revocation list. If Null, rl_len is filled with - the required output buffer size. - - \param[in,out] rl_len - The size of rl in bytes. - - \returns ::EpidStatus - - \retval ::kEpidSigInvalid - Parsing failed due to data authentication failure. - - \see EPID 1.1 - support - - */ -EpidStatus Epid11ParseSigRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, Epid11SigRl* rl, - size_t* rl_len); - -/// Extracts group revocation list from buffer in issuer binary format -/*! - - Extracts the group revocation list from a buffer with format of - Intel(R) EPID 1.1 Binary Group Certificate Revocation List File. The function - validates that the revocation list was signed by the private key - corresponding to the provided CA certificate and the size of the - input buffer is correct. - - To determine the required size of the revocation list output buffer, - provide a null pointer for the output buffer. - - \warning - It is the responsibility of the caller to authenticate the - EpidCaCertificate. - - \param[in] buf - Pointer to buffer containing the revocation list to extract. - - \param[in] len - The size of buf in bytes. - - \param[in] cert - The issuing CA public key certificate. - - \param[out] rl - The extracted revocation list. If Null, rl_len is filled with - the required output buffer size. - - \param[in,out] rl_len - The size of rl in bytes. - - \returns ::EpidStatus - - \retval ::kEpidSigInvalid - Parsing failed due to data authentication failure. - - \see EPID 1.1 - support - - */ -EpidStatus Epid11ParseGroupRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, - Epid11GroupRl* rl, size_t* rl_len); - -/*! - @} -*/ - -#endif // EPID_COMMON_1_1_FILE_PARSER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/commitment.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/commitment.c deleted file mode 100644 index 7749fa6539..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/commitment.c +++ /dev/null @@ -1,135 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Commitment hash implementation. - */ -#include -#include -#include "epid/common/1.1/src/commitment.h" -#include "epid/common/src/memory.h" -#include "epid/common/math/bignum.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/src/endian_convert.h" - -EpidStatus SetKeySpecificEpid11CommitValues(Epid11GroupPubKey const* pub_key, - Epid11CommitValues* values) { - static const Epid11Params params = { -#include "epid/common/1.1/src/epid11params_tate.inc" - }; - - if (!pub_key || !values) return kEpidBadArgErr; - - values->p = params.p; - values->g1 = params.g1; - values->g2 = params.g2; - values->g3 = params.g3; - values->h1 = pub_key->h1; - values->h2 = pub_key->h2; - values->w = pub_key->w; - - return kEpidNoErr; -} - -EpidStatus SetCalculatedEpid11CommitValues( - Epid11G3ElemStr const* B, Epid11G3ElemStr const* K, - Epid11G1ElemStr const* T1, Epid11G1ElemStr const* T2, EcPoint const* R1, - EcPoint const* R2, EcPoint const* R3, FfElement const* R4, EcGroup* G1, - EcGroup* G3, FiniteField* GT, Epid11CommitValues* values) { - EpidStatus result; - if (!B || !K || !T1 || !T2 || !R1 || !R2 || !R3 || !R4 || !G1 || !G3 || !GT || - !values) { - return kEpidBadArgErr; - } - - values->B = *B; - values->K = *K; - values->T1 = *T1; - values->T2 = *T2; - - result = WriteEcPoint(G1, R1, &values->R1, sizeof(values->R1)); - if (kEpidNoErr != result) return result; - result = WriteEcPoint(G1, R2, &values->R2, sizeof(values->R2)); - if (kEpidNoErr != result) return result; - result = WriteEcPoint(G3, R3, &values->R3, sizeof(values->R3)); - if (kEpidNoErr != result) return result; - result = WriteFfElement(GT, R4, &values->R4, sizeof(values->R4)); - if (kEpidNoErr != result) return result; - - return kEpidNoErr; -} - -EpidStatus CalculateEpid11CommitmentHash(Epid11CommitValues const* values, - void const* msg, uint32_t msg_len, - OctStr80 const* nd, Sha256Digest* c) { - EpidStatus result; - -#pragma pack(1) - struct { - Sha256Digest t4; - OctStr80 nd; - uint32_t msg_len; - uint8_t msg[1]; - }* t4mconcat_buf = NULL; -#pragma pack() - size_t max_msg_len = - SIZE_MAX - (sizeof(*t4mconcat_buf) - sizeof(t4mconcat_buf->msg)); - size_t t4mconcat_size = - sizeof(*t4mconcat_buf) - sizeof(t4mconcat_buf->msg) + msg_len; - - if (!values || !nd || !c) return kEpidBadArgErr; - if (!msg && (0 != msg_len)) { - // if message is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (max_msg_len < (size_t)msg_len) { - return kEpidBadArgErr; - } - - do { - // compute c = H(t4 || nd || msg_len || msg). - t4mconcat_buf = SAFE_ALLOC(t4mconcat_size); - if (!t4mconcat_buf) { - result = kEpidMemAllocErr; - break; - } - // Calculate c = Hash(t4 || nd || mSize || m) where t4 is Hash(p || g1 || g2 - // || g3 || h1 || h2 || w || B || K || T1 || T2 || R1 || R2 || R3 || R4). - result = Sha256MessageDigest(values, sizeof(*values), &t4mconcat_buf->t4); - if (kEpidNoErr != result) break; - t4mconcat_buf->nd = *nd; - t4mconcat_buf->msg_len = ntohl(msg_len); - // place variable length msg into t4mconcat_buf - if (msg) { - if (0 != memcpy_S(&t4mconcat_buf->msg[0], - t4mconcat_size - sizeof(*t4mconcat_buf) + - sizeof(t4mconcat_buf->msg), - msg, msg_len)) { - result = kEpidBadArgErr; - break; - } - } - result = Sha256MessageDigest(t4mconcat_buf, t4mconcat_size, c); - if (kEpidNoErr != result) break; - - result = kEpidNoErr; - } while (0); - - SAFE_FREE(t4mconcat_buf); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/commitment.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/commitment.h deleted file mode 100644 index b60659054f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/commitment.h +++ /dev/null @@ -1,137 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_1_1_SRC_COMMITMENT_H_ -#define EPID_COMMON_1_1_SRC_COMMITMENT_H_ -/*! - * \file - * \brief Commitment hash interface. - * \addtogroup EpidCommon - * @{ - */ -#include "epid/common/errors.h" -#include "epid/common/1.1/types.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/hash.h" - -#pragma pack(1) -/// Storage for values to create Intel(R) EPID 1.1 commitment in Sign and Verify -/// algorithms -typedef struct Epid11CommitValues { - BigNumStr p; ///< Intel(R) EPID 1.1 parameter p - Epid11G1ElemStr g1; ///< Intel(R) EPID 1.1 parameter g1 - Epid11G2ElemStr g2; ///< Intel(R) EPID 1.1 parameter g2 - Epid11G1ElemStr g3; ///< Intel(R) EPID 1.1 parameter g3 - Epid11G1ElemStr h1; ///< Group public key value h1 - Epid11G1ElemStr h2; ///< Group public key value h2 - Epid11G2ElemStr w; ///< Group public key value w - Epid11G3ElemStr B; ///< Variable B computed in algorithm - Epid11G3ElemStr K; ///< Variable K computed in algorithm - Epid11G1ElemStr T1; ///< Variable T1 computed in algorithm - Epid11G1ElemStr T2; ///< Variable T2 computed in algorithm - Epid11G1ElemStr R1; ///< Variable R1 computed in algorithm - Epid11G1ElemStr R2; ///< Variable R2 computed in algorithm - Epid11G3ElemStr R3; ///< Variable R3 computed in algorithm - Epid11GtElemStr R4; ///< Variable R4 computed in algorithm -} Epid11CommitValues; -#pragma pack() - -/// Set Intel(R) EPID 1.1 group public key related fields to Epid11CommitValues -/// structure -/*! - Set p, g1, g2, g3, h1, h2 and w fields of values argument. - - \param[in] pub_key - Intel(R) EPID 1.1 Group public key - \param[out] values - Pointer to Epid11CommitValues structure to fill. - - \returns ::EpidStatus - - \see CalculateCommitmentHash -*/ -EpidStatus SetKeySpecificEpid11CommitValues(Epid11GroupPubKey const* pub_key, - Epid11CommitValues* values); - -/// Set Epid11CommitValues structure fields calculated in Intel(R) EPID 1.1 Sign -/// or Verify algorithm -/*! - Set B, K, T1, T2, R1, R2, R3 and R4 fields of values argument. - - \param[in] B - Value of B to set - \param[in] K - Value of K to set - \param[in] T1 - Value of T1 to set - \param[in] T2 - Value of T2 to set - \param[in] R1 - Value of R1 to set - \param[in] R2 - Value of R2 to set - \param[in] R3 - Value of R3 to set - \param[in] R4 - Value of R4 to set - \param[in] G1 - EcGroup containing element R1, R2 - \param[in] G3 - EcGroup containing element R3 - \param[in] GT - FiniteField containing element R4 - \param[out] values - Pointer to CommitValues structure to fill. - - \returns ::EpidStatus - - \see CalculateCommitmentHash -*/ -EpidStatus SetCalculatedEpid11CommitValues( - Epid11G3ElemStr const* B, Epid11G3ElemStr const* K, - Epid11G1ElemStr const* T1, Epid11G1ElemStr const* T2, EcPoint const* R1, - EcPoint const* R2, EcPoint const* R3, FfElement const* R4, EcGroup* G1, - EcGroup* G3, FiniteField* GT, Epid11CommitValues* values); - -/// Calculate Hash(t4 || nd || mSize || m) for Intel(R) EPID 1.1 Sign and Verfiy -/// algorithms -/*! - Calculate c = Hash(t4 || nd || mSize || m) where t4 is - Hash(p || g1 || g2 || g3 || h1 || h2 || w || B || K || T1 || T2 || R1 || R2 || - R3 || R4). - - \param[in] values - Commit values to hash - \param[in] msg - Message to hash - \param[in] msg_len - Size of msg buffer in bytes - \param[in] nd - 80-bit big integer - \param[out] c - Result of calculation - - \returns ::EpidStatus - - \see SetKeySpecificCommitValues - \see SetCalculatedCommitValues -*/ -EpidStatus CalculateEpid11CommitmentHash(Epid11CommitValues const* values, - void const* msg, uint32_t msg_len, - OctStr80 const* nd, Sha256Digest* c); - -/*! @} */ -#endif // EPID_COMMON_1_1_SRC_COMMITMENT_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params.c deleted file mode 100644 index 0a1e620d35..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params.c +++ /dev/null @@ -1,469 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Intel(R) EPID 1.1 constant parameters implementation. -*/ -#include "epid/common/1.1/src/epid11params.h" -#include "epid/common/src/memory.h" -#include "epid/common/math/tatepairing.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -/// Count of elements in array -#define COUNT_OF(a) (sizeof(a) / sizeof((a)[0])) - -/// create a new Finite Field Fqd -static EpidStatus NewFqd(Epid11Params const* params, FiniteField* Fq, - FiniteField** Fqd); - -/// create a new Finite Field Fqk -EpidStatus NewFqk(Epid11Params const* params, FiniteField* Fq, FiniteField* Fqd, - FiniteField** Fqk); - -/// create a new Elliptic curve group G1 over Fq -static EpidStatus NewG1(Epid11Params const* params, FiniteField* Fq, - EcGroup** G1); - -/// create a new Elliptic curve group G2 over Fqd -static EpidStatus NewG2(Epid11Params const* params, FiniteField* Fq, - FiniteField* Fqd, EcGroup** G2); - -/// create a new Elliptic curve group G3 over Fq' -static EpidStatus NewG3(Epid11Params const* params, FiniteField* Fq_tick, - EcGroup** G3); - -EpidStatus CreateEpid11Params(Epid11Params_** params) { - EpidStatus result = kEpidErr; - Epid11Params_* _params = NULL; - Epid11Params params_str = { -#include "epid/common/1.1/src/epid11params_tate.inc" - }; - - if (!params) return kEpidBadArgErr; - - do { - _params = SAFE_ALLOC(sizeof(Epid11Params_)); - if (!_params) { - result = kEpidMemAllocErr; - break; - } - - // BigNum* p; - result = NewBigNum(sizeof(params_str.p), &_params->p); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(¶ms_str.p, sizeof(params_str.p), _params->p); - BREAK_ON_EPID_ERROR(result); - // BigNum* p_tick; - result = NewBigNum(sizeof(params_str.p_tick), &_params->p_tick); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(¶ms_str.p_tick, sizeof(params_str.p_tick), - _params->p_tick); - BREAK_ON_EPID_ERROR(result); - - // FiniteField* Fp; - result = NewFiniteField(¶ms_str.p, &_params->Fp); - BREAK_ON_EPID_ERROR(result); - // FiniteField* Fq; - result = NewFiniteField(¶ms_str.q, &_params->Fq); - BREAK_ON_EPID_ERROR(result); - // FiniteField* Fp_tick; - result = NewFiniteField(¶ms_str.p_tick, &_params->Fp_tick); - BREAK_ON_EPID_ERROR(result); - // FiniteField* Fq_tick; - result = NewFiniteField(¶ms_str.q_tick, &_params->Fq_tick); - BREAK_ON_EPID_ERROR(result); - // FiniteField* Fqd; - result = NewFqd(¶ms_str, _params->Fq, &_params->Fqd); - BREAK_ON_EPID_ERROR(result); - - // EcGroup* G1; - result = NewG1(¶ms_str, _params->Fq, &_params->G1); - BREAK_ON_EPID_ERROR(result); - // EcGroup* G2; - result = NewG2(¶ms_str, _params->Fq, _params->Fqd, &_params->G2); - BREAK_ON_EPID_ERROR(result); - // EcGroup* G3; - result = NewG3(¶ms_str, _params->Fq_tick, &_params->G3); - BREAK_ON_EPID_ERROR(result); - // FiniteField* GT; - result = NewFqk(¶ms_str, _params->Fq, _params->Fqd, &_params->GT); - BREAK_ON_EPID_ERROR(result); - - // EcPoint* g1; - result = NewEcPoint(_params->G1, &_params->g1); - BREAK_ON_EPID_ERROR(result); - result = ReadEcPoint(_params->G1, ¶ms_str.g1, sizeof(params_str.g1), - _params->g1); - BREAK_ON_EPID_ERROR(result); - // EcPoint* g2; - result = NewEcPoint(_params->G2, &_params->g2); - BREAK_ON_EPID_ERROR(result); - result = ReadEcPoint(_params->G2, ¶ms_str.g2, sizeof(params_str.g2), - _params->g2); - BREAK_ON_EPID_ERROR(result); - // EcPoint* g3; - result = NewEcPoint(_params->G3, &_params->g3); - BREAK_ON_EPID_ERROR(result); - result = ReadEcPoint(_params->G3, ¶ms_str.g3, sizeof(params_str.g3), - _params->g3); - BREAK_ON_EPID_ERROR(result); - - // Epid11PairingState* pairing_state; - result = NewEpid11PairingState(_params->G1, _params->G2, _params->GT, - &_params->pairing_state); - BREAK_ON_EPID_ERROR(result); - - *params = _params; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result && _params) { - DeleteEpid11PairingState(&_params->pairing_state); - - DeleteBigNum(&_params->p); - DeleteBigNum(&_params->p_tick); - DeleteEcPoint(&_params->g1); - DeleteEcPoint(&_params->g2); - DeleteEcPoint(&_params->g3); - - DeleteFiniteField(&_params->Fp); - DeleteFiniteField(&_params->Fq); - DeleteFiniteField(&_params->Fp_tick); - DeleteFiniteField(&_params->Fq_tick); - DeleteFiniteField(&_params->Fqd); - DeleteFiniteField(&_params->GT); - - DeleteEcGroup(&_params->G1); - DeleteEcGroup(&_params->G2); - DeleteEcGroup(&_params->G3); - SAFE_FREE(_params); - } - return result; -} - -void DeleteEpid11Params(Epid11Params_** params) { - if (params && *params) { - DeleteEpid11PairingState(&(*params)->pairing_state); - - DeleteBigNum(&(*params)->p); - DeleteBigNum(&(*params)->p_tick); - DeleteEcPoint(&(*params)->g1); - DeleteEcPoint(&(*params)->g2); - DeleteEcPoint(&(*params)->g3); - - DeleteFiniteField(&(*params)->Fp); - DeleteFiniteField(&(*params)->Fq); - DeleteFiniteField(&(*params)->Fp_tick); - DeleteFiniteField(&(*params)->Fq_tick); - DeleteFiniteField(&(*params)->Fqd); - DeleteFiniteField(&(*params)->GT); - - DeleteEcGroup(&(*params)->G1); - DeleteEcGroup(&(*params)->G2); - DeleteEcGroup(&(*params)->G3); - - SAFE_FREE(*params); - } -} - -EpidStatus NewFqd(Epid11Params const* params, FiniteField* Fq, - FiniteField** Fqd) { - if (!params || !Fq || !Fqd) return kEpidBadArgErr; - - return NewFiniteFieldViaPolynomialExtension(Fq, params->coeff, 3, Fqd); -} - -EpidStatus NewFqk(Epid11Params const* params, FiniteField* Fq, FiniteField* Fqd, - FiniteField** Fqk) { - EpidStatus result = kEpidNoErr; - FfElement* qnr = NULL; - FfElement* neg_qnr = NULL; - FfElement* ground_element = NULL; - Fq3ElemStr ground_element_str = {0}; - - if (!params || !Fq || !Fqd || !Fqk) return kEpidBadArgErr; - - do { - result = NewFfElement(Fq, &qnr); - BREAK_ON_EPID_ERROR(result); - - result = ReadFfElement(Fq, &(params->qnr), sizeof(params->qnr), qnr); - BREAK_ON_EPID_ERROR(result); - - result = NewFfElement(Fq, &neg_qnr); - BREAK_ON_EPID_ERROR(result); - - result = FfNeg(Fq, qnr, neg_qnr); - BREAK_ON_EPID_ERROR(result); - - result = WriteFfElement(Fq, neg_qnr, &ground_element_str.a[0], - sizeof(ground_element_str.a[0])); - BREAK_ON_EPID_ERROR(result); - - result = NewFfElement(Fqd, &ground_element); - BREAK_ON_EPID_ERROR(result); - - result = ReadFfElement(Fqd, &(ground_element_str), - sizeof(ground_element_str), ground_element); - BREAK_ON_EPID_ERROR(result); - - result = NewFiniteFieldViaBinomalExtension(Fqd, ground_element, 2, Fqk); - BREAK_ON_EPID_ERROR(result); - } while (0); - - DeleteFfElement(&qnr); - DeleteFfElement(&neg_qnr); - DeleteFfElement(&ground_element); - - return result; -} - -EpidStatus NewG1(Epid11Params const* params, FiniteField* Fq, EcGroup** G1) { - EpidStatus result = kEpidErr; - EcGroup* ec = NULL; - FfElement* fq_a = NULL; - FfElement* fq_b = NULL; - FfElement* g1_x = NULL; - FfElement* g1_y = NULL; - BigNum* order = NULL; - BigNum* h = NULL; - - if (!params || !Fq || !G1) return kEpidBadArgErr; - - do { - // Create G1 - // G1 is an elliptic curve group E(Fq).It can be initialized as follows: - // 1. Set G1 = E(Fq).init(p, q, h, a, b, g1.x, g1.y). - // a - result = NewFfElement(Fq, &fq_a); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq, ¶ms->a, sizeof(params->a), fq_a); - BREAK_ON_EPID_ERROR(result); - // b - result = NewFfElement(Fq, &fq_b); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq, ¶ms->b, sizeof(params->b), fq_b); - BREAK_ON_EPID_ERROR(result); - // g1.x - result = NewFfElement(Fq, &g1_x); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq, ¶ms->g1.x, sizeof(params->g1.x), g1_x); - BREAK_ON_EPID_ERROR(result); - // g1.y - result = NewFfElement(Fq, &g1_y); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq, ¶ms->g1.y, sizeof(params->g1.y), g1_y); - BREAK_ON_EPID_ERROR(result); - // order - result = NewBigNum(sizeof(BigNumStr), &order); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(¶ms->p, sizeof(params->p), order); - BREAK_ON_EPID_ERROR(result); - // h - result = NewBigNum(sizeof(BigNumStr), &h); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(¶ms->h, sizeof(params->h), h); - BREAK_ON_EPID_ERROR(result); - - result = NewEcGroup(Fq, fq_a, fq_b, g1_x, g1_y, order, h, &ec); - BREAK_ON_EPID_ERROR(result); - *G1 = ec; - result = kEpidNoErr; - } while (0); - - DeleteBigNum(&h); - DeleteBigNum(&order); - DeleteFfElement(&g1_y); - DeleteFfElement(&g1_x); - DeleteFfElement(&fq_b); - DeleteFfElement(&fq_a); - - return result; -} - -EpidStatus NewG3(Epid11Params const* params, FiniteField* Fq_dash, - EcGroup** G3) { - EpidStatus result = kEpidErr; - EcGroup* ec = NULL; - FfElement* fq_a = NULL; - FfElement* fq_b = NULL; - FfElement* g3_x = NULL; - FfElement* g3_y = NULL; - BigNum* order = NULL; - BigNum* h_tick = NULL; - - if (!params || !Fq_dash || !G3) return kEpidBadArgErr; - - do { - // Create G3 - // G3 is an elliptic curve group E(Fq').It can be initialized as follows: - // 1. Set G3 = E(Fq').init(p', q', h', a', b', g3.x, g3.y). - // a' - result = NewFfElement(Fq_dash, &fq_a); - BREAK_ON_EPID_ERROR(result); - result = - ReadFfElement(Fq_dash, ¶ms->a_tick, sizeof(params->a_tick), fq_a); - BREAK_ON_EPID_ERROR(result); - // b' - result = NewFfElement(Fq_dash, &fq_b); - BREAK_ON_EPID_ERROR(result); - result = - ReadFfElement(Fq_dash, ¶ms->b_tick, sizeof(params->b_tick), fq_b); - BREAK_ON_EPID_ERROR(result); - // g3.x - result = NewFfElement(Fq_dash, &g3_x); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq_dash, ¶ms->g3.x, sizeof(params->g3.x), g3_x); - BREAK_ON_EPID_ERROR(result); - // g3.y - result = NewFfElement(Fq_dash, &g3_y); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq_dash, ¶ms->g3.y, sizeof(params->g3.y), g3_y); - BREAK_ON_EPID_ERROR(result); - // order - result = NewBigNum(sizeof(BigNumStr), &order); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(¶ms->p_tick, sizeof(params->p_tick), order); - BREAK_ON_EPID_ERROR(result); - // h' - result = NewBigNum(sizeof(BigNumStr), &h_tick); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(¶ms->h_tick, sizeof(params->h_tick), h_tick); - BREAK_ON_EPID_ERROR(result); - - result = NewEcGroup(Fq_dash, fq_a, fq_b, g3_x, g3_y, order, h_tick, &ec); - BREAK_ON_EPID_ERROR(result); - *G3 = ec; - result = kEpidNoErr; - } while (0); - - DeleteBigNum(&h_tick); - DeleteBigNum(&order); - DeleteFfElement(&g3_y); - DeleteFfElement(&g3_x); - DeleteFfElement(&fq_b); - DeleteFfElement(&fq_a); - - return result; -} - -EpidStatus NewG2(Epid11Params const* params, FiniteField* Fq, FiniteField* Fqd, - EcGroup** G2) { - EpidStatus result = kEpidErr; - EcGroup* ec = NULL; - FfElement* fq_twista = NULL; - FfElement* fq_twistb = NULL; - FfElement* fqd_twista = NULL; - FfElement* fqd_twistb = NULL; - FfElement* g2_x = NULL; - FfElement* g2_y = NULL; - FfElement* qnr = NULL; - BigNum* order = NULL; - BigNum* h = NULL; - Fq3ElemStr tmp_Fq3_str = {0}; - - if (!params || !Fq || !Fqd || !G2) return kEpidBadArgErr; - - do { - // Create G2 - // G2 is an elliptic curve group E(Fqd).It can be initialized as follows: - // 2. Set g2.x = (g2.x[0], g2.x[1], g2.x[2]) an element of Fqd - result = NewFfElement(Fqd, &g2_x); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fqd, ¶ms->g2.x, sizeof(params->g2.x), g2_x); - BREAK_ON_EPID_ERROR(result); - // 3. Set g2.y = (g2.y[0], g2.y[1], g2.y[2]) an element of Fqd - result = NewFfElement(Fqd, &g2_y); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fqd, ¶ms->g2.y, sizeof(params->g2.y), g2_y); - BREAK_ON_EPID_ERROR(result); - // qnr - result = NewFfElement(Fq, &qnr); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq, ¶ms->qnr, sizeof(params->qnr), qnr); - BREAK_ON_EPID_ERROR(result); - // 4. twista = (a * qnr * qnr) mod q - result = NewFfElement(Fq, &fq_twista); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq, ¶ms->a, sizeof(params->a), fq_twista); - BREAK_ON_EPID_ERROR(result); - result = FfMul(Fq, fq_twista, qnr, fq_twista); - BREAK_ON_EPID_ERROR(result); - result = FfMul(Fq, fq_twista, qnr, fq_twista); - BREAK_ON_EPID_ERROR(result); - // twista = {twista, 0, 0} - result = WriteFfElement(Fq, fq_twista, &(tmp_Fq3_str.a[0]), - sizeof(tmp_Fq3_str.a[0])); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(Fqd, &fqd_twista); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fqd, &tmp_Fq3_str, sizeof(tmp_Fq3_str), fqd_twista); - BREAK_ON_EPID_ERROR(result); - // 5. twistb = (b * qnr * qnr * qnr) mod q - result = NewFfElement(Fq, &fq_twistb); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fq, ¶ms->b, sizeof(params->b), fq_twistb); - BREAK_ON_EPID_ERROR(result); - result = FfMul(Fq, fq_twistb, qnr, fq_twistb); - BREAK_ON_EPID_ERROR(result); - result = FfMul(Fq, fq_twistb, qnr, fq_twistb); - BREAK_ON_EPID_ERROR(result); - result = FfMul(Fq, fq_twistb, qnr, fq_twistb); - BREAK_ON_EPID_ERROR(result); - // twistb = {twistb, 0, 0} - result = WriteFfElement(Fq, fq_twistb, &(tmp_Fq3_str.a[0]), - sizeof(tmp_Fq3_str.a[0])); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(Fqd, &fqd_twistb); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(Fqd, &tmp_Fq3_str, sizeof(tmp_Fq3_str), fqd_twistb); - BREAK_ON_EPID_ERROR(result); - // order - result = NewBigNum(3 * sizeof(BigNumStr), &order); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(¶ms->orderG2, sizeof(params->orderG2), order); - BREAK_ON_EPID_ERROR(result); - // h - result = NewBigNum(sizeof(BigNumStr), &h); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(¶ms->h, sizeof(params->h), h); - BREAK_ON_EPID_ERROR(result); - - // 6. Set G2 = E(Fqd).init(orderG2, param(Fqd), twista, twistb, g2.x, g2.y) - result = NewEcGroup(Fqd, fqd_twista, fqd_twistb, g2_x, g2_y, order, h, &ec); - BREAK_ON_EPID_ERROR(result); - *G2 = ec; - result = kEpidNoErr; - } while (0); - - DeleteBigNum(&h); - DeleteBigNum(&order); - DeleteFfElement(&qnr); - DeleteFfElement(&fqd_twistb); - DeleteFfElement(&fq_twistb); - DeleteFfElement(&fqd_twista); - DeleteFfElement(&fq_twista); - DeleteFfElement(&g2_y); - DeleteFfElement(&g2_x); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params.h deleted file mode 100644 index c00af22224..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params.h +++ /dev/null @@ -1,75 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_1_1_SRC_EPID11PARAMS_H_ -#define EPID_COMMON_1_1_SRC_EPID11PARAMS_H_ -/*! - * \file - * \brief Intel(R) EPID 1.1 constant parameters interface. - * \addtogroup EpidCommon - * @{ - */ -#include "epid/common/1.1/types.h" -#include "epid/common/math/bignum.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/tatepairing.h" - -/// Internal representation of Epid11Params -typedef struct Epid11Params_ { - BigNum* p; ///< a prime - BigNum* p_tick; ///< a prime - EcPoint* g1; ///< a generator (an element) of G1 - EcPoint* g2; ///< a generator (an element) of G2 - EcPoint* g3; ///< a generator (an element) of G3 - - FiniteField* Fp; ///< Finite field Fp - FiniteField* Fq; ///< Finite field Fq - FiniteField* Fp_tick; ///< Finite field Fp' - FiniteField* Fq_tick; ///< Finite field Fq' - FiniteField* Fqd; ///< Finite field Fqd, an extension of Fq - FiniteField* GT; ///< GT is a quadratic field extension Fqk of Fqd - - EcGroup* G1; ///< Elliptic curve group over finite field Fq - EcGroup* G2; ///< Elliptic curve group over finite field Fqd - EcGroup* G3; ///< Elliptic curve group over finite field Fq' - - Epid11PairingState* pairing_state; ///< Pairing state -} Epid11Params_; - -/// Constructs the internal representation of Epid11Params -/*! - Allocates memory for the internal representation of Epid11Params. Initialize - the Epid11Params. Use DeleteEpid11Params() to deallocate memory. - - \param[in,out] params - Internal Epid11Params - - \returns ::EpidStatus - \see DeleteEpid11Params -*/ -EpidStatus CreateEpid11Params(Epid11Params_** params); -/// Deallocates storage for internal representation of Epid11Params -/*! - Frees the memory and nulls the pointer. - - \param[in,out] params - params to be deallocated - - \see CreateEpid11Params -*/ -void DeleteEpid11Params(Epid11Params_** params); -/*! @} */ -#endif // EPID_COMMON_1_1_SRC_EPID11PARAMS_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params_tate.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params_tate.inc deleted file mode 100644 index 248b2713fb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/epid11params_tate.inc +++ /dev/null @@ -1,160 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Intel(R) EPID 1.1 constant parameters data. - * - */ - {{{ // p - 0x00, 0x00, 0x89, 0x57, 0x3F, 0x17, 0x47, 0x30, 0x8C, 0x43, 0xD5, 0xEE, - 0x41, 0x97, 0x96, 0x19, 0x72, 0xBB, 0x86, 0x88, 0xED, 0x4B, 0xEF, 0x04, - 0xAB, 0xAE, 0xC3, 0x8E, 0xEC, 0x51, 0xC3, 0xD3 - }}}, - {{{ // q - 0x09, 0xF9, 0x24, 0xE5, 0xD9, 0xBC, 0x67, 0x7F, 0x81, 0x0D, 0xF0, 0x25, - 0x58, 0xF7, 0x53, 0x13, 0xA9, 0x8A, 0xA6, 0x10, 0x47, 0x65, 0x5D, 0x73, - 0x9E, 0xF1, 0x94, 0xEB, 0x05, 0xB1, 0xA7, 0x11 - }}}, - {{ // h - 0x00, 0x00, 0x12, 0x97 - }}, - {{{ // a - 0x05, 0x53, 0xD7, 0xC8, 0x81, 0xF7, 0x78, 0xC2, 0x2C, 0x37, 0xB6, 0xC0, - 0x16, 0x3E, 0x68, 0x24, 0x3A, 0x84, 0x78, 0x1C, 0x0A, 0xDF, 0x9B, 0xB3, - 0xED, 0x21, 0xC4, 0x46, 0xE5, 0xA7, 0xA3, 0x92 - }}}, - {{{ // b - 0x00, 0x3A, 0x2E, 0x39, 0x0E, 0x10, 0xD8, 0xAC, 0x47, 0xCB, 0x29, 0xC8, - 0xF1, 0x2C, 0x7F, 0x11, 0x99, 0x2A, 0x18, 0xB7, 0xEF, 0x73, 0x48, 0xA6, - 0xBE, 0x70, 0xA6, 0x8B, 0x97, 0x34, 0x8A, 0xB1 - }}}, - { // coeff - {{{ // coeff[0] - 0x02, 0x16, 0x7A, 0x61, 0x53, 0xDD, 0xF6, 0xE2, 0x89, 0x15, 0xA0, 0x94, - 0xF1, 0xB5, 0xDC, 0x65, 0x21, 0x15, 0x62, 0xE1, 0x7D, 0xC5, 0x43, 0x89, - 0xEE, 0xB4, 0xEF, 0xC8, 0xA0, 0x8E, 0x34, 0x0F - }}}, - {{{ // coeff[1] - 0x04, 0x82, 0x27, 0xE1, 0xEB, 0x98, 0x64, 0xC2, 0x8D, 0x8F, 0xDD, 0x0E, - 0x82, 0x40, 0xAE, 0xD4, 0x31, 0x63, 0xD6, 0x46, 0x32, 0x16, 0x85, 0x7A, - 0xB7, 0x18, 0x68, 0xB8, 0x17, 0x02, 0x81, 0xA6 - }}}, - {{{ // coeff[2] - 0x06, 0x20, 0x76, 0xE8, 0x54, 0x54, 0x53, 0xB4, 0xA9, 0xD8, 0x44, 0x4B, - 0xAA, 0xFB, 0x1C, 0xFD, 0xAE, 0x15, 0xCA, 0x29, 0x79, 0xA6, 0x24, 0xA4, - 0x0A, 0xF6, 0x1E, 0xAC, 0xED, 0xFB, 0x10, 0x41 - }}}, - }, - {{{ // qnr - 0x08, 0x66, 0xA7, 0x67, 0x36, 0x6E, 0x62, 0x71, 0xB7, 0xA6, 0x52, 0x94, - 0x8F, 0xFB, 0x25, 0x9E, 0xE6, 0x4F, 0x25, 0xE5, 0x26, 0x9A, 0x2B, 0x6E, - 0x7E, 0xF8, 0xA6, 0x39, 0xAE, 0x46, 0xAA, 0x24 - }}}, - {{ // orderG2 - 0x00, 0x03, 0xDF, 0xFC, 0xBE, 0x2F, 0x5C, 0x2E, 0x45, 0x49, 0x7A, 0x2A, - 0x91, 0xBA, 0xD1, 0x3E, 0x01, 0xEC, 0x5F, 0xC2, 0x15, 0x14, 0x10, 0xB3, - 0x28, 0x5E, 0x56, 0xCC, 0x26, 0x51, 0x24, 0x93, 0x0E, 0x6C, 0x99, 0x96, - 0x38, 0xE0, 0x7D, 0x68, 0x8C, 0xB7, 0x97, 0x23, 0xF4, 0xAC, 0x4D, 0xBC, - 0x5E, 0x01, 0x15, 0xFF, 0x45, 0x60, 0x08, 0x13, 0xCD, 0x59, 0xD7, 0x73, - 0xB0, 0x0C, 0x20, 0x5E, 0xAB, 0xAA, 0x24, 0x31, 0xE2, 0x2A, 0xA2, 0x53, - 0x8A, 0xF7, 0x86, 0xD5, 0x19, 0x78, 0xC5, 0x55, 0x9C, 0x08, 0xB7, 0xE2, - 0xF4, 0xD0, 0x37, 0x74, 0x93, 0x56, 0x62, 0x7B, 0x95, 0xCC, 0x2C, 0xB0 - }}, - {{{ // p_tick - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE6, 0xFA, 0xAD, 0xA7, 0x17, 0x9E, 0x84, - 0xF3, 0xB9, 0xCA, 0xC2, 0xFC, 0x63, 0x25, 0x51 - }}}, - {{{ // q_tick - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF - }}}, - {{ // h_tick - 0x00, 0x00, 0x00, 0x01 - }}, - {{{ // a_tick - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC - }}}, - {{{ // b_tick - 0x5A, 0xC6, 0x35, 0xD8, 0xAA, 0x3A, 0x93, 0xE7, 0xB3, 0xEB, 0xBD, 0x55, - 0x76, 0x98, 0x86, 0xBC, 0x65, 0x1D, 0x06, 0xB0, 0xCC, 0x53, 0xB0, 0xF6, - 0x3B, 0xCE, 0x3C, 0x3E, 0x27, 0xD2, 0x60, 0x4B - }}}, - { // g1 - {{{ // x - 0x07, 0x78, 0x3B, 0x0D, 0xFE, 0x4A, 0xA3, 0x19, 0x49, 0xB0, 0xCE, 0xAF, - 0x3F, 0x74, 0x0F, 0x32, 0x16, 0x0C, 0x8B, 0x46, 0x94, 0x5B, 0xA5, 0xB0, - 0xE4, 0x8A, 0xDA, 0xD8, 0x88, 0x32, 0x90, 0x53 - }}}, - {{{ // y - 0x08, 0xF7, 0xA2, 0xAA, 0xBA, 0x62, 0xB3, 0xFE, 0x29, 0x80, 0xC9, 0x5B, - 0x63, 0x53, 0xC8, 0x24, 0x3C, 0x7C, 0x1F, 0x4C, 0xDA, 0xCD, 0xE5, 0x5F, - 0xA2, 0x36, 0x93, 0x04, 0x3C, 0x3A, 0xBC, 0x2E - }}}, - }, - { // g2 - { // x - {{{ // x[0] - 0x02, 0x10, 0x9A, 0xF4, 0x06, 0x32, 0x30, 0x89, 0xCB, 0x95, 0xE9, 0x55, - 0x0E, 0x9D, 0xAF, 0x0E, 0x98, 0xCD, 0xCA, 0xDC, 0xB1, 0xFF, 0xFC, 0xD1, - 0x45, 0x66, 0xBB, 0x86, 0x46, 0x1E, 0x8C, 0x30 - }}}, - {{{ // x[1] - 0x04, 0x78, 0x53, 0xE1, 0x3F, 0x96, 0xC5, 0xE4, 0x15, 0x23, 0x7B, 0x1F, - 0x3F, 0x2C, 0xD3, 0x95, 0x40, 0xBC, 0x7A, 0x31, 0x1F, 0x14, 0x38, 0x9E, - 0x1A, 0xA5, 0xD6, 0x63, 0x10, 0x91, 0xE4, 0xD3 - }}}, - {{{ // x[2] - 0x00, 0xB4, 0x02, 0xBC, 0x47, 0xFA, 0xA6, 0x29, 0x82, 0x0B, 0xB1, 0xD5, - 0xFF, 0xF2, 0xE6, 0xB0, 0xC6, 0xAE, 0xE8, 0x7B, 0x91, 0xD9, 0xEE, 0x66, - 0x07, 0x1F, 0xFD, 0xA2, 0xE7, 0x02, 0x66, 0xDD - }}}, - }, - { // y - {{{ // y[0] - 0x05, 0x2E, 0xF8, 0xC6, 0xC1, 0x6A, 0xEF, 0x3C, 0xC1, 0x95, 0xF6, 0x26, - 0xCE, 0x5E, 0x55, 0xD1, 0x64, 0x13, 0x28, 0xB1, 0x18, 0x57, 0xD8, 0x1B, - 0x84, 0xFA, 0xEC, 0x7E, 0x5D, 0x99, 0x06, 0x49 - }}}, - {{{ // y[1] - 0x05, 0x73, 0x35, 0xA9, 0xA7, 0xF2, 0xA1, 0x92, 0x5F, 0x3E, 0x7C, 0xDF, - 0xAC, 0xFE, 0x0F, 0xF5, 0x08, 0xD0, 0x3C, 0xAE, 0xCD, 0x58, 0x00, 0x5F, - 0xD0, 0x84, 0x7E, 0xEA, 0x63, 0x57, 0xFE, 0xC6 - }}}, - {{{ // y[2] - 0x01, 0x56, 0xDA, 0xF3, 0x72, 0x61, 0xDA, 0xC6, 0x93, 0xB0, 0xAC, 0xEF, - 0xAA, 0xD4, 0x51, 0x6D, 0xCA, 0x71, 0x1E, 0x06, 0x73, 0xEA, 0x83, 0xB2, - 0xB1, 0x99, 0x4A, 0x4D, 0x4A, 0x0D, 0x35, 0x07 - }}}, - }, - }, - { // g3 - {{{ // x - 0x6B, 0x17, 0xD1, 0xF2, 0xE1, 0x2C, 0x42, 0x47, 0xF8, 0xBC, 0xE6, 0xE5, - 0x63, 0xA4, 0x40, 0xF2, 0x77, 0x03, 0x7D, 0x81, 0x2D, 0xEB, 0x33, 0xA0, - 0xF4, 0xA1, 0x39, 0x45, 0xD8, 0x98, 0xC2, 0x96 - }}}, - {{{ // y - 0x4F, 0xE3, 0x42, 0xE2, 0xFE, 0x1A, 0x7F, 0x9B, 0x8E, 0xE7, 0xEB, 0x4A, - 0x7C, 0x0F, 0x9E, 0x16, 0x2B, 0xCE, 0x33, 0x57, 0x6B, 0x31, 0x5E, 0xCE, - 0xCB, 0xB6, 0x40, 0x68, 0x37, 0xBF, 0x51, 0xF5 - }}}, - } diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/file_parser.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/file_parser.c deleted file mode 100644 index bf3d79d085..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/file_parser.c +++ /dev/null @@ -1,187 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/// Implementation of 1.1 issuer material file parsing utilities. -/*! - * \file - */ -#include "epid/common/1.1/file_parser.h" -#include - -#include "epid/common/math/ecdsa.h" -#include "epid/common/src/memory.h" -#include "epid/common/src/file_parser-internal.h" - -/// Intel(R) EPID 1.1 Group Public Key binary format -typedef struct Epid11GroupPubKeyCertificate { - EpidFileHeader header; ///< Intel(R) EPID binary file header - Epid11GroupId gid; ///< group ID - Epid11G1ElemStr h1; ///< an element in G1 - Epid11G1ElemStr h2; ///< an element in G1 - Epid11G2ElemStr w; ///< an element in G2 - EcdsaSignature signature; ///< ECDSA Signature on SHA-256 of above values -} Epid11GroupPubKeyCertificate; - -/// Parse a file with a revocation list of any type -static EpidStatus Epid11ParseRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, void* rl, - size_t* rl_len, EpidFileType file_type) { - size_t min_rl_file_size = 0; - size_t empty_rl_size = 0; - size_t rl_entry_size = 0; - EpidStatus result = kEpidErr; - EpidFileHeader const* file_header = (EpidFileHeader*)buf; - void const* buf_rl = - (void const*)((unsigned char*)buf + sizeof(EpidFileHeader)); - size_t buf_rl_len = 0; - EcdsaSignature const* signature = NULL; - - if (!buf || !cert || !rl_len) return kEpidBadArgErr; - - switch (file_type) { - case kPrivRlFile: - empty_rl_size = sizeof(Epid11PrivRl) - sizeof(((Epid11PrivRl*)0)->f[0]); - rl_entry_size = sizeof(((Epid11PrivRl*)0)->f[0]); - min_rl_file_size = sizeof(EpidFileHeader) + sizeof(Epid11PrivRl) - - sizeof(((Epid11PrivRl*)0)->f[0]) + - sizeof(EcdsaSignature); - break; - case kSigRlFile: - empty_rl_size = sizeof(Epid11SigRl) - sizeof(((Epid11SigRl*)0)->bk[0]); - rl_entry_size = sizeof(((Epid11SigRl*)0)->bk[0]); - min_rl_file_size = sizeof(EpidFileHeader) + sizeof(Epid11SigRl) - - sizeof(((Epid11SigRl*)0)->bk[0]) + - sizeof(EcdsaSignature); - break; - case kGroupRlFile: - empty_rl_size = - sizeof(Epid11GroupRl) - sizeof(((Epid11GroupRl*)0)->gid[0]); - rl_entry_size = sizeof(((Epid11GroupRl*)0)->gid[0]); - min_rl_file_size = sizeof(EpidFileHeader) + sizeof(Epid11GroupRl) - - sizeof(((Epid11GroupRl*)0)->gid[0]) + - sizeof(EcdsaSignature); - break; - default: - return kEpidErr; - } - - if (min_rl_file_size > len) return kEpidBadArgErr; - - // Verify that Intel(R) EPID file header in the buffer is correct - if (0 != memcmp(&file_header->epid_version, &kEpidVersionCode[kEpid1x], - sizeof(kEpidVersionCode[kEpid1x]))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&file_header->file_type, &kEpidFileTypeCode[file_type], - sizeof(file_header->file_type))) { - return kEpidBadArgErr; - } - - // Verify that CA certificate is correct - result = EpidVerifyCaCertificate(cert); - if (kEpidNoErr != result) return result; - - // Verify that RL in file buffer contains of integer number of entries - buf_rl_len = len - sizeof(EpidFileHeader) - sizeof(EcdsaSignature); - if (0 != ((buf_rl_len - empty_rl_size) % rl_entry_size)) { - return kEpidBadArgErr; - } - - signature = - (EcdsaSignature*)((unsigned char*)buf + len - sizeof(EcdsaSignature)); - // Authenticate signature for buffer - result = EcdsaVerifyBuffer(buf, len - sizeof(EcdsaSignature), - (EcdsaPublicKey*)&cert->pubkey, signature); - if (kEpidSigValid != result) return result; - - buf_rl_len = len - sizeof(EpidFileHeader) - sizeof(EcdsaSignature); - - // If pointer to output buffer is NULL it should return required size of RL - if (!rl) { - *rl_len = buf_rl_len; - return kEpidNoErr; - } - - if (*rl_len < buf_rl_len) return kEpidBadArgErr; - *rl_len = buf_rl_len; - - // Copy revocation list from file buffer to output - // Memory copy is used to copy a revocation list of variable length - if (0 != memcpy_S(rl, *rl_len, buf_rl, buf_rl_len)) return kEpidBadArgErr; - - return kEpidNoErr; -} - -EpidStatus Epid11ParseGroupPubKeyFile(void const* buf, size_t len, - EpidCaCertificate const* cert, - Epid11GroupPubKey* pubkey) { - EpidStatus result = kEpidErr; - Epid11GroupPubKeyCertificate* buf_pubkey = (Epid11GroupPubKeyCertificate*)buf; - - if (!buf || !cert || !pubkey) { - return kEpidBadArgErr; - } - - if (sizeof(Epid11GroupPubKeyCertificate) > len) { - return kEpidBadArgErr; - } - - // Verify that Intel(R) EPID file header in the buffer is correct - if (0 != memcmp(&buf_pubkey->header.epid_version, &kEpidVersionCode[kEpid1x], - sizeof(buf_pubkey->header.epid_version))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&buf_pubkey->header.file_type, - &kEpidFileTypeCode[kGroupPubKeyFile], - sizeof(buf_pubkey->header.file_type))) { - return kEpidBadArgErr; - } - - // Verify that CA certificate is correct - result = EpidVerifyCaCertificate(cert); - if (kEpidNoErr != result) return result; - - // Authenticate signature for buffer - result = EcdsaVerifyBuffer( - buf_pubkey, sizeof(Epid11GroupPubKeyCertificate) - sizeof(EcdsaSignature), - (EcdsaPublicKey*)&cert->pubkey, &buf_pubkey->signature); - if (kEpidSigValid != result) return result; - - // Copy group public key from the buffer to output - pubkey->gid = buf_pubkey->gid; - pubkey->h1 = buf_pubkey->h1; - pubkey->h2 = buf_pubkey->h2; - pubkey->w = buf_pubkey->w; - - return kEpidNoErr; -} - -EpidStatus Epid11ParsePrivRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, - Epid11PrivRl* rl, size_t* rl_len) { - return Epid11ParseRlFile(buf, len, cert, rl, rl_len, kPrivRlFile); -} - -EpidStatus Epid11ParseSigRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, Epid11SigRl* rl, - size_t* rl_len) { - return Epid11ParseRlFile(buf, len, cert, rl, rl_len, kSigRlFile); -} - -EpidStatus Epid11ParseGroupRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, - Epid11GroupRl* rl, size_t* rl_len) { - return Epid11ParseRlFile(buf, len, cert, rl, rl_len, kGroupRlFile); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/grouppubkey.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/grouppubkey.c deleted file mode 100644 index 790e5bccb0..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/grouppubkey.c +++ /dev/null @@ -1,82 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Intel(R) EPID 1.1 group public key implementation. - */ -#include "epid/common/1.1/src/grouppubkey.h" -#include "epid/common/src/memory.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -EpidStatus CreateEpid11GroupPubKey(Epid11GroupPubKey const* pub_key_str, - EcGroup* G1, EcGroup* G2, - Epid11GroupPubKey_** pub_key) { - EpidStatus result = kEpidErr; - Epid11GroupPubKey_* pubkey = NULL; - if (!pub_key_str || !G1 || !G2 || !pub_key) { - return kEpidBadArgErr; - } - do { - pubkey = SAFE_ALLOC(sizeof(Epid11GroupPubKey_)); - if (!pubkey) { - result = kEpidMemAllocErr; - break; - } - result = NewEcPoint(G1, &pubkey->h1); - BREAK_ON_EPID_ERROR(result); - result = - ReadEcPoint(G1, &pub_key_str->h1, sizeof(pub_key_str->h1), pubkey->h1); - BREAK_ON_EPID_ERROR(result); - result = NewEcPoint(G1, &pubkey->h2); - BREAK_ON_EPID_ERROR(result); - result = - ReadEcPoint(G1, &pub_key_str->h2, sizeof(pub_key_str->h2), pubkey->h2); - BREAK_ON_EPID_ERROR(result); - result = NewEcPoint(G2, &pubkey->w); - BREAK_ON_EPID_ERROR(result); - result = - ReadEcPoint(G2, &pub_key_str->w, sizeof(pub_key_str->w), pubkey->w); - BREAK_ON_EPID_ERROR(result); - pubkey->gid = pub_key_str->gid; - *pub_key = pubkey; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result && pubkey) { - DeleteEcPoint(&pubkey->w); - DeleteEcPoint(&pubkey->h2); - DeleteEcPoint(&pubkey->h1); - SAFE_FREE(pubkey); - } - return result; -} - -void DeleteEpid11GroupPubKey(Epid11GroupPubKey_** pub_key) { - if (pub_key && *pub_key) { - DeleteEcPoint(&(*pub_key)->w); - DeleteEcPoint(&(*pub_key)->h2); - DeleteEcPoint(&(*pub_key)->h1); - - SAFE_FREE(*pub_key); - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/grouppubkey.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/grouppubkey.h deleted file mode 100644 index 49db3302b0..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/src/grouppubkey.h +++ /dev/null @@ -1,69 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_1_1_SRC_GROUPPUBKEY_H_ -#define EPID_COMMON_1_1_SRC_GROUPPUBKEY_H_ -/*! - * \file - * \brief Intel(R) EPID 1.1 group public key interface. - * \addtogroup EpidCommon - * @{ - */ -#include "epid/common/errors.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/1.1/types.h" - -/// Internal representation of Epid11GroupPubKey -typedef struct Epid11GroupPubKey_ { - Epid11GroupId gid; ///< group ID - EcPoint* h1; ///< an element in G1 - EcPoint* h2; ///< an element in G1 - EcPoint* w; ///< an element in G2 -} Epid11GroupPubKey_; - -/// Constructs internal representation of Intel(R) EPID 1.1 group public key -/*! - Allocates memory and initializes gid, h1, h2, w parameters. Use - DeleteEpid11GroupPubKey() to deallocate memory - - \param[in] pub_key_str - Oct string representation of group public key - \param[in] G1 - EcGroup containing elements h1 and h2 - \param[in] G2 - EcGroup containing element w - \param[out] pub_key - Group public key: (gid, h1, h2, w) - - \returns ::EpidStatus - \see DeleteEpid11GroupPubKey -*/ -EpidStatus CreateEpid11GroupPubKey(Epid11GroupPubKey const* pub_key_str, - EcGroup* G1, EcGroup* G2, - Epid11GroupPubKey_** pub_key); - -/// Deallocates storage for internal representation Intel(R) EPID 1.1 group -/// public key -/*! - Frees memory pointed to by Epid11GroupPubKey. Nulls the pointer. - - \param[in] pub_key - Epid11GroupPubKey to be freed - - \see CreateEpid11GroupPubKey -*/ -void DeleteEpid11GroupPubKey(Epid11GroupPubKey_** pub_key); -/*! @} */ -#endif // EPID_COMMON_1_1_SRC_GROUPPUBKEY_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/types.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/types.h deleted file mode 100644 index dba9d08215..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/types.h +++ /dev/null @@ -1,208 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_1_1_TYPES_H_ -#define EPID_COMMON_1_1_TYPES_H_ - -/*! -* \file -* \brief SDK data types for Intel(R) EPID 1.1. -*/ - -#include // for CHAR_BIT - -#include "epid/common/types.h" - -/// Intel(R) EPID 1.1 specific data types. -/*! -\defgroup Epid11Types EPID 1.1 specific types -Defines serialized data types used by the SDK. These data types -are only used by components that need to do Intel(R) EPID 1.1 -verification. - -\ingroup EpidTypes -\see EPID 1.1 -support -@{ -*/ - -#pragma pack(1) - -/// 80 bit octet string -typedef struct OctStr80 { - unsigned char data[80 / CHAR_BIT]; ///< 80 bit data -} OctStr80; - -/// 600 bit octet string -typedef struct OctSt600 { - unsigned char data[600 / CHAR_BIT]; ///< 600 bit data -} OctStr600; - -/// 768 bit octet string -typedef struct OctStr768 { - unsigned char data[768 / CHAR_BIT]; ///< 768 bit data -} OctStr768; - -/// Serialized Fq3 element -typedef struct Fq3ElemStr { - FqElemStr a[3]; ///< polynomial coefficient -} Fq3ElemStr; - -/// Serialized Intel(R) EPID 1.1 G1 element -typedef G1ElemStr Epid11G1ElemStr; - -/// Serialized Intel(R) EPID 1.1 G3 element -typedef G1ElemStr Epid11G3ElemStr; - -/// Serialized Intel(R) EPID 1.1 G2 element -typedef struct Epid11G2ElemStr { - FqElemStr x[3]; ///< an integer between [0, q-1] - FqElemStr y[3]; ///< an integer between [0, q-1] -} Epid11G2ElemStr; - -/// Serialized Intel(R) EPID 1.1 GT element -typedef struct Epid11GtElemStr { - Fq3ElemStr a[2]; ///< an element in Fq3 -} Epid11GtElemStr; - -/// Intel(R) EPID 1.1 Parameters. -/*! -Intel(R) EPID 1.1 parameters are: (p, q, h, a, b, coeff, qnr, orderG2, p', q', -h', a', b', g1, g2, g3). The size of the Intel(R) EPID public parameters of G1, -G2, G3, and GT is 6464 bits or 808 bytes. -*/ -typedef struct Epid11Params { - BigNumStr p; ///< a prime - BigNumStr q; ///< a prime - OctStr32 h; ///< a small integer, also denoted as cofactor - FqElemStr a; ///< an integer between [0, q-1] - FqElemStr b; ///< an integer between [0, q-1] - /*! the coefficients of an irreducible polynomial - coeff[0], coeff[1], coeff[2] are 256-bit integers between [0, q - 1]*/ - BigNumStr coeff[3]; - FqElemStr qnr; ///< a quadratic non-residue (an integer between [0, q-1]) - OctStr768 orderG2; ///< the total number of points in G2 elliptic curve - BigNumStr p_tick; ///< a prime - BigNumStr q_tick; ///< a prime - OctStr32 h_tick; ///< a small integer, also denoted as cofactor - FqElemStr a_tick; ///< an integer between [0, q-1] - FqElemStr b_tick; ///< an integer between [0, q-1] - Epid11G1ElemStr g1; ///< a generator(an element) of G1 - Epid11G2ElemStr g2; ///< a generator (an element) of G2 - Epid11G1ElemStr g3; ///< a generator (an element) of G3 -} Epid11Params; - -/// Intel(R) EPID 1.1 group ID -typedef OctStr32 Epid11GroupId; - -/// Intel(R) EPID 1.1 group public key -/*! -* Group public key: (gid, h1, h2, w) -*/ -typedef struct Epid11GroupPubKey { - Epid11GroupId gid; ///< group ID - Epid11G1ElemStr h1; ///< an element in G1 - Epid11G1ElemStr h2; ///< an element in G1 - Epid11G2ElemStr w; ///< an element in G2 -} Epid11GroupPubKey; - -/// Intel(R) EPID 1.1 basic signature. -/*! -* Basic signature: (B, K, T1, T2, c, nd, sx, sy, sf, sa, sb, salpha, sbeta) -*/ -typedef struct Epid11BasicSignature { - OctStr32 bv; ///For backward compatibility only - Epid11G3ElemStr B; ///< an element in G3 - Epid11G3ElemStr K; ///< an element in G3 - Epid11G1ElemStr T1; ///< an element in G1 - Epid11G1ElemStr T2; ///< an element in G1 - OctStr256 c; ///< a 256-bit integer - OctStr80 nd; ///< an 80-bit integer - FpElemStr sx; ///< an integer between [0, p-1] - FpElemStr sy; ///< an integer between [0, p-1] - OctStr600 sf; ///< a 593-bit integer - FpElemStr sa; ///< an integer between [0, p-1] - FpElemStr sb; ///< an integer between [0, p-1] - FpElemStr salpha; ///< an integer between [0, p-1] - FpElemStr sbeta; ///< an integer between [0, p-1] -} Epid11BasicSignature; - -/// Intel(R) EPID 1.1 non-revoked Proof -/*! -* Non-revoked Proof: (T, c, smu, snu) -*/ -typedef struct Epid11NrProof { - Epid11G3ElemStr T; ///< an element in G3 - OctStr256 c; ///< a 256-bit integer - FpElemStr smu; ///< an integer between [0, p'-1] - FpElemStr snu; ///< an integer between [0, p'-1] -} Epid11NrProof; - -/// Intel(R) EPID 1.1 Signature -/*! -* Signature: (sigma0, RLver, n2, sigma[0], ..., sigma[n2-1]) -*/ -typedef struct Epid11Signature { - Epid11BasicSignature sigma0; ///< basic signature - OctStr32 rl_ver; ///< revocation list version number - OctStr32 n2; ///< number of entries in SigRL - Epid11NrProof sigma[1]; ///< array of non-revoked proofs (flexible array) -} Epid11Signature; - -/// Intel(R) EPID 1.1 private-key based revocation list -/*! -* Private-key based revocation list PrivRL: (gid, RLver, n1, f[0], -* ..., f[n1-1]) -*/ -typedef struct Epid11PrivRl { - Epid11GroupId gid; ///< group ID - OctStr32 version; ///< revocation list version number - OctStr32 n1; ///< number of entries in PrivRL - FpElemStr f[1]; ///< integers between [1, p-1] (flexible array) -} Epid11PrivRl; - -/// Intel(R) EPID 1.1 entry in SigRL (B,K) -typedef struct Epid11SigRlEntry { - Epid11G3ElemStr b; ///< an element of G1 - Epid11G3ElemStr k; ///< an element of G1 -} Epid11SigRlEntry; - -/// Intel(R) EPID 1.1 signature based revocation list -/*! -* Signature based revocation list SigRL: (gid, RLver, n2, B[0], -* K[0], ..., B[n2-1], K[n2-1]) -*/ -typedef struct Epid11SigRl { - Epid11GroupId gid; ///< group ID - OctStr32 version; ///< revocation list version number - OctStr32 n2; ///< number of entries in SigRL - Epid11SigRlEntry bk[1]; ///< revoked Bs and Ks (flexible array) -} Epid11SigRl; - -/// Intel(R) EPID 1.1 group revocation list -/*! -* Group revocation list GroupRL: (RLver, n3, gid[0], ..., -* gid[n3-1]) -*/ -typedef struct Epid11GroupRl { - OctStr32 version; ///< revocation list version number - OctStr32 n3; ///< number of entries in GroupRL - Epid11GroupId gid[1]; ///< revoked group IDs (flexible array) -} Epid11GroupRl; - -#pragma pack() - -/*! @} */ -#endif // EPID_COMMON_1_1_TYPES_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/unittests/file_parser-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/unittests/file_parser-test.cc deleted file mode 100644 index 59d1541c7d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/1.1/unittests/file_parser-test.cc +++ /dev/null @@ -1,1426 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/// 1.1 issuer material file parsing unit tests. -/*! - * \file - */ -#include -#include - -#include "gtest/gtest.h" -extern "C" { -#include "epid/common/1.1/file_parser.h" -} - -namespace { - -/// Test fixture class for Epid11FileParser -class Epid11FileParser : public ::testing::Test { - public: - /// Cert used to sign legitimate test data - static const EpidCaCertificate kCert; - - /// A file with Epid11GroupPublicKey signed with kCert - static const std::vector kGroupPublicKeyFile; - /// A file with two Epid11GroupPublicKey signed with kCert - static const std::vector kGroupMultiPublicKeyFile; - /// Expected Epid11GroupPublicKey - static const std::vector kGroupPublicKey; - - /// A file with empty privrl signed with kCert - static const std::vector kEmptyPrivRlFile; - /// Expected empty privrl - static const std::vector kEmptyPrivRl; - /// A file with short privrl signed with kCert - static const std::vector kShortPrivRlFile; - /// Expected short privrl - static const std::vector kShortPrivRl; - - /// A file with empty SigRl signed with kCert - static const std::vector kEmptySigRlFile; - /// Expected empty SigRl - static const std::vector kEmptySigRl; - /// A file with short SigRl signed with kCert - static const std::vector kShortSigRlFile; - /// Expected short SigRl - static const std::vector kShortSigRl; - - /// A file with empty GroupRl signed with kCert - static const std::vector kEmptyGroupRlFile; - /// Expected empty GroupRl - static const std::vector kEmptyGroupRl; - /// A file with short GroupRl signed with kCert - static const std::vector kShortGroupRlFile; - /// Expected short GroupRl - static const std::vector kShortGroupRl; -}; -const EpidCaCertificate Epid11FileParser::kCert = { - // EpidFileHeader::epid_version - 0x02, 0x00, - // EpidFileHeader::file_type - 0x00, 0x11, - // pubkey - 0x24, 0x42, 0xa5, 0xcc, 0x0e, 0xcd, 0x01, 0x5f, 0xa3, 0xca, 0x31, 0xdc, - 0x8e, 0x2b, 0xbc, 0x70, 0xbf, 0x42, 0xd6, 0x0c, 0xbc, 0xa2, 0x00, 0x85, - 0xe0, 0x82, 0x2c, 0xb0, 0x42, 0x35, 0xe9, 0x70, 0x6f, 0xc9, 0x8b, 0xd7, - 0xe5, 0x02, 0x11, 0xa4, 0xa2, 0x71, 0x02, 0xfa, 0x35, 0x49, 0xdf, 0x79, - 0xeb, 0xcb, 0x4b, 0xf2, 0x46, 0xb8, 0x09, 0x45, 0xcd, 0xdf, 0xe7, 0xd5, - 0x09, 0xbb, 0xfd, 0x7d, - // prime - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - // a - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - // b - 0x5a, 0xc6, 0x35, 0xd8, 0xaa, 0x3a, 0x93, 0xe7, 0xb3, 0xeb, 0xbd, 0x55, - 0x76, 0x98, 0x86, 0xbc, 0x65, 0x1d, 0x06, 0xb0, 0xcc, 0x53, 0xb0, 0xf6, - 0x3b, 0xce, 0x3c, 0x3e, 0x27, 0xd2, 0x60, 0x4b, - // x - 0x6b, 0x17, 0xd1, 0xf2, 0xe1, 0x2c, 0x42, 0x47, 0xf8, 0xbc, 0xe6, 0xe5, - 0x63, 0xa4, 0x40, 0xf2, 0x77, 0x03, 0x7d, 0x81, 0x2d, 0xeb, 0x33, 0xa0, - 0xf4, 0xa1, 0x39, 0x45, 0xd8, 0x98, 0xc2, 0x96, - // y - 0x4f, 0xe3, 0x42, 0xe2, 0xfe, 0x1a, 0x7f, 0x9b, 0x8e, 0xe7, 0xeb, 0x4a, - 0x7c, 0x0f, 0x9e, 0x16, 0x2b, 0xce, 0x33, 0x57, 0x6b, 0x31, 0x5e, 0xce, - 0xcb, 0xb6, 0x40, 0x68, 0x37, 0xbf, 0x51, 0xf5, - // r - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xbc, 0xe6, 0xfa, 0xad, 0xa7, 0x17, 0x9e, 0x84, - 0xf3, 0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x51, - // signature::x - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, - // signature::y - 0x94, 0x03, 0x1d, 0x90, 0x6b, 0x6f, 0xcd, 0x99, 0xef, 0x2c, 0xdb, 0x8b, - 0xa9, 0x8a, 0xef, 0x7e, 0xf0, 0x77, 0xba, 0xb5, 0x11, 0x43, 0x0d, 0x28, - 0x1c, 0x01, 0x5b, 0xc9, 0x08, 0xce, 0x3e, 0x68}; - -const std::vector Epid11FileParser::kGroupPublicKeyFile = { - // Epid Version - 0x01, 0x00, - // Epid type - 0x00, 0x0c, - // GID - 0x00, 0x00, 0x00, 0x7b, - // h1 - 0x08, 0x4a, 0x9d, 0x2e, 0xf9, 0x4f, 0x78, 0x02, 0xd7, 0x89, 0x75, 0xb4, - 0xe7, 0x25, 0x26, 0x9f, 0x00, 0x57, 0xad, 0x33, 0x30, 0xea, 0xa9, 0x6c, - 0x00, 0x9e, 0x8b, 0xc8, 0x13, 0x23, 0xcb, 0x06, 0x04, 0xbe, 0x42, 0x74, - 0x11, 0x07, 0xb1, 0x06, 0xd7, 0xef, 0x5f, 0x66, 0x87, 0xd9, 0xfa, 0xdd, - 0x53, 0xae, 0xd7, 0xf4, 0x54, 0xf8, 0xd0, 0x21, 0x75, 0xe0, 0x07, 0x44, - 0xc9, 0xc3, 0x4e, 0xf7, - // h2 - 0x06, 0xd8, 0xa9, 0x90, 0x02, 0x8f, 0xca, 0xa5, 0x73, 0x36, 0x24, 0x03, - 0xc9, 0xa8, 0x7e, 0x9d, 0x64, 0x12, 0xac, 0xa7, 0xbd, 0x17, 0x7f, 0x7c, - 0x96, 0x8d, 0x2e, 0x13, 0xd9, 0xb2, 0x69, 0x47, 0x09, 0xdb, 0xe3, 0xbf, - 0xbc, 0xa1, 0x34, 0x0f, 0xc6, 0xe2, 0x00, 0x3d, 0x98, 0xa3, 0x7d, 0xab, - 0xd4, 0x0e, 0xec, 0xde, 0x4f, 0x97, 0xa9, 0xbb, 0xdd, 0x60, 0x94, 0x24, - 0x7b, 0xb3, 0xf5, 0x94, - // w - 0x02, 0x43, 0x78, 0x9f, 0x54, 0xc1, 0x21, 0x3a, 0x2b, 0x4d, 0x12, 0x65, - 0x2f, 0x51, 0x94, 0xc6, 0x34, 0x24, 0xd9, 0x7b, 0x06, 0x3a, 0xc4, 0xf5, - 0x56, 0xeb, 0x32, 0xe3, 0xee, 0x7b, 0xad, 0x6b, 0x04, 0x90, 0x86, 0x31, - 0x18, 0x2a, 0xa4, 0xcf, 0xa3, 0x90, 0xa5, 0x80, 0x7b, 0xae, 0x3b, 0xb1, - 0x77, 0x03, 0xe7, 0x7e, 0xf2, 0xfc, 0x6d, 0x3a, 0xab, 0x8f, 0xbf, 0x95, - 0x40, 0xed, 0x08, 0x03, 0x01, 0x05, 0x86, 0xf5, 0x42, 0xea, 0x4d, 0xf7, - 0x4f, 0xef, 0x46, 0xdf, 0x8f, 0xe8, 0x2d, 0xbb, 0x5d, 0x0d, 0x2f, 0x4f, - 0xf4, 0xd8, 0x31, 0xc6, 0x5a, 0x97, 0x98, 0x44, 0xcf, 0x42, 0x5a, 0xf3, - 0x03, 0x5f, 0xb6, 0x38, 0x45, 0x5a, 0x15, 0x1e, 0xb9, 0x54, 0xfa, 0x2c, - 0x3f, 0x68, 0x7b, 0x4e, 0x85, 0x35, 0xf3, 0x5b, 0xe5, 0xdc, 0x96, 0x2b, - 0x18, 0x84, 0x5e, 0x1e, 0x53, 0xdc, 0x22, 0x23, 0x06, 0x08, 0x91, 0x5a, - 0x2d, 0x27, 0xe2, 0x12, 0x69, 0xfa, 0xab, 0x19, 0x7c, 0x47, 0x6b, 0xec, - 0xde, 0xc6, 0x25, 0xd4, 0x43, 0xb4, 0x65, 0x23, 0x61, 0x0f, 0x1f, 0x2d, - 0xfd, 0xb1, 0x18, 0xb0, 0x04, 0x8e, 0x1a, 0xc5, 0x95, 0x9a, 0x0e, 0x37, - 0x7c, 0x5e, 0x95, 0x38, 0xc2, 0xcf, 0xfa, 0x1f, 0xe3, 0x3a, 0x2b, 0x85, - 0xa5, 0xfd, 0x6b, 0xc4, 0x1d, 0xfb, 0x47, 0x27, 0xaf, 0xc1, 0x94, 0xcd, - // Signature - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0xf0, 0x6e, 0x43, 0x67, - 0x68, 0x6f, 0x9e, 0x3b, 0xcf, 0xfd, 0x98, 0xcc, 0xae, 0x92, 0xcc, 0x94, - 0x23, 0xb6, 0xbd, 0x57, 0xac, 0x06, 0x3c, 0xa1, 0xe5, 0x3e, 0xe9, 0xf5, - 0x0e, 0x55, 0xb4, 0xe5}; -const std::vector Epid11FileParser::kGroupPublicKey = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // h1 - 0x08, 0x4a, 0x9d, 0x2e, 0xf9, 0x4f, 0x78, 0x02, 0xd7, 0x89, 0x75, 0xb4, - 0xe7, 0x25, 0x26, 0x9f, 0x00, 0x57, 0xad, 0x33, 0x30, 0xea, 0xa9, 0x6c, - 0x00, 0x9e, 0x8b, 0xc8, 0x13, 0x23, 0xcb, 0x06, 0x04, 0xbe, 0x42, 0x74, - 0x11, 0x07, 0xb1, 0x06, 0xd7, 0xef, 0x5f, 0x66, 0x87, 0xd9, 0xfa, 0xdd, - 0x53, 0xae, 0xd7, 0xf4, 0x54, 0xf8, 0xd0, 0x21, 0x75, 0xe0, 0x07, 0x44, - 0xc9, 0xc3, 0x4e, 0xf7, - // h2 - 0x06, 0xd8, 0xa9, 0x90, 0x02, 0x8f, 0xca, 0xa5, 0x73, 0x36, 0x24, 0x03, - 0xc9, 0xa8, 0x7e, 0x9d, 0x64, 0x12, 0xac, 0xa7, 0xbd, 0x17, 0x7f, 0x7c, - 0x96, 0x8d, 0x2e, 0x13, 0xd9, 0xb2, 0x69, 0x47, 0x09, 0xdb, 0xe3, 0xbf, - 0xbc, 0xa1, 0x34, 0x0f, 0xc6, 0xe2, 0x00, 0x3d, 0x98, 0xa3, 0x7d, 0xab, - 0xd4, 0x0e, 0xec, 0xde, 0x4f, 0x97, 0xa9, 0xbb, 0xdd, 0x60, 0x94, 0x24, - 0x7b, 0xb3, 0xf5, 0x94, - // w - 0x02, 0x43, 0x78, 0x9f, 0x54, 0xc1, 0x21, 0x3a, 0x2b, 0x4d, 0x12, 0x65, - 0x2f, 0x51, 0x94, 0xc6, 0x34, 0x24, 0xd9, 0x7b, 0x06, 0x3a, 0xc4, 0xf5, - 0x56, 0xeb, 0x32, 0xe3, 0xee, 0x7b, 0xad, 0x6b, 0x04, 0x90, 0x86, 0x31, - 0x18, 0x2a, 0xa4, 0xcf, 0xa3, 0x90, 0xa5, 0x80, 0x7b, 0xae, 0x3b, 0xb1, - 0x77, 0x03, 0xe7, 0x7e, 0xf2, 0xfc, 0x6d, 0x3a, 0xab, 0x8f, 0xbf, 0x95, - 0x40, 0xed, 0x08, 0x03, 0x01, 0x05, 0x86, 0xf5, 0x42, 0xea, 0x4d, 0xf7, - 0x4f, 0xef, 0x46, 0xdf, 0x8f, 0xe8, 0x2d, 0xbb, 0x5d, 0x0d, 0x2f, 0x4f, - 0xf4, 0xd8, 0x31, 0xc6, 0x5a, 0x97, 0x98, 0x44, 0xcf, 0x42, 0x5a, 0xf3, - 0x03, 0x5f, 0xb6, 0x38, 0x45, 0x5a, 0x15, 0x1e, 0xb9, 0x54, 0xfa, 0x2c, - 0x3f, 0x68, 0x7b, 0x4e, 0x85, 0x35, 0xf3, 0x5b, 0xe5, 0xdc, 0x96, 0x2b, - 0x18, 0x84, 0x5e, 0x1e, 0x53, 0xdc, 0x22, 0x23, 0x06, 0x08, 0x91, 0x5a, - 0x2d, 0x27, 0xe2, 0x12, 0x69, 0xfa, 0xab, 0x19, 0x7c, 0x47, 0x6b, 0xec, - 0xde, 0xc6, 0x25, 0xd4, 0x43, 0xb4, 0x65, 0x23, 0x61, 0x0f, 0x1f, 0x2d, - 0xfd, 0xb1, 0x18, 0xb0, 0x04, 0x8e, 0x1a, 0xc5, 0x95, 0x9a, 0x0e, 0x37, - 0x7c, 0x5e, 0x95, 0x38, 0xc2, 0xcf, 0xfa, 0x1f, 0xe3, 0x3a, 0x2b, 0x85, - 0xa5, 0xfd, 0x6b, 0xc4, 0x1d, 0xfb, 0x47, 0x27, 0xaf, 0xc1, 0x94, 0xcd}; - -const std::vector Epid11FileParser::kGroupMultiPublicKeyFile = { - // Epid Version - 0x01, 0x00, - // Epid type - 0x00, 0x0c, - // GID - 0x00, 0x00, 0x00, 0x7b, - // h1 - 0x08, 0x4a, 0x9d, 0x2e, 0xf9, 0x4f, 0x78, 0x02, 0xd7, 0x89, 0x75, 0xb4, - 0xe7, 0x25, 0x26, 0x9f, 0x00, 0x57, 0xad, 0x33, 0x30, 0xea, 0xa9, 0x6c, - 0x00, 0x9e, 0x8b, 0xc8, 0x13, 0x23, 0xcb, 0x06, 0x04, 0xbe, 0x42, 0x74, - 0x11, 0x07, 0xb1, 0x06, 0xd7, 0xef, 0x5f, 0x66, 0x87, 0xd9, 0xfa, 0xdd, - 0x53, 0xae, 0xd7, 0xf4, 0x54, 0xf8, 0xd0, 0x21, 0x75, 0xe0, 0x07, 0x44, - 0xc9, 0xc3, 0x4e, 0xf7, - // h2 - 0x06, 0xd8, 0xa9, 0x90, 0x02, 0x8f, 0xca, 0xa5, 0x73, 0x36, 0x24, 0x03, - 0xc9, 0xa8, 0x7e, 0x9d, 0x64, 0x12, 0xac, 0xa7, 0xbd, 0x17, 0x7f, 0x7c, - 0x96, 0x8d, 0x2e, 0x13, 0xd9, 0xb2, 0x69, 0x47, 0x09, 0xdb, 0xe3, 0xbf, - 0xbc, 0xa1, 0x34, 0x0f, 0xc6, 0xe2, 0x00, 0x3d, 0x98, 0xa3, 0x7d, 0xab, - 0xd4, 0x0e, 0xec, 0xde, 0x4f, 0x97, 0xa9, 0xbb, 0xdd, 0x60, 0x94, 0x24, - 0x7b, 0xb3, 0xf5, 0x94, - // w - 0x02, 0x43, 0x78, 0x9f, 0x54, 0xc1, 0x21, 0x3a, 0x2b, 0x4d, 0x12, 0x65, - 0x2f, 0x51, 0x94, 0xc6, 0x34, 0x24, 0xd9, 0x7b, 0x06, 0x3a, 0xc4, 0xf5, - 0x56, 0xeb, 0x32, 0xe3, 0xee, 0x7b, 0xad, 0x6b, 0x04, 0x90, 0x86, 0x31, - 0x18, 0x2a, 0xa4, 0xcf, 0xa3, 0x90, 0xa5, 0x80, 0x7b, 0xae, 0x3b, 0xb1, - 0x77, 0x03, 0xe7, 0x7e, 0xf2, 0xfc, 0x6d, 0x3a, 0xab, 0x8f, 0xbf, 0x95, - 0x40, 0xed, 0x08, 0x03, 0x01, 0x05, 0x86, 0xf5, 0x42, 0xea, 0x4d, 0xf7, - 0x4f, 0xef, 0x46, 0xdf, 0x8f, 0xe8, 0x2d, 0xbb, 0x5d, 0x0d, 0x2f, 0x4f, - 0xf4, 0xd8, 0x31, 0xc6, 0x5a, 0x97, 0x98, 0x44, 0xcf, 0x42, 0x5a, 0xf3, - 0x03, 0x5f, 0xb6, 0x38, 0x45, 0x5a, 0x15, 0x1e, 0xb9, 0x54, 0xfa, 0x2c, - 0x3f, 0x68, 0x7b, 0x4e, 0x85, 0x35, 0xf3, 0x5b, 0xe5, 0xdc, 0x96, 0x2b, - 0x18, 0x84, 0x5e, 0x1e, 0x53, 0xdc, 0x22, 0x23, 0x06, 0x08, 0x91, 0x5a, - 0x2d, 0x27, 0xe2, 0x12, 0x69, 0xfa, 0xab, 0x19, 0x7c, 0x47, 0x6b, 0xec, - 0xde, 0xc6, 0x25, 0xd4, 0x43, 0xb4, 0x65, 0x23, 0x61, 0x0f, 0x1f, 0x2d, - 0xfd, 0xb1, 0x18, 0xb0, 0x04, 0x8e, 0x1a, 0xc5, 0x95, 0x9a, 0x0e, 0x37, - 0x7c, 0x5e, 0x95, 0x38, 0xc2, 0xcf, 0xfa, 0x1f, 0xe3, 0x3a, 0x2b, 0x85, - 0xa5, 0xfd, 0x6b, 0xc4, 0x1d, 0xfb, 0x47, 0x27, 0xaf, 0xc1, 0x94, 0xcd, - // Signature - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0xf0, 0x6e, 0x43, 0x67, - 0x68, 0x6f, 0x9e, 0x3b, 0xcf, 0xfd, 0x98, 0xcc, 0xae, 0x92, 0xcc, 0x94, - 0x23, 0xb6, 0xbd, 0x57, 0xac, 0x06, 0x3c, 0xa1, 0xe5, 0x3e, 0xe9, 0xf5, - 0x0e, 0x55, 0xb4, 0xe5, - // Epid Version - 0x01, 0x00, - // Epid type - 0x00, 0x0c, - // GID - 0x00, 0x00, 0x04, 0xd2, - // h1 - 0x00, 0x6c, 0x38, 0x98, 0x41, 0x97, 0xf6, 0xf1, 0xb0, 0x41, 0x57, 0xd4, - 0xf9, 0xce, 0xcc, 0x22, 0xce, 0x4f, 0xc8, 0x47, 0xaf, 0x2a, 0x6c, 0xa3, - 0x02, 0xf2, 0x74, 0x80, 0xc9, 0x5c, 0x1c, 0xf7, 0x06, 0xed, 0xce, 0xc0, - 0x0b, 0x29, 0x73, 0x1c, 0x09, 0x84, 0x4c, 0xcc, 0xff, 0x82, 0x9d, 0x29, - 0xe7, 0x88, 0x57, 0xfd, 0xd2, 0x55, 0x41, 0x0f, 0x5e, 0x6e, 0xf5, 0xc4, - 0x77, 0xa2, 0x5d, 0xaf, - // h2 - 0x00, 0x50, 0x70, 0xe5, 0x66, 0x92, 0x77, 0x33, 0x82, 0xda, 0xc9, 0x27, - 0x7c, 0x16, 0xf8, 0xf2, 0x69, 0x48, 0x2f, 0xf0, 0xdd, 0x8d, 0x9e, 0x27, - 0x41, 0xaf, 0xcc, 0xb9, 0x04, 0xf4, 0x77, 0x8c, 0x06, 0x36, 0xee, 0xbd, - 0x53, 0x0e, 0x20, 0xd8, 0x9f, 0xd7, 0xb7, 0x41, 0xdd, 0xe0, 0xee, 0xc7, - 0xf8, 0xef, 0x91, 0x03, 0xe1, 0xfe, 0x6a, 0xe6, 0x3b, 0x91, 0xb7, 0xaa, - 0xc4, 0x64, 0x72, 0x37, - // w - 0x06, 0xa3, 0x37, 0xa1, 0xfc, 0xe2, 0x3a, 0x99, 0x96, 0xb9, 0x8d, 0xad, - 0x07, 0xec, 0xfc, 0x62, 0x39, 0x5c, 0x0c, 0x89, 0xba, 0x06, 0x3a, 0x1c, - 0xea, 0x2d, 0xcc, 0xf2, 0x00, 0xaa, 0x08, 0x25, 0x06, 0x82, 0xa0, 0x68, - 0x71, 0x4f, 0x5d, 0xbd, 0xc3, 0x80, 0xe6, 0x98, 0xe9, 0x14, 0x10, 0xdc, - 0x9c, 0xa6, 0x4e, 0x75, 0x09, 0x0a, 0x45, 0x39, 0x2b, 0xcc, 0x6e, 0x6f, - 0x66, 0xad, 0x1a, 0x63, 0x05, 0x9c, 0x6a, 0xeb, 0x7f, 0xd3, 0x16, 0x46, - 0x37, 0xc8, 0x5f, 0x1a, 0x34, 0x46, 0x35, 0x92, 0x10, 0x7b, 0x7b, 0xe3, - 0x9c, 0x65, 0x59, 0x2d, 0xa8, 0x8a, 0x4b, 0xfb, 0x81, 0x97, 0xf6, 0x25, - 0x09, 0xf3, 0x6d, 0xcc, 0x50, 0x63, 0xe0, 0x9d, 0x69, 0x02, 0x0c, 0x52, - 0x75, 0x95, 0x30, 0x38, 0x69, 0x1e, 0x8e, 0x6b, 0x52, 0xbf, 0x97, 0x9f, - 0x20, 0x02, 0xec, 0xb3, 0x6b, 0x2b, 0xdd, 0xf3, 0x01, 0x11, 0xbb, 0xbe, - 0x3b, 0xc9, 0xa0, 0xc3, 0x44, 0xfe, 0x49, 0x53, 0x89, 0x2d, 0x27, 0x40, - 0x86, 0x87, 0xea, 0xce, 0x5f, 0x9a, 0xee, 0xc2, 0x15, 0x62, 0xc1, 0x87, - 0x0f, 0x3a, 0x78, 0x03, 0x03, 0xd2, 0x8c, 0x24, 0x5a, 0x90, 0xa7, 0xc5, - 0x35, 0x4f, 0xab, 0xcd, 0x40, 0xe8, 0x7c, 0xf0, 0xab, 0x96, 0x59, 0x3a, - 0x96, 0xe4, 0x4a, 0x73, 0x67, 0x51, 0x1f, 0xad, 0x06, 0x94, 0x40, 0xcf, - // Signature - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x4b, 0xba, 0x99, 0x05, - 0x14, 0x98, 0x2c, 0x10, 0x5d, 0x25, 0x84, 0x93, 0x92, 0x0c, 0x7c, 0x44, - 0x39, 0xb8, 0xd9, 0x65, 0x8a, 0x27, 0x20, 0x31, 0xb8, 0xc8, 0x47, 0xe2, - 0xfb, 0x79, 0xa0, 0xa5}; - -const std::vector Epid11FileParser::kEmptyPrivRlFile = { - // Epid Version - 0x01, 0x00, - // Epid type - 0x00, 0x0d, - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x00, - // n1 - 0x00, 0x00, 0x00, 0x00, - // sig - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x29, 0xa4, 0x10, 0x8f, - 0x7d, 0xb4, 0xff, 0xae, 0x6a, 0xce, 0x8d, 0xcd, 0xc6, 0x84, 0x63, 0x9f, - 0x89, 0x3d, 0x23, 0x42, 0xf5, 0x37, 0xba, 0xb9, 0x4a, 0xbb, 0x6e, 0xf2, - 0xb2, 0x74, 0x8c, 0xcc, -}; -const std::vector Epid11FileParser::kEmptyPrivRl = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x00, - // n1 - 0x00, 0x00, 0x00, 0x00}; - -const std::vector Epid11FileParser::kShortPrivRlFile = { - // Epid Version - 0x01, 0x00, - // Epid type - 0x00, 0x0d, - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x03, - // n1 - 0x00, 0x00, 0x00, 0x01, - // PrivRl - 0x00, 0x00, 0x56, 0x1e, 0xb1, 0x91, 0xb6, 0xdf, 0x40, 0xbc, 0xa2, 0xe3, - 0xe3, 0x92, 0x33, 0xd1, 0xd7, 0x5c, 0xcc, 0x4c, 0x3a, 0xe7, 0x91, 0x49, - 0x73, 0xe2, 0x03, 0xd4, 0x5e, 0x4f, 0x87, 0xad, - // Sig - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x60, 0xf3, 0xfa, 0xe8, - 0x34, 0x9f, 0x50, 0xac, 0x1b, 0x75, 0xf4, 0x62, 0x41, 0xc4, 0xb7, 0x11, - 0x64, 0xef, 0xe1, 0xd4, 0x3c, 0xee, 0xee, 0x86, 0x4c, 0xbb, 0x9a, 0x40, - 0x77, 0x0b, 0xb2, 0xec, -}; -const std::vector Epid11FileParser::kShortPrivRl = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x03, - // n1 - 0x00, 0x00, 0x00, 0x01, - // PrivRl - 0x00, 0x00, 0x56, 0x1e, 0xb1, 0x91, 0xb6, 0xdf, 0x40, 0xbc, 0xa2, 0xe3, - 0xe3, 0x92, 0x33, 0xd1, 0xd7, 0x5c, 0xcc, 0x4c, 0x3a, 0xe7, 0x91, 0x49, - 0x73, 0xe2, 0x03, 0xd4, 0x5e, 0x4f, 0x87, 0xad, -}; - -const std::vector Epid11FileParser::kEmptySigRlFile = { - // Epid Version - 0x01, 0x00, - // Epid type - 0x00, 0x0e, - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x00, 0x00, 0x00, 0x00, - // Signature - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x94, 0x29, 0xf2, 0x7e, - 0x16, 0x19, 0x48, 0xa0, 0xed, 0xb7, 0x61, 0x5e, 0x63, 0x54, 0x87, 0xf4, - 0xbb, 0x7f, 0x42, 0x8d, 0x39, 0x63, 0x62, 0x06, 0x69, 0x7b, 0x9d, 0x0b, - 0x7e, 0xdf, 0xf2, 0x0d}; -const std::vector Epid11FileParser::kEmptySigRl = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x00, 0x00, 0x00, 0x00}; - -const std::vector Epid11FileParser::kShortSigRlFile = { - // Epid Version - 0x01, 0x00, - // Epid type - 0x00, 0x0e, - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x03, - // n2 - 0x00, 0x00, 0x00, 0x03, - // bks - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x6e, 0xdf, 0x9f, 0xe3, 0xe0, 0x8d, 0xe4, 0x0b, - 0xbb, 0x86, 0x12, 0xd7, 0xc5, 0xd8, 0x14, 0x5e, 0x67, 0xbd, 0x1d, 0xa5, - 0x0b, 0xdb, 0xf5, 0x87, 0x36, 0x6c, 0xda, 0x81, 0x2a, 0x8c, 0x2e, 0x78, - 0xef, 0x6c, 0x42, 0xb2, 0xcd, 0x40, 0xda, 0xd3, 0x22, 0xf4, 0xd9, 0x7e, - 0x34, 0x78, 0x49, 0x41, 0x0d, 0x1e, 0x64, 0xc1, 0x43, 0xa1, 0xb0, 0xe9, - 0x6c, 0x45, 0xe2, 0x2d, 0xc3, 0xeb, 0xc8, 0x14, 0x09, 0x0d, 0x6f, 0x82, - 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, - 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, - 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, - 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, - 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, - 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, 0xb4, 0x10, 0x2d, 0x4a, - 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, 0x59, 0x21, 0x17, 0x04, - 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, 0x1e, 0x6a, 0xaf, 0x82, - 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, 0x82, 0x17, 0xe6, 0xb8, - 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, 0x77, 0x61, 0x3c, 0xc2, - 0x75, 0x14, 0xa1, 0xc2, 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, - 0xba, 0x1e, 0x1b, 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, - 0x4f, 0xcd, 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, - 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, - 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, - 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, 0x95, 0x8b, 0x05, 0x1e, - 0x8b, 0xa5, 0x21, 0xdd, 0x63, 0xfd, 0x1a, 0x36, 0xb7, 0x42, 0x04, 0x92, - 0x10, 0xe6, 0x29, 0x22, 0xc8, 0x97, 0xb1, 0x28, 0x01, 0x45, 0x95, 0xf1, - 0x2a, 0xa0, 0x86, 0x41, 0xc4, 0x4c, 0xb6, 0x3b, 0x45, 0x23, 0x6e, 0x8d, - 0x6e, 0x07, 0xc7, 0x5b, 0xe5, 0x46, 0xca, 0xd0, 0x68, 0x99, 0xb6, 0x30, - 0x7b, 0x70, 0xb0, 0x92, 0x48, 0xc2, 0x89, 0xb6, 0x27, 0x3b, 0x95, 0x89, - // Signature - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x1c, 0xab, 0x1f, 0xca, - 0x99, 0x74, 0x76, 0x02, 0x4c, 0xa6, 0xca, 0x13, 0xda, 0x9d, 0x74, 0xfa, - 0x56, 0x23, 0xf1, 0x86, 0xbe, 0xd4, 0xf2, 0x84, 0x7a, 0xdf, 0xd3, 0x62, - 0x4f, 0xc2, 0x0d, 0x84}; -const std::vector Epid11FileParser::kShortSigRl = { - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x03, - // n2 - 0x00, 0x00, 0x00, 0x03, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x6e, 0xdf, 0x9f, 0xe3, 0xe0, 0x8d, 0xe4, 0x0b, - 0xbb, 0x86, 0x12, 0xd7, 0xc5, 0xd8, 0x14, 0x5e, 0x67, 0xbd, 0x1d, 0xa5, - 0x0b, 0xdb, 0xf5, 0x87, 0x36, 0x6c, 0xda, 0x81, 0x2a, 0x8c, 0x2e, 0x78, - 0xef, 0x6c, 0x42, 0xb2, 0xcd, 0x40, 0xda, 0xd3, 0x22, 0xf4, 0xd9, 0x7e, - 0x34, 0x78, 0x49, 0x41, 0x0d, 0x1e, 0x64, 0xc1, 0x43, 0xa1, 0xb0, 0xe9, - 0x6c, 0x45, 0xe2, 0x2d, 0xc3, 0xeb, 0xc8, 0x14, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, - 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, - 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, - 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, - 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, - 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2, - // B, K - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x95, 0x8b, 0x05, 0x1e, 0x8b, 0xa5, 0x21, 0xdd, - 0x63, 0xfd, 0x1a, 0x36, 0xb7, 0x42, 0x04, 0x92, 0x10, 0xe6, 0x29, 0x22, - 0xc8, 0x97, 0xb1, 0x28, 0x01, 0x45, 0x95, 0xf1, 0x2a, 0xa0, 0x86, 0x41, - 0xc4, 0x4c, 0xb6, 0x3b, 0x45, 0x23, 0x6e, 0x8d, 0x6e, 0x07, 0xc7, 0x5b, - 0xe5, 0x46, 0xca, 0xd0, 0x68, 0x99, 0xb6, 0x30, 0x7b, 0x70, 0xb0, 0x92, - 0x48, 0xc2, 0x89, 0xb6, 0x27, 0x3b, 0x95, 0x89}; - -const std::vector Epid11FileParser::kEmptyGroupRlFile = { - // Epid version - 0x01, 0x00, - // Epid type - 0x00, 0x0f, - // RL ver - 0x00, 0x00, 0x00, 0x00, - // n3 - 0x00, 0x00, 0x00, 0x00, - // Signature - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0xc3, 0x21, 0x99, 0xe1, - 0x18, 0x22, 0x4a, 0xd2, 0xa5, 0xe5, 0xbf, 0x4a, 0xd9, 0x83, 0x08, 0x9d, - 0x62, 0x71, 0xa1, 0x39, 0x21, 0x49, 0x5d, 0xb2, 0x7a, 0xdb, 0x05, 0x2a, - 0xa4, 0xde, 0xb0, 0xac}; -const std::vector Epid11FileParser::kEmptyGroupRl = { - // RL ver - 0x00, 0x00, 0x00, 0x00, - // n3 - 0x00, 0x00, 0x00, 0x00}; - -const std::vector Epid11FileParser::kShortGroupRlFile = { - // Epid version - 0x01, 0x00, - // Epid type - 0x00, 0x0f, - // RL ver - 0x00, 0x00, 0x00, 0x03, - // n3 - 0x00, 0x00, 0x00, 0x03, - // GIDs - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, - // Signature - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0xc0, 0xec, 0x90, 0x92, - 0xe9, 0xaa, 0x2e, 0x61, 0xca, 0x70, 0x8f, 0x48, 0xd4, 0x7d, 0xe7, 0x82, - 0x22, 0x9f, 0x2f, 0x78, 0x5b, 0xfe, 0x56, 0x6e, 0x1a, 0xa1, 0x69, 0x9d, - 0xcc, 0xb1, 0xaa, 0x62}; -const std::vector Epid11FileParser::kShortGroupRl = { - // RL ver - 0x00, 0x00, 0x00, 0x03, - // n3 - 0x00, 0x00, 0x00, 0x03, - // GIDs - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03}; - -////////////////////////////////////////////////////////////////////////// -// Epid11ParseGroupPubKeyFile Tests -TEST_F(Epid11FileParser, GroupPubKeyParseFailsGivenNullParameters) { - Epid11GroupPubKey pubkey{}; - EXPECT_EQ(kEpidBadArgErr, Epid11ParseGroupPubKeyFile( - nullptr, this->kGroupPublicKeyFile.size(), - &this->kCert, &pubkey)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - nullptr, &pubkey)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &this->kCert, nullptr)); -} - -TEST_F(Epid11FileParser, GroupPubKeyParseFailsGivenUnsupportedCurve) { - Epid11GroupPubKey pubkey{}; - EpidCaCertificate unsupported_curve1(this->kCert); - unsupported_curve1.a.data[0] = unsupported_curve1.a.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve1, &pubkey)); - EpidCaCertificate unsupported_curve2(this->kCert); - unsupported_curve2.b.data[0] = unsupported_curve2.b.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve2, &pubkey)); - EpidCaCertificate unsupported_curve3(this->kCert); - unsupported_curve3.x.data[0] = unsupported_curve3.x.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve3, &pubkey)); - EpidCaCertificate unsupported_curve4(this->kCert); - unsupported_curve4.y.data[0] = unsupported_curve4.y.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve4, &pubkey)); - EpidCaCertificate unsupported_curve5(this->kCert); - unsupported_curve5.r.data[0] = unsupported_curve5.r.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve5, &pubkey)); - EpidCaCertificate unsupported_curve6(this->kCert); - unsupported_curve6.prime.data[0] = unsupported_curve6.prime.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve6, &pubkey)); -} - -TEST_F(Epid11FileParser, GroupPubKeyParseFailsGivenInvalidKeyInCertificate) { - Epid11GroupPubKey pubkey{}; - EpidCaCertificate invalid_key_qx(this->kCert); - invalid_key_qx.pubkey.data[0] = invalid_key_qx.pubkey.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &invalid_key_qx, &pubkey)); - EpidCaCertificate invalid_key_qy(this->kCert); - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &invalid_key_qy, &pubkey)); - EpidCaCertificate invalid_key_qx_qy(this->kCert); - invalid_key_qx_qy.pubkey.data[0] = invalid_key_qx_qy.pubkey.data[0] ^ 0xFF; - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] = - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] ^ - 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &invalid_key_qx_qy, &pubkey)); -} - -TEST_F(Epid11FileParser, RejectsGroupPubKeyFileWithInvalidSize) { - Epid11GroupPubKey pubkey{}; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - 0, &this->kCert, &pubkey)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size() - 1, - &this->kCert, &pubkey)); -} - -TEST_F(Epid11FileParser, RejectsInvalidGroupPubKeyFileType) { - Epid11GroupPubKey pubkey{}; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)this->kShortPrivRlFile.data(), - this->kGroupPublicKeyFile.size(), - &this->kCert, &pubkey)); -} - -TEST_F(Epid11FileParser, RejectsGroupPubKeyFileWithUnsupportedEpidVersion) { - Epid11GroupPubKey pubkey{}; - - std::vector unsupported_epidver_file(this->kGroupPublicKeyFile); - unsupported_epidver_file[0] = {0x02}; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupPubKeyFile((void*)unsupported_epidver_file.data(), - unsupported_epidver_file.size(), - &this->kCert, &pubkey)); -} - -TEST_F(Epid11FileParser, ParsesValidPubKeyFile) { - std::vector pubkey(sizeof(Epid11GroupPubKey), 0); - EXPECT_EQ(kEpidNoErr, Epid11ParseGroupPubKeyFile( - (void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), &this->kCert, - (Epid11GroupPubKey*)pubkey.data())); - EXPECT_EQ(this->kGroupPublicKey, pubkey); -} - -TEST_F(Epid11FileParser, ParsesValidMultiPubKeyFile) { - std::vector pubkey(sizeof(Epid11GroupPubKey), 0); - EXPECT_EQ(kEpidNoErr, Epid11ParseGroupPubKeyFile( - (void*)this->kGroupMultiPublicKeyFile.data(), - this->kGroupMultiPublicKeyFile.size(), &this->kCert, - (Epid11GroupPubKey*)pubkey.data())); - EXPECT_EQ(this->kGroupPublicKey, pubkey); -} - -TEST_F(Epid11FileParser, RejectsGroupPubKeyFileWithInvalidSignature) { - Epid11GroupPubKey pubkey{}; - std::vector pubkey_inv_sign(this->kGroupPublicKeyFile); - pubkey_inv_sign[pubkey_inv_sign.size() - 1] = - pubkey_inv_sign[pubkey_inv_sign.size() - 1] ^ 0xFF; - EXPECT_EQ(kEpidSigInvalid, - Epid11ParseGroupPubKeyFile((void*)pubkey_inv_sign.data(), - pubkey_inv_sign.size(), &this->kCert, - &pubkey)); -} - -////////////////////////////////////////////////////////////////////////// -// Epid11ParsePrivRlFile Tests -TEST_F(Epid11FileParser, PrivRlParseProvidesRequiredLenWithNullDest) { - size_t rl_len = 0; - EXPECT_EQ(kEpidNoErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - nullptr, &rl_len)); - EXPECT_EQ(this->kShortPrivRl.size(), rl_len); -} - -TEST_F(Epid11FileParser, PrivRlParseFailsGivenNullParameters) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - - // null input buffer - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile(nullptr, this->kShortPrivRlFile.size(), - &this->kCert, (Epid11PrivRl*)rl.data(), &rl_len)); - // null kCert - EXPECT_EQ(kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), nullptr, - (Epid11PrivRl*)rl.data(), &rl_len)); - // null rl_length - EXPECT_EQ(kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (Epid11PrivRl*)rl.data(), nullptr)); - // null rl_length with null dest - EXPECT_EQ(kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - nullptr, nullptr)); -} - -TEST_F(Epid11FileParser, PrivRlParseFailsGivenUnsupportedCurveInCA) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - EpidCaCertificate unsupported_curve(kCert); - unsupported_curve.a.data[0] = unsupported_curve.a.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve, - (Epid11PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve2(kCert); - unsupported_curve2.b.data[0] = unsupported_curve2.b.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve2, - (Epid11PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve3(kCert); - unsupported_curve3.x.data[0] = unsupported_curve3.x.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve3, - (Epid11PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve4(kCert); - unsupported_curve4.y.data[0] = unsupported_curve4.y.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve4, - (Epid11PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve5(kCert); - unsupported_curve5.r.data[0] = unsupported_curve5.r.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve5, - (Epid11PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve6(kCert); - unsupported_curve6.prime.data[0] = unsupported_curve6.prime.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve6, - (Epid11PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, PrivRlParseFailsGivenInvalidKeyInCertificate) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - EpidCaCertificate invalid_key_qx(kCert); - invalid_key_qx.pubkey.data[0] = invalid_key_qx.pubkey.data[0] ^ 0xFF; - - EXPECT_EQ(kEpidBadArgErr, Epid11ParsePrivRlFile( - (void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &invalid_key_qx, - (Epid11PrivRl*)rl.data(), &rl_len)); - - EpidCaCertificate invalid_key_qy(kCert); - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - - EXPECT_EQ(kEpidBadArgErr, Epid11ParsePrivRlFile( - (void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &invalid_key_qy, - (Epid11PrivRl*)rl.data(), &rl_len)); - - EpidCaCertificate invalid_key_qx_qy(kCert); - invalid_key_qx_qy.pubkey.data[0] = invalid_key_qx_qy.pubkey.data[0] ^ 0xFF; - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &invalid_key_qx_qy, - (Epid11PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, PrivRlParseRejectsPrivRlFileWithInvalidSize) { - size_t rl_len = this->kEmptyPrivRl.size(); - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, Epid11ParsePrivRlFile( - (void*)this->kEmptyPrivRlFile.data(), - this->kEmptyPrivRlFile.size() + 1, &this->kCert, - (Epid11PrivRl*)rl.data(), &rl_len)); - - EXPECT_EQ(kEpidBadArgErr, Epid11ParsePrivRlFile( - (void*)this->kEmptyPrivRlFile.data(), - this->kEmptyPrivRlFile.size() - 1, &this->kCert, - (Epid11PrivRl*)rl.data(), &rl_len)); - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kEmptyPrivRlFile.data(), 0, - &this->kCert, (Epid11PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, PrivRlParseRejectsInvalidPrivRlFileType) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &this->kCert, - (Epid11PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, PrivRlRejectsPrivRlFileWithUnsupportedEpidVersion) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - - std::vector unsupported_epidver_file(this->kShortPrivRlFile); - unsupported_epidver_file[0] = {0x02}; - - EXPECT_EQ(kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)unsupported_epidver_file.data(), - unsupported_epidver_file.size(), &this->kCert, - (Epid11PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, PrivRlParseParsesEmptyPrivRl) { - size_t rl_len = this->kEmptyPrivRl.size(); - std::vector rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - Epid11ParsePrivRlFile((void*)this->kEmptyPrivRlFile.data(), - this->kEmptyPrivRlFile.size(), &this->kCert, - (Epid11PrivRl*)rl.data(), &rl_len)); - EXPECT_EQ(this->kEmptyPrivRl, rl); -} - -TEST_F(Epid11FileParser, PrivRlParseParsesShortPrivRl) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (Epid11PrivRl*)rl.data(), &rl_len)); - EXPECT_EQ(this->kShortPrivRl, rl); -} - -TEST_F(Epid11FileParser, PrivRlParseParsesLongPrivRl) { - EcdsaSignature signature = { - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, - 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, - 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x31, - 0x02, 0x1e, 0x05, 0xa2, 0x80, 0x99, 0xef, 0xa9, 0xed, 0x69, 0x90, - 0x36, 0x83, 0xaf, 0x95, 0xb8, 0x11, 0x5b, 0xb1, 0x83, 0x5f, 0x86, - 0x6b, 0x82, 0x17, 0x8f, 0x00, 0x3d, 0x79, 0x25, 0xda, - }; - - std::vector long_privrl_file = { - // Epid Version - 0x01, 0x00, - // Epid type - 0x00, 0x0d, - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL Ver - 0x00, 0x00, 0x00, 0x03, - // n1 - 0x00, 0x00, 0x00, 0x32, - }; - const std::vector FToCreateLongRl = { - 0x00, 0x00, 0x56, 0x1e, 0xb1, 0x91, 0xb6, 0xdf, 0x40, 0xbc, 0xa2, - 0xe3, 0xe3, 0x92, 0x33, 0xd1, 0xd7, 0x5c, 0xcc, 0x4c, 0x3a, 0xe7, - 0x91, 0x49, 0x73, 0xe2, 0x03, 0xd4, 0x5e, 0x4f, 0x87, 0xad, - }; - for (int i = 0; i < 50; ++i) { - for (auto it : FToCreateLongRl) { - long_privrl_file.push_back(it); - } - } - for (auto it : signature.x.data) { - long_privrl_file.push_back(it); - } - for (auto it : signature.y.data) { - long_privrl_file.push_back(it); - } - size_t rl_len = long_privrl_file.size() - 68; - std::vector rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - Epid11ParsePrivRlFile((void*)long_privrl_file.data(), - long_privrl_file.size(), &this->kCert, - (Epid11PrivRl*)rl.data(), &rl_len)); - EXPECT_EQ( - std::vector(&long_privrl_file[4], - &long_privrl_file[long_privrl_file.size() - 64]), - rl); -} - -TEST_F(Epid11FileParser, PrivRlRejectsPrivRlFileWithInvalidSignature) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - std::vector privrl_inv_sign(kShortPrivRlFile); - privrl_inv_sign[privrl_inv_sign.size() - 1] = - privrl_inv_sign[privrl_inv_sign.size() - 1] ^ 0xFF; - - EXPECT_EQ( - kEpidSigInvalid, - Epid11ParsePrivRlFile(privrl_inv_sign.data(), privrl_inv_sign.size(), - &this->kCert, (Epid11PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, PrivRlRejectsGivenInsufficientOutputBufSize) { - size_t rl_len = this->kShortPrivRl.size() - 1; - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (Epid11PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, PrivRlReturnsProperSizeGivenOversizedPrivRlBuf) { - size_t rl_len = this->kShortPrivRl.size() + 1; - std::vector oversized_rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - Epid11ParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (Epid11PrivRl*)oversized_rl.data(), &rl_len)); - std::vector rl(oversized_rl.begin(), oversized_rl.end() - 1); - EXPECT_EQ(this->kShortPrivRl, rl); - EXPECT_EQ(this->kShortPrivRl.size(), rl_len); -} -////////////////////////////////////////////////////////////////////////// -// Epid11ParseSigRlFile Tests -TEST_F(Epid11FileParser, SigRlParseProvidesRequiredLenWithNullDest) { - size_t rl_len = 0; - EXPECT_EQ(kEpidNoErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &kCert, nullptr, - &rl_len)); - EXPECT_EQ(rl_len, this->kShortSigRl.size()); -} - -TEST_F(Epid11FileParser, SigRlParseFailsGivenNullParameters) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile(nullptr, this->kShortSigRlFile.size(), &kCert, - (Epid11SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), nullptr, - (Epid11SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &kCert, - (Epid11SigRl*)rl.data(), nullptr)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &kCert, nullptr, - nullptr)); -} - -TEST_F(Epid11FileParser, SigRlParseFailsGivenUnsupportedCurveInCA) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - EpidCaCertificate unsupported_curve1(kCert); - unsupported_curve1.a.data[0] = unsupported_curve1.a.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve1, - (Epid11SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve2(kCert); - unsupported_curve2.b.data[0] = unsupported_curve2.b.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve2, - (Epid11SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve3(kCert); - unsupported_curve3.x.data[0] = unsupported_curve3.x.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve3, - (Epid11SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve4(kCert); - unsupported_curve4.y.data[0] = unsupported_curve4.y.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve4, - (Epid11SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve5(kCert); - unsupported_curve5.r.data[0] = unsupported_curve5.r.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve5, - (Epid11SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve6(kCert); - unsupported_curve6.prime.data[0] = unsupported_curve6.prime.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve6, - (Epid11SigRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, SigRlParseFailsGivenInvalidKeyInCertificate) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - EpidCaCertificate invalid_key_qx(kCert); - invalid_key_qx.pubkey.data[0] = invalid_key_qx.pubkey.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &invalid_key_qx, - (Epid11SigRl*)rl.data(), &rl_len)); - EpidCaCertificate invalid_key_qy(kCert); - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &invalid_key_qy, - (Epid11SigRl*)rl.data(), &rl_len)); - EpidCaCertificate invalid_key_qx_qy(kCert); - invalid_key_qx_qy.pubkey.data[0] = invalid_key_qx_qy.pubkey.data[0] ^ 0xFF; - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] = - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] ^ - 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &invalid_key_qx_qy, - (Epid11SigRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, SigRlParseRejectsSigRlFileWithInvalidSize) { - size_t rl_len = this->kEmptySigRl.size(); - std::vector rl(rl_len); - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kEmptySigRlFile.data(), 0, &this->kCert, - (Epid11SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kEmptySigRlFile.data(), - this->kEmptySigRlFile.size() - 1, &this->kCert, - (Epid11SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kEmptySigRlFile.size() + 1, &this->kCert, - (Epid11SigRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, SigRlParseRejectsInvalidSigRlFileType) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (Epid11SigRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, RejectsSigRlFileWithUnsupportedEpidVersion) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - std::vector unsupported_epidver_file(this->kShortSigRlFile); - unsupported_epidver_file[0] = {0x02}; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)unsupported_epidver_file.data(), - unsupported_epidver_file.size(), &this->kCert, - (Epid11SigRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, SigRlParseParsesEmptySigRl) { - size_t rl_len = this->kEmptySigRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - Epid11ParseSigRlFile(this->kEmptySigRlFile.data(), - this->kEmptySigRlFile.size(), &this->kCert, - (Epid11SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(rl, this->kEmptySigRl); -} - -TEST_F(Epid11FileParser, SigRlParseParsesShortSigRl) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - Epid11ParseSigRlFile(this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &this->kCert, - (Epid11SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(rl, this->kShortSigRl); -} - -TEST_F(Epid11FileParser, SigRlParseParsesLongSigRl) { - std::vector bk = { - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x80, 0x85, 0x35, 0x04, 0x7b, 0xfc, 0x0a, 0x6c, - 0xb4, 0x10, 0x2d, 0x4a, 0xbe, 0x35, 0x78, 0x41, 0x3a, 0xc6, 0x01, 0x3a, - 0x59, 0x21, 0x17, 0x04, 0x60, 0x6a, 0x51, 0x6c, 0x84, 0xde, 0xc3, 0x3b, - 0x1e, 0x6a, 0xaf, 0x82, 0x5d, 0x81, 0xe2, 0x44, 0x25, 0x98, 0x89, 0xdb, - 0x82, 0x17, 0xe6, 0xb8, 0x9f, 0xfd, 0x03, 0x86, 0x63, 0x8c, 0xe1, 0x93, - 0x77, 0x61, 0x3c, 0xc2, 0x75, 0x14, 0xa1, 0xc2}; - EcdsaSignature signature = { - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, - 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, - 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x02, - 0x23, 0x1d, 0x31, 0x17, 0x88, 0x49, 0x13, 0x47, 0xe7, 0xda, 0xfe, - 0x8d, 0x67, 0xba, 0x16, 0x1d, 0x0a, 0xd3, 0x4a, 0x2d, 0xd1, 0xf8, - 0x60, 0x21, 0xa5, 0x00, 0x9a, 0x0d, 0x4d, 0xc4, 0xbd}; - std::vector long_sigrl_file = {// EPID Version - 0x01, 0x00, - // Epid type - 0x00, 0x0e, - // GID - 0x00, 0x00, 0x00, 0x7b, - // RL ver - 0x00, 0x00, 0x00, 0x32, - // n2 - 0x00, 0x00, 0x00, 0x32}; - for (int i = 0; i < 50; ++i) { - for (auto it : bk) { - long_sigrl_file.push_back(it); - } - } - for (auto it : signature.x.data) { - long_sigrl_file.push_back(it); - } - for (auto it : signature.y.data) { - long_sigrl_file.push_back(it); - } - size_t rl_len = long_sigrl_file.size() - sizeof(signature) - 4; - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, Epid11ParseSigRlFile( - long_sigrl_file.data(), long_sigrl_file.size(), - &this->kCert, (Epid11SigRl*)rl.data(), &rl_len)); - - std::vector expected_long_sig_rl(std::vector( - &long_sigrl_file[4], - &long_sigrl_file[long_sigrl_file.size() - sizeof(signature)])); - - EXPECT_EQ(expected_long_sig_rl, rl); -} - -TEST_F(Epid11FileParser, RejectsSigRlFileWithInvalidSignature) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - std::vector sigrl_inv_sign(kShortSigRlFile); - sigrl_inv_sign[sigrl_inv_sign.size() - 1] = - sigrl_inv_sign[sigrl_inv_sign.size() - 1] ^ 0xFF; - EXPECT_EQ( - kEpidSigInvalid, - Epid11ParseSigRlFile((void*)sigrl_inv_sign.data(), sigrl_inv_sign.size(), - &this->kCert, (Epid11SigRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, RejectsGivenInsufficientOutputBufSize) { - size_t rl_len = this->kShortSigRl.size() - 1; - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &this->kCert, - (Epid11SigRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, ReturnsProperSizeGivenOversizedSigRlBuf) { - size_t rl_len = this->kShortSigRl.size() + 1; - std::vector oversized_rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - Epid11ParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &this->kCert, - (Epid11SigRl*)oversized_rl.data(), &rl_len)); - std::vector rl(oversized_rl.begin(), oversized_rl.end() - 1); - EXPECT_EQ(this->kShortSigRl, rl); - EXPECT_EQ(this->kShortSigRl.size(), rl_len); -} -////////////////////////////////////////////////////////////////////////// -// Epid11ParseGroupRlFile Tests -TEST_F(Epid11FileParser, GroupRlParseProvidesRequiredLenWithNullDest) { - size_t rl_len = 0; - EXPECT_EQ(kEpidNoErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &kCert, - nullptr, &rl_len)); - EXPECT_EQ(this->kShortGroupRl.size(), rl_len); -} - -TEST_F(Epid11FileParser, GroupRlParseFailsGivenNullParameters) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile(nullptr, this->kShortGroupRlFile.size(), - &kCert, (Epid11GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), nullptr, - (Epid11GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &kCert, - (Epid11GroupRl*)rl.data(), nullptr)); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &kCert, - nullptr, nullptr)); -} - -TEST_F(Epid11FileParser, GroupRlParseFailsGivenUnsupportedCurve) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - EpidCaCertificate unsupported_curve1(kCert); - unsupported_curve1.a.data[0] = unsupported_curve1.a.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), - &unsupported_curve1, - (Epid11GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve2(kCert); - unsupported_curve2.b.data[0] = unsupported_curve2.b.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), - &unsupported_curve2, - (Epid11GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve3(kCert); - unsupported_curve3.x.data[0] = unsupported_curve3.x.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), - &unsupported_curve3, - (Epid11GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve4(kCert); - unsupported_curve4.y.data[0] = unsupported_curve4.y.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), - &unsupported_curve4, - (Epid11GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve5(kCert); - unsupported_curve5.r.data[0] = unsupported_curve5.r.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), - &unsupported_curve5, - (Epid11GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve6(kCert); - unsupported_curve6.prime.data[0] = unsupported_curve6.prime.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), - &unsupported_curve6, - (Epid11GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, GroupRlParseFailsGivenInvalidKeyInCertificate) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - EpidCaCertificate invalid_key_qx(kCert); - invalid_key_qx.pubkey.data[0] = invalid_key_qx.pubkey.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, Epid11ParseGroupRlFile( - (void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &invalid_key_qx, - (Epid11GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate invalid_key_qy(kCert); - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, Epid11ParseGroupRlFile( - (void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &invalid_key_qy, - (Epid11GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate invalid_key_qx_qy(kCert); - invalid_key_qx_qy.pubkey.data[0] = invalid_key_qx_qy.pubkey.data[0] ^ 0xFF; - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] = - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] ^ - 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &invalid_key_qx_qy, - (Epid11GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, RejectsGroupRlFileWithInvalidSize) { - size_t rl_len = this->kEmptyGroupRl.size(); - std::vector rl(rl_len); - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kEmptyGroupRlFile.data(), 0, - &this->kCert, (Epid11GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kEmptyGroupRlFile.data(), - this->kEmptyGroupRlFile.size() - 1, &this->kCert, - (Epid11GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ( - kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kEmptyGroupRlFile.size() + 1, &this->kCert, - (Epid11GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, RejectsInvalidGroupRlFileType) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (Epid11GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, RejectsGroupRlFileWithUnsupportedEpidVersion) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - std::vector unsupported_epidver_file(this->kShortGroupRlFile); - unsupported_epidver_file[0] = {0x02}; - EXPECT_EQ(kEpidBadArgErr, Epid11ParseGroupRlFile( - (void*)unsupported_epidver_file.data(), - unsupported_epidver_file.size(), &this->kCert, - (Epid11GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, ParsesEmptyGroupRl) { - size_t rl_len = this->kEmptyGroupRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - Epid11ParseGroupRlFile(this->kEmptyGroupRlFile.data(), - this->kEmptyGroupRlFile.size(), &this->kCert, - (Epid11GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(rl, this->kEmptyGroupRl); -} - -TEST_F(Epid11FileParser, ParsesShortGroupRl) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - Epid11ParseGroupRlFile(this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &this->kCert, - (Epid11GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(rl, this->kShortGroupRl); -} - -TEST_F(Epid11FileParser, ParsesLongGroupRl) { - std::vector gid = {0x00, 0x00, 0x00, 0x01}; - EcdsaSignature signature = { - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, - 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, - 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x64, - 0x0c, 0xa9, 0x25, 0xb2, 0x50, 0xc8, 0xd7, 0x9d, 0xb8, 0xb4, 0x37, - 0x30, 0x90, 0x53, 0x8f, 0x55, 0x50, 0xcf, 0xed, 0x9e, 0xaa, 0x31, - 0x4f, 0x7f, 0xb2, 0x27, 0xf9, 0xbb, 0xfa, 0x52, 0x70}; - std::vector long_grouprl_file = { - /// EPID version - 0x01, 0x00, - // File type - 0x00, 0x0f, - // RL ver - 0x00, 0x00, 0x00, 0x32, - // n3 - 0x00, 0x00, 0x00, 0x32, - }; - for (int i = 0; i < 50; ++i) { - for (auto it : gid) { - long_grouprl_file.push_back(it); - } - gid[3]++; - } - for (auto it : signature.x.data) { - long_grouprl_file.push_back(it); - } - for (auto it : signature.y.data) { - long_grouprl_file.push_back(it); - } - - size_t rl_len = long_grouprl_file.size() - sizeof(signature) - 4; - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, Epid11ParseGroupRlFile( - long_grouprl_file.data(), long_grouprl_file.size(), - &this->kCert, (Epid11GroupRl*)rl.data(), &rl_len)); - - std::vector expected_long_gr_rl(std::vector( - &long_grouprl_file[4], - &long_grouprl_file[long_grouprl_file.size() - sizeof(signature)])); - - EXPECT_EQ(expected_long_gr_rl, rl); -} - -TEST_F(Epid11FileParser, RejectsGroupRlFileWithInvalidSignature) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - std::vector grouprl_inv_sign(this->kShortGroupRlFile); - grouprl_inv_sign[grouprl_inv_sign.size() - 1] = - grouprl_inv_sign[grouprl_inv_sign.size() - 1] ^ 0xFF; - EXPECT_EQ(kEpidSigInvalid, - Epid11ParseGroupRlFile((void*)grouprl_inv_sign.data(), - grouprl_inv_sign.size(), &this->kCert, - (Epid11GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, GroupRlParseRejectsBufWithInsufficientSize) { - size_t rl_len = this->kShortGroupRl.size() - 1; - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - Epid11ParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &this->kCert, - (Epid11GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(Epid11FileParser, ReturnsProperSizeGivenOversizedGroupRlBuf) { - size_t rl_len = this->kShortGroupRl.size() + 1; - std::vector oversized_rl(rl_len); - - EXPECT_EQ(kEpidNoErr, Epid11ParseGroupRlFile( - (void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &this->kCert, - (Epid11GroupRl*)oversized_rl.data(), &rl_len)); - std::vector rl(oversized_rl.begin(), oversized_rl.end() - 1); - EXPECT_EQ(this->kShortGroupRl, rl); - EXPECT_EQ(this->kShortGroupRl.size(), rl_len); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/Makefile deleted file mode 100644 index be705d4a16..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/make -f - -#define path variables -IPP_INCLUDE_DIR = ../../ext/ipp/sources/ippcp/src -GTEST_INCLUDE_DIR = ../../ext - -LIB_INSTALL_DIR = $(epidinstalldir)/lib/posix-$(ARCH)/ -TEST_INSTALL_DIR = $(epidinstalldir)/test/ -HEADERS_INSTALL_DIR := $(epidinstalldir)/include/epid/common/ -HEADERS_11_INSTALL_DIR := $(epidinstalldir)/include/epid/common/1.1 - -API_HEADERS_INSTALL = $(wildcard ./*.h) - -API_11_HEADERS_INSTALL = $(wildcard ./1.1/*.h) - -COMMON_INCLUDE_DIR = ../../ -COMMON_MATH_INCLUDE_DIR = ./math -COMMON_SRC = $(wildcard ./src/*.c) -COMMON_SRC += $(wildcard ./math/src/*.c) -COMMON_SRC += $(wildcard ./1.1/src/*.c) -COMMON_OBJ = $(sort $(COMMON_SRC:.c=.o)) -COMMON_LIB = ./libcommon.a - -COMMON_UTEST_EXE = ./common-utest -COMMON_UTEST_SRC = $(wildcard ./math/unittests/*.cc) -COMMON_UTEST_SRC += $(wildcard ./unittests/*.cc) -COMMON_UTEST_SRC += $(wildcard ./1.1/unittests/*.cc) -COMMON_UTEST_OBJ = $(sort $(COMMON_UTEST_SRC:.cc=.o)) -LIB_COMMON_DIR = . -LIB_COMMON_TESTHELPER_DIR = ../common-testhelper -LIB_IPPCP_DIR = ../../ext/ipp/sources/ippcp/src -LIB_IPPCPEPID_DIR = ../../ext/ipp/sources/ippcpepid/src - -#set flags for linker -LDFLAGS += -L$(GTEST_INCLUDE_DIR)/gtest -L$(LIB_COMMON_TESTHELPER_DIR) \ - -L$(LIB_COMMON_DIR) -L$(LIB_IPPCPEPID_DIR) -L$(LIB_IPPCP_DIR) \ - -lgtest -lcommon-testhelper -lcommon -lippcpepid -lippcp - -#target part -$(COMMON_OBJ): %.o: %.c - $(CC) $(CFLAGS) -I$(IPP_INCLUDE_DIR) -I$(COMMON_MATH_INCLUDE_DIR) -I$(COMMON_INCLUDE_DIR) -c $^ -o $@ - -$(COMMON_LIB): $(COMMON_OBJ) - $(AR) rc $(COMMON_LIB) $(COMMON_OBJ) - ranlib $(COMMON_LIB) - -$(COMMON_UTEST_EXE): $(COMMON_UTEST_OBJ) - $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) - -$(COMMON_UTEST_OBJ): %.o: %.cc - $(CXX) -o $@ $(CXXFLAGS) -I$(COMMON_INCLUDE_DIR) -I$(GTEST_INCLUDE_DIR) -c $^ - -build: all - -all: $(COMMON_LIB) - -install: - mkdir -p '$(LIB_INSTALL_DIR)' - mkdir -p '$(HEADERS_INSTALL_DIR)' - mkdir -p '$(HEADERS_11_INSTALL_DIR)' - cp $(COMMON_LIB) '$(LIB_INSTALL_DIR)' - cp $(API_HEADERS_INSTALL) '$(HEADERS_INSTALL_DIR)' - cp $(API_11_HEADERS_INSTALL) '$(HEADERS_11_INSTALL_DIR)' -#install tests if they exist -ifneq (,$(wildcard $(COMMON_UTEST_EXE))) - mkdir -p '$(TEST_INSTALL_DIR)' - cp $(COMMON_UTEST_EXE) '$(TEST_INSTALL_DIR)' -endif - -check: $(COMMON_UTEST_EXE) run - -run: - $(COMMON_UTEST_EXE) $(GTEST_FLAGS) - -clean: - rm -f $(COMMON_OBJ) \ - $(COMMON_LIB) \ - $(COMMON_UTEST_OBJ) \ - $(COMMON_UTEST_EXE) \ - *.xml diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/bitsupplier.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/bitsupplier.h deleted file mode 100644 index 7abee2d03d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/bitsupplier.h +++ /dev/null @@ -1,46 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_BITSUPPLIER_H_ -#define EPID_COMMON_BITSUPPLIER_H_ -/*! - * \file - * \brief Random data supplier interface. - */ - -#if defined(_WIN32) || defined(_WIN64) -#define __STDCALL __stdcall -#else -#define __STDCALL -#endif - -/// Generates random data. -/*! - It is the responsibility of the caller of the SDK interfaces to - implement a function of this prototype and to then pass a pointer - to this function into methods that require it. - - \param[out] rand_data destination buffer - \param[in] num_bits size of rand_data in bits - \param[in] user_data user data passed through from api call. - - \returns zero on success and non-zero value on error. - - \ingroup EpidCommon - */ -typedef int(__STDCALL* BitSupplier)(unsigned int* rand_data, int num_bits, - void* user_data); - -#endif // EPID_COMMON_BITSUPPLIER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/common.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/common.parts deleted file mode 100644 index 3886d8c84a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/common.parts +++ /dev/null @@ -1,118 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ -Import('*') -env.PartName('common') - -api_headers = Pattern(src_dir='.', - includes=['*.h'], - recursive=False).files() -src_files = Pattern(src_dir='src', - includes=['*.c'], - recursive=False).files() -internal_headers = Pattern(src_dir='src', - includes=['*.h', '*.inc'], - recursive=False).files() -utest_files = Pattern(src_dir='unittests', - includes=['*-test.cc', '*-testhelper.cc'], - recursive=False).files() - -epid11_headers = Pattern(src_dir='1.1', - includes=['*.h'], - recursive=False).files() -epid11_src_files = Pattern(src_dir='1.1/src', - includes=['*.c'], - recursive=False).files() -epid11_internal_headers = Pattern(src_dir='1.1/src', - includes=['*.h', '*.inc'], - recursive=False).files() -epid11_utest_files = Pattern(src_dir='1.1/unittests', - includes=['*-test.cc', '*-testhelper.cc'], - recursive=False).files() - -math_headers = Pattern(src_dir='math', - includes=['*.h'], - recursive=False).files() -math_src_files = Pattern(src_dir='math/src', - includes=['*.c'], - recursive=False).files() -math_internal_headers = Pattern(src_dir='math/src', - includes=['*.h'], - recursive=False).files() -math_utest_files = Pattern(src_dir='math/unittests', - includes=['*-test.cc', '*-testhelper.cc'], - recursive=False).files() - -build_files = Pattern(src_dir='.', - includes=['*.parts', 'Makefile'], - recursive=False).files() - -if 'install_package' in env['MODE']: - env.InstallTopLevel(api_headers, sub_dir='epid/${PART_SHORT_NAME}') - env.InstallTopLevel(src_files + internal_headers, - sub_dir='epid/${PART_SHORT_NAME}/src') - env.InstallTopLevel(utest_files, - sub_dir='epid/${PART_SHORT_NAME}/unittests') - - - env.InstallTopLevel(epid11_headers, sub_dir='epid/${PART_SHORT_NAME}/1.1') - env.InstallTopLevel(epid11_src_files + epid11_internal_headers, - sub_dir='epid/${PART_SHORT_NAME}/1.1/src') - env.InstallTopLevel(epid11_utest_files, - sub_dir='epid/${PART_SHORT_NAME}/1.1/unittests') - - env.InstallTopLevel(math_headers, sub_dir='epid/${PART_SHORT_NAME}/math') - env.InstallTopLevel(math_src_files + math_internal_headers, - sub_dir='epid/${PART_SHORT_NAME}/math/src') - env.InstallTopLevel(math_utest_files, - sub_dir='epid/${PART_SHORT_NAME}/math/unittests') - - env.InstallTopLevel(build_files, sub_dir='epid/${PART_SHORT_NAME}') -else: - env.DependsOn([ - Component('ippcp'), - Component('ippcpepid'), - ]) - - env.Append(CPPPATH='#') - - testenv = env.Clone() - - env.SdkInclude(api_headers, sub_dir='epid/${PART_SHORT_NAME}') - env.SdkInclude(epid11_headers, sub_dir='epid/${PART_SHORT_NAME}/1.1') - - outputs = env.Library('${PART_NAME}', - src_files + epid11_src_files + math_src_files) - env.Sdk(outputs) - if 'install_lib' in env['MODE']: - env.InstallLib(outputs) - env.InstallInclude(api_headers, sub_dir='${PART_SHORT_NAME}') - env.InstallInclude(epid11_headers, sub_dir='${PART_SHORT_NAME}/1.1') - - # unit tests - testenv['UNIT_TEST_TARGET_NAME'] = "${PART_NAME}-${UNIT_TEST_TARGET}" - testenv.UnitTest("utest", - utest_files + math_utest_files + epid11_utest_files, - command_args=[ - '--gtest_color=yes', - '--gtest_print_time=1', - '--gtest_output=xml', - '--gtest_filter=**', - ], - make_pdb=(env.isConfigBasedOn('debug')), - depends=[Component('gtest'), - Component('common'), - Component('common-testhelper')], - INSTALL_BIN='${INSTALL_TEST_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/errors.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/errors.h deleted file mode 100644 index 15a29d0d81..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/errors.h +++ /dev/null @@ -1,73 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_ERRORS_H_ -#define EPID_COMMON_ERRORS_H_ -/*! - * \file - * \brief Error reporting. -*/ - -/// Error reporting interface. -/*! - \defgroup ErrorCodes errors - This module defines the return status type. It also provides tools for - interactions with status values, such as converting them to a string. - - \ingroup EpidCommon - @{ -*/ - -/// Return status for SDK functions. -/*! - Convention for status values is as follows: - - Zero indicates "success" - - Any positive number indicates "success with status" - - Any negative number indicates "failure" -*/ -typedef enum { - kEpidNoErr = 0, //!< no error - kEpidSigValid = 0, //!< Signature is valid - kEpidSigInvalid = 1, //!< Signature is invalid - kEpidSigRevokedInGroupRl = 2, //!< Signature revoked in GroupRl - kEpidSigRevokedInPrivRl = 3, //!< Signature revoked in PrivRl - kEpidSigRevokedInSigRl = 4, //!< Signature revoked in SigRl - kEpidSigRevokedInVerifierRl = 5, //!< Signature revoked in VerifierRl - kEpidErr = -999, //!< unspecified error - kEpidNotImpl, //!< not implemented error - kEpidBadArgErr, //!< incorrect arg to function - kEpidNoMemErr, //!< not enough memory for the operation - kEpidMemAllocErr, //!< insufficient memory allocated for operation - kEpidMathErr, //!< internal math error - kEpidDivByZeroErr, //!< an attempt to divide by zero - kEpidUnderflowErr, //!< a value became less than minimum supported level - kEpidHashAlgorithmNotSupported, //!< unsupported hash algorithm type - kEpidRandMaxIterErr, //!< reached max iteration for random number generation - kEpidDuplicateErr, //!< argument would add duplicate entry - kEpidInconsistentBasenameSetErr, //!< set basename conflicts with arguments - kEpidMathQuadraticNonResidueError, //!< quadratic Non-Residue Error -} EpidStatus; - -/// Returns string representation of error code. -/*! - \param e - The status value. - - \returns The string describing the status. -*/ -char const* EpidStatusToString(EpidStatus e); - -/*! @} */ -#endif // EPID_COMMON_ERRORS_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/file_parser.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/file_parser.h deleted file mode 100644 index a920b3b2c7..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/file_parser.h +++ /dev/null @@ -1,274 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Epid issuer material parsing utilities. - */ -#ifndef EPID_COMMON_FILE_PARSER_H_ -#define EPID_COMMON_FILE_PARSER_H_ - -#include - -#include "epid/common/types.h" -#include "epid/common/errors.h" - -/// Parser for issuer material -/*! - \defgroup FileParser fileparser - Provides an API for parsing buffers formatted according to the - various IoT Intel(R) EPID binary file formats. - - \ingroup EpidCommon - @{ -*/ - -/// Recognized Intel(R) EPID versions -typedef enum EpidVersion { - kEpid1x, ///< Intel(R) EPID version 1.x - kEpid2x, ///< Intel(R) EPID version 2.x - kNumEpidVersions, ///< Maximum number of EPID versions -} EpidVersion; - -/// Encoding of issuer material Intel(R) EPID versions -extern const OctStr16 kEpidVersionCode[kNumEpidVersions]; - -/// Recognized Intel(R) EPID file types -typedef enum EpidFileType { - kIssuingCaPubKeyFile, ///< IoT Issuing CA public key file - kGroupPubKeyFile, ///< Group Public Key Output File Format - kPrivRlFile, ///< Binary Private Key Revocation List - kSigRlFile, ///< Binary Signature Revocation List - kGroupRlFile, ///< Binary Group Revocation List - kPrivRlRequestFile, ///< Binary Private Key Revocation Request - kSigRlRequestFile, ///< Binary Signature Revocation Request - kGroupRlRequestFile, ///< Binary Group Revocation Request - kNumFileTypes, ///< Maximum number of file types -} EpidFileType; - -/// Encoding of issuer material file types -extern const OctStr16 kEpidFileTypeCode[kNumFileTypes]; - -#pragma pack(1) -/// Intel(R) EPID binary file header -typedef struct EpidFileHeader { - OctStr16 epid_version; ///< Intel(R) EPID Version - OctStr16 file_type; ///< File Type -} EpidFileHeader; - -/// IoT CA Certificate binary format -typedef struct EpidCaCertificate { - EpidFileHeader header; ///< Intel(R) EPID binary file header - OctStr512 pubkey; ///< Public Key (Qx, Qy) - OctStr256 prime; ///< Prime of GF(p) - OctStr256 a; ///< Coefficient of E Curve - OctStr256 b; ///< Coefficient of E Curve - OctStr256 x; ///< X coordinate of Base point G - OctStr256 y; ///< Y coordinate of Base point G - OctStr256 r; ///< Order of base point - EcdsaSignature signature; ///< ECDSA Signature on SHA-256 of above values -} EpidCaCertificate; -#pragma pack() - -/// Extracts Intel(R) EPID Binary Output File header information -/*! - \param[in] buf - Pointer to buffer containing Intel(R) EPID Binary Output File to parse. - - \param[in] len - The size of buf in bytes. - - \param[out] epid_version - The extracted EPID version or kNumEpidVersions if EPID version is unknown. - Pass NULL to not extract. - - \param[out] file_type - The extracted EPID file type or kNumFileTypes if file type is unknown. - Pass NULL to not extract. - - \returns ::EpidStatus - -*/ -EpidStatus EpidParseFileHeader(void const* buf, size_t len, - EpidVersion* epid_version, - EpidFileType* file_type); - -/// Extracts group public key from buffer in issuer binary format -/*! - - Extracts the first group public key from a buffer with format of - Intel(R) EPID 2.0 Group Public Key Certificate Binary File. The - function validates that the first public key was signed by the - private key corresponding to the provided CA certificate and the - size of the input buffer is correct. - - \warning - It is the responsibility of the caller to authenticate the - EpidCaCertificate. - - \param[in] buf - Pointer to buffer containing public key to extract. - - \param[in] len - The size of buf in bytes. - - \param[in] cert - The issuing CA public key certificate. - - \param[out] pubkey - The extracted group public key. - - \returns ::EpidStatus - - \retval ::kEpidSigInvalid - Parsing failed due to data authentication failure. - - */ -EpidStatus EpidParseGroupPubKeyFile(void const* buf, size_t len, - EpidCaCertificate const* cert, - GroupPubKey* pubkey); - -/// Extracts private key revocation list from buffer in issuer binary format -/*! - - Extracts the private key revocation list from a buffer with format of - Binary Private Key Revocation List File. The function - validates that the revocation list was signed by the private - key corresponding to the provided CA certificate and the size of the - input buffer is correct. - - To determine the required size of the revocation list output buffer, - provide a null pointer for the output buffer. - - \warning - It is the responsibility of the caller to authenticate the - EpidCaCertificate. - - \param[in] buf - Pointer to buffer containing the revocation list to extract. - - \param[in] len - The size of buf in bytes. - - \param[in] cert - The issuing CA public key certificate. - - \param[out] rl - The extracted revocation list. If Null, rl_len is filled with - the required output buffer size. - - \param[in,out] rl_len - The size of rl in bytes. - - \returns ::EpidStatus - - \retval ::kEpidSigInvalid - Parsing failed due to data authentication failure. - - */ -EpidStatus EpidParsePrivRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, PrivRl* rl, - size_t* rl_len); - -/// Extracts signature revocation list from buffer in issuer binary format -/*! - - Extracts the signature based revocation list from a buffer with - format of Binary Signature Revocation List File. The function - validates that the revocation list was signed by the private key - corresponding to the provided CA certificate and the size of the - input buffer is correct. - - To determine the required size of the revocation list output buffer, - provide a null pointer for the output buffer. - - \warning - It is the responsibility of the caller to authenticate the - EpidCaCertificate. - - \param[in] buf - Pointer to buffer containing the revocation list to extract. - - \param[in] len - The size of buf in bytes. - - \param[in] cert - The issuing CA public key certificate. - - \param[out] rl - The extracted revocation list. If Null, rl_len is filled with - the required output buffer size. - - \param[in,out] rl_len - The size of rl in bytes. - - \returns ::EpidStatus - - \retval ::kEpidSigInvalid - Parsing failed due to data authentication failure. - - */ -EpidStatus EpidParseSigRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, SigRl* rl, - size_t* rl_len); - -/// Extracts group revocation list from buffer in issuer binary format -/*! - - Extracts the group revocation list from a buffer with format of - Binary Group Certificate Revocation List File. The function - validates that the revocation list was signed by the private key - corresponding to the provided CA certificate and the size of the - input buffer is correct. - - To determine the required size of the revocation list output buffer, - provide a null pointer for the output buffer. - - \warning - It is the responsibility of the caller to authenticate the - EpidCaCertificate. - - \param[in] buf - Pointer to buffer containing the revocation list to extract. - - \param[in] len - The size of buf in bytes. - - \param[in] cert - The issuing CA public key certificate. - - \param[out] rl - The extracted revocation list. If Null, rl_len is filled with - the required output buffer size. - - \param[in,out] rl_len - The size of rl in bytes. - - \returns ::EpidStatus - - \retval ::kEpidSigInvalid - Parsing failed due to data authentication failure. - - */ -EpidStatus EpidParseGroupRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, GroupRl* rl, - size_t* rl_len); - -/*! - @} -*/ - -#endif // EPID_COMMON_FILE_PARSER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/bignum.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/bignum.h deleted file mode 100644 index e9e9df4df8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/bignum.h +++ /dev/null @@ -1,207 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Big number interface. - */ - -#ifndef EPID_COMMON_MATH_BIGNUM_H_ -#define EPID_COMMON_MATH_BIGNUM_H_ - -#include -#include -#include "epid/common/stdtypes.h" -#include "epid/common/errors.h" -#include "epid/common/types.h" - -/// Big number operations -/*! - \defgroup BigNumPrimitives bignum - This module provides an API for working with large numbers. BigNums - represent non-negative integers. - - Each BigNum variable represents a number of a byte-size set when the variable - was created. BigNum variables cannot be re-sized after they are created. - - - \ingroup EpidMath - @{ -*/ - -/// Internal representation of large numbers -typedef struct BigNum BigNum; - -/// Constructs a new BigNum. -/*! - Allocates memory and creates a new BigNum. - - Use DeleteBigNum() to free memory. - - \param[in] data_size_bytes - The size in bytes of the new number. - \param[out] bignum - The BigNum. - - \returns ::EpidStatus - - \see DeleteBigNum -*/ -EpidStatus NewBigNum(size_t data_size_bytes, BigNum** bignum); - -/// Deletes a previously allocated BigNum. -/*! - Frees memory pointed to by bignum. Nulls the pointer. - - \param[in] bignum - The BigNum. Can be NULL. - - \see NewBigNum -*/ -void DeleteBigNum(BigNum** bignum); - -/// Deserializes a BigNum from a string. -/*! - \param[in] bn_str - The serialized value. - \param[in] strlen - The size of bn_str in bytes. - \param[out] bn - The target BigNum. - - \returns ::EpidStatus -*/ -EpidStatus ReadBigNum(void const* bn_str, size_t strlen, BigNum* bn); - -/// Serializes a BigNum to a string. -/*! - \param[in] bn - The BigNum to be serialized. - \param[in] strlen - The size of bn_str in bytes. - \param[out] bn_str - The target string. - - \returns ::EpidStatus -*/ -EpidStatus WriteBigNum(BigNum const* bn, size_t strlen, void* bn_str); - -/// Adds two BigNum values. -/*! - \param[in] a - The first operand to be added. - \param[in] b - The second operand to be added. - \param[out] r - The result of adding a and b. - - \returns ::EpidStatus -*/ -EpidStatus BigNumAdd(BigNum const* a, BigNum const* b, BigNum* r); - -/// Subtracts two BigNum values. -/*! - \param[in] a - The first operand to use in subtraction. - \param[in] b - The second operand to use in subtraction. - \param[out] r - The result of subtracting a and b. - - \returns ::EpidStatus -*/ -EpidStatus BigNumSub(BigNum const* a, BigNum const* b, BigNum* r); - -/// Multiplies two BigNum values. -/*! - \param[in] a - The first operand to be multiplied. - \param[in] b - The second operand to be multiplied. - \param[out] r - The result of multiplying a and b. - - \returns ::EpidStatus -*/ -EpidStatus BigNumMul(BigNum const* a, BigNum const* b, BigNum* r); - -/// Divides two BigNum values. -/*! -\note Only needed for Intel(R) EPID 1.1 verification. - -\param[in] a -Dividend parameter. -\param[in] b -Divisor parameter. -\param[out] q -Quotient of result. -\param[out] r -Remainder of result. - -\returns ::EpidStatus -*/ -EpidStatus BigNumDiv(BigNum const* a, BigNum const* b, BigNum* q, BigNum* r); - -/// Computes modular reduction for BigNum value by specified modulus. -/*! -\param[in] a -The BigNum value. -\param[in] b -The modulus. -\param[out] r -Modular reduction result. - -\returns ::EpidStatus -*/ -EpidStatus BigNumMod(BigNum const* a, BigNum const* b, BigNum* r); - -/// Checks if a BigNum is even. -/*! - \param[in] a - The BigNum to check. - \param[out] is_even - The result of the check. - - \returns ::EpidStatus - */ -EpidStatus BigNumIsEven(BigNum const* a, bool* is_even); - -/// Checks if a BigNum is zero. -/*! - \param[in] a - The BigNum to check. - \param[out] is_zero - The result of the check. - - \returns ::EpidStatus - */ -EpidStatus BigNumIsZero(BigNum const* a, bool* is_zero); - -/// Raises 2 to the given power -/*! - \param[in] n - The power. - \param[out] r - The result of 2^n. - - \returns ::EpidStatus - */ -EpidStatus BigNumPow2N(unsigned int n, BigNum* r); - -/*! - @} -*/ -#endif // EPID_COMMON_MATH_BIGNUM_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/ecdsa.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/ecdsa.h deleted file mode 100644 index faeca4db9d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/ecdsa.h +++ /dev/null @@ -1,114 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Ecdsa interface. - */ - -#ifndef EPID_COMMON_MATH_ECDSA_H_ -#define EPID_COMMON_MATH_ECDSA_H_ - -#include - -#include "epid/common/errors.h" -#include "epid/common/types.h" -#include "epid/common/bitsupplier.h" - -/// Elliptic Curve Digital Signature Algorithm Primitives -/*! - \defgroup EcdsaPrimitives ecdsa - Provides APIs for computing and checking buffer signatures using the - Elliptic Curve Digital Signature Algorithm. - - \ingroup EpidMath - @{ -*/ - -/// Verifies authenticity of a digital signature over a buffer -/*! - - Uses Elliptic Curve Digital Signature Algorithm (ECDSA) to verify - that the SHA-256 hash of the input buffer was signed with the - private key corresponding to the provided public key. - - The operation is over the standard secp256r1 curve. - - \warning - It is the responsibility of the caller to verify the identity of - the public key. - - \param[in] buf - Pointer to buffer containing message to verify. - \param[in] buf_len - The size of buf in bytes. - \param[in] pubkey - The ECDSA public key on secp256r1 curve. - \param[in] sig - The ECDSA signature to be verified. - - \returns ::EpidStatus - - \retval ::kEpidSigValid - EcdsaSignature is valid for the given buffer. - \retval ::kEpidSigInvalid - EcdsaSignature is invalid for the given buffer. - - \see EcdsaSignBuffer - */ -EpidStatus EcdsaVerifyBuffer(void const* buf, size_t buf_len, - EcdsaPublicKey const* pubkey, - EcdsaSignature const* sig); - -/// Creates ECDSA signature of buffer -/*! - - Uses Elliptic Curve Digital Signature Algorithm (ECDSA) to generate - a signature of the SHA-256 hash of the input buffer with the provided - private key. - - The operation is over the standard secp256r1 curve. - - \param[in] buf - Pointer to buffer containing message to sign. - \param[in] buf_len - The size of buf in bytes. - \param[in] privkey - The ECDSA private key on secp256r1 curve. - \param[in] rnd_func - Random number generator. - \param[in] rnd_param - Pass through context data for rnd_func. - \param[out] sig - The resulting ECDSA signature. - - \returns ::EpidStatus - - \retval ::kEpidRandMaxIterErr - Failed to sign after maximum number of iterations due to bad luck in - random number generation. - - \see EcdsaSignBuffer - */ -EpidStatus EcdsaSignBuffer(void const* buf, size_t buf_len, - EcdsaPrivateKey const* privkey, BitSupplier rnd_func, - void* rnd_param, EcdsaSignature* sig); - -/*! - @} -*/ - -#endif // EPID_COMMON_MATH_ECDSA_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/ecgroup.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/ecgroup.h deleted file mode 100644 index 3f21d881e5..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/ecgroup.h +++ /dev/null @@ -1,482 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Elliptic curve group interface. - */ - -#ifndef EPID_COMMON_MATH_ECGROUP_H_ -#define EPID_COMMON_MATH_ECGROUP_H_ - -#include "epid/common/stdtypes.h" -#include "epid/common/errors.h" -#include "epid/common/math/bignum.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/types.h" - -/// Elliptic curve group operations -/*! - \defgroup EcGroupPrimitives ecgroup - Provides APIs for working with Elliptic curve groups. - Elliptic curve groups allow simple mathematical operations based on points - that lie on a defined elliptic curve. The results of these operations also - lie on the same curve. - - Curves themselves are defined based on elements (::FfElement) of a finite - field (::FiniteField). - - \ingroup EpidMath -@{ -*/ - -/// Elliptic curve group over finite field. -typedef struct EcGroup EcGroup; - -/// Constructs a new EcGroup. -/*! - - Allocates memory and creates a new elliptic curve group. - - Use DeleteFiniteField() to free memory. - - \param[in] ff - The finite field on which the curve is based. - \param[in] a - The A value of the elliptic curve. - \param[in] b - The B value of the elliptic curve. - \param[in] x - The X-coordinate of the base point of the elliptic curve. - \param[in] y - The Y-coordinate of the base point of the elliptic curve. - \param[in] order - The order of the elliptic curve group. - \param[in] cofactor - The co-factor of the elliptic curve. - \param[out] g - The newly constructed elliptic curve group. - - \returns ::EpidStatus - - \see DeleteEcGroup -*/ -EpidStatus NewEcGroup(FiniteField const* ff, FfElement const* a, - FfElement const* b, FfElement const* x, - FfElement const* y, BigNum const* order, - BigNum const* cofactor, EcGroup** g); - -/// Deletes a previously allocated EcGroup. -/*! - Frees memory pointed to by elliptic curve group. Nulls the pointer. - - \param[in] g - The elliptic curve group. Can be NULL. - - \see NewEcGroup -*/ -void DeleteEcGroup(EcGroup** g); - -/// Point on elliptic curve over finite field. -typedef struct EcPoint EcPoint; - -/// Creates a new EcPoint. -/*! - Allocates memory and creates a new point on elliptic curve group. - - Use DeleteEcPoint() to free memory. - - \param[in] g - Elliptic curve group. - \param[out] p - Newly constructed point on the elliptic curve group g. - - \returns ::EpidStatus - - \see NewEcGroup - \see DeleteEcPoint -*/ -EpidStatus NewEcPoint(EcGroup const* g, EcPoint** p); - -/// Deletes a previously allocated EcPoint. -/*! - - Frees memory used by a point on elliptic curve group. Nulls the pointer. - - \param[in] p - The EcPoint. Can be NULL. - - \see NewEcPoint -*/ -void DeleteEcPoint(EcPoint** p); - -/// Deserializes an EcPoint from a string. -/*! - \param[in] g - The elliptic curve group. - \param[in] p_str - The serialized value. - \param[in] strlen - The size of p_str in bytes. - \param[out] p - The target EcPoint. - - \returns ::EpidStatus - - \see NewEcPoint -*/ -EpidStatus ReadEcPoint(EcGroup* g, void const* p_str, size_t strlen, - EcPoint* p); - -/// Serializes an EcPoint to a string. -/*! - \param[in] g - The elliptic curve group. - \param[in] p - The EcPoint to be serialized. - \param[out] p_str - The target string. - \param[in] strlen - the size of p_str in bytes. - - \returns ::EpidStatus - - \see NewEcPoint -*/ -EpidStatus WriteEcPoint(EcGroup* g, EcPoint const* p, void* p_str, - size_t strlen); - -/// Multiplies two elements in an elliptic curve group. -/*! - This multiplication operation is also known as element addition for - elliptic curve groups. - - \param[in] g - The elliptic curve group. - \param[in] a - The first operand to be multiplied. - \param[in] b - The second operand to be multiplied. - \param[out] r - The result of multiplying a and b. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint -*/ -EpidStatus EcMul(EcGroup* g, EcPoint const* a, EcPoint const* b, EcPoint* r); - -/// Raises a point in an elliptic curve group to a power. -/*! - This exponentiation operation is also known as element multiplication - for elliptic curve groups. - \param[in] g - The elliptic curve group. - \param[in] a - The base. - \param[in] b - The power. Power must be less than the order of the elliptic curve - group. - \param[out] r - The result of raising a to the power b. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint -*/ -EpidStatus EcExp(EcGroup* g, EcPoint const* a, BigNumStr const* b, EcPoint* r); - -/// Software side-channel mitigated implementation of EcExp. -/*! - This exponentiation operation is also known as element multiplication - for elliptic curve groups. - - \attention - The reference implementation of EcSscmExp calls EcExp directly because - the implementation of EcExp is already side channel mitigated. Implementers - providing their own versions of this function are responsible for ensuring - that EcSscmExp is side channel mitigated per section 8 of the - Intel(R) EPID 2.0 spec. - - \param[in] g - The elliptic curve group. - \param[in] a - The base. - \param[in] b - The power. Power must be less than the order of the elliptic curve - group. - \param[out] r - The result of raising a to the power b. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint -*/ -EpidStatus EcSscmExp(EcGroup* g, EcPoint const* a, BigNumStr const* b, - EcPoint* r); - -/// Multi-exponentiates elements in elliptic curve group. -/*! - Takes a group elements a[0], ... , a[m-1] in G and positive - integers b[0], ..., b[m-1], where m is a small positive integer. - Outputs r (in G) = EcExp(a[0],b[0]) * ... * EcExp(a[m-1],b[m-1]). - - \param[in] g - The elliptic curve group. - \param[in] a - The bases. - \param[in] b - The powers. Power must be less than the order of the elliptic curve - group. - \param[in] m - Number of entries in a and b. - \param[out] r - The result of raising each a to the corresponding power b and multiplying - the results. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint -*/ -EpidStatus EcMultiExp(EcGroup* g, EcPoint const** a, BigNumStr const** b, - size_t m, EcPoint* r); - -/// Multi-exponentiates elements in elliptic curve group. -/*! -Takes a group elements a[0], ... , a[m-1] in G and positive -integers b[0], ..., b[m-1], where m is a small positive integer. -Outputs r (in G) = EcExp(a[0],b[0]) * ... * EcExp(a[m-1],b[m-1]). - -\param[in] g -The elliptic curve group. -\param[in] a -The bases. -\param[in] b -The powers. Power must be less than the order of the elliptic curve -group. -\param[in] m -Number of entries in a and b. -\param[out] r -The result of raising each a to the corresponding power b and multiplying -the results. - -\returns ::EpidStatus - -\see NewEcGroup -\see NewEcPoint -*/ -EpidStatus EcMultiExpBn(EcGroup* g, EcPoint const** a, BigNum const** b, - size_t m, EcPoint* r); - -/// Software side-channel mitigated implementation of EcMultiExp. -/*! - Takes a group elements a[0], ... , a[m-1] in G and positive - integers b[0], ..., b[m-1], where m is a small positive integer. - Outputs r (in G) = EcExp(a[0],b[0]) * ... * EcExp(a[m-1],b[m-1]). - - \attention - The reference implementation of EcSscmMultiExp calls EcMultiExp - directly because the implementation of EcMultiExp is already side channel - mitigated. Implementers providing their own versions of this function are - responsible for ensuring that EcSscmMultiExp is side channel mitigated per - section 8 of the Intel(R) EPID 2.0 spec. - - \param[in] g - The elliptic curve group. - \param[in] a - The bases. - \param[in] b - The powers. Power must be less than the order of the elliptic curve - group. - \param[in] m - Number of entries in a and b. - \param[out] r - The result of raising each a to the corresponding power b and - multiplying the results. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint -*/ -EpidStatus EcSscmMultiExp(EcGroup* g, EcPoint const** a, BigNumStr const** b, - size_t m, EcPoint* r); - -/// Generates a random element from an elliptic curve group. -/*! - This function is only available for G1 and GT. - - \param[in] g - The elliptic curve group. - \param[in] rnd_func - Random number generator. - \param[in] rnd_func_param - Pass through context data for rnd_func. - \param[in,out] r - Output random elliptic curve element. - - \returns ::EpidStatus - - \see NewEcPoint - \see BitSupplier -*/ -EpidStatus EcGetRandom(EcGroup* g, BitSupplier rnd_func, void* rnd_func_param, - EcPoint* r); - -/// Checks if a point is in an elliptic curve group. -/*! - \param[in] g - The elliptic curve group. - \param[in] p_str - A serialized point. Must be a G1ElemStr or G2ElemStr. - \param[in] strlen - The size of p_str in bytes. - \param[out] in_group - The result of the check. - - \returns ::EpidStatus - - \see NewEcPoint -*/ -EpidStatus EcInGroup(EcGroup* g, void const* p_str, size_t strlen, - bool* in_group); - -/// Hashes an arbitrary message to an Intel(R) EPID 1.1 element in an elliptic -/// curve group. -/*! -\param[in] g -The elliptic curve group. -\param[in] msg -The message. -\param[in] msg_len -The size of msg in bytes. -\param[out] r -The hashed value. - -\returns ::EpidStatus - -\see NewEcGroup -\see NewEcPoint -*/ -EpidStatus Epid11EcHash(EcGroup* g, void const* msg, size_t msg_len, - EcPoint* r); - -/// Hashes an arbitrary message to an element in an elliptic curve group. -/*! - \param[in] g - The elliptic curve group. - \param[in] msg - The message. - \param[in] msg_len - The size of msg in bytes. - \param[in] hash_alg - The hash algorithm. - \param[out] r - The hashed value. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint -*/ -EpidStatus EcHash(EcGroup* g, void const* msg, size_t msg_len, HashAlg hash_alg, - EcPoint* r); - -/// Sets an EcPoint variable to a point on a curve. -/*! - This function is only available for G1. - - \param[in] g - The elliptic curve group. - \param[in] x - The x coordinate. - \param[out] r - The point. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint - \see NewFfElement -*/ -EpidStatus EcMakePoint(EcGroup* g, FfElement const* x, EcPoint* r); - -/// Computes the additive inverse of an EcPoint. -/*! - This inverse operation is also known as element negation - for elliptic curve groups. - - \param[in] g - The elliptic curve group. - \param[in] p - The point. - \param[out] r - The inverted point. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint -*/ -EpidStatus EcInverse(EcGroup* g, EcPoint const* p, EcPoint* r); - -/// Checks if two EcPoints are equal. -/*! - \param[in] g - The elliptic curve group. - \param[in] a - A point to check. - \param[in] b - Another point to check. - \param[out] is_equal - The result of the check. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint - */ -EpidStatus EcIsEqual(EcGroup* g, EcPoint const* a, EcPoint const* b, - bool* is_equal); - -/// Checks if an EcPoint is the identity element. -/*! - - Takes a group element P as input. It outputs true if P is the - identity element of G. Otherwise, it outputs false. - - \param[in] g - The elliptic curve group. - \param[in] p - The point to check. - \param[out] is_identity - The result of the check. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint -*/ -EpidStatus EcIsIdentity(EcGroup* g, EcPoint const* p, bool* is_identity); - -/*! -@} -*/ -#endif // EPID_COMMON_MATH_ECGROUP_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/finitefield.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/finitefield.h deleted file mode 100644 index 3754ef31b7..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/finitefield.h +++ /dev/null @@ -1,508 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Finite field interface. - */ - -#ifndef EPID_COMMON_MATH_FINITEFIELD_H_ -#define EPID_COMMON_MATH_FINITEFIELD_H_ - -#include "epid/common/stdtypes.h" -#include "epid/common/bitsupplier.h" -#include "epid/common/errors.h" -#include "epid/common/math/bignum.h" -#include "epid/common/types.h" - -/// Finite field operations -/*! -\defgroup FiniteFieldPrimitives finitefield -provides APIs for working with finite fields. -Finite fields allow simple mathematical operations based on a finite set of -discrete values. The results of these operations are also contained in the -same set. - -A simple example of a finite field is all integers from zero that are less than -a given value. - -The elements (::FfElement) of a finite field can be used in a variety of -simple mathematical operations that result in elements of the same field. - -\ingroup EpidMath -@{ -*/ - -/// A finite field. -typedef struct FiniteField FiniteField; - -/// An element in a finite field. -typedef struct FfElement FfElement; - -/// Creates new finite field. -/*! - Allocates memory and creates a new finite field GF(prime). - - Use DeleteFiniteField() to free memory. - - \param[in] prime - The order of the finite field. - \param[out] ff - The newly constructed finite field. - - \returns ::EpidStatus - - \see DeleteFiniteField -*/ -EpidStatus NewFiniteField(BigNumStr const* prime, FiniteField** ff); - -/// Creates a new finite field using binomial extension. -/*! - Allocates memory and creates a finite field using binomial extension. - - Use DeleteFiniteField() to free memory. - - \param[in] ground_field - The ground field. - \param[in] ground_element - The low-order term of the extension. - \param[in] degree - The degree of the extension. - \param[out] ff - The newly constructed finite field. - - \returns ::EpidStatus - - \see DeleteFiniteField -*/ -EpidStatus NewFiniteFieldViaBinomalExtension(FiniteField const* ground_field, - FfElement const* ground_element, - int degree, FiniteField** ff); - -/// Creates a new finite field using polynomial extension. -/*! - Allocates memory and creates a finite field using polynomial extension. - - Use DeleteFiniteField() to free memory. - - \note Only needed for Intel(R) EPID 1.1 verification. - - \param[in] ground_field - The ground field. - \param[in] irr_polynomial - Array with coefficients of the irreducible polynomial. - Number of elements must be equal to the degree of the extension. - \param[in] degree - The degree of the extension. - \param[out] ff - The newly constructed finite field. - - \returns ::EpidStatus - - \see DeleteFiniteField -*/ -EpidStatus NewFiniteFieldViaPolynomialExtension(FiniteField const* ground_field, - BigNumStr const* irr_polynomial, - int degree, FiniteField** ff); - -/// Frees a previously allocated FiniteField. -/*! - Frees memory pointed to by finite field. Nulls the pointer. - - \param[in] ff - The Finite field. Can be NULL. - - \see NewFiniteField -*/ -void DeleteFiniteField(FiniteField** ff); - -/// Creates a new finite field element. -/*! - Allocates memory and creates a new finite field - element. - - Use DeleteFfElement() to free memory. - - \param[in] ff - The finite field. - \param[out] new_ff_elem -The Newly constructed finite field element. - - \returns ::EpidStatus - - \see NewFiniteField - \see DeleteFfElement - */ -EpidStatus NewFfElement(FiniteField const* ff, FfElement** new_ff_elem); - -/// Frees a previously allocated FfElement. -/*! - Frees memory pointed to by ff_elem. Nulls the pointer. - - \param[in] ff_elem - The finite field element. Can be NULL. - - \see NewFfElement -*/ -void DeleteFfElement(FfElement** ff_elem); - -/// Deserializes a FfElement from a string. -/*! - \param[in] ff - The finite field. - \param[in] ff_elem_str - The serialized value. - \param[in] strlen - The size of ff_elem_str in bytes. - \param[out] ff_elem - The target FfElement. - - \returns ::EpidStatus - - \see NewFfElement - \see WriteFfElement -*/ -EpidStatus ReadFfElement(FiniteField* ff, void const* ff_elem_str, - size_t strlen, FfElement* ff_elem); - -/// Initializes an existing FfElement from a BigNum. -/*! - \param[in] ff - The finite field. Must be a Prime Field. - \param[in] bn - The value to read. - \param[out] ff_elem - The target FfElement. - - \returns ::EpidStatus - - \see NewFfElement - \see WriteFfElement -*/ -EpidStatus InitFfElementFromBn(FiniteField* ff, BigNum* bn, FfElement* ff_elem); - -/// Serializes a finite field element to a string. -/*! - \param[in] ff - The finite field. - \param[in] ff_elem - The FfElement to be serialized. - \param[out] ff_elem_str - The target string. - \param[in] strlen - The size of ff_elem_str in bytes. - - \returns ::EpidStatus - - \see NewFfElement - \see FpElemStr - \see FqElemStr - \see GtElemStr -*/ -EpidStatus WriteFfElement(FiniteField* ff, FfElement const* ff_elem, - void* ff_elem_str, size_t strlen); - -/// Calculates the additive inverse of a finite field element. -/*! - \param[in] ff - The finite field. - \param[in] a - The element. - \param[out] r - The inverted element. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement - */ -EpidStatus FfNeg(FiniteField* ff, FfElement const* a, FfElement* r); - -/// Calculates the multiplicative inverse of a finite field element. -/*! - \param[in] ff - The finite field. - \param[in] a - The element. - \param[out] r - The inverted element. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement - */ -EpidStatus FfInv(FiniteField* ff, FfElement const* a, FfElement* r); - -/// Adds two finite field elements. -/*! - \param[in] ff - The finite field. - \param[out] a - The first operand to be added. - \param[out] b - The second operand to be added. - \param[out] r - The result of adding a and b. - - \returns ::EpidStatus - */ -EpidStatus FfAdd(FiniteField* ff, FfElement const* a, FfElement const* b, - FfElement* r); - -/// Subtracts two finite field elements. -/*! - -\note Only needed for Intel(R) EPID 1.1 verification. - -\param[in] ff -The finite field. -\param[out] a -The first operand to use in subtraction. -\param[out] b -The second operand to use in subtraction. -\param[out] r -The result of subtracting a and b. - -\returns ::EpidStatus -*/ -EpidStatus FfSub(FiniteField* ff, FfElement const* a, FfElement const* b, - FfElement* r); - -/// Multiplies two finite field elements. -/*! - \param[in] ff - The finite field. - \param[out] a - The first operand to be multplied. - \param[out] b - The second operand to be multiplied. If ff is an extension field of a - field F then this parameter may be an element of either ff or F. - \param[out] r - The result of multiplying a and b. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement - */ -EpidStatus FfMul(FiniteField* ff, FfElement const* a, FfElement const* b, - FfElement* r); - -/// Checks if given finite field element is the additive identity (zero). -/*! - \param[in] ff - The finite field. - \param[out] a - The element. - \param[out] is_zero - The result of the check. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement - */ -EpidStatus FfIsZero(FiniteField* ff, FfElement const* a, bool* is_zero); - -/// Raises an element of a finite field to a power. -/*! - \param[in] ff - The finite field in which to perform the operation - \param[in] a - The base. - \param[in] b - The power. - \param[out] r - The result of raising a to the power b. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement - */ -EpidStatus FfExp(FiniteField* ff, FfElement const* a, BigNum const* b, - FfElement* r); - -/// Multi-exponentiates finite field elements. -/*! - Calculates FfExp(p[0],b[0]) * ... * FfExp(p[m-1],b[m-1]) for m > 1 - - \param[in] ff - The finite field in which to perform the operation - \param[in] a - The bases. - \param[in] b - The powers. - \param[in] m - Number of entries in a and b. - \param[out] r - The result of raising each a to the corresponding power b and multiplying - the results. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement -*/ -EpidStatus FfMultiExp(FiniteField* ff, FfElement const** a, BigNumStr const** b, - size_t m, FfElement* r); - -/// Multi-exponentiates finite field elements. -/*! - Calculates FfExp(p[0],b[0]) * ... * FfExp(p[m-1],b[m-1]) for m > 1 - - \param[in] ff - The finite field in which to perform the operation - \param[in] a - The bases. - \param[in] b - The powers. - \param[in] m - Number of entries in a and b. - \param[out] r - The result of raising each a to the corresponding power b and multiplying - the results. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement -*/ -EpidStatus FfMultiExpBn(FiniteField* ff, FfElement const** a, BigNum const** b, - size_t m, FfElement* r); - -/// Software side-channel mitigated implementation of FfMultiExp. -/*! - Calculates FfExp(p[0],b[0]) * ... * FfExp(p[m-1],b[m-1]) for m > 1 - - \attention - The reference implementation of FfSscmMultiExp calls FfMultiExp - directly because the implementation of FfMultiExp is already side channel - mitigated. Implementers providing their own versions of this function are - responsible for ensuring that FfSscmMultiExp is side channel mitigated per - section 8 of the Intel(R) EPID 2.0 spec. - - \param[in] ff - The finite field in which to perform the operation. - \param[in] a - The bases. - \param[in] b - The powers. - \param[in] m - Number of entries in a and b. - \param[out] r - The result of raising each a to the corresponding power b and multiplying - the results. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement -*/ - -EpidStatus FfSscmMultiExp(FiniteField* ff, FfElement const** a, - BigNumStr const** b, size_t m, FfElement* r); - -/// Checks if two finite field elements are equal. -/*! - \param[in] ff - The finite field. - \param[in] a - An element to check. - \param[in] b - Another element to check. - \param[out] is_equal - The result of the check. - - \returns ::EpidStatus - - \see NewEcGroup - \see NewEcPoint - */ -EpidStatus FfIsEqual(FiniteField* ff, FfElement const* a, FfElement const* b, - bool* is_equal); - -/// Hashes an arbitrary message to an element in a finite field. -/*! - \param[in] ff - The finite field. - \param[in] msg - The message. - \param[in] msg_len - The size of msg in bytes. - \param[in] hash_alg - The hash algorithm. - \param[out] r - The hashed value. - - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement - */ -EpidStatus FfHash(FiniteField* ff, void const* msg, size_t msg_len, - HashAlg hash_alg, FfElement* r); - -/// Generate random finite field element. -/*! - \param[in] ff - The finite field associated with the random finite field element. - \param[in] low_bound - Lower bound of the random finite field to be generated. - \param[in] rnd_func - Random number generator. - \param[in] rnd_param - Pass through context data for rnd_func. - \param[in,out] r - The random finite field element. - - \returns ::EpidStatus - - \retval ::kEpidRandMaxIterErr the function should be called again with - different random data. - - \see NewFfElement - \see BitSupplier - */ -EpidStatus FfGetRandom(FiniteField* ff, BigNumStr const* low_bound, - BitSupplier rnd_func, void* rnd_param, FfElement* r); - -/// Finds a square root of a finite field element. -/*! - This function calculates the square root by the method of false position. - - \param[in] ff - The finite field in which to perform the operation - \param[in] a - The bases. - \param[out] r - The result of raising each a to the corresponding power b and multiplying - the results. - - \retval kEpidMathQuadraticNonResidueError No square root could be found. - \returns ::EpidStatus - - \see NewFiniteField - \see NewFfElement -*/ -EpidStatus FfSqrt(FiniteField* ff, FfElement const* a, FfElement* r); - -/*! - @} -*/ - -#endif // EPID_COMMON_MATH_FINITEFIELD_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/hash.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/hash.h deleted file mode 100644 index 30e8e2009f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/hash.h +++ /dev/null @@ -1,63 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Hash primitives. - */ - -#ifndef EPID_COMMON_MATH_HASH_H_ -#define EPID_COMMON_MATH_HASH_H_ - -#include -#include -#include // for CHAR_BIT -#include "epid/common/errors.h" - -/// Hash primitives -/*! - \defgroup HashPrimitives hash - Provides APIs for computing digests of messages. - - \ingroup EpidMath - @{ -*/ - -#pragma pack(1) -/// SHA256 digest -typedef struct Sha256Digest { - unsigned char data[256 / CHAR_BIT]; ///< 256 bit data -} Sha256Digest; -#pragma pack() - -/// Computes SHA256 digest of a message. -/*! - \param[in] msg - Message to compute digest for. - \param[in] len - The size of msg in bytes. - \param[out] digest - The resulting message digest. - - \returns ::EpidStatus -*/ -EpidStatus Sha256MessageDigest(void const* msg, size_t len, - Sha256Digest* digest); - -/*! - @} -*/ -#endif // EPID_COMMON_MATH_HASH_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/pairing.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/pairing.h deleted file mode 100644 index 5aab91afee..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/pairing.h +++ /dev/null @@ -1,102 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Pairing interface. - */ - -#ifndef EPID_COMMON_MATH_PAIRING_H_ -#define EPID_COMMON_MATH_PAIRING_H_ - -#include "epid/common/errors.h" -#include "epid/common/types.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/ecgroup.h" - -/// Pairing operations -/*! - \defgroup PairingPrimitives pairing - Provides APIs for defining and using a pairing relationship between two - elliptic curve groups. - - \ingroup EpidMath - @{ -*/ - -/// A pairing -typedef struct PairingState PairingState; - -/// Constructs a new pairing state. -/*! - Allocates memory and creates a new pairing state for Optimal Ate Pairing. - - Use DeletePairingState() to free memory. - - \param[in] ga - The EcGroup from which the first parameter of the pairing is taken. - \param[in] gb - The EcGroup from which the second parameter of the pairing is taken. - \param[in] ff - The result finite field. Must be a Fq12 field. - \param[in] t - A positive integer such that 6(t^2) == q - p, where p and q are parameters - of G1. - \param[in] neg - Select the alternate "negate" processing path for Optimal Ate Pairing. - \param[out] ps - Newly constructed pairing state. - - \returns ::EpidStatus - - \see DeletePairingState -*/ -EpidStatus NewPairingState(EcGroup const* ga, EcGroup const* gb, - FiniteField* ff, BigNumStr const* t, bool neg, - PairingState** ps); - -/// Frees a previously allocated by PairingState. -/*! - Frees memory pointed to by pairing state. Nulls the pointer. - - \param[in] ps - The pairing state. Can be NULL. - - \see NewPairingState -*/ -void DeletePairingState(PairingState** ps); - -/// Computes an Optimal Ate Pairing for two parameters. -/*! - \param[in] ps - The pairing state. - \param[out] d - The result of the pairing. Will be in ff used to create the pairing state. - \param[in] a - The first value to pair. Must be in ga used to create ps. - \param[in] b - The second value to pair. Must be in gb used to create ps - - \returns ::EpidStatus -*/ -EpidStatus Pairing(PairingState* ps, FfElement* d, EcPoint const* a, - EcPoint const* b); - -/*! - @} -*/ - -#endif // EPID_COMMON_MATH_PAIRING_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/printutils.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/printutils.h deleted file mode 100644 index 6f21b09eab..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/printutils.h +++ /dev/null @@ -1,288 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Print helper interface. - */ -#ifndef EPID_COMMON_MATH_PRINTUTILS_H_ -#define EPID_COMMON_MATH_PRINTUTILS_H_ - -#include "epid/common/types.h" -#include "epid/common/math/bignum.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/ecgroup.h" - -/// Debug print routines -/*! - \defgroup EpidPrint print_utils - Defines an API to print formatted versions of the types used for - mathematical operations. - - If the symbol EPID_ENABLE_DEBUG_PRINT is not defined, all calls to the - functions in this module are ignored. - - \ingroup EpidCommon - @{ -*/ - -/// Print format -typedef enum { - kPrintUtilUnannotated = 0, //!< Unannotated output format - kPrintUtilAnnotated = 1, //!< Annotated output format - kPrintUtilFormatCount = 2, //!< Count of print formats. -} PrintUtilFormat; - -#if !defined(EPID_ENABLE_DEBUG_PRINT) - -/// Do not print bignum if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintBigNum(...) - -/// Do not print ff element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintFfElement(...) - -/// Do not print ec point if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintEcPoint(...) - -/// Do not print serialized bignum if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintBigNumStr(...) - -/// Do not print Fp element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintFpElemStr(...) - -/// Do not print Fq element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintFqElemStr(...) - -/// Do not print Fq2 element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintFq2ElemStr(...) - -/// Do not print Fq6 element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintFq6ElemStr(...) - -/// Do not print Fq12 element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintFq12ElemStr(...) - -/// Do not print G1 element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintG1ElemStr(...) - -/// Do not print G2 element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintG2ElemStr(...) - -/// Do not print Gt element if EPID_ENABLE_DEBUG_PRINT is undefined -#define PrintGtElemStr(...) - -#else - -/// Prints BigNum -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] big_num - BigNum to be printed - \param[in] var_name - Result variable name - -*/ -void PrintBigNum(BigNum const* big_num, char const* var_name); - -/// Prints finite field element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] ff - Finite field that element to be printed belongs to - \param[in] ff_element - Finite field element to be printed - \param[in] var_name - Result variable name - \param[in] format - Output format - -*/ -void PrintFfElement(FiniteField const* ff, FfElement const* ff_element, - char const* var_name, PrintUtilFormat format); - -/// Prints elliptic curve group element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] g - Elliptic curve group that element to be printed belongs to - \param[in] ec_point - Elliptic curve group element to be printed - \param[in] var_name - Result variable name - \param[in] format - Output format - -*/ -void PrintEcPoint(EcGroup const* g, EcPoint const* ec_point, - char const* var_name, PrintUtilFormat format); - -/// Prints serialized BigNum -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] big_num_str - Serialized BigNum to be printed - \param[in] var_name - Result variable name - -*/ -void PrintBigNumStr(BigNumStr const* big_num_str, char const* var_name); - -/// Prints serialized Fp element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] fp_elem_str - Serialized Fp element to be printed - \param[in] var_name - Result variable name - -*/ -void PrintFpElemStr(FpElemStr const* fp_elem_str, char const* var_name); - -/// Prints serialized Fq element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] fq_elem_str - Serialized Fq element to be printed - \param[in] var_name - Result variable name - -*/ -void PrintFqElemStr(FqElemStr const* fq_elem_str, char const* var_name); - -/// Prints serialized Fq2 element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] fq2_elem_str - Serialized Fq2 element to be printed - \param[in] var_name - Result variable name - \param[in] format - Output format - -*/ -void PrintFq2ElemStr(Fq2ElemStr const* fq2_elem_str, char const* var_name, - PrintUtilFormat format); - -/// Prints serialized Fq6 element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] fq6_elem_str - Serialized Fq6 element to be printed - \param[in] var_name - Result variable name - \param[in] format - Output format - -*/ -void PrintFq6ElemStr(Fq6ElemStr const* fq6_elem_str, char const* var_name, - PrintUtilFormat format); - -/// Prints serialized Fq12 element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] fq12_elem_str - Serialized Intel(R) EPID Fq12 element to be printed - \param[in] var_name - Result variable name - \param[in] format - Output format - -*/ -void PrintFq12ElemStr(Fq12ElemStr const* fq12_elem_str, char const* var_name, - PrintUtilFormat format); - -/// Prints serialized G1 element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] g1_elem_str - Serialized G1 element to be printed - \param[in] var_name - Result variable name - \param[in] format - Output format - -*/ -void PrintG1ElemStr(G1ElemStr const* g1_elem_str, char const* var_name, - PrintUtilFormat format); - -/// Prints serialized G2 element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] g2_elem_str - Serialized G2 element to be printed - \param[in] var_name - Result variable name - \param[in] format - Output format - -*/ -void PrintG2ElemStr(G2ElemStr const* g2_elem_str, char const* var_name, - PrintUtilFormat format); - -/// Prints serialized Gt element -/*! - Macro EPID_ENABLE_DEBUG_PRINT needs to be defined - in order to activate this routine; otherwise, - it prints nothing. - - \param[in] gt_elem_str - Serialized G2 element to be printed - \param[in] var_name - Result variable name - \param[in] format - Output format - -*/ -void PrintGtElemStr(GtElemStr const* gt_elem_str, char const* var_name, - PrintUtilFormat format); - -#endif // !defined( EPID_ENABLE_DEBUG_PRINT ) -/*! @} */ - -#endif // EPID_COMMON_MATH_PRINTUTILS_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/bignum-internal.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/bignum-internal.h deleted file mode 100644 index e30b6f83a0..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/bignum-internal.h +++ /dev/null @@ -1,83 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Big number private interface. - */ - -#ifndef EPID_COMMON_MATH_SRC_BIGNUM_INTERNAL_H_ -#define EPID_COMMON_MATH_SRC_BIGNUM_INTERNAL_H_ - -#include "ext/ipp/include/ippcpepid.h" -#include "epid/common/stdtypes.h" -#include "epid/common/errors.h" - -/// Big Number -struct BigNum { - /// Internal implementation of bignum - IppsBigNumState* ipp_bn; -}; - -/// convert octet string into "big number unsigned" representation -/*! - -This is an internal function, used to convert an octet string (uint8_t -array) into a big number unsigned representation (uint32_t array). -For example, octet string {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -0x08} is converted to {0x05060708, 0x01020304} - -\param[out] bnu_ptr -Output big number unsigned array -\param[in] octstr_ptr -Input octal string -\param[in] octstr_len -Length of octet string, should be multiple of 4 - -\returns length of big number unsigned in uint32_t chunks -\returns -1 in case of any error -*/ -int OctStr2Bnu(uint32_t* bnu_ptr, void const* octstr_ptr, int octstr_len); - -/// Get octet string size in bits -/*! -\param[in] octstr_ptr -Input octet string. -\param[in] octstr_len -Length of octet string in bytes. - -\returns bit size of big number value from octet string -*/ -size_t OctStrBitSize(uint8_t const* octstr_ptr, size_t octstr_len); - -/// Initializes a BigNum from a BNU. -/*! - \param[in] bnu - The desired value as a bnu. - \param[in] bnu_len - The size of bnu_str in 32 bit words. - \param[out] bn - The target BigNum. - - \note A BNU is a big integer represented as array of 4 byte words written in - little endian order - - \returns ::EpidStatus -*/ -EpidStatus InitBigNumFromBnu(uint32_t const* bnu, size_t bnu_len, - struct BigNum* bn); - -#endif // EPID_COMMON_MATH_SRC_BIGNUM_INTERNAL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/bignum.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/bignum.c deleted file mode 100644 index 5ab4fdb181..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/bignum.c +++ /dev/null @@ -1,435 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Big number implementation. - */ -#include "epid/common/math/bignum.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/src/memory.h" -#include "ext/ipp/include/ippcp.h" - -EpidStatus NewBigNum(size_t data_size_bytes, BigNum** bignum) { - EpidStatus result = kEpidErr; - IppsBigNumState* ipp_bn_ctx = NULL; - BigNum* bn = NULL; - do { - IppStatus sts = ippStsNoErr; - unsigned int ctxsize; - unsigned int wordsize = - (unsigned int)((data_size_bytes + sizeof(Ipp32u) - 1) / sizeof(Ipp32u)); - - if (!bignum) { - result = kEpidBadArgErr; - break; - } - // Determine the memory requirement for bignum context - sts = ippsBigNumGetSize(wordsize, (int*)&ctxsize); - if (ippStsNoErr != sts) { - if (ippStsLengthErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - // Allocate space for ipp bignum context - ipp_bn_ctx = (IppsBigNumState*)SAFE_ALLOC(ctxsize); - if (!ipp_bn_ctx) { - result = kEpidMemAllocErr; - break; - } - // Initialize ipp bignum context - sts = ippsBigNumInit(wordsize, ipp_bn_ctx); - if (ippStsNoErr != sts) { - if (ippStsLengthErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - - bn = (BigNum*)SAFE_ALLOC(sizeof(BigNum)); - if (!bn) { - result = kEpidMemAllocErr; - break; - } - - bn->ipp_bn = ipp_bn_ctx; - - *bignum = bn; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result) { - SAFE_FREE(ipp_bn_ctx); - SAFE_FREE(bn); - } - return result; -} - -void DeleteBigNum(BigNum** bignum) { - if (bignum) { - if (*bignum) { - SAFE_FREE((*bignum)->ipp_bn); - } - SAFE_FREE(*bignum); - } -} - -EpidStatus ReadBigNum(void const* bn_str, size_t strlen, BigNum* bn) { - IppStatus sts; - size_t i; - bool is_zero = true; - Ipp8u const* byte_str = (Ipp8u const*)bn_str; - int ipp_strlen = (int)strlen; - - if (!bn || !bn_str) return kEpidBadArgErr; - - if (!bn->ipp_bn) return kEpidBadArgErr; - - if (INT_MAX < strlen || strlen <= 0) return kEpidBadArgErr; - - /* - Some versions of ippsSetOctString_BN have bug: - When called for octet string with all bits set to zero the resulted BigNumber - state initialize incorrectly which leads to unpredictable behaviour - if used. - - Workaround: - Test the input string before ippsSetOctStringSet_BN() call. - If length of the string is zero or it does not contain any significant - bits, then set BN to zero. Keep in mind that ippsBigNumInit() set BN - value to zero. - */ - for (i = 0; i < strlen; ++i) - if (0 != byte_str[i]) { - is_zero = false; - break; - } - if (is_zero) { - Ipp32u zero32 = 0; - sts = ippsSet_BN(IppsBigNumPOS, 1, &zero32, bn->ipp_bn); - } else { - sts = ippsSetOctString_BN(bn_str, ipp_strlen, bn->ipp_bn); - } - if (sts != ippStsNoErr) { - if (ippStsContextMatchErr == sts || ippStsSizeErr == sts || - ippStsLengthErr == sts || ippStsOutOfRangeErr == sts) - return kEpidBadArgErr; - else - return kEpidMathErr; - } - - return kEpidNoErr; -} - -/// Initializes a BigNum from a BNU. -/*! - \param[in] bnu - The desired value as a bnu. - \param[in] bnu_len - The size of bnu_str in 32 bit words. - \param[out] bn - The target BigNum. - - \returns ::EpidStatus - - \note A BNU is a big integer represented as array of 4 byte words written in - little endian order - - \note This is re-documented here because doxygen does not pull in the - internal headers -*/ -EpidStatus InitBigNumFromBnu(uint32_t const* bnu, size_t bnu_len, - struct BigNum* bn) { - IppStatus sts; - if (!bn || !bnu) return kEpidBadArgErr; - - if (!bn->ipp_bn) return kEpidBadArgErr; - - if (INT_MAX < bnu_len || bnu_len <= 0) return kEpidBadArgErr; - - sts = ippsSet_BN(IppsBigNumPOS, (int)bnu_len, bnu, bn->ipp_bn); - if (sts != ippStsNoErr) { - if (ippStsContextMatchErr == sts || ippStsSizeErr == sts || - ippStsLengthErr == sts || ippStsOutOfRangeErr == sts) - return kEpidBadArgErr; - else - return kEpidMathErr; - } - - return kEpidNoErr; -} - -EpidStatus WriteBigNum(BigNum const* bn, size_t strlen, void* bn_str) { - IppStatus sts; - int ipp_strlen = (int)strlen; - if (!bn || !bn_str) return kEpidBadArgErr; - - if (!bn->ipp_bn) return kEpidBadArgErr; - - sts = ippsGetOctString_BN((Ipp8u*)bn_str, ipp_strlen, bn->ipp_bn); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsLengthErr == sts) - return kEpidBadArgErr; - else - return kEpidMathErr; - } - - return kEpidNoErr; -} - -/// convert octet string into "big number unsigned" representation -int OctStr2Bnu(uint32_t* bnu_ptr, void const* octstr_ptr, int octstr_len) { - int bnusize = 0; - uint8_t const* byte_str = (uint8_t const*)octstr_ptr; - if (!bnu_ptr || !octstr_ptr) { - return -1; - } - if (octstr_len < 4 || octstr_len % 4 != 0) return -1; - - *bnu_ptr = 0; - /* start from the end of string */ - for (; octstr_len >= 4; bnusize++, octstr_len -= 4) { - /* pack 4 bytes into single Ipp32u value*/ - *bnu_ptr++ = (byte_str[octstr_len - 4] << (8 * 3)) + - (byte_str[octstr_len - 3] << (8 * 2)) + - (byte_str[octstr_len - 2] << (8 * 1)) + - byte_str[octstr_len - 1]; - } - return bnusize ? bnusize : -1; -} - -/// Get octet string size in bits -size_t OctStrBitSize(uint8_t const* octstr_ptr, size_t octstr_len) { - uint8_t byte; - size_t bitsize = 0; - - // find highest non zero byte - size_t i = 0; - while (i < octstr_len && !octstr_ptr[i]) i++; - if (i == octstr_len) return 0; - byte = octstr_ptr[i]; - - // refine bit size - if (0 == byte) return 0; - bitsize = (octstr_len - i) << 3; - if (0 == (byte & 0xF0)) { - bitsize -= 4; - byte <<= 4; - } - if (0 == (byte & 0xC0)) { - bitsize -= 2; - byte <<= 2; - } - if (0 == (byte & 0x80)) { - bitsize--; - } - - return bitsize; -} - -EpidStatus BigNumAdd(BigNum const* a, BigNum const* b, BigNum* r) { - IppStatus sts; - - if (!r || !a || !b) return kEpidBadArgErr; - - if (!r->ipp_bn || !a->ipp_bn || !b->ipp_bn) return kEpidBadArgErr; - - sts = ippsAdd_BN(a->ipp_bn, b->ipp_bn, r->ipp_bn); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsLengthErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - - return kEpidNoErr; -} - -EpidStatus BigNumSub(BigNum const* a, BigNum const* b, BigNum* r) { - IppStatus sts; - Ipp32u sign = IS_ZERO; - if (!r || !a || !b) return kEpidBadArgErr; - - if (!r->ipp_bn || !a->ipp_bn || !b->ipp_bn) return kEpidBadArgErr; - - sts = ippsSub_BN(a->ipp_bn, b->ipp_bn, r->ipp_bn); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsLengthErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - sts = ippsCmpZero_BN(r->ipp_bn, &sign); - if (ippStsNoErr != sts) { - return kEpidMathErr; - } - if (sign == LESS_THAN_ZERO) { - return kEpidUnderflowErr; - } - return kEpidNoErr; -} - -EpidStatus BigNumMul(BigNum const* a, BigNum const* b, BigNum* r) { - IppStatus sts; - - if (!r || !a || !b) return kEpidBadArgErr; - - if (!r->ipp_bn || !a->ipp_bn || !b->ipp_bn) return kEpidBadArgErr; - - sts = ippsMul_BN(a->ipp_bn, b->ipp_bn, r->ipp_bn); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsLengthErr == sts || ippStsOutOfRangeErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - - return kEpidNoErr; -} - -EpidStatus BigNumDiv(BigNum const* a, BigNum const* b, BigNum* q, BigNum* r) { - IppStatus sts; - - if (!a || !b || !q || !r) return kEpidBadArgErr; - - if (!a->ipp_bn || !b->ipp_bn || !q->ipp_bn || !r->ipp_bn) - return kEpidBadArgErr; - - sts = ippsDiv_BN(a->ipp_bn, b->ipp_bn, q->ipp_bn, r->ipp_bn); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsLengthErr == sts || ippStsOutOfRangeErr == sts || - ippStsDivByZeroErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - - return kEpidNoErr; -} - -EpidStatus BigNumMod(BigNum const* a, BigNum const* b, BigNum* r) { - IppStatus sts; - - if (!r || !a || !b) return kEpidBadArgErr; - - if (!r->ipp_bn || !a->ipp_bn || !b->ipp_bn) return kEpidBadArgErr; - - sts = ippsMod_BN(a->ipp_bn, b->ipp_bn, r->ipp_bn); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsLengthErr == sts || ippStsOutOfRangeErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - - return kEpidNoErr; -} - -EpidStatus BigNumIsEven(BigNum const* a, bool* is_even) { - IppStatus sts = ippStsNoErr; - IppsBigNumSGN sgn; - int bit_size; - Ipp32u* data; - // Check required parameters - if (!a || !is_even) { - return kEpidBadArgErr; - } - if (!a->ipp_bn) { - return kEpidBadArgErr; - } - sts = ippsRef_BN(&sgn, &bit_size, &data, a->ipp_bn); - if (ippStsNoErr != sts) { - return kEpidMathErr; - } - *is_even = !(data[0] & 1); - return kEpidNoErr; -} - -EpidStatus BigNumIsZero(BigNum const* a, bool* is_zero) { - IppStatus sts = ippStsNoErr; - Ipp32u sign = 0; - // Check required parameters - if (!a || !is_zero) { - return kEpidBadArgErr; - } - if (!a->ipp_bn) { - return kEpidBadArgErr; - } - sts = ippsCmpZero_BN(a->ipp_bn, &sign); - if (ippStsNoErr != sts) { - return kEpidMathErr; - } - *is_zero = (IS_ZERO == sign); - return kEpidNoErr; -} - -EpidStatus BigNumPow2N(unsigned int n, BigNum* r) { - EpidStatus result = kEpidErr; - Ipp8u two_str = 2; - Ipp8u one_str = 1; - BigNum* two = NULL; - do { - if (n == 0) { - result = ReadBigNum(&one_str, sizeof(one_str), r); - if (kEpidNoErr != result) { - break; - } - } else { - result = NewBigNum(sizeof(BigNumStr), &two); - if (kEpidNoErr != result) { - break; - } - result = ReadBigNum(&two_str, sizeof(two_str), two); - if (kEpidNoErr != result) { - break; - } - result = ReadBigNum(&two_str, sizeof(two_str), r); - if (kEpidNoErr != result) { - break; - } - - while (n > 1) { - result = BigNumMul(r, two, r); - if (kEpidNoErr != result) { - break; - } - n -= 1; - } - if (kEpidNoErr != result) { - break; - } - } - result = kEpidNoErr; - } while (0); - DeleteBigNum(&two); - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecdsa_sign.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecdsa_sign.c deleted file mode 100644 index fffaab07be..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecdsa_sign.c +++ /dev/null @@ -1,205 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcdsaSignBuffer implementation. - */ - -#include "epid/common/math/ecdsa.h" -#include "epid/common/math/bignum.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/src/memory.h" -#include "ext/ipp/include/ippcp.h" - -/// The number of attempts to generate ephemeral key pair -#define EPHKEYGEN_WATCHDOG (10) - -EpidStatus EcdsaSignBuffer(void const* buf, size_t buf_len, - EcdsaPrivateKey const* privkey, BitSupplier rnd_func, - void* rnd_param, EcdsaSignature* sig) { - EpidStatus result = kEpidMathErr; - - IppsECCPState* ec_ctx = NULL; - BigNum* bn_ec_order = NULL; - - BigNum* bn_hash = NULL; - - BigNum* bn_reg_private = NULL; - BigNum* bn_eph_private = NULL; - IppsECCPPointState* ecp_eph_public = NULL; - - BigNum* bn_sig_x = NULL; - BigNum* bn_sig_y = NULL; - - do { - EpidStatus epid_status = kEpidNoErr; - IppStatus sts = ippStsNoErr; - int ctxsize = 0; - // order of EC secp256r1 - const uint8_t secp256r1_r[32] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE6, 0xFA, 0xAD, 0xA7, 0x17, - 0x9E, 0x84, 0xF3, 0xB9, 0xCA, 0xC2, 0xFC, 0x63, 0x25, 0x51}; - Ipp8u hash[IPP_SHA256_DIGEST_BITSIZE / 8] = {0}; - unsigned int gen_loop_count = EPHKEYGEN_WATCHDOG; - Ipp32u cmp0 = IS_ZERO; - Ipp32u cmp_order = IS_ZERO; - - if ((0 != buf_len && !buf) || !privkey || !rnd_func || !sig) { - result = kEpidBadArgErr; - break; - } - if (buf_len > INT_MAX) { - result = kEpidBadArgErr; - break; - } - - // Define standard elliptic curve secp256r1 - sts = ippsECCPGetSizeStd256r1(&ctxsize); - if (ippStsNoErr != sts) break; - ec_ctx = (IppsECCPState*)SAFE_ALLOC(ctxsize); - if (!ec_ctx) { - result = kEpidMemAllocErr; - break; - } - sts = ippsECCPInitStd256r1(ec_ctx); - if (ippStsNoErr != sts) break; - sts = ippsECCPSetStd256r1(ec_ctx); - if (ippStsNoErr != sts) break; - - // Create big number for order of elliptic curve secp256r1 - epid_status = NewBigNum(sizeof(secp256r1_r), &bn_ec_order); - if (kEpidMemAllocErr == epid_status) { - result = kEpidMemAllocErr; - break; - } - if (kEpidNoErr != epid_status) break; - epid_status = ReadBigNum(secp256r1_r, sizeof(secp256r1_r), bn_ec_order); - if (kEpidNoErr != epid_status) break; - - // Calculate hash for input message - sts = ippsSHA256MessageDigest(buf, (int)buf_len, hash); - if (ippStsNoErr != sts) break; - - // Create big number for hash - epid_status = NewBigNum(sizeof(hash), &bn_hash); - if (kEpidMemAllocErr == epid_status) { - result = kEpidMemAllocErr; - break; - } - if (kEpidNoErr != epid_status) break; - epid_status = ReadBigNum(hash, sizeof(hash), bn_hash); - if (kEpidNoErr != epid_status) break; - sts = ippsMod_BN(bn_hash->ipp_bn, bn_ec_order->ipp_bn, bn_hash->ipp_bn); - if (ippStsNoErr != sts) break; - - // Create big number for regular private key - epid_status = NewBigNum(sizeof(*privkey), &bn_reg_private); - if (kEpidMemAllocErr == epid_status) { - result = kEpidMemAllocErr; - break; - } - if (kEpidNoErr != epid_status) break; - epid_status = ReadBigNum(privkey, sizeof(*privkey), bn_reg_private); - if (kEpidNoErr != epid_status) break; - - // Validate private key is in range [1, bn_ec_order-1] - sts = ippsCmpZero_BN(bn_reg_private->ipp_bn, &cmp0); - if (ippStsNoErr != sts) break; - sts = ippsCmp_BN(bn_reg_private->ipp_bn, bn_ec_order->ipp_bn, &cmp_order); - if (ippStsNoErr != sts) break; - if (IS_ZERO == cmp0 || LESS_THAN_ZERO != cmp_order) { - result = kEpidBadArgErr; - break; - } - - // Create big number for ephemeral private key - epid_status = NewBigNum(sizeof(secp256r1_r), &bn_eph_private); - if (kEpidMemAllocErr == epid_status) { - result = kEpidMemAllocErr; - break; - } - if (kEpidNoErr != epid_status) break; - - // Create EC point for ephemeral public key - sts = ippsECCPPointGetSize(256, &ctxsize); - if (ippStsNoErr != sts) break; - ecp_eph_public = (IppsECCPPointState*)SAFE_ALLOC(ctxsize); - if (!ecp_eph_public) { - result = kEpidMemAllocErr; - break; - } - sts = ippsECCPPointInit(256, ecp_eph_public); - if (ippStsNoErr != sts) break; - - // Create big numbers for signature - epid_status = NewBigNum(sizeof(secp256r1_r), &bn_sig_x); - if (kEpidMemAllocErr == epid_status) { - result = kEpidMemAllocErr; - break; - } - if (kEpidNoErr != epid_status) break; - epid_status = NewBigNum(sizeof(secp256r1_r), &bn_sig_y); - if (kEpidMemAllocErr == epid_status) { - result = kEpidMemAllocErr; - break; - } - if (kEpidNoErr != epid_status) break; - - do { - // Generate ephemeral key pair - sts = ippsECCPGenKeyPair(bn_eph_private->ipp_bn, ecp_eph_public, ec_ctx, - (IppBitSupplier)rnd_func, rnd_param); - if (ippStsNoErr != sts) break; - - // Set ephemeral key pair - sts = ippsECCPSetKeyPair(bn_eph_private->ipp_bn, ecp_eph_public, ippFalse, - ec_ctx); - if (ippStsNoErr != sts) break; - - // Compute signature - sts = ippsECCPSignDSA(bn_hash->ipp_bn, bn_reg_private->ipp_bn, - bn_sig_x->ipp_bn, bn_sig_y->ipp_bn, ec_ctx); - if (ippStsEphemeralKeyErr != sts) break; - } while (--gen_loop_count); - if (ippStsEphemeralKeyErr == sts) { - result = kEpidRandMaxIterErr; - break; - } - if (ippStsNoErr != sts) break; - - sts = ippsGetOctString_BN(sig->x.data, sizeof(sig->x), bn_sig_x->ipp_bn); - if (ippStsNoErr != sts) break; - sts = ippsGetOctString_BN(sig->y.data, sizeof(sig->y), bn_sig_y->ipp_bn); - if (ippStsNoErr != sts) break; - - result = kEpidNoErr; - } while (0); - - DeleteBigNum(&bn_ec_order); - DeleteBigNum(&bn_hash); - DeleteBigNum(&bn_reg_private); - DeleteBigNum(&bn_eph_private); - DeleteBigNum(&bn_sig_x); - DeleteBigNum(&bn_sig_y); - - SAFE_FREE(ec_ctx); - SAFE_FREE(ecp_eph_public); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecdsa_verify.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecdsa_verify.c deleted file mode 100644 index cf3c7c4730..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecdsa_verify.c +++ /dev/null @@ -1,351 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcdsaVerifyBuffer implementation. - */ - -#include "epid/common/math/ecdsa.h" - -#include "epid/common/math/bignum.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/src/memory.h" -#include "ext/ipp/include/ippcp.h" - -/// Handle Ipp Errors with Break -#define BREAK_ON_IPP_ERROR(sts, ret) \ - { \ - IppStatus temp_sts = (sts); \ - if (ippStsNoErr != temp_sts) { \ - (ret) = kEpidMathErr; \ - break; \ - } \ - } - -static EpidStatus NewSecp256r1Curve(IppsECCPState** ec); - -static void DeleteSecp256r1Curve(IppsECCPState** ec); - -static EpidStatus NewCurvePoint(IppsECCPState const* ec, - IppsECCPPointState** p); - -static EpidStatus ReadCurvePoint(IppsECCPState* ec, - EcdsaPublicKey const* pubkey, - IppsECCPPointState* p); - -static EpidStatus CalcHashBn(void const* buf, size_t buf_len, - BigNum* bn_digest); - -static void DeleteCurvePoint(IppsECCPPointState** p); - -static EpidStatus ValidateSignature(BigNum const* bn_sig_x, - BigNum const* bn_sig_y); - -EpidStatus EcdsaVerifyBuffer(void const* buf, size_t buf_len, - EcdsaPublicKey const* pubkey, - EcdsaSignature const* sig) { - EpidStatus result = kEpidErr; - IppsECCPState* ec_state = NULL; - IppsECCPPointState* ecp_pubkey = NULL; - BigNum* bn_sig_x = NULL; - BigNum* bn_sig_y = NULL; - BigNum* bn_digest = NULL; - - if (!pubkey || !sig || (!buf && (0 != buf_len))) return kEpidBadArgErr; - if (INT_MAX < buf_len) return kEpidBadArgErr; - - do { - EpidStatus epid_status = kEpidNoErr; - IppStatus ipp_status = ippStsNoErr; - IppECResult ec_result = ippECValid; - - epid_status = NewBigNum(sizeof(sig->x), &bn_sig_x); - if (kEpidNoErr != epid_status) break; - - epid_status = ReadBigNum(&sig->x, sizeof(sig->x), bn_sig_x); - if (kEpidNoErr != epid_status) break; - - epid_status = NewBigNum(sizeof(sig->y), &bn_sig_y); - if (kEpidNoErr != epid_status) break; - - epid_status = ReadBigNum(&sig->y, sizeof(sig->y), bn_sig_y); - if (kEpidNoErr != epid_status) break; - - // check for invalid signature - epid_status = ValidateSignature(bn_sig_x, bn_sig_y); - if (kEpidSigValid != epid_status) { - if (kEpidSigInvalid == epid_status) { - result = kEpidBadArgErr; - } else { - result = epid_status; - } - break; - } - - // setup curve - epid_status = NewSecp256r1Curve(&ec_state); - if (kEpidNoErr != epid_status) break; - - // load pubkey - epid_status = NewCurvePoint(ec_state, &ecp_pubkey); - if (kEpidNoErr != epid_status) break; - epid_status = ReadCurvePoint(ec_state, pubkey, ecp_pubkey); - if (kEpidNoErr != epid_status) break; - - // check for invalid pubkey - ipp_status = ippsECCPCheckPoint(ecp_pubkey, &ec_result, ec_state); - BREAK_ON_IPP_ERROR(ipp_status, result); - if (ippECValid != ec_result) { - result = kEpidBadArgErr; - break; - } - - // hash message - epid_status = NewBigNum(IPP_SHA256_DIGEST_BITSIZE / 8, &bn_digest); - if (kEpidNoErr != epid_status) break; - epid_status = CalcHashBn(buf, buf_len, bn_digest); - if (kEpidNoErr != epid_status) break; - - // configure key - ipp_status = ippsECCPSetKeyPair(NULL, ecp_pubkey, ippTrue, ec_state); - BREAK_ON_IPP_ERROR(ipp_status, result); - - // verify message - ipp_status = ippsECCPVerifyDSA(bn_digest->ipp_bn, bn_sig_x->ipp_bn, - bn_sig_y->ipp_bn, &ec_result, ec_state); - BREAK_ON_IPP_ERROR(ipp_status, result); - - if (ippECValid == ec_result) - result = kEpidSigValid; - else - result = kEpidSigInvalid; - } while (0); - - DeleteSecp256r1Curve(&ec_state); - DeleteCurvePoint(&ecp_pubkey); - DeleteBigNum(&bn_digest); - DeleteBigNum(&bn_sig_x); - DeleteBigNum(&bn_sig_y); - - return result; -} - -static EpidStatus NewSecp256r1Curve(IppsECCPState** ec) { - EpidStatus result = kEpidNoErr; - IppsECCPState* ec_state = NULL; - - if (!ec) return kEpidBadArgErr; - - do { - int size = 0; - IppStatus ipp_status = ippStsNoErr; - ipp_status = ippsECCPGetSizeStd256r1(&size); - BREAK_ON_IPP_ERROR(ipp_status, result); - - ec_state = (IppsECCPState*)SAFE_ALLOC(size); - if (!ec_state) { - result = kEpidMemAllocErr; - break; - } - - ipp_status = ippsECCPInitStd256r1(ec_state); - BREAK_ON_IPP_ERROR(ipp_status, result); - - ipp_status = ippsECCPSetStd256r1(ec_state); - BREAK_ON_IPP_ERROR(ipp_status, result); - - *ec = ec_state; - } while (0); - if (kEpidNoErr != result) { - SAFE_FREE(ec_state); - } - return result; -} - -static void DeleteSecp256r1Curve(IppsECCPState** ec) { - if (!ec || !(*ec)) { - return; - } - SAFE_FREE(*ec); - *ec = NULL; -} - -static EpidStatus NewCurvePoint(IppsECCPState const* ec, - IppsECCPPointState** p) { - EpidStatus result = kEpidNoErr; - IppsECCPPointState* point = NULL; - - if (!ec || !p) return kEpidBadArgErr; - - do { - const int kFeBitSize = 256; - IppStatus ipp_status = ippStsNoErr; - int size = 0; - - ipp_status = ippsECCPPointGetSize(kFeBitSize, &size); - BREAK_ON_IPP_ERROR(ipp_status, result); - - point = (IppsECCPPointState*)SAFE_ALLOC(size); - if (!point) { - result = kEpidMemAllocErr; - break; - } - - ipp_status = ippsECCPPointInit(kFeBitSize, point); - BREAK_ON_IPP_ERROR(ipp_status, result); - - *p = point; - } while (0); - if (kEpidNoErr != result) { - SAFE_FREE(point); - } - return result; -} -static void DeleteCurvePoint(IppsECCPPointState** p) { - if (!p || !(*p)) { - return; - } - SAFE_FREE(*p); - *p = NULL; -} - -static EpidStatus ReadCurvePoint(IppsECCPState* ec, - EcdsaPublicKey const* pubkey, - IppsECCPPointState* p) { - EpidStatus result = kEpidNoErr; - BigNum* bn_pubkey_x = NULL; - BigNum* bn_pubkey_y = NULL; - - if (!ec || !pubkey || !p) return kEpidBadArgErr; - - do { - IppStatus ipp_status = ippStsNoErr; - - result = NewBigNum(sizeof(pubkey->x), &bn_pubkey_x); - if (kEpidNoErr != result) break; - - result = ReadBigNum(&pubkey->x, sizeof(pubkey->x), bn_pubkey_x); - if (kEpidNoErr != result) break; - - result = NewBigNum(sizeof(pubkey->y), &bn_pubkey_y); - if (kEpidNoErr != result) break; - - result = ReadBigNum(&pubkey->y, sizeof(pubkey->y), bn_pubkey_y); - if (kEpidNoErr != result) break; - - ipp_status = - ippsECCPSetPoint(bn_pubkey_x->ipp_bn, bn_pubkey_y->ipp_bn, p, ec); - BREAK_ON_IPP_ERROR(ipp_status, result); - } while (0); - - DeleteBigNum(&bn_pubkey_x); - DeleteBigNum(&bn_pubkey_y); - - return result; -} - -static EpidStatus CalcHashBn(void const* buf, size_t buf_len, - BigNum* bn_digest) { - EpidStatus result = kEpidErr; - BigNum* bn_ec_order = NULL; - - if (!bn_digest || (!buf && (0 != buf_len))) return kEpidBadArgErr; - - do { - IppStatus ipp_status = ippStsNoErr; - Ipp8u digest[IPP_SHA256_DIGEST_BITSIZE / 8] = {0}; - - const uint8_t secp256r1_r[] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE6, 0xFA, 0xAD, 0xA7, 0x17, - 0x9E, 0x84, 0xF3, 0xB9, 0xCA, 0xC2, 0xFC, 0x63, 0x25, 0x51}; - - ipp_status = ippsSHA256MessageDigest(buf, (int)buf_len, digest); - BREAK_ON_IPP_ERROR(ipp_status, result); - - // convert hash to BigNum for use by ipp - result = ReadBigNum(digest, sizeof(digest), bn_digest); - if (kEpidNoErr != result) break; - - result = NewBigNum(sizeof(secp256r1_r), &bn_ec_order); - if (kEpidNoErr != result) break; - - result = ReadBigNum(secp256r1_r, sizeof(secp256r1_r), bn_ec_order); - if (kEpidNoErr != result) break; - - ipp_status = - ippsMod_BN(bn_digest->ipp_bn, bn_ec_order->ipp_bn, bn_digest->ipp_bn); - BREAK_ON_IPP_ERROR(ipp_status, result); - - result = kEpidNoErr; - } while (0); - - DeleteBigNum(&bn_ec_order); - - return result; -} - -static EpidStatus ValidateSignature(BigNum const* bn_sig_x, - BigNum const* bn_sig_y) { - EpidStatus result = kEpidSigInvalid; - - BigNum* bn_ec_order = NULL; - - if (!bn_sig_x || !bn_sig_y) return kEpidBadArgErr; - - do { - IppStatus ipp_status = ippStsNoErr; - Ipp32u sig_x_cmp0 = IS_ZERO; - Ipp32u sig_y_cmp0 = IS_ZERO; - Ipp32u sig_x_cmp_order = IS_ZERO; - Ipp32u sig_y_cmp_order = IS_ZERO; - const uint8_t secp256r1_r[] = { - 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBC, 0xE6, 0xFA, 0xAD, 0xA7, 0x17, - 0x9E, 0x84, 0xF3, 0xB9, 0xCA, 0xC2, 0xFC, 0x63, 0x25, 0x51}; - - result = NewBigNum(sizeof(secp256r1_r), &bn_ec_order); - if (kEpidNoErr != result) break; - - result = ReadBigNum(secp256r1_r, sizeof(secp256r1_r), bn_ec_order); - if (kEpidNoErr != result) break; - - ipp_status = ippsCmpZero_BN(bn_sig_x->ipp_bn, &sig_x_cmp0); - BREAK_ON_IPP_ERROR(ipp_status, result); - ipp_status = ippsCmpZero_BN(bn_sig_y->ipp_bn, &sig_y_cmp0); - BREAK_ON_IPP_ERROR(ipp_status, result); - ipp_status = - ippsCmp_BN(bn_sig_x->ipp_bn, bn_ec_order->ipp_bn, &sig_x_cmp_order); - BREAK_ON_IPP_ERROR(ipp_status, result); - ipp_status = - ippsCmp_BN(bn_sig_y->ipp_bn, bn_ec_order->ipp_bn, &sig_y_cmp_order); - BREAK_ON_IPP_ERROR(ipp_status, result); - - if (IS_ZERO == sig_x_cmp0 || IS_ZERO == sig_y_cmp0 || - LESS_THAN_ZERO != sig_x_cmp_order || - LESS_THAN_ZERO != sig_y_cmp_order) { - result = kEpidSigInvalid; - break; - } else { - result = kEpidSigValid; - } - } while (0); - - DeleteBigNum(&bn_ec_order); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecgroup-internal.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecgroup-internal.h deleted file mode 100644 index 3e998671fc..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecgroup-internal.h +++ /dev/null @@ -1,44 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Elliptic curve group private interface. - */ - -#ifndef EPID_COMMON_MATH_SRC_ECGROUP_INTERNAL_H_ -#define EPID_COMMON_MATH_SRC_ECGROUP_INTERNAL_H_ - -#include "ext/ipp/include/ippcpepid.h" - -/// Elpitic Curve Group -struct EcGroup { - /// Internal implementation of elliptic curve group - IppsGFpECState* ipp_ec; - /// Scratch buffer for operations over elliptic curve group - Ipp8u* scratch_buffer; - /// Information about finite field of elliptic curve group created - IppsGFpInfo info; -}; - -/// Elpitic Curve Point -struct EcPoint { - /// Internal implementation of elliptic curve point - IppsGFpECPoint* ipp_ec_pt; - /// Information about finite field element of elliptic curve group created - IppsGFpInfo info; -}; -#endif // EPID_COMMON_MATH_SRC_ECGROUP_INTERNAL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecgroup.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecgroup.c deleted file mode 100644 index 2629bd62d0..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/ecgroup.c +++ /dev/null @@ -1,1274 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Elliptic curve group implementation. - */ - -#include -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/math/src/ecgroup-internal.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/src/finitefield-internal.h" -#include "epid/common/math/hash.h" -#include "epid/common/src/memory.h" -#include "epid/common/src/endian_convert.h" -#include "ext/ipp/include/ippcp.h" -#include "ext/ipp/include/ippcpepid.h" -#include "epid/common/1.1/types.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } /// Handle Ipp Errors with Break -#define BREAK_ON_IPP_ERROR(sts, ret) \ - { \ - IppStatus temp_sts = (sts); \ - if (ippStsNoErr != temp_sts) { \ - if (ippStsContextMatchErr == temp_sts) { \ - (ret) = kEpidMathErr; \ - } else { \ - (ret) = kEpidBadArgErr; \ - } \ - break; \ - } \ - } - -EpidStatus NewEcGroup(FiniteField const* ff, FfElement const* a, - FfElement const* b, FfElement const* x, - FfElement const* y, BigNum const* order, - BigNum const* cofactor, EcGroup** g) { - EpidStatus result = kEpidNoErr; - IppsGFpECState* state = NULL; - Ipp8u* scratch_buffer = NULL; - EcGroup* grp = NULL; - do { - IppStatus ipp_status; - int stateSize = 0; - int scratch_size = 0; - Ipp32u* order_bnu; - Ipp32u* cofactor_bnu; - int order_bnu_size; - int cofactor_bnu_size; - IppsBigNumSGN sgn; - // validate input pointers - if (!ff || !a || !b || !x || !y || !order || !cofactor || !g) { - result = kEpidBadArgErr; - break; - } - if (ff->info.elementLen != a->info.elementLen || - ff->info.elementLen != b->info.elementLen || - ff->info.elementLen != x->info.elementLen || - ff->info.elementLen != y->info.elementLen || - a->info.elementLen != b->info.elementLen || - a->info.elementLen != x->info.elementLen || - a->info.elementLen != y->info.elementLen || - b->info.elementLen != x->info.elementLen || - b->info.elementLen != y->info.elementLen || - x->info.elementLen != y->info.elementLen) { - result = kEpidBadArgErr; - break; - } - - // construct the ECPrimeField - ipp_status = ippsGFpECGetSize(ff->ipp_ff, &stateSize); - if (ippStsNoErr != ipp_status) { - if (ippStsSizeErr == ipp_status) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - - grp = (EcGroup*)SAFE_ALLOC(sizeof(EcGroup)); - if (!grp) { - result = kEpidMemAllocErr; - break; - } - - state = (IppsGFpECState*)SAFE_ALLOC(stateSize); - if (!state) { - result = kEpidMemAllocErr; - break; - } - - ipp_status = ippsRef_BN(&sgn, &order_bnu_size, &order_bnu, order->ipp_bn); - order_bnu_size /= sizeof(CHAR_BIT) * 4; - if (ippStsNoErr != ipp_status) { - result = kEpidMathErr; - break; - } - - ipp_status = - ippsRef_BN(&sgn, &cofactor_bnu_size, &cofactor_bnu, cofactor->ipp_bn); - cofactor_bnu_size /= sizeof(CHAR_BIT) * 4; - if (ippStsNoErr != ipp_status) { - result = kEpidMathErr; - break; - } - - ipp_status = - ippsGFpECInit(a->ipp_ff_elem, b->ipp_ff_elem, x->ipp_ff_elem, - y->ipp_ff_elem, order_bnu, order_bnu_size, cofactor_bnu, - cofactor_bnu_size, ff->ipp_ff, state); - if (ippStsNoErr != ipp_status) { - result = kEpidMathErr; - break; - } - - // allocate scratch buffer - ipp_status = ippsGFpECScratchBufferSize(1, state, &scratch_size); - // check return codes - if (ippStsNoErr != ipp_status) { - if (ippStsContextMatchErr == ipp_status) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - // allocate scratch buffer - scratch_buffer = (Ipp8u*)SAFE_ALLOC(scratch_size); - if (!scratch_buffer) { - result = kEpidMemAllocErr; - break; - } - - grp->info = ff->info; - grp->ipp_ec = state; - grp->scratch_buffer = scratch_buffer; - *g = grp; - } while (0); - - if (kEpidNoErr != result) { - // we had a problem during init, free any allocated memory - SAFE_FREE(state); - SAFE_FREE(scratch_buffer); - SAFE_FREE(grp); - } - return result; -} - -void DeleteEcGroup(EcGroup** g) { - if (!g || !(*g)) { - return; - } - if ((*g)->ipp_ec) { - SAFE_FREE((*g)->ipp_ec); - (*g)->ipp_ec = NULL; - } - if ((*g)->scratch_buffer) { - SAFE_FREE((*g)->scratch_buffer); - (*g)->scratch_buffer = NULL; - } - SAFE_FREE(*g); - *g = NULL; -} - -EpidStatus NewEcPoint(EcGroup const* g, EcPoint** p) { - EpidStatus result = kEpidErr; - IppsGFpECPoint* ec_pt_context = NULL; - EcPoint* ecpoint = NULL; - do { - IppStatus sts = ippStsNoErr; - int sizeInBytes = 0; - // validate inputs - if (!g || !p) { - result = kEpidBadArgErr; - break; - } else if (!g->ipp_ec) { - result = kEpidBadArgErr; - break; - } - // get size - sts = ippsGFpECPointGetSize(g->ipp_ec, &sizeInBytes); - if (ippStsContextMatchErr == sts) { - result = kEpidBadArgErr; - break; - } else if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - // allocate memory - ec_pt_context = (IppsGFpECPoint*)SAFE_ALLOC(sizeInBytes); - if (!ec_pt_context) { - result = kEpidMemAllocErr; - break; - } - // Initialize - sts = ippsGFpECPointInit(NULL, NULL, ec_pt_context, g->ipp_ec); - if (ippStsContextMatchErr == sts) { - result = kEpidBadArgErr; - break; - } else if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - ecpoint = SAFE_ALLOC(sizeof(EcPoint)); - if (!ecpoint) { - result = kEpidMemAllocErr; - break; - } - ecpoint->info = g->info; - ecpoint->ipp_ec_pt = ec_pt_context; - *p = ecpoint; - result = kEpidNoErr; - } while (0); - if (kEpidNoErr != result) { - SAFE_FREE(ec_pt_context); - SAFE_FREE(ecpoint); - } - return result; -} - -void DeleteEcPoint(EcPoint** p) { - if (p) { - if (*p) { - SAFE_FREE((*p)->ipp_ec_pt); - } - SAFE_FREE(*p); - } -} - -/// Check and initialize element if it is in elliptic curve group. -/*! - This is internal function. - Takes a value p as input. If p is indeed an element of g, it - outputs true, otherwise, it outputs false. - - This is only used to check if input buffer are actually valid - elements in group. If p is in g, this fills p and initializes it to - internal FfElement format. - - \param[in] g - The eliptic curve group in which to perform the check - \param[in] p_str - Serialized eliptic curve group element to check - \param[in] strlen - The size of p_str in bytes. - \param[out] p - Deserialized value of p_str - \param[out] in_group - Result of the check - - \returns ::EpidStatus - - \see NewEcPoint -*/ -EpidStatus eccontains(EcGroup* g, void const* p_str, size_t strlen, EcPoint* p, - bool* in_group) { - EpidStatus result = kEpidErr; - IppStatus sts = ippStsNoErr; - FiniteField fp; - FfElement* fp_x = NULL; - FfElement* fp_y = NULL; - Ipp8u const* byte_str = (Ipp8u const*)p_str; - IppECResult ec_result = ippECPointIsNotValid; - int ipp_half_strlen = (int)strlen / 2; - - if (!g || !p_str || !p || !in_group) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || !p->ipp_ec_pt) { - return kEpidBadArgErr; - } - - if (INT_MAX < strlen || strlen <= 0 || strlen & 0x1) { - return kEpidBadArgErr; - } - - do { - size_t i = 0; - // if the string is all zeros then we take it as point at infinity - for (i = 0; i < strlen; i++) { - if (0 != byte_str[i]) { - break; - } - } - if (i >= strlen) { - // p_str is point at infinity! Set it and we are done - sts = ippsGFpECSetPointAtInfinity(p->ipp_ec_pt, g->ipp_ec); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - *in_group = true; - result = kEpidNoErr; - break; - } - // get finite field - sts = ippsGFpECGet(g->ipp_ec, (const IppsGFpState**)&(fp.ipp_ff), 0, 0, 0, - 0, 0, 0, 0, 0); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - // create element X - result = NewFfElement(&fp, &fp_x); - if (kEpidNoErr != result) { - break; - } - - // create element Y - result = NewFfElement(&fp, &fp_y); - if (kEpidNoErr != result) { - break; - } - - // set element X data - sts = ippsGFpSetElementOctString(byte_str, ipp_half_strlen, - fp_x->ipp_ff_elem, fp.ipp_ff); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsOutOfRangeErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - // set element Y data - sts = - ippsGFpSetElementOctString(byte_str + ipp_half_strlen, ipp_half_strlen, - fp_y->ipp_ff_elem, fp.ipp_ff); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsOutOfRangeErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - // set point from elements - sts = ippsGFpECSetPoint(fp_x->ipp_ff_elem, fp_y->ipp_ff_elem, p->ipp_ec_pt, - g->ipp_ec); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - // verify the point is actually on the curve - sts = ippsGFpECTstPoint(p->ipp_ec_pt, &ec_result, g->ipp_ec, - g->scratch_buffer); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - *in_group = (ippECValid == ec_result); - result = kEpidNoErr; - } while (0); - - DeleteFfElement(&fp_x); - DeleteFfElement(&fp_y); - return result; -} - -EpidStatus ReadEcPoint(EcGroup* g, void const* p_str, size_t strlen, - EcPoint* p) { - EpidStatus result; - bool in_group = false; - - if (!g || !p_str || !p) { - return kEpidBadArgErr; - } - if (0 == strlen) { - return kEpidBadArgErr; - } - - result = eccontains(g, p_str, strlen, p, &in_group); - if (kEpidNoErr != result) { - return result; - } - if (in_group == false) { - IppStatus sts = ippsGFpECPointInit(NULL, NULL, p->ipp_ec_pt, g->ipp_ec); - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else if (ippStsNoErr != sts) { - return kEpidMathErr; - } - return kEpidBadArgErr; - } - return kEpidNoErr; -} - -EpidStatus WriteEcPoint(EcGroup* g, EcPoint const* p, void* p_str, - size_t strlen) { - EpidStatus result = kEpidErr; - FiniteField fp; - FfElement* fp_x = NULL; - FfElement* fp_y = NULL; - Ipp8u* byte_str = (Ipp8u*)p_str; - IppStatus sts = ippStsNoErr; - int ipp_half_strlen = (int)strlen / 2; - - if (!g || !p || !p_str) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || !p->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (INT_MAX < strlen) { - return kEpidBadArgErr; - } - - if (INT_MAX < strlen || strlen <= 0 || strlen & 0x1) { - return kEpidBadArgErr; - } - - do { - // get finite field - sts = ippsGFpECGet(g->ipp_ec, (const IppsGFpState**)&(fp.ipp_ff), 0, 0, 0, - 0, 0, 0, 0, 0); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - // create element X - result = NewFfElement(&fp, &fp_x); - if (kEpidNoErr != result) { - break; - } - - // create element Y - result = NewFfElement(&fp, &fp_y); - if (kEpidNoErr != result) { - break; - } - - // get elements from point - sts = ippsGFpECGetPoint(p->ipp_ec_pt, fp_x->ipp_ff_elem, fp_y->ipp_ff_elem, - g->ipp_ec); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsPointAtInfinity == sts) { - memset(p_str, 0, strlen); - result = kEpidNoErr; - } else if (ippStsContextMatchErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - - // get element X data - sts = ippsGFpGetElementOctString(fp_x->ipp_ff_elem, byte_str, - ipp_half_strlen, fp.ipp_ff); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - // get element Y data - sts = ippsGFpGetElementOctString(fp_y->ipp_ff_elem, - byte_str + ipp_half_strlen, - ipp_half_strlen, fp.ipp_ff); - // check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - result = kEpidNoErr; - } while (0); - - DeleteFfElement(&fp_x); - DeleteFfElement(&fp_y); - - return result; -} - -EpidStatus EcMul(EcGroup* g, EcPoint const* a, EcPoint const* b, EcPoint* r) { - IppStatus sts = ippStsNoErr; - if (!g || !a || !b || !r) { - return kEpidBadArgErr; - } else if (!g->ipp_ec || !a->ipp_ec_pt || !b->ipp_ec_pt || !r->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (g->info.elementLen != a->info.elementLen || - g->info.elementLen != b->info.elementLen || - g->info.elementLen != r->info.elementLen || - a->info.elementLen != b->info.elementLen || - a->info.elementLen != r->info.elementLen || - b->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - // Multiplies elliptic curve points - sts = ippsGFpECAddPoint(a->ipp_ec_pt, b->ipp_ec_pt, r->ipp_ec_pt, g->ipp_ec); - // Check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - return kEpidBadArgErr; - else - return kEpidMathErr; - } - return kEpidNoErr; -} - -EpidStatus EcExp(EcGroup* g, EcPoint const* a, BigNumStr const* b, EcPoint* r) { - EpidStatus result = kEpidErr; - BigNum* b_bn = NULL; - do { - IppStatus sts = ippStsNoErr; - - // Check required parameters - if (!g || !a || !b || !r) { - result = kEpidBadArgErr; - break; - } else if (!g->ipp_ec || !a->ipp_ec_pt || !r->ipp_ec_pt) { - result = kEpidBadArgErr; - break; - } - if (g->info.elementLen != a->info.elementLen || - g->info.elementLen != r->info.elementLen || - a->info.elementLen != r->info.elementLen) { - result = kEpidBadArgErr; - break; - } - - // Create and initialize big number element for ipp call - result = NewBigNum(sizeof(((BigNumStr*)0)->data.data), &b_bn); - if (kEpidNoErr != result) break; - result = ReadBigNum(b, sizeof(*b), b_bn); - if (kEpidNoErr != result) break; - - sts = ippsGFpECMulPoint(a->ipp_ec_pt, b_bn->ipp_bn, r->ipp_ec_pt, g->ipp_ec, - g->scratch_buffer); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsOutOfRangeErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - result = kEpidNoErr; - } while (0); - DeleteBigNum(&b_bn); - return result; -} - -EpidStatus EcSscmExp(EcGroup* g, EcPoint const* a, BigNumStr const* b, - EcPoint* r) { - // call EcExp directly because its implementation is side channel - // mitigated already - return EcExp(g, a, b, r); -} - -EpidStatus EcMultiExp(EcGroup* g, EcPoint const** a, BigNumStr const** b, - size_t m, EcPoint* r) { - EpidStatus result = kEpidErr; - BigNum* b_bn = NULL; - EcPoint* ecp_t = NULL; - int i = 0; - int ii = 0; - int ipp_m = 0; - - if (!g || !a || !b || !r) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || m <= 0) { - return kEpidBadArgErr; - } - // because we use ipp function with number of items parameter - // defined as "int" we need to verify that input length - // do not exceed INT_MAX to avoid overflow - if (m > INT_MAX) { - return kEpidBadArgErr; - } - ipp_m = (int)m; - // Verify that ec points are not NULL - for (i = 0; i < ipp_m; i++) { - if (!a[i]) { - return kEpidBadArgErr; - } - if (!a[i]->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (g->info.elementLen != a[i]->info.elementLen) { - return kEpidBadArgErr; - } - for (ii = i + 1; ii < ipp_m; ii++) { - if (a[i]->info.elementLen != a[ii]->info.elementLen) { - return kEpidBadArgErr; - } - } - } - if (g->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - do { - IppStatus sts = ippStsNoErr; - - // Create big number element for ipp call - result = NewBigNum(sizeof(((BigNumStr*)0)->data.data), &b_bn); - if (kEpidNoErr != result) break; - // Create temporal EcPoint element - result = NewEcPoint(g, &ecp_t); - if (kEpidNoErr != result) break; - - for (i = 0; i < ipp_m; i++) { - // Initialize big number element for ipp call - result = ReadBigNum(b[i], sizeof(BigNumStr), b_bn); - if (kEpidNoErr != result) break; - - sts = ippsGFpECMulPoint(a[i]->ipp_ec_pt, b_bn->ipp_bn, ecp_t->ipp_ec_pt, - g->ipp_ec, g->scratch_buffer); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsOutOfRangeErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - if (1 == m) { - sts = ippsGFpECCpyPoint(ecp_t->ipp_ec_pt, r->ipp_ec_pt, g->ipp_ec); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - } else { - sts = ippsGFpECAddPoint(ecp_t->ipp_ec_pt, r->ipp_ec_pt, r->ipp_ec_pt, - g->ipp_ec); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - } - } - if (kEpidNoErr != result) break; - - result = kEpidNoErr; - } while (0); - DeleteBigNum(&b_bn); - DeleteEcPoint(&ecp_t); - - return result; -} - -EpidStatus EcMultiExpBn(EcGroup* g, EcPoint const** a, BigNum const** b, - size_t m, EcPoint* r) { - EpidStatus result = kEpidErr; - EcPoint* ecp_t = NULL; - int i = 0; - int ii = 0; - int ipp_m = 0; - - if (!g || !a || !b || !r) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || m <= 0) { - return kEpidBadArgErr; - } - // because we use ipp function with number of items parameter - // defined as "int" we need to verify that input length - // do not exceed INT_MAX to avoid overflow - if (m > INT_MAX) { - return kEpidBadArgErr; - } - ipp_m = (int)m; - // Verify that ec points are not NULL - for (i = 0; i < ipp_m; i++) { - if (!a[i]) { - return kEpidBadArgErr; - } - if (!a[i]->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (!b[i]) { - return kEpidBadArgErr; - } - if (!b[i]->ipp_bn) { - return kEpidBadArgErr; - } - if (g->info.elementLen != a[i]->info.elementLen) { - return kEpidBadArgErr; - } - for (ii = i + 1; ii < ipp_m; ii++) { - if (a[i]->info.elementLen != a[ii]->info.elementLen) { - return kEpidBadArgErr; - } - } - } - if (g->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - do { - IppStatus sts = ippStsNoErr; - - // Create temporal EcPoint element - result = NewEcPoint(g, &ecp_t); - if (kEpidNoErr != result) break; - - for (i = 0; i < ipp_m; i++) { - sts = ippsGFpECMulPoint(a[i]->ipp_ec_pt, b[i]->ipp_bn, ecp_t->ipp_ec_pt, - g->ipp_ec, g->scratch_buffer); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts || - ippStsOutOfRangeErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - if (1 == m) { - sts = ippsGFpECCpyPoint(ecp_t->ipp_ec_pt, r->ipp_ec_pt, g->ipp_ec); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - } else { - sts = ippsGFpECAddPoint(ecp_t->ipp_ec_pt, r->ipp_ec_pt, r->ipp_ec_pt, - g->ipp_ec); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - } - } - if (kEpidNoErr != result) break; - - result = kEpidNoErr; - } while (0); - DeleteEcPoint(&ecp_t); - - return result; -} - -EpidStatus EcSscmMultiExp(EcGroup* g, EcPoint const** a, BigNumStr const** b, - size_t m, EcPoint* r) { - // call EcMultiExp directly because its implementation is side channel - // mitigated already - return EcMultiExp(g, a, b, m, r); -} - -EpidStatus EcGetRandom(EcGroup* g, BitSupplier rnd_func, void* rnd_func_param, - EcPoint* r) { - IppStatus sts = ippStsNoErr; - if (!g || !rnd_func || !r) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || !g->scratch_buffer) { - return kEpidBadArgErr; - } - if (g->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - sts = ippsGFpECSetPointRandom((IppBitSupplier)rnd_func, rnd_func_param, - r->ipp_ec_pt, g->ipp_ec, g->scratch_buffer); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - return kEpidNoErr; -} - -EpidStatus EcInGroup(EcGroup* g, void const* p_str, size_t strlen, - bool* in_group) { - EpidStatus result = kEpidErr; - EcPoint* p = NULL; - - if (!g || !p_str || !in_group) { - return kEpidBadArgErr; - } - if (0 == strlen) { - return kEpidBadArgErr; - } - - if (strlen != sizeof(G1ElemStr) && strlen != sizeof(G2ElemStr)) { - *in_group = false; - return kEpidBadArgErr; - } else { - if (strlen == sizeof(G1ElemStr)) { - // check info.elementlen with strlen - // multiply by 2 for x,y and 4 multiply to convert dword to bytes - size_t info_elementLen_in_byte = (g->info.elementLen) * 2 * 4; - if (info_elementLen_in_byte != strlen) { - *in_group = false; - return kEpidBadArgErr; - } - // check Fq basic and ground degree - if (g->info.basicGFdegree != 1 || g->info.groundGFdegree != 1) { - *in_group = false; - return kEpidBadArgErr; - } - } - if (strlen == sizeof(G2ElemStr)) { - // check info.elementlen with strlen - // multiply by 2 for x,y and 4 multiply to convert dword to bytes - size_t info_elementLen_in_byte = (g->info.elementLen) * 2 * 4; - IppStatus sts = ippStsNoErr; - IppsGFpInfo ground_info = {0}; - if (info_elementLen_in_byte != strlen) { - *in_group = false; - return kEpidBadArgErr; - } - // check Fq2 basic and ground degree - if (g->info.basicGFdegree != 2 || g->info.groundGFdegree != 2) { - *in_group = false; - return kEpidBadArgErr; - } - // check Fq basic and ground degree - sts = ippsGFpGetInfo(g->info.pGroundGF, &ground_info); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) { - *in_group = false; - return kEpidMathErr; - } else { - *in_group = false; - return kEpidBadArgErr; - } - } - - if (ground_info.basicGFdegree != 1 || ground_info.groundGFdegree != 1) { - *in_group = false; - return kEpidBadArgErr; - } - } - } - - do { - result = NewEcPoint(g, &p); - if (kEpidNoErr != result) break; - - result = eccontains(g, p_str, strlen, p, in_group); - if (kEpidNoErr != result) break; - - result = kEpidNoErr; - } while (0); - - DeleteEcPoint(&p); - - return result; -} - -/// The number of attempts to hash a message to an element -#define EPID_ECHASH_WATCHDOG (50) - -#pragma pack(1) -/// 336 bit octet string -typedef struct OctStr336 { - unsigned char data[336 / CHAR_BIT]; ///< 336 bit data -} OctStr336; -#pragma pack() - -/*! -Returns the first bit and the next 336 bits of str in octet string. - -\param[in] str hash string -\param[in] str_len hash string lengh in bytes -\param[out] first_bit first bit of str -\param[out] t pointer to the first 336 bits of input str after the first bit -\param[in] t_len length of t octet string - -\returns ::EpidStatus -*/ -static EpidStatus SplitHashBits(void const* str, size_t str_len, - uint32_t* first_bit, OctStr336* t) { - // this is 336bits /8 bits per byte = 42 bytes - OctStr336 next336 = {0}; - size_t i = 0; - if (!str || !first_bit || !t) return kEpidBadArgErr; - if (str_len < sizeof(next336) + 1) { - // we need at least 337 bits! - return kEpidBadArgErr; - } - - for (i = 0; i < sizeof(next336); i++) { - // This is not overflowing since str length was assured to - // be at least one byte greater than needed for 336 bits. We are - // carrying in the first bit of that byte. - uint8_t carry = ((((uint8_t const*)str)[i + 1] & 0x80) >> 7); - next336.data[i] = (((((uint8_t const*)str)[i] << 1) & 0xFF) | carry) & 0xFF; - } - *first_bit = ((((uint8_t const*)str)[0] & 0x80) >> 7); - *t = next336; - return kEpidNoErr; -} - -EpidStatus Epid11EcHash(EcGroup* g, void const* msg, size_t msg_len, - EcPoint* r) { - EpidStatus result = kEpidErr; - -#pragma pack(1) - struct { - uint32_t msg_len; - uint8_t msg[1]; - }* hash_buf = NULL; -#pragma pack() - size_t hash_buf_size = 0; - - FfElement* a = NULL; - FfElement* b = NULL; - - FfElement* rx = NULL; - FfElement* t1 = NULL; - FfElement* t2 = NULL; - - BigNum* q = NULL; - BigNum* t_bn = NULL; - BigNum* h_bn = NULL; - - FiniteField ff = {0}; - - // check parameters - if ((!msg && msg_len > 0) || !r || !g) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || !r->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (g->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - // mitigate hash_buf_size and msg_len overflow - if (INT_MAX - sizeof(uint32_t) < msg_len) { - return kEpidBadArgErr; - } - - do { - IppStatus sts; - uint32_t i = 0; - uint32_t ip1 = 0; - uint32_t high_bit = 0; - - IppsGFpState* ipp_ff = NULL; - uint32_t const* h = NULL; // cofactor - int h_len = 0; - - int sqrt_loop_count = 2 * EPID_ECHASH_WATCHDOG; - Sha256Digest message_digest[2] = {0}; - OctStr336 t = {0}; - - hash_buf_size = sizeof(*hash_buf) - sizeof(hash_buf->msg) + msg_len; - hash_buf = SAFE_ALLOC(hash_buf_size); - if (!hash_buf) { - result = kEpidMemAllocErr; - break; - } - - sts = ippsGFpECGet(g->ipp_ec, (const IppsGFpState**)&ipp_ff, 0, 0, 0, 0, 0, - 0, &h, &h_len); - BREAK_ON_IPP_ERROR(sts, result); - result = InitFiniteFieldFromIpp(ipp_ff, &ff); - BREAK_ON_EPID_ERROR(result); - - result = NewFfElement(&ff, &a); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ff, &b); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ff, &rx); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ff, &t1); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ff, &t2); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(sizeof(t), &t_bn); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(h_len, &h_bn); - BREAK_ON_EPID_ERROR(result); - - sts = ippsGFpECGet(g->ipp_ec, 0, a->ipp_ff_elem, b->ipp_ff_elem, 0, 0, 0, 0, - 0, 0); - BREAK_ON_IPP_ERROR(sts, result); - - result = InitBigNumFromBnu(h, h_len, h_bn); - BREAK_ON_EPID_ERROR(result); - - // compute H = hash (i || m) || Hash (i+1 || m) where (i =ipp32u) - // copy variable length message to the buffer to hash - if (0 != memcpy_S(hash_buf->msg, - hash_buf_size - sizeof(*hash_buf) + sizeof(hash_buf->msg), - msg, msg_len)) { - result = kEpidErr; - break; - } - - do { - result = kEpidErr; - - // set hash (i || m) portion - hash_buf->msg_len = ntohl(i); - result = Sha256MessageDigest(hash_buf, hash_buf_size, &message_digest[0]); - BREAK_ON_EPID_ERROR(result); - // set hash (i+1 || m) portion - ip1 = i + 1; - hash_buf->msg_len = ntohl(ip1); - result = Sha256MessageDigest(hash_buf, hash_buf_size, &message_digest[1]); - BREAK_ON_EPID_ERROR(result); - // let b = first bit of H - // t = next 336bits of H (336 = length(q) + slen) - result = - SplitHashBits(message_digest, sizeof(message_digest), &high_bit, &t); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(&t, sizeof(t), t_bn); - BREAK_ON_EPID_ERROR(result); - // compute rx = t mod q (aka prime field based on q) - result = InitFfElementFromBn(&ff, t_bn, rx); - BREAK_ON_EPID_ERROR(result); - - // t1 = (rx^3 + a*rx + b) mod q - result = FfMul(&ff, rx, rx, t1); - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ff, t1, rx, t1); - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ff, a, rx, t2); - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ff, t1, t2, t1); - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ff, t1, b, t1); - BREAK_ON_EPID_ERROR(result); - - // t2 = &ff.sqrt(t1) - result = FfSqrt(&ff, t1, t2); - if (kEpidMathQuadraticNonResidueError == result) { - // if sqrt fail set i = i+ 2 and repeat from top - i += 2; - continue; - } else if (kEpidNoErr != result) { - result = kEpidErr; - } - break; - } while (--sqrt_loop_count); - - BREAK_ON_EPID_ERROR(result); - // reset to fail to catch other errors - result = kEpidErr; - - // y[0] = min (t2, q-t2), y[1] = max(t2, q-t2) - if (0 == high_bit) { - // q-t2 = &ff.neg(t2) - result = FfNeg(&ff, t2, t2); - BREAK_ON_EPID_ERROR(result); - } - - // Ry = y[b] - sts = ippsGFpECSetPoint(rx->ipp_ff_elem, t2->ipp_ff_elem, r->ipp_ec_pt, - g->ipp_ec); - BREAK_ON_IPP_ERROR(sts, result); - // R = E(&ff).exp(R,h) - sts = ippsGFpECMulPoint(r->ipp_ec_pt, h_bn->ipp_bn, r->ipp_ec_pt, g->ipp_ec, - g->scratch_buffer); - BREAK_ON_IPP_ERROR(sts, result); - - result = kEpidNoErr; - } while (0); - - SAFE_FREE(hash_buf); - DeleteFfElement(&a); - DeleteFfElement(&b); - DeleteFfElement(&rx); - DeleteFfElement(&t1); - DeleteFfElement(&t2); - DeleteBigNum(&h_bn); - DeleteBigNum(&t_bn); - DeleteBigNum(&q); - - return result; -} - -EpidStatus EcHash(EcGroup* g, void const* msg, size_t msg_len, HashAlg hash_alg, - EcPoint* r) { - IppStatus sts = ippStsNoErr; - IppHashID hash_id; - int ipp_msg_len = 0; - Ipp32u i = 0; - if (!g || (!msg && msg_len > 0) || !r) { - return kEpidBadArgErr; - } else if (!g->ipp_ec || !r->ipp_ec_pt) { - return kEpidBadArgErr; - } - // because we use ipp function with message length parameter - // defined as "int" we need to verify that input length - // do not exceed INT_MAX to avoid overflow - if (msg_len > INT_MAX) { - return kEpidBadArgErr; - } - ipp_msg_len = (int)msg_len; - if (kSha256 == hash_alg) { - hash_id = ippSHA256; - } else if (kSha384 == hash_alg) { - hash_id = ippSHA384; - } else if (kSha512 == hash_alg) { - hash_id = ippSHA512; - } else { - return kEpidHashAlgorithmNotSupported; - } - if (g->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - do { - sts = ippsGFpECSetPointHash(i, msg, ipp_msg_len, hash_id, r->ipp_ec_pt, - g->ipp_ec, g->scratch_buffer); - } while (ippStsQuadraticNonResidueErr == sts && i++ < EPID_ECHASH_WATCHDOG); - - if (ippStsContextMatchErr == sts || ippStsBadArgErr == sts || - ippStsLengthErr == sts) { - return kEpidBadArgErr; - } - if (ippStsNoErr != sts) { - return kEpidMathErr; - } - - return kEpidNoErr; -} - -EpidStatus EcMakePoint(EcGroup* g, FfElement const* x, EcPoint* r) { - IppStatus sts = ippStsNoErr; - if (!g || !x || !r) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || !x->ipp_ff_elem || !r->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (g->info.elementLen != x->info.elementLen || - g->info.elementLen != r->info.elementLen || - x->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - sts = ippsGFpECMakePoint(x->ipp_ff_elem, r->ipp_ec_pt, g->ipp_ec); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsQuadraticNonResidueErr == sts || - ippStsBadArgErr == sts) - return kEpidBadArgErr; - else - return kEpidMathErr; - } - return kEpidNoErr; -} - -EpidStatus EcInverse(EcGroup* g, EcPoint const* p, EcPoint* r) { - IppStatus sts = ippStsNoErr; - if (!g || !p || !r) { - return kEpidBadArgErr; - } else if (!g->ipp_ec || !p->ipp_ec_pt || !r->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (g->info.elementLen != p->info.elementLen || - g->info.elementLen != r->info.elementLen || - p->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - // Inverses elliptic curve point - sts = ippsGFpECNegPoint(p->ipp_ec_pt, r->ipp_ec_pt, g->ipp_ec); - // Check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - return kEpidBadArgErr; - else - return kEpidMathErr; - } - return kEpidNoErr; -} - -EpidStatus EcIsEqual(EcGroup* g, EcPoint const* a, EcPoint const* b, - bool* is_equal) { - IppStatus sts; - IppECResult result; - - if (!g || !a || !b || !is_equal) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || !a->ipp_ec_pt || !b->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (g->info.elementLen != a->info.elementLen || - g->info.elementLen != b->info.elementLen || - a->info.elementLen != b->info.elementLen) { - return kEpidBadArgErr; - } - - sts = ippsGFpECCmpPoint(a->ipp_ec_pt, b->ipp_ec_pt, &result, g->ipp_ec); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - *is_equal = ippECPointIsEqual == result; - - return kEpidNoErr; -} - -EpidStatus EcIsIdentity(EcGroup* g, EcPoint const* p, bool* is_identity) { - IppStatus sts; - IppECResult result; - - if (!g || !p || !is_identity) { - return kEpidBadArgErr; - } - if (!g->ipp_ec || !p->ipp_ec_pt) { - return kEpidBadArgErr; - } - if (g->info.elementLen != p->info.elementLen) { - return kEpidBadArgErr; - } - - sts = ippsGFpECTstPoint(p->ipp_ec_pt, &result, g->ipp_ec, g->scratch_buffer); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - *is_identity = ippECPointIsAtInfinite == result; - - return kEpidNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/finitefield-internal.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/finitefield-internal.h deleted file mode 100644 index 4b68a6e491..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/finitefield-internal.h +++ /dev/null @@ -1,48 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Finite field private interface. - */ - -#ifndef EPID_COMMON_MATH_SRC_FINITEFIELD_INTERNAL_H_ -#define EPID_COMMON_MATH_SRC_FINITEFIELD_INTERNAL_H_ - -#include "ext/ipp/include/ippcpepid.h" - -/// Finite Field -struct FiniteField { - /// Internal implementation of finite field - IppsGFpState* ipp_ff; - /// Information about finite field created - IppsGFpInfo info; - /// Prime modulus size in bytes - size_t prime_modulus_size; -}; - -/// Finite Field Element -struct FfElement { - /// Internal implementation of finite field element - IppsGFpElement* ipp_ff_elem; - /// Information about finite field element was created for - IppsGFpInfo info; -}; - -/// Initialize FiniteField structure -EpidStatus InitFiniteFieldFromIpp(IppsGFpState* ipp_ff, FiniteField* ff); - -#endif // EPID_COMMON_MATH_SRC_FINITEFIELD_INTERNAL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/finitefield.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/finitefield.c deleted file mode 100644 index 27e994c714..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/finitefield.c +++ /dev/null @@ -1,1583 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Finite field implementation. - */ - -#include -#include -#include -#include "epid/common/math/finitefield.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/math/src/finitefield-internal.h" -#include "epid/common/src/memory.h" -#include "ext/ipp/include/ippcp.h" -#include "ext/ipp/include/ippcpepid.h" - -/// Number of leading zero bits in 32 bit integer x. -static size_t Nlz32(uint32_t x) { - size_t nlz = sizeof(x) * 8; - if (x) { - nlz = 0; - if (0 == (x & 0xFFFF0000)) { - nlz += 16; - x <<= 16; - } - if (0 == (x & 0xFF000000)) { - nlz += 8; - x <<= 8; - } - if (0 == (x & 0xF0000000)) { - nlz += 4; - x <<= 4; - } - if (0 == (x & 0xC0000000)) { - nlz += 2; - x <<= 2; - } - if (0 == (x & 0x80000000)) { - nlz++; - } - } - return nlz; -} - -/// Bit size of bit number representated as array of Ipp32u. -#define BNU_BITSIZE(bnu, len) \ - ((len) * sizeof(Ipp32u) * 8 - Nlz32((bnu)[(len)-1])) - -/// Convert bit size to byte size -#define BIT2BYTE_SIZE(bits) (((bits) + 7) >> 3) - -/// Initializes a FiniteField structure -EpidStatus InitFiniteFieldFromIpp(IppsGFpState* ipp_ff, FiniteField* ff) { - EpidStatus result = kEpidErr; - IppStatus sts = ippStsNoErr; - IppsGFpInfo basic_info; - Ipp32u* basic_modulus = NULL; - - if (!ipp_ff || !ff) return kEpidBadArgErr; - - do { - memset(ff, 0, sizeof(*ff)); - - // set FiniteField::info - sts = ippsGFpGetInfo(ipp_ff, &(ff->info)); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - - // set FiniteField::ipp_ff context - ff->ipp_ff = ipp_ff; - - // set FiniteField::prime_modulus_size - sts = ippsGFpGetInfo(ff->info.pBasicGF, &basic_info); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - - basic_modulus = (Ipp32u*)SAFE_ALLOC(basic_info.elementLen * sizeof(Ipp32u)); - if (!basic_modulus) { - result = kEpidMemAllocErr; - break; - } - - sts = ippsGFpGetModulus(ff->info.pBasicGF, basic_modulus); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - - ff->prime_modulus_size = - BIT2BYTE_SIZE(BNU_BITSIZE(basic_modulus, basic_info.elementLen)); - - result = kEpidNoErr; - } while (0); - - SAFE_FREE(basic_modulus); - - return result; -} - -EpidStatus NewFiniteField(BigNumStr const* prime, FiniteField** ff) { - EpidStatus result = kEpidErr; - IppsGFpState* ipp_finitefield_ctx = NULL; - FiniteField* finitefield_ptr = NULL; - do { - IppStatus sts = ippStsNoErr; - Ipp32u bnu[sizeof(BigNumStr) / sizeof(Ipp32u)]; - int bnu_size; - int bit_size = CHAR_BIT * sizeof(BigNumStr); - int state_size_in_bytes = 0; - - if (!prime || !ff) { - result = kEpidBadArgErr; - break; - } - - bit_size = (int)OctStrBitSize(prime->data.data, sizeof(prime->data.data)); - - bnu_size = OctStr2Bnu(bnu, prime, sizeof(*prime)); - if (bnu_size < 0) { - result = kEpidMathErr; - break; - } - - // skip high order zeros from BNU - while (bnu_size > 1 && 0 == bnu[bnu_size - 1]) { - bnu_size--; - } - - // Determine the memory requirement for finite field context - sts = ippsGFpGetSize(bit_size, &state_size_in_bytes); - if (ippStsNoErr != sts) { - if (ippStsSizeErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - // Allocate space for ipp bignum context - ipp_finitefield_ctx = (IppsGFpState*)SAFE_ALLOC(state_size_in_bytes); - if (!ipp_finitefield_ctx) { - result = kEpidMemAllocErr; - break; - } - // Initialize ipp finite field context - sts = ippsGFpInit(bnu, bit_size, ipp_finitefield_ctx); - if (ippStsNoErr != sts) { - if (ippStsSizeErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - finitefield_ptr = (FiniteField*)SAFE_ALLOC(sizeof(FiniteField)); - if (!finitefield_ptr) { - result = kEpidMemAllocErr; - break; - } - result = InitFiniteFieldFromIpp(ipp_finitefield_ctx, finitefield_ptr); - if (kEpidNoErr != result) break; - - *ff = finitefield_ptr; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result) { - SAFE_FREE(finitefield_ptr); - SAFE_FREE(ipp_finitefield_ctx); - } - return result; -} - -EpidStatus NewFiniteFieldViaBinomalExtension(FiniteField const* ground_field, - FfElement const* ground_element, - int degree, FiniteField** ff) { - EpidStatus result = kEpidErr; - IppsGFpState* ipp_finitefield_ctx = NULL; - FiniteField* finitefield_ptr = NULL; - do { - IppStatus sts = ippStsNoErr; - int state_size_in_bytes = 0; - if (!ground_field || !ground_element || !ff) { - result = kEpidBadArgErr; - break; - } else if (degree < 2 || !ground_field->ipp_ff || - !ground_element->ipp_ff_elem) { - result = kEpidBadArgErr; - break; - } - - // Determine the memory requirement for finite field context - sts = ippsGFpxGetSize(ground_field->ipp_ff, degree, &state_size_in_bytes); - if (ippStsNoErr != sts) { - if (ippStsSizeErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - - // Allocate space for ipp finite field context - ipp_finitefield_ctx = (IppsGFpState*)SAFE_ALLOC(state_size_in_bytes); - if (!ipp_finitefield_ctx) { - result = kEpidMemAllocErr; - break; - } - - // Initialize ipp binomial extension finite field context - sts = - ippsGFpxInitBinomial(ground_field->ipp_ff, ground_element->ipp_ff_elem, - degree, ipp_finitefield_ctx); - if (ippStsNoErr != sts) { - if (ippStsSizeErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - finitefield_ptr = (FiniteField*)SAFE_ALLOC(sizeof(FiniteField)); - if (!finitefield_ptr) { - result = kEpidMemAllocErr; - break; - } - result = InitFiniteFieldFromIpp(ipp_finitefield_ctx, finitefield_ptr); - if (kEpidNoErr != result) break; - - *ff = finitefield_ptr; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result) { - SAFE_FREE(finitefield_ptr); - SAFE_FREE(ipp_finitefield_ctx); - } - return result; -} - -EpidStatus NewFiniteFieldViaPolynomialExtension(FiniteField const* ground_field, - BigNumStr const* irr_polynomial, - int degree, FiniteField** ff) { - EpidStatus result = kEpidErr; - IppsGFpState* ipp_finitefield_ctx = NULL; - FiniteField* finitefield_ptr = NULL; - Ipp32u* irr_polynomial_bnu = NULL; - int i; - do { - IppStatus sts = ippStsNoErr; - int state_size_in_bytes = 0; - if (!ground_field || !irr_polynomial || !ff) { - result = kEpidBadArgErr; - break; - } - if (degree < 1 || degree > (int)(INT_MAX / sizeof(BigNumStr)) || - !ground_field->ipp_ff) { - result = kEpidBadArgErr; - break; - } - - // irr_polynomial to IPP representation - irr_polynomial_bnu = (Ipp32u*)SAFE_ALLOC(sizeof(BigNumStr) * degree); - if (!irr_polynomial_bnu) { - result = kEpidMemAllocErr; - break; - } - for (i = 0; i < degree; ++i) { - OctStr2Bnu(irr_polynomial_bnu + (i * sizeof(BigNumStr) / 4), - &irr_polynomial[i], sizeof(irr_polynomial[i])); - } - - // Determine the memory requirement for finite field context - sts = ippsGFpxGetSize(ground_field->ipp_ff, degree, &state_size_in_bytes); - if (ippStsNoErr != sts) { - if (ippStsSizeErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - - // Allocate space for ipp finite field context - ipp_finitefield_ctx = (IppsGFpState*)SAFE_ALLOC(state_size_in_bytes); - if (!ipp_finitefield_ctx) { - result = kEpidMemAllocErr; - break; - } - - // Initialize ipp binomial extension finite field context - sts = ippsGFpxInit(ground_field->ipp_ff, irr_polynomial_bnu, degree, - ipp_finitefield_ctx); - if (ippStsNoErr != sts) { - if (ippStsSizeErr == sts) { - result = kEpidBadArgErr; - } else { - result = kEpidMathErr; - } - break; - } - finitefield_ptr = (FiniteField*)SAFE_ALLOC(sizeof(FiniteField)); - if (!finitefield_ptr) { - result = kEpidMemAllocErr; - break; - } - result = InitFiniteFieldFromIpp(ipp_finitefield_ctx, finitefield_ptr); - if (kEpidNoErr != result) break; - - *ff = finitefield_ptr; - result = kEpidNoErr; - } while (0); - - SAFE_FREE(irr_polynomial_bnu); - if (kEpidNoErr != result) { - SAFE_FREE(finitefield_ptr); - SAFE_FREE(ipp_finitefield_ctx); - } - return result; -} - -void DeleteFiniteField(FiniteField** ff) { - if (ff) { - if (*ff) { - SAFE_FREE((*ff)->ipp_ff); - } - SAFE_FREE((*ff)); - } -} - -EpidStatus NewFfElement(FiniteField const* ff, FfElement** new_ff_elem) { - EpidStatus result = kEpidErr; - IppsGFpElement* ipp_ff_elem = NULL; - FfElement* ff_elem = NULL; - do { - IppStatus sts = ippStsNoErr; - unsigned int ctxsize = 0; - Ipp32u zero = 0; - // check parameters - if (!ff || !new_ff_elem) { - result = kEpidBadArgErr; - break; - } else if (!ff->ipp_ff) { - result = kEpidBadArgErr; - break; - } - // Determine the memory requirement for finite field element context - sts = ippsGFpElementGetSize(ff->ipp_ff, (int*)&ctxsize); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - // Allocate space for ipp bignum context - ipp_ff_elem = (IppsGFpElement*)SAFE_ALLOC(ctxsize); - if (!ipp_ff_elem) { - result = kEpidMemAllocErr; - break; - } - // Initialize ipp bignum context - // initialize state - sts = ippsGFpElementInit(&zero, 1, ipp_ff_elem, ff->ipp_ff); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - - ff_elem = (FfElement*)SAFE_ALLOC(sizeof(FfElement)); - if (!ff_elem) { - result = kEpidMemAllocErr; - break; - } - - ff_elem->ipp_ff_elem = ipp_ff_elem; - - sts = ippsGFpGetInfo(ff->ipp_ff, &(ff_elem->info)); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - - *new_ff_elem = ff_elem; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result) { - SAFE_FREE(ipp_ff_elem); - SAFE_FREE(ff_elem); - } - return result; -} - -void DeleteFfElement(FfElement** ff_elem) { - if (ff_elem) { - if (*ff_elem) { - SAFE_FREE((*ff_elem)->ipp_ff_elem); - } - SAFE_FREE(*ff_elem); - } -} - -EpidStatus ReadFfElement(FiniteField* ff, void const* ff_elem_str, - size_t strlen, FfElement* ff_elem) { - IppStatus sts; - size_t strlen_required = 0; - int ipp_str_size = 0; - uint8_t const* str = (uint8_t const*)ff_elem_str; - - if (!ff || !ff_elem_str || !ff_elem) { - return kEpidBadArgErr; - } - if (!ff_elem->ipp_ff_elem || !ff->ipp_ff) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != ff_elem->info.elementLen) { - return kEpidBadArgErr; - } - - // ippsGFpSetElementOctString expects serialized value consists - // of "degree" number of chunks, where each chunk is of modulus byte size. - strlen_required = ff->prime_modulus_size * ff->info.basicGFdegree; - - // Remove leading zeros when de-serealizing finite field of degree 1. - // This takes care of serialization chunk size adjustments when importing - // a big numbers. - if (1 == ff->info.basicGFdegree) { - while (strlen_required < strlen && 0 == *str) { - str++; - strlen--; - } - } - - // Check if serialized value does not exceed ippsGFpSetElementOctString - // expected size. - if (strlen_required < strlen) { - return kEpidBadArgErr; - } - - ipp_str_size = (int)strlen; - if (ipp_str_size <= 0) { - return kEpidBadArgErr; - } - - sts = ippsGFpSetElementOctString(str, ipp_str_size, ff_elem->ipp_ff_elem, - ff->ipp_ff); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsOutOfRangeErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - - return kEpidNoErr; -} - -/// Gets the prime value of a finite field -/*! - This function returns a new bignum containing the field's prime value. - A new bignum is returned so that callers do not have to figure out the proper - size. - - This function only works with non-composite fields. - - \param[in] ff - The field. - \param[out] bn - The target BigNum. - - \returns ::EpidStatus -*/ -EpidStatus GetFiniteFieldPrime(FiniteField* ff, BigNum** bn) { - EpidStatus result = kEpidErr; - IppStatus sts; - BigNum* prime_bn = NULL; - Ipp32u* prime_bnu = NULL; - if (!ff || !bn) { - return kEpidBadArgErr; - } - if (!ff->ipp_ff) { - return kEpidBadArgErr; - } - if (ff->info.basicGFdegree != 1 || ff->info.groundGFdegree != 1) { - return kEpidBadArgErr; - } - do { - size_t elem_dword_size = ff->info.elementLen; - size_t elem_bytes_size = elem_dword_size * sizeof(Ipp32u); - result = NewBigNum(elem_bytes_size, &prime_bn); - if (kEpidNoErr != result) { - break; - } - prime_bnu = (Ipp32u*)SAFE_ALLOC(elem_bytes_size); - if (NULL == prime_bnu) { - result = kEpidMemAllocErr; - break; - } - sts = ippsGFpGetModulus(ff->ipp_ff, prime_bnu); - result = InitBigNumFromBnu(prime_bnu, elem_dword_size, prime_bn); - if (kEpidNoErr != result) { - break; - } - result = kEpidNoErr; - } while (0); - SAFE_FREE(prime_bnu); - if (kEpidNoErr != result) { - DeleteBigNum(&prime_bn); - } else { - *bn = prime_bn; - } - return result; -} - -EpidStatus InitFfElementFromBn(FiniteField* ff, BigNum* bn, - FfElement* ff_elem) { - EpidStatus result = kEpidErr; - BigNum* prime_bn = NULL; - BigNum* mod_bn = NULL; - Ipp32u* mod_str = NULL; - - if (!ff || !bn || !ff_elem) { - return kEpidBadArgErr; - } - if (!ff_elem->ipp_ff_elem || !ff->ipp_ff) { - return kEpidBadArgErr; - } - if (ff->info.basicGFdegree != 1 || ff->info.groundGFdegree != 1) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != ff_elem->info.elementLen) { - return kEpidBadArgErr; - } - do { - size_t elem_size = ff->info.elementLen * sizeof(Ipp32u); - result = NewBigNum(elem_size, &mod_bn); - if (kEpidNoErr != result) { - break; - } - result = GetFiniteFieldPrime(ff, &prime_bn); - if (kEpidNoErr != result) { - break; - } - - result = BigNumMod(bn, prime_bn, mod_bn); - if (kEpidNoErr != result) { - break; - } - mod_str = (Ipp32u*)SAFE_ALLOC(elem_size); - if (NULL == mod_str) { - result = kEpidMemAllocErr; - break; - } - result = WriteBigNum(mod_bn, elem_size, mod_str); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(ff, mod_str, elem_size, ff_elem); - if (kEpidNoErr != result) { - break; - } - result = kEpidNoErr; - } while (0); - SAFE_FREE(mod_str); - DeleteBigNum(&prime_bn); - DeleteBigNum(&mod_bn); - return result; -} - -EpidStatus WriteFfElement(FiniteField* ff, FfElement const* ff_elem, - void* ff_elem_str, size_t strlen) { - IppStatus sts; - size_t strlen_required = 0; - size_t pad = 0; - uint8_t* str = (uint8_t*)ff_elem_str; - - if (!ff || !ff_elem_str || !ff_elem) { - return kEpidBadArgErr; - } - if (!ff_elem->ipp_ff_elem || !ff->ipp_ff) { - return kEpidBadArgErr; - } - if (INT_MAX < strlen) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != ff_elem->info.elementLen) { - return kEpidBadArgErr; - } - - // ippsGFpGetElementOctString serialize value into a buffer consists - // of "degree" number of chunks, where each chunk is of modulus byte size. - strlen_required = ff->prime_modulus_size * ff->info.basicGFdegree; - - // add zero padding for extension of a degree 1 (a prime field) - // so it can be deserialized into big number correctly. - if (1 == ff->info.basicGFdegree && strlen_required < strlen) { - pad = strlen - strlen_required; - memset(str, 0, pad); - strlen -= pad; - str += pad; - } - - // Check if output buffer meets ippsGFpGetElementOctString expectations. - if (strlen_required != strlen) return kEpidBadArgErr; - - // get the data - sts = ippsGFpGetElementOctString(ff_elem->ipp_ff_elem, str, (int)strlen, - ff->ipp_ff); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - - return kEpidNoErr; -} - -EpidStatus FfNeg(FiniteField* ff, FfElement const* a, FfElement* r) { - IppStatus sts = ippStsNoErr; - if (!ff || !a || !r) { - return kEpidBadArgErr; - } else if (!ff->ipp_ff || !a->ipp_ff_elem || !r->ipp_ff_elem) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != a->info.elementLen || - ff->info.elementLen != r->info.elementLen || - a->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - sts = ippsGFpNeg(a->ipp_ff_elem, r->ipp_ff_elem, ff->ipp_ff); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - return kEpidNoErr; -} - -EpidStatus FfInv(FiniteField* ff, FfElement const* a, FfElement* r) { - IppStatus sts = ippStsNoErr; - // Check required parametersWriteFfElement - if (!ff || !a || !r) { - return kEpidBadArgErr; - } else if (!ff->ipp_ff || !a->ipp_ff_elem || !r->ipp_ff_elem) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != a->info.elementLen || - ff->info.elementLen != r->info.elementLen || - a->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - // Invert the element - sts = ippsGFpInv(a->ipp_ff_elem, r->ipp_ff_elem, ff->ipp_ff); - // Check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - return kEpidBadArgErr; - else if (ippStsDivByZeroErr == sts) - return kEpidDivByZeroErr; - else - return kEpidMathErr; - } - return kEpidNoErr; -} - -EpidStatus FfAdd(FiniteField* ff, FfElement const* a, FfElement const* b, - FfElement* r) { - IppStatus sts = ippStsNoErr; - if (!ff || !a || !b || !r) { - return kEpidBadArgErr; - } else if (!ff->ipp_ff || !a->ipp_ff_elem || !b->ipp_ff_elem || - !r->ipp_ff_elem) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != a->info.elementLen || - ff->info.elementLen != b->info.elementLen || - ff->info.elementLen != r->info.elementLen || - a->info.elementLen != b->info.elementLen || - a->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - sts = ippsGFpAdd(a->ipp_ff_elem, b->ipp_ff_elem, r->ipp_ff_elem, ff->ipp_ff); - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else if (ippStsNoErr != sts) { - return kEpidMathErr; - } - return kEpidNoErr; -} - -EpidStatus FfSub(FiniteField* ff, FfElement const* a, FfElement const* b, - FfElement* r) { - IppStatus sts = ippStsNoErr; - if (!ff || !a || !b || !r) { - return kEpidBadArgErr; - } else if (!ff->ipp_ff || !a->ipp_ff_elem || !b->ipp_ff_elem || - !r->ipp_ff_elem) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != a->info.elementLen || - ff->info.elementLen != b->info.elementLen || - ff->info.elementLen != r->info.elementLen || - a->info.elementLen != b->info.elementLen || - a->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - sts = ippsGFpSub(a->ipp_ff_elem, b->ipp_ff_elem, r->ipp_ff_elem, ff->ipp_ff); - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else if (ippStsNoErr != sts) { - return kEpidMathErr; - } - return kEpidNoErr; -} - -EpidStatus FfMul(FiniteField* ff, FfElement const* a, FfElement const* b, - FfElement* r) { - IppStatus sts = ippStsNoErr; - // Check required parametersWriteFfElement - if (!ff || !a || !b || !r) { - return kEpidBadArgErr; - } else if (!ff->ipp_ff || !a->ipp_ff_elem || !b->ipp_ff_elem || - !r->ipp_ff_elem) { - return kEpidBadArgErr; - } - // Multiplies elements - if (a->info.elementLen != b->info.elementLen && - a->info.elementLen == a->info.groundGFdegree * b->info.elementLen) { - sts = ippsGFpMul_GFpE(a->ipp_ff_elem, b->ipp_ff_elem, r->ipp_ff_elem, - ff->ipp_ff); - } else { - if (ff->info.elementLen != a->info.elementLen || - ff->info.elementLen != b->info.elementLen || - ff->info.elementLen != r->info.elementLen || - a->info.elementLen != b->info.elementLen || - a->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - sts = - ippsGFpMul(a->ipp_ff_elem, b->ipp_ff_elem, r->ipp_ff_elem, ff->ipp_ff); - } - // Check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - return kEpidBadArgErr; - else - return kEpidMathErr; - } - return kEpidNoErr; -} - -EpidStatus FfIsZero(FiniteField* ff, FfElement const* a, bool* is_zero) { - IppStatus sts = ippStsNoErr; - int ipp_result = IPP_IS_NE; - // Check required parameters - if (!ff || !a || !is_zero) { - return kEpidBadArgErr; - } else if (!ff->ipp_ff || !a->ipp_ff_elem) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != a->info.elementLen) { - return kEpidBadArgErr; - } - // Check if the element is zero - sts = ippsGFpIsZeroElement(a->ipp_ff_elem, &ipp_result, ff->ipp_ff); - // Check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) - return kEpidBadArgErr; - else - return kEpidMathErr; - } - if (IPP_IS_EQ == ipp_result) { - *is_zero = true; - } else { - *is_zero = false; - } - return kEpidNoErr; -} - -EpidStatus FfExp(FiniteField* ff, FfElement const* a, BigNum const* b, - FfElement* r) { - EpidStatus result = kEpidErr; - Ipp8u* scratch_buffer = NULL; - int exp_bit_size = 0; - int element_size = 0; - - do { - IppStatus sts = ippStsNoErr; - // Check required parameters - if (!ff || !a || !b || !r) { - result = kEpidBadArgErr; - break; - } else if (!ff->ipp_ff || !a->ipp_ff_elem || !r->ipp_ff_elem) { - result = kEpidBadArgErr; - break; - } - if (ff->info.elementLen != a->info.elementLen || - ff->info.elementLen != r->info.elementLen || - a->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - sts = ippsRef_BN(0, &exp_bit_size, 0, b->ipp_bn); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - - sts = ippsGFpScratchBufferSize(1, exp_bit_size, ff->ipp_ff, &element_size); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - - scratch_buffer = (Ipp8u*)SAFE_ALLOC(element_size); - if (!scratch_buffer) { - result = kEpidMemAllocErr; - break; - } - - sts = ippsGFpExp(a->ipp_ff_elem, b->ipp_bn, r->ipp_ff_elem, ff->ipp_ff, - scratch_buffer); - // Check return codes - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - result = kEpidNoErr; - } while (0); - SAFE_FREE(scratch_buffer); - return result; -} - -EpidStatus FfMultiExp(FiniteField* ff, FfElement const** p, BigNumStr const** b, - size_t m, FfElement* r) { - EpidStatus result = kEpidErr; - IppsGFpElement** ipp_p = NULL; - IppsBigNumState** ipp_b = NULL; - BigNum** bignums = NULL; - Ipp8u* scratch_buffer = NULL; - int i = 0; - int ipp_m = 0; - - // Check required parameters - if (!ff || !p || !b || !r) { - return kEpidBadArgErr; - } else if (!ff->ipp_ff || !r->ipp_ff_elem || m <= 0) { - return kEpidBadArgErr; - } - // because we use ipp function with number of items parameter - // defined as "int" we need to verify that input length - // do not exceed INT_MAX to avoid overflow - if (m > INT_MAX) { - return kEpidBadArgErr; - } - ipp_m = (int)m; - - for (i = 0; i < ipp_m; i++) { - if (!p[i]) { - return kEpidBadArgErr; - } - if (!p[i]->ipp_ff_elem) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != p[i]->info.elementLen) { - return kEpidBadArgErr; - } - } - if (ff->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - - do { - IppStatus sts = ippStsNoErr; - int scratch_buffer_size = 0; - const int exp_bit_size = CHAR_BIT * sizeof(BigNumStr); - - // Allocate memory for finite field elements for ipp call - ipp_p = (IppsGFpElement**)SAFE_ALLOC(ipp_m * sizeof(IppsGFpElement*)); - if (!ipp_p) { - result = kEpidMemAllocErr; - break; - } - for (i = 0; i < ipp_m; i++) { - ipp_p[i] = p[i]->ipp_ff_elem; - } - - // Create big number elements for ipp call - // Allocate memory for finite field elements for ipp call - bignums = (BigNum**)SAFE_ALLOC(ipp_m * sizeof(BigNum*)); - if (!bignums) { - result = kEpidMemAllocErr; - break; - } - ipp_b = (IppsBigNumState**)SAFE_ALLOC(ipp_m * sizeof(IppsBigNumState*)); - if (!ipp_b) { - result = kEpidMemAllocErr; - break; - } - // Initialize BigNum and fill ipp array for ipp call - for (i = 0; i < ipp_m; i++) { - result = NewBigNum(sizeof(BigNumStr), &bignums[i]); - if (kEpidNoErr != result) break; - result = ReadBigNum(b[i], sizeof(BigNumStr), bignums[i]); - if (kEpidNoErr != result) break; - ipp_b[i] = bignums[i]->ipp_bn; - } - if (kEpidNoErr != result) break; - - // calculate scratch buffer size - sts = ippsGFpScratchBufferSize(ipp_m, exp_bit_size, ff->ipp_ff, - &scratch_buffer_size); - if (sts != ippStsNoErr) { - result = kEpidMathErr; - break; - } - // allocate memory for scratch buffer - scratch_buffer = (Ipp8u*)SAFE_ALLOC(scratch_buffer_size); - if (!scratch_buffer) { - result = kEpidMemAllocErr; - break; - } - - sts = ippsGFpMultiExp((const IppsGFpElement* const*)ipp_p, - (const IppsBigNumState* const*)ipp_b, ipp_m, - r->ipp_ff_elem, ff->ipp_ff, scratch_buffer); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - result = kEpidNoErr; - } while (0); - if (NULL != bignums) { // delete big nums only if it was really allocated - for (i = 0; i < ipp_m; i++) { - DeleteBigNum(&bignums[i]); - } - } - SAFE_FREE(bignums); - SAFE_FREE(ipp_p); - SAFE_FREE(ipp_b); - SAFE_FREE(scratch_buffer); - return result; -} - -EpidStatus FfMultiExpBn(FiniteField* ff, FfElement const** p, BigNum const** b, - size_t m, FfElement* r) { - IppStatus sts = ippStsNoErr; - EpidStatus result = kEpidErr; - IppsGFpElement** ipp_p = NULL; - IppsBigNumState** ipp_b = NULL; - Ipp8u* scratch_buffer = NULL; - - size_t s = 0; - int exp_bit_size = 0; - size_t i = 0; - int ipp_m = 0; - - // Check required parameters - if (!ff || !p || !b || !r) { - return kEpidBadArgErr; - } else if (!ff->ipp_ff || !r->ipp_ff_elem || m <= 0) { - return kEpidBadArgErr; - } else if (ff->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - for (s = 0; s < m; s++) { - if (!p[s] || !b[s]) { - return kEpidBadArgErr; - } - } - - // because we use ipp function with number of items parameter - // defined as "int" we need to verify that input length - // do not exceed INT_MAX to avoid overflow - if (m > INT_MAX) { - return kEpidBadArgErr; - } - ipp_m = (int)m; - for (i = 0; i < m; i++) { - int b_size = 0; - if (!p[i]) { - return kEpidBadArgErr; - } - if (!p[i]->ipp_ff_elem) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != p[i]->info.elementLen) { - return kEpidBadArgErr; - } - sts = ippsGetSize_BN(b[i]->ipp_bn, &b_size); - if (ippStsNoErr != sts) { - return kEpidBadArgErr; - } - b_size *= (sizeof(Ipp32u) * CHAR_BIT); - if (b_size > exp_bit_size) { - exp_bit_size = b_size; - } - } - - do { - int scratch_buffer_size = 0; - - // Allocate memory for finite field elements for ipp call - ipp_p = (IppsGFpElement**)SAFE_ALLOC(m * sizeof(IppsGFpElement*)); - if (!ipp_p) { - result = kEpidMemAllocErr; - break; - } - for (i = 0; i < m; i++) { - ipp_p[i] = p[i]->ipp_ff_elem; - } - - ipp_b = (IppsBigNumState**)SAFE_ALLOC(m * sizeof(IppsBigNumState*)); - if (!ipp_b) { - result = kEpidMemAllocErr; - break; - } - // fill ipp array for ipp call - for (i = 0; i < m; i++) { - ipp_b[i] = b[i]->ipp_bn; - } - - // calculate scratch buffer size - sts = ippsGFpScratchBufferSize(ipp_m, exp_bit_size, ff->ipp_ff, - &scratch_buffer_size); - if (sts != ippStsNoErr) { - result = kEpidMathErr; - break; - } - // allocate memory for scratch buffer - scratch_buffer = (Ipp8u*)SAFE_ALLOC(scratch_buffer_size); - if (!scratch_buffer) { - result = kEpidMemAllocErr; - break; - } - - sts = ippsGFpMultiExp((const IppsGFpElement* const*)ipp_p, - (const IppsBigNumState* const*)ipp_b, ipp_m, - r->ipp_ff_elem, ff->ipp_ff, scratch_buffer); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsRangeErr == sts) - result = kEpidBadArgErr; - else - result = kEpidMathErr; - break; - } - - result = kEpidNoErr; - } while (0); - - SAFE_FREE(scratch_buffer); - SAFE_FREE(ipp_b); - SAFE_FREE(ipp_p); - return result; -} - -EpidStatus FfSscmMultiExp(FiniteField* ff, FfElement const** p, - BigNumStr const** b, size_t m, FfElement* r) { - // call EcMultiExp directly because its implementation is side channel - // mitigated already - return FfMultiExp(ff, p, b, m, r); -} - -EpidStatus FfIsEqual(FiniteField* ff, FfElement const* a, FfElement const* b, - bool* is_equal) { - IppStatus sts; - int result; - - if (!ff || !a || !b || !is_equal) { - return kEpidBadArgErr; - } - if (!ff->ipp_ff || !a->ipp_ff_elem || !b->ipp_ff_elem) { - return kEpidBadArgErr; - } - if (ff->info.elementLen != a->info.elementLen || - ff->info.elementLen != b->info.elementLen || - a->info.elementLen != b->info.elementLen) { - return kEpidBadArgErr; - } - - sts = ippsGFpCmpElement(a->ipp_ff_elem, b->ipp_ff_elem, &result, ff->ipp_ff); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - *is_equal = IPP_IS_EQ == result; - - return kEpidNoErr; -} - -EpidStatus FfHash(FiniteField* ff, void const* msg, size_t msg_len, - HashAlg hash_alg, FfElement* r) { - EpidStatus result = kEpidErr; - do { - IppStatus sts = ippStsNoErr; - IppHashID hash_id; - int ipp_msg_len = 0; - if (!ff || !msg || !r) { - result = kEpidBadArgErr; - break; - } else if (!ff->ipp_ff || !r->ipp_ff_elem || msg_len <= 0) { - result = kEpidBadArgErr; - break; - } - // because we use ipp function with message length parameter - // defined as "int" we need to verify that input length - // do not exceed INT_MAX to avoid overflow - if (msg_len > INT_MAX) { - result = kEpidBadArgErr; - break; - } - ipp_msg_len = (int)msg_len; - - if (kSha256 == hash_alg) { - hash_id = ippSHA256; - } else if (kSha384 == hash_alg) { - hash_id = ippSHA384; - } else if (kSha512 == hash_alg) { - hash_id = ippSHA512; - } else { - result = kEpidHashAlgorithmNotSupported; - break; - } - if (ff->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - sts = ippsGFpSetElementHash(msg, ipp_msg_len, hash_id, r->ipp_ff_elem, - ff->ipp_ff); - if (ippStsNoErr != sts) { - if (ippStsContextMatchErr == sts || ippStsBadArgErr == sts || - ippStsLengthErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - result = kEpidNoErr; - } while (0); - return result; -} - -/// Number of tries for RNG -#define RNG_WATCHDOG (10) -EpidStatus FfGetRandom(FiniteField* ff, BigNumStr const* low_bound, - BitSupplier rnd_func, void* rnd_param, FfElement* r) { - EpidStatus result = kEpidErr; - IppsGFpElement* low = NULL; - do { - IppStatus sts = ippStsNoErr; - unsigned int ctxsize = 0; - unsigned int rngloopCount = RNG_WATCHDOG; - Ipp32u bnu_low_bound[sizeof(BigNumStr) / sizeof(Ipp32u)]; - int bnu_size; - if (!ff || !low_bound || !rnd_func || !r) { - result = kEpidBadArgErr; - break; - } - if (!ff->ipp_ff || !r->ipp_ff_elem) { - result = kEpidBadArgErr; - break; - } - if (ff->info.elementLen != r->info.elementLen) { - return kEpidBadArgErr; - } - // create a new FfElement to hold low_bound - sts = ippsGFpElementGetSize(ff->ipp_ff, (int*)&ctxsize); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - // Allocate space for ipp Ff Element context - low = (IppsGFpElement*)SAFE_ALLOC(ctxsize); - if (!low) { - result = kEpidMemAllocErr; - break; - } - bnu_size = OctStr2Bnu(bnu_low_bound, low_bound, sizeof(*low_bound)); - if (bnu_size < 0) { - result = kEpidMathErr; - break; - } - // initialize state - sts = ippsGFpElementInit(bnu_low_bound, bnu_size, low, ff->ipp_ff); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - do { - int cmpResult = IPP_IS_NE; - sts = ippsGFpSetElementRandom((IppBitSupplier)rnd_func, rnd_param, - r->ipp_ff_elem, ff->ipp_ff); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - sts = ippsGFpCmpElement(r->ipp_ff_elem, low, &cmpResult, ff->ipp_ff); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - if (IPP_IS_LT != cmpResult) { - // we have a valid value, proceed - result = kEpidNoErr; - break; - } else { - result = kEpidRandMaxIterErr; - continue; - } - } while (--rngloopCount); - } while (0); - SAFE_FREE(low); - return result; -} - -EpidStatus FfSqrt(FiniteField* ff, FfElement const* a, FfElement* r) { - EpidStatus result = kEpidErr; - Ipp8u one_str = 1; - BigNumStr qm1_str; - const BigNumStr zero_str = {0}; - bool is_equal = false; - unsigned int s; - bool is_even = false; - unsigned int i; - BigNum* prime = NULL; - BigNum* qm1 = NULL; - BigNum* one = NULL; - FfElement* qm1_ffe = NULL; - BigNum* two = NULL; - BigNum* qm1d2 = NULL; - BigNum* remainder = NULL; - FfElement* g = NULL; - FfElement* gg = NULL; - BigNum* t = NULL; - BigNum* e = NULL; - BigNum* j = NULL; - BigNum* qm1dj = NULL; - FfElement* ge = NULL; - FfElement* h = NULL; - FfElement* temp = NULL; - FfElement* one_ffe = NULL; - BigNum* ed2 = NULL; - FfElement* ged2 = NULL; - BigNum* tp1d2 = NULL; - FfElement* gtp1d2 = NULL; - FfElement* dd = NULL; - - if (!ff || !a || !r) { - return kEpidBadArgErr; - } - do { - result = GetFiniteFieldPrime(ff, &prime); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &qm1); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &one); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &qm1_ffe); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &two); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &qm1d2); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &remainder); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &g); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &gg); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &t); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &e); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &j); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &qm1dj); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &ge); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &h); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &temp); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &one_ffe); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &ed2); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &ged2); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(BigNumStr) * CHAR_BIT, &tp1d2); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, >p1d2); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(ff, &dd); - if (kEpidNoErr != result) { - break; - } - result = ReadBigNum(&one_str, sizeof(one_str), one); - if (kEpidNoErr != result) { - break; - } - result = BigNumSub(prime, one, qm1); - if (kEpidNoErr != result) { - break; - } - result = BigNumAdd(one, one, two); - if (kEpidNoErr != result) { - break; - } - result = InitFfElementFromBn(ff, one, one_ffe); - if (kEpidNoErr != result) { - break; - } - result = WriteBigNum(qm1, sizeof(qm1_str), &qm1_str); - if (kEpidNoErr != result) { - break; - } - result = InitFfElementFromBn(ff, qm1, qm1_ffe); - if (kEpidNoErr != result) { - break; - } - result = BigNumDiv(qm1, two, qm1d2, remainder); - if (kEpidNoErr != result) { - break; - } - - // 1. Choose an element g in Fq. - result = ReadFfElement(ff, &one_str, sizeof(one_str), g); - if (kEpidNoErr != result) { - break; - } - // try small values for g starting from 2 until - // it meets the requirements from the step 2 - do { - result = FfAdd(ff, g, one_ffe, g); - if (kEpidNoErr != result) { - break; - } - - // 2. Check whether g^((q-1)/2) mod q = q-1. If not, go to step 1. - result = FfExp(ff, g, qm1d2, gg); - if (kEpidNoErr != result) { - break; - } - - result = FfIsEqual(ff, gg, qm1_ffe, &is_equal); - if (kEpidNoErr != result) { - break; - } - } while (!is_equal); - if (kEpidNoErr != result) { - break; - } - - // 3. Set t = q-1, s = 0. - result = ReadBigNum(&qm1_str, sizeof(qm1_str), t); - if (kEpidNoErr != result) { - break; - } - s = 0; - // 4. While (t is even number) - // t = t/2, s = s+1. - result = BigNumIsEven(t, &is_even); - if (kEpidNoErr != result) { - break; - } - - while (is_even) { - result = BigNumDiv(t, two, t, remainder); - if (kEpidNoErr != result) { - break; - } - s = s + 1; - result = BigNumIsEven(t, &is_even); - if (kEpidNoErr != result) { - break; - } - } - // 5. Note that g, s, t can be pre-computed and used for all - // future computations. - // Also note that q-1 = (2^s)*t where t is an odd integer. - - // 6. e = 0. - result = ReadBigNum(&zero_str, sizeof(zero_str), e); - if (kEpidNoErr != result) { - break; - } - - // 7. For i = 2, ..., s - // j = 2^i, - // if (a ? g^(-e))^((q-1)/j) mod q != 1, then set e = e + j/2. - for (i = 2; i <= s; i++) { - result = BigNumPow2N(i, j); - if (kEpidNoErr != result) { - break; - } - result = BigNumDiv(qm1, j, qm1dj, remainder); - if (kEpidNoErr != result) { - break; - } - result = FfExp(ff, g, e, ge); - if (kEpidNoErr != result) { - break; - } - // 8. Compute h = (a * g^(-e)) mod q. - result = FfInv(ff, ge, ge); - if (kEpidNoErr != result) { - break; - } - result = FfMul(ff, a, ge, h); - if (kEpidNoErr != result) { - break; - } - result = FfExp(ff, h, qm1dj, temp); - if (kEpidNoErr != result) { - break; - } - result = FfIsEqual(ff, temp, one_ffe, &is_equal); - if (!is_equal) { - result = BigNumDiv(j, two, j, remainder); - if (kEpidNoErr != result) { - break; - } - result = BigNumAdd(e, j, e); - if (kEpidNoErr != result) { - break; - } - } - } - - // 8. Compute h = (a * g^(-e)) mod q. - result = FfExp(ff, g, e, ge); - if (kEpidNoErr != result) { - break; - } - result = FfInv(ff, ge, ge); - if (kEpidNoErr != result) { - break; - } - result = FfMul(ff, a, ge, h); - if (kEpidNoErr != result) { - break; - } - - // 9. Compute r = d = (g^(e/2) * h^((t+1)/2)) mod q. - result = BigNumDiv(e, two, ed2, remainder); - if (kEpidNoErr != result) { - break; - } - result = FfExp(ff, g, ed2, ged2); - if (kEpidNoErr != result) { - break; - } - result = BigNumAdd(t, one, tp1d2); - if (kEpidNoErr != result) { - break; - } - result = BigNumDiv(tp1d2, two, tp1d2, remainder); - if (kEpidNoErr != result) { - break; - } - result = FfExp(ff, h, tp1d2, gtp1d2); - if (kEpidNoErr != result) { - break; - } - result = FfMul(ff, ged2, gtp1d2, r); - if (kEpidNoErr != result) { - break; - } - // 10. Verify whether a = d^2 mod q. If so, return r, otherwise, return - // fail. - result = FfMul(ff, r, r, dd); - if (kEpidNoErr != result) { - break; - } - result = FfIsEqual(ff, dd, a, &is_equal); - if (kEpidNoErr != result) { - break; - } - if (!is_equal) { - result = kEpidMathQuadraticNonResidueError; - break; - } - result = kEpidNoErr; - } while (0); - DeleteFfElement(&dd); - DeleteFfElement(>p1d2); - DeleteBigNum(&tp1d2); - DeleteFfElement(&ged2); - DeleteBigNum(&ed2); - DeleteFfElement(&one_ffe); - DeleteFfElement(&temp); - DeleteFfElement(&h); - DeleteFfElement(&ge); - DeleteBigNum(&qm1dj); - DeleteBigNum(&j); - DeleteBigNum(&e); - DeleteBigNum(&t); - DeleteFfElement(&gg); - DeleteFfElement(&g); - DeleteBigNum(&remainder); - DeleteBigNum(&qm1d2); - DeleteBigNum(&two); - DeleteFfElement(&qm1_ffe); - DeleteBigNum(&one); - DeleteBigNum(&qm1); - DeleteBigNum(&prime); - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/pairing-internal.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/pairing-internal.h deleted file mode 100644 index 59037063c9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/pairing-internal.h +++ /dev/null @@ -1,39 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Pairing private interface. - */ - -#ifndef EPID_COMMON_MATH_SRC_PAIRING_INTERNAL_H_ -#define EPID_COMMON_MATH_SRC_PAIRING_INTERNAL_H_ - -/// Pairing State -struct PairingState { - EcGroup* ga; ///< elliptic curve group G1 - EcGroup* gb; ///< elliptic curve group G1 - FiniteField* ff; ///< finite field Fq12 GT - BigNum* t; ///< positive integer such that 6t^2 = p-q, where p and q are - /// parameters of G1 - bool neg; ///< 8-bit integer representing a Boolean value - FfElement* g[3][5]; ///< 15 elements in Fq2 - FiniteField Fq; ///< Fq - FiniteField Fq2; ///< Fq2 - FiniteField Fq6; ///< Fq6 -}; - -#endif // EPID_COMMON_MATH_SRC_PAIRING_INTERNAL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/pairing.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/pairing.c deleted file mode 100644 index 079ffff1e6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/pairing.c +++ /dev/null @@ -1,2373 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Pairing implementation. - */ - -#include -#include "epid/common/math/pairing.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/math/src/finitefield-internal.h" -#include "epid/common/math/src/ecgroup-internal.h" -#include "epid/common/math/src/pairing-internal.h" -#include "epid/common/src/memory.h" -#include "ext/ipp/include/ippcp.h" -#include "ext/ipp/include/ippcpepid.h" - -/// Handle Ipp Errors with Break -#define BREAK_ON_IPP_ERROR(sts, ret) \ - { \ - IppStatus temp_sts = (sts); \ - if (ippStsNoErr != temp_sts) { \ - if (ippStsContextMatchErr == temp_sts) { \ - (ret) = kEpidMathErr; \ - } else { \ - (ret) = kEpidBadArgErr; \ - } \ - break; \ - } \ - } -/// Handle Ipp Errors with Return -#define RETURN_ON_IPP_ERROR(sts) \ - { \ - IppStatus temp_sts = (sts); \ - if (ippStsNoErr != temp_sts) { \ - if (ippStsContextMatchErr == temp_sts) { \ - return kEpidMathErr; \ - } else { \ - return kEpidBadArgErr; \ - } \ - } \ - } -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -#pragma pack(1) -/// Data for element in Fq -typedef struct FqElemDat { - Ipp32u x[sizeof(FqElemStr) / sizeof(Ipp32u)]; ///< element in Fq -} FqElemDat; -/// Data for element in Fq2 -typedef struct Fq2ElemDat { - FqElemDat x[2]; ///< element in Fq2 -} Fq2ElemDat; -/// Data for element in Fq2^3 -typedef struct Fq6ElemDat { - Fq2ElemDat x[3]; ///< element in Fq6 -} Fq6ElemDat; -/// Data for element in Fq2^3^2 -typedef struct Fq12ElemDat { - Fq6ElemDat x[2]; ///< element in Fq12 -} Fq12ElemDat; -#pragma pack() - -// Forward Declarations -static EpidStatus FinalExp(PairingState* ps, FfElement* d, FfElement const* h); - -static EpidStatus PiOp(PairingState* ps, FfElement* x_out, FfElement* y_out, - FfElement const* x, FfElement const* y, const int e); - -static EpidStatus FrobeniusOp(PairingState* ps, FfElement* d_out, - FfElement const* a, const int e); - -static EpidStatus Line(FiniteField* gt, FfElement* f, FfElement* x_out, - FfElement* y_out, FfElement* z_out, FfElement* z2_out, - FfElement const* px, FfElement const* py, - FfElement const* x, FfElement const* y, - FfElement const* z, FfElement const* z2, - FfElement const* qx, FfElement const* qy); - -static EpidStatus Tangent(FiniteField* gt, FfElement* f, FfElement* x_out, - FfElement* y_out, FfElement* z_out, FfElement* z2_out, - FfElement const* px, FfElement const* py, - FfElement const* x, FfElement const* y, - FfElement const* z, FfElement const* z2); - -static EpidStatus Ternary(int* s, int* n, int max_elements, BigNum const* x); - -static int Bit(Ipp32u const* num, Ipp32u bit_index); - -static EpidStatus MulXiFast(FfElement* e, FfElement const* a, PairingState* ps); - -static EpidStatus MulV(FfElement* e, FfElement* a, PairingState* ps); - -static EpidStatus Fq6MulGFpE2(FfElement* e, FfElement* a, FfElement* b0, - FfElement* b1, PairingState* ps); - -static EpidStatus MulSpecial(FfElement* e, FfElement const* a, - FfElement const* b, PairingState* ps); - -static EpidStatus SquareCyclotomic(PairingState* ps, FfElement* e_out, - FfElement const* a_in); - -static EpidStatus ExpCyclotomic(PairingState* ps, FfElement* e, - FfElement const* a, BigNum const* b); - -// Implementation - -EpidStatus NewPairingState(EcGroup const* ga, EcGroup const* gb, - FiniteField* ff, BigNumStr const* t, bool neg, - PairingState** ps) { - EpidStatus result = kEpidErr; - FfElement* xi = NULL; - PairingState* paring_state_ctx = NULL; - BigNum* e = NULL; - BigNum* one = NULL; - BigNum* q = NULL; - BigNum* six = NULL; - Ipp8u* scratch_buffer = NULL; - do { - IppStatus sts = ippStsNoErr; - IppsGFpState* Fq6 = NULL; - IppsGFpState* Fq2 = NULL; - IppsGFpState* Fq = NULL; - FiniteField Ffq2; - IppsGFpInfo info = {0}; - Fq2ElemDat Fq6IrrPolynomial[3 + 1] = {0}; - uint8_t one_str[] = {1}; - uint8_t six_str[] = {6}; - FqElemDat qDat = {0}; - int i = 0; - int j = 0; - int bufferSize = 0; - int bitSize = 0; - // validate inputs - if (!ga || !gb || !ff || !t || !ps) { - result = kEpidBadArgErr; - break; - } - if (!ga->ipp_ec || !gb->ipp_ec || !ff->ipp_ff) { - result = kEpidBadArgErr; - break; - } - // get Fq6, Fq2, Fq - sts = ippsGFpGetInfo(ff->ipp_ff, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq6 = (IppsGFpState*)info.pGroundGF; - sts = ippsGFpGetInfo(Fq6, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq2 = (IppsGFpState*)info.pGroundGF; - result = InitFiniteFieldFromIpp(Fq2, &Ffq2); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpGetInfo(Fq2, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq = (IppsGFpState*)info.pGroundGF; - // now get ref to modulus of Fq - sts = ippsGFpGetModulus(Fq, (Ipp32u*)&qDat); - BREAK_ON_IPP_ERROR(sts, result); - // extract xi from Fq6 irr poly - result = NewFfElement(&Ffq2, &xi); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpGetModulus(Fq6, (Ipp32u*)&Fq6IrrPolynomial[0]); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u const*)&Fq6IrrPolynomial[0], - sizeof(Fq6IrrPolynomial[0]) / sizeof(Ipp32u), - xi->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // first coefficent is -xi - sts = ippsGFpNeg(xi->ipp_ff_elem, xi->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - - paring_state_ctx = (PairingState*)SAFE_ALLOC(sizeof(PairingState)); - if (!paring_state_ctx) { - result = kEpidMemAllocErr; - break; - } - - // 1. Set param(pairing) = (param(G1), param(G2), param(GT), t, neg) - paring_state_ctx->ga = (EcGroup*)ga; - paring_state_ctx->gb = (EcGroup*)gb; - paring_state_ctx->ff = ff; - result = NewBigNum(sizeof(BigNumStr), &paring_state_ctx->t); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(t, sizeof(BigNumStr), paring_state_ctx->t); - BREAK_ON_EPID_ERROR(result); - paring_state_ctx->neg = neg; - result = InitFiniteFieldFromIpp(Fq6, &(paring_state_ctx->Fq6)); - BREAK_ON_EPID_ERROR(result); - result = InitFiniteFieldFromIpp(Fq2, &(paring_state_ctx->Fq2)); - BREAK_ON_EPID_ERROR(result); - result = InitFiniteFieldFromIpp(Fq, &(paring_state_ctx->Fq)); - BREAK_ON_EPID_ERROR(result); - // 2. Let g[0][0], ..., g[0][4], g[1][0], ..., g[1][4], g[2][0], ..., - // g[2][4] be 15 elements in Fq2. - for (i = 0; i < 3; i++) { - for (j = 0; j < 5; j++) { - result = NewFfElement(&Ffq2, &paring_state_ctx->g[i][j]); - BREAK_ON_EPID_ERROR(result); - } - } - // 3. Compute a big integer e = (q - 1)/6. - result = NewBigNum(sizeof(BigNumStr), &one); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(one_str, sizeof(one_str), one); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(sizeof(BigNumStr), &q); - BREAK_ON_EPID_ERROR(result); - sts = ippsSet_BN(IppsBigNumPOS, sizeof(qDat) / sizeof(Ipp32u), - (Ipp32u*)&qDat, q->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - result = NewBigNum(sizeof(BigNumStr), &e); - BREAK_ON_EPID_ERROR(result); - // q - 1 - sts = ippsSub_BN(q->ipp_bn, one->ipp_bn, e->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - result = NewBigNum(sizeof(BigNumStr), &six); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(six_str, sizeof(six_str), six); - BREAK_ON_EPID_ERROR(result); - // e = (q - 1)/6 - // reusing one as remainder here - sts = ippsDiv_BN(e->ipp_bn, six->ipp_bn, e->ipp_bn, one->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - // 4. Compute g[0][0] = Fq2.exp(xi, e). - sts = ippsRef_BN(0, &bitSize, 0, e->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpScratchBufferSize(1, bitSize, Fq2, &bufferSize); - BREAK_ON_IPP_ERROR(sts, result); - scratch_buffer = (Ipp8u*)SAFE_ALLOC(bufferSize); - if (!scratch_buffer) { - result = kEpidMemAllocErr; - break; - } - sts = - ippsGFpExp(xi->ipp_ff_elem, e->ipp_bn, - paring_state_ctx->g[0][0]->ipp_ff_elem, Fq2, scratch_buffer); - BREAK_ON_IPP_ERROR(sts, result); - // 5. For i = 0, ..., 4, compute - for (i = 0; i < 5; i++) { - // a. If i > 0, compute g[0][i] = Fq2.mul(g[0][i-1], g[0][0]). - if (i > 0) { - sts = ippsGFpMul(paring_state_ctx->g[0][i - 1]->ipp_ff_elem, - paring_state_ctx->g[0][0]->ipp_ff_elem, - paring_state_ctx->g[0][i]->ipp_ff_elem, Fq2); - } - // b. Compute g[1][i] = Fq2.conjugate(g[0][i]), - sts = ippsGFpConj(paring_state_ctx->g[0][i]->ipp_ff_elem, - paring_state_ctx->g[1][i]->ipp_ff_elem, Fq2); - // c. Compute g[1][i] = Fq2.mul(g[0][i], g[1][i]), - sts = ippsGFpMul(paring_state_ctx->g[0][i]->ipp_ff_elem, - paring_state_ctx->g[1][i]->ipp_ff_elem, - paring_state_ctx->g[1][i]->ipp_ff_elem, Fq2); - // d. Compute g[2][i] = Fq2.mul(g[0][i], g[1][i]). - sts = ippsGFpMul(paring_state_ctx->g[0][i]->ipp_ff_elem, - paring_state_ctx->g[1][i]->ipp_ff_elem, - paring_state_ctx->g[2][i]->ipp_ff_elem, Fq2); - } - // 6. Save g[0][0], ..., g[0][4], g[1][0], ..., g[1][4], g[2][0], ..., - // g[2][4] - // for the pairing operations. - *ps = paring_state_ctx; - result = kEpidNoErr; - } while (0); - SAFE_FREE(scratch_buffer) - DeleteBigNum(&six); - DeleteBigNum(&e); - DeleteBigNum(&q); - DeleteBigNum(&one); - DeleteFfElement(&xi); - if (kEpidNoErr != result) { - if (paring_state_ctx) { - int i = 0; - int j = 0; - for (i = 0; i < 3; i++) { - for (j = 0; j < 5; j++) { - DeleteFfElement(&paring_state_ctx->g[i][j]); - } - } - DeleteBigNum(&paring_state_ctx->t); - SAFE_FREE(paring_state_ctx); - } - } - return result; -} - -void DeletePairingState(PairingState** ps) { - if (!ps) { - return; - } - if (!*ps) { - return; - } - if (ps) { - if (*ps) { - int i = 0; - int j = 0; - for (i = 0; i < 3; i++) { - for (j = 0; j < 5; j++) { - DeleteFfElement(&(*ps)->g[i][j]); - } - } - DeleteBigNum(&(*ps)->t); - (*ps)->ga = NULL; - (*ps)->gb = NULL; - (*ps)->ff = NULL; - } - SAFE_FREE(*ps); - } -} - -EpidStatus Pairing(PairingState* ps, FfElement* d, EcPoint const* a, - EcPoint const* b) { - EpidStatus result = kEpidErr; - FfElement* ax = NULL; - FfElement* ay = NULL; - FfElement* bx = NULL; - FfElement* by = NULL; - FfElement* x = NULL; - FfElement* y = NULL; - FfElement* z = NULL; - FfElement* z2 = NULL; - FfElement* bx_ = NULL; - FfElement* by_ = NULL; - FfElement* f = NULL; - BigNum* s = NULL; - BigNum* two = NULL; - BigNum* six = NULL; - FfElement* neg_qy = NULL; - - do { - IppStatus sts = ippStsNoErr; - Ipp32u two_dat[] = {2}; - Ipp32u six_dat[] = {6}; - Ipp32u one_dat[] = {1}; - int s_ternary[sizeof(BigNumStr) * CHAR_BIT] = {0}; - int i = 0; - int n = 0; - // check parameters - if (!ps || !d || !a || !b) { - result = kEpidBadArgErr; - break; - } - if (!d->ipp_ff_elem || !a->ipp_ec_pt || !b->ipp_ec_pt || !ps->ff || - !ps->ff->ipp_ff || !ps->Fq.ipp_ff || !ps->Fq2.ipp_ff || !ps->t || - !ps->t->ipp_bn || !ps->ga || !ps->ga->ipp_ec || !ps->gb || - !ps->gb->ipp_ec) { - result = kEpidBadArgErr; - break; - } - // Let ax, ay be elements in Fq. Let bx, by, x, y, z, z2, bx', by' - // be elements in Fq2. Let f be a variable in GT. - result = NewFfElement(&ps->Fq, &ax); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &ay); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &bx); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &by); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &x); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &y); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &z); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &z2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &bx_); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &by_); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &f); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq2, &neg_qy); - BREAK_ON_EPID_ERROR(result); - - // 1. If neg = 0, compute integer s = 6t + 2, otherwise, compute - // s = 6t - 2 - result = NewBigNum(sizeof(BigNumStr), &s); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(sizeof(BigNumStr), &two); - BREAK_ON_EPID_ERROR(result); - sts = ippsSet_BN(IppsBigNumPOS, sizeof(two_dat) / sizeof(Ipp32u), two_dat, - two->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - result = NewBigNum(sizeof(BigNumStr), &six); - BREAK_ON_EPID_ERROR(result); - sts = ippsSet_BN(IppsBigNumPOS, sizeof(six_dat) / sizeof(Ipp32u), six_dat, - six->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsMul_BN(six->ipp_bn, ps->t->ipp_bn, s->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - if (ps->neg) { - sts = ippsSub_BN(s->ipp_bn, two->ipp_bn, s->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - } else { - sts = ippsAdd_BN(s->ipp_bn, two->ipp_bn, s->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - } - // 2. Let sn...s1s0 be the ternary representation of s, that is s = - // s0 + 2*s1 + ... + 2^n*sn, where si is in {-1, 0, 1}. - result = - Ternary(s_ternary, &n, sizeof(s_ternary) / sizeof(s_ternary[0]), s); - BREAK_ON_EPID_ERROR(result); - // 3. Set (ax, ay) = E(Fq).outputPoint(a) - sts = ippsGFpECGetPoint(a->ipp_ec_pt, ax->ipp_ff_elem, ay->ipp_ff_elem, - ps->ga->ipp_ec); - BREAK_ON_IPP_ERROR(sts, result); - // 4. Set (bx, by) = E(Fq2).outputPoint(b). - sts = ippsGFpECGetPoint(b->ipp_ec_pt, bx->ipp_ff_elem, by->ipp_ff_elem, - ps->gb->ipp_ec); - BREAK_ON_IPP_ERROR(sts, result); - // 5. Set X = bx, Y = by, Z = Z2 = 1. - sts = ippsGFpCpyElement(bx->ipp_ff_elem, x->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpCpyElement(by->ipp_ff_elem, y->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement(one_dat, sizeof(one_dat) / sizeof(Ipp32u), - z->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement(one_dat, sizeof(one_dat) / sizeof(Ipp32u), - z2->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 6. Set d = 1. - sts = ippsGFpSetElement(one_dat, sizeof(one_dat) / sizeof(Ipp32u), - d->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 7. For i = n-1, ..., 0, do the following: - for (i = n - 1; i >= 0; i--) { - // a. Set (f, x, y, z, z2) = tangent(ax, ay, x, y, z, z2), - result = Tangent(ps->ff, f, x, y, z, z2, ax, ay, x, y, z, z2); - BREAK_ON_EPID_ERROR(result); - // b. Set d = Fq12.square(d), - sts = ippsGFpMul(d->ipp_ff_elem, d->ipp_ff_elem, d->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // c. Set d = Fq12.mulSpecial(d, f), - result = MulSpecial(d, d, f, ps); - BREAK_ON_EPID_ERROR(result); - // d. If s[i] = -1 then - if (-1 == s_ternary[i]) { - // i. Set (f, x, y, z, z2) = line(ax, ay, x, y, z, z2, bx, - // -by), - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpNeg(by->ipp_ff_elem, neg_qy->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - result = Line(ps->ff, f, x, y, z, z2, ax, ay, x, y, z, z2, bx, neg_qy); - BREAK_ON_EPID_ERROR(result); - // ii. Set d = Fq12.mulSpecial(d, f). - result = MulSpecial(d, d, f, ps); - BREAK_ON_EPID_ERROR(result); - } - // e. If s[i] = 1 then - if (1 == s_ternary[i]) { - // i. Set (f, x, y, z, z2) = line(ax, ay, x, y, z, z2, bx, - // by), - result = Line(ps->ff, f, x, y, z, z2, ax, ay, x, y, z, z2, bx, by); - BREAK_ON_EPID_ERROR(result); - // ii. Set d = Fq12.mulSpecial(d, f). - result = MulSpecial(d, d, f, ps); - BREAK_ON_EPID_ERROR(result); - } - } - - // 8. if neg = true, - if (ps->neg) { - // a. Set Y = Fq2.negate(y), - sts = ippsGFpNeg(y->ipp_ff_elem, y->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // b. Set d = Fq12.conjugate(d). - sts = ippsGFpConj(d->ipp_ff_elem, d->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - } - // 9. Set (bx', by') = Pi-op(bx, by, 1). - result = PiOp(ps, bx_, by_, bx, by, 1); - BREAK_ON_EPID_ERROR(result); - // 10. Set (f, x, y, z, z2) = line(ax, ay, x, y, z, z2, bx', by'). - result = Line(ps->ff, f, x, y, z, z2, ax, ay, x, y, z, z2, bx_, by_); - BREAK_ON_EPID_ERROR(result); - // 11. Set d = Fq12.mulSpecial(d, f). - result = MulSpecial(d, d, f, ps); - BREAK_ON_EPID_ERROR(result); - // 12. Set (bx', by') = piOp(bx, by, 2). - result = PiOp(ps, bx_, by_, bx, by, 2); - BREAK_ON_EPID_ERROR(result); - // 13. Set by' = Fq2.negate(by'). - sts = ippsGFpNeg(by_->ipp_ff_elem, by_->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 14. Set (f, x, y, z, z2) = line(ax, ay, x, y, z, z2, bx', by'). - result = Line(ps->ff, f, x, y, z, z2, ax, ay, x, y, z, z2, bx_, by_); - BREAK_ON_EPID_ERROR(result); - // 15. Set d = Fq12.mulSpecial(d, f). - result = MulSpecial(d, d, f, ps); - BREAK_ON_EPID_ERROR(result); - // 16. Set d = finalExp(d). - result = FinalExp(ps, d, d); - BREAK_ON_EPID_ERROR(result); - // 17. Return d. - result = kEpidNoErr; - } while (0); - - DeleteFfElement(&ax); - DeleteFfElement(&ay); - DeleteFfElement(&bx); - DeleteFfElement(&by); - DeleteFfElement(&x); - DeleteFfElement(&y); - DeleteFfElement(&z); - DeleteFfElement(&z2); - DeleteFfElement(&bx_); - DeleteFfElement(&by_); - DeleteFfElement(&f); - DeleteFfElement(&neg_qy); - - DeleteBigNum(&s); - DeleteBigNum(&two); - DeleteBigNum(&six); - - return result; -} - -/* -d = finalExp(h) -Input: h (an element in GT) -Output: d (an element in GT) where d = GT.exp(h, (q^12-1)/p) -*/ -static EpidStatus FinalExp(PairingState* ps, FfElement* d, FfElement const* h) { - EpidStatus result = kEpidErr; - FfElement* f = NULL; - FfElement* f1 = NULL; - FfElement* f2 = NULL; - FfElement* f3 = NULL; - FfElement* ft1 = NULL; - FfElement* ft2 = NULL; - FfElement* ft3 = NULL; - FfElement* fp1 = NULL; - FfElement* fp2 = NULL; - FfElement* fp3 = NULL; - FfElement* y0 = NULL; - FfElement* y1 = NULL; - FfElement* y2 = NULL; - FfElement* y3 = NULL; - FfElement* y4 = NULL; - FfElement* y5 = NULL; - FfElement* y6 = NULL; - FfElement* t0 = NULL; - FfElement* t1 = NULL; - do { - IppStatus sts = ippStsNoErr; - // Check parameters - if (!ps || !d || !h) { - result = kEpidBadArgErr; - break; - } - if (!d->ipp_ff_elem || !h->ipp_ff_elem || !ps->ff || !ps->ff->ipp_ff || - !ps->t || !ps->t->ipp_bn) { - result = kEpidBadArgErr; - break; - } - // Let f, f1, f2, f3, ft1, ft2, ft3, fp1, fp2, fp3, y0, y1, y2, - // y3, y4, y5, y6, t0, t1 be temporary variables in GT. All the - // following operations are computed in Fq12 unless explicitly - // specified. - result = NewFfElement(ps->ff, &f); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &f1); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &f2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &f3); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &ft1); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &ft2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &ft3); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &fp1); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &fp2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &fp3); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &y0); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &y1); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &y2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &y3); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &y4); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &y5); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &y6); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &t0); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &t1); - BREAK_ON_EPID_ERROR(result); - // 1. Set f1 = Fq12.conjugate(h). - sts = ippsGFpConj(h->ipp_ff_elem, f1->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 2. Set f2 = Fq12.inverse(h). - sts = ippsGFpInv(h->ipp_ff_elem, f2->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 3. Set f = f1 * f2. - sts = ippsGFpMul(f1->ipp_ff_elem, f2->ipp_ff_elem, f->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 4. Set f3 = frobeniusOp(f, 2). - result = FrobeniusOp(ps, f3, f, 2); - BREAK_ON_EPID_ERROR(result); - // 5. Set f = f3 * f. - sts = ippsGFpMul(f3->ipp_ff_elem, f->ipp_ff_elem, f->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 6. Set ft1 = Fq12.expCyclotomic (f, t). - result = ExpCyclotomic(ps, ft1, f, ps->t); - BREAK_ON_EPID_ERROR(result); - // 7. If neg = true, ft1 = Fq12.conjugate(ft1). - if (ps->neg) { - sts = ippsGFpConj(ft1->ipp_ff_elem, ft1->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - } - // 8. Set ft2 = Fq12.expCyclotomic (ft1, t). - result = ExpCyclotomic(ps, ft2, ft1, ps->t); - BREAK_ON_EPID_ERROR(result); - // 9. If neg = true, ft2 = Fq12.conjugate(ft2). - if (ps->neg) { - sts = ippsGFpConj(ft2->ipp_ff_elem, ft2->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - } - // 10. Set ft3 = Fq12.expCyclotomic (ft2, t). - result = ExpCyclotomic(ps, ft3, ft2, ps->t); - BREAK_ON_EPID_ERROR(result); - // 11. If neg = true, ft3 = Fq12.conjugate(ft3). - if (ps->neg) { - sts = ippsGFpConj(ft3->ipp_ff_elem, ft3->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - } - // 12. Set fp1 = frobeniusOp(f, 1). - result = FrobeniusOp(ps, fp1, f, 1); - BREAK_ON_EPID_ERROR(result); - // 13. Set fp2 = frobeniusOp(f, 2). - result = FrobeniusOp(ps, fp2, f, 2); - BREAK_ON_EPID_ERROR(result); - // 14. Set fp3 = frobeniusOp(f, 3). - result = FrobeniusOp(ps, fp3, f, 3); - BREAK_ON_EPID_ERROR(result); - // 15. Set y0 = fp1 * fp2 * fp3. - sts = ippsGFpMul(fp1->ipp_ff_elem, fp2->ipp_ff_elem, y0->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(y0->ipp_ff_elem, fp3->ipp_ff_elem, y0->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 16. Set y1 = Fq12.conjugate(f). - sts = ippsGFpConj(f->ipp_ff_elem, y1->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 17. Set y2 = frobeniusOp(ft2, 2). - result = FrobeniusOp(ps, y2, ft2, 2); - BREAK_ON_EPID_ERROR(result); - // 18. Set y3 = frobeniusOp(ft1, 1). - result = FrobeniusOp(ps, y3, ft1, 1); - BREAK_ON_EPID_ERROR(result); - // 19. Set y3 = Fq12.conjugate(y3). - sts = ippsGFpConj(y3->ipp_ff_elem, y3->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 20. Set y4 = frobeniusOp(ft2, 1). - result = FrobeniusOp(ps, y4, ft2, 1); - BREAK_ON_EPID_ERROR(result); - // 21. Set y4 = y4 * ft1. - sts = ippsGFpMul(y4->ipp_ff_elem, ft1->ipp_ff_elem, y4->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 22. Set y4 = Fq12.conjugate(y4). - sts = ippsGFpConj(y4->ipp_ff_elem, y4->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 23. Set y5 = Fq12.conjugate(ft2). - sts = ippsGFpConj(ft2->ipp_ff_elem, y5->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 24. Set y6 = frobeniusOp(ft3, 1). - result = FrobeniusOp(ps, y6, ft3, 1); - BREAK_ON_EPID_ERROR(result); - // 25. Set y6 = y6 * ft3. - sts = ippsGFpMul(y6->ipp_ff_elem, ft3->ipp_ff_elem, y6->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 26. Set y6 = Fq12.conjugate(y6). - sts = ippsGFpConj(y6->ipp_ff_elem, y6->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 27. Set t0 = Fq12.squareCyclotomic(y6). - result = SquareCyclotomic(ps, t0, y6); - BREAK_ON_EPID_ERROR(result); - // 28. Set t0 = t0 * y4 * y5. - sts = ippsGFpMul(t0->ipp_ff_elem, y4->ipp_ff_elem, t0->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(t0->ipp_ff_elem, y5->ipp_ff_elem, t0->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 29. Set t1 = y3 * y5 * t0. - sts = ippsGFpMul(y3->ipp_ff_elem, y5->ipp_ff_elem, t1->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(t1->ipp_ff_elem, t0->ipp_ff_elem, t1->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 30. Set t0 = t0 * y2. - sts = ippsGFpMul(t0->ipp_ff_elem, y2->ipp_ff_elem, t0->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 31. Set t1 = Fq12.squareCyclotomic(t1). - result = SquareCyclotomic(ps, t1, t1); - BREAK_ON_EPID_ERROR(result); - // 32. Set t1 = t1 * t0. - sts = ippsGFpMul(t1->ipp_ff_elem, t0->ipp_ff_elem, t1->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 33. Set t1 = Fq12.squareCyclotomic(t1). - result = SquareCyclotomic(ps, t1, t1); - BREAK_ON_EPID_ERROR(result); - // 34. Set t0 = t1 * y1. - sts = ippsGFpMul(t1->ipp_ff_elem, y1->ipp_ff_elem, t0->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 35. Set t1 = t1 * y0. - sts = ippsGFpMul(t1->ipp_ff_elem, y0->ipp_ff_elem, t1->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 36. Set t0 = Fq12.squareCyclotomic(t0). - result = SquareCyclotomic(ps, t0, t0); - BREAK_ON_EPID_ERROR(result); - // 37. Set d = t1 * t0. - sts = ippsGFpMul(t1->ipp_ff_elem, t0->ipp_ff_elem, d->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 38. Return d. - result = kEpidNoErr; - } while (0); - - DeleteFfElement(&f); - DeleteFfElement(&f1); - DeleteFfElement(&f2); - DeleteFfElement(&f3); - DeleteFfElement(&ft1); - DeleteFfElement(&ft2); - DeleteFfElement(&ft3); - DeleteFfElement(&fp1); - DeleteFfElement(&fp2); - DeleteFfElement(&fp3); - DeleteFfElement(&y0); - DeleteFfElement(&y1); - DeleteFfElement(&y2); - DeleteFfElement(&y3); - DeleteFfElement(&y4); - DeleteFfElement(&y5); - DeleteFfElement(&y6); - DeleteFfElement(&t0); - DeleteFfElement(&t1); - - return result; -} - -/* -(x', y') = piOp(x, y, e) -Input: x, y (elements in Fq2), e (an integer of value 1 or 2) -Output: x', y' (elements in Fq2) -*/ -static EpidStatus PiOp(PairingState* ps, FfElement* x_out, FfElement* y_out, - FfElement const* x, FfElement const* y, const int e) { - IppStatus sts = ippStsNoErr; - IppsGFpState* Fq2 = 0; - IppsGFpState* Fq6 = 0; - FiniteField* Fq12 = 0; - IppsGFpInfo info = {0}; - // check parameters - if (!ps || !x_out || !y_out || !x || !y) { - return kEpidBadArgErr; - } - if (e < 1 || e > 3) { - return kEpidBadArgErr; - } - Fq12 = ps->ff; - // get Fq6, Fq2 - sts = ippsGFpGetInfo(Fq12->ipp_ff, &info); - RETURN_ON_IPP_ERROR(sts); - Fq6 = (IppsGFpState*)info.pGroundGF; - sts = ippsGFpGetInfo(Fq6, &info); - RETURN_ON_IPP_ERROR(sts); - Fq2 = (IppsGFpState*)info.pGroundGF; - // 1. Set x' = x and y' = y. - sts = ippsGFpCpyElement(x->ipp_ff_elem, x_out->ipp_ff_elem, Fq2); - RETURN_ON_IPP_ERROR(sts); - sts = ippsGFpCpyElement(y->ipp_ff_elem, y_out->ipp_ff_elem, Fq2); - RETURN_ON_IPP_ERROR(sts); - if (1 == e) { - // 2. If e = 1, - // a. Compute x' = Fq2.conjugate(x'). - sts = ippsGFpConj(x_out->ipp_ff_elem, x_out->ipp_ff_elem, Fq2); - RETURN_ON_IPP_ERROR(sts); - // b. Compute y' = Fq2.conjugate(y'). - sts = ippsGFpConj(y_out->ipp_ff_elem, y_out->ipp_ff_elem, Fq2); - RETURN_ON_IPP_ERROR(sts); - } - // 3. Compute x' = Fq2.mul(x', g[e-1][1]). - sts = ippsGFpMul(x_out->ipp_ff_elem, ps->g[e - 1][1]->ipp_ff_elem, - x_out->ipp_ff_elem, Fq2); - RETURN_ON_IPP_ERROR(sts); - // 4. Compute y' = Fq2.mul(y', g[e-1][2]). - sts = ippsGFpMul(y_out->ipp_ff_elem, ps->g[e - 1][2]->ipp_ff_elem, - y_out->ipp_ff_elem, Fq2); - RETURN_ON_IPP_ERROR(sts); - // 5. Return (x', y'). - return kEpidNoErr; -} - -/* -d = frobeniusOp(a, e) -Input: a (an element in GT), e (an integer of value 1, 2, or 3) -Output: d (an element in GT) such that d = GT.exp(a, qe) - -*/ -static EpidStatus FrobeniusOp(PairingState* ps, FfElement* d_out, - FfElement const* a, const int e) { - EpidStatus result = kEpidErr; - FfElement* d[6] = {0}; - size_t i = 0; - Fq12ElemDat a_dat = {0}; - Fq12ElemDat d_dat = {0}; - do { - IppStatus sts = ippStsNoErr; - // check parameters - if (!ps || !d_out || !a) { - return kEpidBadArgErr; - } - if (e < 1 || e > 3 || !d_out->ipp_ff_elem || !a->ipp_ff_elem || !ps->ff || - !ps->ff->ipp_ff || !ps->Fq2.ipp_ff) { - return kEpidBadArgErr; - } - - for (i = 0; i < sizeof(d) / sizeof(FfElement*); i++) { - result = NewFfElement(&ps->Fq2, &d[i]); - BREAK_ON_EPID_ERROR(result); - } - - // 1. Let a = ((a[0], a[2], a[4]), (a[1], a[3], a[5])). - sts = ippsGFpGetElement(a->ipp_ff_elem, (Ipp32u*)&a_dat, - sizeof(a_dat) / sizeof(Ipp32u), ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 2. Let d = ((d[0], d[2], d[4]), (d[1], d[3], d[5])). - // 3. For i = 0, ..., 5, - // a. set d[i] = a[i]. - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[0].x[0], - sizeof(a_dat.x[0].x[0]) / sizeof(Ipp32u), - d[0]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[0].x[1], - sizeof(a_dat.x[0].x[1]) / sizeof(Ipp32u), - d[2]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[0].x[2], - sizeof(a_dat.x[0].x[2]) / sizeof(Ipp32u), - d[4]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[1].x[0], - sizeof(a_dat.x[1].x[0]) / sizeof(Ipp32u), - d[1]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[1].x[1], - sizeof(a_dat.x[1].x[1]) / sizeof(Ipp32u), - d[3]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[1].x[2], - sizeof(a_dat.x[1].x[2]) / sizeof(Ipp32u), - d[5]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - - // b. If e = 1 or 3, set d[i] = Fq2.conjugate(d[i]). - if (1 == e || 3 == e) { - for (i = 0; i < sizeof(d) / sizeof(FfElement*); i++) { - sts = ippsGFpConj(d[i]->ipp_ff_elem, d[i]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - } - } - // 4. For i = 1, ..., 5, compute d[i] = Fq2.mul(d[i], g[e-1][i-1]). - for (i = 1; i < sizeof(d) / sizeof(FfElement*); i++) { - sts = ippsGFpMul(d[i]->ipp_ff_elem, ps->g[e - 1][i - 1]->ipp_ff_elem, - d[i]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - } - // 5. Return d. - sts = ippsGFpGetElement(d[0]->ipp_ff_elem, (Ipp32u*)&d_dat.x[0].x[0], - sizeof(d_dat.x[0].x[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(d[2]->ipp_ff_elem, (Ipp32u*)&d_dat.x[0].x[1], - sizeof(d_dat.x[0].x[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(d[4]->ipp_ff_elem, (Ipp32u*)&d_dat.x[0].x[2], - sizeof(d_dat.x[0].x[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(d[1]->ipp_ff_elem, (Ipp32u*)&d_dat.x[1].x[0], - sizeof(d_dat.x[1].x[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(d[3]->ipp_ff_elem, (Ipp32u*)&d_dat.x[1].x[1], - sizeof(d_dat.x[1].x[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(d[5]->ipp_ff_elem, (Ipp32u*)&d_dat.x[1].x[2], - sizeof(d_dat.x[1].x[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&d_dat, sizeof(d_dat) / sizeof(Ipp32u), - d_out->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - result = kEpidNoErr; - } while (0); - - EpidZeroMemory(&a_dat, sizeof(a_dat)); - EpidZeroMemory(&d_dat, sizeof(d_dat)); - for (i = 0; i < sizeof(d) / sizeof(FfElement*); i++) { - DeleteFfElement(&d[i]); - } - - return result; -} - -/* -(f, X', Y', Z', Z2') = line(Px, Py, X, Y, Z, Z2, Qx, Qy) -Input: Px, Py (elements in Fq), X, Y, Z, Z2, Qx, Qy (elements in Fq2) -Output: f (an element in GT), X', Y', Z', Z2' (elements in Fq2) -*/ -static EpidStatus Line(FiniteField* gt, FfElement* f, FfElement* x_out, - FfElement* y_out, FfElement* z_out, FfElement* z2_out, - FfElement const* px, FfElement const* py, - FfElement const* x, FfElement const* y, - FfElement const* z, FfElement const* z2, - FfElement const* qx, FfElement const* qy) { - EpidStatus result = kEpidNotImpl; - FfElement* t0 = NULL; - FfElement* t1 = NULL; - FfElement* t2 = NULL; - FfElement* t3 = NULL; - FfElement* t4 = NULL; - FfElement* t5 = NULL; - FfElement* t6 = NULL; - FfElement* t7 = NULL; - FfElement* t8 = NULL; - FfElement* t9 = NULL; - FfElement* t10 = NULL; - FfElement* t = NULL; - Fq12ElemDat fDat = {0}; - do { - IppStatus sts = ippStsNoErr; - IppsGFpState* Fq2 = 0; - IppsGFpState* Fq6 = 0; - IppsGFpInfo info = {0}; - FiniteField Ffq2; - - // check parameters - if (!f || !x_out || !y_out || !z_out || !z2_out || !px || !py || !x || !y || - !z || !z2 || !qx || !qy || !gt) { - result = kEpidBadArgErr; - break; - } - if (!f->ipp_ff_elem || !x_out->ipp_ff_elem || !y_out->ipp_ff_elem || - !z_out->ipp_ff_elem || !z2_out->ipp_ff_elem || !px->ipp_ff_elem || - !py->ipp_ff_elem || !x->ipp_ff_elem || !y->ipp_ff_elem || - !z->ipp_ff_elem || !z2->ipp_ff_elem || !qx->ipp_ff_elem || - !qy->ipp_ff_elem || !gt->ipp_ff) { - result = kEpidBadArgErr; - break; - } - // get Fq6, Fq2 - sts = ippsGFpGetInfo(gt->ipp_ff, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq6 = (IppsGFpState*)info.pGroundGF; - sts = ippsGFpGetInfo(Fq6, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq2 = (IppsGFpState*)info.pGroundGF; - result = InitFiniteFieldFromIpp(Fq2, &Ffq2); - BREAK_ON_EPID_ERROR(result); - // Let t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10 be temporary - // elements in Fq2. All the following operations are computed in - // Fq2 unless explicitly specified. - result = NewFfElement(&Ffq2, &t0); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t1); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t2); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t3); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t4); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t5); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t6); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t7); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t8); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t9); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t10); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(&Ffq2, &t); - if (kEpidNoErr != result) { - break; - } - // 1. Set t0 = Qx * Z2. - sts = - ippsGFpMul(qx->ipp_ff_elem, z2_out->ipp_ff_elem, t0->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 2. Set t1 = (Qy + Z)^2 - Qy * Qy - Z2. - sts = ippsGFpAdd(qy->ipp_ff_elem, z->ipp_ff_elem, t1->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(t1->ipp_ff_elem, t1->ipp_ff_elem, t1->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(qy->ipp_ff_elem, qy->ipp_ff_elem, t->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t1->ipp_ff_elem, t->ipp_ff_elem, t1->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t1->ipp_ff_elem, z2->ipp_ff_elem, t1->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 3. Set t1 = t1 * Z2. - sts = - ippsGFpMul(t1->ipp_ff_elem, z2_out->ipp_ff_elem, t1->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 4. Set t2 = t0 - X. - sts = ippsGFpSub(t0->ipp_ff_elem, x->ipp_ff_elem, t2->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 5. Set t3 = t2 * t2. - sts = ippsGFpMul(t2->ipp_ff_elem, t2->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 6. Set t4 = 4 * t3. - sts = ippsGFpAdd(t3->ipp_ff_elem, t3->ipp_ff_elem, t4->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(t4->ipp_ff_elem, t4->ipp_ff_elem, t4->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 7. Set t5 = t4 * t2. - sts = ippsGFpMul(t4->ipp_ff_elem, t2->ipp_ff_elem, t5->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 8. Set t6 = t1 - Y - Y. - sts = ippsGFpSub(t1->ipp_ff_elem, y->ipp_ff_elem, t6->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t6->ipp_ff_elem, y->ipp_ff_elem, t6->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 9. Set t9 = t6 * Qx. - sts = ippsGFpMul(t6->ipp_ff_elem, qx->ipp_ff_elem, t9->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 10. Set t7 = X * t4. - sts = ippsGFpMul(x->ipp_ff_elem, t4->ipp_ff_elem, t7->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 11. X' = t6 * t6 - t5 - t7 - t7. - sts = ippsGFpMul(t6->ipp_ff_elem, t6->ipp_ff_elem, x_out->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(x_out->ipp_ff_elem, t5->ipp_ff_elem, x_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(x_out->ipp_ff_elem, t7->ipp_ff_elem, x_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(x_out->ipp_ff_elem, t7->ipp_ff_elem, x_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 12. Set Z' = (Z + t2)^2 - Z2 - t3. - sts = ippsGFpAdd(z->ipp_ff_elem, t2->ipp_ff_elem, z_out->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(z_out->ipp_ff_elem, z_out->ipp_ff_elem, z_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(z_out->ipp_ff_elem, z2->ipp_ff_elem, z_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(z_out->ipp_ff_elem, t3->ipp_ff_elem, z_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 13. Set t10 = Qy + Z'. - sts = - ippsGFpAdd(qy->ipp_ff_elem, z_out->ipp_ff_elem, t10->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 14. Set t8 = (t7 - X') * t6. - sts = ippsGFpSub(t7->ipp_ff_elem, x_out->ipp_ff_elem, t8->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(t8->ipp_ff_elem, t6->ipp_ff_elem, t8->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 15. Set t0 = 2 * Y * t5. - sts = ippsGFpMul(y->ipp_ff_elem, t5->ipp_ff_elem, t0->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(t0->ipp_ff_elem, t0->ipp_ff_elem, t0->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 16. Set Y' = t8 - t0. - sts = ippsGFpSub(t8->ipp_ff_elem, t0->ipp_ff_elem, y_out->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 17. Set Z2' = Z' * Z'. - sts = ippsGFpMul(z_out->ipp_ff_elem, z_out->ipp_ff_elem, - z2_out->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 18. Set t10 = t10 * t10 - Qy * Qy - Z2'. - sts = ippsGFpMul(t10->ipp_ff_elem, t10->ipp_ff_elem, t10->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t10->ipp_ff_elem, t->ipp_ff_elem, t10->ipp_ff_elem, - Fq2); // t still Qy*Qy - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t10->ipp_ff_elem, z2_out->ipp_ff_elem, t10->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 19. Set t9 = t9 + t9 - t10. - sts = ippsGFpAdd(t9->ipp_ff_elem, t9->ipp_ff_elem, t9->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t9->ipp_ff_elem, t10->ipp_ff_elem, t9->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 20. Set t10 = Fq2.mul(Z', Py). - sts = ippsGFpMul_GFpE(z_out->ipp_ff_elem, py->ipp_ff_elem, t10->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 21. Set t10 = t10 + t10. - sts = ippsGFpAdd(t10->ipp_ff_elem, t10->ipp_ff_elem, t10->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 22. Set t6 = -t6. - sts = ippsGFpNeg(t6->ipp_ff_elem, t6->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 23. Set t1 = Fq2.mul(t6, Px). - sts = - ippsGFpMul_GFpE(t6->ipp_ff_elem, px->ipp_ff_elem, t1->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 24. Set t1 = t1 + t1. - sts = ippsGFpAdd(t1->ipp_ff_elem, t1->ipp_ff_elem, t1->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 25. Set f = ((t10, 0, 0), (t1, t9, 0)). - sts = ippsGFpGetElement(t10->ipp_ff_elem, (Ipp32u*)&fDat.x[0].x[0], - sizeof(fDat.x[0].x[0]) / sizeof(Ipp32u), Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(t1->ipp_ff_elem, (Ipp32u*)&fDat.x[1].x[0], - sizeof(fDat.x[1].x[0]) / sizeof(Ipp32u), Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(t9->ipp_ff_elem, (Ipp32u*)&fDat.x[1].x[1], - sizeof(fDat.x[1].x[1]) / sizeof(Ipp32u), Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&fDat, sizeof(fDat) / sizeof(Ipp32u), - f->ipp_ff_elem, gt->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 26. Return (f, X', Y', Z', Z2'). - } while (0); - EpidZeroMemory(&fDat, sizeof(fDat)); - DeleteFfElement(&t); - DeleteFfElement(&t10); - DeleteFfElement(&t9); - DeleteFfElement(&t8); - DeleteFfElement(&t7); - DeleteFfElement(&t6); - DeleteFfElement(&t5); - DeleteFfElement(&t4); - DeleteFfElement(&t3); - DeleteFfElement(&t2); - DeleteFfElement(&t1); - DeleteFfElement(&t0); - - return (result); -} - -/* -(f, X', Y', Z', Z2') = tangent(Px, Py, X, Y, Z, Z2) -Input: Px, Py (elements in Fq), X, Y, Z, Z2 (elements in Fq2) -Output: f (an element in GT), X', Y', Z', Z2' (elements in Fq2) -Steps: -*/ -static EpidStatus Tangent(FiniteField* gt, FfElement* f, FfElement* x_out, - FfElement* y_out, FfElement* z_out, FfElement* z2_out, - FfElement const* px, FfElement const* py, - FfElement const* x, FfElement const* y, - FfElement const* z, FfElement const* z2) { - EpidStatus result = kEpidErr; - FfElement* t0 = NULL; - FfElement* t1 = NULL; - FfElement* t2 = NULL; - FfElement* t3 = NULL; - FfElement* t4 = NULL; - FfElement* t5 = NULL; - FfElement* t6 = NULL; - Fq12ElemDat fDat = {0}; - do { - IppStatus sts = ippStsNoErr; - IppsGFpState* Fq2 = NULL; - IppsGFpState* Fq6 = NULL; - FiniteField Ffq2; - IppsGFpInfo info = {0}; - int i = 0; - // validate input - if (!gt || !f || !x_out || !y_out || !z_out || !z2_out || !px || !py || - !x || !y || !z || !z2) { - result = kEpidBadArgErr; - break; - } - if (!gt->ipp_ff || !f->ipp_ff_elem || !x_out->ipp_ff_elem || - !y_out->ipp_ff_elem || !z_out->ipp_ff_elem || !z2_out->ipp_ff_elem || - !px->ipp_ff_elem || !py->ipp_ff_elem || !x->ipp_ff_elem || - !y->ipp_ff_elem || !z->ipp_ff_elem || !z2->ipp_ff_elem) { - result = kEpidBadArgErr; - break; - } - // get Fq2, Fq6 - sts = ippsGFpGetInfo(gt->ipp_ff, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq6 = (IppsGFpState*)info.pGroundGF; - sts = ippsGFpGetInfo(Fq6, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq2 = (IppsGFpState*)info.pGroundGF; - result = InitFiniteFieldFromIpp(Fq2, &Ffq2); - BREAK_ON_EPID_ERROR(result); - // Let t0, t1, t2, t3, t4, t5, t6 be elements in Fq2. All the following - // operations are computed in Fq2 unless explicitly specified. - // 1. Set t0 = X * X. - result = NewFfElement(&Ffq2, &t0); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpMul(x->ipp_ff_elem, x->ipp_ff_elem, t0->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 2. Set t1 = Y * Y. - result = NewFfElement(&Ffq2, &t1); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpMul(y->ipp_ff_elem, y->ipp_ff_elem, t1->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 3. Set t2 = t1 * t1. - result = NewFfElement(&Ffq2, &t2); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpMul(t1->ipp_ff_elem, t1->ipp_ff_elem, t2->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 4. Set t3 = (t1 + X)^2 - t0 - t2. - result = NewFfElement(&Ffq2, &t3); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpAdd(t1->ipp_ff_elem, x->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(t3->ipp_ff_elem, t3->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t3->ipp_ff_elem, t0->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t3->ipp_ff_elem, t2->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 5. Set t3 = t3 + t3. - sts = ippsGFpAdd(t3->ipp_ff_elem, t3->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 6. Set t4 = 3 * t0. - result = NewFfElement(&Ffq2, &t4); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpAdd(t0->ipp_ff_elem, t0->ipp_ff_elem, t4->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(t4->ipp_ff_elem, t0->ipp_ff_elem, t4->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 7. Set t6 = X + t4. - result = NewFfElement(&Ffq2, &t6); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpAdd(x->ipp_ff_elem, t4->ipp_ff_elem, t6->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 8. Set t5 = t4 * t4. - result = NewFfElement(&Ffq2, &t5); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpMul(t4->ipp_ff_elem, t4->ipp_ff_elem, t5->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 9. Set X' = t5 - t3 - t3. - sts = ippsGFpSub(t5->ipp_ff_elem, t3->ipp_ff_elem, x_out->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(x_out->ipp_ff_elem, t3->ipp_ff_elem, x_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 10.Set Z' = (Y + Z)^2 - t1 - Z2. - sts = ippsGFpAdd(y->ipp_ff_elem, z->ipp_ff_elem, z_out->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(z_out->ipp_ff_elem, z_out->ipp_ff_elem, z_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(z_out->ipp_ff_elem, t1->ipp_ff_elem, z_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(z_out->ipp_ff_elem, z2->ipp_ff_elem, z_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 11.Set Y' = (t3 - X') * t4 - 8 * t2. - sts = ippsGFpSub(t3->ipp_ff_elem, x_out->ipp_ff_elem, y_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpMul(y_out->ipp_ff_elem, t4->ipp_ff_elem, y_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - for (i = 0; i < 8; i++) { - sts = ippsGFpSub(y_out->ipp_ff_elem, t2->ipp_ff_elem, y_out->ipp_ff_elem, - Fq2); - BREAK_ON_IPP_ERROR(sts, result); - } - // 12.Set t3 = -2 * (t4 * Z2). - sts = ippsGFpMul(t4->ipp_ff_elem, z2->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(t3->ipp_ff_elem, t3->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpNeg(t3->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 13.Set t3 = Fq2.mul(t3, Px). - sts = - ippsGFpMul_GFpE(t3->ipp_ff_elem, px->ipp_ff_elem, t3->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 14.Set t6 = t6 * t6 - t0 - t5 - 4 * t1. - sts = ippsGFpMul(t6->ipp_ff_elem, t6->ipp_ff_elem, t6->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t6->ipp_ff_elem, t0->ipp_ff_elem, t6->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(t6->ipp_ff_elem, t5->ipp_ff_elem, t6->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - for (i = 0; i < 4; i++) { - sts = ippsGFpSub(t6->ipp_ff_elem, t1->ipp_ff_elem, t6->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - } - // 15.Set t0 = 2 * (Z' * Z2). - sts = ippsGFpMul(z_out->ipp_ff_elem, z2->ipp_ff_elem, t0->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(t0->ipp_ff_elem, t0->ipp_ff_elem, t0->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 16.Set t0 = Fq2.mul(t0, Py). - sts = - ippsGFpMul_GFpE(t0->ipp_ff_elem, py->ipp_ff_elem, t0->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 17.Set f = ((t0, 0, 0), (t3, t6, 0)). - sts = ippsGFpGetElement(t0->ipp_ff_elem, (Ipp32u*)&fDat.x[0].x[0], - sizeof(fDat.x[0].x[0]) / sizeof(Ipp32u), Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(t3->ipp_ff_elem, (Ipp32u*)&fDat.x[1].x[0], - sizeof(fDat.x[1].x[0]) / sizeof(Ipp32u), Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(t6->ipp_ff_elem, (Ipp32u*)&fDat.x[1].x[1], - sizeof(fDat.x[1].x[1]) / sizeof(Ipp32u), Fq2); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&fDat, sizeof(fDat) / sizeof(Ipp32u), - f->ipp_ff_elem, gt->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 18.Set Z2' = Z' * Z'. - sts = ippsGFpMul(z_out->ipp_ff_elem, z_out->ipp_ff_elem, - z2_out->ipp_ff_elem, Fq2); - BREAK_ON_IPP_ERROR(sts, result); - // 19.Return (f, X', Y', Z', Z2'). - } while (0); - EpidZeroMemory(&fDat, sizeof(fDat)); - DeleteFfElement(&t6); - DeleteFfElement(&t5); - DeleteFfElement(&t4); - DeleteFfElement(&t3); - DeleteFfElement(&t2); - DeleteFfElement(&t1); - DeleteFfElement(&t0); - return result; -} - -/* -(sn...s1s0) = ternary(s) -Input: s (big integer) -Output: sn...s1s0 (ternary representation of s) -*/ -static EpidStatus Ternary(int* s, int* n, int max_elements, BigNum const* x) { - /* - Let xn...x1x0 be binary representation of s. - Let flag be a Boolean variable. - 1. Set flag = false. - 2. For i = 0, ..., n, do the following: - a. If xi = 1 - i. If flag = true, set si = 0, - ii. Else - 1. If xi+1 = 1, set si = -1 and set flag = true, - 2. Else si = 1. - b. Else - i. If flag = true, set si = 1 and set flag = false, - ii. Else set si = 0. - 3. If flag is true - a. Set n = n+1, - b. Set sn = 1. - 4. Return sn...s1s0. - */ - EpidStatus result = kEpidErr; - - do { - IppStatus sts = ippStsNoErr; - int flag = 0; - int i = 0; - int num_bits = 0; - Ipp32u* data = 0; - - // check parameters - if (!s || !n || !x || !x->ipp_bn) { - result = kEpidBadArgErr; - break; - } - - sts = ippsRef_BN(0, &num_bits, &data, x->ipp_bn); - if (ippStsNoErr != sts) { - result = kEpidMathErr; - break; - } - - if (num_bits + 1 > max_elements) { - // not enough room for ternary representation - result = kEpidBadArgErr; - break; - } - - // Let xn...x1x0 be binary representation of s. Let flag be a - // Boolean variable. - *n = num_bits - 1; - // 1. Set flag = false. - flag = 0; - // 2. For i = 0, ..., n, do the following: - for (i = 0; i < num_bits; i++) { - if (1 == Bit(data, i)) { - // a. If x[i] = 1 - if (flag) { - // i. If flag = true, set si = 0, - s[i] = 0; - } else { - // ii. Else - if ((i < num_bits - 2) && Bit(data, i + 1)) { - // 1. If x[i+1] = 1, set s[i] = -1 and set flag = true, - s[i] = -1; - flag = 1; - } else { - // 2. Else s[i] = 1. - s[i] = 1; - } - } - } else { - // b. Else - if (flag) { - // i. If flag = true, set s[i] = 1 and set flag = false, - s[i] = 1; - flag = 0; - } else { - // ii. Else set s[i] = 0. - s[i] = 0; - } - } - } - // 3. If flag is true - if (flag) { - // a. Set n = n+1, - *n = *n + 1; - // b. Set s[n] = 1. - s[*n] = 1; - } - // 4. Return sn...s1s0. - result = kEpidNoErr; - } while (0); - - return (result); -} - -static int Bit(Ipp32u const* num, Ipp32u bit_index) { - return 0 != (num[bit_index >> 5] & (1 << (bit_index & 0x1F))); -} - -/* -e = Fq2.mulXi(a) -Input: a (an element in Fq2) -Output: e (an element in Fq2) where e = a * xi - -\note THIS IMPLEMENTATION ASSUMES xi[0] = 2, xi[1] = 1, beta = -1 - -\note only should work with Fq2 - -*/ -static EpidStatus MulXiFast(FfElement* e, FfElement const* a, - PairingState* ps) { - EpidStatus retvalue = kEpidNotImpl; - FfElement* a0 = NULL; - FfElement* a1 = NULL; - FfElement* e0 = NULL; - FfElement* e1 = NULL; - Fq2ElemDat a_dat = {0}; - Fq2ElemDat e_dat = {0}; - - do { - IppStatus sts = ippStsNoErr; - // check parameters - if (!e || !a || !ps) { - retvalue = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(retvalue); - } - if (!e->ipp_ff_elem || !a->ipp_ff_elem || !ps->Fq.ipp_ff || - !ps->Fq2.ipp_ff) { - retvalue = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(retvalue); - } - // All the following arithmetic operations are in ps->Fq. - // 1. Let a = (a[0], a[1]), xi = (xi[0], xi[1]), and e = (e[0], e[1]). - retvalue = NewFfElement(&(ps->Fq), &a0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq), &a1); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq), &e0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq), &e1); - BREAK_ON_EPID_ERROR(retvalue); - - sts = ippsGFpGetElement(a->ipp_ff_elem, (Ipp32u*)&a_dat, - sizeof(a_dat) / sizeof(Ipp32u), ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[0], - sizeof(a_dat.x[0]) / sizeof(Ipp32u), - a0->ipp_ff_elem, ps->Fq.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[1], - sizeof(a_dat.x[1]) / sizeof(Ipp32u), - a1->ipp_ff_elem, ps->Fq.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - - // 4. If xi[0] = 2, xi[1] = 1, beta = -1, then e[0] and e[1] can - // be computed as - // a. e[0] = a[0] + a[0] - a[1]. - sts = ippsGFpAdd(a0->ipp_ff_elem, a0->ipp_ff_elem, e0->ipp_ff_elem, - ps->Fq.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSub(e0->ipp_ff_elem, a1->ipp_ff_elem, e0->ipp_ff_elem, - ps->Fq.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // b. e[1] = a[0] + a[1] + a[1]. - sts = ippsGFpAdd(a0->ipp_ff_elem, a1->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpAdd(e1->ipp_ff_elem, a1->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 5. Return e = (e[0], e[1]). - sts = ippsGFpGetElement(e0->ipp_ff_elem, (Ipp32u*)&e_dat.x[0], - sizeof(e_dat.x[0]) / sizeof(Ipp32u), ps->Fq.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpGetElement(e1->ipp_ff_elem, (Ipp32u*)&e_dat.x[1], - sizeof(e_dat.x[1]) / sizeof(Ipp32u), ps->Fq.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&e_dat, sizeof(e_dat) / sizeof(Ipp32u), - e->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - retvalue = kEpidNoErr; - } while (0); - - EpidZeroMemory(&a_dat, sizeof(a_dat)); - EpidZeroMemory(&e_dat, sizeof(e_dat)); - DeleteFfElement(&a0); - DeleteFfElement(&a1); - DeleteFfElement(&e0); - DeleteFfElement(&e1); - - return (retvalue); -} - -/* -e = Fq6.MulV(a) -Input: a (element in Fq6) -Output: e (an element in Fq6) where e = a * V, where V = 0 * v2 + 1 * v + 0 - -\note only should work with Fq6 -*/ -static EpidStatus MulV(FfElement* e, FfElement* a, PairingState* ps) { - EpidStatus retvalue = kEpidNotImpl; - FfElement* a2 = NULL; - FfElement* e0 = NULL; - FfElement* e1 = NULL; - FfElement* e2 = NULL; - Fq6ElemDat a_dat = {0}; - Fq6ElemDat e_dat = {0}; - do { - IppStatus sts = ippStsNoErr; - // check parameters - if (!e || !a || !ps) { - retvalue = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(retvalue); - } - if (!e->ipp_ff_elem || !a->ipp_ff_elem || !ps->Fq2.ipp_ff || - !ps->Fq6.ipp_ff) { - retvalue = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(retvalue); - } - // 1. Let a = (a[0], a[1], a[2]) and e = (e[0], e[1], e[2]). - retvalue = NewFfElement(&(ps->Fq2), &a2); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &e0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &e1); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &e2); - BREAK_ON_EPID_ERROR(retvalue); - - sts = ippsGFpGetElement(a->ipp_ff_elem, (Ipp32u*)&a_dat, - sizeof(a_dat) / sizeof(Ipp32u), ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[2], - sizeof(a_dat.x[2]) / sizeof(Ipp32u), - a2->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 2. e[0] = Fq2.mulXi(a[2]). - retvalue = MulXiFast(e0, a2, ps); - BREAK_ON_EPID_ERROR(retvalue); - // 3. e[1] = a[0]. - e_dat.x[1] = a_dat.x[0]; - // 4. e[2] = a[1]. - e_dat.x[2] = a_dat.x[1]; - - sts = - ippsGFpGetElement(e0->ipp_ff_elem, (Ipp32u*)&e_dat.x[0], - sizeof(e_dat.x[0]) / sizeof(Ipp32u), ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&e_dat, sizeof(e_dat) / sizeof(Ipp32u), - e->ipp_ff_elem, ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - retvalue = kEpidNoErr; - } while (0); - - EpidZeroMemory(&a_dat, sizeof(a_dat)); - EpidZeroMemory(&e_dat, sizeof(e_dat)); - DeleteFfElement(&a2); - DeleteFfElement(&e0); - DeleteFfElement(&e1); - DeleteFfElement(&e2); - - return (retvalue); -} - -/* -helper for MulSpecial, special args form of Fq6Mul - -special args form of Fq6.mul(a,b[0],b[1]) -Input: a (elements in Fq6), b[0], b[1] (elements in Fq2) -Output: e (an element in Fq6) where e = a * b, and b = b[1] * v + b[0] - -\note assumes a,e are Fq6 elements and b0,b1 are fq2 elements -*/ -static EpidStatus Fq6MulGFpE2(FfElement* e, FfElement* a, FfElement* b0, - FfElement* b1, PairingState* ps) { - EpidStatus retvalue = kEpidNotImpl; - FfElement* t0 = NULL; - FfElement* t1 = NULL; - FfElement* t2 = NULL; - FfElement* t3 = NULL; - FfElement* t4 = NULL; - FfElement* a0 = NULL; - FfElement* a1 = NULL; - FfElement* a2 = NULL; - FfElement* e0 = NULL; - FfElement* e1 = NULL; - FfElement* e2 = NULL; - Fq6ElemDat a_dat = {0}; - Fq6ElemDat e_dat = {0}; - do { - IppStatus sts = ippStsNoErr; - // check parameters - if (!e || !a || !b0 || !b1 || !ps) { - retvalue = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(retvalue); - } - if (!e->ipp_ff_elem || !a->ipp_ff_elem || !b0->ipp_ff_elem || - !b1->ipp_ff_elem || !ps->Fq2.ipp_ff || !ps->Fq6.ipp_ff) { - retvalue = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(retvalue); - } - - // Let t0, t1, t3, t4 be temporary variables in Fq2. All the - // following arithmetic operations are in Fq2. - retvalue = NewFfElement(&(ps->Fq2), &t0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &t1); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &t2); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &t3); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &t4); - BREAK_ON_EPID_ERROR(retvalue); - // 1. Let a = (a[0], a[1], a[2]) and e = (e[0], e[1], e[2]). - retvalue = NewFfElement(&(ps->Fq2), &a0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &a1); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &a2); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &e0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &e1); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &e2); - BREAK_ON_EPID_ERROR(retvalue); - - sts = ippsGFpGetElement(a->ipp_ff_elem, (Ipp32u*)&a_dat, - sizeof(a_dat) / sizeof(Ipp32u), ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[0], - sizeof(a_dat.x[0]) / sizeof(Ipp32u), - a0->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[1], - sizeof(a_dat.x[1]) / sizeof(Ipp32u), - a1->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[2], - sizeof(a_dat.x[2]) / sizeof(Ipp32u), - a2->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 2. t0 = a[0] * b[0]. - sts = ippsGFpMul(a0->ipp_ff_elem, b0->ipp_ff_elem, t0->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 3. t1 = a[1] * b[1]. - sts = ippsGFpMul(a1->ipp_ff_elem, b1->ipp_ff_elem, t1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 4. t3 = a[1] + a[2]. - sts = ippsGFpAdd(a1->ipp_ff_elem, a2->ipp_ff_elem, t3->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 5. t3 = t3 * b[1]. - sts = ippsGFpMul(t3->ipp_ff_elem, b1->ipp_ff_elem, t3->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 6. t3 = t3 - t1. - sts = ippsGFpSub(t3->ipp_ff_elem, t1->ipp_ff_elem, t3->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 7. e[0] = Fq2.mulXi(t3) + t0. - retvalue = MulXiFast(e0, t3, ps); - BREAK_ON_EPID_ERROR(retvalue); - sts = ippsGFpAdd(e0->ipp_ff_elem, t0->ipp_ff_elem, e0->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 8. t3 = a[0] + a[1]. - sts = ippsGFpAdd(a0->ipp_ff_elem, a1->ipp_ff_elem, t3->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 9. t4 = b[0] + b[1]. - sts = ippsGFpAdd(b0->ipp_ff_elem, b1->ipp_ff_elem, t4->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 10. t3 = t3 * t4. - sts = ippsGFpMul(t3->ipp_ff_elem, t4->ipp_ff_elem, t3->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 11. e[1] = t3 - t0 - t1. - sts = ippsGFpSub(t3->ipp_ff_elem, t0->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSub(e1->ipp_ff_elem, t1->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 12. t3 = a[2] * b[0]. - sts = ippsGFpMul(a2->ipp_ff_elem, b0->ipp_ff_elem, t3->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 13. e[2] = t3 + t1. - sts = ippsGFpAdd(t3->ipp_ff_elem, t1->ipp_ff_elem, e2->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 14. Return e. - sts = - ippsGFpGetElement(e0->ipp_ff_elem, (Ipp32u*)&e_dat.x[0], - sizeof(e_dat.x[0]) / sizeof(Ipp32u), ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = - ippsGFpGetElement(e1->ipp_ff_elem, (Ipp32u*)&e_dat.x[1], - sizeof(e_dat.x[1]) / sizeof(Ipp32u), ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = - ippsGFpGetElement(e2->ipp_ff_elem, (Ipp32u*)&e_dat.x[2], - sizeof(e_dat.x[2]) / sizeof(Ipp32u), ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&e_dat, sizeof(e_dat) / sizeof(Ipp32u), - e->ipp_ff_elem, ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - retvalue = kEpidNoErr; - } while (0); - - EpidZeroMemory(&a_dat, sizeof(a_dat)); - EpidZeroMemory(&e_dat, sizeof(e_dat)); - DeleteFfElement(&t0); - DeleteFfElement(&t1); - DeleteFfElement(&t2); - DeleteFfElement(&t3); - DeleteFfElement(&t4); - DeleteFfElement(&a0); - DeleteFfElement(&a1); - DeleteFfElement(&a2); - DeleteFfElement(&e0); - DeleteFfElement(&e1); - DeleteFfElement(&e2); - - return (retvalue); -} - -/* -e = Fq12.MulSpecial(a, b) -Input: a, b (elements in Fq12) where b = ((b[0], b[2], b[4]), (b[1], b[3], -b[5])) and b[2] = b[4] = b[5] = 0 -Output: e (an element in Fq12) where e = a * b -*/ -static EpidStatus MulSpecial(FfElement* e, FfElement const* a, - FfElement const* b, PairingState* ps) { - EpidStatus retvalue = kEpidNotImpl; - FfElement* t0 = NULL; - FfElement* t1 = NULL; - FfElement* t2 = NULL; - FfElement* a0 = NULL; - FfElement* a1 = NULL; - FfElement* b0 = NULL; - FfElement* b1 = NULL; - FfElement* b3 = NULL; - FfElement* e0 = NULL; - FfElement* e1 = NULL; - FfElement* b0plusb1 = NULL; - Fq12ElemDat a_dat = {0}; - Fq12ElemDat b_dat = {0}; - Fq12ElemDat e_dat = {0}; - do { - IppStatus sts = ippStsNoErr; - - // check parameters - if (!e || !a || !b || !ps) { - retvalue = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(retvalue); - } - if (!e->ipp_ff_elem || !a->ipp_ff_elem || !b->ipp_ff_elem || - !ps->Fq2.ipp_ff || !ps->Fq6.ipp_ff || !ps->ff || !ps->ff->ipp_ff) { - retvalue = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(retvalue); - } - - // Let t0, t1, t2 be temporary variables in ps->Fq6. - retvalue = NewFfElement(&(ps->Fq6), &t0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq6), &t1); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq6), &t2); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &b0plusb1); - BREAK_ON_EPID_ERROR(retvalue); - - // 1. Let a = (a[0], a[1]) and e = (e[0], e[1]). - retvalue = NewFfElement(&(ps->Fq6), &a0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq6), &a1); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq6), &e0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq6), &e1); - BREAK_ON_EPID_ERROR(retvalue); - - sts = ippsGFpGetElement(a->ipp_ff_elem, (Ipp32u*)&a_dat, - sizeof(a_dat) / sizeof(Ipp32u), ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[0], - sizeof(a_dat.x[0]) / sizeof(Ipp32u), - a0->ipp_ff_elem, ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&a_dat.x[1], - sizeof(a_dat.x[1]) / sizeof(Ipp32u), - a1->ipp_ff_elem, ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - - // 2. Let b = ((b[0], b[2], b[4]), (b[1], b[3], b[5])) where - // b[0], ..., b[5] are elements in ps->Fq2 and b[2] = b[4] = b[5] - // = 0. - retvalue = NewFfElement(&(ps->Fq2), &b0); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &b1); - BREAK_ON_EPID_ERROR(retvalue); - retvalue = NewFfElement(&(ps->Fq2), &b3); - BREAK_ON_EPID_ERROR(retvalue); - - sts = ippsGFpGetElement(b->ipp_ff_elem, (Ipp32u*)&b_dat, - sizeof(b_dat) / sizeof(Ipp32u), ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&b_dat.x[0].x[0], - sizeof(a_dat.x[0].x[0]) / sizeof(Ipp32u), - b0->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&b_dat.x[1].x[0], - sizeof(a_dat.x[1].x[0]) / sizeof(Ipp32u), - b1->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&b_dat.x[1].x[1], - sizeof(a_dat.x[1].x[1]) / sizeof(Ipp32u), - b3->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - - // 3. t0 = ps->Fq6.mul(a[0], b[0]). - sts = ippsGFpMul_GFpE(a0->ipp_ff_elem, b0->ipp_ff_elem, t0->ipp_ff_elem, - ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 4. t1 = ps->Fq6.mul(a[1], b[1], b[3]). - retvalue = Fq6MulGFpE2(t1, a1, b1, b3, ps); - BREAK_ON_EPID_ERROR(retvalue); - // 5. e[0] = ps->Fq6.MulV(t1). - retvalue = MulV(e0, t1, ps); - BREAK_ON_EPID_ERROR(retvalue); - // 6. e[0] = ps->Fq6.add(t0, e[0]). - sts = ippsGFpAdd(t0->ipp_ff_elem, e0->ipp_ff_elem, e0->ipp_ff_elem, - ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 7. t2 = ps->Fq6.add(a[0], a[1]). - sts = ippsGFpAdd(a0->ipp_ff_elem, a1->ipp_ff_elem, t2->ipp_ff_elem, - ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 8. e[1] = ps->Fq6.mul(t2, b[0] + b[1], b[3]). - sts = ippsGFpAdd(b0->ipp_ff_elem, b1->ipp_ff_elem, b0plusb1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - retvalue = Fq6MulGFpE2(e1, t2, b0plusb1, b3, ps); - BREAK_ON_EPID_ERROR(retvalue); - // 9. e[1] = ps->Fq6.subtract(e[1], t0). - sts = ippsGFpSub(e1->ipp_ff_elem, t0->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 10. e[1] = ps->Fq6.subtract(e[1], t1). - sts = ippsGFpSub(e1->ipp_ff_elem, t1->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - // 11. Return e. - sts = - ippsGFpGetElement(e0->ipp_ff_elem, (Ipp32u*)&e_dat.x[0], - sizeof(e_dat.x[0]) / sizeof(Ipp32u), ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = - ippsGFpGetElement(e1->ipp_ff_elem, (Ipp32u*)&e_dat.x[1], - sizeof(e_dat.x[1]) / sizeof(Ipp32u), ps->Fq6.ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - sts = ippsGFpSetElement((Ipp32u*)&e_dat, sizeof(e_dat) / sizeof(Ipp32u), - e->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, retvalue); - retvalue = kEpidNoErr; - } while (0); - EpidZeroMemory(&a_dat, sizeof(a_dat)); - EpidZeroMemory(&b_dat, sizeof(b_dat)); - EpidZeroMemory(&e_dat, sizeof(e_dat)); - DeleteFfElement(&t0); - DeleteFfElement(&t1); - DeleteFfElement(&t2); - DeleteFfElement(&a0); - DeleteFfElement(&a1); - DeleteFfElement(&b0); - DeleteFfElement(&b1); - DeleteFfElement(&b3); - DeleteFfElement(&e0); - DeleteFfElement(&e1); - DeleteFfElement(&b0plusb1); - - return (retvalue); -} - -/* - (e0, e1) = Fq12.SquareForFq4(a0, a1) - Input: a0, a1 (elements in Fq2) - Output: e0, e1 (elements in Fq2) where e = a * a in Fq4 -*/ -static EpidStatus SquareForFq4(PairingState* ps, FfElement* e0, FfElement* e1, - FfElement const* a0, FfElement const* a1) { - EpidStatus result = kEpidErr; - FfElement* t0 = NULL; - FfElement* t1 = NULL; - FfElement* xi = NULL; - Fq2ElemStr Fq6IrrPolynomial[3 + 1] = {0}; - - // check parameters - if (!e0 || !e1 || !a0 || !a1 || !ps) return kEpidBadArgErr; - - if (!e0->ipp_ff_elem || !e1->ipp_ff_elem || !a0->ipp_ff_elem || - !a1->ipp_ff_elem || !ps->ff || !ps->ff->ipp_ff || !ps->Fq2.ipp_ff || - !ps->Fq6.ipp_ff) - return kEpidBadArgErr; - - do { - IppStatus sts = ippStsNoErr; - - // extract xi from Fq6 irr poly - result = NewFfElement(&(ps->Fq2), &xi); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpGetModulus(ps->Fq6.ipp_ff, (Ipp32u*)&Fq6IrrPolynomial[0]); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u const*)&Fq6IrrPolynomial[0], - sizeof(Fq6IrrPolynomial[0]) / sizeof(Ipp32u), - xi->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // first coefficent is -xi - sts = ippsGFpNeg(xi->ipp_ff_elem, xi->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - - // Let t0, t1 be temporary variables in Fq2. All the following - // operations are computed in Fq2. - result = NewFfElement(&(ps->Fq2), &t0); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&(ps->Fq2), &t1); - BREAK_ON_EPID_ERROR(result); - - // 1. Set t0 = a0 * a0. - sts = ippsGFpMul(a0->ipp_ff_elem, a0->ipp_ff_elem, t0->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 2. Set t1 = a1 * a1. - sts = ippsGFpMul(a1->ipp_ff_elem, a1->ipp_ff_elem, t1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 3. Set e0 = t1 * xi. - sts = ippsGFpMul(t1->ipp_ff_elem, xi->ipp_ff_elem, e0->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 4. Set e0 = e0 + t0. - sts = ippsGFpAdd(e0->ipp_ff_elem, t0->ipp_ff_elem, e0->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 5. Set e1 = a0 + a1. - sts = ippsGFpAdd(a0->ipp_ff_elem, a1->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 6. Set e1 = e1 * e1 - t0 - t1. - sts = ippsGFpMul(e1->ipp_ff_elem, e1->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(e1->ipp_ff_elem, t0->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(e1->ipp_ff_elem, t1->ipp_ff_elem, e1->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 7. Return (e0, e1). - result = kEpidNoErr; - } while (0); - - EpidZeroMemory(Fq6IrrPolynomial, sizeof(Fq6IrrPolynomial)); - DeleteFfElement(&t0); - DeleteFfElement(&t1); - DeleteFfElement(&xi); - - return (result); -} - -/* - e = Fq12.squareCyclotomic(a) - Input: a (an element in Fq12) - Output: e (an element in Fq12) where e = a * a -*/ -static EpidStatus SquareCyclotomic(PairingState* ps, FfElement* e_out, - FfElement const* a_in) { - EpidStatus result = kEpidErr; - FfElement* t00 = NULL; - FfElement* t01 = NULL; - FfElement* t02 = NULL; - FfElement* t10 = NULL; - FfElement* t11 = NULL; - FfElement* t12 = NULL; - - FfElement* a[6] = {0}; - FfElement* e[6] = {0}; - - FfElement* xi = NULL; - int i = 0; - Fq12ElemStr a_str = {0}; - Fq12ElemStr e_str = {0}; - Fq2ElemStr Fq6IrrPolynomial[3 + 1] = {0}; - - // check parameters - if (!e_out || !a_in || !ps) return kEpidBadArgErr; - - if (!e_out->ipp_ff_elem || !a_in->ipp_ff_elem || !ps->ff || !ps->ff->ipp_ff || - !ps->Fq.ipp_ff || !ps->Fq2.ipp_ff || !ps->Fq6.ipp_ff) - return kEpidBadArgErr; - - do { - IppStatus sts = ippStsNoErr; - - // extract xi from Fq6 irr poly - result = NewFfElement(&(ps->Fq2), &xi); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpGetModulus(ps->Fq6.ipp_ff, (Ipp32u*)&Fq6IrrPolynomial); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u const*)&Fq6IrrPolynomial[0], - sizeof(Fq6IrrPolynomial[0]) / sizeof(Ipp32u), - xi->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // first coefficent is -xi - sts = ippsGFpNeg(xi->ipp_ff_elem, xi->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - - // Let t00, t01, t02, t10, t11, t12 be temporary variables in - // Fq2. All the following operations are computed in Fq2 unless - // specified otherwise. - result = NewFfElement(&(ps->Fq2), &t00); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&(ps->Fq2), &t01); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&(ps->Fq2), &t02); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&(ps->Fq2), &t10); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&(ps->Fq2), &t11); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&(ps->Fq2), &t12); - BREAK_ON_EPID_ERROR(result); - for (i = 0; i < 6; i++) { - result = NewFfElement(&(ps->Fq2), &a[i]); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&(ps->Fq2), &e[i]); - BREAK_ON_EPID_ERROR(result); - } - BREAK_ON_EPID_ERROR(result); - // 1. Let a = ((a[0], a[2], a[4]), (a[1], a[3], a[5])). - sts = ippsGFpGetElement(a_in->ipp_ff_elem, (Ipp32u*)&a_str, - sizeof(a_str) / sizeof(Ipp32u), ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_str.a[0].a[0], - sizeof(a_str.a[0].a[0]) / sizeof(Ipp32u), - a[0]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_str.a[0].a[1], - sizeof(a_str.a[0].a[1]) / sizeof(Ipp32u), - a[2]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_str.a[0].a[2], - sizeof(a_str.a[0].a[2]) / sizeof(Ipp32u), - a[4]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_str.a[1].a[0], - sizeof(a_str.a[1].a[0]) / sizeof(Ipp32u), - a[1]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_str.a[1].a[1], - sizeof(a_str.a[1].a[1]) / sizeof(Ipp32u), - a[3]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&a_str.a[1].a[2], - sizeof(a_str.a[1].a[2]) / sizeof(Ipp32u), - a[5]->ipp_ff_elem, ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 2. Let e = ((e[0], e[2], e[4]), (e[1], e[3], e[5])). - - // 3. (t00, t11) = Fq12.SquareForFq4(a[0], a[3]). - result = SquareForFq4(ps, t00, t11, a[0], a[3]); - BREAK_ON_EPID_ERROR(result); - // 4. (t01, t12) = Fq12.SquareForFq4(a[1], a[4]). - result = SquareForFq4(ps, t01, t12, a[1], a[4]); - BREAK_ON_EPID_ERROR(result); - // 5. (t02, t10) = Fq12.SquareForFq4(a[2], a[5]). - result = SquareForFq4(ps, t02, t10, a[2], a[5]); - BREAK_ON_EPID_ERROR(result); - // 6. Set t10 = t10 * xi. - sts = ippsGFpMul(t10->ipp_ff_elem, xi->ipp_ff_elem, t10->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 7. Set e[0] = 3 * t00 - 2 * a[0]. - sts = ippsGFpAdd(t00->ipp_ff_elem, t00->ipp_ff_elem, e[0]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[0]->ipp_ff_elem, t00->ipp_ff_elem, e[0]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(e[0]->ipp_ff_elem, a[0]->ipp_ff_elem, e[0]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(e[0]->ipp_ff_elem, a[0]->ipp_ff_elem, e[0]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 8. Set e[2] = 3 * t01 - 2 * a[2]. - sts = ippsGFpAdd(t01->ipp_ff_elem, t01->ipp_ff_elem, e[2]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[2]->ipp_ff_elem, t01->ipp_ff_elem, e[2]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(e[2]->ipp_ff_elem, a[2]->ipp_ff_elem, e[2]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(e[2]->ipp_ff_elem, a[2]->ipp_ff_elem, e[2]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 9. Set e[4] = 3 * t02 - 2 * a[4]. - sts = ippsGFpAdd(t02->ipp_ff_elem, t02->ipp_ff_elem, e[4]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[4]->ipp_ff_elem, t02->ipp_ff_elem, e[4]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(e[4]->ipp_ff_elem, a[4]->ipp_ff_elem, e[4]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSub(e[4]->ipp_ff_elem, a[4]->ipp_ff_elem, e[4]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 10. Set e[1] = 3 * t10 + 2 * a[1]. - sts = ippsGFpAdd(t10->ipp_ff_elem, t10->ipp_ff_elem, e[1]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[1]->ipp_ff_elem, t10->ipp_ff_elem, e[1]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[1]->ipp_ff_elem, a[1]->ipp_ff_elem, e[1]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[1]->ipp_ff_elem, a[1]->ipp_ff_elem, e[1]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 11. Set e[3] = 3 * t11 + 2 * a[3]. - sts = ippsGFpAdd(t11->ipp_ff_elem, t11->ipp_ff_elem, e[3]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[3]->ipp_ff_elem, t11->ipp_ff_elem, e[3]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[3]->ipp_ff_elem, a[3]->ipp_ff_elem, e[3]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[3]->ipp_ff_elem, a[3]->ipp_ff_elem, e[3]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 12. Set e[5] = 3 * t12 + 2 * a[5]. - sts = ippsGFpAdd(t12->ipp_ff_elem, t12->ipp_ff_elem, e[5]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[5]->ipp_ff_elem, t12->ipp_ff_elem, e[5]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[5]->ipp_ff_elem, a[5]->ipp_ff_elem, e[5]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpAdd(e[5]->ipp_ff_elem, a[5]->ipp_ff_elem, e[5]->ipp_ff_elem, - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 13. Return e. - sts = ippsGFpGetElement(e[0]->ipp_ff_elem, (Ipp32u*)&e_str.a[0].a[0], - sizeof(e_str.a[0].a[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(e[2]->ipp_ff_elem, (Ipp32u*)&e_str.a[0].a[1], - sizeof(e_str.a[0].a[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(e[4]->ipp_ff_elem, (Ipp32u*)&e_str.a[0].a[2], - sizeof(e_str.a[0].a[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(e[1]->ipp_ff_elem, (Ipp32u*)&e_str.a[1].a[0], - sizeof(e_str.a[0].a[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(e[3]->ipp_ff_elem, (Ipp32u*)&e_str.a[1].a[1], - sizeof(e_str.a[0].a[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpGetElement(e[5]->ipp_ff_elem, (Ipp32u*)&e_str.a[1].a[2], - sizeof(e_str.a[0].a[0]) / sizeof(Ipp32u), - ps->Fq2.ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpSetElement((Ipp32u*)&e_str, sizeof(e_str) / sizeof(Ipp32u), - e_out->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - result = kEpidNoErr; - } while (0); - - EpidZeroMemory(&a_str, sizeof(a_str)); - EpidZeroMemory(&e_str, sizeof(e_str)); - EpidZeroMemory(Fq6IrrPolynomial, sizeof(Fq6IrrPolynomial)); - DeleteFfElement(&t00); - DeleteFfElement(&t01); - DeleteFfElement(&t02); - DeleteFfElement(&t10); - DeleteFfElement(&t11); - DeleteFfElement(&t12); - - for (i = 0; i < 6; i++) { - DeleteFfElement(&a[i]); - DeleteFfElement(&e[i]); - } - - DeleteFfElement(&xi); - - return (result); -} - -/* - e = Fq12.expCyclotomic(a, b) - Input: a (an element in Fq12), b (a non-negative integer) - Output: e (an element in Fq12) where e = a^b - Steps: - - 2. Set e = a. - 3. For i = n-1, ..., 0, do the following: - e = Fq12.squareCyclotomic(e, e), - If bi = 1, compute e = Fq12.mul(e, a). - 4. Return e. -*/ -static EpidStatus ExpCyclotomic(PairingState* ps, FfElement* e, - FfElement const* a, BigNum const* b) { - EpidStatus result = kEpidErr; - - // check parameters - if (!e || !a || !b || !ps) return kEpidBadArgErr; - - if (!e->ipp_ff_elem || !a->ipp_ff_elem || !ps->Fq.ipp_ff || !ps->Fq2.ipp_ff || - !b->ipp_bn) - return kEpidBadArgErr; - - do { - IppStatus sts = ippStsNoErr; - int num_bits = 0; - Ipp32u* b_str = 0; - int i = 0; - - // 1. Let bn...b1b0 be the binary representation of b. - sts = ippsRef_BN(0, &num_bits, &b_str, b->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - // 2. Set e = a. - sts = ippsGFpCpyElement(a->ipp_ff_elem, e->ipp_ff_elem, ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - // 3. For i = n-1, ..., 0, do the following: - for (i = num_bits - 2; i >= 0; i--) { - // e = Fq12.squareCyclotomic(e, e), - result = SquareCyclotomic(ps, e, e); - BREAK_ON_EPID_ERROR(result); - // If bi = 1, compute e = Fq12.mul(e, a). - if (1 == Bit(b_str, i)) { - sts = ippsGFpMul(e->ipp_ff_elem, a->ipp_ff_elem, e->ipp_ff_elem, - ps->ff->ipp_ff); - BREAK_ON_IPP_ERROR(sts, result); - } - // 4. Return e. - } - result = kEpidNoErr; - } while (0); - - return (result); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/printutils.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/printutils.c deleted file mode 100644 index d1b1e81f71..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/printutils.c +++ /dev/null @@ -1,604 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Print helper implementation. - */ -#ifndef EPID_ENABLE_DEBUG_PRINT -#define EPID_ENABLE_DEBUG_PRINT -#endif - -#include "epid/common/math/printutils.h" - -#include -#include - -#include "ext/ipp/include/ippcp.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/math/src/ecgroup-internal.h" -#include "epid/common/math/src/finitefield-internal.h" -#include "epid/common/src/memory.h" - -/// Allowed number of characters printed in one line -#define WIDTH 49 - -/// Amount of identation added in the beginning of each line -#define INDENT 2 - -/// Number of charaters used to represent one byte. For example, "ab" or "05". -#define BYTE_LENGTH 2 - -/// Separator -#define SEPARATOR (" ") - -/// Make configured number of identation -#define MAKE_INDENT() \ - { \ - uint8_t ind = 0; \ - for (ind = 0; ind < INDENT; ind++) { \ - PRINT(" "); \ - } \ - } - -/// Print to specified stream -#define PRINT(...) fprintf(stdout, __VA_ARGS__) - -static int PrintBuf(void const* buf, size_t size) { - size_t curr_column = 0; - size_t i = 0; - if (!buf || size == 0) { - return -1; - } - for (i = 0; i < size; i++) { - if (curr_column == 0) { - MAKE_INDENT(); - curr_column += INDENT; - } - if (BYTE_LENGTH != PRINT("%.2x", ((unsigned char const*)buf)[i])) { - return -1; - } - curr_column += BYTE_LENGTH; - if (i < size - 1) { - if ((curr_column + BYTE_LENGTH + strlen(SEPARATOR)) > WIDTH) { - PRINT("\n"); - curr_column = 0; - } else { - PRINT("%s", SEPARATOR); - curr_column += (uint8_t)strlen(SEPARATOR); - } - } - } - PRINT("\n"); - return 0; -} - -void PrintBigNum(BigNum const* big_num, char const* var_name) { - IppStatus sts = ippStsNoErr; - unsigned char* buf = NULL; - int ipp_word_buf_size; - if (!var_name) { - var_name = ""; - } - PRINT("%s (BigNum):\n", var_name); - if (!big_num) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (!big_num->ipp_bn) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - sts = ippsGetSize_BN(big_num->ipp_bn, &ipp_word_buf_size); - if (ippStsNoErr != sts) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - do { - buf = SAFE_ALLOC(ipp_word_buf_size * sizeof(Ipp32u)); - if (!buf) { - MAKE_INDENT(); - PRINT("\n"); - break; - } - sts = ippsGetOctString_BN((Ipp8u*)buf, ipp_word_buf_size * sizeof(Ipp32u), - big_num->ipp_bn); - if (ippStsNoErr != sts) { - MAKE_INDENT(); - PRINT("\n"); - break; - } - if (0 != PrintBuf((const void*)buf, ipp_word_buf_size * sizeof(Ipp32u))) { - MAKE_INDENT(); - PRINT("\n"); - break; - } - } while (0); - - SAFE_FREE(buf); -} - -void PrintFfElement(FiniteField const* ff, FfElement const* ff_element, - char const* var_name, PrintUtilFormat format) { - IppStatus sts; - uint8_t ff_element_str[sizeof(Fq12ElemStr)]; - int ipp_ff_element_size; - if (!var_name) { - var_name = ""; - } - if (!ff_element || !ff) { - PRINT("%s (FfElement):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (!ff_element->ipp_ff_elem || !ff->ipp_ff || - (format != kPrintUtilUnannotated && format != kPrintUtilAnnotated)) { - PRINT("%s (FfElement):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - return; - } - - // get the data - ipp_ff_element_size = ff_element->info.elementLen * sizeof(Ipp32u); - sts = ippsGFpGetElementOctString(ff_element->ipp_ff_elem, - (Ipp8u*)&ff_element_str, ipp_ff_element_size, - ff->ipp_ff); - if (ippStsNoErr != sts) { - PRINT("%s (FfElement):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - return; - } - - if (ipp_ff_element_size == sizeof(FqElemStr)) { - PrintFqElemStr((const FqElemStr*)&ff_element_str, var_name); - } else if (ipp_ff_element_size == sizeof(FpElemStr)) { - PrintFpElemStr((const FpElemStr*)&ff_element_str, var_name); - } else if (ipp_ff_element_size == sizeof(Fq2ElemStr)) { - PrintFq2ElemStr((const Fq2ElemStr*)&ff_element_str, var_name, format); - } else if (ipp_ff_element_size == sizeof(Fq6ElemStr)) { - PrintFq6ElemStr((const Fq6ElemStr*)&ff_element_str, var_name, format); - } else if (ipp_ff_element_size == sizeof(Fq6ElemStr)) { - PrintFq12ElemStr((const Fq12ElemStr*)&ff_element_str, var_name, format); - } else if (ipp_ff_element_size == sizeof(GtElemStr)) { - PrintGtElemStr((const GtElemStr*)&ff_element_str, var_name, format); - } else { - PRINT("%s (FfElement):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - } -} - -void PrintEcPoint(EcGroup const* g, EcPoint const* ec_point, - char const* var_name, PrintUtilFormat format) { - FiniteField fp; - FfElement* fp_x = NULL; - FfElement* fp_y = NULL; - uint8_t ec_point_str[sizeof(G2ElemStr)]; - if (!var_name) { - var_name = ""; - } - if (!ec_point || !g) { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (!ec_point->ipp_ec_pt || !g->ipp_ec) { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - return; - } - do { - IppStatus sts = ippStsNoErr; - int ipp_half_strlen; - // get finite field - sts = ippsGFpECGet(g->ipp_ec, (const IppsGFpState**)&(fp.ipp_ff), 0, 0, 0, - 0, 0, 0, 0, 0); - if (ippStsNoErr != sts) { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - break; - } - - // create element X - if (kEpidNoErr != NewFfElement(&fp, &fp_x)) { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - break; - } - // create element Y - if (kEpidNoErr != NewFfElement(&fp, &fp_y)) { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - break; - } - - ipp_half_strlen = fp_x->info.elementLen * sizeof(Ipp32u); - - // get elements from point - sts = ippsGFpECGetPoint(ec_point->ipp_ec_pt, fp_x->ipp_ff_elem, - fp_y->ipp_ff_elem, g->ipp_ec); - // check return codes - if (ippStsNoErr != sts) { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - break; - } - - // get element X data - sts = ippsGFpGetElementOctString(fp_x->ipp_ff_elem, (Ipp8u*)&ec_point_str, - ipp_half_strlen, fp.ipp_ff); - // check return codes - if (ippStsNoErr != sts) { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - break; - } - // get element Y data - sts = ippsGFpGetElementOctString(fp_y->ipp_ff_elem, - (Ipp8u*)&ec_point_str + ipp_half_strlen, - ipp_half_strlen, fp.ipp_ff); - // check return codes - if (ippStsNoErr != sts) { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - break; - } - - if (2 * ipp_half_strlen == sizeof(G1ElemStr)) { - PrintG1ElemStr((const G1ElemStr*)&ec_point_str, var_name, format); - } else if (2 * ipp_half_strlen == sizeof(G2ElemStr)) { - PrintG2ElemStr((const G2ElemStr*)&ec_point_str, var_name, format); - } else { - PRINT("%s (EcPoint):\n", var_name); - MAKE_INDENT(); - PRINT("\n"); - break; - } - } while (0); - - DeleteFfElement(&fp_x); - DeleteFfElement(&fp_y); -} - -void PrintBigNumStr(BigNumStr const* big_num_str, char const* var_name) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (BigNumStr):\n", var_name); - if (!big_num_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (0 != PrintBuf((const void*)big_num_str, sizeof(*big_num_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -void PrintFpElemStr(FpElemStr const* fp_elem_str, char const* var_name) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (FpElemStr):\n", var_name); - if (!fp_elem_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (0 != PrintBuf((const void*)fp_elem_str, sizeof(*fp_elem_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -void PrintFqElemStr(FqElemStr const* fq_elem_str, char const* var_name) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (FqElemStr):\n", var_name); - if (!fq_elem_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (0 != PrintBuf((const void*)fq_elem_str, sizeof(*fq_elem_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -void PrintFq2ElemStr(Fq2ElemStr const* fq2_elem_str, char const* var_name, - PrintUtilFormat format) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (Fq2ElemStr):\n", var_name); - if (!fq2_elem_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (format == kPrintUtilAnnotated) { - MAKE_INDENT(); - PRINT("a0:\n"); - if (0 != PrintBuf((const void*)&fq2_elem_str->a[0], - sizeof(fq2_elem_str->a[0]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - MAKE_INDENT(); - PRINT("a1:\n"); - if (0 != PrintBuf((const void*)&fq2_elem_str->a[1], - sizeof(fq2_elem_str->a[1]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else if (format == kPrintUtilUnannotated) { - if (0 != PrintBuf((const void*)fq2_elem_str, sizeof(*fq2_elem_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -void PrintFq6ElemStr(Fq6ElemStr const* fq6_elem_str, char const* var_name, - PrintUtilFormat format) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (Fq6ElemStr):\n", var_name); - if (!fq6_elem_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (format == kPrintUtilAnnotated) { - unsigned int i = 0; - unsigned int j = 0; - for (i = 0; i < sizeof(fq6_elem_str->a) / sizeof(fq6_elem_str->a[0]); i++) { - for (j = 0; - j < sizeof(fq6_elem_str->a[0]) / sizeof(fq6_elem_str->a[0].a[0]); - j++) { - MAKE_INDENT(); - PRINT("a%u.%u:\n", i, j); - if (0 != PrintBuf((const void*)&fq6_elem_str->a[i].a[j], - sizeof(fq6_elem_str->a[i].a[j]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } - } - } else if (format == kPrintUtilUnannotated) { - if (0 != PrintBuf((const void*)fq6_elem_str, sizeof(*fq6_elem_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -void PrintFq12ElemStr(Fq12ElemStr const* fq12_elem_str, char const* var_name, - PrintUtilFormat format) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (Fq12ElemStr):\n", var_name); - if (!fq12_elem_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (format == kPrintUtilAnnotated) { - unsigned int i = 0; - unsigned int j = 0; - unsigned int k = 0; - for (i = 0; i < sizeof(fq12_elem_str->a) / sizeof(fq12_elem_str->a[0]); - i++) { - for (j = 0; - j < sizeof(fq12_elem_str->a[0]) / sizeof(fq12_elem_str->a[0].a[0]); - j++) { - for (k = 0; k < sizeof(fq12_elem_str->a[0].a[0]) / - sizeof(fq12_elem_str->a[0].a[0].a[0]); - k++) { - MAKE_INDENT(); - PRINT("a%u.%u.%u:\n", i, j, k); - if (0 != PrintBuf((const void*)&fq12_elem_str->a[i].a[j].a[k], - sizeof(fq12_elem_str->a[i].a[j].a[k]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } - } - } - } else if (format == kPrintUtilUnannotated) { - if (0 != PrintBuf((const void*)fq12_elem_str, sizeof(*fq12_elem_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -void PrintG1ElemStr(G1ElemStr const* g1_elem_str, char const* var_name, - PrintUtilFormat format) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (G1ElemStr):\n", var_name); - if (!g1_elem_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (format == kPrintUtilAnnotated) { - MAKE_INDENT(); - PRINT("x:\n"); - if (0 != PrintBuf((const void*)&g1_elem_str->x, sizeof(g1_elem_str->x))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - MAKE_INDENT(); - PRINT("y:\n"); - if (0 != PrintBuf((const void*)&g1_elem_str->y, sizeof(g1_elem_str->y))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else if (format == kPrintUtilUnannotated) { - if (0 != PrintBuf((const void*)g1_elem_str, sizeof(*g1_elem_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -void PrintG2ElemStr(G2ElemStr const* g2_elem_str, char const* var_name, - PrintUtilFormat format) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (G2ElemStr):\n", var_name); - if (!g2_elem_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (format == kPrintUtilAnnotated) { - MAKE_INDENT(); - PRINT("x0:\n"); - if (0 != - PrintBuf((const void*)&g2_elem_str->x[0], sizeof(g2_elem_str->x[0]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - MAKE_INDENT(); - PRINT("x1:\n"); - if (0 != - PrintBuf((const void*)&g2_elem_str->x[1], sizeof(g2_elem_str->x[1]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - MAKE_INDENT(); - PRINT("y0:\n"); - if (0 != - PrintBuf((const void*)&g2_elem_str->y[0], sizeof(g2_elem_str->y[0]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - MAKE_INDENT(); - PRINT("y1:\n"); - if (0 != - PrintBuf((const void*)&g2_elem_str->y[1], sizeof(g2_elem_str->y[1]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else if (format == kPrintUtilUnannotated) { - if (0 != PrintBuf((const void*)g2_elem_str, sizeof(*g2_elem_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -void PrintGtElemStr(GtElemStr const* gt_elem_str, char const* var_name, - PrintUtilFormat format) { - if (!var_name) { - var_name = ""; - } - PRINT("%s (GtElemStr):\n", var_name); - if (!gt_elem_str) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - if (format == kPrintUtilAnnotated) { - unsigned int i = 0; - for (i = 0; i < sizeof(gt_elem_str->x) / sizeof(gt_elem_str->x[0]); i++) { - MAKE_INDENT(); - PRINT("x%u:\n", i); - if (0 != PrintBuf((const void*)>_elem_str->x[i], - sizeof(gt_elem_str->x[i]))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } - } else if (format == kPrintUtilUnannotated) { - if (0 != PrintBuf((const void*)gt_elem_str, sizeof(*gt_elem_str))) { - MAKE_INDENT(); - PRINT("\n"); - return; - } - } else { - MAKE_INDENT(); - PRINT("\n"); - return; - } -} - -#ifdef EPID_ENABLE_DEBUG_PRINT -#undef EPID_ENABLE_DEBUG_PRINT -#endif diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/sha256.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/sha256.c deleted file mode 100644 index 7f1b3f3101..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/sha256.c +++ /dev/null @@ -1,43 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief SHA256 implementation. -*/ -#include "epid/common/math/hash.h" -#include "ext/ipp/include/ippcp.h" - -EpidStatus Sha256MessageDigest(void const* msg, size_t len, - Sha256Digest* digest) { - IppStatus sts; - int ipp_len = (int)len; - - if ((len && !msg) || !digest) return kEpidBadArgErr; - - if (INT_MAX < len) return kEpidBadArgErr; - - sts = ippsSHA256MessageDigest(msg, ipp_len, (Ipp8u*)digest); - if (ippStsNoErr != sts) { - if (ippStsLengthErr == sts) { - return kEpidBadArgErr; - } else { - return kEpidMathErr; - } - } - - return kEpidNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/tatepairing-internal.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/tatepairing-internal.h deleted file mode 100644 index 019f3ff192..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/tatepairing-internal.h +++ /dev/null @@ -1,41 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Intel(R) EPID 1.1 pairing private interface. - */ - -#ifndef EPID_COMMON_MATH_SRC_TATEPAIRING_INTERNAL_H_ -#define EPID_COMMON_MATH_SRC_TATEPAIRING_INTERNAL_H_ - -/// Pairing State -struct Epid11PairingState { - EcGroup* ga; ///< elliptic curve group G1 - EcGroup* gb; ///< elliptic curve group G2 - FiniteField* ff; ///< finite field GT - BigNumStr p; ///< Intel(R) EPID 1.1 p parameter value - size_t p_bitsize; ///< Length of p in bits - FfElement* a; ///< Intel(R) EPID 1.1 a parameter value - BigNum* final_exp_constant; ///< (q^2 - q + 1)/p - FfElement* fq3_inv_constant; ///< (inverse(qnr), 0) in Fq3 - FfElement* fq3_inv2_constant; ///< (inverse(qnr)^2, 0) in Fq3 - FiniteField Fq; ///< Fq - FiniteField Fq3; ///< Fq3 - FfElement* alpha_q[3]; ///< {t^(0*q), t^(1*q), t^(2*q)} -}; - -#endif // EPID_COMMON_MATH_SRC_TATEPAIRING_INTERNAL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/tatepairing.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/tatepairing.c deleted file mode 100644 index 0267eb967f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/src/tatepairing.c +++ /dev/null @@ -1,936 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief EPID 1.1 pairing implementation. -*/ - -#include "epid/common/math/tatepairing.h" -#include "epid/common/1.1/types.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/math/src/finitefield-internal.h" -#include "epid/common/math/src/ecgroup-internal.h" -#include "epid/common/math/src/tatepairing-internal.h" -#include "epid/common/src/memory.h" -#include "ext/ipp/include/ippcp.h" -#include "ext/ipp/include/ippcpepid.h" - -/// Handle Ipp Errors with Break -#define BREAK_ON_IPP_ERROR(sts, ret) \ - { \ - IppStatus temp_sts = (sts); \ - if (ippStsNoErr != temp_sts) { \ - if (ippStsContextMatchErr == temp_sts) { \ - (ret) = kEpidMathErr; \ - } else { \ - (ret) = kEpidBadArgErr; \ - } \ - break; \ - } \ - } - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -/// Count of elements in array -#define COUNT_OF(a) (sizeof(a) / sizeof((a)[0])) - -#pragma pack(1) -/// Data for element in Fq -typedef struct FqElemDat { - Ipp32u x[sizeof(FqElemStr) / sizeof(Ipp32u)]; ///< element in Fq -} FqElemDat; -/// Data for element in Fq -typedef struct Fq3ElemDat { - FqElemDat x[3]; ///< element in Fq3 -} Fq3ElemDat; -#pragma pack() - -// Forward Declarations -static EpidStatus Fq6FromFq(FiniteField* fq6, FiniteField* fq, - FfElement const* a, FfElement* r); - -static EpidStatus JoinFq3(Epid11PairingState* ps, FfElement const* a, - FfElement const* b, FfElement* r); - -static EpidStatus SplitFq6(Epid11PairingState* ps, FfElement const* a, - FfElement* a0, FfElement* a1); - -static EpidStatus FinalExp(Epid11PairingState* ps, FfElement const* r, - FfElement* d); - -static EpidStatus Transform(Epid11PairingState* ps, FfElement const* a, - FfElement* b); - -EpidStatus NewEpid11PairingState(EcGroup const* ga, EcGroup const* gb, - FiniteField const* ff, - Epid11PairingState** ps) { - EpidStatus result = kEpidErr; - Epid11PairingState* paring_state_ctx = NULL; - BigNum* tmp = NULL; - BigNum* p = NULL; - BigNum* q = NULL; - FfElement* qnr = NULL; - FfElement* inv_qnr = NULL; - FfElement* neg_qnr = NULL; - Fq3ElemStr fq3_str = {0}; - FqElemDat q_data = {0}; - int i = 0; - - do { - IppStatus sts = ippStsNoErr; - IppsGFpState* Fq3 = NULL; - IppsGFpState* Fq = NULL; - IppsGFpInfo info = {0}; - Fq3ElemDat ff_modulus[3] = {0}; - uint8_t one_str[] = {1}; - const Ipp32u* p_data = NULL; - int p_len = 0; - uint8_t remainder_str = 0xff; - Fq3ElemStr trans_100 = {0}; - Fq3ElemStr trans_010 = {0}; - - // validate inputs - if (!ga || !gb || !ff || !ps) { - result = kEpidBadArgErr; - break; - } - if (!ga->ipp_ec || !gb->ipp_ec || !ff->ipp_ff) { - result = kEpidBadArgErr; - break; - } - if (1 != ga->info.basicGFdegree || 3 != gb->info.basicGFdegree || - 6 != ff->info.basicGFdegree || - sizeof(Epid11G1ElemStr) != (ga->info.elementLen << 3) || - sizeof(Epid11G2ElemStr) != (gb->info.elementLen << 3) || - sizeof(Epid11GtElemStr) != (ff->info.elementLen << 2)) { - result = kEpidBadArgErr; - break; - } - paring_state_ctx = - (Epid11PairingState*)SAFE_ALLOC(sizeof(Epid11PairingState)); - if (!paring_state_ctx) { - result = kEpidMemAllocErr; - break; - } - - // store EPID fields and groups - paring_state_ctx->ga = (EcGroup*)ga; - paring_state_ctx->gb = (EcGroup*)gb; - paring_state_ctx->ff = (FiniteField*)ff; - - // get Fq3, Fq - sts = ippsGFpGetInfo(ff->ipp_ff, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq3 = (IppsGFpState*)info.pGroundGF; - result = InitFiniteFieldFromIpp(Fq3, &(paring_state_ctx->Fq3)); - BREAK_ON_EPID_ERROR(result); - - sts = ippsGFpGetInfo(Fq3, &info); - BREAK_ON_IPP_ERROR(sts, result); - Fq = (IppsGFpState*)info.pGroundGF; - result = InitFiniteFieldFromIpp(Fq, &(paring_state_ctx->Fq)); - BREAK_ON_EPID_ERROR(result); - - // compute fq3_inv_constant = (inverse(qnr), 0, 0) - result = NewFfElement(&paring_state_ctx->Fq3, - &paring_state_ctx->fq3_inv_constant); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&paring_state_ctx->Fq, &neg_qnr); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&paring_state_ctx->Fq, &qnr); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&paring_state_ctx->Fq, &inv_qnr); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpGetModulus(ff->ipp_ff, (Ipp32u*)&ff_modulus); - BREAK_ON_IPP_ERROR(sts, result); - sts = - ippsGFpSetElement(ff_modulus[0].x[0].x, COUNT_OF(ff_modulus[0].x[0].x), - neg_qnr->ipp_ff_elem, Fq); - BREAK_ON_IPP_ERROR(sts, result); - result = FfNeg(&paring_state_ctx->Fq, neg_qnr, qnr); - BREAK_ON_EPID_ERROR(result); - result = FfInv(&paring_state_ctx->Fq, qnr, inv_qnr); - BREAK_ON_EPID_ERROR(result); - result = WriteFfElement(&paring_state_ctx->Fq, inv_qnr, &fq3_str.a[0], - sizeof(fq3_str.a[0])); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(&paring_state_ctx->Fq3, &fq3_str, sizeof(fq3_str), - paring_state_ctx->fq3_inv_constant); - BREAK_ON_EPID_ERROR(result); - - // compute fq3_inv2_constant = (inverse(qnr)^2, 0, 0) - // inv_qnr = inv_qnr^2 - result = NewFfElement(&paring_state_ctx->Fq3, - &paring_state_ctx->fq3_inv2_constant); - BREAK_ON_EPID_ERROR(result); - result = FfMul(&paring_state_ctx->Fq, inv_qnr, inv_qnr, inv_qnr); - BREAK_ON_EPID_ERROR(result); - result = WriteFfElement(&paring_state_ctx->Fq, inv_qnr, &fq3_str.a[0], - sizeof(fq3_str.a[0])); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(&paring_state_ctx->Fq3, &fq3_str, sizeof(fq3_str), - paring_state_ctx->fq3_inv2_constant); - BREAK_ON_EPID_ERROR(result); - - // save parameter q for future use - sts = ippsGFpGetModulus(Fq, (Ipp32u*)&q_data); - BREAK_ON_IPP_ERROR(sts, result); - result = NewBigNum(sizeof(BigNumStr), &q); - BREAK_ON_EPID_ERROR(result); - sts = ippsSet_BN(IppsBigNumPOS, sizeof(q_data) / sizeof(Ipp32u), - (Ipp32u*)&q_data, q->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - - // save parameters a and p for future use - result = NewFfElement(&paring_state_ctx->Fq, &paring_state_ctx->a); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(sizeof(BigNumStr), &p); - BREAK_ON_EPID_ERROR(result); - sts = ippsGFpECGet(ga->ipp_ec, NULL, paring_state_ctx->a->ipp_ff_elem, NULL, - NULL, NULL, &p_data, &p_len, NULL, NULL); - BREAK_ON_IPP_ERROR(sts, result); - if (p_len * sizeof(*p_data) > sizeof(BigNumStr)) { - result = kEpidErr; // order size is unexpected - break; - } - sts = ippsSet_BN(IppsBigNumPOS, p_len, p_data, p->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - // compute p bit size requred for pairing - sts = ippsGetOctString_BN((Ipp8u*)&paring_state_ctx->p, - sizeof(paring_state_ctx->p), p->ipp_bn); - BREAK_ON_IPP_ERROR(sts, result); - paring_state_ctx->p_bitsize = OctStrBitSize( - paring_state_ctx->p.data.data, sizeof(paring_state_ctx->p.data.data)); - - // compute final_exp_constant = (q^2 - q + 1)/p - result = - NewBigNum(2 * sizeof(BigNumStr), &paring_state_ctx->final_exp_constant); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(sizeof(BigNumStr), &tmp); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(one_str, sizeof(one_str), tmp); - BREAK_ON_EPID_ERROR(result); - - result = BigNumMul(q, q, paring_state_ctx->final_exp_constant); - BREAK_ON_EPID_ERROR(result); - result = BigNumSub(paring_state_ctx->final_exp_constant, q, - paring_state_ctx->final_exp_constant); - BREAK_ON_EPID_ERROR(result); - result = BigNumAdd(paring_state_ctx->final_exp_constant, tmp, - paring_state_ctx->final_exp_constant); - BREAK_ON_EPID_ERROR(result); - result = BigNumDiv(paring_state_ctx->final_exp_constant, p, - paring_state_ctx->final_exp_constant, tmp); - BREAK_ON_EPID_ERROR(result); - result = WriteBigNum(tmp, sizeof(remainder_str), &remainder_str); - if (kEpidNoErr != result || 0 != remainder_str) { - result = kEpidBadArgErr; // p does not divide (q^2 - q + 1) - break; - } - - for (i = 0; i < 3; i++) { - result = - NewFfElement(&paring_state_ctx->Fq3, &(paring_state_ctx->alpha_q[i])); - BREAK_ON_EPID_ERROR(result); - } - BREAK_ON_EPID_ERROR(result); - /* t^(0*q) */ - trans_100.a[0].data.data[31] = 1; - result = ReadFfElement(&paring_state_ctx->Fq3, &trans_100, - sizeof(trans_100), paring_state_ctx->alpha_q[0]); - BREAK_ON_EPID_ERROR(result); - /* t^(1*q) */ - trans_010.a[1].data.data[31] = 1; - result = ReadFfElement(&paring_state_ctx->Fq3, &trans_010, - sizeof(trans_010), paring_state_ctx->alpha_q[1]); - BREAK_ON_EPID_ERROR(result); - result = FfExp(&paring_state_ctx->Fq3, paring_state_ctx->alpha_q[1], q, - paring_state_ctx->alpha_q[1]); - BREAK_ON_EPID_ERROR(result); - /* t^(2*q) */ - result = FfMul(&paring_state_ctx->Fq3, paring_state_ctx->alpha_q[1], - paring_state_ctx->alpha_q[1], paring_state_ctx->alpha_q[2]); - BREAK_ON_EPID_ERROR(result); - - *ps = paring_state_ctx; - result = kEpidNoErr; - } while (0); - - EpidZeroMemory(&fq3_str, sizeof(fq3_str)); - EpidZeroMemory(&q_data, sizeof(q_data)); - DeleteBigNum(&p); - DeleteBigNum(&q); - DeleteBigNum(&tmp); - DeleteFfElement(&qnr); - DeleteFfElement(&inv_qnr); - DeleteFfElement(&neg_qnr); - if (kEpidNoErr != result) { - if (paring_state_ctx) { - DeleteFfElement(&paring_state_ctx->a); - DeleteFfElement(&paring_state_ctx->fq3_inv_constant); - DeleteFfElement(&paring_state_ctx->fq3_inv2_constant); - DeleteBigNum(&paring_state_ctx->final_exp_constant); - for (i = 0; i < 3; i++) { - DeleteFfElement(&(paring_state_ctx->alpha_q[i])); - } - SAFE_FREE(paring_state_ctx); - } - } - return result; -} - -void DeleteEpid11PairingState(Epid11PairingState** ps) { - size_t i; - if (ps && *ps) { - DeleteFfElement(&(*ps)->a); - DeleteFfElement(&(*ps)->fq3_inv_constant); - DeleteFfElement(&(*ps)->fq3_inv2_constant); - DeleteBigNum(&(*ps)->final_exp_constant); - for (i = 0; i < 3; i++) { - DeleteFfElement(&(*ps)->alpha_q[i]); - } - SAFE_FREE(*ps); - } -} - -EpidStatus Epid11Pairing(Epid11PairingState* ps, EcPoint const* a, - EcPoint const* b, FfElement* d) { - EpidStatus result = kEpidErr; - IppStatus sts; - FfElement* b0 = NULL; - FfElement* b1 = NULL; - FfElement* pQx = NULL; - FfElement* pQy = NULL; - FfElement* px = NULL; - FfElement* py = NULL; - FfElement* X = NULL; - FfElement* Y = NULL; - FfElement* Z = NULL; - FfElement* X2 = NULL; - FfElement* Y2 = NULL; - FfElement* Z2 = NULL; - FfElement* w = NULL; - FfElement* v = NULL; - FfElement* ty = NULL; - FfElement* ry = NULL; - FfElement* tx = NULL; - FfElement* rx = NULL; - FfElement* t1 = NULL; - FfElement* t2 = NULL; - FfElement* t3 = NULL; - FfElement* tt1 = NULL; - FfElement* tt2 = NULL; - FfElement* r = NULL; - Epid11G1ElemStr a_str = {0}; - Epid11G2ElemStr b_str = {0}; - Epid11GtElemStr bx_str = {0}; - Epid11GtElemStr by_str = {0}; - bool is_identity; - int i; - - if (!ps || !a || !b || !d) return kEpidBadArgErr; - - do { - Epid11GtElemStr one_fq6 = {0}; - FqElemStr one_fq = {0}; - one_fq6.a[0].a[0].data.data[31] = 1; - one_fq.data.data[31] = 1; - - // If P = O, point at infinity, then return r = 1 - result = EcIsIdentity(ps->ga, a, &is_identity); - BREAK_ON_EPID_ERROR(result); - if (is_identity) { - result = ReadFfElement(ps->ff, &one_fq6, sizeof(one_fq6), d); - BREAK_ON_EPID_ERROR(result); - result = kEpidNoErr; - break; - } - - // Let Q = (Q.x, Q.y), where Q.x and Q.y are elements in Fqd. - result = NewFfElement(&ps->Fq3, &b0); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq3, &b1); - BREAK_ON_EPID_ERROR(result); - result = WriteEcPoint(ps->gb, b, &b_str, sizeof(b_str)); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(&ps->Fq3, &b_str.x, sizeof(b_str.x), b0); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(&ps->Fq3, &b_str.y, sizeof(b_str.y), b1); - BREAK_ON_EPID_ERROR(result); - - // Now we compute Qx, Qy, two elements in GT, as follows. - result = NewFfElement(ps->ff, &pQx); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &pQy); - BREAK_ON_EPID_ERROR(result); - - // Compute Qx = (inv * Q.x, 0). - result = FfMul(&ps->Fq3, ps->fq3_inv_constant, b0, b0); - BREAK_ON_EPID_ERROR(result); - result = WriteFfElement(&ps->Fq3, b0, &bx_str.a[0], sizeof(bx_str.a[0])); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ps->ff, &bx_str, sizeof(bx_str), pQx); - BREAK_ON_EPID_ERROR(result); - - // Compute Qy = (0, inv^2 * Q.y). - result = FfMul(&ps->Fq3, ps->fq3_inv2_constant, b1, b1); - BREAK_ON_EPID_ERROR(result); - result = WriteFfElement(&ps->Fq3, b1, &by_str.a[1], sizeof(by_str.a[1])); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ps->ff, &by_str, sizeof(by_str), pQy); - BREAK_ON_EPID_ERROR(result); - - // Let P = (px, py), where px, py are big integers. - result = NewFfElement(&ps->Fq, &px); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &py); - BREAK_ON_EPID_ERROR(result); - result = WriteEcPoint(ps->ga, a, &a_str, sizeof(a_str)); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(&ps->Fq, &a_str.x, sizeof(a_str.x), px); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(&ps->Fq, &a_str.y, sizeof(a_str.y), py); - BREAK_ON_EPID_ERROR(result); - - // Let X, Y, Z, X', Y', Z', w, v, ty, ry be elements in Fq. - result = NewFfElement(&ps->Fq, &X); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &Y); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &Z); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &X2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &Y2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &Z2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &w); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &v); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &ty); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &ry); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &t1); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &t2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq, &t3); - BREAK_ON_EPID_ERROR(result); - - // Let tx, rx be elements in GT. - result = NewFfElement(ps->ff, &tx); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &rx); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &tt1); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &tt2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &r); - BREAK_ON_EPID_ERROR(result); - - // Set X = px, - result = ReadFfElement(&ps->Fq, &a_str.x, sizeof(a_str.x), X); - BREAK_ON_EPID_ERROR(result); - - // Y = py, - result = ReadFfElement(&ps->Fq, &a_str.y, sizeof(a_str.y), Y); - BREAK_ON_EPID_ERROR(result); - - // Z = 1, - result = ReadFfElement(&ps->Fq, &one_fq, sizeof(one_fq), Z); - BREAK_ON_EPID_ERROR(result); - - // ry = 1. - result = ReadFfElement(&ps->Fq, &one_fq, sizeof(one_fq), ry); - BREAK_ON_EPID_ERROR(result); - - // Set rx = 1, identity element of GT. - result = ReadFfElement(ps->ff, &one_fq6, sizeof(one_fq6), rx); - BREAK_ON_EPID_ERROR(result); - - // Let pn ... p1 p0 be the binary representation of p - // For i = n-1, ..., 0 do - for (i = (int)ps->p_bitsize - 2; i >= 0; i--) { - bool pi = ps->p.data.data[sizeof(ps->p) - 1 - (i >> 3)] & (1 << (i & 7)); - - result = FfMul(&ps->Fq, Z, Z, ty); // ty = Z^2 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, ty, ty, t1); // t1 = Z^4 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, t1, ps->a, t1); // t1 = a*Z^4 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, X, X, w); // w = X^2 - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ps->Fq, w, w, t2); // t2 = 2 * X^2 - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ps->Fq, w, t2, w); // w = 3 * X^2 - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ps->Fq, w, t1, w); // w = 3 * X^2 + a * Z^4 - BREAK_ON_EPID_ERROR(result); - - result = FfMul(&ps->Fq, Y, Y, t1); // t1 = Y^2 - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ps->Fq, t1, t1, t3); // t3 = 2* Y^2 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, t3, X, v); // v = 2 * X * Y^2 - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ps->Fq, v, v, v); // v = 4 * X * Y^2 - BREAK_ON_EPID_ERROR(result); - - result = FfMul(&ps->Fq, w, w, X2); // X2 = w^2 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, X2, v, X2); // X2 = w^2 - v - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, X2, v, X2); // X2 = w^2 - 2 * w - BREAK_ON_EPID_ERROR(result); - - result = FfMul(&ps->Fq, t3, t3, t3); // t3 = 4 * Y^4 - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ps->Fq, t3, t3, t3); // t3 = 8 * Y^4 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, v, X2, Y2); // Y2 = v - X2 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, Y2, w, Y2); // Y2 = w * (v - X2) - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, Y2, t3, Y2); // Y2 = w * (v - X2) - 8 * Y^4 - BREAK_ON_EPID_ERROR(result); - - result = FfMul(&ps->Fq, Y, Z, Z2); // Z2 = Y * Z - BREAK_ON_EPID_ERROR(result); - result = FfAdd(&ps->Fq, Z2, Z2, Z2); // Z2 = 2 * Y * Z - BREAK_ON_EPID_ERROR(result); - - /* compute line */ - result = FfMul(&ps->Fq, ty, w, t2); // t2 = w * Z^2 - BREAK_ON_EPID_ERROR(result); - result = Fq6FromFq(ps->ff, &ps->Fq, t2, tt2); - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, pQx, tt2, tt1); // tt1 = w * Z^2 * Qx - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, w, X, t2); // t2 = w * X - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, t2, t1, t2); // t2 = w * X - Y^2 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, t2, t1, t2); // t2 = w * X - 2 * Y^2 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, ty, Z2, ty); // ty = Z2 * Z^2 - BREAK_ON_EPID_ERROR(result); - result = Fq6FromFq(ps->ff, &ps->Fq, ty, tt2); - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, pQy, tt2, tx); // tx = ty * Qy - BREAK_ON_EPID_ERROR(result); - result = FfSub(ps->ff, tx, tt1, tx); // tx = ty * Qy - w * Z^2 * Qx - BREAK_ON_EPID_ERROR(result); - result = Fq6FromFq(ps->ff, &ps->Fq, t2, tt2); - BREAK_ON_EPID_ERROR(result); - result = FfAdd(ps->ff, tx, tt2, - tx); // tx = ty * Qy - w * Z^2 * Qx + w * X - 2 * Y^2 - BREAK_ON_EPID_ERROR(result); - - sts = ippsGFpCpyElement(X2->ipp_ff_elem, X->ipp_ff_elem, - ps->Fq.ipp_ff); // X = X2 - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpCpyElement(Y2->ipp_ff_elem, Y->ipp_ff_elem, - ps->Fq.ipp_ff); // Y = Y2 - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpCpyElement(Z2->ipp_ff_elem, Z->ipp_ff_elem, - ps->Fq.ipp_ff); // Z = Z2 - BREAK_ON_IPP_ERROR(sts, result); - - /* udpate rx, ry */ - result = FfMul(ps->ff, rx, rx, tt1); // tt1 = rx * rx - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, tx, tt1, rx); // rx = tx * rx * rx - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, ry, ry, t1); // t1 = ry * ry - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, ty, t1, ry); // ry = ty * ry * ry - BREAK_ON_EPID_ERROR(result); - - if (pi && i) { - result = FfMul(&ps->Fq, Z, Z, t1); // t1 = Z^2 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, px, t1, w); // w = px * Z^2 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, w, X, w); // w = px * Z^2 - X - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, t1, Z, t1); // t1 = Z^3 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, py, t1, v); // v = py * Z^3 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, v, Y, v); // v = py * Z^3 - Y - BREAK_ON_EPID_ERROR(result); - - result = FfMul(&ps->Fq, w, w, t1); // t1 = w^2 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, w, t1, t2); // t2 = w^3 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, X, t1, t3); // t3 = X * w^2 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, v, v, X2); // X2 = v^2 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, X2, t2, X2); // X2 = v^2 - w^3 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, X2, t3, X2); // X2 = v^2 - w^3 - X * w^2 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, X2, t3, X2); // X2 = v^2 - w^3 - 2 * X * w^2 - BREAK_ON_EPID_ERROR(result); - result = FfSub(&ps->Fq, t3, X2, Y2); // Y2 = X * w^2 - X2 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, Y2, v, Y2); // Y2 = v * (X * w^2 - X2) - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, t2, Y, t2); // t2 = Y * w^3 - BREAK_ON_EPID_ERROR(result); - result = - FfSub(&ps->Fq, Y2, t2, Y2); // Y2 = v * (X * w^2 - X2) - Y * w^3 - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, w, Z, Z2); // Z2 = w * Z - BREAK_ON_EPID_ERROR(result); - - /* compute tx, ty */ - sts = ippsGFpCpyElement(Z2->ipp_ff_elem, ty->ipp_ff_elem, - ps->Fq.ipp_ff); // ty = Z2 - BREAK_ON_IPP_ERROR(sts, result); - result = Fq6FromFq(ps->ff, &ps->Fq, py, tt2); - BREAK_ON_EPID_ERROR(result); - result = FfSub(ps->ff, pQy, tt2, tx); // tx = Qy - py - BREAK_ON_EPID_ERROR(result); - result = Fq6FromFq(ps->ff, &ps->Fq, Z2, tt2); - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, tx, tt2, tx); // tx = Z2 * (Qy - py) - BREAK_ON_EPID_ERROR(result); - result = Fq6FromFq(ps->ff, &ps->Fq, px, tt2); - BREAK_ON_EPID_ERROR(result); - result = FfSub(ps->ff, pQx, tt2, tt1); // tt1 = Qx - px - BREAK_ON_EPID_ERROR(result); - result = Fq6FromFq(ps->ff, &ps->Fq, v, tt2); - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, tt1, tt2, tt1); // tt1 = v * (Qx - px) - BREAK_ON_EPID_ERROR(result); - result = - FfSub(ps->ff, tx, tt1, tx); // tx = Z2 * (Qy - py) - v * (Qx - px) - BREAK_ON_EPID_ERROR(result); - - sts = ippsGFpCpyElement(X2->ipp_ff_elem, X->ipp_ff_elem, - ps->Fq.ipp_ff); // X = X2 - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpCpyElement(Y2->ipp_ff_elem, Y->ipp_ff_elem, - ps->Fq.ipp_ff); // Y = Y2 - BREAK_ON_IPP_ERROR(sts, result); - sts = ippsGFpCpyElement(Z2->ipp_ff_elem, Z->ipp_ff_elem, - ps->Fq.ipp_ff); // Z = Z2 - BREAK_ON_IPP_ERROR(sts, result); - - /* udpate rx, ry */ - result = FfMul(ps->ff, rx, tx, rx); // rx = rx * tx - BREAK_ON_EPID_ERROR(result); - result = FfMul(&ps->Fq, ry, ty, ry); // ry = ry * ty - BREAK_ON_EPID_ERROR(result); - } - } - BREAK_ON_EPID_ERROR(result); - - result = FfInv(&ps->Fq, ry, ry); // ry = ry^-1 - BREAK_ON_EPID_ERROR(result); - result = Fq6FromFq(ps->ff, &ps->Fq, ry, tt2); - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, rx, tt2, r); // r = rx * ry - BREAK_ON_EPID_ERROR(result); - - result = FinalExp(ps, r, d); - BREAK_ON_EPID_ERROR(result); - - result = kEpidNoErr; - BREAK_ON_EPID_ERROR(result); - } while (0); - - EpidZeroMemory(&a_str, sizeof(a_str)); - EpidZeroMemory(&b_str, sizeof(b_str)); - EpidZeroMemory(&bx_str, sizeof(bx_str)); - EpidZeroMemory(&by_str, sizeof(by_str)); - DeleteFfElement(&b0); - DeleteFfElement(&b1); - DeleteFfElement(&pQx); - DeleteFfElement(&pQy); - DeleteFfElement(&px); - DeleteFfElement(&py); - DeleteFfElement(&X); - DeleteFfElement(&Y); - DeleteFfElement(&Z); - DeleteFfElement(&X2); - DeleteFfElement(&Y2); - DeleteFfElement(&Z2); - DeleteFfElement(&w); - DeleteFfElement(&v); - DeleteFfElement(&ty); - DeleteFfElement(&ry); - DeleteFfElement(&tx); - DeleteFfElement(&rx); - DeleteFfElement(&t1); - DeleteFfElement(&t2); - DeleteFfElement(&t3); - DeleteFfElement(&tt1); - DeleteFfElement(&tt2); - DeleteFfElement(&r); - return result; -} - -static EpidStatus Fq6FromFq(FiniteField* fq6, FiniteField* fq, - FfElement const* a, FfElement* r) { - EpidStatus result = kEpidErr; - // initialize all Fq6 coefficients to 0 - Fq6ElemStr r_str = {0}; - - if (!fq6 || !fq || !a || !r) return kEpidBadArgErr; - - do { - // set Fq6 degree zero coefficient to 'a' - result = WriteFfElement(fq, a, &r_str.a[0].a[0], sizeof(r_str.a[0].a[0])); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(fq6, &r_str, sizeof(r_str), r); - BREAK_ON_EPID_ERROR(result); - result = kEpidNoErr; - } while (0); - EpidZeroMemory(&r_str, sizeof(r_str)); - return result; -} - -/// Set r from Fq6 to (a, b), where a and b from Fq3 -static EpidStatus JoinFq3(Epid11PairingState* ps, FfElement const* a, - FfElement const* b, FfElement* r) { - EpidStatus result = kEpidErr; - Epid11GtElemStr r_str = {0}; - - do { - // validate inputs - if (!ps || !a || !b || !r) { - result = kEpidBadArgErr; - break; - } - result = WriteFfElement(&ps->Fq3, a, &r_str.a[0], sizeof(r_str.a[0])); - BREAK_ON_EPID_ERROR(result); - result = WriteFfElement(&ps->Fq3, b, &r_str.a[1], sizeof(r_str.a[1])); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ps->ff, &r_str, sizeof(r_str), r); - BREAK_ON_EPID_ERROR(result); - result = kEpidNoErr; - } while (0); - - EpidZeroMemory(&r_str, sizeof(r_str)); - return result; -} - -/// Set a0 and a1 from Fq3 to a0' and a1', where a = (a0', a1') from Fq6 -static EpidStatus SplitFq6(Epid11PairingState* ps, FfElement const* a, - FfElement* a0, FfElement* a1) { - EpidStatus result = kEpidErr; - Epid11GtElemStr a_str = {0}; - - do { - // validate inputs - if (!ps || !a0 || !a1 || !a) { - result = kEpidBadArgErr; - break; - } - result = WriteFfElement(ps->ff, a, &a_str, sizeof(a_str)); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(&ps->Fq3, &a_str.a[0], sizeof(a_str.a[0]), a0); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(&ps->Fq3, &a_str.a[1], sizeof(a_str.a[1]), a1); - BREAK_ON_EPID_ERROR(result); - result = kEpidNoErr; - } while (0); - - EpidZeroMemory(&a_str, sizeof(a_str)); - return result; -} - -static EpidStatus FinalExp(Epid11PairingState* ps, FfElement const* r, - FfElement* d) { - EpidStatus result = kEpidErr; - FfElement* r0 = NULL; - FfElement* r1 = NULL; - FfElement* neg_r1 = NULL; - FfElement* x = NULL; - FfElement* y = NULL; - FfElement* neg_y = NULL; - FfElement* t1 = NULL; - FfElement* t2 = NULL; - FfElement* t3 = NULL; - FfElement* t4 = NULL; - FfElement* d1 = NULL; - FfElement* d2 = NULL; - FfElement* inv_d2 = NULL; - do { - // validate inputs - if (!ps || !r || !d) { - result = kEpidBadArgErr; - break; - } - - // a.Let r = (r[0], r[1]), where r[0] and r[1] are elements in Fqd, - result = NewFfElement(&ps->Fq3, &r0); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq3, &r1); - BREAK_ON_EPID_ERROR(result); - result = SplitFq6(ps, r, r0, r1); - BREAK_ON_EPID_ERROR(result); - - // b.Compute x = transform(r[0]), where x is an element in Fqd, - result = NewFfElement(&ps->Fq3, &x); - BREAK_ON_EPID_ERROR(result); - result = Transform(ps, r0, x); - BREAK_ON_EPID_ERROR(result); - - // c.Compute y = transform(r[1]), where x is an element in Fqd, - result = NewFfElement(&ps->Fq3, &y); - BREAK_ON_EPID_ERROR(result); - result = Transform(ps, r1, y); - BREAK_ON_EPID_ERROR(result); - - // d.Let t1, t2, t3, t4 be four variables in GT, - result = NewFfElement(ps->ff, &t1); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &t2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &t3); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ps->ff, &t4); - - // - // e.t1 = (x, y), t2 = (r[0], -r[1]), t3 = (x, -y), t4 = (r[0], r[1]), - // - - // t1 = (x, y) - result = JoinFq3(ps, x, y, t1); - BREAK_ON_EPID_ERROR(result); - - // t2 = (r[0], -r[1]) - result = NewFfElement(&ps->Fq3, &neg_r1); - BREAK_ON_EPID_ERROR(result); - result = FfNeg(&ps->Fq3, r1, neg_r1); - BREAK_ON_EPID_ERROR(result); - result = JoinFq3(ps, r0, neg_r1, t2); - BREAK_ON_EPID_ERROR(result); - - // t3 = (x, -y) - result = NewFfElement(&ps->Fq3, &neg_y); - BREAK_ON_EPID_ERROR(result); - result = FfNeg(&ps->Fq3, y, neg_y); - BREAK_ON_EPID_ERROR(result); - result = JoinFq3(ps, x, neg_y, t3); - BREAK_ON_EPID_ERROR(result); - - // t4 = (r[0], r[1]) - result = JoinFq3(ps, r0, r1, t4); - BREAK_ON_EPID_ERROR(result); - - // - // f. d = (t1 * t2) / (t3 * t4), - // - - // d1 = t1 * t2 - result = NewFfElement(ps->ff, &d1); - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, t1, t2, d1); - BREAK_ON_EPID_ERROR(result); - - // d2 = t3 * t4 - result = NewFfElement(ps->ff, &d2); - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, t3, t4, d2); - BREAK_ON_EPID_ERROR(result); - - // d = d1 / d2 - result = NewFfElement(ps->ff, &inv_d2); - BREAK_ON_EPID_ERROR(result); - result = FfInv(ps->ff, d2, inv_d2); - BREAK_ON_EPID_ERROR(result); - result = FfMul(ps->ff, d1, inv_d2, d); - BREAK_ON_EPID_ERROR(result); - - // g.Compute d = GT.exp(d, (q2 - q + 1) / p). - result = FfExp(ps->ff, d, ps->final_exp_constant, d); - BREAK_ON_EPID_ERROR(result); - - result = kEpidNoErr; - } while (0); - - DeleteFfElement(&r0); - DeleteFfElement(&r1); - DeleteFfElement(&neg_r1); - DeleteFfElement(&x); - DeleteFfElement(&y); - DeleteFfElement(&neg_y); - DeleteFfElement(&t1); - DeleteFfElement(&t2); - DeleteFfElement(&t3); - DeleteFfElement(&t4); - DeleteFfElement(&d1); - DeleteFfElement(&d2); - DeleteFfElement(&inv_d2); - return result; -} - -static EpidStatus Transform(Epid11PairingState* ps, FfElement const* a, - FfElement* b) { - EpidStatus result = kEpidErr; - FfElement* tmp = NULL; - Fq3ElemStr zero = {0}; - Fq3ElemStr a_str = {0}; - Fq3ElemStr tmp_str = {0}; - int i = 0; - - if (!ps || !a || !b) return kEpidBadArgErr; - - do { - result = WriteFfElement(&ps->Fq3, a, &a_str, sizeof(a_str)); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(&ps->Fq3, &tmp); - BREAK_ON_EPID_ERROR(result); - // b = 0 - result = ReadFfElement(&ps->Fq3, &zero, sizeof(zero), b); - BREAK_ON_EPID_ERROR(result); - for (i = 0; i < 3; i++) { - // tmp = (a[0][i], 0, 0) - tmp_str.a[0] = a_str.a[i]; - result = ReadFfElement(&ps->Fq3, &tmp_str, sizeof(tmp_str), tmp); - BREAK_ON_EPID_ERROR(result); - // tmp *= alpha_q[i] - result = FfMul(&ps->Fq3, ps->alpha_q[i], tmp, tmp); - BREAK_ON_EPID_ERROR(result); - // b += tmp - result = FfAdd(&ps->Fq3, tmp, b, b); - BREAK_ON_EPID_ERROR(result); - } - BREAK_ON_EPID_ERROR(result); - result = kEpidNoErr; - } while (0); - - EpidZeroMemory(&a_str, sizeof(a_str)); - EpidZeroMemory(&tmp_str, sizeof(tmp_str)); - DeleteFfElement(&tmp); - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/tatepairing.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/tatepairing.h deleted file mode 100644 index 3abeb74804..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/tatepairing.h +++ /dev/null @@ -1,120 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Intel(R) EPID 1.1 Pairing interface. - */ - -#ifndef EPID_COMMON_MATH_TATEPAIRING_H_ -#define EPID_COMMON_MATH_TATEPAIRING_H_ - -#include "epid/common/errors.h" -#include "epid/common/types.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/ecgroup.h" - -/// EPID 1.1 pairing operations -/*! - - \defgroup Epid11PairingPrimitives EPID 1.1 specific pairing - Provides APIs for defining and using a pairing relationship between two - Elliptic curve groups. - - These pairing operations are intended to support Intel(R) EPID - 1.1 verification. - - \ingroup PairingPrimitives - \see EPID 1.1 - support - @{ -*/ - -/// A pairing -typedef struct Epid11PairingState Epid11PairingState; - -/// Constructs a new Tate pairing state. -/*! - Allocates memory and creates a new pairing state for Tate pairing. - - Use DeleteEpid11PairingState() to free memory. - - This pairing operation is intended to support Intel(R) EPID - 1.1 verification. - - \param[in] ga - The EcGroup from which the first parameter of the pairing will be taken. - \param[in] gb - The EcGroup from which the second parameter of the pairing will be taken. - \param[in] ff - The result finite field. Must be a Fq12 field. - \param[out] ps - Newly constructed pairing state. - - \returns ::EpidStatus - - \see DeleteEpid11PairingState - \see EPID 1.1 - support -*/ -EpidStatus NewEpid11PairingState(EcGroup const* ga, EcGroup const* gb, - FiniteField const* ff, - Epid11PairingState** ps); - -/// Frees a previously allocated by Epid11PairingState. -/*! - Frees memory pointed to by pairing state. Nulls the pointer. - - This pairing operation is intended to support Intel(R) EPID - 1.1 verification. - - \param[in] ps - The pairing state. Can be NULL. - - \see NewEpid11PairingState - \see EPID 1.1 - support -*/ -void DeleteEpid11PairingState(Epid11PairingState** ps); - -/// Computes a Tate Pairing for two parameters. -/*! -This pairing operation is intended to support Intel(R) EPID -1.1 verification. It frees memory pointed to by an Intel(R) EPID -1.1 pairing state. - - \param[in] ps - The pairing state. - \param[in] a - The first value to pair. Must be in ga. - \param[in] b - The second value to pair. Must be in gb. - \param[out] d - The result of the pairing. Must be in ff. - - \returns ::EpidStatus - - \see EPID 1.1 - support -*/ -EpidStatus Epid11Pairing(Epid11PairingState* ps, EcPoint const* a, - EcPoint const* b, FfElement* d); - -/*! - @} -*/ - -#endif // EPID_COMMON_MATH_TATEPAIRING_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/bignum-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/bignum-test.cc deleted file mode 100644 index bd8c360af2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/bignum-test.cc +++ /dev/null @@ -1,533 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief BigNum unit tests. - */ - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/bignum.h" -} - -namespace { - -// Use Test Fixture for SetUp and TearDown -class BigNumTest : public ::testing::Test { - public: - static const BigNumStr str_0; - static const BigNumStr str_1; - static const BigNumStr str_2; - static const BigNumStr str_big; - static const BigNumStr str_2big; - static const BigNumStr str_large_m1; - static const BigNumStr str_large; - static const BigNumStr str_large_p1; - static const BigNumStr str_32byte_high_bit_set; - static const BigNumStr str_32byte_high; - static const std::vector vec_33byte_low; - virtual void SetUp() {} - - virtual void TearDown() {} - - ::testing::AssertionResult CompareBigNumStr(const BigNumStr* expected, - const BigNumStr* actual); - - ::testing::AssertionResult CompareBigNum(const BigNum* expected, - const BigNum* actual); -}; - -const BigNumStr BigNumTest::str_0{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -const BigNumStr BigNumTest::str_1{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; -const BigNumStr BigNumTest::str_2{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}; -const BigNumStr BigNumTest::str_big{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const BigNumStr BigNumTest::str_2big{ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const BigNumStr BigNumTest::str_large_m1{ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0C}; - -/// Intel(R) EPID 2.0 parameter p -const BigNumStr BigNumTest::str_large{ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}; -const BigNumStr BigNumTest::str_large_p1{ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0E}; -const BigNumStr BigNumTest::str_32byte_high{ - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; -const BigNumStr BigNumTest::str_32byte_high_bit_set{ - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const std::vector BigNumTest::vec_33byte_low{ - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -::testing::AssertionResult BigNumTest::CompareBigNumStr( - const BigNumStr* expected, const BigNumStr* actual) { - int size = sizeof(BigNumStr); - unsigned char* expected_str = (unsigned char*)expected; - unsigned char* actual_str = (unsigned char*)actual; - for (int i = 0; i < size; ++i) { - if (expected_str[i] != actual_str[i]) { - return ::testing::AssertionFailure() - << "Mismatch at " << i << " : Expected " << std::hex - << expected_str[i] << " Found " << std::hex << actual_str[i]; - } - } - - return ::testing::AssertionSuccess(); -} - -::testing::AssertionResult BigNumTest::CompareBigNum(const BigNum* expected_bn, - const BigNum* actual_bn) { - size_t size = 0; - std::vector expected_str; - std::vector actual_str; - // Use an extra huge size so we have plenty of room to check - // overflow tests. This assumes no tests try to create a number - // bigger than 64 bytes. - size = sizeof(BigNumStr) * 2; - expected_str.resize(size, 0); - actual_str.resize(size, 0); - - THROW_ON_EPIDERR(WriteBigNum(expected_bn, size, &expected_str[0])); - THROW_ON_EPIDERR(WriteBigNum(actual_bn, size, &actual_str[0])); - - for (size_t i = 0; i < size; ++i) { - if (expected_str[i] != actual_str[i]) { - return ::testing::AssertionFailure() << "Numbers do not match"; - } - } - - return ::testing::AssertionSuccess(); -} - -/////////////////////////////////////////////////////////////////////// -// Create / Destroy - -TEST_F(BigNumTest, NewCanCreate256BitBigNum) { - BigNum* bn = nullptr; - EXPECT_EQ(kEpidNoErr, NewBigNum(32, &bn)); - DeleteBigNum(&bn); -} - -TEST_F(BigNumTest, NewFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, NewBigNum(sizeof(BigNumStr), NULL)); -} - -TEST_F(BigNumTest, NewFailsGivenSizeZero) { - BigNum* bn = nullptr; - EXPECT_EQ(kEpidBadArgErr, NewBigNum(0, &bn)); - DeleteBigNum(&bn); -} - -TEST_F(BigNumTest, DeleteBigNumNullsPointer) { - BigNum* bn = nullptr; - THROW_ON_EPIDERR(NewBigNum(sizeof(BigNumStr), &bn)); - DeleteBigNum(&bn); - EXPECT_EQ(nullptr, bn); -} - -TEST_F(BigNumTest, DeleteWorksGivenNullPointer) { - BigNum* bn = nullptr; - DeleteBigNum(nullptr); - EXPECT_EQ(nullptr, bn); -} - -/////////////////////////////////////////////////////////////////////// -// Serialization - -TEST_F(BigNumTest, ReadFailsGivenNullPtr) { - BigNum* bn = nullptr; - THROW_ON_EPIDERR(NewBigNum(sizeof(BigNumStr), &bn)); - EXPECT_EQ(kEpidBadArgErr, ReadBigNum(NULL, sizeof(BigNumStr), bn)); - EXPECT_EQ(kEpidBadArgErr, - ReadBigNum(&this->str_large, sizeof(BigNumStr), NULL)); - DeleteBigNum(&bn); -} - -TEST_F(BigNumTest, ReadFailsGivenInvalidBufferSize) { - BigNumObj bn(32); - EXPECT_EQ(kEpidBadArgErr, ReadBigNum(&this->str_0, 0, bn)); - EXPECT_EQ(kEpidBadArgErr, - ReadBigNum(&this->str_0, std::numeric_limits::max(), bn)); -#if (SIZE_MAX >= 0x100000001) // When size_t value allowed to be 0x100000001 - EXPECT_EQ(kEpidBadArgErr, ReadBigNum(&this->str_0, 0x100000001, bn)); -#endif -} - -TEST_F(BigNumTest, ReadFailsGivenTooBigBuffer) { - BigNum* bn = nullptr; - THROW_ON_EPIDERR(NewBigNum(sizeof(BigNumStr), &bn)); - EXPECT_NE(kEpidNoErr, ReadBigNum(&this->vec_33byte_low[0], - this->vec_33byte_low.size(), bn)); - DeleteBigNum(&bn); -} - -TEST_F(BigNumTest, WriteFailsGivenNullPtr) { - BigNum* bn = nullptr; - BigNumStr str = {0}; - THROW_ON_EPIDERR(NewBigNum(sizeof(BigNumStr), &bn)); - EXPECT_EQ(kEpidBadArgErr, WriteBigNum(NULL, sizeof(str), &str)); - EXPECT_EQ(kEpidBadArgErr, WriteBigNum(bn, 0, NULL)); - DeleteBigNum(&bn); -} - -TEST_F(BigNumTest, WriteFailsGivenTooSmallBuffer) { - BigNumStr str; - BigNumObj bn(this->vec_33byte_low); - EXPECT_NE(kEpidNoErr, WriteBigNum(bn, sizeof(str), &str)); -} - -TEST_F(BigNumTest, ReadCanDeSerializeBigNumStrZero) { - BigNumObj bn_ref; - BigNumObj bn; - EXPECT_EQ(kEpidNoErr, ReadBigNum(&this->str_0, sizeof(this->str_0), bn)); - // No way to check this yet -} - -TEST_F(BigNumTest, ReadCanDeSerializeBigNum) { - BigNumObj bn; - EXPECT_EQ(kEpidNoErr, - ReadBigNum(&this->str_large, sizeof(this->str_large), bn)); - // No way to check this yet -} - -TEST_F(BigNumTest, WriteCanSerializeBigNumZero) { - BigNumObj bn; // defaults to 0 - BigNumStr str; - EXPECT_EQ(kEpidNoErr, WriteBigNum(bn, sizeof(str), &str)); - EXPECT_TRUE(CompareBigNumStr(&str, &this->str_0)); -} - -TEST_F(BigNumTest, DeSerializeFollowedBySerializeHasSameValue) { - BigNumStr str; - BigNumObj bn; - EXPECT_EQ(kEpidNoErr, - ReadBigNum(&this->str_large, sizeof(this->str_large), bn)); - EXPECT_EQ(kEpidNoErr, WriteBigNum(bn, sizeof(str), &str)); - EXPECT_TRUE(CompareBigNumStr(&this->str_large, &str)); -} - -/////////////////////////////////////////////////////////////////////// -// Addition - -TEST_F(BigNumTest, AddBadArgumentsFail) { - BigNumObj bn; - EXPECT_NE(kEpidNoErr, BigNumAdd(nullptr, nullptr, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumAdd(bn, nullptr, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumAdd(nullptr, bn, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumAdd(nullptr, nullptr, bn)); - EXPECT_NE(kEpidNoErr, BigNumAdd(bn, bn, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumAdd(nullptr, bn, bn)); - EXPECT_NE(kEpidNoErr, BigNumAdd(bn, nullptr, bn)); -} - -TEST_F(BigNumTest, AddZeroIsIdentity) { - BigNumObj bn; - BigNumObj bn_0(this->str_0); - BigNumObj bn_large(this->str_large); - EXPECT_EQ(kEpidNoErr, BigNumAdd(bn_large, bn_0, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_large)); -} - -TEST_F(BigNumTest, AddOneIncrements) { - BigNumObj bn; - BigNumObj bn_1(this->str_1); - BigNumObj bn_large(this->str_large); - BigNumObj bn_large_p1(this->str_large_p1); - EXPECT_EQ(kEpidNoErr, BigNumAdd(bn_large, bn_1, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_large_p1)); -} - -TEST_F(BigNumTest, AddOneTo32ByteInTo32BytesFails) { - BigNumObj bn(32); - BigNumObj bn_1(this->str_1); - BigNumObj bn_32high(this->str_32byte_high); - EXPECT_NE(kEpidNoErr, BigNumAdd(bn_32high, bn_1, bn)); -} - -TEST_F(BigNumTest, AddOneTo32ByteInTo33BytesIncrements) { - BigNumObj bn(33); - BigNumObj bn_1(this->str_1); - BigNumObj bn_32high(this->str_32byte_high); - BigNumObj bn_33low(this->vec_33byte_low); - EXPECT_EQ(kEpidNoErr, BigNumAdd(bn_32high, bn_1, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_33low)); -} - -/////////////////////////////////////////////////////////////////////// -// Subtraction - -TEST_F(BigNumTest, SubBadArgumentsFail) { - BigNumObj bn; - EXPECT_NE(kEpidNoErr, BigNumSub(nullptr, nullptr, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumSub(bn, nullptr, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumSub(nullptr, bn, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumSub(nullptr, nullptr, bn)); - EXPECT_NE(kEpidNoErr, BigNumSub(bn, bn, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumSub(nullptr, bn, bn)); - EXPECT_NE(kEpidNoErr, BigNumSub(bn, nullptr, bn)); -} - -TEST_F(BigNumTest, SubOneFromZeroFails) { - BigNumObj bn; - BigNumObj bn_0(this->str_0); - BigNumObj bn_1(this->str_1); - EXPECT_EQ(kEpidUnderflowErr, BigNumSub(bn_0, bn_1, bn)); -} - -TEST_F(BigNumTest, SubZeroIsIdentity) { - BigNumObj bn; - BigNumObj bn_0(this->str_0); - BigNumObj bn_large(this->str_large); - EXPECT_EQ(kEpidNoErr, BigNumSub(bn_large, bn_0, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_large)); -} - -TEST_F(BigNumTest, SubOneDecrements) { - BigNumObj bn; - BigNumObj bn_1(this->str_1); - BigNumObj bn_large(this->str_large); - BigNumObj bn_large_m1(this->str_large_m1); - EXPECT_EQ(kEpidNoErr, BigNumSub(bn_large, bn_1, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_large_m1)); -} - -/////////////////////////////////////////////////////////////////////// -// Multiplication - -TEST_F(BigNumTest, MulBadArgumentsFail) { - BigNumObj bn; - EXPECT_NE(kEpidNoErr, BigNumMul(nullptr, nullptr, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumMul(bn, nullptr, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumMul(nullptr, bn, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumMul(nullptr, nullptr, bn)); - EXPECT_NE(kEpidNoErr, BigNumMul(bn, bn, nullptr)); - EXPECT_NE(kEpidNoErr, BigNumMul(nullptr, bn, bn)); - EXPECT_NE(kEpidNoErr, BigNumMul(bn, nullptr, bn)); -} - -TEST_F(BigNumTest, MulOneIsIdentity) { - BigNumObj bn; - BigNumObj bn_1(this->str_1); - BigNumObj bn_large(this->str_large); - EXPECT_EQ(kEpidNoErr, BigNumMul(bn_large, bn_1, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_large)); -} - -TEST_F(BigNumTest, MulTwoIsDouble) { - BigNumObj bn; - BigNumObj bn_2(this->str_2); - BigNumObj bn_big(this->str_big); - BigNumObj bn_2big(this->str_2big); - EXPECT_EQ(kEpidNoErr, BigNumMul(bn_big, bn_2, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_2big)); -} - -TEST_F(BigNumTest, MulZeroIsZero) { - BigNumObj bn; - BigNumObj bn_0(this->str_0); - BigNumObj bn_large(this->str_large); - EXPECT_EQ(kEpidNoErr, BigNumMul(bn_large, bn_0, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_0)); -} - -TEST_F(BigNumTest, MulReportsErrorGivenOverflow) { - BigNumObj bn(32); - BigNumObj bn_2(this->str_2); - BigNumObj bn_high_bit_set(this->str_32byte_high_bit_set); - EXPECT_EQ(kEpidBadArgErr, BigNumMul(bn_high_bit_set, bn_2, bn)); -} - -TEST_F(BigNumTest, MulWorksWith264BitValue) { - BigNumObj bn(33); - BigNumObj bn_2(this->str_2); - BigNumObj bn_high_bit_set(this->str_32byte_high_bit_set); - BigNumObj bn_33low(this->vec_33byte_low); - EXPECT_EQ(kEpidNoErr, BigNumMul(bn_high_bit_set, bn_2, bn)); - EXPECT_TRUE(CompareBigNum(bn, bn_33low)); -} - -/////////////////////////////////////////////////////////////////////// -// Division - -TEST_F(BigNumTest, DivFailsGivenNullPointer) { - BigNumObj a, b, q, r; - EXPECT_EQ(kEpidBadArgErr, BigNumDiv(nullptr, b, q, r)); - EXPECT_EQ(kEpidBadArgErr, BigNumDiv(a, nullptr, q, r)); - EXPECT_EQ(kEpidBadArgErr, BigNumDiv(a, b, nullptr, r)); - EXPECT_EQ(kEpidBadArgErr, BigNumDiv(a, b, q, nullptr)); -} - -TEST_F(BigNumTest, DivFailsGivenDivByZero) { - BigNumObj a; - BigNumObj zero(this->str_0); - BigNumObj q, r; - EXPECT_EQ(kEpidBadArgErr, BigNumDiv(a, zero, q, r)); -} - -TEST_F(BigNumTest, DivToOneKeepsOriginal) { - BigNumObj a(this->str_large); - BigNumObj zero(this->str_0); - BigNumObj one(this->str_1); - BigNumObj q, r; - EXPECT_EQ(kEpidNoErr, BigNumDiv(a, one, q, r)); - EXPECT_TRUE(CompareBigNum(a, q)); - EXPECT_TRUE(CompareBigNum(zero, r)); -} - -TEST_F(BigNumTest, DivToItselfIsIdentity) { - BigNumObj a(this->str_large); - BigNumObj zero(this->str_0); - BigNumObj one(this->str_1); - BigNumObj q, r; - EXPECT_EQ(kEpidNoErr, BigNumDiv(a, a, q, r)); - EXPECT_TRUE(CompareBigNum(one, q)); - EXPECT_TRUE(CompareBigNum(zero, r)); -} - -TEST_F(BigNumTest, DivOneByTwoIsZero) { - BigNumObj zero(this->str_0); - BigNumObj one(this->str_1); - BigNumObj two(this->str_2); - BigNumObj q, r; - EXPECT_EQ(kEpidNoErr, BigNumDiv(one, two, q, r)); - EXPECT_TRUE(CompareBigNum(zero, q)); - EXPECT_TRUE(CompareBigNum(one, r)); -} - -/////////////////////////////////////////////////////////////////////// -// IsEven - -TEST_F(BigNumTest, IsEvenFailsGivenNullPointer) { - BigNumObj zero(this->str_0); - bool r; - EXPECT_EQ(kEpidBadArgErr, BigNumIsEven(nullptr, &r)); - EXPECT_EQ(kEpidBadArgErr, BigNumIsEven(zero, nullptr)); -} - -TEST_F(BigNumTest, IsEvenPassesEvenNumbers) { - BigNumObj zero(this->str_0); - BigNumObj two(this->str_2); - BigNumObj big(this->str_big); - bool r; - EXPECT_EQ(kEpidNoErr, BigNumMul(big, two, big)); - EXPECT_EQ(kEpidNoErr, BigNumIsEven(zero, &r)); - EXPECT_EQ(kEpidNoErr, BigNumIsEven(two, &r)); - EXPECT_EQ(kEpidNoErr, BigNumIsEven(big, &r)); -} - -TEST_F(BigNumTest, IsEvenFailsOddNumbers) { - BigNumObj zero(this->str_0); - BigNumObj one(this->str_1); - BigNumObj two(this->str_2); - BigNumObj big(this->str_big); - bool r; - EXPECT_EQ(kEpidNoErr, BigNumMul(big, two, big)); - EXPECT_EQ(kEpidNoErr, BigNumAdd(big, one, big)); - EXPECT_EQ(kEpidNoErr, BigNumIsEven(one, &r)); - EXPECT_EQ(kEpidNoErr, BigNumIsEven(big, &r)); -} - -/////////////////////////////////////////////////////////////////////// -// IsZero -TEST_F(BigNumTest, IsZeroFailsGivenNullPointer) { - BigNumObj zero(this->str_0); - bool r; - EXPECT_EQ(kEpidBadArgErr, BigNumIsZero(nullptr, &r)); - EXPECT_EQ(kEpidBadArgErr, BigNumIsZero(zero, nullptr)); -} - -TEST_F(BigNumTest, IsZeroPassesZero) { - BigNumObj zero(this->str_0); - bool r; - EXPECT_EQ(kEpidNoErr, BigNumIsZero(zero, &r)); -} - -TEST_F(BigNumTest, IsZeroFailsNonZero) { - BigNumObj one(this->str_1); - BigNumObj two(this->str_2); - BigNumObj big(this->str_big); - bool r; - EXPECT_EQ(kEpidNoErr, BigNumIsZero(one, &r)); - EXPECT_EQ(kEpidNoErr, BigNumIsZero(two, &r)); - EXPECT_EQ(kEpidNoErr, BigNumIsZero(big, &r)); -} - -/////////////////////////////////////////////////////////////////////// -// Pow2N -TEST_F(BigNumTest, Pow2NFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, BigNumPow2N(1, nullptr)); -} - -TEST_F(BigNumTest, Pow2NZeroGivesOne) { - BigNumObj r; - BigNumObj one(this->str_1); - EXPECT_EQ(kEpidNoErr, BigNumPow2N(0, r)); - EXPECT_TRUE(CompareBigNum(one, r)); -} - -TEST_F(BigNumTest, Pow2NOneGivesTwo) { - BigNumObj r; - BigNumObj two(this->str_2); - EXPECT_EQ(kEpidNoErr, BigNumPow2N(1, r)); - EXPECT_TRUE(CompareBigNum(two, r)); -} - -TEST_F(BigNumTest, Pow2NGivesPow2n) { - unsigned int n = 2; - BigNumObj r; - BigNumObj two(this->str_2); - BigNumObj expect; - EXPECT_EQ(kEpidNoErr, BigNumMul(two, two, expect)); - for (n = 2; n < 4; n++) { - EXPECT_EQ(kEpidNoErr, BigNumPow2N(n, r)); - EXPECT_TRUE(CompareBigNum(expect, r)); - EXPECT_EQ(kEpidNoErr, BigNumMul(expect, two, expect)); - n++; - } -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecdsa_sign-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecdsa_sign-test.cc deleted file mode 100644 index a9759cb09a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecdsa_sign-test.cc +++ /dev/null @@ -1,228 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcdsaSignBuffer unit tests. - */ - -#include -#include -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/common/math/ecdsa.h" -} - -#include "epid/common-testhelper/prng-testhelper.h" - -bool operator==(EcdsaSignature const& lhs, EcdsaSignature const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -namespace { -/// Fill message buffer -/*! - - Fill a message buffer - - \param[in] buf - pointer to buffer to be filled - \param[in] buf_len - size of buffer in bytes - - \returns ::EpidStatus -*/ -static EpidStatus FillMessage(uint8_t* buf, size_t buf_len) { - if (!buf) return kEpidBadArgErr; - if (buf_len <= 0) return kEpidBadArgErr; - for (size_t n = 0; n < buf_len; n++) { - buf[n] = (uint8_t)n; - } - return kEpidNoErr; -} -class EcdsaSignBufferTest : public ::testing::Test { - public: - /// Signer's static private key (ECDSA-256 RFC 4754 Test Vector) - static const EcdsaPrivateKey kPrivkey0; - /// Signer's static public key (ECDSA-256 RFC 4754 Test Vector) - static const EcdsaPublicKey kPubkey0; - /// Signer's ephemeral private key (ECDSA-256 RFC 4754 Test Vector) - static const EcdsaPrivateKey kEphPrivkey0; - /// Message (ECDSA-256 RFC 4754 Test Vector) - static const std::vector kMsg0; - /// Signature of msg0 with privkey0 and kEphPrivkey0 - static const EcdsaSignature kSig_msg0_key0; - /// Signature of empty msg with privkey0 and kEphPrivkey0 - static const EcdsaSignature kSig_emptymsg_key0; - /// Signature of 1M msg with privkey0 and kEphPrivkey0 - static const EcdsaSignature kSig_1Mmsg_key0; -}; - -const EcdsaPrivateKey EcdsaSignBufferTest::kPrivkey0 = { - 0xDC, 0x51, 0xD3, 0x86, 0x6A, 0x15, 0xBA, 0xCD, 0xE3, 0x3D, 0x96, - 0xF9, 0x92, 0xFC, 0xA9, 0x9D, 0xA7, 0xE6, 0xEF, 0x09, 0x34, 0xE7, - 0x09, 0x75, 0x59, 0xC2, 0x7F, 0x16, 0x14, 0xC8, 0x8A, 0x7F}; -const EcdsaPublicKey EcdsaSignBufferTest::kPubkey0 = { - 0x24, 0x42, 0xA5, 0xCC, 0x0E, 0xCD, 0x01, 0x5F, 0xA3, 0xCA, 0x31, - 0xDC, 0x8E, 0x2B, 0xBC, 0x70, 0xBF, 0x42, 0xD6, 0x0C, 0xBC, 0xA2, - 0x00, 0x85, 0xE0, 0x82, 0x2C, 0xB0, 0x42, 0x35, 0xE9, 0x70, 0x6F, - 0xC9, 0x8B, 0xD7, 0xE5, 0x02, 0x11, 0xA4, 0xA2, 0x71, 0x02, 0xFA, - 0x35, 0x49, 0xDF, 0x79, 0xEB, 0xCB, 0x4B, 0xF2, 0x46, 0xB8, 0x09, - 0x45, 0xCD, 0xDF, 0xE7, 0xD5, 0x09, 0xBB, 0xFD, 0x7D}; -const EcdsaPrivateKey EcdsaSignBufferTest::kEphPrivkey0 = { - 0x9E, 0x56, 0xF5, 0x09, 0x19, 0x67, 0x84, 0xD9, 0x63, 0xD1, 0xC0, - 0xA4, 0x01, 0x51, 0x0E, 0xE7, 0xAD, 0xA3, 0xDC, 0xC5, 0xDE, 0xE0, - 0x4B, 0x15, 0x4B, 0xF6, 0x1A, 0xF1, 0xD5, 0xA6, 0xDE, 0xCE}; -/* - -Ephemeral public key expected to be generated for kEphPrivkey0: -gkx: ephemeral public key: -CB28E099 9B9C7715 FD0A80D8 E47A7707 9716CBBF 917DD72E 97566EA1 C066957C -gky: ephemeral public key: -2B57C023 5FB74897 68D058FF 4911C20F DBE71E36 99D91339 AFBB903E E17255DC -*/ - -const std::vector EcdsaSignBufferTest::kMsg0 = {'a', 'b', 'c'}; - -const EcdsaSignature EcdsaSignBufferTest::kSig_msg0_key0 = { - 0xCB, 0x28, 0xE0, 0x99, 0x9B, 0x9C, 0x77, 0x15, 0xFD, 0x0A, 0x80, - 0xD8, 0xE4, 0x7A, 0x77, 0x07, 0x97, 0x16, 0xCB, 0xBF, 0x91, 0x7D, - 0xD7, 0x2E, 0x97, 0x56, 0x6E, 0xA1, 0xC0, 0x66, 0x95, 0x7C, 0x86, - 0xFA, 0x3B, 0xB4, 0xE2, 0x6C, 0xAD, 0x5B, 0xF9, 0x0B, 0x7F, 0x81, - 0x89, 0x92, 0x56, 0xCE, 0x75, 0x94, 0xBB, 0x1E, 0xA0, 0xC8, 0x92, - 0x12, 0x74, 0x8B, 0xFF, 0x3B, 0x3D, 0x5B, 0x03, 0x15, -}; -const EcdsaSignature EcdsaSignBufferTest::kSig_emptymsg_key0 = { - 0xCB, 0x28, 0xE0, 0x99, 0x9B, 0x9C, 0x77, 0x15, 0xFD, 0x0A, 0x80, - 0xD8, 0xE4, 0x7A, 0x77, 0x07, 0x97, 0x16, 0xCB, 0xBF, 0x91, 0x7D, - 0xD7, 0x2E, 0x97, 0x56, 0x6E, 0xA1, 0xC0, 0x66, 0x95, 0x7C, 0x8c, - 0x09, 0x5c, 0xec, 0xd5, 0xcf, 0xec, 0x1e, 0xa5, 0xb6, 0xa6, 0x44, - 0x1e, 0x12, 0x3d, 0x30, 0xff, 0x97, 0xdd, 0x4b, 0x44, 0xc1, 0x70, - 0x7c, 0x95, 0x9d, 0x7f, 0x46, 0x86, 0x73, 0x55, 0xae, -}; -const EcdsaSignature EcdsaSignBufferTest::kSig_1Mmsg_key0 = { - 0xCB, 0x28, 0xE0, 0x99, 0x9B, 0x9C, 0x77, 0x15, 0xFD, 0x0A, 0x80, - 0xD8, 0xE4, 0x7A, 0x77, 0x07, 0x97, 0x16, 0xCB, 0xBF, 0x91, 0x7D, - 0xD7, 0x2E, 0x97, 0x56, 0x6E, 0xA1, 0xC0, 0x66, 0x95, 0x7C, 0xf9, - 0xa5, 0x3a, 0xbf, 0x22, 0xe7, 0xf3, 0x97, 0x5a, 0x8c, 0xce, 0xb8, - 0xca, 0x7b, 0xae, 0x9d, 0xd8, 0x7f, 0x43, 0xa9, 0xef, 0x40, 0x78, - 0x56, 0x37, 0xcc, 0xb2, 0xda, 0x1e, 0x04, 0x31, 0x03, -}; - -static int __STDCALL constant_32byte_endianswap_prng(unsigned int* random_data, - int num_bits, - void* user_data) { - if (256 != num_bits) return -1; - for (int i = 0; i < 32; i++) { - ((uint8_t*)random_data)[i] = ((uint8_t*)user_data)[31 - i]; - } - return 0; -} - -static int __STDCALL contextless_kEphPrivkey0_prng(unsigned int* random_data, - int num_bits, - void* user_data) { - (void)user_data; - return constant_32byte_endianswap_prng( - random_data, num_bits, - (void*)(EcdsaSignBufferTest::kEphPrivkey0.data.data)); -} - -TEST_F(EcdsaSignBufferTest, FailsGivenNullPtr) { - uint8_t msg[1]; - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - EcdsaSignature signature; - - EXPECT_EQ(kEpidBadArgErr, - EcdsaSignBuffer(nullptr, sizeof(msg), &this->kPrivkey0, rnd_func, - rnd_param, &signature)); - EXPECT_EQ(kEpidBadArgErr, EcdsaSignBuffer(msg, sizeof(msg), nullptr, rnd_func, - rnd_param, &signature)); - EXPECT_EQ(kEpidBadArgErr, EcdsaSignBuffer(msg, sizeof(msg), &this->kPrivkey0, - nullptr, rnd_param, &signature)); - EXPECT_EQ(kEpidBadArgErr, EcdsaSignBuffer(msg, sizeof(msg), &this->kPrivkey0, - rnd_func, rnd_param, nullptr)); -} - -TEST_F(EcdsaSignBufferTest, SignsEmptyMessage) { - uint8_t msg[1]; - EcdsaSignature signature; - - EXPECT_EQ( - kEpidNoErr, - EcdsaSignBuffer(msg, 0, &this->kPrivkey0, constant_32byte_endianswap_prng, - (void*)&(this->kEphPrivkey0), &signature)); - EXPECT_EQ(this->kSig_emptymsg_key0, signature); - EXPECT_EQ(kEpidNoErr, - EcdsaSignBuffer(nullptr, 0, &this->kPrivkey0, - constant_32byte_endianswap_prng, - (void*)&(this->kEphPrivkey0), &signature)); - EXPECT_EQ(this->kSig_emptymsg_key0, signature); -} - -TEST_F(EcdsaSignBufferTest, WorksGivenNoRndParam) { - EcdsaSignature signature; - - EXPECT_EQ( - kEpidNoErr, - EcdsaSignBuffer(this->kMsg0.data(), this->kMsg0.size(), &this->kPrivkey0, - contextless_kEphPrivkey0_prng, nullptr, &signature)); - EXPECT_EQ(this->kSig_msg0_key0, signature); -} - -TEST_F(EcdsaSignBufferTest, SignsShortMessage) { - EcdsaSignature signature; - - EXPECT_EQ(kEpidNoErr, - EcdsaSignBuffer(this->kMsg0.data(), this->kMsg0.size(), - &this->kPrivkey0, constant_32byte_endianswap_prng, - (void*)&(this->kEphPrivkey0), &signature)); - EXPECT_EQ(this->kSig_msg0_key0, signature); -} - -TEST_F(EcdsaSignBufferTest, SignsLongMessage) { - std::vector msg_1mb(0x100000); - FillMessage(msg_1mb.data(), msg_1mb.size()); - - EcdsaSignature signature; - - EXPECT_EQ(kEpidNoErr, - EcdsaSignBuffer(msg_1mb.data(), msg_1mb.size(), &this->kPrivkey0, - constant_32byte_endianswap_prng, - (void*)&(this->kEphPrivkey0), &signature)); - EXPECT_EQ(this->kSig_1Mmsg_key0, signature); -} - -TEST_F(EcdsaSignBufferTest, FailsGivenInvalidPrivateKey) { - uint8_t msg[1] = {0x00}; - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - EcdsaSignature signature; - - EcdsaPrivateKey invalid_prikey; - memset(&invalid_prikey, 0xff, sizeof(invalid_prikey)); - - EXPECT_EQ(kEpidBadArgErr, EcdsaSignBuffer(msg, sizeof(msg), &invalid_prikey, - rnd_func, rnd_param, &signature)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecdsa_verify-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecdsa_verify-test.cc deleted file mode 100644 index 7f28330343..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecdsa_verify-test.cc +++ /dev/null @@ -1,278 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcdsaVerifyBuffer unit tests. - */ - -#include -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/common/math/ecdsa.h" -} - -namespace { - -/// Fill message buffer -/*! - - Fill a message buffer - - \param[in] buf - pointer to buffer to be filled - \param[in] buf_len - size of buffer in bytes - - \returns ::EpidStatus -*/ -static EpidStatus fill_message(uint8_t* buf, size_t buf_len) { - if (!buf) return kEpidBadArgErr; - if (buf_len <= 0) return kEpidBadArgErr; - for (size_t n = 0; n < buf_len; n++) { - buf[n] = (uint8_t)n; - } - return kEpidNoErr; -} -class EcdsaVerifyBufferTest : public ::testing::Test { - public: - /// an Ecdsa key pair - /// Regular - static const EcdsaPrivateKey kPrivkey0; - static const EcdsaPublicKey kPubkey0; - /// an Ecdsa key pair - // Regular - static const EcdsaPrivateKey kPrivkey1; - static const EcdsaPublicKey kPubkey1; - /// a message - static const std::vector kMsg0; - /// a message - static const std::vector kMsg1; - /// signature of msg0 with privkey0 - static const EcdsaSignature kSig_msg0_key0; - /// signature of msg0 with privkey1 - static const EcdsaSignature kSig_msg0_key1; - /// signature of msg1 with privkey0 - static const EcdsaSignature kSig_msg1_key0; - /// signature of msg1 with privkey1 - static const EcdsaSignature kSig_msg1_key1; - /// signature of empty msg with privkey0 - static const EcdsaSignature kSig_emptymsg_key0; - /// signature of empty msg with privkey1 - static const EcdsaSignature kSig_emptymsg_key1; - /// signature of 1M msg with privkey0 - static const EcdsaSignature kSig_1Mmsg_key0; - /// signature of 1M msg with privkey1 - static const EcdsaSignature kSig_1Mmsg_key1; -}; - -const EcdsaPrivateKey EcdsaVerifyBufferTest::kPrivkey0 = { - 0xfc, 0x0e, 0x32, 0x3b, 0x5d, 0xf6, 0x95, 0x43, 0x99, 0x0f, 0x46, - 0x37, 0xb0, 0x19, 0xb3, 0xbb, 0xba, 0xd5, 0x91, 0x63, 0x2d, 0x4a, - 0x5a, 0x1e, 0xd8, 0x09, 0x4f, 0x44, 0xa9, 0x5c, 0xd8, 0x87, -}; -const EcdsaPublicKey EcdsaVerifyBufferTest::kPubkey0 = { - 0x32, 0x05, 0x28, 0x50, 0x53, 0x0c, 0x62, 0xdf, 0x17, 0xc7, 0xcb, - 0x8c, 0xd3, 0x6f, 0x05, 0xe8, 0xbb, 0xbb, 0x6a, 0xf4, 0x43, 0x82, - 0x59, 0xad, 0xd2, 0x56, 0x6c, 0x63, 0xde, 0x06, 0x37, 0x69, 0x7b, - 0x42, 0x9a, 0xda, 0x3c, 0x91, 0xf3, 0xc0, 0xdd, 0xc1, 0xd4, 0x9e, - 0xc2, 0x24, 0x32, 0x09, 0x07, 0x8c, 0xb9, 0xfc, 0xd8, 0x7b, 0x69, - 0xf9, 0x17, 0x1e, 0x35, 0xb4, 0x20, 0x23, 0x45, 0x94, -}; - -const EcdsaPrivateKey EcdsaVerifyBufferTest::kPrivkey1 = { - 0xd6, 0x5a, 0x82, 0x5d, 0xd4, 0xad, 0x28, 0x6f, 0x09, 0x2c, 0x96, - 0x07, 0x0a, 0x96, 0xac, 0x13, 0xc9, 0xfd, 0xcf, 0xf0, 0xbe, 0x08, - 0xcb, 0xbb, 0x4b, 0xba, 0x7e, 0x9e, 0xac, 0x02, 0xe9, 0x7c, -}; -const EcdsaPublicKey EcdsaVerifyBufferTest::kPubkey1 = { - 0x34, 0xb0, 0x88, 0xcc, 0xb7, 0xf3, 0x56, 0xe0, 0x5c, 0x7c, 0xfc, - 0x03, 0x5d, 0x62, 0x72, 0xe4, 0x70, 0x08, 0xcd, 0x6f, 0x4b, 0x29, - 0x0e, 0x2d, 0x86, 0x26, 0x93, 0x52, 0x55, 0xef, 0xb4, 0x45, 0x11, - 0x07, 0xe9, 0xbe, 0x1e, 0x5d, 0xdb, 0x92, 0x64, 0xb6, 0xbf, 0x67, - 0x83, 0x1f, 0xde, 0xaa, 0x72, 0x84, 0xe9, 0x27, 0x5c, 0xd5, 0xbc, - 0x82, 0x07, 0xc9, 0x81, 0xd1, 0x70, 0x07, 0xaa, 0xd5, -}; - -const std::vector EcdsaVerifyBufferTest::kMsg0 = {'m', 's', 'g', '0'}; -const std::vector EcdsaVerifyBufferTest::kMsg1 = {'m', 's', 'g', '1'}; - -const EcdsaSignature EcdsaVerifyBufferTest::kSig_msg0_key0 = { - 0x81, 0xDD, 0x1A, 0x18, 0x35, 0x1E, 0x22, 0x99, 0x85, 0xC5, 0xAA, - 0xE4, 0x78, 0x02, 0xC5, 0x65, 0xF1, 0x39, 0x80, 0x45, 0xF5, 0xFC, - 0xBD, 0xC6, 0x67, 0xBD, 0xC1, 0x93, 0x42, 0xF6, 0x17, 0x0E, 0x45, - 0x19, 0x39, 0xD3, 0x27, 0x1F, 0xA9, 0x2A, 0x14, 0xDD, 0xF1, 0x5A, - 0x81, 0xA8, 0xEC, 0x3B, 0xB4, 0x0B, 0xF8, 0xC9, 0x9A, 0x06, 0xEB, - 0x04, 0x77, 0x19, 0xCB, 0x57, 0x9C, 0xB9, 0xE9, 0x2F, -}; - -const EcdsaSignature EcdsaVerifyBufferTest::kSig_msg0_key1 = { - 0xA9, 0xFC, 0x44, 0x2D, 0x09, 0x9E, 0x15, 0x6C, 0x25, 0xD9, 0x74, - 0x9D, 0xD9, 0xAD, 0xC2, 0x7A, 0xFB, 0xC0, 0xD4, 0xFE, 0xC2, 0x48, - 0x41, 0x80, 0x47, 0x4A, 0x74, 0x8A, 0x62, 0x71, 0x68, 0xFF, 0x51, - 0xDF, 0x47, 0x76, 0xAB, 0xD7, 0xE2, 0xA0, 0x97, 0x6B, 0x04, 0x51, - 0x2B, 0x8F, 0x4D, 0x7E, 0xDB, 0x7B, 0x60, 0x08, 0xC6, 0x51, 0x81, - 0x5E, 0x92, 0x9E, 0x11, 0xDB, 0x9C, 0x16, 0x64, 0x79, -}; -const EcdsaSignature EcdsaVerifyBufferTest::kSig_msg1_key0 = { - 0xA4, 0xD7, 0xF9, 0x80, 0xBA, 0x93, 0x25, 0xA4, 0x43, 0xD4, 0xCE, - 0x6F, 0x7C, 0xD9, 0xA9, 0xD2, 0x24, 0x1B, 0xB8, 0x32, 0xDE, 0xE0, - 0x26, 0x01, 0xA6, 0xC8, 0x57, 0x21, 0xD7, 0x1E, 0xBC, 0x88, 0xA2, - 0x27, 0x8B, 0x51, 0x93, 0x90, 0xC0, 0x0A, 0x3B, 0xA4, 0x7A, 0x9B, - 0x8C, 0x5E, 0xC8, 0x8B, 0x39, 0x5F, 0x3D, 0x82, 0xCE, 0x57, 0x9F, - 0xF7, 0x9A, 0x32, 0x82, 0xEF, 0xF8, 0xC5, 0x8B, 0x22, -}; - -const EcdsaSignature EcdsaVerifyBufferTest::kSig_msg1_key1 = { - 0xC1, 0x0A, 0x01, 0xB3, 0x81, 0x47, 0x02, 0xA4, 0xD2, 0xB1, 0xD6, - 0xF9, 0x25, 0x1F, 0xDF, 0x16, 0x7F, 0x28, 0x7F, 0x04, 0x38, 0xAE, - 0x6D, 0x6E, 0xE7, 0xFC, 0xCB, 0x9E, 0xB6, 0xA4, 0xF6, 0x41, 0x2B, - 0xEA, 0x6B, 0x53, 0x32, 0x7B, 0xB0, 0xB6, 0x8F, 0x21, 0x07, 0x0A, - 0x4C, 0xB7, 0xA9, 0xDE, 0x9F, 0x27, 0x3A, 0xEE, 0x4F, 0xE2, 0xF4, - 0xE3, 0x1E, 0xC3, 0x3F, 0xAA, 0x41, 0xD4, 0xFA, 0xA2, -}; - -const EcdsaSignature EcdsaVerifyBufferTest::kSig_emptymsg_key0 = { - 0xB7, 0xDC, 0x55, 0x35, 0x12, 0xB9, 0xAE, 0x59, 0xAE, 0xE1, 0xB5, - 0x50, 0x20, 0x65, 0x18, 0x84, 0x3B, 0x1E, 0x54, 0xF4, 0x11, 0x4B, - 0x71, 0xBD, 0x12, 0x5E, 0x05, 0x41, 0xAB, 0x6A, 0xF9, 0x20, 0x26, - 0xC9, 0x2B, 0x21, 0x56, 0x62, 0x3F, 0xC3, 0x62, 0xA0, 0xD2, 0x9D, - 0x27, 0x97, 0xF8, 0xE2, 0x59, 0xE7, 0x0E, 0x7E, 0xEE, 0xA7, 0xB5, - 0x11, 0x66, 0xD0, 0xF3, 0x6E, 0x41, 0x76, 0x3C, 0xFE, -}; - -const EcdsaSignature EcdsaVerifyBufferTest::kSig_emptymsg_key1 = { - 0xCB, 0xED, 0xEF, 0xEE, 0x11, 0x68, 0x21, 0x7D, 0x57, 0x4A, 0x37, - 0xB1, 0x96, 0xF0, 0xF8, 0x42, 0x46, 0x00, 0x64, 0xEF, 0x19, 0xA7, - 0xFF, 0x38, 0x8F, 0x3A, 0x25, 0xD5, 0xC4, 0xF3, 0xD0, 0xC4, 0xB0, - 0xC4, 0xC5, 0xB0, 0x58, 0xAD, 0x74, 0xF2, 0x19, 0xEE, 0x0C, 0x98, - 0x6D, 0x5F, 0x4F, 0xB7, 0x9A, 0xE8, 0x25, 0x1B, 0xAD, 0x9E, 0x26, - 0x22, 0xF2, 0xED, 0xB1, 0x8D, 0x3B, 0x02, 0x7F, 0xB1, -}; -const EcdsaSignature EcdsaVerifyBufferTest::kSig_1Mmsg_key0 = { - 0x4A, 0x45, 0xE3, 0xA5, 0xFC, 0x73, 0x86, 0xAF, 0xD8, 0x21, 0x25, - 0x35, 0x13, 0xEB, 0x1B, 0xA7, 0x39, 0x08, 0x21, 0x2A, 0x2A, 0x09, - 0x79, 0x3C, 0xEA, 0x17, 0x67, 0x53, 0x6C, 0xE4, 0xA0, 0x97, 0x36, - 0x98, 0x79, 0x69, 0x1C, 0xF1, 0x21, 0x42, 0x56, 0x48, 0x38, 0x35, - 0x3C, 0xC1, 0x30, 0x7C, 0x49, 0x4F, 0xC9, 0xFA, 0xE1, 0x69, 0xF9, - 0x42, 0x3D, 0x7D, 0x4B, 0x6D, 0xB1, 0xEE, 0x9D, 0x4B, -}; - -const EcdsaSignature EcdsaVerifyBufferTest::kSig_1Mmsg_key1 = { - 0x87, 0xE0, 0x27, 0x51, 0xC1, 0x16, 0x79, 0x8F, 0xCF, 0x82, 0x60, - 0x48, 0x72, 0x04, 0xE1, 0xC4, 0xDA, 0xEE, 0x31, 0x4D, 0x12, 0xF9, - 0xCA, 0x19, 0x1B, 0xDC, 0xA4, 0xCA, 0x8C, 0xCC, 0xBD, 0x2A, 0xD4, - 0x73, 0x2B, 0x6B, 0xE4, 0x9B, 0xA1, 0x56, 0xF2, 0x28, 0x4A, 0xBD, - 0x41, 0x69, 0x98, 0xAB, 0x62, 0x3D, 0x8D, 0xC9, 0x77, 0xE1, 0x98, - 0xF1, 0x53, 0xF5, 0xD0, 0x97, 0x80, 0x89, 0xCB, 0x97, -}; -TEST_F(EcdsaVerifyBufferTest, FailsGivenNullParameters) { - // tests using a trivial message - EXPECT_EQ(kEpidBadArgErr, - EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), &kPubkey0, nullptr)); - EXPECT_EQ(kEpidBadArgErr, EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), - nullptr, &kSig_msg0_key0)); - // tests using a null message - EXPECT_EQ(kEpidBadArgErr, EcdsaVerifyBuffer(nullptr, 0, &kPubkey0, nullptr)); - EXPECT_EQ(kEpidBadArgErr, - EcdsaVerifyBuffer(nullptr, 0, nullptr, &kSig_msg0_key0)); -} - -TEST_F(EcdsaVerifyBufferTest, VerifiesZeroLengthMsg) { - // tests using a non-null message buffer - EXPECT_EQ(kEpidSigValid, - EcdsaVerifyBuffer(kMsg0.data(), 0, &kPubkey0, &kSig_emptymsg_key0)); - EXPECT_EQ(kEpidSigValid, - EcdsaVerifyBuffer(kMsg0.data(), 0, &kPubkey1, &kSig_emptymsg_key1)); - // tests using a null message buffer - EXPECT_EQ(kEpidSigValid, - EcdsaVerifyBuffer(nullptr, 0, &kPubkey0, &kSig_emptymsg_key0)); - EXPECT_EQ(kEpidSigValid, - EcdsaVerifyBuffer(nullptr, 0, &kPubkey1, &kSig_emptymsg_key1)); -} - -TEST_F(EcdsaVerifyBufferTest, VerifiesShortMessage) { - EXPECT_EQ(kEpidSigValid, EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), - &kPubkey0, &kSig_msg0_key0)); - EXPECT_EQ(kEpidSigValid, EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), - &kPubkey1, &kSig_msg0_key1)); - EXPECT_EQ(kEpidSigValid, EcdsaVerifyBuffer(kMsg1.data(), kMsg1.size(), - &kPubkey0, &kSig_msg1_key0)); - EXPECT_EQ(kEpidSigValid, EcdsaVerifyBuffer(kMsg1.data(), kMsg1.size(), - &kPubkey1, &kSig_msg1_key1)); -} - -TEST_F(EcdsaVerifyBufferTest, VerifiesLongMessage) { - std::vector msg_1mb(0x100000); - fill_message(msg_1mb.data(), msg_1mb.size()); - EXPECT_EQ(kEpidSigValid, EcdsaVerifyBuffer(msg_1mb.data(), msg_1mb.size(), - &kPubkey0, &kSig_1Mmsg_key0)); - EXPECT_EQ(kEpidSigValid, EcdsaVerifyBuffer(msg_1mb.data(), msg_1mb.size(), - &kPubkey1, &kSig_1Mmsg_key1)); -} - -TEST_F(EcdsaVerifyBufferTest, FailsGivenWrongKey) { - EXPECT_EQ(kEpidSigInvalid, EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), - &kPubkey1, &kSig_msg0_key0)); - EXPECT_EQ(kEpidSigInvalid, EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), - &kPubkey0, &kSig_msg0_key1)); - EXPECT_EQ(kEpidSigInvalid, EcdsaVerifyBuffer(kMsg1.data(), kMsg1.size(), - &kPubkey1, &kSig_msg1_key0)); - EXPECT_EQ(kEpidSigInvalid, EcdsaVerifyBuffer(kMsg1.data(), kMsg1.size(), - &kPubkey0, &kSig_msg1_key1)); -} - -TEST_F(EcdsaVerifyBufferTest, FailsGivenWrongMsg) { - EXPECT_EQ(kEpidSigInvalid, EcdsaVerifyBuffer(kMsg1.data(), kMsg1.size(), - &kPubkey0, &kSig_msg0_key0)); - EXPECT_EQ(kEpidSigInvalid, EcdsaVerifyBuffer(kMsg1.data(), kMsg1.size(), - &kPubkey1, &kSig_msg0_key1)); - EXPECT_EQ(kEpidSigInvalid, EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), - &kPubkey0, &kSig_msg1_key0)); - EXPECT_EQ(kEpidSigInvalid, EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), - &kPubkey1, &kSig_msg1_key1)); -} - -TEST_F(EcdsaVerifyBufferTest, FailsGivenInvalidKey) { - // define a public key with the high half set to all FF. This will - // not be on the curve specified for this API - EcdsaPublicKey invalid_pubkey = kPubkey0; - for (size_t i = 0; i < sizeof(invalid_pubkey.x); i++) { - invalid_pubkey.x.data[i] = 0xff; - } - EXPECT_EQ(kEpidBadArgErr, - EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), &invalid_pubkey, - &kSig_msg0_key0)); - EXPECT_EQ(kEpidBadArgErr, - EcdsaVerifyBuffer(kMsg1.data(), kMsg1.size(), &invalid_pubkey, - &kSig_msg1_key0)); -} - -TEST_F(EcdsaVerifyBufferTest, FailsGivenInvalidSignature) { - // define a signature with the high half set to all FF. This will - // not be on the curve specified for this API - EcdsaSignature invalid_sig = kSig_msg0_key0; - for (size_t i = 0; i < sizeof(invalid_sig.x); i++) { - invalid_sig.x.data[i] = 0xff; - } - EXPECT_EQ(kEpidBadArgErr, EcdsaVerifyBuffer(kMsg0.data(), kMsg0.size(), - &kPubkey0, &invalid_sig)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecgroup-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecgroup-test.cc deleted file mode 100644 index b8b3aa67f6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ecgroup-test.cc +++ /dev/null @@ -1,2130 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EcGroup unit tests. - */ - -#include -#include -#include -#include -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/finitefield.h" -} -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" - -/// compares G1ElemStr values -bool operator==(G1ElemStr const& lhs, G1ElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -/// compares G2ElemStr values -bool operator==(G2ElemStr const& lhs, G2ElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -namespace { - -class EFq2Params { - public: - FiniteFieldObj fq2; - FfElementObj a; - FfElementObj b; - FfElementObj x; - FfElementObj y; - BigNumObj order; - BigNumObj cofactor; - - explicit EFq2Params(FiniteFieldObj* fq) { - // Intel(R) EPID 2.0 parameters for EC(Fq2) - static const FqElemStr param_beta = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, - 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x12}}}; - static const G2ElemStr param_g2 = { - {{{{0xE2, 0x01, 0x71, 0xC5, 0x4A, 0xA3, 0xDA, 0x05, 0x21, 0x67, 0x04, - 0x13, 0x74, 0x3C, 0xCF, 0x22, 0xD2, 0x5D, 0x52, 0x68, 0x3D, 0x32, - 0x47, 0x0E, 0xF6, 0x02, 0x13, 0x43, 0xBF, 0x28, 0x23, 0x94}}}, - {{{0x59, 0x2D, 0x1E, 0xF6, 0x53, 0xA8, 0x5A, 0x80, 0x46, 0xCC, 0xDC, - 0x25, 0x4F, 0xBB, 0x56, 0x56, 0x43, 0x43, 0x3B, 0xF6, 0x28, 0x96, - 0x53, 0xE2, 0x7D, 0xF7, 0xB2, 0x12, 0xBA, 0xA1, 0x89, 0xBE}}}}, - {{{{0xAE, 0x60, 0xA4, 0xE7, 0x51, 0xFF, 0xD3, 0x50, 0xC6, 0x21, 0xE7, - 0x03, 0x31, 0x28, 0x26, 0xBD, 0x55, 0xE8, 0xB5, 0x9A, 0x4D, 0x91, - 0x68, 0x38, 0x41, 0x4D, 0xB8, 0x22, 0xDD, 0x23, 0x35, 0xAE}}}, - {{{0x1A, 0xB4, 0x42, 0xF9, 0x89, 0xAF, 0xE5, 0xAD, 0xF8, 0x02, 0x74, - 0xF8, 0x76, 0x45, 0xE2, 0x53, 0x2C, 0xDC, 0x61, 0x81, 0x90, 0x93, - 0xD6, 0x13, 0x2C, 0x90, 0xFE, 0x89, 0x51, 0xB9, 0x24, 0x21}}}}}; - static const Fq2ElemStr param_xi0xi1 = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}}}; - static const FqElemStr param_b = { - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}}; - - // Setup Fq2 with parameters (q, beta) - // Fq^2 = Fq[u] / (u^2 - beta) - FfElementObj neg_beta(fq); - THROW_ON_EPIDERR(FfNeg(*fq, FfElementObj(fq, param_beta), neg_beta)); - fq2 = FiniteFieldObj(*fq, neg_beta, 2); - - // set x to (g2.x[0], g2.x[1]) and y to (g2.y[0], g2.y[1]) - x = FfElementObj(&fq2, ¶m_g2.x, sizeof(param_g2.x)); - y = FfElementObj(&fq2, ¶m_g2.y, sizeof(param_g2.y)); - - // set a to identity, NewFfElement does it by default - a = FfElementObj(&fq2); - - // set b to inv(xi)*param_b, where xi is (xi0, xi1) element in Fq2 - FfElementObj neg_xi(&fq2); - THROW_ON_EPIDERR(FfInv(fq2, FfElementObj(&fq2, param_xi0xi1), neg_xi)); - b = FfElementObj(&fq2); - THROW_ON_EPIDERR(FfMul(fq2, neg_xi.get(), FfElementObj(fq, param_b), b)); - - // set h = 2q - p, aka cofactor - std::vector cofactor_str( - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfc, 0xf0, 0xcd, 0x46, 0xe5, 0xf2, 0x5e, 0xee, 0x71, 0xa4, 0xa0, - 0x0c, 0xdc, 0x65, 0xfb, 0x12, 0x96, 0x82, 0xea, 0xb0, 0x25, 0x08, 0x4a, - 0x8c, 0x9b, 0x10, 0x19}); - cofactor = BigNumObj(cofactor_str); - - // set n = p * h, AKA order - std::vector order_str( - {0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xe1, 0x9a, 0x8d, 0xcb, 0xe4, 0xc7, - 0x38, 0xfa, 0x9b, 0x98, 0x4d, 0x1c, 0x12, 0x9f, 0x64, 0x97, 0xe8, 0x54, - 0xa3, 0x0a, 0x81, 0xac, 0x42, 0xf9, 0x39, 0x16, 0xa7, 0x70, 0x21, 0xdc, - 0xfb, 0xb6, 0xe7, 0x7e, 0x1f, 0x5b, 0x55, 0xcc, 0x4e, 0x84, 0xcd, 0x19, - 0x4f, 0x49, 0x20, 0x94, 0xb5, 0xd8, 0x12, 0xa0, 0x2e, 0x7f, 0x40, 0x13, - 0xb2, 0xfa, 0xa1, 0x45}); - order = BigNumObj(order_str); - } - - virtual ~EFq2Params() {} - - private: - // This class is not meant to be copied or assigned - EFq2Params(const EFq2Params&); - EFq2Params& operator=(const EFq2Params&); -}; - -class EcGroupTest : public ::testing::Test { - public: - static const G1ElemStr g1_str; - static const G2ElemStr g2_str; - - static const FqElemStr a1; - static const FqElemStr b1; - static const BigNumStr h1; - static const BigNumStr p; - static const BigNumStr q; - - static const G1ElemStr efq_a_str; - static const G1ElemStr efq_b_str; - static const BigNumStr x_str; - static const BigNumStr y_str; - static const G1ElemStr efq_mul_ab_str; - static const G1ElemStr efq_exp_ax_str; - static const G1ElemStr efq_multiexp_abxy_str; - static const G1ElemStr efq_inv_a_str; - static const G1ElemStr efq_identity_str; - static const G1ElemStr efq_r_sha256_str; - static const G1ElemStr efq_r_sha384_str; - static const G1ElemStr efq_r_sha512_str; - static const uint8_t sha_msg[]; - - static const G2ElemStr efq2_a_str; - static const G2ElemStr efq2_b_str; - static const G2ElemStr efq2_mul_ab_str; - static const G2ElemStr efq2_exp_ax_str; - static const G2ElemStr efq2_multiexp_abxy_str; - static const G2ElemStr efq2_inv_a_str; - static const G2ElemStr efq2_identity_str; - - // Epid 1.1 hash of message "aad" - static const Epid11G3ElemStr kAadHash; - // Epid 1.1 hash of message "bsn0" - static const Epid11G3ElemStr kBsn0Hash; - // Epid 1.1 hash of message "test" - static const Epid11G3ElemStr kTestHash; - // Epid 1.1 hash of message "aac" - static const Epid11G3ElemStr kAacHash; - - virtual void SetUp() { - Epid11Params epid11_params_str = { -#include "epid/common/1.1/src/epid11params_tate.inc" - }; - - fq = FiniteFieldObj(q); - fq_a = FfElementObj(&fq, a1); - fq_b = FfElementObj(&fq, b1); - g1_x = FfElementObj(&fq, g1_str.x); - g1_y = FfElementObj(&fq, g1_str.y); - - bn_p = BigNumObj(p); - bn_h = BigNumObj(h1); - - efq = EcGroupObj(&fq, fq_a, fq_b, g1_x, g1_y, bn_p, bn_h); - - efq_a = EcPointObj(&efq, efq_a_str); - efq_b = EcPointObj(&efq, efq_b_str); - efq_r = EcPointObj(&efq); - efq_identity = EcPointObj(&efq, efq_identity_str); - - efq2_par.reset(new EFq2Params(&fq)); - - efq2 = EcGroupObj(&efq2_par->fq2, efq2_par->a, efq2_par->b, efq2_par->x, - efq2_par->y, efq2_par->order, efq2_par->cofactor); - - efq2_a = EcPointObj(&efq2, efq2_a_str); - efq2_b = EcPointObj(&efq2, efq2_b_str); - efq2_r = EcPointObj(&efq2); - efq2_identity = EcPointObj(&efq2, efq_identity_str); - - epid11_Fq_tick = FiniteFieldObj(epid11_params_str.q_tick); - epid11_a_tick = FfElementObj(&epid11_Fq_tick, epid11_params_str.a_tick); - epid11_b_tick = FfElementObj(&epid11_Fq_tick, epid11_params_str.b_tick); - epid11_g3_x = FfElementObj(&epid11_Fq_tick, epid11_params_str.g3.x); - epid11_g3_y = FfElementObj(&epid11_Fq_tick, epid11_params_str.g3.y); - epid11_p_tick = BigNumObj(epid11_params_str.p_tick); - BigNumStr h_tick_str = {0}; - ((OctStr32*) - h_tick_str.data.data)[sizeof(BigNumStr) / sizeof(OctStr32) - 1] = - epid11_params_str.h_tick; - epid11_h_tick = BigNumObj(h_tick_str); - - epid11_G3 = - EcGroupObj(&epid11_Fq_tick, epid11_a_tick, epid11_b_tick, epid11_g3_x, - epid11_g3_y, epid11_p_tick, epid11_h_tick); - epid11_G3_r = EcPointObj(&epid11_G3); - } - - FiniteFieldObj fq; - FfElementObj fq_a; - FfElementObj fq_b; - FfElementObj g1_x; - FfElementObj g1_y; - - BigNumObj bn_p; - BigNumObj bn_h; - - EcGroupObj efq; - EcPointObj efq_a; - EcPointObj efq_b; - EcPointObj efq_r; - EcPointObj efq_identity; - - std::unique_ptr efq2_par; - EcGroupObj efq2; - EcPointObj efq2_a; - EcPointObj efq2_b; - EcPointObj efq2_r; - EcPointObj efq2_identity; - - FiniteFieldObj epid11_Fq_tick; - FfElementObj epid11_a_tick; - FfElementObj epid11_b_tick; - FfElementObj epid11_g3_x; - FfElementObj epid11_g3_y; - BigNumObj epid11_p_tick; - BigNumObj epid11_h_tick; - - EcGroupObj epid11_G3; - EcPointObj epid11_G3_r; -}; - -const G1ElemStr EcGroupTest::g1_str = { - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}}; -const G2ElemStr EcGroupTest::g2_str = { - {{{{0xE2, 0x01, 0x71, 0xC5, 0x4A, 0xA3, 0xDA, 0x05, 0x21, 0x67, 0x04, 0x13, - 0x74, 0x3C, 0xCF, 0x22, 0xD2, 0x5D, 0x52, 0x68, 0x3D, 0x32, 0x47, 0x0E, - 0xF6, 0x02, 0x13, 0x43, 0xBF, 0x28, 0x23, 0x94}}}, - {{{0x59, 0x2D, 0x1E, 0xF6, 0x53, 0xA8, 0x5A, 0x80, 0x46, 0xCC, 0xDC, 0x25, - 0x4F, 0xBB, 0x56, 0x56, 0x43, 0x43, 0x3B, 0xF6, 0x28, 0x96, 0x53, 0xE2, - 0x7D, 0xF7, 0xB2, 0x12, 0xBA, 0xA1, 0x89, 0xBE}}}}, - {{{{0xAE, 0x60, 0xA4, 0xE7, 0x51, 0xFF, 0xD3, 0x50, 0xC6, 0x21, 0xE7, 0x03, - 0x31, 0x28, 0x26, 0xBD, 0x55, 0xE8, 0xB5, 0x9A, 0x4D, 0x91, 0x68, 0x38, - 0x41, 0x4D, 0xB8, 0x22, 0xDD, 0x23, 0x35, 0xAE}}}, - {{{0x1A, 0xB4, 0x42, 0xF9, 0x89, 0xAF, 0xE5, 0xAD, 0xF8, 0x02, 0x74, 0xF8, - 0x76, 0x45, 0xE2, 0x53, 0x2C, 0xDC, 0x61, 0x81, 0x90, 0x93, 0xD6, 0x13, - 0x2C, 0x90, 0xFE, 0x89, 0x51, 0xB9, 0x24, 0x21}}}}}; - -const FqElemStr EcGroupTest::a1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}; -const FqElemStr EcGroupTest::b1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}}}; -const BigNumStr EcGroupTest::h1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}; -const BigNumStr EcGroupTest::p = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, 0x92, 0x1A, - 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}}}; -const BigNumStr EcGroupTest::q = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, - 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x13}}}; - -const G1ElemStr EcGroupTest::efq_a_str = { - {{{0x12, 0xA6, 0x5B, 0xD6, 0x91, 0x8D, 0x50, 0xA7, 0x66, 0xEB, 0x7D, 0x52, - 0xE3, 0x40, 0x17, 0x60, 0x7F, 0xDF, 0x6C, 0xA1, 0x2C, 0x1A, 0x37, 0xE0, - 0x92, 0xC0, 0xF7, 0xB9, 0x76, 0xAB, 0xB1, 0x8A}}}, - {{{0x78, 0x65, 0x28, 0xCB, 0xAF, 0x07, 0x52, 0x50, 0x55, 0x7A, 0x5F, 0x30, - 0x0A, 0xC0, 0xB4, 0x6B, 0xEA, 0x6F, 0xE2, 0xF6, 0x6D, 0x96, 0xF7, 0xCD, - 0xC8, 0xD3, 0x12, 0x7F, 0x1F, 0x3A, 0x8B, 0x42}}}}; - -const G1ElemStr EcGroupTest::efq_b_str = { - {{{0xE6, 0x65, 0x23, 0x9B, 0xD4, 0x07, 0x16, 0x83, 0x38, 0x23, 0xB2, 0x67, - 0x57, 0xEB, 0x0F, 0x23, 0x3A, 0xF4, 0x8E, 0xDA, 0x71, 0x5E, 0xD9, 0x98, - 0x63, 0x98, 0x2B, 0xBC, 0x78, 0xD1, 0x94, 0xF2}}}, - {{{0x63, 0xB0, 0xAD, 0xB8, 0x2C, 0xE8, 0x14, 0xFD, 0xA2, 0x39, 0x0E, 0x66, - 0xB7, 0xD0, 0x6A, 0xAB, 0xEE, 0xFA, 0x2E, 0x24, 0x9B, 0xB5, 0x14, 0x35, - 0xFE, 0xB6, 0xB0, 0xFF, 0xFD, 0x5F, 0x73, 0x19}}}}; - -const BigNumStr EcGroupTest::x_str = { - {{0xFF, 0xFB, 0x3E, 0x5D, 0xFF, 0x9A, 0xFF, 0x02, 0x00, 0xFF, 0xFF, 0xFF, - 0xF2, 0xE1, 0x85, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x81, - 0xFF, 0xFD, 0xFF, 0xEB, 0xFF, 0x29, 0xA7, 0xFF}}}; - -const BigNumStr EcGroupTest::y_str = { - {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, 0x08, 0xFF, 0xFF, - 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, - 0xF2, 0x6A, 0xFF, 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}}; - -const G1ElemStr EcGroupTest::efq_mul_ab_str = { - {{{0x30, 0xF8, 0x33, 0xB7, 0x1C, 0x85, 0x94, 0x6D, 0x6F, 0x3C, 0x97, 0x77, - 0x81, 0xA5, 0xC2, 0x98, 0x93, 0x5C, 0x8C, 0xC1, 0xFF, 0x35, 0x9E, 0x68, - 0xF6, 0x4D, 0x18, 0xDD, 0x65, 0xA9, 0xC0, 0x60}}}, - {{{0x89, 0xE5, 0x08, 0x2D, 0xD1, 0xD8, 0xC7, 0xBF, 0xDE, 0x16, 0x24, 0xA7, - 0x2F, 0xF1, 0x48, 0x00, 0x26, 0xAF, 0x89, 0xEA, 0xC9, 0x94, 0x78, 0xFF, - 0x2A, 0xB0, 0x20, 0xED, 0x33, 0x0C, 0x4E, 0x88}}}}; - -const G1ElemStr EcGroupTest::efq_exp_ax_str = { - {{{0x44, 0x45, 0xFA, 0x16, 0x23, 0x66, 0x26, 0x9D, 0x44, 0xB9, 0x43, 0xAB, - 0x87, 0xE3, 0x56, 0xCA, 0x9C, 0x89, 0x44, 0x8E, 0xE8, 0x19, 0x29, 0x4D, - 0x4D, 0x59, 0x7D, 0xBE, 0x46, 0x3F, 0x55, 0x0D}}}, - {{{0x98, 0x09, 0xCF, 0x43, 0x46, 0x75, 0xB8, 0x71, 0xFF, 0x37, 0xBA, 0xA0, - 0x63, 0xE2, 0xAC, 0x09, 0x38, 0x10, 0x70, 0xAC, 0x15, 0x52, 0x28, 0xF4, - 0x77, 0x68, 0x32, 0x7B, 0x6E, 0xFB, 0xC1, 0x43}}}}; - -const G1ElemStr EcGroupTest::efq_multiexp_abxy_str = { - {{{0x63, 0x4A, 0xD4, 0xC1, 0x6B, 0x90, 0x67, 0xA2, 0x0B, 0xE2, 0xB3, 0xE9, - 0x95, 0x3F, 0x82, 0x7E, 0x21, 0xBF, 0x9F, 0xCD, 0xA0, 0x16, 0x56, 0x6B, - 0x31, 0x66, 0x68, 0xBB, 0x25, 0xF8, 0xBD, 0xF3}}}, - {{{0xBD, 0x5F, 0xF8, 0x48, 0xD4, 0xBF, 0x35, 0x2D, 0xDC, 0xD1, 0x78, 0x74, - 0xFF, 0xB1, 0x47, 0xD5, 0x6B, 0x21, 0xE5, 0x15, 0x01, 0xA8, 0xDC, 0x8B, - 0x3C, 0x9D, 0x96, 0xC7, 0xC6, 0xB0, 0x05, 0x20}}}}; - -const G1ElemStr EcGroupTest::efq_inv_a_str = { - {{{0x12, 0xA6, 0x5B, 0xD6, 0x91, 0x8D, 0x50, 0xA7, 0x66, 0xEB, 0x7D, 0x52, - 0xE3, 0x40, 0x17, 0x60, 0x7F, 0xDF, 0x6C, 0xA1, 0x2C, 0x1A, 0x37, 0xE0, - 0x92, 0xC0, 0xF7, 0xB9, 0x76, 0xAB, 0xB1, 0x8A}}}, - {{{0x87, 0x9A, 0xD7, 0x34, 0x50, 0xF5, 0x9E, 0x7C, 0xF1, 0x6B, 0x93, 0x2E, - 0xE3, 0xB0, 0xF0, 0x33, 0x22, 0x6C, 0x83, 0x04, 0xA5, 0x01, 0x12, 0xB5, - 0x0A, 0x56, 0x1B, 0x5C, 0x8F, 0x98, 0xA4, 0xD1}}}}; - -const G1ElemStr EcGroupTest::efq_identity_str = { - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}; - -const uint8_t EcGroupTest::sha_msg[] = {'a', 'b', 'c'}; - -const G1ElemStr EcGroupTest::efq_r_sha256_str = { - {{{0x2E, 0xBB, 0x50, 0x4D, 0x88, 0xFF, 0x25, 0x62, 0xF3, 0x71, 0x65, 0x81, - 0xAD, 0xBE, 0x83, 0x6E, 0x54, 0xF5, 0xA6, 0x2A, 0x70, 0xE6, 0x18, 0x6B, - 0xD5, 0x4A, 0x10, 0x3C, 0x80, 0x08, 0x95, 0x3D}}}, - {{{0x8A, 0x43, 0xA1, 0x04, 0xB1, 0x3F, 0x3C, 0xB4, 0xBD, 0x67, 0x38, 0xB1, - 0x07, 0xF0, 0x7A, 0x32, 0x7E, 0xCD, 0xF0, 0x2E, 0x62, 0x3E, 0x2C, 0x1F, - 0x48, 0xAA, 0x0D, 0x6C, 0xDC, 0x48, 0xF9, 0xF7}}}}; - -const G1ElemStr EcGroupTest::efq_r_sha384_str = { - {{{0xE1, 0xC8, 0x28, 0xB1, 0x9A, 0xDF, 0x5D, 0x4B, 0xC4, 0x25, 0x90, 0xFB, - 0x38, 0x20, 0xD4, 0x8B, 0x30, 0x8F, 0x95, 0x76, 0xC3, 0x7F, 0x9D, 0xAD, - 0x94, 0xC4, 0x31, 0x80, 0xD7, 0xDF, 0xD5, 0xFE}}}, - {{{0x0E, 0x86, 0x11, 0x90, 0xAF, 0xEF, 0xEB, 0x79, 0x4B, 0x3E, 0x80, 0x92, - 0x94, 0x3B, 0x2F, 0x5E, 0x72, 0x21, 0xEF, 0xF8, 0xBC, 0xE3, 0x48, 0xA9, - 0xD0, 0x31, 0x19, 0xAC, 0xD1, 0xD7, 0x49, 0x87}}}}; - -const G1ElemStr EcGroupTest::efq_r_sha512_str = { - {{{0x8C, 0x62, 0xA0, 0x2D, 0x55, 0x55, 0x55, 0x86, 0xBC, 0x82, 0xA6, 0xA2, - 0x21, 0x97, 0x9B, 0x9B, 0xB4, 0x03, 0x3D, 0x83, 0xF3, 0xBA, 0xDA, 0x9C, - 0x42, 0xF7, 0xB3, 0x94, 0x99, 0x2A, 0x96, 0xE4}}}, - {{{0x4C, 0x0E, 0xA7, 0x62, 0x17, 0xB9, 0xFB, 0xE5, 0x21, 0x7D, 0x54, 0x24, - 0xE0, 0x2B, 0x87, 0xF7, 0x69, 0x54, 0x0C, 0xC6, 0xAD, 0xF2, 0xF2, 0x7B, - 0xE6, 0x91, 0xD8, 0xF3, 0x40, 0x6C, 0x8F, 0x03}}}}; - -const G2ElemStr EcGroupTest::efq2_a_str = { - { - {0x2F, 0x8C, 0xC7, 0xD7, 0xD4, 0x1E, 0x4A, 0xCB, 0x82, 0x92, 0xC7, 0x9C, - 0x0F, 0xA2, 0xF2, 0x1B, 0xDF, 0xEA, 0x96, 0x64, 0x8B, 0xA2, 0x32, 0x7C, - 0xDF, 0xD8, 0x89, 0x10, 0xFD, 0xBB, 0x38, 0xCD}, - {0xB1, 0x23, 0x46, 0x13, 0x4D, 0x9B, 0x8E, 0x8A, 0x95, 0x64, 0xDD, 0x37, - 0x29, 0x44, 0x1F, 0x76, 0xB5, 0x3A, 0x47, 0xD3, 0xE0, 0x18, 0x1E, 0x60, - 0xE9, 0x94, 0x13, 0xA4, 0x47, 0xCD, 0xBE, 0x03}, - }, - { - {0xD3, 0x67, 0xA5, 0xCC, 0xEF, 0x7B, 0xD1, 0x8D, 0x4A, 0x7F, 0xF1, 0x8F, - 0x66, 0xCB, 0x5E, 0x86, 0xAC, 0xCB, 0x36, 0x5F, 0x29, 0x90, 0x28, 0x55, - 0xF0, 0xDC, 0x6E, 0x8B, 0x87, 0xB5, 0xD8, 0x32}, - {0x6C, 0x0A, 0xC5, 0x58, 0xB1, 0x4E, 0xCA, 0x85, 0x44, 0x3E, 0xDE, 0x71, - 0x9B, 0xC7, 0x90, 0x19, 0x06, 0xD2, 0xA0, 0x4E, 0xC7, 0x33, 0xF4, 0x5C, - 0xE8, 0x16, 0xE2, 0x67, 0xDB, 0xBF, 0x64, 0x84}, - }, -}; - -const G2ElemStr EcGroupTest::efq2_b_str = { - { - {0x16, 0xF1, 0x61, 0x76, 0x06, 0x3E, 0xE9, 0xC0, 0xB9, 0xB1, 0x3A, 0x75, - 0xFC, 0xDB, 0x90, 0xCD, 0x01, 0xF4, 0x9F, 0xCC, 0xAA, 0x24, 0x69, 0x83, - 0xBE, 0x20, 0x44, 0x87, 0x58, 0x90, 0x0F, 0x4F}, - {0xC7, 0x50, 0x37, 0xC1, 0xB9, 0x2D, 0xE1, 0xE3, 0x79, 0x20, 0x7B, 0x62, - 0x90, 0xF8, 0xC7, 0xF0, 0xD7, 0x5A, 0xE7, 0xAD, 0x65, 0xE1, 0xC7, 0x50, - 0x59, 0xA1, 0xFC, 0x49, 0xBC, 0x2A, 0xE5, 0xD7}, - }, - { - {0x12, 0x73, 0x3B, 0xA4, 0xDD, 0x0F, 0xBB, 0x35, 0x38, 0x4A, 0xE0, 0x3D, - 0x79, 0x63, 0x66, 0x73, 0x9C, 0x07, 0xE1, 0xEC, 0x71, 0x16, 0x50, 0x75, - 0xA1, 0xBA, 0xE5, 0x37, 0x45, 0x1A, 0x0C, 0x59}, - {0xC9, 0x49, 0xB9, 0xDB, 0x7E, 0x76, 0xC5, 0xC5, 0x0A, 0x87, 0xB7, 0x56, - 0x88, 0x09, 0x21, 0xC6, 0xF6, 0x6C, 0xCC, 0x5E, 0x80, 0xFD, 0x05, 0xD0, - 0x5F, 0xC6, 0x2E, 0x06, 0xA1, 0xBE, 0x5B, 0xA0}, - }, -}; - -const G2ElemStr EcGroupTest::efq2_mul_ab_str = { - { - {0x25, 0xCC, 0x11, 0x80, 0x8F, 0x08, 0x1D, 0x66, 0xF8, 0xDB, 0xBC, 0x98, - 0x26, 0x24, 0x26, 0xCF, 0x04, 0x02, 0xB6, 0x99, 0x1B, 0x52, 0xA8, 0xE3, - 0x4E, 0x9A, 0x85, 0xB0, 0x5C, 0xCE, 0xDD, 0xC5}, - {0xFC, 0x3C, 0xC2, 0x2C, 0x4B, 0x63, 0x72, 0x5F, 0xA9, 0xF9, 0x8C, 0x62, - 0xF4, 0xE7, 0x30, 0x71, 0x6F, 0x78, 0xF5, 0xFE, 0xF6, 0xDF, 0xF7, 0xB5, - 0x21, 0x69, 0x7C, 0x50, 0xAC, 0x56, 0xD9, 0xB5}, - }, - { - {0xA5, 0xD6, 0xAB, 0x2D, 0xED, 0x8E, 0xFE, 0x43, 0xCB, 0xC9, 0xEF, 0x09, - 0xC8, 0x2D, 0xE8, 0xD0, 0x3B, 0xC0, 0x5C, 0x7F, 0xE5, 0x3A, 0x1D, 0x72, - 0xF2, 0xF5, 0x03, 0xBD, 0xE5, 0xEB, 0x08, 0xA0}, - {0xE6, 0xF3, 0x59, 0xE4, 0xD2, 0x52, 0xFD, 0x4F, 0xEC, 0xCE, 0x49, 0x9F, - 0x86, 0x50, 0x2D, 0x4A, 0x59, 0x2C, 0xA2, 0x4E, 0xE3, 0xFE, 0xF2, 0xFC, - 0xB9, 0xF4, 0x22, 0x88, 0xBC, 0x79, 0x21, 0xD0}, - }, -}; - -const G2ElemStr EcGroupTest::efq2_exp_ax_str = { - { - {0xC0, 0x5A, 0x37, 0xAD, 0x08, 0xAB, 0x22, 0xCF, 0xF7, 0xF9, 0xCC, 0xD4, - 0x5A, 0x47, 0x38, 0x82, 0xE1, 0xC2, 0x06, 0x35, 0x4D, 0x5B, 0x95, 0xA1, - 0xA3, 0xC1, 0x83, 0x6C, 0x0F, 0x31, 0x24, 0xD2}, - {0xC7, 0x86, 0xE1, 0x59, 0x63, 0xCE, 0x21, 0x2A, 0x57, 0x77, 0xE5, 0x48, - 0xF7, 0x60, 0x21, 0x00, 0x40, 0x2F, 0x09, 0x18, 0x5C, 0x32, 0x32, 0x75, - 0xD7, 0xB9, 0xE7, 0xB1, 0x95, 0xD5, 0xDF, 0x02}, - }, - { - {0xE5, 0xDE, 0xC6, 0x3E, 0x05, 0xFC, 0x6F, 0x7A, 0xE3, 0x2D, 0x7D, 0x90, - 0x5F, 0x43, 0xE2, 0xB0, 0x9E, 0xCD, 0xEC, 0x7B, 0x37, 0x4C, 0x0A, 0x3E, - 0x87, 0x4E, 0xE6, 0xDA, 0xD1, 0x90, 0xC0, 0xD1}, - {0x70, 0x90, 0x54, 0x7F, 0x78, 0x93, 0xFA, 0xC4, 0xF7, 0x3A, 0x4D, 0xBC, - 0x03, 0x5E, 0x83, 0xDF, 0xEF, 0xF7, 0x52, 0xF9, 0x64, 0x7F, 0x17, 0xC1, - 0x69, 0xD6, 0xD7, 0x96, 0x18, 0x62, 0x46, 0xD1}, - }, -}; - -const G2ElemStr EcGroupTest::efq2_multiexp_abxy_str = { - { - {0xE8, 0x6E, 0x02, 0x7A, 0xEC, 0xEA, 0xBA, 0x7E, 0xE5, 0x7C, 0xAD, 0x98, - 0x37, 0x54, 0xB2, 0x15, 0x64, 0x9C, 0x81, 0xFF, 0x69, 0xCC, 0xD6, 0xA6, - 0xAA, 0xA7, 0x10, 0x4F, 0x9B, 0x0C, 0x50, 0x14}, - {0x7C, 0xAF, 0xC0, 0x6F, 0xC8, 0x87, 0xFF, 0x4A, 0x6F, 0xB5, 0x9E, 0x63, - 0x74, 0x20, 0xB5, 0xC6, 0x4F, 0x14, 0x0B, 0x6C, 0xBF, 0x00, 0x71, 0xE2, - 0x6D, 0x6C, 0x41, 0x6A, 0x0B, 0xA5, 0x5B, 0xCF}, - }, - { - {0x16, 0xCC, 0x9B, 0x37, 0xE7, 0xCB, 0x16, 0x5C, 0x39, 0x7C, 0x10, 0x7E, - 0xE0, 0xDD, 0x34, 0x90, 0xBE, 0x56, 0x28, 0x76, 0x27, 0x59, 0xCE, 0xB3, - 0xD7, 0xB4, 0x56, 0xD4, 0x0D, 0xD1, 0xB8, 0xFB}, - {0x5E, 0x9E, 0x27, 0x30, 0x60, 0x87, 0x3B, 0xA4, 0x9B, 0x15, 0xEE, 0x86, - 0x15, 0x1D, 0xF4, 0xF3, 0x07, 0x31, 0x46, 0xFD, 0xB7, 0x51, 0xFF, 0xC0, - 0x42, 0x94, 0x38, 0xB7, 0x84, 0x5F, 0x86, 0x3A}, - }, -}; - -const G2ElemStr EcGroupTest::efq2_inv_a_str = { - { - {0x2F, 0x8C, 0xC7, 0xD7, 0xD4, 0x1E, 0x4A, 0xCB, 0x82, 0x92, 0xC7, 0x9C, - 0x0F, 0xA2, 0xF2, 0x1B, 0xDF, 0xEA, 0x96, 0x64, 0x8B, 0xA2, 0x32, 0x7C, - 0xDF, 0xD8, 0x89, 0x10, 0xFD, 0xBB, 0x38, 0xCD}, - {0xB1, 0x23, 0x46, 0x13, 0x4D, 0x9B, 0x8E, 0x8A, 0x95, 0x64, 0xDD, 0x37, - 0x29, 0x44, 0x1F, 0x76, 0xB5, 0x3A, 0x47, 0xD3, 0xE0, 0x18, 0x1E, 0x60, - 0xE9, 0x94, 0x13, 0xA4, 0x47, 0xCD, 0xBE, 0x03}, - }, - { - {0x2C, 0x98, 0x5A, 0x33, 0x10, 0x81, 0x1F, 0x3F, 0xFC, 0x66, 0x00, 0xCF, - 0x87, 0xA6, 0x46, 0x18, 0x60, 0x11, 0x2F, 0x9B, 0xE9, 0x07, 0xE2, 0x2C, - 0xE2, 0x4C, 0xBF, 0x50, 0x27, 0x1D, 0x57, 0xE1}, - {0x93, 0xF5, 0x3A, 0xA7, 0x4E, 0xAE, 0x26, 0x48, 0x02, 0xA7, 0x13, 0xED, - 0x52, 0xAA, 0x14, 0x86, 0x06, 0x09, 0xC5, 0xAC, 0x4B, 0x64, 0x16, 0x25, - 0xEB, 0x12, 0x4B, 0x73, 0xD3, 0x13, 0xCB, 0x8F}, - }, -}; - -const G2ElemStr EcGroupTest::efq2_identity_str = { - { - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - }, - { - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - }, -}; - -// msg=aad, size=3 -// algorithm code path: sqrt result <= modulus/2, high bit is 0 -const G1ElemStr EcGroupTest::kAadHash = { - 0xB2, 0x12, 0x39, 0x3A, 0xA0, 0xCF, 0xA0, 0xDE, 0xB8, 0x85, 0xE7, - 0x5B, 0x1C, 0x13, 0x01, 0x0D, 0x0D, 0xA2, 0xBA, 0xC5, 0xB4, 0x3F, - 0x5E, 0xC7, 0x5B, 0x5A, 0xE2, 0x49, 0x1B, 0x3F, 0x65, 0x08, 0xC2, - 0x47, 0x40, 0xF3, 0xC7, 0x08, 0xA2, 0x41, 0x61, 0x99, 0x65, 0x4D, - 0x82, 0x2B, 0x9A, 0x06, 0x2C, 0xDF, 0x07, 0x71, 0xCC, 0xFA, 0x73, - 0x51, 0x45, 0x87, 0x55, 0x07, 0x17, 0xD1, 0x9C, 0x0B}; - -// msg=bsn0, size=4 -// algorithm code path: sqrt result <= modulus/2, high bit is 1 -const G1ElemStr EcGroupTest::kBsn0Hash = { - 0x04, 0x0C, 0xB6, 0x57, 0x26, 0xD0, 0xE1, 0x48, 0x23, 0xC2, 0x40, - 0x5A, 0x91, 0x7C, 0xC6, 0x33, 0xFE, 0x0C, 0xC2, 0x2B, 0x52, 0x9D, - 0x6B, 0x87, 0xF9, 0xA7, 0x82, 0xCB, 0x36, 0x90, 0xFB, 0x09, 0x10, - 0xB1, 0x55, 0xAD, 0x98, 0x0D, 0x4F, 0x94, 0xDD, 0xBE, 0x52, 0x21, - 0x87, 0xC6, 0x3E, 0x52, 0x22, 0x83, 0xE3, 0x10, 0x36, 0xEF, 0xF8, - 0x6B, 0x04, 0x4D, 0x9F, 0x14, 0xA8, 0x51, 0xAF, 0xC3}; - -// msg=test, size=4 -// algorithm code path: sqrt result > modulus/2, high bit is 0 -const G1ElemStr EcGroupTest::kTestHash = { - 0x82, 0x14, 0xAD, 0xE2, 0x0E, 0xCC, 0x95, 0x27, 0x14, 0xD0, 0x70, - 0xF1, 0x70, 0x17, 0xC2, 0xC2, 0x8C, 0x9F, 0x05, 0x79, 0xCD, 0xC8, - 0x72, 0x55, 0xFE, 0xAB, 0x80, 0x6F, 0x40, 0x5A, 0x6E, 0x64, 0x37, - 0x14, 0x7F, 0x8B, 0xF9, 0xD7, 0xEB, 0xA4, 0x5D, 0x9E, 0x57, 0x85, - 0xFF, 0x0F, 0xE5, 0xC6, 0x73, 0x4F, 0x17, 0x19, 0x96, 0x31, 0x3A, - 0xD1, 0xE1, 0x4E, 0xA8, 0xF9, 0x56, 0xD4, 0xBA, 0x4D}; - -// msg=aac, size=3 -const G1ElemStr EcGroupTest::kAacHash = { - 0xAF, 0x5C, 0xBC, 0xD4, 0x88, 0x18, 0xD0, 0x35, 0xBD, 0xE0, 0x2F, - 0x77, 0x8B, 0x76, 0x52, 0x78, 0x92, 0x66, 0x36, 0x3A, 0x72, 0x15, - 0x20, 0x84, 0xE7, 0x1E, 0xFE, 0x94, 0x77, 0xFD, 0x83, 0x08, 0xEF, - 0x4B, 0x6B, 0xDE, 0x24, 0xD8, 0x42, 0x34, 0x88, 0xB8, 0x87, 0x4A, - 0xA8, 0x5D, 0x5A, 0xC1, 0x82, 0xFF, 0xE5, 0x25, 0xD7, 0x20, 0x2D, - 0x99, 0x49, 0xFE, 0x72, 0x34, 0xAA, 0xC9, 0xD2, 0xAA}; - -/////////////////////////////////////////////////////////////////////// -// NewEcGroup -TEST_F(EcGroupTest, NewFailsGivenArgumentsMismatch) { - // construct Fq^2 finite field - FqElemStr beta_str = {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, - 0xE5, 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, - 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, 0xD3, 0x29, 0x2D, - 0xDB, 0xAE, 0xD3, 0x30, 0x12}}; - FfElementObj neg_beta(&fq); - THROW_ON_EPIDERR(FfNeg(fq, FfElementObj(&fq, beta_str), neg_beta)); - FiniteFieldObj fq2(fq, neg_beta, 2); - - FfElementObj fq2_a(&fq2); - FfElementObj fq2_b(&fq2); - FfElementObj g2_x(&fq2); - FfElementObj g2_y(&fq2); - - EcGroup* g = nullptr; - EXPECT_EQ(kEpidBadArgErr, NewEcGroup(fq2, this->fq_a, this->fq_b, this->g1_x, - this->g1_y, this->bn_p, this->bn_h, &g)); - DeleteEcGroup(&g); - EXPECT_EQ(kEpidBadArgErr, NewEcGroup(this->fq, fq2_a, this->fq_b, this->g1_x, - this->g1_y, this->bn_p, this->bn_h, &g)); - DeleteEcGroup(&g); - EXPECT_EQ(kEpidBadArgErr, NewEcGroup(this->fq, this->fq_a, fq2_b, this->g1_x, - this->g1_y, this->bn_p, this->bn_h, &g)); - DeleteEcGroup(&g); - EXPECT_EQ(kEpidBadArgErr, NewEcGroup(this->fq, this->fq_a, this->fq_b, g2_x, - this->g1_y, this->bn_p, this->bn_h, &g)); - DeleteEcGroup(&g); - EXPECT_EQ(kEpidBadArgErr, - NewEcGroup(this->fq, this->fq_a, this->fq_b, this->g1_x, g2_y, - this->bn_p, this->bn_h, &g)); - DeleteEcGroup(&g); -} -TEST_F(EcGroupTest, NewFailsGivenNullParameters) { - EcGroup* g; - EpidStatus sts; - sts = NewEcGroup(this->fq, nullptr, this->fq_b, this->g1_x, this->g1_y, - this->bn_p, this->bn_h, &g); - EXPECT_EQ(kEpidBadArgErr, sts); - sts = NewEcGroup(this->fq, this->fq_a, nullptr, this->g1_x, this->g1_y, - this->bn_p, this->bn_h, &g); - EXPECT_EQ(kEpidBadArgErr, sts); - sts = NewEcGroup(this->fq, this->fq_a, this->fq_b, nullptr, this->g1_y, - this->bn_p, this->bn_h, &g); - EXPECT_EQ(kEpidBadArgErr, sts); - sts = NewEcGroup(this->fq, this->fq_a, this->fq_b, this->g1_x, nullptr, - this->bn_p, this->bn_h, &g); - EXPECT_EQ(kEpidBadArgErr, sts); - sts = NewEcGroup(this->fq, this->fq_a, this->fq_b, this->g1_x, this->g1_y, - nullptr, this->bn_h, &g); - EXPECT_EQ(kEpidBadArgErr, sts); - sts = NewEcGroup(this->fq, this->fq_a, this->fq_b, this->g1_x, this->g1_y, - this->bn_p, nullptr, &g); - EXPECT_EQ(kEpidBadArgErr, sts); - sts = NewEcGroup(this->fq, this->fq_a, this->fq_b, this->g1_x, this->g1_y, - this->bn_p, this->bn_h, nullptr); - EXPECT_EQ(kEpidBadArgErr, sts); -} -TEST_F(EcGroupTest, CanCreateEcGroupBasedOnFq) { - EcGroup* g; - EpidStatus sts = NewEcGroup(this->fq, this->fq_a, this->fq_b, this->g1_x, - this->g1_y, this->bn_p, this->bn_h, &g); - EXPECT_EQ(kEpidNoErr, sts); - - DeleteEcGroup(&g); -} -TEST_F(EcGroupTest, CanCreateEcGroupBasedOnFq2) { - EcGroup* g; - EXPECT_EQ(kEpidNoErr, - NewEcGroup(efq2_par->fq2, efq2_par->a, efq2_par->b, efq2_par->x, - efq2_par->y, efq2_par->order, efq2_par->cofactor, &g)); - - DeleteEcGroup(&g); -} - -/////////////////////////////////////////////////////////////////////// -// DeleteEcGroup -TEST_F(EcGroupTest, DeleteWorksGivenNewlyCreatedEcGroup) { - EcGroup* g; - THROW_ON_EPIDERR(NewEcGroup(this->fq, this->fq_a, this->fq_b, this->g1_x, - this->g1_y, this->bn_p, this->bn_h, &g)); - EXPECT_NO_THROW(DeleteEcGroup(&g)); -} -TEST_F(EcGroupTest, DeleteWorksGivenNewlyCreatedEcGroupFq2) { - EcGroup* g; - THROW_ON_EPIDERR(NewEcGroup(efq2_par->fq2, efq2_par->a, efq2_par->b, - efq2_par->x, efq2_par->y, efq2_par->order, - efq2_par->cofactor, &g)); - EXPECT_NO_THROW(DeleteEcGroup(&g)); -} -TEST_F(EcGroupTest, DeleteNullsPointer) { - EcGroup* g = nullptr; - THROW_ON_EPIDERR(NewEcGroup(this->fq, this->fq_a, this->fq_b, this->g1_x, - this->g1_y, this->bn_p, this->bn_h, &g)); - - EXPECT_NO_THROW(DeleteEcGroup(&g)); - EXPECT_EQ(nullptr, g); -} -TEST_F(EcGroupTest, DeleteWorksGivenNullPointer) { - EXPECT_NO_THROW(DeleteEcGroup(nullptr)); - EcGroup* g = nullptr; - EXPECT_NO_THROW(DeleteEcGroup(&g)); -} -/////////////////////////////////////////////////////////////////////// -// NewEcPoint -TEST_F(EcGroupTest, NewEcPointSucceedsGivenEcGroupBasedOnFq) { - EcPoint* point = nullptr; - EXPECT_EQ(kEpidNoErr, NewEcPoint(this->efq, &point)); - DeleteEcPoint(&point); -} -TEST_F(EcGroupTest, NewEcPointFailsGivenNullPointer) { - EcPoint* point = nullptr; - EXPECT_EQ(kEpidBadArgErr, NewEcPoint(nullptr, &point)); - EXPECT_EQ(kEpidBadArgErr, NewEcPoint(this->efq, nullptr)); - DeleteEcPoint(&point); -} -TEST_F(EcGroupTest, NewEcPointSucceedsGivenEcGroupBasedOnFq2) { - EcPoint* point = nullptr; - EXPECT_EQ(kEpidNoErr, NewEcPoint(this->efq2, &point)); - DeleteEcPoint(&point); -} -TEST_F(EcGroupTest, DefaultEcPointIsIdentity) { - G1ElemStr g1_elem_str = {{{{0}}}, {{{0}}}}; - EcPoint* point = nullptr; - EXPECT_EQ(kEpidNoErr, NewEcPoint(this->efq, &point)); - EpidStatus sts = - WriteEcPoint(this->efq, point, &g1_elem_str, sizeof(g1_elem_str)); - EXPECT_EQ(this->efq_identity_str, g1_elem_str); - DeleteEcPoint(&point); - THROW_ON_EPIDERR(sts); - - G2ElemStr g2_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, NewEcPoint(this->efq2, &point)); - sts = WriteEcPoint(this->efq2, point, &g2_elem_str, sizeof(g2_elem_str)); - EXPECT_EQ(this->efq2_identity_str, g2_elem_str); - DeleteEcPoint(&point); - THROW_ON_EPIDERR(sts); -} -/////////////////////////////////////////////////////////////////////// -// DeleteEcPoint -TEST_F(EcGroupTest, DeleteEcPointNullsPointer) { - EcPoint* point = nullptr; - THROW_ON_EPIDERR(NewEcPoint(this->efq, &point)); - EXPECT_NO_THROW(DeleteEcPoint(&point)); - EXPECT_EQ(nullptr, point); -} -TEST_F(EcGroupTest, DeleteEcPointWorksGivenNullPointer) { - EXPECT_NO_THROW(DeleteEcPoint(nullptr)); - EcPoint* point = nullptr; - EXPECT_NO_THROW(DeleteEcPoint(&point)); - EXPECT_EQ(nullptr, point); -} -/////////////////////////////////////////////////////////////////////// -// ReadEcPoint -TEST_F(EcGroupTest, ReadFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, ReadEcPoint(nullptr, &(this->efq_a_str), - sizeof(this->efq_a_str), this->efq_a)); - EXPECT_EQ(kEpidBadArgErr, ReadEcPoint(this->efq, nullptr, - sizeof(this->efq_a_str), this->efq_a)); - EXPECT_EQ(kEpidBadArgErr, ReadEcPoint(this->efq, &(this->efq_a_str), - sizeof(this->efq_a_str), nullptr)); -} -TEST_F(EcGroupTest, ReadFailsGivenInvalidBufferSize) { - EXPECT_EQ(kEpidBadArgErr, - ReadEcPoint(this->efq, &(this->efq_a_str), 0, this->efq_a)); - EXPECT_EQ(kEpidBadArgErr, - ReadEcPoint(this->efq, &(this->efq_a_str), - sizeof(this->efq_a_str) - 1, this->efq_a)); - EXPECT_EQ(kEpidBadArgErr, - ReadEcPoint(this->efq, &(this->efq_a_str), - std::numeric_limits::max(), this->efq_a)); -} -TEST_F(EcGroupTest, ReadEcPointReadsG1PointCorrectly) { - G1ElemStr g1_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, ReadEcPoint(this->efq, &this->efq_a_str, - sizeof(this->efq_a_str), this->efq_a)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_a, &g1_elem_str, sizeof(g1_elem_str))); - EXPECT_EQ(this->efq_a_str, g1_elem_str); -} -TEST_F(EcGroupTest, ReadEcPointReadsG1IdentityPointCorrectly) { - G1ElemStr g1_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, - ReadEcPoint(this->efq, &this->efq_identity_str, - sizeof(this->efq_identity_str), this->efq_a)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_a, &g1_elem_str, sizeof(g1_elem_str))); - EXPECT_EQ(this->efq_identity_str, g1_elem_str); -} -TEST_F(EcGroupTest, ReadEcPointReadsG2IdentityPointCorrectly) { - G2ElemStr g2_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, - ReadEcPoint(this->efq2, &this->efq2_identity_str, - sizeof(this->efq2_identity_str), this->efq2_r)); - THROW_ON_EPIDERR(WriteEcPoint(this->efq2, this->efq2_r, &g2_elem_str, - sizeof(g2_elem_str))); - EXPECT_EQ(this->efq2_identity_str, g2_elem_str); -} -TEST_F(EcGroupTest, ReadEcPointReadsG2PointCorrectly) { - G2ElemStr g2_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, ReadEcPoint(this->efq2, &this->efq2_a_str, - sizeof(this->efq2_a_str), this->efq2_r)); - THROW_ON_EPIDERR(WriteEcPoint(this->efq2, this->efq2_r, &g2_elem_str, - sizeof(g2_elem_str))); - EXPECT_EQ(this->efq2_a_str, g2_elem_str); -} - -TEST_F(EcGroupTest, ReadFailsGivenPointDoesNotBelongToEcGroup) { - G1ElemStr bad_g1_point = this->efq_a_str; - bad_g1_point.x.data.data[31]++; // make point not belong to the group - EXPECT_EQ(kEpidBadArgErr, ReadEcPoint(this->efq, &bad_g1_point, - sizeof(bad_g1_point), this->efq_a)); - - G2ElemStr bad_g2_point = this->efq2_a_str; - bad_g2_point.x[0].data.data[31]++; // make point not belong to the group - EXPECT_EQ(kEpidBadArgErr, ReadEcPoint(this->efq2, &bad_g2_point, - sizeof(bad_g2_point), this->efq2_a)); -} -/////////////////////////////////////////////////////////////////////// -// WriteEcPoint -TEST_F(EcGroupTest, WriteFailsGivenNullPointer) { - G1ElemStr g1_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidBadArgErr, WriteEcPoint(nullptr, this->efq_a, &g1_elem_str, - sizeof(g1_elem_str))); - EXPECT_EQ(kEpidBadArgErr, WriteEcPoint(this->efq, nullptr, &g1_elem_str, - sizeof(g1_elem_str))); - EXPECT_EQ(kEpidBadArgErr, - WriteEcPoint(this->efq, this->efq_a, nullptr, sizeof(g1_elem_str))); -} -TEST_F(EcGroupTest, WriteFailsGivenInvalidBufferSize) { - G1ElemStr g1_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidBadArgErr, - WriteEcPoint(this->efq, this->efq_a, &g1_elem_str, 0)); - EXPECT_EQ(kEpidBadArgErr, WriteEcPoint(this->efq, this->efq_a, &g1_elem_str, - sizeof(g1_elem_str) - 1)); - EXPECT_EQ(kEpidBadArgErr, WriteEcPoint(this->efq, this->efq_a, &g1_elem_str, - std::numeric_limits::max())); -} -TEST_F(EcGroupTest, WriteEcPointWritesG1PointCorrectly) { - G1ElemStr g1_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, WriteEcPoint(this->efq, this->efq_a, &g1_elem_str, - sizeof(g1_elem_str))); - EXPECT_EQ(this->efq_a_str, g1_elem_str); -} -TEST_F(EcGroupTest, WriteEcPointWritesG1IdentityPointCorrectly) { - G1ElemStr g1_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, WriteEcPoint(this->efq, this->efq_identity, - &g1_elem_str, sizeof(g1_elem_str))); - EXPECT_EQ(this->efq_identity_str, g1_elem_str); -} -TEST_F(EcGroupTest, WriteEcPointWritesG2IdentityPointCorrectly) { - G2ElemStr g2_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, WriteEcPoint(this->efq2, this->efq2_identity, - &g2_elem_str, sizeof(g2_elem_str))); - EXPECT_EQ(this->efq2_identity_str, g2_elem_str); -} -TEST_F(EcGroupTest, WriteEcPointWritesG2PointCorrectly) { - G2ElemStr g2_elem_str = {{{{0}}}, {{{0}}}}; - EXPECT_EQ(kEpidNoErr, WriteEcPoint(this->efq2, this->efq2_a, &g2_elem_str, - sizeof(g2_elem_str))); - EXPECT_EQ(this->efq2_a_str, g2_elem_str); -} -/////////////////////////////////////////////////////////////////////// -// EcMul -TEST_F(EcGroupTest, MulFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, - EcMul(this->efq2, this->efq_a, this->efq_b, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMul(this->efq, this->efq2_a, this->efq_b, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMul(this->efq, this->efq_a, this->efq2_b, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMul(this->efq, this->efq_a, this->efq_b, this->efq2_r)); -} -TEST_F(EcGroupTest, MulFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, - EcMul(nullptr, this->efq_a, this->efq_b, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMul(this->efq, nullptr, this->efq_b, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMul(this->efq, this->efq_a, nullptr, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMul(this->efq, this->efq_a, this->efq_b, nullptr)); -} -TEST_F(EcGroupTest, MulSucceedsGivenIdentityElement) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, - EcMul(this->efq, this->efq_a, this->efq_identity, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_a_str, efq_r_str); - - EXPECT_EQ(kEpidNoErr, - EcMul(this->efq, this->efq_identity, this->efq_a, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_a_str, efq_r_str); -} - -TEST_F(EcGroupTest, MulSucceedsGivenTwoElements) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, - EcMul(this->efq, this->efq_a, this->efq_b, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_mul_ab_str, efq_r_str); -} -TEST_F(EcGroupTest, MulSucceedsGivenG2IdentityElement) { - G2ElemStr efq2_r_str; - EXPECT_EQ(kEpidNoErr, - EcMul(this->efq2, this->efq2_a, this->efq2_identity, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_a_str, efq2_r_str); - - EXPECT_EQ(kEpidNoErr, - EcMul(this->efq2, this->efq2_identity, this->efq2_a, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_a_str, efq2_r_str); -} -TEST_F(EcGroupTest, MulSucceedsGivenTwoG2Elements) { - G2ElemStr efq2_r_str; - EXPECT_EQ(kEpidNoErr, - EcMul(this->efq2, this->efq2_a, this->efq2_b, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_mul_ab_str, efq2_r_str); -} -/////////////////////////////////////////////////////////////////////// -// EcExp -TEST_F(EcGroupTest, ExpFailsGivenArgumentsMismatch) { - BigNumStr zero_bn_str = {0}; - EXPECT_EQ(kEpidBadArgErr, - EcExp(this->efq2, this->efq_a, &zero_bn_str, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcExp(this->efq, this->efq2_a, &zero_bn_str, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcExp(this->efq, this->efq_a, &zero_bn_str, this->efq2_r)); -} -TEST_F(EcGroupTest, ExpFailsGivenNullPointer) { - BigNumStr zero_bn_str = {0}; - EXPECT_EQ(kEpidBadArgErr, - EcExp(nullptr, this->efq_a, &zero_bn_str, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcExp(this->efq, nullptr, &zero_bn_str, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcExp(this->efq, this->efq_a, nullptr, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcExp(this->efq, this->efq_a, &zero_bn_str, nullptr)); -} -TEST_F(EcGroupTest, ExpSucceedsGivenZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EXPECT_EQ(kEpidNoErr, - EcExp(this->efq, this->efq_a, &zero_bn_str, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, ExpResultIsCorrect) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, - EcExp(this->efq, this->efq_a, &this->x_str, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_exp_ax_str, efq_r_str); -} -TEST_F(EcGroupTest, ExpFailsGivenOutOfRangeExponent) { - // The exponent should be less than elliptic curve group order - EXPECT_EQ(kEpidBadArgErr, - EcExp(this->efq, this->efq_a, &this->p, this->efq_r)); -} -TEST_F(EcGroupTest, ExpSucceedsGivenG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EXPECT_EQ(kEpidNoErr, - EcExp(this->efq2, this->efq2_a, &zero_bn_str, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, ExpResultIsCorrectForG2) { - G2ElemStr efq2_r_str; - EXPECT_EQ(kEpidNoErr, - EcExp(this->efq2, this->efq2_a, &this->x_str, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_exp_ax_str, efq2_r_str); -} -/////////////////////////////////////////////////////////////////////// -// EcSscmExp -TEST_F(EcGroupTest, SscmExpFailsGivenArgumentsMismatch) { - BigNumStr zero_bn_str = {0}; - EXPECT_EQ(kEpidBadArgErr, - EcSscmExp(this->efq2, this->efq_a, &zero_bn_str, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmExp(this->efq, this->efq2_a, &zero_bn_str, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmExp(this->efq, this->efq_a, &zero_bn_str, this->efq2_r)); -} -TEST_F(EcGroupTest, SscmExpFailsGivenNullPointer) { - BigNumStr zero_bn_str = {0}; - EXPECT_EQ(kEpidBadArgErr, - EcSscmExp(nullptr, this->efq_a, &zero_bn_str, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmExp(this->efq, nullptr, &zero_bn_str, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmExp(this->efq, this->efq_a, nullptr, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmExp(this->efq, this->efq_a, &zero_bn_str, nullptr)); -} -TEST_F(EcGroupTest, SscmExpSucceedsGivenZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EXPECT_EQ(kEpidNoErr, - EcSscmExp(this->efq, this->efq_a, &zero_bn_str, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, SscmExpResultIsCorrect) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, - EcSscmExp(this->efq, this->efq_a, &this->x_str, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_exp_ax_str, efq_r_str); -} -TEST_F(EcGroupTest, SscmExpFailsGivenOutOfRangeExponent) { - // The exponent should be less than elliptic curve group order - EXPECT_EQ(kEpidBadArgErr, - EcSscmExp(this->efq, this->efq_a, &this->p, this->efq_r)); -} -TEST_F(EcGroupTest, SscmExpSucceedsGivenG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EXPECT_EQ(kEpidNoErr, - EcSscmExp(this->efq2, this->efq2_a, &zero_bn_str, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, SscmExpResultIsCorrectForG2) { - G2ElemStr efq2_r_str; - EXPECT_EQ(kEpidNoErr, - EcSscmExp(this->efq2, this->efq2_a, &this->x_str, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_exp_ax_str, efq2_r_str); -} -/////////////////////////////////////////////////////////////////////// -// EcMultiExp -TEST_F(EcGroupTest, MultiExpFailsGivenArgumentsMismatch) { - EcPoint const* pts_ec1[] = {this->efq_a, this->efq_b}; - EcPoint const* pts_ec2[] = {this->efq2_a, this->efq2_b}; - EcPoint const* pts_ec1_ec2[] = {this->efq_a, this->efq2_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumStr const* b[] = {&bnm0, &bnm1}; - size_t m = 2; - - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq2, pts_ec1, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq, pts_ec2, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq, pts_ec1, b, m, this->efq2_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExp(this->efq, pts_ec1_ec2, b, m, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpFailsGivenNullPointer) { - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - EcPoint const* pts_withnull[] = {nullptr, this->efq_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumStr const* b[] = {&bnm0, &bnm1}; - BigNumStr const* b_withnull[] = {nullptr, &bnm1}; - size_t m = 2; - - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(nullptr, pts, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq, nullptr, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExp(this->efq, pts, nullptr, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq, pts, b, m, nullptr)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExp(this->efq, pts_withnull, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExp(this->efq, pts, b_withnull, m, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpFailsGivenIncorrectMLen) { - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumStr const* b[] = {&bnm0, &bnm1}; - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq, pts, b, 0, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExp(this->efq, pts, b, std::numeric_limits::max(), - this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExp(this->efq, pts, b, (size_t)INT_MAX + 1, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpFailsGivenOutOfRangeExponent) { - EcPoint const* pts[] = {this->efq_a}; - BigNumStr const* b_1[] = {&this->p}; - // The exponent should be less than elliptic curve group order - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq, pts, b_1, 1, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpFailsGivenOutOfRangeExponents) { - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - const BigNumStr bnm_1 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, - 0x6B, 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, - 0xFF, 0xB8, 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, - 0xF2, 0x6A, 0xFF, 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - BigNumStr const* b_1[] = {&bnm_1, &this->p}; - BigNumStr const* b_2[] = {&this->p, &bnm_1}; - // The exponent should be less than elliptic curve group order - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq, pts, b_1, 2, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMultiExp(this->efq, pts, b_2, 2, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpWorksGivenOneZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a}; - BigNumStr const* b[] = {&zero_bn_str}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenTwoZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a, this->efq_a}; - BigNumStr const* b[] = {&zero_bn_str, &zero_bn_str}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenSixZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a, this->efq_a, this->efq_a, - this->efq_a, this->efq_a, this->efq_a}; - BigNumStr const* b[] = {&zero_bn_str, &zero_bn_str, &zero_bn_str, - &zero_bn_str, &zero_bn_str, &zero_bn_str}; - size_t m = 6; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenOneG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq2_a}; - BigNumStr const* b[] = {&zero_bn_str}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenTwoG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq2_a, this->efq2_a}; - BigNumStr const* b[] = {&zero_bn_str, &zero_bn_str}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenSixG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq2_a, this->efq2_a, this->efq2_a, - this->efq2_a, this->efq2_a, this->efq2_a}; - BigNumStr const* b[] = {&zero_bn_str, &zero_bn_str, &zero_bn_str, - &zero_bn_str, &zero_bn_str, &zero_bn_str}; - size_t m = 6; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenOneExponent) { - G1ElemStr efq_r_str; - EcPoint const* pts[] = {this->efq_a}; - BigNumStr const* b[] = {&this->x_str}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_exp_ax_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenTwoExponents) { - G1ElemStr efq_r_str; - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - BigNumStr const* b[] = {&this->x_str, &this->y_str}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_multiexp_abxy_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenOneG2Exponent) { - G2ElemStr efq2_r_str; - EcPoint const* pts[] = {this->efq2_a}; - BigNumStr const* b[] = {&this->x_str}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_exp_ax_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpWorksGivenTwoG2Exponents) { - G2ElemStr efq2_r_str; - EcPoint const* pts[] = {this->efq2_a, this->efq2_b}; - BigNumStr const* b[] = {&this->x_str, &this->y_str}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_multiexp_abxy_str, efq2_r_str); -} -/////////////////////////////////////////////////////////////////////// -// EcMultiExpBn -TEST_F(EcGroupTest, MultiExpBnFailsGivenArgumentsMismatch) { - EcPoint const* pts_ec1[] = {this->efq_a, this->efq_b}; - EcPoint const* pts_ec2[] = {this->efq2_a, this->efq2_b}; - EcPoint const* pts_ec1_ec2[] = {this->efq_a, this->efq2_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumObj bno0(bnm0); - BigNumObj bno1(bnm1); - BigNum const* b[] = {bno0, bno1}; - size_t m = 2; - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq2, pts_ec1, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, pts_ec2, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, pts_ec1, b, m, this->efq2_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, pts_ec1_ec2, b, m, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpBnFailsGivenNullPointer) { - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - EcPoint const* pts_withnull[] = {nullptr, this->efq_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumObj bno0(bnm0); - BigNumObj bno1(bnm1); - BigNum const* b[] = {bno0, bno1}; - BigNum const* b_withnull[] = {nullptr, bno1}; - size_t m = 2; - EXPECT_EQ(kEpidBadArgErr, EcMultiExpBn(nullptr, pts, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, nullptr, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, pts, nullptr, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMultiExpBn(this->efq, pts, b, m, nullptr)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, pts_withnull, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, pts, b_withnull, m, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpBnFailsGivenIncorrectMLen) { - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumObj bno0(bnm0); - BigNumObj bno1(bnm1); - BigNum const* b[] = {bno0, bno1}; - EXPECT_EQ(kEpidBadArgErr, EcMultiExpBn(this->efq, pts, b, 0, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, pts, b, std::numeric_limits::max(), - this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcMultiExpBn(this->efq, pts, b, (size_t)INT_MAX + 1, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpBnFailsGivenOutOfRangeExponent) { - EcPoint const* pt[] = {this->efq_a}; - BigNumObj bno_p(this->p); - BigNum const* b[] = {bno_p}; - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - const BigNumStr bnm_1 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, - 0x6B, 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, - 0xFF, 0xB8, 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, - 0xF2, 0x6A, 0xFF, 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - BigNumObj bno_1(bnm_1); - BigNum const* b_1[] = {bno_1, bno_p}; - BigNum const* b_2[] = {bno_p, bno_1}; - EXPECT_EQ(kEpidBadArgErr, EcMultiExpBn(this->efq, pt, b, 1, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMultiExpBn(this->efq, pts, b_1, 2, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMultiExpBn(this->efq, pts, b_2, 2, this->efq_r)); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenOneZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a}; - BigNumObj bno_zero(zero_bn_str); - BigNum const* b[] = {bno_zero}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenTwoZeroExponents) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a, this->efq_a}; - BigNumObj bno_zero0(zero_bn_str); - BigNumObj bno_zero1(zero_bn_str); - BigNum const* b[] = {bno_zero0, bno_zero1}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenSixZeroExponents) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a, this->efq_a, this->efq_a, - this->efq_a, this->efq_a, this->efq_a}; - BigNumObj bno_zero0(zero_bn_str); - BigNumObj bno_zero1(zero_bn_str); - BigNumObj bno_zero2(zero_bn_str); - BigNumObj bno_zero3(zero_bn_str); - BigNumObj bno_zero4(zero_bn_str); - BigNumObj bno_zero5(zero_bn_str); - BigNum const* b[] = {bno_zero0, bno_zero1, bno_zero2, - bno_zero3, bno_zero4, bno_zero5}; - size_t m = 6; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenOneG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq2_a}; - BigNumObj bno_zero(zero_bn_str); - BigNum const* b[] = {bno_zero}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenTwoG2ZeroExponents) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq2_a, this->efq2_a}; - BigNumObj bno_zero0(zero_bn_str); - BigNumObj bno_zero1(zero_bn_str); - BigNum const* b[] = {bno_zero0, bno_zero1}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenSixG2ZeroExponents) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - BigNumObj bno_zero0(zero_bn_str); - BigNumObj bno_zero1(zero_bn_str); - BigNumObj bno_zero2(zero_bn_str); - BigNumObj bno_zero3(zero_bn_str); - BigNumObj bno_zero4(zero_bn_str); - BigNumObj bno_zero5(zero_bn_str); - EcPoint const* pts[] = {this->efq2_a, this->efq2_a, this->efq2_a, - this->efq2_a, this->efq2_a, this->efq2_a}; - BigNum const* b[] = {bno_zero0, bno_zero1, bno_zero2, - bno_zero3, bno_zero4, bno_zero5}; - size_t m = 6; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenOneExponent) { - G1ElemStr efq_r_str; - EcPoint const* pts[] = {this->efq_a}; - BigNumObj bno_x(this->x_str); - BigNum const* b[] = {bno_x}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_exp_ax_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenTwoExponents) { - G1ElemStr efq_r_str; - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - BigNumObj bno_x(this->x_str); - BigNumObj bno_y(this->y_str); - BigNum const* b[] = {bno_x, bno_y}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_multiexp_abxy_str, efq_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenOneG2Exponent) { - G2ElemStr efq2_r_str; - EcPoint const* pts[] = {this->efq2_a}; - BigNumObj bno_x(this->x_str); - BigNum const* b[] = {bno_x}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_exp_ax_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenTwoG2Exponents) { - G2ElemStr efq2_r_str; - EcPoint const* pts[] = {this->efq2_a, this->efq2_b}; - BigNumObj bno_x(this->x_str); - BigNumObj bno_y(this->y_str); - BigNum const* b[] = {bno_x, bno_y}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_multiexp_abxy_str, efq2_r_str); -} -TEST_F(EcGroupTest, MultiExpBnWorksGivenTwoDifferentSizeG3Exponents) { - const G1ElemStr g3_b_str = { - {{{ - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, - 0x0e, 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, - 0xb6, 0xe6, 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, - }}}, - {{{ - 0xfa, 0x85, 0x0f, 0x5c, 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, - 0x64, 0xda, 0xa9, 0x8e, 0xf5, 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, - 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, 0x33, 0xec, 0x2a, 0x70, - }}}}; - const G1ElemStr g3_k_str = { - {{{ - 0x41, 0xb7, 0xa4, 0xc8, 0x43, 0x3f, 0x0b, 0xc2, 0x80, 0x31, 0xbe, - 0x75, 0x65, 0xe9, 0xbb, 0x81, 0x73, 0x5b, 0x91, 0x4f, 0x3f, 0xd7, - 0xbe, 0xb5, 0x19, 0x56, 0x3f, 0x18, 0x95, 0xea, 0xc1, 0xd7, - }}}, - {{{ - 0xa4, 0x5e, 0xb9, 0x86, 0xfc, 0xe5, 0xc4, 0x0f, 0x54, 0x37, 0xab, - 0xed, 0x59, 0x20, 0xce, 0x67, 0x68, 0x3c, 0x25, 0x4d, 0xbc, 0x5f, - 0x6a, 0x4d, 0x5a, 0xa7, 0x93, 0xce, 0x90, 0x2d, 0x3e, 0x5a, - }}}}; - EcPointObj B(&this->epid11_G3, g3_b_str); - EcPointObj K(&this->epid11_G3, g3_k_str); - EcPoint const* pts[] = {B, K}; - const std::vector bnm_sf_str = { - 0x00, 0x3c, 0xc1, 0x73, 0x35, 0x3c, 0x99, 0x61, 0xb0, 0x80, 0x9a, - 0x0e, 0x8d, 0xbf, 0x5d, 0x0b, 0xa9, 0x18, 0x2b, 0x36, 0x3c, 0x06, - 0xbc, 0x1c, 0xc7, 0x9f, 0x76, 0xba, 0x5a, 0x26, 0xcd, 0x5e, 0x24, - 0xb9, 0x68, 0xde, 0x47, 0x72, 0xf9, 0xf9, 0x1e, 0xaa, 0x74, 0x17, - 0x31, 0xe4, 0x66, 0x59, 0x69, 0xe5, 0x9e, 0x27, 0x1d, 0x57, 0xe5, - 0x39, 0x57, 0xd4, 0xc5, 0x78, 0xf2, 0x77, 0x5c, 0x9f, 0x6c, 0xfe, - 0x12, 0x00, 0xa8, 0xe0, 0xd3, 0x81, 0x38, 0xaa, 0x5a}; - const BigNumStr bnm_nc_tick_str = {{{ - 0xcd, 0x2e, 0xe8, 0xf4, 0x85, 0x95, 0x04, 0x09, 0xbd, 0xa4, 0xfa, 0x07, - 0xe3, 0x1c, 0xb9, 0x5a, 0x82, 0x73, 0xa6, 0xea, 0x47, 0x5c, 0x31, 0x74, - 0x3c, 0x0a, 0xeb, 0x62, 0x94, 0x2f, 0x7b, 0x10, - }}}; - BigNumObj bno_sf(bnm_sf_str); - // In order to callculate exp sf data should be devided by group order - THROW_ON_EPIDERR(BigNumMod(bno_sf, epid11_p_tick, bno_sf)); - BigNumObj bno_nc_tick(bnm_nc_tick_str); - BigNum const* b[] = {bno_sf, bno_nc_tick}; - EcPointObj R3 = EcPointObj(&this->epid11_G3); - const std::vector expected_r_str = { - // X - 0x1E, 0xDF, 0x9E, 0xA5, 0xF5, 0xED, 0xB3, 0x3F, 0xCC, 0x83, 0x10, 0x5E, - 0x3E, 0xB7, 0xE5, 0x06, 0x5F, 0x19, 0xF9, 0xFD, 0xE9, 0x57, 0x0B, 0x31, - 0xC8, 0xDA, 0x0A, 0x7B, 0xCD, 0xB5, 0xAA, 0x2E, - // Y - 0x6A, 0x6B, 0x5A, 0x8D, 0x48, 0x5F, 0x2F, 0x72, 0x77, 0x93, 0xD6, 0xD0, - 0x49, 0xE1, 0x84, 0x35, 0x98, 0xF1, 0xDE, 0x71, 0xC5, 0xF4, 0x40, 0xFB, - 0x1C, 0x75, 0x83, 0xD7, 0x4F, 0x58, 0x0A, 0x8D}; - std::vector g3_r_str; - g3_r_str.resize(expected_r_str.size(), 0); - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcMultiExpBn(this->epid11_G3, pts, b, m, R3)); - THROW_ON_EPIDERR( - WriteEcPoint(this->epid11_G3, R3, g3_r_str.data(), g3_r_str.size())); - EXPECT_EQ(g3_r_str, expected_r_str); -} -/////////////////////////////////////////////////////////////////////// -// EcSscmMultiExp -TEST_F(EcGroupTest, SscmMultiExpFailsGivenArgumentsMismatch) { - EcPoint const* pts_ec1[] = {this->efq_a, this->efq_b}; - EcPoint const* pts_ec2[] = {this->efq2_a, this->efq2_b}; - EcPoint const* pts_ec1_ec2[] = {this->efq_a, this->efq2_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumStr const* b[] = {&bnm0, &bnm1}; - size_t m = 2; - - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq2, pts_ec1, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts_ec2, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts_ec1, b, m, this->efq2_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts_ec1_ec2, b, m, this->efq_r)); -} -TEST_F(EcGroupTest, SscmMultiExpFailsGivenNullPointer) { - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - EcPoint const* pts_withnull[] = {nullptr, this->efq_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumStr const* b[] = {&bnm0, &bnm1}; - BigNumStr const* b_withnull[] = {nullptr, &bnm1}; - size_t m = 2; - - EXPECT_EQ(kEpidBadArgErr, EcSscmMultiExp(nullptr, pts, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, nullptr, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts, nullptr, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcSscmMultiExp(this->efq, pts, b, m, nullptr)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts_withnull, b, m, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts, b_withnull, m, this->efq_r)); -} -TEST_F(EcGroupTest, SscmMultiExpFailsGivenIncorrectMLen) { - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - const BigNumStr bnm0 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, - 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, - 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, 0xF2, 0x6A, 0xFF, - 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - const BigNumStr bnm1 = {{0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, - 0xFF, 0x6B, 0xD5, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, - 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, 0x84, 0xFF, 0xFF, - 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; - BigNumStr const* b[] = {&bnm0, &bnm1}; - EXPECT_EQ(kEpidBadArgErr, EcSscmMultiExp(this->efq, pts, b, 0, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts, b, - std::numeric_limits::max(), this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcSscmMultiExp(this->efq, pts, b, - (size_t)INT_MAX + 1, this->efq_r)); -} -TEST_F(EcGroupTest, SscmMultiExpFailsGivenOutOfRangeExponent) { - EcPoint const* pts[] = {this->efq_a}; - BigNumStr const* b_1[] = {&this->p}; - // The exponent should be less than elliptic curve group order - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts, b_1, 1, this->efq_r)); -} -TEST_F(EcGroupTest, SscmMultiExpFailsGivenOutOfRangeExponents) { - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - const BigNumStr bnm_1 = {{0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, - 0x6B, 0x08, 0xFF, 0xFF, 0x0B, 0xF3, 0xAF, 0x27, - 0xFF, 0xB8, 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, - 0xF2, 0x6A, 0xFF, 0xFF, 0xEA, 0x31, 0xFF, 0xFF}}; - BigNumStr const* b_1[] = {&bnm_1, &this->p}; - BigNumStr const* b_2[] = {&this->p, &bnm_1}; - // The exponent should be less than elliptic curve group order - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts, b_1, 2, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcSscmMultiExp(this->efq, pts, b_2, 2, this->efq_r)); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenOneZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a}; - BigNumStr const* b[] = {&zero_bn_str}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenTwoZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a, this->efq_a}; - BigNumStr const* b[] = {&zero_bn_str, &zero_bn_str}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenSixZeroExponent) { - G1ElemStr efq_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq_a, this->efq_a, this->efq_a, - this->efq_a, this->efq_a, this->efq_a}; - BigNumStr const* b[] = {&zero_bn_str, &zero_bn_str, &zero_bn_str, - &zero_bn_str, &zero_bn_str, &zero_bn_str}; - size_t m = 6; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenOneG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq2_a}; - BigNumStr const* b[] = {&zero_bn_str}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenTwoG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq2_a, this->efq2_a}; - BigNumStr const* b[] = {&zero_bn_str, &zero_bn_str}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenSixG2ZeroExponent) { - G2ElemStr efq2_r_str; - BigNumStr zero_bn_str = {0}; - EcPoint const* pts[] = {this->efq2_a, this->efq2_a, this->efq2_a, - this->efq2_a, this->efq2_a, this->efq2_a}; - BigNumStr const* b[] = {&zero_bn_str, &zero_bn_str, &zero_bn_str, - &zero_bn_str, &zero_bn_str, &zero_bn_str}; - size_t m = 6; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenOneExponent) { - G1ElemStr efq_r_str; - EcPoint const* pts[] = {this->efq_a}; - BigNumStr const* b[] = {&this->x_str}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_exp_ax_str, efq_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenTwoExponents) { - G1ElemStr efq_r_str; - EcPoint const* pts[] = {this->efq_a, this->efq_b}; - BigNumStr const* b[] = {&this->x_str, &this->y_str}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq, pts, b, m, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_multiexp_abxy_str, efq_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenOneG2Exponent) { - G2ElemStr efq2_r_str; - EcPoint const* pts[] = {this->efq2_a}; - BigNumStr const* b[] = {&this->x_str}; - size_t m = 1; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_exp_ax_str, efq2_r_str); -} -TEST_F(EcGroupTest, SscmMultiExpWorksGivenTwoG2Exponents) { - G2ElemStr efq2_r_str; - EcPoint const* pts[] = {this->efq2_a, this->efq2_b}; - BigNumStr const* b[] = {&this->x_str, &this->y_str}; - size_t m = 2; - EXPECT_EQ(kEpidNoErr, EcSscmMultiExp(this->efq2, pts, b, m, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_multiexp_abxy_str, efq2_r_str); -} -/////////////////////////////////////////////////////////////////////// -// EcGetRandom -TEST_F(EcGroupTest, GetRandomFailsGivenArgumentsMismatch) { - Prng my_prng; - EXPECT_EQ(kEpidBadArgErr, - EcGetRandom(this->efq2, &Prng::Generate, &my_prng, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcGetRandom(this->efq, &Prng::Generate, &my_prng, this->efq2_r)); -} -TEST_F(EcGroupTest, GetRandomFailsGivenNullPointer) { - Prng my_prng; - EXPECT_EQ(kEpidBadArgErr, - EcGetRandom(nullptr, &Prng::Generate, &my_prng, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcGetRandom(this->efq, nullptr, &my_prng, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcGetRandom(this->efq, &Prng::Generate, &my_prng, nullptr)); -} -TEST_F(EcGroupTest, GetRandomGeneratesDifferentECPoints) { - Prng my_prng; - EcPointObj r1(&this->efq); - EcPointObj r2(&this->efq); - bool result; - // __LINE__ makes sure that r1 and r2 are generated using distinct seeds - my_prng.set_seed(__LINE__); - EXPECT_EQ(kEpidNoErr, EcGetRandom(this->efq, &Prng::Generate, &my_prng, r1)); - my_prng.set_seed(__LINE__); - EXPECT_EQ(kEpidNoErr, EcGetRandom(this->efq, &Prng::Generate, &my_prng, r2)); - THROW_ON_EPIDERR(EcIsEqual(this->efq, r1, r2, &result)); - EXPECT_FALSE(result); -} -/////////////////////////////////////////////////////////////////////// -// EcInGroup -TEST_F(EcGroupTest, InGroupFailsGivenNullPointer) { - bool in_group; - EXPECT_EQ(kEpidBadArgErr, EcInGroup(nullptr, &(this->efq_a_str), - sizeof(this->efq_a_str), &in_group)); - EXPECT_EQ(kEpidBadArgErr, - EcInGroup(this->efq, nullptr, sizeof(this->efq_a_str), &in_group)); - EXPECT_EQ(kEpidBadArgErr, EcInGroup(this->efq, &(this->efq_a_str), - sizeof(this->efq_a_str), nullptr)); -} -TEST_F(EcGroupTest, InGroupFailsGivenInvalidBufferSize) { - bool in_group; - EXPECT_EQ(kEpidBadArgErr, - EcInGroup(this->efq, &(this->efq_a_str), 0, &in_group)); - EXPECT_EQ(kEpidBadArgErr, - EcInGroup(this->efq, &(this->efq_a_str), - std::numeric_limits::max(), &in_group)); -#if (SIZE_MAX >= 0x100000001) // When size_t value allowed to be 0x100000001 - EXPECT_EQ(kEpidBadArgErr, - EcInGroup(this->efq, &(this->efq_a_str), 0x100000001, &in_group)); -#endif -} -TEST_F(EcGroupTest, InGroupDetectsElementNotInGroup) { - // element be not in group if Y coordinate increased by 1 - G1ElemStr p_str = this->efq_a_str; - p_str.y.data.data[31] -= 1; - - bool in_group; - EXPECT_EQ(kEpidNoErr, EcInGroup(this->efq, &p_str, sizeof(p_str), &in_group)); - EXPECT_FALSE(in_group); - - G2ElemStr p2_str = this->efq2_a_str; - p2_str.y[0].data.data[31] -= 1; - - EXPECT_EQ(kEpidNoErr, - EcInGroup(this->efq2, &p2_str, sizeof(p2_str), &in_group)); - EXPECT_FALSE(in_group); -} -TEST_F(EcGroupTest, InGroupDetectsIdentityElementInGroup) { - bool in_group; - EXPECT_EQ(kEpidNoErr, EcInGroup(this->efq, &(this->efq_identity_str), - sizeof(this->efq_identity_str), &in_group)); - EXPECT_TRUE(in_group); - - EXPECT_EQ(kEpidNoErr, EcInGroup(this->efq2, &(this->efq2_identity_str), - sizeof(this->efq2_identity_str), &in_group)); - EXPECT_TRUE(in_group); -} -TEST_F(EcGroupTest, InGroupFailsGivenContextMismatch) { - bool in_group; - EXPECT_EQ(kEpidBadArgErr, EcInGroup(this->efq2, &(this->efq_a_str), - sizeof(this->efq_a_str), &in_group)); - EXPECT_FALSE(in_group); - - EXPECT_EQ(kEpidBadArgErr, EcInGroup(this->efq, &(this->efq2_a_str), - sizeof(this->efq2_a_str), &in_group)); - EXPECT_FALSE(in_group); -} -/////////////////////////////////////////////////////////////////////// -// EcHash -TEST_F(EcGroupTest, HashFailsGivenArgumentsMismatch) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidBadArgErr, - EcHash(this->efq2, msg, sizeof(msg), kSha256, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcHash(this->efq, msg, sizeof(msg), kSha256, this->efq2_r)); -} -TEST_F(EcGroupTest, HashFailsGivenNullPointer) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidBadArgErr, - EcHash(nullptr, msg, sizeof(msg), kSha256, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcHash(this->efq, nullptr, sizeof(msg), kSha256, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcHash(this->efq, msg, sizeof(msg), kSha256, nullptr)); -} -TEST_F(EcGroupTest, HashFailsGivenUnsupportedHashAlg) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidHashAlgorithmNotSupported, - EcHash(this->efq, msg, sizeof(msg), kSha512_256, this->efq_r)); - EXPECT_EQ(kEpidHashAlgorithmNotSupported, - EcHash(this->efq, msg, sizeof(msg), kSha3_256, this->efq_r)); - EXPECT_EQ(kEpidHashAlgorithmNotSupported, - EcHash(this->efq, msg, sizeof(msg), kSha3_384, this->efq_r)); - EXPECT_EQ(kEpidHashAlgorithmNotSupported, - EcHash(this->efq, msg, sizeof(msg), kSha3_512, this->efq_r)); -} -TEST_F(EcGroupTest, HashFailsGivenIncorrectMsgLen) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidBadArgErr, - EcHash(this->efq, nullptr, 1, kSha256, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcHash(this->efq, msg, std::numeric_limits::max(), kSha256, - this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - EcHash(this->efq, msg, (size_t)INT_MAX + 1, kSha256, this->efq_r)); -#if (SIZE_MAX >= 0x100000001) // When size_t value allowed to be 0x100000001 - EXPECT_EQ(kEpidBadArgErr, - EcHash(this->efq, msg, (size_t)0x100000001, kSha256, this->efq_r)); -#endif -} -TEST_F(EcGroupTest, HashAcceptsZeroLengthMessage) { - EXPECT_EQ(kEpidNoErr, EcHash(this->efq, "", 0, kSha256, this->efq_r)); -} -TEST_F(EcGroupTest, HashWorksGivenSHA256HashAlg) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, - EcHash(this->efq, sha_msg, sizeof(sha_msg), kSha256, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_r_sha256_str, efq_r_str); -} -TEST_F(EcGroupTest, HashWorksGivenSHA384HashAlg) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, - EcHash(this->efq, sha_msg, sizeof(sha_msg), kSha384, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_r_sha384_str, efq_r_str); -} -TEST_F(EcGroupTest, HashWorksGivenSHA512HashAlg) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, - EcHash(this->efq, sha_msg, sizeof(sha_msg), kSha512, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_r_sha512_str, efq_r_str); -} -/////////////////////////////////////////////////////////////////////// -// 1.1 EcHash -TEST_F(EcGroupTest, Epid11HashFailsGivenMismatchedArguments) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidBadArgErr, - Epid11EcHash(this->efq2, msg, sizeof(msg), this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, - Epid11EcHash(this->efq, msg, sizeof(msg), this->efq2_r)); -} -TEST_F(EcGroupTest, Epid11HashFailsGivenNullPointer) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidBadArgErr, - Epid11EcHash(nullptr, msg, sizeof(msg), this->epid11_G3_r)); - EXPECT_EQ(kEpidBadArgErr, Epid11EcHash(this->epid11_G3, nullptr, sizeof(msg), - this->epid11_G3_r)); - EXPECT_EQ(kEpidBadArgErr, - Epid11EcHash(this->epid11_G3, msg, sizeof(msg), nullptr)); -} -TEST_F(EcGroupTest, Epid11HashFailsGivenInvalidMsgLen) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidBadArgErr, - Epid11EcHash(this->epid11_G3, nullptr, 1, this->epid11_G3_r)); - EXPECT_EQ(kEpidBadArgErr, Epid11EcHash(this->epid11_G3, msg, - std::numeric_limits::max(), - this->epid11_G3_r)); - EXPECT_EQ(kEpidBadArgErr, - Epid11EcHash(this->epid11_G3, msg, (size_t)INT_MAX + 1, - this->epid11_G3_r)); -#if (SIZE_MAX >= 0x100000001) // When size_t value allowed to be 0x100000001 - EXPECT_EQ(kEpidBadArgErr, - Epid11EcHash(this->epid11_G3, msg, (size_t)0x100000001, - this->epid11_G3_r)); -#endif -} -TEST_F(EcGroupTest, Epid11HashAcceptsZeroLengthMessage) { - EXPECT_EQ(kEpidNoErr, - Epid11EcHash(this->epid11_G3, "", 0, this->epid11_G3_r)); -} -TEST_F(EcGroupTest, Epid11HashWorksGivenValidParameters) { - Epid11G3ElemStr r_str; - - uint8_t const msg0[] = {'a', 'a', 'd'}; - EXPECT_EQ(kEpidNoErr, Epid11EcHash(this->epid11_G3, msg0, sizeof(msg0), - this->epid11_G3_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->epid11_G3, this->epid11_G3_r, &r_str, sizeof(r_str))); - EXPECT_EQ(this->kAadHash, r_str); - - uint8_t const msg1[] = {'b', 's', 'n', '0'}; - EXPECT_EQ(kEpidNoErr, Epid11EcHash(this->epid11_G3, msg1, sizeof(msg1), - this->epid11_G3_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->epid11_G3, this->epid11_G3_r, &r_str, sizeof(r_str))); - EXPECT_EQ(this->kBsn0Hash, r_str); - - uint8_t const msg2[] = {'t', 'e', 's', 't'}; - EXPECT_EQ(kEpidNoErr, Epid11EcHash(this->epid11_G3, msg2, sizeof(msg2), - this->epid11_G3_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->epid11_G3, this->epid11_G3_r, &r_str, sizeof(r_str))); - EXPECT_EQ(this->kTestHash, r_str); - - uint8_t const msg3[] = {'a', 'a', 'c'}; - EXPECT_EQ(kEpidNoErr, Epid11EcHash(this->epid11_G3, msg3, sizeof(msg3), - this->epid11_G3_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->epid11_G3, this->epid11_G3_r, &r_str, sizeof(r_str))); - EXPECT_EQ(this->kAacHash, r_str); -} -/////////////////////////////////////////////////////////////////////// -// EcMakePoint -TEST_F(EcGroupTest, MakePointFailsGivenArgumentsMismatch) { - FfElementObj fq2_a(&this->efq2_par->fq2); - - EXPECT_EQ(kEpidBadArgErr, EcMakePoint(this->efq2, this->fq_a, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMakePoint(this->efq, fq2_a, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMakePoint(this->efq2, this->fq_a, this->efq2_r)); -} -TEST_F(EcGroupTest, MakePointFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, EcMakePoint(nullptr, this->fq_a, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMakePoint(this->efq, nullptr, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcMakePoint(this->efq, this->fq_a, nullptr)); -} -TEST_F(EcGroupTest, MakePointSucceedsGivenElement) { - Prng my_prng; - G1ElemStr efq_r_str; - - // a pre-computed point in eqf - G1ElemStr efq_ref_str = { - {{0X1C, 0X53, 0X40, 0X69, 0X8B, 0X77, 0X75, 0XAA, 0X2B, 0X7D, 0X91, 0XD6, - 0X29, 0X49, 0X05, 0X7F, 0XF6, 0X4C, 0X63, 0X90, 0X58, 0X22, 0X06, 0XF5, - 0X1F, 0X3B, 0X9F, 0XA2, 0X04, 0X39, 0XA9, 0X67}}, - {{0X3B, 0X65, 0X58, 0XAC, 0X97, 0X46, 0X47, 0XC9, 0X84, 0X57, 0X3F, 0XFA, - 0X4F, 0XB0, 0X64, 0X8D, 0X48, 0XC8, 0X14, 0XEB, 0XF1, 0X94, 0X87, 0XDC, - 0XB3, 0X73, 0X90, 0X1D, 0X75, 0XAD, 0XD5, 0X56}}}; - - // create a point with x == ref.x - FfElementObj elem(&this->fq, efq_ref_str.x); - EXPECT_EQ(kEpidNoErr, EcMakePoint(this->efq, elem, this->efq_r)); - - // check that the point matches ref - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(efq_ref_str, efq_r_str); -} -TEST_F(EcGroupTest, MakePointFailsGivenZeroElement) { - EXPECT_EQ(kEpidBadArgErr, - EcMakePoint(this->efq, FfElementObj(&this->fq), this->efq_r)); - // EcMakePoint is only defined for G1 - EXPECT_EQ(kEpidBadArgErr, - EcMakePoint(this->efq2, FfElementObj(&this->efq2_par->fq2), - this->efq2_r)); -} -/////////////////////////////////////////////////////////////////////// -// EcInverse -TEST_F(EcGroupTest, InverseFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, EcInverse(this->efq2, this->efq_a, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcInverse(this->efq, this->efq2_a, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcInverse(this->efq, this->efq_a, this->efq2_r)); -} - -TEST_F(EcGroupTest, InverseFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, EcInverse(nullptr, this->efq_a, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcInverse(this->efq, nullptr, this->efq_r)); - EXPECT_EQ(kEpidBadArgErr, EcInverse(this->efq, this->efq_a, nullptr)); -} - -TEST_F(EcGroupTest, InverseSucceedsGivenIdentity) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, EcInverse(this->efq, this->efq_identity, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_identity_str, efq_r_str); - - G2ElemStr efq2_r_str; - EXPECT_EQ(kEpidNoErr, - EcInverse(this->efq2, this->efq2_identity, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_identity_str, efq2_r_str); -} - -TEST_F(EcGroupTest, InverseSucceedsGivenElement) { - G1ElemStr efq_r_str; - EXPECT_EQ(kEpidNoErr, EcInverse(this->efq, this->efq_a, this->efq_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq, this->efq_r, &efq_r_str, sizeof(efq_r_str))); - EXPECT_EQ(this->efq_inv_a_str, efq_r_str); - - G2ElemStr efq2_r_str; - EXPECT_EQ(kEpidNoErr, EcInverse(this->efq2, this->efq2_a, this->efq2_r)); - THROW_ON_EPIDERR( - WriteEcPoint(this->efq2, this->efq2_r, &efq2_r_str, sizeof(efq2_r_str))); - EXPECT_EQ(this->efq2_inv_a_str, efq2_r_str); -} -/////////////////////////////////////////////////////////////////////// -// EcIsEqual -TEST_F(EcGroupTest, IsEqualFailsGivenArgumentsMismatch) { - bool result; - EXPECT_EQ(kEpidBadArgErr, - EcIsEqual(this->efq2, this->efq_a, this->efq_a, &result)); - EXPECT_EQ(kEpidBadArgErr, - EcIsEqual(this->efq, this->efq2_a, this->efq_a, &result)); - EXPECT_EQ(kEpidBadArgErr, - EcIsEqual(this->efq, this->efq_a, this->efq2_a, &result)); -} -TEST_F(EcGroupTest, IsEqualFailsGivenNullPointer) { - bool result; - EXPECT_EQ(kEpidBadArgErr, - EcIsEqual(nullptr, this->efq_a, this->efq_a, &result)); - EXPECT_EQ(kEpidBadArgErr, - EcIsEqual(this->efq, nullptr, this->efq_a, &result)); - EXPECT_EQ(kEpidBadArgErr, - EcIsEqual(this->efq, this->efq_a, nullptr, &result)); - EXPECT_EQ(kEpidBadArgErr, - EcIsEqual(this->efq, this->efq_a, this->efq_a, nullptr)); -} -TEST_F(EcGroupTest, IsEqualCanCompareElementWithItself) { - bool result; - ASSERT_EQ(kEpidNoErr, - EcIsEqual(this->efq, this->efq_a, this->efq_a, &result)); - EXPECT_TRUE(result); - - ASSERT_EQ(kEpidNoErr, - EcIsEqual(this->efq2, this->efq2_a, this->efq2_a, &result)); - EXPECT_TRUE(result); -} -TEST_F(EcGroupTest, DifferentEFqElementsAreNotEqual) { - bool result; - ASSERT_EQ(kEpidNoErr, - EcIsEqual(this->efq, this->efq_a, this->efq_b, &result)); - EXPECT_FALSE(result); -} -TEST_F(EcGroupTest, SameEFqElementsAreEqual) { - THROW_ON_EPIDERR(ReadEcPoint(this->efq, &(this->efq_a_str), - sizeof(this->efq_a_str), this->efq_b)); - bool result; - ASSERT_EQ(kEpidNoErr, - EcIsEqual(this->efq, this->efq_a, this->efq_b, &result)); - EXPECT_TRUE(result); -} -TEST_F(EcGroupTest, IsEqualCanCompareIdentityEFqElements) { - THROW_ON_EPIDERR(ReadEcPoint(this->efq, &(this->efq_identity_str), - sizeof(this->efq_identity_str), this->efq_b)); - bool result; - ASSERT_EQ(kEpidNoErr, - EcIsEqual(this->efq, this->efq_identity, this->efq_b, &result)); - EXPECT_TRUE(result); -} - -TEST_F(EcGroupTest, DifferentEFq2ElementsAreNotEqual) { - bool result; - ASSERT_EQ(kEpidNoErr, - EcIsEqual(this->efq2, this->efq2_a, this->efq2_b, &result)); - EXPECT_FALSE(result); -} -TEST_F(EcGroupTest, SameEFq2ElementsAreEqual) { - THROW_ON_EPIDERR(ReadEcPoint(this->efq2, &(this->efq2_a_str), - sizeof(this->efq2_a_str), this->efq2_b)); - bool result; - ASSERT_EQ(kEpidNoErr, - EcIsEqual(this->efq2, this->efq2_a, this->efq2_b, &result)); - EXPECT_TRUE(result); -} -TEST_F(EcGroupTest, IsEqualCanCompareIdentityEFq2Elements) { - THROW_ON_EPIDERR(ReadEcPoint(this->efq2, &(this->efq2_identity_str), - sizeof(this->efq2_identity_str), this->efq2_b)); - bool result; - ASSERT_EQ(kEpidNoErr, - EcIsEqual(this->efq2, this->efq2_identity, this->efq2_b, &result)); - EXPECT_TRUE(result); -} -/////////////////////////////////////////////////////////////////////// -// EcIsIdentity -TEST_F(EcGroupTest, IsIdentityFailsGivenArgumentsMismatch) { - bool result; - EXPECT_EQ(kEpidBadArgErr, - EcIsIdentity(this->efq2, this->efq_identity, &result)); - EXPECT_EQ(kEpidBadArgErr, - EcIsIdentity(this->efq, this->efq2_identity, &result)); -} -TEST_F(EcGroupTest, IsIdentityFailsGivenNullPointer) { - bool result; - EXPECT_EQ(kEpidBadArgErr, EcIsIdentity(nullptr, this->efq_identity, &result)); - EXPECT_EQ(kEpidBadArgErr, EcIsIdentity(this->efq, nullptr, &result)); - EXPECT_EQ(kEpidBadArgErr, - EcIsIdentity(this->efq, this->efq_identity, nullptr)); -} -TEST_F(EcGroupTest, IsIdentityDetectsIdentityElement) { - bool result; - EXPECT_EQ(kEpidNoErr, EcIsIdentity(this->efq, this->efq_identity, &result)); - EXPECT_TRUE(result); - EXPECT_EQ(kEpidNoErr, EcIsIdentity(this->efq2, this->efq2_identity, &result)); - EXPECT_TRUE(result); -} -TEST_F(EcGroupTest, IsIdentityDetectsNonIdentityElement) { - bool result; - EXPECT_EQ(kEpidNoErr, EcIsIdentity(this->efq, this->efq_a, &result)); - EXPECT_FALSE(result); - EXPECT_EQ(kEpidNoErr, EcIsIdentity(this->efq2, this->efq2_a, &result)); - EXPECT_FALSE(result); -} -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ffelement-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ffelement-test.cc deleted file mode 100644 index 9a9c5d1414..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/ffelement-test.cc +++ /dev/null @@ -1,2989 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief FfElement unit tests. - */ - -#include -#include -#include - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/common-testhelper/octstr-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/finitefield.h" -} - -#include "epid/common/types.h" - -#ifndef COUNT_OF -#define COUNT_OF(a) (sizeof(a) / sizeof((a)[0])) -#endif // COUNT_OF - -/// compares BigNumStr values -bool operator==(BigNumStr const& lhs, BigNumStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -/// compares BigNumStr to FqElemStr values -bool operator==(BigNumStr const& lhs, FqElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -/// compares FqElemStr to BigNumStr values -bool operator==(FqElemStr const& lhs, BigNumStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -/// compares FqElemStr values -bool operator==(FqElemStr const& lhs, FqElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -/// compares Fq2ElemStr values -bool operator==(Fq2ElemStr const& lhs, Fq2ElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -/// compares Fq6ElemStr values -bool operator==(Fq6ElemStr const& lhs, Fq6ElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -/// compares Fq12ElemStr values -bool operator==(Fq12ElemStr const& lhs, Fq12ElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -/// compares FpElemStr values -bool operator==(FpElemStr const& lhs, FpElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -/// compares FfElementObj values -bool operator==(FfElementObj const& lhs, FfElementObj const& rhs) { - auto lhs_data = lhs.data(); - auto rhs_data = rhs.data(); - return lhs_data.size() == rhs_data.size() && - std::equal(lhs_data.begin(), lhs_data.end(), rhs_data.begin()); -} - -namespace { - -class FfElementTest : public ::testing::Test { - public: - virtual void SetUp() { - fq = FiniteFieldObj(bn_q_str); - - // construct Fq^2 finite field - FfElementObj neg_beta(&fq); - THROW_ON_EPIDERR(FfNeg(fq, FfElementObj(&fq, fq_qm1_str), neg_beta)); - fq2 = FiniteFieldObj(fq, neg_beta, 2); - - // construct Fq^6 finite field - FfElementObj neg_xi(&fq2); - THROW_ON_EPIDERR(FfNeg(fq2, FfElementObj(&fq2, this->fq2_2_1_str), neg_xi)); - fq6 = FiniteFieldObj(fq2, neg_xi, 3); - - // construct Fq^12 finite field - FfElementObj neg_v(&fq6); - THROW_ON_EPIDERR( - FfNeg(fq6, FfElementObj(&fq6, this->fq6_0_0_1_0_0_0_str), neg_v)); - fq12 = FiniteFieldObj(fq6, neg_v, 2); - - fq_0 = FfElementObj(&fq, &bn_0_str, sizeof(bn_0_str)); - fq_2 = FfElementObj(&fq, &fq_2_str, sizeof(fq_2_str)); - fq_qm2 = FfElementObj(&fq, &fq_qm2_str, sizeof(fq_qm2_str)); - fq_3 = FfElementObj(&fq, &fq_3_str, sizeof(fq_3_str)); - fq_4 = FfElementObj(&fq, &fq_4_str, sizeof(fq_4_str)); - fq_5 = FfElementObj(&fq, &fq_5_str, sizeof(fq_5_str)); - fq_a = FfElementObj(&fq, &bn_a_str, sizeof(bn_a_str)); - // construct EPID 1.1 Fq finite field - epid11_fq = FiniteFieldObj(bn_epid11_bn_q_str); - - // construct EPID 1.1 Fqd finite field - epid11_fqd = FiniteFieldObj(epid11_fq, bn_epid11_fq_coeffs, - COUNT_OF(bn_epid11_fq_coeffs)); - - // Fqk ground element is {-qnr, 0, 0} - FfElementObj epid11_neg_qnr(&epid11_fq); - THROW_ON_EPIDERR(FfNeg( - epid11_fq, FfElementObj(&epid11_fq, fq_epid11_fq_qnr), epid11_neg_qnr)); - Fq3ElemStr epid11_ground_element_str = {0}; - THROW_ON_EPIDERR(WriteFfElement(epid11_fq, epid11_neg_qnr, - &epid11_ground_element_str.a[0], - sizeof(epid11_ground_element_str.a[0]))); - // construct EPID 1.1 Fqk finite field - epid11_GT = FiniteFieldObj( - epid11_fqd, FfElementObj(&epid11_fqd, epid11_ground_element_str), 2); - - fq_0 = FfElementObj(&fq, &bn_0_str, sizeof((bn_0_str))); - fq_1 = FfElementObj(&fq, &bn_1_str, sizeof(bn_1_str)); - fq_a = FfElementObj(&fq, &bn_a_str, sizeof(bn_a_str)); - fq_b = FfElementObj(&fq, &bn_b_str, sizeof(bn_b_str)); - fq_result = FfElementObj(&fq); - fq_sum_ab = FfElementObj(&fq, &fq_sum_ab_str, sizeof(fq_sum_ab_str)); - - fp = FiniteFieldObj(bn_p_str); - - bn_0 = BigNumObj(bn_0_str); - bn_1 = BigNumObj(bn_1_str); - bn_a = BigNumObj(bn_a_str); - - fq2_a = FfElementObj(&fq2, &fq2_a_str, sizeof(fq2_a_str)); - fq2_result = FfElementObj(&fq2); - - fq12_g = FfElementObj(&fq12, &fq12_g_str, sizeof(fq12_g_str)); - fq12_h = FfElementObj(&fq12, &fq12_h_str, sizeof(fq12_h_str)); - fq12_i = FfElementObj(&fq12, &fq12_i_str, sizeof(fq12_i_str)); - fq12_j = FfElementObj(&fq12, &fq12_j_str, sizeof(fq12_j_str)); - fq12_k = FfElementObj(&fq12, &fq12_k_str, sizeof(fq12_k_str)); - fq12_result = FfElementObj(&fq12); - } - - FiniteFieldObj fq; - FiniteFieldObj fq2; - FiniteFieldObj fq6; - FiniteFieldObj fq12; - FiniteFieldObj epid11_fq; - FiniteFieldObj epid11_fqd; - FiniteFieldObj epid11_GT; - - FfElementObj fq_0; - FfElementObj fq_1; - FfElementObj fq_2; - FfElementObj fq_qm2; // Intel(R) EPID 2.0 parameter q - 2 - FfElementObj fq_3; - FfElementObj fq_4; - FfElementObj fq_5; - FfElementObj fq_a; - FfElementObj fq_b; - FfElementObj fq_result; - FfElementObj fq_sum_ab; - - FfElementObj fq2_a; - FfElementObj fq2_result; - - FfElementObj fq12_g; - FfElementObj fq12_h; - FfElementObj fq12_i; - FfElementObj fq12_j; - FfElementObj fq12_k; - FfElementObj fq12_result; - - FiniteFieldObj fp; - - BigNumObj bn_0; - BigNumObj bn_1; - BigNumObj bn_a; - - // Intel(R) EPID 2.0 parameter p - static const BigNumStr bn_p_str; - static const FpElemStr fp_p_str; - - // Intel(R) EPID 2.0 parameter p - 1 - static const BigNumStr fp_pm1_str; - - // Intel(R) EPID 2.0 parameter q - static const BigNumStr bn_q_str; - - // Intel(R) EPID 2.0 parameter q - 1 - static const FqElemStr fq_qm1_str; - static const BigNumStr bn_qm1_str; - - // Intel(R) EPID 2.0 parameter q - 2 - static const FqElemStr fq_qm2_str; - - // Intel(R) EPID 2.0 parameter q + 1 - static const BigNumStr bn_qp1_str; - - // Intel(R) EPID 2.0 parameter q - 0x3013 - static const BigNumStr fq_qm0x3013_str; - - // Intel(R) EPID 1.1 parameter q - static const BigNumStr bn_epid11_bn_q_str; - - // Intel(R) EPID 1.1 parameter qnr - static const FqElemStr fq_epid11_fq_qnr; - - // Intel(R) EPID 1.1 parameter coeff - static const BigNumStr bn_epid11_fq_coeffs[3]; - - // zero - static const BigNumStr bn_0_str; - static const FqElemStr fq_0_str; - - // one - static const BigNumStr bn_1_str; - static const FqElemStr fq_1_str; - - // two - static const BigNumStr bn_2_str; - static const FqElemStr fq_2_str; - - // three - static const FqElemStr fq_3_str; - - // four - static const FqElemStr fq_4_str; - - // five - static const FqElemStr fq_5_str; - - // 0x0000FFFF - static const BigNumStr bn_0xffff_str; - - // Fq2 element containing {2, 1} - static const Fq2ElemStr fq2_2_1_str; - - // Fq6 element containing {0, 0, 1, 0, 0, 0} - static const Fq6ElemStr fq6_0_0_1_0_0_0_str; - - // arbitrary constant a (256 bit value) - static const BigNumStr bn_a_str; - static const FqElemStr fq_a_str; - static const Fq2ElemStr fq2_a_str; - - // arbitrary constant b (256 bit value) - static const BigNumStr bn_b_str; - static const FqElemStr fq_b_str; - - // a + b - static const FqElemStr fq_sum_ab_str; - static const Fq2ElemStr fq2_sum_ab_str; - static const Fq6ElemStr fq6_sum_ab_str; - static const Fq12ElemStr fq12_sum_ab_str; - - // a * b - static const FqElemStr fq_mul_ab_str; - static const Fq2ElemStr fq2_mul_ab_str; - - // 1/a - static const FqElemStr fq_inv_a_str; - - // -a - static const FqElemStr fq_neg_a_str; - - // pow(a, b), that is a raised to the power b - static const FqElemStr fq_exp_ab_str; - - static const uint8_t sha_msg[3]; // predefined message for tests "abc" - static const FqElemStr fq_abc_sha256_str; - static const FqElemStr fq_abc_sha384_str; - static const FqElemStr fq_abc_sha512_str; - - // arbitrary Fq12 constant a (unrelated to a above) - static const Fq12ElemStr fq12_g_str; - // arbitrary Fq12 constant b (unrelated to a above) - static const Fq12ElemStr fq12_h_str; - // arbitrary Fq12 constant c - static const Fq12ElemStr fq12_i_str; - // arbitrary Fq12 constant d - static const Fq12ElemStr fq12_j_str; - // arbitrary Fq12 constant e - static const Fq12ElemStr fq12_k_str; - // c * d - static const Fq12ElemStr fq12_mul_ij_str; - // e * b - static const Fq12ElemStr fq12_mul_gb_str; - - // Fq Multi Exp Data - static const FqElemStr fq_multi_exp_base_1[1]; - static const BigNumStr fq_multi_exp_exp_1[1]; - static const FqElemStr fq_multi_exp_res_1; - static const std::vector fq_multi_exp_exp_1_264; - static const FqElemStr fq_multi_exp_res_1_264; - static const FqElemStr fq_multi_exp_res_1_256_264; - static const FqElemStr fq_multi_exp_base_2[2]; - static const BigNumStr fq_multi_exp_exp_2[2]; - static const FqElemStr fq_multi_exp_res_2; - static const FqElemStr fq_multi_exp_base_3[3]; - static const BigNumStr fq_multi_exp_exp_3[3]; - static const FqElemStr fq_multi_exp_res_3; - static const FqElemStr fq_multi_exp_base_4[4]; - static const BigNumStr fq_multi_exp_exp_4[4]; - static const FqElemStr fq_multi_exp_res_4; - static const FqElemStr fq_multi_exp_base_5[5]; - static const BigNumStr fq_multi_exp_exp_5[5]; - static const FqElemStr fq_multi_exp_res_5; - static const FqElemStr fq_multi_exp_base_6[6]; - static const BigNumStr fq_multi_exp_exp_6[6]; - static const FqElemStr fq_multi_exp_res_6; - - // EPID 1.1 GT Multi Exp Data - static const Fq6ElemStr epid11_GT_multi_exp_base_3[3]; - static const std::vector epid11_GT_multi_exp_exp_3[3]; - static const Fq6ElemStr epid11_GT_multi_exp_res_3; - - // Fq12 Multi Exp Data - static const Fq12ElemStr fq12_multi_exp_base_4[4]; - static const BigNumStr fq12_multi_exp_exp_4[4]; - static const Fq12ElemStr fq12_multi_exp_res_4; -}; - -const Fq2ElemStr FfElementTest::fq2_2_1_str = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}}}; -const Fq6ElemStr FfElementTest::fq6_0_0_1_0_0_0_str = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}; - -// Intel(R) EPID 2.0 parameter p -const BigNumStr FfElementTest::bn_p_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}; - -// Intel(R) EPID 2.0 parameter p - 0x0D -const FpElemStr FfElementTest::fp_p_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x00}; - -// Intel(R) EPID 2.0 parameter p - 1 -const BigNumStr FfElementTest::fp_pm1_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0C, -}; - -// Intel(R) EPID 2.0 parameter q -const BigNumStr FfElementTest::bn_q_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, - 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x13}; - -// Intel(R) EPID 2.0 parameter q - 1 -const FqElemStr FfElementTest::fq_qm1_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, - 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x12}; - -const BigNumStr FfElementTest::bn_qm1_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, - 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x12}; - -// Intel(R) EPID 2.0 parameter q - 2 -const FqElemStr FfElementTest::fq_qm2_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, - 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x11}; - -// Intel(R) EPID 2.0 parameter q + 1 -const BigNumStr FfElementTest::bn_qp1_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, - 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x14}; - -// Intel(R) EPID 2.0 parameter q - 0x3013 -const BigNumStr FfElementTest::fq_qm0x3013_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, - 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x00, 0x00}; - -// Intel(R) EPID 1.1 parameter q -const BigNumStr FfElementTest::bn_epid11_bn_q_str = { - 0x09, 0xF9, 0x24, 0xE5, 0xD9, 0xBC, 0x67, 0x7F, 0x81, 0x0D, 0xF0, - 0x25, 0x58, 0xF7, 0x53, 0x13, 0xA9, 0x8A, 0xA6, 0x10, 0x47, 0x65, - 0x5D, 0x73, 0x9E, 0xF1, 0x94, 0xEB, 0x05, 0xB1, 0xA7, 0x11}; - -// Intel(R) EPID 1.1 parameter qnr -const FqElemStr FfElementTest::fq_epid11_fq_qnr = { - {0x08, 0x66, 0xA7, 0x67, 0x36, 0x6E, 0x62, 0x71, 0xB7, 0xA6, 0x52, 0x94, - 0x8F, 0xFB, 0x25, 0x9E, 0xE6, 0x4F, 0x25, 0xE5, 0x26, 0x9A, 0x2B, 0x6E, - 0x7E, 0xF8, 0xA6, 0x39, 0xAE, 0x46, 0xAA, 0x24}}; - -// Intel(R) EPID 1.1 parameter coeff -const BigNumStr FfElementTest::bn_epid11_fq_coeffs[3] = { - {{{0x02, 0x16, 0x7A, 0x61, 0x53, 0xDD, 0xF6, 0xE2, 0x89, 0x15, 0xA0, 0x94, - 0xF1, 0xB5, 0xDC, 0x65, 0x21, 0x15, 0x62, 0xE1, 0x7D, 0xC5, 0x43, 0x89, - 0xEE, 0xB4, 0xEF, 0xC8, 0xA0, 0x8E, 0x34, 0x0F}}}, - - {{{0x04, 0x82, 0x27, 0xE1, 0xEB, 0x98, 0x64, 0xC2, 0x8D, 0x8F, 0xDD, 0x0E, - 0x82, 0x40, 0xAE, 0xD4, 0x31, 0x63, 0xD6, 0x46, 0x32, 0x16, 0x85, 0x7A, - 0xB7, 0x18, 0x68, 0xB8, 0x17, 0x02, 0x81, 0xA6}}}, - - {{{0x06, 0x20, 0x76, 0xE8, 0x54, 0x54, 0x53, 0xB4, 0xA9, 0xD8, 0x44, 0x4B, - 0xAA, 0xFB, 0x1C, 0xFD, 0xAE, 0x15, 0xCA, 0x29, 0x79, 0xA6, 0x24, 0xA4, - 0x0A, 0xF6, 0x1E, 0xAC, 0xED, 0xFB, 0x10, 0x41}}}}; - -// zero -const BigNumStr FfElementTest::bn_0_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -const FqElemStr FfElementTest::fq_0_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -// one -const BigNumStr FfElementTest::bn_1_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; - -const FqElemStr FfElementTest::fq_1_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; - -// two -const BigNumStr FfElementTest::bn_2_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}; - -const FqElemStr FfElementTest::fq_2_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}; - -// three -const FqElemStr FfElementTest::fq_3_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}; - -// four -const FqElemStr FfElementTest::fq_4_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04}; - -// five -const FqElemStr FfElementTest::fq_5_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05}; - -const BigNumStr FfElementTest::bn_0xffff_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff}; - -// arbitrary constant a (256 bit value) -const BigNumStr FfElementTest::bn_a_str = { - 0x12, 0xA6, 0x5B, 0xD6, 0x91, 0x8D, 0x50, 0xA7, 0x66, 0xEB, 0x7D, - 0x52, 0xE3, 0x40, 0x17, 0x60, 0x7F, 0xDF, 0x6C, 0xA1, 0x2C, 0x1A, - 0x37, 0xE0, 0x92, 0xC0, 0xF7, 0xB9, 0x76, 0xAB, 0xB1, 0x8A}; - -const FqElemStr FfElementTest::fq_a_str = { - 0x12, 0xA6, 0x5B, 0xD6, 0x91, 0x8D, 0x50, 0xA7, 0x66, 0xEB, 0x7D, - 0x52, 0xE3, 0x40, 0x17, 0x60, 0x7F, 0xDF, 0x6C, 0xA1, 0x2C, 0x1A, - 0x37, 0xE0, 0x92, 0xC0, 0xF7, 0xB9, 0x76, 0xAB, 0xB1, 0x8A}; - -const Fq2ElemStr FfElementTest::fq2_a_str = { - {{{{0x12, 0xA6, 0x5B, 0xD6, 0x91, 0x8D, 0x50, 0xA7, 0x66, 0xEB, 0x7D, 0x52, - 0xE3, 0x40, 0x17, 0x60, 0x7F, 0xDF, 0x6C, 0xA1, 0x2C, 0x1A, 0x37, 0xE0, - 0x92, 0xC0, 0xF7, 0xB9, 0x76, 0xAB, 0xB1, 0x8A}}}, - {{{0xDD, 0x2B, 0xE9, 0x59, 0x24, 0xA5, 0xB3, 0xFD, 0xEB, 0xE1, 0x3C, 0xC0, - 0x73, 0x4E, 0x99, 0xEE, 0x36, 0xF6, 0xC0, 0x1A, 0x76, 0x01, 0x0A, 0xF0, - 0xCB, 0xB4, 0x71, 0x88, 0x95, 0xCB, 0x35, 0xBA}}}}}; - -// arbitrary constant b (256 bit value) -const BigNumStr FfElementTest::bn_b_str = { - 0xE6, 0x65, 0x23, 0x9B, 0xD4, 0x07, 0x16, 0x83, 0x38, 0x23, 0xB2, - 0x67, 0x57, 0xEB, 0x0F, 0x23, 0x3A, 0xF4, 0x8E, 0xDA, 0x71, 0x5E, - 0xD9, 0x98, 0x63, 0x98, 0x2B, 0xBC, 0x78, 0xD1, 0x94, 0xF2}; - -const FqElemStr FfElementTest::fq_b_str = { - 0xE6, 0x65, 0x23, 0x9B, 0xD4, 0x07, 0x16, 0x83, 0x38, 0x23, 0xB2, - 0x67, 0x57, 0xEB, 0x0F, 0x23, 0x3A, 0xF4, 0x8E, 0xDA, 0x71, 0x5E, - 0xD9, 0x98, 0x63, 0x98, 0x2B, 0xBC, 0x78, 0xD1, 0x94, 0xF2}; - -// a + b -const FqElemStr FfElementTest::fq_sum_ab_str = { - 0xF9, 0x0B, 0x7F, 0x72, 0x65, 0x94, 0x67, 0x2A, 0x9F, 0x0F, 0x2F, - 0xBA, 0x3B, 0x2B, 0x26, 0x83, 0xBA, 0xD3, 0xFB, 0x7B, 0x9D, 0x79, - 0x11, 0x78, 0xF6, 0x59, 0x23, 0x75, 0xEF, 0x7D, 0x46, 0x7C}; - -const Fq2ElemStr FfElementTest::fq2_sum_ab_str = { - {{{{0xF9, 0x0B, 0x7F, 0x72, 0x65, 0x94, 0x67, 0x2A, 0x9F, 0x0F, 0x2F, 0xBA, - 0x3B, 0x2B, 0x26, 0x83, 0xBA, 0xD3, 0xFB, 0x7B, 0x9D, 0x79, 0x11, 0x78, - 0xF6, 0x59, 0x23, 0x75, 0xEF, 0x7D, 0x46, 0x7C}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}; - -const Fq6ElemStr FfElementTest::fq6_sum_ab_str = { - {{{{0xF9, 0x0B, 0x7F, 0x72, 0x65, 0x94, 0x67, 0x2A, 0x9F, 0x0F, 0x2F, 0xBA, - 0x3B, 0x2B, 0x26, 0x83, 0xBA, 0xD3, 0xFB, 0x7B, 0x9D, 0x79, 0x11, 0x78, - 0xF6, 0x59, 0x23, 0x75, 0xEF, 0x7D, 0x46, 0x7C}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}; - -const Fq12ElemStr FfElementTest::fq12_sum_ab_str = { - {{{{{{0xF9, 0x0B, 0x7F, 0x72, 0x65, 0x94, 0x67, 0x2A, 0x9F, 0x0F, 0x2F, - 0xBA, 0x3B, 0x2B, 0x26, 0x83, 0xBA, 0xD3, 0xFB, 0x7B, 0x9D, 0x79, - 0x11, 0x78, 0xF6, 0x59, 0x23, 0x75, 0xEF, 0x7D, 0x46, 0x7C}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}, - - {{{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}}}; - -// a * b -const FqElemStr FfElementTest::fq_mul_ab_str = { - 0xE4, 0xAB, 0xE3, 0xE4, 0x08, 0xC3, 0x8A, 0x00, 0x78, 0x50, 0x01, - 0xA9, 0x4A, 0xFC, 0x43, 0x15, 0xA2, 0x99, 0x51, 0x20, 0x6B, 0x9C, - 0x00, 0xCF, 0x82, 0x88, 0xBD, 0x39, 0x0B, 0xA2, 0x0B, 0x58}; - -const Fq2ElemStr FfElementTest::fq2_mul_ab_str = { - {{{{0xE4, 0xAB, 0xE3, 0xE4, 0x08, 0xC3, 0x8A, 0x00, 0x78, 0x50, 0x01, 0xA9, - 0x4A, 0xFC, 0x43, 0x15, 0xA2, 0x99, 0x51, 0x20, 0x6B, 0x9C, 0x00, 0xCF, - 0x82, 0x88, 0xBD, 0x39, 0x0B, 0xA2, 0x0B, 0x58}}}, - {{{0xB4, 0xE4, 0x39, 0xEA, 0x70, 0xDE, 0x15, 0xC3, 0xC6, 0x91, 0xFD, 0x7F, - 0xBE, 0x2B, 0xF5, 0xD2, 0xC0, 0xB7, 0x20, 0xFC, 0x1F, 0x02, 0x33, 0xC9, - 0x39, 0x93, 0xB9, 0x5E, 0x55, 0x51, 0xB6, 0x46}}}}}; - -// 1/a -const FqElemStr FfElementTest::fq_inv_a_str = { - 0x15, 0x17, 0x1A, 0x1E, 0x93, 0x71, 0x1B, 0x39, 0xC5, 0x97, 0xEF, - 0x78, 0xA5, 0x51, 0x34, 0x62, 0x44, 0xAD, 0x8D, 0x51, 0xDF, 0x90, - 0x7C, 0x6F, 0x56, 0xB6, 0xAB, 0x63, 0x5A, 0x68, 0x6D, 0xF6}; - -// -a -const FqElemStr FfElementTest::fq_neg_a_str = { - 0xED, 0x59, 0xA4, 0x29, 0x6E, 0x6F, 0xA0, 0x25, 0xDF, 0xFA, 0x75, - 0x0C, 0x0B, 0x31, 0x8D, 0x3E, 0x8C, 0xFC, 0xF9, 0x59, 0xE6, 0x7D, - 0xD2, 0xA2, 0x40, 0x68, 0x36, 0x22, 0x38, 0x27, 0x7E, 0x89}; - -// pow(a, b) -const FqElemStr FfElementTest::fq_exp_ab_str = { - 0x29, 0x65, 0x68, 0x0E, 0x56, 0xB9, 0x8F, 0xBA, 0xA6, 0xEA, 0x8F, - 0xE1, 0x13, 0x44, 0x3B, 0x12, 0x5C, 0xB9, 0xF8, 0x76, 0x42, 0x12, - 0xCB, 0xB2, 0xED, 0xC0, 0x23, 0xA3, 0x5C, 0xAD, 0x38, 0xD1}; - -const uint8_t FfElementTest::sha_msg[] = {'a', 'b', 'c'}; - -const FqElemStr FfElementTest::fq_abc_sha256_str = { - 0xBA, 0x78, 0x16, 0xBF, 0x8F, 0x01, 0xCF, 0xEA, 0x41, 0x41, 0x40, - 0xDE, 0x5D, 0xAE, 0x22, 0x23, 0xB0, 0x03, 0x61, 0xA3, 0x96, 0x17, - 0x7A, 0x9C, 0xB4, 0x10, 0xFF, 0x61, 0xF2, 0x00, 0x15, 0xAD, -}; -const FqElemStr FfElementTest::fq_abc_sha384_str = { - 0x10, 0xAC, 0xE4, 0xE8, 0x8F, 0xBB, 0x96, 0xBF, 0x53, 0xB6, 0xAF, - 0xE4, 0x4E, 0x95, 0xDE, 0xA5, 0x98, 0x8F, 0x10, 0xBF, 0x59, 0xC4, - 0x11, 0xFE, 0x1F, 0x7A, 0xA6, 0x1E, 0x57, 0x3E, 0xE3, 0x3C, -}; -const FqElemStr FfElementTest::fq_abc_sha512_str = { - 0x14, 0xB4, 0x28, 0x89, 0xD2, 0x86, 0xA4, 0x79, 0xE3, 0x5B, 0xC4, - 0x50, 0xD1, 0x3B, 0xF2, 0x35, 0xF7, 0x97, 0x91, 0x05, 0x3D, 0x64, - 0xC0, 0x06, 0x45, 0x9F, 0xEC, 0xD8, 0xDB, 0x53, 0x3E, 0xC3, -}; -const Fq12ElemStr FfElementTest::fq12_g_str = { - {{{{{{0xBA, 0x10, 0x1F, 0xF6, 0x46, 0x8B, 0xE9, 0x32, 0x4F, 0xC0, 0xA5, - 0x01, 0xAD, 0x5E, 0xE2, 0x31, 0x16, 0x29, 0x96, 0xED, 0xA7, 0xDE, - 0x4C, 0xE1, 0xD2, 0x8D, 0x33, 0xCA, 0x50, 0xAB, 0x7B, 0xC6}, - {0x15, 0xEB, 0x79, 0xF4, 0xEB, 0xDE, 0x30, 0xB6, 0xC4, 0x07, 0x7C, - 0x42, 0xCB, 0x04, 0x54, 0xF2, 0x1F, 0x4D, 0x1F, 0xC0, 0xDF, 0xA2, - 0x2B, 0x9E, 0x34, 0xC4, 0x4C, 0x84, 0x14, 0xD3, 0x62, 0x07}}}, - {{{0xF1, 0x8B, 0x84, 0xD1, 0x46, 0x57, 0xB6, 0xE7, 0x80, 0xE1, 0x46, - 0x49, 0x1C, 0x0D, 0xEF, 0x81, 0x31, 0xB0, 0xBE, 0x8C, 0xB9, 0x08, - 0xD0, 0xD3, 0xC4, 0x56, 0xCA, 0xAD, 0xF9, 0x1D, 0x75, 0x19}, - {0x3F, 0xEE, 0x7C, 0x43, 0xC1, 0xFA, 0x4E, 0x50, 0xB7, 0x19, 0x01, - 0x00, 0x6F, 0xD5, 0x16, 0xB6, 0xF4, 0x85, 0xE0, 0xEB, 0x2E, 0x5F, - 0x0A, 0x7E, 0xF8, 0xAC, 0xBC, 0x05, 0xEC, 0x73, 0xB5, 0x57}}}, - {{{0xE3, 0xB3, 0x18, 0x29, 0xBB, 0xEF, 0x86, 0x50, 0x87, 0xCF, 0x70, - 0xBA, 0x13, 0x8B, 0xB1, 0xB6, 0x2D, 0x6F, 0x65, 0x3D, 0xA1, 0x0B, - 0xE3, 0x92, 0xC5, 0x72, 0x86, 0x6A, 0xB3, 0xEB, 0xE0, 0xE5}, - {0xDA, 0x0E, 0x57, 0x87, 0xD5, 0xA9, 0x61, 0xA5, 0x1E, 0xCB, 0x04, - 0x86, 0xCD, 0xC3, 0x18, 0x2A, 0x36, 0xA0, 0x81, 0x73, 0xE7, 0x13, - 0x87, 0x80, 0x8D, 0x1A, 0xFE, 0x6E, 0x4B, 0xA3, 0x13, 0x03}}}}}, - {{{{{0x66, 0x9E, 0x80, 0x4D, 0x8A, 0xAA, 0x00, 0x95, 0x72, 0xCE, 0xBB, - 0x51, 0xE8, 0x01, 0x09, 0x41, 0xD3, 0x63, 0x28, 0x05, 0xA4, 0xBE, - 0xD6, 0x41, 0xA6, 0x2F, 0x5F, 0xBF, 0x0B, 0x13, 0xB4, 0x54}, - {0x5B, 0x50, 0x65, 0xDC, 0x6F, 0x29, 0xD6, 0xDA, 0xBF, 0xC2, 0x06, - 0xEA, 0x3B, 0xB2, 0xF1, 0xD4, 0x26, 0x5C, 0x92, 0x6B, 0x95, 0x6D, - 0x88, 0xAB, 0x8F, 0xC6, 0x9D, 0x31, 0xE4, 0x9B, 0x71, 0x49}}}, - {{{0xE0, 0xCE, 0x97, 0x8F, 0xC9, 0x9F, 0xBC, 0xA8, 0x4A, 0xC6, 0xAA, - 0x4A, 0xC8, 0x0D, 0x2A, 0x60, 0x1A, 0x43, 0x40, 0x03, 0xB3, 0x53, - 0x30, 0x98, 0x1F, 0x3F, 0xDF, 0x5C, 0x0F, 0xF0, 0x84, 0x8E}, - {0x5A, 0x5D, 0x41, 0xD2, 0x47, 0x78, 0x6D, 0x9F, 0x89, 0xCE, 0xF5, - 0x8E, 0xB6, 0x54, 0xA2, 0x26, 0xE5, 0x40, 0x39, 0x5C, 0x59, 0x08, - 0xB3, 0xDA, 0xF5, 0xF8, 0xA0, 0x18, 0x33, 0x57, 0xD1, 0x72}}}, - {{{0xBB, 0xBA, 0x6C, 0xED, 0xE8, 0xA0, 0x5E, 0xC8, 0x81, 0xC5, 0xAC, - 0x15, 0x1B, 0xD0, 0xE6, 0xC8, 0x92, 0xF9, 0x43, 0x03, 0x5A, 0x00, - 0x42, 0xE3, 0x49, 0xA5, 0xF7, 0x19, 0x78, 0x8A, 0x39, 0x89}, - {0x32, 0xAE, 0xBF, 0x4D, 0x4B, 0xB3, 0x33, 0x76, 0x16, 0xFD, 0x0B, - 0xFE, 0x42, 0x1E, 0x17, 0x37, 0x2A, 0x04, 0xEA, 0x26, 0xBA, 0x6E, - 0x2C, 0x36, 0xAF, 0x35, 0x1B, 0x75, 0x6D, 0x17, 0xDC, 0x8E}}}}}}}; - -const Fq12ElemStr FfElementTest::fq12_h_str = { - {{{{{{0x41, 0xFB, 0xBE, 0xD2, 0x20, 0x95, 0xE5, 0xBA, 0x87, 0x54, 0x23, - 0xCC, 0x04, 0x97, 0x38, 0x4B, 0x69, 0x28, 0x18, 0x6D, 0xAE, 0x19, - 0xE3, 0x3D, 0xFE, 0x39, 0xE2, 0x1C, 0xC2, 0x53, 0x17, 0xF6}, - {0xEA, 0xA3, 0x0F, 0x62, 0x6E, 0xBF, 0x6F, 0x8F, 0xBC, 0xFA, 0x6E, - 0x07, 0xD3, 0xD3, 0xAE, 0x5C, 0xAA, 0xB5, 0x9C, 0xD7, 0xB8, 0x5B, - 0x1B, 0x69, 0x52, 0x93, 0xBF, 0xDB, 0x87, 0x5C, 0x19, 0x07}}}, - {{{0x1B, 0x03, 0xE1, 0x79, 0x3C, 0x10, 0x0B, 0x65, 0xBF, 0xD7, 0xF3, - 0x45, 0x1A, 0xD4, 0xDD, 0xB8, 0x67, 0x1A, 0x8F, 0x41, 0x1A, 0xD4, - 0x04, 0x3C, 0xD2, 0xA4, 0x3B, 0x47, 0xFE, 0xBD, 0xEA, 0x87}, - {0xDF, 0x7F, 0x94, 0x9C, 0xB8, 0x65, 0x54, 0x8D, 0xD7, 0x0B, 0x33, - 0x26, 0x25, 0x89, 0xD4, 0x60, 0x0C, 0x89, 0x5F, 0x2C, 0x00, 0x7F, - 0xAF, 0x89, 0x35, 0xE5, 0xB9, 0x23, 0x7F, 0x79, 0x1A, 0x86}}}, - {{{0xCE, 0x01, 0x4F, 0x24, 0x3C, 0x3A, 0xC3, 0x61, 0x5B, 0xD9, 0x2D, - 0x87, 0x94, 0xA3, 0xD2, 0x8B, 0x57, 0xC4, 0x07, 0xF8, 0x29, 0x5E, - 0x09, 0x23, 0xCA, 0xE9, 0x85, 0xA1, 0xDB, 0xF2, 0x0C, 0x8F}, - {0xC2, 0xFB, 0x9A, 0xCC, 0xD9, 0x82, 0x63, 0x28, 0x83, 0xB7, 0x4F, - 0x99, 0x3A, 0x19, 0x11, 0xB0, 0xB4, 0xE7, 0x73, 0x94, 0x35, 0x19, - 0x6B, 0xC2, 0x5D, 0x2E, 0x8C, 0x33, 0xFF, 0x13, 0xCD, 0xBE}}}}}, - {{{{{0x29, 0x43, 0xF6, 0xA0, 0xE9, 0xDC, 0x27, 0x27, 0x9B, 0x0A, 0x33, - 0xBC, 0x85, 0x6A, 0xBF, 0x8B, 0xC5, 0x89, 0x10, 0x92, 0xAE, 0x73, - 0xC9, 0x32, 0x46, 0x8D, 0x24, 0x1F, 0x32, 0x96, 0xED, 0x0B}, - {0x44, 0x8C, 0x6D, 0xF6, 0x1A, 0x2F, 0xCA, 0x18, 0x8E, 0x84, 0xFF, - 0x5F, 0x5F, 0xAF, 0xC0, 0x52, 0x35, 0xA1, 0xB3, 0xA0, 0xDE, 0xEE, - 0x97, 0xBF, 0xB8, 0xFA, 0x8B, 0x9E, 0x00, 0x13, 0xE7, 0x26}}}, - {{{0xFB, 0x78, 0xA1, 0x6D, 0x41, 0x92, 0xA6, 0xC6, 0x7F, 0xAD, 0xB7, - 0xFC, 0x4F, 0x5F, 0x48, 0x94, 0x7D, 0xB7, 0xF5, 0xCC, 0xB5, 0x7E, - 0x08, 0xCD, 0xBF, 0x58, 0xC9, 0x30, 0xEB, 0xE4, 0xA0, 0xBF}, - {0x0C, 0x6A, 0x89, 0x18, 0x97, 0x37, 0x54, 0x76, 0x79, 0x3E, 0x8E, - 0xA6, 0x5B, 0x77, 0xCE, 0x4A, 0xCB, 0xD9, 0x8B, 0x7B, 0x32, 0x1A, - 0x30, 0x40, 0x49, 0xFF, 0x84, 0xE7, 0xBE, 0xD8, 0xCF, 0xFD}}}, - {{{0x2D, 0x23, 0x54, 0xB5, 0x2E, 0x29, 0xE9, 0xC7, 0x62, 0x1B, 0x03, - 0x34, 0x3A, 0xEB, 0xC9, 0x69, 0x38, 0x9F, 0xD1, 0x2B, 0xDA, 0x8B, - 0x07, 0x58, 0x30, 0xF8, 0x38, 0x08, 0x09, 0x07, 0xCA, 0x5B}, - {0x3A, 0x13, 0xED, 0xF4, 0x5D, 0xC9, 0x23, 0x66, 0x85, 0x8C, 0x6A, - 0x7D, 0xE9, 0x11, 0x17, 0xE6, 0x43, 0x2F, 0x12, 0xC5, 0x07, 0x63, - 0x84, 0x98, 0xA0, 0x1C, 0xDC, 0xF3, 0x91, 0x91, 0x11, 0x55}}}}}}}; - -const Fq12ElemStr FfElementTest::fq12_i_str = { - {{{{{{0x0F, 0xD0, 0x1C, 0x59, 0x98, 0x52, 0x5A, 0x40, 0xFF, 0x26, 0x0A, - 0xFD, 0x70, 0xEC, 0x23, 0x48, 0x1B, 0x4B, 0x70, 0xA0, 0x15, 0xC5, - 0xB1, 0x8B, 0xA5, 0x75, 0xAC, 0xCE, 0xF3, 0x6C, 0xE8, 0xBA}, - {0xA7, 0xFB, 0xF9, 0xEA, 0x18, 0x70, 0xD8, 0x9B, 0x3C, 0xC3, 0x66, - 0x10, 0x38, 0xAC, 0x16, 0x32, 0xDC, 0x9D, 0xF0, 0xD4, 0x2C, 0xE7, - 0xF6, 0x69, 0x47, 0x69, 0x84, 0xEE, 0x39, 0x5F, 0xD8, 0xCC}}}, - {{{0x1B, 0xEF, 0x81, 0x13, 0x81, 0xB9, 0x56, 0xAE, 0xD0, 0xD4, 0xAE, - 0xCB, 0x24, 0x7C, 0x7B, 0x7F, 0xC0, 0x41, 0x42, 0x0A, 0x9D, 0x90, - 0x6B, 0x1E, 0x3A, 0xAD, 0x39, 0x7A, 0x1F, 0xEF, 0x56, 0x9E}, - {0xBD, 0x84, 0x48, 0xAF, 0x65, 0x66, 0x33, 0xE5, 0x67, 0xF1, 0xC4, - 0x48, 0xF0, 0xB6, 0x61, 0x06, 0xC7, 0x78, 0xB3, 0xC1, 0x12, 0xB8, - 0x31, 0xD4, 0x69, 0x2E, 0x0E, 0xD3, 0xD4, 0x91, 0x81, 0x9A}}}, - {{{0x23, 0x62, 0x9B, 0x83, 0x95, 0xF6, 0x7F, 0xF6, 0xCC, 0x6B, 0xEE, - 0x84, 0xF0, 0x5B, 0x93, 0xA6, 0x90, 0x48, 0x1A, 0xA7, 0xA8, 0xE8, - 0x10, 0xA5, 0x53, 0x7E, 0x4F, 0xD5, 0x0D, 0xB0, 0x86, 0xF7}, - {0x1F, 0xB8, 0xB7, 0xD4, 0x2E, 0x41, 0x83, 0x2C, 0xFC, 0x62, 0x14, - 0xB8, 0xC2, 0xF6, 0xC1, 0x5E, 0xC1, 0xC1, 0x40, 0x8B, 0x28, 0xB5, - 0x1B, 0x85, 0xEE, 0x71, 0xC8, 0x14, 0x56, 0xB9, 0x3B, 0x90}}}}}, - {{{{{0x4A, 0xFE, 0x73, 0xFA, 0xCF, 0x20, 0x67, 0x0E, 0x89, 0x1D, 0xCB, - 0x05, 0x38, 0x27, 0x1C, 0xD5, 0x7A, 0x0C, 0xAC, 0x92, 0x17, 0x94, - 0x7F, 0x10, 0x3E, 0xFF, 0x97, 0x23, 0x66, 0x8D, 0x70, 0xAE}, - {0x80, 0x97, 0xFF, 0x88, 0xF8, 0x01, 0x2B, 0x99, 0x81, 0xEB, 0xF8, - 0x19, 0xEF, 0xDA, 0xE3, 0xAE, 0xD9, 0x9B, 0x4C, 0x13, 0xFC, 0x9E, - 0x18, 0xD6, 0xB0, 0xCF, 0x4E, 0x29, 0xA8, 0xCF, 0x01, 0xFA}}}, - {{{0xDA, 0x22, 0x85, 0x18, 0x9A, 0x51, 0x17, 0xAC, 0x26, 0x57, 0xF6, - 0x73, 0x59, 0x24, 0xD5, 0xC9, 0x4D, 0xAC, 0xB6, 0xE4, 0x51, 0xF7, - 0x5E, 0x30, 0x5B, 0x25, 0x3D, 0x52, 0xA3, 0xE0, 0x4B, 0xA2}, - {0xC3, 0x4C, 0x2F, 0x53, 0xD5, 0x92, 0x33, 0x7E, 0x8B, 0x66, 0x5F, - 0x48, 0x48, 0xCA, 0xA8, 0x98, 0x0F, 0x73, 0xD3, 0x60, 0xAF, 0x25, - 0x02, 0xEE, 0x64, 0xE7, 0x02, 0x89, 0x9A, 0xD2, 0x96, 0x45}}}, - {{{0x04, 0xE1, 0x30, 0x9B, 0xD8, 0x85, 0xF0, 0x99, 0x7C, 0x01, 0xD5, - 0x58, 0x5A, 0x74, 0x0B, 0xD4, 0xF2, 0xFA, 0xC7, 0x59, 0x36, 0xFD, - 0x91, 0x07, 0x60, 0xF7, 0xDC, 0x11, 0x3E, 0x8A, 0xC6, 0x48}, - {0x0D, 0x02, 0x30, 0x18, 0xD0, 0xB9, 0x6B, 0xD6, 0x39, 0x6A, 0x41, - 0x82, 0xDD, 0xE3, 0xCE, 0xB8, 0xB6, 0xF5, 0x61, 0x80, 0x61, 0x16, - 0xF4, 0x9A, 0xB8, 0x58, 0x1D, 0x3F, 0x4D, 0xC2, 0xCA, 0xCF}}}}}}}; - -const Fq12ElemStr FfElementTest::fq12_j_str = { - {{{{{{0x3A, 0x30, 0x33, 0xA2, 0x14, 0xDF, 0xDC, 0x70, 0x48, 0xF3, 0xBA, - 0x3F, 0xCE, 0xFC, 0x69, 0x24, 0xAE, 0xA1, 0xF3, 0xCF, 0xD8, 0x77, - 0x69, 0x38, 0x38, 0xF4, 0x8E, 0xFB, 0x51, 0xFB, 0x10, 0x7C}, - {0x73, 0xB4, 0xEE, 0xF9, 0x76, 0xBB, 0x45, 0xEC, 0x07, 0x24, 0x23, - 0xA3, 0x38, 0x64, 0x39, 0x4C, 0x03, 0x94, 0xF5, 0xEE, 0x5F, 0xC9, - 0x83, 0x4F, 0xD1, 0xA6, 0x4A, 0x05, 0x25, 0x0C, 0x46, 0x33}}}, - {{{0xD4, 0x40, 0x47, 0xAE, 0xEC, 0xDA, 0x30, 0xF9, 0xE1, 0x28, 0xFB, - 0xB1, 0x4C, 0x62, 0xFB, 0x6C, 0x90, 0x0D, 0xB1, 0xEC, 0xAF, 0x2D, - 0x95, 0x64, 0x11, 0x93, 0xDA, 0x8E, 0xB8, 0x7D, 0xE4, 0xA3}, - {0x8E, 0xA6, 0x9B, 0xAA, 0x58, 0xD5, 0xDC, 0x59, 0x1A, 0x51, 0x53, - 0x47, 0x30, 0x1C, 0x2B, 0xB0, 0xBB, 0x57, 0x57, 0x0A, 0x8C, 0x5F, - 0x62, 0x9C, 0x52, 0x28, 0xC0, 0x25, 0x27, 0xAE, 0xCD, 0x36}}}, - {{{0xBF, 0x2D, 0x03, 0xB1, 0x33, 0xFD, 0x24, 0x81, 0x3C, 0x91, 0x43, - 0x90, 0x0C, 0x20, 0xC4, 0xE3, 0x69, 0x3F, 0xA9, 0xA2, 0x7C, 0xC2, - 0x48, 0x28, 0x1B, 0xF0, 0x81, 0x1F, 0x2B, 0x8F, 0x8D, 0x43}, - {0x38, 0x18, 0x12, 0xA3, 0x89, 0xF1, 0xD7, 0x60, 0x89, 0x68, 0x6A, - 0xC4, 0xCC, 0x5D, 0xF4, 0xCE, 0x43, 0x95, 0x84, 0xCD, 0x01, 0x55, - 0xB8, 0x5D, 0x24, 0x50, 0xCD, 0xE3, 0x68, 0x1C, 0xFF, 0x59}}}}}, - {{{{{0x0D, 0xAC, 0xCB, 0xE7, 0x9D, 0x68, 0x0F, 0x4A, 0xAF, 0xEB, 0xB5, - 0xFB, 0xF9, 0xB1, 0x58, 0x80, 0xD5, 0x71, 0x53, 0x26, 0x2E, 0x9C, - 0xCE, 0x10, 0xAC, 0xD2, 0x0A, 0xEB, 0xB4, 0x5C, 0xC8, 0xD7}, - {0x16, 0x26, 0x66, 0x71, 0xDD, 0x67, 0xBA, 0xDB, 0x35, 0x76, 0x64, - 0xC6, 0x0B, 0x0B, 0x07, 0x4B, 0x65, 0xA2, 0xF7, 0x68, 0x9E, 0xFE, - 0xE8, 0xE3, 0xA7, 0x09, 0x79, 0xC5, 0xDF, 0x5E, 0x9C, 0xEC}}}, - {{{0xEE, 0x83, 0x59, 0xB5, 0x89, 0x81, 0xA2, 0x87, 0xD7, 0x75, 0x65, - 0x90, 0xDE, 0x78, 0x37, 0x59, 0x04, 0x9B, 0x50, 0xC3, 0xBA, 0x90, - 0x09, 0x15, 0xAB, 0x17, 0xC5, 0xBF, 0x5B, 0xB9, 0xE4, 0x6C}, - {0xA9, 0xB1, 0x49, 0x76, 0x25, 0x74, 0x5D, 0x9C, 0x78, 0xC5, 0x09, - 0xEE, 0xEB, 0xEB, 0x9D, 0x1C, 0x6C, 0xC0, 0x27, 0x9D, 0x66, 0xE6, - 0x7F, 0x31, 0xCD, 0xB0, 0x8A, 0xE4, 0x9E, 0xBD, 0x70, 0x18}}}, - {{{0x88, 0xA1, 0x08, 0x39, 0xA2, 0x48, 0xA5, 0x98, 0xB6, 0xAD, 0x10, - 0x54, 0x07, 0xCD, 0xFC, 0x6D, 0xB1, 0x02, 0xFF, 0xE3, 0x92, 0xD7, - 0x9D, 0x48, 0xFB, 0xCE, 0x88, 0x46, 0x92, 0x07, 0x02, 0xBA}, - {0xEE, 0xEB, 0xAE, 0x88, 0xB1, 0x4E, 0xD0, 0xF2, 0xCE, 0xD7, 0x57, - 0x07, 0xD4, 0x39, 0xD2, 0x7D, 0x1A, 0x0C, 0xEF, 0xF2, 0x84, 0x84, - 0x22, 0x8A, 0xB1, 0x80, 0x0D, 0xDC, 0x64, 0x86, 0xFD, 0x70}}}}}}}; - -const Fq12ElemStr FfElementTest::fq12_mul_ij_str = { - {{{{{{0x4A, 0x0E, 0x83, 0x4F, 0x62, 0xCA, 0x56, 0x0B, 0x0F, 0x2E, 0xF3, - 0x1A, 0xC6, 0xFC, 0x76, 0x4F, 0x4B, 0x85, 0x78, 0x6F, 0x9D, 0xB9, - 0xBD, 0xC8, 0xBB, 0x7C, 0x73, 0x12, 0x28, 0xFF, 0xBC, 0x8F}, - {0x18, 0x8E, 0x5E, 0x4B, 0x72, 0xA5, 0x4A, 0x99, 0xFC, 0xE7, 0x05, - 0xE5, 0xD2, 0x2C, 0x06, 0x95, 0xF5, 0xE4, 0xA5, 0x87, 0xCB, 0x85, - 0x25, 0xF8, 0xDA, 0x71, 0x7B, 0x9A, 0xF1, 0x52, 0xF9, 0x33}}}, - {{{0x05, 0x5F, 0x15, 0x72, 0xA3, 0x61, 0xA6, 0x6C, 0xB8, 0x43, 0xBB, - 0xCA, 0x33, 0xB2, 0xDB, 0x59, 0xCA, 0xAB, 0xAD, 0xA0, 0x4D, 0xE3, - 0xB8, 0xF5, 0xC9, 0x8C, 0x06, 0x91, 0xE5, 0xE4, 0x5A, 0xAD}, - {0xE7, 0x66, 0xCC, 0x2B, 0x2C, 0x11, 0x88, 0x29, 0xB1, 0x3C, 0x52, - 0xFE, 0x50, 0xDF, 0x8F, 0x15, 0x6A, 0x6B, 0xB8, 0x32, 0x96, 0x90, - 0x85, 0x03, 0x78, 0x88, 0x97, 0x7B, 0x5B, 0x50, 0x2E, 0xDE}}}, - {{{0xE7, 0x53, 0x22, 0x11, 0xEB, 0xFF, 0x1B, 0x19, 0xAE, 0x5F, 0x58, - 0x3A, 0x4F, 0x6F, 0x34, 0xFB, 0x2A, 0x49, 0xCA, 0x4B, 0x9C, 0x31, - 0xFC, 0x74, 0x0F, 0x11, 0xCC, 0x45, 0xCD, 0xA2, 0x12, 0xCA}, - {0xF4, 0x2F, 0x30, 0x9A, 0x6A, 0xCB, 0xEE, 0x88, 0x15, 0x56, 0x29, - 0x2A, 0xBF, 0x33, 0x7B, 0xDB, 0x59, 0x74, 0x4D, 0xC0, 0x64, 0xF0, - 0x0B, 0x9F, 0xF2, 0x65, 0xB7, 0x3A, 0xDA, 0xE2, 0xB5, 0x63}}}}}, - {{{{{0x3A, 0x3E, 0x06, 0xEF, 0x73, 0xA3, 0xBC, 0xEA, 0xCC, 0x68, 0xD9, - 0xF5, 0x6E, 0x94, 0x1C, 0x54, 0x47, 0xF1, 0x99, 0x2C, 0x44, 0x64, - 0x45, 0x84, 0x50, 0x10, 0xFD, 0xC5, 0x16, 0x65, 0x89, 0xEC}, - {0x72, 0xA6, 0x7E, 0x82, 0x7F, 0xE2, 0xE3, 0xEA, 0x82, 0xA3, 0x18, - 0xF4, 0x9B, 0x93, 0x4D, 0x79, 0xA0, 0x2C, 0xBF, 0x90, 0x0E, 0xDB, - 0x41, 0x09, 0x27, 0x44, 0x19, 0xD1, 0xB4, 0xE5, 0xC6, 0x8C}}}, - {{{0xA5, 0xC7, 0x82, 0xBF, 0x00, 0x7B, 0x8D, 0x7A, 0x05, 0x7B, 0x7E, - 0x33, 0x60, 0x28, 0x34, 0x9C, 0x86, 0x5A, 0x6B, 0xCE, 0xA5, 0xED, - 0x26, 0x22, 0x63, 0x4A, 0xE9, 0x57, 0xCD, 0x55, 0xD2, 0xD3}, - {0x0E, 0x73, 0x14, 0xE4, 0xEE, 0xE7, 0x3C, 0x43, 0xFC, 0xAE, 0x84, - 0x59, 0x2F, 0xEA, 0x35, 0x84, 0xA5, 0x77, 0xCE, 0xA8, 0xC5, 0xAA, - 0xB8, 0xDC, 0xB9, 0xD6, 0x71, 0x11, 0xE2, 0x95, 0x00, 0x97}}}, - {{{0xBD, 0x50, 0xDA, 0x58, 0x1B, 0xDA, 0xB3, 0x25, 0x19, 0x2F, 0x9D, - 0xFA, 0x2C, 0xFB, 0x96, 0x26, 0xBB, 0x4A, 0x41, 0x82, 0xA9, 0x45, - 0x24, 0xEE, 0xEE, 0xEA, 0xD3, 0xC5, 0x94, 0xFC, 0x2A, 0x37}, - {0x6A, 0x43, 0xB8, 0x6C, 0xBB, 0x98, 0xB7, 0x17, 0x03, 0xC0, 0x3D, - 0x6D, 0x59, 0x56, 0x3D, 0x23, 0x42, 0x94, 0x25, 0x64, 0xB9, 0x62, - 0xAD, 0x4D, 0x84, 0x9B, 0x3C, 0x05, 0x8C, 0xF0, 0xD3, 0xD3}}}}}}, -}; - -const Fq12ElemStr FfElementTest::fq12_k_str = { - {{{{{{0xE4, 0xCA, 0x0B, 0xA8, 0x9C, 0x70, 0xE2, 0x20, 0x24, 0xD9, 0x8F, - 0x09, 0x12, 0x79, 0x55, 0x44, 0x8C, 0x58, 0x42, 0x8F, 0x18, 0x97, - 0x0A, 0xC3, 0x0A, 0x40, 0x68, 0x0E, 0x1E, 0x21, 0x7F, 0xB4}, - {0x73, 0xCF, 0x8D, 0x54, 0x68, 0xAE, 0x1C, 0xC4, 0x95, 0x01, 0xE3, - 0x52, 0x33, 0xFE, 0x69, 0xB5, 0x23, 0x45, 0xEF, 0xFF, 0x79, 0x14, - 0xEF, 0x98, 0xA8, 0x4E, 0xB1, 0x2E, 0xE1, 0x15, 0x81, 0x0C}}}, - {{{0x9F, 0x65, 0x90, 0x6A, 0x53, 0xD7, 0xF6, 0x73, 0x08, 0xDA, 0x45, - 0x11, 0xDE, 0xCF, 0xED, 0x4C, 0x8C, 0x21, 0x02, 0xF5, 0x3F, 0x97, - 0xB6, 0xB2, 0xF5, 0xC6, 0x58, 0xFC, 0x9A, 0xA6, 0xBB, 0xF9}, - {0x3C, 0xD8, 0xFC, 0x86, 0x09, 0x1C, 0x16, 0xA4, 0x6F, 0x5E, 0x7A, - 0x81, 0x01, 0xF9, 0x8A, 0x6D, 0x38, 0xB5, 0xC9, 0x5F, 0xE9, 0x7D, - 0x6F, 0x46, 0x92, 0x49, 0x5B, 0xB8, 0x61, 0x03, 0x6F, 0x5E}}}, - {{{0xDA, 0x53, 0xCB, 0x62, 0xCD, 0x82, 0x63, 0x96, 0xC7, 0xC0, 0x39, - 0xA4, 0x31, 0xEE, 0x15, 0x26, 0x1C, 0xE6, 0x4E, 0xE4, 0xB4, 0x40, - 0xFA, 0x65, 0xA3, 0xF4, 0x73, 0x03, 0x85, 0x84, 0x41, 0xF9}, - {0x77, 0xF3, 0x90, 0xDC, 0x88, 0x26, 0xBD, 0x27, 0x9A, 0x9D, 0x37, - 0xF0, 0x80, 0xEE, 0x02, 0x1D, 0x3E, 0x4F, 0x88, 0xED, 0x8F, 0x89, - 0x90, 0xF1, 0x6D, 0x5D, 0x70, 0x49, 0x99, 0x07, 0x61, 0x22}}}}}, - {{{{{0x43, 0x52, 0xBA, 0xEE, 0xA8, 0xE9, 0x8E, 0x2E, 0x83, 0x30, 0x41, - 0x85, 0xE3, 0x51, 0xB0, 0x8C, 0x86, 0x31, 0xEC, 0x02, 0x76, 0xE8, - 0x41, 0x1F, 0x88, 0xBC, 0x39, 0xA2, 0xE4, 0xC1, 0x34, 0xA7}, - {0x1D, 0x5F, 0x8C, 0x23, 0x0F, 0xF0, 0xDC, 0xCD, 0xBA, 0x67, 0xD5, - 0x78, 0xD6, 0x8D, 0x32, 0x6A, 0xC1, 0x7F, 0x6F, 0x97, 0xCF, 0x46, - 0xF0, 0x04, 0x7B, 0xE3, 0x5A, 0xEE, 0x31, 0xC4, 0xC0, 0x79}}}, - {{{0x96, 0xBC, 0x01, 0x78, 0x9F, 0xBE, 0x8B, 0xBA, 0x59, 0x22, 0xFB, - 0x64, 0x1B, 0x37, 0x5C, 0x33, 0x57, 0xAF, 0x83, 0x5A, 0x96, 0xEA, - 0x56, 0xAA, 0x6E, 0x9C, 0xFA, 0xE6, 0xF9, 0xDF, 0xD8, 0x44}, - {0xBB, 0x4E, 0xBF, 0xA8, 0xEC, 0x0F, 0x16, 0xA8, 0x59, 0x1F, 0x49, - 0xF4, 0x8C, 0x80, 0x6C, 0x52, 0x7F, 0x74, 0x94, 0xC2, 0xE3, 0x29, - 0x34, 0x9C, 0x97, 0xB9, 0x5E, 0xED, 0xFD, 0x59, 0x9D, 0xD4}}}, - {{{0x83, 0xFB, 0xC2, 0xAD, 0x72, 0xE8, 0xF3, 0x68, 0x43, 0xD0, 0xD4, - 0xDC, 0xB2, 0x36, 0xC1, 0xDB, 0x03, 0x29, 0xEE, 0x8C, 0x1A, 0x10, - 0xD7, 0xFB, 0xC2, 0xEA, 0xDA, 0xBA, 0x42, 0x18, 0xE6, 0xE4}, - {0x63, 0x41, 0x6E, 0x8C, 0xB3, 0x14, 0x68, 0x9A, 0x0F, 0x64, 0x87, - 0x16, 0x02, 0xA3, 0x59, 0xF4, 0x60, 0x80, 0x04, 0x2B, 0xA4, 0xE6, - 0x10, 0x2D, 0x61, 0x59, 0x14, 0xFE, 0xAF, 0x84, 0xA0, 0x67}}}}}}}; -const Fq12ElemStr FfElementTest::fq12_mul_gb_str = { - {{{{{{0xE4, 0xCA, 0x0B, 0xA8, 0x9C, 0x70, 0xE2, 0x20, 0x24, 0xD9, 0x8F, - 0x09, 0x12, 0x79, 0x55, 0x44, 0x8C, 0x58, 0x42, 0x8F, 0x18, 0x97, - 0x0A, 0xC3, 0x0A, 0x40, 0x68, 0x0E, 0x1E, 0x21, 0x7F, 0xB4}, - {0x73, 0xCF, 0x8D, 0x54, 0x68, 0xAE, 0x1C, 0xC4, 0x95, 0x01, 0xE3, - 0x52, 0x33, 0xFE, 0x69, 0xB5, 0x23, 0x45, 0xEF, 0xFF, 0x79, 0x14, - 0xEF, 0x98, 0xA8, 0x4E, 0xB1, 0x2E, 0xE1, 0x15, 0x81, 0x0C}}}, - {{{0x9F, 0x65, 0x90, 0x6A, 0x53, 0xD7, 0xF6, 0x73, 0x08, 0xDA, 0x45, - 0x11, 0xDE, 0xCF, 0xED, 0x4C, 0x8C, 0x21, 0x02, 0xF5, 0x3F, 0x97, - 0xB6, 0xB2, 0xF5, 0xC6, 0x58, 0xFC, 0x9A, 0xA6, 0xBB, 0xF9}, - {0x3C, 0xD8, 0xFC, 0x86, 0x09, 0x1C, 0x16, 0xA4, 0x6F, 0x5E, 0x7A, - 0x81, 0x01, 0xF9, 0x8A, 0x6D, 0x38, 0xB5, 0xC9, 0x5F, 0xE9, 0x7D, - 0x6F, 0x46, 0x92, 0x49, 0x5B, 0xB8, 0x61, 0x03, 0x6F, 0x5E}}}, - {{{0xDA, 0x53, 0xCB, 0x62, 0xCD, 0x82, 0x63, 0x96, 0xC7, 0xC0, 0x39, - 0xA4, 0x31, 0xEE, 0x15, 0x26, 0x1C, 0xE6, 0x4E, 0xE4, 0xB4, 0x40, - 0xFA, 0x65, 0xA3, 0xF4, 0x73, 0x03, 0x85, 0x84, 0x41, 0xF9}, - {0x77, 0xF3, 0x90, 0xDC, 0x88, 0x26, 0xBD, 0x27, 0x9A, 0x9D, 0x37, - 0xF0, 0x80, 0xEE, 0x02, 0x1D, 0x3E, 0x4F, 0x88, 0xED, 0x8F, 0x89, - 0x90, 0xF1, 0x6D, 0x5D, 0x70, 0x49, 0x99, 0x07, 0x61, 0x22}}}}}, - {{{{{0xBC, 0xAD, 0x45, 0x11, 0x57, 0x13, 0x62, 0x9E, 0xC3, 0xB5, 0xB0, - 0xD9, 0x0B, 0x1F, 0xF4, 0x12, 0x86, 0xAA, 0x79, 0xF8, 0x9B, 0xAF, - 0xC9, 0x63, 0x4A, 0x6C, 0xF4, 0x38, 0xCA, 0x11, 0xFB, 0x6C}, - {0xE2, 0xA0, 0x73, 0xDC, 0xF0, 0x0C, 0x13, 0xFF, 0x8C, 0x7E, 0x1C, - 0xE6, 0x17, 0xE4, 0x72, 0x34, 0x4B, 0x5C, 0xF6, 0x63, 0x43, 0x51, - 0x1A, 0x7E, 0x57, 0x45, 0xD2, 0xED, 0x7D, 0x0E, 0x6F, 0x9A}}}, - {{{0x69, 0x43, 0xFE, 0x87, 0x60, 0x3E, 0x65, 0x12, 0xED, 0xC2, 0xF6, - 0xFA, 0xD3, 0x3A, 0x48, 0x6B, 0xB5, 0x2C, 0xE2, 0xA0, 0x7B, 0xAD, - 0xB3, 0xD8, 0x64, 0x8C, 0x32, 0xF4, 0xB4, 0xF3, 0x57, 0xCF}, - {0x44, 0xB1, 0x40, 0x57, 0x13, 0xED, 0xDA, 0x24, 0xED, 0xC6, 0xA8, - 0x6A, 0x61, 0xF1, 0x38, 0x4C, 0x8D, 0x67, 0xD1, 0x38, 0x2F, 0x6E, - 0xD5, 0xE6, 0x3B, 0x6F, 0xCE, 0xED, 0xB1, 0x79, 0x92, 0x3F}}}, - {{{0x7C, 0x04, 0x3D, 0x52, 0x8D, 0x13, 0xFD, 0x65, 0x03, 0x15, 0x1D, - 0x82, 0x3C, 0x3A, 0xE2, 0xC4, 0x09, 0xB2, 0x77, 0x6E, 0xF8, 0x87, - 0x32, 0x87, 0x10, 0x3E, 0x53, 0x21, 0x6C, 0xBA, 0x49, 0x2F}, - {0x9C, 0xBE, 0x91, 0x73, 0x4C, 0xE8, 0x88, 0x33, 0x37, 0x81, 0x6B, - 0x48, 0xEB, 0xCE, 0x4A, 0xAA, 0xAC, 0x5C, 0x61, 0xCF, 0x6D, 0xB1, - 0xFA, 0x55, 0x71, 0xD0, 0x18, 0xDC, 0xFF, 0x4E, 0x8F, 0xAC}}}}}}, -}; - -const FqElemStr FfElementTest::fq_multi_exp_base_1[1] = {{ - 0x12, 0xA6, 0x5B, 0xD6, 0x91, 0x8D, 0x50, 0xA7, 0x66, 0xEB, 0x7D, 0x52, - 0xE3, 0x40, 0x17, 0x60, 0x7F, 0xDF, 0x6C, 0xA1, 0x2C, 0x1A, 0x37, 0xE0, - 0x92, 0xC0, 0xF7, 0xB9, 0x76, 0xAB, 0xB1, 0x8A, -}}; -const BigNumStr FfElementTest::fq_multi_exp_exp_1[1] = {{ - 0xFF, 0xFB, 0x3E, 0x5D, 0xFF, 0x9A, 0xFF, 0x02, 0x00, 0xFF, 0xFF, 0xFF, - 0xF2, 0xE1, 0x85, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x81, - 0xFF, 0xFD, 0xFF, 0xEB, 0xFF, 0x29, 0xA7, 0xFF, -}}; -const FqElemStr FfElementTest::fq_multi_exp_res_1 = { - 0x6A, 0x21, 0xEC, 0x89, 0xCC, 0x13, 0x2F, 0x6F, 0x29, 0x1B, 0x3A, - 0x94, 0xF6, 0xE6, 0xA8, 0xBD, 0x98, 0x25, 0x43, 0x7A, 0xDC, 0xC1, - 0x20, 0xBA, 0x30, 0xD8, 0x1C, 0x8E, 0x79, 0xFC, 0xDA, 0x67, -}; - -const std::vector FfElementTest::fq_multi_exp_exp_1_264({ - 0x08, 0xFF, 0xFB, 0x3E, 0x5D, 0xFF, 0x9A, 0xFF, 0x02, 0x00, 0xFF, 0xFF, - 0xFF, 0xF2, 0xE1, 0x85, 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0x81, 0xFF, 0xFD, 0xFF, 0xEB, 0xFF, 0x29, 0xA7, 0xFF, -}); -const FqElemStr FfElementTest::fq_multi_exp_res_1_264 = { - 0x71, 0x41, 0xa1, 0xdb, 0xd1, 0xd1, 0x50, 0xc2, 0x73, 0x07, 0xc1, - 0x93, 0xeb, 0xae, 0x89, 0x4c, 0x6e, 0x49, 0x74, 0xf7, 0x46, 0x23, - 0x75, 0xca, 0xc8, 0x67, 0x82, 0xaf, 0xcf, 0x35, 0x34, 0x1c}; -const FqElemStr FfElementTest::fq_multi_exp_res_1_256_264 = { - 0x10, 0x2f, 0x3a, 0xe5, 0x6e, 0x95, 0x92, 0x8f, 0x98, 0x03, 0x67, - 0x79, 0xec, 0x0c, 0xc9, 0x46, 0x07, 0xd9, 0xd9, 0x40, 0x46, 0x29, - 0x99, 0xe9, 0x23, 0xf9, 0x6b, 0x10, 0x35, 0x7c, 0xf1, 0xa3}; - -const FqElemStr FfElementTest::fq_multi_exp_base_2[2] = { - {0xE6, 0x65, 0x23, 0x9B, 0xD4, 0x07, 0x16, 0x83, 0x38, 0x23, 0xB2, 0x67, - 0x57, 0xEB, 0x0F, 0x23, 0x3A, 0xF4, 0x8E, 0xDA, 0x71, 0x5E, 0xD9, 0x98, - 0x63, 0x98, 0x2B, 0xBC, 0x78, 0xD1, 0x94, 0xF2}, - {0xDD, 0x2B, 0xE9, 0x59, 0x24, 0xA5, 0xB3, 0xFD, 0xEB, 0xE1, 0x3C, 0xC0, - 0x73, 0x4E, 0x99, 0xEE, 0x36, 0xF6, 0xC0, 0x1A, 0x76, 0x01, 0x0A, 0xF0, - 0xCB, 0xB4, 0x71, 0x88, 0x95, 0xCB, 0x35, 0xBA}}; -const BigNumStr FfElementTest::fq_multi_exp_exp_2[2] = { - {0x11, 0xFF, 0xFF, 0xFF, 0x4F, 0x59, 0xB1, 0xD3, 0x6B, 0x08, 0xFF, 0xFF, - 0x0B, 0xF3, 0xAF, 0x27, 0xFF, 0xB8, 0xFF, 0xFF, 0x98, 0xFF, 0xEB, 0xFF, - 0xF2, 0x6A, 0xFF, 0xFF, 0xEA, 0x31, 0xFF, 0xFF}, - {0xE2, 0xFF, 0x03, 0x1D, 0xFF, 0x19, 0x81, 0xCB, 0xFF, 0xFF, 0x6B, 0xD5, - 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xBD, 0xFF, 0x5A, 0xFF, 0x5C, 0x7C, 0xFF, - 0x84, 0xFF, 0xFF, 0x8C, 0x03, 0xB2, 0x26, 0xFF}}; -const FqElemStr FfElementTest::fq_multi_exp_res_2 = { - 0x8A, 0xF7, 0x96, 0x53, 0x9C, 0xC3, 0x57, 0x89, 0x50, 0xE3, 0xAB, - 0x12, 0x62, 0xEA, 0x0C, 0xE4, 0x65, 0xA6, 0x91, 0x09, 0x93, 0x81, - 0xFC, 0xBB, 0x0E, 0xFA, 0xC1, 0xC4, 0xDC, 0x3F, 0x0A, 0xD1, -}; - -const FqElemStr FfElementTest::fq_multi_exp_base_3[3] = { - {0x24, 0x9D, 0xDD, 0x1A, 0xC0, 0x07, 0x1F, 0x65, 0xDF, 0xBB, 0xC7, 0x39, - 0x99, 0x44, 0x63, 0x8E, 0x7E, 0xB2, 0x85, 0x82, 0xC6, 0x4E, 0x2D, 0x39, - 0xA8, 0x3F, 0x12, 0xB4, 0xE9, 0x9D, 0x67, 0x28}, - {0x6B, 0x51, 0x6B, 0x33, 0x0B, 0x2E, 0x2A, 0x94, 0x34, 0xCC, 0x7E, 0x97, - 0xFA, 0x85, 0x51, 0x44, 0x30, 0xE5, 0xF2, 0x68, 0x23, 0x31, 0x84, 0xFF, - 0xBB, 0x95, 0x9A, 0xB2, 0x80, 0x95, 0xC4, 0x91}, - {0x77, 0xED, 0xA2, 0x53, 0xA3, 0xBF, 0x6C, 0x58, 0x16, 0x7D, 0xEF, 0x8A, - 0x7D, 0x38, 0x65, 0x3F, 0x92, 0xA6, 0x85, 0xD7, 0x9F, 0x80, 0xA4, 0xA1, - 0x70, 0x02, 0xE5, 0x66, 0xF2, 0xD8, 0xD7, 0xD2}}; -const BigNumStr FfElementTest::fq_multi_exp_exp_3[3] = { - {0xFF, 0xFF, 0xFF, 0xB4, 0x48, 0xFF, 0xFF, 0xFF, 0xA3, 0xFF, 0xE3, 0xFF, - 0x61, 0xFF, 0xA2, 0x97, 0x9A, 0xFF, 0x6F, 0x04, 0xC6, 0xB9, 0xFF, 0x22, - 0xFF, 0x20, 0x9E, 0xFF, 0x43, 0xFF, 0xFF, 0xFF}, - {0xB1, 0x19, 0xBF, 0xFF, 0x74, 0x7F, 0xCC, 0x34, 0x1E, 0x30, 0x7D, 0xC5, - 0xC4, 0xFF, 0xE7, 0xF8, 0xFF, 0x5F, 0xFF, 0x73, 0xFF, 0x58, 0xFF, 0xD6, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xEC, 0xFF, 0xFF}, - {0xFF, 0xFF, 0x0D, 0xFF, 0xFF, 0xFF, 0xFF, 0x26, 0xA8, 0xFF, 0xFF, 0xFF, - 0x3E, 0xFF, 0xFF, 0xFF, 0xE0, 0x4F, 0xFF, 0xE3, 0xFF, 0xFF, 0xEB, 0x04, - 0x4B, 0xFF, 0x5D, 0x55, 0xFF, 0x2D, 0xFF, 0xFF}}; -const FqElemStr FfElementTest::fq_multi_exp_res_3 = { - 0x04, 0x22, 0x21, 0xE7, 0x9F, 0xE3, 0x07, 0x2F, 0xA4, 0xBB, 0x56, - 0x84, 0xD5, 0x93, 0x4A, 0xDA, 0x5B, 0x89, 0x07, 0xBE, 0xC5, 0x5F, - 0xE6, 0x5C, 0x18, 0xF0, 0xF8, 0x8E, 0x8E, 0x00, 0xB9, 0x87, -}; -const FqElemStr FfElementTest::fq_multi_exp_base_4[4] = { - {0x81, 0xEE, 0x78, 0x31, 0x4C, 0xC0, 0x3C, 0xDD, 0x16, 0x52, 0xC6, 0x7E, - 0x07, 0x4C, 0xFE, 0xC4, 0x50, 0x63, 0x5A, 0x40, 0xC8, 0xDF, 0x94, 0x23, - 0x1A, 0x90, 0xDD, 0x24, 0x61, 0x23, 0xDD, 0x87}, - {0x76, 0xBB, 0x2C, 0x1C, 0xB3, 0x78, 0x93, 0x7E, 0x10, 0x29, 0xC3, 0xEC, - 0xBD, 0xA3, 0x75, 0x3A, 0xF1, 0x0B, 0xE1, 0xCA, 0xEE, 0x02, 0x58, 0x74, - 0xC7, 0xDC, 0xB8, 0x4F, 0x3F, 0x7B, 0xA2, 0xFC}, - {0x3A, 0xD3, 0x04, 0xAA, 0x9D, 0x2A, 0xDE, 0x86, 0x56, 0x84, 0x80, 0x42, - 0xA5, 0x68, 0xD8, 0x6E, 0x65, 0xC4, 0x08, 0x07, 0x87, 0x4B, 0xC1, 0x92, - 0xCB, 0x68, 0x52, 0x6C, 0x5A, 0x4F, 0x7C, 0xFB}, - {0x56, 0xE7, 0xBD, 0x59, 0x54, 0xCC, 0x20, 0x16, 0xAE, 0x36, 0xD1, 0xB0, - 0xE4, 0x82, 0x47, 0x27, 0x32, 0xD1, 0x38, 0x7C, 0x53, 0x7F, 0xDD, 0xF4, - 0xDE, 0xFA, 0xF7, 0x0F, 0xDD, 0xDF, 0x48, 0xA9}}; -const BigNumStr FfElementTest::fq_multi_exp_exp_4[4] = { - {0xFF, 0xA5, 0xC3, 0xFF, 0xFF, 0x09, 0x18, 0x18, 0x95, 0x40, 0xFF, 0xFF, - 0xDB, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0xFF, 0x25, 0xFF, 0xFF, 0x42, 0x07, - 0xB5, 0xFF, 0x26, 0xE0, 0x4F, 0xB5, 0xB4, 0xFF}, - {0x1F, 0xFF, 0xAA, 0xF1, 0xFF, 0xFF, 0x7E, 0xFF, 0xFF, 0xFF, 0x07, 0xFF, - 0xE7, 0xDF, 0xFF, 0xEE, 0xFF, 0x57, 0xFF, 0xFF, 0xFF, 0xB8, 0xB3, 0x9C, - 0xFF, 0x8A, 0x89, 0xFF, 0xFE, 0x32, 0xFF, 0xC1}, - {0x9A, 0xFF, 0xFF, 0x9B, 0xFF, 0xAB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0x36, 0xF0, 0xC5, 0xAE, 0x87, 0x41, 0xFF, 0x5C, 0xDD, 0xFF, 0xFF, - 0xFF, 0xFF, 0x59, 0xC9, 0xFF, 0x44, 0x5C, 0x58}, - {0x00, 0xFF, 0x95, 0xFF, 0x21, 0xFF, 0xFF, 0x1D, 0x1A, 0x06, 0xD3, 0xFF, - 0xFF, 0xFF, 0xFF, 0x07, 0xFF, 0xFF, 0xFF, 0xB0, 0x31, 0xFF, 0xFF, 0x1F, - 0x61, 0x48, 0xFF, 0xFF, 0xFF, 0x17, 0xC9, 0x79}}; -const FqElemStr FfElementTest::fq_multi_exp_res_4 = { - 0x26, 0x2C, 0x23, 0x55, 0xD5, 0xBD, 0x7B, 0x67, 0x60, 0xFE, 0x06, - 0x7B, 0xCC, 0xB8, 0x6B, 0xC9, 0x00, 0x81, 0xAE, 0xCB, 0xEC, 0x91, - 0x6D, 0x1B, 0x9E, 0x1C, 0xD8, 0xC0, 0x8D, 0x3F, 0x1B, 0x20, -}; -const Fq12ElemStr FfElementTest::fq12_multi_exp_base_4[4] = { - { - {{{{{{0x2C, 0x86, 0xEE, 0x80, 0x61, 0x45, 0x8F, 0xFD, 0x96, 0xC2, 0x81, - 0x11, 0xE8, 0x96, 0xE2, 0xCA, 0x21, 0x78, 0xF7, 0xA3, 0x4B, 0xBA, - 0xDC, 0x0D, 0x34, 0x8A, 0x56, 0x12, 0x67, 0x8D, 0x72, 0x37}, - {0xA8, 0xEB, 0x5F, 0x1A, 0x1B, 0xF0, 0x5C, 0xC6, 0x6F, 0xC2, 0xC5, - 0x03, 0xC4, 0x19, 0x85, 0xA6, 0xE0, 0x64, 0xFE, 0x71, 0x51, 0x46, - 0xDF, 0xC2, 0xD6, 0xF9, 0xA0, 0xD6, 0x84, 0xC1, 0x4A, 0x11}}}, - {{{0xE0, 0x33, 0xA3, 0x1C, 0x73, 0x71, 0x62, 0x17, 0x10, 0x4C, 0xD8, - 0x3E, 0xEE, 0xA1, 0x38, 0x9F, 0xA5, 0xFB, 0x1D, 0xC4, 0x9D, 0x2F, - 0x08, 0x4A, 0xD3, 0x61, 0x37, 0x79, 0xAB, 0xC1, 0x37, 0x7E}, - {0x90, 0xFD, 0xA3, 0x9D, 0x0C, 0x81, 0x52, 0xF4, 0x58, 0x24, 0x89, - 0xC4, 0xF4, 0xD4, 0x82, 0x33, 0xCA, 0x5D, 0xB4, 0x58, 0xA6, 0x1E, - 0xE6, 0x2B, 0x86, 0xEF, 0x56, 0xC4, 0x4F, 0x9B, 0x27, 0x3C}}}, - {{{0x96, 0x54, 0xDA, 0xB5, 0x32, 0x23, 0x8A, 0x93, 0xCC, 0xA5, 0x7D, - 0x28, 0x4A, 0x97, 0xA4, 0x30, 0xA8, 0x11, 0xBC, 0x43, 0x22, 0x7F, - 0x02, 0x73, 0x0E, 0x5C, 0x63, 0x52, 0x2F, 0x4B, 0x5F, 0x7D}, - {0xC3, 0x1E, 0x30, 0xAE, 0xAC, 0x8C, 0xE8, 0x93, 0xD6, 0xCE, 0x05, - 0x4B, 0x6B, 0x21, 0x01, 0x14, 0x4A, 0x1D, 0xD9, 0x08, 0x0C, 0xA1, - 0x4C, 0x0B, 0x44, 0x28, 0x9C, 0xB6, 0xD1, 0x96, 0xBD, 0x07}}}}}, - {{{{{0x8B, 0x3D, 0x77, 0x4E, 0xBD, 0x7B, 0x9F, 0x65, 0x20, 0xDB, 0xA0, - 0x95, 0x25, 0x44, 0x44, 0x7A, 0xE3, 0xDC, 0xDD, 0x2F, 0xBA, 0x75, - 0x16, 0x19, 0xCB, 0x90, 0x31, 0x79, 0x38, 0xB6, 0x1A, 0x82}, - {0xBC, 0xB6, 0x85, 0xCD, 0xEB, 0xB9, 0x13, 0x43, 0xEA, 0xC2, 0x78, - 0xBE, 0x25, 0x97, 0x1C, 0x6E, 0x18, 0x55, 0xFD, 0xCB, 0xE6, 0x7E, - 0x1E, 0x92, 0xAD, 0x48, 0xE7, 0xA7, 0x02, 0x87, 0x0B, 0x8F}}}, - {{{0x16, 0xD7, 0x8E, 0x95, 0x8E, 0x62, 0x0A, 0xAD, 0x20, 0x2D, 0x6A, - 0x2B, 0x4E, 0x6F, 0xC1, 0xC2, 0x63, 0xBA, 0x82, 0xF3, 0x8C, 0xD0, - 0xA2, 0x09, 0xD3, 0xE5, 0xBA, 0x1F, 0x65, 0x35, 0xD0, 0x1C}, - {0x09, 0x98, 0x47, 0x65, 0xF2, 0x90, 0xD4, 0xE2, 0xD0, 0x6F, 0x9E, - 0xDB, 0xA2, 0x14, 0x9B, 0x4B, 0x3D, 0xAA, 0x75, 0x25, 0x67, 0xF4, - 0x7D, 0x77, 0xE9, 0x24, 0xED, 0xEE, 0x1B, 0x07, 0x7F, 0xE0}}}, - {{{0x7A, 0x34, 0xB7, 0x3C, 0x36, 0x0D, 0xCE, 0xF9, 0xBF, 0xF9, 0xE5, - 0x09, 0x86, 0xEB, 0xB9, 0xD8, 0xC4, 0x67, 0xC5, 0xCD, 0xD4, 0xBC, - 0xEE, 0x45, 0xF7, 0x11, 0x68, 0xD9, 0x23, 0x6D, 0xD6, 0x24}, - {0x6E, 0x97, 0x83, 0x13, 0x76, 0x9F, 0x35, 0xEA, 0xB8, 0x47, 0x57, - 0x9B, 0x74, 0x47, 0x1F, 0x19, 0xE7, 0x97, 0x74, 0x1B, 0xB1, 0xA0, - 0xF3, 0x92, 0xDC, 0x35, 0xFD, 0x7F, 0x4F, 0x07, 0x22, 0xAC}}}}}}, - }, - {{{{{{{0xFD, 0x05, 0x41, 0x27, 0x00, 0x7A, 0xAD, 0x17, 0xBC, 0xBF, 0x22, - 0x5E, 0xDA, 0xEB, 0x7D, 0xAA, 0xB5, 0x2D, 0xC8, 0x61, 0xFE, 0x2C, - 0xBA, 0x9E, 0x54, 0x43, 0x94, 0xDC, 0xFD, 0x0E, 0x6D, 0x6D}, - {0xA1, 0x5E, 0x05, 0xA5, 0x05, 0x55, 0xE7, 0x2A, 0xF7, 0x53, 0x37, - 0x2C, 0xEF, 0x44, 0x95, 0xCA, 0x2C, 0xE8, 0xEB, 0xAE, 0x61, 0x05, - 0x33, 0xE7, 0x0F, 0x30, 0x67, 0xBE, 0xCD, 0xB2, 0x93, 0x44}}}, - {{{0x44, 0x31, 0x96, 0x4D, 0x72, 0x61, 0xCD, 0x23, 0x1F, 0x7B, 0x57, - 0x33, 0x39, 0xAC, 0x57, 0x53, 0x3D, 0x70, 0x57, 0xB3, 0x6D, 0xD5, - 0x8A, 0x89, 0x30, 0xBC, 0xED, 0x29, 0x19, 0x39, 0x6E, 0x6A}, - {0x80, 0x21, 0x1E, 0xB7, 0x84, 0xB1, 0x0A, 0xA4, 0xD0, 0xFF, 0x59, - 0x31, 0xE9, 0xBA, 0x39, 0xF7, 0x81, 0xDF, 0x1B, 0x7B, 0xD9, 0xDB, - 0x02, 0x17, 0xBE, 0x97, 0x63, 0xBD, 0x37, 0x14, 0xB8, 0x8B}}}, - {{{0x6C, 0xCC, 0x5B, 0xA3, 0xEE, 0xC8, 0x0B, 0x7B, 0xF5, 0xDE, 0xBC, - 0xB7, 0xA8, 0x25, 0x35, 0xAE, 0x0B, 0x30, 0x96, 0x33, 0x52, 0x13, - 0xA3, 0x89, 0x3A, 0x2E, 0xA4, 0x7E, 0x5F, 0x4E, 0xB1, 0xF7}, - {0x87, 0xBA, 0x08, 0xB0, 0xFB, 0xCB, 0x31, 0xA6, 0x2B, 0x3E, 0xE7, - 0xC4, 0xCC, 0xA5, 0x14, 0x61, 0xC9, 0x18, 0xFC, 0x74, 0x59, 0x06, - 0xF4, 0xAD, 0xFC, 0x2D, 0x0C, 0x7D, 0xDB, 0x2A, 0xEC, 0xD4}}}}}, - {{{{{0xE9, 0x31, 0x31, 0x50, 0x25, 0xB7, 0x0C, 0x48, 0x30, 0xD5, 0x78, - 0xB1, 0x10, 0xEA, 0x5D, 0xAA, 0xAA, 0x03, 0xEC, 0xE3, 0x0F, 0x36, - 0xA6, 0xBC, 0x18, 0x3A, 0x76, 0x87, 0xA3, 0xE9, 0x33, 0xDA}, - {0x48, 0x78, 0x93, 0x64, 0x72, 0x9B, 0x2A, 0x1E, 0x0D, 0x50, 0x9F, - 0x6F, 0xBD, 0xA5, 0x18, 0xB1, 0xA8, 0x14, 0x9A, 0x1B, 0xB9, 0xB4, - 0x2C, 0x1F, 0x46, 0xB8, 0x9B, 0x7A, 0xC7, 0x84, 0xAE, 0x27}}}, - {{{0xD1, 0xEC, 0x1C, 0xEC, 0x69, 0xF0, 0x35, 0x40, 0x77, 0x7E, 0x27, - 0x22, 0x36, 0x38, 0xDF, 0x15, 0xC2, 0xB3, 0xB8, 0x63, 0x4A, 0x6E, - 0x68, 0x8C, 0xC1, 0x39, 0x3C, 0x02, 0x4C, 0x2A, 0x31, 0x18}, - {0x2E, 0x35, 0xF5, 0xCA, 0xA2, 0xE9, 0x24, 0x92, 0xD5, 0xE5, 0x2E, - 0x5D, 0x1C, 0x94, 0xD9, 0xC7, 0xF0, 0x22, 0x16, 0x20, 0xA8, 0x37, - 0xDD, 0x0E, 0xAB, 0x1B, 0x5E, 0x8B, 0xEE, 0x81, 0xC6, 0x17}}}, - {{{0xF1, 0x29, 0x5D, 0x1D, 0x6F, 0x53, 0x5A, 0xB2, 0x20, 0x88, 0x3D, - 0xA4, 0x98, 0x81, 0xA4, 0xEF, 0x11, 0x1B, 0x64, 0x9E, 0x2C, 0x95, - 0xDD, 0xD7, 0x57, 0xB3, 0x95, 0xCA, 0x40, 0xB9, 0x0D, 0x62}, - {0xDC, 0x86, 0x8B, 0xE6, 0xD3, 0x7B, 0x33, 0xEA, 0x50, 0x25, 0xE2, - 0x77, 0xE3, 0x0B, 0x5A, 0xC8, 0x81, 0xFC, 0xAE, 0x74, 0x38, 0x69, - 0x07, 0xF8, 0x4E, 0xD7, 0x85, 0xA6, 0x2F, 0x13, 0xB7, 0x0A}}}}}}}, - {{{{{{{0xF4, 0xDC, 0xAC, 0x02, 0xC0, 0x95, 0x07, 0xDC, 0x12, 0x4F, 0x3A, - 0x01, 0xA9, 0xEE, 0xF3, 0x07, 0x46, 0x94, 0x47, 0x15, 0x63, 0xA6, - 0x8E, 0x0A, 0xC4, 0xC4, 0xE4, 0x23, 0x85, 0x63, 0xE4, 0x4E}, - {0x9A, 0x9E, 0x9F, 0xC1, 0xED, 0x4E, 0x94, 0x10, 0xFE, 0x7D, 0x90, - 0xEF, 0x82, 0x21, 0xAC, 0x67, 0x24, 0x99, 0x86, 0xC6, 0x85, 0x8B, - 0x19, 0x9A, 0x9B, 0x90, 0x0B, 0xA4, 0x90, 0x78, 0x34, 0x53}}}, - {{{0xB1, 0x4C, 0xBA, 0xB8, 0xC6, 0x40, 0x71, 0xC2, 0x17, 0x51, 0x05, - 0xC2, 0xC9, 0xBC, 0x03, 0x10, 0x4E, 0xFE, 0x2F, 0x94, 0xED, 0x13, - 0x35, 0x7B, 0x20, 0xA6, 0x59, 0x44, 0x81, 0xD0, 0xEC, 0x12}, - {0x74, 0xA2, 0x4A, 0xFB, 0xD7, 0x28, 0x70, 0xAD, 0xDE, 0x86, 0x2F, - 0xEF, 0xF9, 0x50, 0x5D, 0x1E, 0x46, 0x3B, 0x82, 0x1C, 0x6A, 0xC9, - 0x3F, 0x32, 0xAE, 0xCD, 0x93, 0x2C, 0xA5, 0x70, 0x45, 0x24}}}, - {{{0x38, 0x19, 0x79, 0xBF, 0x35, 0xF5, 0xC1, 0x53, 0x06, 0x42, 0xAA, - 0x6B, 0xF3, 0xB7, 0x8F, 0xFB, 0xFC, 0x28, 0x46, 0x9A, 0x65, 0x2A, - 0x45, 0x3D, 0x4C, 0x3C, 0x6B, 0x9C, 0x44, 0xC5, 0x82, 0xB8}, - {0x80, 0xF9, 0xB3, 0x44, 0x95, 0x17, 0x39, 0x01, 0x6B, 0xD6, 0x1D, - 0x73, 0x22, 0x94, 0xFF, 0x6F, 0x7B, 0x4E, 0xB6, 0xA4, 0xE4, 0x6C, - 0xA8, 0xDB, 0x38, 0x74, 0x0B, 0xDB, 0xFA, 0x14, 0x99, 0x39}}}}}, - {{{{{0x28, 0xEE, 0xFC, 0x62, 0xE5, 0x33, 0x9C, 0x63, 0xD5, 0x7F, 0x2C, - 0x4C, 0xF4, 0x76, 0x4C, 0xF7, 0x7B, 0x27, 0x2C, 0xA9, 0xB9, 0x01, - 0x3C, 0x58, 0xF7, 0xCE, 0xAA, 0x0A, 0x21, 0xC0, 0xA3, 0xA7}, - {0xA1, 0x85, 0xBC, 0xFE, 0x55, 0xFC, 0x3B, 0x9B, 0x3D, 0xEF, 0x14, - 0x85, 0x8A, 0x4E, 0x5E, 0x1F, 0x4F, 0xC9, 0x86, 0xB8, 0xF2, 0xB2, - 0xE3, 0xE7, 0x7E, 0x87, 0xE2, 0x20, 0xD7, 0x85, 0x2C, 0xD1}}}, - {{{0x13, 0xCB, 0x46, 0xAD, 0xD7, 0xEC, 0x66, 0xD5, 0x2B, 0x6E, 0x87, - 0x92, 0x13, 0xB2, 0x7D, 0x18, 0x69, 0x35, 0xCB, 0xF1, 0xBE, 0xC2, - 0x9D, 0xEB, 0xF5, 0x00, 0x0B, 0x73, 0xA3, 0xFD, 0x51, 0xDC}, - {0x91, 0x0E, 0xE4, 0x46, 0x41, 0x23, 0xDD, 0x85, 0x53, 0x0C, 0xAE, - 0xF9, 0x74, 0xCF, 0x1C, 0x32, 0x22, 0xDA, 0x4A, 0x14, 0x80, 0x71, - 0x51, 0x23, 0xC3, 0xAB, 0x7E, 0xEC, 0x77, 0xCC, 0x59, 0x12}}}, - {{{0x1C, 0x0F, 0x65, 0x6B, 0xD8, 0x41, 0xE0, 0x1B, 0x51, 0x9C, 0x89, - 0x26, 0xAB, 0x88, 0x63, 0x5D, 0xBB, 0x95, 0x92, 0x5B, 0x2C, 0x1D, - 0xDE, 0xC1, 0x88, 0xD6, 0xF1, 0x02, 0x48, 0xE0, 0xE2, 0xD1}, - {0x40, 0x7F, 0xF1, 0x23, 0x4A, 0xCF, 0x36, 0xD5, 0xCF, 0x76, 0x0D, - 0x00, 0x2A, 0xF7, 0x5F, 0x31, 0xBB, 0xCC, 0x46, 0x84, 0x07, 0x04, - 0x98, 0x9C, 0xB4, 0x31, 0x15, 0x2D, 0x91, 0xF6, 0x29, 0x33}}}}}}}, - {{{{{{{0xA8, 0x8E, 0x9A, 0xF9, 0x25, 0x12, 0x98, 0xE2, 0xC3, 0x61, 0x2E, - 0xE8, 0xD6, 0xA6, 0x77, 0x16, 0x49, 0x04, 0x75, 0x69, 0xD1, 0x83, - 0x2D, 0x3F, 0x2A, 0x79, 0xB6, 0x9B, 0xC9, 0x1D, 0x03, 0x90}, - {0x2A, 0xD8, 0x11, 0x9F, 0x26, 0x36, 0xE7, 0xE9, 0x3A, 0x05, 0x4C, - 0x15, 0x49, 0x93, 0xDA, 0xE9, 0xD0, 0x5A, 0xE4, 0x8D, 0x8A, 0xFA, - 0x04, 0xF1, 0x20, 0x84, 0x56, 0xEC, 0x3C, 0x27, 0x19, 0x5C}}}, - {{{0xF1, 0xAF, 0xBF, 0xF6, 0x0E, 0x58, 0x84, 0x2D, 0x94, 0x11, 0xF4, - 0xB5, 0xF4, 0x14, 0x51, 0xB0, 0x90, 0x46, 0x1A, 0x81, 0xED, 0xCF, - 0x91, 0x66, 0x58, 0xA6, 0x36, 0x3A, 0x52, 0x18, 0x5A, 0xC1}, - {0x08, 0x4C, 0x99, 0xD3, 0xDC, 0xCE, 0x7F, 0xCE, 0x78, 0xE0, 0x38, - 0x87, 0x32, 0xF1, 0x80, 0x3C, 0x7B, 0x67, 0xAA, 0x6F, 0xDD, 0xE0, - 0xFC, 0xCB, 0xD0, 0xB0, 0x3A, 0x59, 0x52, 0x2A, 0x84, 0xE4}}}, - {{{0xF8, 0x4A, 0xFF, 0x50, 0xA0, 0x65, 0xC4, 0xEE, 0xF4, 0x9C, 0xAA, - 0x34, 0x46, 0xF9, 0xD2, 0x6C, 0xA1, 0x61, 0x71, 0x49, 0x32, 0x25, - 0x84, 0x54, 0x90, 0x44, 0xBE, 0xA4, 0x0B, 0xF7, 0xFE, 0x26}, - {0x81, 0x63, 0x73, 0xF7, 0x2F, 0xF2, 0xFA, 0x24, 0x52, 0xA4, 0xD9, - 0x4C, 0xC1, 0xA7, 0xA5, 0xC3, 0x03, 0x36, 0x13, 0x9B, 0x16, 0x45, - 0x16, 0xCB, 0x4B, 0x99, 0x38, 0xF3, 0x6D, 0xC8, 0x7E, 0xAB}}}}}, - {{{{{0xB3, 0x53, 0xDF, 0xB6, 0x82, 0x60, 0x12, 0x11, 0x36, 0x69, 0x0E, - 0x05, 0x31, 0x8E, 0xCF, 0xD7, 0x3F, 0x32, 0xE7, 0x95, 0x84, 0x1D, - 0xC8, 0xB5, 0xBE, 0x49, 0x17, 0x9D, 0xCF, 0xA9, 0x5A, 0x2A}, - {0xC4, 0x11, 0x86, 0xE8, 0x6C, 0x02, 0x56, 0xB0, 0x25, 0x2F, 0xA0, - 0x06, 0xB3, 0x62, 0xB2, 0x11, 0xAF, 0xBE, 0xA4, 0xE8, 0x61, 0x64, - 0x85, 0xFB, 0xEB, 0x1C, 0xF1, 0xBC, 0x2C, 0xAE, 0x10, 0x51}}}, - {{{0x16, 0xA6, 0xC0, 0xB3, 0x86, 0x8E, 0x6D, 0x79, 0xB6, 0xBD, 0xDE, - 0x1E, 0x26, 0x06, 0x46, 0x65, 0x82, 0x84, 0x5A, 0x97, 0xD3, 0xB7, - 0x93, 0x78, 0x6B, 0x9D, 0x14, 0x33, 0x94, 0x43, 0x34, 0x04}, - {0x45, 0xD1, 0x47, 0xD4, 0x2F, 0x17, 0xCF, 0xF1, 0xDD, 0xEA, 0x11, - 0x52, 0xAE, 0x01, 0x88, 0x3A, 0x10, 0xEE, 0x5C, 0x16, 0xCD, 0xB5, - 0x48, 0xE9, 0x16, 0x2C, 0x70, 0xB4, 0x1E, 0x19, 0x38, 0xE0}}}, - {{{0x18, 0xE9, 0xAE, 0xC5, 0xDA, 0x74, 0x41, 0x2D, 0x70, 0x07, 0x60, - 0x37, 0x27, 0x66, 0xF7, 0x00, 0xBB, 0x79, 0x51, 0xF3, 0x7C, 0x8A, - 0x2B, 0xB5, 0x69, 0x6E, 0x10, 0x1F, 0xE0, 0x0A, 0x5E, 0xBE}, - {0xB4, 0x4E, 0x0E, 0x02, 0x59, 0xB5, 0xCB, 0x4A, 0x6A, 0x86, 0x8B, - 0xCC, 0xA2, 0x13, 0xA0, 0xE9, 0xF2, 0x5C, 0xB0, 0x23, 0xB2, 0x15, - 0xF9, 0xBB, 0x43, 0xC1, 0x54, 0xF4, 0xC8, 0xAB, 0x16, 0xA6}}}}}}}, -}; -const BigNumStr FfElementTest::fq12_multi_exp_exp_4[4] = { - { - 0x14, 0x92, 0xD1, 0x1F, 0xAC, 0x90, 0x4D, 0xC3, 0x3E, 0xB8, 0xA7, 0xFE, - 0x35, 0x98, 0xDA, 0x94, 0xD6, 0xF3, 0x27, 0x29, 0x4B, 0x70, 0xCF, 0x0F, - 0xDA, 0x14, 0x97, 0xA1, 0x9B, 0x6B, 0x24, 0x08, - }, - { - 0x76, 0x8D, 0xE5, 0xC2, 0xAB, 0x78, 0xD9, 0x76, 0x98, 0xFF, 0x92, 0xEA, - 0x95, 0x58, 0xC5, 0x0C, 0x6F, 0x1B, 0x35, 0xC4, 0xBF, 0x4A, 0x9E, 0xC2, - 0x6A, 0xEC, 0xE2, 0xF6, 0xAF, 0xEB, 0xAC, 0x06, - }, - { - 0x50, 0x38, 0x60, 0x31, 0xAB, 0x05, 0xCC, 0xB1, 0xC2, 0x06, 0xA0, 0xD7, - 0x92, 0x12, 0xBD, 0x17, 0x81, 0xB9, 0x7E, 0x07, 0x9B, 0xD4, 0x3B, 0x2D, - 0x3C, 0x15, 0x3A, 0x5A, 0xF1, 0xC0, 0xC4, 0x75, - }, - { - 0xA1, 0x3F, 0xEA, 0x99, 0x7E, 0xC7, 0x65, 0xF5, 0x41, 0xA6, 0xD6, 0xD3, - 0x77, 0xEC, 0x27, 0xF8, 0x6C, 0x18, 0x28, 0x69, 0x97, 0x08, 0x0E, 0x63, - 0x5A, 0xDA, 0xFE, 0x9F, 0xD1, 0x4A, 0x61, 0x4F, - }, -}; -const Fq12ElemStr FfElementTest::fq12_multi_exp_res_4 = { - {{{{{{0x3A, 0x30, 0x33, 0xA2, 0x14, 0xDF, 0xDC, 0x70, 0x48, 0xF3, 0xBA, - 0x3F, 0xCE, 0xFC, 0x69, 0x24, 0xAE, 0xA1, 0xF3, 0xCF, 0xD8, 0x77, - 0x69, 0x38, 0x38, 0xF4, 0x8E, 0xFB, 0x51, 0xFB, 0x10, 0x7C}, - {0x73, 0xB4, 0xEE, 0xF9, 0x76, 0xBB, 0x45, 0xEC, 0x07, 0x24, 0x23, - 0xA3, 0x38, 0x64, 0x39, 0x4C, 0x03, 0x94, 0xF5, 0xEE, 0x5F, 0xC9, - 0x83, 0x4F, 0xD1, 0xA6, 0x4A, 0x05, 0x25, 0x0C, 0x46, 0x33}}}, - {{{0xD4, 0x40, 0x47, 0xAE, 0xEC, 0xDA, 0x30, 0xF9, 0xE1, 0x28, 0xFB, - 0xB1, 0x4C, 0x62, 0xFB, 0x6C, 0x90, 0x0D, 0xB1, 0xEC, 0xAF, 0x2D, - 0x95, 0x64, 0x11, 0x93, 0xDA, 0x8E, 0xB8, 0x7D, 0xE4, 0xA3}, - {0x8E, 0xA6, 0x9B, 0xAA, 0x58, 0xD5, 0xDC, 0x59, 0x1A, 0x51, 0x53, - 0x47, 0x30, 0x1C, 0x2B, 0xB0, 0xBB, 0x57, 0x57, 0x0A, 0x8C, 0x5F, - 0x62, 0x9C, 0x52, 0x28, 0xC0, 0x25, 0x27, 0xAE, 0xCD, 0x36}}}, - {{{0xBF, 0x2D, 0x03, 0xB1, 0x33, 0xFD, 0x24, 0x81, 0x3C, 0x91, 0x43, - 0x90, 0x0C, 0x20, 0xC4, 0xE3, 0x69, 0x3F, 0xA9, 0xA2, 0x7C, 0xC2, - 0x48, 0x28, 0x1B, 0xF0, 0x81, 0x1F, 0x2B, 0x8F, 0x8D, 0x43}, - {0x38, 0x18, 0x12, 0xA3, 0x89, 0xF1, 0xD7, 0x60, 0x89, 0x68, 0x6A, - 0xC4, 0xCC, 0x5D, 0xF4, 0xCE, 0x43, 0x95, 0x84, 0xCD, 0x01, 0x55, - 0xB8, 0x5D, 0x24, 0x50, 0xCD, 0xE3, 0x68, 0x1C, 0xFF, 0x59}}}}}, - {{{{{0x0D, 0xAC, 0xCB, 0xE7, 0x9D, 0x68, 0x0F, 0x4A, 0xAF, 0xEB, 0xB5, - 0xFB, 0xF9, 0xB1, 0x58, 0x80, 0xD5, 0x71, 0x53, 0x26, 0x2E, 0x9C, - 0xCE, 0x10, 0xAC, 0xD2, 0x0A, 0xEB, 0xB4, 0x5C, 0xC8, 0xD7}, - {0x16, 0x26, 0x66, 0x71, 0xDD, 0x67, 0xBA, 0xDB, 0x35, 0x76, 0x64, - 0xC6, 0x0B, 0x0B, 0x07, 0x4B, 0x65, 0xA2, 0xF7, 0x68, 0x9E, 0xFE, - 0xE8, 0xE3, 0xA7, 0x09, 0x79, 0xC5, 0xDF, 0x5E, 0x9C, 0xEC}}}, - {{{0xEE, 0x83, 0x59, 0xB5, 0x89, 0x81, 0xA2, 0x87, 0xD7, 0x75, 0x65, - 0x90, 0xDE, 0x78, 0x37, 0x59, 0x04, 0x9B, 0x50, 0xC3, 0xBA, 0x90, - 0x09, 0x15, 0xAB, 0x17, 0xC5, 0xBF, 0x5B, 0xB9, 0xE4, 0x6C}, - {0xA9, 0xB1, 0x49, 0x76, 0x25, 0x74, 0x5D, 0x9C, 0x78, 0xC5, 0x09, - 0xEE, 0xEB, 0xEB, 0x9D, 0x1C, 0x6C, 0xC0, 0x27, 0x9D, 0x66, 0xE6, - 0x7F, 0x31, 0xCD, 0xB0, 0x8A, 0xE4, 0x9E, 0xBD, 0x70, 0x18}}}, - {{{0x88, 0xA1, 0x08, 0x39, 0xA2, 0x48, 0xA5, 0x98, 0xB6, 0xAD, 0x10, - 0x54, 0x07, 0xCD, 0xFC, 0x6D, 0xB1, 0x02, 0xFF, 0xE3, 0x92, 0xD7, - 0x9D, 0x48, 0xFB, 0xCE, 0x88, 0x46, 0x92, 0x07, 0x02, 0xBA}, - {0xEE, 0xEB, 0xAE, 0x88, 0xB1, 0x4E, 0xD0, 0xF2, 0xCE, 0xD7, 0x57, - 0x07, 0xD4, 0x39, 0xD2, 0x7D, 0x1A, 0x0C, 0xEF, 0xF2, 0x84, 0x84, - 0x22, 0x8A, 0xB1, 0x80, 0x0D, 0xDC, 0x64, 0x86, 0xFD, 0x70}}}}}}}; -const FqElemStr FfElementTest::fq_multi_exp_base_5[5] = { - {0x7B, 0x26, 0x96, 0x84, 0x04, 0x0D, 0x6F, 0x10, 0xAA, 0x7F, 0xD0, 0x0C, - 0x41, 0x3A, 0x68, 0x48, 0xBF, 0x3D, 0xB5, 0xCE, 0x3A, 0x9C, 0xA9, 0x10, - 0xA4, 0x67, 0x7C, 0xC0, 0x41, 0x52, 0xCA, 0xE7}, - {0x2E, 0xD9, 0xEF, 0x86, 0xB6, 0x32, 0x72, 0x89, 0x37, 0xCF, 0x16, 0xCE, - 0x27, 0x15, 0x7A, 0x95, 0xCF, 0x94, 0x1B, 0xF3, 0xCE, 0x49, 0x20, 0x29, - 0x9A, 0x61, 0x2E, 0x0A, 0xF5, 0xE1, 0xDC, 0x9F}, - {0xE0, 0x19, 0x37, 0x44, 0xA7, 0x45, 0x49, 0x7E, 0x19, 0x02, 0x09, 0x78, - 0xBE, 0xA4, 0x65, 0x60, 0x7A, 0xF5, 0xC8, 0xAF, 0x97, 0x5E, 0xDA, 0x3A, - 0xB4, 0x16, 0x70, 0x31, 0xE3, 0xB4, 0x18, 0xA8}, - {0xBC, 0x92, 0x29, 0x92, 0x14, 0xD3, 0x3F, 0xB8, 0xB8, 0x8C, 0x41, 0xDF, - 0xC5, 0xA1, 0xCA, 0x77, 0xE5, 0x73, 0xFE, 0xA7, 0xAC, 0x81, 0x66, 0x11, - 0x5A, 0x6D, 0x7D, 0x97, 0x13, 0x92, 0x8D, 0x1D}, - {0xE1, 0xA0, 0x0D, 0xDC, 0x8F, 0x20, 0xF5, 0x2D, 0x1D, 0x1F, 0xBD, 0x24, - 0x8C, 0xC2, 0x26, 0x06, 0x89, 0xE9, 0x46, 0xA9, 0xD2, 0x44, 0x8F, 0x1A, - 0x8D, 0xAF, 0x20, 0x73, 0x60, 0x0B, 0x66, 0x9C}}; - -const BigNumStr FfElementTest::fq_multi_exp_exp_5[5] = { - {0x78, 0xE6, 0x3F, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xD7, 0x6E, - 0xE9, 0xFF, 0x4F, 0xFF, 0x23, 0xFF, 0x67, 0xB4, 0xED, 0xEE, 0xD7, 0xC6, - 0xFF, 0x4B, 0x0B, 0x6F, 0x1F, 0xD6, 0xFD, 0x7F}, - {0xA1, 0x87, 0xFF, 0x1B, 0xFF, 0x85, 0x68, 0xFF, 0x1C, 0xFF, 0xD5, 0xFF, - 0x95, 0x73, 0xFF, 0xFF, 0xFF, 0x9E, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x5E, - 0x9E, 0x62, 0xFF, 0xFF, 0x97, 0xFF, 0xFF, 0xF3}, - {0x2E, 0xE8, 0x1E, 0x35, 0xFF, 0x82, 0x0B, 0x99, 0xEC, 0x30, 0x2B, 0xCE, - 0xEC, 0x83, 0x05, 0xFF, 0x9E, 0x3C, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, - 0x57, 0x26, 0x5B, 0x6C, 0xFF, 0xE6, 0x94, 0xFF}, - {0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0xFF, 0xFF, 0x79, 0xFC, 0xFF, 0x83, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xA9, 0xFF, 0x2F, 0x6B, 0xD1, 0xE7, 0xFF, 0xFF, - 0xFF, 0x7C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, - {0x63, 0x53, 0x53, 0xFF, 0xFF, 0xFF, 0x4F, 0xFF, 0xFF, 0xFF, 0x09, 0xFF, - 0xC0, 0xD8, 0x17, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x45, - 0xFF, 0x3A, 0xFF, 0xFF, 0xFF, 0xFF, 0x60, 0x06}}; - -const FqElemStr FfElementTest::fq_multi_exp_res_5 = { - 0x8F, 0x6D, 0x54, 0xCA, 0x00, 0x85, 0xD8, 0x78, 0xA4, 0x45, 0x36, - 0x7C, 0x23, 0xD0, 0x3C, 0x2D, 0x20, 0x78, 0xD9, 0xD7, 0xF1, 0xC3, - 0x99, 0xD9, 0xD3, 0x0A, 0x0E, 0x86, 0x98, 0xC2, 0xA7, 0x97, -}; -const FqElemStr FfElementTest::fq_multi_exp_base_6[6] = { - {0x75, 0x18, 0x6A, 0x3D, 0xCC, 0x76, 0x33, 0x92, 0xD0, 0x57, 0xDA, 0xE0, - 0x37, 0x6F, 0x71, 0xD5, 0x9E, 0x7E, 0x65, 0xED, 0xD7, 0xFD, 0x82, 0xC0, - 0x6C, 0x83, 0x60, 0x30, 0xC1, 0xD3, 0x3D, 0x4D}, - {0xF5, 0x3A, 0x20, 0xAB, 0x22, 0x47, 0x07, 0xAE, 0x71, 0xC1, 0x91, 0x73, - 0xEF, 0x1F, 0x1D, 0x76, 0x2E, 0xEE, 0x0D, 0xDE, 0xD9, 0xF8, 0x5C, 0x85, - 0xC7, 0x5B, 0x93, 0x88, 0xF6, 0xFF, 0x4C, 0xA5}, - {0x21, 0xB3, 0x5E, 0xE8, 0xD2, 0xDA, 0x14, 0x1C, 0xB5, 0x2C, 0xFC, 0x61, - 0x9D, 0xEB, 0x65, 0x87, 0xBB, 0x5B, 0xBC, 0xFD, 0x37, 0x54, 0x6B, 0xDC, - 0xD9, 0xFA, 0x7A, 0xCD, 0x18, 0x7E, 0x8B, 0x89}, - {0x70, 0xB7, 0x19, 0x42, 0xB4, 0x41, 0x2C, 0x1B, 0xBD, 0x7B, 0x25, 0x06, - 0xA2, 0x95, 0xB5, 0xB6, 0x70, 0xDF, 0x58, 0x71, 0xCA, 0x09, 0x12, 0x66, - 0x5A, 0x7B, 0xF0, 0x5F, 0x43, 0x69, 0x32, 0xF6}, - {0x3D, 0x57, 0xE8, 0x3F, 0x1E, 0x39, 0x2B, 0xE5, 0xD0, 0xCF, 0xA9, 0xC8, - 0x72, 0x10, 0x7F, 0xC5, 0x4F, 0xAE, 0xE9, 0x73, 0x28, 0x4C, 0xFC, 0x3F, - 0xD5, 0xFF, 0xE8, 0xCF, 0x2C, 0xEB, 0x33, 0xD3}, - {0x51, 0x80, 0x15, 0x1C, 0xE6, 0x9C, 0x4B, 0x80, 0x40, 0xBA, 0x40, 0x29, - 0x3A, 0x86, 0xA8, 0xB2, 0x66, 0x08, 0x97, 0x8D, 0xEB, 0x8B, 0xA7, 0x93, - 0xE3, 0x49, 0xC6, 0xC0, 0x46, 0x93, 0xC1, 0x75}}; -const BigNumStr FfElementTest::fq_multi_exp_exp_6[6] = { - {0xFF, 0xFF, 0xFF, 0x49, 0x50, 0xFF, 0x19, 0xFF, 0xEB, 0xFF, 0xFF, 0xFF, - 0xFF, 0x28, 0x4A, 0x0E, 0xFF, 0x74, 0xFF, 0xC7, 0xFF, 0xD9, 0x81, 0xFF, - 0xFF, 0xFF, 0xD5, 0x2C, 0xFF, 0xFF, 0xFF, 0xAE}, - {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xBF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0x0C, 0x03, 0xFF, 0x95, 0xFF, 0x11, 0x9D, 0xFF, 0x9B, 0xFF, 0xFF, - 0x68, 0x44, 0xFF, 0xC9, 0xFF, 0x10, 0xC7, 0xBF}, - {0x64, 0xFF, 0x89, 0x4A, 0xFF, 0x20, 0xFF, 0xE7, 0xFF, 0x36, 0x23, 0xDD, - 0xFF, 0xFF, 0xFC, 0xFF, 0x6B, 0xFF, 0xFF, 0xFF, 0xFF, 0x48, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0x94, 0xD3, 0x59, 0xBE}, - {0x0F, 0xFF, 0x76, 0xA5, 0x9E, 0x02, 0x9B, 0xFF, 0xA1, 0xFF, 0xC2, 0xFF, - 0x9D, 0xFF, 0x23, 0xFF, 0xFF, 0xFF, 0xFF, 0x6B, 0x81, 0x2A, 0xFF, 0x98, - 0xFF, 0xFF, 0xB9, 0xFF, 0xB7, 0x78, 0xE6, 0xFF}, - {0xAF, 0xF3, 0xFF, 0x3C, 0xA8, 0xFF, 0xB9, 0x3A, 0xFF, 0xFF, 0xFF, 0x70, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0xFF, 0xFF, 0x52, - 0xFF, 0x41, 0x10, 0x62, 0xFF, 0x51, 0x35, 0xFF}, - {0xFF, 0xFF, 0xFF, 0xFF, 0xD3, 0xC3, 0xD9, 0xFF, 0xFF, 0x3A, 0x44, 0x88, - 0x04, 0xFF, 0x0B, 0xFF, 0xFF, 0xFF, 0x64, 0xFF, 0xFF, 0x52, 0xFF, 0x7D, - 0x6B, 0x24, 0x6E, 0xFF, 0xFF, 0xFF, 0xA7, 0x71}}; -const FqElemStr FfElementTest::fq_multi_exp_res_6 = { - 0xFB, 0x89, 0x4F, 0xBB, 0x91, 0xEE, 0xD6, 0x57, 0x2D, 0x34, 0xF9, - 0x0B, 0xE3, 0xEB, 0x71, 0x1D, 0x63, 0x74, 0x96, 0x3B, 0xD4, 0x02, - 0x2F, 0x08, 0xDB, 0x95, 0x6A, 0x40, 0x68, 0xD4, 0x55, 0x76, -}; - -const Fq6ElemStr FfElementTest::epid11_GT_multi_exp_base_3[3] = { - {0x02, 0x7C, 0xAC, 0xE1, 0x58, 0x08, 0x6A, 0x83, 0x50, 0xD8, 0xBA, 0xBA, - 0x4B, 0x60, 0x6C, 0xEB, 0x51, 0xCE, 0x7E, 0x6D, 0x8E, 0xA8, 0x56, 0x41, - 0x33, 0xF3, 0xB0, 0xA6, 0xFC, 0xCD, 0xC8, 0x41, 0x05, 0x9E, 0xCC, 0x4F, - 0x51, 0x77, 0xD9, 0xEC, 0x57, 0x34, 0x48, 0x47, 0x22, 0x7A, 0x7C, 0xA1, - 0x14, 0xB8, 0x2A, 0xC9, 0x16, 0x0A, 0xB4, 0xB3, 0x5D, 0x44, 0x28, 0x23, - 0x80, 0x7A, 0x3E, 0xDA, 0x02, 0x6D, 0x03, 0x47, 0xCD, 0x2A, 0xAB, 0xA4, - 0xCE, 0x63, 0x0B, 0x5E, 0x3A, 0xF2, 0x96, 0x86, 0xA9, 0x9F, 0x2A, 0x9A, - 0xFF, 0x8F, 0x94, 0x91, 0xC8, 0x3C, 0xF2, 0x5A, 0xAA, 0xDA, 0x6B, 0x8E, - 0x02, 0xFC, 0x42, 0x4B, 0xFE, 0xF3, 0x23, 0x0A, 0xF8, 0x1A, 0x5C, 0x9A, - 0x5C, 0x0D, 0x71, 0xEF, 0x85, 0x64, 0xA6, 0x4D, 0x6A, 0x8B, 0x82, 0x58, - 0x2E, 0xBC, 0xFB, 0xB9, 0xDF, 0xB8, 0xCE, 0x3D, 0x03, 0xF3, 0x07, 0x18, - 0x4A, 0x13, 0x82, 0x8A, 0xEA, 0x24, 0x57, 0x72, 0xE2, 0x33, 0x9D, 0xB3, - 0x0C, 0x57, 0xCF, 0xAB, 0xDD, 0xEE, 0xF8, 0xD7, 0x2A, 0x75, 0xF5, 0xD7, - 0x28, 0xED, 0x0F, 0xB7, 0x02, 0xEC, 0x5F, 0xED, 0x50, 0xAE, 0x6B, 0xF3, - 0x80, 0x29, 0x7B, 0xA2, 0x75, 0x61, 0xFD, 0x20, 0x01, 0x2B, 0xDF, 0x8B, - 0x3C, 0x2A, 0xB9, 0x1D, 0x92, 0xED, 0x0F, 0xAD, 0x73, 0x74, 0x1E, 0xD8}, - {0x06, 0xA6, 0x4A, 0x6B, 0x89, 0xD0, 0x07, 0x2A, 0xE6, 0x0B, 0x56, 0xD3, - 0x48, 0x17, 0xF6, 0x99, 0x31, 0x41, 0x21, 0x99, 0x51, 0xF6, 0xB1, 0x6C, - 0x02, 0xCD, 0x11, 0xE7, 0xCC, 0xD3, 0xC5, 0x6C, 0x06, 0xF4, 0x39, 0x62, - 0x37, 0x88, 0x37, 0xAD, 0x1F, 0x36, 0x81, 0xFA, 0xD7, 0x4B, 0x9F, 0x57, - 0x0F, 0x5B, 0xC3, 0x53, 0x14, 0x53, 0x41, 0x3A, 0x2B, 0xAB, 0x6E, 0xF4, - 0xD8, 0x7F, 0xC5, 0x67, 0x08, 0x70, 0xD7, 0x9B, 0x59, 0xE1, 0xE0, 0x57, - 0xE2, 0xF4, 0x04, 0x82, 0x06, 0x6A, 0xD5, 0xA2, 0x76, 0x64, 0x41, 0x7F, - 0x3B, 0xE6, 0x33, 0xB9, 0x39, 0x68, 0xDA, 0x0D, 0x13, 0x03, 0x63, 0xC8, - 0x07, 0x94, 0x70, 0xF9, 0xFB, 0xD8, 0x99, 0x31, 0xA1, 0x53, 0x1C, 0x20, - 0x43, 0x12, 0xEB, 0xFF, 0xA4, 0x5D, 0x64, 0x7C, 0x24, 0x9E, 0xE0, 0x03, - 0x80, 0x8E, 0xFB, 0xDC, 0xEE, 0xFD, 0x1F, 0xEF, 0x03, 0x43, 0x07, 0x44, - 0xEF, 0xB3, 0x71, 0x39, 0x77, 0x61, 0x5C, 0xA9, 0x32, 0x54, 0x33, 0x98, - 0xA2, 0x14, 0x6A, 0x13, 0x53, 0x22, 0x94, 0xA2, 0xCE, 0x15, 0xE7, 0xD0, - 0x30, 0xF2, 0x6B, 0x07, 0x02, 0x56, 0x28, 0xC3, 0xB1, 0x39, 0xF9, 0xC7, - 0xDA, 0xE2, 0xFD, 0xD0, 0xA8, 0x1B, 0xE8, 0xB2, 0xE3, 0x75, 0x02, 0xB8, - 0x90, 0xA4, 0xA5, 0x8F, 0x23, 0xA1, 0xCD, 0x75, 0xE7, 0x51, 0x37, 0xE5}, - {0x09, 0x27, 0x38, 0x30, 0x06, 0x44, 0x13, 0xEF, 0xFE, 0x70, 0x5C, 0x4A, - 0x21, 0xFF, 0xF8, 0xF5, 0xBB, 0xC9, 0x6E, 0xA8, 0x7E, 0x00, 0xB1, 0xD7, - 0x5E, 0x55, 0xCF, 0xC7, 0x34, 0x6B, 0x8D, 0xD5, 0x04, 0xCE, 0x6E, 0xCA, - 0x11, 0x5A, 0xB3, 0x0C, 0x33, 0x79, 0x5F, 0xDE, 0xD9, 0xDB, 0x8C, 0xFA, - 0x73, 0x4E, 0x1E, 0xFA, 0xA1, 0x21, 0x6D, 0xA3, 0x6D, 0xE8, 0x69, 0x02, - 0x9E, 0xCC, 0x4D, 0x14, 0x09, 0xB5, 0x7C, 0xBA, 0x98, 0xC2, 0xE3, 0xAA, - 0x82, 0x6A, 0x0F, 0x1E, 0x4C, 0x6C, 0x9E, 0xB8, 0xB6, 0xA3, 0x5D, 0x06, - 0xFE, 0x99, 0x5C, 0x62, 0xA9, 0x19, 0x4E, 0x84, 0x61, 0xC7, 0xF9, 0x78, - 0x04, 0x39, 0xDA, 0xB4, 0x79, 0x32, 0x63, 0x60, 0xA6, 0x69, 0x86, 0x5C, - 0xFF, 0xB0, 0x71, 0xD0, 0xF5, 0x5E, 0x3C, 0xB2, 0x5D, 0x81, 0x4F, 0x9F, - 0xE4, 0xF7, 0x3B, 0xC7, 0xC5, 0x80, 0x5E, 0x8E, 0x01, 0x23, 0xFA, 0xFC, - 0x09, 0xAE, 0x12, 0x55, 0xF2, 0xD0, 0x50, 0x5C, 0xED, 0xC6, 0xD6, 0x81, - 0x9A, 0xA7, 0x93, 0xA3, 0xF4, 0xAC, 0xE5, 0x3E, 0xDB, 0x5A, 0x05, 0xB7, - 0x0B, 0x80, 0xAD, 0xA9, 0x08, 0xF1, 0x5A, 0xB5, 0x09, 0x23, 0x52, 0x65, - 0x46, 0x64, 0x79, 0xF2, 0x47, 0x04, 0x72, 0x48, 0x4E, 0x01, 0x55, 0x4A, - 0x67, 0x8D, 0x1E, 0x07, 0xC7, 0x46, 0x87, 0xF6, 0x50, 0xC3, 0xA6, 0x6B}}; - -const std::vector FfElementTest::epid11_GT_multi_exp_exp_3[3] = { - {0x00, 0x00, 0xAF, 0x5B, 0x22, 0x71, 0x98, 0xB6, 0xEB, 0x67, 0x3D, 0x94, - 0x4A, 0xB6, 0x5E, 0x99, 0x81, 0xC5, 0x96, 0x91, 0x55, 0xBA, 0x2F, 0x16, - 0x01, 0x4E, 0xE1, 0x25, 0xAD, 0xCA, 0x94, 0x88, 0x60, 0x3B, 0xA2, 0x56, - 0x0A, 0x94, 0x0B, 0x2C, 0x3E, 0xD0, 0x8F, 0x15, 0x07, 0x3D, 0xD5, 0xBE, - 0x72, 0x3E, 0x2D, 0x06, 0x74, 0xFF, 0x06, 0xED, 0x47, 0x28, 0x08, 0x0C, - 0xA0, 0x6F, 0xDB, 0x75, 0x55, 0x32, 0xDC, 0x97, 0x47, 0x60, 0x4E, 0x6F, - 0xB4, 0x29, 0x89, 0x0C}, - - {0x00, 0x00, 0x01, 0xB8, 0x40, 0xBB, 0xE1, 0x1C, 0x84, 0x8E, 0x02, 0xC0, - 0xEF, 0x69, 0x84, 0x90, 0xED, 0xEB, 0x99, 0x94, 0xBC, 0x79, 0x48, 0xC8, - 0x08, 0x3C, 0x25, 0xDA, 0xAC, 0xFF, 0x3A, 0xDD}, - - {0x00, 0x00, 0x37, 0x1E, 0xCD, 0x0F, 0x66, 0x09, 0x7D, 0x33, 0x9A, 0xDC, - 0x47, 0x28, 0xF7, 0x91, 0xF3, 0xC2, 0xBC, 0x3A, 0xA9, 0x05, 0x62, 0xFC, - 0xDD, 0x8C, 0x65, 0xC2, 0xA8, 0x14, 0x55, 0x52}, -}; - -const Fq6ElemStr FfElementTest::epid11_GT_multi_exp_res_3 = { - 0x09, 0xCF, 0x1D, 0xB6, 0x97, 0x14, 0x58, 0xAA, 0x29, 0x7E, 0x03, 0x96, - 0xD2, 0xDC, 0xD4, 0x2C, 0x1F, 0x2F, 0xB0, 0xC1, 0x5E, 0x71, 0xFB, 0x0C, - 0x8D, 0xDB, 0xBD, 0x1D, 0x20, 0xD9, 0x9A, 0xA5, 0x02, 0x69, 0x62, 0x1C, - 0x5C, 0xE8, 0x12, 0x11, 0xB1, 0x49, 0x93, 0x29, 0x23, 0xAF, 0xB4, 0xFF, - 0x77, 0x1E, 0xC9, 0xA6, 0xA0, 0x6D, 0xD9, 0x38, 0x89, 0x1A, 0xC7, 0xB9, - 0xF9, 0x66, 0x25, 0xD3, 0x00, 0x59, 0xE1, 0xAC, 0x0D, 0xDE, 0xCF, 0xC0, - 0xCF, 0x50, 0x48, 0x6B, 0xCE, 0x32, 0x15, 0x79, 0x13, 0x71, 0x12, 0x9B, - 0x63, 0x09, 0x4D, 0x20, 0xD9, 0x4A, 0xCD, 0x4F, 0x00, 0x7F, 0x8A, 0x19, - 0x06, 0x3F, 0x0F, 0x3E, 0x83, 0xA3, 0xEE, 0x0F, 0xAB, 0x72, 0xC9, 0x9A, - 0x5D, 0xD1, 0x67, 0xBF, 0xF1, 0x0E, 0xAB, 0x9C, 0xE8, 0x50, 0x04, 0xA7, - 0x20, 0xAA, 0xF6, 0xB9, 0x8E, 0x2F, 0x69, 0x44, 0x02, 0x68, 0x7A, 0x2E, - 0x70, 0xD4, 0x7E, 0x83, 0x8F, 0xAB, 0x58, 0x3E, 0xD2, 0x95, 0xA0, 0x1A, - 0x61, 0xC8, 0x93, 0xA0, 0xCC, 0xA4, 0x90, 0xFB, 0x73, 0xC2, 0xD2, 0x91, - 0x70, 0x34, 0x6A, 0x67, 0x03, 0x67, 0x49, 0x84, 0xEE, 0x3B, 0x9E, 0x8B, - 0x6D, 0x47, 0x95, 0xBD, 0x0E, 0x47, 0x97, 0x9E, 0x0A, 0x87, 0x61, 0x83, - 0x80, 0xEF, 0x4F, 0x91, 0xA8, 0xA6, 0xB7, 0xC0, 0x44, 0xE2, 0x21, 0x8D}; - -//////////////////////////////////////////////// -// NewFfElement - -TEST_F(FfElementTest, NewFailsGivenNullPointer) { - FfElement* ff_elem = nullptr; - EXPECT_EQ(kEpidBadArgErr, NewFfElement(nullptr, &ff_elem)); - EXPECT_EQ(kEpidBadArgErr, NewFfElement(this->fq, nullptr)); - DeleteFfElement(&ff_elem); -} - -TEST_F(FfElementTest, NewSucceedsGiven256BitFiniteField) { - FfElement* ff_elem = nullptr; - EXPECT_EQ(kEpidNoErr, NewFfElement(this->fq, &ff_elem)); - DeleteFfElement(&ff_elem); -} - -TEST_F(FfElementTest, Default256BitElementIsZero) { - FfElement* ff_elem = nullptr; - THROW_ON_EPIDERR(NewFfElement(this->fq, &ff_elem)); - FqElemStr ff_elem_str; - EpidStatus sts = - WriteFfElement(this->fq, ff_elem, &ff_elem_str, sizeof(ff_elem_str)); - DeleteFfElement(&ff_elem); - THROW_ON_EPIDERR(sts); - - FqElemStr fq_zero_str = {0}; - EXPECT_EQ(fq_zero_str, ff_elem_str); -} - -//////////////////////////////////////////////// -// DeleteFfElement - -TEST_F(FfElementTest, DeleteNullsPointer) { - FfElement* ff_elem = nullptr; - EpidStatus sts = NewFfElement(this->fq, &ff_elem); - DeleteFfElement(&ff_elem); - THROW_ON_EPIDERR(sts); - EXPECT_EQ(nullptr, ff_elem); -} - -TEST_F(FfElementTest, DeleteWorksGivenNullPointer) { - EXPECT_NO_THROW(DeleteFfElement(nullptr)); - FfElement* ff_elem = nullptr; - EXPECT_NO_THROW(DeleteFfElement(&ff_elem)); -} - -//////////////////////////////////////////////// -// ReadFfElement - -TEST_F(FfElementTest, ReadFailsGivenArgumentsMismatch) { - uint8_t buf[sizeof(Fq12ElemStr)] = {0}; - EXPECT_EQ(kEpidBadArgErr, - ReadFfElement(this->fq12, buf, sizeof(Fq12ElemStr), this->fq_a)); - EXPECT_EQ(kEpidBadArgErr, - ReadFfElement(this->fq, buf, sizeof(FqElemStr), this->fq12_result)); -} - -TEST_F(FfElementTest, ReadFailsGivenNullPointer) { - FqElemStr ff_elem_str; - EXPECT_EQ(kEpidBadArgErr, ReadFfElement(nullptr, &ff_elem_str, - sizeof(ff_elem_str), this->fq_a)); - EXPECT_EQ(kEpidBadArgErr, - ReadFfElement(this->fq, nullptr, sizeof(ff_elem_str), this->fq_a)); - EXPECT_EQ(kEpidBadArgErr, ReadFfElement(this->fq, &ff_elem_str, - sizeof(ff_elem_str), nullptr)); -} - -TEST_F(FfElementTest, ReadFailsGivenInvalidBufferSize) { - FqElemStr ff_elem_str; - EXPECT_EQ(kEpidBadArgErr, - ReadFfElement(this->fq, &ff_elem_str, 0, this->fq_a)); - EXPECT_EQ(kEpidBadArgErr, - ReadFfElement(this->fq, &ff_elem_str, - std::numeric_limits::max(), this->fq_a)); -} - -TEST_F(FfElementTest, ReadFailsGivenElementDoesNotBelongToFF) { - // q does not belong to Fq - EXPECT_EQ(kEpidBadArgErr, ReadFfElement(this->fq, &this->bn_q_str, - sizeof(this->bn_q_str), this->fq_a)); -} - -TEST_F(FfElementTest, Read256BitElementCorrectly) { - // q-1 is valid element of Fq - ASSERT_EQ(kEpidNoErr, ReadFfElement(this->fq, &this->fq_qm1_str, - sizeof(this->fq_qm1_str), this->fq_a)); - - FqElemStr buf; - EXPECT_EQ(kEpidNoErr, - WriteFfElement(this->fq, this->fq_a, &buf, sizeof(buf))); - EXPECT_EQ(this->fq_qm1_str, buf); -} - -TEST_F(FfElementTest, ReadIgnoreLeadingZerosForPrimeField) { - // q-1 is valid element of Fq - std::vector ff_elem_str = { - 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, - 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, - 0x98, 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x12}; - ASSERT_EQ(kEpidNoErr, ReadFfElement(this->fq, ff_elem_str.data(), - ff_elem_str.size(), this->fq_a)); - - FqElemStr buf; - EXPECT_EQ(kEpidNoErr, - WriteFfElement(this->fq, this->fq_a, &buf, sizeof(buf))); - EXPECT_EQ(this->fq_qm1_str, buf); -} - -TEST_F(FfElementTest, ReadExpectExactSizeForFieldExtensions) { - uint8_t buf[sizeof(Fq2ElemStr) + 1] = {0}; - EXPECT_EQ(kEpidBadArgErr, - ReadFfElement(this->fq2, buf, sizeof(buf), this->fq2_a)); -} - -/////////////////////////////////////////////////////////////////////// -// InitFfElementFromBn - -TEST_F(FfElementTest, InitFromBnFailsGivenNonPrimeField) { - BigNumStr str = {0x01}; - FfElementObj ffe(&this->fq2); - BigNumObj bn(sizeof(str), str); - EXPECT_EQ(kEpidBadArgErr, InitFfElementFromBn(this->fq2, bn, ffe)); -} - -TEST_F(FfElementTest, InitFromBnFailsGivenNullPointer) { - BigNumStr str = {0x01}; - FfElementObj ffe(&this->fq); - BigNumObj bn(sizeof(str), str); - EXPECT_EQ(kEpidBadArgErr, InitFfElementFromBn(nullptr, bn, ffe)); - EXPECT_EQ(kEpidBadArgErr, InitFfElementFromBn(this->fq, nullptr, ffe)); - EXPECT_EQ(kEpidBadArgErr, InitFfElementFromBn(this->fq, bn, nullptr)); -} - -TEST_F(FfElementTest, InitFromBnInFieldElementCorrectly) { - FfElementObj ffe(&this->fq); - BigNumObj qm1_bn(this->bn_qm1_str); - FqElemStr buf; - - EXPECT_EQ(kEpidNoErr, InitFfElementFromBn(this->fq, qm1_bn, ffe)); - EXPECT_EQ(kEpidNoErr, WriteFfElement(this->fq, ffe, &buf, sizeof(buf))); - EXPECT_EQ(this->fq_qm1_str, buf); -} - -TEST_F(FfElementTest, InitFromBnOutOfFieldElementCorrectly) { - FfElementObj ffe(&this->fq); - BigNumObj q_bn(this->bn_q_str); - BigNumObj qp1_bn(this->bn_qp1_str); - FqElemStr buf; - - EXPECT_EQ(kEpidNoErr, InitFfElementFromBn(this->fq, q_bn, ffe)); - EXPECT_EQ(kEpidNoErr, WriteFfElement(this->fq, ffe, &buf, sizeof(buf))); - EXPECT_EQ(this->bn_0_str, buf); - - EXPECT_EQ(kEpidNoErr, InitFfElementFromBn(this->fq, qp1_bn, ffe)); - EXPECT_EQ(kEpidNoErr, WriteFfElement(this->fq, ffe, &buf, sizeof(buf))); - EXPECT_EQ(this->bn_1_str, buf); -} - -/////////////////////////////////////////////////////////////////////// -// FfIsEqual - -TEST_F(FfElementTest, FfIsEqualFailsGivenArgumentsMismatch) { - bool result; - EXPECT_EQ(kEpidBadArgErr, - FfIsEqual(this->fq12, this->fq_a, this->fq_b, &result)); - EXPECT_EQ(kEpidBadArgErr, - FfIsEqual(this->fq, this->fq12_g, this->fq_b, &result)); - EXPECT_EQ(kEpidBadArgErr, - FfIsEqual(this->fq, this->fq_a, this->fq12_h, &result)); -} - -TEST_F(FfElementTest, FfIsEqualFailsGivenNullPointer) { - bool result; - EXPECT_EQ(kEpidBadArgErr, - FfIsEqual(nullptr, this->fq_a, this->fq_a, &result)); - EXPECT_EQ(kEpidBadArgErr, FfIsEqual(this->fq, nullptr, this->fq_a, &result)); - EXPECT_EQ(kEpidBadArgErr, FfIsEqual(this->fq, this->fq_a, nullptr, &result)); - EXPECT_EQ(kEpidBadArgErr, - FfIsEqual(this->fq, this->fq_a, this->fq_a, nullptr)); -} - -TEST_F(FfElementTest, FfIsEqualCanCompareElementWithItself) { - bool result; - EXPECT_EQ(kEpidNoErr, FfIsEqual(this->fq, this->fq_a, this->fq_a, &result)); - EXPECT_TRUE(result); -} - -TEST_F(FfElementTest, Different256BitFiniteFieldElementsAreNotEqual) { - bool result; - EXPECT_EQ(kEpidNoErr, FfIsEqual(this->fq, this->fq_a, this->fq_b, &result)); - EXPECT_FALSE(result); -} - -TEST_F(FfElementTest, Same256BitFiniteFieldElementsAreEqual) { - FfElementObj fq_a_local(&this->fq, &this->fq_a_str, sizeof(this->fq_a_str)); - bool result; - EXPECT_EQ(kEpidNoErr, FfIsEqual(this->fq, this->fq_a, fq_a_local, &result)); - EXPECT_TRUE(result); -} - -TEST_F(FfElementTest, DifferentFq12ElementsAreNotEqual) { - bool result; - EXPECT_EQ(kEpidNoErr, - FfIsEqual(this->fq12, this->fq12_g, this->fq12_h, &result)); - EXPECT_FALSE(result); -} - -TEST_F(FfElementTest, SameFq12ElementsAreEqual) { - FfElementObj fq12_g_local(&this->fq12, &this->fq12_g_str, - sizeof(this->fq12_g_str)); - bool result; - EXPECT_EQ(kEpidNoErr, - FfIsEqual(this->fq12, this->fq12_g, fq12_g_local, &result)); - EXPECT_TRUE(result); -} - -//////////////////////////////////////////////// -// WriteFfElement - -TEST_F(FfElementTest, WriteFailsGivenArgumentsMismatch) { - uint8_t buf[sizeof(Fq12ElemStr)] = {0}; - EXPECT_EQ(kEpidBadArgErr, - WriteFfElement(this->fq12, this->fq_a, buf, sizeof(Fq12ElemStr))); - EXPECT_EQ(kEpidBadArgErr, - WriteFfElement(this->fq, this->fq12_g, buf, sizeof(Fq12ElemStr))); -} - -TEST_F(FfElementTest, WriteFailsGivenNullPointer) { - FqElemStr ff_elem_str; - EXPECT_EQ(kEpidBadArgErr, WriteFfElement(nullptr, this->fq_a, &ff_elem_str, - sizeof(ff_elem_str))); - EXPECT_EQ(kEpidBadArgErr, WriteFfElement(this->fq, nullptr, &ff_elem_str, - sizeof(ff_elem_str))); - EXPECT_EQ(kEpidBadArgErr, - WriteFfElement(this->fq, this->fq_a, nullptr, sizeof(ff_elem_str))); -} - -TEST_F(FfElementTest, WriteFailsGivenInvalidBufferSize) { - FqElemStr ff_elem_str; - EXPECT_EQ(kEpidBadArgErr, - WriteFfElement(this->fq, this->fq_a, &ff_elem_str, 0)); - EXPECT_EQ(kEpidBadArgErr, WriteFfElement(this->fq, this->fq_a, &ff_elem_str, - sizeof(ff_elem_str) - 1)); - EXPECT_EQ(kEpidBadArgErr, WriteFfElement(this->fq, this->fq_a, &ff_elem_str, - std::numeric_limits::max())); -} - -TEST_F(FfElementTest, WriteWorksGiven256BitElement) { - FqElemStr ff_elem_str; - EXPECT_EQ(kEpidNoErr, WriteFfElement(this->fq, this->fq_a, &ff_elem_str, - sizeof(ff_elem_str))); - EXPECT_EQ(this->fq_a_str, ff_elem_str); -} - -TEST_F(FfElementTest, WritePadPrimeFieldElement) { - FqElemStr ff_elem_str[2] = {0xcd}; - EXPECT_EQ(kEpidNoErr, WriteFfElement(this->fq, this->fq_a, &ff_elem_str[0], - sizeof(ff_elem_str))); - EXPECT_EQ(this->fq_0_str, ff_elem_str[0]); - EXPECT_EQ(this->fq_a_str, ff_elem_str[1]); -} - -TEST_F(FfElementTest, WriteExpectExactSizeForFieldExtensions) { - uint8_t buf[sizeof(Fq12ElemStr) + 1] = {0}; - EXPECT_EQ(kEpidBadArgErr, WriteFfElement(this->fq12, this->fq12_g, buf, - sizeof(Fq12ElemStr) + 1)); - EXPECT_EQ(kEpidBadArgErr, WriteFfElement(this->fq12, this->fq12_g, buf, - sizeof(Fq12ElemStr) - 1)); - EXPECT_EQ(kEpidBadArgErr, - WriteFfElement(this->fq12, this->fq12_g, buf, sizeof(FqElemStr))); -} - -/////////////////////////////////////////////////////////////////////// -// FfNeg - -TEST_F(FfElementTest, FfNegFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, FfNeg(this->fq12, this->fq_a, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfNeg(this->fq, this->fq12_g, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfNeg(this->fq, this->fq_a, this->fq12_result)); -} - -TEST_F(FfElementTest, FfNegFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, FfNeg(nullptr, this->fq_a, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfNeg(this->fq, nullptr, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfNeg(this->fq, this->fq_a, nullptr)); -} - -TEST_F(FfElementTest, FfNegSucceedsGivenElementZero) { - FqElemStr fq_r_str; - EXPECT_EQ(kEpidNoErr, FfNeg(this->fq, this->fq_0, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_0_str, fq_r_str) - << "FfNeg: Negate element does not match to reference neg zero value"; -} - -TEST_F(FfElementTest, FfNegSucceedsGivenNonZeroElement) { - FqElemStr fq_r_str; - EXPECT_EQ(kEpidNoErr, FfNeg(this->fq, this->fq_a, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_neg_a_str, fq_r_str) - << "FfNeg: Negate element does not match to reference neg value"; -} - -//////////////////////////////////////////////// -// FfIsZero - -TEST_F(FfElementTest, FfIsZeroFailsGivenNullPointer) { - bool result = false; - EXPECT_EQ(kEpidBadArgErr, FfIsZero(nullptr, this->fq_0, &result)); - EXPECT_EQ(kEpidBadArgErr, FfIsZero(this->fq, nullptr, &result)); - EXPECT_EQ(kEpidBadArgErr, FfIsZero(this->fq, this->fq_0, nullptr)); -} - -TEST_F(FfElementTest, FfIsZeroFailsGivenArgumentsMismatch) { - bool result; - EXPECT_EQ(kEpidBadArgErr, FfIsZero(this->fq12, this->fq_a, &result)); - EXPECT_EQ(kEpidBadArgErr, FfIsZero(this->fq, this->fq12_g, &result)); -} - -TEST_F(FfElementTest, FfIsZeroSucceedsGivenZeroElement) { - bool result = false; - EXPECT_EQ(kEpidNoErr, FfIsZero(this->fq, this->fq_0, &result)); - EXPECT_TRUE(result); -} - -TEST_F(FfElementTest, FfIsZeroSucceedsGivenNonZeroElement) { - bool result = false; - EXPECT_EQ(kEpidNoErr, FfIsZero(this->fq, this->fq_1, &result)); - EXPECT_FALSE(result); -} - -//////////////////////////////////////////////// -// FfMul - -TEST_F(FfElementTest, FfMulFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, - FfMul(nullptr, this->fq_a, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMul(this->fq, nullptr, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMul(this->fq, this->fq_a, nullptr, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfMul(this->fq, this->fq_a, this->fq_b, nullptr)); -} - -TEST_F(FfElementTest, FfMulFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, - FfMul(this->fq12, this->fq_a, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMul(this->fq, this->fq12_g, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMul(this->fq, this->fq_a, this->fq12_h, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMul(this->fq, this->fq_a, this->fq_b, this->fq12_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMul(this->fq2, this->fq_a, this->fq2_a, this->fq2_result)); -} - -TEST_F(FfElementTest, FfMulSucceedsGivenElementZero) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, - FfMul(this->fq, this->fq_0, this->fq_b, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_0_str, fq_r_str); - - EXPECT_EQ(kEpidNoErr, - FfMul(this->fq, this->fq_a, this->fq_0, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_0_str, fq_r_str); -} - -TEST_F(FfElementTest, FfMulSucceedsGivenElementOne) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, - FfMul(this->fq, this->fq_1, this->fq_b, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_b_str, fq_r_str); - - EXPECT_EQ(kEpidNoErr, - FfMul(this->fq, this->fq_a, this->fq_1, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_a_str, fq_a_str); -} - -TEST_F(FfElementTest, FfMulSucceedsGivenTwoElements) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, - FfMul(this->fq, this->fq_a, this->fq_b, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_mul_ab_str, fq_r_str); - - Fq2ElemStr fq2_r_str; - - THROW_ON_EPIDERR( - ReadFfElement(this->fq, &(fq_b_str), sizeof(fq_b_str), this->fq_b)); - EXPECT_EQ(kEpidNoErr, - FfMul(this->fq2, this->fq2_a, this->fq_b, this->fq2_result)); - THROW_ON_EPIDERR(WriteFfElement(this->fq2, this->fq2_result, &fq2_r_str, - sizeof(fq2_r_str))); - EXPECT_EQ(this->fq2_mul_ab_str, fq2_r_str); - - Fq12ElemStr fq12_r_str; - THROW_ON_EPIDERR(ReadFfElement(this->fq12, &(this->fq12_i_str), - sizeof(this->fq12_i_str), this->fq12_i)); - THROW_ON_EPIDERR(ReadFfElement(this->fq12, &(fq12_j_str), sizeof(fq12_j_str), - this->fq12_j)); - EXPECT_EQ(kEpidNoErr, - FfMul(this->fq12, this->fq12_i, this->fq12_j, this->fq12_result)); - THROW_ON_EPIDERR(WriteFfElement(this->fq12, this->fq12_result, &fq12_r_str, - sizeof(fq12_r_str))); - EXPECT_EQ(fq12_mul_ij_str, fq12_r_str); -} - -//////////////////////////////////////////////// -// FfSub -TEST_F(FfElementTest, FfSubFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, - FfSub(this->fq12, this->fq_a, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSub(this->fq, this->fq12_g, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSub(this->fq, this->fq_a, this->fq12_h, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSub(this->fq, this->fq_a, this->fq_b, this->fq12_result)); -} - -TEST_F(FfElementTest, FfSubFailsGivenNullPtr) { - EXPECT_EQ(kEpidBadArgErr, - FfSub(nullptr, this->fq_a, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSub(this->fq, nullptr, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSub(this->fq, this->fq_a, nullptr, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfSub(this->fq, this->fq_a, this->fq_b, nullptr)); -} - -TEST_F(FfElementTest, FfSubSucceedsGivenElementZero) { - FqElemStr fq_r_str = {0x0}; - - // additive identity - EXPECT_EQ(kEpidNoErr, - FfSub(this->fq, this->fq_a, this->fq_0, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_a_str, fq_r_str); - - EXPECT_EQ(kEpidNoErr, - FfSub(this->fq, this->fq_0, this->fq_0, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_0_str, fq_r_str); -} - -TEST_F(FfElementTest, FfSubSucceedsGivenTwoEqualElements) { - FqElemStr fq_r_str = {0x0}; - - EXPECT_EQ(kEpidNoErr, - FfSub(this->fq, this->fq_a, this->fq_a, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_0_str, fq_r_str); -} - -TEST_F(FfElementTest, FfSubSucceedsGivenTwoElements) { - FqElemStr fq_r_str = {0x0}; - - EXPECT_EQ(kEpidNoErr, - FfSub(this->fq, this->fq_sum_ab, this->fq_b, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_a_str, fq_r_str); -} - -TEST_F(FfElementTest, FfSubSucceedsGivenTwoElementsFq2) { - FfElementObj a(&this->fq2, &this->bn_a_str, sizeof(this->bn_a_str)); - FfElementObj b(&this->fq2, &this->bn_b_str, sizeof(this->bn_b_str)); - FfElementObj sum_ab(&this->fq2, this->fq2_sum_ab_str); - FfElementObj r(&this->fq2); - - EXPECT_EQ(kEpidNoErr, FfSub(this->fq2, sum_ab, b, r)); - EXPECT_EQ(a, r); -} -TEST_F(FfElementTest, FfSubSucceedsGivenTwoElementsFq6) { - FfElementObj a(&this->fq6, &this->bn_a_str, sizeof(this->bn_a_str)); - FfElementObj b(&this->fq6, &this->bn_b_str, sizeof(this->bn_b_str)); - FfElementObj sum_ab(&this->fq6, this->fq6_sum_ab_str); - FfElementObj r(&this->fq6); - - EXPECT_EQ(kEpidNoErr, FfSub(this->fq6, sum_ab, b, r)); - EXPECT_EQ(a, r); -} -TEST_F(FfElementTest, FfSubSucceedsGivenTwoElementsFq12) { - FfElementObj a(&this->fq12, &this->bn_a_str, sizeof(this->bn_a_str)); - FfElementObj b(&this->fq12, &this->bn_b_str, sizeof(this->bn_b_str)); - FfElementObj sum_ab(&this->fq12, this->fq12_sum_ab_str); - FfElementObj r(&this->fq12); - - EXPECT_EQ(kEpidNoErr, FfSub(this->fq12, sum_ab, b, r)); - EXPECT_EQ(a, r); -} - -//////////////////////////////////////////////// -// FfAdd -TEST_F(FfElementTest, FfAddFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, - FfAdd(this->fq12, this->fq_a, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfAdd(this->fq, this->fq12_g, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfAdd(this->fq, this->fq_a, this->fq12_h, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfAdd(this->fq, this->fq_a, this->fq_b, this->fq12_result)); -} - -TEST_F(FfElementTest, FfAddFailsGivenNullPtr) { - EXPECT_EQ(kEpidBadArgErr, - FfAdd(nullptr, this->fq_a, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfAdd(this->fq, nullptr, this->fq_b, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfAdd(this->fq, this->fq_a, nullptr, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfAdd(this->fq, this->fq_a, this->fq_b, nullptr)); -} - -TEST_F(FfElementTest, FfAddSucceedsGivenElementZero) { - FqElemStr fq_r_str = {0x0}; - - // additive identity - EXPECT_EQ(kEpidNoErr, - FfAdd(this->fq, this->fq_a, this->fq_0, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_a_str, fq_r_str); - - EXPECT_EQ(kEpidNoErr, - FfAdd(this->fq, this->fq_0, this->fq_b, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_b_str, fq_r_str); - - EXPECT_EQ(kEpidNoErr, - FfAdd(this->fq, this->fq_0, this->fq_0, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_0_str, fq_r_str); -} - -TEST_F(FfElementTest, FfAddSucceedsGivenTwoElements) { - FqElemStr fq_r_str = {0x0}; - - EXPECT_EQ(kEpidNoErr, - FfAdd(this->fq, this->fq_a, this->fq_b, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_sum_ab_str, fq_r_str); -} - -TEST_F(FfElementTest, FfAddSucceedsGivenTwoElementsFq2) { - FfElementObj a(&this->fq2, &this->bn_a_str, sizeof(this->bn_a_str)); - FfElementObj b(&this->fq2, &this->bn_b_str, sizeof(this->bn_b_str)); - FfElementObj r(&this->fq2); - - EXPECT_EQ(kEpidNoErr, FfAdd(this->fq2, a, b, r)); - EXPECT_EQ(FfElementObj(&this->fq2, this->fq2_sum_ab_str), r); -} -TEST_F(FfElementTest, FfAddSucceedsGivenTwoElementsFq6) { - FfElementObj a(&this->fq6, &this->bn_a_str, sizeof(this->bn_a_str)); - FfElementObj b(&this->fq6, &this->bn_b_str, sizeof(this->bn_b_str)); - FfElementObj r(&this->fq6); - - EXPECT_EQ(kEpidNoErr, FfAdd(this->fq6, a, b, r)); - EXPECT_EQ(FfElementObj(&this->fq6, this->fq6_sum_ab_str), r); -} -TEST_F(FfElementTest, FfAddSucceedsGivenTwoElementsFq12) { - FfElementObj a(&this->fq12, &this->bn_a_str, sizeof(this->bn_a_str)); - FfElementObj b(&this->fq12, &this->bn_b_str, sizeof(this->bn_b_str)); - FfElementObj r(&this->fq12); - - EXPECT_EQ(kEpidNoErr, FfAdd(this->fq12, a, b, r)); - EXPECT_EQ(FfElementObj(&this->fq12, this->fq12_sum_ab_str), r); -} - -//////////////////////////////////////////////// -// FfInv - -TEST_F(FfElementTest, FfInvFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, FfInv(nullptr, (this->fq_a), this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfInv(this->fq, nullptr, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfInv(this->fq, this->fq_a, nullptr)); -} - -TEST_F(FfElementTest, FfInvFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, FfInv(this->fq12, this->fq_a, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfInv(this->fq, this->fq12_g, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfInv(this->fq, this->fq_a, this->fq12_result)); -} - -TEST_F(FfElementTest, FfInvFailsGivenElementZero) { - EXPECT_EQ(kEpidDivByZeroErr, FfInv(this->fq, this->fq_0, this->fq_result)); -} - -TEST_F(FfElementTest, FfInvSucceedsGivenElementOne) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, FfInv(this->fq, this->fq_1, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_1_str, fq_r_str); -} - -TEST_F(FfElementTest, FfInvSucceedsGivenAnElement) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, FfInv(this->fq, this->fq_a, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_inv_a_str, fq_r_str); -} - -//////////////////////////////////////////////// -// FfExp - -TEST_F(FfElementTest, FfExpFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, - FfExp(nullptr, this->fq_a, this->bn_a, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfExp(this->fq, nullptr, this->bn_a, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfExp(this->fq, this->fq_a, nullptr, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfExp(this->fq, this->fq_a, this->bn_a, nullptr)); -} - -TEST_F(FfElementTest, FfExpFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, - FfExp(this->fq12, this->fq_a, this->bn_0, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfExp(this->fq, this->fq12_g, this->bn_0, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfExp(this->fq, this->fq_a, this->bn_0, this->fq12_result)); -} - -TEST_F(FfElementTest, FfExpSucceedsGivenElementZero) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, - FfExp(this->fq, this->fq_0, this->bn_a, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_0_str, fq_r_str); -} - -TEST_F(FfElementTest, FfExpSucceedsGivenExponentZero) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, - FfExp(this->fq, this->fq_a, this->bn_0, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_1_str, fq_r_str); -} - -TEST_F(FfElementTest, FfExpSucceedsGivenElementOne) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, - FfExp(this->fq, this->fq_1, this->bn_a, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_1_str, fq_r_str); -} - -TEST_F(FfElementTest, FfExpSucceedsGivenExponentOne) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, - FfExp(this->fq, this->fq_a, this->bn_1, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_a_str, fq_r_str); -} - -TEST_F(FfElementTest, FfExpSucceedsGivenAnElement) { - FqElemStr fq_r_str; - - EXPECT_EQ(kEpidNoErr, - FfExp(this->fq, this->fq_a, this->bn_a, this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_exp_ab_str, fq_r_str); - - Fq12ElemStr fq12_r_str; - - BigNumObj bn_pm1(sizeof(this->fp_pm1_str), this->fp_pm1_str); - - EXPECT_EQ(kEpidNoErr, - FfExp(this->fq12, this->fq12_k, bn_pm1, this->fq12_result)); - THROW_ON_EPIDERR(WriteFfElement(this->fq12, this->fq12_result, &fq12_r_str, - sizeof(fq12_r_str))); - EXPECT_EQ(this->fq12_mul_gb_str, fq12_r_str); -} - -//////////////////////////////////////////////// -// FfHash - -TEST_F(FfElementTest, FfHashFailsGivenArgumentsMismatch) { - EXPECT_EQ(kEpidBadArgErr, - FfHash(this->fq12, this->sha_msg, sizeof(this->sha_msg), kSha256, - this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfHash(this->fq, this->sha_msg, sizeof(this->sha_msg), kSha256, - this->fq12_result)); -} - -TEST_F(FfElementTest, FfHashFailsGivenNullPointer) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidBadArgErr, - FfHash(nullptr, msg, sizeof(msg), kSha256, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfHash(this->fq, nullptr, sizeof(msg), kSha256, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfHash(this->fq, msg, sizeof(msg), kSha256, nullptr)); -} - -TEST_F(FfElementTest, FfHashFailsGivenUnsupportedHashAlg) { - uint8_t const msg[] = {0}; - EXPECT_EQ(kEpidHashAlgorithmNotSupported, - FfHash(this->fq, msg, sizeof(msg), kSha512_256, this->fq_result)); - EXPECT_EQ(kEpidHashAlgorithmNotSupported, - FfHash(this->fq, msg, sizeof(msg), kSha3_256, this->fq_result)); - EXPECT_EQ(kEpidHashAlgorithmNotSupported, - FfHash(this->fq, msg, sizeof(msg), kSha3_384, this->fq_result)); - EXPECT_EQ(kEpidHashAlgorithmNotSupported, - FfHash(this->fq, msg, sizeof(msg), kSha3_512, this->fq_result)); -} - -TEST_F(FfElementTest, FfHashFailsGivenIncorrectMsgLen) { - uint8_t const msg[] = {0}; - size_t len_greater_int_max = (size_t)INT_MAX + 1; - EXPECT_EQ(kEpidBadArgErr, FfHash(this->fq, msg, 0, kSha256, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfHash(this->fq, msg, std::numeric_limits::max(), kSha256, - this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfHash(this->fq, msg, len_greater_int_max, kSha256, - this->fq_result)); -} - -TEST_F(FfElementTest, FfHashWorksGivenSHA256HashAlg) { - FqElemStr fq_r_str; - EXPECT_EQ(kEpidNoErr, FfHash(this->fq, sha_msg, sizeof(sha_msg), kSha256, - this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_abc_sha256_str, fq_r_str) - << "FfHash: Hash element does not match to reference value"; -} - -TEST_F(FfElementTest, FfHashWorksGivenSHA384HashAlg) { - FqElemStr fq_r_str; - EXPECT_EQ(kEpidNoErr, FfHash(this->fq, sha_msg, sizeof(sha_msg), kSha384, - this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_abc_sha384_str, fq_r_str) - << "FfHash: Hash element does not match to reference value"; -} - -TEST_F(FfElementTest, FfHashWorksGivenSHA512HashAlg) { - FqElemStr fq_r_str; - EXPECT_EQ(kEpidNoErr, FfHash(this->fq, sha_msg, sizeof(sha_msg), kSha512, - this->fq_result)); - THROW_ON_EPIDERR( - WriteFfElement(this->fq, this->fq_result, &fq_r_str, sizeof(fq_r_str))); - EXPECT_EQ(this->fq_abc_sha512_str, fq_r_str) - << "FfHash: Hash element does not match to reference value"; -} - -//////////////////////////////////////////////// -// FfMultiExp - -TEST_F(FfElementTest, FfMultiExpFailsGivenArgumentsMismatch) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - FfElement const* p12[] = {this->fq12_g, this->fq12_h}; - BigNumStr const* b[] = {&this->bn_0_str, &this->bn_0_str}; - EXPECT_EQ(kEpidBadArgErr, FfMultiExp(this->fq12, p, b, 2, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfMultiExp(this->fq, p12, b, 2, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfMultiExp(this->fq, p, b, 2, this->fq12_result)); -} - -TEST_F(FfElementTest, FfMultiExpFailsGivenNullPointer) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - FfElement const* p_withnull[] = {nullptr, this->fq_b}; - BigNumStr const* b[] = {&fq_multi_exp_exp_2[0], &this->fq_multi_exp_exp_2[1]}; - BigNumStr const* b_withnull[] = {nullptr, &this->fq_multi_exp_exp_2[1]}; - size_t m = 2; - EXPECT_EQ(kEpidBadArgErr, FfMultiExp(nullptr, p, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExp(this->fq, nullptr, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExp(this->fq, p, nullptr, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfMultiExp(this->fq, p, b, m, nullptr)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExp(this->fq, p_withnull, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExp(this->fq, p, b_withnull, m, this->fq_result)); -} - -TEST_F(FfElementTest, FfMultiExpFailsGivenIncorrectMLen) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - BigNumStr const* b[] = {&this->fq_multi_exp_exp_2[0], - &this->fq_multi_exp_exp_2[1]}; - size_t len_greater_int_max = (size_t)INT_MAX + 1; - EXPECT_EQ(kEpidBadArgErr, FfMultiExp(this->fq, p, b, 0, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExp(this->fq, p, b, std::numeric_limits::max(), - this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExp(this->fq, p, b, len_greater_int_max, this->fq_result)); -} - -TEST_F(FfElementTest, FfMultiExpWorksGivenOneExponent) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[1]; - FfElement const* p[1]; - BigNumStr const* b[1]; - int m = 0; - // prepare data for test - for (m = 0; m < 1; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_1[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_1[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExp(this->fq, p, b, 1, r)); - // verify calculation is correct - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_1), r) - << "FfMultiExp: Finite field element does not match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpWorksGivenTwoExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[2]; - FfElement const* p[2]; - BigNumStr const* b[2]; - int m = 0; - // prepare data for test - for (m = 0; m < 2; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_2[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_2[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExp(this->fq, p, b, 2, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_2), r) - << "FfMultiExp: Finite field element does not match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpWorksGivenThreeExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[3]; - FfElement const* p[3]; - BigNumStr const* b[3]; - int m = 0; - // prepare data for test - for (m = 0; m < 3; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_3[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_3[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExp(this->fq, p, b, 3, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_3), r) - << "FfMultiExp: Finite field element does not match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpWorksGivenFourExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[4]; - FfElement const* p[4]; - BigNumStr const* b[4]; - int m = 0; - // prepare data for test - for (m = 0; m < 4; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_4[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_4[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExp(this->fq, p, b, 4, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_4), r) - << "FfMultiExp: Finite field element does not match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpWorksGivenFourFq12Exponents) { - FfElementObj r12(&this->fq12); - FfElementObj fq12_exp[4]; - FfElement const* p[4]; - BigNumStr const* b[4]; - int m = 0; - // prepare data for test - for (m = 0; m < 4; m++) { - fq12_exp[m] = FfElementObj(&this->fq12, this->fq12_multi_exp_base_4[m]); - // initialize data for test - p[m] = fq12_exp[m]; - b[m] = &this->fq12_multi_exp_exp_4[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExp(this->fq12, p, b, 4, r12)); - EXPECT_EQ(FfElementObj(&this->fq12, this->fq12_multi_exp_res_4), r12) - << "FfMultiExp: Finite field element does not match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpWorksGivenFiveExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[5]; - FfElement const* p[5]; - BigNumStr const* b[5]; - int m = 0; - // prepare data for test - for (m = 0; m < 5; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_5[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_5[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExp(this->fq, p, b, 5, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_5), r) - << "FfMultiExp: Finite field element does not match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpWorksGivenSixExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[6]; - FfElement const* p[6]; - BigNumStr const* b[6]; - int m = 0; - // prepare data for test - for (m = 0; m < 6; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_6[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_6[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExp(this->fq, p, b, 6, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_6), r) - << "FfMultiExp: Finite field element does not match with reference value"; -} - -/////////////////////////////////////////////////////////////////////// -// FfMultiExpBn - -TEST_F(FfElementTest, FfMultiExpBnFailsGivenArgumentsMismatch) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - FfElement const* p12[] = {this->fq12_g, this->fq12_h}; - BigNum const* b[] = {bn_0, bn_0}; - EXPECT_EQ(kEpidBadArgErr, FfMultiExpBn(this->fq12, p, b, 2, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfMultiExpBn(this->fq, p12, b, 2, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfMultiExpBn(this->fq, p, b, 2, this->fq12_result)); -} - -TEST_F(FfElementTest, FfMultiExpBnFailsGivenNullPointer) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - FfElement const* p_withnull[] = {nullptr, this->fq_b}; - BigNumObj bn_exp_0(this->fq_multi_exp_exp_2[0]); - BigNumObj bn_exp_1(this->fq_multi_exp_exp_2[1]); - BigNum const* b[] = {bn_exp_0, bn_exp_1}; - BigNum const* b_withnull[] = {nullptr, bn_exp_1}; - size_t m = 2; - EXPECT_EQ(kEpidBadArgErr, FfMultiExpBn(nullptr, p, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExpBn(this->fq, nullptr, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExpBn(this->fq, p, nullptr, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfMultiExpBn(this->fq, p, b, m, nullptr)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExpBn(this->fq, p_withnull, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExpBn(this->fq, p, b_withnull, m, this->fq_result)); -} - -TEST_F(FfElementTest, FfMultiExpBnFailsGivenIncorrectMLen) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - BigNumObj bn_exp_0(this->fq_multi_exp_exp_2[0]); - BigNumObj bn_exp_1(this->fq_multi_exp_exp_2[1]); - BigNum const* b[] = {bn_exp_0, bn_exp_1}; - size_t len_greater_int_max = (size_t)INT_MAX + 1; - EXPECT_EQ(kEpidBadArgErr, FfMultiExpBn(this->fq, p, b, 0, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExpBn(this->fq, p, b, std::numeric_limits::max(), - this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfMultiExpBn(this->fq, p, b, len_greater_int_max, this->fq_result)); -} - -TEST_F(FfElementTest, FfMultiExpBnWorksGivenOneExponent) { - const int items = 1; - FfElementObj r(&this->fq); - FfElementObj fq_base[1]; - BigNumObj bn_exp[1]; - FfElement const* p[1]; - BigNum const* b[1]; - int m = 0; - // prepare data for test - for (m = 0; m < items; m++) { - fq_base[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_1[m]); - bn_exp[m] = BigNumObj(this->fq_multi_exp_exp_1[m]); - // initialize data for test - p[m] = fq_base[m]; - b[m] = bn_exp[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExpBn(this->fq, p, b, items, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_1), r) - << "FfMultiExpBn: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpBnWorksGivenTwoExponents) { - const int items = 2; - FfElementObj r(&this->fq); - FfElementObj fq_base[2]; - BigNumObj bn_exp[2]; - FfElement const* p[2]; - BigNum const* b[2]; - int m = 0; - // prepare data for test - for (m = 0; m < items; m++) { - fq_base[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_2[m]); - bn_exp[m] = BigNumObj(this->fq_multi_exp_exp_2[m]); - // initialize data for test - p[m] = fq_base[m]; - b[m] = bn_exp[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExpBn(this->fq, p, b, items, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_2), r) - << "FfMultiExpBn: Finite field element does not " - "match with reference value"; -} -TEST_F(FfElementTest, FfMultiExpBnWorksGivenThreeExponents) { - const int items = 3; - FfElementObj r(&this->fq); - FfElementObj fq_base[3]; - BigNumObj bn_exp[3]; - FfElement const* p[3]; - BigNum const* b[3]; - int m = 0; - // prepare data for test - for (m = 0; m < items; m++) { - fq_base[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_3[m]); - bn_exp[m] = BigNumObj(this->fq_multi_exp_exp_3[m]); - // initialize data for test - p[m] = fq_base[m]; - b[m] = bn_exp[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExpBn(this->fq, p, b, items, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_3), r) - << "FfMultiExpBn: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpBnWorksGivenFourExponents) { - const int items = 4; - FfElementObj r(&this->fq); - FfElementObj fq_base[4]; - BigNumObj bn_exp[4]; - FfElement const* p[4]; - BigNum const* b[4]; - int m = 0; - // prepare data for test - for (m = 0; m < items; m++) { - fq_base[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_4[m]); - bn_exp[m] = BigNumObj(this->fq_multi_exp_exp_4[m]); - // initialize data for test - p[m] = fq_base[m]; - b[m] = bn_exp[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExpBn(this->fq, p, b, items, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_4), r) - << "FfMultiExpBn: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, DISABLED_FfMultiExpBnWorksGivenFourFq12Exponents) { - const int items = 4; - FfElementObj fq12_r(&this->fq12); - FfElementObj fq12_base[4]; - BigNumObj fq12_bn_exp[4]; - FfElement const* fq12_p[4]; - BigNum const* fq12_b[4]; - int m = 0; - // prepare data for test - for (m = 0; m < items; m++) { - fq12_base[m] = FfElementObj(&this->fq12, this->fq12_multi_exp_base_4[m]); - fq12_bn_exp[m] = BigNumObj(this->fq12_multi_exp_exp_4[m]); - // initialize data for test - fq12_p[m] = fq12_base[m]; - fq12_b[m] = fq12_bn_exp[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, - FfMultiExpBn(this->fq12, fq12_p, fq12_b, items, fq12_r)); - EXPECT_EQ(FfElementObj(&this->fq12, this->fq_multi_exp_res_4), fq12_r) - << "FfMultiExpBn: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpBnWorksGivenFiveExponents) { - const int items = 5; - FfElementObj r(&this->fq); - FfElementObj fq_base[5]; - BigNumObj bn_exp[5]; - FfElement const* p[5]; - BigNum const* b[5]; - int m = 0; - // prepare data for test - for (m = 0; m < items; m++) { - fq_base[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_5[m]); - bn_exp[m] = BigNumObj(this->fq_multi_exp_exp_5[m]); - // initialize data for test - p[m] = fq_base[m]; - b[m] = bn_exp[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExpBn(this->fq, p, b, items, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_5), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpBnWorksGivenSixExponents) { - const int items = 6; - FfElementObj r(&this->fq); - FfElementObj fq_base[6]; - BigNumObj bn_exp[6]; - FfElement const* p[6]; - BigNum const* b[6]; - int m = 0; - // prepare data for test - for (m = 0; m < items; m++) { - fq_base[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_6[m]); - bn_exp[m] = BigNumObj(this->fq_multi_exp_exp_6[m]); - // initialize data for test - p[m] = fq_base[m]; - b[m] = bn_exp[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExpBn(this->fq, p, b, items, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_6), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, FfMultiExpBnWorksOverEpid11GT) { - const int items = 3; - FfElementObj r(&this->epid11_GT); - FfElementObj ff_base[3]; - BigNumObj bn_exp[3]; - FfElement const* p[3]; - BigNum const* b[3]; - int m = 0; - // prepare data for test - for (m = 0; m < items; m++) { - ff_base[m] = - FfElementObj(&this->epid11_GT, this->epid11_GT_multi_exp_base_3[m]); - bn_exp[m] = BigNumObj(this->epid11_GT_multi_exp_exp_3[m]); - // initialize data for test - p[m] = ff_base[m]; - b[m] = bn_exp[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfMultiExpBn(this->epid11_GT, p, b, items, r)); - EXPECT_EQ(FfElementObj(&this->epid11_GT, this->epid11_GT_multi_exp_res_3), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} - -/////////////////////////////////////////////////////////////////////// -// FfSscmMultiExp - -TEST_F(FfElementTest, SscmFfMultiExpFailsGivenArgumentsMismatch) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - FfElement const* p12[] = {this->fq12_g, this->fq12_h}; - BigNumStr const* b[] = {&this->bn_0_str, &this->bn_0_str}; - EXPECT_EQ(kEpidBadArgErr, - FfSscmMultiExp(this->fq12, p, b, 2, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSscmMultiExp(this->fq, p12, b, 2, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSscmMultiExp(this->fq, p, b, 2, this->fq12_result)); -} - -TEST_F(FfElementTest, SscmFfMultiExpFailsGivenNullPointer) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - FfElement const* p_withnull[] = {nullptr, this->fq_b}; - BigNumStr const* b[] = {&this->fq_multi_exp_exp_2[0], - &this->fq_multi_exp_exp_2[1]}; - BigNumStr const* b_withnull[] = {nullptr, &this->fq_multi_exp_exp_2[1]}; - size_t m = 2; - EXPECT_EQ(kEpidBadArgErr, FfSscmMultiExp(nullptr, p, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSscmMultiExp(this->fq, nullptr, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSscmMultiExp(this->fq, p, nullptr, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfSscmMultiExp(this->fq, p, b, m, nullptr)); - EXPECT_EQ(kEpidBadArgErr, - FfSscmMultiExp(this->fq, p_withnull, b, m, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSscmMultiExp(this->fq, p, b_withnull, m, this->fq_result)); -} - -TEST_F(FfElementTest, SscmFfMultiExpFailsGivenIncorrectMLen) { - FfElement const* p[] = {this->fq_a, this->fq_b}; - BigNumStr const* b[] = {&this->fq_multi_exp_exp_2[0], - &this->fq_multi_exp_exp_2[1]}; - size_t len_greater_int_max = (size_t)INT_MAX + 1; - EXPECT_EQ(kEpidBadArgErr, FfSscmMultiExp(this->fq, p, b, 0, this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfSscmMultiExp(this->fq, p, b, std::numeric_limits::max(), - this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, FfSscmMultiExp(this->fq, p, b, len_greater_int_max, - this->fq_result)); -} - -TEST_F(FfElementTest, SscmFfMultiExpWorksGivenOneExponent) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[1]; - FfElement const* p[1]; - BigNumStr const* b[1]; - int m = 0; - // prepare data for test - for (m = 0; m < 1; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_1[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_1[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfSscmMultiExp(this->fq, p, b, 1, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_1), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, SscmFfMultiExpWorksGivenTwoExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[2]; - FfElement const* p[2]; - BigNumStr const* b[2]; - int m = 0; - // prepare data for test - for (m = 0; m < 2; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_2[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_2[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfSscmMultiExp(this->fq, p, b, 2, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_2), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, SscmFfMultiExpWorksGivenThreeExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[3]; - FfElement const* p[3]; - BigNumStr const* b[3]; - int m = 0; - // prepare data for test - for (m = 0; m < 3; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_3[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_3[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfSscmMultiExp(this->fq, p, b, 3, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_3), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, SscmFfMultiExpWorksGivenFourExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[4]; - FfElement const* p[4]; - BigNumStr const* b[4]; - int m = 0; - // prepare data for test - for (m = 0; m < 4; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_4[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_4[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfSscmMultiExp(this->fq, p, b, 4, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_4), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, SscmFfMultiExpWorksGivenFourFq12Exponents) { - FfElementObj r12(&this->fq12); - FfElementObj fq12_exp[4]; - FfElement const* p[4]; - BigNumStr const* b[4]; - int m = 0; - // prepare data for test - for (m = 0; m < 4; m++) { - fq12_exp[m] = FfElementObj(&this->fq12, this->fq12_multi_exp_base_4[m]); - // initialize data for test - p[m] = fq12_exp[m]; - b[m] = &this->fq12_multi_exp_exp_4[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfSscmMultiExp(this->fq12, p, b, 4, r12)); - EXPECT_EQ(FfElementObj(&this->fq12, this->fq12_multi_exp_res_4), r12) - << "FfSscmMultiExp: Finite field element does not match with reference " - "value"; -} - -TEST_F(FfElementTest, SscmFfMultiExpWorksGivenFiveExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[5]; - FfElement const* p[5]; - BigNumStr const* b[5]; - int m = 0; - // prepare data for test - for (m = 0; m < 5; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_5[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_5[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfSscmMultiExp(this->fq, p, b, 5, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_5), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} - -TEST_F(FfElementTest, SscmFfMultiExpWorksGivenSixExponents) { - FfElementObj r(&this->fq); - FfElementObj fq_exp[6]; - FfElement const* p[6]; - BigNumStr const* b[6]; - int m = 0; - // prepare data for test - for (m = 0; m < 6; m++) { - fq_exp[m] = FfElementObj(&this->fq, this->fq_multi_exp_base_6[m]); - // initialize data for test - p[m] = fq_exp[m]; - b[m] = &this->fq_multi_exp_exp_6[m]; - } - // do test - EXPECT_EQ(kEpidNoErr, FfSscmMultiExp(this->fq, p, b, 6, r)); - EXPECT_EQ(FfElementObj(&this->fq, this->fq_multi_exp_res_6), r) - << "FfSscmMultiExp: Finite field element does not " - "match with reference value"; -} -//////////////////////////////////////////////// -// FfGetRandom - -TEST_F(FfElementTest, FfGetRandomFailsGivenArgumentsMismatch) { - Prng my_prng; - EXPECT_EQ(kEpidBadArgErr, - FfGetRandom(this->fq12, &this->bn_1_str, &Prng::Generate, &my_prng, - this->fq_result)); - EXPECT_EQ(kEpidBadArgErr, - FfGetRandom(this->fq, &this->bn_1_str, &Prng::Generate, &my_prng, - this->fq12_result)); -} - -TEST_F(FfElementTest, FfGetRandomFailsGivenNullPtr) { - Prng my_prng; - FfElementObj r(&this->fq); - EXPECT_EQ(kEpidBadArgErr, FfGetRandom(nullptr, &this->bn_1_str, - &Prng::Generate, &my_prng, r)); - EXPECT_EQ(kEpidBadArgErr, - FfGetRandom(this->fq, nullptr, &Prng::Generate, &my_prng, r)); - EXPECT_EQ(kEpidBadArgErr, - FfGetRandom(this->fq, &this->bn_1_str, nullptr, &my_prng, r)); - EXPECT_EQ(kEpidBadArgErr, FfGetRandom(this->fq, &this->bn_1_str, - &Prng::Generate, &my_prng, nullptr)); -} -TEST_F(FfElementTest, FfGetRandomSucceedsGivenFq2) { - Prng my_prng; - FfElementObj r(&this->fq2); - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq2, &this->bn_1_str, &Prng::Generate, - &my_prng, r)); -} -TEST_F(FfElementTest, FfGetRandomSucceedsGivenFq6) { - Prng my_prng; - FfElementObj r(&this->fq6); - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq6, &this->bn_1_str, &Prng::Generate, - &my_prng, r)); -} -TEST_F(FfElementTest, FfGetRandomSucceedsGivenFq12) { - Prng my_prng; - FfElementObj r(&this->fq12); - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq12, &this->bn_1_str, - &Prng::Generate, &my_prng, r)); -} - -TEST_F(FfElementTest, FfGetRandomSuccedsGivenLowBound) { - Prng my_prng; - FfElementObj r(&this->fq); - FqElemStr buf; - unsigned int result; - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq, &this->bn_1_str, &Prng::Generate, - &my_prng, r)); - THROW_ON_EPIDERR(WriteFfElement(this->fq, r, &buf, sizeof(buf))); - THROW_ON_EPIDERR(Cmp_OctStr256(&this->bn_1_str.data, &buf.data, &result)); - EXPECT_EQ(result, (unsigned int)2); - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq, &this->bn_2_str, &Prng::Generate, - &my_prng, r)); - THROW_ON_EPIDERR(WriteFfElement(this->fq, r, &buf, sizeof(buf))); - THROW_ON_EPIDERR(Cmp_OctStr256(&this->bn_2_str.data, &buf.data, &result)); - EXPECT_EQ(result, (unsigned int)2); - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq, &this->bn_0xffff_str, - &Prng::Generate, &my_prng, r)); - THROW_ON_EPIDERR(WriteFfElement(this->fq, r, &buf, sizeof(buf))); - THROW_ON_EPIDERR( - Cmp_OctStr256(&this->bn_0xffff_str.data, &buf.data, &result)); - EXPECT_EQ(result, (unsigned int)2); - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq, &this->bn_0xffff_str, - &Prng::Generate, &my_prng, r)); - THROW_ON_EPIDERR(WriteFfElement(this->fq, r, &buf, sizeof(buf))); - THROW_ON_EPIDERR( - Cmp_OctStr256(&this->bn_0xffff_str.data, &buf.data, &result)); - EXPECT_EQ(result, (unsigned int)2); -} - -TEST_F(FfElementTest, FfGetRandomGeneratesDifferentNumbers) { - Prng my_prng; - FfElementObj r1(&this->fq); - FfElementObj r2(&this->fq); - bool result; - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq, &this->bn_1_str, &Prng::Generate, - &my_prng, r1)); - EXPECT_EQ(kEpidNoErr, FfGetRandom(this->fq, &this->bn_1_str, &Prng::Generate, - &my_prng, r2)); - THROW_ON_EPIDERR(FfIsEqual(this->fq, r1, r2, &result)); - EXPECT_FALSE(result); -} -TEST_F(FfElementTest, FfGetRandomFailsOnMaxIterGivenLargeLowBound) { - Prng my_prng; - FfElementObj r(&this->fq); - // FfGetRandom generates random data between [low_bound, modulus-1] - // modulus in this case is Intel(R) EPID 2.0 parameter q - // giving low_bound = modulus - {0x30, 0x13} should get kEpidRandMaxIterErr - EXPECT_EQ(kEpidRandMaxIterErr, FfGetRandom(this->fq, &this->fq_qm0x3013_str, - &Prng::Generate, &my_prng, r)); -} - -//////////////////////////////////////////////// -// FfSqrt -TEST_F(FfElementTest, FfSqrtFailsGivenNullPtr) { - FfElementObj r(&this->fq); - EXPECT_EQ(kEpidBadArgErr, FfSqrt(nullptr, this->fq_4, r)); - EXPECT_EQ(kEpidBadArgErr, FfSqrt(this->fq, nullptr, r)); - EXPECT_EQ(kEpidBadArgErr, FfSqrt(this->fq, this->fq_4, nullptr)); -} - -TEST_F(FfElementTest, FfSqrtWorksForOne) { - FfElementObj r(&this->fq); - FfElementObj s(&this->fq); - EXPECT_EQ(kEpidNoErr, FfSqrt(this->fq, this->fq_1, r)); - EXPECT_EQ(this->fq_1, r); -} - -TEST_F(FfElementTest, FfSqrtFailsForTwo) { - FfElementObj r(&this->fq); - EXPECT_EQ(kEpidMathQuadraticNonResidueError, FfSqrt(this->fq, this->fq_2, r)); -} - -TEST_F(FfElementTest, FfSqrtFailsForThree) { - FfElementObj r(&this->fq); - EXPECT_EQ(kEpidMathQuadraticNonResidueError, FfSqrt(this->fq, this->fq_3, r)); -} - -TEST_F(FfElementTest, FfSqrtWorksForFour) { - FfElementObj r(&this->fq); - EXPECT_EQ(kEpidNoErr, FfSqrt(this->fq, this->fq_4, r)); - EXPECT_EQ(this->fq_qm2, r); -} - -TEST_F(FfElementTest, FfSqrtFailsForFive) { - FfElementObj r(&this->fq); - EXPECT_EQ(kEpidMathQuadraticNonResidueError, FfSqrt(this->fq, this->fq_5, r)); -} - -TEST_F(FfElementTest, FfSqrtWorksForEpid11Prime) { - // given b_str value ensure sqrt algorithm step 7 if clause is triggered - const BigNumStr b_str = {0x06, 0xc1, 0x26, 0xe8, 0xa5, 0xa5, 0x21, 0x19, - 0x07, 0x42, 0x49, 0x77, 0x7c, 0x5c, 0x98, 0x7f, - 0xd4, 0x0c, 0x42, 0xf5, 0x25, 0x2c, 0xac, 0xb9, - 0x7e, 0x09, 0x70, 0xf0, 0x84, 0x3b, 0x81, 0x46}; - FfElementObj b(&this->epid11_fq, &b_str, sizeof((b_str))); - - FfElementObj r(&this->epid11_fq); - FfElementObj s(&this->epid11_fq); - FfElementObj r2(&this->epid11_fq); - - EXPECT_EQ(kEpidNoErr, FfMul(this->epid11_fq, b, b, s)); - EXPECT_EQ(kEpidNoErr, FfSqrt(this->epid11_fq, s, r)); - EXPECT_EQ(kEpidNoErr, FfMul(this->epid11_fq, r, r, r2)); - EXPECT_EQ(s, r2); -} - -TEST_F(FfElementTest, FfSqrtReturnsARoot) { - Prng my_prng; - FfElementObj r(&this->fq); - FfElementObj b(&this->fq); - FfElementObj s(&this->fq); - FfElementObj r2(&this->fq); - unsigned int i; - for (i = 0; i < 1000; i++) { - ASSERT_EQ(kEpidNoErr, FfGetRandom(this->fq, &this->bn_2_str, - &Prng::Generate, &my_prng, b)); - ASSERT_EQ(kEpidNoErr, FfMul(this->fq, b, b, s)); - ASSERT_EQ(kEpidNoErr, FfSqrt(this->fq, s, r)); - ASSERT_EQ(kEpidNoErr, FfMul(this->fq, r, r, r2)); - ASSERT_EQ(s, r2); - } -} - -TEST_F(FfElementTest, FfSqrtReturnsARootInEpid11) { - Prng my_prng; - FfElementObj r(&this->epid11_fq); - FfElementObj b(&this->epid11_fq); - FfElementObj s(&this->epid11_fq); - FfElementObj r2(&this->epid11_fq); - unsigned int i; - for (i = 0; i < 1000; i++) { - ASSERT_EQ(kEpidNoErr, FfGetRandom(this->epid11_fq, &this->bn_2_str, - &Prng::Generate, &my_prng, b)); - ASSERT_EQ(kEpidNoErr, FfMul(this->epid11_fq, b, b, s)); - ASSERT_EQ(kEpidNoErr, FfSqrt(this->epid11_fq, s, r)); - ASSERT_EQ(kEpidNoErr, FfMul(this->epid11_fq, r, r, r2)); - ASSERT_EQ(s, r2); - } -} - -TEST_F(FfElementTest, FfSqrtReturnsARoot224Prime) { - const BigNumStr prime_224r1 = { - 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; - FiniteFieldObj f_q(prime_224r1); - - Prng my_prng; - FfElementObj r(&f_q); - FfElementObj b(&f_q); - FfElementObj s(&f_q); - FfElementObj r2(&f_q); - unsigned int i; - for (i = 0; i < 100; i++) { - EXPECT_EQ(kEpidNoErr, - FfGetRandom(f_q, &this->bn_2_str, &Prng::Generate, &my_prng, b)); - EXPECT_EQ(kEpidNoErr, FfMul(f_q, b, b, s)); - EXPECT_EQ(kEpidNoErr, FfSqrt(f_q, s, r)); - EXPECT_EQ(kEpidNoErr, FfMul(f_q, r, r, r2)); - EXPECT_EQ(s, r2); - } -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/finitefield-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/finitefield-test.cc deleted file mode 100644 index badce2c964..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/finitefield-test.cc +++ /dev/null @@ -1,251 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief FiniteField unit tests. - */ - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/finitefield.h" -} - -#ifndef COUNT_OF -#define COUNT_OF(a) (sizeof(a) / sizeof((a)[0])) -#endif // COUNT_OF - -namespace { -/// Intel(R) EPID 2.0 parameters q, beta, xi and v -BigNumStr q = {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, - 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, - 0x12, 0x98, 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, - 0x30, 0x13}}; -FqElemStr beta = {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, - 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, - 0x12, 0x98, 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, - 0x30, 0x12}}; -Fq2ElemStr xi = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}}}; -Fq6ElemStr v = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}; - -FqElemStr qnr = {{0x08, 0x66, 0xA7, 0x67, 0x36, 0x6E, 0x62, 0x71, 0xB7, 0xA6, - 0x52, 0x94, 0x8F, 0xFB, 0x25, 0x9E, 0xE6, 0x4F, 0x25, 0xE5, - 0x26, 0x9A, 0x2B, 0x6E, 0x7E, 0xF8, 0xA6, 0x39, 0xAE, 0x46, - 0xAA, 0x24}}; - -const BigNumStr coeffs[3] = { - {{{0x02, 0x16, 0x7A, 0x61, 0x53, 0xDD, 0xF6, 0xE2, 0x89, 0x15, 0xA0, 0x94, - 0xF1, 0xB5, 0xDC, 0x65, 0x21, 0x15, 0x62, 0xE1, 0x7D, 0xC5, 0x43, 0x89, - 0xEE, 0xB4, 0xEF, 0xC8, 0xA0, 0x8E, 0x34, 0x0F}}}, - - {{{0x04, 0x82, 0x27, 0xE1, 0xEB, 0x98, 0x64, 0xC2, 0x8D, 0x8F, 0xDD, 0x0E, - 0x82, 0x40, 0xAE, 0xD4, 0x31, 0x63, 0xD6, 0x46, 0x32, 0x16, 0x85, 0x7A, - 0xB7, 0x18, 0x68, 0xB8, 0x17, 0x02, 0x81, 0xA6}}}, - - {{{0x06, 0x20, 0x76, 0xE8, 0x54, 0x54, 0x53, 0xB4, 0xA9, 0xD8, 0x44, 0x4B, - 0xAA, 0xFB, 0x1C, 0xFD, 0xAE, 0x15, 0xCA, 0x29, 0x79, 0xA6, 0x24, 0xA4, - 0x0A, 0xF6, 0x1E, 0xAC, 0xED, 0xFB, 0x10, 0x41}}}}; - -TEST(FiniteField, DeleteWorksGivenNewlyCreatedFiniteField) { - FiniteField* finitefield = nullptr; - EpidStatus sts = NewFiniteField(&q, &finitefield); - EXPECT_EQ(kEpidNoErr, sts); - EXPECT_NO_THROW(DeleteFiniteField(&finitefield)); -} -TEST(FiniteField, DeleteWorksGivenNullPointer) { - EXPECT_NO_THROW(DeleteFiniteField(nullptr)); - FiniteField* finitefield = nullptr; - EXPECT_NO_THROW(DeleteFiniteField(&finitefield)); -} -TEST(FiniteField, NewFailsGivenNullBigNumStr) { - FiniteField* finitefield = nullptr; - EpidStatus sts = NewFiniteField(nullptr, &finitefield); - EXPECT_EQ(kEpidBadArgErr, sts); - DeleteFiniteField(&finitefield); -} - -TEST(FiniteField, NewFailsGivenNullFiniteField) { - EpidStatus sts = NewFiniteField(&q, nullptr); - EXPECT_EQ(kEpidBadArgErr, sts); -} - -TEST(FiniteField, NewSucceedsGivenNewlyCreatedBigNumStr) { - FiniteField* finitefield = nullptr; - EpidStatus sts = NewFiniteField(&q, &finitefield); - EXPECT_EQ(kEpidNoErr, sts); - DeleteFiniteField(&finitefield); -} - -// the following test reproduces a bug in IPP. -TEST(FiniteField, DISABLED_NewSucceedsGivenAllFFBigNumStr) { - const BigNumStr test_prime = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; - FiniteField* finitefield = nullptr; - EpidStatus sts = NewFiniteField(&test_prime, &finitefield); - EXPECT_EQ(kEpidNoErr, sts); - DeleteFiniteField(&finitefield); -} - -TEST(FiniteField, BinomialExtensionFailsGivenNullPointer) { - FiniteField* binom_ext_finite_field_ptr = nullptr; - FiniteFieldObj ground_field(q); - FfElementObj ground_element(&ground_field, beta); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaBinomalExtension(nullptr, ground_element, 2, - &binom_ext_finite_field_ptr)); - DeleteFiniteField(&binom_ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaBinomalExtension(ground_field, nullptr, 2, - &binom_ext_finite_field_ptr)); - DeleteFiniteField(&binom_ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, NewFiniteFieldViaBinomalExtension( - ground_field, ground_element, 2, nullptr)); -} - -TEST(FiniteField, BinomialExtensionFailsGivenBadDegree) { - FiniteField* binom_ext_finite_field_ptr = nullptr; - FiniteFieldObj ground_field(q); - FfElementObj ground_element(&ground_field, beta); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaBinomalExtension(ground_field, ground_element, 1, - &binom_ext_finite_field_ptr)); - DeleteFiniteField(&binom_ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaBinomalExtension(ground_field, ground_element, 0, - &binom_ext_finite_field_ptr)); - DeleteFiniteField(&binom_ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaBinomalExtension(ground_field, ground_element, -1, - &binom_ext_finite_field_ptr)); - DeleteFiniteField(&binom_ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaBinomalExtension(ground_field, ground_element, -99, - &binom_ext_finite_field_ptr)); - DeleteFiniteField(&binom_ext_finite_field_ptr); -} - -TEST(FiniteField, BinomialExtensionCanBuildEpid2GtField) { - // construct Fq finite field - FiniteFieldObj fq(q); - - // construct Fq^2 finite field - FfElementObj neg_beta(&fq); - THROW_ON_EPIDERR(FfNeg(fq, FfElementObj(&fq, beta), neg_beta)); - FiniteFieldObj fq2(fq, neg_beta, 2); - - // construct Fq^6 finite field - FfElementObj neg_xi(&fq2); - THROW_ON_EPIDERR(FfNeg(fq2, FfElementObj(&fq2, xi), neg_xi)); - FiniteFieldObj fq6(fq2, neg_xi, 3); - - // construct Fq^12 finite field - FfElementObj neg_v(&fq6); - THROW_ON_EPIDERR(FfNeg(fq6, FfElementObj(&fq6, v), neg_v)); - FiniteFieldObj fq12(fq6, neg_v, 2); - - FiniteField* binom_ext_fq12_ptr = nullptr; - EXPECT_EQ(kEpidNoErr, NewFiniteFieldViaBinomalExtension(fq6, neg_v, 2, - &binom_ext_fq12_ptr)); - DeleteFiniteField(&binom_ext_fq12_ptr); -} - -TEST(FiniteField, PolynomialExtensionFailsGivenNullPointer) { - FiniteField* ext_finite_field_ptr = nullptr; - FiniteFieldObj ground_field(q); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaPolynomialExtension( - nullptr, coeffs, COUNT_OF(coeffs), &ext_finite_field_ptr)); - DeleteFiniteField(&ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaPolynomialExtension(ground_field, nullptr, 2, - &ext_finite_field_ptr)); - DeleteFiniteField(&ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, NewFiniteFieldViaPolynomialExtension( - ground_field, coeffs, 2, nullptr)); -} - -TEST(FiniteField, PolynomialExtensionFailsGivenBadDegree) { - FiniteField* ext_finite_field_ptr = nullptr; - FiniteFieldObj ground_field(q); - FfElementObj ground_element(&ground_field, beta); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaPolynomialExtension(ground_field, coeffs, 0, - &ext_finite_field_ptr)); - DeleteFiniteField(&ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaPolynomialExtension(ground_field, coeffs, -1, - &ext_finite_field_ptr)); - DeleteFiniteField(&ext_finite_field_ptr); - EXPECT_EQ(kEpidBadArgErr, - NewFiniteFieldViaPolynomialExtension(ground_field, coeffs, -99, - &ext_finite_field_ptr)); - DeleteFiniteField(&ext_finite_field_ptr); -} - -TEST(FiniteField, CanBuildEpid11GtField) { - // construct Fq finite field - FiniteFieldObj fq(q); - - // construct Fqd finite field - FiniteFieldObj fqd(fq, coeffs, COUNT_OF(coeffs)); - - // Fqk ground element is {-qnr, 0, 0} - FfElementObj neg_qnr(&fq); - THROW_ON_EPIDERR(FfNeg(fq, FfElementObj(&fq, qnr), neg_qnr)); - Fq3ElemStr ground_element_str = {0}; - THROW_ON_EPIDERR(WriteFfElement(fq, neg_qnr, &ground_element_str.a[0], - sizeof(ground_element_str.a[0]))); - FfElementObj ground_element(&fqd, ground_element_str); - - // construct Fqk finite field - FiniteField* gt_ptr = nullptr; - EXPECT_EQ(kEpidNoErr, - NewFiniteFieldViaBinomalExtension(fqd, ground_element, 2, >_ptr)); - DeleteFiniteField(>_ptr); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/hash-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/hash-test.cc deleted file mode 100644 index eea7d08912..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/hash-test.cc +++ /dev/null @@ -1,87 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Hash unit tests. - */ - -#include -#include -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" - -extern "C" { -#include "epid/common/math/hash.h" -} - -/// compares Sha256Digest values -bool operator==(Sha256Digest const& lhs, Sha256Digest const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -namespace { - -/////////////////////////////////////////////////////////////////////// -// SHA256 -TEST(Hash, Sha256MessageDigestFailsGivenNullPtr) { - char msg[] = "abc"; - Sha256Digest digest; - - EXPECT_EQ(kEpidBadArgErr, - Sha256MessageDigest(nullptr, sizeof(msg) - 1, &digest)); - EXPECT_EQ(kEpidBadArgErr, Sha256MessageDigest(msg, sizeof(msg) - 1, nullptr)); -} - -TEST(Hash, Sha256MessageDigestFailsGivenInvalidBufferSize) { - char msg[] = "abc"; - Sha256Digest digest; - - EXPECT_EQ( - kEpidBadArgErr, - Sha256MessageDigest(msg, std::numeric_limits::max(), &digest)); -#if (SIZE_MAX >= 0x100000001) // When size_t value allowed to be 0x100000001 - EXPECT_EQ(kEpidBadArgErr, Sha256MessageDigest(msg, 0x100000001, &digest)); -#endif -} - -TEST(Hash, Sha256MessageDigestComputesCorrectDigest) { - // Test vectors here are taken from - // http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/SHA256.pdf - - Sha256Digest digest; - - char msg_abc[] = "abc"; - Sha256Digest digest_abc = {{0xBA, 0x78, 0x16, 0xBF, 0x8F, 0x01, 0xCF, 0xEA, - 0x41, 0x41, 0x40, 0xDE, 0x5D, 0xAE, 0x22, 0x23, - 0xB0, 0x03, 0x61, 0xA3, 0x96, 0x17, 0x7A, 0x9C, - 0xB4, 0x10, 0xFF, 0x61, 0xF2, 0x00, 0x15, 0xAD}}; - EXPECT_EQ(kEpidNoErr, - Sha256MessageDigest(msg_abc, sizeof(msg_abc) - 1, &digest)); - EXPECT_EQ(digest_abc, digest); - - char msg_long[] = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"; - Sha256Digest digest_long = {{0x24, 0x8D, 0x6A, 0x61, 0xD2, 0x06, 0x38, 0xB8, - 0xE5, 0xC0, 0x26, 0x93, 0x0C, 0x3E, 0x60, 0x39, - 0xA3, 0x3C, 0xE4, 0x59, 0x64, 0xFF, 0x21, 0x67, - 0xF6, 0xEC, 0xED, 0xD4, 0x19, 0xDB, 0x06, 0xC1}}; - EXPECT_EQ(kEpidNoErr, - Sha256MessageDigest(msg_long, sizeof(msg_long) - 1, &digest)); - EXPECT_EQ(digest_long, digest); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/main-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/main-test.cc deleted file mode 100644 index 70f2d3a182..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/main-test.cc +++ /dev/null @@ -1,26 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Main entry point for unit tests. - */ - -#include "gtest/gtest.h" - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/octstrconvert-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/octstrconvert-test.cc deleted file mode 100644 index 2ad606bc18..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/octstrconvert-test.cc +++ /dev/null @@ -1,75 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief OctStr2Bnu unit tests. - * - * OctStr2Bnu is an internal function used in the IPP implementation of the - * math libraries. These tests can be omitted if you do not use this function. - */ - -#include "epid/common/stdtypes.h" -#include "gtest/gtest.h" - -extern "C" { -#include "epid/common/math/src/bignum-internal.h" -} - -namespace { - -const uint8_t bnstr1[] = {0x01, 0x02, 0x03, 0x04}; -const uint8_t bnstr2[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08}; -uint32_t bnustr1[sizeof(bnstr1) / sizeof(uint32_t)] = {0x01020304}; -uint32_t bnustr2[sizeof(bnstr2) / sizeof(uint32_t)] = {0x05060708, 0x01020304}; - -TEST(OctStr2Bnu, octstr2bnuFailsGivenNullBnu) { - int len = OctStr2Bnu(nullptr, bnstr1, sizeof(bnstr1) / sizeof(uint8_t)); - EXPECT_EQ(-1, len); -} -TEST(OctStr2Bnu, octstr2bnuFailsGivenNullOctstr) { - uint32_t bnustr_res[sizeof(bnstr1) / sizeof(uint32_t)] = {0}; - int len = OctStr2Bnu(bnustr_res, nullptr, sizeof(bnstr1) / sizeof(uint8_t)); - EXPECT_EQ(-1, len); -} -TEST(OctStr2Bnu, octstr2bnuFailsGivenInvalidOctsrtLen) { - uint32_t bnustr_res[sizeof(bnstr1) / sizeof(uint32_t)] = {0}; - int len = OctStr2Bnu(bnustr_res, bnstr1, -1); - EXPECT_EQ(-1, len); - len = OctStr2Bnu(bnustr_res, bnstr1, 0); - EXPECT_EQ(-1, len); - len = OctStr2Bnu(bnustr_res, bnstr1, 3); - EXPECT_EQ(-1, len); - len = OctStr2Bnu(bnustr_res, bnstr1, 5); - EXPECT_EQ(-1, len); -} -TEST(OctStr2Bnu, octstr2bnuWorksGivenOctstr1) { - uint32_t bnustr_res[sizeof(bnstr1) / sizeof(uint32_t)] = {0}; - int len = OctStr2Bnu(bnustr_res, bnstr1, sizeof(bnstr1) / sizeof(uint8_t)); - EXPECT_EQ(1, len); - EXPECT_EQ(0, - memcmp(bnustr1, bnustr_res, sizeof(bnustr_res) / sizeof(uint32_t))) - << "OctStr2Bnu: bnu string result does not match with predefined value\n"; -} -TEST(OctStr2Bnu, octstr2bnuWorksGivenOctstr2) { - uint32_t bnustr_res[sizeof(bnstr2) / sizeof(uint32_t)] = {0}; - int len = OctStr2Bnu(bnustr_res, bnstr2, sizeof(bnstr2) / sizeof(uint8_t)); - EXPECT_EQ(2, len); - EXPECT_EQ(0, - memcmp(bnustr2, bnustr_res, sizeof(bnustr_res) / sizeof(uint32_t))) - << "OctStr2Bnu: bnu string result does not match with predefined value\n"; -} -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/pairing-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/pairing-test.cc deleted file mode 100644 index a6883077a9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/pairing-test.cc +++ /dev/null @@ -1,225 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Pairing unit tests. - */ - -#include - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/epid_params-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/pairing.h" -#include "epid/common/math/src/ecgroup-internal.h" -#include "epid/common/math/src/finitefield-internal.h" -#include "epid/common/math/src/pairing-internal.h" -} - -/// compares Fq12ElemStr values -bool operator==(GtElemStr const& lhs, GtElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -namespace { - -class PairingTest : public Epid20Params, public ::testing::Test { - public: - static const BigNumStr t_str; - - virtual void SetUp() { params = new Epid20Params(); } - virtual void TearDown() { delete params; } - - Epid20Params* params; -}; - -const BigNumStr PairingTest::t_str = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x68, 0x82, 0xF5, 0xC0, 0x30, 0xB0, 0xA8, 0x01}; - -/////////////////////////////////////////////////////////////////////// -// NewPairingState / DeletePairingState - -// test that delete works in a "normal" valid case. -TEST_F(PairingTest, DeleteWorksGivenNewlyCreatedPairingState) { - PairingState* ps = nullptr; - EpidStatus sts = kEpidNoErr; - EXPECT_EQ(kEpidNoErr, - NewPairingState(this->params->G1, this->params->G2, - this->params->GT, &this->t_str, true, &ps)); - EXPECT_EQ(kEpidNoErr, sts); - EXPECT_NO_THROW(DeletePairingState(&ps)); -} - -// test that delete works if there is nothing to do -TEST_F(PairingTest, DeleteWorksGivenNullPointer) { - EXPECT_NO_THROW(DeletePairingState(nullptr)); - PairingState* ps = nullptr; - EXPECT_NO_THROW(DeletePairingState(&ps)); -} - -// test that new succeeds with valid parameters -TEST_F(PairingTest, NewSucceedsGivenValidParameters) { - PairingState* ps = nullptr; - EXPECT_EQ(kEpidNoErr, - NewPairingState(this->params->G1, this->params->G2, - this->params->GT, &this->t_str, true, &ps)); - DeletePairingState(&ps); -} - -// test that new fails if any options are NULL -TEST_F(PairingTest, NewFailsGivenNullParameters) { - PairingState* ps = nullptr; - EXPECT_EQ(kEpidBadArgErr, - NewPairingState(nullptr, this->params->G2, this->params->GT, - &this->t_str, true, &ps)); - DeletePairingState(&ps); - EXPECT_EQ(kEpidBadArgErr, - NewPairingState(this->params->G1, nullptr, this->params->GT, - &this->t_str, true, &ps)); - DeletePairingState(&ps); - EXPECT_EQ(kEpidBadArgErr, NewPairingState(this->params->G1, this->params->G2, - nullptr, &this->t_str, true, &ps)); - DeletePairingState(&ps); - EXPECT_EQ(kEpidBadArgErr, - NewPairingState(this->params->G1, this->params->G2, - this->params->GT, nullptr, true, &ps)); - DeletePairingState(&ps); - EXPECT_EQ(kEpidBadArgErr, - NewPairingState(this->params->G1, this->params->G2, - this->params->GT, &this->t_str, true, nullptr)); -} - -// test that new checks that G1 is valid -TEST_F(PairingTest, NewFailsGivenInvalidG1) { - PairingState* ps = nullptr; - EcGroup ga; - ga.ipp_ec = nullptr; - ga.scratch_buffer = nullptr; - EXPECT_EQ(kEpidBadArgErr, - NewPairingState(&ga, this->params->G2, this->params->GT, - &this->t_str, true, &ps)); - DeletePairingState(&ps); -} - -// test that new checks that G2 is valid -TEST_F(PairingTest, NewFailsGivenInvalidG2) { - PairingState* ps = nullptr; - EcGroup gb; - gb.ipp_ec = nullptr; - gb.scratch_buffer = nullptr; - EXPECT_EQ(kEpidBadArgErr, - NewPairingState(this->params->G1, &gb, this->params->GT, - &this->t_str, true, &ps)); - DeletePairingState(&ps); -} - -// test that new checks that GT is valid -TEST_F(PairingTest, NewFailsGivenInvalidGT) { - PairingState* ps = nullptr; - FiniteField ff; - ff.ipp_ff = nullptr; - EXPECT_EQ(kEpidBadArgErr, NewPairingState(this->params->G1, this->params->G2, - &ff, &this->t_str, true, &ps)); - DeletePairingState(&ps); -} -/////////////////////////////////////////////////////////////////////// -// Pairing -TEST_F(PairingTest, PairingWorksFromG1AndG2ToGt) { - const bool neg = true; - - GtElemStr r_expected_str = { - 0xba, 0x10, 0x1f, 0xf6, 0x46, 0x8b, 0xe9, 0x32, 0x4f, 0xc0, 0xa5, 0x01, - 0xad, 0x5e, 0xe2, 0x31, 0x16, 0x29, 0x96, 0xed, 0xa7, 0xde, 0x4c, 0xe1, - 0xd2, 0x8d, 0x33, 0xca, 0x50, 0xab, 0x7b, 0xc6, 0x15, 0xeb, 0x79, 0xf4, - 0xeb, 0xde, 0x30, 0xb6, 0xc4, 0x07, 0x7c, 0x42, 0xcb, 0x04, 0x54, 0xf2, - 0x1f, 0x4d, 0x1f, 0xc0, 0xdf, 0xa2, 0x2b, 0x9e, 0x34, 0xc4, 0x4c, 0x84, - 0x14, 0xd3, 0x62, 0x07, 0xf1, 0x8b, 0x84, 0xd1, 0x46, 0x57, 0xb6, 0xe7, - 0x80, 0xe1, 0x46, 0x49, 0x1c, 0x0d, 0xef, 0x81, 0x31, 0xb0, 0xbe, 0x8c, - 0xb9, 0x08, 0xd0, 0xd3, 0xc4, 0x56, 0xca, 0xad, 0xf9, 0x1d, 0x75, 0x19, - 0x3f, 0xee, 0x7c, 0x43, 0xc1, 0xfa, 0x4e, 0x50, 0xb7, 0x19, 0x01, 0x00, - 0x6f, 0xd5, 0x16, 0xb6, 0xf4, 0x85, 0xe0, 0xeb, 0x2e, 0x5f, 0x0a, 0x7e, - 0xf8, 0xac, 0xbc, 0x05, 0xec, 0x73, 0xb5, 0x57, 0xe3, 0xb3, 0x18, 0x29, - 0xbb, 0xef, 0x86, 0x50, 0x87, 0xcf, 0x70, 0xba, 0x13, 0x8b, 0xb1, 0xb6, - 0x2d, 0x6f, 0x65, 0x3d, 0xa1, 0x0b, 0xe3, 0x92, 0xc5, 0x72, 0x86, 0x6a, - 0xb3, 0xeb, 0xe0, 0xe5, 0xda, 0x0e, 0x57, 0x87, 0xd5, 0xa9, 0x61, 0xa5, - 0x1e, 0xcb, 0x04, 0x86, 0xcd, 0xc3, 0x18, 0x2a, 0x36, 0xa0, 0x81, 0x73, - 0xe7, 0x13, 0x87, 0x80, 0x8d, 0x1a, 0xfe, 0x6e, 0x4b, 0xa3, 0x13, 0x03, - 0x66, 0x9e, 0x80, 0x4d, 0x8a, 0xaa, 0x00, 0x95, 0x72, 0xce, 0xbb, 0x51, - 0xe8, 0x01, 0x09, 0x41, 0xd3, 0x63, 0x28, 0x05, 0xa4, 0xbe, 0xd6, 0x41, - 0xa6, 0x2f, 0x5f, 0xbf, 0x0b, 0x13, 0xb4, 0x54, 0x5b, 0x50, 0x65, 0xdc, - 0x6f, 0x29, 0xd6, 0xda, 0xbf, 0xc2, 0x06, 0xea, 0x3b, 0xb2, 0xf1, 0xd4, - 0x26, 0x5c, 0x92, 0x6b, 0x95, 0x6d, 0x88, 0xab, 0x8f, 0xc6, 0x9d, 0x31, - 0xe4, 0x9b, 0x71, 0x49, 0xe0, 0xce, 0x97, 0x8f, 0xc9, 0x9f, 0xbc, 0xa8, - 0x4a, 0xc6, 0xaa, 0x4a, 0xc8, 0x0d, 0x2a, 0x60, 0x1a, 0x43, 0x40, 0x03, - 0xb3, 0x53, 0x30, 0x98, 0x1f, 0x3f, 0xdf, 0x5c, 0x0f, 0xf0, 0x84, 0x8e, - 0x5a, 0x5d, 0x41, 0xd2, 0x47, 0x78, 0x6d, 0x9f, 0x89, 0xce, 0xf5, 0x8e, - 0xb6, 0x54, 0xa2, 0x26, 0xe5, 0x40, 0x39, 0x5c, 0x59, 0x08, 0xb3, 0xda, - 0xf5, 0xf8, 0xa0, 0x18, 0x33, 0x57, 0xd1, 0x72, 0xbb, 0xba, 0x6c, 0xed, - 0xe8, 0xa0, 0x5e, 0xc8, 0x81, 0xc5, 0xac, 0x15, 0x1b, 0xd0, 0xe6, 0xc8, - 0x92, 0xf9, 0x43, 0x03, 0x5a, 0x00, 0x42, 0xe3, 0x49, 0xa5, 0xf7, 0x19, - 0x78, 0x8a, 0x39, 0x89, 0x32, 0xae, 0xbf, 0x4d, 0x4b, 0xb3, 0x33, 0x76, - 0x16, 0xfd, 0x0b, 0xfe, 0x42, 0x1e, 0x17, 0x37, 0x2a, 0x04, 0xea, 0x26, - 0xba, 0x6e, 0x2c, 0x36, 0xaf, 0x35, 0x1b, 0x75, 0x6d, 0x17, 0xdc, 0x8e, - }; - G1ElemStr ga_elem_str = { - 0xd7, 0xe2, 0xf9, 0x37, 0x21, 0x0f, 0x09, 0x97, 0x0f, 0xca, 0xa6, - 0x03, 0x7d, 0x91, 0xc3, 0x75, 0x8a, 0xc9, 0x44, 0x11, 0xfc, 0xaa, - 0x55, 0x67, 0xba, 0xce, 0xaf, 0x8d, 0xf6, 0x7c, 0x84, 0x83, 0x04, - 0xb7, 0xa6, 0xff, 0x9f, 0x0d, 0x26, 0x73, 0xaf, 0x6c, 0xd0, 0x0a, - 0xf6, 0x13, 0xc9, 0x44, 0x3f, 0xf0, 0x82, 0x58, 0x48, 0x59, 0x03, - 0x3f, 0x88, 0xe2, 0x46, 0xd6, 0x0f, 0x93, 0x42, 0x4b, - }; - G2ElemStr gb_elem_str = { - 0x3f, 0x4c, 0xb5, 0x2d, 0xbc, 0x72, 0xb0, 0x9c, 0x6f, 0xb2, 0xb5, 0xc1, - 0xdc, 0xfb, 0xda, 0x35, 0x91, 0xa6, 0x8d, 0x51, 0x37, 0x70, 0xe2, 0x17, - 0xad, 0x53, 0x23, 0xdc, 0xa3, 0xc3, 0xfd, 0x4c, 0x90, 0xfa, 0x4f, 0xa2, - 0xcb, 0x35, 0xf3, 0x50, 0x5e, 0x8e, 0xf4, 0xce, 0x7f, 0xb0, 0x8a, 0x69, - 0x49, 0xdf, 0xf5, 0x4f, 0xb0, 0xc1, 0xd7, 0xf9, 0xb8, 0xfb, 0x89, 0xd1, - 0xb6, 0xf8, 0x74, 0x04, 0xef, 0xc6, 0x60, 0x05, 0x62, 0xf3, 0x17, 0x5a, - 0x80, 0xf4, 0x4b, 0x97, 0x08, 0x3e, 0x43, 0xa1, 0x44, 0x4c, 0x54, 0x86, - 0x16, 0x20, 0xb9, 0xcc, 0xfb, 0xbd, 0x00, 0x5f, 0xc8, 0x01, 0xfb, 0x5b, - 0xc1, 0x6e, 0x2b, 0x46, 0xe2, 0x04, 0x70, 0xeb, 0xa2, 0xaa, 0x86, 0x5a, - 0x35, 0x14, 0x0e, 0xc9, 0xdf, 0xba, 0x9b, 0x6f, 0x3a, 0xca, 0x94, 0x9c, - 0x44, 0x89, 0x94, 0xa3, 0xeb, 0x61, 0x8b, 0x01, - }; - - GtElemStr r_str = {0}; - - FfElementObj r(&this->params->GT); - EcPointObj ga_elem(&this->params->G1, ga_elem_str); - EcPointObj gb_elem(&this->params->G2, gb_elem_str); - - PairingState* ps = nullptr; - THROW_ON_EPIDERR(NewPairingState(this->params->G1, this->params->G2, - this->params->GT, &this->t_str, neg, &ps)); - EXPECT_EQ(kEpidNoErr, Pairing(ps, r, ga_elem, gb_elem)); - DeletePairingState(&ps); - - THROW_ON_EPIDERR(WriteFfElement(this->params->GT, r, &r_str, sizeof(r_str))); - EXPECT_EQ(r_expected_str, r_str); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/printutils-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/printutils-test.cc deleted file mode 100644 index 14e4c8227f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/printutils-test.cc +++ /dev/null @@ -1,379 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Printutils unit tests. - */ - -#ifndef EPID_ENABLE_DEBUG_PRINT -#define EPID_ENABLE_DEBUG_PRINT -#endif - -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/common/math/bignum.h" -#include "epid/common/math/printutils.h" -} -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" -#include "epid/common-testhelper/bignum_wrapper-testhelper.h" - -namespace { - -class PrintutilsTest : public ::testing::Test { - public: - /// Intel(R) EPID 2.0 parameter q - static const BigNumStr epid20_q; - static const BigNumStr epid20_p; - static const FpElemStr p_str; - static const FqElemStr beta_str; - static const Fq2ElemStr xi_str; - static const Fq6ElemStr v_str; - static const Fq12ElemStr a_str; - static const G1ElemStr g1_str; - static const G2ElemStr g2_str; - static const FqElemStr a1; - static const FqElemStr b1; - static const BigNumStr h1; - static const G1ElemStr efq_a_str; - static const G2ElemStr efq2_a_str; - - BigNumObj q; - - FiniteFieldObj fp; - FiniteFieldObj fq; - FiniteFieldObj fq2; - FiniteFieldObj fq6; - FiniteFieldObj fq12; - - FfElementObj fp_elem; - FfElementObj fq_beta; - FfElementObj fq2_xi; - FfElementObj fq6_v; - FfElementObj fq12_a; - - EcGroupObj efq; - EcPointObj efq_a; - - EcGroupObj efq2; - EcPointObj efq2_a; - - public: - virtual void SetUp() { - q = BigNumObj(epid20_q); - - ConstructFiniteFields(); - ConstructEllipticCurveGroups(); - } - - private: - void ConstructFiniteFields() { - // construct Fp finite field - fp = FiniteFieldObj(epid20_p); - fp_elem = FfElementObj(&fp, p_str); - - // construct Fq finite field - fq = FiniteFieldObj(epid20_q); - fq_beta = FfElementObj(&fq, beta_str); - - // construct Fq^2 finite field - FfElementObj neg_beta(&fq); - THROW_ON_EPIDERR(FfNeg(fq, FfElementObj(&fq, beta_str), neg_beta)); - fq2 = FiniteFieldObj(fq, neg_beta, 2); - fq2_xi = FfElementObj(&fq2, xi_str); - - // construct Fq^6 finite field - FfElementObj neg_xi(&fq2); - THROW_ON_EPIDERR(FfNeg(fq2, FfElementObj(&fq2, xi_str), neg_xi)); - fq6 = FiniteFieldObj(fq2, neg_xi, 3); - fq6_v = FfElementObj(&fq6, v_str); - - // construct Fq^12 finite field - FfElementObj neg_v(&fq6); - THROW_ON_EPIDERR(FfNeg(fq6, FfElementObj(&fq6, v_str), neg_v)); - fq12 = FiniteFieldObj(fq6, neg_v, 2); - fq12_a = FfElementObj(&fq12, a_str); - } - - void ConstructEllipticCurveGroups() { - // Create G1 - // G1 is an elliptic curve group E(Fq).It can be initialized as follows : - // Set G1 = E(Fq).init(p, q, n = p, h = 1, a = 0, b, g1.x, g1.y). - efq = EcGroupObj(&fq, FfElementObj(&fq), FfElementObj(&fq, b1), - FfElementObj(&fq, g1_str.x), FfElementObj(&fq, g1_str.y), - BigNumObj(epid20_p), BigNumObj(h1)); - - // set h = 2q - p, aka cofactor - std::vector cofactor_str( - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfc, 0xf0, 0xcd, 0x46, 0xe5, 0xf2, 0x5e, 0xee, 0x71, 0xa4, 0xa0, - 0x0c, 0xdc, 0x65, 0xfb, 0x12, 0x96, 0x82, 0xea, 0xb0, 0x25, 0x08, 0x4a, - 0x8c, 0x9b, 0x10, 0x19}); - // set n = p * h, AKA order - std::vector order_str( - {0xff, 0xff, 0xff, 0xff, 0xff, 0xf9, 0xe1, 0x9a, 0x8d, 0xcb, 0xe4, 0xc7, - 0x38, 0xfa, 0x9b, 0x98, 0x4d, 0x1c, 0x12, 0x9f, 0x64, 0x97, 0xe8, 0x54, - 0xa3, 0x0a, 0x81, 0xac, 0x42, 0xf9, 0x39, 0x16, 0xa7, 0x70, 0x21, 0xdc, - 0xfb, 0xb6, 0xe7, 0x7e, 0x1f, 0x5b, 0x55, 0xcc, 0x4e, 0x84, 0xcd, 0x19, - 0x4f, 0x49, 0x20, 0x94, 0xb5, 0xd8, 0x12, 0xa0, 0x2e, 0x7f, 0x40, 0x13, - 0xb2, 0xfa, 0xa1, 0x45}); - - // Compute xi' = Fq2.inverse(xi). - FfElementObj inv_xi(&fq2); - THROW_ON_EPIDERR(FfInv(fq2, FfElementObj(&fq2, xi_str), inv_xi)); - // Compute b' = Fq2.mul(xi', b). - FfElementObj b_dash(&fq2); - THROW_ON_EPIDERR(FfMul(fq2, inv_xi.get(), FfElementObj(&fq, b1), b_dash)); - - // Set G2 = E(Fq2).init(p, param(Fq2), n, h, 0, b', g2.x, g2.y) - efq2 = EcGroupObj(&fq2, FfElementObj(&fq2), b_dash, - FfElementObj(&fq2, &g2_str.x, sizeof(g2_str.x)), - FfElementObj(&fq2, &g2_str.y, sizeof(g2_str.y)), - BigNumObj(order_str), BigNumObj(cofactor_str)); - - efq_a = EcPointObj(&efq, efq_a_str); - efq2_a = EcPointObj(&efq2, efq2_a_str); - } -}; -/// Intel(R) EPID 2.0 parameter q -const BigNumStr PrintutilsTest::epid20_q = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, - 0x0A, 0x82, 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x13}; -const BigNumStr PrintutilsTest::epid20_p = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}; -const FpElemStr PrintutilsTest::p_str = { - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, - 0x5E, 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, - 0x92, 0x1A, 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x00}; -const FqElemStr PrintutilsTest::beta_str = { - {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9F, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, - 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x12}}; -const Fq2ElemStr PrintutilsTest::xi_str = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}}}; -const Fq6ElemStr PrintutilsTest::v_str = { - {{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}; -const Fq12ElemStr PrintutilsTest::a_str = { - 0xba, 0x10, 0x1f, 0xf6, 0x46, 0x8b, 0xe9, 0x32, 0x4f, 0xc0, 0xa5, 0x01, - 0xad, 0x5e, 0xe2, 0x31, 0x16, 0x29, 0x96, 0xed, 0xa7, 0xde, 0x4c, 0xe1, - 0xd2, 0x8d, 0x33, 0xca, 0x50, 0xab, 0x7b, 0xc6, 0x15, 0xeb, 0x79, 0xf4, - 0xeb, 0xde, 0x30, 0xb6, 0xc4, 0x07, 0x7c, 0x42, 0xcb, 0x04, 0x54, 0xf2, - 0x1f, 0x4d, 0x1f, 0xc0, 0xdf, 0xa2, 0x2b, 0x9e, 0x34, 0xc4, 0x4c, 0x84, - 0x14, 0xd3, 0x62, 0x07, 0xf1, 0x8b, 0x84, 0xd1, 0x46, 0x57, 0xb6, 0xe7, - 0x80, 0xe1, 0x46, 0x49, 0x1c, 0x0d, 0xef, 0x81, 0x31, 0xb0, 0xbe, 0x8c, - 0xb9, 0x08, 0xd0, 0xd3, 0xc4, 0x56, 0xca, 0xad, 0xf9, 0x1d, 0x75, 0x19, - 0x3f, 0xee, 0x7c, 0x43, 0xc1, 0xfa, 0x4e, 0x50, 0xb7, 0x19, 0x01, 0x00, - 0x6f, 0xd5, 0x16, 0xb6, 0xf4, 0x85, 0xe0, 0xeb, 0x2e, 0x5f, 0x0a, 0x7e, - 0xf8, 0xac, 0xbc, 0x05, 0xec, 0x73, 0xb5, 0x57, 0xe3, 0xb3, 0x18, 0x29, - 0xbb, 0xef, 0x86, 0x50, 0x87, 0xcf, 0x70, 0xba, 0x13, 0x8b, 0xb1, 0xb6, - 0x2d, 0x6f, 0x65, 0x3d, 0xa1, 0x0b, 0xe3, 0x92, 0xc5, 0x72, 0x86, 0x6a, - 0xb3, 0xeb, 0xe0, 0xe5, 0xda, 0x0e, 0x57, 0x87, 0xd5, 0xa9, 0x61, 0xa5, - 0x1e, 0xcb, 0x04, 0x86, 0xcd, 0xc3, 0x18, 0x2a, 0x36, 0xa0, 0x81, 0x73, - 0xe7, 0x13, 0x87, 0x80, 0x8d, 0x1a, 0xfe, 0x6e, 0x4b, 0xa3, 0x13, 0x03, - 0x66, 0x9e, 0x80, 0x4d, 0x8a, 0xaa, 0x00, 0x95, 0x72, 0xce, 0xbb, 0x51, - 0xe8, 0x01, 0x09, 0x41, 0xd3, 0x63, 0x28, 0x05, 0xa4, 0xbe, 0xd6, 0x41, - 0xa6, 0x2f, 0x5f, 0xbf, 0x0b, 0x13, 0xb4, 0x54, 0x5b, 0x50, 0x65, 0xdc, - 0x6f, 0x29, 0xd6, 0xda, 0xbf, 0xc2, 0x06, 0xea, 0x3b, 0xb2, 0xf1, 0xd4, - 0x26, 0x5c, 0x92, 0x6b, 0x95, 0x6d, 0x88, 0xab, 0x8f, 0xc6, 0x9d, 0x31, - 0xe4, 0x9b, 0x71, 0x49, 0xe0, 0xce, 0x97, 0x8f, 0xc9, 0x9f, 0xbc, 0xa8, - 0x4a, 0xc6, 0xaa, 0x4a, 0xc8, 0x0d, 0x2a, 0x60, 0x1a, 0x43, 0x40, 0x03, - 0xb3, 0x53, 0x30, 0x98, 0x1f, 0x3f, 0xdf, 0x5c, 0x0f, 0xf0, 0x84, 0x8e, - 0x5a, 0x5d, 0x41, 0xd2, 0x47, 0x78, 0x6d, 0x9f, 0x89, 0xce, 0xf5, 0x8e, - 0xb6, 0x54, 0xa2, 0x26, 0xe5, 0x40, 0x39, 0x5c, 0x59, 0x08, 0xb3, 0xda, - 0xf5, 0xf8, 0xa0, 0x18, 0x33, 0x57, 0xd1, 0x72, 0xbb, 0xba, 0x6c, 0xed, - 0xe8, 0xa0, 0x5e, 0xc8, 0x81, 0xc5, 0xac, 0x15, 0x1b, 0xd0, 0xe6, 0xc8, - 0x92, 0xf9, 0x43, 0x03, 0x5a, 0x00, 0x42, 0xe3, 0x49, 0xa5, 0xf7, 0x19, - 0x78, 0x8a, 0x39, 0x89, 0x32, 0xae, 0xbf, 0x4d, 0x4b, 0xb3, 0x33, 0x76, - 0x16, 0xfd, 0x0b, 0xfe, 0x42, 0x1e, 0x17, 0x37, 0x2a, 0x04, 0xea, 0x26, - 0xba, 0x6e, 0x2c, 0x36, 0xaf, 0x35, 0x1b, 0x75, 0x6d, 0x17, 0xdc, 0x8e, -}; -const FqElemStr PrintutilsTest::a1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}; -const FqElemStr PrintutilsTest::b1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03}}}; -const BigNumStr PrintutilsTest::h1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}; -const G1ElemStr PrintutilsTest::g1_str = { - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02}}}}; -const G2ElemStr PrintutilsTest::g2_str = { - {{{{0xE2, 0x01, 0x71, 0xC5, 0x4A, 0xA3, 0xDA, 0x05, 0x21, 0x67, 0x04, 0x13, - 0x74, 0x3C, 0xCF, 0x22, 0xD2, 0x5D, 0x52, 0x68, 0x3D, 0x32, 0x47, 0x0E, - 0xF6, 0x02, 0x13, 0x43, 0xBF, 0x28, 0x23, 0x94}}}, - {{{0x59, 0x2D, 0x1E, 0xF6, 0x53, 0xA8, 0x5A, 0x80, 0x46, 0xCC, 0xDC, 0x25, - 0x4F, 0xBB, 0x56, 0x56, 0x43, 0x43, 0x3B, 0xF6, 0x28, 0x96, 0x53, 0xE2, - 0x7D, 0xF7, 0xB2, 0x12, 0xBA, 0xA1, 0x89, 0xBE}}}}, - {{{{0xAE, 0x60, 0xA4, 0xE7, 0x51, 0xFF, 0xD3, 0x50, 0xC6, 0x21, 0xE7, 0x03, - 0x31, 0x28, 0x26, 0xBD, 0x55, 0xE8, 0xB5, 0x9A, 0x4D, 0x91, 0x68, 0x38, - 0x41, 0x4D, 0xB8, 0x22, 0xDD, 0x23, 0x35, 0xAE}}}, - {{{0x1A, 0xB4, 0x42, 0xF9, 0x89, 0xAF, 0xE5, 0xAD, 0xF8, 0x02, 0x74, 0xF8, - 0x76, 0x45, 0xE2, 0x53, 0x2C, 0xDC, 0x61, 0x81, 0x90, 0x93, 0xD6, 0x13, - 0x2C, 0x90, 0xFE, 0x89, 0x51, 0xB9, 0x24, 0x21}}}}}; -const G1ElemStr PrintutilsTest::efq_a_str = { - {{{0x12, 0xA6, 0x5B, 0xD6, 0x91, 0x8D, 0x50, 0xA7, 0x66, 0xEB, 0x7D, 0x52, - 0xE3, 0x40, 0x17, 0x60, 0x7F, 0xDF, 0x6C, 0xA1, 0x2C, 0x1A, 0x37, 0xE0, - 0x92, 0xC0, 0xF7, 0xB9, 0x76, 0xAB, 0xB1, 0x8A}}}, - {{{0x78, 0x65, 0x28, 0xCB, 0xAF, 0x07, 0x52, 0x50, 0x55, 0x7A, 0x5F, 0x30, - 0x0A, 0xC0, 0xB4, 0x6B, 0xEA, 0x6F, 0xE2, 0xF6, 0x6D, 0x96, 0xF7, 0xCD, - 0xC8, 0xD3, 0x12, 0x7F, 0x1F, 0x3A, 0x8B, 0x42}}}}; -const G2ElemStr PrintutilsTest::efq2_a_str = { - { - {0x2F, 0x8C, 0xC7, 0xD7, 0xD4, 0x1E, 0x4A, 0xCB, 0x82, 0x92, 0xC7, 0x9C, - 0x0F, 0xA2, 0xF2, 0x1B, 0xDF, 0xEA, 0x96, 0x64, 0x8B, 0xA2, 0x32, 0x7C, - 0xDF, 0xD8, 0x89, 0x10, 0xFD, 0xBB, 0x38, 0xCD}, - {0xB1, 0x23, 0x46, 0x13, 0x4D, 0x9B, 0x8E, 0x8A, 0x95, 0x64, 0xDD, 0x37, - 0x29, 0x44, 0x1F, 0x76, 0xB5, 0x3A, 0x47, 0xD3, 0xE0, 0x18, 0x1E, 0x60, - 0xE9, 0x94, 0x13, 0xA4, 0x47, 0xCD, 0xBE, 0x03}, - }, - { - {0xD3, 0x67, 0xA5, 0xCC, 0xEF, 0x7B, 0xD1, 0x8D, 0x4A, 0x7F, 0xF1, 0x8F, - 0x66, 0xCB, 0x5E, 0x86, 0xAC, 0xCB, 0x36, 0x5F, 0x29, 0x90, 0x28, 0x55, - 0xF0, 0xDC, 0x6E, 0x8B, 0x87, 0xB5, 0xD8, 0x32}, - {0x6C, 0x0A, 0xC5, 0x58, 0xB1, 0x4E, 0xCA, 0x85, 0x44, 0x3E, 0xDE, 0x71, - 0x9B, 0xC7, 0x90, 0x19, 0x06, 0xD2, 0xA0, 0x4E, 0xC7, 0x33, 0xF4, 0x5C, - 0xE8, 0x16, 0xE2, 0x67, 0xDB, 0xBF, 0x64, 0x84}, - }, -}; - -TEST_F(PrintutilsTest, DISABLED_PrintutilsWorkWithAnnotatedFormat) { - // Test intentionally disabled and has no predicate. - // Enable for manual output inspection. - - PrintBigNum(q, "q"); - PrintFfElement(fp, fp_elem, "fp_elem", kPrintUtilAnnotated); - PrintFfElement(fq, fq_beta, "fq_beta", kPrintUtilAnnotated); - PrintFfElement(fq2, fq2_xi, "fq2_xi", kPrintUtilAnnotated); - PrintFfElement(fq6, fq6_v, "fq6_v", kPrintUtilAnnotated); - PrintFfElement(fq12, fq12_a, "fq12_a", kPrintUtilAnnotated); - PrintEcPoint(efq, efq_a, "efq_a", kPrintUtilAnnotated); - PrintEcPoint(efq2, efq2_a, "efq2_a", kPrintUtilAnnotated); - - PrintBigNumStr(&epid20_q, "q_str"); - PrintFqElemStr(&beta_str, "fq_beta_str"); - PrintFq2ElemStr(&xi_str, "fq2_xi_str", kPrintUtilAnnotated); - PrintFq6ElemStr(&v_str, "fq6_v_str", kPrintUtilAnnotated); - PrintFq12ElemStr(&a_str, "fq12_a_str", kPrintUtilAnnotated); - PrintG1ElemStr(&efq_a_str, "efq_a_str", kPrintUtilAnnotated); - PrintG2ElemStr(&efq2_a_str, "efq_a_str", kPrintUtilAnnotated); -} - -TEST_F(PrintutilsTest, DISABLED_PrintutilsWorkWithUnannotatedFormat) { - // Test intentionally disabled and has no predicate. - // Enable for manual output inspection. - - PrintFfElement(fp, fp_elem, "fp_elem", kPrintUtilUnannotated); - PrintFfElement(fq, fq_beta, "fq_beta", kPrintUtilUnannotated); - PrintFfElement(fq2, fq2_xi, "fq2_xi", kPrintUtilUnannotated); - PrintFfElement(fq6, fq6_v, "fq6_v", kPrintUtilUnannotated); - PrintFfElement(fq12, fq12_a, "fq12_a", kPrintUtilUnannotated); - PrintEcPoint(efq, efq_a, "efq_a", kPrintUtilUnannotated); - PrintEcPoint(efq2, efq2_a, "efq2_a", kPrintUtilUnannotated); - - PrintFq2ElemStr(&xi_str, "fq2_xi_str", kPrintUtilUnannotated); - PrintFq6ElemStr(&v_str, "fq6_v_str", kPrintUtilUnannotated); - PrintFq12ElemStr(&a_str, "fq12_a_str", kPrintUtilUnannotated); - PrintG1ElemStr(&efq_a_str, "efq_a_str", kPrintUtilUnannotated); - PrintG2ElemStr(&efq2_a_str, "efq_a_str", kPrintUtilUnannotated); -} - -TEST_F(PrintutilsTest, DISABLED_PrintutilsReportNullPtr) { - // Test intentionally disabled and has no predicate. - // Enable for manual output inspection. - - PrintBigNum(nullptr, "q"); - - PrintFfElement(nullptr, fp_elem, "fp_elem", kPrintUtilUnannotated); - PrintFfElement(fp, nullptr, "fp_elem", kPrintUtilUnannotated); - - PrintFfElement(nullptr, fq_beta, "fq_beta", kPrintUtilUnannotated); - PrintFfElement(fq, nullptr, "fq_beta", kPrintUtilUnannotated); - - PrintEcPoint(nullptr, efq_a, "efq_a", kPrintUtilUnannotated); - PrintEcPoint(efq, nullptr, "efq_a", kPrintUtilUnannotated); - - PrintBigNumStr(nullptr, "q_str"); - PrintFqElemStr(nullptr, "fq_beta_str"); - PrintFq2ElemStr(nullptr, "fq2_xi_str", kPrintUtilAnnotated); - PrintFq6ElemStr(nullptr, "fq6_v_str", kPrintUtilAnnotated); - PrintFq12ElemStr(nullptr, "fq12_a_str", kPrintUtilAnnotated); - PrintG1ElemStr(nullptr, "efq_a_str", kPrintUtilAnnotated); - PrintG2ElemStr(nullptr, "efq_a_str", kPrintUtilAnnotated); -} - -TEST_F(PrintutilsTest, DISABLED_PrintutilsReportInvalidArgument) { - // Test intentionally disabled and has no predicate. - // Enable for manual output inspection. - - PrintFfElement(fp, fp_elem, "fp_elem", (PrintUtilFormat)100); - PrintFfElement(fq, fq_beta, "fq_beta", (PrintUtilFormat)100); - PrintFfElement(fq2, fq2_xi, "fq2_xi", (PrintUtilFormat)100); - PrintFfElement(fq6, fq6_v, "fq6_v", (PrintUtilFormat)100); - PrintFfElement(fq12, fq12_a, "fq12_a", (PrintUtilFormat)100); - PrintEcPoint(efq, efq_a, "efq_a", (PrintUtilFormat)100); - PrintEcPoint(efq2, efq2_a, "efq2_a", (PrintUtilFormat)100); - - PrintFq2ElemStr(&xi_str, "fq2_xi_str", (PrintUtilFormat)100); - PrintFq6ElemStr(&v_str, "fq6_v_str", (PrintUtilFormat)100); - PrintFq12ElemStr(&a_str, "fq12_a_str", (PrintUtilFormat)100); - PrintG1ElemStr(&efq_a_str, "efq_a_str", (PrintUtilFormat)100); - PrintG2ElemStr(&efq2_a_str, "efq_a_str", (PrintUtilFormat)100); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/tatepairing-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/tatepairing-test.cc deleted file mode 100644 index 1a15f6a6b3..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/math/unittests/tatepairing-test.cc +++ /dev/null @@ -1,231 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Intel(R) EPID 1.1 Pairing unit tests. - */ - -#include - -#include "gtest/gtest.h" - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/1.1/epid_params-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" - -extern "C" { -#include "epid/common/math/tatepairing.h" -} - -/// compares Epid11GtElemStr values -bool operator==(Epid11GtElemStr const& lhs, Epid11GtElemStr const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -namespace { - -class Epid11PairingTest : public ::testing::Test { - public: - virtual void SetUp() { params = new Epid11ParamsObj(); } - virtual void TearDown() { delete params; } - - static const Epid11G1ElemStr kGaElemStr; - static const Epid11G2ElemStr kGbElemStr; - Epid11ParamsObj* params; -}; - -const Epid11G1ElemStr Epid11PairingTest::kGaElemStr = { - 0x02, 0x5A, 0xC4, 0xC5, 0xCD, 0x7D, 0xAA, 0xFD, 0x26, 0xE5, 0x0B, - 0xA9, 0xB4, 0xE1, 0x72, 0xA1, 0x65, 0x2D, 0x84, 0xAD, 0x34, 0x34, - 0xF8, 0x62, 0x98, 0x6A, 0x15, 0xBE, 0xEA, 0xE3, 0xCC, 0x56, 0x05, - 0x70, 0x5F, 0x4F, 0x11, 0xAF, 0x45, 0xCF, 0x04, 0x1B, 0x96, 0xAD, - 0xEB, 0x26, 0xEE, 0x95, 0x65, 0x4B, 0xD3, 0xD6, 0x5C, 0x13, 0x76, - 0xB7, 0x7A, 0xA1, 0xC6, 0xDA, 0xED, 0x5A, 0x40, 0xCE}; - -const Epid11G2ElemStr Epid11PairingTest::kGbElemStr = { - 0x02, 0x10, 0x9A, 0xF4, 0x06, 0x32, 0x30, 0x89, 0xCB, 0x95, 0xE9, 0x55, - 0x0E, 0x9D, 0xAF, 0x0E, 0x98, 0xCD, 0xCA, 0xDC, 0xB1, 0xFF, 0xFC, 0xD1, - 0x45, 0x66, 0xBB, 0x86, 0x46, 0x1E, 0x8C, 0x30, 0x04, 0x78, 0x53, 0xE1, - 0x3F, 0x96, 0xC5, 0xE4, 0x15, 0x23, 0x7B, 0x1F, 0x3F, 0x2C, 0xD3, 0x95, - 0x40, 0xBC, 0x7A, 0x31, 0x1F, 0x14, 0x38, 0x9E, 0x1A, 0xA5, 0xD6, 0x63, - 0x10, 0x91, 0xE4, 0xD3, 0x00, 0xB4, 0x02, 0xBC, 0x47, 0xFA, 0xA6, 0x29, - 0x82, 0x0B, 0xB1, 0xD5, 0xFF, 0xF2, 0xE6, 0xB0, 0xC6, 0xAE, 0xE8, 0x7B, - 0x91, 0xD9, 0xEE, 0x66, 0x07, 0x1F, 0xFD, 0xA2, 0xE7, 0x02, 0x66, 0xDD, - 0x05, 0x2E, 0xF8, 0xC6, 0xC1, 0x6A, 0xEF, 0x3C, 0xC1, 0x95, 0xF6, 0x26, - 0xCE, 0x5E, 0x55, 0xD1, 0x64, 0x13, 0x28, 0xB1, 0x18, 0x57, 0xD8, 0x1B, - 0x84, 0xFA, 0xEC, 0x7E, 0x5D, 0x99, 0x06, 0x49, 0x05, 0x73, 0x35, 0xA9, - 0xA7, 0xF2, 0xA1, 0x92, 0x5F, 0x3E, 0x7C, 0xDF, 0xAC, 0xFE, 0x0F, 0xF5, - 0x08, 0xD0, 0x3C, 0xAE, 0xCD, 0x58, 0x00, 0x5F, 0xD0, 0x84, 0x7E, 0xEA, - 0x63, 0x57, 0xFE, 0xC6, 0x01, 0x56, 0xDA, 0xF3, 0x72, 0x61, 0xDA, 0xC6, - 0x93, 0xB0, 0xAC, 0xEF, 0xAA, 0xD4, 0x51, 0x6D, 0xCA, 0x71, 0x1E, 0x06, - 0x73, 0xEA, 0x83, 0xB2, 0xB1, 0x99, 0x4A, 0x4D, 0x4A, 0x0D, 0x35, 0x07}; - -/////////////////////////////////////////////////////////////////////// -// NewEpid11PairingState / DeleteEpid11PairingState - -// test that delete works in a "normal" valid case. -TEST_F(Epid11PairingTest, DeleteWorksGivenNewlyCreatedPairingState) { - Epid11PairingState* ps = nullptr; - THROW_ON_EPIDERR(NewEpid11PairingState(this->params->G1, this->params->G2, - this->params->GT, &ps)); - EXPECT_NO_THROW(DeleteEpid11PairingState(&ps)); -} - -// test that delete works if there is nothing to do -TEST_F(Epid11PairingTest, DeleteWorksGivenNullPointer) { - EXPECT_NO_THROW(DeleteEpid11PairingState(nullptr)); - Epid11PairingState* ps = nullptr; - EXPECT_NO_THROW(DeleteEpid11PairingState(&ps)); -} - -// test that new succeeds with valid parameters -TEST_F(Epid11PairingTest, NewSucceedsGivenValidParameters) { - Epid11PairingState* ps = nullptr; - EXPECT_EQ(kEpidNoErr, - NewEpid11PairingState(this->params->G1, this->params->G2, - this->params->GT, &ps)); - DeleteEpid11PairingState(&ps); -} - -// test that new fails if any options are NULL -TEST_F(Epid11PairingTest, NewFailsGivenNullParameters) { - Epid11PairingState* ps = nullptr; - EXPECT_EQ(kEpidBadArgErr, NewEpid11PairingState(nullptr, this->params->G2, - this->params->GT, &ps)); - DeleteEpid11PairingState(&ps); - EXPECT_EQ(kEpidBadArgErr, NewEpid11PairingState(this->params->G1, nullptr, - this->params->GT, &ps)); - DeleteEpid11PairingState(&ps); - EXPECT_EQ( - kEpidBadArgErr, - NewEpid11PairingState(this->params->G1, this->params->G2, nullptr, &ps)); - DeleteEpid11PairingState(&ps); - EXPECT_EQ(kEpidBadArgErr, - NewEpid11PairingState(this->params->G1, this->params->G2, - this->params->GT, nullptr)); -} - -// test that new checks that G1 is valid -TEST_F(Epid11PairingTest, NewFailsGivenInvalidG1) { - Epid11PairingState* ps = nullptr; - EXPECT_EQ(kEpidBadArgErr, - NewEpid11PairingState(this->params->G2, this->params->G2, - this->params->GT, &ps)); - DeleteEpid11PairingState(&ps); -} - -// test that new checks that G2 is valid -TEST_F(Epid11PairingTest, NewFailsGivenInvalidG2) { - Epid11PairingState* ps = nullptr; - EXPECT_EQ(kEpidBadArgErr, - NewEpid11PairingState(this->params->G1, this->params->G1, - this->params->GT, &ps)); - DeleteEpid11PairingState(&ps); -} - -// test that new checks that GT is valid -TEST_F(Epid11PairingTest, NewFailsGivenInvalidGT) { - FiniteFieldObj GFp; - Epid11PairingState* ps = nullptr; - EXPECT_EQ(kEpidBadArgErr, NewEpid11PairingState(this->params->G1, - this->params->G2, GFp, &ps)); - DeleteEpid11PairingState(&ps); -} -/////////////////////////////////////////////////////////////////////// -// Pairing -TEST_F(Epid11PairingTest, PairingWorksFromG1AndG2ToGt) { - Epid11GtElemStr r_expected_str = { - 0x02, 0xE1, 0x84, 0x16, 0x53, 0x10, 0x0E, 0xEC, 0xFB, 0xDE, 0xF3, 0x5E, - 0x2E, 0x26, 0xEE, 0x45, 0x0C, 0xD7, 0x97, 0xA7, 0x35, 0x43, 0x08, 0x5E, - 0x03, 0xB9, 0xFE, 0x91, 0x8A, 0x02, 0x14, 0xB4, 0x07, 0x7F, 0x8A, 0x5E, - 0xFD, 0xE1, 0x83, 0xC9, 0xCE, 0x1C, 0xC9, 0xF1, 0xCC, 0xB0, 0x52, 0x81, - 0xAD, 0x80, 0x2D, 0x13, 0x1C, 0x32, 0xEC, 0xAF, 0xA0, 0x8B, 0x66, 0x05, - 0x0A, 0x89, 0x26, 0xAD, 0x06, 0x75, 0x3B, 0x3B, 0xE5, 0xFB, 0x62, 0x20, - 0xA8, 0xC3, 0x91, 0xC6, 0x26, 0xC6, 0x58, 0x71, 0xB1, 0x85, 0x06, 0xBD, - 0xAE, 0x06, 0x51, 0xF9, 0x86, 0x2A, 0xC1, 0x5A, 0x11, 0xBA, 0x17, 0xE1, - 0x01, 0x4B, 0x22, 0x66, 0xEB, 0xCF, 0x7E, 0x2B, 0xE7, 0x0A, 0xF2, 0x77, - 0x1C, 0xE6, 0x48, 0x8F, 0x3E, 0xD8, 0x7D, 0x71, 0xF1, 0x78, 0x4C, 0x80, - 0x93, 0xF8, 0x08, 0xB7, 0xCB, 0xAF, 0x04, 0xDF, 0x04, 0x5C, 0x19, 0x3C, - 0xD3, 0x29, 0x11, 0xE7, 0xC5, 0x58, 0x68, 0xEA, 0x65, 0xBB, 0x48, 0x5F, - 0x3A, 0x62, 0xD9, 0x62, 0x40, 0x57, 0x53, 0x19, 0x9B, 0xB5, 0x6C, 0x52, - 0x0C, 0x33, 0x27, 0x14, 0x06, 0x6A, 0xAD, 0xB0, 0x38, 0x41, 0xD0, 0xA5, - 0x37, 0x54, 0xC5, 0x3E, 0x3B, 0x5F, 0x1A, 0xAF, 0x75, 0x8F, 0xCA, 0x42, - 0xB9, 0xA6, 0x1E, 0x18, 0xB2, 0x6B, 0x31, 0x7D, 0x5C, 0xC6, 0xE8, 0xDC}; - - Epid11GtElemStr r_str = {0}; - - FfElementObj r(&this->params->GT); - EcPointObj ga_elem(&this->params->G1, this->kGaElemStr); - EcPointObj gb_elem(&this->params->G2, this->kGbElemStr); - - Epid11PairingState* ps = nullptr; - THROW_ON_EPIDERR(NewEpid11PairingState(this->params->G1, this->params->G2, - this->params->GT, &ps)); - EXPECT_EQ(kEpidNoErr, Epid11Pairing(ps, ga_elem, gb_elem, r)); - DeleteEpid11PairingState(&ps); - - THROW_ON_EPIDERR(WriteFfElement(this->params->GT, r, &r_str, sizeof(r_str))); - EXPECT_EQ(r_expected_str, r_str); -} - -TEST_F(Epid11PairingTest, PairingGivenPointAtInfinityReturns1) { - Epid11GtElemStr r_expected_str = {0}; - r_expected_str.a[0].a[0].data.data[31] = 1; - - Epid11GtElemStr r_str = {0}; - - FfElementObj r(&this->params->GT); - EcPointObj ga_elem(&this->params->G1); - EcPointObj gb_elem(&this->params->G2, this->kGbElemStr); - - Epid11PairingState* ps = nullptr; - THROW_ON_EPIDERR(NewEpid11PairingState(this->params->G1, this->params->G2, - this->params->GT, &ps)); - EXPECT_EQ(kEpidNoErr, Epid11Pairing(ps, ga_elem, gb_elem, r)); - DeleteEpid11PairingState(&ps); - - THROW_ON_EPIDERR(WriteFfElement(this->params->GT, r, &r_str, sizeof(r_str))); - EXPECT_EQ(r_expected_str, r_str); -} - -TEST_F(Epid11PairingTest, PairingFailsOnPointMissmatch) { - FfElementObj r(&this->params->GT); - - EcPointObj ga_elem(&this->params->G1, this->kGaElemStr); - EcPointObj gb_elem(&this->params->G2, this->kGbElemStr); - - Epid11PairingState* ps = nullptr; - THROW_ON_EPIDERR(NewEpid11PairingState(this->params->G1, this->params->G2, - this->params->GT, &ps)); - EXPECT_EQ(kEpidBadArgErr, Epid11Pairing(ps, gb_elem, ga_elem, r)); - DeleteEpid11PairingState(&ps); -} - -TEST_F(Epid11PairingTest, PairingFailsOnInvalidPointInG1) { - FfElementObj r(&this->params->GT); - - EcPointObj ga_elem(&this->params->G3); - EcPointObj gb_elem(&this->params->G2, this->kGbElemStr); - - Epid11PairingState* ps = nullptr; - THROW_ON_EPIDERR(NewEpid11PairingState(this->params->G1, this->params->G2, - this->params->GT, &ps)); - EXPECT_EQ(kEpidBadArgErr, Epid11Pairing(ps, gb_elem, ga_elem, r)); - DeleteEpid11PairingState(&ps); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/commitment.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/commitment.c deleted file mode 100644 index 790a2be59b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/commitment.c +++ /dev/null @@ -1,122 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Commitment hash implementation. - */ -#include -#include "epid/common/src/commitment.h" -#include "epid/common/src/memory.h" - -EpidStatus SetKeySpecificCommitValues(GroupPubKey const* pub_key, - CommitValues* values) { - static const Epid2Params params = { -#include "epid/common/src/epid2params_ate.inc" - }; - - if (!pub_key || !values) return kEpidBadArgErr; - - values->p = params.p; - values->g1 = params.g1; - values->g2 = params.g2; - values->h1 = pub_key->h1; - values->h2 = pub_key->h2; - values->w = pub_key->w; - - return kEpidNoErr; -} - -EpidStatus SetCalculatedCommitValues(G1ElemStr const* B, G1ElemStr const* K, - G1ElemStr const* T, EcPoint const* R1, - EcGroup* G1, FfElement const* R2, - FiniteField* GT, CommitValues* values) { - EpidStatus sts; - - if (!B || !K || !T || !R1 || !G1 || !R2 || !GT || !values) { - return kEpidBadArgErr; - } - - values->B = *B; - values->K = *K; - values->T = *T; - - sts = WriteEcPoint(G1, R1, &values->R1, sizeof(values->R1)); - if (kEpidNoErr != sts) return sts; - sts = WriteFfElement(GT, R2, &values->R2, sizeof(values->R2)); - if (kEpidNoErr != sts) return sts; - - return kEpidNoErr; -} - -EpidStatus CalculateCommitmentHash(CommitValues const* values, FiniteField* Fp, - HashAlg hash_alg, void const* msg, - size_t msg_len, FfElement* c) { - EpidStatus sts; - - FfElement* t3 = NULL; - size_t t3mconcat_size = sizeof(FpElemStr) + msg_len; - uint8_t* t3mconcat_buf = NULL; - - if (!values || !Fp || !c) return kEpidBadArgErr; - if (!msg && (0 != msg_len)) { - // if message is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (SIZE_MAX - sizeof(FpElemStr) < msg_len) { - return kEpidBadArgErr; - } - - do { - sts = NewFfElement(Fp, &t3); - if (kEpidNoErr != sts) break; - - // compute t3 = Fp.hash(p || g1 || g2 || h1 || - // h2 || w || B || K || T || R1 || R2). - sts = FfHash(Fp, values, sizeof(*values), hash_alg, t3); - if (kEpidNoErr != sts) break; - - // compute c = Fp.hash(t3 || m). - t3mconcat_buf = SAFE_ALLOC(t3mconcat_size); - if (!t3mconcat_buf) { - sts = kEpidMemAllocErr; - break; - } - - // get t3 into buffer - sts = WriteFfElement(Fp, t3, t3mconcat_buf, sizeof(FpElemStr)); - if (kEpidNoErr != sts) break; - // get m into buffer - if (msg) { - // Memory copy is used to copy a message of variable length - if (0 != memcpy_S(t3mconcat_buf + sizeof(FpElemStr), - t3mconcat_size - sizeof(FpElemStr), msg, msg_len)) { - sts = kEpidBadArgErr; - break; - } - } - - sts = FfHash(Fp, t3mconcat_buf, t3mconcat_size, hash_alg, c); - if (kEpidNoErr != sts) break; - - sts = kEpidNoErr; - } while (0); - - SAFE_FREE(t3mconcat_buf); - DeleteFfElement(&t3); - - return sts; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/commitment.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/commitment.h deleted file mode 100644 index 4676cd9cdc..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/commitment.h +++ /dev/null @@ -1,120 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_SRC_COMMITMENT_H_ -#define EPID_COMMON_SRC_COMMITMENT_H_ -/*! - * \file - * \brief Commitment hash interface. - * \addtogroup EpidCommon - * @{ - */ -#include "epid/common/errors.h" -#include "epid/common/types.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/finitefield.h" - -#pragma pack(1) -/// Storage for values to create commitment in Sign and Verify algorithms -typedef struct CommitValues { - BigNumStr p; ///< Intel(R) EPID2.0 parameter p - G1ElemStr g1; ///< Intel(R) EPID2.0 parameter g1 - G2ElemStr g2; ///< Intel(R) EPID2.0 parameter g2 - G1ElemStr h1; ///< Group public key value h1 - G1ElemStr h2; ///< Group public key value h2 - G2ElemStr w; ///< Group public key value w - G1ElemStr B; ///< Variable B computed in algorithm - G1ElemStr K; ///< Variable K computed in algorithm - G1ElemStr T; ///< Variable T computed in algorithm - G1ElemStr R1; ///< Variable R1 computed in algorithm - Fq12ElemStr R2; ///< Variable R2 computed in algorithm -} CommitValues; -#pragma pack() - -/// Set group public key related fields from CommitValues structure -/*! - Set p, g1, g2, h1, h2 and w fields of values argument. - - \param[in] pub_key - Group public key - \param[out] values - Pointer to CommitValues structure to fill. - - \returns ::EpidStatus - - \see CalculateCommitmentHash -*/ -EpidStatus SetKeySpecificCommitValues(GroupPubKey const* pub_key, - CommitValues* values); - -/// Set CommitValues structure fields calculated in algorithm -/*! - Set B, K, T, R1 and R2 fields of values argument. - - \param[in] B - Value of B to set - \param[in] K - Value of K to set - \param[in] T - Value of T to set - \param[in] R1 - Value of R1 to set - \param[in] G1 - EcGroup containing element R1 - \param[in] R2 - Value of R2 to set - \param[in] GT - FiniteField containing element R2 - \param[out] values - Pointer to CommitValues structure to fill. - - \returns ::EpidStatus - - \see CalculateCommitmentHash -*/ -EpidStatus SetCalculatedCommitValues(G1ElemStr const* B, G1ElemStr const* K, - G1ElemStr const* T, EcPoint const* R1, - EcGroup* G1, FfElement const* R2, - FiniteField* GT, CommitValues* values); - -/// Calculate Fp.hash(t3 || m) for Sign and Verfiy algorithms -/*! - Calculate c = Fp.hash(t3 || m) where t3 is - Fp.hash(p || g1 || g2 || h1 || h2 || w || B || K || T || R1 || R2). - - \param[in] values - Commit values to hash - \param[in] Fp - Finite field to perfom hash operation in - \param[in] hash_alg - Hash algorithm to use - \param[in] msg - Message to hash - \param[in] msg_len - Size of msg buffer in bytes - \param[out] c - Result of calculation - - \returns ::EpidStatus - - \see SetKeySpecificCommitValues - \see SetCalculatedCommitValues -*/ -EpidStatus CalculateCommitmentHash(CommitValues const* values, FiniteField* Fp, - HashAlg hash_alg, void const* msg, - size_t msg_len, FfElement* c); - -/*! @} */ -#endif // EPID_COMMON_SRC_COMMITMENT_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/endian_convert.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/endian_convert.h deleted file mode 100644 index 2336f7e415..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/endian_convert.h +++ /dev/null @@ -1,47 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_SRC_ENDIAN_CONVERT_H_ -#define EPID_COMMON_SRC_ENDIAN_CONVERT_H_ - -#include - -/*! - * \file - * \brief Endianness conversion interface. - * \addtogroup EpidCommon - * @{ - */ - -#if !defined(ntohl) -/// Macro to transform oct str 32 into uint_32 -#define ntohl(u32) \ - ((uint32_t)(((((unsigned char*)&(u32))[0]) << 24) + \ - ((((unsigned char*)&(u32))[1]) << 16) + \ - ((((unsigned char*)&(u32))[2]) << 8) + \ - (((unsigned char*)&(u32))[3]))) -#endif - -#if !defined(htonl) -/// Macro to transform uint_32 to network order -#define htonl(u32) \ - (uint32_t)(((((uint32_t)(u32)) & 0xFF) << 24) | \ - ((((uint32_t)(u32)) & 0xFF00) << 8) | \ - ((((uint32_t)(u32)) & 0xFF0000) >> 8) | \ - ((((uint32_t)(u32)) & 0xFF000000) >> 24)) -#endif - -/*! @} */ -#endif // EPID_COMMON_SRC_ENDIAN_CONVERT_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params.c deleted file mode 100644 index 0d60f53479..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params.c +++ /dev/null @@ -1,575 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Intel(R) EPID 2.0 constant parameters implementation. - */ -#include "epid/common/src/epid2params.h" -#include "epid/common/src/memory.h" - -/// create a new Finite Field Fp -static EpidStatus NewFp(Epid2Params const* param, FiniteField** Fp); -/// create a new Finite Field Fq -static EpidStatus NewFq(Epid2Params const* param, FiniteField** Fq); -/// create a new Finite Field Fq2 -static EpidStatus NewFq2(Epid2Params const* param, FiniteField* Fq, - FiniteField** Fq2); -/// create a new Finite Field Fq6 -EpidStatus NewFq6(Epid2Params const* param, FiniteField* Fq2, FfElement* xi, - FiniteField** Fq6); -/// create a new Elliptic curve group G1 over Fq -static EpidStatus NewG1(Epid2Params const* param, FiniteField* Fq, - EcGroup** G1); -/// create a new Elliptic curve group G2 over Fq2 -static EpidStatus NewG2(Epid2Params const* param, BigNum* p, BigNum* q, - FiniteField* Fq, FiniteField* Fq2, EcGroup** G2); -/// create a new Finite Field Fq12 -static EpidStatus NewGT(FiniteField* Fq6, FiniteField** GT); -/// create a new pairing state - -/// Deallocate Finite Field Fp -static void DeleteFp(FiniteField** Fp); - -/// Deallocate Finite Field Fq -static void DeleteFq(FiniteField** Fq); -/// Deallocate Finite Field Fq2 -static void DeleteFq2(FiniteField** Fq2); -/// Deallocate Finite Field Fq6 -static void DeleteFq6(FiniteField** Fq6); -/// Deallocate Elliptic curve group G1 over Fq -static void DeleteG1(EcGroup** G1); -/// Deallocate Elliptic curve group G2 over Fq2 -static void DeleteG2(EcGroup** G2); -/// Deallocate Finite Field Fq12 -static void DeleteGT(FiniteField** GT); - -EpidStatus CreateEpid2Params(Epid2Params_** params) { - EpidStatus result = kEpidErr; - Epid2Params_* internal_param = NULL; - BigNumStr t_str = {0}; - Epid2Params params_str = { -#include "epid/common/src/epid2params_ate.inc" - }; - if (!params) { - return kEpidBadArgErr; - } - do { - internal_param = SAFE_ALLOC(sizeof(Epid2Params_)); - if (!internal_param) { - result = kEpidMemAllocErr; - break; - } - result = NewBigNum(sizeof(params_str.p), &internal_param->p); - if (kEpidNoErr != result) { - break; - } - result = ReadBigNum(¶ms_str.p, sizeof(params_str.p), internal_param->p); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(params_str.q), &internal_param->q); - if (kEpidNoErr != result) { - break; - } - result = ReadBigNum(¶ms_str.q, sizeof(params_str.q), internal_param->q); - if (kEpidNoErr != result) { - break; - } - result = NewBigNum(sizeof(params_str.t), &internal_param->t); - if (kEpidNoErr != result) { - break; - } - result = ReadBigNum(¶ms_str.t, sizeof(params_str.t), internal_param->t); - if (kEpidNoErr != result) { - break; - } - internal_param->neg = (params_str.neg.data[0]) ? true : false; - - result = NewFp(¶ms_str, &internal_param->Fp); - if (kEpidNoErr != result) { - break; - } - result = NewFq(¶ms_str, &internal_param->Fq); - if (kEpidNoErr != result) { - break; - } - result = NewFq2(¶ms_str, internal_param->Fq, &internal_param->Fq2); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(internal_param->Fq2, &internal_param->xi); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(internal_param->Fq2, ¶ms_str.xi, - sizeof(params_str.xi), internal_param->xi); - if (kEpidNoErr != result) { - break; - } - result = NewFq6(¶ms_str, internal_param->Fq2, internal_param->xi, - &internal_param->Fq6); - if (kEpidNoErr != result) { - break; - } - result = NewGT(internal_param->Fq6, &internal_param->GT); - if (kEpidNoErr != result) { - break; - } - result = NewG1(¶ms_str, internal_param->Fq, &internal_param->G1); - if (kEpidNoErr != result) { - break; - } - result = NewEcPoint(internal_param->G1, &internal_param->g1); - if (kEpidNoErr != result) { - break; - } - result = ReadEcPoint(internal_param->G1, ¶ms_str.g1, - sizeof(params_str.g1), internal_param->g1); - if (kEpidNoErr != result) { - break; - } - result = - NewG2(¶ms_str, internal_param->p, internal_param->q, - internal_param->Fq, internal_param->Fq2, &internal_param->G2); - if (kEpidNoErr != result) { - break; - } - result = NewEcPoint(internal_param->G2, &internal_param->g2); - if (kEpidNoErr != result) { - break; - } - result = ReadEcPoint(internal_param->G2, ¶ms_str.g2, - sizeof(params_str.g2), internal_param->g2); - if (kEpidNoErr != result) { - break; - } - result = WriteBigNum(internal_param->t, sizeof(t_str), &t_str); - if (kEpidNoErr != result) { - break; - } - result = NewPairingState(internal_param->G1, internal_param->G2, - internal_param->GT, &t_str, internal_param->neg, - &internal_param->pairing_state); - if (kEpidNoErr != result) { - break; - } - *params = internal_param; - result = kEpidNoErr; - } while (0); - if (kEpidNoErr != result && internal_param) { - DeletePairingState(&internal_param->pairing_state); - - DeleteEcPoint(&internal_param->g2); - DeleteEcPoint(&internal_param->g1); - - DeleteBigNum(&internal_param->p); - DeleteBigNum(&internal_param->q); - DeleteBigNum(&internal_param->t); - - DeleteFp(&internal_param->Fp); - DeleteFq(&internal_param->Fq); - DeleteFq2(&internal_param->Fq2); - DeleteFq6(&internal_param->Fq6); - DeleteGT(&internal_param->GT); - - DeleteG1(&internal_param->G1); - DeleteG2(&internal_param->G2); - - SAFE_FREE(internal_param); - } - return result; -} - -void DeleteEpid2Params(Epid2Params_** epid_params) { - if (epid_params && *epid_params) { - DeletePairingState(&(*epid_params)->pairing_state); - - DeleteBigNum(&(*epid_params)->p); - DeleteBigNum(&(*epid_params)->q); - DeleteBigNum(&(*epid_params)->t); - DeleteFfElement(&(*epid_params)->xi); - DeleteEcPoint(&(*epid_params)->g1); - DeleteEcPoint(&(*epid_params)->g2); - - DeleteFp(&(*epid_params)->Fp); - DeleteFq(&(*epid_params)->Fq); - DeleteFq2(&(*epid_params)->Fq2); - DeleteFq6(&(*epid_params)->Fq6); - DeleteGT(&(*epid_params)->GT); - - DeleteG1(&(*epid_params)->G1); - DeleteG2(&(*epid_params)->G2); - - SAFE_FREE(*epid_params); - } -} - -static EpidStatus NewFp(Epid2Params const* param, FiniteField** Fp) { - EpidStatus result = kEpidErr; - if (!param || !Fp) { - return kEpidBadArgErr; - } - result = NewFiniteField(¶m->p, Fp); - if (kEpidNoErr != result) { - return result; - } - return kEpidNoErr; -} - -static EpidStatus NewFq(Epid2Params const* param, FiniteField** Fq) { - EpidStatus result = kEpidErr; - if (!param || !Fq) { - return kEpidBadArgErr; - } - result = NewFiniteField(¶m->q, Fq); - if (kEpidNoErr != result) { - return result; - } - return kEpidNoErr; -} -EpidStatus NewFq2(Epid2Params const* param, FiniteField* Fq, - FiniteField** Fq2) { - EpidStatus result = kEpidErr; - FiniteField* Ff = NULL; - FfElement* beta = NULL; - FfElement* neg_beta = NULL; - if (!param || !Fq || !Fq2) { - return kEpidBadArgErr; - } - do { - result = NewFfElement(Fq, &beta); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(Fq, &neg_beta); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq, ¶m->beta, sizeof(param->beta), beta); - if (kEpidNoErr != result) { - break; - } - result = FfNeg(Fq, beta, neg_beta); - if (kEpidNoErr != result) { - break; - } - result = NewFiniteFieldViaBinomalExtension(Fq, neg_beta, 2, &Ff); - if (kEpidNoErr != result) { - break; - } - *Fq2 = Ff; - result = kEpidNoErr; - } while (0); - - DeleteFfElement(&neg_beta); - DeleteFfElement(&beta); - - return result; -} -EpidStatus NewFq6(Epid2Params const* param, FiniteField* Fq2, FfElement* xi, - FiniteField** Fq6) { - EpidStatus result = kEpidErr; - FiniteField* Ff = NULL; - FfElement* neg_xi = NULL; - if (!param || !Fq2 || !Fq6) { - return kEpidBadArgErr; - } - do { - result = NewFfElement(Fq2, &neg_xi); - if (kEpidNoErr != result) { - break; - } - result = FfNeg(Fq2, xi, neg_xi); - if (kEpidNoErr != result) { - break; - } - result = NewFiniteFieldViaBinomalExtension(Fq2, neg_xi, 3, &Ff); - if (kEpidNoErr != result) { - break; - } - *Fq6 = Ff; - result = kEpidNoErr; - } while (0); - - DeleteFfElement(&neg_xi); - - return result; -} -EpidStatus NewG1(Epid2Params const* param, FiniteField* Fq, EcGroup** G1) { - EpidStatus result = kEpidErr; - EcGroup* ec = NULL; - FfElement* fq_a = NULL; - FfElement* fq_b = NULL; - FfElement* g1_x = NULL; - FfElement* g1_y = NULL; - BigNum* order = NULL; - BigNum* cofactor = NULL; - // h = 1; - const BigNumStr h1 = { - {{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}; - - if (!param || !Fq || !G1) { - return kEpidBadArgErr; - } - do { - // Create G1 - // G1 is an elliptic curve group E(Fq).It can be initialized as follows : - // 1. Set G1 = E(Fq).init(p, q, n = p, h = 1, a = 0, b, g1.x, g1.y). - // a = 0 - // NewFfelement is Identidy - result = NewFfElement(Fq, &fq_a); - if (kEpidNoErr != result) { - break; - } - // b - result = NewFfElement(Fq, &fq_b); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq, ¶m->b, sizeof(param->b), fq_b); - if (kEpidNoErr != result) { - break; - } - // g1.x - result = NewFfElement(Fq, &g1_x); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq, ¶m->g1.x, sizeof(param->g1.x), g1_x); - if (kEpidNoErr != result) { - break; - } - // g1.y - result = NewFfElement(Fq, &g1_y); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq, ¶m->g1.y, sizeof(param->g1.y), g1_y); - if (kEpidNoErr != result) { - break; - } - // order - result = NewBigNum(sizeof(BigNumStr), &order); - if (kEpidNoErr != result) { - break; - } - result = ReadBigNum(¶m->p, sizeof(param->p), order); - if (kEpidNoErr != result) { - break; - } - // cofactor - result = NewBigNum(sizeof(BigNumStr), &cofactor); - if (kEpidNoErr != result) { - break; - } - - result = ReadBigNum(&h1, sizeof(h1), cofactor); - if (kEpidNoErr != result) { - break; - } - result = NewEcGroup(Fq, fq_a, fq_b, g1_x, g1_y, order, cofactor, &ec); - if (kEpidNoErr != result) { - break; - } - *G1 = ec; - result = kEpidNoErr; - } while (0); - - DeleteBigNum(&cofactor); - DeleteBigNum(&order); - DeleteFfElement(&g1_y); - DeleteFfElement(&g1_x); - DeleteFfElement(&fq_b); - DeleteFfElement(&fq_a); - - return result; -} -EpidStatus NewG2(Epid2Params const* param, BigNum* p, BigNum* q, - FiniteField* Fq, FiniteField* Fq2, EcGroup** G2) { - EpidStatus result = kEpidErr; - EcGroup* ec = NULL; - FfElement* a = NULL; - FfElement* b = NULL; - FfElement* fq_param_b = NULL; - FfElement* x = NULL; - FfElement* y = NULL; - BigNum* order = NULL; - BigNum* cofactor = NULL; - if (!param || !Fq || !Fq2 || !G2) { - return kEpidBadArgErr; - } - do { - // 2. Set xi = (xi0, xi1) an element of Fq2. - // 3. Let b', xi' be a temporary variable in Fq2. - // 4. Compute xi' = Fq2.inverse(xi). - // 5. Compute b' = Fq2.mul(xi', b). - result = NewFfElement(Fq2, &b); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq2, ¶m->xi, sizeof(param->xi), b); - if (kEpidNoErr != result) { - break; - } - result = FfInv(Fq2, b, b); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(Fq, &fq_param_b); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq, ¶m->b, sizeof(param->b), fq_param_b); - if (kEpidNoErr != result) { - break; - } - result = FfMul(Fq2, b, fq_param_b, b); // ??? overflow fq2*fq - if (kEpidNoErr != result) { - break; - } - // 6. Set g2.x = (g2.x[0], g2.x[1]) an element of Fq2. - // 7. Set g2.y = (g2.y[0], g2.y[1]) an element of Fq2. - result = NewFfElement(Fq2, &x); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq2, ¶m->g2.x, sizeof(param->g2.x), x); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(Fq2, &y); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq2, ¶m->g2.y, sizeof(param->g2.y), y); - if (kEpidNoErr != result) { - break; - } - // 8. set h = 2q - p, aka cofactor - result = NewBigNum(2 * sizeof(param->q), &cofactor); - if (kEpidNoErr != result) { - break; - } - result = BigNumAdd(q, q, cofactor); - if (kEpidNoErr != result) { - break; - } - result = BigNumSub(cofactor, p, cofactor); - if (kEpidNoErr != result) { - break; - } - // 9. set n = p * h, AKA order - result = NewBigNum(2 * sizeof(param->q), &order); - if (kEpidNoErr != result) { - break; - } - result = BigNumMul(p, cofactor, order); - if (kEpidNoErr != result) { - break; - } - // set a to identity, NewFfElement does it by default - result = NewFfElement(Fq2, &a); - if (kEpidNoErr != result) { - break; - } - // 10. Set G2 = E(Fq2).init(p, param(Fq2), n, h, 0, b', g2.x, g2.y) - result = NewEcGroup(Fq2, a, b, x, y, order, cofactor, &ec); - if (kEpidNoErr != result) { - break; - } - *G2 = ec; - result = kEpidNoErr; - } while (0); - - DeleteBigNum(&cofactor); - DeleteBigNum(&order); - DeleteFfElement(&y); - DeleteFfElement(&x); - DeleteFfElement(&b); - DeleteFfElement(&a); - DeleteFfElement(&fq_param_b); - - return result; -} -EpidStatus NewGT(FiniteField* Fq6, FiniteField** GT) { - EpidStatus result = kEpidErr; - FiniteField* Ff = NULL; - FfElement* v = NULL; - FfElement* neg_v = NULL; - - const Fq6ElemStr v_str = { - {{{{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}, - {{{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}, - {{{{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}}}}; - - if (!Fq6 || !GT) { - return kEpidBadArgErr; - } - do { - result = NewFfElement(Fq6, &v); - if (kEpidNoErr != result) { - break; - } - result = NewFfElement(Fq6, &neg_v); - if (kEpidNoErr != result) { - break; - } - result = ReadFfElement(Fq6, &v_str, sizeof(v_str), v); - if (kEpidNoErr != result) { - break; - } - result = FfNeg(Fq6, v, neg_v); - if (kEpidNoErr != result) { - break; - } - result = NewFiniteFieldViaBinomalExtension(Fq6, neg_v, 2, &Ff); - if (kEpidNoErr != result) { - break; - } - *GT = Ff; - result = kEpidNoErr; - } while (0); - - DeleteFfElement(&v); - DeleteFfElement(&neg_v); - - return result; -} -static void DeleteFp(FiniteField** Fp) { DeleteFiniteField(Fp); } -static void DeleteFq(FiniteField** Fq) { DeleteFiniteField(Fq); } -static void DeleteFq2(FiniteField** Fq2) { DeleteFiniteField(Fq2); } -static void DeleteFq6(FiniteField** Fq6) { DeleteFiniteField(Fq6); } -static void DeleteG1(EcGroup** G1) { DeleteEcGroup(G1); } -static void DeleteG2(EcGroup** G2) { DeleteEcGroup(G2); } -static void DeleteGT(FiniteField** GT) { DeleteFiniteField(GT); } diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params.h deleted file mode 100644 index 22978f387d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params.h +++ /dev/null @@ -1,75 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_SRC_EPID2PARAMS_H_ -#define EPID_COMMON_SRC_EPID2PARAMS_H_ -/*! - * \file - * \brief Intel(R) EPID 2.0 constant parameters interface. - * \addtogroup EpidCommon - * @{ - */ -#include "epid/common/math/bignum.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/pairing.h" - -/// Internal representation of Epid2Params -typedef struct Epid2Params_ { - BigNum* p; ///< a prime - BigNum* q; ///< a prime - BigNum* t; ///< an integer - bool neg; ///< a boolean - FfElement* xi; ///< array of integers between [0, q-1] - EcPoint* g1; ///< a generator (an element) of G1 - EcPoint* g2; ///< a generator (an element) of G2 - - FiniteField* Fp; ///< Finite field Fp - - FiniteField* Fq; ///< Finite field Fq - FiniteField* Fq2; ///< Finite field Fq2 - FiniteField* Fq6; ///< Finite field Fq6 - FiniteField* GT; ///< Finite field GT(Fq12 ) - - EcGroup* G1; ///< Elliptic curve group over finite field Fq - EcGroup* G2; ///< Elliptic curve group over finite field Fq2 - - PairingState* pairing_state; ///< Pairing state -} Epid2Params_; - -/// Constructs the internal representation of Epid2Params -/*! - Allocates memory for the internal representation of Epid2Params. Initialize - the Epid2Params. Use DeleteEpid2Params() to deallocate memory. - - \param[in,out] params - Internal Epid2Params - - \returns ::EpidStatus - \see DeleteEpid2Params -*/ -EpidStatus CreateEpid2Params(Epid2Params_** params); -/// Deallocates storage for internal representation of Epid2Params -/*! - Frees the memory and nulls the pointer. - - \param[in,out] epid_params - params to be deallocated - - \see CreateEpid2Params -*/ -void DeleteEpid2Params(Epid2Params_** epid_params); -/*! @} */ -#endif // EPID_COMMON_SRC_EPID2PARAMS_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params_ate.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params_ate.inc deleted file mode 100644 index c13c95de68..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/epid2params_ate.inc +++ /dev/null @@ -1,111 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Intel(R) EPID 2.0 constant parameters data. - * - */ - - {{{ // p - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, - 0x46, 0xE5, 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9E, - 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, 0x92, 0x1A, - 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D, - }}}, - {{{ // q - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, - 0x46, 0xE5, 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9F, - 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, - 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x13, - }}}, - {{{ // b - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, - }}}, - {{ // t - 0x68, 0x82, 0xF5, 0xC0, 0x30, 0xB0, 0xA8, 0x01, - }}, - {{ // neg - 0x01, - }}, - {{{ // beta - 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, - 0x46, 0xE5, 0xF2, 0x5E, 0xEE, 0x71, 0xA4, 0x9F, - 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x98, 0x0A, 0x82, - 0xD3, 0x29, 0x2D, 0xDB, 0xAE, 0xD3, 0x30, 0x12, - }}}, - { - {{{ // xi0 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - }}}, - {{{ // xi1 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - }}} - }, - { // g1 *********EPIDG1Element - {{{ // x - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 - }}}, - {{{ // y - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, - }}}, - }, - { // g2 *********EPIDG2Element - { - {{{ // x0 - 0xE2, 0x01, 0x71, 0xC5, 0x4A, 0xA3, 0xDA, 0x05, - 0x21, 0x67, 0x04, 0x13, 0x74, 0x3C, 0xCF, 0x22, - 0xD2, 0x5D, 0x52, 0x68, 0x3D, 0x32, 0x47, 0x0E, - 0xF6, 0x02, 0x13, 0x43, 0xBF, 0x28, 0x23, 0x94, - }}}, - {{{ // x1 - 0x59, 0x2D, 0x1E, 0xF6, 0x53, 0xA8, 0x5A, 0x80, - 0x46, 0xCC, 0xDC, 0x25, 0x4F, 0xBB, 0x56, 0x56, - 0x43, 0x43, 0x3B, 0xF6, 0x28, 0x96, 0x53, 0xE2, - 0x7D, 0xF7, 0xB2, 0x12, 0xBA, 0xA1, 0x89, 0xBE, - }}} - }, - { - {{{ // y0 - 0xAE, 0x60, 0xA4, 0xE7, 0x51, 0xFF, 0xD3, 0x50, - 0xC6, 0x21, 0xE7, 0x03, 0x31, 0x28, 0x26, 0xBD, - 0x55, 0xE8, 0xB5, 0x9A, 0x4D, 0x91, 0x68, 0x38, - 0x41, 0x4D, 0xB8, 0x22, 0xDD, 0x23, 0x35, 0xAE, - }}}, - {{{ // y1 - 0x1A, 0xB4, 0x42, 0xF9, 0x89, 0xAF, 0xE5, 0xAD, - 0xF8, 0x02, 0x74, 0xF8, 0x76, 0x45, 0xE2, 0x53, - 0x2C, 0xDC, 0x61, 0x81, 0x90, 0x93, 0xD6, 0x13, - 0x2C, 0x90, 0xFE, 0x89, 0x51, 0xB9, 0x24, 0x21, - }}} - }, - } diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/errors.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/errors.c deleted file mode 100644 index 8f364baf9a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/errors.c +++ /dev/null @@ -1,66 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Error reporting implementation. - */ - -#include - -#include "epid/common/stdtypes.h" -#include "epid/common/errors.h" - -/// Record mapping status code to string -struct ErrorTextEntry { - /// error code - EpidStatus value; - /// string associated with error code - char const* text; -}; - -/// Mapping of status codes to strings -static const struct ErrorTextEntry kEnumToText[] = { - {kEpidNoErr, "no error"}, - {kEpidErr, "unspecified error"}, - {kEpidSigInvalid, "invalid signature"}, - {kEpidSigRevokedInGroupRl, "signature revoked in GroupRl"}, - {kEpidSigRevokedInPrivRl, "signature revoked in PrivRl"}, - {kEpidSigRevokedInSigRl, "signature revoked in SigRl"}, - {kEpidSigRevokedInVerifierRl, "signature revoked in VerifierRl"}, - {kEpidNotImpl, "not implemented"}, - {kEpidBadArgErr, "bad arguments"}, - {kEpidNoMemErr, "could not allocate memory"}, - {kEpidMemAllocErr, "insufficient memory provided"}, - {kEpidMathErr, "internal math error"}, - {kEpidDivByZeroErr, "attempt to divide by zero"}, - {kEpidUnderflowErr, "underflow"}, - {kEpidHashAlgorithmNotSupported, "unsupported hash algorithm type"}, - {kEpidRandMaxIterErr, "reached max iteration for random number generation"}, - {kEpidDuplicateErr, "argument would add duplicate entry"}, - {kEpidInconsistentBasenameSetErr, - "the set basename is inconsistent with supplied parameters"}}; - -char const* EpidStatusToString(EpidStatus e) { - size_t i = 0; - const size_t num_entries = sizeof(kEnumToText) / sizeof(kEnumToText[0]); - for (i = 0; i < num_entries; i++) { - if (e == kEnumToText[i].value) { - return kEnumToText[i].text; - } - } - return "unknown error"; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/file_parser-internal.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/file_parser-internal.h deleted file mode 100644 index 2a1d88c7f9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/file_parser-internal.h +++ /dev/null @@ -1,47 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/// Internal functions of Epid issuer material parsing utilities. -/*! - * \file - */ -#ifndef EPID_COMMON_SRC_FILE_PARSER_INTERNAL_H_ -#define EPID_COMMON_SRC_FILE_PARSER_INTERNAL_H_ - -#include - -#include "epid/common/file_parser.h" -#include "epid/common/types.h" -#include "epid/common/errors.h" - -/// Verifies CA certificate to contain EC secp256r1 parameters -/*! - -Verifies that certificate contains EC secp256r1 parameters, -creates static copies of these parameters and compares them with -ones in cert. Also verifies that certificate contains correct file header. - -\param[in] cert -The issuing CA public key certificate. - -\returns ::EpidStatus - -\retval ::kEpidBadArgErr -Verification failed. - -*/ -EpidStatus EpidVerifyCaCertificate(EpidCaCertificate const* cert); - -#endif // EPID_COMMON_SRC_FILE_PARSER_INTERNAL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/file_parser.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/file_parser.c deleted file mode 100644 index b452f8d89c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/file_parser.c +++ /dev/null @@ -1,335 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Implementation of issuer material file parsing utilities. - * - */ -#include "epid/common/file_parser.h" - -#include - -#include "epid/common/math/ecdsa.h" -#include "epid/common/src/memory.h" -#include "epid/common/src/file_parser-internal.h" - -const OctStr16 kEpidVersionCode[kNumEpidVersions] = { - {0x01, 0x00}, {0x02, 0x00}, -}; - -const OctStr16 kEpidFileTypeCode[kNumFileTypes] = { - {0x00, 0x11}, {0x00, 0x0C}, {0x00, 0x0D}, {0x00, 0x0E}, - {0x00, 0x0F}, {0x00, 0x03}, {0x00, 0x0B}, {0x00, 0x13}, -}; - -/// Intel(R) EPID 2.0 Group Public Key binary format -typedef struct EpidGroupPubKeyCertificate { - EpidFileHeader header; ///< Intel(R) EPID binary file header - GroupId gid; ///< group ID - G1ElemStr h1; ///< an element in G1 - G1ElemStr h2; ///< an element in G1 - G2ElemStr w; ///< an element in G2 - EcdsaSignature signature; ///< ECDSA Signature on SHA-256 of above values -} EpidGroupPubKeyCertificate; - -/// Intel(R) EPID version -static const OctStr16 kEpidVersion = {0x02, 0x00}; - -/// Verify that certificate contains of EC secp256r1 parameters -EpidStatus EpidVerifyCaCertificate(EpidCaCertificate const* cert) { - // Prime of GF(p) for secp256r1 - static const unsigned char secp256r1_p[] = { - // 2^256 -2^224 +2^192 +2^96 -1 - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - - // Coefficient of E Curve secp256r1 - static const unsigned char secp256r1_a[] = { - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc}; - - // Coefficient of E Curve secp256r1 - static const unsigned char secp256r1_b[] = { - 0x5a, 0xc6, 0x35, 0xd8, 0xaa, 0x3a, 0x93, 0xe7, 0xb3, 0xeb, 0xbd, - 0x55, 0x76, 0x98, 0x86, 0xbc, 0x65, 0x1d, 0x06, 0xb0, 0xcc, 0x53, - 0xb0, 0xf6, 0x3b, 0xce, 0x3c, 0x3e, 0x27, 0xd2, 0x60, 0x4b}; - - // X coordinate of Base point G of secp256r1 - static const unsigned char secp256r1_gx[] = { - 0x6b, 0x17, 0xd1, 0xf2, 0xe1, 0x2c, 0x42, 0x47, 0xf8, 0xbc, 0xe6, - 0xe5, 0x63, 0xa4, 0x40, 0xf2, 0x77, 0x03, 0x7d, 0x81, 0x2d, 0xeb, - 0x33, 0xa0, 0xf4, 0xa1, 0x39, 0x45, 0xd8, 0x98, 0xc2, 0x96}; - - // Y coordinate of Base point G of secp256r1 - static const unsigned char secp256r1_gy[] = { - 0x4f, 0xe3, 0x42, 0xe2, 0xfe, 0x1a, 0x7f, 0x9b, 0x8e, 0xe7, 0xeb, - 0x4a, 0x7c, 0x0f, 0x9e, 0x16, 0x2b, 0xce, 0x33, 0x57, 0x6b, 0x31, - 0x5e, 0xce, 0xcb, 0xb6, 0x40, 0x68, 0x37, 0xbf, 0x51, 0xf5}; - - // Order of base point of secp256r1 - static const unsigned char secp256r1_r[] = { - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xbc, 0xe6, 0xfa, 0xad, 0xa7, 0x17, - 0x9e, 0x84, 0xf3, 0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x51, - }; - - if (!cert) return kEpidBadArgErr; - - // Verify that certificate contains of correct file header - if (0 != - memcmp(&cert->header.epid_version, &kEpidVersion, sizeof(kEpidVersion))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&cert->header.file_type, - &kEpidFileTypeCode[kIssuingCaPubKeyFile], - sizeof(cert->header.file_type))) { - return kEpidBadArgErr; - } - - // Verify that certificate contains of EC secp256r1 parameters - if (0 != memcmp(&cert->prime, secp256r1_p, sizeof(secp256r1_p))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&cert->a, secp256r1_a, sizeof(secp256r1_a))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&cert->b, secp256r1_b, sizeof(secp256r1_b))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&cert->x, secp256r1_gx, sizeof(secp256r1_gx))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&cert->y, secp256r1_gy, sizeof(secp256r1_gy))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&cert->r, secp256r1_r, sizeof(secp256r1_r))) { - return kEpidBadArgErr; - } - - return kEpidNoErr; -} - -EpidStatus EpidParseFileHeader(void const* buf, size_t len, - EpidVersion* epid_version, - EpidFileType* file_type) { - EpidFileHeader* header = (EpidFileHeader*)buf; - if (!buf || len < sizeof(EpidFileHeader)) return kEpidBadArgErr; - - if (epid_version) { - if (0 == memcmp((void*)&header->epid_version, &kEpidVersionCode[kEpid1x], - sizeof(header->epid_version))) { - *epid_version = kEpid1x; - } else if (0 == memcmp((void*)&header->epid_version, - &kEpidVersionCode[kEpid2x], - sizeof(header->epid_version))) { - *epid_version = kEpid2x; - } else { - // set default value - *epid_version = kNumEpidVersions; - } - } - if (file_type) { - if (0 == memcmp((void*)&header->file_type, - &kEpidFileTypeCode[kIssuingCaPubKeyFile], - sizeof(header->file_type))) { - *file_type = kIssuingCaPubKeyFile; - } else if (0 == memcmp((void*)&header->file_type, - &kEpidFileTypeCode[kGroupPubKeyFile], - sizeof(header->file_type))) { - *file_type = kGroupPubKeyFile; - } else if (0 == memcmp((void*)&header->file_type, - &kEpidFileTypeCode[kPrivRlFile], - sizeof(header->file_type))) { - *file_type = kPrivRlFile; - } else if (0 == memcmp((void*)&header->file_type, - &kEpidFileTypeCode[kSigRlFile], - sizeof(header->file_type))) { - *file_type = kSigRlFile; - } else if (0 == memcmp((void*)&header->file_type, - &kEpidFileTypeCode[kGroupRlFile], - sizeof(header->file_type))) { - *file_type = kGroupRlFile; - } else if (0 == memcmp((void*)&header->file_type, - &kEpidFileTypeCode[kPrivRlRequestFile], - sizeof(header->file_type))) { - *file_type = kPrivRlRequestFile; - } else if (0 == memcmp((void*)&header->file_type, - &kEpidFileTypeCode[kSigRlRequestFile], - sizeof(header->file_type))) { - *file_type = kSigRlRequestFile; - } else if (0 == memcmp((void*)&header->file_type, - &kEpidFileTypeCode[kGroupRlRequestFile], - sizeof(header->file_type))) { - *file_type = kGroupRlRequestFile; - } else { - // set default value - *file_type = kNumFileTypes; - } - } - return kEpidNoErr; -} - -/// Parse a file with a revocation list of any type -static EpidStatus EpidParseRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, void* rl, - size_t* rl_len, EpidFileType file_type) { - size_t min_rl_file_size = 0; - size_t empty_rl_size = 0; - size_t rl_entry_size = 0; - EpidStatus result = kEpidErr; - EpidFileHeader const* file_header = (EpidFileHeader*)buf; - void const* buf_rl = - (void const*)((unsigned char*)buf + sizeof(EpidFileHeader)); - size_t buf_rl_len = 0; - EcdsaSignature const* signature = NULL; - - if (!buf || !cert || !rl_len) return kEpidBadArgErr; - - switch (file_type) { - case kPrivRlFile: - empty_rl_size = sizeof(PrivRl) - sizeof(((PrivRl*)0)->f[0]); - rl_entry_size = sizeof(((PrivRl*)0)->f[0]); - min_rl_file_size = sizeof(EpidFileHeader) + sizeof(PrivRl) - - sizeof(((PrivRl*)0)->f[0]) + sizeof(EcdsaSignature); - break; - case kSigRlFile: - empty_rl_size = sizeof(SigRl) - sizeof(((SigRl*)0)->bk[0]); - rl_entry_size = sizeof(((SigRl*)0)->bk[0]); - min_rl_file_size = sizeof(EpidFileHeader) + sizeof(SigRl) - - sizeof(((SigRl*)0)->bk[0]) + sizeof(EcdsaSignature); - break; - case kGroupRlFile: - empty_rl_size = sizeof(GroupRl) - sizeof(((GroupRl*)0)->gid[0]); - rl_entry_size = sizeof(((GroupRl*)0)->gid[0]); - min_rl_file_size = sizeof(EpidFileHeader) + sizeof(GroupRl) - - sizeof(((GroupRl*)0)->gid[0]) + sizeof(EcdsaSignature); - break; - default: - return kEpidErr; - } - - if (min_rl_file_size > len) return kEpidBadArgErr; - - // Verify that Intel(R) EPID file header in the buffer is correct - if (0 != - memcmp(&file_header->epid_version, &kEpidVersion, sizeof(kEpidVersion))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&file_header->file_type, &kEpidFileTypeCode[file_type], - sizeof(file_header->file_type))) { - return kEpidBadArgErr; - } - - // Verify that CA certificate is correct - result = EpidVerifyCaCertificate(cert); - if (kEpidNoErr != result) return result; - - // Verify that RL in file buffer contains of integer number of entries - buf_rl_len = len - sizeof(EpidFileHeader) - sizeof(EcdsaSignature); - if (0 != ((buf_rl_len - empty_rl_size) % rl_entry_size)) { - return kEpidBadArgErr; - } - - signature = - (EcdsaSignature*)((unsigned char*)buf + len - sizeof(EcdsaSignature)); - // Authenticate signature for buffer - result = EcdsaVerifyBuffer(buf, len - sizeof(EcdsaSignature), - (EcdsaPublicKey*)&cert->pubkey, signature); - if (kEpidSigValid != result) return result; - - buf_rl_len = len - sizeof(EpidFileHeader) - sizeof(EcdsaSignature); - - // If pointer to output buffer is NULL it should return required size of RL - if (!rl) { - *rl_len = buf_rl_len; - return kEpidNoErr; - } - - if (*rl_len < buf_rl_len) return kEpidBadArgErr; - *rl_len = buf_rl_len; - - // Copy revocation list from file buffer to output - // Memory copy is used to copy a revocation list of variable length - if (0 != memcpy_S(rl, *rl_len, buf_rl, buf_rl_len)) return kEpidBadArgErr; - - return kEpidNoErr; -} - -EpidStatus EpidParseGroupPubKeyFile(void const* buf, size_t len, - EpidCaCertificate const* cert, - GroupPubKey* pubkey) { - EpidStatus result; - EpidGroupPubKeyCertificate* buf_pubkey = (EpidGroupPubKeyCertificate*)buf; - - if (!buf || !cert || !pubkey) { - return kEpidBadArgErr; - } - - if (sizeof(EpidGroupPubKeyCertificate) > len) { - return kEpidBadArgErr; - } - - // Verify that Intel(R) EPID file header in the buffer is correct - if (0 != memcmp(&buf_pubkey->header.epid_version, &kEpidVersion, - sizeof(kEpidVersion))) { - return kEpidBadArgErr; - } - if (0 != memcmp(&buf_pubkey->header.file_type, - &kEpidFileTypeCode[kGroupPubKeyFile], - sizeof(buf_pubkey->header.file_type))) { - return kEpidBadArgErr; - } - - // Verify that CA certificate is correct - result = EpidVerifyCaCertificate(cert); - if (kEpidNoErr != result) return result; - - // Authenticate signature for buffer - result = EcdsaVerifyBuffer( - buf_pubkey, sizeof(EpidGroupPubKeyCertificate) - sizeof(EcdsaSignature), - (EcdsaPublicKey*)&cert->pubkey, &buf_pubkey->signature); - if (kEpidSigValid != result) return result; - - // Copy public from the buffer to output - pubkey->gid = buf_pubkey->gid; - pubkey->h1 = buf_pubkey->h1; - pubkey->h2 = buf_pubkey->h2; - pubkey->w = buf_pubkey->w; - - return kEpidNoErr; -} - -EpidStatus EpidParsePrivRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, PrivRl* rl, - size_t* rl_len) { - return EpidParseRlFile(buf, len, cert, rl, rl_len, kPrivRlFile); -} - -EpidStatus EpidParseSigRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, SigRl* rl, - size_t* rl_len) { - return EpidParseRlFile(buf, len, cert, rl, rl_len, kSigRlFile); -} - -EpidStatus EpidParseGroupRlFile(void const* buf, size_t len, - EpidCaCertificate const* cert, GroupRl* rl, - size_t* rl_len) { - return EpidParseRlFile(buf, len, cert, rl, rl_len, kGroupRlFile); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/grouppubkey.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/grouppubkey.c deleted file mode 100644 index 8a2752f314..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/grouppubkey.c +++ /dev/null @@ -1,86 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Group public key implementation. - */ -#include "epid/common/src/grouppubkey.h" -#include "epid/common/src/memory.h" - -EpidStatus CreateGroupPubKey(GroupPubKey const* pub_key_str, EcGroup* G1, - EcGroup* G2, GroupPubKey_** pub_key) { - EpidStatus result = kEpidErr; - GroupPubKey_* pubkey = NULL; - if (!pub_key_str || !G1 || !G2 || !pub_key) { - return kEpidBadArgErr; - } - do { - pubkey = SAFE_ALLOC(sizeof(GroupPubKey_)); - if (!pubkey) { - result = kEpidMemAllocErr; - break; - } - result = NewEcPoint(G1, &pubkey->h1); - if (kEpidNoErr != result) { - break; - } - result = - ReadEcPoint(G1, &pub_key_str->h1, sizeof(pub_key_str->h1), pubkey->h1); - if (kEpidNoErr != result) { - break; - } - result = NewEcPoint(G1, &pubkey->h2); - if (kEpidNoErr != result) { - break; - } - result = - ReadEcPoint(G1, &pub_key_str->h2, sizeof(pub_key_str->h2), pubkey->h2); - if (kEpidNoErr != result) { - break; - } - result = NewEcPoint(G2, &pubkey->w); - if (kEpidNoErr != result) { - break; - } - result = - ReadEcPoint(G2, &pub_key_str->w, sizeof(pub_key_str->w), pubkey->w); - if (kEpidNoErr != result) { - break; - } - pubkey->gid = pub_key_str->gid; - *pub_key = pubkey; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result && pubkey) { - DeleteEcPoint(&pubkey->w); - DeleteEcPoint(&pubkey->h2); - DeleteEcPoint(&pubkey->h1); - SAFE_FREE(pubkey); - } - return result; -} - -void DeleteGroupPubKey(GroupPubKey_** pub_key) { - if (pub_key && *pub_key) { - DeleteEcPoint(&(*pub_key)->w); - DeleteEcPoint(&(*pub_key)->h2); - DeleteEcPoint(&(*pub_key)->h1); - - SAFE_FREE(*pub_key); - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/grouppubkey.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/grouppubkey.h deleted file mode 100644 index a47ebcba3d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/grouppubkey.h +++ /dev/null @@ -1,67 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_SRC_GROUPPUBKEY_H_ -#define EPID_COMMON_SRC_GROUPPUBKEY_H_ -/*! - * \file - * \brief Group public key interface. - * \addtogroup EpidCommon - * @{ - */ -#include "epid/common/errors.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/types.h" - -/// Internal representation of GroupPubKey -typedef struct GroupPubKey_ { - GroupId gid; ///< group ID - EcPoint* h1; ///< an element in G1 - EcPoint* h2; ///< an element in G1 - EcPoint* w; ///< an element in G2 -} GroupPubKey_; - -/// Constructs internal representation of GroupPubKey -/*! - Allocates memory and initializes gid, h1, h2, w parameters. Use - DeleteGroupPubKey() to deallocate memory - - \param[in] pub_key_str - Oct string representation of group public key - \param[in] G1 - EcGroup containing elements h1 and h2 - \param[in] G2 - EcGroup containing element w - \param[out] pub_key - Group public key: (gid, h1, h2, w) - - \returns ::EpidStatus - \see DeleteGroupPubKey -*/ -EpidStatus CreateGroupPubKey(GroupPubKey const* pub_key_str, EcGroup* G1, - EcGroup* G2, GroupPubKey_** pub_key); - -/// Deallocates storage for internal representation of GroupPubKey -/*! - Frees memory pointed to by Group public key. Nulls the pointer. - - \param[in] pub_key - Group public key to be freed - - \see CreateGroupPubKey -*/ -void DeleteGroupPubKey(GroupPubKey_** pub_key); -/*! @} */ -#endif // EPID_COMMON_SRC_GROUPPUBKEY_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/memory.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/memory.c deleted file mode 100644 index b37180fbeb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/memory.c +++ /dev/null @@ -1,123 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Memory access implementation. - */ - -#include "epid/common/src/memory.h" - -#include -#include - -/// Maximum size of the destination buffer -#ifndef RSIZE_MAX -#define RSIZE_MAX ((SIZE_MAX) >> 1) -#endif - -#ifndef MIN -/// Evaluate to minimum of two values -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif // MIN - -/// Copies count of character from dest to src -/*! \note Implementation follows C11 memcpy_s but with checks always enabled - */ -int memcpy_S(void* dest, size_t destsz, void const* src, size_t count) { - size_t i; - if (!dest || destsz > RSIZE_MAX) return -1; - if (!src || count > RSIZE_MAX || count > destsz || - count > (dest > src ? ((uintptr_t)dest - (uintptr_t)src) - : ((uintptr_t)src - (uintptr_t)dest))) { - // zero out dest if error detected - memset(dest, 0, destsz); - return -1; - } - - for (i = 0; i < count; i++) ((uint8_t*)dest)[i] = ((uint8_t*)src)[i]; - return 0; -} - -void EpidZeroMemory(void* ptr, size_t size) { memset(ptr, 0, size); } - -#if defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) - -#if !defined(EPID_ALLOC_ALIGN) -/// Alignment constant for EpidAlloc, must be a power of two -#define EPID_ALLOC_ALIGN sizeof(size_t) -#endif // !defined(EPID_ALLOC_ALIGN) - -#pragma pack(1) -/// Allocated memory block information -typedef struct EpidAllocHeader { - size_t length; ///< number of bytes memory block is allocated for - void* ptr; ///< pointer to whole memory block including EpidAllocHeader -} EpidAllocHeader; -#pragma pack() - -#endif // defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) - -void* EpidAlloc(size_t size) { -#if defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) - void* ptr = NULL; - if (size <= 0) return NULL; - // Allocate memory enough to store size bytes and EpidAllocHeader - ptr = calloc(1, size + EPID_ALLOC_ALIGN - 1 + sizeof(EpidAllocHeader)); - if (ptr) { - void* aligned_pointer = (void*)(((uintptr_t)ptr + EPID_ALLOC_ALIGN + - sizeof(EpidAllocHeader) - 1) & - (~(EPID_ALLOC_ALIGN - 1))); - ((EpidAllocHeader*)aligned_pointer)[-1].length = size; - ((EpidAllocHeader*)aligned_pointer)[-1].ptr = ptr; - return aligned_pointer; - } - return NULL; -#else // defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) - return calloc(1, size); -#endif // defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) -} - -void* EpidRealloc(void* ptr, size_t new_size) { -#if defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) - void* new_ptr = EpidAlloc(new_size); - if (!new_ptr) return NULL; - if (ptr) { - // Memory copy is used to copy a buffer of variable length - if (0 != memcpy_S(new_ptr, ((EpidAllocHeader*)new_ptr)[-1].length, ptr, - MIN(((EpidAllocHeader*)ptr)[-1].length, - ((EpidAllocHeader*)new_ptr)[-1].length))) { - EpidFree(new_ptr); - return NULL; - } - EpidFree(ptr); - } - return new_ptr; -#else // defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) - return realloc(ptr, new_size); -#endif // defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) -} - -void EpidFree(void* ptr) { -#if defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) - if (ptr) { - EpidZeroMemory(ptr, ((EpidAllocHeader*)ptr)[-1].length); - free(((EpidAllocHeader*)ptr)[-1].ptr); - } -#else // defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) - free(ptr); -#endif // defined(EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE) -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/memory.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/memory.h deleted file mode 100644 index 8c2fd7ff18..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/memory.h +++ /dev/null @@ -1,123 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_SRC_MEMORY_H_ -#define EPID_COMMON_SRC_MEMORY_H_ - -#include -#include - -/*! - * \file - * \brief Memory access interface. - * \addtogroup EpidCommon - * @{ - */ - -/// When enabled secrets are wiped out from the memory by EpidFree -#define EPID_ENABLE_EPID_ZERO_MEMORY_ON_FREE - -/// Clear information stored in block of memory pointer to by ptr -/*! - - \warning - This function may be optimized away by some compilers. If it is, you - should consider using a compiler or operating system specific memory - sanitization function (e.g. memcpy_s or SecureZeroMemory). - - \param[in] ptr - pointer to memory block - \param[in] size - number of bytes to clear - */ -void EpidZeroMemory(void* ptr, size_t size); - -/// Allocates memory of size bytes -/*! - The content of memory is initialized with zeros. - Memory must be freed with EpidFree function. - - \param[in] size - number of bytes to allocate - - \returns pointer to allocated memory. - */ -void* EpidAlloc(size_t size); - -/// Reallocates memory allocated by EpidAlloc -/*! - In case of error NULL pointer is returned and input memory block - is not changed. - Memory must be freed with EpidFree function. - - \param[in] ptr - pointer to memory block to reallocate - \param[in] new_size - number of bytes to reallocate for - - \returns pointer to allocated memory. - */ -void* EpidRealloc(void* ptr, size_t new_size); - -/// Frees memory allocated by EpidAlloc -/*! - Clears information stored in the block of memory. - - \param[in] ptr - pointer to allocated memory block - */ -void EpidFree(void* ptr); - -#if !defined(SAFE_ALLOC) -/// Allocates zero initalized block of memory -#define SAFE_ALLOC(size) EpidAlloc(size); -#endif // !defined(SAFE_ALLOC) -#if !defined(SAFE_FREE) -/// Deallocates space allocated by SAFE_ALLOC() and nulls pointer -#define SAFE_FREE(ptr) \ - { \ - if (NULL != (ptr)) { \ - EpidFree(ptr); \ - (ptr) = NULL; \ - } \ - } -#endif // !defined(SAFE_FREE) - -#if !defined(SAFE_REALLOC) -/// Changes the size of the memory block pointed to by ptr -#define SAFE_REALLOC(ptr, size) EpidRealloc((ptr), (size)) -#endif // !defined(SAFE_REALLOC) - -/// Copies bytes between buffers with security ehancements -/*! - Copies count bytes from src to dest. If the source and destination - overlap, the behavior is undefined. - - \param[out] dest - pointer to the object to copy to - \param[in] destsz - max number of bytes to modify in the destination (typically the size - of the destination object) - \param[in] src - pointer to the object to copy from - \param[in] count - number of bytes to copy - - \returns zero on success and non-zero value on error. - */ -int memcpy_S(void* dest, size_t destsz, void const* src, size_t count); - -/*! @} */ -#endif // EPID_COMMON_SRC_MEMORY_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/sigrlvalid.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/sigrlvalid.c deleted file mode 100644 index 9287648fb4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/sigrlvalid.c +++ /dev/null @@ -1,46 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief SigRl validity checking implementation. - */ - -#include - -#include "epid/common/src/endian_convert.h" -#include "epid/common/src/sigrlvalid.h" - -bool IsSigRlValid(GroupId const* gid, SigRl const* sig_rl, size_t sig_rl_size) { - const size_t kMinSigRlSize = sizeof(SigRl) - sizeof(SigRlEntry); - size_t input_sig_rl_size = 0; - if (!gid || !sig_rl || kMinSigRlSize > sig_rl_size) { - return false; - } - if (ntohl(sig_rl->n2) > (SIZE_MAX - kMinSigRlSize) / sizeof(sig_rl->bk[0])) { - return false; - } - // sanity check of intput SigRl size - input_sig_rl_size = kMinSigRlSize + ntohl(sig_rl->n2) * sizeof(sig_rl->bk[0]); - if (input_sig_rl_size != sig_rl_size) { - return false; - } - // verify that gid given and gid in SigRl match - if (0 != memcmp(gid, &sig_rl->gid, sizeof(*gid))) { - return false; - } - return true; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/sigrlvalid.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/sigrlvalid.h deleted file mode 100644 index 610abaadb7..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/sigrlvalid.h +++ /dev/null @@ -1,46 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_SRC_SIGRLVALID_H_ -#define EPID_COMMON_SRC_SIGRLVALID_H_ -/*! - * \file - * \brief SigRl validity checking interface. - * \addtogroup EpidCommon - * @{ - */ - -#include - -#include "epid/common/stdtypes.h" -#include "epid/common/types.h" - -/// Function to verify if signature based revocation list is valid -/*! - - \param[in] gid - Group id - \param[in] sig_rl - Signature based revocation list - \param[in] sig_rl_size - Size of signature based revocation list - - \returns true if revocation list is valid - \returns false if revocation list is invalid -*/ -bool IsSigRlValid(GroupId const* gid, SigRl const* sig_rl, size_t sig_rl_size); - -/*! @} */ -#endif // EPID_COMMON_SRC_SIGRLVALID_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/stack.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/stack.c deleted file mode 100644 index 39911ae543..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/stack.c +++ /dev/null @@ -1,93 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Stack container implementation. - */ -#include -#include "epid/common/src/stack.h" -#include "epid/common/src/memory.h" - -/// Internal representation of a Stack -struct Stack { - size_t element_size; ///< Size of element in bytes - void* buf; ///< Buffer to store elements - size_t max_size; ///< Numbers of elements buffer was allocated to - size_t top; ///< Stack top, the number of elements in the stack -}; - -bool CreateStack(size_t element_size, Stack** stack) { - if (!stack || 0 == element_size) return false; - *stack = SAFE_ALLOC(sizeof(Stack)); - if (!*stack) return false; - (*stack)->element_size = element_size; - return true; -} - -void* StackPushN(Stack* stack, size_t n, void* elements) { - if (!stack) return 0; - if (n > 0) { - size_t max_size_required = stack->top + n; - if (n > (SIZE_MAX / stack->element_size) - stack->top) - return 0; // integer overflow - if (max_size_required > stack->max_size) { - void* reallocated = - SAFE_REALLOC(stack->buf, max_size_required * stack->element_size); - if (!reallocated) return 0; - stack->buf = reallocated; - stack->max_size = max_size_required; - } - if (elements) { - // Memory copy is used to copy variable number of elements to stack - if (0 != memcpy_S((uint8_t*)stack->buf + stack->top * stack->element_size, - (stack->max_size - stack->top) * stack->element_size, - elements, n * stack->element_size)) { - return 0; - } - } - stack->top += n; - } - return (uint8_t*)stack->buf + (stack->top - n) * stack->element_size; -} - -bool StackPopN(Stack* stack, size_t n, void* elements) { - if (!stack) return false; - if (n > 0) { - if (n > stack->top) return false; - if (elements) { - // Memory copy is used to copy variable number of elements from stack - if (0 != memcpy_S(elements, n * stack->element_size, - (uint8_t*)stack->buf + - (stack->top - n) * stack->element_size, - n * stack->element_size)) { - return false; - } - stack->top -= n; - } - } - return true; -} - -size_t StackGetSize(Stack const* stack) { - return stack ? stack->top : (size_t)0; -} - -void DeleteStack(Stack** stack) { - if (stack && *stack) { - SAFE_FREE((*stack)->buf); - SAFE_FREE(*stack); - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/stack.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/stack.h deleted file mode 100644 index 7b13832487..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/src/stack.h +++ /dev/null @@ -1,95 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_SRC_STACK_H_ -#define EPID_COMMON_SRC_STACK_H_ -/*! - * \file - * \brief Stack container interface. - * \addtogroup EpidCommon - * @{ - */ -#include -#include "epid/common/stdtypes.h" - -/// A stack -typedef struct Stack Stack; - -/// Create stack -/*! - \param[in] element_size - Size of stack element - \param[out] stack - Stack context to be created - - \returns true is operation succeed, false if stack were failed to allocate - - \see DeleteStack -*/ -bool CreateStack(size_t element_size, Stack** stack); - -/// Push multiple elements to the stack -/*! - \param[in,out] stack - Stack context - \param[in] n - Number of elements to push to the stack - \param[in] elements - Array of elements to push to the stack. Can be NULL - - \returns A pointer to an array of new elements in the stack or NULL if - stack is empty or push operation were failed. - - \see CreateStack -*/ -void* StackPushN(Stack* stack, size_t n, void* elements); - -/// Pop multiple elements from the stack -/*! - \param[in,out] stack - Stack context - \param[in] n - Number of elements to pop from the stack - \param[out] elements - Pointer to a buffer to store elements removed from the stack - - \returns true is operation succeed, false otherwise - - \see CreateStack -*/ -bool StackPopN(Stack* stack, size_t n, void* elements); - -/// Get number of elements in the stack -/*! - \param[in] stack - Stack context - - \returns Number of elements in the stack or 0 if stack is NULL - - \see CreateStack -*/ -size_t StackGetSize(Stack const* stack); - -/// Deallocates memory used for the stack. -/*! - \param[in,out] stack - Stack context - - \see CreateStack -*/ -void DeleteStack(Stack** stack); - -/*! @} */ -#endif // EPID_COMMON_SRC_STACK_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/stdtypes.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/stdtypes.h deleted file mode 100644 index 3bc05e3714..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/stdtypes.h +++ /dev/null @@ -1,39 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_STDTYPES_H_ -#define EPID_COMMON_STDTYPES_H_ - -/*! - * \file - * \brief C99 standard data types. - */ - -#include // Fixed-width integer types - -#ifndef __cplusplus -#ifndef _Bool -/// C99 standard name for bool -#define _Bool char -/// Boolean type -typedef char bool; -/// integer constant 1 -#define true 1 -/// integer constant 0 -#define false 0 -#endif // -#endif // ifndef __cplusplus - -#endif // EPID_COMMON_STDTYPES_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/types.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/types.h deleted file mode 100644 index 19e710ec12..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/types.h +++ /dev/null @@ -1,345 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_COMMON_TYPES_H_ -#define EPID_COMMON_TYPES_H_ - -#include // for CHAR_BIT - -/*! - * \file - * \brief SDK data types. -*/ - -/// SDK data types. -/*! - \defgroup EpidTypes types - Defines serialized data types used by the SDK. - - Most of the types defined here are fixed size binary buffers of various sizes - that are semantically mapped to the types of various inputs to the - Intel(R) EPID APIs. - - For example ::GtElemStr is a 384 byte buffer that represents a serialized - value that is compatible with a ::FfElement belonging to the ::FiniteField - GT. - - \ingroup EpidCommon - @{ -*/ - -/// Recognized hash algorithms -typedef enum { - /// Invalid - kInvalidHashAlg = -1, - /// SHA-256 - kSha256 = 0, - /// SHA-384 - kSha384 = 1, - /// SHA-512 - kSha512 = 2, - /// SHA-512/256 - kSha512_256 = 3, - /// Reserved for SHA3/256 - kSha3_256 = 4, - /// Reserved for SHA3/384 - kSha3_384 = 5, - /// Reserved for SHA3/512 - kSha3_512 = 6, -} HashAlg; - -#pragma pack(1) -/// 8 bit octet string -typedef struct OctStr8 { - unsigned char data[8 / CHAR_BIT]; ///< 8 bit data -} OctStr8; -/// 16 bit octet string -typedef struct OctStr16 { - unsigned char data[16 / CHAR_BIT]; ///< 16 bit data -} OctStr16; -/// 32 bit octet string -typedef struct OctStr32 { - unsigned char data[32 / CHAR_BIT]; ///< 32 bit data -} OctStr32; -/// 64 bit octet string -typedef struct OctStr64 { - unsigned char data[64 / CHAR_BIT]; ///< 64 bit data -} OctStr64; -/// 128 bit octet string -typedef struct OctStr128 { - unsigned char data[128 / CHAR_BIT]; ///< 128 bit data -} OctStr128; -/// 256 bit octet string -typedef struct OctStr256 { - unsigned char data[256 / CHAR_BIT]; ///< 256 bit data -} OctStr256; -/// 512 bit octet string -typedef struct OctStr512 { - unsigned char data[512 / CHAR_BIT]; ///< 512 bit data -} OctStr512; - -/// Serialized BigNum -typedef struct BigNumStr { - OctStr256 data; ///< 256 bit octet string -} BigNumStr; -/// a number in [0, p-1] -typedef struct FpElemStr { - OctStr256 data; ///< 256 bit octet string -} FpElemStr; -/// a number in [0, q-1] -typedef struct FqElemStr { - OctStr256 data; ///< 256 bit octet string -} FqElemStr; - -/// Serialized G1 element -typedef struct G1ElemStr { - FqElemStr x; ///< an integer between [0, q-1] - FqElemStr y; ///< an integer between [0, q-1] -} G1ElemStr; - -/// Serialized G2 element -typedef struct G2ElemStr { - FqElemStr x[2]; ///< an integer between [0, q-1] - FqElemStr y[2]; ///< an integer between [0, q-1] -} G2ElemStr; - -/// Serialized GT element -typedef struct GtElemStr { - FqElemStr x[12]; ///< an integer between [0, q-1] -} GtElemStr; - -/// Intel(R) EPID 2.0 Parameters. -/*! - * Intel(R) EPID 2.0 parameters: (p, q, b, t, neg, beta, xi0, xi1, - * g1, g2) - */ -typedef struct Epid2Params { - BigNumStr p; ///< a prime - BigNumStr q; ///< a prime - FqElemStr b; ///< an integer between [0, q-1] - OctStr64 t; ///< an integer - OctStr8 neg; ///< a boolean - FqElemStr beta; ///< an integer between [0, q-1] - FqElemStr xi[2]; ///< array of integers between [0, q-1] - G1ElemStr g1; ///< a generator (an element) of G1 - G2ElemStr g2; ///< a generator (an element) of G2 -} Epid2Params; - -/// group ID -typedef OctStr32 GroupId; -typedef OctStr32 RLver_t; -typedef OctStr32 RLCount; - -/// Intel(R) EPID 2.0 group public key -/*! - * Group public key: (gid, h1, h2, w) - */ -typedef struct GroupPubKey { - GroupId gid; ///< group ID - G1ElemStr h1; ///< an element in G1 - G1ElemStr h2; ///< an element in G1 - G2ElemStr w; ///< an element in G2 -} GroupPubKey; - -/// Intel(R) EPID 2.0 issuing private key -/*! - * Issuing private key: (gid, gamma) - */ -typedef struct IPrivKey { - GroupId gid; ///< group ID - FpElemStr gamma; ///< an integer between [0, p-1] -} IPrivKey; - -/// Intel(R) EPID 2.0 private key -/*! - * Private key: (gid, A, x, f) - */ -typedef struct PrivKey { - GroupId gid; ///< group ID - G1ElemStr A; ///< an element in G1 - FpElemStr x; ///< an integer between [0, p-1] - FpElemStr f; ///< an integer between [0, p-1] -} PrivKey; - -/// 256 bit seed derived from fuse key -typedef OctStr256 Seed; - -/// Compressed private key -/*! - * Compressed Private key: (gid, A.x, seed) - */ -typedef struct CompressedPrivKey { - GroupId gid; ///< group ID - FqElemStr ax; ///< an integer between [0, p-1] - Seed seed; ///< 256 bit rekey seed -} CompressedPrivKey; - -/// Membership credential -/*! - * Membership credential: (gid, A, x) - */ -typedef struct MembershipCredential { - GroupId gid; ///< group ID - G1ElemStr A; ///< an element in G1 - FpElemStr x; ///< an integer between [0, p-1] -} MembershipCredential; - -/// 256 bit nonce chosen by issuer -typedef OctStr256 IssuerNonce; - -/// Join request -/*! - * Join request: (F, c, s) - */ -typedef struct JoinRequest { - G1ElemStr F; ///< an element in G1 - FpElemStr c; ///< an integer between [0, p-1] - FpElemStr s; ///< an integer between [0, p-1] -} JoinRequest; - -//////////////////////// - -/// Intel(R) EPID 2.0 basic signature. -/*! - * Basic signature: (B, K, T, c, sx, sf, sa, sb) - */ -typedef struct BasicSignature { - G1ElemStr B; ///< an element in G1 - G1ElemStr K; ///< an element in G1 - G1ElemStr T; ///< an element in G1 - FpElemStr c; ///< an integer between [0, p-1] - FpElemStr sx; ///< an integer between [0, p-1] - FpElemStr sf; ///< an integer between [0, p-1] - FpElemStr sa; ///< an integer between [0, p-1] - FpElemStr sb; ///< an integer between [0, p-1] -} BasicSignature; - -/// -/*! - * \brief - * non-revoked Proof. - * - * Non-revoked Proof: (T, c, smu, snu) - */ -typedef struct NrProof { - G1ElemStr T; ///< an element in G1 - FpElemStr c; ///< an integer between [0, p-1] - FpElemStr smu; ///< an integer between [0, p-1] - FpElemStr snu; ///< an integer between [0, p-1] -} NrProof; - -/// Intel(R) EPID 2.0 Signature -/*! - * Signature: (sigma0, RLver, n2, sigma[0], ..., sigma[n2-1]) - */ -typedef struct EpidSignature { - BasicSignature sigma0; ///< basic signature - OctStr32 rl_ver; ///< revocation list version number - OctStr32 n2; ///< number of entries in SigRL - NrProof sigma[1]; ///< array of non-revoked proofs (flexible array) -} EpidSignature; - -/// private-key based revocation list. -/*! - * Private-key based revocation list PrivRL: (gid, RLver, n1, f[0], - * ..., f[n1-1]) - */ -typedef struct PrivRl { - GroupId gid; ///< group ID - OctStr32 version; ///< revocation list version number - OctStr32 n1; ///< number of entries in PrivRL - FpElemStr f[1]; ///< integers between [1, p-1] (flexible array) -} PrivRl; - -/// entry in SigRL (B,K) -typedef struct SigRlEntry { - G1ElemStr b; ///< an element of G1 - G1ElemStr k; ///< an element of G1 -} SigRlEntry; - -/// signature based revocation list -/*! - * Signature based revocation list SigRL: (gid, RLver, n2, B[0], - * K[0], ..., B[n2-1], K[n2-1]) - */ -typedef struct SigRl { - GroupId gid; ///< group ID - OctStr32 version; ///< revocation list version number - OctStr32 n2; ///< number of entries in SigRL - SigRlEntry bk[1]; ///< revoked Bs and Ks (flexible array) -} SigRl; - -/// group revocation list -/*! - * Group revocation list GroupRL: (RLver, n3, gid[0], ..., - * gid[n3-1]) - */ -typedef struct GroupRl { - OctStr32 version; ///< revocation list version number - OctStr32 n3; ///< number of entries in GroupRL - GroupId gid[1]; ///< revoked group IDs (flexible array) -} GroupRl; - -/*! verifier revocation list - * Verifier revocation list VerifierRL: (gid, B, RLver, n4, K[0], - * ..., K[n4-1]) - */ -typedef struct VerifierRl { - GroupId gid; ///< group ID - G1ElemStr B; ///< an element in G1 - OctStr32 version; ///< revocation list version number - OctStr32 n4; ///< number of entries in VerifierRL - G1ElemStr K[1]; ///< elements in G1 (flexible array) -} VerifierRl; - -/// element to store seed values for later rekey -typedef G1ElemStr ReKeySeed; - -/// Serialized Fq2 element -typedef struct Fq2ElemStr { - FqElemStr a[2]; ///< polynomial coefficient -} Fq2ElemStr; - -/// Serialized Fq2^3 element -typedef struct Fq6ElemStr { - Fq2ElemStr a[3]; ///< polynomial coefficient -} Fq6ElemStr; - -/// Serialized Fq2^3^2 element -typedef struct Fq12ElemStr { - Fq6ElemStr a[2]; ///< polynomial coefficient -} Fq12ElemStr; - -/// ECDSA Signature using NIST 256-bit curve secp256r1 -typedef struct EcdsaSignature { - OctStr256 x; ///< 256-bit integer - OctStr256 y; ///< 256-bit integer -} EcdsaSignature; - -/// ECDSA Public Key -typedef struct EcdsaPublicKey { - OctStr256 x; ///< 256-bit integer - OctStr256 y; ///< 256-bit integer -} EcdsaPublicKey; - -/// ECDSA Private Key -typedef struct EcdsaPrivateKey { - OctStr256 data; ///< 256-bit integer -} EcdsaPrivateKey; -#pragma pack() - -/*! @} */ - -#endif // EPID_COMMON_TYPES_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/unittests/file_parser-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/unittests/file_parser-test.cc deleted file mode 100644 index 77cccfacea..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/common/unittests/file_parser-test.cc +++ /dev/null @@ -1,1358 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Issuer material file parsing unit tests. - */ -#include -#include - -#include "gtest/gtest.h" -extern "C" { -#include "epid/common/file_parser.h" -} - -namespace { - -/// Test fixture class for EpidFileParser -class EpidFileParser : public ::testing::Test { - public: - /// Cert used to sign legitimate test data - static const EpidCaCertificate kCert; - - /// A file with short GroupPublicKey signed with kCert - static const std::vector kGroupPublicKeyFile; - /// A file with two Epid11GroupPublicKey signed with kCert - static const std::vector kGroupMultiPublicKeyFile; - /// Expected short GroupPublicKey - static const std::vector kGroupPublicKey; - - /// A file with short privrl signed with cert - static const std::vector kShortPrivRlFile; - /// Expected short privrl - static const std::vector kShortPrivRl; - - /// A file with empty privrl signed with cert - static const std::vector kEmptyPrivRlFile; - - /// Expected empty privrl - static const std::vector kEmptyPrivRl; - - /// A file with empty SigRl signed with kCert - static const std::vector kEmptySigRlFile; - /// Expected empty SigRl - static const std::vector kEmptySigRl; - /// A file with short SigRl signed with kCert - static const std::vector kShortSigRlFile; - /// Expected short SigRl - static const std::vector kShortSigRl; - - /// A file with empty GroupRl signed with kCert - static const std::vector kEmptyGroupRlFile; - /// Expected empty GroupRl - static const std::vector kEmptyGroupRl; - /// A file with short GroupRl signed with kCert - static const std::vector kShortGroupRlFile; - /// Expected short GroupRl - static const std::vector kShortGroupRl; -}; - -const EpidCaCertificate EpidFileParser::kCert = { - 0x02, 0x00, 0x00, 0x11, 0x24, 0x42, 0xa5, 0xcc, 0x0e, 0xcd, 0x01, 0x5f, - 0xa3, 0xca, 0x31, 0xdc, 0x8e, 0x2b, 0xbc, 0x70, 0xbf, 0x42, 0xd6, 0x0c, - 0xbc, 0xa2, 0x00, 0x85, 0xe0, 0x82, 0x2c, 0xb0, 0x42, 0x35, 0xe9, 0x70, - 0x6f, 0xc9, 0x8b, 0xd7, 0xe5, 0x02, 0x11, 0xa4, 0xa2, 0x71, 0x02, 0xfa, - 0x35, 0x49, 0xdf, 0x79, 0xeb, 0xcb, 0x4b, 0xf2, 0x46, 0xb8, 0x09, 0x45, - 0xcd, 0xdf, 0xe7, 0xd5, 0x09, 0xbb, 0xfd, 0x7d, 0xff, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, - 0x5a, 0xc6, 0x35, 0xd8, 0xaa, 0x3a, 0x93, 0xe7, 0xb3, 0xeb, 0xbd, 0x55, - 0x76, 0x98, 0x86, 0xbc, 0x65, 0x1d, 0x06, 0xb0, 0xcc, 0x53, 0xb0, 0xf6, - 0x3b, 0xce, 0x3c, 0x3e, 0x27, 0xd2, 0x60, 0x4b, 0x6b, 0x17, 0xd1, 0xf2, - 0xe1, 0x2c, 0x42, 0x47, 0xf8, 0xbc, 0xe6, 0xe5, 0x63, 0xa4, 0x40, 0xf2, - 0x77, 0x03, 0x7d, 0x81, 0x2d, 0xeb, 0x33, 0xa0, 0xf4, 0xa1, 0x39, 0x45, - 0xd8, 0x98, 0xc2, 0x96, 0x4f, 0xe3, 0x42, 0xe2, 0xfe, 0x1a, 0x7f, 0x9b, - 0x8e, 0xe7, 0xeb, 0x4a, 0x7c, 0x0f, 0x9e, 0x16, 0x2b, 0xce, 0x33, 0x57, - 0x6b, 0x31, 0x5e, 0xce, 0xcb, 0xb6, 0x40, 0x68, 0x37, 0xbf, 0x51, 0xf5, - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xbc, 0xe6, 0xfa, 0xad, 0xa7, 0x17, 0x9e, 0x84, - 0xf3, 0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x51, 0xfb, 0x57, 0x6f, 0x15, - 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, 0x9b, 0x88, 0x99, 0x5b, - 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, - 0xb9, 0x3a, 0x76, 0xe7, 0x94, 0x03, 0x1d, 0x90, 0x6b, 0x6f, 0xcd, 0x99, - 0xef, 0x2c, 0xdb, 0x8b, 0xa9, 0x8a, 0xef, 0x7e, 0xf0, 0x77, 0xba, 0xb5, - 0x11, 0x43, 0x0d, 0x28, 0x1c, 0x01, 0x5b, 0xc9, 0x08, 0xce, 0x3e, 0x68}; - -const std::vector EpidFileParser::kEmptySigRlFile = { - 0x02, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, - 0x51, 0x71, 0xed, 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, - 0x70, 0x2a, 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, - 0x7d, 0x04, 0xa1, 0x29, 0x28, 0xc3, 0x4d, 0x30, 0x8d, 0x67, 0xe4, 0xe8, - 0x62, 0x71, 0xe8, 0x4f, 0x0d, 0x45, 0x46, 0xc9, 0xde, 0x67, 0x30, 0x47, - 0xb5, 0xfb, 0xb5, 0x66, 0xf5, 0x8f, 0x0d, 0xfb}; -const std::vector EpidFileParser::kEmptySigRl = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const std::vector EpidFileParser::kShortSigRlFile = { - 0x02, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x03, 0x92, 0xb0, 0x8b, 0x6d, 0x6b, 0xa4, 0x32, 0x4e, - 0xd1, 0x83, 0x26, 0x24, 0x73, 0x70, 0x80, 0xd3, 0x72, 0xe3, 0xab, 0xfe, - 0xbc, 0x86, 0x9f, 0x55, 0x9e, 0x56, 0x57, 0xa5, 0x1f, 0x06, 0x6c, 0x1b, - 0x2a, 0x55, 0xb6, 0xb2, 0x13, 0xe9, 0xe8, 0x88, 0x6c, 0xbd, 0xe7, 0xca, - 0x81, 0xcb, 0x92, 0x10, 0xa7, 0xef, 0xdc, 0x88, 0xf1, 0x7c, 0x91, 0x07, - 0xcc, 0xf0, 0x63, 0x39, 0xae, 0x5c, 0xb9, 0x78, 0xcd, 0x54, 0xdd, 0x98, - 0x3e, 0xa6, 0xc9, 0x2f, 0x83, 0x78, 0xc8, 0x64, 0xc9, 0x92, 0x41, 0x52, - 0xb9, 0xf9, 0x59, 0x91, 0x46, 0x89, 0x78, 0xda, 0xc3, 0x26, 0xdd, 0x9d, - 0x1f, 0x0c, 0x8e, 0xea, 0xba, 0xa8, 0xde, 0xa5, 0x33, 0x8c, 0x2e, 0xaa, - 0x0e, 0x2c, 0x13, 0x36, 0xb3, 0x7b, 0xa6, 0x12, 0x98, 0x0a, 0x13, 0x35, - 0xa3, 0x9e, 0x52, 0xaf, 0x43, 0xf4, 0x1c, 0x79, 0xcf, 0x46, 0xc6, 0xcd, - 0xc4, 0xc4, 0x0d, 0x19, 0xac, 0x77, 0xc7, 0x12, 0xcb, 0x22, 0x4a, 0x65, - 0xdb, 0x26, 0xcb, 0x1b, 0x27, 0xbf, 0x25, 0x6f, 0x47, 0xff, 0x2e, 0x59, - 0x11, 0x72, 0x0f, 0x42, 0x70, 0x64, 0xd0, 0x78, 0x6c, 0x09, 0xe6, 0xce, - 0xd4, 0xd9, 0x7b, 0x80, 0x9a, 0xe9, 0x3e, 0x8f, 0x73, 0x77, 0x84, 0x67, - 0x1f, 0xf2, 0x74, 0xbc, 0xcf, 0x9c, 0xb4, 0x58, 0xaa, 0xe2, 0x7b, 0x6f, - 0xb6, 0xfe, 0x9a, 0x40, 0x1e, 0x84, 0xab, 0x5f, 0xe8, 0x73, 0xc6, 0x87, - 0xcc, 0x9b, 0xb4, 0xf4, 0xd9, 0x5a, 0x9c, 0x2d, 0xea, 0xf3, 0x04, 0x9f, - 0xc3, 0xbf, 0x2a, 0xf2, 0x9d, 0xe5, 0x38, 0x2c, 0xf2, 0xcc, 0x46, 0xd9, - 0x3e, 0x52, 0xb2, 0x3e, 0x49, 0xf4, 0x08, 0x14, 0x10, 0x31, 0x9c, 0xeb, - 0x10, 0xe5, 0x26, 0xaa, 0x4d, 0x76, 0x12, 0xb2, 0xc3, 0x8e, 0x15, 0x4b, - 0x28, 0x51, 0xe9, 0x30, 0x00, 0x2c, 0x74, 0xb1, 0x33, 0x71, 0x1c, 0x19, - 0xb8, 0x6b, 0x5c, 0xde, 0x30, 0x4f, 0x36, 0x29, 0x29, 0xaf, 0x1d, 0x41, - 0xd1, 0xcd, 0xa0, 0x4f, 0xb2, 0x8c, 0xb7, 0x76, 0xc2, 0x60, 0xc8, 0xf7, - 0x72, 0x98, 0xe1, 0x75, 0x3c, 0xfb, 0xd7, 0x3c, 0x7c, 0x3a, 0x91, 0x92, - 0xb8, 0x83, 0x25, 0xf3, 0x3b, 0xa6, 0x64, 0x4f, 0xa7, 0x70, 0x68, 0x7c, - 0xcc, 0x47, 0xdb, 0xbc, 0x0f, 0x54, 0x36, 0x2d, 0xea, 0xde, 0x6f, 0x96, - 0xdc, 0xa9, 0xca, 0xa1, 0xb0, 0x80, 0x2e, 0xf8, 0x84, 0x12, 0x84, 0xf6, - 0xf7, 0x8c, 0xa3, 0x45, 0xee, 0x87, 0x59, 0xd9, 0x88, 0xa4, 0xbd, 0x1f, - 0x0a, 0x41, 0xd7, 0x17, 0x42, 0xc2, 0x8f, 0x46, 0x40, 0xa9, 0x3d, 0x00, - 0x99, 0xb4, 0x1d, 0x8f, 0xea, 0xac, 0x86, 0xc1, 0x06, 0x03, 0x02, 0x74, - 0x85, 0x78, 0xe6, 0xc3, 0x4b, 0xc1, 0x60, 0x1b, 0xf5, 0xb1, 0xda, 0xd6, - 0x03, 0x75, 0xad, 0xd1, 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, - 0x51, 0x71, 0xed, 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, - 0x70, 0x2a, 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, - 0xcb, 0x1d, 0x80, 0xda, 0x3d, 0xd1, 0x68, 0x14, 0x90, 0xa6, 0x4a, 0x33, - 0x16, 0x7c, 0x82, 0x86, 0xfb, 0xfa, 0x46, 0x14, 0x51, 0xef, 0xa5, 0x80, - 0x1d, 0x97, 0x0a, 0xb6, 0x9d, 0x77, 0x69, 0x6c}; -const std::vector EpidFileParser::kShortSigRl = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x92, 0xb0, 0x8b, 0x6d, 0x6b, 0xa4, 0x32, 0x4e, 0xd1, 0x83, 0x26, 0x24, - 0x73, 0x70, 0x80, 0xd3, 0x72, 0xe3, 0xab, 0xfe, 0xbc, 0x86, 0x9f, 0x55, - 0x9e, 0x56, 0x57, 0xa5, 0x1f, 0x06, 0x6c, 0x1b, 0x2a, 0x55, 0xb6, 0xb2, - 0x13, 0xe9, 0xe8, 0x88, 0x6c, 0xbd, 0xe7, 0xca, 0x81, 0xcb, 0x92, 0x10, - 0xa7, 0xef, 0xdc, 0x88, 0xf1, 0x7c, 0x91, 0x07, 0xcc, 0xf0, 0x63, 0x39, - 0xae, 0x5c, 0xb9, 0x78, 0xcd, 0x54, 0xdd, 0x98, 0x3e, 0xa6, 0xc9, 0x2f, - 0x83, 0x78, 0xc8, 0x64, 0xc9, 0x92, 0x41, 0x52, 0xb9, 0xf9, 0x59, 0x91, - 0x46, 0x89, 0x78, 0xda, 0xc3, 0x26, 0xdd, 0x9d, 0x1f, 0x0c, 0x8e, 0xea, - 0xba, 0xa8, 0xde, 0xa5, 0x33, 0x8c, 0x2e, 0xaa, 0x0e, 0x2c, 0x13, 0x36, - 0xb3, 0x7b, 0xa6, 0x12, 0x98, 0x0a, 0x13, 0x35, 0xa3, 0x9e, 0x52, 0xaf, - 0x43, 0xf4, 0x1c, 0x79, 0xcf, 0x46, 0xc6, 0xcd, 0xc4, 0xc4, 0x0d, 0x19, - 0xac, 0x77, 0xc7, 0x12, 0xcb, 0x22, 0x4a, 0x65, 0xdb, 0x26, 0xcb, 0x1b, - 0x27, 0xbf, 0x25, 0x6f, 0x47, 0xff, 0x2e, 0x59, 0x11, 0x72, 0x0f, 0x42, - 0x70, 0x64, 0xd0, 0x78, 0x6c, 0x09, 0xe6, 0xce, 0xd4, 0xd9, 0x7b, 0x80, - 0x9a, 0xe9, 0x3e, 0x8f, 0x73, 0x77, 0x84, 0x67, 0x1f, 0xf2, 0x74, 0xbc, - 0xcf, 0x9c, 0xb4, 0x58, 0xaa, 0xe2, 0x7b, 0x6f, 0xb6, 0xfe, 0x9a, 0x40, - 0x1e, 0x84, 0xab, 0x5f, 0xe8, 0x73, 0xc6, 0x87, 0xcc, 0x9b, 0xb4, 0xf4, - 0xd9, 0x5a, 0x9c, 0x2d, 0xea, 0xf3, 0x04, 0x9f, 0xc3, 0xbf, 0x2a, 0xf2, - 0x9d, 0xe5, 0x38, 0x2c, 0xf2, 0xcc, 0x46, 0xd9, 0x3e, 0x52, 0xb2, 0x3e, - 0x49, 0xf4, 0x08, 0x14, 0x10, 0x31, 0x9c, 0xeb, 0x10, 0xe5, 0x26, 0xaa, - 0x4d, 0x76, 0x12, 0xb2, 0xc3, 0x8e, 0x15, 0x4b, 0x28, 0x51, 0xe9, 0x30, - 0x00, 0x2c, 0x74, 0xb1, 0x33, 0x71, 0x1c, 0x19, 0xb8, 0x6b, 0x5c, 0xde, - 0x30, 0x4f, 0x36, 0x29, 0x29, 0xaf, 0x1d, 0x41, 0xd1, 0xcd, 0xa0, 0x4f, - 0xb2, 0x8c, 0xb7, 0x76, 0xc2, 0x60, 0xc8, 0xf7, 0x72, 0x98, 0xe1, 0x75, - 0x3c, 0xfb, 0xd7, 0x3c, 0x7c, 0x3a, 0x91, 0x92, 0xb8, 0x83, 0x25, 0xf3, - 0x3b, 0xa6, 0x64, 0x4f, 0xa7, 0x70, 0x68, 0x7c, 0xcc, 0x47, 0xdb, 0xbc, - 0x0f, 0x54, 0x36, 0x2d, 0xea, 0xde, 0x6f, 0x96, 0xdc, 0xa9, 0xca, 0xa1, - 0xb0, 0x80, 0x2e, 0xf8, 0x84, 0x12, 0x84, 0xf6, 0xf7, 0x8c, 0xa3, 0x45, - 0xee, 0x87, 0x59, 0xd9, 0x88, 0xa4, 0xbd, 0x1f, 0x0a, 0x41, 0xd7, 0x17, - 0x42, 0xc2, 0x8f, 0x46, 0x40, 0xa9, 0x3d, 0x00, 0x99, 0xb4, 0x1d, 0x8f, - 0xea, 0xac, 0x86, 0xc1, 0x06, 0x03, 0x02, 0x74, 0x85, 0x78, 0xe6, 0xc3, - 0x4b, 0xc1, 0x60, 0x1b, 0xf5, 0xb1, 0xda, 0xd6, 0x03, 0x75, 0xad, 0xd1}; - -const std::vector EpidFileParser::kEmptyPrivRlFile = { - 0x02, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, - 0x51, 0x71, 0xed, 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, - 0x70, 0x2a, 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, - 0x47, 0x18, 0x86, 0x03, 0xfe, 0x8a, 0xb8, 0x4a, 0x9c, 0xb6, 0xcd, 0x8b, - 0x1f, 0x68, 0x1c, 0x61, 0x4c, 0xa2, 0x30, 0x95, 0xec, 0x76, 0xc4, 0xa7, - 0x00, 0x6c, 0x6e, 0x3c, 0xc6, 0xf9, 0x32, 0xfc}; - -const std::vector EpidFileParser::kEmptyPrivRl = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - -const std::vector EpidFileParser::kShortPrivRlFile = { - 0x02, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x03, - 0x00, 0x00, 0x00, 0x03, 0x3a, 0x03, 0xb4, 0x95, 0xd3, 0x86, 0xf7, 0xb9, - 0x7e, 0x88, 0x79, 0xd8, 0xce, 0x30, 0x44, 0xf3, 0x35, 0xed, 0x0c, 0xb1, - 0x80, 0x67, 0xeb, 0x1b, 0x24, 0x7f, 0xe0, 0x0c, 0xc7, 0xe8, 0xae, 0x54, - 0xd1, 0xcd, 0x66, 0x2b, 0x11, 0x4e, 0x04, 0x9c, 0xe9, 0x1f, 0xac, 0xb5, - 0xdd, 0x74, 0xa4, 0x9f, 0x8e, 0x66, 0x31, 0x4c, 0xde, 0xb2, 0x11, 0x25, - 0xcc, 0x8e, 0xee, 0x1e, 0xa2, 0x89, 0x1a, 0xae, 0x7a, 0x98, 0x8e, 0x0a, - 0xd7, 0x01, 0xc4, 0xd3, 0x49, 0xb8, 0x56, 0x9a, 0x7b, 0xf4, 0xab, 0x52, - 0xb1, 0x1a, 0x84, 0xbd, 0x96, 0xd9, 0x17, 0xb0, 0xe9, 0x38, 0xff, 0xc7, - 0x7a, 0x50, 0x0c, 0x8a, 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, - 0x51, 0x71, 0xed, 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, - 0x70, 0x2a, 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, - 0x1c, 0xfb, 0xad, 0x9f, 0x47, 0x4d, 0x46, 0x53, 0x18, 0x05, 0x51, 0x04, - 0x31, 0x90, 0x95, 0x33, 0x57, 0xc0, 0x19, 0x64, 0x80, 0xbf, 0x23, 0x4c, - 0x92, 0xb6, 0x52, 0xd2, 0xd0, 0x05, 0xbe, 0x58}; - -const std::vector EpidFileParser::kShortPrivRl = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x34, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, - 0x3a, 0x03, 0xb4, 0x95, 0xd3, 0x86, 0xf7, 0xb9, 0x7e, 0x88, 0x79, 0xd8, - 0xce, 0x30, 0x44, 0xf3, 0x35, 0xed, 0x0c, 0xb1, 0x80, 0x67, 0xeb, 0x1b, - 0x24, 0x7f, 0xe0, 0x0c, 0xc7, 0xe8, 0xae, 0x54, 0xd1, 0xcd, 0x66, 0x2b, - 0x11, 0x4e, 0x04, 0x9c, 0xe9, 0x1f, 0xac, 0xb5, 0xdd, 0x74, 0xa4, 0x9f, - 0x8e, 0x66, 0x31, 0x4c, 0xde, 0xb2, 0x11, 0x25, 0xcc, 0x8e, 0xee, 0x1e, - 0xa2, 0x89, 0x1a, 0xae, 0x7a, 0x98, 0x8e, 0x0a, 0xd7, 0x01, 0xc4, 0xd3, - 0x49, 0xb8, 0x56, 0x9a, 0x7b, 0xf4, 0xab, 0x52, 0xb1, 0x1a, 0x84, 0xbd, - 0x96, 0xd9, 0x17, 0xb0, 0xe9, 0x38, 0xff, 0xc7, 0x7a, 0x50, 0x0c, 0x8a}; - -const std::vector EpidFileParser::kGroupPublicKeyFile = { - 0x02, 0x00, 0x00, 0x0c, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88, 0x89, 0x33, 0xa7, 0x86, - 0xd7, 0x71, 0xcc, 0x80, 0x46, 0x4b, 0x42, 0xc3, 0xe7, 0xba, 0x1a, 0x54, - 0x85, 0x8a, 0x21, 0x8e, 0x29, 0x91, 0xa9, 0x60, 0x41, 0xf9, 0xa5, 0xd9, - 0x7b, 0x5f, 0x54, 0x49, 0x2a, 0x89, 0x8c, 0x10, 0x0e, 0x26, 0x0d, 0xe8, - 0x36, 0x6a, 0x9e, 0x6f, 0x79, 0xff, 0xf1, 0xcd, 0xa7, 0xcd, 0xac, 0x1f, - 0x92, 0x33, 0x3a, 0xd9, 0x7c, 0xf5, 0xcd, 0x38, 0x48, 0x01, 0x4f, 0xc5, - 0x6f, 0xea, 0x50, 0x60, 0x59, 0x09, 0xda, 0x44, 0x21, 0xc2, 0xd0, 0x86, - 0xe6, 0x00, 0x63, 0x59, 0xa9, 0xfb, 0x35, 0x13, 0x4e, 0x13, 0xb1, 0x47, - 0x36, 0xd7, 0xbd, 0xf6, 0x0a, 0x35, 0x74, 0x7d, 0x36, 0xc5, 0x67, 0xa2, - 0x03, 0xb7, 0x38, 0x31, 0x16, 0xa8, 0x5d, 0x64, 0x3f, 0xe6, 0xf1, 0x94, - 0x37, 0x09, 0x8c, 0x20, 0x17, 0xac, 0x2f, 0x55, 0x9e, 0xed, 0xb3, 0xc7, - 0x73, 0xc0, 0x1c, 0xbb, 0xbf, 0xf7, 0x18, 0xce, 0x4f, 0xd4, 0xe3, 0x67, - 0x75, 0xe4, 0xd9, 0x51, 0xfb, 0x1b, 0x22, 0xf9, 0x72, 0x2e, 0xc1, 0x76, - 0x2a, 0xe1, 0x4a, 0x6e, 0x88, 0xd6, 0x2d, 0x71, 0xf4, 0xc4, 0x6d, 0xac, - 0x8c, 0xbd, 0xe7, 0x2b, 0xb1, 0x40, 0x15, 0x93, 0xbd, 0x97, 0xd4, 0x84, - 0x90, 0xef, 0x4e, 0xfd, 0x78, 0x25, 0xab, 0xdf, 0x16, 0xf3, 0x46, 0x52, - 0x16, 0x96, 0xae, 0x50, 0x88, 0x96, 0x18, 0x73, 0xc1, 0xd1, 0x73, 0xf0, - 0x67, 0xc8, 0x8d, 0xbb, 0x4e, 0xbc, 0x6a, 0x40, 0xe6, 0x1e, 0x7d, 0x36, - 0x8c, 0xf4, 0xb1, 0xf1, 0x5f, 0x26, 0x4f, 0x43, 0x0a, 0x36, 0xd4, 0x67, - 0xd4, 0x79, 0x3f, 0xb8, 0x69, 0x6f, 0x9c, 0x33, 0xd3, 0xdb, 0xc6, 0xce, - 0x42, 0xe3, 0x46, 0x87, 0xd6, 0x65, 0xac, 0xc9, 0x71, 0xf1, 0xa9, 0x8f, - 0x78, 0x45, 0x9a, 0xef, 0x1c, 0xe4, 0x45, 0x84, 0x3d, 0x8a, 0x27, 0x51, - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x58, 0x2a, 0xf6, 0x06, - 0xed, 0x55, 0xd6, 0x86, 0x4f, 0x99, 0x57, 0x9e, 0x8c, 0xfc, 0xea, 0x5e, - 0x7d, 0xc3, 0x41, 0xa2, 0x51, 0x19, 0x47, 0x4b, 0x56, 0x4e, 0x46, 0x3e, - 0xca, 0xd3, 0xb5, 0x89}; -const std::vector EpidFileParser::kGroupPublicKey = { - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0xff, 0xee, 0xdd, 0xcc, - 0xbb, 0xaa, 0x99, 0x88, 0x89, 0x33, 0xa7, 0x86, 0xd7, 0x71, 0xcc, 0x80, - 0x46, 0x4b, 0x42, 0xc3, 0xe7, 0xba, 0x1a, 0x54, 0x85, 0x8a, 0x21, 0x8e, - 0x29, 0x91, 0xa9, 0x60, 0x41, 0xf9, 0xa5, 0xd9, 0x7b, 0x5f, 0x54, 0x49, - 0x2a, 0x89, 0x8c, 0x10, 0x0e, 0x26, 0x0d, 0xe8, 0x36, 0x6a, 0x9e, 0x6f, - 0x79, 0xff, 0xf1, 0xcd, 0xa7, 0xcd, 0xac, 0x1f, 0x92, 0x33, 0x3a, 0xd9, - 0x7c, 0xf5, 0xcd, 0x38, 0x48, 0x01, 0x4f, 0xc5, 0x6f, 0xea, 0x50, 0x60, - 0x59, 0x09, 0xda, 0x44, 0x21, 0xc2, 0xd0, 0x86, 0xe6, 0x00, 0x63, 0x59, - 0xa9, 0xfb, 0x35, 0x13, 0x4e, 0x13, 0xb1, 0x47, 0x36, 0xd7, 0xbd, 0xf6, - 0x0a, 0x35, 0x74, 0x7d, 0x36, 0xc5, 0x67, 0xa2, 0x03, 0xb7, 0x38, 0x31, - 0x16, 0xa8, 0x5d, 0x64, 0x3f, 0xe6, 0xf1, 0x94, 0x37, 0x09, 0x8c, 0x20, - 0x17, 0xac, 0x2f, 0x55, 0x9e, 0xed, 0xb3, 0xc7, 0x73, 0xc0, 0x1c, 0xbb, - 0xbf, 0xf7, 0x18, 0xce, 0x4f, 0xd4, 0xe3, 0x67, 0x75, 0xe4, 0xd9, 0x51, - 0xfb, 0x1b, 0x22, 0xf9, 0x72, 0x2e, 0xc1, 0x76, 0x2a, 0xe1, 0x4a, 0x6e, - 0x88, 0xd6, 0x2d, 0x71, 0xf4, 0xc4, 0x6d, 0xac, 0x8c, 0xbd, 0xe7, 0x2b, - 0xb1, 0x40, 0x15, 0x93, 0xbd, 0x97, 0xd4, 0x84, 0x90, 0xef, 0x4e, 0xfd, - 0x78, 0x25, 0xab, 0xdf, 0x16, 0xf3, 0x46, 0x52, 0x16, 0x96, 0xae, 0x50, - 0x88, 0x96, 0x18, 0x73, 0xc1, 0xd1, 0x73, 0xf0, 0x67, 0xc8, 0x8d, 0xbb, - 0x4e, 0xbc, 0x6a, 0x40, 0xe6, 0x1e, 0x7d, 0x36, 0x8c, 0xf4, 0xb1, 0xf1, - 0x5f, 0x26, 0x4f, 0x43, 0x0a, 0x36, 0xd4, 0x67, 0xd4, 0x79, 0x3f, 0xb8, - 0x69, 0x6f, 0x9c, 0x33, 0xd3, 0xdb, 0xc6, 0xce, 0x42, 0xe3, 0x46, 0x87, - 0xd6, 0x65, 0xac, 0xc9, 0x71, 0xf1, 0xa9, 0x8f, 0x78, 0x45, 0x9a, 0xef, - 0x1c, 0xe4, 0x45, 0x84, 0x3d, 0x8a, 0x27, 0x51}; -const std::vector EpidFileParser::kGroupMultiPublicKeyFile = { - // Public key1 - 0x02, 0x00, 0x00, 0x0c, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xff, 0xee, 0xdd, 0xcc, 0xbb, 0xaa, 0x99, 0x88, 0x89, 0x33, 0xa7, 0x86, - 0xd7, 0x71, 0xcc, 0x80, 0x46, 0x4b, 0x42, 0xc3, 0xe7, 0xba, 0x1a, 0x54, - 0x85, 0x8a, 0x21, 0x8e, 0x29, 0x91, 0xa9, 0x60, 0x41, 0xf9, 0xa5, 0xd9, - 0x7b, 0x5f, 0x54, 0x49, 0x2a, 0x89, 0x8c, 0x10, 0x0e, 0x26, 0x0d, 0xe8, - 0x36, 0x6a, 0x9e, 0x6f, 0x79, 0xff, 0xf1, 0xcd, 0xa7, 0xcd, 0xac, 0x1f, - 0x92, 0x33, 0x3a, 0xd9, 0x7c, 0xf5, 0xcd, 0x38, 0x48, 0x01, 0x4f, 0xc5, - 0x6f, 0xea, 0x50, 0x60, 0x59, 0x09, 0xda, 0x44, 0x21, 0xc2, 0xd0, 0x86, - 0xe6, 0x00, 0x63, 0x59, 0xa9, 0xfb, 0x35, 0x13, 0x4e, 0x13, 0xb1, 0x47, - 0x36, 0xd7, 0xbd, 0xf6, 0x0a, 0x35, 0x74, 0x7d, 0x36, 0xc5, 0x67, 0xa2, - 0x03, 0xb7, 0x38, 0x31, 0x16, 0xa8, 0x5d, 0x64, 0x3f, 0xe6, 0xf1, 0x94, - 0x37, 0x09, 0x8c, 0x20, 0x17, 0xac, 0x2f, 0x55, 0x9e, 0xed, 0xb3, 0xc7, - 0x73, 0xc0, 0x1c, 0xbb, 0xbf, 0xf7, 0x18, 0xce, 0x4f, 0xd4, 0xe3, 0x67, - 0x75, 0xe4, 0xd9, 0x51, 0xfb, 0x1b, 0x22, 0xf9, 0x72, 0x2e, 0xc1, 0x76, - 0x2a, 0xe1, 0x4a, 0x6e, 0x88, 0xd6, 0x2d, 0x71, 0xf4, 0xc4, 0x6d, 0xac, - 0x8c, 0xbd, 0xe7, 0x2b, 0xb1, 0x40, 0x15, 0x93, 0xbd, 0x97, 0xd4, 0x84, - 0x90, 0xef, 0x4e, 0xfd, 0x78, 0x25, 0xab, 0xdf, 0x16, 0xf3, 0x46, 0x52, - 0x16, 0x96, 0xae, 0x50, 0x88, 0x96, 0x18, 0x73, 0xc1, 0xd1, 0x73, 0xf0, - 0x67, 0xc8, 0x8d, 0xbb, 0x4e, 0xbc, 0x6a, 0x40, 0xe6, 0x1e, 0x7d, 0x36, - 0x8c, 0xf4, 0xb1, 0xf1, 0x5f, 0x26, 0x4f, 0x43, 0x0a, 0x36, 0xd4, 0x67, - 0xd4, 0x79, 0x3f, 0xb8, 0x69, 0x6f, 0x9c, 0x33, 0xd3, 0xdb, 0xc6, 0xce, - 0x42, 0xe3, 0x46, 0x87, 0xd6, 0x65, 0xac, 0xc9, 0x71, 0xf1, 0xa9, 0x8f, - 0x78, 0x45, 0x9a, 0xef, 0x1c, 0xe4, 0x45, 0x84, 0x3d, 0x8a, 0x27, 0x51, - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, 0x2a, - 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, 0x6c, 0x06, - 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x58, 0x2a, 0xf6, 0x06, - 0xed, 0x55, 0xd6, 0x86, 0x4f, 0x99, 0x57, 0x9e, 0x8c, 0xfc, 0xea, 0x5e, - 0x7d, 0xc3, 0x41, 0xa2, 0x51, 0x19, 0x47, 0x4b, 0x56, 0x4e, 0x46, 0x3e, - 0xca, 0xd3, 0xb5, 0x89, - // Public key 2 - 0x02, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x78, 0x8a, 0xb6, 0x0f, - 0x9a, 0xf5, 0xe4, 0xd1, 0xe7, 0x39, 0x6a, 0x79, 0x6c, 0xb5, 0xd1, 0xa1, - 0x83, 0xec, 0xa1, 0x01, 0xfe, 0xe8, 0x72, 0xce, 0xce, 0x05, 0x9a, 0x4f, - 0xa5, 0x17, 0x1b, 0xed, 0x30, 0xc5, 0x00, 0xc0, 0xb4, 0xdb, 0x5e, 0xa6, - 0xe2, 0x24, 0x23, 0xab, 0xf5, 0x09, 0xf2, 0x4a, 0x7e, 0x72, 0xfa, 0xc3, - 0xbf, 0x33, 0x93, 0x23, 0x48, 0x89, 0xd2, 0x98, 0x08, 0xe1, 0x01, 0xba, - 0x9d, 0xa9, 0xe5, 0x41, 0x46, 0x2e, 0xbb, 0x9e, 0x6a, 0xfd, 0x28, 0x85, - 0x94, 0xd5, 0x6e, 0x5a, 0xfa, 0x42, 0x71, 0x6e, 0xdc, 0x7e, 0xdb, 0xd1, - 0xf2, 0x84, 0x11, 0x08, 0x4f, 0x0f, 0x22, 0x1f, 0x32, 0xbe, 0xd7, 0x6f, - 0x55, 0x17, 0x17, 0x4a, 0xa7, 0x46, 0xeb, 0xca, 0x02, 0x65, 0x53, 0xca, - 0xd7, 0x93, 0x03, 0x01, 0xe1, 0x54, 0xfc, 0xdd, 0xb4, 0x95, 0x5a, 0x5c, - 0x0c, 0x8c, 0x13, 0x65, 0x02, 0x16, 0xf0, 0xfc, 0xbb, 0x02, 0x5f, 0x87, - 0x83, 0x8c, 0xd0, 0x3e, 0x69, 0xc8, 0xf5, 0x7c, 0x09, 0xdd, 0x48, 0x65, - 0x82, 0x48, 0x6f, 0xb5, 0x35, 0x0c, 0xc4, 0x04, 0x2d, 0x83, 0x0a, 0x3e, - 0xa0, 0x0f, 0x5f, 0x8e, 0x61, 0xf7, 0xc3, 0xb5, 0x5c, 0x66, 0xf8, 0xf8, - 0xa3, 0x0a, 0xc1, 0x50, 0xcd, 0xb0, 0x44, 0x19, 0x14, 0x07, 0xf1, 0xad, - 0x7a, 0xec, 0x73, 0xac, 0x55, 0x01, 0x8a, 0xa6, 0x62, 0x9b, 0x30, 0xf3, - 0xf9, 0xc5, 0xd1, 0x3d, 0xf2, 0x36, 0x13, 0x28, 0x4d, 0xbf, 0x95, 0x88, - 0x76, 0x6b, 0xb0, 0x18, 0xd8, 0x3f, 0xa6, 0x22, 0x69, 0x13, 0x06, 0xa4, - 0x04, 0xbf, 0x52, 0x8e, 0xf0, 0x11, 0x99, 0x65, 0xb9, 0xf8, 0x57, 0x0b, - 0xf6, 0xc2, 0xe8, 0xaf, 0xee, 0xd4, 0x6e, 0xa7, 0x49, 0x7b, 0xeb, 0x8f, - 0x92, 0x66, 0x45, 0xda, 0xb4, 0x01, 0xa8, 0xee, 0x7c, 0xdf, 0x8e, 0x08, - 0xdf, 0x69, 0x19, 0x8c, 0xfa, 0x23, 0x52, 0x71, 0x12, 0x10, 0xfb, 0x13, - 0x2f, 0x17, 0x16, 0x9c, 0x7e, 0xc0, 0xe5, 0x22, 0x74, 0x81, 0x38, 0xed, - 0x3f, 0xe1, 0x72, 0xc9, 0x46, 0x4c, 0x03, 0x7a, 0x79, 0xe0, 0x84, 0x32, - 0x34, 0x59, 0x46, 0x98, 0xe7, 0xc6, 0x5f, 0xd8, 0x5f, 0xf0, 0xee, 0x1b, - 0x53, 0x4c, 0xce, 0x61, 0xb7, 0x91, 0xbf, 0x71, 0xb3, 0xeb, 0x73, 0x66, - 0x47, 0x28, 0x1d, 0x20}; -const std::vector EpidFileParser::kEmptyGroupRlFile = { - 0x02, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, - 0xed, 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, - 0x2a, 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, - 0x30, 0x9f, 0x8c, 0xae, 0x9b, 0x2a, 0xab, 0xcf, 0xb9, 0x85, 0x6f, - 0x16, 0x21, 0x92, 0xb8, 0x9a, 0x31, 0x2c, 0xb8, 0x04, 0x20, 0xc8, - 0x2a, 0x98, 0x8f, 0xd5, 0xaf, 0xc7, 0x27, 0xe5, 0x04, 0x0c}; -const std::vector EpidFileParser::kEmptyGroupRl = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -const std::vector EpidFileParser::kShortGroupRlFile = { - 0x02, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x9a, 0xbc, 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, - 0x51, 0x71, 0xed, 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, - 0x70, 0x2a, 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, - 0x09, 0x15, 0x86, 0xd7, 0x24, 0x47, 0xfc, 0x1e, 0x44, 0xc0, 0xfb, 0x9e, - 0x4f, 0xe4, 0x92, 0x85, 0x79, 0x94, 0x9c, 0x80, 0xd1, 0xa1, 0x66, 0x34, - 0x79, 0xb6, 0xb3, 0x3b, 0x66, 0xad, 0x2e, 0x40}; -const std::vector EpidFileParser::kShortGroupRl = { - 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0xbc}; - -////////////////////////////////////////////////////////////////////////// -// EpidParseGroupPubKeyFile Tests -TEST_F(EpidFileParser, GroupPubKeyParseFailsGivenNullParameters) { - GroupPubKey pubkey; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile(nullptr, this->kGroupPublicKeyFile.size(), - &this->kCert, &pubkey)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), nullptr, - &pubkey)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &this->kCert, nullptr)); -} - -TEST_F(EpidFileParser, GroupPubKeyParseFailsGivenUnsupportedCurve) { - GroupPubKey pubkey; - EpidCaCertificate unsupported_curve1(this->kCert); - unsupported_curve1.a.data[0] = unsupported_curve1.a.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve1, &pubkey)); - EpidCaCertificate unsupported_curve2(this->kCert); - unsupported_curve2.b.data[0] = unsupported_curve2.b.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve2, &pubkey)); - EpidCaCertificate unsupported_curve3(this->kCert); - unsupported_curve3.x.data[0] = unsupported_curve3.x.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve3, &pubkey)); - EpidCaCertificate unsupported_curve4(this->kCert); - unsupported_curve4.y.data[0] = unsupported_curve4.y.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve4, &pubkey)); - EpidCaCertificate unsupported_curve5(this->kCert); - unsupported_curve5.r.data[0] = unsupported_curve5.r.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve5, &pubkey)); - EpidCaCertificate unsupported_curve6(this->kCert); - unsupported_curve6.prime.data[0] = unsupported_curve6.prime.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &unsupported_curve6, &pubkey)); -} - -TEST_F(EpidFileParser, GroupPubKeyParseFailsGivenInvalidKeyInCertificate) { - GroupPubKey pubkey; - EpidCaCertificate invalid_key_qx(this->kCert); - invalid_key_qx.pubkey.data[0] = invalid_key_qx.pubkey.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &invalid_key_qx, &pubkey)); - EpidCaCertificate invalid_key_qy(this->kCert); - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &invalid_key_qy, &pubkey)); - EpidCaCertificate invalid_key_qx_qy(this->kCert); - invalid_key_qx_qy.pubkey.data[0] = invalid_key_qx_qy.pubkey.data[0] ^ 0xFF; - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] = - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] ^ - 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), - &invalid_key_qx_qy, &pubkey)); -} - -TEST_F(EpidFileParser, RejectsGroupPubKeyFileWithInvalidSize) { - GroupPubKey pubkey; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), 0, - &this->kCert, &pubkey)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size() - 1, - &this->kCert, &pubkey)); -} - -TEST_F(EpidFileParser, RejectsInvalidGroupPubKeyFileType) { - GroupPubKey pubkey; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)this->kShortPrivRlFile.data(), - this->kGroupPublicKeyFile.size(), - &this->kCert, &pubkey)); -} - -TEST_F(EpidFileParser, RejectsGroupPubKeyFileWithUnsupportedEpidVersion) { - GroupPubKey pubkey; - - std::vector unsupported_epidver_file(this->kGroupPublicKeyFile); - unsupported_epidver_file[0] = {0x01}; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupPubKeyFile((void*)unsupported_epidver_file.data(), - unsupported_epidver_file.size(), - &this->kCert, &pubkey)); -} - -TEST_F(EpidFileParser, ParsesValidPubKeyFile) { - std::vector pubkey(sizeof(GroupPubKey), 0); - EXPECT_EQ(kEpidNoErr, EpidParseGroupPubKeyFile( - (void*)this->kGroupPublicKeyFile.data(), - this->kGroupPublicKeyFile.size(), &this->kCert, - (GroupPubKey*)pubkey.data())); - EXPECT_EQ(this->kGroupPublicKey, pubkey); -} - -TEST_F(EpidFileParser, ParsesValidMultiPubKeyFile) { - std::vector pubkey(sizeof(GroupPubKey), 0); - EXPECT_EQ(kEpidNoErr, EpidParseGroupPubKeyFile( - (void*)this->kGroupMultiPublicKeyFile.data(), - this->kGroupMultiPublicKeyFile.size(), &this->kCert, - (GroupPubKey*)pubkey.data())); - EXPECT_EQ(this->kGroupPublicKey, pubkey); -} - -TEST_F(EpidFileParser, RejectsGroupPubKeyFileWithInvalidSignature) { - GroupPubKey pubkey; - std::vector pubkey_inv_sign(this->kGroupPublicKeyFile); - pubkey_inv_sign[pubkey_inv_sign.size() - 1] = - pubkey_inv_sign[pubkey_inv_sign.size() - 1] ^ 0xFF; - EXPECT_EQ( - kEpidSigInvalid, - EpidParseGroupPubKeyFile((void*)pubkey_inv_sign.data(), - pubkey_inv_sign.size(), &this->kCert, &pubkey)); -} - -////////////////////////////////////////////////////////////////////////// -// EpidParsePrivRlFile Tests -TEST_F(EpidFileParser, PrivRlParseProvidesRequiredLenWithNullDest) { - size_t rl_len = 0; - EXPECT_EQ(kEpidNoErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - nullptr, &rl_len)); - EXPECT_EQ(this->kShortPrivRl.size(), rl_len); -} - -TEST_F(EpidFileParser, PrivRlParseFailsGivenNullParameters) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - - // null input buffer - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile(nullptr, this->kShortPrivRlFile.size(), - &this->kCert, (PrivRl*)rl.data(), &rl_len)); - // null cert - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), nullptr, - (PrivRl*)rl.data(), &rl_len)); - // null rl_length - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (PrivRl*)rl.data(), nullptr)); - // null rl_length with null dest - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - nullptr, nullptr)); -} - -TEST_F(EpidFileParser, PrivRlParseFailsGivenUnsupportedCurve) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - EpidCaCertificate unsupported_curve(kCert); - unsupported_curve.a.data[0] = unsupported_curve.a.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve, - (PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve2(kCert); - unsupported_curve2.b.data[0] = unsupported_curve2.b.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve2, - (PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve3(kCert); - unsupported_curve3.x.data[0] = unsupported_curve3.x.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve3, - (PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve4(kCert); - unsupported_curve4.y.data[0] = unsupported_curve4.y.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve4, - (PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve5(kCert); - unsupported_curve5.r.data[0] = unsupported_curve5.r.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve5, - (PrivRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve6(kCert); - unsupported_curve6.prime.data[0] = unsupported_curve6.prime.data[0] ^ 0xFF; - - EXPECT_EQ( - kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &unsupported_curve6, - (PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, PrivRlParseFailsGivenInvalidKeyInCertificate) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - EpidCaCertificate invalid_key_qx(kCert); - invalid_key_qx.pubkey.data[0] = invalid_key_qx.pubkey.data[0] ^ 0xFF; - - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &invalid_key_qx, - (PrivRl*)rl.data(), &rl_len)); - - EpidCaCertificate invalid_key_qy(kCert); - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &invalid_key_qy, - (PrivRl*)rl.data(), &rl_len)); - - EpidCaCertificate invalid_key_qx_qy(kCert); - invalid_key_qx_qy.pubkey.data[0] = invalid_key_qx_qy.pubkey.data[0] ^ 0xFF; - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &invalid_key_qx_qy, - (PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, RejectsPrivRlFileWithInvalidSize) { - size_t rl_len = this->kEmptyPrivRl.size(); - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kEmptyPrivRlFile.data(), - this->kEmptyPrivRlFile.size() - 1, &this->kCert, - (PrivRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kEmptyPrivRlFile.data(), 0, - &this->kCert, (PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, RejectsInvalidPrivRlFileType) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &this->kCert, - (PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, RejectsPrivRlFileWithUnsupportedEpidVersion) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - - std::vector unsupported_epidver_file(this->kShortPrivRlFile); - unsupported_epidver_file[0] = {0x01}; - - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)unsupported_epidver_file.data(), - unsupported_epidver_file.size(), &this->kCert, - (PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, ParsesEmptyPrivRl) { - size_t rl_len = this->kEmptyPrivRl.size(); - std::vector rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - EpidParsePrivRlFile((void*)this->kEmptyPrivRlFile.data(), - this->kEmptyPrivRlFile.size(), &this->kCert, - (PrivRl*)rl.data(), &rl_len)); - EXPECT_EQ(this->kEmptyPrivRl, rl); -} - -TEST_F(EpidFileParser, ParsesShortPrivRl) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (PrivRl*)rl.data(), &rl_len)); - EXPECT_EQ(this->kShortPrivRl, rl); -} - -TEST_F(EpidFileParser, ParsesLongPrivRl) { - EcdsaSignature signature = { - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, - 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, - 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x02, - 0xd7, 0x14, 0x3e, 0xce, 0x36, 0x24, 0xb2, 0xe5, 0x14, 0x94, 0x17, - 0xdf, 0x8d, 0x0f, 0xda, 0xff, 0x8c, 0xb9, 0x7f, 0xb6, 0x05, 0x09, - 0x08, 0x80, 0xb0, 0xb8, 0x45, 0x92, 0x15, 0xb6, 0x08, - }; - - std::vector long_privrl_file = {// Intel(R) EPID Version - 0x02, 0x00, - // File Type - 0x00, 0x0d, - // Group ID - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2a, - // Revocation list version number - 0x00, 0x00, 0x00, 0x00, - // Number of entries - 0x00, 0x00, 0x00, 0x32}; - const std::vector FToCreateLongRl = { - 0x8a, 0xdc, 0xc0, 0xc8, 0xcd, 0x29, 0x9e, 0x08, 0x9e, 0x4e, 0x0d, - 0xa7, 0xf6, 0x46, 0xee, 0x80, 0xca, 0x91, 0x86, 0x54, 0x3c, 0x7f, - 0x8d, 0xb5, 0x49, 0xf9, 0x6d, 0x00, 0x39, 0x39, 0x62, 0xc7, - }; - for (int i = 0; i < 50; ++i) { - for (auto it : FToCreateLongRl) { - long_privrl_file.push_back(it); - } - } - for (auto it : signature.x.data) { - long_privrl_file.push_back(it); - } - for (auto it : signature.y.data) { - long_privrl_file.push_back(it); - } - size_t rl_len = long_privrl_file.size() - 68; - std::vector rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - EpidParsePrivRlFile((void*)long_privrl_file.data(), - long_privrl_file.size(), &this->kCert, - (PrivRl*)rl.data(), &rl_len)); - EXPECT_EQ( - std::vector(&long_privrl_file[4], - &long_privrl_file[long_privrl_file.size() - 64]), - rl); -} - -TEST_F(EpidFileParser, RejectsPrivRlFileWithInvalidSignature) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - std::vector privrl_inv_sign(kShortPrivRlFile); - privrl_inv_sign[privrl_inv_sign.size() - 1] = - privrl_inv_sign[privrl_inv_sign.size() - 1] ^ 0xFF; - - EXPECT_EQ(kEpidSigInvalid, - EpidParsePrivRlFile(privrl_inv_sign.data(), privrl_inv_sign.size(), - &this->kCert, (PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, PrivRlParseRejectsBufWithInsufficientSize) { - size_t rl_len = this->kShortPrivRl.size() - 1; - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (PrivRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, ReturnsProperSizeGivenOversizedPrivRlBuf) { - size_t rl_len = this->kShortPrivRl.size() + 1; - std::vector oversized_rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - EpidParsePrivRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (PrivRl*)oversized_rl.data(), &rl_len)); - std::vector rl(oversized_rl.begin(), oversized_rl.end() - 1); - EXPECT_EQ(this->kShortPrivRl, rl); - EXPECT_EQ(this->kShortPrivRl.size(), rl_len); -} - -////////////////////////////////////////////////////////////////////////// -// EpidParseSigRlFile Tests -TEST_F(EpidFileParser, SigRlParseProvidesRequiredLenWithNullDest) { - size_t rl_len = 0; - EXPECT_EQ(kEpidNoErr, EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &kCert, - nullptr, &rl_len)); - EXPECT_EQ(rl_len, this->kShortSigRl.size()); -} - -TEST_F(EpidFileParser, SigRlParseFailsGivenNullParameters) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile(nullptr, this->kShortSigRlFile.size(), &kCert, - (SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), nullptr, - (SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &kCert, - (SigRl*)rl.data(), nullptr)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &kCert, nullptr, - nullptr)); -} - -TEST_F(EpidFileParser, SigRlParseFailsGivenUnsupportedCurve) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - EpidCaCertificate unsupported_curve1(kCert); - unsupported_curve1.a.data[0] = unsupported_curve1.a.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve1, - (SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve2(kCert); - unsupported_curve2.b.data[0] = unsupported_curve2.b.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve2, - (SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve3(kCert); - unsupported_curve3.x.data[0] = unsupported_curve3.x.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve3, - (SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve4(kCert); - unsupported_curve4.y.data[0] = unsupported_curve4.y.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve4, - (SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve5(kCert); - unsupported_curve5.r.data[0] = unsupported_curve5.r.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve5, - (SigRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve6(kCert); - unsupported_curve6.prime.data[0] = unsupported_curve6.prime.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &unsupported_curve6, - (SigRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, SigRlParseFailsGivenInvalidKeyInCertificate) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - EpidCaCertificate invalid_key_qx(kCert); - invalid_key_qx.pubkey.data[0] = invalid_key_qx.pubkey.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &invalid_key_qx, - (SigRl*)rl.data(), &rl_len)); - EpidCaCertificate invalid_key_qy(kCert); - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &invalid_key_qy, - (SigRl*)rl.data(), &rl_len)); - EpidCaCertificate invalid_key_qx_qy(kCert); - invalid_key_qx_qy.pubkey.data[0] = invalid_key_qx_qy.pubkey.data[0] ^ 0xFF; - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] = - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] ^ - 0xFF; - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &invalid_key_qx_qy, - (SigRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, RejectsSigRlFileWithInvalidSize) { - size_t rl_len = this->kEmptySigRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kEmptySigRlFile.data(), 0, - &this->kCert, (SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kEmptySigRlFile.data(), - this->kEmptySigRlFile.size() - 1, &this->kCert, - (SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kEmptySigRlFile.size() + 1, &this->kCert, - (SigRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, SigRlParseRejectsInvalidSigRlFileType) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (SigRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, RejectsSigRlFileWithUnsupportedEpidVersion) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - std::vector unsupported_epidver_file(this->kShortSigRlFile); - unsupported_epidver_file[0] = {0x01}; - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)unsupported_epidver_file.data(), - unsupported_epidver_file.size(), &this->kCert, - (SigRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, ParsesEmptySigRl) { - size_t rl_len = this->kEmptySigRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - EpidParseSigRlFile(this->kEmptySigRlFile.data(), - this->kEmptySigRlFile.size(), &this->kCert, - (SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(rl, this->kEmptySigRl); -} - -TEST_F(EpidFileParser, ParsesShortSigRl) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - EpidParseSigRlFile(this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &this->kCert, - (SigRl*)rl.data(), &rl_len)); - EXPECT_EQ(rl, this->kShortSigRl); -} - -TEST_F(EpidFileParser, ParsesLongSigRl) { - std::vector b = { - 0x92, 0xb0, 0x8b, 0x6d, 0x6b, 0xa4, 0x32, 0x4e, 0xd1, 0x83, 0x26, 0x24, - 0x73, 0x70, 0x80, 0xd3, 0x72, 0xe3, 0xab, 0xfe, 0xbc, 0x86, 0x9f, 0x55, - 0x9e, 0x56, 0x57, 0xa5, 0x1f, 0x06, 0x6c, 0x1b, 0x2a, 0x55, 0xb6, 0xb2, - 0x13, 0xe9, 0xe8, 0x88, 0x6c, 0xbd, 0xe7, 0xca, 0x81, 0xcb, 0x92, 0x10, - 0xa7, 0xef, 0xdc, 0x88, 0xf1, 0x7c, 0x91, 0x07, 0xcc, 0xf0, 0x63, 0x39, - 0xae, 0x5c, 0xb9, 0x78, 0xcd, 0x54, 0xdd, 0x98, 0x3e, 0xa6, 0xc9, 0x2f, - 0x83, 0x78, 0xc8, 0x64, 0xc9, 0x92, 0x41, 0x52, 0xb9, 0xf9, 0x59, 0x91, - 0x46, 0x89, 0x78, 0xda, 0xc3, 0x26, 0xdd, 0x9d, 0x1f, 0x0c, 0x8e, 0xea, - 0xba, 0xa8, 0xde, 0xa5, 0x33, 0x8c, 0x2e, 0xaa, 0x0e, 0x2c, 0x13, 0x36, - 0xb3, 0x7b, 0xa6, 0x12, 0x98, 0x0a, 0x13, 0x35, 0xa3, 0x9e, 0x52, 0xaf, - 0x43, 0xf4, 0x1c, 0x79, 0xcf, 0x46, 0xc6, 0xcd}; - EcdsaSignature signature = { - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, - 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, - 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0x35, - 0xb4, 0x20, 0x07, 0x4e, 0xed, 0xc3, 0xb1, 0x60, 0xd8, 0x78, 0x32, - 0xb3, 0xa0, 0x8e, 0xc2, 0xab, 0xdb, 0x46, 0x6b, 0x03, 0x94, 0xd7, - 0x90, 0xd3, 0xfd, 0xd3, 0x5a, 0x9a, 0xc3, 0x66, 0xab, - }; - std::vector long_sigrl_file = { - // Intel(R) EPID Version - 0x02, 0x00, - // File Type - 0x00, 0x0e, - // Group ID - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x12, 0x34, - // Revocation list version number - 0x00, 0x00, 0x00, 0x03, - // Number of revocation list entries N - 0x00, 0x00, 0x00, 0x32, - }; - for (int i = 0; i < 50; ++i) { - for (auto it : b) { - long_sigrl_file.push_back(it); - } - } - for (auto it : signature.x.data) { - long_sigrl_file.push_back(it); - } - for (auto it : signature.y.data) { - long_sigrl_file.push_back(it); - } - size_t rl_len = long_sigrl_file.size() - sizeof(signature) - 4; - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - EpidParseSigRlFile(long_sigrl_file.data(), long_sigrl_file.size(), - &this->kCert, (SigRl*)rl.data(), &rl_len)); - - std::vector expected_long_sig_rl(std::vector( - &long_sigrl_file[4], - &long_sigrl_file[long_sigrl_file.size() - sizeof(signature)])); - - EXPECT_EQ(expected_long_sig_rl, rl); -} - -TEST_F(EpidFileParser, RejectsSigRlFileWithInvalidSignature) { - size_t rl_len = this->kShortSigRl.size(); - std::vector rl(rl_len); - std::vector sigrl_inv_sign(kShortSigRlFile); - sigrl_inv_sign[sigrl_inv_sign.size() - 1] = - sigrl_inv_sign[sigrl_inv_sign.size() - 1] ^ 0xFF; - EXPECT_EQ( - kEpidSigInvalid, - EpidParseSigRlFile((void*)sigrl_inv_sign.data(), sigrl_inv_sign.size(), - &this->kCert, (SigRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, SigRlParseRejectsBufWithInsufficientSize) { - size_t rl_len = this->kShortSigRl.size() - 1; - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &this->kCert, - (SigRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, ReturnsProperSizeGivenOversizedSigRlBuf) { - size_t rl_len = this->kShortSigRl.size() + 1; - std::vector oversized_rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - EpidParseSigRlFile((void*)this->kShortSigRlFile.data(), - this->kShortSigRlFile.size(), &this->kCert, - (SigRl*)oversized_rl.data(), &rl_len)); - std::vector rl(oversized_rl.begin(), oversized_rl.end() - 1); - EXPECT_EQ(this->kShortSigRl, rl); - EXPECT_EQ(this->kShortSigRl.size(), rl_len); -} - -////////////////////////////////////////////////////////////////////////// -// EpidParseGroupRlFile Tests -TEST_F(EpidFileParser, GroupRlParseProvidesRequiredLenWithNullDest) { - size_t rl_len = 0; - EXPECT_EQ(kEpidNoErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &kCert, - nullptr, &rl_len)); - EXPECT_EQ(rl_len, this->kShortGroupRl.size()); -} - -TEST_F(EpidFileParser, GroupRlParseFailsGivenNullParameters) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile(nullptr, this->kShortGroupRlFile.size(), - &kCert, (GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), nullptr, - (GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &kCert, - (GroupRl*)rl.data(), nullptr)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &kCert, - nullptr, nullptr)); -} - -TEST_F(EpidFileParser, GroupRlParseFailsGivenUnsupportedCurve) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - EpidCaCertificate unsupported_curve1(kCert); - unsupported_curve1.a.data[0] = unsupported_curve1.a.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &unsupported_curve1, - (GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve2(kCert); - unsupported_curve2.b.data[0] = unsupported_curve2.b.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &unsupported_curve2, - (GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve3(kCert); - unsupported_curve3.x.data[0] = unsupported_curve3.x.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &unsupported_curve3, - (GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve4(kCert); - unsupported_curve4.y.data[0] = unsupported_curve4.y.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &unsupported_curve4, - (GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve5(kCert); - unsupported_curve5.r.data[0] = unsupported_curve5.r.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &unsupported_curve5, - (GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate unsupported_curve6(kCert); - unsupported_curve6.prime.data[0] = unsupported_curve6.prime.data[0] ^ 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &unsupported_curve6, - (GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, GroupRlParseFailsGivenInvalidKeyInCertificate) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - EpidCaCertificate invalid_key_qx(kCert); - invalid_key_qx.pubkey.data[0] = invalid_key_qx.pubkey.data[0] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, EpidParseGroupRlFile( - (void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &invalid_key_qx, - (GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate invalid_key_qy(kCert); - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] = - invalid_key_qy.pubkey.data[sizeof(invalid_key_qy.pubkey) - 1] ^ 0xFF; - EXPECT_EQ(kEpidBadArgErr, EpidParseGroupRlFile( - (void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &invalid_key_qy, - (GroupRl*)rl.data(), &rl_len)); - EpidCaCertificate invalid_key_qx_qy(kCert); - invalid_key_qx_qy.pubkey.data[0] = invalid_key_qx_qy.pubkey.data[0] ^ 0xFF; - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] = - invalid_key_qx_qy.pubkey.data[sizeof(invalid_key_qx_qy.pubkey) - 1] ^ - 0xFF; - EXPECT_EQ( - kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &invalid_key_qx_qy, - (GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, RejectsGroupRlFileWithInvalidSize) { - size_t rl_len = this->kEmptyGroupRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kEmptyGroupRlFile.data(), 0, - &this->kCert, (GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kEmptyGroupRlFile.data(), - this->kEmptyGroupRlFile.size() - 1, - &this->kCert, (GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kEmptyGroupRlFile.size() + 1, - &this->kCert, (GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, RejectsInvalidGroupRlFileType) { - size_t rl_len = this->kShortPrivRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortPrivRlFile.data(), - this->kShortPrivRlFile.size(), &this->kCert, - (GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, RejectsGroupRlFileWithUnsupportedEpidVersion) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - std::vector unsupported_epidver_file(this->kShortGroupRlFile); - unsupported_epidver_file[0] = {0x01}; - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)unsupported_epidver_file.data(), - unsupported_epidver_file.size(), &this->kCert, - (GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, ParsesEmptyGroupRl) { - size_t rl_len = this->kEmptyGroupRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - EpidParseGroupRlFile(this->kEmptyGroupRlFile.data(), - this->kEmptyGroupRlFile.size(), &this->kCert, - (GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(rl, this->kEmptyGroupRl); -} - -TEST_F(EpidFileParser, ParsesShortGroupRl) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, - EpidParseGroupRlFile(this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &this->kCert, - (GroupRl*)rl.data(), &rl_len)); - EXPECT_EQ(rl, this->kShortGroupRl); -} - -TEST_F(EpidFileParser, ParsesLongGroupRl) { - std::vector gid = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0xbc}; - EcdsaSignature signature = { - 0xfb, 0x57, 0x6f, 0x15, 0x3e, 0xf8, 0x41, 0x47, 0x51, 0x71, 0xed, - 0x2a, 0x9b, 0x88, 0x99, 0x5b, 0x85, 0x3b, 0xdf, 0xf9, 0x70, 0x2a, - 0x6c, 0x06, 0x3b, 0x72, 0x02, 0x32, 0xb9, 0x3a, 0x76, 0xe7, 0xa4, - 0xaa, 0x8c, 0x1c, 0x91, 0xa2, 0x57, 0x07, 0x67, 0x0e, 0x58, 0xae, - 0xc7, 0x25, 0x15, 0x36, 0xda, 0xa0, 0xea, 0xc1, 0x15, 0x2b, 0xf2, - 0xc2, 0x33, 0x43, 0x3f, 0xc6, 0x56, 0xc1, 0x57, 0xbd, - }; - std::vector long_grouprl_file = { - /// Intel(R) EPID Version - 0x02, 0x00, - // File type - 0x00, 0x0f, - // RLver: revocation list version number - 0x00, 0x00, 0x00, 0x01, - // n3: number of entries in GroupRL - 0x00, 0x00, 0x00, 0x32, - }; - for (int i = 0; i < 50; ++i) { - for (auto it : gid) { - long_grouprl_file.push_back(it); - } - } - for (auto it : signature.x.data) { - long_grouprl_file.push_back(it); - } - for (auto it : signature.y.data) { - long_grouprl_file.push_back(it); - } - - size_t rl_len = long_grouprl_file.size() - sizeof(signature) - 4; - std::vector rl(rl_len); - EXPECT_EQ(kEpidNoErr, EpidParseGroupRlFile( - long_grouprl_file.data(), long_grouprl_file.size(), - &this->kCert, (GroupRl*)rl.data(), &rl_len)); - - std::vector expected_long_gr_rl(std::vector( - &long_grouprl_file[4], - &long_grouprl_file[long_grouprl_file.size() - sizeof(signature)])); - - EXPECT_EQ(expected_long_gr_rl, rl); -} - -TEST_F(EpidFileParser, RejectsGroupRlFileWithInvalidSignature) { - size_t rl_len = this->kShortGroupRl.size(); - std::vector rl(rl_len); - std::vector grouprl_inv_sign(this->kShortGroupRlFile); - grouprl_inv_sign[grouprl_inv_sign.size() - 1] = - grouprl_inv_sign[grouprl_inv_sign.size() - 1] ^ 0xFF; - EXPECT_EQ(kEpidSigInvalid, - EpidParseGroupRlFile((void*)grouprl_inv_sign.data(), - grouprl_inv_sign.size(), &this->kCert, - (GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, GroupRlParseRejectsBufWithInsufficientSize) { - size_t rl_len = this->kShortGroupRl.size() - 1; - std::vector rl(rl_len); - - EXPECT_EQ(kEpidBadArgErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &this->kCert, - (GroupRl*)rl.data(), &rl_len)); -} - -TEST_F(EpidFileParser, ReturnsProperSizeGivenOversizedGroupRlBuf) { - size_t rl_len = this->kShortGroupRl.size() + 1; - std::vector oversized_rl(rl_len); - - EXPECT_EQ(kEpidNoErr, - EpidParseGroupRlFile((void*)this->kShortGroupRlFile.data(), - this->kShortGroupRlFile.size(), &this->kCert, - (GroupRl*)oversized_rl.data(), &rl_len)); - std::vector rl(oversized_rl.begin(), oversized_rl.end() - 1); - EXPECT_EQ(this->kShortGroupRl, rl); - EXPECT_EQ(this->kShortGroupRl.size(), rl_len); -} - -////////////////////////////////////////////////////////////////////////// -// EpidParseFileHeader Tests -TEST_F(EpidFileParser, ParseFileHeaderFailsGivenNullInParameters) { - EpidVersion epid_version = kNumEpidVersions; - EpidFileType file_type = kNumFileTypes; - EXPECT_EQ(kEpidBadArgErr, EpidParseFileHeader(nullptr, sizeof(EpidFileHeader), - &epid_version, &file_type)); -} - -TEST_F(EpidFileParser, ParseFileHeaderFailsGivenInvalidSize) { - EpidVersion epid_version = kNumEpidVersions; - EpidFileType file_type = kNumFileTypes; - EpidFileHeader epid_header = this->kCert.header; - EXPECT_EQ(kEpidBadArgErr, - EpidParseFileHeader((void*)&epid_header, sizeof(epid_header) - 1, - &epid_version, &file_type)); -} - -TEST_F(EpidFileParser, ParseFileHeaderReportsUnknownEpidVersion) { - // Since this variable must contain kNumEpidVersions after the function call, - // assign something different from kNumEpidVersions - EpidVersion epid_version = kEpid1x; - EpidFileType file_type = kNumFileTypes; - EpidFileHeader epid_header = this->kCert.header; - epid_header.epid_version.data[0] = 0x00; - EXPECT_EQ(kEpidNoErr, - EpidParseFileHeader((void*)&epid_header, sizeof(epid_header), - &epid_version, &file_type)); - EXPECT_EQ(kNumEpidVersions, epid_version); - EXPECT_EQ(kIssuingCaPubKeyFile, file_type); -} - -TEST_F(EpidFileParser, ParseFileHeaderReportsUnknownFileType) { - EpidVersion epid_version = kNumEpidVersions; - // Since this variable must contain kNumFileTypes after the function call, - // assign something not kNumFileTypes - EpidFileType file_type = kIssuingCaPubKeyFile; - EpidFileHeader epid_header = this->kCert.header; - epid_header.file_type.data[1] = 0x00; - EXPECT_EQ(kEpidNoErr, - EpidParseFileHeader((void*)&epid_header, sizeof(epid_header), - &epid_version, &file_type)); - EXPECT_EQ(kEpid2x, epid_version); - EXPECT_EQ(kNumFileTypes, file_type); -} - -TEST_F(EpidFileParser, ParseFileHeaderCanSkipExtractingSomeValues) { - EpidVersion epid_version = kNumEpidVersions; - EpidFileType file_type = kNumFileTypes; - EpidFileHeader epid_header = this->kCert.header; - EXPECT_EQ(kEpidNoErr, - EpidParseFileHeader((void*)&epid_header, sizeof(epid_header), - nullptr, &file_type)); - EXPECT_EQ(kIssuingCaPubKeyFile, file_type); - - EXPECT_EQ(kEpidNoErr, - EpidParseFileHeader((void*)&epid_header, sizeof(epid_header), - &epid_version, nullptr)); - EXPECT_EQ(kEpid2x, epid_version); - - EXPECT_EQ(kEpidNoErr, - EpidParseFileHeader((void*)&epid_header, sizeof(epid_header), - nullptr, nullptr)); -} - -TEST_F(EpidFileParser, ParseFileHeaderParsesCorrectly) { - EpidVersion epid_version = kNumEpidVersions; - EpidFileType file_type = kNumFileTypes; - EpidFileHeader epid_header = this->kCert.header; - EXPECT_EQ(kEpidNoErr, - EpidParseFileHeader((void*)&epid_header, sizeof(epid_header), - &epid_version, &file_type)); - EXPECT_EQ(kEpid2x, epid_version); - EXPECT_EQ(kIssuingCaPubKeyFile, file_type); - - EpidFileHeader epid_header2 = {0x01, 0x00, 0x00, 0x0B}; - EXPECT_EQ(kEpidNoErr, - EpidParseFileHeader((void*)&epid_header2, sizeof(epid_header2), - &epid_version, &file_type)); - EXPECT_EQ(kEpid1x, epid_version); - EXPECT_EQ(kSigRlRequestFile, file_type); -} -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/Makefile deleted file mode 100644 index abeaac56a7..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/make -f - -#define path variables -IPP_SRC_INCLUDE_DIR = ../../ext/ipp/sources/ippcp/src/ -IPP_INCLUDE_DIR = ../../ext/ipp/sources/include/ -GTEST_INCLUDE_DIR = ../../ext/ - -LIB_INSTALL_DIR = $(epidinstalldir)/lib/posix-$(ARCH)/ -TEST_INSTALL_DIR = $(epidinstalldir)/test/ -HEADERS_INSTALL_DIR := $(epidinstalldir)/include/epid/member/ - -API_HEADERS_INSTALL = ./api.h - -MEMBER_INCLUDE_DIR = ../../ - -MEMBER_SRC = $(wildcard ./src/*.c) -MEMBER_OBJ = $(sort $(MEMBER_SRC:.c=.o)) -MEMBER_LIB = ./libmember.a - -MEMBER_UTEST_EXE = ./member-utest -MEMBER_UTEST_SRC = $(wildcard ./unittests/*.cc) -MEMBER_UTEST_OBJ = $(sort $(MEMBER_UTEST_SRC:.cc=.o)) -LIB_MEMBER_DIR = . -LIB_VERIFIER_DIR = ../verifier -LIB_COMMON_TESTHELPER_DIR = ../common-testhelper -LIB_COMMON_DIR = ../common -LIB_IPPCP_DIR = ../../ext/ipp/sources/ippcp/src -LIB_IPPCPEPID_DIR = ../../ext/ipp/sources/ippcpepid/src - -#set flags for linker -LDFLAGS += -L$(GTEST_INCLUDE_DIR)/gtest -L$(LIB_COMMON_TESTHELPER_DIR) \ - -L$(LIB_MEMBER_DIR) -L$(LIB_VERIFIER_DIR) -L$(LIB_COMMON_DIR) \ - -L$(LIB_IPPCPEPID_DIR) -L$(LIB_IPPCP_DIR) -lgtest -lcommon-testhelper \ - -lmember -lverifier -lcommon -lippcpepid -lippcp - -$(MEMBER_OBJ): %.o: %.c - $(CC) $(CFLAGS) -I$(IPP_INCLUDE_DIR) -I$(IPP_SRC_INCLUDE_DIR) \ - -I$(MEMBER_INCLUDE_DIR) -c $^ -o $@ - -$(MEMBER_LIB): $(MEMBER_OBJ) - $(AR) rc $(MEMBER_LIB) $(MEMBER_OBJ) - ranlib $(MEMBER_LIB) - -$(MEMBER_UTEST_EXE): $(MEMBER_UTEST_OBJ) - $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) - -$(MEMBER_UTEST_OBJ): %.o: %.cc - $(CXX) -o $@ $(CXXFLAGS) -I$(MEMBER_INCLUDE_DIR) \ - -I$(GTEST_INCLUDE_DIR) -c $^ - -build: all - -all: $(MEMBER_LIB) - -install: - mkdir -p '$(LIB_INSTALL_DIR)' - mkdir -p '$(HEADERS_INSTALL_DIR)' - cp $(MEMBER_LIB) '$(LIB_INSTALL_DIR)' - cp $(API_HEADERS_INSTALL) '$(HEADERS_INSTALL_DIR)' -#install tests if they exist -ifneq (,$(wildcard $(MEMBER_UTEST_EXE))) - mkdir -p '$(TEST_INSTALL_DIR)' - cp $(MEMBER_UTEST_EXE) '$(TEST_INSTALL_DIR)' -endif - -check: $(MEMBER_UTEST_EXE) run - -run: - $(MEMBER_UTEST_EXE) $(GTEST_FLAGS) - -clean: - rm -f $(MEMBER_OBJ) \ - $(MEMBER_LIB) \ - $(MEMBER_UTEST_OBJ) \ - $(MEMBER_UTEST_EXE) \ - *.xml diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/api.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/api.h deleted file mode 100644 index 6b834f5537..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/api.h +++ /dev/null @@ -1,491 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_MEMBER_API_H_ -#define EPID_MEMBER_API_H_ - -#include -#include "epid/common/stdtypes.h" -#include "epid/common/types.h" -#include "epid/common/errors.h" -#include "epid/common/bitsupplier.h" - -#ifdef __cplusplus -extern "C"{ -#endif - -/*! - * \file - * \brief Intel(R) EPID SDK member API. - */ - -/// Member functionality -/*! - \defgroup EpidMemberModule member - - Defines the APIs needed by Intel(R) EPID members. Each member - context (::MemberCtx) represents membership in a single group. - - \ingroup EpidModule - @{ -*/ - -/// Internal context of member. -typedef struct MemberCtx MemberCtx; - -/// Pre-computed member settings. -/*! - Serialized form of the information about a member that remains stable for - a given set of keys. - - \note e12 = 0 implies that this data is not valid - */ -#pragma pack(1) -typedef struct MemberPrecomp { - GtElemStr e12; ///< an element in GT - GtElemStr e22; ///< an element in GT - GtElemStr e2w; ///< an element in GT - GtElemStr ea2; ///< an element in GT -} MemberPrecomp; - -/// Pre-computed signature. -/*! - Serialized form of an intermediate signature that does not depend on - basename or message. This can be used to time-shift compute time needed to - sign a message. - */ -typedef struct PreComputedSignature { - G1ElemStr B; ///< an element in G1 - G1ElemStr K; ///< an element in G1 - G1ElemStr T; ///< an element in G1 - G1ElemStr R1; ///< an element in G1 - GtElemStr R2; ///< an element in G1 - FpElemStr a; ///< an integer between [0, p-1] - FpElemStr b; ///< an integer between [0, p-1] - FpElemStr rx; ///< an integer between [0, p-1] - FpElemStr rf; ///< an integer between [0, p-1] - FpElemStr ra; ///< an integer between [0, p-1] - FpElemStr rb; ///< an integer between [0, p-1] -} PreComputedSignature; -#pragma pack() - -/// Creates a new member context. -/*! - Must be called to create the member context that is used by - other "Member" APIs. - - Allocates memory for the context, then initializes it. - - EpidMemberDelete() must be called to safely release the member context. - - \param[in] pub_key - The group certificate. - \param[in] priv_key - The member private key. - \param[in] precomp - Optional pre-computed data. If NULL the value is computed internally and is - readable using EpidMemberWritePrecomp(). - \param[in] rnd_func - Random number generator. - \param[in] rnd_param - Pass through context data for rnd_func. - \param[out] ctx - Newly constructed member context. - - \returns ::EpidStatus - - \warning - For security rnd_func should be a cryptographically secure random - number generator. - - \note - If the result is not ::kEpidNoErr the content of ctx is undefined. - - \see EpidMemberDelete - \see EpidMemberWritePrecomp - */ -EpidStatus EpidMemberCreate(GroupPubKey const* pub_key, PrivKey const* priv_key, - MemberPrecomp const* precomp, BitSupplier rnd_func, - void* rnd_param, MemberCtx** ctx); - -/// Deletes an existing member context. -/*! - Must be called to safely release a member context created using - EpidMemberCreate(). - - De-initializes the context, frees memory used by the context, and sets the - context pointer to NULL. - - \param[in,out] ctx - The member context. Can be NULL. - - \see EpidMemberCreate - */ -void EpidMemberDelete(MemberCtx** ctx); - -/// Serializes the pre-computed member settings. -/*! - \param[in] ctx - The member context. - \param[out] precomp - The Serialized pre-computed member settings. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr, the content of precomp is undefined. - */ -EpidStatus EpidMemberWritePrecomp(MemberCtx const* ctx, MemberPrecomp* precomp); - -/// Sets the hash algorithm to be used by a member. -/*! - \param[in] ctx - The member context. - \param[in] hash_alg - The hash algorithm to use. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr, the hash algorithm used by the member is - undefined. - - \see EpidMemberCreate - \see ::HashAlg - */ -EpidStatus EpidMemberSetHashAlg(MemberCtx* ctx, HashAlg hash_alg); - -/// Computes the size in bytes required for an Intel(R) EPID signature. -/*! - \param[in] sig_rl - The signature based revocation list that is used. NULL is treated as - a zero length list. - - \returns - Size in bytes of an Intel(R) EPID signature including proofs for each entry - in the signature based revocation list. - - \see ::SigRl -*/ -size_t EpidGetSigSize(SigRl const* sig_rl); - -/// Writes an Intel(R) EPID signature. -/*! - \param[in] ctx - The member context. - \param[in] msg - The message to sign. - \param[in] msg_len - The length in bytes of message. - \param[in] basename - Optional basename. If basename is NULL a random basename is used. - Signatures generated using random basenames are anonymous. Signatures - generated using the same basename are linkable by the verifier. If a - basename is provided, it must already be registered, or - ::kEpidBadArgErr is returned. - \param[in] basename_len - The size of basename in bytes. Must be 0 basename is NULL. - \param[in] sig_rl - The signature based revocation list. - \param[in] sig_rl_size - The size in bytes of the signature based revocation list. - \param[out] sig - The generated signature - \param[in] sig_len - The size of signature in bytes. Must be equal to value returned by - EpidGetSigSize(). - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the content of sig is undefined. - - \see - EpidMemberCreate - \see - EpidMemberSetHashAlg - \see - EpidGetSigSize - */ -EpidStatus EpidSign(MemberCtx const* ctx, void const* msg, size_t msg_len, - void const* basename, size_t basename_len, - SigRl const* sig_rl, size_t sig_rl_size, EpidSignature* sig, - size_t sig_len); - -/// Registers a basename with a member. -/*! - - To prevent loss of privacy, the member keeps a list of basenames - (corresponding to authorized verifiers). The member signs a message - with a basename only if the basename is in the member's basename - list. - - \warning - The use of a name-based signature creates a platform unique - pseudonymous identifier. Because it reduces the member's privacy, the - user should be notified when it is used and should have control over - its use. - - \param[in] ctx - The member context. - \param[in] basename - The basename. - \param[in] basename_len - Length of the basename. - - \returns ::EpidStatus - - \retval ::kEpidDuplicateErr - The basename was already registered. - - \note - If the result is not ::kEpidNoErr or ::kEpidDuplicateErr it is undefined if the - basename is registered. - */ -EpidStatus EpidRegisterBaseName(MemberCtx* ctx, void const* basename, - size_t basename_len); - -/// Extends the member's pool of pre-computed signatures. -/*! - Can either generate new pre-computed signatures or import existing ones. - ::EpidWritePreSigs can be used to export pre-computed signatures. - - \param[in] ctx - The member context. - \param[in] number_presigs - The number of pre-computed signatures to add to the internal pool. - \param[in,out] presigs - Optional array of valid pre-computed signatures to import. If presigs is not - NULL it most contain at least number_presigs pre-computed signatures. - - \returns ::EpidStatus - - \note - presigs buffer is zeroed out before return to prevent pre-computed - signatures from being reused. - - \note - If the result is not ::kEpidNoErr the state of the pre-computed signature - pool, and of presigs, is undefined. - - \see ::EpidMemberCreate - \see ::EpidWritePreSigs - */ -EpidStatus EpidAddPreSigs(MemberCtx* ctx, size_t number_presigs, - PreComputedSignature* presigs); - -/// Gets the number of pre-computed signatures in the member's pool. -/*! - \param[in] ctx - The member context. - - \returns - Number of remaining pre-computed signatures. Returns 0 if ctx is NULL. - - \see ::EpidMemberCreate - \see ::EpidWritePreSigs -*/ -size_t EpidGetNumPreSigs(MemberCtx const* ctx); - -/// Serializes pre-computed signatures from the member's pool. -/*! - Removes requested number of pre-computed signatures from member's pool and - stores them in presigs array. Use ::EpidAddPreSigs to add pre-computed - signatures to the pool. - - \param[in] ctx - The member context. - \param[out] presigs - An existing buffer of pre-computed signatures. - \param[in] number_presigs - Number of pre-computed signatures to read. Number_presigs must not be greater - than the value returned by ::EpidGetNumPreSigs. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the state of the pre-computed signature - pool, and of presigs, is undefined. - - \see ::EpidMemberCreate - \see ::EpidGetNumPreSigs - \see ::EpidAddPreSigs -*/ -EpidStatus EpidWritePreSigs(MemberCtx* ctx, PreComputedSignature* presigs, - size_t number_presigs); - -/// Creates a request to join a group. -/*! - The created request is part of the interaction with an issuer needed to join - a group. This interaction with the issuer is outside the scope of this API. - - \param[in] pub_key - The group certificate of group to join. - \param[in] ni - The nonce chosen by issuer as part of join protocol. - \param[in] f - A randomly selected integer in [1, p-1]. - \param[in] rnd_func - Random number generator. - \param[in] rnd_param - Pass through context data for rnd_func. - \param[in] hash_alg - The hash algorithm to be used. - \param[out] join_request - The join request. - - \returns ::EpidStatus - - \warning - For security rnd_func should be a cryptographically secure random - number generator. - - \note - The default hash algorithm in Member is SHA-512. This is the - recommended option if you do not override the hash algorithm - elsewhere. - - \note - If the result is not ::kEpidNoErr, the content of join_request is undefined. - - \see ::HashAlg - */ -EpidStatus EpidRequestJoin(GroupPubKey const* pub_key, IssuerNonce const* ni, - FpElemStr const* f, BitSupplier rnd_func, - void* rnd_param, HashAlg hash_alg, - JoinRequest* join_request); - -/// Creates a basic signature for use in constrained environment. -/*! - Used in constrained environments where, due to limited memory, it may not - be possible to process through a large and potentially unbounded revocation - list. - - \param[in] ctx - The member context. - \param[in] msg - The message. - \param[in] msg_len - The length of message in bytes. - \param[in] basename - Optional basename. If basename is NULL a random basename is used. - Signatures generated using random basenames are anonymous. Signatures - generated using the same basename are linkable by the verifier. If a - basename is provided it must already be registered or - ::kEpidBadArgErr is returned. - \param[in] basename_len - The size of basename in bytes. Must be 0 basename is NULL. - \param[out] sig - The generated basic signature - - \returns ::EpidStatus - - \note - This function should be used in conjunction with EpidNrProve() - - \note - If the result is not ::kEpidNoErr the content of sig, is undefined. - - \see EpidMemberCreate - \see EpidNrProve - */ -EpidStatus EpidSignBasic(MemberCtx const* ctx, void const* msg, size_t msg_len, - void const* basename, size_t basename_len, - BasicSignature* sig); - -/// Calculates a non-revoked proof for a single signature based revocation -/// list entry. -/*! - Used in constrained environments where, due to limited memory, it may not - be possible to process through a large and potentially unbounded revocation - list. - - \param[in] ctx - The member context. - \param[in] msg - The message. - \param[in] msg_len - The length of message in bytes. - \param[in] sig - The basic signature. - \param[in] sigrl_entry - The signature based revocation list entry. - \param[out] proof - The generated non-revoked proof. - - \returns ::EpidStatus - - \note - This function should be used in conjunction with EpidSignBasic(). - - \note - If the result is not ::kEpidNoErr, the content of proof is undefined. - - \see EpidMemberCreate - \see EpidSignBasic - */ -EpidStatus EpidNrProve(MemberCtx const* ctx, void const* msg, size_t msg_len, - BasicSignature const* sig, SigRlEntry const* sigrl_entry, - NrProof* proof); - -/// Tests if a member private key is valid without checking revocation. -/*! - Used to check that a member private key is a valid key for a group. This - is useful as a cross check when creating a new member private key as part of - the join process - - \param[in] pub_key - The public key of the group. - \param[in] priv_key - The private key to check. - - \result bool - - \retval true - if the private key is valid for the group of the public key - \retval false - if the private key is not valid for the group of the public key - - - \see EpidRequestJoin - */ -bool EpidIsPrivKeyInGroup(GroupPubKey const* pub_key, PrivKey const* priv_key); - -/// Decompresses compressed member private key. -/*! - - Converts a compressed member private key into a member - private key for use by other member APIs. - - \param[in] pub_key - The public key of the group. - \param[in] compressed_privkey - The compressed member private key to be decompressed. - \param[out] priv_key - The member private key. - - \returns ::EpidStatus - */ -EpidStatus EpidDecompressPrivKey(GroupPubKey const* pub_key, - CompressedPrivKey const* compressed_privkey, - PrivKey* priv_key); - -/*! @} */ - -#ifdef __cplusplus -} -#endif - -#endif // EPID_MEMBER_API_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/member.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/member.parts deleted file mode 100644 index ee56010675..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/member.parts +++ /dev/null @@ -1,84 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ -Import('*') -env.PartName('member') - -api_headers = Pattern(src_dir='.', - includes=['api.h'], - recursive=False).files() -src_files = Pattern(src_dir='src', - includes=['*.c'], - recursive=False).files() -internal_headers = Pattern(src_dir='src', - includes=['*.h'], - recursive=False).files() - -utest_files = Pattern(src_dir='unittests', - includes=['*-test.cc', - '*-testhelper.cc',], - recursive=False).files() -utest_headers = Pattern(src_dir='unittests', - includes=['*-testhelper.h',], - recursive=False).files() - -build_files = Pattern(src_dir='.', - includes=['*.parts', 'Makefile'], - recursive=False).files() - -if 'install_package' in env['MODE']: - env.InstallTopLevel(api_headers, - sub_dir='epid/${PART_SHORT_NAME}') - env.InstallTopLevel(src_files + internal_headers, - sub_dir='epid/${PART_SHORT_NAME}/src') - env.InstallTopLevel(utest_files + utest_headers, - sub_dir='epid/${PART_SHORT_NAME}/unittests') - - env.InstallTopLevel(build_files, sub_dir='epid/${PART_SHORT_NAME}') - -else: - env.DependsOn([ - Component('common'), - ]) - - env.Append(CPPPATH='#') - - testenv = env.Clone() - - outputs = env.Library('${PART_NAME}', src_files) - env.Sdk(outputs) - env.SdkInclude(api_headers, sub_dir='epid/${PART_SHORT_NAME}') - - if 'install_lib' in env['MODE']: - env.InstallLib(outputs) - env.InstallInclude(api_headers, sub_dir='${PART_SHORT_NAME}') - - #unit tests - testenv['UNIT_TEST_TARGET_NAME'] = "${PART_NAME}-${UNIT_TEST_TARGET}" - testenv.UnitTest("utest", - utest_files, - command_args=[ - '--gtest_color=yes', - '--gtest_print_time=1', - '--gtest_output=xml', - '--gtest_filter=**', - ], - make_pdb=(env.isConfigBasedOn('debug') or - env.isConfigBasedOn('static_crt_debug')), - depends=[Component('gtest'), - Component('common-testhelper'), - Component('member'), - Component('verifier')], - INSTALL_BIN='${INSTALL_TEST_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/context.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/context.c deleted file mode 100644 index 227bf12a1b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/context.c +++ /dev/null @@ -1,423 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Member context implementation. - */ - -#include - -#include "epid/member/api.h" -#include "epid/member/src/context.h" -#include "epid/member/src/privkey.h" -#include "epid/common/src/memory.h" - -/// Perform pre-computation and store in context -static EpidStatus DoPrecomputation(MemberCtx* ctx); - -/// Read Member precomp -static EpidStatus ReadPrecomputation(MemberPrecomp const* precomp_str, - MemberCtx* ctx); - -EpidStatus EpidMemberCreate(GroupPubKey const* pub_key, PrivKey const* priv_key, - MemberPrecomp const* precomp, BitSupplier rnd_func, - void* rnd_param, MemberCtx** ctx) { - EpidStatus result = kEpidErr; - MemberCtx* member_ctx = NULL; - - if (!pub_key || !priv_key || !rnd_func || !ctx) { - return kEpidBadArgErr; - } - - // The member verifies that gid in public key and in private key - // match. If mismatch, abort and return operation failed. - if (memcmp(&pub_key->gid, &priv_key->gid, sizeof(GroupId))) { - return kEpidBadArgErr; - } - - // Allocate memory for VerifierCtx - member_ctx = SAFE_ALLOC(sizeof(MemberCtx)); - if (!member_ctx) { - return kEpidMemAllocErr; - } - - do { - // set the default hash algorithm to sha512 - member_ctx->hash_alg = kSha512; - - // Internal representation of Epid2Params - result = CreateEpid2Params(&member_ctx->epid2_params); - if (kEpidNoErr != result) { - break; - } - // Internal representation of Group Pub Key - result = - CreateGroupPubKey(pub_key, member_ctx->epid2_params->G1, - member_ctx->epid2_params->G2, &member_ctx->pub_key); - if (kEpidNoErr != result) { - break; - } - // Internal representation of Member Priv Key - result = CreatePrivKey(priv_key, member_ctx->epid2_params->G1, - member_ctx->epid2_params->Fp, &member_ctx->priv_key); - if (kEpidNoErr != result) { - break; - } - // Allocate member_ctx->e12 - result = NewFfElement(member_ctx->epid2_params->GT, &member_ctx->e12); - if (kEpidNoErr != result) { - break; - } - // Allocate member_ctx->e22 - result = NewFfElement(member_ctx->epid2_params->GT, &member_ctx->e22); - if (kEpidNoErr != result) { - break; - } - // Allocate member_ctx->e2w - result = NewFfElement(member_ctx->epid2_params->GT, &member_ctx->e2w); - if (kEpidNoErr != result) { - break; - } - // Allocate member_ctx->ea2 - result = NewFfElement(member_ctx->epid2_params->GT, &member_ctx->ea2); - if (kEpidNoErr != result) { - break; - } - // precomputation - if (precomp != NULL) { - result = ReadPrecomputation(precomp, member_ctx); - } else { - result = DoPrecomputation(member_ctx); - } - if (kEpidNoErr != result) { - break; - } - result = SetKeySpecificCommitValues(pub_key, &member_ctx->commit_values); - if (kEpidNoErr != result) { - break; - } - - member_ctx->rnd_func = rnd_func; - member_ctx->rnd_param = rnd_param; - member_ctx->allowed_basenames = NULL; - - if (!CreateStack(sizeof(PreComputedSignature), &member_ctx->presigs)) { - result = kEpidMemAllocErr; - break; - } - - *ctx = member_ctx; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result) { - DeleteFfElement(&member_ctx->ea2); - DeleteFfElement(&member_ctx->e2w); - DeleteFfElement(&member_ctx->e22); - DeleteFfElement(&member_ctx->e12); - DeleteEpid2Params(&member_ctx->epid2_params); - DeleteGroupPubKey(&member_ctx->pub_key); - DeletePrivKey(&member_ctx->priv_key); - DeleteStack(&member_ctx->presigs); - SAFE_FREE(member_ctx); - } - - return (result); -} - -void EpidMemberDelete(MemberCtx** ctx) { - if (ctx && *ctx) { - DeleteGroupPubKey(&(*ctx)->pub_key); - DeleteFfElement(&(*ctx)->e12); - DeleteFfElement(&(*ctx)->e22); - DeleteFfElement(&(*ctx)->e2w); - DeleteFfElement(&(*ctx)->ea2); - DeleteEpid2Params(&(*ctx)->epid2_params); - DeletePrivKey(&(*ctx)->priv_key); - DeleteBasenames(&(*ctx)->allowed_basenames); - DeleteStack(&(*ctx)->presigs); - SAFE_FREE(*ctx); - } -} - -EpidStatus EpidMemberWritePrecomp(MemberCtx const* ctx, - MemberPrecomp* precomp) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; // an element in GT - FfElement* e22 = NULL; // an element in GT - FfElement* e2w = NULL; // an element in GT - FfElement* ea2 = NULL; // an element in GT - FiniteField* GT = NULL; // Finite field GT(Fq12 ) - if (!ctx) { - return kEpidBadArgErr; - } - if (!precomp) { - return kEpidBadArgErr; - } - if (!ctx->e12 || !ctx->e22 || !ctx->e2w || !ctx->ea2 || !ctx->epid2_params || - !(ctx->epid2_params->GT)) { - return kEpidBadArgErr; - } - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - ea2 = ctx->ea2; - GT = ctx->epid2_params->GT; - result = WriteFfElement(GT, e12, &(precomp->e12), sizeof(precomp->e12)); - if (kEpidNoErr != result) { - return result; - } - result = WriteFfElement(GT, e22, &(precomp->e22), sizeof(precomp->e22)); - if (kEpidNoErr != result) { - return result; - } - result = WriteFfElement(GT, e2w, &(precomp->e2w), sizeof(precomp->e2w)); - if (kEpidNoErr != result) { - return result; - } - result = WriteFfElement(GT, ea2, &(precomp->ea2), sizeof(precomp->ea2)); - if (kEpidNoErr != result) { - return result; - } - return result; -} - -EpidStatus EpidMemberSetHashAlg(MemberCtx* ctx, HashAlg hash_alg) { - if (!ctx) return kEpidBadArgErr; - if (kSha256 != hash_alg && kSha384 != hash_alg && kSha512 != hash_alg) - return kEpidBadArgErr; - ctx->hash_alg = hash_alg; - return kEpidNoErr; -} - -EpidStatus EpidRegisterBaseName(MemberCtx* ctx, void const* basename, - size_t basename_len) { - EpidStatus result = kEpidErr; - if (basename_len == 0) { - return kEpidBadArgErr; - } - if (!ctx || !basename) { - return kEpidBadArgErr; - } - - if (ContainsBasename(ctx->allowed_basenames, basename, basename_len)) { - return kEpidDuplicateErr; - } - - result = AddBasename(&ctx->allowed_basenames, basename, basename_len); - - return result; -} - -void DeleteBasenames(AllowedBasename** rootnode) { - if (rootnode && *rootnode) { - AllowedBasename* currentnode = *rootnode; - while (currentnode) { - AllowedBasename* deletenode = currentnode; - currentnode = currentnode->next; - SAFE_FREE(deletenode); - } - *rootnode = NULL; - } -} - -EpidStatus AddBasename(AllowedBasename** rootnode, void const* basename, - size_t length) { - EpidStatus result = kEpidErr; - AllowedBasename* newnode = NULL; - AllowedBasename* currentnode = NULL; - if (length > (SIZE_MAX - sizeof(AllowedBasename)) + 1) { - return kEpidBadArgErr; - } - if (!basename) { - return kEpidBadArgErr; - } - - newnode = SAFE_ALLOC(sizeof(AllowedBasename) + (length - 1)); - if (!newnode) { - return kEpidMemAllocErr; - } - newnode->next = NULL; - newnode->length = length; - // Memory copy is used to copy a flexible array - if (0 != memcpy_S(newnode->name, length, basename, length)) { - SAFE_FREE(newnode); - return kEpidBadArgErr; - } - if (*rootnode == NULL) { - *rootnode = newnode; - return kEpidNoErr; - } - currentnode = *rootnode; - while (currentnode->next != NULL) { - currentnode = currentnode->next; - } - currentnode->next = newnode; - result = kEpidNoErr; - - return result; -} - -bool ContainsBasename(AllowedBasename const* rootnode, void const* basename, - size_t length) { - if (length != 0) { - while (rootnode != NULL) { - if (rootnode->length == length) { - if (!memcmp(rootnode->name, basename, length)) { - return true; - } - } - rootnode = rootnode->next; - } - } - return false; -} - -EpidStatus EpidAddPreSigs(MemberCtx* ctx, size_t number_presigs, - PreComputedSignature* presigs) { - PreComputedSignature* new_presigs; - if (!ctx) return kEpidBadArgErr; - if (!ctx->presigs) return kEpidBadArgErr; - - if (0 == number_presigs) return kEpidNoErr; - if (number_presigs > SIZE_MAX / sizeof(PreComputedSignature)) - return kEpidBadArgErr; // integer overflow - - new_presigs = - (PreComputedSignature*)StackPushN(ctx->presigs, number_presigs, presigs); - if (!new_presigs) return kEpidMemAllocErr; - - if (presigs) { - memset(presigs, 0, number_presigs * sizeof(PreComputedSignature)); - } else { - size_t i; - for (i = 0; i < number_presigs; i++) { - EpidStatus sts = EpidComputePreSig(ctx, &new_presigs[i]); - if (kEpidNoErr != sts) { - // roll back pre-computed-signature pool - StackPopN(ctx->presigs, number_presigs, 0); - return sts; - } - } - } - return kEpidNoErr; -} - -size_t EpidGetNumPreSigs(MemberCtx const* ctx) { - return (ctx && ctx->presigs) ? StackGetSize(ctx->presigs) : (size_t)0; -} - -EpidStatus EpidWritePreSigs(MemberCtx* ctx, PreComputedSignature* presigs, - size_t number_presigs) { - if (!ctx || (!presigs && (0 != number_presigs))) return kEpidBadArgErr; - if (!ctx->presigs) return kEpidBadArgErr; - - if (0 == number_presigs) return kEpidNoErr; - - return StackPopN(ctx->presigs, number_presigs, presigs) ? kEpidNoErr - : kEpidBadArgErr; -} - -static EpidStatus DoPrecomputation(MemberCtx* ctx) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; - FfElement* e22 = NULL; - FfElement* e2w = NULL; - FfElement* ea2 = NULL; - Epid2Params_* params = NULL; - GroupPubKey_* pub_key = NULL; - PairingState* ps_ctx = NULL; - if (!ctx) { - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->epid2_params->GT || - !ctx->epid2_params->pairing_state || !ctx->pub_key || !ctx->priv_key || - !ctx->e12 || !ctx->e22 || !ctx->e2w || !ctx->ea2) { - return kEpidBadArgErr; - } - pub_key = ctx->pub_key; - params = ctx->epid2_params; - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - ea2 = ctx->ea2; - ps_ctx = params->pairing_state; - // do precomputation - // 1. The member computes e12 = pairing(h1, g2). - result = Pairing(ps_ctx, e12, pub_key->h1, params->g2); - if (kEpidNoErr != result) { - return result; - } - // 2. The member computes e22 = pairing(h2, g2). - result = Pairing(ps_ctx, e22, pub_key->h2, params->g2); - if (kEpidNoErr != result) { - return result; - } - // 3. The member computes e2w = pairing(h2, w). - result = Pairing(ps_ctx, e2w, pub_key->h2, pub_key->w); - if (kEpidNoErr != result) { - return result; - } - // 4. The member computes ea2 = pairing(A, g2). - result = Pairing(ps_ctx, ea2, ctx->priv_key->A, params->g2); - if (kEpidNoErr != result) { - return result; - } - return kEpidNoErr; -} - -static EpidStatus ReadPrecomputation(MemberPrecomp const* precomp_str, - MemberCtx* ctx) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; - FfElement* e22 = NULL; - FfElement* e2w = NULL; - FfElement* ea2 = NULL; - FiniteField* GT = NULL; - Epid2Params_* params = NULL; - if (!ctx || !precomp_str) { - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->epid2_params->GT || !ctx->e12 || !ctx->e22 || - !ctx->e2w || !ctx->ea2) { - return kEpidBadArgErr; - } - params = ctx->epid2_params; - GT = params->GT; - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - ea2 = ctx->ea2; - - result = ReadFfElement(GT, &precomp_str->e12, sizeof(precomp_str->e12), e12); - if (kEpidNoErr != result) { - return result; - } - result = ReadFfElement(GT, &precomp_str->e22, sizeof(precomp_str->e22), e22); - if (kEpidNoErr != result) { - return result; - } - result = ReadFfElement(GT, &precomp_str->e2w, sizeof(precomp_str->e2w), e2w); - if (kEpidNoErr != result) { - return result; - } - result = ReadFfElement(GT, &precomp_str->ea2, sizeof(precomp_str->ea2), ea2); - if (kEpidNoErr != result) { - return result; - } - return kEpidNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/context.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/context.h deleted file mode 100644 index 73adb2e13b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/context.h +++ /dev/null @@ -1,85 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_MEMBER_SRC_CONTEXT_H_ -#define EPID_MEMBER_SRC_CONTEXT_H_ -/*! - * \file - * \brief Member context interface. - */ - -#include -#include "epid/member/api.h" -#include "epid/common/errors.h" -#include "epid/common/src/epid2params.h" -#include "epid/common/src/grouppubkey.h" -#include "epid/common/src/stack.h" -#include "epid/common/src/commitment.h" -#include "epid/member/src/privkey.h" - -/// Internal implementation of base name -typedef struct AllowedBasename { - struct AllowedBasename* next; ///< pointer to the next base name - size_t length; ///< size of base name - uint8_t name[1]; ///< base name (flexible array) -} AllowedBasename; - -/// Member context definition -struct MemberCtx { - GroupPubKey_* pub_key; ///< group public key - FfElement* e12; ///< an element in GT - FfElement* e22; ///< an element in GT - FfElement* e2w; ///< an element in GT - FfElement* ea2; ///< an element in GT - Epid2Params_* epid2_params; ///< Intel(R) EPID 2.0 params - PrivKey_* priv_key; ///< Member private key - - BitSupplier rnd_func; ///< Pseudo random number generation function - void* rnd_param; ///< Pointer to user context for rnd_func - HashAlg hash_alg; ///< Hash algorithm to use - AllowedBasename* allowed_basenames; ///< Base name list - Stack* presigs; ///< Pre-computed signatures pool - CommitValues commit_values; ///< Values that are hashed to create commitment -}; - -/// Delete base name list -void DeleteBasenames(AllowedBasename** rootnode); - -/// Add new base name to list -EpidStatus AddBasename(AllowedBasename** rootnode, void const* basename, - size_t length); - -/// Check if given base name exist in the list -bool ContainsBasename(AllowedBasename const* rootnode, void const* basename, - size_t length); - -/// Performs Pre-computation that can be used to speed up signing -/*! - \warning - Do not re-use the same pre-computed signature to generate more than - one signature. If a pre-computed signature is used for computing - two signatures, an attacker could learn the Intel(R) EPID private key. - - \param[in] ctx - The member context. - \param[out] precompsig - The pre-computed signature. - - \returns ::EpidStatus - */ -EpidStatus EpidComputePreSig(MemberCtx const* ctx, - PreComputedSignature* precompsig); - -#endif // EPID_MEMBER_SRC_CONTEXT_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/decompress_privkey.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/decompress_privkey.c deleted file mode 100644 index acba7739df..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/decompress_privkey.c +++ /dev/null @@ -1,295 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EpidDecompressPrivKey implementation. - */ - -#include "epid/member/api.h" - -#include "epid/common/src/memory.h" -#include "epid/common/src/epid2params.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/math/hash.h" -#include "epid/member/src/privkey.h" - -/// Handle Intel(R) EPID Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -/// Implements the derivation method used by private key decompression -/// Derives two integers x, f between [1, p-1] from the seed value -static EpidStatus DeriveXF(FpElemStr* x, FpElemStr* f, Seed const* seed, - FpElemStr const* p); - -EpidStatus EpidDecompressPrivKey(GroupPubKey const* pub_key, - CompressedPrivKey const* compressed_privkey, - PrivKey* priv_key) { - EpidStatus result = kEpidErr; - Epid2Params_* epid2_params = 0; - PrivKey_ priv_key_ = {{{0}}, 0, 0, 0}; - FfElement* Ax = 0; - EcPoint* t1 = 0; - EcPoint* t2 = 0; - FfElement* t3 = 0; - FfElement* t4 = 0; - BigNum* bn_pminus1 = 0; - BigNum* bn_one = 0; - EcPoint* h1 = 0; - EcPoint* w = 0; - - // check parameters - if (!pub_key || !compressed_privkey || !priv_key) { - return kEpidBadArgErr; - } - - // Internal representation of Epid2Params - result = CreateEpid2Params(&epid2_params); - if (kEpidNoErr != result) { - return result; - } - - do { - uint8_t bn_one_str = 1; - FpElemStr p_str = {0}; - bool is_valid = false; - // shortcuts - EcGroup* G1 = epid2_params->G1; - EcGroup* G2 = epid2_params->G2; - FiniteField* GT = epid2_params->GT; - EcPoint* g1 = epid2_params->g1; - EcPoint* g2 = epid2_params->g2; - PairingState* ps_ctx = epid2_params->pairing_state; - FiniteField* Fp = epid2_params->Fp; - FiniteField* Fq = epid2_params->Fq; - BigNum* p = epid2_params->p; - - // In the following process, temporary variables t1 (an element of - // G2), t2 (an element of G1), t3, t4 (elements of GT) are used. - // Let the compressed private key be (gid, A.x, seed). Let the - // Intel(R) EPID public key be (gid, h1, h2, w). - - // Create a new Priv Key - result = NewEcPoint(G1, &priv_key_.A); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(Fp, &priv_key_.x); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(Fp, &priv_key_.f); - BREAK_ON_EPID_ERROR(result); - - result = NewFfElement(Fq, &Ax); - BREAK_ON_EPID_ERROR(result); - result = NewEcPoint(G2, &t1); - BREAK_ON_EPID_ERROR(result); - result = NewEcPoint(G1, &t2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(GT, &t3); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(GT, &t4); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(sizeof(BigNumStr), &bn_pminus1); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(sizeof(bn_one_str), &bn_one); - BREAK_ON_EPID_ERROR(result); - - result = NewEcPoint(G1, &h1); - BREAK_ON_EPID_ERROR(result); - result = ReadEcPoint(G1, &(pub_key->h1), sizeof(pub_key->h1), h1); - BREAK_ON_EPID_ERROR(result); - result = NewEcPoint(G2, &w); - BREAK_ON_EPID_ERROR(result); - result = ReadEcPoint(G2, &(pub_key->w), sizeof(pub_key->w), w); - BREAK_ON_EPID_ERROR(result); - - result = WriteBigNum(p, sizeof(p_str), &p_str); - BREAK_ON_EPID_ERROR(result); - - result = ReadBigNum(&bn_one_str, sizeof(bn_one_str), bn_one); - BREAK_ON_EPID_ERROR(result); - - // 1. The member derives x and f from seed. The derivation - // function must be the same as the one used in the key - // generation above. This step is out of scope of this - // specification. - result = - DeriveXF(&priv_key->x, &priv_key->f, &compressed_privkey->seed, &p_str); - BREAK_ON_EPID_ERROR(result); - // 2. The member computes A = G1.makePoint(A.x). - result = ReadFfElement(Fq, &compressed_privkey->ax, - sizeof(compressed_privkey->ax), Ax); - BREAK_ON_EPID_ERROR(result); - result = EcMakePoint(G1, Ax, priv_key_.A); - BREAK_ON_EPID_ERROR(result); - // 3. The member tests whether (A, x, f) is a valid Intel(R) EPID - // private key as follows: - // a. It computes t1 = G2.sscmExp(g2, x). - result = EcSscmExp(G2, g2, (BigNumStr const*)&priv_key->x, t1); - BREAK_ON_EPID_ERROR(result); - // b. It computes t1 = G2.mul(t1, w). - result = EcMul(G2, t1, w, t1); - BREAK_ON_EPID_ERROR(result); - // c. It computes t3 = pairing(A, t1). - result = Pairing(ps_ctx, t3, priv_key_.A, t1); - BREAK_ON_EPID_ERROR(result); - // d. It computes t2 = G1.sscmExp(h1, f). - result = EcSscmExp(G1, h1, (BigNumStr const*)&priv_key->f, t2); - BREAK_ON_EPID_ERROR(result); - // e. It computes t2 = G1.mul(t2, g1). - result = EcMul(G1, t2, g1, t2); - BREAK_ON_EPID_ERROR(result); - // f. It computes t4 = pairing(t2, g2). - result = Pairing(ps_ctx, t4, t2, g2); - BREAK_ON_EPID_ERROR(result); - // g. If GT.isEqual(t3, t4) = false - result = FfIsEqual(GT, t3, t4, &is_valid); - BREAK_ON_EPID_ERROR(result); - if (!is_valid) { - // i. It computes t3 = GT.exp(t3, p-1). - result = BigNumSub(p, bn_one, bn_pminus1); - BREAK_ON_EPID_ERROR(result); - result = FfExp(GT, t3, bn_pminus1, t3); - BREAK_ON_EPID_ERROR(result); - // ii. If GT.isEqual(t3, t4) = false again, it reports bad - // Intel(R) EPID private key and exits. - result = FfIsEqual(GT, t3, t4, &is_valid); - BREAK_ON_EPID_ERROR(result); - if (!is_valid) { - result = kEpidBadArgErr; // Invalid Member key - break; - } - // iii. It sets A = G1.inverse(A). - result = EcInverse(G1, priv_key_.A, priv_key_.A); - BREAK_ON_EPID_ERROR(result); - // NOTE A is modified here in this step. - } - // 4. The decompressed Intel(R) EPID private key is (gid, A, x, f). - // x, f already filled in. - priv_key->gid = pub_key->gid; - result = WriteEcPoint(G1, priv_key_.A, &priv_key->A, sizeof(priv_key->A)); - BREAK_ON_EPID_ERROR(result); - - result = kEpidNoErr; - } while (0); - - DeleteEcPoint(&priv_key_.A); - DeleteFfElement(&priv_key_.x); - DeleteFfElement(&priv_key_.f); - DeleteFfElement(&Ax); - DeleteEcPoint(&t1); - DeleteEcPoint(&t2); - DeleteFfElement(&t3); - DeleteFfElement(&t4); - DeleteBigNum(&bn_pminus1); - DeleteBigNum(&bn_one); - DeleteEcPoint(&h1); - DeleteEcPoint(&w); - DeleteEpid2Params(&epid2_params); - - return result; -} - -/// Hash message buffer -typedef struct HashMsg { - /// Message to be hashed - char data[11]; -} HashMsg; - -static EpidStatus DeriveXF(FpElemStr* x, FpElemStr* f, Seed const* seed, - FpElemStr const* p) { - EpidStatus result = kEpidErr; - - BigNum* bn_x = 0; - BigNum* bn_f = 0; - BigNum* bn_p = 0; - - do { - HashMsg msgstr = {{ - 0x00, 0x45, 0x43, 0x43, 0x2d, 0x53, 0x61, 0x66, 0x65, 0x49, 0x44, - }}; -#pragma pack(1) - struct { - Seed seed; - HashMsg msg; - } hashbuf; -#pragma pack() - - Sha256Digest digest[2]; - Ipp8u str512[512 / 8]; - - result = NewBigNum(sizeof(*p), &bn_p); - BREAK_ON_EPID_ERROR(result); - result = ReadBigNum(p, sizeof(*p), bn_p); - BREAK_ON_EPID_ERROR(result); - - result = NewBigNum(sizeof(digest), &bn_x); - BREAK_ON_EPID_ERROR(result); - result = NewBigNum(sizeof(digest), &bn_f); - BREAK_ON_EPID_ERROR(result); - - // compute x - hashbuf.seed = *seed; - hashbuf.msg = msgstr; - hashbuf.msg.data[0] = 0x06; - result = Sha256MessageDigest(&hashbuf, sizeof(hashbuf), &digest[0]); - BREAK_ON_EPID_ERROR(result); - hashbuf.msg.data[0] = 0x07; - result = Sha256MessageDigest(&hashbuf, sizeof(hashbuf), &digest[1]); - BREAK_ON_EPID_ERROR(result); - - result = ReadBigNum(&digest, sizeof(digest), bn_x); - BREAK_ON_EPID_ERROR(result); - - result = BigNumMod(bn_x, bn_p, bn_x); - BREAK_ON_EPID_ERROR(result); - - result = WriteBigNum(bn_x, sizeof(str512), str512); - BREAK_ON_EPID_ERROR(result); - - *x = *(FpElemStr*)&str512[sizeof(str512) / 2]; - - // compute f - hashbuf.seed = *seed; - hashbuf.msg = msgstr; - hashbuf.msg.data[0] = 0x08; - result = Sha256MessageDigest(&hashbuf, sizeof(hashbuf), &digest[0]); - BREAK_ON_EPID_ERROR(result); - hashbuf.msg.data[0] = 0x09; - result = Sha256MessageDigest(&hashbuf, sizeof(hashbuf), &digest[1]); - BREAK_ON_EPID_ERROR(result); - - result = ReadBigNum(&digest, sizeof(digest), bn_f); - BREAK_ON_EPID_ERROR(result); - - result = BigNumMod(bn_f, bn_p, bn_f); - BREAK_ON_EPID_ERROR(result); - - result = WriteBigNum(bn_f, sizeof(str512), str512); - BREAK_ON_EPID_ERROR(result); - - *f = *(FpElemStr*)&str512[sizeof(str512) / 2]; - - result = kEpidNoErr; - } while (0); - - DeleteBigNum(&bn_x); - DeleteBigNum(&bn_f); - DeleteBigNum(&bn_p); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/get_sigsize.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/get_sigsize.c deleted file mode 100644 index 08c8964e8b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/get_sigsize.c +++ /dev/null @@ -1,35 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EpidGetSigSize implementation. - */ -#include "epid/member/api.h" -#include "epid/common/src/endian_convert.h" - -size_t EpidGetSigSize(SigRl const* sig_rl) { - const size_t kMinSigSize = sizeof(EpidSignature) - sizeof(NrProof); - if (!sig_rl) { - return kMinSigSize; - } else { - if (ntohl(sig_rl->n2) > (SIZE_MAX - kMinSigSize) / sizeof(NrProof)) { - return kMinSigSize; - } else { - return kMinSigSize + ntohl(sig_rl->n2) * sizeof(NrProof); - } - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/nr_prove.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/nr_prove.c deleted file mode 100644 index 6fc7613ef2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/nr_prove.c +++ /dev/null @@ -1,277 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EpidNrProve implementation. - */ -#include "epid/common/src/memory.h" -#include "epid/member/api.h" -#include "epid/member/src/context.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -/// Count of elements in array -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) - -#pragma pack(1) -/// Storage for values to create commitment in NrProve algorithm -typedef struct NrVerifyCommitValues { - BigNumStr p; //!< A large prime (256-bit) - G1ElemStr g1; //!< Generator of G1 (512-bit) - G1ElemStr b; //!< (element of G1): part of basic signature Sigma0 - G1ElemStr k; //!< (element of G1): part of basic signature Sigma0 - G1ElemStr bp; //!< (element of G1): one entry in SigRL - G1ElemStr kp; //!< (element of G1): one entry in SigRL - G1ElemStr t; //!< element of G1 - G1ElemStr r1; //!< element of G1 - G1ElemStr r2; //!< element of G1 - uint8_t msg[1]; //!< message -} NrVerifyCommitValues; -#pragma pack() - -EpidStatus EpidNrProve(MemberCtx const* ctx, void const* msg, size_t msg_len, - BasicSignature const* sig, SigRlEntry const* sigrl_entry, - NrProof* proof) { - EpidStatus res = kEpidErr; - NrVerifyCommitValues* commit_values = NULL; - size_t const commit_len = sizeof(*commit_values) - 1 + msg_len; - EcPoint* T = NULL; - EcPoint* R1 = NULL; - EcPoint* R2 = NULL; - FfElement* mu = NULL; - FfElement* nu = NULL; - FfElement* rmu = NULL; - FfElement* rnu = NULL; - FfElement* c = NULL; - FfElement* smu = NULL; - FfElement* snu = NULL; - EcPoint* B = NULL; - EcPoint* K = NULL; - EcPoint* rlB = NULL; - EcPoint* rlK = NULL; - FfElement const* f = NULL; - if (!ctx || (0 != msg_len && !msg) || !sig || !sigrl_entry || !proof) - return kEpidBadArgErr; - if (msg_len > ((SIZE_MAX - sizeof(*commit_values)) + 1)) - return kEpidBadArgErr; - if (!ctx->epid2_params || !ctx->priv_key) return kEpidBadArgErr; - - do { - bool is_identity = false; - BigNumStr mu_str = {0}; - BigNumStr nu_str = {0}; - BigNumStr rmu_str = {0}; - BigNumStr rnu_str = {0}; - BitSupplier rnd_func = ctx->rnd_func; - void* rnd_param = ctx->rnd_param; - FiniteField* Fp = ctx->epid2_params->Fp; - EcGroup* G1 = ctx->epid2_params->G1; - static const BigNumStr one = { - {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}}; - - // Check required parameters - if (!ctx->priv_key->f || !rnd_func || !Fp || !G1) return kEpidBadArgErr; - - f = ctx->priv_key->f; - - commit_values = SAFE_ALLOC(commit_len); - if (!commit_values) { - res = kEpidMemAllocErr; - break; - } - - // The following variables T, R1, R2 (elements of G1), and mu, nu, - // rmu, rnu, c, smu, snu (256-bit integers) are used. - res = NewEcPoint(G1, &T); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &R1); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &R2); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &mu); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &nu); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &rmu); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &rnu); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &c); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &smu); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &snu); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &B); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &K); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &rlB); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &rlK); - BREAK_ON_EPID_ERROR(res); - - res = ReadEcPoint(G1, (const uint8_t*)&(sig->B), sizeof(sig->B), B); - BREAK_ON_EPID_ERROR(res); - res = ReadEcPoint(G1, (const uint8_t*)&(sig->K), sizeof(sig->K), K); - BREAK_ON_EPID_ERROR(res); - res = ReadEcPoint(G1, (const uint8_t*)&(sigrl_entry->b), - sizeof(sigrl_entry->b), rlB); - BREAK_ON_EPID_ERROR(res); - res = ReadEcPoint(G1, (const uint8_t*)&(sigrl_entry->k), - sizeof(sigrl_entry->k), rlK); - BREAK_ON_EPID_ERROR(res); - - // 1. The member chooses random mu from [1, p-1]. - res = FfGetRandom(Fp, &one, rnd_func, rnd_param, mu); - BREAK_ON_EPID_ERROR(res); - // 2. The member computes nu = (- f * mu) mod p. - res = FfMul(Fp, mu, f, nu); - BREAK_ON_EPID_ERROR(res); - res = FfNeg(Fp, nu, nu); - BREAK_ON_EPID_ERROR(res); - // 3. The member computes T = G1.sscmMultiExp(K', mu, B', nu). - res = WriteFfElement(Fp, mu, (uint8_t*)&mu_str, sizeof(mu_str)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, nu, (uint8_t*)&nu_str, sizeof(nu_str)); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[2]; - BigNumStr const* exponents[2]; - points[0] = rlK; - points[1] = rlB; - exponents[0] = &mu_str; - exponents[1] = &nu_str; - res = EcSscmMultiExp(G1, points, exponents, COUNT_OF(points), T); - BREAK_ON_EPID_ERROR(res); - } - // 4. The member chooses rmu, rnu randomly from [1, p-1]. - res = FfGetRandom(Fp, &one, rnd_func, rnd_param, rmu); - BREAK_ON_EPID_ERROR(res); - res = FfGetRandom(Fp, &one, rnd_func, rnd_param, rnu); - BREAK_ON_EPID_ERROR(res); - // 5. The member computes R1 = G1.sscmMultiExp(K, rmu, B, rnu). - res = WriteFfElement(Fp, rmu, (uint8_t*)&rmu_str, sizeof(rmu_str)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, rnu, (uint8_t*)&rnu_str, sizeof(rnu_str)); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[2]; - BigNumStr const* exponents[2]; - points[0] = K; - points[1] = B; - exponents[0] = &rmu_str; - exponents[1] = &rnu_str; - res = EcSscmMultiExp(G1, points, exponents, COUNT_OF(points), R1); - BREAK_ON_EPID_ERROR(res); - } - // 6. The member computes R2 = G1.sscmMultiExp(K', rmu, B', rnu). - { - EcPoint const* points[2]; - BigNumStr const* exponents[2]; - points[0] = rlK; - points[1] = rlB; - exponents[0] = &rmu_str; - exponents[1] = &rnu_str; - res = EcSscmMultiExp(G1, points, exponents, COUNT_OF(points), R2); - BREAK_ON_EPID_ERROR(res); - } - // 7. The member computes c = Fp.hash(p || g1 || B || K || B' || - // K' || T || R1 || R2 || m). Refer to Section 7.1 for hash - // operation over a prime field. - - // commit_values is allocated such that there are msg_len bytes available - // starting at commit_values->msg - if (msg) { - // Memory copy is used to copy a message of variable length - if (0 != memcpy_S(&commit_values->msg[0], msg_len, msg, msg_len)) { - res = kEpidBadArgErr; - break; - } - } - commit_values->p = ctx->commit_values.p; - commit_values->g1 = ctx->commit_values.g1; - commit_values->b = sig->B; - commit_values->k = sig->K; - commit_values->bp = sigrl_entry->b; - commit_values->kp = sigrl_entry->k; - res = WriteEcPoint(G1, T, (uint8_t*)&commit_values->t, - sizeof(commit_values->t)); - BREAK_ON_EPID_ERROR(res); - res = WriteEcPoint(G1, R1, (uint8_t*)&commit_values->r1, - sizeof(commit_values->r1)); - BREAK_ON_EPID_ERROR(res); - res = WriteEcPoint(G1, R2, (uint8_t*)&commit_values->r2, - sizeof(commit_values->r2)); - BREAK_ON_EPID_ERROR(res); - res = FfHash(Fp, (uint8_t*)commit_values, commit_len, ctx->hash_alg, c); - BREAK_ON_EPID_ERROR(res); - - // 8. The member computes smu = (rmu + c * mu) mod p. - res = FfMul(Fp, c, mu, smu); - BREAK_ON_EPID_ERROR(res); - res = FfAdd(Fp, rmu, smu, smu); - BREAK_ON_EPID_ERROR(res); - // 9. The member computes snu = (rnu + c * nu) mod p. - res = FfMul(Fp, c, nu, snu); - BREAK_ON_EPID_ERROR(res); - res = FfAdd(Fp, rnu, snu, snu); - BREAK_ON_EPID_ERROR(res); - // 10. The member outputs sigma = (T, c, smu, snu), a non-revoked - // proof. If G1.is_identity(T) = true, the member also outputs - // "failed". - - proof->T = commit_values->t; - res = WriteFfElement(Fp, c, (uint8_t*)&proof->c, sizeof(proof->c)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, smu, (uint8_t*)&proof->smu, sizeof(proof->smu)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, snu, (uint8_t*)&proof->snu, sizeof(proof->snu)); - BREAK_ON_EPID_ERROR(res); - - res = EcIsIdentity(G1, T, &is_identity); - BREAK_ON_EPID_ERROR(res); - if (is_identity) { - res = kEpidSigRevokedInSigRl; - BREAK_ON_EPID_ERROR(res); - } - res = kEpidNoErr; - } while (0); - - f = NULL; - SAFE_FREE(commit_values) - DeleteEcPoint(&T); - DeleteEcPoint(&R1); - DeleteEcPoint(&R2); - DeleteFfElement(&mu); - DeleteFfElement(&nu); - DeleteFfElement(&rmu); - DeleteFfElement(&rnu); - DeleteFfElement(&c); - DeleteFfElement(&smu); - DeleteFfElement(&snu); - DeleteEcPoint(&B); - DeleteEcPoint(&K); - DeleteEcPoint(&rlB); - DeleteEcPoint(&rlK); - - return res; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/presig.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/presig.c deleted file mode 100644 index 9f057f8a3e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/presig.c +++ /dev/null @@ -1,229 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EpidComputePreSig implementation. - */ - -#include "epid/member/src/context.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -/// Count of elements in array -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) - -EpidStatus EpidComputePreSig(MemberCtx const* ctx, - PreComputedSignature* precompsig) { - EpidStatus res = kEpidNotImpl; - - EcPoint* B = NULL; - EcPoint* K = NULL; - EcPoint* T = NULL; - EcPoint* R1 = NULL; - - FfElement* R2 = NULL; - - FfElement* a = NULL; - FfElement* b = NULL; - FfElement* rx = NULL; - FfElement* rf = NULL; - FfElement* ra = NULL; - FfElement* rb = NULL; - FfElement* t1 = NULL; - FfElement* t2 = NULL; - FfElement* f = NULL; - - if (!ctx || !precompsig) return kEpidBadArgErr; - if (!ctx->epid2_params || !ctx->pub_key || !ctx->priv_key) - return kEpidBadArgErr; - - do { - // handy shorthands: - EcGroup* G1 = ctx->epid2_params->G1; - FiniteField* GT = ctx->epid2_params->GT; - FiniteField* Fp = ctx->epid2_params->Fp; - EcPoint* h2 = ctx->pub_key->h2; - EcPoint* A = ctx->priv_key->A; - FfElement* x = ctx->priv_key->x; - BigNumStr f_str = {0}; - BigNumStr a_str = {0}; - BigNumStr t1_str = {0}; - BigNumStr rf_str = {0}; - BigNumStr t2_str = {0}; - BigNumStr ra_str = {0}; - static const BigNumStr one = { - {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}}; - - if (!G1 || !GT || !Fp || !h2 || !A || !x || !ctx->priv_key->f || - !ctx->e12 || !ctx->e22 || !ctx->e2w || !ctx->ea2) { - res = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(res); - } - f = ctx->priv_key->f; - // The following variables B, K, T, R1 (elements of G1), R2 - // (elements of GT), a, b, rx, rf, ra, rb, t1, t2 (256-bit - // integers) are used. - res = NewEcPoint(G1, &B); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &K); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &T); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &R1); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(GT, &R2); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &a); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &b); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &rx); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &rf); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &ra); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &rb); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &t1); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &t2); - BREAK_ON_EPID_ERROR(res); - // 1. The member expects the pre-computation is done (e12, e22, e2w, - // ea2). Refer to Section 3.5 for the computation of these - // values. - - // 2. The member verifies gid in public key matches gid in private - // key. - // 3. The member computes B = G1.getRandom(). - res = EcGetRandom(G1, ctx->rnd_func, ctx->rnd_param, B); - BREAK_ON_EPID_ERROR(res); - // 4. The member computes K = G1.sscmExp(B, f). - res = WriteFfElement(Fp, f, &f_str, sizeof(f_str)); - BREAK_ON_EPID_ERROR(res); - res = EcExp(G1, B, &f_str, K); - BREAK_ON_EPID_ERROR(res); - // 5. The member chooses randomly an integers a from [1, p-1]. - res = FfGetRandom(Fp, &one, ctx->rnd_func, ctx->rnd_param, a); - BREAK_ON_EPID_ERROR(res); - // 6. The member computes T = G1.sscmExp(h2, a). - res = WriteFfElement(Fp, a, &a_str, sizeof(a_str)); - BREAK_ON_EPID_ERROR(res); - res = EcExp(G1, h2, &a_str, T); - BREAK_ON_EPID_ERROR(res); - // 7. The member computes T = G1.mul(T, A). - res = EcMul(G1, T, A, T); - BREAK_ON_EPID_ERROR(res); - // 8. The member computes b = (a * x) mod p. - res = FfMul(Fp, a, x, b); - BREAK_ON_EPID_ERROR(res); - // 9. The member chooses rx, rf, ra, rb randomly from [1, p-1]. - res = FfGetRandom(Fp, &one, ctx->rnd_func, ctx->rnd_param, rx); - BREAK_ON_EPID_ERROR(res); - res = FfGetRandom(Fp, &one, ctx->rnd_func, ctx->rnd_param, rf); - BREAK_ON_EPID_ERROR(res); - res = FfGetRandom(Fp, &one, ctx->rnd_func, ctx->rnd_param, ra); - BREAK_ON_EPID_ERROR(res); - res = FfGetRandom(Fp, &one, ctx->rnd_func, ctx->rnd_param, rb); - BREAK_ON_EPID_ERROR(res); - // 10. The member computes t1 = (- rx) mod p. - res = FfNeg(Fp, rx, t1); - BREAK_ON_EPID_ERROR(res); - // 11. The member computes t2 = (rb - a * rx) mod p. - res = FfMul(Fp, a, rx, t2); - BREAK_ON_EPID_ERROR(res); - res = FfNeg(Fp, t2, t2); - BREAK_ON_EPID_ERROR(res); - res = FfAdd(Fp, rb, t2, t2); - BREAK_ON_EPID_ERROR(res); - // 12. The member computes R1 = G1.sscmExp(B, rf). - res = WriteFfElement(Fp, rf, &rf_str, sizeof(rf_str)); - BREAK_ON_EPID_ERROR(res); - res = EcExp(G1, B, &rf_str, R1); - BREAK_ON_EPID_ERROR(res); - // 13. The member computes R2 = GT.sscmMultiExp(ea2, t1, e12, rf, - // e22, t2, e2w, ra). - res = WriteFfElement(Fp, t1, &t1_str, sizeof(t1_str)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, t2, &t2_str, sizeof(t2_str)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, ra, &ra_str, sizeof(ra_str)); - BREAK_ON_EPID_ERROR(res); - { - FfElement const* points[4]; - BigNumStr const* exponents[4]; - points[0] = ctx->ea2; - points[1] = ctx->e12; - points[2] = ctx->e22; - points[3] = ctx->e2w; - exponents[0] = &t1_str; - exponents[1] = &rf_str; - exponents[2] = &t2_str; - exponents[3] = &ra_str; - res = FfMultiExp(GT, points, exponents, COUNT_OF(points), R2); - BREAK_ON_EPID_ERROR(res); - } - // 14. The member sets and outputs pre-sigma = (B, K, T, a, b, rx, - // rf, ra, rb, R1, R2). - res = WriteEcPoint(G1, B, &precompsig->B, sizeof(precompsig->B)); - BREAK_ON_EPID_ERROR(res); - res = WriteEcPoint(G1, K, &precompsig->K, sizeof(precompsig->K)); - BREAK_ON_EPID_ERROR(res); - res = WriteEcPoint(G1, T, &precompsig->T, sizeof(precompsig->T)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, a, &precompsig->a, sizeof(precompsig->a)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, b, &precompsig->b, sizeof(precompsig->b)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, rx, &precompsig->rx, sizeof(precompsig->rx)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, rf, &precompsig->rf, sizeof(precompsig->rf)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, ra, &precompsig->ra, sizeof(precompsig->ra)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, rb, &precompsig->rb, sizeof(precompsig->rb)); - BREAK_ON_EPID_ERROR(res); - res = WriteEcPoint(G1, R1, &precompsig->R1, sizeof(precompsig->R1)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(GT, R2, &precompsig->R2, sizeof(precompsig->R2)); - BREAK_ON_EPID_ERROR(res); - // 15. The member stores pre-sigma in the secure storage of the - // member. - res = kEpidNoErr; - } while (0); - - f = NULL; - DeleteEcPoint(&B); - DeleteEcPoint(&K); - DeleteEcPoint(&T); - DeleteEcPoint(&R1); - DeleteFfElement(&R2); - DeleteFfElement(&a); - DeleteFfElement(&b); - DeleteFfElement(&rx); - DeleteFfElement(&rf); - DeleteFfElement(&ra); - DeleteFfElement(&rb); - DeleteFfElement(&t1); - DeleteFfElement(&t2); - - return (res); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/privkey.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/privkey.c deleted file mode 100644 index a34d8965cd..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/privkey.c +++ /dev/null @@ -1,84 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Private key implementation. - */ - -#include "epid/common/src/memory.h" -#include "epid/member/src/privkey.h" - -EpidStatus CreatePrivKey(PrivKey const* priv_key_str, EcGroup* G1, - FiniteField* Fp, PrivKey_** priv_key) { - EpidStatus result = kEpidErr; - PrivKey_* priv_key_ = NULL; - - // check parameters - if (!priv_key_str || !G1 || !Fp || !priv_key) return kEpidBadArgErr; - - do { - priv_key_ = SAFE_ALLOC(sizeof(*priv_key_)); - - if (!priv_key_) { - result = kEpidMemAllocErr; - break; - } - - result = NewEcPoint(G1, &priv_key_->A); - if (kEpidNoErr != result) break; - - result = NewFfElement(Fp, &priv_key_->x); - if (kEpidNoErr != result) break; - - result = NewFfElement(Fp, &priv_key_->f); - if (kEpidNoErr != result) break; - - priv_key_->gid = priv_key_str->gid; - - result = ReadEcPoint(G1, &priv_key_str->A, sizeof(priv_key_str->A), - priv_key_->A); - if (kEpidNoErr != result) break; - - result = ReadFfElement(Fp, &priv_key_str->x, sizeof(priv_key_str->x), - priv_key_->x); - if (kEpidNoErr != result) break; - - result = ReadFfElement(Fp, &priv_key_str->f, sizeof(priv_key_str->f), - priv_key_->f); - if (kEpidNoErr != result) break; - - *priv_key = priv_key_; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result) { - DeletePrivKey(&priv_key_); - } - - return (result); -} - -void DeletePrivKey(PrivKey_** priv_key) { - if (priv_key) { - if (*priv_key) { - DeleteEcPoint(&((*priv_key)->A)); - DeleteFfElement(&((*priv_key)->x)); - DeleteFfElement(&((*priv_key)->f)); - } - SAFE_FREE(*priv_key); - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/privkey.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/privkey.h deleted file mode 100644 index 1981a67eca..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/privkey.h +++ /dev/null @@ -1,67 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_MEMBER_SRC_PRIVKEY_H_ -#define EPID_MEMBER_SRC_PRIVKEY_H_ -/*! -* \file - * \brief Private key private interface. -* \addtogroup EpidCommon -* @{ -*/ -#include "epid/common/errors.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/types.h" - -/*! - * \brief - * Internal implementation of PrivKey - */ -typedef struct PrivKey_ { - GroupId gid; ///< group ID - EcPoint* A; ///< an element in G1 - FfElement* x; ///< an integer between [0, p-1] - FfElement* f; ///< an integer between [0, p-1] -} PrivKey_; - -/// Constructs internal representation of PrivKey -/*! - This function allocates memory and initializes gid, A, x, f parameters. - - \param[in] priv_key_str - Serialized representation of private key - \param[in] G1 - EcGroup containing element A - \param[in] Fp - FiniteField containing elements x and f - \param[out] priv_key - Newly created private key: (gid, A, x, f) - - \returns ::EpidStatus -*/ -EpidStatus CreatePrivKey(PrivKey const* priv_key_str, EcGroup* G1, - FiniteField* Fp, PrivKey_** priv_key); - -/// Deallocate storage for internal representation of PrivKey -/*! - Frees memory pointed to by Member private key. Nulls the pointer. - - \param[in] priv_key - Member private key to be freed -*/ -void DeletePrivKey(PrivKey_** priv_key); - -/*! @} */ -#endif // EPID_MEMBER_SRC_PRIVKEY_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/request_join.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/request_join.c deleted file mode 100644 index 981bfff779..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/request_join.c +++ /dev/null @@ -1,418 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EpidRequestJoin implementation. - */ - -#include -#include -#include "epid/common/src/epid2params.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/math/ecgroup.h" - -#pragma pack(1) -/// Storage for values to create commitment in Sign and Verify algorithms -typedef struct JoinPCommitValues { - BigNumStr p; ///< Intel(R) EPID 2.0 parameter p - G1ElemStr g1; ///< Intel(R) EPID 2.0 parameter g1 - G2ElemStr g2; ///< Intel(R) EPID 2.0 parameter g2 - G1ElemStr h1; ///< Group public key value h1 - G1ElemStr h2; ///< Group public key value h2 - G2ElemStr w; ///< Group public key value w - G1ElemStr F; ///< Variable F computed in algorithm - G1ElemStr R; ///< Variable R computed in algorithm - IssuerNonce NI; ///< Nonce -} JoinPCommitValues; -#pragma pack() - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -EpidStatus EpidRequestJoin(GroupPubKey const* pub_key, IssuerNonce const* ni, - FpElemStr const* f, BitSupplier rnd_func, - void* rnd_param, HashAlg hash_alg, - JoinRequest* join_request) { - EpidStatus sts; - static const BigNumStr one = { - {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}}; - BigNumStr r_str; - JoinPCommitValues commit_values; - Epid2Params_* params = NULL; - FfElement* r_el = NULL; - FfElement* f_el = NULL; - FfElement* c_el = NULL; - FfElement* cf_el = NULL; - FfElement* s_el = NULL; - EcPoint* f_pt = NULL; - EcPoint* r_pt = NULL; - EcPoint* h1_pt = NULL; - - if (!pub_key || !ni || !f || !rnd_func || !join_request) { - return kEpidBadArgErr; - } - if (kSha256 != hash_alg && kSha384 != hash_alg && kSha512 != hash_alg) { - return kEpidBadArgErr; - } - - do { - sts = CreateEpid2Params(¶ms); - BREAK_ON_EPID_ERROR(sts); - if (!params->Fp || !params->G1) { - sts = kEpidBadArgErr; - break; - } - sts = NewFfElement(params->Fp, &r_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(params->Fp, &f_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(params->Fp, &c_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(params->Fp, &cf_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(params->Fp, &s_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(params->G1, &f_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(params->G1, &h1_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(params->G1, &r_pt); - BREAK_ON_EPID_ERROR(sts); - - sts = ReadFfElement(params->Fp, (uint8_t const*)f, sizeof(*f), f_el); - BREAK_ON_EPID_ERROR(sts); - sts = ReadEcPoint(params->G1, (uint8_t*)&pub_key->h1, sizeof(pub_key->h1), - h1_pt); - BREAK_ON_EPID_ERROR(sts); - - // Step 1. The member chooses a random integer r from [1, p-1]. - sts = FfGetRandom(params->Fp, &one, rnd_func, rnd_param, r_el); - BREAK_ON_EPID_ERROR(sts); - sts = WriteFfElement(params->Fp, r_el, (uint8_t*)&r_str, sizeof(r_str)); - - // Step 2. The member computes F = G1.sscmExp(h1, f). - sts = EcExp(params->G1, h1_pt, (BigNumStr const*)f, f_pt); - BREAK_ON_EPID_ERROR(sts); - - // Step 3. The member computes R = G1.sscmExp(h1, r). - sts = EcExp(params->G1, h1_pt, (BigNumStr const*)&r_str, r_pt); - BREAK_ON_EPID_ERROR(sts); - - // Step 4. The member computes c = Fp.hash(p || g1 || g2 || h1 || h2 || w || - // F || R || NI). Refer to Section 7.1 for hash operation over a prime - // field. - sts = WriteBigNum(params->p, sizeof(commit_values.p), - (uint8_t*)&commit_values.p); - BREAK_ON_EPID_ERROR(sts); - sts = WriteEcPoint(params->G1, params->g1, (uint8_t*)&commit_values.g1, - sizeof(commit_values.g1)); - BREAK_ON_EPID_ERROR(sts); - sts = WriteEcPoint(params->G2, params->g2, (uint8_t*)&commit_values.g2, - sizeof(commit_values.g2)); - BREAK_ON_EPID_ERROR(sts); - commit_values.h1 = pub_key->h1; - commit_values.h2 = pub_key->h2; - commit_values.w = pub_key->w; - sts = WriteEcPoint(params->G1, f_pt, (uint8_t*)&commit_values.F, - sizeof(commit_values.F)); - BREAK_ON_EPID_ERROR(sts); - sts = WriteEcPoint(params->G1, r_pt, (uint8_t*)&commit_values.R, - sizeof(commit_values.R)); - BREAK_ON_EPID_ERROR(sts); - commit_values.NI = *ni; - sts = FfHash(params->Fp, (uint8_t*)&commit_values, sizeof(commit_values), - hash_alg, c_el); - BREAK_ON_EPID_ERROR(sts); - - // Step 5. The member computes s = (r + c * f) mod p. - sts = FfMul(params->Fp, c_el, f_el, cf_el); - BREAK_ON_EPID_ERROR(sts); - sts = FfAdd(params->Fp, r_el, cf_el, s_el); - BREAK_ON_EPID_ERROR(sts); - - // Step 6. The output join request is (F, c, s). - sts = WriteFfElement(params->Fp, c_el, (uint8_t*)&join_request->c, - sizeof(join_request->c)); - BREAK_ON_EPID_ERROR(sts); - sts = WriteFfElement(params->Fp, s_el, (uint8_t*)&join_request->s, - sizeof(join_request->s)); - BREAK_ON_EPID_ERROR(sts); - sts = WriteEcPoint(params->G1, f_pt, (uint8_t*)&join_request->F, - sizeof(join_request->F)); - BREAK_ON_EPID_ERROR(sts); - - sts = kEpidNoErr; - } while (0); - DeleteEcPoint(&h1_pt); - DeleteEcPoint(&r_pt); - DeleteEcPoint(&f_pt); - DeleteFfElement(&s_el); - DeleteFfElement(&cf_el); - DeleteFfElement(&c_el); - DeleteFfElement(&f_el); - DeleteFfElement(&r_el); - DeleteEpid2Params(¶ms); - return sts; -} - -// implements section 3.2.2 "Validation of Private Key" from -// Intel(R) EPID 2.0 Spec -bool EpidIsPrivKeyInGroup(GroupPubKey const* pub_key, PrivKey const* priv_key) { - bool result; - - // Intel(R) EPID Parameters - Epid2Params_* params = NULL; - PairingState* ps = NULL; - - // private key - EcPoint* a_pt = NULL; // an element in G1 - FfElement* x_el = NULL; // an integer between [1, p-1] - FfElement* f_el = NULL; // an integer between [1, p-1] - - // public key - EcPoint* h1_pt = NULL; // an element in G1 - EcPoint* h2_pt = NULL; // an element in G1 - EcPoint* w_pt = NULL; // an element in G2 - - // local variables - EcPoint* t1_pt = NULL; // an element in G2 - EcPoint* t2_pt = NULL; // an element in G1 - FfElement* t3_el = NULL; // an element in GT - FfElement* t4_el = NULL; // an element in GT - - if (!pub_key || !priv_key) { - return false; - } - - do { - EpidStatus sts; - EcGroup* G1 = NULL; - EcGroup* G2 = NULL; - FiniteField* GT = NULL; - FiniteField* Fp = NULL; - BigNumStr t_str = {0}; - - sts = CreateEpid2Params(¶ms); - if (kEpidNoErr != sts) { - result = false; - break; - } - - G1 = params->G1; - G2 = params->G2; - GT = params->GT; - Fp = params->Fp; - - sts = WriteBigNum(params->t, sizeof(t_str), &t_str); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = NewPairingState(G1, G2, GT, &t_str, params->neg, &ps); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Load private key - sts = NewEcPoint(G1, &a_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = ReadEcPoint(G1, &priv_key->A, sizeof(priv_key->A), a_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = NewFfElement(Fp, &x_el); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = ReadFfElement(Fp, &priv_key->x, sizeof(priv_key->x), x_el); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = NewFfElement(Fp, &f_el); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = ReadFfElement(Fp, &priv_key->f, sizeof(priv_key->f), f_el); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Load public key - sts = NewEcPoint(G1, &h1_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = ReadEcPoint(G1, &pub_key->h1, sizeof(pub_key->h1), h1_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = NewEcPoint(G1, &h2_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = ReadEcPoint(G1, &pub_key->h2, sizeof(pub_key->h2), h2_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = NewEcPoint(G2, &w_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = ReadEcPoint(G2, &pub_key->w, sizeof(pub_key->w), w_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // local variables - sts = NewEcPoint(G2, &t1_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = NewEcPoint(G1, &t2_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = NewFfElement(GT, &t3_el); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = NewFfElement(GT, &t4_el); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Step 1. The member verifies that the gid in the public key matches the - // gid in the private key. - if (0 != memcmp(&pub_key->gid, &priv_key->gid, sizeof(priv_key->gid))) { - result = false; - break; - } - - // Step 2. The member computes t1 = G2.sscmExp(g2, x). - sts = EcSscmExp(G2, params->g2, (BigNumStr const*)&priv_key->x, t1_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Step 3. The member computes t1 = G2.mul(t1, w). - sts = EcMul(G2, t1_pt, w_pt, t1_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Step 4. The member computes t3 = pairing(A, t1). - sts = Pairing(ps, t3_el, a_pt, t1_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Step 5. The member computes t2 = G1.sscmExp(h1, f). - sts = EcSscmExp(G1, h1_pt, (BigNumStr const*)&priv_key->f, t2_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Step 6. The member computes t2 = G1.mul(t2, g1). - sts = EcMul(G1, t2_pt, params->g1, t2_pt); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Step 7. The member computes t4 = pairing(t2, g2). - sts = WriteBigNum(params->t, sizeof(t_str), &t_str); - if (kEpidNoErr != sts) { - result = false; - break; - } - - sts = Pairing(ps, t4_el, t2_pt, params->g2); - if (kEpidNoErr != sts) { - result = false; - break; - } - - // Step 8. If GT.isEqual(t3, t4) = false, reports bad private key. - sts = FfIsEqual(GT, t3_el, t4_el, &result); - if (kEpidNoErr != sts) { - result = false; - break; - } - } while (0); - - // local variables - DeleteFfElement(&t4_el); - DeleteFfElement(&t3_el); - DeleteEcPoint(&t2_pt); - DeleteEcPoint(&t1_pt); - - // public key - DeleteEcPoint(&w_pt); - DeleteEcPoint(&h2_pt); - DeleteEcPoint(&h1_pt); - - // private key - DeleteFfElement(&f_el); - DeleteFfElement(&x_el); - DeleteEcPoint(&a_pt); - - // Intel(R) EPID Parameters - DeletePairingState(&ps); - DeleteEpid2Params(¶ms); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/sign.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/sign.c deleted file mode 100644 index 976271f303..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/sign.c +++ /dev/null @@ -1,106 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EpidSign implementation. - */ - -#include -#include "epid/common/src/endian_convert.h" -#include "epid/common/src/memory.h" -#include "epid/common/src/sigrlvalid.h" -#include "epid/member/api.h" -#include "epid/member/src/context.h" - -EpidStatus EpidSign(MemberCtx const* ctx, void const* msg, size_t msg_len, - void const* basename, size_t basename_len, - SigRl const* sig_rl, size_t sig_rl_size, EpidSignature* sig, - size_t sig_len) { - EpidStatus result = kEpidErr; - uint32_t num_sig_rl = 0; - OctStr32 octstr32_0 = {{0x00, 0x00, 0x00, 0x00}}; - if (!ctx || !sig) { - return kEpidBadArgErr; - } - if (!ctx->pub_key) { - return kEpidBadArgErr; - } - if (!msg && (0 != msg_len)) { - // if message is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (!basename && (0 != basename_len)) { - // if basename is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (sig_rl && (sig_rl_size < sizeof(SigRl) - sizeof(SigRlEntry))) { - return kEpidBadArgErr; - } - if (sig_rl && EpidGetSigSize(sig_rl) > sig_len) { - return kEpidBadArgErr; - } - - // 11. The member sets sigma0 = (B, K, T, c, sx, sf, sa, sb). - result = - EpidSignBasic(ctx, msg, msg_len, basename, basename_len, &sig->sigma0); - if (kEpidNoErr != result) { - return result; - } - - if (!sig_rl) { - // 12. If SigRL is not provided as input, - // a. The member sets RLver = 0 and n2 = 0. - // b. The member outputs (sigma0, RLver, n2) and returns "succeeded". - sig->rl_ver = octstr32_0; - sig->n2 = octstr32_0; - return kEpidNoErr; - } else { - uint32_t i = 0; - EpidStatus nr_prove_status = kEpidNoErr; - // 13. If SigRL is provided as input, the member proceeds with - // the following steps: - // a. The member verifies that gid in public key and in SigRL - // match. - if (!IsSigRlValid(&ctx->pub_key->gid, sig_rl, sig_rl_size)) { - return kEpidBadArgErr; - } - // b. The member copies RLver and n2 values in SigRL to the - // signature. - sig->rl_ver = sig_rl->version; - sig->n2 = sig_rl->n2; - // c. For i = 0, ..., n2-1, the member computes sigma[i] = - // nrProve(f, B, K, B[i], K[i]). The details of nrProve() - // will be given in the next subsection. - num_sig_rl = ntohl(sig_rl->n2); - for (i = 0; i < num_sig_rl; i++) { - result = EpidNrProve(ctx, msg, msg_len, &sig->sigma0, &sig_rl->bk[i], - &sig->sigma[i]); - if (kEpidNoErr != result) { - nr_prove_status = result; - } - } - if (kEpidNoErr != nr_prove_status) { - memset(&sig->sigma[0], 0, num_sig_rl * sizeof(sig->sigma[0])); - return nr_prove_status; - } - } - // d. The member outputs (sigma0, RLver, n2, sigma[0], ..., - // sigma[n2-1]). - // e. If any of the nrProve() functions outputs "failed", the - // member returns "revoked", otherwise returns "succeeded". - return kEpidNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/signbasic.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/signbasic.c deleted file mode 100644 index a8dccb3067..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/src/signbasic.c +++ /dev/null @@ -1,272 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EpidSignBasic implementation. - */ - -#include // memset - -#include "epid/common/src/stack.h" -#include "epid/member/api.h" -#include "epid/member/src/context.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -EpidStatus EpidSignBasic(MemberCtx const* ctx, void const* msg, size_t msg_len, - void const* basename, size_t basename_len, - BasicSignature* sig) { - EpidStatus result = kEpidErr; - // Values to be affected by basename - EcPoint* B = NULL; - EcPoint* K = NULL; - EcPoint* R1 = NULL; - // data from presig - EcPoint* T = NULL; - FfElement* a = NULL; - FfElement* b = NULL; - FfElement* rx = NULL; - FfElement* rf = NULL; - FfElement* ra = NULL; - FfElement* rb = NULL; - FfElement* R2 = NULL; - - // final calculatoin data - FfElement* sx = NULL; - FfElement* sf = NULL; - FfElement* sa = NULL; - FfElement* sb = NULL; - FfElement* c_hash = NULL; - // priv key data, need to clear after use - BigNumStr f_str = {0}; - if (!ctx || !sig) { - return kEpidBadArgErr; - } - if (!msg && (0 != msg_len)) { - // if message is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (!basename && (0 != basename_len)) { - // if basename is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->priv_key || !ctx->epid2_params->G1 || - !ctx->epid2_params->GT || !ctx->epid2_params->Fp || !ctx->priv_key->f) { - return kEpidBadArgErr; - } - - do { - PreComputedSignature curr_presig; - G1ElemStr B_str = {0}; - G1ElemStr K_str = {0}; - CommitValues commit_values = ctx->commit_values; - - // create all required elemnts - result = NewEcPoint(ctx->epid2_params->G1, &B); - BREAK_ON_EPID_ERROR(result); - result = NewEcPoint(ctx->epid2_params->G1, &K); - BREAK_ON_EPID_ERROR(result); - result = NewEcPoint(ctx->epid2_params->G1, &R1); - BREAK_ON_EPID_ERROR(result); - - result = NewEcPoint(ctx->epid2_params->G1, &T); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->GT, &R2); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &sx); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &sf); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &sa); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &sb); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &c_hash); - BREAK_ON_EPID_ERROR(result); - - result = NewFfElement(ctx->epid2_params->Fp, &a); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &b); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &rx); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &rf); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &ra); - BREAK_ON_EPID_ERROR(result); - result = NewFfElement(ctx->epid2_params->Fp, &rb); - BREAK_ON_EPID_ERROR(result); - - if (StackGetSize(ctx->presigs)) { - // Use existing pre-computed signature - if (!StackPopN(ctx->presigs, 1, &curr_presig)) { - result = kEpidErr; - break; - } - } else { - // generate a new pre-computed signature - result = EpidComputePreSig(ctx, &curr_presig); - BREAK_ON_EPID_ERROR(result); - } - // 3. If the pre-computed signature pre-sigma exists, the member - // loads (B, K, T, a, b, rx, rf, ra, rb, R1, R2) from - // pre-sigma. Refer to Section 4.4 for the computation of - // these values. - result = ReadEcPoint(ctx->epid2_params->G1, &curr_presig.B, - sizeof(curr_presig.B), B); - BREAK_ON_EPID_ERROR(result); - result = ReadEcPoint(ctx->epid2_params->G1, &curr_presig.K, - sizeof(curr_presig.K), K); - BREAK_ON_EPID_ERROR(result); - result = ReadEcPoint(ctx->epid2_params->G1, &curr_presig.T, - sizeof(curr_presig.T), T); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ctx->epid2_params->Fp, &curr_presig.a, - sizeof(curr_presig.a), a); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ctx->epid2_params->Fp, &curr_presig.b, - sizeof(curr_presig.b), b); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ctx->epid2_params->Fp, &curr_presig.rx, - sizeof(curr_presig.rx), rx); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ctx->epid2_params->Fp, &curr_presig.rf, - sizeof(curr_presig.rf), rf); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ctx->epid2_params->Fp, &curr_presig.ra, - sizeof(curr_presig.ra), ra); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ctx->epid2_params->Fp, &curr_presig.rb, - sizeof(curr_presig.rb), rb); - BREAK_ON_EPID_ERROR(result); - result = ReadEcPoint(ctx->epid2_params->G1, &curr_presig.R1, - sizeof(curr_presig.R1), R1); - BREAK_ON_EPID_ERROR(result); - result = ReadFfElement(ctx->epid2_params->GT, &curr_presig.R2, - sizeof(curr_presig.R2), R2); - BREAK_ON_EPID_ERROR(result); - - if (basename) { - // If basename is provided, the member does the following: - // make sure basename is registered/allowed - if (!ContainsBasename(ctx->allowed_basenames, basename, basename_len)) { - result = kEpidBadArgErr; - break; - } else { - // basename valid, can modify parameters - // a. The member computes B = G1.hash(bsn). - result = EcHash(ctx->epid2_params->G1, basename, basename_len, - ctx->hash_alg, B); - BREAK_ON_EPID_ERROR(result); - // b. The member computes K = G1.sscmExp(B, f), where B comes - // from step a. - result = WriteFfElement(ctx->epid2_params->Fp, ctx->priv_key->f, &f_str, - sizeof(f_str)); - BREAK_ON_EPID_ERROR(result); - result = EcSscmExp(ctx->epid2_params->G1, B, &f_str, K); - BREAK_ON_EPID_ERROR(result); - // c. The member computes R1 = G1.sscmExp(B, rf), where B comes - // from step a. - result = EcSscmExp(ctx->epid2_params->G1, B, - (const BigNumStr*)&curr_presig.rf, R1); - BREAK_ON_EPID_ERROR(result); - // d. The member over-writes the B, K, and R1 values. - } - } - // 5. The member computes t3 = Fp.hash(p || g1 || g2 || h1 || h2 - // || w || B || K || T || R1 || R2). Refer to Section 7.1 for - // hash operation over a prime field. - // 6. The member computes c = Fp.hash(t3 || m). - result = WriteEcPoint(ctx->epid2_params->G1, B, &B_str, sizeof(B_str)); - BREAK_ON_EPID_ERROR(result); - result = WriteEcPoint(ctx->epid2_params->G1, K, &K_str, sizeof(K_str)); - BREAK_ON_EPID_ERROR(result); - result = SetCalculatedCommitValues(&B_str, &K_str, &curr_presig.T, R1, - ctx->epid2_params->G1, R2, - ctx->epid2_params->GT, &commit_values); - BREAK_ON_EPID_ERROR(result); - result = CalculateCommitmentHash(&commit_values, ctx->epid2_params->Fp, - ctx->hash_alg, msg, msg_len, c_hash); - BREAK_ON_EPID_ERROR(result); - // 7. The member computes sx = (rx + c * x) mod p. - result = FfMul(ctx->epid2_params->Fp, c_hash, ctx->priv_key->x, sx); - BREAK_ON_EPID_ERROR(result); - result = FfAdd(ctx->epid2_params->Fp, rx, sx, sx); - // 8. The member computes sf = (rf + c * f) mod p. - result = FfMul(ctx->epid2_params->Fp, c_hash, ctx->priv_key->f, sf); - BREAK_ON_EPID_ERROR(result); - result = FfAdd(ctx->epid2_params->Fp, rf, sf, sf); - BREAK_ON_EPID_ERROR(result); - // 9. The member computes sa = (ra + c * a) mod p. - result = FfMul(ctx->epid2_params->Fp, c_hash, a, sa); - BREAK_ON_EPID_ERROR(result); - result = FfAdd(ctx->epid2_params->Fp, ra, sa, sa); - BREAK_ON_EPID_ERROR(result); - // 10. The member computes sb = (rb + c * b) mod p. - result = FfMul(ctx->epid2_params->Fp, c_hash, b, sb); - BREAK_ON_EPID_ERROR(result); - result = FfAdd(ctx->epid2_params->Fp, rb, sb, sb); - BREAK_ON_EPID_ERROR(result); - // 11. The member sets sigma0 = (B, K, T, c, sx, sf, sa, sb). - result = WriteEcPoint(ctx->epid2_params->G1, B, &sig->B, sizeof(sig->B)); - BREAK_ON_EPID_ERROR(result); - result = WriteEcPoint(ctx->epid2_params->G1, K, &sig->K, sizeof(sig->K)); - BREAK_ON_EPID_ERROR(result); - result = WriteEcPoint(ctx->epid2_params->G1, T, &sig->T, sizeof(sig->T)); - BREAK_ON_EPID_ERROR(result); - result = - WriteFfElement(ctx->epid2_params->Fp, c_hash, &sig->c, sizeof(sig->c)); - BREAK_ON_EPID_ERROR(result); - result = - WriteFfElement(ctx->epid2_params->Fp, sx, &sig->sx, sizeof(sig->sx)); - BREAK_ON_EPID_ERROR(result); - result = - WriteFfElement(ctx->epid2_params->Fp, sf, &sig->sf, sizeof(sig->sf)); - BREAK_ON_EPID_ERROR(result); - result = - WriteFfElement(ctx->epid2_params->Fp, sa, &sig->sa, sizeof(sig->sa)); - BREAK_ON_EPID_ERROR(result); - result = - WriteFfElement(ctx->epid2_params->Fp, sb, &sig->sb, sizeof(sig->sb)); - BREAK_ON_EPID_ERROR(result); - result = kEpidNoErr; - } while (0); - // remove all data - DeleteEcPoint(&B); - DeleteEcPoint(&K); - DeleteEcPoint(&R1); - - DeleteEcPoint(&T); - DeleteFfElement(&R2); - DeleteFfElement(&sx); - DeleteFfElement(&sf); - DeleteFfElement(&sa); - DeleteFfElement(&sb); - DeleteFfElement(&c_hash); - DeleteFfElement(&a); - DeleteFfElement(&b); - DeleteFfElement(&rx); - DeleteFfElement(&rf); - DeleteFfElement(&ra); - DeleteFfElement(&rb); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/compute_presig-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/compute_presig-test.cc deleted file mode 100644 index 87b524bf75..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/compute_presig-test.cc +++ /dev/null @@ -1,93 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief ComputePreSig unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -#include "epid/member/src/context.h" -} - -#include "epid/member/unittests/member-testhelper.h" -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/epid_params-testhelper.h" - -namespace { - -TEST_F(EpidMemberTest, ComputePreSigFailsGivenNullPointer) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - PreComputedSignature presig; - EXPECT_EQ(kEpidBadArgErr, EpidComputePreSig(nullptr, &presig)); - EXPECT_EQ(kEpidBadArgErr, EpidComputePreSig(member, nullptr)); -} - -TEST_F(EpidMemberTest, - ComputePreSigGeneratedPreComputedSignatureCanBeDeserialized) { - const BigNumStr p_str = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, 0x92, 0x1A, - 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}}}; - - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - PreComputedSignature presig; - EXPECT_EQ(kEpidNoErr, EpidComputePreSig(member, &presig)); - - Epid20Params params; - FiniteFieldObj Fp(p_str); - FfElementObj Fp_element(&Fp); - - FfElementObj GT_element(¶ms.GT); - EcPointObj G1_pt(¶ms.G1); - - EXPECT_EQ(kEpidNoErr, - ReadEcPoint(params.G1, &presig.B, sizeof(presig.B), G1_pt)); - EXPECT_EQ(kEpidNoErr, - ReadEcPoint(params.G1, &presig.K, sizeof(presig.K), G1_pt)); - EXPECT_EQ(kEpidNoErr, - ReadEcPoint(params.G1, &presig.T, sizeof(presig.T), G1_pt)); - EXPECT_EQ(kEpidNoErr, - ReadEcPoint(params.G1, &presig.R1, sizeof(presig.R1), G1_pt)); - EXPECT_EQ(kEpidNoErr, ReadFfElement(params.GT, &presig.R2, sizeof(presig.R2), - GT_element)); - EXPECT_EQ(kEpidNoErr, - ReadFfElement(Fp, &presig.a, sizeof(presig.a), Fp_element)); - EXPECT_EQ(kEpidNoErr, - ReadFfElement(Fp, &presig.b, sizeof(presig.b), Fp_element)); - EXPECT_EQ(kEpidNoErr, - ReadFfElement(Fp, &presig.rx, sizeof(presig.rx), Fp_element)); - EXPECT_EQ(kEpidNoErr, - ReadFfElement(Fp, &presig.rf, sizeof(presig.rf), Fp_element)); - EXPECT_EQ(kEpidNoErr, - ReadFfElement(Fp, &presig.ra, sizeof(presig.ra), Fp_element)); - EXPECT_EQ(kEpidNoErr, - ReadFfElement(Fp, &presig.rb, sizeof(presig.rb), Fp_element)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/context-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/context-test.cc deleted file mode 100644 index de4d27f46e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/context-test.cc +++ /dev/null @@ -1,264 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Member unit tests. - */ -#include -#include -#include "gtest/gtest.h" - -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/member/unittests/member-testhelper.h" - -extern "C" { -#include "epid/member/api.h" -#include "epid/member/src/context.h" -} -bool operator==(MemberPrecomp const& lhs, MemberPrecomp const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -namespace { -////////////////////////////////////////////////////////////////////////// -// EpidMemberDelete Tests -TEST_F(EpidMemberTest, DeleteWorksGivenNullMemberCtx) { - EpidMemberDelete(nullptr); - MemberCtx* member_ctx = nullptr; - EpidMemberDelete(&member_ctx); -} -TEST_F(EpidMemberTest, DeleteNullsMemberCtx) { - MemberCtx* ctx = nullptr; - Prng my_prng; - EpidMemberCreate(nullptr, &this->kMemberPrivateKey, &this->kMemberPrecomp, - &Prng::Generate, &my_prng, &ctx); - EpidMemberDelete(&ctx); - EXPECT_EQ(nullptr, ctx); -} -////////////////////////////////////////////////////////////////////////// -// EpidMemberCreate Tests -// test that create fails if any mandatory parameters are NULL -TEST_F(EpidMemberTest, CreateFailsGivenNullParameters) { - MemberCtx* member_ctx = nullptr; - Prng my_prng; - EXPECT_EQ( - kEpidBadArgErr, - EpidMemberCreate(nullptr, &this->kMemberPrivateKey, &this->kMemberPrecomp, - &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); - - EXPECT_EQ( - kEpidBadArgErr, - EpidMemberCreate(&this->kGroupPublicKey, nullptr, &this->kMemberPrecomp, - &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); - - EXPECT_EQ( - kEpidBadArgErr, - EpidMemberCreate(&this->kGroupPublicKey, &this->kMemberPrivateKey, - &this->kMemberPrecomp, nullptr, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); - - EXPECT_EQ(kEpidBadArgErr, - EpidMemberCreate(&this->kGroupPublicKey, &this->kMemberPrivateKey, - &this->kMemberPrecomp, &Prng::Generate, &my_prng, - nullptr)); - EpidMemberDelete(nullptr); -} - -// test that create succeeds with valid parameters -TEST_F(EpidMemberTest, CreateSucceedsGivenValidParameters) { - MemberCtx* member_ctx = nullptr; - Prng my_prng; - - // pass the whole list of parameters - EXPECT_EQ(kEpidNoErr, - EpidMemberCreate(&this->kGroupPublicKey, &this->kMemberPrivateKey, - &this->kMemberPrecomp, &Prng::Generate, &my_prng, - &member_ctx)); - EpidMemberDelete(&member_ctx); - - // pass the whole list of parameters but member_precomp - EXPECT_EQ(kEpidNoErr, - EpidMemberCreate(&this->kGroupPublicKey, &this->kMemberPrivateKey, - nullptr, &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); -} -// test that create succeeds with valid IKGF given parameters -TEST_F(EpidMemberTest, CreateSucceedsGivenValidParametersUsingIKGFData) { - const GroupPubKey grp_public_key = { -#include "epid/common-testhelper/testdata/ikgf/groupa/pubkey.inc" - }; - const PrivKey mbr_private_key = { -#include "epid/common-testhelper/testdata/ikgf/groupa/member0/mprivkey.inc" - }; - - const MemberPrecomp mbr_precomp = { -#include "epid/common-testhelper/testdata/ikgf/groupa/member0/mprecomp.inc" - }; - - MemberCtx* member_ctx = nullptr; - Prng my_prng; - - // pass the whole list of parameters - EXPECT_EQ(kEpidNoErr, - EpidMemberCreate(&grp_public_key, &mbr_private_key, &mbr_precomp, - &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); - - // pass the whole list of parameters but member_precomp - EXPECT_EQ(kEpidNoErr, - EpidMemberCreate(&grp_public_key, &mbr_private_key, nullptr, - &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); -} - -TEST_F(EpidMemberTest, CreateFailsForInvalidGroupPubKey) { - MemberCtx* member_ctx = nullptr; - Prng my_prng; - GroupPubKey gpk_h1 = this->kGroupPublicKey; - gpk_h1.h1.x.data.data[0]++; - EXPECT_EQ( - kEpidBadArgErr, - EpidMemberCreate(&gpk_h1, &this->kMemberPrivateKey, &this->kMemberPrecomp, - &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); - GroupPubKey gpk_h2 = this->kGroupPublicKey; - gpk_h2.h2.x.data.data[0]++; - EXPECT_EQ( - kEpidBadArgErr, - EpidMemberCreate(&gpk_h2, &this->kMemberPrivateKey, &this->kMemberPrecomp, - &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); - GroupPubKey gpk_w = this->kGroupPublicKey; - gpk_w.w.x[0].data.data[0]++; - EXPECT_EQ( - kEpidBadArgErr, - EpidMemberCreate(&gpk_w, &this->kMemberPrivateKey, &this->kMemberPrecomp, - &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); -} -TEST_F(EpidMemberTest, CreateFailsForInvalidPrivateKey) { - MemberCtx* member_ctx = nullptr; - Prng my_prng; - PrivKey pk_A = this->kMemberPrivateKey; - pk_A.A.x.data.data[0]++; - EXPECT_EQ( - kEpidBadArgErr, - EpidMemberCreate(&this->kGroupPublicKey, &pk_A, &this->kMemberPrecomp, - &Prng::Generate, &my_prng, &member_ctx)); - EpidMemberDelete(&member_ctx); -} - -////////////////////////////////////////////////////////////////////////// -// EpidMemberSetHashAlg -TEST_F(EpidMemberTest, SetHashAlgFailsGivenNullPtr) { - EXPECT_EQ(kEpidBadArgErr, EpidMemberSetHashAlg(nullptr, kSha256)); -} -TEST_F(EpidMemberTest, SetHashAlgCanSetValidAlgorithm) { - Prng my_prng; - MemberCtxObj member_ctx(this->kGroupPublicKey, this->kMemberPrivateKey, - &Prng::Generate, &my_prng); - EXPECT_EQ(kEpidNoErr, EpidMemberSetHashAlg(member_ctx, kSha256)); - EXPECT_EQ(kEpidNoErr, EpidMemberSetHashAlg(member_ctx, kSha384)); - EXPECT_EQ(kEpidNoErr, EpidMemberSetHashAlg(member_ctx, kSha512)); -} -TEST_F(EpidMemberTest, SetHashAlgFailsForNonSupportedAlgorithm) { - Prng my_prng; - MemberCtxObj member_ctx(this->kGroupPublicKey, this->kMemberPrivateKey, - &Prng::Generate, &my_prng); - EXPECT_EQ(kEpidBadArgErr, EpidMemberSetHashAlg(member_ctx, kSha512_256)); - EXPECT_EQ(kEpidBadArgErr, EpidMemberSetHashAlg(member_ctx, kSha3_256)); - EXPECT_EQ(kEpidBadArgErr, EpidMemberSetHashAlg(member_ctx, kSha3_384)); - EXPECT_EQ(kEpidBadArgErr, EpidMemberSetHashAlg(member_ctx, kSha3_512)); - EXPECT_EQ(kEpidBadArgErr, EpidMemberSetHashAlg(member_ctx, (HashAlg)-1)); -} -////////////////////////////////////////////////////////////////////////// -// EpidRegisterBaseName -TEST_F(EpidMemberTest, RegisterBaseNameFailsGivenNullPtr) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - std::vector basename = {'_', 'b', 'a', 's', 'e', 'n', 'a', 'm', 'e'}; - EXPECT_EQ(kEpidBadArgErr, - EpidRegisterBaseName(member, nullptr, basename.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidRegisterBaseName(nullptr, basename.data(), basename.size())); -} -TEST_F(EpidMemberTest, RegisterBaseNameFailsGivenDuplicateBaseName) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - std::vector basename = {'d', 'b', 'a', 's', 'e', 'n', 'a', 'm', 'e'}; - EXPECT_EQ(kEpidNoErr, - EpidRegisterBaseName(member, basename.data(), basename.size())); - EXPECT_EQ(kEpidDuplicateErr, - EpidRegisterBaseName(member, basename.data(), basename.size())); -} -TEST_F(EpidMemberTest, RegisterBaseNameFailsGivenInvalidBaseName) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - std::vector basename = {}; - std::vector basename2 = {'b', 's', 'n'}; - EXPECT_EQ(kEpidBadArgErr, - EpidRegisterBaseName(member, basename.data(), basename.size())); - EXPECT_EQ(kEpidBadArgErr, EpidRegisterBaseName(member, basename2.data(), 0)); -} -TEST_F(EpidMemberTest, RegisterBaseNameSucceedsGivenUniqueBaseName) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - std::vector basename = {'b', 's', 'n', '0', '1'}; - EXPECT_EQ(kEpidNoErr, - EpidRegisterBaseName(member, basename.data(), basename.size())); -} -////////////////////////////////////////////////////////////////////////// -// EpidMemberWritePrecomp -TEST_F(EpidMemberTest, MemberWritePrecompFailsGivenNullPointer) { - MemberPrecomp precomp; - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - MemberCtx* ctx = member; - EXPECT_EQ(kEpidBadArgErr, EpidMemberWritePrecomp(nullptr, &precomp)); - EXPECT_EQ(kEpidBadArgErr, EpidMemberWritePrecomp(ctx, nullptr)); -} -TEST_F(EpidMemberTest, MemberWritePrecompSucceedGivenValidArgument) { - MemberPrecomp precomp; - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - MemberCtx* ctx = member; - EXPECT_EQ(kEpidNoErr, EpidMemberWritePrecomp(ctx, &precomp)); - MemberPrecomp expected_precomp = this->kMemberPrecomp; - EXPECT_EQ(expected_precomp, precomp); - - MemberCtxObj member2(this->kGroupPublicKey, this->kMemberPrivateKey, - &Prng::Generate, &my_prng); - MemberCtx* ctx2 = member2; - EXPECT_EQ(kEpidNoErr, EpidMemberWritePrecomp(ctx2, &precomp)); - EXPECT_EQ(expected_precomp, precomp); -} -TEST_F(EpidMemberTest, DefaultHashAlgIsSha512) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - MemberCtx* ctx = member; - EXPECT_EQ(kSha512, ctx->hash_alg); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/decompress_privkey-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/decompress_privkey-test.cc deleted file mode 100644 index 380e1ddca6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/decompress_privkey-test.cc +++ /dev/null @@ -1,97 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief DecompressPrivKey unit tests. - */ -#include -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -} - -#include "epid/member/unittests/member-testhelper.h" - -bool operator==(PrivKey const& lhs, PrivKey const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -namespace { - -TEST_F(EpidMemberTest, DecompressPrivKeyFailsGivenNullParameters) { - auto const& pub_key = this->kGrpXKey; - auto const& compressed_privkey = this->kGrpXMember9CompressedKey; - PrivKey priv_key = {}; - EXPECT_EQ(kEpidBadArgErr, - EpidDecompressPrivKey(nullptr, &compressed_privkey, &priv_key)); - EXPECT_EQ(kEpidBadArgErr, - EpidDecompressPrivKey(&pub_key, nullptr, &priv_key)); - EXPECT_EQ(kEpidBadArgErr, - EpidDecompressPrivKey(&pub_key, &compressed_privkey, nullptr)); -} - -TEST_F(EpidMemberTest, CanDecompressPrivKeyGivenValidCompressedKey) { - auto const& pub_key = this->kGrpXKey; - auto const& compressed_privkey = this->kGrpXMember9CompressedKey; - auto const& expected_decompressed_key = this->kGrpXMember9PrivKey; - PrivKey priv_key = {}; - EXPECT_EQ(kEpidNoErr, - EpidDecompressPrivKey(&pub_key, &compressed_privkey, &priv_key)); - EXPECT_EQ(expected_decompressed_key, priv_key); -} - -TEST_F(EpidMemberTest, DecompressPrivKeyFailsGivenKeysMissmatch) { - auto const& pub_key = this->kGrpYKey; - auto const& compressed_privkey = this->kGrpXMember9CompressedKey; - PrivKey priv_key = {}; - EXPECT_EQ(kEpidBadArgErr, - EpidDecompressPrivKey(&pub_key, &compressed_privkey, &priv_key)); -} - -TEST_F(EpidMemberTest, DecompressPrivKeyFailsGivenInvalidGroupKey) { - // Test for cases when h1 or w of group public key are invalid. - // Note h2 of group public key is not used for key decompression. - auto const& compressed_privkey = this->kGrpXMember9CompressedKey; - PrivKey priv_key = {}; - - auto pub_key_h1 = this->kGrpXKey; - pub_key_h1.h1.x.data.data[0]++; - EXPECT_EQ(kEpidBadArgErr, - EpidDecompressPrivKey(&pub_key_h1, &compressed_privkey, &priv_key)); - - auto pub_key_w = this->kGrpXKey; - pub_key_w.w.x[0].data.data[0]++; - EXPECT_EQ(kEpidBadArgErr, - EpidDecompressPrivKey(&pub_key_w, &compressed_privkey, &priv_key)); -} - -TEST_F(EpidMemberTest, DecompressPrivKeyFailsGivenInvalidCompressedKey) { - auto const& pub_key = this->kGrpXKey; - PrivKey priv_key = {}; - - auto compressed_privkey_ax = this->kGrpXMember9CompressedKey; - compressed_privkey_ax.ax.data.data[0]++; - EXPECT_EQ(kEpidBadArgErr, - EpidDecompressPrivKey(&pub_key, &compressed_privkey_ax, &priv_key)); - - auto compressed_privkey_seed = this->kGrpXMember9CompressedKey; - compressed_privkey_seed.seed.data[0]++; - EXPECT_EQ(kEpidBadArgErr, EpidDecompressPrivKey( - &pub_key, &compressed_privkey_seed, &priv_key)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/get_sigsize-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/get_sigsize-test.cc deleted file mode 100644 index b5202da38d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/get_sigsize-test.cc +++ /dev/null @@ -1,96 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief GetSigSize unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -} - -#include "epid/member/unittests/member-testhelper.h" - -namespace { - -TEST_F(EpidMemberTest, GetSigSizeReturnsSizeofBasicSigGivenNullPointer) { - size_t sig_size_without_sig_rl = sizeof(EpidSignature) - sizeof(NrProof); - EXPECT_EQ(sig_size_without_sig_rl, EpidGetSigSize(nullptr)); -} - -TEST_F(EpidMemberTest, GetSigSizeReturnsCorrectValueGivenValidSigRl) { - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - OctStr32 octstr32_0 = {0x00, 0x00, 0x00, 0x00}; - OctStr32 octstr32_1 = {0x00, 0x00, 0x00, 0x01}; - OctStr32 octstr32_2 = {0x00, 0x00, 0x00, 0x02}; - OctStr32 octstr32_16 = {0x00, 0x00, 0x00, 0x10}; - OctStr32 octstr32_256 = {0x00, 0x00, 0x01, 0x00}; - OctStr32 octstr32_65536 = {0x00, 0x01, 0x00, 0x00}; - OctStr32 octstr32_4294967295 = {0xff, 0xff, 0xff, 0xff}; - - size_t one_entry_size = sizeof(NrProof); - size_t sig_size_0_entries = sizeof(EpidSignature) - one_entry_size; - size_t sig_size_1_entry = sig_size_0_entries + one_entry_size; - size_t sig_size_2_entries = sig_size_0_entries + 2 * one_entry_size; - size_t sig_size_16_entries = sig_size_0_entries + 16 * one_entry_size; - size_t sig_size_256_entries = sig_size_0_entries + 256 * one_entry_size; - size_t sig_size_65536_entries = sig_size_0_entries + 65536 * one_entry_size; - // no entries - srl.n2 = octstr32_0; - EXPECT_EQ(sig_size_0_entries, EpidGetSigSize(&srl)); - // 1 entry - srl.n2 = octstr32_1; - EXPECT_EQ(sig_size_1_entry, EpidGetSigSize(&srl)); - // 2 entries - srl.n2 = octstr32_2; - EXPECT_EQ(sig_size_2_entries, EpidGetSigSize(&srl)); - // 16 entries - srl.n2 = octstr32_16; - EXPECT_EQ(sig_size_16_entries, EpidGetSigSize(&srl)); - // 256 entries - srl.n2 = octstr32_256; - EXPECT_EQ(sig_size_256_entries, EpidGetSigSize(&srl)); - // 65536 entries - srl.n2 = octstr32_65536; - EXPECT_EQ(sig_size_65536_entries, EpidGetSigSize(&srl)); - // 4294967295 entries - srl.n2 = octstr32_4294967295; -#if (SIZE_MAX <= 0xFFFFFFFF) // When size_t value is 32 bit or lower - EXPECT_EQ(sig_size_0_entries, EpidGetSigSize(&srl)); -#else - size_t sig_size_4294967295_entries = - sig_size_0_entries + 4294967295 * one_entry_size; - EXPECT_EQ(sig_size_4294967295_entries, EpidGetSigSize(&srl)); -#endif -} - -TEST_F(EpidMemberTest, - GetSigSizeReturnsCorrectValueGivenValidSigRlUsingIKGFData) { - const std::vector sigrl_bin = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sigrl.inc" - }; - - SigRl const* sig_rl = reinterpret_cast(sigrl_bin.data()); - size_t sig_size_3_entries = - sizeof(EpidSignature) - sizeof(NrProof) + 3 * sizeof(NrProof); - // 3 entries - EXPECT_EQ(sig_size_3_entries, EpidGetSigSize(sig_rl)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/main-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/main-test.cc deleted file mode 100644 index 70f2d3a182..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/main-test.cc +++ /dev/null @@ -1,26 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Main entry point for unit tests. - */ - -#include "gtest/gtest.h" - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/member-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/member-testhelper.cc deleted file mode 100644 index c06b9cb607..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/member-testhelper.cc +++ /dev/null @@ -1,522 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Member C++ wrapper implementation. - */ - -#include "epid/member/unittests/member-testhelper.h" - -#include -#include - -MemberCtxObj::MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key, - BitSupplier rnd_func, void* rnd_param) - : ctx_(nullptr) { - auto sts = EpidMemberCreate(&pub_key, &priv_key, nullptr, rnd_func, rnd_param, - &ctx_); - if (kEpidNoErr != sts) { - printf("%s(%d): %s\n", __FILE__, __LINE__, "test defect:"); - throw std::logic_error(std::string("Failed to call: ") + - "EpidMemberCreate()"); - } -} - -MemberCtxObj::MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key, - MemberPrecomp const& precomp, BitSupplier rnd_func, - void* rnd_param) - : ctx_(nullptr) { - auto sts = EpidMemberCreate(&pub_key, &priv_key, &precomp, rnd_func, - rnd_param, &ctx_); - if (kEpidNoErr != sts) { - printf("%s(%d): %s\n", __FILE__, __LINE__, "test defect:"); - throw std::logic_error(std::string("Failed to call: ") + - "EpidMemberCreate()"); - } -} - -MemberCtxObj::~MemberCtxObj() { EpidMemberDelete(&ctx_); } - -MemberCtx* MemberCtxObj::ctx() const { return ctx_; } - -MemberCtxObj::operator MemberCtx*() const { return ctx_; } - -MemberCtxObj::operator const MemberCtx*() const { return ctx_; } - -/// Arbitrary test data were generated based on Intel(R) EPID 2.0 parameters -const GroupPubKey EpidMemberTest::kGroupPublicKey = { - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01}, // group id - {{{{0xb3, 0x6f, 0xff, 0x81, 0xe2, 0x1b, 0x17, 0xeb, 0x3d, 0x75, 0x3d, 0x61, - 0x7e, 0x27, 0xb0, 0xcb, 0xd0, 0x6d, 0x8f, 0x9d, 0x64, 0xce, 0xe3, 0xce, - 0x43, 0x4c, 0x62, 0xfd, 0xb5, 0x80, 0xe0, 0x99}}}, - {{{0x3a, 0x07, 0x56, 0x80, 0xe0, 0x88, 0x59, 0xa4, 0xfd, 0xb5, 0xb7, 0x9d, - 0xe9, 0x4d, 0xae, 0x9c, 0xee, 0x3d, 0x66, 0x42, 0x82, 0x45, 0x7e, 0x7f, - 0xd8, 0x69, 0x3e, 0xa1, 0x74, 0xf4, 0x59, 0xee}}}}, // h1 - {{{{0xd2, 0x74, 0x2e, 0x9f, 0x63, 0xc2, 0x51, 0x8e, 0xd5, 0xdb, 0xca, 0x1c, - 0x54, 0x74, 0x10, 0x7b, 0xdc, 0x99, 0xed, 0x42, 0xd5, 0x5b, 0xa7, 0x04, - 0x29, 0x66, 0x61, 0x63, 0xbc, 0xdd, 0x7f, 0xe1}}}, - {{{0x76, 0x5d, 0xc0, 0x6e, 0xe3, 0x14, 0xac, 0x72, 0x48, 0x12, 0x0a, 0xa6, - 0xe8, 0x5b, 0x08, 0x7b, 0xda, 0x3f, 0x51, 0x7d, 0xde, 0x4c, 0xea, 0xcb, - 0x93, 0xa5, 0x6e, 0xcc, 0xe7, 0x8e, 0x10, 0x84}}}}, // h2 - {{{{{0xbd, 0x19, 0x5a, 0x95, 0xe2, 0x0f, 0xca, 0x1c, 0x50, 0x71, 0x94, 0x51, - 0x40, 0x1b, 0xa5, 0xb6, 0x78, 0x87, 0x53, 0xf6, 0x6a, 0x95, 0xca, 0xc6, - 0x8d, 0xcd, 0x36, 0x88, 0x7, 0x28, 0xe8, 0x96}}}, - {{{0xca, 0x78, 0x11, 0x5b, 0xb8, 0x6a, 0xe7, 0xe5, 0xa6, 0x65, 0x7a, 0x68, - 0x15, 0xd7, 0x75, 0xf8, 0x24, 0x14, 0xcf, 0xd1, 0x0f, 0x6c, 0x56, 0xf5, - 0x22, 0xd9, 0xfd, 0xe0, 0xe2, 0xf4, 0xb3, 0xa1}}}}, - {{{{0x90, 0x21, 0xa7, 0xe0, 0xe8, 0xb3, 0xc7, 0x25, 0xbc, 0x07, 0x72, 0x30, - 0x5d, 0xee, 0xf5, 0x6a, 0x89, 0x88, 0x46, 0xdd, 0x89, 0xc2, 0x39, 0x9c, - 0x0a, 0x3b, 0x58, 0x96, 0x57, 0xe4, 0xf3, 0x3c}}}, - {{{0x79, 0x51, 0x69, 0x36, 0x1b, 0xb6, 0xf7, 0x05, 0x5d, 0x0a, 0x88, 0xdb, - 0x1f, 0x3d, 0xea, 0xa2, 0xba, 0x6b, 0xf0, 0xda, 0x8e, 0x25, 0xc6, 0xad, - 0x83, 0x7d, 0x3e, 0x31, 0xee, 0x11, 0x40, 0xa9}}}}} // w -}; - -const PrivKey EpidMemberTest::kMemberPrivateKey = { - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01}, // group id - {{{{0x46, 0xc9, 0x69, 0xee, 0xf4, 0x68, 0xe1, 0x5f, 0xac, 0xbf, 0xdd, 0x77, - 0xeb, 0x4c, 0xaf, 0x8a, 0x87, 0x68, 0x3f, 0x4e, 0xda, 0xf2, 0x96, 0xec, - 0x57, 0x08, 0x90, 0xe8, 0x19, 0x62, 0x54, 0xdb}}}, - {{{0x1e, 0x52, 0x23, 0x16, 0x91, 0xe4, 0xa8, 0x1d, 0x9a, 0x1b, 0x8a, 0xad, - 0x0a, 0xcf, 0x36, 0x4f, 0xae, 0x43, 0xde, 0x62, 0xff, 0xa6, 0x4b, 0xa8, - 0x16, 0x24, 0x98, 0x80, 0x82, 0x80, 0x37, 0x77}}}}, // A - {0x0a, 0x30, 0xae, 0x43, 0xa1, 0xe0, 0xd7, 0xdf, 0x10, 0x5e, 0xaf, 0xd8, - 0x5a, 0x61, 0x10, 0x86, 0xd0, 0x9d, 0xb9, 0xe4, 0x46, 0xdd, 0xb7, 0x1b, - 0x00, 0x14, 0x7c, 0x6b, 0x13, 0x72, 0xc3, 0x77}, // x - {0x48, 0x40, 0xb5, 0x6c, 0x6d, 0x47, 0x09, 0x0b, 0x05, 0xd6, 0x43, 0x56, - 0xe0, 0x7c, 0xc6, 0x8e, 0xa1, 0x65, 0x67, 0xfd, 0xa7, 0x07, 0x87, 0x9b, - 0x36, 0x2d, 0x41, 0x35, 0x63, 0x61, 0x31, 0xc7} // f -}; - -const MemberPrecomp EpidMemberTest::kMemberPrecomp = { - {0xd8, 0x14, 0xba, 0x4b, 0x44, 0x03, 0x55, 0x6c, 0xf6, 0x42, 0xe8, 0xf0, - 0x4c, 0xb5, 0xe7, 0xd4, 0xa2, 0xa3, 0x69, 0x47, 0xf5, 0xd4, 0xc8, 0xe9, - 0xc5, 0x5a, 0x39, 0xb5, 0x55, 0xa5, 0xd3, 0xfb, 0xf3, 0x85, 0x5a, 0x0d, - 0xd5, 0xee, 0xde, 0xf4, 0xa8, 0xb1, 0x8b, 0xcf, 0xa9, 0x0d, 0x29, 0xbf, - 0x86, 0x27, 0x9c, 0x1f, 0x96, 0xed, 0xd8, 0x44, 0x01, 0x35, 0x1a, 0xce, - 0xfd, 0x4e, 0x6f, 0xa1, 0x66, 0x0d, 0x59, 0x08, 0x6d, 0xa2, 0xe4, 0x99, - 0x83, 0xdc, 0x39, 0x28, 0xb7, 0x1c, 0x1a, 0x33, 0xad, 0xca, 0x5c, 0x35, - 0x26, 0x1f, 0xab, 0xba, 0x0d, 0x53, 0xaf, 0xe0, 0x72, 0x14, 0xc5, 0xa7, - 0x2e, 0x58, 0x26, 0xc9, 0x8e, 0xfa, 0x6f, 0x62, 0xfc, 0xf0, 0x08, 0x3e, - 0xa3, 0x11, 0x3a, 0xf0, 0xb8, 0x3b, 0x2d, 0x3e, 0xec, 0xd5, 0xbc, 0xf2, - 0x05, 0x68, 0xf4, 0x40, 0xce, 0x2c, 0x8f, 0xdd, 0xa4, 0xe5, 0xe1, 0xb5, - 0xbe, 0xbd, 0x3e, 0xd4, 0xf6, 0x9a, 0xb3, 0x37, 0x24, 0x0d, 0xea, 0x13, - 0xd7, 0x1f, 0xa2, 0x75, 0x68, 0xa1, 0xbe, 0x2c, 0x01, 0x42, 0x2a, 0xae, - 0x6f, 0xae, 0x7a, 0x72, 0x3a, 0x11, 0x03, 0x58, 0x02, 0x0d, 0xf0, 0xb0, - 0xd9, 0x6f, 0xb1, 0xe4, 0xf2, 0x70, 0xb8, 0xff, 0x22, 0x56, 0x7c, 0xb3, - 0x80, 0xfd, 0xdf, 0xe5, 0xab, 0xcc, 0x18, 0x7a, 0xfd, 0x91, 0xd0, 0xb0, - 0x63, 0x40, 0xd4, 0x71, 0xfa, 0x03, 0xf5, 0xf1, 0x26, 0xe1, 0xa5, 0x5a, - 0xd9, 0x6d, 0xf5, 0x5a, 0x7b, 0x2a, 0x3a, 0xfe, 0x94, 0x9e, 0x74, 0x41, - 0x79, 0x49, 0x7e, 0x48, 0x1d, 0x58, 0x5e, 0xf6, 0x98, 0xa3, 0x6e, 0x61, - 0x8e, 0x9f, 0x1f, 0xcd, 0x15, 0x01, 0x16, 0xa5, 0xe0, 0xab, 0xd6, 0xd6, - 0x1f, 0x1c, 0xf5, 0x81, 0x76, 0xc1, 0xec, 0x10, 0xc2, 0xcc, 0x68, 0x59, - 0x4d, 0x47, 0xef, 0x4b, 0x7f, 0xd8, 0x78, 0x9c, 0xfe, 0x9a, 0x86, 0x7e, - 0x0c, 0xfd, 0x3e, 0x0a, 0x7a, 0x72, 0x8b, 0x14, 0x5f, 0xe6, 0x5f, 0x19, - 0xa3, 0x0a, 0x1b, 0x71, 0xdc, 0xd2, 0xae, 0x35, 0xc3, 0x11, 0xa5, 0xd3, - 0xea, 0xe1, 0xa9, 0xe7, 0x70, 0x0c, 0x7a, 0x39, 0x56, 0x3c, 0xe4, 0xe7, - 0xf9, 0xb6, 0xf1, 0x15, 0x40, 0xab, 0xb6, 0xc4, 0xad, 0xbd, 0xf4, 0xcc, - 0x13, 0xb7, 0xa8, 0xb6, 0x92, 0x1e, 0x72, 0x27, 0xa7, 0xff, 0xd9, 0xea, - 0x2f, 0x91, 0x96, 0x22, 0xd2, 0xc4, 0x4d, 0x80, 0xdc, 0x47, 0x66, 0x87, - 0xcc, 0xcf, 0xc5, 0x64, 0xf7, 0xb2, 0x34, 0xed, 0xd5, 0x44, 0x44, 0xcc, - 0x57, 0x41, 0xc7, 0x92, 0xb7, 0x5c, 0x12, 0xf7, 0x81, 0xf2, 0x92, 0x35, - 0x3e, 0x4b, 0xdf, 0xf8, 0xda, 0x68, 0xac, 0x30, 0xe3, 0xdd, 0x9e, 0x22, - 0xaa, 0x6d, 0x77, 0xdd, 0xac, 0xd9, 0x11, 0x6e, 0xfb, 0x1a, 0x88, - 0xb3}, // e12 - { - 0x07, 0x3f, 0x9d, 0x47, 0x82, 0xb8, 0x3d, 0x6a, 0xe0, 0x36, 0xab, 0xa6, - 0xfa, 0xe6, 0xd2, 0x1c, 0xc8, 0xb2, 0xd0, 0x01, 0xd4, 0x96, 0xdc, 0x2e, - 0xf8, 0x19, 0xdc, 0x70, 0x1b, 0xf9, 0x73, 0x0c, 0x2b, 0xc2, 0xe2, 0x1d, - 0x85, 0x53, 0x81, 0x51, 0xfb, 0xca, 0x16, 0x86, 0xd4, 0x4e, 0xfd, 0x1a, - 0x59, 0xe3, 0x97, 0xc4, 0x7f, 0x99, 0xd8, 0x66, 0x08, 0xa1, 0xe4, 0x9f, - 0xbb, 0x3a, 0xce, 0xa5, 0x23, 0x9c, 0x83, 0x13, 0xc5, 0xc8, 0xf2, 0x16, - 0x1e, 0xe8, 0xe6, 0xc5, 0x36, 0x57, 0x2c, 0xdf, 0x73, 0xb4, 0xe2, 0xb2, - 0xcb, 0xeb, 0xbb, 0xf7, 0x45, 0xd1, 0x44, 0xbd, 0x6e, 0x92, 0x95, 0x00, - 0xe5, 0x89, 0xb5, 0x91, 0x78, 0xc7, 0x44, 0xb1, 0x2f, 0x37, 0xdf, 0xfb, - 0xe7, 0x8a, 0x44, 0x3f, 0x3d, 0x06, 0x5f, 0x5b, 0x1c, 0x5f, 0xce, 0x11, - 0x05, 0x35, 0x3c, 0xad, 0x92, 0x7e, 0x79, 0xb8, 0xff, 0x28, 0x05, 0xe4, - 0x04, 0x2c, 0xb6, 0x1d, 0x22, 0xab, 0x36, 0x00, 0x5f, 0x74, 0xf1, 0xe3, - 0xf6, 0xa6, 0x68, 0xe6, 0x7b, 0x25, 0xb8, 0xcf, 0x19, 0xb0, 0x1a, 0xdd, - 0x0f, 0xad, 0x63, 0x73, 0x62, 0x1b, 0xe7, 0x94, 0x5d, 0xbf, 0x3d, 0xf1, - 0xf9, 0x8e, 0xab, 0x59, 0xe5, 0xd1, 0x7c, 0x62, 0xdd, 0xbc, 0x40, 0x07, - 0x70, 0x5b, 0x13, 0xf6, 0x12, 0x09, 0xb4, 0x0d, 0x3e, 0xab, 0x8b, 0x70, - 0x60, 0x1d, 0xd4, 0x61, 0x37, 0x28, 0x98, 0x3e, 0x7e, 0xdc, 0xfd, 0xd2, - 0xc0, 0x2f, 0x4b, 0x71, 0x31, 0x34, 0xd7, 0x69, 0x41, 0x5e, 0xaa, 0x72, - 0xe4, 0xdf, 0xeb, 0xfe, 0x8d, 0xcd, 0x68, 0xfc, 0x68, 0x55, 0xbe, 0x32, - 0x7d, 0x24, 0xc5, 0x07, 0x0f, 0xa8, 0xbd, 0x5a, 0xfe, 0xe7, 0xec, 0xdb, - 0xfd, 0x19, 0xc8, 0xa9, 0x20, 0xa2, 0x7f, 0x6c, 0xa6, 0x62, 0xec, 0xed, - 0x9b, 0x79, 0xbf, 0x9c, 0x0e, 0x31, 0x0b, 0x25, 0x2f, 0xd3, 0xcc, 0xa0, - 0xdd, 0xb2, 0xf2, 0x69, 0x26, 0x85, 0x21, 0x06, 0x94, 0x56, 0x5f, 0x59, - 0x5c, 0xf5, 0xb7, 0x82, 0xce, 0x0f, 0xdd, 0x40, 0xdb, 0x83, 0xac, 0x3c, - 0x41, 0xa0, 0x1b, 0xb1, 0xaf, 0xda, 0x55, 0xbf, 0x6b, 0x1a, 0xef, 0xe6, - 0x90, 0xe7, 0xaa, 0x0f, 0x04, 0x3c, 0x9f, 0x5b, 0xb7, 0xcd, 0x98, 0xa8, - 0x9e, 0xff, 0x54, 0x26, 0xc8, 0xd5, 0x5c, 0x30, 0x5e, 0xa2, 0x99, 0x8e, - 0x34, 0xd5, 0x98, 0x9f, 0xcd, 0x57, 0xd1, 0x4d, 0x1d, 0xee, 0x01, 0x5d, - 0x5a, 0x6d, 0xb2, 0xf1, 0xcf, 0x4b, 0xc0, 0x21, 0x23, 0x96, 0x05, 0xf9, - 0xc9, 0x66, 0xe5, 0x25, 0x9d, 0xa3, 0x8e, 0x78, 0x43, 0x19, 0xc1, 0x7f, - 0x7b, 0xef, 0xf5, 0xed, 0x00, 0xb7, 0x45, 0x1f, 0x4e, 0xa9, 0xfa, 0xe3, - 0xff, 0x54, 0xf2, 0x21, 0x73, 0xf8, 0x6b, 0xa1, 0xc7, 0x31, 0x4d, 0x6a, - }, // e22 - { - 0x49, 0x0d, 0x0f, 0x2a, 0x5c, 0x6a, 0x3b, 0xad, 0x71, 0xc9, 0x22, 0x49, - 0xe8, 0x08, 0xdd, 0xba, 0x79, 0x57, 0xb7, 0xc7, 0x61, 0xe4, 0xdb, 0x84, - 0x68, 0x57, 0xb9, 0x30, 0x83, 0xa4, 0xdc, 0xef, 0x70, 0x93, 0x28, 0xe2, - 0x6f, 0xb9, 0xbc, 0x15, 0x28, 0x3a, 0x30, 0xbd, 0x96, 0x83, 0xdb, 0xf2, - 0x9d, 0x1e, 0xc7, 0x64, 0x6d, 0x2e, 0x7c, 0xa2, 0xf3, 0xaa, 0x2f, 0x4b, - 0x6d, 0x86, 0x9e, 0x48, 0x20, 0x29, 0x4b, 0x1f, 0x8d, 0xc2, 0x93, 0xc3, - 0x55, 0x25, 0x8e, 0xb0, 0x8a, 0x7e, 0x64, 0x45, 0x3f, 0xf4, 0x1d, 0x16, - 0x4c, 0x88, 0x2d, 0x54, 0xbe, 0xa8, 0x67, 0x70, 0x81, 0xc5, 0xb9, 0x5c, - 0x16, 0x00, 0xef, 0x78, 0xf6, 0x4d, 0x6a, 0xeb, 0xfd, 0xa2, 0x0d, 0x52, - 0x86, 0xf3, 0x04, 0x4b, 0xd8, 0xf0, 0x7d, 0x50, 0x8b, 0xad, 0xc0, 0x37, - 0xdb, 0x38, 0xf2, 0x7d, 0x1f, 0x8b, 0x13, 0x83, 0x7b, 0xcc, 0xe8, 0x25, - 0xfe, 0xfa, 0x0c, 0x02, 0x05, 0x2e, 0x75, 0x12, 0xa1, 0x0a, 0x89, 0xab, - 0xf1, 0xb2, 0x08, 0x47, 0x9a, 0xea, 0xef, 0x1d, 0xa4, 0x9f, 0xde, 0x89, - 0x47, 0x3e, 0x7c, 0x5e, 0x4a, 0x40, 0xdc, 0xec, 0xc5, 0x1b, 0x7e, 0x33, - 0x0a, 0x19, 0x69, 0x27, 0xa6, 0xcc, 0x25, 0xfc, 0xf9, 0xeb, 0xbd, 0xb7, - 0x8a, 0xdb, 0x45, 0x5f, 0x9d, 0x9e, 0x01, 0xde, 0x3d, 0x91, 0x10, 0x99, - 0x13, 0xbf, 0xc0, 0xfa, 0x9d, 0xd4, 0x0f, 0xb3, 0x09, 0xf3, 0xa1, 0xae, - 0x68, 0xe1, 0x1b, 0x48, 0x85, 0x9f, 0x81, 0x66, 0x91, 0xe2, 0xf0, 0x7b, - 0x29, 0xdb, 0x8f, 0x5d, 0x99, 0xa9, 0xd3, 0x39, 0x30, 0xd9, 0x1b, 0x94, - 0x2a, 0x1c, 0x5c, 0xe9, 0xc0, 0x3f, 0x6e, 0xb2, 0x27, 0xbe, 0x74, 0x7a, - 0xca, 0xe1, 0x0f, 0x6a, 0x43, 0x2e, 0x98, 0x65, 0xaf, 0x7f, 0x6e, 0x5a, - 0x55, 0x98, 0xc1, 0x58, 0x29, 0xb3, 0x86, 0x54, 0x0f, 0x57, 0x91, 0x89, - 0x29, 0xb1, 0x98, 0x79, 0xcc, 0x95, 0x39, 0xd0, 0xab, 0xe0, 0x9f, 0xf3, - 0xda, 0xf9, 0x5e, 0xd9, 0x34, 0xbb, 0x72, 0xda, 0xe5, 0x72, 0xd3, 0xf8, - 0x9b, 0xf9, 0x14, 0x84, 0x48, 0x81, 0x54, 0x4f, 0xe6, 0x2b, 0x80, 0xc8, - 0xc1, 0x79, 0xfe, 0x83, 0xff, 0x76, 0xa3, 0x6d, 0xfe, 0x37, 0x78, 0xc5, - 0x30, 0x7a, 0x50, 0xe2, 0x5d, 0x12, 0xdc, 0x72, 0xe9, 0x58, 0x7c, 0x07, - 0x4f, 0xff, 0x15, 0x8a, 0x97, 0x3b, 0xcb, 0x60, 0xfa, 0x4e, 0xde, 0x8c, - 0x80, 0x3a, 0x8b, 0x0b, 0xc6, 0x1d, 0xa3, 0xce, 0x6a, 0xb3, 0x50, 0x69, - 0x03, 0x96, 0xca, 0xc0, 0xb6, 0x94, 0x6f, 0x8f, 0xab, 0x6f, 0x5b, 0x00, - 0x2a, 0x1d, 0x90, 0xa7, 0x81, 0xc6, 0x15, 0x77, 0x79, 0xf3, 0x36, 0x23, - 0xd1, 0x46, 0x25, 0x58, 0x6f, 0x7b, 0x22, 0xac, 0x4c, 0x7a, 0xf3, 0x9f, - }, // e2w - { - 0x8d, 0x71, 0xe2, 0xb0, 0x73, 0x2f, 0x4a, 0xba, 0x64, 0xe8, 0x7a, 0x12, - 0xaf, 0xe4, 0x4f, 0xdb, 0x6b, 0x3e, 0x38, 0x07, 0x0c, 0x79, 0x22, 0x48, - 0x1b, 0x9d, 0x33, 0x53, 0x5c, 0x75, 0x3b, 0x40, 0x5e, 0x18, 0xd1, 0x92, - 0x4a, 0xd1, 0x82, 0x1c, 0xc7, 0x3a, 0xf7, 0x7e, 0x32, 0x19, 0x99, 0x5d, - 0x01, 0x0e, 0xb0, 0xf2, 0x8f, 0x80, 0xc6, 0xb9, 0xeb, 0x1f, 0x9e, 0xae, - 0x9e, 0xe0, 0x99, 0xfd, 0xe8, 0x93, 0x11, 0x61, 0x7d, 0xc2, 0x49, 0xdb, - 0xa8, 0x73, 0xa4, 0xa9, 0x33, 0xe2, 0x04, 0xd1, 0x7d, 0x8b, 0xe1, 0xd6, - 0x2b, 0x10, 0x6c, 0x79, 0x02, 0xbf, 0xfc, 0x53, 0x03, 0xa9, 0xbc, 0x30, - 0x4d, 0x4d, 0xf4, 0x32, 0xce, 0x9a, 0x4a, 0xfa, 0xd6, 0x7f, 0x26, 0x17, - 0xc5, 0xf6, 0xed, 0xe4, 0xcc, 0xb9, 0x79, 0xe2, 0xa8, 0x86, 0xbb, 0xd7, - 0xfb, 0x05, 0xd2, 0x81, 0xbe, 0x07, 0x1c, 0x47, 0x48, 0x4f, 0x6d, 0x6b, - 0x52, 0x42, 0xe4, 0xc6, 0x20, 0x46, 0xa3, 0xae, 0x5b, 0x55, 0x55, 0xfe, - 0x4a, 0xad, 0xf2, 0x32, 0x07, 0x0f, 0x91, 0xa9, 0xe5, 0xd3, 0x86, 0x08, - 0x73, 0x93, 0xc7, 0x1e, 0x6b, 0xcd, 0x69, 0xd0, 0xfb, 0xc1, 0x74, 0xc2, - 0xb8, 0x90, 0xc8, 0xf8, 0x93, 0xbf, 0x08, 0x0f, 0x15, 0x19, 0x26, 0x71, - 0x4a, 0x9e, 0xdf, 0xdf, 0xca, 0x6f, 0xca, 0xfd, 0x67, 0xec, 0x4d, 0x21, - 0x5b, 0x99, 0xbd, 0x4b, 0x79, 0x22, 0x2d, 0xe4, 0x24, 0x72, 0x88, 0x93, - 0xce, 0xe6, 0x7f, 0xef, 0x35, 0x83, 0x67, 0x39, 0xb9, 0x34, 0x80, 0x64, - 0x0a, 0xf4, 0xff, 0x42, 0x9d, 0xee, 0xda, 0xb8, 0xd3, 0xdc, 0x1d, 0x0d, - 0x9f, 0x45, 0xe9, 0xbe, 0xf4, 0x3e, 0xa6, 0x58, 0x8b, 0xf0, 0xfd, 0x01, - 0x73, 0x63, 0xd0, 0xc6, 0x9d, 0xb9, 0x32, 0xd1, 0x91, 0xfe, 0xb1, 0xf5, - 0x4b, 0x48, 0xb4, 0x46, 0xae, 0x61, 0xd7, 0x90, 0xfe, 0x86, 0x74, 0x68, - 0xee, 0x78, 0x86, 0x65, 0x99, 0x6d, 0x7b, 0xf0, 0x17, 0x1a, 0x4c, 0xb0, - 0x37, 0x73, 0xdc, 0x38, 0x41, 0xfa, 0x02, 0xd2, 0x13, 0x8f, 0x71, 0xb4, - 0x0a, 0x72, 0x70, 0x0f, 0xe1, 0x2c, 0x9a, 0xa9, 0x51, 0xfa, 0xb2, 0xbf, - 0x84, 0xf2, 0xa6, 0xfb, 0xc3, 0x83, 0x16, 0x7e, 0x27, 0xec, 0x06, 0x5d, - 0x64, 0x79, 0xe7, 0x42, 0x30, 0xf8, 0x2d, 0xbc, 0x0f, 0x07, 0x8b, 0xf2, - 0x99, 0xda, 0x91, 0x4c, 0x65, 0xcf, 0x7f, 0x57, 0x2d, 0x2f, 0x67, 0xe7, - 0xfb, 0x75, 0xe9, 0xb2, 0xa3, 0x72, 0x60, 0x88, 0x2b, 0x14, 0x31, 0x62, - 0xbc, 0x45, 0x59, 0x5c, 0x58, 0x39, 0xb3, 0x4a, 0xeb, 0xb9, 0x18, 0x24, - 0x05, 0xcb, 0xda, 0xd3, 0x5e, 0x54, 0xba, 0xda, 0xfd, 0xfc, 0xa0, 0x02, - 0xb3, 0xde, 0x52, 0x3e, 0xc0, 0xd0, 0xb8, 0x19, 0x85, 0x1b, 0x7b, 0xe3, - } // ea2 -}; -const PreComputedSignature EpidMemberTest::kPrecomputedSignatures[2] = { - { - {{{{0x5c, 0x1b, 0x75, 0x1c, 0xc7, 0x2c, 0xf7, 0x4a, 0x97, 0x43, 0xf2, - 0x1a, 0x70, 0x80, 0x90, 0x61, 0xf5, 0x9e, 0x9b, 0x43, 0x92, 0x2f, - 0x05, 0x28, 0xcc, 0x4c, 0xb4, 0xb2, 0x80, 0x15, 0x58, 0x14}}}, - {{{ - 0x3f, 0x7f, 0xd0, 0x95, 0x08, 0x98, 0x0b, 0xae, 0x88, 0xf8, 0x2c, - 0x18, 0x8b, 0x72, 0x50, 0x95, 0x78, 0x41, 0xae, 0x4e, 0x6e, 0xea, - 0x3d, 0xa6, 0x23, 0x91, 0x4a, 0x02, 0x5d, 0x3f, 0x97, 0xd9, - }}}}, // B - {{{{0xb0, 0xdb, 0x88, 0x23, 0x18, 0x95, 0xba, 0x60, 0x72, 0x43, 0xb4, - 0x57, 0xbd, 0x20, 0xd2, 0x28, 0x97, 0xf7, 0x3a, 0x50, 0x06, 0xc5, - 0x89, 0xc9, 0x9f, 0x7a, 0x2a, 0x80, 0x91, 0xee, 0x7a, 0xf8}}}, - {{{0x70, 0xf3, 0x95, 0x12, 0xe4, 0x95, 0xca, 0x19, 0x43, 0x1a, 0x5d, - 0x47, 0x33, 0x71, 0x69, 0xfb, 0x14, 0x5f, 0xbd, 0x3f, 0xb2, 0x72, - 0x22, 0x3f, 0x63, 0xc3, 0xe9, 0x7c, 0x18, 0x82, 0x88, - 0x03}}}}, // K - {{{{0x75, 0x39, 0x21, 0x47, 0x04, 0xfd, 0xb7, 0x71, 0xb2, 0xf5, 0xa9, - 0x83, 0x7f, 0x27, 0x1d, 0x8f, 0xff, 0x07, 0x3c, 0xfb, 0xe9, 0x0d, - 0x14, 0x9c, 0xa6, 0xee, 0x06, 0x1e, 0x3d, 0xd3, 0xfb, 0x92}}}, - {{{0x51, 0x64, 0x11, 0x6d, 0x22, 0xc7, 0xed, 0x67, 0x21, 0xfe, 0x76, - 0x27, 0xf9, 0x43, 0x43, 0x64, 0x11, 0x01, 0x63, 0xc8, 0xda, 0x42, - 0x4e, 0x02, 0xe7, 0xf2, 0xb8, 0xa4, 0x16, 0x5b, 0x39, - 0xc2}}}}, // T - {{{{0x60, 0x25, 0xeb, 0xe8, 0x51, 0xd5, 0xe0, 0xf3, 0xcc, 0xb2, 0xc2, - 0xe3, 0xd7, 0x5c, 0x84, 0x41, 0x57, 0x2b, 0x5b, 0x00, 0xac, 0x1d, - 0x14, 0x89, 0xba, 0xb3, 0x34, 0xf0, 0x8a, 0xd4, 0x72, 0x5e}}}, - {{{0x93, 0xb7, 0xed, 0x03, 0xdd, 0xc7, 0xc9, 0xfa, 0x2c, 0x32, 0x84, - 0x40, 0xd4, 0xa2, 0x74, 0x76, 0x02, 0xef, 0x0c, 0xc6, 0xe4, 0xc2, - 0x9f, 0xd7, 0x18, 0x96, 0xdc, 0x97, 0x22, 0x4e, 0xbf, - 0xfc}}}}, // R1 - { - 0xe4, 0x5f, 0x6c, 0x74, 0x0b, 0xb7, 0x26, 0x59, 0x62, 0x5e, 0x69, - 0x71, 0x01, 0xa8, 0x32, 0xc1, 0xa7, 0xae, 0x32, 0x9e, 0xc2, 0xaf, - 0x9a, 0x55, 0x6c, 0x71, 0x37, 0x80, 0xc7, 0xe1, 0x8b, 0x1c, 0xa1, - 0x0c, 0xce, 0x60, 0x10, 0x18, 0x14, 0xe9, 0x66, 0x84, 0xe0, 0x52, - 0x9d, 0xee, 0x42, 0x0f, 0x47, 0xba, 0xcc, 0xc1, 0xea, 0xeb, 0x93, - 0x18, 0x04, 0x39, 0x7e, 0x36, 0x59, 0x73, 0xd3, 0xf8, 0xa4, 0x67, - 0x64, 0x6a, 0x24, 0x00, 0xd3, 0x4b, 0x0b, 0x17, 0x7f, 0xc6, 0xca, - 0x1a, 0xe3, 0x29, 0x4a, 0x4d, 0x23, 0x7d, 0x02, 0xa4, 0xd3, 0x26, - 0xed, 0xe6, 0x4d, 0xb7, 0xc6, 0x2d, 0x70, 0x85, 0xf0, 0xa4, 0x54, - 0x7f, 0xe9, 0x6e, 0x17, 0xb3, 0x36, 0xa4, 0x30, 0xfc, 0xca, 0x80, - 0x8c, 0x8b, 0x17, 0x6f, 0xe8, 0x22, 0x76, 0x27, 0xd7, 0x42, 0xd5, - 0x14, 0x27, 0x9a, 0x8d, 0x0c, 0x9c, 0x43, 0x7e, 0x41, 0x7a, 0x73, - 0xd9, 0xee, 0xef, 0xc7, 0x42, 0x77, 0xbe, 0x27, 0xa3, 0x8f, 0xa1, - 0x77, 0xaf, 0xdc, 0xa2, 0xfc, 0xf1, 0x3d, 0xd6, 0x00, 0xf3, 0x9c, - 0x43, 0xe9, 0xff, 0xc7, 0x9f, 0x5f, 0x6c, 0xa9, 0x16, 0x47, 0x73, - 0xbb, 0x31, 0x45, 0xb1, 0xcf, 0x7f, 0x39, 0xdd, 0x27, 0x78, 0x03, - 0x45, 0x24, 0x67, 0x08, 0x04, 0xf1, 0xbf, 0xfa, 0x7f, 0xe2, 0x2f, - 0x1f, 0x2c, 0x68, 0xfe, 0x4e, 0x0a, 0xcf, 0xd7, 0xf5, 0x0b, 0xd2, - 0xe2, 0x55, 0x54, 0x15, 0xa6, 0x3d, 0x0c, 0xc3, 0x49, 0xcd, 0x86, - 0xa7, 0x51, 0x12, 0x08, 0x4c, 0xf6, 0x05, 0xbc, 0xdc, 0xb1, 0x22, - 0xe4, 0x92, 0x33, 0x92, 0x8f, 0x6b, 0xee, 0x74, 0x96, 0xaf, 0x7c, - 0x47, 0x65, 0xb6, 0x4d, 0xd8, 0xd4, 0x21, 0xa8, 0xfa, 0xf9, 0x03, - 0xc7, 0xf4, 0x82, 0xde, 0x0a, 0xd9, 0x4c, 0x92, 0xfc, 0x48, 0x65, - 0x1a, 0x4c, 0xb9, 0xf9, 0x91, 0x9e, 0xf4, 0x88, 0x9e, 0x83, 0xa9, - 0x3a, 0x2e, 0x50, 0x94, 0xde, 0xb0, 0x24, 0xf3, 0x9b, 0xa0, 0x9e, - 0x0c, 0x49, 0xb2, 0xe2, 0x53, 0xfc, 0x52, 0x9b, 0x4b, 0x3b, 0x53, - 0xdf, 0xfe, 0x76, 0x99, 0x19, 0x90, 0xb8, 0xf2, 0x8c, 0xda, 0x57, - 0xfc, 0x35, 0xf6, 0xeb, 0xb4, 0x3c, 0xde, 0xff, 0x75, 0xf2, 0x50, - 0x27, 0x20, 0x42, 0x33, 0xd8, 0x6c, 0x5f, 0xba, 0x3d, 0xed, 0x90, - 0x77, 0xbc, 0x97, 0x10, 0xe0, 0x37, 0x21, 0x9e, 0x37, 0xf4, 0x89, - 0x34, 0x7c, 0x4a, 0x27, 0x8b, 0x58, 0x99, 0x83, 0x0a, 0xa7, 0x80, - 0x11, 0xc4, 0x88, 0xf2, 0xbb, 0xc0, 0x99, 0x9f, 0x6f, 0x60, 0x12, - 0x2d, 0x52, 0x20, 0x3a, 0xc0, 0x50, 0x75, 0x97, 0xc9, 0xdb, 0x01, - 0x3d, 0x05, 0x21, 0x3a, 0x16, 0x67, 0x0f, 0x7b, 0x51, 0x4a, 0x33, - 0x93, 0x53, 0x78, 0xd0, 0xb4, 0x91, 0xfc, 0x32, 0x49, 0x5e, - }, // R2 - {0x02, 0x5c, 0x15, 0x7e, 0x0f, 0x00, 0x82, 0x32, 0x45, 0xcf, 0x91, 0xd3, - 0x64, 0x5f, 0xf6, 0x0a, 0x83, 0x83, 0xc6, 0x3c, 0x0a, 0x68, 0x2c, 0x1e, - 0x96, 0x4b, 0xfa, 0xde, 0x06, 0xfe, 0x1a, 0x73}, // a - {0xea, 0x9d, 0xe1, 0x57, 0x32, 0x2e, 0x74, 0xd5, 0xbe, 0x49, 0xc4, 0xc8, - 0x23, 0x7d, 0x93, 0x74, 0x05, 0xee, 0xc2, 0x3d, 0xec, 0xd5, 0xbd, 0x4c, - 0x2f, 0x1d, 0x77, 0x88, 0x2b, 0x81, 0x5e, 0xc4}, // b - {0x98, 0x43, 0xdc, 0x08, 0x7b, 0x99, 0xff, 0x4a, 0x38, 0xbd, 0x5f, 0xe9, - 0xfc, 0xb9, 0x40, 0x3c, 0x31, 0x9b, 0x57, 0x7e, 0xff, 0x1c, 0x80, 0x92, - 0x79, 0x97, 0x3d, 0xa9, 0xbb, 0x70, 0xe7, 0x4b}, // rx - {0x85, 0x09, 0xac, 0xad, 0xcb, 0x5f, 0x24, 0x36, 0x21, 0x9e, 0xc7, 0x3a, - 0x2b, 0xf6, 0x63, 0xe7, 0x0d, 0xef, 0x3f, 0x4d, 0x40, 0x94, 0x49, 0x7b, - 0x2c, 0x89, 0xfe, 0xdc, 0xe7, 0x5b, 0xc5, 0x72}, // rf - {0x0d, 0x6b, 0x41, 0x78, 0x87, 0xb7, 0x90, 0x17, 0x5c, 0xe1, 0x9d, 0xcb, - 0x5d, 0x87, 0x69, 0xe6, 0xdd, 0xc0, 0xef, 0xbb, 0x3f, 0x4d, 0xaf, 0xec, - 0x3a, 0x66, 0x66, 0xb3, 0x51, 0x49, 0xb8, 0xae}, // ra - {0xaa, 0x42, 0x63, 0x36, 0x47, 0xe3, 0x9d, 0x5e, 0x7f, 0xcd, 0x07, 0xee, - 0x26, 0xdc, 0xaf, 0x88, 0xf1, 0x9b, 0xae, 0xa4, 0x7c, 0xff, 0x2e, 0x4f, - 0x7b, 0x6d, 0xb1, 0x42, 0x50, 0x9d, 0x89, 0x39} // rb - }, - { - {{{{0x10, 0x11, 0x7a, 0x7a, 0xbd, 0xe9, 0x4f, 0x96, 0xd7, 0x1e, 0x53, - 0x05, 0x8d, 0x69, 0xb1, 0xdb, 0x3e, 0xf1, 0x3c, 0x24, 0xe2, 0x83, - 0x06, 0x4b, 0xd6, 0xd9, 0xc6, 0x24, 0xf4, 0x7f, 0x67, 0x2c}}}, - {{{0x1a, 0xaf, 0x95, 0xfa, 0x7e, 0x59, 0xd2, 0x93, 0x39, 0x09, 0xae, - 0x0b, 0xc3, 0xe8, 0xe5, 0xf7, 0x36, 0xe7, 0x06, 0xbf, 0xe3, 0xd2, - 0x20, 0xbf, 0xd2, 0x31, 0x3f, 0xc1, 0x15, 0x61, 0x61, - 0x03}}}}, // B - {{{{0xcc, 0x9e, 0x80, 0x5e, 0x0c, 0x32, 0x44, 0x70, 0xe0, 0x44, 0x27, - 0x7a, 0x01, 0xee, 0x51, 0x19, 0xa1, 0x4d, 0x0a, 0x24, 0x8b, 0xa2, - 0xf8, 0xa3, 0x26, 0x56, 0x8c, 0x70, 0xe1, 0xa1, 0x83, 0x70}}}, - {{{0x4d, 0xf0, 0x73, 0x6f, 0xf4, 0x62, 0xc4, 0x30, 0x3e, 0xde, 0xff, - 0xc0, 0x93, 0x92, 0xa4, 0x03, 0x6f, 0x84, 0x3a, 0x3c, 0x34, 0x25, - 0x83, 0xb5, 0x2b, 0x90, 0x95, 0x6b, 0x24, 0x82, 0x6e, - 0xe6}}}}, // K - {{{{0xc6, 0x4c, 0xc8, 0x9d, 0xdc, 0x63, 0x46, 0x5b, 0xab, 0x79, 0xea, - 0x49, 0x76, 0x47, 0x68, 0xe6, 0x2e, 0x7d, 0x0b, 0x49, 0xc0, 0x29, - 0xe4, 0xc8, 0x84, 0xb5, 0x04, 0x2d, 0x15, 0xaa, 0x0d, 0xd4}}}, - {{{0x71, 0x43, 0xd0, 0x24, 0x3e, 0x00, 0xf4, 0x94, 0xad, 0x1e, 0x1e, - 0x32, 0xea, 0x21, 0x4d, 0x83, 0xae, 0x63, 0x3c, 0x5a, 0xd4, 0xa5, - 0x79, 0x9b, 0x2c, 0xad, 0x03, 0x50, 0xb6, 0x57, 0x0a, - 0xbf}}}}, // T - {{{{0xdd, 0x13, 0x14, 0x5a, 0x7d, 0x23, 0xc5, 0xf0, 0xcb, 0xa7, 0xd1, - 0x79, 0x7a, 0x59, 0x91, 0xf3, 0x8f, 0xb3, 0xff, 0x27, 0x52, 0x0e, - 0xe4, 0xc8, 0xb2, 0xe1, 0xc5, 0x29, 0x16, 0x2e, 0x0f, 0xcf}}}, - {{{0xcd, 0xb1, 0xed, 0x9a, 0xf3, 0x8a, 0xdd, 0x97, 0xe3, 0x58, 0xd8, - 0x66, 0xc0, 0xb9, 0xe6, 0x5e, 0x86, 0x6b, 0xfc, 0xde, 0x25, 0x2b, - 0x3c, 0x97, 0x4e, 0xc9, 0x26, 0x12, 0xf7, 0xde, 0xa6, - 0x88}}}}, // R1 - {0x75, 0x5e, 0x75, 0xe8, 0x80, 0xa3, 0x3b, 0x5d, 0xb7, 0xf1, 0x93, 0x4e, - 0x55, 0x6a, 0x14, 0x24, 0x8c, 0x74, 0xcd, 0x58, 0x25, 0xf8, 0x26, 0x6f, - 0x21, 0xc1, 0x1f, 0xb1, 0x7a, 0xc5, 0x48, 0x6b, 0x01, 0x4e, 0xa0, 0xa7, - 0xac, 0x55, 0x5b, 0x68, 0xba, 0x69, 0x17, 0xb0, 0x1e, 0x4a, 0x88, 0x70, - 0xbc, 0xb8, 0x12, 0xd7, 0x3d, 0x1b, 0xb4, 0xee, 0x79, 0xdb, 0xa1, 0x31, - 0xfb, 0x09, 0x3e, 0x89, 0xf6, 0x92, 0x0a, 0x81, 0x6a, 0xde, 0xe6, 0xb9, - 0x26, 0x9e, 0x5f, 0x2a, 0x52, 0xa2, 0x2e, 0x44, 0x0c, 0x15, 0xce, 0xbf, - 0x1f, 0xcf, 0x95, 0xe5, 0x17, 0x1c, 0xf3, 0xd2, 0x90, 0x04, 0xa4, 0xfa, - 0x0e, 0x92, 0x8b, 0xa4, 0xcd, 0x2b, 0xdf, 0x78, 0x71, 0x98, 0xd7, 0x9f, - 0xcd, 0xd1, 0x5e, 0x06, 0xdb, 0x6b, 0xdb, 0xff, 0x8d, 0xb4, 0x10, 0x73, - 0xc8, 0xf6, 0xb9, 0x42, 0x54, 0xc4, 0x6a, 0xc3, 0xbb, 0xdc, 0xec, 0x6d, - 0x2f, 0xec, 0xda, 0xb7, 0x74, 0x02, 0x59, 0xb9, 0xe0, 0x4c, 0xc5, 0x41, - 0x8a, 0x00, 0x2b, 0x10, 0x45, 0x9a, 0xc3, 0x77, 0x98, 0x66, 0xcf, 0xcb, - 0x44, 0xe7, 0x9a, 0x56, 0x40, 0xde, 0x74, 0x9b, 0x9f, 0x34, 0x9f, 0xc0, - 0x59, 0x28, 0x27, 0x3f, 0x90, 0xe0, 0xaa, 0xba, 0x0d, 0x13, 0x8a, 0xec, - 0x97, 0x2a, 0xef, 0xe7, 0xc9, 0x8f, 0xfa, 0xef, 0x14, 0x3a, 0xc2, 0x39, - 0xf6, 0x54, 0xab, 0x28, 0x15, 0x9f, 0x8d, 0x91, 0x49, 0x94, 0x27, 0x72, - 0x47, 0x97, 0x2a, 0x88, 0xb4, 0x95, 0xf4, 0xb7, 0xf3, 0x4d, 0xe3, 0xf0, - 0x53, 0x69, 0x58, 0xaf, 0xb7, 0x22, 0x52, 0x05, 0x9c, 0xac, 0x52, 0xbb, - 0x39, 0xc6, 0x6b, 0xfd, 0xfd, 0xdb, 0x1c, 0xf8, 0xa6, 0xce, 0xd6, 0xe6, - 0x4a, 0xd5, 0xb4, 0xcf, 0x68, 0x24, 0x79, 0xf6, 0xb0, 0xb8, 0x62, 0x37, - 0xc6, 0xa9, 0x14, 0x25, 0x07, 0xec, 0xde, 0x3a, 0x18, 0x13, 0xf9, 0x35, - 0x8d, 0xd7, 0x40, 0x34, 0x8c, 0xe9, 0x3f, 0x97, 0xe1, 0x6e, 0xcf, 0x9e, - 0xb0, 0x5d, 0x15, 0x5f, 0xd7, 0xd4, 0x92, 0x26, 0xa4, 0x87, 0x77, 0x47, - 0x95, 0x53, 0x78, 0x4b, 0x77, 0xd4, 0xb4, 0xd4, 0xad, 0xd2, 0xeb, 0xfb, - 0x70, 0x7b, 0xea, 0x6d, 0x88, 0x9b, 0xb6, 0xf9, 0x95, 0xa2, 0xae, 0x77, - 0xd3, 0x29, 0x43, 0xeb, 0x25, 0x09, 0x3c, 0x68, 0xc5, 0xba, 0x6f, 0x6e, - 0x19, 0x6a, 0x41, 0xb5, 0x02, 0x3f, 0x2e, 0xbe, 0x8e, 0xc4, 0x72, 0x47, - 0x65, 0x7d, 0x2a, 0xbb, 0x55, 0xea, 0x01, 0x2c, 0x24, 0x28, 0x1d, 0x90, - 0x63, 0xe5, 0x8e, 0x4f, 0xb7, 0x0e, 0x86, 0x09, 0x18, 0x5f, 0x1d, 0x69, - 0x72, 0x1a, 0xff, 0x25, 0xb2, 0x82, 0x19, 0x66, 0xbc, 0x68, 0x02, 0x07, - 0x02, 0x05, 0x07, 0x80, 0x88, 0xc9, 0x85, 0xf7, 0xa9, 0x32, 0x0a, - 0x48}, // R2 - {0xb2, 0x9f, 0x28, 0x17, 0xa9, 0x3b, 0x93, 0x5d, 0x84, 0xaa, 0xb9, 0xd2, - 0x61, 0x4c, 0xe4, 0x64, 0x79, 0x2b, 0xc2, 0x87, 0xe4, 0x7f, 0xe2, 0xd6, - 0xe7, 0x20, 0x7f, 0x3f, 0x65, 0x3d, 0x03, 0xa5}, // a - {0xf2, 0xfa, 0x9f, 0x28, 0x8f, 0x1f, 0xd0, 0x6b, 0xa2, 0xe3, 0x37, 0xce, - 0x1c, 0x43, 0x82, 0x81, 0x18, 0x01, 0x75, 0x04, 0xf0, 0x2b, 0xb5, 0xb0, - 0x46, 0x5d, 0x44, 0x7f, 0xaa, 0xb3, 0x8a, 0xd2}, // b - {0xf3, 0xe0, 0xab, 0x75, 0x37, 0x41, 0x61, 0x0d, 0xf5, 0x4a, 0x1f, 0xa6, - 0xee, 0xa5, 0xc6, 0x55, 0xd2, 0xa6, 0xce, 0x1c, 0x08, 0x64, 0x75, 0x22, - 0x15, 0x81, 0x45, 0x76, 0x21, 0x2c, 0x32, 0xca}, // rx - {0x6e, 0xfc, 0x5c, 0x0a, 0x79, 0x3a, 0x5d, 0xca, 0xe6, 0xdc, 0x30, 0x12, - 0x96, 0x5a, 0x95, 0x3f, 0x8b, 0xa6, 0x86, 0x6d, 0x43, 0xf4, 0x4e, 0xfd, - 0x4f, 0xf2, 0x7a, 0x80, 0xa5, 0xcc, 0x05, 0x56}, // rf - {0xcb, 0x58, 0xde, 0x49, 0xd7, 0x19, 0xfa, 0xbf, 0x5f, 0x82, 0x19, 0x0e, - 0x60, 0xb5, 0x0d, 0xde, 0xda, 0xb5, 0xf2, 0xb0, 0xcc, 0x2f, 0x65, 0x5e, - 0x71, 0x08, 0xd6, 0xb5, 0xd5, 0xbc, 0x67, 0xc1}, // ra - {0xe0, 0x3a, 0x71, 0xa7, 0x86, 0x56, 0xea, 0xd0, 0x19, 0xce, 0xa9, 0x65, - 0xe8, 0x26, 0x11, 0x56, 0x5c, 0xcb, 0x04, 0x65, 0x36, 0xfd, 0xd9, 0x39, - 0x35, 0xfa, 0x78, 0xa5, 0xc2, 0x3c, 0x2e, 0x17} // rb - }}; -const std::vector EpidMemberTest::kGroupPublicKeyDataIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/pubkey.inc" -}; -const std::vector EpidMemberTest::kMemberPrivateKeyDataIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/member0/mprivkey.inc" -}; - -const std::vector EpidMemberTest::kGrp01Member0SigTest1Sha256 = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test1_sha256.inc" -}; -const std::vector EpidMemberTest::kGrp01Member0SigTest1Sha384 = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test1_sha384.inc" -}; -const std::vector EpidMemberTest::kGrp01Member0SigTest1Sha512 = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test1_sha512.inc" -}; -const std::vector EpidMemberTest::kTest1Msg = {'t', 'e', 's', 't', - '1'}; -std::vector EpidMemberTest::kSigRlData = { -#include "epid/common-testhelper/testdata/grp01/sigrl.inc" -}; -std::vector EpidMemberTest::kSigRl5EntryData = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x00, 0x00, 0x00, 0x05, - // bk's - 0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, 0x33, 0x35, 0x27, 0xd, 0x8, - 0xb1, 0xbe, 0x5d, 0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, 0x2e, - 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, 0x56, 0x43, 0xc6, 0x94, 0x67, - 0xa6, 0x72, 0xf6, 0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, 0x9d, 0xc7, - 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, 0x90, 0x23, 0x18, 0x8, 0xad, 0x7d, 0xfe, - 0xf5, 0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, 0xc2, 0x89, 0xb2, - 0x6b, 0x4e, 0xb4, 0xc1, 0x55, 0x87, 0x98, 0xbd, 0x72, 0xf9, 0xcf, 0xd, 0x40, - 0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, 0x61, 0x9d, 0x4f, 0x7a, 0xb5, - 0x2b, 0x16, 0xa9, 0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, 0x33, 0xad, 0xf6, - 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, 0x98, 0x37, 0xce, 0xec, 0xd1, - 0xa8, 0xc, 0x8b, - - 0x71, 0x8a, 0xb5, 0x1, 0x7f, 0x7c, 0x92, 0x9a, 0xa2, 0xc9, 0x81, 0x10, 0xfe, - 0xbf, 0xc, 0x53, 0xa4, 0x43, 0xaf, 0x31, 0x74, 0x12, 0x25, 0x60, 0x3e, 0xc0, - 0x21, 0xe6, 0x63, 0x9a, 0xd2, 0x67, 0x2d, 0xb5, 0xd5, 0x82, 0xc4, 0x49, - 0x29, 0x51, 0x42, 0x8f, 0xe0, 0xe, 0xd1, 0x73, 0x27, 0xf5, 0x77, 0x16, 0x4, - 0x40, 0x8a, 0x0, 0xe, 0x3a, 0x5d, 0x37, 0x42, 0xd3, 0x8, 0x40, 0xbd, 0x69, - 0xf7, 0x5f, 0x74, 0x21, 0x50, 0xf4, 0xce, 0xfe, 0xd9, 0xdd, 0x97, 0x6c, - 0xa8, 0xa5, 0x60, 0x6b, 0xf8, 0x1b, 0xba, 0x2, 0xb2, 0xca, 0x5, 0x44, 0x9b, - 0xb1, 0x5e, 0x3a, 0xa4, 0x35, 0x7a, 0x51, 0xfa, 0xcf, 0xa4, 0x4, 0xe9, 0xf3, - 0xbf, 0x38, 0xd4, 0x24, 0x9, 0x52, 0xf3, 0x58, 0x3d, 0x9d, 0x4b, 0xb3, 0x37, - 0x4b, 0xec, 0x87, 0xe1, 0x64, 0x60, 0x3c, 0xb6, 0xf7, 0x7b, 0xff, 0x40, - 0x11, - - 0x6e, 0x22, 0xaa, 0x10, 0x84, 0x58, 0x8b, 0xff, 0xd8, 0x37, 0x8, 0xa9, 0xe9, - 0xdb, 0xf6, 0x1f, 0x69, 0x10, 0x95, 0x6c, 0xbf, 0xd, 0x11, 0x48, 0x6f, 0x1b, - 0x3c, 0x62, 0x46, 0x13, 0x89, 0x13, 0x5f, 0xa1, 0x3, 0x62, 0xed, 0x62, 0xdf, - 0x3d, 0xbf, 0xcd, 0xb7, 0x41, 0x48, 0x81, 0x3, 0x9f, 0x54, 0xa, 0xe, 0xb3, - 0x35, 0xf9, 0xde, 0x24, 0xba, 0x6d, 0x4c, 0x7f, 0xfc, 0xc1, 0xb4, 0xce, - 0x6d, 0xa1, 0x73, 0x7c, 0xaa, 0xb, 0xad, 0x2, 0xd6, 0x37, 0x85, 0xe, 0xbb, - 0x48, 0x11, 0x38, 0xc4, 0xaa, 0x1b, 0xf, 0xcf, 0xc1, 0x9c, 0x26, 0xcc, 0x95, - 0xc2, 0x5b, 0x49, 0x9, 0x3d, 0xe9, 0x7d, 0xce, 0xc7, 0xa6, 0x4, 0x3e, 0x7c, - 0x9e, 0x28, 0xde, 0x8, 0x11, 0xe, 0x61, 0x3b, 0xc0, 0x9c, 0x6b, 0x58, 0x23, - 0xe6, 0x40, 0x7b, 0xbd, 0xb8, 0x72, 0xf, 0xe0, 0xee, 0xcf, 0xba, 0xb4, - - 0xc4, 0xff, 0xaf, 0x48, 0x15, 0xda, 0x60, 0x40, 0xcc, 0xd7, 0xf2, 0x68, - 0xf7, 0xe2, 0x70, 0x12, 0x8d, 0x15, 0xa5, 0xb7, 0xe6, 0x4c, 0x23, 0xea, - 0x4d, 0x8a, 0x51, 0x6, 0x67, 0x3, 0x4c, 0x83, 0x6f, 0x28, 0x67, 0xcf, 0x63, - 0x46, 0x3e, 0x8a, 0x45, 0x9f, 0xed, 0x1a, 0xde, 0xa7, 0xad, 0xb2, 0x2b, 0xf, - 0x8b, 0xab, 0x7c, 0x70, 0xff, 0xc3, 0xa8, 0x6e, 0x8c, 0xaa, 0xb1, 0xf6, - 0x20, 0xe3, 0xb9, 0xf1, 0xc3, 0x3d, 0x5, 0x6a, 0x1e, 0x26, 0x2d, 0xf4, 0xd, - 0xe4, 0x53, 0x63, 0x67, 0x23, 0x48, 0xa8, 0x1, 0xa8, 0xee, 0xe1, 0x5f, 0x64, - 0xe3, 0x2c, 0x71, 0xe2, 0x10, 0x82, 0x0, 0x52, 0xd7, 0x74, 0x87, 0xff, 0x1c, - 0x0, 0x19, 0xe6, 0x4d, 0x15, 0x91, 0x6d, 0xf3, 0x38, 0x3b, 0xee, 0xf3, 0xd5, - 0xd1, 0xc7, 0x6d, 0xd9, 0x8e, 0x55, 0x70, 0x90, 0xb0, 0xb, 0x3c, 0x4a, 0x67, - 0x19, - - 0x4f, 0x98, 0x92, 0xf9, 0x18, 0x38, 0xf5, 0xb4, 0xf7, 0x2f, 0xa7, 0x21, - 0x71, 0x52, 0x27, 0xd0, 0x57, 0x4f, 0x9c, 0x30, 0xe, 0xb2, 0x27, 0xce, 0xd7, - 0xb2, 0x9f, 0xc0, 0xf6, 0xc3, 0xb0, 0x7c, 0x40, 0x18, 0x75, 0x4a, 0xde, - 0xb0, 0x9f, 0x46, 0x8a, 0x5a, 0xeb, 0x4f, 0xcb, 0x5e, 0x60, 0xf5, 0xca, - 0xf4, 0x98, 0xaf, 0x62, 0x9b, 0x7e, 0x10, 0xda, 0xba, 0x2f, 0x47, 0x64, - 0xf2, 0xc0, 0x84, 0x19, 0x75, 0xe0, 0xe4, 0xff, 0x20, 0xda, 0x7d, 0xe5, 0xd, - 0xc8, 0xf8, 0xe3, 0x83, 0x61, 0x19, 0x17, 0xf1, 0xa9, 0x1b, 0xff, 0x39, - 0x79, 0x88, 0x1, 0xfb, 0xe7, 0x23, 0xd2, 0xac, 0xe0, 0x49, 0x12, 0x2a, 0x38, - 0xb4, 0x7c, 0xc2, 0x1b, 0x88, 0x5f, 0x68, 0x32, 0x11, 0xd9, 0xfd, 0xdc, - 0x65, 0x2, 0xb3, 0x74, 0x2c, 0x13, 0xf2, 0xd8, 0xf1, 0x45, 0xc5, 0xd1, 0xf4, - 0xa3, 0x38, 0x81, 0x92}; -const std::vector EpidMemberTest::kMsg0 = {'m', 's', 'g', '0'}; -const std::vector EpidMemberTest::kBsn0 = {'b', 's', 'n', '0'}; -const std::vector EpidMemberTest::kMsg1 = {'m', 's', 'g', '1'}; -const std::vector EpidMemberTest::kBsn1 = {'b', 's', 'n', '1'}; - -const GroupPubKey EpidMemberTest::kGrpXKey = { -#include "epid/common-testhelper/testdata/grp_x/pubkey.inc" -}; - -const CompressedPrivKey EpidMemberTest::kGrpXMember9CompressedKey = { -#include "epid/common-testhelper/testdata/grp_x/cmember9/cmpprivkey.inc" -}; -const PrivKey EpidMemberTest::kGrpXMember9PrivKey = { -#include "epid/common-testhelper/testdata/grp_x/cmember9/mprivkey.inc" -}; - -const GroupPubKey EpidMemberTest::kGrpYKey = { -#include "epid/common-testhelper/testdata/grp_y/pubkey.inc" -}; - -const CompressedPrivKey EpidMemberTest::kGrpYMember9CompressedKey = { -#include "epid/common-testhelper/testdata/grp_y/cmember9/cmpprivkey.inc" -}; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/member-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/member-testhelper.h deleted file mode 100644 index 5d720d2070..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/member-testhelper.h +++ /dev/null @@ -1,116 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Member C++ wrapper interface. - */ -#ifndef EPID_MEMBER_UNITTESTS_MEMBER_TESTHELPER_H_ -#define EPID_MEMBER_UNITTESTS_MEMBER_TESTHELPER_H_ - -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -} - -/// C++ Wrapper to manage memory for MemberCtx via RAII -class MemberCtxObj { - public: - /// Create a MemberCtx - explicit MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key, - BitSupplier rnd_func, void* rnd_param); - /// Create a MemberCtx given precomputation blob - MemberCtxObj(GroupPubKey const& pub_key, PrivKey const& priv_key, - MemberPrecomp const& precomp, BitSupplier rnd_func, - void* rnd_param); - - // This class instances are not meant to be copied. - // Explicitly delete copy constructor and assignment operator. - MemberCtxObj(const MemberCtxObj&) = delete; - MemberCtxObj& operator=(const MemberCtxObj&) = delete; - - /// Destroy the MemberCtx - ~MemberCtxObj(); - /// get a pointer to the stored MemberCtx - MemberCtx* ctx() const; - /// cast operator to get the pointer to the stored MemberCtx - operator MemberCtx*() const; - /// const cast operator to get the pointer to the stored MemberCtx - operator const MemberCtx*() const; - - private: - /// The stored MemberCtx - MemberCtx* ctx_; -}; - -/// Test fixture class for EpidMember -class EpidMemberTest : public ::testing::Test { - public: - /// test data - static const GroupPubKey kGroupPublicKey; - /// test data - static const PrivKey kMemberPrivateKey; - /// test data - static const std::vector kGroupPublicKeyDataIkgf; - /// test data - static const std::vector kMemberPrivateKeyDataIkgf; - /// test data - static const MemberPrecomp kMemberPrecomp; - /// test data - static const PreComputedSignature kPrecomputedSignatures[2]; - /// test data - static const std::vector kGrp01Member0SigTest1Sha256; - /// test data - static const std::vector kGrp01Member0SigTest1Sha384; - /// test data - static const std::vector kGrp01Member0SigTest1Sha512; - /// test data - static const std::vector kTest1Msg; - /// signature based revocation list with 50 entries - static std::vector kSigRlData; - /// signature based revocation list with 5 entries - static std::vector kSigRl5EntryData; - /// a message - static const std::vector kMsg0; - /// a message - static const std::vector kMsg1; - /// a basename - static const std::vector kBsn0; - /// a basename - static const std::vector kBsn1; - - /// a group key in group X - static const GroupPubKey kGrpXKey; - /// a compressed private key in group X - static const CompressedPrivKey kGrpXMember9CompressedKey; - /// a private key in group X - static const PrivKey kGrpXMember9PrivKey; - - /// a group key in group Y - static const GroupPubKey kGrpYKey; - /// a compressed private key in group Y - static const CompressedPrivKey kGrpYMember9CompressedKey; - - /// setup called before each TEST_F starts - virtual void SetUp() {} - /// teardown called after each TEST_F finishes - virtual void TearDown() {} -}; - -#endif // EPID_MEMBER_UNITTESTS_MEMBER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/nr_prove-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/nr_prove-test.cc deleted file mode 100644 index ebc4a59769..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/nr_prove-test.cc +++ /dev/null @@ -1,290 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief NrProve unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -#include "epid/verifier/api.h" -} - -#include "epid/member/unittests/member-testhelper.h" -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" - -namespace { - -TEST_F(EpidMemberTest, NrProveFailsGivenNullParameters) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature const* basic_sig = - &reinterpret_cast( - this->kGrp01Member0SigTest1Sha256.data()) - ->sigma0; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - EXPECT_EQ(kEpidBadArgErr, EpidNrProve(nullptr, msg.data(), msg.size(), - basic_sig, &sig_rl->bk[0], &proof)); - EXPECT_EQ(kEpidBadArgErr, EpidNrProve(member, nullptr, msg.size(), basic_sig, - &sig_rl->bk[0], &proof)); - EXPECT_EQ(kEpidBadArgErr, EpidNrProve(member, msg.data(), msg.size(), nullptr, - &sig_rl->bk[0], &proof)); - EXPECT_EQ(kEpidBadArgErr, EpidNrProve(member, msg.data(), msg.size(), - basic_sig, nullptr, &proof)); - EXPECT_EQ(kEpidBadArgErr, EpidNrProve(member, msg.data(), msg.size(), - basic_sig, &sig_rl->bk[0], nullptr)); -} - -TEST_F(EpidMemberTest, NrProveFailsGivenInvalidSigRlEntry) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature const* basic_sig = - &reinterpret_cast( - this->kGrp01Member0SigTest1Sha256.data()) - ->sigma0; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - SigRlEntry sig_rl_enty_invalid_k = sig_rl->bk[0]; - sig_rl_enty_invalid_k.k.x.data.data[31]++; // make it not in EC group - EXPECT_EQ(kEpidBadArgErr, - EpidNrProve(member, msg.data(), msg.size(), basic_sig, - &sig_rl_enty_invalid_k, &proof)); - - SigRlEntry sig_rl_enty_invalid_b = sig_rl->bk[0]; - sig_rl_enty_invalid_b.b.x.data.data[31]++; // make it not in EC group - EXPECT_EQ(kEpidBadArgErr, - EpidNrProve(member, msg.data(), msg.size(), basic_sig, - &sig_rl_enty_invalid_b, &proof)); -} - -TEST_F(EpidMemberTest, NrProveFailsGivenInvalidBasicSig) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature const* basic_sig = - &reinterpret_cast( - this->kGrp01Member0SigTest1Sha256.data()) - ->sigma0; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - // invalid basic sig in this case is invalid B or K value only!! - BasicSignature basic_sig_invalid_B = *basic_sig; - basic_sig_invalid_B.B.x.data.data[31]++; // make it not in EC group; - EXPECT_EQ(kEpidBadArgErr, - EpidNrProve(member, msg.data(), msg.size(), &basic_sig_invalid_B, - &sig_rl->bk[0], &proof)); - - BasicSignature basic_sig_invalid_K = *basic_sig; - basic_sig_invalid_K.K.x.data.data[31]++; // make it not in EC group - EXPECT_EQ(kEpidBadArgErr, - EpidNrProve(member, msg.data(), msg.size(), &basic_sig_invalid_K, - &sig_rl->bk[0], &proof)); -} - -TEST_F(EpidMemberTest, GeneratesNrProofForEmptyMessage) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature basic_sig; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha256)); - ASSERT_EQ(kEpidNoErr, - EpidSignBasic(member, nullptr, 0, nullptr, 0, &basic_sig)); - EXPECT_EQ(kEpidNoErr, EpidNrProve(member, nullptr, 0, &basic_sig, - &sig_rl->bk[0], &proof)); - - // Check proof by doing an NrVerify - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha256)); - EXPECT_EQ(kEpidNoErr, - EpidNrVerify(ctx, &basic_sig, nullptr, 0, &sig_rl->bk[0], &proof)); -} - -TEST_F(EpidMemberTest, GeneratesNrProofUsingDefaultHashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature basic_sig; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - ASSERT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)); - EXPECT_EQ(kEpidNoErr, EpidNrProve(member, msg.data(), msg.size(), &basic_sig, - &sig_rl->bk[0], &proof)); - - // Check proof by doing an NrVerify - VerifierCtxObj ctx(this->kGroupPublicKey); - - EXPECT_EQ(kEpidNoErr, EpidNrVerify(ctx, &basic_sig, msg.data(), msg.size(), - &sig_rl->bk[0], &proof)); -} - -TEST_F(EpidMemberTest, GeneratesNrProofUsingDefaultHashAlgUsingIKGFData) { - Prng my_prng; - GroupPubKey grp_public_key = *reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - PrivKey mbr_private_key = - *reinterpret_cast(this->kMemberPrivateKeyDataIkgf.data()); - const std::vector sigrl_bin = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sigrl.inc" - }; - - MemberCtxObj member(grp_public_key, mbr_private_key, &Prng::Generate, - &my_prng); - - BasicSignature basic_sig; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(sigrl_bin.data()); - - NrProof proof; - - ASSERT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)); - EXPECT_EQ(kEpidNoErr, EpidNrProve(member, msg.data(), msg.size(), &basic_sig, - &sig_rl->bk[0], &proof)); - - // Check proof by doing an NrVerify - VerifierCtxObj ctx(grp_public_key); - - EXPECT_EQ(kEpidNoErr, EpidNrVerify(ctx, &basic_sig, msg.data(), msg.size(), - &sig_rl->bk[0], &proof)); -} - -TEST_F(EpidMemberTest, GeneratesNrProofUsingSha256HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature basic_sig; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha256)); - ASSERT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)); - EXPECT_EQ(kEpidNoErr, EpidNrProve(member, msg.data(), msg.size(), &basic_sig, - &sig_rl->bk[0], &proof)); - - // Check proof by doing an NrVerify - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha256)); - EXPECT_EQ(kEpidNoErr, EpidNrVerify(ctx, &basic_sig, msg.data(), msg.size(), - &sig_rl->bk[0], &proof)); -} - -TEST_F(EpidMemberTest, GeneratesNrProofUsingSha384HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature basic_sig; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha384)); - ASSERT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)); - EXPECT_EQ(kEpidNoErr, EpidNrProve(member, msg.data(), msg.size(), &basic_sig, - &sig_rl->bk[0], &proof)); - - // Check proof by doing an NrVerify - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha384)); - EXPECT_EQ(kEpidNoErr, EpidNrVerify(ctx, &basic_sig, msg.data(), msg.size(), - &sig_rl->bk[0], &proof)); -} - -TEST_F(EpidMemberTest, GeneratesNrProofUsingSha512HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature basic_sig; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha512)); - ASSERT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)); - EXPECT_EQ(kEpidNoErr, EpidNrProve(member, msg.data(), msg.size(), &basic_sig, - &sig_rl->bk[0], &proof)); - - // Check proof by doing an NrVerify - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha512)); - EXPECT_EQ(kEpidNoErr, EpidNrVerify(ctx, &basic_sig, msg.data(), msg.size(), - &sig_rl->bk[0], &proof)); -} - -TEST_F(EpidMemberTest, DISABLED_GeneratesNrProofUsingSha512256HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - BasicSignature basic_sig; - auto msg = this->kTest1Msg; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlData.data()); - - NrProof proof; - - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha512_256)); - ASSERT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)); - EXPECT_EQ(kEpidNoErr, EpidNrProve(member, msg.data(), msg.size(), &basic_sig, - &sig_rl->bk[0], &proof)); - - // Check proof by doing an NrVerify - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha512_256)); - EXPECT_EQ(kEpidNoErr, EpidNrVerify(ctx, &basic_sig, msg.data(), msg.size(), - &sig_rl->bk[0], &proof)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/presig-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/presig-test.cc deleted file mode 100644 index 95538acb70..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/presig-test.cc +++ /dev/null @@ -1,246 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief ComputePreSig unit tests. - */ -#include -#include -#include -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -} - -#include "epid/member/unittests/member-testhelper.h" -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" - -/// Count of elements in array -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) - -bool operator==(PreComputedSignature const& lhs, - PreComputedSignature const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -bool operator!=(PreComputedSignature const& lhs, - PreComputedSignature const& rhs) { - return !(lhs == rhs); -} - -namespace { - -/////////////////////////////////////////////////////////////////////// -// EpidAddPreSigs -TEST_F(EpidMemberTest, AddPreSigsFailsGivenNullPointer) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - PreComputedSignature presig = this->kPrecomputedSignatures[0]; - - EXPECT_EQ(kEpidBadArgErr, EpidAddPreSigs(nullptr, 1, &presig)); -} - -TEST_F(EpidMemberTest, AddPreSigsFailsGivenHugeNumberOfPreSigs) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - PreComputedSignature presig = this->kPrecomputedSignatures[0]; - - // number_presigs = 0x80..01 of size equal to sizeof(size_t) - EXPECT_EQ(kEpidBadArgErr, - EpidAddPreSigs(member, (SIZE_MAX >> 1) + 2, &presig)); -} - -TEST_F(EpidMemberTest, - AddPreSigsComputesSpecifiedNumberOfPresigsIfInputPresigsNull) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - ASSERT_EQ(kEpidNoErr, EpidAddPreSigs(member, 2, nullptr)); - ASSERT_EQ(kEpidNoErr, EpidAddPreSigs(member, 1, nullptr)); - // request to generate 0 pre-computed signatures do nothing - ASSERT_EQ(kEpidNoErr, EpidAddPreSigs(member, 0, nullptr)); - EXPECT_EQ((size_t)3, EpidGetNumPreSigs(member)); -} - -TEST_F(EpidMemberTest, AddPreSigsClearsInputPresigBuffer) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - // For a test purposes allocate an array of precomputed signatures with - // all elements initialized to the same precomputed signature. - // Warning: Do not use precomputed signatures twice in production code! - std::vector presigs(2, this->kPrecomputedSignatures[0]); - - ASSERT_EQ(kEpidNoErr, EpidAddPreSigs(member, presigs.size(), presigs.data())); - EXPECT_TRUE(std::all_of((uint8_t*)presigs.data(), - (uint8_t*)(presigs.data() + presigs.size()), - [](uint8_t a) { return 0 == a; })); -} - -TEST_F(EpidMemberTest, AddPreSigsAddsCorrectNumberOfPresigsGivenValidInput) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - // For a test purposes allocate an arrays of precomputed signatures with - // all elements initialized to the same precomputed signature. - // Warning: Do not use precomputed signatures twice in production code! - std::vector presigs1(2, - this->kPrecomputedSignatures[0]); - std::vector presigs2 = presigs1; - - // add - ASSERT_EQ(kEpidNoErr, - EpidAddPreSigs(member, presigs1.size(), presigs1.data())); - // extend - ASSERT_EQ(kEpidNoErr, - EpidAddPreSigs(member, presigs2.size(), presigs2.data())); - // add empty pre-computed signatures array does not affect internal pool - ASSERT_EQ(kEpidNoErr, EpidAddPreSigs(member, 0, presigs2.data())); - EXPECT_EQ(presigs1.size() + presigs2.size(), EpidGetNumPreSigs(member)); -} - -/////////////////////////////////////////////////////////////////////// -// EpidGetNumPreSigs -TEST_F(EpidMemberTest, GetNumPreSigsReturnsZeroGivenNullptr) { - EXPECT_EQ((size_t)0, EpidGetNumPreSigs(nullptr)); -} - -TEST_F(EpidMemberTest, NumPreSigsForNewleyCreatedContextIsZero) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - EXPECT_EQ((size_t)0, EpidGetNumPreSigs(member)); -} - -TEST_F(EpidMemberTest, GetNumPreSigsReturnsNumberOfAddedPresigs) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - // For a test purposes allocate an array of precomputed signatures with - // all elements initialized to the same precomputed signature. - // Warning: Do not use precomputed signatures twice in production code! - std::vector presigs(5, this->kPrecomputedSignatures[0]); - - THROW_ON_EPIDERR(EpidAddPreSigs(member, presigs.size(), presigs.data())); - EXPECT_EQ(presigs.size(), EpidGetNumPreSigs(member)); -} -/////////////////////////////////////////////////////////////////////// -// EpidWritePreSigs -TEST_F(EpidMemberTest, WritePreSigsFailsGivenNullPointer) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - PreComputedSignature presig; - - EXPECT_EQ(kEpidBadArgErr, EpidWritePreSigs(nullptr, &presig, 0)); -} - -TEST_F(EpidMemberTest, WritePreSigsFailsGivenWrongNumberOfPresigs) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - PreComputedSignature presig = this->kPrecomputedSignatures[0]; - - // add one pre-computed signature - THROW_ON_EPIDERR(EpidAddPreSigs(member, 1, &presig)); - // export more pre-computed signatures than available - EXPECT_EQ(kEpidBadArgErr, EpidWritePreSigs(member, &presig, 2)); -} - -TEST_F(EpidMemberTest, WritePreSigsClearsPresigsOnSuccess) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - std::vector presigs( - COUNT_OF(this->kPrecomputedSignatures)); - presigs.assign(std::begin(this->kPrecomputedSignatures), - std::end(this->kPrecomputedSignatures)); - - THROW_ON_EPIDERR(EpidAddPreSigs(member, presigs.size(), presigs.data())); - - // can export some but not all - EXPECT_EQ(kEpidNoErr, EpidWritePreSigs(member, presigs.data(), 1)); - EXPECT_EQ(presigs.size() - 1, EpidGetNumPreSigs(member)); - // can export all the rest - EXPECT_EQ(kEpidNoErr, - EpidWritePreSigs(member, presigs.data() + 1, presigs.size() - 1)); - // check that all exported - EXPECT_EQ((size_t)0, EpidGetNumPreSigs(member)); - // check that both write operations export (and leave) correct values. - EXPECT_EQ(presigs.end(), std::unique(presigs.begin(), presigs.end())); -} - -TEST_F(EpidMemberTest, CanWriteAddedPresigs) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - PreComputedSignature presig0 = this->kPrecomputedSignatures[0]; - PreComputedSignature presig1 = this->kPrecomputedSignatures[1]; - PreComputedSignature presigs[2] = {presig0, presig1}; - - THROW_ON_EPIDERR(EpidAddPreSigs(member, COUNT_OF(presigs), presigs)); - - EXPECT_EQ(kEpidNoErr, EpidWritePreSigs(member, presigs, COUNT_OF(presigs))); - // compare ignoring order - EXPECT_TRUE((presig0 == presigs[0] && presig1 == presigs[1]) || - (presig0 == presigs[1] && presig1 == presigs[0])); -} - -TEST_F(EpidMemberTest, CanWriteGeneratedPresigs) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - PreComputedSignature zero_buffer; - memset(&zero_buffer, 0, sizeof(zero_buffer)); - PreComputedSignature presigs[2] = {zero_buffer, zero_buffer}; - - THROW_ON_EPIDERR(EpidAddPreSigs(member, COUNT_OF(presigs), nullptr)); - - EXPECT_EQ(kEpidNoErr, EpidWritePreSigs(member, presigs, COUNT_OF(presigs))); - // check pre-computed signature were written - EXPECT_NE(zero_buffer, presigs[0]); - EXPECT_NE(zero_buffer, presigs[1]); -} - -TEST_F(EpidMemberTest, WritePreSigsCanWriteZeroPresigs) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - - PreComputedSignature presig; - - EXPECT_EQ(kEpidNoErr, EpidWritePreSigs(member, &presig, 0)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/request_join-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/request_join-test.cc deleted file mode 100644 index d444974b9f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/request_join-test.cc +++ /dev/null @@ -1,320 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief RequestJoin unit tests. - */ - -#include -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/src/epid2params.h" -} - -#include "epid/member/unittests/member-testhelper.h" -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/common-testhelper/finite_field_wrapper-testhelper.h" -#include "epid/common-testhelper/ffelement_wrapper-testhelper.h" -#include "epid/common-testhelper/epid_params-testhelper.h" -#include "epid/common-testhelper/ecgroup_wrapper-testhelper.h" -#include "epid/common-testhelper/ecpoint_wrapper-testhelper.h" - -namespace { - -// local constant for RequestJoin tests. This can be hoisted later if needed -// avoids cpplint warning about multiple includes. -const GroupPubKey kPubKey = { -#include "epid/common-testhelper/testdata/grp01/gpubkey.inc" -}; - -TEST_F(EpidMemberTest, RequestJoinFailsGivenNullParameters) { - GroupPubKey pub_key = kPubKey; - IssuerNonce ni; - FpElemStr f; - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - JoinRequest join_request; - EXPECT_EQ(kEpidBadArgErr, EpidRequestJoin(nullptr, &ni, &f, rnd_func, - rnd_param, kSha256, &join_request)); - EXPECT_EQ(kEpidBadArgErr, EpidRequestJoin(&pub_key, nullptr, &f, rnd_func, - rnd_param, kSha256, &join_request)); - EXPECT_EQ(kEpidBadArgErr, EpidRequestJoin(&pub_key, &ni, nullptr, rnd_func, - rnd_param, kSha256, &join_request)); - EXPECT_EQ(kEpidBadArgErr, EpidRequestJoin(&pub_key, &ni, &f, rnd_func, - rnd_param, kSha256, nullptr)); - EXPECT_EQ(kEpidBadArgErr, EpidRequestJoin(&pub_key, &ni, &f, nullptr, - rnd_param, kSha256, &join_request)); -} - -TEST_F(EpidMemberTest, RequestJoinFailsGivenInvalidGroupKey) { - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - JoinRequest join_request; - GroupPubKey pub_key = kPubKey; - FpElemStr f = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - }; - IssuerNonce ni = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, - }; - pub_key.h1.x.data.data[15] = 0xff; - Epid20Params params; - EcPointObj pt(¶ms.G1); - ASSERT_NE(kEpidNoErr, ReadEcPoint(params.G1, (uint8_t*)&pub_key.h1, - sizeof(pub_key.h1), pt)); - EXPECT_EQ(kEpidBadArgErr, EpidRequestJoin(&pub_key, &ni, &f, rnd_func, - rnd_param, kSha256, &join_request)); -} - -TEST_F(EpidMemberTest, RequestJoinFailsGivenInvalidFValue) { - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - JoinRequest join_request; - GroupPubKey pub_key = kPubKey; - FpElemStr f = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - }; - IssuerNonce ni = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, - }; - - const BigNumStr p = { - {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF0, 0xCD, 0x46, 0xE5, 0xF2, 0x5E, - 0xEE, 0x71, 0xA4, 0x9E, 0x0C, 0xDC, 0x65, 0xFB, 0x12, 0x99, 0x92, 0x1A, - 0xF6, 0x2D, 0x53, 0x6C, 0xD1, 0x0B, 0x50, 0x0D}}}; - FiniteFieldObj Fp(p); - FfElementObj el(&Fp); - ASSERT_NE(kEpidNoErr, ReadFfElement(Fp, (uint8_t*)&f, sizeof(f), el)); - EXPECT_EQ(kEpidBadArgErr, EpidRequestJoin(&pub_key, &ni, &f, rnd_func, - rnd_param, kSha256, &join_request)); -} - -TEST_F(EpidMemberTest, - GeneratesValidJoinRequestGivenValidParametersUsingIKGFData) { - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - JoinRequest join_request; - FpElemStr f = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - }; - IssuerNonce ni = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, - }; - const GroupPubKey* grp_public_key = reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - EXPECT_EQ(kEpidNoErr, EpidRequestJoin(grp_public_key, &ni, &f, rnd_func, - rnd_param, kSha256, &join_request)); -} - -TEST_F(EpidMemberTest, GeneratesValidJoinRequestGivenValidParameters) { - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - JoinRequest join_request; - GroupPubKey pub_key = kPubKey; - FpElemStr f = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - }; - IssuerNonce ni = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, - }; - EXPECT_EQ(kEpidNoErr, EpidRequestJoin(&pub_key, &ni, &f, rnd_func, rnd_param, - kSha256, &join_request)); -} - -TEST_F(EpidMemberTest, GeneratesDiffJoinRequestsOnMultipleCalls) { - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - JoinRequest join_request1; - JoinRequest join_request2; - GroupPubKey pub_key = kPubKey; - FpElemStr f = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - }; - IssuerNonce ni = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, - }; - prng.set_seed(0x1234); - EXPECT_EQ(kEpidNoErr, EpidRequestJoin(&pub_key, &ni, &f, rnd_func, rnd_param, - kSha256, &join_request1)); - EXPECT_EQ(kEpidNoErr, EpidRequestJoin(&pub_key, &ni, &f, rnd_func, rnd_param, - kSha256, &join_request2)); - EXPECT_NE(0, memcmp(&join_request1, &join_request2, sizeof(join_request1))); -} - -TEST_F(EpidMemberTest, GeneratesDiffJoinRequestsGivenDiffHashAlgs) { - Prng prng; - BitSupplier rnd_func = Prng::Generate; - void* rnd_param = &prng; - JoinRequest join_request1; - JoinRequest join_request2; - GroupPubKey pub_key = kPubKey; - FpElemStr f = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, - }; - IssuerNonce ni = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, - 0x04, 0x05, 0x06, 0x07, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, - }; - prng.set_seed(0x1234); - EXPECT_EQ(kEpidNoErr, EpidRequestJoin(&pub_key, &ni, &f, rnd_func, rnd_param, - kSha256, &join_request1)); - prng.set_seed(0x1234); - EXPECT_EQ(kEpidNoErr, EpidRequestJoin(&pub_key, &ni, &f, rnd_func, rnd_param, - kSha512, &join_request2)); - EXPECT_NE(0, memcmp(&join_request1, &join_request2, sizeof(join_request1))); -} - -TEST_F(EpidMemberTest, PrivateKeyValidationFailsGivenNullParameters) { - EXPECT_FALSE(EpidIsPrivKeyInGroup(&this->kGrpXKey, nullptr)); - EXPECT_FALSE(EpidIsPrivKeyInGroup(nullptr, &this->kGrpXMember9PrivKey)); -} - -TEST_F(EpidMemberTest, PrivateKeyValidationFailsGivenGroupIDMissmatch) { - // Check wrong gid for GroupPubKey - GroupPubKey group_pub_key = this->kGrpXKey; - group_pub_key.gid.data[0] = group_pub_key.gid.data[0] ^ 0xFF; - EXPECT_FALSE( - EpidIsPrivKeyInGroup(&group_pub_key, &this->kGrpXMember9PrivKey)); - // Check wrong gid for PrivKey - PrivKey priv_key = this->kGrpXMember9PrivKey; - priv_key.gid.data[sizeof(priv_key.gid.data) - 1] = - priv_key.gid.data[sizeof(priv_key.gid.data) - 1] ^ 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&this->kGrpXKey, &priv_key)); - // Check wrong gid for both GroupPubKey and PrivKey - EXPECT_FALSE(EpidIsPrivKeyInGroup(&group_pub_key, &priv_key)); -} - -TEST_F(EpidMemberTest, PrivateKeyValidationRejectsInvalidPrivKey) { - // test for invalid key components values (eg. out of range, not in EC group) - PrivKey priv_key = this->kGrpXMember9PrivKey; - priv_key.A.x.data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&this->kGrpXKey, &priv_key)); - - priv_key = this->kGrpXMember9PrivKey; - priv_key.A.y.data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&this->kGrpXKey, &priv_key)); - - priv_key = this->kGrpXMember9PrivKey; - FpElemStr inv_f = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, - }; - priv_key.f = inv_f; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&this->kGrpXKey, &priv_key)); - - priv_key = this->kGrpXMember9PrivKey; - priv_key.x.data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&this->kGrpXKey, &priv_key)); -} - -TEST_F(EpidMemberTest, PrivateKeyValidationRejectsInvalidGroupKey) { - // test for invalid key components values (eg. out of range, not in EC group) - GroupPubKey pub_key = this->kGrpXKey; - pub_key.h1.x.data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&pub_key, &this->kGrpXMember9PrivKey)); - - pub_key = this->kGrpXKey; - pub_key.h1.y.data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&pub_key, &this->kGrpXMember9PrivKey)); - - pub_key = this->kGrpXKey; - pub_key.h2.x.data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&pub_key, &this->kGrpXMember9PrivKey)); - - pub_key = this->kGrpXKey; - pub_key.h2.y.data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&pub_key, &this->kGrpXMember9PrivKey)); - - pub_key = this->kGrpXKey; - pub_key.w.x[0].data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&pub_key, &this->kGrpXMember9PrivKey)); - - pub_key = this->kGrpXKey; - pub_key.w.x[1].data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&pub_key, &this->kGrpXMember9PrivKey)); - - pub_key = this->kGrpXKey; - pub_key.w.y[0].data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&pub_key, &this->kGrpXMember9PrivKey)); - - pub_key = this->kGrpXKey; - pub_key.w.y[1].data.data[0] = 0xFF; - EXPECT_FALSE(EpidIsPrivKeyInGroup(&pub_key, &this->kGrpXMember9PrivKey)); -} - -TEST_F(EpidMemberTest, PrivateKeyValidationRejectsKeyNotInGroup) { - EXPECT_FALSE( - EpidIsPrivKeyInGroup(&this->kGrpYKey, &this->kGrpXMember9PrivKey)); -} - -TEST_F(EpidMemberTest, PrivateKeyValidationRejectsKeyNotInGroupUsingIKGFData) { - const GroupPubKey* grp_public_key = reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - const PrivKey mbr_private_key = { -#include "epid/common-testhelper/testdata/ikgf/groupb/member0/mprivkey.inc" - }; - EXPECT_FALSE(EpidIsPrivKeyInGroup(grp_public_key, &mbr_private_key)); -} - -TEST_F(EpidMemberTest, PrivateKeyValidationAcceptsKeyInGroup) { - EXPECT_TRUE( - EpidIsPrivKeyInGroup(&this->kGrpXKey, &this->kGrpXMember9PrivKey)); -} - -TEST_F(EpidMemberTest, PrivateKeyValidationAcceptsKeyInGroupUsingIKGFData) { - const GroupPubKey* grp_public_key = reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - const PrivKey* mbr_private_key = - reinterpret_cast(this->kMemberPrivateKeyDataIkgf.data()); - EXPECT_TRUE(EpidIsPrivKeyInGroup(grp_public_key, mbr_private_key)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/sign-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/sign-test.cc deleted file mode 100644 index ce24b8a990..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/sign-test.cc +++ /dev/null @@ -1,1079 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Sign unit tests. - */ -#include -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -#include "epid/member/src/context.h" -#include "epid/verifier/api.h" -} - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/member/unittests/member-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" -namespace { - -/// Count of elements in array -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) - -///////////////////////////////////////////////////////////////////////// -// Simple error cases - -TEST_F(EpidMemberTest, SignFailsGivenNullParameters) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kGroupPublicKey.gid; - std::vector sig(EpidGetSigSize(&srl)); - EXPECT_EQ(kEpidBadArgErr, EpidSign(nullptr, msg.data(), msg.size(), - bsn.data(), bsn.size(), &srl, sizeof(srl), - (EpidSignature*)sig.data(), sig.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidSign(member, msg.data(), msg.size(), bsn.data(), bsn.size(), - &srl, sizeof(srl), nullptr, sig.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidSign(member, nullptr, msg.size(), bsn.data(), bsn.size(), &srl, - sizeof(srl), (EpidSignature*)sig.data(), sig.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidSign(member, msg.data(), msg.size(), nullptr, bsn.size(), &srl, - sizeof(srl), (EpidSignature*)sig.data(), sig.size())); -} - -TEST_F(EpidMemberTest, SignFailsGivenWrongSigLen) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kGroupPublicKey.gid; - - // signature buffer one byte less than needed - std::vector sig_small(EpidGetSigSize(&srl) - 1); - EXPECT_EQ(kEpidBadArgErr, - EpidSign(member, msg.data(), msg.size(), bsn.data(), bsn.size(), - &srl, sizeof(srl), (EpidSignature*)sig_small.data(), - sig_small.size())); - - // signature buffer is one byte - a less than allowed for EpidSignature - std::vector sig_one(1); - EXPECT_EQ( - kEpidBadArgErr, - EpidSign(member, msg.data(), msg.size(), bsn.data(), bsn.size(), &srl, - sizeof(srl), (EpidSignature*)sig_one.data(), sig_one.size())); -} - -TEST_F(EpidMemberTest, SignFailsGivenWrongSigRlLen) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kGroupPublicKey.gid; - - std::vector sig(EpidGetSigSize(&srl)); - std::vector srl_reduced(1); - EXPECT_EQ(kEpidBadArgErr, - EpidSign(member, msg.data(), msg.size(), bsn.data(), bsn.size(), - (SigRl*)srl_reduced.data(), srl_reduced.size(), - (EpidSignature*)sig.data(), sig.size())); -} - -TEST_F(EpidMemberTest, SignFailsGivenUnregisteredBasename) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& bsn1 = this->kBsn1; - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kGroupPublicKey.gid; - std::vector sig(EpidGetSigSize(&srl)); - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - EXPECT_EQ( - kEpidBadArgErr, - EpidSign(member, msg.data(), msg.size(), bsn1.data(), bsn1.size(), &srl, - sizeof(srl), (EpidSignature*)sig.data(), sig.size())); -} - -///////////////////////////////////////////////////////////////////////// -// Anonymity - -TEST_F(EpidMemberTest, SignaturesOfSameMessageAreDifferent) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - std::vector sig1(EpidGetSigSize(nullptr)); - std::vector sig2(EpidGetSigSize(nullptr)); - // without signature based revocation list - EXPECT_EQ(kEpidNoErr, - EpidSign(member, msg.data(), msg.size(), nullptr, 0, nullptr, 0, - (EpidSignature*)sig1.data(), sig1.size())); - EXPECT_EQ(kEpidNoErr, - EpidSign(member, msg.data(), msg.size(), nullptr, 0, nullptr, 0, - (EpidSignature*)sig2.data(), sig2.size())); - EXPECT_TRUE(sig1.size() == sig2.size() && - 0 != memcmp(sig1.data(), sig2.data(), sig1.size())); - // with signature based revocation list - uint8_t sig_rl_data_n2_one[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x01, - // one bk - 0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, 0x33, 0x35, 0x27, 0xd, - 0x8, 0xb1, 0xbe, 0x5d, 0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, - 0x2e, 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, 0x56, 0x43, 0xc6, 0x94, - 0x67, 0xa6, 0x72, 0xf6, 0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, - 0x9d, 0xc7, 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, 0x90, 0x23, 0x18, 0x8, 0xad, - 0x7d, 0xfe, 0xf5, 0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, 0xc2, - 0x89, 0xb2, 0x6b, 0x4e, 0xb4, 0xc1, 0x55, 0x87, 0x98, 0xbd, 0x72, 0xf9, - 0xcf, 0xd, 0x40, 0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, 0x61, 0x9d, - 0x4f, 0x7a, 0xb5, 0x2b, 0x16, 0xa9, 0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, - 0x33, 0xad, 0xf6, 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, 0x98, 0x37, - 0xce, 0xec, 0xd1, 0xa8, 0xc, 0x8b}; - SigRl* srl1 = reinterpret_cast(sig_rl_data_n2_one); - size_t srl1_size = sizeof(sig_rl_data_n2_one); - std::vector sig3(EpidGetSigSize(srl1)); - std::vector sig4(EpidGetSigSize(srl1)); - EXPECT_EQ(kEpidNoErr, - EpidSign(member, msg.data(), msg.size(), nullptr, 0, srl1, - srl1_size, (EpidSignature*)sig3.data(), sig3.size())); - EXPECT_EQ(kEpidNoErr, - EpidSign(member, msg.data(), msg.size(), nullptr, 0, srl1, - srl1_size, (EpidSignature*)sig4.data(), sig4.size())); - EXPECT_TRUE(sig3.size() == sig4.size() && - 0 != memcmp(sig3.data(), sig4.data(), sig3.size())); -} -TEST_F(EpidMemberTest, SignaturesOfSameMessageWithSameBasenameAreDifferent) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - std::vector sig1(EpidGetSigSize(nullptr)); - std::vector sig2(EpidGetSigSize(nullptr)); - // without signature based revocation list - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidNoErr, - EpidSign(member, msg.data(), msg.size(), bsn.data(), bsn.size(), - nullptr, 0, (EpidSignature*)sig1.data(), sig1.size())); - EXPECT_EQ(kEpidNoErr, - EpidSign(member, msg.data(), msg.size(), bsn.data(), bsn.size(), - nullptr, 0, (EpidSignature*)sig2.data(), sig2.size())); - EXPECT_TRUE(sig1.size() == sig2.size() && - 0 != memcmp(sig1.data(), sig2.data(), sig1.size())); - - // with signature based revocation list - uint8_t sig_rl_data_n2_one[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x01, - // one bk - 0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, 0x33, 0x35, 0x27, 0xd, - 0x8, 0xb1, 0xbe, 0x5d, 0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, - 0x2e, 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, 0x56, 0x43, 0xc6, 0x94, - 0x67, 0xa6, 0x72, 0xf6, 0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, - 0x9d, 0xc7, 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, 0x90, 0x23, 0x18, 0x8, 0xad, - 0x7d, 0xfe, 0xf5, 0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, 0xc2, - 0x89, 0xb2, 0x6b, 0x4e, 0xb4, 0xc1, 0x55, 0x87, 0x98, 0xbd, 0x72, 0xf9, - 0xcf, 0xd, 0x40, 0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, 0x61, 0x9d, - 0x4f, 0x7a, 0xb5, 0x2b, 0x16, 0xa9, 0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, - 0x33, 0xad, 0xf6, 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, 0x98, 0x37, - 0xce, 0xec, 0xd1, 0xa8, 0xc, 0x8b}; - SigRl* srl1 = reinterpret_cast(sig_rl_data_n2_one); - size_t srl1_size = sizeof(sig_rl_data_n2_one); - std::vector sig3(EpidGetSigSize(srl1)); - std::vector sig4(EpidGetSigSize(srl1)); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), bsn.data(), - bsn.size(), srl1, srl1_size, - (EpidSignature*)sig3.data(), sig3.size())); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), bsn.data(), - bsn.size(), srl1, srl1_size, - (EpidSignature*)sig4.data(), sig4.size())); - EXPECT_TRUE(sig3.size() == sig4.size() && - 0 != memcmp(sig3.data(), sig4.data(), sig3.size())); -} - -///////////////////////////////////////////////////////////////////////// -// Variable basename - -TEST_F(EpidMemberTest, SignsMessageUsingRandomBaseNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, SignsMessageUsingRandomBaseWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageUsingBasenameNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), bsn.data(), - bsn.size(), nullptr, 0, sig, sig_len)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageUsingBasenameWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), bsn.data(), - bsn.size(), srl, srl_size, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsUsingRandomBaseWithRegisteredBasenamesNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, SignsUsingRandomBaseWithRegisteredBasenamesWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsUsingRandomBaseWithoutRegisteredBasenamesNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, - SignsUsingRandomBaseWithoutRegisteredBasenamesWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////////// -// Variable sigRL - -TEST_F(EpidMemberTest, SignFailsGivenInvalidSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - - // sign fail with mismatch gid - uint8_t sig_rl_data_n2_one[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x01, - // one bk - 0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, 0x33, 0x35, 0x27, 0xd, - 0x8, 0xb1, 0xbe, 0x5d, 0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, - 0x2e, 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, 0x56, 0x43, 0xc6, 0x94, - 0x67, 0xa6, 0x72, 0xf6, 0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, - 0x9d, 0xc7, 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, 0x90, 0x23, 0x18, 0x8, 0xad, - 0x7d, 0xfe, 0xf5, 0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, 0xc2, - 0x89, 0xb2, 0x6b, 0x4e, 0xb4, 0xc1, 0x55, 0x87, 0x98, 0xbd, 0x72, 0xf9, - 0xcf, 0xd, 0x40, 0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, 0x61, 0x9d, - 0x4f, 0x7a, 0xb5, 0x2b, 0x16, 0xa9, 0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, - 0x33, 0xad, 0xf6, 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, 0x98, 0x37, - 0xce, 0xec, 0xd1, 0xa8, 0xc, 0x8b}; - SigRl* srl = reinterpret_cast(sig_rl_data_n2_one); - size_t srl_size = sizeof(sig_rl_data_n2_one); - size_t sig_len = EpidGetSigSize(srl); - std::vector newsig(sig_len); - EpidSignature* sig = (EpidSignature*)newsig.data(); - - EXPECT_EQ(kEpidBadArgErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - - // sign fail given invalid sigrl size - uint8_t sig_rl_data_n_one[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x00, - // one bk - 0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, 0x33, 0x35, 0x27, 0xd, - 0x8, 0xb1, 0xbe, 0x5d, 0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, - 0x2e, 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, 0x56, 0x43, 0xc6, 0x94, - 0x67, 0xa6, 0x72, 0xf6, 0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, - 0x9d, 0xc7, 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, 0x90, 0x23, 0x18, 0x8, 0xad, - 0x7d, 0xfe, 0xf5, 0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, 0xc2, - 0x89, 0xb2, 0x6b, 0x4e, 0xb4, 0xc1, 0x55, 0x87, 0x98, 0xbd, 0x72, 0xf9, - 0xcf, 0xd, 0x40, 0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, 0x61, 0x9d, - 0x4f, 0x7a, 0xb5, 0x2b, 0x16, 0xa9, 0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, - 0x33, 0xad, 0xf6, 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, 0x98, 0x37, - 0xce, 0xec, 0xd1, 0xa8, 0xc, 0x8b}; - SigRl* srl1 = reinterpret_cast(sig_rl_data_n_one); - size_t srl1_size = sizeof(sig_rl_data_n_one); - size_t sig_len1 = EpidGetSigSize(srl1); - std::vector newsig1(sig_len1); - EpidSignature* sig1 = (EpidSignature*)newsig1.data(); - - EXPECT_EQ(kEpidBadArgErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl1, srl1_size, sig1, sig_len1)); -} - -TEST_F(EpidMemberTest, SignsMessageGivenNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - - size_t sig_len = EpidGetSigSize(nullptr); - std::vector newsig(sig_len); - EpidSignature* sig = (EpidSignature*)newsig.data(); - - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - // verify signature - VerifierCtxObj ctx(this->kGroupPublicKey); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, SignsMessageGivenNoSigRlUsingIKGFData) { - GroupPubKey grp_public_key = *reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - PrivKey mbr_private_key = - *reinterpret_cast(this->kMemberPrivateKeyDataIkgf.data()); - Prng my_prng; - auto& msg = this->kMsg0; - - size_t sig_len = EpidGetSigSize(nullptr); - std::vector newsig(sig_len); - // using ikgf keys - MemberCtxObj member(grp_public_key, mbr_private_key, &Prng::Generate, - &my_prng); - EpidSignature* sig = (EpidSignature*)newsig.data(); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - // verify signature - VerifierCtxObj ctx(grp_public_key); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageGivenSigRlWithNoEntries) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - - uint8_t sig_rl_data_n2_zero[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x00, - // not bk's - }; - SigRl const* srl = reinterpret_cast(sig_rl_data_n2_zero); - size_t srl_size = sizeof(sig_rl_data_n2_zero); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageGivenSigRlWithNoEntriesUsingIkgfData) { - GroupPubKey grp_public_key = *reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - PrivKey mbr_private_key = - *reinterpret_cast(this->kMemberPrivateKeyDataIkgf.data()); - Prng my_prng; - auto& msg = this->kMsg0; - // using ikgf keys - MemberCtxObj member_ikgf(grp_public_key, mbr_private_key, &Prng::Generate, - &my_prng); - uint8_t sig_rl_data_n2_one_gid0[] = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sigrl_empty.inc" - }; - SigRl* srl_ikgf = reinterpret_cast(sig_rl_data_n2_one_gid0); - size_t srl_size = sizeof(sig_rl_data_n2_one_gid0); - std::vector sig_data_ikgf(EpidGetSigSize(srl_ikgf)); - EpidSignature* sig_ikgf = - reinterpret_cast(sig_data_ikgf.data()); - size_t sig_len = sig_data_ikgf.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member_ikgf, msg.data(), msg.size(), nullptr, - 0, srl_ikgf, srl_size, sig_ikgf, sig_len)); - VerifierCtxObj ctx_ikgf(grp_public_key); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx_ikgf, srl_ikgf, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx_ikgf, sig_ikgf, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageGivenSigRlWithEntries) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - uint8_t sig_rl_data_n2_one[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x02, - // one bk - 0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, 0x33, 0x35, 0x27, 0xd, - 0x8, 0xb1, 0xbe, 0x5d, 0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, - 0x2e, 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, 0x56, 0x43, 0xc6, 0x94, - 0x67, 0xa6, 0x72, 0xf6, 0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, - 0x9d, 0xc7, 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, 0x90, 0x23, 0x18, 0x8, 0xad, - 0x7d, 0xfe, 0xf5, 0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, 0xc2, - 0x89, 0xb2, 0x6b, 0x4e, 0xb4, 0xc1, 0x55, 0x87, 0x98, 0xbd, 0x72, 0xf9, - 0xcf, 0xd, 0x40, 0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, 0x61, 0x9d, - 0x4f, 0x7a, 0xb5, 0x2b, 0x16, 0xa9, 0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, - 0x33, 0xad, 0xf6, 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, 0x98, 0x37, - 0xce, 0xec, 0xd1, 0xa8, 0xc, 0x8b, - - 0x71, 0x8a, 0xb5, 0x1, 0x7f, 0x7c, 0x92, 0x9a, 0xa2, 0xc9, 0x81, 0x10, - 0xfe, 0xbf, 0xc, 0x53, 0xa4, 0x43, 0xaf, 0x31, 0x74, 0x12, 0x25, 0x60, - 0x3e, 0xc0, 0x21, 0xe6, 0x63, 0x9a, 0xd2, 0x67, 0x2d, 0xb5, 0xd5, 0x82, - 0xc4, 0x49, 0x29, 0x51, 0x42, 0x8f, 0xe0, 0xe, 0xd1, 0x73, 0x27, 0xf5, - 0x77, 0x16, 0x4, 0x40, 0x8a, 0x0, 0xe, 0x3a, 0x5d, 0x37, 0x42, 0xd3, 0x8, - 0x40, 0xbd, 0x69, 0xf7, 0x5f, 0x74, 0x21, 0x50, 0xf4, 0xce, 0xfe, 0xd9, - 0xdd, 0x97, 0x6c, 0xa8, 0xa5, 0x60, 0x6b, 0xf8, 0x1b, 0xba, 0x2, 0xb2, - 0xca, 0x5, 0x44, 0x9b, 0xb1, 0x5e, 0x3a, 0xa4, 0x35, 0x7a, 0x51, 0xfa, - 0xcf, 0xa4, 0x4, 0xe9, 0xf3, 0xbf, 0x38, 0xd4, 0x24, 0x9, 0x52, 0xf3, - 0x58, 0x3d, 0x9d, 0x4b, 0xb3, 0x37, 0x4b, 0xec, 0x87, 0xe1, 0x64, 0x60, - 0x3c, 0xb6, 0xf7, 0x7b, 0xff, 0x40, 0x11}; - SigRl* srl = reinterpret_cast(sig_rl_data_n2_one); - size_t srl_size = sizeof(sig_rl_data_n2_one); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageGivenSigRlWithEntriesUsingIKGFData) { - GroupPubKey grp_public_key = *reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - PrivKey mbr_private_key = - *reinterpret_cast(this->kMemberPrivateKeyDataIkgf.data()); - Prng my_prng; - auto& msg = this->kMsg0; - // using ikgf keys - MemberCtxObj member_ikgf(grp_public_key, mbr_private_key, &Prng::Generate, - &my_prng); - uint8_t sig_rl_data_n2_one_gid0[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x02, - // one bk - 0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, 0x33, 0x35, 0x27, 0xd, - 0x8, 0xb1, 0xbe, 0x5d, 0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, - 0x2e, 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, 0x56, 0x43, 0xc6, 0x94, - 0x67, 0xa6, 0x72, 0xf6, 0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, - 0x9d, 0xc7, 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, 0x90, 0x23, 0x18, 0x8, 0xad, - 0x7d, 0xfe, 0xf5, 0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, 0xc2, - 0x89, 0xb2, 0x6b, 0x4e, 0xb4, 0xc1, 0x55, 0x87, 0x98, 0xbd, 0x72, 0xf9, - 0xcf, 0xd, 0x40, 0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, 0x61, 0x9d, - 0x4f, 0x7a, 0xb5, 0x2b, 0x16, 0xa9, 0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, - 0x33, 0xad, 0xf6, 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, 0x98, 0x37, - 0xce, 0xec, 0xd1, 0xa8, 0xc, 0x8b, - - 0x71, 0x8a, 0xb5, 0x1, 0x7f, 0x7c, 0x92, 0x9a, 0xa2, 0xc9, 0x81, 0x10, - 0xfe, 0xbf, 0xc, 0x53, 0xa4, 0x43, 0xaf, 0x31, 0x74, 0x12, 0x25, 0x60, - 0x3e, 0xc0, 0x21, 0xe6, 0x63, 0x9a, 0xd2, 0x67, 0x2d, 0xb5, 0xd5, 0x82, - 0xc4, 0x49, 0x29, 0x51, 0x42, 0x8f, 0xe0, 0xe, 0xd1, 0x73, 0x27, 0xf5, - 0x77, 0x16, 0x4, 0x40, 0x8a, 0x0, 0xe, 0x3a, 0x5d, 0x37, 0x42, 0xd3, 0x8, - 0x40, 0xbd, 0x69, 0xf7, 0x5f, 0x74, 0x21, 0x50, 0xf4, 0xce, 0xfe, 0xd9, - 0xdd, 0x97, 0x6c, 0xa8, 0xa5, 0x60, 0x6b, 0xf8, 0x1b, 0xba, 0x2, 0xb2, - 0xca, 0x5, 0x44, 0x9b, 0xb1, 0x5e, 0x3a, 0xa4, 0x35, 0x7a, 0x51, 0xfa, - 0xcf, 0xa4, 0x4, 0xe9, 0xf3, 0xbf, 0x38, 0xd4, 0x24, 0x9, 0x52, 0xf3, - 0x58, 0x3d, 0x9d, 0x4b, 0xb3, 0x37, 0x4b, 0xec, 0x87, 0xe1, 0x64, 0x60, - 0x3c, 0xb6, 0xf7, 0x7b, 0xff, 0x40, 0x11}; - SigRl* srl_ikgf = reinterpret_cast(sig_rl_data_n2_one_gid0); - size_t srl_size = sizeof(sig_rl_data_n2_one_gid0); - std::vector sig_data_ikgf(EpidGetSigSize(srl_ikgf)); - EpidSignature* sig_ikgf = - reinterpret_cast(sig_data_ikgf.data()); - size_t sig_len = sig_data_ikgf.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member_ikgf, msg.data(), msg.size(), nullptr, - 0, srl_ikgf, srl_size, sig_ikgf, sig_len)); - VerifierCtxObj ctx_ikgf(grp_public_key); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx_ikgf, srl_ikgf, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx_ikgf, sig_ikgf, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignMessageReportsIfMemberRevoked) { - // note: a complete sig + nr proof should still be returned!! - const GroupPubKey pub_key = { -#include "epid/common-testhelper/testdata/grp_x/pubkey.inc" - }; - const PrivKey priv_key = { -#include "epid/common-testhelper/testdata/grp_x/member0/mprivkey.inc" - }; - Prng my_prng; - MemberCtxObj member(pub_key, priv_key, this->kMemberPrecomp, &Prng::Generate, - &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - const std::vector kGrpXSigRlMember0Sha256Bsn0Msg0FirstEntry = { -#include "epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_middle_entry.inc" - }; - auto srl = reinterpret_cast( - kGrpXSigRlMember0Sha256Bsn0Msg0FirstEntry.data()); - size_t srl_size = kGrpXSigRlMember0Sha256Bsn0Msg0FirstEntry.size(); - - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidBadArgErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - - VerifierCtxObj ctx(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignMessageReportsIfMemberRevokedUsingIKGFData) { - // note: a complete sig + nr proof should still be returned!! - GroupPubKey grp_public_key = *reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - const PrivKey member_private_key_revoked_by_sig = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sigrevokedmember0/mprivkey.inc" - }; - Prng my_prng; - MemberCtxObj member(grp_public_key, member_private_key_revoked_by_sig, - &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - const std::vector sig_Rl = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sigrl.inc" - }; - auto srl = reinterpret_cast(sig_Rl.data()); - size_t srl_size = sig_Rl.size(); - - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidSigRevokedInSigRl, - EpidSign(member, msg.data(), msg.size(), nullptr, 0, srl, srl_size, - sig, sig_len)); - - VerifierCtxObj ctx(grp_public_key); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} -///////////////////////////////////////////////////////////////////////// -// Variable hash alg - -TEST_F(EpidMemberTest, SignsMessageUsingSha256HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha256)); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - // verify signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha256)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageUsingSha384HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha384)); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - // verify signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha384)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageUsingSha512HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha512)); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - // verify signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha512)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, DISABLED_SignsMessageUsingSha512256HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha512_256)); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - // verify signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha512_256)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////////// -// Variable precomputed signatures - -TEST_F(EpidMemberTest, SignConsumesPrecomputedSignaturesNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - THROW_ON_EPIDERR(EpidAddPreSigs(member, 3, nullptr)); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - EXPECT_EQ((size_t)2, EpidGetNumPreSigs(member)); -} - -TEST_F(EpidMemberTest, SignConsumesPrecomputedSignaturesWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - THROW_ON_EPIDERR(EpidAddPreSigs(member, 3, nullptr)); - auto& msg = this->kMsg0; - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - EXPECT_EQ((size_t)2, EpidGetNumPreSigs(member)); -} - -TEST_F(EpidMemberTest, SignsMessageWithPrecomputedSignaturesNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - THROW_ON_EPIDERR(EpidAddPreSigs(member, 1, nullptr)); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageWithPrecomputedSignaturesWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - THROW_ON_EPIDERR(EpidAddPreSigs(member, 1, nullptr)); - auto& msg = this->kMsg0; - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageWithoutPrecomputedSignaturesNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - // test sign without precomputed signatures - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignsMessageWithoutPrecomputedSignaturesWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - // test sign without precomputed signatures - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(EpidMemberTest, SignFailsOnBadPrecomputedSignaturesNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - PreComputedSignature precompsig; - precompsig = this->kPrecomputedSignatures[0]; - precompsig.B.x.data.data[0]++; - THROW_ON_EPIDERR(EpidAddPreSigs(member, 1, &precompsig)); - auto& msg = this->kMsg0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidBadArgErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)); -} - -TEST_F(EpidMemberTest, SignFailsOnBadPrecomputedSignaturesWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - PreComputedSignature precompsig; - precompsig = this->kPrecomputedSignatures[0]; - precompsig.B.x.data.data[0]++; - THROW_ON_EPIDERR(EpidAddPreSigs(member, 1, &precompsig)); - auto& msg = this->kMsg0; - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidBadArgErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)); -} - -///////////////////////////////////////////////////////////////////////// -// Variable messages - -TEST_F(EpidMemberTest, SignsEmptyMessageNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), 0, bsn.data(), bsn.size(), - nullptr, 0, sig, sig_len)); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, EpidVerify(ctx, sig, sig_len, msg.data(), 0)); -} - -TEST_F(EpidMemberTest, SignsEmptyMessageWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), 0, nullptr, 0, srl, - srl_size, sig, sig_len)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - EXPECT_EQ(kEpidSigValid, EpidVerify(ctx, sig, sig_len, msg.data(), 0)); -} - -TEST_F(EpidMemberTest, SignsShortMessageNoSigRl) { - // check: 1, 13, 128, 256, 512, 1021, 1024 bytes - // 13 and 1021 are primes - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - VerifierCtxObj ctx(this->kGroupPublicKey); - size_t lengths[] = {1, 13, 128, 256, - 512, 1021, 1024}; // have desired lengths to loop over - std::vector msg( - lengths[COUNT_OF(lengths) - 1]); // allocate message for max size - for (size_t n = 0; n < msg.size(); n++) { - msg[n] = (uint8_t)n; - } - for (auto length : lengths) { - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), length, nullptr, 0, - nullptr, 0, sig, sig_len)) - << "EpidSign for message_len: " << length << " failed"; - EXPECT_EQ(kEpidSigValid, EpidVerify(ctx, sig, sig_len, msg.data(), length)) - << "EpidVerify for message_len: " << length << " failed"; - } -} - -TEST_F(EpidMemberTest, SignsShortMessageWithSigRl) { - // check: 1, 13, 128, 256, 512, 1021, 1024 bytes - // 13 and 1021 are primes - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - size_t message_len = 0; - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - size_t lengths[] = {1, 13, 128, 256, - 512, 1021, 1024}; // have desired lengths to loop over - std::vector msg( - lengths[COUNT_OF(lengths) - 1]); // allocate message for max size - for (size_t n = 0; n < msg.size(); n++) { - msg.at(n) = (uint8_t)n; - } - for (auto length : lengths) { - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), length, nullptr, 0, srl, - srl_size, sig, sig_len)) - << "EpidSign for message_len: " << message_len << " failed"; - EXPECT_EQ(kEpidSigValid, EpidVerify(ctx, sig, sig_len, msg.data(), length)) - << "EpidVerify for message_len: " << message_len << " failed"; - } -} - -TEST_F(EpidMemberTest, SignsLongMessageNoSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - std::vector sig_data(EpidGetSigSize(nullptr)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - VerifierCtxObj ctx(this->kGroupPublicKey); - std::vector msg(1000000); // allocate message for max size - for (size_t n = 0; n < msg.size(); n++) { - msg.at(n) = (uint8_t)n; - } - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - nullptr, 0, sig, sig_len)) - << "EpidSign for message_len: " << 1000000 << " failed"; - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())) - << "EpidVerify for message_len: " << 1000000 << " failed"; -} - -TEST_F(EpidMemberTest, SignsLongMessageWithSigRl) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - SigRl const* srl = - reinterpret_cast(this->kSigRl5EntryData.data()); - size_t srl_size = this->kSigRl5EntryData.size() * sizeof(uint8_t); - std::vector sig_data(EpidGetSigSize(srl)); - EpidSignature* sig = reinterpret_cast(sig_data.data()); - size_t sig_len = sig_data.size() * sizeof(uint8_t); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(ctx, srl, srl_size)); - std::vector msg(1000000); // allocate message for max size - for (size_t n = 0; n < msg.size(); n++) { - msg.at(n) = (uint8_t)n; - } - EXPECT_EQ(kEpidNoErr, EpidSign(member, msg.data(), msg.size(), nullptr, 0, - srl, srl_size, sig, sig_len)) - << "EpidSign for message_len: " << 1000000 << " failed"; - EXPECT_EQ(kEpidSigValid, - EpidVerify(ctx, sig, sig_len, msg.data(), msg.size())) - << "EpidVerify for message_len: " << 1000000 << " failed"; -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/signbasic-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/signbasic-test.cc deleted file mode 100644 index d5f75c8110..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/member/unittests/signbasic-test.cc +++ /dev/null @@ -1,401 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief SignBasic unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/member/api.h" -#include "epid/verifier/api.h" -} - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/prng-testhelper.h" -#include "epid/member/unittests/member-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" - -namespace { - -/// Count of elements in array -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) - -///////////////////////////////////////////////////////////////////////// -// Simple error cases -TEST_F(EpidMemberTest, SignBasicFailsGivenNullParameters) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - BasicSignature basic_sig; - EXPECT_EQ(kEpidBadArgErr, EpidSignBasic(nullptr, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - EXPECT_EQ(kEpidBadArgErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), nullptr)); - EXPECT_EQ(kEpidBadArgErr, EpidSignBasic(member, nullptr, msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - EXPECT_EQ(kEpidBadArgErr, EpidSignBasic(member, msg.data(), msg.size(), - nullptr, bsn.size(), &basic_sig)); -} -TEST_F(EpidMemberTest, SignBasicFailsForBasenameWithoutRegisteredBasenames) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - BasicSignature basic_sig; - EXPECT_EQ(kEpidBadArgErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); -} -TEST_F(EpidMemberTest, SignBasicFailsIfGivenUnregisteredBasename) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn0 = this->kBsn0; - auto& bsn1 = this->kBsn1; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn0.data(), bsn0.size())); - BasicSignature basic_sig; - EXPECT_EQ(kEpidBadArgErr, - EpidSignBasic(member, msg.data(), msg.size(), bsn1.data(), - bsn1.size(), &basic_sig)); -} -///////////////////////////////////////////////////////////////////////// -// Anonymity -TEST_F(EpidMemberTest, BasicSignaturesOfSameMessageAreDifferent) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - BasicSignature basic_sig1; - BasicSignature basic_sig2; - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig1)); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig2)); - EXPECT_NE(0, memcmp(&basic_sig1, &basic_sig2, sizeof(BasicSignature))); -} -TEST_F(EpidMemberTest, - BasicSignaturesOfSameMessageWithSameBasenameAreDifferent) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - BasicSignature basic_sig1; - BasicSignature basic_sig2; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig1)); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig2)); - EXPECT_NE(0, memcmp(&basic_sig1, &basic_sig2, sizeof(BasicSignature))); -} -///////////////////////////////////////////////////////////////////////// -// Variable basename -TEST_F(EpidMemberTest, SignBasicSucceedsUsingRandomBase) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - BasicSignature basic_sig; - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, SignBasicSucceedsUsingBasename) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - BasicSignature basic_sig; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, SignBasicSucceedsUsingBasenameUsingIKGFData) { - Prng my_prng; - GroupPubKey grp_public_key = *reinterpret_cast( - this->kGroupPublicKeyDataIkgf.data()); - PrivKey mbr_private_key = - *reinterpret_cast(this->kMemberPrivateKeyDataIkgf.data()); - MemberCtxObj member(grp_public_key, mbr_private_key, &Prng::Generate, - &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - BasicSignature basic_sig; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(grp_public_key); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, - SignBasicSucceedsUsingRandomBaseWithRegisteredBasenames) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - BasicSignature basic_sig; - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, - SignBasicSucceedsUsingRandomBaseWithoutRegisteredBasenames) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - BasicSignature basic_sig; - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -///////////////////////////////////////////////////////////////////////// -// Variable hash alg -TEST_F(EpidMemberTest, SignBasicSucceedsUsingSha256HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - BasicSignature basic_sig; - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha256)); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha256)); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, SignBasicSucceedsUsingSha384HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - BasicSignature basic_sig; - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha384)); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha384)); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, SignBasicSucceedsUsingSha512HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - BasicSignature basic_sig; - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha512)); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha512)); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, DISABLED_SignBasicSucceedsUsingSha512256HashAlg) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - BasicSignature basic_sig; - THROW_ON_EPIDERR(EpidMemberSetHashAlg(member, kSha512_256)); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha512_256)); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -///////////////////////////////////////////////////////////////////////// -TEST_F(EpidMemberTest, SignBasicFailsForInvalidMemberPrecomp) { - Prng my_prng; - MemberPrecomp mbr_precomp = this->kMemberPrecomp; - mbr_precomp.e12.x[0].data.data[0]++; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - mbr_precomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - BasicSignature basic_sig; - auto& bsn = this->kBsn0; - EXPECT_EQ(kEpidBadArgErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); -} -// Variable precomputed signatures -TEST_F(EpidMemberTest, SignBasicFailsForInvalidPrecomputedSignature) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - PreComputedSignature precompsig = this->kPrecomputedSignatures[0]; - precompsig.B.x.data.data[0]++; - THROW_ON_EPIDERR(EpidAddPreSigs(member, 1, &precompsig)); - auto& msg = this->kMsg0; - BasicSignature basic_sig; - auto& bsn = this->kBsn0; - EXPECT_EQ(kEpidBadArgErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); -} -TEST_F(EpidMemberTest, SignBasicConsumesPrecomputedSignatures) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - THROW_ON_EPIDERR(EpidAddPreSigs(member, 3, nullptr)); - auto& msg = this->kMsg0; - BasicSignature basic_sig; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - // use 1 precomputed signature - ASSERT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - EXPECT_EQ((size_t)2, EpidGetNumPreSigs(member)); -} -TEST_F(EpidMemberTest, SignBasicSucceedsWithPrecomputedSignatures) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - THROW_ON_EPIDERR(EpidAddPreSigs(member, 1, nullptr)); - auto& msg = this->kMsg0; - BasicSignature basic_sig; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -TEST_F(EpidMemberTest, SignBasicSucceedsWithoutPrecomputedSignatures) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - THROW_ON_EPIDERR(EpidAddPreSigs(member, 1, nullptr)); - auto& msg = this->kMsg0; - BasicSignature basic_sig; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - ASSERT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // test sign without precomputed signatures - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), - bsn.data(), bsn.size(), &basic_sig)); - // verify basic signature - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())); -} -///////////////////////////////////////////////////////////////////////// -// Variable messages -TEST_F(EpidMemberTest, SignBasicSucceedsGivenEmptyMessage) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidRegisterBaseName(member, bsn.data(), bsn.size())); - BasicSignature basic_sig; - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), 0, bsn.data(), - bsn.size(), &basic_sig)); - VerifierCtxObj ctx(this->kGroupPublicKey); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), 0)); -} -TEST_F(EpidMemberTest, SignBasicSucceedsWithShortMessage) { - // check: 1, 13, 128, 256, 512, 1021, 1024 bytes - // 13 and 1021 are primes - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - BasicSignature basic_sig; - VerifierCtxObj ctx(this->kGroupPublicKey); - size_t lengths[] = {1, 13, 128, 256, - 512, 1021, 1024}; // have desired lengths to loop over - std::vector msg( - lengths[COUNT_OF(lengths) - 1]); // allocate message for max size - for (size_t n = 0; n < msg.size(); n++) { - msg.at(n) = (uint8_t)n; - } - for (auto length : lengths) { - EXPECT_EQ(kEpidNoErr, - EpidSignBasic(member, msg.data(), length, nullptr, 0, &basic_sig)) - << "EpidSignBasic for message_len: " << length << " failed"; - EXPECT_EQ(kEpidNoErr, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), length)) - << "EpidVerifyBasicSig for message_len: " << length << " failed"; - } -} -TEST_F(EpidMemberTest, SignBasicSucceedsWithLongMessage) { - Prng my_prng; - MemberCtxObj member(this->kGroupPublicKey, this->kMemberPrivateKey, - this->kMemberPrecomp, &Prng::Generate, &my_prng); - BasicSignature basic_sig; - VerifierCtxObj ctx(this->kGroupPublicKey); - { // 1000000 - std::vector msg(1000000); // allocate message for max size - for (size_t n = 0; n < msg.size(); n++) { - msg.at(n) = (uint8_t)n; - } - EXPECT_EQ(kEpidNoErr, EpidSignBasic(member, msg.data(), msg.size(), nullptr, - 0, &basic_sig)) - << "EpidSignBasic for message_len: " << 1000000 << " failed"; - EXPECT_EQ(kEpidNoErr, - EpidVerifyBasicSig(ctx, &basic_sig, msg.data(), msg.size())) - << "EpidVerifyBasicSig for message_len: " << 1000000 << " failed"; - } -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/api.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/api.h deleted file mode 100644 index 415ee3988a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/api.h +++ /dev/null @@ -1,501 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_VERIFIER_1_1_API_H_ -#define EPID_VERIFIER_1_1_API_H_ - -#include -#include "epid/common/stdtypes.h" -#include "epid/common/1.1/types.h" -#include "epid/common/errors.h" -#include "epid/verifier/api.h" - -#ifdef __cplusplus -extern "C"{ -#endif - -/*! - * \file - * \brief Intel(R) EPID SDK verifier Intel(R) EPID 1.1 API. - */ - -/// Intel(R) EPID 1.1 Verifier functionality -/*! - \defgroup Epid11VerifierModule EPID 1.1 support - - To verify signatures coming from member devices that belong to an - Intel® EPID 1.1 group, you need to use Intel® EPID 1.1 - verifier APIs. - - If you are acting as a verifier for both Intel® EPID 1.1 and 2.0 - members, you can determine if you need version 1.1 or 2.0 - verification by checking the Intel® EPID version field in the - group public key file (see ::EpidParseFileHeader). You can also - check the version in other binary issuer material, such as the - GroupRL and SigRL. - - The 1.1 verifier APIs take a verifier context as input. Each - verifier context (::Epid11VerifierCtx) represents a verifier for a - single group. - - The Intel® EPID 1.1 specification does not provide hash algorithm - selection and verifier blacklist revocation. Therefore, APIs such as - ::EpidVerifierSetHashAlg and ::EpidVerifierSetVerifierRl are not - available. - - You can find the Intel® EPID 1.1 API headers in the 1.1 - directories, for example, `epid/verifier/1.1/api.h`. - - Intel® EPID 1.1 APIs and data structures are indicated with the - "Epid11" prefix. For example, the Intel® EPID 1.1 version of - ::EpidParseGroupPubKeyFile is called ::Epid11ParseGroupPubKeyFile, - and the Intel® EPID 1.1 version of `GroupRl` is `Epid11GroupRl`. - - \ingroup EpidVerifierModule - @{ -*/ - -/// Internal context of Intel(R) EPID 1.1 verifier. -typedef struct Epid11VerifierCtx Epid11VerifierCtx; - -/// Intel(R) EPID 1.1 Pre-computed verifier settings. -/*! - Serialized form of the information about a verifier that remains stable for - a given set of keys. - - This API supports Intel(R) EPID 1.1 verification. - - \note e12 = 0 implies that this data is not valid - \see EPID 1.1 -support - */ -#pragma pack(1) -typedef struct Epid11VerifierPrecomp { - Epid11GroupId gid; ///< group ID - Epid11GtElemStr e12; ///< an element in GT - Epid11GtElemStr e22; ///< an element in GT - Epid11GtElemStr e2w; ///< an element in GT -} Epid11VerifierPrecomp; -#pragma pack() - -/// Creates a new Intel(R) EPID 1.1 verifier context. -/*! - Must be called to create the verifier context that is used by - other "Verifier" APIs. - - Allocates memory for the context, then initialize it. - - Epid11VerifierDelete() must be called to safely release the member context. - - \param[in] pub_key - The group certificate. - \param[in] precomp - Optional pre-computed data. If NULL the value is computed internally and is - readable using Epid11VerifierWritePrecomp(). - \param[out] ctx - Newly constructed verifier context. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the content of ctx is undefined. - - \see Epid11VerifierDelete - \see Epid11VerifierWritePrecomp - \see EPID 1.1 -support - */ -EpidStatus Epid11VerifierCreate(Epid11GroupPubKey const* pub_key, - Epid11VerifierPrecomp const* precomp, - Epid11VerifierCtx** ctx); - -/// Deletes an existing Intel(R) EPID 1.1 verifier context. -/*! - Must be called to safely release a verifier context created using - Epid11VerifierCreate(). - - De-initializes the context, frees memory used by the context, and sets the - context pointer to NULL. - - \param[in,out] ctx - The verifier context. Can be NULL. - - \see Epid11VerifierCreate - \see EPID 1.1 -support - */ -void Epid11VerifierDelete(Epid11VerifierCtx** ctx); - -/// Serializes the pre-computed Intel(R) EPID 1.1 verifier settings. -/*! - - \param[in] ctx - The verifier context. - \param[out] precomp - The Serialized pre-computed verifier settings. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the content of precomp is undefined. - - \see EPID 1.1 -support - */ -EpidStatus Epid11VerifierWritePrecomp(Epid11VerifierCtx const* ctx, - Epid11VerifierPrecomp* precomp); - -/// Sets the Intel(R) EPID 1.1 private key based revocation list. -/*! - The caller is responsible to for ensuring the revocation list is authorized, - e.g signed by the issuer. The caller is also responsible checking the version - of the revocation list. The call will fail if trying to set an older version - of the revocation list than was last set. - - This API supports Intel(R) EPID 1.1 verification. - - \attention - The memory pointed to by priv_rl will be accessed directly by the verifier - until a new list is set or the verifier is destroyed. Do not modify the - contents of this memory. The behavior of subsequent operations that rely on - the revocation list will be undefined if the memory is modified. - - \attention - It is the responsibility of the caller to free the memory pointed to by priv_rl - after the verifier is no longer using it. - - \param[in,out] ctx - The verifier context. - \param[in] priv_rl - The private key based revocation list. - \param[in] priv_rl_size - The size of the private key based revocation list in bytes. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the private key based revocation list - pointed to by the verifier is undefined. - - \see Epid11VerifierCreate - \see EPID 1.1 -support - */ -EpidStatus Epid11VerifierSetPrivRl(Epid11VerifierCtx* ctx, - Epid11PrivRl const* priv_rl, - size_t priv_rl_size); - -/// Sets the Intel(R) EPID 1.1 signature based revocation list. -/*! - The caller is responsible to for ensuring the revocation list is authorized, - e.g signed by the issuer. The caller is also responsible checking the version - of the revocation list. The call will fail if trying to set an older version - of the revocation list than was last set. - - This API supports Intel(R) EPID 1.1 verification. - - \attention - The memory pointed to by sig_rl will be accessed directly by the verifier - until a new list is set or the verifier is destroyed. Do not modify the - contents of this memory. The behavior of subsequent operations that rely on - the revocation list will be undefined if the memory is modified. - - \attention - It is the responsibility of the caller to free the memory pointed to by sig_rl - after the verifier is no longer using it. - - \param[in,out] ctx - The verifier context. - \param[in] sig_rl - The signature based revocation list. - \param[in] sig_rl_size - The size of the signature based revocation list in bytes. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the signature based revocation list pointed - to by the verifier is undefined. - - \see Epid11VerifierCreate - \see SdkOverview_11Verifier \see EPID 1.1 - support - */ -EpidStatus Epid11VerifierSetSigRl(Epid11VerifierCtx* ctx, - Epid11SigRl const* sig_rl, - size_t sig_rl_size); - -/// Sets the Intel(R) EPID 1.1 group based revocation list. -/*! - The caller is responsible to for ensuring the revocation list is authorized, - e.g signed by the issuer. The caller is also responsible checking the version - of the revocation list. The call will fail if trying to set an older version - of the revocation list than was last set. - - This API supports Intel(R) EPID 1.1 verification. - - \attention - The memory pointed to by grp_rl will be accessed directly by the verifier - until a new list is set or the verifier is destroyed. Do not modify the - contents of this memory. The behavior of subsequent operations that rely on - the revocation list will be undefined if the memory is modified. - - \attention - It is the responsibility of the caller to free the memory pointed to by grp_rl - after the verifier is no longer using it. - - \param[in,out] ctx - The verifier context. - \param[in] grp_rl - The group based revocation list. - \param[in] grp_rl_size - The size of the group based revocation list in bytes. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the group based revocation list pointed - to by the verifier is undefined. - - \see Epid11VerifierCreate - \see EPID 1.1 -support - */ -EpidStatus Epid11VerifierSetGroupRl(Epid11VerifierCtx* ctx, - Epid11GroupRl const* grp_rl, - size_t grp_rl_size); - -/// Sets the basename to be used by a verifier. -/*! - This API allows setting a zero length base name. - - \warning - Not all members in the Intel(R) EPID 1.1 ecosystem may support zero length - basenames. They may interpret a zero length basename as random base. - - \param[in, out] ctx - The verifier context. - \param[in] basename - The basename. Pass NULL for random base. - \param[in] basename_len - Number of bytes in basename buffer. Must be 0 if basename is NULL. - - \returns ::EpidStatus - - \see Epid11VerifierCreate - -*/ -EpidStatus Epid11VerifierSetBasename(Epid11VerifierCtx* ctx, - void const* basename, size_t basename_len); - -/// Verifies an Intel(R) EPID 1.1 signature and checks revocation status. -/*! - - \param[in] ctx - The verifier context. - \param[in] sig - The signature. - \param[in] sig_len - The size of sig in bytes. - \param[in] msg - The message that was signed. - \param[in] msg_len - The size of msg in bytes. - - \returns ::EpidStatus - - \retval ::kEpidSigValid - Signature validated successfully - \retval ::kEpidSigInvalid - Signature is invalid - \retval ::kEpidSigRevokedInGroupRl - Signature revoked in GroupRl - \retval ::kEpidSigRevokedInPrivRl - Signature revoked in PrivRl - \retval ::kEpidSigRevokedInSigRl - Signature revoked in SigRl - - \note - If the result is not ::kEpidNoErr or one of the values listed above the - verify should de considered to have failed. - - \see Epid11VerifierCreate - \see EPID 1.1 -support - */ -EpidStatus Epid11Verify(Epid11VerifierCtx const* ctx, - Epid11Signature const* sig, size_t sig_len, - void const* msg, size_t msg_len); - -/// Determines if two Intel(R) EPID 1.1 signatures are linked. -/*! - The Intel(R) EPID scheme allows signatures to be linked. If basename - option is specified when signing signatures with the same basename will be - linkable. This linking capability allows the verifier, or anyone, to know - whether two Intel(R) EPID signatures are generated by the same member. - - This API supports Intel(R) EPID 1.1 verification. - - \param[in] sig1 - A basic signature. - \param[in] sig2 - A basic signature. - - \result bool - - \retval true - if the signatures were generated by the same member - \retval false - if it couldn't be determined if the signatures were generated by - the same member - - \note - The input signatures should be verified using Epid11VerifyBasicSig() before - invocation. Behavior is undefined if either of the signatures cannot be - verified. - - \see Epid11VerifyBasicSig - \see EPID 1.1 -support - */ -bool Epid11AreSigsLinked(Epid11BasicSignature const* sig1, - Epid11BasicSignature const* sig2); - -/// Verifies an Intel(R) EPID 1.1 member signature without revocation checks. -/*! - Used in constrained environments where, due to limited memory, it may not - be possible to process through a large and potentially unbounded revocation - list. - - \param[in] ctx - The verifier context. - \param[in] sig - The basic signature. - \param[in] msg - The message that was signed. - \param[in] msg_len - The size of msg in bytes. - - \returns ::EpidStatus - - \note - This function should be used in conjunction with Epid11NrVerify() and - Epid11CheckPrivRlEntry(). - - \note - If the result is not ::kEpidNoErr the verify should be considered to have - failed. - - \see Epid11VerifierCreate - \see EPID 1.1 -support - */ -EpidStatus Epid11VerifyBasicSig(Epid11VerifierCtx const* ctx, - Epid11BasicSignature const* sig, - void const* msg, size_t msg_len); - -/// Verifies the non-revoked proof for a single Intel(R) EPID 1.1 signature -/// based revocation list entry. -/*! - Used in constrained environments where, due to limited memory, it may not - be possible to process through a large and potentially unbounded revocation - list. - - This API supports Intel(R) EPID 1.1 verification. - - \param[in] ctx - The verifier context. - \param[in] sig - The basic signature. - \param[in] msg - The message that was signed. - \param[in] msg_len - The size of msg in bytes. - \param[in] sigrl_entry - The signature based revocation list entry. - \param[in] proof - The non-revoked proof. - - \returns ::EpidStatus - - \note - Sig should be verified using Epid11VerifyBasicSig() before invocation. Behavior - is undefined if sig cannot be verified. - - \note - This function should be used in conjunction with Epid11VerifyBasicSig() and - Epid11CheckPrivRlEntry(). - - \note - If the result is not ::kEpidNoErr the verify should de considered to have - failed. - - \see Epid11VerifierCreate - \see Epid11VerifyBasicSig - \see Epid11CheckPrivRlEntry - \see EPID 1.1 -support - */ -EpidStatus Epid11NrVerify(Epid11VerifierCtx const* ctx, - Epid11BasicSignature const* sig, void const* msg, - size_t msg_len, Epid11SigRlEntry const* sigrl_entry, - Epid11NrProof const* proof); - -/// Verifies an Intel(R) EPID 1.1 signature has not been revoked in the -/// private key based revocation list. -/*! - Used in constrained environments where, due to limited memory, it may not - be possible to process through a large and potentially unbounded revocation - list. - - This API supports Intel(R) EPID 1.1 verification. - - \param[in] ctx - The verifier context. - \param[in] sig - The basic signature. - \param[in] f - The private key based revocation list entry. - - \note - Sig should be verified using Epid11VerifyBasicSig() before invocation. Behavior - is undefined if sig cannot be verified. - - \note - This function should be used in conjunction with Epid11NrVerify() and - Epid11VerifyBasicSig(). - - \note - If the result is not ::kEpidNoErr the verify should de considered to have - failed. - - \returns ::EpidStatus - \see Epid11VerifierCreate - \see Epid11NrVerify - \see Epid11VerifyBasicSig - \see EPID 1.1 -support - */ -EpidStatus Epid11CheckPrivRlEntry(Epid11VerifierCtx const* ctx, - Epid11BasicSignature const* sig, - FpElemStr const* f); - -#ifdef __cplusplus -}; -#endif - -/*! @} */ -#endif // EPID_VERIFIER_1_1_API_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/check_privrl_entry.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/check_privrl_entry.c deleted file mode 100644 index 1b56ca7916..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/check_privrl_entry.c +++ /dev/null @@ -1,90 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Epid11CheckPrivRlEntry implementation. -*/ - -#include "epid/verifier/1.1/api.h" -#include "epid/verifier/1.1/src/context.h" -EpidStatus Epid11CheckPrivRlEntry(Epid11VerifierCtx const* ctx, - Epid11BasicSignature const* sig, - FpElemStr const* f) { - EpidStatus result = kEpidErr; - EcPoint* b = NULL; - EcPoint* k = NULL; - EcPoint* t5 = NULL; - EcGroup* G3 = NULL; - if (!ctx || !sig || !f) { - return kEpidBadArgErr; - } - if (!ctx->epid11_params || !ctx->epid11_params->G3) { - return kEpidBadArgErr; - } - do { - // Section 4.1.2 Step 31. The verifier computes t5 = G3.exp(B, f) - // and verifies that G3.isEqual(t5, K) = false - bool compare_result = false; - G3 = ctx->epid11_params->G3; - result = NewEcPoint(G3, &b); - if (kEpidNoErr != result) { - result = kEpidMathErr; - break; - } - result = NewEcPoint(G3, &k); - if (kEpidNoErr != result) { - result = kEpidMathErr; - break; - } - result = NewEcPoint(G3, &t5); - if (kEpidNoErr != result) { - result = kEpidMathErr; - break; - } - result = ReadEcPoint(G3, &sig->B, sizeof(sig->B), b); - if (kEpidNoErr != result) { - result = kEpidMathErr; - break; - } - result = ReadEcPoint(G3, &sig->K, sizeof(sig->K), k); - if (kEpidNoErr != result) { - result = kEpidMathErr; - break; - } - result = EcExp(G3, b, (BigNumStr const*)f, t5); - if (kEpidNoErr != result) { - result = kEpidMathErr; - break; - } - result = EcIsEqual(G3, t5, k, &compare_result); - if (kEpidNoErr != result) { - result = kEpidMathErr; - break; - } - // if t5 == k, sig revoked in PrivRl - if (compare_result) { - result = kEpidSigRevokedInPrivRl; - } else { - result = kEpidNoErr; - } - } while (0); - - DeleteEcPoint(&t5); - DeleteEcPoint(&k); - DeleteEcPoint(&b); - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/context.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/context.c deleted file mode 100644 index 2ecae206e5..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/context.c +++ /dev/null @@ -1,450 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Intel EPID 1.1 Verifier context implementation. -*/ - -#include "epid/verifier/1.1/api.h" -#include "epid/verifier/1.1/src/context.h" -#include "epid/common/src/memory.h" -#include "epid/common/src/endian_convert.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -/// create Verifier precomp of the Epid11VerifierCtx -static EpidStatus DoPrecomputation(Epid11VerifierCtx* ctx); - -/// Read Verifier precomp -static EpidStatus ReadPrecomputation(Epid11VerifierPrecomp const* precomp_str, - Epid11VerifierCtx* ctx); - -/// Internal function to prove if group based revocation list is valid -static bool Epid11IsGroupRlValid(Epid11GroupRl const* group_rl, - size_t grp_rl_size) { - const size_t kMinGroupRlSize = sizeof(Epid11GroupRl) - sizeof(Epid11GroupId); - size_t input_grp_rl_size = 0; - - if (!group_rl) { - return false; - } - if (grp_rl_size < kMinGroupRlSize) { - return false; - } - if (ntohl(group_rl->n3) > - (SIZE_MAX - kMinGroupRlSize) / sizeof(Epid11GroupId)) { - return false; - } - input_grp_rl_size = - kMinGroupRlSize + (ntohl(group_rl->n3) * sizeof(Epid11GroupId)); - if (input_grp_rl_size != grp_rl_size) { - return false; - } - return true; -} -/// Internal function to prove if signature based revocation list is valid -bool Epid11IsSigRlValid(Epid11GroupId const* gid, Epid11SigRl const* sig_rl, - size_t sig_rl_size) { - const size_t kMinSigRlSize = sizeof(Epid11SigRl) - sizeof(Epid11SigRlEntry); - size_t input_sig_rl_size = 0; - if (!gid || !sig_rl || kMinSigRlSize > sig_rl_size) { - return false; - } - if (ntohl(sig_rl->n2) > (SIZE_MAX - kMinSigRlSize) / sizeof(sig_rl->bk[0])) { - return false; - } - // sanity check of intput SigRl size - input_sig_rl_size = kMinSigRlSize + ntohl(sig_rl->n2) * sizeof(sig_rl->bk[0]); - if (input_sig_rl_size != sig_rl_size) { - return false; - } - // verify that gid given and gid in SigRl match - if (0 != memcmp(gid, &sig_rl->gid, sizeof(*gid))) { - return false; - } - return true; -} -/// Internal function to verify if Intel(R) EPID 1.1 private key based -/// revocation list is valid -static bool IsEpid11PrivRlValid(Epid11GroupId const* gid, - Epid11PrivRl const* priv_rl, - size_t priv_rl_size) { - const size_t kMinPrivRlSize = sizeof(Epid11PrivRl) - sizeof(FpElemStr); - size_t input_priv_rl_size = 0; - - if (!gid || !priv_rl || kMinPrivRlSize > priv_rl_size) { - return false; - } - if (ntohl(priv_rl->n1) > - (SIZE_MAX - kMinPrivRlSize) / sizeof(priv_rl->f[0])) { - return false; - } - // sanity check of input Epid11PrivRl size - input_priv_rl_size = - kMinPrivRlSize + ntohl(priv_rl->n1) * sizeof(priv_rl->f[0]); - if (input_priv_rl_size != priv_rl_size) { - return false; - } - // verify that gid given and gid in Epid11PrivRl match - if (0 != memcmp(gid, &priv_rl->gid, sizeof(*gid))) { - return false; - } - return true; -} - -EpidStatus Epid11VerifierCreate(Epid11GroupPubKey const* pub_key, - Epid11VerifierPrecomp const* precomp, - Epid11VerifierCtx** ctx) { - EpidStatus result = kEpidErr; - Epid11VerifierCtx* verifier_ctx = NULL; - if (!pub_key || !ctx) { - return kEpidBadArgErr; - } - do { - // Allocate memory for VerifierCtx - verifier_ctx = SAFE_ALLOC(sizeof(Epid11VerifierCtx)); - if (!verifier_ctx) { - result = kEpidMemAllocErr; - break; - } - - // Internal representation of Epid11Params - result = CreateEpid11Params(&verifier_ctx->epid11_params); - BREAK_ON_EPID_ERROR(result); - // Internal representation of Group Pub Key - result = CreateEpid11GroupPubKey(pub_key, verifier_ctx->epid11_params->G1, - verifier_ctx->epid11_params->G2, - &verifier_ctx->pub_key); - BREAK_ON_EPID_ERROR(result); - // Store group public key strings for later use - result = - SetKeySpecificEpid11CommitValues(pub_key, &verifier_ctx->commit_values); - if (kEpidNoErr != result) { - break; - } - // Allocate verifier_ctx->e12 - result = NewFfElement(verifier_ctx->epid11_params->GT, &verifier_ctx->e12); - BREAK_ON_EPID_ERROR(result); - // Allocate verifier_ctx->e22 - result = NewFfElement(verifier_ctx->epid11_params->GT, &verifier_ctx->e22); - BREAK_ON_EPID_ERROR(result); - // Allocate verifier_ctx->e2w - result = NewFfElement(verifier_ctx->epid11_params->GT, &verifier_ctx->e2w); - BREAK_ON_EPID_ERROR(result); - // precomputation - if (precomp != NULL) { - result = ReadPrecomputation(precomp, verifier_ctx); - } else { - result = DoPrecomputation(verifier_ctx); - } - BREAK_ON_EPID_ERROR(result); - verifier_ctx->sig_rl = NULL; - verifier_ctx->group_rl = NULL; - verifier_ctx->priv_rl = NULL; - *ctx = verifier_ctx; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result && verifier_ctx) { - DeleteFfElement(&verifier_ctx->e2w); - DeleteFfElement(&verifier_ctx->e22); - DeleteFfElement(&verifier_ctx->e12); - DeleteEpid11GroupPubKey(&verifier_ctx->pub_key); - DeleteEpid11Params(&verifier_ctx->epid11_params); - SAFE_FREE(verifier_ctx); - } - return result; -} - -void Epid11VerifierDelete(Epid11VerifierCtx** ctx) { - if (ctx && *ctx) { - DeleteFfElement(&(*ctx)->e2w); - DeleteFfElement(&(*ctx)->e22); - DeleteFfElement(&(*ctx)->e12); - DeleteEpid11GroupPubKey(&(*ctx)->pub_key); - DeleteEpid11Params(&(*ctx)->epid11_params); - (*ctx)->priv_rl = NULL; - (*ctx)->sig_rl = NULL; - (*ctx)->group_rl = NULL; - DeleteEcPoint(&(*ctx)->basename_hash); - SAFE_FREE((*ctx)->basename); - (*ctx)->basename_len = 0; - SAFE_FREE(*ctx); - } -} - -EpidStatus Epid11VerifierWritePrecomp(Epid11VerifierCtx const* ctx, - Epid11VerifierPrecomp* precomp) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; // an element in GT - FfElement* e22 = NULL; // an element in GT - FfElement* e2w = NULL; // an element in GT - FiniteField* GT = NULL; // Finite field GT(Fq6) - if (!ctx || !ctx->e12 || !ctx->e22 || !ctx->e2w || !ctx->epid11_params || - !(ctx->epid11_params->GT) || !ctx->pub_key || !precomp) { - return kEpidBadArgErr; - } - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - GT = ctx->epid11_params->GT; - - precomp->gid = ctx->pub_key->gid; - result = WriteFfElement(GT, e12, &(precomp->e12), sizeof(precomp->e12)); - if (kEpidNoErr != result) { - return result; - } - result = WriteFfElement(GT, e22, &(precomp->e22), sizeof(precomp->e22)); - if (kEpidNoErr != result) { - return result; - } - result = WriteFfElement(GT, e2w, &(precomp->e2w), sizeof(precomp->e2w)); - if (kEpidNoErr != result) { - return result; - } - return result; -} - -EpidStatus Epid11VerifierSetPrivRl(Epid11VerifierCtx* ctx, - Epid11PrivRl const* priv_rl, - size_t priv_rl_size) { - if (!ctx || !priv_rl || !ctx->pub_key) { - return kEpidBadArgErr; - } - if (!IsEpid11PrivRlValid(&ctx->pub_key->gid, priv_rl, priv_rl_size)) { - return kEpidBadArgErr; - } - // Do not set an older version of Epid11PrivRl - if (ctx->priv_rl) { - unsigned int current_ver = 0; - unsigned int incoming_ver = 0; - current_ver = ntohl(ctx->priv_rl->version); - incoming_ver = ntohl(priv_rl->version); - if (current_ver >= incoming_ver) { - return kEpidBadArgErr; - } - } - ctx->priv_rl = priv_rl; - return kEpidNoErr; -} - -EpidStatus Epid11VerifierSetSigRl(Epid11VerifierCtx* ctx, - Epid11SigRl const* sig_rl, - size_t sig_rl_size) { - if (!ctx || !sig_rl || !ctx->pub_key) { - return kEpidBadArgErr; - } - // Do not set an older version of sig rl - if (ctx->sig_rl) { - unsigned int current_ver = 0; - unsigned int incoming_ver = 0; - current_ver = ntohl(ctx->sig_rl->version); - incoming_ver = ntohl(sig_rl->version); - if (current_ver >= incoming_ver) { - return kEpidBadArgErr; - } - } - if (!Epid11IsSigRlValid(&ctx->pub_key->gid, sig_rl, sig_rl_size)) { - return kEpidBadArgErr; - } - ctx->sig_rl = sig_rl; - - return kEpidNoErr; -} - -EpidStatus Epid11VerifierSetGroupRl(Epid11VerifierCtx* ctx, - Epid11GroupRl const* grp_rl, - size_t grp_rl_size) { - if (!ctx || !grp_rl || !ctx->pub_key) { - return kEpidBadArgErr; - } - if (!Epid11IsGroupRlValid(grp_rl, grp_rl_size)) { - return kEpidBadArgErr; - } - // Do not set an older version of group rl - if (ctx->group_rl) { - unsigned int current_ver = 0; - unsigned int incoming_ver = 0; - current_ver = ntohl(ctx->group_rl->version); - incoming_ver = ntohl(grp_rl->version); - if (current_ver >= incoming_ver) { - return kEpidBadArgErr; - } - } - ctx->group_rl = grp_rl; - - return kEpidNoErr; -} - -EpidStatus Epid11VerifierSetBasename(Epid11VerifierCtx* ctx, - void const* basename, - size_t basename_len) { - EpidStatus result = kEpidErr; - EcPoint* basename_hash = NULL; - uint8_t* basename_buffer = NULL; - - if (!ctx || !ctx->epid11_params || !ctx->epid11_params->G3) { - return kEpidBadArgErr; - } - if (!basename && basename_len > 0) { - return kEpidBadArgErr; - } - - if (!basename) { - ctx->basename_len = 0; - DeleteEcPoint(&ctx->basename_hash); - SAFE_FREE(ctx->basename); - return kEpidNoErr; - } - - do { - EcGroup* G3 = ctx->epid11_params->G3; - result = NewEcPoint(G3, &basename_hash); - if (kEpidNoErr != result) { - break; - } - - result = Epid11EcHash(G3, basename, basename_len, basename_hash); - if (kEpidNoErr != result) { - break; - } - - if (basename_len > 0) { - basename_buffer = SAFE_ALLOC(basename_len); - if (!basename_buffer) { - result = kEpidMemAllocErr; - break; - } - } - - ctx->basename_len = basename_len; - - if (basename_len > 0) { - // memcpy is used to copy variable length basename - if (0 != memcpy_S(basename_buffer, ctx->basename_len, basename, - basename_len)) { - result = kEpidErr; - break; - } - } - DeleteEcPoint(&ctx->basename_hash); - SAFE_FREE(ctx->basename); - ctx->basename = basename_buffer; - ctx->basename_hash = basename_hash; - - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result) { - DeleteEcPoint(&basename_hash); - SAFE_FREE(basename_buffer); - } - return result; -} - -static EpidStatus DoPrecomputation(Epid11VerifierCtx* ctx) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; - FfElement* e22 = NULL; - FfElement* e2w = NULL; - Epid11Params_* params = NULL; - Epid11GroupPubKey_* pub_key = NULL; - Epid11PairingState* ps_ctx = NULL; - if (!ctx) { - return kEpidBadArgErr; - } - if (!ctx->epid11_params || !ctx->epid11_params->GT || - !ctx->epid11_params->pairing_state || !ctx->pub_key || !ctx->e12 || - !ctx->e22 || !ctx->e2w) { - return kEpidBadArgErr; - } - pub_key = ctx->pub_key; - params = ctx->epid11_params; - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - ps_ctx = params->pairing_state; - // do precomputation - // 1. The verifier computes e12 = pairing(h1, g2). - result = Epid11Pairing(ps_ctx, pub_key->h1, params->g2, e12); - if (kEpidNoErr != result) { - return result; - } - // 2. The verifier computes e22 = pairing(h2, g2). - result = Epid11Pairing(ps_ctx, pub_key->h2, params->g2, e22); - if (kEpidNoErr != result) { - return result; - } - // 3. The verifier computes e2w = pairing(h2, w). - result = Epid11Pairing(ps_ctx, pub_key->h2, pub_key->w, e2w); - if (kEpidNoErr != result) { - return result; - } - return kEpidNoErr; -} -static EpidStatus ReadPrecomputation(Epid11VerifierPrecomp const* precomp_str, - Epid11VerifierCtx* ctx) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; - FfElement* e22 = NULL; - FfElement* e2w = NULL; - FiniteField* GT = NULL; - Epid11Params_* params = NULL; - unsigned int current_gid = 0; - unsigned int incoming_gid = 0; - if (!ctx) { - return kEpidBadArgErr; - } - if (!ctx->epid11_params || !ctx->epid11_params->GT || !ctx->e12 || - !ctx->e22 || !ctx->e2w) { - return kEpidBadArgErr; - } - - if (!ctx->pub_key || !precomp_str) return kEpidBadArgErr; - - current_gid = ntohl(ctx->pub_key->gid); - incoming_gid = ntohl(precomp_str->gid); - - if (current_gid != incoming_gid) { - return kEpidBadArgErr; - } - - params = ctx->epid11_params; - GT = params->GT; - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - - result = ReadFfElement(GT, &precomp_str->e12, sizeof(precomp_str->e12), e12); - if (kEpidNoErr != result) { - return result; - } - result = ReadFfElement(GT, &precomp_str->e22, sizeof(precomp_str->e22), e22); - if (kEpidNoErr != result) { - return result; - } - result = ReadFfElement(GT, &precomp_str->e2w, sizeof(precomp_str->e2w), e2w); - if (kEpidNoErr != result) { - return result; - } - return kEpidNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/context.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/context.h deleted file mode 100644 index 62663cbd1b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/context.h +++ /dev/null @@ -1,47 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_VERIFIER_1_1_SRC_CONTEXT_H_ -#define EPID_VERIFIER_1_1_SRC_CONTEXT_H_ -/*! - * \file - * \brief Intel(R) EPID 1.1 Verifier context interface. - */ -#include "epid/common/1.1/src/grouppubkey.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/1.1/src/epid11params.h" -#include "epid/common/1.1/src/commitment.h" - -/// Verifier context definition -struct Epid11VerifierCtx { - Epid11GroupPubKey_* pub_key; ///< Group public key - /// Verifier pre-computation - FfElement* e12; ///< an element in GT - FfElement* e22; ///< an element in GT - FfElement* e2w; ///< an element in GT - /// Revocation lists - Epid11PrivRl const* priv_rl; ///< Private key based RL - not owned - Epid11SigRl const* sig_rl; ///< Signature based RL - not owned - Epid11GroupRl const* group_rl; ///< Group RL - not owned - - Epid11Params_* epid11_params; ///< Intel(R) EPID 1.1 params - Epid11CommitValues commit_values; ///< Hashed values to create commitment - uint8_t* basename; ///< Basename to use - NULL for random base - size_t basename_len; ///< Number of bytes in basename - EcPoint* basename_hash; ///< Epid11EcHash of the basename -}; - -#endif // EPID_VERIFIER_1_1_SRC_CONTEXT_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/nrverify.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/nrverify.c deleted file mode 100644 index a52e5f4c53..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/nrverify.c +++ /dev/null @@ -1,253 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Epid11NrVerify implementation. -*/ -#include "ext/ipp/include/ippcp.h" -#include "epid/common/src/memory.h" -#include "epid/verifier/1.1/api.h" -#include "epid/verifier/1.1/src/context.h" -#include "epid/common/src/endian_convert.h" -#include "epid/common/math/hash.h" -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } -/// Count of elements in array -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) -#pragma pack(1) -/// Storage for values to create commitment in NrVerify algorithm -typedef struct Epid11NrVerifyCommitValues { - BigNumStr p_tick; //!< A large prime (256-bit) - Epid11G3ElemStr g3; //!< Generator of G3 (512-bit) - Epid11G3ElemStr B; //!< (element of G3): part of basic signature Sigma0 - Epid11G3ElemStr K; //!< (element of G3): part of basic signature Sigma0 - Epid11G3ElemStr B_tick; //!< (element of G3): one entry in SigRL - Epid11G3ElemStr K_tick; //!< (element of G3): one entry in SigRL - Epid11G3ElemStr T; //!< element of G3 - Epid11G3ElemStr R1; //!< element of G3 - Epid11G3ElemStr R2; //!< element of G3 - uint32_t msg_len; //!< length of the message - uint8_t msg[1]; //!< message -} Epid11NrVerifyCommitValues; -#pragma pack() - -EpidStatus Epid11NrVerify(Epid11VerifierCtx const* ctx, - Epid11BasicSignature const* sig, void const* msg, - size_t msg_len, Epid11SigRlEntry const* sigrl_entry, - Epid11NrProof const* proof) { - size_t const cv_header_len = - sizeof(Epid11NrVerifyCommitValues) - sizeof(uint8_t); - Epid11NrVerifyCommitValues* commit_values = NULL; - size_t const commit_len = sizeof(Epid11NrVerifyCommitValues) + msg_len - 1; - EpidStatus res = kEpidErr; - // Epid11 G3 elements - EcPoint* T = NULL; - EcPoint* R1 = NULL; - EcPoint* R2 = NULL; - - EcPoint* K = NULL; - EcPoint* B = NULL; - EcPoint* K_tick = NULL; - EcPoint* B_tick = NULL; - - // Big integers - BigNum* smu = NULL; - BigNum* snu = NULL; - BigNum* nc_tick_bn = NULL; - Sha256Digest commit_hash; - - if (!ctx || !sig || !proof || !sigrl_entry) { - return kEpidBadArgErr; - } - if (!msg && (0 != msg_len)) { - return kEpidBadArgErr; - } - if (msg_len > (UINT_MAX - cv_header_len)) { - return kEpidBadArgErr; - } - if (!ctx->epid11_params) { - return kEpidBadArgErr; - } - do { - bool cmp_result = false; - // handy shorthands: - EcGroup* G3 = ctx->epid11_params->G3; - BigNum* p_tick_bn = ctx->epid11_params->p_tick; - - if (!G3 || !p_tick_bn) { - res = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(res); - } - - commit_values = SAFE_ALLOC(commit_len); - if (commit_values == NULL) { - res = kEpidMemAllocErr; - break; - } - // 1. We use the following variables T, R1, R2 (elements of G3), and c, smu, - // snu, nc (big integers). - res = NewEcPoint(G3, &T); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G3, &R1); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G3, &R2); - BREAK_ON_EPID_ERROR(res); - - res = NewEcPoint(G3, &K); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G3, &B); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G3, &K_tick); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G3, &B_tick); - BREAK_ON_EPID_ERROR(res); - - res = NewBigNum(sizeof(proof->smu), &smu); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(proof->smu), &snu); - BREAK_ON_EPID_ERROR(res); - - res = NewBigNum(sizeof(FpElemStr), &nc_tick_bn); - BREAK_ON_EPID_ERROR(res); - - // 2. The verifier verifies that G3.inGroup(T) = true. - res = ReadEcPoint(G3, &(proof->T), sizeof(proof->T), T); - if (kEpidNoErr != res) { - res = kEpidBadArgErr; - break; - } - - // 3. The verifier verifies that G3.isIdentity(T) = false. - res = EcIsIdentity(G3, T, &(cmp_result)); - BREAK_ON_EPID_ERROR(res); - if (cmp_result) { - res = kEpidBadArgErr; - break; - } - - // 4. The verifier verifies that smu, snu in [0, p'-1]. - res = WriteBigNum(ctx->epid11_params->p_tick, sizeof(commit_values->p_tick), - &commit_values->p_tick); - BREAK_ON_EPID_ERROR(res); - if (memcmp(&proof->smu, &commit_values->p_tick, sizeof(FpElemStr)) >= 0 || - memcmp(&proof->snu, &commit_values->p_tick, sizeof(FpElemStr)) >= 0) { - res = kEpidBadArgErr; - break; - } - // 5. The verifier computes nc = (- c) mod p'. - res = ReadBigNum(&(proof->c), sizeof(proof->c), nc_tick_bn); - BREAK_ON_EPID_ERROR(res); - res = BigNumMod(nc_tick_bn, p_tick_bn, nc_tick_bn); - BREAK_ON_EPID_ERROR(res); - // (-c) mod p' == p' - (c mod p') - res = BigNumSub(p_tick_bn, nc_tick_bn, nc_tick_bn); - BREAK_ON_EPID_ERROR(res); - - // 6. The verifier computes R1 = G3.multiExp(K, smu, B, snu). - res = ReadEcPoint(G3, &(sig->K), sizeof(sig->K), K); - if (kEpidNoErr != res) { - res = kEpidBadArgErr; - break; - } - res = ReadEcPoint(G3, &(sig->B), sizeof(sig->B), B); - if (kEpidNoErr != res) { - res = kEpidBadArgErr; - break; - } - res = ReadBigNum(&(proof->smu), sizeof(proof->smu), smu); - BREAK_ON_EPID_ERROR(res); - res = ReadBigNum(&(proof->snu), sizeof(proof->snu), snu); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[2]; - BigNum const* exponents[2]; - points[0] = K; - points[1] = B; - exponents[0] = smu; - exponents[1] = snu; - res = EcMultiExpBn(G3, points, exponents, COUNT_OF(points), R1); - BREAK_ON_EPID_ERROR(res); - } - // 7. The verifier computes R2 = G3.multiExp(K', smu, B', snu, T, nc). - res = ReadEcPoint(G3, &(sigrl_entry->k), sizeof(sigrl_entry->k), K_tick); - if (kEpidNoErr != res) { - res = kEpidBadArgErr; - break; - } - res = ReadEcPoint(G3, &(sigrl_entry->b), sizeof(sigrl_entry->b), B_tick); - if (kEpidNoErr != res) { - res = kEpidBadArgErr; - break; - } - { - EcPoint const* points[3]; - BigNum const* exponents[3]; - points[0] = K_tick; - points[1] = B_tick; - points[2] = T; - exponents[0] = smu; - exponents[1] = snu; - exponents[2] = nc_tick_bn; - res = EcMultiExpBn(G3, points, exponents, COUNT_OF(points), R2); - BREAK_ON_EPID_ERROR(res); - } - // 8. The verifier verifies c = Hash(p' || g3 || B || K || B' || K' || T || - // R1 || R2 || mSize || m). - if (msg) { - // Memory copy is used to copy a message of variable length - if (0 != memcpy_S(&commit_values->msg[0], msg_len, msg, msg_len)) { - res = kEpidBadArgErr; - break; - } - } - commit_values->g3 = ctx->commit_values.g3; - commit_values->B = sig->B; - commit_values->K = sig->K; - commit_values->B_tick = sigrl_entry->b; - commit_values->K_tick = sigrl_entry->k; - commit_values->T = proof->T; - commit_values->msg_len = ntohl(msg_len); - res = WriteEcPoint(G3, R1, &commit_values->R1, sizeof(commit_values->R1)); - BREAK_ON_EPID_ERROR(res); - res = WriteEcPoint(G3, R2, &commit_values->R2, sizeof(commit_values->R2)); - BREAK_ON_EPID_ERROR(res); - res = Sha256MessageDigest(commit_values, commit_len, &commit_hash); - if (0 != memcmp(&proof->c, &commit_hash, sizeof(proof->c))) { - res = kEpidBadArgErr; - break; - } - } while (0); - SAFE_FREE(commit_values); - DeleteEcPoint(&T); - DeleteEcPoint(&R1); - DeleteEcPoint(&R2); - - DeleteEcPoint(&K); - DeleteEcPoint(&B); - DeleteEcPoint(&K_tick); - DeleteEcPoint(&B_tick); - - DeleteBigNum(&smu); - DeleteBigNum(&snu); - - DeleteBigNum(&nc_tick_bn); - - return res; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/sigs_linked.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/sigs_linked.c deleted file mode 100644 index 96863f63a8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/sigs_linked.c +++ /dev/null @@ -1,29 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Epid11AreSigsLinked implementation. -*/ - -#include -#include "epid/verifier/1.1/api.h" - -bool Epid11AreSigsLinked(Epid11BasicSignature const* sig1, - Epid11BasicSignature const* sig2) { - return (sig1 && sig2 && 0 == memcmp(&sig1->B, &sig2->B, sizeof(sig2->B)) && - 0 == memcmp(&sig1->K, &sig2->K, sizeof(sig2->K))); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/verify.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/verify.c deleted file mode 100644 index aff1da4ceb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/verify.c +++ /dev/null @@ -1,240 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Epid11Verify implementation. -*/ - -#include -#include "epid/verifier/1.1/api.h" -#include "epid/verifier/1.1/src/context.h" -#include "epid/common/src/endian_convert.h" - -static size_t Epid11GetSignatureRlCount(Epid11Signature const* sig) { - return (!sig) ? 0 : ntohl(sig->n2); -} - -static size_t Epid11GetGroupRlCount(Epid11GroupRl const* rl) { - return (!rl) ? 0 : ntohl(rl->n3); -} - -static size_t Epid11GetSigRlCount(Epid11SigRl const* rl) { - return (!rl) ? 0 : ntohl(rl->n2); -} - -static size_t Epid11GetPrivRlCount(Epid11PrivRl const* rl) { - return (!rl) ? 0 : ntohl(rl->n1); -} - -/// Check PrivRL status of a signature for one PrivRl entry -/*! -computes t5 =G3.exp(B, f[i]) and verifies that G3.isEqual(t5, K) = false. - - \param[in] ctx - The verifier context. - \param[in] sig - The basic signature. - \param[in] f_str - priv_rl entry to check. - - \returns ::EpidStatus - - \retval ::kEpidNoErr - Signature was not revoked - \retval ::kEpidSigRevokedInPrivRl - Signature revoked in PrivRl -*/ -EpidStatus Epid11PrVerify(Epid11VerifierCtx const* ctx, - Epid11BasicSignature const* sig, BigNumStr* f_str) { - EpidStatus sts = kEpidErr; - EcPoint* B = NULL; - EcPoint* K = NULL; - EcPoint* t5 = NULL; - FfElement* f = NULL; - EcGroup* G3 = ctx->epid11_params->G3; - FiniteField* Fp = ctx->epid11_params->Fp; - bool eq = false; - do { - sts = NewEcPoint(G3, &B); - if (kEpidNoErr != sts) { - sts = kEpidMathErr; - break; - } - sts = NewEcPoint(G3, &K); - if (kEpidNoErr != sts) { - sts = kEpidMathErr; - break; - } - sts = NewEcPoint(G3, &t5); - if (kEpidNoErr != sts) { - sts = kEpidMathErr; - break; - } - sts = NewFfElement(Fp, &f); - if (kEpidNoErr != sts) { - sts = kEpidMathErr; - break; - } - sts = ReadEcPoint(G3, &sig->B, sizeof(sig->B), B); - if (kEpidNoErr != sts) { - sts = kEpidMathErr; - break; - } - sts = ReadEcPoint(G3, &sig->K, sizeof(sig->K), K); - if (kEpidNoErr != sts) { - sts = kEpidMathErr; - break; - } - sts = EcExp(G3, B, f_str, t5); - if (kEpidNoErr != sts) { - sts = kEpidMathErr; - break; - } - sts = EcIsEqual(G3, t5, K, &eq); - if (kEpidNoErr != sts) { - sts = kEpidMathErr; - break; - } - if (eq) { - sts = kEpidSigRevokedInPrivRl; - } else { - sts = kEpidNoErr; - } - } while (0); - DeleteFfElement(&f); - DeleteEcPoint(&t5); - DeleteEcPoint(&K); - DeleteEcPoint(&B); - return sts; -} - -EpidStatus Epid11Verify(Epid11VerifierCtx const* ctx, - Epid11Signature const* sig, size_t sig_len, - void const* msg, size_t msg_len) { - // Step 1. Setup - size_t const sig_header_len = - (sizeof(Epid11Signature) - sizeof(Epid11NrProof)); - EpidStatus sts = kEpidErr; - size_t rl_count = 0; - size_t i; - if (!sig || !ctx || !ctx->epid11_params || !ctx->pub_key) { - return kEpidBadArgErr; - } - if (!msg && (0 != msg_len)) { - // if message is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (sig_len < sig_header_len) { - return kEpidBadArgErr; - } - rl_count = Epid11GetSignatureRlCount(sig); - if (rl_count > (SIZE_MAX - sig_header_len) / sizeof(sig->sigma[0]) || - (rl_count * sizeof(sig->sigma[0])) + sig_header_len != sig_len) { - return kEpidBadArgErr; - } - // Check if signature has NrPoofs but SigRl is not set - if (0 < rl_count && !ctx->sig_rl) { - return kEpidBadArgErr; - } - - // Step 3. The verifier verifies gid in the public key, PRIV-RL, and - // SIG-RL (if provided) and the verifier pre-computation blob all match. - if (ctx->priv_rl) { - if (0 != memcmp(&ctx->pub_key->gid, &ctx->priv_rl->gid, - sizeof(ctx->pub_key->gid))) { - return kEpidBadArgErr; - } - } - - if (ctx->sig_rl) { - if (0 != memcmp(&ctx->pub_key->gid, &ctx->sig_rl->gid, - sizeof(ctx->pub_key->gid))) { - return kEpidBadArgErr; - } - } - // Verification of gid value in precomputation blob - // and public key is done in ReadPrecomp - - // Step 4. The verifier verifies the signatures of PRIV-RL, - // SIG-RL (if provided), and Group-RL (if provided) using IVK. - // Data is already verified. - - // Step 5. If GroupRL is provided as input,... - if (ctx->group_rl) { - // ...the verifier verifies that gid has not been revoked, i.e., - // gid does not match any entry in Group-RL. - size_t grouprl_count = Epid11GetGroupRlCount(ctx->group_rl); - for (i = 0; i < grouprl_count; ++i) { - if (0 == memcmp(&ctx->pub_key->gid, &ctx->group_rl->gid[i], - sizeof(ctx->pub_key->gid))) { - return kEpidSigRevokedInGroupRl; - } - } - } - - // Step 6. If SIG-RL is provided as input,... - if (ctx->sig_rl) { - size_t sigrl_count = Epid11GetSigRlCount(ctx->sig_rl); - - // ...the verifier verifies that RLver and n2 - // values in s match with the values in SIG-RL.... - if (0 != memcmp(&ctx->sig_rl->version, &sig->rl_ver, - sizeof(ctx->sig_rl->version))) { - return kEpidBadArgErr; - } - - if (sigrl_count != rl_count) { - return kEpidBadArgErr; - } - } - - // Step 7-30. The verifier verifies the basic signature. - sts = Epid11VerifyBasicSig(ctx, &sig->sigma0, msg, msg_len); - if (sts != kEpidNoErr) { - return kEpidSigInvalid; - } - - // Step 31. For i = 0, ..., n1-1, the verifier computes t5 =G3.exp(B, f[i]) - // and verifies that G3.isEqual(t5, K) = false. - if (ctx->priv_rl) { - size_t privrl_count = Epid11GetPrivRlCount(ctx->priv_rl); - for (i = 0; i < privrl_count; ++i) { - sts = Epid11PrVerify(ctx, &sig->sigma0, (BigNumStr*)&ctx->priv_rl->f[i]); - if (sts != kEpidNoErr) { - return kEpidSigRevokedInPrivRl; - } - } - } - - // Step 32. For i = 0, ..., n2-1, the verifier verifies nrVerify(B, K, B[i], - // K[i], Sigma[i]) = true. The details of nrVerify() will be given in the - // next subsection. - if (ctx->sig_rl) { - size_t sigrl_count = Epid11GetSigRlCount(ctx->sig_rl); - - for (i = 0; i < sigrl_count; ++i) { - sts = Epid11NrVerify(ctx, &sig->sigma0, msg, msg_len, &ctx->sig_rl->bk[i], - &sig->sigma[i]); - if (sts != kEpidNoErr) { - return kEpidSigRevokedInSigRl; - } - } - } - - // Step 33. If all the above verifications succeed, the verifier outputs true. - return kEpidSigValid; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/verifybasic.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/verifybasic.c deleted file mode 100644 index d5a1480a0c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/src/verifybasic.c +++ /dev/null @@ -1,412 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Epid11VerifyBasicSig implementation. - */ -#include -#include -#include "epid/verifier/1.1/api.h" -#include "epid/verifier/1.1/src/context.h" -#include "epid/common/math/src/bignum-internal.h" -#include "epid/common/src/memory.h" -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -/// Count of elements in array -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) - -/// Convert bit size into 32-bit words -#ifndef BITS2BYTES -#define BITS2BYTES(n) ((((n) + 7) / 8)) -#endif - -/// The EPID11 "sf" value must never be larger than 2**593 -#define EPID11_SF_MAX_SIZE_BITS (593) - -EpidStatus Epid11VerifyBasicSig(Epid11VerifierCtx const* ctx, - Epid11BasicSignature const* sig, - void const* msg, size_t msg_len) { - EpidStatus res = kEpidNoErr; - - // Epid11 G1 elements - EcPoint* T1 = NULL; - EcPoint* T2 = NULL; - EcPoint* R1 = NULL; - EcPoint* R2 = NULL; - EcPoint* t1 = NULL; - EcPoint* t2 = NULL; - - // Epid11 GT elements - FfElement* R4 = NULL; - FfElement* t3 = NULL; - - // Epid11 G3 elements - EcPoint* B = NULL; - EcPoint* K = NULL; - EcPoint* R3 = NULL; - EcPoint* t5 = NULL; - - BigNum* c_bn = NULL; - BigNum* sa_bn = NULL; - BigNum* sb_bn = NULL; - BigNum* nc_bn = NULL; - BigNum* salpha_bn = NULL; - BigNum* sbeta_bn = NULL; - BigNum* nsx_bn = NULL; - BigNum* sf_bn = NULL; - BigNum* sf_tick_bn = NULL; - BigNum* nc_tick_bn = NULL; - BigNum* syalpha_bn = NULL; - - Sha256Digest c_hash = {0}; - - if (!ctx || !sig) return kEpidBadArgErr; - if (!msg && (0 != msg_len)) { - // if message is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (msg_len > UINT_MAX) return kEpidBadArgErr; - if (!ctx->epid11_params || !ctx->pub_key) return kEpidBadArgErr; - - do { - bool cmp_result = false; - BigNumStr nc_str = {0}; - // handy shorthands: - EcGroup* G1 = ctx->epid11_params->G1; - EcGroup* G3 = ctx->epid11_params->G3; - FiniteField* GT = ctx->epid11_params->GT; - BigNum* p_bn = ctx->epid11_params->p; - BigNum* p_tick_bn = ctx->epid11_params->p_tick; - EcPoint* g1 = ctx->epid11_params->g1; - EcPoint* g2 = ctx->epid11_params->g2; - EcPoint* w = ctx->pub_key->w; - Epid11CommitValues commit_values = ctx->commit_values; - EcPoint* basename_hash = ctx->basename_hash; - - if (!G1 || !G3 || !GT || !p_bn || !p_tick_bn || !g1 || !g2 || !w) { - res = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(res); - } - - // 1. We use the following variables T1, T2, R1, R2, t1, - // t2 (elements of G1), R4, t3 (elements of GT), B, K, R3, - // t5 (elements of G3), c, sx, sy, sa, sb, salpha, sbeta, - // nc, nc_tick, nsx, syalpha, t4 (256-bit big integers), - // nd (80-bit big integer), and sf (600-bit big integer). - res = NewEcPoint(G1, &T1); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &T2); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &R1); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &R2); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &t1); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &t2); - BREAK_ON_EPID_ERROR(res); - - res = NewFfElement(GT, &R4); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(GT, &t3); - BREAK_ON_EPID_ERROR(res); - - res = NewEcPoint(G3, &B); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G3, &K); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G3, &R3); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G3, &t5); - BREAK_ON_EPID_ERROR(res); - - res = NewBigNum(sizeof(FpElemStr), &c_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(FpElemStr), &sa_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(FpElemStr), &sb_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(FpElemStr), &nc_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(FpElemStr), &salpha_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(FpElemStr), &sbeta_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(FpElemStr), &nsx_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(OctStr600), &sf_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(OctStr600), &sf_tick_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(FpElemStr), &nc_tick_bn); - BREAK_ON_EPID_ERROR(res); - res = NewBigNum(sizeof(FpElemStr) * 2, &syalpha_bn); - BREAK_ON_EPID_ERROR(res); - - // Steps 2-6 done in Epid11Create - - // 8. If bsnSize = 0, the verifier verifies G3.inGroup(B) = true. - res = ReadEcPoint(G3, &(sig->B), sizeof(sig->B), B); - if (kEpidNoErr != res) { - if (ctx->basename_len == 0 && kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - - // 7. The verifier verifies that G3.isIdentity(B) is false - res = EcIsIdentity(G3, B, &cmp_result); - BREAK_ON_EPID_ERROR(res); - if (cmp_result != false) { - res = kEpidSigInvalid; - break; - } - - // 9. If bsnSize > 0, the verifier verifies B = G3.hash(bsn). - if (basename_hash) { - res = EcIsEqual(G3, basename_hash, B, &cmp_result); - BREAK_ON_EPID_ERROR(res); - if (cmp_result != true) { - res = kEpidSigInvalid; - break; - } - } - // 10. The verifier verifies G3.inGroup(K) = true. - res = ReadEcPoint(G3, &(sig->K), sizeof(sig->K), K); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - - // 11. The verifier verifies G1.inGroup(T1) = true. - res = ReadEcPoint(G1, &(sig->T1), sizeof(sig->T1), T1); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - - // 12. The verifier verifies G1.inGroup(T2) = true. - res = ReadEcPoint(G1, &(sig->T2), sizeof(sig->T2), T2); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - - // 13. The verifier verifies sx, sy, sa, sb, salpha, sbeta in [0, p-1]. - if (memcmp(&sig->sx, &ctx->commit_values.p, sizeof(FpElemStr)) >= 0 || - memcmp(&sig->sy, &ctx->commit_values.p, sizeof(FpElemStr)) >= 0 || - memcmp(&sig->sa, &ctx->commit_values.p, sizeof(FpElemStr)) >= 0 || - memcmp(&sig->sb, &ctx->commit_values.p, sizeof(FpElemStr)) >= 0 || - memcmp(&sig->salpha, &ctx->commit_values.p, sizeof(FpElemStr)) >= 0 || - memcmp(&sig->sbeta, &ctx->commit_values.p, sizeof(FpElemStr)) >= 0) { - res = kEpidSigInvalid; - break; - } - - // 14. The verifier verifies that sf is an (at-most) 593-bit unsigned - // integer, in other words, sf < 2**593. - - if (EPID11_SF_MAX_SIZE_BITS <= - OctStrBitSize(sig->sf.data, sizeof(sig->sf.data))) { - res = kEpidSigInvalid; - break; - } - - // 15. The verifier computes nc = (-c) mod p. - res = ReadBigNum(&(sig->c), sizeof(sig->c), c_bn); - BREAK_ON_EPID_ERROR(res); - res = BigNumMod(c_bn, p_bn, nc_bn); - BREAK_ON_EPID_ERROR(res); - // (-c) mod p == p - (c mod p) - res = BigNumSub(p_bn, nc_bn, nc_bn); - BREAK_ON_EPID_ERROR(res); - - // 16. The verifier computes nc_tick = (-c) mod p_tick. - res = BigNumMod(c_bn, p_tick_bn, nc_tick_bn); - BREAK_ON_EPID_ERROR(res); - res = BigNumSub(p_tick_bn, nc_tick_bn, nc_tick_bn); - BREAK_ON_EPID_ERROR(res); - - // 17. The verifier computes nsx = (-sx) mod p. - res = ReadBigNum(&(sig->sx), sizeof(sig->sx), nsx_bn); - BREAK_ON_EPID_ERROR(res); - res = BigNumSub(p_bn, nsx_bn, nsx_bn); - BREAK_ON_EPID_ERROR(res); - - // 18. The verifier computes syalpha = (sy + salpha) mod p. - res = ReadBigNum(&(sig->salpha), sizeof(sig->salpha), salpha_bn); - BREAK_ON_EPID_ERROR(res); - res = ReadBigNum(&(sig->sy), sizeof(sig->sy), syalpha_bn); - BREAK_ON_EPID_ERROR(res); - res = BigNumAdd(salpha_bn, syalpha_bn, syalpha_bn); - BREAK_ON_EPID_ERROR(res); - res = BigNumMod(syalpha_bn, p_bn, syalpha_bn); - BREAK_ON_EPID_ERROR(res); - - // 19. The verifier computes R1 = G1.multiexp(h1, sa, h2, sb, T2, nc). - res = ReadBigNum(&sig->sa, sizeof(sig->sa), sa_bn); - BREAK_ON_EPID_ERROR(res); - res = ReadBigNum(&sig->sb, sizeof(sig->sb), sb_bn); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[3]; - BigNum const* exponents[3]; - points[0] = ctx->pub_key->h1; - points[1] = ctx->pub_key->h2; - points[2] = T2; - exponents[0] = sa_bn; - exponents[1] = sb_bn; - exponents[2] = nc_bn; - res = EcMultiExpBn(G1, points, exponents, COUNT_OF(points), R1); - BREAK_ON_EPID_ERROR(res); - } - // 20. The verifier computes - // R2 = G1.multiexp(h1, salpha, h2, sbeta, T2, nsx). - res = ReadBigNum(&sig->sbeta, sizeof(sig->sbeta), sbeta_bn); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[3]; - BigNum const* exponents[3]; - points[0] = ctx->pub_key->h1; - points[1] = ctx->pub_key->h2; - points[2] = T2; - exponents[0] = salpha_bn; - exponents[1] = sbeta_bn; - exponents[2] = nsx_bn; - res = EcMultiExpBn(G1, points, exponents, COUNT_OF(points), R2); - BREAK_ON_EPID_ERROR(res); - } - // 21. The verifier computes R3 = G3.multiexp(B, sf, K, nc_tick). - res = ReadBigNum(&sig->sf, sizeof(sig->sf), sf_tick_bn); - BREAK_ON_EPID_ERROR(res); - // G3.exp(B, sf) = G3(B, sf mod G3.order) - res = BigNumMod(sf_tick_bn, p_tick_bn, sf_tick_bn); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[2]; - BigNum const* exponents[2]; - points[0] = B; - points[1] = K; - exponents[0] = sf_tick_bn; - exponents[1] = nc_tick_bn; - res = EcMultiExpBn(G3, points, exponents, COUNT_OF(points), R3); - BREAK_ON_EPID_ERROR(res); - } - - // 22. The verifier computes t1 = G1.multiexp(T1, nsx, g1, c). - res = BigNumMod(c_bn, p_bn, c_bn); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[2]; - BigNum const* exponents[2]; - points[0] = T1; - points[1] = g1; - exponents[0] = nsx_bn; - exponents[1] = c_bn; - res = EcMultiExpBn(G1, points, exponents, COUNT_OF(points), t1); - BREAK_ON_EPID_ERROR(res); - } - // 23. The verifier computes t2 = G1.exp(T1, nc). - res = WriteBigNum(nc_bn, sizeof(nc_str), &nc_str); - BREAK_ON_EPID_ERROR(res); - res = EcExp(G1, T1, &nc_str, t2); - BREAK_ON_EPID_ERROR(res); - // 24. The verifier computes R4 = pairing(t1, g2). - res = Epid11Pairing(ctx->epid11_params->pairing_state, t1, g2, R4); - BREAK_ON_EPID_ERROR(res); - // 25. The verifier computes t3 = pairing(t2, w). - res = Epid11Pairing(ctx->epid11_params->pairing_state, t2, w, t3); - BREAK_ON_EPID_ERROR(res); - // 26. The verifier computes R4 = GT.mul(R4, t3). - res = FfMul(GT, R4, t3, R4); - BREAK_ON_EPID_ERROR(res); - // 27. The verifier compute - // t3 = GT.multiexp(e12, sf, e22, syalpha, e2w, sa). - res = ReadBigNum(&sig->sf, sizeof(sig->sf), sf_bn); - BREAK_ON_EPID_ERROR(res); - { - FfElement const* points[3]; - BigNum const* exponents[3]; - points[0] = ctx->e12; - points[1] = ctx->e22; - points[2] = ctx->e2w; - exponents[0] = sf_bn; - exponents[1] = syalpha_bn; - exponents[2] = sa_bn; - res = FfMultiExpBn(GT, points, exponents, COUNT_OF(points), t3); - BREAK_ON_EPID_ERROR(res); - } - // 28. The verifier compute R4 = GT.mul(R4, t3). - res = FfMul(GT, R4, t3, R4); - BREAK_ON_EPID_ERROR(res); - // 29. The verifier compute t4 = Hash(p || g1 || g2 || g3 || h1 || h2 || w - // || B || K || T1 || T2 || R1 || R2 || R3 || R4). - // 30. The verifier verifies c = H(t4 || nd || mSize || m). - res = SetCalculatedEpid11CommitValues(&sig->B, &sig->K, &sig->T1, &sig->T2, - R1, R2, R3, R4, G1, G3, GT, - &commit_values); - BREAK_ON_EPID_ERROR(res); - res = CalculateEpid11CommitmentHash(&commit_values, msg, (uint32_t)msg_len, - &sig->nd, &c_hash); - BREAK_ON_EPID_ERROR(res); - if (0 != memcmp(&sig->c, &c_hash, sizeof(sig->c))) { - res = kEpidSigInvalid; - break; - } - res = kEpidNoErr; - } while (0); - EpidZeroMemory(&c_hash, sizeof(c_hash)); - - DeleteEcPoint(&T1); - DeleteEcPoint(&T2); - DeleteEcPoint(&R1); - DeleteEcPoint(&R2); - DeleteEcPoint(&t1); - DeleteEcPoint(&t2); - - DeleteFfElement(&R4); - DeleteFfElement(&t3); - - DeleteEcPoint(&B); - DeleteEcPoint(&K); - DeleteEcPoint(&R3); - DeleteEcPoint(&t5); - - DeleteBigNum(&c_bn); - DeleteBigNum(&sa_bn); - DeleteBigNum(&sb_bn); - DeleteBigNum(&nc_bn); - DeleteBigNum(&salpha_bn); - DeleteBigNum(&sbeta_bn); - DeleteBigNum(&nsx_bn); - DeleteBigNum(&sf_bn); - DeleteBigNum(&sf_tick_bn); - DeleteBigNum(&nc_tick_bn); - DeleteBigNum(&syalpha_bn); - - return (res); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/check_privrl_entry-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/check_privrl_entry-test.cc deleted file mode 100644 index ba0f6ea9be..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/check_privrl_entry-test.cc +++ /dev/null @@ -1,83 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Epid11CheckPrivRlEntry unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/1.1/api.h" -} - -#include "epid/verifier/1.1/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/1.1/verifier_wrapper-testhelper.h" - -namespace { - -TEST_F(Epid11VerifierTest, CheckPrivRlEntryFailsGivenNullPtr) { - // check ctx, sig, f for NULL - auto& pub_key = this->kPubKeyStr; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - Epid11VerifierCtxObj verifier(pub_key); - FpElemStr fp_str = ((Epid11PrivRl const*)priv_rl.data())->f[0]; - Epid11BasicSignature basic_signature = - ((Epid11Signature const*)sig.data())->sigma0; - - EXPECT_EQ(kEpidBadArgErr, - Epid11CheckPrivRlEntry(nullptr, &basic_signature, &fp_str)); - EXPECT_EQ(kEpidBadArgErr, Epid11CheckPrivRlEntry(verifier, nullptr, &fp_str)); - EXPECT_EQ(kEpidBadArgErr, - Epid11CheckPrivRlEntry(verifier, &basic_signature, nullptr)); -} - -TEST_F(Epid11VerifierTest, CheckPrivRlEntryFailsGivenRevokedPrivKey) { - // test a revoked priv key - // check ctx, sig, f for NULL - auto& pub_key = this->kPubKeyStr; - auto& priv_rl = this->kGrpXPrivRl; - // signed using revoked key - auto& sig = this->kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - - Epid11VerifierCtxObj verifier(pub_key); - FpElemStr fp_str = ((Epid11PrivRl const*)priv_rl.data())->f[0]; - Epid11BasicSignature basic_signature = - ((Epid11Signature const*)sig.data())->sigma0; - - EXPECT_EQ(kEpidSigRevokedInPrivRl, - Epid11CheckPrivRlEntry(verifier, &basic_signature, &fp_str)); -} - -TEST_F(Epid11VerifierTest, CheckPrivRlEntrySucceedsGivenUnRevokedPrivKey) { - // test a non revoked priv key - auto& pub_key = this->kPubKeyStr; - auto& priv_rl = this->kGrpXPrivRl; - // signed using un revoked key - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - Epid11VerifierCtxObj verifier(pub_key); - FpElemStr fp_str = ((Epid11PrivRl const*)priv_rl.data())->f[0]; - Epid11BasicSignature basic_signature = - ((Epid11Signature const*)sig.data())->sigma0; - - EXPECT_EQ(kEpidNoErr, - Epid11CheckPrivRlEntry(verifier, &basic_signature, &fp_str)); -} -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/context-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/context-test.cc deleted file mode 100644 index 798f6362d6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/context-test.cc +++ /dev/null @@ -1,477 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Epid11VerifierCreate unit tests. - */ - -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/1.1/api.h" -#include "epid/verifier/1.1/src/context.h" -} - -#include "epid/verifier/1.1/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/1.1/verifier_wrapper-testhelper.h" -bool operator==(Epid11VerifierPrecomp const& lhs, - Epid11VerifierPrecomp const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -namespace { -////////////////////////////////////////////////////////////////////////// -// Epid11VerifierCreate Tests -TEST_F(Epid11VerifierTest, CreateFailsGivenNullPointer) { - Epid11VerifierCtx* ctx = nullptr; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierCreate(&this->kPubKeyStr, &this->kVerifierPrecompStr, - nullptr)); - Epid11VerifierDelete(&ctx); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierCreate(nullptr, &this->kVerifierPrecompStr, &ctx)); - Epid11VerifierDelete(&ctx); -} -TEST_F(Epid11VerifierTest, CreateSucceedsGivenNullPrecomp) { - Epid11VerifierCtx* ctx = nullptr; - EXPECT_EQ(kEpidNoErr, Epid11VerifierCreate(&this->kPubKeyStr, nullptr, &ctx)); - Epid11VerifierDelete(&ctx); -} -TEST_F(Epid11VerifierTest, CreateSucceedsGivenValidPrecomp) { - Epid11VerifierCtx* ctx = nullptr; - EXPECT_EQ(kEpidNoErr, Epid11VerifierCreate(&this->kPubKeyStr, - &this->kVerifierPrecompStr, &ctx)); - Epid11VerifierDelete(&ctx); -} -TEST_F(Epid11VerifierTest, CreateFailsGivenInvalidPubkey) { - Epid11VerifierCtx* ctx = nullptr; - Epid11GroupPubKey pubkey_with_bad_h1 = this->kPubKeyStr; - pubkey_with_bad_h1.h1.x.data.data[31]++; // munge h1 so not in G1 - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierCreate(&pubkey_with_bad_h1, nullptr, &ctx)); - Epid11VerifierDelete(&ctx); - Epid11GroupPubKey pubkey_with_bad_h2 = this->kPubKeyStr; - pubkey_with_bad_h2.h2.x.data.data[31]++; // munge h2 so not in G1 - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierCreate(&pubkey_with_bad_h2, nullptr, &ctx)); - Epid11VerifierDelete(&ctx); - Epid11GroupPubKey pubkey_with_bad_w = this->kPubKeyStr; - pubkey_with_bad_w.w.x[0].data.data[31]++; // munge w so not in G2 - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierCreate(&pubkey_with_bad_w, nullptr, &ctx)); - Epid11VerifierDelete(&ctx); -} -TEST_F(Epid11VerifierTest, CreateFailsGivenBadGroupIdInPrecomp) { - Epid11VerifierCtx* ctx = nullptr; - // tweak GID - auto verifier_precomp = this->kVerifierPrecompStr; - verifier_precomp.gid.data[0] = ~verifier_precomp.gid.data[0]; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierCreate(&this->kPubKeyStr, &verifier_precomp, &ctx)); -} -////////////////////////////////////////////////////////////////////////// -// Epid11VerifierDelete Tests -TEST_F(Epid11VerifierTest, DeleteNullsVerifierCtx) { - Epid11VerifierCtx* ctx = nullptr; - THROW_ON_EPIDERR(Epid11VerifierCreate(&this->kPubKeyStr, nullptr, &ctx)); - Epid11VerifierDelete(&ctx); - EXPECT_EQ(nullptr, ctx); -} -TEST_F(Epid11VerifierTest, DeleteWorksGivenNullVerifierCtx) { - Epid11VerifierDelete(nullptr); - Epid11VerifierCtx* ctx = nullptr; - Epid11VerifierDelete(&ctx); -} - -////////////////////////////////////////////////////////////////////////// -// Epid11VerifierWritePrecomp -TEST_F(Epid11VerifierTest, WritePrecompFailsGivenNullPointer) { - Epid11VerifierPrecomp precomp; - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11VerifierCtx* ctx = verifier; - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierWritePrecomp(nullptr, &precomp)); - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierWritePrecomp(ctx, nullptr)); -} -TEST_F(Epid11VerifierTest, WritePrecompSucceedGivenValidArgument) { - Epid11VerifierPrecomp precomp; - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11VerifierCtx* ctx = verifier; - EXPECT_EQ(kEpidNoErr, Epid11VerifierWritePrecomp(ctx, &precomp)); - Epid11VerifierPrecomp expected_precomp = this->kVerifierPrecompStr; - EXPECT_EQ(expected_precomp, precomp); - - Epid11VerifierCtxObj verifier2(this->kPubKeyStr); - Epid11VerifierCtx* ctx2 = verifier2; - EXPECT_EQ(kEpidNoErr, Epid11VerifierWritePrecomp(ctx2, &precomp)); - EXPECT_EQ(expected_precomp, precomp); -} - -////////////////////////////////////////////////////////////////////////// -// Epid11VerifierSetPrivRl -TEST_F(Epid11VerifierTest, SetPrivRlFailsGivenNullPointer) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetPrivRl(nullptr, &prl, sizeof(prl))); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetPrivRl(verifier, nullptr, sizeof(prl))); -} - -TEST_F(Epid11VerifierTest, SetPrivRlFailsGivenZeroSize) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierSetPrivRl(verifier, &prl, 0)); -} - -// Size parameter must be at least big enough for n1 == 0 case -TEST_F(Epid11VerifierTest, SetPrivRlFailsGivenTooSmallSize) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetPrivRl(verifier, &prl, - (sizeof(prl) - sizeof(prl.f)) - 1)); - prl.n1 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetPrivRl(verifier, &prl, - (sizeof(prl) - sizeof(prl.f)) - 1)); -} - -// Size parameter must be cross-checked with n1 value in priv_rl -TEST_F(Epid11VerifierTest, SetPrivRlFailsGivenN1TooBigForSize) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - prl.n1 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierSetPrivRl( - verifier, &prl, sizeof(prl) - sizeof(prl.f))); -} - -TEST_F(Epid11VerifierTest, SetPrivRlFailsGivenN1TooSmallForSize) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetPrivRl(verifier, &prl, sizeof(prl))); -} - -TEST_F(Epid11VerifierTest, SetPrivRlPassesGivenDefaultPrivRl) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidNoErr, Epid11VerifierSetPrivRl(verifier, &prl, - sizeof(prl) - sizeof(prl.f))); -} - -TEST_F(Epid11VerifierTest, SetPrivRlPassesGivenPrivRlWithSingleElement) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - prl.n1 = this->kOctStr32_1; - EXPECT_EQ(kEpidNoErr, Epid11VerifierSetPrivRl(verifier, &prl, sizeof(prl))); -} - -TEST_F(Epid11VerifierTest, SetPrivRlFailsGivenBadGroupId) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - prl.gid.data[0] = ~prl.gid.data[0]; - prl.n1 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetPrivRl(verifier, &prl, sizeof(prl))); -} - -TEST_F(Epid11VerifierTest, SetPrivRlFailsGivenOldVersion) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11PrivRl prl = {0}; - prl.gid = this->kPubKeyStr.gid; - prl.version = this->kOctStr32_1; - EXPECT_EQ(kEpidNoErr, Epid11VerifierSetPrivRl(verifier, &prl, - sizeof(prl) - sizeof(prl.f))); - OctStr32 octstr32_0 = {0x00, 0x00, 0x00, 0x00}; - prl.version = octstr32_0; - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierSetPrivRl( - verifier, &prl, sizeof(prl) - sizeof(prl.f))); -} - -////////////////////////////////////////////////////////////////////////// -// Epid11VerifierSetSigRl -TEST_F(Epid11VerifierTest, SetSigRlFailsGivenNullPointer) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11SigRl* empty_sig_rl = (Epid11SigRl*)this->kEmptySigRl.data(); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetSigRl(nullptr, empty_sig_rl, sizeof(Epid11SigRl))); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetSigRl(verifier, nullptr, sizeof(Epid11SigRl))); -} - -TEST_F(Epid11VerifierTest, SetSigRlFailsGivenZeroSize) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11SigRl* empty_sig_rl = (Epid11SigRl*)this->kEmptySigRl.data(); - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierSetSigRl(verifier, empty_sig_rl, 0)); -} - -// Size parameter must be at least big enough for n2 == 0 case -TEST_F(Epid11VerifierTest, SetSigRlFailsGivenTooSmallSize) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector empty_sig_rl_buf(this->kEmptySigRl); - Epid11SigRl* empty_sig_rl = (Epid11SigRl*)empty_sig_rl_buf.data(); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetSigRl( - verifier, empty_sig_rl, - (sizeof(*empty_sig_rl) - sizeof(empty_sig_rl->bk)) - 1)); - empty_sig_rl->n2 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetSigRl( - verifier, empty_sig_rl, - (sizeof(*empty_sig_rl) - sizeof(empty_sig_rl->bk)) - 1)); -} - -TEST_F(Epid11VerifierTest, SetSigRlFailsGivenN2TooBigForSize) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector empty_sig_rl_buf(this->kEmptySigRl); - Epid11SigRl* empty_sig_rl = (Epid11SigRl*)empty_sig_rl_buf.data(); - empty_sig_rl->n2 = this->kOctStr32_1; - EXPECT_EQ( - kEpidBadArgErr, - Epid11VerifierSetSigRl(verifier, empty_sig_rl, - sizeof(*empty_sig_rl) - sizeof(empty_sig_rl->bk))); -} - -TEST_F(Epid11VerifierTest, SetSigRlFailsGivenN2TooSmallForSize) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector empty_sig_rl_buf(this->kEmptySigRl); - Epid11SigRl* empty_sig_rl = (Epid11SigRl*)empty_sig_rl_buf.data(); - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierSetSigRl(verifier, empty_sig_rl, - sizeof(*empty_sig_rl))); -} - -TEST_F(Epid11VerifierTest, SetSigRlWorksGivenSigRlWithNoElements) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector empty_sig_rl_buf(this->kEmptySigRl); - Epid11SigRl* empty_sig_rl = (Epid11SigRl*)empty_sig_rl_buf.data(); - size_t sig_rl_size = empty_sig_rl_buf.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, - Epid11VerifierSetSigRl(verifier, empty_sig_rl, sig_rl_size)); -} - -TEST_F(Epid11VerifierTest, SetSigRlWorksGivenSigRlWithOneElement) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - - uint8_t sig_rl_data_n2_one[] = { - // gid - 0x00, 0x00, 0x00, 0x7b, - // rev - 0x00, 0x00, 0x00, 0x7b, - // n2 - 0x00, 0x00, 0x00, 0x01, - // bks - // bk1 - 0x67, 0x58, 0xb2, 0x9c, 0xad, 0x61, 0x1f, 0xfb, 0x74, 0x23, 0xea, 0x40, - 0xe9, 0x66, 0x26, 0xb0, 0x43, 0xdc, 0x7e, 0xc7, 0x48, 0x88, 0x56, 0x59, - 0xf3, 0x35, 0x9f, 0xdb, 0xfa, 0xa2, 0x49, 0x51, 0x85, 0x35, 0x42, 0x50, - 0x8e, 0x79, 0x79, 0xc0, 0x6c, 0xcc, 0x39, 0x0b, 0xad, 0x3b, 0x39, 0x33, - 0xae, 0xb2, 0xa1, 0xc5, 0x28, 0x6f, 0x48, 0x3a, 0xd2, 0x63, 0x5d, 0xfb, - 0x1b, 0x1f, 0x8a, 0x63, 0x84, 0xdc, 0x2d, 0xad, 0x3b, 0x98, 0x3f, 0xc3, - 0x8e, 0x18, 0xd7, 0xea, 0x18, 0x50, 0x0c, 0x50, 0x42, 0x77, 0xb2, 0x59, - 0xf5, 0xd5, 0x38, 0xc3, 0x8d, 0x57, 0xf4, 0xe7, 0xb8, 0x74, 0x5a, 0x9e, - 0x32, 0x75, 0xd1, 0xb4, 0xb3, 0x64, 0xbc, 0x23, 0xcd, 0x98, 0x29, 0x7a, - 0x77, 0x51, 0xfc, 0x26, 0x81, 0x41, 0x9b, 0xf6, 0x21, 0xad, 0xc1, 0xd9, - 0xab, 0x30, 0x25, 0x8d, 0x0c, 0x3b, 0x62, 0xe2}; - Epid11SigRl* sig_rl = reinterpret_cast(sig_rl_data_n2_one); - EXPECT_EQ(kEpidNoErr, - Epid11VerifierSetSigRl(verifier, sig_rl, sizeof(*sig_rl))); -} - -TEST_F(Epid11VerifierTest, SetSigRlWorksGivenSigRlWithTwoElement) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11VerifierCtx* ctx = verifier; - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - size_t sig_rl_size = this->kSigRl.size() * sizeof(uint8_t); - EXPECT_EQ(kEpidNoErr, Epid11VerifierSetSigRl(ctx, sig_rl, sig_rl_size)); -} - -TEST_F(Epid11VerifierTest, SetSigRlFailsGivenBadGroupId) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector empty_sig_rl_buf(this->kEmptySigRl); - Epid11SigRl* empty_sig_rl = (Epid11SigRl*)empty_sig_rl_buf.data(); - empty_sig_rl->gid.data[0] = ~empty_sig_rl->gid.data[0]; - EXPECT_EQ( - kEpidBadArgErr, - Epid11VerifierSetSigRl(verifier, empty_sig_rl, - sizeof(*empty_sig_rl) - sizeof(empty_sig_rl->bk))); -} - -TEST_F(Epid11VerifierTest, SetSigRlFailsGivenOldVersion) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector empty_sig_rl_buf(this->kEmptySigRl); - Epid11SigRl* empty_sig_rl = (Epid11SigRl*)empty_sig_rl_buf.data(); - empty_sig_rl->version = this->kOctStr32_1; - EXPECT_EQ(kEpidNoErr, Epid11VerifierSetSigRl( - verifier, empty_sig_rl, - sizeof(*empty_sig_rl) - sizeof(empty_sig_rl->bk))); - OctStr32 octstr32_0 = {0x00, 0x00, 0x00, 0x00}; - empty_sig_rl->version = octstr32_0; - EXPECT_EQ( - kEpidBadArgErr, - Epid11VerifierSetSigRl(verifier, empty_sig_rl, - sizeof(*empty_sig_rl) - sizeof(empty_sig_rl->bk))); -} - -////////////////////////////////////////////////////////////////////////// -// Epid11VerifierSetGroupRl -TEST_F(Epid11VerifierTest, SetGroupRlFailsGivenNullPointer) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector group_rl(this->kGroupRl3GidBuf); - Epid11GroupRl* grl = (Epid11GroupRl*)group_rl.data(); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetGroupRl(nullptr, grl, group_rl.size())); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetGroupRl(verifier, nullptr, group_rl.size())); -} - -TEST_F(Epid11VerifierTest, SetGroupRlFailsGivenSizeZero) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector group_rl(this->kGroupRl3GidBuf); - Epid11GroupRl* grl = (Epid11GroupRl*)group_rl.data(); - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierSetGroupRl(verifier, grl, 0)); -} - -TEST_F(Epid11VerifierTest, SetGroupRlFailsGivenSizeTooSmall) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector group_rl(this->kGroupRl3GidBuf); - Epid11GroupRl* grl = (Epid11GroupRl*)group_rl.data(); - size_t grl_size = group_rl.size() - sizeof(grl->gid[0]); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetGroupRl(verifier, grl, grl_size - 1)); -} - -TEST_F(Epid11VerifierTest, SetGroupRlFailsGivenSizeTooLarge) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector group_rl(this->kGroupRl3GidBuf); - Epid11GroupRl* grl = (Epid11GroupRl*)group_rl.data(); - size_t grl_size = group_rl.size() - sizeof(grl->gid[0]); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetGroupRl(verifier, grl, grl_size + 1)); -} - -TEST_F(Epid11VerifierTest, SetGroupRlFailsGivenN3ZeroAndGroupRLSizeTooBig) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector group_rl_3gid_n0_buf(this->kGroupRl3GidBuf); - group_rl_3gid_n0_buf[7] = 0x00; - Epid11GroupRl* group_rl = (Epid11GroupRl*)group_rl_3gid_n0_buf.data(); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetGroupRl(verifier, group_rl, - group_rl_3gid_n0_buf.size())); -} - -TEST_F(Epid11VerifierTest, SetGroupRlFailsGivenN3TooSmall) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector group_rl_3gid_n2_buf(this->kGroupRl3GidBuf); - group_rl_3gid_n2_buf[7] = 0x02; - Epid11GroupRl* group_rl = (Epid11GroupRl*)group_rl_3gid_n2_buf.data(); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetGroupRl(verifier, group_rl, - group_rl_3gid_n2_buf.size())); -} - -TEST_F(Epid11VerifierTest, SetGroupRlFailsGivenN3TooLarge) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector group_rl_3gid_n4_buf(this->kGroupRl3GidBuf); - group_rl_3gid_n4_buf[7] = 0x04; - Epid11GroupRl* group_rl = (Epid11GroupRl*)group_rl_3gid_n4_buf.data(); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetGroupRl(verifier, group_rl, - group_rl_3gid_n4_buf.size())); -} - -TEST_F(Epid11VerifierTest, SetGroupRlSucceedsGivenEmptyRL) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11GroupRl* empty_grl = (Epid11GroupRl*)this->kGroupRlEmptyBuf.data(); - size_t grl_size = this->kGroupRlEmptyBuf.size(); - EXPECT_EQ(kEpidNoErr, - Epid11VerifierSetGroupRl(verifier, empty_grl, grl_size)); -} -TEST_F(Epid11VerifierTest, SetGroupRlSucceedsGivenRLWith3gid) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11GroupRl* group_rl = (Epid11GroupRl*)this->kGroupRl3GidBuf.data(); - EXPECT_EQ(kEpidNoErr, Epid11VerifierSetGroupRl(verifier, group_rl, - this->kGroupRl3GidBuf.size())); -} - -TEST_F(Epid11VerifierTest, SetGroupRlFailsGivenOldVersion) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11GroupRl* group_rl = (Epid11GroupRl*)this->kGroupRl3GidBuf.data(); - EXPECT_EQ(kEpidNoErr, Epid11VerifierSetGroupRl(verifier, group_rl, - this->kGroupRl3GidBuf.size())); - Epid11GroupRl* empty_grl = (Epid11GroupRl*)this->kGroupRlEmptyBuf.data(); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetGroupRl(verifier, empty_grl, - this->kGroupRlEmptyBuf.size())); -} - -////////////////////////////////////////////////////////////////////////// -// Epid11VerifierSetBasename -TEST_F(Epid11VerifierTest, DefaultBasenameIsNull) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11VerifierCtx* ctx = verifier; - EXPECT_EQ(nullptr, ctx->basename); -} -TEST_F(Epid11VerifierTest, SetBasenameFailsGivenNullContext) { - auto& basename = this->kBsn0; - EXPECT_EQ(kEpidBadArgErr, Epid11VerifierSetBasename(nullptr, basename.data(), - basename.size())); -} -TEST_F(Epid11VerifierTest, SetBasenameFailsGivenNullBasenameAndNonzeroLength) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11VerifierCtx* ctx = verifier; - auto& basename = this->kBsn0; - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifierSetBasename(ctx, nullptr, basename.size())); -} -TEST_F(Epid11VerifierTest, SetBasenameSucceedsGivenValidParameters) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11VerifierCtx* ctx = verifier; - auto& basename = this->kBsn0; - EXPECT_EQ(kEpidNoErr, - Epid11VerifierSetBasename(ctx, basename.data(), basename.size())); - EXPECT_EQ(basename.size(), ctx->basename_len); - EXPECT_EQ(0, memcmp(basename.data(), ctx->basename, ctx->basename_len)); - EXPECT_NE(nullptr, ctx->basename_hash); -} -TEST_F(Epid11VerifierTest, SetBasenameAcceptsZeroLengthBasename) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11VerifierCtx* ctx = verifier; - EXPECT_EQ(kEpidNoErr, Epid11VerifierSetBasename(ctx, "", 0)); - EXPECT_EQ((size_t)0, ctx->basename_len); - EXPECT_NE(nullptr, ctx->basename_hash); -} -TEST_F(Epid11VerifierTest, SetBasenameResetsBasenameGivenNullBasename) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - Epid11VerifierCtx* ctx = verifier; - auto& basename = this->kBsn0; - THROW_ON_EPIDERR( - Epid11VerifierSetBasename(ctx, basename.data(), basename.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(ctx, nullptr, 0)); - EXPECT_EQ(nullptr, ctx->basename_hash); -} -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/nrverify-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/nrverify-test.cc deleted file mode 100644 index 41d9851328..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/nrverify-test.cc +++ /dev/null @@ -1,219 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Epid11NrVerify unit tests. -*/ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/1.1/api.h" -#include "epid/verifier/1.1/src/context.h" -#include "epid/common/1.1/types.h" -} - -#include "epid/verifier/1.1/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/common-testhelper/1.1/verifier_wrapper-testhelper.h" - -namespace { - -///////////////////////////////////////////////////////////////////////// -// Simple Errors - -TEST_F(Epid11VerifierTest, NrVerifyFailsGivenNullParameters) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - EXPECT_EQ(kEpidBadArgErr, - Epid11NrVerify(nullptr, &epid_signature->sigma0, this->kMsg0.data(), - this->kMsg0.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); - - EXPECT_EQ( - kEpidBadArgErr, - Epid11NrVerify(verifier, nullptr, this->kMsg0.data(), this->kMsg0.size(), - &sig_rl->bk[0], &epid_signature->sigma[0])); - - EXPECT_EQ(kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, nullptr, - this->kMsg0.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); - - EXPECT_EQ( - kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, this->kMsg0.data(), - this->kMsg0.size(), nullptr, &epid_signature->sigma[0])); - - EXPECT_EQ( - kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, this->kMsg0.data(), - this->kMsg0.size(), &sig_rl->bk[0], nullptr)); -} - -///////////////////////////////////////////////////////////////////// -// Reject -TEST_F(Epid11VerifierTest, NrVerifyRejectsTotalMsgSizeOutOfRangeOfInt) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - // Since before hashing some other data will be concatenated to commit - // message, passing msg with size==UINT_MAX is causes out of range for - // this concatenated msg - Epid11NrProof nr_proof = epid_signature->sigma[0]; - EXPECT_EQ(kEpidBadArgErr, Epid11NrVerify(verifier, &epid_signature->sigma0, - this->kMsg0.data(), 0xffffffff, - &sig_rl->bk[0], &nr_proof)); -#if (SIZE_MAX >= 0x100000001) // When size_t value allowed to be 0x100000001 - EXPECT_EQ(kEpidBadArgErr, Epid11NrVerify(verifier, &epid_signature->sigma0, - this->kMsg0.data(), 0x100000001, - &sig_rl->bk[0], &nr_proof)); -#endif -} -TEST_F(Epid11VerifierTest, NrVerifyRejectsSigWithTNotInG3) { - // 4.2.2 step 2 - The verifier verifies that G3.inGroup(T) = true. - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - Epid11NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.T.x.data.data[0]++; - EXPECT_EQ( - kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, this->kMsg0.data(), - this->kMsg0.size(), &sig_rl->bk[0], &nr_proof)); -} - -TEST_F(Epid11VerifierTest, NrVerifyRejectsSigWithTIdentityOfG3) { - // 4.2.2 step 3 - The verifier verifies that G3.isIdentity(T) = false. - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - Epid11NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.T = this->kG3IdentityStr; - EXPECT_EQ( - kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, this->kMsg0.data(), - this->kMsg0.size(), &sig_rl->bk[0], &nr_proof)); -} - -TEST_F(Epid11VerifierTest, NrVerifyRejectsSigWithSmuNotInRange) { - // 4.2.2 step 4 - The verifier verifies that smu, snu in [0, p'-1]. - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - Epid11NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.smu.data = this->kParamsStr.p.data; - EXPECT_EQ( - kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, this->kMsg0.data(), - this->kMsg0.size(), &sig_rl->bk[0], &nr_proof)); -} - -TEST_F(Epid11VerifierTest, NrVerifyRejectsSigWithSnuNotInRange) { - // 4.2.2 step 4 - The verifier verifies that smu, snu in [0, p'-1]. - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - Epid11NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.snu.data = this->kParamsStr.p.data; - EXPECT_EQ( - kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, this->kMsg0.data(), - this->kMsg0.size(), &sig_rl->bk[0], &nr_proof)); -} - -// 4.2.2 step 5 - The verifier computes nc = (- c) mod p'. -// This Step is not testable - -// 4.2.2 step 6 - The verifier computes R1 = G3.multiExp(K, smu, B, snu). -// This Step is not testable - -// 4.2.2 step 7 - The verifier computes R2 = G3.multiExp(K', smu, B', snu, -// T, nc). -// This Step is not testable - -TEST_F(Epid11VerifierTest, NrVerifyRejectsSigWithInvalidCommitment) { - // 4.2.2 step 8 - The verifier verifies c = Hash(p' || g3 || B || K || B' || - // K' || T || R1 || R2 || mSize || m). - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - std::vector test_msg = this->kMsg0; - test_msg[0]++; - EXPECT_EQ(kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, test_msg.data(), - test_msg.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); -} - -TEST_F(Epid11VerifierTest, NrVerifyRejectsSigWithMismatchCommitmentSize) { - // 4.2.2 step 8 - The verifier verifies c = Hash(p' || g3 || B || K || B' || - // K' || T || R1 || R2 || mSize || m). - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - std::vector test_msg = this->kMsg0; - EXPECT_EQ(kEpidBadArgErr, - Epid11NrVerify(verifier, &epid_signature->sigma0, test_msg.data(), - test_msg.size() - 1, &sig_rl->bk[0], - &epid_signature->sigma[0])); -} -///////////////////////////////////////////////////////////////////// -// Accept -// 4.2.2 step 9 - If all the above verifications succeed, the verifier -// outputs true. If any of the above verifications fails, -// the verifier aborts and outputs false - -TEST_F(Epid11VerifierTest, NrVerifyAcceptsSigWithRandomBaseName) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11Signature const* epid_signature = - reinterpret_cast( - this->kSigGrpXMember0Sha256RandbaseMsg0N2One.data()); - Epid11SigRl const* sig_rl = - reinterpret_cast(this->kSigRl.data()); - EXPECT_EQ(kEpidSigValid, - Epid11NrVerify(verifier, &epid_signature->sigma0, - this->kMsg0.data(), this->kMsg0.size(), - &sig_rl->bk[0], &epid_signature->sigma[0])); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/sigs_linked-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/sigs_linked-test.cc deleted file mode 100644 index a32a4706eb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/sigs_linked-test.cc +++ /dev/null @@ -1,71 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Epid11AreSigsLinkable unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/1.1/api.h" -} - -#include "epid/verifier/1.1/unittests/verifier-testhelper.h" - -namespace { - -TEST_F(Epid11VerifierTest, AreSigsLinkedReturnsFalseGivenNullParameters) { - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - EXPECT_FALSE(Epid11AreSigsLinked(nullptr, nullptr)); - EXPECT_FALSE( - Epid11AreSigsLinked((Epid11BasicSignature const*)sig.data(), nullptr)); - EXPECT_FALSE( - Epid11AreSigsLinked(nullptr, (Epid11BasicSignature const*)sig.data())); -} - -TEST_F(Epid11VerifierTest, SigsBySameMemberWithRandomBaseAreNotLinkable) { - auto& sig1 = this->kSigGrpXMember0Sha256RandbaseMsg0; - auto& sig2 = this->kSigGrpXMember0Sha256RandbaseMsg1; - EXPECT_FALSE(Epid11AreSigsLinked((Epid11BasicSignature const*)sig1.data(), - (Epid11BasicSignature const*)sig2.data())); -} - -TEST_F(Epid11VerifierTest, SigsBySameMemberWithSameBasenameAreLinkable) { - auto& sig1 = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& sig2 = this->kSigGrpXMember0Sha256Bsn0Msg1; - EXPECT_TRUE(Epid11AreSigsLinked((Epid11BasicSignature const*)sig1.data(), - (Epid11BasicSignature const*)sig2.data())); -} - -TEST_F(Epid11VerifierTest, - SigsBySameMemberWithDifferentBasenameAreNotLinkable) { - auto& sig1 = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& sig2 = this->kSigGrpXMember0Sha256Bsn1Msg0; - EXPECT_FALSE(Epid11AreSigsLinked((Epid11BasicSignature const*)sig1.data(), - (Epid11BasicSignature const*)sig2.data())); -} - -TEST_F(Epid11VerifierTest, - SigsByDifferentMembersWithSameBasenameAreNotLinkable) { - auto& sig1 = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& sig2 = this->kSigGrpXMember1Sha256Bsn0Msg0; - EXPECT_FALSE(Epid11AreSigsLinked((Epid11BasicSignature const*)sig1.data(), - (Epid11BasicSignature const*)sig2.data())); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/testdata/verifier_precmp.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/testdata/verifier_precmp.inc deleted file mode 100644 index 76a8908299..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/testdata/verifier_precmp.inc +++ /dev/null @@ -1,73 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Test data. - * - * Type : Intel(R) EPID 1.1 verifier precomp data - */ -// unsigned char epid_v_precmp_dat[] = { -0x00, 0x00, 0x00, 0x7b, -0x02, 0x7c, 0xac, 0xe1, 0x58, 0x08, 0x6a, 0x83, 0x50, 0xd8, 0xba, 0xba, -0x4b, 0x60, 0x6c, 0xeb, 0x51, 0xce, 0x7e, 0x6d, 0x8e, 0xa8, 0x56, 0x41, -0x33, 0xf3, 0xb0, 0xa6, 0xfc, 0xcd, 0xc8, 0x41, 0x05, 0x9e, 0xcc, 0x4f, -0x51, 0x77, 0xd9, 0xec, 0x57, 0x34, 0x48, 0x47, 0x22, 0x7a, 0x7c, 0xa1, -0x14, 0xb8, 0x2a, 0xc9, 0x16, 0x0a, 0xb4, 0xb3, 0x5d, 0x44, 0x28, 0x23, -0x80, 0x7a, 0x3e, 0xda, 0x02, 0x6d, 0x03, 0x47, 0xcd, 0x2a, 0xab, 0xa4, -0xce, 0x63, 0x0b, 0x5e, 0x3a, 0xf2, 0x96, 0x86, 0xa9, 0x9f, 0x2a, 0x9a, -0xff, 0x8f, 0x94, 0x91, 0xc8, 0x3c, 0xf2, 0x5a, 0xaa, 0xda, 0x6b, 0x8e, -0x02, 0xfc, 0x42, 0x4b, 0xfe, 0xf3, 0x23, 0x0a, 0xf8, 0x1a, 0x5c, 0x9a, -0x5c, 0x0d, 0x71, 0xef, 0x85, 0x64, 0xa6, 0x4d, 0x6a, 0x8b, 0x82, 0x58, -0x2e, 0xbc, 0xfb, 0xb9, 0xdf, 0xb8, 0xce, 0x3d, 0x03, 0xf3, 0x07, 0x18, -0x4a, 0x13, 0x82, 0x8a, 0xea, 0x24, 0x57, 0x72, 0xe2, 0x33, 0x9d, 0xb3, -0x0c, 0x57, 0xcf, 0xab, 0xdd, 0xee, 0xf8, 0xd7, 0x2a, 0x75, 0xf5, 0xd7, -0x28, 0xed, 0x0f, 0xb7, 0x02, 0xec, 0x5f, 0xed, 0x50, 0xae, 0x6b, 0xf3, -0x80, 0x29, 0x7b, 0xa2, 0x75, 0x61, 0xfd, 0x20, 0x01, 0x2b, 0xdf, 0x8b, -0x3c, 0x2a, 0xb9, 0x1d, 0x92, 0xed, 0x0f, 0xad, 0x73, 0x74, 0x1e, 0xd8, -0x06, 0xa6, 0x4a, 0x6b, 0x89, 0xd0, 0x07, 0x2a, 0xe6, 0x0b, 0x56, 0xd3, -0x48, 0x17, 0xf6, 0x99, 0x31, 0x41, 0x21, 0x99, 0x51, 0xf6, 0xb1, 0x6c, -0x02, 0xcd, 0x11, 0xe7, 0xcc, 0xd3, 0xc5, 0x6c, 0x06, 0xf4, 0x39, 0x62, -0x37, 0x88, 0x37, 0xad, 0x1f, 0x36, 0x81, 0xfa, 0xd7, 0x4b, 0x9f, 0x57, -0x0f, 0x5b, 0xc3, 0x53, 0x14, 0x53, 0x41, 0x3a, 0x2b, 0xab, 0x6e, 0xf4, -0xd8, 0x7f, 0xc5, 0x67, 0x08, 0x70, 0xd7, 0x9b, 0x59, 0xe1, 0xe0, 0x57, -0xe2, 0xf4, 0x04, 0x82, 0x06, 0x6a, 0xd5, 0xa2, 0x76, 0x64, 0x41, 0x7f, -0x3b, 0xe6, 0x33, 0xb9, 0x39, 0x68, 0xda, 0x0d, 0x13, 0x03, 0x63, 0xc8, -0x07, 0x94, 0x70, 0xf9, 0xfb, 0xd8, 0x99, 0x31, 0xa1, 0x53, 0x1c, 0x20, -0x43, 0x12, 0xeb, 0xff, 0xa4, 0x5d, 0x64, 0x7c, 0x24, 0x9e, 0xe0, 0x03, -0x80, 0x8e, 0xfb, 0xdc, 0xee, 0xfd, 0x1f, 0xef, 0x03, 0x43, 0x07, 0x44, -0xef, 0xb3, 0x71, 0x39, 0x77, 0x61, 0x5c, 0xa9, 0x32, 0x54, 0x33, 0x98, -0xa2, 0x14, 0x6a, 0x13, 0x53, 0x22, 0x94, 0xa2, 0xce, 0x15, 0xe7, 0xd0, -0x30, 0xf2, 0x6b, 0x07, 0x02, 0x56, 0x28, 0xc3, 0xb1, 0x39, 0xf9, 0xc7, -0xda, 0xe2, 0xfd, 0xd0, 0xa8, 0x1b, 0xe8, 0xb2, 0xe3, 0x75, 0x02, 0xb8, -0x90, 0xa4, 0xa5, 0x8f, 0x23, 0xa1, 0xcd, 0x75, 0xe7, 0x51, 0x37, 0xe5, -0x09, 0x27, 0x38, 0x30, 0x06, 0x44, 0x13, 0xef, 0xfe, 0x70, 0x5c, 0x4a, -0x21, 0xff, 0xf8, 0xf5, 0xbb, 0xc9, 0x6e, 0xa8, 0x7e, 0x00, 0xb1, 0xd7, -0x5e, 0x55, 0xcf, 0xc7, 0x34, 0x6b, 0x8d, 0xd5, 0x04, 0xce, 0x6e, 0xca, -0x11, 0x5a, 0xb3, 0x0c, 0x33, 0x79, 0x5f, 0xde, 0xd9, 0xdb, 0x8c, 0xfa, -0x73, 0x4e, 0x1e, 0xfa, 0xa1, 0x21, 0x6d, 0xa3, 0x6d, 0xe8, 0x69, 0x02, -0x9e, 0xcc, 0x4d, 0x14, 0x09, 0xb5, 0x7c, 0xba, 0x98, 0xc2, 0xe3, 0xaa, -0x82, 0x6a, 0x0f, 0x1e, 0x4c, 0x6c, 0x9e, 0xb8, 0xb6, 0xa3, 0x5d, 0x06, -0xfe, 0x99, 0x5c, 0x62, 0xa9, 0x19, 0x4e, 0x84, 0x61, 0xc7, 0xf9, 0x78, -0x04, 0x39, 0xda, 0xb4, 0x79, 0x32, 0x63, 0x60, 0xa6, 0x69, 0x86, 0x5c, -0xff, 0xb0, 0x71, 0xd0, 0xf5, 0x5e, 0x3c, 0xb2, 0x5d, 0x81, 0x4f, 0x9f, -0xe4, 0xf7, 0x3b, 0xc7, 0xc5, 0x80, 0x5e, 0x8e, 0x01, 0x23, 0xfa, 0xfc, -0x09, 0xae, 0x12, 0x55, 0xf2, 0xd0, 0x50, 0x5c, 0xed, 0xc6, 0xd6, 0x81, -0x9a, 0xa7, 0x93, 0xa3, 0xf4, 0xac, 0xe5, 0x3e, 0xdb, 0x5a, 0x05, 0xb7, -0x0b, 0x80, 0xad, 0xa9, 0x08, 0xf1, 0x5a, 0xb5, 0x09, 0x23, 0x52, 0x65, -0x46, 0x64, 0x79, 0xf2, 0x47, 0x04, 0x72, 0x48, 0x4e, 0x01, 0x55, 0x4a, -0x67, 0x8d, 0x1e, 0x07, 0xc7, 0x46, 0x87, 0xf6, 0x50, 0xc3, 0xa6, 0x6b -// }; -// unsigned int epid_v_precmp_dat_len = 576; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifier-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifier-testhelper.cc deleted file mode 100644 index 8dd541d979..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifier-testhelper.cc +++ /dev/null @@ -1,214 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Test fixture class for EpidVerifier. -*/ -#include -#include "epid/verifier/1.1/unittests/verifier-testhelper.h" -const Epid11G3ElemStr Epid11VerifierTest::kG3IdentityStr = {0}; -const Epid11GroupPubKey Epid11VerifierTest::kPubKeyStr = { - // gid - { - 0x00, 0x00, 0x00, 0x7b, - }, - // h1 - {{0x08, 0x4a, 0x9d, 0x2e, 0xf9, 0x4f, 0x78, 0x02, 0xd7, 0x89, 0x75, 0xb4, - 0xe7, 0x25, 0x26, 0x9f, 0x00, 0x57, 0xad, 0x33, 0x30, 0xea, 0xa9, 0x6c, - 0x00, 0x9e, 0x8b, 0xc8, 0x13, 0x23, 0xcb, 0x06}, - {0x04, 0xbe, 0x42, 0x74, 0x11, 0x07, 0xb1, 0x06, 0xd7, 0xef, 0x5f, 0x66, - 0x87, 0xd9, 0xfa, 0xdd, 0x53, 0xae, 0xd7, 0xf4, 0x54, 0xf8, 0xd0, 0x21, - 0x75, 0xe0, 0x07, 0x44, 0xc9, 0xc3, 0x4e, 0xf7}}, - // h2 - {{0x06, 0xd8, 0xa9, 0x90, 0x02, 0x8f, 0xca, 0xa5, 0x73, 0x36, 0x24, 0x03, - 0xc9, 0xa8, 0x7e, 0x9d, 0x64, 0x12, 0xac, 0xa7, 0xbd, 0x17, 0x7f, 0x7c, - 0x96, 0x8d, 0x2e, 0x13, 0xd9, 0xb2, 0x69, 0x47}, - {0x09, 0xdb, 0xe3, 0xbf, 0xbc, 0xa1, 0x34, 0x0f, 0xc6, 0xe2, 0x00, 0x3d, - 0x98, 0xa3, 0x7d, 0xab, 0xd4, 0x0e, 0xec, 0xde, 0x4f, 0x97, 0xa9, 0xbb, - 0xdd, 0x60, 0x94, 0x24, 0x7b, 0xb3, 0xf5, 0x94}}, - // w - {{{0x02, 0x43, 0x78, 0x9f, 0x54, 0xc1, 0x21, 0x3a, 0x2b, 0x4d, 0x12, 0x65, - 0x2f, 0x51, 0x94, 0xc6, 0x34, 0x24, 0xd9, 0x7b, 0x06, 0x3a, 0xc4, 0xf5, - 0x56, 0xeb, 0x32, 0xe3, 0xee, 0x7b, 0xad, 0x6b}, - {0x04, 0x90, 0x86, 0x31, 0x18, 0x2a, 0xa4, 0xcf, 0xa3, 0x90, 0xa5, 0x80, - 0x7b, 0xae, 0x3b, 0xb1, 0x77, 0x03, 0xe7, 0x7e, 0xf2, 0xfc, 0x6d, 0x3a, - 0xab, 0x8f, 0xbf, 0x95, 0x40, 0xed, 0x08, 0x03}, - {0x01, 0x05, 0x86, 0xf5, 0x42, 0xea, 0x4d, 0xf7, 0x4f, 0xef, 0x46, 0xdf, - 0x8f, 0xe8, 0x2d, 0xbb, 0x5d, 0x0d, 0x2f, 0x4f, 0xf4, 0xd8, 0x31, 0xc6, - 0x5a, 0x97, 0x98, 0x44, 0xcf, 0x42, 0x5a, 0xf3}}, - {{0x03, 0x5f, 0xb6, 0x38, 0x45, 0x5a, 0x15, 0x1e, 0xb9, 0x54, 0xfa, 0x2c, - 0x3f, 0x68, 0x7b, 0x4e, 0x85, 0x35, 0xf3, 0x5b, 0xe5, 0xdc, 0x96, 0x2b, - 0x18, 0x84, 0x5e, 0x1e, 0x53, 0xdc, 0x22, 0x23}, - {0x06, 0x08, 0x91, 0x5a, 0x2d, 0x27, 0xe2, 0x12, 0x69, 0xfa, 0xab, 0x19, - 0x7c, 0x47, 0x6b, 0xec, 0xde, 0xc6, 0x25, 0xd4, 0x43, 0xb4, 0x65, 0x23, - 0x61, 0x0f, 0x1f, 0x2d, 0xfd, 0xb1, 0x18, 0xb0}, - {0x04, 0x8e, 0x1a, 0xc5, 0x95, 0x9a, 0x0e, 0x37, 0x7c, 0x5e, 0x95, 0x38, - 0xc2, 0xcf, 0xfa, 0x1f, 0xe3, 0x3a, 0x2b, 0x85, 0xa5, 0xfd, 0x6b, 0xc4, - 0x1d, 0xfb, 0x47, 0x27, 0xaf, 0xc1, 0x94, 0xcd}}}}; -const Epid11Params Epid11VerifierTest::kParamsStr = { -#include "epid/common/1.1/src/epid11params_tate.inc" -}; -const std::vector Epid11VerifierTest::kGrpXPrivRl = { -#include "epid/common-testhelper/1.1/testdata/grp_x/privrl.inc" -}; -const std::vector Epid11VerifierTest::kGrpXPrivRlSingleEntry = { -#include "epid/common-testhelper/1.1/testdata/grp_x/privrl_single_entry.inc" -}; - -const Epid11VerifierPrecomp Epid11VerifierTest::kVerifierPrecompStr = { -#include "epid/verifier/1.1/unittests/testdata/verifier_precmp.inc" -}; -const std::vector Epid11VerifierTest::kSigRl = { - // gid - 0x00, 0x00, 0x00, 0x7b, - // rev - 0x00, 0x00, 0x00, 0x02, - // n2 - 0x00, 0x00, 0x00, 0x02, - // bks - // bk1 - 0x09, 0x0d, 0x6f, 0x82, 0x77, 0x88, 0x49, 0x53, 0xba, 0x1e, 0x1b, 0x0e, - 0x5e, 0xae, 0xc0, 0x27, 0xad, 0xe3, 0xb1, 0x09, 0x4f, 0xcd, 0xb6, 0xe6, - 0x6f, 0x7f, 0xa3, 0x1a, 0x1e, 0xfb, 0x52, 0x72, 0xfa, 0x85, 0x0f, 0x5c, - 0x97, 0x61, 0xbf, 0x46, 0x7e, 0xec, 0xd6, 0x64, 0xda, 0xa9, 0x8e, 0xf5, - 0xd3, 0xdf, 0xfa, 0x13, 0x5a, 0xb2, 0x3e, 0xeb, 0x0a, 0x9d, 0x02, 0xc0, - 0x33, 0xec, 0x2a, 0x70, 0x41, 0xb7, 0xa4, 0xc8, 0x43, 0x3f, 0x0b, 0xc2, - 0x80, 0x31, 0xbe, 0x75, 0x65, 0xe9, 0xbb, 0x81, 0x73, 0x5b, 0x91, 0x4f, - 0x3f, 0xd7, 0xbe, 0xb5, 0x19, 0x56, 0x3f, 0x18, 0x95, 0xea, 0xc1, 0xd7, - 0xa4, 0x5e, 0xb9, 0x86, 0xfc, 0xe5, 0xc4, 0x0f, 0x54, 0x37, 0xab, 0xed, - 0x59, 0x20, 0xce, 0x67, 0x68, 0x3c, 0x25, 0x4d, 0xbc, 0x5f, 0x6a, 0x4d, - 0x5a, 0xa7, 0x93, 0xce, 0x90, 0x2d, 0x3e, 0x5a, - // bk2 - 0x67, 0x58, 0xb2, 0x9c, 0xad, 0x61, 0x1f, 0xfb, 0x74, 0x23, 0xea, 0x40, - 0xe9, 0x66, 0x26, 0xb0, 0x43, 0xdc, 0x7e, 0xc7, 0x48, 0x88, 0x56, 0x59, - 0xf3, 0x35, 0x9f, 0xdb, 0xfa, 0xa2, 0x49, 0x51, 0x85, 0x35, 0x42, 0x50, - 0x8e, 0x79, 0x79, 0xc0, 0x6c, 0xcc, 0x39, 0x0b, 0xad, 0x3b, 0x39, 0x33, - 0xae, 0xb2, 0xa1, 0xc5, 0x28, 0x6f, 0x48, 0x3a, 0xd2, 0x63, 0x5d, 0xfb, - 0x1b, 0x1f, 0x8a, 0x63, 0x5b, 0x9f, 0xe7, 0x93, 0x5f, 0xc6, 0x1e, 0xe5, - 0x9b, 0x52, 0x04, 0x03, 0x85, 0x28, 0x5c, 0x24, 0x96, 0xaa, 0xbb, 0xe1, - 0xdd, 0x03, 0x90, 0x68, 0xe0, 0x13, 0xe8, 0x90, 0x9e, 0x68, 0x8e, 0xa0, - 0xec, 0x7b, 0xf5, 0xe9, 0x29, 0x4a, 0x3e, 0x78, 0xbd, 0xb6, 0x3c, 0x10, - 0xf8, 0xec, 0xc6, 0x2c, 0x4b, 0x4d, 0x8a, 0xc1, 0x3d, 0x65, 0xf5, 0x93, - 0x8d, 0x5b, 0x07, 0x3f, 0x78, 0x92, 0x1c, 0xfa}; -const std::vector Epid11VerifierTest::kEmptySigRl = { - // gid - 0x00, 0x00, 0x00, 0x7b, - // rev - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x00, 0x00, 0x00, 0x00, - // not bk's -}; - -const OctStr32 Epid11VerifierTest::kOctStr32_1 = {0x00, 0x00, 0x00, 0x01}; - -const std::vector Epid11VerifierTest::kGroupRlEmptyBuf = { - // RLVer - 0x00, 0x00, 0x00, 0x00, - // n3 - 0x00, 0x00, 0x00, 0x00}; - -const std::vector Epid11VerifierTest::kGroupRl3GidBuf = { - // RLVer - 0x00, 0x00, 0x00, 0x03, - // n3 - 0x00, 0x00, 0x00, 0x03, - // gid[0] - 0x00, 0x00, 0x00, 0x01, - // gid[1] - 0x00, 0x00, 0x00, 0x02, - // gid[2] - 0x00, 0x00, 0x00, 0x03, -}; - -const std::vector Epid11VerifierTest::kMsg0 = { - 't', 'e', 's', 't', ' ', 'm', 'e', 's', 's', 'a', 'g', 'e'}; -const std::vector Epid11VerifierTest::kBsn0 = {'b', 'a', 's', 'e', 'n', - 'a', 'm', 'e', '1'}; - -const std::vector Epid11VerifierTest::kSigGrpXMember0Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0.inc" -}; -const std::vector - Epid11VerifierTest::kSigGrpXMember0Sha256Bsn0Msg0SingleEntry = { -#include "epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0_single_entry.inc" -}; -const std::vector - Epid11VerifierTest::kSigGrpXMember0Sha256Bsn0Msg0ThreeEntry = { -#include "epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg0_three_entry.inc" -}; -const std::vector Epid11VerifierTest::kSigGrpXMember0Sha256Bsn0Msg1 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn0_msg1.inc" -}; -const std::vector Epid11VerifierTest::kSigGrpXMember0Sha256Bsn1Msg0 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_bsn1_msg0.inc" -}; -const std::vector - Epid11VerifierTest::kSigGrpXMember0Sha256RandbaseMsg0 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_rndbase_msg0.inc" -}; -const std::vector - Epid11VerifierTest::kSigGrpXMember0Sha256RandbaseMsg0N2One = { -#include "epid/common-testhelper/1.1/testdata/grp_x/sig_sha256_bsnrnd_msg0.inc" -}; -const std::vector - Epid11VerifierTest::kSigGrpXMember0Sha256RandbaseMsg1 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/member0/sig_sha256_rndbase_msg1.inc" -}; -const std::vector Epid11VerifierTest::kSigGrpXMember1Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/member1/sig_sha256_bsn0_msg0.inc" -}; -const std::vector - Epid11VerifierTest::kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey000.inc" -}; -const std::vector - Epid11VerifierTest::kSigGrpXRevokedPrivKey001Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey001.inc" -}; -const std::vector - Epid11VerifierTest::kSigGrpXRevokedPrivKey002Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/1.1/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey002.inc" -}; -const std::vector Epid11VerifierTest::kGrpRlRevokedGrpXSingleEntry = { -#include "epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_single_entry.inc" -}; -const std::vector Epid11VerifierTest::kGrpRlRevokedGrpXFirstEntry = { -#include "epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_first_entry.inc" -}; -const std::vector Epid11VerifierTest::kGrpRlRevokedGrpXMiddleEntry = { -#include "epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_middle_entry.inc" -}; -const std::vector Epid11VerifierTest::kGrpRlRevokedGrpXLastEntry = { -#include "epid/common-testhelper/1.1/testdata/grprl_revoked_grp_x_last_entry.inc" -}; -const std::vector - Epid11VerifierTest::kGrpXSigRlMember0Bsn0Msg0SingleEntry = { -#include "epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_single_entry.inc" -}; -const std::vector - Epid11VerifierTest::kGrpXSigRlMember0Bsn0Msg0FirstEntry = { -#include "epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_first_entry.inc" -}; -const std::vector - Epid11VerifierTest::kGrpXSigRlMember0Bsn0Msg0MiddleEntry = { -#include "epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_middle_entry.inc" -}; -const std::vector - Epid11VerifierTest::kGrpXSigRlMember0Bsn0Msg0LastEntry = { -#include "epid/common-testhelper/1.1/testdata/grp_x/sigrl_member0_sig_bsn0_msg0_revoked_last_entry.inc" -}; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifier-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifier-testhelper.h deleted file mode 100644 index 9f44fd491f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifier-testhelper.h +++ /dev/null @@ -1,117 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Test fixture class for Epid11Verifier. - */ -#ifndef EPID_VERIFIER_1_1_UNITTESTS_VERIFIER_TESTHELPER_H_ -#define EPID_VERIFIER_1_1_UNITTESTS_VERIFIER_TESTHELPER_H_ - -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/1.1/api.h" -} - -/// Test fixture class for Epid11Verifier -class Epid11VerifierTest : public ::testing::Test { - public: - /// Serialized identity element in G3 - static const Epid11G3ElemStr kG3IdentityStr; - /// test public key - static const Epid11GroupPubKey kPubKeyStr; - /// the message "test message" - static const std::vector kMsg0; - /// the basename "basename1" - static const std::vector kBsn0; - /// the privrl of group X - static const std::vector kGrpXPrivRl; - /// a single entry privrl for group X - static const std::vector kGrpXPrivRlSingleEntry; - /// verifier pre-computation data associated with pub_key_str - static const Epid11VerifierPrecomp kVerifierPrecompStr; - /// Intel(R) EPID 1.1 parameters - static const Epid11Params kParamsStr; - /// signature of msg0 by member0 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXMember0Sha256Bsn0Msg0; - /// signature of msg0 by member0 of groupX with Sha256 bsn0 with one NrProof - static const std::vector kSigGrpXMember0Sha256Bsn0Msg0SingleEntry; - /// signature of msg0 by member0 of groupX with Sha256 bsn0 with three NrProof - static const std::vector kSigGrpXMember0Sha256Bsn0Msg0ThreeEntry; - /// signature of msg1 by member0 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXMember0Sha256Bsn0Msg1; - /// signature of msg0 by member0 of groupX with Sha256 bsn1 - static const std::vector kSigGrpXMember0Sha256Bsn1Msg0; - /// signature of msg0 by member0 of groupX with Sha256 rnd base - static const std::vector kSigGrpXMember0Sha256RandbaseMsg0; - /// signature of msg0 by member0 of groupX with Sha256 rnd base with n2==1 - static const std::vector kSigGrpXMember0Sha256RandbaseMsg0N2One; - /// signature of msg1 by member0 of groupX with Sha256 rnd base - static const std::vector kSigGrpXMember0Sha256RandbaseMsg1; - /// signature of msg0 by member1 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXMember1Sha256Bsn0Msg0; - /// signature of msg0 by priv revoked member 0 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - /// signature of msg0 by priv revoked member 1 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXRevokedPrivKey001Sha256Bsn0Msg0; - /// signature of msg0 by priv revoked member 2 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXRevokedPrivKey002Sha256Bsn0Msg0; - - /// group based rl test data (empty rl) - static const std::vector kGroupRlEmptyBuf; - /// group based rl test data (v=3, n=3, 3 revoked gid) - static const std::vector kGroupRl3GidBuf; - - /// a group revocation list with single group revoked - static const std::vector kGrpRlRevokedGrpXSingleEntry; - /// a group revocation list with multiple entries - static const std::vector kGrpRlRevokedGrpXFirstEntry; - /// a group revocation list with multiple entries - static const std::vector kGrpRlRevokedGrpXMiddleEntry; - /// a group revocation list with multiple entries - static const std::vector kGrpRlRevokedGrpXLastEntry; - - /// signature based revocation list - static const std::vector kSigRl; - /// signature based revocation list (empty rl) - static const std::vector kEmptySigRl; - - /// setup called before each TEST_F starts - virtual void SetUp() {} - /// teardown called after each TEST_F finishes - virtual void TearDown() {} - - /// value "1" represented as an octstr constant - /*! - this value is used frequently to set 32 bit fields. describing as a constant - here - to reduce replication in code. - */ - static const OctStr32 kOctStr32_1; - /// the sigrl of group X - static const std::vector kGrpXSigRlMember0Bsn0Msg0SingleEntry; - /// the sigrl of group X - static const std::vector kGrpXSigRlMember0Bsn0Msg0FirstEntry; - /// the sigrl of group X - static const std::vector kGrpXSigRlMember0Bsn0Msg0MiddleEntry; - /// the sigrl of group X - static const std::vector kGrpXSigRlMember0Bsn0Msg0LastEntry; -}; - -#endif // EPID_VERIFIER_1_1_UNITTESTS_VERIFIER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verify-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verify-test.cc deleted file mode 100644 index e755b1584c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verify-test.cc +++ /dev/null @@ -1,720 +0,0 @@ -/*############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################*/ - -/*! -* \file -* \brief Epid11Verify unit tests. -*/ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/1.1/api.h" -#include "epid/common/src/endian_convert.h" -} - -#include "epid/verifier/1.1/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/1.1/verifier_wrapper-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" - -namespace { - -TEST_F(Epid11VerifierTest, VerifyFailsGivenNullParameters) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - auto msg = this->kMsg0; - - EXPECT_EQ(kEpidBadArgErr, - Epid11Verify(nullptr, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, Epid11Verify(verifier, nullptr, sig.size(), - msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), nullptr, msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyFailsGivenSigLenTooShortForRlCount) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11VerifierSetSigRl(verifier, (Epid11SigRl const*)this->kSigRl.data(), - this->kSigRl.size()); - auto sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - auto n2 = ntohl(((Epid11SigRl const*)this->kSigRl.data())->n2.data); - sig.resize(sizeof(Epid11Signature) + - (n2 - 2) * sizeof(((Epid11Signature*)0)->sigma)); - auto msg = this->kMsg0; - - EXPECT_EQ(kEpidBadArgErr, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyFailsGivenSigLenTooLongForRlCount) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11VerifierSetSigRl(verifier, (Epid11SigRl const*)this->kSigRl.data(), - this->kSigRl.size()); - auto sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - auto n2 = ntohl(((Epid11SigRl const*)this->kSigRl.data())->n2.data); - sig.resize(sizeof(Epid11Signature) + - n2 * sizeof(((Epid11Signature*)0)->sigma)); - auto msg = this->kMsg0; - - EXPECT_EQ(kEpidBadArgErr, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -#if (SIZE_MAX <= 0xFFFFFFFF) // When size_t value is 32 bit or lower -TEST_F(Epid11VerifierTest, VerifyFailsGivenRlCountTooBig) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - Epid11VerifierSetSigRl(verifier, (Epid11SigRl const*)this->kSigRl.data(), - this->kSigRl.size()); - auto sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - uint32_t n2 = SIZE_MAX / sizeof(Epid11NrProof) + 1; - uint32_t n2_ = ntohl(n2); - Epid11Signature* sig_struct = (Epid11Signature*)sig.data(); - sig_struct->n2 = *(OctStr32*)&n2_; - sig.resize(sizeof(Epid11Signature) + (n2 - 1) * sizeof(Epid11NrProof)); - auto msg = this->kMsg0; - - EXPECT_EQ(kEpidBadArgErr, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} -#endif - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 1 - We use the following variables T1, T2, R1, R2, -// t1, t2 (elements of G1), R4, t3 (elements of GT), -// B, K, R3, t5 (elements of G3), c, sx, sy, sa, sb, -// salpha, sbeta, nc, nc', nsx, syalpha, -// t4 (256-bit big integers), nd (80-bit big integer), -// and sf (600-bit big integer). -// This Step is not testable - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 2 - The verifier reads the verifier pre-computation -// blob (gid, e12, e22, e2w) from its storage. -// Refer to Section 3.4 for the computation of -// these values. -// This Step is not testable - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 3 - The verifier verifies gid in the public key, -// PRIV-RL, and SIG-RL (if provided) and the verifier -// pre-computation blob all match. -// This step tested with SetPrivRl, SetSigRl and ReadPrecomp functions tests -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 4 - The verifier verifies the signatures of PRIV-RL, -// SIG-RL (if provided), and Group-RL (if provided) -// using IVK. -// This Step is not testable - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 5 - If Group-RL is provided as input, the verifier -// verifies that gid has not been revoked, i.e., -// gid does not match any entry in Group-RL. - -TEST_F(Epid11VerifierTest, VerifyRejectsFromGroupRlSingleEntry) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlRevokedGrpXSingleEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetGroupRl( - verifier, (Epid11GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInGroupRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsFromGroupRlFirstEntry) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlRevokedGrpXFirstEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetGroupRl( - verifier, (Epid11GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInGroupRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsFromGroupRlMiddleEntry) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlRevokedGrpXMiddleEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetGroupRl( - verifier, (Epid11GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInGroupRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsFromGroupRlLastEntry) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlRevokedGrpXLastEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetGroupRl( - verifier, (Epid11GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInGroupRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 6 - If SIG-RL is provided as input, the verifier -// verifies that RLver and n2 values in s match with -// the values in SIG-RL. If SIG-RL is not provided -// as input, but the input signature is a not basic -// signature, the verifier aborts and outputs false. - -TEST_F(Epid11VerifierTest, VerifyFailsOnSigRlverNotMatchSigRlRlver) { - // The verifier verifies that RLver in Sigma and in SigRL - // match. If mismatch, abort and output "operation failed". - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - auto sig_rl = this->kGrpXSigRlMember0Bsn0Msg0SingleEntry; - auto sig_rl_size = sig_rl.size(); - auto sig = this->kGrpXSigRlMember0Bsn0Msg0FirstEntry; - Epid11SigRl sig_rl_wrong_ver = *(Epid11SigRl const*)sig_rl.data(); - sig_rl_wrong_ver.version.data[0]++; - THROW_ON_EPIDERR( - Epid11VerifierSetSigRl(verifier, &sig_rl_wrong_ver, sig_rl_size)); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidBadArgErr, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyFailsOnSigN2NotMatchSigRlN2) { - // The verifier verifies that n2 in Sigma and in SigRL - // match. If mismatch, abort and output "operation failed". - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - auto sig_rl = this->kGrpXSigRlMember0Bsn0Msg0MiddleEntry; - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0SingleEntry; - THROW_ON_EPIDERR(Epid11VerifierSetSigRl( - verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidBadArgErr, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyFailsSigIsNotBasicAndSigRlIsNotProvided) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0ThreeEntry; - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidBadArgErr, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 7 - The verifier verifies that G3.isIdentity(B) is false. -// -TEST_F(Epid11VerifierTest, VerifyRejectsIdentityB) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256Bsn0Msg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256Bsn0Msg0.size(); - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - memset(&sig.sigma0.B, 0, sizeof(sig.sigma0.B)); - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 8 - If bsnSize = 0, the verifier verifies G3.inGroup(B) = true. -// -TEST_F(Epid11VerifierTest, VerifyRejectsBNotInG3) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.B.x.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 9 - If bsnSize > 0, the verifier verifies B = G3.hash(bsn). -// -TEST_F(Epid11VerifierTest, VerifyRejectsBNotMatchingBasename) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256Bsn0Msg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256Bsn0Msg0.size(); - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - bsn.push_back('x'); - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 10 - The verifier verifies G3.inGroup(K) = true. -// -TEST_F(Epid11VerifierTest, VerifyRejectsKNotInG3) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.K.x.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 11 - The verifier verifies G1.inGroup(T1) = true. -// -TEST_F(Epid11VerifierTest, VerifyRejectsT1NotInG1) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.T1.x.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 12 - The verifier verifies G1.inGroup(T2) = true. -// -TEST_F(Epid11VerifierTest, VerifyRejectsT2NotInG1) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.T2.x.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 13 - The verifier verifies sx, sy, sa, sb, salpha, sbeta -// in [0, p-1]. -// -TEST_F(Epid11VerifierTest, VerifyRejectsSxNotInFp) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.sx.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSyNotInFp) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.sy.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSaNotInFp) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.sa.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSbNotInFp) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.sb.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSalphaNotInFp) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.salpha.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSbetaNotInFp) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - sig.sigma0.sbeta.data.data[0] = 0xEE; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 14 - The verifier verifies that sf is an (at-most) 593-bit -// unsigned integer, in other words, sf < 2^593. -// -TEST_F(Epid11VerifierTest, VerifyRejectsSfMoreThan592Bits) { - auto& pub_key = this->kPubKeyStr; - Epid11Signature sig = {0}; - sig.sigma0 = - *(Epid11BasicSignature*)(this->kSigGrpXMember0Sha256RandbaseMsg0.data()); - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto& msg = this->kMsg0; - memset(&sig.sigma0.sf, 0, sizeof(sig.sigma0.sf)); - sig.sigma0.sf.data[593 / CHAR_BIT] = 1 << ((593 % CHAR_BIT) - 1); - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, &sig, sig_len, msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 15 - The verifier computes nc = (-c) mod p. -// 4.1.2 step 16 - The verifier computes nc' = (-c) mod p'. -// 4.1.2 step 17 - The verifier computes nsx = (-sx) mod p. -// 4.1.2 step 18 - The verifier computes syalpha = (sy + salpha) mod p. -// 4.1.2 step 19 - The verifier computes R1 = G1.multiexp(h1, sa, h2, sb, T2, -// nc). -// 4.1.2 step 20 - The verifier computes R2 = G1.multiexp(h1, salpha, h2, -// sbeta, T2, nsx). -// 4.1.2 step 21 - The verifier computes R3 = G3.multiexp(B, sf, K, nc'). -// 4.1.2 step 22 - The verifier computes t1 = G1.multiexp(T1, nsx, g1, c). -// 4.1.2 step 23 - The verifier computes t2 = G1.exp(T1, nc). -// 4.1.2 step 24 - The verifier computes R4 = pairing(t1, g2). -// 4.1.2 step 25 - The verifier computes t3 = pairing(t2, w). -// 4.1.2 step 26 - The verifier computes R4 = GT.mul(R4, t3). -// 4.1.2 step 27 - The verifier compute t3 = GT.multiexp(e12, sf, e22, -// syalpha, e2w, sa). -// 4.1.2 step 28 - The verifier compute R4 = GT.mul(R4, t3). -// 4.1.2 step 29 - The verifier compute t4 = Hash(p || g1 || g2 || g3 -// || h1 || h2 || w || B || K -// || T1 || T2 || R1 || R2 -// || R3 || R4). -// These steps are not testable - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 30 - The verifier verifies c = H(t4 || nd || mSize || m). -// It is not practical to test all inputs to this hash -TEST_F(Epid11VerifierTest, VerifyRejectsSigWithMismatchedMsg) { - auto& pub_key = this->kPubKeyStr; - auto& sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - size_t sig_len = this->kSigGrpXMember0Sha256RandbaseMsg0.size(); - auto msg = this->kMsg0; - msg.push_back('x'); - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigInvalid, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), sig_len, - msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 31 - For i = 0, ..., n1-1, the verifier computes -// t5 = G3.exp(B, f[i]) and verifies that -// G3.isEqual(t5, K) = false. -// -TEST_F(Epid11VerifierTest, VerifyRejectsSigFromPrivRlSingleEntry) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kGrpXPrivRlSingleEntry; - auto& sig = this->kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetPrivRl( - verifier, (Epid11PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInPrivRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSigFromPrivRlFirstEntry) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig = this->kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetPrivRl( - verifier, (Epid11PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInPrivRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSigFromPrivRlMiddleEntry) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig = this->kSigGrpXRevokedPrivKey001Sha256Bsn0Msg0; - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetPrivRl( - verifier, (Epid11PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInPrivRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSigFromPrivRlLastEntry) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig = this->kSigGrpXRevokedPrivKey002Sha256Bsn0Msg0; - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetPrivRl( - verifier, (Epid11PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInPrivRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 32 - For i = 0, ..., n2-1, the verifier verifies -// nr-verify(B, K, B[i], K[i], s[i]) = true. -// The details of nr-verify will be given in the -// next subsection. - -TEST_F(Epid11VerifierTest, VerifyRejectsSigFromSigRlSingleEntry) { - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Bsn0Msg0SingleEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0SingleEntry; - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - THROW_ON_EPIDERR(Epid11VerifierSetSigRl( - verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInSigRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSigFromSigRlFirstEntry) { - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Bsn0Msg0FirstEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0ThreeEntry; - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - THROW_ON_EPIDERR(Epid11VerifierSetSigRl( - verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInSigRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSigFromSigRlMiddleEntry) { - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Bsn0Msg0MiddleEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0ThreeEntry; - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - THROW_ON_EPIDERR(Epid11VerifierSetSigRl( - verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInSigRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyRejectsSigFromSigRlLastEntry) { - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Bsn0Msg0LastEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0ThreeEntry; - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - THROW_ON_EPIDERR(Epid11VerifierSetSigRl( - verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigRevokedInSigRl, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 33 - If all the above verifications succeed, the -// verifier outputs true. If any of the above -// verifications fails, the verifier immediately -// aborts and outputs false. - -TEST_F(Epid11VerifierTest, VerifyAcceptsSigWithBaseNameNoRl) { - auto& pub_key = this->kPubKeyStr; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyAcceptsSigWithBaseNameAllRl) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGroupRlEmptyBuf; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kEmptySigRl; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetGroupRl( - verifier, (Epid11GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetPrivRl( - verifier, (Epid11PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetSigRl( - verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetBasename(verifier, bsn.data(), bsn.size())); - - EXPECT_EQ(kEpidSigValid, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyAcceptsSigWithRandomBaseNameNoRl) { - auto& pub_key = this->kPubKeyStr; - auto& sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - auto& msg = this->kMsg0; - - Epid11VerifierCtxObj verifier(pub_key); - EXPECT_EQ(kEpidSigValid, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyAcceptsSigWithRandomBaseNameAllRl) { - auto& pub_key = this->kPubKeyStr; - auto& msg = this->kMsg0; - auto& grp_rl = this->kGroupRlEmptyBuf; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kEmptySigRl; - auto& sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - - Epid11VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(Epid11VerifierSetGroupRl( - verifier, (Epid11GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetPrivRl( - verifier, (Epid11PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(Epid11VerifierSetSigRl( - verifier, (Epid11SigRl const*)sig_rl.data(), sig_rl.size())); - EXPECT_EQ(kEpidSigValid, - Epid11Verify(verifier, (Epid11Signature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifybasic-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifybasic-test.cc deleted file mode 100644 index 6f88206232..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/1.1/unittests/verifybasic-test.cc +++ /dev/null @@ -1,99 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Epid11VerifyBasicSig unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/1.1/api.h" -} - -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/verifier/1.1/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/1.1/verifier_wrapper-testhelper.h" - -namespace { - -TEST_F(Epid11VerifierTest, VerifyBasicSigFailsGivenNullPtr) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto const& sig = - (Epid11Signature const*)this->kSigGrpXMember0Sha256RandbaseMsg0.data(); - const Epid11BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kMsg0; - - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifyBasicSig(nullptr, &basic_sig, msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifyBasicSig(verifier, nullptr, msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - Epid11VerifyBasicSig(verifier, &basic_sig, nullptr, msg.size())); -} - -TEST_F(Epid11VerifierTest, - VerifyBasicSigCanVerifyValidSignatureWithSHA256AsDefault) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto const& sig = - (Epid11Signature const*)this->kSigGrpXMember0Sha256RandbaseMsg0.data(); - const Epid11BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kMsg0; - - EXPECT_EQ(kEpidNoErr, - Epid11VerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, - VerifyBasicSigDetectsInvalidSignatureGivenMatchingMessage) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto const& sig = - (Epid11Signature const*)this->kSigGrpXMember0Sha256RandbaseMsg0.data(); - const Epid11BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kMsg0; - Epid11BasicSignature corrupted_basic_sig = basic_sig; - corrupted_basic_sig.B.x.data.data[0]++; - EXPECT_NE(kEpidNoErr, Epid11VerifyBasicSig(verifier, &corrupted_basic_sig, - msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, - VerifyBasicSigDetectsInvalidSignatureGivenMessageMismatch) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto const& sig = - (Epid11Signature const*)this->kSigGrpXMember0Sha256RandbaseMsg0.data(); - const Epid11BasicSignature basic_sig = sig->sigma0; - auto msg = this->kMsg0; - msg[0]++; // change message for signature verification to fail - EXPECT_EQ(kEpidSigInvalid, - Epid11VerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -TEST_F(Epid11VerifierTest, VerifyBasicSigCanVerifyWithBasename) { - Epid11VerifierCtxObj verifier(this->kPubKeyStr); - auto const& sig = - (Epid11Signature const*)this->kSigGrpXMember0Sha256Bsn0Msg0.data(); - const Epid11BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kMsg0; - auto& basename = this->kBsn0; - THROW_ON_EPIDERR( - Epid11VerifierSetBasename(verifier, basename.data(), basename.size())); - EXPECT_EQ(kEpidNoErr, - Epid11VerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/Makefile deleted file mode 100644 index 4d151c63d2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/make -f - -#define variables -IPP_SRC_INCLUDE_DIR = ../../ext/ipp/sources/ippcp/src/ -IPP_INCLUDE_DIR = ../../ext/ipp/sources/include/ -GTEST_INCLUDE_DIR = ../../ext/ - -LIB_INSTALL_DIR = $(epidinstalldir)/lib/posix-$(ARCH)/ -TEST_INSTALL_DIR = $(epidinstalldir)/test/ -HEADERS_INSTALL_DIR = $(epidinstalldir)/include/epid/verifier/ -HEADERS_11_INSTALL_DIR = $(epidinstalldir)/include/epid/verifier/1.1/ - -API_HEADERS_INSTALL = ./api.h - -API_11_HEADERS_INSTALL = ./1.1/api.h - -VERIFIER_INCLUDE_DIR = ../../ -VERIFIER_11_INCLUDE_DIR = ../../1.1 - -VERIFIER_SRC = $(wildcard ./src/*.c) -VERIFIER_SRC += $(wildcard ./1.1/src/*.c) -VERIFIER_OBJ = $(sort $(VERIFIER_SRC:.c=.o)) -VERIFIER_LIB = ./libverifier.a - -VERIFIER_UTEST_EXE = ./verifier-utest -VERIFIER_UTEST_SRC = $(wildcard ./unittests/*.cc) -VERIFIER_UTEST_SRC += $(wildcard ./1.1/unittests/*.cc) -VERIFIER_UTEST_OBJ = $(sort $(VERIFIER_UTEST_SRC:.cc=.o)) -LIB_VERIFIER_DIR = . -LIB_COMMON_TESTHELPER_DIR = ../common-testhelper -LIB_COMMON_DIR = ../common -LIB_IPPCP_DIR = ../../ext/ipp/sources/ippcp/src -LIB_IPPCPEPID_DIR = ../../ext/ipp/sources/ippcpepid/src - -#set flags for linker -LDFLAGS += -L$(GTEST_INCLUDE_DIR)/gtest -L$(LIB_COMMON_TESTHELPER_DIR) \ - -L$(LIB_VERIFIER_DIR) -L$(LIB_COMMON_DIR) -L$(LIB_IPPCPEPID_DIR) \ - -L$(LIB_IPPCP_DIR) -lgtest -lcommon-testhelper -lverifier -lcommon \ - -lippcpepid -lippcp - -#target part -$(VERIFIER_OBJ): %.o: %.c - $(CC) $(CFLAGS) -I$(IPP_INCLUDE_DIR) -I$(IPP_SRC_INCLUDE_DIR) \ - -I$(VERIFIER_INCLUDE_DIR) -I$(VERIFIER_11_INCLUDE_DIR) -c $^ -o $@ - -$(VERIFIER_LIB): $(VERIFIER_OBJ) - $(AR) rc $(VERIFIER_LIB) $(VERIFIER_OBJ) - ranlib $(VERIFIER_LIB) - -$(VERIFIER_UTEST_EXE): $(VERIFIER_UTEST_OBJ) - $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) - -$(VERIFIER_UTEST_OBJ): %.o: %.cc - $(CXX) -o $@ $(CXXFLAGS) -I$(VERIFIER_INCLUDE_DIR) \ - -I$(VERIFIER_11_INCLUDE_DIR) -I$(GTEST_INCLUDE_DIR) -c $^ - - -build: all - -all: $(VERIFIER_LIB) - -install: - mkdir -p '$(LIB_INSTALL_DIR)' - mkdir -p '$(HEADERS_INSTALL_DIR)' - mkdir -p '$(HEADERS_11_INSTALL_DIR)' - cp $(VERIFIER_LIB) '$(LIB_INSTALL_DIR)' - cp $(API_HEADERS_INSTALL) '$(HEADERS_INSTALL_DIR)' - cp $(API_11_HEADERS_INSTALL) '$(HEADERS_11_INSTALL_DIR)' -#install tests if they exist -ifneq (,$(wildcard $(VERIFIER_UTEST_EXE))) - mkdir -p '$(TEST_INSTALL_DIR)' - cp $(VERIFIER_UTEST_EXE) '$(TEST_INSTALL_DIR)' -endif - -check: $(VERIFIER_UTEST_EXE) run - -run: - $(VERIFIER_UTEST_EXE) $(GTEST_FLAGS) - -clean: - rm -f $(VERIFIER_OBJ) \ - $(VERIFIER_LIB) \ - $(VERIFIER_UTEST_OBJ) \ - $(VERIFIER_UTEST_EXE) \ - *.xml diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/api.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/api.h deleted file mode 100644 index 7a8b790549..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/api.h +++ /dev/null @@ -1,555 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_VERIFIER_API_H_ -#define EPID_VERIFIER_API_H_ - -#include -#include "epid/common/stdtypes.h" -#include "epid/common/types.h" -#include "epid/common/errors.h" - -#ifdef __cplusplus -extern "C"{ -#endif - -/*! - * \file - * \brief Intel(R) EPID SDK verifier API. - */ - -/// Verifier functionality -/*! - \defgroup EpidVerifierModule verifier - - Defines the APIs needed by Intel(R) EPID verifiers. Each verifier - context (::VerifierCtx) represents a verifier for a single group. - - \ingroup EpidModule - @{ -*/ - -/// Internal context of verifier. -typedef struct VerifierCtx VerifierCtx; - -/// Pre-computed verifier settings. -/*! - Serialized form of the information about a verifier that remains stable for - a given set of keys. - - \note e12 = 0 implies that this data is not valid - */ -#pragma pack(1) -typedef struct VerifierPrecomp { - GroupId gid; ///< group ID - GtElemStr e12; ///< an element in GT - GtElemStr e22; ///< an element in GT - GtElemStr e2w; ///< an element in GT - GtElemStr eg12; ///< an element in GT -} VerifierPrecomp; -#pragma pack() - -/// Creates a new verifier context. -/*! - Must be called to create the verifier context that is used by - other "Verifier" APIs. - - Allocates memory for the context, then initializes it. - - EpidVerifierDelete() must be called to safely release the member context. - - - \param[in] pub_key - The group certificate. - \param[in] precomp - Optional pre-computed data. If NULL the value is computed internally and is - readable using EpidVerifierWritePrecomp(). - \param[out] ctx - Newly constructed verifier context. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the content of ctx is undefined. - - \see EpidVerifierDelete - \see EpidVerifierWritePrecomp - */ -EpidStatus EpidVerifierCreate(GroupPubKey const* pub_key, - VerifierPrecomp const* precomp, - VerifierCtx** ctx); - -/// Deletes an existing verifier context. -/*! - Must be called to safely release a verifier context created using - EpidVerifierCreate(). - - De-initializes the context, frees memory used by the context, and sets the - context pointer to NULL. - - \param[in,out] ctx - The verifier context. Can be NULL. - - \see EpidVerifierCreate - */ -void EpidVerifierDelete(VerifierCtx** ctx); - -/// Serializes the pre-computed verifier settings. -/*! - \param[in] ctx - The verifier context. - \param[out] precomp - The Serialized pre-computed verifier settings. - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the content of precomp is undefined. - */ -EpidStatus EpidVerifierWritePrecomp(VerifierCtx const* ctx, - VerifierPrecomp* precomp); - -/// Sets the private key based revocation list. -/*! - The caller is responsible for ensuring the revocation list is authorized, - e.g signed by the issuer. The caller is also responsible checking the version - of the revocation list. The call fails if trying to set an older version - of the revocation list than was last set. - - \attention - The memory pointed to by priv_rl is accessed directly by the verifier - until a new list is set or the verifier is destroyed. Do not modify the - contents of this memory. The behavior of subsequent operations that rely on - the revocation list is undefined if the memory is modified. - - \attention - It is the responsibility of the caller to free the memory pointed to by priv_rl - after the verifier is no longer using it. - - \param[in,out] ctx - The verifier context. - \param[in] priv_rl - The private key based revocation list. - \param[in] priv_rl_size - The size of the private key based revocation list in bytes. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the private key based revocation list - pointed to by the verifier is undefined. - - \see EpidVerifierCreate - */ -EpidStatus EpidVerifierSetPrivRl(VerifierCtx* ctx, PrivRl const* priv_rl, - size_t priv_rl_size); - -/// Sets the signature based revocation list. -/*! - The caller is responsible for ensuring the revocation list is authorized, - e.g signed by the issuer. The caller is also responsible checking the version - of the revocation list. The call fails if trying to set an older version - of the revocation list than was last set. - - \attention - The memory pointed to by sig_rl is accessed directly by the verifier - until a new list is set or the verifier is destroyed. Do not modify the - contents of this memory. The behavior of subsequent operations that rely on - the revocation list is undefined if the memory is modified. - - \attention - It is the responsibility of the caller to free the memory pointed to by sig_rl - after the verifier is no longer using it. - - \param[in,out] ctx - The verifier context. - \param[in] sig_rl - The signature based revocation list. - \param[in] sig_rl_size - The size of the signature based revocation list in bytes. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the signature based revocation list pointed - to by the verifier is undefined. - - \see EpidVerifierCreate - */ -EpidStatus EpidVerifierSetSigRl(VerifierCtx* ctx, SigRl const* sig_rl, - size_t sig_rl_size); - -/// Sets the group based revocation list. -/*! - The caller is responsible for ensuring the revocation list is authorized, - e.g signed by the issuer. The caller is also responsible checking the version - of the revocation list. The call fails if trying to set an older version - of the revocation list than was last set. - - \attention - The memory pointed to by grp_rl is accessed directly by the verifier - until a new list is set or the verifier is destroyed. Do not modify the - contents of this memory. The behavior of subsequent operations that rely on - the revocation list is undefined if the memory is modified. - - \attention - It is the responsibility of the caller to free the memory pointed to by grp_rl - after the verifier is no longer using it. - - \param[in,out] ctx - The verifier context. - \param[in] grp_rl - The group based revocation list. - \param[in] grp_rl_size - The size of the group based revocation list in bytes. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the group based revocation list pointed - to by the verifier is undefined. - - \see EpidVerifierCreate - */ -EpidStatus EpidVerifierSetGroupRl(VerifierCtx* ctx, GroupRl const* grp_rl, - size_t grp_rl_size); - -/// Sets the verifier revocation list. -/*! - - The caller is responsible for ensuring the revocation list is - authorized. The caller is also responsible for checking the version - of the revocation list. The call fails if trying to set an older - version of the same revocation list than was last set. - - Once ::EpidVerifierSetVerifierRl returns, callers are free to release - the memory pointed to by ver_rl. - - \param[in,out] ctx - The verifier context. - \param[in] ver_rl - The verifier revocation list. - \param[in] ver_rl_size - The size of the verifier revocation list in bytes. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr the verifier revocation list pointed - to by the verifier is undefined. - - \see EpidVerifierCreate - \see EpidBlacklistSig - \see EpidWriteVerifierRl - */ -EpidStatus EpidVerifierSetVerifierRl(VerifierCtx* ctx, VerifierRl const* ver_rl, - size_t ver_rl_size); - -/// Sets the hash algorithm to be used by a verifier. -/*! - \param[in] ctx - The verifier context. - \param[in] hash_alg - The hash algorithm to use. - - \returns ::EpidStatus - - \note - If the result is not ::kEpidNoErr, the hash algorithm used by the - verifier is undefined. - - \see EpidVerifierCreate - \see ::HashAlg - */ -EpidStatus EpidVerifierSetHashAlg(VerifierCtx* ctx, HashAlg hash_alg); - -/// Sets the basename to be used by a verifier. -/*! - - \note - A successful call to this function will clear the current verifier - blacklist. - - \param[in, out] ctx - The verifier context. - \param[in] basename - The basename. Pass NULL for random base. - \param[in] basename_len - Number of bytes in basename buffer. Must be 0 if basename is NULL. - - \returns ::EpidStatus - - \see EpidVerifierCreate - - */ -EpidStatus EpidVerifierSetBasename(VerifierCtx* ctx, void const* basename, - size_t basename_len); - -/// Verifies a signature and checks revocation status. -/*! - \param[in] ctx - The verifier context. - \param[in] sig - The signature. - \param[in] sig_len - The size of sig in bytes. - \param[in] msg - The message that was signed. - \param[in] msg_len - The size of msg in bytes. - - \returns ::EpidStatus - - \retval ::kEpidSigValid - Signature validated successfully - \retval ::kEpidSigInvalid - Signature is invalid - \retval ::kEpidSigRevokedInGroupRl - Signature revoked in GroupRl - \retval ::kEpidSigRevokedInPrivRl - Signature revoked in PrivRl - \retval ::kEpidSigRevokedInSigRl - Signature revoked in SigRl - \retval ::kEpidSigRevokedInVerifierRl - Signature revoked in VerifierRl - - \note - If the result is not ::kEpidNoErr or one of the values listed above the - verify should be considered to have failed. - - \see EpidVerifierCreate - \see EpidSignBasic - \see EpidSign - */ -EpidStatus EpidVerify(VerifierCtx const* ctx, EpidSignature const* sig, - size_t sig_len, void const* msg, size_t msg_len); - -/// Determines if two signatures are linked. -/*! - - The Intel(R) EPID scheme allows signatures to be linked. If basename - option is specified when signing, signatures with the same basename - are linkable. This linking capability allows the verifier, or - anyone, to know whether two Intel(R) EPID signatures are generated - by the same member. - - \param[in] sig1 - A basic signature. - \param[in] sig2 - A basic signature. - - \result bool - - \retval true - if the signatures were generated by the same member - \retval false - if it couldn't be determined if the signatures were generated by - the same member - - \note - The input signatures should be verified using EpidVerifyBasicSig() before - invocation. Behavior is undefined if either of the signatures cannot be - verified. - - \see EpidVerifyBasicSig - \see EpidSignBasic - \see EpidSign - */ -bool EpidAreSigsLinked(BasicSignature const* sig1, BasicSignature const* sig2); - -/// Verifies a member signature without revocation checks. -/*! - Used in constrained environments where, due to limited memory, it may not - be possible to process through a large and potentially unbounded revocation - list. - - \param[in] ctx - The verifier context. - \param[in] sig - The basic signature. - \param[in] msg - The message that was signed. - \param[in] msg_len - The size of msg in bytes. - - \returns ::EpidStatus - - \note - This function should be used in conjunction with EpidNrVerify() and - EpidCheckPrivRlEntry(). - - \note - If the result is not ::kEpidNoErr the verify should be considered to have - failed. - - \see EpidVerifierCreate - \see EpidSignBasic - \see EpidSign - */ -EpidStatus EpidVerifyBasicSig(VerifierCtx const* ctx, BasicSignature const* sig, - void const* msg, size_t msg_len); - -/// Verifies the non-revoked proof for a single signature based revocation list -/// entry. -/*! - Used in constrained environments where, due to limited memory, it may not - be possible to process through a large and potentially unbounded revocation - list. - - \param[in] ctx - The verifier context. - \param[in] sig - The basic signature. - \param[in] msg - The message that was signed. - \param[in] msg_len - The size of msg in bytes. - \param[in] sigrl_entry - The signature based revocation list entry. - \param[in] proof - The non-revoked proof. - - \returns ::EpidStatus - - \note - Sig should be verified using EpidVerifyBasicSig() before invocation. Behavior - is undefined if sig cannot be verified. - - \note - This function should be used in conjunction with EpidVerifyBasicSig() and - EpidCheckPrivRlEntry(). - - \note - If the result is not ::kEpidNoErr, the verification should be - considered to have failed. - - \see EpidVerifierCreate - \see EpidVerifyBasicSig - \see EpidCheckPrivRlEntry - */ -EpidStatus EpidNrVerify(VerifierCtx const* ctx, BasicSignature const* sig, - void const* msg, size_t msg_len, - SigRlEntry const* sigrl_entry, NrProof const* proof); - -/// Verifies a signature has not been revoked in the private key based -/// revocation list. -/*! - Used in constrained environments where, due to limited memory, it may not - be possible to process through a large and potentially unbounded revocation - list. - - \param[in] ctx - The verifier context. - \param[in] sig - The basic signature. - \param[in] f - The private key based revocation list entry. - - \note - Sig should be verified using EpidVerifyBasicSig() before invocation. Behavior - is undefined if sig cannot be verified. - - \note - This function should be used in conjunction with EpidNrVerify() and - EpidVerifyBasicSig(). - - \note - If the result is not ::kEpidNoErr the verify should be considered to have - failed. - - \returns ::EpidStatus - \see EpidVerifierCreate - \see EpidNrVerify - \see EpidVerifyBasicSig - */ -EpidStatus EpidCheckPrivRlEntry(VerifierCtx const* ctx, - BasicSignature const* sig, FpElemStr const* f); - -/// Returns the number of bytes required to serialize the verifier blacklist -/*! - - Use this function to determine the buffer size required by - ::EpidWriteVerifierRl. - - \param[in] ctx - The verifier context. - - \returns - Size in bytes required to serialize the verifier blacklist - - \see EpidVerifierCreate - \see EpidVerifierSetVerifierRl - \see EpidBlacklistSig - \see EpidWriteVerifierRl -*/ -size_t EpidGetVerifierRlSize(VerifierCtx const* ctx); - -/// Serializes the verifier blacklist to a buffer. -/*! - - If the current blacklist is empty or not set a valid empty verifier - blacklist will be serialized. - - Use ::EpidGetVerifierRlSize to determine the buffer size required to - serialize the verifier blacklist. - - \param[in] ctx - The verifier context. - \param[out] ver_rl - An existing buffer in which to write the verifier revocation list. - \param[in] ver_rl_size - The size of the caller allocated output buffer in bytes. - - \returns ::EpidStatus - - \see EpidVerifierCreate - \see EpidVerifierSetVerifierRl - \see EpidBlacklistSig - \see EpidGetVerifierRlSize -*/ -EpidStatus EpidWriteVerifierRl(VerifierCtx const* ctx, VerifierRl* ver_rl, - size_t ver_rl_size); - -/// Adds a valid name-based signature to the verifier blacklist. -/*! - - If the signature is not valid it will not be added to the blacklist. - - \param[in] ctx - The verifier context. - \param[in] sig - The name-based signature to revoke. - \param[in] sig_len - The size of sig in bytes. - \param[in] msg - The message that was signed. - \param[in] msg_len - The size of msg in bytes. - - \returns ::EpidStatus - - \see EpidVerifierCreate - \see EpidVerifierSetVerifierRl - \see EpidWriteVerifierRl -*/ -EpidStatus EpidBlacklistSig(VerifierCtx* ctx, EpidSignature const* sig, - size_t sig_len, void const* msg, size_t msg_len); - -/*! @} */ - -#ifdef __cplusplus -} -#endif - -#endif // EPID_VERIFIER_API_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/check_privrl_entry.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/check_privrl_entry.c deleted file mode 100644 index 631e19fe25..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/check_privrl_entry.c +++ /dev/null @@ -1,82 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EpidCheckPrivRlEntry implementation. - */ - -#include "epid/verifier/api.h" -#include "epid/verifier/src/context.h" -EpidStatus EpidCheckPrivRlEntry(VerifierCtx const* ctx, - BasicSignature const* sig, FpElemStr const* f) { - EpidStatus result = kEpidErr; - EcPoint* b = NULL; - EcPoint* k = NULL; - EcPoint* t4 = NULL; - EcGroup* G1 = NULL; - if (!ctx || !sig || !f) { - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->epid2_params->G1) { - return kEpidBadArgErr; - } - do { - // Section 4.1.2 Step 4.b For i = 0, ... , n1-1, the verifier computes t4 - // =G1.exp(B, f[i]) and verifies that G1.isEqual(t4, K) = false. - bool compare_result = false; - G1 = ctx->epid2_params->G1; - result = NewEcPoint(G1, &b); - if (kEpidNoErr != result) { - break; - } - result = NewEcPoint(G1, &k); - if (kEpidNoErr != result) { - break; - } - result = NewEcPoint(G1, &t4); - if (kEpidNoErr != result) { - break; - } - result = ReadEcPoint(G1, &sig->B, sizeof(sig->B), b); - if (kEpidNoErr != result) { - break; - } - result = ReadEcPoint(G1, &sig->K, sizeof(sig->K), k); - if (kEpidNoErr != result) { - break; - } - result = EcExp(G1, b, (BigNumStr const*)f, t4); - if (kEpidNoErr != result) { - break; - } - result = EcIsEqual(G1, t4, k, &compare_result); - if (kEpidNoErr != result) { - break; - } - // if t4 == k, sig revoked in PrivRl - if (compare_result) { - result = kEpidSigRevokedInPrivRl; - } else { - result = kEpidNoErr; - } - } while (0); - - DeleteEcPoint(&t4); - DeleteEcPoint(&k); - DeleteEcPoint(&b); - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/context.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/context.c deleted file mode 100644 index 811dabbd2f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/context.c +++ /dev/null @@ -1,682 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Verifier context implementation. - */ -#include -#include "epid/verifier/api.h" -#include "epid/verifier/src/context.h" -#include "epid/common/src/epid2params.h" -#include "epid/common/src/memory.h" -#include "epid/common/math/pairing.h" -#include "epid/common/src/endian_convert.h" -#include "epid/common/src/sigrlvalid.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } -/// create Verifier precomp of the VerifierCtx -static EpidStatus DoPrecomputation(VerifierCtx* ctx); - -/// Read Verifier precomp -static EpidStatus ReadPrecomputation(VerifierPrecomp const* precomp_str, - VerifierCtx* ctx); - -/// Internal function to prove if group based revocation list is valid -static bool IsGroupRlValid(GroupRl const* group_rl, size_t grp_rl_size) { - const size_t kMinGroupRlSize = sizeof(GroupRl) - sizeof(GroupId); - size_t input_grp_rl_size = 0; - - if (!group_rl || grp_rl_size < kMinGroupRlSize) { - return false; - } - if (ntohl(group_rl->n3) > (SIZE_MAX - kMinGroupRlSize) / sizeof(GroupId)) { - return false; - } - input_grp_rl_size = kMinGroupRlSize + (ntohl(group_rl->n3) * sizeof(GroupId)); - if (input_grp_rl_size != grp_rl_size) { - return false; - } - return true; -} - -/// Internal function to verify if private key based revocation list is valid -static bool IsPrivRlValid(GroupId const* gid, PrivRl const* priv_rl, - size_t priv_rl_size) { - const size_t kMinPrivRlSize = sizeof(PrivRl) - sizeof(FpElemStr); - size_t input_priv_rl_size = 0; - - if (!gid || !priv_rl || kMinPrivRlSize > priv_rl_size) { - return false; - } - if (ntohl(priv_rl->n1) > - (SIZE_MAX - kMinPrivRlSize) / sizeof(priv_rl->f[0])) { - return false; - } - // sanity check of input PrivRl size - input_priv_rl_size = - kMinPrivRlSize + ntohl(priv_rl->n1) * sizeof(priv_rl->f[0]); - if (input_priv_rl_size != priv_rl_size) { - return false; - } - // verify that gid given and gid in PrivRl match - if (0 != memcmp(gid, &priv_rl->gid, sizeof(*gid))) { - return false; - } - return true; -} - -/// Internal function to verify if verifier revocation list is valid -static bool IsVerifierRlValid(GroupId const* gid, VerifierRl const* ver_rl, - size_t ver_rl_size) { - const size_t kMinVerifierRlSize = sizeof(VerifierRl) - sizeof(G1ElemStr); - size_t expected_verifier_rl_size = 0; - - if (!gid || !ver_rl || kMinVerifierRlSize > ver_rl_size) { - return false; - } - if (ntohl(ver_rl->n4) > - (SIZE_MAX - kMinVerifierRlSize) / sizeof(ver_rl->K[0])) { - return false; - } - // sanity check of input VerifierRl size - expected_verifier_rl_size = - kMinVerifierRlSize + ntohl(ver_rl->n4) * sizeof(ver_rl->K[0]); - if (expected_verifier_rl_size != ver_rl_size) { - return false; - } - - // verify that gid in public key and gid in SigRl match - if (0 != memcmp(gid, &ver_rl->gid, sizeof(*gid))) { - return false; - } - - return true; -} - -EpidStatus EpidVerifierCreate(GroupPubKey const* pubkey, - VerifierPrecomp const* precomp, - VerifierCtx** ctx) { - EpidStatus result = kEpidErr; - VerifierCtx* verifier_ctx = NULL; - if (!pubkey || !ctx) { - return kEpidBadArgErr; - } - do { - // Allocate memory for VerifierCtx - verifier_ctx = SAFE_ALLOC(sizeof(VerifierCtx)); - if (!verifier_ctx) { - result = kEpidMemAllocErr; - break; - } - - // set SHA512 as the default hash algorithm - verifier_ctx->hash_alg = kSha512; - - // Internal representation of Epid2Params - result = CreateEpid2Params(&verifier_ctx->epid2_params); - if (kEpidNoErr != result) { - break; - } - // Internal representation of Group Pub Key - result = CreateGroupPubKey(pubkey, verifier_ctx->epid2_params->G1, - verifier_ctx->epid2_params->G2, - &verifier_ctx->pub_key); - if (kEpidNoErr != result) { - break; - } - // Store group public key strings for later use - result = SetKeySpecificCommitValues(pubkey, &verifier_ctx->commit_values); - if (kEpidNoErr != result) { - break; - } - // Allocate verifier_ctx->e12 - result = NewFfElement(verifier_ctx->epid2_params->GT, &verifier_ctx->e12); - if (kEpidNoErr != result) { - break; - } - // Allocate verifier_ctx->e22 - result = NewFfElement(verifier_ctx->epid2_params->GT, &verifier_ctx->e22); - if (kEpidNoErr != result) { - break; - } - // Allocate verifier_ctx->e2w - result = NewFfElement(verifier_ctx->epid2_params->GT, &verifier_ctx->e2w); - if (kEpidNoErr != result) { - break; - } - // Allocate verifier_ctx->eg12 - result = NewFfElement(verifier_ctx->epid2_params->GT, &verifier_ctx->eg12); - if (kEpidNoErr != result) { - break; - } - // precomputation - if (precomp != NULL) { - result = ReadPrecomputation(precomp, verifier_ctx); - } else { - result = DoPrecomputation(verifier_ctx); - } - if (kEpidNoErr != result) { - break; - } - verifier_ctx->sig_rl = NULL; - verifier_ctx->group_rl = NULL; - verifier_ctx->priv_rl = NULL; - verifier_ctx->verifier_rl = NULL; - verifier_ctx->was_verifier_rl_updated = false; - verifier_ctx->basename_hash = NULL; - verifier_ctx->basename = NULL; - verifier_ctx->basename_len = 0; - *ctx = verifier_ctx; - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result && verifier_ctx) { - DeleteFfElement(&verifier_ctx->eg12); - DeleteFfElement(&verifier_ctx->e2w); - DeleteFfElement(&verifier_ctx->e22); - DeleteFfElement(&verifier_ctx->e12); - DeleteEpid2Params(&verifier_ctx->epid2_params); - DeleteGroupPubKey(&verifier_ctx->pub_key); - SAFE_FREE(verifier_ctx); - } - return result; -} - -void EpidVerifierDelete(VerifierCtx** ctx) { - if (ctx && *ctx) { - DeleteFfElement(&(*ctx)->eg12); - DeleteFfElement(&(*ctx)->e2w); - DeleteFfElement(&(*ctx)->e22); - DeleteFfElement(&(*ctx)->e12); - DeleteGroupPubKey(&(*ctx)->pub_key); - DeleteEpid2Params(&(*ctx)->epid2_params); - (*ctx)->priv_rl = NULL; - (*ctx)->sig_rl = NULL; - (*ctx)->group_rl = NULL; - SAFE_FREE((*ctx)->verifier_rl); - DeleteEcPoint(&(*ctx)->basename_hash); - SAFE_FREE((*ctx)->basename); - (*ctx)->basename_len = 0; - SAFE_FREE(*ctx); - } -} - -EpidStatus EpidVerifierWritePrecomp(VerifierCtx const* ctx, - VerifierPrecomp* precomp) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; // an element in GT - FfElement* e22 = NULL; // an element in GT - FfElement* e2w = NULL; // an element in GT - FfElement* eg12 = NULL; // an element in GT - FiniteField* GT = NULL; // Finite field GT(Fq12 ) - if (!ctx) { - return kEpidBadArgErr; - } - if (!precomp) { - return kEpidBadArgErr; - } - if (!ctx->e12 || !ctx->e22 || !ctx->e2w || !ctx->eg12 || !ctx->epid2_params || - !ctx->epid2_params->GT || !ctx->pub_key) { - return kEpidBadArgErr; - } - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - eg12 = ctx->eg12; - GT = ctx->epid2_params->GT; - precomp->gid = ctx->pub_key->gid; - result = WriteFfElement(GT, e12, &(precomp->e12), sizeof(precomp->e12)); - if (kEpidNoErr != result) { - return result; - } - result = WriteFfElement(GT, e22, &(precomp->e22), sizeof(precomp->e22)); - if (kEpidNoErr != result) { - return result; - } - result = WriteFfElement(GT, e2w, &(precomp->e2w), sizeof(precomp->e2w)); - if (kEpidNoErr != result) { - return result; - } - result = WriteFfElement(GT, eg12, &(precomp->eg12), sizeof(precomp->eg12)); - if (kEpidNoErr != result) { - return result; - } - return result; -} - -EpidStatus EpidVerifierSetPrivRl(VerifierCtx* ctx, PrivRl const* priv_rl, - size_t priv_rl_size) { - if (!ctx || !priv_rl || !ctx->pub_key) { - return kEpidBadArgErr; - } - if (!IsPrivRlValid(&ctx->pub_key->gid, priv_rl, priv_rl_size)) { - return kEpidBadArgErr; - } - // Do not set an older version of priv rl - if (ctx->priv_rl) { - unsigned int current_ver = 0; - unsigned int incoming_ver = 0; - current_ver = ntohl(ctx->priv_rl->version); - incoming_ver = ntohl(priv_rl->version); - if (current_ver >= incoming_ver) { - return kEpidBadArgErr; - } - } - ctx->priv_rl = priv_rl; - return kEpidNoErr; -} - -EpidStatus EpidVerifierSetSigRl(VerifierCtx* ctx, SigRl const* sig_rl, - size_t sig_rl_size) { - if (!ctx || !sig_rl || !ctx->pub_key) { - return kEpidBadArgErr; - } - if (!IsSigRlValid(&ctx->pub_key->gid, sig_rl, sig_rl_size)) { - return kEpidBadArgErr; - } - // Do not set an older version of sig rl - if (ctx->sig_rl) { - unsigned int current_ver = 0; - unsigned int incoming_ver = 0; - current_ver = ntohl(ctx->sig_rl->version); - incoming_ver = ntohl(sig_rl->version); - if (current_ver >= incoming_ver) { - return kEpidBadArgErr; - } - } - ctx->sig_rl = sig_rl; - - return kEpidNoErr; -} - -EpidStatus EpidVerifierSetGroupRl(VerifierCtx* ctx, GroupRl const* grp_rl, - size_t grp_rl_size) { - if (!ctx || !grp_rl || !ctx->pub_key) { - return kEpidBadArgErr; - } - if (!IsGroupRlValid(grp_rl, grp_rl_size)) { - return kEpidBadArgErr; - } - // Do not set an older version of group rl - if (ctx->group_rl) { - unsigned int current_ver = 0; - unsigned int incoming_ver = 0; - current_ver = ntohl(ctx->group_rl->version); - incoming_ver = ntohl(grp_rl->version); - if (current_ver >= incoming_ver) { - return kEpidBadArgErr; - } - } - ctx->group_rl = grp_rl; - - return kEpidNoErr; -} - -EpidStatus EpidVerifierSetVerifierRl(VerifierCtx* ctx, VerifierRl const* ver_rl, - size_t ver_rl_size) { - VerifierRl* verifier_rl = NULL; - EpidStatus res = kEpidErr; - EcPoint* B = NULL; - bool cmp_result = false; - EcGroup* G1 = NULL; - if (!ctx || !ver_rl || !ctx->pub_key || !ctx->epid2_params || - !ctx->epid2_params->G1) { - return kEpidBadArgErr; - } - if (!IsVerifierRlValid(&ctx->pub_key->gid, ver_rl, ver_rl_size)) { - return kEpidBadArgErr; - } - // if random basename - if (!ctx->basename_hash) { - return kEpidInconsistentBasenameSetErr; - } - // Do not set an older version of verifier rl - if (ctx->verifier_rl) { - unsigned int current_ver = 0; - unsigned int incoming_ver = 0; - current_ver = ntohl(ctx->verifier_rl->version); - incoming_ver = ntohl(ver_rl->version); - if (current_ver >= incoming_ver) { - return kEpidBadArgErr; - } - } - do { - G1 = ctx->epid2_params->G1; - res = NewEcPoint(G1, &B); - BREAK_ON_EPID_ERROR(res); - res = ReadEcPoint(G1, &(ver_rl->B), sizeof(ver_rl->B), B); - BREAK_ON_EPID_ERROR(res); - // verify B = G1.hash(bsn) - res = EcIsEqual(G1, ctx->basename_hash, B, &cmp_result); - BREAK_ON_EPID_ERROR(res); - if (true != cmp_result) { - res = kEpidBadArgErr; - break; - } - verifier_rl = SAFE_ALLOC(ver_rl_size); - if (!verifier_rl) { - res = kEpidMemAllocErr; - break; - } - if (0 != memcpy_S(verifier_rl, ver_rl_size, ver_rl, ver_rl_size)) { - res = kEpidBadArgErr; - break; - } - res = kEpidNoErr; - } while (0); - DeleteEcPoint(&B); - SAFE_FREE(ctx->verifier_rl); - if (kEpidNoErr == res) { - ctx->verifier_rl = verifier_rl; - ctx->was_verifier_rl_updated = false; - } - return res; -} - -size_t EpidGetVerifierRlSize(VerifierCtx const* ctx) { - size_t empty_size = 0; - if (!ctx || !ctx->basename_hash) return 0; - empty_size = sizeof(VerifierRl) - sizeof(((VerifierRl*)0)->K[0]); - if (!ctx->verifier_rl) return empty_size; - return empty_size + - ntohl(ctx->verifier_rl->n4) * sizeof(ctx->verifier_rl->K[0]); -} - -EpidStatus EpidWriteVerifierRl(VerifierCtx const* ctx, VerifierRl* ver_rl, - size_t ver_rl_size) { - EpidStatus res = kEpidErr; - size_t real_ver_rl_size = 0; - if (!ctx || !ver_rl || !ctx->pub_key || !ctx->epid2_params || - !ctx->epid2_params->G1) { - return kEpidBadArgErr; - } - real_ver_rl_size = EpidGetVerifierRlSize(ctx); - if (real_ver_rl_size == 0) { - return kEpidErr; - } - if (real_ver_rl_size != ver_rl_size) { - return kEpidBadArgErr; - } - if (ctx->verifier_rl) { - // serialize - if (0 != - memcpy_S(ver_rl, ver_rl_size, ctx->verifier_rl, real_ver_rl_size)) { - return kEpidBadArgErr; - } - // update rl version if it has changed - if (ctx->was_verifier_rl_updated) { - uint32_t prior_rl_version = ntohl(ver_rl->version); - *((uint32_t*)(&ver_rl->version)) = htonl(prior_rl_version + 1); - ((VerifierCtx*)ctx)->was_verifier_rl_updated = false; - } - } else { - // write empty rl - res = WriteEcPoint(ctx->epid2_params->G1, ctx->basename_hash, &(ver_rl->B), - sizeof(ver_rl->B)); - if (kEpidNoErr != res) { - return res; - } - ver_rl->gid = ctx->pub_key->gid; - memset(&ver_rl->version, 0, sizeof(ver_rl->version)); - memset(&ver_rl->n4, 0, sizeof(ver_rl->n4)); - } - return kEpidNoErr; -} - -EpidStatus EpidBlacklistSig(VerifierCtx* ctx, EpidSignature const* sig, - size_t sig_len, void const* msg, size_t msg_len) { - EpidStatus result = kEpidErr; - VerifierRl* ver_rl = NULL; - if (!ctx || !sig || (!msg && msg_len > 0) || !ctx->epid2_params || - !ctx->epid2_params->G1) { - return kEpidBadArgErr; - } - if (sig_len < sizeof(EpidSignature) - sizeof(((EpidSignature*)0)->sigma[0])) { - return kEpidBadArgErr; - } - if (!ctx->basename_hash) { - return kEpidInconsistentBasenameSetErr; - } - - do { - EcGroup* G1 = ctx->epid2_params->G1; - uint32_t n4 = 0; - result = EpidVerify(ctx, sig, sig_len, msg, msg_len); - BREAK_ON_EPID_ERROR(result); - - if (!ctx->verifier_rl) { - ver_rl = SAFE_ALLOC(sizeof(VerifierRl)); - if (!ver_rl) { - result = kEpidMemAllocErr; - break; - } - // write empty rl - ver_rl->gid = ctx->pub_key->gid; - result = - WriteEcPoint(G1, ctx->basename_hash, &(ver_rl->B), sizeof(ver_rl->B)); - BREAK_ON_EPID_ERROR(result); - } else { - uint32_t prior_rl_version = ntohl(ctx->verifier_rl->version); - n4 = ntohl(ctx->verifier_rl->n4); - - if (prior_rl_version == UINT32_MAX || n4 == UINT32_MAX) { - result = kEpidBadArgErr; - break; - } - ver_rl = - SAFE_REALLOC(ctx->verifier_rl, EpidGetVerifierRlSize(ctx) + - sizeof(((VerifierRl*)0)->K[0])); - if (!ver_rl) { - result = kEpidMemAllocErr; - break; - } - } - - ctx->was_verifier_rl_updated = true; - ++n4; - ver_rl->K[n4 - 1] = sig->sigma0.K; - - *((uint32_t*)(&ver_rl->n4)) = htonl(n4); - ctx->verifier_rl = ver_rl; - result = kEpidNoErr; - } while (0); - if (kEpidNoErr != result) SAFE_FREE(ver_rl); - return result; -} - -EpidStatus EpidVerifierSetHashAlg(VerifierCtx* ctx, HashAlg hash_alg) { - EpidStatus result = kEpidErr; - if (!ctx) { - return kEpidBadArgErr; - } - if (kSha256 != hash_alg && kSha384 != hash_alg && kSha512 != hash_alg) - return kEpidBadArgErr; - - if (ctx->hash_alg != hash_alg) { - HashAlg previous_hash_alg = ctx->hash_alg; - ctx->hash_alg = hash_alg; - - result = EpidVerifierSetBasename(ctx, ctx->basename, ctx->basename_len); - if (kEpidNoErr != result) { - ctx->hash_alg = previous_hash_alg; - return result; - } - } - result = kEpidNoErr; - return result; -} - -EpidStatus EpidVerifierSetBasename(VerifierCtx* ctx, void const* basename, - size_t basename_len) { - EpidStatus result = kEpidErr; - EcPoint* basename_hash = NULL; - uint8_t* basename_buffer = NULL; - - if (!ctx || !ctx->epid2_params || !ctx->epid2_params->G1) { - return kEpidBadArgErr; - } - if (!basename && basename_len > 0) { - return kEpidBadArgErr; - } - - if (!basename) { - DeleteEcPoint(&ctx->basename_hash); - ctx->basename_hash = NULL; - ctx->was_verifier_rl_updated = false; - SAFE_FREE(ctx->basename); - ctx->basename_len = 0; - return kEpidNoErr; - } - - do { - size_t i = 0; - EcGroup* G1 = ctx->epid2_params->G1; - result = NewEcPoint(G1, &basename_hash); - if (kEpidNoErr != result) { - break; - } - - result = EcHash(G1, basename, basename_len, ctx->hash_alg, basename_hash); - if (kEpidNoErr != result) { - break; - } - - if (basename_len > 0) { - basename_buffer = SAFE_ALLOC(basename_len); - if (!basename_buffer) { - result = kEpidMemAllocErr; - break; - } - } - - SAFE_FREE(ctx->verifier_rl); - - DeleteEcPoint(&ctx->basename_hash); - ctx->basename_hash = basename_hash; - SAFE_FREE(ctx->basename); - ctx->basename = basename_buffer; - ctx->basename_len = basename_len; - for (i = 0; i < basename_len; i++) { - ctx->basename[i] = ((uint8_t*)basename)[i]; - } - result = kEpidNoErr; - } while (0); - - if (kEpidNoErr != result) { - DeleteEcPoint(&basename_hash); - SAFE_FREE(basename_buffer); - } - return result; -} - -static EpidStatus DoPrecomputation(VerifierCtx* ctx) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; - FfElement* e22 = NULL; - FfElement* e2w = NULL; - FfElement* eg12 = NULL; - Epid2Params_* params = NULL; - GroupPubKey_* pub_key = NULL; - PairingState* ps_ctx = NULL; - if (!ctx) { - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->epid2_params->GT || - !ctx->epid2_params->pairing_state || !ctx->pub_key || !ctx->e12 || - !ctx->e22 || !ctx->e2w || !ctx->eg12) { - return kEpidBadArgErr; - } - pub_key = ctx->pub_key; - params = ctx->epid2_params; - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - eg12 = ctx->eg12; - ps_ctx = params->pairing_state; - // do precomputation - // 1. The verifier computes e12 = pairing(h1, g2). - result = Pairing(ps_ctx, e12, pub_key->h1, params->g2); - if (kEpidNoErr != result) { - return result; - } - // 2. The verifier computes e22 = pairing(h2, g2). - result = Pairing(ps_ctx, e22, pub_key->h2, params->g2); - if (kEpidNoErr != result) { - return result; - } - // 3. The verifier computes e2w = pairing(h2, w). - result = Pairing(ps_ctx, e2w, pub_key->h2, pub_key->w); - if (kEpidNoErr != result) { - return result; - } - // 4. The verifier computes eg12 = pairing(g1, g2). - result = Pairing(ps_ctx, eg12, params->g1, params->g2); - if (kEpidNoErr != result) { - return result; - } - return kEpidNoErr; -} -static EpidStatus ReadPrecomputation(VerifierPrecomp const* precomp_str, - VerifierCtx* ctx) { - EpidStatus result = kEpidErr; - FfElement* e12 = NULL; - FfElement* e22 = NULL; - FfElement* e2w = NULL; - FfElement* eg12 = NULL; - FiniteField* GT = NULL; - Epid2Params_* params = NULL; - if (!ctx) { - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->epid2_params->GT || !ctx->e12 || !ctx->e22 || - !ctx->e2w || !ctx->eg12 || !ctx->pub_key) { - return kEpidBadArgErr; - } - if (0 != - memcmp(&precomp_str->gid, &ctx->pub_key->gid, sizeof(precomp_str->gid))) { - return kEpidBadArgErr; - } - params = ctx->epid2_params; - GT = params->GT; - e12 = ctx->e12; - e22 = ctx->e22; - e2w = ctx->e2w; - eg12 = ctx->eg12; - - result = ReadFfElement(GT, &precomp_str->e12, sizeof(precomp_str->e12), e12); - if (kEpidNoErr != result) { - return result; - } - result = ReadFfElement(GT, &precomp_str->e22, sizeof(precomp_str->e22), e22); - if (kEpidNoErr != result) { - return result; - } - result = ReadFfElement(GT, &precomp_str->e2w, sizeof(precomp_str->e2w), e2w); - if (kEpidNoErr != result) { - return result; - } - result = - ReadFfElement(GT, &precomp_str->eg12, sizeof(precomp_str->eg12), eg12); - if (kEpidNoErr != result) { - return result; - } - return kEpidNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/context.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/context.h deleted file mode 100644 index 705c55ed11..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/context.h +++ /dev/null @@ -1,47 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EPID_VERIFIER_SRC_CONTEXT_H_ -#define EPID_VERIFIER_SRC_CONTEXT_H_ -/*! - * \file - * \brief Verifier context interface. - */ -#include "epid/common/src/grouppubkey.h" -#include "epid/common/math/ecgroup.h" -#include "epid/common/math/finitefield.h" -#include "epid/common/src/epid2params.h" -#include "epid/common/src/commitment.h" - -/// Verifier context definition -struct VerifierCtx { - GroupPubKey_* pub_key; ///< group public key - FfElement* e12; ///< an element in GT - FfElement* e22; ///< an element in GT - FfElement* e2w; ///< an element in GT - FfElement* eg12; ///< an element in GT - PrivRl const* priv_rl; ///< Private key based revocation list - not owned - SigRl const* sig_rl; ///< Signature based revocation list - not owned - GroupRl const* group_rl; ///< Group revocation list - not owned - VerifierRl* verifier_rl; ///< Verifier revocation list - bool was_verifier_rl_updated; ///< Indicates if blacklist was updated - Epid2Params_* epid2_params; ///< Intel(R) EPID 2.0 params - CommitValues commit_values; ///< Values that are hashed to create commitment - HashAlg hash_alg; ///< Hash algorithm to use - EcPoint* basename_hash; ///< EcHash of the basename (NULL = random base) - uint8_t* basename; ///< Basename to use - size_t basename_len; ///< Number of bytes in basename -}; -#endif // EPID_VERIFIER_SRC_CONTEXT_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/nrverify.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/nrverify.c deleted file mode 100644 index d02d4a6225..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/nrverify.c +++ /dev/null @@ -1,244 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief NrVerfy implementation. - */ - -#include "epid/common/src/memory.h" -#include "epid/verifier/api.h" -#include "epid/verifier/src/context.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -#pragma pack(1) -/// Storage for values to create commitment in NrVerify algorithm -typedef struct NrVerifyCommitValues { - BigNumStr p; //!< A large prime (256-bit) - G1ElemStr g1; //!< Generator of G1 (512-bit) - G1ElemStr b; //!< (element of G1): part of basic signature Sigma0 - G1ElemStr k; //!< (element of G1): part of basic signature Sigma0 - G1ElemStr bp; //!< (element of G1): one entry in SigRL - G1ElemStr kp; //!< (element of G1): one entry in SigRL - G1ElemStr t; //!< element of G1 - G1ElemStr r1; //!< element of G1 - G1ElemStr r2; //!< element of G1 - uint8_t msg[1]; //!< message -} NrVerifyCommitValues; -#pragma pack() - -EpidStatus EpidNrVerify(VerifierCtx const* ctx, BasicSignature const* sig, - void const* msg, size_t msg_len, - SigRlEntry const* sigrl_entry, NrProof const* proof) { - size_t const cv_header_len = sizeof(NrVerifyCommitValues) - sizeof(uint8_t); - EpidStatus sts = kEpidErr; - NrVerifyCommitValues* commit_values = NULL; - size_t const commit_len = sizeof(*commit_values) + msg_len - 1; - EcPoint* t_pt = NULL; - EcPoint* k_pt = NULL; - EcPoint* b_pt = NULL; - EcPoint* kp_pt = NULL; - EcPoint* bp_pt = NULL; - EcPoint* r1_pt = NULL; - EcPoint* r2_pt = NULL; - FfElement* c_el = NULL; - FfElement* nc_el = NULL; - FfElement* smu_el = NULL; - FfElement* snu_el = NULL; - FfElement* commit_hash = NULL; - if (!ctx || !sig || !proof || !sigrl_entry) { - return kEpidBadArgErr; - } - if (!msg && (0 != msg_len)) { - return kEpidBadArgErr; - } - if (msg_len > (SIZE_MAX - cv_header_len)) { - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->epid2_params->G1 || !ctx->epid2_params->Fp) { - return kEpidBadArgErr; - } - do { - EcGroup* G1 = ctx->epid2_params->G1; - FiniteField* Fp = ctx->epid2_params->Fp; - G1ElemStr const* b = &sig->B; - G1ElemStr const* k = &sig->K; - G1ElemStr const* bp = &sigrl_entry->b; - G1ElemStr const* kp = &sigrl_entry->k; - EcPoint const* r1p[2]; - FpElemStr const* r1b[2]; - EcPoint const* r2p[3]; - FpElemStr const* r2b[3]; - FpElemStr nc_str; - bool t_is_identity; - bool c_is_equal; - - commit_values = SAFE_ALLOC(commit_len); - if (commit_values == NULL) { - sts = kEpidMemAllocErr; - break; - } - - // allocate local memory - sts = NewEcPoint(G1, &t_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(G1, &k_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(G1, &b_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(G1, &kp_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(G1, &bp_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(G1, &r1_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewEcPoint(G1, &r2_pt); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(Fp, &c_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(Fp, &nc_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(Fp, &smu_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(Fp, &snu_el); - BREAK_ON_EPID_ERROR(sts); - sts = NewFfElement(Fp, &commit_hash); - BREAK_ON_EPID_ERROR(sts); - - // 1. The verifier verifies that G1.inGroup(T) = true. - sts = ReadEcPoint(G1, &proof->T, sizeof(proof->T), t_pt); - if (kEpidNoErr != sts) { - sts = kEpidBadArgErr; - break; - } - - // 2. The verifier verifies that G1.isIdentity(T) = false. - sts = EcIsIdentity(G1, t_pt, &t_is_identity); - BREAK_ON_EPID_ERROR(sts); - if (t_is_identity) { - sts = kEpidBadArgErr; - break; - } - - // 3. The verifier verifies that c, smu, snu in [0, p-1]. - sts = ReadFfElement(Fp, &proof->c, sizeof(proof->c), c_el); - BREAK_ON_EPID_ERROR(sts); - sts = ReadFfElement(Fp, &proof->smu, sizeof(proof->smu), smu_el); - BREAK_ON_EPID_ERROR(sts); - sts = ReadFfElement(Fp, &proof->snu, sizeof(proof->snu), snu_el); - BREAK_ON_EPID_ERROR(sts); - - // 4. The verifier computes nc = (- c) mod p. - sts = FfNeg(Fp, c_el, nc_el); - BREAK_ON_EPID_ERROR(sts); - - sts = WriteFfElement(Fp, nc_el, &nc_str, sizeof(nc_str)); - BREAK_ON_EPID_ERROR(sts); - - // 5. The verifier computes R1 = G1.multiExp(K, smu, B, snu). - sts = ReadEcPoint(G1, k, sizeof(*k), k_pt); - if (kEpidNoErr != sts) { - sts = kEpidBadArgErr; - break; - } - sts = ReadEcPoint(G1, b, sizeof(*b), b_pt); - if (kEpidNoErr != sts) { - sts = kEpidBadArgErr; - break; - } - r1p[0] = k_pt; - r1p[1] = b_pt; - r1b[0] = &proof->smu; - r1b[1] = &proof->snu; - sts = EcMultiExp(G1, r1p, (const BigNumStr**)r1b, 2, r1_pt); - BREAK_ON_EPID_ERROR(sts); - - // 6. The verifier computes R2 = G1.multiExp(K', smu, B', snu, T, nc). - sts = ReadEcPoint(G1, kp, sizeof(*kp), kp_pt); - if (kEpidNoErr != sts) { - sts = kEpidBadArgErr; - break; - } - sts = ReadEcPoint(G1, bp, sizeof(*bp), bp_pt); - if (kEpidNoErr != sts) { - sts = kEpidBadArgErr; - break; - } - r2p[0] = kp_pt; - r2p[1] = bp_pt; - r2p[2] = t_pt; - r2b[0] = &proof->smu; - r2b[1] = &proof->snu; - r2b[2] = &nc_str; - sts = EcMultiExp(G1, r2p, (const BigNumStr**)r2b, 3, r2_pt); - BREAK_ON_EPID_ERROR(sts); - - // 7. The verifier verifies c = Fp.hash(p || g1 || B || K || - // B' || K' || T || R1 || R2 || m). - // Refer to Section 7.1 for hash operation over a prime field. - - // commit_values is allocated such that there are msg_len bytes available - // starting at commit_values->msg - if (msg) { - // Memory copy is used to copy a message of variable length - if (0 != memcpy_S(&commit_values->msg[0], msg_len, msg, msg_len)) { - sts = kEpidBadArgErr; - break; - } - } - commit_values->p = ctx->commit_values.p; - commit_values->g1 = ctx->commit_values.g1; - commit_values->b = sig->B; - commit_values->k = sig->K; - commit_values->bp = sigrl_entry->b; - commit_values->kp = sigrl_entry->k; - commit_values->t = proof->T; - sts = - WriteEcPoint(G1, r1_pt, &commit_values->r1, sizeof(commit_values->r1)); - BREAK_ON_EPID_ERROR(sts); - sts = - WriteEcPoint(G1, r2_pt, &commit_values->r2, sizeof(commit_values->r2)); - BREAK_ON_EPID_ERROR(sts); - sts = FfHash(Fp, commit_values, commit_len, ctx->hash_alg, commit_hash); - BREAK_ON_EPID_ERROR(sts); - sts = FfIsEqual(Fp, c_el, commit_hash, &c_is_equal); - BREAK_ON_EPID_ERROR(sts); - if (!c_is_equal) { - sts = kEpidBadArgErr; - break; - } - sts = kEpidNoErr; - } while (0); - SAFE_FREE(commit_values); - DeleteFfElement(&commit_hash); - DeleteFfElement(&snu_el); - DeleteFfElement(&smu_el); - DeleteFfElement(&nc_el); - DeleteFfElement(&c_el); - DeleteEcPoint(&r2_pt); - DeleteEcPoint(&r1_pt); - DeleteEcPoint(&bp_pt); - DeleteEcPoint(&kp_pt); - DeleteEcPoint(&b_pt); - DeleteEcPoint(&k_pt); - DeleteEcPoint(&t_pt); - return sts; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/sigs_linked.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/sigs_linked.c deleted file mode 100644 index 733233cc4d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/sigs_linked.c +++ /dev/null @@ -1,31 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief AreSigsLinked implementation. - */ - -#include - -#include - -// implements section 4.3 "Signature Linking" from Intel(R) EPID 2.0 Spec -bool EpidAreSigsLinked(BasicSignature const* sig1, BasicSignature const* sig2) { - // Step 1. If B1 = B2 and K1 = K2, output true, otherwise output false. - return (sig1 && sig2 && 0 == memcmp(&sig1->B, &sig2->B, sizeof(sig2->B)) && - 0 == memcmp(&sig1->K, &sig2->K, sizeof(sig2->K))); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/verify.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/verify.c deleted file mode 100644 index 6fce3db395..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/verify.c +++ /dev/null @@ -1,198 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Verify implementation. - */ -#include -#include "epid/verifier/api.h" -#include "epid/verifier/src/context.h" -#include "epid/common/src/endian_convert.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -static size_t EpidGetSignatureRlCount(EpidSignature const* sig) { - if (!sig) - return 0; - else - return ntohl(sig->n2); -} - -static size_t EpidGetGroupRlCount(GroupRl const* rl) { - if (!rl) - return 0; - else - return ntohl(rl->n3); -} - -static size_t EpidGetPrivRlCount(PrivRl const* rl) { - if (!rl) - return 0; - else - return ntohl(rl->n1); -} - -static size_t EpidGetSigRlCount(SigRl const* rl) { - if (!rl) - return 0; - else - return ntohl(rl->n2); -} - -static size_t EpidGetVerifierRlCount(VerifierRl const* rl) { - if (!rl) - return 0; - else - return ntohl(rl->n4); -} - -// implements section 4.1.2 "Verify algorithm" from Intel(R) EPID 2.0 Spec -EpidStatus EpidVerify(VerifierCtx const* ctx, EpidSignature const* sig, - size_t sig_len, void const* msg, size_t msg_len) { - // Step 1. Setup - size_t const sig_header_len = (sizeof(EpidSignature) - sizeof(NrProof)); - EpidStatus sts = kEpidErr; - size_t rl_count = 0; - size_t i; - if (!ctx || !sig) { - return kEpidBadArgErr; - } - if (!msg && (0 != msg_len)) { - // if message is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->pub_key) { - return kEpidBadArgErr; - } - if (sig_len < sig_header_len) { - return kEpidBadArgErr; - } - rl_count = EpidGetSignatureRlCount(sig); - if (rl_count > (SIZE_MAX - sig_header_len) / sizeof(sig->sigma[0]) || - (rl_count * sizeof(sig->sigma[0])) + sig_header_len != sig_len) { - return kEpidBadArgErr; - } - // Step 2. The verifier verifies the basic signature Sigma0 as follows: - sts = EpidVerifyBasicSig(ctx, &sig->sigma0, msg, msg_len); - if (sts != kEpidNoErr) { - // p. If any of the above verifications fails, the verifier aborts and - // outputs 1 - return kEpidSigInvalid; - } - - // Step 3. If GroupRL is provided, - if (ctx->group_rl) { - // a. The verifier verifies that gid does not match any entry in GroupRL. - size_t grouprl_count = EpidGetGroupRlCount(ctx->group_rl); - for (i = 0; i < grouprl_count; ++i) { - if (0 == memcmp(&ctx->pub_key->gid, &ctx->group_rl->gid[i], - sizeof(ctx->pub_key->gid))) { - // b. If gid matches an entry in GroupRL, aborts and returns 2. - return kEpidSigRevokedInGroupRl; - } - } - } - - // Step 4. If PrivRL is provided, - if (ctx->priv_rl) { - size_t privrl_count = EpidGetPrivRlCount(ctx->priv_rl); - // a. The verifier verifies that gid in the public key and in PrivRL match. - // If mismatch, abort and return "operation failed". - if (0 != memcmp(&ctx->pub_key->gid, &ctx->priv_rl->gid, - sizeof(ctx->pub_key->gid))) { - return kEpidBadArgErr; - } - // b. For i = 0, ..., n1-1, the verifier computes t4 =G1.exp(B, f[i]) and - // verifies that G1.isEqual(t4, K) = false. A faster private-key revocation - // check algorithm is provided in Section 4.5. - for (i = 0; i < privrl_count; ++i) { - sts = EpidCheckPrivRlEntry(ctx, &sig->sigma0, &ctx->priv_rl->f[i]); - if (sts != kEpidNoErr) { - // c. If the above step fails, the verifier aborts and output 3. - return kEpidSigRevokedInPrivRl; - } - } - } - - // Step 5. If SigRL is provided, - if (ctx->sig_rl) { - size_t sigrl_count = EpidGetSigRlCount(ctx->sig_rl); - // a. The verifier verifies that gid in the public key and in SigRL match. - // If mismatch, abort and return "operation failed". - if (0 != memcmp(&ctx->pub_key->gid, &ctx->sig_rl->gid, - sizeof(ctx->pub_key->gid))) { - return kEpidBadArgErr; - } - - // b. The verifier verifies that RLver in Sigma and in SigRL match. If - // mismatch, abort and output "operation failed". - if (0 != memcmp(&ctx->sig_rl->version, &sig->rl_ver, - sizeof(ctx->sig_rl->version))) { - return kEpidBadArgErr; - } - - // c. The verifier verifies that n2 in Sigma and in SigRL match. If - // mismatch, abort and output "operation failed". - if (sigrl_count != rl_count) { - return kEpidBadArgErr; - } - - // d. For i = 0, ..., n2-1, the verifier verifies nrVerify(B, K, B[i], - // K[i], Sigma[i]) = true. The details of nrVerify() will be given in the - // next subsection. - for (i = 0; i < sigrl_count; ++i) { - sts = EpidNrVerify(ctx, &sig->sigma0, msg, msg_len, &ctx->sig_rl->bk[i], - &sig->sigma[i]); - if (sts != kEpidNoErr) { - // e. If the above step fails, the verifier aborts and output 4. - return kEpidSigRevokedInSigRl; - } - } - } - - // Step 6. If VerifierRL is provided, - if (ctx->verifier_rl) { - // a. The verifier verifies that gid in the public key and in VerifierRL - // match. If mismatch, abort and return "operation failed". - if (0 != memcmp(&ctx->pub_key->gid, &ctx->verifier_rl->gid, - sizeof(ctx->pub_key->gid))) { - return kEpidBadArgErr; - } - - // b. The verifier verifies that B in the signature and in VerifierRL - // match. If mismatch, go to step 7. - if (0 == - memcmp(&ctx->verifier_rl->B, &sig->sigma0.B, sizeof(sig->sigma0.B))) { - size_t verifierrl_count = EpidGetVerifierRlCount(ctx->verifier_rl); - // c. For i = 0, ..., n4-1, the verifier verifies that K != K[i]. - for (i = 0; i < verifierrl_count; ++i) { - if (0 == memcmp(&ctx->verifier_rl->K[i], &sig->sigma0.K, - sizeof(sig->sigma0.K))) { - // d. If the above step fails, the verifier aborts and output 5. - return kEpidSigRevokedInVerifierRl; - } - } - } - } - - // Step 7. If all the above verifications succeed, the verifier outputs 0. - return kEpidSigValid; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/verifybasic.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/verifybasic.c deleted file mode 100644 index 3e7b15b116..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/src/verifybasic.c +++ /dev/null @@ -1,316 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief VerifyBasicSig implementation. - */ - -#include "epid/verifier/api.h" -#include "epid/verifier/src/context.h" -#include "epid/common/src/memory.h" - -/// Handle SDK Error with Break -#define BREAK_ON_EPID_ERROR(ret) \ - if (kEpidNoErr != (ret)) { \ - break; \ - } - -/// Count of elements in array -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) - -EpidStatus EpidVerifyBasicSig(VerifierCtx const* ctx, BasicSignature const* sig, - void const* msg, size_t msg_len) { - EpidStatus res = kEpidNotImpl; - - EcPoint* B = NULL; - EcPoint* K = NULL; - EcPoint* T = NULL; - EcPoint* R1 = NULL; - EcPoint* t4 = NULL; - - EcPoint* t1 = NULL; - - FfElement* R2 = NULL; - FfElement* t2 = NULL; - - FfElement* c = NULL; - FfElement* sx = NULL; - FfElement* sf = NULL; - FfElement* sa = NULL; - FfElement* sb = NULL; - FfElement* nc = NULL; - FfElement* nsx = NULL; - FfElement* c_hash = NULL; - - if (!ctx || !sig) return kEpidBadArgErr; - if (!msg && (0 != msg_len)) { - // if message is non-empty it must have both length and content - return kEpidBadArgErr; - } - if (!ctx->epid2_params || !ctx->pub_key) return kEpidBadArgErr; - - do { - bool cmp_result = false; - BigNumStr c_str = {0}; - BigNumStr sf_str = {0}; - BigNumStr nc_str = {0}; - BigNumStr nsx_str = {0}; - BigNumStr sb_str = {0}; - BigNumStr sa_str = {0}; - // handy shorthands: - EcGroup* G1 = ctx->epid2_params->G1; - EcGroup* G2 = ctx->epid2_params->G2; - FiniteField* GT = ctx->epid2_params->GT; - FiniteField* Fp = ctx->epid2_params->Fp; - EcPoint* g1 = ctx->epid2_params->g1; - EcPoint* g2 = ctx->epid2_params->g2; - EcPoint* w = ctx->pub_key->w; - CommitValues commit_values = ctx->commit_values; - EcPoint* basename_hash = ctx->basename_hash; - - if (!G1 || !G2 || !GT || !Fp || !g1 || !g2 || !w) { - res = kEpidBadArgErr; - BREAK_ON_EPID_ERROR(res); - } - - // The following variables B, K, T, R1, t4 (elements of G1), t1 - // (element of G2), R2, t2 (elements of GT), c, sx, sf, sa, sb, - // nc, nsx, t3 (256-bit integers) are used. - res = NewEcPoint(G1, &B); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &K); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &T); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &R1); - BREAK_ON_EPID_ERROR(res); - res = NewEcPoint(G1, &t4); - BREAK_ON_EPID_ERROR(res); - - res = NewEcPoint(G2, &t1); - BREAK_ON_EPID_ERROR(res); - - res = NewFfElement(GT, &R2); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(GT, &t2); - BREAK_ON_EPID_ERROR(res); - - res = NewFfElement(Fp, &c); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &sx); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &sf); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &sa); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &sb); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &nc); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &nsx); - BREAK_ON_EPID_ERROR(res); - res = NewFfElement(Fp, &c_hash); - BREAK_ON_EPID_ERROR(res); - - // 1. The verifier expect pre-computation is done (e12, e22, e2w, - // eg12). Refer to Section 3.6 for the computation of these - // values. - - // 2. The verifier verifies the basic signature sigma0 as follows: - // a. The verifier verifies G1.inGroup(B) = true. - res = ReadEcPoint(G1, &(sig->B), sizeof(sig->B), B); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - // b. The verifier verifies that G1.isIdentity(B) is false. - res = EcIsIdentity(G1, B, &cmp_result); - BREAK_ON_EPID_ERROR(res); - if (cmp_result != false) { - res = kEpidSigInvalid; - break; - } - // c. If bsn is provided, the verifier verifies B = - // G1.hash(bsn). - if (basename_hash) { - res = EcIsEqual(G1, basename_hash, B, &cmp_result); - BREAK_ON_EPID_ERROR(res); - if (cmp_result != true) { - res = kEpidSigInvalid; - break; - } - } - // d. The verifier verifies G1.inGroup(K) = true. - res = ReadEcPoint(G1, &(sig->K), sizeof(sig->K), K); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - // e. The verifier verifies G1.inGroup(T) = true. - res = ReadEcPoint(G1, &(sig->T), sizeof(sig->T), T); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - // f. The verifier verifies c, sx, sf, sa, sb in [0, p-1]. - res = ReadFfElement(Fp, &(sig->c), sizeof(sig->c), c); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - res = WriteFfElement(Fp, c, &c_str, sizeof(c_str)); - BREAK_ON_EPID_ERROR(res); - res = ReadFfElement(Fp, &(sig->sx), sizeof(sig->sx), sx); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - res = ReadFfElement(Fp, &(sig->sf), sizeof(sig->sf), sf); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - res = ReadFfElement(Fp, &(sig->sa), sizeof(sig->sa), sa); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - res = ReadFfElement(Fp, &(sig->sb), sizeof(sig->sb), sb); - if (kEpidNoErr != res) { - if (kEpidBadArgErr == res) { - res = kEpidSigInvalid; - } - break; - } - // g. The verifier computes nc = (-c) mod p. - res = FfNeg(Fp, c, nc); - BREAK_ON_EPID_ERROR(res); - // h. The verifier computes nsx = (-sx) mod p. - res = FfNeg(Fp, sx, nsx); - BREAK_ON_EPID_ERROR(res); - // i. The verifier computes R1 = G1.multiExp(B, sf, K, nc). - res = WriteFfElement(Fp, sf, &sf_str, sizeof(sf_str)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, nc, &nc_str, sizeof(nc_str)); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[2]; - BigNumStr const* exponents[2]; - points[0] = B; - points[1] = K; - exponents[0] = &sf_str; - exponents[1] = &nc_str; - res = EcMultiExp(G1, points, exponents, COUNT_OF(points), R1); - BREAK_ON_EPID_ERROR(res); - } - // j. The verifier computes t1 = G2.multiExp(g2, nsx, w, nc). - res = WriteFfElement(Fp, nsx, &nsx_str, sizeof(nsx_str)); - BREAK_ON_EPID_ERROR(res); - { - EcPoint const* points[2]; - BigNumStr const* exponents[2]; - points[0] = g2; - points[1] = w; - exponents[0] = &nsx_str; - exponents[1] = &nc_str; - res = EcMultiExp(G2, points, exponents, COUNT_OF(points), t1); - BREAK_ON_EPID_ERROR(res); - } - // k. The verifier computes R2 = pairing(T, t1). - res = Pairing(ctx->epid2_params->pairing_state, R2, T, t1); - BREAK_ON_EPID_ERROR(res); - // l. The verifier compute t2 = GT.multiExp(e12, sf, e22, sb, - // e2w, sa, eg12, c). - res = WriteFfElement(Fp, sb, &sb_str, sizeof(sb_str)); - BREAK_ON_EPID_ERROR(res); - res = WriteFfElement(Fp, sa, &sa_str, sizeof(sa_str)); - BREAK_ON_EPID_ERROR(res); - { - FfElement const* points[4]; - BigNumStr const* exponents[4]; - points[0] = ctx->e12; - points[1] = ctx->e22; - points[2] = ctx->e2w; - points[3] = ctx->eg12; - exponents[0] = &sf_str; - exponents[1] = &sb_str; - exponents[2] = &sa_str; - exponents[3] = &c_str; - res = FfMultiExp(GT, points, exponents, COUNT_OF(points), t2); - BREAK_ON_EPID_ERROR(res); - } - // m. The verifier compute R2 = GT.mul(R2, t2). - res = FfMul(GT, R2, t2, R2); - BREAK_ON_EPID_ERROR(res); - // n. The verifier compute t3 = Fp.hash(p || g1 || g2 || h1 || - // h2 || w || B || K || T || R1 || R2). - // o. The verifier verifies c = Fp.hash(t3 || m). - res = SetCalculatedCommitValues(&sig->B, &sig->K, &sig->T, R1, G1, R2, GT, - &commit_values); - BREAK_ON_EPID_ERROR(res); - res = CalculateCommitmentHash(&commit_values, Fp, ctx->hash_alg, msg, - msg_len, c_hash); - BREAK_ON_EPID_ERROR(res); - - res = FfIsEqual(Fp, c, c_hash, &cmp_result); - BREAK_ON_EPID_ERROR(res); - if (cmp_result != true) { - // p. If any of the above verifications fails, the verifier - // aborts and outputs 1. - res = kEpidSigInvalid; - break; - } - - res = kEpidNoErr; - } while (0); - - DeleteEcPoint(&B); - DeleteEcPoint(&K); - DeleteEcPoint(&T); - DeleteEcPoint(&R1); - DeleteEcPoint(&t4); - - DeleteEcPoint(&t1); - - DeleteFfElement(&R2); - DeleteFfElement(&t2); - - DeleteFfElement(&c); - DeleteFfElement(&sx); - DeleteFfElement(&sf); - DeleteFfElement(&sa); - DeleteFfElement(&sb); - DeleteFfElement(&nc); - DeleteFfElement(&nsx); - DeleteFfElement(&c_hash); - - return (res); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/check_privrl_entry-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/check_privrl_entry-test.cc deleted file mode 100644 index 20ceb079ee..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/check_privrl_entry-test.cc +++ /dev/null @@ -1,116 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief CheckPrivRlEntry unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/api.h" -} - -#include "epid/verifier/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" - -namespace { - -TEST_F(EpidVerifierTest, CheckPrivRlEntryFailsGivenNullPtr) { - // check ctx, sig, f for NULL - auto& pub_key = this->kGrpXKey; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - FpElemStr fp_str = ((PrivRl const*)priv_rl.data())->f[0]; - BasicSignature basic_signature = ((EpidSignature const*)sig.data())->sigma0; - - EXPECT_EQ(kEpidBadArgErr, - EpidCheckPrivRlEntry(nullptr, &basic_signature, &fp_str)); - EXPECT_EQ(kEpidBadArgErr, EpidCheckPrivRlEntry(verifier, nullptr, &fp_str)); - EXPECT_EQ(kEpidBadArgErr, - EpidCheckPrivRlEntry(verifier, &basic_signature, nullptr)); -} - -TEST_F(EpidVerifierTest, CheckPrivRlEntryFailsGivenRevokedPrivKey) { - // test a revoked priv key - // check ctx, sig, f for NULL - auto& pub_key = this->kGrpXKey; - auto& priv_rl = this->kGrpXPrivRl; - // signed using revoked key - auto& sig = this->kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - FpElemStr fp_str = ((PrivRl const*)priv_rl.data())->f[0]; - BasicSignature basic_signature = ((EpidSignature const*)sig.data())->sigma0; - - EXPECT_EQ(kEpidSigRevokedInPrivRl, - EpidCheckPrivRlEntry(verifier, &basic_signature, &fp_str)); -} - -TEST_F(EpidVerifierTest, - CheckPrivRlEntryFailsGivenRevokedPrivKeyUsingIkgfData) { - // test a revoked priv key - // check ctx, sig, f for NULL - auto& pub_key = this->kPubKeyIkgfStr; - auto& priv_rl = this->kPrivRlIkgf; - // signed using revoked key - auto& sig = this->kSigRevokedPrivKeySha256Bsn0Msg0Ikgf; - - VerifierCtxObj verifier(pub_key); - - FpElemStr fp_str = ((PrivRl const*)priv_rl.data())->f[2]; - BasicSignature basic_signature = ((EpidSignature const*)sig.data())->sigma0; - - EXPECT_EQ(kEpidSigRevokedInPrivRl, - EpidCheckPrivRlEntry(verifier, &basic_signature, &fp_str)); -} - -TEST_F(EpidVerifierTest, CheckPrivRlEntrySucceedsGivenUnRevokedPrivKey) { - // test a non revoked priv key - auto& pub_key = this->kGrpXKey; - auto& priv_rl = this->kGrpXPrivRl; - // signed using un revoked key - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - FpElemStr fp_str = ((PrivRl const*)priv_rl.data())->f[0]; - BasicSignature basic_signature = ((EpidSignature const*)sig.data())->sigma0; - - EXPECT_EQ(kEpidNoErr, - EpidCheckPrivRlEntry(verifier, &basic_signature, &fp_str)); -} - -TEST_F(EpidVerifierTest, - CheckPrivRlEntrySucceedsGivenUnRevokedPrivKeyUsingIkgfData) { - // test a non revoked priv key - auto& pub_key = this->kPubKeyIkgfStr; - auto& priv_rl = this->kPrivRlIkgf; - // signed using un revoked key - auto& sig = this->kSigMember0Sha256Bsn0Msg0Ikgf; - - VerifierCtxObj verifier(pub_key); - FpElemStr fp_str = ((PrivRl const*)priv_rl.data())->f[0]; - BasicSignature basic_signature = ((EpidSignature const*)sig.data())->sigma0; - - EXPECT_EQ(kEpidNoErr, - EpidCheckPrivRlEntry(verifier, &basic_signature, &fp_str)); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/context-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/context-test.cc deleted file mode 100644 index 119baeaf9d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/context-test.cc +++ /dev/null @@ -1,1074 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief VerifierCreate unit tests. - */ - -#include -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/api.h" -#include "epid/verifier/src/context.h" -#include "epid/common/src/endian_convert.h" -} - -#include "epid/verifier/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" -bool operator==(VerifierPrecomp const& lhs, VerifierPrecomp const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} - -bool operator==(OctStr32 const& lhs, OctStr32 const& rhs) { - return 0 == std::memcmp(&lhs, &rhs, sizeof(lhs)); -} -namespace { -////////////////////////////////////////////////////////////////////////// -// EpidVerifierCreate Tests -TEST_F(EpidVerifierTest, CreateFailsGivenNullPointer) { - VerifierCtx* ctx = nullptr; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierCreate(&this->kPubKeyStr, &this->kVerifierPrecompStr, - nullptr)); - EpidVerifierDelete(&ctx); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierCreate(nullptr, &this->kVerifierPrecompStr, &ctx)); - EpidVerifierDelete(&ctx); -} -TEST_F(EpidVerifierTest, CreateSucceedsGivenNullPrecomp) { - VerifierCtx* ctx = nullptr; - EXPECT_EQ(kEpidNoErr, EpidVerifierCreate(&this->kPubKeyStr, nullptr, &ctx)); - EpidVerifierDelete(&ctx); -} -TEST_F(EpidVerifierTest, CreateSucceedsGivenNullPrecompUsingIkgfData) { - VerifierCtx* ctx = nullptr; - EXPECT_EQ(kEpidNoErr, - EpidVerifierCreate(&this->kPubKeyIkgfStr, nullptr, &ctx)); - EpidVerifierDelete(&ctx); -} -TEST_F(EpidVerifierTest, CreateFailsGivenInvalidPubkey) { - VerifierCtx* ctx = nullptr; - GroupPubKey pubkey_with_bad_h1 = this->kPubKeyStr; - pubkey_with_bad_h1.h1.x.data.data[31]++; // munge h1 so not in G1 - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierCreate(&pubkey_with_bad_h1, nullptr, &ctx)); - EpidVerifierDelete(&ctx); - GroupPubKey pubkey_with_bad_h2 = this->kPubKeyStr; - pubkey_with_bad_h2.h2.x.data.data[31]++; // munge h2 so not in G1 - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierCreate(&pubkey_with_bad_h2, nullptr, &ctx)); - EpidVerifierDelete(&ctx); - GroupPubKey pubkey_with_bad_w = this->kPubKeyStr; - pubkey_with_bad_w.w.x[0].data.data[31]++; // munge w so not in G2 - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierCreate(&pubkey_with_bad_w, nullptr, &ctx)); - EpidVerifierDelete(&ctx); -} -TEST_F(EpidVerifierTest, CreateFailsGivenBadGroupIdInPrecomp) { - VerifierCtx* ctx = nullptr; - // tweak GID - auto verifier_precomp = this->kVerifierPrecompStr; - verifier_precomp.gid.data[0] = ~verifier_precomp.gid.data[0]; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierCreate(&this->kPubKeyStr, &verifier_precomp, &ctx)); -} -////////////////////////////////////////////////////////////////////////// -// EpidVerifierDelete Tests -TEST_F(EpidVerifierTest, DeleteNullsVerifierCtx) { - VerifierCtx* ctx = nullptr; - EpidVerifierCreate(&this->kPubKeyStr, nullptr, &ctx); - EpidVerifierDelete(&ctx); - EXPECT_EQ(nullptr, ctx); -} -TEST_F(EpidVerifierTest, DeleteWorksGivenNullVerifierCtx) { - EpidVerifierDelete(nullptr); - VerifierCtx* ctx = nullptr; - EpidVerifierDelete(&ctx); -} - -////////////////////////////////////////////////////////////////////////// -// EpidVerifierWritePrecomp -TEST_F(EpidVerifierTest, WritePrecompFailsGivenNullPointer) { - VerifierPrecomp precomp; - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierWritePrecomp(nullptr, &precomp)); - EXPECT_EQ(kEpidBadArgErr, EpidVerifierWritePrecomp(ctx, nullptr)); -} -TEST_F(EpidVerifierTest, WritePrecompSucceedGivenValidArgument) { - VerifierPrecomp precomp; - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - EXPECT_EQ(kEpidNoErr, EpidVerifierWritePrecomp(ctx, &precomp)); - VerifierPrecomp expected_precomp = this->kVerifierPrecompStr; - EXPECT_EQ(expected_precomp, precomp); - - VerifierCtxObj verifier2(this->kPubKeyStr); - VerifierCtx* ctx2 = verifier2; - EXPECT_EQ(kEpidNoErr, EpidVerifierWritePrecomp(ctx2, &precomp)); - EXPECT_EQ(expected_precomp, precomp); -} -////////////////////////////////////////////////////////////////////////// -// EpidVerifierSetPrivRl -TEST_F(EpidVerifierTest, SetPrivRlFailsGivenNullPointer) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetPrivRl(nullptr, &prl, sizeof(prl))); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetPrivRl(verifier, nullptr, sizeof(prl))); -} - -TEST_F(EpidVerifierTest, SetPrivRlFailsGivenZeroSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetPrivRl(verifier, &prl, 0)); -} - -// Size parameter must be at least big enough for n1 == 0 case -TEST_F(EpidVerifierTest, SetPrivRlFailsGivenTooSmallSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ( - kEpidBadArgErr, - EpidVerifierSetPrivRl(verifier, &prl, (sizeof(prl) - sizeof(prl.f)) - 1)); - prl.n1 = this->kOctStr32_1; - EXPECT_EQ( - kEpidBadArgErr, - EpidVerifierSetPrivRl(verifier, &prl, (sizeof(prl) - sizeof(prl.f)) - 1)); -} - -// Size parameter must be cross-checked with n1 value in priv_rl -TEST_F(EpidVerifierTest, SetPrivRlFailsGivenN1TooBigForSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - prl.n1 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetPrivRl(verifier, &prl, sizeof(prl) - sizeof(prl.f))); -} - -TEST_F(EpidVerifierTest, SetPrivRlFailsGivenN1TooSmallForSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetPrivRl(verifier, &prl, sizeof(prl))); -} - -TEST_F(EpidVerifierTest, SetPrivRlPassesGivenDefaultPrivRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetPrivRl(verifier, &prl, sizeof(prl) - sizeof(prl.f))); -} - -TEST_F(EpidVerifierTest, SetPrivRlPassesGivenDefaultPrivRlUsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyIkgfStr, this->kVerifierPrecompIkgfStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyIkgfStr.gid; - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetPrivRl(verifier, &prl, sizeof(prl) - sizeof(prl.f))); -} - -TEST_F(EpidVerifierTest, SetPrivRlPassesGivenEmptyPrivRlUsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyIkgfStr, this->kVerifierPrecompIkgfStr); - - uint8_t priv_rl_data_n1_zero_ikgf[] = { -#include "epid/common-testhelper/testdata/ikgf/groupa/privrl_empty.inc" - }; - PrivRl* priv_rl = reinterpret_cast(priv_rl_data_n1_zero_ikgf); - size_t priv_rl_size = sizeof(priv_rl_data_n1_zero_ikgf); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetPrivRl(verifier, priv_rl, priv_rl_size)); -} - -TEST_F(EpidVerifierTest, SetPrivRlPassesGivenPrivRlWithSingleElement) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - prl.n1 = this->kOctStr32_1; - EXPECT_EQ(kEpidNoErr, EpidVerifierSetPrivRl(verifier, &prl, sizeof(prl))); -} - -TEST_F(EpidVerifierTest, SetPrivRlFailsGivenBadGroupId) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - prl.gid.data[0] = ~prl.gid.data[0]; - prl.n1 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetPrivRl(verifier, &prl, sizeof(prl))); -} - -TEST_F(EpidVerifierTest, - SetPrivRlFailsGivenEmptyPrivRlFromDifferentGroupUsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyRevGroupIkgfStr); - auto& priv_rl = this->kEmptyPrivRlIkgf; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetPrivRl(verifier, (PrivRl const*)priv_rl.data(), - priv_rl.size())); -} - -TEST_F(EpidVerifierTest, SetPrivRlFailsGivenOldVersion) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - PrivRl prl = {{0}, {0}, {0}, {0}}; - prl.gid = this->kPubKeyStr.gid; - prl.version = this->kOctStr32_1; - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetPrivRl(verifier, &prl, sizeof(prl) - sizeof(prl.f))); - OctStr32 octstr32_0 = {0x00, 0x00, 0x00, 0x00}; - prl.version = octstr32_0; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetPrivRl(verifier, &prl, sizeof(prl) - sizeof(prl.f))); -} - -////////////////////////////////////////////////////////////////////////// -// EpidVerifierSetSigRl -TEST_F(EpidVerifierTest, SetSigRlFailsGivenNullPointer) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetSigRl(nullptr, &srl, sizeof(SigRl))); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetSigRl(verifier, nullptr, sizeof(SigRl))); -} - -TEST_F(EpidVerifierTest, SetSigRlFailsGivenZeroSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetSigRl(verifier, &srl, 0)); -} - -// Size parameter must be at least big enough for n2 == 0 case -TEST_F(EpidVerifierTest, SetSigRlFailsGivenTooSmallSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kPubKeyStr.gid; - EXPECT_EQ( - kEpidBadArgErr, - EpidVerifierSetSigRl(verifier, &srl, (sizeof(srl) - sizeof(srl.bk)) - 1)); - srl.n2 = this->kOctStr32_1; - EXPECT_EQ( - kEpidBadArgErr, - EpidVerifierSetSigRl(verifier, &srl, (sizeof(srl) - sizeof(srl.bk)) - 1)); -} - -TEST_F(EpidVerifierTest, SetSigRlFailsGivenN2TooBigForSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kPubKeyStr.gid; - srl.n2 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetSigRl(verifier, &srl, sizeof(srl) - sizeof(srl.bk))); -} - -TEST_F(EpidVerifierTest, SetSigRlFailsGivenN2TooSmallForSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetSigRl(verifier, &srl, sizeof(srl))); -} - -TEST_F(EpidVerifierTest, SetSigRlWorksGivenDefaultSigRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - size_t sig_rl_size = this->kGrp01SigRl.size(); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetSigRl(ctx, sig_rl, sig_rl_size)); -} - -TEST_F(EpidVerifierTest, SetSigRlWorksGivenDefaultSigRlUsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyIkgfStr, this->kVerifierPrecompIkgfStr); - VerifierCtx* ctx = verifier; - SigRl const* sig_rl = reinterpret_cast(this->kSigRlIkgf.data()); - size_t sig_rl_size = this->kSigRlIkgf.size(); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetSigRl(ctx, sig_rl, sig_rl_size)); -} - -TEST_F(EpidVerifierTest, SetSigRlWorksGivenSigRlWithNoElements) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - - uint8_t sig_rl_data_n2_zero[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x00, - // not bk's - }; - SigRl* sig_rl = reinterpret_cast(sig_rl_data_n2_zero); - size_t sig_rl_size = sizeof(sig_rl_data_n2_zero); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetSigRl(verifier, sig_rl, sig_rl_size)); -} - -TEST_F(EpidVerifierTest, SetSigRlWorksGivenSigRlWithNoElementsUsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyIkgfStr, this->kVerifierPrecompIkgfStr); - auto& sig_rl = this->kEmptySigRlIkgf; - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); -} - -TEST_F(EpidVerifierTest, SetSigRlWorksGivenSigRlWithOneElement) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - - uint8_t sig_rl_data_n2_one[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, - // version - 0x00, 0x00, 0x00, 0x00, - // n2 - 0x0, 0x00, 0x00, 0x01, - // one bk - 0x9c, 0xa5, 0xe5, 0xae, 0x5f, 0xae, 0x51, 0x59, 0x33, 0x35, 0x27, 0xd, - 0x8, 0xb1, 0xbe, 0x5d, 0x69, 0x50, 0x84, 0xc5, 0xfe, 0xe2, 0x87, 0xea, - 0x2e, 0xef, 0xfa, 0xee, 0x67, 0xf2, 0xd8, 0x28, 0x56, 0x43, 0xc6, 0x94, - 0x67, 0xa6, 0x72, 0xf6, 0x41, 0x15, 0x4, 0x58, 0x42, 0x16, 0x88, 0x57, - 0x9d, 0xc7, 0x71, 0xd1, 0xc, 0x84, 0x13, 0xa, 0x90, 0x23, 0x18, 0x8, 0xad, - 0x7d, 0xfe, 0xf5, 0xc8, 0xae, 0xfc, 0x51, 0x40, 0xa7, 0xd1, 0x28, 0xc2, - 0x89, 0xb2, 0x6b, 0x4e, 0xb4, 0xc1, 0x55, 0x87, 0x98, 0xbd, 0x72, 0xf9, - 0xcf, 0xd, 0x40, 0x15, 0xee, 0x32, 0xc, 0xf3, 0x56, 0xc5, 0xc, 0x61, 0x9d, - 0x4f, 0x7a, 0xb5, 0x2b, 0x16, 0xa9, 0xa3, 0x97, 0x38, 0xe2, 0xdd, 0x3a, - 0x33, 0xad, 0xf6, 0x7b, 0x68, 0x8b, 0x68, 0xcf, 0xa3, 0xd3, 0x98, 0x37, - 0xce, 0xec, 0xd1, 0xa8, 0xc, 0x8b}; - SigRl* sig_rl = reinterpret_cast(sig_rl_data_n2_one); - size_t sig_rl_size = sizeof(sig_rl_data_n2_one); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetSigRl(verifier, sig_rl, sig_rl_size)); -} - -TEST_F(EpidVerifierTest, SetSigRlFailsGivenBadGroupId) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kPubKeyStr.gid; - srl.gid.data[0] = ~srl.gid.data[0]; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetSigRl(verifier, &srl, sizeof(srl) - sizeof(srl.bk))); -} - -TEST_F(EpidVerifierTest, - SetPrivRlFailsGivenEmptySigRlFromDifferentGroupUsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyRevGroupIkgfStr); - auto& sig_rl = this->kEmptySigRlIkgf; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); -} - -TEST_F(EpidVerifierTest, SetSigRlFailsGivenOldVersion) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - SigRl srl = {{{0}}, {{0}}, {{0}}, {{{{0}, {0}}, {{0}, {0}}}}}; - srl.gid = this->kPubKeyStr.gid; - srl.version = this->kOctStr32_1; - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetSigRl(verifier, &srl, sizeof(srl) - sizeof(srl.bk))); - OctStr32 octstr32_0 = {0x00, 0x00, 0x00, 0x00}; - srl.version = octstr32_0; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetSigRl(verifier, &srl, sizeof(srl) - sizeof(srl.bk))); -} - -////////////////////////////////////////////////////////////////////////// -// EpidVerifierSetGroupRl -TEST_F(EpidVerifierTest, SetGroupRlFailsGivenNullPointer) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl grl = {{0}, {0}, {0}}; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetGroupRl(nullptr, &grl, sizeof(grl))); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetGroupRl(verifier, nullptr, sizeof(grl))); -} - -TEST_F(EpidVerifierTest, SetGroupRlFailsGivenSizeZero) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl grl = {{0}, {0}, {0}}; - size_t grl_size = 0; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetGroupRl(verifier, &grl, grl_size)); -} - -TEST_F(EpidVerifierTest, SetGroupRlFailsGivenSizeTooSmall) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl grl = {{0}, {0}, {0}}; - size_t grl_size = sizeof(grl) - sizeof(grl.gid[0]); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetGroupRl(verifier, &grl, grl_size - 1)); -} - -TEST_F(EpidVerifierTest, SetGroupRlFailsGivenSizeTooLarge) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl grl = {{0}, {0}, {0}}; - size_t grl_size = sizeof(grl) - sizeof(grl.gid[0]); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetGroupRl(verifier, &grl, grl_size + 1)); -} - -TEST_F(EpidVerifierTest, SetGroupRlFailsGivenN3ZeroAndGroupRLSizeTooBig) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl* group_rl = (GroupRl*)this->kGroupRl3GidN0Buf.data(); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetGroupRl(verifier, group_rl, - this->kGroupRl3GidN0Buf.size())); -} - -TEST_F(EpidVerifierTest, SetGroupRlFailsGivenN3TooSmall) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl* group_rl = (GroupRl*)this->kGroupRl3GidN2Buf.data(); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetGroupRl(verifier, group_rl, - this->kGroupRl3GidN2Buf.size())); -} - -TEST_F(EpidVerifierTest, SetGroupRlFailsGivenN3TooLarge) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl* group_rl = (GroupRl*)this->kGroupRl3GidN4Buf.data(); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetGroupRl(verifier, group_rl, - this->kGroupRl3GidN4Buf.size())); -} - -TEST_F(EpidVerifierTest, SetGroupRlSucceedsGivenEmptyRL) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl* empty_grl = (GroupRl*)this->kGroupRlEmptyBuf.data(); - size_t grl_size = this->kGroupRlEmptyBuf.size(); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetGroupRl(verifier, empty_grl, grl_size)); -} -TEST_F(EpidVerifierTest, SetGroupRlSucceedsGivenDefaultGroupRLUsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyIkgfStr, this->kVerifierPrecompIkgfStr); - GroupRl* empty_grl = (GroupRl*)this->kGroupRlEmptyBuf.data(); - size_t grl_size = this->kGroupRlEmptyBuf.size(); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetGroupRl(verifier, empty_grl, grl_size)); -} -TEST_F(EpidVerifierTest, SetGroupRlSucceedsGivenRLWith3gid) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl* group_rl = (GroupRl*)this->kGroupRl3GidBuf.data(); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetGroupRl(verifier, group_rl, - this->kGroupRl3GidBuf.size())); -} - -TEST_F(EpidVerifierTest, SetGroupRlFailsGivenOldVersion) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - GroupRl* group_rl = (GroupRl*)this->kGroupRl3GidBuf.data(); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetGroupRl(verifier, group_rl, - this->kGroupRl3GidBuf.size())); - GroupRl* empty_grl = (GroupRl*)this->kGroupRlEmptyBuf.data(); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetGroupRl(verifier, empty_grl, - this->kGroupRlEmptyBuf.size())); -} -////////////////////////////////////////////////////////////////////////// -// EpidVerifierSetVerifierRl -TEST_F(EpidVerifierTest, SetVerifierRlFailsGivenNullPointer) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl ver_rl = {{0}, {{0}, {0}}, {0}, {0}, {{{0}, {0}}}}; - ver_rl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetVerifierRl(nullptr, &ver_rl, sizeof(ver_rl))); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetVerifierRl(verifier, nullptr, sizeof(ver_rl))); -} - -TEST_F(EpidVerifierTest, SetVerifierRlFailsGivenMismatchedBasename) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - std::vector wrong_bsn = this->kBasename1; - wrong_bsn[wrong_bsn.size() - 1] ^= 1; - - VerifierCtx* ctx(verifier); - size_t res_ver_rl_size = this->kGrp01VerRl.size(); - THROW_ON_EPIDERR( - EpidVerifierSetBasename(ctx, wrong_bsn.data(), wrong_bsn.size())); - EXPECT_EQ( - kEpidBadArgErr, - EpidVerifierSetVerifierRl( - ctx, (VerifierRl const*)this->kGrp01VerRl.data(), res_ver_rl_size)); -} -TEST_F(EpidVerifierTest, SerVerifierRlFailsGivenRandomBase) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - VerifierCtx* ctx(verifier); - size_t res_ver_rl_size = this->kGrp01VerRl.size(); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, nullptr, 0)); - EXPECT_EQ( - kEpidInconsistentBasenameSetErr, - EpidVerifierSetVerifierRl( - ctx, (VerifierRl const*)this->kGrp01VerRl.data(), res_ver_rl_size)); -} -TEST_F(EpidVerifierTest, SetVerifierRlFailsGivenSizeZero) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl ver_rl = {{0}, {{0}, {0}}, {0}, {0}, {{{0}, {0}}}}; - ver_rl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetVerifierRl(verifier, &ver_rl, 0)); -} - -// Size parameter must be at least equal to minimum value for n4 == 0 case -TEST_F(EpidVerifierTest, SetVerifierRlFailsGivenSizeTooSmall) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl ver_rl = {{0}, {{0}, {0}}, {0}, {0}, {{{0}, {0}}}}; - ver_rl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetVerifierRl( - verifier, &ver_rl, sizeof(ver_rl) - sizeof(ver_rl.K[0]) - 1)); - ver_rl.n4 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetVerifierRl( - verifier, &ver_rl, sizeof(ver_rl) - sizeof(ver_rl.K[0]) - 1)); -} - -TEST_F(EpidVerifierTest, SetVerifierRlFailsGivenN4TooBigForSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl ver_rl = {{0}, {{0}, {0}}, {0}, {0}, {{{0}, {0}}}}; - ver_rl.gid = this->kPubKeyStr.gid; - ver_rl.n4 = this->kOctStr32_1; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetVerifierRl(verifier, &ver_rl, - sizeof(ver_rl) - sizeof(ver_rl.K[0]))); -} - -TEST_F(EpidVerifierTest, SetVerifierRlFailsGivenN4TooSmallForSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl ver_rl = {{0}, {{0}, {0}}, {0}, {0}, {{{0}, {0}}}}; - ver_rl.gid = this->kPubKeyStr.gid; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetVerifierRl(verifier, &ver_rl, sizeof(ver_rl))); -} - -TEST_F(EpidVerifierTest, SetVerifierRlWorksGivenDefaultVerifierRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl const* ver_rl_ptr = - reinterpret_cast(this->kGrp01VerRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename.data(), - this->kBasename.size())); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetVerifierRl(verifier, ver_rl_ptr, - this->kGrp01VerRl.size())); -} -TEST_F(EpidVerifierTest, SetVerifierRlCopiesGivenValidVerifierRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx(verifier); - VerifierRl* ver_rl_ptr = (VerifierRl*)(this->kGrp01VerRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename.data(), - this->kBasename.size())); - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetVerifierRl( - ctx, ver_rl_ptr, this->kGrp01VerRl.size() * sizeof(uint8_t))); - EXPECT_NE(ver_rl_ptr, ctx->verifier_rl); -} -TEST_F(EpidVerifierTest, SetVerifierRlWorksGivenVerifierRlWithNoElements) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl* ver_rl_ptr = (VerifierRl*)(this->kEmptyGrp01VerRl.data()); - - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename1.data(), - this->kBasename1.size())); - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetVerifierRl(verifier, ver_rl_ptr, - this->kEmptyGrp01VerRl.size())); -} - -TEST_F(EpidVerifierTest, SetVerifierRlWorksGivenVerifierRlWithOneElement) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - uint8_t ver_rl_data_n4_one[] = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, - // B - 0x41, 0x63, 0xfd, 0x06, 0xb8, 0xb1, 0xa6, 0x32, 0xa5, 0xe3, 0xeb, 0xc4, - 0x40, 0x11, 0x37, 0xc0, 0x62, 0x0d, 0xe1, 0xca, 0xe9, 0x79, 0xad, 0xff, - 0x1d, 0x13, 0xb3, 0xda, 0xa0, 0x10, 0x8a, 0xa8, 0x30, 0x72, 0xa4, 0xe8, - 0x27, 0xb5, 0xad, 0xdb, 0xac, 0x89, 0xd8, 0x37, 0x79, 0xd9, 0x8c, 0xd0, - 0xb3, 0xef, 0x94, 0x17, 0x4f, 0x05, 0x53, 0x4c, 0x4d, 0xf0, 0x77, 0xf7, - 0xb6, 0xaf, 0xb8, 0xfa, - // version - 0x00, 0x00, 0x00, 0x00, - // n4 - 0x00, 0x00, 0x00, 0x01, - // k's - 0xdc, 0x41, 0x24, 0xe7, 0xb8, 0xf2, 0x6d, 0xc4, 0x01, 0xf9, 0x5d, 0xf8, - 0xd9, 0x23, 0x32, 0x29, 0x0a, 0xe1, 0xf6, 0xdc, 0xa1, 0xef, 0x52, 0xf7, - 0x3a, 0x3c, 0xe6, 0x7e, 0x3d, 0x0e, 0xe8, 0x86, 0xa9, 0x58, 0xf4, 0xfe, - 0xfa, 0x8b, 0xe4, 0x1c, 0xad, 0x58, 0x5b, 0x1c, 0xc7, 0x54, 0xee, 0x7e, - 0xe7, 0x12, 0x6a, 0x4b, 0x01, 0x63, 0xb4, 0xdb, 0x6e, 0xe7, 0x7a, 0xe9, - 0x62, 0xa5, 0xb4, 0xe3, - }; - VerifierRl* ver_rl_ptr = reinterpret_cast(ver_rl_data_n4_one); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename.data(), - this->kBasename.size())); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetVerifierRl(verifier, ver_rl_ptr, - sizeof(ver_rl_data_n4_one))); -} - -TEST_F(EpidVerifierTest, CanSetVerifierRlTwice) { - VerifierCtxObj verifier(this->kGrpXKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBsn0.data(), - this->kBsn0.size())); - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetVerifierRl( - verifier, reinterpret_cast( - this->kGrpXBsn0VerRlSingleEntry.data()), - this->kGrpXBsn0VerRlSingleEntry.size())); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetVerifierRl( - verifier, reinterpret_cast( - this->kGrpXBsn0Sha256VerRl.data()), - this->kGrpXBsn0Sha256VerRl.size())); -} - -TEST_F(EpidVerifierTest, SetVerifierRlFailsGivenBadGroupId) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl ver_rl = {{0}, {{0}, {0}}, {0}, {0}, {{{0}, {0}}}}; - ver_rl.gid = this->kPubKeyStr.gid; - VerifierRl* valid_ver_rl = (VerifierRl*)(this->kEmptyGrp01VerRl.data()); - ver_rl.B = valid_ver_rl->B; - ver_rl.gid.data[0] = ~ver_rl.gid.data[0]; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetVerifierRl(verifier, &ver_rl, - sizeof(ver_rl) - sizeof(ver_rl.K[0]))); -} - -TEST_F(EpidVerifierTest, SetVerifierRlFailsGivenOldVersion) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierRl ver_rl = {{0}, {{0}, {0}}, {0}, {0}, {{{0}, {0}}}}; - VerifierRl* valid_ver_rl = (VerifierRl*)(this->kEmptyGrp01VerRl.data()); - ver_rl.B = valid_ver_rl->B; - ver_rl.gid = this->kPubKeyStr.gid; - ver_rl.version = this->kOctStr32_1; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename1.data(), - this->kBasename1.size())); - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetVerifierRl(verifier, &ver_rl, - sizeof(ver_rl) - sizeof(ver_rl.K[0]))); - OctStr32 octstr32_0 = {0x00, 0x00, 0x00, 0x00}; - ver_rl.version = octstr32_0; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetVerifierRl(verifier, &ver_rl, - sizeof(ver_rl) - sizeof(ver_rl.K[0]))); -} - -////////////////////////////////////////////////////////////////////////// -// EpidGetVerifierRlSize -TEST_F(EpidVerifierTest, GetVerifierRlSizeReturnsZeroGivenNoContext) { - EXPECT_EQ((size_t)0, EpidGetVerifierRlSize(nullptr)); -} -TEST_F(EpidVerifierTest, GetVerifierRlSizeReturnsZeroGivenRandomBase) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - EXPECT_EQ((size_t)0, EpidGetVerifierRlSize(verifier)); -} -TEST_F(EpidVerifierTest, GetVerifierRlSizeReturnsSizeOfEmptyOnNoVerRlSet) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename1.data(), - this->kBasename1.size())); - EXPECT_EQ(sizeof(VerifierRl) - sizeof(((VerifierRl*)0)->K[0]), - EpidGetVerifierRlSize(verifier)); -} -TEST_F(EpidVerifierTest, GetVerifierRlSizeWorksForEmptyVerifierRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - - VerifierRl* ver_rl_ptr = (VerifierRl*)(this->kEmptyGrp01VerRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename1.data(), - this->kBasename1.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl(verifier, ver_rl_ptr, - this->kEmptyGrp01VerRl.size())); - EXPECT_EQ(this->kEmptyGrp01VerRl.size(), EpidGetVerifierRlSize(verifier)); -} -TEST_F(EpidVerifierTest, GetVerifierRlSizeWorksForShortVerifierRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename.data(), - this->kBasename.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl*)this->kGrp01VerRlOneEntry.data(), - this->kGrp01VerRlOneEntry.size())); - EXPECT_EQ(this->kGrp01VerRlOneEntry.size(), EpidGetVerifierRlSize(verifier)); -} -TEST_F(EpidVerifierTest, GetVerifierRlSizeWorksForLongVerifierRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - std::vector ver_rl_data_long = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, - // B - 0x41, 0x63, 0xfd, 0x06, 0xb8, 0xb1, 0xa6, 0x32, 0xa5, 0xe3, 0xeb, 0xc4, - 0x40, 0x11, 0x37, 0xc0, 0x62, 0x0d, 0xe1, 0xca, 0xe9, 0x79, 0xad, 0xff, - 0x1d, 0x13, 0xb3, 0xda, 0xa0, 0x10, 0x8a, 0xa8, 0x30, 0x72, 0xa4, 0xe8, - 0x27, 0xb5, 0xad, 0xdb, 0xac, 0x89, 0xd8, 0x37, 0x79, 0xd9, 0x8c, 0xd0, - 0xb3, 0xef, 0x94, 0x17, 0x4f, 0x05, 0x53, 0x4c, 0x4d, 0xf0, 0x77, 0xf7, - 0xb6, 0xaf, 0xb8, 0xfa, - // version - 0x00, 0x00, 0x00, 0x32, - // n4 - 0x00, 0x00, 0x00, 0x32}; - const std::vector entry = { - 0xdc, 0x41, 0x24, 0xe7, 0xb8, 0xf2, 0x6d, 0xc4, 0x01, 0xf9, 0x5d, - 0xf8, 0xd9, 0x23, 0x32, 0x29, 0x0a, 0xe1, 0xf6, 0xdc, 0xa1, 0xef, - 0x52, 0xf7, 0x3a, 0x3c, 0xe6, 0x7e, 0x3d, 0x0e, 0xe8, 0x86, 0xa9, - 0x58, 0xf4, 0xfe, 0xfa, 0x8b, 0xe4, 0x1c, 0xad, 0x58, 0x5b, 0x1c, - 0xc7, 0x54, 0xee, 0x7e, 0xe7, 0x12, 0x6a, 0x4b, 0x01, 0x63, 0xb4, - 0xdb, 0x6e, 0xe7, 0x7a, 0xe9, 0x62, 0xa5, 0xb4, 0xe3}; - for (uint32_t i = 0; i < ntohl(((VerifierRl*)ver_rl_data_long.data())->n4); - ++i) { - for (auto it : entry) { - ver_rl_data_long.push_back(it); - } - } - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename.data(), - this->kBasename.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl*)ver_rl_data_long.data(), ver_rl_data_long.size())); - EXPECT_EQ(ver_rl_data_long.size(), EpidGetVerifierRlSize(verifier)); -} -////////////////////////////////////////////////////////////////////////// -// EpidWriteVerifierRl -TEST_F(EpidVerifierTest, WriteVerifierRlFailsGivenNullPointer) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename.data(), - this->kBasename.size())); - VerifierCtx* ctx(verifier); - VerifierRl res_ver_rl = {0}; - size_t res_ver_rl_size = this->kGrp01VerRl.size(); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - ctx, (VerifierRl const*)this->kGrp01VerRl.data(), res_ver_rl_size)); - EXPECT_EQ(kEpidBadArgErr, - EpidWriteVerifierRl(nullptr, &res_ver_rl, res_ver_rl_size)); - EXPECT_EQ(kEpidBadArgErr, EpidWriteVerifierRl(ctx, nullptr, res_ver_rl_size)); -} -TEST_F(EpidVerifierTest, WriteVerifierRlFailsGivenInvalidSize) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename.data(), - this->kBasename.size())); - VerifierCtx* ctx(verifier); - VerifierRl res_ver_rl = {0}; - size_t res_ver_rl_size = this->kGrp01VerRl.size(); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - ctx, (VerifierRl const*)this->kGrp01VerRl.data(), res_ver_rl_size)); - EXPECT_EQ(kEpidBadArgErr, - EpidWriteVerifierRl(ctx, &res_ver_rl, res_ver_rl_size - 1)); - EXPECT_EQ(kEpidBadArgErr, - EpidWriteVerifierRl(ctx, &res_ver_rl, res_ver_rl_size + 1)); -} -TEST_F(EpidVerifierTest, WriteVerifierRlWorksForEmptyVerifierRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename1.data(), - this->kBasename1.size())); - VerifierCtx* ctx(verifier); - - size_t res_ver_rl_size = sizeof(VerifierRl) - sizeof(((VerifierRl*)0)->K[0]); - std::vector expected_ver_rl_buf = this->kEmptyGrp01VerRl; - std::vector res_ver_rl_buf(res_ver_rl_size); - VerifierRl* res_ver_rl = (VerifierRl*)res_ver_rl_buf.data(); - - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - ctx, (VerifierRl*)this->kEmptyGrp01VerRl.data(), res_ver_rl_size)); - EXPECT_EQ(kEpidNoErr, EpidWriteVerifierRl(ctx, res_ver_rl, res_ver_rl_size)); - EXPECT_EQ(expected_ver_rl_buf, res_ver_rl_buf); -} -TEST_F(EpidVerifierTest, WriteVerifierRlCanSerializeDefaultVerifierRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename1.data(), - this->kBasename1.size())); - VerifierCtx* ctx(verifier); - size_t res_ver_rl_size = sizeof(VerifierRl) - sizeof(((VerifierRl*)0)->K[0]); - - std::vector empty_verifier_rl_buf(res_ver_rl_size); - std::vector res_ver_rl_buf(res_ver_rl_size); - VerifierRl* empty_verifier_rl = (VerifierRl*)empty_verifier_rl_buf.data(); - VerifierRl* res_ver_rl = (VerifierRl*)res_ver_rl_buf.data(); - - empty_verifier_rl->gid = ctx->pub_key->gid; - empty_verifier_rl->B = - ((EpidSignature const*)this->kSigGrp01Member0Sha256Basename1Test1NoSigRl - .data()) - ->sigma0.B; - empty_verifier_rl->n4 = {0}; - empty_verifier_rl->version = {0}; - EXPECT_EQ(kEpidNoErr, EpidWriteVerifierRl(ctx, res_ver_rl, res_ver_rl_size)); - EXPECT_EQ(empty_verifier_rl_buf, res_ver_rl_buf); -} -TEST_F(EpidVerifierTest, WriteVerifierRlWorksForNonEmptyVerifierRl) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, this->kBasename.data(), - this->kBasename.size())); - VerifierCtx* ctx(verifier); - auto expected_ver_rl = this->kGrp01VerRl; - std::vector resultant_ver_rl_buf(this->kGrp01VerRl.size()); - VerifierRl* resultant_ver_rl = (VerifierRl*)resultant_ver_rl_buf.data(); - - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - ctx, (VerifierRl const*)this->kGrp01VerRl.data(), - this->kGrp01VerRl.size())); - EXPECT_EQ(kEpidNoErr, EpidWriteVerifierRl(ctx, resultant_ver_rl, - resultant_ver_rl_buf.size())); - EXPECT_EQ(expected_ver_rl, resultant_ver_rl_buf); -} - -////////////////////////////////////////////////////////////////////////// -// EpidBlacklistSig -TEST_F(EpidVerifierTest, BlacklistSigFailsGivenNullPointer) { - VerifierCtxObj verifier(this->kGrpXKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidBlacklistSig(nullptr, (EpidSignature*)sig.data(), sig.size(), - msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, EpidBlacklistSig(verifier, nullptr, sig.size(), - msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), sig.size(), - nullptr, 1)); -} -TEST_F(EpidVerifierTest, BlacklistSigFailsGivenInvalidSignatureLength) { - VerifierCtxObj verifier(this->kGrpXKey); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), 0, - msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), - sig.size() - 1, msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), - sig.size() + 1, msg.data(), msg.size())); -} -TEST_F(EpidVerifierTest, BlacklistSigFailsGivenSigFromDiffGroup) { - VerifierCtxObj verifier(this->kGrpXKey); - auto sig = this->kSigGrp01Member0Sha256Basename1Test1NoSigRl; - auto msg = this->kTest1; - auto bsn = this->kBasename1; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), sig.size(), - msg.data(), msg.size())); -} -TEST_F(EpidVerifierTest, BlacklistSigFailsGivenSigFromDiffBasename) { - VerifierCtxObj verifier(this->kGrpXKey); - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto msg = this->kMsg0; - auto bsn = this->kBasename1; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigInvalid, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), sig.size(), - msg.data(), msg.size())); -} -TEST_F(EpidVerifierTest, BlacklistSigFailsGivenSigWithDiffHashAlg) { - VerifierCtxObj verifier(this->kGrpXKey); - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha384)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigInvalid, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), sig.size(), - msg.data(), msg.size())); -} -TEST_F(EpidVerifierTest, BlacklistSigFailsOnSigAlreadyInVerRl) { - VerifierCtxObj verifier(this->kGrpXKey); - auto sig = this->kSigGrpXVerRevokedMember0Sha256Bsn0Msg0; - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - auto ver_rl = this->kGrpXBsn0VerRlSingleEntry; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl*)ver_rl.data(), ver_rl.size())); - EXPECT_EQ(kEpidSigRevokedInVerifierRl, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), sig.size(), - msg.data(), msg.size())); -} -TEST_F(EpidVerifierTest, BlacklistSigFailsOnSigRevokedInSigRl) { - VerifierCtxObj verifier(this->kGrpXKey); - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0SingleEntrySigRl; - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - auto sig_rl = this->kGrpXSigRlMember0Sha256Bsn0Msg0OnlyEntry; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR( - EpidVerifierSetSigRl(verifier, (SigRl*)sig_rl.data(), sig_rl.size())); - EXPECT_EQ(kEpidSigRevokedInSigRl, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), sig.size(), - msg.data(), msg.size())); -} -TEST_F(EpidVerifierTest, BlacklistSigFailsOnSigRevokedInPrivRl) { - VerifierCtxObj verifier(this->kGrpXKey); - auto sig = this->kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - auto priv_rl = this->kGrpXPrivRl; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR( - EpidVerifierSetPrivRl(verifier, (PrivRl*)priv_rl.data(), priv_rl.size())); - EXPECT_EQ(kEpidSigRevokedInPrivRl, - EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), sig.size(), - msg.data(), msg.size())); -} -TEST_F(EpidVerifierTest, BlacklistSigWorksForValidSigGivenEmptyBlacklist) { - VerifierCtxObj verifier(this->kGrpXKey); - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidNoErr, EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), - sig.size(), msg.data(), msg.size())); - - std::vector ver_rl_vec(EpidGetVerifierRlSize(verifier)); - VerifierRl* ver_rl = (VerifierRl*)ver_rl_vec.data(); - size_t ver_rl_size = ver_rl_vec.size(); - - THROW_ON_EPIDERR(EpidWriteVerifierRl(verifier, ver_rl, ver_rl_size)); - - OctStr32 n4_expected = {0x00, 0x00, 0x00, 0x01}; - OctStr32 rlver_expected = {0x00, 0x00, 0x00, 0x01}; - EXPECT_EQ(n4_expected, ver_rl->n4); - EXPECT_EQ(rlver_expected, ver_rl->version); - // missing K checks here -} -TEST_F(EpidVerifierTest, - MultipleBlacklistFollowedBySerializeIncrementsRlVersionByOne) { - VerifierCtxObj verifier(this->kGrpXKey); - auto sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto msg = this->kMsg0; - auto bsn = this->kBsn0; - auto sig2 = this->kSigGrpXMember1Sha256Bsn0Msg0; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidNoErr, EpidBlacklistSig(verifier, (EpidSignature*)sig.data(), - sig.size(), msg.data(), msg.size())); - EXPECT_EQ(kEpidNoErr, EpidBlacklistSig(verifier, (EpidSignature*)sig2.data(), - sig2.size(), msg.data(), msg.size())); - std::vector ver_rl_vec(EpidGetVerifierRlSize(verifier)); - VerifierRl* ver_rl = (VerifierRl*)ver_rl_vec.data(); - size_t ver_rl_size = ver_rl_vec.size(); - - THROW_ON_EPIDERR(EpidWriteVerifierRl(verifier, ver_rl, ver_rl_size)); - - OctStr32 n4_expected = {0x00, 0x00, 0x00, 0x02}; - OctStr32 rlver_expected = {0x00, 0x00, 0x00, 0x01}; - EXPECT_EQ(n4_expected, ver_rl->n4); - EXPECT_EQ(rlver_expected, ver_rl->version); - // missing K checks -} -////////////////////////////////////////////////////////////////////////// -// EpidVerifierSetHashAlg -TEST_F(EpidVerifierTest, SetHashAlgFailsGivenNullPointer) { - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetHashAlg(nullptr, kSha256)); -} -TEST_F(EpidVerifierTest, SetHashAlgCanSetValidAlgoritm) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetHashAlg(verifier, kSha256)); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetHashAlg(verifier, kSha384)); - EXPECT_EQ(kEpidNoErr, EpidVerifierSetHashAlg(verifier, kSha512)); - // DE2089 - SHA-512/256 Hash Alg is not supported by EpidMemberSetHashAlg - // EXPECT_EQ(kEpidNoErr, EpidVerifierSetHashAlg(verifier, kSha512_256)); -} -TEST_F(EpidVerifierTest, SetHashAlgCanFailForNonSupportedAlgoritms) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetHashAlg(verifier, kSha3_256)); - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetHashAlg(verifier, kSha3_384)); - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetHashAlg(verifier, kSha3_512)); - EXPECT_EQ(kEpidBadArgErr, EpidVerifierSetHashAlg(verifier, (HashAlg)-1)); -} -TEST_F(EpidVerifierTest, DefaultHashAlgIsSha512) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - EXPECT_EQ(kSha512, ctx->hash_alg); -} -////////////////////////////////////////////////////////////////////////// -// EpidVerifierSetBasename -TEST_F(EpidVerifierTest, DefaultBasenameIsNull) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - EXPECT_EQ(nullptr, ctx->basename_hash); -} -TEST_F(EpidVerifierTest, SetBasenameFailsGivenNullContext) { - auto& basename = this->kBasename1; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetBasename(nullptr, basename.data(), basename.size())); -} -TEST_F(EpidVerifierTest, SetBasenameFailsGivenNullBasenameAndNonzeroLength) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - auto& basename = this->kBasename1; - EXPECT_EQ(kEpidBadArgErr, - EpidVerifierSetBasename(ctx, nullptr, basename.size())); -} -TEST_F(EpidVerifierTest, SetBasenameSucceedsGivenValidParameters) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - auto& basename = this->kBasename1; - EXPECT_EQ(kEpidNoErr, - EpidVerifierSetBasename(ctx, basename.data(), basename.size())); -} -TEST_F(EpidVerifierTest, SetBasenameAcceptsZeroLengthBasename) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - EXPECT_EQ(kEpidNoErr, EpidVerifierSetBasename(ctx, "", 0)); -} -TEST_F(EpidVerifierTest, SetBasenameResetsBasenameGivenNullBasename) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - auto& basename = this->kBasename1; - THROW_ON_EPIDERR( - EpidVerifierSetBasename(ctx, basename.data(), basename.size())); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, nullptr, 0)); - EXPECT_EQ(nullptr, ctx->basename_hash); -} -TEST_F(EpidVerifierTest, SetBasenameResetsVerifierBlacklist) { - VerifierCtxObj verifier(this->kPubKeyStr, this->kVerifierPrecompStr); - VerifierCtx* ctx = verifier; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(ctx, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(ctx, this->kBasename.data(), - this->kBasename.size())); - auto& basename = this->kBasename; - VerifierRl const* ver_rl_ptr = - reinterpret_cast(this->kGrp01VerRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl(verifier, ver_rl_ptr, - this->kGrp01VerRl.size())); - THROW_ON_EPIDERR( - EpidVerifierSetBasename(ctx, basename.data(), basename.size())); - EXPECT_EQ(nullptr, ctx->verifier_rl); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/main-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/main-test.cc deleted file mode 100644 index 70f2d3a182..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/main-test.cc +++ /dev/null @@ -1,26 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/*! - * \file - * \brief Main entry point for unit tests. - */ - -#include "gtest/gtest.h" - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/nrverify-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/nrverify-test.cc deleted file mode 100644 index 9eb7e089b7..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/nrverify-test.cc +++ /dev/null @@ -1,273 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief NrVerify unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/api.h" -} - -#include "epid/verifier/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" - -namespace { - -///////////////////////////////////////////////////////////////////////// -// Simple Errors - -TEST_F(EpidVerifierTest, NrVerifyFailsGivenNullParameters) { - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(nullptr, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); - - EXPECT_EQ(kEpidBadArgErr, EpidNrVerify(verifier, nullptr, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); - - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, nullptr, - this->kTest0.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); - - EXPECT_EQ( - kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), nullptr, &epid_signature->sigma[0])); - - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], nullptr)); -} - -///////////////////////////////////////////////////////////////////// -// Reject - -TEST_F(EpidVerifierTest, NrVerifyRejectsSigWithTNotInG1) { - // * 4.2.2 step 1 - The verifier verifies that G1.inGroup(T) = true. - // result must be kEpidBadArgErr - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.T.x.data.data[0]++; - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], &nr_proof)); -} - -TEST_F(EpidVerifierTest, NrVerifyRejectsSigWithTIdentityOfG1) { - // * 4.2.2 step 2 - The verifier verifies that G1.isIdentity(T) = false. - // result must be kEpidBadArgErr - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.T = this->kG1IdentityStr; - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], &nr_proof)); -} - -TEST_F(EpidVerifierTest, NrVerifyRejectsSigWithCNotInRange) { - // * 4.2.2 step 3 - The verifier verifies that c, smu, snu in [0, p-1]. - // result must be kEpidBadArgErr - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.c.data = this->kParamsStr.p.data; - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], &nr_proof)); -} - -TEST_F(EpidVerifierTest, NrVerifyRejectsSigWithSmuNotInRange) { - // * 4.2.2 step 3 - The verifier verifies that c, smu, snu in [0, p-1]. - // result must be kEpidBadArgErr - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.smu.data = this->kParamsStr.p.data; - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], &nr_proof)); -} - -TEST_F(EpidVerifierTest, NrVerifyRejectsSigWithSnuNotInRange) { - // * 4.2.2 step 3 - The verifier verifies that c, smu, snu in [0, p-1]. - // result must be kEpidBadArgErr - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - NrProof nr_proof = epid_signature->sigma[0]; - nr_proof.snu.data = this->kParamsStr.p.data; - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], &nr_proof)); -} - -// 4.2.2 step 4 - The verifier computes nc = (- c) mod p. -// This Step is not testable - -// 4.2.2 step 5 - The verifier computes R1 = G1.multiExp(K, smu, B, snu). -// This Step is not testable - -// 4.2.2 step 6 - The verifier computes R2 = G1.multiExp(K', smu, B', snu, -// T, nc). -// This Step is not testable - -TEST_F(EpidVerifierTest, NrVerifyRejectsSigWithInvalidCommitment) { - // * 4.2.2 step 7 - The verifier verifies c = Fp.hash(p || g1 || B || K || - // B' || K' || T || R1 || R2 || m). - // Refer to Section 7.1 for hash operation over a - // prime field. - // result must be kEpidBadArgErr - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - std::vector test_msg = this->kTest0; - test_msg[0]++; - EXPECT_EQ( - kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature->sigma0, test_msg.data(), - test_msg.size(), &sig_rl->bk[0], &epid_signature->sigma[0])); -} - -TEST_F(EpidVerifierTest, NrVerifyRejectsSigWithValidCommitmentDiffHashAlg) { - // * 4.2.2 step 7 - The verifier verifies c = Fp.hash(p || g1 || B || K || - // B' || K' || T || R1 || R2 || m). - // Refer to Section 7.1 for hash operation over a - // prime field. - // result must be kEpidBadArgErr - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature_sha256 = - reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - EpidSignature const* epid_signature_sha384 = - reinterpret_cast( - this->kSigGrp01Member0Sha384RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha384)); - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature_sha256->sigma0, - this->kTest0.data(), this->kTest0.size(), - &sig_rl->bk[0], &epid_signature_sha256->sigma[0])); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512)); - EXPECT_EQ(kEpidBadArgErr, - EpidNrVerify(verifier, &epid_signature_sha384->sigma0, - this->kTest0.data(), this->kTest0.size(), - &sig_rl->bk[0], &epid_signature_sha384->sigma[0])); -} - -///////////////////////////////////////////////////////////////////// -// Accept -// 4.2.2 step 8 - If all the above verifications succeed, the verifier -// outputs true. If any of the above verifications fails, -// the verifier aborts and outputs false - -TEST_F(EpidVerifierTest, NrVerifyAcceptsSigWithRandomBaseNameSha256) { - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha256RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - EXPECT_EQ(kEpidSigValid, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); -} - -TEST_F(EpidVerifierTest, - NrVerifyAcceptsSigWithRandomBaseNameSha256UsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyIkgfStr); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigMember0Sha256RandombaseMsg0Ikgf.data()); - SigRl const* sig_rl = reinterpret_cast(this->kSigRlIkgf.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - EXPECT_EQ(kEpidSigValid, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kMsg0.data(), - this->kMsg0.size(), &sig_rl->bk[2], - &epid_signature->sigma[2])); -} - -TEST_F(EpidVerifierTest, NrVerifyAcceptsSigWithRandomBaseNameSha384) { - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha384RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha384)); - EXPECT_EQ(kEpidSigValid, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); -} - -TEST_F(EpidVerifierTest, NrVerifyAcceptsSigWithRandomBaseNameSha512) { - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha512RandombaseTest0.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512)); - EXPECT_EQ(kEpidSigValid, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest0.data(), - this->kTest0.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); -} - -TEST_F(EpidVerifierTest, - DISABLED_NrVerifyAcceptsSigWithRandomBaseNameSha512256) { - VerifierCtxObj verifier(this->kGrp01Key); - EpidSignature const* epid_signature = reinterpret_cast( - this->kSigGrp01Member0Sha512256RandombaseTest1.data()); - SigRl const* sig_rl = - reinterpret_cast(this->kGrp01SigRl.data()); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512_256)); - EXPECT_EQ(kEpidSigValid, - EpidNrVerify(verifier, &epid_signature->sigma0, this->kTest1.data(), - this->kTest1.size(), &sig_rl->bk[0], - &epid_signature->sigma[0])); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/sigs_linked-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/sigs_linked-test.cc deleted file mode 100644 index a131cdb410..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/sigs_linked-test.cc +++ /dev/null @@ -1,68 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief AreSigsLinkable unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/api.h" -} - -#include "epid/verifier/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" - -namespace { - -TEST_F(EpidVerifierTest, AreSigsLinkedReturnsFalseGivenNullParameters) { - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - EXPECT_FALSE(EpidAreSigsLinked(nullptr, nullptr)); - EXPECT_FALSE(EpidAreSigsLinked((BasicSignature const*)sig.data(), nullptr)); - EXPECT_FALSE(EpidAreSigsLinked(nullptr, (BasicSignature const*)sig.data())); -} - -TEST_F(EpidVerifierTest, SigsBySameMemberWithRandomBaseAreNotLinkable) { - auto& sig1 = this->kSigGrpXMember0Sha256RandbaseMsg0; - auto& sig2 = this->kSigGrpXMember0Sha256RandbaseMsg1; - EXPECT_FALSE(EpidAreSigsLinked((BasicSignature const*)sig1.data(), - (BasicSignature const*)sig2.data())); -} - -TEST_F(EpidVerifierTest, SigsBySameMemberWithSameBasenameAreLinkable) { - auto& sig1 = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& sig2 = this->kSigGrpXMember0Sha256Bsn0Msg1; - EXPECT_TRUE(EpidAreSigsLinked((BasicSignature const*)sig1.data(), - (BasicSignature const*)sig2.data())); -} - -TEST_F(EpidVerifierTest, SigsBySameMemberWithDifferentBasenameAreNotLinkable) { - auto& sig1 = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& sig2 = this->kSigGrpXMember0Sha256Bsn1Msg0; - EXPECT_FALSE(EpidAreSigsLinked((BasicSignature const*)sig1.data(), - (BasicSignature const*)sig2.data())); -} - -TEST_F(EpidVerifierTest, SigsByDifferentMembersWithSameBasenameAreNotLinkable) { - auto& sig1 = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& sig2 = this->kSigGrpXMember1Sha256Bsn0Msg0; - EXPECT_FALSE(EpidAreSigsLinked((BasicSignature const*)sig1.data(), - (BasicSignature const*)sig2.data())); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/pub_key_sigrl_verify.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/pub_key_sigrl_verify.inc deleted file mode 100644 index 0a05d35ee9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/pub_key_sigrl_verify.inc +++ /dev/null @@ -1,39 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -// group_pub_key -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0xB3, 0x6F, 0xFF, 0x81, 0xE2, 0x1B, 0x17, 0xEB, 0x3D, - 0x75, 0x3D, 0x61, 0x7E, 0x27, 0xB0, 0xCB, 0xD0, 0x6D, 0x8F, 0x9D, 0x64, - 0xCE, 0xE3, 0xCE, 0x43, 0x4C, 0x62, 0xFD, 0xB5, 0x80, 0xE0, 0x99, 0x3A, - 0x07, 0x56, 0x80, 0xE0, 0x88, 0x59, 0xA4, 0xFD, 0xB5, 0xB7, 0x9D, 0xE9, - 0x4D, 0xAE, 0x9C, 0xEE, 0x3D, 0x66, 0x42, 0x82, 0x45, 0x7E, 0x7F, 0xD8, - 0x69, 0x3E, 0xA1, 0x74, 0xF4, 0x59, 0xEE, 0xD2, 0x74, 0x2E, 0x9F, 0x63, - 0xC2, 0x51, 0x8E, 0xD5, 0xDB, 0xCA, 0x1C, 0x54, 0x74, 0x10, 0x7B, 0xDC, - 0x99, 0xED, 0x42, 0xD5, 0x5B, 0xA7, 0x04, 0x29, 0x66, 0x61, 0x63, 0xBC, - 0xDD, 0x7F, 0xE1, 0x76, 0x5D, 0xC0, 0x6E, 0xE3, 0x14, 0xAC, 0x72, 0x48, - 0x12, 0x0A, 0xA6, 0xE8, 0x5B, 0x08, 0x7B, 0xDA, 0x3F, 0x51, 0x7D, 0xDE, - 0x4C, 0xEA, 0xCB, 0x93, 0xA5, 0x6E, 0xCC, 0xE7, 0x8E, 0x10, 0x84, 0xBD, - 0x19, 0x5A, 0x95, 0xE2, 0x0F, 0xCA, 0x1C, 0x50, 0x71, 0x94, 0x51, 0x40, - 0x1B, 0xA5, 0xB6, 0x78, 0x87, 0x53, 0xF6, 0x6A, 0x95, 0xCA, 0xC6, 0x8D, - 0xCD, 0x36, 0x88, 0x07, 0x28, 0xE8, 0x96, 0xCA, 0x78, 0x11, 0x5B, 0xB8, - 0x6A, 0xE7, 0xE5, 0xA6, 0x65, 0x7A, 0x68, 0x15, 0xD7, 0x75, 0xF8, 0x24, - 0x14, 0xCF, 0xD1, 0x0F, 0x6C, 0x56, 0xF5, 0x22, 0xD9, 0xFD, 0xE0, 0xE2, - 0xF4, 0xB3, 0xA1, 0x90, 0x21, 0xA7, 0xE0, 0xE8, 0xB3, 0xC7, 0x25, 0xBC, - 0x07, 0x72, 0x30, 0x5D, 0xEE, 0xF5, 0x6A, 0x89, 0x88, 0x46, 0xDD, 0x89, - 0xC2, 0x39, 0x9C, 0x0A, 0x3B, 0x58, 0x96, 0x57, 0xE4, 0xF3, 0x3C, 0x79, - 0x51, 0x69, 0x36, 0x1B, 0xB6, 0xF7, 0x05, 0x5D, 0x0A, 0x88, 0xDB, 0x1F, - 0x3D, 0xEA, 0xA2, 0xBA, 0x6B, 0xF0, 0xDA, 0x8E, 0x25, 0xC6, 0xAD, 0x83, - 0x7D, 0x3E, 0x31, 0xEE, 0x11, 0x40, 0xA9, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_first.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_first.inc deleted file mode 100644 index 3491a2265c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_first.inc +++ /dev/null @@ -1,54 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -// Intel(R) EPID signature -{{{0xFA, 0x09, 0xAF, 0x0D, 0x5C, 0x89, 0x0F, 0x27, 0x03, 0xD2, 0xC1, 0xEB, 0xC8, - 0x74, 0xA0, 0x40, 0x32, 0x94, 0xCD, 0x5B, 0xC6, 0xCD, 0xA6, 0x4B, 0xC6, 0xF2, - 0x4B, 0xB9, 0xB6, 0xC8, 0x41, 0x49}, - {0x71, 0xAC, 0x52, 0x30, 0xF0, 0xFE, 0x70, 0xF9, 0x95, 0x50, 0xAA, 0xE0, 0xD5, - 0xC9, 0xE2, 0x1A, 0xEA, 0xB9, 0xB2, 0x0D, 0x6C, 0xB4, 0x40, 0x41, 0x06, 0x83, - 0x82, 0xE6, 0x69, 0x72, 0xB3, 0x51}}, - {{0x54, 0x96, 0x07, 0xF0, 0xB8, 0x0D, 0x39, 0x25, 0x4E, 0x11, 0x81, 0xA1, 0xF8, - 0xFE, 0x39, 0xF6, 0xAA, 0x70, 0x6C, 0x1D, 0x44, 0x38, 0x08, 0x6F, 0x4E, 0x0F, - 0xA3, 0x6B, 0x8D, 0xD2, 0x29, 0x88}, - {0x23, 0x18, 0x56, 0x3E, 0x6D, 0x67, 0xDF, 0x54, 0x38, 0xCD, 0x42, 0x5B, 0x13, - 0x2B, 0x32, 0xC6, 0x77, 0x19, 0x42, 0x0A, 0x04, 0x91, 0xBF, 0xFF, 0x90, 0x60, - 0x83, 0xD9, 0x60, 0x4B, 0xBA, 0x93}}, - {{0x0C, 0xA6, 0x30, 0x03, 0xEF, 0x58, 0x49, 0x0C, 0xD4, 0x62, 0x3E, 0x25, 0xD5, - 0x91, 0xFA, 0xCD, 0xB0, 0xC9, 0xE6, 0x94, 0x34, 0xDF, 0xEC, 0x8A, 0x4C, 0x9F, - 0xE0, 0xDB, 0x43, 0x01, 0x53, 0xC5}, - {0x78, 0x82, 0x0A, 0x4B, 0x38, 0xBA, 0x32, 0x39, 0x9A, 0x7C, 0x84, 0xC9, 0x27, - 0x74, 0x35, 0x5B, 0x01, 0x5A, 0x6E, 0x32, 0x6B, 0x12, 0xEF, 0x40, 0xC9, 0xB8, - 0x31, 0xFD, 0x73, 0x55, 0x2A, 0x15}}, - {0x70, 0xB9, 0xA5, 0xCA, 0x38, 0x6F, 0x05, 0xB7, 0x0A, 0xD8, 0x89, 0xD8, 0xDA, - 0x6B, 0xB3, 0xE8, 0x9E, 0xFB, 0x3B, 0xDC, 0xE5, 0xBB, 0x4D, 0x43, 0x90, 0xB0, - 0x4F, 0xC2, 0xDA, 0x90, 0x63, 0x2D}, - {0xDE, 0x00, 0x1F, 0xFC, 0x9E, 0x3D, 0x21, 0x64, 0x3D, 0x69, 0x60, 0x16, 0x23, - 0x6F, 0x84, 0x19, 0xCB, 0x62, 0x98, 0x59, 0xC0, 0xB2, 0xED, 0x66, 0xE8, 0x87, - 0xB5, 0xAB, 0x7C, 0xDB, 0x86, 0x45}, - {0x27, 0x08, 0xE3, 0xA6, 0x5F, 0x94, 0x29, 0xA4, 0x0F, 0x49, 0xF1, 0xF6, 0x84, - 0xB6, 0xF0, 0x8F, 0x1C, 0x6E, 0x0A, 0xE4, 0x32, 0x73, 0xCD, 0x91, 0x28, 0x74, - 0x7F, 0x71, 0x76, 0x9F, 0x44, 0x52}, - {0xD6, 0x16, 0xAD, 0x45, 0x86, 0x2B, 0xE8, 0x85, 0xC4, 0x8B, 0x39, 0xB2, 0x5E, - 0xCC, 0x86, 0x1E, 0xD2, 0x9E, 0x4D, 0xA0, 0x17, 0x3D, 0xF7, 0xD1, 0x2D, 0xC2, - 0x7E, 0x22, 0xFA, 0x8D, 0xC7, 0xF3}, - {0xC5, 0x75, 0x8E, 0x8F, 0x17, 0xFD, 0x10, 0x24, 0x83, 0xCA, 0x22, 0xEB, 0x85, - 0xB6, 0x07, 0xD5, 0x9A, 0xEE, 0xC2, 0xC5, 0x87, 0x5B, 0xF3, 0x58, 0xDE, 0x1E, - 0x34, 0xBC, 0xBD, 0x61, 0xEB, 0x01}}, - {0}, {0}, { - { - {{0}, {0}}, {0}, {0}, { 0 } - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_last.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_last.inc deleted file mode 100644 index 1aab4315e6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_last.inc +++ /dev/null @@ -1,54 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -// Intel(R) EPID signature -{{{0x72, 0x78, 0x08, 0xEE, 0x07, 0xE2, 0x27, 0x1F, 0x7B, 0x96, 0x64, 0xED, 0x20, - 0x8E, 0x41, 0x4C, 0x3A, 0x03, 0x3D, 0x9E, 0x4C, 0xA2, 0x60, 0x9D, 0xD2, 0x3D, - 0x03, 0x0D, 0xF6, 0x2D, 0x9A, 0x65}, - {0x30, 0xAB, 0x45, 0x2C, 0x1E, 0xA1, 0xE7, 0x3E, 0x2E, 0xFD, 0x13, 0x1B, 0xF0, - 0x45, 0x04, 0xBB, 0x1B, 0x18, 0xCA, 0x11, 0x8B, 0xC8, 0xB7, 0x89, 0x27, 0x4E, - 0xC4, 0x52, 0xA9, 0x2C, 0x1B, 0x4F}}, - {{0x86, 0x05, 0x9B, 0x8B, 0x5E, 0x75, 0xA7, 0x24, 0x03, 0x85, 0xCB, 0xAB, 0x84, - 0xAD, 0x79, 0xCE, 0x89, 0x0F, 0x8D, 0x96, 0x9F, 0xBE, 0xDE, 0xF3, 0xA8, 0xA2, - 0x1C, 0x96, 0x83, 0xB2, 0xC9, 0xC4}, - {0x2F, 0xB9, 0x68, 0x42, 0x5D, 0x40, 0x2F, 0x99, 0x7A, 0xFB, 0x7B, 0xD4, 0x69, - 0x94, 0xA1, 0x27, 0x79, 0xD1, 0x25, 0xD5, 0x68, 0xB4, 0xB1, 0x6A, 0x6D, 0xCC, - 0x0E, 0xB4, 0x28, 0xBA, 0x1C, 0x6D}}, - {{0x08, 0x51, 0xF0, 0xA5, 0x64, 0x13, 0xF3, 0x72, 0xF2, 0xBB, 0xE4, 0x00, 0x35, - 0x9D, 0x29, 0x89, 0x99, 0x8F, 0x02, 0x38, 0xD9, 0xD0, 0xCF, 0x66, 0xF1, 0xAD, - 0x96, 0x3A, 0xC1, 0xD3, 0x76, 0x58}, - {0x56, 0xA1, 0x3F, 0x96, 0x44, 0x87, 0xAA, 0x12, 0xB7, 0x10, 0xAB, 0xF1, 0x1D, - 0x6B, 0x58, 0x26, 0xDA, 0x7A, 0x7D, 0x24, 0xBC, 0x2B, 0xAA, 0x30, 0x33, 0x7E, - 0x33, 0x05, 0x21, 0x77, 0xD6, 0x3A}}, - {0x3A, 0xEA, 0x90, 0x08, 0x1B, 0x15, 0xDB, 0x87, 0x3A, 0x16, 0xB6, 0x3E, 0xDE, - 0x08, 0x66, 0x19, 0x05, 0x9C, 0x0C, 0xB5, 0xE1, 0x05, 0x77, 0x91, 0x4B, 0xFC, - 0x17, 0x9F, 0xDB, 0x80, 0xBF, 0x39}, - {0x3B, 0x19, 0x01, 0x50, 0x5C, 0x7E, 0x3E, 0x36, 0x07, 0xF2, 0x98, 0xE0, 0x0D, - 0x7A, 0x22, 0x04, 0x56, 0x1E, 0xAD, 0x30, 0xEB, 0x4D, 0xD1, 0x58, 0xEC, 0xF8, - 0xA1, 0x98, 0xE7, 0x26, 0x07, 0x02}, - {0x82, 0x25, 0x94, 0x87, 0xE3, 0x9F, 0xA9, 0x8E, 0x3C, 0xEC, 0x28, 0x34, 0x9D, - 0xDC, 0x84, 0x29, 0xEB, 0x62, 0x12, 0xBB, 0x88, 0x7B, 0xE1, 0x21, 0x6C, 0x77, - 0xE3, 0xA2, 0x92, 0x78, 0x29, 0xB0}, - {0x0D, 0xAF, 0xF4, 0x8A, 0xA8, 0xBF, 0xAE, 0x8A, 0xDE, 0xBC, 0x24, 0x65, 0xD0, - 0x3A, 0x67, 0x31, 0xA4, 0xFD, 0xF9, 0xE2, 0xF2, 0x42, 0xD1, 0xDB, 0x1D, 0xEB, - 0xC3, 0x15, 0x06, 0x86, 0xD6, 0xE9}, - {0xE4, 0x24, 0x70, 0x13, 0x7D, 0xD0, 0xF3, 0x75, 0xF8, 0xEE, 0xD9, 0xAB, 0x7A, - 0x3C, 0xF0, 0x5D, 0xCB, 0xBA, 0x53, 0x06, 0x91, 0xD3, 0xCA, 0xB7, 0x56, 0x26, - 0x2F, 0xD1, 0x94, 0x5F, 0x48, 0x92}}, - {0}, {0}, { - { - {{0}, {0}}, {0}, {0}, { 0 } - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_middle.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_middle.inc deleted file mode 100644 index 956eed2cf2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/signature_sigrl_middle.inc +++ /dev/null @@ -1,54 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -// Intel(R) EPID signature -{{{0x76, 0xD1, 0xFF, 0xBE, 0xD4, 0xE4, 0x71, 0x78, 0x1A, 0xD4, 0x98, 0xFD, 0x00, - 0x2C, 0x71, 0x76, 0x13, 0xB9, 0xF4, 0xF0, 0x22, 0x0A, 0xA1, 0x22, 0xDB, 0x59, - 0x6A, 0xEC, 0xBC, 0x25, 0xDC, 0xAB}, - {0x14, 0x9B, 0x0A, 0x4E, 0x1C, 0x15, 0xD0, 0x6A, 0xD4, 0x3C, 0xDD, 0xE5, 0x26, - 0x13, 0x6B, 0xB0, 0xAF, 0xD0, 0x93, 0xFF, 0x3A, 0x6A, 0xDC, 0x39, 0x64, 0x73, - 0x77, 0x1F, 0x86, 0xAF, 0x69, 0x80}}, - {{0x1D, 0x85, 0x34, 0xF2, 0x71, 0x94, 0xDE, 0x90, 0xD5, 0xA8, 0x7B, 0x7D, 0x6F, - 0xB5, 0xA8, 0x36, 0xD0, 0x2D, 0x85, 0xDE, 0x6E, 0x4D, 0xB8, 0x41, 0x57, 0x56, - 0x33, 0xCA, 0xF3, 0x42, 0xA9, 0x04}, - {0x87, 0x38, 0x46, 0xC6, 0x8C, 0x29, 0x65, 0x53, 0xFC, 0xD6, 0x2C, 0xE7, 0x9B, - 0x29, 0xDD, 0x70, 0x0C, 0xBE, 0x84, 0xE6, 0x7B, 0x97, 0xC0, 0x48, 0x61, 0x01, - 0x97, 0x7A, 0xE4, 0x5C, 0xD5, 0xFB}}, - {{0xDA, 0xDB, 0xDB, 0xED, 0x12, 0x7D, 0x7D, 0x19, 0xF1, 0xF8, 0x6A, 0xE5, 0xE5, - 0xCD, 0xD4, 0x79, 0xDD, 0xE7, 0x40, 0xC0, 0xD2, 0xC7, 0x6A, 0xEA, 0x24, 0x88, - 0x56, 0x3A, 0xDF, 0xFB, 0x3C, 0x91}, - {0x5D, 0x24, 0x8F, 0x61, 0xA8, 0xDD, 0x06, 0x92, 0x26, 0x75, 0xA1, 0xC9, 0x66, - 0x56, 0x89, 0x01, 0x06, 0x72, 0x0F, 0xA6, 0x2D, 0x5B, 0x66, 0x6E, 0x39, 0x7E, - 0x68, 0xF0, 0x5E, 0x63, 0x90, 0x11}}, - {0x69, 0x35, 0x27, 0xED, 0x5F, 0x25, 0xD5, 0x19, 0x08, 0x2F, 0x40, 0xDD, 0x9F, - 0x1F, 0xEA, 0x9E, 0x5E, 0x50, 0xAF, 0x26, 0x99, 0x0F, 0x75, 0x27, 0xAB, 0x70, - 0x84, 0x23, 0xE9, 0x52, 0xB8, 0x4B}, - {0x17, 0x57, 0x3F, 0x46, 0xC0, 0x89, 0xD9, 0x49, 0x99, 0xFC, 0x73, 0x44, 0x59, - 0xBC, 0x85, 0x57, 0x0D, 0x0F, 0x1A, 0xAC, 0x8F, 0xF3, 0xA0, 0xEF, 0x32, 0xC0, - 0x8E, 0xA8, 0xC1, 0xA7, 0x54, 0x8D}, - {0x9B, 0xF7, 0x93, 0xB0, 0x4C, 0x8C, 0x99, 0x4F, 0x56, 0x7B, 0xE8, 0xF0, 0x09, - 0x83, 0xFC, 0x8A, 0x3E, 0x25, 0x3F, 0xED, 0x5B, 0xE2, 0x7B, 0xE9, 0x8B, 0x6B, - 0x58, 0xCC, 0x81, 0x54, 0x87, 0x82}, - {0xC2, 0xDD, 0xF2, 0xD6, 0x89, 0xFB, 0x5A, 0x33, 0x51, 0xD5, 0x83, 0x12, 0x0C, - 0xAF, 0x6D, 0x30, 0xFF, 0x8C, 0xAD, 0x2A, 0x6E, 0x6C, 0xFB, 0x9C, 0x23, 0x53, - 0x45, 0x59, 0x56, 0x01, 0x78, 0x9B}, - {0x2A, 0xB0, 0xCD, 0xDE, 0x0D, 0xB1, 0xB7, 0x25, 0x8D, 0xEF, 0xE6, 0x1D, 0x0E, - 0x69, 0xE3, 0x5F, 0xDF, 0xA9, 0xD4, 0x4D, 0xB9, 0x0C, 0x0C, 0xBA, 0xCC, 0x5E, - 0xEE, 0x95, 0x49, 0x52, 0x88, 0xEB}}, - {0}, {0}, { - { - {{0}, {0}}, {0}, {0}, { 0 } - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/sigrl_five_entries.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/sigrl_five_entries.inc deleted file mode 100644 index eaa49b2e53..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/sigrl_five_entries.inc +++ /dev/null @@ -1,113 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -// sigRL 5 entry - -// gid -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - -// version -0x00, 0x00, 0x00, 0x05, - -// n2 -0x00, 0x00, 0x00, 0x05, - -// bk's -0xFA, 0x09, 0xAF, 0x0D, 0x5C, 0x89, 0x0F, 0x27, -0x03, 0xD2, 0xC1, 0xEB, 0xC8, 0x74, 0xA0, 0x40, -0x32, 0x94, 0xCD, 0x5B, 0xC6, 0xCD, 0xA6, 0x4B, -0xC6, 0xF2, 0x4B, 0xB9, 0xB6, 0xC8, 0x41, 0x49, -0x71, 0xAC, 0x52, 0x30, 0xF0, 0xFE, 0x70, 0xF9, -0x95, 0x50, 0xAA, 0xE0, 0xD5, 0xC9, 0xE2, 0x1A, -0xEA, 0xB9, 0xB2, 0x0D, 0x6C, 0xB4, 0x40, 0x41, -0x06, 0x83, 0x82, 0xE6, 0x69, 0x72, 0xB3, 0x51, -0x54, 0x96, 0x07, 0xF0, 0xB8, 0x0D, 0x39, 0x25, -0x4E, 0x11, 0x81, 0xA1, 0xF8, 0xFE, 0x39, 0xF6, -0xAA, 0x70, 0x6C, 0x1D, 0x44, 0x38, 0x08, 0x6F, -0x4E, 0x0F, 0xA3, 0x6B, 0x8D, 0xD2, 0x29, 0x88, -0x23, 0x18, 0x56, 0x3E, 0x6D, 0x67, 0xDF, 0x54, -0x38, 0xCD, 0x42, 0x5B, 0x13, 0x2B, 0x32, 0xC6, -0x77, 0x19, 0x42, 0x0A, 0x04, 0x91, 0xBF, 0xFF, -0x90, 0x60, 0x83, 0xD9, 0x60, 0x4B, 0xBA, 0x93, - -0x39, 0x97, 0x09, 0x11, 0x30, 0xB0, 0x2A, 0x29, -0xA7, 0x9B, 0xF1, 0xEF, 0xE9, 0xE5, 0xC7, 0x03, -0x17, 0xE6, 0x4F, 0x6F, 0x49, 0x4D, 0xEB, 0x0F, -0xFD, 0x1C, 0x3F, 0xCE, 0xCC, 0xC8, 0x40, 0x6B, -0x23, 0xD3, 0xEC, 0x78, 0x78, 0x15, 0x4A, 0x34, -0x0F, 0xD1, 0xD3, 0xFA, 0xD2, 0xB2, 0x5A, 0xC9, -0xEC, 0xA2, 0x41, 0xE1, 0x46, 0x6D, 0xED, 0xB3, -0x4A, 0xA6, 0xDF, 0xB6, 0xC2, 0x11, 0x49, 0x0D, -0xC9, 0x23, 0xD9, 0x1D, 0x7A, 0xC8, 0x45, 0xAA, -0x02, 0xBA, 0x44, 0xE0, 0xA4, 0xF0, 0xC0, 0x51, -0xAE, 0x67, 0xB3, 0x88, 0x58, 0xB2, 0x92, 0xEA, -0x1D, 0x12, 0x6E, 0x49, 0xC3, 0x13, 0xEA, 0x8E, -0xB7, 0x99, 0x4F, 0x57, 0x7E, 0x06, 0x99, 0xE1, -0x3B, 0x59, 0x2C, 0xD1, 0x43, 0x5D, 0x9E, 0x68, -0xF2, 0x8E, 0x0C, 0xAF, 0x3E, 0x68, 0x6B, 0xD5, -0xD9, 0x3A, 0x30, 0xF4, 0x0B, 0x01, 0x49, 0x9B, - -0x76, 0xD1, 0xFF, 0xBE, 0xD4, 0xE4, 0x71, 0x78, -0x1A, 0xD4, 0x98, 0xFD, 0x00, 0x2C, 0x71, 0x76, -0x13, 0xB9, 0xF4, 0xF0, 0x22, 0x0A, 0xA1, 0x22, -0xDB, 0x59, 0x6A, 0xEC, 0xBC, 0x25, 0xDC, 0xAB, -0x14, 0x9B, 0x0A, 0x4E, 0x1C, 0x15, 0xD0, 0x6A, -0xD4, 0x3C, 0xDD, 0xE5, 0x26, 0x13, 0x6B, 0xB0, -0xAF, 0xD0, 0x93, 0xFF, 0x3A, 0x6A, 0xDC, 0x39, -0x64, 0x73, 0x77, 0x1F, 0x86, 0xAF, 0x69, 0x80, -0x1D, 0x85, 0x34, 0xF2, 0x71, 0x94, 0xDE, 0x90, -0xD5, 0xA8, 0x7B, 0x7D, 0x6F, 0xB5, 0xA8, 0x36, -0xD0, 0x2D, 0x85, 0xDE, 0x6E, 0x4D, 0xB8, 0x41, -0x57, 0x56, 0x33, 0xCA, 0xF3, 0x42, 0xA9, 0x04, -0x87, 0x38, 0x46, 0xC6, 0x8C, 0x29, 0x65, 0x53, -0xFC, 0xD6, 0x2C, 0xE7, 0x9B, 0x29, 0xDD, 0x70, -0x0C, 0xBE, 0x84, 0xE6, 0x7B, 0x97, 0xC0, 0x48, -0x61, 0x01, 0x97, 0x7A, 0xE4, 0x5C, 0xD5, 0xFB, - -0xFC, 0xF6, 0x00, 0xD1, 0xB9, 0x82, 0xAA, 0x79, -0x6C, 0x96, 0xE1, 0xB6, 0x15, 0x93, 0x4D, 0xF4, -0xFB, 0xBF, 0xBC, 0x3E, 0xE3, 0x87, 0xB6, 0xA3, -0xB5, 0xFD, 0x25, 0x42, 0xBC, 0x58, 0x52, 0x09, -0x4E, 0x99, 0x15, 0x66, 0x56, 0x44, 0x1C, 0x5D, -0xDE, 0x8F, 0xE0, 0x40, 0x08, 0x49, 0xDB, 0x4E, -0xDA, 0x8B, 0x77, 0x44, 0x3F, 0x77, 0xEE, 0x7B, -0x48, 0x0E, 0xCC, 0x5F, 0x1C, 0x05, 0x74, 0x6B, -0x2F, 0xD8, 0x1C, 0x01, 0x7E, 0xDF, 0x65, 0x7B, -0x17, 0x8F, 0xA7, 0xC3, 0x03, 0x04, 0x27, 0xEC, -0xFA, 0x0A, 0x22, 0x8E, 0x4E, 0xBF, 0x67, 0x9D, -0x81, 0xA2, 0x6D, 0xF4, 0x21, 0x66, 0xC5, 0x17, -0x3D, 0x55, 0x29, 0xF3, 0x53, 0x61, 0x26, 0x8D, -0xB5, 0x32, 0xF4, 0xD0, 0x94, 0x5D, 0xA9, 0x0E, -0x52, 0x2C, 0x48, 0x7B, 0xA4, 0xFE, 0x4F, 0x98, -0x5F, 0xF1, 0x4D, 0xD9, 0x69, 0xC4, 0x94, 0x70, - -0x72, 0x78, 0x08, 0xEE, 0x07, 0xE2, 0x27, 0x1F, -0x7B, 0x96, 0x64, 0xED, 0x20, 0x8E, 0x41, 0x4C, -0x3A, 0x03, 0x3D, 0x9E, 0x4C, 0xA2, 0x60, 0x9D, -0xD2, 0x3D, 0x03, 0x0D, 0xF6, 0x2D, 0x9A, 0x65, -0x30, 0xAB, 0x45, 0x2C, 0x1E, 0xA1, 0xE7, 0x3E, -0x2E, 0xFD, 0x13, 0x1B, 0xF0, 0x45, 0x04, 0xBB, -0x1B, 0x18, 0xCA, 0x11, 0x8B, 0xC8, 0xB7, 0x89, -0x27, 0x4E, 0xC4, 0x52, 0xA9, 0x2C, 0x1B, 0x4F, -0x86, 0x05, 0x9B, 0x8B, 0x5E, 0x75, 0xA7, 0x24, -0x03, 0x85, 0xCB, 0xAB, 0x84, 0xAD, 0x79, 0xCE, -0x89, 0x0F, 0x8D, 0x96, 0x9F, 0xBE, 0xDE, 0xF3, -0xA8, 0xA2, 0x1C, 0x96, 0x83, 0xB2, 0xC9, 0xC4, -0x2F, 0xB9, 0x68, 0x42, 0x5D, 0x40, 0x2F, 0x99, -0x7A, 0xFB, 0x7B, 0xD4, 0x69, 0x94, 0xA1, 0x27, -0x79, 0xD1, 0x25, 0xD5, 0x68, 0xB4, 0xB1, 0x6A, -0x6D, 0xCC, 0x0E, 0xB4, 0x28, 0xBA, 0x1C, 0x6D, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/sigrl_single_entry.inc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/sigrl_single_entry.inc deleted file mode 100644 index 7e41dc8678..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/testdata/sigrl/sigrl_single_entry.inc +++ /dev/null @@ -1,29 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -// sigrl 1 entry -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xFA, - 0x09, 0xAF, 0x0D, 0x5C, 0x89, 0x0F, 0x27, 0x03, 0xD2, 0xC1, 0xEB, 0xC8, - 0x74, 0xA0, 0x40, 0x32, 0x94, 0xCD, 0x5B, 0xC6, 0xCD, 0xA6, 0x4B, 0xC6, - 0xF2, 0x4B, 0xB9, 0xB6, 0xC8, 0x41, 0x49, 0x71, 0xAC, 0x52, 0x30, 0xF0, - 0xFE, 0x70, 0xF9, 0x95, 0x50, 0xAA, 0xE0, 0xD5, 0xC9, 0xE2, 0x1A, 0xEA, - 0xB9, 0xB2, 0x0D, 0x6C, 0xB4, 0x40, 0x41, 0x06, 0x83, 0x82, 0xE6, 0x69, - 0x72, 0xB3, 0x51, 0x54, 0x96, 0x07, 0xF0, 0xB8, 0x0D, 0x39, 0x25, 0x4E, - 0x11, 0x81, 0xA1, 0xF8, 0xFE, 0x39, 0xF6, 0xAA, 0x70, 0x6C, 0x1D, 0x44, - 0x38, 0x08, 0x6F, 0x4E, 0x0F, 0xA3, 0x6B, 0x8D, 0xD2, 0x29, 0x88, 0x23, - 0x18, 0x56, 0x3E, 0x6D, 0x67, 0xDF, 0x54, 0x38, 0xCD, 0x42, 0x5B, 0x13, - 0x2B, 0x32, 0xC6, 0x77, 0x19, 0x42, 0x0A, 0x04, 0x91, 0xBF, 0xFF, 0x90, - 0x60, 0x83, 0xD9, 0x60, 0x4B, 0xBA, 0x93, diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifier-testhelper.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifier-testhelper.cc deleted file mode 100644 index ab9d8707e6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifier-testhelper.cc +++ /dev/null @@ -1,728 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Test fixture class for EpidVerifier. - */ - -#include "epid/verifier/unittests/verifier-testhelper.h" - -const G1ElemStr EpidVerifierTest::kG1IdentityStr = { - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, - {{{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}}; - -const GroupPubKey EpidVerifierTest::kPubKeyStr = { - // gid - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, - }, - // h1 - {{0xB3, 0x6F, 0xFF, 0x81, 0xE2, 0x1B, 0x17, 0xEB, 0x3D, 0x75, 0x3D, 0x61, - 0x7E, 0x27, 0xB0, 0xCB, 0xD0, 0x6D, 0x8F, 0x9D, 0x64, 0xCE, 0xE3, 0xCE, - 0x43, 0x4C, 0x62, 0xFD, 0xB5, 0x80, 0xE0, 0x99}, - {0x3A, 0x07, 0x56, 0x80, 0xE0, 0x88, 0x59, 0xA4, 0xFD, 0xB5, 0xB7, 0x9D, - 0xE9, 0x4D, 0xAE, 0x9C, 0xEE, 0x3D, 0x66, 0x42, 0x82, 0x45, 0x7E, 0x7F, - 0xD8, 0x69, 0x3E, 0xA1, 0x74, 0xF4, 0x59, 0xEE}}, - // h2 - {{0xD2, 0x74, 0x2E, 0x9F, 0x63, 0xC2, 0x51, 0x8E, 0xD5, 0xDB, 0xCA, 0x1C, - 0x54, 0x74, 0x10, 0x7B, 0xDC, 0x99, 0xED, 0x42, 0xD5, 0x5B, 0xA7, 0x04, - 0x29, 0x66, 0x61, 0x63, 0xBC, 0xDD, 0x7F, 0xE1}, - {0x76, 0x5D, 0xC0, 0x6E, 0xE3, 0x14, 0xAC, 0x72, 0x48, 0x12, 0x0A, 0xA6, - 0xE8, 0x5B, 0x08, 0x7B, 0xDA, 0x3F, 0x51, 0x7D, 0xDE, 0x4C, 0xEA, 0xCB, - 0x93, 0xA5, 0x6E, 0xCC, 0xE7, 0x8E, 0x10, 0x84}}, - // w - {{{0xBD, 0x19, 0x5A, 0x95, 0xE2, 0x0F, 0xCA, 0x1C, 0x50, 0x71, 0x94, 0x51, - 0x40, 0x1B, 0xA5, 0xB6, 0x78, 0x87, 0x53, 0xF6, 0x6A, 0x95, 0xCA, 0xC6, - 0x8D, 0xCD, 0x36, 0x88, 0x07, 0x28, 0xE8, 0x96}, - {0xCA, 0x78, 0x11, 0x5B, 0xB8, 0x6A, 0xE7, 0xE5, 0xA6, 0x65, 0x7A, 0x68, - 0x15, 0xD7, 0x75, 0xF8, 0x24, 0x14, 0xCF, 0xD1, 0x0F, 0x6C, 0x56, 0xF5, - 0x22, 0xD9, 0xFD, 0xE0, 0xE2, 0xF4, 0xB3, 0xA1}}, - {{0x90, 0x21, 0xA7, 0xE0, 0xE8, 0xB3, 0xC7, 0x25, 0xBC, 0x07, 0x72, 0x30, - 0x5D, 0xEE, 0xF5, 0x6A, 0x89, 0x88, 0x46, 0xDD, 0x89, 0xC2, 0x39, 0x9C, - 0x0A, 0x3B, 0x58, 0x96, 0x57, 0xE4, 0xF3, 0x3C}, - {0x79, 0x51, 0x69, 0x36, 0x1B, 0xB6, 0xF7, 0x05, 0x5D, 0x0A, 0x88, 0xDB, - 0x1F, 0x3D, 0xEA, 0xA2, 0xBA, 0x6B, 0xF0, 0xDA, 0x8E, 0x25, 0xC6, 0xAD, - 0x83, 0x7D, 0x3E, 0x31, 0xEE, 0x11, 0x40, 0xA9}}}}; - -const GroupPubKey EpidVerifierTest::kPubKeyIkgfStr = { - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00}, // group id - {{{{0x45, 0xcb, 0x06, 0x04, 0xb3, 0xf7, 0x23, 0xb2, 0xd1, 0xd1, 0x0d, 0x4f, - 0x51, 0x7b, 0xbb, 0x8f, 0x71, 0x15, 0xd7, 0xf1, 0xdc, 0x15, 0x37, 0xc8, - 0xb8, 0x3d, 0x68, 0x0a, 0x18, 0xa5, 0x34, 0x14}}}, - {{{0x0c, 0xdc, 0xd9, 0x15, 0x7e, 0xba, 0x56, 0xc5, 0xe5, 0x61, 0xfa, 0x6a, - 0x86, 0xa0, 0xac, 0x6a, 0x81, 0x36, 0x6d, 0x01, 0x5f, 0x86, 0xc0, 0x04, - 0x8b, 0x1e, 0xff, 0x49, 0xd9, 0x37, 0x96, 0x66}}}}, // h1 - {{{{0xf1, 0xc3, 0x16, 0xb5, 0xc5, 0x1c, 0x67, 0xb6, 0xff, 0x28, 0x23, 0x79, - 0x59, 0xea, 0x80, 0xe6, 0x09, 0x07, 0xe7, 0xd3, 0x38, 0xec, 0xb9, 0x16, - 0x83, 0x88, 0xda, 0x64, 0xdd, 0xc4, 0x9d, 0x6a}}}, - {{{0x5c, 0xb2, 0x1c, 0x88, 0x97, 0xea, 0xaf, 0xa9, 0xf3, 0x3e, 0x07, 0xea, - 0xb6, 0x2a, 0xd5, 0x7a, 0xed, 0x32, 0xd9, 0x3d, 0x90, 0xd7, 0xb9, 0x91, - 0x08, 0x05, 0x9e, 0xe3, 0x22, 0x75, 0x06, 0x35}}}}, // h2 - {{{{{0xe5, 0xc4, 0x77, 0xad, 0x52, 0xb9, 0x7c, 0x04, 0x2d, 0x7e, 0x81, 0xf2, - 0x5d, 0x5d, 0x52, 0x7d, 0xd7, 0x1d, 0x29, 0xfb, 0x6a, 0xa7, 0xbc, 0xb5, - 0xa9, 0x1a, 0xa6, 0xfd, 0x20, 0xea, 0xf2, 0x98}}}, - {{{0xe2, 0x67, 0x33, 0x28, 0x67, 0x5f, 0xbe, 0x23, 0xa0, 0x43, 0xe8, 0x71, - 0xaa, 0xab, 0xf6, 0xf0, 0x6a, 0x2b, 0x52, 0xa8, 0x61, 0x51, 0x22, 0x44, - 0x00, 0x91, 0xd7, 0xf1, 0x7e, 0x05, 0x48, 0xdc}}}}, - {{{{0x51, 0x0c, 0xef, 0xa0, 0xf3, 0x72, 0xcd, 0x59, 0xd4, 0x7a, 0x2a, 0x60, - 0xa3, 0x62, 0x54, 0xa8, 0xb6, 0x8f, 0xed, 0x90, 0xdf, 0x3e, 0x94, 0xe8, - 0xa4, 0x89, 0x32, 0xaa, 0x52, 0x5a, 0x97, 0xae}}}, - {{{0x4c, 0x86, 0xf4, 0xba, 0xec, 0xc6, 0x36, 0x13, 0x87, 0x42, 0x5d, 0x16, - 0x49, 0x12, 0x66, 0xc5, 0xe0, 0xe4, 0x9b, 0xf9, 0x68, 0xaa, 0xa9, 0x95, - 0x81, 0x16, 0x5c, 0xd2, 0xca, 0xd4, 0x2e, 0x61}}}}} // w -}; - -const GroupPubKey EpidVerifierTest::kPubKeyRevGroupIkgfStr = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x78, 0x8a, 0xb6, 0x0f, 0x9a, 0xf5, 0xe4, 0xd1, - 0xe7, 0x39, 0x6a, 0x79, 0x6c, 0xb5, 0xd1, 0xa1, 0x83, 0xec, 0xa1, 0x01, - 0xfe, 0xe8, 0x72, 0xce, 0xce, 0x05, 0x9a, 0x4f, 0xa5, 0x17, 0x1b, 0xed, - 0x30, 0xc5, 0x00, 0xc0, 0xb4, 0xdb, 0x5e, 0xa6, 0xe2, 0x24, 0x23, 0xab, - 0xf5, 0x09, 0xf2, 0x4a, 0x7e, 0x72, 0xfa, 0xc3, 0xbf, 0x33, 0x93, 0x23, - 0x48, 0x89, 0xd2, 0x98, 0x08, 0xe1, 0x01, 0xba, 0x9d, 0xa9, 0xe5, 0x41, - 0x46, 0x2e, 0xbb, 0x9e, 0x6a, 0xfd, 0x28, 0x85, 0x94, 0xd5, 0x6e, 0x5a, - 0xfa, 0x42, 0x71, 0x6e, 0xdc, 0x7e, 0xdb, 0xd1, 0xf2, 0x84, 0x11, 0x08, - 0x4f, 0x0f, 0x22, 0x1f, 0x32, 0xbe, 0xd7, 0x6f, 0x55, 0x17, 0x17, 0x4a, - 0xa7, 0x46, 0xeb, 0xca, 0x02, 0x65, 0x53, 0xca, 0xd7, 0x93, 0x03, 0x01, - 0xe1, 0x54, 0xfc, 0xdd, 0xb4, 0x95, 0x5a, 0x5c, 0x0c, 0x8c, 0x13, 0x65, - 0x02, 0x16, 0xf0, 0xfc, 0xbb, 0x02, 0x5f, 0x87, 0x83, 0x8c, 0xd0, 0x3e, - 0x69, 0xc8, 0xf5, 0x7c, 0x09, 0xdd, 0x48, 0x65, 0x82, 0x48, 0x6f, 0xb5, - 0x35, 0x0c, 0xc4, 0x04, 0x2d, 0x83, 0x0a, 0x3e, 0xa0, 0x0f, 0x5f, 0x8e, - 0x61, 0xf7, 0xc3, 0xb5, 0x5c, 0x66, 0xf8, 0xf8, 0xa3, 0x0a, 0xc1, 0x50, - 0xcd, 0xb0, 0x44, 0x19, 0x14, 0x07, 0xf1, 0xad, 0x7a, 0xec, 0x73, 0xac, - 0x55, 0x01, 0x8a, 0xa6, 0x62, 0x9b, 0x30, 0xf3, 0xf9, 0xc5, 0xd1, 0x3d, - 0xf2, 0x36, 0x13, 0x28, 0x4d, 0xbf, 0x95, 0x88, 0x76, 0x6b, 0xb0, 0x18, - 0xd8, 0x3f, 0xa6, 0x22, 0x69, 0x13, 0x06, 0xa4, 0x04, 0xbf, 0x52, 0x8e, - 0xf0, 0x11, 0x99, 0x65, 0xb9, 0xf8, 0x57, 0x0b, 0xf6, 0xc2, 0xe8, 0xaf, - 0xee, 0xd4, 0x6e, 0xa7, 0x49, 0x7b, 0xeb, 0x8f, 0x92, 0x66, 0x45, 0xda, - 0xb4, 0x01, 0xa8, 0xee, 0x7c, 0xdf, 0x8e, 0x08}; - -const VerifierPrecomp EpidVerifierTest::kVerifierPrecompStr = { - // gid - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, - }, - // e12 - {0xD8, 0x14, 0xBA, 0x4B, 0x44, 0x03, 0x55, 0x6C, 0xF6, 0x42, 0xE8, 0xF0, - 0x4C, 0xB5, 0xE7, 0xD4, 0xA2, 0xA3, 0x69, 0x47, 0xF5, 0xD4, 0xC8, 0xE9, - 0xC5, 0x5A, 0x39, 0xB5, 0x55, 0xA5, 0xD3, 0xFB, 0xF3, 0x85, 0x5A, 0x0D, - 0xD5, 0xEE, 0xDE, 0xF4, 0xA8, 0xB1, 0x8B, 0xCF, 0xA9, 0x0D, 0x29, 0xBF, - 0x86, 0x27, 0x9C, 0x1F, 0x96, 0xED, 0xD8, 0x44, 0x01, 0x35, 0x1A, 0xCE, - 0xFD, 0x4E, 0x6F, 0xA1, 0x66, 0x0D, 0x59, 0x08, 0x6D, 0xA2, 0xE4, 0x99, - 0x83, 0xDC, 0x39, 0x28, 0xB7, 0x1C, 0x1A, 0x33, 0xAD, 0xCA, 0x5C, 0x35, - 0x26, 0x1F, 0xAB, 0xBA, 0x0D, 0x53, 0xAF, 0xE0, 0x72, 0x14, 0xC5, 0xA7, - 0x2E, 0x58, 0x26, 0xC9, 0x8E, 0xFA, 0x6F, 0x62, 0xFC, 0xF0, 0x08, 0x3E, - 0xA3, 0x11, 0x3A, 0xF0, 0xB8, 0x3B, 0x2D, 0x3E, 0xEC, 0xD5, 0xBC, 0xF2, - 0x05, 0x68, 0xF4, 0x40, 0xCE, 0x2C, 0x8F, 0xDD, 0xA4, 0xE5, 0xE1, 0xB5, - 0xBE, 0xBD, 0x3E, 0xD4, 0xF6, 0x9A, 0xB3, 0x37, 0x24, 0x0D, 0xEA, 0x13, - 0xD7, 0x1F, 0xA2, 0x75, 0x68, 0xA1, 0xBE, 0x2C, 0x01, 0x42, 0x2A, 0xAE, - 0x6F, 0xAE, 0x7A, 0x72, 0x3A, 0x11, 0x03, 0x58, 0x02, 0x0D, 0xF0, 0xB0, - 0xD9, 0x6F, 0xB1, 0xE4, 0xF2, 0x70, 0xB8, 0xFF, 0x22, 0x56, 0x7C, 0xB3, - 0x80, 0xFD, 0xDF, 0xE5, 0xAB, 0xCC, 0x18, 0x7A, 0xFD, 0x91, 0xD0, 0xB0, - 0x63, 0x40, 0xD4, 0x71, 0xFA, 0x03, 0xF5, 0xF1, 0x26, 0xE1, 0xA5, 0x5A, - 0xD9, 0x6D, 0xF5, 0x5A, 0x7B, 0x2A, 0x3A, 0xFE, 0x94, 0x9E, 0x74, 0x41, - 0x79, 0x49, 0x7E, 0x48, 0x1D, 0x58, 0x5E, 0xF6, 0x98, 0xA3, 0x6E, 0x61, - 0x8E, 0x9F, 0x1F, 0xCD, 0x15, 0x01, 0x16, 0xA5, 0xE0, 0xAB, 0xD6, 0xD6, - 0x1F, 0x1C, 0xF5, 0x81, 0x76, 0xC1, 0xEC, 0x10, 0xC2, 0xCC, 0x68, 0x59, - 0x4D, 0x47, 0xEF, 0x4B, 0x7F, 0xD8, 0x78, 0x9C, 0xFE, 0x9A, 0x86, 0x7E, - 0x0C, 0xFD, 0x3E, 0x0A, 0x7A, 0x72, 0x8B, 0x14, 0x5F, 0xE6, 0x5F, 0x19, - 0xA3, 0x0A, 0x1B, 0x71, 0xDC, 0xD2, 0xAE, 0x35, 0xC3, 0x11, 0xA5, 0xD3, - 0xEA, 0xE1, 0xA9, 0xE7, 0x70, 0x0C, 0x7A, 0x39, 0x56, 0x3C, 0xE4, 0xE7, - 0xF9, 0xB6, 0xF1, 0x15, 0x40, 0xAB, 0xB6, 0xC4, 0xAD, 0xBD, 0xF4, 0xCC, - 0x13, 0xB7, 0xA8, 0xB6, 0x92, 0x1E, 0x72, 0x27, 0xA7, 0xFF, 0xD9, 0xEA, - 0x2F, 0x91, 0x96, 0x22, 0xD2, 0xC4, 0x4D, 0x80, 0xDC, 0x47, 0x66, 0x87, - 0xCC, 0xCF, 0xC5, 0x64, 0xF7, 0xB2, 0x34, 0xED, 0xD5, 0x44, 0x44, 0xCC, - 0x57, 0x41, 0xC7, 0x92, 0xB7, 0x5C, 0x12, 0xF7, 0x81, 0xF2, 0x92, 0x35, - 0x3E, 0x4B, 0xDF, 0xF8, 0xDA, 0x68, 0xAC, 0x30, 0xE3, 0xDD, 0x9E, 0x22, - 0xAA, 0x6D, 0x77, 0xDD, 0xAC, 0xD9, 0x11, 0x6E, 0xFB, 0x1A, 0x88, 0xB3}, - // e22 - {0x07, 0x3F, 0x9D, 0x47, 0x82, 0xB8, 0x3D, 0x6A, 0xE0, 0x36, 0xAB, 0xA6, - 0xFA, 0xE6, 0xD2, 0x1C, 0xC8, 0xB2, 0xD0, 0x01, 0xD4, 0x96, 0xDC, 0x2E, - 0xF8, 0x19, 0xDC, 0x70, 0x1B, 0xF9, 0x73, 0x0C, 0x2B, 0xC2, 0xE2, 0x1D, - 0x85, 0x53, 0x81, 0x51, 0xFB, 0xCA, 0x16, 0x86, 0xD4, 0x4E, 0xFD, 0x1A, - 0x59, 0xE3, 0x97, 0xC4, 0x7F, 0x99, 0xD8, 0x66, 0x08, 0xA1, 0xE4, 0x9F, - 0xBB, 0x3A, 0xCE, 0xA5, 0x23, 0x9C, 0x83, 0x13, 0xC5, 0xC8, 0xF2, 0x16, - 0x1E, 0xE8, 0xE6, 0xC5, 0x36, 0x57, 0x2C, 0xDF, 0x73, 0xB4, 0xE2, 0xB2, - 0xCB, 0xEB, 0xBB, 0xF7, 0x45, 0xD1, 0x44, 0xBD, 0x6E, 0x92, 0x95, 0x00, - 0xE5, 0x89, 0xB5, 0x91, 0x78, 0xC7, 0x44, 0xB1, 0x2F, 0x37, 0xDF, 0xFB, - 0xE7, 0x8A, 0x44, 0x3F, 0x3D, 0x06, 0x5F, 0x5B, 0x1C, 0x5F, 0xCE, 0x11, - 0x05, 0x35, 0x3C, 0xAD, 0x92, 0x7E, 0x79, 0xB8, 0xFF, 0x28, 0x05, 0xE4, - 0x04, 0x2C, 0xB6, 0x1D, 0x22, 0xAB, 0x36, 0x00, 0x5F, 0x74, 0xF1, 0xE3, - 0xF6, 0xA6, 0x68, 0xE6, 0x7B, 0x25, 0xB8, 0xCF, 0x19, 0xB0, 0x1A, 0xDD, - 0x0F, 0xAD, 0x63, 0x73, 0x62, 0x1B, 0xE7, 0x94, 0x5D, 0xBF, 0x3D, 0xF1, - 0xF9, 0x8E, 0xAB, 0x59, 0xE5, 0xD1, 0x7C, 0x62, 0xDD, 0xBC, 0x40, 0x07, - 0x70, 0x5B, 0x13, 0xF6, 0x12, 0x09, 0xB4, 0x0D, 0x3E, 0xAB, 0x8B, 0x70, - 0x60, 0x1D, 0xD4, 0x61, 0x37, 0x28, 0x98, 0x3E, 0x7E, 0xDC, 0xFD, 0xD2, - 0xC0, 0x2F, 0x4B, 0x71, 0x31, 0x34, 0xD7, 0x69, 0x41, 0x5E, 0xAA, 0x72, - 0xE4, 0xDF, 0xEB, 0xFE, 0x8D, 0xCD, 0x68, 0xFC, 0x68, 0x55, 0xBE, 0x32, - 0x7D, 0x24, 0xC5, 0x07, 0x0F, 0xA8, 0xBD, 0x5A, 0xFE, 0xE7, 0xEC, 0xDB, - 0xFD, 0x19, 0xC8, 0xA9, 0x20, 0xA2, 0x7F, 0x6C, 0xA6, 0x62, 0xEC, 0xED, - 0x9B, 0x79, 0xBF, 0x9C, 0x0E, 0x31, 0x0B, 0x25, 0x2F, 0xD3, 0xCC, 0xA0, - 0xDD, 0xB2, 0xF2, 0x69, 0x26, 0x85, 0x21, 0x06, 0x94, 0x56, 0x5F, 0x59, - 0x5C, 0xF5, 0xB7, 0x82, 0xCE, 0x0F, 0xDD, 0x40, 0xDB, 0x83, 0xAC, 0x3C, - 0x41, 0xA0, 0x1B, 0xB1, 0xAF, 0xDA, 0x55, 0xBF, 0x6B, 0x1A, 0xEF, 0xE6, - 0x90, 0xE7, 0xAA, 0x0F, 0x04, 0x3C, 0x9F, 0x5B, 0xB7, 0xCD, 0x98, 0xA8, - 0x9E, 0xFF, 0x54, 0x26, 0xC8, 0xD5, 0x5C, 0x30, 0x5E, 0xA2, 0x99, 0x8E, - 0x34, 0xD5, 0x98, 0x9F, 0xCD, 0x57, 0xD1, 0x4D, 0x1D, 0xEE, 0x01, 0x5D, - 0x5A, 0x6D, 0xB2, 0xF1, 0xCF, 0x4B, 0xC0, 0x21, 0x23, 0x96, 0x05, 0xF9, - 0xC9, 0x66, 0xE5, 0x25, 0x9D, 0xA3, 0x8E, 0x78, 0x43, 0x19, 0xC1, 0x7F, - 0x7B, 0xEF, 0xF5, 0xED, 0x00, 0xB7, 0x45, 0x1F, 0x4E, 0xA9, 0xFA, 0xE3, - 0xFF, 0x54, 0xF2, 0x21, 0x73, 0xF8, 0x6B, 0xA1, 0xC7, 0x31, 0x4D, 0x6A}, - // e2w - {0x49, 0x0D, 0x0F, 0x2A, 0x5C, 0x6A, 0x3B, 0xAD, 0x71, 0xC9, 0x22, 0x49, - 0xE8, 0x08, 0xDD, 0xBA, 0x79, 0x57, 0xB7, 0xC7, 0x61, 0xE4, 0xDB, 0x84, - 0x68, 0x57, 0xB9, 0x30, 0x83, 0xA4, 0xDC, 0xEF, 0x70, 0x93, 0x28, 0xE2, - 0x6F, 0xB9, 0xBC, 0x15, 0x28, 0x3A, 0x30, 0xBD, 0x96, 0x83, 0xDB, 0xF2, - 0x9D, 0x1E, 0xC7, 0x64, 0x6D, 0x2E, 0x7C, 0xA2, 0xF3, 0xAA, 0x2F, 0x4B, - 0x6D, 0x86, 0x9E, 0x48, 0x20, 0x29, 0x4B, 0x1F, 0x8D, 0xC2, 0x93, 0xC3, - 0x55, 0x25, 0x8E, 0xB0, 0x8A, 0x7E, 0x64, 0x45, 0x3F, 0xF4, 0x1D, 0x16, - 0x4C, 0x88, 0x2D, 0x54, 0xBE, 0xA8, 0x67, 0x70, 0x81, 0xC5, 0xB9, 0x5C, - 0x16, 0x00, 0xEF, 0x78, 0xF6, 0x4D, 0x6A, 0xEB, 0xFD, 0xA2, 0x0D, 0x52, - 0x86, 0xF3, 0x04, 0x4B, 0xD8, 0xF0, 0x7D, 0x50, 0x8B, 0xAD, 0xC0, 0x37, - 0xDB, 0x38, 0xF2, 0x7D, 0x1F, 0x8B, 0x13, 0x83, 0x7B, 0xCC, 0xE8, 0x25, - 0xFE, 0xFA, 0x0C, 0x02, 0x05, 0x2E, 0x75, 0x12, 0xA1, 0x0A, 0x89, 0xAB, - 0xF1, 0xB2, 0x08, 0x47, 0x9A, 0xEA, 0xEF, 0x1D, 0xA4, 0x9F, 0xDE, 0x89, - 0x47, 0x3E, 0x7C, 0x5E, 0x4A, 0x40, 0xDC, 0xEC, 0xC5, 0x1B, 0x7E, 0x33, - 0x0A, 0x19, 0x69, 0x27, 0xA6, 0xCC, 0x25, 0xFC, 0xF9, 0xEB, 0xBD, 0xB7, - 0x8A, 0xDB, 0x45, 0x5F, 0x9D, 0x9E, 0x01, 0xDE, 0x3D, 0x91, 0x10, 0x99, - 0x13, 0xBF, 0xC0, 0xFA, 0x9D, 0xD4, 0x0F, 0xB3, 0x09, 0xF3, 0xA1, 0xAE, - 0x68, 0xE1, 0x1B, 0x48, 0x85, 0x9F, 0x81, 0x66, 0x91, 0xE2, 0xF0, 0x7B, - 0x29, 0xDB, 0x8F, 0x5D, 0x99, 0xA9, 0xD3, 0x39, 0x30, 0xD9, 0x1B, 0x94, - 0x2A, 0x1C, 0x5C, 0xE9, 0xC0, 0x3F, 0x6E, 0xB2, 0x27, 0xBE, 0x74, 0x7A, - 0xCA, 0xE1, 0x0F, 0x6A, 0x43, 0x2E, 0x98, 0x65, 0xAF, 0x7F, 0x6E, 0x5A, - 0x55, 0x98, 0xC1, 0x58, 0x29, 0xB3, 0x86, 0x54, 0x0F, 0x57, 0x91, 0x89, - 0x29, 0xB1, 0x98, 0x79, 0xCC, 0x95, 0x39, 0xD0, 0xAB, 0xE0, 0x9F, 0xF3, - 0xDA, 0xF9, 0x5E, 0xD9, 0x34, 0xBB, 0x72, 0xDA, 0xE5, 0x72, 0xD3, 0xF8, - 0x9B, 0xF9, 0x14, 0x84, 0x48, 0x81, 0x54, 0x4F, 0xE6, 0x2B, 0x80, 0xC8, - 0xC1, 0x79, 0xFE, 0x83, 0xFF, 0x76, 0xA3, 0x6D, 0xFE, 0x37, 0x78, 0xC5, - 0x30, 0x7A, 0x50, 0xE2, 0x5D, 0x12, 0xDC, 0x72, 0xE9, 0x58, 0x7C, 0x07, - 0x4F, 0xFF, 0x15, 0x8A, 0x97, 0x3B, 0xCB, 0x60, 0xFA, 0x4E, 0xDE, 0x8C, - 0x80, 0x3A, 0x8B, 0x0B, 0xC6, 0x1D, 0xA3, 0xCE, 0x6A, 0xB3, 0x50, 0x69, - 0x03, 0x96, 0xCA, 0xC0, 0xB6, 0x94, 0x6F, 0x8F, 0xAB, 0x6F, 0x5B, 0x00, - 0x2A, 0x1D, 0x90, 0xA7, 0x81, 0xC6, 0x15, 0x77, 0x79, 0xF3, 0x36, 0x23, - 0xD1, 0x46, 0x25, 0x58, 0x6F, 0x7B, 0x22, 0xAC, 0x4C, 0x7A, 0xF3, 0x9F}, - // eg12 - {0xA8, 0x8E, 0x9A, 0xF9, 0x25, 0x12, 0x98, 0xE2, 0xC3, 0x61, 0x2E, 0xE8, - 0xD6, 0xA6, 0x77, 0x16, 0x49, 0x04, 0x75, 0x69, 0xD1, 0x83, 0x2D, 0x3F, - 0x2A, 0x79, 0xB6, 0x9B, 0xC9, 0x1D, 0x03, 0x90, 0x2A, 0xD8, 0x11, 0x9F, - 0x26, 0x36, 0xE7, 0xE9, 0x3A, 0x05, 0x4C, 0x15, 0x49, 0x93, 0xDA, 0xE9, - 0xD0, 0x5A, 0xE4, 0x8D, 0x8A, 0xFA, 0x04, 0xF1, 0x20, 0x84, 0x56, 0xEC, - 0x3C, 0x27, 0x19, 0x5C, 0xF1, 0xAF, 0xBF, 0xF6, 0x0E, 0x58, 0x84, 0x2D, - 0x94, 0x11, 0xF4, 0xB5, 0xF4, 0x14, 0x51, 0xB0, 0x90, 0x46, 0x1A, 0x81, - 0xED, 0xCF, 0x91, 0x66, 0x58, 0xA6, 0x36, 0x3A, 0x52, 0x18, 0x5A, 0xC1, - 0x08, 0x4C, 0x99, 0xD3, 0xDC, 0xCE, 0x7F, 0xCE, 0x78, 0xE0, 0x38, 0x87, - 0x32, 0xF1, 0x80, 0x3C, 0x7B, 0x67, 0xAA, 0x6F, 0xDD, 0xE0, 0xFC, 0xCB, - 0xD0, 0xB0, 0x3A, 0x59, 0x52, 0x2A, 0x84, 0xE4, 0xF8, 0x4A, 0xFF, 0x50, - 0xA0, 0x65, 0xC4, 0xEE, 0xF4, 0x9C, 0xAA, 0x34, 0x46, 0xF9, 0xD2, 0x6C, - 0xA1, 0x61, 0x71, 0x49, 0x32, 0x25, 0x84, 0x54, 0x90, 0x44, 0xBE, 0xA4, - 0x0B, 0xF7, 0xFE, 0x26, 0x81, 0x63, 0x73, 0xF7, 0x2F, 0xF2, 0xFA, 0x24, - 0x52, 0xA4, 0xD9, 0x4C, 0xC1, 0xA7, 0xA5, 0xC3, 0x03, 0x36, 0x13, 0x9B, - 0x16, 0x45, 0x16, 0xCB, 0x4B, 0x99, 0x38, 0xF3, 0x6D, 0xC8, 0x7E, 0xAB, - 0xB3, 0x53, 0xDF, 0xB6, 0x82, 0x60, 0x12, 0x11, 0x36, 0x69, 0x0E, 0x05, - 0x31, 0x8E, 0xCF, 0xD7, 0x3F, 0x32, 0xE7, 0x95, 0x84, 0x1D, 0xC8, 0xB5, - 0xBE, 0x49, 0x17, 0x9D, 0xCF, 0xA9, 0x5A, 0x2A, 0xC4, 0x11, 0x86, 0xE8, - 0x6C, 0x02, 0x56, 0xB0, 0x25, 0x2F, 0xA0, 0x06, 0xB3, 0x62, 0xB2, 0x11, - 0xAF, 0xBE, 0xA4, 0xE8, 0x61, 0x64, 0x85, 0xFB, 0xEB, 0x1C, 0xF1, 0xBC, - 0x2C, 0xAE, 0x10, 0x51, 0x16, 0xA6, 0xC0, 0xB3, 0x86, 0x8E, 0x6D, 0x79, - 0xB6, 0xBD, 0xDE, 0x1E, 0x26, 0x06, 0x46, 0x65, 0x82, 0x84, 0x5A, 0x97, - 0xD3, 0xB7, 0x93, 0x78, 0x6B, 0x9D, 0x14, 0x33, 0x94, 0x43, 0x34, 0x04, - 0x45, 0xD1, 0x47, 0xD4, 0x2F, 0x17, 0xCF, 0xF1, 0xDD, 0xEA, 0x11, 0x52, - 0xAE, 0x01, 0x88, 0x3A, 0x10, 0xEE, 0x5C, 0x16, 0xCD, 0xB5, 0x48, 0xE9, - 0x16, 0x2C, 0x70, 0xB4, 0x1E, 0x19, 0x38, 0xE0, 0x18, 0xE9, 0xAE, 0xC5, - 0xDA, 0x74, 0x41, 0x2D, 0x70, 0x07, 0x60, 0x37, 0x27, 0x66, 0xF7, 0x00, - 0xBB, 0x79, 0x51, 0xF3, 0x7C, 0x8A, 0x2B, 0xB5, 0x69, 0x6E, 0x10, 0x1F, - 0xE0, 0x0A, 0x5E, 0xBE, 0xB4, 0x4E, 0x0E, 0x02, 0x59, 0xB5, 0xCB, 0x4A, - 0x6A, 0x86, 0x8B, 0xCC, 0xA2, 0x13, 0xA0, 0xE9, 0xF2, 0x5C, 0xB0, 0x23, - 0xB2, 0x15, 0xF9, 0xBB, 0x43, 0xC1, 0x54, 0xF4, 0xC8, 0xAB, 0x16, 0xA6}}; - -const VerifierPrecomp EpidVerifierTest::kVerifierPrecompIkgfStr = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0xbc, 0x74, 0xd9, 0xd2, 0xcc, 0x56, 0x28, 0xfd, - 0x3d, 0x0b, 0x2b, 0x86, 0xf4, 0xc6, 0xb2, 0x25, 0x19, 0x6b, 0x5b, 0x42, - 0x35, 0x6a, 0xd9, 0x9c, 0xf9, 0xb4, 0x30, 0xcb, 0xff, 0x39, 0xbb, 0x92, - 0x41, 0x71, 0xf4, 0x49, 0xc3, 0xfd, 0x36, 0xa3, 0xe0, 0xdd, 0x83, 0xf1, - 0x34, 0x53, 0x2e, 0x16, 0x2f, 0x45, 0x06, 0x10, 0x3d, 0x9a, 0xfd, 0x22, - 0xb8, 0xf1, 0xfd, 0x52, 0x3a, 0x24, 0xc5, 0x9c, 0xdd, 0x54, 0x9c, 0xff, - 0xb0, 0x4d, 0xb9, 0xe5, 0x21, 0x62, 0x61, 0xaa, 0x76, 0xc3, 0xc1, 0x25, - 0x47, 0xe4, 0x3b, 0x62, 0xab, 0x5f, 0x2c, 0x56, 0xe1, 0x24, 0x9c, 0x21, - 0xec, 0x6b, 0x1d, 0x80, 0x1d, 0xca, 0xc5, 0x45, 0x34, 0xee, 0x4e, 0xc6, - 0x20, 0x94, 0x14, 0x98, 0x0e, 0xd6, 0x88, 0x1d, 0x69, 0xfd, 0x25, 0xd3, - 0xe3, 0x08, 0x3f, 0x62, 0x82, 0xa9, 0xf2, 0x13, 0xd6, 0x54, 0xda, 0x12, - 0xec, 0x4e, 0xd2, 0x92, 0xe1, 0x82, 0x3f, 0x54, 0xf8, 0xc7, 0x0e, 0x21, - 0x90, 0x49, 0xa1, 0x73, 0xa2, 0x03, 0xd0, 0xc7, 0x1c, 0xc2, 0x36, 0x1f, - 0xb5, 0x8e, 0x22, 0xaf, 0xb5, 0x96, 0xad, 0xba, 0xde, 0xe6, 0x45, 0xb9, - 0xee, 0x39, 0x74, 0x53, 0x62, 0x68, 0xa6, 0x37, 0x33, 0x65, 0x47, 0x3b, - 0xf2, 0xa3, 0x35, 0xd0, 0xe9, 0x50, 0x49, 0x68, 0x23, 0x9a, 0xa0, 0x33, - 0x66, 0x2f, 0x84, 0x23, 0x43, 0x95, 0x35, 0xea, 0x1d, 0xfe, 0x3a, 0xe4, - 0x45, 0x6f, 0xad, 0x86, 0x7a, 0x4b, 0xf8, 0xb7, 0x32, 0xaf, 0x79, 0x7c, - 0x45, 0x8d, 0xd9, 0x36, 0x0d, 0x66, 0xcb, 0x47, 0x07, 0xf4, 0x75, 0xae, - 0x38, 0xe1, 0x32, 0x67, 0x80, 0x73, 0x0b, 0x98, 0xb7, 0x8d, 0xa3, 0x03, - 0x94, 0x59, 0x0c, 0x04, 0xa8, 0x3e, 0xf8, 0x39, 0xc9, 0x25, 0x74, 0xb5, - 0x9c, 0x62, 0x79, 0xb9, 0xf0, 0x20, 0x0b, 0x41, 0xb1, 0x76, 0x2a, 0x93, - 0x15, 0xfa, 0x7a, 0x55, 0xe4, 0x50, 0xf3, 0xe1, 0x54, 0xf8, 0x9e, 0x42, - 0x84, 0xaf, 0xb6, 0xc2, 0x2e, 0x98, 0xd5, 0xfd, 0x31, 0xe4, 0x16, 0x2b, - 0x4d, 0x32, 0x96, 0x04, 0x4f, 0xca, 0x8b, 0x8d, 0x3c, 0x24, 0xb4, 0xc3, - 0x86, 0x3b, 0x06, 0xc9, 0x45, 0xc9, 0xb1, 0x90, 0xac, 0xc3, 0xd6, 0xec, - 0x80, 0x5b, 0x84, 0xcb, 0x5e, 0x7b, 0xc4, 0xcb, 0x63, 0x9e, 0xca, 0x09, - 0x92, 0xca, 0x70, 0xfd, 0x24, 0x2a, 0x81, 0x37, 0x5a, 0x85, 0x72, 0x4a, - 0x46, 0x2d, 0x29, 0x38, 0x8f, 0xc3, 0x59, 0xc7, 0xe9, 0x76, 0x24, 0xea, - 0xd4, 0xef, 0x06, 0x12, 0xf5, 0xab, 0xab, 0xa1, 0x59, 0x13, 0xc8, 0x1d, - 0xdf, 0x0f, 0x41, 0xbe, 0x98, 0x65, 0x00, 0x11, 0x41, 0x7c, 0x6e, 0x29, - 0x83, 0x73, 0xfd, 0x81, 0xff, 0xe8, 0xd8, 0x7f, 0xa1, 0x00, 0x62, 0x11, - 0x14, 0x38, 0x06, 0x57, 0x20, 0x81, 0xaa, 0x9e, 0xaf, 0xfe, 0xee, 0x68, - 0xee, 0x30, 0x1a, 0x83, 0xe7, 0x32, 0xc3, 0xfc, 0x69, 0xe5, 0x19, 0x29, - 0x4e, 0xee, 0xb0, 0xf1, 0x63, 0xaf, 0x41, 0x3d, 0x3b, 0xb9, 0xbb, 0x2e, - 0xde, 0xd7, 0x0b, 0xbe, 0x11, 0x8f, 0x4a, 0x94, 0x4c, 0x57, 0xf3, 0x64, - 0x38, 0x5a, 0xc6, 0xb8, 0x5d, 0xa1, 0x9d, 0xc8, 0xfa, 0x32, 0xe2, 0x08, - 0xf4, 0x26, 0x3f, 0x75, 0xb5, 0x35, 0x9a, 0xe9, 0xd6, 0x1d, 0x35, 0x41, - 0x9b, 0x20, 0x2b, 0x54, 0xb9, 0x66, 0x6c, 0xc6, 0xb7, 0x44, 0x82, 0x9b, - 0x74, 0xe8, 0x09, 0x04, 0xa4, 0xf2, 0x7a, 0x8f, 0xe8, 0x6f, 0x3c, 0xa0, - 0x18, 0xab, 0x66, 0xf6, 0x39, 0x34, 0x70, 0xf3, 0xa6, 0xd3, 0xc9, 0xe1, - 0x97, 0xe2, 0xdc, 0x4d, 0xca, 0x02, 0xb6, 0x73, 0x07, 0xf3, 0x8c, 0xd0, - 0xab, 0xd9, 0x12, 0x45, 0x70, 0x7c, 0x3a, 0x24, 0x64, 0xce, 0x9e, 0x38, - 0x4d, 0x5d, 0xe1, 0x9d, 0xf2, 0x4b, 0x58, 0xdc, 0x71, 0xb3, 0x61, 0x56, - 0x14, 0x62, 0x2a, 0x1b, 0x36, 0x5e, 0xc9, 0x15, 0xf3, 0x50, 0xe6, 0xc0, - 0x93, 0x62, 0xd0, 0x69, 0xab, 0xd4, 0xe5, 0x9b, 0xa6, 0xa7, 0xa3, 0x0c, - 0x51, 0xad, 0xf7, 0x38, 0x6f, 0x1d, 0xcf, 0x43, 0xda, 0x83, 0x95, 0xc6, - 0xfb, 0xd8, 0x90, 0x5e, 0x35, 0x30, 0x0b, 0x7b, 0x45, 0xd0, 0x12, 0x32, - 0x95, 0xc3, 0x96, 0xdc, 0x0a, 0x68, 0xcc, 0xcf, 0x19, 0x0b, 0x13, 0xc7, - 0x6a, 0x7a, 0x53, 0x36, 0x5b, 0x24, 0xc5, 0x84, 0x5c, 0xeb, 0x9e, 0xeb, - 0xdc, 0x91, 0x17, 0xb3, 0x29, 0xfd, 0xee, 0x55, 0xc9, 0x8c, 0xcd, 0xbe, - 0x3a, 0x66, 0xf3, 0xba, 0x79, 0xfe, 0xc7, 0xf8, 0x08, 0xeb, 0xd2, 0x3a, - 0x17, 0x3c, 0x36, 0x29, 0xc1, 0xde, 0xa9, 0xab, 0x80, 0xdb, 0x6c, 0xdd, - 0xfb, 0xe5, 0xb1, 0x12, 0x25, 0x2f, 0xa3, 0x3d, 0x0e, 0x72, 0xde, 0xaf, - 0x86, 0x93, 0x35, 0x18, 0x96, 0x19, 0x47, 0xfd, 0x8f, 0xae, 0x7b, 0xe7, - 0xac, 0x6e, 0x53, 0x10, 0x1e, 0x66, 0x54, 0xc0, 0x36, 0x0e, 0x73, 0x35, - 0xb3, 0x20, 0xf9, 0xaa, 0x25, 0x4a, 0x66, 0xaf, 0xc9, 0x2f, 0xd1, 0x19, - 0x8b, 0x8f, 0x93, 0xbe, 0x3a, 0x30, 0xa5, 0x24, 0xc2, 0xad, 0x30, 0xfc, - 0x97, 0xfe, 0x6c, 0xe0, 0x7f, 0x98, 0x71, 0x37, 0x33, 0x26, 0xc3, 0x75, - 0xc8, 0x51, 0xe6, 0xf2, 0x99, 0xf0, 0x0f, 0x7d, 0x5d, 0x12, 0x26, 0x9d, - 0x96, 0xeb, 0xd5, 0x08, 0x28, 0x34, 0x90, 0x1c, 0xdb, 0x98, 0xbd, 0x8a, - 0xeb, 0x93, 0x0d, 0xd0, 0x57, 0x3e, 0xb8, 0x65, 0xdd, 0xa6, 0xa9, 0x81, - 0xd6, 0xca, 0x62, 0x4b, 0x24, 0xed, 0xf4, 0x36, 0xf0, 0x83, 0xd6, 0x0e, - 0x53, 0xf2, 0x50, 0x89, 0x70, 0x23, 0x19, 0x7b, 0xd0, 0x7e, 0x67, 0xa3, - 0x45, 0x72, 0x9d, 0x11, 0xbe, 0xbb, 0xe1, 0x72, 0x51, 0xf6, 0x5f, 0x4e, - 0x2c, 0xca, 0x61, 0x3d, 0xaa, 0xfd, 0xb7, 0x61, 0xbc, 0x3a, 0xd2, 0x20, - 0x18, 0xa2, 0xee, 0x04, 0xe4, 0x6b, 0xf3, 0x84, 0x26, 0xc2, 0x43, 0xa4, - 0xfe, 0x4e, 0x14, 0x5c, 0xbe, 0xe7, 0x11, 0x4a, 0x61, 0x33, 0x7d, 0xeb, - 0x71, 0x98, 0x7c, 0xf0, 0x44, 0xe2, 0x41, 0x17, 0x39, 0xd0, 0x4e, 0xe2, - 0x9c, 0xcc, 0x8d, 0x76, 0x3c, 0xb8, 0x0f, 0x63, 0x4a, 0x56, 0x7c, 0xf8, - 0xab, 0xbd, 0x87, 0xcc, 0xa2, 0x29, 0xb9, 0x3c, 0xcc, 0x12, 0xd2, 0x9d, - 0x6f, 0xbd, 0x28, 0xc3, 0x0c, 0x2f, 0x83, 0x8c, 0xf3, 0xad, 0x3d, 0xc6, - 0x92, 0xba, 0x0b, 0x28, 0x47, 0x81, 0x78, 0xbe, 0x2b, 0xe0, 0x6a, 0x47, - 0xba, 0xf3, 0xbe, 0x39, 0x30, 0x49, 0x0b, 0x35, 0x34, 0x80, 0x70, 0xc2, - 0x75, 0x54, 0x65, 0xd8, 0xc8, 0x1c, 0x26, 0xb8, 0x97, 0x61, 0x57, 0xcf, - 0x2d, 0xb8, 0xd1, 0xdd, 0xb0, 0xf1, 0xa9, 0x0f, 0x3f, 0x7e, 0xfe, 0xd3, - 0xee, 0xdc, 0x75, 0xbf, 0xc2, 0xf1, 0x30, 0xd6, 0x60, 0x1b, 0xcd, 0x7b, - 0x87, 0xde, 0x0b, 0x58, 0x5c, 0xac, 0x84, 0xda, 0xef, 0x86, 0x86, 0x8d, - 0x8e, 0xfd, 0x6f, 0x93, 0x32, 0x8d, 0xac, 0x7b, 0x8f, 0x2a, 0x8a, 0x5f, - 0xf1, 0xea, 0xbb, 0x8e, 0x6d, 0xbf, 0xe0, 0x59, 0x90, 0xc2, 0xd3, 0x3d, - 0x8a, 0x03, 0x64, 0x11, 0xdd, 0xf1, 0xfc, 0x2d, 0x26, 0x8a, 0x6f, 0x39, - 0x25, 0xa9, 0xaa, 0x61, 0x45, 0x5b, 0x7b, 0x36, 0xfd, 0x82, 0xd2, 0x6a, - 0x8c, 0x9a, 0xf1, 0xc2}; - -const std::vector EpidVerifierTest::kGroupRlEmptyBuf = { - // RLVer - 0x00, 0x00, 0x00, 0x00, - // n3 - 0x00, 0x00, 0x00, 0x00}; - -const std::vector EpidVerifierTest::kGroupRl3GidBuf = { - // RLVer - 0x00, 0x00, 0x00, 0x03, - // n3 - 0x00, 0x00, 0x00, 0x03, - // gid[0] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // gid[1] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, - // gid[2] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, -}; - -const std::vector EpidVerifierTest::kGroupRl3GidN0Buf = { - // RLVer - 0x00, 0x00, 0x00, 0x03, - // n3 - 0x00, 0x00, 0x00, 0x00, - // gid[0] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // gid[1] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, - // gid[2] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, -}; - -const std::vector EpidVerifierTest::kGroupRl3GidN2Buf = { - // RLVer - 0x00, 0x00, 0x00, 0x03, - // n3 - 0x00, 0x00, 0x00, 0x02, - // gid[0] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // gid[1] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, - // gid[2] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, -}; - -const std::vector EpidVerifierTest::kGroupRl3GidN4Buf = { - // RLVer - 0x00, 0x00, 0x00, 0x03, - // n3 - 0x00, 0x00, 0x00, 0x04, - // gid[0] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, - // gid[1] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x02, - // gid[2] - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, -}; - -const std::vector EpidVerifierTest::kGrp01VerRlOneEntry = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, - // B - 0x41, 0x63, 0xfd, 0x06, 0xb8, 0xb1, 0xa6, 0x32, 0xa5, 0xe3, 0xeb, 0xc4, - 0x40, 0x11, 0x37, 0xc0, 0x62, 0x0d, 0xe1, 0xca, 0xe9, 0x79, 0xad, 0xff, - 0x1d, 0x13, 0xb3, 0xda, 0xa0, 0x10, 0x8a, 0xa8, 0x30, 0x72, 0xa4, 0xe8, - 0x27, 0xb5, 0xad, 0xdb, 0xac, 0x89, 0xd8, 0x37, 0x79, 0xd9, 0x8c, 0xd0, - 0xb3, 0xef, 0x94, 0x17, 0x4f, 0x05, 0x53, 0x4c, 0x4d, 0xf0, 0x77, 0xf7, - 0xb6, 0xaf, 0xb8, 0xfa, - // version - 0x00, 0x00, 0x00, 0x01, - // n4 - 0x00, 0x00, 0x00, 0x01, - // k's - 0xdc, 0x41, 0x24, 0xe7, 0xb8, 0xf2, 0x6d, 0xc4, 0x01, 0xf9, 0x5d, 0xf8, - 0xd9, 0x23, 0x32, 0x29, 0x0a, 0xe1, 0xf6, 0xdc, 0xa1, 0xef, 0x52, 0xf7, - 0x3a, 0x3c, 0xe6, 0x7e, 0x3d, 0x0e, 0xe8, 0x86, 0xa9, 0x58, 0xf4, 0xfe, - 0xfa, 0x8b, 0xe4, 0x1c, 0xad, 0x58, 0x5b, 0x1c, 0xc7, 0x54, 0xee, 0x7e, - 0xe7, 0x12, 0x6a, 0x4b, 0x01, 0x63, 0xb4, 0xdb, 0x6e, 0xe7, 0x7a, 0xe9, - 0x62, 0xa5, 0xb4, 0xe3}; -const std::vector EpidVerifierTest::kEmptyGrp01VerRl = { - // gid - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, - // B - 0xa6, 0x13, 0x29, 0xb6, 0x61, 0xa2, 0xb8, 0xd7, 0x49, 0x86, 0xcb, 0xaf, - 0x94, 0x4d, 0x9e, 0x51, 0xcf, 0xd3, 0x5d, 0x0f, 0x33, 0x9a, 0x59, 0x0d, - 0xe7, 0xc9, 0xb9, 0x7f, 0x83, 0xae, 0x27, 0xe6, 0x40, 0xf0, 0x88, 0x13, - 0xe2, 0xb6, 0x6a, 0x43, 0x26, 0xa3, 0x21, 0xea, 0x00, 0x78, 0xcd, 0xce, - 0x0e, 0x14, 0x7a, 0xde, 0xcf, 0xaa, 0x7b, 0xc5, 0x7e, 0x7c, 0xaf, 0xe4, - 0x5e, 0x8a, 0xdd, 0xc7, - // version - 0x00, 0x00, 0x00, 0x00, - // n4 - 0x00, 0x00, 0x00, 0x00, - // no k's -}; -const Epid2Params EpidVerifierTest::kParamsStr = { -#include "epid/common/src/epid2params_ate.inc" -}; -const GroupPubKey EpidVerifierTest::kGrp01Key = { -#include "epid/common-testhelper/testdata/grp01/gpubkey.inc" -}; -const std::vector EpidVerifierTest::kGrp01PrivRl = { -#include "epid/common-testhelper/testdata/grp01/privrl.inc" -}; -const std::vector EpidVerifierTest::kGrp01SigRl = { -#include "epid/common-testhelper/testdata/grp01/sigrl.inc" -}; -const std::vector EpidVerifierTest::kSigRlIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sigrl.inc" -}; -const std::vector EpidVerifierTest::kEmptySigRlIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sigrl_empty.inc" -}; -const std::vector EpidVerifierTest::kGrp01VerRl = { -#include "epid/common-testhelper/testdata/grp01/verrl.inc" -}; -const std::vector - EpidVerifierTest::kSigGrp01Member0Sha256RandombaseTest0 = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test0_sha256_sigrl.inc" -}; -const std::vector - EpidVerifierTest::kSigMember0Sha256RandombaseMsg0Ikgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sig_msg0_sha256_sigrl.inc" -}; -const std::vector - EpidVerifierTest::kSigGrp01Member0Sha384RandombaseTest0 = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test0_sha384_sigrl.inc" -}; -const std::vector - EpidVerifierTest::kSigGrp01Member0Sha512RandombaseTest0 = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test0_sha512_sigrl.inc" -}; -const std::vector - EpidVerifierTest::kSigGrp01Member0Sha512256RandombaseTest1 = {0}; -const std::vector - EpidVerifierTest::kSigGrp01Member0Sha256RandombaseTest1NoSigRl = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test1_sha256.inc" -}; -const std::vector - EpidVerifierTest::kSigGrp01Member0Sha256Basename1Test1NoSigRl = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test1_basename1_sha256.inc" -}; -const std::vector - EpidVerifierTest::kSigSha256Basename1Test1NoSigRlIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sig_test1_basename1_sha256.inc" -}; -const std::vector - EpidVerifierTest::kSigGrp01Member0Sha384RandombaseTest1NoSigRl = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test1_sha384.inc" -}; -const std::vector - EpidVerifierTest::kSigGrp01Member0Sha512RandombaseTest1NoSigRl = { -#include "epid/common-testhelper/testdata/grp01/member0/sig_test1_sha512.inc" -}; - -const std::vector EpidVerifierTest::kTest0 = { - 't', 'e', 's', 't', ' ', 'm', 'e', 's', 's', 'a', 'g', 'e', 0x0}; -const std::vector EpidVerifierTest::kTest1 = {'t', 'e', 's', 't', '1'}; -const std::vector EpidVerifierTest::kBasename = {'b', 'a', 's', 'e', - 'n', 'a', 'm', 'e'}; -const std::vector EpidVerifierTest::kBasename1 = { - 'b', 'a', 's', 'e', 'n', 'a', 'm', 'e', '1'}; - -const OctStr32 EpidVerifierTest::kOctStr32_1 = {0x00, 0x00, 0x00, 0x01}; - -const GroupPubKey EpidVerifierTest::kPubKeySigRlVerify = { -#include "epid/verifier/unittests/testdata/sigrl/pub_key_sigrl_verify.inc" -}; -const std::vector EpidVerifierTest::kSigRlSingleEntry = { -#include "epid/verifier/unittests/testdata/sigrl/sigrl_single_entry.inc" -}; -const std::vector EpidVerifierTest::kSigRlFiveEntries = { -#include "epid/verifier/unittests/testdata/sigrl/sigrl_five_entries.inc" -}; -const EpidSignature EpidVerifierTest::kSignatureSigrlFirst = { -#include "epid/verifier/unittests/testdata/sigrl/signature_sigrl_first.inc" -}; -const EpidSignature EpidVerifierTest::kSignatureSigrlMiddle = { -#include "epid/verifier/unittests/testdata/sigrl/signature_sigrl_middle.inc" -}; -const EpidSignature EpidVerifierTest::kSignatureSigrlLast = { -#include "epid/verifier/unittests/testdata/sigrl/signature_sigrl_last.inc" -}; - -const std::vector EpidVerifierTest::kGrpRl = { -#include "epid/common-testhelper/testdata/grprl.inc" -}; -const std::vector EpidVerifierTest::kGrpRlIkgf = { -#include "epid/common-testhelper/testdata/ikgf/grprl.inc" -}; -const std::vector EpidVerifierTest::kGrpRlRevokedGrpXOnlyEntry = { -#include "epid/common-testhelper/testdata/grprl_single_entry_revoked_grp_x.inc" -}; -const std::vector EpidVerifierTest::kGrpRlRevokedGrpXFirstEntry = { -#include "epid/common-testhelper/testdata/grprl_revoked_grp_x_first_entry.inc" -}; -const std::vector EpidVerifierTest::kGrpRlRevokedGrpXMiddleEntry = { -#include "epid/common-testhelper/testdata/grprl_revoked_grp_x_middle_entry.inc" -}; -const std::vector EpidVerifierTest::kGrpRlRevokedGrpXLastEntry = { -#include "epid/common-testhelper/testdata/grprl_revoked_grp_x_last_entry.inc" -}; - -const std::vector EpidVerifierTest::kBsn0 = {'b', 's', 'n', '0'}; -const std::vector EpidVerifierTest::kMsg0 = {'m', 's', 'g', '0'}; - -const GroupPubKey EpidVerifierTest::kGrpXKey = { -#include "epid/common-testhelper/testdata/grp_x/pubkey.inc" -}; -const std::vector EpidVerifierTest::kGrpXPrivRl = { -#include "epid/common-testhelper/testdata/grp_x/privrl.inc" -}; -const std::vector EpidVerifierTest::kPrivRlIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/privrl.inc" -}; -const std::vector EpidVerifierTest::kEmptyPrivRlIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/privrl_empty.inc" -}; -const std::vector - EpidVerifierTest::kGrpXPrivRlRevokedPrivKey000OnlyEntry = { -#include "epid/common-testhelper/testdata/grp_x/privrl_single_entry_revoked_key000.inc" -}; -const std::vector EpidVerifierTest::kGrpXSigRl = { -#include "epid/common-testhelper/testdata/grp_x/sigrl.inc" -}; - -const std::vector EpidVerifierTest::kGrpXSigRlVersion2 = { -#include "epid/common-testhelper/testdata/grp_x/sigrl_ver_2.inc" -}; - -const std::vector - EpidVerifierTest::kGrpXSigRlMember0Sha256Bsn0Msg0OnlyEntry = { -#include "epid/common-testhelper/testdata/grp_x/sigrl_single_entry.inc" -}; -const std::vector - EpidVerifierTest::kGrpXSigRlMember0Sha256Bsn0Msg0FirstEntry = { -#include "epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_first_entry.inc" -}; -const std::vector - EpidVerifierTest::kGrpXSigRlMember0Sha256Bsn0Msg0MiddleEntry = { -#include "epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_middle_entry.inc" -}; -const std::vector - EpidVerifierTest::kGrpXSigRlMember0Sha256Bsn0Msg0LastEntry = { -#include "epid/common-testhelper/testdata/grp_x/sigrl_member0_sig_sha256_bsn0_msg0_revoked_last_entry.inc" -}; - -const std::vector EpidVerifierTest::kGrpXBsn0Sha256VerRl = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl.inc" -}; -const std::vector EpidVerifierTest::kGrpXBsn0Sha384VerRl = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_sha384.inc" -}; -const std::vector EpidVerifierTest::kGrpXBsn0Sha512VerRl = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_sha512.inc" -}; -const std::vector EpidVerifierTest::kGrpXBsn0Sha512256VerRl = { - // #include "testdata/grp_x/verrevoked/bsn0/verrl_sha512_256.inc" -}; -const std::vector EpidVerifierTest::kGrpXBsn0VerRlSingleEntry = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/verrl_1entry.inc" -}; -const std::vector EpidVerifierTest::kGrpXBsn1VerRl = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/verrl.inc" -}; -const std::vector EpidVerifierTest::kGrpXBsn1VerRl_012 = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/verrl_012revoked.inc" -}; -// clang-format off -const std::vector - EpidVerifierTest::kSigGrpXVerRevokedMember0Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked0sha256bsn0msg0.inc" -}; -const std::vector - EpidVerifierTest::kSigGrpXVerRevokedMember1Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked1sha256bsn0msg0.inc" -}; -const std::vector - EpidVerifierTest::kSigGrpXVerRevokedMember2Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn0/sig_revoked2sha256bsn0msg0.inc" -}; -const std::vector - EpidVerifierTest::kSigGrpXVerRevokedMember3Sha256Bsn1Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/verrevoked/bsn1/sig_revoked3sha256bsn1msg0.inc" -}; -const std::vector EpidVerifierTest::kSigGrpXMember0Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg0.inc" -}; -const std::vector EpidVerifierTest::kSigMember0Sha256Bsn0Msg0Ikgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0.inc" -}; -const std::vector -EpidVerifierTest::kSigMember0Sha256Bsn0Msg0EmptySigRlIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_empty_sigrl.inc" -}; -const std::vector -EpidVerifierTest::kSigMember0Sha256Bsn0Msg0NoSigRlIkgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_nosigrl.inc" -}; -const std::vector -EpidVerifierTest::kSigRevSigMember0Sha256Bsn0Msg0Ikgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sig_sigrevoked_sha256_bsn0_msg0.inc" -}; -const std::vector - EpidVerifierTest::kRevGroupSigMember0Sha256Bsn0Msg0Ikgf = { -#include "epid/common-testhelper/testdata/ikgf/groupb/sig_grouprevoked_sha256_bsn0_msg0.inc" -}; -const std::vector - EpidVerifierTest::kSigGrpXMember0Sha256Bsn0Msg0SingleEntrySigRl = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg0_rl_singleentry.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey000.inc" -}; -const std::vector -EpidVerifierTest::kSigRevokedPrivKeySha256Bsn0Msg0Ikgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_bsn0_msg0_revkey.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXRevokedPrivKey001Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey001.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXRevokedPrivKey002Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/privrevoked/signatures/sig_sha256_bsn0_msg0_revkey002.inc" -}; -const std::vector EpidVerifierTest::kSigGrpXMember0Sha256Bsn0Msg1 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn0_msg1.inc" -}; -const std::vector EpidVerifierTest::kSigGrpXMember0Sha256Bsn1Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha256_bsn1_msg0.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXMember0Sha256RandbaseMsg0 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha256_rndbase_msg0.inc" -}; -const std::vector -EpidVerifierTest::kSigMember0Sha256RandbaseMsg0Ikgf = { -#include "epid/common-testhelper/testdata/ikgf/groupa/sig_sha256_rndbase_msg0.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXMember0Sha256RandbaseMsg1 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha256_rndbase_msg1.inc" -}; -const std::vector EpidVerifierTest::kSigGrpXMember0Sha384Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha384_bsn0_msg0.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXMember0Sha384RandbaseMsg0 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha384_rndbase_msg0.inc" -}; -const std::vector EpidVerifierTest::kSigGrpXMember0Sha512Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha512_bsn0_msg0.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXMember0Sha512RandbaseMsg0 = { -#include "epid/common-testhelper/testdata/grp_x/member0/sig_sha512_rndbase_msg0.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXMember0Sha512256Bsn0Msg0 = { - // #include "testdata/grp_x/member0/sig_sha512256_bsn0_msg0.inc" -}; -const std::vector -EpidVerifierTest::kSigGrpXMember0Sha512256RandbaseMsg0 = { - // #include "testdata/grp_x/member0/sig_sha512256_rndbase_msg0.inc" -}; -const std::vector EpidVerifierTest::kSigGrpXMember1Sha256Bsn0Msg0 = { -#include "epid/common-testhelper/testdata/grp_x/member1/sig_sha256_bsn0_msg0.inc" -}; diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifier-testhelper.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifier-testhelper.h deleted file mode 100644 index 4bbb7d1c95..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifier-testhelper.h +++ /dev/null @@ -1,269 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Test fixture class for EpidVerifier. - */ -#ifndef EPID_VERIFIER_UNITTESTS_VERIFIER_TESTHELPER_H_ -#define EPID_VERIFIER_UNITTESTS_VERIFIER_TESTHELPER_H_ - -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/api.h" -} - -/// Test fixture class for EpidVerifier -class EpidVerifierTest : public ::testing::Test { - public: - /// Serialized identity element in G1 - static const G1ElemStr kG1IdentityStr; - /// test public key - static const GroupPubKey kPubKeyStr; - /// test public key from Ikgf - static const GroupPubKey kPubKeyIkgfStr; - /// test public key of revoked group from Ikgf - static const GroupPubKey kPubKeyRevGroupIkgfStr; - /// verifier pre-computation data associated with pub_key_str - static const VerifierPrecomp kVerifierPrecompStr; - /// verifier pre-computation data associated with pub_key_str from Ikgf - static const VerifierPrecomp kVerifierPrecompIkgfStr; - /// Intel(R) EPID 2.0 parameters - static const Epid2Params kParamsStr; - /// public key in Grp01 - static const GroupPubKey kGrp01Key; - /// private key based revocation list in Grp01 - static const std::vector kGrp01PrivRl; - /// signature based revocation list in Grp01 - static const std::vector kGrp01SigRl; - /// signature based revocation list from Ikgf - static const std::vector kSigRlIkgf; - /// empty signature based revocation list from Ikgf - static const std::vector kEmptySigRlIkgf; - /// number of SigRl entries for Grp01 - static const uint32_t kGrp01SigRlN2 = 50; - /// verifier revocation list in Grp01 with one entry - static const std::vector kGrp01VerRlOneEntry; - /// verifier revocation list in Grp01 - static const std::vector kGrp01VerRl; - /// empty verifier revocation in Grp01 - static const std::vector kEmptyGrp01VerRl; - /// C string with a message "test message" - static const std::vector kTest0; - /// the message "test1" - static const std::vector kTest1; - /// the basename "basename" - static const std::vector kBasename; - /// the basename "basename1" - static const std::vector kBasename1; - /// Signature of Test0 with RandomBase by Grp01 Member0 using Sha256 - static const std::vector kSigGrp01Member0Sha256RandombaseTest0; - /// Signature of Test with RandomBase, Member0 using Sha256 from Ikgf - static const std::vector kSigMember0Sha256RandombaseMsg0Ikgf; - /// Signature of Test1 with RandomBase by Grp01 Member0 using Sha384 - static const std::vector kSigGrp01Member0Sha384RandombaseTest0; - /// Signature of Test1 with RandomBase by Grp01 Member0 using Sha512 - static const std::vector kSigGrp01Member0Sha512RandombaseTest0; - /// Signature of Test1 with RandomBase by Grp01 Member0 using Sha512_256 - static const std::vector kSigGrp01Member0Sha512256RandombaseTest1; - /// Sig of Test1 with RandomBase by Grp01(no SigRl) Member0 using Sha256 - static const std::vector - kSigGrp01Member0Sha256RandombaseTest1NoSigRl; - /// Sig of Test1 with Basename1 by Grp01(no SigRl) Member0 using Sha256 - static const std::vector kSigGrp01Member0Sha256Basename1Test1NoSigRl; - /// Sig of Test1 with Basename1 by Member0 using Sha256 from Ikgf - static const std::vector kSigSha256Basename1Test1NoSigRlIkgf; - /// Sig of Test1 with RandomBase by Grp01(no SigRl) Member0 using Sha384 - static const std::vector - kSigGrp01Member0Sha384RandombaseTest1NoSigRl; - /// Sig of Test1 with RandomBase by Grp01(no SigRl) Member0 using Sha512 - static const std::vector - kSigGrp01Member0Sha512RandombaseTest1NoSigRl; - /// group based rl test data (empty rl) - static const std::vector kGroupRlEmptyBuf; - /// group based rl test data (v=3, n=3, 3 revoked gid) - static const std::vector kGroupRl3GidBuf; - /// group based rl test data (v=3, n=0, 3 revoked gid) - static const std::vector kGroupRl3GidN0Buf; - /// group based rl test data (v=3, n=2, 3 revoked gid) - static const std::vector kGroupRl3GidN2Buf; - /// group based rl test data (v=3, n=4, 3 revoked gid) - static const std::vector kGroupRl3GidN4Buf; - /// a message - static const std::vector kMsg0; - /// a message - static const std::vector kMsg1; - /// a basename - static const std::vector kBsn0; - /// a basename - static const std::vector kBsn1; - - /// a group revocation list - static const std::vector kGrpRl; - /// a group revocation list from Ikgf - static const std::vector kGrpRlIkgf; - /// a group revocation list with single group revoked - static const std::vector kGrpRlRevokedGrpXOnlyEntry; - /// a group revocation list with multiple entries - static const std::vector kGrpRlRevokedGrpXFirstEntry; - /// a group revocation list with multiple entries - static const std::vector kGrpRlRevokedGrpXMiddleEntry; - /// a group revocation list with multiple entries - static const std::vector kGrpRlRevokedGrpXLastEntry; - /// private key based revocation list from Ikgf - static const std::vector kPrivRlIkgf; - /// empty private key based revocation list from Ikgf - static const std::vector kEmptyPrivRlIkgf; - - /// a group key in group X - static const GroupPubKey kGrpXKey; - /// the privrl of group X - static const std::vector kGrpXPrivRl; - - /// the privrl of group X with single entry PrivKey000 revoked - static const std::vector kGrpXPrivRlRevokedPrivKey000OnlyEntry; - /// the sigrl of group X - static const std::vector kGrpXSigRl; - /// a verifierrl of group X with bsn0 and SHA256 for some verifier - static const std::vector kGrpXBsn0Sha256VerRl; - /// a verifierrl of group X with bsn0 and SHA384 for some verifier - static const std::vector kGrpXBsn0Sha384VerRl; - /// a verifierrl of group X with bsn0 and SHA512 for some verifier - static const std::vector kGrpXBsn0Sha512VerRl; - /// a verifierrl of group X with bsn0 and SHA512/256 for some verifier - static const std::vector kGrpXBsn0Sha512256VerRl; - /// a verifierrl of group X with bsn0 for some verifier with single entry - static const std::vector kGrpXBsn0VerRlSingleEntry; - /// a verifierrl of group X with bsn1 for some verifier - static const std::vector kGrpXBsn1VerRl; - /// a verifierrl of group X with bsn1 for some verifier with 0-2 revoked - static const std::vector kGrpXBsn1VerRl_012; - - /// the sigrl of group X corrputed - static const std::vector kGrpXSigRlVersion2; - - /// a group key in group Y - static const GroupPubKey kGrpYKey; - /// the privrl of group Y - static const std::vector kGrpYPrivRl; - /// the sigrl of group Y - static const std::vector kGrpYSigRl; - /// a verifierrl of group Y for some verifier - static const std::vector kGrpYVerRl; - - /// the sigrl of group X - static const std::vector kGrpXSigRlMember0Sha256Bsn0Msg0OnlyEntry; - /// the sigrl of group X - static const std::vector kGrpXSigRlMember0Sha256Bsn0Msg0FirstEntry; - /// the sigrl of group X - static const std::vector kGrpXSigRlMember0Sha256Bsn0Msg0MiddleEntry; - /// the sigrl of group X - static const std::vector kGrpXSigRlMember0Sha256Bsn0Msg0LastEntry; - - /// signature of msg0 by member0 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXMember0Sha256Bsn0Msg0; - /// signature of msg0 by member0 with Sha256 bsn0 from Ikgf - static const std::vector kSigMember0Sha256Bsn0Msg0Ikgf; - /// signature of msg0 by member0 with Sha256 bsn0 from Ikgf with empty SigRl - static const std::vector kSigMember0Sha256Bsn0Msg0EmptySigRlIkgf; - /// signature of msg0 by member0 with Sha256 bsn0 from Ikgf without SigRl - static const std::vector kSigMember0Sha256Bsn0Msg0NoSigRlIkgf; - /// signature of msg0 by member0 from SigRl first entry with Sha256 bsn0 from - /// Ikgf - static const std::vector kSigRevSigMember0Sha256Bsn0Msg0Ikgf; - /// signature of msg0 by member0 from revoked Group with Sha256 bsn0 from Ikgf - static const std::vector kRevGroupSigMember0Sha256Bsn0Msg0Ikgf; - /// signature of msg0 by member0 of groupX with Sha256 bsn0 single entry sigrl - static const std::vector - kSigGrpXMember0Sha256Bsn0Msg0SingleEntrySigRl; - /// signature of msg0 by member0 of groupX with Sha256 bsn0 with revoked key - /// 000 - static const std::vector kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - /// signature of msg0 by member0 with Sha256 bsn0 with revoked key from Ikgf - static const std::vector kSigRevokedPrivKeySha256Bsn0Msg0Ikgf; - /// signature of msg0 by member0 of groupX with Sha256 bsn0 with revoked key - /// 001 - static const std::vector kSigGrpXRevokedPrivKey001Sha256Bsn0Msg0; - /// signature of msg0 by member0 of groupX with Sha256 bsn0 with revoked key - /// 002 - static const std::vector kSigGrpXRevokedPrivKey002Sha256Bsn0Msg0; - /// signature of msg1 by member0 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXMember0Sha256Bsn0Msg1; - /// signature of msg0 by member0 of groupX with Sha256 bsn1 - static const std::vector kSigGrpXMember0Sha256Bsn1Msg0; - /// signature of msg0 by member0 of groupX with Sha256 rnd base - static const std::vector kSigGrpXMember0Sha256RandbaseMsg0; - /// signature of msg0 by member0 of groupA with Sha256 rnd base - static const std::vector kSigMember0Sha256RandbaseMsg0Ikgf; - /// signature of msg1 by member0 of groupX with Sha256 rnd base - static const std::vector kSigGrpXMember0Sha256RandbaseMsg1; - /// signature of msg0 by member0 of groupX with Sha384 bsn0 - static const std::vector kSigGrpXMember0Sha384Bsn0Msg0; - /// signature of msg0 by member0 of groupX with Sha384 rnd base - static const std::vector kSigGrpXMember0Sha384RandbaseMsg0; - /// signature of msg0 by member0 of groupX with Sha512 bsn0 - static const std::vector kSigGrpXMember0Sha512Bsn0Msg0; - /// signature of msg0 by member0 of groupX with Sha512 rnd base - static const std::vector kSigGrpXMember0Sha512RandbaseMsg0; - /// signature of msg0 by member0 of groupX with Sha512256 bsn0 - static const std::vector kSigGrpXMember0Sha512256Bsn0Msg0; - /// signature of msg0 by member0 of groupX with Sha512256 rnd base - static const std::vector kSigGrpXMember0Sha512256RandbaseMsg0; - - /// signature of msg0 by verrevokedmember0 of groupX Sha256 bsn0 - static const std::vector kSigGrpXVerRevokedMember0Sha256Bsn0Msg0; - /// signature of msg0 by verrevokedmember1 of groupX Sha256 bsn0 - static const std::vector kSigGrpXVerRevokedMember1Sha256Bsn0Msg0; - /// signature of msg0 by verrevokedmember2 of groupX Sha256 bsn0 - static const std::vector kSigGrpXVerRevokedMember2Sha256Bsn0Msg0; - /// signature of msg0 by verrevokedmember3 of groupX Sha256 bsn1 - static const std::vector kSigGrpXVerRevokedMember3Sha256Bsn1Msg0; - /// signature of msg0 by member1 of groupX with Sha256 bsn0 - static const std::vector kSigGrpXMember1Sha256Bsn0Msg0; - - ///////////////////////////////////////////////////////////////////// - // EpidVerify Signature Based Revocation List Reject - /// GroupPubKey to be used for EpidVerify Signature Based Revocation List - /// Reject tests - static const GroupPubKey kPubKeySigRlVerify; - /// SigRl with 1 entry - static const std::vector kSigRlSingleEntry; - /// SigRl with 1 entry - static const std::vector kSigRlFiveEntries; - /// First entry in sigrl_five_entries - static const EpidSignature kSignatureSigrlFirst; - /// Middle entry in sigrl_five_entries - static const EpidSignature kSignatureSigrlMiddle; - /// Last entry in sigrl_five_entries - static const EpidSignature kSignatureSigrlLast; - - /// setup called before each TEST_F starts - virtual void SetUp() {} - /// teardown called after each TEST_F finishes - virtual void TearDown() {} - - /// value "1" represented as an octstr constant - /*! - this value is used frequently to set 32 bit fields. describing as a constant - here to reduce replication in code. - */ - static const OctStr32 kOctStr32_1; -}; - -#endif // EPID_VERIFIER_UNITTESTS_VERIFIER_TESTHELPER_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verify-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verify-test.cc deleted file mode 100644 index ffac4d2a5c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verify-test.cc +++ /dev/null @@ -1,1196 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Verify unit tests. - */ - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/api.h" -#include "epid/common/src/endian_convert.h" -} - -#include "epid/verifier/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" - -namespace { - -///////////////////////////////////////////////////////////////////////// -// Simple Errors - -TEST_F(EpidVerifierTest, VerifyFailsGivenNullParameters) { - VerifierCtxObj verifier(this->kGrp01Key); - auto& sig = this->kSigGrp01Member0Sha256RandombaseTest0; - auto& msg = this->kTest0; - - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(nullptr, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(verifier, nullptr, sig.size(), msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - nullptr, msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyFailsGivenSigLenTooShortForRlCount) { - VerifierCtxObj verifier(this->kGrp01Key); - EpidVerifierSetSigRl(verifier, (SigRl const*)this->kGrp01SigRl.data(), - this->kGrp01SigRl.size()); - auto sig = this->kSigGrp01Member0Sha256RandombaseTest0; - auto n2 = this->kGrp01SigRlN2; - sig.resize(sizeof(EpidSignature) + - (n2 - 2) * sizeof(((EpidSignature*)0)->sigma)); - auto& msg = this->kTest0; - - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyFailsGivenSigLenTooLongForRlCount) { - VerifierCtxObj verifier(this->kGrp01Key); - EpidVerifierSetSigRl(verifier, (SigRl const*)this->kGrp01SigRl.data(), - this->kGrp01SigRl.size()); - auto sig = this->kSigGrp01Member0Sha256RandombaseTest0; - auto n2 = this->kGrp01SigRlN2; - sig.resize(sizeof(EpidSignature) + n2 * sizeof(((EpidSignature*)0)->sigma)); - auto& msg = this->kTest0; - - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -#if (SIZE_MAX <= 0xFFFFFFFF) // When size_t value is 32 bit or lower -TEST_F(EpidVerifierTest, VerifyFailsGivenRlCountTooBig) { - VerifierCtxObj verifier(this->kGrp01Key); - EpidVerifierSetSigRl(verifier, (SigRl const*)this->kGrp01SigRl.data(), - this->kGrp01SigRl.size()); - auto sig = this->kSigGrp01Member0Sha256RandombaseTest0; - uint32_t n2 = SIZE_MAX / sizeof(NrProof) + 1; - uint32_t n2_ = ntohl(n2); - EpidSignature* sig_struct = (EpidSignature*)sig.data(); - sig_struct->n2 = *(OctStr32*)&n2_; - sig.resize(sizeof(EpidSignature) + (n2 - 1) * sizeof(NrProof)); - auto& msg = this->kTest0; - - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} -#endif - -///////////////////////////////////////////////////////////////////// -// -// 4.1.2 step 1 - The verifier reads the pre-computed (e12, e22, e2w, eg12). -// Refer to Section 3.6 for the computation of these values. -// This Step is not testable - -///////////////////////////////////////////////////////////////////// -// Non-Revocation List Reject -// 4.1.2 step 2 - The verifier verifies the basic signature Sigma0 as -// follows: - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithBNotInG1) { - // * 4.1.2 step 2.a - The verifier verifies G1.inGroup(B) = true. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.B.x.data.data[31]++; - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithBIdentityOfG1) { - // * 4.1.2 step 2.b - The verifier verifies that G1.isIdentity(B) is false. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.B = this->kG1IdentityStr; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithDiffBaseNameSameHashAlg) { - // * 4.1.2 step 2.c - If bsn is provided, the verifier verifies - // B = G1.hash(bsn). - // result must be kEpidSigInvalid - auto& pub_key = this->kGrpXKey; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& msg = this->kMsg0; - auto& bsn = this->kBasename1; - - VerifierCtxObj verifier(pub_key); - - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithSameBaseNameDiffHashAlg) { - // * 4.1.2 step 2.c - If bsn is provided, the verifier verifies - // B = G1.hash(bsn). - // result must be kEpidSigInvalid - auto& pub_key = this->kGrpXKey; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithKNotInG1) { - // * 4.1.2 step 2.d - The verifier verifies G1.inGroup(K) = true. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.K.x.data.data[31]++; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithTNotInG1) { - // * 4.1.2 step 2.e - The verifier verifies G1.inGroup(T) = true. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.T.x.data.data[31]++; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithCNotInRange) { - // * 4.1.2 step 2.f - The verifier verifies c, sx, sf, sa, sb in [0, p-1]. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.c.data = this->kParamsStr.p.data; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithSxNotInRange) { - // * 4.1.2 step 2.f - The verifier verifies c, sx, sf, sa, sb in [0, p-1]. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.sx.data = this->kParamsStr.p.data; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithSfNotInRange) { - // * 4.1.2 step 2.f - The verifier verifies c, sx, sf, sa, sb in [0, p-1]. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.sf.data = this->kParamsStr.p.data; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithSaNotInRange) { - // * 4.1.2 step 2.f - The verifier verifies c, sx, sf, sa, sb in [0, p-1]. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.sa.data = this->kParamsStr.p.data; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigWithSbNotInRange) { - // * 4.1.2 step 2.f - The verifier verifies c, sx, sf, sa, sb in [0, p-1]. - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - - EpidSignature sig = *( - const EpidSignature*)(this->kSigGrp01Member0Sha256RandombaseTest0.data()); - sig.sigma0.sb.data = this->kParamsStr.p.data; - size_t size = this->kSigGrp01Member0Sha256RandombaseTest0.size(); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, &sig, size, msg.data(), msg.size())); -} - -// 4.1.2 step 2.g - The verifier computes nc = (-c) mod p. -// This Step is not testable - -// 4.1.2 step 2.h - The verifier computes nsx = (-sx) mod p. -// This Step is not testable - -// 4.1.2 step 2.i - The verifier computes R1 = G1.multiExp(B, sf, K, nc). -// This Step is not testable - -// 4.1.2 step 2.j - The verifier computes t1 = G2.multiExp(g2, nsx, w, nc). -// This Step is not testable - -// 4.1.2 step 2.k - The verifier computes R2 = pairing(T, t1). -// This Step is not testable - -// 4.1.2 step 2.l - The verifier compute t2 = GT.multiExp(e12, sf, e22, sb, -// e2w, sa, eg12, c). -// This Step is not testable - -// 4.1.2 step 2.m - The verifier compute R2 = GT.mul(R2, t2). -// This Step is not testable - -// 4.1.2 step 2.n - The verifier compute t3 = Fp.hash(p || g1 || g2 || h1 -// || h2 || w || B || K || T || R1 || R2). -// Refer to Section 7.1 for hash operation over a prime -// field. -// This Step is not testable - -TEST_F(EpidVerifierTest, VerifyRejectsSigDifferingOnlyInMsg) { - // * 4.1.2 step 2.o - The verifier verifies c = Fp.hash(t3 || m). - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& sig = this->kSigGrp01Member0Sha256RandombaseTest0; - - auto msg = this->kTest0; - msg[0]++; - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigDifferingOnlyInBaseName) { - // * 4.1.2 step 2.o - The verifier verifies c = Fp.hash(t3 || m). - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - - // copy sig data to a local buffer - auto sig_data = this->kSigGrpXMember0Sha256Bsn0Msg0; - EpidSignature* sig = (EpidSignature*)sig_data.data(); - // simulate change to basename - sig->sigma0.B.x.data.data[0] += 1; - auto msg = this->kTest1; - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, sig, sig_data.size(), msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigDifferingOnlyInGroup) { - // * 4.1.2 step 2.o - The verifier verifies c = Fp.hash(t3 || m). - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - - // copy sig data to a local buffer - auto sig_data = this->kSigGrpXMember0Sha256Bsn0Msg0; - EpidSignature* sig = (EpidSignature*)sig_data.data(); - // simulate change to h1 - sig->sigma0.T.x.data.data[0] += 1; - auto msg = this->kTest1; - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, sig, sig_data.size(), msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigDifferingOnlyInHashAlg) { - // * 4.1.2 step 2.o - The verifier verifies c = Fp.hash(t3 || m). - // result must be kEpidSigInvalid - VerifierCtxObj verifier(this->kGrp01Key); - auto& msg = this->kTest0; - auto& sig = this->kSigGrp01Member0Sha256RandombaseTest0; - - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512)); - EXPECT_EQ(kEpidSigInvalid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -// 4.1.2 step 2.p - If any of the above verifications fails, the verifier -// aborts and outputs 1. -// This Step is an aggregate of the above steps - -///////////////////////////////////////////////////////////////////// -// Group Based Revocation List Reject -// 4.1.2 step 3 - If GroupRL is provided - -TEST_F(EpidVerifierTest, VerifyRejectsFromGroupRlSingleEntry) { - // * 4.1.2 step 3.a - The verifier verifies that gid does not match any entry - // in GroupRL. - // result must be kEpidSigRevokedInGroupRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlRevokedGrpXOnlyEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInGroupRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsFromGroupRlFirstEntry) { - // * 4.1.2 step 3.a - The verifier verifies that gid does not match any entry - // in GroupRL. - // result must be kEpidSigRevokedInGroupRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlRevokedGrpXFirstEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInGroupRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsFromGroupRlFirstEntryUsingIkgfData) { - // result must be kEpidSigRevokedInGroupRl - auto& pub_key = this->kPubKeyRevGroupIkgfStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlIkgf; - auto& sig = this->kRevGroupSigMember0Sha256Bsn0Msg0Ikgf; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInGroupRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsFromGroupRlMiddleEntry) { - // * 4.1.2 step 3.a - The verifier verifies that gid does not match any entry - // in GroupRL. - // result must be kEpidSigRevokedInGroupRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlRevokedGrpXMiddleEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInGroupRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsFromGroupRlLastEntry) { - // * 4.1.2 step 3.a - The verifier verifies that gid does not match any entry - // in GroupRL. - // result must be kEpidSigRevokedInGroupRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRlRevokedGrpXLastEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInGroupRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -// 4.1.2 step 3.b - If gid matches an entry in GroupRL, aborts and returns 2. -// This Step is an aggregate of the above steps - -///////////////////////////////////////////////////////////////////// -// Private Based Revocation List Reject -// 4.1.2 step 4 - If PrivRL is provided - -// * 4.1.2 step 4.a - The verifier verifies that gid in the public key and in -// PrivRL match. If mismatch, abort and return -// "operation failed". -// Not possible, checked in EpidVerifierSetPrivRl - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromPrivRlSingleEntry) { - // * 4.1.2 step 4.b - For i = 0, ?, n1-1, - // the verifier computes t4 =G1.exp(B, f[i]) - // and verifies that G1.isEqual(t4, K) = false. - // A faster private-key revocation check algorithm is - // provided in Section 4.5. - // result must be kEpidSigRevokedInPrivRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kGrpXPrivRlRevokedPrivKey000OnlyEntry; - auto& sig = this->kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInPrivRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromPrivRlFirstEntry) { - // * 4.1.2 step 4.b - For i = 0, ?, n1-1, - // the verifier computes t4 =G1.exp(B, f[i]) - // and verifies that G1.isEqual(t4, K) = false. - // A faster private-key revocation check algorithm is - // provided in Section 4.5. - // result must be kEpidSigRevokedInPrivRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig = this->kSigGrpXRevokedPrivKey000Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInPrivRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromPrivRlFirstEntryUsingIkgfData) { - // * 4.1.2 step 4.b - For i = 0, ?, n1-1, - // the verifier computes t4 =G1.exp(B, f[i]) - // and verifies that G1.isEqual(t4, K) = false. - // A faster private-key revocation check algorithm is - // provided in Section 4.5. - // result must be kEpidSigRevokedInPrivRl - auto& pub_key = this->kPubKeyIkgfStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kPrivRlIkgf; - auto& sig = this->kSigRevokedPrivKeySha256Bsn0Msg0Ikgf; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInPrivRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromPrivRlMiddleEntry) { - // * 4.1.2 step 4.b - For i = 0, ?, n1-1, - // the verifier computes t4 =G1.exp(B, f[i]) - // and verifies that G1.isEqual(t4, K) = false. - // A faster private-key revocation check algorithm is - // provided in Section 4.5. - // result must be kEpidSigRevokedInPrivRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig = this->kSigGrpXRevokedPrivKey001Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInPrivRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromPrivRlLastEntry) { - // * 4.1.2 step 4.b - For i = 0, ?, n1-1, - // the verifier computes t4 =G1.exp(B, f[i]) - // and verifies that G1.isEqual(t4, K) = false. - // A faster private-key revocation check algorithm is - // provided in Section 4.5. - // result must be kEpidSigRevokedInPrivRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig = this->kSigGrpXRevokedPrivKey002Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInPrivRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigFromEmptyPrivRlUsingIkgfData) { - auto& pub_key = this->kPubKeyIkgfStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& priv_rl = this->kEmptyPrivRlIkgf; - auto& sig = this->kSigMember0Sha256Bsn0Msg0NoSigRlIkgf; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - - EXPECT_EQ(kEpidNoErr, EpidVerify(verifier, (EpidSignature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -// 4.1.2 step 4.c - If the above step fails, the verifier aborts and -// output 3. -// This Step is an aggregate of the above steps - -///////////////////////////////////////////////////////////////////// -// Signature Based Revocation List Reject -// 4.1.2 step 5 - If SigRL is provided - -// * 4.1.2 step 5.a - The verifier verifies that gid in the public key and in -// SigRL match. If mismatch, abort and return -// "operation failed". -// Not possible, checked in EpidVerifierSetSigRl - -TEST_F(EpidVerifierTest, VerifyFailsOnSigRlverNotMatchSigRlRlver) { - // * 4.1.2 step 5.b - The verifier verifies that RLver in Sigma and in SigRL - // match. If mismatch, abort and output "operation failed". - // result must be "operation failed" (not kEpidSig*) - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlVersion2; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyFailsOnSigN2NotMatchSigRlN2) { - // * 4.1.2 step 5.c - The verifier verifies that n2 in Sigma and in SigRL - // match. If mismatch, abort and output "operation failed". - // result must be "operation failed" (not kEpidSig*) - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Sha256Bsn0Msg0OnlyEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromSigRlSingleEntry) { - // * 4.1.2 step 5.d - For i = 0, ..., n2-1, the verifier verifies - // nrVerify(B, K, B[i], K[i], Sigma[i]) = true. The details - // of nrVerify() will be given in the next subsection. - // result must be kEpidSigRevokedInSigRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Sha256Bsn0Msg0OnlyEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0SingleEntrySigRl; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInSigRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromSigRlFirstEntry) { - // * 4.1.2 step 5.d - For i = 0, ..., n2-1, the verifier verifies - // nrVerify(B, K, B[i], K[i], Sigma[i]) = true. The details - // of nrVerify() will be given in the next subsection. - // result must be kEpidSigRevokedInSigRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Sha256Bsn0Msg0FirstEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInSigRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromSigRlFirstEntryUsingIkgfData) { - auto& pub_key = this->kPubKeyIkgfStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kSigRlIkgf; - auto& sig = this->kSigRevSigMember0Sha256Bsn0Msg0Ikgf; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInSigRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromSigRlMiddleEntry) { - // * 4.1.2 step 5.d - For i = 0, ..., n2-1, the verifier verifies - // nrVerify(B, K, B[i], K[i], Sigma[i]) = true. The details - // of nrVerify() will be given in the next subsection. - // result must be kEpidSigRevokedInSigRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Sha256Bsn0Msg0MiddleEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInSigRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromSigRlLastEntry) { - // * 4.1.2 step 5.d - For i = 0, ..., n2-1, the verifier verifies - // nrVerify(B, K, B[i], K[i], Sigma[i]) = true. The details - // of nrVerify() will be given in the next subsection. - // result must be kEpidSigRevokedInSigRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kGrpXSigRlMember0Sha256Bsn0Msg0LastEntry; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInSigRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, - RejectsSigFromNonemptySigRlGivenEmptySigRlUsingIkgfData) { - auto& pub_key = this->kPubKeyIkgfStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kEmptySigRlIkgf; - auto& sig = this->kSigMember0Sha256Bsn0Msg0Ikgf; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidBadArgErr, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigFromEmptySigRlUsingIkgfData) { - auto& pub_key = this->kPubKeyIkgfStr; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& sig_rl = this->kEmptySigRlIkgf; - auto& sig = this->kSigMember0Sha256Bsn0Msg0EmptySigRlIkgf; - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidNoErr, EpidVerify(verifier, (EpidSignature const*)sig.data(), - sig.size(), msg.data(), msg.size())); -} - -// 4.1.2 step 5.e - If the above step fails, the verifier aborts and -// output 4. -// This Step is an aggregate of the above steps - -///////////////////////////////////////////////////////////////////// -// Verifier Based Revocation List Reject -// 4.1.2 step 6 - If VerifierRL is provided - -// * 4.1.2 step 6.a - The verifier verifies that gid in the public key and in -// VerifierRL match. If mismatch, abort and return -// "operation failed". -// Not possible, checked in EpidVerifierSetVerifierRl - -// * 4.1.2 step 6.b - The verifier verifies that B in the signature and in -// VerifierRL match. If mismatch, go to step 7. -// result must be "operation failed" (not kEpidSig*) -// Not possible, checked in EpidVerifierSetVerifierRl - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromVerifierRlSingleEntry) { - // * 4.1.2 step 6.c - For i = 0, ..., n4-1, the verifier verifies that - // K != K[i]. - // result must be kEpidSigRevokedInVerifierRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& ver_rl = this->kGrpXBsn0VerRlSingleEntry; - auto& sig = this->kSigGrpXVerRevokedMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl const*)ver_rl.data(), ver_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInVerifierRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromVerifierRlFirstEntry) { - // * 4.1.2 step 6.c - For i = 0, ..., n4-1, the verifier verifies that - // K != K[i]. - // result must be kEpidSigRevokedInVerifierRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& ver_rl = this->kGrpXBsn0Sha256VerRl; - auto& sig = this->kSigGrpXVerRevokedMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl const*)ver_rl.data(), ver_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInVerifierRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromVerifierRlMiddleEntry) { - // * 4.1.2 step 6.c - For i = 0, ..., n4-1, the verifier verifies that - // K != K[i]. - // result must be kEpidSigRevokedInVerifierRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& ver_rl = this->kGrpXBsn0Sha256VerRl; - auto& sig = this->kSigGrpXVerRevokedMember1Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl const*)ver_rl.data(), ver_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInVerifierRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyRejectsSigFromVerifierRlLastEntry) { - // * 4.1.2 step 6.c - For i = 0, ..., n4-1, the verifier verifies that - // K != K[i]. - // result must be kEpidSigRevokedInVerifierRl - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& ver_rl = this->kGrpXBsn0Sha256VerRl; - auto& sig = this->kSigGrpXVerRevokedMember2Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl const*)ver_rl.data(), ver_rl.size())); - - EXPECT_EQ(kEpidSigRevokedInVerifierRl, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -// 4.1.2 step 6.d - If the above step fails, the verifier aborts and -// output 5 -// This Step is an aggregate of the above steps - -///////////////////////////////////////////////////////////////////// -// Accept -// 4.1.2 step 7 - If all the above verifications succeed, the verifier -// outputs 0 - -TEST_F(EpidVerifierTest, VerifyAcceptsSigWithBaseNameNoRlSha256) { - auto& pub_key = this->kGrpXKey; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigWithBaseNameAllRlSha256) { - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& ver_rl = this->kGrpXBsn0Sha256VerRl; - auto& sig = this->kSigGrpXMember0Sha256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl const*)ver_rl.data(), ver_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigWithRandomBaseNameNoRlSha256) { - auto& pub_key = this->kGrpXKey; - auto& sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - auto& msg = this->kMsg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigWithRandomBaseNameAllRlSha256) { - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& sig = this->kSigGrpXMember0Sha256RandbaseMsg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, - VerifyAcceptsSigWithRandomBaseNameAllRlSha256UsingIkgfData) { - auto& pub_key = this->kPubKeyIkgfStr; - auto& msg = this->kMsg0; - auto& grp_rl = this->kGrpRlIkgf; - auto& priv_rl = this->kPrivRlIkgf; - auto& sig_rl = this->kSigRlIkgf; - auto& sig = this->kSigMember0Sha256RandbaseMsg0Ikgf; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigWithBaseNameAllRlSha384) { - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& ver_rl = this->kGrpXBsn0Sha384VerRl; - auto& sig = this->kSigGrpXMember0Sha384Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha384)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl const*)ver_rl.data(), ver_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigWithRandomBaseNameAllRlSha384) { - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& sig = this->kSigGrpXMember0Sha384RandbaseMsg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha384)); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigWithBaseNameAllRlSha512) { - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& ver_rl = this->kGrpXBsn0Sha512VerRl; - auto& sig = this->kSigGrpXMember0Sha512Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl const*)ver_rl.data(), ver_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyAcceptsSigWithRandomBaseNameAllRlSha512) { - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& sig = this->kSigGrpXMember0Sha512RandbaseMsg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512)); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, DISABLED_VerifyAcceptsSigWithBaseNameAllRlSha512256) { - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& bsn = this->kBsn0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& ver_rl = this->kGrpXBsn0Sha512256VerRl; - auto& sig = this->kSigGrpXMember0Sha512256Bsn0Msg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512_256)); - THROW_ON_EPIDERR(EpidVerifierSetBasename(verifier, bsn.data(), bsn.size())); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetVerifierRl( - verifier, (VerifierRl const*)ver_rl.data(), ver_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, - DISABLED_VerifyAcceptsSigWithRandomBaseNameAllRlSha512256) { - auto& pub_key = this->kGrpXKey; - auto& msg = this->kMsg0; - auto& grp_rl = this->kGrpRl; - auto& priv_rl = this->kGrpXPrivRl; - auto& sig_rl = this->kGrpXSigRl; - auto& sig = this->kSigGrpXMember0Sha512256RandbaseMsg0; - - VerifierCtxObj verifier(pub_key); - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512_256)); - THROW_ON_EPIDERR(EpidVerifierSetGroupRl( - verifier, (GroupRl const*)grp_rl.data(), grp_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetPrivRl( - verifier, (PrivRl const*)priv_rl.data(), priv_rl.size())); - THROW_ON_EPIDERR(EpidVerifierSetSigRl(verifier, (SigRl const*)sig_rl.data(), - sig_rl.size())); - - EXPECT_EQ(kEpidSigValid, - EpidVerify(verifier, (EpidSignature const*)sig.data(), sig.size(), - msg.data(), msg.size())); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifybasic-test.cc b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifybasic-test.cc deleted file mode 100644 index 9f6b3e5760..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/unittests/verifybasic-test.cc +++ /dev/null @@ -1,152 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief VerifyBasicSig unit tests. - */ - -#include -#include - -#include "gtest/gtest.h" - -extern "C" { -#include "epid/verifier/api.h" -} - -#include "epid/verifier/unittests/verifier-testhelper.h" -#include "epid/common-testhelper/verifier_wrapper-testhelper.h" -#include "epid/common-testhelper/errors-testhelper.h" -#include "epid/member/unittests/member-testhelper.h" - -namespace { - -TEST_F(EpidVerifierTest, VerifyBasicSigFailsGivenNullPtr) { - VerifierCtxObj verifier(this->kGrp01Key); - auto const& sig = (EpidSignature const*)this - ->kSigGrp01Member0Sha256RandombaseTest1NoSigRl.data(); - const BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kTest1; - - EXPECT_EQ(kEpidBadArgErr, - EpidVerifyBasicSig(nullptr, &basic_sig, msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifyBasicSig(verifier, nullptr, msg.data(), msg.size())); - EXPECT_EQ(kEpidBadArgErr, - EpidVerifyBasicSig(verifier, &basic_sig, nullptr, msg.size())); -} - -TEST_F(EpidVerifierTest, - VerifyBasicSigCanVerifyValidSignatureWithSHA512AsDefault) { - VerifierCtxObj verifier(this->kGrp01Key); - auto const& sig = (EpidSignature const*)this - ->kSigGrp01Member0Sha512RandombaseTest1NoSigRl.data(); - const BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kTest1; - - EXPECT_EQ(kEpidNoErr, - EpidVerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyBasicSigCanVerifyValidSignatureWithSHA256) { - VerifierCtxObj verifier(this->kGrp01Key); - auto const& sig = (EpidSignature const*)this - ->kSigGrp01Member0Sha256RandombaseTest1NoSigRl.data(); - const BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kTest1; - - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - EXPECT_EQ(kEpidNoErr, - EpidVerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyBasicSigCanVerifyValidSignatureWithSHA384) { - VerifierCtxObj verifier(this->kGrp01Key); - auto const& sig = (EpidSignature const*)this - ->kSigGrp01Member0Sha384RandombaseTest1NoSigRl.data(); - const BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kTest1; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha384)); - EXPECT_EQ(kEpidNoErr, - EpidVerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyBasicSigCanVerifyValidSignatureWithSHA512) { - VerifierCtxObj verifier(this->kGrp01Key); - auto const& sig = (EpidSignature const*)this - ->kSigGrp01Member0Sha512RandombaseTest1NoSigRl.data(); - const BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kTest1; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha512)); - EXPECT_EQ(kEpidNoErr, - EpidVerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, - VerifyBasicSigDetectsInvalidSignatureGivenMatchingMessage) { - VerifierCtxObj verifier(this->kGrp01Key); - auto const& sig = (EpidSignature const*)this - ->kSigGrp01Member0Sha256RandombaseTest1NoSigRl.data(); - const BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kTest1; - BasicSignature corrupted_basic_sig = basic_sig; - corrupted_basic_sig.B.x.data.data[0]++; - EXPECT_NE(kEpidNoErr, EpidVerifyBasicSig(verifier, &corrupted_basic_sig, - msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, - VerifyBasicSigDetectsInvalidSignatureGivenMessageMismatch) { - VerifierCtxObj verifier(this->kGrp01Key); - auto const& sig = (EpidSignature const*)this - ->kSigGrp01Member0Sha256RandombaseTest1NoSigRl.data(); - const BasicSignature basic_sig = sig->sigma0; - auto msg = this->kTest1; - msg[0]++; // change message for signature verification to fail - EXPECT_EQ(kEpidSigInvalid, - EpidVerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyBasicSigCanVerifyWithBasename) { - VerifierCtxObj verifier(this->kGrp01Key); - auto const& sig = (EpidSignature const*)this - ->kSigGrp01Member0Sha256Basename1Test1NoSigRl.data(); - const BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kTest1; - auto& basename = this->kBasename1; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR( - EpidVerifierSetBasename(verifier, basename.data(), basename.size())); - EXPECT_EQ(kEpidNoErr, - EpidVerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -TEST_F(EpidVerifierTest, VerifyBasicSigCanVerifyWithBasenameUsingIkgfData) { - VerifierCtxObj verifier(this->kPubKeyIkgfStr); - auto const& sig = - (EpidSignature const*)this->kSigSha256Basename1Test1NoSigRlIkgf.data(); - const BasicSignature basic_sig = sig->sigma0; - auto& msg = this->kTest1; - auto& basename = this->kBasename1; - THROW_ON_EPIDERR(EpidVerifierSetHashAlg(verifier, kSha256)); - THROW_ON_EPIDERR( - EpidVerifierSetBasename(verifier, basename.data(), basename.size())); - EXPECT_EQ(kEpidNoErr, - EpidVerifyBasicSig(verifier, &basic_sig, msg.data(), msg.size())); -} - -} // namespace diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/verifier.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/verifier.parts deleted file mode 100644 index 5f2f140a9a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/epid/verifier/verifier.parts +++ /dev/null @@ -1,117 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ -Import('*') -env.PartName('verifier') - -api_headers = Pattern(src_dir='.', - includes=['*.h'], - recursive=False).files() -src_files = Pattern(src_dir='src', - includes=['*.c'], - recursive=False).files() -internal_headers = Pattern(src_dir='src', - includes=['*.h', '*.inc'], - recursive=False).files() -utest_files = Pattern(src_dir='unittests', - includes=['*-test.cc', '*-testhelper.cc'], - recursive=False).files() -utest_headers = Pattern(src_dir='unittests', - includes=['*-testhelper.h',], - recursive=False).files() -utest_data_files = Pattern(src_dir='unittests/testdata/sigrl', - includes=['*.inc'], - excludes=[], - recursive=False).files() - -epid11_headers = Pattern(src_dir='1.1', - includes=['*.h'], - recursive=False).files() -epid11_src_files = Pattern(src_dir='1.1/src', - includes=['*.c'], - recursive=False).files() -epid11_internal_headers = Pattern(src_dir='1.1/src', - includes=['*.h', '*.inc'], - recursive=False).files() -epid11_utest_files = Pattern(src_dir='1.1/unittests', - includes=['*-test.cc', '*-testhelper.cc'], - recursive=False).files() -epid11_utest_headers = Pattern(src_dir='1.1/unittests', - includes=['*-testhelper.h',], - recursive=False).files() -epid11_utest_data_files = Pattern(src_dir='1.1/unittests/testdata', - includes=['*.inc'], - recursive=False).files() - -build_files = Pattern(src_dir='.', - includes=['*.parts', 'Makefile'], - recursive=False).files() - -if 'install_package' in env['MODE']: - env.InstallTopLevel(api_headers, - sub_dir='epid/${PART_SHORT_NAME}') - env.InstallTopLevel(src_files + internal_headers, - sub_dir='epid/${PART_SHORT_NAME}/src') - env.InstallTopLevel(utest_files + utest_headers, - sub_dir='epid/${PART_SHORT_NAME}/unittests') - env.InstallTopLevel( - utest_data_files, - sub_dir='epid/${PART_SHORT_NAME}/unittests/testdata/sigrl') - - env.InstallTopLevel(epid11_headers, - sub_dir='epid/${PART_SHORT_NAME}/1.1') - env.InstallTopLevel(epid11_src_files + epid11_internal_headers, - sub_dir='epid/${PART_SHORT_NAME}/1.1/src') - env.InstallTopLevel(epid11_utest_files + epid11_utest_headers, - sub_dir='epid/${PART_SHORT_NAME}/1.1/unittests') - env.InstallTopLevel( - epid11_utest_data_files, - sub_dir='epid/${PART_SHORT_NAME}/1.1/unittests/testdata') - - env.InstallTopLevel(build_files, sub_dir='epid/${PART_SHORT_NAME}') - -else: - env.DependsOn([ - Component('common'), - ]) - - env.Append(CPPPATH='#') - - testenv = env.Clone() - outputs = env.Library('${PART_NAME}', src_files + epid11_src_files) - env.Sdk(outputs) - env.SdkInclude(api_headers, sub_dir='epid/${PART_SHORT_NAME}') - env.SdkInclude(epid11_headers, sub_dir='epid/${PART_SHORT_NAME}/1.1') - - if 'install_lib' in env['MODE']: - env.InstallLib(outputs) - env.InstallInclude(api_headers, sub_dir='${PART_SHORT_NAME}') - env.InstallInclude(epid11_headers, sub_dir='${PART_SHORT_NAME}/1.1') - - testenv['UNIT_TEST_TARGET_NAME'] = "${PART_NAME}-${UNIT_TEST_TARGET}" - testenv.UnitTest("utest", - utest_files + epid11_utest_files, - command_args=[ - '--gtest_color=yes', - '--gtest_print_time=1', - '--gtest_output=xml', - '--gtest_filter=**', - ], - make_pdb=(env.isConfigBasedOn('debug') or - env.isConfigBasedOn('static_crt_debug')), - depends=[Component('gtest'), - Component('common-testhelper'), - Component('verifier')], - INSTALL_BIN='${INSTALL_TEST_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/Makefile deleted file mode 100644 index 004cf871fc..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/make -f - -#define variables -IPP_API_INCLUDE_DIR = ../ext/ipp/include -EXAMPLE_INSTALL_DIR = $(epidinstalldir)/example -COMPRESSED_DEFAULT_FILES_INSTALL_DIR = $(epidinstalldir)/compressed_example - -SIGNMSG_INCLUDE_DIR = ./signmsg -SIGNMSG_SRC = $(wildcard ./signmsg/src/*.c) -SIGNMSG_OBJ = $(sort $(SIGNMSG_SRC:.c=.o)) -SIGNMSG_EXE = ./signmsg/src/signmsg - -VERIFYSIG_INCLUDE_DIR = ./verifysig -VERIFYSIG_SRC = $(wildcard ./verifysig/src/*.c) -VERIFYSIG_OBJ = $(sort $(VERIFYSIG_SRC:.c=.o)) -VERIFYSIG_EXE = ./verifysig/src/verifysig - - -LIB_UTIL_DIR = ./util/src -LIB_DROPT_DIR = ../ext/dropt/src -LIB_IPPCP_DIR = ../ext/ipp/sources/ippcp/src -LIB_IPPCPEPID_DIR = ../ext/ipp/sources/ippcpepid/src -LIB_MEMBER_DIR = ../epid/member -LIB_VERIFIER_DIR = ../epid/verifier -LIB_COMMON_DIR = ../epid/common - -#set linker flags -LDFLAGS += -L$(LIB_UTIL_DIR) \ - -L$(LIB_DROPT_DIR) \ - -L$(LIB_IPPCP_DIR) \ - -L$(LIB_COMMON_DIR) \ - -L$(LIB_IPPCPEPID_DIR) \ - -lcommon -lippcpepid \ - -lippcp -lutil -ldropt - -$(VERIFYSIG_EXE): $(VERIFYSIG_OBJ) - $(CC) -o $@ $^ $(CFLAGS) -L$(LIB_VERIFIER_DIR) -lverifier $(LDFLAGS) - -$(VERIFYSIG_OBJ): %.o: %.c - $(CC) -o $@ $(CFLAGS) -I$(LIB_UTIL_DIR)/../.. \ - -I$(LIB_DROPT_DIR)/../include \ - -I$(LIB_VERIFIER_DIR)/../.. \ - -I$(VERIFYSIG_INCLUDE_DIR) \ - -I$(IPP_API_INCLUDE_DIR) -c $^ - - -$(SIGNMSG_EXE): $(SIGNMSG_OBJ) - $(CC) -o $@ $^ $(CFLAGS) -L$(LIB_MEMBER_DIR) -lmember $(LDFLAGS) - -$(SIGNMSG_OBJ): %.o: %.c - $(CC) -o $@ $(CFLAGS) -I$(LIB_UTIL_DIR)/../.. \ - -I$(LIB_DROPT_DIR)/../include \ - -I$(LIB_MEMBER_DIR)/../.. \ - -I$(SIGNMSG_INCLUDE_DIR) \ - -I$(IPP_API_INCLUDE_DIR) -c $^ - -#target part -build: all install - -all: $(VERIFYSIG_EXE) $(SIGNMSG_EXE) - -install: - mkdir -p '$(EXAMPLE_INSTALL_DIR)/data' - cp -r ./data/group* ./data/grprl_empty.bin \ - ./data/*.md '$(EXAMPLE_INSTALL_DIR)/data' - cp ./data/cacert.bin ./data/grprl.bin \ - ./data/privrl.bin ./data/sigrl.bin \ - ./data/mprivkey.dat ./data/pubkey.bin \ - '$(EXAMPLE_INSTALL_DIR)' - mkdir -p '$(EXAMPLE_INSTALL_DIR)/compressed_data' - cp -r ./compressed_data/group* ./compressed_data/grprl_empty.bin \ - ./compressed_data/*.md '$(EXAMPLE_INSTALL_DIR)/compressed_data' - mkdir -p '$(COMPRESSED_DEFAULT_FILES_INSTALL_DIR)' - cp ./compressed_data/cacert.bin ./compressed_data/grprl.bin \ - ./compressed_data/privrl.bin ./compressed_data/sigrl.bin \ - ./compressed_data/mprivkey.dat ./compressed_data/pubkey.bin \ - '$(COMPRESSED_DEFAULT_FILES_INSTALL_DIR)' - cp $(VERIFYSIG_EXE) $(SIGNMSG_EXE) '$(EXAMPLE_INSTALL_DIR)' - -clean: - rm -f $(VERIFYSIG_OBJ) \ - $(VERIFYSIG_EXE) \ - $(SIGNMSG_OBJ) \ - $(SIGNMSG_EXE) diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/README.md b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/README.md deleted file mode 100644 index 4075c753f7..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/README.md +++ /dev/null @@ -1,179 +0,0 @@ -# Sample Issuer Material - -This folder contains compressed key sample issuer material for use with the -Intel(R) EPID SDK. All data files are in binary format. - -_Note: The groups and members provided here are distinct from the -corresponding uncompressed groups and members._ - -## Directory Structure - - data - |__ groupa - | |__ member0 - | | |__ mprivkey.dat - | | - | |__ member1 - | | |__ mprivkey.dat - | | - | |__ privrevokedmember0 - | | |__ mprivkey.dat - | | - | |__ privrevokedmember1 - | | |__ mprivkey.dat - | | - | |__ privrevokedmember2 - | | |__ mprivkey.dat - | | - | |__ sigrevokedmember0 - | | |__ mprivkey.dat - | | - | |__ sigrevokedmember1 - | | |__ mprivkey.dat - | | - | |__ sigrevokedmember2 - | | |__ mprivkey.dat - | | - | |__ privrl.bin - | |__ privrl_empty.bin - | |__ pubkey.bin - | |__ sigrl.bin - | |__ sigrl_empty.bin - | - |__ groupb - | |__ member0 - | | |__ mprivkey.dat - | | - | |__ member1 - | | |__ mprivkey.dat - | | - | |__ privrevokedmember0 - | | |__ mprivkey.dat - | | - | |__ sigrevokedmember0 - | | |__ mprivkey.dat - | | - | |__ privrl.bin - | |__ privrl_empty.bin - | |__ pubkey.bin - | |__ sigrl.bin - | |__ sigrl_empty.bin - | - |__ grprl.bin - |__ grprl_empty.bin - |__ mprivkey.dat - |__ privrl.bin - |__ pubkey.bin - |__ cacert.bin - |__ sigrl.bin - - -## Description - -There are 2 groups - -- **groupa** - -- **groupb** - -### Group A - -**groupa** contains 8 members. Each member has a member private key -`mprivkey.dat`. Here are the members: - -- **member0** - a member in good standing - -- **member1** - a member in good standing - -- **privrevokedmember0** - a member revoked using its private key - -- **privrevokedmember1** - a member revoked using its private key - -- **privrevokedmember2** - a member revoked using its private key - -- **sigrevokedmember0** - a member revoked using a signature - -- **sigrevokedmember1** - a member revoked using a signature - -- **sigrevokedmember2** - a member revoked using a signature - - -In addition, **groupa** contain the following revocation lists: - -- `pubkey.bin` - group public key - -- `privrl.bin` - private key based revocation list with 3 entries - - **privrevokedmember0**, **privrevokedmember1** and - **privrevokedmember2** - -- `sigrl.bin` - signature based revocation list with 3 entries - - **sigrevokedmember0**, **sigrevokedmember2** and - **sigrevokedmember2** - -- `privrl_empty.bin` - private key based revocation list with 0 entries - -- `sigrl_empty.bin` - signature based revocation list with 0 entries - - -### Group B - -**groupb** contains 3 members. Each member has a member private key -`mprivkey.dat`. Here are the members: - -- **member0** - a member in good standing - -- **privrevokedmember0** - a member whose private key is revoked - -- **sigrevokedmember0** - a member whose signature is revoked - - -In addition, **groupb** contain the following revocation lists: - -- `pubkey.bin` - group public key - -- `privrl.bin` - private key based revocation list with 1 entry - - **privrevokedmember0** - -- `sigrl.bin` - signature based revocation list with 1 entries - - **sigrevokedmember0** - -- `privrl_empty.bin` - private key based revocation list with 0 entries - -- `sigrl_empty.bin` - signature based revocation list with 0 entries - - -### Default files - -- `/data/cacert.bin` - CA certificate used as default input to signmsg - and `verifysig` - -- `/data/grprl.bin` - group revocation list with one entry **groupb** used - as default input to `verifysig` - -- `/data/pubkey.bin` - public key in **groupa** used as default input - to signmsg and `verifysig` - -- `/data/mprivkey.dat` - private key of a **member0** in the - **groupa** used as default input to `signmsg` - -- `/data/privrl.bin` - private key based revocation list in the - **groupa** with 0 entries used as default input to `verifysig` - -- `/data/sigrl.bin` - signature based revocation list in the - **groupa** with 0 entries used as default input to `signmsg` - and `verifysig` - -### Group revocation lists - -There are 2 group revocation lists: - -- `grprl.bin` - group revocation list with 1 entry - **groupb** - -- `grprl_empty.bin` - group revocation list with 0 entries - - -### IoT EPID Issuing CA certificate - -- `/data/cacert.bin` - CA certificate used to check that revocation - lists and group public keys are authorized by the issuer, e.g., - signed by the issuer diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/cacert.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/cacert.bin deleted file mode 100644 index fcbcc1f674..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/cacert.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/compressed_data.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/compressed_data.parts deleted file mode 100644 index b2637631c0..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/compressed_data.parts +++ /dev/null @@ -1,72 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -# Normal stuff that all Parts should have -env.PartName("sample_compressed_data") - -#files -data_files = Pattern(src_dir='.', - includes=[ - 'grprl_empty.bin', - 'README.md', - 'groupa/privrl.bin', - 'groupa/pubkey.bin', - 'groupa/sigrl.bin', - 'groupa/privrl_empty.bin', - 'groupa/sigrl_empty.bin', - 'groupa/member0/mprivkey.dat', - 'groupa/member1/mprivkey.dat', - 'groupa/privrevokedmember0/mprivkey.dat', - 'groupa/privrevokedmember1/mprivkey.dat', - 'groupa/privrevokedmember2/mprivkey.dat', - 'groupa/sigrevokedmember0/mprivkey.dat', - 'groupa/sigrevokedmember1/mprivkey.dat', - 'groupa/sigrevokedmember2/mprivkey.dat', - 'groupb/privrl.bin', - 'groupb/pubkey.bin', - 'groupb/sigrl.bin', - 'groupb/privrl_empty.bin', - 'groupb/sigrl_empty.bin', - 'groupb/member0/mprivkey.dat', - 'groupb/privrevokedmember0/mprivkey.dat', - 'groupb/sigrevokedmember0/mprivkey.dat', - ], - recursive=True) - -sample_default_files = Pattern(src_dir='.', - includes=[ - 'mprivkey.dat', - 'pubkey.bin', - 'cacert.bin', - 'grprl.bin', - 'privrl.bin', - 'sigrl.bin', - ], - recursive=True) - -part_file = ['compressed_data.parts'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(data_files, sub_dir='example/compressed_data') - env.InstallTopLevel(part_file, sub_dir='example/compressed_data') - env.InstallTopLevel(sample_default_files, sub_dir='example/compressed_data') -else: - env.InstallData(data_files, - sub_dir='compressed_data', - no_pkg=False) - env.InstallTopLevel(sample_default_files, sub_dir='compressed_example') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/member0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/member0/mprivkey.dat deleted file mode 100644 index b418a281b7..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/member0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/member1/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/member1/mprivkey.dat deleted file mode 100644 index 26ad92eb1d..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/member1/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember0/mprivkey.dat deleted file mode 100644 index 7067865389..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember1/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember1/mprivkey.dat deleted file mode 100644 index aa11c36680..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember1/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember2/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember2/mprivkey.dat deleted file mode 100644 index 8bbb26e94b..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrevokedmember2/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrl.bin deleted file mode 100644 index dbec4b1b1b..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrl_empty.bin deleted file mode 100644 index da1d047713..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/privrl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/pubkey.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/pubkey.bin deleted file mode 100644 index 1f395ea2ed..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/pubkey.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember0/mprivkey.dat deleted file mode 100644 index 586c5c7b03..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember1/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember1/mprivkey.dat deleted file mode 100644 index 01cb9526e3..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember1/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember2/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember2/mprivkey.dat deleted file mode 100644 index 30c03e51f8..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrevokedmember2/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrl.bin deleted file mode 100644 index dd1a0369e2..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrl_empty.bin deleted file mode 100644 index 49437505d1..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupa/sigrl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/member0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/member0/mprivkey.dat deleted file mode 100644 index e2ba729339..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/member0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrevokedmember0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrevokedmember0/mprivkey.dat deleted file mode 100644 index d2ee1b7d76..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrevokedmember0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrl.bin deleted file mode 100644 index 4d7ebd4d56..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrl_empty.bin deleted file mode 100644 index 9bcc1ce0f3..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/privrl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/pubkey.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/pubkey.bin deleted file mode 100644 index 1791b7591a..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/pubkey.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrevokedmember0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrevokedmember0/mprivkey.dat deleted file mode 100644 index 1100871cae..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrevokedmember0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrl.bin deleted file mode 100644 index 949692ae0a..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrl_empty.bin deleted file mode 100644 index 70762dae2c..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/groupb/sigrl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/grprl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/grprl.bin deleted file mode 100644 index c9a3d71e81..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/grprl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/grprl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/grprl_empty.bin deleted file mode 100644 index 14536dedcd..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/grprl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/mprivkey.dat deleted file mode 100644 index b418a281b7..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/privrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/privrl.bin deleted file mode 100644 index dbec4b1b1b..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/privrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/pubkey.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/pubkey.bin deleted file mode 100644 index 1f395ea2ed..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/pubkey.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/sigrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/sigrl.bin deleted file mode 100644 index dd1a0369e2..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/compressed_data/sigrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/README.md b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/README.md deleted file mode 100644 index 5e3c43c04f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/README.md +++ /dev/null @@ -1,179 +0,0 @@ -# Sample Issuer Material - -This folder contains sample issuer material for use with the Intel(R) -EPID SDK. All data files are in binary format. - -## Directory Structure - - data - |__ groupa - | |__ member0 - | | |__ mprivkey.dat - | | - | |__ member1 - | | |__ mprivkey.dat - | | - | |__ privrevokedmember0 - | | |__ mprivkey.dat - | | - | |__ privrevokedmember1 - | | |__ mprivkey.dat - | | - | |__ privrevokedmember2 - | | |__ mprivkey.dat - | | - | |__ sigrevokedmember0 - | | |__ mprivkey.dat - | | - | |__ sigrevokedmember1 - | | |__ mprivkey.dat - | | - | |__ sigrevokedmember2 - | | |__ mprivkey.dat - | | - | |__ privrl.bin - | |__ privrl_empty.bin - | |__ pubkey.bin - | |__ sigrl.bin - | |__ sigrl_empty.bin - | - |__ groupb - | |__ member0 - | | |__ mprivkey.dat - | | - | |__ member1 - | | |__ mprivkey.dat - | | - | |__ privrevokedmember0 - | | |__ mprivkey.dat - | | - | |__ sigrevokedmember0 - | | |__ mprivkey.dat - | | - | |__ privrl.bin - | |__ privrl_empty.bin - | |__ pubkey.bin - | |__ sigrl.bin - | |__ sigrl_empty.bin - | - |__ grprl.bin - |__ grprl_empty.bin - |__ mprivkey.dat - |__ privrl.bin - |__ pubkey.bin - |__ cacert.bin - |__ sigrl.bin - - -## Description - -There are 2 groups - -- **groupa** - -- **groupb** - - -_Note: No compressed key sample material is included in this folder._ - -### Group A - -**groupa** contains 8 members. Each member has a member private key -`mprivkey.dat`. Here are the members: - -- **member0** - a member in good standing - -- **member1** - a member in good standing - -- **privrevokedmember0** - a member revoked using its private key - -- **privrevokedmember1** - a member revoked using its private key - -- **privrevokedmember2** - a member revoked using its private key - -- **sigrevokedmember0** - a member revoked using a signature - -- **sigrevokedmember1** - a member revoked using a signature - -- **sigrevokedmember2** - a member revoked using a signature - - -In addition, **groupa** contain the following revocation lists: - -- `pubkey.bin` - group public key - -- `privrl.bin` - private key based revocation list with 3 entries - - **privrevokedmember0**, **privrevokedmember1** and - **privrevokedmember2** - -- `sigrl.bin` - signature based revocation list with 3 entries - - **sigrevokedmember0**, **sigrevokedmember2** and - **sigrevokedmember2** - -- `privrl_empty.bin` - private key based revocation list with 0 entries - -- `sigrl_empty.bin` - signature based revocation list with 0 entries - - -### Group B - -**groupb** contains 3 members. Each member has a member private key -`mprivkey.dat`. Here are the members: - -- **member0** - a member in good standing - -- **privrevokedmember0** - a member whose private key is revoked - -- **sigrevokedmember0** - a member whose signature is revoked - - -In addition, **groupb** contain the following revocation lists: - -- `pubkey.bin` - group public key - -- `privrl.bin` - private key based revocation list with 1 entry - - **privrevokedmember0** - -- `sigrl.bin` - signature based revocation list with 1 entries - - **sigrevokedmember0** - -- `privrl_empty.bin` - private key based revocation list with 0 entries - -- `sigrl_empty.bin` - signature based revocation list with 0 entries - - -### Default files - -- `/data/cacert.bin` - CA certificate used as default input to signmsg - and `verifysig` - -- `/data/grprl.bin` - group revocation list with one entry **groupb** used - as default input to `verifysig` - -- `/data/pubkey.bin` - public key in **groupa** used as default input - to signmsg and `verifysig` - -- `/data/mprivkey.dat` - private key of a **member0** in the - **groupa** used as default input to `signmsg` - -- `/data/privrl.bin` - private key based revocation list in the - **groupa** with 0 entries used as default input to `verifysig` - -- `/data/sigrl.bin` - signature based revocation list in the - **groupa** with 0 entries used as default input to `signmsg` - and `verifysig` - -### Group revocation lists - -There are 2 group revocation lists: - -- `grprl.bin` - group revocation list with 1 entry - **groupb** - -- `grprl_empty.bin` - group revocation list with 0 entries - - -### IoT EPID Issuing CA certificate - -- `/data/cacert.bin` - CA certificate used to check that revocation - lists and group public keys are authorized by the issuer, e.g., - signed by the issuer diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/cacert.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/cacert.bin deleted file mode 100644 index fcbcc1f674..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/cacert.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/data.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/data.parts deleted file mode 100644 index 28a6b110b0..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/data.parts +++ /dev/null @@ -1,72 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -# Normal stuff that all Parts should have -env.PartName("sample_data") - -#files -data_files = Pattern(src_dir='.', - includes=[ - 'grprl_empty.bin', - 'README.md', - 'groupa/privrl.bin', - 'groupa/pubkey.bin', - 'groupa/sigrl.bin', - 'groupa/privrl_empty.bin', - 'groupa/sigrl_empty.bin', - 'groupa/member0/mprivkey.dat', - 'groupa/member1/mprivkey.dat', - 'groupa/privrevokedmember0/mprivkey.dat', - 'groupa/privrevokedmember1/mprivkey.dat', - 'groupa/privrevokedmember2/mprivkey.dat', - 'groupa/sigrevokedmember0/mprivkey.dat', - 'groupa/sigrevokedmember1/mprivkey.dat', - 'groupa/sigrevokedmember2/mprivkey.dat', - 'groupb/privrl.bin', - 'groupb/pubkey.bin', - 'groupb/sigrl.bin', - 'groupb/privrl_empty.bin', - 'groupb/sigrl_empty.bin', - 'groupb/member0/mprivkey.dat', - 'groupb/privrevokedmember0/mprivkey.dat', - 'groupb/sigrevokedmember0/mprivkey.dat', - ], - recursive=True) - -sample_default_files = Pattern(src_dir='.', - includes=[ - 'mprivkey.dat', - 'pubkey.bin', - 'cacert.bin', - 'grprl.bin', - 'privrl.bin', - 'sigrl.bin', - ], - recursive=True) - -part_file = ['data.parts'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(data_files, sub_dir='example/data') - env.InstallTopLevel(part_file, sub_dir='example/data') - env.InstallTopLevel(sample_default_files, sub_dir='example/data') -else: - env.InstallData(data_files, - sub_dir='data', - no_pkg=False) - env.InstallTopLevel(sample_default_files, sub_dir='example') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/member0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/member0/mprivkey.dat deleted file mode 100644 index 8bf5d47249..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/member0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/member1/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/member1/mprivkey.dat deleted file mode 100644 index c11c0cafbb..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/member1/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember0/mprivkey.dat deleted file mode 100644 index bbb3bde5db..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember1/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember1/mprivkey.dat deleted file mode 100644 index b2694cdb4c..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember1/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember2/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember2/mprivkey.dat deleted file mode 100644 index 38a2eacced..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrevokedmember2/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrl.bin deleted file mode 100644 index e3bca59da8..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrl_empty.bin deleted file mode 100644 index 27bdd70497..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/privrl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/pubkey.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/pubkey.bin deleted file mode 100644 index 5f766c81ef..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/pubkey.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember0/mprivkey.dat deleted file mode 100644 index c4c273cd48..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember1/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember1/mprivkey.dat deleted file mode 100644 index cdc7911d0a..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember1/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember2/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember2/mprivkey.dat deleted file mode 100644 index b5b9edee9f..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrevokedmember2/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrl.bin deleted file mode 100644 index bc9ef56f76..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrl_empty.bin deleted file mode 100644 index 27978221e6..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupa/sigrl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/member0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/member0/mprivkey.dat deleted file mode 100644 index faa4a6f31c..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/member0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrevokedmember0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrevokedmember0/mprivkey.dat deleted file mode 100644 index 0e5990a736..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrevokedmember0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrl.bin deleted file mode 100644 index 5ff658f3c0..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrl_empty.bin deleted file mode 100644 index 3638c81807..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/privrl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/pubkey.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/pubkey.bin deleted file mode 100644 index 0d0ba5210b..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/pubkey.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrevokedmember0/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrevokedmember0/mprivkey.dat deleted file mode 100644 index ef59eb25c3..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrevokedmember0/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrl.bin deleted file mode 100644 index b55ea33cff..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrl_empty.bin deleted file mode 100644 index 3232377068..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/groupb/sigrl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/grprl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/grprl.bin deleted file mode 100644 index 2774f2b253..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/grprl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/grprl_empty.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/grprl_empty.bin deleted file mode 100644 index 14536dedcd..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/grprl_empty.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/mprivkey.dat b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/mprivkey.dat deleted file mode 100644 index 8bf5d47249..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/mprivkey.dat and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/privrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/privrl.bin deleted file mode 100644 index 27bdd70497..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/privrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/pubkey.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/pubkey.bin deleted file mode 100644 index 5f766c81ef..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/pubkey.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/sigrl.bin b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/sigrl.bin deleted file mode 100644 index 27978221e6..0000000000 Binary files a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/data/sigrl.bin and /dev/null differ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/signmsg.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/signmsg.parts deleted file mode 100644 index 1246cb94dc..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/signmsg.parts +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -# Normal stuff that all Parts should have -env.PartName("signmsg") - -src_files = Pattern(src_dir='src/', - includes=['*.c'], - recursive=True).files() -inc_files = Pattern(src_dir='src/', - includes=['*.h'], - recursive=True).files() -parts_file = ['signmsg.parts'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(inc_files + src_files, - sub_dir='example/${PART_SHORT_NAME}/src') - env.InstallTopLevel(parts_file, sub_dir='example/${PART_SHORT_NAME}') -else: - env.DependsOn([ - Component('member'), - Component('util'), - Component('dropt') - ]) - - env.Append(CPPPATH='#/example/signmsg') - - if env['TARGET_PLATFORM']['OS'] == 'win32': - if env.isConfigBasedOn('debug'): - env['PDB'] = '${PART_NAME}.pdb' - - outputs = env.Program('${PART_NAME}', src_files, - no_import_lib=True) - - env.InstallBin(outputs, - no_pkg=False, - INSTALL_BIN='${INSTALL_SAMPLE_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/main.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/main.c deleted file mode 100644 index 8bd9000fed..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/main.c +++ /dev/null @@ -1,410 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Signmsg example implementation. - * - */ - -#include -#include -#include - -#include -#include "util/buffutil.h" -#include "util/convutil.h" -#include "util/envutil.h" -#include "util/stdtypes.h" -#include "src/signmsg.h" - -// Defaults -#define PROGRAM_NAME "signmsg" -#define MPRIVKEYFILE_DEFAULT "mprivkey.dat" -#define PUBKEYFILE_DEFAULT "pubkey.bin" -#define SIG_DEFAULT "sig.dat" -#define CACERT_DEFAULT "cacert.bin" -#define HASHALG_DEFAULT "SHA-512" - -/// parses string to a hashalg type -static dropt_error HandleHashalg(dropt_context* context, - const char* option_argument, - void* handler_data) { - dropt_error err = dropt_error_none; - HashAlg* hashalg = handler_data; - (void)context; - if (option_argument == NULL) { - *hashalg = kSha512; - } else if (option_argument[0] == '\0') { - err = dropt_error_insufficient_arguments; - } else if (StringToHashAlg(option_argument, hashalg)) { - err = dropt_error_none; - } else { - /* Reject the value as being inappropriate for this handler. */ - err = dropt_error_mismatch; - } - return err; -} - -/// Main entrypoint -int main(int argc, char* argv[]) { - // intermediate return value for C style functions - int ret_value = EXIT_SUCCESS; - - // intermediate return value for EPID functions - EpidStatus result = kEpidErr; - - // User Settings - - // Signature file name parameter - static char* sig_file = NULL; - - // Message string parameter - static char* msg_str = NULL; - size_t msg_size = 0; - - // Basename string parameter - static char* basename_str = NULL; - size_t basename_size = 0; - - // SigRl file name parameter - static char* sigrl_file = NULL; - - // Group public key file name parameter - static char* pubkey_file = NULL; - - // Member private key file name parameter - static char* mprivkey_file = NULL; - - // Member pre-computed settings input file name parameter - static char* mprecmpi_file = NULL; - - // Member pre-computed settings output file name parameter - static char* mprecmpo_file = NULL; - - // CA certificate file name parameter - static char* cacert_file = NULL; - - // help flag parameter - static bool show_help = false; - - // Verbose flag parameter - static bool verbose = false; - - // Buffers and computed values - - // Signature buffer - EpidSignature* sig = NULL; - size_t sig_size = 0; - - // SigRl file - unsigned char* signed_sig_rl = NULL; - size_t signed_sig_rl_size = 0; - - // Group public key file - unsigned char* signed_pubkey = NULL; - size_t signed_pubkey_size = 0; - - // CA certificate - EpidCaCertificate cacert = {0}; - - // Member private key buffer - unsigned char* mprivkey = NULL; - size_t mprivkey_size = 0; - - // Member pre-computed settings - MemberPrecomp member_precmp = {0}; - - // Flag that Member pre-computed settings input is valid - bool use_precmp_in; - - // Hash algorithm - static HashAlg hashalg = kSha512; - - dropt_option options[] = { - {'\0', "sig", "write signature to FILE (default: " SIG_DEFAULT ")", - "FILE", dropt_handle_string, &sig_file}, - {'\0', "msg", "MESSAGE to sign", "MESSAGE", dropt_handle_string, - &msg_str}, - {'\0', "bsn", "BASENAME to sign with (default: random)", "BASENAME", - dropt_handle_string, &basename_str}, - - {'\0', "sigrl", "load signature based revocation list from FILE", "FILE", - dropt_handle_string, &sigrl_file}, - {'\0', "gpubkey", - "load group public key from FILE (default: " PUBKEYFILE_DEFAULT ")", - "FILE", dropt_handle_string, &pubkey_file}, - {'\0', "mprivkey", - "load member private key from FILE " - "(default:" MPRIVKEYFILE_DEFAULT ")", - "FILE", dropt_handle_string, &mprivkey_file}, - {'\0', "mprecmpi", "load pre-computed member data from FILE", "FILE", - dropt_handle_string, &mprecmpi_file}, - {'\0', "mprecmpo", "write pre-computed member data to FILE", "FILE", - dropt_handle_string, &mprecmpo_file}, - {'\0', "capubkey", - "load IoT Issuing CA public key from FILE (default: " CACERT_DEFAULT ")", - "FILE", dropt_handle_string, &cacert_file}, - - {'\0', "hashalg", - "use specified hash algorithm (default: " HASHALG_DEFAULT ")", - "{SHA-256 | SHA-384 | SHA-512}", HandleHashalg, &hashalg}, - {'h', "help", "display this help and exit", NULL, dropt_handle_bool, - &show_help, dropt_attr_halt}, - {'v', "verbose", "print status messages to stdout", NULL, - dropt_handle_bool, &verbose}, - - {0} /* Required sentinel value. */ - }; - - dropt_context* dropt_ctx = NULL; - // set program name for logging - set_prog_name(PROGRAM_NAME); - do { - dropt_ctx = dropt_new_context(options); - if (!dropt_ctx) { - ret_value = EXIT_FAILURE; - break; - } else if (argc > 0) { - /* Parse the arguments from argv. - * - * argv[1] is always safe to access since argv[argc] is guaranteed - * to be NULL and since we've established that argc > 0. - */ - char** rest = dropt_parse(dropt_ctx, -1, &argv[1]); - if (dropt_get_error(dropt_ctx) != dropt_error_none) { - log_error(dropt_get_error_message(dropt_ctx)); - if (dropt_error_invalid_option == dropt_get_error(dropt_ctx)) { - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - } - ret_value = EXIT_FAILURE; - break; - } else if (show_help) { - log_fmt( - "Usage: %s [OPTION]...\n" - "Create Intel(R) EPID signature of message\n" - "\n" - "Options:\n", - PROGRAM_NAME); - dropt_print_help(stdout, dropt_ctx, NULL); - ret_value = EXIT_SUCCESS; - break; - } else if (*rest) { - // we have unparsed (positional) arguments - log_error("invalid argument: %s", *rest); - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - ret_value = EXIT_FAILURE; - break; - } else { - if (verbose) { - verbose = ToggleVerbosity(); - } - if (!sig_file) { - sig_file = SIG_DEFAULT; - } - if (!pubkey_file) { - pubkey_file = PUBKEYFILE_DEFAULT; - } - if (!mprivkey_file) { - mprivkey_file = MPRIVKEYFILE_DEFAULT; - } - if (!cacert_file) { - cacert_file = CACERT_DEFAULT; - } - - if (msg_str) { - msg_size = strlen(msg_str); - } - if (basename_str) { - basename_size = strlen(basename_str); - } - if (verbose) { - log_msg("\nOption values:"); - log_msg(" sig_file : %s", sig_file); - log_msg(" msg_str : %s", msg_str); - log_msg(" basename_str : %s", basename_str); - log_msg(" pubkey_file : %s", pubkey_file); - log_msg(" mprivkey_file : %s", mprivkey_file); - log_msg(" mprecmpi_file : %s", mprecmpi_file); - log_msg(" mprecmpo_file : %s", mprecmpo_file); - log_msg(" hashalg : %s", HashAlgToString(hashalg)); - log_msg(" cacert_file : %s", cacert_file); - log_msg(""); - } - } - } - // convert command line args to usable formats - - // CA certificate - if (0 != ReadLoud(cacert_file, &cacert, sizeof(cacert))) { - ret_value = EXIT_FAILURE; - break; - } - // Security note: - // Application must confirm that IoT EPID Issuing CA certificate is - // authorized by IoT EPID Root CA, e.g., signed by IoT EPID Root CA. - if (!IsCaCertAuthorizedByRootCa(&cacert, sizeof(cacert))) { - log_error("CA certificate is not authorized"); - ret_value = EXIT_FAILURE; - break; - } - // SigRl - if (sigrl_file) { - if (FileExists(sigrl_file)) { - signed_sig_rl = NewBufferFromFile(sigrl_file, &signed_sig_rl_size); - if (!signed_sig_rl) { - ret_value = EXIT_FAILURE; - break; - } - - if (0 != ReadLoud(sigrl_file, signed_sig_rl, signed_sig_rl_size)) { - ret_value = EXIT_FAILURE; - break; - } - } else { - log_error("SigRL file %s does not exist", sigrl_file); - ret_value = EXIT_FAILURE; - break; - } - } - // Group public key file - signed_pubkey = NewBufferFromFile(pubkey_file, &signed_pubkey_size); - if (!signed_pubkey) { - ret_value = EXIT_FAILURE; - break; - } - if (0 != ReadLoud(pubkey_file, signed_pubkey, signed_pubkey_size)) { - ret_value = EXIT_FAILURE; - break; - } - // Member private key - mprivkey = NewBufferFromFile(mprivkey_file, &mprivkey_size); - if (!mprivkey) { - ret_value = EXIT_FAILURE; - break; - } - if (mprivkey_size != sizeof(PrivKey) && - mprivkey_size != sizeof(CompressedPrivKey)) { - log_error("Private Key file size is inconsistent"); - ret_value = EXIT_FAILURE; - break; - } - if (0 != ReadLoud(mprivkey_file, mprivkey, mprivkey_size)) { - ret_value = EXIT_FAILURE; - break; - } - // Load Member pre-computed settings - use_precmp_in = false; - if (mprecmpi_file) { - if (sizeof(MemberPrecomp) != GetFileSize(mprecmpi_file)) { - log_error("incorrect input precomp size"); - ret_value = EXIT_FAILURE; - break; - } - use_precmp_in = true; - - if (0 != ReadLoud(mprecmpi_file, &member_precmp, sizeof(MemberPrecomp))) { - ret_value = EXIT_FAILURE; - break; - } - } - - // Report Settings - if (verbose) { - log_msg("=============================================="); - log_msg("Signing Message:"); - log_msg(""); - log_msg(" [in] Message Len: %d", (int)msg_size); - log_msg(" [in] Message: "); - PrintBuffer(msg_str, msg_size); - log_msg(""); - log_msg(" [in] BaseName Len: %d", (int)basename_size); - log_msg(" [in] BaseName: "); - PrintBuffer(basename_str, basename_size); - log_msg(""); - log_msg(" [in] SigRl Len: %d", (int)signed_sig_rl_size); - log_msg(" [in] SigRl: "); - PrintBuffer(signed_sig_rl, signed_sig_rl_size); - log_msg(""); - log_msg(" [in] Group Public Key: "); - PrintBuffer(signed_pubkey, signed_pubkey_size); - log_msg(""); - log_msg(" [in] Member Private Key: "); - PrintBuffer(&mprivkey, sizeof(mprivkey)); - log_msg(""); - log_msg(" [in] Hash Algorithm: %s", HashAlgToString(hashalg)); - log_msg(""); - log_msg(" [in] IoT EPID Issuing CA Certificate: "); - PrintBuffer(&cacert, sizeof(cacert)); - if (use_precmp_in) { - log_msg(""); - log_msg(" [in] Member PreComp: "); - PrintBuffer(&member_precmp, sizeof(member_precmp)); - } - log_msg("=============================================="); - } - - // Sign - result = SignMsg(msg_str, msg_size, basename_str, basename_size, - signed_sig_rl, signed_sig_rl_size, signed_pubkey, - signed_pubkey_size, mprivkey, mprivkey_size, hashalg, - &member_precmp, use_precmp_in, &sig, &sig_size, &cacert); - - // Report Result - if (kEpidNoErr != result) { - if (kEpidSigRevokedInSigRl == result) { - log_error("signature revoked in SigRL"); - } else { - log_error("function SignMsg returned %s", EpidStatusToString(result)); - ret_value = EXIT_FAILURE; - break; - } - } - - if (sig && sig_size != 0) { - // Store signature - if (0 != WriteLoud(sig, sig_size, sig_file)) { - ret_value = EXIT_FAILURE; - break; - } - } - - // Store Member pre-computed settings - if (mprecmpo_file) { - if (0 != - WriteLoud(&member_precmp, sizeof(member_precmp), mprecmpo_file)) { - ret_value = EXIT_FAILURE; - break; - } - } - - // Success - ret_value = EXIT_SUCCESS; - } while (0); - - // Free allocated buffers - if (sig) free(sig); - if (signed_sig_rl) free(signed_sig_rl); - if (signed_pubkey) free(signed_pubkey); - if (mprivkey) free(mprivkey); - - dropt_free_context(dropt_ctx); - - return ret_value; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/prng.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/prng.c deleted file mode 100644 index e1da167f83..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/prng.c +++ /dev/null @@ -1,98 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Pseudo random number generator implementation. - */ -#include -#include -#include - -#include "src/prng.h" - -EpidStatus PrngCreate(void** prng) { - // Security note: - // Random number generator used in the samples not claimed to be a - // cryptographically secure pseudo-random number generator. - EpidStatus sts = kEpidErr; - int prng_ctx_size = 0; - IppsPRNGState* prng_ctx = NULL; - int seed_ctx_size = 0; - IppsBigNumState* seed_ctx = NULL; - time_t seed_value; - - if (!prng) return kEpidBadArgErr; - - if (ippStsNoErr != ippsPRNGGetSize(&prng_ctx_size)) return kEpidErr; - if (ippStsNoErr != - ippsBigNumGetSize((sizeof(seed_value) + 3) / 4, &seed_ctx_size)) - return kEpidErr; - - do { - prng_ctx = (IppsPRNGState*)calloc(1, prng_ctx_size); - - if (!prng_ctx) { - sts = kEpidNoMemErr; - break; - } - if (ippStsNoErr != ippsPRNGInit(sizeof(seed_value) * 8, prng_ctx)) { - sts = kEpidErr; - break; - } - - // seed PRNG - seed_ctx = (IppsBigNumState*)calloc(1, seed_ctx_size); - if (!seed_ctx) { - sts = kEpidNoMemErr; - break; - } - if (ippStsNoErr != ippsBigNumInit((sizeof(seed_value) + 3) / 4, seed_ctx)) { - sts = kEpidErr; - break; - } - time(&seed_value); - if (ippStsNoErr != - ippsSetOctString_BN((void*)&seed_value, sizeof(seed_value), seed_ctx)) { - sts = kEpidErr; - break; - } - if (ippStsNoErr != ippsPRNGSetSeed(seed_ctx, prng_ctx)) { - sts = kEpidErr; - break; - } - - *prng = prng_ctx; - prng_ctx = NULL; - sts = kEpidNoErr; - } while (0); - - if (seed_ctx) free(seed_ctx); - if (prng_ctx) free(prng_ctx); - return sts; -} - -void PrngDelete(void** prng) { - if (prng && *prng) { - free(*prng); - *prng = NULL; - } -} - -// simple wrapper to hide IPP implementation. -int __STDCALL PrngGen(unsigned int* rand_data, int num_bits, void* user_data) { - return ippsPRNGen(rand_data, num_bits, (IppsPRNGState*)user_data); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/prng.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/prng.h deleted file mode 100644 index a56051232e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/prng.h +++ /dev/null @@ -1,36 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Pseudo random number generator interface. - */ - -#ifndef EXAMPLE_SIGNMSG_SRC_PRNG_H_ -#define EXAMPLE_SIGNMSG_SRC_PRNG_H_ - -#include "epid/common/errors.h" - -/// Creates Pseudo Random Number Generator for ::PrngGen() -EpidStatus PrngCreate(void** prng); - -/// Delete object allocated with ::PrngCreate() -void PrngDelete(void** prng); - -/// BitSupplier type of function -int __STDCALL PrngGen(unsigned int* rand_data, int num_bits, void* user_data); - -#endif // EXAMPLE_SIGNMSG_SRC_PRNG_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/signmsg.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/signmsg.c deleted file mode 100644 index 7b95d0de90..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/signmsg.c +++ /dev/null @@ -1,176 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -/// Message signing implementation. -/*! - * \file - * - * This file has a corresponding walk-through in the SDK documentation. - * - * Review the walk-through for correctness after making changes to this - * file. - */ -#include -#include -#include "src/signmsg.h" -#include "src/prng.h" -#include "util/envutil.h" -#include "util/stdtypes.h" -#include "util/buffutil.h" -#include "epid/member/api.h" -#include "epid/common/file_parser.h" - -bool IsCaCertAuthorizedByRootCa(void const* data, size_t size) { - // Implementation of this function is out of scope of the sample. - // In an actual implementation Issuing CA certificate must be validated - // with CA Root certificate before using it in parse functions. - (void)data; - (void)size; - return true; -} - -EpidStatus SignMsg(void const* msg, size_t msg_len, void const* basename, - size_t basename_len, unsigned char const* signed_sig_rl, - size_t signed_sig_rl_size, - unsigned char const* signed_pubkey, - size_t signed_pubkey_size, unsigned char const* priv_key_ptr, - size_t privkey_size, HashAlg hash_alg, - MemberPrecomp* member_precomp, bool member_precomp_is_input, - EpidSignature** sig, size_t* sig_len, - EpidCaCertificate const* cacert) { - EpidStatus sts = kEpidErr; - void* prng = NULL; - MemberCtx* member = NULL; - SigRl* sig_rl = NULL; - - do { - GroupPubKey pub_key = {0}; - PrivKey priv_key = {0}; - size_t sig_rl_size = 0; - - if (!sig) { - sts = kEpidBadArgErr; - break; - } - - // authenticate and extract group public key - sts = EpidParseGroupPubKeyFile(signed_pubkey, signed_pubkey_size, cacert, - &pub_key); - if (kEpidNoErr != sts) { - break; - } - - if (signed_sig_rl) { - // authenticate and determine space needed for SigRl - sts = EpidParseSigRlFile(signed_sig_rl, signed_sig_rl_size, cacert, NULL, - &sig_rl_size); - if (kEpidSigInvalid == sts) { - // authentication failure - break; - } - if (kEpidNoErr != sts) { - break; - } - sig_rl = AllocBuffer(sig_rl_size); - if (!sig_rl) { - sts = kEpidMemAllocErr; - break; - } - - // fill the SigRl - sts = EpidParseSigRlFile(signed_sig_rl, signed_sig_rl_size, cacert, - sig_rl, &sig_rl_size); - if (kEpidSigInvalid == sts) { - // authentication failure - break; - } - if (kEpidNoErr != sts) { - break; - } - } // if (signed_sig_rl) - - // decompress private key - if (privkey_size == sizeof(PrivKey)) { - priv_key = *(PrivKey*)priv_key_ptr; - } else if (privkey_size == sizeof(CompressedPrivKey)) { - sts = EpidDecompressPrivKey(&pub_key, (CompressedPrivKey*)priv_key_ptr, - &priv_key); - if (kEpidNoErr != sts) { - break; - } - } else { - sts = kEpidErr; - break; - } // if (privkey_size == sizeof(PrivKey)) - - // acquire PRNG - sts = PrngCreate(&prng); - if (kEpidNoErr != sts) { - break; - } - - // create member - sts = EpidMemberCreate(&pub_key, &priv_key, - member_precomp_is_input ? member_precomp : NULL, - PrngGen, prng, &member); - if (kEpidNoErr != sts) { - break; - } - - // return member pre-computation blob if requested - sts = EpidMemberWritePrecomp(member, member_precomp); - if (kEpidNoErr != sts) { - break; - } - - // register any provided basename as allowed - if (0 != basename_len) { - sts = EpidRegisterBaseName(member, basename, basename_len); - if (kEpidNoErr != sts) { - break; - } - } - - sts = EpidMemberSetHashAlg(member, hash_alg); - if (kEpidNoErr != sts) { - break; - } - - // Signature - // Note: Signature size must be computed after sig_rl is loaded. - *sig_len = EpidGetSigSize(sig_rl); - - *sig = AllocBuffer(*sig_len); - if (!*sig) { - sts = kEpidMemAllocErr; - break; - } - - // sign message - sts = EpidSign(member, msg, msg_len, basename, basename_len, sig_rl, - sig_rl_size, *sig, *sig_len); - if (kEpidNoErr != sts) { - break; - } - sts = kEpidNoErr; - } while (0); - - PrngDelete(&prng); - EpidMemberDelete(&member); - - if (sig_rl) free(sig_rl); - - return sts; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/signmsg.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/signmsg.h deleted file mode 100644 index 4426ea9363..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/signmsg/src/signmsg.h +++ /dev/null @@ -1,42 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Message signing interface. - */ - -#ifndef EXAMPLE_SIGNMSG_SRC_SIGNMSG_H_ -#define EXAMPLE_SIGNMSG_SRC_SIGNMSG_H_ - -#include "epid/member/api.h" -#include "epid/common/file_parser.h" - -/// Check if opaque data blob containing CA certificate is authorized -bool IsCaCertAuthorizedByRootCa(void const* data, size_t size); - -/// Create Intel(R) EPID signature of message -EpidStatus SignMsg(void const* msg, size_t msg_len, void const* basename, - size_t basename_len, unsigned char const* signed_sig_rl, - size_t signed_sig_rl_size, - unsigned char const* signed_pubkey, - size_t signed_pubkey_size, unsigned char const* priv_key, - size_t privkey_size, HashAlg hash_alg, - MemberPrecomp* member_precomp, bool member_precomp_is_input, - EpidSignature** sig, size_t* sig_len, - EpidCaCertificate const* cacert); - -#endif // EXAMPLE_SIGNMSG_SRC_SIGNMSG_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/Makefile deleted file mode 100644 index f55643ae7c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/make -f - -#define variables -COMMON_INCLUDE_DIR = ../../ -UTIL_INCLUDE_DIR = ../ - -UTIL_SRC = $(wildcard ./src/*.c) -UTIL_OBJ = $(sort $(UTIL_SRC:.c=.o)) -UTIL_LIB = ./src/libutil.a - -#set additional compiler flag -CFLAGS += -D_CRT_SECURE_NO_WARNINGS - -#target part -$(UTIL_OBJ): %.o: %.c - $(CC) $(CFLAGS) -I$(COMMON_INCLUDE_DIR) \ - -I$(UTIL_INCLUDE_DIR) \ - -c $^ -o $@ - -$(UTIL_LIB): $(UTIL_OBJ) - $(AR) rc $(UTIL_LIB) $(UTIL_OBJ) - ranlib $(UTIL_LIB) - -build: all - -all: $(UTIL_LIB) - -install: - -clean: - rm -f $(UTIL_OBJ) $(UTIL_LIB) - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/buffutil.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/buffutil.h deleted file mode 100644 index 6c50eb6c4a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/buffutil.h +++ /dev/null @@ -1,159 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Buffer handling utilities interface. - */ -#ifndef EXAMPLE_UTIL_BUFFUTIL_H_ -#define EXAMPLE_UTIL_BUFFUTIL_H_ - -#include -#include "util/stdtypes.h" - -/// Options controlling how a buffer should be printed. -typedef struct BufferPrintOptions { - bool show_header; - bool show_offset; - bool show_hex; - bool show_ascii; - size_t bytes_per_group; - size_t groups_per_line; -} BufferPrintOptions; - -/// Toggle verbose logging -bool ToggleVerbosity(); - -/// Test if file exists -/*! - \param[in] filename - The file path. - - \returns bool -*/ -bool FileExists(char const* filename); - -/// Get file size -/*! - \param[in] filename - - The file path. - \returns size of the file in bytes -*/ -size_t GetFileSize(char const* filename); - -/// Get file size -/*! - checks the size against an expected maximum size. - \param[in] filename - - The file path. - \param[in] max_size - - the maximum expected size of the file. - \returns size of the file in bytes -*/ -size_t GetFileSize_S(char const* filename, size_t max_size); - -/// Allocate a buffer of a fixed size -/*! - Logs an error message on failure. - - \param[out] buffer - A pointer to the buffer to allocate. - \param[in] size - the requested size of the buffer in bytes. - - \returns - A pointer to the allocated buffer or NULL if the allocation failed. - -*/ -void* AllocBuffer(size_t size); - -/// Allocate a buffer to hold the content of a file and load -/*! - Logs an error message on failure. - - \param[in] filename - The file path. - \param[out] size - The allocated size of the buffer in bytes (same as file size). - - \returns - A pointer to the allocated buffer or NULL if the allocation failed. - - \see ToggleVerbosity() -*/ -void* NewBufferFromFile(const char* filename, size_t* size); - -/// Read a buffer from a file with logging -/*! - - Verbosity of logging controlled by verbosity state - - - \param[in] filename - The file path. - \param[in,out] buf - The buffer. - \param[in] size - The size of the buffer in bytes. - - \returns 0 on success, non-zero failure - - \see ToggleVerbosity() -*/ -int ReadLoud(char const* filename, void* buf, size_t size); - -/// write a buffer from a file with logging -/*! - - Verbosity of logging controlled by verbosity state - - \param[in] buf - The buffer. - \param[in] size - The size of the buffer in bytes. - \param[in] filename - The file path. - - \returns 0 on success, non-zero failure - - \see ToggleVerbosity() -*/ -int WriteLoud(void* buf, size_t size, char const* filename); - -/// print a buffer to standard out using user provided options -/*! - \param[in] buf - The buffer. - \param[in] size - The size of the buffer in bytes. - \param[in] opts - The formatting options. -*/ -void PrintBufferOpt(const void* buffer, size_t size, BufferPrintOptions opts); - -/// print a buffer to standard out using default options -/*! - \param[in] buf - The buffer. - \param[in] size - The size of the buffer in bytes. -*/ -void PrintBuffer(const void* buffer, size_t size); - -#endif // EXAMPLE_UTIL_BUFFUTIL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/convutil.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/convutil.h deleted file mode 100644 index 83aeb9ab2b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/convutil.h +++ /dev/null @@ -1,77 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Conversion utilities interface. - */ -#ifndef EXAMPLE_UTIL_CONVUTIL_H_ -#define EXAMPLE_UTIL_CONVUTIL_H_ - -#include -#include "epid/common/types.h" -#include "epid/common/file_parser.h" -#include "util/stdtypes.h" - -/// convert a hash algorithm to a string -/*! - \param[in] alg a hash algorithm - \returns string representing the algorithm -*/ -char const* HashAlgToString(HashAlg alg); - -/// convert a string to a hash algorithm -/*! - \param[in] str a string - \param[out] alg a hash algorithm - \retval true string represents a hash algorithm - \retval false string does not represent a hash algorithm -*/ -bool StringToHashAlg(char const* str, HashAlg* alg); - -/// convert an EPID version to a string -/*! -\param[in] version an EPID version -\returns string representing the version -*/ -char const* EpidVersionToString(EpidVersion version); - -/// convert a string to an EPID version -/*! -\param[in] str a string -\param[out] version an EPID version -\retval true string represents an EPID version -\retval false string does not represent an EPID version -*/ -bool StringToEpidVersion(char const* str, EpidVersion* version); - -/// convert an EPID file type to a string -/*! -\param[in] type an EPID file type -\returns string representing the algorithm -*/ -char const* EpidFileTypeToString(EpidFileType type); - -/// convert a string to an EPID file type -/*! -\param[in] str a string -\param[out] type an EPID file type -\retval true string represents an EPID file type -\retval false string does not represent an EPID file type -*/ -bool StringToEpidFileType(char const* str, EpidFileType* type); - -#endif // EXAMPLE_UTIL_CONVUTIL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/envutil.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/envutil.h deleted file mode 100644 index 794f22987c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/envutil.h +++ /dev/null @@ -1,54 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Environment utilities interface. - */ -#ifndef EXAMPLE_UTIL_ENVUTIL_H_ -#define EXAMPLE_UTIL_ENVUTIL_H_ - -/// set the program name -void set_prog_name(char const* name); - -/// get the program name -char const* get_prog_name(); - -/// log an error -/*! -This function may add or format the message before writing it out - -output is written to the error stream -*/ -int log_error(char const* msg, ...); - -/// log a message -/*! -This function may add or format the message before writing it out - -output is written to the standard output stream -*/ -int log_msg(char const* msg, ...); - -/// log a formatted message -/*! -This function will not add or format the message before writing it out - -output is written to the standard output stream -*/ -int log_fmt(char const* msg, ...); - -#endif // EXAMPLE_UTIL_ENVUTIL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/bufutil.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/bufutil.c deleted file mode 100644 index adfb337b29..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/bufutil.c +++ /dev/null @@ -1,364 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Buffer handling utilities implementation. - */ - -#include - -#include -#include -#include -#include "util/envutil.h" - -/// file static variable that indicates verbose logging -static bool g_bufutil_verbose = false; - -bool ToggleVerbosity() { - g_bufutil_verbose = (g_bufutil_verbose) ? false : true; - return g_bufutil_verbose; -} - -bool FileExists(char const* filename) { - FILE* fp = NULL; - if (!filename || !filename[0]) { - return false; - } - fp = fopen(filename, "rb"); - if (fp) { - fclose(fp); - return true; - } - return false; -} - -size_t GetFileSize(char const* filename) { - size_t file_length = 0; - FILE* fp = fopen(filename, "rb"); - if (fp) { - fseek(fp, 0, SEEK_END); - file_length = ftell(fp); - fclose(fp); - } - return file_length; -} - -size_t GetFileSize_S(char const* filename, size_t max_size) { - size_t size = GetFileSize(filename); - if (size > max_size) { - return 0; - } else { - return size; - } -} - -void* AllocBuffer(size_t size) { - void* buffer = NULL; - if (size) { - buffer = malloc(size); - } - if (!buffer) { - log_error("failed to allocate memory"); - } - return buffer; -} - -void* NewBufferFromFile(const char* filename, size_t* size) { - void* buffer = NULL; - - do { - size_t len = 0; - - if (!FileExists(filename)) { - log_error("cannot access '%s'", filename); - break; - } - - len = GetFileSize_S(filename, SIZE_MAX); - if (len == 0) { - log_error("cannot load empty file '%s'", filename); - break; - } - - buffer = AllocBuffer(len); - - if (buffer) { - if (0 != ReadLoud(filename, buffer, len)) { - free(buffer); - buffer = NULL; - break; - } - } - - if (size) { - *size = len; - } - } while (0); - return buffer; -} - -int ReadBufferFromFile(const char* filename, void* buffer, size_t size) { - int result = 0; - FILE* file = NULL; - do { - size_t bytes_read = 0; - size_t file_size = 0; - file = fopen(filename, "rb"); - if (!file) { - result = -1; - break; - } - fseek(file, 0, SEEK_END); - file_size = ftell(file); - fseek(file, 0, SEEK_SET); - if ((size_t)file_size != size) { - result = -1; - break; - } - - if (buffer && (0 != size)) { - bytes_read = fread(buffer, 1, size, file); - if (bytes_read != size) { - result = -1; - break; - } - } - } while (0); - - if (file) { - fclose(file); - } - - return result; -} - -int WriteBufferToFile(const void* buffer, size_t size, const char* filename) { - int result = 0; - FILE* file = NULL; - do { - size_t bytes_written = 0; - - file = fopen(filename, "wb"); - if (!file) { - result = -1; - break; - } - bytes_written = fwrite(buffer, 1, size, file); - if (bytes_written != size) { - result = -1; - break; - } - } while (0); - - if (file) { - fclose(file); - } - - return result; -} - -int ReadLoud(char const* filename, void* buf, size_t size) { - int result; - - if (!buf || 0 == size) { - log_error("internal error: invalid buffer to ReadLoud"); - return -1; - } - - if (g_bufutil_verbose) { - log_msg("reading %s", filename); - } - - if (!FileExists(filename)) { - log_error("cannot access '%s' for reading", filename); - return -1; - } - - if (size != GetFileSize(filename)) { - log_error("unexpected file size for '%s'. Expected: %d; got: %d", filename, - (int)size, (int)GetFileSize(filename)); - return -1; - } - - result = ReadBufferFromFile(filename, buf, size); - if (0 != result) { - log_error("failed to read from `%s`", filename); - return result; - } - - if (g_bufutil_verbose) { - PrintBuffer(buf, size); - } - - return result; -} - -int WriteLoud(void* buf, size_t size, char const* filename) { - int result = -1; - - if (!buf || 0 == size) { - log_error("internal error: invalid buffer to WriteLoud"); - return -1; - } - - if (g_bufutil_verbose) { - log_msg("writing %s", filename); - } - - result = WriteBufferToFile(buf, size, filename); - - if (0 != result) { - log_error("failed to write to `%s`", filename); - return result; - } - - if (g_bufutil_verbose) { - PrintBuffer(buf, size); - } - - return result; -} - -void PrintBuffer(const void* buffer, size_t size) { - BufferPrintOptions opts; - opts.show_header = true; - opts.show_offset = true; - opts.show_hex = true; - opts.show_ascii = true; - opts.bytes_per_group = 2; - opts.groups_per_line = 8; - PrintBufferOpt(buffer, size, opts); -} - -void PrintBufferOpt(const void* buffer, size_t size, BufferPrintOptions opts) { - unsigned char* bytes = (unsigned char*)buffer; - size_t bytes_per_line = opts.bytes_per_group * opts.groups_per_line; - size_t line_offset = 0; - size_t byte_offset = 0; - size_t byte_col = 0; - if (opts.show_header) { - if (opts.show_offset) { - log_fmt(" offset"); - log_fmt(": "); - } - - if (opts.show_hex) { - byte_col = 0; - while (byte_col < bytes_per_line) { - log_fmt("%x%x", (int)byte_col, (int)byte_col); - if (0 == (byte_col + 1) % opts.bytes_per_group) { - log_fmt(" "); - } - byte_col += 1; - } - } - - if (opts.show_hex && opts.show_ascii) { - log_fmt("| "); - } - - if (opts.show_ascii) { - byte_col = 0; - while (byte_col < bytes_per_line) { - log_fmt("%x", (int)byte_col); - byte_col += 1; - } - } - - log_fmt("\n"); - - if (opts.show_offset) { - log_fmt("--------"); - log_fmt(": "); - } - - if (opts.show_hex) { - byte_col = 0; - while (byte_col < bytes_per_line) { - log_fmt("--"); - if (0 == (byte_col + 1) % opts.bytes_per_group) { - log_fmt("-"); - } - byte_col += 1; - } - } - - if (opts.show_hex && opts.show_ascii) { - log_fmt("|-"); - } - - if (opts.show_ascii) { - byte_col = 0; - while (byte_col < bytes_per_line) { - log_fmt("-"); - byte_col += 1; - } - } - log_fmt("\n"); - } - - line_offset = 0; - - while (line_offset < size) { - if (opts.show_offset) { - log_fmt("%08x", (int)line_offset); - log_fmt(": "); - } - - if (opts.show_hex) { - byte_col = 0; - while (byte_col < bytes_per_line) { - byte_offset = line_offset + byte_col; - if (byte_offset < size) { - log_fmt("%02x", (int)bytes[byte_offset]); - } else { - log_fmt(" "); - } - if (0 == (byte_col + 1) % opts.bytes_per_group) { - log_fmt(" "); - } - byte_col += 1; - } - } - - if (opts.show_hex && opts.show_ascii) { - log_fmt("| "); - } - - if (opts.show_ascii) { - byte_col = 0; - while (byte_col < bytes_per_line) { - byte_offset = line_offset + byte_col; - if (byte_offset < size) { - unsigned char ch = bytes[byte_offset]; - if (isprint(ch)) { - log_fmt("%c", ch); - } else { - log_fmt("."); - } - } else { - log_fmt(" "); - } - byte_col += 1; - } - } - - log_fmt("\n"); - line_offset += bytes_per_line; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/convutil.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/convutil.c deleted file mode 100644 index 4a57c68a66..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/convutil.c +++ /dev/null @@ -1,95 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Conversion utilities implementation. - * - */ - -#include -#include -#include -#include "util/convutil.h" -#include "util/envutil.h" - -const char* hash_alg_to_string[] = {"SHA-256", "SHA-384", "SHA-512", - "SHA-512/256", "SHA3/256", "SHA3/384", - "SHA3/512"}; - -#define COUNT_OF(A) (sizeof(A) / sizeof((A)[0])) - -char const* HashAlgToString(HashAlg alg) { - if ((int)alg < 0 || (size_t)alg >= COUNT_OF(hash_alg_to_string)) - return "unknown"; - return hash_alg_to_string[alg]; -} - -bool StringToHashAlg(char const* str, HashAlg* alg) { - size_t i; - if (!alg || !str) return false; - for (i = 0; i < COUNT_OF(hash_alg_to_string); i++) { - if (0 == strcmp(str, hash_alg_to_string[i])) { - *alg = (HashAlg)i; - return true; - } - } - return false; -} - -const char* epid_version_to_string[kNumEpidVersions] = {"1", "2"}; - -char const* EpidVersionToString(EpidVersion version) { - if ((int)version < 0 || (size_t)version >= COUNT_OF(epid_version_to_string)) - return "unknown"; - return epid_version_to_string[version]; -} - -bool StringToEpidVersion(char const* str, EpidVersion* version) { - size_t i; - if (!version || !str) return false; - for (i = 0; i < COUNT_OF(epid_version_to_string); i++) { - if (0 == strcmp(str, epid_version_to_string[i])) { - *version = (EpidVersion)i; - return true; - } - } - log_error("epid version \"%s\" is unknown", str); - return false; -} - -const char* epid_file_type_to_string[kNumFileTypes] = { - "IssuingCaPubKey", "GroupPubKey", "PrivRl", "SigRl", "GroupRl"}; - -char const* EpidFileTypeToString(EpidFileType type) { - if ((int)type < 0 || (size_t)type >= COUNT_OF(epid_file_type_to_string)) - return "unknown"; - return epid_file_type_to_string[type]; -} - -bool StringToEpidFileType(char const* str, EpidFileType* type) { - size_t i; - if (!type || !str) return false; - for (i = 0; i < COUNT_OF(epid_file_type_to_string); i++) { - if (0 == strcmp(str, epid_file_type_to_string[i])) { - *type = (EpidFileType)i; - return true; - } - } - log_error("epid file type \"%s\" is unknown", str); - return false; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/envutil.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/envutil.c deleted file mode 100644 index dbec17889c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/envutil.c +++ /dev/null @@ -1,91 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Environment utilities implementation. - */ - -#include -#include -#include "util/envutil.h" - -static char const* prog_name = NULL; - -void set_prog_name(char const* name) { prog_name = name; } - -char const* get_prog_name() { return prog_name; } - -int log_error(char const* msg, ...) { - int result = 0; - int local_result = 0; - va_list args; - va_start(args, msg); - do { - local_result = fprintf(stderr, "%s: ", prog_name); - if (local_result < 0) { - result = local_result; - break; - } - result += local_result; - local_result = vfprintf(stderr, msg, args); - if (local_result < 0) { - result = local_result; - break; - } - result += local_result; - local_result = fprintf(stderr, "\n"); - if (local_result < 0) { - result = local_result; - break; - } - result += local_result; - } while (0); - va_end(args); - return result; -} - -int log_msg(char const* msg, ...) { - int result = 0; - int local_result = 0; - va_list args; - va_start(args, msg); - do { - local_result = vfprintf(stdout, msg, args); - if (local_result < 0) { - result = local_result; - break; - } - result += local_result; - local_result = fprintf(stdout, "\n"); - if (local_result < 0) { - result = local_result; - break; - } - result += local_result; - } while (0); - va_end(args); - return result; -} - -int log_fmt(char const* msg, ...) { - int result = 0; - va_list args; - va_start(args, msg); - result = vfprintf(stdout, msg, args); - va_end(args); - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/strutil.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/strutil.c deleted file mode 100644 index 2080fc1717..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/src/strutil.c +++ /dev/null @@ -1,53 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Buffer handling utilities implementation. - */ - -#include -#include - -#include -#if defined(_MSC_VER) && _MSC_VER < 1900 -int vsnprintf(char* outBuf, size_t size, const char* format, va_list ap) { - int count = -1; - - if (0 != size) { - count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap); - } - if (-1 == count) { - // vsnprintf returns "The number of characters that would have been - // written if n had been sufficiently large" however _vsnprintf_s - // returns -1 if the content was truncated. - // _vscprintf calculates that value - count = _vscprintf(format, ap); - } - return count; -} - -int snprintf(char* outBuf, size_t size, const char* format, ...) { - int count; - va_list ap; - - va_start(ap, format); - count = vsnprintf(outBuf, size, format, ap); - va_end(ap); - - return count; -} -#endif diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/stdtypes.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/stdtypes.h deleted file mode 100644 index 72cead863c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/stdtypes.h +++ /dev/null @@ -1,39 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ -#ifndef EXAMPLE_UTIL_STDTYPES_H_ -#define EXAMPLE_UTIL_STDTYPES_H_ - -/*! - * \file - * \brief C99 standard data types. - */ - -#include // Fixed-width integer types - -#ifndef __cplusplus -#ifndef _Bool -/// C99 standard name for bool -#define _Bool char -/// Boolean type -typedef char bool; -/// integer constant 1 -#define true 1 -/// integer constant 0 -#define false 0 -#endif // -#endif // ifndef __cplusplus - -#endif // EXAMPLE_UTIL_STDTYPES_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/strutil.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/strutil.h deleted file mode 100644 index 885fc59383..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/strutil.h +++ /dev/null @@ -1,33 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Buffer handling utilities interface. - */ -#ifndef EXAMPLE_UTIL_STRUTIL_H_ -#define EXAMPLE_UTIL_STRUTIL_H_ - -#include -#include - -// Prior to version 14.0 snprintf was not supported in MSVC -#if defined(_MSC_VER) && _MSC_VER < 1900 -int vsnprintf(char* outBuf, size_t size, const char* format, va_list ap); -int snprintf(char* outBuf, size_t size, const char* format, ...); -#endif - -#endif // EXAMPLE_UTIL_STRUTIL_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/util.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/util.parts deleted file mode 100644 index 881dfe324b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/util/util.parts +++ /dev/null @@ -1,61 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -env.PartName("util") - -src_files = Pattern(src_dir='src', - includes=['*.c'], - recursive=True).files() - -api_headers = Pattern(src_dir='.', - includes=['*.h'], - recursive=False).files() -parts_file = ['util.parts'] - -makefile = ['Makefile'] -#unit tests -utest_files = Pattern(src_dir='.', - includes=['*-test.cc', '*-testhelper.cc'], - excludes=[], - recursive=True).files() - -if 'install_package' in env['MODE']: - env.InstallTopLevel(src_files, sub_dir='example/${PART_SHORT_NAME}/src') - env.InstallTopLevel(api_headers, sub_dir='example/${PART_SHORT_NAME}') - env.InstallTopLevel(utest_files, sub_dir='example/${PART_SHORT_NAME}/utest') - env.InstallTopLevel(parts_file, sub_dir='example/${PART_SHORT_NAME}') - env.InstallTopLevel(makefile, sub_dir='example/${PART_SHORT_NAME}') -else: - env.DependsOn([Component('common', requires=REQ.HEADERS)]) - - env.Append(CPPPATH='#/example') - - testenv = env.Clone() - - env.SdkInclude(api_headers, sub_dir='${PART_SHORT_NAME}') - - if env['TARGET_PLATFORM']['OS'] == 'win32': - if env.isConfigBasedOn('debug'): - env['PDB'] = '${PART_NAME}.pdb' - - #env.Append(CPPDEFINES = 'ENABLE_UTIL_DEBUG_PRINT_') - env.Append(CPPDEFINES='_CRT_SECURE_NO_WARNINGS') - - outputs = env.Library('${PART_NAME}', src_files) - - env.Sdk(outputs) diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/main.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/main.c deleted file mode 100644 index 951f92326f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/main.c +++ /dev/null @@ -1,501 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Verifysig example implementation. - */ - -#include -#include -#include - -#include -#include "epid/common/errors.h" -#include "epid/common/types.h" -#include "epid/common/file_parser.h" -#include "epid/verifier/api.h" -#include "epid/verifier/1.1/api.h" - -#include "util/buffutil.h" -#include "util/convutil.h" -#include "util/envutil.h" -#include "src/verifysig.h" -#include "src/verifysig11.h" - -// Defaults -#define PROGRAM_NAME "verifysig" -#define PUBKEYFILE_DEFAULT "pubkey.bin" -#define PRIVRL_DEFAULT NULL -#define SIGRL_DEFAULT NULL -#define GRPRL_DEFAULT "grprl.bin" -#define VERIFIERRL_DEFAULT NULL -#define SIG_DEFAULT "sig.dat" -#define CACERT_DEFAULT "cacert.bin" -#define HASHALG_DEFAULT "SHA-512" -#define UNPARSED_HASHALG (kInvalidHashAlg) -#define VPRECMPI_DEFAULT NULL -#define VPRECMPO_DEFAULT NULL - -/// parses string to a hashalg type -static dropt_error HandleHashalg(dropt_context* context, - const char* option_argument, - void* handler_data) { - dropt_error err = dropt_error_none; - HashAlg* hashalg = handler_data; - (void)context; - if (option_argument == NULL) { - *hashalg = UNPARSED_HASHALG; - } else if (option_argument[0] == '\0') { - err = dropt_error_insufficient_arguments; - } else if (StringToHashAlg(option_argument, hashalg)) { - err = dropt_error_none; - } else { - /* Reject the value as being inappropriate for this handler. */ - err = dropt_error_mismatch; - } - return err; -} - -/// Main entrypoint -int main(int argc, char* argv[]) { - // intermediate return value for C style functions - int ret_value = EXIT_SUCCESS; - // intermediate return value for EPID functions - EpidStatus result = kEpidErr; - - // User Settings - - // Signature file name parameter - static char* sig_file = SIG_DEFAULT; - - // Message string parameter - static char* msg_str = NULL; - size_t msg_size = 0; - - // Basename string parameter - static char* basename_str = NULL; - size_t basename_size = 0; - - // PrivRl file name parameter - static char* privrl_file = NULL; - - // SigRl file name parameter - static char* sigrl_file = NULL; - - // GrpRl file name parameter - static char* grprl_file = NULL; - - // VerRl file name parameter - static char* verrl_file = NULL; - - // Group public key file name parameter - static char* pubkey_file = NULL; - - // Verifier pre-computed settings input file name parameter - static char* vprecmpi_file = NULL; - - // Verifier pre-computed settings output file name parameter - static char* vprecmpo_file = NULL; - - // CA certificate file name parameter - static char* cacert_file_name = NULL; - - // Verbose flag parameter - static bool verbose = false; - - // help flag parameter - static bool show_help = false; - - // Buffers and computed values - - // Signature buffer - void* sig = NULL; - size_t sig_size = 0; - - // PrivRl buffer - void* signed_priv_rl = NULL; - size_t signed_priv_rl_size = 0; - - // SigRl buffer - void* signed_sig_rl = NULL; - size_t signed_sig_rl_size = 0; - - // GrpRl buffer - void* signed_grp_rl = NULL; - size_t signed_grp_rl_size = 0; - - // VerRl buffer - VerifierRl* ver_rl = NULL; - size_t ver_rl_size = 0; - - // Group public key buffer - void* signed_pubkey = NULL; - size_t signed_pubkey_size = 0; - - // Verifier pre-computed settings - void* verifier_precmp = NULL; - size_t verifier_precmp_size = 0; - size_t vprecmpi_file_size = 0; - - // Flag that Verifier pre-computed settings input is valid - bool use_precmp_in; - - // CA certificate - EpidCaCertificate cacert = {0}; - // Hash algorithm - static HashAlg hashalg = UNPARSED_HASHALG; - - dropt_option options[] = { - {'\0', "sig", "load signature from FILE (default: " SIG_DEFAULT ")", - "FILE", dropt_handle_string, &sig_file}, - {'\0', "msg", "MESSAGE that was signed (default: empty)", "MESSAGE", - dropt_handle_string, &msg_str}, - {'\0', "bsn", "BASENAME used in signature (default: random)", "BASENAME", - dropt_handle_string, &basename_str}, - {'\0', "privrl", "load private key revocation list from FILE", "FILE", - dropt_handle_string, &privrl_file}, - {'\0', "sigrl", "load signature based revocation list from FILE", "FILE", - dropt_handle_string, &sigrl_file}, - {'\0', "grprl", - "load group revocation list from FILE\n (default: " GRPRL_DEFAULT ")", - "FILE", dropt_handle_string, &grprl_file}, - {'\0', "verifierrl", "load verifier revocation list from FILE", "FILE", - dropt_handle_string, &verrl_file}, - {'\0', "gpubkey", - "load group public key from FILE (default: " PUBKEYFILE_DEFAULT ")", - "FILE", dropt_handle_string, &pubkey_file}, - {'\0', "vprecmpi", "load pre-computed verifier data from FILE", "FILE", - dropt_handle_string, &vprecmpi_file}, - {'\0', "vprecmpo", "write pre-computed verifier data to FILE", "FILE", - dropt_handle_string, &vprecmpo_file}, - {'\0', "capubkey", - "load IoT Issuing CA public key from FILE\n (default: " CACERT_DEFAULT - ")", - "FILE", dropt_handle_string, &cacert_file_name}, - {'\0', "hashalg", - "use specified hash algorithm for 2.0 groups " - "(default: " HASHALG_DEFAULT ")", - "{SHA-256 | SHA-384 | SHA-512}", HandleHashalg, &hashalg}, - {'h', "help", "display this help and exit", NULL, dropt_handle_bool, - &show_help, dropt_attr_halt}, - {'v', "verbose", "print status messages to stdout", NULL, - dropt_handle_bool, &verbose}, - - {0} /* Required sentinel value. */ - }; - - dropt_context* dropt_ctx = NULL; - - // set program name for logging - set_prog_name(PROGRAM_NAME); - do { - EpidVersion epid_version = kNumEpidVersions; - // Read command line args - - dropt_ctx = dropt_new_context(options); - if (!dropt_ctx) { - ret_value = EXIT_FAILURE; - break; - } else if (argc > 0) { - /* Parse the arguments from argv. - * - * argv[1] is always safe to access since argv[argc] is guaranteed - * to be NULL and since we've established that argc > 0. - */ - char** rest = dropt_parse(dropt_ctx, -1, &argv[1]); - if (dropt_get_error(dropt_ctx) != dropt_error_none) { - log_error(dropt_get_error_message(dropt_ctx)); - if (dropt_error_invalid_option == dropt_get_error(dropt_ctx)) { - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - } - ret_value = EXIT_FAILURE; - break; - } else if (show_help) { - log_fmt( - "Usage: %s [OPTION]...\n" - "Verify signature was created by group member in good standing\n" - "\n" - "Options:\n", - PROGRAM_NAME); - dropt_print_help(stdout, dropt_ctx, NULL); - ret_value = EXIT_SUCCESS; - break; - } else if (*rest) { - // we have unparsed (positional) arguments - log_error("invalid argument: %s", *rest); - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - ret_value = EXIT_FAILURE; - break; - } else { - if (verbose) { - verbose = ToggleVerbosity(); - } - if (!sig_file) sig_file = SIG_DEFAULT; - if (!grprl_file) grprl_file = GRPRL_DEFAULT; - if (!pubkey_file) pubkey_file = PUBKEYFILE_DEFAULT; - if (!cacert_file_name) cacert_file_name = CACERT_DEFAULT; - if (msg_str) msg_size = strlen(msg_str); - if (basename_str) basename_size = strlen(basename_str); - - if (verbose) { - log_msg("\nOption values:"); - log_msg(" sig_file : %s", sig_file); - log_msg(" msg_str : %s", msg_str); - log_msg(" basename_str : %s", basename_str); - log_msg(" privrl_file : %s", privrl_file); - log_msg(" sigrl_file : %s", sigrl_file); - log_msg(" grprl_file : %s", grprl_file); - log_msg(" verrl_file : %s", verrl_file); - log_msg(" vprecmpi_file : %s", vprecmpi_file); - log_msg(" vprecmpo_file : %s", vprecmpo_file); - log_msg(" hashalg : %s", (UNPARSED_HASHALG == hashalg) - ? "(default)" - : HashAlgToString(hashalg)); - log_msg(" cacert_file_name : %s", cacert_file_name); - log_msg(""); - } - } - } - // convert command line args to usable formats - - // Signature - sig = NewBufferFromFile(sig_file, &sig_size); - if (!sig) { - ret_value = EXIT_FAILURE; - break; - } - - // PrivRl - if (privrl_file) { - signed_priv_rl = NewBufferFromFile(privrl_file, &signed_priv_rl_size); - if (!signed_priv_rl) { - ret_value = EXIT_FAILURE; - break; - } - } - - // SigRl - if (sigrl_file) { - signed_sig_rl = NewBufferFromFile(sigrl_file, &signed_sig_rl_size); - if (!signed_sig_rl) { - ret_value = EXIT_FAILURE; - break; - } - } - - // GrpRl - signed_grp_rl = NewBufferFromFile(grprl_file, &signed_grp_rl_size); - if (!signed_grp_rl) { - ret_value = EXIT_FAILURE; - break; - } - // VerRl - if (verrl_file) { - ver_rl = (VerifierRl*)NewBufferFromFile(verrl_file, &ver_rl_size); - if (!ver_rl) { - ret_value = EXIT_FAILURE; - break; - } - } - - // Group public key - signed_pubkey = NewBufferFromFile(pubkey_file, &signed_pubkey_size); - if (!signed_pubkey) { - ret_value = EXIT_FAILURE; - break; - } - - // CA certificate - if (0 != ReadLoud(cacert_file_name, &cacert, sizeof(cacert))) { - ret_value = EXIT_FAILURE; - break; - } - - // Security note: - // Application must confirm that IoT EPID Issuing CA certificate is - // authorized by IoT EPID Root CA, e.g., signed by IoT EPID Root CA. - if (!IsCaCertAuthorizedByRootCa(&cacert, sizeof(cacert))) { - log_error("CA certificate is not authorized"); - ret_value = EXIT_FAILURE; - break; - } - - // Detect EPID version - result = EpidParseFileHeader(signed_pubkey, signed_pubkey_size, - &epid_version, NULL); - if (kEpidNoErr != result || kNumEpidVersions <= epid_version) { - log_error("EPID version can not be detected"); - ret_value = EXIT_FAILURE; - break; - } - - // Configure hashalg based on group - if (kEpid1x == epid_version) { - if (!(kSha256 == hashalg || UNPARSED_HASHALG == hashalg)) { - log_error( - "unsupported hash algorithm: %s only supported for 2.0 groups", - HashAlgToString(hashalg)); - ret_value = EXIT_FAILURE; - break; - } - } else { - if (UNPARSED_HASHALG == hashalg) { - hashalg = kSha512; - } - } - - // Load Verifier pre-computed settings - if (kEpid1x == epid_version) { - verifier_precmp_size = sizeof(Epid11VerifierPrecomp); - } else if (kEpid2x == epid_version) { - verifier_precmp_size = sizeof(VerifierPrecomp); - } else { - log_error("EPID version %s is not supported", - EpidVersionToString(epid_version)); - ret_value = EXIT_FAILURE; - break; - } - verifier_precmp = AllocBuffer(verifier_precmp_size); - use_precmp_in = false; - if (vprecmpi_file) { - vprecmpi_file_size = GetFileSize(vprecmpi_file); - if (verifier_precmp_size != vprecmpi_file_size) { - if (kEpid2x == epid_version && - vprecmpi_file_size == verifier_precmp_size - sizeof(GroupId)) { - log_error( - "incorrect input precomp size: precomp format may have changed, " - "try regenerating it"); - } else { - log_error("incorrect input precomp size"); - } - ret_value = EXIT_FAILURE; - break; - } - use_precmp_in = true; - - if (0 != ReadLoud(vprecmpi_file, verifier_precmp, verifier_precmp_size)) { - ret_value = EXIT_FAILURE; - break; - } - } - - // Report Settings - if (verbose) { - log_msg("=============================================="); - log_msg("Verifying Message:"); - log_msg(""); - log_msg(" [in] EPID version: %s", EpidVersionToString(epid_version)); - log_msg(""); - log_msg(" [in] Signature Len: %d", (int)sig_size); - log_msg(" [in] Signature: "); - PrintBuffer(sig, sig_size); - log_msg(""); - log_msg(" [in] Message Len: %d", (int)msg_size); - log_msg(" [in] Message: "); - PrintBuffer(msg_str, msg_size); - log_msg(""); - log_msg(" [in] BaseName Len: %d", (int)basename_size); - log_msg(" [in] BaseName: "); - PrintBuffer(basename_str, basename_size); - log_msg(""); - log_msg(" [in] PrivRl Len: %d", (int)signed_priv_rl_size); - log_msg(" [in] PrivRl: "); - PrintBuffer(signed_priv_rl, signed_priv_rl_size); - log_msg(""); - log_msg(" [in] SigRl Len: %d", (int)signed_sig_rl_size); - log_msg(" [in] SigRl: "); - PrintBuffer(signed_sig_rl, signed_sig_rl_size); - log_msg(""); - log_msg(" [in] GrpRl Len: %d", (int)signed_grp_rl_size); - log_msg(" [in] GrpRl: "); - PrintBuffer(signed_grp_rl, signed_grp_rl_size); - log_msg(""); - log_msg(" [in] VerRl Len: %d", (int)ver_rl_size); - log_msg(" [in] VerRl: "); - PrintBuffer(ver_rl, ver_rl_size); - log_msg(""); - log_msg(" [in] Group Public Key: "); - PrintBuffer(signed_pubkey, sizeof(signed_pubkey_size)); - log_msg(""); - log_msg(" [in] Hash Algorithm: %s", HashAlgToString(hashalg)); - if (use_precmp_in) { - log_msg(""); - log_msg(" [in] Verifier PreComp: "); - PrintBuffer(verifier_precmp, verifier_precmp_size); - } - log_msg("=============================================="); - } - - // Verify - if (kEpid2x == epid_version) { - result = - Verify(sig, sig_size, msg_str, msg_size, basename_str, basename_size, - signed_priv_rl, signed_priv_rl_size, signed_sig_rl, - signed_sig_rl_size, signed_grp_rl, signed_grp_rl_size, ver_rl, - ver_rl_size, signed_pubkey, signed_pubkey_size, &cacert, - hashalg, (VerifierPrecomp*)verifier_precmp, use_precmp_in); - } else if (kEpid1x == epid_version) { - result = Verify11(sig, sig_size, msg_str, msg_size, basename_str, - basename_size, signed_priv_rl, signed_priv_rl_size, - signed_sig_rl, signed_sig_rl_size, signed_grp_rl, - signed_grp_rl_size, signed_pubkey, signed_pubkey_size, - &cacert, (Epid11VerifierPrecomp*)verifier_precmp, - use_precmp_in); - } else { - log_error("EPID version %s is not supported", - EpidVersionToString(epid_version)); - ret_value = EXIT_FAILURE; - break; - } - // Report Result - if (kEpidNoErr == result) { - log_msg("signature verified successfully"); - } else { - log_error("signature verification failed: %s", - EpidStatusToString(result)); - ret_value = result; - break; - } - - // Store Verifier pre-computed settings - if (vprecmpo_file) { - if (0 != - WriteLoud(verifier_precmp, verifier_precmp_size, vprecmpo_file)) { - ret_value = EXIT_FAILURE; - break; - } - } - - // Success - ret_value = EXIT_SUCCESS; - } while (0); - - // Free allocated buffers - if (sig) free(sig); - if (signed_priv_rl) free(signed_priv_rl); - if (signed_sig_rl) free(signed_sig_rl); - if (signed_grp_rl) free(signed_grp_rl); - if (ver_rl) free(ver_rl); - if (signed_pubkey) free(signed_pubkey); - if (verifier_precmp) free(verifier_precmp); - - dropt_free_context(dropt_ctx); - - return ret_value; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig.c deleted file mode 100644 index 722231d565..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig.c +++ /dev/null @@ -1,211 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Signature verification implementation. - */ - -#include "src/verifysig.h" - -#include - -#include "util/buffutil.h" -#include "util/envutil.h" -#include "epid/verifier/api.h" -#include "epid/common/file_parser.h" - -bool IsCaCertAuthorizedByRootCa(void const* data, size_t size) { - // Implementation of this function is out of scope of the sample. - // In an actual implementation Issuing CA certificate must be validated - // with CA Root certificate before using it in parse functions. - (void)data; - (void)size; - return true; -} - -EpidStatus Verify(EpidSignature const* sig, size_t sig_len, void const* msg, - size_t msg_len, void const* basename, size_t basename_len, - void const* signed_priv_rl, size_t signed_priv_rl_size, - void const* signed_sig_rl, size_t signed_sig_rl_size, - void const* signed_grp_rl, size_t signed_grp_rl_size, - VerifierRl const* ver_rl, size_t ver_rl_size, - void const* signed_pub_key, size_t signed_pub_key_size, - EpidCaCertificate const* cacert, HashAlg hash_alg, - VerifierPrecomp* verifier_precomp, - bool verifier_precomp_is_input) { - EpidStatus result = kEpidErr; - VerifierCtx* ctx = NULL; - PrivRl* priv_rl = NULL; - SigRl* sig_rl = NULL; - GroupRl* grp_rl = NULL; - - do { - GroupPubKey pub_key = {0}; - // authenticate and extract group public key - result = EpidParseGroupPubKeyFile(signed_pub_key, signed_pub_key_size, - cacert, &pub_key); - if (kEpidNoErr != result) { - break; - } - - // create verifier - result = EpidVerifierCreate( - &pub_key, verifier_precomp_is_input ? verifier_precomp : NULL, &ctx); - if (kEpidNoErr != result) { - break; - } - - // serialize verifier pre-computation blob - result = EpidVerifierWritePrecomp(ctx, verifier_precomp); - if (kEpidNoErr != result) { - break; - } - - // set hash algorithm used for signing - result = EpidVerifierSetHashAlg(ctx, hash_alg); - if (kEpidNoErr != result) { - break; - } - - // set the basename used for signing - result = EpidVerifierSetBasename(ctx, basename, basename_len); - if (kEpidNoErr != result) { - break; - } - - if (signed_priv_rl) { - // authenticate and determine space needed for RL - size_t priv_rl_size = 0; - result = EpidParsePrivRlFile(signed_priv_rl, signed_priv_rl_size, cacert, - NULL, &priv_rl_size); - if (kEpidSigInvalid == result) { - // authentication failure - break; - } - if (kEpidNoErr != result) { - break; - } - - priv_rl = AllocBuffer(priv_rl_size); - if (!priv_rl) { - result = kEpidMemAllocErr; - break; - } - - // fill the rl - result = EpidParsePrivRlFile(signed_priv_rl, signed_priv_rl_size, cacert, - priv_rl, &priv_rl_size); - if (kEpidNoErr != result) { - break; - } - - // set private key based revocation list - result = EpidVerifierSetPrivRl(ctx, priv_rl, priv_rl_size); - if (kEpidNoErr != result) { - break; - } - } // if (signed_priv_rl) - - if (signed_sig_rl) { - // authenticate and determine space needed for RL - size_t sig_rl_size = 0; - result = EpidParseSigRlFile(signed_sig_rl, signed_sig_rl_size, cacert, - NULL, &sig_rl_size); - if (kEpidSigInvalid == result) { - // authentication failure - break; - } - if (kEpidNoErr != result) { - break; - } - - sig_rl = AllocBuffer(sig_rl_size); - if (!sig_rl) { - result = kEpidMemAllocErr; - break; - } - - // fill the rl - result = EpidParseSigRlFile(signed_sig_rl, signed_sig_rl_size, cacert, - sig_rl, &sig_rl_size); - if (kEpidNoErr != result) { - break; - } - - // set signature based revocation list - result = EpidVerifierSetSigRl(ctx, sig_rl, sig_rl_size); - if (kEpidNoErr != result) { - break; - } - } // if (signed_sig_rl) - - if (signed_grp_rl) { - // authenticate and determine space needed for RL - size_t grp_rl_size = 0; - result = EpidParseGroupRlFile(signed_grp_rl, signed_grp_rl_size, cacert, - NULL, &grp_rl_size); - if (kEpidSigInvalid == result) { - // authentication failure - break; - } - if (kEpidNoErr != result) { - break; - } - - grp_rl = AllocBuffer(grp_rl_size); - if (!grp_rl) { - result = kEpidMemAllocErr; - break; - } - - // fill the rl - result = EpidParseGroupRlFile(signed_grp_rl, signed_grp_rl_size, cacert, - grp_rl, &grp_rl_size); - if (kEpidNoErr != result) { - break; - } - // set group revocation list - result = EpidVerifierSetGroupRl(ctx, grp_rl, grp_rl_size); - if (kEpidNoErr != result) { - break; - } - } // if (signed_grp_rl) - - if (ver_rl) { - // set verifier based revocation list - result = EpidVerifierSetVerifierRl(ctx, ver_rl, ver_rl_size); - if (kEpidNoErr != result) { - break; - } - } - - // verify signature - result = EpidVerify(ctx, sig, sig_len, msg, msg_len); - if (kEpidNoErr != result) { - break; - } - } while (0); - - // delete verifier - EpidVerifierDelete(&ctx); - - if (priv_rl) free(priv_rl); - if (sig_rl) free(sig_rl); - if (grp_rl) free(grp_rl); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig.h deleted file mode 100644 index f566e86214..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig.h +++ /dev/null @@ -1,42 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief Signature verification interface. - */ -#ifndef EXAMPLE_VERIFYSIG_SRC_VERIFYSIG_H_ -#define EXAMPLE_VERIFYSIG_SRC_VERIFYSIG_H_ - -#include "epid/verifier/api.h" -#include "epid/common/file_parser.h" - -/// Check if opaque data blob containing CA certificate is authorized -bool IsCaCertAuthorizedByRootCa(void const* data, size_t size); - -/// verify EPID 2.x signature -EpidStatus Verify(EpidSignature const* sig, size_t sig_len, void const* msg, - size_t msg_len, void const* basename, size_t basename_len, - void const* signed_priv_rl, size_t signed_priv_rl_size, - void const* signed_sig_rl, size_t signed_sig_rl_size, - void const* signed_grp_rl, size_t signed_grp_rl_size, - VerifierRl const* ver_rl, size_t ver_rl_size, - void const* signed_pub_key, size_t signed_pub_key_size, - EpidCaCertificate const* cacert, HashAlg hash_alg, - VerifierPrecomp* verifier_precomp, - bool verifier_precomp_is_input); - -#endif // EXAMPLE_VERIFYSIG_SRC_VERIFYSIG_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig11.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig11.c deleted file mode 100644 index bf4400098c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig11.c +++ /dev/null @@ -1,187 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EPID 1.1 signature verification implementation. - */ - -#include "src/verifysig11.h" - -#include - -#include "util/buffutil.h" -#include "util/envutil.h" -#include "epid/verifier/1.1/api.h" -#include "epid/common/1.1/file_parser.h" - -EpidStatus Verify11(Epid11Signature const* sig, size_t sig_len, void const* msg, - size_t msg_len, void const* basename, size_t basename_len, - void const* signed_priv_rl, size_t signed_priv_rl_size, - void const* signed_sig_rl, size_t signed_sig_rl_size, - void const* signed_grp_rl, size_t signed_grp_rl_size, - void const* signed_pub_key, size_t signed_pub_key_size, - EpidCaCertificate const* cacert, - Epid11VerifierPrecomp* verifier_precomp, - bool verifier_precomp_is_input) { - EpidStatus result = kEpidErr; - Epid11VerifierCtx* ctx = NULL; - Epid11PrivRl* priv_rl = NULL; - Epid11SigRl* sig_rl = NULL; - Epid11GroupRl* grp_rl = NULL; - - do { - Epid11GroupPubKey pub_key = {0}; - // authenticate and extract group public key - result = Epid11ParseGroupPubKeyFile(signed_pub_key, signed_pub_key_size, - cacert, &pub_key); - if (kEpidNoErr != result) { - break; - } - - // create verifier - result = Epid11VerifierCreate( - &pub_key, verifier_precomp_is_input ? verifier_precomp : NULL, &ctx); - if (kEpidNoErr != result) { - break; - } - - // serialize verifier pre-computation blob - result = Epid11VerifierWritePrecomp(ctx, verifier_precomp); - if (kEpidNoErr != result) { - break; - } - - // set the basename used for signing - result = Epid11VerifierSetBasename(ctx, basename, basename_len); - if (kEpidNoErr != result) { - break; - } - - if (signed_priv_rl) { - // authenticate and determine space needed for RL - size_t priv_rl_size = 0; - result = Epid11ParsePrivRlFile(signed_priv_rl, signed_priv_rl_size, - cacert, NULL, &priv_rl_size); - if (kEpidSigInvalid == result) { - // authentication failure - break; - } - if (kEpidNoErr != result) { - break; - } - - priv_rl = AllocBuffer(priv_rl_size); - if (!priv_rl) { - result = kEpidMemAllocErr; - break; - } - - // fill the rl - result = Epid11ParsePrivRlFile(signed_priv_rl, signed_priv_rl_size, - cacert, priv_rl, &priv_rl_size); - if (kEpidNoErr != result) { - break; - } - - // set private key based revocation list - result = Epid11VerifierSetPrivRl(ctx, priv_rl, priv_rl_size); - if (kEpidNoErr != result) { - break; - } - } // if (signed_priv_rl) - - if (signed_sig_rl) { - // authenticate and determine space needed for RL - size_t sig_rl_size = 0; - result = Epid11ParseSigRlFile(signed_sig_rl, signed_sig_rl_size, cacert, - NULL, &sig_rl_size); - if (kEpidSigInvalid == result) { - // authentication failure - break; - } - if (kEpidNoErr != result) { - break; - } - - sig_rl = AllocBuffer(sig_rl_size); - if (!sig_rl) { - result = kEpidMemAllocErr; - break; - } - - // fill the rl - result = Epid11ParseSigRlFile(signed_sig_rl, signed_sig_rl_size, cacert, - sig_rl, &sig_rl_size); - if (kEpidNoErr != result) { - break; - } - - // set signature based revocation list - result = Epid11VerifierSetSigRl(ctx, sig_rl, sig_rl_size); - if (kEpidNoErr != result) { - break; - } - } // if (signed_sig_rl) - - if (signed_grp_rl) { - // authenticate and determine space needed for RL - size_t grp_rl_size = 0; - result = Epid11ParseGroupRlFile(signed_grp_rl, signed_grp_rl_size, cacert, - NULL, &grp_rl_size); - if (kEpidSigInvalid == result) { - // authentication failure - break; - } - if (kEpidNoErr != result) { - break; - } - - grp_rl = AllocBuffer(grp_rl_size); - if (!grp_rl) { - result = kEpidMemAllocErr; - break; - } - - // fill the rl - result = Epid11ParseGroupRlFile(signed_grp_rl, signed_grp_rl_size, cacert, - grp_rl, &grp_rl_size); - if (kEpidNoErr != result) { - break; - } - // set group revocation list - result = Epid11VerifierSetGroupRl(ctx, grp_rl, grp_rl_size); - if (kEpidNoErr != result) { - break; - } - } // if (signed_grp_rl) - - // verify signature - result = Epid11Verify(ctx, sig, sig_len, msg, msg_len); - if (kEpidNoErr != result) { - break; - } - } while (0); - - // delete verifier - Epid11VerifierDelete(&ctx); - - if (priv_rl) free(priv_rl); - if (sig_rl) free(sig_rl); - if (grp_rl) free(grp_rl); - - return result; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig11.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig11.h deleted file mode 100644 index a3463882a4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/src/verifysig11.h +++ /dev/null @@ -1,38 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * \brief EPID 1.1 signature verification interface. - */ -#ifndef EXAMPLE_VERIFYSIG_SRC_VERIFYSIG11_H_ -#define EXAMPLE_VERIFYSIG_SRC_VERIFYSIG11_H_ - -#include "epid/verifier/1.1/api.h" -#include "epid/common/1.1/file_parser.h" - -/// verify EPID 1.x signature -EpidStatus Verify11(Epid11Signature const* sig, size_t sig_len, void const* msg, - size_t msg_len, void const* basename, size_t basename_len, - void const* signed_priv_rl, size_t signed_priv_rl_size, - void const* signed_sig_rl, size_t signed_sig_rl_size, - void const* signed_grp_rl, size_t signed_grp_rl_size, - void const* signed_pub_key, size_t signed_pub_key_size, - EpidCaCertificate const* cacert, - Epid11VerifierPrecomp* verifier_precomp, - bool verifier_precomp_is_input); - -#endif // EXAMPLE_VERIFYSIG_SRC_VERIFYSIG11_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/verifysig.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/verifysig.parts deleted file mode 100644 index 68b62dfbbc..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/example/verifysig/verifysig.parts +++ /dev/null @@ -1,53 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -env.PartName("verifysig") - -src_files = Pattern(src_dir='src/', - includes=['*.c'], - recursive=True).files() - -inc_files = Pattern(src_dir='src/', - includes=['*.h'], - recursive=True).files() - -parts_file = ['verifysig.parts'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(src_files + inc_files, sub_dir='example/${PART_SHORT_NAME}/src') - env.InstallTopLevel(parts_file, sub_dir='example/${PART_SHORT_NAME}') - -else: - env.DependsOn([ - Component('verifier'), - Component('util'), - Component('dropt') - ]) - - env.Append(CPPPATH='#/example/verifysig') - - if env['TARGET_PLATFORM']['OS'] == 'win32': - if env.isConfigBasedOn('debug'): - env['PDB'] = '${PART_NAME}.pdb' - - outputs = env.Program('${PART_NAME}', src_files, - no_import_lib=True) - - env.InstallBin(outputs, - no_pkg=False, - INSTALL_BIN='${INSTALL_SAMPLE_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/LICENSE b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/LICENSE deleted file mode 100644 index aa487e174e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -dropt -Copyright (c) 2006-2012 James D. Lin - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. - - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/Makefile deleted file mode 100644 index c284c3cb33..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/make -f - -DROPT_INCLUDE_DIR = ./include -DROPT_SRC = $(wildcard ./src/*.c) -DROPT_OBJ = $(sort $(DROPT_SRC:.c=.o)) - -DROPT_LIB = ./src/libdropt.a - -$(DROPT_OBJ): %.o: %.c - $(CC) -o $@ -c $(CFLAGS) -I$(DROPT_INCLUDE_DIR) $< - -$(DROPT_LIB): $(DROPT_OBJ) - $(AR) rc $@ $^ - ranlib $@ - -build: all - -all: $(DROPT_LIB) - -install: - -clean: - rm -f $(DROPT_OBJ) $(DROPT_LIB) diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/dropt.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/dropt.parts deleted file mode 100644 index e2d9b85f58..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/dropt.parts +++ /dev/null @@ -1,53 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ -Import('*') - -env.PartVersion("1.1.1") -env.PartName("dropt") - -# sourcefiles -src_files = Pattern(src_dir='src/', - includes=['*.c'], - excludes=['test_*'], - recursive=True).files() - -#includes to install -install_headers = Pattern(src_dir='include/', - includes=['dropt.h'], - recursive=True).files() - -internal_headers = Pattern(src_dir='include/', - includes=['dropt_string.h'], - recursive=True).files() - -parts_file = ['dropt.parts'] -license_file = ['LICENSE'] -makefile = ['Makefile'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(src_files, sub_dir='ext/dropt/src') - env.InstallTopLevel(install_headers + internal_headers, - sub_dir='ext/dropt/include') - env.InstallTopLevel(parts_file, sub_dir='ext/dropt') - env.InstallTopLevel(license_file, sub_dir='ext/dropt') - env.InstallTopLevel(makefile, sub_dir='ext/dropt') -else: - env.Append(CPPPATH=[AbsDir('include')]) - - outputs = env.Library('${PART_NAME}', src_files) - sdk_outs = env.Sdk(outputs) - - env.SdkInclude(install_headers) diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/include/dropt.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/include/dropt.h deleted file mode 100644 index 2cd66b17e8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/include/dropt.h +++ /dev/null @@ -1,249 +0,0 @@ -/** dropt.h - * - * A deliberately rudimentary command-line option parser. - * - * Version 1.1.1 - * - * Copyright (c) 2006-2012 James D. Lin - * - * The latest version of this file can be downloaded from: - * - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef DROPT_H -#define DROPT_H - -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - - -#ifndef DROPT_USE_WCHAR -#if defined _UNICODE && (defined _MSC_VER || defined DROPT_NO_STRING_BUFFERS) -#define DROPT_USE_WCHAR 1 -#endif -#endif - -#ifdef DROPT_USE_WCHAR - /* This may be used for both char and string literals. */ - #define DROPT_TEXT_LITERAL(s) L ## s - - typedef wchar_t dropt_char; -#else - #define DROPT_TEXT_LITERAL(s) s - - typedef char dropt_char; -#endif - - -enum -{ - /* Errors in the range [0x00, 0x7F] are reserved for dropt. */ - dropt_error_none, - dropt_error_unknown, - dropt_error_bad_configuration, - dropt_error_insufficient_memory, - dropt_error_invalid_option, - dropt_error_insufficient_arguments, - dropt_error_mismatch, - dropt_error_overflow, - dropt_error_underflow, - - /* Errors in the range [0x80, 0xFFFF] are free for clients to use. */ - dropt_error_custom_start = 0x80, - dropt_error_custom_last = 0xFFFF -}; -typedef unsigned int dropt_error; - -typedef unsigned char dropt_bool; - -/* Opaque. */ -typedef struct dropt_context dropt_context; - - -/** dropt_option_handler_func callbacks are responsible for parsing - * individual options. - * - * dropt_option_handler_decl may be used for declaring the callback - * functions; dropt_option_handler_func is the actual function pointer - * type. - * - * optionArgument will be NULL if no argument is specified for an option. - * It will be the empty string if the user explicitly passed an empty - * string as the argument (e.g. --option=""). - * - * An option that doesn't expect an argument still can receive a non-NULL - * value for optionArgument if the user explicitly specified one (e.g. - * --option=arg). - * - * If the option's argument is optional, the handler might be called - * twice: once with a candidate argument, and if that argument is rejected - * by the handler, again with no argument. Handlers should be aware of - * this if they have side-effects. - * - * handlerData is the client-specified value specified in the dropt_option - * table. - */ -typedef dropt_error dropt_option_handler_decl(dropt_context* context, - const dropt_char* optionArgument, - void* handlerData); -typedef dropt_option_handler_decl* dropt_option_handler_func; - -/** dropt_error_handler_func callbacks are responsible for generating error - * messages. The returned string must be allocated on the heap and must - * be freeable with free(). - */ -typedef dropt_char* (*dropt_error_handler_func)(dropt_error error, - const dropt_char* optionName, - const dropt_char* optionArgument, - void* handlerData); - -/** dropt_strncmp_func callbacks allow callers to provide their own (possibly - * case-insensitive) string comparison function. - */ -typedef int (*dropt_strncmp_func)(const dropt_char* s, const dropt_char* t, size_t n); - - -/** Properties defining each option: - * - * short_name: - * The option's short name (e.g. the 'h' in -h). - * Use '\0' if the option has no short name. - * - * long_name: - * The option's long name (e.g. "help" in --help). - * Use NULL if the option has no long name. - * - * description: - * The description shown when generating help. - * May be NULL for undocumented options. - * - * arg_description: - * The description for the option's argument (e.g. --option=argument - * or --option argument), printed when generating help. If NULL, the - * option does not take an argument. - * - * handler: - * The handler callback and data invoked in response to encountering - * the option. - * - * handler_data: - * Callback data for the handler. For typical handlers, this is - * usually the address of a variable for the handler to modify. - * - * attr: - * Miscellaneous attributes. See below. - */ -typedef struct dropt_option -{ - dropt_char short_name; - const dropt_char* long_name; - const dropt_char* description; - const dropt_char* arg_description; - dropt_option_handler_func handler; - void* handler_data; - unsigned int attr; -} dropt_option; - - -/** Bitwise flags for option attributes: - * - * dropt_attr_halt: - * Stop processing when this option is encountered. - * - * dropt_attr_hidden: - * Don't list the option when generating help. Use this for - * undocumented options. - * - * dropt_attr_optional_val: - * The option's argument is optional. If an option has this - * attribute, the handler callback may be invoked twice (once with a - * potential argument, and if that fails, again with a NULL argument). - */ -enum -{ - dropt_attr_halt = (1 << 0), - dropt_attr_hidden = (1 << 1), - dropt_attr_optional_val = (1 << 2) -}; - - -typedef struct dropt_help_params -{ - unsigned int indent; - unsigned int description_start_column; - dropt_bool blank_lines_between_options; -} dropt_help_params; - - -dropt_context* dropt_new_context(const dropt_option* options); -void dropt_free_context(dropt_context* context); - -const dropt_option* dropt_get_options(const dropt_context* context); - -void dropt_set_error_handler(dropt_context* context, - dropt_error_handler_func handler, void* handlerData); -void dropt_set_strncmp(dropt_context* context, dropt_strncmp_func cmp); - -/* Use this only for backward compatibility purposes. */ -void dropt_allow_concatenated_arguments(dropt_context* context, dropt_bool allow); - -dropt_char** dropt_parse(dropt_context* context, int argc, dropt_char** argv); - -dropt_error dropt_get_error(const dropt_context* context); -void dropt_get_error_details(const dropt_context* context, - dropt_char** optionName, - dropt_char** optionArgument); -const dropt_char* dropt_get_error_message(dropt_context* context); -void dropt_clear_error(dropt_context* context); - -#ifndef DROPT_NO_STRING_BUFFERS -dropt_char* dropt_default_error_handler(dropt_error error, - const dropt_char* optionName, - const dropt_char* optionArgument); - -void dropt_init_help_params(dropt_help_params* helpParams); -dropt_char* dropt_get_help(const dropt_context* context, - const dropt_help_params* helpParams); -void dropt_print_help(FILE* f, const dropt_context* context, - const dropt_help_params* helpParams); -#endif - - -/* Stock option handlers for common types. */ -dropt_option_handler_decl dropt_handle_bool; -dropt_option_handler_decl dropt_handle_verbose_bool; -dropt_option_handler_decl dropt_handle_int; -dropt_option_handler_decl dropt_handle_uint; -dropt_option_handler_decl dropt_handle_double; -dropt_option_handler_decl dropt_handle_string; - -#define DROPT_MISUSE(message) dropt_misuse(message, __FILE__, __LINE__) -void dropt_misuse(const char* message, const char* filename, int line); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* DROPT_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/include/dropt_string.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/include/dropt_string.h deleted file mode 100644 index e890c5a91c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/include/dropt_string.h +++ /dev/null @@ -1,94 +0,0 @@ -/** dropt_string.h - * - * String routines for dropt. - * - * Copyright (c) 2006-2010 James D. Lin - * - * The latest version of this file can be downloaded from: - * - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifndef DROPT_STRING_H -#define DROPT_STRING_H - -#include -#include "dropt.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef DROPT_USE_WCHAR - #define dropt_strlen wcslen - #define dropt_strcmp wcscmp - #define dropt_strncmp wcsncmp - #define dropt_strchr wcschr - #define dropt_strtol wcstol - #define dropt_strtoul wcstoul - #define dropt_strtod wcstod - #define dropt_tolower towlower - #define dropt_fputs fputws -#else - #define dropt_strlen strlen - #define dropt_strcmp strcmp - #define dropt_strncmp strncmp - #define dropt_strchr strchr - #define dropt_strtol strtol - #define dropt_strtoul strtoul - #define dropt_strtod strtod - #define dropt_tolower tolower - #define dropt_fputs fputs -#endif - -void* dropt_safe_malloc(size_t numElements, size_t elementSize); -void* dropt_safe_realloc(void* p, size_t numElements, size_t elementSize); - -dropt_char* dropt_strdup(const dropt_char* s); -dropt_char* dropt_strndup(const dropt_char* s, size_t n); -int dropt_stricmp(const dropt_char* s, const dropt_char* t); -int dropt_strnicmp(const dropt_char* s, const dropt_char* t, size_t n); - - -#ifndef DROPT_NO_STRING_BUFFERS -typedef struct dropt_stringstream dropt_stringstream; - -int dropt_vsnprintf(dropt_char* s, size_t n, const dropt_char* format, va_list args); -int dropt_snprintf(dropt_char* s, size_t n, const dropt_char* format, ...); - -dropt_char* dropt_vasprintf(const dropt_char* format, va_list args); -dropt_char* dropt_asprintf(const dropt_char* format, ...); - -dropt_stringstream* dropt_ssopen(void); -void dropt_ssclose(dropt_stringstream* ss); - -void dropt_ssclear(dropt_stringstream* ss); -dropt_char* dropt_ssfinalize(dropt_stringstream* ss); -const dropt_char* dropt_ssgetstring(const dropt_stringstream* ss); - -int dropt_vssprintf(dropt_stringstream* ss, const dropt_char* format, va_list args); -int dropt_ssprintf(dropt_stringstream* ss, const dropt_char* format, ...); -#endif /* DROPT_NO_STRING_BUFFERS */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* DROPT_STRING_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt.c deleted file mode 100644 index 917e8fd07a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt.c +++ /dev/null @@ -1,1562 +0,0 @@ -/** dropt.c - * - * A deliberately rudimentary command-line option parser. - * - * Copyright (c) 2006-2012 James D. Lin - * - * The latest version of this file can be downloaded from: - * - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source distribution. - */ -// THIS FILE HAS BEEN ALTERED from original version to: -// * fix warnings -// * modify error messages -// * resolve bool type conflict -// * fix issues found by static code analisys: -// * possible leak in dropt_get_help -// * null pointer dereference in dropt_parse -#include -#include -#include -#include -#include - -#include "dropt.h" -#include "dropt_string.h" - -#if __STDC_VERSION__ >= 199901L - #include - #include -#else - /* Compatibility junk for things that don't yet support ISO C99. */ - #ifndef SIZE_MAX - #define SIZE_MAX ((size_t) -1) - #endif - - #ifndef __cplusplus - #ifndef _Bool - /// C99 standard name for bool - #define _Bool char - /// Boolean type - typedef char bool; - /// integer constant 1 - #define true 1 - /// integer constant 0 - #define false 0 - #endif - #endif // ifndef __cplusplus -#endif -#ifndef MIN -#define MIN(x, y) (((x) < (y)) ? (x) : (y)) -#endif - -#ifndef ARRAY_LENGTH -#define ARRAY_LENGTH(array) (sizeof (array) / sizeof (array)[0]) -#endif - -#define IMPLIES(p, q) (!(p) || q) - -#define OPTION_TAKES_ARG(option) ((option)->arg_description != NULL) - -enum -{ - default_help_indent = 2, - default_description_start_column = 6, -}; - - -/** A string that might not be NUL-terminated. */ -typedef struct -{ - const dropt_char* s; - - /* The length of s, excluding any NUL terminator. */ - size_t len; -} char_array; - - -/** A proxy for a dropt_option used for qsort and bsearch. Instead of - * sorting the dropt_option table directly, we sort arrays of option_proxy - * structures. This allows us to have separate arrays sorted by different - * keys and allows passing along additional data. - */ -typedef struct -{ - const dropt_option* option; - - /* The qsort and bsearch comparison callbacks don't pass along any - * client-supplied contextual data, so we have to embed it alongside - * the regular data. - */ - const dropt_context* context; -} option_proxy; - - -struct dropt_context -{ - const dropt_option* options; - size_t numOptions; - - /* These may be NULL. */ - option_proxy* sortedByLong; - option_proxy* sortedByShort; - - bool allowConcatenatedArgs; - - dropt_error_handler_func errorHandler; - void* errorHandlerData; - - struct - { - dropt_error err; - dropt_char* optionName; - dropt_char* optionArgument; - dropt_char* message; - } errorDetails; - - /* This isn't named strncmp because platforms might provide a macro - * version of strncmp, and we want to avoid a potential naming - * conflict. - */ - dropt_strncmp_func ncmpstr; -}; - - -typedef struct -{ - const dropt_option* option; - const dropt_char* optionArgument; - dropt_char** argNext; - int argsLeft; -} parse_state; - - -/** make_char_array - * - * PARAMETERS: - * IN s : A string. Might not be NUL-terminated. - * May be NULL. - * len : The length of s, excluding any NUL terminator. - * - * RETURNS: - * The constructed char_array structure. - */ -static char_array -make_char_array(const dropt_char* s, size_t len) -{ - char_array a; - - assert(IMPLIES(s == NULL, len == 0)); - - a.s = s; - a.len = len; - return a; -} - - -/** cmp_key_option_proxy_long - * - * Comparison callback for bsearch. Compares a char_array structure - * against an option_proxy structure based on long option names. - * - * PARAMETERS: - * IN key : A pointer to the char_array structure to search for. - * IN item : A pointer to the option_proxy structure being searched - * against. - * - * RETURNS: - * 0 if key and item are equivalent, - * < 0 if key should precede item, - * > 0 if key should follow item. - */ -static int -cmp_key_option_proxy_long(const void* key, const void* item) -{ - const char_array* longName = key; - const option_proxy* op = item; - - size_t optionLen; - int ret; - - assert(longName != NULL); - assert(op != NULL); - assert(op->option != NULL); - assert(op->context != NULL); - assert(op->context->ncmpstr != NULL); - - if (longName->s == op->option->long_name) - { - return 0; - } - else if (longName->s == NULL) - { - return -1; - } - else if (op->option->long_name == NULL) - { - return +1; - } - - /* Although the longName key might not be NUL-terminated, the - * option_proxy item we're searching against must be. - */ - optionLen = dropt_strlen(op->option->long_name); - ret = op->context->ncmpstr(longName->s, - op->option->long_name, - MIN(longName->len, optionLen)); - if (ret != 0) - { - return ret; - } - - if (longName->len < optionLen) - { - return -1; - } - else if (longName->len > optionLen) - { - return +1; - } - - return 0; -} - - -/** cmp_option_proxies_long - * - * Comparison callback for qsort. Compares two option_proxy - * structures based on long option names. - * - * PARAMETERS: - * IN p1, p2 : Pointers to the option_proxy structures to compare. - * - * RETURNS: - * 0 if p1 and p2 are equivalent, - * < 0 if p1 should precede p2, - * > 0 if p1 should follow p2. - */ -static int -cmp_option_proxies_long(const void* p1, const void* p2) -{ - const option_proxy* o1 = p1; - const option_proxy* o2 = p2; - - char_array ca1; - - assert(o1 != NULL); - assert(o2 != NULL); - assert(o1->option != NULL); - assert(o1->context == o2->context); - - ca1 = make_char_array(o1->option->long_name, - (o1->option->long_name == NULL) - ? 0 - : dropt_strlen(o1->option->long_name)); - return cmp_key_option_proxy_long(&ca1, o2); -} - - -/** cmp_key_option_proxy_short - * - * Comparison callback for bsearch. Compares a dropt_char against an - * option_proxy structure based on short option names. - * - * PARAMETERS: - * IN key : A pointer to the dropt_char to search for. - * IN item : A pointer to the option_proxy structure being searched - * against. - * - * RETURNS: - * 0 if key and item are equivalent, - * < 0 if key should precede item, - * > 0 if key should follow item. - */ -static int -cmp_key_option_proxy_short(const void* key, const void* item) -{ - const dropt_char* shortName = key; - const option_proxy* op = item; - - assert(shortName != NULL); - assert(op != NULL); - assert(op->option != NULL); - assert(op->context != NULL); - assert(op->context->ncmpstr != NULL); - - return op->context->ncmpstr(shortName, - &op->option->short_name, - 1); -} - - -/** cmp_option_proxies_short - * - * Comparison callback for qsort. Compares two option_proxy - * structures based on short option names. - * - * PARAMETERS: - * IN p1, p2 : Pointers to the option_proxy structures to compare. - * - * RETURNS: - * 0 if p1 and p2 are equivalent, - * < 0 if p1 should precede p2, - * > 0 if p1 should follow p2. - */ -static int -cmp_option_proxies_short(const void* p1, const void* p2) -{ - const option_proxy* o1 = p1; - const option_proxy* o2 = p2; - - assert(o1 != NULL); - assert(o2 != NULL); - assert(o1->option != NULL); - assert(o1->context == o2->context); - - return cmp_key_option_proxy_short(&o1->option->short_name, o2); -} - - -/** init_lookup_tables - * - * Initializes the sorted lookup tables in a dropt context if not - * already initialized. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * Must not be NULL. - */ -static void -init_lookup_tables(dropt_context* context) -{ - const dropt_option* options; - size_t n; - - assert(context != NULL); - - options = context->options; - n = context->numOptions; - - if (context->sortedByLong == NULL) - { - context->sortedByLong = dropt_safe_malloc(n, sizeof *(context->sortedByLong)); - if (context->sortedByLong != NULL) - { - size_t i; - for (i = 0; i < n; i++) - { - context->sortedByLong[i].option = &options[i]; - context->sortedByLong[i].context = context; - } - - qsort(context->sortedByLong, - n, sizeof *(context->sortedByLong), - cmp_option_proxies_long); - } - } - - if (context->sortedByShort == NULL) - { - context->sortedByShort = dropt_safe_malloc(n, sizeof *(context->sortedByShort)); - if (context->sortedByShort != NULL) - { - size_t i; - for (i = 0; i < n; i++) - { - context->sortedByShort[i].option = &options[i]; - context->sortedByShort[i].context = context; - } - - qsort(context->sortedByShort, - n, sizeof *(context->sortedByShort), - cmp_option_proxies_short); - } - } -} - - -/** free_lookup_tables - * - * Frees the sorted lookup tables in a dropt context. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * May be NULL. - */ -static void -free_lookup_tables(dropt_context* context) -{ - if (context != NULL) - { - free(context->sortedByLong); - context->sortedByLong = NULL; - - free(context->sortedByShort); - context->sortedByShort = NULL; - } -} - - -/** is_valid_option - * - * PARAMETERS: - * IN option : Specification for an individual option. - * - * RETURNS: - * true if the specified option is valid, false if it's a sentinel - * value. - */ -static bool -is_valid_option(const dropt_option* option) -{ - return option != NULL - && !( option->long_name == NULL - && option->short_name == DROPT_TEXT_LITERAL('\0') - && option->description == NULL - && option->arg_description == NULL - && option->handler == NULL - && option->handler_data == NULL - && option->attr == 0); -} - - -/** find_option_long - * - * Finds the option specification for a long option name (i.e., an - * option of the form "--option"). - * - * PARAMETERS: - * IN context : The dropt context. - * IN longName : The long option name to search for (excluding - * leading dashes). - * longName.s must not be NULL. - * - * RETURNS: - * A pointer to the corresponding option specification or NULL if not - * found. - */ -static const dropt_option* -find_option_long(const dropt_context* context, - char_array longName) -{ - assert(context != NULL); - assert(longName.s != NULL); - - if (context->sortedByLong != NULL) - { - option_proxy* found = bsearch(&longName, context->sortedByLong, - context->numOptions, sizeof *(context->sortedByLong), - cmp_key_option_proxy_long); - return (found == NULL) ? NULL : found->option; - } - - /* Fall back to a linear search. */ - { - option_proxy item = { 0 }; - item.context = context; - for (item.option = context->options; is_valid_option(item.option); item.option++) - { - if (cmp_key_option_proxy_long(&longName, &item) == 0) - { - return item.option; - } - } - } - return NULL; -} - - -/** find_option_short - * - * Finds the option specification for a short option name (i.e., an - * option of the form "-o"). - * - * PARAMETERS: - * IN context : The dropt context. - * IN shortName : The short option name to search for. - * - * RETURNS: - * A pointer to the corresponding option specification or NULL if not - * found. - */ -static const dropt_option* -find_option_short(const dropt_context* context, dropt_char shortName) -{ - assert(context != NULL); - assert(shortName != DROPT_TEXT_LITERAL('\0')); - assert(context->ncmpstr != NULL); - - if (context->sortedByShort != NULL) - { - option_proxy* found = bsearch(&shortName, context->sortedByShort, - context->numOptions, sizeof *(context->sortedByShort), - cmp_key_option_proxy_short); - return (found == NULL) ? NULL : found->option; - } - - /* Fall back to a linear search. */ - { - const dropt_option* option; - for (option = context->options; is_valid_option(option); option++) - { - if (context->ncmpstr(&shortName, &option->short_name, 1) == 0) - { - return option; - } - } - } - return NULL; -} - - -/** set_error_details - * - * Generates error details in the dropt context. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * Must not be NULL. - * IN err : The error code. - * IN optionName : The name of the option we failed on. - * optionName.s must not be NULL. - * IN optionArgument : The value of the option we failed on. - * Pass NULL if unwanted. - */ -static void -set_error_details(dropt_context* context, dropt_error err, - char_array optionName, - const dropt_char* optionArgument) -{ - assert(context != NULL); - assert(optionName.s != NULL); - - context->errorDetails.err = err; - - free(context->errorDetails.optionName); - free(context->errorDetails.optionArgument); - - context->errorDetails.optionName = dropt_strndup(optionName.s, optionName.len); - context->errorDetails.optionArgument = (optionArgument == NULL) - ? NULL - : dropt_strdup(optionArgument); - - /* The message will be generated lazily on retrieval. */ - free(context->errorDetails.message); - context->errorDetails.message = NULL; -} - - -/** set_short_option_error_details - * - * Generates error details in the dropt context. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * IN err : The error code. - * IN shortName : the "short" name of the option we failed on. - * IN optionArgument : The value of the option we failed on. - * Pass NULL if unwanted. - */ -static void -set_short_option_error_details(dropt_context* context, dropt_error err, - dropt_char shortName, const dropt_char* optionArgument) -{ - /* "-?" is just a placeholder. */ - dropt_char shortNameBuf[] = DROPT_TEXT_LITERAL("-?"); - - assert(context != NULL); - assert(shortName != DROPT_TEXT_LITERAL('\0')); - - shortNameBuf[1] = shortName; - - set_error_details(context, err, - make_char_array(shortNameBuf, ARRAY_LENGTH(shortNameBuf) - 1), - optionArgument); -} - - -/** dropt_get_error - * - * PARAMETERS: - * IN context : The dropt context. - * Must not be NULL. - * - * RETURNS: - * The current error code waiting in the dropt context. - */ -dropt_error -dropt_get_error(const dropt_context* context) -{ - if (context == NULL) - { - DROPT_MISUSE("No dropt context specified."); - return dropt_error_bad_configuration; - } - return context->errorDetails.err; -} - - -/** dropt_get_error_details - * - * Retrieves details about the current error. - * - * PARAMETERS: - * IN context : The dropt context. - * OUT optionName : On output, the name of the option we failed - * on. Do not free this string. - * Pass NULL if unwanted. - * OUT optionArgument : On output, the value (possibly NULL) of the - * option we failed on. Do not free this - * string. - * Pass NULL if unwanted. - */ -void -dropt_get_error_details(const dropt_context* context, - dropt_char** optionName, dropt_char** optionArgument) -{ - if (optionName != NULL) { *optionName = context->errorDetails.optionName; } - if (optionArgument != NULL) { *optionArgument = context->errorDetails.optionArgument; } -} - - -/** dropt_get_error_message - * - * PARAMETERS: - * IN context : The dropt context. - * Must not be NULL. - * - * RETURNS: - * The current error message waiting in the dropt context or the empty - * string if there are no errors. Note that calling any dropt - * function other than dropt_get_error, dropt_get_error_details, and - * dropt_get_error_message may invalidate a previously-returned - * string. - */ -const dropt_char* -dropt_get_error_message(dropt_context* context) -{ - if (context == NULL) - { - DROPT_MISUSE("no dropt context specified."); - return DROPT_TEXT_LITERAL(""); - } - - if (context->errorDetails.err == dropt_error_none) - { - return DROPT_TEXT_LITERAL(""); - } - - if (context->errorDetails.message == NULL) - { - if (context->errorHandler != NULL) - { - context->errorDetails.message - = context->errorHandler(context->errorDetails.err, - context->errorDetails.optionName, - context->errorDetails.optionArgument, - context->errorHandlerData); - } - else - { -#ifndef DROPT_NO_STRING_BUFFERS - context->errorDetails.message - = dropt_default_error_handler(context->errorDetails.err, - context->errorDetails.optionName, - context->errorDetails.optionArgument); -#endif - } - } - - return (context->errorDetails.message == NULL) - ? DROPT_TEXT_LITERAL("unknown error") - : context->errorDetails.message; -} - - -/** dropt_clear_error - * - * Clears the error waiting in the dropt context. - * - * PARAMETERS: - * IN/OUT context : The dropt context to free. - * May be NULL. - */ -void -dropt_clear_error(dropt_context* context) -{ - if (context != NULL) - { - context->errorDetails.err = dropt_error_none; - - free(context->errorDetails.optionName); - context->errorDetails.optionName = NULL; - - free(context->errorDetails.optionArgument); - context->errorDetails.optionArgument = NULL; - - free(context->errorDetails.message); - context->errorDetails.message = NULL; - } -} - - -#ifndef DROPT_NO_STRING_BUFFERS -/** dropt_default_error_handler - * - * Default error handler. - * - * PARAMETERS: - * IN error : The error code. - * IN optionName : The name of the option we failed on. - * IN optionArgument : The value of the option we failed on. - * Pass NULL if unwanted. - * - * RETURNS: - * An allocated string for the given error. The caller is responsible - * for calling free() on it when no longer needed. - * May return NULL. - */ -dropt_char* -dropt_default_error_handler(dropt_error error, - const dropt_char* optionName, - const dropt_char* optionArgument) -{ - dropt_char* s = NULL; - - const dropt_char* separator = DROPT_TEXT_LITERAL(": "); - - if (optionArgument == NULL) - { - separator = optionArgument = DROPT_TEXT_LITERAL(""); - } - - switch (error) - { - case dropt_error_none: - /* This shouldn't happen (unless client code invokes this - * directly with dropt_error_none), but it's here for - * completeness. - */ - break; - - case dropt_error_bad_configuration: - s = dropt_strdup(DROPT_TEXT_LITERAL("invalid option configuration")); - break; - - case dropt_error_invalid_option: - s = dropt_asprintf(DROPT_TEXT_LITERAL("invalid option: %s"), - optionName); - break; - case dropt_error_insufficient_arguments: - s = dropt_asprintf(DROPT_TEXT_LITERAL("value required after option %s"), - optionName); - break; - case dropt_error_mismatch: - s = dropt_asprintf(DROPT_TEXT_LITERAL("invalid value for option %s%s%s"), - optionName, separator, optionArgument); - break; - case dropt_error_overflow: - s = dropt_asprintf(DROPT_TEXT_LITERAL("value too large for option %s%s%s"), - optionName, separator, optionArgument); - break; - case dropt_error_underflow: - s = dropt_asprintf(DROPT_TEXT_LITERAL("value too small for option %s%s%s"), - optionName, separator, optionArgument); - break; - case dropt_error_insufficient_memory: - s = dropt_strdup(DROPT_TEXT_LITERAL("insufficient memory")); - break; - case dropt_error_unknown: - default: - s = dropt_asprintf(DROPT_TEXT_LITERAL("unknown error handling option %s"), - optionName); - break; - } - - return s; -} - - -/** dropt_get_help - * - * PARAMETERS: - * IN context : The dropt context. - * Must not be NULL. - * IN helpParams : The help parameters. - * Pass NULL to use the default help parameters. - * - * RETURNS: - * An allocated help string for the available options. The caller is - * responsible for calling free() on it when no longer needed. - * Returns NULL on error. - */ -dropt_char* -dropt_get_help(const dropt_context* context, const dropt_help_params* helpParams) -{ - dropt_char* helpText = NULL; - dropt_stringstream* ss = NULL; - - if (context == NULL) - { - DROPT_MISUSE("No dropt context specified."); - return NULL; - } - - ss = dropt_ssopen(); - - if (ss != NULL) - { - const dropt_option* option; - dropt_help_params hp; - - if (helpParams == NULL) - { - dropt_init_help_params(&hp); - } - else - { - hp = *helpParams; - } - - for (option = context->options; is_valid_option(option); option++) - { - bool hasLongName = option->long_name != NULL - && option->long_name[0] != DROPT_TEXT_LITERAL('\0'); - bool hasShortName = option->short_name != DROPT_TEXT_LITERAL('\0'); - - /* The number of characters printed on the current line so far. */ - int n; - - if (option->description == NULL || (option->attr & dropt_attr_hidden)) - { - /* Undocumented option. Ignore it and move on. */ - continue; - } - else if (hasLongName && hasShortName) - { - n = dropt_ssprintf(ss, DROPT_TEXT_LITERAL("%*s-%c, --%s"), - hp.indent, DROPT_TEXT_LITERAL(""), - option->short_name, option->long_name); - } - else if (hasLongName) - { - n = dropt_ssprintf(ss, DROPT_TEXT_LITERAL("%*s--%s"), - hp.indent, DROPT_TEXT_LITERAL(""), - option->long_name); - } - else if (hasShortName) - { - n = dropt_ssprintf(ss, DROPT_TEXT_LITERAL("%*s-%c"), - hp.indent, DROPT_TEXT_LITERAL(""), - option->short_name); - } - else - { - /* Comment text. Don't bother with indentation. */ - assert(option->description != NULL); - dropt_ssprintf(ss, DROPT_TEXT_LITERAL("%s\n"), option->description); - goto next; - } - - if (n < 0) { n = 0; } - - if (option->arg_description != NULL) - { - int m = dropt_ssprintf(ss, - (option->attr & dropt_attr_optional_val) - ? DROPT_TEXT_LITERAL("[=%s]") - : DROPT_TEXT_LITERAL("=%s"), - option->arg_description); - if (m > 0) { n += m; } - } - - /* Check for equality to make sure that there's at least one - * space between the option name and its description. - */ - if ((unsigned int) n >= hp.description_start_column) - { - dropt_ssprintf(ss, DROPT_TEXT_LITERAL("\n")); - n = 0; - } - - { - const dropt_char* line = option->description; - while (line != NULL) - { - size_t lineLen; - const dropt_char* nextLine; - const dropt_char* newline = dropt_strchr(line, DROPT_TEXT_LITERAL('\n')); - - if (newline == NULL) - { - lineLen = (int)dropt_strlen(line); - nextLine = NULL; - } - else - { - lineLen = (int)(newline - line); - nextLine = newline + 1; - } - - dropt_ssprintf(ss, DROPT_TEXT_LITERAL("%*s%.*s\n"), - hp.description_start_column - n, DROPT_TEXT_LITERAL(""), - lineLen, line); - n = 0; - - line = nextLine; - } - } - - next: - if (hp.blank_lines_between_options) - { - dropt_ssprintf(ss, DROPT_TEXT_LITERAL("\n")); - } - } - helpText = dropt_ssfinalize(ss); - } - - return helpText; -} - - -/** dropt_print_help - * - * Prints help for the available options. - * - * PARAMETERS: - * IN/OUT f : The file stream to print to. - * IN context : The dropt context. - * Must not be NULL. - * IN helpParams : The help parameters. - * Pass NULL to use the default help parameters. - */ -void -dropt_print_help(FILE* f, const dropt_context* context, - const dropt_help_params* helpParams) -{ - dropt_char* helpText = dropt_get_help(context, helpParams); - if (helpText != NULL) - { - dropt_fputs(helpText, f); - free(helpText); - } -} -#endif /* DROPT_NO_STRING_BUFFERS */ - - -/** set_option_value - * - * Sets the value for a specified option by invoking the option's - * handler callback. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * IN option : The option. - * IN optionArgument : The option's value. May be NULL. - * - * RETURNS: - * An error code. - */ -static dropt_error -set_option_value(dropt_context* context, - const dropt_option* option, const dropt_char* optionArgument) -{ - assert(option != NULL); - - if (option->handler == NULL) - { - DROPT_MISUSE("No option handler specified."); - return dropt_error_bad_configuration; - } - - return option->handler(context, optionArgument, option->handler_data); -} - - -/** parse_option_arg - * - * Helper function to dropt_parse to deal with consuming possibly - * optional arguments. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * IN/OUT ps : The current parse state. - * - * RETURNS: - * An error code. - */ -static dropt_error -parse_option_arg(dropt_context* context, parse_state* ps) -{ - dropt_error err; - - bool consumeNextArg = false; - - if (OPTION_TAKES_ARG(ps->option) && ps->optionArgument == NULL) - { - /* The option expects an argument, but none was specified with '='. - * Try using the next item from the command-line. - */ - if (ps->argsLeft > 0 && *(ps->argNext) != NULL) - { - consumeNextArg = true; - ps->optionArgument = *(ps->argNext); - } - else if (!(ps->option->attr & dropt_attr_optional_val)) - { - err = dropt_error_insufficient_arguments; - goto exit; - } - } - - /* Even for options that don't ask for arguments, always parse and - * consume an argument that was specified with '='. - */ - err = set_option_value(context, ps->option, ps->optionArgument); - - if ( err != dropt_error_none - && (ps->option->attr & dropt_attr_optional_val) - && consumeNextArg - && ps->optionArgument != NULL) - { - /* The option's handler didn't like the argument we fed it. If the - * argument was optional, try again without it. - */ - consumeNextArg = false; - ps->optionArgument = NULL; - err = set_option_value(context, ps->option, NULL); - } - -exit: - if (err == dropt_error_none && consumeNextArg) - { - ps->argNext++; - ps->argsLeft--; - } - return err; -} - - -/** dropt_parse - * - * Parses command-line options. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * Must not be NULL. - * IN argc : The maximum number of arguments to parse from - * argv. - * Pass -1 to parse all arguments up to a NULL - * sentinel value. - * IN argv : The list of command-line arguments, not including - * the initial program name. - * - * RETURNS: - * A pointer to the first unprocessed element in argv. - */ -dropt_char** -dropt_parse(dropt_context* context, - int argc, dropt_char** argv) -{ - dropt_error err = dropt_error_none; - - dropt_char* arg; - parse_state ps; - - ps.option = NULL; - ps.optionArgument = NULL; - ps.argNext = argv; - - if (argv == NULL) - { - /* Nothing to do. */ - goto exit; - } - - if (context == NULL) - { - DROPT_MISUSE("No dropt context specified."); - goto exit; - } - -#ifdef DROPT_NO_STRING_BUFFERS - if (context->errorHandler == NULL) - { - DROPT_MISUSE("No error handler specified."); - set_error_details(context, dropt_error_bad_configuration, - make_char_array(DROPT_TEXT_LITERAL(""), 0), - NULL); - goto exit; - } -#endif - - if (argc == -1) - { - argc = 0; - while (argv[argc] != NULL) { argc++; } - } - - if (argc == 0) - { - /* Nothing to do. */ - goto exit; - } - - init_lookup_tables(context); - - ps.argsLeft = argc; - - while ( ps.argsLeft-- > 0 - && (arg = *ps.argNext) != NULL - && arg[0] == DROPT_TEXT_LITERAL('-')) - { - assert(err == dropt_error_none); - - if (arg[1] == DROPT_TEXT_LITERAL('\0')) - { - /* - */ - - /* This intentionally leaves "-" unprocessed for the caller to - * deal with. This allows construction of programs that treat - * "-" to mean "stdin". - */ - goto exit; - } - - ps.argNext++; - - if (arg[1] == DROPT_TEXT_LITERAL('-')) - { - const dropt_char* longName = arg + 2; - if (longName[0] == DROPT_TEXT_LITERAL('\0')) - { - /* -- */ - - /* This is used to mark the end of the option processing - * to prevent some arguments with leading '-' characters - * from being treated as options. - * - * Don't pass this back to the caller. - */ - goto exit; - } - else if (longName[0] == DROPT_TEXT_LITERAL('=')) - { - /* Deal with the pathological case of a user supplying - * "--=". - */ - err = dropt_error_invalid_option; - set_error_details(context, err, - make_char_array(arg, dropt_strlen(arg)), - NULL); - goto exit; - } - else - { - /* --longName */ - const dropt_char* p = dropt_strchr(longName, DROPT_TEXT_LITERAL('=')); - const dropt_char* longNameEnd; - if (p != NULL) - { - /* --longName=arg */ - longNameEnd = p; - ps.optionArgument = p + 1; - } - else - { - longNameEnd = longName + dropt_strlen(longName); - assert(ps.optionArgument == NULL); - } - - /* Pass the length of the option name so that we don't need - * to mutate the original string by inserting a - * NUL-terminator. - */ - ps.option = find_option_long(context, - make_char_array(longName, - longNameEnd - longName)); - if (ps.option == NULL) - { - err = dropt_error_invalid_option; - set_error_details(context, err, - make_char_array(arg, longNameEnd - arg), - NULL); - } - else - { - err = parse_option_arg(context, &ps); - if (err != dropt_error_none) - { - set_error_details(context, err, - make_char_array(arg, longNameEnd - arg), - ps.optionArgument); - } - } - - if ( err != dropt_error_none - || ps.option->attr & dropt_attr_halt) - { - goto exit; - } - } - } - else - { - /* Short name. (-x) */ - size_t len; - size_t j; - - if (arg[1] == DROPT_TEXT_LITERAL('=')) - { - /* Deal with the pathological case of a user supplying - * "-=". - */ - err = dropt_error_invalid_option; - set_error_details(context, err, - make_char_array(arg, dropt_strlen(arg)), - NULL); - goto exit; - } - else - { - const dropt_char* p = dropt_strchr(arg, DROPT_TEXT_LITERAL('=')); - if (p != NULL) - { - /* -x=arg */ - len = p - arg; - ps.optionArgument = p + 1; - } - else - { - len = dropt_strlen(arg); - assert(ps.optionArgument == NULL); - } - } - - for (j = 1; j < len; j++) - { - ps.option = find_option_short(context, arg[j]); - if (ps.option == NULL) - { - err = dropt_error_invalid_option; - set_short_option_error_details(context, err, arg[j], NULL); - goto exit; - } - else if (j + 1 == len) - { - /* The last short option in a condensed list gets - * to use an argument. - */ - err = parse_option_arg(context, &ps); - if (err != dropt_error_none) - { - set_short_option_error_details(context, err, arg[j], - ps.optionArgument); - goto exit; - } - } - else if ( context->allowConcatenatedArgs - && OPTION_TAKES_ARG(ps.option) - && j == 1) - { - err = set_option_value(context, ps.option, &arg[j + 1]); - - if ( err != dropt_error_none - && (ps.option->attr & dropt_attr_optional_val)) - { - err = set_option_value(context, ps.option, NULL); - } - - if (err != dropt_error_none) - { - set_short_option_error_details(context, err, arg[j], &arg[j + 1]); - goto exit; - } - - /* Skip to the next argument. */ - break; - } - else if ( OPTION_TAKES_ARG(ps.option) - && !(ps.option->attr & dropt_attr_optional_val)) - { - /* Short options with required arguments can't be used - * in condensed lists except in the last position. - * - * e.g. -abcd arg - * ^ - */ - err = dropt_error_insufficient_arguments; - set_short_option_error_details(context, err, arg[j], NULL); - goto exit; - } - else - { - err = set_option_value(context, ps.option, NULL); - if (err != dropt_error_none) - { - set_short_option_error_details(context, err, arg[j], NULL); - goto exit; - } - } - - if (ps.option->attr & dropt_attr_halt) { goto exit; } - } - } - - ps.option = NULL; - ps.optionArgument = NULL; - } - -exit: - return ps.argNext; -} - - -/** dropt_new_context - * - * Creates a new dropt context. - * - * PARAMETERS: - * IN options : The list of option specifications. - * Must not be NULL. - * - * RETURNS: - * An allocated dropt context. The caller is responsible for freeing - * it with dropt_free_context when no longer needed. - * Returns NULL on error. - */ -dropt_context* -dropt_new_context(const dropt_option* options) -{ - dropt_context* context = NULL; - size_t n; - - if (options == NULL) - { - DROPT_MISUSE("No option list specified."); - goto exit; - } - - /* Sanity-check the options. */ - for (n = 0; is_valid_option(&options[n]); n++) - { - if ( options[n].short_name == DROPT_TEXT_LITERAL('=') - || ( options[n].long_name != NULL - && dropt_strchr(options[n].long_name, DROPT_TEXT_LITERAL('=')) != NULL)) - { - DROPT_MISUSE("Invalid option list. '=' may not be used in an option name."); - goto exit; - } - } - - context = malloc(sizeof *context); - if (context == NULL) - { - goto exit; - } - else - { - dropt_context emptyContext = { 0 }; - *context = emptyContext; - - context->options = options; - context->numOptions = n; - dropt_set_strncmp(context, NULL); - } - -exit: - return context; -} - - -/** dropt_free_context - * - * Frees a dropt context. - * - * PARAMETERS: - * IN/OUT context : The dropt context to free. - * May be NULL. - */ -void -dropt_free_context(dropt_context* context) -{ - dropt_clear_error(context); - free_lookup_tables(context); - free(context); -} - - -/** dropt_get_options - * - * PARAMETERS: - * IN context : The dropt context. - * Must not be NULL. - * - * RETURNS: - * The context's list of option specifications. - */ -const dropt_option* -dropt_get_options(const dropt_context* context) -{ - if (context == NULL) - { - DROPT_MISUSE("No dropt context specified."); - return NULL; - } - - return context->options; -} - - -/** dropt_init_help_params - * - * Initializes a dropt_help_params structure with the default - * values. - * - * PARAMETERS: - * OUT helpParams : On output, set to the default help parameters. - * Must not be NULL. - */ -void -dropt_init_help_params(dropt_help_params* helpParams) -{ - if (helpParams == NULL) - { - DROPT_MISUSE("No dropt help parameters specified."); - return; - } - - helpParams->indent = default_help_indent; - helpParams->description_start_column = default_description_start_column; - helpParams->blank_lines_between_options = true; -} - - -/** dropt_set_error_handler - * - * Sets the callback function used to generate error strings from - * error codes. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * Must not be NULL. - * IN handler : The error handler callback. - * Pass NULL to use the default error handler. - * IN handlerData : Caller-defined callback data. - */ -void -dropt_set_error_handler(dropt_context* context, dropt_error_handler_func handler, void* handlerData) -{ - if (context == NULL) - { - DROPT_MISUSE("No dropt context specified."); - return; - } - - context->errorHandler = handler; - context->errorHandlerData = handlerData; -} - - -/** dropt_set_strncmp - * - * Sets the callback function used to compare strings. - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * Must not be NULL. - * IN cmp : The string comparison function. - * Pass NULL to use the default string comparison - * function. - */ -void -dropt_set_strncmp(dropt_context* context, dropt_strncmp_func cmp) -{ - if (context == NULL) - { - DROPT_MISUSE("No dropt context specified."); - return; - } - - if (cmp == NULL) { cmp = dropt_strncmp; } - context->ncmpstr = cmp; - - /* Changing the sort method invalidates our existing lookup tables. */ - free_lookup_tables(context); -} - - -/** dropt_allow_concatenated_arguments - * - * Specifies whether "short" options are allowed to have concatenated - * arguments (i.e. without space or '=' separators, such as -oARGUMENT). - * - * (Concatenated arguments are disallowed by default.) - * - * PARAMETERS: - * IN/OUT context : The dropt context. - * IN allow : Pass 1 if concatenated arguments should be allowed, - * 0 otherwise. - */ -void -dropt_allow_concatenated_arguments(dropt_context* context, dropt_bool allow) -{ - if (context == NULL) - { - DROPT_MISUSE("No dropt context specified."); - return; - } - - context->allowConcatenatedArgs = (allow != 0); -} - - -/** dropt_misuse - * - * Prints a diagnostic for logical errors caused by external clients - * calling into dropt improperly. - * - * In debug builds, terminates the program and prints the filename and - * line number of the failure. - * - * For logical errors entirely internal to dropt, use assert() - * instead. - * - * PARAMETERS: - * IN message : The error message. - * Must not be NULL. - * IN filename : The name of the file where the logical error - * occurred. - * Must not be NULL. - * IN line : The line number where the logical error occurred. - */ -void -dropt_misuse(const char* message, const char* filename, int line) -{ -#ifdef NDEBUG - (void)filename; - (void)line; - fprintf(stderr, "dropt: %s\n", message); -#else - fprintf(stderr, "dropt: %s (%s: %d)\n", message, filename, line); - abort(); -#endif -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt_handlers.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt_handlers.c deleted file mode 100644 index 412d571c0b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt_handlers.c +++ /dev/null @@ -1,438 +0,0 @@ -/** dropt_handlers.c - * - * Default type handlers for dropt. - * - * Copyright (c) 2006-2012 James D. Lin - * - * The latest version of this file can be downloaded from: - * - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source distribution. - */ -// THIS FILE HAS BEEN ALTERED from original version to fix warnings -#include -#include -#include -#include -#include -#include - -#include "dropt.h" -#include "dropt_string.h" - -#define ABS(x) (((x) < 0) ? -(x) : (x)) - -typedef enum { false, true } bool; - -/** dropt_handle_bool - * - * Parses a boolean value from the given string if possible. - * - * PARAMETERS: - * IN/OUT context : The options context. - * IN optionArgument : A string representing a boolean value (0 or 1). - * If NULL, the boolean value is assumed to be - * true. - * OUT handlerData : A dropt_bool*. - * On success, set to the interpreted boolean - * value. - * On error, left untouched. - * - * RETURNS: - * dropt_error_none - * dropt_error_unknown - * dropt_error_bad_configuration - * dropt_error_mismatch - */ -dropt_error -dropt_handle_bool(dropt_context* context, const dropt_char* optionArgument, - void* handlerData) -{ - dropt_error err = dropt_error_none; - bool val = false; - dropt_bool* out = handlerData; - - if (out == NULL) - { - DROPT_MISUSE("No handler data specified."); - err = dropt_error_bad_configuration; - } - else if (optionArgument == NULL) - { - /* No explicit argument implies that the option is being turned on. */ - val = true; - } - else if (optionArgument[0] == DROPT_TEXT_LITERAL('\0')) - { - err = dropt_error_mismatch; - } - else - { - unsigned int i = 0; - err = dropt_handle_uint(context, optionArgument, &i); - if (err == dropt_error_none) - { - switch (i) - { - case 0: - val = false; - break; - case 1: - val = true; - break; - default: - err = dropt_error_mismatch; - break; - } - } - else if (err == dropt_error_overflow) - { - err = dropt_error_mismatch; - } - } - - if (err == dropt_error_none) { *out = val; } - return err; -} - - -/** dropt_handle_verbose_bool - * - * Like dropt_handle_bool but accepts "true" and "false" string - * values. - * - * PARAMETERS: - * IN/OUT context : The options context. - * IN optionArgument : A string representing a boolean value. - * If NULL, the boolean value is assumed to be - * true. - * OUT handlerData : A dropt_bool*. - * On success, set to the interpreted boolean - * value. - * On error, left untouched. - * - * RETURNS: - * See dropt_handle_bool. - */ -dropt_error -dropt_handle_verbose_bool(dropt_context* context, const dropt_char* optionArgument, - void* handlerData) -{ - dropt_error err = dropt_handle_bool(context, optionArgument, handlerData); - if (err == dropt_error_mismatch) - { - bool val = false; - dropt_bool* out = handlerData; - - /* dropt_handle_bool already checks for this. */ - assert(out != NULL); - - if (dropt_stricmp(optionArgument, DROPT_TEXT_LITERAL("false")) == 0) - { - val = false; - err = dropt_error_none; - } - else if (dropt_stricmp(optionArgument, DROPT_TEXT_LITERAL("true")) == 0) - { - val = true; - err = dropt_error_none; - } - - if (err == dropt_error_none) { *out = val; } - } - return err; -} - - -/** dropt_handle_int - * - * Parses an integer from the given string. - * - * PARAMETERS: - * IN/OUT context : The options context. - * IN optionArgument : A string representing a base-10 integer. - * If NULL, returns dropt_error_insufficient_arguments. - * OUT handlerData : An int*. - * On success, set to the interpreted integer. - * On error, left untouched. - * - * RETURNS: - * dropt_error_none - * dropt_error_unknown - * dropt_error_bad_configuration - * dropt_error_insufficient_arguments - * dropt_error_mismatch - * dropt_error_overflow - */ -dropt_error -dropt_handle_int(dropt_context* context, const dropt_char* optionArgument, - void* handlerData) -{ - dropt_error err = dropt_error_none; - int val = 0; - int* out = handlerData; - (void)context; - - if (out == NULL) - { - DROPT_MISUSE("No handler data specified."); - err = dropt_error_bad_configuration; - } - else if (optionArgument == NULL || optionArgument[0] == DROPT_TEXT_LITERAL('\0')) - { - err = dropt_error_insufficient_arguments; - } - else - { - dropt_char* end; - long n; - errno = 0; - n = dropt_strtol(optionArgument, &end, 10); - - /* Check that we matched at least one digit. - * (strtol/strtoul will return 0 if fed a string with no digits.) - */ - if (*end == DROPT_TEXT_LITERAL('\0') && end > optionArgument) - { - if (errno == ERANGE || n < INT_MIN || n > INT_MAX) - { - err = dropt_error_overflow; - val = (n < 0) ? INT_MIN : INT_MAX; - } - else if (errno == 0) - { - val = (int) n; - } - else - { - err = dropt_error_unknown; - } - } - else - { - err = dropt_error_mismatch; - } - } - - if (err == dropt_error_none) { *out = val; } - return err; -} - - -/** dropt_handle_uint - * - * Parses an unsigned integer from the given string. - * - * PARAMETERS: - * IN/OUT context : The options context. - * IN optionArgument : A string representing an unsigned base-10 - * integer. - * If NULL, returns dropt_error_insufficient_arguments. - * OUT handlerData : An unsigned int*. - * On success, set to the interpreted integer. - * On error, left untouched. - * - * RETURNS: - * dropt_error_none - * dropt_error_unknown - * dropt_error_bad_configuration - * dropt_error_insufficient_arguments - * dropt_error_mismatch - * dropt_error_overflow - */ -dropt_error -dropt_handle_uint(dropt_context* context, const dropt_char* optionArgument, - void* handlerData) -{ - dropt_error err = dropt_error_none; - int val = 0; - unsigned int* out = handlerData; - (void)context; - - if (out == NULL) - { - DROPT_MISUSE("No handler data specified."); - err = dropt_error_bad_configuration; - } - else if ( optionArgument == NULL - || optionArgument[0] == DROPT_TEXT_LITERAL('\0')) - { - err = dropt_error_insufficient_arguments; - } - else if (optionArgument[0] == DROPT_TEXT_LITERAL('-')) - { - err = dropt_error_mismatch; - } - else - { - dropt_char* end; - unsigned long n; - errno = 0; - n = dropt_strtoul(optionArgument, &end, 10); - - /* Check that we matched at least one digit. - * (strtol/strtoul will return 0 if fed a string with no digits.) - */ - if (*end == DROPT_TEXT_LITERAL('\0') && end > optionArgument) - { - if (errno == ERANGE || n > UINT_MAX) - { - err = dropt_error_overflow; - val = UINT_MAX; - } - else if (errno == 0) - { - val = (unsigned int) n; - } - else - { - err = dropt_error_unknown; - } - } - else - { - err = dropt_error_mismatch; - } - } - - if (err == dropt_error_none) { *out = val; } - return err; -} - - -/** dropt_handle_double - * - * Parses a double from the given string. - * - * PARAMETERS: - * IN/OUT context : The options context. - * IN optionArgument : A string representing a base-10 floating-point - * number. - * If NULL, returns dropt_error_insufficient_arguments. - * OUT handlerData : A double*. - * On success, set to the interpreted double. - * On error, left untouched. - * - * RETURNS: - * dropt_error_none - * dropt_error_unknown - * dropt_error_bad_configuration - * dropt_error_insufficient_arguments - * dropt_error_mismatch - * dropt_error_overflow - * dropt_error_underflow - */ -dropt_error -dropt_handle_double(dropt_context* context, const dropt_char* optionArgument, - void* handlerData) -{ - dropt_error err = dropt_error_none; - double val = 0.0; - double* out = handlerData; - (void)context; - - if (out == NULL) - { - DROPT_MISUSE("No handler data specified."); - err = dropt_error_bad_configuration; - } - else if ( optionArgument == NULL - || optionArgument[0] == DROPT_TEXT_LITERAL('\0')) - { - err = dropt_error_insufficient_arguments; - } - else - { - dropt_char* end; - errno = 0; - val = dropt_strtod(optionArgument, &end); - - /* Check that we matched at least one digit. - * (strtod will return 0 if fed a string with no digits.) - */ - if (*end == DROPT_TEXT_LITERAL('\0') && end > optionArgument) - { - if (errno == ERANGE) - { - /* Note that setting errno to ERANGE for underflow errors - * is implementation-defined behavior, but glibc, BSD's - * libc, and Microsoft's CRT all have implementations of - * strtod documented to return 0 and to set errno to ERANGE - * for such cases. - */ - err = (ABS(val) <= DBL_MIN) - ? dropt_error_underflow - : dropt_error_overflow; - } - else if (errno != 0) - { - err = dropt_error_unknown; - } - } - else - { - err = dropt_error_mismatch; - } - } - - if (err == dropt_error_none) { *out = val; } - return err; -} - - -/** dropt_handle_string - * - * Obtains a string. - * - * PARAMETERS: - * IN/OUT context : The options context. - * IN optionArgument : A string. - * If NULL, returns dropt_error_insufficient_arguments. - * OUT handlerData : A dropt_char**. - * On success, set to the input string. The - * string is NOT copied from the original argv - * array, so do not free it. - * On error, left untouched. - * - * RETURNS: - * dropt_error_none - * dropt_error_bad_configuration - * dropt_error_insufficient_arguments - */ -dropt_error -dropt_handle_string(dropt_context* context, const dropt_char* optionArgument, - void* handlerData) -{ - dropt_error err = dropt_error_none; - const dropt_char** out = handlerData; - (void)context; - - if (out == NULL) - { - DROPT_MISUSE("No handler data specified."); - err = dropt_error_bad_configuration; - } - else if (optionArgument == NULL) - { - err = dropt_error_insufficient_arguments; - } - - if (err == dropt_error_none) { *out = optionArgument; } - return err; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt_string.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt_string.c deleted file mode 100644 index 6505bd1bab..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/dropt/src/dropt_string.c +++ /dev/null @@ -1,686 +0,0 @@ -/** dropt_string.c - * - * String routines for dropt. - * - * Copyright (c) 2006-2012 James D. Lin - * - * The latest version of this file can be downloaded from: - * - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source distribution. - */ - -#ifdef _MSC_VER - #include -#endif - -#include -#include -#include -#include -#include -#include -#include - -#if __STDC_VERSION__ >= 199901L - #include -#else - /* Compatibility junk for things that don't yet support ISO C99. */ - #if defined _MSC_VER || defined __BORLANDC__ - #ifndef va_copy - #define va_copy(dest, src) (dest = (src)) - #endif - #else - #ifndef va_copy - #error Unsupported platform. va_copy is not defined. - #endif - #endif - - #ifndef SIZE_MAX - #define SIZE_MAX ((size_t) -1) - #endif -#endif - -#include "dropt_string.h" - -#ifndef MAX -#define MAX(x, y) (((x) > (y)) ? (x) : (y)) -#endif - -#ifndef MIN -#define MIN(x, y) (((x) < (y)) ? (x) : (y)) -#endif - -#ifdef DROPT_DEBUG_STRING_BUFFERS - enum { default_stringstream_buffer_size = 1 }; - #define GROWN_STRINGSTREAM_BUFFER_SIZE(oldSize, minAmount) \ - ((oldSize) + (minAmount)) -#else - enum { default_stringstream_buffer_size = 256 }; - #define GROWN_STRINGSTREAM_BUFFER_SIZE(oldSize, minAmount) \ - MAX((oldSize) * 2, (oldSize) + (minAmount)) -#endif - - -#ifndef DROPT_NO_STRING_BUFFERS -struct dropt_stringstream -{ - dropt_char* string; /* The string buffer. */ - size_t maxSize; /* Size of the string buffer, in dropt_char-s, including space for NUL. */ - size_t used; /* Number of elements used in the string buffer, excluding NUL. */ -}; -#endif - - -/** dropt_safe_malloc - * - * A version of malloc that checks for integer overflow. - * - * PARAMETERS: - * IN numElements : The number of elements to allocate. - * IN elementSize : The size of each element, in bytes. - * - * RETURNS: - * A pointer to the allocated memory. - * Returns NULL if numElements is 0. - * Returns NULL on error. - */ -void* -dropt_safe_malloc(size_t numElements, size_t elementSize) -{ - return dropt_safe_realloc(NULL, numElements, elementSize); -} - - -/** dropt_safe_realloc - * - * Wrapper around realloc to check for integer overflow. - * - * PARAMETERS: - * IN/OUT p : A pointer to the memory block to resize. - * If NULL, a new memory block of the specified size - * will be allocated. - * IN numElements : The number of elements to allocate. - * If 0, frees p. - * IN elementSize : The size of each element, in bytes. - * - * RETURNS: - * A pointer to the allocated memory. - * Returns NULL if numElements is 0. - * Returns NULL on error. - */ -void* -dropt_safe_realloc(void* p, size_t numElements, size_t elementSize) -{ - size_t numBytes; - - /* elementSize shouldn't legally be 0, but we check for it in case a - * caller got the argument order wrong. - */ - if (numElements == 0 || elementSize == 0) - { - /* The behavior of realloc(p, 0) is implementation-defined. Let's - * enforce a particular behavior. - */ - free(p); - - assert(elementSize != 0); - return NULL; - } - - numBytes = numElements * elementSize; - if (numBytes / elementSize != numElements) - { - /* Overflow. */ - return NULL; - } - - return realloc(p, numBytes); -} - - -/** dropt_strdup - * - * Duplicates a string. - * - * PARAMETERS: - * IN s : A NUL-terminated string to duplicate. - * - * RETURNS: - * The duplicated string. The caller is responsible for calling - * free() on it when no longer needed. - * Returns NULL on error. - */ -dropt_char* -dropt_strdup(const dropt_char* s) -{ - return dropt_strndup(s, SIZE_MAX); -} - - -/** dropt_strndup - * - * Duplicates the first n characters of a string. - * - * PARAMETERS: - * IN s : The string to duplicate. - * IN n : The maximum number of dropt_char-s to copy, excluding the - * NUL-terminator. - * - * RETURNS: - * The duplicated string, which is always NUL-terminated. The caller - * is responsible for calling free() on it when no longer needed. - * Returns NULL on error. - */ -dropt_char* -dropt_strndup(const dropt_char* s, size_t n) -{ - dropt_char* copy; - size_t len = 0; - - assert(s != NULL); - - while (len < n && s[len] != DROPT_TEXT_LITERAL('\0')) - { - len++; - } - - if (len + 1 < len) - { - /* This overflow check shouldn't be strictly necessary. len can be - * at most SIZE_MAX, so SIZE_MAX + 1 can wrap around to 0, but - * dropt_safe_malloc will return NULL for a 0-sized allocation. - * However, favor defensive paranoia. - */ - return NULL; - } - - copy = dropt_safe_malloc(len + 1 /* NUL */, sizeof *copy); - if (copy != NULL) - { - memcpy(copy, s, len * sizeof *copy); - copy[len] = DROPT_TEXT_LITERAL('\0'); - } - - return copy; -} - - -/** dropt_stricmp - * - * Compares two NUL-terminated strings ignoring case differences. Not - * recommended for non-ASCII strings. - * - * PARAMETERS: - * IN s, t : The strings to compare. - * - * RETURNS: - * 0 if the strings are equivalent, - * < 0 if s is lexically less than t, - * > 0 if s is lexically greater than t. - */ -int -dropt_stricmp(const dropt_char* s, const dropt_char* t) -{ - assert(s != NULL); - assert(t != NULL); - return dropt_strnicmp(s, t, SIZE_MAX); -} - - -/** dropt_strnicmp - * - * Compares the first n characters of two strings, ignoring case - * differences. Not recommended for non-ASCII strings. - * - * PARAMETERS: - * IN s, t : The strings to compare. - * IN n : The maximum number of dropt_char-s to compare. - * - * RETURNS: - * 0 if the strings are equivalent, - * < 0 if s is lexically less than t, - * > 0 if s is lexically greater than t. - */ -int -dropt_strnicmp(const dropt_char* s, const dropt_char* t, size_t n) -{ - assert(s != NULL); - assert(t != NULL); - - if (s == t) { return 0; } - - while (n--) - { - if (*s == DROPT_TEXT_LITERAL('\0') && *t == DROPT_TEXT_LITERAL('\0')) - { - break; - } - else if (*s == *t || dropt_tolower(*s) == dropt_tolower(*t)) - { - s++; - t++; - } - else - { - return (dropt_tolower(*s) < dropt_tolower(*t)) - ? -1 - : +1; - } - } - - return 0; -} - - -#ifndef DROPT_NO_STRING_BUFFERS -/** dropt_vsnprintf - * - * vsnprintf wrapper to provide ISO C99-compliant behavior. - * - * PARAMETERS: - * OUT s : The destination buffer. May be NULL if n is 0. - * If non-NULL, always NUL-terminated. - * IN n : The size of the destination buffer, measured in - * dropt_char-s. - * IN format : printf-style format specifier. Must not be NULL. - * IN args : Arguments to insert into the formatted string. - * - * RETURNS: - * The number of characters that would be written to the destination - * buffer if it's sufficiently large, excluding the NUL-terminator. - * Returns -1 on error. - */ -int -dropt_vsnprintf(dropt_char* s, size_t n, const dropt_char* format, va_list args) -{ -#if __STDC_VERSION__ >= 199901L || __GNUC__ - /* ISO C99-compliant. - * - * As far as I can tell, gcc's implementation of vsnprintf has always - * matched the behavior required by the C99 standard (which is to - * return the necessary buffer size). - * - * Note that this won't work with wchar_t because there is no true, - * standard wchar_t equivalent of snprintf. swprintf comes close but - * doesn't return the necessary buffer size (and the standard does not - * provide a guaranteed way to test if truncation occurred), and its - * format string can't be used interchangeably with snprintf. - * - * It's simpler not to support wchar_t on non-Windows platforms. - */ - assert(format != NULL); - return vsnprintf(s, n, format, args); -#elif defined __BORLANDC__ - /* Borland's compiler neglects to NUL-terminate. */ - int ret; - assert(format != NULL); - ret = vsnprintf(s, n, format, args); - if (n != 0) { s[n - 1] = DROPT_TEXT_LITERAL('\0'); } - return ret; -#elif defined _MSC_VER - /* _vsntprintf and _vsnprintf_s on Windows don't have C99 semantics; - * they return -1 if truncation occurs. - */ - va_list argsCopy; - int ret; - - assert(format != NULL); - - va_copy(argsCopy, args); - ret = _vsctprintf(format, argsCopy); - va_end(argsCopy); - - if (n != 0) - { - assert(s != NULL); - - #if _MSC_VER >= 1400 - (void) _vsntprintf_s(s, n, _TRUNCATE, format, args); - #else - /* This version doesn't necessarily NUL-terminate. Sigh. */ - (void) _vsnprintf(s, n, format, args); - s[n - 1] = DROPT_TEXT_LITERAL('\0'); - #endif - } - - return ret; - -#else - #error Unsupported platform. dropt_vsnprintf unimplemented. - return -1; -#endif -} - - -/** See dropt_vsnprintf. */ -int -dropt_snprintf(dropt_char* s, size_t n, const dropt_char* format, ...) -{ - int ret; - va_list args; - va_start(args, format); - ret = dropt_vsnprintf(s, n, format, args); - va_end(args); - return ret; -} - - -/** dropt_vasprintf - * - * Allocates a formatted string with vprintf semantics. - * - * PARAMETERS: - * IN format : printf-style format specifier. Must not be NULL. - * IN args : Arguments to insert into the formatted string. - * - * RETURNS: - * The formatted string, which is always NUL-terminated. The caller - * is responsible for calling free() on it when no longer needed. - * Returns NULL on error. - */ -dropt_char* -dropt_vasprintf(const dropt_char* format, va_list args) -{ - dropt_char* s = NULL; - int len; - va_list argsCopy; - assert(format != NULL); - - va_copy(argsCopy, args); - len = dropt_vsnprintf(NULL, 0, format, argsCopy); - va_end(argsCopy); - - if (len >= 0) - { - size_t n = len + 1 /* NUL */; - s = dropt_safe_malloc(n, sizeof *s); - if (s != NULL) - { - dropt_vsnprintf(s, n, format, args); - } - } - - return s; -} - - -/** See dropt_vasprintf. */ -dropt_char* -dropt_asprintf(const dropt_char* format, ...) -{ - dropt_char* s; - - va_list args; - va_start(args, format); - s = dropt_vasprintf(format, args); - va_end(args); - - return s; -} - - -/** dropt_ssopen - * - * Constructs a new dropt_stringstream. - * - * RETURNS: - * An initialized dropt_stringstream. The caller is responsible for - * calling either dropt_ssclose() or dropt_ssfinalize() on it when - * no longer needed. - * Returns NULL on error. - */ -dropt_stringstream* -dropt_ssopen(void) -{ - dropt_stringstream* ss = malloc(sizeof *ss); - if (ss != NULL) - { - ss->used = 0; - ss->maxSize = default_stringstream_buffer_size; - ss->string = dropt_safe_malloc(ss->maxSize, sizeof *ss->string); - if (ss->string == NULL) - { - free(ss); - ss = NULL; - } - else - { - ss->string[0] = DROPT_TEXT_LITERAL('\0'); - } - } - return ss; -} - - -/** dropt_ssclose - * - * Destroys a dropt_stringstream. - * - * PARAMETERS: - * IN/OUT ss : The dropt_stringstream. - */ -void -dropt_ssclose(dropt_stringstream* ss) -{ - if (ss != NULL) - { - free(ss->string); - free(ss); - } -} - - -/** dropt_ssgetfreespace - * - * RETURNS: - * The amount of free space in the dropt_stringstream's internal - * buffer, measured in dropt_char-s. Space used for the - * NUL-terminator is considered free. (The amount of free space - * therefore is always positive.) - */ -static size_t -dropt_ssgetfreespace(const dropt_stringstream* ss) -{ - assert(ss != NULL); - assert(ss->maxSize > 0); - assert(ss->maxSize > ss->used); - return ss->maxSize - ss->used; -} - - -/** dropt_ssresize - * - * Resizes a dropt_stringstream's internal buffer. If the requested - * size is less than the amount of buffer already in use, the buffer - * will be shrunk to the minimum size necessary. - * - * PARAMETERS: - * IN/OUT ss : The dropt_stringstream. - * IN n : The desired buffer size, in dropt_char-s. - * - * RETURNS: - * The new size of the dropt_stringstream's buffer in dropt_char-s, - * including space for a terminating NUL. - */ -static size_t -dropt_ssresize(dropt_stringstream* ss, size_t n) -{ - assert(ss != NULL); - - /* Don't allow shrinking if it will truncate the string. */ - if (n < ss->maxSize) { n = MAX(n, ss->used + 1 /* NUL */); } - - /* There should always be a buffer to point to. */ - assert(n > 0); - - if (n != ss->maxSize) - { - dropt_char* p = dropt_safe_realloc(ss->string, n, sizeof *ss->string); - if (p != NULL) - { - ss->string = p; - ss->maxSize = n; - assert(ss->maxSize > 0); - } - } - return ss->maxSize; -} - - -/** dropt_ssclear - * - * Clears and re-initializes a dropt_stringstream. - * - * PARAMETERS: - * IN/OUT ss : The dropt_stringstream - */ -void -dropt_ssclear(dropt_stringstream* ss) -{ - assert(ss != NULL); - - ss->string[0] = DROPT_TEXT_LITERAL('\0'); - ss->used = 0; - - dropt_ssresize(ss, default_stringstream_buffer_size); -} - - -/** dropt_ssfinalize - * - * Finalizes a dropt_stringstream; returns the contained string and - * destroys the dropt_stringstream. - * - * PARAMETERS: - * IN/OUT ss : The dropt_stringstream. - * - * RETURNS: - * The dropt_stringstream's string, which is always NUL-terminated. - * Note that the caller assumes ownership of the returned string and - * is responsible for calling free() on it when no longer needed. - */ -dropt_char* -dropt_ssfinalize(dropt_stringstream* ss) -{ - dropt_char* s; - assert(ss != NULL); - - /* Shrink to fit. */ - dropt_ssresize(ss, 0); - - s = ss->string; - ss->string = NULL; - - dropt_ssclose(ss); - - return s; -} - - -/** dropt_ssgetstring - * - * PARAMETERS: - * IN ss : The dropt_stringstream. - * - * RETURNS: - * The dropt_stringstream's string, which is always NUL-terminated. - * The returned string will no longer be valid if further operations - * are performed on the dropt_stringstream or if the - * dropt_stringstream is closed. - */ -const dropt_char* -dropt_ssgetstring(const dropt_stringstream* ss) -{ - assert(ss != NULL); - return ss->string; -} - - -/** dropt_vssprintf - * - * Appends a formatted string with vprintf semantics to a - * dropt_stringstream. - * - * PARAMETERS: - * IN/OUT ss : The dropt_stringstream. - * IN format : printf-style format specifier. Must not be NULL. - * IN args : Arguments to insert into the formatted string. - * - * RETURNS: - * The number of characters written to the dropt_stringstream, - * excluding the NUL-terminator. - * Returns a negative value on error. - */ -int -dropt_vssprintf(dropt_stringstream* ss, const dropt_char* format, va_list args) -{ - int n; - va_list argsCopy; - assert(ss != NULL); - assert(format != NULL); - - va_copy(argsCopy, args); - n = dropt_vsnprintf(NULL, 0, format, argsCopy); - va_end(argsCopy); - - if (n > 0) - { - size_t available = dropt_ssgetfreespace(ss); - if ((unsigned int) n >= available) - { - /* It's possible that newSize < ss->maxSize if - * GROWN_STRINGSTREAM_BUFFER_SIZE overflows, but it should be - * safe since we'll recompute the available space. - */ - size_t newSize = GROWN_STRINGSTREAM_BUFFER_SIZE(ss->maxSize, n); - dropt_ssresize(ss, newSize); - available = dropt_ssgetfreespace(ss); - } - assert(available > 0); /* Space always is reserved for NUL. */ - - /* snprintf's family of functions return the number of characters - * that would be output with a sufficiently large buffer, excluding - * NUL. - */ - n = dropt_vsnprintf(ss->string + ss->used, available, format, args); - - /* We couldn't allocate enough space. */ - if ((unsigned int) n >= available) { n = -1; } - - if (n > 0) { ss->used += n; } - } - return n; -} - - -/** See dropt_vssprintf. */ -int -dropt_ssprintf(dropt_stringstream* ss, const dropt_char* format, ...) -{ - int n; - - va_list args; - va_start(args, format); - n = dropt_vssprintf(ss, format, args); - va_end(args); - - return n; -} -#endif /* DROPT_NO_STRING_BUFFERS */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippbase.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippbase.h deleted file mode 100644 index 532f151c46..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippbase.h +++ /dev/null @@ -1,188 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Basic Types and Macro Definitions -// -// -*/ - - -#ifndef __IPPBASE_H__ -#define __IPPBASE_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined( _WIN32 ) || defined ( _WIN64 ) - #define __STDCALL __stdcall - #define __CDECL __cdecl - #define __INT64 __int64 - #define __UINT64 unsigned __int64 -#else - #define __STDCALL - #define __CDECL - #define __INT64 long long - #define __UINT64 unsigned long long -#endif - -#define IPP_PI ( 3.14159265358979323846 ) /* ANSI C does not support M_PI */ -#define IPP_2PI ( 6.28318530717958647692 ) /* 2*pi */ -#define IPP_PI2 ( 1.57079632679489661923 ) /* pi/2 */ -#define IPP_PI4 ( 0.78539816339744830961 ) /* pi/4 */ -#define IPP_PI180 ( 0.01745329251994329577 ) /* pi/180 */ -#define IPP_RPI ( 0.31830988618379067154 ) /* 1/pi */ -#define IPP_SQRT2 ( 1.41421356237309504880 ) /* sqrt(2) */ -#define IPP_SQRT3 ( 1.73205080756887729353 ) /* sqrt(3) */ -#define IPP_LN2 ( 0.69314718055994530942 ) /* ln(2) */ -#define IPP_LN3 ( 1.09861228866810969139 ) /* ln(3) */ -#define IPP_E ( 2.71828182845904523536 ) /* e */ -#define IPP_RE ( 0.36787944117144232159 ) /* 1/e */ -#define IPP_EPS23 ( 1.19209289e-07f ) -#define IPP_EPS52 ( 2.2204460492503131e-016 ) - -#define IPP_MAX_8U ( 0xFF ) -#define IPP_MAX_16U ( 0xFFFF ) -#define IPP_MAX_32U ( 0xFFFFFFFF ) -#define IPP_MIN_8U ( 0 ) -#define IPP_MIN_16U ( 0 ) -#define IPP_MIN_32U ( 0 ) -#define IPP_MIN_8S (-128 ) -#define IPP_MAX_8S ( 127 ) -#define IPP_MIN_16S (-32768 ) -#define IPP_MAX_16S ( 32767 ) -#define IPP_MIN_32S (-2147483647 - 1 ) -#define IPP_MAX_32S ( 2147483647 ) -#define IPP_MIN_64U ( 0 ) - -#if defined( _WIN32 ) || defined ( _WIN64 ) - #define IPP_MAX_64S ( 9223372036854775807i64 ) - #define IPP_MIN_64S (-9223372036854775807i64 - 1 ) - #define IPP_MAX_64U ( 0xffffffffffffffffL ) /* 18446744073709551615 */ -#else - #define IPP_MAX_64S ( 9223372036854775807LL ) - #define IPP_MIN_64S (-9223372036854775807LL - 1 ) - #define IPP_MAX_64U ( 0xffffffffffffffffLL ) /* 18446744073709551615 */ -#endif - -#define IPP_MINABS_32F ( 1.175494351e-38f ) -#define IPP_MAXABS_32F ( 3.402823466e+38f ) -#define IPP_EPS_32F ( 1.192092890e-07f ) -#define IPP_MINABS_64F ( 2.2250738585072014e-308 ) -#define IPP_MAXABS_64F ( 1.7976931348623158e+308 ) -#define IPP_EPS_64F ( 2.2204460492503131e-016 ) - -#define IPP_MAX( a, b ) ( ((a) > (b)) ? (a) : (b) ) -#define IPP_MIN( a, b ) ( ((a) < (b)) ? (a) : (b) ) - -#define IPP_ABS( a ) ( ((a) < 0) ? (-(a)) : (a) ) - -typedef struct { - int major; /* e.g. 1 */ - int minor; /* e.g. 2 */ - int majorBuild; /* e.g. 3 */ - int build; /* e.g. 10, always >= majorBuild */ - char targetCpu[4]; /* corresponding to Intel(R) processor */ - const char* Name; /* e.g. "ippsw7" */ - const char* Version; /* e.g. "v1.2 Beta" */ - const char* BuildDate; /* e.g. "Jul 20 99" */ -} IppLibraryVersion; - -typedef unsigned char Ipp8u; -typedef unsigned short Ipp16u; -typedef unsigned int Ipp32u; -typedef signed char Ipp8s; -typedef signed short Ipp16s; -typedef signed int Ipp32s; -typedef float Ipp32f; -typedef __INT64 Ipp64s; -typedef __UINT64 Ipp64u; -typedef double Ipp64f; -typedef Ipp16s Ipp16f; - -typedef struct { - Ipp8s re; - Ipp8s im; -} Ipp8sc; - -typedef struct { - Ipp16s re; - Ipp16s im; -} Ipp16sc; - -typedef struct { - Ipp16u re; - Ipp16u im; -} Ipp16uc; - -typedef struct { - Ipp32s re; - Ipp32s im; -} Ipp32sc; - -typedef struct { - Ipp32f re; - Ipp32f im; -} Ipp32fc; - -typedef struct { - Ipp64s re; - Ipp64s im; -} Ipp64sc; - -typedef struct { - Ipp64f re; - Ipp64f im; -} Ipp64fc; - -typedef enum { - ippUndef = -1, - ipp1u = 0, - ipp8u = 1, - ipp8uc = 2, - ipp8s = 3, - ipp8sc = 4, - ipp16u = 5, - ipp16uc = 6, - ipp16s = 7, - ipp16sc = 8, - ipp32u = 9, - ipp32uc = 10, - ipp32s = 11, - ipp32sc = 12, - ipp32f = 13, - ipp32fc = 14, - ipp64u = 15, - ipp64uc = 16, - ipp64s = 17, - ipp64sc = 18, - ipp64f = 19, - ipp64fc = 20 -} IppDataType; - -typedef enum { - ippFalse = 0, - ippTrue = 1 -} IppBool; - -#ifdef __cplusplus -} -#endif - -#endif /* __IPPBASE_H__ */ - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcp.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcp.h deleted file mode 100644 index a571c229a2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcp.h +++ /dev/null @@ -1,860 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippCP) -// -// -*/ - -#if !defined( __IPPCP_H__ ) || defined( _OWN_BLDPCS ) -#define __IPPCP_H__ - - -#if defined (_WIN32_WCE) && defined (_M_IX86) && defined (__stdcall) - #define _IPP_STDCALL_CDECL - #undef __stdcall -#endif - - -#ifndef __IPPDEFS_H__ - #include "ippdefs.h" -#endif - -#ifndef __IPPCPDEFS_H__ - #include "ippcpdefs.h" -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined( _IPP_NO_DEFAULT_LIB ) - #if defined( _IPP_SEQUENTIAL_DYNAMIC ) - #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "ippcp" ) - #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "ippcore" ) - #elif defined( _IPP_SEQUENTIAL_STATIC ) - #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "ippcpmt" ) - #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "ippcoremt" ) - #elif defined( _IPP_PARALLEL_DYNAMIC ) - #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "threaded/ippcp" ) - #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "threaded/ippcore" ) - #elif defined( _IPP_PARALLEL_STATIC ) - #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "threaded/ippcpmt" ) - #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "threaded/ippcoremt" ) - #endif -#endif - - -/* ///////////////////////////////////////////////////////////////////////////// -// Name: ippcpGetLibVersion -// Purpose: getting of the library version -// Returns: the structure of information about version of ippCP library -// Parameters: -// -// Notes: not necessary to release the returned structure -*/ -IPPAPI( const IppLibraryVersion*, ippcpGetLibVersion, (void) ) - - - -/* -// ========================================================= -// Symmetric Ciphers -// ========================================================= -*/ - -/* TDES */ -IPPAPI(IppStatus, ippsDESGetSize,(int *size)) -IPPAPI(IppStatus, ippsDESInit,(const Ipp8u* pKey, IppsDESSpec* pCtx)) - -IPPAPI(IppStatus, ippsDESPack,(const IppsDESSpec* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsDESUnpack,(const Ipp8u* pBuffer, IppsDESSpec* pCtx)) - -IPPAPI(IppStatus, ippsTDESEncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int length, - const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3, - IppsCPPadding padding)) -IPPAPI(IppStatus, ippsTDESDecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int length, - const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3, - IppsCPPadding padding)) - -IPPAPI(IppStatus, ippsTDESEncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int length, - const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3, - const Ipp8u* pIV, - IppsCPPadding padding)) -IPPAPI(IppStatus, ippsTDESDecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int length, - const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3, - const Ipp8u* pIV, - IppsCPPadding padding)) - -IPPAPI(IppStatus, ippsTDESEncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int length, int cfbBlkSize, - const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3, - const Ipp8u* pIV, - IppsCPPadding padding)) -IPPAPI(IppStatus, ippsTDESDecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int length, int cfbBlkSize, - const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3, - const Ipp8u* pIV, - IppsCPPadding padding)) - -IPPAPI(IppStatus, ippsTDESEncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize, - const IppsDESSpec* pCtx1, - const IppsDESSpec* pCtx2, - const IppsDESSpec* pCtx3, - Ipp8u* pIV)) -IPPAPI(IppStatus, ippsTDESDecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize, - const IppsDESSpec* pCtx1, - const IppsDESSpec* pCtx2, - const IppsDESSpec* pCtx3, - Ipp8u* pIV)) - -IPPAPI(IppStatus, ippsTDESEncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsDESSpec* pCtx1, - const IppsDESSpec* pCtx2, - const IppsDESSpec* pCtx3, - Ipp8u* pCtrValue, int ctrNumBitSize)) -IPPAPI(IppStatus, ippsTDESDecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsDESSpec* pCtx1, - const IppsDESSpec* pCtx2, - const IppsDESSpec* pCtx3, - Ipp8u* pCtrValue, int ctrNumBitSize)) - -/* AES */ -IPPAPI(IppStatus, ippsAESGetSize,(int *pSize)) -IPPAPI(IppStatus, ippsAESInit,(const Ipp8u* pKey, int keyLen, IppsAESSpec* pCtx, int ctxSize)) -IPPAPI(IppStatus, ippsAESSetKey,(const Ipp8u* pKey, int keyLen, IppsAESSpec* pCtx)) - -IPPAPI(IppStatus, ippsAESPack,(const IppsAESSpec* pCtx, Ipp8u* pBuffer, int buffSize)) -IPPAPI(IppStatus, ippsAESUnpack,(const Ipp8u* pBuffer, IppsAESSpec* pCtx, int ctxSize)) - -IPPAPI(IppStatus, ippsAESEncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsAESSpec* pCtx)) -IPPAPI(IppStatus, ippsAESDecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsAESSpec* pCtx)) - -IPPAPI(IppStatus, ippsAESEncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsAESSpec* pCtx, - const Ipp8u* pIV)) -IPPAPI(IppStatus, ippsAESDecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsAESSpec* pCtx, - const Ipp8u* pIV)) - -IPPAPI(IppStatus, ippsAESEncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize, - const IppsAESSpec* pCtx, - const Ipp8u* pIV)) -IPPAPI(IppStatus, ippsAESDecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize, - const IppsAESSpec* pCtx, - const Ipp8u* pIV)) - -IPPAPI(IppStatus, ippsAESEncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize, - const IppsAESSpec* pCtx, - Ipp8u* pIV)) -IPPAPI(IppStatus, ippsAESDecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize, - const IppsAESSpec* pCtx, - Ipp8u* pIV)) - -IPPAPI(IppStatus, ippsAESEncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsAESSpec* pCtx, - Ipp8u* pCtrValue, int ctrNumBitSize)) -IPPAPI(IppStatus, ippsAESDecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsAESSpec* pCtx, - Ipp8u* pCtrValue, int ctrNumBitSize)) - -/* SMS4 */ -IPPAPI(IppStatus, ippsSMS4GetSize,(int *pSize)) -IPPAPI(IppStatus, ippsSMS4Init,(const Ipp8u* pKey, int keyLen, IppsSMS4Spec* pCtx, int ctxSize)) -IPPAPI(IppStatus, ippsSMS4SetKey,(const Ipp8u* pKey, int keyLen, IppsSMS4Spec* pCtx)) - -IPPAPI(IppStatus, ippsSMS4EncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsSMS4Spec* pCtx)) -IPPAPI(IppStatus, ippsSMS4DecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsSMS4Spec* pCtx)) - -IPPAPI(IppStatus, ippsSMS4EncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsSMS4Spec* pCtx, - const Ipp8u* pIV)) -IPPAPI(IppStatus, ippsSMS4DecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsSMS4Spec* pCtx, - const Ipp8u* pIV)) - -IPPAPI(IppStatus, ippsSMS4EncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize, - const IppsSMS4Spec* pCtx, - const Ipp8u* pIV)) -IPPAPI(IppStatus, ippsSMS4DecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize, - const IppsSMS4Spec* pCtx, - const Ipp8u* pIV)) - -IPPAPI(IppStatus, ippsSMS4EncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize, - const IppsSMS4Spec* pCtx, - Ipp8u* pIV)) -IPPAPI(IppStatus, ippsSMS4DecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize, - const IppsSMS4Spec* pCtx, - Ipp8u* pIV)) - -IPPAPI(IppStatus, ippsSMS4EncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsSMS4Spec* pCtx, - Ipp8u* pCtrValue, int ctrNumBitSize)) -IPPAPI(IppStatus, ippsSMS4DecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len, - const IppsSMS4Spec* pCtx, - Ipp8u* pCtrValue, int ctrNumBitSize)) - - -/* -// ========================================================= -// AES based authentication & confidence Primitives -// ========================================================= -*/ - -/* -// AES-CCM -*/ -IPPAPI(IppStatus, ippsAES_CCMGetSize,(int* pSize)) -IPPAPI(IppStatus, ippsAES_CCMInit,(const Ipp8u* pKey, int keyLen, IppsAES_CCMState* pCtx, int ctxSize)) - -IPPAPI(IppStatus, ippsAES_CCMMessageLen,(Ipp64u msgLen, IppsAES_CCMState* pCtx)) -IPPAPI(IppStatus, ippsAES_CCMTagLen,(int tagLen, IppsAES_CCMState* pCtx)) - -IPPAPI(IppStatus, ippsAES_CCMStart,(const Ipp8u* pIV, int ivLen, const Ipp8u* pAD, int adLen, IppsAES_CCMState* pCtx)) -IPPAPI(IppStatus, ippsAES_CCMEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_CCMState* pCtx)) -IPPAPI(IppStatus, ippsAES_CCMDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_CCMState* pCtx)) -IPPAPI(IppStatus, ippsAES_CCMGetTag,(Ipp8u* pTag, int tagLen, const IppsAES_CCMState* pCtx)) - -/* -// AES-GCM -*/ -IPPAPI(IppStatus, ippsAES_GCMGetSize,(int * pSize)) -IPPAPI(IppStatus, ippsAES_GCMInit,(const Ipp8u* pKey, int keyLen, IppsAES_GCMState* pState, int ctxSize)) - -IPPAPI(IppStatus, ippsAES_GCMReset,(IppsAES_GCMState* pState)) -IPPAPI(IppStatus, ippsAES_GCMProcessIV,(const Ipp8u* pIV, int ivLen, - IppsAES_GCMState* pState)) -IPPAPI(IppStatus, ippsAES_GCMProcessAAD,(const Ipp8u* pAAD, int ivAAD, - IppsAES_GCMState* pState)) -IPPAPI(IppStatus, ippsAES_GCMStart,(const Ipp8u* pIV, int ivLen, - const Ipp8u* pAAD, int aadLen, - IppsAES_GCMState* pState)) -IPPAPI(IppStatus, ippsAES_GCMEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_GCMState* pState)) -IPPAPI(IppStatus, ippsAES_GCMDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_GCMState* pState)) -IPPAPI(IppStatus, ippsAES_GCMGetTag,(Ipp8u* pDstTag, int tagLen, const IppsAES_GCMState* pState)) - -/* -// AES-CMAC -*/ -IPPAPI(IppStatus, ippsAES_CMACGetSize,(int* pSize)) -IPPAPI(IppStatus, ippsAES_CMACInit,(const Ipp8u* pKey, int keyLen, IppsAES_CMACState* pState, int ctxSize)) - -IPPAPI(IppStatus, ippsAES_CMACUpdate,(const Ipp8u* pSrc, int len, IppsAES_CMACState* pState)) -IPPAPI(IppStatus, ippsAES_CMACFinal,(Ipp8u* pMD, int mdLen, IppsAES_CMACState* pState)) -IPPAPI(IppStatus, ippsAES_CMACGetTag,(Ipp8u* pMD, int mdLen, const IppsAES_CMACState* pState)) - -/* -// ========================================================= -// RC4 Stream Ciphers -// ========================================================= -*/ -IPPAPI(IppStatus, ippsARCFourCheckKey, (const Ipp8u *pKey, int keyLen, IppBool* pIsWeak)) - -IPPAPI(IppStatus, ippsARCFourGetSize, (int* pSize)) -IPPAPI(IppStatus, ippsARCFourInit, (const Ipp8u *pKey, int keyLen, IppsARCFourState *pCtx)) -IPPAPI(IppStatus, ippsARCFourReset, (IppsARCFourState* pCtx)) - -IPPAPI(IppStatus, ippsARCFourPack,(const IppsARCFourState* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsARCFourUnpack,(const Ipp8u* pBuffer, IppsARCFourState* pCtx)) - -IPPAPI(IppStatus, ippsARCFourEncrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int length, IppsARCFourState *pCtx)) -IPPAPI(IppStatus, ippsARCFourDecrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int length, IppsARCFourState *pCtx)) - - -/* -// ========================================================= -// One-Way Hash Functions -// ========================================================= -*/ -/* SHA1 Hash Primitives */ -IPPAPI(IppStatus, ippsSHA1GetSize,(int* pSize)) -IPPAPI(IppStatus, ippsSHA1Init,(IppsSHA1State* pCtx)) -IPPAPI(IppStatus, ippsSHA1Duplicate,(const IppsSHA1State* pSrcCtx, IppsSHA1State* pDstCtx)) - -IPPAPI(IppStatus, ippsSHA1Pack,(const IppsSHA1State* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsSHA1Unpack,(const Ipp8u* pBuffer, IppsSHA1State* pCtx)) - -IPPAPI(IppStatus, ippsSHA1Update,(const Ipp8u* pSrc, int len, IppsSHA1State* pCtx)) -IPPAPI(IppStatus, ippsSHA1GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA1State* pCtx)) -IPPAPI(IppStatus, ippsSHA1Final,(Ipp8u* pMD, IppsSHA1State* pCtx)) -IPPAPI(IppStatus, ippsSHA1MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD)) - -/* SHA224 Hash Primitives */ -IPPAPI(IppStatus, ippsSHA224GetSize,(int* pSize)) -IPPAPI(IppStatus, ippsSHA224Init,(IppsSHA224State* pCtx)) -IPPAPI(IppStatus, ippsSHA224Duplicate,(const IppsSHA224State* pSrcCtx, IppsSHA224State* pDstCtx)) - -IPPAPI(IppStatus, ippsSHA224Pack,(const IppsSHA224State* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsSHA224Unpack,(const Ipp8u* pBuffer, IppsSHA224State* pCtx)) - -IPPAPI(IppStatus, ippsSHA224Update,(const Ipp8u* pSrc, int len, IppsSHA224State* pCtx)) -IPPAPI(IppStatus, ippsSHA224GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA224State* pCtx)) -IPPAPI(IppStatus, ippsSHA224Final,(Ipp8u* pMD, IppsSHA224State* pCtx)) -IPPAPI(IppStatus, ippsSHA224MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD)) - -/* SHA256 Hash Primitives */ -IPPAPI(IppStatus, ippsSHA256GetSize,(int* pSize)) -IPPAPI(IppStatus, ippsSHA256Init,(IppsSHA256State* pCtx)) -IPPAPI(IppStatus, ippsSHA256Duplicate,(const IppsSHA256State* pSrcCtx, IppsSHA256State* pDstCtx)) - -IPPAPI(IppStatus, ippsSHA256Pack,(const IppsSHA256State* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsSHA256Unpack,(const Ipp8u* pBuffer, IppsSHA256State* pCtx)) - -IPPAPI(IppStatus, ippsSHA256Update,(const Ipp8u* pSrc, int len, IppsSHA256State* pCtx)) -IPPAPI(IppStatus, ippsSHA256GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA256State* pCtx)) -IPPAPI(IppStatus, ippsSHA256Final,(Ipp8u* pMD, IppsSHA256State* pCtx)) -IPPAPI(IppStatus, ippsSHA256MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD)) - -/* SHA384 Hash Primitives */ -IPPAPI(IppStatus, ippsSHA384GetSize,(int* pSize)) -IPPAPI(IppStatus, ippsSHA384Init,(IppsSHA384State* pCtx)) -IPPAPI(IppStatus, ippsSHA384Duplicate,(const IppsSHA384State* pSrcCtx, IppsSHA384State* pDstCtx)) - -IPPAPI(IppStatus, ippsSHA384Pack,(const IppsSHA384State* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsSHA384Unpack,(const Ipp8u* pBuffer, IppsSHA384State* pCtx)) - -IPPAPI(IppStatus, ippsSHA384Update,(const Ipp8u* pSrc, int len, IppsSHA384State* pCtx)) -IPPAPI(IppStatus, ippsSHA384GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA384State* pCtx)) -IPPAPI(IppStatus, ippsSHA384Final,(Ipp8u* pMD, IppsSHA384State* pCtx)) -IPPAPI(IppStatus, ippsSHA384MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD)) - -/* SHA512 Hash Primitives */ -IPPAPI(IppStatus, ippsSHA512GetSize,(int* pSize)) -IPPAPI(IppStatus, ippsSHA512Init,(IppsSHA512State* pCtx)) -IPPAPI(IppStatus, ippsSHA512Duplicate,(const IppsSHA512State* pSrcCtx, IppsSHA512State* pDstCtx)) - -IPPAPI(IppStatus, ippsSHA512Pack,(const IppsSHA512State* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsSHA512Unpack,(const Ipp8u* pBuffer, IppsSHA512State* pCtx)) - -IPPAPI(IppStatus, ippsSHA512Update,(const Ipp8u* pSrc, int len, IppsSHA512State* pCtx)) -IPPAPI(IppStatus, ippsSHA512GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA512State* pCtx)) -IPPAPI(IppStatus, ippsSHA512Final,(Ipp8u* pMD, IppsSHA512State* pCtx)) -IPPAPI(IppStatus, ippsSHA512MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD)) - -/* MD5 Hash Primitives */ -IPPAPI(IppStatus, ippsMD5GetSize,(int* pSize)) -IPPAPI(IppStatus, ippsMD5Init,(IppsMD5State* pCtx)) -IPPAPI(IppStatus, ippsMD5Duplicate,(const IppsMD5State* pSrcCtx, IppsMD5State* pDstCtx)) - -IPPAPI(IppStatus, ippsMD5Pack,(const IppsMD5State* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsMD5Unpack,(const Ipp8u* pBuffer, IppsMD5State* pCtx)) - -IPPAPI(IppStatus, ippsMD5Update,(const Ipp8u* pSrc, int len, IppsMD5State* pCtx)) -IPPAPI(IppStatus, ippsMD5GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsMD5State* pCtx)) -IPPAPI(IppStatus, ippsMD5Final,(Ipp8u* pMD, IppsMD5State* pCtx)) -IPPAPI(IppStatus, ippsMD5MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD)) - -/* SM3 Hash Primitives */ -IPPAPI(IppStatus, ippsSM3GetSize,(int* pSize)) -IPPAPI(IppStatus, ippsSM3Init,(IppsSM3State* pCtx)) -IPPAPI(IppStatus, ippsSM3Duplicate,(const IppsSM3State* pSrcCtx, IppsSM3State* pDstCtx)) - -IPPAPI(IppStatus, ippsSM3Pack,(const IppsSM3State* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsSM3Unpack,(const Ipp8u* pBuffer, IppsSM3State* pCtx)) - -IPPAPI(IppStatus, ippsSM3Update,(const Ipp8u* pSrc, int len, IppsSM3State* pCtx)) -IPPAPI(IppStatus, ippsSM3GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSM3State* pCtx)) -IPPAPI(IppStatus, ippsSM3Final,(Ipp8u* pMD, IppsSM3State* pCtx)) -IPPAPI(IppStatus, ippsSM3MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD)) - -/* generalized Hash Primitives */ -IPPAPI(IppStatus, ippsHashGetSize,(int* pSize)) -IPPAPI(IppStatus, ippsHashInit,(IppsHashState* pCtx, IppHashAlgId hashAlg)) - -IPPAPI(IppStatus, ippsHashPack,(const IppsHashState* pCtx, Ipp8u* pBuffer, int bufSize)) -IPPAPI(IppStatus, ippsHashUnpack,(const Ipp8u* pBuffer, IppsHashState* pCtx)) -IPPAPI(IppStatus, ippsHashDuplicate,(const IppsHashState* pSrcCtx, IppsHashState* pDstCtx)) - -IPPAPI(IppStatus, ippsHashUpdate,(const Ipp8u* pSrc, int len, IppsHashState* pCtx)) -IPPAPI(IppStatus, ippsHashGetTag,(Ipp8u* pMD, int tagLen, const IppsHashState* pCtx)) -IPPAPI(IppStatus, ippsHashFinal,(Ipp8u* pMD, IppsHashState* pCtx)) -IPPAPI(IppStatus, ippsHashMessage,(const Ipp8u* pMsg, int len, Ipp8u* pMD, IppHashAlgId hashAlg)) - -/* general MGF Primitives*/ -IPPAPI(IppStatus, ippsMGF,(const Ipp8u* pSeed, int seedLen, Ipp8u* pMask, int maskLen, IppHashAlgId hashAlg)) - - -/* -// ========================================================= -// Keyed-Hash Message Authentication Codes -// ========================================================= -*/ -IPPAPI(IppStatus, ippsHMAC_GetSize,(int* pSize)) -IPPAPI(IppStatus, ippsHMAC_Init,(const Ipp8u* pKey, int keyLen, IppsHMACState* pCtx, IppHashAlgId hashAlg)) - -IPPAPI(IppStatus, ippsHMAC_Pack,(const IppsHMACState* pCtx, Ipp8u* pBuffer, int bufSize)) -IPPAPI(IppStatus, ippsHMAC_Unpack,(const Ipp8u* pBuffer, IppsHMACState* pCtx)) -IPPAPI(IppStatus, ippsHMAC_Duplicate,(const IppsHMACState* pSrcCtx, IppsHMACState* pDstCtx)) - -IPPAPI(IppStatus, ippsHMAC_Update,(const Ipp8u* pSrc, int len, IppsHMACState* pCtx)) -IPPAPI(IppStatus, ippsHMAC_Final,(Ipp8u* pMD, int mdLen, IppsHMACState* pCtx)) -IPPAPI(IppStatus, ippsHMAC_GetTag,(Ipp8u* pMD, int mdLen, const IppsHMACState* pCtx)) -IPPAPI(IppStatus, ippsHMAC_Message,(const Ipp8u* pMsg, int msgLen, - const Ipp8u* pKey, int keyLen, - Ipp8u* pMD, int mdLen, - IppHashAlgId hashAlg)) - - -/* -// ========================================================= -// Big Number Integer Arithmetic -// ========================================================= -*/ - -/* Signed BigNum Operations */ -IPPAPI(IppStatus, ippsBigNumGetSize,(int length, int* pSize)) -IPPAPI(IppStatus, ippsBigNumInit,(int length, IppsBigNumState* pBN)) - -IPPAPI(IppStatus, ippsCmpZero_BN,(const IppsBigNumState* pBN, Ipp32u* pResult)) -IPPAPI(IppStatus, ippsCmp_BN,(const IppsBigNumState* pA, const IppsBigNumState* pB, Ipp32u* pResult)) - -IPPAPI(IppStatus, ippsGetSize_BN,(const IppsBigNumState* pBN, int* pSize)) -IPPAPI(IppStatus, ippsSet_BN,(IppsBigNumSGN sgn, - int length, const Ipp32u* pData, - IppsBigNumState* pBN)) -IPPAPI(IppStatus, ippsGet_BN,(IppsBigNumSGN* pSgn, - int* pLength, Ipp32u* pData, - const IppsBigNumState* pBN)) -IPPAPI(IppStatus, ippsRef_BN,(IppsBigNumSGN* pSgn, int* bitSize, Ipp32u** const ppData, - const IppsBigNumState* pBN)) -IPPAPI(IppStatus, ippsExtGet_BN,(IppsBigNumSGN* pSgn, - int* pBitSize, Ipp32u* pData, - const IppsBigNumState* pBN)) - -IPPAPI(IppStatus, ippsAdd_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR)) -IPPAPI(IppStatus, ippsSub_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR)) -IPPAPI(IppStatus, ippsMul_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR)) -IPPAPI(IppStatus, ippsMAC_BN_I, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR)) -IPPAPI(IppStatus, ippsDiv_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pQ, IppsBigNumState* pR)) -IPPAPI(IppStatus, ippsMod_BN, (IppsBigNumState* pA, IppsBigNumState* pM, IppsBigNumState* pR)) -IPPAPI(IppStatus, ippsGcd_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pGCD)) -IPPAPI(IppStatus, ippsModInv_BN,(IppsBigNumState* pA, IppsBigNumState* pM, IppsBigNumState* pInv)) - -IPPAPI(IppStatus, ippsSetOctString_BN,(const Ipp8u* pStr, int strLen, IppsBigNumState* pBN)) -IPPAPI(IppStatus, ippsGetOctString_BN,(Ipp8u* pStr, int strLen, const IppsBigNumState* pBN)) - -/* Montgomery Operations */ -IPPAPI(IppStatus, ippsMontGetSize,(IppsExpMethod method, int length, int* pSize)) -IPPAPI(IppStatus, ippsMontInit,(IppsExpMethod method, int length, IppsMontState* pCtx)) - -IPPAPI(IppStatus, ippsMontSet,(const Ipp32u* pModulo, int size, IppsMontState* pCtx)) -IPPAPI(IppStatus, ippsMontGet,(Ipp32u* pModulo, int* pSize, const IppsMontState* pCtx)) - -IPPAPI(IppStatus, ippsMontForm,(const IppsBigNumState* pA, IppsMontState* pCtx, IppsBigNumState* pR)) -IPPAPI(IppStatus, ippsMontMul, (const IppsBigNumState* pA, const IppsBigNumState* pB, IppsMontState* m, IppsBigNumState* pR)) -IPPAPI(IppStatus, ippsMontExp, (const IppsBigNumState* pA, const IppsBigNumState* pE, IppsMontState* m, IppsBigNumState* pR)) - -/* Pseudo-Random Number Generation */ -IPPAPI(IppStatus, ippsPRNGGetSize,(int* pSize)) -IPPAPI(IppStatus, ippsPRNGInit, (int seedBits, IppsPRNGState* pCtx)) - -IPPAPI(IppStatus, ippsPRNGSetModulus,(const IppsBigNumState* pMod, IppsPRNGState* pCtx)) -IPPAPI(IppStatus, ippsPRNGSetH0, (const IppsBigNumState* pH0, IppsPRNGState* pCtx)) -IPPAPI(IppStatus, ippsPRNGSetAugment,(const IppsBigNumState* pAug, IppsPRNGState* pCtx)) -IPPAPI(IppStatus, ippsPRNGSetSeed, (const IppsBigNumState* pSeed,IppsPRNGState* pCtx)) -IPPAPI(IppStatus, ippsPRNGGetSeed, (const IppsPRNGState* pCtx,IppsBigNumState* pSeed)) - -IPPAPI(IppStatus, ippsPRNGen, (Ipp32u* pRand, int nBits, void* pCtx)) -IPPAPI(IppStatus, ippsPRNGen_BN, (IppsBigNumState* pRand, int nBits, void* pCtx)) -IPPAPI(IppStatus, ippsPRNGenRDRAND, (Ipp32u* pRand, int nBits, void* pCtx)) -IPPAPI(IppStatus, ippsPRNGenRDRAND_BN,(IppsBigNumState* pRand, int nBits, void* pCtx)) -IPPAPI(IppStatus, ippsTRNGenRDSEED, (Ipp32u* pRand, int nBits, void* pCtx)) -IPPAPI(IppStatus, ippsTRNGenRDSEED_BN,(IppsBigNumState* pRand, int nBits, void* pCtx)) - -/* Probable Prime Number Generation */ -IPPAPI(IppStatus, ippsPrimeGetSize,(int nMaxBits, int* pSize)) -IPPAPI(IppStatus, ippsPrimeInit, (int nMaxBits, IppsPrimeState* pCtx)) - -IPPAPI(IppStatus, ippsPrimeGen, (int nBits, int nTrials, IppsPrimeState* pCtx, - IppBitSupplier rndFunc, void* pRndParam)) -IPPAPI(IppStatus, ippsPrimeTest,(int nTrials, Ipp32u* pResult, IppsPrimeState* pCtx, - IppBitSupplier rndFunc, void* pRndParam)) -IPPAPI(IppStatus, ippsPrimeGen_BN,(IppsBigNumState* pPrime, int nBits, int nTrials, IppsPrimeState* pCtx, - IppBitSupplier rndFunc, void* pRndParam)) -IPPAPI(IppStatus, ippsPrimeTest_BN,(const IppsBigNumState* pPrime, int nTrials, Ipp32u* pResult, IppsPrimeState* pCtx, - IppBitSupplier rndFunc, void* pRndParam)) - -IPPAPI(IppStatus, ippsPrimeGet, (Ipp32u* pPrime, int* pLen, const IppsPrimeState* pCtx)) -IPPAPI(IppStatus, ippsPrimeGet_BN,(IppsBigNumState* pPrime, const IppsPrimeState* pCtx)) - -IPPAPI(IppStatus, ippsPrimeSet, (const Ipp32u* pPrime, int nBits, IppsPrimeState* pCtx)) -IPPAPI(IppStatus, ippsPrimeSet_BN,(const IppsBigNumState* pPrime, IppsPrimeState* pCtx)) - - -/* -// ========================================================= -// RSA Cryptography -// ========================================================= -*/ -IPPAPI(IppStatus, ippsRSA_GetSizePublicKey,(int rsaModulusBitSize, int pubicExpBitSize, int* pKeySize)) -IPPAPI(IppStatus, ippsRSA_InitPublicKey,(int rsaModulusBitSize, int publicExpBitSize, - IppsRSAPublicKeyState* pKey, int keyCtxSize)) -IPPAPI(IppStatus, ippsRSA_SetPublicKey,(const IppsBigNumState* pModulus, - const IppsBigNumState* pPublicExp, - IppsRSAPublicKeyState* pKey)) -IPPAPI(IppStatus, ippsRSA_GetPublicKey,(IppsBigNumState* pModulus, - IppsBigNumState* pPublicExp, - const IppsRSAPublicKeyState* pKey)) - -IPPAPI(IppStatus, ippsRSA_GetSizePrivateKeyType1,(int rsaModulusBitSize, int privateExpBitSize, int* pKeySize)) -IPPAPI(IppStatus, ippsRSA_InitPrivateKeyType1,(int rsaModulusBitSize, int privateExpBitSize, - IppsRSAPrivateKeyState* pKey, int keyCtxSize)) -IPPAPI(IppStatus, ippsRSA_SetPrivateKeyType1,(const IppsBigNumState* pModulus, - const IppsBigNumState* pPrivateExp, - IppsRSAPrivateKeyState* pKey)) -IPPAPI(IppStatus, ippsRSA_GetPrivateKeyType1,(IppsBigNumState* pModulus, - IppsBigNumState* pPrivateExp, - const IppsRSAPrivateKeyState* pKey)) - -IPPAPI(IppStatus, ippsRSA_GetSizePrivateKeyType2,(int factorPbitSize, int factorQbitSize, int* pKeySize)) -IPPAPI(IppStatus, ippsRSA_InitPrivateKeyType2,(int factorPbitSize, int factorQbitSize, - IppsRSAPrivateKeyState* pKey, int keyCtxSize)) -IPPAPI(IppStatus, ippsRSA_SetPrivateKeyType2,(const IppsBigNumState* pFactorP, - const IppsBigNumState* pFactorQ, - const IppsBigNumState* pCrtExpP, - const IppsBigNumState* pCrtExpQ, - const IppsBigNumState* pInverseQ, - IppsRSAPrivateKeyState* pKey)) -IPPAPI(IppStatus, ippsRSA_GetPrivateKeyType2,(IppsBigNumState* pFactorP, - IppsBigNumState* pFactorQ, - IppsBigNumState* pCrtExpP, - IppsBigNumState* pCrtExpQ, - IppsBigNumState* pInverseQ, - const IppsRSAPrivateKeyState* pKey)) - -IPPAPI(IppStatus, ippsRSA_GetBufferSizePublicKey,(int* pBufferSize, const IppsRSAPublicKeyState* pKey)) -IPPAPI(IppStatus, ippsRSA_GetBufferSizePrivateKey,(int* pBufferSize, const IppsRSAPrivateKeyState* pKey)) - -IPPAPI(IppStatus, ippsRSA_Encrypt,(const IppsBigNumState* pPtxt, - IppsBigNumState* pCtxt, - const IppsRSAPublicKeyState* pKey, - Ipp8u* pScratchBuffer)) -IPPAPI(IppStatus, ippsRSA_Decrypt,(const IppsBigNumState* pCtxt, - IppsBigNumState* pPtxt, - const IppsRSAPrivateKeyState* pKey, - Ipp8u* pScratchBuffer)) - -IPPAPI(IppStatus, ippsRSA_GenerateKeys,(const IppsBigNumState* pSrcPublicExp, - IppsBigNumState* pModulus, - IppsBigNumState* pPublicExp, - IppsBigNumState* pPrivateExp, - IppsRSAPrivateKeyState* pPrivateKeyType2, - Ipp8u* pScratchBuffer, - int nTrials, - IppsPrimeState* pPrimeGen, - IppBitSupplier rndFunc, void* pRndParam)) - -IPPAPI(IppStatus, ippsRSA_ValidateKeys,(int* pResult, - const IppsRSAPublicKeyState* pPublicKey, - const IppsRSAPrivateKeyState* pPrivateKeyType2, - const IppsRSAPrivateKeyState* pPrivateKeyType1, - Ipp8u* pScratchBuffer, - int nTrials, - IppsPrimeState* pPrimeGen, - IppBitSupplier rndFunc, void* pRndParam)) - -/* encryption scheme: RSAES-OAEP */ -IPPAPI(IppStatus, ippsRSAEncrypt_OAEP,(const Ipp8u* pSrc, int srcLen, - const Ipp8u* pLabel, int labLen, - const Ipp8u* pSeed, - Ipp8u* pDst, - const IppsRSAPublicKeyState* pKey, - IppHashAlgId hashAlg, - Ipp8u* pBuffer)) - -IPPAPI(IppStatus, ippsRSADecrypt_OAEP,(const Ipp8u* pSrc, - const Ipp8u* pLab, int labLen, - Ipp8u* pDst, int* pDstLen, - const IppsRSAPrivateKeyState* pKey, - IppHashAlgId hashAlg, - Ipp8u* pBuffer)) - -/* encryption scheme: RSAES-PKCS_v1_5 */ -IPPAPI(IppStatus, ippsRSAEncrypt_PKCSv15,(const Ipp8u* pSrc, int srcLen, - const Ipp8u* pRndPS, - Ipp8u* pDst, - const IppsRSAPublicKeyState* pKey, - Ipp8u* pBuffer)) - -IPPAPI(IppStatus, ippsRSADecrypt_PKCSv15,(const Ipp8u* pSrc, - Ipp8u* pDst, int* pDstLen, - const IppsRSAPrivateKeyState* pKey, - Ipp8u* pBuffer)) - - -/* signature scheme : RSA-SSA-PSS */ -IPPAPI(IppStatus, ippsRSASign_PSS,(const Ipp8u* pMsg, int msgLen, - const Ipp8u* pSalt, int saltLen, - Ipp8u* pSign, - const IppsRSAPrivateKeyState* pPrvKey, - const IppsRSAPublicKeyState* pPubKey, - IppHashAlgId hashAlg, - Ipp8u* pBuffer)) - -IPPAPI(IppStatus, ippsRSAVerify_PSS,(const Ipp8u* pMsg, int msgLen, - const Ipp8u* pSign, - int* pIsValid, - const IppsRSAPublicKeyState* pKey, - IppHashAlgId hashAlg, - Ipp8u* pBuffer)) - -/* signature scheme : RSA-SSA-PKCS1-v1_5 */ -IPPAPI(IppStatus, ippsRSASign_PKCS1v15,(const Ipp8u* pMsg, int msgLen, - Ipp8u* pSign, - const IppsRSAPrivateKeyState* pPrvKey, - const IppsRSAPublicKeyState* pPubKey, - IppHashAlgId hashAlg, - Ipp8u* pBuffer)) - - -IPPAPI(IppStatus, ippsRSAVerify_PKCS1v15,(const Ipp8u* pMsg, int msgLen, - const Ipp8u* pSign, int* pIsValid, - const IppsRSAPublicKeyState* pKey, - IppHashAlgId hashAlg, - Ipp8u* pBuffer)) - -/* -// ========================================================= -// DL Cryptography -// ========================================================= -*/ -IPPAPI( const char*, ippsDLGetResultString, (IppDLResult code)) - -/* Initialization */ -IPPAPI(IppStatus, ippsDLPGetSize,(int bitSizeP, int bitSizeR, int* pSize)) -IPPAPI(IppStatus, ippsDLPInit, (int bitSizeP, int bitSizeR, IppsDLPState* pCtx)) - -IPPAPI(IppStatus, ippsDLPPack,(const IppsDLPState* pCtx, Ipp8u* pBuffer)) -IPPAPI(IppStatus, ippsDLPUnpack,(const Ipp8u* pBuffer, IppsDLPState* pCtx)) - -/* Set Up and Retrieve Domain Parameters */ -IPPAPI(IppStatus, ippsDLPSet,(const IppsBigNumState* pP, - const IppsBigNumState* pR, - const IppsBigNumState* pG, - IppsDLPState* pCtx)) -IPPAPI(IppStatus, ippsDLPGet,(IppsBigNumState* pP, - IppsBigNumState* pR, - IppsBigNumState* pG, - IppsDLPState* pCtx)) -IPPAPI(IppStatus, ippsDLPSetDP,(const IppsBigNumState* pDP, IppDLPKeyTag tag, IppsDLPState* pCtx)) -IPPAPI(IppStatus, ippsDLPGetDP,(IppsBigNumState* pDP, IppDLPKeyTag tag, const IppsDLPState* pCtx)) - -/* Key Generation, Validation and Set Up */ -IPPAPI(IppStatus, ippsDLPGenKeyPair,(IppsBigNumState* pPrvKey, IppsBigNumState* pPubKey, - IppsDLPState* pCtx, - IppBitSupplier rndFunc, void* pRndParam)) -IPPAPI(IppStatus, ippsDLPPublicKey, (const IppsBigNumState* pPrvKey, - IppsBigNumState* pPubKey, - IppsDLPState* pCtx)) -IPPAPI(IppStatus, ippsDLPValidateKeyPair,(const IppsBigNumState* pPrvKey, - const IppsBigNumState* pPubKey, - IppDLResult* pResult, - IppsDLPState* pCtx)) - -IPPAPI(IppStatus, ippsDLPSetKeyPair,(const IppsBigNumState* pPrvKey, - const IppsBigNumState* pPubKey, - IppsDLPState* pCtx)) - -/* Singing/Verifying (DSA version) */ -IPPAPI(IppStatus, ippsDLPSignDSA, (const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pPrvKey, - IppsBigNumState* pSignR, IppsBigNumState* pSignS, - IppsDLPState* pCtx)) -IPPAPI(IppStatus, ippsDLPVerifyDSA,(const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pSignR, const IppsBigNumState* pSignS, - IppDLResult* pResult, - IppsDLPState* pCtx)) - -/* Shared Secret Element (DH version) */ -IPPAPI(IppStatus, ippsDLPSharedSecretDH,(const IppsBigNumState* pPrvKeyA, - const IppsBigNumState* pPubKeyB, - IppsBigNumState* pShare, - IppsDLPState* pCtx)) - -/* DSA's parameter Generation and Validation */ -IPPAPI(IppStatus, ippsDLPGenerateDSA,(const IppsBigNumState* pSeedIn, - int nTrials, IppsDLPState* pCtx, - IppsBigNumState* pSeedOut, int* pCounter, - IppBitSupplier rndFunc, void* pRndParam)) -IPPAPI(IppStatus, ippsDLPValidateDSA,(int nTrials, IppDLResult* pResult, IppsDLPState* pCtx, - IppBitSupplier rndFunc, void* pRndParam)) - -/* DH parameter's Generation and Validation */ -IPPAPI(IppStatus, ippsDLPGenerateDH,(const IppsBigNumState* pSeedIn, - int nTrials, IppsDLPState* pCtx, - IppsBigNumState* pSeedOut, int* pCounter, - IppBitSupplier rndFunc, void* pRndParam)) -IPPAPI(IppStatus, ippsDLPValidateDH,(int nTrials, IppDLResult* pResult, IppsDLPState* pCtx, - IppBitSupplier rndFunc, void* pRndParam)) - - -/* -// ========================================================= -// EC Cryptography -// ========================================================= -*/ -IPPAPI( const char*, ippsECCGetResultString, (IppECResult code)) - -/* -// EC over Prime Fields -*/ -/* general EC initialization */ -IPPAPI(IppStatus, ippsECCPGetSize,(int feBitSize, int* pSize)) -IPPAPI(IppStatus, ippsECCPInit,(int feBitSize, IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPSet,(const IppsBigNumState* pPrime, - const IppsBigNumState* pA, const IppsBigNumState* pB, - const IppsBigNumState* pGX,const IppsBigNumState* pGY,const IppsBigNumState* pOrder, - int cofactor, - IppsECCPState* pECC)) - -/* standard EC initialization */ -IPPAPI(IppStatus, ippsECCPGetSizeStd128r1,(int* pSize)) -IPPAPI(IppStatus, ippsECCPGetSizeStd128r2,(int* pSize)) -IPPAPI(IppStatus, ippsECCPGetSizeStd192r1,(int* pSize)) -IPPAPI(IppStatus, ippsECCPGetSizeStd224r1,(int* pSize)) -IPPAPI(IppStatus, ippsECCPGetSizeStd256r1,(int* pSize)) -IPPAPI(IppStatus, ippsECCPGetSizeStd384r1,(int* pSize)) -IPPAPI(IppStatus, ippsECCPGetSizeStd521r1,(int* pSize)) -IPPAPI(IppStatus, ippsECCPGetSizeStdSM2,(int* pSize)) - -IPPAPI(IppStatus, ippsECCPInitStd128r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPInitStd128r2,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPInitStd192r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPInitStd224r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPInitStd256r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPInitStd384r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPInitStd521r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPInitStdSM2,(IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPSetStd128r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSetStd128r2,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSetStd192r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSetStd224r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSetStd256r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSetStd384r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSetStd521r1,(IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSetStdSM2,(IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPSetStd,(IppECCType flag, IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPGet,(IppsBigNumState* pPrime, - IppsBigNumState* pA, IppsBigNumState* pB, - IppsBigNumState* pGX,IppsBigNumState* pGY,IppsBigNumState* pOrder, - int* cofactor, - IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPGetOrderBitSize,(int* pBitSize, IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPValidate,(int nTrials, IppECResult* pResult, IppsECCPState* pECC, - IppBitSupplier rndFunc, void* pRndParam)) - -/* EC Point */ -IPPAPI(IppStatus, ippsECCPPointGetSize,(int feBitSize, int* pSize)) - -IPPAPI(IppStatus, ippsECCPPointInit,(int feBitSize, IppsECCPPointState* pPoint)) - -/* Setup/retrieve point's coordinates */ -IPPAPI(IppStatus, ippsECCPSetPoint,(const IppsBigNumState* pX, const IppsBigNumState* pY, - IppsECCPPointState* pPoint, IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPSetPointAtInfinity,(IppsECCPPointState* pPoint, IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPGetPoint,(IppsBigNumState* pX, IppsBigNumState* pY, - const IppsECCPPointState* pPoint, IppsECCPState* pECC)) - -/* EC Point Operations */ -IPPAPI(IppStatus, ippsECCPCheckPoint,(const IppsECCPPointState* pP, - IppECResult* pResult, IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPComparePoint,(const IppsECCPPointState* pP, const IppsECCPPointState* pQ, - IppECResult* pResult, IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPNegativePoint,(const IppsECCPPointState* pP, - IppsECCPPointState* pR, IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPAddPoint,(const IppsECCPPointState* pP, const IppsECCPPointState* pQ, - IppsECCPPointState* pR, IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPMulPointScalar,(const IppsECCPPointState* pP, const IppsBigNumState* pK, - IppsECCPPointState* pR, IppsECCPState* pECC)) - -/* Key Generation, Setup and Validation */ -IPPAPI(IppStatus, ippsECCPGenKeyPair,(IppsBigNumState* pPrivate, IppsECCPPointState* pPublic, - IppsECCPState* pECC, - IppBitSupplier rndFunc, void* pRndParam)) -IPPAPI(IppStatus, ippsECCPPublicKey,(const IppsBigNumState* pPrivate, - IppsECCPPointState* pPublic, - IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPValidateKeyPair,(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic, - IppECResult* pResult, - IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSetKeyPair,(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic, - IppBool regular, - IppsECCPState* pECC)) - -/* Shared Secret (DH scheme ) */ -IPPAPI(IppStatus, ippsECCPSharedSecretDH,(const IppsBigNumState* pPrivateA, - const IppsECCPPointState* pPublicB, - IppsBigNumState* pShare, - IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPSharedSecretDHC,(const IppsBigNumState* pPrivateA, - const IppsECCPPointState* pPublicB, - IppsBigNumState* pShare, - IppsECCPState* pECC)) - -/* Sing/Verify */ -IPPAPI(IppStatus, ippsECCPSignDSA,(const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pPrivate, - IppsBigNumState* pSignX, IppsBigNumState* pSignY, - IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPVerifyDSA,(const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pSignX, const IppsBigNumState* pSignY, - IppECResult* pResult, - IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPSignNR,(const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pPrivate, - IppsBigNumState* pSignX, IppsBigNumState* pSignY, - IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPVerifyNR,(const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pSignX, const IppsBigNumState* pSignY, - IppECResult* pResult, - IppsECCPState* pECC)) - -IPPAPI(IppStatus, ippsECCPSignSM2,(const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pRegPrivate, - const IppsBigNumState* pEphPrivate, - IppsBigNumState* pSignR, IppsBigNumState* pSignS, - IppsECCPState* pECC)) -IPPAPI(IppStatus, ippsECCPVerifySM2,(const IppsBigNumState* pMsgDigest, - const IppsECCPPointState* pRegPublic, - const IppsBigNumState* pSignR, const IppsBigNumState* pSignS, - IppECResult* pResult, - IppsECCPState* pECC)) - - -#ifdef __cplusplus -} -#endif - - -#if defined (_IPP_STDCALL_CDECL) - #undef _IPP_STDCALL_CDECL - #define __stdcall __cdecl -#endif - -#endif /* __IPPCP_H__ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcpdefs.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcpdefs.h deleted file mode 100644 index aa306221e8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcpdefs.h +++ /dev/null @@ -1,371 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippCP) definitions. -// -// -*/ - - -#ifndef __IPPCPDEFS_H__ -#define __IPPCPDEFS_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined( _OWN_BLDPCS ) - -typedef Ipp32u IppAlgId; - -/* -// ========================================================= -// Symmetric Ciphers -// ========================================================= -*/ -typedef enum { - ippPaddingNONE = 0, /*NONE = 0,*/ IppsCPPaddingNONE = 0, - ippPaddingPKCS7 = 1, /*PKCS7 = 1,*/ IppsCPPaddingPKCS7 = 1, - ippPaddingZEROS = 2, /*ZEROS = 2,*/ IppsCPPaddingZEROS = 2 -} IppsPadding, IppsCPPadding; - -typedef struct _cpDES IppsDESSpec; -typedef struct _cpRijndael128 IppsAESSpec; -typedef struct _cpRijndael128 IppsRijndael128Spec; -typedef struct _cpSMS4 IppsSMS4Spec; - -/* TDES */ -#define DES_BLOCKSIZE (64) /* cipher blocksize (bits) */ -#define TDES_BLOCKSIZE DES_BLOCKSIZE - -#define DES_KEYSIZE (64) /* cipher keysize (bits) */ -#define TDES_KEYSIZE DES_KEYSIZE - -/* AES */ -#define IPP_AES_BLOCK_BITSIZE (128) /* cipher blocksizes (bits) */ - -/* Rijndael */ -typedef enum { - ippRijndaelKey128 = 128, IppsRijndaelKey128 = 128, /* 128-bit key */ - ippRijndaelKey192 = 192, IppsRijndaelKey192 = 192, /* 192-bit key */ - ippRijndaelKey256 = 256, IppsRijndaelKey256 = 256 /* 256-bit key */ -} IppsRijndaelKeyLength; - -/* AES based authentication & confidence */ -typedef struct _cpRijndael128GCM IppsRijndael128GCMState; -typedef struct _cpAES_CCM IppsAES_CCMState; -typedef struct _cpRijndael128GCM IppsAES_GCMState; - -/* -// ========================================================= -// ARCFOUR Stream Cipher -// ========================================================= -*/ -typedef struct _cpARCfour IppsARCFourState; - -#define IPP_ARCFOUR_KEYMAX_SIZE (256) /* max key length (bytes) */ -#define MAX_ARCFOUR_KEY_LEN IPP_ARCFOUR_KEYMAX_SIZE /* obsolete */ - -/* -// ========================================================= -// One-Way Hash Functions -// ========================================================= -*/ -typedef enum { - ippHashAlg_Unknown, - ippHashAlg_SHA1, - ippHashAlg_SHA256, - ippHashAlg_SHA224, - ippHashAlg_SHA512, - ippHashAlg_SHA384, - ippHashAlg_MD5, - ippHashAlg_SM3, - ippHashAlg_SHA512_224, - ippHashAlg_SHA512_256, - ippHashAlg_MaxNo -} IppHashAlgId; - -#define IPP_ALG_HASH_UNKNOWN (ippHashAlg_Unknown) /* unknown */ -#define IPP_ALG_HASH_SHA1 (ippHashAlg_SHA1) /* SHA1 */ -#define IPP_ALG_HASH_SHA256 (ippHashAlg_SHA256) /* SHA256 */ -#define IPP_ALG_HASH_SHA224 (ippHashAlg_SHA224) /* SHA224 or SHA256/224 */ -#define IPP_ALG_HASH_SHA512 (ippHashAlg_SHA512) /* SHA512 */ -#define IPP_ALG_HASH_SHA384 (ippHashAlg_SHA384) /* SHA384 or SHA512/384 */ -#define IPP_ALG_HASH_MD5 (ippHashAlg_MD5) /* MD5 */ -#define IPP_ALG_HASH_SM3 (ippHashAlg_SM3) /* SM3 */ -#define IPP_ALG_HASH_SHA512_224 (ippHashAlg_SHA512_224) /* SHA512/224 */ -#define IPP_ALG_HASH_SHA512_256 (ippHashAlg_SHA512_256) /* SHA512/256 */ -#define IPP_ALG_HASH_LIMIT (ippHashAlg_MaxNo) /* hash alg limiter*/ - -typedef struct _cpSHA1 IppsSHA1State; -typedef struct _cpSHA256 IppsSHA256State; -typedef struct _cpSHA256 IppsSHA224State; -typedef struct _cpSHA512 IppsSHA512State; -typedef struct _cpSHA512 IppsSHA384State; -typedef struct _cpMD5 IppsMD5State; -typedef struct _cpSM3 IppsSM3State; -typedef struct _cpHashCtx IppsHashState; - - -/* MGF */ -typedef IppStatus (__STDCALL *IppMGF)(const Ipp8u* pSeed, int seedLen, Ipp8u* pMask, int maskLen); -/* HASH function */ -typedef IppStatus (__STDCALL *IppHASH)(const Ipp8u* pMsg, int len, Ipp8u* pMD); - -#define IPP_SHA1_DIGEST_BITSIZE 160 /* digest size (bits) */ -#define IPP_SHA256_DIGEST_BITSIZE 256 -#define IPP_SHA224_DIGEST_BITSIZE 224 -#define IPP_SHA384_DIGEST_BITSIZE 384 -#define IPP_SHA512_DIGEST_BITSIZE 512 -#define IPP_MD5_DIGEST_BITSIZE 128 -#define IPP_SM3_DIGEST_BITSIZE 256 -#define IPP_SHA512_224_DIGEST_BITSIZE 224 -#define IPP_SHA512_256_DIGEST_BITSIZE 256 - -/* -// ========================================================= -// Keyed-Hash Message Authentication Codes -// ========================================================= -*/ -typedef struct _cpHMAC IppsHMACState; -typedef struct _cpHMAC IppsHMACSHA1State; -typedef struct _cpHMAC IppsHMACSHA256State; -typedef struct _cpHMAC IppsHMACSHA224State; -typedef struct _cpHMAC IppsHMACSHA384State; -typedef struct _cpHMAC IppsHMACSHA512State; -typedef struct _cpHMAC IppsHMACMD5State; - -/* -// ========================================================= -// Data Authentication Codes -// ========================================================= -*/ -typedef struct _cpAES_CMAC IppsAES_CMACState; - -/* -// ========================================================= -// Big Number Integer Arithmetic -// ========================================================= -*/ -typedef enum { - ippBigNumNEG = 0, IppsBigNumNEG = 0, - ippBigNumPOS = 1, IppsBigNumPOS = 1 -} IppsBigNumSGN; - -typedef enum { - ippBinaryMethod = 0, IppsBinaryMethod = 0, - ippSlidingWindows = 1, IppsSlidingWindows = 1 -} IppsExpMethod; - -typedef struct _cpBigNum IppsBigNumState; -typedef struct _cpMontgomery IppsMontState; -typedef struct _cpPRNG IppsPRNGState; -typedef struct _cpPrime IppsPrimeState; - -/* External Bit Supplier */ -typedef IppStatus (__STDCALL *IppBitSupplier)(Ipp32u* pRand, int nBits, void* pEbsParams); - -#define IPP_IS_EQ (0) -#define IPP_IS_GT (1) -#define IPP_IS_LT (2) -#define IPP_IS_NE (3) -#define IPP_IS_NA (4) - -#define IPP_IS_PRIME (5) -#define IPP_IS_COMPOSITE (6) - -#define IPP_IS_VALID (7) -#define IPP_IS_INVALID (8) -#define IPP_IS_INCOMPLETE (9) -#define IPP_IS_ATINFINITY (10) - -#define IS_ZERO IPP_IS_EQ -#define GREATER_THAN_ZERO IPP_IS_GT -#define LESS_THAN_ZERO IPP_IS_LT -#define IS_PRIME IPP_IS_PRIME -#define IS_COMPOSITE IPP_IS_COMPOSITE -#define IS_VALID_KEY IPP_IS_VALID -#define IS_INVALID_KEY IPP_IS_INVALID -#define IS_INCOMPLETED_KEY IPP_IS_INCOMPLETE - -/* -// ========================================================= -// RSA Cryptography -// ========================================================= -*/ -typedef struct _cpRSA IppsRSAState; - -/* key types */ -typedef enum { - ippRSApublic = 0x20000000, IppRSApublic = 0x20000000, - ippRSAprivate = 0x40000000, IppRSAprivate = 0x40000000 -} IppRSAKeyType; - -/* key component's tag */ -typedef enum { - ippRSAkeyN = 0x01, IppRSAkeyN = 0x01, - ippRSAkeyE = 0x02, IppRSAkeyE = 0x02, - ippRSAkeyD = 0x04, IppRSAkeyD = 0x04, - ippRSAkeyP = 0x08, IppRSAkeyP = 0x08, - ippRSAkeyQ = 0x10, IppRSAkeyQ = 0x10, - ippRSAkeyDp = 0x20, IppRSAkeyDp = 0x20, - ippRSAkeyDq = 0x40, IppRSAkeyDq = 0x40, - ippRSAkeyQinv = 0x80, IppRSAkeyQinv = 0x80 -} IppRSAKeyTag; - -typedef struct _cpRSA_public_key IppsRSAPublicKeyState; -typedef struct _cpRSA_private_key IppsRSAPrivateKeyState; - -#define MIN_RSA_SIZE (8) -#define MAX_RSA_SIZE (4096) - -/* -// ========================================================= -// DL Cryptography -// ========================================================= -*/ -typedef struct _cpDLP IppsDLPState; - -/* domain parameter tags */ -typedef enum { - ippDLPkeyP = 0x01, IppDLPkeyP = 0x01, - ippDLPkeyR = 0x02, IppDLPkeyR = 0x02, - ippDLPkeyG = 0x04, IppDLPkeyG = 0x04 -} IppDLPKeyTag; - -typedef enum { - ippDLValid, /* validation pass successfully */ - - ippDLBaseIsEven, /* !(P is odd) */ - ippDLOrderIsEven, /* !(R is odd) */ - ippDLInvalidBaseRange, /* !(2^(L-1) < P < 2^L) */ - ippDLInvalidOrderRange, /* !(2^(M-1) < R < 2^M) */ - ippDLCompositeBase, - ippDLCompositeOrder, - ippDLInvalidCofactor, /* !( R|(P-1) ) */ - ippDLInvalidGenerator, /* !( G^R == 1 (mod P) ) */ - /* !(1 < G < (P-1)) */ - ippDLInvalidPrivateKey, /* !(1 < private < (R-1)) */ - ippDLInvalidPublicKey, /* !(1 < public <=(P-1)) */ - ippDLInvalidKeyPair, /* !(G^private == public */ - - ippDLInvalidSignature /* invalid signature */ -} IppDLResult; - -#define MIN_DLP_BITSIZE (512) -#define MIN_DLP_BITSIZER (160) - -#define MIN_DLPDH_BITSIZE (512) -#define MIN_DLPDH_BITSIZER (160) -#define DEF_DLPDH_BITSIZER (160) - -#define MIN_DLPDSA_BITSIZE (512) -#define MAX_DLPDSA_BITSIZE (1024) -#define MIN_DLPDSA_BITSIZER (160) -#define DEF_DLPDSA_BITSIZER (160) -#define MAX_DLPDSA_BITSIZER (160) -#define MIN_DLPDSA_SEEDSIZE (160) - -/* -// ========================================================= -// EC Cryptography -// ========================================================= -*/ -typedef struct _cpECCP IppsECCPState; -typedef struct _cpECCB IppsECCBState; -typedef struct _cpECCPPoint IppsECCPPointState; -typedef struct _cpECCBPoint IppsECCBPointState; - -/* operation result */ -typedef enum { - ippECValid, /* validation pass successfully */ - - ippECCompositeBase, /* field based on composite */ - ippECComplicatedBase, /* number of non-zero terms in the polynomial (> PRIME_ARR_MAX) */ - ippECIsZeroDiscriminant,/* zero discriminant */ - ippECCompositeOrder, /* composite order of base point */ - ippECInvalidOrder, /* invalid base point order */ - ippECIsWeakMOV, /* weak Meneze-Okamoto-Vanstone reduction attack */ - ippECIsWeakSSSA, /* weak Semaev-Smart,Satoh-Araki reduction attack */ - ippECIsSupersingular, /* supersingular curve */ - - ippECInvalidPrivateKey, /* !(0 < Private < order) */ - ippECInvalidPublicKey, /* (order*PublicKey != Infinity) */ - ippECInvalidKeyPair, /* (Private*BasePoint != PublicKey) */ - - ippECPointOutOfGroup, /* out of group (order*P != Infinity) */ - ippECPointIsAtInfinite, /* point (P=(Px,Py)) at Infinity */ - ippECPointIsNotValid, /* point (P=(Px,Py)) out-of EC */ - - ippECPointIsEqual, /* compared points are equal */ - ippECPointIsNotEqual, /* compared points are different */ - - ippECInvalidSignature /* invalid signature */ -} IppECResult; - -/* domain parameter set/get flags */ -typedef enum { - ippECarbitrary =0x00000, IppECCArbitrary = 0x00000, /* arbitrary ECC */ - - ippECPstd = 0x10000, IppECCPStd = 0x10000, /* random (recommended) EC over FG(p): */ - ippECPstd112r1 = ippECPstd, IppECCPStd112r1 = IppECCPStd, /* secp112r1 curve */ - ippECPstd112r2 = ippECPstd+1, IppECCPStd112r2 = IppECCPStd+1, /* secp112r2 curve */ - ippECPstd128r1 = ippECPstd+2, IppECCPStd128r1 = IppECCPStd+2, /* secp128r1 curve */ - ippECPstd128r2 = ippECPstd+3, IppECCPStd128r2 = IppECCPStd+3, /* secp128r2 curve */ - ippECPstd160r1 = ippECPstd+4, IppECCPStd160r1 = IppECCPStd+4, /* secp160r1 curve */ - ippECPstd160r2 = ippECPstd+5, IppECCPStd160r2 = IppECCPStd+5, /* secp160r2 curve */ - ippECPstd192r1 = ippECPstd+6, IppECCPStd192r1 = IppECCPStd+6, /* secp192r1 curve */ - ippECPstd224r1 = ippECPstd+7, IppECCPStd224r1 = IppECCPStd+7, /* secp224r1 curve */ - ippECPstd256r1 = ippECPstd+8, IppECCPStd256r1 = IppECCPStd+8, /* secp256r1 curve */ - ippECPstd384r1 = ippECPstd+9, IppECCPStd384r1 = IppECCPStd+9, /* secp384r1 curve */ - ippECPstd521r1 = ippECPstd+10, IppECCPStd521r1 = IppECCPStd+10, /* secp521r1 curve */ - ippECPstdSM2 = ippECPstd+11, IppECCPStdSM2 = IppECCPStd+11, /* TMP SM2 curve */ - ippEC_TPM_SM2_P256= ippECPstd+11, - ippEC_TPM_BN_P256 = ippECPstd+12, /* TPM BN_P256 curve */ - - /* curves over binary finit fields are not supported in IPP 9.0 */ - IppECCBStd = 0x20000, /* random (recommended) EC over FG(2^m): */ - IppECCBStd113r1 = IppECCBStd, /* sect113r1 curve */ - IppECCBStd113r2 = IppECCBStd+1, /* sect113r2 curve */ - IppECCBStd131r1 = IppECCBStd+2, /* sect131r1 curve */ - IppECCBStd131r2 = IppECCBStd+3, /* sect131r2 curve */ - IppECCBStd163r1 = IppECCBStd+4, /* sect163r1 curve */ - IppECCBStd163r2 = IppECCBStd+5, /* sect163r2 curve */ - IppECCBStd193r1 = IppECCBStd+6, /* sect193r1 curve */ - IppECCBStd193r2 = IppECCBStd+7, /* sect193r2 curve */ - IppECCBStd233r1 = IppECCBStd+8, /* sect233r1 curve */ - IppECCBStd283r1 = IppECCBStd+9, /* sect283r1 curve */ - IppECCBStd409r1 = IppECCBStd+10, /* sect409r1 curve */ - IppECCBStd571r1 = IppECCBStd+11, /* sect571r1 curve */ - - IppECCKStd = 0x40000, /* Koblitz (recommended) EC over FG(2^m): */ - IppECCBStd163k1 = IppECCKStd, /* Koblitz 163 curve */ - IppECCBStd233k1 = IppECCKStd+1, /* Koblitz 233 curve */ - IppECCBStd239k1 = IppECCKStd+2, /* Koblitz 239 curve */ - IppECCBStd283k1 = IppECCKStd+3, /* Koblitz 283 curve */ - IppECCBStd409k1 = IppECCKStd+4, /* Koblitz 409 curve */ - IppECCBStd571k1 = IppECCKStd+5 /* Koblitz 571 curve */ -} IppsECType, IppECCType; - -#endif /* _OWN_BLDPCS */ - -#ifdef __cplusplus -} -#endif - -#endif /* __IPPCPDEFS_H__ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcpepid.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcpepid.h deleted file mode 100644 index d36661bfde..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippcpepid.h +++ /dev/null @@ -1,218 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// ippCP Intel(R) EPID functionality -// -// -*/ - - -#if !defined( __IPPCPEPID_H__ ) || defined( _OWN_BLDPCS ) -#define __IPPCPEPID_H__ - - -#if defined (_WIN32_WCE) && defined (_M_IX86) && defined (__stdcall) - #define _IPP_STDCALL_CDECL - #undef __stdcall -#endif - - -#ifndef __IPPDEFS_H__ - #include "ippdefs.h" -#endif - -#ifndef __IPPCPDEFS_H__ - #include "ippcpdefs.h" -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined( _IPP_NO_DEFAULT_LIB ) - #if defined( _IPP_PARALLEL_DYNAMIC ) || defined( _IPP_SEQUENTIAL_DYNAMIC ) - #pragma comment( lib, "ippcpepid" ) - #pragma comment( lib, "ippcp" ) - #pragma comment( lib, "ippcore" ) - #elif defined( _IPP_PARALLEL_STATIC ) || defined( _IPP_SEQUENTIAL_STATIC ) - #pragma comment( lib, "ippcpepidmt" ) - #pragma comment( lib, "ippcpmt" ) - #pragma comment( lib, "ippcoremt" ) - #endif -#endif - - -/* ///////////////////////////////////////////////////////////////////////////// -// Name: ippcpepidGetLibVersion -// Purpose: getting of the library version -// Returns: the structure of information about version of ippCP EPID library -// Parameters: -// -// Notes: not necessary to release the returned structure -*/ -IPPAPI( const IppLibraryVersion*, ippcpepidGetLibVersion, (void) ) - - -/* -// Finite Field Low Level Math -*/ -#define IPP_MIN_GF_BITSIZE (2) /* min bitsize for GF element */ -#define IPP_MAX_GF_BITSIZE (4096) /* max bitsize for GF element */ - -//#define IPP_IS_EQ IS_ZERO //(0) -//#define IPP_IS_NE (1) -//#define IPP_IS_GT GREATER_THAN_ZERO //(2) -//#define IPP_IS_LT LESS_THAN_ZERO // (3) -//#define IPP_IS_NA (4) - -#if !defined( _OWN_BLDPCS ) -typedef struct _cpGFp IppsGFpState; -typedef struct _cpElementGFp IppsGFpElement; - -typedef struct { - const IppsGFpState* pBasicGF; - const IppsGFpState* pGroundGF; - int basicGFdegree; - int groundGFdegree; - int elementLen; -} IppsGFpInfo; -#endif - -#if !defined( _OWN_BLDPCS ) -typedef enum { - ippMD5 = 0x00, - ippSHA1 = 0x01, - ippSHA256 = 0x02, ippSHA224 = 0x12, - ippSHA512 = 0x03, ippSHA384 = 0x13 -} IppHashID; -#endif /* _OWN_BLDPCS */ - - -IPPAPI(IppStatus, ippsGFpGetSize, (int bitSize, int* pStateSizeInBytes)) -IPPAPI(IppStatus, ippsGFpInit, (const Ipp32u* pPime, int bitSize, IppsGFpState* pGFp)) - -IPPAPI(IppStatus, ippsGFpxGetSize,(const IppsGFpState* pGroundGF, int degree, int* pStateSizeInBytes)) -IPPAPI(IppStatus, ippsGFpxInit, (const IppsGFpState* pGroundGF, const Ipp32u* pIrrPolynomial, int degree, IppsGFpState* pGFpx)) -IPPAPI(IppStatus, ippsGFpxInitBinomial,(const IppsGFpState* pGroundGF, const IppsGFpElement* pGroundElm, int degree, IppsGFpState* pGFpx)) - -IPPAPI(IppStatus, ippsGFpGetInfo,(const IppsGFpState* pGFp, IppsGFpInfo* pInfo)) -IPPAPI(IppStatus, ippsGFpGetModulus,(const IppsGFpState* pGFp, Ipp32u* pModulus)) - -IPPAPI(IppStatus, ippsGFpScratchBufferSize,(int nExponents, int ExpBitSize, const IppsGFpState* pGF, int* pBufferSize)) - -//IPPAPI(IppStatus, ippsBasicGFpRef,(const IppsGFpState* pGFp, IppsGFpState** ppBasicGF)) -//IPPAPI(IppStatus, ippsGroundGFpRef,(const IppsGFpState* pGFp, IppsGFpState** ppGroundGF)) -//IPPAPI(IppStatus, ippsGFpGetDegree,(const IppsGFpState* pGFp, int* pDegree)) -//IPPAPI(IppStatus, ippsGFpGetElementLen,(const IppsGFpState* pGFp, int* pElmLen)) -//IPPAPI(IppStatus, ippsGFpCmp, (const IppsGFpState* pGFp1, const IppsGFpState* pGFp2, IppGFpResult* pCmpResult)) - -IPPAPI(IppStatus, ippsGFpElementGetSize,(const IppsGFpState* pGFp, int* pElementSize)) -IPPAPI(IppStatus, ippsGFpElementInit, (const Ipp32u* pA, int lenA, IppsGFpElement* pR, IppsGFpState* pGFp)) - -IPPAPI(IppStatus, ippsGFpSetElement, (const Ipp32u* pA, int nsA, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpSetElementOctString,(const Ipp8u* pStr, int strSize, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpSetElementRandom,(IppBitSupplier rndFunc, void* pRndParam, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpSetElementHash,(const Ipp8u* pMsg, int msgLen, IppHashID hashID, IppsGFpElement* pElm, IppsGFpState* pGF)) -IPPAPI(IppStatus, ippsGFpCpyElement,(const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpGetElement,(const IppsGFpElement* pA, Ipp32u* pDataA, int nsA, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpGetElementOctString,(const IppsGFpElement* pA, Ipp8u* pStr, int strSize, IppsGFpState* pGFp)) - -IPPAPI(IppStatus, ippsGFpCmpElement,(const IppsGFpElement* pA, const IppsGFpElement* pB, int* pResult, const IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpIsZeroElement,(const IppsGFpElement* pA, int* pResult, const IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpIsUnityElement,(const IppsGFpElement* pA, int* pResult, const IppsGFpState* pGFp)) - -//IPPAPI(IppStatus, ippsGFpSetPolyTerm, (const Ipp32u* pTerm, int nsT, int termDegree, IppsGFpElement* pElm, IppsGFpState* pGF)) -//IPPAPI(IppStatus, ippsGFpGetPolyTerm, (const IppsGFpElement* pElm, int termDegree, Ipp32u* pTerm, int nsT, IppsGFpState* pGF)) - -IPPAPI(IppStatus, ippsGFpConj,(const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpNeg, (const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpInv, (const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpSqrt,(const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpAdd, (const IppsGFpElement* pA, const IppsGFpElement* pB, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpSub, (const IppsGFpElement* pA, const IppsGFpElement* pB, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpMul, (const IppsGFpElement* pA, const IppsGFpElement* pB, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpSqr, (const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpExp, (const IppsGFpElement* pA, const IppsBigNumState* pE, IppsGFpElement* pR, IppsGFpState* pGFp, Ipp8u* pScratchBuffer)) -IPPAPI(IppStatus, ippsGFpMultiExp,(const IppsGFpElement* const ppElmA[], const IppsBigNumState* const ppE[], int nItems, IppsGFpElement* pElmR, IppsGFpState* pGF, Ipp8u* pScratchBuffer)) - -IPPAPI(IppStatus, ippsGFpAdd_GFpE,(const IppsGFpElement* pA, const IppsGFpElement* pGroundB, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpSub_GFpE,(const IppsGFpElement* pA, const IppsGFpElement* pGroundB, IppsGFpElement* pR, IppsGFpState* pGFp)) -IPPAPI(IppStatus, ippsGFpMul_GFpE,(const IppsGFpElement* pA, const IppsGFpElement* pGroundB, IppsGFpElement* pR, IppsGFpState* pGFp)) - - -#if !defined( _OWN_BLDPCS ) -typedef struct _cpGFpEC IppsGFpECState; -typedef struct _cpGFpECPoint IppsGFpECPoint; -#endif - -IPPAPI(IppStatus, ippsGFpECGetSize,(const IppsGFpState* pGF, int* pCtxSizeInBytes)) -IPPAPI(IppStatus, ippsGFpECInit, (const IppsGFpElement* pA, const IppsGFpElement* pB, - const IppsGFpElement* pX, const IppsGFpElement* pY, - const Ipp32u* pOrder, int orderLen, - const Ipp32u* pCofactor, int cofactorLen, - IppsGFpState* pGF, IppsGFpECState* pEC)) - -IPPAPI(IppStatus, ippsGFpECScratchBufferSize,(int nScalars, const IppsGFpECState* pEC, int* pBufferSize)) - -IPPAPI(IppStatus, ippsGFpECSet,(const IppsGFpElement* pA, const IppsGFpElement* pB, - const IppsGFpElement* pX, const IppsGFpElement* pY, - const Ipp32u* pOrder, int orderLen, - const Ipp32u* pCofactor, int cofactorLen, - IppsGFpECState* pEC)) - -IPPAPI(IppStatus, ippsGFpECGet,(const IppsGFpECState* pEC, - const IppsGFpState** ppGF, - IppsGFpElement* pA, IppsGFpElement* pB, - IppsGFpElement* pX, IppsGFpElement* pY, - const Ipp32u** ppOrder, int* pOrderLen, - const Ipp32u** ppCofactor, int* pCoFactorLen)) - -IPPAPI(IppStatus, ippsGFpECVerify,(IppECResult* pResult, IppsGFpECState* pEC, Ipp8u* pScratchBuffer)) - -IPPAPI(IppStatus, ippsGFpECPointGetSize,(const IppsGFpECState* pEC, int* pSizeInBytes)) -IPPAPI(IppStatus, ippsGFpECPointInit, (const IppsGFpElement* pX, const IppsGFpElement* pY, IppsGFpECPoint* pPoint, IppsGFpECState* pEC)) - -IPPAPI(IppStatus, ippsGFpECSetPointAtInfinity,(IppsGFpECPoint* pPoint, IppsGFpECState* pEC)) -IPPAPI(IppStatus, ippsGFpECSetPoint,(const IppsGFpElement* pX, const IppsGFpElement* pY, IppsGFpECPoint* pPoint, IppsGFpECState* pEC)) -IPPAPI(IppStatus, ippsGFpECSetPointRandom,(IppBitSupplier rndFunc, void* pRndParam, IppsGFpECPoint* pPoint, IppsGFpECState* pEC, Ipp8u* pScratchBuffer)) -IPPAPI(IppStatus, ippsGFpECMakePoint,(const IppsGFpElement* pX, IppsGFpECPoint* pPoint, IppsGFpECState* pEC)) -IPPAPI(IppStatus, ippsGFpECSetPointHash,(Ipp32u hdr, const Ipp8u* pMsg, int msgLen, IppHashID hashID, IppsGFpECPoint* pPoint, IppsGFpECState* pEC, Ipp8u* pScratchBuffer)) - -IPPAPI(IppStatus, ippsGFpECCpyPoint,(const IppsGFpECPoint* pA, IppsGFpECPoint* pR, IppsGFpECState* pEC)) -IPPAPI(IppStatus, ippsGFpECCmpPoint,(const IppsGFpECPoint* pP, const IppsGFpECPoint* pQ, IppECResult* pResult, IppsGFpECState* pEC)) - -IPPAPI(IppStatus, ippsGFpECTstPoint,(const IppsGFpECPoint* pP, IppECResult* pResult, IppsGFpECState* pEC, Ipp8u* pScratchBuffer)) -IPPAPI(IppStatus, ippsGFpECGetPoint,(const IppsGFpECPoint* pPoint, IppsGFpElement* pX, IppsGFpElement* pY, IppsGFpECState* pEC)) - -IPPAPI(IppStatus, ippsGFpECNegPoint,(const IppsGFpECPoint* pP, IppsGFpECPoint* pR, IppsGFpECState* pEC)) -IPPAPI(IppStatus, ippsGFpECAddPoint,(const IppsGFpECPoint* pP, const IppsGFpECPoint* pQ, IppsGFpECPoint* pR, IppsGFpECState* pEC)) -IPPAPI(IppStatus, ippsGFpECMulPoint,(const IppsGFpECPoint* pP, const IppsBigNumState* pN, IppsGFpECPoint* pR, IppsGFpECState* pEC, Ipp8u* pScratchBuffer)) - -#ifdef __cplusplus -} -#endif - - -#if defined (_IPP_STDCALL_CDECL) - #undef _IPP_STDCALL_CDECL - #define __stdcall __cdecl -#endif - - -#endif /* __IPPCPEPID_H__ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippdefs.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippdefs.h deleted file mode 100644 index f3b5248787..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ippdefs.h +++ /dev/null @@ -1,126 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Common Types and Macro Definitions -// -// -*/ - - -#ifndef __IPPDEFS_H__ -#define __IPPDEFS_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -#if defined( _IPP_PARALLEL_STATIC ) || defined( _IPP_PARALLEL_DYNAMIC ) - #pragma message("Threaded versions of IPP libraries are deprecated and will be removed in one of the future IPP releases. Use the following link for details: https://software.intel.com/sites/products/ipp-deprecated-features-feedback/") -#endif - -#if defined (_WIN64) -#define _INTEL_PLATFORM "intel64/" -#elif defined (_WIN32) -#define _INTEL_PLATFORM "ia32/" -#endif - -#if !defined( IPPAPI ) - - #if defined( IPP_W32DLL ) && (defined( _WIN32 ) || defined( _WIN64 )) - #if defined( _MSC_VER ) || defined( __ICL ) - #define IPPAPI( type,name,arg ) \ - __declspec(dllimport) type __STDCALL name arg; - #else - #define IPPAPI( type,name,arg ) type __STDCALL name arg; - #endif - #else - #define IPPAPI( type,name,arg ) type __STDCALL name arg; - #endif - -#endif - -#if (defined( __ICL ) || defined( __ECL ) || defined(_MSC_VER)) && !defined( _PCS ) && !defined( _PCS_GENSTUBS ) - #if( __INTEL_COMPILER >= 1100 ) /* icl 11.0 supports additional comment */ - #if( _MSC_VER >= 1400 ) - #define IPP_DEPRECATED( comment ) __declspec( deprecated ( comment )) - #else - #pragma message ("your icl version supports additional comment for deprecated functions but it can't be displayed") - #pragma message ("because internal _MSC_VER macro variable setting requires compatibility with MSVC7.1") - #pragma message ("use -Qvc8 switch for icl command line to see these additional comments") - #define IPP_DEPRECATED( comment ) __declspec( deprecated ) - #endif - #elif( _MSC_FULL_VER >= 140050727 )&&( !defined( __INTEL_COMPILER )) /* VS2005 supports additional comment */ - #define IPP_DEPRECATED( comment ) __declspec( deprecated ( comment )) - #elif( _MSC_VER <= 1200 )&&( !defined( __INTEL_COMPILER )) /* VS 6 doesn't support deprecation */ - #define IPP_DEPRECATED( comment ) - #else - #define IPP_DEPRECATED( comment ) __declspec( deprecated ) - #endif -#elif (defined(__ICC) || defined(__ECC) || defined( __GNUC__ )) && !defined( _PCS ) && !defined( _PCS_GENSTUBS ) - #if defined( __GNUC__ ) - #if __GNUC__ >= 4 && __GNUC_MINOR__ >= 5 - #define IPP_DEPRECATED( message ) __attribute__(( deprecated( message ))) - #else - #define IPP_DEPRECATED( message ) __attribute__(( deprecated )) - #endif - #else - #define IPP_DEPRECATED( comment ) __attribute__(( deprecated )) - #endif -#else - #define IPP_DEPRECATED( comment ) -#endif - -#if (defined( __ICL ) || defined( __ECL ) || defined(_MSC_VER)) - #if !defined( _IPP_NO_DEFAULT_LIB ) - #if (( defined( _IPP_PARALLEL_DYNAMIC ) && !defined( _IPP_PARALLEL_STATIC ) && !defined( _IPP_SEQUENTIAL_DYNAMIC ) && !defined( _IPP_SEQUENTIAL_STATIC )) || \ - (!defined( _IPP_PARALLEL_DYNAMIC ) && defined( _IPP_PARALLEL_STATIC ) && !defined( _IPP_SEQUENTIAL_DYNAMIC ) && !defined( _IPP_SEQUENTIAL_STATIC )) || \ - (!defined( _IPP_PARALLEL_DYNAMIC ) && !defined( _IPP_PARALLEL_STATIC ) && defined( _IPP_SEQUENTIAL_DYNAMIC ) && !defined( _IPP_SEQUENTIAL_STATIC )) || \ - (!defined( _IPP_PARALLEL_DYNAMIC ) && !defined( _IPP_PARALLEL_STATIC ) && !defined( _IPP_SEQUENTIAL_DYNAMIC ) && defined( _IPP_SEQUENTIAL_STATIC ))) - #elif (!defined( _IPP_PARALLEL_DYNAMIC ) && !defined( _IPP_PARALLEL_STATIC ) && !defined( _IPP_SEQUENTIAL_DYNAMIC ) && !defined( _IPP_SEQUENTIAL_STATIC )) - #define _IPP_NO_DEFAULT_LIB - #else - #error Illegal combination of _IPP_PARALLEL_DYNAMIC/_IPP_PARALLEL_STATIC/_IPP_SEQUENTIAL_DYNAMIC/_IPP_SEQUENTIAL_STATIC, only one definition can be defined - #endif - #endif -#else - #define _IPP_NO_DEFAULT_LIB - #if (defined( _IPP_PARALLEL_DYNAMIC ) || defined( _IPP_PARALLEL_STATIC ) || defined(_IPP_SEQUENTIAL_DYNAMIC) || defined(_IPP_SEQUENTIAL_STATIC)) - #pragma message ("defines _IPP_PARALLEL_DYNAMIC/_IPP_PARALLEL_STATIC/_IPP_SEQUENTIAL_DYNAMIC/_IPP_SEQUENTIAL_STATIC do not have any effect in current configuration") - #endif -#endif - -#if !defined( _IPP_NO_DEFAULT_LIB ) - #if defined( _IPP_PARALLEL_STATIC ) - #pragma comment( lib, "libircmt" ) - #pragma comment( lib, "libmmt" ) - #pragma comment( lib, "svml_dispmt" ) - #pragma comment( lib, "libiomp5md" ) - #endif -#endif - -#include "ippbase.h" -#include "ipptypes.h" - -extern const IppiRect ippRectInfinite; - -#ifdef __cplusplus -} -#endif - -#endif /* __IPPDEFS_H__ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ipptypes.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ipptypes.h deleted file mode 100644 index 3f6961f559..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/include/ipptypes.h +++ /dev/null @@ -1,1100 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Derivative Types and Macro Definitions -// -// The main purpose of this header file is -// to support compatibility with the legacy -// domains until their end of life. -// -*/ - - -#ifndef __IPPTYPES_H__ -#define __IPPTYPES_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -/*****************************************************************************/ -/* Below are ippCore domain specific definitions */ -/*****************************************************************************/ -#if !defined( _OWN_BLDPCS ) - -#define ippCPUID_MMX 0x00000001 /* Intel Architecture MMX technology supported */ -#define ippCPUID_SSE 0x00000002 /* Streaming SIMD Extensions */ -#define ippCPUID_SSE2 0x00000004 /* Streaming SIMD Extensions 2 */ -#define ippCPUID_SSE3 0x00000008 /* Streaming SIMD Extensions 3 */ -#define ippCPUID_SSSE3 0x00000010 /* Supplemental Streaming SIMD Extensions 3 */ -#define ippCPUID_MOVBE 0x00000020 /* The processor supports MOVBE instruction */ -#define ippCPUID_SSE41 0x00000040 /* Streaming SIMD Extensions 4.1 */ -#define ippCPUID_SSE42 0x00000080 /* Streaming SIMD Extensions 4.2 */ -#define ippCPUID_AVX 0x00000100 /* Advanced Vector Extensions instruction set */ -#define ippAVX_ENABLEDBYOS 0x00000200 /* The operating system supports AVX */ -#define ippCPUID_AES 0x00000400 /* AES instruction */ -#define ippCPUID_CLMUL 0x00000800 /* PCLMULQDQ instruction */ -#define ippCPUID_ABR 0x00001000 /* Reserved */ -#define ippCPUID_RDRAND 0x00002000 /* Read Random Number instructions */ -#define ippCPUID_F16C 0x00004000 /* Float16 instructions */ -#define ippCPUID_AVX2 0x00008000 /* Advanced Vector Extensions 2 instruction set */ -#define ippCPUID_ADCOX 0x00010000 /* ADCX and ADOX instructions */ -#define ippCPUID_RDSEED 0x00020000 /* The RDSEED instruction */ -#define ippCPUID_PREFETCHW 0x00040000 /* The PREFETCHW instruction */ -#define ippCPUID_SHA 0x00080000 /* Intel (R) SHA Extensions */ -#define ippCPUID_AVX512F 0x00100000 /* AVX-512 Foundation instructions */ -#define ippCPUID_AVX512CD 0x00200000 /* AVX-512 Conflict Detection instructions */ -#define ippCPUID_AVX512ER 0x00400000 /* AVX-512 Exponential & Reciprocal instructions*/ -#define ippCPUID_AVX512PF 0x00800000 /* AVX-512 Prefetch instructions */ -#define ippCPUID_AVX512BW 0x01000000 /* AVX-512 Byte & Word instructions */ -#define ippCPUID_AVX512DQ 0x02000000 /* AVX-512 DWord & QWord instructions */ -#define ippCPUID_AVX512VL 0x04000000 /* AVX-512 Vector Length extensions */ -#define ippCPUID_KNC 0x80000000 /* Intel(R) Xeon Phi(TM) Coprocessor */ -#if defined( _WIN32 ) || defined ( _WIN64 ) - #define ippCPUID_NOCHECK 0x8000000000000000L /* Force ippSetCpuFeatures to set CPU features without check */ -#else - #define ippCPUID_NOCHECK 0x8000000000000000LL -#endif - -#if defined( _WIN32 ) || defined ( _WIN64 ) - #define ippCPUID_GETINFO_A 0x616f666e69746567L /* Force ipp_GetCpuFeatures to work as cpuid instruction */ -#else - #define ippCPUID_GETINFO_A 0x616f666e69746567LL -#endif - -#define IPP_COUNT_OF( obj ) (sizeof(obj)/sizeof(obj[0])) - -/*****************************************************************************/ -/* Below are ippSP domain specific definitions */ -/*****************************************************************************/ - -typedef enum { - ippRndZero, - ippRndNear, - ippRndFinancial, - ippRndHintAccurate=0x10 -} IppRoundMode; - - -typedef enum { - ippAlgHintNone, - ippAlgHintFast, - ippAlgHintAccurate -} IppHintAlgorithm; - -typedef enum { - ippCmpLess, - ippCmpLessEq, - ippCmpEq, - ippCmpGreaterEq, - ippCmpGreater -} IppCmpOp; - -typedef enum { - ippAlgAuto = 0x00000000, - ippAlgDirect = 0x00000001, - ippAlgFFT = 0x00000002, - ippAlgMask = 0x000000FF -} IppAlgType; - -typedef enum { - ippsNormNone = 0x00000000, /* default */ - ippsNormA = 0x00000100, /* biased normalization */ - ippsNormB = 0x00000200, /* unbiased normalization */ - ippsNormMask = 0x0000FF00 -} IppsNormOp; - -typedef enum { - ippNormInf = 0x00000001, - ippNormL1 = 0x00000002, - ippNormL2 = 0x00000004 -} IppNormType; - -enum { - IPP_FFT_DIV_FWD_BY_N = 1, - IPP_FFT_DIV_INV_BY_N = 2, - IPP_FFT_DIV_BY_SQRTN = 4, - IPP_FFT_NODIV_BY_ANY = 8 -}; - -enum { - IPP_DIV_FWD_BY_N = 1, - IPP_DIV_INV_BY_N = 2, - IPP_DIV_BY_SQRTN = 4, - IPP_NODIV_BY_ANY = 8 -}; - -typedef struct { - Ipp32f rho; - Ipp32f theta; -} IppPointPolar; - -typedef enum {ippWinBartlett,ippWinBlackman,ippWinHamming,ippWinHann,ippWinRect} IppWinType; - -typedef enum { ippButterworth, ippChebyshev1 } IppsIIRFilterType; - -typedef enum { ippZCR=0, ippZCXor, ippZCC } IppsZCType; - -#if !defined( _OWN_BLDPCS ) - -typedef struct { - int left; - int right; -} IppsROI; - -typedef struct RandUniState_8u IppsRandUniState_8u; -typedef struct RandUniState_16s IppsRandUniState_16s; -typedef struct RandUniState_32f IppsRandUniState_32f; -typedef struct RandUniState_64f IppsRandUniState_64f; - -typedef struct RandGaussState_8u IppsRandGaussState_8u; -typedef struct RandGaussState_16s IppsRandGaussState_16s; -typedef struct RandGaussState_32f IppsRandGaussState_32f; -typedef struct RandGaussState_64f IppsRandGaussState_64f; - -typedef struct FFTSpec_C_32fc IppsFFTSpec_C_32fc; -typedef struct FFTSpec_C_32f IppsFFTSpec_C_32f; -typedef struct FFTSpec_R_32f IppsFFTSpec_R_32f; - -typedef struct FFTSpec_C_64fc IppsFFTSpec_C_64fc; -typedef struct FFTSpec_C_64f IppsFFTSpec_C_64f; -typedef struct FFTSpec_R_64f IppsFFTSpec_R_64f; - -typedef struct DFTSpec_C_32fc IppsDFTSpec_C_32fc; -typedef struct DFTSpec_C_32f IppsDFTSpec_C_32f; -typedef struct DFTSpec_R_32f IppsDFTSpec_R_32f; - -typedef struct DFTSpec_C_64fc IppsDFTSpec_C_64fc; -typedef struct DFTSpec_C_64f IppsDFTSpec_C_64f; -typedef struct DFTSpec_R_64f IppsDFTSpec_R_64f; - -typedef struct DCTFwdSpec_32f IppsDCTFwdSpec_32f; -typedef struct DCTInvSpec_32f IppsDCTInvSpec_32f; - -typedef struct DCTFwdSpec_64f IppsDCTFwdSpec_64f; -typedef struct DCTInvSpec_64f IppsDCTInvSpec_64f; - -typedef struct sWTFwdState_32f IppsWTFwdState_32f; -typedef struct sWTFwdState_8u32f IppsWTFwdState_8u32f; -typedef struct sWTFwdState_16s32f IppsWTFwdState_16s32f; -typedef struct sWTFwdState_16u32f IppsWTFwdState_16u32f; -typedef struct sWTInvState_32f IppsWTInvState_32f; -typedef struct sWTInvState_32f8u IppsWTInvState_32f8u; -typedef struct sWTInvState_32f16s IppsWTInvState_32f16s; -typedef struct sWTInvState_32f16u IppsWTInvState_32f16u; - -typedef struct IIRState_32f IppsIIRState_32f; -typedef struct IIRState_32fc IppsIIRState_32fc; -typedef struct IIRState32f_16s IppsIIRState32f_16s; -typedef struct IIRState32fc_16sc IppsIIRState32fc_16sc; -typedef struct IIRState_64f IppsIIRState_64f; -typedef struct IIRState_64fc IppsIIRState_64fc; -typedef struct IIRState64f_32f IppsIIRState64f_32f; -typedef struct IIRState64fc_32fc IppsIIRState64fc_32fc; -typedef struct IIRState64f_32s IppsIIRState64f_32s; -typedef struct IIRState64fc_32sc IppsIIRState64fc_32sc; -typedef struct IIRState64f_16s IppsIIRState64f_16s; -typedef struct IIRState64fc_16sc IppsIIRState64fc_16sc; - -typedef struct FIRSpec_32f IppsFIRSpec_32f; -typedef struct FIRSpec_64f IppsFIRSpec_64f; -typedef struct FIRSpec_32fc IppsFIRSpec_32fc; -typedef struct FIRSpec_64fc IppsFIRSpec_64fc; - -typedef struct FIRLMSState_32f IppsFIRLMSState_32f; -typedef struct FIRLMSState32f_16s IppsFIRLMSState32f_16s; - -typedef struct HilbertSpec IppsHilbertSpec; - -typedef struct FIRSparseState_32f IppsFIRSparseState_32f; -typedef struct IIRSparseState_32f IppsIIRSparseState_32f; - -typedef struct ResamplingPolyphase_16s IppsResamplingPolyphase_16s; -typedef struct ResamplingPolyphaseFixed_16s IppsResamplingPolyphaseFixed_16s; -typedef struct ResamplingPolyphase_32f IppsResamplingPolyphase_32f; -typedef struct ResamplingPolyphaseFixed_32f IppsResamplingPolyphaseFixed_32f; - -#endif /* _OWN_BLDPCS */ - -/*****************************************************************************/ -/* Below are ippIP domain specific definitions */ -/*****************************************************************************/ -#define IPP_TEMPORAL_COPY 0x0 -#define IPP_NONTEMPORAL_STORE 0x01 -#define IPP_NONTEMPORAL_LOAD 0x02 - -typedef int IppEnum; - -#define IPP_DEG_TO_RAD( deg ) ( (deg)/180.0 * IPP_PI ) - -typedef enum { - ippiNormNone = 0x00000000, /* default */ - ippiNorm = 0x00000100, /* normalized form */ - ippiNormCoefficient = 0x00000200, /* correlation coefficient in the range [-1.0 ... 1.0] */ - ippiNormMask = 0x0000FF00 -} IppiNormOp; - -typedef enum { - ippiROIFull = 0x00000000, - ippiROIValid = 0x00010000, - ippiROISame = 0x00020000, - ippiROIMask = 0x00FF0000 -} IppiROIShape; - -typedef enum { - ippC0 = 0, - ippC1 = 1, - ippC2 = 2, - ippC3 = 3, - ippC4 = 4, - ippP2 = 5, - ippP3 = 6, - ippP4 = 7, - ippAC1 = 8, - ippAC4 = 9, - ippA0C4 = 10, - ippAP4 = 11 -} IppChannels; - -typedef enum _IppiBorderType { - ippBorderConst = 0, - ippBorderRepl = 1, - ippBorderWrap = 2, - ippBorderMirror = 3, /* left border: 012... -> 21012... */ - ippBorderMirrorR = 4, /* left border: 012... -> 210012... */ - ippBorderInMem = 6, - ippBorderTransp = 7, - ippBorderInMemTop = 0x0010, - ippBorderInMemBottom = 0x0020, - ippBorderInMemLeft = 0x0040, - ippBorderInMemRight = 0x0080 -} IppiBorderType; - -typedef enum { - ippAxsHorizontal, - ippAxsVertical, - ippAxsBoth, - ippAxs45, - ippAxs135 -} IppiAxis; - -typedef struct { - int x; - int y; - int width; - int height; -} IppiRect; - -typedef struct { - int x; - int y; -} IppiPoint; - -typedef struct { - int width; - int height; -} IppiSize; - -typedef struct { - Ipp32f x; - Ipp32f y; -} IppiPoint_32f; - -typedef enum _IppiMaskSize { - ippMskSize1x3 = 13, - ippMskSize1x5 = 15, - ippMskSize3x1 = 31, - ippMskSize3x3 = 33, - ippMskSize5x1 = 51, - ippMskSize5x5 = 55 -} IppiMaskSize; - -enum { - IPPI_INTER_NN = 1, - IPPI_INTER_LINEAR = 2, - IPPI_INTER_CUBIC = 4, - IPPI_INTER_CUBIC2P_BSPLINE, /* two-parameter cubic filter (B=1, C=0) */ - IPPI_INTER_CUBIC2P_CATMULLROM, /* two-parameter cubic filter (B=0, C=1/2) */ - IPPI_INTER_CUBIC2P_B05C03, /* two-parameter cubic filter (B=1/2, C=3/10) */ - IPPI_INTER_SUPER = 8, - IPPI_INTER_LANCZOS = 16, - IPPI_ANTIALIASING = (1 << 29), - IPPI_SUBPIXEL_EDGE = (1 << 30), - IPPI_SMOOTH_EDGE = (1 << 31) -}; - -typedef enum { - ippNearest = IPPI_INTER_NN, - ippLinear = IPPI_INTER_LINEAR, - ippCubic = IPPI_INTER_CUBIC2P_CATMULLROM, - ippLanczos = IPPI_INTER_LANCZOS, - ippHahn = 0, - ippSuper = IPPI_INTER_SUPER -} IppiInterpolationType; - -typedef enum { - ippPolyphase_1_2, - ippPolyphase_3_5, - ippPolyphase_2_3, - ippPolyphase_7_10, - ippPolyphase_3_4 -} IppiFraction; - -enum { - IPP_FASTN_ORIENTATION = 0x0001, - IPP_FASTN_NMS = 0x0002, - IPP_FASTN_CIRCLE = 0X0004, - IPP_FASTN_SCORE_MODE0 = 0X0020 -}; - -#if !defined( _OWN_BLDPCS ) - -typedef enum { - ippAlphaOver, - ippAlphaIn, - ippAlphaOut, - ippAlphaATop, - ippAlphaXor, - ippAlphaPlus, - ippAlphaOverPremul, - ippAlphaInPremul, - ippAlphaOutPremul, - ippAlphaATopPremul, - ippAlphaXorPremul, - ippAlphaPlusPremul -} IppiAlphaType; - -typedef struct DeconvFFTState_32f_C1R IppiDeconvFFTState_32f_C1R; -typedef struct DeconvFFTState_32f_C3R IppiDeconvFFTState_32f_C3R; -typedef struct DeconvLR_32f_C1R IppiDeconvLR_32f_C1R; -typedef struct DeconvLR_32f_C3R IppiDeconvLR_32f_C3R; - -typedef enum { - ippiFilterBilateralGauss = 100, - ippiFilterBilateralGaussFast = 101 -} IppiFilterBilateralType; - -typedef struct FilterBilateralSpec IppiFilterBilateralSpec; - -typedef enum { - ippDistNormL1 = 0x00000002 -} IppiDistanceMethodType; - -typedef enum { - ippResizeFilterHann, - ippResizeFilterLanczos -} IppiResizeFilterType; - -typedef struct ResizeFilterState IppiResizeFilterState; - -typedef struct { - Ipp32u borderLeft; - Ipp32u borderTop; - Ipp32u borderRight; - Ipp32u borderBottom; -} IppiBorderSize; - -typedef enum { - ippWarpForward, - ippWarpBackward, -} IppiWarpDirection; - -typedef enum { - ippWarpAffine, - ippWarpPerspective, - ippWarpBilinear, -} IppiWarpTransformType; - - -typedef struct ResizeSpec_32f IppiResizeSpec_32f; -typedef struct ResizeYUV422Spec IppiResizeYUV422Spec; -typedef struct ResizeYUV420Spec IppiResizeYUV420Spec; - -typedef struct ResizeSpec_64f IppiResizeSpec_64f; - -typedef struct IppiWarpSpec IppiWarpSpec; - -typedef struct FilterBorderSpec IppiFilterBorderSpec; - -typedef struct ThresholdAdaptiveSpec IppiThresholdAdaptiveSpec; - -typedef struct HistogramSpec IppiHistogramSpec; - -typedef struct { - int cvCompatible; /* openCV compatible output format */ - int cellSize; /* squre cell size (pixels) */ - int blockSize; /* square block size (pixels) */ - int blockStride; /* block displacement (the same for x- and y- directions) */ - int nbins; /* required number of bins */ - Ipp32f sigma; /* gaussian factor of HOG block weights */ - Ipp32f l2thresh; /* normalization factor */ - IppiSize winSize; /* detection window size (pixels) */ -} IppiHOGConfig; - -typedef struct FFT2DSpec_C_32fc IppiFFTSpec_C_32fc; -typedef struct FFT2DSpec_R_32f IppiFFTSpec_R_32f; - -typedef struct DFT2DSpec_C_32fc IppiDFTSpec_C_32fc; -typedef struct DFT2DSpec_R_32f IppiDFTSpec_R_32f; - -typedef struct DCT2DFwdSpec_32f IppiDCTFwdSpec_32f; -typedef struct DCT2DInvSpec_32f IppiDCTInvSpec_32f; - -typedef struct iWTFwdSpec_32f_C1R IppiWTFwdSpec_32f_C1R; -typedef struct iWTInvSpec_32f_C1R IppiWTInvSpec_32f_C1R; -typedef struct iWTFwdSpec_32f_C3R IppiWTFwdSpec_32f_C3R; -typedef struct iWTInvSpec_32f_C3R IppiWTInvSpec_32f_C3R; - -typedef struct MomentState64f IppiMomentState_64f; -typedef Ipp64f IppiHuMoment_64f[7]; - -typedef struct LUT_Spec IppiLUT_Spec; - -#define IPP_HOG_MAX_CELL (16) /* max size of CELL */ -#define IPP_HOG_MAX_BLOCK (64) /* max size of BLOCK */ -#define IPP_HOG_MAX_BINS (16) /* max number of BINS */ - -typedef struct _ipHOG IppiHOGSpec; - -#endif /* _OWN_BLDPCS */ - - - /**** Below are 3D Image (Volume) Processing specific definitions ****/ - -typedef struct { - int width; - int height; - int depth; -} IpprVolume; - -typedef struct { - int x; - int y; - int z; - int width; - int height; - int depth; -} IpprCuboid; - -typedef struct { - int x; - int y; - int z; -} IpprPoint; - -/*****************************************************************************/ -/* Below are ippCV domain specific definitions */ -/*****************************************************************************/ - -typedef enum _IppiDifferentialKernel -{ - ippFilterSobelVert, - ippFilterSobelHoriz, - ippFilterSobel, - ippFilterScharrVert, - ippFilterScharrHoriz, - ippFilterScharr, - ippFilterCentralDiffVert, - ippFilterCentralDiffHoriz, - ippFilterCentralDiff, -}IppiDifferentialKernel; - -#if !defined( _OWN_BLDPCS ) - -typedef enum _IppiKernelType { - ippKernelSobel = 0, - ippKernelScharr = 1, - ippKernelSobelNeg = 2 -} IppiKernelType; - -typedef enum _IppiNorm { - ippiNormInf = 0, - ippiNormL1 = 1, - ippiNormL2 = 2, - ippiNormFM = 3 -} IppiNorm; - -typedef struct ipcvMorphState IppiMorphState; -typedef struct ipcvMorphAdvState IppiMorphAdvState; -typedef struct ipcvMorphGrayState_8u IppiMorphGrayState_8u; -typedef struct ipcvMorphGrayState_32f IppiMorphGrayState_32f; - -typedef struct ipcvConvState IppiConvState; - -typedef struct _IppiConnectedComp { - Ipp64f area; /* area of the segmented component */ - Ipp64f value[3];/* gray scale value of the segmented component */ - IppiRect rect; /* bounding rectangle of the segmented component */ -} IppiConnectedComp; - -typedef struct PyramidState IppiPyramidState; - -typedef IppiPyramidState IppiPyramidDownState_8u_C1R; -typedef IppiPyramidState IppiPyramidDownState_16u_C1R; -typedef IppiPyramidState IppiPyramidDownState_32f_C1R; -typedef IppiPyramidState IppiPyramidDownState_8u_C3R; -typedef IppiPyramidState IppiPyramidDownState_16u_C3R; -typedef IppiPyramidState IppiPyramidDownState_32f_C3R; -typedef IppiPyramidState IppiPyramidUpState_8u_C1R; -typedef IppiPyramidState IppiPyramidUpState_16u_C1R; -typedef IppiPyramidState IppiPyramidUpState_32f_C1R; -typedef IppiPyramidState IppiPyramidUpState_8u_C3R; -typedef IppiPyramidState IppiPyramidUpState_16u_C3R; -typedef IppiPyramidState IppiPyramidUpState_32f_C3R; - - -typedef struct _IppiPyramid { - Ipp8u **pImage; - IppiSize *pRoi; - Ipp64f *pRate; - int *pStep; - Ipp8u *pState; - int level; -} IppiPyramid; - -typedef struct OptFlowPyrLK IppiOptFlowPyrLK; - -typedef IppiOptFlowPyrLK IppiOptFlowPyrLK_8u_C1R; -typedef IppiOptFlowPyrLK IppiOptFlowPyrLK_16u_C1R; -typedef IppiOptFlowPyrLK IppiOptFlowPyrLK_32f_C1R; - -typedef struct ipcvHaarClassifier_32f IppiHaarClassifier_32f; -typedef struct ipcvHaarClassifier_32s IppiHaarClassifier_32s; - -typedef struct ipcvFGHistogramState_8u_C1R IppFGHistogramState_8u_C1R; -typedef struct ipcvFGHistogramState_8u_C3R IppFGHistogramState_8u_C3R; - -typedef struct ipcvFGGaussianState_8u_C1R IppFGGaussianState_8u_C1R; -typedef struct ipcvFGGaussianState_8u_C3R IppFGGaussianState_8u_C3R; - -typedef enum _IppiInpaintFlag { - IPP_INPAINT_TELEA = 0, - IPP_INPAINT_NS = 1 -} IppiInpaintFlag; - -typedef struct ippcvFilterGaussianSpec IppFilterGaussianSpec; - -typedef struct ipcvInpaintState_8u IppiInpaintState_8u_C1R; -typedef struct ipcvInpaintState_8u IppiInpaintState_8u_C3R; - -typedef struct HoughProbSpec IppiHoughProbSpec; - -typedef struct FastNSpec IppiFastNSpec; - -typedef struct _IppiCornerFastN { - int x; - int y; - int cornerType; - int orientation; - float angle; - float score; -} IppiCornerFastN; - -typedef struct FGMMState_8u_C3R IppFGMMState_8u_C3R; - -typedef struct -{ - unsigned int numFrames; - unsigned int maxNGauss; - Ipp32f varInit; - Ipp32f varMin; - Ipp32f varMax; - Ipp32f varWBRatio; - Ipp32f bckgThr; - Ipp32f varNGRatio; - Ipp32f reduction; - Ipp8u shadowValue; - char shadowFlag; - Ipp32f shadowRatio; -} IppFGMModel; - -#endif /* _OWN_BLDPCS */ - -#define IPP_SEGMENT_QUEUE 0x01 -#define IPP_SEGMENT_DISTANCE 0x02 -#define IPP_SEGMENT_BORDER_4 0x40 -#define IPP_SEGMENT_BORDER_8 0x80 - -#define IPP_TRUNC(a,b) ((a)&~((b)-1)) -#define IPP_APPEND(a,b) (((a)+(b)-1)&~((b)-1)) - -/*****************************************************************************/ -/* Below are ippCC domain specific definitions */ -/*****************************************************************************/ -enum { - IPP_UPPER = 1, - IPP_LEFT = 2, - IPP_CENTER = 4, - IPP_RIGHT = 8, - IPP_LOWER = 16, - IPP_UPPER_LEFT = 32, - IPP_UPPER_RIGHT = 64, - IPP_LOWER_LEFT = 128, - IPP_LOWER_RIGHT = 256 -}; - -#if !defined( _OWN_BLDPCS ) - -typedef enum { - ippDitherNone, - ippDitherFS, - ippDitherJJN, - ippDitherStucki, - ippDitherBayer -} IppiDitherType; - -#endif /* _OWN_BLDPCS */ - -/*****************************************************************************/ -/* Below are ippCH domain specific definitions */ -/*****************************************************************************/ - -#if !defined( _OWN_BLDPCS ) - -typedef struct { - void *pFind; - int lenFind; -} IppRegExpFind; - -typedef struct RegExpState IppRegExpState; - -typedef enum { - ippFmtASCII = 0, - ippFmtUTF8 -} IppRegExpFormat; - -typedef struct RegExpReplaceState IppRegExpReplaceState; - -#endif /* _OWN_BLDPCS */ - -/*****************************************************************************/ -/* Below are ippDC domain specific definitions */ -/*****************************************************************************/ - -#if !defined ( _OWN_BLDPCS ) - -typedef struct MTFState_8u IppMTFState_8u; - -typedef enum { - ippBWTItohTanakaLimSort, - ippBWTItohTanakaUnlimSort, - ippBWTSuffixSort, - ippBWTAutoSort -} IppBWTSortAlgorithmHint; - -typedef struct LZSSState_8u IppLZSSState_8u; - -typedef struct LZ77State_8u IppLZ77State_8u; -typedef enum{ - IppLZ77FastCompr, - IppLZ77AverageCompr, - IppLZ77BestCompr -} IppLZ77ComprLevel; -typedef enum{ - IppLZ77NoChcksm, - IppLZ77Adler32, - IppLZ77CRC32 -} IppLZ77Chcksm; -typedef enum { - IppLZ77NoFlush, - IppLZ77SyncFlush, - IppLZ77FullFlush, - IppLZ77FinishFlush -} IppLZ77Flush; -typedef struct IppLZ77Pairs_16u { - Ipp16u length; - Ipp16u offset; -} IppLZ77Pair; -typedef enum { - IppLZ77StatusInit, - IppLZ77StatusLZ77Process, - IppLZ77StatusHuffProcess, - IppLZ77StatusFinal -} IppLZ77DeflateStatus; -typedef enum { - IppLZ77UseFixed, - IppLZ77UseDynamic, - IppLZ77UseStored -} IppLZ77HuffMode; -typedef enum { - IppLZ77InflateStatusInit, - IppLZ77InflateStatusHuffProcess, - IppLZ77InflateStatusLZ77Process, - IppLZ77InflateStatusFinal -} IppLZ77InflateStatus; - -typedef struct IppInflateState { - const Ipp8u* pWindow; /* pointer to the sliding window - (the dictionary for the LZ77 algorithm) */ - unsigned int winSize; /* size of the sliding window */ - unsigned int tableType; /* type of Huffman code tables - (for example, 0 - tables for Fixed Huffman codes) */ - unsigned int tableBufferSize; /* (ENOUGH = 2048) * (sizeof(code) = 4) - - sizeof(IppInflateState) */ -} IppInflateState; - -typedef enum { /* this type is used as a translator of the inflate_mode type from zlib */ - ippTYPE, - ippLEN, - ippLENEXT -} IppInflateMode; - -typedef struct { - Ipp16u freq; - Ipp16u code; -} IppDeflateFreqTable; - -typedef struct { - Ipp16u code; - Ipp16u len; -} IppDeflateHuffCode; - -typedef struct RLEState_BZ2 IppRLEState_BZ2; - -typedef struct EncodeHuffState_BZ2 IppEncodeHuffState_BZ2; - -typedef struct DecodeHuffState_BZ2 IppDecodeHuffState_BZ2; - -typedef enum { - IppLZO1XST, /* Single-threaded, generic LZO-compatible*/ - IppLZO1XMT /* Multi-threaded */ -} IppLZOMethod ; - -typedef struct LZOState_8u IppLZOState_8u; - -#endif /* _OWN_BLDPCS */ - -/* ///////////////////////////////////////////////////////////////////////////// -// The following enumerator defines a status of IPP operations -// negative value means error -*/ -typedef enum { - /* errors */ - ippStsNotSupportedModeErr = -9999,/* The requested mode is currently not supported. */ - ippStsCpuNotSupportedErr = -9998,/* The target CPU is not supported. */ - ippStsInplaceModeNotSupportedErr = -9997,/* The inplace operation is currently not supported. */ - - ippStsWarpTransformTypeErr = -233, /* The warp transform type is illegal */ - ippStsExceededSizeErr = -232, /* Requested size exceeded the maximum supported ROI size */ - ippStsWarpDirectionErr = -231, /* The warp transform direction is illegal */ - - ippStsFilterTypeErr = -230, /* The filter type is incorrect or not supported */ - - ippStsNormErr = -229, /* The norm is incorrect or not supported */ - - ippStsAlgTypeErr = -228, /* Algorithm type is not supported. */ - ippStsMisalignedOffsetErr = -227, /* The offset is not aligned with an element. */ - - ippStsQuadraticNonResidueErr = -226, /* SQRT operation on quadratic non-residue value. */ - - ippStsBorderErr = -225, /* Illegal value for border type.*/ - - ippStsDitherTypeErr = -224, /* Dithering type is not supported. */ - ippStsH264BufferFullErr = -223, /* Buffer for the output bitstream is full. */ - ippStsWrongAffinitySettingErr= -222, /* An affinity setting does not correspond to the affinity setting that was set by f.ippSetAffinity(). */ - ippStsLoadDynErr = -221, /* Error when loading the dynamic library. */ - - ippStsPointAtInfinity = -220, /* Point at infinity is detected. */ - - ippStsUnknownStatusCodeErr = -216, /* Unknown status code. */ - - ippStsOFBSizeErr = -215, /* Incorrect value for crypto OFB block size. */ - ippStsLzoBrokenStreamErr = -214, /* LZO safe decompression function cannot decode LZO stream. */ - - ippStsRoundModeNotSupportedErr = -213, /* Rounding mode is not supported. */ - ippStsDecimateFractionErr = -212, /* Fraction in Decimate is not supported. */ - ippStsWeightErr = -211, /* Incorrect value for weight. */ - - ippStsQualityIndexErr = -210, /* Cannot calculate the quality index for an image filled with a constant. */ - ippStsIIRPassbandRippleErr = -209, /* Ripple in passband for Chebyshev1 design is less than zero, equal to zero, or greater than 29. */ - ippStsFilterFrequencyErr = -208, /* Cutoff frequency of filter is less than zero, equal to zero, or greater than 0.5. */ - ippStsFIRGenOrderErr = -207, /* Order of the FIR filter for design is less than 1. */ - ippStsIIRGenOrderErr = -206, /* Order of the IIR filter for design is less than 1, or greater than 12. */ - - ippStsConvergeErr = -205, /* The algorithm does not converge. */ - ippStsSizeMatchMatrixErr = -204, /* The sizes of the source matrices are unsuitable. */ - ippStsCountMatrixErr = -203, /* Count value is less than, or equal to zero. */ - ippStsRoiShiftMatrixErr = -202, /* RoiShift value is negative or not divisible by the size of the data type. */ - - ippStsResizeNoOperationErr = -201, /* One of the output image dimensions is less than 1 pixel. */ - ippStsSrcDataErr = -200, /* The source buffer contains unsupported data. */ - ippStsMaxLenHuffCodeErr = -199, /* Huff: Max length of Huffman code is more than the expected one. */ - ippStsCodeLenTableErr = -198, /* Huff: Invalid codeLenTable. */ - ippStsFreqTableErr = -197, /* Huff: Invalid freqTable. */ - - ippStsIncompleteContextErr = -196, /* Crypto: set up of context is not complete. */ - - ippStsSingularErr = -195, /* Matrix is singular. */ - ippStsSparseErr = -194, /* Positions of taps are not in ascending order, or are negative, or repetitive. */ - ippStsBitOffsetErr = -193, /* Incorrect bit offset value. */ - ippStsQPErr = -192, /* Incorrect quantization parameter value. */ - ippStsVLCErr = -191, /* Illegal VLC or FLC is detected during stream decoding. */ - ippStsRegExpOptionsErr = -190, /* RegExp: Options for the pattern are incorrect. */ - ippStsRegExpErr = -189, /* RegExp: The structure pRegExpState contains incorrect data. */ - ippStsRegExpMatchLimitErr = -188, /* RegExp: The match limit is exhausted. */ - ippStsRegExpQuantifierErr = -187, /* RegExp: Incorrect quantifier. */ - ippStsRegExpGroupingErr = -186, /* RegExp: Incorrect grouping. */ - ippStsRegExpBackRefErr = -185, /* RegExp: Incorrect back reference. */ - ippStsRegExpChClassErr = -184, /* RegExp: Incorrect character class. */ - ippStsRegExpMetaChErr = -183, /* RegExp: Incorrect metacharacter. */ - ippStsStrideMatrixErr = -182, /* Stride value is not positive or not divisible by the size of the data type. */ - ippStsCTRSizeErr = -181, /* Incorrect value for crypto CTR block size. */ - ippStsJPEG2KCodeBlockIsNotAttached =-180, /* Codeblock parameters are not attached to the state structure. */ - ippStsNotPosDefErr = -179, /* Matrix is not positive definite. */ - - ippStsEphemeralKeyErr = -178, /* ECC: Invalid ephemeral key. */ - ippStsMessageErr = -177, /* ECC: Invalid message digest. */ - ippStsShareKeyErr = -176, /* ECC: Invalid share key. */ - ippStsIvalidPublicKey = -175, /* ECC: Invalid public key. */ - ippStsIvalidPrivateKey = -174, /* ECC: Invalid private key. */ - ippStsOutOfECErr = -173, /* ECC: Point out of EC. */ - ippStsECCInvalidFlagErr = -172, /* ECC: Invalid Flag. */ - - ippStsMP3FrameHeaderErr = -171, /* Error in fields of the IppMP3FrameHeader structure. */ - ippStsMP3SideInfoErr = -170, /* Error in fields of the IppMP3SideInfo structure. */ - - ippStsBlockStepErr = -169, /* Step for Block is less than 8. */ - ippStsMBStepErr = -168, /* Step for MB is less than 16. */ - - ippStsAacPrgNumErr = -167, /* AAC: Invalid number of elements for one program. */ - ippStsAacSectCbErr = -166, /* AAC: Invalid section codebook. */ - ippStsAacSfValErr = -164, /* AAC: Invalid scalefactor value. */ - ippStsAacCoefValErr = -163, /* AAC: Invalid quantized coefficient value. */ - ippStsAacMaxSfbErr = -162, /* AAC: Invalid coefficient index. */ - ippStsAacPredSfbErr = -161, /* AAC: Invalid predicted coefficient index. */ - ippStsAacPlsDataErr = -160, /* AAC: Invalid pulse data attributes. */ - ippStsAacGainCtrErr = -159, /* AAC: Gain control is not supported. */ - ippStsAacSectErr = -158, /* AAC: Invalid number of sections. */ - ippStsAacTnsNumFiltErr = -157, /* AAC: Invalid number of TNS filters. */ - ippStsAacTnsLenErr = -156, /* AAC: Invalid length of TNS region. */ - ippStsAacTnsOrderErr = -155, /* AAC: Invalid order of TNS filter. */ - ippStsAacTnsCoefResErr = -154, /* AAC: Invalid bit-resolution for TNS filter coefficients. */ - ippStsAacTnsCoefErr = -153, /* AAC: Invalid coefficients of TNS filter. */ - ippStsAacTnsDirectErr = -152, /* AAC: Invalid direction TNS filter. */ - ippStsAacTnsProfileErr = -151, /* AAC: Invalid TNS profile. */ - ippStsAacErr = -150, /* AAC: Internal error. */ - ippStsAacBitOffsetErr = -149, /* AAC: Invalid current bit offset in bitstream. */ - ippStsAacAdtsSyncWordErr = -148, /* AAC: Invalid ADTS syncword. */ - ippStsAacSmplRateIdxErr = -147, /* AAC: Invalid sample rate index. */ - ippStsAacWinLenErr = -146, /* AAC: Invalid window length (not short or long). */ - ippStsAacWinGrpErr = -145, /* AAC: Invalid number of groups for current window length. */ - ippStsAacWinSeqErr = -144, /* AAC: Invalid window sequence range. */ - ippStsAacComWinErr = -143, /* AAC: Invalid common window flag. */ - ippStsAacStereoMaskErr = -142, /* AAC: Invalid stereo mask. */ - ippStsAacChanErr = -141, /* AAC: Invalid channel number. */ - ippStsAacMonoStereoErr = -140, /* AAC: Invalid mono-stereo flag. */ - ippStsAacStereoLayerErr = -139, /* AAC: Invalid this Stereo Layer flag. */ - ippStsAacMonoLayerErr = -138, /* AAC: Invalid this Mono Layer flag. */ - ippStsAacScalableErr = -137, /* AAC: Invalid scalable object flag. */ - ippStsAacObjTypeErr = -136, /* AAC: Invalid audio object type. */ - ippStsAacWinShapeErr = -135, /* AAC: Invalid window shape. */ - ippStsAacPcmModeErr = -134, /* AAC: Invalid PCM output interleaving indicator. */ - ippStsVLCUsrTblHeaderErr = -133, /* VLC: Invalid header inside table. */ - ippStsVLCUsrTblUnsupportedFmtErr = -132, /* VLC: Table format is not supported. */ - ippStsVLCUsrTblEscAlgTypeErr = -131, /* VLC: Ecs-algorithm is not supported. */ - ippStsVLCUsrTblEscCodeLengthErr = -130, /* VLC: Esc-code length inside table header is incorrect. */ - ippStsVLCUsrTblCodeLengthErr = -129, /* VLC: Code length inside table is incorrect. */ - ippStsVLCInternalTblErr = -128, /* VLC: Invalid internal table. */ - ippStsVLCInputDataErr = -127, /* VLC: Invalid input data. */ - ippStsVLCAACEscCodeLengthErr = -126, /* VLC: Invalid AAC-Esc code length. */ - ippStsNoiseRangeErr = -125, /* Noise value for Wiener Filter is out of range. */ - ippStsUnderRunErr = -124, /* Error in data under run. */ - ippStsPaddingErr = -123, /* Detected padding error indicates the possible data corruption. */ - ippStsCFBSizeErr = -122, /* Incorrect value for crypto CFB block size. */ - ippStsPaddingSchemeErr = -121, /* Invalid padding scheme. */ - ippStsInvalidCryptoKeyErr = -120, /* A compromised key causes suspansion of the requested cryptographic operation. */ - ippStsLengthErr = -119, /* Incorrect value for string length. */ - ippStsBadModulusErr = -118, /* Bad modulus caused a failure in module inversion. */ - ippStsLPCCalcErr = -117, /* Cannot evaluate linear prediction. */ - ippStsRCCalcErr = -116, /* Cannot compute reflection coefficients. */ - ippStsIncorrectLSPErr = -115, /* Incorrect values for Linear Spectral Pair. */ - ippStsNoRootFoundErr = -114, /* No roots are found for equation. */ - ippStsJPEG2KBadPassNumber = -113, /* Pass number exceeds allowed boundaries [0,nOfPasses-1]. */ - ippStsJPEG2KDamagedCodeBlock= -112, /* Codeblock for decoding contains damaged data. */ - ippStsH263CBPYCodeErr = -111, /* Illegal Huffman code is detected through CBPY stream processing. */ - ippStsH263MCBPCInterCodeErr = -110, /* Illegal Huffman code is detected through MCBPC Inter stream processing. */ - ippStsH263MCBPCIntraCodeErr = -109, /* Illegal Huffman code is detected through MCBPC Intra stream processing. */ - ippStsNotEvenStepErr = -108, /* Step value is not pixel multiple. */ - ippStsHistoNofLevelsErr = -107, /* Number of levels for histogram is less than 2. */ - ippStsLUTNofLevelsErr = -106, /* Number of levels for LUT is less than 2. */ - ippStsMP4BitOffsetErr = -105, /* Incorrect bit offset value. */ - ippStsMP4QPErr = -104, /* Incorrect quantization parameter. */ - ippStsMP4BlockIdxErr = -103, /* Incorrect block index. */ - ippStsMP4BlockTypeErr = -102, /* Incorrect block type. */ - ippStsMP4MVCodeErr = -101, /* Illegal Huffman code is detected during MV stream processing. */ - ippStsMP4VLCCodeErr = -100, /* Illegal Huffman code is detected during VLC stream processing. */ - ippStsMP4DCCodeErr = -99, /* Illegal code is detected during DC stream processing. */ - ippStsMP4FcodeErr = -98, /* Incorrect fcode value. */ - ippStsMP4AlignErr = -97, /* Incorrect buffer alignment . */ - ippStsMP4TempDiffErr = -96, /* Incorrect temporal difference. */ - ippStsMP4BlockSizeErr = -95, /* Incorrect size of a block or macroblock. */ - ippStsMP4ZeroBABErr = -94, /* All BAB values are equal to zero. */ - ippStsMP4PredDirErr = -93, /* Incorrect prediction direction. */ - ippStsMP4BitsPerPixelErr = -92, /* Incorrect number of bits per pixel. */ - ippStsMP4VideoCompModeErr = -91, /* Incorrect video component mode. */ - ippStsMP4LinearModeErr = -90, /* Incorrect DC linear mode. */ - ippStsH263PredModeErr = -83, /* Incorrect Prediction Mode value. */ - ippStsH263BlockStepErr = -82, /* The step value is less than 8. */ - ippStsH263MBStepErr = -81, /* The step value is less than 16. */ - ippStsH263FrameWidthErr = -80, /* The frame width is less than 8. */ - ippStsH263FrameHeightErr = -79, /* The frame height is less than, or equal to zero. */ - ippStsH263ExpandPelsErr = -78, /* Expand pixels number is less than 8. */ - ippStsH263PlaneStepErr = -77, /* Step value is less than the plane width. */ - ippStsH263QuantErr = -76, /* Quantizer value is less than, or equal to zero, or greater than 31. */ - ippStsH263MVCodeErr = -75, /* Illegal Huffman code is detected during MV stream processing. */ - ippStsH263VLCCodeErr = -74, /* Illegal Huffman code is detected during VLC stream processing. */ - ippStsH263DCCodeErr = -73, /* Illegal code is detected during DC stream processing. */ - ippStsH263ZigzagLenErr = -72, /* Zigzag compact length is more than 64. */ - ippStsFBankFreqErr = -71, /* Incorrect value for the filter bank frequency parameter. */ - ippStsFBankFlagErr = -70, /* Incorrect value for the filter bank parameter. */ - ippStsFBankErr = -69, /* Filter bank is not correctly initialized. */ - ippStsNegOccErr = -67, /* Occupation count is negative. */ - ippStsCdbkFlagErr = -66, /* Incorrect value for the codebook flag parameter. */ - ippStsSVDCnvgErr = -65, /* SVD algorithm does not converge. */ - ippStsJPEGHuffTableErr = -64, /* JPEG Huffman table is destroyed. */ - ippStsJPEGDCTRangeErr = -63, /* JPEG DCT coefficient is out of range. */ - ippStsJPEGOutOfBufErr = -62, /* Attempt to access out of the buffer limits. */ - ippStsDrawTextErr = -61, /* System error in the draw text operation. */ - ippStsChannelOrderErr = -60, /* Incorrect order of the destination channels. */ - ippStsZeroMaskValuesErr = -59, /* All values of the mask are equal to zero. */ - ippStsQuadErr = -58, /* The quadrangle is nonconvex or degenerates into triangle, line, or point */ - ippStsRectErr = -57, /* Size of the rectangle region is less than, or equal to 1. */ - ippStsCoeffErr = -56, /* Incorrect values for transformation coefficients. */ - ippStsNoiseValErr = -55, /* Incorrect value for noise amplitude for dithering. */ - ippStsDitherLevelsErr = -54, /* Number of dithering levels is out of range. */ - ippStsNumChannelsErr = -53, /* Number of channels is incorrect, or not supported. */ - ippStsCOIErr = -52, /* COI is out of range. */ - ippStsDivisorErr = -51, /* Divisor is equal to zero, function is aborted. */ - ippStsAlphaTypeErr = -50, /* Illegal type of image compositing operation. */ - ippStsGammaRangeErr = -49, /* Gamma range bounds is less than, or equal to zero. */ - ippStsGrayCoefSumErr = -48, /* Sum of the conversion coefficients must be less than, or equal to 1. */ - ippStsChannelErr = -47, /* Illegal channel number. */ - ippStsToneMagnErr = -46, /* Tone magnitude is less than, or equal to zero. */ - ippStsToneFreqErr = -45, /* Tone frequency is negative, or greater than, or equal to 0.5. */ - ippStsTonePhaseErr = -44, /* Tone phase is negative, or greater than, or equal to 2*PI. */ - ippStsTrnglMagnErr = -43, /* Triangle magnitude is less than, or equal to zero. */ - ippStsTrnglFreqErr = -42, /* Triangle frequency is negative, or greater than, or equal to 0.5. */ - ippStsTrnglPhaseErr = -41, /* Triangle phase is negative, or greater than, or equal to 2*PI. */ - ippStsTrnglAsymErr = -40, /* Triangle asymmetry is less than -PI, or greater than, or equal to PI. */ - ippStsHugeWinErr = -39, /* Kaiser window is too big. */ - ippStsJaehneErr = -38, /* Magnitude value is negative. */ - ippStsStrideErr = -37, /* Stride value is less than the length of the row. */ - ippStsEpsValErr = -36, /* Negative epsilon value. */ - ippStsWtOffsetErr = -35, /* Invalid offset value for wavelet filter. */ - ippStsAnchorErr = -34, /* Anchor point is outside the mask. */ - ippStsMaskSizeErr = -33, /* Invalid mask size. */ - ippStsShiftErr = -32, /* Shift value is less than zero. */ - ippStsSampleFactorErr = -31, /* Sampling factor is less than, or equal to zero. */ - ippStsSamplePhaseErr = -30, /* Phase value is out of range: 0 <= phase < factor. */ - ippStsFIRMRFactorErr = -29, /* MR FIR sampling factor is less than, or equal to zero. */ - ippStsFIRMRPhaseErr = -28, /* MR FIR sampling phase is negative, or greater than, or equal to the sampling factor. */ - ippStsRelFreqErr = -27, /* Relative frequency value is out of range. */ - ippStsFIRLenErr = -26, /* Length of a FIR filter is less than, or equal to zero. */ - ippStsIIROrderErr = -25, /* Order of an IIR filter is not valid. */ - ippStsDlyLineIndexErr = -24, /* Invalid value for the delay line sample index. */ - ippStsResizeFactorErr = -23, /* Resize factor(s) is less than, or equal to zero. */ - ippStsInterpolationErr = -22, /* Invalid interpolation mode. */ - ippStsMirrorFlipErr = -21, /* Invalid flip mode. */ - ippStsMoment00ZeroErr = -20, /* Moment value M(0,0) is too small to continue calculations. */ - ippStsThreshNegLevelErr = -19, /* Negative value of the level in the threshold operation. */ - ippStsThresholdErr = -18, /* Invalid threshold bounds. */ - ippStsContextMatchErr = -17, /* Context parameter does not match the operation. */ - ippStsFftFlagErr = -16, /* Invalid value for the FFT flag parameter. */ - ippStsFftOrderErr = -15, /* Invalid value for the FFT order parameter. */ - ippStsStepErr = -14, /* Step value is not valid. */ - ippStsScaleRangeErr = -13, /* Scale bounds are out of range. */ - ippStsDataTypeErr = -12, /* Data type is incorrect or not supported. */ - ippStsOutOfRangeErr = -11, /* Argument is out of range, or point is outside the image. */ - ippStsDivByZeroErr = -10, /* An attempt to divide by zero. */ - ippStsMemAllocErr = -9, /* Memory allocated for the operation is not enough.*/ - ippStsNullPtrErr = -8, /* Null pointer error. */ - ippStsRangeErr = -7, /* Incorrect values for bounds: the lower bound is greater than the upper bound. */ - ippStsSizeErr = -6, /* Incorrect value for data size. */ - ippStsBadArgErr = -5, /* Incorrect arg/param of the function. */ - ippStsNoMemErr = -4, /* Not enough memory for the operation. */ - ippStsSAReservedErr3 = -3, /* Unknown/unspecified error, -3. */ - ippStsErr = -2, /* Unknown/unspecified error, -2. */ - ippStsSAReservedErr1 = -1, /* Unknown/unspecified error, -1. */ - - /* no errors */ - ippStsNoErr = 0, /* No errors. */ - - /* warnings */ - ippStsNoOperation = 1, /* No operation has been executed. */ - ippStsMisalignedBuf = 2, /* Misaligned pointer in operation in which it must be aligned. */ - ippStsSqrtNegArg = 3, /* Negative value(s) for the argument in the Sqrt function. */ - ippStsInvZero = 4, /* INF result. Zero value was met by InvThresh with zero level. */ - ippStsEvenMedianMaskSize= 5, /* Even size of the Median Filter mask was replaced with the odd one. */ - ippStsDivByZero = 6, /* Zero value(s) for the divisor in the Div function. */ - ippStsLnZeroArg = 7, /* Zero value(s) for the argument in the Ln function. */ - ippStsLnNegArg = 8, /* Negative value(s) for the argument in the Ln function. */ - ippStsNanArg = 9, /* Argument value is not a number. */ - ippStsJPEGMarker = 10, /* JPEG marker in the bitstream. */ - ippStsResFloor = 11, /* All result values are floored. */ - ippStsOverflow = 12, /* Overflow in the operation. */ - ippStsLSFLow = 13, /* Quantized LP synthesis filter stability check is applied at the low boundary of [0,pi]. */ - ippStsLSFHigh = 14, /* Quantized LP synthesis filter stability check is applied at the high boundary of [0,pi]. */ - ippStsLSFLowAndHigh = 15, /* Quantized LP synthesis filter stability check is applied at both boundaries of [0,pi]. */ - ippStsZeroOcc = 16, /* Zero occupation count. */ - ippStsUnderflow = 17, /* Underflow in the operation. */ - ippStsSingularity = 18, /* Singularity in the operation. */ - ippStsDomain = 19, /* Argument is out of the function domain. */ - ippStsNonIntelCpu = 20, /* The target CPU is not Genuine Intel. */ - ippStsCpuMismatch = 21, /* Cannot set the library for the given CPU. */ - ippStsNoIppFunctionFound = 22, /* Application does not contain Intel IPP function calls. */ - ippStsDllNotFoundBestUsed = 23, /* Dispatcher cannot find the newest version of the Intel IPP dll. */ - ippStsNoOperationInDll = 24, /* The function does nothing in the dynamic version of the library. */ - ippStsInsufficientEntropy= 25, /* Generation of the prime/key failed due to insufficient entropy in the random seed and stimulus bit string. */ - ippStsOvermuchStrings = 26, /* Number of destination strings is more than expected. */ - ippStsOverlongString = 27, /* Length of one of the destination strings is more than expected. */ - ippStsAffineQuadChanged = 28, /* 4th vertex of destination quad is not equal to customer's one. */ - ippStsWrongIntersectROI = 29, /* ROI has no intersection with the source or destination ROI. No operation. */ - ippStsWrongIntersectQuad = 30, /* Quadrangle has no intersection with the source or destination ROI. No operation. */ - ippStsSmallerCodebook = 31, /* Size of created codebook is less than the cdbkSize argument. */ - ippStsSrcSizeLessExpected = 32, /* DC: Size of the source buffer is less than the expected one. */ - ippStsDstSizeLessExpected = 33, /* DC: Size of the destination buffer is less than the expected one. */ - ippStsStreamEnd = 34, /* DC: The end of stream processed. */ - ippStsDoubleSize = 35, /* Width or height of image is odd. */ - ippStsNotSupportedCpu = 36, /* The CPU is not supported. */ - ippStsUnknownCacheSize = 37, /* The CPU is supported, but the size of the cache is unknown. */ - ippStsSymKernelExpected = 38, /* The Kernel is not symmetric. */ - ippStsEvenMedianWeight = 39, /* Even weight of the Weighted Median Filter is replaced with the odd one. */ - ippStsWrongIntersectVOI = 40, /* VOI has no intersection with the source or destination volume. No operation. */ - ippStsI18nMsgCatalogInvalid=41, /* Message Catalog is invalid, English message returned. */ - ippStsI18nGetMessageFail = 42, /* Failed to fetch a localized message, English message returned. For more information use errno on Linux* OS and GetLastError on Windows* OS. */ - ippStsWaterfall = 43, /* Cannot load required library, waterfall is used. */ - ippStsPrevLibraryUsed = 44, /* Cannot load required library, previous dynamic library is used. */ - ippStsLLADisabled = 45, /* OpenMP* Low Level Affinity is disabled. */ - ippStsNoAntialiasing = 46, /* The mode does not support antialiasing. */ - ippStsRepetitiveSrcData = 47, /* DC: The source data is too repetitive. */ - ippStsSizeWrn = 48, /* The size does not allow to perform full operation. */ - ippStsFeatureNotSupported = 49, /* Current CPU doesn't support at least 1 of the desired features. */ - ippStsUnknownFeature = 50, /* At least one of the desired features is unknown. */ - ippStsFeaturesCombination = 51, /* Wrong combination of features. */ - ippStsAccurateModeNotSupported = 52 /* Accurate mode is not supported. */ -} IppStatus; - -#define ippStsOk ippStsNoErr - -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __IPPTYPES_H__ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcommon.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcommon.parts deleted file mode 100644 index 62b601cf0f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcommon.parts +++ /dev/null @@ -1,56 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ -Import('*') - -env.PartVersion("9.0.1") -env.PartName("ippcommon") -env.DependsOn([]) - -#prebuild installs prebuild headers instead of src headers. -#internal ipp includes src/primitives/ipp/ -env.Append(CPPPATH=[AbsDir('sources/include/')]) - -# env.Append(CPPDEFINES = '_IPP_BE') #only for BE targets - -#includes to install -install_headers = Pattern(src_dir='include/', - includes=['ippdefs.h', - 'ippversion.h', - 'ippcore.h', - 'ippbase.h', - 'ipptypes.h' - ], - excludes=[], - recursive=True) - -source_headers = Pattern(src_dir='sources/include/', - includes=['*'], - excludes=[], - recursive=True) -parts_file = Pattern(src_dir='.', - includes=['ippcommon.parts'], - excludes=[], - recursive=True) - -env.ExportCPPPATH([AbsDir('sources/include/')]) - -if 'install_package' in env['MODE']: - # All files at /ext/ipp/include - env.InstallTopLevel(install_headers, sub_dir='ext/ipp/include') - env.InstallTopLevel(source_headers, sub_dir='ext/ipp/sources/include') - env.InstallTopLevel(parts_file, sub_dir='ext/ipp/') -#else - env.SdkInclude(install_headers) diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcp.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcp.parts deleted file mode 100644 index a559908e12..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcp.parts +++ /dev/null @@ -1,115 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ -Import('*') - -import os - -env.PartVersion("9.0.1") -env.PartName("ippcp") -env.DependsOn([Component('ippcommon')]) -ipp_libname = '${PART_SHORT_NAME}' - -ipp_src_install_loc = 'epid/src/primitives/${IPP_DIR}/' - -env.ExportCPPPATH([AbsDir('sources/ippcp/src/')]) #ippcpepid needs this - -#includes to install -install_headers = Pattern(src_dir='include/', - includes=[ - 'ippcp.h', - 'ippcpdefs.h', - ], - excludes=[], - recursive=True) -# common headers, for SdkInclude -common_headers = Pattern(src_dir='include/', - includes=['ippdefs.h', - 'ippversion.h', - 'ippcore.h', - 'ippbase.h', - 'ipptypes.h'], - excludes=[], - recursive=True) -#files -ippcp_files = Pattern(src_dir='sources/ippcp/src/', - includes=[ - 'pcp*.c', - ], - excludes=[], - recursive=True) - -ippdir = '' -#internal ipp includes src/primitives/ipp/ -env.Append(CPPPATH=[AbsDir('include/')]) -env.Append(CPPPATH=[AbsDir('sources/ippcp/src/')]) -#ipp defines -env.Append(CPPDEFINES='_IPP_v50_') #required for all ippcp - -env.Append(CPPDEFINES='_IPP_DEBUG') #enable function sanity checking - -if 'install_package' in env['MODE']: - # All files at /ext/ipp/source/include - env.InstallTopLevel(install_headers, sub_dir='ext/ipp/include') - src_files = Pattern(src_dir='sources/ippcp/src/', - includes=['*'], - excludes=[''], - recursive=True) - env.InstallTopLevel(src_files, sub_dir='ext/ipp/sources/ippcp/src') - this_file = Pattern(src_dir='.', - includes=['ippcp.parts'], - excludes=[], - recursive=True) - env.InstallTopLevel(this_file, sub_dir='ext/ipp/') - makefile = Pattern(src_dir='./sources/ippcp', - includes=['Makefile'], - excludes=[], - recursive=True) - env.InstallTopLevel(makefile, sub_dir='ext/ipp/sources/ippcp') - -else: - all_c_files = ippcp_files.files() - outputs = env.Library(ipp_libname, all_c_files) - - env.SdkInclude(install_headers) - env.SdkInclude(common_headers) - if 'use_commercial_ipp' in env['MODE']: - try: - IPPROOT = os.environ['IPPROOT'] - except KeyError, e: - env.PrintError("Necessary environment variable not set: ", - e, show_stack=False) - if env['TARGET_PLATFORM']['OS'] == 'win32': - libpre = '' - libpost = '.lib' - IPP_TH_SYMBOL = 'mt' - else: - libpre = 'lib' - libpost = '.a' - IPP_TH_SYMBOL = '' - if env['TARGET_PLATFORM']['ARCH'] == 'x86': - archdir = 'ia32/' - else: - archdir = 'intel64/' - - ippcp_libname = libpre + 'ippcp' + IPP_TH_SYMBOL + libpost - ippcore_libname = libpre + 'ippcore' + IPP_TH_SYMBOL + libpost - ipp_dir = IPPROOT + '/lib/' + archdir - env.SdkLib(ipp_dir + ippcp_libname) - env.SdkLib(ipp_dir + ippcore_libname) - else: - env.SdkLib(outputs) - if 'install_lib' in env['MODE']: - env.InstallLib(outputs) diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcpepid.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcpepid.parts deleted file mode 100644 index 2913a55d0a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/ippcpepid.parts +++ /dev/null @@ -1,105 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ -Import('*') - -env.PartVersion("9.0.1") -env.PartName("ippcpepid") -env.DependsOn([ - Component('ippcommon'), - Component('ippcp'), -]) - -IPP_LIBNAME = '${PART_SHORT_NAME}' - -env.ExportCPPPATH([AbsDir('sources/ippcp/src/')]) #ippcpepid needs this - -#includes to install -install_headers = Pattern(src_dir='include/', - includes=[ - 'ippcpepid.h', - ], - excludes=[], - recursive=True) -# common headers, for SdkInclude -common_headers = Pattern(src_dir='include/', - includes=['ippdefs.h', - 'ippversion.h', - 'ippcore.h', - 'ippbase.h', - 'ipptypes.h'], - excludes=[], - recursive=True) -#files -ippcp_files = Pattern(src_dir='sources/ippcpepid/src/', - includes=[ - 'pcp*.c', - ], - excludes=['pcpepidmain.c'], - recursive=True) -#Symbols defined in following files are used by ippcpepid library -ippcp_intern_files = Pattern(src_dir='sources/ippcp/src/', - includes=[ - 'pcpmontexpbinca.c', - 'pcpmontred.c', - 'pcpbnuarith.c', - 'pcpbnu32misc.c', - 'pcpbnu32arith.c', - 'pcpbnumisc.c', - ], - recursive=True) - -ippdir = '' -#internal ipp includes src/primitives/ipp/ -env.Append(CPPPATH=[AbsDir('include/')]) -env.Append(CPPPATH=[AbsDir('sources/ippcp/src/')]) -env.Append(CPPPATH=[AbsDir('sources/ippcpepid/src/')]) -#ipp defines -env.Append(CPPDEFINES='_IPP_v50_') #required for all ippcp - -env.Append(CPPDEFINES='_IPP_DEBUG') #enable function sanity checking - -if 'install_package' in env['MODE']: - # All files at /ext/ipp/source/include - env.InstallTopLevel(install_headers, sub_dir='ext/ipp/include') - src_files = Pattern(src_dir='sources/ippcpepid/src/', - includes=['*'], - excludes=['pcpepidmain.c'], - recursive=True) - env.InstallTopLevel(src_files, sub_dir='ext/ipp/sources/ippcpepid/src') - this_file = Pattern(src_dir='.', - includes=['ippcpepid.parts'], - excludes=[], - recursive=True) - env.InstallTopLevel(this_file, sub_dir='ext/ipp/') - makefile = Pattern(src_dir='./sources/ippcpepid', - includes=['Makefile'], - excludes=[], - recursive=True) - env.InstallTopLevel(makefile, sub_dir='ext/ipp/sources/ippcpepid') - -else: - - all_c_files = ippcp_files.files() - if 'use_commercial_ipp' in env['MODE']: - all_c_files = all_c_files + ippcp_intern_files.files() - - outputs = env.Library(IPP_LIBNAME, all_c_files) - - env.SdkLib(outputs) - env.SdkInclude(install_headers) - env.SdkInclude(common_headers) - if 'install_lib' in env['MODE']: - env.InstallLib(outputs) diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/include/owndefs.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/include/owndefs.h deleted file mode 100644 index 1cd2e95d83..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/include/owndefs.h +++ /dev/null @@ -1,934 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Author(s): Alexey Korchuganov -// Anatoly Pluzhnikov -// Igor Astakhov -// Dmitry Kozhaev -// -// Created: 27-Jul-1999 20:27 -// -*/ - -#ifndef __OWNDEFS_H__ -#define __OWNDEFS_H__ - -#if defined( _VXWORKS ) - #include - #undef NONE -#endif - -#include "ippdefs.h" - -#if defined(__INTEL_COMPILER) || defined(_MSC_VER) - #define __INLINE static __inline -#elif defined( __GNUC__ ) - #define __INLINE static __inline__ -#else - #define __INLINE static -#endif - -#if defined(__INTEL_COMPILER) - #define __RESTRICT restrict -#elif !defined( __RESTRICT ) - #define __RESTRICT -#endif - -#if defined( IPP_W32DLL ) - #if defined( _MSC_VER ) || defined( __INTEL_COMPILER ) - #define IPPFUN(type,name,arg) __declspec(dllexport) type __STDCALL name arg - #else - #define IPPFUN(type,name,arg) extern type __STDCALL name arg - #endif -#else - #define IPPFUN(type,name,arg) extern type __STDCALL name arg -#endif - - -/* structure represeting 128 bit unsigned integer type */ - -typedef struct{ - Ipp64u low; - Ipp64u high; -}Ipp128u; - -#define _IPP_PX 0 /* pure C-code ia32 */ -#define _IPP_M5 1 /* Quark (Pentium) - x86+x87 ia32 */ -#define _IPP_M6 2 /* Pentium MMX - MMX ia32 */ -#define _IPP_A6 4 /* Pentium III - SSE ia32 */ -#define _IPP_W7 8 /* Pentium 4 - SSE2 ia32 */ -#define _IPP_T7 16 /* Pentium with x64 support (Nocona) - SSE3 ia32 */ -#define _IPP_V8 32 /* Merom - SSSE3 ia32 */ -#define _IPP_P8 64 /* Penryn - SSE4.1 + tick for SSE4.2 ia32 */ -#define _IPP_G9 128 /* SandyBridge (GSSE) - AVX ia32 */ -#define _IPP_H9 256 /* Haswell (AVX2) ia32 */ -#define _IPP_I0 512 /* KNL (AVX-512) ia32 */ -#define _IPP_S0 1024 /* SkyLake Xeon (AVX-512) ia32 */ - -#define _IPPXSC_PX 0 -#define _IPPXSC_S1 1 -#define _IPPXSC_S2 2 -#define _IPPXSC_C2 4 - -#define _IPPLRB_PX 0 -#define _IPPLRB_B1 1 -#define _IPPLRB_B2 2 - -#define _IPP64_PX _IPP_PX -#define _IPP64_I7 64 - -#define _IPP32E_PX _IPP_PX /* pure C-code x64 */ -#define _IPP32E_M7 32 /* Pentium with x64 support (Nocona) - SSE3 x64 */ -#define _IPP32E_U8 64 /* Merom - SSSE3 x64 */ -#define _IPP32E_Y8 128 /* Penryn - SSE4.1 + tick for SSE4.2 x64 */ -#define _IPP32E_E9 256 /* SandyBridge (GSSE) - AVX x64 */ -#define _IPP32E_L9 512 /* Haswell (AVX2) x64 */ -#define _IPP32E_N0 1024 /* KNL (AVX-512) x64 */ -#define _IPP32E_K0 2048 /* SkyLake Xeon (AVX-512) x64 */ - -#define _IPPLP32_PX _IPP_PX -#define _IPPLP32_S8 1 /* old Atom (SSSE3+movbe) (Silverthorne) ia32 */ - -#define _IPPLP64_PX _IPP_PX -#define _IPPLP64_N8 1 /* old Atom (SSSE3+movbe) (Silverthorne) x64 */ - -#if defined(__INTEL_COMPILER) || (_MSC_VER >= 1300) - #define __ALIGN8 __declspec (align(8)) - #define __ALIGN16 __declspec (align(16)) -#if !defined( OSX32 ) - #define __ALIGN32 __declspec (align(32)) -#else - #define __ALIGN32 __declspec (align(16)) -#endif - #define __ALIGN64 __declspec (align(64)) -#else - #define __ALIGN8 - #define __ALIGN16 - #define __ALIGN32 - #define __ALIGN64 -#endif - -#if defined ( _M5 ) /* Quark (Pentium) - x86+x87 ia32 */ - #define _IPP _IPP_M5 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined ( _M6 ) /* Pentium MMX - MMX ia32 */ - #define _IPP _IPP_M6 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _A6 ) /* Pentium III - SSE ia32 */ - #define _IPP _IPP_A6 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _W7 ) /* Pentium 4 - SSE2 ia32 */ - #define _IPP _IPP_W7 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _T7 ) /* Pentium with x64 support (Nocona) - SSE3 ia32 */ - #define _IPP _IPP_T7 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _V8 ) /* Merom - SSSE3 ia32 */ - #define _IPP _IPP_V8 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _P8 ) /* Penryn - SSE4.1 + tick for SSE4.2 ia32 */ - #define _IPP _IPP_P8 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _G9 ) /* SandyBridge (GSSE) - AVX ia32 */ - #define _IPP _IPP_G9 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _H9 ) /* Haswell (AVX2) ia32 */ - #define _IPP _IPP_H9 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _M7 ) /* Pentium with x64 support (Nocona) - SSE3 x64 */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_M7 - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _U8 ) /* Merom - SSSE3 x64 */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_U8 - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _Y8 ) /* Penryn - SSE4.1 + tick for SSE4.2 x64 */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_Y8 - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _E9 ) /* SandyBridge (GSSE) - AVX x64 */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_E9 - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _L9 ) /* Haswell (AVX2) x64 */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_L9 - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _N0 ) /* KNL (AVX-512) x64 */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_N0 - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _K0 ) /* SkyLake Xeon (AVX-512) x64 */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_K0 - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _B2 ) /* KNC (MIC) */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_B2 - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _S8 ) /* old Atom (SSSE3+movbe) (Silverthorne) ia32 */ - #define _IPP _IPP_V8 - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_S8 - #define _IPPLP64 _IPPLP64_PX - -#elif defined( _N8 ) /* old Atom (SSSE3+movbe) (Silverthorne) x64 */ - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_U8 - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_N8 - -#else - #define _IPP _IPP_PX - #define _IPP32E _IPP32E_PX - #define _IPPLRB _IPPLRB_PX - #define _IPPLP32 _IPPLP32_PX - #define _IPPLP64 _IPPLP64_PX - -#endif - - -#define _IPP_ARCH_IA32 1 -#define _IPP_ARCH_IA64 2 -#define _IPP_ARCH_EM64T 4 -#define _IPP_ARCH_XSC 8 -#define _IPP_ARCH_LRB 16 -#define _IPP_ARCH_LP32 32 -#define _IPP_ARCH_LP64 64 -#define _IPP_ARCH_LRB2 128 - -#if defined ( _ARCH_IA32 ) - #define _IPP_ARCH _IPP_ARCH_IA32 - -#elif defined( _ARCH_EM64T ) - #define _IPP_ARCH _IPP_ARCH_EM64T - -#elif defined( _ARCH_LRB2 ) - #define _IPP_ARCH _IPP_ARCH_LRB2 - -#elif defined( _ARCH_LP32 ) - #define _IPP_ARCH _IPP_ARCH_LP32 - -#elif defined( _ARCH_LP64 ) - #define _IPP_ARCH _IPP_ARCH_LP64 - -#else - #if defined(_M_AMD64) || defined(__x86_64) || defined(__x86_64__) - #define _IPP_ARCH _IPP_ARCH_EM64T - - #else - #define _IPP_ARCH _IPP_ARCH_IA32 - - #endif -#endif - -#if ((_IPP_ARCH == _IPP_ARCH_IA32) || (_IPP_ARCH == _IPP_ARCH_LP32)) -__INLINE -Ipp32s IPP_INT_PTR( const void* ptr ) { - union { - void* Ptr; - Ipp32s Int; - } dd; - dd.Ptr = (void*)ptr; - return dd.Int; -} - -__INLINE -Ipp32u IPP_UINT_PTR( const void* ptr ) { - union { - void* Ptr; - Ipp32u Int; - } dd; - dd.Ptr = (void*)ptr; - return dd.Int; -} -#elif ((_IPP_ARCH == _IPP_ARCH_EM64T) || (_IPP_ARCH == _IPP_ARCH_LRB2) || (_IPP_ARCH == _IPP_ARCH_LP64)) -__INLINE -Ipp64s IPP_INT_PTR( const void* ptr ) { - union { - void* Ptr; - Ipp64s Int; - } dd; - dd.Ptr = (void*)ptr; - return dd.Int; -} - -__INLINE -Ipp64u IPP_UINT_PTR( const void* ptr ) { - union { - void* Ptr; - Ipp64u Int; - } dd; - dd.Ptr = (void*)ptr; - return dd.Int; -} -#else - #define IPP_INT_PTR( ptr ) ( (long)(ptr) ) - #define IPP_UINT_PTR( ptr ) ( (unsigned long)(ptr) ) -#endif - -#define IPP_ALIGN_TYPE(type, align) ((align)/sizeof(type)-1) -#define IPP_BYTES_TO_ALIGN(ptr, align) ((-(IPP_INT_PTR(ptr)&((align)-1)))&((align)-1)) -#define IPP_ALIGNED_PTR(ptr, align) (void*)( (unsigned char*)(ptr) + (IPP_BYTES_TO_ALIGN( ptr, align )) ) - -#define IPP_ALIGNED_SIZE(size, align) (((size)+(align)-1)&~((align)-1)) - -#define IPP_MALLOC_ALIGNED_BYTES 64 -#define IPP_MALLOC_ALIGNED_8BYTES 8 -#define IPP_MALLOC_ALIGNED_16BYTES 16 -#define IPP_MALLOC_ALIGNED_32BYTES 32 - -#define IPP_ALIGNED_ARRAY(align,arrtype,arrname,arrlength)\ - char arrname##AlignedArrBuff[sizeof(arrtype)*(arrlength)+IPP_ALIGN_TYPE(char, align)];\ - arrtype *arrname = (arrtype*)IPP_ALIGNED_PTR(arrname##AlignedArrBuff,align) - -#if defined( __cplusplus ) -extern "C" { -#endif - -/* ///////////////////////////////////////////////////////////////////////////// - - IPP Context Identification - - /////////////////////////////////////////////////////////////////////////// */ - -#define IPP_CONTEXT( a, b, c, d) \ - (int)(((unsigned)(a) << 24) | ((unsigned)(b) << 16) | \ - ((unsigned)(c) << 8) | (unsigned)(d)) - -typedef enum { - idCtxUnknown = 0, - idCtxFFT_C_16sc, - idCtxFFT_C_16s, - idCtxFFT_R_16s, - idCtxFFT_C_32fc, - idCtxFFT_C_32f, - idCtxFFT_R_32f, - idCtxFFT_C_64fc, - idCtxFFT_C_64f, - idCtxFFT_R_64f, - idCtxDFT_C_16sc, - idCtxDFT_C_16s, - idCtxDFT_R_16s, - idCtxDFT_C_32fc, - idCtxDFT_C_32f, - idCtxDFT_R_32f, - idCtxDFT_C_64fc, - idCtxDFT_C_64f, - idCtxDFT_R_64f, - idCtxDCTFwd_16s, - idCtxDCTInv_16s, - idCtxDCTFwd_32f, - idCtxDCTInv_32f, - idCtxDCTFwd_64f, - idCtxDCTInv_64f, - idCtxFFT2D_C_32fc, - idCtxFFT2D_R_32f, - idCtxDFT2D_C_32fc, - idCtxDFT2D_R_32f, - idCtxFFT2D_R_32s, - idCtxDFT2D_R_32s, - idCtxDCT2DFwd_32f, - idCtxDCT2DInv_32f, - idCtxMoment64f, - idCtxMoment64s, - idCtxRandUni_8u, - idCtxRandUni_16s, - idCtxRandUni_32f, - idCtxRandUni_64f, - idCtxRandGauss_8u, - idCtxRandGauss_16s, - idCtxRandGauss_32f, - idCtxRandGauss_64f, - idCtxWTFwd_32f, - idCtxWTFwd_8u32f, - idCtxWTFwd_8s32f, - idCtxWTFwd_16u32f, - idCtxWTFwd_16s32f, - idCtxWTFwd2D_32f_C1R, - idCtxWTInv2D_32f_C1R, - idCtxWTFwd2D_32f_C3R, - idCtxWTInv2D_32f_C3R, - idCtxWTInv_32f, - idCtxWTInv_32f8u, - idCtxWTInv_32f8s, - idCtxWTInv_32f16u, - idCtxWTInv_32f16s, - idCtxMDCTFwd_32f, - idCtxMDCTInv_32f, - idCtxMDCTFwd_16s, - idCtxFIRBlock_32f, - idCtxFDP_32f, - idCtxRLMS_32f = IPP_CONTEXT( 'L', 'M', 'S', '1'), - idCtxRLMS32f_16s = IPP_CONTEXT( 'L', 'M', 'S', 0 ), - idCtxIIRAR_32f = IPP_CONTEXT( 'I', 'I', '0', '1'), - idCtxIIRBQ_32f = IPP_CONTEXT( 'I', 'I', '0', '2'), - idCtxIIRAR_32fc = IPP_CONTEXT( 'I', 'I', '0', '3'), - idCtxIIRBQ_32fc = IPP_CONTEXT( 'I', 'I', '0', '4'), - idCtxIIRAR32f_16s = IPP_CONTEXT( 'I', 'I', '0', '5'), - idCtxIIRBQ32f_16s = IPP_CONTEXT( 'I', 'I', '0', '6'), - idCtxIIRAR32fc_16sc = IPP_CONTEXT( 'I', 'I', '0', '7'), - idCtxIIRBQ32fc_16sc = IPP_CONTEXT( 'I', 'I', '0', '8'), - idCtxIIRAR32s_16s = IPP_CONTEXT( 'I', 'I', '0', '9'), - idCtxIIRBQ32s_16s = IPP_CONTEXT( 'I', 'I', '1', '0'), - idCtxIIRAR32sc_16sc = IPP_CONTEXT( 'I', 'I', '1', '1'), - idCtxIIRBQ32sc_16sc = IPP_CONTEXT( 'I', 'I', '1', '2'), - idCtxIIRAR_64f = IPP_CONTEXT( 'I', 'I', '1', '3'), - idCtxIIRBQ_64f = IPP_CONTEXT( 'I', 'I', '1', '4'), - idCtxIIRAR_64fc = IPP_CONTEXT( 'I', 'I', '1', '5'), - idCtxIIRBQ_64fc = IPP_CONTEXT( 'I', 'I', '1', '6'), - idCtxIIRAR64f_32f = IPP_CONTEXT( 'I', 'I', '1', '7'), - idCtxIIRBQ64f_32f = IPP_CONTEXT( 'I', 'I', '1', '8'), - idCtxIIRAR64fc_32fc = IPP_CONTEXT( 'I', 'I', '1', '9'), - idCtxIIRBQ64fc_32fc = IPP_CONTEXT( 'I', 'I', '2', '0'), - idCtxIIRAR64f_32s = IPP_CONTEXT( 'I', 'I', '2', '1'), - idCtxIIRBQ64f_32s = IPP_CONTEXT( 'I', 'I', '2', '2'), - idCtxIIRAR64fc_32sc = IPP_CONTEXT( 'I', 'I', '2', '3'), - idCtxIIRBQ64fc_32sc = IPP_CONTEXT( 'I', 'I', '2', '4'), - idCtxIIRAR64f_16s = IPP_CONTEXT( 'I', 'I', '2', '5'), - idCtxIIRBQ64f_16s = IPP_CONTEXT( 'I', 'I', '2', '6'), - idCtxIIRAR64fc_16sc = IPP_CONTEXT( 'I', 'I', '2', '7'), - idCtxIIRBQ64fc_16sc = IPP_CONTEXT( 'I', 'I', '2', '8'), - idCtxIIRBQDF1_32f = IPP_CONTEXT( 'I', 'I', '2', '9'), - idCtxIIRBQDF164f_32s= IPP_CONTEXT( 'I', 'I', '3', '0'), - idCtxFIRSR_32f = IPP_CONTEXT( 'F', 'I', '0', '1'), - idCtxFIRSR_32fc = IPP_CONTEXT( 'F', 'I', '0', '2'), - idCtxFIRMR_32f = IPP_CONTEXT( 'F', 'I', '0', '3'), - idCtxFIRMR_32fc = IPP_CONTEXT( 'F', 'I', '0', '4'), - idCtxFIRSR32f_16s = IPP_CONTEXT( 'F', 'I', '0', '5'), - idCtxFIRSR32fc_16sc = IPP_CONTEXT( 'F', 'I', '0', '6'), - idCtxFIRMR32f_16s = IPP_CONTEXT( 'F', 'I', '0', '7'), - idCtxFIRMR32fc_16sc = IPP_CONTEXT( 'F', 'I', '0', '8'), - idCtxFIRSR32s_16s = IPP_CONTEXT( 'F', 'I', '0', '9'), - idCtxFIRSR32sc_16sc = IPP_CONTEXT( 'F', 'I', '1', '0'), - idCtxFIRMR32s_16s = IPP_CONTEXT( 'F', 'I', '1', '1'), - idCtxFIRMR32sc_16sc = IPP_CONTEXT( 'F', 'I', '1', '2'), - idCtxFIRSR_64f = IPP_CONTEXT( 'F', 'I', '1', '3'), - idCtxFIRSR_64fc = IPP_CONTEXT( 'F', 'I', '1', '4'), - idCtxFIRMR_64f = IPP_CONTEXT( 'F', 'I', '1', '5'), - idCtxFIRMR_64fc = IPP_CONTEXT( 'F', 'I', '1', '6'), - idCtxFIRSR64f_32f = IPP_CONTEXT( 'F', 'I', '1', '7'), - idCtxFIRSR64fc_32fc = IPP_CONTEXT( 'F', 'I', '1', '8'), - idCtxFIRMR64f_32f = IPP_CONTEXT( 'F', 'I', '1', '9'), - idCtxFIRMR64fc_32fc = IPP_CONTEXT( 'F', 'I', '2', '0'), - idCtxFIRSR64f_32s = IPP_CONTEXT( 'F', 'I', '2', '1'), - idCtxFIRSR64fc_32sc = IPP_CONTEXT( 'F', 'I', '2', '2'), - idCtxFIRMR64f_32s = IPP_CONTEXT( 'F', 'I', '2', '3'), - idCtxFIRMR64fc_32sc = IPP_CONTEXT( 'F', 'I', '2', '4'), - idCtxFIRSR64f_16s = IPP_CONTEXT( 'F', 'I', '2', '5'), - idCtxFIRSR64fc_16sc = IPP_CONTEXT( 'F', 'I', '2', '6'), - idCtxFIRMR64f_16s = IPP_CONTEXT( 'F', 'I', '2', '7'), - idCtxFIRMR64fc_16sc = IPP_CONTEXT( 'F', 'I', '2', '8'), - idCtxFIRSR_16s = IPP_CONTEXT( 'F', 'I', '2', '9'), - idCtxFIRMR_16s = IPP_CONTEXT( 'F', 'I', '3', '0'), - idCtxFIRSRStream_16s= IPP_CONTEXT( 'F', 'I', '3', '1'), - idCtxFIRMRStream_16s= IPP_CONTEXT( 'F', 'I', '3', '2'), - idCtxFIRSRStream_32f= IPP_CONTEXT( 'F', 'I', '3', '3'), - idCtxFIRMRStream_32f= IPP_CONTEXT( 'F', 'I', '3', '4'), - idCtxRLMS32s_16s = IPP_CONTEXT( 'L', 'M', 'S', 'R'), - idCtxCLMS32s_16s = IPP_CONTEXT( 'L', 'M', 'S', 'C'), - idCtxEncode_JPEG2K, - idCtxDES = IPP_CONTEXT( ' ', 'D', 'E', 'S'), - idCtxBlowfish = IPP_CONTEXT( ' ', ' ', 'B', 'F'), - idCtxRijndael = IPP_CONTEXT( ' ', 'R', 'I', 'J'), - idCtxSMS4 = IPP_CONTEXT( 'S', 'M', 'S', '4'), - idCtxTwofish = IPP_CONTEXT( ' ', ' ', 'T', 'F'), - idCtxARCFOUR = IPP_CONTEXT( ' ', 'R', 'C', '4'), - idCtxRC564 = IPP_CONTEXT( 'R', 'C', '5', '1'), - idCtxRC5128 = IPP_CONTEXT( 'R', 'C', '5', '2'), - idCtxSHA1 = IPP_CONTEXT( 'S', 'H', 'S', '1'), - idCtxSHA224 = IPP_CONTEXT( 'S', 'H', 'S', '3'), - idCtxSHA256 = IPP_CONTEXT( 'S', 'H', 'S', '2'), - idCtxSHA384 = IPP_CONTEXT( 'S', 'H', 'S', '4'), - idCtxSHA512 = IPP_CONTEXT( 'S', 'H', 'S', '5'), - idCtxMD5 = IPP_CONTEXT( ' ', 'M', 'D', '5'), - idCtxHMAC = IPP_CONTEXT( 'H', 'M', 'A', 'C'), - idCtxDAA = IPP_CONTEXT( ' ', 'D', 'A', 'A'), - idCtxBigNum = IPP_CONTEXT( 'B', 'I', 'G', 'N'), - idCtxMontgomery = IPP_CONTEXT( 'M', 'O', 'N', 'T'), - idCtxPrimeNumber = IPP_CONTEXT( 'P', 'R', 'I', 'M'), - idCtxPRNG = IPP_CONTEXT( 'P', 'R', 'N', 'G'), - idCtxRSA = IPP_CONTEXT( ' ', 'R', 'S', 'A'), - idCtxRSA_PubKey = IPP_CONTEXT( 'R', 'S', 'A', '0'), - idCtxRSA_PrvKey1 = IPP_CONTEXT( 'R', 'S', 'A', '1'), - idCtxRSA_PrvKey2 = IPP_CONTEXT( 'R', 'S', 'A', '2'), - idCtxDSA = IPP_CONTEXT( ' ', 'D', 'S', 'A'), - idCtxECCP = IPP_CONTEXT( ' ', 'E', 'C', 'P'), - idCtxECCB = IPP_CONTEXT( ' ', 'E', 'C', 'B'), - idCtxECCPPoint = IPP_CONTEXT( 'P', 'E', 'C', 'P'), - idCtxECCBPoint = IPP_CONTEXT( 'P', 'E', 'C', 'B'), - idCtxDH = IPP_CONTEXT( ' ', ' ', 'D', 'H'), - idCtxDLP = IPP_CONTEXT( ' ', 'D', 'L', 'P'), - idCtxCMAC = IPP_CONTEXT( 'C', 'M', 'A', 'C'), - idCtxRFFT2_8u, - idCtxHilbert_32f32fc, - idCtxHilbert_16s32fc, - idCtxHilbert_16s16sc, - idCtxTone_16s, - idCtxTriangle_16s, - idCtxDFTOutOrd_C_32fc, - idCtxDFTOutOrd_C_64fc, - idCtxFFT_C_32sc, - idCtxFFT_C_32s, - idCtxFFT_R_32s, - idCtxFFT_R_16s32s, - idCtxDecodeProgr_JPEG2K, - idCtxWarp_MPEG4, - idCtxQuantInvIntra_MPEG4, - idCtxQuantInvInter_MPEG4, - idCtxQuantIntra_MPEG4, - idCtxQuantInter_MPEG4, - idCtxAnalysisFilter_SBR_C_32f32fc, - idCtxAnalysisFilter_SBR_C_32f, - idCtxAnalysisFilter_SBR_R_32f, - idCtxSynthesisFilter_SBR_C_32fc32f, - idCtxSynthesisFilter_SBR_C_32f, - idCtxSynthesisFilter_SBR_R_32f, - idCtxSynthesisDownFilter_SBR_C_32fc32f, - idCtxSynthesisDownFilter_SBR_C_32f, - idCtxSynthesisDownFilter_SBR_R_32f, - idCtxVLCEncode, - idCtxVLCDecode, - idCtxAnalysisFilter_SBR_C_32s32sc, - idCtxAnalysisFilter_SBR_R_32s, - idCtxSynthesisFilter_SBR_C_32sc32s, - idCtxSynthesisFilter_SBR_R_32s, - idCtxSynthesisDownFilter_SBR_C_32sc32s, - idCtxSynthesisDownFilter_SBR_R_32s, - idCtxSynthesisFilter_PQMF_MP3_32f, - idCtxAnalysisFilter_PQMF_MP3_32f, - idCtxResampleRow, - idCtxAnalysisFilter_SBR_Enc_C_32f32fc, - idCtxSynthesisFilter_DTS_32f, - idCtxFilterBilateralGauss_8u, - idCtxFilterBilateralGaussFast_8u, - idCtxBGF, - idCtxPolyGF, - idCtxRSenc, - idCtxRSdec, - idCtxSnow3g = IPP_CONTEXT( 'S', 'n', 'o', 'w'), - idCtxSnow3gF8, - idCtxSnow3gF9, - idCtxKasumi = IPP_CONTEXT( 'K', 'a', 's', 'u'), - idCtxKasumiF8, - idCtxKasumiF9, - idCtxResizeHannFilter_8u, - idCtxResizeLanczosFilter_8u, - idCtxAESXCBC, - idCtxAESCCM, - idCtxAESGCM, - idCtxMsgCatalog, - idCtxGFP, - idCtxGFPE, - idCtxGFPX, - idCtxGFPXE, - idCtxGFPXQX, - idCtxGFPXQXE, - idCtxGFPEC, - idCtxGFPPoint, - idCtxGFPXEC, - idCtxGFPXECPoint, - idCtxPairing, - idCtxResize_32f, - idCtxResizeYUV420, - idCtxResizeYUV422, - idCtxResize_64f, - idCtxFilterBilateralBorder, - idCtxThresholdAdaptiveGauss, - idCtxHOG, - idCtxFastN, - idCtxHash, - idCtxSM3 -} IppCtxId; - - - - -/* ///////////////////////////////////////////////////////////////////////////// - Helpers - /////////////////////////////////////////////////////////////////////////// */ - -#define IPP_NOERROR_RET() return ippStsNoErr -#define IPP_ERROR_RET( ErrCode ) return (ErrCode) - -#ifdef _IPP_DEBUG - - #define IPP_BADARG_RET( expr, ErrCode )\ - {if (expr) { IPP_ERROR_RET( ErrCode ); }} - -#else - - #define IPP_BADARG_RET( expr, ErrCode ) - -#endif - - - #define IPP_BAD_SIZE_RET( n )\ - IPP_BADARG_RET( (n)<=0, ippStsSizeErr ) - - #define IPP_BAD_STEP_RET( n )\ - IPP_BADARG_RET( (n)<=0, ippStsStepErr ) - - #define IPP_BAD_PTR1_RET( ptr )\ - IPP_BADARG_RET( NULL==(ptr), ippStsNullPtrErr ) - - #define IPP_BAD_PTR2_RET( ptr1, ptr2 )\ - {IPP_BAD_PTR1_RET( ptr1 ); IPP_BAD_PTR1_RET( ptr2 )} - - #define IPP_BAD_PTR3_RET( ptr1, ptr2, ptr3 )\ - {IPP_BAD_PTR2_RET( ptr1, ptr2 ); IPP_BAD_PTR1_RET( ptr3 )} - - #define IPP_BAD_PTR4_RET( ptr1, ptr2, ptr3, ptr4 )\ - {IPP_BAD_PTR2_RET( ptr1, ptr2 ); IPP_BAD_PTR2_RET( ptr3, ptr4 )} - - #define IPP_BAD_ISIZE_RET(roi) \ - IPP_BADARG_RET( ((roi).width<=0 || (roi).height<=0), ippStsSizeErr) - -/* ////////////////////////////////////////////////////////////////////////// */ -/* internal messages */ - -#define MSG_LOAD_DLL_ERR (-9700) /* Error at loading of %s library */ -#define MSG_NO_DLL (-9701) /* No DLLs were found in the Waterfall procedure */ -#define MSG_NO_SHARED (-9702) /* No shared libraries were found in the Waterfall procedure */ - -/* ////////////////////////////////////////////////////////////////////////// */ - - -typedef union { /* double precision */ - Ipp64s hex; - Ipp64f fp; -} IppFP_64f; - -typedef union { /* single precision */ - Ipp32s hex; - Ipp32f fp; -} IppFP_32f; - - -extern const IppFP_32f ippConstantOfNAN_32f; -extern const IppFP_64f ippConstantOfNAN_64f; - -extern const IppFP_32f ippConstantOfINF_32f; -extern const IppFP_64f ippConstantOfINF_64f; -extern const IppFP_32f ippConstantOfINF_NEG_32f; -extern const IppFP_64f ippConstantOfINF_NEG_64f; - -#define NAN_32F (ippConstantOfNAN_32f.fp) -#define NAN_64F (ippConstantOfNAN_64f.fp) -#define INF_32F (ippConstantOfINF_32f.fp) -#define INF_64F (ippConstantOfINF_64f.fp) -#define INF_NEG_32F (ippConstantOfINF_NEG_32f.fp) -#define INF_NEG_64F (ippConstantOfINF_NEG_64f.fp) - -/* ////////////////////////////////////////////////////////////////////////// */ - -typedef enum { - ippunreg=-1, - ippac = 0, - ippcc = 1, - ippch = 2, - ippcp = 3, - ippcv = 4, - ippdc = 5, - ippdi = 6, - ippgen = 7, - ippi = 8, - ippj = 9, - ippm = 10, - ippr = 11, - ipps = 12, - ippsc = 13, - ippsr = 14, - ippvc = 15, - ippvm = 16, - ippmsdk = 17, - ippcpepid = 18, - ippe = 19, - ipprs = 20, - ippsq = 21, - ippnomore -} IppDomain; - -int __CDECL ownGetNumThreads( void ); -int __CDECL ownGetFeature( Ipp64u MaskOfFeature ); /* the main function of tick-tock dispatcher */ - -#ifdef _IPP_DYNAMIC -typedef IppStatus (__STDCALL *DYN_RELOAD)( int ); -void __CDECL ownRegisterLib( IppDomain, DYN_RELOAD ); -void __CDECL ownUnregisterLib( IppDomain ); -#endif - -/* the number of threads available for any ipp function that uses OMP; */ -/* at the ippxx.dll loading time is equal to the number of logical processors, */ -/* and can be changed ONLY externally by library user to any desired number */ -/* by means of ippSetNumThreads() function */ -#define IPP_GET_NUM_THREADS() ( ownGetNumThreads() ) -#define IPP_OMP_NUM_THREADS() num_threads( IPP_GET_NUM_THREADS() ) -#define IPP_OMP_LIMIT_MAX_NUM_THREADS(n) num_threads( IPP_MIN(IPP_GET_NUM_THREADS(),(n))) - - -/* ////////////////////////////////////////////////////////////////////////// */ - -/* Define NULL pointer value */ -#ifndef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#define UNREFERENCED_PARAMETER(p) (p)=(p) - -#if defined( _IPP_MARK_LIBRARY ) -static char G[] = {73, 80, 80, 71, 101, 110, 117, 105, 110, 101, 243, 193, 210, 207, 215}; -#endif - - -#define STR2(x) #x -#define STR(x) STR2(x) -#define MESSAGE( desc )\ - message(__FILE__ "(" STR(__LINE__) "):" #desc) - -/* -// endian definition -*/ -#define IPP_LITTLE_ENDIAN (0) -#define IPP_BIG_ENDIAN (1) - -#if defined( _IPP_LE ) - #define IPP_ENDIAN IPP_LITTLE_ENDIAN - -#elif defined( _IPP_BE ) - #define IPP_ENDIAN IPP_BIG_ENDIAN - -#else - #if defined( __ARMEB__ ) - #define IPP_ENDIAN IPP_BIG_ENDIAN - - #else - #define IPP_ENDIAN IPP_LITTLE_ENDIAN - - #endif -#endif - - -/* ////////////////////////////////////////////////////////////////////////// */ - -/* intrinsics */ -#if (_IPP >= _IPP_A6) || (_IPP32E >= _IPP32E_M7) - #if defined(__INTEL_COMPILER) || (_MSC_VER >= 1300) - #if (_IPP == _IPP_A6) - #include "xmmintrin.h" - #elif (_IPP == _IPP_W7) - #if defined(__INTEL_COMPILER) - #include "emmintrin.h" - #else - #undef _W7 - #include "emmintrin.h" - #define _W7 - #endif - #define _mm_loadu _mm_loadu_si128 - #elif (_IPP == _IPP_T7) || (_IPP32E == _IPP32E_M7) - #if defined(__INTEL_COMPILER) - #include "pmmintrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER >= 140050110) - #include "intrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER < 140050110) - #include "emmintrin.h" - #define _mm_loadu _mm_loadu_si128 - #endif - #elif (_IPP == _IPP_V8) || (_IPP32E == _IPP32E_U8) - #if defined(__INTEL_COMPILER) - #include "tmmintrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER >= 140050110) - #include "intrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER < 140050110) - #include "emmintrin.h" - #define _mm_loadu _mm_loadu_si128 - #endif - #elif (_IPP == _IPP_P8) || (_IPP32E == _IPP32E_Y8) - #if defined(__INTEL_COMPILER) - #include "smmintrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER >= 140050110) - #include "intrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER < 140050110) - #include "emmintrin.h" - #define _mm_loadu _mm_loadu_si128 - #endif - #elif (_IPP >= _IPP_G9) || (_IPP32E >= _IPP32E_E9) - #if defined(__INTEL_COMPILER) - #include "immintrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER >= 160021003) - #include "immintrin.h" - #define _mm_loadu _mm_lddqu_si128 - #endif - #endif - #endif -#elif (_IPPLP32 >= _IPPLP32_S8) || (_IPPLP64 >= _IPPLP64_N8) - #if defined(__INTEL_COMPILER) - #include "tmmintrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER >= 140050110) - #include "intrin.h" - #define _mm_loadu _mm_lddqu_si128 - #elif (_MSC_FULL_VER < 140050110) - #include "emmintrin.h" - #define _mm_loadu _mm_loadu_si128 - #endif -#elif (_IPPLRB >= _IPPLRB_B2) - #if defined(__INTEL_COMPILER) || defined(_REF_LIB) - #include "immintrin.h" - #endif -#endif - -// **** intrinsics for bit casting **** -#if defined(__INTEL_COMPILER) -extern unsigned int __intel_castf32_u32(float val); -extern float __intel_castu32_f32(unsigned int val); -extern unsigned __int64 __intel_castf64_u64(double val); -extern double __intel_castu64_f64(unsigned __int64 val); - #define __CAST_32f32u(val) __intel_castf32_u32((Ipp32f)val) - #define __CAST_32u32f(val) __intel_castu32_f32((Ipp32u)val) - #define __CAST_64f64u(val) __intel_castf64_u64((Ipp64f)val) - #define __CAST_64u64f(val) __intel_castu64_f64((Ipp64u)val) -#else - #define __CAST_32f32u(val) ( *((Ipp32u*)&val) ) - #define __CAST_32u32f(val) ( *((Ipp32f*)&val) ) - #define __CAST_64f64u(val) ( *((Ipp64u*)&val) ) - #define __CAST_64u64f(val) ( *((Ipp64f*)&val) ) -#endif - - -// short names for vector registers casting -#define _pd2ps _mm_castpd_ps -#define _ps2pd _mm_castps_pd -#define _pd2pi _mm_castpd_si128 -#define _pi2pd _mm_castsi128_pd -#define _ps2pi _mm_castps_si128 -#define _pi2ps _mm_castsi128_ps - -#define _ypd2ypi _mm256_castpd_si256 -#define _ypi2ypd _mm256_castsi256_pd -#define _yps2ypi _mm256_castps_si256 -#define _ypi2yps _mm256_castsi256_ps -#define _ypd2yps _mm256_castpd_ps -#define _yps2ypd _mm256_castps_pd - -#define _yps2ps _mm256_castps256_ps128 -#define _ypi2pi _mm256_castsi256_si128 -#define _ypd2pd _mm256_castpd256_pd128 -#define _ps2yps _mm256_castps128_ps256 -#define _pi2ypi _mm256_castsi128_si256 -#define _pd2ypd _mm256_castpd128_pd256 - - -#if defined(__INTEL_COMPILER) -#define __IVDEP ivdep -#else -#define __IVDEP message("message :: 'ivdep' is not defined") -#endif -//usage: #pragma __IVDEP - -/* ////////////////////////////////////////////////////////////////////////// - _IPP_DATA shoul be defined only: - - if compile not merged library - - only for 1 CPU for merged library to avoid data duplication -*/ -#if defined( _MERGED_BLD ) && ( defined(_G9) || defined(_E9) ) /* compile data only for g9 and e9 CPU */ - #define _IPP_DATA 1 -#elif !defined( _MERGED_BLD ) /* compile data if it isn't merged library */ - #define _IPP_DATA 1 -#endif - - -#if defined( __cplusplus ) -} -#endif - -#endif /* __OWNDEFS_H__ */ - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/Makefile deleted file mode 100644 index 3dabff6fa3..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/make -f - -API_INCLUDE_DIR = ../../include -SRC_INCLUDE_DIR = ../../sources/include -LIB_INSTALL_DIR = $(epidinstalldir)/lib/posix-$(ARCH)/ - -PCP_INCLUDE_DIR = ./src -PCP_SRC = $(wildcard ./src/*.c) -PCP_OBJ = $(sort $(PCP_SRC:.c=.o)) -PCP_LIB = ./src/libippcp.a - - -$(PCP_OBJ): %.o: %.c - $(CC) $(CFLAGS) -I$(API_INCLUDE_DIR) -I$(SRC_INCLUDE_DIR) -I$(PCP_INCLUDE_DIR) -c -o $@ $< - -$(PCP_LIB): $(PCP_OBJ) - $(AR) rc $@ $^ - ranlib $@ - -build: all - -all: $(PCP_LIB) - -install: - mkdir -p '$(LIB_INSTALL_DIR)' - cp $(PCP_LIB) '$(LIB_INSTALL_DIR)' - -clean: - rm -f $(PCP_OBJ) $(PCP_LIB) - - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/owncp.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/owncp.h deleted file mode 100644 index 6bf81b2300..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/owncp.h +++ /dev/null @@ -1,171 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippcp) -// -// -*/ - -#ifndef __OWNCP_H__ -#define __OWNCP_H__ - -#ifndef __OWNDEFS_H__ - #include "owndefs.h" -#endif - -#ifndef __IPPCP_H__ - #include "ippcp.h" -#endif - -#if defined(_TXT_ACM_) - //#pragma message ("cogifuration: TXT ACM") - #include "pcpvariant_txt_acm.h" -#else - //#pragma message ("cogifuration: STANDARD") - #include "pcpvariant.h" -#endif - - -#pragma warning( disable : 4996 4324 4206) - -/* ippCP length */ -typedef int cpSize; - -/* -// Common ippCP Macros -*/ - -/* size of cache line (bytes) */ -#if (_IPP==_IPP_M5) -#define CACHE_LINE_SIZE (16) -#define LOG_CACHE_LINE_SIZE (4) -#else -#define CACHE_LINE_SIZE (64) -#define LOG_CACHE_LINE_SIZE (6) -#endif - -/* swap data & pointers */ -#define SWAP_PTR(ATYPE, pX,pY) { ATYPE* aPtr=(pX); (pX)=(pY); (pY)=aPtr; } -#define SWAP(x,y) {(x)^=(y); (y)^=(x); (x)^=(y);} - -/* alignment value */ -#define ALIGN_VAL ((int)sizeof(void*)) - -/* bitsize */ -#define BYTESIZE (8) -#define BITSIZE(x) ((int)(sizeof(x)*BYTESIZE)) - -/* bit length -> byte/word length conversion */ -#define BITS2WORD8_SIZE(x) (((x)+ 7)>>3) -#define BITS2WORD16_SIZE(x) (((x)+15)>>4) -#define BITS2WORD32_SIZE(x) (((x)+31)>>5) -#define BITS2WORD64_SIZE(x) (((x)+63)>>6) - -/* WORD and DWORD manipulators */ -#define LODWORD(x) ((Ipp32u)(x)) -#define HIDWORD(x) ((Ipp32u)(((Ipp64u)(x) >>32) & 0xFFFFFFFF)) - -#define MAKEHWORD(bLo,bHi) ((Ipp16u)(((Ipp8u)(bLo)) | ((Ipp16u)((Ipp8u)(bHi))) << 8)) -#define MAKEWORD(hLo,hHi) ((Ipp32u)(((Ipp16u)(hLo)) | ((Ipp32u)((Ipp16u)(hHi))) << 16)) -#define MAKEDWORD(wLo,wHi) ((Ipp64u)(((Ipp32u)(wLo)) | ((Ipp64u)((Ipp32u)(wHi))) << 32)) - -/* extract byte */ -#define EBYTE(w,n) ((Ipp8u)((w) >> (8 * (n)))) - -/* hexString <-> Ipp32u conversion */ -#define HSTRING_TO_U32(ptrByte) \ - (((ptrByte)[0]) <<24) \ - +(((ptrByte)[1]) <<16) \ - +(((ptrByte)[2]) <<8) \ - +((ptrByte)[3]) -#define U32_TO_HSTRING(ptrByte, x) \ - (ptrByte)[0] = (Ipp8u)((x)>>24); \ - (ptrByte)[1] = (Ipp8u)((x)>>16); \ - (ptrByte)[2] = (Ipp8u)((x)>>8); \ - (ptrByte)[3] = (Ipp8u)(x) - -/* 32- and 64-bit masks for MSB of nbits-sequence */ -#define MAKEMASK32(nbits) (0xFFFFFFFF >>((32 - ((nbits)&0x1F)) &0x1F)) -#define MAKEMASK64(nbits) (0xFFFFFFFFFFFFFFFF >>((64 - ((nbits)&0x3F)) &0x3F)) - -/* Logical Shifts (right and left) of WORD */ -#define LSR32(x,nBits) ((x)>>(nBits)) -#define LSL32(x,nBits) ((x)<<(nBits)) - -/* Rorate (right and left) of WORD */ -#if defined(_MSC_VER) -# include -# define ROR32(x, nBits) _lrotr((x),(nBits)) -# define ROL32(x, nBits) _lrotl((x),(nBits)) -#else -# define ROR32(x, nBits) (LSR32((x),(nBits)) | LSL32((x),32-(nBits))) -# define ROL32(x, nBits) ROR32((x),(32-(nBits))) -#endif - -/* Logical Shifts (right and left) of DWORD */ -#define LSR64(x,nBits) ((x)>>(nBits)) -#define LSL64(x,nBits) ((x)<<(nBits)) - -/* Rorate (right and left) of DWORD */ -#define ROR64(x, nBits) (LSR64((x),(nBits)) | LSL64((x),64-(nBits))) -#define ROL64(x, nBits) ROR64((x),(64-(nBits))) - -/* change endian */ -#if defined(_MSC_VER) -# define ENDIANNESS(x) _byteswap_ulong((x)) -# define ENDIANNESS32(x) ENDIANNESS((x)) -# define ENDIANNESS64(x) _byteswap_uint64((x)) -#else -# define ENDIANNESS(x) ((ROR32((x), 24) & 0x00ff00ff) | (ROR32((x), 8) & 0xff00ff00)) -# define ENDIANNESS32(x) ENDIANNESS((x)) -# define ENDIANNESS64(x) MAKEDWORD(ENDIANNESS(HIDWORD((x))), ENDIANNESS(LODWORD((x)))) -#endif - -#define IPP_MAKE_MULTIPLE_OF_8(x) ((x) = ((x)+7)&(~7)) -#define IPP_MAKE_MULTIPLE_OF_16(x) ((x) = ((x)+15)&(~15)) - -/* 64-bit constant */ -#if !defined(__GNUC__) - #define CONST_64(x) (x) /*(x##i64)*/ -#else - #define CONST_64(x) (x##LL) -#endif - - -/* crypto NI */ -#define AES_NI_ENABLED (ippCPUID_AES) -#define CLMUL_NI_ENABLED (ippCPUID_CLMUL) -#define AES_CLMUL_NI_ENABLED (ippCPUID_AES|ippCPUID_CLMUL) -#define ADCOX_ENABLED (ippCPUID_ADCOX) -#define SHA_NI_ENABLED (ippCPUID_SHA) -#define RDRAND_NI_ENABLED (ippCPUID_RDRAND) -#define RDSEED_NI_ENABLED (ippCPUID_RDSEED) - -/* test CPU crypto features */ -__INLINE Ipp32u IsFeatureEnabled(Ipp64u niMmask) -{ - return ownGetFeature(niMmask); -} - -/* copy under mask */ -#define MASKED_COPY_BNU(dst, mask, src1, src2, len) { \ - cpSize i; \ - for(i=0; i<(len); i++) (dst)[i] = ((mask) & (src1)[i]) | (~(mask) & (src2)[i]); \ -} - -#endif /* __OWNCP_H__ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbn.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbn.h deleted file mode 100644 index 5912211c93..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbn.h +++ /dev/null @@ -1,203 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippcp) -// -// -// -*/ - -#if !defined(_CP_BN_H) -#define _CP_BN_H - -#include "pcpbnuimpl.h" -#include "pcpbnuarith.h" -#include "pcpbnumisc.h" -#include "pcpbnu32arith.h" -#include "pcpbnu32misc.h" - -/* -// Big Number context -*/ -struct _cpBigNum -{ - IppCtxId idCtx; /* BigNum ctx id */ - IppsBigNumSGN sgn; /* sign */ - cpSize size; /* BigNum size (BNU_CHUNK_T) */ - cpSize room; /* BigNum max size (BNU_CHUNK_T) */ - BNU_CHUNK_T* number; /* BigNum value */ - BNU_CHUNK_T* buffer; /* temporary buffer */ -}; - -/* BN accessory macros */ -#define BN_ID(pBN) ((pBN)->idCtx) -#define BN_SIGN(pBN) ((pBN)->sgn) -#define BN_POSITIVE(pBN) (BN_SIGN(pBN)==ippBigNumPOS) -#define BN_NEGATIVE(pBN) (BN_SIGN(pBN)==ippBigNumNEG) -#define BN_NUMBER(pBN) ((pBN)->number) -#define BN_BUFFER(pBN) ((pBN)->buffer) -#define BN_ROOM(pBN) ((pBN)->room) -#define BN_SIZE(pBN) ((pBN)->size) -#define BN_SIZE32(pBN) ((pBN)->size*sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)) -//#define BN_SIZE32(pBN) (BITS2WORD32_SIZE( BITSIZE_BNU(BN_NUMBER((pBN)),BN_SIZE((pBN))))) - -#define BN_VALID_ID(pBN) (BN_ID((pBN))==idCtxBigNum) - -#define INVERSE_SIGN(s) (((s)==ippBigNumPOS)? ippBigNumNEG : ippBigNumPOS) - -#define BN_ALIGNMENT ((int)sizeof(void*)) - - -/* pack-unpack context */ -void cpPackBigNumCtx(const IppsBigNumState* pBN, Ipp8u* pBuffer); -void cpUnpackBigNumCtx(const Ipp8u* pBuffer, IppsBigNumState* pBN); - -/* copy BN */ -__INLINE IppsBigNumState* cpBN_copy(IppsBigNumState* pDst, const IppsBigNumState* pSrc) -{ - BN_SIGN(pDst) = BN_SIGN(pSrc); - BN_SIZE(pDst) = BN_SIZE(pSrc); - ZEXPAND_COPY_BNU(BN_NUMBER(pDst), BN_ROOM(pDst), BN_NUMBER(pSrc), BN_SIZE(pSrc)); - return pDst; -} -/* set BN to zero */ -__INLINE IppsBigNumState* cpBN_zero(IppsBigNumState* pBN) -{ - BN_SIGN(pBN) = ippBigNumPOS; - BN_SIZE(pBN) = 1; - ZEXPAND_BNU(BN_NUMBER(pBN),0, (int)BN_ROOM(pBN)); - return pBN; -} -/* fixup BN */ -__INLINE IppsBigNumState* cpBN_fix(IppsBigNumState* pBN) -{ - cpSize len = BN_SIZE(pBN); - FIX_BNU(BN_NUMBER(pBN), len); - BN_SIZE(pBN) = len; - return pBN; -} -/* set BN to chunk */ -__INLINE IppsBigNumState* cpBN_chunk(IppsBigNumState* pBN, BNU_CHUNK_T a) -{ - BN_SIGN(pBN) = ippBigNumPOS; - BN_SIZE(pBN) = 1; - ZEXPAND_BNU(BN_NUMBER(pBN),0, (int)BN_ROOM(pBN)); - BN_NUMBER(pBN)[0] = a; - return pBN; -} -/* set BN to 2^m */ -__INLINE IppsBigNumState* cpBN_power2(IppsBigNumState* pBN, int power) -{ - cpSize size = BITS_BNU_CHUNK(power+1); - if(BN_ROOM(pBN) >= size) { - BN_SIGN(pBN) = ippBigNumPOS; - BN_SIZE(pBN) = size; - ZEXPAND_BNU(BN_NUMBER(pBN),0, BN_ROOM(pBN)); - SET_BIT(BN_NUMBER(pBN), power); - return pBN; - } - else return NULL; -} - -/* bitsize of BN */ -__INLINE int cpBN_bitsize(const IppsBigNumState* pA) -{ - int bitsize = BITSIZE_BNU(BN_NUMBER(pA), BN_SIZE(pA)); - return bitsize; -} - -/* returns -1/0/+1 depemding on A~B comparison */ -__INLINE int cpBN_cmp(const IppsBigNumState* pA, const IppsBigNumState* pB) -{ - IppsBigNumSGN signA = BN_SIGN(pA); - IppsBigNumSGN signB = BN_SIGN(pB); - - if(signA==signB) { - int result = cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), BN_NUMBER(pB), BN_SIZE(pB)); - return (ippBigNumPOS==signA)? result : -result; - } - return (ippBigNumPOS==signA)? 1 : -1; -} - -/* returns -1/0/+1 depemding on A comparison 00 */ -__INLINE int cpBN_tst(const IppsBigNumState* pA) -{ - if(1==BN_SIZE(pA) && 0==BN_NUMBER(pA)[0]) - return 0; - else - return BN_POSITIVE(pA)? 1 : -1; -} - - -// some addtition functions -__INLINE int IsZero_BN(const IppsBigNumState* pA) -{ - return ( BN_SIZE(pA)==1 ) && ( BN_NUMBER(pA)[0]==0 ); -} -__INLINE int IsOdd_BN(const IppsBigNumState* pA) -{ - return BN_NUMBER(pA)[0] & 1; -} - -__INLINE IppsBigNumState* BN_Word(IppsBigNumState* pBN, BNU_CHUNK_T w) -{ - BN_SIGN(pBN) = ippBigNumPOS; - BN_SIZE(pBN) = 1; - ZEXPAND_BNU(BN_NUMBER(pBN),0, BN_ROOM(pBN)); - BN_NUMBER(pBN)[0] = w; - return pBN; -} -__INLINE IppsBigNumState* BN_Set(const BNU_CHUNK_T* pData, cpSize len, IppsBigNumState* pBN) -{ - BN_SIGN(pBN) = ippBigNumPOS; - BN_SIZE(pBN) = len; - ZEXPAND_COPY_BNU(BN_NUMBER(pBN), BN_ROOM(pBN), pData, len); - return pBN; -} -__INLINE IppsBigNumState* BN_Make(BNU_CHUNK_T* pData, BNU_CHUNK_T* pBuffer, cpSize len, IppsBigNumState* pBN) -{ - BN_ID(pBN) = idCtxBigNum; - BN_SIGN(pBN) = ippBigNumPOS; - BN_SIZE(pBN) = 1; - BN_ROOM(pBN) = len; - BN_NUMBER(pBN) = pData; - BN_BUFFER(pBN) = pBuffer; - return pBN; -} - - - -/* -// fixed single chunk BN -*/ -typedef struct _ippcpBigNumChunk { - IppsBigNumState bn; - BNU_CHUNK_T value; - BNU_CHUNK_T temporary; -} IppsBigNumStateChunk; - -/* reference to BN(1) and BN(2) */ -IppsBigNumState* cpBN_OneRef(void); -IppsBigNumState* cpBN_TwoRef(void); -IppsBigNumState* cpBN_ThreeRef(void); - -#define BN_ONE_REF() cpBN_OneRef() -#define BN_TWO_REF() cpBN_TwoRef() -#define BN_THREE_REF() cpBN_ThreeRef() - -#endif /* _CP_BN_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnca.c deleted file mode 100644 index 1ccfd5736e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnca.c +++ /dev/null @@ -1,1286 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippcp) -// -// Contents: -// ippsBigNumGetSize() -// ippsBigNumInit() -// -// ippsSet_BN() -// ippsGet_BN() -// ippsGetSize_BN() -// ippsExtGet_BN() -// ippsRef_BN() -// -// ippsCmpZero_BN() -// ippsCmp_BN() -// -// ippsAdd_BN() -// ippsSub_BN() -// ippsMul_BN() -// ippsMAC_BN_I() -// ippsDiv_BN() -// ippsMod_BN() -// ippsGcd_BN() -// ippsModInv_BN() -// -// cpPackBigNumCtx(), cpUnpackBigNumCtx() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpbn.h" -#include "pcptool.h" - -/* BN(1) and reference */ -static IppsBigNumStateChunk cpChunk_BN1 = { - { - idCtxBigNum, - ippBigNumPOS, - 1,1, - &cpChunk_BN1.value,&cpChunk_BN1.temporary - }, - 1,0 -}; -IppsBigNumState* cpBN_OneRef(void) -{ return &cpChunk_BN1.bn; }; - -/* BN(2) and reference */ -static IppsBigNumStateChunk cpChunk_BN2 = { - { - idCtxBigNum, - ippBigNumPOS, - 1,1, - &cpChunk_BN2.value,&cpChunk_BN2.temporary - }, - 2,0 -}; -IppsBigNumState* cpBN_TwoRef(void) -{ return &cpChunk_BN2.bn; }; - -/* BN(3) and reference */ -static IppsBigNumStateChunk cpChunk_BN3 = { - { - idCtxBigNum, - ippBigNumPOS, - 1,1, - &cpChunk_BN3.value,&cpChunk_BN3.temporary - }, - 3,0 -}; -IppsBigNumState* cpBN_ThreeRef(void) -{ return &cpChunk_BN3.bn; }; - - - -/*F* -// Name: ippsBigNumGetSize -// -// Purpose: Returns size of BigNum ctx (bytes). -// -// Returns: Reason: -// ippStsNullPtrErr pCtxSize == NULL -// ippStsLengthErr len32 < 1 -// ippStsNoErr no errors -// -// Parameters: -// pCtxSize pointer BigNum ctx size -// -*F*/ -IPPFUN(IppStatus, ippsBigNumGetSize, (cpSize len32, cpSize *pCtxSize)) -{ - IPP_BAD_PTR1_RET(pCtxSize); - IPP_BADARG_RET(len32<1, ippStsLengthErr); - - { - /* convert length to the number of BNU_CHUNK_T */ - cpSize len = INTERNAL_BNU_LENGTH(len32); - /* reserve one BNU_CHUNK_T above for cpDiv_BNU, multiplication, mont exponentiation */ - len++; - - *pCtxSize = sizeof(IppsBigNumState) - + len*sizeof(BNU_CHUNK_T) - + len*sizeof(BNU_CHUNK_T) - + BN_ALIGNMENT-1; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsBigNumInit -// -// Purpose: Init BigNum spec for future usage. -// -// Returns: Reason: -// ippStsNullPtrErr pBN == NULL -// ippStsLengthErr len32<1 -// ippStsNoErr no errors -// -// Parameters: -// len32 max BN length (32-bits segments) -// pBN BigNum ctx -// -*F*/ -IPPFUN(IppStatus, ippsBigNumInit, (cpSize len32, IppsBigNumState* pBN)) -{ - IPP_BADARG_RET(len32<1, ippStsLengthErr); - IPP_BAD_PTR1_RET(pBN); - pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) ); - - { - Ipp8u* ptr = (Ipp8u*)pBN; - - /* convert length to the number of BNU_CHUNK_T */ - cpSize len = INTERNAL_BNU_LENGTH(len32); - - BN_ID(pBN) = idCtxBigNum; - BN_SIGN(pBN) = ippBigNumPOS; - BN_SIZE(pBN) = 1; /* initial valie is zero */ - BN_ROOM(pBN) = len; /* close to what has been passed by user */ - - /* reserve one BNU_CHUNK_T above for cpDiv_BNU, multiplication, mont exponentiation */ - len++; - - /* allocate buffers */ - BN_NUMBER(pBN) = (BNU_CHUNK_T*)(ptr += sizeof(IppsBigNumState)); - BN_BUFFER(pBN) = (BNU_CHUNK_T*)(ptr += len*sizeof(BNU_CHUNK_T)); /* use expanded length here */ - - /* set BN zero */ - ZEXPAND_BNU(BN_NUMBER(pBN), 0, len); - - return ippStsNoErr; - } -} - -/* -// Serialize / Deserialize bigNum context -*/ -void cpPackBigNumCtx(const IppsBigNumState* pBN, Ipp8u* pBuffer) -{ - IppsBigNumState* pAlignedBuffer = (IppsBigNumState*)(IPP_ALIGNED_PTR((pBuffer), BN_ALIGNMENT)); - CopyBlock(pBN, pAlignedBuffer, sizeof(IppsBigNumState)); - BN_NUMBER(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(BN_NUMBER(pBN))-IPP_UINT_PTR(pBN)); - BN_BUFFER(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(BN_BUFFER(pBN))-IPP_UINT_PTR(pBN)); - CopyBlock(BN_NUMBER(pBN), (Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer)), BN_ROOM(pBN)*sizeof(BNU_CHUNK_T)); - CopyBlock(BN_BUFFER(pBN), (Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(BN_BUFFER(pAlignedBuffer)), BN_ROOM(pBN)*sizeof(BNU_CHUNK_T)); -} - -void cpUnpackBigNumCtx(const Ipp8u* pBuffer, IppsBigNumState* pBN) -{ - IppsBigNumState* pAlignedBuffer = (IppsBigNumState*)(IPP_ALIGNED_PTR((pBuffer), BN_ALIGNMENT)); - CopyBlock(pBuffer, pBN, sizeof(IppsBigNumState)); - BN_NUMBER(pBN) = (BNU_CHUNK_T*)((Ipp8u*)pBN + IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer))); - BN_BUFFER(pBN) = (BNU_CHUNK_T*)((Ipp8u*)pBN + IPP_UINT_PTR(BN_BUFFER(pAlignedBuffer))); - CopyBlock((Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(BN_NUMBER(pAlignedBuffer)), BN_NUMBER(pBN), BN_ROOM(pBN)*sizeof(BNU_CHUNK_T)); - CopyBlock((Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(BN_BUFFER(pAlignedBuffer)), BN_BUFFER(pBN), BN_ROOM(pBN)*sizeof(BNU_CHUNK_T)); -} - - -/*F* -// Name: ippsCmpZero_BN -// -// Purpose: Test BigNum value. -// -// Returns: Reason: -// ippStsNullPtrErr pBN == NULL -// pResult == NULL -// ippStsContextMatchErr BN_VALID_ID() -// ippStsNoErr no errors -// -// Parameters: -// pBN BigNum ctx -// pResult result of comparison -// -*F*/ -IPPFUN(IppStatus, ippsCmpZero_BN, (const IppsBigNumState* pBN, Ipp32u* pResult)) -{ - IPP_BAD_PTR2_RET(pBN, pResult); - - pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr); - - if(BN_SIZE(pBN)==1 && BN_NUMBER(pBN)[0]==0) - *pResult = IS_ZERO; - else if (BN_SIGN(pBN)==ippBigNumPOS) - *pResult = GREATER_THAN_ZERO; - else if (BN_SIGN(pBN)==ippBigNumNEG) - *pResult = LESS_THAN_ZERO; - - return ippStsNoErr; -} - - -/*F* -// Name: ippsCmp_BN -// -// Purpose: Compare two BigNums. -// -// Returns: Reason: -// ippStsNullPtrErr pA == NULL -// pB == NULL -// pResult == NULL -// ippStsContextMatchErr BN_VALID_ID(pA) -// BN_VALID_ID(pB) -// ippStsNoErr no errors -// -// Parameters: -// pA BigNum ctx -// pB BigNum ctx -// pResult result of comparison -// -*F*/ -IPPFUN(IppStatus, ippsCmp_BN,(const IppsBigNumState* pA, const IppsBigNumState* pB, Ipp32u *pResult)) -{ - IPP_BAD_PTR3_RET(pA, pB, pResult); - - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - pB = (IppsBigNumState*)( IPP_ALIGNED_PTR(pB, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pB), ippStsContextMatchErr); - - { - int res; - if(BN_SIGN(pA)==BN_SIGN(pB)) { - res = cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), BN_NUMBER(pB), BN_SIZE(pB)); - if(ippBigNumNEG==BN_SIGN(pA)) - res = -res; - } - else - res = (ippBigNumPOS==BN_SIGN(pA))? 1 :-1; - - *pResult = (1==res)? IPP_IS_GT : (-1==res)? IPP_IS_LT : IPP_IS_EQ; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsGetSize_BN -// -// Purpose: Returns BigNum room. -// -// Returns: Reason: -// ippStsNullPtrErr pBN == NULL -// pSize == NULL -// ippStsContextMatchErr BN_VALID_ID(pBN) -// ippStsNoErr no errors -// -// Parameters: -// pBN BigNum ctx -// pSize max BigNum length (in Ipp32u chunks) -// -*F*/ -IPPFUN(IppStatus, ippsGetSize_BN, (const IppsBigNumState* pBN, cpSize* pSize)) -{ - IPP_BAD_PTR2_RET(pBN, pSize); - - pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr); - - *pSize = BN_ROOM(pBN)*sizeof(BNU_CHUNK_T)/sizeof(Ipp32u); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsSet_BN -// -// Purpose: Set BigNum. -// -// Returns: Reason: -// ippStsNullPtrErr pBN == NULL -// pData == NULL -// ippStsContextMatchErr BN_VALID_ID(pBN) -// ippStsLengthErr len32 < 1 -// ippStsOutOfRangeErr len32 > BN_ROOM() -// ippStsNoErr no errors -// -// Parameters: -// sgn sign -// len32 data size (in Ipp32u chunks) -// pData source data pointer -// pBn BigNum ctx -// -*F*/ -IPPFUN(IppStatus, ippsSet_BN, (IppsBigNumSGN sgn, cpSize len32, const Ipp32u* pData, - IppsBigNumState* pBN)) -{ - IPP_BAD_PTR2_RET(pData, pBN); - - pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr); - - IPP_BADARG_RET(len32<1, ippStsLengthErr); - - /* compute real size */ - FIX_BNU(pData, len32); - - { - cpSize len = INTERNAL_BNU_LENGTH(len32); - IPP_BADARG_RET(len > BN_ROOM(pBN), ippStsOutOfRangeErr); - - ZEXPAND_COPY_BNU((Ipp32u*)BN_NUMBER(pBN), BN_ROOM(pBN)*(int)(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)), pData, len32); - - BN_SIZE(pBN) = len; - - if(len32==1 && pData[0] == 0) - sgn = ippBigNumPOS; /* consider zero value as positive */ - BN_SIGN(pBN) = sgn; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsGet_BN -// -// Purpose: Get BigNum. -// -// Returns: Reason: -// ippStsNullPtrErr pBN == NULL -// pData == NULL -// pSgn == NULL -// pLen32 ==NULL -// ippStsContextMatchErr !BN_VALID_ID(pBN) -// ippStsNoErr no errors -// -// Parameters: -// pSgn pointer to the sign -// pLen32 pointer to the data size (in Ipp32u chunks) -// pData pointer to the data buffer -// pBN BigNum ctx -// -*F*/ -IPPFUN(IppStatus, ippsGet_BN, (IppsBigNumSGN* pSgn, cpSize* pLen32, Ipp32u* pData, - const IppsBigNumState* pBN)) -{ - IPP_BAD_PTR4_RET(pSgn, pLen32, pData, pBN); - - pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr); - - { - cpSize len32 = BN_SIZE(pBN)*sizeof(BNU_CHUNK_T)/sizeof(Ipp32u); - Ipp32u* bnData = (Ipp32u*)BN_NUMBER(pBN); - - FIX_BNU(bnData, len32); - COPY_BNU(pData, bnData, len32); - - *pSgn = BN_SIGN(pBN); - *pLen32 = len32; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsRef_BN -// -// Purpose: Get BigNum info. -// -// Returns: Reason: -// ippStsNullPtrErr pBN == NULL -// ippStsContextMatchErr BN_VALID_ID(pBN) -// ippStsNoErr no errors -// -// Parameters: -// pSgn pointer to the sign -// pBitSize pointer to the data size (in bits) -// ppData pointer to the data buffer -// pBN BigNum ctx -// -*F*/ -IPPFUN(IppStatus, ippsRef_BN, (IppsBigNumSGN* pSgn, cpSize* pBitSize, Ipp32u** const ppData, - const IppsBigNumState *pBN)) -{ - IPP_BAD_PTR1_RET(pBN); - - pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr); - - if(pSgn) - *pSgn = BN_SIGN(pBN); - if(pBitSize) { - cpSize bitLen = BITSIZE_BNU(BN_NUMBER(pBN), BN_SIZE(pBN)); - *pBitSize = bitLen? bitLen : 1; - } - - if(ppData) - *ppData = (Ipp32u*)BN_NUMBER(pBN); - - return ippStsNoErr; -} - - -IPPFUN(IppStatus, ippsExtGet_BN, (IppsBigNumSGN* pSgn, cpSize* pBitSize, Ipp32u* pData, - const IppsBigNumState* pBN)) -{ - IPP_BAD_PTR1_RET(pBN); - - pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr); - - { - cpSize bitSize = BITSIZE_BNU(BN_NUMBER(pBN), BN_SIZE(pBN)); - if(pData) - COPY_BNU(pData, (Ipp32u*)BN_NUMBER(pBN), BITS2WORD32_SIZE(bitSize)); - if(pSgn) - *pSgn = BN_SIGN(pBN); - if(pBitSize) - *pBitSize = bitSize? bitSize : 1; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsAdd_BN -// -// Purpose: Add BigNum. -// -// Returns: Reason: -// ippStsNullPtrErr pA == NULL -// pB == NULL -// pR == NULL -// ippStsContextMatchErr BN_VALID_ID(pA) -// BN_VALID_ID(pB) -// BN_VALID_ID(pR) -// ippStsOutOfRangeErr pR can not hold result -// ippStsNoErr no errors -// -// Parameters: -// pA source BigNum -// pB source BigNum -// pR resultant BigNum -// -*F*/ -IPPFUN(IppStatus, ippsAdd_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR)) -{ - IPP_BAD_PTR3_RET(pA, pB, pR); - - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - pB = (IppsBigNumState*)( IPP_ALIGNED_PTR(pB, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pB), ippStsContextMatchErr); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - { - cpSize nsA = BN_SIZE(pA); - cpSize nsB = BN_SIZE(pB); - cpSize nsR = BN_ROOM(pR); - IPP_BADARG_RET(nsR < IPP_MAX(nsA, nsB), ippStsOutOfRangeErr); - - { - BNU_CHUNK_T* pDataR = BN_NUMBER(pR); - - IppsBigNumSGN sgnA = BN_SIGN(pA); - IppsBigNumSGN sgnB = BN_SIGN(pB); - BNU_CHUNK_T* pDataA = BN_NUMBER(pA); - BNU_CHUNK_T* pDataB = BN_NUMBER(pB); - - BNU_CHUNK_T carry; - - if(sgnA==sgnB) { - if(nsA < nsB) { - SWAP(nsA, nsB); - SWAP_PTR(BNU_CHUNK_T, pDataA, pDataB); - } - - carry = cpAdd_BNU(pDataR, pDataA, pDataB, nsB); - if(nsA>nsB) - carry = cpInc_BNU(pDataR+nsB, pDataA+nsB, nsA-nsB, carry); - if(carry) { - if(nsR>nsA) - pDataR[nsA++] = carry; - else - IPP_ERROR_RET(ippStsOutOfRangeErr); - } - BN_SIGN(pR) = sgnA; - } - - else { - int cmpRes = cpCmp_BNU(pDataA, nsA, pDataB, nsB); - - if(0==cmpRes) { - pDataR[0] = 0; - BN_SIZE(pR) = 1; - BN_SIGN(pR) = ippBigNumPOS; - return ippStsNoErr; - } - - if(0>cmpRes) { - SWAP(nsA, nsB); - SWAP_PTR(BNU_CHUNK_T, pDataA, pDataB); - } - - carry = cpSub_BNU(pDataR, pDataA, pDataB, nsB); - if(nsA>nsB) - cpDec_BNU(pDataR+nsB, pDataA+nsB, nsA-nsB, carry); - - BN_SIGN(pR) = cmpRes>0? sgnA : INVERSE_SIGN(sgnA); - } - - FIX_BNU(pDataR, nsA); - BN_SIZE(pR) = nsA; - - return ippStsNoErr; - } - } -} - - -/*F* -// Name: ippsSub_BN -// -// Purpose: Subtcrac BigNum. -// -// Returns: Reason: -// ippStsNullPtrErr pA == NULL -// pB == NULL -// pR == NULL -// ippStsContextMatchErr BN_VALID_ID(pA) -// BN_VALID_ID(pB) -// BN_VALID_ID(pR) -// ippStsOutOfRangeErr pR can not hold result -// ippStsNoErr no errors -// -// Parameters: -// pA source BigNum -// pB source BigNum -// pR resultant BigNum -// -*F*/ -IPPFUN(IppStatus, ippsSub_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR)) -{ - IPP_BAD_PTR3_RET(pA, pB, pR); - - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - pB = (IppsBigNumState*)( IPP_ALIGNED_PTR(pB, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pB), ippStsContextMatchErr); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - { - cpSize nsA = BN_SIZE(pA); - cpSize nsB = BN_SIZE(pB); - cpSize nsR = BN_ROOM(pR); - IPP_BADARG_RET(nsR < IPP_MAX(nsA, nsB), ippStsOutOfRangeErr); - - { - BNU_CHUNK_T* pDataR = BN_NUMBER(pR); - - IppsBigNumSGN sgnA = BN_SIGN(pA); - IppsBigNumSGN sgnB = BN_SIGN(pB); - BNU_CHUNK_T* pDataA = BN_NUMBER(pA); - BNU_CHUNK_T* pDataB = BN_NUMBER(pB); - - BNU_CHUNK_T carry; - - if(sgnA!=sgnB) { - if(nsA < nsB) { - SWAP(nsA, nsB); - SWAP_PTR(BNU_CHUNK_T, pDataA, pDataB); - } - - carry = cpAdd_BNU(pDataR, pDataA, pDataB, nsB); - if(nsA>nsB) - carry = cpInc_BNU(pDataR+nsB, pDataA+nsB, nsA-nsB, carry); - if(carry) { - if(nsR > nsA) - pDataR[nsA++] = carry; - else - IPP_ERROR_RET(ippStsOutOfRangeErr); - } - BN_SIGN(pR) = sgnA; - } - - else { - int cmpRes= cpCmp_BNU(pDataA, nsA, pDataB, nsB); - - if(0==cmpRes) { - ZEXPAND_BNU(pDataR,0, nsR); - BN_SIZE(pR) = 1; - BN_SIGN(pR) = ippBigNumPOS; - return ippStsNoErr; - } - - if(0>cmpRes) { - SWAP(nsA, nsB); - SWAP_PTR(BNU_CHUNK_T, pDataA, pDataB); - } - - carry = cpSub_BNU(pDataR, pDataA, pDataB, nsB); - if(nsA>nsB) - cpDec_BNU(pDataR+nsB, pDataA+nsB, nsA-nsB, carry); - - BN_SIGN(pR) = cmpRes>0? sgnA : INVERSE_SIGN(sgnA); - } - - FIX_BNU(pDataR, nsA); - BN_SIZE(pR) = nsA; - - return ippStsNoErr; - } - } -} - - -/*F* -// Name: ippsMul_BN -// -// Purpose: Multiply BigNum. -// -// Returns: Reason: -// ippStsNullPtrErr pA == NULL -// pB == NULL -// pR == NULL -// ippStsContextMatchErr BN_VALID_ID(pA) -// BN_VALID_ID(pB) -// BN_VALID_ID(pR) -// ippStsOutOfRangeErr pR can not hold result -// ippStsNoErr no errors -// -// Parameters: -// pA source BigNum -// pB source BigNum -// pR resultant BigNum -// -*F*/ -IPPFUN(IppStatus, ippsMul_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR)) -{ - IPP_BAD_PTR3_RET(pA, pB, pR); - - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - pB = (IppsBigNumState*)( IPP_ALIGNED_PTR(pB, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pB), ippStsContextMatchErr); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - { - BNU_CHUNK_T* pDataA = BN_NUMBER(pA); - BNU_CHUNK_T* pDataB = BN_NUMBER(pB); - BNU_CHUNK_T* pDataR = BN_NUMBER(pR); - - cpSize nsA = BN_SIZE(pA); - cpSize nsB = BN_SIZE(pB); - cpSize nsR = BN_ROOM(pR); - - cpSize bitSizeA = BITSIZE_BNU(pDataA, nsA); - cpSize bitSizeB = BITSIZE_BNU(pDataB, nsB); - - /* test if multiplicant/multiplier is zero */ - if(!bitSizeA || !bitSizeB) { - BN_SIZE(pR) = 1; - BN_SIGN(pR) = IppsBigNumPOS; - pDataR[0] = 0; - return ippStsNoErr; - } - - /* test if even low estimation of product A*B exceeded */ - IPP_BADARG_RET(nsR*BNU_CHUNK_BITS < (bitSizeA+bitSizeB-1), ippStsOutOfRangeErr); - - { - BNU_CHUNK_T* aData = pDataA; - BNU_CHUNK_T* bData = pDataB; - - if(pA == pR) { - aData = BN_BUFFER(pR); - COPY_BNU(aData, pDataA, nsA); - } - if((pB == pR) && (pA != pB)) { - bData = BN_BUFFER(pR); - COPY_BNU(bData, pDataB, nsB); - } - - /* clear result */ - ZEXPAND_BNU(pDataR, 0, nsR+1); - - if(pA==pB) - cpSqr_BNU_school(pDataR, aData, nsA); - else - cpMul_BNU_school(pDataR, aData, nsA, bData, nsB); - - nsR = (bitSizeA + bitSizeB + BNU_CHUNK_BITS - 1) /BNU_CHUNK_BITS; - FIX_BNU(pDataR, nsR); - IPP_BADARG_RET(nsR>BN_ROOM(pR), ippStsOutOfRangeErr); - - BN_SIZE(pR) = nsR; - BN_SIGN(pR) = (BN_SIGN(pA)==BN_SIGN(pB)? ippBigNumPOS : ippBigNumNEG); - return ippStsNoErr; - } - } -} - - -/*F* -// Name: ippsMAC_BN_I -// -// Purpose: Multiply and Accumulate BigNum. -// -// Returns: Reason: -// ippStsNullPtrErr pA == NULL -// pB == NULL -// pR == NULL -// ippStsContextMatchErr BN_VALID_ID(pA) -// BN_VALID_ID(pB) -// BN_VALID_ID(pR) -// ippStsOutOfRangeErr pR can not fit result -// ippStsNoErr no errors -// -// Parameters: -// pA source BigNum -// pB source BigNum -// pR resultant BigNum -// -*F*/ -IPPFUN(IppStatus, ippsMAC_BN_I, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR)) -{ - IPP_BAD_PTR3_RET(pA, pB, pR); - - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - pB = (IppsBigNumState*)( IPP_ALIGNED_PTR(pB, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pB), ippStsContextMatchErr); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - { - BNU_CHUNK_T* pDataA = BN_NUMBER(pA); - BNU_CHUNK_T* pDataB = BN_NUMBER(pB); - - cpSize nsA = BN_SIZE(pA); - cpSize nsB = BN_SIZE(pB); - - cpSize bitSizeA = BITSIZE_BNU(pDataA, nsA); - cpSize bitSizeB = BITSIZE_BNU(pDataB, nsB); - /* size of temporary pruduct */ - cpSize nsP = BITS_BNU_CHUNK(bitSizeA+bitSizeB); - - /* test if multiplicant/multiplier is zero */ - if(!nsP) return ippStsNoErr; - /* test if product can't fit to the result */ - IPP_BADARG_RET(BN_ROOM(pR)cmpRes) { - SWAP_PTR(BNU_CHUNK_T, pTmp, pDataP); - } - cpSub_BNU(pDataR, pTmp, pDataP, room); - - BN_SIGN(pR) = cmpRes>0? sgnR : INVERSE_SIGN(sgnR); - } - - FIX_BNU(pDataR, room); - BN_SIZE(pR) = room; - - return ippStsNoErr; - } - } -} - - -/*F* -// Name: ippsDiv_BN -// -// Purpose: Divide BigNum. -// -// Returns: Reason: -// ippStsNullPtrErr pA == NULL -// pB == NULL -// pQ == NULL -// pR == NULL -// ippStsContextMatchErr BN_VALID_ID(pA) -// BN_VALID_ID(pB) -// BN_VALID_ID(pQ) -// BN_VALID_ID(pR) -// ippStsOutOfRangeErr pQ and/or pR can not hold result -// ippStsNoErr no errors -// -// Parameters: -// pA source BigNum -// pB source BigNum -// pQ quotient BigNum -// pR reminder BigNum -// -// A = Q*B + R, 0 <= val(R) < val(B), sgn(A)==sgn(R) -// -*F*/ -IPPFUN(IppStatus, ippsDiv_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pQ, IppsBigNumState* pR)) -{ - IPP_BAD_PTR4_RET(pA, pB, pQ, pR); - - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - pB = (IppsBigNumState*)( IPP_ALIGNED_PTR(pB, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pB), ippStsContextMatchErr); - pQ = (IppsBigNumState*)( IPP_ALIGNED_PTR(pQ, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pQ), ippStsContextMatchErr); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - IPP_BADARG_RET(BN_SIZE(pB)== 1 && BN_NUMBER(pB)[0]==0, ippStsDivByZeroErr); - - IPP_BADARG_RET(BN_ROOM(pR)cmpRes) - SWAP_PTR(IppsBigNumState, x, y); - if(0==cmpRes) { - COPY_BNU(BN_NUMBER(g), BN_NUMBER(x), BN_SIZE(x)); - BN_SIGN(g) = ippBigNumPOS; - BN_SIZE(g) = BN_SIZE(x); - return ippStsNoErr; - } - if(BN_SIZE(x)==1) { - BNU_CHUNK_T gcd = cpGcd_BNU(BN_NUMBER(x)[0], BN_NUMBER(y)[0]); - BN_NUMBER(g)[0] = gcd; - BN_SIZE(g) = 1; - return ippStsNoErr; - } - } - - { - Ipp32u* xBuffer = (Ipp32u*)BN_BUFFER(x); - Ipp32u* yBuffer = (Ipp32u*)BN_BUFFER(y); - Ipp32u* gBuffer = (Ipp32u*)BN_BUFFER(g); - Ipp32u* xData = (Ipp32u*)BN_NUMBER(x); - Ipp32u* yData = (Ipp32u*)BN_NUMBER(y); - Ipp32u* gData = (Ipp32u*)BN_NUMBER(g); - cpSize nsXmax = BN_ROOM(x)*(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)); - cpSize nsYmax = BN_ROOM(y)*(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)); - cpSize nsGmax = BN_ROOM(g)*(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)); - cpSize nsX = BN_SIZE(x)*(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)); - cpSize nsY = BN_SIZE(y)*(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)); - - Ipp32u* T; - Ipp32u* u; - - FIX_BNU(xData, nsX); - FIX_BNU(yData, nsY); - - /* init buffers */ - ZEXPAND_COPY_BNU(xBuffer, nsX, xData, nsXmax); - ZEXPAND_COPY_BNU(yBuffer, nsY, yData, nsYmax); - - T = gBuffer; - u = gData; - ZEXPAND_BNU(T, 0, nsGmax); - ZEXPAND_BNU(u, 0, nsGmax); - - while(nsX > (cpSize)(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u))) { - /* xx and yy is the high-order digits of x and y (yy could be 0) */ - - Ipp64u xx = (Ipp64u)(xBuffer[nsX-1]); - Ipp64u yy = (nsY < nsX)? 0 : (Ipp64u)(yBuffer[nsY-1]); - - Ipp64s AA = 1; - Ipp64s BB = 0; - Ipp64s CC = 0; - Ipp64s DD = 1; - Ipp64s t; - - while((yy+CC)!=0 && (yy+DD)!=0) { - Ipp64u q = ( xx + AA ) / ( yy + CC ); - Ipp64u q1 = ( xx + BB ) / ( yy + DD ); - if(q!=q1) - break; - t = AA - q*CC; - AA = CC; - CC = t; - t = BB - q*DD; - BB = DD; - DD = t; - t = xx - q*yy; - xx = yy; - yy = t; - } - - if(BB == 0) { - /* T = x mod y */ - cpSize nsT = cpMod_BNU32(xBuffer, nsX, yBuffer, nsY); - ZEXPAND_BNU(T, 0, nsGmax); - COPY_BNU(T, xBuffer, nsT); - /* a = b; b = T; */ - ZEXPAND_BNU(xBuffer, 0, nsXmax); - COPY_BNU(xBuffer, yBuffer, nsY); - ZEXPAND_BNU(yBuffer, 0, nsYmax); - COPY_BNU(yBuffer, T, nsY); - } - - else { - Ipp32u carry; - /* - // T = AA*x + BB*y; - // u = CC*x + DD*y; - // b = u; a = T; - */ - if((AA <= 0)&&(BB>=0)) { - Ipp32u a1 = (Ipp32u)(-AA); - carry = cpMulDgt_BNU32(T, yBuffer, nsY, (Ipp32u)BB); - carry = cpMulDgt_BNU32(u, xBuffer, nsY, a1); - /* T = BB*y - AA*x; */ - carry = cpSub_BNU32(T, T, u, nsY); - } - else { - if((AA >= 0)&&(BB<=0)) { - Ipp32u b1 = (Ipp32u)(-BB); - carry = cpMulDgt_BNU32(T, xBuffer, nsY, (Ipp32u)AA); - carry = cpMulDgt_BNU32(u, yBuffer, nsY, b1); - /* T = AA*x - BB*y; */ - carry = cpSub_BNU32(T, T, u, nsY); - } - else { - /*AA*BB>=0 */ - carry = cpMulDgt_BNU32(T, xBuffer, nsY, (Ipp32u)AA); - carry = cpMulDgt_BNU32(u, yBuffer, nsY, (Ipp32u)BB); - /* T = AA*x + BB*y; */ - carry = cpAdd_BNU32(T, T, u, nsY); - } - } - - /* Now T is reserved. We use only u for intermediate results. */ - if((CC <= 0)&&(DD>=0)){ - Ipp32u c1 = (Ipp32u)(-CC); - /* u = x*CC; x = u; */ - carry = cpMulDgt_BNU32(u, xBuffer, nsY, c1); - COPY_BNU(xBuffer, u, nsY); - /* u = y*DD; */ - carry = cpMulDgt_BNU32(u, yBuffer, nsY, (Ipp32u)DD); - /* u = DD*y - CC*x; */ - carry = cpSub_BNU32(u, u, xBuffer, nsY); - } - else { - if((CC >= 0)&&(DD<=0)){ - Ipp32u d1 = (Ipp32u)(-DD); - /* u = y*DD; y = u */ - carry = cpMulDgt_BNU32(u, yBuffer, nsY, d1); - COPY_BNU(yBuffer, u, nsY); - /* u = CC*x; */ - carry = cpMulDgt_BNU32(u, xBuffer, nsY, (Ipp32u)CC); - /* u = CC*x - DD*y; */ - carry = cpSub_BNU32(u, u, yBuffer, nsY); - } - else { - /*CC*DD>=0 */ - /* y = y*DD */ - carry = cpMulDgt_BNU32(u, yBuffer, nsY, (Ipp32u)DD); - COPY_BNU(yBuffer, u, nsY); - /* u = x*CC */ - carry = cpMulDgt_BNU32(u, xBuffer, nsY, (Ipp32u)CC); - /* u = x*CC + y*DD */ - carry = cpAdd_BNU32(u, u, yBuffer, nsY); - } - } - - /* y = u; x = T; */ - COPY_BNU(yBuffer, u, nsY); - COPY_BNU(xBuffer, T, nsY); - } - - FIX_BNU(xBuffer, nsX); - FIX_BNU(yBuffer, nsY); - - if (nsY > nsX) { - SWAP_PTR(IppsBigNumState, x, y); - SWAP(nsX, nsY); - } - - if (nsY==1 && yBuffer[nsY-1]==0) { - /* End evaluation */ - ZEXPAND_BNU(gData, 0, nsGmax); - COPY_BNU(gData, xBuffer, nsX); - BN_SIZE(g) = INTERNAL_BNU_LENGTH(nsX); - BN_SIGN(g) = ippBigNumPOS; - return ippStsNoErr; - } - } - - BN_NUMBER(g)[0] = cpGcd_BNU(((BNU_CHUNK_T*)xBuffer)[0], ((BNU_CHUNK_T*)yBuffer)[0]); - BN_SIZE(g) = 1; - BN_SIGN(g) = ippBigNumPOS; - return ippStsNoErr; - } - } -} - - -/*F* -// Name: ippsModInv_BN -// -// Purpose: Multiplicative Inversion BigNum. -// -// Returns: Reason: -// ippStsNullPtrErr pA == NULL -// pM == NULL -// pR == NULL -// ippStsContextMatchErr BN_VALID_ID(pA) -// BN_VALID_ID(pM) -// BN_VALID_ID(pR) -// ippStsBadArgErr A<=0 -// ippStsBadModulusErr M<=0 -// ippStsScaleRangeErr A>=M -// ippStsOutOfRangeErr pR can not hold result -// ippStsNoErr no errors -// ippStsBadModulusErr inversion not found -// -// Parameters: -// pA source (value) BigNum -// pM source (modulus) BigNum -// pR reminder BigNum -// -*F*/ -IPPFUN(IppStatus, ippsModInv_BN, (IppsBigNumState* pA, IppsBigNumState* pM, IppsBigNumState* pR) ) -{ - IPP_BAD_PTR3_RET(pA, pM, pR); - - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - pM = (IppsBigNumState*)( IPP_ALIGNED_PTR(pM, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pM), ippStsContextMatchErr); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - IPP_BADARG_RET(BN_ROOM(pR) < BN_SIZE(pM), ippStsOutOfRangeErr); - IPP_BADARG_RET(BN_NEGATIVE(pA) || (BN_SIZE(pA)==1 && BN_NUMBER(pA)[0]==0), ippStsBadArgErr); - IPP_BADARG_RET(BN_NEGATIVE(pM) || (BN_SIZE(pM)==1 && BN_NUMBER(pM)[0]==0), ippStsBadModulusErr); - IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), BN_NUMBER(pM), BN_SIZE(pM)) >= 0, ippStsScaleRangeErr); - - { - cpSize nsR = cpModInv_BNU(BN_NUMBER(pR), - BN_NUMBER(pA), BN_SIZE(pA), - BN_NUMBER(pM), BN_SIZE(pM), - BN_BUFFER(pR), BN_BUFFER(pA), BN_BUFFER(pM)); - if(nsR) { - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = nsR; - return ippStsNoErr; - } - else - return ippStsBadModulusErr; - } -} - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnresource.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnresource.h deleted file mode 100644 index 6e46c95096..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnresource.h +++ /dev/null @@ -1,48 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal BN Resource Definitions & Function Prototypes -// -// Created: Sun 29-Jun-2003 12:16 -// Author(s): Sergey Kirillov -// -// -*/ - -#if !defined(_PCP_BNRESOURCE_H) -#define _PCP_BNRESOURCE_H - - -typedef struct { - void* pNext; - IppsBigNumState* pBN; -} BigNumNode; - - -/* size (byte) of BN resource */ -int cpBigNumListGetSize(int feBitSize, int nodes); - -/* init BN resource */ -void cpBigNumListInit(int feBitSize, int nodes, BigNumNode* pList); - -/* get BN from resource */ -IppsBigNumState* cpBigNumListGet(BigNumNode** pList); - -#endif /* _PCP_BNRESOURCE_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnresourceca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnresourceca.c deleted file mode 100644 index 8e475205ee..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnresourceca.c +++ /dev/null @@ -1,87 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal ECC (prime) Resource List Function -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpbnresource.h" -#include "pcpbn.h" - -/* -// Size of BigNum List Buffer -*/ -int cpBigNumListGetSize(int feBitSize, int nodes) -{ - /* size of buffer per single big number */ - int bnSize; - ippsBigNumGetSize(BITS2WORD32_SIZE(feBitSize), &bnSize); - - /* size of buffer for whole list */ - return (ALIGN_VAL-1) + (sizeof(BigNumNode) + bnSize) * nodes; -} - -/* -// Init list -// -// Note: buffer for BN list must have appropriate alignment -*/ -void cpBigNumListInit(int feBitSize, int nodes, BigNumNode* pList) -{ - int itemSize; - /* length of Big Num */ - int bnLen = BITS2WORD32_SIZE(feBitSize); - /* size of buffer per single big number */ - ippsBigNumGetSize(bnLen, &itemSize); - /* size of list item */ - itemSize += sizeof(BigNumNode); - - { - int n; - /* init all nodes */ - BigNumNode* pNode = (BigNumNode*)( (Ipp8u*)pList + (nodes-1)*itemSize ); - BigNumNode* pNext = NULL; - for(n=0; npNext = pNext; - pNode->pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(tbnPtr, ALIGN_VAL) ); - ippsBigNumInit(bnLen, pNode->pBN); - pNext = pNode; - pNode = (BigNumNode*)( (Ipp8u*)pNode - itemSize); - } - } -} - -/* -// Get BigNum reference -*/ -IppsBigNumState* cpBigNumListGet(BigNumNode** ppList) -{ - if(*ppList) { - IppsBigNumState* ret = (*ppList)->pBN; - *ppList = (*ppList)->pNext; - return ret; - } - else - return NULL; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnsetca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnsetca.c deleted file mode 100644 index 0afc468d3b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnsetca.c +++ /dev/null @@ -1,117 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Big Number Operations -// -// Contents: -// ippsSetOctString_BN() -// ippsGetOctString_BN() -// -// -*/ - -#include "owndefs.h" -#include "owncp.h" -#include "pcpbn.h" - - -/*F* -// Name: ippsSetOctString_BN -// -// Purpose: Convert octet string into the BN value. -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pOctStr -// NULL == pBN -// -// ippStsLengthErr 0>strLen -// -// ippStsSizeErr BN_ROOM() is enough for keep actual strLen -// -// ippStsNoErr no errors -// -// Parameters: -// pOctStr pointer to the source octet string -// strLen octet string length -// pBN pointer to the target BN -// -*F*/ -IPPFUN(IppStatus, ippsSetOctString_BN,(const Ipp8u* pOctStr, cpSize strLen, - IppsBigNumState* pBN)) -{ - IPP_BAD_PTR2_RET(pOctStr, pBN); - - pBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pBN, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pBN), ippStsContextMatchErr); - - IPP_BADARG_RET((0>strLen), ippStsLengthErr); - - /* remove leading zeros */ - while(strLen && (0==pOctStr[0])) { - strLen--; - pOctStr++; - } - - /* test BN size */ - IPP_BADARG_RET((int)(sizeof(BNU_CHUNK_T)*BN_ROOM(pBN))strLen), ippStsLengthErr); - - return cpToOctStr_BNU(pOctStr,strLen, BN_NUMBER(pBN),BN_SIZE(pBN))? ippStsNoErr : ippStsLengthErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32arith.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32arith.c deleted file mode 100644 index 1bf70f0a0a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32arith.c +++ /dev/null @@ -1,366 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. Cryptography Primitives. -// Internal BNU32 arithmetic. -// -// Contents: -// -// cpAdd_BNU32() -// cpSub_BNU32() -// -// cpMulDgt_BNU32() -// cpSubMulDgt_BNU32() -// -// cpDiv_BNU32() -// -// -*/ - -#include "owncp.h" -#include "pcpbnumisc.h" -#include "pcpbnu32misc.h" -#include "pcpbnu32arith.h" - -/* -// BNU32 addition -*/ -Ipp32u cpAdd_BNU32(Ipp32u* pR, const Ipp32u* pA, const Ipp32u* pB, cpSize ns) -{ - Ipp32u carry = 0; - cpSize i; - for(i=0; i>(32-1); - } - return borrow; -} - -/* -// BNU32 mul_by_digit -*/ -Ipp32u cpMulDgt_BNU32(Ipp32u* pR, const Ipp32u* pA, cpSize nsA, Ipp32u val) -{ - Ipp32u carry = 0; - cpSize i; - for(i=0; i0; nsA--) { - Ipp64u r = (Ipp64u)*pR + (Ipp64u)(*pA++) * val + extension; - *pR++ = LODWORD(r); - extension = HIDWORD(r); - } - return extension; -} -#endif - -/* -// BNU32 mul_by_digit_subtract -*/ -#if !((_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -Ipp32u cpSubMulDgt_BNU32(Ipp32u* pR, const Ipp32u* pA, cpSize nsA, Ipp32u val) -{ - Ipp32u carry = 0; - for(; nsA>0; nsA--) { - Ipp64u r = (Ipp64u)*pR - (Ipp64u)(*pA++) * val - carry; - *pR++ = LODWORD(r); - carry = 0-HIDWORD(r); - } - return carry; -} -#endif - -/* -// BNU32 division -*/ -#if !((_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -int cpDiv_BNU32(Ipp32u* pQ, cpSize* sizeQ, - Ipp32u* pX, cpSize sizeX, - Ipp32u* pY, cpSize sizeY) -{ - FIX_BNU(pY,sizeY); - FIX_BNU(pX,sizeX); - - /* special case */ - if(sizeX < sizeY) { - - if(pQ) { - pQ[0] = 0; - *sizeQ = 1; - } - - return sizeX; - } - - /* special case */ - if(1 == sizeY) { - int i; - Ipp32u r = 0; - for(i=(int)sizeX-1; i>=0; i--) { - Ipp64u tmp = MAKEDWORD(pX[i],r); - Ipp32u q = LODWORD(tmp / pY[0]); - r = LODWORD(tmp - q*pY[0]); - if(pQ) pQ[i] = q; - } - - pX[0] = r; - - if(pQ) { - FIX_BNU(pQ,sizeX); - *sizeQ = sizeX; - } - - return 1; - } - - - /* common case */ - { - cpSize qs = sizeX-sizeY+1; - - cpSize nlz = cpNLZ_BNU32(pY[sizeY-1]); - - /* normalization */ - pX[sizeX] = 0; - if(nlz) { - cpSize ni; - - pX[sizeX] = pX[sizeX-1] >> (32-nlz); - for(ni=sizeX-1; ni>0; ni--) - pX[ni] = (pX[ni]<>(32-nlz)); - pX[0] <<= nlz; - - for(ni=sizeY-1; ni>0; ni--) - pY[ni] = (pY[ni]<>(32-nlz)); - pY[0] <<= nlz; - } - - /* - // division - */ - { - Ipp32u yHi = pY[sizeY-1]; - - int i; - for(i=(int)qs-1; i>=0; i--) { - Ipp32u extend; - - /* estimate digit of quotient */ - Ipp64u tmp = MAKEDWORD(pX[i+sizeY-1], pX[i+sizeY]); - Ipp64u q = tmp / yHi; - Ipp64u r = tmp - q*yHi; - - /* tune estimation above */ - //for(; (q>=CONST_64(0x100000000)) || (Ipp64u)q*pY[sizeY-2] > MAKEDWORD(pX[i+sizeY-2],r); ) { - for(; HIDWORD(q) || (Ipp64u)q*pY[sizeY-2] > MAKEDWORD(pX[i+sizeY-2],r); ) { - q -= 1; - r += yHi; - if( HIDWORD(r) ) - break; - } - - /* multiply and subtract */ - extend = cpSubMulDgt_BNU32(pX+i, pY, sizeY, (Ipp32u)q); - extend = (pX[i+sizeY] -= extend); - - if(extend) { /* subtracted too much */ - q -= 1; - extend = cpAdd_BNU32(pX+i, pY, pX+i, sizeY); - pX[i+sizeY] += extend; - } - - /* store quotation digit */ - if(pQ) pQ[i] = LODWORD(q); - } - } - - /* de-normalization */ - if(nlz) { - cpSize ni; - for(ni=0; ni>nlz) | (pX[ni+1]<<(32-nlz)); - for(ni=0; ni>nlz) | (pY[ni+1]<<(32-nlz)); - pY[sizeY-1] >>= nlz; - } - - FIX_BNU(pX,sizeX); - - if(pQ) { - FIX_BNU(pQ,qs); - *sizeQ = qs; - } - - return sizeX; - } -} -#endif - -#define FE_MUL(R,A,B,LEN) { \ - int aidx, bidx; \ - \ - for(aidx=0; aidx<(LEN); aidx++) (R)[aidx] = 0; \ - \ - for(bidx=0; bidx<(LEN); bidx++) { \ - Ipp64u b = (B)[bidx]; \ - Ipp32u c = 0; \ - for(aidx=0; aidx<(LEN); aidx++) { \ - Ipp64u t = (R)[bidx+aidx] + (A)[aidx] * b + c; \ - (R)[bidx+aidx] = LODWORD(t); \ - c = HIDWORD(t); \ - } \ - (R)[bidx+aidx] = c; \ - } \ -} - -#if 0 -#if !((_IPP==_IPP_W7) || \ - (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || \ - (_IPP==_IPP_P8) || \ - (_IPP>=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -void cpMul_BNU8(const Ipp32u* pA, const Ipp32u* pB, Ipp32u* pR) -{ - FE_MUL(pR, pA, pB, 8) -} -#endif -#endif - -#if 0 -#if !((_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -void cpMul_BNU4(const Ipp32u* pA, const Ipp32u* pB, Ipp32u* pR) -{ - FE_MUL(pR, pA, pB, 4) -} -#endif -#endif - -#if 0 -#if !((_IPP==_IPP_W7) || \ - (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || \ - (_IPP==_IPP_P8) || \ - (_IPP>=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -void cpSqr_BNU8(const Ipp32u* pA, Ipp32u* pR) -{ - FE_MUL(pR, pA, pA, 8) -} -#endif -#endif - -#if 0 -#if !((_IPP==_IPP_W7) || \ - (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || \ - (_IPP==_IPP_P8) || \ - (_IPP>=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -void cpSqr_BNU4(const Ipp32u* pA, Ipp32u* pR) -{ - FE_MUL(pR, pA, pA, 4) -} -#endif -#endif diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32arith.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32arith.h deleted file mode 100644 index 39ce622d2e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32arith.h +++ /dev/null @@ -1,50 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. -// Internal BNU32 arithmetic -// -// -*/ - -#if !defined(_CP_BNU32_ARITH_H) -#define _CP_BNU32_ARITH_H - -Ipp32u cpAdd_BNU32(Ipp32u* pR, const Ipp32u* pA, const Ipp32u* pB, int ns); -Ipp32u cpSub_BNU32(Ipp32u* pR, const Ipp32u* pA, const Ipp32u* pB, int ns); -Ipp32u cpInc_BNU32(Ipp32u* pR, const Ipp32u* pA, cpSize ns, Ipp32u val); -Ipp32u cpDec_BNU32(Ipp32u* pR, const Ipp32u* pA, cpSize ns, Ipp32u val); - -Ipp32u cpMulDgt_BNU32(Ipp32u* pR, const Ipp32u* pA, int ns, Ipp32u val); -Ipp32u cpSubMulDgt_BNU32(Ipp32u* pR, const Ipp32u* pA, int nsA, Ipp32u val); -#if 0 -Ipp32u cpAddMulDgt_BNU32(Ipp32u* pR, const Ipp32u* pA, int nsA, Ipp32u val); -#endif - -int cpDiv_BNU32(Ipp32u* pQ, int* nsQ, Ipp32u* pX, int nsX, Ipp32u* pY, int nsY); -#define cpMod_BNU32(pX,sizeX, pM,sizeM) cpDiv_BNU32(NULL,NULL, (pX),(sizeX), (pM),(sizeM)) - -int cpFromOS_BNU32(Ipp32u* pBNU, const Ipp8u* pOctStr, int strLen); -int cpToOS_BNU32(Ipp8u* pStr, int strLen, const Ipp32u* pBNU, int bnuSize); - -void cpMul_BNU8(const Ipp32u* pA, const Ipp32u* pB, Ipp32u* pR); -void cpMul_BNU4(const Ipp32u* pA, const Ipp32u* pB, Ipp32u* pR); -void cpSqr_BNU8(const Ipp32u* pA, Ipp32u* pR); -void cpSqr_BNU4(const Ipp32u* pA, Ipp32u* pR); - -#endif /* _CP_BNU32_ARITH_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32misc.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32misc.c deleted file mode 100644 index 36e777f264..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32misc.c +++ /dev/null @@ -1,229 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. Cryptography Primitives. -// Unsigned internal BNU32 misc functionality -// -// Contents: -// cpNLZ_BNU32() -// cpNTZ_BNU32() -// -// cpLSL_BNU32() -// cpLSR_BNU32() -// -// cpFromOctStr_BNU32() -// cpToOctStr_BNU32() -// -// -*/ - -#include "owncp.h" -#include "pcpbnuimpl.h" -#include "pcpbnumisc.h" -#include "pcpbnu32misc.h" - - -/* -// number of leading zeros -*/ -cpSize cpNLZ_BNU32(Ipp32u x) -{ - cpSize nlz = BITSIZE(Ipp32u); - if(x) { - nlz = 0; - if( 0==(x & 0xFFFF0000) ) { nlz +=16; x<<=16; } - if( 0==(x & 0xFF000000) ) { nlz += 8; x<<= 8; } - if( 0==(x & 0xF0000000) ) { nlz += 4; x<<= 4; } - if( 0==(x & 0xC0000000) ) { nlz += 2; x<<= 2; } - if( 0==(x & 0x80000000) ) { nlz++; } - } - return nlz; -} - -/* -// number of trailing zeros -*/ -#if 0 -cpSize cpNTZ_BNU32(Ipp32u x) -{ - cpSize ntz = BITSIZE(Ipp32u); - if(x) { - ntz = 0; - if( 0==(x & 0x0000FFFF) ) { ntz+=16; x>>=16; } - if( 0==(x & 0x000000FF) ) { ntz+= 8; x>>= 8; } - if( 0==(x & 0x0000000F) ) { ntz+= 4; x>>= 4; } - if( 0==(x & 0x00000003) ) { ntz+= 2; x>>= 2; } - if( 0==(x & 0x00000001) ) { ntz++; } - } - return ntz; -} -#endif - -/* -// Logical shift left (including inplace) -// -// Returns new length -*/ -#if 0 -cpSize cpLSL_BNU32(Ipp32u* pR, const Ipp32u* pA, cpSize nsA, cpSize nBits) -{ - cpSize nlz = cpNLZ_BNU32(pA[nsA-1]); - cpSize nw = nBits/BNU_CHUNK_32BIT; - cpSize n; - - pR += nw; - - nBits %= BNU_CHUNK_32BIT; - if(nBits) { - Ipp32u hi,lo; - - if(nlz < nBits ) - hi = 0; - else - hi = pA[--nsA]; - - for(n=nsA; n>0; n--) { - lo = pA[n-1]; - pR[n] = (hi<>(BNU_CHUNK_32BIT-nBits)); - hi = lo; - } - pR[0] = (hi<0; n--) - pR[n-1] = pA[n-1]; - } - - pR--; - for(n=0; n>nBits) | (hi<<(BNU_CHUNK_32BIT-nBits)); - lo = hi; - } - if(cnz > nBits) - pR[nsA-1] = (lo>>nBits); - else - nsA--; - } - - else { - for(n=0; n=4; bnuSize++,strLen-=4) { - /* pack 4 bytes into single Ipp32u value*/ - *pBNU++ = ( pOctStr[strLen-4]<<(8*3) ) - +( pOctStr[strLen-3]<<(8*2) ) - +( pOctStr[strLen-2]<<(8*1) ) - + pOctStr[strLen-1]; - } - - /* convert the beginning of the string */ - if(strLen) { - Ipp32u x; - for(x=0; strLen>0; strLen--) { - Ipp32u d = *pOctStr++; - x = x*256 + d; - } - *pBNU++ = x; - bnuSize++; - } - - return bnuSize? bnuSize : 1; -} - - -/* -// Convert BNU into Octet String representation -// -// Returns strLen or 0 if no success -*/ -cpSize cpToOctStr_BNU32(Ipp8u* pStr, cpSize strLen, const Ipp32u* pBNU, cpSize bnuSize) -{ - FIX_BNU(pBNU, bnuSize); - { - int bnuBitSize = BITSIZE_BNU32(pBNU, bnuSize); - if(bnuBitSize <= strLen*BYTESIZE) { - Ipp32u x = pBNU[bnuSize-1]; - - ZEXPAND_BNU(pStr, 0, strLen); - pStr += strLen - BITS2WORD8_SIZE(bnuBitSize); - - if(x) { - int nb; - for(nb=cpNLZ_BNU32(x)/BYTESIZE; nb<4; nb++) - *pStr++ = EBYTE(x,3-nb); - - for(--bnuSize; bnuSize>0; bnuSize--) { - x = pBNU[bnuSize-1]; - *pStr++ = EBYTE(x,3); - *pStr++ = EBYTE(x,2); - *pStr++ = EBYTE(x,1); - *pStr++ = EBYTE(x,0); - } - } - return strLen; - } - else - return 0; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32misc.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32misc.h deleted file mode 100644 index 228b965221..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnu32misc.h +++ /dev/null @@ -1,71 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. Cryptography Primitives. -// Internal Miscellaneous BNU 32 bit Definitions & Function Prototypes -// -// -*/ - -#if !defined(_CP_BNU32_MISC_H) -#define _CP_BNU32_MISC_H - - -/* bit operations */ -#define BITSIZE_BNU32(p,ns) ((ns)*BNU_CHUNK_32BIT-cpNLZ_BNU32((p)[(ns)-1])) - -/* number of leading/trailing zeros */ -cpSize cpNLZ_BNU32(Ipp32u x); -#if 0 -cpSize cpNTZ_BNU32(Ipp32u x); -#endif - -/* most significant BNU bit */ -__INLINE int cpMSBit_BNU32(const Ipp32u* pA, cpSize nsA) -{ - FIX_BNU(pA, nsA); - return nsA*BITSIZE(Ipp32u) - cpNLZ_BNU32(pA[nsA-1]) -1; -} - - -__INLINE int cpCmp_BNU32(const Ipp32u* pA, cpSize nsA, const Ipp32u* pB, cpSize nsB) -{ - if(nsA!=nsB) - return nsA>nsB? 1 : -1; - else { - for(; nsA>0; nsA--) { - if(pA[nsA-1] > pB[nsA-1]) - return 1; - else if(pA[nsA-1] < pB[nsA-1]) - return -1; - } - return 0; - } -} - -/* logical shift left/right */ -#if 0 -cpSize cpLSL_BNU32(Ipp32u* pR, const Ipp32u* pA, cpSize nsA, cpSize nBits); -cpSize cpLSR_BNU32(Ipp32u* pR, const Ipp32u* pA, cpSize nsA, cpSize nBits); -#endif - -/* to/from oct string conversion */ -cpSize cpToOctStr_BNU32(Ipp8u* pStr, cpSize strLen, const Ipp32u* pBNU, cpSize bnuSize); -cpSize cpFromOctStr_BNU32(Ipp32u* pBNU, const Ipp8u* pOctStr, cpSize strLen); - -#endif /* _CP_BNU32_MISC_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnuarith.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnuarith.c deleted file mode 100644 index d224a5622b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnuarith.c +++ /dev/null @@ -1,537 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. Cryptography Primitives. -// Internal Unsigned arithmetic -// -// Contents: -// cpAdd_BNU() -// cpSub_BNU() -// cpInc_BNU() -// cpDec_BNU() -// -// cpAddAdd_BNU() -// cpAddSub_BNU() -// -// cpMuldgt_BNU() -// cpAddMulDgt_BNU() -// cpSubMulDgt_BNU() -// -// cpMulAdc_BNU_school() -// cpSqrAdc_BNU_school() -// -// cpDiv_BNU() -// cpMod_BNU() -// cpGcd_BNU() -// cpModInv_BNU() -// -// -*/ - -#include "owncp.h" -#include "pcpbnuarith.h" -#include "pcpbnumisc.h" - - -/* Function cpAdd_BNU - addition of 2 BigNumbers */ -#if !((_IPP==_IPP_W7) || \ - (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || \ - (_IPP==_IPP_P8) || \ - (_IPP>=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8) || \ - (_IPPLRB>=_IPPLRB_B1)) -BNU_CHUNK_T cpAdd_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, cpSize ns) -{ - BNU_CHUNK_T carry = 0; - cpSize i; - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8) || \ - (_IPPLRB>=_IPPLRB_B1)) -BNU_CHUNK_T cpSub_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, cpSize ns) -{ - BNU_CHUNK_T borrow = 0; - cpSize i; - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -BNU_CHUNK_T cpInc_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val) -{ - cpSize i; - for(i=0; i=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -BNU_CHUNK_T cpDec_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val) -{ - cpSize i; - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -BNU_CHUNK_T cpAddAdd_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, const BNU_CHUNK_T* pC, cpSize ns) -{ - BNU_CHUNK_T carry1 = 0; - BNU_CHUNK_T carry2 = 0; - cpSize i; - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -BNU_CHUNK_T cpAddSub_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, const BNU_CHUNK_T* pC, cpSize ns) -{ - BNU_CHUNK_T carry = 0; - BNU_CHUNK_T borrow = 0; - cpSize i; - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -BNU_CHUNK_T cpMulDgt_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val) -{ - BNU_CHUNK_T extension = 0; - cpSize i; - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) -BNU_CHUNK_T cpAddMulDgt_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val) -{ - BNU_CHUNK_T extension = 0; - cpSize i; - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8) || \ - (_IPPLRB >= _IPPLRB_B1)) -BNU_CHUNK_T cpSubMulDgt_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val) -{ - BNU_CHUNK_T extension = 0; - cpSize i; - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8) ) -// || (_IPPLRB >= _IPPLRB_B1)) //dlaptev: is it renaming? -//BNU_CHUNK_T cpMul_BNU_school(BNU_CHUNK_T* pR, -// const BNU_CHUNK_T* pA, cpSize nsA, -// const BNU_CHUNK_T* pB, cpSize nsB) -BNU_CHUNK_T cpMulAdc_BNU_school(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pA, cpSize nsA, - const BNU_CHUNK_T* pB, cpSize nsB) -{ - const BNU_CHUNK_T* pa = (BNU_CHUNK_T*)pA; - const BNU_CHUNK_T* pb = (BNU_CHUNK_T*)pB; - BNU_CHUNK_T* pr = (BNU_CHUNK_T*)pR; - - BNU_CHUNK_T extension = 0; - cpSize i, j; - - ZEXPAND_BNU(pr, 0, nsA+nsB); - - for(i=0; i=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8) ) -//|| (_IPPLRB >= _IPPLRB_B1)) //dlaptev: is it renaming? -//BNU_CHUNK_T cpSqr_BNU_school(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize nsA) -BNU_CHUNK_T cpSqrAdc_BNU_school(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize nsA) -{ - cpSize i; - - BNU_CHUNK_T extension; - BNU_CHUNK_T rH, rL; - - /* init result */ - pR[0] = 0; - for(i=1, extension=0; i b){ - gcd = a; - t = b; - } else { - t = a; - gcd = b; - } - - while (t != 0) { - r = gcd % t; - gcd = t; - t = r; - } - return gcd; -} - -/* -// cpMAC_BNU -// -// Multiply with ACcumulation -// Computes r <- r + a * b, returns real size of the r in the size_r variable -// Returns 0 if there are no enought buffer size to write to r[MAX(size_r + 1, size_a + size_b) - 1] -// Returns 1 if no error -// -// Note: -// DO NOT run in inplace mode -// The minimum buffer size for the r must be (size_a + size_b - 1) -// the maximum buffer size for the r is MAX(size_r + 1, size_a + size_b) -*/ -static int cpMac_BNU(BNU_CHUNK_T* pR, cpSize nsR, - const BNU_CHUNK_T* pA, cpSize nsA, - const BNU_CHUNK_T* pB, cpSize nsB) -{ - /* cleanup the rest of destination buffer */ - ZEXPAND_BNU(pR, nsR, nsA+nsB-1); - //nsR = IPP_MAX(nsR, nsA+nsB); - - { - BNU_CHUNK_T expansion = 0; - cpSize i; - for(i=0; i -static void Print_BNU(const char* note, const BNU_CHUNK_T* pData, int len) -{ - if(note) - printf("%s", note); - { - int n; - Ipp32u* pDataT = (Ipp32u*)pData; - len *= (sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)); - for(n=len; n>0; n--) { - Ipp32u x = pDataT[n-1]; - printf("%08x ", x); - } - printf("\n"); - } -} -#endif - -int cpModInv_BNU(BNU_CHUNK_T* pInv, - const BNU_CHUNK_T* pA, cpSize nsA, - const BNU_CHUNK_T* pM, cpSize nsM, - BNU_CHUNK_T* bufInv, BNU_CHUNK_T* bufA, BNU_CHUNK_T* bufM) -{ - FIX_BNU(pA, nsA); - FIX_BNU(pM, nsM); - - /* inv(1) = 1 */ - if(nsA==1 && pA[0]==1) { - pInv[0] = 1; - return 1; - } - - { - cpSize moduloSize = nsM; - - BNU_CHUNK_T* X1 = pInv; - BNU_CHUNK_T* X2 = bufM; - BNU_CHUNK_T* Q = bufInv; - cpSize nsX1 = 1; - cpSize nsX2 = 1; - cpSize nsQ; - - COPY_BNU(bufA, pA, nsA); - - ZEXPAND_BNU(X1, 0, moduloSize); - ZEXPAND_BNU(X2, 0, moduloSize); - X2[0] = 1; - - //printf("\n"); - for(;;) { - nsM = cpDiv_BNU(Q, &nsQ, (BNU_CHUNK_T*)pM, nsM, bufA, nsA); - //Print_BNU(" q: ", Q, nsQ); - //Print_BNU(" m: ", pM, nsM); - nsX1 = cpMac_BNU(X1,moduloSize, Q,nsQ, X2,nsX2); - //Print_BNU("X1: ", X1, nsX1); - - if (nsM==1 && pM[0]==1) { - ////ZEXPAND_BNU(X2, nsX2, moduloSize); - nsX2 = cpMac_BNU(X2,moduloSize, X1,nsX1, bufA, nsA); - COPY_BNU((BNU_CHUNK_T*)pM, X2, moduloSize); - cpSub_BNU(pInv, pM, X1, moduloSize); - FIX_BNU(pInv, moduloSize); - return moduloSize; - } - else if (nsM==1 && pM[0]==0) { - cpMul_BNU_school((BNU_CHUNK_T*)pM, X1,nsX1, bufA, nsA); - /* gcd = buf_a */ - return 0; - } - - nsA = cpDiv_BNU(Q, &nsQ, bufA, nsA, (BNU_CHUNK_T*)pM, nsM); - //Print_BNU(" q: ", Q, nsQ); - //Print_BNU(" a: ", bufA, nsA); - nsX2 = cpMac_BNU(X2,moduloSize, Q,nsQ, X1,nsX1); - //Print_BNU("X2: ", X2, nsX2); - - if(nsA==1 && bufA[0]==1) { - ////ZEXPAND_BNU(X1, nsX1, moduloSize); - nsX1 = cpMac_BNU(X1, moduloSize, X2, nsX2, pM, nsM); - COPY_BNU((BNU_CHUNK_T*)pM, X1, moduloSize); - COPY_BNU(pInv, X2, nsX2); - return nsX2; - } - else if (nsA==1 && bufA[0]==0) { - /* gcd = m */ - COPY_BNU(X1, pM, nsM); - cpMul_BNU_school((BNU_CHUNK_T*)pM, X2, nsX2, X1, nsM); - return 0; - } - } - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnuarith.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnuarith.h deleted file mode 100644 index 9481317d23..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnuarith.h +++ /dev/null @@ -1,169 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. -// Internal Unsigned internal arithmetic -// -// -*/ - -#if !defined(_CP_BNU_ARITH_H) -#define _CP_BNU_ARITH_H - -#include "pcpbnuimpl.h" -#include "pcpbnu32arith.h" -#include "pcpmulbnukara.h" - -BNU_CHUNK_T cpAdd_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, cpSize ns); -BNU_CHUNK_T cpSub_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, cpSize ns); -BNU_CHUNK_T cpInc_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val); -BNU_CHUNK_T cpDec_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val); - -#if defined(_USE_KARATSUBA_) -BNU_CHUNK_T cpAddAdd_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, const BNU_CHUNK_T* pC, cpSize size); -BNU_CHUNK_T cpAddSub_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, const BNU_CHUNK_T* pC, cpSize size); -#endif - -BNU_CHUNK_T cpAddMulDgt_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val); -#if 0 -BNU_CHUNK_T cpMulDgt_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val); -BNU_CHUNK_T cpSubMulDgt_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize ns, BNU_CHUNK_T val); -#endif - - -BNU_CHUNK_T cpMulAdc_BNU_school(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pA, cpSize nsA, - const BNU_CHUNK_T* pB, cpSize nsB); -BNU_CHUNK_T cpMulAdx_BNU_school(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pA, cpSize nsA, - const BNU_CHUNK_T* pB, cpSize nsB); - -__INLINE BNU_CHUNK_T cpMul_BNU_school(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pA, cpSize nsA, - const BNU_CHUNK_T* pB, cpSize nsB) -{ -#if(_ADCOX_NI_ENABLING_==_FEATURE_ON_) - return cpMulAdx_BNU_school(pR, pA,nsA, pB,nsB); -#elif(_ADCOX_NI_ENABLING_==_FEATURE_TICKTOCK_) - return IsFeatureEnabled(ADCOX_ENABLED)? cpMulAdx_BNU_school(pR, pA,nsA, pB,nsB) - : cpMulAdc_BNU_school(pR, pA,nsA, pB,nsB); -#else - return cpMulAdc_BNU_school(pR, pA,nsA, pB,nsB); -#endif -} - -BNU_CHUNK_T cpSqrAdc_BNU_school(BNU_CHUNK_T * pR, const BNU_CHUNK_T * pA, cpSize nsA); -BNU_CHUNK_T cpSqrAdx_BNU_school(BNU_CHUNK_T * pR, const BNU_CHUNK_T * pA, cpSize nsA); - -__INLINE BNU_CHUNK_T cpSqr_BNU_school(BNU_CHUNK_T * pR, const BNU_CHUNK_T * pA, cpSize nsA) -{ -#if(_ADCOX_NI_ENABLING_==_FEATURE_ON_) - return cpSqrAdx_BNU_school(pR, pA,nsA); -#elif(_ADCOX_NI_ENABLING_==_FEATURE_TICKTOCK_) - return IsFeatureEnabled(ADCOX_ENABLED)? cpSqrAdx_BNU_school(pR, pA,nsA) - : cpSqrAdc_BNU_school(pR, pA,nsA); -#else - return cpSqrAdc_BNU_school(pR, pA,nsA); -#endif -} - -#if(_IPP_ARCH==_IPP_ARCH_EM64T) -BNU_CHUNK_T* gf256_add(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, const BNU_CHUNK_T* pModulus); -BNU_CHUNK_T* gf256_sub(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, const BNU_CHUNK_T* pModulus); -BNU_CHUNK_T* gf256_neg(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pModulus); -BNU_CHUNK_T* gf256_mulm(BNU_CHUNK_T* pR,const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, const BNU_CHUNK_T* pModulus, BNU_CHUNK_T m0); -BNU_CHUNK_T* gf256_sqrm(BNU_CHUNK_T* pR,const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pModulus, BNU_CHUNK_T m0); -BNU_CHUNK_T* gf256_div2(BNU_CHUNK_T* pR,const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pModulus); -#endif - -BNU_CHUNK_T cpGcd_BNU(BNU_CHUNK_T a, BNU_CHUNK_T b); - -int cpModInv_BNU(BNU_CHUNK_T* pInv, - const BNU_CHUNK_T* pA, cpSize nsA, - const BNU_CHUNK_T* pM, cpSize nsM, - BNU_CHUNK_T* bufInv, BNU_CHUNK_T* bufA, BNU_CHUNK_T* bufM); - - -/* -// multiplication/squaring wrappers -*/ -__INLINE cpSize cpMul_BNU_BufferSize(cpSize opLen) -{ -#if !defined (_USE_KARATSUBA_) - UNREFERENCED_PARAMETER(opLen); - return 0; -#else - return cpKaratsubaBufferSize(opLen); -#endif -} -__INLINE BNU_CHUNK_T cpMul_BNU(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pA, cpSize nsA, - const BNU_CHUNK_T* pB, cpSize nsB, - BNU_CHUNK_T* pBuffer) -{ -#if !defined(_USE_KARATSUBA_) - UNREFERENCED_PARAMETER(pBuffer); - return cpMul_BNU_school(pR, pA,nsA, pB,nsB); -#else - if(nsA!=nsB || nsA> (BNU_CHUNK_BITS/2)) - -/* (carry,R) = A+B */ -#define ADD_AB(CARRY,R, A,B) \ -do { \ - BNU_CHUNK_T __s = (A) + (B); \ - (CARRY) = __s < (A); \ - (R) = __s; \ -} while(0) - -/* (carry,R) = A+B+C */ -#define ADD_ABC(CARRY,R, A,B,C) \ -do { \ - BNU_CHUNK_T __s = (A) + (B); \ - BNU_CHUNK_T __t1= __s < (A); \ - BNU_CHUNK_T __r = __s + (C); \ - BNU_CHUNK_T __t2 = __r < __s; \ - (CARRY) = __t1 + __t2; \ - (R) = __r; \ -} while(0) - -/* (borrow,R) = A-B */ -#define SUB_AB(BORROW,R, A,B) \ -do { \ - (BORROW) = (A)<(B); \ - (R) = (A)-(B); \ -} while(0) - -/* (borrow,R) = A-B-C */ -#define SUB_ABC(BORROW,R, A,B,C) \ -do { \ - BNU_CHUNK_T __s = (A) -( B); \ - BNU_CHUNK_T __t1= __s > (A); \ - BNU_CHUNK_T __r = __s - (C); \ - BNU_CHUNK_T __t2 = __r > __s; \ - (BORROW) = __t1 + __t2; \ - (R) = __r; \ -} while(0) - -/* (RH,RL) = A*B */ -#define MUL_AB(RH, RL, A, B) \ - do { \ - BNU_CHUNK_T __aL = LO_CHUNK((A)); \ - BNU_CHUNK_T __aH = HI_CHUNK((A)); \ - BNU_CHUNK_T __bL = LO_CHUNK((B)); \ - BNU_CHUNK_T __bH = HI_CHUNK((B)); \ - \ - BNU_CHUNK_T __x0 = (BNU_CHUNK_T) __aL * __bL; \ - BNU_CHUNK_T __x1 = (BNU_CHUNK_T) __aL * __bH; \ - BNU_CHUNK_T __x2 = (BNU_CHUNK_T) __aH * __bL; \ - BNU_CHUNK_T __x3 = (BNU_CHUNK_T) __aH * __bH; \ - \ - __x1 += HI_CHUNK(__x0); \ - __x1 += __x2; \ - if(__x1 < __x2) \ - __x3 += BNU_CHUNK_2H; \ - \ - (RH) = __x3 + HI_CHUNK(__x1); \ - (RL) = (__x1 << BNU_CHUNK_BITS/2) + LO_CHUNK(__x0); \ - } while (0) - -#endif /* _CP_BNU_IMPL_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnumisc.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnumisc.c deleted file mode 100644 index 47bfcffd14..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnumisc.c +++ /dev/null @@ -1,294 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. Cryptography Primitives. -// Internal Unsigned BNU misc functionality -// -// Contents: -// cpNLZ_BNU() -// cpNTZ_BNU() -// -// cpLSL_BNU() -// cpLSR_BNU() -// -// cpLSBit_BNU() -// cpMSBit_BNU() -// -// cpFromOctStr_BNU() -// cpToOctStrS_BNU() -// -// -*/ - -#include "owncp.h" -#include "pcpbnumisc.h" - - -/* -// number of leading zeros -*/ -cpSize cpNLZ_BNU(BNU_CHUNK_T x) -{ - cpSize nlz = BNU_CHUNK_BITS; - if(x) { - nlz = 0; - #if (BNU_CHUNK_BITS == BNU_CHUNK_64BIT) - if( 0==(x & 0xFFFFFFFF00000000) ) { nlz +=32; x<<=32; } - if( 0==(x & 0xFFFF000000000000) ) { nlz +=16; x<<=16; } - if( 0==(x & 0xFF00000000000000) ) { nlz += 8; x<<= 8; } - if( 0==(x & 0xF000000000000000) ) { nlz += 4; x<<= 4; } - if( 0==(x & 0xC000000000000000) ) { nlz += 2; x<<= 2; } - if( 0==(x & 0x8000000000000000) ) { nlz++; } - #else - if( 0==(x & 0xFFFF0000) ) { nlz +=16; x<<=16; } - if( 0==(x & 0xFF000000) ) { nlz += 8; x<<= 8; } - if( 0==(x & 0xF0000000) ) { nlz += 4; x<<= 4; } - if( 0==(x & 0xC0000000) ) { nlz += 2; x<<= 2; } - if( 0==(x & 0x80000000) ) { nlz++; } - #endif - } - return nlz; -} - -/* -// number of trailing zeros -*/ -cpSize cpNTZ_BNU(BNU_CHUNK_T x) -{ - cpSize ntz = BNU_CHUNK_BITS; - if(x) { - ntz = 0; - #if (BNU_CHUNK_BITS==BNU_CHUNK_64BIT) - if( 0==(x & 0x00000000FFFFFFFF) ) { ntz+=32; x>>=32; } - if( 0==(x & 0x000000000000FFFF) ) { ntz+=16; x>>=16; } - if( 0==(x & 0x00000000000000FF) ) { ntz+= 8; x>>= 8; } - if( 0==(x & 0x000000000000000F) ) { ntz+= 4; x>>= 4; } - if( 0==(x & 0x0000000000000003) ) { ntz+= 2; x>>= 2; } - if( 0==(x & 0x0000000000000001) ) { ntz++; } - #else - if( 0==(x & 0x0000FFFF) ) { ntz+=16; x>>=16; } - if( 0==(x & 0x000000FF) ) { ntz+= 8; x>>= 8; } - if( 0==(x & 0x0000000F) ) { ntz+= 4; x>>= 4; } - if( 0==(x & 0x00000003) ) { ntz+= 2; x>>= 2; } - if( 0==(x & 0x00000001) ) { ntz++; } - #endif - } - return ntz; -} - -/* -// Logical shift left (including inplace) -// -// Returns new length -// -*/ -#if 0 -cpSize cpLSL_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize nsA, cpSize nBits) -{ - cpSize nlz = cpNLZ_BNU(pA[nsA-1]); - cpSize nw = nBits/BNU_CHUNK_BITS; - cpSize n; - - pR += nw; - - nBits %= BNU_CHUNK_BITS; - if(nBits) { - BNU_CHUNK_T hi,lo; - - if(nlz < nBits ) - hi = 0; - else - hi = pA[--nsA]; - - for(n=nsA; n>0; n--) { - lo = pA[n-1]; - pR[n] = (hi<>(BNU_CHUNK_BITS-nBits)); - hi = lo; - } - pR[0] = (hi<0; n--) - pR[n-1] = pA[n-1]; - } - - pR--; - for(n=0; n>nBits) | (hi<<(BNU_CHUNK_BITS-nBits)); - lo = hi; - } - pR[nsA-1] = (lo>>nBits); - } - else { - for(n=0; n=(int)sizeof(BNU_CHUNK_T); nsA++,strLen-=(int)(sizeof(BNU_CHUNK_T))) { - /* pack sizeof(BNU_CHUNK_T) bytes into single BNU_CHUNK_T value*/ - *pA++ = - #if (BNU_CHUNK_BITS==BNU_CHUNK_64BIT) - +( (BNU_CHUNK_T)pStr[strLen-8]<<(8*7) ) - +( (BNU_CHUNK_T)pStr[strLen-7]<<(8*6) ) - +( (BNU_CHUNK_T)pStr[strLen-6]<<(8*5) ) - +( (BNU_CHUNK_T)pStr[strLen-5]<<(8*4) ) - #endif - +( (BNU_CHUNK_T)pStr[strLen-4]<<(8*3) ) - +( (BNU_CHUNK_T)pStr[strLen-3]<<(8*2) ) - +( (BNU_CHUNK_T)pStr[strLen-2]<<(8*1) ) - + (BNU_CHUNK_T)pStr[strLen-1]; - } - - /* convert the beginning of the string */ - if(strLen) { - BNU_CHUNK_T x = 0; - for(x=0; strLen>0; strLen--) { - BNU_CHUNK_T d = *pStr++; - x = (x<<8) + d; - } - *pA++ = x; - nsA++; - } - - return nsA; -} - -/* -// Convert BNU into HexString representation -// -// Returns length of the string or 0 if no success -*/ -cpSize cpToOctStr_BNU(Ipp8u* pStr, cpSize strLen, const BNU_CHUNK_T* pA, cpSize nsA) -{ - FIX_BNU(pA, nsA); - { - cpSize bnuBitSize = BITSIZE_BNU(pA, nsA); - if(bnuBitSize <= strLen*BYTESIZE) { - int cnvLen = 0; - BNU_CHUNK_T x = pA[nsA-1]; - - ZEXPAND_BNU(pStr, 0, strLen); - pStr += strLen - BITS2WORD8_SIZE(bnuBitSize); - - if(x) { - //int nb; - cpSize nb; - for(nb=cpNLZ_BNU(x)/BYTESIZE; nb<(cpSize)(sizeof(BNU_CHUNK_T)); cnvLen++, nb++) - *pStr++ = EBYTE(x, sizeof(BNU_CHUNK_T)-1-nb); - - for(--nsA; nsA>0; cnvLen+=sizeof(BNU_CHUNK_T), nsA--) { - x = pA[nsA-1]; - #if (BNU_CHUNK_BITS==BNU_CHUNK_64BIT) - *pStr++ = EBYTE(x,7); - *pStr++ = EBYTE(x,6); - *pStr++ = EBYTE(x,5); - *pStr++ = EBYTE(x,4); - #endif - *pStr++ = EBYTE(x,3); - *pStr++ = EBYTE(x,2); - *pStr++ = EBYTE(x,1); - *pStr++ = EBYTE(x,0); - } - } - return strLen; - } - else - return 0; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnumisc.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnumisc.h deleted file mode 100644 index 30e5bb658b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpbnumisc.h +++ /dev/null @@ -1,160 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. Cryptography Primitives. -// Internal Miscellaneous BNU Definitions & Function Prototypes -// -// -*/ - -#if !defined(_PCP_BNUMISC_H) -#define _PCP_BNUMISC_H - -#include "pcpbnuimpl.h" - - -/* bit operations */ -#define BITSIZE_BNU(p,ns) ((ns)*BNU_CHUNK_BITS-cpNLZ_BNU((p)[(ns)-1])) -#define BIT_BNU(bnu, ns,nbit) ((((nbit)>>BNU_CHUNK_LOG2) < (ns))? ((((bnu))[(nbit)>>BNU_CHUNK_LOG2] >>((nbit)&(BNU_CHUNK_BITS))) &1) : 0) -#define TST_BIT(bnu, nbit) ((((bnu))[(nbit)>>BNU_CHUNK_LOG2]) & ((BNU_CHUNK_T)1<<((nbit)&(BNU_CHUNK_BITS-1)))) -#define SET_BIT(bnu, nbit) ((((bnu))[(nbit)>>BNU_CHUNK_LOG2]) |= ((BNU_CHUNK_T)1<<((nbit)&(BNU_CHUNK_BITS-1)))) -#define CLR_BIT(bnu, nbit) ((((bnu))[(nbit)>>BNU_CHUNK_LOG2]) &=~((BNU_CHUNK_T)1<<((nbit)&(BNU_CHUNK_BITS-1)))) - -/* convert bitsize nbits into the number of BNU_CHUNK_T */ -#define BITS_BNU_CHUNK(nbits) (((nbits)+BNU_CHUNK_BITS-1)/BNU_CHUNK_BITS) - -/* mask for top BNU_CHUNK_T */ -#define MASK_BNU_CHUNK(nbits) ((BNU_CHUNK_T)(-1) >>((BNU_CHUNK_BITS- ((nbits)&(BNU_CHUNK_BITS-1))) &(BNU_CHUNK_BITS-1))) - -/* copy BNU content */ -#define COPY_BNU(dst, src, len) \ -{ \ - cpSize __idx; \ - for(__idx=0; __idx<(len); __idx++) (dst)[__idx] = (src)[__idx]; \ -} - -/* expand by zeros */ -#define ZEXPAND_BNU(srcdst,srcLen, dstLen) \ -{ \ - cpSize __idx; \ - for(__idx=(srcLen); __idx<(dstLen); __idx++) (srcdst)[__idx] = 0; \ -} - -/* copy and expand by zeros */ -#define ZEXPAND_COPY_BNU(dst,dstLen, src,srcLen) \ -{ \ - cpSize __idx; \ - for(__idx=0; __idx<(srcLen); __idx++) (dst)[__idx] = (src)[__idx]; \ - for(; __idx<(dstLen); __idx++) (dst)[__idx] = 0; \ -} - -/* compare */ -#if 0 -#define CMP_BNU(sign, pA, pB, len) \ -{ \ - for((sign)=(len); (sign)>0; (sign)--) { \ - if( (pA)[(sign)-1] != (pB)[(sign)-1] ) \ - break; \ - } \ - (sign) = (sign)? ((pA)[(sign)-1] > (pB)[(sign)-1])? 1:-1 : 0; \ -} -#endif - -/* fix actual length; {} is required to build with GCC6 */ -#define FIX_BNU(src,srcLen) \ - for(; ((srcLen)>1) && (0==(src)[(srcLen)-1]); (srcLen)--){} - - -/* copy and set */ -__INLINE void cpCpy_BNU(BNU_CHUNK_T* pDst, const BNU_CHUNK_T* pSrc, cpSize ns) -{ COPY_BNU(pDst, pSrc, ns); } - -__INLINE void cpSet_BNU(BNU_CHUNK_T* pDst, cpSize ns, BNU_CHUNK_T val) -{ - ZEXPAND_BNU(pDst, 0, ns); - pDst[0] = val; -} - -/* fix up */ -__INLINE int cpFix_BNU(const BNU_CHUNK_T* pA, int nsA) -{ - FIX_BNU(pA, nsA); - return nsA; -} - -/* comparison -// -// returns -// negative, if A < B -// 0, if A = B -// positive, if A > B -*/ -__INLINE int cpCmp_BNU(const BNU_CHUNK_T* pA, cpSize nsA, const BNU_CHUNK_T* pB, cpSize nsB) -{ - if(nsA!=nsB) - return nsA>nsB? 1 : -1; - else { - for(; nsA>0; nsA--) { - if(pA[nsA-1] > pB[nsA-1]) - return 1; - else if(pA[nsA-1] < pB[nsA-1]) - return -1; - } - return 0; - } -} -__INLINE int cpEqu_BNU_CHUNK(const BNU_CHUNK_T* pA, cpSize nsA, BNU_CHUNK_T b) -{ - return (pA[0]==b && 1==cpFix_BNU(pA, nsA)); -} - -/* -// test -// -// returns -// 0, if A = 0 -// >0, if A > 0 -// <0, looks like impossible (or error) case -*/ -__INLINE int cpTst_BNU(const BNU_CHUNK_T* pA, int nsA) -{ - for(; (nsA>0) && (0==pA[nsA-1]); nsA--) ; - return nsA; -} - -/* number of leading/trailing zeros */ -cpSize cpNLZ_BNU(BNU_CHUNK_T x); -cpSize cpNTZ_BNU(BNU_CHUNK_T x); - -/* logical shift left/right */ -int cpLSR_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize nsA, cpSize nBits); -#if 0 -int cpLSL_BNU(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, cpSize nsA, cpSize nBits); -#endif - -/* least and most significant BNU bit */ -#if 0 -int cpLSBit_BNU(const BNU_CHUNK_T* pA, cpSize nsA); -#endif -int cpMSBit_BNU(const BNU_CHUNK_T* pA, cpSize nsA); - -/* BNU <-> hex-string conversion */ -int cpToOctStr_BNU(Ipp8u* pStr, cpSize strLen, const BNU_CHUNK_T* pA, cpSize nsA); -int cpFromOctStr_BNU(BNU_CHUNK_T* pA, const Ipp8u* pStr, cpSize strLen); - -#endif /* _PCP_BNUMISC_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccp.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccp.h deleted file mode 100644 index ae7ac556c9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccp.h +++ /dev/null @@ -1,260 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal ECC (prime) basic Definitions & Function Prototypes -// -// -*/ - -#if !defined(_PCP_ECCP_H) -#define _PCP_ECCP_H - -#include "pcpbnresource.h" -#include "pcppma.h" -#include "pcpeccppoint.h" -#include "pcpeccpsscm.h" - - -typedef struct eccp_method_st ECCP_METHOD; - -/* -// ECC over prime GF(p) Context -*/ -struct _cpECCP { - IppCtxId idCtx; /* prime EC identifier */ - - IppsBigNumState* pPrime; /* specify finite field GF(p) */ - IppsBigNumState* pA; /* scecify A & B of EC equation: */ - IppsBigNumState* pB; /* y^2 = x^3 + A*x + B (mod)p */ - - IppsBigNumState* pGX; /* Base Point (X coordinate) */ - IppsBigNumState* pGY; /* Base Point (Y coordinate) */ - IppsBigNumState* pR; /* order (r) of Base Point */ - /* fields above mainly for ippsECCPSet()/ippsECCPGet() */ - - Ipp32u eccStandard;/* generic/standard ecc */ - - ECCP_METHOD* pMethod; - - int gfeBitSize; /* size (bits) of field element */ - int ordBitSize; /* size (bits) of BP order */ - - int a_3; /* ==1 if A==-3 or A==P-3 */ - IppsBigNumState* pAenc; /* internal formatted pA value */ - IppsBigNumState* pBenc; /* internal formatted pB value */ - IppsMontState* pMontP; /* montromery engine (modulo p) */ - - IppsECCPPointState* pGenc; /* internal formatted Base Point */ - IppsBigNumState* pCofactor; /* cofactor = #E/base_point_order*/ - IppsMontState* pMontR; /* montromery engine (modulo r) */ - - IppsBigNumState* pPrivate; /* private key */ - IppsECCPPointState* pPublic; /* public key (affine) */ - IppsBigNumState* pPrivateE; /* ephemeral private key */ - IppsECCPPointState* pPublicE; /* ephemeral public key (affine) */ - - #if defined(_USE_NN_VERSION_) - Ipp32u randMask; /* mask of high bits random */ - IppsBigNumState* pRandCnt; /* random engine content */ - IppsPRNGState* pRandGen; /* random generator engine */ - #endif - - IppsPrimeState* pPrimary; /* prime engine */ - -#if defined (_USE_ECCP_SSCM_) - Ipp8u* pSscmBuffer;/* pointer to sscm buffer */ -#endif - - BigNumNode* pBnList; /* list of big numbers */ - /*BigNumNode* pBnListExt;*//* list of big numbers */ -}; - -/* some useful constants */ -#define BNLISTSIZE (32) /* list size (probably less) */ - -/* -// Contetx Access Macros -*/ -#define ECP_ID(ctx) ((ctx)->idCtx) - -#define ECP_PRIME(ctx) ((ctx)->pPrime) -#define ECP_A(ctx) ((ctx)->pA) -#define ECP_B(ctx) ((ctx)->pB) - -#define ECP_GX(ctx) ((ctx)->pGX) -#define ECP_GY(ctx) ((ctx)->pGY) -#define ECP_ORDER(ctx) ((ctx)->pR) - -#define ECP_TYPE(ctx) ((ctx)->eccStandard) - -#define ECP_METHOD(ctx) ((ctx)->pMethod) - -#define ECP_GFEBITS(ctx) ((ctx)->gfeBitSize) -#define ECP_ORDBITS(ctx) ((ctx)->ordBitSize) - -#define ECP_AMI3(ctx) ((ctx)->a_3) -#define ECP_AENC(ctx) ((ctx)->pAenc) -#define ECP_BENC(ctx) ((ctx)->pBenc) -#define ECP_PMONT(ctx) ((ctx)->pMontP) - -#define ECP_GENC(ctx) ((ctx)->pGenc) -#define ECP_COFACTOR(ctx) ((ctx)->pCofactor) -#define ECP_RMONT(ctx) ((ctx)->pMontR) - -#define ECP_PRIVATE(ctx) ((ctx)->pPrivate) -#define ECP_PUBLIC(ctx) ((ctx)->pPublic) -#define ECP_PRIVATE_E(ctx) ((ctx)->pPrivateE) -#define ECP_PUBLIC_E(ctx) ((ctx)->pPublicE) - -#if defined(_USE_NN_VERSION_) -#define ECP_RANDMASK(ctx) ((ctx)->randMask) -#define ECP_RANDCNT(ctx) ((ctx)->pRandCnt) -#define ECP_RAND(ctx) ((ctx)->pRandGen) -#endif - -#define ECP_PRIMARY(ctx) ((ctx)->pPrimary) -#if defined (_USE_ECCP_SSCM_) -# define ECP_SCCMBUFF(ctx) ((ctx)->pSscmBuffer) -#endif -#define ECP_BNCTX(ctx) ((ctx)->pBnList) - -#define ECP_VALID_ID(ctx) (ECP_ID((ctx))==idCtxECCP) - -/* -// Recommended (Standard) Domain Parameters -*/ -extern const Ipp32u secp112r1_p[]; // (2^128 -3)/76439 -extern const Ipp32u secp112r1_a[]; -extern const Ipp32u secp112r1_b[]; -extern const Ipp32u secp112r1_gx[]; -extern const Ipp32u secp112r1_gy[]; -extern const Ipp32u secp112r1_r[]; -extern Ipp32u secp112r1_h; - -extern const Ipp32u secp112r2_p[]; // (2^128 -3)/76439 -extern const Ipp32u secp112r2_a[]; -extern const Ipp32u secp112r2_b[]; -extern const Ipp32u secp112r2_gx[]; -extern const Ipp32u secp112r2_gy[]; -extern const Ipp32u secp112r2_r[]; -extern Ipp32u secp112r2_h; - -extern const Ipp32u secp128r1_p[]; // 2^128 -2^97 -1 -extern const Ipp32u secp128r1_a[]; -extern const Ipp32u secp128r1_b[]; -extern const Ipp32u secp128r1_gx[]; -extern const Ipp32u secp128r1_gy[]; -extern const Ipp32u secp128r1_r[]; -extern Ipp32u secp128r1_h; - -extern const Ipp32u* secp128_mx[]; - -extern const Ipp32u secp128r2_p[]; // 2^128 -2^97 -1 -extern const Ipp32u secp128r2_a[]; -extern const Ipp32u secp128r2_b[]; -extern const Ipp32u secp128r2_gx[]; -extern const Ipp32u secp128r2_gy[]; -extern const Ipp32u secp128r2_r[]; -extern Ipp32u secp128r2_h; - -extern const Ipp32u secp160r1_p[]; // 2^160 -2^31 -1 -extern const Ipp32u secp160r1_a[]; -extern const Ipp32u secp160r1_b[]; -extern const Ipp32u secp160r1_gx[]; -extern const Ipp32u secp160r1_gy[]; -extern const Ipp32u secp160r1_r[]; -extern Ipp32u secp160r1_h; - -extern const Ipp32u secp160r2_p[]; // 2^160 -2^32 -2^14 -2^12 -2^9 -2^8 -2^7 -2^2 -1 -extern const Ipp32u secp160r2_a[]; -extern const Ipp32u secp160r2_b[]; -extern const Ipp32u secp160r2_gx[]; -extern const Ipp32u secp160r2_gy[]; -extern const Ipp32u secp160r2_r[]; -extern Ipp32u secp160r2_h; - -extern const Ipp32u secp192r1_p[]; // 2^192 -2^64 -1 -extern const Ipp32u secp192r1_a[]; -extern const Ipp32u secp192r1_b[]; -extern const Ipp32u secp192r1_gx[]; -extern const Ipp32u secp192r1_gy[]; -extern const Ipp32u secp192r1_r[]; -extern Ipp32u secp192r1_h; - -extern const Ipp32u secp224r1_p[]; // 2^224 -2^96 +1 -extern const Ipp32u secp224r1_a[]; -extern const Ipp32u secp224r1_b[]; -extern const Ipp32u secp224r1_gx[]; -extern const Ipp32u secp224r1_gy[]; -extern const Ipp32u secp224r1_r[]; -extern Ipp32u secp224r1_h; - -extern const Ipp32u secp256r1_p[]; // 2^256 -2^224 +2^192 +2^96 -1 -extern const Ipp32u secp256r1_a[]; -extern const Ipp32u secp256r1_b[]; -extern const Ipp32u secp256r1_gx[]; -extern const Ipp32u secp256r1_gy[]; -extern const Ipp32u secp256r1_r[]; -extern Ipp32u secp256r1_h; - -extern const Ipp32u secp384r1_p[]; // 2^384 -2^128 -2^96 +2^32 -1 -extern const Ipp32u secp384r1_a[]; -extern const Ipp32u secp384r1_b[]; -extern const Ipp32u secp384r1_gx[]; -extern const Ipp32u secp384r1_gy[]; -extern const Ipp32u secp384r1_r[]; -extern Ipp32u secp384r1_h; - -extern const Ipp32u secp521r1_p[]; // 2^521 -1 -extern const Ipp32u secp521r1_a[]; -extern const Ipp32u secp521r1_b[]; -extern const Ipp32u secp521r1_gx[]; -extern const Ipp32u secp521r1_gy[]; -extern const Ipp32u secp521r1_r[]; -extern Ipp32u secp521r1_h; - -extern const Ipp32u tpmBN_p256p_p[]; // TPM BN_P256 -extern const Ipp32u tpmBN_p256p_a[]; -extern const Ipp32u tpmBN_p256p_b[]; -extern const Ipp32u tpmBN_p256p_gx[]; -extern const Ipp32u tpmBN_p256p_gy[]; -extern const Ipp32u tpmBN_p256p_r[]; -extern Ipp32u tpmBN_p256p_h; - -extern const Ipp32u tpmSM2_p256_p[]; // TPM SM2_P256 -extern const Ipp32u tpmSM2_p256_a[]; -extern const Ipp32u tpmSM2_p256_b[]; -extern const Ipp32u tpmSM2_p256_gx[]; -extern const Ipp32u tpmSM2_p256_gy[]; -extern const Ipp32u tpmSM2_p256_r[]; -extern Ipp32u tpmSM2_p256_h; - -extern const Ipp32u* tpmSM2_p256_p_mx[]; - -/* half of some std modulus */ -extern const Ipp32u h_secp128r1_p[]; -extern const Ipp32u h_secp192r1_p[]; -extern const Ipp32u h_secp224r1_p[]; -extern const Ipp32u h_secp256r1_p[]; -extern const Ipp32u h_secp384r1_p[]; -extern const Ipp32u h_secp521r1_p[]; -extern const Ipp32u h_tpmSM2_p256_p[]; - -#endif /* _PCP_ECCP_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpdpca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpdpca.c deleted file mode 100644 index b3e09a9b7f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpdpca.c +++ /dev/null @@ -1,801 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC over Prime Finite Field (setup/retrieve domain parameters) -// -// Contents: -// ippsECCPSet() -// ippsECCPSetStd() -// ippsECCPSetStd128r1() -// ippsECCPSetStd128r2() -// ippsECCPSetStd192r1() -// ippsECCPSetStd224r1() -// ippsECCPSetStd256r1() -// ippsECCPSetStd384r1() -// ippsECCPSetStd521r1() -// ippsECCPSetStdSM2() -// -// ippsECCPGet() -// ippsECCPGetBitSizeOrder() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccp.h" -#include "pcpeccppoint.h" -#include "pcpbnresource.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" -#include "pcppma.h" - -#if (_ECP_128_==_ECP_IMPL_SPECIFIC_) -# include "pcpeccpmethod128.h" -#endif -#if (_ECP_192_==_ECP_IMPL_SPECIFIC_) || (_ECP_192_==_ECP_IMPL_MFM_) -# include "pcpeccpmethod192.h" -#endif -#if (_ECP_224_==_ECP_IMPL_SPECIFIC_) || (_ECP_224_==_ECP_IMPL_MFM_) -# include "pcpeccpmethod224.h" -#endif -#if (_ECP_256_==_ECP_IMPL_SPECIFIC_) || (_ECP_256_==_ECP_IMPL_MFM_) -# include "pcpeccpmethod256.h" -#endif -#if (_ECP_384_==_ECP_IMPL_SPECIFIC_) || (_ECP_384_==_ECP_IMPL_MFM_) -# include "pcpeccpmethod384.h" -#endif -#if (_ECP_521_==_ECP_IMPL_SPECIFIC_) || (_ECP_521_==_ECP_IMPL_MFM_) -# include "pcpeccpmethod521.h" -#endif -#if (_ECP_SM2_==_ECP_IMPL_SPECIFIC_) || (_ECP_SM2_==_ECP_IMPL_MFM_) -# include "pcpeccpmethodsm2.h" -#endif - -/*F* -// Name: ippsECCPSet -// -// Purpose: Set EC Domain Parameters. -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pPrime -// NULL == pA -// NULL == pB -// NULL == pGX -// NULL == pGY -// NULL == pOrder -// NULL == pECC -// -// ippStsContextMatchErr illegal pPrime->idCtx -// illegal pA->idCtx -// illegal pB->idCtx -// illegal pGX->idCtx -// illegal pGY->idCtx -// illegal pOrder->idCtx -// illegal pECC->idCtx -// -// ippStsRangeErr not enough room for: -// pPrime -// pA, pB, -// pGX,pGY -// pOrder -// -// ippStsRangeErr 0>= cofactor -// -// ippStsNoErr no errors -// -// Parameters: -// pPrime pointer to the prime (specify FG(p)) -// pA pointer to the A coefficient of EC equation -// pB pointer to the B coefficient of EC equation -// pGX,pGY pointer to the Base Point (x and y coordinates) of EC -// pOrder pointer to the Base Point order -// cofactor cofactor value -// pECC pointer to the ECC context -// -*F*/ -static -void ECCPSetDP(IppECCType flag, - int primeSize, const Ipp32u* pPrime, - int aSize, const Ipp32u* pA, - int bSize, const Ipp32u* pB, - int gxSize, const Ipp32u* pGx, - int gySize, const Ipp32u* pGy, - int orderSize, const Ipp32u* pOrder, - Ipp32u cofactor, - IppsECCPState* pECC) -{ - ECP_TYPE(pECC) = flag; - - /* reset size (bits) of field element */ - ECP_GFEBITS(pECC) = cpMSBit_BNU32(pPrime, primeSize) +1; - /* reset size (bits) of Base Point order */ - ECP_ORDBITS(pECC) = cpMSBit_BNU32(pOrder, orderSize) +1; - - /* set up prime */ - ippsSet_BN(ippBigNumPOS, primeSize, pPrime, ECP_PRIME(pECC)); - /* set up A */ - ippsSet_BN(ippBigNumPOS, aSize, pA, ECP_A(pECC)); - /* test A */ - BN_Word(ECP_B(pECC), 3); - PMA_add(ECP_B(pECC), ECP_A(pECC), ECP_B(pECC), ECP_PRIME(pECC)); - ECP_AMI3(pECC) = IsZero_BN(ECP_B(pECC)); - /* set up B */ - ippsSet_BN(ippBigNumPOS, bSize, pB, ECP_B(pECC)); - - /* set up affine coordinates of Base Point and order */ - ippsSet_BN(ippBigNumPOS, gxSize, pGx, ECP_GX(pECC)); - ippsSet_BN(ippBigNumPOS, gySize, pGy, ECP_GY(pECC)); - ippsSet_BN(ippBigNumPOS, orderSize, pOrder, ECP_ORDER(pECC)); - - /* set up cofactor */ - //ippsSet_BN(ippBigNumPOS, 1, &((Ipp32u)cofactor), ECP_COFACTOR(pECC)); - ippsSet_BN(ippBigNumPOS, 1, &cofactor, ECP_COFACTOR(pECC)); - - #if defined(_USE_NN_VERSION_) - /* set up randomizer */ - //gres 05/14/05: ECP_RANDMASK(pECC) = 0xFFFFFFFF >> ((32 -(ECP_ORDBITS(pECC)&0x1F)) &0x1F); - ECP_RANDMASK(pECC) = MAKEMASK32(ECP_ORDBITS(pECC)); - ECP_RANDMASK(pECC) &= ~pOrder[orderSize-1]; - /* reinit randomizer */ - ippsPRNGInit(ECP_ORDBITS(pECC), ECP_RAND(pECC)); - /* default randomizer settings */ - { - Ipp32u seed[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; - ippsPRNGSetSeed(seed, ECP_RAND(pECC)); - ippsSet_BN(ippBigNumPOS, RAND_CONTENT_LEN, seed, ECP_RANDCNT(pECC)); - } - #endif - - /* montgomery engine (prime) */ - if( ippStsNoErr == ippsMontSet((Ipp32u*)BN_NUMBER(ECP_PRIME(pECC)), BN_SIZE32(ECP_PRIME(pECC)), ECP_PMONT(pECC)) ) { - /* modulo reduction and montgomery form of A and B */ - PMA_mod(ECP_AENC(pECC), ECP_A(pECC), ECP_PRIME(pECC)); - PMA_enc(ECP_AENC(pECC), ECP_AENC(pECC), ECP_PMONT(pECC)); - PMA_mod(ECP_BENC(pECC), ECP_B(pECC), ECP_PRIME(pECC)); - PMA_enc(ECP_BENC(pECC), ECP_BENC(pECC), ECP_PMONT(pECC)); - /* projective coordinates and montgomery form of of Base Point */ - if( ( IsZero_BN(ECP_BENC(pECC)) && ECCP_IsPointAtAffineInfinity1(ECP_GX(pECC), ECP_GY(pECC))) || - (!IsZero_BN(ECP_BENC(pECC)) && ECCP_IsPointAtAffineInfinity0(ECP_GX(pECC), ECP_GY(pECC))) ) - ECCP_SetPointToInfinity(ECP_GENC(pECC)); - else { - ECP_METHOD(pECC)->SetPointProjective(ECP_GX(pECC), ECP_GY(pECC), BN_ONE_REF(), ECP_GENC(pECC), pECC); - } - } - - /* montgomery engine (order) */ - if( ippStsNoErr == ippsMontSet((Ipp32u*)BN_NUMBER(ECP_ORDER(pECC)), BN_SIZE32(ECP_ORDER(pECC)), ECP_RMONT(pECC)) ) - PMA_enc(ECP_COFACTOR(pECC), ECP_COFACTOR(pECC), ECP_RMONT(pECC)); - - /* set zero private keys */ - BN_Word(ECP_PRIVATE(pECC), 0); - BN_Word(ECP_PRIVATE_E(pECC), 0); - - /* set infinity public keys */ - ECCP_SetPointToInfinity(ECP_PUBLIC(pECC)); - ECCP_SetPointToInfinity(ECP_PUBLIC_E(pECC)); -} - - -IPPFUN(IppStatus, ippsECCPSet, (const IppsBigNumState* pPrime, - const IppsBigNumState* pA, const IppsBigNumState* pB, - const IppsBigNumState* pGX,const IppsBigNumState* pGY,const IppsBigNumState* pOrder, - int cofactor, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test pPrime */ - IPP_BAD_PTR1_RET(pPrime); - pPrime = (IppsBigNumState*)( IPP_ALIGNED_PTR(pPrime, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pPrime), ippStsContextMatchErr); - IPP_BADARG_RET((cpBN_bitsize(pPrime)>ECP_GFEBITS(pECC)), ippStsRangeErr); - - /* test pA and pB */ - IPP_BAD_PTR2_RET(pA,pB); - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, ALIGN_VAL) ); - pB = (IppsBigNumState*)( IPP_ALIGNED_PTR(pB, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pB), ippStsContextMatchErr); - IPP_BADARG_RET((cpBN_bitsize(pA)>ECP_GFEBITS(pECC)), ippStsRangeErr); - IPP_BADARG_RET((cpBN_bitsize(pB)>ECP_GFEBITS(pECC)), ippStsRangeErr); - - /* test pG and pGorder pointers */ - IPP_BAD_PTR3_RET(pGX,pGY, pOrder); - pGX = (IppsBigNumState*)( IPP_ALIGNED_PTR(pGX, ALIGN_VAL) ); - pGY = (IppsBigNumState*)( IPP_ALIGNED_PTR(pGY, ALIGN_VAL) ); - pOrder = (IppsBigNumState*)( IPP_ALIGNED_PTR(pOrder, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pGX), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pGY), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pOrder), ippStsContextMatchErr); - IPP_BADARG_RET((cpBN_bitsize(pGX)>ECP_GFEBITS(pECC)), ippStsRangeErr); - IPP_BADARG_RET((cpBN_bitsize(pGY)>ECP_GFEBITS(pECC)), ippStsRangeErr); - IPP_BADARG_RET((cpBN_bitsize(pOrder)>ECP_ORDBITS(pECC)), ippStsRangeErr); - - /* test cofactor */ - IPP_BADARG_RET(!(0idCtx -// -// ippStsECCInvalidFlagErr invalid flag -// -// ippStsNoErr no errors -// -// Parameters: -// flag specify standard ECC parameter(s) to be setup -// pECC pointer to the ECC context -// -*F*/ -IPPFUN(IppStatus, ippsECCPSetStd, (IppECCType flag, IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods());//ECCPcom; - - switch(flag) { - case IppECCPStd112r1: - ECCPSetDP(IppECCPStd112r1, - BITS2WORD32_SIZE(112), secp112r1_p, - BITS2WORD32_SIZE(112), secp112r1_a, - BITS2WORD32_SIZE(112), secp112r1_b, - BITS2WORD32_SIZE(112), secp112r1_gx, - BITS2WORD32_SIZE(112), secp112r1_gy, - BITS2WORD32_SIZE(112), secp112r1_r, - secp112r1_h, pECC); - break; - case IppECCPStd112r2: - ECCPSetDP(IppECCPStd112r2, - BITS2WORD32_SIZE(112), secp112r2_p, - BITS2WORD32_SIZE(112), secp112r2_a, - BITS2WORD32_SIZE(112), secp112r2_b, - BITS2WORD32_SIZE(112), secp112r2_gx, - BITS2WORD32_SIZE(112), secp112r2_gy, - BITS2WORD32_SIZE(112), secp112r2_r, - secp112r2_h, pECC); - break; - case IppECCPStd128r1: - #if (_ECP_128_==_ECP_IMPL_SPECIFIC_) - *(ECP_METHOD(pECC)) = *(ECCP128_Methods());//ECCP128; - #endif - ECCPSetDP(IppECCPStd128r1, - BITS2WORD32_SIZE(128), secp128r1_p, - BITS2WORD32_SIZE(128), secp128r1_a, - BITS2WORD32_SIZE(128), secp128r1_b, - BITS2WORD32_SIZE(128), secp128r1_gx, - BITS2WORD32_SIZE(128), secp128r1_gy, - BITS2WORD32_SIZE(128), secp128r1_r, - secp128r1_h, pECC); - break; - case IppECCPStd128r2: - #if (_ECP_128_==_ECP_IMPL_SPECIFIC_) - *(ECP_METHOD(pECC)) = *(ECCP128_Methods());//ECCP128; - #endif - ECCPSetDP(IppECCPStd128r2, - BITS2WORD32_SIZE(128), secp128r2_p, - BITS2WORD32_SIZE(128), secp128r2_a, - BITS2WORD32_SIZE(128), secp128r2_b, - BITS2WORD32_SIZE(128), secp128r2_gx, - BITS2WORD32_SIZE(128), secp128r2_gy, - BITS2WORD32_SIZE(128), secp128r2_r, - secp128r2_h, pECC); - break; - case IppECCPStd160r1: - ECCPSetDP(IppECCPStd160r1, - BITS2WORD32_SIZE(160), secp160r1_p, - BITS2WORD32_SIZE(160), secp160r1_a, - BITS2WORD32_SIZE(160), secp160r1_b, - BITS2WORD32_SIZE(160), secp160r1_gx, - BITS2WORD32_SIZE(160), secp160r1_gy, - BITS2WORD32_SIZE(161), secp160r1_r, - secp160r1_h, pECC); - break; - case IppECCPStd160r2: - ECCPSetDP(IppECCPStd160r2, - BITS2WORD32_SIZE(160), secp160r2_p, - BITS2WORD32_SIZE(160), secp160r2_a, - BITS2WORD32_SIZE(160), secp160r2_b, - BITS2WORD32_SIZE(160), secp160r2_gx, - BITS2WORD32_SIZE(160), secp160r2_gy, - BITS2WORD32_SIZE(161), secp160r2_r, - secp160r2_h, pECC); - break; - case IppECCPStd192r1: - #if (_ECP_192_==_ECP_IMPL_SPECIFIC_) || (_ECP_192_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP192_Methods());//ECCP192; - #endif - ECCPSetDP(IppECCPStd192r1, - BITS2WORD32_SIZE(192), secp192r1_p, - BITS2WORD32_SIZE(192), secp192r1_a, - BITS2WORD32_SIZE(192), secp192r1_b, - BITS2WORD32_SIZE(192), secp192r1_gx, - BITS2WORD32_SIZE(192), secp192r1_gy, - BITS2WORD32_SIZE(192), secp192r1_r, - secp192r1_h, pECC); - break; - case IppECCPStd224r1: - #if (_ECP_224_==_ECP_IMPL_SPECIFIC_) || (_ECP_224_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP224_Methods());//ECCP224; - #endif - ECCPSetDP(IppECCPStd224r1, - BITS2WORD32_SIZE(224), secp224r1_p, - BITS2WORD32_SIZE(224), secp224r1_a, - BITS2WORD32_SIZE(224), secp224r1_b, - BITS2WORD32_SIZE(224), secp224r1_gx, - BITS2WORD32_SIZE(224), secp224r1_gy, - BITS2WORD32_SIZE(224), secp224r1_r, - secp224r1_h, pECC); - break; - case IppECCPStd256r1: - #if (_ECP_256_==_ECP_IMPL_SPECIFIC_) || (_ECP_256_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP256_Methods());//ECCP256; - #endif - ECCPSetDP(IppECCPStd256r1, - BITS2WORD32_SIZE(256), secp256r1_p, - BITS2WORD32_SIZE(256), secp256r1_a, - BITS2WORD32_SIZE(256), secp256r1_b, - BITS2WORD32_SIZE(256), secp256r1_gx, - BITS2WORD32_SIZE(256), secp256r1_gy, - BITS2WORD32_SIZE(256), secp256r1_r, - secp256r1_h, pECC); - break; - case IppECCPStd384r1: - #if (_ECP_384_==_ECP_IMPL_SPECIFIC_) || (_ECP_384_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP384_Methods());//ECCP384; - #endif - ECCPSetDP(IppECCPStd384r1, - BITS2WORD32_SIZE(384), secp384r1_p, - BITS2WORD32_SIZE(384), secp384r1_a, - BITS2WORD32_SIZE(384), secp384r1_b, - BITS2WORD32_SIZE(384), secp384r1_gx, - BITS2WORD32_SIZE(384), secp384r1_gy, - BITS2WORD32_SIZE(384), secp384r1_r, - secp384r1_h, pECC); - break; - case IppECCPStd521r1: - #if (_ECP_521_==_ECP_IMPL_SPECIFIC_) || (_ECP_521_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP521_Methods());//ECCP521; - #endif - ECCPSetDP(IppECCPStd521r1, - BITS2WORD32_SIZE(521), secp521r1_p, - BITS2WORD32_SIZE(521), secp521r1_a, - BITS2WORD32_SIZE(521), secp521r1_b, - BITS2WORD32_SIZE(521), secp521r1_gx, - BITS2WORD32_SIZE(521), secp521r1_gy, - BITS2WORD32_SIZE(521), secp521r1_r, - secp521r1_h, pECC); - break; - case ippEC_TPM_BN_P256: - ECCPSetDP(ippEC_TPM_BN_P256, - BITS2WORD32_SIZE(256), tpmBN_p256p_p, - BITS2WORD32_SIZE(32), tpmBN_p256p_a, - BITS2WORD32_SIZE(32), tpmBN_p256p_b, - BITS2WORD32_SIZE(32), tpmBN_p256p_gx, - BITS2WORD32_SIZE(32), tpmBN_p256p_gy, - BITS2WORD32_SIZE(256), tpmBN_p256p_r, - tpmBN_p256p_h, pECC); - break; - case ippECPstdSM2: - #if (_ECP_SM2_==_ECP_IMPL_SPECIFIC_) || (_ECP_SM2_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP_SM2_Methods()); - #endif - ECCPSetDP(ippEC_TPM_SM2_P256, - BITS2WORD32_SIZE(256), tpmSM2_p256_p, - BITS2WORD32_SIZE(256), tpmSM2_p256_a, - BITS2WORD32_SIZE(256), tpmSM2_p256_b, - BITS2WORD32_SIZE(256), tpmSM2_p256_gx, - BITS2WORD32_SIZE(256), tpmSM2_p256_gy, - BITS2WORD32_SIZE(256), tpmSM2_p256_r, - tpmSM2_p256_h, pECC); - break; - default: - return ippStsECCInvalidFlagErr; - } - - return ippStsNoErr; -} - -/*F* -// Name: ippsECCPSetStd128r1 -// ippsECCPSetStd128r2 -// ippsECCPSetStd192r1 -// ippsECCPSetStd224r1 -// ippsECCPSetStd256r1 -// ippsECCPSetStd384r1 -// ippsECCPSetStd521r1 -// ippsECCPSetStdSM2 -*F*/ -IPPFUN(IppStatus, ippsECCPSetStd128r1, (IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - #if (_ECP_128_==_ECP_IMPL_SPECIFIC_) - *(ECP_METHOD(pECC)) = *(ECCP128_Methods()); // ECCP128; - #else - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods()); // ECCPcom; - #endif - ECCPSetDP(IppECCPStd128r1, - BITS2WORD32_SIZE(128), secp128r1_p, - BITS2WORD32_SIZE(128), secp128r1_a, - BITS2WORD32_SIZE(128), secp128r1_b, - BITS2WORD32_SIZE(128), secp128r1_gx, - BITS2WORD32_SIZE(128), secp128r1_gy, - BITS2WORD32_SIZE(128), secp128r1_r, - secp128r1_h, pECC); - - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsECCPSetStd128r2, (IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - #if (_ECP_128_==_ECP_IMPL_SPECIFIC_) - *(ECP_METHOD(pECC)) = *(ECCP128_Methods()); // ECCP128; - #else - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods()); // ECCPcom; - #endif - ECCPSetDP(IppECCPStd128r2, - BITS2WORD32_SIZE(128), secp128r2_p, - BITS2WORD32_SIZE(128), secp128r2_a, - BITS2WORD32_SIZE(128), secp128r2_b, - BITS2WORD32_SIZE(128), secp128r2_gx, - BITS2WORD32_SIZE(128), secp128r2_gy, - BITS2WORD32_SIZE(128), secp128r2_r, - secp128r2_h, pECC); - - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsECCPSetStd192r1, (IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - #if (_ECP_192_==_ECP_IMPL_SPECIFIC_) || (_ECP_192_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP192_Methods()); // ECCP192; - #else - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods()); // ECCPcom; - #endif - ECCPSetDP(IppECCPStd192r1, - BITS2WORD32_SIZE(192), secp192r1_p, - BITS2WORD32_SIZE(192), secp192r1_a, - BITS2WORD32_SIZE(192), secp192r1_b, - BITS2WORD32_SIZE(192), secp192r1_gx, - BITS2WORD32_SIZE(192), secp192r1_gy, - BITS2WORD32_SIZE(192), secp192r1_r, - secp192r1_h, pECC); - - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsECCPSetStd224r1, (IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - #if (_ECP_224_==_ECP_IMPL_SPECIFIC_) || (_ECP_224_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP224_Methods()); // ECCP224; - #else - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods()); // ECCPcom; - #endif - ECCPSetDP(IppECCPStd224r1, - BITS2WORD32_SIZE(224), secp224r1_p, - BITS2WORD32_SIZE(224), secp224r1_a, - BITS2WORD32_SIZE(224), secp224r1_b, - BITS2WORD32_SIZE(224), secp224r1_gx, - BITS2WORD32_SIZE(224), secp224r1_gy, - BITS2WORD32_SIZE(224), secp224r1_r, - secp224r1_h, pECC); - - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsECCPSetStd256r1, (IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - #if (_ECP_256_==_ECP_IMPL_SPECIFIC_) || (_ECP_256_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP256_Methods()); // ECCP256; - #else - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods()); // ECCPcom; - #endif - ECCPSetDP(IppECCPStd256r1, - BITS2WORD32_SIZE(256), secp256r1_p, - BITS2WORD32_SIZE(256), secp256r1_a, - BITS2WORD32_SIZE(256), secp256r1_b, - BITS2WORD32_SIZE(256), secp256r1_gx, - BITS2WORD32_SIZE(256), secp256r1_gy, - BITS2WORD32_SIZE(256), secp256r1_r, - secp256r1_h, pECC); - - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsECCPSetStd384r1, (IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - #if (_ECP_384_==_ECP_IMPL_SPECIFIC_) || (_ECP_384_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP384_Methods()); // ECCP384; - #else - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods()); // ECCPcom; - #endif - ECCPSetDP(IppECCPStd384r1, - BITS2WORD32_SIZE(384), secp384r1_p, - BITS2WORD32_SIZE(384), secp384r1_a, - BITS2WORD32_SIZE(384), secp384r1_b, - BITS2WORD32_SIZE(384), secp384r1_gx, - BITS2WORD32_SIZE(384), secp384r1_gy, - BITS2WORD32_SIZE(384), secp384r1_r, - secp384r1_h, pECC); - - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsECCPSetStd521r1, (IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - #if (_ECP_521_==_ECP_IMPL_SPECIFIC_) || (_ECP_521_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP521_Methods()); // ECCP521; - #else - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods()); // ECCPcom; - #endif - ECCPSetDP(IppECCPStd521r1, - BITS2WORD32_SIZE(521), secp521r1_p, - BITS2WORD32_SIZE(521), secp521r1_a, - BITS2WORD32_SIZE(521), secp521r1_b, - BITS2WORD32_SIZE(521), secp521r1_gx, - BITS2WORD32_SIZE(521), secp521r1_gy, - BITS2WORD32_SIZE(521), secp521r1_r, - secp521r1_h, pECC); - - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsECCPSetStdSM2, (IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - #if (_ECP_SM2_==_ECP_IMPL_SPECIFIC_) || (_ECP_SM2_==_ECP_IMPL_MFM_) - *(ECP_METHOD(pECC)) = *(ECCP_SM2_Methods()); // ECCSM2; - #else - *(ECP_METHOD(pECC)) = *(ECCPcom_Methods()); // ECCPcom; - #endif - ECCPSetDP(ippEC_TPM_SM2_P256, - BITS2WORD32_SIZE(256), tpmSM2_p256_p, - BITS2WORD32_SIZE(256), tpmSM2_p256_a, - BITS2WORD32_SIZE(256), tpmSM2_p256_b, - BITS2WORD32_SIZE(256), tpmSM2_p256_gx, - BITS2WORD32_SIZE(256), tpmSM2_p256_gy, - BITS2WORD32_SIZE(256), tpmSM2_p256_r, - tpmSM2_p256_h, pECC); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPGet -// -// Purpose: Retrieve ECC Domain Parameter. -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pPrime -// NULL == pA -// NULL == pB -// NULL == pGX -// NULL == pGY -// NULL == pOrder -// NULL == cofactor -// NULL == pECC -// -// ippStsContextMatchErr illegal pPrime->idCtx -// illegal pA->idCtx -// illegal pB->idCtx -// illegal pGX->idCtx -// illegal pGY->idCtx -// illegal pOrder->idCtx -// illegal pECC->idCtx -// -// ippStsRangeErr not enough room for: -// pPrime -// pA, pB, -// pGX,pGY -// pOrder -// -// ippStsNoErr no errors -// -// Parameters: -// pPrime pointer to the retrieval prime (specify FG(p)) -// pA pointer to the retrieval A coefficient of EC equation -// pB pointer to the retrieval B coefficient of EC equation -// pGX,pGY pointer to the retrieval Base Point (x and y coordinates) of EC -// pOrder pointer to the retrieval Base Point order -// cofactor pointer to the retrieval cofactor value -// pECC pointer to the ECC context -// -*F*/ -IPPFUN(IppStatus, ippsECCPGet, (IppsBigNumState* pPrime, - IppsBigNumState* pA, IppsBigNumState* pB, - IppsBigNumState* pGX,IppsBigNumState* pGY,IppsBigNumState* pOrder, - int* cofactor, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test pPrime */ - IPP_BAD_PTR1_RET(pPrime); - pPrime = (IppsBigNumState*)( IPP_ALIGNED_PTR(pPrime, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pPrime), ippStsContextMatchErr); - IPP_BADARG_RET((BN_ROOM(pPrime)*BITSIZE(BNU_CHUNK_T)idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pBitSize pointer to the size of base point order -// pECC pointer to the ECC context -// -*F*/ -IPPFUN(IppStatus, ippsECCPGetOrderBitSize,(int* pBitSize, IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use 4-byte aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, 4) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test pBitSize*/ - IPP_BAD_PTR1_RET(pBitSize); - - *pBitSize = ECP_ORDBITS(pECC); - - return ippStsNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpgenkeyca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpgenkeyca.c deleted file mode 100644 index ec3d785d4f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpgenkeyca.c +++ /dev/null @@ -1,105 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC over Prime Finite Field (EC Key Generation) -// -// Contents: -// ippsECCPGenKeyPair() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" - - -/*F* -// Name: ippsECCPGenKeyPair -// -// Purpose: Generate (private,public) Key Pair -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pPrivate -// NULL == pPublic -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pPrivate->idCtx -// illegal pPublic->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pPrivate pointer to the resultant private key -// pPublic pointer to the resultant public key -// pECC pointer to the ECCP context -// -*F*/ -IPPFUN(IppStatus, ippsECCPGenKeyPair, (IppsBigNumState* pPrivate, IppsECCPPointState* pPublic, - IppsECCPState* pECC, - IppBitSupplier rndFunc, void* pRndParam)) -{ - IPP_BAD_PTR2_RET(pECC, rndFunc); - - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test private/public keys */ - IPP_BAD_PTR2_RET(pPrivate,pPublic); - pPrivate = (IppsBigNumState*)( IPP_ALIGNED_PTR(pPrivate, ALIGN_VAL) ); - pPublic = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pPublic, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pPrivate), ippStsContextMatchErr); - IPP_BADARG_RET((BN_ROOM(pPrivate)*BITSIZE(BNU_CHUNK_T)MulPoint(ECP_GENC(pECC), pPrivate, pPublic, pECC, ECP_BNCTX(pECC)); - ECP_METHOD(pECC)->MulBasePoint(pPrivate, pPublic, pECC, ECP_BNCTX(pECC)); - - return ippStsNoErr; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpinitca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpinitca.c deleted file mode 100644 index bf16403487..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpinitca.c +++ /dev/null @@ -1,454 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC over Prime Finite Field (initialization) -// -// Contents: -// ippsECCPGetSize() -// ippsECCPGetSizeStd128r1() -// ippsECCPGetSizeStd128r2() -// ippsECCPGetSizeStd192r1() -// ippsECCPGetSizeStd224r1() -// ippsECCPGetSizeStd256r1() -// ippsECCPGetSizeStd384r1() -// ippsECCPGetSizeStd521r1() -// ippsECCPGetSizeStdSM2() -// -// ippsECCPInit() -// ippsECCPInitStd128r1() -// ippsECCPInitStd128r2() -// ippsECCPInitStd192r1() -// ippsECCPInitStd224r1() -// ippsECCPInitStd256r1() -// ippsECCPInitStd384r1() -// ippsECCPInitStd521r1() -// ippsECCPInitStdSM2() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccp.h" -#include "pcpeccppoint.h" -#include "pcpbnresource.h" -#include "pcpeccpmethod.h" -#include "pcpeccpsscm.h" -#include "pcptool.h" - - -/*F* -// Name: ippsECCPGetSize -// -// Purpose: Returns size of ECC context (bytes). -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pSize -// -// ippStsSizeErr 2>feBitSize -// -// ippStsNoErr no errors -// -// Parameters: -// feBitSize size of field element (bits) -// pSize pointer to the size of internal ECC context -// -*F*/ -IPPFUN(IppStatus, ippsECCPGetSize, (int feBitSize, int *pSize)) -{ - /* test size's pointer */ - IPP_BAD_PTR1_RET(pSize); - - /* test size of field element */ - IPP_BADARG_RET((2>feBitSize), ippStsSizeErr); - - { - int bn1Size; - int bn2Size; - int pointSize; - int mont1Size; - int mont2Size; - #if defined(_USE_NN_VERSION_) - int randSize; - int randCntSize; - #endif - int primeSize; - int listSize; - - /* size of field element */ - int gfeSize = BITS2WORD32_SIZE(feBitSize); - /* size of order */ - int ordSize = BITS2WORD32_SIZE(feBitSize+1); - - #if defined (_USE_ECCP_SSCM_) - /* size of sscm buffer */ - int w = cpECCP_OptimalWinSize(feBitSize+1); - int nPrecomputed = 1<feBitSize -// -// ippStsNoErr no errors -// -// Parameters: -// feBitSize size of field element (bits) -// pECC pointer to the ECC context -// -*F*/ -IPPFUN(IppStatus, ippsECCPInit, (int feBitSize, IppsECCPState* pECC)) -{ - /* test pECC pointer */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - - /* test size of field element */ - IPP_BADARG_RET((2>feBitSize), ippStsSizeErr); - - /* clear context */ - PaddBlock(0, pECC, sizeof(IppsECCPState)); - - /* context ID */ - ECP_ID(pECC) = idCtxECCP; - - /* generic EC */ - ECP_TYPE(pECC) = IppECCArbitrary; - - /* size of field element & BP order */ - ECP_GFEBITS(pECC) = feBitSize; - ECP_ORDBITS(pECC) = feBitSize+1; - - /* - // init other context fields - */ - { - int bn1Size; - int bn2Size; - int pointSize; - int mont1Size; - int mont2Size; - #if defined(_USE_NN_VERSION_) - int randSize; - int randCntSize; - #endif - int primeSize; - //int listSize; - - /* size of field element */ - int gfeSize = BITS2WORD32_SIZE(feBitSize); - /* size of order */ - int ordSize = BITS2WORD32_SIZE(feBitSize+1); - - #if defined (_USE_ECCP_SSCM_) - /* size of sscm buffer */ - int w = cpECCP_OptimalWinSize(feBitSize+1); - int nPrecomputed = 1< pP==pQ (maybe both pP and pQ are at Infinity) -// returns 1 => pP!=pQ -// -// Note -// In general we check: -// P_X*Q_Z^2 ~ Q_X*P_Z^2 -// P_Y*Q_Z^3 ~ Q_Y*P_Z^3 -*/ -int ECCP128_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - UNREFERENCED_PARAMETER(pECC); - - /* P or/and Q at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - return ECCP_IsPointAtInfinity(pQ)? 0:1; - if( ECCP_IsPointAtInfinity(pQ) ) - return ECCP_IsPointAtInfinity(pP)? 0:1; - - /* (P_Z==1) && (Q_Z==1) */ - if( ECP_POINT_AFFINE(pP) && ECP_POINT_AFFINE(pQ) ) - return ((0==cpBN_cmp(ECP_POINT_X(pP),ECP_POINT_X(pQ))) && (0==cpBN_cmp(ECP_POINT_Y(pP),ECP_POINT_Y(pQ))))? 0:1; - - { - IppsBigNumState* pPtmp = cpBigNumListGet(&pList); - IppsBigNumState* pQtmp = cpBigNumListGet(&pList); - IppsBigNumState* pPZ = cpBigNumListGet(&pList); - IppsBigNumState* pQZ = cpBigNumListGet(&pList); - - /* P_X*Q_Z^2 ~ Q_X*P_Z^2 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA128_sqr(pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_X*Q_Z^2 */ - PMA128_mul(pPtmp, ECP_POINT_X(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_X(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA128_sqr(pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_X*P_Z^2 */ - PMA128_mul(pQtmp, ECP_POINT_X(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_X(pQ)); - } - if ( cpBN_cmp(pPtmp, pQtmp) ) - return 1; /* points are different: (P_X*Q_Z^2) != (Q_X*P_Z^2) */ - - /* P_Y*Q_Z^3 ~ Q_Y*P_Z^3 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA128_mul(pQZ, pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_Y*Q_Z^3 */ - PMA128_mul(pPtmp, ECP_POINT_Y(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_Y(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA128_mul(pPZ, pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_Y*P_Z^3 */ - PMA128_mul(pQtmp, ECP_POINT_Y(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_Y(pQ)); - } - return cpBN_cmp(pPtmp, pQtmp)? 1:0; - } -} - -/* -// ECCP128_NegPoint -// -// Negative point -*/ -void ECCP128_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - - /* test point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - BNU_CHUNK_T* pRy = BN_NUMBER(ECP_POINT_Y(pR)); - BNU_CHUNK_T* pPy = BN_NUMBER(ECP_POINT_Y(pP)); - int size = LEN_P128; - - if( pP!=pR ) { - PMA_set(ECP_POINT_X(pR), ECP_POINT_X(pP)); - PMA_set(ECP_POINT_Z(pR), ECP_POINT_Z(pP)); - ECP_POINT_AFFINE(pR) = ECP_POINT_AFFINE(pP); - } - cpSub_BNU(pRy, (BNU_CHUNK_T*)secp128r1_p, pPy, LEN_P128); - FIX_BNU(pRy,size); - BN_SIZE(ECP_POINT_Y(pR)) = size; - BN_SIGN(ECP_POINT_Y(pR)) = ippBigNumPOS; - } -} - -/* -// ECCP128_DblPoint -// -// Double point -*/ -void ECCP128_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P at infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsBigNumState* bnV = cpBigNumListGet(&pList); - IppsBigNumState* bnU = cpBigNumListGet(&pList); - IppsBigNumState* bnM = cpBigNumListGet(&pList); - IppsBigNumState* bnS = cpBigNumListGet(&pList); - IppsBigNumState* bnT = cpBigNumListGet(&pList); - - /* M = 3*X^2 + A*Z^4 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA128_sqr(bnU, ECP_POINT_X(pP)); - PMA128_add(bnM, bnU, bnU); - PMA128_add(bnM, bnM, bnU); - PMA128_add(bnM, bnM, ECP_A(pECC)); - } - else if( ECP_AMI3(pECC) ) { - PMA128_sqr(bnU, ECP_POINT_Z(pP)); - PMA128_add(bnS, ECP_POINT_X(pP), bnU); - PMA128_sub(bnT, ECP_POINT_X(pP), bnU); - PMA128_mul(bnM, bnS, bnT); - PMA128_add(bnU, bnM, bnM); - PMA128_add(bnM, bnU, bnM); - } - else { - PMA128_sqr(bnU, ECP_POINT_X(pP)); - PMA128_add(bnM, bnU, bnU); - PMA128_add(bnM, bnM, bnU); - PMA128_sqr(bnU, ECP_POINT_Z(pP)); - PMA128_sqr(bnU, bnU); - PMA128_mul(bnU, bnU, ECP_A(pECC)); - PMA128_add(bnM, bnM, bnU); - } - - PMA128_add(bnV, ECP_POINT_Y(pP), ECP_POINT_Y(pP)); - - /* R_Z = 2*Y*Z */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnV); - } - else { - PMA128_mul(ECP_POINT_Z(pR), bnV, ECP_POINT_Z(pP)); - } - - /* S = 4*X*Y^2 */ - PMA128_sqr(bnT, bnV); - PMA128_mul(bnS, bnT, ECP_POINT_X(pP)); - - /* R_X = M^2 - 2*S */ - PMA128_sqr(bnU, bnM); - PMA128_sub(bnU, bnU, bnS); - PMA128_sub(ECP_POINT_X(pR), bnU, bnS); - - /* T = 8*Y^4 */ - PMA128_mul(bnV, bnV, ECP_POINT_Y(pP)); - PMA128_mul(bnT, bnT, bnV); - - /* R_Y = M*(S - R_X) - T */ - PMA128_sub(bnS, bnS, ECP_POINT_X(pR)); - PMA128_mul(bnS, bnS, bnM); - PMA128_sub(ECP_POINT_Y(pR), bnS, bnT); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP128_AddPoint -// -// Add points -*/ -void ECCP128_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ -#if 0 - /* test stupid call */ - if( pP == pQ ) { - ECCP128_DblPoint(pP, pR, pECC, pList); - return; - } -#endif - - /* prevent operation with point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) { - ECCP_CopyPoint(pQ, pR); - return; - } - if( ECCP_IsPointAtInfinity(pQ) ) { - ECCP_CopyPoint(pP, pR); - return; - } - - /* - // addition - */ - { - IppsBigNumState* bnU0 = cpBigNumListGet(&pList); - IppsBigNumState* bnS0 = cpBigNumListGet(&pList); - IppsBigNumState* bnU1 = cpBigNumListGet(&pList); - IppsBigNumState* bnS1 = cpBigNumListGet(&pList); - IppsBigNumState* bnW = cpBigNumListGet(&pList); - IppsBigNumState* bnR = cpBigNumListGet(&pList); - IppsBigNumState *bnT = bnU0; - IppsBigNumState *bnM = bnS0; - - /* U0 = P_X * Q_Z^2 */ - /* S0 = P_Y * Q_Z^3 */ - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU0, ECP_POINT_X(pP)); - PMA_set(bnS0, ECP_POINT_Y(pP)); - } - else { - PMA128_sqr(bnW, ECP_POINT_Z(pQ)); - PMA128_mul(bnU0,ECP_POINT_X(pP), bnW); - PMA128_mul(bnW, ECP_POINT_Z(pQ), bnW); - PMA128_mul(bnS0,ECP_POINT_Y(pP), bnW); - } - - /* U1 = Q_X * P_Z^2 */ - /* S1 = Q_Y * P_Z^3 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_X(pQ)); - PMA_set(bnS1, ECP_POINT_Y(pQ)); - } - else { - PMA128_sqr(bnW, ECP_POINT_Z(pP)); - PMA128_mul(bnU1,ECP_POINT_X(pQ), bnW); - PMA128_mul(bnW, ECP_POINT_Z(pP), bnW); - PMA128_mul(bnS1,ECP_POINT_Y(pQ), bnW); - } - - /* W = U0-U1 */ - /* R = S0-S1 */ - PMA128_sub(bnW, bnU0, bnU1); - PMA128_sub(bnR, bnS0, bnS1); - - //if( IsZero_BN(bnW) ) { - //if( IsZero_BN(bnR) ) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnW), LEN_P128, 0)) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnR), LEN_P128, 0)) { - ECCP128_DblPoint(pP, pR, pECC, pList); - return; - } - else { - ECCP_SetPointToInfinity(pR); - return; - } - } - - /* T = U0+U1 */ - /* M = S0+S1 */ - PMA128_add(bnT, bnU0, bnU1); - PMA128_add(bnM, bnS0, bnS1); - - /* R_Z = P_Z * Q_Z * W */ - if( ECP_POINT_AFFINE(pQ) && ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnW); - } - else { - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU1, ECP_POINT_Z(pP)); - } - else if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_Z(pQ)); - } - else { - PMA128_mul(bnU1, ECP_POINT_Z(pP), ECP_POINT_Z(pQ)); - } - PMA128_mul(ECP_POINT_Z(pR), bnU1, bnW); - } - - PMA128_sqr(bnU1, bnW); /* U1 = W^2 */ - PMA128_mul(bnS1, bnT, bnU1); /* S1 = T * W^2 */ - - /* R_X = R^2 - T * W^2 */ - PMA128_sqr(ECP_POINT_X(pR), bnR); - PMA128_sub(ECP_POINT_X(pR), ECP_POINT_X(pR), bnS1); - - /* V = T * W^2 - 2 * R_X (S1) */ - PMA128_sub(bnS1, bnS1, ECP_POINT_X(pR)); - PMA128_sub(bnS1, bnS1, ECP_POINT_X(pR)); - - /* R_Y = (V * R - M * W^3) /2 */ - PMA128_mul(ECP_POINT_Y(pR), bnS1, bnR); - PMA128_mul(bnU1, bnU1, bnW); - PMA128_mul(bnU1, bnU1, bnM); - PMA128_sub(bnU1, ECP_POINT_Y(pR), bnU1); - PMA128_div2(ECP_POINT_Y(pR), bnU1); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP128_MulPoint -// -// Multiply point by scalar -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP128_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - IppsECCPPointState T; - IppsECCPPointState U; - IppsBigNumState* bnKH = cpBigNumListGet(&pList); - Ipp32u* pK; - Ipp32u* pH; - Ipp32u carry; - int lenKH; - int bitH; - - /* init result */ - ECCP_CopyPoint(pP, pR); - - /* if scalar is negative */ - if( ippBigNumNEG == BN_SIGN(bnN) ) { - /* negative R */ - ECCP128_NegPoint(pR, pR, pECC); - } - - /* copy K = N and compute H=3*K */ - lenKH = BN_SIZE(bnN)+1; - pK = BN_NUMBER(bnKH); - pH = BN_BUFFER(bnKH); - Cpy_BNU(BN_NUMBER(bnN), pK, BN_SIZE(bnN)); - pK[lenKH-1] = 0; - carry = cpAdd_BNU(pH, pK, pK, lenKH); - carry = cpAdd_BNU(pH, pK, pH, lenKH); - - /* init temporary T = (X/Z^2, Y/Z^3, 1) */ - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - ECCP128_GetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), pR, pECC, pList); - ECCP128_SetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), &T, pECC); - - /* temporary point U =-T */ - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - ECCP128_NegPoint(&T, &U, pECC); - - for(bitH=MSB_BNU(pH, lenKH)-1; bitH>0; bitH--) { - int hBit = TST_BIT(pH, bitH); - int kBit = TST_BIT(pK, bitH); - ECCP128_DblPoint(pR, pR, pECC, pList); - if( hBit && !kBit ) - ECCP128_AddPoint(pR, &T, pR, pECC, pList); - if(!hBit && kBit ) - ECCP128_AddPoint(pR, &U, pR, pECC, pList); - } - } -} - -#else -#pragma message ("ECCP128_MulPoint: SCCM version") - -void ECCP128_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - Ipp8u* pScratchAligned = ECP_SCCMBUFF(pECC); - - BNU_CHUNK_T* pN = BN_NUMBER(bnN); - cpSize nsN = BN_SIZE(bnN); - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int w = cpECCP_OptimalWinSize(scalarBitSize); - /* number of table entries */ - int nPrecomputed = 1<>shift) & dmask; - - /* initialize result (ECP_FINITE_POINT|ECP_PROJECTIVE) */ - cpECCP_ScrambleGet(pR, coordSize, pScratchAligned+windowVal, nPrecomputed); - ECP_POINT_AFFINE(pR) = 0; - - /* initialize temporary T (ECP_PROJECTIVE) */ - ECP_POINT_AFFINE(&T) = 0; - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - /* w times doubling */ - int k; - for(k=0; k>shift) & dmask; - - /* extract value from the pre-computed table */ - cpECCP_ScrambleGet(&T, coordSize, pScratchAligned+windowVal, nPrecomputed); - - /* and add it */ - ECCP128_AddPoint(pR, &T, pR, pECC, pList); - } - } - } -} -#endif - -void ECCP128_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - ECCP128_MulPoint(ECP_GENC(pECC), pK, pR, pECC, pList); -} - -/* -// ECCP128_ProdPoint -// -// Point product -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP128_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalars */ - if( IsZero_BN(bnPscalar) ) { - ECCP128_MulPoint(pQ, bnQscalar, pR, pECC, pList); - return; - } - if( IsZero_BN(bnQscalar) ) { - ECCP128_MulPoint(pP, bnPscalar, pR, pECC, pList); - return; - } - - /* - // point product - */ - else { - int n; - Ipp32u* pbnPscalar = BN_NUMBER(bnPscalar); - int bnPscalarSize = BN_SIZE(bnPscalar); - Ipp32u* pbnQscalar = BN_NUMBER(bnQscalar); - int bnQscalarSize = BN_SIZE(bnQscalar); - - int size = bnPscalarSize>bnQscalarSize? bnPscalarSize : bnQscalarSize; - - IppsECCPPointState* pPointPQ[4] = {NULL, NULL, NULL, NULL}; - - /* allocate temporary PQ point */ - IppsECCPPointState PQ; - ECP_POINT_X(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Y(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Z(&PQ) = cpBigNumListGet(&pList); - - /* init temporary point array */ - if(ippBigNumPOS == BN_SIGN(bnPscalar)) - pPointPQ[1] = (IppsECCPPointState*)pP; - else { - IppsECCPPointState P; - ECP_POINT_X(&P) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P) = cpBigNumListGet(&pList); - ECCP128_NegPoint(pP, &P, pECC); - pPointPQ[1] = &P; - } - if(ippBigNumPOS == BN_SIGN(bnQscalar)) - pPointPQ[2] = (IppsECCPPointState*)pQ; - else { - IppsECCPPointState Q; - ECP_POINT_X(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Y(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Z(&Q) = cpBigNumListGet(&pList); - ECCP128_NegPoint(pQ, &Q, pECC); - pPointPQ[2] = &Q; - } - - ECCP128_AddPoint(pPointPQ[1], pPointPQ[2], &PQ, pECC, pList); - ECCP128_GetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC, pList); - ECCP128_SetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC); - pPointPQ[3] = &PQ; - - /* pad scalars by zeros */ - ZEXPAND_BNU(pbnPscalar,bnPscalarSize, size); - ZEXPAND_BNU(pbnQscalar,bnQscalarSize, size); - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=size; n>0; n--) { - Ipp32u scalarPn = pbnPscalar[n-1]; - Ipp32u scalarQn = pbnQscalar[n-1]; - - int nBit; - for(nBit=31; nBit>=0; nBit--) { - int - PnQnBits = scalarPn&0x80000000? 1:0; - PnQnBits+= scalarQn&0x80000000? 2:0; - - if( !ECCP_IsPointAtInfinity(pR) ) - ECCP128_DblPoint(pR, pR, pECC, pList); - if( PnQnBits ) - ECCP128_AddPoint(pR, pPointPQ[PnQnBits], pR, pECC, pList); - - scalarPn <<= 1; - scalarQn <<= 1; - } - } - } -} - -#else -#pragma message ("ECCP128_ProdPoint: SCCM version") - -void ECCP128_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsECCPPointState T; - IppsECCPPointState U; - - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - - ECCP128_MulPoint(pP, bnPscalar, &T, (IppsECCPState*)pECC, pList); - ECCP128_MulPoint(pQ, bnQscalar, &U, (IppsECCPState*)pECC, pList); - ECCP128_AddPoint(&T, &U, pR, pECC, pList); -} -#endif - -#endif /* _ECP_128_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod192.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod192.h deleted file mode 100644 index 747173c30f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod192.h +++ /dev/null @@ -1,117 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Definitions of EC methods over GF(P192) -// -// -*/ - -#if !defined(_PCP_ECCPMETHOD192_H) -#define _PCP_ECCPMETHOD192_H - -#include "pcpeccp.h" - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP192_Methods(void); - - -/* -// Point Set. These operations implies -// transformation of regular coordinates into internal format -*/ -void ECCP192_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -void ECCP192_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -/* -// Get Point. These operations implies -// transformation of internal format coordinates into regular -*/ -//void ECCP192_GetPointProjective(IppsBigNumState* pX, -// IppsBigNumState* pY, -// IppsBigNumState* pZ, -// const IppsECCPPointState* pPoint, -// const IppsECCPState* pECC); - -void ECCP192_GetPointAffine(IppsBigNumState* pX, - IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Test is On EC -*/ -int ECCP192_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Operations -*/ -int ECCP192_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP192_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC); - -void ECCP192_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP192_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP192_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP192_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP192_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -#endif /* _PCP_ECCPMETHOD192_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod192ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod192ca.c deleted file mode 100644 index 39b1b63146..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod192ca.c +++ /dev/null @@ -1,880 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC methods over GF(P192) -// -// Contents: -// ECCP192_SetPointProjective() -// ECCP192_SetPointAffine() -// ECCP192_GetPointAffine() -// -// ECCP192_IsPointOnCurve() -// -// ECCP192_ComparePoint() -// ECCP192_NegPoint() -// ECCP192_DblPoint() -// ECCP192_AddPoint() -// ECCP192_MulPoint() -// ECCP192_ProdPoint() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_192_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" -#include "pcpeccpmethod192.h" -#include "pcppma192.h" - -/* - NOTE: - ECCP192 methods are used representation of point coordinates - in regular (usual residue) domain, because of special modular reduction -*/ -static -ECCP_METHOD ECCP192 = { - ECCP192_SetPointProjective, - ECCP192_SetPointAffine, - ECCP192_GetPointAffine, - - ECCP192_IsPointOnCurve, - - ECCP192_ComparePoint, - ECCP192_NegPoint, - ECCP192_DblPoint, - ECCP192_AddPoint, - ECCP192_MulPoint, - ECCP192_MulBasePoint, - ECCP192_ProdPoint -}; - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP192_Methods(void) -{ - return &ECCP192; -} - -/* -// ECCP192_PoinSettProjective -// Converts regular projective triplet (pX,pY,pZ) into pPoint -// (see note above) -*/ -void ECCP192_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(ECP_POINT_X(pPoint), pX); - cpBN_copy(ECP_POINT_Y(pPoint), pY); - cpBN_copy(ECP_POINT_Z(pPoint), pZ); - ECP_POINT_AFFINE(pPoint) = cpBN_cmp(pZ, BN_ONE_REF())==0; -} - -/* -// ECCP192_PointAffineSet -// Converts regular affine pair (pX,pY) into pPoint -*/ -void ECCP192_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - ECCP192_SetPointProjective(pX, pY, BN_ONE_REF(), pPoint, pECC); -} - -/* -// ECCP192_GetPointProjective -// Converts pPoint into regular projective triplet (pX,pY,pZ) -*/ -#if 0 -void ECCP192_GetPointProjective(IppsBigNumState* pX, - IppsBigNumState* pY, - IppsBigNumState* pZ, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(pX, ECP_POINT_X(pPoint)); - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - cpBN_copy(pZ, ECP_POINT_Z(pPoint)); -} -#endif - -/* -// ECCP192_GetPointAffine -// -// Converts pPoint into regular affine pair (pX,pY) -// -// Note: -// pPoint is not point at Infinity -// transform (X, Y, Z) into (x, y) = (X/Z^2, Y/Z^3) -*/ -void ECCP192_GetPointAffine(IppsBigNumState* pX, IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* case Z == 1 */ - if( ECP_POINT_AFFINE(pPoint) ) { - if(pX) { - cpBN_copy(pX, ECP_POINT_X(pPoint)); - } - if(pY) { - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - } - } - - /* case Z != 1 */ - else { - //IppsMontState* pMont = ECP_PMONT(pECC); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - IppsBigNumState* pT = cpBigNumListGet(&pList); - IppsBigNumState* pU = cpBigNumListGet(&pList); - //IppsBigNumState* pModulo = cpBigNumListGet(&pList); - //BN_Set(MNT_MODULUS(pMont), MNT_SIZE(pMont), pModulo); - - /* U = 1/Z */ - PMA192_inv(pU, ECP_POINT_Z(pPoint), pModulo); - /* T = 1/(Z^2) */ - PMA192_sqr(pT, pU); - - if(pX) { - PMA192_mul(pX,pT, ECP_POINT_X(pPoint)); - cpBN_fix(pX); - } - if(pY) { - /* U = 1/(Z^3) */ - PMA192_mul(pU, pU, pT); - PMA192_mul(pY,pU, ECP_POINT_Y(pPoint)); - cpBN_fix(pY); - } - } -} - -/* -// ECCP192_IsPointOnCurve -// -// Test point is lie on curve -// -// Note -// We deal with equation: y^2 = x^3 + A*x + B. -// Or in projective coordinates: Y^2 = X^3 + a*X*Z^4 + b*Z^6. -// The point under test is given by projective triplet (X,Y,Z), -// which represents actually (x,y) = (X/Z^2,Y/Z^3). -*/ -int ECCP192_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* let think Infinity point is on the curve */ - if( ECCP_IsPointAtInfinity(pPoint) ) - return 1; - - else { - IppsBigNumState* pR = cpBigNumListGet(&pList); - IppsBigNumState* pT = cpBigNumListGet(&pList); - - PMA192_sqr(pR, ECP_POINT_X(pPoint)); // R = X^3 - PMA192_mul(pR, pR, ECP_POINT_X(pPoint)); - - /* case Z != 1 */ - if( !ECP_POINT_AFFINE(pPoint) ) { - IppsBigNumState* pZ4 = cpBigNumListGet(&pList); - IppsBigNumState* pZ6 = cpBigNumListGet(&pList); - PMA192_sqr(pT, ECP_POINT_Z(pPoint)); // Z^2 - PMA192_sqr(pZ4, pT); // Z^4 - PMA192_mul(pZ6, pZ4, pT); // Z^6 - - PMA192_mul(pT, pZ4, ECP_POINT_X(pPoint)); // T = X*Z^4 - if( ECP_AMI3(pECC) ) { - IppsBigNumState* pU = cpBigNumListGet(&pList); - PMA192_add(pU, pT, pT); // R = X^3 +a*X*Z^4 - PMA192_add(pU, pU, pT); - PMA192_sub(pR, pR, pU); - } - else { - PMA192_mul(pT, pT, ECP_A(pECC)); // R = X^3 +a*X*Z^4 - PMA192_add(pR, pR, pT); - } - PMA192_mul(pT, pZ6, ECP_B(pECC)); // R = X^3 +a*X*Z^4 + b*Z^6 - PMA192_add(pR, pR, pT); - - } - /* case Z == 1 */ - else { - if( ECP_AMI3(pECC) ) { - PMA192_add(pT, ECP_POINT_X(pPoint), ECP_POINT_X(pPoint)); // R = X^3 +a*X - PMA192_add(pT, pT, ECP_POINT_X(pPoint)); - PMA192_sub(pR, pR, pT); - } - else { - PMA192_mul(pT, ECP_POINT_X(pPoint), ECP_A(pECC)); // R = X^3 +a*X - PMA192_add(pR, pR, pT); - } - PMA192_add(pR, pR, ECP_B(pECC)); // R = X^3 +a*X + b - } - PMA192_sqr(pT, ECP_POINT_Y(pPoint)); // T = Y^2 - return 0==cpBN_cmp(pR, pT); - } -} - -/* -// ECCP192_ComparePoint -// -// Compare two points: -// returns 0 => pP==pQ (maybe both pP and pQ are at Infinity) -// returns 1 => pP!=pQ -// -// Note -// In general we check: -// P_X*Q_Z^2 ~ Q_X*P_Z^2 -// P_Y*Q_Z^3 ~ Q_Y*P_Z^3 -*/ -int ECCP192_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - UNREFERENCED_PARAMETER(pECC); - - /* P or/and Q at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - return ECCP_IsPointAtInfinity(pQ)? 0:1; - if( ECCP_IsPointAtInfinity(pQ) ) - return ECCP_IsPointAtInfinity(pP)? 0:1; - - /* (P_Z==1) && (Q_Z==1) */ - if( ECP_POINT_AFFINE(pP) && ECP_POINT_AFFINE(pQ) ) - return ((0==cpBN_cmp(ECP_POINT_X(pP),ECP_POINT_X(pQ))) && (0==cpBN_cmp(ECP_POINT_Y(pP),ECP_POINT_Y(pQ))))? 0:1; - - { - IppsBigNumState* pPtmp = cpBigNumListGet(&pList); - IppsBigNumState* pQtmp = cpBigNumListGet(&pList); - IppsBigNumState* pPZ = cpBigNumListGet(&pList); - IppsBigNumState* pQZ = cpBigNumListGet(&pList); - - /* P_X*Q_Z^2 ~ Q_X*P_Z^2 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA192_sqr(pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_X*Q_Z^2 */ - PMA192_mul(pPtmp, ECP_POINT_X(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_X(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA192_sqr(pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_X*P_Z^2 */ - PMA192_mul(pQtmp, ECP_POINT_X(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_X(pQ)); - } - if ( cpBN_cmp(pPtmp, pQtmp) ) - return 1; /* points are different: (P_X*Q_Z^2) != (Q_X*P_Z^2) */ - - /* P_Y*Q_Z^3 ~ Q_Y*P_Z^3 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA192_mul(pQZ, pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_Y*Q_Z^3 */ - PMA192_mul(pPtmp, ECP_POINT_Y(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_Y(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA192_mul(pPZ, pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_Y*P_Z^3 */ - PMA192_mul(pQtmp, ECP_POINT_Y(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_Y(pQ)); - } - return cpBN_cmp(pPtmp, pQtmp)? 1:0; - } -} - -/* -// ECCP192_NegPoint -// -// Negative point -*/ -void ECCP192_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - - /* test point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - BNU_CHUNK_T* pRy = BN_NUMBER(ECP_POINT_Y(pR)); - BNU_CHUNK_T* pPy = BN_NUMBER(ECP_POINT_Y(pP)); - int size = LEN_P192; - - if( pP!=pR ) { - PMA_set(ECP_POINT_X(pR), ECP_POINT_X(pP)); - PMA_set(ECP_POINT_Z(pR), ECP_POINT_Z(pP)); - ECP_POINT_AFFINE(pR) = ECP_POINT_AFFINE(pP); - } - cpSub_BNU(pRy, (BNU_CHUNK_T*)secp192r1_p, pPy, LEN_P192); - FIX_BNU(pRy,size); - BN_SIZE(ECP_POINT_Y(pR)) = size; - BN_SIGN(ECP_POINT_Y(pR)) = ippBigNumPOS; - } -} - -/* -// ECCP192_DblPoint -// -// Double point -*/ -void ECCP192_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P at infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsBigNumState* bnV = cpBigNumListGet(&pList); - IppsBigNumState* bnU = cpBigNumListGet(&pList); - IppsBigNumState* bnM = cpBigNumListGet(&pList); - IppsBigNumState* bnS = cpBigNumListGet(&pList); - IppsBigNumState* bnT = cpBigNumListGet(&pList); - - /* M = 3*X^2 + A*Z^4 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA192_sqr(bnU, ECP_POINT_X(pP)); - PMA192_add(bnM, bnU, bnU); - PMA192_add(bnM, bnM, bnU); - PMA192_add(bnM, bnM, ECP_A(pECC)); - } - else if( ECP_AMI3(pECC) ) { - PMA192_sqr(bnU, ECP_POINT_Z(pP)); - PMA192_add(bnS, ECP_POINT_X(pP), bnU); - PMA192_sub(bnT, ECP_POINT_X(pP), bnU); - PMA192_mul(bnM, bnS, bnT); - PMA192_add(bnU, bnM, bnM); - PMA192_add(bnM, bnU, bnM); - } - else { - PMA192_sqr(bnU, ECP_POINT_X(pP)); - PMA192_add(bnM, bnU, bnU); - PMA192_add(bnM, bnM, bnU); - PMA192_sqr(bnU, ECP_POINT_Z(pP)); - PMA192_sqr(bnU, bnU); - PMA192_mul(bnU, bnU, ECP_A(pECC)); - PMA192_add(bnM, bnM, bnU); - } - - PMA192_add(bnV, ECP_POINT_Y(pP), ECP_POINT_Y(pP)); - - /* R_Z = 2*Y*Z */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnV); - } - else { - PMA192_mul(ECP_POINT_Z(pR), bnV, ECP_POINT_Z(pP)); - } - - /* S = 4*X*Y^2 */ - PMA192_sqr(bnT, bnV); - PMA192_mul(bnS, bnT, ECP_POINT_X(pP)); - - /* R_X = M^2 - 2*S */ - PMA192_sqr(bnU, bnM); - PMA192_sub(bnU, bnU, bnS); - PMA192_sub(ECP_POINT_X(pR), bnU, bnS); - - /* T = 8*Y^4 */ - PMA192_mul(bnV, bnV, ECP_POINT_Y(pP)); - PMA192_mul(bnT, bnT, bnV); - - /* R_Y = M*(S - R_X) - T */ - PMA192_sub(bnS, bnS, ECP_POINT_X(pR)); - PMA192_mul(bnS, bnS, bnM); - PMA192_sub(ECP_POINT_Y(pR), bnS, bnT); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP192_AddPoint -// -// Add points -*/ -void ECCP192_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ -#if 0 - /* test stupid call */ - if( pP == pQ ) { - ECCP192_DblPoint(pP, pR, pECC, pList); - return; - } -#endif - - /* prevent operation with point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) { - ECCP_CopyPoint(pQ, pR); - return; - } - if( ECCP_IsPointAtInfinity(pQ) ) { - ECCP_CopyPoint(pP, pR); - return; - } - - /* - // addition - */ - { - IppsBigNumState* bnU0 = cpBigNumListGet(&pList); - IppsBigNumState* bnS0 = cpBigNumListGet(&pList); - IppsBigNumState* bnU1 = cpBigNumListGet(&pList); - IppsBigNumState* bnS1 = cpBigNumListGet(&pList); - IppsBigNumState* bnW = cpBigNumListGet(&pList); - IppsBigNumState* bnR = cpBigNumListGet(&pList); - IppsBigNumState *bnT = bnU0; - IppsBigNumState *bnM = bnS0; - - /* U0 = P_X * Q_Z^2 */ - /* S0 = P_Y * Q_Z^3 */ - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU0, ECP_POINT_X(pP)); - PMA_set(bnS0, ECP_POINT_Y(pP)); - } - else { - PMA192_sqr(bnW, ECP_POINT_Z(pQ)); - PMA192_mul(bnU0,ECP_POINT_X(pP), bnW); - PMA192_mul(bnW, ECP_POINT_Z(pQ), bnW); - PMA192_mul(bnS0,ECP_POINT_Y(pP), bnW); - } - - /* U1 = Q_X * P_Z^2 */ - /* S1 = Q_Y * P_Z^3 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_X(pQ)); - PMA_set(bnS1, ECP_POINT_Y(pQ)); - } - else { - PMA192_sqr(bnW, ECP_POINT_Z(pP)); - PMA192_mul(bnU1,ECP_POINT_X(pQ), bnW); - PMA192_mul(bnW, ECP_POINT_Z(pP), bnW); - PMA192_mul(bnS1,ECP_POINT_Y(pQ), bnW); - } - - /* W = U0-U1 */ - /* R = S0-S1 */ - PMA192_sub(bnW, bnU0, bnU1); - PMA192_sub(bnR, bnS0, bnS1); - - //if( IsZero_BN(bnW) ) { - //if( IsZero_BN(bnR) ) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnW), LEN_P192, 0)) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnR), LEN_P192, 0)) { - ECCP192_DblPoint(pP, pR, pECC, pList); - return; - } - else { - ECCP_SetPointToInfinity(pR); - return; - } - } - - /* T = U0+U1 */ - /* M = S0+S1 */ - PMA192_add(bnT, bnU0, bnU1); - PMA192_add(bnM, bnS0, bnS1); - - /* R_Z = P_Z * Q_Z * W */ - if( ECP_POINT_AFFINE(pQ) && ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnW); - } - else { - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU1, ECP_POINT_Z(pP)); - } - else if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_Z(pQ)); - } - else { - PMA192_mul(bnU1, ECP_POINT_Z(pP), ECP_POINT_Z(pQ)); - } - PMA192_mul(ECP_POINT_Z(pR), bnU1, bnW); - } - - PMA192_sqr(bnU1, bnW); /* U1 = W^2 */ - PMA192_mul(bnS1, bnT, bnU1); /* S1 = T * W^2 */ - - /* R_X = R^2 - T * W^2 */ - PMA192_sqr(ECP_POINT_X(pR), bnR); - PMA192_sub(ECP_POINT_X(pR), ECP_POINT_X(pR), bnS1); - - /* V = T * W^2 - 2 * R_X (S1) */ - PMA192_sub(bnS1, bnS1, ECP_POINT_X(pR)); - PMA192_sub(bnS1, bnS1, ECP_POINT_X(pR)); - - /* R_Y = (V * R - M * W^3) /2 */ - PMA192_mul(ECP_POINT_Y(pR), bnS1, bnR); - PMA192_mul(bnU1, bnU1, bnW); - PMA192_mul(bnU1, bnU1, bnM); - PMA192_sub(bnU1, ECP_POINT_Y(pR), bnU1); - PMA192_div2(ECP_POINT_Y(pR), bnU1); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP192_MulPoint -// -// Multiply point by scalar -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP192_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - IppsECCPPointState T; - IppsECCPPointState U; - IppsBigNumState* bnKH = cpBigNumListGet(&pList); - Ipp32u* pK; - Ipp32u* pH; - Ipp32u carry; - int lenKH; - int bitH; - - /* init result */ - ECCP_CopyPoint(pP, pR); - - /* if scalar is negative */ - if( ippBigNumNEG == BN_SIGN(bnN) ) { - /* negative R */ - ECCP192_NegPoint(pR, pR, pECC); - } - - /* copy K = N and compute H=3*K */ - lenKH = BN_SIZE(bnN)+1; - pK = BN_NUMBER(bnKH); - pH = BN_BUFFER(bnKH); - Cpy_BNU(BN_NUMBER(bnN), pK, BN_SIZE(bnN)); - pK[lenKH-1] = 0; - carry = cpAdd_BNU(pH, pK, pK, lenKH); - carry = cpAdd_BNU(pH, pK, pH, lenKH); - - /* init temporary T = (X/Z^2, Y/Z^3, 1) */ - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - ECCP192_GetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), pR, pECC, pList); - ECCP192_SetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), &T, pECC); - - /* temporary point U =-T */ - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - //ECCP192_NegPoint(&T, &U, pECC); - ECCP_NegPoint(&T, &U, pECC); - - for(bitH=MSB_BNU(pH, lenKH)-1; bitH>0; bitH--) { - int hBit = TST_BIT(pH, bitH); - int kBit = TST_BIT(pK, bitH); - ECCP192_DblPoint(pR, pR, pECC, pList); - if( hBit && !kBit ) - ECCP192_AddPoint(pR, &T, pR, pECC, pList); - if(!hBit && kBit ) - ECCP192_AddPoint(pR, &U, pR, pECC, pList); - } - } -} - -#else -#pragma message ("ECCP192_MulPoint: SCCM version") - -void ECCP192_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - Ipp8u* pScratchAligned = ECP_SCCMBUFF(pECC); - - BNU_CHUNK_T* pN = BN_NUMBER(bnN); - cpSize nsN = BN_SIZE(bnN); - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int w = cpECCP_OptimalWinSize(scalarBitSize); - /* number of table entries */ - int nPrecomputed = 1<>shift) & dmask; - - /* initialize result (ECP_FINITE_POINT|ECP_PROJECTIVE) */ - cpECCP_ScrambleGet(pR, coordSize, pScratchAligned+windowVal, nPrecomputed); - ECP_POINT_AFFINE(pR) = 0; - - /* initialize temporary T (ECP_PROJECTIVE) */ - ECP_POINT_AFFINE(&T) = 0; - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - /* w times doubling */ - int k; - for(k=0; k>shift) & dmask; - - /* extract value from the pre-computed table */ - cpECCP_ScrambleGet(&T, coordSize, pScratchAligned+windowVal, nPrecomputed); - - /* and add it */ - ECCP192_AddPoint(pR, &T, pR, pECC, pList); - } - } - } -} -#endif - -void ECCP192_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - ECCP192_MulPoint(ECP_GENC(pECC), pK, pR, pECC, pList); -} - -/* -// ECCP192_ProdPoint -// -// Point product -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP192_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalars */ - if( IsZero_BN(bnPscalar) ) { - ECCP192_MulPoint(pQ, bnQscalar, pR, pECC, pList); - return; - } - if( IsZero_BN(bnQscalar) ) { - ECCP192_MulPoint(pP, bnPscalar, pR, pECC, pList); - return; - } - - /* - // point product - */ - else { - int n; - Ipp32u* pbnPscalar = BN_NUMBER(bnPscalar); - int bnPscalarSize = BN_SIZE(bnPscalar); - Ipp32u* pbnQscalar = BN_NUMBER(bnQscalar); - int bnQscalarSize = BN_SIZE(bnQscalar); - - int size = bnPscalarSize>bnQscalarSize? bnPscalarSize : bnQscalarSize; - - IppsECCPPointState* pPointPQ[4] = {NULL, NULL, NULL, NULL}; - - /* allocate temporary PQ point */ - IppsECCPPointState PQ; - ECP_POINT_X(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Y(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Z(&PQ) = cpBigNumListGet(&pList); - - /* init temporary point array */ - if(ippBigNumPOS == BN_SIGN(bnPscalar)) - pPointPQ[1] = (IppsECCPPointState*)pP; - else { - IppsECCPPointState P; - ECP_POINT_X(&P) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P) = cpBigNumListGet(&pList); - ECCP192_NegPoint(pP, &P, pECC); - pPointPQ[1] = &P; - } - if(ippBigNumPOS == BN_SIGN(bnQscalar)) - pPointPQ[2] = (IppsECCPPointState*)pQ; - else { - IppsECCPPointState Q; - ECP_POINT_X(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Y(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Z(&Q) = cpBigNumListGet(&pList); - ECCP192_NegPoint(pQ, &Q, pECC); - pPointPQ[2] = &Q; - } - - ECCP192_AddPoint(pPointPQ[1], pPointPQ[2], &PQ, pECC, pList); - ECCP192_GetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC, pList); - ECCP192_SetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC); - pPointPQ[3] = &PQ; - - /* pad scalars by zeros */ - ZEXPAND_BNU(pbnPscalar,bnPscalarSize, size); - ZEXPAND_BNU(pbnQscalar,bnQscalarSize, size); - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=size; n>0; n--) { - Ipp32u scalarPn = pbnPscalar[n-1]; - Ipp32u scalarQn = pbnQscalar[n-1]; - - int nBit; - for(nBit=31; nBit>=0; nBit--) { - int - PnQnBits = scalarPn&0x80000000? 1:0; - PnQnBits+= scalarQn&0x80000000? 2:0; - - if( !ECCP_IsPointAtInfinity(pR) ) - ECCP192_DblPoint(pR, pR, pECC, pList); - if( PnQnBits ) - ECCP192_AddPoint(pR, pPointPQ[PnQnBits], pR, pECC, pList); - - scalarPn <<= 1; - scalarQn <<= 1; - } - } - } -} - -#else -#pragma message ("ECCP192_ProdPoint: SCCM version") - -void ECCP192_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsECCPPointState T; - IppsECCPPointState U; - - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - - ECCP192_MulPoint(pP, bnPscalar, &T, (IppsECCPState*)pECC, pList); - ECCP192_MulPoint(pQ, bnQscalar, &U, (IppsECCPState*)pECC, pList); - ECCP192_AddPoint(&T, &U, pR, pECC, pList); -} -#endif - -#endif /* _ECP_192_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod224.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod224.h deleted file mode 100644 index 97d910c2ee..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod224.h +++ /dev/null @@ -1,118 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Definitions of EC methods over GF(P224) -// -// -*/ - -#if !defined(_PCP_ECCPMETHOD224_H) -#define _PCP_ECCPMETHOD224_H - -#include "pcpeccp.h" - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP224_Methods(void); - - -/* -// Point Set. These operations implies -// transformation of regular coordinates into internal format -*/ -void ECCP224_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -void ECCP224_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -/* -// Get Point. These operations implies -// transformation of internal format coordinates into regular -*/ -//void ECCP224_GetPointProjective(IppsBigNumState* pX, -// IppsBigNumState* pY, -// IppsBigNumState* pZ, -// const IppsECCPPointState* pPoint, -// const IppsECCPState* pECC); - -void ECCP224_GetPointAffine(IppsBigNumState* pX, - IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Test is On EC -*/ -int ECCP224_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Operations -*/ -int ECCP224_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP224_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC); - -void ECCP224_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP224_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP224_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP224_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP224_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -#endif /* _PCP_ECCPMETHOD224_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod224ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod224ca.c deleted file mode 100644 index dbd0462dcb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod224ca.c +++ /dev/null @@ -1,877 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC methods over GF(P224) -// -// Contents: -// ECCP224_SetPointProjective() -// ECCP224_SetPointAffine() -// ECCP224_GetPointAffine() -// -// ECCP224_IsPointOnCurve() -// -// ECCP224_ComparePoint() -// ECCP224_NegPoint() -// ECCP224_DblPoint() -// ECCP224_AddPoint() -// ECCP224_MulPoint() -// ECCP224_ProdPoint() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_224_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" -#include "pcpeccpmethod224.h" -#include "pcppma224.h" - -/* - NOTE: - ECCP224 methods are used representation of point coordinates - in regular (usual residue) domain, because of special modular reduction -*/ -static -ECCP_METHOD ECCP224 = { - ECCP224_SetPointProjective, - ECCP224_SetPointAffine, - ECCP224_GetPointAffine, - - ECCP224_IsPointOnCurve, - - ECCP224_ComparePoint, - ECCP224_NegPoint, - ECCP224_DblPoint, - ECCP224_AddPoint, - ECCP224_MulPoint, - ECCP224_MulBasePoint, - ECCP224_ProdPoint -}; - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP224_Methods(void) -{ - return &ECCP224; -} - -/* -// ECCP224_PoinSettProjective -// Converts regular projective triplet (pX,pY,pZ) into pPoint -// (see note above) -*/ -void ECCP224_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(ECP_POINT_X(pPoint), pX); - cpBN_copy(ECP_POINT_Y(pPoint), pY); - cpBN_copy(ECP_POINT_Z(pPoint), pZ); - ECP_POINT_AFFINE(pPoint) = cpBN_cmp(pZ, BN_ONE_REF())==0; -} - -/* -// ECCP224_PointAffineSet -// Converts regular affine pair (pX,pY) into pPoint -*/ -void ECCP224_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - ECCP224_SetPointProjective(pX, pY, BN_ONE_REF(), pPoint, pECC); -} - -/* -// ECCP224_GetPointProjective -// Converts pPoint into regular projective triplet (pX,pY,pZ) -*/ -#if 0 -void ECCP224_GetPointProjective(IppsBigNumState* pX, - IppsBigNumState* pY, - IppsBigNumState* pZ, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(pX, ECP_POINT_X(pPoint)); - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - cpBN_copy(pZ, ECP_POINT_Z(pPoint)); -} -#endif - -/* -// ECCP224_GetPointAffine -// -// Converts pPoint into regular affine pair (pX,pY) -// -// Note: -// pPoint is not point at Infinity -// transform (X, Y, Z) into (x, y) = (X/Z^2, Y/Z^3) -*/ -void ECCP224_GetPointAffine(IppsBigNumState* pX, IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* case Z == 1 */ - if( ECP_POINT_AFFINE(pPoint) ) { - if(pX) { - cpBN_copy(pX, ECP_POINT_X(pPoint)); - } - if(pY) { - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - } - } - - /* case Z != 1 */ - else { - //IppsMontState* pMont = ECP_PMONT(pECC); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - IppsBigNumState* pT = cpBigNumListGet(&pList); - IppsBigNumState* pU = cpBigNumListGet(&pList); - //IppsBigNumState* pModulo = cpBigNumListGet(&pList); - //BN_Set(MNT_MODULUS(pMont), MNT_SIZE(pMont), pModulo); - - /* U = 1/Z */ - PMA224_inv(pU, ECP_POINT_Z(pPoint), pModulo); - /* T = 1/(Z^2) */ - PMA224_sqr(pT, pU); - - if(pX) { - PMA224_mul(pX,pT, ECP_POINT_X(pPoint)); - } - if(pY) { - /* U = 1/(Z^3) */ - PMA224_mul(pU, pU, pT); - PMA224_mul(pY,pU, ECP_POINT_Y(pPoint)); - } - } -} - -/* -// ECCP224_IsPointOnCurve -// -// Test point is lie on curve -// -// Note -// We deal with equation: y^2 = x^3 + A*x + B. -// Or in projective coordinates: Y^2 = X^3 + a*X*Z^4 + b*Z^6. -// The point under test is given by projective triplet (X,Y,Z), -// which represents actually (x,y) = (X/Z^2,Y/Z^3). -*/ -int ECCP224_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* let think Infinity point is on the curve */ - if( ECCP_IsPointAtInfinity(pPoint) ) - return 1; - - else { - IppsBigNumState* pR = cpBigNumListGet(&pList); - IppsBigNumState* pT = cpBigNumListGet(&pList); - - PMA224_sqr(pR, ECP_POINT_X(pPoint)); // R = X^3 - PMA224_mul(pR, pR, ECP_POINT_X(pPoint)); - - /* case Z != 1 */ - if( !ECP_POINT_AFFINE(pPoint) ) { - IppsBigNumState* pZ4 = cpBigNumListGet(&pList); - IppsBigNumState* pZ6 = cpBigNumListGet(&pList); - PMA224_sqr(pT, ECP_POINT_Z(pPoint)); // Z^2 - PMA224_sqr(pZ4, pT); // Z^4 - PMA224_mul(pZ6, pZ4, pT); // Z^6 - - PMA224_mul(pT, pZ4, ECP_POINT_X(pPoint)); // T = X*Z^4 - if( ECP_AMI3(pECC) ) { - IppsBigNumState* pU = cpBigNumListGet(&pList); - PMA224_add(pU, pT, pT); // R = X^3 +a*X*Z^4 - PMA224_add(pU, pU, pT); - PMA224_sub(pR, pR, pU); - } - else { - PMA224_mul(pT, pT, ECP_A(pECC)); // R = X^3 +a*X*Z^4 - PMA224_add(pR, pR, pT); - } - PMA224_mul(pT, pZ6, ECP_B(pECC)); // R = X^3 +a*X*Z^4 + b*Z^6 - PMA224_add(pR, pR, pT); - - } - /* case Z == 1 */ - else { - if( ECP_AMI3(pECC) ) { - PMA224_add(pT, ECP_POINT_X(pPoint), ECP_POINT_X(pPoint)); // R = X^3 +a*X - PMA224_add(pT, pT, ECP_POINT_X(pPoint)); - PMA224_sub(pR, pR, pT); - } - else { - PMA224_mul(pT, ECP_POINT_X(pPoint), ECP_A(pECC)); // R = X^3 +a*X - PMA224_add(pR, pR, pT); - } - PMA224_add(pR, pR, ECP_B(pECC)); // R = X^3 +a*X + b - } - PMA224_sqr(pT, ECP_POINT_Y(pPoint)); // T = Y^2 - return 0==cpBN_cmp(pR, pT); - } -} - -/* -// ECCP224_ComparePoint -// -// Compare two points: -// returns 0 => pP==pQ (maybe both pP and pQ are at Infinity) -// returns 1 => pP!=pQ -// -// Note -// In general we check: -// P_X*Q_Z^2 ~ Q_X*P_Z^2 -// P_Y*Q_Z^3 ~ Q_Y*P_Z^3 -*/ -int ECCP224_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - UNREFERENCED_PARAMETER(pECC); - - /* P or/and Q at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - return ECCP_IsPointAtInfinity(pQ)? 0:1; - if( ECCP_IsPointAtInfinity(pQ) ) - return ECCP_IsPointAtInfinity(pP)? 0:1; - - /* (P_Z==1) && (Q_Z==1) */ - if( ECP_POINT_AFFINE(pP) && ECP_POINT_AFFINE(pQ) ) - return ((0==cpBN_cmp(ECP_POINT_X(pP),ECP_POINT_X(pQ))) && (0==cpBN_cmp(ECP_POINT_Y(pP),ECP_POINT_Y(pQ))))? 0:1; - - { - IppsBigNumState* pPtmp = cpBigNumListGet(&pList); - IppsBigNumState* pQtmp = cpBigNumListGet(&pList); - IppsBigNumState* pPZ = cpBigNumListGet(&pList); - IppsBigNumState* pQZ = cpBigNumListGet(&pList); - - /* P_X*Q_Z^2 ~ Q_X*P_Z^2 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA224_sqr(pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_X*Q_Z^2 */ - PMA224_mul(pPtmp, ECP_POINT_X(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_X(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA224_sqr(pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_X*P_Z^2 */ - PMA224_mul(pQtmp, ECP_POINT_X(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_X(pQ)); - } - if ( cpBN_cmp(pPtmp, pQtmp) ) - return 1; /* points are different: (P_X*Q_Z^2) != (Q_X*P_Z^2) */ - - /* P_Y*Q_Z^3 ~ Q_Y*P_Z^3 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA224_mul(pQZ, pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_Y*Q_Z^3 */ - PMA224_mul(pPtmp, ECP_POINT_Y(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_Y(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA224_mul(pPZ, pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_Y*P_Z^3 */ - PMA224_mul(pQtmp, ECP_POINT_Y(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_Y(pQ)); - } - return cpBN_cmp(pPtmp, pQtmp)? 1:0; - } -} - -/* -// ECCP224_NegPoint -// -// Negative point -*/ -void ECCP224_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - - /* test point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - BNU_CHUNK_T* pRy = BN_NUMBER(ECP_POINT_Y(pR)); - BNU_CHUNK_T* pPy = BN_NUMBER(ECP_POINT_Y(pP)); - int size = LEN_P224; - - if( pP!=pR ) { - PMA_set(ECP_POINT_X(pR), ECP_POINT_X(pP)); - PMA_set(ECP_POINT_Z(pR), ECP_POINT_Z(pP)); - ECP_POINT_AFFINE(pR) = ECP_POINT_AFFINE(pP); - } - cpSub_BNU(pRy, (BNU_CHUNK_T*)secp224r1_p, pPy, LEN_P224); - FIX_BNU(pRy,size); - BN_SIZE(ECP_POINT_Y(pR)) = size; - BN_SIGN(ECP_POINT_Y(pR)) = ippBigNumPOS; - } -} - -/* -// ECCP224_DblPoint -// -// Double point -*/ -void ECCP224_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P at infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsBigNumState* bnV = cpBigNumListGet(&pList); - IppsBigNumState* bnU = cpBigNumListGet(&pList); - IppsBigNumState* bnM = cpBigNumListGet(&pList); - IppsBigNumState* bnS = cpBigNumListGet(&pList); - IppsBigNumState* bnT = cpBigNumListGet(&pList); - - /* M = 3*X^2 + A*Z^4 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA224_sqr(bnU, ECP_POINT_X(pP)); - PMA224_add(bnM, bnU, bnU); - PMA224_add(bnM, bnM, bnU); - PMA224_add(bnM, bnM, ECP_A(pECC)); - } - else if( ECP_AMI3(pECC) ) { - PMA224_sqr(bnU, ECP_POINT_Z(pP)); - PMA224_add(bnS, ECP_POINT_X(pP), bnU); - PMA224_sub(bnT, ECP_POINT_X(pP), bnU); - PMA224_mul(bnM, bnS, bnT); - PMA224_add(bnU, bnM, bnM); - PMA224_add(bnM, bnU, bnM); - } - else { - PMA224_sqr(bnU, ECP_POINT_X(pP)); - PMA224_add(bnM, bnU, bnU); - PMA224_add(bnM, bnM, bnU); - PMA224_sqr(bnU, ECP_POINT_Z(pP)); - PMA224_sqr(bnU, bnU); - PMA224_mul(bnU, bnU, ECP_A(pECC)); - PMA224_add(bnM, bnM, bnU); - } - - PMA224_add(bnV, ECP_POINT_Y(pP), ECP_POINT_Y(pP)); - - /* R_Z = 2*Y*Z */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnV); - } - else { - PMA224_mul(ECP_POINT_Z(pR), bnV, ECP_POINT_Z(pP)); - } - - /* S = 4*X*Y^2 */ - PMA224_sqr(bnT, bnV); - PMA224_mul(bnS, bnT, ECP_POINT_X(pP)); - - /* R_X = M^2 - 2*S */ - PMA224_sqr(bnU, bnM); - PMA224_sub(bnU, bnU, bnS); - PMA224_sub(ECP_POINT_X(pR), bnU, bnS); - - /* T = 8*Y^4 */ - PMA224_mul(bnV, bnV, ECP_POINT_Y(pP)); - PMA224_mul(bnT, bnT, bnV); - - /* R_Y = M*(S - R_X) - T */ - PMA224_sub(bnS, bnS, ECP_POINT_X(pR)); - PMA224_mul(bnS, bnS, bnM); - PMA224_sub(ECP_POINT_Y(pR), bnS, bnT); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP224_AddPoint -// -// Add points -*/ -void ECCP224_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ -#if 0 - /* test stupid call */ - if( pP == pQ ) { - ECCP224_DblPoint(pP, pR, pECC, pList); - return; - } -#endif - - /* prevent operation with point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) { - ECCP_CopyPoint(pQ, pR); - return; - } - if( ECCP_IsPointAtInfinity(pQ) ) { - ECCP_CopyPoint(pP, pR); - return; - } - - /* - // addition - */ - { - IppsBigNumState* bnU0 = cpBigNumListGet(&pList); - IppsBigNumState* bnS0 = cpBigNumListGet(&pList); - IppsBigNumState* bnU1 = cpBigNumListGet(&pList); - IppsBigNumState* bnS1 = cpBigNumListGet(&pList); - IppsBigNumState* bnW = cpBigNumListGet(&pList); - IppsBigNumState* bnR = cpBigNumListGet(&pList); - IppsBigNumState *bnT = bnU0; - IppsBigNumState *bnM = bnS0; - - /* U0 = P_X * Q_Z^2 */ - /* S0 = P_Y * Q_Z^3 */ - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU0, ECP_POINT_X(pP)); - PMA_set(bnS0, ECP_POINT_Y(pP)); - } - else { - PMA224_sqr(bnW, ECP_POINT_Z(pQ)); - PMA224_mul(bnU0,ECP_POINT_X(pP), bnW); - PMA224_mul(bnW, ECP_POINT_Z(pQ), bnW); - PMA224_mul(bnS0,ECP_POINT_Y(pP), bnW); - } - - /* U1 = Q_X * P_Z^2 */ - /* S1 = Q_Y * P_Z^3 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_X(pQ)); - PMA_set(bnS1, ECP_POINT_Y(pQ)); - } - else { - PMA224_sqr(bnW, ECP_POINT_Z(pP)); - PMA224_mul(bnU1,ECP_POINT_X(pQ), bnW); - PMA224_mul(bnW, ECP_POINT_Z(pP), bnW); - PMA224_mul(bnS1,ECP_POINT_Y(pQ), bnW); - } - - /* W = U0-U1 */ - /* R = S0-S1 */ - PMA224_sub(bnW, bnU0, bnU1); - PMA224_sub(bnR, bnS0, bnS1); - - //if( IsZero_BN(bnW) ) { - //if( IsZero_BN(bnR) ) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnW), LEN_P224, 0)) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnR), LEN_P224, 0)) { - ECCP224_DblPoint(pP, pR, pECC, pList); - return; - } - else { - ECCP_SetPointToInfinity(pR); - return; - } - } - - /* T = U0+U1 */ - /* M = S0+S1 */ - PMA224_add(bnT, bnU0, bnU1); - PMA224_add(bnM, bnS0, bnS1); - - /* R_Z = P_Z * Q_Z * W */ - if( ECP_POINT_AFFINE(pQ) && ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnW); - } - else { - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU1, ECP_POINT_Z(pP)); - } - else if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_Z(pQ)); - } - else { - PMA224_mul(bnU1, ECP_POINT_Z(pP), ECP_POINT_Z(pQ)); - } - PMA224_mul(ECP_POINT_Z(pR), bnU1, bnW); - } - - PMA224_sqr(bnU1, bnW); /* U1 = W^2 */ - PMA224_mul(bnS1, bnT, bnU1); /* S1 = T * W^2 */ - - /* R_X = R^2 - T * W^2 */ - PMA224_sqr(ECP_POINT_X(pR), bnR); - PMA224_sub(ECP_POINT_X(pR), ECP_POINT_X(pR), bnS1); - - /* V = T * W^2 - 2 * R_X (S1) */ - PMA224_sub(bnS1, bnS1, ECP_POINT_X(pR)); - PMA224_sub(bnS1, bnS1, ECP_POINT_X(pR)); - - /* R_Y = (V * R - M * W^3) /2 */ - PMA224_mul(ECP_POINT_Y(pR), bnS1, bnR); - PMA224_mul(bnU1, bnU1, bnW); - PMA224_mul(bnU1, bnU1, bnM); - PMA224_sub(bnU1, ECP_POINT_Y(pR), bnU1); - PMA224_div2(ECP_POINT_Y(pR), bnU1); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP224_MulPoint -// -// Multiply point by scalar -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP224_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - IppsECCPPointState T; - IppsECCPPointState U; - IppsBigNumState* bnKH = cpBigNumListGet(&pList); - Ipp32u* pK; - Ipp32u* pH; - Ipp32u carry; - int lenKH; - int bitH; - - /* init result */ - ECCP_CopyPoint(pP, pR); - - /* if scalar is negative */ - if( ippBigNumNEG == BN_SIGN(bnN) ) { - /* negative R */ - ECCP224_NegPoint(pR, pR, pECC); - } - - /* copy K = N and compute H=3*K */ - lenKH = BN_SIZE(bnN)+1; - pK = BN_NUMBER(bnKH); - pH = BN_BUFFER(bnKH); - Cpy_BNU(BN_NUMBER(bnN), pK, BN_SIZE(bnN)); - pK[lenKH-1] = 0; - carry = cpAdd_BNU(pH, pK, pK, lenKH); - carry = cpAdd_BNU(pH, pK, pH, lenKH); - - /* init temporary T = (X/Z^2, Y/Z^3, 1) */ - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - ECCP224_GetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), pR, pECC, pList); - ECCP224_SetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), &T, pECC); - - /* temporary point U =-T */ - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - ECCP224_NegPoint(&T, &U, pECC); - - for(bitH=MSB_BNU(pH, lenKH)-1; bitH>0; bitH--) { - int hBit = TST_BIT(pH, bitH); - int kBit = TST_BIT(pK, bitH); - ECCP224_DblPoint(pR, pR, pECC, pList); - if( hBit && !kBit ) - ECCP224_AddPoint(pR, &T, pR, pECC, pList); - if(!hBit && kBit ) - ECCP224_AddPoint(pR, &U, pR, pECC, pList); - } - } -} - -#else -#pragma message ("ECCP224_MulPoint: SCCM version") - -void ECCP224_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - Ipp8u* pScratchAligned = ECP_SCCMBUFF(pECC); - - BNU_CHUNK_T* pN = BN_NUMBER(bnN); - cpSize nsN = BN_SIZE(bnN); - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int w = cpECCP_OptimalWinSize(scalarBitSize); - /* number of table entries */ - int nPrecomputed = 1<>shift) & dmask; - - /* initialize result (ECP_FINITE_POINT|ECP_PROJECTIVE) */ - cpECCP_ScrambleGet(pR, coordSize, pScratchAligned+windowVal, nPrecomputed); - ECP_POINT_AFFINE(pR) = 0; - - /* initialize temporary T (ECP_PROJECTIVE) */ - ECP_POINT_AFFINE(&T) = 0; - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - /* w times doubling */ - int k; - for(k=0; k>shift) & dmask; - - /* extract value from the pre-computed table */ - cpECCP_ScrambleGet(&T, coordSize, pScratchAligned+windowVal, nPrecomputed); - - /* and add it */ - ECCP224_AddPoint(pR, &T, pR, pECC, pList); - } - } - } -} -#endif - -void ECCP224_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - ECCP224_MulPoint(ECP_GENC(pECC), pK, pR, pECC, pList); -} - -/* -// ECCP224_ProdPoint -// -// Point product -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP224_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalars */ - if( IsZero_BN(bnPscalar) ) { - ECCP224_MulPoint(pQ, bnQscalar, pR, pECC, pList); - return; - } - if( IsZero_BN(bnQscalar) ) { - ECCP224_MulPoint(pP, bnPscalar, pR, pECC, pList); - return; - } - - /* - // point product - */ - else { - int n; - Ipp32u* pbnPscalar = BN_NUMBER(bnPscalar); - int bnPscalarSize = BN_SIZE(bnPscalar); - Ipp32u* pbnQscalar = BN_NUMBER(bnQscalar); - int bnQscalarSize = BN_SIZE(bnQscalar); - - int size = bnPscalarSize>bnQscalarSize? bnPscalarSize : bnQscalarSize; - - IppsECCPPointState* pPointPQ[4] = {NULL, NULL, NULL, NULL}; - - /* allocate temporary PQ point */ - IppsECCPPointState PQ; - ECP_POINT_X(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Y(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Z(&PQ) = cpBigNumListGet(&pList); - - /* init temporary point array */ - if(ippBigNumPOS == BN_SIGN(bnPscalar)) - pPointPQ[1] = (IppsECCPPointState*)pP; - else { - IppsECCPPointState P; - ECP_POINT_X(&P) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P) = cpBigNumListGet(&pList); - ECCP224_NegPoint(pP, &P, pECC); - pPointPQ[1] = &P; - } - if(ippBigNumPOS == BN_SIGN(bnQscalar)) - pPointPQ[2] = (IppsECCPPointState*)pQ; - else { - IppsECCPPointState Q; - ECP_POINT_X(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Y(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Z(&Q) = cpBigNumListGet(&pList); - ECCP224_NegPoint(pQ, &Q, pECC); - pPointPQ[2] = &Q; - } - - ECCP224_AddPoint(pPointPQ[1], pPointPQ[2], &PQ, pECC, pList); - ECCP224_GetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC, pList); - ECCP224_SetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC); - pPointPQ[3] = &PQ; - - /* pad scalars by zeros */ - ZEXPAND_BNU(pbnPscalar,bnPscalarSize, size); - ZEXPAND_BNU(pbnQscalar,bnQscalarSize, size); - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=size; n>0; n--) { - Ipp32u scalarPn = pbnPscalar[n-1]; - Ipp32u scalarQn = pbnQscalar[n-1]; - - int nBit; - for(nBit=31; nBit>=0; nBit--) { - int - PnQnBits = scalarPn&0x80000000? 1:0; - PnQnBits+= scalarQn&0x80000000? 2:0; - - if( !ECCP_IsPointAtInfinity(pR) ) - ECCP224_DblPoint(pR, pR, pECC, pList); - if( PnQnBits ) - ECCP224_AddPoint(pR, pPointPQ[PnQnBits], pR, pECC, pList); - - scalarPn <<= 1; - scalarQn <<= 1; - } - } - } -} - -#else -#pragma message ("ECCP224_ProdPoint: SCCM version") - -void ECCP224_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsECCPPointState T; - IppsECCPPointState U; - - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - - ECCP224_MulPoint(pP, bnPscalar, &T, (IppsECCPState*)pECC, pList); - ECCP224_MulPoint(pQ, bnQscalar, &U, (IppsECCPState*)pECC, pList); - ECCP224_AddPoint(&T, &U, pR, pECC, pList); -} -#endif - -#endif /* _ECP_224_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod256.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod256.h deleted file mode 100644 index 3d85a85d23..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod256.h +++ /dev/null @@ -1,118 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Definitions of EC methods over GF(P256) -// -// -*/ - -#if !defined(_PCP_ECCPMETHOD256_H) -#define _PCP_ECCPMETHOD256_H - -#include "pcpeccp.h" - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP256_Methods(void); - - -/* -// Point Set. These operations implies -// transformation of regular coordinates into internal format -*/ -void ECCP256_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -void ECCP256_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -/* -// Get Point. These operations implies -// transformation of internal format coordinates into regular -*/ -//void ECCP256_GetPointProjective(IppsBigNumState* pX, -// IppsBigNumState* pY, -// IppsBigNumState* pZ, -// const IppsECCPPointState* pPoint, -// const IppsECCPState* pECC); - -void ECCP256_GetPointAffine(IppsBigNumState* pX, - IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Test is On EC -*/ -int ECCP256_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Operations -*/ -int ECCP256_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP256_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC); - -void ECCP256_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP256_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP256_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP256_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP256_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -#endif /* _PCP_ECCPMETHOD256_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod256ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod256ca.c deleted file mode 100644 index b1bb0d4b08..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod256ca.c +++ /dev/null @@ -1,879 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC methods over GF(P256) -// -// Contents: -// ECCP256_SetPointProjective() -// ECCP256_SetPointAffine() -// ECCP256_GetPointAffine() -// -// ECCP256_IsPointOnCurve() -// -// ECCP256_ComparePoint() -// ECCP256_NegPoint() -// ECCP256_DblPoint() -// ECCP256_AddPoint() -// ECCP256_MulPoint() -// ECCP256_ProdPoint() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_256_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" -#include "pcpeccpmethod256.h" -#include "pcppma256.h" - -/* - NOTE: - ECCP256 methods are used representation of point coordinates - in regular (usual residue) domain, because of special modular reduction -*/ -static -ECCP_METHOD ECCP256 = { - ECCP256_SetPointProjective, - ECCP256_SetPointAffine, - ECCP256_GetPointAffine, - - ECCP256_IsPointOnCurve, - - ECCP256_ComparePoint, - ECCP256_NegPoint, - ECCP256_DblPoint, - ECCP256_AddPoint, - ECCP256_MulPoint, - ECCP256_MulBasePoint, - ECCP256_ProdPoint -}; - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP256_Methods(void) -{ - return &ECCP256; -} - -/* -// ECCP256_PoinSettProjective -// Converts regular projective triplet (pX,pY,pZ) into pPoint -// (see note above) -*/ -void ECCP256_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(ECP_POINT_X(pPoint), pX); - cpBN_copy(ECP_POINT_Y(pPoint), pY); - cpBN_copy(ECP_POINT_Z(pPoint), pZ); - ECP_POINT_AFFINE(pPoint) = cpBN_cmp(pZ, BN_ONE_REF())==0; -} - -/* -// ECCP256_PointAffineSet -// Converts regular affine pair (pX,pY) into pPoint -*/ -void ECCP256_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - ECCP256_SetPointProjective(pX, pY, BN_ONE_REF(), pPoint, pECC); -} - -/* -// ECCP256_GetPointProjective -// Converts pPoint into regular projective triplet (pX,pY,pZ) -*/ -#if 0 -void ECCP256_GetPointProjective(IppsBigNumState* pX, - IppsBigNumState* pY, - IppsBigNumState* pZ, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(pX, ECP_POINT_X(pPoint)); - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - cpBN_copy(pZ, ECP_POINT_Z(pPoint)); -} -#endif - -/* -// ECCP256_GetPointAffine -// -// Converts pPoint into regular affine pair (pX,pY) -// -// Note: -// pPoint is not point at Infinity -// transform (X, Y, Z) into (x, y) = (X/Z^2, Y/Z^3) -*/ -void ECCP256_GetPointAffine(IppsBigNumState* pX, IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* case Z == 1 */ - if( ECP_POINT_AFFINE(pPoint) ) { - if(pX) { - cpBN_copy(pX, ECP_POINT_X(pPoint)); - } - if(pY) { - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - } - } - - /* case Z != 1 */ - else { - //IppsMontState* pMont = ECP_PMONT(pECC); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - IppsBigNumState* pT = cpBigNumListGet(&pList); - IppsBigNumState* pU = cpBigNumListGet(&pList); - //IppsBigNumState* pModulo = cpBigNumListGet(&pList); - //BN_Set(MNT_MODULUS(pMont), MNT_SIZE(pMont), pModulo); - - /* U = 1/Z */ - PMA256_inv(pU, ECP_POINT_Z(pPoint), pModulo); - /* T = 1/(Z^2) */ - PMA256_sqr(pT, pU); - - if(pX) { - PMA256_mul(pX,pT, ECP_POINT_X(pPoint)); - cpBN_fix(pX); - } - if(pY) { - /* U = 1/(Z^3) */ - PMA256_mul(pU, pU, pT); - PMA256_mul(pY,pU, ECP_POINT_Y(pPoint)); - cpBN_fix(pY); - } - } -} - -/* -// ECCP256_IsPointOnCurve -// -// Test point is lie on curve -// -// Note -// We deal with equation: y^2 = x^3 + A*x + B. -// Or in projective coordinates: Y^2 = X^3 + a*X*Z^4 + b*Z^6. -// The point under test is given by projective triplet (X,Y,Z), -// which represents actually (x,y) = (X/Z^2,Y/Z^3). -*/ -int ECCP256_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* let think Infinity point is on the curve */ - if( ECCP_IsPointAtInfinity(pPoint) ) - return 1; - - else { - IppsBigNumState* pR = cpBigNumListGet(&pList); - IppsBigNumState* pT = cpBigNumListGet(&pList); - - PMA256_sqr(pR, ECP_POINT_X(pPoint)); // R = X^3 - PMA256_mul(pR, pR, ECP_POINT_X(pPoint)); - - /* case Z != 1 */ - if( !ECP_POINT_AFFINE(pPoint) ) { - IppsBigNumState* pZ4 = cpBigNumListGet(&pList); - IppsBigNumState* pZ6 = cpBigNumListGet(&pList); - PMA256_sqr(pT, ECP_POINT_Z(pPoint)); // Z^2 - PMA256_sqr(pZ4, pT); // Z^4 - PMA256_mul(pZ6, pZ4, pT); // Z^6 - - PMA256_mul(pT, pZ4, ECP_POINT_X(pPoint)); // T = X*Z^4 - if( ECP_AMI3(pECC) ) { - IppsBigNumState* pU = cpBigNumListGet(&pList); - PMA256_add(pU, pT, pT); // R = X^3 +a*X*Z^4 - PMA256_add(pU, pU, pT); - PMA256_sub(pR, pR, pU); - } - else { - PMA256_mul(pT, pT, ECP_A(pECC)); // R = X^3 +a*X*Z^4 - PMA256_add(pR, pR, pT); - } - PMA256_mul(pT, pZ6, ECP_B(pECC)); // R = X^3 +a*X*Z^4 + b*Z^6 - PMA256_add(pR, pR, pT); - - } - /* case Z == 1 */ - else { - if( ECP_AMI3(pECC) ) { - PMA256_add(pT, ECP_POINT_X(pPoint), ECP_POINT_X(pPoint)); // R = X^3 +a*X - PMA256_add(pT, pT, ECP_POINT_X(pPoint)); - PMA256_sub(pR, pR, pT); - } - else { - PMA256_mul(pT, ECP_POINT_X(pPoint), ECP_A(pECC)); // R = X^3 +a*X - PMA256_add(pR, pR, pT); - } - PMA256_add(pR, pR, ECP_B(pECC)); // R = X^3 +a*X + b - } - PMA256_sqr(pT, ECP_POINT_Y(pPoint)); // T = Y^2 - return 0==cpBN_cmp(pR, pT); - } -} - -/* -// ECCP256_ComparePoint -// -// Compare two points: -// returns 0 => pP==pQ (maybe both pP and pQ are at Infinity) -// returns 1 => pP!=pQ -// -// Note -// In general we check: -// P_X*Q_Z^2 ~ Q_X*P_Z^2 -// P_Y*Q_Z^3 ~ Q_Y*P_Z^3 -*/ -int ECCP256_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - UNREFERENCED_PARAMETER(pECC); - - /* P or/and Q at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - return ECCP_IsPointAtInfinity(pQ)? 0:1; - if( ECCP_IsPointAtInfinity(pQ) ) - return ECCP_IsPointAtInfinity(pP)? 0:1; - - /* (P_Z==1) && (Q_Z==1) */ - if( ECP_POINT_AFFINE(pP) && ECP_POINT_AFFINE(pQ) ) - return ((0==cpBN_cmp(ECP_POINT_X(pP),ECP_POINT_X(pQ))) && (0==cpBN_cmp(ECP_POINT_Y(pP),ECP_POINT_Y(pQ))))? 0:1; - - { - IppsBigNumState* pPtmp = cpBigNumListGet(&pList); - IppsBigNumState* pQtmp = cpBigNumListGet(&pList); - IppsBigNumState* pPZ = cpBigNumListGet(&pList); - IppsBigNumState* pQZ = cpBigNumListGet(&pList); - - /* P_X*Q_Z^2 ~ Q_X*P_Z^2 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA256_sqr(pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_X*Q_Z^2 */ - PMA256_mul(pPtmp, ECP_POINT_X(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_X(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA256_sqr(pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_X*P_Z^2 */ - PMA256_mul(pQtmp, ECP_POINT_X(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_X(pQ)); - } - if ( cpBN_cmp(pPtmp, pQtmp) ) - return 1; /* points are different: (P_X*Q_Z^2) != (Q_X*P_Z^2) */ - - /* P_Y*Q_Z^3 ~ Q_Y*P_Z^3 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA256_mul(pQZ, pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_Y*Q_Z^3 */ - PMA256_mul(pPtmp, ECP_POINT_Y(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_Y(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA256_mul(pPZ, pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_Y*P_Z^3 */ - PMA256_mul(pQtmp, ECP_POINT_Y(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_Y(pQ)); - } - return cpBN_cmp(pPtmp, pQtmp)? 1:0; - } -} - -/* -// ECCP256_NegPoint -// -// Negative point -*/ -void ECCP256_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - - /* test point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - BNU_CHUNK_T* pRy = BN_NUMBER(ECP_POINT_Y(pR)); - BNU_CHUNK_T* pPy = BN_NUMBER(ECP_POINT_Y(pP)); - int size = LEN_P256; - - if( pP!=pR ) { - PMA_set(ECP_POINT_X(pR), ECP_POINT_X(pP)); - PMA_set(ECP_POINT_Z(pR), ECP_POINT_Z(pP)); - ECP_POINT_AFFINE(pR) = ECP_POINT_AFFINE(pP); - } - cpSub_BNU(pRy, (BNU_CHUNK_T*)secp256r1_p, pPy, LEN_P256); - FIX_BNU(pRy,size); - BN_SIZE(ECP_POINT_Y(pR)) = size; - BN_SIGN(ECP_POINT_Y(pR)) = ippBigNumPOS; - } -} - -/* -// ECCP256_DblPoint -// -// Double point -*/ -void ECCP256_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P at infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsBigNumState* bnV = cpBigNumListGet(&pList); - IppsBigNumState* bnU = cpBigNumListGet(&pList); - IppsBigNumState* bnM = cpBigNumListGet(&pList); - IppsBigNumState* bnS = cpBigNumListGet(&pList); - IppsBigNumState* bnT = cpBigNumListGet(&pList); - - /* M = 3*X^2 + A*Z^4 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA256_sqr(bnU, ECP_POINT_X(pP)); - PMA256_add(bnM, bnU, bnU); - PMA256_add(bnM, bnM, bnU); - PMA256_add(bnM, bnM, ECP_A(pECC)); - } - else if( ECP_AMI3(pECC) ) { - PMA256_sqr(bnU, ECP_POINT_Z(pP)); - PMA256_add(bnS, ECP_POINT_X(pP), bnU); - PMA256_sub(bnT, ECP_POINT_X(pP), bnU); - PMA256_mul(bnM, bnS, bnT); - PMA256_add(bnU, bnM, bnM); - PMA256_add(bnM, bnU, bnM); - } - else { - PMA256_sqr(bnU, ECP_POINT_X(pP)); - PMA256_add(bnM, bnU, bnU); - PMA256_add(bnM, bnM, bnU); - PMA256_sqr(bnU, ECP_POINT_Z(pP)); - PMA256_sqr(bnU, bnU); - PMA256_mul(bnU, bnU, ECP_A(pECC)); - PMA256_add(bnM, bnM, bnU); - } - - PMA256_add(bnV, ECP_POINT_Y(pP), ECP_POINT_Y(pP)); - - /* R_Z = 2*Y*Z */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnV); - } - else { - PMA256_mul(ECP_POINT_Z(pR), bnV, ECP_POINT_Z(pP)); - } - - /* S = 4*X*Y^2 */ - PMA256_sqr(bnT, bnV); - PMA256_mul(bnS, bnT, ECP_POINT_X(pP)); - - /* R_X = M^2 - 2*S */ - PMA256_sqr(bnU, bnM); - PMA256_sub(bnU, bnU, bnS); - PMA256_sub(ECP_POINT_X(pR), bnU, bnS); - - /* T = 8*Y^4 */ - PMA256_mul(bnV, bnV, ECP_POINT_Y(pP)); - PMA256_mul(bnT, bnT, bnV); - - /* R_Y = M*(S - R_X) - T */ - PMA256_sub(bnS, bnS, ECP_POINT_X(pR)); - PMA256_mul(bnS, bnS, bnM); - PMA256_sub(ECP_POINT_Y(pR), bnS, bnT); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP256_AddPoint -// -// Add points -*/ -void ECCP256_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ -#if 0 - /* test stupid call */ - if( pP == pQ ) { - ECCP256_DblPoint(pP, pR, pECC, pList); - return; - } -#endif - - /* prevent operation with point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) { - ECCP_CopyPoint(pQ, pR); - return; - } - if( ECCP_IsPointAtInfinity(pQ) ) { - ECCP_CopyPoint(pP, pR); - return; - } - - /* - // addition - */ - { - IppsBigNumState* bnU0 = cpBigNumListGet(&pList); - IppsBigNumState* bnS0 = cpBigNumListGet(&pList); - IppsBigNumState* bnU1 = cpBigNumListGet(&pList); - IppsBigNumState* bnS1 = cpBigNumListGet(&pList); - IppsBigNumState* bnW = cpBigNumListGet(&pList); - IppsBigNumState* bnR = cpBigNumListGet(&pList); - IppsBigNumState *bnT = bnU0; - IppsBigNumState *bnM = bnS0; - - /* U0 = P_X * Q_Z^2 */ - /* S0 = P_Y * Q_Z^3 */ - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU0, ECP_POINT_X(pP)); - PMA_set(bnS0, ECP_POINT_Y(pP)); - } - else { - PMA256_sqr(bnW, ECP_POINT_Z(pQ)); - PMA256_mul(bnU0,ECP_POINT_X(pP), bnW); - PMA256_mul(bnW, ECP_POINT_Z(pQ), bnW); - PMA256_mul(bnS0,ECP_POINT_Y(pP), bnW); - } - - /* U1 = Q_X * P_Z^2 */ - /* S1 = Q_Y * P_Z^3 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_X(pQ)); - PMA_set(bnS1, ECP_POINT_Y(pQ)); - } - else { - PMA256_sqr(bnW, ECP_POINT_Z(pP)); - PMA256_mul(bnU1,ECP_POINT_X(pQ), bnW); - PMA256_mul(bnW, ECP_POINT_Z(pP), bnW); - PMA256_mul(bnS1,ECP_POINT_Y(pQ), bnW); - } - - /* W = U0-U1 */ - /* R = S0-S1 */ - PMA256_sub(bnW, bnU0, bnU1); - PMA256_sub(bnR, bnS0, bnS1); - - //if( IsZero_BN(bnW) ) { - //if( IsZero_BN(bnR) ) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnW), LEN_P256, 0)) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnR), LEN_P256, 0)) { - ECCP256_DblPoint(pP, pR, pECC, pList); - return; - } - else { - ECCP_SetPointToInfinity(pR); - return; - } - } - - /* T = U0+U1 */ - /* M = S0+S1 */ - PMA256_add(bnT, bnU0, bnU1); - PMA256_add(bnM, bnS0, bnS1); - - /* R_Z = P_Z * Q_Z * W */ - if( ECP_POINT_AFFINE(pQ) && ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnW); - } - else { - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU1, ECP_POINT_Z(pP)); - } - else if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_Z(pQ)); - } - else { - PMA256_mul(bnU1, ECP_POINT_Z(pP), ECP_POINT_Z(pQ)); - } - PMA256_mul(ECP_POINT_Z(pR), bnU1, bnW); - } - - PMA256_sqr(bnU1, bnW); /* U1 = W^2 */ - PMA256_mul(bnS1, bnT, bnU1); /* S1 = T * W^2 */ - - /* R_X = R^2 - T * W^2 */ - PMA256_sqr(ECP_POINT_X(pR), bnR); - PMA256_sub(ECP_POINT_X(pR), ECP_POINT_X(pR), bnS1); - - /* V = T * W^2 - 2 * R_X (S1) */ - PMA256_sub(bnS1, bnS1, ECP_POINT_X(pR)); - PMA256_sub(bnS1, bnS1, ECP_POINT_X(pR)); - - /* R_Y = (V * R - M * W^3) /2 */ - PMA256_mul(ECP_POINT_Y(pR), bnS1, bnR); - PMA256_mul(bnU1, bnU1, bnW); - PMA256_mul(bnU1, bnU1, bnM); - PMA256_sub(bnU1, ECP_POINT_Y(pR), bnU1); - PMA256_div2(ECP_POINT_Y(pR), bnU1); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP256_MulPoint -// -// Multiply point by scalar -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP256_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - IppsECCPPointState T; - IppsECCPPointState U; - IppsBigNumState* bnKH = cpBigNumListGet(&pList); - Ipp32u* pK; - Ipp32u* pH; - Ipp32u carry; - int lenKH; - int bitH; - - /* init result */ - ECCP_CopyPoint(pP, pR); - - /* if scalar is negative */ - if( ippBigNumNEG == BN_SIGN(bnN) ) { - /* negative R */ - ECCP256_NegPoint(pR, pR, pECC); - } - - /* copy K = N and compute H=3*K */ - lenKH = BN_SIZE(bnN)+1; - pK = BN_NUMBER(bnKH); - pH = BN_BUFFER(bnKH); - Cpy_BNU(BN_NUMBER(bnN), pK, BN_SIZE(bnN)); - pK[lenKH-1] = 0; - carry = cpAdd_BNU(pH, pK, pK, lenKH); - carry = cpAdd_BNU(pH, pK, pH, lenKH); - - /* init temporary T = (X/Z^2, Y/Z^3, 1) */ - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - ECCP256_GetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), pR, pECC, pList); - ECCP256_SetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), &T, pECC); - - /* temporary point U =-T */ - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - ECCP256_NegPoint(&T, &U, pECC); - - for(bitH=MSB_BNU(pH, lenKH)-1; bitH>0; bitH--) { - int hBit = TST_BIT(pH, bitH); - int kBit = TST_BIT(pK, bitH); - ECCP256_DblPoint(pR, pR, pECC, pList); - if( hBit && !kBit ) - ECCP256_AddPoint(pR, &T, pR, pECC, pList); - if(!hBit && kBit ) - ECCP256_AddPoint(pR, &U, pR, pECC, pList); - } - } -} - -#else -#pragma message ("ECCP256_MulPoint: SCCM version") - -void ECCP256_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - Ipp8u* pScratchAligned = ECP_SCCMBUFF(pECC); - - BNU_CHUNK_T* pN = BN_NUMBER(bnN); - cpSize nsN = BN_SIZE(bnN); - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int w = cpECCP_OptimalWinSize(scalarBitSize); - /* number of table entries */ - int nPrecomputed = 1<>shift) & dmask; - - /* initialize result (ECP_FINITE_POINT|ECP_PROJECTIVE) */ - cpECCP_ScrambleGet(pR, coordSize, pScratchAligned+windowVal, nPrecomputed); - ECP_POINT_AFFINE(pR) = 0; - - /* initialize temporary T (ECP_PROJECTIVE) */ - ECP_POINT_AFFINE(&T) = 0; - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - /* w times doubling */ - int k; - for(k=0; k>shift) & dmask; - - /* extract value from the pre-computed table */ - cpECCP_ScrambleGet(&T, coordSize, pScratchAligned+windowVal, nPrecomputed); - - /* and add it */ - ECCP256_AddPoint(pR, &T, pR, pECC, pList); - } - } - } -} -#endif - -void ECCP256_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - ECCP256_MulPoint(ECP_GENC(pECC), pK, pR, pECC, pList); -} - -/* -// ECCP256_ProdPoint -// -// Point product -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP256_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalars */ - if( IsZero_BN(bnPscalar) ) { - ECCP256_MulPoint(pQ, bnQscalar, pR, pECC, pList); - return; - } - if( IsZero_BN(bnQscalar) ) { - ECCP256_MulPoint(pP, bnPscalar, pR, pECC, pList); - return; - } - - /* - // point product - */ - else { - int n; - Ipp32u* pbnPscalar = BN_NUMBER(bnPscalar); - int bnPscalarSize = BN_SIZE(bnPscalar); - Ipp32u* pbnQscalar = BN_NUMBER(bnQscalar); - int bnQscalarSize = BN_SIZE(bnQscalar); - - int size = bnPscalarSize>bnQscalarSize? bnPscalarSize : bnQscalarSize; - - IppsECCPPointState* pPointPQ[4] = {NULL, NULL, NULL, NULL}; - - /* allocate temporary PQ point */ - IppsECCPPointState PQ; - ECP_POINT_X(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Y(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Z(&PQ) = cpBigNumListGet(&pList); - - /* init temporary point array */ - if(ippBigNumPOS == BN_SIGN(bnPscalar)) - pPointPQ[1] = (IppsECCPPointState*)pP; - else { - IppsECCPPointState P; - ECP_POINT_X(&P) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P) = cpBigNumListGet(&pList); - ECCP256_NegPoint(pP, &P, pECC); - pPointPQ[1] = &P; - } - if(ippBigNumPOS == BN_SIGN(bnQscalar)) - pPointPQ[2] = (IppsECCPPointState*)pQ; - else { - IppsECCPPointState Q; - ECP_POINT_X(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Y(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Z(&Q) = cpBigNumListGet(&pList); - ECCP256_NegPoint(pQ, &Q, pECC); - pPointPQ[2] = &Q; - } - - ECCP256_AddPoint(pPointPQ[1], pPointPQ[2], &PQ, pECC, pList); - ECCP256_GetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC, pList); - ECCP256_SetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC); - pPointPQ[3] = &PQ; - - /* pad scalars by zeros */ - ZEXPAND_BNU(pbnPscalar,bnPscalarSize, size); - ZEXPAND_BNU(pbnQscalar,bnQscalarSize, size); - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=size; n>0; n--) { - Ipp32u scalarPn = pbnPscalar[n-1]; - Ipp32u scalarQn = pbnQscalar[n-1]; - - int nBit; - for(nBit=31; nBit>=0; nBit--) { - int - PnQnBits = scalarPn&0x80000000? 1:0; - PnQnBits+= scalarQn&0x80000000? 2:0; - - if( !ECCP_IsPointAtInfinity(pR) ) - ECCP256_DblPoint(pR, pR, pECC, pList); - if( PnQnBits ) - ECCP256_AddPoint(pR, pPointPQ[PnQnBits], pR, pECC, pList); - - scalarPn <<= 1; - scalarQn <<= 1; - } - } - } -} - -#else -#pragma message ("ECCP256_ProdPoint: SCCM version") - -void ECCP256_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsECCPPointState T; - IppsECCPPointState U; - - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - - ECCP256_MulPoint(pP, bnPscalar, &T, (IppsECCPState*)pECC, pList); - ECCP256_MulPoint(pQ, bnQscalar, &U, (IppsECCPState*)pECC, pList); - ECCP256_AddPoint(&T, &U, pR, pECC, pList); -} -#endif - -#endif /* _ECP_256_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod384.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod384.h deleted file mode 100644 index 6fab894565..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod384.h +++ /dev/null @@ -1,118 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Definitions of EC methods over GF(P384) -// -// -*/ - -#if !defined(_PCP_ECCPMETHOD384_H) -#define _PCP_ECCPMETHOD384_H - -#include "pcpeccp.h" - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP384_Methods(void); - - -/* -// Point Set. These operations implies -// transformation of regular coordinates into internal format -*/ -void ECCP384_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -void ECCP384_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -/* -// Get Point. These operations implies -// transformation of internal format coordinates into regular -*/ -//void ECCP384_GetPointProjective(IppsBigNumState* pX, -// IppsBigNumState* pY, -// IppsBigNumState* pZ, -// const IppsECCPPointState* pPoint, -// const IppsECCPState* pECC); - -void ECCP384_GetPointAffine(IppsBigNumState* pX, - IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Test is On EC -*/ -int ECCP384_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Operations -*/ -int ECCP384_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP384_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC); - -void ECCP384_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP384_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP384_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP384_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP384_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -#endif /* _PCP_ECCPMETHOD384_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod384ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod384ca.c deleted file mode 100644 index 72252e8bdf..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod384ca.c +++ /dev/null @@ -1,879 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC methods over GF(P384) -// -// Contents: -// ECCP384_SetPointProjective() -// ECCP384_SetPointAffine() -// ECCP384_GetPointAffine() -// -// ECCP384_IsPointOnCurve() -// -// ECCP384_ComparePoint() -// ECCP384_NegPoint() -// ECCP384_DblPoint() -// ECCP384_AddPoint() -// ECCP384_MulPoint() -// ECCP384_ProdPoint() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_384_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" -#include "pcpeccpmethod384.h" -#include "pcppma384.h" - -/* - NOTE: - ECCP384 methods are used representation of point coordinates - in regular (usual residue) domain, because of special modular reduction -*/ -static -ECCP_METHOD ECCP384 = { - ECCP384_SetPointProjective, - ECCP384_SetPointAffine, - ECCP384_GetPointAffine, - - ECCP384_IsPointOnCurve, - - ECCP384_ComparePoint, - ECCP384_NegPoint, - ECCP384_DblPoint, - ECCP384_AddPoint, - ECCP384_MulPoint, - ECCP384_MulBasePoint, - ECCP384_ProdPoint -}; - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP384_Methods(void) -{ - return &ECCP384; -} - -/* -// ECCP384_PoinSettProjective -// Converts regular projective triplet (pX,pY,pZ) into pPoint -// (see note above) -*/ -void ECCP384_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(ECP_POINT_X(pPoint), pX); - cpBN_copy(ECP_POINT_Y(pPoint), pY); - cpBN_copy(ECP_POINT_Z(pPoint), pZ); - ECP_POINT_AFFINE(pPoint) = cpBN_cmp(pZ, BN_ONE_REF())==0; -} - -/* -// ECCP384_PointAffineSet -// Converts regular affine pair (pX,pY) into pPoint -*/ -void ECCP384_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - ECCP384_SetPointProjective(pX, pY, BN_ONE_REF(), pPoint, pECC); -} - -/* -// ECCP384_GetPointProjective -// Converts pPoint into regular projective triplet (pX,pY,pZ) -*/ -#if 0 -void ECCP384_GetPointProjective(IppsBigNumState* pX, - IppsBigNumState* pY, - IppsBigNumState* pZ, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(pX, ECP_POINT_X(pPoint)); - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - cpBN_copy(pZ, ECP_POINT_Z(pPoint)); -} -#endif - -/* -// ECCP384_GetPointAffine -// -// Converts pPoint into regular affine pair (pX,pY) -// -// Note: -// pPoint is not point at Infinity -// transform (X, Y, Z) into (x, y) = (X/Z^2, Y/Z^3) -*/ -void ECCP384_GetPointAffine(IppsBigNumState* pX, IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* case Z == 1 */ - if( ECP_POINT_AFFINE(pPoint) ) { - if(pX) { - cpBN_copy(pX, ECP_POINT_X(pPoint)); - } - if(pY) { - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - } - } - - /* case Z != 1 */ - else { - //IppsMontState* pMont = ECP_PMONT(pECC); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - IppsBigNumState* pT = cpBigNumListGet(&pList); - IppsBigNumState* pU = cpBigNumListGet(&pList); - //IppsBigNumState* pModulo = cpBigNumListGet(&pList); - //BN_Set(MNT_MODULUS(pMont), MNT_SIZE(pMont), pModulo); - - /* U = 1/Z */ - PMA384_inv(pU, ECP_POINT_Z(pPoint), pModulo); - /* T = 1/(Z^2) */ - PMA384_sqr(pT, pU); - - if(pX) { - PMA384_mul(pX,pT, ECP_POINT_X(pPoint)); - cpBN_fix(pX); - } - if(pY) { - /* U = 1/(Z^3) */ - PMA384_mul(pU, pU, pT); - PMA384_mul(pY,pU, ECP_POINT_Y(pPoint)); - cpBN_fix(pY); - } - } -} - -/* -// ECCP384_IsPointOnCurve -// -// Test point is lie on curve -// -// Note -// We deal with equation: y^2 = x^3 + A*x + B. -// Or in projective coordinates: Y^2 = X^3 + a*X*Z^4 + b*Z^6. -// The point under test is given by projective triplet (X,Y,Z), -// which represents actually (x,y) = (X/Z^2,Y/Z^3). -*/ -int ECCP384_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* let think Infinity point is on the curve */ - if( ECCP_IsPointAtInfinity(pPoint) ) - return 1; - - else { - IppsBigNumState* pR = cpBigNumListGet(&pList); - IppsBigNumState* pT = cpBigNumListGet(&pList); - - PMA384_sqr(pR, ECP_POINT_X(pPoint)); // R = X^3 - PMA384_mul(pR, pR, ECP_POINT_X(pPoint)); - - /* case Z != 1 */ - if( !ECP_POINT_AFFINE(pPoint) ) { - IppsBigNumState* pZ4 = cpBigNumListGet(&pList); - IppsBigNumState* pZ6 = cpBigNumListGet(&pList); - PMA384_sqr(pT, ECP_POINT_Z(pPoint)); // Z^2 - PMA384_sqr(pZ4, pT); // Z^4 - PMA384_mul(pZ6, pZ4, pT); // Z^6 - - PMA384_mul(pT, pZ4, ECP_POINT_X(pPoint)); // T = X*Z^4 - if( ECP_AMI3(pECC) ) { - IppsBigNumState* pU = cpBigNumListGet(&pList); - PMA384_add(pU, pT, pT); // R = X^3 +a*X*Z^4 - PMA384_add(pU, pU, pT); - PMA384_sub(pR, pR, pU); - } - else { - PMA384_mul(pT, pT, ECP_A(pECC)); // R = X^3 +a*X*Z^4 - PMA384_add(pR, pR, pT); - } - PMA384_mul(pT, pZ6, ECP_B(pECC)); // R = X^3 +a*X*Z^4 + b*Z^6 - PMA384_add(pR, pR, pT); - - } - /* case Z == 1 */ - else { - if( ECP_AMI3(pECC) ) { - PMA384_add(pT, ECP_POINT_X(pPoint), ECP_POINT_X(pPoint)); // R = X^3 +a*X - PMA384_add(pT, pT, ECP_POINT_X(pPoint)); - PMA384_sub(pR, pR, pT); - } - else { - PMA384_mul(pT, ECP_POINT_X(pPoint), ECP_A(pECC)); // R = X^3 +a*X - PMA384_add(pR, pR, pT); - } - PMA384_add(pR, pR, ECP_B(pECC)); // R = X^3 +a*X + b - } - PMA384_sqr(pT, ECP_POINT_Y(pPoint)); // T = Y^2 - return 0==cpBN_cmp(pR, pT); - } -} - -/* -// ECCP384_ComparePoint -// -// Compare two points: -// returns 0 => pP==pQ (maybe both pP and pQ are at Infinity) -// returns 1 => pP!=pQ -// -// Note -// In general we check: -// P_X*Q_Z^2 ~ Q_X*P_Z^2 -// P_Y*Q_Z^3 ~ Q_Y*P_Z^3 -*/ -int ECCP384_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - UNREFERENCED_PARAMETER(pECC); - - /* P or/and Q at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - return ECCP_IsPointAtInfinity(pQ)? 0:1; - if( ECCP_IsPointAtInfinity(pQ) ) - return ECCP_IsPointAtInfinity(pP)? 0:1; - - /* (P_Z==1) && (Q_Z==1) */ - if( ECP_POINT_AFFINE(pP) && ECP_POINT_AFFINE(pQ) ) - return ((0==cpBN_cmp(ECP_POINT_X(pP),ECP_POINT_X(pQ))) && (0==cpBN_cmp(ECP_POINT_Y(pP),ECP_POINT_Y(pQ))))? 0:1; - - { - IppsBigNumState* pPtmp = cpBigNumListGet(&pList); - IppsBigNumState* pQtmp = cpBigNumListGet(&pList); - IppsBigNumState* pPZ = cpBigNumListGet(&pList); - IppsBigNumState* pQZ = cpBigNumListGet(&pList); - - /* P_X*Q_Z^2 ~ Q_X*P_Z^2 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA384_sqr(pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_X*Q_Z^2 */ - PMA384_mul(pPtmp, ECP_POINT_X(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_X(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA384_sqr(pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_X*P_Z^2 */ - PMA384_mul(pQtmp, ECP_POINT_X(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_X(pQ)); - } - if ( cpBN_cmp(pPtmp, pQtmp) ) - return 1; /* points are different: (P_X*Q_Z^2) != (Q_X*P_Z^2) */ - - /* P_Y*Q_Z^3 ~ Q_Y*P_Z^3 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA384_mul(pQZ, pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_Y*Q_Z^3 */ - PMA384_mul(pPtmp, ECP_POINT_Y(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_Y(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA384_mul(pPZ, pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_Y*P_Z^3 */ - PMA384_mul(pQtmp, ECP_POINT_Y(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_Y(pQ)); - } - return cpBN_cmp(pPtmp, pQtmp)? 1:0; - } -} - -/* -// ECCP384_NegPoint -// -// Negative point -*/ -void ECCP384_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - - /* test point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - BNU_CHUNK_T* pRy = BN_NUMBER(ECP_POINT_Y(pR)); - BNU_CHUNK_T* pPy = BN_NUMBER(ECP_POINT_Y(pP)); - int size = LEN_P384; - - if( pP!=pR ) { - PMA_set(ECP_POINT_X(pR), ECP_POINT_X(pP)); - PMA_set(ECP_POINT_Z(pR), ECP_POINT_Z(pP)); - ECP_POINT_AFFINE(pR) = ECP_POINT_AFFINE(pP); - } - cpSub_BNU(pRy, (BNU_CHUNK_T*)secp384r1_p, pPy, LEN_P384); - FIX_BNU(pRy,size); - BN_SIZE(ECP_POINT_Y(pR)) = size; - BN_SIGN(ECP_POINT_Y(pR)) = ippBigNumPOS; - } -} - -/* -// ECCP384_DblPoint -// -// Double point -*/ -void ECCP384_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P at infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsBigNumState* bnV = cpBigNumListGet(&pList); - IppsBigNumState* bnU = cpBigNumListGet(&pList); - IppsBigNumState* bnM = cpBigNumListGet(&pList); - IppsBigNumState* bnS = cpBigNumListGet(&pList); - IppsBigNumState* bnT = cpBigNumListGet(&pList); - - /* M = 3*X^2 + A*Z^4 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA384_sqr(bnU, ECP_POINT_X(pP)); - PMA384_add(bnM, bnU, bnU); - PMA384_add(bnM, bnM, bnU); - PMA384_add(bnM, bnM, ECP_A(pECC)); - } - else if( ECP_AMI3(pECC) ) { - PMA384_sqr(bnU, ECP_POINT_Z(pP)); - PMA384_add(bnS, ECP_POINT_X(pP), bnU); - PMA384_sub(bnT, ECP_POINT_X(pP), bnU); - PMA384_mul(bnM, bnS, bnT); - PMA384_add(bnU, bnM, bnM); - PMA384_add(bnM, bnU, bnM); - } - else { - PMA384_sqr(bnU, ECP_POINT_X(pP)); - PMA384_add(bnM, bnU, bnU); - PMA384_add(bnM, bnM, bnU); - PMA384_sqr(bnU, ECP_POINT_Z(pP)); - PMA384_sqr(bnU, bnU); - PMA384_mul(bnU, bnU, ECP_A(pECC)); - PMA384_add(bnM, bnM, bnU); - } - - PMA384_add(bnV, ECP_POINT_Y(pP), ECP_POINT_Y(pP)); - - /* R_Z = 2*Y*Z */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnV); - } - else { - PMA384_mul(ECP_POINT_Z(pR), bnV, ECP_POINT_Z(pP)); - } - - /* S = 4*X*Y^2 */ - PMA384_sqr(bnT, bnV); - PMA384_mul(bnS, bnT, ECP_POINT_X(pP)); - - /* R_X = M^2 - 2*S */ - PMA384_sqr(bnU, bnM); - PMA384_sub(bnU, bnU, bnS); - PMA384_sub(ECP_POINT_X(pR), bnU, bnS); - - /* T = 8*Y^4 */ - PMA384_mul(bnV, bnV, ECP_POINT_Y(pP)); - PMA384_mul(bnT, bnT, bnV); - - /* R_Y = M*(S - R_X) - T */ - PMA384_sub(bnS, bnS, ECP_POINT_X(pR)); - PMA384_mul(bnS, bnS, bnM); - PMA384_sub(ECP_POINT_Y(pR), bnS, bnT); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP384_AddPoint -// -// Add points -*/ -void ECCP384_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ -#if 0 - /* test stupid call */ - if( pP == pQ ) { - ECCP384_DblPoint(pP, pR, pECC, pList); - return; - } -#endif - - /* prevent operation with point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) { - ECCP_CopyPoint(pQ, pR); - return; - } - if( ECCP_IsPointAtInfinity(pQ) ) { - ECCP_CopyPoint(pP, pR); - return; - } - - /* - // addition - */ - { - IppsBigNumState* bnU0 = cpBigNumListGet(&pList); - IppsBigNumState* bnS0 = cpBigNumListGet(&pList); - IppsBigNumState* bnU1 = cpBigNumListGet(&pList); - IppsBigNumState* bnS1 = cpBigNumListGet(&pList); - IppsBigNumState* bnW = cpBigNumListGet(&pList); - IppsBigNumState* bnR = cpBigNumListGet(&pList); - IppsBigNumState *bnT = bnU0; - IppsBigNumState *bnM = bnS0; - - /* U0 = P_X * Q_Z^2 */ - /* S0 = P_Y * Q_Z^3 */ - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU0, ECP_POINT_X(pP)); - PMA_set(bnS0, ECP_POINT_Y(pP)); - } - else { - PMA384_sqr(bnW, ECP_POINT_Z(pQ)); - PMA384_mul(bnU0,ECP_POINT_X(pP), bnW); - PMA384_mul(bnW, ECP_POINT_Z(pQ), bnW); - PMA384_mul(bnS0,ECP_POINT_Y(pP), bnW); - } - - /* U1 = Q_X * P_Z^2 */ - /* S1 = Q_Y * P_Z^3 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_X(pQ)); - PMA_set(bnS1, ECP_POINT_Y(pQ)); - } - else { - PMA384_sqr(bnW, ECP_POINT_Z(pP)); - PMA384_mul(bnU1,ECP_POINT_X(pQ), bnW); - PMA384_mul(bnW, ECP_POINT_Z(pP), bnW); - PMA384_mul(bnS1,ECP_POINT_Y(pQ), bnW); - } - - /* W = U0-U1 */ - /* R = S0-S1 */ - PMA384_sub(bnW, bnU0, bnU1); - PMA384_sub(bnR, bnS0, bnS1); - - //if( IsZero_BN(bnW) ) { - //if( IsZero_BN(bnR) ) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnW), LEN_P384, 0)) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnR), LEN_P384, 0)) { - ECCP384_DblPoint(pP, pR, pECC, pList); - return; - } - else { - ECCP_SetPointToInfinity(pR); - return; - } - } - - /* T = U0+U1 */ - /* M = S0+S1 */ - PMA384_add(bnT, bnU0, bnU1); - PMA384_add(bnM, bnS0, bnS1); - - /* R_Z = P_Z * Q_Z * W */ - if( ECP_POINT_AFFINE(pQ) && ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnW); - } - else { - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU1, ECP_POINT_Z(pP)); - } - else if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_Z(pQ)); - } - else { - PMA384_mul(bnU1, ECP_POINT_Z(pP), ECP_POINT_Z(pQ)); - } - PMA384_mul(ECP_POINT_Z(pR), bnU1, bnW); - } - - PMA384_sqr(bnU1, bnW); /* U1 = W^2 */ - PMA384_mul(bnS1, bnT, bnU1); /* S1 = T * W^2 */ - - /* R_X = R^2 - T * W^2 */ - PMA384_sqr(ECP_POINT_X(pR), bnR); - PMA384_sub(ECP_POINT_X(pR), ECP_POINT_X(pR), bnS1); - - /* V = T * W^2 - 2 * R_X (S1) */ - PMA384_sub(bnS1, bnS1, ECP_POINT_X(pR)); - PMA384_sub(bnS1, bnS1, ECP_POINT_X(pR)); - - /* R_Y = (V * R - M * W^3) /2 */ - PMA384_mul(ECP_POINT_Y(pR), bnS1, bnR); - PMA384_mul(bnU1, bnU1, bnW); - PMA384_mul(bnU1, bnU1, bnM); - PMA384_sub(bnU1, ECP_POINT_Y(pR), bnU1); - PMA384_div2(ECP_POINT_Y(pR), bnU1); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP384_MulPoint -// -// Multiply point by scalar -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP384_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - IppsECCPPointState T; - IppsECCPPointState U; - IppsBigNumState* bnKH = cpBigNumListGet(&pList); - Ipp32u* pK; - Ipp32u* pH; - Ipp32u carry; - int lenKH; - int bitH; - - /* init result */ - ECCP_CopyPoint(pP, pR); - - /* if scalar is negative */ - if( ippBigNumNEG == BN_SIGN(bnN) ) { - /* negative R */ - ECCP384_NegPoint(pR, pR, pECC); - } - - /* copy K = N and compute H=3*K */ - lenKH = BN_SIZE(bnN)+1; - pK = BN_NUMBER(bnKH); - pH = BN_BUFFER(bnKH); - Cpy_BNU(BN_NUMBER(bnN), pK, BN_SIZE(bnN)); - pK[lenKH-1] = 0; - carry = cpAdd_BNU(pH, pK, pK, lenKH); - carry = cpAdd_BNU(pH, pK, pH, lenKH); - - /* init temporary T = (X/Z^2, Y/Z^3, 1) */ - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - ECCP384_GetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), pR, pECC, pList); - ECCP384_SetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), &T, pECC); - - /* temporary point U =-T */ - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - ECCP384_NegPoint(&T, &U, pECC); - - for(bitH=MSB_BNU(pH, lenKH)-1; bitH>0; bitH--) { - int hBit = TST_BIT(pH, bitH); - int kBit = TST_BIT(pK, bitH); - ECCP384_DblPoint(pR, pR, pECC, pList); - if( hBit && !kBit ) - ECCP384_AddPoint(pR, &T, pR, pECC, pList); - if(!hBit && kBit ) - ECCP384_AddPoint(pR, &U, pR, pECC, pList); - } - } -} - -#else -#pragma message ("ECCP384_MulPoint: SCCM version") - -void ECCP384_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - Ipp8u* pScratchAligned = ECP_SCCMBUFF(pECC); - - BNU_CHUNK_T* pN = BN_NUMBER(bnN); - cpSize nsN = BN_SIZE(bnN); - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int w = cpECCP_OptimalWinSize(scalarBitSize); - /* number of table entries */ - int nPrecomputed = 1<>shift) & dmask; - - /* initialize result (ECP_FINITE_POINT|ECP_PROJECTIVE) */ - cpECCP_ScrambleGet(pR, coordSize, pScratchAligned+windowVal, nPrecomputed); - ECP_POINT_AFFINE(pR) = 0; - - /* initialize temporary T (ECP_PROJECTIVE) */ - ECP_POINT_AFFINE(&T) = 0; - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - /* w times doubling */ - int k; - for(k=0; k>shift) & dmask; - - /* extract value from the pre-computed table */ - cpECCP_ScrambleGet(&T, coordSize, pScratchAligned+windowVal, nPrecomputed); - - /* and add it */ - ECCP384_AddPoint(pR, &T, pR, pECC, pList); - } - } - } -} -#endif - -void ECCP384_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - ECCP384_MulPoint(ECP_GENC(pECC), pK, pR, pECC, pList); -} - -/* -// ECCP384_ProdPoint -// -// Point product -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP384_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalars */ - if( IsZero_BN(bnPscalar) ) { - ECCP384_MulPoint(pQ, bnQscalar, pR, pECC, pList); - return; - } - if( IsZero_BN(bnQscalar) ) { - ECCP384_MulPoint(pP, bnPscalar, pR, pECC, pList); - return; - } - - /* - // point product - */ - else { - int n; - Ipp32u* pbnPscalar = BN_NUMBER(bnPscalar); - int bnPscalarSize = BN_SIZE(bnPscalar); - Ipp32u* pbnQscalar = BN_NUMBER(bnQscalar); - int bnQscalarSize = BN_SIZE(bnQscalar); - - int size = bnPscalarSize>bnQscalarSize? bnPscalarSize : bnQscalarSize; - - IppsECCPPointState* pPointPQ[4] = {NULL, NULL, NULL, NULL}; - - /* allocate temporary PQ point */ - IppsECCPPointState PQ; - ECP_POINT_X(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Y(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Z(&PQ) = cpBigNumListGet(&pList); - - /* init temporary point array */ - if(ippBigNumPOS == BN_SIGN(bnPscalar)) - pPointPQ[1] = (IppsECCPPointState*)pP; - else { - IppsECCPPointState P; - ECP_POINT_X(&P) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P) = cpBigNumListGet(&pList); - ECCP384_NegPoint(pP, &P, pECC); - pPointPQ[1] = &P; - } - if(ippBigNumPOS == BN_SIGN(bnQscalar)) - pPointPQ[2] = (IppsECCPPointState*)pQ; - else { - IppsECCPPointState Q; - ECP_POINT_X(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Y(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Z(&Q) = cpBigNumListGet(&pList); - ECCP384_NegPoint(pQ, &Q, pECC); - pPointPQ[2] = &Q; - } - - ECCP384_AddPoint(pPointPQ[1], pPointPQ[2], &PQ, pECC, pList); - ECCP384_GetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC, pList); - ECCP384_SetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC); - pPointPQ[3] = &PQ; - - /* pad scalars by zeros */ - ZEXPAND_BNU(pbnPscalar,bnPscalarSize, size); - ZEXPAND_BNU(pbnQscalar,bnQscalarSize, size); - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=size; n>0; n--) { - Ipp32u scalarPn = pbnPscalar[n-1]; - Ipp32u scalarQn = pbnQscalar[n-1]; - - int nBit; - for(nBit=31; nBit>=0; nBit--) { - int - PnQnBits = scalarPn&0x80000000? 1:0; - PnQnBits+= scalarQn&0x80000000? 2:0; - - if( !ECCP_IsPointAtInfinity(pR) ) - ECCP384_DblPoint(pR, pR, pECC, pList); - if( PnQnBits ) - ECCP384_AddPoint(pR, pPointPQ[PnQnBits], pR, pECC, pList); - - scalarPn <<= 1; - scalarQn <<= 1; - } - } - } -} - -#else -#pragma message ("ECCP384_ProdPoint: SCCM version") - -void ECCP384_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsECCPPointState T; - IppsECCPPointState U; - - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - - ECCP384_MulPoint(pP, bnPscalar, &T, (IppsECCPState*)pECC, pList); - ECCP384_MulPoint(pQ, bnQscalar, &U, (IppsECCPState*)pECC, pList); - ECCP384_AddPoint(&T, &U, pR, pECC, pList); -} -#endif - -#endif /* _ECP_384_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod521.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod521.h deleted file mode 100644 index d931bc6d17..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod521.h +++ /dev/null @@ -1,118 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Definitions of EC methods over GF(P521) -// -// -*/ - -#if !defined(_PCP_ECCPMETHOD521_H) -#define _PCP_ECCPMETHOD521_H - -#include "pcpeccp.h" - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP521_Methods(void); - - -/* -// Point Set. These operations implies -// transformation of regular coordinates into internal format -*/ -void ECCP521_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -void ECCP521_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -/* -// Get Point. These operations implies -// transformation of internal format coordinates into regular -*/ -//void ECCP521_GetPointProjective(IppsBigNumState* pX, -// IppsBigNumState* pY, -// IppsBigNumState* pZ, -// const IppsECCPPointState* pPoint, -// const IppsECCPState* pECC); - -void ECCP521_GetPointAffine(IppsBigNumState* pX, - IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Test is On EC -*/ -int ECCP521_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Operations -*/ -int ECCP521_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP521_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC); - -void ECCP521_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP521_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP521_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP521_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP521_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -#endif /* _PCP_ECCPMETHOD521_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod521ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod521ca.c deleted file mode 100644 index 0bc7c59c96..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethod521ca.c +++ /dev/null @@ -1,879 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC methods over GF(P521) -// -// Contents: -// ECCP521_SetPointProjective() -// ECCP521_SetPointAffine() -// ECCP521_GetPointAffine() -// -// ECCP521_IsPointOnCurve() -// -// ECCP521_ComparePoint() -// ECCP521_NegPoint() -// ECCP521_DblPoint() -// ECCP521_AddPoint() -// ECCP521_MulPoint() -// ECCP521_ProdPoint() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_521_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" -#include "pcpeccpmethod521.h" -#include "pcppma521.h" - -/* - NOTE: - ECCP521 methods are used representation of point coordinates - in regular (usual residue) domain, because of special modular reduction -*/ -static -ECCP_METHOD ECCP521 = { - ECCP521_SetPointProjective, - ECCP521_SetPointAffine, - ECCP521_GetPointAffine, - - ECCP521_IsPointOnCurve, - - ECCP521_ComparePoint, - ECCP521_NegPoint, - ECCP521_DblPoint, - ECCP521_AddPoint, - ECCP521_MulPoint, - ECCP521_MulBasePoint, - ECCP521_ProdPoint -}; - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP521_Methods(void) -{ - return &ECCP521; -} - -/* -// ECCP521_PoinSettProjective -// Converts regular projective triplet (pX,pY,pZ) into pPoint -// (see note above) -*/ -void ECCP521_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(ECP_POINT_X(pPoint), pX); - cpBN_copy(ECP_POINT_Y(pPoint), pY); - cpBN_copy(ECP_POINT_Z(pPoint), pZ); - ECP_POINT_AFFINE(pPoint) = cpBN_cmp(pZ, BN_ONE_REF())==0; -} - -/* -// ECCP521_PointAffineSet -// Converts regular affine pair (pX,pY) into pPoint -*/ -void ECCP521_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - ECCP521_SetPointProjective(pX, pY, BN_ONE_REF(), pPoint, pECC); -} - -/* -// ECCP521_GetPointProjective -// Converts pPoint into regular projective triplet (pX,pY,pZ) -*/ -#if 0 -void ECCP521_GetPointProjective(IppsBigNumState* pX, - IppsBigNumState* pY, - IppsBigNumState* pZ, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(pX, ECP_POINT_X(pPoint)); - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - cpBN_copy(pZ, ECP_POINT_Z(pPoint)); -} -#endif - -/* -// ECCP521_GetPointAffine -// -// Converts pPoint into regular affine pair (pX,pY) -// -// Note: -// pPoint is not point at Infinity -// transform (X, Y, Z) into (x, y) = (X/Z^2, Y/Z^3) -*/ -void ECCP521_GetPointAffine(IppsBigNumState* pX, IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* case Z == 1 */ - if( ECP_POINT_AFFINE(pPoint) ) { - if(pX) { - cpBN_copy(pX, ECP_POINT_X(pPoint)); - } - if(pY) { - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - } - } - - /* case Z != 1 */ - else { - //IppsMontState* pMont = ECP_PMONT(pECC); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - IppsBigNumState* pT = cpBigNumListGet(&pList); - IppsBigNumState* pU = cpBigNumListGet(&pList); - //IppsBigNumState* pModulo = cpBigNumListGet(&pList); - //BN_Set(MNT_MODULUS(pMont), MNT_SIZE(pMont), pModulo); - - /* U = 1/Z */ - PMA521_inv(pU, ECP_POINT_Z(pPoint), pModulo); - /* T = 1/(Z^2) */ - PMA521_sqr(pT, pU); - - if(pX) { - PMA521_mul(pX,pT, ECP_POINT_X(pPoint)); - cpBN_fix(pX); - } - if(pY) { - /* U = 1/(Z^3) */ - PMA521_mul(pU, pU, pT); - PMA521_mul(pY,pU, ECP_POINT_Y(pPoint)); - cpBN_fix(pY); - } - } -} - -/* -// ECCP521_IsPointOnCurve -// -// Test point is lie on curve -// -// Note -// We deal with equation: y^2 = x^3 + A*x + B. -// Or in projective coordinates: Y^2 = X^3 + a*X*Z^4 + b*Z^6. -// The point under test is given by projective triplet (X,Y,Z), -// which represents actually (x,y) = (X/Z^2,Y/Z^3). -*/ -int ECCP521_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* let think Infinity point is on the curve */ - if( ECCP_IsPointAtInfinity(pPoint) ) - return 1; - - else { - IppsBigNumState* pR = cpBigNumListGet(&pList); - IppsBigNumState* pT = cpBigNumListGet(&pList); - - PMA521_sqr(pR, ECP_POINT_X(pPoint)); // R = X^3 - PMA521_mul(pR, pR, ECP_POINT_X(pPoint)); - - /* case Z != 1 */ - if( !ECP_POINT_AFFINE(pPoint) ) { - IppsBigNumState* pZ4 = cpBigNumListGet(&pList); - IppsBigNumState* pZ6 = cpBigNumListGet(&pList); - PMA521_sqr(pT, ECP_POINT_Z(pPoint)); // Z^2 - PMA521_sqr(pZ4, pT); // Z^4 - PMA521_mul(pZ6, pZ4, pT); // Z^6 - - PMA521_mul(pT, pZ4, ECP_POINT_X(pPoint)); // T = X*Z^4 - if( ECP_AMI3(pECC) ) { - IppsBigNumState* pU = cpBigNumListGet(&pList); - PMA521_add(pU, pT, pT); // R = X^3 +a*X*Z^4 - PMA521_add(pU, pU, pT); - PMA521_sub(pR, pR, pU); - } - else { - PMA521_mul(pT, pT, ECP_A(pECC)); // R = X^3 +a*X*Z^4 - PMA521_add(pR, pR, pT); - } - PMA521_mul(pT, pZ6, ECP_B(pECC)); // R = X^3 +a*X*Z^4 + b*Z^6 - PMA521_add(pR, pR, pT); - - } - /* case Z == 1 */ - else { - if( ECP_AMI3(pECC) ) { - PMA521_add(pT, ECP_POINT_X(pPoint), ECP_POINT_X(pPoint)); // R = X^3 +a*X - PMA521_add(pT, pT, ECP_POINT_X(pPoint)); - PMA521_sub(pR, pR, pT); - } - else { - PMA521_mul(pT, ECP_POINT_X(pPoint), ECP_A(pECC)); // R = X^3 +a*X - PMA521_add(pR, pR, pT); - } - PMA521_add(pR, pR, ECP_B(pECC)); // R = X^3 +a*X + b - } - PMA521_sqr(pT, ECP_POINT_Y(pPoint)); // T = Y^2 - return 0==cpBN_cmp(pR, pT); - } -} - -/* -// ECCP521_ComparePoint -// -// Compare two points: -// returns 0 => pP==pQ (maybe both pP and pQ are at Infinity) -// returns 1 => pP!=pQ -// -// Note -// In general we check: -// P_X*Q_Z^2 ~ Q_X*P_Z^2 -// P_Y*Q_Z^3 ~ Q_Y*P_Z^3 -*/ -int ECCP521_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - UNREFERENCED_PARAMETER(pECC); - - /* P or/and Q at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - return ECCP_IsPointAtInfinity(pQ)? 0:1; - if( ECCP_IsPointAtInfinity(pQ) ) - return ECCP_IsPointAtInfinity(pP)? 0:1; - - /* (P_Z==1) && (Q_Z==1) */ - if( ECP_POINT_AFFINE(pP) && ECP_POINT_AFFINE(pQ) ) - return ((0==cpBN_cmp(ECP_POINT_X(pP),ECP_POINT_X(pQ))) && (0==cpBN_cmp(ECP_POINT_Y(pP),ECP_POINT_Y(pQ))))? 0:1; - - { - IppsBigNumState* pPtmp = cpBigNumListGet(&pList); - IppsBigNumState* pQtmp = cpBigNumListGet(&pList); - IppsBigNumState* pPZ = cpBigNumListGet(&pList); - IppsBigNumState* pQZ = cpBigNumListGet(&pList); - - /* P_X*Q_Z^2 ~ Q_X*P_Z^2 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA521_sqr(pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_X*Q_Z^2 */ - PMA521_mul(pPtmp, ECP_POINT_X(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_X(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA521_sqr(pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_X*P_Z^2 */ - PMA521_mul(pQtmp, ECP_POINT_X(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_X(pQ)); - } - if ( cpBN_cmp(pPtmp, pQtmp) ) - return 1; /* points are different: (P_X*Q_Z^2) != (Q_X*P_Z^2) */ - - /* P_Y*Q_Z^3 ~ Q_Y*P_Z^3 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA521_mul(pQZ, pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_Y*Q_Z^3 */ - PMA521_mul(pPtmp, ECP_POINT_Y(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_Y(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA521_mul(pPZ, pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_Y*P_Z^3 */ - PMA521_mul(pQtmp, ECP_POINT_Y(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_Y(pQ)); - } - return cpBN_cmp(pPtmp, pQtmp)? 1:0; - } -} - -/* -// ECCP521_NegPoint -// -// Negative point -*/ -void ECCP521_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - - /* test point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - BNU_CHUNK_T* pRy = BN_NUMBER(ECP_POINT_Y(pR)); - BNU_CHUNK_T* pPy = BN_NUMBER(ECP_POINT_Y(pP)); - int size = LEN_P521; - - if( pP!=pR ) { - PMA_set(ECP_POINT_X(pR), ECP_POINT_X(pP)); - PMA_set(ECP_POINT_Z(pR), ECP_POINT_Z(pP)); - ECP_POINT_AFFINE(pR) = ECP_POINT_AFFINE(pP); - } - cpSub_BNU(pRy, (BNU_CHUNK_T*)secp521r1_p, pPy, LEN_P521); - FIX_BNU(pRy,size); - BN_SIZE(ECP_POINT_Y(pR)) = size; - BN_SIGN(ECP_POINT_Y(pR)) = ippBigNumPOS; - } -} - -/* -// ECCP521_DblPoint -// -// Double point -*/ -void ECCP521_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P at infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsBigNumState* bnV = cpBigNumListGet(&pList); - IppsBigNumState* bnU = cpBigNumListGet(&pList); - IppsBigNumState* bnM = cpBigNumListGet(&pList); - IppsBigNumState* bnS = cpBigNumListGet(&pList); - IppsBigNumState* bnT = cpBigNumListGet(&pList); - - /* M = 3*X^2 + A*Z^4 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA521_sqr(bnU, ECP_POINT_X(pP)); - PMA521_add(bnM, bnU, bnU); - PMA521_add(bnM, bnM, bnU); - PMA521_add(bnM, bnM, ECP_A(pECC)); - } - else if( ECP_AMI3(pECC) ) { - PMA521_sqr(bnU, ECP_POINT_Z(pP)); - PMA521_add(bnS, ECP_POINT_X(pP), bnU); - PMA521_sub(bnT, ECP_POINT_X(pP), bnU); - PMA521_mul(bnM, bnS, bnT); - PMA521_add(bnU, bnM, bnM); - PMA521_add(bnM, bnU, bnM); - } - else { - PMA521_sqr(bnU, ECP_POINT_X(pP)); - PMA521_add(bnM, bnU, bnU); - PMA521_add(bnM, bnM, bnU); - PMA521_sqr(bnU, ECP_POINT_Z(pP)); - PMA521_sqr(bnU, bnU); - PMA521_mul(bnU, bnU, ECP_A(pECC)); - PMA521_add(bnM, bnM, bnU); - } - - PMA521_add(bnV, ECP_POINT_Y(pP), ECP_POINT_Y(pP)); - - /* R_Z = 2*Y*Z */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnV); - } - else { - PMA521_mul(ECP_POINT_Z(pR), bnV, ECP_POINT_Z(pP)); - } - - /* S = 4*X*Y^2 */ - PMA521_sqr(bnT, bnV); - PMA521_mul(bnS, bnT, ECP_POINT_X(pP)); - - /* R_X = M^2 - 2*S */ - PMA521_sqr(bnU, bnM); - PMA521_sub(bnU, bnU, bnS); - PMA521_sub(ECP_POINT_X(pR), bnU, bnS); - - /* T = 8*Y^4 */ - PMA521_mul(bnV, bnV, ECP_POINT_Y(pP)); - PMA521_mul(bnT, bnT, bnV); - - /* R_Y = M*(S - R_X) - T */ - PMA521_sub(bnS, bnS, ECP_POINT_X(pR)); - PMA521_mul(bnS, bnS, bnM); - PMA521_sub(ECP_POINT_Y(pR), bnS, bnT); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP521_AddPoint -// -// Add points -*/ -void ECCP521_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ -#if 0 - /* test stupid call */ - if( pP == pQ ) { - ECCP521_DblPoint(pP, pR, pECC, pList); - return; - } -#endif - - /* prevent operation with point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) { - ECCP_CopyPoint(pQ, pR); - return; - } - if( ECCP_IsPointAtInfinity(pQ) ) { - ECCP_CopyPoint(pP, pR); - return; - } - - /* - // addition - */ - { - IppsBigNumState* bnU0 = cpBigNumListGet(&pList); - IppsBigNumState* bnS0 = cpBigNumListGet(&pList); - IppsBigNumState* bnU1 = cpBigNumListGet(&pList); - IppsBigNumState* bnS1 = cpBigNumListGet(&pList); - IppsBigNumState* bnW = cpBigNumListGet(&pList); - IppsBigNumState* bnR = cpBigNumListGet(&pList); - IppsBigNumState *bnT = bnU0; - IppsBigNumState *bnM = bnS0; - - /* U0 = P_X * Q_Z^2 */ - /* S0 = P_Y * Q_Z^3 */ - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU0, ECP_POINT_X(pP)); - PMA_set(bnS0, ECP_POINT_Y(pP)); - } - else { - PMA521_sqr(bnW, ECP_POINT_Z(pQ)); - PMA521_mul(bnU0,ECP_POINT_X(pP), bnW); - PMA521_mul(bnW, ECP_POINT_Z(pQ), bnW); - PMA521_mul(bnS0,ECP_POINT_Y(pP), bnW); - } - - /* U1 = Q_X * P_Z^2 */ - /* S1 = Q_Y * P_Z^3 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_X(pQ)); - PMA_set(bnS1, ECP_POINT_Y(pQ)); - } - else { - PMA521_sqr(bnW, ECP_POINT_Z(pP)); - PMA521_mul(bnU1,ECP_POINT_X(pQ), bnW); - PMA521_mul(bnW, ECP_POINT_Z(pP), bnW); - PMA521_mul(bnS1,ECP_POINT_Y(pQ), bnW); - } - - /* W = U0-U1 */ - /* R = S0-S1 */ - PMA521_sub(bnW, bnU0, bnU1); - PMA521_sub(bnR, bnS0, bnS1); - - //if( IsZero_BN(bnW) ) { - //if( IsZero_BN(bnR) ) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnW), LEN_P521, 0)) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnR), LEN_P521, 0)) { - ECCP521_DblPoint(pP, pR, pECC, pList); - return; - } - else { - ECCP_SetPointToInfinity(pR); - return; - } - } - - /* T = U0+U1 */ - /* M = S0+S1 */ - PMA521_add(bnT, bnU0, bnU1); - PMA521_add(bnM, bnS0, bnS1); - - /* R_Z = P_Z * Q_Z * W */ - if( ECP_POINT_AFFINE(pQ) && ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnW); - } - else { - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU1, ECP_POINT_Z(pP)); - } - else if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_Z(pQ)); - } - else { - PMA521_mul(bnU1, ECP_POINT_Z(pP), ECP_POINT_Z(pQ)); - } - PMA521_mul(ECP_POINT_Z(pR), bnU1, bnW); - } - - PMA521_sqr(bnU1, bnW); /* U1 = W^2 */ - PMA521_mul(bnS1, bnT, bnU1); /* S1 = T * W^2 */ - - /* R_X = R^2 - T * W^2 */ - PMA521_sqr(ECP_POINT_X(pR), bnR); - PMA521_sub(ECP_POINT_X(pR), ECP_POINT_X(pR), bnS1); - - /* V = T * W^2 - 2 * R_X (S1) */ - PMA521_sub(bnS1, bnS1, ECP_POINT_X(pR)); - PMA521_sub(bnS1, bnS1, ECP_POINT_X(pR)); - - /* R_Y = (V * R - M * W^3) /2 */ - PMA521_mul(ECP_POINT_Y(pR), bnS1, bnR); - PMA521_mul(bnU1, bnU1, bnW); - PMA521_mul(bnU1, bnU1, bnM); - PMA521_sub(bnU1, ECP_POINT_Y(pR), bnU1); - PMA521_div2(ECP_POINT_Y(pR), bnU1); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP521_MulPoint -// -// Multiply point by scalar -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP521_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - IppsECCPPointState T; - IppsECCPPointState U; - IppsBigNumState* bnKH = cpBigNumListGet(&pList); - Ipp32u* pK; - Ipp32u* pH; - Ipp32u carry; - int lenKH; - int bitH; - - /* init result */ - ECCP_CopyPoint(pP, pR); - - /* if scalar is negative */ - if( ippBigNumNEG == BN_SIGN(bnN) ) { - /* negative R */ - ECCP521_NegPoint(pR, pR, pECC); - } - - /* copy K = N and compute H=3*K */ - lenKH = BN_SIZE(bnN)+1; - pK = BN_NUMBER(bnKH); - pH = BN_BUFFER(bnKH); - Cpy_BNU(BN_NUMBER(bnN), pK, BN_SIZE(bnN)); - pK[lenKH-1] = 0; - carry = cpAdd_BNU(pH, pK, pK, lenKH); - carry = cpAdd_BNU(pH, pK, pH, lenKH); - - /* init temporary T = (X/Z^2, Y/Z^3, 1) */ - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - ECCP521_GetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), pR, pECC, pList); - ECCP521_SetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), &T, pECC); - - /* temporary point U =-T */ - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - ECCP521_NegPoint(&T, &U, pECC); - - for(bitH=MSB_BNU(pH, lenKH)-1; bitH>0; bitH--) { - int hBit = TST_BIT(pH, bitH); - int kBit = TST_BIT(pK, bitH); - ECCP521_DblPoint(pR, pR, pECC, pList); - if( hBit && !kBit ) - ECCP521_AddPoint(pR, &T, pR, pECC, pList); - if(!hBit && kBit ) - ECCP521_AddPoint(pR, &U, pR, pECC, pList); - } - } -} - -#else -#pragma message ("ECCP521_MulPoint: SCCM version") - -void ECCP521_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - Ipp8u* pScratchAligned = ECP_SCCMBUFF(pECC); - - BNU_CHUNK_T* pN = BN_NUMBER(bnN); - cpSize nsN = BN_SIZE(bnN); - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int w = cpECCP_OptimalWinSize(scalarBitSize); - /* number of table entries */ - int nPrecomputed = 1<>shift) & dmask; - - /* initialize result (ECP_FINITE_POINT|ECP_PROJECTIVE) */ - cpECCP_ScrambleGet(pR, coordSize, pScratchAligned+windowVal, nPrecomputed); - ECP_POINT_AFFINE(pR) = 0; - - /* initialize temporary T (ECP_PROJECTIVE) */ - ECP_POINT_AFFINE(&T) = 0; - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - /* w times doubling */ - int k; - for(k=0; k>shift) & dmask; - - /* extract value from the pre-computed table */ - cpECCP_ScrambleGet(&T, coordSize, pScratchAligned+windowVal, nPrecomputed); - - /* and add it */ - ECCP521_AddPoint(pR, &T, pR, pECC, pList); - } - } - } -} -#endif - -void ECCP521_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - ECCP521_MulPoint(ECP_GENC(pECC), pK, pR, pECC, pList); -} - -/* -// ECCP521_ProdPoint -// -// Point product -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP521_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalars */ - if( IsZero_BN(bnPscalar) ) { - ECCP521_MulPoint(pQ, bnQscalar, pR, pECC, pList); - return; - } - if( IsZero_BN(bnQscalar) ) { - ECCP521_MulPoint(pP, bnPscalar, pR, pECC, pList); - return; - } - - /* - // point product - */ - else { - int n; - Ipp32u* pbnPscalar = BN_NUMBER(bnPscalar); - int bnPscalarSize = BN_SIZE(bnPscalar); - Ipp32u* pbnQscalar = BN_NUMBER(bnQscalar); - int bnQscalarSize = BN_SIZE(bnQscalar); - - int size = bnPscalarSize>bnQscalarSize? bnPscalarSize : bnQscalarSize; - - IppsECCPPointState* pPointPQ[4] = {NULL, NULL, NULL, NULL}; - - /* allocate temporary PQ point */ - IppsECCPPointState PQ; - ECP_POINT_X(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Y(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Z(&PQ) = cpBigNumListGet(&pList); - - /* init temporary point array */ - if(ippBigNumPOS == BN_SIGN(bnPscalar)) - pPointPQ[1] = (IppsECCPPointState*)pP; - else { - IppsECCPPointState P; - ECP_POINT_X(&P) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P) = cpBigNumListGet(&pList); - ECCP521_NegPoint(pP, &P, pECC); - pPointPQ[1] = &P; - } - if(ippBigNumPOS == BN_SIGN(bnQscalar)) - pPointPQ[2] = (IppsECCPPointState*)pQ; - else { - IppsECCPPointState Q; - ECP_POINT_X(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Y(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Z(&Q) = cpBigNumListGet(&pList); - ECCP521_NegPoint(pQ, &Q, pECC); - pPointPQ[2] = &Q; - } - - ECCP521_AddPoint(pPointPQ[1], pPointPQ[2], &PQ, pECC, pList); - ECCP521_GetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC, pList); - ECCP521_SetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC); - pPointPQ[3] = &PQ; - - /* pad scalars by zeros */ - ZEXPAND_BNU(pbnPscalar,bnPscalarSize, size); - ZEXPAND_BNU(pbnQscalar,bnQscalarSize, size); - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=size; n>0; n--) { - Ipp32u scalarPn = pbnPscalar[n-1]; - Ipp32u scalarQn = pbnQscalar[n-1]; - - int nBit; - for(nBit=31; nBit>=0; nBit--) { - int - PnQnBits = scalarPn&0x80000000? 1:0; - PnQnBits+= scalarQn&0x80000000? 2:0; - - if( !ECCP_IsPointAtInfinity(pR) ) - ECCP521_DblPoint(pR, pR, pECC, pList); - if( PnQnBits ) - ECCP521_AddPoint(pR, pPointPQ[PnQnBits], pR, pECC, pList); - - scalarPn <<= 1; - scalarQn <<= 1; - } - } - } -} - -#else -#pragma message ("ECCP521_ProdPoint: SCCM version") - -void ECCP521_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsECCPPointState T; - IppsECCPPointState U; - - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - - ECCP521_MulPoint(pP, bnPscalar, &T, (IppsECCPState*)pECC, pList); - ECCP521_MulPoint(pQ, bnQscalar, &U, (IppsECCPState*)pECC, pList); - ECCP521_AddPoint(&T, &U, pR, pECC, pList); -} -#endif - -#endif /* _ECP_521_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodcom.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodcom.h deleted file mode 100644 index 57057f1bd5..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodcom.h +++ /dev/null @@ -1,133 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Definitions of EC methods over common GF(p) -// -// -*/ - -#if !defined(_PCP_ECCPMETHODCOM_H) -#define _PCP_ECCPMETHODCOM_H - -#include "pcpeccp.h" - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCPcom_Methods(void); - -/* -// Copy -*/ -void ECCP_CopyPoint(const IppsECCPPointState* pSrc, IppsECCPPointState* pDst); - -/* -// Point Set. These operations implies -// transformation of regular coordinates into internal format -*/ -void ECCP_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -void ECCP_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -/* -// Get Point. These operations implies -// transformation of internal format coordinates into regular -*/ -//void ECCP_GetPointProjective(IppsBigNumState* pX, -// IppsBigNumState* pY, -// IppsBigNumState* pZ, -// const IppsECCPPointState* pPoint, -// const IppsECCPState* pECC); - -void ECCP_GetPointAffine(IppsBigNumState* pX, - IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Set To Infinity -*/ -void ECCP_SetPointToInfinity(IppsECCPPointState* pPoint); -void ECCP_SetPointToAffineInfinity0(IppsBigNumState* pX, IppsBigNumState* pY); -void ECCP_SetPointToAffineInfinity1(IppsBigNumState* pX, IppsBigNumState* pY); - -/* -// Test Is At Infinity -// Test is On EC -*/ -int ECCP_IsPointAtInfinity(const IppsECCPPointState* pPoint); -int ECCP_IsPointAtAffineInfinity0(const IppsBigNumState* pX, const IppsBigNumState* pY); -int ECCP_IsPointAtAffineInfinity1(const IppsBigNumState* pX, const IppsBigNumState* pY); -int ECCP_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Operations -*/ -int ECCP_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC); - -void ECCP_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -#endif /* _PCP_ECCPMETHODCOM_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodcomca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodcomca.c deleted file mode 100644 index 396e01b754..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodcomca.c +++ /dev/null @@ -1,1025 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC methods over common GF(p) -// -// Contents: -// ECCP_CopyPoint() -// ECCP_SetPointProjective() -// ECCP_SetPointAffine() -// -// ECCP_GetPointProjective() -// ECCP_GetPointAffine() -// -// ECCP_SetPointToInfinity() -// ECCP_SetPointToAffineInfinity0() -// ECCP_SetPointToAffineInfinity1() -// -// ECCP_IsPointAtInfinity() -// ECCP_IsPointAtAffineInfinity0() -// ECCP_IsPointAtAffineInfinity1() -// -// ECCP_IsPointOnCurve() -// -// ECCP_ComparePoint() -// ECCP_NegPoint() -// ECCP_DblPoint() -// ECCP_AddPoint() -// ECCP_MulPoint() -// ECCP_ProdPoint() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" -#include "pcppma.h" -#include "pcpeccpsscm.h" - - -/* - NOTE: - ECCPcom methods are used representation of point coordinates - in Montgomery domain, because of Montgomery mul/sqr operations inside -*/ -static -ECCP_METHOD ECCPcom = { - ECCP_SetPointProjective, - ECCP_SetPointAffine, - ECCP_GetPointAffine, - - ECCP_IsPointOnCurve, - - ECCP_ComparePoint, - ECCP_NegPoint, - ECCP_DblPoint, - ECCP_AddPoint, - ECCP_MulPoint, - ECCP_MulBasePoint, - ECCP_ProdPoint -}; - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCPcom_Methods(void) -{ - return &ECCPcom; -} - - -/* -// Copy Point -*/ -void ECCP_CopyPoint(const IppsECCPPointState* pSrc, IppsECCPPointState* pDst) -{ - cpBN_copy(ECP_POINT_X(pDst), ECP_POINT_X(pSrc)); - cpBN_copy(ECP_POINT_Y(pDst), ECP_POINT_Y(pSrc)); - cpBN_copy(ECP_POINT_Z(pDst), ECP_POINT_Z(pSrc)); - ECP_POINT_AFFINE(pDst) = ECP_POINT_AFFINE(pSrc); -} - -/* -// ECCP_PoinSettProjective -// Converts regular projective triplet (pX,pY,pZ) into pPoint -// (see note above) -*/ -void ECCP_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - IppsMontState* pMont = ECP_PMONT(pECC); - - PMA_enc(ECP_POINT_X(pPoint), (IppsBigNumState*)pX, pMont); - PMA_enc(ECP_POINT_Y(pPoint), (IppsBigNumState*)pY, pMont); - PMA_enc(ECP_POINT_Z(pPoint), (IppsBigNumState*)pZ, pMont); - ECP_POINT_AFFINE(pPoint) = cpBN_cmp(pZ, BN_ONE_REF())==0; -} - -/* -// ECCP_PointAffineSet -// Converts regular affine pair (pX,pY) into pPoint -*/ -void ECCP_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - IppsMontState* pMont = ECP_PMONT(pECC); - PMA_enc(ECP_POINT_X(pPoint), (IppsBigNumState*)pX, pMont); - PMA_enc(ECP_POINT_Y(pPoint), (IppsBigNumState*)pY, pMont); - PMA_enc(ECP_POINT_Z(pPoint), (IppsBigNumState*)cpBN_OneRef(), pMont); - ECP_POINT_AFFINE(pPoint) = 1; -} - -/* -// ECCP_GetPointProjective -// Converts pPoint into regular projective triplet (pX,pY,pZ) -*/ -#if 0 -void ECCP_GetPointProjective(IppsBigNumState* pX, - IppsBigNumState* pY, - IppsBigNumState* pZ, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - IppsMontState* pMont = ECP_PMONT(pECC); - - PMA_dec(pX, ECP_POINT_X(pPoint), pMont); - PMA_dec(pY, ECP_POINT_Y(pPoint), pMont); - PMA_dec(pZ, ECP_POINT_Z(pPoint), pMont); -} -#endif - -/* -// ECCP_GetPointAffine -// -// Converts pPoint into regular affine pair (pX,pY) -// -// Note: -// pPoint is not point at Infinity -// transform (X, Y, Z) into (x, y) = (X/Z^2, Y/Z^3) -*/ -void ECCP_GetPointAffine(IppsBigNumState* pX, IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsMontState* pMont = ECP_PMONT(pECC); - - /* case Z == 1 */ - if( ECP_POINT_AFFINE(pPoint) ) { - if(pX) { - PMA_dec(pX, ECP_POINT_X(pPoint), pMont); - } - if(pY) { - PMA_dec(pY, ECP_POINT_Y(pPoint), pMont); - } - } - - /* case Z != 1 */ - else { - IppsBigNumState* pT = cpBigNumListGet(&pList); - IppsBigNumState* pU = cpBigNumListGet(&pList); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - /* decode Z */ - PMA_dec(pU, ECP_POINT_Z(pPoint), pMont); - /* regular T = Z^-1 */ - PMA_inv(pT, pU, pModulo); - /* montgomery U = Z^-1 */ - PMA_enc(pU, pT, pMont); - /* regular T = Z^-2 */ - PMA_mule(pT, pU, pT, pMont); - - if(pX) { - PMA_mule(pX,pT, ECP_POINT_X(pPoint), pMont); - } - if(pY) { - /* regular U = Z^-3 */ - PMA_mule(pU, pU, pT, pMont); - PMA_mule(pY,pU, ECP_POINT_Y(pPoint), pMont); - } - } -} - -/* -// ECCP_SetPointToInfinity -// ECCP_SetPointToAffineInfinity0 -// ECCP_SetPointToAffineInfinity1 -// -// Set point to Infinity -*/ -void ECCP_SetPointToInfinity(IppsECCPPointState* pPoint) -{ - cpBN_zero(ECP_POINT_X(pPoint)); - cpBN_zero(ECP_POINT_Y(pPoint)); - cpBN_zero(ECP_POINT_Z(pPoint)); - ECP_POINT_AFFINE(pPoint) = 0; -} - -void ECCP_SetPointToAffineInfinity0(IppsBigNumState* pX, IppsBigNumState* pY) -{ - if(pX) cpBN_zero(pX); - if(pY) cpBN_zero(pY); -} - -void ECCP_SetPointToAffineInfinity1(IppsBigNumState* pX, IppsBigNumState* pY) -{ - if(pX) cpBN_zero(pX); - if(pY) BN_Word(pY,1); -} - -/* -// ECCP_IsPointAtInfinity -// ECCP_IsPointAtAffineInfinity0 -// ECCP_IsPointAtAffineInfinity1 -// -// Test point is at Infinity -*/ -int ECCP_IsPointAtInfinity(const IppsECCPPointState* pPoint) -{ - return IsZero_BN( ECP_POINT_Z(pPoint) ); -} - -int ECCP_IsPointAtAffineInfinity0(const IppsBigNumState* pX, const IppsBigNumState* pY) -{ - return IsZero_BN(pX) && IsZero_BN(pY); -} - -int ECCP_IsPointAtAffineInfinity1(const IppsBigNumState* pX, const IppsBigNumState* pY) -{ - return IsZero_BN(pX) && !IsZero_BN(pY); -} - -/* -// ECCP_IsPointOnCurve -// -// Test point is lie on curve -// -// Note -// We deal with equation: y^2 = x^3 + A*x + B. -// Or in projective coordinates: Y^2 = X^3 + a*X*Z^4 + b*Z^6. -// The point under test is given by projective triplet (X,Y,Z), -// which represents actually (x,y) = (X/Z^2,Y/Z^3). -*/ -int ECCP_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* let think Infinity point is on the curve */ - if( ECCP_IsPointAtInfinity(pPoint) ) - return 1; - - else { - IppsMontState* pMont = ECP_PMONT(pECC); - IppsBigNumState* pR = cpBigNumListGet(&pList); - IppsBigNumState* pT = cpBigNumListGet(&pList); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - PMA_sqre(pR, ECP_POINT_X(pPoint), pMont); // R = X^3 - PMA_mule(pR, pR, ECP_POINT_X(pPoint), pMont); - - /* case Z != 1 */ - if( !ECP_POINT_AFFINE(pPoint) ) { - IppsBigNumState* pZ4 = cpBigNumListGet(&pList); - IppsBigNumState* pZ6 = cpBigNumListGet(&pList); - PMA_sqre(pT, ECP_POINT_Z(pPoint), pMont); // Z^2 - PMA_sqre(pZ4, pT, pMont); // Z^4 - PMA_mule(pZ6, pZ4, pT, pMont); // Z^6 - - PMA_mule(pT, pZ4, ECP_POINT_X(pPoint), pMont); // T = X*Z^4 - if( ECP_AMI3(pECC) ) { - IppsBigNumState* pU = cpBigNumListGet(&pList); - PMA_add(pU, pT, pT, pModulo); // R = X^3 +a*X*Z^4 - PMA_add(pU, pU, pT, pModulo); - PMA_sub(pR, pR, pU, pModulo); - } - else { - PMA_mule(pT, pT, ECP_AENC(pECC), pMont); // R = X^3 +a*X*Z^4 - PMA_add(pR, pR, pT, pModulo); - } - PMA_mule(pT, pZ6, ECP_BENC(pECC), pMont); // R = X^3 +a*X*Z^4 + b*Z^6 - PMA_add(pR, pR, pT, pModulo); - - } - /* case Z == 1 */ - else { - if( ECP_AMI3(pECC) ) { - PMA_add(pT, ECP_POINT_X(pPoint), ECP_POINT_X(pPoint), pModulo); // R = X^3 +a*X - PMA_add(pT, pT, ECP_POINT_X(pPoint), pModulo); - PMA_sub(pR, pR, pT, pModulo); - } - else { - PMA_mule(pT, ECP_POINT_X(pPoint), ECP_AENC(pECC), pMont); // R = X^3 +a*X - PMA_add(pR, pR, pT, pModulo); - } - PMA_add(pR, pR, ECP_BENC(pECC), pModulo); // R = X^3 +a*X + b - } - PMA_sqre(pT, ECP_POINT_Y(pPoint), pMont); // T = Y^2 - return 0==cpBN_cmp(pR, pT); - } -} - -/* -// ECCP_ComparePoint -// -// Compare two points: -// returns 0 => pP==pQ (maybe both pP and pQ are at Infinity) -// returns 1 => pP!=pQ -// -// Note -// In general we check: -// P_X*Q_Z^2 ~ Q_X*P_Z^2 -// P_Y*Q_Z^3 ~ Q_Y*P_Z^3 -*/ -int ECCP_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P or/and Q at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - return ECCP_IsPointAtInfinity(pQ)? 0:1; - if( ECCP_IsPointAtInfinity(pQ) ) - return ECCP_IsPointAtInfinity(pP)? 0:1; - - /* (P_Z==1) && (Q_Z==1) */ - if( ECP_POINT_AFFINE(pP) && ECP_POINT_AFFINE(pQ) ) - return ((0==cpBN_cmp(ECP_POINT_X(pP),ECP_POINT_X(pQ))) && (0==cpBN_cmp(ECP_POINT_Y(pP),ECP_POINT_Y(pQ))))? 0:1; - - { - IppsMontState* pMont = ECP_PMONT(pECC); - - IppsBigNumState* pPtmp = cpBigNumListGet(&pList); - IppsBigNumState* pQtmp = cpBigNumListGet(&pList); - IppsBigNumState* pPZ = cpBigNumListGet(&pList); - IppsBigNumState* pQZ = cpBigNumListGet(&pList); - - /* P_X*Q_Z^2 ~ Q_X*P_Z^2 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA_sqre(pQZ, ECP_POINT_Z(pQ), pMont); /* Ptmp = P_X*Q_Z^2 */ - PMA_mule(pPtmp, ECP_POINT_X(pP), pQZ, pMont); - } - else { - PMA_set(pPtmp, ECP_POINT_X(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA_sqre(pPZ, ECP_POINT_Z(pP), pMont); /* Qtmp = Q_X*P_Z^2 */ - PMA_mule(pQtmp, ECP_POINT_X(pQ), pPZ, pMont); - } - else { - PMA_set(pQtmp, ECP_POINT_X(pQ)); - } - if ( cpBN_cmp(pPtmp, pQtmp) ) - return 1; /* points are different: (P_X*Q_Z^2) != (Q_X*P_Z^2) */ - - /* P_Y*Q_Z^3 ~ Q_Y*P_Z^3 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMA_mule(pQZ, pQZ, ECP_POINT_Z(pQ), pMont); /* Ptmp = P_Y*Q_Z^3 */ - PMA_mule(pPtmp, ECP_POINT_Y(pP), pQZ, pMont); - } - else { - PMA_set(pPtmp, ECP_POINT_Y(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMA_mule(pPZ, pPZ, ECP_POINT_Z(pP), pMont); /* Qtmp = Q_Y*P_Z^3 */ - PMA_mule(pQtmp, ECP_POINT_Y(pQ), pPZ, pMont); - } - else { - PMA_set(pQtmp, ECP_POINT_Y(pQ)); - } - return cpBN_cmp(pPtmp, pQtmp)? 1:0; - } -} - -/* -// ECCP_NegPoint -// -// Negative point -*/ -void ECCP_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC) -{ - /* test point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - if( pP!=pR ) { - PMA_set(ECP_POINT_X(pR), ECP_POINT_X(pP)); - PMA_set(ECP_POINT_Z(pR), ECP_POINT_Z(pP)); - } - PMA_sub(ECP_POINT_Y(pR), pModulo, ECP_POINT_Y(pP), pModulo); - ECP_POINT_AFFINE(pR) = ECP_POINT_AFFINE(pP); - } -} - -/* -// ECCP_DblPoint -// -// Double point -*/ -void ECCP_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P at infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsMontState* pMont = ECP_PMONT(pECC); - - IppsBigNumState* bnV = cpBigNumListGet(&pList); - IppsBigNumState* bnU = cpBigNumListGet(&pList); - IppsBigNumState* bnM = cpBigNumListGet(&pList); - IppsBigNumState* bnS = cpBigNumListGet(&pList); - IppsBigNumState* bnT = cpBigNumListGet(&pList); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - /* M = 3*X^2 + A*Z^4 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_sqre(bnU, ECP_POINT_X(pP), pMont); - PMA_add(bnM, bnU, bnU, pModulo); - PMA_add(bnM, bnM, bnU, pModulo); - PMA_add(bnM, bnM, ECP_AENC(pECC), pModulo); - } - else if( ECP_AMI3(pECC) ) { - PMA_sqre(bnU, ECP_POINT_Z(pP), pMont); - PMA_add(bnS, ECP_POINT_X(pP), bnU, pModulo); - PMA_sub(bnT, ECP_POINT_X(pP), bnU, pModulo); - PMA_mule(bnM, bnS, bnT, pMont); - PMA_add(bnU, bnM, bnM, pModulo); - PMA_add(bnM, bnU, bnM, pModulo); - } - else { - PMA_sqre(bnU, ECP_POINT_X(pP), pMont); - PMA_add(bnM, bnU, bnU, pModulo); - PMA_add(bnM, bnM, bnU, pModulo); - PMA_sqre(bnU, ECP_POINT_Z(pP), pMont); - PMA_sqre(bnU, bnU, pMont); - PMA_mule(bnU, bnU, ECP_AENC(pECC), pMont); - PMA_add(bnM, bnM, bnU, pModulo); - } - - PMA_add(bnV, ECP_POINT_Y(pP), ECP_POINT_Y(pP), pModulo); - - /* R_Z = 2*Y*Z */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnV); - } - else { - PMA_mule(ECP_POINT_Z(pR), bnV, ECP_POINT_Z(pP), pMont); - } - - /* S = 4*X*Y^2 */ - PMA_sqre(bnT, bnV, pMont); - PMA_mule(bnS, bnT, ECP_POINT_X(pP), pMont); - - /* R_X = M^2 - 2*S */ - PMA_sqre(bnU, bnM, pMont); - PMA_sub(bnU, bnU, bnS, pModulo); - PMA_sub(ECP_POINT_X(pR), bnU, bnS, pModulo); - - /* T = 8*Y^4 */ - PMA_mule(bnV, bnV, ECP_POINT_Y(pP), pMont); - PMA_mule(bnT, bnT, bnV, pMont); - - /* R_Y = M*(S - R_X) - T */ - PMA_sub(bnS, bnS, ECP_POINT_X(pR), pModulo); - PMA_mule(bnS, bnS, bnM, pMont); - PMA_sub(ECP_POINT_Y(pR), bnS, bnT, pModulo); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP_AddPoint -// -// Add points -*/ -void ECCP_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ -#if 0 - /* test stupid call */ - if( pP == pQ ) { - ECCP_DblPoint(pP, pR, pECC, pList); - return; - } -#endif - - /* prevent operation with point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) { - ECCP_CopyPoint(pQ, pR); - return; - } - if( ECCP_IsPointAtInfinity(pQ) ) { - ECCP_CopyPoint(pP, pR); - return; - } - - /* - // addition - */ - { - IppsMontState* pMont = ECP_PMONT(pECC); - - IppsBigNumState* bnU0 = cpBigNumListGet(&pList); - IppsBigNumState* bnS0 = cpBigNumListGet(&pList); - IppsBigNumState* bnU1 = cpBigNumListGet(&pList); - IppsBigNumState* bnS1 = cpBigNumListGet(&pList); - IppsBigNumState* bnW = cpBigNumListGet(&pList); - IppsBigNumState* bnR = cpBigNumListGet(&pList); - IppsBigNumState *bnT = bnU0; - IppsBigNumState *bnM = bnS0; - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - /* U0 = P_X * Q_Z^2 */ - /* S0 = P_Y * Q_Z^3 */ - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU0, ECP_POINT_X(pP)); - PMA_set(bnS0, ECP_POINT_Y(pP)); - } - else { - PMA_sqre(bnW, ECP_POINT_Z(pQ), pMont); - PMA_mule(bnU0,ECP_POINT_X(pP), bnW, pMont); - PMA_mule(bnW, ECP_POINT_Z(pQ), bnW, pMont); - PMA_mule(bnS0,ECP_POINT_Y(pP), bnW, pMont); - } - - /* U1 = Q_X * P_Z^2 */ - /* S1 = Q_Y * P_Z^3 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_X(pQ)); - PMA_set(bnS1, ECP_POINT_Y(pQ)); - } - else { - PMA_sqre(bnW, ECP_POINT_Z(pP), pMont); - PMA_mule(bnU1,ECP_POINT_X(pQ), bnW, pMont); - PMA_mule(bnW, ECP_POINT_Z(pP), bnW, pMont); - PMA_mule(bnS1,ECP_POINT_Y(pQ), bnW, pMont); - } - - /* W = U0-U1 */ - /* R = S0-S1 */ - PMA_sub(bnW, bnU0, bnU1, pModulo); - PMA_sub(bnR, bnS0, bnS1, pModulo); - - if( IsZero_BN(bnW) ) { - if( IsZero_BN(bnR) ) { - ECCP_DblPoint(pP, pR, pECC, pList); - return; - } - else { - ECCP_SetPointToInfinity(pR); - return; - } - } - - /* T = U0+U1 */ - /* M = S0+S1 */ - PMA_add(bnT, bnU0, bnU1, pModulo); - PMA_add(bnM, bnS0, bnS1, pModulo); - - /* R_Z = P_Z * Q_Z * W */ - if( ECP_POINT_AFFINE(pQ) && ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnW); - } - else { - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU1, ECP_POINT_Z(pP)); - } - else if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_Z(pQ)); - } - else { - PMA_mule(bnU1, ECP_POINT_Z(pP), ECP_POINT_Z(pQ), pMont); - } - PMA_mule(ECP_POINT_Z(pR), bnU1, bnW, pMont); - } - - PMA_sqre(bnU1, bnW, pMont); /* U1 = W^2 */ - PMA_mule(bnS1, bnT, bnU1, pMont); /* S1 = T * W^2 */ - - /* R_X = R^2 - T * W^2 */ - PMA_sqre(ECP_POINT_X(pR), bnR, pMont); - PMA_sub(ECP_POINT_X(pR), ECP_POINT_X(pR), bnS1, pModulo); - - /* V = T * W^2 - 2 * R_X (S1) */ - PMA_sub(bnS1, bnS1, ECP_POINT_X(pR), pModulo); - PMA_sub(bnS1, bnS1, ECP_POINT_X(pR), pModulo); - - /* R_Y = (V * R - M * W^3) /2 */ - PMA_mule(ECP_POINT_Y(pR), bnS1, bnR, pMont); - PMA_mule(bnU1, bnU1, bnW, pMont); - PMA_mule(bnU1, bnU1, bnM, pMont); - PMA_sub(bnU1, ECP_POINT_Y(pR), bnU1, pModulo); - PMA_div2(ECP_POINT_Y(pR), bnU1, pModulo); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP_MulPoint -// -// Multiply point by scalar -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - IppsECCPPointState T; - IppsECCPPointState U; - IppsBigNumState* bnKH = cpBigNumListGet(&pList); - Ipp32u* pK; - Ipp32u* pH; - Ipp32u carry; - int lenKH; - int bitH; - - /* init result */ - ECCP_CopyPoint(pP, pR); - - /* if scalar is negative */ - if( ippBigNumNEG == BN_SIGN(bnN) ) { - /* negative R */ - ECCP_NegPoint(pR, pR, pECC); - } - - /* copy K = N and compute H=3*K */ - lenKH = BN_SIZE(bnN)+1; - pK = BN_NUMBER(bnKH); - pH = BN_BUFFER(bnKH); - Cpy_BNU(BN_NUMBER(bnN), pK, BN_SIZE(bnN)); - pK[lenKH-1] = 0; - carry = cpAdd_BNU(pH, pK, pK, lenKH); - carry = cpAdd_BNU(pH, pK, pH, lenKH); - - /* init temporary T = (X/Z^2, Y/Z^3, 1) */ - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - ECCP_GetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), pR, pECC, pList); - ECCP_SetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), &T, pECC); - - /* temporary point U =-T */ - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - ECCP_NegPoint(&T, &U, pECC); - - for(bitH=MSB_BNU(pH, lenKH)-1; bitH>0; bitH--) { - int hBit = TST_BIT(pH, bitH); - int kBit = TST_BIT(pK, bitH); - ECCP_DblPoint(pR, pR, pECC, pList); - if( hBit && !kBit ) - ECCP_AddPoint(pR, &T, pR, pECC, pList); - if(!hBit && kBit ) - ECCP_AddPoint(pR, &U, pR, pECC, pList); - } - } -} - -#else -#pragma message ("ECCP_MulPoint: SCCM version") - -void ECCP_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - Ipp8u* pScratchAligned = ECP_SCCMBUFF(pECC); - - BNU_CHUNK_T* pN = BN_NUMBER(bnN); - cpSize nsN = BN_SIZE(bnN); - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int w = cpECCP_OptimalWinSize(scalarBitSize); - /* number of table entries */ - int nPrecomputed = 1<>shift) & dmask; - - /* initialize result (ECP_FINITE_POINT|ECP_PROJECTIVE) */ - cpECCP_ScrambleGet(pR, coordSize, pScratchAligned+windowVal, nPrecomputed); - ECP_POINT_AFFINE(pR) = 0; - - /* initialize temporary T (ECP_PROJECTIVE) */ - ECP_POINT_AFFINE(&T) = 0; - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - /* w times doubling */ - int k; - for(k=0; k>shift) & dmask; - - /* extract value from the pre-computed table */ - cpECCP_ScrambleGet(&T, coordSize, pScratchAligned+windowVal, nPrecomputed); - - /* and add it */ - ECCP_AddPoint(pR, &T, pR, pECC, pList); - } - } - } -} -#endif - -#if 0 -void ECCP_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - int n; - - IppsECCPPointState tmpPoint[15]; - IppsBigNumState* pX = cpBigNumListGet(&pList); - IppsBigNumState* pY = cpBigNumListGet(&pList); - - /* allocate temporary points */ - { - for(n=0; n<15; n++) { - ECP_POINT_X(&tmpPoint[n]) = cpBigNumListGet(&pList); - ECP_POINT_Y(&tmpPoint[n]) = cpBigNumListGet(&pList); - ECP_POINT_Z(&tmpPoint[n]) = cpBigNumListGet(&pList); - } - } - - /* precomputation */ - if( ippBigNumPOS == BN_SIGN(bnN) ) - ECCP_CopyPoint(pP, &tmpPoint[0]); - else - ECCP_NegPoint(pP, &tmpPoint[0], pECC); - - ECCP_GetPointAffine(pX, pY, &tmpPoint[0], pECC, pList); - ECCP_SetPointAffine(pX, pY, &tmpPoint[0], pECC); - - for(n=1; n<15; n+=2) { - ECCP_DblPoint(&tmpPoint[n/2], &tmpPoint[n], pECC, pList); - ECCP_GetPointAffine(pX, pY, &tmpPoint[n], pECC, pList); - ECCP_SetPointAffine(pX, pY, &tmpPoint[n], pECC); - - ECCP_AddPoint(&tmpPoint[n], &tmpPoint[0], &tmpPoint[n+1], pECC, pList); - ECCP_GetPointAffine(pX, pY, &tmpPoint[n+1], pECC, pList); - ECCP_SetPointAffine(pX, pY, &tmpPoint[n+1], pECC); - } - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=BN_SIZE(bnN); n>0; n--) { - Ipp32u scalar = BN_NUMBER(bnN)[n-1]; - - int shift; - for(shift=(32-4); shift>=0; shift-=4) { - int m; - int tblIdx = (scalar>>shift) & 0xF; - - if( !ECCP_IsPointAtInfinity(pR) ) { - for(m=0; m<4; m++) - ECCP_DblPoint(pR, pR, pECC, pList); - } - if( tblIdx ) - ECCP_AddPoint(pR, &tmpPoint[tblIdx-1], pR, pECC, pList); - } - } - } -} -#endif - -void ECCP_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - ECCP_MulPoint(ECP_GENC(pECC), pK, pR, pECC, pList); -} - -/* -// ECCP_ProdPoint -// -// Point product -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalars */ - if( IsZero_BN(bnPscalar) ) { - ECCP_MulPoint(pQ, bnQscalar, pR, pECC, pList); - return; - } - if( IsZero_BN(bnQscalar) ) { - ECCP_MulPoint(pP, bnPscalar, pR, pECC, pList); - return; - } - - /* - // point product - */ - else { - int n; - Ipp32u* pbnPscalar = BN_NUMBER(bnPscalar); - int bnPscalarSize = BN_SIZE(bnPscalar); - Ipp32u* pbnQscalar = BN_NUMBER(bnQscalar); - int bnQscalarSize = BN_SIZE(bnQscalar); - - int size = bnPscalarSize>bnQscalarSize? bnPscalarSize : bnQscalarSize; - - IppsECCPPointState* pPointPQ[4] = {NULL, NULL, NULL, NULL}; - - /* allocate temporary PQ point */ - IppsECCPPointState PQ; - ECP_POINT_X(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Y(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Z(&PQ) = cpBigNumListGet(&pList); - - /* init temporary point array */ - if(ippBigNumPOS == BN_SIGN(bnPscalar)) - pPointPQ[1] = (IppsECCPPointState*)pP; - else { - IppsECCPPointState P; - ECP_POINT_X(&P) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P) = cpBigNumListGet(&pList); - ECCP_NegPoint(pP, &P, pECC); - pPointPQ[1] = &P; - } - if(ippBigNumPOS == BN_SIGN(bnQscalar)) - pPointPQ[2] = (IppsECCPPointState*)pQ; - else { - IppsECCPPointState Q; - ECP_POINT_X(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Y(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Z(&Q) = cpBigNumListGet(&pList); - ECCP_NegPoint(pQ, &Q, pECC); - pPointPQ[2] = &Q; - } - - ECCP_AddPoint(pPointPQ[1], pPointPQ[2], &PQ, pECC, pList); - ECCP_GetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC, pList); - ECCP_SetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC); - pPointPQ[3] = &PQ; - - /* pad scalars by zeros */ - ZEXPAND_BNU(pbnPscalar,bnPscalarSize, size); - ZEXPAND_BNU(pbnQscalar,bnQscalarSize, size); - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=size; n>0; n--) { - Ipp32u scalarPn = pbnPscalar[n-1]; - Ipp32u scalarQn = pbnQscalar[n-1]; - - int nBit; - for(nBit=31; nBit>=0; nBit--) { - int - PnQnBits = scalarPn&0x80000000? 1:0; - PnQnBits+= scalarQn&0x80000000? 2:0; - - if( !ECCP_IsPointAtInfinity(pR) ) - ECCP_DblPoint(pR, pR, pECC, pList); - if( PnQnBits ) - ECCP_AddPoint(pR, pPointPQ[PnQnBits], pR, pECC, pList); - - scalarPn <<= 1; - scalarQn <<= 1; - } - } - } -} -#else -#pragma message ("ECCP_ProdPoint: SCCM version") -void ECCP_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsECCPPointState T; - IppsECCPPointState U; - - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - - ECCP_MulPoint(pP, bnPscalar, &T, (IppsECCPState*)pECC, pList); - ECCP_MulPoint(pQ, bnQscalar, &U, (IppsECCPState*)pECC, pList); - ECCP_AddPoint(&T, &U, pR, pECC, pList); -} -#endif diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodsm2.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodsm2.h deleted file mode 100644 index 12b59bccdb..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodsm2.h +++ /dev/null @@ -1,120 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Definitions of methods over SM2 curve -// -// -*/ - -#if !defined(_PCP_ECCP_SM2_METHOD_H) -#define _PCP_ECCP_SM2_METHOD_H - -#include "pcpeccp.h" - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP_SM2_Methods(void); - - -/* -// Point Set. These operations implies -// transformation of regular coordinates into internal format -*/ -void ECCP_SM2_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -void ECCP_SM2_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC); - -/* -// Get Point. These operations implies -// transformation of internal format coordinates into regular -*/ -//void ECCP256_GetPointProjective(IppsBigNumState* pX, -// IppsBigNumState* pY, -// IppsBigNumState* pZ, -// const IppsECCPPointState* pPoint, -// const IppsECCPState* pECC); - -void ECCP_SM2_GetPointAffine(IppsBigNumState* pX, - IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Test is On EC -*/ -int ECCP_SM2_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList); - -/* -// Operations -*/ -int ECCP_SM2_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_SM2_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC); - -void ECCP_SM2_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_SM2_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_SM2_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_SM2_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - -void ECCP_SM2_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList); - - - -#endif /* _PCP_ECCP_SM2_METHOD_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodsm2ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodsm2ca.c deleted file mode 100644 index 04d17a5bf4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpmethodsm2ca.c +++ /dev/null @@ -1,879 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC methods over GF(P256) SM2 -// -// Contents: -// ECCP_SM2_SetPointProjective() -// ECCP_SM2_SetPointAffine() -// ECCP_SM2_GetPointAffine() -// -// ECCP_SM2_IsPointOnCurve() -// -// ECCP_SM2_ComparePoint() -// ECCP_SM2_NegPoint() -// ECCP_SM2_DblPoint() -// ECCP_SM2_AddPoint() -// ECCP_SM2_MulPoint() -// ECCP_SM2_ProdPoint() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_SM2_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" -#include "pcpeccpmethodsm2.h" -#include "pcppmasm2.h" - -/* - NOTE: - ECCP256 methods are used representation of point coordinates - in regular (usual residue) domain, because of special modular reduction -*/ -static -ECCP_METHOD ECCP_SM2 = { - ECCP_SM2_SetPointProjective, - ECCP_SM2_SetPointAffine, - ECCP_SM2_GetPointAffine, - - ECCP_SM2_IsPointOnCurve, - - ECCP_SM2_ComparePoint, - ECCP_SM2_NegPoint, - ECCP_SM2_DblPoint, - ECCP_SM2_AddPoint, - ECCP_SM2_MulPoint, - ECCP_SM2_MulBasePoint, - ECCP_SM2_ProdPoint -}; - - -/* -// Returns reference -*/ -ECCP_METHOD* ECCP_SM2_Methods(void) -{ - return &ECCP_SM2; -} - -/* -// ECCP_SM2_PoinSettProjective -// Converts regular projective triplet (pX,pY,pZ) into pPoint -// (see note above) -*/ -void ECCP_SM2_SetPointProjective(const IppsBigNumState* pX, - const IppsBigNumState* pY, - const IppsBigNumState* pZ, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(ECP_POINT_X(pPoint), pX); - cpBN_copy(ECP_POINT_Y(pPoint), pY); - cpBN_copy(ECP_POINT_Z(pPoint), pZ); - ECP_POINT_AFFINE(pPoint) = cpBN_cmp(pZ, BN_ONE_REF())==0; -} - -/* -// ECCP_SM2_PointAffineSet -// Converts regular affine pair (pX,pY) into pPoint -*/ -void ECCP_SM2_SetPointAffine(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - ECCP_SM2_SetPointProjective(pX, pY, BN_ONE_REF(), pPoint, pECC); -} - -/* -// ECCP_SM2_GetPointProjective -// Converts pPoint into regular projective triplet (pX,pY,pZ) -*/ -#if 0 -void ECCP_SM2_GetPointProjective(IppsBigNumState* pX, - IppsBigNumState* pY, - IppsBigNumState* pZ, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - cpBN_copy(pX, ECP_POINT_X(pPoint)); - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - cpBN_copy(pZ, ECP_POINT_Z(pPoint)); -} -#endif - -/* -// ECCP_SM2_GetPointAffine -// -// Converts pPoint into regular affine pair (pX,pY) -// -// Note: -// pPoint is not point at Infinity -// transform (X, Y, Z) into (x, y) = (X/Z^2, Y/Z^3) -*/ -void ECCP_SM2_GetPointAffine(IppsBigNumState* pX, IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* case Z == 1 */ - if( ECP_POINT_AFFINE(pPoint) ) { - if(pX) { - cpBN_copy(pX, ECP_POINT_X(pPoint)); - } - if(pY) { - cpBN_copy(pY, ECP_POINT_Y(pPoint)); - } - } - - /* case Z != 1 */ - else { - //IppsMontState* pMont = ECP_PMONT(pECC); - IppsBigNumState* pModulo = ECP_PRIME(pECC); - - IppsBigNumState* pT = cpBigNumListGet(&pList); - IppsBigNumState* pU = cpBigNumListGet(&pList); - //IppsBigNumState* pModulo = cpBigNumListGet(&pList); - //BN_Set(MNT_MODULUS(pMont), MNT_SIZE(pMont), pModulo); - - /* U = 1/Z */ - PMAsm2_inv(pU, ECP_POINT_Z(pPoint), pModulo); - /* T = 1/(Z^2) */ - PMAsm2_sqr(pT, pU); - - if(pX) { - PMAsm2_mul(pX,pT, ECP_POINT_X(pPoint)); - cpBN_fix(pX); - } - if(pY) { - /* U = 1/(Z^3) */ - PMAsm2_mul(pU, pU, pT); - PMAsm2_mul(pY,pU, ECP_POINT_Y(pPoint)); - cpBN_fix(pY); - } - } -} - -/* -// ECCP_SM2_IsPointOnCurve -// -// Test point is lie on curve -// -// Note -// We deal with equation: y^2 = x^3 + A*x + B. -// Or in projective coordinates: Y^2 = X^3 + a*X*Z^4 + b*Z^6. -// The point under test is given by projective triplet (X,Y,Z), -// which represents actually (x,y) = (X/Z^2,Y/Z^3). -*/ -int ECCP_SM2_IsPointOnCurve(const IppsECCPPointState* pPoint, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* let think Infinity point is on the curve */ - if( ECCP_IsPointAtInfinity(pPoint) ) - return 1; - - else { - IppsBigNumState* pR = cpBigNumListGet(&pList); - IppsBigNumState* pT = cpBigNumListGet(&pList); - - PMAsm2_sqr(pR, ECP_POINT_X(pPoint)); // R = X^3 - PMAsm2_mul(pR, pR, ECP_POINT_X(pPoint)); - - /* case Z != 1 */ - if( !ECP_POINT_AFFINE(pPoint) ) { - IppsBigNumState* pZ4 = cpBigNumListGet(&pList); - IppsBigNumState* pZ6 = cpBigNumListGet(&pList); - PMAsm2_sqr(pT, ECP_POINT_Z(pPoint)); // Z^2 - PMAsm2_sqr(pZ4, pT); // Z^4 - PMAsm2_mul(pZ6, pZ4, pT); // Z^6 - - PMAsm2_mul(pT, pZ4, ECP_POINT_X(pPoint)); // T = X*Z^4 - if( ECP_AMI3(pECC) ) { - IppsBigNumState* pU = cpBigNumListGet(&pList); - PMAsm2_add(pU, pT, pT); // R = X^3 +a*X*Z^4 - PMAsm2_add(pU, pU, pT); - PMAsm2_sub(pR, pR, pU); - } - else { - PMAsm2_mul(pT, pT, ECP_A(pECC)); // R = X^3 +a*X*Z^4 - PMAsm2_add(pR, pR, pT); - } - PMAsm2_mul(pT, pZ6, ECP_B(pECC)); // R = X^3 +a*X*Z^4 + b*Z^6 - PMAsm2_add(pR, pR, pT); - - } - /* case Z == 1 */ - else { - if( ECP_AMI3(pECC) ) { - PMAsm2_add(pT, ECP_POINT_X(pPoint), ECP_POINT_X(pPoint)); // R = X^3 +a*X - PMAsm2_add(pT, pT, ECP_POINT_X(pPoint)); - PMAsm2_sub(pR, pR, pT); - } - else { - PMAsm2_mul(pT, ECP_POINT_X(pPoint), ECP_A(pECC)); // R = X^3 +a*X - PMAsm2_add(pR, pR, pT); - } - PMAsm2_add(pR, pR, ECP_B(pECC)); // R = X^3 +a*X + b - } - PMAsm2_sqr(pT, ECP_POINT_Y(pPoint)); // T = Y^2 - return 0==cpBN_cmp(pR, pT); - } -} - -/* -// ECCP_SM2_ComparePoint -// -// Compare two points: -// returns 0 => pP==pQ (maybe both pP and pQ are at Infinity) -// returns 1 => pP!=pQ -// -// Note -// In general we check: -// P_X*Q_Z^2 ~ Q_X*P_Z^2 -// P_Y*Q_Z^3 ~ Q_Y*P_Z^3 -*/ -int ECCP_SM2_ComparePoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - UNREFERENCED_PARAMETER(pECC); - - /* P or/and Q at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - return ECCP_IsPointAtInfinity(pQ)? 0:1; - if( ECCP_IsPointAtInfinity(pQ) ) - return ECCP_IsPointAtInfinity(pP)? 0:1; - - /* (P_Z==1) && (Q_Z==1) */ - if( ECP_POINT_AFFINE(pP) && ECP_POINT_AFFINE(pQ) ) - return ((0==cpBN_cmp(ECP_POINT_X(pP),ECP_POINT_X(pQ))) && (0==cpBN_cmp(ECP_POINT_Y(pP),ECP_POINT_Y(pQ))))? 0:1; - - { - IppsBigNumState* pPtmp = cpBigNumListGet(&pList); - IppsBigNumState* pQtmp = cpBigNumListGet(&pList); - IppsBigNumState* pPZ = cpBigNumListGet(&pList); - IppsBigNumState* pQZ = cpBigNumListGet(&pList); - - /* P_X*Q_Z^2 ~ Q_X*P_Z^2 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMAsm2_sqr(pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_X*Q_Z^2 */ - PMAsm2_mul(pPtmp, ECP_POINT_X(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_X(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMAsm2_sqr(pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_X*P_Z^2 */ - PMAsm2_mul(pQtmp, ECP_POINT_X(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_X(pQ)); - } - if ( cpBN_cmp(pPtmp, pQtmp) ) - return 1; /* points are different: (P_X*Q_Z^2) != (Q_X*P_Z^2) */ - - /* P_Y*Q_Z^3 ~ Q_Y*P_Z^3 */ - if( !ECP_POINT_AFFINE(pQ) ) { - PMAsm2_mul(pQZ, pQZ, ECP_POINT_Z(pQ)); /* Ptmp = P_Y*Q_Z^3 */ - PMAsm2_mul(pPtmp, ECP_POINT_Y(pP), pQZ); - } - else { - PMA_set(pPtmp, ECP_POINT_Y(pP)); - } - if( !ECP_POINT_AFFINE(pP) ) { - PMAsm2_mul(pPZ, pPZ, ECP_POINT_Z(pP)); /* Qtmp = Q_Y*P_Z^3 */ - PMAsm2_mul(pQtmp, ECP_POINT_Y(pQ), pPZ); - } - else { - PMA_set(pQtmp, ECP_POINT_Y(pQ)); - } - return cpBN_cmp(pPtmp, pQtmp)? 1:0; - } -} - -/* -// ECCP_SM2_NegPoint -// -// Negative point -*/ -void ECCP_SM2_NegPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC) -{ - UNREFERENCED_PARAMETER(pECC); - - /* test point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - BNU_CHUNK_T* pRy = BN_NUMBER(ECP_POINT_Y(pR)); - BNU_CHUNK_T* pPy = BN_NUMBER(ECP_POINT_Y(pP)); - int size = LEN_P256; - - if( pP!=pR ) { - PMA_set(ECP_POINT_X(pR), ECP_POINT_X(pP)); - PMA_set(ECP_POINT_Z(pR), ECP_POINT_Z(pP)); - ECP_POINT_AFFINE(pR) = ECP_POINT_AFFINE(pP); - } - cpSub_BNU(pRy, (BNU_CHUNK_T*)tpmSM2_p256_p, pPy, LEN_P256); - FIX_BNU(pRy,size); - BN_SIZE(ECP_POINT_Y(pR)) = size; - BN_SIGN(ECP_POINT_Y(pR)) = ippBigNumPOS; - } -} - -/* -// ECCP_SM2_DblPoint -// -// Double point -*/ -void ECCP_SM2_DblPoint(const IppsECCPPointState* pP, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* P at infinity */ - if( ECCP_IsPointAtInfinity(pP) ) - ECCP_SetPointToInfinity(pR); - - else { - IppsBigNumState* bnV = cpBigNumListGet(&pList); - IppsBigNumState* bnU = cpBigNumListGet(&pList); - IppsBigNumState* bnM = cpBigNumListGet(&pList); - IppsBigNumState* bnS = cpBigNumListGet(&pList); - IppsBigNumState* bnT = cpBigNumListGet(&pList); - - /* M = 3*X^2 + A*Z^4 */ - if( ECP_POINT_AFFINE(pP) ) { - PMAsm2_sqr(bnU, ECP_POINT_X(pP)); - PMAsm2_add(bnM, bnU, bnU); - PMAsm2_add(bnM, bnM, bnU); - PMAsm2_add(bnM, bnM, ECP_A(pECC)); - } - else if( ECP_AMI3(pECC) ) { - PMAsm2_sqr(bnU, ECP_POINT_Z(pP)); - PMAsm2_add(bnS, ECP_POINT_X(pP), bnU); - PMAsm2_sub(bnT, ECP_POINT_X(pP), bnU); - PMAsm2_mul(bnM, bnS, bnT); - PMAsm2_add(bnU, bnM, bnM); - PMAsm2_add(bnM, bnU, bnM); - } - else { - PMAsm2_sqr(bnU, ECP_POINT_X(pP)); - PMAsm2_add(bnM, bnU, bnU); - PMAsm2_add(bnM, bnM, bnU); - PMAsm2_sqr(bnU, ECP_POINT_Z(pP)); - PMAsm2_sqr(bnU, bnU); - PMAsm2_mul(bnU, bnU, ECP_A(pECC)); - PMAsm2_add(bnM, bnM, bnU); - } - - PMAsm2_add(bnV, ECP_POINT_Y(pP), ECP_POINT_Y(pP)); - - /* R_Z = 2*Y*Z */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnV); - } - else { - PMAsm2_mul(ECP_POINT_Z(pR), bnV, ECP_POINT_Z(pP)); - } - - /* S = 4*X*Y^2 */ - PMAsm2_sqr(bnT, bnV); - PMAsm2_mul(bnS, bnT, ECP_POINT_X(pP)); - - /* R_X = M^2 - 2*S */ - PMAsm2_sqr(bnU, bnM); - PMAsm2_sub(bnU, bnU, bnS); - PMAsm2_sub(ECP_POINT_X(pR), bnU, bnS); - - /* T = 8*Y^4 */ - PMAsm2_mul(bnV, bnV, ECP_POINT_Y(pP)); - PMAsm2_mul(bnT, bnT, bnV); - - /* R_Y = M*(S - R_X) - T */ - PMAsm2_sub(bnS, bnS, ECP_POINT_X(pR)); - PMAsm2_mul(bnS, bnS, bnM); - PMAsm2_sub(ECP_POINT_Y(pR), bnS, bnT); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP_SM2_AddPoint -// -// Add points -*/ -void ECCP_SM2_AddPoint(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ -#if 0 - /* test stupid call */ - if( pP == pQ ) { - ECCP_SM2_DblPoint(pP, pR, pECC, pList); - return; - } -#endif - - /* prevent operation with point at Infinity */ - if( ECCP_IsPointAtInfinity(pP) ) { - ECCP_CopyPoint(pQ, pR); - return; - } - if( ECCP_IsPointAtInfinity(pQ) ) { - ECCP_CopyPoint(pP, pR); - return; - } - - /* - // addition - */ - { - IppsBigNumState* bnU0 = cpBigNumListGet(&pList); - IppsBigNumState* bnS0 = cpBigNumListGet(&pList); - IppsBigNumState* bnU1 = cpBigNumListGet(&pList); - IppsBigNumState* bnS1 = cpBigNumListGet(&pList); - IppsBigNumState* bnW = cpBigNumListGet(&pList); - IppsBigNumState* bnR = cpBigNumListGet(&pList); - IppsBigNumState *bnT = bnU0; - IppsBigNumState *bnM = bnS0; - - /* U0 = P_X * Q_Z^2 */ - /* S0 = P_Y * Q_Z^3 */ - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU0, ECP_POINT_X(pP)); - PMA_set(bnS0, ECP_POINT_Y(pP)); - } - else { - PMAsm2_sqr(bnW, ECP_POINT_Z(pQ)); - PMAsm2_mul(bnU0,ECP_POINT_X(pP), bnW); - PMAsm2_mul(bnW, ECP_POINT_Z(pQ), bnW); - PMAsm2_mul(bnS0,ECP_POINT_Y(pP), bnW); - } - - /* U1 = Q_X * P_Z^2 */ - /* S1 = Q_Y * P_Z^3 */ - if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_X(pQ)); - PMA_set(bnS1, ECP_POINT_Y(pQ)); - } - else { - PMAsm2_sqr(bnW, ECP_POINT_Z(pP)); - PMAsm2_mul(bnU1,ECP_POINT_X(pQ), bnW); - PMAsm2_mul(bnW, ECP_POINT_Z(pP), bnW); - PMAsm2_mul(bnS1,ECP_POINT_Y(pQ), bnW); - } - - /* W = U0-U1 */ - /* R = S0-S1 */ - PMAsm2_sub(bnW, bnU0, bnU1); - PMAsm2_sub(bnR, bnS0, bnS1); - - //if( IsZero_BN(bnW) ) { - //if( IsZero_BN(bnR) ) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnW), LEN_P256, 0)) { - if(cpEqu_BNU_CHUNK(BN_NUMBER(bnR), LEN_P256, 0)) { - ECCP_SM2_DblPoint(pP, pR, pECC, pList); - return; - } - else { - ECCP_SetPointToInfinity(pR); - return; - } - } - - /* T = U0+U1 */ - /* M = S0+S1 */ - PMAsm2_add(bnT, bnU0, bnU1); - PMAsm2_add(bnM, bnS0, bnS1); - - /* R_Z = P_Z * Q_Z * W */ - if( ECP_POINT_AFFINE(pQ) && ECP_POINT_AFFINE(pP) ) { - PMA_set(ECP_POINT_Z(pR), bnW); - } - else { - if( ECP_POINT_AFFINE(pQ) ) { - PMA_set(bnU1, ECP_POINT_Z(pP)); - } - else if( ECP_POINT_AFFINE(pP) ) { - PMA_set(bnU1, ECP_POINT_Z(pQ)); - } - else { - PMAsm2_mul(bnU1, ECP_POINT_Z(pP), ECP_POINT_Z(pQ)); - } - PMAsm2_mul(ECP_POINT_Z(pR), bnU1, bnW); - } - - PMAsm2_sqr(bnU1, bnW); /* U1 = W^2 */ - PMAsm2_mul(bnS1, bnT, bnU1); /* S1 = T * W^2 */ - - /* R_X = R^2 - T * W^2 */ - PMAsm2_sqr(ECP_POINT_X(pR), bnR); - PMAsm2_sub(ECP_POINT_X(pR), ECP_POINT_X(pR), bnS1); - - /* V = T * W^2 - 2 * R_X (S1) */ - PMAsm2_sub(bnS1, bnS1, ECP_POINT_X(pR)); - PMAsm2_sub(bnS1, bnS1, ECP_POINT_X(pR)); - - /* R_Y = (V * R - M * W^3) /2 */ - PMAsm2_mul(ECP_POINT_Y(pR), bnS1, bnR); - PMAsm2_mul(bnU1, bnU1, bnW); - PMAsm2_mul(bnU1, bnU1, bnM); - PMAsm2_sub(bnU1, ECP_POINT_Y(pR), bnU1); - PMAsm2_div2(ECP_POINT_Y(pR), bnU1); - - ECP_POINT_AFFINE(pR) = 0; - } -} - -/* -// ECCP_SM2_MulPoint -// -// Multiply point by scalar -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP_SM2_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - IppsECCPPointState T; - IppsECCPPointState U; - IppsBigNumState* bnKH = cpBigNumListGet(&pList); - Ipp32u* pK; - Ipp32u* pH; - Ipp32u carry; - int lenKH; - int bitH; - - /* init result */ - ECCP_CopyPoint(pP, pR); - - /* if scalar is negative */ - if( ippBigNumNEG == BN_SIGN(bnN) ) { - /* negative R */ - ECCP_SM2_NegPoint(pR, pR, pECC); - } - - /* copy K = N and compute H=3*K */ - lenKH = BN_SIZE(bnN)+1; - pK = BN_NUMBER(bnKH); - pH = BN_BUFFER(bnKH); - Cpy_BNU(BN_NUMBER(bnN), pK, BN_SIZE(bnN)); - pK[lenKH-1] = 0; - carry = cpAdd_BNU(pH, pK, pK, lenKH); - carry = cpAdd_BNU(pH, pK, pH, lenKH); - - /* init temporary T = (X/Z^2, Y/Z^3, 1) */ - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - ECCP_SM2_GetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), pR, pECC, pList); - ECCP_SM2_SetPointAffine(ECP_POINT_X(&T), ECP_POINT_Y(&T), &T, pECC); - - /* temporary point U =-T */ - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - ECCP_SM2_NegPoint(&T, &U, pECC); - - for(bitH=MSB_BNU(pH, lenKH)-1; bitH>0; bitH--) { - int hBit = TST_BIT(pH, bitH); - int kBit = TST_BIT(pK, bitH); - ECCP_SM2_DblPoint(pR, pR, pECC, pList); - if( hBit && !kBit ) - ECCP_SM2_AddPoint(pR, &T, pR, pECC, pList); - if(!hBit && kBit ) - ECCP_SM2_AddPoint(pR, &U, pR, pECC, pList); - } - } -} - -#else -#pragma message ("ECCP_SM2_MulPoint: SCCM version") - -void ECCP_SM2_MulPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnN, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalar or input point at Infinity */ - if( IsZero_BN(bnN) || ECCP_IsPointAtInfinity(pP) ) { - ECCP_SetPointToInfinity(pR); - return; - } - - /* - // scalar multiplication - */ - else { - Ipp8u* pScratchAligned = ECP_SCCMBUFF(pECC); - - BNU_CHUNK_T* pN = BN_NUMBER(bnN); - cpSize nsN = BN_SIZE(bnN); - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int w = cpECCP_OptimalWinSize(scalarBitSize); - /* number of table entries */ - int nPrecomputed = 1<>shift) & dmask; - - /* initialize result (ECP_FINITE_POINT|ECP_PROJECTIVE) */ - cpECCP_ScrambleGet(pR, coordSize, pScratchAligned+windowVal, nPrecomputed); - ECP_POINT_AFFINE(pR) = 0; - - /* initialize temporary T (ECP_PROJECTIVE) */ - ECP_POINT_AFFINE(&T) = 0; - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - /* w times doubling */ - int k; - for(k=0; k>shift) & dmask; - - /* extract value from the pre-computed table */ - cpECCP_ScrambleGet(&T, coordSize, pScratchAligned+windowVal, nPrecomputed); - - /* and add it */ - ECCP_SM2_AddPoint(pR, &T, pR, pECC, pList); - } - } - } -} -#endif - -void ECCP_SM2_MulBasePoint(const IppsBigNumState* pK, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - ECCP_SM2_MulPoint(ECP_GENC(pECC), pK, pR, pECC, pList); -} - -/* -// ECCP_SM2_ProdPoint -// -// Point product -*/ -#if !defined (_USE_ECCP_SSCM_) -void ECCP_SM2_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - /* test zero scalars */ - if( IsZero_BN(bnPscalar) ) { - ECCP_SM2_MulPoint(pQ, bnQscalar, pR, pECC, pList); - return; - } - if( IsZero_BN(bnQscalar) ) { - ECCP_SM2_MulPoint(pP, bnPscalar, pR, pECC, pList); - return; - } - - /* - // point product - */ - else { - int n; - Ipp32u* pbnPscalar = BN_NUMBER(bnPscalar); - int bnPscalarSize = BN_SIZE(bnPscalar); - Ipp32u* pbnQscalar = BN_NUMBER(bnQscalar); - int bnQscalarSize = BN_SIZE(bnQscalar); - - int size = bnPscalarSize>bnQscalarSize? bnPscalarSize : bnQscalarSize; - - IppsECCPPointState* pPointPQ[4] = {NULL, NULL, NULL, NULL}; - - /* allocate temporary PQ point */ - IppsECCPPointState PQ; - ECP_POINT_X(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Y(&PQ) = cpBigNumListGet(&pList); - ECP_POINT_Z(&PQ) = cpBigNumListGet(&pList); - - /* init temporary point array */ - if(ippBigNumPOS == BN_SIGN(bnPscalar)) - pPointPQ[1] = (IppsECCPPointState*)pP; - else { - IppsECCPPointState P; - ECP_POINT_X(&P) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P) = cpBigNumListGet(&pList); - ECCP_SM2_NegPoint(pP, &P, pECC); - pPointPQ[1] = &P; - } - if(ippBigNumPOS == BN_SIGN(bnQscalar)) - pPointPQ[2] = (IppsECCPPointState*)pQ; - else { - IppsECCPPointState Q; - ECP_POINT_X(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Y(&Q) = cpBigNumListGet(&pList); - ECP_POINT_Z(&Q) = cpBigNumListGet(&pList); - ECCP_SM2_NegPoint(pQ, &Q, pECC); - pPointPQ[2] = &Q; - } - - ECCP_SM2_AddPoint(pPointPQ[1], pPointPQ[2], &PQ, pECC, pList); - ECCP_SM2_GetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC, pList); - ECCP_SM2_SetPointAffine(ECP_POINT_X(pR), ECP_POINT_Y(pR), &PQ, pECC); - pPointPQ[3] = &PQ; - - /* pad scalars by zeros */ - ZEXPAND_BNU(pbnPscalar,bnPscalarSize, size); - ZEXPAND_BNU(pbnQscalar,bnQscalarSize, size); - - /* init result */ - ECCP_SetPointToInfinity(pR); - - for(n=size; n>0; n--) { - Ipp32u scalarPn = pbnPscalar[n-1]; - Ipp32u scalarQn = pbnQscalar[n-1]; - - int nBit; - for(nBit=31; nBit>=0; nBit--) { - int - PnQnBits = scalarPn&0x80000000? 1:0; - PnQnBits+= scalarQn&0x80000000? 2:0; - - if( !ECCP_IsPointAtInfinity(pR) ) - ECCP_SM2_DblPoint(pR, pR, pECC, pList); - if( PnQnBits ) - ECCP_SM2_AddPoint(pR, pPointPQ[PnQnBits], pR, pECC, pList); - - scalarPn <<= 1; - scalarQn <<= 1; - } - } - } -} - -#else -#pragma message ("ECCP_SM2_ProdPoint: SCCM version") - -void ECCP_SM2_ProdPoint(const IppsECCPPointState* pP, - const IppsBigNumState* bnPscalar, - const IppsECCPPointState* pQ, - const IppsBigNumState* bnQscalar, - IppsECCPPointState* pR, - const IppsECCPState* pECC, - BigNumNode* pList) -{ - IppsECCPPointState T; - IppsECCPPointState U; - - ECP_POINT_X(&T) = cpBigNumListGet(&pList); - ECP_POINT_Y(&T) = cpBigNumListGet(&pList); - ECP_POINT_Z(&T) = cpBigNumListGet(&pList); - - ECP_POINT_X(&U) = cpBigNumListGet(&pList); - ECP_POINT_Y(&U) = cpBigNumListGet(&pList); - ECP_POINT_Z(&U) = cpBigNumListGet(&pList); - - ECCP_SM2_MulPoint(pP, bnPscalar, &T, (IppsECCPState*)pECC, pList); - ECCP_SM2_MulPoint(pQ, bnQscalar, &U, (IppsECCPState*)pECC, pList); - ECCP_SM2_AddPoint(&T, &U, pR, pECC, pList); -} -#endif - -#endif /* _ECP_SM2_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppoint.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppoint.h deleted file mode 100644 index bf13c8e02b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppoint.h +++ /dev/null @@ -1,54 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal EC Point Definitions & Function Prototypes -// -// -*/ - -#if !defined(_PCP_ECCPPOINT_H) -#define _PCP_ECCPPOINT_H - -#include "pcpeccp.h" - - -/* -// EC Point context -*/ -struct _cpECCPPoint { - IppCtxId idCtx; /* EC Point identifier */ - - IppsBigNumState* pX; /* projective X */ - IppsBigNumState* pY; /* Y */ - IppsBigNumState* pZ; /* Z coordinates */ - int affine; /* impotrant case Z=1 */ -}; - -/* -// Contetx Access Macros -*/ -#define ECP_POINT_ID(ctx) ((ctx)->idCtx) -#define ECP_POINT_X(ctx) ((ctx)->pX) -#define ECP_POINT_Y(ctx) ((ctx)->pY) -#define ECP_POINT_Z(ctx) ((ctx)->pZ) -#define ECP_POINT_AFFINE(ctx) ((ctx)->affine) -#define ECP_POINT_VALID_ID(ctx) (ECP_POINT_ID((ctx))==idCtxECCPPoint) - -#endif /* _PCP_ECCPPOINT_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppointca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppointca.c deleted file mode 100644 index 4df8d1e810..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppointca.c +++ /dev/null @@ -1,126 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC (prime) Point -// -// Contents: -// ippsECCPPointGetSize() -// ippsECCPPointInit() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccppoint.h" - - -/*F* -// Name: ippsECCPPointGetSize -// -// Purpose: Returns size of EC Point context (bytes). -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pSzie -// ippStsSizeErr 2>feBitSize -// ippStsNoErr no errors -// -// Parameters: -// feBitSize size of field element (bits) -// pSize pointer to the size of EC Point context -// -*F*/ -IPPFUN(IppStatus, ippsECCPPointGetSize, (int feBitSize, int* pSize)) -{ - /* test size's pointer */ - IPP_BAD_PTR1_RET(pSize); - - /* test size of field element */ - IPP_BADARG_RET((2>feBitSize), ippStsSizeErr); - - { - int bnSize; - ippsBigNumGetSize(BITS2WORD32_SIZE(feBitSize), &bnSize); - *pSize = sizeof(IppsECCPPointState) - + bnSize /* X coodinate */ - + bnSize /* Y coodinate */ - + bnSize /* Z coodinate */ - +(ALIGN_VAL-1); - } - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPPointInit -// -// Purpose: Init EC Point context. -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pPoint -// ippStsSizeErr 2>feBitSize -// ippStsNoErr no errors -// -// Parameters: -// feBitSize size of field element (bits) -// pECC pointer to ECC context -// -*F*/ -IPPFUN(IppStatus, ippsECCPPointInit, (int feBitSize, IppsECCPPointState* pPoint)) -{ - /* test pEC pointer */ - IPP_BAD_PTR1_RET(pPoint); - - /* use aligned context */ - pPoint = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pPoint, ALIGN_VAL) ); - - /* test size of field element */ - IPP_BADARG_RET((2>feBitSize), ippStsSizeErr); - - /* context ID */ - ECP_POINT_ID(pPoint) = idCtxECCPPoint; - - /* meaning: point was not set */ - ECP_POINT_AFFINE(pPoint) =-1; - - /* - // init other context fields - */ - { - Ipp8u* ptr = (Ipp8u*)pPoint; - int bnLen = BITS2WORD32_SIZE(feBitSize); - int bnSize; - ippsBigNumGetSize(bnLen, &bnSize); - - /* allocate coordinate buffers */ - ptr += sizeof(IppsECCPPointState); - ECP_POINT_X(pPoint) = (IppsBigNumState*)( IPP_ALIGNED_PTR(ptr,ALIGN_VAL) ); - ptr += bnSize; - ECP_POINT_Y(pPoint) = (IppsBigNumState*)( IPP_ALIGNED_PTR(ptr,ALIGN_VAL) ); - ptr += bnSize; - ECP_POINT_Z(pPoint) = (IppsBigNumState*)( IPP_ALIGNED_PTR(ptr,ALIGN_VAL) ); - - /* init coordinate buffers */ - ippsBigNumInit(bnLen, ECP_POINT_X(pPoint)); - ippsBigNumInit(bnLen, ECP_POINT_Y(pPoint)); - ippsBigNumInit(bnLen, ECP_POINT_Z(pPoint)); - } - return ippStsNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppointopca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppointopca.c deleted file mode 100644 index 02188f92f4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppointopca.c +++ /dev/null @@ -1,482 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC over Prime Finite Field (EC Point operations) -// -// Contents: -// ippsECCPSetPoint() -// ippsECCPSetPointAtInfinity() -// ippsECCPGetPoint() -// -// ippsECCPCheckPoint() -// ippsECCPComparePoint() -// -// ippsECCPNegativePoint() -// ippsECCPAddPoint() -// ippsECCPMulPointScalar() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" - - -/*F* -// Name: ippsECCPSetPoint -// -// Purpose: Converts regular affine coordinates EC point (pX,pY) -// into internal presentation - montgomery projective. -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pPoint -// NULL == pX -// NULL == pY -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pX->idCtx -// illegal pY->idCtx -// illegal pPoint->idCtx -// -// ippStsOutOfECErr point out-of EC -// -// ippStsNoErr no errors -// -// Parameters: -// pX pointer to the regular affine coordinate X -// pY pointer to the regular affine coordinate Y -// pPoint pointer to the EC Point context -// pECC pointer to the ECCP context -// -// Note: -// if B==0 and (x,y)=(0,y) then point at Infinity will be set up -// if B!=0 and (x,y)=(0,0) then point at Infinity will be set up -// else point with requested coordinates (x,y) wil be set up -// There are no check validation inside! -// -*F*/ -IPPFUN(IppStatus, ippsECCPSetPoint,(const IppsBigNumState* pX, - const IppsBigNumState* pY, - IppsECCPPointState* pPoint, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test pX and pY */ - IPP_BAD_PTR2_RET(pX,pY); - pX = (IppsBigNumState*)( IPP_ALIGNED_PTR(pX, ALIGN_VAL) ); - pY = (IppsBigNumState*)( IPP_ALIGNED_PTR(pY, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pX), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pY), ippStsContextMatchErr); - - /* test pPoint */ - IPP_BAD_PTR1_RET(pPoint); - pPoint = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pPoint, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pPoint), ippStsContextMatchErr); - - /* set affine coordinates at Infinity */ - if( ( IsZero_BN(ECP_BENC(pECC)) && ECCP_IsPointAtAffineInfinity1(pX,pY)) || - (!IsZero_BN(ECP_BENC(pECC)) && ECCP_IsPointAtAffineInfinity0(pX,pY)) ) - ECCP_SetPointToInfinity(pPoint); - /* set point */ - else { - ECP_METHOD(pECC)->SetPointProjective(pX, pY, BN_ONE_REF(), pPoint, pECC); - } - - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPSetPointAtInfinity -// -// Purpose: Set point at Infinity -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pPoint -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pPoint->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pPoint pointer to the EC Point context -// pECC pointer to the ECCP context -// -*F*/ -IPPFUN(IppStatus, ippsECCPSetPointAtInfinity,(IppsECCPPointState* pPoint, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test pPoint */ - IPP_BAD_PTR1_RET(pPoint); - pPoint = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pPoint, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pPoint), ippStsContextMatchErr); - - ECCP_SetPointToInfinity(pPoint); - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPGetPoint -// -// Purpose: Converts internal presentation EC point - montgomery projective -// into regular affine coordinates EC point (pX,pY) -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pPoint -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pPoint->idCtx -// NULL != pX, illegal pX->idCtx -// NULL != pY, illegal pY->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pX pointer to the regular affine coordinate X -// pY pointer to the regular affine coordinate Y -// pLength pointer to the length of coordinates -// pPoint pointer to the EC Point context -// pECC pointer to the ECCP context -// -*F*/ -IPPFUN(IppStatus, ippsECCPGetPoint,(IppsBigNumState* pX, - IppsBigNumState* pY, - const IppsECCPPointState* pPoint, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test source point */ - IPP_BAD_PTR1_RET(pPoint); - pPoint = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pPoint, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pPoint), ippStsContextMatchErr); - - /* test pX and pY */ - if(pX) { - pX = (IppsBigNumState*)( IPP_ALIGNED_PTR(pX, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pX), ippStsContextMatchErr); - } - if(pY) { - pY = (IppsBigNumState*)( IPP_ALIGNED_PTR(pY, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pY), ippStsContextMatchErr); - } - - if( ECCP_IsPointAtInfinity(pPoint) ) { - if( IsZero_BN(ECP_BENC(pECC)) ) - ECCP_SetPointToAffineInfinity1(pX, pY); - else - ECCP_SetPointToAffineInfinity0(pX, pY); - } - else - ECP_METHOD(pECC)->GetPointAffine(pX, pY, pPoint, pECC, ECP_BNCTX(pECC)); - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPCheckPoint -// -// Purpose: Check EC point: -// - is point lie on EC -// - is point at infinity -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pP -// NULL == pResult -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pP->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pPoint pointer to the EC Point context -// pECC pointer to the ECCP context -// pResult pointer to the result: -// ippECValid -// ippECPointIsNotValid -// ippECPointIsAtInfinite -// -*F*/ -IPPFUN(IppStatus, ippsECCPCheckPoint,(const IppsECCPPointState* pP, - IppECResult* pResult, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test point */ - IPP_BAD_PTR1_RET(pP); - pP = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pP, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pP), ippStsContextMatchErr); - - /* test pResult */ - IPP_BAD_PTR1_RET(pResult); - - if( ECCP_IsPointAtInfinity(pP) ) - *pResult = ippECPointIsAtInfinite; - else if( ECP_METHOD(pECC)->IsPointOnCurve(pP, pECC, ECP_BNCTX(pECC)) ) - *pResult = ippECValid; - else - *pResult = ippECPointIsNotValid; - - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPComparePoint -// -// Purpose: Compare two EC points -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pP -// NULL == pQ -// NULL == pResult -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pP->idCtx -// illegal pQ->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pP pointer to the EC Point context -// pQ pointer to the EC Point context -// pECC pointer to the ECCP context -// pResult pointer to the result: -// ippECPointIsEqual -// ippECPointIsNotEqual -// -*F*/ -IPPFUN(IppStatus, ippsECCPComparePoint,(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppECResult* pResult, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test points */ - IPP_BAD_PTR2_RET(pP,pQ); - pP = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pP, ALIGN_VAL) ); - pQ = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pQ, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pP), ippStsContextMatchErr); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pQ), ippStsContextMatchErr); - - /* test pResult */ - IPP_BAD_PTR1_RET(pResult); - - *pResult = ECP_METHOD(pECC)->ComparePoint(pP, pQ, pECC, ECP_BNCTX(pECC))? ippECPointIsNotEqual : ippECPointIsEqual; - - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPNegativePoint -// -// Purpose: Perforn EC point operation: R = -P -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pP -// NULL == pR -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pP->idCtx -// illegal pR->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pP pointer to the source EC Point context -// pR pointer to the resultant EC Point context -// pECC pointer to the ECCP context -// -*F*/ -IPPFUN(IppStatus, ippsECCPNegativePoint, (const IppsECCPPointState* pP, - IppsECCPPointState* pR, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test points */ - IPP_BAD_PTR2_RET(pP,pR); - pP = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pP, ALIGN_VAL) ); - pR = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pR, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pP), ippStsContextMatchErr); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pR), ippStsContextMatchErr); - - ECP_METHOD(pECC)->NegPoint(pP, pR, pECC); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPAddPoint -// -// Purpose: Perforn EC point operation: R = P+Q -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pP -// NULL == pQ -// NULL == pR -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pP->idCtx -// illegal pQ->idCtx -// illegal pR->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pP pointer to the source EC Point context -// pQ pointer to the source EC Point context -// pR pointer to the resultant EC Point context -// pECC pointer to the ECCP context -// -*F*/ -IPPFUN(IppStatus, ippsECCPAddPoint,(const IppsECCPPointState* pP, - const IppsECCPPointState* pQ, - IppsECCPPointState* pR, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test points */ - IPP_BAD_PTR3_RET(pP,pQ,pR); - pP = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pP, ALIGN_VAL) ); - pQ = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pQ, ALIGN_VAL) ); - pR = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pR, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pP), ippStsContextMatchErr); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pQ), ippStsContextMatchErr); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pR), ippStsContextMatchErr); - - if(pP==pQ) - ECP_METHOD(pECC)->DblPoint(pP, pR, pECC, ECP_BNCTX(pECC)); - else - ECP_METHOD(pECC)->AddPoint(pP, pQ, pR, pECC, ECP_BNCTX(pECC)); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsECCPMulPointScalar -// -// Purpose: Perforn EC point operation: R = k*P -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pP -// NULL == pK -// NULL == pR -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pP->idCtx -// illegal pK->idCtx -// illegal pR->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pP pointer to the source EC Point context -// pK pointer to the source BigNum multiplier context -// pR pointer to the resultant EC Point context -// pECC pointer to the ECCP context -// -*F*/ -IPPFUN(IppStatus, ippsECCPMulPointScalar,(const IppsECCPPointState* pP, - const IppsBigNumState* pK, - IppsECCPPointState* pR, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test points */ - IPP_BAD_PTR2_RET(pP,pR); - pP = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pP, ALIGN_VAL) ); - pR = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pR, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pP), ippStsContextMatchErr); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pR), ippStsContextMatchErr); - - /* test scalar */ - IPP_BAD_PTR1_RET(pK); - pK = (IppsBigNumState*)( IPP_ALIGNED_PTR(pK, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pK), ippStsContextMatchErr); - - ECP_METHOD(pECC)->MulPoint(pP, pK, pR, pECC, ECP_BNCTX(pECC)); - - return ippStsNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppublickeyca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppublickeyca.c deleted file mode 100644 index d2455d25f4..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccppublickeyca.c +++ /dev/null @@ -1,87 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC over Prime Finite Field (EC Key Generation) -// -// Contents: -// ippsECCPPublicKey() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" - - -/*F* -// Name: ippsECCPPublicKey -// -// Purpose: Calculate Public Key -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pPrivate -// NULL == pPublic -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pPrivate->idCtx -// illegal pPublic->idCtx -// -// ippStsIvalidPrivateKey !(0 < pPrivate < order) -// -// ippStsNoErr no errors -// -// Parameters: -// pPrivate pointer to the private key -// pPublic pointer to the resultant public key -// pECC pointer to the ECCP context -// -*F*/ -IPPFUN(IppStatus, ippsECCPPublicKey, (const IppsBigNumState* pPrivate, - IppsECCPPointState* pPublic, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test public key */ - IPP_BAD_PTR1_RET(pPublic); - pPublic = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pPublic, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pPublic), ippStsContextMatchErr); - - /* test private keys */ - IPP_BAD_PTR1_RET(pPrivate); - pPrivate = (IppsBigNumState*)( IPP_ALIGNED_PTR(pPrivate, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pPrivate), ippStsContextMatchErr); - IPP_BADARG_RET(!((0cpBN_cmp(pPrivate, ECP_ORDER(pECC))) ), ippStsIvalidPrivateKey); - - /* calculates public key */ - //ECP_METHOD(pECC)->MulPoint(ECP_GENC(pECC), pPrivate, pPublic, pECC, ECP_BNCTX(pECC)); - ECP_METHOD(pECC)->MulBasePoint(pPrivate, pPublic, pECC, ECP_BNCTX(pECC)); - - return ippStsNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsetkeyca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsetkeyca.c deleted file mode 100644 index dabce4dd4e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsetkeyca.c +++ /dev/null @@ -1,102 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC over Prime Finite Field (EC Key Generation) -// -// Contents: -// ippsECCPSetKeyPair() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccp.h" -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" - - -/*F* -// Name: ippsECCPSetKeyPair -// -// Purpose: Generate (private,public) Key Pair -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pPrivate -// NULL == pPublic -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pPrivate->idCtx -// illegal pPublic->idCtx -// -// ippStsNoErr no errors -// -// Parameters: -// pPrivate pointer to the private key -// pPublic pointer to the public key -// regular flag regular/ephemeral keys -// pECC pointer to the ECCP context -// -*F*/ -IPPFUN(IppStatus, ippsECCPSetKeyPair, (const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic, - IppBool regular, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - /* test ID */ - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - { - IppsBigNumState* targetPrivate; - IppsECCPPointState* targetPublic; - - if( regular ) { - targetPrivate = ECP_PRIVATE(pECC); - targetPublic = ECP_PUBLIC(pECC); - } - else { - targetPrivate = ECP_PRIVATE_E(pECC); - targetPublic = ECP_PUBLIC_E(pECC); - } - - /* set up private key request */ - if( pPrivate ) { - pPrivate = (IppsBigNumState*)( IPP_ALIGNED_PTR(pPrivate, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pPrivate), ippStsContextMatchErr); - ippsSet_BN(ippBigNumPOS, BN_SIZE32(pPrivate), (Ipp32u*)BN_NUMBER(pPrivate), targetPrivate); - } - - /* set up public key request */ - if( pPublic ) { - pPublic = (IppsECCPPointState*)( IPP_ALIGNED_PTR(pPublic, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_POINT_VALID_ID(pPublic), ippStsContextMatchErr); - - ECP_METHOD(pECC)->GetPointAffine(ECP_POINT_X(targetPublic), ECP_POINT_Y(targetPublic), pPublic, pECC, ECP_BNCTX(pECC)); - ECP_METHOD(pECC)->SetPointAffine(ECP_POINT_X(targetPublic), ECP_POINT_Y(targetPublic), targetPublic, pECC); - } - - return ippStsNoErr; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsigndsaca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsigndsaca.c deleted file mode 100644 index 182d505b20..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsigndsaca.c +++ /dev/null @@ -1,146 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// EC over Prime Finite Field (Sign, DSA version) -// -// Contents: -// ippsECCPSignDSA() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccp.h" -#include "pcpeccppoint.h" -#include "pcpeccpmethod.h" -#include "pcpeccpmethodcom.h" - - -/*F* -// Name: ippsECCPSignDSA -// -// Purpose: Signing of message representative. -// (DSA version). -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pECC -// NULL == pMsgDigest -// NULL == pPrivate -// NULL == pSignX -// NULL == pSignY -// -// ippStsContextMatchErr illegal pECC->idCtx -// illegal pMsgDigest->idCtx -// illegal pPrivate->idCtx -// illegal pSignX->idCtx -// illegal pSignY->idCtx -// -// ippStsMessageErr MsgDigest >= order -// -// ippStsRangeErr not enough room for: -// signX -// signY -// -// ippStsEphemeralKeyErr (0==signX) || (0==signY) -// -// ippStsNoErr no errors -// -// Parameters: -// pMsgDigest pointer to the message representative to be signed -// pPrivate pointer to the regular private key -// pSignX,pSignY pointer to the signature -// pECC pointer to the ECCP context -// -// Note: -// - ephemeral key pair extracted from pECC and -// must be generated and before ippsECCPDSASign() usage -// - ephemeral key pair destroy before exit -// -*F*/ -IPPFUN(IppStatus, ippsECCPSignDSA,(const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pPrivate, - IppsBigNumState* pSignX, IppsBigNumState* pSignY, - IppsECCPState* pECC)) -{ - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test private key*/ - IPP_BAD_PTR1_RET(pPrivate); - pPrivate = (IppsBigNumState*)( IPP_ALIGNED_PTR(pPrivate, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pPrivate), ippStsContextMatchErr); - - /* test message representative */ - IPP_BAD_PTR1_RET(pMsgDigest); - pMsgDigest = (IppsBigNumState*)( IPP_ALIGNED_PTR(pMsgDigest, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pMsgDigest), ippStsContextMatchErr); - IPP_BADARG_RET((0<=cpBN_cmp(pMsgDigest, ECP_ORDER(pECC))), ippStsMessageErr); - - /* test signature */ - IPP_BAD_PTR2_RET(pSignX,pSignY); - pSignX = (IppsBigNumState*)( IPP_ALIGNED_PTR(pSignX, ALIGN_VAL) ); - pSignY = (IppsBigNumState*)( IPP_ALIGNED_PTR(pSignY, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pSignX), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pSignY), ippStsContextMatchErr); - IPP_BADARG_RET((BN_ROOM(pSignX)*BITSIZE(BNU_CHUNK_T)GetPointAffine(pTmp, NULL, ECP_PUBLIC_E(pECC), pECC, pList); - - /* - // compute - // signX = eph_pub_x (mod order) - */ - PMA_mod(pSignX, pTmp, pOrder); - if( !IsZero_BN(pSignX) ) { - - IppsBigNumState* pEncMsg = cpBigNumListGet(&pList); - IppsBigNumState* pEncSignX = cpBigNumListGet(&pList); - PMA_enc(pEncMsg, (IppsBigNumState*)pMsgDigest, rMont); - PMA_enc(pEncSignX, pSignX, rMont); - - /* - // compute - // signY = (1/eph_private)*(pMsgDigest + private*signX) (mod order) - */ - PMA_inv(pSignY, ECP_PRIVATE_E(pECC), pOrder); - PMA_enc(ECP_PRIVATE_E(pECC), pPrivate, rMont); - PMA_mule(pTmp, ECP_PRIVATE_E(pECC), pEncSignX, rMont); - PMA_add(pTmp, pTmp, pEncMsg, pOrder); - PMA_mule(pSignY, pSignY, pTmp, rMont); - if( !IsZero_BN(pSignY) ) - return ippStsNoErr; - } - - return ippStsEphemeralKeyErr; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsscm.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsscm.c deleted file mode 100644 index 6978a0a8ff..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpeccpsscm.c +++ /dev/null @@ -1,160 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// ECCP SSCM stuff -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpbn.h" -#include "pcpeccppoint.h" - -#if defined (_USE_ECCP_SSCM_) -#pragma message ("ECCP SCCM version") - -//#define LOG2_CACHE_LINE_SIZE (6) /* LOG2(CACHE_LINE_SIZE) */ -#define LOG2_CACHE_LINE_SIZE (LOG_CACHE_LINE_SIZE) - -static int div_upper(int a, int d) -{ return (a+d-1)/d; } - -static int getNumOperations(int bitsize, int w) -{ - int n_overhead = (1<=n_opt) break; - w_opt = w_trial; - n_opt = n_trial; - } - return w_opt; -#undef LIMIT -} - -int cpECCP_ConvertRepresentation(BNU_CHUNK_T* pInput, int inpBits, int w) -{ - Ipp32u* pR = (Ipp32u*)pInput; - Ipp16u* pR16 = (Ipp16u*)pInput; - - int outBits = 0; - Ipp32u base = (BNU_CHUNK_T)1<>digitShift) &digitMask; - - Ipp32u delta = (base-digit) & ~digitMask; - delta <<= digitShift; - cpDec_BNU32((Ipp32u*)(pR16+chunkIdx), (Ipp32u*)(pR16+chunkIdx), (2*nsR-chunkIdx+1)/2, delta); - - inpBits = BITSIZE_BNU32(pR, nsR); - outBits += w; - } - - return outBits; -} - -/* -// cpsScramblePut/cpsScrambleGet -// stores to/retrieves from pScrambleEntry position -// pre-computed data if fixed window method is used -*/ -void cpECCP_ScramblePut(Ipp8u* pScrambleEntry, int proposity, - const IppsECCPPointState* pPoint, cpSize coordLen) -{ - int i; - Ipp8u* pCoord; - - BNU_CHUNK_T* pX = BN_NUMBER(ECP_POINT_X(pPoint)); - BNU_CHUNK_T* pY = BN_NUMBER(ECP_POINT_Y(pPoint)); - BNU_CHUNK_T* pZ = BN_NUMBER(ECP_POINT_Z(pPoint)); - int coordSize = coordLen*sizeof(BNU_CHUNK_T); - - ZEXPAND_BNU(pX, BN_SIZE(ECP_POINT_X(pPoint)), coordLen); - ZEXPAND_BNU(pY, BN_SIZE(ECP_POINT_Y(pPoint)), coordLen); - ZEXPAND_BNU(pZ, BN_SIZE(ECP_POINT_Z(pPoint)), coordLen); - - pCoord = (Ipp8u*)pX; - for(i=0; iidCtx -// illegal pMsgDigest->idCtx -// illegal pSignX->idCtx -// illegal pSignY->idCtx -// -// ippStsMessageErr MsgDigest >= order -// -// ippStsNoErr no errors -// -// Parameters: -// pMsgDigest pointer to the message representative to be signed -// pSignX,pSignY pointer to the signature -// pResult pointer to the result: ippECValid/ippECInvalidSignature -// pECC pointer to the ECCP context -// -// Note: -// - signer's key must be set up in ECCP context -// before ippsECCPVerifyDSA() usage -// -*F*/ -IPPFUN(IppStatus, ippsECCPVerifyDSA,(const IppsBigNumState* pMsgDigest, - const IppsBigNumState* pSignX, const IppsBigNumState* pSignY, - IppECResult* pResult, - IppsECCPState* pECC)) -{ - IppsMontState* rMont; - - /* test pECC */ - IPP_BAD_PTR1_RET(pECC); - /* use aligned EC context */ - pECC = (IppsECCPState*)( IPP_ALIGNED_PTR(pECC, ALIGN_VAL) ); - IPP_BADARG_RET(!ECP_VALID_ID(pECC), ippStsContextMatchErr); - - /* test message representative */ - IPP_BAD_PTR1_RET(pMsgDigest); - pMsgDigest = (IppsBigNumState*)( IPP_ALIGNED_PTR(pMsgDigest, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pMsgDigest), ippStsContextMatchErr); - rMont = ECP_RMONT(pECC); - IPP_BADARG_RET((0<=cpBN_cmp(pMsgDigest, ECP_ORDER(pECC))), ippStsMessageErr); - - /* test result */ - IPP_BAD_PTR1_RET(pResult); - - /* test signature */ - IPP_BAD_PTR2_RET(pSignX,pSignY); - pSignX = (IppsBigNumState*)( IPP_ALIGNED_PTR(pSignX, ALIGN_VAL) ); - pSignY = (IppsBigNumState*)( IPP_ALIGNED_PTR(pSignY, ALIGN_VAL) ); - IPP_BADARG_RET(!BN_VALID_ID(pSignX), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pSignY), ippStsContextMatchErr); - - /* test signature value */ - if( (0>cpBN_tst(pSignX)) || (0>cpBN_tst(pSignY)) || - (0<=cpBN_cmp(pSignX, ECP_ORDER(pECC))) || - (0<=cpBN_cmp(pSignY, ECP_ORDER(pECC))) ) { - *pResult = ippECInvalidSignature; - return ippStsNoErr; - } - - /* validate signature */ - else { - IppsECCPPointState P1; - - BigNumNode* pList = ECP_BNCTX(pECC); - IppsBigNumState* pH1 = cpBigNumListGet(&pList); - IppsBigNumState* pH2 = cpBigNumListGet(&pList); - IppsBigNumState* pOrder = cpBigNumListGet(&pList); - BN_Set(MNT_MODULUS(rMont), MNT_SIZE(rMont), pOrder); - - ECP_POINT_X(&P1) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P1) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P1) = cpBigNumListGet(&pList); - - PMA_inv(pH1, (IppsBigNumState*)pSignY, pOrder);/* h = 1/signY (mod order) */ - PMA_enc(pH1, pH1, rMont); - PMA_mule(pH2, (IppsBigNumState*)pSignX, pH1, rMont); /* h2 = pSignX * h (mod order) */ - PMA_mule(pH1, (IppsBigNumState*)pMsgDigest, pH1, rMont); /* h1 = pMsgDigest * h (mod order) */ -#if 0 - /* compute h1*BasePoint + h2*publicKey */ - if(ippEC_TPM_SM2_P256 == ECP_TYPE(pECC)) { - IppsECCPPointState P0; - ECP_POINT_X(&P0) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P0) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P0) = cpBigNumListGet(&pList); - ECP_METHOD(pECC)->MulBasePoint(pH1, &P0, pECC, pList); - ECP_METHOD(pECC)->MulPoint(ECP_PUBLIC(pECC), pH2, &P1, pECC, pList); - ECP_METHOD(pECC)->AddPoint(&P1, &P0, &P1, pECC, pList); - } - else - ECP_METHOD(pECC)->ProdPoint(ECP_GENC(pECC), pH1, - ECP_PUBLIC(pECC), pH2, - &P1, pECC, pList); -#endif - /* compute h1*BasePoint + h2*publicKey */ - if((IppECCPStd128r1 == ECP_TYPE(pECC)) || (IppECCPStd128r2 == ECP_TYPE(pECC)) - ||(IppECCPStd192r1 == ECP_TYPE(pECC)) - ||(IppECCPStd224r1 == ECP_TYPE(pECC)) - ||(IppECCPStd256r1 == ECP_TYPE(pECC)) - ||(IppECCPStd384r1 == ECP_TYPE(pECC)) - ||(IppECCPStd521r1 == ECP_TYPE(pECC)) - ||(IppECCPStdSM2 == ECP_TYPE(pECC))) { - IppsECCPPointState P0; - ECP_POINT_X(&P0) = cpBigNumListGet(&pList); - ECP_POINT_Y(&P0) = cpBigNumListGet(&pList); - ECP_POINT_Z(&P0) = cpBigNumListGet(&pList); - ECP_METHOD(pECC)->MulBasePoint(pH1, &P0, pECC, pList); - ECP_METHOD(pECC)->MulPoint(ECP_PUBLIC(pECC), pH2, &P1, pECC, pList); - ECP_METHOD(pECC)->AddPoint(&P1, &P0, &P1, pECC, pList); - } - else - ECP_METHOD(pECC)->ProdPoint(ECP_GENC(pECC), pH1, - ECP_PUBLIC(pECC), pH2, - &P1, pECC, pList); - - if( ECCP_IsPointAtInfinity(&P1) ) { - *pResult = ippECInvalidSignature; - return ippStsNoErr; - } - /* extract X component */ - ECP_METHOD(pECC)->GetPointAffine(pH1, NULL, &P1, pECC, pList); - /* compare with signX */ - PMA_mod(pH1, pH1, pOrder); - *pResult = (0==cpBN_cmp(pH1, pSignX))? ippECValid : ippECInvalidSignature; - return ippStsNoErr; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphash.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphash.h deleted file mode 100644 index 6ffd67a3e6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphash.h +++ /dev/null @@ -1,239 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Security Hash Standard -// Internal Definitions and Internal Functions Prototypes -// -// -*/ - -#if !defined(_PCP_HASH_H) -#define _PCP_HASH_H - - -/* messge block size */ -#define MBS_SHA1 (64) /* SHA1 message block size (bytes) */ -#define MBS_SHA256 (64) /* SHA256 and SHA224 */ -#define MBS_SHA224 (64) /* SHA224 */ -#define MBS_SHA512 (128) /* SHA512 and SHA384 */ -#define MBS_SHA384 (128) /* SHA384 */ -#define MBS_MD5 (64) /* MD5 */ -#define MBS_SM3 (64) /* SM3 */ -#define MBS_HASH_MAX (MBS_SHA512) /* max message block size (bytes) */ - -#define MAX_HASH_SIZE (IPP_SHA512_DIGEST_BITSIZE/8) /* hash of the max len (bytes) */ - -/* hold some old definition for a purpose */ -typedef Ipp32u DigestSHA1[5]; /* SHA1 digest */ -typedef Ipp32u DigestSHA224[7]; /* SHA224 digest */ -typedef Ipp32u DigestSHA256[8]; /* SHA256 digest */ -typedef Ipp64u DigestSHA384[6]; /* SHA384 digest */ -typedef Ipp64u DigestSHA512[8]; /* SHA512 digest */ -typedef Ipp32u DigestMD5[4]; /* MD5 digest */ -typedef Ipp32u DigestSM3[8]; /* SM3 digest */ - -#define SHA1_ALIGNMENT ((int)(sizeof(Ipp32u))) -#define SHA224_ALIGNMENT ((int)(sizeof(Ipp32u))) -#define SHA256_ALIGNMENT ((int)(sizeof(Ipp32u))) -#define SHA384_ALIGNMENT ((int)(sizeof(Ipp32u))) -#define SHA512_ALIGNMENT ((int)(sizeof(Ipp32u))) -#define MD5_ALIGNMENT ((int)(sizeof(Ipp32u))) -#define SM3_ALIGNMENT ((int)(sizeof(Ipp32u))) - - -#if defined(_ENABLE_ALG_SHA1_) -struct _cpSHA1 { - IppCtxId idCtx; /* SHA1 identifier */ - int index; /* internal buffer entry (free) */ - Ipp64u msgLenLo; /* message length (bytes) */ - Ipp8u msgBuffer[MBS_SHA1]; /* buffer */ - DigestSHA1 msgHash; /* intermediate digest */ -}; -#endif - -#if defined(_ENABLE_ALG_SHA256_) || defined(_ENABLE_ALG_SHA224_) -struct _cpSHA256 { - IppCtxId idCtx; /* SHA224 identifier */ - int index; /* internal buffer entry (free) */ - Ipp64u msgLenLo; /* message length (bytes) */ - Ipp8u msgBuffer[MBS_SHA256]; /* buffer */ - DigestSHA256 msgHash; /* intermediate digest */ -}; -#endif - -#if defined(_ENABLE_ALG_SHA512_) || defined(_ENABLE_ALG_SHA384_) || defined(_ENABLE_ALG_SHA512_224_) || defined(_ENABLE_ALG_SHA512_256_) -struct _cpSHA512 { - IppCtxId idCtx; /* SHA384 identifier */ - int index; /* internal buffer entry (free) */ - Ipp64u msgLenLo; /* message length (bytes) */ - Ipp64u msgLenHi; /* message length (bytes) */ - Ipp8u msgBuffer[MBS_SHA512]; /* buffer */ - DigestSHA512 msgHash; /* intermediate digest */ -}; -#endif - -#if defined(_ENABLE_ALG_MD5_) -struct _cpMD5 { - IppCtxId idCtx; /* MD5 identifier */ - int index; /* internal buffer entry (free) */ - Ipp64u msgLenLo; /* message length (bytes) */ - Ipp8u msgBuffer[MBS_MD5]; /* buffer */ - DigestMD5 msgHash; /* intermediate digest */ -}; -#endif - -#if defined(_ENABLE_ALG_SM3_) -struct _cpSM3 { - IppCtxId idCtx; /* SM3 identifier */ - int index; /* internal buffer entry (free) */ - Ipp64u msgLenLo; /* message length (bits) */ - Ipp8u msgBuffer[MBS_SM3]; /* buffer */ - DigestSM3 msgHash; /* intermediate digest */ -}; -#endif - -/* -// Useful macros -*/ -#define SHS_ID(stt) ((stt)->idCtx) -#define SHS_INDX(stt) ((stt)->index) -#define SHS_LENL(stt) ((stt)->msgLenLo) -#define SHS_LENH(stt) ((stt)->msgLenHi) -#define SHS_BUFF(stt) ((stt)->msgBuffer) -#define SHS_HASH(stt) ((stt)->msgHash) - -/* initial hash values */ -extern const Ipp32u SHA1_IV[]; -extern const Ipp32u SHA256_IV[]; -extern const Ipp32u SHA224_IV[]; -extern const Ipp64u SHA512_IV[]; -extern const Ipp64u SHA384_IV[]; -extern const Ipp32u MD5_IV[]; -extern const Ipp32u SM3_IV[]; -extern const Ipp64u SHA512_224_IV[]; -extern const Ipp64u SHA512_256_IV[]; - -/* hash alg additive constants */ -extern __ALIGN16 const Ipp32u SHA1_cnt[]; -extern __ALIGN16 const Ipp32u SHA256_cnt[]; -extern __ALIGN16 const Ipp64u SHA512_cnt[]; -extern __ALIGN16 const Ipp32u MD5_cnt[]; -extern __ALIGN16 const Ipp32u SM3_cnt[]; - -/* */ - - -/* hash alg attributes */ -typedef struct _cpHashAttr { - int ivSize; /* attr: length (bytes) of initial value cpHashIV */ - int hashSize; /* attr: length (bytes) of hash */ - int msgBlkSize; /* attr: length (bytes) of message block */ - int msgLenRepSize; /* attr: length (bytes) in representation of processed message length */ - Ipp64u msgLenMax[2]; /* attr: max message length (bytes) (low high) */ -} cpHashAttr; - - -/* hash value */ -typedef Ipp64u cpHash[IPP_SHA512_DIGEST_BITSIZE/BITSIZE(Ipp64u)]; /* hash value */ - -/* hash update function */ -typedef void (*cpHashProc)(void* pHash, const Ipp8u* pMsg, int msgLen, const void* pParam); - - - -/* hash context */ -struct _cpHashCtx { - IppCtxId idCtx; /* hash identifier */ - IppHashAlgId algID; /* hash algorithm ID */ - Ipp64u msgLenLo; /* length (bytes) of processed message: */ - Ipp64u msgLenHi; /* low and high parts */ - cpHashProc hashProc; /* hash update function */ - const void* pParam; /* optional hashProc's parameter */ - cpHash hashVal; /* intermadiate has value */ - int buffOffset; /* current buffer position */ - Ipp8u msgBuffer[MBS_HASH_MAX]; /* buffer */ -}; - -/* accessors */ -#define HASH_CTX_ID(stt) ((stt)->idCtx) -#define HASH_ALG_ID(stt) ((stt)->algID) -#define HASH_LENLO(stt) ((stt)->msgLenLo) -#define HASH_LENHI(stt) ((stt)->msgLenHi) -#define HASH_FUNC(stt) ((stt)->hashProc) -#define HASH_FUNC_PAR(stt) ((stt)->pParam) -#define HASH_VALUE(stt) ((stt)->hashVal) -#define HAHS_BUFFIDX(stt) ((stt)->buffOffset) -#define HASH_BUFF(stt) ((stt)->msgBuffer) -#define HASH_VALID_ID(pCtx) (HASH_CTX_ID((pCtx))==idCtxHash) -/* old some old accessors */ -//#define SHS_DGST(stt) HASH_VALUE((stt)) -//#define SHS_BUFF(stt) HASH_BUFF((stt)) - - -/* hash alg opt argument */ -extern const void* cpHashProcFuncOpt[]; - -/* enabled hash alg */ -extern const IppHashAlgId cpEnabledHashAlgID[]; - -/* hash alg IV (init value) */ -extern const Ipp8u* cpHashIV[]; - -/* hash alg attribute DB */ -extern const cpHashAttr cpHashAlgAttr[]; - -/* IV size helper */ -__INLINE int cpHashIvSize(IppHashAlgId algID) -{ return cpHashAlgAttr[algID].ivSize; } - -/* hash size helper */ -__INLINE int cpHashSize(IppHashAlgId algID) -{ return cpHashAlgAttr[algID].hashSize; } - -/* message block size helper */ -__INLINE int cpHashMBS(IppHashAlgId algID) -{ return cpHashAlgAttr[algID].msgBlkSize; } - -/* maps algID into enabled IppHashAlgId value */ -__INLINE IppHashAlgId cpValidHashAlg(IppHashAlgId algID) -{ - /* maps algID into the valid range */ - algID = (((int)ippHashAlg_Unknown < (int)algID) && ((int)algID < (int)ippHashAlg_MaxNo))? algID : ippHashAlg_Unknown; - return cpEnabledHashAlgID[algID]; -} - - -/* processing functions */ -void UpdateSHA1 (void* pHash, const Ipp8u* mblk, int mlen, const void* pParam); -void UpdateSHA256(void* pHash, const Ipp8u* mblk, int mlen, const void* pParam); -void UpdateSHA512(void* pHash, const Ipp8u* mblk, int mlen, const void* pParam); -void UpdateMD5 (void* pHash, const Ipp8u* mblk, int mlen, const void* pParam); -void UpdateSM3 (void* pHash, const Ipp8u* mblk, int mlen, const void* pParam); - -#if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) -void UpdateSHA1ni (void* pHash, const Ipp8u* mblk, int mlen, const void* pParam); -void UpdateSHA256ni(void* pHash, const Ipp8u* mblk, int mlen, const void* pParam); -#endif - -/* general methods */ -//void cpHashUpdate(const Ipp8u* pSrc, int len, IppsHashState* pCtx, cpHashProc hashFunc, const void* pParam, int mbs); -int cpReInitHash(IppsHashState* pCtx, IppHashAlgId algID); - -#endif /* _PCP_HASH_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashcnt.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashcnt.c deleted file mode 100644 index 1202f37197..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashcnt.c +++ /dev/null @@ -1,434 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Security Hash Standard -// Constants -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" - -#if defined( _IPP_DATA ) - -/* -// enabled hash alg IDs -*/ -const IppHashAlgId cpEnabledHashAlgID[] = { - IPP_ALG_HASH_UNKNOWN, - -#if defined(_ENABLE_ALG_SHA1_) - IPP_ALG_HASH_SHA1, -#else - IPP_ALG_HASH_UNKNOWN, -#endif - -#if defined(_ENABLE_ALG_SHA256_) - IPP_ALG_HASH_SHA256, -#else - IPP_ALG_HASH_UNKNOWN, -#endif - -#if defined(_ENABLE_ALG_SHA224_) - IPP_ALG_HASH_SHA224, -#else - IPP_ALG_HASH_UNKNOWN, -#endif - -#if defined(_ENABLE_ALG_SHA512_) - IPP_ALG_HASH_SHA512, -#else - IPP_ALG_HASH_UNKNOWN, -#endif - -#if defined(_ENABLE_ALG_SHA384_) - IPP_ALG_HASH_SHA384, -#else - IPP_ALG_HASH_UNKNOWN, -#endif - -#if defined(_ENABLE_ALG_MD5_) - IPP_ALG_HASH_MD5, -#else - IPP_ALG_HASH_UNKNOWN, -#endif - -#if defined(_ENABLE_ALG_SM3_) - IPP_ALG_HASH_SM3, -#else - IPP_ALG_HASH_UNKNOWN, -#endif - -#if defined(_ENABLE_ALG_SHA512_224_) - IPP_ALG_HASH_SHA512_224, -#else - IPP_ALG_HASH_UNKNOWN, -#endif - -#if defined(_ENABLE_ALG_SHA512_256_) - IPP_ALG_HASH_SHA512_256 -#else - IPP_ALG_HASH_UNKNOWN -#endif -}; -//////////////////////////////////////////////////////////// - -/* -// hash init values -*/ -const Ipp32u UnknownHash_IV[] = { - 0}; - -#if defined(_ENABLE_ALG_SHA1_) -const Ipp32u SHA1_IV[] = { - 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0}; -#endif - -#if defined(_ENABLE_ALG_SHA256_) -const Ipp32u SHA256_IV[] = { - 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, - 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19}; -#endif - -#if defined(_ENABLE_ALG_SHA224_) -const Ipp32u SHA224_IV[] = { - 0xC1059ED8, 0x367CD507, 0x3070DD17, 0xF70E5939, - 0xFFC00B31, 0x68581511, 0x64F98FA7, 0xBEFA4FA4}; -#endif - -#if defined(_ENABLE_ALG_SHA512_) -const Ipp64u SHA512_IV[] = { - CONST_64(0x6A09E667F3BCC908), CONST_64(0xBB67AE8584CAA73B), - CONST_64(0x3C6EF372FE94F82B), CONST_64(0xA54FF53A5F1D36F1), - CONST_64(0x510E527FADE682D1), CONST_64(0x9B05688C2B3E6C1F), - CONST_64(0x1F83D9ABFB41BD6B), CONST_64(0x5BE0CD19137E2179)}; -#endif - -#if defined(_ENABLE_ALG_SHA384_) -const Ipp64u SHA384_IV[] = { - CONST_64(0xCBBB9D5DC1059ED8), CONST_64(0x629A292A367CD507), - CONST_64(0x9159015A3070DD17), CONST_64(0x152FECD8F70E5939), - CONST_64(0x67332667FFC00B31), CONST_64(0x8EB44A8768581511), - CONST_64(0xDB0C2E0D64F98FA7), CONST_64(0x47B5481DBEFA4FA4)}; -#endif - -#if defined(_ENABLE_ALG_MD5_) -const Ipp32u MD5_IV[] = { - 0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476}; -#endif - -#if defined(_ENABLE_ALG_SM3_) -const Ipp32u SM3_IV[] = { - 0x7380166F, 0x4914B2B9, 0x172442D7, 0xDA8A0600, - 0xA96F30BC, 0x163138AA, 0xE38DEE4D, 0xB0FB0E4E}; -#endif - -#if defined(_ENABLE_ALG_SHA512_224_) -const Ipp64u SHA512_224_IV[] = { - CONST_64(0x8C3D37C819544DA2), CONST_64(0x73E1996689DCD4D6), - CONST_64(0x1DFAB7AE32FF9C82), CONST_64(0x679DD514582F9FCF), - CONST_64(0x0F6D2B697BD44DA8), CONST_64(0x77E36F7304C48942), - CONST_64(0x3F9D85A86A1D36C8), CONST_64(0x1112E6AD91D692A1)}; -#endif - -#if defined(_ENABLE_ALG_SHA512_256_) -const Ipp64u SHA512_256_IV[] = { - CONST_64(0x22312194FC2BF72C), CONST_64(0x9F555FA3C84C64C2), - CONST_64(0x2393B86B6F53B151), CONST_64(0x963877195940EABD), - CONST_64(0x96283EE2A88EFFE3), CONST_64(0xBE5E1E2553863992), - CONST_64(0x2B0199FC2C85B8AA), CONST_64(0x0EB72DDC81C52CA2)}; -#endif - -const Ipp8u* cpHashIV[] = { - (Ipp8u*)UnknownHash_IV, - - #if defined(_ENABLE_ALG_SHA1_) - (Ipp8u*)SHA1_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif - - #if defined(_ENABLE_ALG_SHA256_) - (Ipp8u*)SHA256_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif - - #if defined(_ENABLE_ALG_SHA224_) - (Ipp8u*)SHA224_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif - - #if defined(_ENABLE_ALG_SHA512_) - (Ipp8u*)SHA512_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif - - #if defined(_ENABLE_ALG_SHA384_) - (Ipp8u*)SHA384_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif - - #if defined(_ENABLE_ALG_MD5_) - (Ipp8u*)MD5_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif - - #if defined(_ENABLE_ALG_SM3_) - (Ipp8u*)SM3_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif - - #if defined(_ENABLE_ALG_SHA512_224_) - (Ipp8u*)SHA512_224_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif - - #if defined(_ENABLE_ALG_SHA512_256_) - (Ipp8u*)SHA512_256_IV, - #else - (Ipp8u*)UnknownHash_IV, - #endif -}; - -//////////////////////////////////////////////////////////// - -/* -// additive constatns -*/ -#if defined(_ENABLE_ALG_SHA1_) -__ALIGN16 const Ipp32u SHA1_cnt[] = { - 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 -}; -#endif - -#if defined(_ENABLE_ALG_SHA256_) || defined(_ENABLE_ALG_SHA224_) -__ALIGN16 const Ipp32u SHA256_cnt[] = { - 0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5, - 0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5, - 0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3, - 0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174, - 0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC, - 0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA, - 0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7, - 0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967, - 0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13, - 0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85, - 0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3, - 0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070, - 0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5, - 0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3, - 0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208, - 0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2 -}; -#endif - -#if defined(_ENABLE_ALG_SHA512_) || defined(_ENABLE_ALG_SHA384_) || defined(_ENABLE_ALG_SHA512_224_) || defined(_ENABLE_ALG_SHA512_256_) -__ALIGN16 const Ipp64u SHA512_cnt[] = { - CONST_64(0x428A2F98D728AE22), CONST_64(0x7137449123EF65CD), CONST_64(0xB5C0FBCFEC4D3B2F), CONST_64(0xE9B5DBA58189DBBC), - CONST_64(0x3956C25BF348B538), CONST_64(0x59F111F1B605D019), CONST_64(0x923F82A4AF194F9B), CONST_64(0xAB1C5ED5DA6D8118), - CONST_64(0xD807AA98A3030242), CONST_64(0x12835B0145706FBE), CONST_64(0x243185BE4EE4B28C), CONST_64(0x550C7DC3D5FFB4E2), - CONST_64(0x72BE5D74F27B896F), CONST_64(0x80DEB1FE3B1696B1), CONST_64(0x9BDC06A725C71235), CONST_64(0xC19BF174CF692694), - CONST_64(0xE49B69C19EF14AD2), CONST_64(0xEFBE4786384F25E3), CONST_64(0x0FC19DC68B8CD5B5), CONST_64(0x240CA1CC77AC9C65), - CONST_64(0x2DE92C6F592B0275), CONST_64(0x4A7484AA6EA6E483), CONST_64(0x5CB0A9DCBD41FBD4), CONST_64(0x76F988DA831153B5), - CONST_64(0x983E5152EE66DFAB), CONST_64(0xA831C66D2DB43210), CONST_64(0xB00327C898FB213F), CONST_64(0xBF597FC7BEEF0EE4), - CONST_64(0xC6E00BF33DA88FC2), CONST_64(0xD5A79147930AA725), CONST_64(0x06CA6351E003826F), CONST_64(0x142929670A0E6E70), - CONST_64(0x27B70A8546D22FFC), CONST_64(0x2E1B21385C26C926), CONST_64(0x4D2C6DFC5AC42AED), CONST_64(0x53380D139D95B3DF), - CONST_64(0x650A73548BAF63DE), CONST_64(0x766A0ABB3C77B2A8), CONST_64(0x81C2C92E47EDAEE6), CONST_64(0x92722C851482353B), - CONST_64(0xA2BFE8A14CF10364), CONST_64(0xA81A664BBC423001), CONST_64(0xC24B8B70D0F89791), CONST_64(0xC76C51A30654BE30), - CONST_64(0xD192E819D6EF5218), CONST_64(0xD69906245565A910), CONST_64(0xF40E35855771202A), CONST_64(0x106AA07032BBD1B8), - CONST_64(0x19A4C116B8D2D0C8), CONST_64(0x1E376C085141AB53), CONST_64(0x2748774CDF8EEB99), CONST_64(0x34B0BCB5E19B48A8), - CONST_64(0x391C0CB3C5C95A63), CONST_64(0x4ED8AA4AE3418ACB), CONST_64(0x5B9CCA4F7763E373), CONST_64(0x682E6FF3D6B2B8A3), - CONST_64(0x748F82EE5DEFB2FC), CONST_64(0x78A5636F43172F60), CONST_64(0x84C87814A1F0AB72), CONST_64(0x8CC702081A6439EC), - CONST_64(0x90BEFFFA23631E28), CONST_64(0xA4506CEBDE82BDE9), CONST_64(0xBEF9A3F7B2C67915), CONST_64(0xC67178F2E372532B), - CONST_64(0xCA273ECEEA26619C), CONST_64(0xD186B8C721C0C207), CONST_64(0xEADA7DD6CDE0EB1E), CONST_64(0xF57D4F7FEE6ED178), - CONST_64(0x06F067AA72176FBA), CONST_64(0x0A637DC5A2C898A6), CONST_64(0x113F9804BEF90DAE), CONST_64(0x1B710B35131C471B), - CONST_64(0x28DB77F523047D84), CONST_64(0x32CAAB7B40C72493), CONST_64(0x3C9EBE0A15C9BEBC), CONST_64(0x431D67C49C100D4C), - CONST_64(0x4CC5D4BECB3E42B6), CONST_64(0x597F299CFC657E2A), CONST_64(0x5FCB6FAB3AD6FAEC), CONST_64(0x6C44198C4A475817) -}; -#endif - -#if defined(_ENABLE_ALG_MD5_) -__ALIGN16 const Ipp32u MD5_cnt[] = { - 0xD76AA478, 0xE8C7B756, 0x242070DB, 0xC1BDCEEE, - 0xF57C0FAF, 0x4787C62A, 0xA8304613, 0xFD469501, - 0x698098D8, 0x8B44F7AF, 0xFFFF5BB1, 0x895CD7BE, - 0x6B901122, 0xFD987193, 0xA679438E, 0x49B40821, - - 0xF61E2562, 0xC040B340, 0x265E5A51, 0xE9B6C7AA, - 0xD62F105D, 0x02441453, 0xD8A1E681, 0xE7D3FBC8, - 0x21E1CDE6, 0xC33707D6, 0xF4D50D87, 0x455A14ED, - 0xA9E3E905, 0xFCEFA3F8, 0x676F02D9, 0x8D2A4C8A, - - 0xFFFA3942, 0x8771F681, 0x6D9D6122, 0xFDE5380C, - 0xA4BEEA44, 0x4BDECFA9, 0xF6BB4B60, 0xBEBFBC70, - 0x289B7EC6, 0xEAA127FA, 0xD4EF3085, 0x04881D05, - 0xD9D4D039, 0xE6DB99E5, 0x1FA27CF8, 0xC4AC5665, - - 0xF4292244, 0x432AFF97, 0xAB9423A7, 0xFC93A039, - 0x655B59C3, 0x8F0CCC92, 0xFFEFF47D, 0x85845DD1, - 0x6FA87E4F, 0xFE2CE6E0, 0xA3014314, 0x4E0811A1, - 0xF7537E82, 0xBD3AF235, 0x2AD7D2BB, 0xEB86D391 -}; -#endif - -#if defined(_ENABLE_ALG_SM3_) -__ALIGN16 const Ipp32u SM3_cnt[] = { - 0x79CC4519,0xF3988A32,0xE7311465,0xCE6228CB,0x9CC45197,0x3988A32F,0x7311465E,0xE6228CBC, - 0xCC451979,0x988A32F3,0x311465E7,0x6228CBCE,0xC451979C,0x88A32F39,0x11465E73,0x228CBCE6, - 0x9D8A7A87,0x3B14F50F,0x7629EA1E,0xEC53D43C,0xD8A7A879,0xB14F50F3,0x629EA1E7,0xC53D43CE, - 0x8A7A879D,0x14F50F3B,0x29EA1E76,0x53D43CEC,0xA7A879D8,0x4F50F3B1,0x9EA1E762,0x3D43CEC5, - 0x7A879D8A,0xF50F3B14,0xEA1E7629,0xD43CEC53,0xA879D8A7,0x50F3B14F,0xA1E7629E,0x43CEC53D, - 0x879D8A7A,0x0F3B14F5,0x1E7629EA,0x3CEC53D4,0x79D8A7A8,0xF3B14F50,0xE7629EA1,0xCEC53D43, - 0x9D8A7A87,0x3B14F50F,0x7629EA1E,0xEC53D43C,0xD8A7A879,0xB14F50F3,0x629EA1E7,0xC53D43CE, - 0x8A7A879D,0x14F50F3B,0x29EA1E76,0x53D43CEC,0xA7A879D8,0x4F50F3B1,0x9EA1E762,0x3D43CEC5 -}; -#endif - -/* -// hash alg default processing opt argument -*/ -const void* cpHashProcFuncOpt[] = { - NULL, - - #if defined(_ENABLE_ALG_SHA1_) - SHA1_cnt, - #else - NULL, - #endif - - #if defined(_ENABLE_ALG_SHA256_) - SHA256_cnt, - #else - NULL, - #endif - - #if defined(_ENABLE_ALG_SHA224_) - SHA256_cnt, - #else - NULL, - #endif - - #if defined(_ENABLE_ALG_SHA512_) - SHA512_cnt, - #else - NULL, - #endif - - #if defined(_ENABLE_ALG_SHA384_) - SHA512_cnt, - #else - NULL, - #endif - - #if defined(_ENABLE_ALG_MD5_) - MD5_cnt, - #else - NULL, - #endif - - #if defined(_ENABLE_ALG_SM3_) - SM3_cnt, - #else - NULL, - #endif - - #if defined(_ENABLE_ALG_SHA512_224_) - SHA512_cnt, - #else - NULL, - #endif - - #if defined(_ENABLE_ALG_SHA512_256_) - SHA512_cnt, - #else - NULL, - #endif -}; -//////////////////////////////////////////////////////////// - -/* hash alg attributes */ -const cpHashAttr cpHashAlgAttr[] = { - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, /* unknown */ - -#if defined(_ENABLE_ALG_SHA1_) /* sha1 / unknown */ - {IPP_SHA1_DIGEST_BITSIZE/8, IPP_SHA1_DIGEST_BITSIZE/8, MBS_SHA1, sizeof(Ipp64u), {CONST_64(0x2000000000000000-1),CONST_64(0)}}, -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, -#endif - -#if defined(_ENABLE_ALG_SHA256_) /* sha256 / unknown */ - {IPP_SHA256_DIGEST_BITSIZE/8,IPP_SHA256_DIGEST_BITSIZE/8, MBS_SHA256, sizeof(Ipp64u), {CONST_64(0x2000000000000000-1),CONST_64(0)}}, -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, -#endif - -#if defined(_ENABLE_ALG_SHA224_) /* sha224 / unknown */ - {IPP_SHA256_DIGEST_BITSIZE/8,IPP_SHA224_DIGEST_BITSIZE/8, MBS_SHA224, sizeof(Ipp64u), {CONST_64(0x2000000000000000-1),CONST_64(0)}}, -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, -#endif - -#if defined(_ENABLE_ALG_SHA512_) /* sha512 / unknown */ - {IPP_SHA512_DIGEST_BITSIZE/8,IPP_SHA512_DIGEST_BITSIZE/8, MBS_SHA512, sizeof(Ipp64u)*2, {CONST_64(0xFFFFFFFFFFFFFFFF),CONST_64(0x2000000000000000-1)}}, -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, -#endif - -#if defined(_ENABLE_ALG_SHA384_) /* sha384 / unknown */ - {IPP_SHA512_DIGEST_BITSIZE/8,IPP_SHA384_DIGEST_BITSIZE/8, MBS_SHA384, sizeof(Ipp64u)*2, {CONST_64(0xFFFFFFFFFFFFFFFF),CONST_64(0x2000000000000000-1)}}, -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, -#endif - -#if defined(_ENABLE_ALG_MD5_) /* md5 / unknown */ - {IPP_MD5_DIGEST_BITSIZE/8,IPP_MD5_DIGEST_BITSIZE/8, MBS_MD5, sizeof(Ipp64u), {CONST_64(0x2000000000000000-1),CONST_64(0)}}, -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, -#endif - -#if defined(_ENABLE_ALG_SM3_) /* sm3 / unknown */ - {IPP_SM3_DIGEST_BITSIZE/8,IPP_SM3_DIGEST_BITSIZE/8, MBS_SM3, sizeof(Ipp64u), {CONST_64(0x2000000000000000-1),CONST_64(0)}}, -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, -#endif - -#if defined(_ENABLE_ALG_SHA512_224_) /* sha512/224 / unknown */ - {IPP_SHA512_DIGEST_BITSIZE/8,IPP_SHA512_224_DIGEST_BITSIZE/8, MBS_SHA512, sizeof(Ipp64u)*2, {CONST_64(0xFFFFFFFFFFFFFFFF),CONST_64(0x2000000000000000-1)}}, -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}}, -#endif - -#if defined(_ENABLE_ALG_SHA512_256_) /* sha512/256 / unknown */ - {IPP_SHA512_DIGEST_BITSIZE/8,IPP_SHA512_256_DIGEST_BITSIZE/8, MBS_SHA512, sizeof(Ipp64u)*2, {CONST_64(0xFFFFFFFFFFFFFFFF),CONST_64(0x2000000000000000-1)}} -#else - {0, 0, 0, 0, {CONST_64(0),CONST_64(0)}} -#endif -}; - -#endif /* _IPP_DATA */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashmd5px.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashmd5px.c deleted file mode 100644 index 6eea795096..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashmd5px.c +++ /dev/null @@ -1,211 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Message block processing according to MD5 -// -// Contents: -// UpdateMD5() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" -#include "pcptool.h" - -#if !defined(_ENABLE_ALG_MD5_) -#pragma message("IPP_ALG_HASH_MD5 disabled") - -#else -#pragma message("IPP_ALG_HASH_MD5 enabled") - -#if !((_IPPXSC==_IPPXSC_S1) || (_IPPXSC==_IPPXSC_S2) || (_IPPXSC==_IPPXSC_C2) || \ - (_IPP==_IPP_M5) || \ - (_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ - (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || (_IPP32E==_IPP32E_Y8) || \ - (_IPPLP64==_IPPLP64_N8) || (_IPP32E>=_IPP32E_E9) || \ - (_IPP64==_IPP64_I7) ) - - -/* -// Magic functions defined in RFC 1321 -// -*/ -#define F(X,Y,Z) ((Z) ^ ((X) & ((Y) ^ (Z)))) /* sightly optimized form of (((X) & (Y)) | ((~(X) & (Z)))*/ -#define G(X,Y,Z) F((Z),(X),(Y)) /* replace the original (((X) & (Z)) | ((Y) & ~(Z))) */ -#define H(X,Y,Z) ((X) ^ (Y) ^ (Z)) -#define I(X,Y,Z) ((Y) ^ ((X) | ~(Z))) - -/* -// MD5 step -*/ -#define MD5_STEP(MAGIC, A,B,C,D, data, constant, nrot) \ - (A = B +ROL32((A +MAGIC(B,C,D) +data +constant), nrot)) - -/* -// MD5 left rotations (number of bits) -// depends on round type -*/ -#define F1 7 -#define F2 12 -#define F3 17 -#define F4 22 - -#define G1 5 -#define G2 9 -#define G3 14 -#define G4 20 - -#define H1 4 -#define H2 11 -#define H3 16 -#define H4 23 - -#define I1 6 -#define I2 10 -#define I3 15 -#define I4 21 - -/*F* -// Name: UpdateMD5 -// -// Purpose: Update internal hash according to input message stream. -// -// Parameters: -// uniHash pointer to in/out hash -// mblk pointer to message stream -// mlen message stream length (multiple by message block size) -// uniParam pointer to the optional parameter -// -*F*/ -void UpdateMD5(void* uinHash, const Ipp8u* mblk, int mlen, const void* uniParam) -{ - Ipp32u* digest = (Ipp32u*)uinHash; - Ipp32u* MD5_cnt_loc = (Ipp32u*)uniParam; - - for(; mlen>=MBS_MD5; mblk += MBS_MD5, mlen -= MBS_MD5) { - - /* allocate data */ - #if (IPP_ENDIAN == IPP_BIG_ENDIAN) - Ipp32u data[MBS_MD5/sizeof(Ipp32u)]; - #else - /* or just word alias */ - Ipp32u* data = (Ipp32u*)mblk; - #endif - - /* init variables */ - Ipp32u a = digest[0]; - Ipp32u b = digest[1]; - Ipp32u c = digest[2]; - Ipp32u d = digest[3]; - - #if (IPP_ENDIAN == IPP_BIG_ENDIAN) - int t; - for(t=0; t<16; t++) { - data[t] = ENDIANNESS(((Ipp32u*)mblk)[t]); - } - #endif - - /* rounds type F */ - MD5_STEP(F, a,b,c,d, data[ 0], MD5_cnt_loc[ 0], F1); - MD5_STEP(F, d,a,b,c, data[ 1], MD5_cnt_loc[ 1], F2); - MD5_STEP(F, c,d,a,b, data[ 2], MD5_cnt_loc[ 2], F3); - MD5_STEP(F, b,c,d,a, data[ 3], MD5_cnt_loc[ 3], F4); - MD5_STEP(F, a,b,c,d, data[ 4], MD5_cnt_loc[ 4], F1); - MD5_STEP(F, d,a,b,c, data[ 5], MD5_cnt_loc[ 5], F2); - MD5_STEP(F, c,d,a,b, data[ 6], MD5_cnt_loc[ 6], F3); - MD5_STEP(F, b,c,d,a, data[ 7], MD5_cnt_loc[ 7], F4); - MD5_STEP(F, a,b,c,d, data[ 8], MD5_cnt_loc[ 8], F1); - MD5_STEP(F, d,a,b,c, data[ 9], MD5_cnt_loc[ 9], F2); - MD5_STEP(F, c,d,a,b, data[10], MD5_cnt_loc[10], F3); - MD5_STEP(F, b,c,d,a, data[11], MD5_cnt_loc[11], F4); - MD5_STEP(F, a,b,c,d, data[12], MD5_cnt_loc[12], F1); - MD5_STEP(F, d,a,b,c, data[13], MD5_cnt_loc[13], F2); - MD5_STEP(F, c,d,a,b, data[14], MD5_cnt_loc[14], F3); - MD5_STEP(F, b,c,d,a, data[15], MD5_cnt_loc[15], F4); - - /* rounds type G */ - MD5_STEP(G, a,b,c,d, data[ 1], MD5_cnt_loc[16], G1); - MD5_STEP(G, d,a,b,c, data[ 6], MD5_cnt_loc[17], G2); - MD5_STEP(G, c,d,a,b, data[11], MD5_cnt_loc[18], G3); - MD5_STEP(G, b,c,d,a, data[ 0], MD5_cnt_loc[19], G4); - MD5_STEP(G, a,b,c,d, data[ 5], MD5_cnt_loc[20], G1); - MD5_STEP(G, d,a,b,c, data[10], MD5_cnt_loc[21], G2); - MD5_STEP(G, c,d,a,b, data[15], MD5_cnt_loc[22], G3); - MD5_STEP(G, b,c,d,a, data[ 4], MD5_cnt_loc[23], G4); - MD5_STEP(G, a,b,c,d, data[ 9], MD5_cnt_loc[24], G1); - MD5_STEP(G, d,a,b,c, data[14], MD5_cnt_loc[25], G2); - MD5_STEP(G, c,d,a,b, data[ 3], MD5_cnt_loc[26], G3); - MD5_STEP(G, b,c,d,a, data[ 8], MD5_cnt_loc[27], G4); - MD5_STEP(G, a,b,c,d, data[13], MD5_cnt_loc[28], G1); - MD5_STEP(G, d,a,b,c, data[ 2], MD5_cnt_loc[29], G2); - MD5_STEP(G, c,d,a,b, data[ 7], MD5_cnt_loc[30], G3); - MD5_STEP(G, b,c,d,a, data[12], MD5_cnt_loc[31], G4); - - /* rounds type H */ - MD5_STEP(H, a,b,c,d, data[ 5], MD5_cnt_loc[32], H1); - MD5_STEP(H, d,a,b,c, data[ 8], MD5_cnt_loc[33], H2); - MD5_STEP(H, c,d,a,b, data[11], MD5_cnt_loc[34], H3); - MD5_STEP(H, b,c,d,a, data[14], MD5_cnt_loc[35], H4); - MD5_STEP(H, a,b,c,d, data[ 1], MD5_cnt_loc[36], H1); - MD5_STEP(H, d,a,b,c, data[ 4], MD5_cnt_loc[37], H2); - MD5_STEP(H, c,d,a,b, data[ 7], MD5_cnt_loc[38], H3); - MD5_STEP(H, b,c,d,a, data[10], MD5_cnt_loc[39], H4); - MD5_STEP(H, a,b,c,d, data[13], MD5_cnt_loc[40], H1); - MD5_STEP(H, d,a,b,c, data[ 0], MD5_cnt_loc[41], H2); - MD5_STEP(H, c,d,a,b, data[ 3], MD5_cnt_loc[42], H3); - MD5_STEP(H, b,c,d,a, data[ 6], MD5_cnt_loc[43], H4); - MD5_STEP(H, a,b,c,d, data[ 9], MD5_cnt_loc[44], H1); - MD5_STEP(H, d,a,b,c, data[12], MD5_cnt_loc[45], H2); - MD5_STEP(H, c,d,a,b, data[15], MD5_cnt_loc[46], H3); - MD5_STEP(H, b,c,d,a, data[ 2], MD5_cnt_loc[47], H4); - - /* rounds type I */ - MD5_STEP(I, a,b,c,d, data[ 0], MD5_cnt_loc[48], I1); - MD5_STEP(I, d,a,b,c, data[ 7], MD5_cnt_loc[49], I2); - MD5_STEP(I, c,d,a,b, data[14], MD5_cnt_loc[50], I3); - MD5_STEP(I, b,c,d,a, data[ 5], MD5_cnt_loc[51], I4); - MD5_STEP(I, a,b,c,d, data[12], MD5_cnt_loc[52], I1); - MD5_STEP(I, d,a,b,c, data[ 3], MD5_cnt_loc[53], I2); - MD5_STEP(I, c,d,a,b, data[10], MD5_cnt_loc[54], I3); - MD5_STEP(I, b,c,d,a, data[ 1], MD5_cnt_loc[55], I4); - MD5_STEP(I, a,b,c,d, data[ 8], MD5_cnt_loc[56], I1); - MD5_STEP(I, d,a,b,c, data[15], MD5_cnt_loc[57], I2); - MD5_STEP(I, c,d,a,b, data[ 6], MD5_cnt_loc[58], I3); - MD5_STEP(I, b,c,d,a, data[13], MD5_cnt_loc[59], I4); - MD5_STEP(I, a,b,c,d, data[ 4], MD5_cnt_loc[60], I1); - MD5_STEP(I, d,a,b,c, data[11], MD5_cnt_loc[61], I2); - MD5_STEP(I, c,d,a,b, data[ 2], MD5_cnt_loc[62], I3); - MD5_STEP(I, b,c,d,a, data[ 9], MD5_cnt_loc[63], I4); - - /* update digest */ - digest[0] += a; - digest[1] += b; - digest[2] += c; - digest[3] += d; - } -} - -#endif -#endif /* IPP_ALG_HASH_MD5 */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha1px.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha1px.c deleted file mode 100644 index ab0d68f3b1..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha1px.c +++ /dev/null @@ -1,189 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Message block processing according to SHA1 -// -// Contents: -// UpdateSHA1() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" -#include "pcptool.h" - -//#if !defined(_ENABLE_ALG_SHA1_) -//#pragma message("IPP_ALG_HASH_SHA1 disabled") - -//#else -//#pragma message("IPP_ALG_HASH_SHA1 enabled") - -#if !((_IPPXSC==_IPPXSC_S1) || (_IPPXSC==_IPPXSC_S2) || (_IPPXSC==_IPPXSC_C2) || \ - (_IPP==_IPP_M5) || \ - (_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ - (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || (_IPP32E==_IPP32E_Y8) || \ - (_IPPLP64==_IPPLP64_N8) || (_IPP32E>=_IPP32E_E9) || \ - (_IPP64==_IPP64_I7) ) - -/* -// Magic functions defined in FIPS 180-1 -// -*/ -#define MAGIC_F0(B,C,D) (((B) & (C)) | ((~(B)) & (D))) -#define MAGIC_F1(B,C,D) ((B) ^ (C) ^ (D)) -#define MAGIC_F2(B,C,D) (((B) & (C)) | ((B) & (D)) | ((C) & (D))) -#define MAGIC_F3(B,C,D) ((B) ^ (C) ^ (D)) - -#define SHA1_STEP(A,B,C,D,E, MAGIC_FUN, W,K) \ - (E)+= ROL32((A),5) + MAGIC_FUN((B),(C),(D)) + (W) + (K); \ - (B) = ROL32((B),30) - -#define COMPACT_SHA1_STEP(A,B,C,D,E, MAGIC_FUN, W,K, t) { \ - Ipp32u _T = ROL32((A),5) + MAGIC_FUN((t)/20, (B),(C),(D)) + (E) + (W)[(t)] + (K)[(t)/20]; \ - (E) = (D); \ - (D) = (C); \ - (C) = ROL32((B),30); \ - (B) = (A); \ - (A) = _T; \ -} - -#if defined(_ALG_SHA1_COMPACT_) -__INLINE Ipp32u MagicFun(int s, Ipp32u b, Ipp32u c, Ipp32u d) -{ - switch(s) { - case 0: return MAGIC_F0(b,c,d); - case 2: return MAGIC_F2(b,c,d); - default:return MAGIC_F1(b,c,d); - } -} -#endif - - -/*F* -// Name: UpdateSHA1 -// -// Purpose: Update internal hash according to input message stream. -// -// Parameters: -// uniHash pointer to in/out hash -// mblk pointer to message stream -// mlen message stream length (multiple by message block size) -// uniParam pointer to the optional parameter -// -*F*/ -#if defined(_ALG_SHA1_COMPACT_) -#pragma message("SHA1 compact") -#endif - -void UpdateSHA1(void* uinHash, const Ipp8u* mblk, int mlen, const void *uniParam) -{ - Ipp32u* data = (Ipp32u*)mblk; - - Ipp32u* digest = (Ipp32u*)uinHash; - Ipp32u* SHA1_cnt_loc = (Ipp32u*)uniParam; - - for(; mlen>=MBS_SHA1; data += MBS_SHA1/sizeof(Ipp32u), mlen -= MBS_SHA1) { - int t; - - /* - // expand message block - */ - Ipp32u W[80]; - /* initialize the first 16 words in the array W (remember about endian) */ - for(t=0; t<16; t++) { - #if (IPP_ENDIAN == IPP_BIG_ENDIAN) - W[t] = data[t]; - #else - W[t] = ENDIANNESS(data[t]); - #endif - } - /* schedule another 80-16 words in the array W */ - for(; t<80; t++) { - W[t] = ROL32(W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16], 1); - } - - /* - // update hash - */ - { - /* init A, B, C, D, E by the the input hash */ - Ipp32u A = digest[0]; - Ipp32u B = digest[1]; - Ipp32u C = digest[2]; - Ipp32u D = digest[3]; - Ipp32u E = digest[4]; - - #if defined(_ALG_SHA1_COMPACT_) - /* steps 0-79 */ - for(t=0; t<80; t++) - COMPACT_SHA1_STEP(A,B,C,D,E, MagicFun, W, SHA1_cnt_loc, t); - - #else - /* perform 0-19 steps */ - for(t=0; t<20; t+=5) { - SHA1_STEP(A,B,C,D,E, MAGIC_F0, W[t ],SHA1_cnt_loc[0]); - SHA1_STEP(E,A,B,C,D, MAGIC_F0, W[t+1],SHA1_cnt_loc[0]); - SHA1_STEP(D,E,A,B,C, MAGIC_F0, W[t+2],SHA1_cnt_loc[0]); - SHA1_STEP(C,D,E,A,B, MAGIC_F0, W[t+3],SHA1_cnt_loc[0]); - SHA1_STEP(B,C,D,E,A, MAGIC_F0, W[t+4],SHA1_cnt_loc[0]); - } - /* perform 20-39 steps */ - for(; t<40; t+=5) { - SHA1_STEP(A,B,C,D,E, MAGIC_F1, W[t ],SHA1_cnt_loc[1]); - SHA1_STEP(E,A,B,C,D, MAGIC_F1, W[t+1],SHA1_cnt_loc[1]); - SHA1_STEP(D,E,A,B,C, MAGIC_F1, W[t+2],SHA1_cnt_loc[1]); - SHA1_STEP(C,D,E,A,B, MAGIC_F1, W[t+3],SHA1_cnt_loc[1]); - SHA1_STEP(B,C,D,E,A, MAGIC_F1, W[t+4],SHA1_cnt_loc[1]); - } - /* perform 40-59 steps */ - for(; t<60; t+=5) { - SHA1_STEP(A,B,C,D,E, MAGIC_F2, W[t ],SHA1_cnt_loc[2]); - SHA1_STEP(E,A,B,C,D, MAGIC_F2, W[t+1],SHA1_cnt_loc[2]); - SHA1_STEP(D,E,A,B,C, MAGIC_F2, W[t+2],SHA1_cnt_loc[2]); - SHA1_STEP(C,D,E,A,B, MAGIC_F2, W[t+3],SHA1_cnt_loc[2]); - SHA1_STEP(B,C,D,E,A, MAGIC_F2, W[t+4],SHA1_cnt_loc[2]); - } - /* perform 60-79 steps */ - for(; t<80; t+=5) { - SHA1_STEP(A,B,C,D,E, MAGIC_F3, W[t ],SHA1_cnt_loc[3]); - SHA1_STEP(E,A,B,C,D, MAGIC_F3, W[t+1],SHA1_cnt_loc[3]); - SHA1_STEP(D,E,A,B,C, MAGIC_F3, W[t+2],SHA1_cnt_loc[3]); - SHA1_STEP(C,D,E,A,B, MAGIC_F3, W[t+3],SHA1_cnt_loc[3]); - SHA1_STEP(B,C,D,E,A, MAGIC_F3, W[t+4],SHA1_cnt_loc[3]); - } - #endif - - /* update digest */ - digest[0] += A; - digest[1] += B; - digest[2] += C; - digest[3] += D; - digest[4] += E; - } - } -} - -#endif -//#endif /* IPP_ALG_HASH_SHA1 */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha256px.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha256px.c deleted file mode 100644 index e355de3c90..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha256px.c +++ /dev/null @@ -1,214 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Message block processing according to SHA256 -// -// Contents: -// UpdateSHA256() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" -#include "pcptool.h" - -#if !defined(_ENABLE_ALG_SHA256_) && !defined(_ENABLE_ALG_SHA224_) -#pragma message("IPP_ALG_HASH_SHA256 disabled") - -#else -#pragma message("IPP_ALG_HASH_SHA256 enabled") - -#if !((_IPPXSC==_IPPXSC_S1) || (_IPPXSC==_IPPXSC_S2) || (_IPPXSC==_IPPXSC_C2) || \ - (_IPP==_IPP_M5) || \ - (_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ - (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || (_IPP32E==_IPP32E_Y8) || \ - (_IPPLP64==_IPPLP64_N8) || (_IPP32E>=_IPP32E_E9) || \ - (_IPP64==_IPP64_I7) ) - -/* -// SHA256 Specific Macros (reference proposal 256-384-512) -*/ -#define CH(x,y,z) (((x) & (y)) ^ (~(x) & (z))) -#define MAJ(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) - -#define SUM0(x) (ROR32((x), 2) ^ ROR32((x),13) ^ ROR32((x),22)) -#define SUM1(x) (ROR32((x), 6) ^ ROR32((x),11) ^ ROR32((x),25)) - -#define SIG0(x) (ROR32((x), 7) ^ ROR32((x),18) ^ LSR32((x), 3)) -#define SIG1(x) (ROR32((x),17) ^ ROR32((x),19) ^ LSR32((x),10)) - -#define SHA256_UPDATE(i) \ - wdat[i & 15] += SIG1(wdat[(i+14)&15]) + wdat[(i+9)&15] + SIG0(wdat[(i+1)&15]) - -#define SHA256_STEP(i,j) \ - v[(7 - i) & 7] += (j ? SHA256_UPDATE(i) : wdat[i&15]) \ - + SHA256_cnt_loc[i + j] \ - + SUM1(v[(4-i)&7]) \ - + CH(v[(4-i)&7], v[(5-i)&7], v[(6-i)&7]); \ - v[(3-i)&7] += v[(7-i)&7]; \ - v[(7-i)&7] += SUM0(v[(0-i)&7]) + MAJ(v[(0-i)&7], v[(1-i)&7], v[(2-i)&7]) - -#define COMPACT_SHA256_STEP(A,B,C,D,E,F,G,H, W,K, r) { \ - Ipp32u _T1 = (H) + SUM1((E)) + CH((E),(F),(G)) + (W)[(r)] + (K)[(r)]; \ - Ipp32u _T2 = SUM0((A)) + MAJ((A),(B),(C)); \ - (H) = (G); \ - (G) = (F); \ - (F) = (E); \ - (E) = (D)+_T1; \ - (D) = (C); \ - (C) = (B); \ - (B) = (A); \ - (A) = _T1+_T2; \ -} - -/*F* -// Name: UpdateSHA256 -// -// Purpose: Update internal hash according to input message stream. -// -// Parameters: -// uniHash pointer to in/out hash -// mblk pointer to message stream -// mlen message stream length (multiple by message block size) -// uniParam pointer to the optional parameter -// -*F*/ -#if defined(_ALG_SHA256_COMPACT_) -#pragma message("SHA256 compact") - -void UpdateSHA256(void* uniHash, const Ipp8u* mblk, int mlen, const void* uniParam) -{ - Ipp32u* data = (Ipp32u*)mblk; - - Ipp32u* digest = (Ipp32u*)uniHash; - Ipp32u* SHA256_cnt_loc = (Ipp32u*)uniParam; - - for(; mlen>=MBS_SHA256; data += MBS_SHA256/sizeof(Ipp32u), mlen -= MBS_SHA256) { - int t; - - /* - // expand message block - */ - Ipp32u W[64]; - /* initialize the first 16 words in the array W (remember about endian) */ - for(t=0; t<16; t++) { - #if (IPP_ENDIAN == IPP_BIG_ENDIAN) - W[t] = data[t]; - #else - W[t] = ENDIANNESS( data[t] ); - #endif - } - for(; t<64; t++) - W[t] = SIG1(W[t-2]) + W[t-7] + SIG0(W[t-15]) + W[t-16]; - - /* - // update hash - */ - { - /* init A, B, C, D, E, F, G, H by the input hash */ - Ipp32u A = digest[0]; - Ipp32u B = digest[1]; - Ipp32u C = digest[2]; - Ipp32u D = digest[3]; - Ipp32u E = digest[4]; - Ipp32u F = digest[5]; - Ipp32u G = digest[6]; - Ipp32u H = digest[7]; - - for(t=0; t<64; t++) - COMPACT_SHA256_STEP(A,B,C,D,E,F,G,H, W,SHA256_cnt_loc, t); - - /* update hash*/ - digest[0] += A; - digest[1] += B; - digest[2] += C; - digest[3] += D; - digest[4] += E; - digest[5] += F; - digest[6] += G; - digest[7] += H; - } - } -} - -#else -void UpdateSHA256(void* uniHash, const Ipp8u* mblk, int mlen, const void* uniParam) -{ - Ipp32u* data = (Ipp32u*)mblk; - - Ipp32u* digest = (Ipp32u*)uniHash; - Ipp32u* SHA256_cnt_loc = (Ipp32u*)uniParam; - - for(; mlen>=MBS_SHA256; data += MBS_SHA256/sizeof(Ipp32u), mlen -= MBS_SHA256) { - Ipp32u wdat[16]; - int j; - - /* copy digest */ - Ipp32u v[8]; - CopyBlock(digest, v, IPP_SHA256_DIGEST_BITSIZE/BYTESIZE); - - /* initialize the first 16 words in the array W (remember about endian) */ - for(j=0; j<16; j++) { - #if (IPP_ENDIAN == IPP_BIG_ENDIAN) - wdat[j] = data[j]; - #else - wdat[j] = ENDIANNESS( data[j] ); - #endif - } - - for(j=0; j<64; j+=16) { - SHA256_STEP( 0, j); - SHA256_STEP( 1, j); - SHA256_STEP( 2, j); - SHA256_STEP( 3, j); - SHA256_STEP( 4, j); - SHA256_STEP( 5, j); - SHA256_STEP( 6, j); - SHA256_STEP( 7, j); - SHA256_STEP( 8, j); - SHA256_STEP( 9, j); - SHA256_STEP(10, j); - SHA256_STEP(11, j); - SHA256_STEP(12, j); - SHA256_STEP(13, j); - SHA256_STEP(14, j); - SHA256_STEP(15, j); - } - - /* update digest */ - digest[0] += v[0]; - digest[1] += v[1]; - digest[2] += v[2]; - digest[3] += v[3]; - digest[4] += v[4]; - digest[5] += v[5]; - digest[6] += v[6]; - digest[7] += v[7]; - } -} -#endif - -#endif -#endif /* IPP_ALG_HASH_SHA256 */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha512px.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha512px.c deleted file mode 100644 index 9e6d5fcb37..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcphashsha512px.c +++ /dev/null @@ -1,221 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Message block processing according to SHA512 -// -// Contents: -// UpdateSHA512() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" -#include "pcptool.h" - -#if !defined(_ENABLE_ALG_SHA512_) && !defined(_ENABLE_ALG_SHA_SHA384_) && !defined(_ENABLE_ALG_SHA512_224_) && !defined(_ENABLE_ALG_SHA512_256_) -#pragma message("IPP_ALG_HASH_SHA512 disabled") - -#else -#pragma message("IPP_ALG_HASH_SHA512 enabled") - -#if !((_IPPXSC==_IPPXSC_S1) || (_IPPXSC==_IPPXSC_S2) || (_IPPXSC==_IPPXSC_C2) || \ - (_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ - (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || (_IPP32E==_IPP32E_Y8) || \ - (_IPPLP64==_IPPLP64_N8) || (_IPP32E>=_IPP32E_E9) || \ - (_IPP64==_IPP64_I7) ) - -/* -// SHA512 Specific Macros (reference proposal 256-384-512) -// -// Note: All operations act on DWORDs (64-bits) -*/ -#define CH(x,y,z) (((x) & (y)) ^ (~(x) & (z))) -#define MAJ(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z))) - -#define SUM0(x) (ROR64((x),28) ^ ROR64((x),34) ^ ROR64((x),39)) -#define SUM1(x) (ROR64((x),14) ^ ROR64((x),18) ^ ROR64((x),41)) - -#define SIG0(x) (ROR64((x), 1) ^ ROR64((x), 8) ^ LSR64((x), 7)) -#define SIG1(x) (ROR64((x),19) ^ ROR64((x),61) ^ LSR64((x), 6)) - -#define SHA512_UPDATE(i) \ - wdat[i&15] += SIG1(wdat[(i+14)&15]) + wdat[(i+9)&15] + SIG0(wdat[(i+1)&15]) - -#define SHA512_STEP(i,j) \ - v[(7-i)&7] += (j ? SHA512_UPDATE(i) : wdat[i&15]) \ - + SHA512_cnt_loc[i+j] \ - + SUM1(v[(4-i)&7]) \ - + CH(v[(4-i)&7], v[(5-i)&7], v[(6-i)&7]); \ - v[(3-i)&7] += v[(7-i)&7]; \ - v[(7-i)&7] += SUM0(v[(0-i)&7]) + MAJ(v[(0-i)&7], v[(1-i)&7], v[(2-i)&7]) - -#define COMPACT_SHA512_STEP(A,B,C,D,E,F,G,H, W,K, r) { \ - Ipp64u _T1 = (H) + SUM1((E)) + CH((E),(F),(G)) + (W)[(r)] + (K)[(r)]; \ - Ipp64u _T2 = SUM0((A)) + MAJ((A),(B),(C)); \ - (H) = (G); \ - (G) = (F); \ - (F) = (E); \ - (E) = (D)+_T1; \ - (D) = (C); \ - (C) = (B); \ - (B) = (A); \ - (A) = _T1+_T2; \ -} - -/*F* -// Name: UpdateSHA512 -// -// Purpose: Update internal hash according to input message stream. -// -// Parameters: -// uniHash pointer to in/out hash -// mblk pointer to message stream -// mlen message stream length (multiple by message block size) -// uniParam pointer to the optional parameter -// -*F*/ -#if defined(_ALG_SHA512_COMPACT_) -#pragma message("SHA512 compact") - -void UpdateSHA512(void* uniHash, const Ipp8u* mblk, int mlen, const void* uniPraram) -{ - Ipp32u* data = (Ipp32u*)mblk; - - Ipp64u* digest = (Ipp64u*)uniHash; - Ipp64u* SHA512_cnt_loc = (Ipp64u*)uniPraram; - - - for(; mlen>=MBS_SHA512; data += MBS_SHA512/sizeof(Ipp32u), mlen -= MBS_SHA512) { - int t; - Ipp64u W[80]; - - /* - // expand message block - */ - /* initialize the first 16 words in the array W (remember about endian) */ - for(t=0; t<16; t++) { - Ipp32u hiX = data[2*t]; - Ipp32u loX = data[2*t+1]; - #if (IPP_ENDIAN == IPP_BIG_ENDIAN) - W[t] = MAKEDWORD(loX, hiX); - #else - W[t] = MAKEDWORD( ENDIANNESS(loX), ENDIANNESS(hiX) ); - #endif - } - for(; t<80; t++) - W[t] = SIG1(W[t-2]) + W[t-7] + SIG0(W[t-15]) + W[t-16]; - - /* - // update hash - */ - { - /* init A, B, C, D, E, F, G, H by the input hash */ - Ipp64u A = digest[0]; - Ipp64u B = digest[1]; - Ipp64u C = digest[2]; - Ipp64u D = digest[3]; - Ipp64u E = digest[4]; - Ipp64u F = digest[5]; - Ipp64u G = digest[6]; - Ipp64u H = digest[7]; - - for(t=0; t<80; t++) - COMPACT_SHA512_STEP(A,B,C,D,E,F,G,H, W,SHA512_cnt_loc, t); - - /* update hash*/ - digest[0] += A; - digest[1] += B; - digest[2] += C; - digest[3] += D; - digest[4] += E; - digest[5] += F; - digest[6] += G; - digest[7] += H; - } - } -} - -#else -void UpdateSHA512(void* uniHash, const Ipp8u* mblk, int mlen, const void* uniPraram) -{ - Ipp32u* data = (Ipp32u*)mblk; - - Ipp64u* digest = (Ipp64u*)uniHash; - Ipp64u* SHA512_cnt_loc = (Ipp64u*)uniPraram; - - for(; mlen>=MBS_SHA512; data += MBS_SHA512/sizeof(Ipp32u), mlen -= MBS_SHA512) { - Ipp64u wdat[16]; - int j; - - Ipp64u v[8]; - - /* initialize the first 16 words in the array W (remember about endian) */ - for(j=0; j<16; j++) { - Ipp32u hiX = data[2*j]; - Ipp32u loX = data[2*j+1]; - #if (IPP_ENDIAN == IPP_BIG_ENDIAN) - wdat[j] = MAKEDWORD(loX, hiX); - #else - wdat[j] = MAKEDWORD( ENDIANNESS(loX), ENDIANNESS(hiX) ); - #endif - } - - /* copy digest */ - CopyBlock(digest, v, IPP_SHA512_DIGEST_BITSIZE/BYTESIZE); - - for(j=0; j<80; j+=16) { - SHA512_STEP( 0, j); - SHA512_STEP( 1, j); - SHA512_STEP( 2, j); - SHA512_STEP( 3, j); - SHA512_STEP( 4, j); - SHA512_STEP( 5, j); - SHA512_STEP( 6, j); - SHA512_STEP( 7, j); - SHA512_STEP( 8, j); - SHA512_STEP( 9, j); - SHA512_STEP(10, j); - SHA512_STEP(11, j); - SHA512_STEP(12, j); - SHA512_STEP(13, j); - SHA512_STEP(14, j); - SHA512_STEP(15, j); - } - - /* update digest */ - digest[0] += v[0]; - digest[1] += v[1]; - digest[2] += v[2]; - digest[3] += v[3]; - digest[4] += v[4]; - digest[5] += v[5]; - digest[6] += v[6]; - digest[7] += v[7]; - } -} -#endif - -#endif -#endif /* IPP_ALG_HASH_SHA512 */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmd5ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmd5ca.c deleted file mode 100644 index 91c44e88c2..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmd5ca.c +++ /dev/null @@ -1,485 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Digesting message according to MD5 -// (derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm) -// -// Equivalent code is available from RFC 1321. -// -// Contents: -// ippsMD5GetSize() -// ippsMD5Init() -// ippsMD5Pack() -// ippsMD5Unpack() -// ippsMD5Duplicate() -// ippsMD5Update() -// ippsMD5GetTag() -// ippsMD5Final() -// ippsMD5MessageDigest() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" -#include "pcptool.h" - - -#if !defined (_ENABLE_ALG_MD5_) -#pragma message("IPP_ALG_HASH_MD5 disabled") -#else -#pragma message("IPP_ALG_HASH_MD5 enabled") - -/* -// Init MD5 digest -*/ -IppStatus InitMD5(IppsMD5State* pState) -{ - /* test state pointer */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsMD5State*)( IPP_ALIGNED_PTR(pState, MD5_ALIGNMENT) ); - - /* set state ID */ - SHS_ID(pState) = idCtxMD5; - - /* zeros message length */ - SHS_LENL(pState) = 0; - - /* message buffer is free */ - SHS_INDX(pState) = 0; - - /* setup initial digest */ - SHS_HASH(pState)[0] = MD5_IV[0]; - SHS_HASH(pState)[1] = MD5_IV[1]; - SHS_HASH(pState)[2] = MD5_IV[2]; - SHS_HASH(pState)[3] = MD5_IV[3]; - - return ippStsNoErr; -} - - -/*F* -// Name: ippsMD5GetSize -// -// Purpose: Returns size (bytes) of IppsMD5State state. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// ippStsNoErr no errors -// -// Parameters: -// pSize pointer to size -// -*F*/ -IPPFUN(IppStatus, ippsMD5GetSize,(int* pSize)) -{ - /* test pointer */ - IPP_BAD_PTR1_RET(pSize); - - *pSize = sizeof(IppsMD5State) +(MD5_ALIGNMENT-1); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsMD5Init -// -// Purpose: Init MD5 state. -// -// Returns: Reason: -// ippStsNullPtrErr pState == NULL -// ippStsNoErr no errors -// -// Parameters: -// pState pointer to the MD5 state -// -*F*/ -IPPFUN(IppStatus, ippsMD5Init,(IppsMD5State* pState)) -{ - return InitMD5(pState); -} - - -/*F* -// Name: ippsMD5Pack -// -// Purpose: Copy initialized context to the buffer. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// pCtx == NULL -// ippStsNoErr no errors -// -// Parameters: -// pCtx pointer hash state -// pSize pointer to the packed spec size -// -*F*/ -IPPFUN(IppStatus, ippsMD5Pack,(const IppsMD5State* pCtx, Ipp8u* pBuffer)) -{ - /* test pointers */ - IPP_BAD_PTR2_RET(pCtx, pBuffer); - /* use aligned context */ - pCtx = (IppsMD5State*)( IPP_ALIGNED_PTR(pCtx, MD5_ALIGNMENT) ); - /* test the context */ - IPP_BADARG_RET(idCtxMD5 !=SHS_ID(pCtx), ippStsContextMatchErr); - - CopyBlock(pCtx, pBuffer, sizeof(IppsMD5State)); - return ippStsNoErr; -} - - -/*F* -// Name: ippsMD5Unpack -// -// Purpose: Unpack buffer content into the initialized context. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// pCtx == NULL -// ippStsNoErr no errors -// -// Parameters: -// pCtx pointer hash state -// pSize pointer to the packed spec size -// -*F*/ -IPPFUN(IppStatus, ippsMD5Unpack,(const Ipp8u* pBuffer, IppsMD5State* pCtx)) -{ - /* test pointers */ - IPP_BAD_PTR2_RET(pCtx, pBuffer); - /* use aligned context */ - pCtx = (IppsMD5State*)( IPP_ALIGNED_PTR(pCtx, MD5_ALIGNMENT) ); - - CopyBlock(pBuffer, pCtx, sizeof(IppsMD5State)); - return ippStsNoErr; -} - - -/*F* -// Name: ippsMD5Duplicate -// -// Purpose: Clone MD5 state. -// -// Returns: Reason: -// ippStsNullPtrErr pSrcState == NULL -// pDstState == NULL -// ippStsContextMatchErr pSrcState->idCtx != idCtxMD5 -// pDstState->idCtx != idCtxMD5 -// ippStsNoErr no errors -// -// Parameters: -// pSrcState pointer to the source MD5 state -// pDstState pointer to the target MD5 state -// -// Note: -// pDstState may to be uninitialized by ippsMD5Init() -// -*F*/ -IPPFUN(IppStatus, ippsMD5Duplicate,(const IppsMD5State* pSrcState, IppsMD5State* pDstState)) -{ - /* test state pointers */ - IPP_BAD_PTR2_RET(pSrcState, pDstState); - /* use aligned context */ - pSrcState = (IppsMD5State*)( IPP_ALIGNED_PTR(pSrcState, MD5_ALIGNMENT) ); - pDstState = (IppsMD5State*)( IPP_ALIGNED_PTR(pDstState, MD5_ALIGNMENT) ); - /* test states ID */ - IPP_BADARG_RET(idCtxMD5 !=SHS_ID(pSrcState), ippStsContextMatchErr); - - /* copy state */ - CopyBlock(pSrcState, pDstState, sizeof(IppsMD5State)); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsMD5Update -// -// Purpose: Updates intermadiate digest based on input stream. -// -// Returns: Reason: -// ippStsNullPtrErr pSrc == NULL -// pState == NULL -// ippStsContextMatchErr pState->idCtx != idCtxMD5 -// ippStsLengthErr len <0 -// ippStsNoErr no errors -// -// Parameters: -// pSrc pointer to the input stream -// len input stream length -// pState pointer to the MD5 state -// -*F*/ -IPPFUN(IppStatus, ippsMD5Update,(const Ipp8u* pSrc, int len, IppsMD5State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsMD5State*)( IPP_ALIGNED_PTR(pState, MD5_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxMD5 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test input length */ - IPP_BADARG_RET((len<0), ippStsLengthErr); - /* test source pointer */ - IPP_BADARG_RET((len && !pSrc), ippStsNullPtrErr); - - /* - // handle non empty message - */ - if(len) { - int processingLen; - - int n = SHS_INDX(pState); - Ipp8u* pBuffer = SHS_BUFF(pState); - Ipp8u* pHash = (Ipp8u*)SHS_HASH(pState); - - Ipp64u lenLo = SHS_LENL(pState); - lenLo += len; - - /* if non empty internal buffer filling */ - if(n) { - /* copy from input stream to the internal buffer as match as possible */ - processingLen = IPP_MIN(len, (MBS_MD5 - SHS_INDX(pState))); - CopyBlock(pSrc, pBuffer+n, processingLen); - - pSrc += processingLen; - len -= processingLen; - SHS_INDX(pState) = n += processingLen; - - /* update digest if buffer full */ - if( MBS_MD5 == n) { - UpdateMD5(pHash, pBuffer, MBS_MD5, MD5_cnt); - SHS_INDX(pState) = 0; - } - } - - /* main message part processing */ - processingLen = len & ~(MBS_MD5-1); - if(processingLen) { - UpdateMD5(pHash, pSrc, processingLen, MD5_cnt); - pSrc += processingLen; - len -= processingLen; - } - - /* store rest of message into the internal buffer */ - if(len) { - CopyBlock(pSrc, pBuffer, len); - SHS_INDX(pState) += len; - } - - SHS_LENL(pState) = lenLo; - } - - return ippStsNoErr; -} - - -/* -// Compute digest -*/ -void ComputeDigestMD5(Ipp32u* pHash, const IppsMD5State* pState) -{ - const Ipp8u* stateBuff = SHS_BUFF(pState); - int stateBuffLen = SHS_INDX(pState); - - /* local buffer and it length */ - Ipp8u buffer[MBS_MD5*2]; - int bufferLen = stateBuffLen < (MBS_MD5-(int)sizeof(Ipp64u))? MBS_MD5 : MBS_MD5*2; - - /* copy rest of message into internal buffer */ - CopyBlock(stateBuff, buffer, stateBuffLen); - - /* padd message */ - buffer[stateBuffLen++] = 0x80; - PaddBlock(0, buffer+stateBuffLen, bufferLen-stateBuffLen-sizeof(Ipp64u)); - - /* message length representation */ - { - Ipp64u lo = SHS_LENL(pState); /* message length in bytes */ - lo = LSL64(lo,3); /* message length in bits */ - ((Ipp64u*)(buffer+bufferLen))[-1] = lo; - } - - /* copmplete hash computation */ - UpdateMD5(pHash, buffer, bufferLen, MD5_cnt); - - /* convert hash into big endian */ - /* is not necessary if little endian */ -} - - -/*F* -// Name: ippsMD5GetTag -// -// Purpose: Compute digest based on current state. -// Note, that futher digest update is possible -// -// Returns: Reason: -// ippStsNullPtrErr pTag == NULL -// pState == NULL -// ippStsContextMatchErr pState->idCtx != idCtxMD5 -// ippStsLengthErr max_MD5_digestLen < tagLen <1 -// ippStsNoErr no errors -// -// Parameters: -// pTag address of the output digest -// tagLen length of digest -// pState pointer to the MD5 state -// -*F*/ -IPPFUN(IppStatus, ippsMD5GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsMD5State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsMD5State*)( IPP_ALIGNED_PTR(pState, MD5_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxMD5 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pTag); - IPP_BADARG_RET((tagLen<1)||(sizeof(DigestMD5)idCtx != idCtxMD5 -// ippStsNoErr no errors -// -// Parameters: -// pMD address of the output digest -// pState pointer to the MD5 state -// -*F*/ -IPPFUN(IppStatus, ippsMD5Final,(Ipp8u* pMD, IppsMD5State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsMD5State*)( IPP_ALIGNED_PTR(pState, MD5_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxMD5 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - ComputeDigestMD5(SHS_HASH(pState), pState); - CopyBlock(SHS_HASH(pState), pMD, sizeof(DigestMD5)); - InitMD5(pState); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsMD5MessageDigest -// -// Purpose: Ddigest of the whole message. -// -// Returns: Reason: -// ippStsNullPtrErr pMsg == NULL -// pDigest == NULL -// ippStsLengthErr len <0 -// ippStsNoErr no errors -// -// Parameters: -// pMsg pointer to the input message -// len input message length -// pMD address of the output digest -// -*F*/ -IPPFUN(IppStatus, ippsMD5MessageDigest,(const Ipp8u* pMsg, int msgLen, Ipp8u* pMD)) -{ - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - /* test message length */ - IPP_BADARG_RET((msgLen<0), ippStsLengthErr); - /* test message pointer */ - IPP_BADARG_RET((msgLen && !pMsg), ippStsNullPtrErr); - - { - /* message length in the multiple MBS and the rest */ - int msgLenBlks = msgLen & (-MBS_MD5); - int msgLenRest = msgLen - msgLenBlks; - - /* init hash value */ - DigestMD5 hash = {0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476}; - - /* process main part of the message */ - if(msgLenBlks) - UpdateMD5(hash, pMsg, msgLenBlks, MD5_cnt); - - /* process message padding */ - { - #define MREP_SIZE_MD5 (sizeof(Ipp64u)) - Ipp8u buffer[MBS_MD5*2]; - int bufferLen = msgLenRest < (int)(MBS_MD5-MREP_SIZE_MD5)? (int)MBS_MD5 : (int)(MBS_MD5*2); - - /* message bitlength representation */ - Ipp64u msgLenBits = (Ipp64u)msgLen*8; - - /* copy end of message */ - CopyBlock(pMsg+msgLen-msgLenRest, buffer, msgLenRest); - - /* end of message bit */ - buffer[msgLenRest++] = 0x80; - - /* padd buffer */ - PaddBlock(0, buffer+msgLenRest, bufferLen-msgLenRest-MREP_SIZE_MD5); - /* copy message bitlength representation */ - ((Ipp64u*)(buffer+bufferLen))[-1] = msgLenBits; - - UpdateMD5(hash, buffer, bufferLen, MD5_cnt); - #undef MREP_SIZE_MD5 - } - - /* copy hash bytes */ - ((Ipp32u*)pMD)[0] = hash[0]; - ((Ipp32u*)pMD)[1] = hash[1]; - ((Ipp32u*)pMD)[2] = hash[2]; - ((Ipp32u*)pMD)[3] = hash[3]; - - return ippStsNoErr; - } -} - -#endif /* _ENABLE_ALG_MD5_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontexpbinca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontexpbinca.c deleted file mode 100644 index 37a7352c5b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontexpbinca.c +++ /dev/null @@ -1,562 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Modular Exponentiation (binary version) -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpbn.h" -#include "pcpmontgomery.h" - - -#if 0 -/* -// Exponentiation -// Y = X^e -// X and Y belongs Montgomery Domain -*/ -void cpMontExp_32u(IppsBigNumState* pY, - const IppsBigNumState* pX, Ipp32u e, - IppsMontState* pMont) -{ - if(pY!=pX) /* copy base */ - BN_copy(pX, pY); - - { - int j, back_step; - - /* Montgomery engine data */ - Ipp32u* pModulus = BN_NUMBER(MNT_MODULO(pMont)); - int mSize = BN_SIZE(MNT_MODULO(pMont)); - Ipp32u* pHelper = MNT_HELPER(pMont); - - /* result and base of exponent */ - Ipp32u* dataY = BN_NUMBER(pY); - Ipp32u* dataX = BN_BUFFER(pY); - int ySize = BN_SIZE(pY); - - /* temporary buffers */ - Ipp32u* dataT = BN_NUMBER(MNT_PRODUCT(pMont)); - Ipp32u* pBuffer = BN_BUFFER(MNT_PRODUCT(pMont)); - - /* expand result */ - ZEXPAND_BNU(dataY,ySize, mSize); - /* copy base */ - COPY_BNU(dataY,dataX, mSize); - - j = 32-NLZ32u(e)-1; - - back_step = 0; - for(j-=1; j>=0; j--) { - int i; - Ipp32u mask_pattern = (Ipp32u)(back_step-1); - - /* T = (Y[] and mask_pattern) or (X[] and ~mask_pattern) */ - for(i=0; i>j) & 0x01) & (back_step^1); - j += back_step; - } - - BN_SIZE(pY) = ySize; - } -} -#endif - -/* -// Binary method of Exponentiation -*/ -#if !defined(_USE_ERNIE_CBA_MITIGATION_) && !defined(_USE_GRES_CBA_MITIGATION_) // unsafe version -void cpSafeMontExp_Binary(IppsBigNumState* pY, - const IppsBigNumState* pX, const IppsBigNumState* pE, - IppsMontState* pMont) -{ - int k; - - /* if E==0 then Y=R mod m */ - if (pE->size == 1 && pE->number[0] == 0) { - int len = IPP_MULTIPLE_OF(pMont->n->size, BNUBASE_TYPE_SIZE); - cpMemset32u(pMont->wb->number, 0, len); - pMont->wb->number[len] = 1; - - cpMod_BNU(pMont->wb->number, len + 1, pMont->n->number, pMont->n->size, &pY->size); - - cpMemcpy32u(pY->number, pMont->wb->number, pY->size); - pY->sgn = ippBigNumPOS; - return; - } - - else { - Ipp32u* r_number = pY->workBuffer; - int r_size = pY->size; - - int flag=1; - Ipp32u power = pE->number[pE->size-1]; - - for( k = 31; k >= 0; k-- ) { - Ipp32u powd = power & 0x80000000;/* from top to bottom*/ - power <<= 1; - - if((flag == 1) && (powd == 0)) - continue; - - else if (flag == 0) { - #if defined(_USE_NN_MONTMUL_) - cpMontMul(r_number, r_size, r_number,r_size, - pMont->n->number, pMont->n->size, - r_number,&r_size, pMont->n0, pMont->wb->number); - #else - cpMontMul(r_number, r_size, r_number,r_size, - pMont->n->number, pMont->n->size, - r_number,&r_size, pMont->n0, pMont->wb->number, pMont->pBuffer); - #endif - if (powd) - #if defined(_USE_NN_MONTMUL_) - cpMontMul(r_number, r_size, pX->number,pX->size, - pMont->n->number, pMont->n->size, - r_number,&r_size, pMont->n0, pMont->wb->number); - #else - cpMontMul(r_number, r_size, pX->number,pX->size, - pMont->n->number, pMont->n->size, - r_number,&r_size, pMont->n0, pMont->wb->number, pMont->pBuffer); - #endif - } - - else { - int i; - flag = 0; - r_size = pMont->n->size; - if( pX->size < pMont->n->size ) - for(i = r_size - 1; i >= pX->size; i-- ) - r_number[i] = 0; - - for( i = pX->size - 1; i >= 0; i-- ) - r_number[i] = pX->number[i]; - } - } - - if (pE->size > 1) { - struct BNU { - Ipp32u *number; - int *size; - } BNUs[2]; - BNUs[0].number = r_number; - BNUs[0].size = &r_size; - BNUs[1].number = pX->number; - BNUs[1].size = &(((IppsBigNumState*)pX)->size); - - for( k = pE->size - 2; k >= 0; k-- ) { - int j; - Ipp32u powd = 0; - power = pE->number[k]; - - for( j = 31; j >= 0; j-- ) { - #if defined(_USE_NN_MONTMUL_) - cpMontMul(r_number, r_size, BNUs[powd].number, *(BNUs[powd].size), - pMont->n->number, pMont->n->size, - r_number,&r_size, pMont->n0, pMont->wb->number); - #else - cpMontMul(r_number, r_size, BNUs[powd].number, *(BNUs[powd].size), - pMont->n->number, pMont->n->size, - r_number,&r_size, pMont->n0, pMont->wb->number, pMont->pBuffer); - #endif - //gres: powd = ((power >> j) & 0x1) * (powd ^ 1); - powd = ((power >> j) & 0x1) & (powd ^ 1); - j += powd; - } - } - } - - for(k=r_size-1; k>= 0; k--) - pY->number[k] = r_number[k]; - - pY->sgn = ippBigNumPOS; - pY->size = r_size; - - while((pY->size > 1) && (pY->number[pY->size-1] == 0)) - pY->size--; - - return; - } -} -#endif /* _xUSE_ERNIE_CBA_MITIGATION_, _xUSE_GRES_CBA_MITIGATION_ */ - - -#if defined(_USE_ERNIE_CBA_MITIGATION_) -/* -// The version below was designed according to recommendation -// from Ernie Brickell and Mattew Wood. -// The reason was to mitigate "cache monitoring" attack on RSA -// Note: this version slower than pre-mitigated version ~ 30-40% -*/ -#define SET_BNU(dst,val,len) \ -{ \ - int n; \ - for(n=0; n<(len); n++) (dst)[n] = (val); \ -} - -#define AND_BNU(dst,src1,src2,len) \ -{ \ - int n; \ - for(n=0; n<(len); n++) (dst)[n] = (src1)[n] & (src2)[n]; \ -} - -void cpSafeMontExp_Binary(IppsBigNumState* pY, - const IppsBigNumState* pX, const IppsBigNumState* pE, - IppsMontState* pMont) -{ - Ipp32u* eData = BN_NUMBER(pE); - int eSize = BN_SIZE(pE); - - /* - // if e==0 then r=R mod m (i.e MontEnc(1)) - */ - if (eSize == 1 && eData[0] == 0) { - cpBN_copy(MNT_1(pMont), pY); - return; - } - - /* - // modulo exponentiation - */ - if(pY!=pX) /* init result */ - cpBN_copy(pX, pY); - - { - Ipp32u eValue; - int nBits; - - Ipp32u* pModulus = BN_NUMBER(MNT_MODULO(pMont)); - int mSize = BN_SIZE(MNT_MODULO(pMont)); - Ipp32u* pHelper = MNT_HELPER(pMont); - - Ipp32u* yData = BN_NUMBER(pY); - Ipp32u* xData = BN_BUFFER(pY); - int ySize = BN_SIZE(pY); - - Ipp32u* tData = BN_NUMBER(MNT_PRODUCT(pMont)); - Ipp32u* pBuffer = BN_BUFFER(MNT_PRODUCT(pMont)); - Ipp32u* pMontOne= BN_NUMBER(MNT_1(pMont)); - - /* expand Mont(1) */ - ZEXPAND_BNU(pMontOne, BN_SIZE(MNT_1(pMont)), mSize); - - /* copy base */ - ZEXPAND_COPY_BNU(yData,ySize, xData,mSize); - - - /* execute most significant part pE */ - eValue = eData[eSize-1]; - nBits = 32-NLZ32u(eValue); - eValue <<= (32-nBits); - - nBits--; - eValue <<=1; - for(; nBits>0; nBits--, eValue<<=1) { - Ipp32u carry; - - /* squaring: R^2 mod Modulus */ - #if defined(_USE_NN_MONTMUL_) - cpMontMul(yData, ySize, - yData, ySize, - pModulus, mSize, - yData, &ySize, - pHelper, pBuffer); - #else - cpMontMul(yData, ySize, - yData, ySize, - pModulus, mSize, - yData, &ySize, - pHelper, pBuffer, MNT_BUFFER(pMont)); - #endif - - /* T = (X-1)*bitof(E,j) + 1 */ - SET_BNU(pBuffer, ((Ipp32s)eValue)>>31, mSize); - carry = cpSub_BNU(tData, xData, pMontOne, mSize); - AND_BNU(tData, tData, pBuffer, mSize); - carry = cpAdd_BNU(tData, tData, pMontOne, mSize); - - /* multiply: Y*T mod Modulus */ - #if defined(_USE_NN_MONTMUL_) - cpMontMul(yData, ySize, - tData, mSize, - pModulus, mSize, - yData, &ySize, - pHelper, pBuffer); - #else - cpMontMul(yData, ySize, - tData, mSize, - pModulus, mSize, - yData, &ySize, - pHelper, pBuffer, MNT_BUFFER(pMont)); - #endif - } - - /* execute rest bits of E */ - eSize--; - for(; eSize>0; eSize--) { - eValue = eData[eSize-1]; - - for(nBits=32; nBits>0; nBits--, eValue<<=1) { - Ipp32u carry; - - /* squaring: R^2 mod Modulus */ - #if defined(_USE_NN_MONTMUL_) - cpMontMul(yData, ySize, - yData, ySize, - pModulus, mSize, - yData, &ySize, - pHelper, pBuffer); - #else - cpMontMul(yData, ySize, - yData, ySize, - pModulus, mSize, - yData, &ySize, - pHelper, pBuffer, MNT_BUFFER(pMont)); - #endif - - /* T = (X-1)*bitof(E,j) + 1 */ - SET_BNU(pBuffer, ((Ipp32s)eValue)>>31, mSize); - carry = cpSub_BNU(tData, xData, pMontOne, mSize); - AND_BNU(tData, tData, pBuffer, mSize); - carry = cpAdd_BNU(tData, tData, pMontOne, mSize); - - /* multiply: R*T mod Modulus */ - #if defined(_USE_NN_MONTMUL_) - cpMontMul(yData, ySize, - tData, mSize, - pModulus, mSize, - yData, &ySize, - pHelper, pBuffer); - #else - cpMontMul(yData, ySize, - tData, mSize, - pModulus, mSize, - yData, &ySize, - pHelper, pBuffer, MNT_BUFFER(pMont)); - #endif - } - } - - BN_SIZE(pY) = ySize; - } -} -#endif /* _USE_ERNIE_CBA_MITIGATION_ */ - - -#if defined(_USE_GRES_CBA_MITIGATION_) -/* -// The reason was to mitigate "cache monitoring" attack on RSA -// -// This is improved version of modular exponentiation. -// Current version provide both either mitigation and perrformance. -// This version in comparison with previous (IPP 4.1.3) one ~30-40% faster, -// i.e the the performance stayed as was for pre-mitigated version -// -*/ -cpSize cpMontExpBin_BNU_sscm(BNU_CHUNK_T* dataY, - const BNU_CHUNK_T* dataX, cpSize nsX, - const BNU_CHUNK_T* dataE, cpSize nsE, - IppsMontState* pMont) -{ - cpSize nsM = MNT_SIZE(pMont); - - /* - // test for special cases: - // x^0 = 1 - // 0^e = 0 - */ - if( cpEqu_BNU_CHUNK(dataE, nsE, 0) ) { - COPY_BNU(dataY, MNT_1(pMont), nsM); - } - else if( cpEqu_BNU_CHUNK(dataX, nsX, 0) ) { - ZEXPAND_BNU(dataY, 0, nsM); - } - - /* general case */ - else { - BNU_CHUNK_T* dataM = MNT_MODULUS(pMont); - BNU_CHUNK_T m0 = MNT_HELPER(pMont); - - /* Montgomery engine buffers */ - BNU_CHUNK_T* pKBuffer = MNT_KBUFFER(pMont); - BNU_CHUNK_T* pProduct = MNT_PRODUCT(pMont); - - BNU_CHUNK_T* dataT = MNT_TBUFFER(pMont); - BNU_CHUNK_T* sscmBuffer = MNT_SBUFFER(pMont); - - cpSize i; - BNU_CHUNK_T mask_pattern; - - /* execute most significant part pE */ - BNU_CHUNK_T eValue = dataE[nsE-1]; - int j = BNU_CHUNK_BITS - cpNLZ_BNU(eValue)-1; - - int back_step = 0; - - /* expand base and init result */ - ZEXPAND_COPY_BNU(dataT, nsM, dataX, nsX); - COPY_BNU(dataY, dataT, nsM); - - for(j-=1; j>=0; j--) { - mask_pattern = (BNU_CHUNK_T)(back_step-1); - - /* safeBuffer = (Y[] and mask_pattern) or (X[] and ~mask_pattern) */ - for(i=0; i>j) & 0x1) & (back_step^1); - j += back_step; - } - - /* execute rest bits of E */ - for(--nsE; nsE>0; nsE--) { - eValue = dataE[nsE-1]; - - for(j=BNU_CHUNK_BITS-1; j>=0; j--) { - mask_pattern = (BNU_CHUNK_T)(back_step-1); - - /* safeBuffer = (Y[] and mask_pattern) or (X[] and ~mask_pattern) */ - for(i=0; i>j) & 0x1) & (back_step^1); - j += back_step; - } - } - } - - return nsM; -} -#endif /* _USE_GRES_CBA_MITIGATION_ */ - - -cpSize cpMontExpBin_BNU(BNU_CHUNK_T* dataY, - const BNU_CHUNK_T* dataX, cpSize nsX, - const BNU_CHUNK_T* dataE, cpSize nsE, - IppsMontState* pMont) -{ - cpSize nsM = MNT_SIZE(pMont); - - /* - // test for special cases: - // x^0 = 1 - // 0^e = 0 - */ - if( cpEqu_BNU_CHUNK(dataE, nsE, 0) ) { - COPY_BNU(dataY, MNT_1(pMont), nsM); - } - else if( cpEqu_BNU_CHUNK(dataX, nsX, 0) ) { - ZEXPAND_BNU(dataY, 0, nsM); - } - - /* general case */ - else { - BNU_CHUNK_T* dataM = MNT_MODULUS(pMont); - BNU_CHUNK_T m0 = MNT_HELPER(pMont); - - /* Montgomery engine buffers */ - BNU_CHUNK_T* pKBuffer = MNT_KBUFFER(pMont); - BNU_CHUNK_T* pProduct = MNT_PRODUCT(pMont); - - BNU_CHUNK_T* dataT = MNT_TBUFFER(pMont); - - /* execute most significant part pE */ - BNU_CHUNK_T eValue = dataE[nsE-1]; - int n = cpNLZ_BNU(eValue)+1; - - /* expand base and init result */ - ZEXPAND_COPY_BNU(dataT, nsM, dataX, nsX); - COPY_BNU(dataY, dataT, nsM); - - eValue <<= n; - for(; n0; nsE--) { - eValue = dataE[nsE-1]; - - for(n=0; nidCtx) -#define MNT_ROOM(eng) ((eng)->maxLen) -#define MNT_SIZE(eng) ((eng)->modLen) -#define MNT_HELPER(eng) ((eng)->m0) -#define MNT_MODULUS(eng) ((eng)->pModulus) -#define MNT_1(eng) ((eng)->pIdentity) -#define MNT_IDENT_R(eng) (MNT_1((eng))) -#define MNT_SQUARE_R(eng) ((eng)->pSquare) -#define MNT_CUBE_R(eng) ((eng)->pCube) -#define MNT_TBUFFER(eng) ((eng)->pTBuffer) -#define MNT_SBUFFER(eng) ((eng)->pSBuffer) -#define MNT_PRODUCT(eng) ((eng)->pProduct) -#define MNT_KBUFFER(eng) ((eng)->pKBuffer) - -#define MNT_VALID_ID(eng) (MNT_ID((eng))==idCtxMontgomery) - -/* default methos */ -#define EXPONENT_METHOD (ippBinaryMethod) - -/* alignment */ -#define MONT_ALIGNMENT ((int)(sizeof(void*))) - - -/* -// Pacp/unpack Montgomery context -*/ -void cpPackMontCtx(const IppsMontState* pCtx, Ipp8u* pBuffer); -void cpUnpackMontCtx(const Ipp8u* pBuffer, IppsMontState* pCtx); - - -/* -// Montgomery reduction, multiplication and squaring -*/ -//void cpMontRed_BNU(BNU_CHUNK_T* pR, -// BNU_CHUNK_T* pProduct, -// const BNU_CHUNK_T* pModulus, cpSize nsM, BNU_CHUNK_T m0); -void cpMontRedAdc_BNU(BNU_CHUNK_T* pR, - BNU_CHUNK_T* pProduct, - const BNU_CHUNK_T* pModulus, cpSize nsM, BNU_CHUNK_T m0); -void cpMontRedAdx_BNU(BNU_CHUNK_T* pR, - BNU_CHUNK_T* pProduct, - const BNU_CHUNK_T* pModulus, cpSize nsM, BNU_CHUNK_T m0); - -__INLINE void cpMontRed_BNU(BNU_CHUNK_T* pR, - BNU_CHUNK_T* pProduct, - const BNU_CHUNK_T* pModulus, cpSize nsM, BNU_CHUNK_T m0) -{ -#if 0 -#if(_IPP32E < _IPP32E_L9) - cpMontRedAdc_BNU(pR, pProduct, pModulus, nsM, m0); -#else - IsFeatureEnabled(ADCOX_ENABLED)? cpMontRedAdx_BNU(pR, pProduct, pModulus, nsM, m0) - : cpMontRedAdc_BNU(pR, pProduct, pModulus, nsM, m0); -#endif -#endif - -#if(_ADCOX_NI_ENABLING_==_FEATURE_ON_) - cpMontRedAdx_BNU(pR, pProduct, pModulus, nsM, m0); -#elif(_ADCOX_NI_ENABLING_==_FEATURE_TICKTOCK_) - IsFeatureEnabled(ADCOX_ENABLED)? cpMontRedAdx_BNU(pR, pProduct, pModulus, nsM, m0) - : cpMontRedAdc_BNU(pR, pProduct, pModulus, nsM, m0); -#else - cpMontRedAdc_BNU(pR, pProduct, pModulus, nsM, m0); -#endif -} - -__INLINE void cpMontMul_BNU(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pX, cpSize nsX, - const BNU_CHUNK_T* pY, cpSize nsY, - const BNU_CHUNK_T* pModulus, cpSize nsM, BNU_CHUNK_T m0, - BNU_CHUNK_T* pProduct, BNU_CHUNK_T* pKBuffer) -{ - cpMul_BNU(pProduct, pX,nsX, pY,nsY, pKBuffer); - ZEXPAND_BNU(pProduct,nsX+nsY, 2*nsM); - cpMontRed_BNU(pR, pProduct, pModulus, nsM, m0); -} - -__INLINE void cpMontSqr_BNU(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pX, cpSize nsX, - const BNU_CHUNK_T* pModulus, cpSize nsM, BNU_CHUNK_T m0, - BNU_CHUNK_T* pProduct, BNU_CHUNK_T* pKBuffer) -{ - cpSqr_BNU(pProduct, pX,nsX, pKBuffer); - ZEXPAND_BNU(pProduct, 2*nsX, 2*nsM); - cpMontRed_BNU(pR, pProduct, pModulus, nsM, m0); -} - -/* -// Montgomery encoding/decoding -*/ -__INLINE cpSize cpMontEnc_BNU(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pXreg, cpSize nsX, - IppsMontState* pMont) -{ - cpSize nsM = MNT_SIZE(pMont); - cpMontMul_BNU(pR, - pXreg, nsX, MNT_SQUARE_R(pMont), nsM, - MNT_MODULUS(pMont), nsM, MNT_HELPER(pMont), - MNT_PRODUCT(pMont), MNT_KBUFFER(pMont)); - - FIX_BNU(pR, nsM); - return nsM; -} - -__INLINE cpSize cpMontDec_BNU(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pXmont, cpSize nsX, - IppsMontState* pMont) -{ - cpSize nsM = MNT_SIZE(pMont); - ZEXPAND_COPY_BNU(MNT_PRODUCT(pMont), 2*nsM, pXmont, nsX); - - cpMontRed_BNU(pR, MNT_PRODUCT(pMont), MNT_MODULUS(pMont), nsM, MNT_HELPER(pMont)); - - FIX_BNU(pR, nsM); - return nsM; -} - -__INLINE void cpMontEnc_BN(IppsBigNumState* pRbn, - const IppsBigNumState* pXbn, - IppsMontState* pMont) -{ - BNU_CHUNK_T* pR = BN_NUMBER(pRbn); - cpSize nsM = MNT_SIZE(pMont); - cpMontMul_BNU(pR, - BN_NUMBER(pXbn), BN_SIZE(pXbn), - MNT_SQUARE_R(pMont), nsM, - MNT_MODULUS(pMont), nsM, MNT_HELPER(pMont), - MNT_PRODUCT(pMont), MNT_KBUFFER(pMont)); - - FIX_BNU(pR, nsM); - BN_SIZE(pRbn) = nsM; - BN_SIGN(pRbn) = ippBigNumPOS; -} - -__INLINE void cpMontDec_BN(IppsBigNumState* pRbn, - const IppsBigNumState* pXbn, - IppsMontState* pMont) -{ - BNU_CHUNK_T* pR = BN_NUMBER(pRbn); - cpSize nsM = MNT_SIZE(pMont); - ZEXPAND_COPY_BNU(MNT_PRODUCT(pMont), 2*nsM, BN_NUMBER(pXbn), BN_SIZE(pXbn)); - - cpMontRed_BNU(pR, MNT_PRODUCT(pMont), MNT_MODULUS(pMont), nsM, MNT_HELPER(pMont)); - - FIX_BNU(pR, nsM); - BN_SIZE(pRbn) = nsM; - BN_SIGN(pRbn) = ippBigNumPOS; -} - -#if 0 -/* -// Size of scratch buffer, involved in MontExp operation -*/ -cpSize cpMontExpScratchBufferSize(cpSize modulusBitSize, - cpSize expBitSize, - cpSize nExponents); -#endif - -/* -// Montgomery exponentiation (binary) "fast" and "safe" versions -*/ -cpSize cpMontExpBin_BNU_sscm(BNU_CHUNK_T* pY, - const BNU_CHUNK_T* pX, cpSize nsX, - const BNU_CHUNK_T* pE, cpSize nsE, - IppsMontState* pMont); - -cpSize cpMontExpBin_BNU(BNU_CHUNK_T* pY, - const BNU_CHUNK_T* pX, cpSize nsX, - const BNU_CHUNK_T* pE, cpSize nsE, - IppsMontState* pMont); - -__INLINE void cpMontExpBin_BN_sscm(IppsBigNumState* pYbn, - const IppsBigNumState* pXbn, - const IppsBigNumState* pEbn, - IppsMontState* pMont) -{ - BNU_CHUNK_T* pX = BN_NUMBER(pXbn); - cpSize nsX = BN_SIZE(pXbn); - BNU_CHUNK_T* pE = BN_NUMBER(pEbn); - cpSize nsE = BN_SIZE(pEbn); - BNU_CHUNK_T* pY = BN_NUMBER(pYbn); - cpSize nsY = cpMontExpBin_BNU_sscm(pY, pX,nsX, pE,nsE, pMont); - FIX_BNU(pY, nsY); - BN_SIZE(pYbn) = nsY; - BN_SIGN(pYbn) = ippBigNumPOS; -} - -__INLINE void cpMontExpBin_BN(IppsBigNumState* pYbn, - const IppsBigNumState* pXbn, - const IppsBigNumState* pEbn, - IppsMontState* pMont) -{ - BNU_CHUNK_T* pX = BN_NUMBER(pXbn); - cpSize nsX = BN_SIZE(pXbn); - BNU_CHUNK_T* pE = BN_NUMBER(pEbn); - cpSize nsE = BN_SIZE(pEbn); - BNU_CHUNK_T* pY = BN_NUMBER(pYbn); - cpSize nsY = cpMontExpBin_BNU(pY, pX,nsX, pE,nsE, pMont); - FIX_BNU(pY, nsY); - BN_SIZE(pYbn) = nsY; - BN_SIGN(pYbn) = ippBigNumPOS; -} - - -/* -// Montgomery exponentiation (fixed window) -*/ -cpSize cpMontExp_WinSize(int bitsize); - -#if defined(_USE_WINDOW_EXP_) -void cpMontExpWin_BN_sscm(IppsBigNumState* pY, - const IppsBigNumState* pX, const IppsBigNumState* pE, - IppsMontState* pMont, - BNU_CHUNK_T* pPrecompResource); - -void cpMontExpWin_BN(IppsBigNumState* pY, - const IppsBigNumState* pX, const IppsBigNumState* pE, - IppsMontState* pMont, - BNU_CHUNK_T* pPrecompResource); -#endif - -/* -// Montgomery multi-exponentiation -*/ -/* precompute table for multi-exponentiation */ -void cpMontMultiExpInitArray(BNU_CHUNK_T* pPrecomTbl, - const BNU_CHUNK_T** ppX, cpSize xItemBitSize, cpSize numItems, - IppsMontState* pMont); - -/* multi-exponentiation */ -void cpFastMontMultiExp(BNU_CHUNK_T* pY, - const BNU_CHUNK_T* pPrecomTbl, - const Ipp8u** ppE, cpSize eItemBitSize, cpSize numItems, - IppsMontState* pMont); - -#endif /* _CP_MONTGOMETRY_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontgomeryca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontgomeryca.c deleted file mode 100644 index afa5e97878..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontgomeryca.c +++ /dev/null @@ -1,479 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippcp) -// -// Contents: -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpbn.h" -#include "pcpmontgomery.h" -#include "pcpmulbnukara.h" -#include "pcptool.h" - -/*F* -// Name: ippsMontGetSize -// -// Purpose: Specifies size of buffer in bytes. -// -// Returns: Reason: -// ippStsNullPtrErr pCtxSize==NULL -// ippStsLengthErr maxLen32 < 1 -// ippStsNoErr no errors -// -// Parameters: -// method selected exponential method (unused parameter) -// maxLen32 max modulus length (in Ipp32u chunks) -// pCtxSize size of context -// -// Notes: Function always use method=ippBinaryMethod, -// so this parameter is ignored -*F*/ -IPPFUN(IppStatus, ippsMontGetSize, (IppsExpMethod method, cpSize maxLen32, cpSize* pCtxSize)) -{ - IPP_BAD_PTR1_RET(pCtxSize); - IPP_BADARG_RET(maxLen32< 1, ippStsLengthErr); - - UNREFERENCED_PARAMETER(method); - - { - /* convert modulus length to the number of BNU_CHUNK_T */ - cpSize modSize = INTERNAL_BNU_LENGTH(maxLen32); - - /* size of Karatsuba buffer */ - cpSize buffSize = 0; - #if defined(_USE_KARATSUBA_) - buffSize = cpKaratsubaBufferSize(modSize); - #if defined( _OPENMP ) - buffSize <<=1; /* double buffer size if OpenMP used */ - #endif - #else - buffSize = 0; - #endif - - *pCtxSize= sizeof(IppsMontState) - + modSize*sizeof(BNU_CHUNK_T) /* modulus */ - + modSize*sizeof(BNU_CHUNK_T) /* identity */ - + modSize*sizeof(BNU_CHUNK_T) /* square R */ - + modSize*sizeof(BNU_CHUNK_T) /* cube R */ - + modSize*sizeof(BNU_CHUNK_T) /* internal buffer */ - + modSize*sizeof(BNU_CHUNK_T) /* internal sscm buffer */ - + modSize*sizeof(BNU_CHUNK_T)*2 /* internal product */ - + buffSize /* K-mul buffer */ - + MONT_ALIGNMENT-1; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsMontInit -// -// Purpose: Initializes the symbolic data structure and partitions the -// specified buffer space. -// -// Returns: Reason: -// ippStsNullPtrErr pMont==NULL -// ippStsLengthErr maxLen32 < 1 -// ippStsNoErr no errors -// -// Parameters: -// method selected exponential method (unused parameter) -// maxLen32 max modulus length (in Ipp32u chunks) -// pMont pointer to Montgomery context -*F*/ -IPPFUN(IppStatus, ippsMontInit,(IppsExpMethod method, int maxLen32, IppsMontState* pMont)) -{ - IPP_BADARG_RET(maxLen32<1, ippStsLengthErr); - - IPP_BAD_PTR1_RET(pMont); - pMont = (IppsMontState*)( IPP_ALIGNED_PTR(pMont, MONT_ALIGNMENT) ); - - UNREFERENCED_PARAMETER(method); - - MNT_ID(pMont) = idCtxMontgomery; - MNT_ROOM(pMont) = INTERNAL_BNU_LENGTH(maxLen32); - MNT_SIZE(pMont) = 0; - MNT_HELPER(pMont) = 0; - - { - Ipp8u* ptr = (Ipp8u*)pMont; - - /* convert modulus length to the number of BNU_CHUNK_T */ - cpSize modSize = MNT_ROOM(pMont); - - /* size of buffer */ - cpSize buffSize = 0; - #if defined(_USE_KARATSUBA_) - buffSize = cpKaratsubaBufferSize(modSize); - #if defined( _OPENMP ) - buffSize <<=1; /* double buffer size if OpenMP used */ - #endif - #else - buffSize = 0; - #endif - - /* assign internal buffers */ - MNT_MODULUS(pMont) = (BNU_CHUNK_T*)( ptr += sizeof(IppsMontState) ); - - MNT_1(pMont) = (BNU_CHUNK_T*)( ptr += modSize*sizeof(BNU_CHUNK_T) ); - MNT_SQUARE_R(pMont)= (BNU_CHUNK_T*)( ptr += modSize*sizeof(BNU_CHUNK_T) ); - MNT_CUBE_R(pMont) = (BNU_CHUNK_T*)( ptr += modSize*sizeof(BNU_CHUNK_T) ); - - MNT_TBUFFER(pMont) = (BNU_CHUNK_T*)( ptr += modSize*sizeof(BNU_CHUNK_T) ); - MNT_SBUFFER(pMont) = (BNU_CHUNK_T*)( ptr += modSize*sizeof(BNU_CHUNK_T) ); - MNT_PRODUCT(pMont) = (BNU_CHUNK_T*)( ptr += modSize*sizeof(BNU_CHUNK_T) ); - MNT_KBUFFER(pMont) = (buffSize)? (BNU_CHUNK_T*)( ptr += modSize*sizeof(BNU_CHUNK_T)*2 ) : NULL; - - /* init internal buffers */ - ZEXPAND_BNU(MNT_MODULUS(pMont), 0, modSize); - ZEXPAND_BNU(MNT_1(pMont), 0, modSize); - ZEXPAND_BNU(MNT_SQUARE_R(pMont), 0, modSize); - ZEXPAND_BNU(MNT_CUBE_R(pMont), 0, modSize); - - return ippStsNoErr; - } -} - -void cpPackMontCtx(const IppsMontState* pCtx, Ipp8u* pBuffer) -{ - IppsMontState* pAlignedBuffer = (IppsMontState*)(IPP_ALIGNED_PTR((pBuffer), MONT_ALIGNMENT)); - - /* max modulus length */ - int modSize = MNT_ROOM(pCtx); - /* size of context (bytes) without product and Karatsuba buffers */ - int ctxSize = sizeof(IppsMontState) - +sizeof(BNU_CHUNK_T)*(modSize*4); - - CopyBlock(pCtx, pAlignedBuffer, ctxSize); - MNT_MODULUS(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(MNT_MODULUS(pCtx))-IPP_UINT_PTR(pCtx)); - MNT_1(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(MNT_1(pCtx))-IPP_UINT_PTR(pCtx)); - MNT_SQUARE_R(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(MNT_SQUARE_R(pCtx))-IPP_UINT_PTR(pCtx)); - MNT_CUBE_R(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(MNT_CUBE_R(pCtx))-IPP_UINT_PTR(pCtx)); - MNT_PRODUCT(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(MNT_PRODUCT(pCtx))-IPP_UINT_PTR(pCtx)); - MNT_TBUFFER(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(MNT_TBUFFER(pCtx))-IPP_UINT_PTR(pCtx)); - MNT_KBUFFER(pAlignedBuffer) = MNT_KBUFFER(pCtx)? (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(MNT_KBUFFER(pCtx))-IPP_UINT_PTR(pCtx)) : NULL; -} - -void cpUnpackMontCtx(const Ipp8u* pBuffer, IppsMontState* pCtx) -{ - IppsMontState* pAlignedBuffer = (IppsMontState*)(IPP_ALIGNED_PTR((pBuffer), MONT_ALIGNMENT)); - - /* max modulus length */ - int modSize = MNT_ROOM(pAlignedBuffer); - /* size of context (bytes) without product and Karatsuba buffers */ - int ctxSize = sizeof(IppsMontState) - +sizeof(BNU_CHUNK_T)*(modSize*4); - - CopyBlock(pAlignedBuffer, pCtx, ctxSize); - MNT_MODULUS(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(MNT_MODULUS(pAlignedBuffer))); - MNT_1(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(MNT_1(pAlignedBuffer))); - MNT_SQUARE_R(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(MNT_SQUARE_R(pAlignedBuffer))); - MNT_CUBE_R(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(MNT_CUBE_R(pAlignedBuffer))); - MNT_PRODUCT(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(MNT_PRODUCT(pAlignedBuffer))); - MNT_TBUFFER(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(MNT_TBUFFER(pAlignedBuffer))); - MNT_KBUFFER(pCtx) = MNT_KBUFFER(pCtx)? (BNU_CHUNK_T*)((Ipp8u*)pCtx + IPP_UINT_PTR(MNT_KBUFFER(pAlignedBuffer))) : NULL; -} - -/*F* -// Name: ippsMontSet -// -// Purpose: Setup modulus value -// -// Returns: Reason: -// ippStsNullPtrErr pMont==NULL -// pModulus==NULL -// ippStsContextMatchErr !MNT_VALID_ID() -// ippStsLengthErr len32<1 -// ippStsNoErr no errors -// -// Parameters: -// pModulus pointer to the modulus buffer -// len32 length of the modulus (in Ipp32u chunks). -// pMont pointer to the context -*F*/ - -/* -// See Dusse & Kaliski "A cryptographic library for the Motorola DSP56000" -// Unfortunately there is a misprint in the paper above -*/ -static BNU_CHUNK_T cpMontHelper(BNU_CHUNK_T m0) -{ - BNU_CHUNK_T y = 1; - BNU_CHUNK_T x = 2; - BNU_CHUNK_T mask = 2*x-1; - - int i; - for(i=2; i<=BNU_CHUNK_BITS; i++, x<<=1) { - BNU_CHUNK_T rH, rL; - MUL_AB(rH, rL, m0, y); - if( x < (rL & mask) ) /* x < ((m0*y) mod (2*x)) */ - y+=x; - mask += mask + 1; - } - return 0-y; -} - -IPPFUN(IppStatus, ippsMontSet,(const Ipp32u* pModulus, cpSize len32, IppsMontState* pMont)) -{ - IPP_BAD_PTR2_RET(pModulus, pMont); - pMont = (IppsMontState*)(IPP_ALIGNED_PTR((pMont), MONT_ALIGNMENT)); - IPP_BADARG_RET(!MNT_VALID_ID(pMont), ippStsContextMatchErr); - - IPP_BADARG_RET(len32<1, ippStsLengthErr); - - /* modulus is not an odd number */ - IPP_BADARG_RET((pModulus[0] & 1) == 0, ippStsBadModulusErr); - IPP_BADARG_RET(MNT_ROOM(pMont)<(int)(INTERNAL_BNU_LENGTH(len32)), ippStsOutOfRangeErr); - - { - BNU_CHUNK_T m0; - cpSize len; - - /* fix input modulus */ - FIX_BNU(pModulus, len32); - - /* store modulus */ - ZEXPAND_BNU(MNT_MODULUS(pMont), 0, MNT_ROOM(pMont)); - COPY_BNU((Ipp32u*)(MNT_MODULUS(pMont)), pModulus, len32); - /* store modulus length */ - len = INTERNAL_BNU_LENGTH(len32); - MNT_SIZE(pMont) = len; - - /* pre-compute helper m0, m0*m = -1 mod R */ - m0 = cpMontHelper(MNT_MODULUS(pMont)[0]); - MNT_HELPER(pMont) = m0; - - /* setup identity */ - ZEXPAND_BNU(MNT_1(pMont), 0, len); - MNT_1(pMont)[len] = 1; - cpMod_BNU(MNT_1(pMont), len+1, MNT_MODULUS(pMont), len); - - /* setup square */ - ZEXPAND_BNU(MNT_SQUARE_R(pMont), 0, len); - COPY_BNU(MNT_SQUARE_R(pMont)+len, MNT_1(pMont), len); - cpMod_BNU(MNT_SQUARE_R(pMont), 2*len, MNT_MODULUS(pMont), len); - - /* setup cube */ - ZEXPAND_BNU(MNT_CUBE_R(pMont), 0, len); - COPY_BNU(MNT_CUBE_R(pMont)+len, MNT_SQUARE_R(pMont), len); - cpMod_BNU(MNT_CUBE_R(pMont), 2*len, MNT_MODULUS(pMont), len); - - /* clear buffers */ - ZEXPAND_BNU(MNT_TBUFFER(pMont), 0, len); - ZEXPAND_BNU(MNT_SBUFFER(pMont), 0, len); - ZEXPAND_BNU(MNT_PRODUCT(pMont), 0, 2*len); - - return ippStsNoErr; - } -} - -/*F* -// Name: ippsMontGet -// -// Purpose: Extracts modulus. -// -// Returns: Reason: -// ippStsNullPtrErr pMont==NULL -// pModulus==NULL -// pLen32==NULL -// ippStsContextMatchErr !MNT_VALID_ID() -// ippStsNoErr no errors -// -// Parameters: -// pModulus pointer to the modulus buffer -// pLen32 pointer to the modulus length (in Ipp32u chunks). -// pMont pointer to the context -*F*/ -IPPFUN(IppStatus, ippsMontGet,(Ipp32u* pModulus, cpSize* pLen32, const IppsMontState* pMont)) -{ - IPP_BAD_PTR3_RET(pMont, pModulus, pLen32); - - pMont = (IppsMontState*)(IPP_ALIGNED_PTR((pMont), MONT_ALIGNMENT)); - IPP_BADARG_RET(!MNT_VALID_ID(pMont), ippStsContextMatchErr); - - { - cpSize len32 = MNT_SIZE(pMont)*sizeof(BNU_CHUNK_T)/sizeof(Ipp32u); - Ipp32u* bnData = (Ipp32u*)MNT_MODULUS(pMont); - - FIX_BNU(bnData, len32); - COPY_BNU(pModulus, bnData, len32); - *pLen32 = len32; - - return ippStsNoErr; - } -} - -/*F* -// Name: ippsMontForm -// -// Purpose: Converts input into Montgomery domain. -// -// Returns: Reason: -// ippStsNullPtrErr pMont==NULL -// pA==NULL -// pR==NULL -// ippStsContextMatchErr !MNT_VALID_ID() -// !BN_VALID_ID(pA) -// !BN_VALID_ID(pR) -// ippStsBadArgErr A < 0. -// ippStsScaleRangeErr A >= Modulus. -// ippStsOutOfRangeErr R can't hold result -// ippStsNoErr no errors -// -// Parameters: -// pA pointer to the input [0, modulus-1] -// pMont Montgomery context -// pR pointer to the output (A*R mod modulus) -*F*/ -IPPFUN(IppStatus, ippsMontForm,(const IppsBigNumState* pA, IppsMontState* pMont, IppsBigNumState* pR)) -{ - IPP_BAD_PTR3_RET(pMont, pA, pR); - - pMont = (IppsMontState*)(IPP_ALIGNED_PTR((pMont), MONT_ALIGNMENT)); - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - - IPP_BADARG_RET(!MNT_VALID_ID(pMont), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - IPP_BADARG_RET(BN_SIGN(pA) != ippBigNumPOS, ippStsBadArgErr); - IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), MNT_MODULUS(pMont), MNT_SIZE(pMont)) >= 0, ippStsScaleRangeErr); - IPP_BADARG_RET(BN_ROOM(pR) < MNT_SIZE(pMont), ippStsOutOfRangeErr); - - cpMontEnc_BN(pR, pA, pMont); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsMontMul -// -// Purpose: Computes Montgomery modular multiplication for positive big -// number integers of Montgomery form. The following pseudocode -// represents this function: -// r <- ( a * b * R^(-1) ) mod m -// -// Returns: Reason: -// ippStsNoErr Returns no error. -// ippStsNullPtrErr Returns an error when pointers are null. -// ippStsBadArgErr Returns an error when a or b is a negative integer. -// ippStsScaleRangeErr Returns an error when a or b is more than m. -// ippStsOutOfRangeErr Returns an error when IppsBigNumState *r is larger than -// IppsMontState *m. -// ippStsContextMatchErr Returns an error when the context parameter does -// not match the operation. -// -// Parameters: -// a Multiplicand within the range [0, m - 1]. -// b Multiplier within the range [0, m - 1]. -// m Modulus. -// r Montgomery multiplication result. -// -// Notes: The size of IppsBigNumState *r should not be less than the data -// length of the modulus m. -*F*/ -IPPFUN(IppStatus, ippsMontMul, (const IppsBigNumState* pA, const IppsBigNumState* pB, IppsMontState* pMont, IppsBigNumState* pR)) -{ - IPP_BAD_PTR4_RET(pA, pB, pMont, pR); - - pMont = (IppsMontState*)(IPP_ALIGNED_PTR((pMont), MONT_ALIGNMENT)); - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - pB = (IppsBigNumState*)( IPP_ALIGNED_PTR(pB, BN_ALIGNMENT) ); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - - IPP_BADARG_RET(!MNT_VALID_ID(pMont), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pB), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - IPP_BADARG_RET(BN_NEGATIVE(pA) || BN_NEGATIVE(pB), ippStsBadArgErr); - IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), MNT_MODULUS(pMont), MNT_SIZE(pMont)) >= 0, ippStsScaleRangeErr); - IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pB), BN_SIZE(pB), MNT_MODULUS(pMont), MNT_SIZE(pMont)) >= 0, ippStsScaleRangeErr); - IPP_BADARG_RET(BN_ROOM(pR) < MNT_SIZE(pMont), ippStsOutOfRangeErr); - - { - BNU_CHUNK_T* pDataR = BN_NUMBER(pR); - cpSize nsM = MNT_SIZE(pMont); - - cpMontMul_BNU(pDataR, - BN_NUMBER(pA), BN_SIZE(pA), - BN_NUMBER(pB), BN_SIZE(pB), - MNT_MODULUS(pMont), nsM, - MNT_HELPER(pMont), - MNT_PRODUCT(pMont), MNT_KBUFFER(pMont)); - - FIX_BNU(pDataR, nsM); - BN_SIZE(pR) = nsM; - BN_SIGN(pR) = ippBigNumPOS; - - return ippStsNoErr; - } -} - - -/******************************************************************************* -// Name: ippsMontExp -// Description: ippsMontExp() computes the Montgomery exponentiation with exponent -// IppsBigNumState *e to the given big number integer of Montgomery form -// IppsBigNumState *a with respect to the modulus IppsMontState *m. -// Input Arguments: a - big number integer of Montgomery form within the -// range [0,m-1] -// e - big number exponent -// m - Montgomery modulus of IppsMontState. -// Output Arguments: r - the Montgomery exponentiation result. -// Returns: IPPC_STATUS_OK - No Error -// IPPC_STATUS_MONT_BAD_MODULUS - If a>m or b>m or m>R or P_MONT *m has -// not been initialized by the primitive -// function ippsMontInit( ). -// IPPC_STATUS_BAD_ARG - Bad Arguments -// Notes: IppsBigNumState *r should possess enough memory space as to hold the result -// of the operation. i.e. both pointers r->d and r->buffer should possess -// no less than (m->n->length) number of 32-bit words. -*******************************************************************************/ -IPPFUN(IppStatus, ippsMontExp, (const IppsBigNumState* pA, const IppsBigNumState* pE, IppsMontState* pMont, IppsBigNumState* pR)) -{ - IPP_BAD_PTR4_RET(pA, pE, pMont, pR); - - pMont = (IppsMontState*)(IPP_ALIGNED_PTR((pMont), MONT_ALIGNMENT)); - pA = (IppsBigNumState*)( IPP_ALIGNED_PTR(pA, BN_ALIGNMENT) ); - pE = (IppsBigNumState*)( IPP_ALIGNED_PTR(pE, BN_ALIGNMENT) ); - pR = (IppsBigNumState*)( IPP_ALIGNED_PTR(pR, BN_ALIGNMENT) ); - - IPP_BADARG_RET(!MNT_VALID_ID(pMont), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pA), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pE), ippStsContextMatchErr); - IPP_BADARG_RET(!BN_VALID_ID(pR), ippStsContextMatchErr); - - IPP_BADARG_RET(BN_ROOM(pR) < MNT_SIZE(pMont), ippStsOutOfRangeErr); - /* check a */ - IPP_BADARG_RET(BN_NEGATIVE(pA), ippStsBadArgErr); - IPP_BADARG_RET(cpCmp_BNU(BN_NUMBER(pA), BN_SIZE(pA), MNT_MODULUS(pMont), MNT_SIZE(pMont)) >= 0, ippStsScaleRangeErr); - /* check e */ - IPP_BADARG_RET(BN_NEGATIVE(pE), ippStsBadArgErr); - - cpMontExpBin_BN(pR, pA, pE, pMont); - - return ippStsNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontred.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontred.c deleted file mode 100644 index cd5fca484f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpmontred.c +++ /dev/null @@ -1,75 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippcp) -// -*/ - -#include "owncp.h" -#include "pcpbnuarith.h" - - -#if !((_IPP==_IPP_W7) || \ - (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || \ - (_IPP==_IPP_P8) || \ - (_IPP>=_IPP_G9) || \ - (_IPPLP32==_IPPLP32_S8) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E>=_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) - -#if 0 -#define MASKED_COPY_BNU(dst, mask, src1, src2, len) { \ - cpSize i; \ - for(i=0; i<(len); i++) (dst)[i] = ((mask) & (src1)[i]) | (~(mask) & (src2)[i]); \ -} -#endif - -void cpMontRedAdc_BNU(BNU_CHUNK_T* pR, - BNU_CHUNK_T* pProduct, - const BNU_CHUNK_T* pModulus, cpSize nsM, BNU_CHUNK_T m0) -{ - BNU_CHUNK_T carry; - BNU_CHUNK_T extension; - - cpSize n; - for(n=0, carry = 0; n<(nsM-1); n++) { - BNU_CHUNK_T u = pProduct[n]*m0; - BNU_CHUNK_T t = pProduct[nsM +n +1] + carry; - - extension = cpAddMulDgt_BNU(pProduct+n, pModulus, nsM, u); - ADD_AB(carry, pProduct[nsM+n], pProduct[nsM+n], extension); - t += carry; - - carry = t=_IPP_H9)) - #define CP_KARATSUBA_MUL_THRESHOLD 32 - #define CP_KARATSUBA_SQR_THRESHOLD 32 - -#elif ((_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || \ - (_IPP32E==_IPP32E_Y8) || \ - (_IPP32E==_IPP32E_E9) || \ - (_IPPLP64==_IPPLP64_N8)) - #define CP_KARATSUBA_MUL_THRESHOLD 16 - #define CP_KARATSUBA_SQR_THRESHOLD 40 -#elif ((_IPP32E>=_IPP32E_L9)) - #define CP_KARATSUBA_MUL_THRESHOLD 20 - #define CP_KARATSUBA_SQR_THRESHOLD 48 - -#else - #define CP_KARATSUBA_MUL_THRESHOLD 12 - #define CP_KARATSUBA_SQR_THRESHOLD 16 -#endif - - -cpSize cpKaratsubaBufferSize(cpSize len); - -BNU_CHUNK_T cpMul_BNU_karatsuba(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pX, const BNU_CHUNK_T* pY, cpSize ns, - BNU_CHUNK_T* pBuffer); -BNU_CHUNK_T cpSqr_BNU_karatsuba(BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pX, cpSize ns, - BNU_CHUNK_T* pBuffer); - - -#else - #define CP_KARATSUBA_MUL_THRESHOLD 0 - #define CP_KARATSUBA_SQR_THRESHOLD 0 -#endif /* _USE_KARATSUBA_ */ - -#endif /* _KARATSUBA_MUL_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma.h deleted file mode 100644 index 2a0c65f60f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma.h +++ /dev/null @@ -1,106 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions and -// Internal Prime Modulo Arithmetic Function Prototypes -// -// -*/ - -#if !defined(_PCP_PMA_H) -#define _PCP_PMA_H - - -#include "pcpbn.h" -#include "pcpmontgomery.h" - - -/* -// unsigned BN set/get -*/ -#define SET_BN(pBN,bnu,len) \ - BN_SIGN((pBN)) = ippBigNumPOS; \ - BN_SIZE((pBN)) = ((len)); \ - Cpy_BNU((bnu), BN_NUMBER((pBN)), (len)) - -#define GET_BN(pBN,bnu,len) \ - Set_BNU(0, (bnu), (len)); \ - Cpy_BNU(BN_NUMBER((pBN)), (bnu), BN_SIZE((pBN))) - - -/* -// Prime Modulo Arithmetic -*/ -#define PMA_set(r,a) \ - BN_SIGN((r)) = BN_SIGN((a)); \ - BN_SIZE((r)) = BN_SIZE((a)); \ - ZEXPAND_COPY_BNU(BN_NUMBER((r)),BN_ROOM((r)), BN_NUMBER((a)),BN_SIZE((a))) \ - -#define PMA_mod(r,a,modulo) \ - ippsMod_BN((a),(modulo),(r)) - -#define PMA_inv(r,a,modulo) \ - ippsModInv_BN((a),(modulo),(r)) - -#define PMA_neg(r,a,modulo) \ - ippsSub_BN((modulo),(a),(r)) - -#define PMA_lsr(r,a,modulo) \ - BN_SIZE((r)) = cpLSR_BNU(BN_NUMBER((a)), BN_NUMBER((r)), (int)BN_SIZE((a)), 1) - -#define PMA_div2(r,a,modulo) { \ - if( IsOdd_BN((a)) ) { \ - ippsAdd_BN((a), (modulo), (a)); \ - } \ - BN_SIZE((r)) = cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((a)), (int)BN_SIZE((a)), 1); \ - cpBN_fix((r)); \ -} - -#define PMA_sqr(r,a,modulo) \ - PMA_mul(r,a,a,modulo) - -#define PMA_add(r,a,b,modulo) \ - ippsAdd_BN((a),(b),(r)); \ - if( cpCmp_BNU(BN_NUMBER((r)),BN_SIZE((r)),BN_NUMBER((modulo)),BN_SIZE(modulo)) >= 0 ) \ - ippsSub_BN((r),(modulo),(r)) - -#define PMA_sub(r,a,b,modulo) \ - ippsSub_BN((a),(b),(r)); \ - if( BN_NEGATIVE((r)) ) \ - ippsAdd_BN((r),(modulo),(r)) - -#define PMA_mul(r,a,b,modulo) \ - ippsMul_BN((a),(b),(r)); \ - if( cpCmp_BNU(BN_NUMBER((r)),BN_SIZE((r)),BN_NUMBER((modulo)),BN_SIZE(modulo)) >= 0 ) \ - ippsMod_BN((r),(modulo),(r)) - -#define PMA_enc(r,a,mont) \ - cpMontEnc_BN((r), (a), (mont)) - -#define PMA_dec(r,a,mont) \ - cpMontDec_BN((r), (a), (mont)) - -#define PMA_sqre(r,a,mont) \ - ippsMontMul((a),(a), (mont),(r)) - -#define PMA_mule(r,a,b,mont) \ - ippsMontMul((a),(b), (mont),(r)) - -#endif /* _PCP_PMA_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma128.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma128.c deleted file mode 100644 index 80061d5909..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma128.c +++ /dev/null @@ -1,169 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Prime Modulo Arithmetic Function -// -// Contents: -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_128_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccp.h" -#include "pcppma128.h" - - -/* -// Specific Modulo Arithmetic -// P128 = 2^128 -2^97 -1 -// (reference secp128r1_p) -*/ - -/* -// Reduce modulo: -// -// x = c7|c6|c5|c4|c3|c2|c1|c0 -// -// s1 = c3| c2| c1| c0 -// s2 = 2c4| 00| 00| c4 -// s3 = 4c5| 00| c5|2c5 -// s4 = 8c6| c6|2c6|4c6 -// s5 =17c7|2c7|4c7|8c7 -// -// r = (s1+s2+s3+s4+s5) (mod P) -*/ -#if !((_IPPXSC==_IPPXSC_S1) || (_IPPXSC==_IPPXSC_S2) || (_IPPXSC==_IPPXSC_C2) || \ - (_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ - (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || (_IPP32E==_IPP32E_Y8) || \ - (_IPPLP64==_IPPLP64_N8) || (_IPP32E>=_IPP32E_E9) || \ - (_IPP64==_IPP64_I7) ) -void Reduce_P128r1(BNU_CHUNK_T* pProduct) -{ - Ipp32u* pR = (Ipp32u*)pProduct; - - Ipp64u c7x2 = (Ipp64u)pR[7] + (Ipp64u)pR[7]; - Ipp64u c7x4 = c7x2 + c7x2; - Ipp64u c7x8 = c7x4 + c7x4; - - Ipp64u c6x2 = (Ipp64u)pR[6] + (Ipp64u)pR[6]; - Ipp64u c6x4 = c6x2 + c6x2; - Ipp64u c6x8 = c6x4 + c6x4; - - Ipp64u c5x2 = (Ipp64u)pR[5] + (Ipp64u)pR[5]; - Ipp64u c5x4 = c5x2 + c5x2; - - Ipp64u c4x2 = (Ipp64u)pR[4] + (Ipp64u)pR[4]; - - Ipp64u - sum = (Ipp64u)pR[0] + (Ipp64u)pR[4] + c5x2 + c6x4 + c7x8; - pR[0] = LODWORD(sum); - sum = HIDWORD(sum); - - sum += (Ipp64u)pR[1] + (Ipp64u)pR[5] + c6x2 + c7x4; - pR[1] = LODWORD(sum); - sum = HIDWORD(sum); - - sum += (Ipp64u)pR[2] + (Ipp64u)pR[6] + c7x2; - pR[2] = LODWORD(sum); - sum = HIDWORD(sum); - - sum += (Ipp64u)pR[3] + c4x2 + c5x4 + c6x8 + c7x8+c7x8+(Ipp64u)pR[7]; - pR[3] = LODWORD(sum); - pProduct[LEN_P128] = (BNU_CHUNK_T)(HIDWORD(sum)); - - if(pProduct[LEN_P128]) - cpSub_BNU(pProduct, pProduct, ((BNU_CHUNK_T**)secp128_mx)[pProduct[LEN_P128]], LEN_P128+1); - - while((BNS_CHUNK_T)pProduct[LEN_P128] <0) - cpAdd_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp128r1_p, LEN_P128+1); - - while(0 <= cpCmp_BNU(pProduct, LEN_P128+1, (BNU_CHUNK_T*)secp128r1_p, LEN_P128+1)) - cpSub_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp128r1_p, LEN_P128+1); -} -#endif - -void cpAdde_128r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T carry = cpAdd_BNU(rPtr, aPtr, bPtr, LEN_P128); - if(carry || (0<=cpCmp_BNU(rPtr, LEN_P128, (BNU_CHUNK_T*)secp128r1_p, LEN_P128))) - cpSub_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp128r1_p, LEN_P128); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P128; -} - -void cpSube_128r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T borrow = cpSub_BNU(rPtr, aPtr, bPtr, LEN_P128); - if(borrow) - cpAdd_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp128r1_p, LEN_P128); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P128; -} - -void cpSqre_128r1(IppsBigNumState* pA, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P128]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpSqr_BNU_school(tmpR, aPtr, LEN_P128); - - Reduce_P128r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P128); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P128; -} - -void cpMule_128r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P128]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpMul_BNU_school(tmpR, aPtr, LEN_P128, bPtr, LEN_P128); - - Reduce_P128r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P128); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P128; -} - -#endif /* _ECP_128_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma128.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma128.h deleted file mode 100644 index 54b71f42dc..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma128.h +++ /dev/null @@ -1,79 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions and -// Internal Prime Modulo Arithmetic Function Prototypes -// -// -*/ - -#if !defined(_PCP_PMA128_H) -#define _PCP_PMA128_H - -#include "pcpbn.h" - - -/* length of operand in bits and BNU32_CHUNK_T */ -#define OPERAND_BITSIZE (128) -#define LEN_P128 (BITS_BNU_CHUNK(OPERAND_BITSIZE)) - -/* -// Modular Arithmetic for secp128r1 ECC -*/ -void Reduce_P128r1(BNU_CHUNK_T* pR); -void cpAdde_128r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSube_128r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSqre_128r1(IppsBigNumState* pA, IppsBigNumState* pR); -void cpMule_128r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); - -#define PMA128_add(r,a,b) \ - cpAdde_128r1((a),(b), (r)) - -#define PMA128_sub(r,a,b) \ - cpSube_128r1((a),(b), (r)) - -#define PMA128_sqr(r,a) \ - cpSqre_128r1((a),(r)) - -#define PMA128_mul(r,a,b) \ - cpMule_128r1((a),(b), (r)) - -#define PMA128_div2(r,a) \ -{ \ - if( IsOdd_BN((a)) ) { \ - cpInc_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P128, 1); \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((r)), LEN_P128, 1); \ - cpAdd_BNU(BN_NUMBER((r)), BN_NUMBER((r)), (BNU_CHUNK_T*)h_secp128r1_p, LEN_P128); \ - } \ - else \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P128, 1); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P128; \ -} - -#define PMA128_inv(r,a,modulo) \ -{ \ - ippsModInv_BN((a),(modulo),(r)); \ - ZEXPAND_BNU(BN_NUMBER((r)),BN_SIZE((r)), LEN_P128); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P128; \ -} - -#endif /* _PCP_PMA128_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma192.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma192.c deleted file mode 100644 index 4cc1a69a1b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma192.c +++ /dev/null @@ -1,153 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Prime Modulo Arithmetic Function -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_192_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccp.h" -#include "pcppma192.h" - -/* -// Specific Modulo Arithmetic -// P192 = 2^192 -2^64 -1 -// (reference secp192r1_p) -*/ - -/* -// Reduce modulo: -// -// x = c11|c10|c9|c8|c7|c6|c5|c4|c3|c2|c1|c0 -// -// s1 = c05|c04|c03|c02|c01|c00 -// s2 = 000|000|c07|c06|c07|c06 -// s3 = c09|c08|c09|c08|000|000 -// -// r = (s1+s2+s3+s4) (mod P) -*/ -#if !((_IPPXSC==_IPPXSC_S1) || (_IPPXSC==_IPPXSC_S2) || (_IPPXSC==_IPPXSC_C2) || \ - (_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ - (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || (_IPP32E==_IPP32E_Y8) || \ - (_IPPLP64==_IPPLP64_N8) || (_IPP32E>=_IPP32E_E9) || \ - (_IPP64==_IPP64_I7) ) -void Reduce_P192r1(BNU_CHUNK_T* pProduct) -{ - Ipp32u* pR = (Ipp32u*)pProduct; - - Ipp64u - sum = (Ipp64u)pR[0*2+0]+(Ipp64u)pR[3*2+0]+(Ipp64u)pR[5*2+0]; - pR[0] = LODWORD(sum); - sum = HIDWORD(sum); - - sum += (Ipp64u)pR[0*2+1]+(Ipp64u)pR[3*2+1]+(Ipp64u)pR[5*2+1]; - pR[1] = LODWORD(sum); - sum = HIDWORD(sum); - - sum += (Ipp64u)pR[1*2+0]+(Ipp64u)pR[3*2+0]+(Ipp64u)pR[4*2+0]+(Ipp64u)pR[5*2+0]; - pR[2] = LODWORD(sum); - sum = HIDWORD(sum); - - sum += (Ipp64u)pR[1*2+1]+(Ipp64u)pR[3*2+1]+(Ipp64u)pR[4*2+1]+(Ipp64u)pR[5*2+1]; - pR[3] = LODWORD(sum); - sum = HIDWORD(sum); - - sum += (Ipp64u)pR[2*2+0]+(Ipp64u)pR[4*2+0]+(Ipp64u)pR[5*2+0]; - pR[4] = LODWORD(sum); - sum = HIDWORD(sum); - - sum += (Ipp64u)pR[2*2+1]+(Ipp64u)pR[4*2+1]+(Ipp64u)pR[5*2+1]; - pR[5] = LODWORD(sum); - pProduct[LEN_P192] = (BNU_CHUNK_T)(HIDWORD(sum)); - - while(0<=cpCmp_BNU(pProduct, LEN_P192+1, (BNU_CHUNK_T*)secp192r1_p, LEN_P192+1)) - cpSub_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp192r1_p, LEN_P192+1); -} -#endif - -void cpAdde_192r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T carry = cpAdd_BNU(rPtr, aPtr, bPtr, LEN_P192); - if(carry || (0<=cpCmp_BNU(rPtr, LEN_P192, (BNU_CHUNK_T*)secp192r1_p, LEN_P192))) - cpSub_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp192r1_p, LEN_P192); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P192; -} - -void cpSube_192r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T borrow = cpSub_BNU(rPtr, aPtr, bPtr, LEN_P192); - if(borrow) - cpAdd_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp192r1_p, LEN_P192); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P192; -} - -void cpSqre_192r1(IppsBigNumState* pA, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P192]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpSqr_BNU_school(tmpR, aPtr, LEN_P192); - - Reduce_P192r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P192); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P192; -} - -void cpMule_192r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P192]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpMul_BNU_school(tmpR, aPtr, LEN_P192, bPtr, LEN_P192); - - Reduce_P192r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P192); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P192; -} - -#endif /* _ECP_192_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma192.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma192.h deleted file mode 100644 index c2da25a5ef..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma192.h +++ /dev/null @@ -1,84 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions and -// Internal Prime Modulo Arithmetic Function Prototypes -// -// -*/ - -#if (_ECP_192_==_ECP_IMPL_SPECIFIC_) - -#if !defined(_PCP_PMA192_H) -#define _PCP_PMA192_H - - -#include "pcpbn.h" -//#include "pcppmafix.h" - - -/* length of operand in bits and BNU32_CHUNK_T */ -#define OPERAND_BITSIZE (192) -#define LEN_P192 (BITS_BNU_CHUNK(OPERAND_BITSIZE)) - -/* -// Modular Arithmetic for secp192r1 ECC -*/ -void Reduce_P192r1(BNU_CHUNK_T* pR); -void cpAdde_192r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSube_192r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSqre_192r1(IppsBigNumState* pA, IppsBigNumState* pR); -void cpMule_192r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); - -#define PMA192_add(r,a,b) \ - cpAdde_192r1((a),(b), (r)) - -#define PMA192_sub(r,a,b) \ - cpSube_192r1((a),(b), (r)) - -#define PMA192_sqr(r,a) \ - cpSqre_192r1((a),(r)) - -#define PMA192_mul(r,a,b) \ - cpMule_192r1((a),(b), (r)) - -#define PMA192_div2(r,a) \ -{ \ - if( IsOdd_BN((a)) ) { \ - cpInc_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P192, 1); \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((r)), LEN_P192, 1); \ - cpAdd_BNU(BN_NUMBER((r)), BN_NUMBER((r)), (BNU_CHUNK_T*)h_secp192r1_p, LEN_P192); \ - } \ - else \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P192, 1); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P192; \ -} - -#define PMA192_inv(r,a,modulo) \ -{ \ - ippsModInv_BN((a),(modulo),(r)); \ - ZEXPAND_BNU(BN_NUMBER((r)),BN_SIZE((r)), LEN_P192); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P192; \ -} - -#endif /* _PCP_PMA192_H */ -#endif /* _ECP_192_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma224.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma224.c deleted file mode 100644 index 404a9d75bf..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma224.c +++ /dev/null @@ -1,169 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Prime Modulo Arithmetic Function -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_224_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccp.h" -#include "pcppma224.h" - - -/* -// Specific Modulo Arithmetic -// P224 = 2^224 -2^96 +1 -// (reference secp224r1_p) -*/ - -/* -// Reduce modulo: -// -// x = c13|c12|c11|c10|c09|c08|c07|c06|c05|c04|c03|c02|c01|c00 - 32-bits values -// -// s1 = c06|c05|c04|c03|c02|c01|c00 -// s2 = c10|c09|c08|c07|000|000|000 -// s3 = 000|c13|c12|c11|000|000|000 -// -// s4 = c13|c12|c11|c10|c09|c08|c07 -// s5 = 000|000|000|000|c13|c12|c11 -// -// r = (s1+s2+s3-s4-s5) (mod P) -*/ -#if !((_IPPXSC==_IPPXSC_S1) || (_IPPXSC==_IPPXSC_S2) || (_IPPXSC==_IPPXSC_C2) || \ - (_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ - (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || (_IPP32E==_IPP32E_Y8) || \ - (_IPPLP64==_IPPLP64_N8) || (_IPP32E>=_IPP32E_E9) || \ - (_IPP64==_IPP64_I7) ) -void Reduce_P224r1(BNU_CHUNK_T* pProduct) -{ - Ipp32u* pR = (Ipp32u*)pProduct; - - Ipp64u c7c11 = (Ipp64u)pR[ 7] + (Ipp64u)pR[11]; - Ipp64u c8c12 = (Ipp64u)pR[ 8] + (Ipp64u)pR[12]; - Ipp64u c9c13 = (Ipp64u)pR[ 9] + (Ipp64u)pR[13]; - - Ipp64s - sum = (Ipp64u)pR[ 0] - c7c11; - pR[0] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 1] - c8c12; - pR[1] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 2] - c9c13; - pR[2] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 3] + c7c11 - (Ipp64u)pR[10]; - pR[3] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 4] + c8c12 - (Ipp64u)pR[11]; - pR[4] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 5] + c9c13 - (Ipp64u)pR[12]; - pR[5] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 6] + (Ipp64u)pR[10] - (Ipp64u)pR[13]; - pR[6] = LODWORD(sum); - pR[7] = (Ipp32u)(sum>>32); - - while(((BNS_CHUNK_T)pProduct[BITS_BNU_CHUNK(OPERAND_BITSIZE+1)-1]) <0) { - cpAdd_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp224r1_p, BITS_BNU_CHUNK(OPERAND_BITSIZE+1)); - } - while(0 <= cpCmp_BNU(pProduct, BITS_BNU_CHUNK(OPERAND_BITSIZE+1), (BNU_CHUNK_T*)secp224r1_p, BITS_BNU_CHUNK(OPERAND_BITSIZE+1))) { - cpSub_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp224r1_p, BITS_BNU_CHUNK(OPERAND_BITSIZE+1)); - } -} -#endif - -void cpAdde_224r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T carry = cpAdd_BNU(rPtr, aPtr, bPtr, LEN_P224); - if(carry || (0<=cpCmp_BNU(rPtr, LEN_P224, (BNU_CHUNK_T*)secp224r1_p, LEN_P224))) - cpSub_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp224r1_p, LEN_P224); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P224; -} - -void cpSube_224r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T borrow = cpSub_BNU(rPtr, aPtr, bPtr, LEN_P224); - if(borrow) - cpAdd_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp224r1_p, LEN_P224); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P224; -} - -void cpSqre_224r1(IppsBigNumState* pA, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P224]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpSqr_BNU_school(tmpR, aPtr, LEN_P224); - - Reduce_P224r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P224); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P224; -} - -void cpMule_224r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P224]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpMul_BNU_school(tmpR, aPtr, LEN_P224, bPtr, LEN_P224); - - Reduce_P224r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P224); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P224; -} - -#endif /* _ECP_224_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma224.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma224.h deleted file mode 100644 index 3ddab5611a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma224.h +++ /dev/null @@ -1,81 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions and -// Internal Prime Modulo Arithmetic Function Prototypes -// -// -*/ - -#if !defined(_PCP_PMA224_H) -#define _PCP_PMA224_H - - -#include "pcpbn.h" -//#include "pcppmafix.h" - - -/* length of operand in bits and BNU32_CHUNK_T */ -#define OPERAND_BITSIZE (224) -#define LEN_P224 (BITS_BNU_CHUNK(OPERAND_BITSIZE)) - -/* -// Modular Arithmetic for secp224r1 ECC -*/ -void Reduce_P224r1(BNU_CHUNK_T* pR); -void cpAdde_224r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSube_224r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSqre_224r1(IppsBigNumState* pA, IppsBigNumState* pR); -void cpMule_224r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); - -#define PMA224_add(r,a,b) \ - cpAdde_224r1((a),(b), (r)) - -#define PMA224_sub(r,a,b) \ - cpSube_224r1((a),(b), (r)) - -#define PMA224_sqr(r,a) \ - cpSqre_224r1((a),(r)) - -#define PMA224_mul(r,a,b) \ - cpMule_224r1((a),(b), (r)) - -#define PMA224_div2(r,a) \ -{ \ - if( IsOdd_BN((a)) ) { \ - cpInc_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P224, 1); \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((r)), LEN_P224, 1); \ - cpAdd_BNU(BN_NUMBER((r)), BN_NUMBER((r)), (BNU_CHUNK_T*)h_secp224r1_p, LEN_P224); \ - } \ - else \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P224, 1); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P224; \ -} - -#define PMA224_inv(r,a,modulo) \ -{ \ - ippsModInv_BN((a),(modulo),(r)); \ - ZEXPAND_BNU(BN_NUMBER((r)),BN_SIZE((r)), LEN_P224); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P224; \ -} - -#endif /* _PCP_PMA224_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma256.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma256.c deleted file mode 100644 index cc6a515d2d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma256.c +++ /dev/null @@ -1,181 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Prime Modulo Arithmetic Function -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_256_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccp.h" -#include "pcppma256.h" - - -/* -// Specific Modulo Arithmetic -// P256 = 2^256 -2^224 +2^192 +2^96 -1 -// (reference secp256r1_p) -*/ - -/* -// Reduce modulo: -// -// x = c15|c14|c13|c12|c11|c10|c09|c08|c07|c06|c05|c04|c03|c02|c01|c00 - 32-bits values -// -// s1 = c07|c06|c05|c04|c03|c02|c01|c00 -// s2 = c15|c14|c13|c12|c11|000|000|000 -// s3 = 000|c15|c14|c13|c12|000|000|000 -// s4 = c15|c14|000|000|000|c10|c09|c08 -// s5 = c08|c13|c15|c14|c13|c11|c10|c09 -// -// s6 = c10|c08|000|000|000|c13|c12|c11 -// s7 = c11|c09|000|000|c15|c14|c13|c12 -// s8 = c12|000|c10|c09|c08|c15|c14|c13 -// s9 = c13|000|c11|c10|c09|000|c15|c14 -// -// r = (s1+2*s2+2*s3+s4+s5-s6-s7-s8-s9) (mod P) -*/ -#if !((_IPPXSC==_IPPXSC_S1) || (_IPPXSC==_IPPXSC_S2) || (_IPPXSC==_IPPXSC_C2) || \ - (_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ - (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ - (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) || \ - (_IPP32E==_IPP32E_M7) || \ - (_IPP32E==_IPP32E_U8) || (_IPP32E==_IPP32E_Y8) || \ - (_IPPLP64==_IPPLP64_N8) || (_IPP32E>=_IPP32E_E9) || \ - (_IPP64==_IPP64_I7) ) -void Reduce_P256r1(BNU_CHUNK_T* pProduct) -{ - Ipp32u* pR = (Ipp32u*)pProduct; - - Ipp64u c8c9 = (Ipp64u)pR[ 8] + (Ipp64u)pR[ 9]; - Ipp64u c9c10= (Ipp64u)pR[ 9] + (Ipp64u)pR[10]; - Ipp64u c10c11= (Ipp64u)pR[10] + (Ipp64u)pR[11]; - Ipp64u c11c12= (Ipp64u)pR[11] + (Ipp64u)pR[12]; - Ipp64u c12c13= (Ipp64u)pR[12] + (Ipp64u)pR[13]; - Ipp64u c13c14= (Ipp64u)pR[13] + (Ipp64u)pR[14]; - Ipp64u c14c15= (Ipp64u)pR[14] + (Ipp64u)pR[15]; - - Ipp64s - sum = (Ipp64u)pR[ 0] + c8c9 - c11c12 - c13c14; - pR[0] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 1] + c9c10 - c12c13 - c14c15; - pR[1] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 2] + c10c11- c13c14 - (Ipp64u)pR[15]; - pR[2] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 3] + c11c12 + c11c12 + c13c14 - c14c15 - c8c9; - pR[3] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 4] + c12c13 + c12c13 + (Ipp64u)pR[14] - c9c10; - pR[4] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 5] + c13c14 + c13c14 + (Ipp64u)pR[15] - c10c11; - pR[5] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 6] + c14c15 +c14c15 +c13c14 - c8c9; - pR[6] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 7] + (Ipp64u)pR[ 8] + (Ipp64u)pR[15] + (Ipp64u)pR[15] + (Ipp64u)pR[15] - c10c11 -c12c13; - pR[7] = LODWORD(sum); - sum >>= 32; - pProduct[LEN_P256] = (BNU_CHUNK_T)(sum); - - while(((BNS_CHUNK_T)pProduct[LEN_P256]) <0) - cpAdd_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp256r1_p, LEN_P256+1); - - while(0 <= cpCmp_BNU(pProduct, LEN_P256+1, (BNU_CHUNK_T*)secp256r1_p, LEN_P256+1)) - cpSub_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp256r1_p, LEN_P256+1); -} -#endif - -void cpAdde_256r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T carry = cpAdd_BNU(rPtr, aPtr, bPtr, LEN_P256); - if(carry || (0<=cpCmp_BNU(rPtr, LEN_P256, (BNU_CHUNK_T*)secp256r1_p, LEN_P256))) - cpSub_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp256r1_p, LEN_P256); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P256; -} - -void cpSube_256r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T borrow = cpSub_BNU(rPtr, aPtr, bPtr, LEN_P256); - if(borrow) - cpAdd_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp256r1_p, LEN_P256); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P256; -} - -void cpSqre_256r1(IppsBigNumState* pA, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P256]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpSqr_BNU_school(tmpR, aPtr, LEN_P256); - - Reduce_P256r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P256); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P256; -} - -void cpMule_256r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P256]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpMul_BNU_school(tmpR, aPtr, LEN_P256, bPtr, LEN_P256); - - Reduce_P256r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P256); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P256; -} - -#endif diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma256.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma256.h deleted file mode 100644 index 5137c0493a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma256.h +++ /dev/null @@ -1,82 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions and -// Internal Prime Modulo Arithmetic Function Prototypes -// -// -*/ - -#if !defined(_PCP_PMA256_H) -#define _PCP_PMA256_H - - -#include "pcpbn.h" -//#include "pcppmafix.h" - - -/* length of operand in bits and BNU32_CHUNK_T */ -#define OPERAND_BITSIZE (256) -#define LEN_P256 (BITS_BNU_CHUNK(OPERAND_BITSIZE)) - - -/* -// Modular Arithmetic for secp256r1 ECC -*/ -void Reduce_P256r1(BNU_CHUNK_T* pR); -void cpAdde_256r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSube_256r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSqre_256r1(IppsBigNumState* pA, IppsBigNumState* pR); -void cpMule_256r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); - -#define PMA256_add(r,a,b) \ - cpAdde_256r1((a),(b), (r)) - -#define PMA256_sub(r,a,b) \ - cpSube_256r1((a),(b), (r)) - -#define PMA256_sqr(r,a) \ - cpSqre_256r1((a),(r)) - -#define PMA256_mul(r,a,b) \ - cpMule_256r1((a),(b), (r)) - -#define PMA256_div2(r,a) \ -{ \ - if( IsOdd_BN((a)) ) { \ - cpInc_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P256, 1); \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((r)), LEN_P256, 1); \ - cpAdd_BNU(BN_NUMBER((r)), BN_NUMBER((r)), (BNU_CHUNK_T*)h_secp256r1_p, LEN_P256); \ - } \ - else \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P256, 1); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P256; \ -} - -#define PMA256_inv(r,a,modulo) \ -{ \ - ippsModInv_BN((a),(modulo),(r)); \ - ZEXPAND_BNU(BN_NUMBER((r)),BN_SIZE((r)), LEN_P256); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P256; \ -} - -#endif /* _PCP_PMA256_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma384.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma384.c deleted file mode 100644 index f2042f6965..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma384.c +++ /dev/null @@ -1,191 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Prime Modulo Arithmetic Function -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_384_==_ECP_IMPL_SPECIFIC_) || (_ECP_384_==_ECP_IMPL_MFM_) -#include "pcpeccp.h" -#include "pcppma384.h" - - -/* -// Specific Modulo Arithmetic -// P384 = 2^384 -2^128 -2^96 +2^32 -1 -// (reference secp384r1_p) -*/ - -/* -// Reduce modulo: -// -// x = c23|c22|c21|c20|c19|c18|c17|c16|c15|c14|c13|c12|c11|c10|c09|c08|c07|c06|c05|c04|c03|c02|c01|c00 - 32-bits values -// -// s1 = c11|c10|c09|c08|c07|c06|c05|c04|c03|c02|c01|c00 -// s2 = 000|000|000|000|000|c23|c22|c21|000|000|000|000 -// s3 = c23|c22|c21|c20|c19|c18|c17|c16|c15|c14|c13|c12 -// s4 = c20|c19|c18|c17|c16|c15|c14|c13|c12|c23|c22|c21 -// s5 = c19|c18|c17|c16|c15|c14|c13|c12|c20|000|c23|000 -// s6 = 000|000|000|000|c23|c22|c21|c20|000|000|000|000 -// s7 = 000|000|000|000|000|000|c23|c22|c21|000|000|c20 -// -// s8 = c22|c21|c20|c19|c18|c17|c16|c15|c14|c13|c12|c23 -// s9 = 000|000|000|000|000|000|000|c23|c22|c21|c20|000 -// s10= 000|000|000|000|000|000|000|c23|c23|000|000|000 -// -// r = (s1+2*s2+s3+s4+s5+s6+s7-s8-s9-10) (mod P) -*/ - -//static -void Reduce_P384r1(BNU_CHUNK_T* pProduct) -{ - #define CHUNK_LEN_P384 (BITS_BNU_CHUNK(OPERAND_BITSIZE)) - - Ipp32u* pR = (Ipp32u*)pProduct; - - Ipp64u c12c21 = (Ipp64u)pR[12] + (Ipp64u)pR[21]; - Ipp64u c13c22 = (Ipp64u)pR[13] + (Ipp64u)pR[22]; - Ipp64u c14c23 = (Ipp64u)pR[14] + (Ipp64u)pR[23]; - - Ipp64s - sum = (Ipp64u)pR[ 0] + c12c21 + (Ipp64u)pR[20] - (Ipp64u)pR[23]; - pR[ 0]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 1] + c13c22 + (Ipp64u)pR[23] - (Ipp64u)pR[12] - (Ipp64u)pR[20]; - pR[ 1]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 2] + c14c23 - (Ipp64u)pR[13] - (Ipp64u)pR[21]; - pR[ 2]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 3] + c12c21 + (Ipp64u)pR[15] + (Ipp64u)pR[20] - c14c23 - (Ipp64u)pR[22]; - pR[ 3]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 4] + (Ipp64u)pR[21] + c12c21 + c13c22 + (Ipp64u)pR[16] + (Ipp64u)pR[20] - (Ipp64u)pR[15] - (Ipp64u)pR[23] - (Ipp64u)pR[23]; - pR[ 4]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 5] + (Ipp64u)pR[22] + c13c22 + c14c23 + (Ipp64u)pR[17] + (Ipp64u)pR[21] - (Ipp64u)pR[16]; - pR[ 5]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 6] + (Ipp64u)pR[23] + c14c23 + (Ipp64u)pR[15] + (Ipp64u)pR[18] + (Ipp64u)pR[22] - (Ipp64u)pR[17]; - pR[ 6]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 7] + (Ipp64u)pR[15] + (Ipp64u)pR[16] + (Ipp64u)pR[19] + (Ipp64u)pR[23] - (Ipp64u)pR[18]; - pR[ 7]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 8] + (Ipp64u)pR[16] + (Ipp64u)pR[17] + (Ipp64u)pR[20] - (Ipp64u)pR[19]; - pR[ 8]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 9] + (Ipp64u)pR[17] + (Ipp64u)pR[18] + (Ipp64u)pR[21] - (Ipp64u)pR[20]; - pR[ 9]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[10] + (Ipp64u)pR[18] + (Ipp64u)pR[19] + (Ipp64u)pR[22] - (Ipp64u)pR[21]; - pR[10]= LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[11] + (Ipp64u)pR[19] + (Ipp64u)pR[20] + (Ipp64u)pR[23] - (Ipp64u)pR[22]; - pR[11]= LODWORD(sum); - sum >>= 32; - pProduct[LEN_P384] = (BNU_CHUNK_T)sum; - - while(((BNS_CHUNK_T)pProduct[LEN_P384]) <0) - cpAdd_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp384r1_p, LEN_P384+1); - - while(0 <= cpCmp_BNU(pProduct, LEN_P384+1, (BNU_CHUNK_T*)secp384r1_p, LEN_P384+1)) - cpSub_BNU(pProduct, pProduct, (BNU_CHUNK_T*)secp384r1_p, LEN_P384+1); -} - - -void cpSqre_384r1(IppsBigNumState* pA, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P384]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpSqr_BNU_school(tmpR, aPtr, LEN_P384); - - Reduce_P384r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P384); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P384; -} - -void cpMule_384r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P384]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpMul_BNU_school(tmpR, aPtr, LEN_P384, bPtr, LEN_P384); - - Reduce_P384r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P384); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P384; -} -#endif /* (_ECP_384_==_ECP_IMPL_SPECIFIC_) || (_ECP_384_==_ECP_IMPL_MFM_) */ - -#if (_ECP_384_==_ECP_IMPL_SPECIFIC_) -void cpAdde_384r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T carry = cpAdd_BNU(rPtr, aPtr, bPtr, LEN_P384); - if(carry || (0<=cpCmp_BNU(rPtr, LEN_P384, (BNU_CHUNK_T*)secp384r1_p, LEN_P384))) - cpSub_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp384r1_p, LEN_P384); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P384; -} - -void cpSube_384r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T borrow = cpSub_BNU(rPtr, aPtr, bPtr, LEN_P384); - if(borrow) - cpAdd_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp384r1_p, LEN_P384); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P384; -} -#endif /* _ECP_384_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma384.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma384.h deleted file mode 100644 index 688e49fa67..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma384.h +++ /dev/null @@ -1,82 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions and -// Internal Prime Modulo Arithmetic Function Prototypes -// -// -*/ - -#if !defined(_PCP_PMA384_H) -#define _PCP_PMA384_H - - -#include "pcpbn.h" -//#include "pcppmafix.h" - - -/* length of operand in bits and BNU32_CHUNK_T */ -#define OPERAND_BITSIZE (384) -#define LEN_P384 (BITS_BNU_CHUNK(OPERAND_BITSIZE)) - -/* -// Modular Arithmetic for secp384r1 ECC -*/ -void Reduce_P384r1(BNU_CHUNK_T* pProduct); - -void cpAdde_384r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSube_384r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSqre_384r1(IppsBigNumState* pA, IppsBigNumState* pR); -void cpMule_384r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); - -#define PMA384_add(r,a,b) \ - cpAdde_384r1((a),(b), (r)) - -#define PMA384_sub(r,a,b) \ - cpSube_384r1((a),(b), (r)) - -#define PMA384_sqr(r,a) \ - cpSqre_384r1((a),(r)) - -#define PMA384_mul(r,a,b) \ - cpMule_384r1((a),(b), (r)) - -#define PMA384_div2(r,a) \ -{ \ - if( IsOdd_BN((a)) ) { \ - cpInc_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P384, 1); \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((r)), LEN_P384, 1); \ - cpAdd_BNU(BN_NUMBER((r)), BN_NUMBER((r)), (BNU_CHUNK_T*)h_secp384r1_p, LEN_P384); \ - } \ - else \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P384, 1); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P384; \ -} - -#define PMA384_inv(r,a,modulo) \ -{ \ - ippsModInv_BN((a),(modulo),(r)); \ - ZEXPAND_BNU(BN_NUMBER((r)),BN_SIZE((r)), LEN_P384); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P384; \ -} - -#endif /* _PCP_PMA384_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma521.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma521.c deleted file mode 100644 index 6366285c94..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma521.c +++ /dev/null @@ -1,124 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Prime Modulo Arithmetic Function -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcpeccp.h" -#include "pcppma521.h" - -#if (_ECP_521_==_ECP_IMPL_SPECIFIC_) || (_ECP_521_==_ECP_IMPL_MFM_) - - -/* -// Specific Modulo Arithmetic -// P521 = 2^521 -1 -// (reference secp521r1_p) -*/ - -/* -// Reduce modulo: -// -// x = a1*2^521 + a0 - 521-bits values -// -// r = (s1+a0) (mod P) -*/ -static -void Reduce_P521r1(BNU_CHUNK_T* pProduct) -{ - BNU_CHUNK_T TT[LEN_P521]; - BNU_CHUNK_T* pR = pProduct; - - cpLSR_BNU(TT, pR+LEN_P521-1, LEN_P521, OPERAND_BITSIZE%BITSIZE(BNU_CHUNK_T)); - pR[LEN_P521-1] &= MASK_BNU_CHUNK(OPERAND_BITSIZE % BITSIZE(BNU_CHUNK_T)); - TT[LEN_P521-1] &= MASK_BNU_CHUNK(OPERAND_BITSIZE % BITSIZE(BNU_CHUNK_T)); - cpAdd_BNU(pR, pR, TT, LEN_P521); - - while(0 <= cpCmp_BNU(pR, LEN_P521, (BNU_CHUNK_T*)secp521r1_p, LEN_P521)) - cpSub_BNU(pR, pR, (BNU_CHUNK_T*)secp521r1_p, LEN_P521); -} - -void cpSqre_521r1(IppsBigNumState* pA, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P521]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpSqr_BNU_school(tmpR, aPtr, LEN_P521); - - Reduce_P521r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P521); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P521; -} - -void cpMule_521r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T tmpR[2*LEN_P521]; - - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - cpMul_BNU_school(tmpR, aPtr, LEN_P521, bPtr, LEN_P521); - - Reduce_P521r1(tmpR); - COPY_BNU(rPtr, tmpR, LEN_P521); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P521; -} -#endif /* (_ECP_521_==_ECP_IMPL_SPECIFIC_) || (_ECP_521_==_ECP_IMPL_MFM_) */ - -#if (_ECP_521_==_ECP_IMPL_SPECIFIC_) -void cpAdde_521r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T carry = cpAdd_BNU(rPtr, aPtr, bPtr, LEN_P521); - if(carry || (0<=cpCmp_BNU(rPtr, LEN_P521, (BNU_CHUNK_T*)secp521r1_p, LEN_P521))) - cpSub_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp521r1_p, LEN_P521); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P521; -} - -void cpSube_521r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR) -{ - BNU_CHUNK_T* aPtr = BN_NUMBER(pA); - BNU_CHUNK_T* bPtr = BN_NUMBER(pB); - BNU_CHUNK_T* rPtr = BN_NUMBER(pR); - - BNU_CHUNK_T borrow = cpSub_BNU(rPtr, aPtr, bPtr, LEN_P521); - if(borrow) - cpAdd_BNU(rPtr, rPtr, (BNU_CHUNK_T*)secp521r1_p, LEN_P521); - - BN_SIGN(pR) = ippBigNumPOS; - BN_SIZE(pR) = LEN_P521; -} -#endif /* _ECP_521_==_ECP_IMPL_SPECIFIC_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma521.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma521.h deleted file mode 100644 index 8dacdcfe2d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppma521.h +++ /dev/null @@ -1,80 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions and -// Internal Prime Modulo Arithmetic Function Prototypes -// -// -*/ - -#if !defined(_PCP_PMA521_H) -#define _PCP_PMA521_H - - -#include "pcpbn.h" -//#include "pcppmafix.h" - - -/* length of operand in bits and BNU32_CHUNK_T */ -#define OPERAND_BITSIZE (521) -#define LEN_P521 (BITS_BNU_CHUNK(OPERAND_BITSIZE)) - -/* -// Modular Arithmetic for secp521r1 ECC -*/ -void cpAdde_521r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSube_521r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); -void cpSqre_521r1(IppsBigNumState* pA, IppsBigNumState* pR); -void cpMule_521r1(IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR); - -#define PMA521_add(r,a,b) \ - cpAdde_521r1((a),(b), (r)) - -#define PMA521_sub(r,a,b) \ - cpSube_521r1((a),(b), (r)) - -#define PMA521_sqr(r,a) \ - cpSqre_521r1((a),(r)) - -#define PMA521_mul(r,a,b) \ - cpMule_521r1((a),(b), (r)) - -#define PMA521_div2(r,a) \ -{ \ - if( IsOdd_BN((a)) ) { \ - cpInc_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P521, 1); \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((r)), LEN_P521, 1); \ - cpAdd_BNU(BN_NUMBER((r)), BN_NUMBER((r)), (BNU_CHUNK_T*)h_secp521r1_p, LEN_P521); \ - } \ - else \ - cpLSR_BNU(BN_NUMBER((r)), BN_NUMBER((a)), LEN_P521, 1); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P521; \ -} - -#define PMA521_inv(r,a,modulo) \ -{ \ - ippsModInv_BN((a),(modulo),(r)); \ - ZEXPAND_BNU(BN_NUMBER((r)),BN_SIZE((r)), LEN_P521); \ - BN_SIGN((r)) = ippBigNumPOS; \ - BN_SIZE((r)) = LEN_P521; \ -} - -#endif /* _PCP_PMA521_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppmasm2.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppmasm2.c deleted file mode 100644 index 28ebf80f83..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcppmasm2.c +++ /dev/null @@ -1,311 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Prime Modulo Arithmetic Function -// -// -*/ - -#include "precomp.h" -#include "owncp.h" - -#if (_ECP_SM2_==_ECP_IMPL_SPECIFIC_) -#include "pcpeccp.h" -#include "pcppmasm2.h" - - -/* -// Specific Modulo Arithmetic -// P256 = 2^256 -2^224 -2^96 +2^64 -1 -// (reference tpmSM2_p256_p) -*/ - -/* -// Reduce modulo: -// -// x = c15|c14|c13|c12|c11|c10|c09|c08|c07|c06|c05|c04|c03|c02|c01|c00 - 32-bits values -// -// r7 r6 r5 r4 r3 r2 r1 r0 -// c08 deposit: | c08 | 000 | 000 | 000 | c08 |-c08 | 000 | c08 | -// c09 deposit: | c09 | 000 | 000 | c09 | 000 |-c09 | c09 | c09 | -// c10 deposit: | c10 | 000 | c10 | 000 | 000 | 000 | c10 | c10 | -// c11 deposit: | c11 | c11 | 000 | 000 | c11 | 000 | c11 | c11 | -// c12 deposit: |2*c12| 000 | 000 | c12 | c12 | 000 | c12 | c12 | -// c13 deposit: |2*c13| 000 | c13 | c13 |2*c13|-c13 | c13 |2*c13| -// c14 deposit: |2*c14| c14 | c14 |2*c14| c14 |-c14 |2*c14|2*c14| -// c15 deposit: |3*c15| c15 |2*c15| c15 | c15 | 000 |2*c15|2*c15| -// -*/ -//#if !((_IPP==_IPP_W7) || (_IPP==_IPP_T7) || \ -// (_IPP==_IPP_V8) || (_IPP==_IPP_P8) || \ -// (_IPPLP32==_IPPLP32_S8) || (_IPP>=_IPP_G9) ) -#if (_IPP < _IPP_W7) -void Reduce_SM2(BNU_CHUNK_T* pProduct) -{ - Ipp32u* pR = (Ipp32u*)pProduct; - - Ipp64u t0 = (Ipp64u)pR[ 8] + pR[ 9] + pR[10] + pR[11] + pR[12]; - Ipp64u w0 = (Ipp64u)pR[13] +pR[14] + pR[15]; - Ipp64u u0 = w0<<1; - - Ipp64s - sum = (Ipp64u)pR[ 0] +t0 + u0; - pR[0] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 1] +(t0-pR[8]) +(u0-pR[13]); - pR[1] = LODWORD(sum); - sum >>= 32; - - //sum += (Ipp64u)pR[ 2] - (pR[8]+pR[9]) - (w0-pR[15]); - sum += (Ipp64u)pR[ 2] - pR[8] -pR[9] - (w0-pR[15]); - pR[2] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 3] +pR[ 8] +pR[11] +pR[12] +(w0+pR[13]); - pR[3] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 4] +pR[ 9] + pR[12] + (w0+pR[14]); - pR[4] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 5] +pR[10] +(w0+pR[15]); - pR[5] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 6] +pR[11] + (w0-pR[13]); - pR[6] = LODWORD(sum); - sum >>= 32; - - sum += (Ipp64u)pR[ 7] + (t0+pR[12]) + (u0+pR[15]); - pR[7] = LODWORD(sum); - sum >>= 32; - pProduct[LEN_P256] = (BNU_CHUNK_T)(sum); - - while(((BNS_CHUNK_T)pProduct[LEN_P256]) <0) - cpAdd_BNU(pProduct, pProduct, (BNU_CHUNK_T*)tpmSM2_p256_p, LEN_P256+1); - - while(0 <= cpCmp_BNU(pProduct, LEN_P256+1, (BNU_CHUNK_T*)tpmSM2_p256_p, LEN_P256+1)) - cpSub_BNU(pProduct, pProduct, (BNU_CHUNK_T*)tpmSM2_p256_p, LEN_P256+1); -} - -#else -#if 0 -void Reduce_SM2(BNU_CHUNK_T* pProduct) -{ - Ipp32u* pR = (Ipp32u*)pProduct; - - __m64 s8 = _mm_cvtsi32_si64((Ipp32s)pR[8]); - __m64 s9 = _mm_cvtsi32_si64((Ipp32s)pR[9]); - __m64 s10 = _mm_cvtsi32_si64((Ipp32s)pR[10]); - __m64 s11 = _mm_cvtsi32_si64((Ipp32s)pR[11]); - __m64 s12 = _mm_cvtsi32_si64((Ipp32s)pR[12]); - __m64 s13 = _mm_cvtsi32_si64((Ipp32s)pR[13]); - __m64 s14 = _mm_cvtsi32_si64((Ipp32s)pR[14]); - __m64 s15 = _mm_cvtsi32_si64((Ipp32s)pR[15]); - - __m64 w0 = _mm_add_si64(s13, - _mm_add_si64(s14, s15)); - __m64 t0 = _mm_add_si64(s8, - _mm_add_si64(s9, - _mm_add_si64(s10, - _mm_add_si64(s11, - _mm_add_si64(s12, - _mm_add_si64(w0, w0)))))); - - __m64 - // sum = pR[ 0] +t0 + u0 - sum = _mm_add_si64(_mm_cvtsi32_si64((Ipp32s)pR[0]), t0); - pR[0] = (Ipp32u)( _mm_cvtsi64_si32(sum) ); - sum = _mm_shuffle_pi16(sum, 0xfe); - - // sum += pR[ 1] +(t0-pR[8]) +(u0-pR[13]) - sum = _mm_sub_si64( - _mm_add_si64(_mm_cvtsi32_si64((Ipp32s)pR[1]), - _mm_add_si64(sum, t0)), - _mm_add_si64(s8, s13)); - pR[1] = (Ipp32u)( _mm_cvtsi64_si32(sum) ); - sum = _mm_shuffle_pi16(sum, 0xfe); - - // sum += pR[ 2] - pR[8] -pR[9] - (w0-pR[15]) - sum = _mm_sub_si64( - _mm_add_si64(_mm_cvtsi32_si64((Ipp32s)pR[2]), - _mm_add_si64(sum, s15)), - _mm_add_si64(s8, - _mm_add_si64(s9, w0))); - pR[2] = (Ipp32u)( _mm_cvtsi64_si32(sum) ); - sum = _mm_shuffle_pi16(sum, 0xfe); - - // sum += pR[ 3] +pR[ 8] +pR[11] +pR[12] +(w0+pR[13]); - sum = _mm_add_si64(_mm_cvtsi32_si64((Ipp32s)pR[3]), - _mm_add_si64(sum, - _mm_add_si64(s8, - _mm_add_si64(s11, - _mm_add_si64(s12, - _mm_add_si64(w0, s13)))))); - pR[3] = (Ipp32u)( _mm_cvtsi64_si32(sum) ); - sum = _mm_shuffle_pi16(sum, 0xfe); - - // sum += pR[ 4] +pR[ 9] + pR[12] + (w0+pR[14]); - sum = _mm_add_si64(_mm_cvtsi32_si64((Ipp32s)pR[4]), - _mm_add_si64(sum, - _mm_add_si64(s9, - _mm_add_si64(s12, - _mm_add_si64(w0, s14))))); - pR[4] = (Ipp32u)( _mm_cvtsi64_si32(sum) ); - sum = _mm_shuffle_pi16(sum, 0xfe); - - // sum += pR[ 5] +pR[10] +(w0+pR[15]); - sum = _mm_add_si64(_mm_cvtsi32_si64((Ipp32s)pR[5]), - _mm_add_si64(sum, - _mm_add_si64(s10, - _mm_add_si64(w0, s15)))); - pR[5] = (Ipp32u)( _mm_cvtsi64_si32(sum) ); - sum = _mm_shuffle_pi16(sum, 0xfe); - - // sum += pR[ 6] +pR[11] + (w0-pR[13]); - sum = _mm_sub_si64( - _mm_add_si64(_mm_cvtsi32_si64((Ipp32s)pR[6]), - _mm_add_si64(sum, - _mm_add_si64(s11, w0))), - s13); - pR[6] = (Ipp32u)( _mm_cvtsi64_si32(sum) ); - sum = _mm_shuffle_pi16(sum, 0xfe); - - // sum += pR[ 7] + (t0+pR[12]) + (u0+pR[15]); - sum = _mm_add_si64(_mm_cvtsi32_si64((Ipp32s)pR[7]), - _mm_add_si64(sum, - _mm_add_si64(t0, - _mm_add_si64(s12, s15)))); - pR[7] = (Ipp32u)( _mm_cvtsi64_si32(sum) ); - sum = _mm_shuffle_pi16(sum, 0xfe); - pProduct[LEN_P256] = (BNS_CHUNK_T)( _mm_cvtsi64_si32(sum) ); - - { - int n; - const Ipp32u* pMx; - - // reduce multiple modulus - if( pProduct[LEN_P256] ) { - pMx = tpmSM2_p256_p_mx[ pProduct[LEN_P256] ]; - sum = _mm_setzero_si64(); - for(n=0; nidCtx) -#define PRIME_MAXBITSIZE(ctx) ((ctx)->maxBitSize) -#define PRIME_NUMBER(ctx) ((ctx)->pPrime) -#define PRIME_TEMP1(ctx) ((ctx)->pT1) -#define PRIME_TEMP2(ctx) ((ctx)->pT2) -#define PRIME_TEMP3(ctx) ((ctx)->pT3) -#define PRIME_MONT(ctx) ((ctx)->pMont) - -#define PRIME_VALID_ID(ctx) (PRIME_ID((ctx))==idCtxPrimeNumber) - -/* easy prime test */ -int cpMimimalPrimeTest(const Ipp32u* pPrime, cpSize ns); - -/* prime test */ -int cpPrimeTest(const BNU_CHUNK_T* pPrime, cpSize primeLen, - cpSize nTrials, - IppsPrimeState* pCtx, - IppBitSupplier rndFunc, void* pRndParam); - -void cpPackPrimeCtx(const IppsPrimeState* pCtx, Ipp8u* pBuffer); -void cpUnpackPrimeCtx(const Ipp8u* pBuffer, IppsPrimeState* pCtx); - -#endif /* _CP_PRIME_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprimeginitca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprimeginitca.c deleted file mode 100644 index 9689d834d8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprimeginitca.c +++ /dev/null @@ -1,158 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives. Cryptographic Primitives (ippcp) -// Prime Number Primitives. -// -// Contents: -// ippsPrimeGetSize() -// ippsPrimeInit() -// -// -*/ - -#include "owncp.h" -#include "pcpprimeg.h" -#include "pcptool.h" - - -/*F* -// Name: ippsPrimeGetSize -// -// Purpose: Returns size of Prime Number Generator context (bytes). -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pSize -// ippStsLengthErr 1 > maxBits -// ippStsNoErr no error -// -// Parameters: -// maxBits max length of a prime number -// pSize pointer to the size of internal context -*F*/ -IPPFUN(IppStatus, ippsPrimeGetSize, (cpSize maxBits, cpSize* pSize)) -{ - IPP_BAD_PTR1_RET(pSize); - IPP_BADARG_RET(maxBits<1, ippStsLengthErr); - - { - cpSize len = BITS_BNU_CHUNK(maxBits); - cpSize len32 = BITS2WORD32_SIZE(maxBits); - cpSize montSize; - ippsMontGetSize(ippBinaryMethod, len32, &montSize); - - *pSize = sizeof(IppsPrimeState) - +len*sizeof(BNU_CHUNK_T) - +len*sizeof(BNU_CHUNK_T) - +len*sizeof(BNU_CHUNK_T) - +len*sizeof(BNU_CHUNK_T) - +montSize - +PRIME_ALIGNMENT-1; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsPrimeInit -// -// Purpose: Initializes Prime Number Generator context -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pCtx -// ippStsLengthErr 1 > maxBits -// ippStsNoErr no error -// -// Parameters: -// maxBits max length of a prime number -// pCtx pointer to the context to be initialized -*F*/ -IPPFUN(IppStatus, ippsPrimeInit, (cpSize maxBits, IppsPrimeState* pCtx)) -{ - IPP_BAD_PTR1_RET(pCtx); - IPP_BADARG_RET(maxBits<1, ippStsLengthErr); - - /* use aligned PRNG context */ - pCtx = (IppsPrimeState*)( IPP_ALIGNED_PTR(pCtx, PRIME_ALIGNMENT) ); - - { - Ipp8u* ptr = (Ipp8u*)pCtx; - - cpSize len = BITS_BNU_CHUNK(maxBits); - cpSize len32 = BITS2WORD32_SIZE(maxBits); - - PRIME_ID(pCtx) = idCtxPrimeNumber; - PRIME_MAXBITSIZE(pCtx) = maxBits; - - ptr += sizeof(IppsPrimeState); - PRIME_NUMBER(pCtx) = (BNU_CHUNK_T*)ptr; - - ptr += len*sizeof(BNU_CHUNK_T); - PRIME_TEMP1(pCtx) = (BNU_CHUNK_T*)ptr; - - ptr += len*sizeof(BNU_CHUNK_T); - PRIME_TEMP2(pCtx) = (BNU_CHUNK_T*)ptr; - - ptr += len*sizeof(BNU_CHUNK_T); - PRIME_TEMP3(pCtx) = (BNU_CHUNK_T*)ptr; - - ptr += len*sizeof(BNU_CHUNK_T); - PRIME_MONT(pCtx) = (IppsMontState*)( IPP_ALIGNED_PTR((ptr), MONT_ALIGNMENT) ); - ippsMontInit(ippBinaryMethod, len32, PRIME_MONT(pCtx)); - - return ippStsNoErr; - } -} - - -void cpPackPrimeCtx(const IppsPrimeState* pCtx, Ipp8u* pBuffer) -{ - IppsPrimeState* pAlignedBuffer = (IppsPrimeState*)( IPP_ALIGNED_PTR(pBuffer, PRIME_ALIGNMENT) ); - - /* max length of prime */ - cpSize nsPrime = BITS_BNU_CHUNK(PRIME_MAXBITSIZE(pCtx)); - - CopyBlock(pCtx, pAlignedBuffer, sizeof(IppsPrimeState)); - PRIME_NUMBER(pAlignedBuffer)= (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(PRIME_NUMBER(pCtx))-IPP_UINT_PTR(pCtx)); - PRIME_TEMP1(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(PRIME_TEMP1(pCtx))-IPP_UINT_PTR(pCtx)); - PRIME_TEMP2(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(PRIME_TEMP2(pCtx))-IPP_UINT_PTR(pCtx)); - PRIME_TEMP3(pAlignedBuffer) = (BNU_CHUNK_T*)((Ipp8u*)NULL + IPP_UINT_PTR(PRIME_TEMP3(pCtx))-IPP_UINT_PTR(pCtx)); - PRIME_MONT(pAlignedBuffer) =(IppsMontState*)((Ipp8u*)NULL + IPP_UINT_PTR(PRIME_MONT(pCtx))-IPP_UINT_PTR(pCtx)); - - CopyBlock(PRIME_NUMBER(pCtx), (Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(PRIME_NUMBER(pAlignedBuffer)), nsPrime*sizeof(BNU_CHUNK_T)); - cpPackMontCtx(PRIME_MONT(pCtx), (Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(PRIME_MONT(pAlignedBuffer))); -} - -void cpUnpackPrimeCtx(const Ipp8u* pBuffer, IppsPrimeState* pCtx) -{ - IppsPrimeState* pAlignedBuffer = (IppsPrimeState*)( IPP_ALIGNED_PTR(pBuffer, PRIME_ALIGNMENT) ); - - /* max length of prime */ - cpSize nsPrime = BITS_BNU_CHUNK(PRIME_MAXBITSIZE(pAlignedBuffer)); - - CopyBlock(pAlignedBuffer, pCtx, sizeof(IppsPrimeState)); - PRIME_NUMBER(pCtx)= (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(PRIME_NUMBER(pAlignedBuffer))); - PRIME_TEMP1(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(PRIME_TEMP1(pAlignedBuffer))); - PRIME_TEMP2(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(PRIME_TEMP2(pAlignedBuffer))); - PRIME_TEMP3(pCtx) = (BNU_CHUNK_T*)((Ipp8u*)pCtx+ IPP_UINT_PTR(PRIME_TEMP3(pAlignedBuffer))); - PRIME_MONT(pCtx) = (IppsMontState*)((Ipp8u*)pCtx+ IPP_UINT_PTR(PRIME_MONT(pAlignedBuffer))); - - CopyBlock((Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(PRIME_NUMBER(pAlignedBuffer)), PRIME_NUMBER(pCtx), nsPrime*sizeof(BNU_CHUNK_T)); - cpUnpackMontCtx((Ipp8u*)pAlignedBuffer+IPP_UINT_PTR(PRIME_MONT(pAlignedBuffer)), PRIME_MONT(pCtx)); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprng.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprng.h deleted file mode 100644 index 4d236ae39d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprng.h +++ /dev/null @@ -1,59 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions and -// Internal Pseudo Random Generator Function Prototypes -// -*/ - -#if !defined(_CP_PRNG_H) -#define _CP_PRNG_H - -/* -// Pseudo-random generation context -*/ - -#define MAX_XKEY_SIZE 512 -#define DEFAULT_XKEY_SIZE 512 /* must be >=160 || <=512 */ - -struct _cpPRNG { - IppCtxId idCtx; /* PRNG identifier */ - cpSize seedBits; /* secret seed-key bitsize */ - BNU_CHUNK_T Q[BITS_BNU_CHUNK(160)]; /* modulus */ - BNU_CHUNK_T T[BITS_BNU_CHUNK(160)]; /* parameter of SHA_G() funct */ - BNU_CHUNK_T xAug[BITS_BNU_CHUNK(MAX_XKEY_SIZE)]; /* optional entropy augment */ - BNU_CHUNK_T xKey[BITS_BNU_CHUNK(MAX_XKEY_SIZE)]; /* secret seed-key */ -}; - -/* alignment */ -#define PRNG_ALIGNMENT ((int)(sizeof(void*))) - -#define RAND_ID(ctx) ((ctx)->idCtx) -#define RAND_SEEDBITS(ctx) ((ctx)->seedBits) -#define RAND_Q(ctx) ((ctx)->Q) -#define RAND_T(ctx) ((ctx)->T) -#define RAND_XAUGMENT(ctx) ((ctx)->xAug) -#define RAND_XKEY(ctx) ((ctx)->xKey) - -#define RAND_VALID_ID(ctx) (RAND_ID((ctx))==idCtxPRNG) - -int cpPRNGen(Ipp32u* pBuffer, cpSize bitLen, IppsPRNGState* pCtx); - -#endif /* _CP_PRNG_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprngenca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprngenca.c deleted file mode 100644 index e3204f7221..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprngenca.c +++ /dev/null @@ -1,251 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// PRNG Functions -// -// Contents: -// ippsPRNGen() -// ippsPRNGen_BN() -// -// -*/ - -#include "precomp.h" - -#include "owncp.h" -#include "pcpbn.h" -#include "pcphash.h" -#include "pcpprng.h" -#include "pcptool.h" - -/* -// G() function based on SHA1 -// -// Parameters: -// T 160 bit parameter -// pHexStr input hex string -// hexStrLen size of hex string (Ipp8u segnments) -// xBNU 160 bit BNU result -// -// Note 1: -// must to be hexStrLen <= 64 (512 bits) -*/ -static -void SHA1_G(Ipp32u* xBNU, const Ipp32u* T, Ipp8u* pHexStr, int hexStrLen) -{ - /* select processing function */ -#if 0 - cpHashProc updateFunc = UpdateSHA1; - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA1ni; - #endif -#endif - cpHashProc updateFunc; - #if (_SHA_NI_ENABLING_==_FEATURE_ON_) - updateFunc = UpdateSHA1ni; - #else - #if (_SHA_NI_ENABLING_==_FEATURE_TICKTOCK_) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA1ni; - else - #endif - updateFunc = UpdateSHA1; - #endif - - /* pad HexString zeros */ - PaddBlock(0, pHexStr+hexStrLen, BITS2WORD8_SIZE(MAX_XKEY_SIZE)-hexStrLen); - - /* reset initial HASH value */ - xBNU[0] = T[0]; - xBNU[1] = T[1]; - xBNU[2] = T[2]; - xBNU[3] = T[3]; - xBNU[4] = T[4]; - - /* SHA1 */ - //UpdateSHA1(xBNU, pHexStr, BITS2WORD8_SIZE(MAX_XKEY_SIZE), SHA1_cnt); - updateFunc(xBNU, pHexStr, BITS2WORD8_SIZE(MAX_XKEY_SIZE), SHA1_cnt); - - /* swap back */ - SWAP(xBNU[0],xBNU[4]); - SWAP(xBNU[1],xBNU[3]); -} - -/* -// Returns bitsize of the bitstring has beed added -*/ -int cpPRNGen(Ipp32u* pRand, cpSize nBits, IppsPRNGState* pRnd) -{ - BNU_CHUNK_T Xj [BITS_BNU_CHUNK(MAX_XKEY_SIZE)]; - BNU_CHUNK_T XVAL[BITS_BNU_CHUNK(MAX_XKEY_SIZE)]; - - Ipp8u TXVAL[BITS2WORD8_SIZE(MAX_XKEY_SIZE)]; - - /* XKEY length in BNU_CHUNK_T */ - cpSize xKeyLen = BITS_BNU_CHUNK(RAND_SEEDBITS(pRnd)); - /* XKEY length in bytes */ - cpSize xKeySize= BITS2WORD8_SIZE(RAND_SEEDBITS(pRnd)); - /* XKEY word's mask */ - BNU_CHUNK_T xKeyMsk = MASK_BNU_CHUNK(RAND_SEEDBITS(pRnd)); - - /* number of Ipp32u chunks to be generated */ - cpSize genlen = BITS2WORD32_SIZE(nBits); - - ZEXPAND_BNU(Xj, 0, BITS_BNU_CHUNK(MAX_XKEY_SIZE)); - ZEXPAND_BNU(XVAL, 0, BITS_BNU_CHUNK(MAX_XKEY_SIZE)); - - while(genlen) { - cpSize len; - - /* Step 1: XVAL=(Xkey+Xseed) mod 2^b */ - BNU_CHUNK_T carry = cpAdd_BNU(XVAL, RAND_XKEY(pRnd), RAND_XAUGMENT(pRnd), xKeyLen); - XVAL[xKeyLen-1] &= xKeyMsk; - - /* Step 2: xj=G(t, XVAL) mod Q */ - cpToOctStr_BNU(TXVAL, xKeySize, XVAL, xKeyLen); - SHA1_G((Ipp32u*)Xj, (Ipp32u*)RAND_T(pRnd), TXVAL, xKeySize); - - { - cpSize sizeXj = BITS_BNU_CHUNK(160); - if(0 <= cpCmp_BNU(Xj, BITS_BNU_CHUNK(IPP_SHA1_DIGEST_BITSIZE), RAND_Q(pRnd),BITS_BNU_CHUNK(IPP_SHA1_DIGEST_BITSIZE)) ) - sizeXj = cpMod_BNU(Xj, BITS_BNU_CHUNK(IPP_SHA1_DIGEST_BITSIZE), RAND_Q(pRnd), BITS_BNU_CHUNK(IPP_SHA1_DIGEST_BITSIZE)); - FIX_BNU(Xj, sizeXj); - ZEXPAND_BNU(Xj, sizeXj, BITS_BNU_CHUNK(MAX_XKEY_SIZE)); - } - - /* Step 3: Xkey=(1+Xkey+Xj) mod 2^b */ - cpInc_BNU(RAND_XKEY(pRnd), RAND_XKEY(pRnd), xKeyLen, 1); - carry = cpAdd_BNU(RAND_XKEY(pRnd), RAND_XKEY(pRnd), Xj, xKeyLen); - RAND_XKEY(pRnd)[xKeyLen-1] &= xKeyMsk; - - /* fill out result */ - len = genlenidCtx -// -// ippStsLengthErr 1 > nBits -// -// ippStsNoErr no error -// -// Parameters: -// pBuffer pointer to the buffer -// nBits number of bits be requested -// pRndCtx pointer to the context -*F*/ -IPPFUN(IppStatus, ippsPRNGen,(Ipp32u* pBuffer, cpSize nBits, void* pRnd)) -{ - IppsPRNGState* pRndCtx = (IppsPRNGState*)pRnd; - - /* test PRNG context */ - IPP_BAD_PTR2_RET(pBuffer, pRnd); - - pRndCtx = (IppsPRNGState*)( IPP_ALIGNED_PTR(pRndCtx, PRNG_ALIGNMENT) ); - IPP_BADARG_RET(!RAND_VALID_ID(pRndCtx), ippStsContextMatchErr); - - /* test sizes */ - IPP_BADARG_RET(nBits< 1, ippStsLengthErr); - - { - cpSize rndSize = BITS2WORD32_SIZE(nBits); - Ipp32u rndMask = MAKEMASK32(nBits); - - cpPRNGen(pBuffer, nBits, pRndCtx); - pBuffer[rndSize-1] &= rndMask; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsPRNGen_BN -// -// Purpose: Generates a pseudorandom big number of the specified nBits length. -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pRnd -// NULL == pRandBN -// -// ippStsContextMatchErr illegal pRnd->idCtx -// illegal pRandBN->idCtx -// -// ippStsLengthErr 1 > nBits -// nBits > BN_ROOM(pRandBN) -// -// ippStsNoErr no error -// -// Parameters: -// pRandBN pointer to the BN random -// nBits number of bits be requested -// pRndCtx pointer to the context -*F*/ -IPPFUN(IppStatus, ippsPRNGen_BN,(IppsBigNumState* pRandBN, int nBits, void* pRnd)) -{ - IppsPRNGState* pRndCtx; - - /* test PRNG context */ - IPP_BAD_PTR1_RET(pRnd); - pRndCtx = (IppsPRNGState*)( IPP_ALIGNED_PTR(pRnd, PRNG_ALIGNMENT) ); - IPP_BADARG_RET(!RAND_VALID_ID(pRndCtx), ippStsContextMatchErr); - - /* test random BN */ - IPP_BAD_PTR1_RET(pRandBN); - pRandBN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pRandBN, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pRandBN), ippStsContextMatchErr); - - /* test sizes */ - IPP_BADARG_RET(nBits< 1, ippStsLengthErr); - IPP_BADARG_RET(nBits> BN_ROOM(pRandBN)*BNU_CHUNK_BITS, ippStsLengthErr); - - - { - BNU_CHUNK_T* pRand = BN_NUMBER(pRandBN); - cpSize rndSize = BITS_BNU_CHUNK(nBits); - BNU_CHUNK_T rndMask = MASK_BNU_CHUNK(nBits); - - cpPRNGen((Ipp32u*)pRand, nBits, pRndCtx); - pRand[rndSize-1] &= rndMask; - - FIX_BNU(pRand, rndSize); - BN_SIZE(pRandBN) = rndSize; - BN_SIGN(pRandBN) = ippBigNumPOS; - - return ippStsNoErr; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprnginitca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprnginitca.c deleted file mode 100644 index cf52eb0d48..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprnginitca.c +++ /dev/null @@ -1,111 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// PRNG Functions -// -// Contents: -// ippsPRNGGetSize() -// ippsPRNGInit() -// -// -*/ - -#include "precomp.h" - -#include "owncp.h" -#include "pcpbn.h" -#include "pcpprng.h" -#include "pcphash.h" -#include "pcptool.h" - - -/*F* -// Name: ippsPRNGGetSize -// -// Purpose: Returns size of PRNG context (bytes). -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pSize -// -// ippStsNoErr no error -// -// Parameters: -// pSize pointer to the size of internal context -*F*/ -IPPFUN(IppStatus, ippsPRNGGetSize, (int* pSize)) -{ - IPP_BAD_PTR1_RET(pSize); - - *pSize = sizeof(IppsPRNGState) - +PRNG_ALIGNMENT-1; - return ippStsNoErr; -} - - -/*F* -// Name: ippsPRNGInit -// -// Purpose: Initializes PRNG context -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pRnd -// -// ippStsLengthErr seedBits < 1 -// seedBits < MAX_XKEY_SIZE -// seedBits%8 !=0 -// -// ippStsNoErr no error -// -// Parameters: -// seedBits seed bitsize -// pRnd pointer to the context to be initialized -*F*/ -IPPFUN(IppStatus, ippsPRNGInit, (int seedBits, IppsPRNGState* pRnd)) -{ - /* test PRNG context */ - IPP_BAD_PTR1_RET(pRnd); - pRnd = (IppsPRNGState*)( IPP_ALIGNED_PTR(pRnd, PRNG_ALIGNMENT) ); - - /* test sizes */ - IPP_BADARG_RET((1>seedBits) || (seedBits>MAX_XKEY_SIZE) ||(seedBits&7), ippStsLengthErr); - - { - int hashIvSize = cpHashIvSize(ippHashAlg_SHA1); - const Ipp8u* iv = cpHashIV[ippHashAlg_SHA1]; - - /* cleanup context */ - ZEXPAND_BNU((Ipp8u*)pRnd, 0, (cpSize)(sizeof(IppsPRNGState))); - - RAND_ID(pRnd) = idCtxPRNG; - RAND_SEEDBITS(pRnd) = seedBits; - - /* default Q parameter */ - ((Ipp32u*)RAND_Q(pRnd))[0] = 0xFFFFFFFF; - ((Ipp32u*)RAND_Q(pRnd))[1] = 0xFFFFFFFF; - ((Ipp32u*)RAND_Q(pRnd))[2] = 0xFFFFFFFF; - ((Ipp32u*)RAND_Q(pRnd))[3] = 0xFFFFFFFF; - ((Ipp32u*)RAND_Q(pRnd))[4] = 0xFFFFFFFF; - - /* default T parameter */ - CopyBlock(iv, RAND_T(pRnd), hashIvSize); - - return ippStsNoErr; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprngsetca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprngsetca.c deleted file mode 100644 index f57c2e20b6..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpprngsetca.c +++ /dev/null @@ -1,239 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// PRNG Functions -// -// Contents: -// ippsPRNGSetModulus() -// ippsPRNGSetSeed() -// ippsPRNGSetAugment() -// ippsPRNGSetH0() -// -// -*/ - -#include "precomp.h" - -#include "owncp.h" -#include "pcpbn.h" -#include "pcpprng.h" - - -/*F* -// Name: ippsPRNGSetModulus -// -// Purpose: Sets 160-bit modulus Q. -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pRnd -// NULL == pMod -// -// ippStsContextMatchErr illegal pRnd->idCtx -// illegal pMod->idCtx -// -// ippStsBadArgErr 160 != bitsize(pMOd) -// -// ippStsNoErr no error -// -// Parameters: -// pMod pointer to the 160-bit modulus -// pRnd pointer to the context -*F*/ -IPPFUN(IppStatus, ippsPRNGSetModulus, (const IppsBigNumState* pMod, IppsPRNGState* pRnd)) -{ - /* test PRNG context */ - IPP_BAD_PTR1_RET(pRnd); - pRnd = (IppsPRNGState*)( IPP_ALIGNED_PTR(pRnd, PRNG_ALIGNMENT) ); - IPP_BADARG_RET(!RAND_VALID_ID(pRnd), ippStsContextMatchErr); - - /* test modulus */ - IPP_BAD_PTR1_RET(pMod); - pMod = (IppsBigNumState*)( IPP_ALIGNED_PTR(pMod, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pMod), ippStsContextMatchErr); - IPP_BADARG_RET(160 != BITSIZE_BNU(BN_NUMBER(pMod),BN_SIZE(pMod)), ippStsBadArgErr); - - ZEXPAND_COPY_BNU(RAND_Q(pRnd), (int)(sizeof(RAND_Q(pRnd))/sizeof(BNU_CHUNK_T)), BN_NUMBER(pMod), BN_SIZE(pMod)); - return ippStsNoErr; -} - - -/*F* -// Name: ippsPRNGSetH0 -// -// Purpose: Sets 160-bit parameter of G() function. -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pRnd -// NULL == pH0 -// -// ippStsContextMatchErr illegal pRnd->idCtx -// illegal pH0->idCtx -// -// ippStsNoErr no error -// -// Parameters: -// pH0 pointer to the parameter used into G() function -// pRnd pointer to the context -*F*/ -IPPFUN(IppStatus, ippsPRNGSetH0,(const IppsBigNumState* pH0, IppsPRNGState* pRnd)) -{ - /* test PRNG context */ - IPP_BAD_PTR1_RET(pRnd); - pRnd = (IppsPRNGState*)( IPP_ALIGNED_PTR(pRnd, PRNG_ALIGNMENT) ); - IPP_BADARG_RET(!RAND_VALID_ID(pRnd), ippStsContextMatchErr); - - /* test H0 */ - IPP_BAD_PTR1_RET(pH0); - pH0 = (IppsBigNumState*)( IPP_ALIGNED_PTR(pH0, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pH0), ippStsContextMatchErr); - - { - cpSize len = IPP_MIN(5, BN_SIZE(pH0)*(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u))); - ZEXPAND_BNU(RAND_T(pRnd), 0, (int)(sizeof(RAND_T(pRnd))/sizeof(BNU_CHUNK_T))); - ZEXPAND_COPY_BNU((Ipp32u*)RAND_T(pRnd), (int)(sizeof(RAND_T(pRnd))/sizeof(Ipp32u)), - (Ipp32u*)BN_NUMBER(pH0), len); - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsPRNGSetSeed -// -// Purpose: Sets the initial state with the SEED value -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pRnd -// NULL == pSeed -// -// ippStsContextMatchErr illegal pRnd->idCtx -// illegal pSeed->idCtx -// -// ippStsNoErr no error -// -// Parameters: -// pSeed pointer to the SEED -// pRnd pointer to the context -*F*/ -IPPFUN(IppStatus, ippsPRNGSetSeed, (const IppsBigNumState* pSeed, IppsPRNGState* pRnd)) -{ - /* test PRNG context */ - IPP_BAD_PTR1_RET(pRnd); - pRnd = (IppsPRNGState*)( IPP_ALIGNED_PTR(pRnd, PRNG_ALIGNMENT) ); - IPP_BADARG_RET(!RAND_VALID_ID(pRnd), ippStsContextMatchErr); - - /* test seed */ - IPP_BAD_PTR1_RET(pSeed); - pSeed = (IppsBigNumState*)( IPP_ALIGNED_PTR(pSeed, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pSeed), ippStsContextMatchErr); - - { - cpSize argSize = BITS_BNU_CHUNK( RAND_SEEDBITS(pRnd) ); - BNU_CHUNK_T mask = MASK_BNU_CHUNK(RAND_SEEDBITS(pRnd)); - cpSize size = IPP_MIN(BN_SIZE(pSeed), argSize); - - ZEXPAND_COPY_BNU(RAND_XKEY(pRnd), (cpSize)(sizeof(RAND_XKEY(pRnd))/sizeof(BNU_CHUNK_T)), BN_NUMBER(pSeed), size); - RAND_XKEY(pRnd)[argSize-1] &= mask; - - return ippStsNoErr; - } -} - - -/*F* -// Name: ippsPRNGSetAugment -// -// Purpose: Sets the Entropy Augmentation -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pRnd -// NULL == pAug -// -// ippStsContextMatchErr illegal pRnd->idCtx -// illegal pAug->idCtx -// -// ippStsLengthErr nBits < 1 -// nBits > MAX_XKEY_SIZE -// ippStsNoErr no error -// -// Parameters: -// pAug pointer to the entropy eugmentation -// pRnd pointer to the context -*F*/ -IPPFUN(IppStatus, ippsPRNGSetAugment, (const IppsBigNumState* pAug, IppsPRNGState* pRnd)) -{ - /* test PRNG context */ - IPP_BAD_PTR1_RET(pRnd); - pRnd = (IppsPRNGState*)( IPP_ALIGNED_PTR(pRnd, PRNG_ALIGNMENT) ); - IPP_BADARG_RET(!RAND_VALID_ID(pRnd), ippStsContextMatchErr); - - /* test augmentation */ - IPP_BAD_PTR1_RET(pAug); - pAug = (IppsBigNumState*)( IPP_ALIGNED_PTR(pAug, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pAug), ippStsContextMatchErr); - - { - cpSize argSize = BITS_BNU_CHUNK( RAND_SEEDBITS(pRnd) ); - BNU_CHUNK_T mask = MASK_BNU_CHUNK(RAND_SEEDBITS(pRnd)); - cpSize size = IPP_MIN(BN_SIZE(pAug), argSize); - - ZEXPAND_COPY_BNU(RAND_XAUGMENT(pRnd), (cpSize)(sizeof(RAND_XAUGMENT(pRnd))/sizeof(BNU_CHUNK_T)), BN_NUMBER(pAug), size); - RAND_XAUGMENT(pRnd)[argSize-1] &= mask; - - return ippStsNoErr; - } -} - -/*F* -// Name: ippsPRNGGetSeed -// -// Purpose: Get current SEED value from the state -// -// Returns: Reason: -// ippStsNullPtrErr NULL == pRnd -// NULL == pSeed -// -// ippStsContextMatchErr illegal pRnd->idCtx -// illegal pSeed->idCtx -// ippStsOutOfRangeErr lengtrh of the actual SEED > length SEED destination -// -// ippStsNoErr no error -// -// Parameters: -// pRnd pointer to the context -// pSeed pointer to the SEED -*F*/ -IPPFUN(IppStatus, ippsPRNGGetSeed, (const IppsPRNGState* pRnd, IppsBigNumState* pSeed)) -{ - /* test PRNG context */ - IPP_BAD_PTR1_RET(pRnd); - pRnd = (IppsPRNGState*)( IPP_ALIGNED_PTR(pRnd, PRNG_ALIGNMENT) ); - IPP_BADARG_RET(!RAND_VALID_ID(pRnd), ippStsContextMatchErr); - - /* test seed */ - IPP_BAD_PTR1_RET(pSeed); - pSeed = (IppsBigNumState*)( IPP_ALIGNED_PTR(pSeed, BN_ALIGNMENT) ); - IPP_BADARG_RET(!BN_VALID_ID(pSeed), ippStsContextMatchErr); - - return ippsSet_BN(ippBigNumPOS, - BITS2WORD32_SIZE(RAND_SEEDBITS(pRnd)), - (Ipp32u*)RAND_XKEY(pRnd), - pSeed); -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha1ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha1ca.c deleted file mode 100644 index 81d28a1f31..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha1ca.c +++ /dev/null @@ -1,551 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Digesting message according to SHA1 -// -// Contents: -// - ippsSHA1GetSize() -// - ippsSHA1Init() -// - ippsSHA1Pack() -// - ippsSHA1Unpack() -// - ippsSHA1Duplicate() -// - ippsSHA1Update() -// - ippsSHA1GetTag() -// - ippsSHA1Final() -// ippsSHA1MessageDigest() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" -#include "pcptool.h" - - -#if !defined (_ENABLE_ALG_SHA1_) -#pragma message("IPP_ALG_HASH_SHA1 disabled") -#else -#pragma message("IPP_ALG_HASH_SHA1 enabled") - -/* -// Init SHA1 digest -*/ -IppStatus InitSHA1(IppsSHA1State* pState) -{ - /* test state pointer */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA1State*)( IPP_ALIGNED_PTR(pState, SHA1_ALIGNMENT) ); - - /* set state ID */ - SHS_ID(pState) = idCtxSHA1; - - /* zeros message length */ - SHS_LENL(pState) = 0; - - /* message buffer is free */ - SHS_INDX(pState) = 0; - - /* setup initial digest */ - SHS_HASH(pState)[0] = SHA1_IV[0]; - SHS_HASH(pState)[1] = SHA1_IV[1]; - SHS_HASH(pState)[2] = SHA1_IV[2]; - SHS_HASH(pState)[3] = SHA1_IV[3]; - SHS_HASH(pState)[4] = SHA1_IV[4]; - - return ippStsNoErr; -} - - -/*F* -// Name: ippsSHA1GetSize -// -// Purpose: Returns size (bytes) of IppsSHA1State state. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// ippStsNoErr no errors -// -// Parameters: -// pSize pointer to state size -// -*F*/ -IPPFUN(IppStatus, ippsSHA1GetSize,(int* pSize)) -{ - /* test pointer */ - IPP_BAD_PTR1_RET(pSize); - - *pSize = sizeof(IppsSHA1State) +(SHA1_ALIGNMENT-1); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsSHA1Init -// -// Purpose: Init SHA1 state. -// -// Returns: Reason: -// ippStsNullPtrErr pState == NULL -// ippStsNoErr no errors -// -// Parameters: -// pState pointer to the SHA1 state -// -*F*/ -IPPFUN(IppStatus, ippsSHA1Init,(IppsSHA1State* pState)) -{ - return InitSHA1(pState); -} - - -/*F* -// Name: ippsSHA1Pack -// -// Purpose: Copy initialized context to the buffer. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// pCtx == NULL -// ippStsNoErr no errors -// -// Parameters: -// pCtx pointer hach state -// pSize pointer to the packed spec size -// -*F*/ -IPPFUN(IppStatus, ippsSHA1Pack,(const IppsSHA1State* pCtx, Ipp8u* pBuffer)) -{ - /* test pointers */ - IPP_BAD_PTR2_RET(pCtx, pBuffer); - /* use aligned context */ - pCtx = (IppsSHA1State*)( IPP_ALIGNED_PTR(pCtx, SHA1_ALIGNMENT) ); - /* test the context */ - IPP_BADARG_RET(idCtxSHA1 !=SHS_ID(pCtx), ippStsContextMatchErr); - - CopyBlock(pCtx, pBuffer, sizeof(IppsSHA1State)); - return ippStsNoErr; -} - - -/*F* -// Name: ippsSHA1Unpack -// -// Purpose: Unpack buffer content into the initialized context. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// pCtx == NULL -// ippStsNoErr no errors -// -// Parameters: -// pCtx pointer hash state -// pSize pointer to the packed spec size -// -*F*/ -IPPFUN(IppStatus, ippsSHA1Unpack,(const Ipp8u* pBuffer, IppsSHA1State* pCtx)) -{ - /* test pointers */ - IPP_BAD_PTR2_RET(pCtx, pBuffer); - /* use aligned context */ - pCtx = (IppsSHA1State*)( IPP_ALIGNED_PTR(pCtx, SHA1_ALIGNMENT) ); - - CopyBlock(pBuffer, pCtx, sizeof(IppsSHA1State)); - return ippStsNoErr; -} - - -/*F* -// Name: ippsSHA1Duplicate -// -// Purpose: Clone SHA1 state. -// -// Returns: Reason: -// ippStsNullPtrErr pSrcState == NULL -// pDstState == NULL -// ippStsContextMatchErr pSrcState->idCtx != idCtxSHA1 -// pDstState->idCtx != idCtxSHA1 -// ippStsNoErr no errors -// -// Parameters: -// pSrcState pointer to the source SHA1 state -// pDstState pointer to the target SHA1 state -// -// Note: -// pDstState may to be uninitialized by ippsSHA1Init() -// -*F*/ -IPPFUN(IppStatus, ippsSHA1Duplicate,(const IppsSHA1State* pSrcState, IppsSHA1State* pDstState)) -{ - /* test state pointers */ - IPP_BAD_PTR2_RET(pSrcState, pDstState); - /* use aligned context */ - pSrcState = (IppsSHA1State*)( IPP_ALIGNED_PTR(pSrcState, SHA1_ALIGNMENT) ); - pDstState = (IppsSHA1State*)( IPP_ALIGNED_PTR(pDstState, SHA1_ALIGNMENT) ); - /* test states ID */ - IPP_BADARG_RET(idCtxSHA1 !=SHS_ID(pSrcState), ippStsContextMatchErr); - //IPP_BADARG_RET(idCtxSHA1 !=SHS_ID(pDstState), ippStsContextMatchErr); - - /* copy state */ - CopyBlock(pSrcState, pDstState, sizeof(IppsSHA1State)); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsSHA1Update -// -// Purpose: Updates intermadiate digest based on input stream. -// -// Returns: Reason: -// ippStsNullPtrErr pSrc == NULL -// pState == NULL -// ippStsContextMatchErr pState->idCtx != idCtxSHA1 -// ippStsLengthErr len <0 -// ippStsNoErr no errors -// -// Parameters: -// pSrc pointer to the input stream -// len input stream length -// pState pointer to the SHA1 state -// -*F*/ -IPPFUN(IppStatus, ippsSHA1Update,(const Ipp8u* pSrc, int len, IppsSHA1State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA1State*)( IPP_ALIGNED_PTR(pState, SHA1_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA1 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test input length */ - IPP_BADARG_RET((len<0), ippStsLengthErr); - /* test source pointer */ - IPP_BADARG_RET((len && !pSrc), ippStsNullPtrErr); - - /* - // handle non empty message - */ - if(len) { - int processingLen; - - int n = SHS_INDX(pState); - Ipp8u* pBuffer = SHS_BUFF(pState); - Ipp8u* pHash = (Ipp8u*)SHS_HASH(pState); - - Ipp64u lenLo = SHS_LENL(pState); - - /* select processing function */ -#if 0 - cpHashProc updateFunc = UpdateSHA1; - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA1ni; - #endif -#endif - cpHashProc updateFunc; - #if (_SHA_NI_ENABLING_==_FEATURE_ON_) - updateFunc = UpdateSHA1ni; - #else - #if (_SHA_NI_ENABLING_==_FEATURE_TICKTOCK_) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA1ni; - else - #endif - updateFunc = UpdateSHA1; - #endif - - lenLo += len; - - /* if non empty internal buffer filling */ - if(n) { - /* copy from input stream to the internal buffer as match as possible */ - processingLen = IPP_MIN(len, (MBS_SHA1-n)); - CopyBlock(pSrc, pBuffer+n, processingLen); - - pSrc += processingLen; - len -= processingLen; - SHS_INDX(pState) = n += processingLen; - - /* update digest if buffer full */ - if( MBS_SHA1 == n) { - updateFunc(pHash, pBuffer, MBS_SHA1, SHA1_cnt); - SHS_INDX(pState) = 0; - } - } - - /* main message part processing */ - processingLen = len & ~(MBS_SHA1-1); - if(processingLen) { - updateFunc(pHash, pSrc, processingLen, SHA1_cnt); - pSrc += processingLen; - len -= processingLen; - } - - /* store rest of message into the internal buffer */ - if(len) { - CopyBlock(pSrc, pBuffer, len); - SHS_INDX(pState) += len; - } - - SHS_LENL(pState) = lenLo; - } - - return ippStsNoErr; -} - - -/* -// Compute digest -*/ -void ComputeDigestSHA1(Ipp32u* pHash, const IppsSHA1State* pState) -{ - const Ipp8u* stateBuff = SHS_BUFF(pState); - int stateBuffLen = SHS_INDX(pState); - - /* local buffer and it length */ - Ipp8u buffer[MBS_SHA1*2]; - int bufferLen = stateBuffLen < (MBS_SHA1-(int)sizeof(Ipp64u))? MBS_SHA1 : MBS_SHA1*2; - - /* select processing function */ -#if 0 - cpHashProc updateFunc = UpdateSHA1; - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA1ni; - #endif -#endif - cpHashProc updateFunc; - #if (_SHA_NI_ENABLING_==_FEATURE_ON_) - updateFunc = UpdateSHA1ni; - #else - #if (_SHA_NI_ENABLING_==_FEATURE_TICKTOCK_) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA1ni; - else - #endif - updateFunc = UpdateSHA1; - #endif - - /* copy rest of message into internal buffer */ - CopyBlock(stateBuff, buffer, stateBuffLen); - - /* padd message */ - buffer[stateBuffLen++] = 0x80; - PaddBlock(0, buffer+stateBuffLen, bufferLen-stateBuffLen-sizeof(Ipp64u)); - - /* message length representation */ - { - Ipp64u lo = SHS_LENL(pState); /* message length in bytes */ - lo = LSL64(lo,3); /* message length in bits */ - ((Ipp64u*)(buffer+bufferLen))[-1] = ENDIANNESS64(lo); - } - - /* copmplete hash computation */ - updateFunc(pHash, buffer, bufferLen, SHA1_cnt); - - /* convert hash into big endian */ - pHash[0] = ENDIANNESS32(pHash[0]); - pHash[1] = ENDIANNESS32(pHash[1]); - pHash[2] = ENDIANNESS32(pHash[2]); - pHash[3] = ENDIANNESS32(pHash[3]); - pHash[4] = ENDIANNESS32(pHash[4]); -} - - -/*F* -// Name: ippsSHA1GetTag -// -// Purpose: Compute digest based on current state. -// Note, that futher digest update is possible -// -// Returns: Reason: -// ippStsNullPtrErr pTag == NULL -// pState == NULL -// ippStsContextMatchErr pState->idCtx != idCtxSHA1 -// ippStsLengthErr max_SHA_digestLen < tagLen <1 -// ippStsNoErr no errors -// -// Parameters: -// pTag address of the output digest -// tagLen length of digest -// pState pointer to the SHS state -// -*F*/ -IPPFUN(IppStatus, ippsSHA1GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA1State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA1State*)( IPP_ALIGNED_PTR(pState, SHA1_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA1 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pTag); - IPP_BADARG_RET((tagLen<1)||(sizeof(DigestSHA1)idCtx != idCtxSHA1 -// ippStsNoErr no errors -// -// Parameters: -// pMD address of the output digest -// pState pointer to the SHS state -// -*F*/ -IPPFUN(IppStatus, ippsSHA1Final,(Ipp8u* pMD, IppsSHA1State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA1State*)( IPP_ALIGNED_PTR(pState, SHA1_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA1 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - ComputeDigestSHA1(SHS_HASH(pState), pState); - CopyBlock(SHS_HASH(pState), pMD, sizeof(DigestSHA1)); - InitSHA1(pState); - - return ippStsNoErr; -} - - -/*F* -// Name: ippsSHA1MessageDigest -// -// Purpose: Digest of the whole message. -// -// Returns: Reason: -// ippStsNullPtrErr pMsg == NULL -// pMD == NULL -// ippStsLengthErr len <0 -// ippStsNoErr no errors -// -// Parameters: -// pMsg pointer to the input message -// len input message length -// pMD address of the output digest -// -*F*/ -IPPFUN(IppStatus, ippsSHA1MessageDigest,(const Ipp8u* pMsg, int msgLen, Ipp8u* pMD)) -{ - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - /* test message length */ - IPP_BADARG_RET((msgLen<0), ippStsLengthErr); - /* test message pointer */ - IPP_BADARG_RET((msgLen && !pMsg), ippStsNullPtrErr); - - { - /* message length in the multiple MBS and the rest */ - int msgLenBlks = msgLen & (-MBS_SHA1); - int msgLenRest = msgLen - msgLenBlks; - - /* init hash value */ - DigestSHA1 hash = {0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0}; - - /* select processing function */ -#if 0 - cpHashProc updateFunc = UpdateSHA1; - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA1ni; - #endif -#endif - cpHashProc updateFunc; - #if (_SHA_NI_ENABLING_==_FEATURE_ON_) - updateFunc = UpdateSHA1ni; - #else - #if (_SHA_NI_ENABLING_==_FEATURE_TICKTOCK_) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA1ni; - else - #endif - updateFunc = UpdateSHA1; - #endif - - /* process main part of the message */ - if(msgLenBlks) - updateFunc(hash, pMsg, msgLenBlks, SHA1_cnt); - - /* process message padding */ - { - #define MREP_SIZE_SHA1 (sizeof(Ipp64u)) - Ipp8u buffer[MBS_SHA1*2]; - int bufferLen = msgLenRest < (int)(MBS_SHA1-MREP_SIZE_SHA1)? MBS_SHA1 : MBS_SHA1*2; - - /* message bitlength representation */ - Ipp64u msgLenBits = (Ipp64u)msgLen*8; - msgLenBits = ENDIANNESS64(msgLenBits); - - /* copy end of message */ - CopyBlock(pMsg+msgLen-msgLenRest, buffer, msgLenRest); - - /* end of message bit */ - buffer[msgLenRest++] = 0x80; - - /* padd buffer */ - PaddBlock(0, buffer+msgLenRest, bufferLen-msgLenRest-MREP_SIZE_SHA1); - /* copy message bitlength representation */ - ((Ipp64u*)(buffer+bufferLen))[-1] = msgLenBits; - - updateFunc(hash, buffer, bufferLen, SHA1_cnt); - #undef MREP_SIZE_SHA1 - } - - /* swap hash bytes */ - ((Ipp32u*)pMD)[0] = ENDIANNESS32(hash[0]); - ((Ipp32u*)pMD)[1] = ENDIANNESS32(hash[1]); - ((Ipp32u*)pMD)[2] = ENDIANNESS32(hash[2]); - ((Ipp32u*)pMD)[3] = ENDIANNESS32(hash[3]); - ((Ipp32u*)pMD)[4] = ENDIANNESS32(hash[4]); - - return ippStsNoErr; - } -} - -#endif /* _ENABLE_ALG_SHA1_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha256ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha256ca.c deleted file mode 100644 index ae20f91d75..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha256ca.c +++ /dev/null @@ -1,728 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Digesting message according to SHA256 -// -// Contents: -// ippsSHA256GetSize() -// ippsSHA256Init() -// ippsSHA256Pack() -// ippsSHA256Unpack() -// ippsSHA256Duplicate() -// ippsSHA256Update() -// ippsSHA256GetTag() -// ippsSHA256Final() -// ippsSHA256MessageDigest() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" -#include "pcptool.h" - - -#if !defined(_ENABLE_ALG_SHA256_) -#pragma message("IPP_ALG_HASH_SHA256 disabled") -#else -#pragma message("IPP_ALG_HASH_SHA256 enabled") -#endif - -#if !defined(_ENABLE_ALG_SHA224_) -#pragma message("IPP_ALG_HASH_SHA224 disabled") -#else -#pragma message("IPP_ALG_HASH_SHA224 enabled") -#endif - - -/* -// SHA256 init context -*/ -#if defined (_ENABLE_ALG_SHA256_) || defined (_ENABLE_ALG_SHA224_) -IppStatus GetSizeSHA256(int* pSize) -{ - /* test pointer */ - IPP_BAD_PTR1_RET(pSize); - - *pSize = sizeof(IppsSHA256State) +(SHA256_ALIGNMENT-1); - - return ippStsNoErr; -} - -IppStatus InitSHA256(const DigestSHA256 IV, IppsSHA256State* pState) -{ - /* test state pointer */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA256State*)( IPP_ALIGNED_PTR(pState, SHA256_ALIGNMENT) ); - - /* set state ID */ - SHS_ID(pState) = idCtxSHA256; - - /* zeros message length */ - SHS_LENL(pState) = 0; - - /* message buffer is free */ - SHS_INDX(pState) = 0; - - /* setup initial digest */ - SHS_HASH(pState)[0] = IV[0]; - SHS_HASH(pState)[1] = IV[1]; - SHS_HASH(pState)[2] = IV[2]; - SHS_HASH(pState)[3] = IV[3]; - SHS_HASH(pState)[4] = IV[4]; - SHS_HASH(pState)[5] = IV[5]; - SHS_HASH(pState)[6] = IV[6]; - SHS_HASH(pState)[7] = IV[7]; - - return ippStsNoErr; -} -#endif - -/*F* -// Name: ippsSHA256GetSize -// ippsSHA224GetSize -// -// Purpose: Returns size (bytes) of IppsSHA256State state. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// ippStsNoErr no errors -// -// Parameters: -// pSize pointer to state size -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) -IPPFUN(IppStatus, ippsSHA256GetSize,(int* pSize)) -{ - return GetSizeSHA256(pSize); -} -#endif - -#if defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA224GetSize,(int* pSize)) -{ - return GetSizeSHA256(pSize); -} -#endif - - -/*F* -// Name: ippsSHA256Init -// ippsSHA224Init -// -// Purpose: Init SHA256 -// -// Returns: Reason: -// ippStsNullPtrErr pState == NULL -// ippStsNoErr no errors -// -// Parameters: -// pState pointer to the SHA512 state -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) -IPPFUN(IppStatus, ippsSHA256Init,(IppsSHA256State* pState)) -{ - return InitSHA256(SHA256_IV, pState); -} -#endif - -#if defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA224Init,(IppsSHA224State* pState)) -{ - return InitSHA256(SHA224_IV, pState); -} -#endif - - -/*F* -// Name: ippsSHA256Pack -// ippsSHA224Pack -// -// Purpose: Copy initialized context to the buffer. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// pCtx == NULL -// ippStsNoErr no errors -// -// Parameters: -// pCtx pointer hash state -// pSize pointer to the packed spec size -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) || defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA256Pack,(const IppsSHA256State* pCtx, Ipp8u* pBuffer)) -{ - /* test pointers */ - IPP_BAD_PTR2_RET(pCtx, pBuffer); - /* use aligned context */ - pCtx = (IppsSHA256State*)( IPP_ALIGNED_PTR(pCtx, SHA256_ALIGNMENT) ); - /* test the context */ - IPP_BADARG_RET(idCtxSHA256 !=SHS_ID(pCtx), ippStsContextMatchErr); - - CopyBlock(pCtx, pBuffer, sizeof(IppsSHA256State)); - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA224Pack,(const IppsSHA224State* pCtx, Ipp8u* pBuffer)) -{ - return ippsSHA256Pack(pCtx, pBuffer); -} -#endif - -/*F* -// Name: ippsSHA256Unpack -// ippsSHA224Unpack -// -// Purpose: Unpack buffer content into the initialized context. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// pCtx == NULL -// ippStsNoErr no errors -// -// Parameters: -// pCtx pointer hash state -// pSize pointer to the packed spec size -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) || defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA256Unpack,(const Ipp8u* pBuffer, IppsSHA256State* pCtx)) -{ - /* test pointers */ - IPP_BAD_PTR2_RET(pCtx, pBuffer); - /* use aligned context */ - pCtx = (IppsSHA256State*)( IPP_ALIGNED_PTR(pCtx, SHA256_ALIGNMENT) ); - - CopyBlock(pBuffer, pCtx, sizeof(IppsSHA256State)); - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA224Unpack,(const Ipp8u* pBuffer, IppsSHA224State* pCtx)) -{ - return ippsSHA256Unpack(pBuffer, pCtx); -} -#endif - - -/*F* -// Name: ippsSHA256Duplicate -// ippsSHA224Duplicate -// -// Purpose: Clone SHA256 state. -// -// Returns: Reason: -// ippStsNullPtrErr pSrcState == NULL -// pDstState == NULL -// ippStsContextMatchErr pSrcState->idCtx != idCtxSHA256 -// pDstState->idCtx != idCtxSHA256 -// ippStsNoErr no errors -// -// Parameters: -// pSrcState pointer to the source SHA256 state -// pDstState pointer to the target SHA256 state -// -// Note: -// pDstState may to be uninitialized by ippsSHA256Init() -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) || defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA256Duplicate,(const IppsSHA256State* pSrcState, IppsSHA256State* pDstState)) -{ - /* test state pointers */ - IPP_BAD_PTR2_RET(pSrcState, pDstState); - /* use aligned context */ - pSrcState = (IppsSHA256State*)( IPP_ALIGNED_PTR(pSrcState, SHA256_ALIGNMENT) ); - pDstState = (IppsSHA256State*)( IPP_ALIGNED_PTR(pDstState, SHA256_ALIGNMENT) ); - /* test states ID */ - IPP_BADARG_RET(idCtxSHA256 !=SHS_ID(pSrcState), ippStsContextMatchErr); - //IPP_BADARG_RET(idCtxSHA256 !=SHS_ID(pDstState), ippStsContextMatchErr); - - /* copy state */ - CopyBlock(pSrcState, pDstState, sizeof(IppsSHA256State)); - - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA224Duplicate,(const IppsSHA224State* pSrcState, IppsSHA224State* pDstState)) -{ - return ippsSHA256Duplicate(pSrcState, pDstState); -} -#endif - - -/*F* -// Name: ippsSHA256Update -// ippsSHA224Update -// -// Purpose: Updates intermadiate digest based on input stream. -// -// Returns: Reason: -// ippStsNullPtrErr pSrc == NULL -// pState == NULL -// ippStsContextMatchErr pState->idCtx != idCtxSHA256 -// ippStsLengthErr len <0 -// ippStsNoErr no errors -// -// Parameters: -// pSrc pointer to the input stream -// len input stream length -// pState pointer to the SHA256 state -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) || defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA256Update,(const Ipp8u* pSrc, int len, IppsSHA256State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA256State*)( IPP_ALIGNED_PTR(pState, SHA256_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA256 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test input length */ - IPP_BADARG_RET((len<0), ippStsLengthErr); - /* test source pointer */ - IPP_BADARG_RET((len && !pSrc), ippStsNullPtrErr); - - /* - // handle non empty message - */ - if(len) { - int processingLen; - - int n = SHS_INDX(pState); - Ipp8u* pBuffer = SHS_BUFF(pState); - Ipp8u* pHash = (Ipp8u*)SHS_HASH(pState); - - Ipp64u lenLo = SHS_LENL(pState); - - /* select processing function */ -#if 0 - cpHashProc updateFunc = UpdateSHA256; - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA256ni; - #endif -#endif - cpHashProc updateFunc; - #if (_SHA_NI_ENABLING_==_FEATURE_ON_) - updateFunc = UpdateSHA256ni; - #else - #if (_SHA_NI_ENABLING_==_FEATURE_TICKTOCK_) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA256ni; - else - #endif - updateFunc = UpdateSHA256; - #endif - - lenLo += len; - - /* if non empty internal buffer filling */ - if(n) { - /* copy from input stream to the internal buffer as match as possible */ - processingLen = IPP_MIN(len, (MBS_SHA256 - SHS_INDX(pState))); - CopyBlock(pSrc, pBuffer+n, processingLen); - - pSrc += processingLen; - len -= processingLen; - SHS_INDX(pState) = n += processingLen; - - /* update digest if buffer full */ - if( MBS_SHA256 == n) { - updateFunc(pHash, pBuffer, MBS_SHA256, SHA256_cnt); - SHS_INDX(pState) = 0; - } - } - - /* main message part processing */ - processingLen = len & ~(MBS_SHA256-1); - if(processingLen) { - updateFunc(pHash, pSrc, processingLen, SHA256_cnt); - pSrc += processingLen; - len -= processingLen; - } - - /* store rest of message into the internal buffer */ - if(len) { - CopyBlock(pSrc, pBuffer, len); - SHS_INDX(pState) += len; - } - - SHS_LENL(pState) = lenLo; - } - - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA224Update,(const Ipp8u* pSrc, int len, IppsSHA224State* pState)) -{ - return ippsSHA256Update(pSrc, len, pState); -} -#endif - - -/* -// Compute digest -*/ -#if defined (_ENABLE_ALG_SHA256_) || defined (_ENABLE_ALG_SHA224_) -void ComputeDigestSHA256(Ipp32u* pHash, const IppsSHA256State* pState) -{ - const Ipp8u* stateBuff = SHS_BUFF(pState); - int stateBuffLen = SHS_INDX(pState); - - /* local buffer and it length */ - Ipp8u buffer[MBS_SHA256*2]; - int bufferLen = stateBuffLen < (MBS_SHA1-(int)sizeof(Ipp64u))? MBS_SHA256 : MBS_SHA256*2; - - /* select processing function */ -#if 0 - cpHashProc updateFunc = UpdateSHA256; - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA256ni; - #endif -#endif - cpHashProc updateFunc; - #if (_SHA_NI_ENABLING_==_FEATURE_ON_) - updateFunc = UpdateSHA256ni; - #else - #if (_SHA_NI_ENABLING_==_FEATURE_TICKTOCK_) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA256ni; - else - #endif - updateFunc = UpdateSHA256; - #endif - - /* copy rest of message into internal buffer */ - CopyBlock(stateBuff, buffer, stateBuffLen); - - /* padd message */ - buffer[stateBuffLen++] = 0x80; - PaddBlock(0, buffer+stateBuffLen, bufferLen-stateBuffLen-sizeof(Ipp64u)); - - /* message length representation */ - { - Ipp64u lo = SHS_LENL(pState); /* message length in bytes */ - lo = LSL64(lo,3); /* message length in bits */ - ((Ipp64u*)(buffer+bufferLen))[-1] = ENDIANNESS64(lo); - } - - /* copmplete hash computation */ - updateFunc(pHash, buffer, bufferLen, SHA256_cnt); - - /* convert hash into big endian */ - pHash[0] = ENDIANNESS32(pHash[0]); - pHash[1] = ENDIANNESS32(pHash[1]); - pHash[2] = ENDIANNESS32(pHash[2]); - pHash[3] = ENDIANNESS32(pHash[3]); - pHash[4] = ENDIANNESS32(pHash[4]); - pHash[5] = ENDIANNESS32(pHash[5]); - pHash[6] = ENDIANNESS32(pHash[6]); - pHash[7] = ENDIANNESS32(pHash[7]); -} -#endif - - -/*F* -// Name: ippsSHA256GetTag -// ippsSHA224GetTag -// -// Purpose: Compute digest based on current state. -// Note, that futher digest update is possible -// -// Returns: Reason: -// ippStsNullPtrErr pTag == NULL -// pState == NULL -// ippStsContextMatchErr pState->idCtx != idCtxSHA256 -// ippStsLengthErr max_SHA_digestLen < tagLen <1 -// ippStsNoErr no errors -// -// Parameters: -// pTag address of the output digest -// tagLen length of digest -// pState pointer to the SHS state -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) -IPPFUN(IppStatus, ippsSHA256GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA256State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA256State*)( IPP_ALIGNED_PTR(pState, SHA256_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA256 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pTag); - IPP_BADARG_RET((tagLen<1)||(sizeof(DigestSHA256)idCtx != idCtxSHA256 -// ippStsNoErr no errors -// -// Parameters: -// pMD address of the output digest -// pState pointer to the SHA256 state -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) -IPPFUN(IppStatus, ippsSHA256Final,(Ipp8u* pMD, IppsSHA256State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA256State*)( IPP_ALIGNED_PTR(pState, SHA256_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA256 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - ComputeDigestSHA256(SHS_HASH(pState), pState); - CopyBlock(SHS_HASH(pState), pMD, sizeof(DigestSHA256)); - InitSHA256(SHA256_IV, pState); - - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA224Final,(Ipp8u* pMD, IppsSHA224State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA224State*)( IPP_ALIGNED_PTR(pState, SHA256_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA256 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - ComputeDigestSHA256(SHS_HASH(pState), pState); - CopyBlock(SHS_HASH(pState), pMD, sizeof(DigestSHA224)); - InitSHA256(SHA224_IV, pState); - - return ippStsNoErr; -} -#endif - - -#if defined (_ENABLE_ALG_SHA256_) || defined (_ENABLE_ALG_SHA224_) -IppStatus cpSHA256MessageDigest(DigestSHA256 hash, const Ipp8u* pMsg, int msgLen, const DigestSHA256 IV) -{ - /* test digest pointer */ - IPP_BAD_PTR1_RET(hash); - /* test message length */ - IPP_BADARG_RET((msgLen<0), ippStsLengthErr); - /* test message pointer */ - IPP_BADARG_RET((msgLen && !pMsg), ippStsNullPtrErr); - - { - /* message length in the multiple MBS and the rest */ - int msgLenBlks = msgLen & (-MBS_SHA256); - int msgLenRest = msgLen - msgLenBlks; - - /* select processing function */ -#if 0 - cpHashProc updateFunc = UpdateSHA256; - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA256ni; - #endif -#endif - cpHashProc updateFunc; - #if (_SHA_NI_ENABLING_==_FEATURE_ON_) - updateFunc = UpdateSHA256ni; - #else - #if (_SHA_NI_ENABLING_==_FEATURE_TICKTOCK_) - if( IsFeatureEnabled(SHA_NI_ENABLED) ) - updateFunc = UpdateSHA256ni; - else - #endif - updateFunc = UpdateSHA256; - #endif - - /* setup initial digest */ - hash[0] = IV[0]; - hash[1] = IV[1]; - hash[2] = IV[2]; - hash[3] = IV[3]; - hash[4] = IV[4]; - hash[5] = IV[5]; - hash[6] = IV[6]; - hash[7] = IV[7]; - - /* process main part of the message */ - if(msgLenBlks) - updateFunc(hash, pMsg, msgLenBlks, SHA256_cnt); - - /* process message padding */ - { - #define MREP_SIZE_SHA256 (sizeof(Ipp64u)) - Ipp8u buffer[MBS_SHA256*2]; - int bufferLen = msgLenRest < (int)(MBS_SHA256-MREP_SIZE_SHA256)? MBS_SHA256 : MBS_SHA256*2; - - /* message bitlength representation */ - Ipp64u msgLenBits = (Ipp64u)msgLen*8; - msgLenBits = ENDIANNESS64(msgLenBits); - - /* copy end of message */ - CopyBlock(pMsg+msgLen-msgLenRest, buffer, msgLenRest); - - /* end of message bit */ - buffer[msgLenRest++] = 0x80; - - /* padd buffer */ - PaddBlock(0, buffer+msgLenRest, bufferLen-msgLenRest-MREP_SIZE_SHA256); - /* copy message bitlength representation */ - ((Ipp64u*)(buffer+bufferLen))[-1] = msgLenBits; - - updateFunc(hash, buffer, bufferLen, SHA256_cnt); - #undef MREP_SIZE_SHA256 - } - - /* swap hash bytes */ - hash[0] = ENDIANNESS32(hash[0]); - hash[1] = ENDIANNESS32(hash[1]); - hash[2] = ENDIANNESS32(hash[2]); - hash[3] = ENDIANNESS32(hash[3]); - hash[4] = ENDIANNESS32(hash[4]); - hash[5] = ENDIANNESS32(hash[5]); - hash[6] = ENDIANNESS32(hash[6]); - hash[7] = ENDIANNESS32(hash[7]); - - return ippStsNoErr; - } -} -#endif - -/*F* -// Name: ippsSHA256MessageDigest, -// ippsSHA224MessageDigest -// -// Purpose: Digest of the whole message. -// -// Returns: Reason: -// ippStsNullPtrErr pMsg == NULL -// pDigest == NULL -// ippStsLengthErr len <0 -// ippStsNoErr no errors -// -// Parameters: -// pMsg pointer to the input message -// len input message length -// pMD address of the output digest -// -*F*/ -#if defined (_ENABLE_ALG_SHA256_) -IPPFUN(IppStatus, ippsSHA256MessageDigest,(const Ipp8u* pMsg, int msgLen, Ipp8u* pMD)) -{ - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - { - DigestSHA256 hash; - IppStatus sts = cpSHA256MessageDigest(hash, pMsg, msgLen, SHA256_IV); - if(ippStsNoErr==sts) - CopyBlock(hash, pMD, IPP_SHA256_DIGEST_BITSIZE/BYTESIZE); - return sts; - } -} -#endif - -#if defined (_ENABLE_ALG_SHA224_) -IPPFUN(IppStatus, ippsSHA224MessageDigest,(const Ipp8u* pMsg, int msgLen, Ipp8u* pMD)) -{ - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - { - DigestSHA256 hash; - IppStatus sts = cpSHA256MessageDigest(hash, pMsg, msgLen, SHA224_IV); - if(ippStsNoErr==sts) - CopyBlock(hash, pMD, IPP_SHA224_DIGEST_BITSIZE/BYTESIZE); - return sts; - } -} -#endif diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha512ca.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha512ca.c deleted file mode 100644 index 8dcaab973c..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpsha512ca.c +++ /dev/null @@ -1,674 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// SHA512 message digest -// -// Contents: -// ippsSHA512GetSize() -// ippsSHA512Init() -// ippsSHA512Pack() -// ippsSHA512Unpack() -// ippsSHA512Duplicate() -// ippsSHA512Update() -// ippsSHA512GetTag() -// ippsSHA512Final() -// ippsSHA512MessageDigest() -// -// -*/ - -#include "precomp.h" -#include "owncp.h" -#include "pcphash.h" -#include "pcptool.h" - - -#if !defined(_ENABLE_ALG_SHA512_) -#pragma message("IPP_ALG_HASH_SHA512 disabled") -#else -#pragma message("IPP_ALG_HASH_SHA512 enabled") -#endif - -#if !defined(_ENABLE_ALG_SHA384_) -#pragma message("IPP_ALG_HASH_SHA384 disabled") -#else -#pragma message("IPP_ALG_HASH_SHA384 enabled") -#endif - - -/* -// SHA512 init context -*/ -#if defined (_ENABLE_ALG_SHA512_) || defined (_ENABLE_ALG_SHA384_) -IppStatus GetSizeSHA512(int* pSize) -{ - /* test pointer */ - IPP_BAD_PTR1_RET(pSize); - - *pSize = sizeof(IppsSHA512State) +(SHA512_ALIGNMENT-1); - - return ippStsNoErr; -} - -IppStatus InitSHA512(const DigestSHA512 IV, IppsSHA512State* pState) -{ - /* test state pointer */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA512State*)( IPP_ALIGNED_PTR(pState, SHA512_ALIGNMENT) ); - - /* set state ID */ - SHS_ID(pState) = idCtxSHA512; - - /* zeros message length */ - SHS_LENL(pState) = 0; - SHS_LENH(pState) = 0; - - /* message buffer is free */ - SHS_INDX(pState) = 0; - - /* setup initial digest */ - SHS_HASH(pState)[0] = IV[0]; - SHS_HASH(pState)[1] = IV[1]; - SHS_HASH(pState)[2] = IV[2]; - SHS_HASH(pState)[3] = IV[3]; - SHS_HASH(pState)[4] = IV[4]; - SHS_HASH(pState)[5] = IV[5]; - SHS_HASH(pState)[6] = IV[6]; - SHS_HASH(pState)[7] = IV[7]; - - return ippStsNoErr; -} -#endif - -/*F* -// Name: ippsSHA512GetSize -// ippsSHA384GetSize -// -// Purpose: Returns size (bytes) of IppsSHA512State state. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// ippStsNoErr no errors -// -// Parameters: -// pSize pointer to state size -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) -IPPFUN(IppStatus, ippsSHA512GetSize,(int* pSize)) -{ - return GetSizeSHA512(pSize); -} -#endif - -#if defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA384GetSize,(int* pSize)) -{ - return GetSizeSHA512(pSize); -} -#endif - - -/*F* -// Name: ippsSHA512Init -// ippsSHA384Init -// -// Purpose: Init SHA512 -// -// Returns: Reason: -// ippStsNullPtrErr pState == NULL -// ippStsNoErr no errors -// -// Parameters: -// pState pointer to the SHA512 state -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) -IPPFUN(IppStatus, ippsSHA512Init,(IppsSHA512State* pState)) -{ - return InitSHA512(SHA512_IV, pState); -} -#endif - -#if defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA384Init,(IppsSHA384State* pState)) -{ - return InitSHA512(SHA384_IV, pState); -} -#endif - - -/*F* -// Name: ippsSHA512Pack -// ippsSHA384Pack -// -// Purpose: Copy initialized context to the buffer. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// pCtx == NULL -// ippStsNoErr no errors -// -// Parameters: -// pCtx pointer hash state -// pSize pointer to the packed spec size -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) || defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA512Pack,(const IppsSHA512State* pCtx, Ipp8u* pBuffer)) -{ - /* test pointers */ - IPP_BAD_PTR2_RET(pCtx, pBuffer); - /* use aligned context */ - pCtx = (IppsSHA512State*)( IPP_ALIGNED_PTR(pCtx, SHA512_ALIGNMENT) ); - /* test the context */ - IPP_BADARG_RET(idCtxSHA512 !=SHS_ID(pCtx), ippStsContextMatchErr); - - CopyBlock(pCtx, pBuffer, sizeof(IppsSHA512State)); - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA384Pack,(const IppsSHA384State* pCtx, Ipp8u* pBuffer)) -{ - return ippsSHA512Pack(pCtx, pBuffer); -} -#endif - - -/*F* -// Name: ippsSHA512Unpack -// ippsSHA384Unpack -// -// Purpose: Unpack buffer content into the initialized context. -// -// Returns: Reason: -// ippStsNullPtrErr pSize == NULL -// pCtx == NULL -// ippStsNoErr no errors -// -// Parameters: -// pCtx pointer hash state -// pSize pointer to the packed spec size -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) || defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA512Unpack,(const Ipp8u* pBuffer, IppsSHA512State* pCtx)) -{ - /* test pointers */ - IPP_BAD_PTR2_RET(pCtx, pBuffer); - /* use aligned context */ - pCtx = (IppsSHA512State*)( IPP_ALIGNED_PTR(pCtx, SHA512_ALIGNMENT) ); - - CopyBlock(pBuffer, pCtx, sizeof(IppsSHA512State)); - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA384Unpack,(const Ipp8u* pBuffer, IppsSHA384State* pCtx)) -{ - return ippsSHA512Unpack(pBuffer, pCtx); -} -#endif - - -/*F* -// Name: ippsSHA512Duplicate -// ippsSHA384Duplicate -// -// Purpose: Clone SHA512 state. -// -// Returns: Reason: -// ippStsNullPtrErr pSrcState == NULL -// pDstState == NULL -// ippStsContextMatchErr pSrcState->idCtx != idCtxSHA512 -// pDstState->idCtx != idCtxSHA512 -// ippStsNoErr no errors -// -// Parameters: -// pSrcState pointer to the source SHA512 state -// pDstState pointer to the target SHA512 state -// Note: -// pDstState may to be uninitialized by ippsSHA512Init() -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) || defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA512Duplicate,(const IppsSHA512State* pSrcState, IppsSHA512State* pDstState)) -{ - /* test state pointers */ - IPP_BAD_PTR2_RET(pSrcState, pDstState); - /* use aligned context */ - pSrcState = (IppsSHA512State*)( IPP_ALIGNED_PTR(pSrcState, SHA512_ALIGNMENT) ); - pDstState = (IppsSHA512State*)( IPP_ALIGNED_PTR(pDstState, SHA512_ALIGNMENT) ); - /* test states ID */ - IPP_BADARG_RET(idCtxSHA512 !=SHS_ID(pSrcState), ippStsContextMatchErr); - //IPP_BADARG_RET(idCtxSHA512 !=SHS_ID(pDstState), ippStsContextMatchErr); - - /* copy state */ - CopyBlock(pSrcState, pDstState, sizeof(IppsSHA512State)); - - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA384Duplicate,(const IppsSHA384State* pSrcState, IppsSHA384State* pDstState)) -{ - return ippsSHA512Duplicate(pSrcState, pDstState); -} -#endif - - -/*F* -// Name: ippsSHA512Update -// ippsSHA384Update -// -// Purpose: Updates intermadiate digest based on input stream. -// -// Returns: Reason: -// ippStsNullPtrErr pSrc == NULL -// pState == NULL -// ippStsContextMatchErr pState->idCtx != idCtxSHA512 -// ippStsLengthErr len <0 -// ippStsNoErr no errors -// -// Parameters: -// pSrc pointer to the input stream -// len input stream length -// pState pointer to the SHA512 state -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) || defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA512Update,(const Ipp8u* pSrc, int len, IppsSHA512State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA512State*)( IPP_ALIGNED_PTR(pState, SHA512_ALIGNMENT) ); - - /* test state ID */ - IPP_BADARG_RET(idCtxSHA512 !=SHS_ID(pState), ippStsContextMatchErr); - /* test input length */ - IPP_BADARG_RET((len<0), ippStsLengthErr); - /* test source pointer */ - IPP_BADARG_RET((len && !pSrc), ippStsNullPtrErr); - - /* - // handle non empty message - */ - if(len) { - int processingLen; - - int n = SHS_INDX(pState); - Ipp8u* pBuffer = SHS_BUFF(pState); - Ipp8u* pHash = (Ipp8u*)SHS_HASH(pState); - - Ipp64u lenLo = SHS_LENL(pState); - Ipp64u lenHi = SHS_LENH(pState); - lenLo += len; - if(lenLo < SHS_LENL(pState)) lenHi++; - - /* if non empty internal buffer filling */ - if(n) { - /* copy from input stream to the internal buffer as match as possible */ - processingLen = IPP_MIN(len, (MBS_SHA512-n)); - CopyBlock(pSrc, pBuffer+n, processingLen); - - pSrc += processingLen; - len -= processingLen; - SHS_INDX(pState) = n += processingLen; - - /* update digest if buffer full */ - if(MBS_SHA512 == n) { - UpdateSHA512(pHash, pBuffer, MBS_SHA512, SHA512_cnt); - SHS_INDX(pState) = 0; - } - } - - /* main message part processing */ - processingLen = len & ~(MBS_SHA512-1); - if(processingLen) { - UpdateSHA512(pHash, pSrc, processingLen, SHA512_cnt); - pSrc += processingLen; - len -= processingLen; - } - - /* store rest of message into the internal buffer */ - if(len) { - CopyBlock(pSrc, pBuffer, len); - SHS_INDX(pState) += len; - } - - SHS_LENL(pState) = lenLo; - SHS_LENH(pState) = lenHi; - } - - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA384Update,(const Ipp8u* pSrc, int len, IppsSHA384State* pState)) -{ - return ippsSHA512Update(pSrc, len, pState); -} -#endif - - -/* -// Compute digest -*/ -#if defined (_ENABLE_ALG_SHA512_) || defined (_ENABLE_ALG_SHA384_) -void ComputeDigestSHA512(Ipp64u* pHash, const IppsSHA512State* pState) -{ - const Ipp8u* stateBuff = SHS_BUFF(pState); - int stateBuffLen = SHS_INDX(pState); - - /* local buffer and it length */ - Ipp8u buffer[MBS_SHA512*2]; - int bufferLen = stateBuffLen < (MBS_SHA512-(int)sizeof(Ipp64u)*2)? MBS_SHA512 : MBS_SHA512*2; - - /* copy rest of message into internal buffer */ - CopyBlock(stateBuff, buffer, stateBuffLen); - - /* padd message */ - buffer[stateBuffLen++] = 0x80; - PaddBlock(0, buffer+stateBuffLen, bufferLen-stateBuffLen-sizeof(Ipp64u)*2); - - /* message length representation */ - { - Ipp64u lo = SHS_LENL(pState); /* message length in bytes */ - Ipp64u hi = SHS_LENH(pState); - hi = LSL64(hi,3) | LSR64(lo,63-3); /* message length in bits */ - lo = LSL64(lo,3); - ((Ipp64u*)(buffer+bufferLen))[-2] = ENDIANNESS64(hi); - ((Ipp64u*)(buffer+bufferLen))[-1] = ENDIANNESS64(lo); - } - - /* copmplete hash computation */ - UpdateSHA512(pHash, buffer, bufferLen, SHA512_cnt); - - /* convert hash into big endian */ - pHash[0] = ENDIANNESS64(pHash[0]); - pHash[1] = ENDIANNESS64(pHash[1]); - pHash[2] = ENDIANNESS64(pHash[2]); - pHash[3] = ENDIANNESS64(pHash[3]); - pHash[4] = ENDIANNESS64(pHash[4]); - pHash[5] = ENDIANNESS64(pHash[5]); - pHash[6] = ENDIANNESS64(pHash[6]); - pHash[7] = ENDIANNESS64(pHash[7]); -} -#endif - - -/*F* -// Name: ippsSHA512GetTag -// ippsSHA384GetTag -// -// Purpose: Compute digest based on current state. -// Note, that futher digest update is possible -// -// Returns: Reason: -// ippStsNullPtrErr pTag == NULL -// pState == NULL -// ippStsContextMatchErr pState->idCtx != idCtxSHA512 -// ippStsLengthErr max_SHA_digestLen < tagLen <1 -// ippStsNoErr no errors -// -// Parameters: -// pTag address of the output digest -// tagLen length of digest -// pState pointer to the SHS state -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) -IPPFUN(IppStatus, ippsSHA512GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA512State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA512State*)( IPP_ALIGNED_PTR(pState, SHA512_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA512 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pTag); - IPP_BADARG_RET((tagLen<1)||(sizeof(DigestSHA512)idCtx != idCtxSHA512 -// ippStsNoErr no errors -// -// Parameters: -// pMD address of the output digest -// pState pointer to the SHA512 state -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) -IPPFUN(IppStatus, ippsSHA512Final,(Ipp8u* pMD, IppsSHA512State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA512State*)( IPP_ALIGNED_PTR(pState, SHA512_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA512 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - ComputeDigestSHA512(SHS_HASH(pState), pState); - CopyBlock(SHS_HASH(pState), pMD, sizeof(DigestSHA512)); - InitSHA512(SHA512_IV, pState); - - return ippStsNoErr; -} -#endif - -#if defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA384Final,(Ipp8u* pMD, IppsSHA384State* pState)) -{ - /* test state pointer and ID */ - IPP_BAD_PTR1_RET(pState); - /* use aligned context */ - pState = (IppsSHA384State*)( IPP_ALIGNED_PTR(pState, SHA512_ALIGNMENT) ); - /* test state ID */ - IPP_BADARG_RET(idCtxSHA512 !=SHS_ID(pState), ippStsContextMatchErr); - - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - ComputeDigestSHA512(SHS_HASH(pState), pState); - CopyBlock(SHS_HASH(pState), pMD, sizeof(DigestSHA384)); - InitSHA512(SHA384_IV, pState); - - return ippStsNoErr; -} -#endif - - -#if defined (_ENABLE_ALG_SHA512_) || defined (_ENABLE_ALG_SHA384_) -IppStatus cpSHA512MessageDigest(DigestSHA512 hash, const Ipp8u* pMsg, int msgLen, const DigestSHA512 IV) -{ - /* test digest pointer */ - IPP_BAD_PTR1_RET(hash); - /* test message length */ - IPP_BADARG_RET((msgLen<0), ippStsLengthErr); - /* test message pointer */ - IPP_BADARG_RET((msgLen && !pMsg), ippStsNullPtrErr); - - { - /* message length in the multiple MBS and the rest */ - int msgLenBlks = msgLen & (-MBS_SHA512); - int msgLenRest = msgLen - msgLenBlks; - - /* setup initial digest */ - hash[0] = IV[0]; - hash[1] = IV[1]; - hash[2] = IV[2]; - hash[3] = IV[3]; - hash[4] = IV[4]; - hash[5] = IV[5]; - hash[6] = IV[6]; - hash[7] = IV[7]; - - /* process main part of the message */ - if(msgLenBlks) - UpdateSHA512(hash, pMsg, msgLenBlks, SHA512_cnt); - - /* process message padding */ - { - #define MREP_SIZE_SHA512 (2*sizeof(Ipp64u)) - Ipp8u buffer[MBS_SHA512*2]; - int bufferLen = msgLenRest < (int)(MBS_SHA512-MREP_SIZE_SHA512)? MBS_SHA512 : MBS_SHA512*2; - - /* message bitlength representation */ - Ipp64u msgLenBits = (Ipp64u)msgLen*8; - msgLenBits = ENDIANNESS64(msgLenBits); - - /* copy end of message */ - CopyBlock(pMsg+msgLen-msgLenRest, buffer, msgLenRest); - - /* end of message bit */ - buffer[msgLenRest++] = 0x80; - - /* padd buffer */ - PaddBlock(0, buffer+msgLenRest, bufferLen-msgLenRest-MREP_SIZE_SHA512+sizeof(Ipp64u)); - /* copy message bitlength representation */ - ((Ipp64u*)(buffer+bufferLen))[-1] = msgLenBits; - - UpdateSHA512(hash, buffer, bufferLen, SHA512_cnt); - #undef MREP_SIZE_SHA512 - } - - /* swap hash bytes */ - hash[0] = ENDIANNESS64(hash[0]); - hash[1] = ENDIANNESS64(hash[1]); - hash[2] = ENDIANNESS64(hash[2]); - hash[3] = ENDIANNESS64(hash[3]); - hash[4] = ENDIANNESS64(hash[4]); - hash[5] = ENDIANNESS64(hash[5]); - hash[6] = ENDIANNESS64(hash[6]); - hash[7] = ENDIANNESS64(hash[7]); - - return ippStsNoErr; - } -} -#endif - -/*F* -// Name: ippsSHA512MessageDigest -// ippsSHA384MessageDigest -// -// Purpose: Digest of the whole message. -// -// Returns: Reason: -// ippStsNullPtrErr pMsg == NULL -// pDigest == NULL -// ippStsLengthErr len <0 -// ippStsNoErr no errors -// -// Parameters: -// pMsg pointer to the input message -// len input message length -// pMD address of the output digest -// -*F*/ -#if defined (_ENABLE_ALG_SHA512_) -IPPFUN(IppStatus, ippsSHA512MessageDigest,(const Ipp8u* pMsg, int msgLen, Ipp8u* pMD)) -{ - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - { - DigestSHA512 hash; - IppStatus sts = cpSHA512MessageDigest(hash, pMsg, msgLen, SHA512_IV); - if(ippStsNoErr==sts) - CopyBlock(hash, pMD, IPP_SHA512_DIGEST_BITSIZE/BYTESIZE); - return sts; - } -} -#endif - -#if defined (_ENABLE_ALG_SHA384_) -IPPFUN(IppStatus, ippsSHA384MessageDigest,(const Ipp8u* pMsg, int msgLen, Ipp8u* pMD)) -{ - /* test digest pointer */ - IPP_BAD_PTR1_RET(pMD); - - { - DigestSHA512 hash; - IppStatus sts = cpSHA512MessageDigest(hash, pMsg, msgLen, SHA384_IV); - if(ippStsNoErr==sts) - CopyBlock(hash, pMD, IPP_SHA384_DIGEST_BITSIZE/BYTESIZE); - return sts; - } -} -#endif diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcptool.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcptool.h deleted file mode 100644 index df8c798da8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcptool.h +++ /dev/null @@ -1,631 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Cryptography Primitive. -// Internal Definitions of Block Cipher Tools -// -// -*/ - -#if !defined(_PC_TOOL_H) -#define _CP_TOOL_H - -/* copy data block */ -__INLINE void CopyBlock(const void* pSrc, void* pDst, cpSize numBytes) -{ - const Ipp8u* s = (Ipp8u*)pSrc; - Ipp8u* d = (Ipp8u*)pDst; - cpSize k; - for(k=0; k=_IPP_W7) || (_IPP32E>=_IPP32E_M7)) -__INLINE void PurgeBlock(void* pDst, int len) -{ - int n; - for(n=0; n> (blkSize-numSize)%8 ); - - /* save crytical byte */ - Ipp8u save = (Ipp8u)( pCounter[maskPosition] & ~mask ); - - int len = BITS2WORD8_SIZE(blkSize); - Ipp32u carry = 1; - for(; (len>maskPosition) && carry; len--) { - Ipp32u x = pCounter[len-1] + carry; - pCounter[len-1] = (Ipp8u)x; - carry = (x>>8) & 0xFF; - } - - /* update crytical byte */ - pCounter[maskPosition] &= mask; - pCounter[maskPosition] |= save; -} - -/* vb */ -__INLINE void ompStdIncrement64( void* pInitCtrVal, void* pCurrCtrVal, - int ctrNumBitSize, int n ) -{ - int k; - Ipp64u cntr; - Ipp64u temp; - Ipp64s item; - - #if( IPP_ENDIAN == IPP_LITTLE_ENDIAN ) - for( k = 0; k < 8; k++ ) - ( ( Ipp8u* )&cntr )[k] = ( ( Ipp8u* )pInitCtrVal )[7 - k]; - #else - for( k = 0; k < 8; k++ ) - ( ( Ipp8u* )&cntr )[k] = ( ( Ipp8u* )pInitCtrVal )[k]; - #endif - - if( ctrNumBitSize == 64 ) - { - cntr += ( Ipp64u )n; - } - else - { - /* gres: Ipp64u mask = ( Ipp64u )0xFFFFFFFFFFFFFFFF >> ( 64 - ctrNumBitSize ); */ - Ipp64u mask = CONST_64(0xFFFFFFFFFFFFFFFF) >> ( 64 - ctrNumBitSize ); - Ipp64u save = cntr & ( ~mask ); - Ipp64u bndr = ( Ipp64u )1 << ctrNumBitSize; - - temp = cntr & mask; - cntr = temp + ( Ipp64u )n; - - if( cntr > bndr ) - { - item = ( Ipp64s )n - ( Ipp64s )( bndr - temp ); - - while( item > 0 ) - { - cntr = ( Ipp64u )item; - item -= ( Ipp64s )bndr; - } - } - - cntr = save | ( cntr & mask ); - } - - #if( IPP_ENDIAN == IPP_LITTLE_ENDIAN ) - for( k = 0; k < 8; k++ ) - ( ( Ipp8u* )pCurrCtrVal )[7 - k] = ( ( Ipp8u* )&cntr )[k]; - #else - for( k = 0; k < 8; k++ ) - ( ( Ipp8u* )pCurrCtrVal )[k] = ( ( Ipp8u* )&cntr )[k]; - #endif -} - - -/* vb */ -__INLINE void ompStdIncrement128( void* pInitCtrVal, void* pCurrCtrVal, - int ctrNumBitSize, int n ) -{ - int k; - Ipp64u low; - Ipp64u hgh; - Ipp64u flag; - Ipp64u mask = CONST_64(0xFFFFFFFFFFFFFFFF); - Ipp64u save; - - #if( IPP_ENDIAN == IPP_LITTLE_ENDIAN ) - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )&low )[k] = ( ( Ipp8u* )pInitCtrVal )[15 - k]; - ( ( Ipp8u* )&hgh )[k] = ( ( Ipp8u* )pInitCtrVal )[7 - k]; - } - #else - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )&low )[k] = ( ( Ipp8u* )pInitCtrVal )[8 + k]; - ( ( Ipp8u* )&hgh )[k] = ( ( Ipp8u* )pInitCtrVal )[k]; - } - #endif - - if( ctrNumBitSize == 64 ) - { - low += ( Ipp64u )n; - } - else if( ctrNumBitSize < 64 ) - { - Ipp64u bndr; - Ipp64u cntr; - Ipp64s item; - - mask >>= ( 64 - ctrNumBitSize ); - save = low & ( ~mask ); - cntr = ( low & mask ) + ( Ipp64u )n; - - if( ctrNumBitSize < 31 ) - { - bndr = ( Ipp64u )1 << ctrNumBitSize; - - if( cntr > bndr ) - { - item = ( Ipp64s )( ( Ipp64s )n - ( ( Ipp64s )bndr - - ( Ipp64s )( low & mask ) ) ); - - while( item > 0 ) - { - cntr = ( Ipp64u )item; - item -= ( Ipp64s )bndr; - } - } - } - - low = save | ( cntr & mask ); - } - else - { - flag = ( low >> 63 ); - - if( ctrNumBitSize != 128 ) - { - mask >>= ( 128 - ctrNumBitSize ); - save = hgh & ( ~mask ); - hgh &= mask; - } - - low += ( Ipp64u )n; - - if( flag != ( low >> 63 ) ) hgh++; - - if( ctrNumBitSize != 128 ) - { - hgh = save | ( hgh & mask ); - } - } - - #if( IPP_ENDIAN == IPP_LITTLE_ENDIAN ) - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )pCurrCtrVal )[15 - k] = ( ( Ipp8u* )&low )[k]; - ( ( Ipp8u* )pCurrCtrVal )[7 - k] = ( ( Ipp8u* )&hgh )[k]; - } - #else - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )pCurrCtrVal )[8 + k] = ( ( Ipp8u* )&low )[k]; - ( ( Ipp8u* )pCurrCtrVal )[k] = ( ( Ipp8u* )&hgh )[k]; - } - #endif -} - - -/* vb */ -__INLINE void ompStdIncrement192( void* pInitCtrVal, void* pCurrCtrVal, - int ctrNumBitSize, int n ) -{ - int k; - Ipp64u low; - Ipp64u mdl; - Ipp64u hgh; - Ipp64u flag; - Ipp64u mask = CONST_64(0xFFFFFFFFFFFFFFFF); - Ipp64u save; - - #if( IPP_ENDIAN == IPP_LITTLE_ENDIAN ) - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )&low )[k] = ( ( Ipp8u* )pInitCtrVal )[23 - k]; - ( ( Ipp8u* )&mdl )[k] = ( ( Ipp8u* )pInitCtrVal )[15 - k]; - ( ( Ipp8u* )&hgh )[k] = ( ( Ipp8u* )pInitCtrVal )[7 - k]; - } - #else - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )&low )[k] = ( ( Ipp8u* )pInitCtrVal )[16 + k]; - ( ( Ipp8u* )&mdl )[k] = ( ( Ipp8u* )pInitCtrVal )[8 + k]; - ( ( Ipp8u* )&hgh )[k] = ( ( Ipp8u* )pInitCtrVal )[k]; - } - #endif - - if( ctrNumBitSize == 64 ) - { - low += ( Ipp64u )n; - } - else if( ctrNumBitSize == 128 ) - { - flag = ( low >> 63 ); - low += ( Ipp64u )n; - if( flag != ( low >> 63 ) ) mdl++; - } - else if( ctrNumBitSize == 192 ) - { - flag = ( low >> 63 ); - low += ( Ipp64u )n; - - if( flag != ( low >> 63 ) ) - { - flag = ( mdl >> 63 ); - mdl++; - if( flag != ( mdl >> 63 ) ) hgh++; - } - } - else if( ctrNumBitSize < 64 ) - { - Ipp64u bndr; - Ipp64u cntr; - Ipp64s item; - - mask >>= ( 64 - ctrNumBitSize ); - save = low & ( ~mask ); - cntr = ( low & mask ) + ( Ipp64u )n; - - if( ctrNumBitSize < 31 ) - { - bndr = ( Ipp64u )1 << ctrNumBitSize; - - if( cntr > bndr ) - { - item = ( Ipp64s )( ( Ipp64s )n - ( ( Ipp64s )bndr - - ( Ipp64s )( low & mask ) ) ); - - while( item > 0 ) - { - cntr = ( Ipp64u )item; - item -= ( Ipp64s )bndr; - } - } - } - - low = save | ( cntr & mask ); - } - else if( ctrNumBitSize < 128 ) - { - flag = ( low >> 63 ); - mask >>= ( 128 - ctrNumBitSize ); - save = mdl & ( ~mask ); - mdl &= mask; - low += ( Ipp64u )n; - if( flag != ( low >> 63 ) ) mdl++; - mdl = save | ( mdl & mask ); - } - else - { - flag = ( low >> 63 ); - mask >>= ( 192 - ctrNumBitSize ); - save = hgh & ( ~mask ); - hgh &= mask; - low += ( Ipp64u )n; - - if( flag != ( low >> 63 ) ) - { - flag = ( mdl >> 63 ); - mdl++; - if( flag != ( mdl >> 63 ) ) hgh++; - } - - hgh = save | ( hgh & mask ); - } - - #if( IPP_ENDIAN == IPP_LITTLE_ENDIAN ) - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )pCurrCtrVal )[23 - k] = ( ( Ipp8u* )&low )[k]; - ( ( Ipp8u* )pCurrCtrVal )[15 - k] = ( ( Ipp8u* )&mdl )[k]; - ( ( Ipp8u* )pCurrCtrVal )[7 - k] = ( ( Ipp8u* )&hgh )[k]; - } - #else - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )pCurrCtrVal )[16 + k] = ( ( Ipp8u* )&low )[k]; - ( ( Ipp8u* )pCurrCtrVal )[8 + k] = ( ( Ipp8u* )&mdl )[k]; - ( ( Ipp8u* )pCurrCtrVal )[k] = ( ( Ipp8u* )&hgh )[k]; - } - #endif -} - - -/* vb */ -__INLINE void ompStdIncrement256( void* pInitCtrVal, void* pCurrCtrVal, - int ctrNumBitSize, int n ) -{ - int k; - Ipp64u low; - Ipp64u mdl; - Ipp64u mdm; - Ipp64u hgh; - Ipp64u flag; - Ipp64u mask = CONST_64(0xFFFFFFFFFFFFFFFF); - Ipp64u save; - - #if( IPP_ENDIAN == IPP_LITTLE_ENDIAN ) - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )&low )[k] = ( ( Ipp8u* )pInitCtrVal )[31 - k]; - ( ( Ipp8u* )&mdl )[k] = ( ( Ipp8u* )pInitCtrVal )[23 - k]; - ( ( Ipp8u* )&mdm )[k] = ( ( Ipp8u* )pInitCtrVal )[15 - k]; - ( ( Ipp8u* )&hgh )[k] = ( ( Ipp8u* )pInitCtrVal )[7 - k]; - } - #else - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )&low )[k] = ( ( Ipp8u* )pInitCtrVal )[24 + k]; - ( ( Ipp8u* )&mdl )[k] = ( ( Ipp8u* )pInitCtrVal )[16 + k]; - ( ( Ipp8u* )&mdm )[k] = ( ( Ipp8u* )pInitCtrVal )[8 + k]; - ( ( Ipp8u* )&hgh )[k] = ( ( Ipp8u* )pInitCtrVal )[k]; - } - #endif - - if( ctrNumBitSize == 64 ) - { - low += ( Ipp64u )n; - } - else if( ctrNumBitSize == 128 ) - { - flag = ( low >> 63 ); - low += ( Ipp64u )n; - if( flag != ( low >> 63 ) ) mdl++; - } - else if( ctrNumBitSize == 192 ) - { - flag = ( low >> 63 ); - low += ( Ipp64u )n; - - if( flag != ( low >> 63 ) ) - { - flag = ( mdl >> 63 ); - mdl++; - if( flag != ( mdl >> 63 ) ) hgh++; - } - } - else if( ctrNumBitSize == 256 ) - { - flag = ( low >> 63 ); - low += ( Ipp64u )n; - - if( flag != ( low >> 63 ) ) - { - flag = ( mdl >> 63 ); - mdl++; - - if( flag != ( mdl >> 63 ) ) - { - flag = ( mdm >> 63 ); - mdm++; - if( flag != ( mdm >> 63 ) ) hgh++; - } - } - } - else if( ctrNumBitSize < 64 ) - { - Ipp64u bndr; - Ipp64u cntr; - Ipp64s item; - - mask >>= ( 64 - ctrNumBitSize ); - save = low & ( ~mask ); - cntr = ( low & mask ) + ( Ipp64u )n; - - if( ctrNumBitSize < 31 ) - { - bndr = ( Ipp64u )1 << ctrNumBitSize; - - if( cntr > bndr ) - { - item = ( Ipp64s )( ( Ipp64s )n - ( ( Ipp64s )bndr - - ( Ipp64s )( low & mask ) ) ); - - while( item > 0 ) - { - cntr = ( Ipp64u )item; - item -= ( Ipp64s )bndr; - } - } - } - - low = save | ( cntr & mask ); - } - else if( ctrNumBitSize < 128 ) - { - flag = ( low >> 63 ); - mask >>= ( 128 - ctrNumBitSize ); - save = mdl & ( ~mask ); - mdl &= mask; - low += ( Ipp64u )n; - if( flag != ( low >> 63 ) ) mdl++; - mdl = save | ( mdl & mask ); - } - else if( ctrNumBitSize < 192 ) - { - flag = ( low >> 63 ); - mask >>= ( 192 - ctrNumBitSize ); - save = mdm & ( ~mask ); - mdm &= mask; - low += ( Ipp64u )n; - - if( flag != ( low >> 63 ) ) - { - flag = ( mdl >> 63 ); - mdl++; - if( flag != ( mdl >> 63 ) ) mdm++; - } - - mdm = save | ( mdm & mask ); - } - else - { - flag = ( low >> 63 ); - mask >>= ( 256 - ctrNumBitSize ); - save = hgh & ( ~mask ); - hgh &= mask; - low += ( Ipp64u )n; - - if( flag != ( low >> 63 ) ) - { - flag = ( mdl >> 63 ); - mdl++; - - if( flag != ( mdl >> 63 ) ) - { - flag = ( mdm >> 63 ); - mdm++; - if( flag != ( mdm >> 63 ) ) hgh++; - } - } - - hgh = save | ( hgh & mask ); - } - - #if( IPP_ENDIAN == IPP_LITTLE_ENDIAN ) - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )pCurrCtrVal )[31 - k] = ( ( Ipp8u* )&low )[k]; - ( ( Ipp8u* )pCurrCtrVal )[23 - k] = ( ( Ipp8u* )&mdl )[k]; - ( ( Ipp8u* )pCurrCtrVal )[15 - k] = ( ( Ipp8u* )&mdm )[k]; - ( ( Ipp8u* )pCurrCtrVal )[7 - k] = ( ( Ipp8u* )&hgh )[k]; - } - #else - for( k = 0; k < 8; k++ ) - { - ( ( Ipp8u* )pCurrCtrVal )[24 + k] = ( ( Ipp8u* )&low )[k]; - ( ( Ipp8u* )pCurrCtrVal )[16 + k] = ( ( Ipp8u* )&mdl )[k]; - ( ( Ipp8u* )pCurrCtrVal )[8 + k] = ( ( Ipp8u* )&mdm )[k]; - ( ( Ipp8u* )pCurrCtrVal )[k] = ( ( Ipp8u* )&hgh )[k]; - } - #endif -} - -#endif /* _CP_TOOL_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpvariant.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpvariant.h deleted file mode 100644 index aeda9c49f9..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/pcpvariant.h +++ /dev/null @@ -1,326 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippcp) -// -// Purpose: -// Define ippCP variant -// -// -*/ - -#if !defined(_CP_VARIANT_H) -#define _CP_VARIANT_H - -/* -// modes of the CPU feature -*/ -#define _FEATURE_OFF_ (0) /* feature is OFF a priori */ -#define _FEATURE_ON_ (1) /* feature is ON a priori */ -#define _FEATURE_TICKTOCK_ (2) /* dectect is feature OFF/ON */ - -/* -// set _AES_NI_ENABLING_ -*/ -#if defined _IPP_AES_NI_ - #if (_IPP_AES_NI_ == 0) - #define _AES_NI_ENABLING_ _FEATURE_OFF_ - #elif (_IPP_AES_NI_ == 1) - #define _AES_NI_ENABLING_ _FEATURE_ON_ - #else - #error Define _IPP_AES_NI_=0 or 1 or omit _IPP_AES_NI_ at all - #endif -#else - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - #define _AES_NI_ENABLING_ _FEATURE_TICKTOCK_ - #else - #define _AES_NI_ENABLING_ _FEATURE_OFF_ - #endif -#endif - -/* -// select AES safe implementation -*/ -#define _ALG_AES_SAFE_COMPACT_SBOX_ (1) -#define _ALG_AES_SAFE_COMPOSITE_GF_ (2) - -#if (_AES_NI_ENABLING_==_FEATURE_ON_) - #define _ALG_AES_SAFE_ _FEATURE_OFF_ -#else - #if (_IPP>=_IPP_V8) || (_IPP32E>=_IPP32E_U8) - #define _ALG_AES_SAFE_ _ALG_AES_SAFE_COMPOSITE_GF_ - #else - #define _ALG_AES_SAFE_ _ALG_AES_SAFE_COMPACT_SBOX_ - #endif -#endif - - -/* -// set _SHA_NI_ENABLING_ -*/ -#if defined _IPP_SHA_NI_ - #if (_IPP_SHA_NI_ == 0) - #define _SHA_NI_ENABLING_ _FEATURE_OFF_ - #elif (_IPP_SHA_NI_ == 1) - #define _SHA_NI_ENABLING_ _FEATURE_ON_ - #else - #error Define _IPP_SHA_NI_=0 or 1 or omit _IPP_SHA_NI_ at all - #endif -#else - #if (_IPP>=_IPP_P8) || (_IPP32E>=_IPP32E_Y8) - #define _SHA_NI_ENABLING_ _FEATURE_TICKTOCK_ - #else - #define _SHA_NI_ENABLING_ _FEATURE_OFF_ - #endif -#endif - -/* -// set _ADCOX_NI_ENABLING_ -*/ -#if defined _IPP_ADCX_NI_ - #if (_IPP_ADCX_NI_ == 0) - #define _ADCOX_NI_ENABLING_ _FEATURE_OFF_ - #elif (_IPP_ADCX_NI_ == 1) - #define _ADCOX_NI_ENABLING_ _FEATURE_ON_ - #else - #error Define _IPP_ADCX_NI_=0 or 1 or omit _IPP_ADCX_NI_ at all - #endif -#else - #if (_IPP32E>=_IPP32E_L9) - #define _ADCOX_NI_ENABLING_ _FEATURE_TICKTOCK_ - #else - #define _ADCOX_NI_ENABLING_ _FEATURE_OFF_ - #endif -#endif - - -/* -// IPP supports several hash algorithms by default: -// SHA-1 -// SHA-256 -// SHA-224 (or SHA256/224 by the FIPS180-4 classification) -// SHA-512 -// SHA-384 (or SHA512/384 by the FIPS180-4 classification) -// MD5 -// SM3 -// -// By default all hash algorithms are included in IPP Crypto. -// -// If one need excludes code of particular hash, just define -// suitable _DISABLE_ALG_XXX, where XXX name of the hash algorithm -// -*/ -#if !defined(_DISABLE_ALG_SHA1_) -#define _ENABLE_ALG_SHA1_ /* SHA1 on */ -#else -# undef _ENABLE_ALG_SHA1_ /* SHA1 off */ -#endif - -#if !defined(_DISABLE_ALG_SHA256_) -# define _ENABLE_ALG_SHA256_ /* SHA256 on */ -#else -# undef _ENABLE_ALG_SHA256_ /* SHA256 off */ -#endif - -#if !defined(_DISABLE_ALG_SHA224_) -# define _ENABLE_ALG_SHA224_ /* SHA224 on */ -#else -# undef _ENABLE_ALG_SHA224_ /* SHA224 off */ -#endif - -#if !defined(_DISABLE_ALG_SHA512_) -# define _ENABLE_ALG_SHA512_ /* SHA512 on */ -#else -# undef _ENABLE_ALG_SHA512_ /* SHA512 off */ -#endif - -#if !defined(_DISABLE_ALG_SHA384_) -# define _ENABLE_ALG_SHA384_ /* SHA384 on */ -#else -# undef _ENABLE_ALG_SHA384_ /* SHA384 off */ -#endif - -#if !defined(_DISABLE_ALG_SHA512_224_) -# define _ENABLE_ALG_SHA512_224_ /* SHA512/224 on */ -#else -# undef _ENABLE_ALG_SHA512_224_ /* SHA512/224 off */ -#endif - -#if !defined(_DISABLE_ALG_SHA512_256_) -# define _ENABLE_ALG_SHA512_256_ /* SHA512/256 on */ -#else -# undef _ENABLE_ALG_SHA512_256_ /* SHA512/256 off */ -#endif - -#if !defined(_DISABLE_ALG_MD5_) -# define _ENABLE_ALG_MD5_ /* MD5 on */ -#else -# undef _ENABLE_ALG_MD5_ /* MD5 off */ -#endif - -#if !defined(_DISABLE_ALG_SM3_) -# define _ENABLE_ALG_SM3_ /* SM3 on */ -#else -# undef _ENABLE_ALG_SM3_ /* SM3 off */ -#endif - -/* -// SHA1 plays especial role in IPP. Thus IPP random generator -// and therefore prime number generator are based on SHA1. -// So, do no exclude SHA1 from the active list of hash algorithms -*/ -//#if !defined(_ENABLE_ALG_SHA1_) -//#define _ENABLE_ALG_SHA1_ -//#endif - -/* -// Because of performane reason hash algorithms are implemented in form -// of unroller cycle and therefore these implementations are big enough. -// IPP supports "compact" implementation of some basic hash algorithms: -// SHA-1 -// SHA-256 -// SHA-512 -// SM3 -// -// Define any -// _ALG_SHA1_COMPACT_ -// _ALG_SHA256_COMPACT_ -// _ALG_SHA512_COMPACT_ -// _ALG_SM3_COMPACT_ -// -// to select "compact" implementation of particular hash algorithm. -// IPP does not define "compact" implementation by default. -// -// Don't know what performance degradation leads "compact" -// in comparison with default IPP implementation. -// -// Note: the definition like _ALG_XXX_COMPACT_ has effect -// if and only if IPP instance is _PX or _MX -*/ -//#define _ALG_SHA1_COMPACT_ -//#define _ALG_SHA256_COMPACT_ -//#define _ALG_SHA512_COMPACT_ -//#define _ALG_SM3_COMPACT_ -//#undef _ALG_SHA1_COMPACT_ -//#undef _ALG_SHA256_COMPACT_ -//#undef _ALG_SHA512_COMPACT_ -//#undef _ALG_SM3_COMPACT_ - - -/* -// BN arithmetic: -// - do/don't use special implementation of sqr instead of usual multication -// - do/don't use Karatsuba multiplication alg -*/ -#define _USE_SQR_ /* use implementaton of sqr */ -#define xUSE_KARATSUBA_ /* not use Karatsuba method for multiplication */ -#define _USE_WINDOW_EXP_ /* use fixed window exponentiation */ - -/* -// RSA: -// - do/don't use Ernie's style mitigation of CBA -// - do/don't use Gres's style mitigation of CBA -// - do/don't use Foldinf technique for RSA-1204 implementation -*/ -#define xUSE_ERNIE_CBA_MITIGATION_ /* not use (Ernie) mitigation of CBA */ -#define _USE_GRES_CBA_MITIGATION_ /* use (Gres) mitigation of CBA */ -#define xUSE_FOLD_MONT512_ /* use foding technique in RSA-1024 case */ - -/* -// IPP supports different implementation of NIST's (standard) EC over GF(0): -// P-128 (IppECCPStd128r1, IppECCPStd128r2) -// P-192 (IppECCPStd192r1) -// P-224 (IppECCPStd224r1) -// P-256 (IppECCPStd256r1) -// P-384 (IppECCPStd384r1) -// P-521 (IppECCPStd521r1) -// -// If one need replace the particular implementation by abritrary one -// assign _ECP_IMP_ARBIRTRARY_ to suitable symbol -// -// _ECP_IMPL_ARBIRTRARY_ means that implementtaion does not use any curve specific, -// provide the same (single) code for any type curve -// -// _ECP_IMPL_SPECIFIC_ means that implementation uses specific modular reduction -// based on prime structure; -// most of NIST's cures (p128, p192, p224, p256, p384, p521) are uses -// such kind of reduction procedure; -// in contrast with _ECP_IMPL_ARBIRTRARY_ and _ECP_IMPL_MFM_ -// this type of implementation uses point representation in REGULAR residual -// (not Montgometry!!) domain -// -// _ECP_IMPL_MFM_ means that implementation uses "Montgomary Friendly Modulus" (primes); -// p256 and sm2 are using such kind of optimization -*/ -#define _ECP_IMPL_ARBIRTRARY_ 0 -#define _ECP_IMPL_SPECIFIC_ 1 -#define _ECP_IMPL_MFM_ 2 - -#define _ECP_128_ _ECP_IMPL_SPECIFIC_ -#define _ECP_192_ _ECP_IMPL_SPECIFIC_ -#define _ECP_224_ _ECP_IMPL_SPECIFIC_ -#define _ECP_256_ _ECP_IMPL_SPECIFIC_ -#define _ECP_384_ _ECP_IMPL_SPECIFIC_ -#define _ECP_521_ _ECP_IMPL_SPECIFIC_ -#define _ECP_SM2_ _ECP_IMPL_SPECIFIC_ -//#define _ECP_SM2_ _ECP_IMPL_ARBIRTRARY_ - -#if (_IPP32E >= _IPP32E_M7) -#undef _ECP_192_ -#undef _ECP_224_ -#undef _ECP_256_ -#undef _ECP_384_ -#undef _ECP_521_ -#undef _ECP_SM2_ - -#define _ECP_192_ _ECP_IMPL_MFM_ -#define _ECP_224_ _ECP_IMPL_MFM_ -#define _ECP_256_ _ECP_IMPL_MFM_ -#define _ECP_384_ _ECP_IMPL_MFM_ -#define _ECP_521_ _ECP_IMPL_MFM_ -#define _ECP_SM2_ _ECP_IMPL_MFM_ -#endif - - -/* -// EC over GF(p): -// - do/don't use mitigation of CBA -*/ -#define _USE_ECCP_SSCM_ /* use SSCM ECCP */ - - -#if defined ( _OPENMP ) -#define DEFAULT_CPU_NUM (8) - -#define BF_MIN_BLK_PER_THREAD (32) -#define TF_MIN_BLK_PER_THREAD (16) - -#define DES_MIN_BLK_PER_THREAD (32) -#define TDES_MIN_BLK_PER_THREAD (16) - -#define RC5_64_MIN_BLK_PER_THREAD (16) -#define RC5_128_MIN_BLK_PER_THREAD (32) - -#define RIJ128_MIN_BLK_PER_THREAD (32) -#define RIJ192_MIN_BLK_PER_THREAD (16) -#define RIJ256_MIN_BLK_PER_THREAD (16) - -#define AESNI128_MIN_BLK_PER_THREAD (256) -#endif - -#endif /* _CP_VARIANT_H */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/precomp.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/precomp.h deleted file mode 100644 index afc437309b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcp/src/precomp.h +++ /dev/null @@ -1,22 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -#ifndef __PRECOMP_H__ -#define __PRECOMP_H__ - -#include "owncp.h" - -#endif /* __PRECOMP_H__ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/Makefile b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/Makefile deleted file mode 100644 index 9ce46a5303..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/make -f -API_INCLUDE_DIR = ../../include -SRC_INCLUDE_DIR = ../../sources/include -LIB_INSTALL_DIR = $(epidinstalldir)/lib/posix-$(ARCH)/ - -PCP_INCLUDE_DIR = ../ippcp/src -PCPEPID_INCLUDE_DIR = ./src -PCPEPID_SRC = $(wildcard ./src/*.c) -PCPEPID_OBJ = $(sort $(PCPEPID_SRC:.c=.o)) -PCPEPID_LIB = ./src/libippcpepid.a - - -ifeq ($(ARCH), x86_64) - CFLAGS += -DUSE_Y8_HEADER -else - CFLAGS += -DUSE_P8_HEADER -endif - -$(PCPEPID_OBJ): %.o: %.c - $(CC) $(CFLAGS) -I$(API_INCLUDE_DIR) -I$(SRC_INCLUDE_DIR) -I$(PCP_INCLUDE_DIR) -I$(PCPEPID_INCLUDE_DIR) -c -o $@ $< - -$(PCPEPID_LIB): $(PCPEPID_OBJ) - $(AR) rc $@ $^ - ranlib $@ - -build: all - -all: $(PCPEPID_LIB) - -install: - mkdir -p '$(LIB_INSTALL_DIR)' - cp $(PCPEPID_LIB) '$(LIB_INSTALL_DIR)' - -clean: - rm -f $(PCPEPID_OBJ) $(PCPEPID_LIB) - - diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/ippcpepid_y8.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/ippcpepid_y8.h deleted file mode 100644 index 8576622e6b..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/ippcpepid_y8.h +++ /dev/null @@ -1,44 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief This file does renames to allow using of the lib with - * commercial merged ippcp - */ - - -#ifndef IPPEPID_Y8_H_ -#define IPPEPID_Y8_H_ - -# define cpDiv_BNU32 y8_##cpDiv_BNU32 -# define cpLSR_BNU y8_##cpLSR_BNU -# define cpNLZ_BNU y8_##cpNLZ_BNU -# define cpNLZ_BNU32 y8_##cpNLZ_BNU32 -# define cpToOctStr_BNU y8_##cpToOctStr_BNU -# define cpFromOctStr_BNU y8_##cpFromOctStr_BNU -# define cpMulAdc_BNU_school y8_##cpMulAdc_BNU_school -# define cpMontRedAdc_BNU y8_##cpMontRedAdc_BNU -# define cpSqrAdc_BNU_school y8_##cpSqrAdc_BNU_school -# define cpModInv_BNU y8_##cpModInv_BNU -# define cpAdd_BNU y8_##cpAdd_BNU -# define cpSub_BNU y8_##cpSub_BNU -# define cpDec_BNU32 y8_##cpDec_BNU32 -# define cpNTZ_BNU y8_##cpNTZ_BNU -# define cpMontExpBin_BNU y8_##cpMontExpBin_BNU - -#endif // IPPEPID_Y8_H_ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/owncpepid.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/owncpepid.h deleted file mode 100644 index 6b0815da0d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/owncpepid.h +++ /dev/null @@ -1,58 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Internal Cryptographic Primitives (Intel(R) EPID v2.0) -// -// -*/ - -#ifndef __OWNCP_EPID_H__ -#define __OWNCP_EPID_H__ - -#if defined (USE_P8_HEADER) - #include "ippcpepid_p8.h" -#elif defined (USE_Y8_HEADER) - #include "ippcpepid_y8.h" -#endif - -#ifndef __OWNDEFS_H__ - #include "owndefs.h" -#endif - -#ifndef __OWNCP_H__ - #include "owncp.h" -#endif - -#ifndef __IPPCP_EPID_H__ - #include "ippcpepid.h" -#endif - -#define LOG2_CACHE_LINE_SIZE (6) /* LOG2(CACHE_LINE_SIZE) */ - -/* convert bitsize nbits into the number of BNU_CHUNK_T */ -#define BITS_CHUNKSIZE(nbits) (((nbits)+BITSIZE(BNU_CHUNK_T)-1)/BITSIZE(BNU_CHUNK_T)) - -/* -// dst = (src1 & mask) | (src2 & ~mask) -*/ -#define MASKED_COPY(dst, mask, src1, src2, len) { \ - /*cpSize*/ int i; \ - for(i=0; i<(len); i++) (dst)[i] = ((mask) & (src1)[i]) | (~(mask) & (src2)[i]); \ -} - -#endif /* __OWNCP_EPID_H__ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfp.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfp.c deleted file mode 100644 index d764dae125..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfp.c +++ /dev/null @@ -1,846 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Performance Primitives. Cryptography Primitives. -// Operations over GF(p). -// -// Context: -// ippsGFpGetSize() -// ippsGFpInit() -// -// ippsGFpElementGetSize() -// ippsGFpElementInit() -// -// ippsGFpSetElement() -// ippsGFpSetElementOctString() -// ippsGFpSetElementRandom() -// ippsGFpSetElementHash() -// ippsGFpCpyElement() -// ippsGFpGetElement() -// ippsGFpGetElementOctString() -// -// ippsGFpCmpElement() -// ippsGFpIsZeroElement() -// ippsGFpIsUnityElement() -// -// ippsGFpSetPolyTerm() -// ippsGFpGetPolyTerm() -// -// ippsGFpConj() -// ippsGFpNeg() -// ippsGFpInv() -// ippsGFpSqrt() -// ippsGFpAdd() -// ippsGFpSub() -// ippsGFpMul() -// ippsGFpSqr() -// ippsGFpExp() -// ippsGFpMultiExp() -// -// ippsGFpAdd_GFpE() -// ippsGFpSub_GFpE() -// ippsGFpMul_GFpE() -// -// -*/ - -#include "owncpepid.h" - -#include "pcpgfpstuff.h" -#include "pcpgfpxstuff.h" -#include "pcpgfphashstuff.h" - - -IPPFUN(IppStatus, ippsGFpGetSize,(int bitSize, int* pSizeInBytes)) -{ - IPP_BAD_PTR1_RET(pSizeInBytes); - IPP_BADARG_RET((bitSize < 2) || (bitSize > GF_MAX_BITSIZE), ippStsSizeErr); - - { - int elemLen32 = BITS2WORD32_SIZE(bitSize); - int elemLen = BITS_BNU_CHUNK(bitSize); - int poolelemLen = elemLen + 1; - - int montgomeryCtxSize; - ippsMontGetSize(ippBinaryMethod, elemLen32, &montgomeryCtxSize); - - *pSizeInBytes = sizeof(IppsGFpState) /* sizeof(IppsGFPState)*/ - +elemLen*sizeof(BNU_CHUNK_T) /* modulus */ - +elemLen*sizeof(BNU_CHUNK_T) /* half of modulus */ - +elemLen*sizeof(BNU_CHUNK_T) /* quadratic non-residue */ - +montgomeryCtxSize /* montgomery engine */ - +poolelemLen*sizeof(BNU_CHUNK_T)*GF_POOL_SIZE /* pool */ - +CACHE_LINE_SIZE - +GFP_ALIGNMENT-1; - return ippStsNoErr; - } -} - - -static void gfpInitSqrt(IppsGFpState* pGF) -{ - int elemLen = GFP_FELEN(pGF); - BNU_CHUNK_T* e = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* t = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pMont1 = cpGFpGetPool(1, pGF); - - cpGFpElementCopyPadd(pMont1, elemLen, MNT_1(GFP_MONT(pGF)), elemLen); - - /* (modulus-1)/2 */ - cpLSR_BNU(e, GFP_MODULUS(pGF), elemLen, 1); - - /* find a non-square g, where g^{(modulus-1)/2} = -1 */ - cpGFpElementCopy(GFP_QNR(pGF), pMont1, elemLen); - do { - cpGFpAdd(GFP_QNR(pGF), pMont1, GFP_QNR(pGF), pGF); - cpGFpExp(t, GFP_QNR(pGF), e, elemLen, pGF); - cpGFpNeg(t, t, pGF); - } while( !GFP_EQ(pMont1, t, elemLen) ); - - cpGFpReleasePool(3, pGF); -} - -IPPFUN(IppStatus, ippsGFpInit,(const Ipp32u* pPrime, int primeBitSize, IppsGFpState* pGF)) -{ - IPP_BAD_PTR2_RET(pPrime, pGF); - IPP_BADARG_RET((primeBitSize< 2 ) || (primeBitSize> GF_MAX_BITSIZE), ippStsSizeErr); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - - { - Ipp8u* ptr = (Ipp8u*)pGF; - - int elemLen32 = BITS2WORD32_SIZE(primeBitSize); - int elemLen = BITS_BNU_CHUNK(primeBitSize); - int poolelemLen = elemLen + 1; - int montgomeryCtxSize; - ippsMontGetSize(ippBinaryMethod, elemLen32, &montgomeryCtxSize); - - GFP_ID(pGF) = idCtxGFP; - GFP_DEGREE(pGF) = 1; - GFP_FELEN(pGF) = elemLen; - GFP_FELEN32(pGF) = elemLen32; - GFP_PELEN(pGF) = poolelemLen; - FIELD_POLY_TYPE(pGF) = ARBITRARY; - - #if(_IPP_ARCH==_IPP_ARCH_EM64T) - /* 192 < primeBitSize <= 256 is considered as Intel(R) EPID param */ - EPID_PARAMS(pGF) = elemLen==4; - #else - EPID_PARAMS(pGF) = 0; - #endif - - GFP_GROUNDGF(pGF)= pGF; - - /* methods */ - pGF->add = cpGFpAdd; - pGF->sub = cpGFpSub; - pGF->neg = cpGFpNeg; - pGF->mul = cpGFpMul; - pGF->sqr = cpGFpSqr; - pGF->div2= cpGFpHalve; - - #if(_IPP32E >= _IPP32E_M7) - if(EPID_PARAMS(pGF)) { - pGF->add = cp256pAdd; - pGF->sub = cp256pSub; - pGF->neg = cp256pNeg; - pGF->mul = cp256pMul; - pGF->sqr = cp256pSqr; - pGF->div2= cp256pHalve; - } - #endif - - ptr += sizeof(IppsGFpState); - GFP_MODULUS(pGF) = (BNU_CHUNK_T*)(ptr); ptr += elemLen*sizeof(BNU_CHUNK_T); - GFP_HMODULUS(pGF) = (BNU_CHUNK_T*)(ptr); ptr += elemLen*sizeof(BNU_CHUNK_T); - GFP_QNR(pGF) = (BNU_CHUNK_T*)(ptr); ptr += elemLen*sizeof(BNU_CHUNK_T); - GFP_MONT(pGF) = (IppsMontState*)( IPP_ALIGNED_PTR((ptr), (MONT_ALIGNMENT)) ); ptr += montgomeryCtxSize; - GFP_POOL(pGF) = (BNU_CHUNK_T*)(IPP_ALIGNED_PTR(ptr, (int)sizeof(BNU_CHUNK_T))); - - ippsMontInit(ippBinaryMethod, elemLen32, GFP_MONT(pGF)); - ippsMontSet(pPrime, elemLen32, GFP_MONT(pGF)); - - /* modulus */ - cpGFpElementPadd(GFP_MODULUS(pGF), elemLen, 0); - COPY_BNU((Ipp32u*)GFP_MODULUS(pGF), pPrime, elemLen32); - /* half of modulus */ - cpGFpElementPadd(GFP_HMODULUS(pGF), elemLen, 0); - cpLSR_BNU(GFP_HMODULUS(pGF), GFP_MODULUS(pGF), elemLen, 1); - - /* do some additional initialization to make sqrt operation faster */ - cpGFpElementPadd(GFP_QNR(pGF), elemLen, 0); - gfpInitSqrt(pGF); - - return ippStsNoErr; - } -} - - -IPPFUN(IppStatus, ippsGFpScratchBufferSize,(int nExponents, int ExpBitSize, const IppsGFpState* pGF, int* pBufferSize)) -{ - IPP_BAD_PTR2_RET(pGF, pBufferSize); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - - IPP_BADARG_RET( (0>=nExponents)||(nExponents>LOG2_CACHE_LINE_SIZE), ippStsBadArgErr); - - { - int elmDataSize = GFP_FELEN(pGF)*sizeof(BNU_CHUNK_T); - - /* get window_size */ - int w = (nExponents==1)? cpGFpGetOptimalWinSize(ExpBitSize) : /* use optimal window size, if single-scalar operation */ - nExponents; /* or pseudo-oprimal if multi-scalar operation */ - - /* number of table entries */ - int nPrecomputed = 1<nsA, ippStsSizeErr); - - { - int elemLen = GFP_FELEN(pGF); - - Ipp8u* ptr = (Ipp8u*)pR; - - GFPE_ID(pR) = idCtxGFPE; - GFPE_ROOM(pR) = elemLen; - ptr += sizeof(IppsGFpElement); - GFPE_DATA(pR) = (BNU_CHUNK_T*)ptr; - - return ippsGFpSetElement(pA, nsA, pR, pGF); - } -} - -IPPFUN(IppStatus, ippsGFpSetElement,(const Ipp32u* pDataA, int nsA, IppsGFpElement* pElm, IppsGFpState* pGF)) -{ - IPP_BAD_PTR2_RET(pElm, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElm), ippStsContextMatchErr ); - - IPP_BADARG_RET( (pDataA && (nsA<0)), ippStsSizeErr ); - - { - IppStatus sts = ippStsNoErr; - - int elemLen32 = GFP_FELEN32(pGF); - if(pDataA) FIX_BNU(pDataA, nsA); - if(pDataA && (nsA>elemLen32)) IPP_ERROR_RET(ippStsOutOfRangeErr); - - { - BNU_CHUNK_T* pTmp = cpGFpGetPool(1, pGF); - int elemLen = GFP_FELEN(pGF); - ZEXPAND_BNU(pTmp, 0, elemLen); - if(pDataA) - cpGFpxCopyToChunk(pTmp, pDataA, nsA, pGF); - - if(!cpGFpxSet(GFPE_DATA(pElm), pTmp, elemLen, pGF, USE_MONT_SPACE_REPRESENTATION)) - sts = ippStsOutOfRangeErr; - - cpGFpReleasePool(1, pGF); - } - - return sts; - } -} - -IPPFUN(IppStatus, ippsGFpSetElementOctString,(const Ipp8u* pStr, int strSize, IppsGFpElement* pElm, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pStr, pElm, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElm), ippStsContextMatchErr ); - - { - IppsGFpState* pBasicGF = cpGFpBasic(pGF); - int basicDeg = cpGFpBasicDegreeExtension(pGF); - int basicElemLen = GFP_FELEN(pBasicGF); - int basicSize = BITS2WORD8_SIZE(BITSIZE_BNU(GFP_MODULUS(pBasicGF),GFP_FELEN(pBasicGF))); - - BNU_CHUNK_T* pDataElm = GFPE_DATA(pElm); - - int deg, error; - /* set element to zero */ - cpGFpElementPadd(pDataElm, GFP_FELEN(pGF), 0); - - /* convert oct string to element (from low to high) */ - for(deg=0, error=0; deg GF_POOL_SIZE*GFP_PESIZE(pGFp)*BITSIZE(ipp32u), ippStsBadArgErr); - - { - Ipp32u moduloBitSize = GFP_FESIZE32(pGFp)*BITSIZE(ipp32u) - NLZ32u(GFP_MODULUS(pGFp)[GFP_FESIZE32(pGFp)-1]); - if(moduloBitSize>power) { - gfpFFelementPadd(0, GFPE_DATA(pR), GFP_FELEN(pGFp)); - SET_BIT(GFPE_DATA(pR), power); - } - else { - Ipp32u dataLen = BITS2WORD32_SIZE(power+1); - Ipp32u* pData = GFP_POOL(pGFp); - gfpFFelementPadd(0, pData, dataLen); - SET_BIT(pData, power); - gfpReduce(pData, dataLen, GFPE_DATA(pR), pGFp); - } - return ippStsNoErr; - } -} -#endif - - -IPPFUN(IppStatus, ippsGFpSetElementRandom,(IppBitSupplier rndFunc, void* pRndParam, - IppsGFpElement* pElm, IppsGFpState* pGF)) -{ - IPP_BAD_PTR2_RET(pElm, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElm), ippStsContextMatchErr ); - - cpGFpxRand(GFPE_DATA(pElm), pGF, rndFunc, pRndParam, USE_MONT_SPACE_REPRESENTATION); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpCpyElement, (const IppsGFpElement* pElmA, IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pElmA, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - cpGFpElementCopy(GFPE_DATA(pElmR), GFPE_DATA(pElmA), GFP_FELEN(pGF)); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpGetElement, (const IppsGFpElement* pElm, Ipp32u* pDataA, int nsA, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pElm, pDataA, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElm), ippStsContextMatchErr ); - IPP_BADARG_RET( 0>nsA, ippStsSizeErr ); - - { - int elemLen = GFP_FELEN(pGF); - BNU_CHUNK_T* pTmp = cpGFpGetPool(1, pGF); - - cpGFpxGet(pTmp, elemLen, GFPE_DATA(pElm), pGF, USE_MONT_SPACE_REPRESENTATION); - cpGFpxCopyFromChunk(pDataA, pTmp, pGF); - - cpGFpReleasePool(1, pGF); - return ippStsNoErr; - } -} - -IPPFUN(IppStatus, ippsGFpGetElementOctString,(const IppsGFpElement* pElm, Ipp8u* pStr, int strSize, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pStr, pElm, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElm), ippStsContextMatchErr ); - - { - IppsGFpState* pBasicGF = cpGFpBasic(pGF); - int basicDeg = cpGFpBasicDegreeExtension(pGF); - int basicElemLen = GFP_FELEN(pBasicGF); - int basicSize = BITS2WORD8_SIZE(BITSIZE_BNU(GFP_MODULUS(pBasicGF),GFP_FELEN(pBasicGF))); - - BNU_CHUNK_T* pDataElm = GFPE_DATA(pElm); - - int deg; - for(deg=0; degnsT, ippStsSizeErr ); - - if(termDegree>=0 && termDegree * GFP_FELEN(pGF) < GFPE_ROOM(pElm) ) - cpGFpxSetPolyTerm(GFPE_DATA(pElm), termDegree, pTerm, nsT, pGF, USE_MONT_SPACE_REPRESENTATION); - return ippStsNoErr; -} -#endif - -#if 0 -IPPFUN(IppStatus, ippsGFpGetPolyTerm, (const IppsGFpElement* pElm, int termDegree, Ipp32u* pTerm, int nsT, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pElm, pTerm, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElm), ippStsContextMatchErr ); - IPP_BADARG_RET( 0>nsT, ippStsSizeErr ); - - cpGFpElementPadd(pTerm, nsT, 0); - if(termDegree>=0 && termDegree * GFP_FELEN(pGF) < GFPE_ROOM(pElm) ) - cpGFpxGetPolyTerm(pTerm, nsT, GFPE_DATA(pElm), termDegree, pGF, USE_MONT_SPACE_REPRESENTATION); - return ippStsNoErr; -} -#endif - -IPPFUN(IppStatus, ippsGFpConj,(const IppsGFpElement* pElmA, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pElmA, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( 2!=GFP_DEGREE(pGF), ippStsBadArgErr ) - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - cpGFpxConj(GFPE_DATA(pElmR), GFPE_DATA(pElmA), pGF); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpNeg,(const IppsGFpElement* pElmA, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pElmA, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - pGF->neg(GFPE_DATA(pElmR), GFPE_DATA(pElmA), pGF); - return ippStsNoErr; -} - - -IPPFUN(IppStatus, ippsGFpInv,(const IppsGFpElement* pElmA, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pElmA, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - IPP_BADARG_RET( GFP_IS_ZERO(GFPE_DATA(pElmA),GFP_FELEN(pGF)), ippStsDivByZeroErr ); - - return NULL != cpGFpxInv(GFPE_DATA(pElmR), GFPE_DATA(pElmA), pGF)? ippStsNoErr : ippStsBadArgErr; -} - - -IPPFUN(IppStatus, ippsGFpSqrt,(const IppsGFpElement* pElmA, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pElmA, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFP_IS_BASIC(pGF), ippStsBadArgErr ) - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - return cpGFpSqrt(GFPE_DATA(pElmR), GFPE_DATA(pElmA), pGF)? ippStsNoErr : ippStsQuadraticNonResidueErr; -} - - -IPPFUN(IppStatus, ippsGFpAdd,(const IppsGFpElement* pElmA, const IppsGFpElement* pElmB, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR4_RET(pElmA, pElmB, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmB), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - pGF->add(GFPE_DATA(pElmR), GFPE_DATA(pElmA), GFPE_DATA(pElmB), pGF); - return ippStsNoErr; -} - - -IPPFUN(IppStatus, ippsGFpSub,(const IppsGFpElement* pElmA, const IppsGFpElement* pElmB, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR4_RET(pElmA, pElmB, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmB), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - pGF->sub(GFPE_DATA(pElmR), GFPE_DATA(pElmA), GFPE_DATA(pElmB), pGF); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpMul,(const IppsGFpElement* pElmA, const IppsGFpElement* pElmB, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR4_RET(pElmA, pElmB, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmB), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - pGF->mul(GFPE_DATA(pElmR), GFPE_DATA(pElmA), GFPE_DATA(pElmB), pGF); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpSqr,(const IppsGFpElement* pElmA, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR3_RET(pElmA, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - pGF->sqr(GFPE_DATA(pElmR), GFPE_DATA(pElmA), pGF); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpAdd_GFpE,(const IppsGFpElement* pElmA, const IppsGFpElement* pGroundElmB, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR4_RET(pElmA, pGroundElmB, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( GFP_IS_BASIC(pGF), ippStsBadArgErr ) - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pGroundElmB), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - cpGFpxAdd_GFE(GFPE_DATA(pElmR), GFPE_DATA(pElmA), GFPE_DATA(pGroundElmB), pGF); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpSub_GFpE,(const IppsGFpElement* pElmA, const IppsGFpElement* pGroundElmB, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR4_RET(pElmA, pGroundElmB, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( GFP_IS_BASIC(pGF), ippStsBadArgErr ) - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pGroundElmB), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - cpGFpxSub_GFE(GFPE_DATA(pElmR), GFPE_DATA(pElmA), GFPE_DATA(pGroundElmB), pGF); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpMul_GFpE,(const IppsGFpElement* pElmA, const IppsGFpElement* pGroundElmB, - IppsGFpElement* pElmR, IppsGFpState* pGF)) -{ - IPP_BAD_PTR4_RET(pElmA, pGroundElmB, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( GFP_IS_BASIC(pGF), ippStsBadArgErr ) - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pGroundElmB), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - cpGFpxMul_GFE(GFPE_DATA(pElmR), GFPE_DATA(pElmA), GFPE_DATA(pGroundElmB), pGF); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpExp,(const IppsGFpElement* pElmA, const IppsBigNumState* pE, - IppsGFpElement* pElmR, IppsGFpState* pGF, - Ipp8u* pScratchBuffer)) -{ - IPP_BAD_PTR4_RET(pElmA, pE, pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmA), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - IPP_BADARG_RET( !BN_VALID_ID(pE), ippStsContextMatchErr ); - IPP_BADARG_RET( BN_SIZE(pE) > GFP_FELEN(pGF), ippStsRangeErr ); - - cpGFpxExp(GFPE_DATA(pElmR), GFPE_DATA(pElmA), BN_NUMBER(pE), BN_SIZE(pE), pGF, pScratchBuffer); - - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpMultiExp,(const IppsGFpElement* const ppElmA[], const IppsBigNumState* const ppE[], int nItems, - IppsGFpElement* pElmR, IppsGFpState* pGF, - Ipp8u* pScratchBuffer)) -{ - IPP_BAD_PTR2_RET(pElmR, pGF); - pGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGF), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pElmR), ippStsContextMatchErr ); - - IPP_BAD_PTR2_RET(ppElmA, ppE); - - if(nItems==1) - return ippsGFpExp(ppElmA[0], ppE[0], pElmR, pGF, pScratchBuffer); - - else { - int n; - for(n=0; n GFP_FELEN(pGF), ippStsRangeErr ); - } - - if(NULL==pScratchBuffer) { - BNU_CHUNK_T* pTmpR = cpGFpGetPool(1, pGF); - cpGFpxExp(GFPE_DATA(pElmR), GFPE_DATA(ppElmA[0]), BN_NUMBER(ppE[0]), BN_SIZE(ppE[0]), pGF, 0); - for(n=1; n=nScalars)||(nScalars>LOG2_CACHE_LINE_SIZE), ippStsBadArgErr); - - { - int pointDataSize = ECP_FELEN(pEC)*sizeof(BNU_CHUNK_T); - - /* get window_size */ - #if 0 - int w = (nScalars==1)? cpEcGFpGetOptimalWinSize(orderBitSize) : /* use optimal window size, if single-scalar operation */ - nScalars; /* or pseudo-oprimal if multi-scalar operation */ - #endif - int w = (nScalars==1)? 5 : nScalars; - - /* number of table entries */ - int nPrecomputed = 1<ECP_ORDBITSIZE(pEC), ippStsRangeErr) - - ECP_ORDBITSIZE(pEC) = inOrderBitSize; - ZEXPAND_COPY_BNU((Ipp32u*)ECP_R(pEC), BITS_BNU_CHUNK(inOrderBitSize)*(int)(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)), pOrder,ordLen); - } - - if(pCofactor) { - int cofactorOrderBitSize; - FIX_BNU(pCofactor, cofactorLen); - cofactorOrderBitSize = BITSIZE_BNU32(pCofactor, cofactorLen); - IPP_BADARG_RET(cofactorOrderBitSize>elemLen*BITSIZE(BNU_CHUNK_T), ippStsRangeErr) - cofactorLen = BITS2WORD32_SIZE(cofactorOrderBitSize); - ZEXPAND_COPY_BNU((Ipp32u*)ECP_COFACTOR(pEC), BITS_BNU_CHUNK(cofactorOrderBitSize)*(int)(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)), pCofactor,cofactorLen); - } - - return ippStsNoErr; - } -} - -IPPFUN(IppStatus, ippsGFpECGet,(const IppsGFpECState* pEC, - const IppsGFpState** ppGF, - IppsGFpElement* pA, IppsGFpElement* pB, - IppsGFpElement* pX, IppsGFpElement* pY, - const Ipp32u** ppOrder, int* pOrderLen, - const Ipp32u** ppCofactor, int* pCofactorLen)) -{ - IPP_BAD_PTR1_RET(pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - - { - const IppsGFpState* pGF = ECP_GFP(pEC); - Ipp32u elementSize = GFP_FELEN(pGF); - - if(ppGF) { - *ppGF = pGF; - } - - if(pA) { - IPP_BADARG_RET( !GFPE_TEST_ID(pA), ippStsContextMatchErr ); - cpGFpElementCopy(GFPE_DATA(pA), ECP_A(pEC), elementSize); - } - if(pB) { - IPP_BADARG_RET( !GFPE_TEST_ID(pB), ippStsContextMatchErr ); - cpGFpElementCopy(GFPE_DATA(pB), ECP_B(pEC), elementSize); - } - - if(pX) { - IPP_BADARG_RET( !GFPE_TEST_ID(pX), ippStsContextMatchErr ); - cpGFpElementCopy(GFPE_DATA(pX), ECP_G(pEC), elementSize); - } - if(pY) { - IPP_BADARG_RET( !GFPE_TEST_ID(pY), ippStsContextMatchErr ); - cpGFpElementCopy(GFPE_DATA(pY), ECP_G(pEC)+elementSize, elementSize); - } - - if(ppOrder) { - *ppOrder = (Ipp32u*)ECP_R(pEC); - } - if(pOrderLen) { - *pOrderLen = BITS2WORD32_SIZE(ECP_ORDBITSIZE(pEC)); - } - - if(ppCofactor) { - *ppCofactor = (Ipp32u*)ECP_COFACTOR(pEC); - } - if(pCofactorLen) { - int cofactorLen = GFP_FELEN32(pGF); - FIX_BNU((Ipp32u*)ECP_COFACTOR(pEC), cofactorLen); - *pCofactorLen = cofactorLen; - } - - return ippStsNoErr; - } -} - -IPPFUN(IppStatus, ippsGFpECVerify,(IppECResult* pResult, IppsGFpECState* pEC, Ipp8u* pScratchBuffer)) -{ - IPP_BAD_PTR2_RET(pEC, pResult); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - - *pResult = ippECValid; - - { - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - /* - // check discriminant ( 4*A^3 + 27*B^2 != 0 mod P) - */ - if(ippECValid == *pResult) { - BNU_CHUNK_T* pT = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pU = cpGFpGetPool(1, pGF); - - if(EPID_PARAMS(pEC)) - cpGFpElementPadd(pT, elemLen, 0); /* T = 4*A^3 = 0 */ - else { - pGF->add(pT, ECP_A(pEC), ECP_A(pEC), pGF); /* T = 4*A^3 */ - pGF->sqr(pT, pT, pGF); - pGF->mul(pT, ECP_A(pEC), pT, pGF); - } - - pGF->add(pU, ECP_B(pEC), ECP_B(pEC), pGF); /* U = 9*B^2 */ - pGF->add(pU, pU, ECP_B(pEC), pGF); - pGF->sqr(pU, pU, pGF); - - pGF->add(pT, pU, pT, pGF); /* T += 3*U */ - pGF->add(pT, pU, pT, pGF); - pGF->add(pT, pU, pT, pGF); - - *pResult = GFP_IS_ZERO(pT, elemLen)? ippECIsZeroDiscriminant: ippECValid; - - cpGFpReleasePool(2, pGF); - } - - /* - // check base point and it order - */ - if(ippECValid == *pResult) { - IppsGFpECPoint G; - cpEcGFpInitPoint(&G, ECP_G(pEC), ECP_AFFINE_POINT|ECP_FINITE_POINT, pEC); - - /* check G != infinity */ - *pResult = cpEcGFpIsProjectivePointAtInfinity(&G, elemLen)? ippECPointIsAtInfinite : ippECValid; - - /* check G lies on EC */ - if(ippECValid == *pResult) - *pResult = cpEcGFpIsPointOnCurve(&G, pEC)? ippECValid : ippECPointIsNotValid; - - /* check Gorder*G = infinity */ - if(ippECValid == *pResult) { - IppsGFpECPoint T; - cpEcGFpInitPoint(&T, cpEcGFpGetPool(1, pEC),0, pEC); - - cpEcGFpMulPoint(&T, &G, ECP_R(pEC), BITS_BNU_CHUNK(ECP_ORDBITSIZE(pEC)), pEC, pScratchBuffer); - *pResult = cpEcGFpIsProjectivePointAtInfinity(&T, elemLen)? ippECValid : ippECInvalidOrder; - - cpEcGFpReleasePool(1, pEC); - } - } - - return ippStsNoErr; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecpoint.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecpoint.c deleted file mode 100644 index d1901b3372..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecpoint.c +++ /dev/null @@ -1,426 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Intel(R) Performance Primitives. Cryptography Primitives. -// EC over GF(p) Operations -// -// Context: -// ippsGFpECPointGetSize() -// ippsGFpECPointInit() -// -// ippsGFpECSetPointAtInfinity() -// ippsGFpECSetPoint() -// ippsGFpECMakePoint() -// ippsGFpECSetPointRandom() -// ippsGFpECSetPointHash() -// ippsGFpECGetPoint() -// ippsGFpECCpyPoint() -// -// ippsGFpECCmpPoint() -// ippsGFpECTstPoint() -// ippsGFpECNegPoint() -// ippsGFpECAddPoint() -// ippsGFpECMulPoint() -// -// -*/ - -#include "owncpepid.h" - -#include "pcpgfpecstuff.h" -#include "pcpgfphashstuff.h" - - -IPPFUN(IppStatus, ippsGFpECPointGetSize,(const IppsGFpECState* pEC, int* pSizeInBytes)) -{ - IPP_BAD_PTR2_RET(pEC, pSizeInBytes); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - - { - int elemLen = GFP_FELEN(ECP_GFP(pEC)); - *pSizeInBytes = sizeof(IppsGFpECPoint) - +elemLen*sizeof(BNU_CHUNK_T) /* X */ - +elemLen*sizeof(BNU_CHUNK_T) /* Y */ - +elemLen*sizeof(BNU_CHUNK_T);/* Z */ - return ippStsNoErr; - } -} - - -IPPFUN(IppStatus, ippsGFpECPointInit,(const IppsGFpElement* pX, const IppsGFpElement* pY, - IppsGFpECPoint* pPoint, IppsGFpECState* pEC)) -{ - IPP_BAD_PTR2_RET(pPoint, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - - { - Ipp8u* ptr = (Ipp8u*)pPoint; - int elemLen = GFP_FELEN(ECP_GFP(pEC)); - - ECP_POINT_ID(pPoint) = idCtxGFPPoint; - ECP_POINT_FLAGS(pPoint) = 0; - ECP_POINT_FELEN(pPoint) = elemLen; - ptr += sizeof(IppsGFpECPoint); - ECP_POINT_DATA(pPoint) = (BNU_CHUNK_T*)(ptr); - - if(pX && pY) - return ippsGFpECSetPoint(pX, pY, pPoint, pEC); - else { - cpEcGFpSetProjectivePointAtInfinity(pPoint, elemLen); - return ippStsNoErr; - } - } -} - - -IPPFUN(IppStatus, ippsGFpECSetPointAtInfinity,(IppsGFpECPoint* pPoint, IppsGFpECState* pEC)) -{ - IPP_BAD_PTR2_RET(pPoint, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pPoint), ippStsContextMatchErr ); - - cpEcGFpSetProjectivePointAtInfinity(pPoint, GFP_FELEN(ECP_GFP(pEC))); - return ippStsNoErr; -} - - -IPPFUN(IppStatus, ippsGFpECSetPoint,(const IppsGFpElement* pX, const IppsGFpElement* pY, - IppsGFpECPoint* pPoint, - IppsGFpECState* pEC)) -{ - IPP_BAD_PTR2_RET(pPoint, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pPoint), ippStsContextMatchErr ); - - IPP_BAD_PTR2_RET(pX, pY); - IPP_BADARG_RET( !GFPE_TEST_ID(pX), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pY), ippStsContextMatchErr ); - - cpEcGFpSetAffinePoint(pPoint, GFPE_DATA(pX), GFPE_DATA(pY), pEC); - return ippStsNoErr; -} - - -IPPFUN(IppStatus, ippsGFpECMakePoint,(const IppsGFpElement* pX, IppsGFpECPoint* pPoint, IppsGFpECState* pEC)) -{ - IPP_BAD_PTR3_RET(pX, pPoint, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFP_IS_BASIC(ECP_GFP(pEC)), ippStsBadArgErr ); - IPP_BADARG_RET( !GFPE_TEST_ID(pX), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pPoint), ippStsContextMatchErr ); - - return cpEcGFpMakePoint(pPoint, GFPE_DATA(pX), pEC)? ippStsNoErr : ippStsQuadraticNonResidueErr; -} - - -IPPFUN(IppStatus, ippsGFpECSetPointRandom,(IppBitSupplier rndFunc, void* pRndParam, - IppsGFpECPoint* pPoint, IppsGFpECState* pEC, - Ipp8u* pScratchBuffer)) -{ - IPP_BAD_PTR2_RET(pPoint, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pPoint), ippStsContextMatchErr ); - - IPP_BAD_PTR1_RET(rndFunc); - - { - IppsGFpState* pGF = ECP_GFP(pEC); - - if( GFP_IS_BASIC(pGF) ) { - BNU_CHUNK_T* pElm = cpGFpGetPool(1, pGF); - - do { - /* get random X */ - cpGFpRand(pElm, pGF, rndFunc, pRndParam, USE_MONT_SPACE_REPRESENTATION); - } while( !cpEcGFpMakePoint(pPoint, pElm, pEC) ); - - cpGFpReleasePool(1, pGF); - - /* R = cofactor*R */ - cpEcGFpMulPoint(pPoint, pPoint, ECP_COFACTOR(pEC), GFP_FELEN(pGF), pEC, pScratchBuffer); - - return ippStsNoErr; - } - - else { - /* number of bits and dwords being begerated */ - int generatedBits = ECP_ORDBITSIZE(pEC) + GF_RAND_ADD_BITS; - int generatedLen = BITS_BNU_CHUNK(generatedBits); - - /* allocate random exponent */ - int poolElements = (generatedLen + GFP_PELEN(pGF) -1) / GFP_PELEN(pGF); - BNU_CHUNK_T* pExp = cpGFpGetPool(poolElements, pGF); - - int nsE; - - /* setup copy of the base point */ - IppsGFpECPoint G; - cpEcGFpInitPoint(&G, ECP_G(pEC),ECP_AFFINE_POINT|ECP_FINITE_POINT, pEC); - - /* get random bits */ - rndFunc((Ipp32u*)pExp, generatedBits, pRndParam); - /* reduce with respect to order value */ - nsE = cpMod_BNU(pExp, generatedLen, ECP_R(pEC), BITS_BNU_CHUNK(ECP_ORDBITSIZE(pEC))); - - /* compute random point */ - cpEcGFpMulPoint(pPoint, &G, pExp, nsE, pEC, pScratchBuffer); - - cpGFpReleasePool(poolElements, pGF); - - return ippStsNoErr; - } - } -} - - -IPPFUN(IppStatus, ippsGFpECGetPoint,(const IppsGFpECPoint* pPoint, - IppsGFpElement* pX, IppsGFpElement* pY, - IppsGFpECState* pEC)) -{ - IPP_BAD_PTR2_RET(pPoint, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pPoint), ippStsContextMatchErr ); - - IPP_BADARG_RET( !IS_ECP_FINITE_POINT(pPoint), ippStsPointAtInfinity); - - IPP_BADARG_RET( pX && !GFPE_TEST_ID(pX), ippStsContextMatchErr ); - IPP_BADARG_RET( pY && !GFPE_TEST_ID(pY), ippStsContextMatchErr ); - - cpEcGFpGetAffinePoint((pX)? GFPE_DATA(pX):0, (pY)?GFPE_DATA(pY):0, pPoint, pEC); - return ippStsNoErr; -} - - -IPPFUN(IppStatus, ippsGFpECCpyPoint,(const IppsGFpECPoint* pA, - IppsGFpECPoint* pR, - IppsGFpECState* pEC)) -{ - IPP_BAD_PTR3_RET(pA, pR, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pA), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pR), ippStsContextMatchErr ); - - cpEcGFpCopyPoint(pR, pA, GFP_FELEN(ECP_GFP(pEC))); - return ippStsNoErr; -} - - -IPPFUN(IppStatus, ippsGFpECCmpPoint,(const IppsGFpECPoint* pP, const IppsGFpECPoint* pQ, - IppECResult* pResult, - IppsGFpECState* pEC)) -{ - IPP_BAD_PTR4_RET(pP, pQ, pResult, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pP), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pQ), ippStsContextMatchErr ); - - *pResult = cpEcGFpIsPointEquial(pP, pQ, pEC)? ippECPointIsEqual : ippECPointIsNotEqual; - return ippStsNoErr; -} - -#if 0 -IPPFUN(IppStatus, ippsGFpECTstPoint,(const IppsGFpECPoint* pP, - IppECResult* pResult, - IppsGFpECState* pEC, - Ipp8u* pScratchBuffer)) -{ - IPP_BAD_PTR3_RET(pP, pResult, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pP), ippStsContextMatchErr ); - - { - Ipp32u elemLen = GFP_FELEN(ECP_GFP(pEC)); - - if( cpEcGFpIsProjectivePointAtInfinity(pP, elemLen) ) - *pResult = ippECPointIsAtInfinite; - else if( !cpEcGFpIsPointOnCurve(pP, pEC) ) - *pResult = ippECPointIsNotValid; - else { - IppsGFpECPoint T; - cpEcGFpInitPoint(&T, cpEcGFpGetPool(1, pEC),0, pEC); - cpEcGFpMulPoint(&T, pP, ECP_R(pEC), BITS_BNU_CHUNK(ECP_ORDBITSIZE(pEC)), pEC, pScratchBuffer); - *pResult = cpEcGFpIsProjectivePointAtInfinity(&T, elemLen)? ippECValid : ippECPointOutOfGroup; - cpEcGFpReleasePool(1, pEC); - } - - return ippStsNoErr; - } -} -#endif - -/* -// Version below is based on observation has been done by Zhao Hui Du. -// See "Opportunity to improve Intel(R) EPID 2.0 performance" Gentry Mark e-mail 1/23/20015. -// -// Shortly: In case of Intel(R) EPID 2.0 EC parameters all EC points belongs to G1. -*/ -IPPFUN(IppStatus, ippsGFpECTstPoint,(const IppsGFpECPoint* pP, - IppECResult* pResult, - IppsGFpECState* pEC, - Ipp8u* pScratchBuffer)) -{ - IPP_BAD_PTR3_RET(pP, pResult, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pP), ippStsContextMatchErr ); - - { - Ipp32u elemLen = GFP_FELEN(ECP_GFP(pEC)); - - if( cpEcGFpIsProjectivePointAtInfinity(pP, elemLen) ) - *pResult = ippECPointIsAtInfinite; - else if( !cpEcGFpIsPointOnCurve(pP, pEC) ) - *pResult = ippECPointIsNotValid; - else { - if(EPID_PARAMS(pEC)&&GFP_IS_BASIC(ECP_GFP(pEC))) - *pResult = ippECValid; - else { - IppsGFpECPoint T; - cpEcGFpInitPoint(&T, cpEcGFpGetPool(1, pEC),0, pEC); - cpEcGFpMulPoint(&T, pP, ECP_R(pEC), BITS_BNU_CHUNK(ECP_ORDBITSIZE(pEC)), pEC, pScratchBuffer); - *pResult = cpEcGFpIsProjectivePointAtInfinity(&T, elemLen)? ippECValid : ippECPointOutOfGroup; - cpEcGFpReleasePool(1, pEC); - } - } - - return ippStsNoErr; - } -} - - -IPPFUN(IppStatus, ippsGFpECNegPoint,(const IppsGFpECPoint* pP, - IppsGFpECPoint* pR, - IppsGFpECState* pEC)) -{ - IPP_BAD_PTR3_RET(pP, pR, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pP), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pR), ippStsContextMatchErr ); - - cpEcGFpNegPoint(pR, pP, pEC); - return ippStsNoErr; -} - - -IPPFUN(IppStatus, ippsGFpECAddPoint,(const IppsGFpECPoint* pP, const IppsGFpECPoint* pQ, IppsGFpECPoint* pR, - IppsGFpECState* pEC)) -{ - IPP_BAD_PTR4_RET(pP, pQ, pR, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pP), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pQ), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pR), ippStsContextMatchErr ); - - cpEcGFpAddPoint(pR, pP, pQ, pEC); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpECMulPoint,(const IppsGFpECPoint* pP, - const IppsBigNumState* pN, - IppsGFpECPoint* pR, - IppsGFpECState* pEC, - Ipp8u* pScratchBuffer)) -{ - IPP_BAD_PTR3_RET(pP, pR, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pP), ippStsContextMatchErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pR), ippStsContextMatchErr ); - - IPP_BAD_PTR1_RET(pN); - pN = (IppsBigNumState*)( IPP_ALIGNED_PTR(pN, BN_ALIGNMENT) ); - /* test if N >= order */ - IPP_BADARG_RET(0<=cpCmp_BNU(BN_NUMBER(pN), BN_SIZE(pN), ECP_R(pEC), BITS_BNU_CHUNK(ECP_ORDBITSIZE(pEC))), ippStsOutOfRangeErr); - - cpEcGFpMulPoint(pR, pP, BN_NUMBER(pN), BN_SIZE(pN), pEC, pScratchBuffer); - return ippStsNoErr; -} - -IPPFUN(IppStatus, ippsGFpECSetPointHash,(Ipp32u hdr, const Ipp8u* pMsg, int msgLen, IppHashID hashID, IppsGFpECPoint* pPoint, - IppsGFpECState* pEC, - Ipp8u* pScratchBuffer)) -{ - IPP_BAD_PTR2_RET(pPoint, pEC); - pEC = (IppsGFpECState*)( IPP_ALIGNED_PTR(pEC, ECGFP_ALIGNMENT) ); - IPP_BADARG_RET( !ECP_TEST_ID(pEC), ippStsContextMatchErr ); - IPP_BADARG_RET( !GFP_IS_BASIC(ECP_GFP(pEC)), ippStsBadArgErr ); - IPP_BADARG_RET( !ECP_POINT_TEST_ID(pPoint), ippStsContextMatchErr ); - IPP_BADARG_RET( !cpTestHashID(hashID), ippStsBadArgErr); - - { - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - - Ipp8u md[IPP_SHA512_DIGEST_BITSIZE/BYTESIZE]; - int hashLen = cpHashLength(hashID); - BNU_CHUNK_T hashVal[BITS_BNU_CHUNK(IPP_SHA512_DIGEST_BITSIZE)+1]; - int hashValLen; - - Ipp8u hashCtx[sizeof(IppsSHA512State)+SHA512_ALIGNMENT-1]; - cpHashInit(hashCtx, hashID); - - { - BNU_CHUNK_T* pPoolElm = cpGFpGetPool(1, pGF); - - /* convert hdr => hdrStr */ - BNU_CHUNK_T locHdr = (BNU_CHUNK_T)hdr; - Ipp8u hdrOctStr[sizeof(hdr/*locHdr*/)]; - cpToOctStr_BNU(hdrOctStr, sizeof(hdrOctStr), &locHdr, 1); - - /* compute md = hash(hrd||msg) */ - cpHashUpdate(hdrOctStr, sizeof(hdrOctStr), hashCtx, hashID); - cpHashUpdate(pMsg, msgLen, hashCtx, hashID); - cpHashFinal(md, hashCtx, hashID); - - /* convert hash into the integer */ - hashValLen = cpFromOctStr_BNU(hashVal, md, hashLen); - hashValLen = cpMod_BNU(hashVal, hashValLen, pModulus, elemLen); - cpGFpSet(pPoolElm, hashVal, hashValLen, pGF, USE_MONT_SPACE_REPRESENTATION); - - if( cpEcGFpMakePoint(pPoint, pPoolElm, pEC)) { - /* set y-coordinate of the point (positive or negative) */ - BNU_CHUNK_T* pY = ECP_POINT_Y(pPoint); - if(pY[0] & 1) - cpGFpNeg(pY, pY, pGF); - - /* update point if cofactor>1 */ - cpEcGFpMulPoint(pPoint, pPoint, ECP_COFACTOR(pEC), GFP_FELEN(pGF), pEC, pScratchBuffer); - - cpGFpReleasePool(1, pGF); - return ippStsNoErr; - } - } - - cpGFpReleasePool(1, pGF); - return ippStsQuadraticNonResidueErr; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecpointstuff.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecpointstuff.c deleted file mode 100644 index 978da1b649..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecpointstuff.c +++ /dev/null @@ -1,1227 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Intel(R) Performance Primitives. Cryptography Primitives. -// Internal EC over GF(p^m) basic Definitions & Function Prototypes -// -// Context: -// cpEcGFpMakePoint() -// cpEcGFpGetAffinePoint -// -// cpEcGFpIsPointEquial() -// cpEcGFpIsPointOnCurve() -// -// cpEcGFpNegPoint() -// cpEcGFpDblPoint() -// cpEcGFpAddPoint() -// cpEcGFpMulPoint() -// -// -// -*/ - -#include "owncpepid.h" - -#include "pcpgfpecstuff.h" -//#include "pcptool.h" - - -int cpEcGFpMakePoint(IppsGFpECPoint* pPoint, const BNU_CHUNK_T* pElm, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - BNU_CHUNK_T* pX = ECP_POINT_X(pPoint); - BNU_CHUNK_T* pY = ECP_POINT_Y(pPoint); - BNU_CHUNK_T* pZ = ECP_POINT_Z(pPoint); - - /* set x-coordinate */ - cpGFpElementCopy(pX, pElm, elemLen); - - /* T = X^3 + A*X + B */ - cpGFpxSqr(pY, pX, pGF); - pGF->mul(pY, pY, pX, pGF); - if(!EPID_PARAMS(pEC)) { - pGF->mul(pZ, ECP_A(pEC), pX, pGF); - pGF->add(pY, pY, pZ, pGF); - } - pGF->add(pY, pY, ECP_B(pEC), pGF); - - /* set z-coordinate =1 */ - cpGFpElementCopyPadd(pZ, elemLen, MNT_1(GFP_MONT(pGF)), GFP_FELEN(pGF)); - - /* Y = sqrt(Y) */ - if( cpGFpSqrt(pY, pY, pGF) ) { - ECP_POINT_FLAGS(pPoint) = ECP_AFFINE_POINT | ECP_FINITE_POINT; - return 1; - } - else { - cpEcGFpSetProjectivePointAtInfinity(pPoint, elemLen); - //ECP_POINT_FLAGS(pPoint) = 0; - return 0; - } -} - -#if ( ECP_PROJECTIVE_COORD == JACOBIAN ) -int cpEcGFpGetAffinePoint(BNU_CHUNK_T* pX, BNU_CHUNK_T* pY, const IppsGFpECPoint* pPoint, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - if( !IS_ECP_FINITE_POINT(pPoint) ) { - //GFP_ZERO(pX, elemLen); - //if( GFP_IS_ZERO(ECP_B(pEC), elemLen) ) - // GFP_ONE(pY, elemLen); - //else - // GFP_ZERO(pY, elemLen); - //return; - return 0; - } - - /* case Z == 1 */ - if( IS_ECP_AFFINE_POINT(pPoint) ) { - if(pX) - cpGFpElementCopy(pX, ECP_POINT_X(pPoint), elemLen); - if(pY) - cpGFpElementCopy(pY, ECP_POINT_Y(pPoint), elemLen); - } - - /* case Z != 1 */ - else { - /* T = (1/Z)*(1/Z) */ - BNU_CHUNK_T* pT = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pZinv = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pU = cpGFpGetPool(1, pGF); - cpGFpxInv(pZinv, ECP_POINT_Z(pPoint), pGF); - pGF->sqr(pT, pZinv, pGF); - - if(pX) { - pGF->mul(pU, ECP_POINT_X(pPoint), pT, pGF); - cpGFpElementCopy(pX, pU, elemLen); - } - if(pY) { - pGF->mul(pT, pZinv, pT, pGF); - pGF->mul(pU, ECP_POINT_Y(pPoint), pT, pGF); - cpGFpElementCopy(pY, pU, elemLen); - } - - cpGFpReleasePool(3, pGF); - } - - return 1; -} -#endif - -#if ( ECP_PROJECTIVE_COORD == HOMOGENEOUS ) -int cpEcGFpGetAffinePoint(BNU_CHUNK_T* pX, BNU_CHUNK_T* pY, const IppsGFpECPoint* pPoint, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - if( !IS_ECP_FINITE_POINT(pPoint) ) { - return 0; - } - - /* case Z == 1 */ - if( IS_ECP_AFFINE_POINT(pPoint) ) { - if(pX) - cpGFpElementCopy(pX, ECP_POINT_X(pPoint), elemLen); - if(pY) - cpGFpElementCopy(pY, ECP_POINT_Y(pPoint), elemLen); - } - - /* case Z != 1 */ - else { - /* T = (1/Z) */ - BNU_CHUNK_T* pZinv = cpGFpGetPool(1, pGF); - cpGFpxInv(pZinv, ECP_POINT_Z(pPoint), pGF); - - if(pX) { - pGF->mul(pX, ECP_POINT_X(pPoint), pZinv, pGF); - } - if(pY) { - pGF->mul(pY, ECP_POINT_Y(pPoint), pZinv, pGF); - } - - cpGFpReleasePool(1, pGF); - } - - return 1; -} -#endif - -#if ( ECP_PROJECTIVE_COORD == JACOBIAN ) -int cpEcGFpIsPointEquial(const IppsGFpECPoint* pP, const IppsGFpECPoint* pQ, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - /* P or/and Q at Infinity */ - if( !IS_ECP_FINITE_POINT(pP) ) - return !IS_ECP_FINITE_POINT(pQ)? 1:0; - if( !IS_ECP_FINITE_POINT(pQ) ) - return !IS_ECP_FINITE_POINT(pP)? 1:0; - - /* Px==Qx && Py==Qy && Pz==Qz */ - if( GFP_EQ(ECP_POINT_Z(pP), ECP_POINT_Z(pQ), elemLen) - &&GFP_EQ(ECP_POINT_X(pP), ECP_POINT_X(pQ), elemLen) - &&GFP_EQ(ECP_POINT_Y(pP), ECP_POINT_Y(pQ), elemLen)) - return 1; - - else { - int isEqu = 1; - - BNU_CHUNK_T* pPtmp = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pQtmp = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pPz = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pQz = cpGFpGetPool(1, pGF); - - if(isEqu) { - /* Px*Qz^2 ~ Qx*Pz^2 */ - if( IS_ECP_AFFINE_POINT(pQ) ) /* Ptmp = Px * Qz^2 */ - cpGFpElementCopy(pPtmp, ECP_POINT_X(pP), elemLen); - else { - pGF->sqr(pQz, ECP_POINT_Z(pQ), pGF); - pGF->mul(pPtmp, ECP_POINT_X(pP), pQz, pGF); - } - if( IS_ECP_AFFINE_POINT(pP) ) /* Qtmp = Qx * Pz^2 */ - cpGFpElementCopy(pQtmp, ECP_POINT_X(pQ), elemLen); - else { - pGF->sqr(pPz, ECP_POINT_Z(pP), pGF); - pGF->mul(pQtmp, ECP_POINT_X(pQ), pPz, pGF); - } - isEqu = GFP_EQ(pPtmp, pQtmp, elemLen); - } - - if(isEqu) { - /* Py*Qz^3 ~ Qy*Pz^3 */ - if( IS_ECP_AFFINE_POINT(pQ) ) /* Ptmp = Py * Qz^3 */ - cpGFpElementCopy(pPtmp, ECP_POINT_Y(pP), elemLen); - else { - pGF->mul(pQz, ECP_POINT_Z(pQ), pQz, pGF); - pGF->mul(pPtmp, pQz, ECP_POINT_Y(pP), pGF); - } - if( IS_ECP_AFFINE_POINT(pP) ) /* Qtmp = Qy * Pz^3 */ - cpGFpElementCopy(pQtmp, ECP_POINT_Y(pQ), elemLen); - else { - pGF->mul(pPz, ECP_POINT_Z(pP), pPz, pGF); - pGF->mul(pQtmp, pPz, ECP_POINT_Y(pQ), pGF); - } - isEqu = GFP_EQ(pPtmp, pQtmp, elemLen); - } - - cpGFpReleasePool(4, pGF); - return isEqu; - } -} -#endif - -#if ( ECP_PROJECTIVE_COORD == HOMOGENEOUS ) -int cpEcGFpIsPointEquial(const IppsGFpECPoint* pP, const IppsGFpECPoint* pQ, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - /* P or/and Q at Infinity */ - if( !IS_ECP_FINITE_POINT(pP) ) - return !IS_ECP_FINITE_POINT(pQ)? 1:0; - if( !IS_ECP_FINITE_POINT(pQ) ) - return !IS_ECP_FINITE_POINT(pP)? 1:0; - - /* Px==Qx && Py==Qy && Pz==Qz */ - if( GFP_EQ(ECP_POINT_Z(pP), ECP_POINT_Z(pQ), elemLen) - &&GFP_EQ(ECP_POINT_X(pP), ECP_POINT_X(pQ), elemLen) - &&GFP_EQ(ECP_POINT_Y(pP), ECP_POINT_Y(pQ), elemLen)) - return 1; - - else { - int isEqu = 1; - - BNU_CHUNK_T* pPtmp = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pQtmp = cpGFpGetPool(1, pGF); - - if(isEqu) { - /* Px*Qz ~ Qx*Pz */ - if( IS_ECP_AFFINE_POINT(pQ) ) /* Ptmp = Px * Qz */ - cpGFpElementCopy(pPtmp, ECP_POINT_X(pP), elemLen); - else { - pGF->mul(pPtmp, ECP_POINT_X(pP), ECP_POINT_Z(pQ), pGF); - } - if( IS_ECP_AFFINE_POINT(pP) ) /* Qtmp = Qx * Pz */ - cpGFpElementCopy(pQtmp, ECP_POINT_X(pQ), elemLen); - else { - pGF->mul(pQtmp, ECP_POINT_X(pQ), ECP_POINT_Z(pP), pGF); - } - isEqu = GFP_EQ(pPtmp, pQtmp, elemLen); - } - - if(isEqu) { - /* Py*Qz ~ Qy*Pz */ - if( IS_ECP_AFFINE_POINT(pQ) ) /* Ptmp = Py * Qz */ - cpGFpElementCopy(pPtmp, ECP_POINT_Y(pP), elemLen); - else { - pGF->mul(pPtmp, ECP_POINT_Y(pP), ECP_POINT_Z(pQ), pGF); - } - if( IS_ECP_AFFINE_POINT(pP) ) /* Qtmp = Qy * Pz */ - cpGFpElementCopy(pQtmp, ECP_POINT_Y(pQ), elemLen); - else { - pGF->mul(pQtmp, ECP_POINT_Y(pQ), ECP_POINT_Z(pP), pGF); - } - isEqu = GFP_EQ(pPtmp, pQtmp, elemLen); - } - - cpGFpReleasePool(2, pGF); - return isEqu; - } -} -#endif - -#if ( ECP_PROJECTIVE_COORD == JACOBIAN ) -int cpEcGFpIsPointOnCurve(const IppsGFpECPoint* pPoint, IppsGFpECState* pEC) -{ - /* point at infinity belongs curve */ - if( !IS_ECP_FINITE_POINT(pPoint) ) - return 1; - - /* test that 0 == R = (Y^2) - (X^3 + A*X*(Z^4) + B*(Z^6)) */ - else { - int isOnCurve = 0; - - IppsGFpState* pGF = ECP_GFP(pEC); - - BNU_CHUNK_T* pX = ECP_POINT_X(pPoint); - BNU_CHUNK_T* pY = ECP_POINT_Y(pPoint); - BNU_CHUNK_T* pZ = ECP_POINT_Z(pPoint); - - BNU_CHUNK_T* pR = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pT = cpGFpGetPool(1, pGF); - - pGF->sqr(pR, pY, pGF); /* R = Y^2 */ - pGF->sqr(pT, pX, pGF); /* T = X^3 */ - pGF->mul(pT, pX, pT, pGF); - pGF->sub(pR, pR, pT, pGF); /* R -= T */ - - if( IS_ECP_AFFINE_POINT(pPoint) ) { - pGF->mul(pT, pX, ECP_A(pEC), pGF); /* T = A*X */ - pGF->sub(pR, pR, pT, pGF); /* R -= T */ - pGF->sub(pR, pR, ECP_B(pEC), pGF); /* R -= B */ - } - else { - BNU_CHUNK_T* pZ4 = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pZ6 = cpGFpGetPool(1, pGF); - - pGF->sqr(pZ6, pZ, pGF); /* Z^2 */ - pGF->sqr(pZ4, pZ6, pGF); /* Z^4 */ - pGF->mul(pZ6, pZ6, pZ4, pGF); /* Z^6 */ - - pGF->mul(pZ4, pZ4, pX, pGF); /* X*(Z^4) */ - pGF->mul(pZ4, pZ4, ECP_A(pEC), pGF); /* A*X*(Z^4) */ - pGF->mul(pZ6, pZ6, ECP_B(pEC), pGF); /* B*(Z^4) */ - - pGF->sub(pR, pR, pZ4, pGF); /* R -= A*X*(Z^4) */ - pGF->sub(pR, pR, pZ6, pGF); /* R -= B*(Z^6) */ - - cpGFpReleasePool(2, pGF); - } - - isOnCurve = GFP_IS_ZERO(pR, GFP_FELEN(pGF)); - cpGFpReleasePool(2, pGF); - return isOnCurve; - } -} -#endif - -#if ( ECP_PROJECTIVE_COORD == HOMOGENEOUS ) -int cpEcGFpIsPointOnCurve(const IppsGFpECPoint* pPoint, IppsGFpECState* pEC) -{ - /* point at infinity belongs curve */ - if( !IS_ECP_FINITE_POINT(pPoint) ) - return 1; - - /* test that 0 == R = ((Y^2)*Z) - (X^3 + A*X*(Z^2) + B*(Z^3)) */ - else { - int isOnCurve = 0; - - IppsGFpState* pGF = ECP_GFP(pEC); - - BNU_CHUNK_T* pX = ECP_POINT_X(pPoint); - BNU_CHUNK_T* pY = ECP_POINT_Y(pPoint); - BNU_CHUNK_T* pZ = ECP_POINT_Z(pPoint); - - BNU_CHUNK_T* pR = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pT = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pU = cpGFpGetPool(1, pGF); - - /* Right = X^3 + A*X*(Z^2) + B*(Z^3) = x^3 +(A*X + B*Z)*Z^2 */ - pGF->sqr(pR, pZ, pGF); /* R = Z^2 */ - pGF->mul(pT, pZ, ECP_B(pEC), pGF); /* T = Z*B */ - if(!EPID_PARAMS(pEC)) { - pGF->mul(pU, pX, ECP_A(pEC), pGF); /* U = X*A */ - pGF->add(pT, pT, pU, pGF); /* T = (A*X + B*Z) * Z^2 */ - } - pGF->mul(pT, pT, pR, pGF); - - pGF->sqr(pR, pX, pGF); /* R = X^3 */ - pGF->mul(pR, pR, pX, pGF); - - pGF->add(pR, pR, pT, pGF); /* R = X^3 + (A*X + B*Z) * Z^2 */ - - /* Left = (Y^2)*Z */ - pGF->sqr(pT, pY, pGF); - pGF->mul(pT, pT, pZ, pGF); - - pGF->sub(pR, pR, pT, pGF); /* Left - Right */ - - isOnCurve = GFP_IS_ZERO(pR, GFP_FELEN(pGF)); - - cpGFpReleasePool(3, pGF); - return isOnCurve; - } -} -#endif - -IppsGFpECPoint* cpEcGFpNegPoint (IppsGFpECPoint* pR, const IppsGFpECPoint* pP, IppsGFpECState* pEC) -{ - int elemLen = GFP_FELEN(ECP_GFP(pEC)); - IppsGFpState* pGF = ECP_GFP(pEC); - - if(pP!=pR) - cpEcGFpCopyPoint(pR, pP, elemLen); - - if( IS_ECP_FINITE_POINT(pR) ) - pGF->neg(ECP_POINT_Y(pR), ECP_POINT_Y(pR), pGF); - return pR; -} - -#if ( ECP_PROJECTIVE_COORD == JACOBIAN ) -/* general complexity = 6s+4m - epid complexity = 4s+3m -*/ -IppsGFpECPoint* cpEcGFpDblPoint (IppsGFpECPoint* pR, const IppsGFpECPoint* pP, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - BNU_CHUNK_T* pX = ECP_POINT_X(pP); - BNU_CHUNK_T* pY = ECP_POINT_Y(pP); - BNU_CHUNK_T* pZ = ECP_POINT_Z(pP); - - BNU_CHUNK_T* pU = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pM = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pS = cpGFpGetPool(1, pGF); - - /* M = 3*X^2 + A*Z^4 */ - pGF->sqr(pU, pX, pGF); /* s */ - pGF->add(pM, pU, pU, pGF); - pGF->add(pM, pU, pM, pGF); - if(!EPID_PARAMS(pEC)) { - if( IS_ECP_AFFINE_POINT(pP) ) - pGF->add(pM, ECP_A(pEC), pM, pGF); - else { - pGF->sqr(pU, pZ, pGF); /* s */ - pGF->sqr(pU, pU, pGF); /* s */ - pGF->mul(pU, ECP_A(pEC), pU, pGF); /* m */ - pGF->add(pM, pM, pU, pGF); - } - } - - /* U = 2*Y */ - pGF->add(pU, pY, pY, pGF); - - /* Rz = 2*Y*Z */ - if( IS_ECP_AFFINE_POINT(pP) ) - cpGFpElementCopy(ECP_POINT_Z(pR), pU, elemLen); - else - pGF->mul(ECP_POINT_Z(pR), pU, pZ, pGF); /* m */ - - /* S = X*(U^2) = 4*X*Y^2 */ - pGF->sqr(pU, pU, pGF); /* s */ - pGF->mul(pS, pX, pU, pGF); /* m */ - - /* Rx = M^2 - 2*S */ - pGF->sqr(ECP_POINT_X(pR),pM, pGF); /* s */ - pGF->sub(ECP_POINT_X(pR), ECP_POINT_X(pR), pS, pGF); - pGF->sub(ECP_POINT_X(pR), ECP_POINT_X(pR), pS, pGF); - - /* U = (U^2)/2 = (16*Y^4)/2 = 8*Y^4 */ - pGF->sqr(pU, pU, pGF); /* s */ - //cpGFpxHalve(pU, pU, pGF); - pGF->div2(pU, pU, pGF); - - /* Ry = M*(S - Rx) - U */ - pGF->sub(pS, pS, ECP_POINT_X(pR), pGF); - pGF->mul(pS, pM, pS, pGF); /* m */ - pGF->sub(ECP_POINT_Y(pR), pS, pU, pGF); - - //ECP_POINT_FLAGS(pR) = ECP_FINITE_POINT; - ECP_POINT_FLAGS(pR) = cpEcGFpIsProjectivePointAtInfinity(pR, elemLen)? 0 : ECP_FINITE_POINT; - - - cpGFpReleasePool(3, pGF); - - return pR; -} -#endif - -#if ( ECP_PROJECTIVE_COORD == HOMOGENEOUS ) -/* -// A = 3*X^2 + A*Z^2 -// B = Y*Z -// C = X*Y*B -// D = A^2 - 8*C -// new X = 2*B*D -// new Y = A*(4*C - D) - 8*(Y*B)^2 -// new Z = 8*B^3 -// -// general complexity = 5s+8m -// epid complexity = 4s+7m -*/ -IppsGFpECPoint* cpEcGFpDblPoint (IppsGFpECPoint* pR, const IppsGFpECPoint* pP, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - /* P at infinity => R at infinity */ - if( !IS_ECP_FINITE_POINT(pP) ) - cpEcGFpSetProjectivePointAtInfinity(pR, elemLen); - - else { - BNU_CHUNK_T* pA = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pB = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pC = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pD = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pT = cpGFpGetPool(1, pGF); - - BNU_CHUNK_T* pX = ECP_POINT_X(pR); - BNU_CHUNK_T* pY = ECP_POINT_Y(pR); - BNU_CHUNK_T* pZ = ECP_POINT_Z(pR); - if(pR!=pP) { - cpGFpElementCopy(pX, ECP_POINT_X(pP), elemLen); - cpGFpElementCopy(pY, ECP_POINT_Y(pP), elemLen); - cpGFpElementCopy(pZ, ECP_POINT_Z(pP), elemLen); - } - - /* A = 3*X^2 + A*Z^2 */ - pGF->sqr(pC, pX, pGF); /* s */ - pGF->add(pA, pC, pC, pGF); - pGF->add(pA, pA, pC, pGF); - if(!EPID_PARAMS(pEC)) { - pGF->sqr(pB, pZ, pGF); /* s */ - pGF->mul(pB, pB, ECP_A(pEC), pGF); /* m */ - pGF->add(pA, pA, pB, pGF); - } - - /* B = Y*Z */ - pGF->mul(pB, pY, pZ, pGF); /* m */ - - /* C = X*Y*B */ - pGF->mul(pC, pX, pY, pGF); /* m */ - pGF->mul(pC, pC, pB, pGF); /* m */ - - /* D = A^2 - 8*C */ - pGF->sqr(pT, pA, pGF); /* s */ - pGF->add(pD, pC, pC, pGF); - pGF->add(pD, pD, pD, pGF); - pGF->add(pD, pD, pD, pGF); - pGF->sub(pD, pT, pD, pGF); - - /* X = 2*B*D */ - pGF->mul(pX, pB, pD, pGF); /* m */ - pGF->add(pX, pX, pX, pGF); - - pGF->add(pB, pB, pB, pGF); /* B = 2*B */ - - /* Y = A*(4*C-D)-8(Y*B)^2 */ - pGF->mul(pT, pY, pB, pGF); /* m */ - pGF->sqr(pT, pT, pGF); /* s */ /* T = 4*(Y*B)^2 */ - pGF->add(pY, pC, pC, pGF); - pGF->add(pY, pY, pY, pGF); - pGF->sub(pY, pY, pD, pGF); - pGF->mul(pY, pY, pA, pGF); /* m */ - pGF->sub(pY, pY, pT, pGF); - pGF->sub(pY, pY, pT, pGF); - - /* Z = 8*B^3 = (2*B)^3 */ - pGF->sqr(pZ, pB, pGF); /* s */ - pGF->mul(pZ, pZ, pB, pGF); /* m */ - - ECP_POINT_FLAGS(pR) = ECP_FINITE_POINT; - - cpGFpReleasePool(5, pGF); - } - - return pR; -} -#endif - -#if 0 -#if ( ECP_PROJECTIVE_COORD == JACOBIAN ) -/* -// initial k-Doubling routine: -// -// for(i=0; i R at infinity */ - if( !IS_ECP_FINITE_POINT(pP) ) - return cpEcGFpSetProjectivePointAtInfinity(pR, elemLen); - - else { - BNU_CHUNK_T* pW = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pM = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pS = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pT = cpGFpGetPool(1, pGF); - - BNU_CHUNK_T* pX = ECP_POINT_X(pR); - BNU_CHUNK_T* pY = ECP_POINT_Y(pR); - BNU_CHUNK_T* pZ = ECP_POINT_Z(pR); - if(pR!=pP) { - cpGFpElementCopy(pX, ECP_POINT_X(pP), elemLen); - cpGFpElementCopy(pY, ECP_POINT_Y(pP), elemLen); - cpGFpElementCopy(pZ, ECP_POINT_Z(pP), elemLen); - } - - /* M = 3*X^2 + A*Z^4 */ - pGF->sqr(pS, pX, pGF); /* s */ - pGF->add(pM, pS, pS, pGF); - pGF->add(pM, pM, pS, pGF); - if(!EPID_PARAMS(pEC)) { /* W = A*Z^4 */ - pGF->sqr(pW, pZ, pGF); /* s */ - pGF->sqr(pW, pW, pGF); /* s */ - pGF->mul(pW, pW, ECP_A(pEC), pGF); /* m */ - - pGF->add(pM, pM, pW, pGF); - } - - /* T = 2*Y */ - pGF->add(pT, pY, pY, pGF); - - /* new Z = 2*Y*Z */ - pGF->mul(pZ, pT, pZ, pGF); /* m */ - - /* S = X*(T^2) = 4*X*Y^2 */ - pGF->sqr(pT, pT, pGF); /* s */ - pGF->mul(pS, pX, pT, pGF); /* m */ - - /* T = (T^2)/2 = (16*Y^4)/2 = 8*Y^4 */ - pGF->sqr(pT, pT, pGF); /* s */ - //cpGFpxHalve(pT, pT, pGF); - cpGF->div2(pT, pT, pGF); - - /* new X = M^2 - 2*S */ - pGF->sqr(pX, pM, pGF); /* s */ - pGF->sub(pX, pX, pS, pGF); - pGF->sub(pX, pX, pS, pGF); - - /* new Y = M*(S - new X) - T */ - pGF->sub(pY, pS, pX, pGF); - pGF->mul(pY, pY, pM, pGF); /* m */ - pGF->sub(pY, pY, pT, pGF); - - for(k--; k>0; k--) { - /* new W = 2*T*W */ - if(!EPID_PARAMS(pEC)) { - pGF->mul(pW, pW, pT, pGF); /* m */ - pGF->add(pW, pW, pW, pGF); - } - - /* M = 3*X^2 + new W */ - pGF->sqr(pS, pX, pGF); /* s */ - pGF->add(pM, pS, pS, pGF); - pGF->add(pM, pM, pS, pGF); - if(!EPID_PARAMS(pEC)) { - pGF->add(pM, pM, pW, pGF); - } - - /* T = 2*Y */ - pGF->add(pT, pY, pY, pGF); - - /* new Z = 2*Y*Z */ - pGF->mul(pZ, pT, pZ, pGF); /* m */ - - /* S = X*(T^2) = 4*X*Y^2 */ - pGF->sqr(pT, pT, pGF); /* s */ - pGF->mul(pS, pX, pT, pGF); /* m */ - - /* T = (T^2)/2 = (16*Y^4)/2 = 8*Y^4 */ - pGF->sqr(pT, pT, pGF); /* s */ - //cpGFpxHalve(pT, pT, pGF); - cpGF->div2(pT, pT, pGF); - - /* new X = M^2 - 2*S */ - pGF->sqr(pX, pM, pGF); /* s */ - pGF->sub(pX, pX, pS, pGF); - pGF->sub(pX, pX, pS, pGF); - - /* new Y = M*(S - new X) - T */ - pGF->sub(pY, pS, pX, pGF); - pGF->mul(pY, pY, pM, pGF); /* m */ - pGF->sub(pY, pY, pT, pGF); - } - - ECP_POINT_FLAGS(pR) = ECP_FINITE_POINT; - - cpGFpReleasePool(4, pGF); - return pR; - } -} -#endif -#endif - - -IppsGFpECPoint* cpEcGFpDblPoint_k(IppsGFpECPoint* pR, const IppsGFpECPoint* pP,int k, IppsGFpECState* pEC) -{ - cpEcGFpDblPoint(pR, pP, pEC); - k--; - for(; k>0; k--) - cpEcGFpDblPoint(pR, pR, pEC); - - return pR; -} - - -#if ( ECP_PROJECTIVE_COORD == JACOBIAN ) -/* complexity = 4s+12m */ -IppsGFpECPoint* cpEcGFpAddPoint (IppsGFpECPoint* pPointR, const IppsGFpECPoint* pPointP, const IppsGFpECPoint* pPointQ, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - int inftyP = cpEcGFpIsProjectivePointAtInfinity(pPointP, elemLen); - int inftyQ = cpEcGFpIsProjectivePointAtInfinity(pPointQ, elemLen); - - /* - // addition - */ - BNU_CHUNK_T* pA = cpEcGFpGetPool(3, pEC); - BNU_CHUNK_T* pB = pA + elemLen; - BNU_CHUNK_T* pC = pB + elemLen; - BNU_CHUNK_T* pD = pC + elemLen; - BNU_CHUNK_T* pW = pD + elemLen; - BNU_CHUNK_T* pV = pW + elemLen; - - BNU_CHUNK_T* pRx = pV + elemLen; /* temporary result */ - BNU_CHUNK_T* pRy = pRx+ elemLen; - BNU_CHUNK_T* pRz = pRy+ elemLen; - - /* coordinates of P */ - BNU_CHUNK_T* px1 = ECP_POINT_X(pPointP); - BNU_CHUNK_T* py1 = ECP_POINT_Y(pPointP); - BNU_CHUNK_T* pz1 = ECP_POINT_Z(pPointP); - - /* coordinates of Q */ - BNU_CHUNK_T* px2 = ECP_POINT_X(pPointQ); - BNU_CHUNK_T* py2 = ECP_POINT_Y(pPointQ); - BNU_CHUNK_T* pz2 = ECP_POINT_Z(pPointQ); - - /* coordinates of R */ - //BNU_CHUNK_T* px3 = ECP_POINT_X(pPointR); - //BNU_CHUNK_T* py3 = ECP_POINT_Y(pPointR); - //BNU_CHUNK_T* pz3 = ECP_POINT_Z(pPointR); - - /* A = X1 * Z2^2 */ - /* C = Y1 * Z2^3 */ - if( IS_ECP_AFFINE_POINT(pPointQ) ) { - cpGFpElementCopy(pA, px1, elemLen); - cpGFpElementCopy(pC, py1, elemLen); - } - else { - pGF->sqr(pA, pz2, pGF); /* s */ - pGF->mul(pC, pz2, pA, pGF); /* m */ - pGF->mul(pA, pA, px1, pGF); /* m */ - pGF->mul(pC, pC, py1, pGF); /* m */ - } - - /* B = X2 * Z1^2 */ - /* D = Y2 * Z1^3 */ - if( IS_ECP_AFFINE_POINT(pPointP) ) { - cpGFpElementCopy(pB, px2, elemLen); - cpGFpElementCopy(pD, py2, elemLen); - } - else { - pGF->sqr(pB, pz1, pGF); /* s */ - pGF->mul(pD, pz1, pB, pGF); /* m */ - pGF->mul(pB, pB, px2, pGF); /* m */ - pGF->mul(pD, pD, py2, pGF); /* m */ - } - - /* W = B-A */ - /* V = D-C */ - pGF->sub(pW, pB, pA, pGF); - pGF->sub(pV, pD, pC, pGF); - - if( GFP_IS_ZERO(pW, elemLen) && !inftyP && !inftyQ ) { - cpEcGFpReleasePool(3, pEC); - if( GFP_IS_ZERO(pV, elemLen) ) - return cpEcGFpDblPoint(pPointR, pPointP, pEC); - else - return cpEcGFpSetProjectivePointAtInfinity(pPointR, elemLen); - } - - /* Z3 = Z1*Z2*W */ - if( IS_ECP_AFFINE_POINT(pPointP) && IS_ECP_AFFINE_POINT(pPointQ) ) - cpGFpElementCopy(pRz, pW, elemLen); - else { - if( IS_ECP_AFFINE_POINT(pPointQ) ) - cpGFpElementCopy(pB, pz1, elemLen); - else if ( IS_ECP_AFFINE_POINT(pPointP) ) - cpGFpElementCopy(pB, pz2, elemLen); - else - pGF->mul(pB, pz1, pz2, pGF); /* m */ - pGF->mul(pRz, pB, pW, pGF); /* m */ - } - - /* B = W^2 */ - pGF->sqr(pB, pW, pGF); /* s */ - /* A = A*W^2 */ - pGF->mul(pA, pB, pA, pGF); /* m */ - /* W = W^3 */ - pGF->mul(pW, pB, pW, pGF); /* m */ - - /* X3 = V^2 - W^3 -2*A*W^2 */ - pGF->sqr(pRx, pV, pGF); /* s */ - pGF->sub(pRx, pRx, pW, pGF); - pGF->sub(pRx, pRx, pA, pGF); - pGF->sub(pRx, pRx, pA, pGF); - - /* Y3 = V*(A*W^2 - X3) -C*W^3 */ - pGF->sub(pRy, pA, pRx, pGF); - pGF->mul(pC, pC, pW, pGF); /* m */ - pGF->mul(pRy, pRy, pV, pGF); /* m */ - pGF->sub(pRy, pRy, pC, pGF); - - cpMaskMove(pRx, px2, elemLen, inftyP); - cpMaskMove(pRy, py2, elemLen, inftyP); - cpMaskMove(pRz, pz2, elemLen, inftyP); - - cpMaskMove(pRx, px1, elemLen, inftyQ); - cpMaskMove(pRy, py1, elemLen, inftyQ); - cpMaskMove(pRz, pz1, elemLen, inftyQ); - - cpGFpElementCopy(ECP_POINT_DATA(pPointR), pRx, 3*elemLen); - ECP_POINT_FLAGS(pPointR) = cpEcGFpIsProjectivePointAtInfinity(pPointR, elemLen)? 0 : ECP_FINITE_POINT; - - cpEcGFpReleasePool(3, pEC); - return pPointR; -} -#endif - -#if ( ECP_PROJECTIVE_COORD == HOMOGENEOUS ) -/* -// A = Y2 * Z1 - Y1 * Z2 -// B = X2 * Z1 - X1 * Z2 -// C = A^2*Z1*Z2 -B^3 -2*B^2*X1*Z2 = A^2*Z1*Z2 -B^2*(B+2*X1*Z2) = A^2*Z1*Z2 -B^2*(X2*Z1+X1*Z2) -// new X = B*C -// new Y = A*(B^2*X1*Z2 -C) -B^3*Y1*Z2 -// new Z = B^3*Z1*Z2 -// -// note: Y1*Z2, X2*Z1, X1*Z2, Z1*Z2 are using several times -// (T1), (T2), (T3) (T4) -// -// complexity = 2s+13m -*/ -IppsGFpECPoint* cpEcGFpAddPoint (IppsGFpECPoint* pPointR, const IppsGFpECPoint* pP1, const IppsGFpECPoint* pP2, IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - /* test stupid call */ - if( pP1 == pP2) - return cpEcGFpDblPoint(pPointR, pP1, pEC); - - /* prevent operation with point at Infinity */ - if( !IS_ECP_FINITE_POINT(pP1) ) - return cpEcGFpCopyPoint(pPointR, pP2, elemLen); - if( !IS_ECP_FINITE_POINT(pP2) ) - return cpEcGFpCopyPoint(pPointR, pP1, elemLen); - - /* - // addition - */ - { - BNU_CHUNK_T* pT1 = cpEcGFpGetPool(3, pEC); - BNU_CHUNK_T* pT2 = pT1 + elemLen; - BNU_CHUNK_T* pT3 = pT2 + elemLen; - BNU_CHUNK_T* pT4 = pT3 + elemLen; - BNU_CHUNK_T* pA = pT4 + elemLen; - BNU_CHUNK_T* pB = pA + elemLen; - BNU_CHUNK_T* pC = pB + elemLen; - BNU_CHUNK_T* pB2 = pC + elemLen; - BNU_CHUNK_T* pB3 = pB2 + elemLen; - - /* coordinates of P1 */ - BNU_CHUNK_T* pX1 = ECP_POINT_X(pP1); - BNU_CHUNK_T* pY1 = ECP_POINT_Y(pP1); - BNU_CHUNK_T* pZ1 = ECP_POINT_Z(pP1); - - /* coordinates of P2 */ - BNU_CHUNK_T* pX2 = ECP_POINT_X(pP2); - BNU_CHUNK_T* pY2 = ECP_POINT_Y(pP2); - BNU_CHUNK_T* pZ2 = ECP_POINT_Z(pP2); - - /* A = Y2 * Z1 - Y1 * Z2 */ - pGF->mul(pA, pY2, pZ1, pGF); /* m */ - pGF->mul(pT1,pY1, pZ2, pGF); /* m */ - pGF->sub(pA, pA, pT1, pGF); - - /* B = X2 * Z1 - X1 * Z2 */ - pGF->mul(pT2,pX2, pZ1, pGF); /* m */ - pGF->mul(pT3,pX1, pZ2, pGF); /* m */ - pGF->sub(pB, pT2, pT3, pGF); - - if( GFP_IS_ZERO(pB, elemLen) ) { - cpEcGFpReleasePool(3, pEC); - if( GFP_IS_ZERO(pA, elemLen) ) - return cpEcGFpDblPoint(pPointR, pP1, pEC); - else - return cpEcGFpSetProjectivePointAtInfinity(pPointR, elemLen); - } - - /* C = A^2*Z1*Z2 -B^2*(X2*Z1+X1*Z2) */ - pGF->sqr(pB2, pB, pGF); /* s */ - pGF->add(pT2,pT2, pT3, pGF); - pGF->mul(pT2,pT2, pB2, pGF); /* m */ - pGF->mul(pT4,pZ1, pZ2, pGF); /* m */ - pGF->sqr(pC, pA, pGF); /* s */ - pGF->mul(pC, pC, pT4, pGF); /* m */ - pGF->sub(pC, pC, pT2, pGF); - - /* new X = B*C */ - pGF->mul(ECP_POINT_X(pPointR), pB, pC, pGF); /* m */ - - /* new Y = A*(B^2*X1*Z2 -C) -B^3*Y1*Z2 */ - pGF->mul(pT3, pT3, pB2, pGF); /* m */ /* T3 = (X1*Z2)*B^2 */ - pGF->sub(pT3, pT3, pC, pGF); - pGF->mul(pT3, pT3, pA, pGF); /* m */ /* T3 = A*(B^2*X1*Z2 -C) */ - pGF->mul(pB3, pB2, pB, pGF); /* m */ /* B3 = B^3 */ - pGF->mul(pT1, pT1, pB3, pGF); /* m */ /* T1 = B^3*Y1*Z2 */ - pGF->sub(ECP_POINT_Y(pPointR), pT3, pT1, pGF); - - /* new Z = B^3*Z1*Z2 */ - pGF->mul(ECP_POINT_Z(pPointR), pB3, pT4, pGF); /* m */ - - ECP_POINT_FLAGS(pPointR) = ECP_FINITE_POINT; - - cpEcGFpReleasePool(3, pEC); - return pPointR; - } -} -#endif - -#if 0 -/* non-sscm version */ -IppsGFpECPoint* cpEcGFpMulPoint(IppsGFpECPoint* pPointR, const IppsGFpECPoint* pPointP, const BNU_CHUNK_T* pN, int nsN, IppsGFpECState* pEC, Ipp8u* pScratchBuffer) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - UNREFERENCED_PARAMETER(pScratchBuffer); - - /* test scalar and input point */ - if( GFP_IS_ZERO(pN, nsN) || !IS_ECP_FINITE_POINT(pPointP) ) - return cpEcGFpSetProjectivePointAtInfinity(pPointR, elemLen); - - /* remove leding zeros */ - FIX_BNU(pN, nsN); - - /* case N==1 => R = P */ - if( GFP_IS_ONE(pN, nsN) ) { - cpEcGFpCopyPoint(pPointR, pPointP, elemLen); - return pPointR; - } - - /* - // scalar multiplication - */ - else { - int i; - - BNU_CHUNK_T* pH = cpGFpGetPool(1, pGF); - BNU_CHUNK_T* pK = cpGFpGetPool(1, pGF); - - IppsGFpECPoint T, U; - cpEcGFpInitPoint(&T, cpEcGFpGetPool(1, pEC),0, pEC); - cpEcGFpInitPoint(&U, cpEcGFpGetPool(1, pEC),0, pEC); - - /* H = 3*N */ - cpGFpElementCopy(pK, pN, nsN); - pK[nsN] = 0; - i = cpAdd_BNU(pH, pK, pK, nsN+1); - i = cpAdd_BNU(pH, pK, pH, nsN+1); - - /* T = affine(P) */ - if( IS_ECP_AFFINE_POINT(pPointP) ) - cpEcGFpCopyPoint(&T, pPointP, elemLen); - else { - cpEcGFpGetAffinePoint(ECP_POINT_X(&T), ECP_POINT_Y(&T), pPointP, pEC); - cpEcGFpSetAffinePoint(&T, ECP_POINT_X(&T), ECP_POINT_Y(&T), pEC); - } - /* U = affine(-P) */ - cpEcGFpNegPoint(&U, &T, pEC); - - /* R = T = affine(P) */ - cpEcGFpCopyPoint(pPointR, &T, elemLen); - - /* - // point multiplication - */ - for(i=MSB_BNU(pH, nsN+1)-1; i>0; i--) { - Ipp32u hBit = TST_BIT(pH, i); - Ipp32u kBit = TST_BIT(pK, i); - cpEcGFpDblPoint(pPointR, pPointR, pEC); - if( hBit && !kBit ) - cpEcGFpAddPoint(pPointR, &T, pPointR, pEC); - if(!hBit && kBit ) - cpEcGFpAddPoint(pPointR, &U, pPointR, pEC); - } - - cpEcGFpReleasePool(2, pEC); - cpGFpReleasePool(2, pGF); - - return pPointR; - } -} -#endif - -static int div_upper(int a, int d) -{ return (a+d-1)/d; } - -#if 0 -static int getNumOperations(int bitsize, int w) -{ - int n_overhead = (1<=n_opt) break; - w_opt = w_trial; - n_opt = n_trial; - } - return w_opt; -#undef LIMIT -} - -static int cpEcGFpConverRepresentation(BNU_CHUNK_T* pInput, int inpBits, int w) -{ - Ipp32u* pR = (Ipp32u*)pInput; - Ipp16u* pR16 = (Ipp16u*)pInput; - - int outBits = 0; - Ipp32u base = (BNU_CHUNK_T)1<>digitShift) &digitMask; - - Ipp32u delta = (base-digit) & ~digitMask; - delta <<= digitShift; - cpDec_BNU32((Ipp32u*)(pR16+chunkIdx), (Ipp32u*)(pR16+chunkIdx), (2*nsR-chunkIdx+1)/2, delta); - - inpBits = BITSIZE_BNU32(pR, nsR); - outBits += w; - } - - return outBits; -} -#endif - -/* sscm version */ -IppsGFpECPoint* cpEcGFpMulPoint(IppsGFpECPoint* pPointR, const IppsGFpECPoint* pPointP, const BNU_CHUNK_T* pN, int nsN, IppsGFpECState* pEC, Ipp8u* pScratchBuffer) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - - /* test scalar and input point */ - if( GFP_IS_ZERO(pN, nsN) || !IS_ECP_FINITE_POINT(pPointP) ) - return cpEcGFpSetProjectivePointAtInfinity(pPointR, elemLen); - - /* remove leding zeros */ - FIX_BNU(pN, nsN); - - /* case N==1 => R = P */ - if( GFP_IS_ONE(pN, nsN) ) { - cpEcGFpCopyPoint(pPointR, pPointP, elemLen); - return pPointR; - } - - { - Ipp8u* pScratchAligned; /* aligned scratch buffer */ - int nAllocation = 0; /* points from the pool */ - - /* size of point (dwords) */ - int pointDataSize = ECP_FELEN(pEC)*sizeof(BNU_CHUNK_T); - int pointDataSize32 = ECP_FELEN(pEC)*sizeof(BNU_CHUNK_T)/sizeof(Ipp32u); - - /* scalar bitsize */ - int scalarBitSize = BITSIZE_BNU(pN, nsN); - /* optimal size of window */ - int window_size = (NULL==pScratchBuffer)? 1 : 5; - /* number of table entries */ - int nPrecomputed = 1<<(window_size-1); - - IppsGFpECPoint T; - cpEcGFpInitPoint(&T, cpEcGFpGetPool(1, pEC),0, pEC); - cpEcGFpCopyPoint(&T, pPointP, elemLen); - - if(NULL==pScratchBuffer) { - nAllocation = 1 + div_upper(CACHE_LINE_SIZE, pointDataSize); - pScratchBuffer = (Ipp8u*)cpEcGFpGetPool(nAllocation, pEC); - } - pScratchAligned = IPP_ALIGNED_PTR(pScratchBuffer, CACHE_LINE_SIZE); - - /* pre-compute auxiliary table t[] = {1*P, 2*P, ..., nPrecomputed*P} */ - { - int n; - cpScatter32((Ipp32u*)pScratchAligned, nPrecomputed, 0, (Ipp32u*)ECP_POINT_DATA(&T), pointDataSize32); - for(n=1; n> ((bit-1)%8)) & dmask; - booth_recode(&sign, &digit, (Ipp8u)wvalue, window_size); - - cpGather32((Ipp32u*)ECP_POINT_DATA(pPointR), pointDataSize32, (Ipp32u*)pScratchAligned, nPrecomputed, digit); - ECP_POINT_FLAGS(pPointR) = 0; - - for(bit-=window_size; bit>=window_size; bit-=window_size) { - /* window_size times doubling */ - cpEcGFpDblPoint_k(pPointR, pPointR, window_size, pEC); - - /* extract next window value */ - wvalue = *((Ipp16u*)&pScalar8[(bit-1)/8]); - wvalue = (wvalue>> ((bit-1)%8)) & dmask; - booth_recode(&sign, &digit, (Ipp8u)wvalue, window_size); - - /* extract value from the pre-computed table */ - cpGather32((Ipp32u*)ECP_POINT_DATA(&T), pointDataSize32, (Ipp32u*)pScratchAligned, nPrecomputed, digit); - - pGF->neg(pNegY, ECP_POINT_Y(&T), pGF); - cpMaskMove(ECP_POINT_Y(&T), pNegY, elemLen, sign); - - /* and add it */ - cpEcGFpAddPoint(pPointR, pPointR, &T, pEC); - } - - /* last window */ - cpEcGFpDblPoint_k(pPointR, pPointR, window_size, pEC); - - wvalue = *((Ipp16u*)&pScalar8[0]); - wvalue = (wvalue <<1) & dmask; - booth_recode(&sign, &digit, (Ipp8u)wvalue, window_size); - - cpGather32((Ipp32u*)ECP_POINT_DATA(&T), pointDataSize32, (Ipp32u*)pScratchAligned, nPrecomputed, digit); - - pGF->neg(pNegY, ECP_POINT_Y(&T), pGF); - cpMaskMove(ECP_POINT_Y(&T), pNegY, elemLen, sign); - - cpEcGFpAddPoint(pPointR, pPointR, &T, pEC); - } - - cpGFpReleasePool(2+1, pGF); - } - - cpEcGFpReleasePool(nAllocation+1, pEC); - - return pPointR; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecstuff.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecstuff.h deleted file mode 100644 index f312e537fc..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpecstuff.h +++ /dev/null @@ -1,320 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// -// Purpose: -// Intel(R) Performance Primitives. Cryptography Primitives. -// Internal EC over GF(p^m) basic Definitions & Function Prototypes -// -// -*/ - -#if !defined(_CP_ECGFP_H_) -#define _CP_ECGFP_H_ - -#include "pcpgfpstuff.h" -#include "pcpgfpxstuff.h" - - -/* -// EC over GF(p) Point context -*/ -typedef struct _cpGFpECPoint { - IppCtxId idCtx; /* EC Point identifier */ - int flags; /* flags: affine */ - int elementSize; /* size of each coordinate */ - BNU_CHUNK_T* pData; /* coordinatex X, Y, Z */ -} cpGFPECPoint; - -/* -// Contetx Access Macros -*/ -#define ECP_POINT_ID(ctx) ((ctx)->idCtx) -#define ECP_POINT_FLAGS(ctx) ((ctx)->flags) -#define ECP_POINT_FELEN(ctx) ((ctx)->elementSize) -#define ECP_POINT_DATA(ctx) ((ctx)->pData) -#define ECP_POINT_X(ctx) ((ctx)->pData) -#define ECP_POINT_Y(ctx) ((ctx)->pData+(ctx)->elementSize) -#define ECP_POINT_Z(ctx) ((ctx)->pData+(ctx)->elementSize*2) -#define ECP_POINT_TEST_ID(ctx) (ECP_POINT_ID((ctx))==idCtxGFPPoint) - -/* point flags */ -#define ECP_AFFINE_POINT (1) -#define ECP_FINITE_POINT (2) - -#define IS_ECP_AFFINE_POINT(ctx) (ECP_POINT_FLAGS((ctx))&ECP_AFFINE_POINT) -#define SET_ECP_AFFINE_POINT(ctx) (ECP_POINT_FLAGS((ctx))|ECP_AFFINE_POINT) -#define SET_ECP_PROJECTIVE_POINT(ctx) (ECP_POINT_FLAGS((ctx))&~ECP_AFFINE_POINT) - -#define IS_ECP_FINITE_POINT(ctx) (ECP_POINT_FLAGS((ctx))&ECP_FINITE_POINT) -#define SET_ECP_FINITE_POINT(ctx) (ECP_POINT_FLAGS((ctx))|ECP_FINITE_POINT) -#define SET_ECP_INFINITE_POINT(ctx) (ECP_POINT_FLAGS((ctx))&~ECP_FINITE_POINT) - -/* -// define using projective coordinates -*/ -#define JACOBIAN (0) -#define HOMOGENEOUS (1) -#define ECP_PROJECTIVE_COORD JACOBIAN -//#define ECP_PROJECTIVE_COORD HOMOGENEOUS - -#if (ECP_PROJECTIVE_COORD== JACOBIAN) - #pragma message ("ECP_PROJECTIVE_COORD = JACOBIAN") -#elif (ECP_PROJECTIVE_COORD== HOMOGENEOUS) - #pragma message ("ECP_PROJECTIVE_COORD = HOMOGENEOUS") -#else - #error ECP_PROJECTIVE_COORD should be either JACOBIAN or HOMOGENEOUS type -#endif - -#define _EPID20_EC_PARAM_SPECIFIC_ - -#if defined(_EPID20_EC_PARAM_SPECIFIC_) -#pragma message ("_EPID20_EC_PARAM_SPECIFIC_") -#endif - - -/* EC over GF(p) context */ -typedef struct _cpGFpEC { - IppCtxId idCtx; /* EC identifier */ - - IppsGFpState* pGF; /* arbitrary GF(p^d)*/ - - int elementSize; /* size of point's coordinate */ - int orderBitSize; /* base_point order bitsize */ -// int cofactor; /* cofactor = #E/base_point order */ - int epidParams; /* Intel(R) EPID 2.0 specific parameters */ - BNU_CHUNK_T* pA; /* EC parameter A */ - BNU_CHUNK_T* pB; /* B */ - BNU_CHUNK_T* pG; /* base_point */ - BNU_CHUNK_T* pR; /* base_point order */ - BNU_CHUNK_T* cofactor; /* cofactor = #E/base_point order */ - BNU_CHUNK_T* pPool; /* pool of points */ -} cpGFPEC; - -#define ECGFP_ALIGNMENT ((int)(sizeof(void*))) - -/* Local definitions */ -#define EC_POOL_SIZE (8) /* num of points into the pool */ - -#define ECP_ID(pCtx) ((pCtx)->idCtx) -#define ECP_GFP(pCtx) ((pCtx)->pGF) -#define ECP_FELEN(pCtx) ((pCtx)->elementSize) -#define ECP_ORDBITSIZE(pCtx) ((pCtx)->orderBitSize) -#define ECP_COFACTOR(pCtx) ((pCtx)->cofactor) -#define EPID_PARAMS(pCtx) ((pCtx)->epidParams) -#define ECP_A(pCtx) ((pCtx)->pA) -#define ECP_B(pCtx) ((pCtx)->pB) -#define ECP_G(pCtx) ((pCtx)->pG) -#define ECP_R(pCtx) ((pCtx)->pR) -#define ECP_POOL(pCtx) ((pCtx)->pPool) - -#define ECP_TEST_ID(pCtx) (ECP_ID((pCtx))==idCtxGFPEC) - -/* -// get/release n points from/to the pool -*/ -__INLINE BNU_CHUNK_T* cpEcGFpGetPool(int n, IppsGFpECState* pEC) -{ - BNU_CHUNK_T* pPool = ECP_POOL(pEC); - ECP_POOL(pEC) += n*GFP_FELEN(ECP_GFP(pEC))*3; - return pPool; -} -__INLINE void cpEcGFpReleasePool(int n, IppsGFpECState* pEC) -{ - ECP_POOL(pEC) -= n*GFP_FELEN(ECP_GFP(pEC))*3; -} - -__INLINE IppsGFpECPoint* cpEcGFpInitPoint(IppsGFpECPoint* pPoint, BNU_CHUNK_T* pData, int flags, const IppsGFpECState* pEC) -{ - ECP_POINT_ID(pPoint) = idCtxGFPPoint; - ECP_POINT_FLAGS(pPoint) = flags; - ECP_POINT_FELEN(pPoint) = GFP_FELEN(ECP_GFP(pEC)); - ECP_POINT_DATA(pPoint) = pData; - return pPoint; -} - -/* -// copy one point into another -*/ -__INLINE IppsGFpECPoint* cpEcGFpCopyPoint(IppsGFpECPoint* pPointR, const IppsGFpECPoint* pPointA, int elemLen) -{ - cpGFpElementCopy(ECP_POINT_DATA(pPointR), ECP_POINT_DATA(pPointA), 3*elemLen); - ECP_POINT_FLAGS(pPointR) = ECP_POINT_FLAGS(pPointA); - return pPointR; -} - -/* -// set point (convert into inside representation) -// SetProjectivePoint -// SetProjectivePointAtInfinity -// SetAffinePoint -*/ -__INLINE IppsGFpECPoint* cpEcGFpSetProjectivePoint(IppsGFpECPoint* pPoint, - const BNU_CHUNK_T* pX, const BNU_CHUNK_T* pY, const BNU_CHUNK_T* pZ, - IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - int elemLen = GFP_FELEN(pGF); - int pointFlag = 0; - - cpGFpxSet(ECP_POINT_X(pPoint), pX, elemLen, pGF, USE_MONT_SPACE_REPRESENTATION); - cpGFpxSet(ECP_POINT_Y(pPoint), pY, elemLen, pGF, USE_MONT_SPACE_REPRESENTATION); - cpGFpxSet(ECP_POINT_Z(pPoint), pZ, elemLen, pGF, USE_MONT_SPACE_REPRESENTATION); - - if(!GFP_IS_ZERO(pZ, elemLen)) pointFlag |= ECP_FINITE_POINT; - if(GFP_IS_ONE(pZ, elemLen)) pointFlag |= ECP_AFFINE_POINT; - ECP_POINT_FLAGS(pPoint) = pointFlag; - return pPoint; -} -__INLINE IppsGFpECPoint* cpEcGFpSetProjectivePointAtInfinity(IppsGFpECPoint* pPoint, int elemLen) -{ - cpGFpElementPadd(ECP_POINT_X(pPoint), elemLen, 0); - cpGFpElementPadd(ECP_POINT_Y(pPoint), elemLen, 0); - cpGFpElementPadd(ECP_POINT_Z(pPoint), elemLen, 0); - ECP_POINT_FLAGS(pPoint) = 0; - return pPoint; -} -__INLINE IppsGFpECPoint* cpEcGFpSetAffinePoint(IppsGFpECPoint* pPoint, - const BNU_CHUNK_T* pX, const BNU_CHUNK_T* pY, - IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - IppsGFpState* pBasicGF = cpGFpBasic(pGF); - - cpGFpElementCopy(ECP_POINT_X(pPoint), pX, GFP_FELEN(pGF)); - cpGFpElementCopy(ECP_POINT_Y(pPoint), pY, GFP_FELEN(pGF)); - cpGFpElementCopyPadd(ECP_POINT_Z(pPoint), GFP_FELEN(pGF), MNT_1(GFP_MONT(pBasicGF)), GFP_FELEN(pBasicGF)); - ECP_POINT_FLAGS(pPoint) = ECP_AFFINE_POINT | ECP_FINITE_POINT; - return pPoint; -} - -/* -// test infinity: -// IsProjectivePointAtInfinity -*/ -__INLINE int cpEcGFpIsProjectivePointAtInfinity(const IppsGFpECPoint* pPoint, Ipp32u elemLen) -{ - return GFP_IS_ZERO( ECP_POINT_Z(pPoint), elemLen ); -} - -/* -// get point (convert from inside representation) -// GetProjectivePoint -// GetAffinePointAtInfinity0 (B==0) -// GetAffinePointAtInfinity1 (B!=0) -// GetAffinePoint -*/ -__INLINE void cpEcGFpGetProjectivePoint(BNU_CHUNK_T* pX, BNU_CHUNK_T* pY, BNU_CHUNK_T* pZ, - const IppsGFpECPoint* pPoint, - IppsGFpECState* pEC) -{ - IppsGFpState* pGF = ECP_GFP(pEC); - cpGFpxGet(pX, GFP_FELEN(pGF), ECP_POINT_X(pPoint), pGF, USE_MONT_SPACE_REPRESENTATION); - cpGFpxGet(pY, GFP_FELEN(pGF), ECP_POINT_Y(pPoint), pGF, USE_MONT_SPACE_REPRESENTATION); - cpGFpxGet(pZ, GFP_FELEN(pGF), ECP_POINT_Z(pPoint), pGF, USE_MONT_SPACE_REPRESENTATION); -} -#if 0 -__INLINE void cpEcGFpGetAffinePointAtInfinity0(BNU_CHUNK_T* pX, BNU_CHUNK_T* pY, int elemLen) -{ - GFP_ZERO(pX, elemLen); - GFP_ONE(pY, elemLen); -} -__INLINE void cpEcGFpGetAffinePointAtInfinity1(BNU_CHUNK_T* pX, BNU_CHUNK_T* pY, int elemLen) -{ - GFP_ZERO(pX, elemLen); - GFP_ZERO(pY, elemLen); -} -#endif - - -/* signed encode */ -__INLINE void booth_recode(Ipp8u* sign, Ipp8u* digit, Ipp8u in, int w) -{ - Ipp8u s = ~((in >> w) - 1); - int d = (1 << (w+1)) - in - 1; - d = (d & s) | (in & ~s); - d = (d >> 1) + (d & 1); - *sign = s & 1; - *digit = (Ipp8u)d; -} - -/* mask of the argument: - if x==0 returns 0 - if x!=0 returns BNU_CHUNK_T(-1) -*/ -__INLINE BNU_CHUNK_T cpIsNonZeroMask(BNU_CHUNK_T x) -{ - #if(_IPP_ARCH==_IPP_ARCH_EM64T) - x |= x>>32; - #endif - x |= x>>16; - x |= x>>8; - x |= x>>4; - x |= x>>2; - x |= x>>1; - return 0-(x&1); -} - -/* dst[] = src[], iif moveFlag!=0 */ -__INLINE void cpMaskMove(BNU_CHUNK_T* dst, const BNU_CHUNK_T* src, int len, int moveFlag) -{ - BNU_CHUNK_T mask1 = cpIsNonZeroMask(moveFlag); - BNU_CHUNK_T mask2 = ~mask1; - int n; - for(n=0; n= _IPP32E_M7) -BNU_CHUNK_T* cp256pNeg(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF) -{ - return gf256_neg(pR, pA, GFP_MODULUS(pGF)); -} -#endif - - -BNU_CHUNK_T* cpGFpInv(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - int elemLen = GFP_FELEN(pGF); - int poolelementLen= GFP_PELEN(pGF); - - BNU_CHUNK_T* tmpM = cpGFpGetPool(4, pGF); - BNU_CHUNK_T* tmpX1= tmpM +poolelementLen; - BNU_CHUNK_T* tmpX2= tmpX1+poolelementLen; - BNU_CHUNK_T* tmpX3= tmpX2+poolelementLen; - int nsR; - - cpGFpElementCopy(tmpM, pModulus, elemLen); - nsR = cpModInv_BNU(pR, pA,elemLen, tmpM, elemLen, tmpX1,tmpX2,tmpX3); - cpGFpReleasePool(4, pGF); - - cpGFpElementPadd(pR+nsR, elemLen-nsR, 0); - return cpGFpMul(pR, pR, MNT_CUBE_R(GFP_MONT(pGF)), pGF); -} - - -/* sscm version */ -BNU_CHUNK_T* cpGFpHalve(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - int elemLen = GFP_FELEN(pGF); - - BNU_CHUNK_T mask = 0 - (pA[0]&1); /* set mask iif A is odd */ - /* t = if(isOdd(A))? modulus : 0 */ - int i; - BNU_CHUNK_T* t = cpGFpGetPool(1, pGF); - for(i=0; i= _IPP32E_M7) -BNU_CHUNK_T* cp256pHalve(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF) -{ - return gf256_div2(pR, pA, GFP_MODULUS(pGF)); -} -#endif - - -/* sscm version */ -BNU_CHUNK_T* cpGFpAdd(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pTmpR = cpGFpGetPool(1, pGF); - - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - int elemLen = GFP_FELEN(pGF); - - BNU_CHUNK_T e = cpAdd_BNU(pR, pA, pB, elemLen); - e -= cpSub_BNU(pTmpR, pR, pModulus, elemLen); - MASKED_COPY(pR, e, pR, pTmpR, elemLen); - - cpGFpReleasePool(1, pGF); - - return pR; -} - -#if(_IPP32E >= _IPP32E_M7) -BNU_CHUNK_T* cp256pAdd(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF) -{ - return gf256_add(pR, pA, pB, GFP_MODULUS(pGF)); -} -#endif - - -/* sscm version */ -BNU_CHUNK_T* cpGFpSub(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pTmpR = cpGFpGetPool(1, pGF); - - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - int elemLen = GFP_FELEN(pGF); - - BNU_CHUNK_T e = cpSub_BNU(pR, pA, pB, elemLen); - cpAdd_BNU(pTmpR, pR, pModulus, elemLen); - MASKED_COPY(pR, (0-e), pTmpR, pR, elemLen); - - cpGFpReleasePool(1, pGF); - - return pR; -} - -#if(_IPP32E >= _IPP32E_M7) -BNU_CHUNK_T* cp256pSub(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF) -{ - return gf256_sub(pR, pA, pB, GFP_MODULUS(pGF)); -} -#endif - - -BNU_CHUNK_T* cpGFpMul(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - int elemLen = GFP_FELEN(pGF); - - IppsMontState* pMont = GFP_MONT(pGF); - BNU_CHUNK_T* pBuffer = MNT_PRODUCT(pMont); - BNU_CHUNK_T m0 = MNT_HELPER(pMont); - - cpMontMul_BNU(pR, pA,elemLen, pB,elemLen, pModulus,elemLen, m0, pBuffer, NULL); - return pR; -} - -#if(_IPP32E >= _IPP32E_M7) -BNU_CHUNK_T* cp256pMul(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - IppsMontState* pMont = GFP_MONT(pGF); - BNU_CHUNK_T m0 = MNT_HELPER(pMont); - return gf256_mulm(pR, pA, pB, pModulus, m0); -} -#endif - -BNU_CHUNK_T* cpGFpSqr(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - int elemLen = GFP_FELEN(pGF); - - IppsMontState* pMont = GFP_MONT(pGF); - BNU_CHUNK_T* pBuffer = MNT_PRODUCT(pMont); - BNU_CHUNK_T m0 = MNT_HELPER(pMont); - - cpMontSqr_BNU(pR, pA,elemLen, pModulus,elemLen, m0, pBuffer, NULL); - return pR; -} - -#if(_IPP32E >= _IPP32E_M7) -BNU_CHUNK_T* cp256pSqr(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pModulus = GFP_MODULUS(pGF); - IppsMontState* pMont = GFP_MONT(pGF); - BNU_CHUNK_T m0 = MNT_HELPER(pMont); - return gf256_sqrm(pR, pA, pModulus, m0); -} -#endif - - -BNU_CHUNK_T* cpGFpExp(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pE, int nsE, IppsGFpState* pGF) -{ - IppsBigNumState A; - IppsBigNumState E; - IppsBigNumState R; - - BNU_CHUNK_T* pPool = cpGFpGetPool(3, pGF); - int poolElemLen = GFP_PELEN(pGF); - int elemLen = GFP_FELEN(pGF); - - cpGFpSetBigNum(&A, elemLen, pA, pPool+0*poolElemLen); - cpGFpSetBigNum(&E, nsE, pE, pPool+1*poolElemLen); - cpGFpInitBigNum(&R,elemLen, pR, pPool+2*poolElemLen); - - cpMontExpBin_BN(&R, &A, &E, GFP_MONT(pGF)); - - cpGFpReleasePool(3, pGF); - return pR; -} - - -static int factor2(BNU_CHUNK_T* pA, int nsA) -{ - int factor = 0; - int bits; - - int i; - for(i=0; i= BITSIZE(BNU_CHUNK_T)) { - int nchunk = bits/BITSIZE(BNU_CHUNK_T); - cpGFpElementCopyPadd(pA, nsA, pA+nchunk, nsA-nchunk); - bits %= BITSIZE(BNU_CHUNK_T); - } - if(bits) - cpLSR_BNU(pA, pA, nsA, bits); - - return factor; -} -static BNU_CHUNK_T* cpGFpExp2(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, int e, IppsGFpState* pGF) -{ - cpGFpElementCopy(pR, pA, GFP_FELEN(pGF)); - while(e--) { - pGF->sqr(pR, pR, pGF); - } - return pR; -} - -/* returns: - 0, if a - qnr - 1, if sqrt is found -*/ -int cpGFpSqrt(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF) -{ - int elemLen = GFP_FELEN(pGF); - int poolelementLen = GFP_PELEN(pGF); - int resultFlag = 1; - - /* case A==0 */ - if( GFP_IS_ZERO(pA, elemLen) ) - cpGFpElementPadd(pR, elemLen, 0); - - /* general case */ - else { - BNU_CHUNK_T* q = cpGFpGetPool(4, pGF); - BNU_CHUNK_T* x = q + poolelementLen; - BNU_CHUNK_T* y = x + poolelementLen; - BNU_CHUNK_T* z = y + poolelementLen; - - int s; - - /* z=1 */ - GFP_ONE(z, elemLen); - - /* (modulus-1) = 2^s*q */ - cpSub_BNU(q, GFP_MODULUS(pGF), z, elemLen); - s = factor2(q, elemLen); - - /* - // initialization - */ - - /* y = qnr^q */ - cpGFpExp(y, GFP_QNR(pGF), q,elemLen, pGF); - /* x = a^((q-1)/2) */ - cpSub_BNU(q, q, z, elemLen); - cpLSR_BNU(q, q, elemLen, 1); - cpGFpExp(x, pA, q, elemLen, pGF); - /* z = a*x^2 */ - pGF->mul(z, x, x, pGF); - pGF->mul(z, pA, z, pGF); - /* R = a*x */ - pGF->mul(pR, pA, x, pGF); - - while( !GFP_EQ(z, MNT_1(GFP_MONT(pGF)), elemLen) ) { - int m = 0; - cpGFpElementCopy(q, z, elemLen); - - for(m=1; mmul(q, q, q, pGF); - if( GFP_EQ(q, MNT_1(GFP_MONT(pGF)), elemLen) ) - break; - } - - if(m==s) { - /* A is quadratic non-residue */ - resultFlag = 0; - break; - } - else { - /* exponent reduction */ - cpGFpExp2(q, y, (s-m-1), pGF); /* q = y^(2^(s-m-1)) */ - pGF->mul(y, q, q, pGF); /* y = q^2 */ - pGF->mul(pR, q, pR, pGF); /* R = q*R */ - pGF->mul(z, y, z, pGF); /* z = z*y */ - s = m; - } - } - - /* choose smallest between R and (modulus-R) */ - cpGFpMontDecode(q, pR, elemLen, GFP_MONT(pGF)); - if(GFP_GT(q, GFP_HMODULUS(pGF), elemLen)) - pGF->neg(pR, pR, pGF); - - cpGFpReleasePool(4, pGF); - } - - return resultFlag; -} - - -BNU_CHUNK_T* cpGFpRand(BNU_CHUNK_T* pR, IppsGFpState* pGF, IppBitSupplier rndFunc, void* pRndParam, int montSpace) -{ - int elemLen = GFP_FELEN(pGF); - int reqBitSize = GFP_FEBITSIZE(pGF)+GF_RAND_ADD_BITS; - int nsR = (reqBitSize +BITSIZE(BNU_CHUNK_T)-1)/BITSIZE(BNU_CHUNK_T); - - BNU_CHUNK_T* pPool = cpGFpGetPool(2, pGF); - cpGFpElementPadd(pPool, nsR, 0); - rndFunc((Ipp32u*)pPool, reqBitSize, pRndParam); - - nsR = cpMod_BNU(pPool, nsR, GFP_MODULUS(pGF), elemLen); - cpGFpElementPadd(pPool+nsR, elemLen-nsR, 0); - if(montSpace) - cpGFpMontEncode(pR, pPool, elemLen, GFP_MONT(pGF)); - else - cpGFpElementCopy(pR, pPool, elemLen); - - cpGFpReleasePool(2, pGF); - return pR; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpstuff.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpstuff.h deleted file mode 100644 index d9b9d8b202..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpstuff.h +++ /dev/null @@ -1,212 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Purpose: -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives -// Internal GF(p) basic Definitions & Function Prototypes -// -// -*/ - -#if !defined(_PCP_GFP_H_) -#define _PCP_GFP_H_ - -#include "pcpbn.h" -#include "pcpmontgomery.h" - -/* GF element */ -typedef struct _cpElementGFp { - IppCtxId idCtx; /* GF() element ident */ - int length; /* length of element (in BNU_CHUNK_T) */ - BNU_CHUNK_T* pData; -} cpElementGFp; - -#define GFPE_ID(pCtx) ((pCtx)->idCtx) -#define GFPE_ROOM(pCtx) ((pCtx)->length) -#define GFPE_DATA(pCtx) ((pCtx)->pData) - -#define GFPE_TEST_ID(pCtx) (GFPE_ID((pCtx))==idCtxGFPE) - -/* basic GF arithmetic */ -typedef BNU_CHUNK_T* (*addm) (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -typedef BNU_CHUNK_T* (*subm) (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -typedef BNU_CHUNK_T* (*negm) (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -typedef BNU_CHUNK_T* (*mulm) (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -typedef BNU_CHUNK_T* (*sqrm) (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -typedef BNU_CHUNK_T* (*div2m)(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); - -/* GF(p) context */ -typedef struct _cpGFp cpGF_T; - -typedef struct _cpGFp { - IppCtxId idCtx; /* GFp spec ident */ - int gfdegree; /* degree of extension (==1 means basic GF(p)) */ - int elemLen; /* size of field element (in BNU_CHUNK_T) */ - int elemLen32; /* sizeof of field element (in Ipp32u) */ - int pelemLen; /* sizeof pool element (in BNU_CHUNK_T) */ - int modulusTypeSpc;/* modulus type specific */ - int epidParams; /* Intel(R) EPID 2.0 specific parameters */ - cpGF_T* pGroundGF; /* ground GF (refference on itself if basic GF(p)) */ - /* = methods: = */ - addm add; /* - gf add */ - subm sub; /* - gf sub */ - negm neg; /* - gf neg */ - mulm mul; /* - gf mul */ - sqrm sqr; /* - gf sqr */ - div2m div2; /* - gf div by 2 */ - /* ============ */ - BNU_CHUNK_T* pModulus; /* modulus or irreducible polypomial (without hight order term ==1) */ - BNU_CHUNK_T* pHalfModulus; /* modulus/2 if basic, NULL if extension */ - BNU_CHUNK_T* pQnr; /* quadratic non-residue if basic, NULL if extension */ - IppsMontState* pMontState; /* montgomery engine if basic, NULL if extension */ - BNU_CHUNK_T* pElemPool; /* pool of temporary field elements */ -} cpGFp; - -#define GFP_ALIGNMENT ((int)(sizeof(void*))) - -/* Local definitions */ -#define GF_MAX_BITSIZE (4096) /* max bitsize for GF element */ -#define GF_POOL_SIZE (8)//(10) /* num of elements into the pool */ -#define GF_RAND_ADD_BITS (128) /* parameter of random element generation */ - -#define GFP_ID(pCtx) ((pCtx)->idCtx) -#define GFP_DEGREE(pCtx) ((pCtx)->gfdegree) -#define GFP_FELEN(pCtx) ((pCtx)->elemLen) -#define GFP_FELEN32(pCtx) ((pCtx)->elemLen32) /////????!!!! -#define GFP_PELEN(pCtx) ((pCtx)->pelemLen) -#define FIELD_POLY_TYPE(pCtx) ((pCtx)->modulusTypeSpc) -#define EPID_PARAMS(pCtx) ((pCtx)->epidParams) -#define GFP_GROUNDGF(pCtx) ((pCtx)->pGroundGF) -#define GFP_MODULUS(pCtx) ((pCtx)->pModulus) -#define GFP_HMODULUS(pCtx) ((pCtx)->pHalfModulus) /* for Sqrt() function only */ -#define GFP_QNR(pCtx) ((pCtx)->pQnr) -#define GFP_POOL(pCtx) ((pCtx)->pElemPool) -#define GFP_MONT(pCtx) ((pCtx)->pMontState) - -/* type of field polynomial: */ -#define ARBITRARY (0) /* arbitrary */ -#define BINOMIAL (1) /* binomial */ - -#define GFP_FEBITSIZE(pCtx) (BITSIZE_BNU(GFP_MODULUS((pCtx)),GFP_FELEN((pCtx)))) -#define GFP_IS_BASIC(pCtx) (GFP_GROUNDGF((pCtx))==(pCtx)) -#define GFP_TEST_ID(pCtx) (GFP_ID((pCtx))==idCtxGFP) - -#define USE_MONT_SPACE_REPRESENTATION (1) - -/* -// get/release n element from/to the pool -*/ -__INLINE BNU_CHUNK_T* cpGFpGetPool(int n, IppsGFpState* pGF) -{ - BNU_CHUNK_T* pPool = GFP_POOL(pGF); - GFP_POOL(pGF) += n*GFP_PELEN(pGF); - return pPool; -} -__INLINE void cpGFpReleasePool(int n, IppsGFpState* pGF) -{ - GFP_POOL(pGF) -= n*GFP_PELEN(pGF); -} - - - -__INLINE int cpGFpElementLen(const BNU_CHUNK_T* pE, int nsE) -{ - for(; nsE>1 && 0==pE[nsE-1]; nsE--) ; - return nsE; -} -__INLINE BNU_CHUNK_T* cpGFpElementCopy(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pE, int nsE) -{ - int n; - for(n=0; n1 && pE[nsE-1]==pX[nsE-1]; nsE--) - ; - return pE[nsE-1]==pX[nsE-1]? 0 : pE[nsE-1]>pX[nsE-1]? 1:-1; -} -__INLINE int cpGFpElementIsEquChunk(const BNU_CHUNK_T* pE, int nsE, BNU_CHUNK_T x) -{ - int isEqu = (pE[0] == x); - return isEqu && (1==cpGFpElementLen(pE, nsE)); -} -__INLINE BNU_CHUNK_T* cpGFpElementSetChunk(BNU_CHUNK_T* pR, int nsR, BNU_CHUNK_T x) -{ - return cpGFpElementCopyPadd(pR, nsR, &x, 1); -} - - -#define GFP_LT(a,b,size) (-1==cpGFpElementCmp((a),(b),(size))) -#define GFP_EQ(a,b,size) ( 0==cpGFpElementCmp((a),(b),(size))) -#define GFP_GT(a,b,size) ( 1==cpGFpElementCmp((a),(b),(size))) - -#define GFP_IS_ZERO(a,size) cpGFpElementIsEquChunk((a),(size), 0) -#define GFP_IS_ONE(a,size) cpGFpElementIsEquChunk((a),(size), 1) - -#define GFP_ZERO(a,size) cpGFpElementSetChunk((a),(size), 0) -#define GFP_ONE(a,size) cpGFpElementSetChunk((a),(size), 1) - -#define GFP_IS_EVEN(a) (0==((a)[0]&1)) -#define GFP_IS_ODD(a) (1==((a)[0]&1)) - - -int cpGFpCompare(const IppsGFpState* pGFp1, const IppsGFpState* pGFp2); - -BNU_CHUNK_T* cpGFpRand(BNU_CHUNK_T* pR, IppsGFpState* pGF, IppBitSupplier rndFunc, void* pRndParam, int montSpace); -BNU_CHUNK_T* cpGFpSet (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pDataA, int nsA, IppsGFpState* pGF, int montSpace); -BNU_CHUNK_T* cpGFpGet (BNU_CHUNK_T* pDataA, int nsA, const BNU_CHUNK_T* pR, IppsGFpState* pGF, int montSpace); -BNU_CHUNK_T* cpGFpSetOctString(BNU_CHUNK_T* pR, const Ipp8u* pStr, int strSize, IppsGFpState* pGF, int montSpace); -Ipp8u* cpGFpGetOctString(Ipp8u* pStr, int strSize, const BNU_CHUNK_T* pA, IppsGFpState* pGF, int montSpace); - -BNU_CHUNK_T* cpGFpNeg (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -BNU_CHUNK_T* cpGFpInv (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -BNU_CHUNK_T* cpGFpHalve(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -BNU_CHUNK_T* cpGFpAdd (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -BNU_CHUNK_T* cpGFpSub (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -BNU_CHUNK_T* cpGFpMul (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -BNU_CHUNK_T* cpGFpSqr (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -BNU_CHUNK_T* cpGFpExp (BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pE, int nsE, IppsGFpState* pGF); - int cpGFpSqrt(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); - -#if(_IPP32E >= _IPP32E_M7) -BNU_CHUNK_T* cp256pAdd(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -BNU_CHUNK_T* cp256pSub(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -BNU_CHUNK_T* cp256pNeg(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -BNU_CHUNK_T* cp256pMul(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGF); -BNU_CHUNK_T* cp256pSqr(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -BNU_CHUNK_T* cp256pHalve(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGF); -#endif - -IppsBigNumState* cpGFpInitBigNum(IppsBigNumState* pBN, int len, BNU_CHUNK_T* pNumBuffer, BNU_CHUNK_T* pTmpBuffer); -IppsBigNumState* cpGFpSetBigNum(IppsBigNumState* pBN, int len, const BNU_CHUNK_T* pBNU, BNU_CHUNK_T* pTmpBuffer); - -#endif /* _PCP_GFP_H_ */ diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpx.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpx.c deleted file mode 100644 index be978bc148..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpx.c +++ /dev/null @@ -1,202 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Performance Primitives. Cryptography Primitives. -// Operations over GF(p) ectension. -// -// Context: -// ippsGFpxGetSize -// ippsGFpxInit -// ippsGFpGetInfo -// -*/ - -#include "owncpepid.h" - -#include "pcpgfpstuff.h" -#include "pcpgfpxstuff.h" - -/* Get context size */ -IPPFUN(IppStatus, ippsGFpxGetSize, (const IppsGFpState* pGroundGF, int deg, int* pSizeInBytes)) -{ - IPP_BAD_PTR2_RET(pGroundGF, pSizeInBytes); - IPP_BADARG_RET( deg<2, ippStsBadArgErr); - pGroundGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGroundGF, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGroundGF), ippStsContextMatchErr ); - - { - int elemGroundLen = GFP_FELEN(pGroundGF); - int elemLen = elemGroundLen * deg; - *pSizeInBytes = sizeof(IppsGFpState) - +elemLen * sizeof(BNU_CHUNK_T) /* field polynomial coeff. excluding leading 1 */ - +elemLen * sizeof(BNU_CHUNK_T) * GFPX_POOL_SIZE /* pool of temporary variables */ - +GFP_ALIGNMENT-1; - return ippStsNoErr; - } -} - -static void InitGFpxCtx(const IppsGFpState* pGroundGF, int deg, IppsGFpState* pGFpx) -{ - int elemLen = deg * GFP_FELEN(pGroundGF); - int elemLen32 = deg* GFP_FELEN32(pGroundGF); - - Ipp8u* ptr = (Ipp8u*)pGFpx + sizeof(IppsGFpState); - - /* context identifier */ - GFP_ID(pGFpx) = idCtxGFP; - /* extension degree */ - GFP_DEGREE(pGFpx) = deg; - /* length of element */ - GFP_FELEN(pGFpx)= elemLen; - GFP_FELEN32(pGFpx) = elemLen32; - GFP_PELEN(pGFpx) = elemLen; - FIELD_POLY_TYPE(pGFpx) = ARBITRARY; - EPID_PARAMS(pGFpx) = 0; - - pGFpx->add = cpGFpxAdd; - pGFpx->sub = cpGFpxSub; - pGFpx->neg = cpGFpxNeg; - pGFpx->mul = cpGFpxMul; - pGFpx->sqr = cpGFpxSqr; - pGFpx->div2= cpGFpxHalve; - - /* save ground GF() context address */ - GFP_GROUNDGF(pGFpx) = (IppsGFpState*)pGroundGF; - /* coefficients of field polynomial */ - GFP_MODULUS(pGFpx) = (BNU_CHUNK_T*)(ptr); ptr += elemLen * sizeof(BNU_CHUNK_T); - /* 1/2 modulus: no matter */ - GFP_HMODULUS(pGFpx) = NULL; - /* quadratic non-residue: no matter */ - GFP_QNR(pGFpx) = NULL; - /* montgomery engine: no matter */ - GFP_MONT(pGFpx) = NULL; - /* pool addresses */ - GFP_POOL(pGFpx) = (BNU_CHUNK_T*)(IPP_ALIGNED_PTR(ptr, (int)sizeof(BNU_CHUNK_T))); - - cpGFpElementPadd(GFP_MODULUS(pGFpx), elemLen, 0); -} - - -/* Init context by arbitrary irreducible polynomial */ -IPPFUN(IppStatus, ippsGFpxInit, (const IppsGFpState* pGroundGF, - const Ipp32u* pIrrPolynomial, int deg, - IppsGFpState* pGFpx)) -{ - IPP_BAD_PTR3_RET(pGFpx, pGroundGF, pIrrPolynomial); - pGroundGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGroundGF, GFP_ALIGNMENT) ); - pGFpx = (IppsGFpState*)( IPP_ALIGNED_PTR(pGFpx, GFP_ALIGNMENT) ); - pGroundGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGroundGF, GFP_ALIGNMENT) ); - - /* init context */ - InitGFpxCtx(pGroundGF, deg, pGFpx); - - { - BNU_CHUNK_T* pTmp = cpGFpGetPool(1, pGFpx); - - /* copy coefficients of irresucible (except high-order 1) */ - COPY_BNU((Ipp32u*)pTmp, pIrrPolynomial, GFP_FELEN32(pGFpx)); - /* convert coefficients of irresucible into internal representation and store */ - cpGFpxSet(GFP_MODULUS(pGFpx), pTmp, GFP_FELEN(pGFpx), pGFpx, USE_MONT_SPACE_REPRESENTATION); - - cpGFpReleasePool(1, pGFpx); - return ippStsNoErr; - } -} - -/* Init context by arbitrary irreducible binimial */ -IPPFUN(IppStatus, ippsGFpxInitBinomial,(const IppsGFpState* pGroundGF, - const IppsGFpElement* pGroundElm, int deg, - IppsGFpState* pGFpx)) -{ - IPP_BAD_PTR3_RET(pGFpx, pGroundGF, pGroundElm); - pGroundGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGroundGF, GFP_ALIGNMENT) ); - pGFpx = (IppsGFpState*)( IPP_ALIGNED_PTR(pGFpx, GFP_ALIGNMENT) ); - pGroundGF = (IppsGFpState*)( IPP_ALIGNED_PTR(pGroundGF, GFP_ALIGNMENT) ); - - /* init context */ - InitGFpxCtx(pGroundGF, deg, pGFpx); - - /* store low-order coefficient of irresucible into the context */ - cpGFpElementCopy(GFP_MODULUS(pGFpx), GFPE_DATA(pGroundElm), GFP_FELEN(pGroundGF)); - FIELD_POLY_TYPE(pGFpx) = BINOMIAL; - - /* test if field polynomial is match to Intel(R) EPID specific */ - { - int isEpidParam = 0; - - BNU_CHUNK_T* g0 = cpGFpGetPool(1, (IppsGFpState*)pGroundGF); - int elmLen = GFP_FELEN(pGroundGF); - - int basicExt = cpGFpBasicDegreeExtension(pGFpx); - int basicTermLen = GFP_FELEN(cpGFpBasic(pGroundGF)); - - /* convert g0 into regular representation */ - cpGFpxGet(g0, elmLen, GFPE_DATA(pGroundElm), (IppsGFpState*)pGroundGF, USE_MONT_SPACE_REPRESENTATION); - - switch(basicExt) { - case 2: - /* expected polynomial is g() = t^2 + (-beta), - beta =q-1 */ - isEpidParam = cpGFpElementIsEquChunk(g0,basicTermLen, 1); - break; - case 6: - /* expected polynomial is g() = t^3 + (-xi), - xi = 2+1*t, coeffs belongs to Fq */ - cpGFpxNeg(g0, g0, (IppsGFpState*)pGroundGF); - isEpidParam = EPID_PARAMS(pGroundGF) - && cpGFpElementIsEquChunk(g0,basicTermLen, 2) - && cpGFpElementIsEquChunk(g0+basicTermLen,basicTermLen, 1); - break; - case 12: - /* expected polynomial is g() = t^2 + (-vi), - vi = (0+0*t) + (1*t^2+0*t^3) + (0*t^4+0*t^5), coeffs belongs to Fq */ - cpGFpxNeg(g0, g0, (IppsGFpState*)pGroundGF); - isEpidParam = EPID_PARAMS(pGroundGF) - && cpGFpElementIsEquChunk(g0,basicTermLen, 0) - && cpGFpElementIsEquChunk(g0+basicTermLen, basicTermLen, 0) - && cpGFpElementIsEquChunk(g0+basicTermLen*2,basicTermLen, 1) - && cpGFpElementIsEquChunk(g0+basicTermLen*3,basicTermLen, 0) - && cpGFpElementIsEquChunk(g0+basicTermLen*4,basicTermLen, 0) - && cpGFpElementIsEquChunk(g0+basicTermLen*5,basicTermLen, 0); - break; - default: - isEpidParam = 0; - break; - } - EPID_PARAMS(pGFpx) = isEpidParam; - - cpGFpReleasePool(1, (IppsGFpState*)pGroundGF); - } - - return ippStsNoErr; -} - -/* get general info */ -IPPFUN(IppStatus, ippsGFpGetInfo,(const IppsGFpState* pGFpx, IppsGFpInfo* pInfo)) -{ - IPP_BAD_PTR2_RET(pGFpx, pInfo); - pGFpx = (IppsGFpState*)( IPP_ALIGNED_PTR(pGFpx, GFP_ALIGNMENT) ); - IPP_BADARG_RET( !GFP_TEST_ID(pGFpx), ippStsContextMatchErr ); - - pInfo->pBasicGF = cpGFpBasic(pGFpx); - pInfo->pGroundGF = GFP_GROUNDGF(pGFpx); - pInfo->basicGFdegree = cpGFpBasicDegreeExtension(pGFpx); - pInfo->groundGFdegree = GFP_DEGREE(pGFpx); - pInfo->elementLen = GFP_FELEN32(pGFpx); - - return ippStsNoErr; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpxstuff.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpxstuff.c deleted file mode 100644 index ae9a1f49b3..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpxstuff.c +++ /dev/null @@ -1,1307 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Performance Primitives. Cryptography Primitives. -// Internal operations over GF(p) extension. -// -// Context: -// cpGFpxCmpare -// cpGFpxSet -// cpGFpxRand -// cpGFpxGet -// -// cpGFpxHalve -// cpGFpxAdd, cpGFpxAdd_GFE -// cpGFpxSub, cpGFpxSub_GFE -// cpGFpxMul, cpGFpxMul_GFE -// cpGFp2biMul, cpGFp3biMul, cpGFpxMul_G0 -// cpGFpxSqr -// cpGFp2biSqr, cpGFp3biSqr -// cpGFpxNeg -// cpGFpxInv -// cpGFpxExp -// cpGFpxMultiExp -// cpGFpxConj -// -// -*/ - -#include "owncpepid.h" - -#include "pcpgfpxstuff.h" -//#include "pcptool.h" - - -/* -// compare GF. -// returns: -// 0 - are equial -// 1 - are different -// 2 - different structure -*/ -int cpGFpxCompare(const IppsGFpState* pGFpx1, const IppsGFpState* pGFpx2) -{ - while( !GFP_IS_BASIC(pGFpx1) && !GFP_IS_BASIC(pGFpx2) ) { - if( GFP_DEGREE(pGFpx1) != GFP_DEGREE(pGFpx2) ) - return 2; - if( GFP_FELEN(pGFpx1) != GFP_FELEN(pGFpx2) ) - return 1; - if(0 != cpGFpElementCmp(GFP_MODULUS(pGFpx1), GFP_MODULUS(pGFpx1), GFP_FELEN(pGFpx1)) ) - return 1; - pGFpx1 = GFP_GROUNDGF(pGFpx1); - pGFpx2 = GFP_GROUNDGF(pGFpx2); - } - - return (GFP_IS_BASIC(pGFpx1) && GFP_IS_BASIC(pGFpx2))? cpGFpCompare(pGFpx1, pGFpx2) : 2; -} - -BNU_CHUNK_T* cpGFpxRand(BNU_CHUNK_T* pR, IppsGFpState* pGFpx, IppBitSupplier rndFunc, void* pRndParam, int montSpace) -{ - if( GFP_IS_BASIC(pGFpx) ) - return cpGFpRand(pR, pGFpx, rndFunc, pRndParam, montSpace); - - else { - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - int basicElemLen = GFP_FELEN(pBasicGF); - int basicDeg = cpGFpBasicDegreeExtension(pGFpx); - - BNU_CHUNK_T* pTmp = pR; - int deg; - for(deg=0; deg0; deg++) { - int pieceA = IPP_MIN(nsA, basicElemLen); - - cpGFpGet(pTmp, pieceA, pE, pBasicGF, montSpace); - pE += basicElemLen; - pTmp += pieceA; - nsA -= pieceA; - } - - return pDataA; - } -} - -BNU_CHUNK_T* cpGFpxGetPolyTerm(BNU_CHUNK_T* pDataA, int nsA, const BNU_CHUNK_T* pE, int deg, IppsGFpState* pGFpx, int montSpace) -{ - pE += deg * GFP_FELEN(pGFpx); - return cpGFpxGet(pDataA, nsA, pE, pGFpx, montSpace); -} - -BNU_CHUNK_T* cpGFpxHalve(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - int basicElemLen = GFP_FELEN(pBasicGF); - int basicDeg = cpGFpBasicDegreeExtension(pGFpx); - - BNU_CHUNK_T* pTmp = pR; - int deg; - for(deg=0; degdiv2(pTmp, pA, pBasicGF); - pTmp += basicElemLen; - pA += basicElemLen; - } - return pR; -} - -BNU_CHUNK_T* cpGFpxAdd(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGFpx) -{ - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - int basicElemLen = GFP_FELEN(pBasicGF); - int basicDeg = cpGFpBasicDegreeExtension(pGFpx); - - BNU_CHUNK_T* pTmp = pR; - int deg; - for(deg=0; degadd(pTmp, pA, pB, pBasicGF); - pTmp += basicElemLen; - pA += basicElemLen; - pB += basicElemLen; - } - return pR; -} - -BNU_CHUNK_T* cpGFpxSub(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGFpx) -{ - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - int basicElemLen = GFP_FELEN(pBasicGF); - int basicDeg = cpGFpBasicDegreeExtension(pGFpx); - - BNU_CHUNK_T* pTmp = pR; - int deg; - for(deg=0; degsub(pTmp, pA, pB, pBasicGF); - pTmp += basicElemLen; - pA += basicElemLen; - pB += basicElemLen; - } - return pR; -} - -BNU_CHUNK_T* cpGFpxConj(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - int groundElemLen = GFP_FELEN(pGroundGF); - - if(pR != pA) - cpGFpElementCopy(pR, pA, groundElemLen); - //cpGFpxNeg(pR+groundElemLen, pA+groundElemLen, pGroundGF); - pGroundGF->neg(pR+groundElemLen, pA+groundElemLen, pGroundGF); - - return pR; -} - - -/* -// multiplication like GF(()^d).mul(a, g0), -// where: -// a, g0 belongs to ground GF() -// and g0 is low-order term of GF(()^d) generationg binominal g(t) = t^d + g0 -// is very important for Intel(R) EPID 2.0. -// -// Thus, this kind of multiplication is using -// 1) in iplementation of GF(p^2) multiplication -// 2) in iplementation of GF((p^6)^2) multiplication too -*/ -#if defined(_EPID20_GF_PARAM_SPECIFIC_) -#pragma message ("_EPID20_GF_PARAM_SPECIFIC_") - -__INLINE BNU_CHUNK_T* cpFqMul_beta(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - if(pR != pA) - cpGFpElementCopy(pR, pA, GFP_FELEN(pGFpx)); - return pR; -} - -__INLINE BNU_CHUNK_T* cpFq2Mul_xi(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - BNU_CHUNK_T* t0 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* t1 = cpGFpGetPool(1, pGroundGF); - - int termLen = GFP_FELEN(pGroundGF); - - const BNU_CHUNK_T* pA0 = pA; - const BNU_CHUNK_T* pA1 = pA+termLen; - BNU_CHUNK_T* pR0 = pR; - BNU_CHUNK_T* pR1 = pR+termLen; - pGroundGF->add(t0, pA0, pA0, pGroundGF); - pGroundGF->add(t1, pA0, pA1, pGroundGF); - pGroundGF->sub(pR0, t0, pA1, pGroundGF); - pGroundGF->add(pR1, t1, pA1, pGroundGF); - - cpGFpReleasePool(2, pGroundGF); - return pR; -} - -__INLINE BNU_CHUNK_T* cpFq6Mul_vi(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - int termLen = GFP_FELEN(pGroundGF); - - const BNU_CHUNK_T* pA0 = pA; - const BNU_CHUNK_T* pA1 = pA+termLen; - const BNU_CHUNK_T* pA2 = pA+termLen*2; - BNU_CHUNK_T* pR0 = pR; - BNU_CHUNK_T* pR1 = pR+termLen; - BNU_CHUNK_T* pR2 = pR+termLen*2; - - BNU_CHUNK_T* t = cpGFpGetPool(1, pGroundGF); - - cpFq2Mul_xi(t, pA2, pGroundGF); - cpGFpElementCopy(pR2, pA1, termLen); - cpGFpElementCopy(pR1, pA0, termLen); - cpGFpElementCopy(pR0, t, termLen); - - cpGFpReleasePool(1, pGroundGF); - - return pR; -} -#endif - -#if defined(_EXTENSION_2_BINOMIAL_SUPPORT_) || defined(_EXTENSION_3_BINOMIAL_SUPPORT_) -static BNU_CHUNK_T* cpGFpxMul_G0(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - BNU_CHUNK_T* pGFpolynomial = GFP_MODULUS(pGFpx); /* g(x) = t^d + g0 */ - return pGroundGF->mul(pR, pA, pGFpolynomial, GFP_GROUNDGF(pGFpx)); -} -#endif - -/* -// field polynomial: g(x) = t^2 + beta - binominal -// extension degree: 2 -*/ -#if defined(_EXTENSION_2_BINOMIAL_SUPPORT_) -static BNU_CHUNK_T* cpGFp2biMul(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - int groundElemLen = GFP_FELEN(pGroundGF); - - const BNU_CHUNK_T* pA0 = pA; - const BNU_CHUNK_T* pA1 = pA+groundElemLen; - - const BNU_CHUNK_T* pB0 = pB; - const BNU_CHUNK_T* pB1 = pB+groundElemLen; - - BNU_CHUNK_T* pR0 = pR; - BNU_CHUNK_T* pR1 = pR+groundElemLen; - - BNU_CHUNK_T* t0 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* t1 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* t2 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* t3 = cpGFpGetPool(1, pGroundGF); - - pGroundGF->mul(t0, pA0, pB0, pGroundGF); /* t0 = a[0]*b[0] */ - pGroundGF->mul(t1, pA1, pB1, pGroundGF); /* t1 = a[1]*b[1] */ - pGroundGF->add(t2, pA0, pA1,pGroundGF); /* t2 = a[0]+a[1] */ - pGroundGF->add(t3, pB0, pB1,pGroundGF); /* t3 = b[0]+b[1] */ - - pGroundGF->mul(pR1, t2, t3, pGroundGF); /* r[1] = (a[0]+a[1]) * (b[0]+b[1]) */ - pGroundGF->sub(pR1, pR1, t0, pGroundGF); /* r[1] -= a[0]*b[0]) + a[1]*b[1] */ - pGroundGF->sub(pR1, pR1, t1, pGroundGF); - - #if defined(_EPID20_GF_PARAM_SPECIFIC_) /* r[0] = t0 - t1*beta */ - { - int basicExtDegree = cpGFpBasicDegreeExtension(pGFpx); - if(basicExtDegree==2 && EPID_PARAMS(pGFpx)) { - //cpFqMul_beta(t1, t1, pGroundGF); - pGroundGF->sub(pR0, t0, t1, pGroundGF); - } - else if(basicExtDegree==12 && EPID_PARAMS(pGFpx)) { - cpFq6Mul_vi(t1, t1, pGroundGF); - pGroundGF->add(pR0, t0, t1, pGroundGF); - } - else { - cpGFpxMul_G0(t1, t1, pGFpx); - pGroundGF->sub(pR0, t0, t1, pGroundGF); - } - } - #else - cpGFpxMul_G0(t1, t1, pGFpx); - pGroundGF->sub(pR0, t0, t1, pGroundGF); - #endif - - cpGFpReleasePool(4, pGroundGF); - return pR; -} -#endif - -/* -// field polynomial: g(x) = t^3 + beta - binominal -// extension degree: 3 -*/ -#if defined(_EXTENSION_3_BINOMIAL_SUPPORT_) -static BNU_CHUNK_T* cpGFp3biMul(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - int groundElemLen = GFP_FELEN(pGroundGF); - - const BNU_CHUNK_T* pA0 = pA; - const BNU_CHUNK_T* pA1 = pA+groundElemLen; - const BNU_CHUNK_T* pA2 = pA+groundElemLen*2; - - const BNU_CHUNK_T* pB0 = pB; - const BNU_CHUNK_T* pB1 = pB+groundElemLen; - const BNU_CHUNK_T* pB2 = pB+groundElemLen*2; - - BNU_CHUNK_T* pR0 = pR; - BNU_CHUNK_T* pR1 = pR+groundElemLen; - BNU_CHUNK_T* pR2 = pR+groundElemLen*2; - - BNU_CHUNK_T* t0 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* t1 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* t2 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* u0 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* u1 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* u2 = cpGFpGetPool(1, pGroundGF); - - pGroundGF->add(u0 ,pA0, pA1, pGroundGF); /* u0 = a[0]+a[1] */ - pGroundGF->add(t0 ,pB0, pB1, pGroundGF); /* t0 = b[0]+b[1] */ - pGroundGF->mul(u0, u0, t0, pGroundGF); /* u0 = (a[0]+a[1])*(b[0]+b[1]) */ - pGroundGF->mul(t0, pA0, pB0, pGroundGF); /* t0 = a[0]*b[0] */ - - pGroundGF->add(u1 ,pA1, pA2, pGroundGF); /* u1 = a[1]+a[2] */ - pGroundGF->add(t1 ,pB1, pB2, pGroundGF); /* t1 = b[1]+b[2] */ - pGroundGF->mul(u1, u1, t1, pGroundGF); /* u1 = (a[1]+a[2])*(b[1]+b[2]) */ - pGroundGF->mul(t1, pA1, pB1, pGroundGF); /* t1 = a[1]*b[1] */ - - pGroundGF->add(u2 ,pA2, pA0, pGroundGF); /* u2 = a[2]+a[0] */ - pGroundGF->add(t2 ,pB2, pB0, pGroundGF); /* t2 = b[2]+b[0] */ - pGroundGF->mul(u2, u2, t2, pGroundGF); /* u2 = (a[2]+a[0])*(b[2]+b[0]) */ - pGroundGF->mul(t2, pA2, pB2, pGroundGF); /* t2 = a[2]*b[2] */ - - pGroundGF->sub(u0, u0, t0, pGroundGF); /* u0 = a[0]*b[1]+a[1]*b[0] */ - pGroundGF->sub(u0, u0, t1, pGroundGF); - pGroundGF->sub(u1, u1, t1, pGroundGF); /* u1 = a[1]*b[2]+a[2]*b[1] */ - pGroundGF->sub(u1, u1, t2, pGroundGF); - pGroundGF->sub(u2, u2, t2, pGroundGF); /* u2 = a[2]*b[0]+a[0]*b[2] */ - pGroundGF->sub(u2, u2, t0, pGroundGF); - - #if defined(_EPID20_GF_PARAM_SPECIFIC_) - { - int basicExtDegree = cpGFpBasicDegreeExtension(pGFpx); - if(basicExtDegree==6 && EPID_PARAMS(pGFpx)) { - cpFq2Mul_xi(u1, u1, pGroundGF); - cpFq2Mul_xi(t2, t2, pGroundGF); - pGroundGF->add(pR0, t0, u1, pGroundGF); /* r[0] = a[0]*b[0] - (a[2]*b[1]+a[1]*b[2])*beta */ - pGroundGF->add(pR1, u0, t2, pGroundGF); /* r[1] = a[1]*b[0] + a[0]*b[1] - a[2]*b[2]*beta */ - } - else { - cpGFpxMul_G0(u1, u1, pGFpx); /* u1 = (a[1]*b[2]+a[2]*b[1]) * beta */ - cpGFpxMul_G0(t2, t2, pGFpx); /* t2 = a[2]*b[2] * beta */ - pGroundGF->sub(pR0, t0, u1, pGroundGF); /* r[0] = a[0]*b[0] - (a[2]*b[1]+a[1]*b[2])*beta */ - pGroundGF->sub(pR1, u0, t2, pGroundGF); /* r[1] = a[1]*b[0] + a[0]*b[1] - a[2]*b[2]*beta */ - } - } - #else - cpGFpxMul_G0(u1, u1, pGFpx); /* u1 = (a[1]*b[2]+a[2]*b[1]) * beta */ - cpGFpxMul_G0(t2, t2, pGFpx); /* t2 = a[2]*b[2] * beta */ - - pGroundGF->sub(pR0, t0, u1, pGroundGF); /* r[0] = a[0]*b[0] - (a[2]*b[1]+a[1]*b[2])*beta */ - pGroundGF->sub(pR1, u0, t2, pGroundGF); /* r[1] = a[1]*b[0] + a[0]*b[1] - a[2]*b[2]*beta */ - #endif - - pGroundGF->add(pR2, u2, t1, pGroundGF); /* r[2] = a[2]*b[0] + a[1]*b[1] + a[0]*b[2] */ - - cpGFpReleasePool(6, pGroundGF); - return pR; -} -#endif - -BNU_CHUNK_T* cpGFpxMul(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pB, IppsGFpState* pGFpx) -{ - int extDegree = GFP_DEGREE(pGFpx); - - #if defined(_EXTENSION_2_BINOMIAL_SUPPORT_) - #pragma message ("_EXTENSION_2_BINOMIAL_SUPPORT_") - if(BINOMIAL==FIELD_POLY_TYPE(pGFpx) && extDegree==2) - return cpGFp2biMul(pR, pA, pB, pGFpx); - #endif - - #if defined(_EXTENSION_3_BINOMIAL_SUPPORT_) - #pragma message ("_EXTENSION_3_BINOMIAL_SUPPORT_") - if(BINOMIAL==FIELD_POLY_TYPE(pGFpx) && extDegree==3) - return cpGFp3biMul(pR, pA, pB, pGFpx); - #endif - - { - BNU_CHUNK_T* pGFpolynomial = GFP_MODULUS(pGFpx); - int degR = extDegree-1; - int elemLen= GFP_FELEN(pGFpx); - - int degB = degR; - BNU_CHUNK_T* pTmpProduct = cpGFpGetPool(2, pGFpx); - BNU_CHUNK_T* pTmpResult = pTmpProduct + GFP_PELEN(pGFpx); - - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - BNU_CHUNK_T* r = cpGFpGetPool(1, pGroundGF); - int groundElemLen = GFP_FELEN(pGroundGF); - - const BNU_CHUNK_T* pTmpB = GFPX_IDX_ELEMENT(pB, degB, groundElemLen); - - /* clear temporary */ - cpGFpElementPadd(pTmpProduct, elemLen, 0); - - /* R = A * B[degB-1] */ - cpGFpxMul_GFE(pTmpResult, pA, pTmpB, pGFpx); - - for(degB-=1; degB>=0; degB--) { - /* save R[degR-1] */ - cpGFpElementCopy(r, GFPX_IDX_ELEMENT(pTmpResult, degR, groundElemLen), groundElemLen); - - { /* R = R * x */ - int j; - for (j=degR; j>=1; j--) - cpGFpElementCopy(GFPX_IDX_ELEMENT(pTmpResult, j, groundElemLen), GFPX_IDX_ELEMENT(pTmpResult, j-1, groundElemLen), groundElemLen); - cpGFpElementPadd(pTmpResult, groundElemLen, 0); - } - - cpGFpxMul_GFE(pTmpProduct, pGFpolynomial, r, pGFpx); - pGFpx->sub(pTmpResult, pTmpResult, pTmpProduct, pGFpx); - - /* B[degB-i] */ - pTmpB -= groundElemLen; - cpGFpxMul_GFE(pTmpProduct, pA, pTmpB, pGFpx); - pGFpx->add(pTmpResult, pTmpResult, pTmpProduct, pGFpx); - } - - /* copy result */ - cpGFpElementCopy(pR, pTmpResult, elemLen); - - /* release pools */ - cpGFpReleasePool(1, pGroundGF); - cpGFpReleasePool(2, pGFpx); - - return pR; - } -} - -/* -// field polynomial: binominal -// extension degree: 2 -*/ -#if defined(_EXTENSION_2_BINOMIAL_SUPPORT_) -static BNU_CHUNK_T* cpGFp2biSqr(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - int groundElemLen = GFP_FELEN(pGroundGF); - - const BNU_CHUNK_T* pA0 = pA; - const BNU_CHUNK_T* pA1 = pA+groundElemLen; - - BNU_CHUNK_T* pR0 = pR; - BNU_CHUNK_T* pR1 = pR+groundElemLen; - - BNU_CHUNK_T* t0 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* t1 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* u0 = cpGFpGetPool(1, pGroundGF); - - pGroundGF->mul(u0, pA0, pA1, pGroundGF); /* u0 = a[0]*a[1] */ - - #if defined(_EPID20_GF_PARAM_SPECIFIC_) /* r[0] = t0 - t1*beta */ - { - int basicExtDegree = cpGFpBasicDegreeExtension(pGFpx); - if(basicExtDegree==2 && EPID_PARAMS(pGFpx)) { - pGroundGF->add(t0, pA0, pA1, pGroundGF); - pGroundGF->sub(t1, pA0, pA1, pGroundGF); - pGroundGF->mul(pR0, t0, t1, pGroundGF); - pGroundGF->add(pR1, u0, u0, pGroundGF); /* r[1] = 2*a[0]*a[1] */ - } - else if(basicExtDegree==12 && EPID_PARAMS(pGFpx)) { - pGroundGF->sub(t0, pA0, pA1, pGroundGF); - cpFq6Mul_vi(t1, pA1, pGroundGF); - pGroundGF->sub(t1, pA0, t1, pGroundGF); - pGroundGF->mul(t0, t0, t1, pGroundGF); - pGroundGF->add(t0, t0, u0, pGroundGF); - cpFq6Mul_vi(t1, u0, pGroundGF); - pGroundGF->add(pR0, t0, t1, pGroundGF); - pGroundGF->add(pR1, u0, u0, pGroundGF); - } - else { - pGroundGF->sqr(t0, pA0, pGroundGF); /* t0 = a[0]*a[0] */ - pGroundGF->sqr(t1, pA1, pGroundGF); /* t1 = a[1]*a[1] */ - cpGFpxMul_G0(t1, t1, pGFpx); - pGroundGF->sub(pR0, t0, t1, pGroundGF); - pGroundGF->add(pR1, u0, u0, pGroundGF); /* r[1] = 2*a[0]*a[1] */ - } - } - #else - pGroundGF->sqr(t0, pA0, pGroundGF); /* t0 = a[0]*a[0] */ - pGroundGF->sqr(t1, pA1, pGroundGF); /* t1 = a[1]*a[1] */ - cpGFpxMul_G0(t1, t1, pGFpx); - pGroundGF->sub(pR0, t0, t1, pGroundGF); - pGroundGF->add(pR1, u0, u0, pGroundGF); /* r[1] = 2*a[0]*a[1] */ - #endif - - cpGFpReleasePool(3, pGroundGF); - return pR; -} -#endif - -/* -// field polynomial: binominal -// extension degree: 3 -*/ -#if defined(_EXTENSION_3_BINOMIAL_SUPPORT_) -static BNU_CHUNK_T* cpGFp3biSqr(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - int groundElemLen = GFP_FELEN(pGroundGF); - - const BNU_CHUNK_T* pA0 = pA; - const BNU_CHUNK_T* pA1 = pA+groundElemLen; - const BNU_CHUNK_T* pA2 = pA+groundElemLen*2; - - BNU_CHUNK_T* pR0 = pR; - BNU_CHUNK_T* pR1 = pR+groundElemLen; - BNU_CHUNK_T* pR2 = pR+groundElemLen*2; - - BNU_CHUNK_T* s0 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* s1 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* s2 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* s3 = cpGFpGetPool(1, pGroundGF); - BNU_CHUNK_T* s4 = cpGFpGetPool(1, pGroundGF); - - pGroundGF->add(s2, pA0, pA2, pGroundGF); - pGroundGF->sub(s2, s2, pA1, pGroundGF); - pGroundGF->sqr(s2, s2, pGroundGF); - pGroundGF->sqr(s0, pA0, pGroundGF); - pGroundGF->sqr(s4, pA2, pGroundGF); - pGroundGF->mul(s1, pA0, pA1, pGroundGF); - pGroundGF->mul(s3, pA1, pA2, pGroundGF); - pGroundGF->add(s1, s1, s1, pGroundGF); - pGroundGF->add(s3, s3, s3, pGroundGF); - - pGroundGF->add(pR2, s1, s2, pGroundGF); - pGroundGF->add(pR2, pR2, s3, pGroundGF); - pGroundGF->sub(pR2, pR2, s0, pGroundGF); - pGroundGF->sub(pR2, pR2, s4, pGroundGF); - - #if defined(_EPID20_GF_PARAM_SPECIFIC_) - { - int basicExtDegree = cpGFpBasicDegreeExtension(pGFpx); - if(basicExtDegree==6 && EPID_PARAMS(pGFpx)) { - cpFq2Mul_xi(s4, s4, pGroundGF); - cpFq2Mul_xi(s3, s3, pGroundGF); - pGroundGF->add(pR1, s1, s4, pGroundGF); - pGroundGF->add(pR0, s0, s3, pGroundGF); - } - else { - cpGFpxMul_G0(s4, s4, pGFpx); - cpGFpxMul_G0(s3, s3, pGFpx); - pGroundGF->sub(pR1, s1, s4, pGroundGF); - pGroundGF->sub(pR0, s0, s3, pGroundGF); - } - } - - #else - cpGFpxMul_G0(s4, s4, pGFpx); - pGroundGF->sub(pR1, s1, s4, pGroundGF); - - cpGFpxMul_G0(s3, s3, pGFpx); - pGroundGF->sub(pR0, s0, s3, pGroundGF); - #endif - - cpGFpReleasePool(5, pGroundGF); - return pR; -} -#endif - -BNU_CHUNK_T* cpGFpxSqr(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - int extDegree = GFP_DEGREE(pGFpx); - - #if defined(_EXTENSION_2_BINOMIAL_SUPPORT_) - #pragma message ("_EXTENSION_2_BINOMIAL_SUPPORT_") - if(BINOMIAL==FIELD_POLY_TYPE(pGFpx) && extDegree==2) - return cpGFp2biSqr(pR, pA, pGFpx); - #endif - - #if defined(_EXTENSION_3_BINOMIAL_SUPPORT_) - #pragma message ("_EXTENSION_3_BINOMIAL_SUPPORT_") - if(BINOMIAL==FIELD_POLY_TYPE(pGFpx) && extDegree==3) - return cpGFp3biSqr(pR, pA, pGFpx); - #endif - - { - BNU_CHUNK_T* pGFpolynomial = GFP_MODULUS(pGFpx); - int degR = extDegree-1; - int elemLen= GFP_FELEN(pGFpx); - - int degA = degR; - BNU_CHUNK_T* pTmpProduct = cpGFpGetPool(2, pGFpx); - BNU_CHUNK_T* pTmpResult = pTmpProduct + GFP_PELEN(pGFpx); - - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - BNU_CHUNK_T* r = cpGFpGetPool(1, pGroundGF); - int groundElemLen = GFP_FELEN(pGroundGF); - - const BNU_CHUNK_T* pTmpA = GFPX_IDX_ELEMENT(pA, degA, groundElemLen); - - /* clear temporary */ - cpGFpElementPadd(pTmpProduct, elemLen, 0); - - /* R = A * A[degA-1] */ - cpGFpxMul_GFE(pTmpResult, pA, pTmpA, pGFpx); - - for(degA-=1; degA>=0; degA--) { - /* save R[degR-1] */ - cpGFpElementCopy(r, GFPX_IDX_ELEMENT(pTmpResult, degR, groundElemLen), groundElemLen); - - { /* R = R * x */ - int j; - for (j=degR; j>=1; j--) - cpGFpElementCopy(GFPX_IDX_ELEMENT(pTmpResult, j, groundElemLen), GFPX_IDX_ELEMENT(pTmpResult, j-1, groundElemLen), groundElemLen); - cpGFpElementPadd(pTmpResult, groundElemLen, 0); - } - - cpGFpxMul_GFE(pTmpProduct, pGFpolynomial, r, pGFpx); - pGFpx->sub(pTmpResult, pTmpResult, pTmpProduct, pGFpx); - - /* A[degA-i] */ - pTmpA -= groundElemLen; - cpGFpxMul_GFE(pTmpProduct, pA, pTmpA, pGFpx); - pGFpx->add(pTmpResult, pTmpResult, pTmpProduct, pGFpx); - } - - /* copy result */ - cpGFpElementCopy(pR, pTmpResult, elemLen); - - /* release pools */ - cpGFpReleasePool(1, pGroundGF); - cpGFpReleasePool(2, pGFpx); - - return pR; - } -} - -BNU_CHUNK_T* cpGFpxAdd_GFE(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pGroundB, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - - if(pR != pA) { - int groundElemLen = GFP_FELEN(pGroundGF); - int deg = GFP_DEGREE(pGFpx); - cpGFpElementCopy(pR+groundElemLen, pA+groundElemLen, groundElemLen*(deg-1)); - } - return pGroundGF->add(pR, pA, pGroundB, pGroundGF); -} - -BNU_CHUNK_T* cpGFpxSub_GFE(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pGroundB, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - - if(pR != pA) { - int groundElemLen = GFP_FELEN(pGroundGF); - int deg = GFP_DEGREE(pGFpx); - cpGFpElementCopy(pR+groundElemLen, pA+groundElemLen, groundElemLen*(deg-1)); - } - return pGroundGF->sub(pR, pA, pGroundB, pGroundGF); -} - -BNU_CHUNK_T* cpGFpxMul_GFE(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pGroundB, IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - int grounfElemLen = GFP_FELEN(pGroundGF); - - BNU_CHUNK_T* pTmp = pR; - - int deg; - for(deg=0; degmul(pTmp, pA, pGroundB, pGroundGF); - pTmp += grounfElemLen; - pA += grounfElemLen; - } - return pR; -} - -BNU_CHUNK_T* cpGFpxNeg(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, IppsGFpState* pGFpx) -{ - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - int basicElemLen = GFP_FELEN(pBasicGF); - int basicDeg = cpGFpBasicDegreeExtension(pGFpx); - - BNU_CHUNK_T* pTmp = pR; - int deg; - for(deg=0; degneg(pTmp, pA, pBasicGF); - pTmp += basicElemLen; - pA += basicElemLen; - } - return pR; -} - -////////////////////////////////////////////////////////////////// -BNU_CHUNK_T* gfpolyDiv_v0(BNU_CHUNK_T* pQ, BNU_CHUNK_T* pR, - const BNU_CHUNK_T* pA, - const BNU_CHUNK_T* pB, - IppsGFpState* pGFpx) -{ - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFpx); - - if( GFP_IS_BASIC(pGroundGF) ) { - int elemLen = GFP_FELEN(pGFpx); - int termLen = GFP_FELEN(pGroundGF); - - int degA = degree(pA, pGFpx); - int degB = degree(pB, pGFpx); - - if(degB==0) { - if( GFP_IS_ZERO(pB, termLen) ) - return NULL; - else { - cpGFpInv(pR, pB, pGroundGF); - cpGFpElementPadd(pQ, elemLen, 0); - cpGFpxMul_GFE(pQ, pA, pR, pGFpx); - cpGFpElementPadd(pR, elemLen, 0); - return pR; - } - } - - if(degA < degB) { - cpGFpElementPadd(pQ, elemLen, 0); - cpGFpElementCopyPadd(pR, elemLen, pA, (degA+1)*termLen); - return pR; - } - - else { - int i, j; - BNU_CHUNK_T* pProduct = cpGFpGetPool(2, pGroundGF); - BNU_CHUNK_T* pInvB = pProduct + GFP_PELEN(pGroundGF); - - cpGFpElementCopyPadd(pR, elemLen, pA, (degA+1)*termLen); - cpGFpElementPadd(pQ, elemLen, 0); - - cpGFpInv(pInvB, GFPX_IDX_ELEMENT(pB, degB, termLen), pGroundGF); - - for(i=0; i<=degA-degB && !GFP_IS_ZERO(GFPX_IDX_ELEMENT(pR, degA-i, termLen), termLen); i++) { - /* compute q term */ - cpGFpMul(GFPX_IDX_ELEMENT(pQ, degA-degB-i, termLen), - GFPX_IDX_ELEMENT(pR, degA-i, termLen), - pInvB, - pGroundGF); - - /* R -= B * q */ - cpGFpElementPadd(GFPX_IDX_ELEMENT(pR, degA-i, termLen), termLen, 0); - for(j=0; j 0) { - gfpxPolyDiv(quo, temp, lastrem, rem, pGFpx); - SWAP_PTR(BNU_CHUNK_T, rem, lastrem); // - SWAP_PTR(BNU_CHUNK_T, temp, rem); - - cpGFpxNeg(quo, quo, pGFpx); - cpGFpxMul(temp, quo, aux, pGFpx); - cpGFpxAdd(temp, lastaux, temp, pGFpx); - SWAP_PTR(BNU_CHUNK_T, aux, lastaux); - SWAP_PTR(BNU_CHUNK_T, temp, aux); - } - if (GFP_IS_ZERO(rem, elemLen)) { /* gcd != 1 */ - cpGFpReleasePool(pxVars, pGFpx); - return NULL; - } - - { - BNU_CHUNK_T* invRem = cpGFpGetPool(1, pGroundGF); - - cpGFpxInv(invRem, rem, pGroundGF); - cpGFpxMul_GFE(pR, aux, invRem, pGFpx); - - cpGFpReleasePool(1, pGroundGF); - } - - cpGFpReleasePool(pxVars, pGFpx); - - return pR; - } -} - - -static int div_upper(int a, int d) -{ return (a+d-1)/d; } - -static int getNumOperations(int bitsize, int w) -{ - int n_overhead = (1<=n_opt) break; - w_opt = w_trial; - n_opt = n_trial; - } - return w_opt; -#undef LIMIT -} - - -/* sscm version */ -BNU_CHUNK_T* cpGFpxExp(BNU_CHUNK_T* pR, const BNU_CHUNK_T* pA, const BNU_CHUNK_T* pE, int nsE, - IppsGFpState* pGFpx, Ipp8u* pScratchBuffer) -{ - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - - /* remove leding zeros */ - FIX_BNU(pE, nsE); - - { - Ipp8u* pScratchAligned; /* aligned scratch buffer */ - int nAllocation = 0; /* points from the pool */ - - /* size of element (bytes) */ - int elmDataSize = GFP_FELEN(pGFpx)*sizeof(BNU_CHUNK_T); - - /* exponent bitsize */ - int expBitSize = BITSIZE_BNU(pE, nsE); - /* optimal size of window */ - int w = (NULL==pScratchBuffer)? 1 : cpGFpGetOptimalWinSize(expBitSize); - /* number of table entries */ - int nPrecomputed = 1<mul(pTmp, pTmp, pA, pGFpx); - cpScramblePut(pScratchAligned+n, nPrecomputed, (Ipp8u*)pTmp, elmDataSize); - } - } - - { - /* copy exponent value */ - cpGFpElementCopy(pExpandedE, pE, nsE); - - /* expand exponent value */ - ((Ipp32u*)pExpandedE)[BITS2WORD32_SIZE(expBitSize)] = 0; - expBitSize = ((expBitSize+w-1)/w)*w; - - /* - // exponentiation - */ - { - /* digit mask */ - BNU_CHUNK_T dmask = nPrecomputed-1; - - /* position (bit number) of the leftmost window */ - int wPosition = expBitSize-w; - - /* extract leftmost window value */ - Ipp32u eChunk = *((Ipp32u*)((Ipp16u*)pExpandedE+ wPosition/BITSIZE(Ipp16u))); - int shift = wPosition & 0xF; - Ipp32u windowVal = (eChunk>>shift) & dmask; - - /* initialize result */ - cpScrambleGet((Ipp8u*)pR, elmDataSize, pScratchAligned+windowVal, nPrecomputed); - - for(wPosition-=w; wPosition>=0; wPosition-=w) { - int k; - /* w times squaring */ - for(k=0; ksqr(pR, pR, pGFpx); - - /* extract next window value */ - eChunk = *((Ipp32u*)((Ipp16u*)pExpandedE+ wPosition/BITSIZE(Ipp16u))); - shift = wPosition & 0xF; - windowVal = (eChunk>>shift) & dmask; - - /* extract value from the pre-computed table */ - cpScrambleGet((Ipp8u*)pTmp, elmDataSize, pScratchAligned+windowVal, nPrecomputed); - - /* and multiply */ - pGFpx->mul(pR, pR, pTmp, pGFpx); - } - } - - } - - cpGFpReleasePool(nAllocation+2, pGFpx); - - return pR; - } -} - - -static void cpPrecomputeMultiExp(Ipp8u* pTable, const BNU_CHUNK_T* ppA[], int nItems, IppsGFpState* pGFpx) -{ - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - - int nPrecomputed = 1<=0; k--) { - int tblIdx = baseIdx; - - int n; - for(n=0; nmul(pT, pT, ppA[k], pGFpx); - cpScramblePut(pTable+tblIdx+step, nPrecomputed, (Ipp8u*)pT, elmDataSize); - } - - nPasses *= 2; - step /= 2; - } - } - } - } - - /* release resourse */ - cpGFpReleasePool(1, pGFpx); -} - -static int cpGetMaxBitsizeExponent(const BNU_CHUNK_T* ppE[], int nsE[], int nItems) -{ - int n; - /* find out the longest exponent */ - int expBitSize = BITSIZE_BNU(ppE[0], nsE[0]); - for(n=1; n0; n--) { - const Ipp8u* pE = ((Ipp8u*)ppE[n-1]) + offset; - Ipp8u e = pE[0]; - index <<= 1; - index += (e>>shift) &1; - } - return index; -} - -/* sscm version */ -BNU_CHUNK_T* cpGFpxMultiExp(BNU_CHUNK_T* pR, const BNU_CHUNK_T* ppA[], const BNU_CHUNK_T* ppE[], int nsE[], int nItems, - IppsGFpState* pGFpx, Ipp8u* pScratchBuffer) -{ - /* align scratch buffer */ - Ipp8u* pScratchAligned = IPP_ALIGNED_PTR(pScratchBuffer, CACHE_LINE_SIZE); - /* pre-compute table */ - cpPrecomputeMultiExp(pScratchAligned, ppA, nItems, pGFpx); - - { - /* find out the longest exponent */ - int expBitSize = cpGetMaxBitsizeExponent(ppE, nsE, nItems); - - /* allocate resource and copy expanded exponents into */ - const BNU_CHUNK_T* ppExponent[LOG2_CACHE_LINE_SIZE]; - { - int n; - for(n=0; n=0; expBitSize--) { - pGFpx->sqr(pR, pR, pGFpx); - tblIdx = GetIndex(ppExponent, nItems, expBitSize); - cpScrambleGet((Ipp8u*)pT, elmDataSize, pScratchAligned+tblIdx, nPrecomputed); - pGFpx->mul(pR, pR, pT, pGFpx); - } - - /* release resourse */ - cpGFpReleasePool(1, pGFpx); - } - - /* release resourse */ - cpGFpReleasePool(nItems, pGFpx); - - return pR; - } -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpxstuff.h b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpxstuff.h deleted file mode 100644 index e887034a7a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/ext/ipp/sources/ippcpepid/src/pcpgfpxstuff.h +++ /dev/null @@ -1,174 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/* -// Intel(R) Integrated Performance Primitives -// Cryptographic Primitives (ippCP) -// GF(p) extension internal -// -*/ - -#if !defined(_PCP_GFPEXT_H_) -#define _PCP_GFPEXT_H_ - -#include "pcpgfpstuff.h" - - -#define _EXTENSION_2_BINOMIAL_SUPPORT_ -#define _EXTENSION_3_BINOMIAL_SUPPORT_ - -#if defined(_EXTENSION_2_BINOMIAL_SUPPORT_) && defined(_EXTENSION_3_BINOMIAL_SUPPORT_) - /* Intel(R) EPID specific: - (Fq2) GF(q^2) generating polynomial is g(t) = t^2 + beta, beta = 1 - - */ - #define _EPID20_GF_PARAM_SPECIFIC_ -#endif - -/* GF(p^d) pool */ -#define GFPX_PESIZE(pGF) GFP_FELEN((pGF)) -#define GFPX_POOL_SIZE (14) //(8) /* Number of temporary variables in pool */ - -/* address of ground field element inside expanded field element */ -#define GFPX_IDX_ELEMENT(pxe, idx, eleSize) ((pxe)+(eleSize)*(idx)) - -#if 0 -/* internal function prototypes */ -__INLINE BNU_CHUNK_T* cpGFpxGetPool(int n, IppsGFpState* pGFpx) -{ - BNU_CHUNK_T* pPool = GFP_POOL(pGFpx); - GFP_POOL(pGFpx) += n*GFPX_PESIZE(pGFpx); - return pPool; -} -__INLINE void cpGFpxReleasePool(int n, IppsGFpState* pGFpx) -{ - GFP_POOL(pGFpx) -= n * GFPX_PESIZE(pGFpx); -} -#endif - -__INLINE int degree(const BNU_CHUNK_T* pE, const IppsGFpState* pGFpx) -{ - int groundElemLen = GFP_FELEN( (IppsGFpState*)GFP_GROUNDGF(pGFpx) ); - int deg; - for(deg=GFP_DEGREE(pGFpx)-1; deg>=0; deg-- ) { - if(!GFP_IS_ZERO(pE+groundElemLen*deg, groundElemLen)) break; - } - return deg; -} - -__INLINE IppsGFpState* cpGFpBasic(const IppsGFpState* pGFp) -{ - while( !GFP_IS_BASIC(pGFp) ) { - pGFp = GFP_GROUNDGF(pGFp); - } - return (IppsGFpState*)pGFp; -} -__INLINE int cpGFpBasicDegreeExtension(const IppsGFpState* pGFp) -{ - int degree = GFP_DEGREE(pGFp); - while( !GFP_IS_BASIC(pGFp) ) { - IppsGFpState* pGroundGF = GFP_GROUNDGF(pGFp); - degree *= GFP_DEGREE(pGroundGF); - pGFp = pGroundGF; - } - return degree; -} - -/* convert external data (Ipp32u) => internal element (BNU_CHUNK_T) representation - returns length of element (in BNU_CHUNK_T) -*/ -__INLINE int cpGFpxCopyToChunk(BNU_CHUNK_T* pElm, const Ipp32u* pA, int nsA, const IppsGFpState* pGFpx) -{ - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - int basicExtension = cpGFpBasicDegreeExtension(pGFpx); - int basicElmLen32 = GFP_FELEN32(pBasicGF); - int basicElmLen = GFP_FELEN(pBasicGF); - int deg; - for(deg=0; deg0; deg++, nsA -= basicElmLen32) { - int srcLen = IPP_MIN(nsA, basicElmLen32); - ZEXPAND_COPY_BNU((Ipp32u*)pElm, basicElmLen*(int)(sizeof(BNU_CHUNK_T)/sizeof(Ipp32u)), pA,srcLen); - pElm += basicElmLen; - pA += basicElmLen32; - } - return basicElmLen*deg; -} - -/* convert internal element (BNU_CHUNK_T) => external data (Ipp32u) representation - returns length of data (in Ipp32u) -*/ -__INLINE int cpGFpxCopyFromChunk(Ipp32u* pA, const BNU_CHUNK_T* pElm, const IppsGFpState* pGFpx) -{ - IppsGFpState* pBasicGF = cpGFpBasic(pGFpx); - int basicExtension = cpGFpBasicDegreeExtension(pGFpx); - int basicElmLen32 = GFP_FELEN32(pBasicGF); - int basicElmLen = GFP_FELEN(pBasicGF); - int deg; - for(deg=0; deg -#include -#include -#include - -#include "util/envutil.h" -#include "util/stdtypes.h" -#include "util/buffutil.h" -#include "util/strutil.h" -#include "epid/common/types.h" -#include "epid/common/file_parser.h" - -#define PROGRAM_NAME "extractgrps" - -#pragma pack(1) -/// EPID Key Output File Entry -typedef struct EpidBinaryGroupCertificate { - EpidFileHeader header; ///< EPID binary file header - GroupPubKey pubkey; ///< EPID 2.0 group public key - EcdsaSignature signature; ///< ECDSA Signature on SHA-256 of above values -} EpidBinaryGroupCertificate; -#pragma pack() - -/// Main entrypoint -int main(int argc, char* argv[]) { - // intermediate return value for C style functions - int ret_value = EXIT_SUCCESS; - - size_t keyfile_size = 0; - size_t num_keys_extracted = 0; - size_t num_keys_in_file = 0; - - char* end = NULL; - FILE* file = NULL; - - unsigned int i = 0; - size_t bytes_read = 0; - - // File to extract keys from - static char* keyfile_name = NULL; - - // Number of keys to extract - static size_t num_keys_to_extract = 0; - - // help flag parameter - static bool show_help = false; - - // Verbose flag parameter - static bool verbose = false; - - dropt_option options[] = { - {'h', "help", "display this help and exit", NULL, dropt_handle_bool, - &show_help, dropt_attr_halt}, - {'v', "verbose", "print status messages to stdout", NULL, - dropt_handle_bool, &verbose}, - - {0} /* Required sentinel value. */ - }; - - dropt_context* dropt_ctx = NULL; - // set program name for logging - set_prog_name(PROGRAM_NAME); - do { - dropt_ctx = dropt_new_context(options); - if (!dropt_ctx) { - ret_value = EXIT_FAILURE; - break; - } else if (argc > 0) { - /* Parse the arguments from argv. - * - * argv[1] is always safe to access since argv[argc] is guaranteed - * to be NULL and since we've established that argc > 0. - */ - char** rest = dropt_parse(dropt_ctx, -1, &argv[1]); - if (dropt_get_error(dropt_ctx) != dropt_error_none) { - log_error(dropt_get_error_message(dropt_ctx)); - if (dropt_error_invalid_option == dropt_get_error(dropt_ctx)) { - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - } - ret_value = EXIT_FAILURE; - break; - } else if (show_help) { - log_fmt( - "Usage: %s [OPTION]... [FILE] [NUM]\n" - "Extract the first NUM group certs from FILE to current " - "directory\n" - "\n" - "Options:\n", - PROGRAM_NAME); - dropt_print_help(stdout, dropt_ctx, NULL); - ret_value = EXIT_SUCCESS; - break; - } else { - // number of arguments rest - size_t rest_count = 0; - - if (verbose) { - verbose = ToggleVerbosity(); - } - - // count number of arguments rest - while (rest[rest_count]) rest_count++; - - if (2 != rest_count) { - log_error("unexpected number of arguments", *rest); - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - ret_value = EXIT_FAILURE; - break; - } - - keyfile_name = rest[0]; - - num_keys_to_extract = strtoul(rest[1], &end, 10); - if ('\0' != *end) { - log_error("input '%s' is invalid: not a valid number of group keys", - rest[1]); - ret_value = EXIT_FAILURE; - break; - } - } - } - - // check file existence - if (!FileExists(keyfile_name)) { - log_error("cannot access '%s'", keyfile_name); - ret_value = EXIT_FAILURE; - break; - } - - keyfile_size = GetFileSize(keyfile_name); - if (0 != keyfile_size % sizeof(EpidBinaryGroupCertificate)) { - log_error( - "input file '%s' is invalid: does not contain integral number of " - "group keys", - keyfile_name); - ret_value = EXIT_FAILURE; - break; - } - num_keys_in_file = keyfile_size / sizeof(EpidBinaryGroupCertificate); - - if (num_keys_to_extract > num_keys_in_file) { - log_error("can not extract %d keys: only %d in file", num_keys_to_extract, - num_keys_in_file); - ret_value = EXIT_FAILURE; - break; - } - - file = fopen(keyfile_name, "rb"); - if (!file) { - log_error("failed read from '%s'", keyfile_name); - ret_value = EXIT_FAILURE; - break; - } - - // start extraction - for (i = 0; i < num_keys_to_extract; i++) { - EpidBinaryGroupCertificate temp; - int seek_failed = 0; - seek_failed = fseek(file, i * sizeof(temp), SEEK_SET); - bytes_read = fread(&temp, 1, sizeof(temp), file); - if (seek_failed || bytes_read != sizeof(temp)) { - log_error("failed to extract key #%lu from '%s'", i, keyfile_name); - } else { - // ulong max = 4294967295 - char outkeyname[256] = {0}; - if (memcmp(&kEpidVersionCode[kEpid2x], &temp.header.epid_version, - sizeof(temp.header.epid_version)) || - memcmp(&kEpidFileTypeCode[kGroupPubKeyFile], &temp.header.file_type, - sizeof(temp.header.file_type))) { - log_error("failed to extract key #%lu from '%s': file is invalid", i, - keyfile_name); - ret_value = EXIT_FAILURE; - break; - } - snprintf(outkeyname, sizeof(outkeyname), "pubkey%010u.bin", i); - if (FileExists(outkeyname)) { - log_error("file '%s' already exists", outkeyname); - ret_value = EXIT_FAILURE; - break; - } - if (0 != WriteLoud(&temp, sizeof(temp), outkeyname)) { - log_error("failed to write key #%lu from '%s'", i, keyfile_name); - } else { - num_keys_extracted++; - } - } - } - if (EXIT_FAILURE == ret_value) { - break; - } - - log_msg("extracted %lu of %lu keys", num_keys_extracted, num_keys_in_file); - } while (0); - - if (file) { - fclose(file); - file = NULL; - } - - dropt_free_context(dropt_ctx); - - return ret_value; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/extractkeys/extractkeys.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/extractkeys/extractkeys.parts deleted file mode 100644 index 89e3f0d91a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/extractkeys/extractkeys.parts +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -env.PartName("extractkeys") - -src_files = Pattern(src_dir='src/', - includes=['*.c'], - recursive=True).files() - -parts_file = ['extractkeys.parts'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(src_files, sub_dir='tools/${PART_SHORT_NAME}/src') - env.InstallTopLevel(parts_file, sub_dir='tools/${PART_SHORT_NAME}') -else: - env.DependsOn([ - Component('common'), - Component('util'), - Component('dropt') - ]) - - if env['TARGET_PLATFORM']['OS'] == 'win32': - env.Append(CPPDEFINES='_CRT_SECURE_NO_WARNINGS') - if env.isConfigBasedOn('debug'): - env['PDB'] = '${PART_NAME}.pdb' - - outputs = env.Program('${PART_NAME}', src_files, - no_import_lib=True) - - env.InstallBin(outputs, - no_pkg=False, - INSTALL_BIN='${INSTALL_TOOLS_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/extractkeys/src/main.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/extractkeys/src/main.c deleted file mode 100644 index 6754a6db8a..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/extractkeys/src/main.c +++ /dev/null @@ -1,252 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Extract member private keys from EPID key output file - * - * Not validating SHA hashes in key file - */ - -#include -#include - -#include -#include "util/envutil.h" -#include "util/stdtypes.h" -#include "util/buffutil.h" -#include "util/strutil.h" -#include "epid/common/types.h" - -#define PROGRAM_NAME "extractkeys" -#define MANDATORY_PARAM_COUNT 2 - -#pragma pack(1) -/// EPID Key Output File Entry -typedef struct EpidKeyOutputFileKey { - unsigned char product_id[2]; ///< 2-byte Product ID (Big Endian) - unsigned char key_id[8]; ///< 8-byte Key Unique Id(Big Endian) - unsigned char svn[4]; ///< 4-byte Security Version Number (SVN) (Big Endian) - PrivKey privkey; ///< EPID 2.0 Private Key - unsigned char hash[20]; ///< 20-byte SHA-1 of above -} EpidKeyOutputFileKey; - -/// EPID Compressed Key Output File Entry -typedef struct EpidCompressedKeyOutputFileKey { - unsigned char product_id[2]; ///< 2-byte Product ID (Big Endian) - unsigned char key_id[8]; ///< 8-byte Key Unique Id(Big Endian) - unsigned char svn[4]; ///< 4-byte Security Version Number (SVN) (Big Endian) - CompressedPrivKey privkey; ///< EPID 2.0 Compressed Private Key - unsigned char hash[20]; ///< 20-byte SHA-1 of above -} EpidCompressedKeyOutputFileKey; -#pragma pack() - -/// Main entrypoint -int main(int argc, char* argv[]) { - // intermediate return value for C style functions - int ret_value = EXIT_SUCCESS; - // Buffer to store read key - uint8_t temp[sizeof(EpidKeyOutputFileKey)] = {0}; - - // Private key to extract - void* privkey = 0; - size_t privkey_size = 0; - - size_t keyfile_size = 0; - size_t keyfile_entry_size = 0; - size_t num_keys_extracted = 0; - size_t num_keys_in_file = 0; - - char* end = NULL; - FILE* file = NULL; - - // File to extract keys from - static char* keyfile_name = NULL; - - // Number of keys to extract - static size_t num_keys_to_extract = 0; - - // help flag parameter - static bool show_help = false; - - // Verbose flag parameter - static bool verbose = false; - - // Compressed flag parameter - static bool compressed = false; - - unsigned int i = 0; - size_t bytes_read = 0; - - dropt_option options[] = { - {'c', "compressed", "extract compressed keys", NULL, dropt_handle_bool, - &compressed}, - {'h', "help", "display this help and exit", NULL, dropt_handle_bool, - &show_help, dropt_attr_halt}, - {'v', "verbose", "print status messages to stdout", NULL, - dropt_handle_bool, &verbose}, - - {0} /* Required sentinel value. */ - }; - - dropt_context* dropt_ctx = NULL; - (void)argc; - // set program name for logging - set_prog_name(PROGRAM_NAME); - - do { - dropt_ctx = dropt_new_context(options); - - if (dropt_ctx && argc > 0) { - char** rest = dropt_parse(dropt_ctx, -1, &argv[1]); - - if (dropt_get_error(dropt_ctx) != dropt_error_none) { - log_error(dropt_get_error_message(dropt_ctx)); - if (dropt_error_invalid_option == dropt_get_error(dropt_ctx)) { - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - } - ret_value = EXIT_FAILURE; - break; - } else if (show_help) { - log_fmt( - "Usage: %s [OPTION]... [FILE] [NUM]\n" - - "Extract the first NUM private keys from FILE to current " - "directory.\n\n" - "Options:\n", - PROGRAM_NAME); - dropt_print_help(stdout, dropt_ctx, NULL); - ret_value = EXIT_SUCCESS; - break; - } else { - size_t rest_count = 0; - if (verbose) verbose = ToggleVerbosity(); - - // count number of arguments rest - while (rest[rest_count]) rest_count++; - if (rest_count != MANDATORY_PARAM_COUNT) { - log_error( - "%s arguments: found %i positional arguments, expected %i", - (rest_count < MANDATORY_PARAM_COUNT) ? "missing" : "too many", - rest_count, MANDATORY_PARAM_COUNT); - - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - ret_value = EXIT_FAILURE; - break; - } - - keyfile_name = *(rest); - - num_keys_to_extract = strtoul(*(rest + 1), &end, 10); - if ('\0' != *end) { - log_error("input '%s' is invalid: not a valid number of keys", - *(rest + 1)); - ret_value = EXIT_FAILURE; - break; - } - } - - } else { - ret_value = EXIT_FAILURE; - break; - } - - // check file existence - if (!FileExists(keyfile_name)) { - log_error("cannot access '%s'", keyfile_name); - ret_value = EXIT_FAILURE; - break; - } - - keyfile_size = GetFileSize(keyfile_name); - if (compressed) { - privkey_size = sizeof(CompressedPrivKey); - privkey = &(((EpidCompressedKeyOutputFileKey*)&temp[0])->privkey); - keyfile_entry_size = sizeof(EpidCompressedKeyOutputFileKey); - } else { - privkey_size = sizeof(PrivKey); - privkey = &(((EpidKeyOutputFileKey*)&temp[0])->privkey); - keyfile_entry_size = sizeof(EpidKeyOutputFileKey); - } - - if (0 != keyfile_size % keyfile_entry_size) { - log_error( - "input file '%s' is invalid: does not contain integral number of " - "keys", - keyfile_name); - ret_value = EXIT_FAILURE; - break; - } - num_keys_in_file = keyfile_size / keyfile_entry_size; - - if (num_keys_to_extract > num_keys_in_file) { - log_error("can not extract %d keys: only %d in file", num_keys_to_extract, - num_keys_in_file); - ret_value = EXIT_FAILURE; - break; - } - - file = fopen(keyfile_name, "rb"); - if (!file) { - log_error("failed read from '%s'", keyfile_name); - - ret_value = EXIT_FAILURE; - break; - } - - // start extraction - for (i = 0; i < num_keys_to_extract; ++i) { - int seek_failed = 0; - seek_failed = fseek(file, (int)(i * keyfile_entry_size), SEEK_SET); - bytes_read = fread(&temp, 1, keyfile_entry_size, file); - if (seek_failed || bytes_read != keyfile_entry_size) { - log_error("failed to extract key #%lu from '%s'", i, keyfile_name); - } else { - char outkeyname[256] = {0}; - snprintf(outkeyname, sizeof(outkeyname), "mprivkey%010u.dat", i); - - if (FileExists(outkeyname)) { - log_error("file '%s' already exists", outkeyname); - ret_value = EXIT_FAILURE; - break; - } - if (0 != WriteLoud(privkey, privkey_size, outkeyname)) { - log_error("failed to write key #%lu from '%s'", i, keyfile_name); - } else { - num_keys_extracted++; - } - } - } - if (EXIT_FAILURE == ret_value) { - break; - } - - log_msg("extracted %lu of %lu keys", num_keys_extracted, num_keys_in_file); - } while (0); - - if (file) { - fclose(file); - file = NULL; - } - - dropt_free_context(dropt_ctx); - dropt_ctx = NULL; - - return ret_value; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokegrp/revokegrp.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokegrp/revokegrp.parts deleted file mode 100644 index 053c88fe1f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokegrp/revokegrp.parts +++ /dev/null @@ -1,46 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -env.PartName("revokegrp") - -src_files = Pattern(src_dir='src/', - includes=['*.c'], - recursive=True).files() - -parts_file = ['revokegrp.parts'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(src_files, sub_dir='tools/${PART_SHORT_NAME}/src') - env.InstallTopLevel(parts_file, sub_dir='tools/${PART_SHORT_NAME}') -else: - env.DependsOn([ - Component('common'), - Component('util'), - Component('dropt') - ]) - - if env['TARGET_PLATFORM']['OS'] == 'win32': - if env.isConfigBasedOn('debug'): - env['PDB'] = '${PART_NAME}.pdb' - - outputs = env.Program('${PART_NAME}', src_files, - no_import_lib=True) - - env.InstallBin(outputs, - no_pkg=False, - INSTALL_BIN='${INSTALL_TOOLS_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokegrp/src/main.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokegrp/src/main.c deleted file mode 100644 index 721315079d..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokegrp/src/main.c +++ /dev/null @@ -1,382 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Create group revocation list request - * - */ - -#include -#include -#include -#include "util/buffutil.h" -#include "util/envutil.h" -#include "util/stdtypes.h" -#include "epid/common/file_parser.h" - -const OctStr16 kEpidFileVersion = {2, 0}; - -// Defaults -#define PROGRAM_NAME "revokegrp" -#define PUBKEYFILE_DEFAULT "pubkey.bin" -#define REQFILE_DEFAULT "grprlreq.dat" -#define REASON_DEFAULT 0 -#define GROUP_PUB_KEY_SIZE \ - (sizeof(EpidFileHeader) + sizeof(GroupPubKey) + sizeof(EcdsaSignature)) -#define STRINGIZE(a) #a - -#pragma pack(1) -/// Group revocation request entry -typedef struct GrpInfo { - GroupId gid; ///< EPID Group ID - uint8_t reason; ///< Revocation reason -} GrpInfo; -/// Group Revocation request -typedef struct GrpRlRequest { - EpidFileHeader header; ///< EPID File Header - uint32_t count; ///< Revoked count (big endian) - GrpInfo groups[1]; ///< Revoked group count (flexible array) -} GrpRlRequest; -#pragma pack() - -/// convert host to network byte order -static uint32_t htonl(uint32_t hostlong) { - return (((hostlong & 0xFF) << 24) | ((hostlong & 0xFF00) << 8) | - ((hostlong & 0xFF0000) >> 8) | ((hostlong & 0xFF000000) >> 24)); -} -/// convert network to host byte order -static uint32_t ntohl(uint32_t netlong) { - return (((netlong & 0xFF) << 24) | ((netlong & 0xFF00) << 8) | - ((netlong & 0xFF0000) >> 8) | ((netlong & 0xFF000000) >> 24)); -} - -/// Makes a request and appends it to file. -/*! -\param[in] cacert_file -Issuing CA certificate used to sign group public key file. -\param[in] pubkey_file -File containing group public key. -\param[in] req_file -File to write a request. -\param[in] reason -Revokation reason. -\param[in] verbose -If true function would print debug information to stdout. -*/ -int MakeRequest(char const* cacert_file, char const* pubkey_file, - char const* req_file, uint8_t reason, bool verbose); - -/// Main entrypoint -int main(int argc, char* argv[]) { - // intermediate return value for C style functions - int ret_value = EXIT_FAILURE; - - // User Settings - - // Group revocation request file name parameter - static char* req_file = NULL; - - // Group public key file name parameter - static char* pubkey_file = NULL; - - // CA certificate file name parameter - static char* cacert_file = NULL; - - // Revocation reason - static uint32_t reason = REASON_DEFAULT; - - // help flag parameter - static bool show_help = false; - - // Verbose flag parameter - static bool verbose = false; - - dropt_option options[] = { - {'\0', "gpubkey", - "load group public key from FILE (default: " PUBKEYFILE_DEFAULT ")", - "FILE", dropt_handle_string, &pubkey_file}, - {'\0', "capubkey", "load IoT Issuing CA public key from FILE", "FILE", - dropt_handle_string, &cacert_file}, - {'\0', "reason", - "revocation reason (default: " STRINGIZE(REASON_DEFAULT) ")", "FILE", - dropt_handle_uint, &reason}, - {'\0', "req", - "append signature revocation request to FILE (default: " REQFILE_DEFAULT - ")", - "FILE", dropt_handle_string, &req_file}, - - {'h', "help", "display this help and exit", NULL, dropt_handle_bool, - &show_help, dropt_attr_halt}, - {'v', "verbose", "print status messages to stdout", NULL, - dropt_handle_bool, &verbose}, - - {0} /* Required sentinel value. */ - }; - dropt_context* dropt_ctx = NULL; - // set program name for logging - set_prog_name(PROGRAM_NAME); - do { - dropt_ctx = dropt_new_context(options); - if (!dropt_ctx) { - ret_value = EXIT_FAILURE; - break; - } else if (argc > 0) { - /* Parse the arguments from argv. - * - * argv[1] is always safe to access since argv[argc] is guaranteed - * to be NULL and since we've established that argc > 0. - */ - char** rest = dropt_parse(dropt_ctx, -1, &argv[1]); - if (dropt_get_error(dropt_ctx) != dropt_error_none) { - log_error(dropt_get_error_message(dropt_ctx)); - if (dropt_error_invalid_option == dropt_get_error(dropt_ctx)) { - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - } - ret_value = EXIT_FAILURE; - break; - } else if (show_help) { - log_fmt( - "Usage: %s [OPTION]...\n" - "Revoke Intel(R) EPID group\n" - "\n" - "Options:\n", - PROGRAM_NAME); - dropt_print_help(stdout, dropt_ctx, NULL); - ret_value = EXIT_SUCCESS; - break; - } else if (*rest) { - // we have unparsed (positional) arguments - log_error("invalid argument: %s", *rest); - fprintf(stderr, "Try '%s --help' for more information\n", PROGRAM_NAME); - ret_value = EXIT_FAILURE; - break; - } else { - if (reason > UCHAR_MAX) { - log_error( - "unexpected reason value. Value of the reason must be lesser or " - "equal to %d", - UCHAR_MAX); - ret_value = EXIT_FAILURE; - break; - } - if (verbose) { - verbose = ToggleVerbosity(); - } - if (!pubkey_file) { - pubkey_file = PUBKEYFILE_DEFAULT; - } - if (!cacert_file) { - log_error("issuing CA public key must be specified"); - ret_value = EXIT_FAILURE; - break; - } - if (!req_file) { - req_file = REQFILE_DEFAULT; - } - if (verbose) { - log_msg("\nOption values:"); - log_msg(" pubkey_file : %s", pubkey_file); - log_msg(" cacert_file : %s", cacert_file); - log_msg(" reason : %d", reason); - log_msg(" req_file : %s", req_file); - log_msg(""); - } - } - } - - ret_value = MakeRequest(cacert_file, pubkey_file, req_file, (uint8_t)reason, - verbose); - } while (0); - dropt_free_context(dropt_ctx); - return ret_value; -} - -int MakeRequest(char const* cacert_file, char const* pubkey_file, - char const* req_file, uint8_t reason, bool verbose) { - // Group index and count - uint32_t grp_index = 0; - uint32_t grp_count = 0; - - // Buffers and computed values - // Group public key file - unsigned char* pubkey_file_data = NULL; - size_t pubkey_file_size = 0; - - // Group public key buffer - GroupPubKey pubkey = {0}; - - // CA certificate - EpidCaCertificate cacert = {0}; - - // Request buffer - uint8_t* req_buf = NULL; - size_t req_size = 0; - size_t req_file_size = 0; - GrpRlRequest* request = NULL; - size_t req_extra_space = sizeof(GroupId) + sizeof(uint8_t); - - int ret_value = EXIT_FAILURE; - do { - if (!cacert_file || !pubkey_file || !req_file) { - log_error("internal error: badarg to MakeRequest()"); - ret_value = EXIT_FAILURE; - break; - } - - // convert command line args to usable formats - // CA certificate - if (0 != ReadLoud(cacert_file, &cacert, sizeof(cacert))) { - ret_value = EXIT_FAILURE; - break; - } - - // Group public key file - pubkey_file_data = NewBufferFromFile(pubkey_file, &pubkey_file_size); - if (!pubkey_file_data) { - ret_value = EXIT_FAILURE; - break; - } - - // Security note: - // Application must confirm group public key is - // authorized by the issuer, e.g., signed by the issuer. - if (GROUP_PUB_KEY_SIZE != pubkey_file_size) { - log_error("unexpected file size for '%s'. Expected: %d; got: %d", - pubkey_file, (int)GROUP_PUB_KEY_SIZE, pubkey_file_size); - ret_value = EXIT_FAILURE; - break; - } - if (kEpidNoErr != EpidParseGroupPubKeyFile(pubkey_file_data, - pubkey_file_size, &cacert, - &pubkey)) { - log_error("group public key is not authorized"); - ret_value = EXIT_FAILURE; - break; - } - - // Report Settings - if (verbose) { - log_msg("=============================================="); - log_msg("Input settings:"); - log_msg(""); - log_msg(" [in] Group ID: "); - PrintBuffer(&pubkey.gid, sizeof(pubkey.gid)); - log_msg(""); - log_msg(" [in] Reason: %d", reason); - log_msg("=============================================="); - } - - // Calculate request size - req_size = sizeof(EpidFileHeader) + sizeof(uint32_t); - - if (FileExists(req_file)) { - req_file_size = GetFileSize_S(req_file, SIZE_MAX - req_extra_space); - - if (req_file_size < req_size) { - log_error("output file smaller then size of empty request"); - ret_value = EXIT_FAILURE; - break; - } - - req_size = req_file_size; - } else { - log_msg("request file does not exsist, create new"); - } - - req_size += req_extra_space; - - // Allocate request buffer - req_buf = AllocBuffer(req_size); - if (!req_buf) { - ret_value = EXIT_FAILURE; - break; - } - - request = (GrpRlRequest*)req_buf; - - // Load existing request file - if (req_file_size > 0) { - if (0 != ReadLoud(req_file, req_buf, req_file_size)) { - ret_value = EXIT_FAILURE; - break; - } - - // Check EPID and file versions - if (0 != memcmp(&request->header.epid_version, &kEpidFileVersion, - sizeof(kEpidFileVersion))) { - ret_value = EXIT_FAILURE; - break; - } - - if (0 != memcmp(&request->header.file_type, - &kEpidFileTypeCode[kGroupRlRequestFile], - sizeof(kEpidFileTypeCode[kGroupRlRequestFile]))) { - ret_value = EXIT_FAILURE; - break; - } - - grp_count = ntohl(request->count); - - // Update the reason if the group is in the request - for (grp_index = 0; grp_index < grp_count; grp_index++) { - if (0 == memcmp(&request->groups[grp_index].gid, &pubkey.gid, - sizeof(pubkey.gid))) { - request->groups[grp_index].reason = reason; - req_size = req_file_size; - break; - } - } - } - - // Append group to the request - if (grp_index == grp_count) { - request->header.epid_version = kEpidFileVersion; - request->header.file_type = kEpidFileTypeCode[kGroupRlRequestFile]; - request->groups[grp_count].gid = pubkey.gid; - request->groups[grp_count].reason = reason; - request->count = htonl(++grp_count); - } - - // Report Settings - if (verbose) { - log_msg("=============================================="); - log_msg("Request generated:"); - log_msg(""); - log_msg(" [in] Request Len: %d", (int)req_size); - log_msg(" [in] Request: "); - PrintBuffer(req_buf, req_size); - log_msg("=============================================="); - } - - // Store request - if (0 != WriteLoud(req_buf, req_size, req_file)) { - ret_value = EXIT_FAILURE; - break; - } - - // Success - ret_value = EXIT_SUCCESS; - } while (0); - - // Free allocated buffers - if (pubkey_file_data) free(pubkey_file_data); - if (req_buf) free(req_buf); - - return ret_value; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokekey/revokekey.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokekey/revokekey.parts deleted file mode 100644 index 55173499d8..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokekey/revokekey.parts +++ /dev/null @@ -1,47 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -env.PartName("revokekey") - -src_files = Pattern(src_dir='src/', - includes=['*.c'], - recursive=True).files() - -parts_file = ['revokekey.parts'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(src_files, sub_dir='tools/${PART_SHORT_NAME}/src') - env.InstallTopLevel(parts_file, sub_dir='tools/${PART_SHORT_NAME}') -else: - env.DependsOn([ - Component('common'), - Component('member'), - Component('util'), - Component('dropt') - ]) - - if env['TARGET_PLATFORM']['OS'] == 'win32': - if env.isConfigBasedOn('debug'): - env['PDB'] = '${PART_NAME}.pdb' - - outputs = env.Program('${PART_NAME}', src_files, - no_import_lib=True) - - env.InstallBin(outputs, - no_pkg=False, - INSTALL_BIN='${INSTALL_TOOLS_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokekey/src/main.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokekey/src/main.c deleted file mode 100644 index 9ce068f201..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokekey/src/main.c +++ /dev/null @@ -1,356 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Create private key revocation list request - * - */ - -#include -#include -#include - -#include "util/buffutil.h" -#include "util/envutil.h" -#include "util/stdtypes.h" -#include "epid/common/file_parser.h" -#include "epid/member/api.h" - -const OctStr16 kEpidFileVersion = {2, 0}; - -// Defaults -#define PROGRAM_NAME "revokekey" -#define PRIVKEY_DEFAULT "mprivkey.dat" -#define REQFILE_DEFAULT "privreq.dat" -#define PUBKEYFILE_DEFAULT "pubkey.bin" - -/// Partial signature request, includes all but message. -typedef struct PrivRlRequestTop { - EpidFileHeader header; ///< EPID File Header - PrivKey privkey; ///< EPID Private Key -} PrivRlRequestTop; - -int OpenKey(char const* privkey_file, char const* gpubkey_file, - char const* cacert_file, PrivKey* priv_key) { - int retval = EXIT_FAILURE; - size_t file_size = GetFileSize(privkey_file); - - if (0 == file_size && !FileExists(privkey_file)) { - log_error("cannot access '%s'", privkey_file); - return EXIT_FAILURE; - } - - if (file_size == sizeof(PrivKey)) { - if (0 != ReadLoud(privkey_file, priv_key, sizeof(PrivKey))) { - return EXIT_FAILURE; - } - retval = EXIT_SUCCESS; - } else if (file_size == sizeof(CompressedPrivKey)) { - void* signed_pubkey = NULL; - if (!cacert_file) { - log_error("issuing CA public key must be specified for compressed key"); - return EXIT_FAILURE; - } - if (!gpubkey_file) { - log_error("group public key must be specified for compressed key"); - return EXIT_FAILURE; - } - - do { - size_t signed_pubkey_size = 0; - CompressedPrivKey cmp_key; - EpidCaCertificate cacert; - GroupPubKey pub_key; - EpidStatus sts; - if (0 != ReadLoud(privkey_file, &cmp_key, sizeof(CompressedPrivKey))) { - retval = EXIT_FAILURE; - break; - } - signed_pubkey = NewBufferFromFile(gpubkey_file, &signed_pubkey_size); - if (!signed_pubkey) { - retval = EXIT_FAILURE; - break; - } - if (0 != ReadLoud(gpubkey_file, signed_pubkey, signed_pubkey_size)) { - retval = EXIT_FAILURE; - break; - } - if (0 != ReadLoud(cacert_file, &cacert, sizeof(cacert))) { - retval = EXIT_FAILURE; - break; - } - sts = EpidParseGroupPubKeyFile(signed_pubkey, signed_pubkey_size, &cacert, - &pub_key); - if (kEpidNoErr != sts) { - log_error("error while parsing group public key"); - retval = EXIT_FAILURE; - break; - } - sts = EpidDecompressPrivKey(&pub_key, &cmp_key, priv_key); - if (kEpidNoErr != sts) { - log_error("error while decompressing member private key"); - retval = EXIT_FAILURE; - break; - } - retval = EXIT_SUCCESS; - } while (0); - free(signed_pubkey); - } else { - log_error("unexpected file size for '%s'", privkey_file); - retval = EXIT_FAILURE; - } - return retval; -} - -int MakeRequest(PrivKey priv_key, char const* req_file, bool verbose) { - // Request buffer - uint8_t* req_buf = NULL; - size_t req_size = 0; - size_t req_extra_space = 0; - int ret_value = EXIT_FAILURE; - do { - size_t entry_size = sizeof(EpidFileHeader) + sizeof(PrivKey); - size_t req_file_size = 0; - bool duplicate = false; - size_t i = 0; - PrivRlRequestTop* req_top = NULL; - - if (!req_file) { - log_error("internal error: badarg to MakeRequest()"); - ret_value = EXIT_FAILURE; - break; - } - - // convert command line args to usable formats - - // Report Settings - if (verbose) { - log_msg("=============================================="); - log_msg("Input settings:"); - log_msg(""); - log_msg(" [in] Group ID: "); - PrintBuffer(&(priv_key.gid), sizeof(priv_key.gid)); - log_msg(""); - log_msg(" [in] Private Key Len: %d", sizeof(PrivKey)); - log_msg(" [in] Private Key: "); - PrintBuffer(&(priv_key), sizeof(PrivKey)); - log_msg(""); - log_msg("=============================================="); - } - - req_extra_space += entry_size; - if (FileExists(req_file)) { - req_file_size = GetFileSize_S(req_file, SIZE_MAX - req_extra_space); - - if (req_file_size < entry_size) { - log_error("output file smaller then size of one entry"); - ret_value = EXIT_FAILURE; - break; - } - - if (req_file_size % entry_size != 0) { - log_error("size of output file is not multiple of the entry size"); - ret_value = EXIT_FAILURE; - break; - } - } else { - log_msg("request file does not exsist, create new"); - } - - req_size = req_file_size + req_extra_space; - - req_buf = AllocBuffer(req_size); - if (!req_buf) { - ret_value = EXIT_FAILURE; - break; - } - - // Load existing request file - if (req_file_size > 0) { - if (0 != ReadLoud(req_file, req_buf, req_file_size)) { - ret_value = EXIT_FAILURE; - break; - } - - for (i = 0; i < req_file_size / entry_size; i++) { - if (0 == memcmp(req_buf + entry_size * i + sizeof(EpidFileHeader), - &(priv_key), sizeof(PrivKey))) { - duplicate = true; - break; - } - } - if (duplicate) { - log_error("this private key already exists in output file"); - ret_value = EXIT_FAILURE; - break; - } - } - - // Append to the request - req_top = (PrivRlRequestTop*)(req_buf + req_file_size); - req_top->header.epid_version = kEpidFileVersion; - req_top->header.file_type = kEpidFileTypeCode[kPrivRlRequestFile]; - req_top->privkey = priv_key; - - // Report Settings - if (verbose) { - log_msg("=============================================="); - log_msg("Request generated:"); - log_msg(""); - log_msg(" [in] Request Len: %d", sizeof(PrivRlRequestTop)); - log_msg(" [in] Request: "); - PrintBuffer(&req_top, sizeof(PrivRlRequestTop)); - log_msg("=============================================="); - } - - // Store request - if (0 != WriteLoud(req_buf, req_size, req_file)) { - ret_value = EXIT_FAILURE; - break; - } - - ret_value = EXIT_SUCCESS; - } while (0); - - // Free allocated buffers - if (req_buf) free(req_buf); - - return ret_value; -} - -/// Main entrypoint -int main(int argc, char* argv[]) { - int retval = EXIT_FAILURE; - - // User Settings - // Private key file name parameter - static char* privkey_file = NULL; - static char* gpubkey_file = NULL; - static char* capubkey_file = NULL; - - // Private key revocation request file name parameter - static char* req_file = NULL; - - // help flag parameter - static bool show_help = false; - - // Verbose flag parameter - static bool verbose = false; - - // Private key - PrivKey priv_key; - - dropt_option options[] = { - {'\0', "mprivkey", - "load private key to revoke from FILE (default: " PRIVKEY_DEFAULT ")", - "FILE", dropt_handle_string, &privkey_file}, - {'\0', "req", - "append signature revocation request to FILE (default: " REQFILE_DEFAULT - ")", - "FILE", dropt_handle_string, &req_file}, - {'h', "help", "display this help and exit", NULL, dropt_handle_bool, - &show_help, dropt_attr_halt}, - {'v', "verbose", "print status messages to stdout", NULL, - dropt_handle_bool, &verbose}, - {'\0', '\0', "The following options are only needed for compressed keys:", - NULL, dropt_handle_string, NULL}, - {'\0', "gpubkey", - "load group public key from FILE (default: " PUBKEYFILE_DEFAULT ")", - "FILE", dropt_handle_string, &gpubkey_file}, - {'\0', "capubkey", "load IoT Issuing CA public key from FILE", "FILE", - dropt_handle_string, &capubkey_file}, - {0} /* Required sentinel value. */ - }; - - dropt_context* dropt_ctx = NULL; - - // set program name for logging - set_prog_name(PROGRAM_NAME); - - do { - dropt_ctx = dropt_new_context(options); - if (!dropt_ctx) { - retval = EXIT_FAILURE; - break; - } else if (argc > 0) { - /* Parse the arguments from argv. - * - * argv[1] is always safe to access since argv[argc] is guaranteed - * to be NULL and since we've established that argc > 0. - */ - char** rest = dropt_parse(dropt_ctx, -1, &argv[1]); - if (dropt_get_error(dropt_ctx) != dropt_error_none) { - log_error(dropt_get_error_message(dropt_ctx)); - if (dropt_error_invalid_option == dropt_get_error(dropt_ctx)) { - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - } - retval = EXIT_FAILURE; - break; - } else if (show_help) { - log_fmt( - "Usage: %s [OPTION]...\n" - "Revoke Intel(R) EPID signature\n" - "\n" - "Options:\n", - PROGRAM_NAME); - dropt_print_help(stdout, dropt_ctx, NULL); - retval = EXIT_SUCCESS; - break; - } else if (*rest) { - // we have unparsed (positional) arguments - log_error("invalid argument: %s", *rest); - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - retval = EXIT_FAILURE; - break; - } else { - if (verbose) { - verbose = ToggleVerbosity(); - } - if (!privkey_file) { - privkey_file = PRIVKEY_DEFAULT; - } - if (!gpubkey_file) { - gpubkey_file = PUBKEYFILE_DEFAULT; - } - if (!req_file) { - req_file = REQFILE_DEFAULT; - } - if (verbose) { - log_msg("\nOption values:"); - log_msg(" mprivkey : %s", privkey_file); - log_msg(" req : %s", req_file); - log_msg(" gpubkey : %s", gpubkey_file); - log_msg(" capubkey : %s", capubkey_file); - log_msg(""); - } - } - } - - retval = OpenKey(privkey_file, gpubkey_file, capubkey_file, &priv_key); - if (EXIT_SUCCESS != retval) { - break; - } - retval = MakeRequest(priv_key, req_file, verbose); - } while (0); - - dropt_free_context(dropt_ctx); - - return retval; -} diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokesig/revokesig.parts b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokesig/revokesig.parts deleted file mode 100644 index 5dc108de4f..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokesig/revokesig.parts +++ /dev/null @@ -1,46 +0,0 @@ -############################################################################ -# Copyright 2016 Intel Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################ - -Import('*') - -env.PartName("revokesig") - -src_files = Pattern(src_dir='src/', - includes=['*.c'], - recursive=True).files() - -parts_file = ['revokesig.parts'] - -if 'install_package' in env['MODE']: - env.InstallTopLevel(src_files, sub_dir='tools/${PART_SHORT_NAME}/src') - env.InstallTopLevel(parts_file, sub_dir='tools/${PART_SHORT_NAME}') -else: - env.DependsOn([ - Component('common'), - Component('util'), - Component('dropt') - ]) - - if env['TARGET_PLATFORM']['OS'] == 'win32': - if env.isConfigBasedOn('debug'): - env['PDB'] = '${PART_NAME}.pdb' - - outputs = env.Program('${PART_NAME}', src_files, - no_import_lib=True) - - env.InstallBin(outputs, - no_pkg=False, - INSTALL_BIN='${INSTALL_TOOLS_BIN}') diff --git a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokesig/src/main.c b/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokesig/src/main.c deleted file mode 100644 index 861e38955e..0000000000 --- a/sgx-jvm/linux-sgx/external/epid-sdk-3.0.0/tools/revokesig/src/main.c +++ /dev/null @@ -1,455 +0,0 @@ -/*############################################################################ - # Copyright 2016 Intel Corporation - # - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. - ############################################################################*/ - -/*! - * \file - * - * \brief Create signature based revocation list request - * - */ - -#include -#include -#include -#include "util/buffutil.h" -#include "util/envutil.h" -#include "util/stdtypes.h" -#include "epid/common/file_parser.h" - -// Defaults -#define PROGRAM_NAME "revokesig" -#define PUBKEYFILE_DEFAULT "pubkey.bin" -#define REQFILE_DEFAULT "sigrlreq.dat" -#define SIG_DEFAULT "sig.dat" -#define GROUP_PUB_KEY_SIZE \ - (sizeof(EpidFileHeader) + sizeof(GroupPubKey) + sizeof(EcdsaSignature)) - -#pragma pack(1) -/// Partial signature request, includes components through sig. -typedef struct SigRlRequestTop { - EpidFileHeader header; ///< EPID File Header - GroupId gid; ///< EPID Group ID - EpidSignature sig; ///< EPID Signature -} SigRlRequestTop; - -/// Partial signature request, includes components after. -typedef struct SigRlRequestMid { - uint32_t be_msg_size; ///< size of message in bytes (big endian) - uint8_t msg[1]; ///< message used to create signature (flexible array) -} SigRlRequestMid; -#pragma pack() - -/// convert host to network byte order -static uint32_t htonl(uint32_t hostlong) { - return (((hostlong & 0xFF) << 24) | ((hostlong & 0xFF00) << 8) | - ((hostlong & 0xFF0000) >> 8) | ((hostlong & 0xFF000000) >> 24)); -} - -/// Fill a single SigRlRequest structure -/*! -\param[in] pubkey -Group public key. -\param[in] sig -Signature to append to request. -\param[in] sig_size -Size of the signature. -\param[in] msg_str -Message used to generate signature to revoke. -\param[in] msg_size -Length of the message. -\param[in out] req_buf -Pointer to request buffer. -\param[in] req_size -Size of request buffer. -\param[in out] req_top -Pointer to top structure of request. -*/ -void FillRequest(GroupPubKey const* pubkey, EpidSignature const* sig, - size_t sig_size, char const* msg_str, size_t msg_size, - uint8_t* req_buf, size_t req_size, SigRlRequestTop* req_top); - -/// Makes a request and appends it to file. -/*! -\param[in] cacert_file -Issuing CA certificate used to sign group public key file. -\param[in] sig_file -File containing signature to add to request. -\param[in] pubkey_file -File containing group public key. -\param[in] req_file -File to write a request. -\param[in] msg_str -Message used to generate signature to revoke. -\param[in] msg_size -Length of the message. -\param[in] verbose -If true function would print debug information to stdout. -*/ -int MakeRequest(char const* cacert_file, char const* sig_file, - char const* pubkey_file, char const* req_file, - char const* msg_str, size_t msg_size, bool verbose); - -/// Main entrypoint -int main(int argc, char* argv[]) { - // intermediate return value for C style functions - int ret_value = EXIT_FAILURE; - - // Signature file name parameter - static char* sig_file = NULL; - - // Message string parameter - static char* msg_str = NULL; - size_t msg_size = 0; - static char* msg_file = NULL; - char* msg_buf = NULL; // message loaded from msg_file - - // Signature revocation request file name parameter - static char* req_file = NULL; - - // Group public key file name parameter - static char* pubkey_file = NULL; - - // CA certificate file name parameter - static char* cacert_file = NULL; - - // help flag parameter - static bool show_help = false; - - // Verbose flag parameter - static bool verbose = false; - - dropt_option options[] = { - {'\0', "sig", - "load signature to revoke from FILE (default: " SIG_DEFAULT ")", "FILE", - dropt_handle_string, &sig_file}, - {'\0', "msg", "MESSAGE used to generate signature to revoke", "MESSAGE", - dropt_handle_string, &msg_str}, - {'\0', "msgfile", - "FILE containing message used to generate signature to revoke", "FILE", - dropt_handle_string, &msg_file}, - {'\0', "gpubkey", - "load group public key from FILE (default: " PUBKEYFILE_DEFAULT ")", - "FILE", dropt_handle_string, &pubkey_file}, - {'\0', "capubkey", "load IoT Issuing CA public key from FILE", "FILE", - dropt_handle_string, &cacert_file}, - {'\0', "req", - "append signature revocation request to FILE (default: " REQFILE_DEFAULT - ")", - "FILE", dropt_handle_string, &req_file}, - - {'h', "help", "display this help and exit", NULL, dropt_handle_bool, - &show_help, dropt_attr_halt}, - {'v', "verbose", "print status messages to stdout", NULL, - dropt_handle_bool, &verbose}, - - {0} /* Required sentinel value. */ - }; - - dropt_context* dropt_ctx = NULL; - // set program name for logging - set_prog_name(PROGRAM_NAME); - do { - dropt_ctx = dropt_new_context(options); - if (!dropt_ctx) { - ret_value = EXIT_FAILURE; - break; - } else if (argc > 0) { - /* Parse the arguments from argv. - * - * argv[1] is always safe to access since argv[argc] is guaranteed - * to be NULL and since we've established that argc > 0. - */ - char** rest = dropt_parse(dropt_ctx, -1, &argv[1]); - if (dropt_get_error(dropt_ctx) != dropt_error_none) { - log_error(dropt_get_error_message(dropt_ctx)); - if (dropt_error_invalid_option == dropt_get_error(dropt_ctx)) { - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - } - ret_value = EXIT_FAILURE; - break; - } else if (show_help) { - log_fmt( - "Usage: %s [OPTION]...\n" - "Revoke Intel(R) EPID signature\n" - "\n" - "Options:\n", - PROGRAM_NAME); - dropt_print_help(stdout, dropt_ctx, NULL); - ret_value = EXIT_SUCCESS; - break; - } else if (*rest) { - // we have unparsed (positional) arguments - log_error("invalid argument: %s", *rest); - fprintf(stderr, "Try '%s --help' for more information.\n", - PROGRAM_NAME); - ret_value = EXIT_FAILURE; - break; - } else { - if (verbose) { - verbose = ToggleVerbosity(); - } - if (!sig_file) { - sig_file = SIG_DEFAULT; - } - - if (msg_str && msg_file) { - log_error("--msg and --msgfile cannot be used together"); - ret_value = EXIT_FAILURE; - break; - } else if (msg_str) { - msg_size = strlen(msg_str); - } else if (msg_file) { - msg_buf = NewBufferFromFile(msg_file, &msg_size); - if (!msg_buf) { - ret_value = EXIT_FAILURE; - break; - } - msg_str = msg_buf; - } else { - msg_size = 0; - } - - if (!pubkey_file) { - pubkey_file = PUBKEYFILE_DEFAULT; - } - if (!cacert_file) { - log_error("issuing CA public key must be specified"); - ret_value = EXIT_FAILURE; - break; - } - if (!req_file) { - req_file = REQFILE_DEFAULT; - } - if (verbose) { - log_msg("\nOption values:"); - log_msg(" sig_file : %s", sig_file); - log_msg(" msg_str : %s", msg_str); - log_msg(" pubkey_file : %s", pubkey_file); - log_msg(" cacert_file : %s", cacert_file); - log_msg(" req_file : %s", req_file); - log_msg(""); - } - } - } - - ret_value = MakeRequest(cacert_file, sig_file, pubkey_file, req_file, - msg_str, msg_size, verbose); - } while (0); - - if (msg_buf) { - free(msg_buf); - msg_buf = NULL; - } - - dropt_free_context(dropt_ctx); - - return ret_value; -} - -/// Fill a single SigRlRequest structure -/*! - - | Field | Size | - |:--------------------------------|--------------:| - | EPID Version (0x0200) | 2 bytes | - | File Type (0x000B) | 2 bytes | - | Group ID Number | 16 bytes | - | Basic Signature | 52 bytes | - | SigRL Version | 4 bytes | - | Number of Non-Revoked Proofs | 4 bytes | - | nNRP * Non-Revoked Proofs | 160 * nNRP | - | Message Size in Bytes (msgSize) | 4 bytes | - | Message | msgSize bytes | - - */ -void FillRequest(GroupPubKey const* pubkey, EpidSignature const* sig, - size_t sig_size, char const* msg_str, size_t msg_size, - uint8_t* req_buf, size_t req_size, SigRlRequestTop* req_top) { - const OctStr16 kEpidFileVersion = {2, 0}; - size_t i = 0; - size_t req_mid_size = sizeof(((SigRlRequestMid*)0)->be_msg_size) + msg_size; - SigRlRequestMid* req_mid = - (SigRlRequestMid*)(req_buf + req_size - req_mid_size); - - if (!pubkey || !sig || !req_buf || !req_top || (!msg_str && 0 != msg_size)) { - log_error("internal error: badarg to FillRequest()"); - return; - } - - req_top->header.epid_version = kEpidFileVersion; - req_top->header.file_type = kEpidFileTypeCode[kSigRlRequestFile]; - req_top->gid = pubkey->gid; - // copy signature - for (i = 0; i < sig_size; i++) { - ((uint8_t*)&req_top->sig)[i] = ((uint8_t*)sig)[i]; - } - req_mid->be_msg_size = htonl((uint32_t)msg_size); - // copy msg - for (i = 0; i < msg_size; i++) { - req_mid->msg[i] = msg_str[i]; - } -} - -int MakeRequest(char const* cacert_file, char const* sig_file, - char const* pubkey_file, char const* req_file, - char const* msg_str, size_t msg_size, bool verbose) { - // Buffers and computed values - // Signature buffer - EpidSignature* sig = NULL; - size_t sig_size = 0; - - // Group public key file - unsigned char* pubkey_file_data = NULL; - size_t pubkey_file_size = 0; - - // CA certificate - EpidCaCertificate cacert = {0}; - - // Group public key buffer - GroupPubKey pubkey = {0}; - - // Request buffer - uint8_t* req_buf = NULL; - size_t req_size = 0; - - size_t req_extra_space = (sizeof(EpidFileHeader) + sizeof(GroupId)); - - int ret_value = EXIT_FAILURE; - do { - SigRlRequestTop* req_top = NULL; - size_t req_file_size = 0; - const size_t kMsgSizeSize = sizeof(((SigRlRequestMid*)0)->be_msg_size); - - if (!cacert_file || !sig_file || !pubkey_file || !req_file || - (!msg_str && 0 != msg_size)) { - log_error("internal error: badarg to MakeRequest()"); - ret_value = EXIT_FAILURE; - break; - } - - // convert command line args to usable formats - // CA certificate - if (0 != ReadLoud(cacert_file, &cacert, sizeof(cacert))) { - ret_value = EXIT_FAILURE; - break; - } - - // Signature - sig = NewBufferFromFile(sig_file, &sig_size); - if (!sig) { - ret_value = EXIT_FAILURE; - break; - } - - // Group public key file - pubkey_file_data = NewBufferFromFile(pubkey_file, &pubkey_file_size); - if (!pubkey_file_data) { - ret_value = EXIT_FAILURE; - break; - } - - // Security note: - // Application must confirm group public key is - // authorized by the issuer, e.g., signed by the issuer. - if (GROUP_PUB_KEY_SIZE != pubkey_file_size) { - log_error("unexpected file size for '%s'. Expected: %d; got: %d", - pubkey_file, (int)GROUP_PUB_KEY_SIZE, (int)pubkey_file_size); - ret_value = EXIT_FAILURE; - break; - } - if (kEpidNoErr != EpidParseGroupPubKeyFile(pubkey_file_data, - pubkey_file_size, &cacert, - &pubkey)) { - log_error("group public key is not authorized"); - ret_value = EXIT_FAILURE; - break; - } - - // Report Settings - if (verbose) { - log_msg("=============================================="); - log_msg("Creating SigRL revocation request:"); - log_msg(""); - log_msg(" [in] Group ID: "); - PrintBuffer(&pubkey.gid, sizeof(pubkey.gid)); - log_msg(""); - log_msg(" [in] Signature Len: %d", (int)sig_size); - log_msg(" [in] Signature: "); - PrintBuffer(&sig, sig_size); - log_msg(""); - log_msg(" [in] Message Len: %d", (int)msg_size); - log_msg(" [in] Message: "); - PrintBuffer(msg_str, msg_size); - log_msg("=============================================="); - } - - req_extra_space += sig_size + kMsgSizeSize + msg_size; - - if (FileExists(req_file)) { - req_file_size = GetFileSize_S(req_file, SIZE_MAX - req_extra_space); - } else { - log_msg("request file does not exsist, create new"); - } - - req_size = req_file_size + req_extra_space; - - req_buf = AllocBuffer(req_size); - if (!req_buf) { - ret_value = EXIT_FAILURE; - break; - } - - if (req_file_size > 0) { - if (0 != ReadLoud(req_file, req_buf, req_file_size)) { - ret_value = EXIT_FAILURE; - break; - } - } - - req_top = (SigRlRequestTop*)(req_buf + req_file_size); - - FillRequest(&pubkey, sig, sig_size, msg_str, msg_size, req_buf, req_size, - req_top); - - // Report Settings - if (verbose) { - log_msg("=============================================="); - log_msg("Reqest generated:"); - log_msg(""); - log_msg(" [in] Request Len: %d", sizeof(SigRlRequestTop)); - log_msg(" [in] Request: "); - PrintBuffer(&req_top, sizeof(SigRlRequestTop)); - log_msg("=============================================="); - } - - // Store request - if (0 != WriteLoud(req_buf, req_size, req_file)) { - ret_value = EXIT_FAILURE; - break; - } - - // Success - ret_value = EXIT_SUCCESS; - } while (0); - - // Free allocated buffers - if (pubkey_file_data) free(pubkey_file_data); - if (sig) free(sig); - if (req_buf) free(req_buf); - - return ret_value; -} diff --git a/sgx-jvm/linux-sgx/external/rdrand/rdrand.h b/sgx-jvm/linux-sgx/external/rdrand/rdrand.h deleted file mode 100644 index da29e5f22f..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/rdrand.h +++ /dev/null @@ -1,156 +0,0 @@ -/* Copyright © 2012, Intel Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -- Neither the name of Intel Corporation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -/*! \file rdrand.h - * \brief Public header for rdrand API. - * - * This is the public header for the rdrand API. It exposes the three public - * APIs, which access the rdrand instruction for various data sizes. - */ - -#ifndef RDRAND_H -#define RDRAND_H - -#include - -/*! \def RDRAND_SUCCESS - * The rdrand call was successful, the hardware was ready, and a random - * number was returned. - */ -#define RDRAND_SUCCESS 1 - -/*! \def RDRAND_NOT_READY - * The rdrand call was unsuccessful, the hardware was not ready, and a - * random number was not returned. - */ -#define RDRAND_NOT_READY -1 - -/*! \def RDRAND_SUPPORTED - * The rdrand instruction is supported by the host hardware. - */ -#define RDRAND_SUPPORTED -2 - -/*! \def RDRAND_UNSUPPORTED - * The rdrand instruction is unsupported by the host hardware. - */ -#define RDRAND_UNSUPPORTED -3 - -/*! \def RDRAND_SUPPORT_UNKNOWN - * Whether or not the hardware supports the rdrand instruction is unknown - */ -#define RDRAND_SUPPORT_UNKNOWN -4 - -#ifdef __cplusplus -extern "C" { -#endif -/*! \brief Calls rdrand for a 16-bit result. - * - * This function calls rdrand requesting a 16-bit result. By default, it will - * perform only a single call to rdrand, returning success or failure. On - * success, the data is written to memory pointed to by x. If the int retry is - * true (non-zero), the function will enter a loop with count=10 until rdrand succeeds, at - * which point it write the random data and return success, or fails This - * function also ensures that rdrand is supported by the cpu or fails - * gracefully. - * - * \param x pointer to memory to store the random result - * \param retry int to determine whether or not to loop until rdrand succeeds - * or until 10 failed attempts - * - * \return whether or not the call was successful, or supported at all - */ -int rdrand_16(uint16_t* x, int retry); - -/*! \brief Calls rdrand for a 32-byte result. - * - * This function calls rdrand requesting a 32-bit result. By default, it will - * perform only a single call to rdrand, returning success or failure. On - * success, the data is written to memory pointed to by x. If the int retry is - * true (non-zero), the function will enter a loop with count=10 until rdrand succeeds, at - * which point it write the random data and return success, or fails This - * function also ensures that rdrand is supported by the cpu or fails - * gracefully. - * - * \param x pointer to memory to store the random result - * \param retry int to determine whether or not to loop until rdrand succeeds - * or until 10 failed attempts - * - * \return whether or not the call was successful, or supported at all - */ -int rdrand_32(uint32_t* x, int retry); - -/*! \brief Calls rdrand for a 64-byte result. - * - * This function calls rdrand requesting a 64-byte result. By default, it will - * perform only a single call to rdrand, returning success or failure. On - * success, the data is written to memory pointed to by x. If the int retry is - * true (non-zero), the function will enter a loop with count=10 until rdrand succeeds, at - * which point it write the random data and return success, or fails This - * function also ensures that rdrand is supported by the cpu or fails - * gracefully. - * - * \param x pointer to memory to store the random result - * \param retry int to determine whether or not to loop until rdrand succeeds - * or until 10 failed attempts - * - * \return whether or not the call was successful, or supported at all - */ -int rdrand_64(uint64_t* x, int retry); - -/*! \brief Calls rdrand to obtain multiple 64-byte results. - * - * This function calls rdrand requesting multiple 64-byte results. On - * success, the data is written to memory pointed to by x. This function - * calls rdrand_64 and if any of those invocations fail, this function - * fails. It returns the same values as rdrand_64. - */ -int rdrand_get_n_64(unsigned int n, uint64_t* x); - -/*! \brief Calls rdrand to obtain multiple 32-byte results. - * - * This function calls rdrand requesting multiple 32-byte results. On - * success, the data is written to memory pointed to by x. This function - * calls rdrand_32 and if any of those invocations fail, this function - * fails. It returns the same values as rdrand_32. - */ -int rdrand_get_n_32(unsigned int n, uint32_t* x); - -/*! \brief Calls rdrand to fill a buffer of arbitrary size with random bytes. - * - * This function calls rdrand requesting multiple 64- or 32-bit results to - * fill a buffer of arbitrary size. - * - * \param n size of the buffer to fill with random bytes - * \param buffer pointer to memory to store the random result - * - * \return whether or not the call was successful, or supported at all - */ - -int rdrand_get_bytes(unsigned int n, unsigned char *buffer); -#ifdef __cplusplus -}; -#endif - -#endif // RDRAND_H diff --git a/sgx-jvm/linux-sgx/external/rdrand/src/Makefile.in b/sgx-jvm/linux-sgx/external/rdrand/src/Makefile.in deleted file mode 100644 index 5a4ec8c421..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/src/Makefile.in +++ /dev/null @@ -1,29 +0,0 @@ -PACKAGE_NAME=@PACKAGE_NAME@ -PACKAGE_VERSION=@PACKAGE_VERSION@ -CC=@CC@ -CFLAGS=@CFLAGS@ -O2 -AR=ar - -TEST_OBJ=main.o - -%.o: %.c - $(CC) $(CFLAGS) -c $< - -all: bin lib - -bin: test - -lib: librdrand.a - -librdrand.a: rdrand.o - $(AR) rcs $@ $? - -test: $(TEST_OBJ) librdrand.a - $(CC) $(CFLAGS) -o $@ $(TEST_OBJ) -L. -lrdrand - -clean: - rm -f *.o librdrand.a test - -distclean: clean - rm -f Makefile config.guess config.status config.log config.h - diff --git a/sgx-jvm/linux-sgx/external/rdrand/src/README b/sgx-jvm/linux-sgx/external/rdrand/src/README deleted file mode 100644 index 2535036019..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/src/README +++ /dev/null @@ -1,26 +0,0 @@ -Rdrand Library ----------------------------- -Welcome to the Rdrand Library. This is a simple library aimed at -bringing suport for the rdrdand instruction feature of Intel processors -starting with the Intel(r) microarchitecture code name Ivy Bridge, (also known -as 3rd Generation Intel Core(tm) processor) to users with toolchains that do -not support this new feature. For more information on the rdrand instruction, -please visit http://software.intel.com/en-us/articles/download-the-latest-bull-mountain-software-implementation-guide/ -The new rdrand instruction is innovative hardware approach to high-quality, -high-performance entropy and random number generation. Because the many of -compiler toolchains do not support this new instruction, this library was -created to facilitate easy access to it. The idea is simple: link to a -built static library and enjoy the new feature! Or, if you wish the full -source code is provided. - -Documentation is stored in doc/--Point your browser to doc/html/index.html to get -started. Included in the documentation is more information about the -rdrand instruction, build instructions, and information on supported -toolchains. - -There is also a demonstration project using Microsoft* Visual Studio* project -file named "Test" that demonstrate linking to the generated library. - -Copyright(C) 2012 Intel Corporation. All rights reserved. - -*Other names and brands may be claimed as the property of others \ No newline at end of file diff --git a/sgx-jvm/linux-sgx/external/rdrand/src/config.h.in b/sgx-jvm/linux-sgx/external/rdrand/src/config.h.in deleted file mode 100644 index 1908799d2f..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/src/config.h.in +++ /dev/null @@ -1,53 +0,0 @@ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if using gcc and it supports RDRAND */ -#undef HAVE_RDRAND_IN_GCC - diff --git a/sgx-jvm/linux-sgx/external/rdrand/src/configure b/sgx-jvm/linux-sgx/external/rdrand/src/configure deleted file mode 100755 index 241321dfd5..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/src/configure +++ /dev/null @@ -1,4284 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for librdrand 1.1. -# -# Report bugs to . -# -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : - -else - exitcode=1; echo positional parameters were not saved. -fi -test x\$exitcode = x0 || exit 1" - as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO - as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO - eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} -fi - - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org and Intel Software -$0: Network about your system, including any error possibly -$0: output before this message. Then install a modern -$0: shell, or manually run the script under such a shell if -$0: you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='librdrand' -PACKAGE_TARNAME='librdrand' -PACKAGE_VERSION='1.1' -PACKAGE_STRING='librdrand 1.1' -PACKAGE_BUGREPORT='Intel Software Network' -PACKAGE_URL='' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='LTLIBOBJS -LIBOBJS -EGREP -GREP -CPP -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures librdrand 1.1 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/librdrand] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of librdrand 1.1:";; - esac - cat <<\_ACEOF - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to . -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -librdrand configure 1.1 -generated by GNU Autoconf 2.68 - -Copyright (C) 2010 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------- ## -## Report this to Intel Software Network ## -## ------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by librdrand $as_me 1.1, which was -generated by GNU Autoconf 2.68. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in icc gcc - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in icc gcc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -if test "x$CC" = "xgcc" -then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gcc knows the rdrand instruction" >&5 -$as_echo_n "checking if gcc knows the rdrand instruction... " >&6; } - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - asm("rdrand %eax;"); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - $as_echo "#define HAVE_RDRAND_IN_GCC 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -for ac_header in inttypes.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" -if test "x$ac_cv_header_inttypes_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H 1 -_ACEOF - -fi - -done - - -ac_config_files="$ac_config_files Makefile" - - -ac_config_headers="$ac_config_headers config.h" - - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -U= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by librdrand $as_me 1.1, which was -generated by GNU Autoconf 2.68. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" -ac_cs_version="\\ -librdrand config.status 1.1 -configured by $0, generated by GNU Autoconf 2.68, - with options \\"\$ac_cs_config\\" - -Copyright (C) 2010 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - - - esac - -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - - - diff --git a/sgx-jvm/linux-sgx/external/rdrand/src/configure.ac b/sgx-jvm/linux-sgx/external/rdrand/src/configure.ac deleted file mode 100644 index 162c4ddf4b..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/src/configure.ac +++ /dev/null @@ -1,21 +0,0 @@ -AC_INIT([librdrand], [1.1], [Intel Software Network]) - -AC_PROG_CC([icc gcc]) - -if test "x$CC" = "xgcc" -then - AC_MSG_CHECKING([if gcc knows the rdrand instruction]) - AC_TRY_COMPILE([], [ - asm("rdrand %eax;"); - ], AC_DEFINE([HAVE_RDRAND_IN_GCC]) AC_MSG_RESULT([yes]), AC_MSG_RESULT([no])) -fi - -AC_CHECK_HEADERS([inttypes.h]) - -AC_CONFIG_FILES([Makefile]) - -AC_CONFIG_HEADERS([config.h]) - -AC_OUTPUT - - diff --git a/sgx-jvm/linux-sgx/external/rdrand/src/main.c b/sgx-jvm/linux-sgx/external/rdrand/src/main.c deleted file mode 100644 index ad3aaf7ef7..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/src/main.c +++ /dev/null @@ -1,95 +0,0 @@ -/* Copyright © 2012, Intel Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -- Neither the name of Intel Corporation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -#include -#include - -#include "rdrand.h" - -#define BUFFSIZE 1275 - -int main() -{ - int r; - uint16_t u16; - uint32_t u32; - uint64_t u64; - uint32_t array32[10]; - uint64_t array64[10]; - unsigned char buffer[BUFFSIZE]; - - r = rdrand_16(&u16, 10); - if (r != RDRAND_SUCCESS ) printf("rdrand instruction failed with code %d\n", r); - - r = rdrand_32(&u32, 10); - if (r != RDRAND_SUCCESS ) printf("rdrand instruction failed with code %d\n", r); - - r = rdrand_64(&u64, 10); - if (r != RDRAND_SUCCESS ) printf("rdrand instruction failed with code %d\n", r); - - printf("uint16: %u\n", u16); - printf("uint32: %u\n", u32); - printf("uint64: %llu\n", (unsigned long long) u64); - - r = rdrand_get_n_32(10, array32); - if ( r == RDRAND_SUCCESS ) { - int i; - printf("\n10 uint32's:\n"); - for (i= 0; i< 10; ++i) { - printf("%u\n", array32[i]); - } - } else printf("rdrand instruction failed with code %d\n", r); - - r = rdrand_get_n_64(10, array64); - if ( r == RDRAND_SUCCESS ) { - int i; - printf("\n10 uint64's:\n"); - for (i= 0; i< 10; ++i) { - printf("%llu\n", (unsigned long long) array64[i]); - } - } else printf("rdrand instruction failed with code %d\n", r); - - memset(buffer, 0, BUFFSIZE); - r = rdrand_get_bytes(BUFFSIZE, buffer); - if ( r == RDRAND_SUCCESS ) { - int i, j; - printf("\nBuffer of %ld bytes:\n", (long) BUFFSIZE); - - j= 0; - for (i= 0; i< BUFFSIZE; ++i) - { - printf("%02x ", buffer[i]); - - ++j; - - if ( j == 16 ) { - j= 0; - printf("\n"); - } else if ( j == 8 ) printf(" "); - - } - printf("\n"); - } else printf("rdrand instruction failed with code %d\n", r); -} diff --git a/sgx-jvm/linux-sgx/external/rdrand/src/rdrand.c b/sgx-jvm/linux-sgx/external/rdrand/src/rdrand.c deleted file mode 100644 index f65f6494fd..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/src/rdrand.c +++ /dev/null @@ -1,385 +0,0 @@ -/* Copyright © 2012, Intel Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -- Neither the name of Intel Corporation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -#include "rdrand.h" - -#ifdef __INTEL_COMPILER -# include -#endif - -#include -#include - -/*! \def RDRAND_MASK -* The bit mask used to examine the ecx register returned by cpuid. The - * 30th bit is set. - */ -#define RDRAND_MASK 0x40000000 - -#define RETRY_LIMIT 10 - -#if defined(_WIN64)||defined(_LP64) -# define _IS64BIT -#endif - -#ifdef _IS64BIT -typedef uint64_t _wordlen_t; -#else -typedef uint32_t _wordlen_t; -#endif - -/* Mimic the Intel compiler's intrinsics as best we can if we are using gcc */ - -#ifdef __GNUC__ - -# define __cpuid(x,y) asm volatile("cpuid":"=a"(x[0]),"=b"(x[1]),"=c"(x[2]),"=d"(x[3]):"a"(y)) - -/* RDRAND isn't a supported instruction until gcc 4.6 */ - -# ifdef HAVE_RDRAND_IN_GCC - -# define _rdrand_step(x) ({ unsigned char err; asm volatile("rdrand %0; setc %1":"=r"(*x), "=qm"(err)); err; }) - -# define _rdrand16_step(x) _rdrand_step(x) -# define _rdrand32_step(x) _rdrand_step(x) - -# else - - /* Our version of gcc is too old, so we need to use byte code */ - -# define _rdrand16_step(x) ({ unsigned char err; asm volatile(".byte 0x66; .byte 0x0f; .byte 0xc7; .byte 0xf0; setc %1":"=a"(*x), "=qm"(err)); err; }) -# define _rdrand32_step(x) ({ unsigned char err; asm volatile(".byte 0x0f; .byte 0xc7; .byte 0xf0; setc %1":"=a"(*x), "=qm"(err)); err; }) - -# endif - -#ifdef _IS64BIT - -# ifdef HAVE_RDRAND_IN_GCC -# define _rdrand64_step(x) _rdrand_step(x) -# else - - /* Our version of gcc is too old, so we need to use byte code */ - -# define _rdrand64_step(x) ({ unsigned char err; asm volatile(".byte 0x48; .byte 0x0f; .byte 0xc7; .byte 0xf0; setc %1":"=a"(*x), "=qm"(err)); err; }) - -# endif - -#else - -/* - * The Intel compiler intrinsic for generating a 64-bit rand on a 32-bit - * system maps to two 32-bit RDRAND instructions. Because of the way - * the way the DRNG is implemented you can do this up to a 128-bit value - * (for crypto purposes) before you no longer have multiplicative - * prediction resistance. - * - * Note that this isn't very efficient. If you need 64-bit values - * you should really be on a 64-bit system. - */ - -int _rdrand64_step (uint64_t *x); - -int _rdrand64_step (uint64_t *x) -{ - uint32_t xlow, xhigh; - int rv; - - if ( (rv= _rdrand32_step(&xlow)) != RDRAND_SUCCESS ) return rv; - if ( (rv= _rdrand32_step(&xhigh)) != RDRAND_SUCCESS ) return rv; - - *x= (uint64_t) xlow | ((uint64_t)xhigh<<32); - - return RDRAND_SUCCESS; -} - -# endif - -#endif - -/*! \brief Queries cpuid to see if rdrand is supported - * - * rdrand support in a CPU is determined by examining the 30th bit of the ecx - * register after calling cpuid. - * - * \return bool of whether or not rdrand is supported - */ - -int RdRand_cpuid() -{ - int info[4] = {-1, -1, -1, -1}; - - /* Are we on an Intel processor? */ - - __cpuid(info, 0); - - if ( memcmp((void *) &info[1], (void *) "Genu", 4) != 0 || - memcmp((void *) &info[3], (void *) "ineI", 4) != 0 || - memcmp((void *) &info[2], (void *) "ntel", 4) != 0 ) { - - return 0; - } - - /* Do we have RDRAND? */ - - __cpuid(info, /*feature bits*/1); - - int ecx = info[2]; - if ((ecx & RDRAND_MASK) == RDRAND_MASK) - return 1; - else - return 0; -} - -/*! \brief Determines whether or not rdrand is supported by the CPU - * - * This function simply serves as a cache of the result provided by cpuid, - * since calling cpuid is so expensive. The result is stored in a static - * variable to save from calling cpuid on each invocation of rdrand. - * - * \return bool/int of whether or not rdrand is supported - */ - -int RdRand_isSupported() -{ - static int supported = RDRAND_SUPPORT_UNKNOWN; - - if (supported == RDRAND_SUPPORT_UNKNOWN) - { - if (RdRand_cpuid()) - supported = RDRAND_SUPPORTED; - else - supported = RDRAND_UNSUPPORTED; - } - - return (supported == RDRAND_SUPPORTED) ? 1 : 0; -} - -int rdrand_16(uint16_t* x, int retry) -{ - if (RdRand_isSupported()) - { - if (retry) - { - int i; - - for (i = 0; i < RETRY_LIMIT; i++) - { - if (_rdrand16_step(x)) - return RDRAND_SUCCESS; - } - - return RDRAND_NOT_READY; - } - else - { - if (_rdrand16_step(x)) - return RDRAND_SUCCESS; - else - return RDRAND_NOT_READY; - } - } - else - { - return RDRAND_UNSUPPORTED; - } -} - -int rdrand_32(uint32_t* x, int retry) -{ - if (RdRand_isSupported()) - { - if (retry) - { - int i; - - for (i= 0; i < RETRY_LIMIT; i++) - { - if (_rdrand32_step(x)) - return RDRAND_SUCCESS; - } - - return RDRAND_NOT_READY; - } - else - { - if (_rdrand32_step(x)) - return RDRAND_SUCCESS; - else - return RDRAND_NOT_READY; - } - } - else - { - return RDRAND_UNSUPPORTED; - } -} - -int rdrand_64(uint64_t* x, int retry) -{ - if (RdRand_isSupported()) - { - if (retry) - { - int i; - - for (i= 0; i < RETRY_LIMIT; i++) - { - if (_rdrand64_step(x)) - return RDRAND_SUCCESS; - } - - return RDRAND_NOT_READY; - } - else - { - if (_rdrand64_step(x)) - return RDRAND_SUCCESS; - else - return RDRAND_NOT_READY; - } - } - else - { - return RDRAND_UNSUPPORTED; - } -} - -int rdrand_get_n_64(unsigned int n, uint64_t *dest) -{ - int success; - int count; - unsigned int i; - - for (i=0; i 0) - { -#ifdef _IS64BIT - if ( (success= rdrand_64((uint64_t *) &temprand, 1)) != RDRAND_SUCCESS) return success; -#else - if ( (success= rdrand_32((uint32_t *) &temprand, 1)) != RDRAND_SUCCESS) return success; -#endif - } - - /* populate the starting misaligned block */ - for (i = 0; i> 8; - } - - /* populate the central aligned block. Fail out if retry fails */ - -#ifdef _IS64BIT - if ( (success= rdrand_get_n_64(length, (uint64_t *)(blockstart))) != RDRAND_SUCCESS) return success; -#else - if ( (success= rdrand_get_n_32(length, (uint32_t *)(blockstart))) != RDRAND_SUCCESS) return success; -#endif - /* populate the final misaligned block */ - if (residual > 0) - { -#ifdef _IS64BIT - if ((success= rdrand_64((uint64_t *)&temprand, 1)) != RDRAND_SUCCESS) return success; -#else - if ((success= rdrand_32((uint32_t *)&temprand, 1)) != RDRAND_SUCCESS) return success; -#endif - - for (i = 0; i> 8; - } - } - - return RDRAND_SUCCESS; -} - - diff --git a/sgx-jvm/linux-sgx/external/rdrand/src/rdrand.h b/sgx-jvm/linux-sgx/external/rdrand/src/rdrand.h deleted file mode 100644 index f4d06cac15..0000000000 --- a/sgx-jvm/linux-sgx/external/rdrand/src/rdrand.h +++ /dev/null @@ -1,169 +0,0 @@ -/* Copyright © 2012, Intel Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -- Neither the name of Intel Corporation nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY INTEL CORPORATION "AS IS" AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -EVENT SHALL INTEL CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -/*! \file rdrand.h - * \brief Public header for rdrand API. - * - * This is the public header for the rdrand API. It exposes the three public - * APIs, which access the rdrand instruction for various data sizes. - */ - -#ifndef RDRAND_H -#define RDRAND_H - -#include "config.h" - -#if HAVE_INTTYPES_H -#include -#endif - -#ifdef _MSC_VER - /* MSVC specific */ - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - typedef unsigned __int64 uint64_t; -#endif - -/*! \def RDRAND_SUCCESS - * The rdrand call was successful, the hardware was ready, and a random - * number was returned. - */ -#define RDRAND_SUCCESS 1 - -/*! \def RDRAND_NOT_READY - * The rdrand call was unsuccessful, the hardware was not ready, and a - * random number was not returned. - */ -#define RDRAND_NOT_READY -1 - -/*! \def RDRAND_SUPPORTED - * The rdrand instruction is supported by the host hardware. - */ -#define RDRAND_SUPPORTED -2 - -/*! \def RDRAND_UNSUPPORTED - * The rdrand instruction is unsupported by the host hardware. - */ -#define RDRAND_UNSUPPORTED -3 - -/*! \def RDRAND_SUPPORT_UNKNOWN - * Whether or not the hardware supports the rdrand instruction is unknown - */ -#define RDRAND_SUPPORT_UNKNOWN -4 - -/*! \brief Calls rdrand for a 16-bit result. - * - * This function calls rdrand requesting a 16-bit result. By default, it will - * perform only a single call to rdrand, returning success or failure. On - * success, the data is written to memory pointed to by x. If the int retry is - * true (non-zero), the function will enter a loop with count=10 until rdrand succeeds, at - * which point it write the random data and return success, or fails This - * function also ensures that rdrand is supported by the cpu or fails - * gracefully. - * - * \param x pointer to memory to store the random result - * \param retry int to determine whether or not to loop until rdrand succeeds - * or until 10 failed attempts - * - * \return whether or not the call was successful, or supported at all - */ -int rdrand_16(uint16_t* x, int retry); - -/*! \brief Calls rdrand for a 32-byte result. - * - * This function calls rdrand requesting a 32-bit result. By default, it will - * perform only a single call to rdrand, returning success or failure. On - * success, the data is written to memory pointed to by x. If the int retry is - * true (non-zero), the function will enter a loop with count=10 until rdrand succeeds, at - * which point it write the random data and return success, or fails This - * function also ensures that rdrand is supported by the cpu or fails - * gracefully. - * - * \param x pointer to memory to store the random result - * \param retry int to determine whether or not to loop until rdrand succeeds - * or until 10 failed attempts - * - * \return whether or not the call was successful, or supported at all - */ -int rdrand_32(uint32_t* x, int retry); - -/*! \brief Calls rdrand for a 64-byte result. - * - * This function calls rdrand requesting a 64-byte result. By default, it will - * perform only a single call to rdrand, returning success or failure. On - * success, the data is written to memory pointed to by x. If the int retry is - * true (non-zero), the function will enter a loop with count=10 until rdrand succeeds, at - * which point it write the random data and return success, or fails This - * function also ensures that rdrand is supported by the cpu or fails - * gracefully. - * - * Calling rdrand_64 on a 32-bit system is inefficient as it makes two calls - * to rdrand_32 to produce a single 64-bit value, using a shift to populate - * the high bits. The physical construction of the DRNG allows you to do this - * up to a 128-bit value while retaining multiplicative prediction resistance - * (i.e., don't do this to generate numbers larger than 128 bits). - * - * \param x pointer to memory to store the random result - * \param retry int to determine whether or not to loop until rdrand succeeds - * or until 10 failed attempts - * - * \return whether or not the call was successful, or supported at all - */ -int rdrand_64(uint64_t* x, int retry); - -/*! \brief Calls rdrand to obtain multiple 64-byte results. - * - * This function calls rdrand requesting multiple 64-byte results. On - * success, the data is written to memory pointed to by x. This function - * calls rdrand_64 and if any of those invocations fail, this function - * fails. It returns the same values as rdrand_64. - * - * This function is inefficient on 32-bit systems. - */ -int rdrand_get_n_64(unsigned int n, uint64_t* x); - -/*! \brief Calls rdrand to obtain multiple 32-byte results. - * - * This function calls rdrand requesting multiple 32-byte results. On - * success, the data is written to memory pointed to by x. This function - * calls rdrand_32 and if any of those invocations fail, this function - * fails. It returns the same values as rdrand_32. - */ -int rdrand_get_n_32(unsigned int n, uint32_t* x); - -/*! \brief Calls rdrand to fill a buffer of arbitrary size with random bytes. - * - * This function calls rdrand requesting multiple 64- or 32-bit results to - * fill a buffer of arbitrary size. - * - * \param n size of the buffer to fill with random bytes - * \param buffer pointer to memory to store the random result - * - * \return whether or not the call was successful, or supported at all - */ - -int rdrand_get_bytes(unsigned int n, unsigned char *buffer); - -#endif // RDRAND_H diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acos_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acos_wmt.S deleted file mode 100644 index d3163b7aca..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acos_wmt.S +++ /dev/null @@ -1,1927 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acos_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin acos - .text - .align 16,0x90 - .globl acos -acos: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd 6048(%ebx), %xmm4 - movsd 6080(%ebx), %xmm3 - xorpd %xmm5, %xmm5 - movsd 6064(%ebx), %xmm2 - movapd %xmm0, %xmm1 - movsd %xmm0, 8(%esp) - psrlq $44, %xmm0 - movd %xmm0, %edx - movapd %xmm1, %xmm7 - movl $8192, %ecx - pinsrw $2, %ecx, %xmm5 - movapd %xmm1, %xmm0 - movl $524287, %eax - andl %edx, %eax - subl $260864, %eax - cmpl $955, %eax - jae .L_2TAG_PACKET_0.0.3 - mulsd %xmm1, %xmm1 - andl $65535, %edx - subsd %xmm1, %xmm3 - sqrtsd %xmm3, %xmm3 - andpd %xmm7, %xmm2 - andl $-4, %edx - subl $64256, %edx - movsd 3840(%ebx,%edx,2), %xmm1 - orpd %xmm5, %xmm2 - movapd (%ebx,%edx,4), %xmm4 - movapd %xmm7, %xmm6 - addsd %xmm2, %xmm7 - subsd %xmm2, %xmm0 - mulsd %xmm0, %xmm7 - mulsd %xmm1, %xmm6 - mulsd %xmm2, %xmm3 - movapd %xmm6, %xmm1 - addsd %xmm3, %xmm6 - divsd %xmm6, %xmm7 - movsd 5976(%ebx), %xmm0 - movsd 5960(%ebx), %xmm5 - subsd %xmm3, %xmm1 - psrlq $63, %xmm2 - movapd %xmm1, %xmm3 - psllq $63, %xmm2 - mulsd %xmm1, %xmm1 - pshufd $68, %xmm2, %xmm2 - movsd 5968(%ebx), %xmm6 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm0 - xorpd %xmm2, %xmm4 - mulsd %xmm3, %xmm5 - subpd 5888(%ebx), %xmm4 - mulsd %xmm1, %xmm3 - addsd %xmm6, %xmm0 - mulsd %xmm3, %xmm0 - subsd %xmm4, %xmm5 - pshufd $238, %xmm4, %xmm4 - addsd %xmm5, %xmm0 - subsd %xmm7, %xmm0 - subsd %xmm4, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - subl $955, %eax - cmpl $65, %eax - jae .L_2TAG_PACKET_2.0.3 - psrlq $38, %xmm7 - psllq $38, %xmm7 - pmovmskb %xmm0, %eax - andnpd %xmm0, %xmm4 - subsd %xmm7, %xmm1 - movapd %xmm7, %xmm6 - mulsd %xmm7, %xmm7 - addsd %xmm6, %xmm0 - orpd %xmm4, %xmm5 - subsd %xmm7, %xmm3 - mulsd %xmm1, %xmm0 - movapd %xmm3, %xmm4 - subsd %xmm0, %xmm3 - sqrtsd %xmm3, %xmm3 - andl $128, %eax - shrl $7, %eax - negl %eax - movapd %xmm3, %xmm7 - andpd %xmm3, %xmm2 - psllq $2, %xmm3 - pextrw $3, %xmm3, %edx - orpd %xmm5, %xmm2 - movd %eax, %xmm3 - pshufd $0, %xmm3, %xmm3 - subl $65216, %edx - addl %edx, %edx - mulsd 3840(%ebx,%edx,4), %xmm7 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - subsd %xmm7, %xmm6 - andpd 5904(%ebx), %xmm3 - addsd %xmm1, %xmm6 - subsd %xmm2, %xmm4 - addsd %xmm7, %xmm7 - movsd 5960(%ebx), %xmm5 - subsd %xmm0, %xmm4 - addsd %xmm6, %xmm7 - movsd 5976(%ebx), %xmm0 - divsd %xmm7, %xmm4 - movsd 5968(%ebx), %xmm2 - addpd (%ebx,%edx,8), %xmm3 - movapd %xmm6, %xmm1 - mulsd %xmm6, %xmm6 - mulsd %xmm6, %xmm0 - mulsd %xmm6, %xmm1 - mulsd %xmm1, %xmm5 - mulsd %xmm6, %xmm1 - addsd %xmm2, %xmm0 - pxor %xmm6, %xmm6 - mulsd %xmm1, %xmm0 - addsd %xmm3, %xmm5 - addsd %xmm5, %xmm0 - andl $32768, %eax - pinsrw $3, %eax, %xmm6 - movapd %xmm4, %xmm5 - pshufd $238, %xmm3, %xmm3 - addsd %xmm3, %xmm4 - subsd %xmm4, %xmm3 - addsd %xmm3, %xmm5 - addsd %xmm5, %xmm0 - addsd %xmm4, %xmm0 - xorpd %xmm6, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - addl $15291, %eax - cmpl $14336, %eax - jae .L_2TAG_PACKET_3.0.3 - unpcklpd %xmm0, %xmm0 - movapd 5984(%ebx), %xmm6 - unpcklpd %xmm0, %xmm1 - movapd 6000(%ebx), %xmm2 - movapd 6016(%ebx), %xmm4 - mulpd %xmm0, %xmm0 - movapd 5888(%ebx), %xmm5 - mulpd %xmm0, %xmm1 - mulpd %xmm0, %xmm6 - mulpd %xmm0, %xmm0 - movapd %xmm1, %xmm3 - mulsd %xmm1, %xmm1 - addpd %xmm2, %xmm6 - mulpd %xmm0, %xmm4 - mulsd %xmm3, %xmm1 - addpd %xmm4, %xmm6 - pshufd $238, %xmm5, %xmm0 - mulpd %xmm6, %xmm1 - pshufd $238, %xmm5, %xmm6 - subsd %xmm7, %xmm0 - pshufd $238, %xmm1, %xmm2 - subsd %xmm1, %xmm5 - subsd %xmm0, %xmm6 - subsd %xmm2, %xmm5 - subsd %xmm6, %xmm7 - subsd %xmm7, %xmm5 - addsd %xmm5, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - subl $15356, %eax - cmpl $4, %eax - jae .L_2TAG_PACKET_4.0.3 - xorpd %xmm6, %xmm6 - andpd 6048(%ebx), %xmm7 - movsd 6096(%ebx), %xmm4 - movapd 5984(%ebx), %xmm1 - mulsd %xmm4, %xmm7 - movapd 6000(%ebx), %xmm2 - subsd %xmm7, %xmm4 - movapd 6016(%ebx), %xmm3 - pshufd $68, %xmm4, %xmm7 - sqrtsd %xmm4, %xmm4 - mulpd %xmm7, %xmm1 - pshufd $68, %xmm7, %xmm5 - pextrw $3, %xmm0, %eax - mulpd %xmm7, %xmm7 - addpd %xmm1, %xmm2 - movsd 5936(%ebx), %xmm1 - mulpd %xmm7, %xmm3 - cmpsd $1, %xmm6, %xmm0 - mulsd %xmm5, %xmm7 - addpd %xmm3, %xmm2 - pshufd $68, %xmm0, %xmm0 - mulsd %xmm7, %xmm2 - andpd 5904(%ebx), %xmm0 - mulpd %xmm5, %xmm2 - andpd %xmm4, %xmm1 - pshufd $68, %xmm4, %xmm3 - subsd %xmm1, %xmm4 - addsd %xmm3, %xmm3 - mulsd %xmm1, %xmm1 - subsd %xmm4, %xmm3 - subsd %xmm1, %xmm5 - mulsd %xmm3, %xmm4 - pshufd $238, %xmm3, %xmm3 - subsd %xmm4, %xmm5 - divsd %xmm3, %xmm5 - addpd %xmm3, %xmm3 - mulpd %xmm3, %xmm2 - pshufd $238, %xmm2, %xmm4 - addsd %xmm0, %xmm2 - andl $32768, %eax - pinsrw $3, %eax, %xmm6 - pshufd $238, %xmm0, %xmm0 - addsd %xmm4, %xmm2 - addsd %xmm5, %xmm2 - addsd %xmm3, %xmm2 - addsd %xmm2, %xmm0 - xorpd %xmm6, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_4.0.3: - addl $261884, %eax - cmpl $261888, %eax - jb .L_2TAG_PACKET_5.0.3 - movd %xmm7, %ecx - psrlq $32, %xmm7 - movd %xmm7, %edx - andl $2147483647, %edx - movl $1072693248, %eax - subl %edx, %eax - orl %ecx, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_6.0.3 - movq 8(%esp), %xmm2 - movd %xmm2, %edx - psrlq $32, %xmm2 - movd %xmm2, %ecx - andl $2147483647, %ecx - subl $1, %edx - sbbl $2146435072, %ecx - cmpl $0, %ecx - jge .L_2TAG_PACKET_7.0.3 - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %edx - pinsrw $3, %edx, %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $58, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_6.0.3: - pextrw $1, %xmm7, %edx - shrl $15, %edx - negl %edx - movd %edx, %xmm7 - pshufd $0, %xmm7, %xmm7 - movsd 5920(%ebx), %xmm2 - movsd 5928(%ebx), %xmm0 - andpd %xmm7, %xmm2 - andpd %xmm7, %xmm0 - addsd %xmm2, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_5.0.3: - movsd 5888(%ebx), %xmm2 - movsd 5896(%ebx), %xmm0 - addsd %xmm2, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_7.0.3: - xorpd %xmm6, %xmm6 - addsd %xmm6, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) -.L_2TAG_PACKET_1.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type acos,@function - .size acos,.-acos - .data -# -- End acos - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 3822952792 - .long 1021639372 - .long 182792448 - .long 1068507836 - .long 2264213271 - .long 1019558908 - .long 649052928 - .long 1068524253 - .long 1797139609 - .long 1022295143 - .long 1243095296 - .long 1068540671 - .long 1415938756 - .long 1021439537 - .long 2033294592 - .long 1068557090 - .long 2356809978 - .long 1021777916 - .long 3088063744 - .long 1068573510 - .long 2669055318 - .long 1022124482 - .long 180888576 - .long 1068589932 - .long 3566445325 - .long 1021358712 - .long 1970196992 - .long 1068606354 - .long 896980323 - .long 1021319659 - .long 4229555456 - .long 1068622777 - .long 436049712 - .long 1021319758 - .long 2732572160 - .long 1068639202 - .long 583123209 - .long 1020797960 - .long 1842831872 - .long 1068655628 - .long 1370449804 - .long 1021429270 - .long 1628994560 - .long 1068672055 - .long 2411391464 - .long 1021057980 - .long 2159763712 - .long 1068688483 - .long 1208692749 - .long 1021943903 - .long 3503886336 - .long 1068704912 - .long 538793309 - .long 1019744063 - .long 1435187200 - .long 1068721343 - .long 4085087612 - .long 1020608419 - .long 317469952 - .long 1068737775 - .long 144386942 - .long 1021440732 - .long 219617280 - .long 1068754208 - .long 2940088361 - .long 1019981122 - .long 1210558208 - .long 1068770642 - .long 2176850347 - .long 1018373705 - .long 3359268352 - .long 1068787077 - .long 2395611454 - .long 1021889042 - .long 2439803648 - .long 1068803514 - .long 1650705253 - .long 1020227966 - .long 2816203520 - .long 1068819952 - .long 3702166386 - .long 1019379914 - .long 262620672 - .long 1068836392 - .long 1855649370 - .long 1020453124 - .long 3438159616 - .long 1068852832 - .long 923063860 - .long 1019273834 - .long 3822105856 - .long 1068869274 - .long 4289947947 - .long 1019434249 - .long 1483729920 - .long 1068885718 - .long 787455814 - .long 1020738379 - .long 787321088 - .long 1068902163 - .long 3321653337 - .long 1021842569 - .long 1802253312 - .long 1068918609 - .long 2653633526 - .long 1021821525 - .long 302985984 - .long 1068935057 - .long 161272028 - .long 1021655149 - .long 653966080 - .long 1068951506 - .long 2566098667 - .long 1020066219 - .long 2924727296 - .long 1068967956 - .long 3646493722 - .long 1014292285 - .long 2889890304 - .long 1068984408 - .long 1081009196 - .long 1022189620 - .long 619098112 - .long 1069000862 - .long 4011643355 - .long 1021773297 - .long 477017600 - .long 1069017317 - .long 4030305534 - .long 1021292252 - .long 2533403904 - .long 1069033773 - .long 2645187591 - .long 1019527099 - .long 2563102208 - .long 1069050231 - .long 3857293792 - .long 1022311697 - .long 635982336 - .long 1069066691 - .long 3625936637 - .long 1017511744 - .long 1116940800 - .long 1069083152 - .long 3653872993 - .long 1022016631 - .long 4075964160 - .long 1069099614 - .long 2468900271 - .long 1021769532 - .long 993165568 - .long 1069116079 - .long 1358104224 - .long 1021199776 - .long 528586752 - .long 1069132545 - .long 2200950332 - .long 1022024872 - .long 2752395776 - .long 1069149012 - .long 3197072454 - .long 1017751319 - .long 3439855616 - .long 1069165481 - .long 1651081806 - .long 1020809338 - .long 2661257728 - .long 1069181952 - .long 539032752 - .long 1021728805 - .long 486957312 - .long 1069198425 - .long 3136045149 - .long 1016888671 - .long 1282340352 - .long 1069214899 - .long 2593963259 - .long 1018956103 - .long 822921728 - .long 1069231375 - .long 2146032737 - .long 1022306465 - .long 3474216192 - .long 1069247852 - .long 3976811625 - .long 1021350207 - .long 716902656 - .long 1069264332 - .long 718267222 - .long 1018624727 - .long 1211594496 - .long 1069280813 - .long 1485641389 - .long 1018447451 - .long 734070272 - .long 1069297296 - .long 354455128 - .long 1021341291 - .long 3650110720 - .long 1069313780 - .long 682185947 - .long 1021651853 - .long 1440663040 - .long 1069330267 - .long 3558574550 - .long 1021615110 - .long 2766612224 - .long 1069346755 - .long 874607978 - .long 1017746872 - .long 3404011008 - .long 1069363245 - .long 4154988502 - .long 1021439906 - .long 3423949056 - .long 1069379737 - .long 2263202309 - .long 1021479615 - .long 2897587712 - .long 1069396231 - .long 2562065031 - .long 1022090363 - .long 1896159232 - .long 1069412727 - .long 3836237663 - .long 1019867288 - .long 490968576 - .long 1069429225 - .long 3322056743 - .long 1006752762 - .long 3048360192 - .long 1069445724 - .long 1152314833 - .long 1013122252 - .long 1049850624 - .long 1069462226 - .long 3601590727 - .long 1022214610 - .long 3156899584 - .long 1069478729 - .long 1855169970 - .long 1019487271 - .long 851173376 - .long 1069495235 - .long 312649594 - .long 1020868604 - .long 2794281728 - .long 1069511742 - .long 1093490181 - .long 1020777577 - .long 468042496 - .long 1069528252 - .long 1152540679 - .long 1021403732 - .long 2534219264 - .long 1069544763 - .long 2292126035 - .long 1021872430 - .long 1376146432 - .long 1069558527 - .long 3293753641 - .long 1020500454 - .long 4175442432 - .long 1069575044 - .long 3626347564 - .long 1021610969 - .long 3523113472 - .long 1069591566 - .long 339956500 - .long 1021119039 - .long 4003350528 - .long 1069608092 - .long 3429333082 - .long 1022813542 - .long 1611067392 - .long 1069624623 - .long 2298017544 - .long 1021977587 - .long 931782144 - .long 1069641158 - .long 2164684743 - .long 1021250988 - .long 2256725504 - .long 1069657697 - .long 1138762335 - .long 1021443776 - .long 1582853120 - .long 1069674241 - .long 1084010382 - .long 1022994693 - .long 3497758720 - .long 1069690789 - .long 406366244 - .long 1022713586 - .long 3999816960 - .long 1069707342 - .long 1488723042 - .long 1023381290 - .long 3383096064 - .long 1069723900 - .long 2541558953 - .long 1019137887 - .long 1942403584 - .long 1069740463 - .long 1879620343 - .long 1022653642 - .long 4268263680 - .long 1069757030 - .long 3039077047 - .long 1022252545 - .long 2067062272 - .long 1069773603 - .long 4190670677 - .long 1020725863 - .long 4225828096 - .long 1069790180 - .long 1998567321 - .long 1022014385 - .long 2452507136 - .long 1069806763 - .long 1511628873 - .long 1021900300 - .long 1340746240 - .long 1069823351 - .long 788367341 - .long 1022726208 - .long 1190035456 - .long 1069839944 - .long 3856337230 - .long 1021834118 - .long 2300688384 - .long 1069856542 - .long 3211396579 - .long 1022621365 - .long 678886400 - .long 1069873146 - .long 4001011887 - .long 1022042646 - .long 921594112 - .long 1069889755 - .long 557811968 - .long 1023065533 - .long 3331668992 - .long 1069906369 - .long 1877060679 - .long 1022419742 - .long 3917875200 - .long 1069922989 - .long 1181055171 - .long 1022752712 - .long 2984829696 - .long 1069939615 - .long 4294526932 - .long 1021499988 - .long 838049024 - .long 1069956247 - .long 3658081878 - .long 1022957952 - .long 2078928384 - .long 1069972884 - .long 820353701 - .long 1019391107 - .long 2719854336 - .long 1069989527 - .long 1644022489 - .long 1023378240 - .long 3069117696 - .long 1070006176 - .long 2771393702 - .long 1019319954 - .long 3435962368 - .long 1070022831 - .long 3876394145 - .long 1023024433 - .long 4130595328 - .long 1070039492 - .long 1630447748 - .long 1021465882 - .long 1169236224 - .long 1070056160 - .long 2828355997 - .long 1020458120 - .long 3453997312 - .long 1070072833 - .long 164091641 - .long 1020388279 - .long 2708127744 - .long 1070089513 - .long 3036550223 - .long 1023328684 - .long 3540797696 - .long 1070106199 - .long 3710949463 - .long 1022568805 - .long 1972276736 - .long 1070122892 - .long 3885277950 - .long 1019761674 - .long 2613815552 - .long 1070139591 - .long 2764165077 - .long 1022921023 - .long 1487791616 - .long 1070156297 - .long 1330644769 - .long 1023162679 - .long 3207593472 - .long 1070173009 - .long 3911007221 - .long 1022993496 - .long 3797764608 - .long 1070189728 - .long 979712598 - .long 1022554580 - .long 3578920448 - .long 1070206454 - .long 2825738223 - .long 1020223708 - .long 2872795648 - .long 1070223187 - .long 392451124 - .long 1022666279 - .long 2002258432 - .long 1070239927 - .long 3730407632 - .long 1023148291 - .long 1291326464 - .long 1070256674 - .long 3723802980 - .long 1022514089 - .long 1065180928 - .long 1070273428 - .long 2635617463 - .long 1022654470 - .long 1650181632 - .long 1070290189 - .long 2061982883 - .long 1022853411 - .long 3373882880 - .long 1070306957 - .long 319732785 - .long 1022017175 - .long 2270081280 - .long 1070323733 - .long 2237757411 - .long 1023064087 - .long 2963732736 - .long 1070340516 - .long 468839165 - .long 1023293774 - .long 1491099904 - .long 1070357307 - .long 1502657946 - .long 1021533479 - .long 2479636480 - .long 1070374105 - .long 482913562 - .long 1021986286 - .long 1968133632 - .long 1070390911 - .long 3281474337 - .long 1022646400 - .long 291639040 - .long 1070407725 - .long 2453320259 - .long 1022812423 - .long 2081472512 - .long 1070424546 - .long 2939989570 - .long 1023091888 - .long 3380340480 - .long 1070441375 - .long 2850707499 - .long 1021921109 - .long 232287488 - .long 1070458213 - .long 3674625342 - .long 1020725130 - .long 1567614208 - .long 1070475058 - .long 9347334 - .long 1022024009 - .long 3433091072 - .long 1070491911 - .long 282524999 - .long 1021433523 - .long 1876877312 - .long 1070508773 - .long 3470449440 - .long 1019309721 - .long 1538472192 - .long 1070525643 - .long 2089486825 - .long 1019698916 - .long 2763830784 - .long 1070542521 - .long 443498115 - .long 1020505194 - .long 1605381632 - .long 1070559408 - .long 3018871601 - .long 1022869913 - .long 2706946048 - .long 1070576303 - .long 3936260892 - .long 1023175875 - .long 2123887360 - .long 1070593207 - .long 2994220655 - .long 1022825948 - .long 104015104 - .long 1070603108 - .long 335054493 - .long 1023441853 - .long 2904568832 - .long 1070615800 - .long 1451215633 - .long 1023853857 - .long 3456197120 - .long 1070632739 - .long 436334733 - .long 1024026432 - .long 252452352 - .long 1070649697 - .long 34596167 - .long 1024031396 - .long 3328018432 - .long 1070666672 - .long 2644547073 - .long 1024296758 - .long 1255829248 - .long 1070683667 - .long 552832586 - .long 1023763122 - .long 4097058560 - .long 1070700680 - .long 1955640623 - .long 1021394654 - .long 451770112 - .long 1070717714 - .long 3428903777 - .long 1022941142 - .long 408920832 - .long 1070734767 - .long 165503263 - .long 1023894958 - .long 1186960640 - .long 1070751840 - .long 435826450 - .long 1024026134 - .long 19078656 - .long 1070768934 - .long 1834169749 - .long 1022899284 - .long 2743490304 - .long 1070786048 - .long 494581074 - .long 1018818479 - .long 2328961024 - .long 1070803184 - .long 2987908834 - .long 1022581110 - .long 350011392 - .long 1070820342 - .long 240771184 - .long 1024143083 - .long 2692326912 - .long 1070837521 - .long 666056837 - .long 1022394776 - .long 2373274368 - .long 1070854723 - .long 2484337770 - .long 1024228156 - .long 1017131520 - .long 1070871948 - .long 3285648279 - .long 1024025789 - .long 265558272 - .long 1070889196 - .long 392241896 - .long 1024252809 - .long 1778008064 - .long 1070906467 - .long 1536107943 - .long 1023949300 - .long 2937184768 - .long 1070923762 - .long 3541062251 - .long 1019448646 - .long 1144442880 - .long 1070941082 - .long 3691683781 - .long 1022123948 - .long 2410165504 - .long 1070958426 - .long 1804181960 - .long 1023945221 - .long 4174350848 - .long 1070975795 - .long 2016094861 - .long 1021716585 - .long 3897012480 - .long 1070993190 - .long 175294410 - .long 1023703404 - .long 3353623040 - .long 1071010611 - .long 167973242 - .long 1023240839 - .long 45671168 - .long 1071028059 - .long 2166856113 - .long 1021565413 - .long 86063872 - .long 1071045533 - .long 2676254727 - .long 1023985299 - .long 1019772672 - .long 1071063034 - .long 989043593 - .long 1021549587 - .long 414297344 - .long 1071080563 - .long 3960972046 - .long 1024307251 - .long 155173120 - .long 1071098120 - .long 1830919291 - .long 1021592251 - .long 2151562240 - .long 1071115705 - .long 405408666 - .long 1023423128 - .long 4041854720 - .long 1071133319 - .long 2043497827 - .long 1024411503 - .long 3489224192 - .long 1071150963 - .long 3072215864 - .long 1022698635 - .long 2477196288 - .long 1071168637 - .long 1812195139 - .long 1022689192 - .long 3015298816 - .long 1071186341 - .long 764841969 - .long 1021027331 - .long 2844731136 - .long 1071204076 - .long 2878117321 - .long 1019116513 - .long 4028950528 - .long 1071221842 - .long 698911452 - .long 1023265602 - .long 69441536 - .long 1071239641 - .long 3253467847 - .long 1020795075 - .long 1676209920 - .long 1071257471 - .long 4272431167 - .long 1022873982 - .long 2408752384 - .long 1071275334 - .long 648519100 - .long 1024385717 - .long 151623680 - .long 1071293231 - .long 345257017 - .long 1019561408 - .long 1410154240 - .long 1071311161 - .long 197863993 - .long 1023224207 - .long 4131351552 - .long 1071329125 - .long 2620801789 - .long 1024411169 - .long 1999664384 - .long 1071347125 - .long 3952692616 - .long 1024168086 - .long 1617668864 - .long 1071365160 - .long 3019889809 - .long 1021907692 - .long 1032074240 - .long 1071383231 - .long 59469899 - .long 1023656194 - .long 2619492096 - .long 1071401338 - .long 1417526820 - .long 1021457783 - .long 202429440 - .long 1071419483 - .long 2927667935 - .long 1019175447 - .long 525044224 - .long 1071437665 - .long 38166811 - .long 1023981879 - .long 1779258880 - .long 1071455885 - .long 481252500 - .long 1023310234 - .long 2195673600 - .long 1071474144 - .long 3962395981 - .long 1021339088 - .long 44573696 - .long 1071492443 - .long 3936281395 - .long 1023014829 - .long 2226905344 - .long 1071510781 - .long 1515320476 - .long 1024320623 - .long 2800512512 - .long 1071529160 - .long 1225403697 - .long 1021081846 - .long 161113600 - .long 1071547581 - .long 3064809733 - .long 1024173917 - .long 1338410240 - .long 1071566043 - .long 2027604973 - .long 1024362526 - .long 522433280 - .long 1071584548 - .long 2055171723 - .long 1023858825 - .long 539595776 - .long 1071603096 - .long 3868820135 - .long 1022936424 - .long 4264017664 - .long 1071621687 - .long 3228065145 - .long 1023479578 - .long 1733924096 - .long 1071640324 - .long 3511934475 - .long 1022496355 - .long 108880384 - .long 1071651839 - .long 615880967 - .long 1023519706 - .long 3517856512 - .long 1071661202 - .long 3113108559 - .long 1025190289 - .long 4043153152 - .long 1071670589 - .long 1571836218 - .long 1023106116 - .long 3251299072 - .long 1071680000 - .long 3444076102 - .long 1022187841 - .long 2736921600 - .long 1071689435 - .long 272771483 - .long 1025095280 - .long 3897698560 - .long 1071703633 - .long 2075390188 - .long 1022489022 - .long 3209485056 - .long 1071722652 - .long 1438094065 - .long 1021844944 - .long 3781432064 - .long 1071741774 - .long 1675017145 - .long 1024143828 - .long 2684184064 - .long 1071761003 - .long 2259963753 - .long 1024731393 - .long 1840489728 - .long 1071780342 - .long 3372883597 - .long 1023431408 - .long 3764087808 - .long 1071799794 - .long 3307523102 - .long 1024485788 - .long 3006232320 - .long 1071819364 - .long 3088971966 - .long 1025213251 - .long 3374881280 - .long 1071839055 - .long 834437749 - .long 1025236452 - .long 797284864 - .long 1071858872 - .long 3122663941 - .long 1025320473 - .long 545765120 - .long 1071878818 - .long 826539625 - .long 1022450955 - .long 107562240 - .long 1071898898 - .long 339584600 - .long 1022481255 - .long 2123649024 - .long 1071919116 - .long 3912959833 - .long 1024321009 - .long 1562385664 - .long 1071939478 - .long 2846067230 - .long 1023343981 - .long 2963085824 - .long 1071959988 - .long 954548627 - .long 1021475211 - .long 3325550592 - .long 1071980652 - .long 3459651155 - .long 1025305573 - .long 775752448 - .long 1072001476 - .long 3582746667 - .long 1023859460 - .long 3238590720 - .long 1072022464 - .long 634636162 - .long 1024472353 - .long 2758801920 - .long 1072043624 - .long 3078216319 - .long 1025304516 - .long 1370319104 - .long 1072064962 - .long 2570569078 - .long 1025099442 - .long 2615805184 - .long 1072086484 - .long 3729933412 - .long 1024605112 - .long 3077336576 - .long 1072108198 - .long 1948916066 - .long 1024781603 - .long 1099528192 - .long 1072130112 - .long 3139143157 - .long 1023729360 - .long 1231903232 - .long 1072152233 - .long 1349513477 - .long 1024737515 - .long 1507504128 - .long 1072174570 - .long 3484516322 - .long 1024000959 - .long 2214659840 - .long 1072197132 - .long 2563820917 - .long 1025225535 - .long 1804739840 - .long 1072219929 - .long 760038746 - .long 1024482855 - .long 1413746688 - .long 1072242971 - .long 3401734714 - .long 1025129838 - .long 821409536 - .long 1072266269 - .long 3729772551 - .long 1025484796 - .long 3031825664 - .long 1072289834 - .long 122256749 - .long 1024752594 - .long 1710784256 - .long 1072313680 - .long 1518205483 - .long 1024724809 - .long 3025265152 - .long 1072337819 - .long 409951989 - .long 1022835555 - .long 287769088 - .long 1072362267 - .long 800355594 - .long 1022484850 - .long 198179840 - .long 1072387038 - .long 3502926213 - .long 1024209373 - .long 1909130496 - .long 1072412149 - .long 3064694319 - .long 1025380823 - .long 1941732096 - .long 1072437619 - .long 4112930390 - .long 1024294679 - .long 3492010496 - .long 1072463467 - .long 2684918107 - .long 1023220233 - .long 81959680 - .long 1072489716 - .long 220021366 - .long 1020635131 - .long 2297837056 - .long 1072516387 - .long 4027683826 - .long 1021041185 - .long 270404096 - .long 1072543508 - .long 2012766065 - .long 1021780753 - .long 3667376896 - .long 1072571105 - .long 2727981522 - .long 1023009874 - .long 330400256 - .long 1072599212 - .long 2940017003 - .long 1025393439 - .long 1119293952 - .long 1072627861 - .long 1608550416 - .long 1022675612 - .long 3536155904 - .long 1072657091 - .long 349665778 - .long 1025156751 - .long 3078046720 - .long 1072686946 - .long 2016159996 - .long 1022193169 - .long 455228416 - .long 1072705361 - .long 1908539328 - .long 1026126332 - .long 1871505664 - .long 1072720988 - .long 2784700894 - .long 1025922277 - .long 1630994432 - .long 1072737010 - .long 361107678 - .long 1022887244 - .long 2084558336 - .long 1072753462 - .long 2642784509 - .long 1072689083 - .long 1514442531 - .long 1072688953 - .long 333108933 - .long 1072688821 - .long 3392112024 - .long 1072688686 - .long 2099852862 - .long 1072688550 - .long 749609004 - .long 1072688412 - .long 3634632596 - .long 1072688271 - .long 2163248461 - .long 1072688129 - .long 628657846 - .long 1072687985 - .long 3324036511 - .long 1072687838 - .long 1657632815 - .long 1072687690 - .long 4217538760 - .long 1072687539 - .long 2411951597 - .long 1072687387 - .long 533944872 - .long 1072687233 - .long 2876566508 - .long 1072687076 - .long 847936891 - .long 1072686918 - .long 3036019913 - .long 1072686757 - .long 848884575 - .long 1072686595 - .long 2874443326 - .long 1072686430 - .long 520713666 - .long 1072686264 - .long 2375556481 - .long 1072686095 - .long 4141904948 - .long 1072685924 - .long 1522666382 - .long 1072685752 - .long 3105624104 - .long 1072685577 - .long 298666327 - .long 1072685401 - .long 1689524500 - .long 1072685222 - .long 2981002200 - .long 1072685041 - .long 4170844284 - .long 1072684858 - .long 961802263 - .long 1072684674 - .long 1941503454 - .long 1072684487 - .long 2812647170 - .long 1072684298 - .long 3572873869 - .long 1072684107 - .long 4219797823 - .long 1072683914 - .long 456039788 - .long 1072683720 - .long 869096151 - .long 1072683523 - .long 1161535119 - .long 1072683324 - .long 1330865866 - .long 1072683123 - .long 1374571204 - .long 1072682920 - .long 1290107538 - .long 1072682715 - .long 1074904836 - .long 1072682508 - .long 726366587 - .long 1072682299 - .long 241869763 - .long 1072682088 - .long 3913732079 - .long 1072681874 - .long 3149342765 - .long 1072681659 - .long 2240966306 - .long 1072681442 - .long 1185873216 - .long 1072681223 - .long 4276274591 - .long 1072681001 - .long 2919452883 - .long 1072680778 - .long 1407565635 - .long 1072680553 - .long 4032743551 - .long 1072680325 - .long 2202188565 - .long 1072680096 - .long 207977577 - .long 1072679865 - .long 2342160518 - .long 1072679631 - .long 11858423 - .long 1072679396 - .long 1804034453 - .long 1072679158 - .long 3420722787 - .long 1072678918 - .long 563930456 - .long 1072678677 - .long 1820539192 - .long 1072678433 - .long 2892501606 - .long 1072678187 - .long 3776710320 - .long 1072677939 - .long 175063337 - .long 1072677690 - .long 674333171 - .long 1072677438 - .long 976363026 - .long 1072677184 - .long 1077935934 - .long 1072676928 - .long 1921075490 - .long 1072676540 - .long 881493302 - .long 1072676016 - .long 3275752439 - .long 1072675483 - .long 486855588 - .long 1072674943 - .long 1077229111 - .long 1072674394 - .long 723950308 - .long 1072673837 - .long 3693582199 - .long 1072673271 - .long 1367335316 - .long 1072672698 - .long 2305837020 - .long 1072672116 - .long 2184358641 - .long 1072671526 - .long 972682840 - .long 1072670928 - .long 2935101762 - .long 1072670321 - .long 3745513263 - .long 1072669706 - .long 3372320886 - .long 1072669083 - .long 1783464620 - .long 1072668452 - .long 3241386215 - .long 1072667812 - .long 3418125284 - .long 1072667164 - .long 2280219148 - .long 1072666508 - .long 4088700758 - .long 1072665843 - .long 219227400 - .long 1072665171 - .long 3521816918 - .long 1072664489 - .long 1076205279 - .long 1072663800 - .long 1436484616 - .long 1072663102 - .long 271362610 - .long 1072662396 - .long 1838996688 - .long 1072661681 - .long 1807122518 - .long 1072660958 - .long 137953542 - .long 1072660227 - .long 1088178584 - .long 1072659487 - .long 324057537 - .long 1072658739 - .long 2101288076 - .long 1072657982 - .long 2085133974 - .long 1072657217 - .long 235324451 - .long 1072656444 - .long 806051592 - .long 1072655662 - .long 3756033140 - .long 1072654871 - .long 453542543 - .long 1072654073 - .long 3741177327 - .long 1072653265 - .long 691216109 - .long 1072652450 - .long 4145223372 - .long 1072651625 - .long 1174439091 - .long 1072650793 - .long 324416139 - .long 1072649952 - .long 1550246310 - .long 1072649102 - .long 511524674 - .long 1072648244 - .long 1457248482 - .long 1072647377 - .long 45944955 - .long 1072646502 - .long 525537397 - .long 1072645618 - .long 2848440188 - .long 1072644725 - .long 2671555633 - .long 1072643824 - .long 4241172637 - .long 1072642914 - .long 3213094278 - .long 1072641996 - .long 3832503688 - .long 1072641069 - .long 1754091534 - .long 1072640134 - .long 1221921804 - .long 1072639190 - .long 2184526489 - .long 1072638237 - .long 294902089 - .long 1072637276 - .long 4090375270 - .long 1072636305 - .long 632860906 - .long 1072635327 - .long 2753498702 - .long 1072634339 - .long 1808009252 - .long 1072633343 - .long 2036428672 - .long 1072632338 - .long 3383235626 - .long 1072631324 - .long 1497347484 - .long 1072630302 - .long 617018317 - .long 1072629271 - .long 684933058 - .long 1072628231 - .long 1643170798 - .long 1072627182 - .long 3011066360 - .long 1072625592 - .long 957158713 - .long 1072623442 - .long 1390907941 - .long 1072621256 - .long 3819155270 - .long 1072619034 - .long 3443571196 - .long 1072616777 - .long 4045412458 - .long 1072614484 - .long 805503923 - .long 1072612156 - .long 1778922015 - .long 1072609791 - .long 2125033665 - .long 1072607390 - .long 1287203863 - .long 1072604953 - .long 2992629568 - .long 1072602479 - .long 2367267127 - .long 1072599969 - .long 3115526047 - .long 1072597422 - .long 340219539 - .long 1072594839 - .long 2017215719 - .long 1072592218 - .long 3225443424 - .long 1072589560 - .long 3326565673 - .long 1072586865 - .long 1669811211 - .long 1072584133 - .long 1886735022 - .long 1072581363 - .long 3301071171 - .long 1072578555 - .long 928514283 - .long 1072575710 - .long 2656364059 - .long 1072572826 - .long 3473490507 - .long 1072569904 - .long 2649965606 - .long 1072566944 - .long 3736819052 - .long 1072563945 - .long 1680885175 - .long 1072560908 - .long 4413771 - .long 1072557832 - .long 2214869753 - .long 1072554716 - .long 3214725184 - .long 1072551561 - .long 2186079903 - .long 1072548367 - .long 2590372131 - .long 1072545133 - .long 3578146079 - .long 1072541859 - .long 4283712755 - .long 1072538545 - .long 3824834510 - .long 1072535191 - .long 1302400298 - .long 1072531797 - .long 95058636 - .long 1072528362 - .long 3563906063 - .long 1072524885 - .long 2167230730 - .long 1072521368 - .long 3524918334 - .long 1072517809 - .long 2353304918 - .long 1072514209 - .long 1939625839 - .long 1072510567 - .long 1256714581 - .long 1072506883 - .long 3552525848 - .long 1072503156 - .long 3464809522 - .long 1072499387 - .long 4200542593 - .long 1072495575 - .long 355609124 - .long 1072491721 - .long 3684139099 - .long 1072487822 - .long 148355918 - .long 1072483881 - .long 1457689242 - .long 1072479895 - .long 2118591596 - .long 1072475865 - .long 908848089 - .long 1072471791 - .long 877032689 - .long 1072467672 - .long 752012304 - .long 1072463508 - .long 3532301749 - .long 1072459298 - .long 3600563221 - .long 1072455043 - .long 3902857084 - .long 1072450742 - .long 3063101036 - .long 1072446395 - .long 3972344374 - .long 1072442001 - .long 903183549 - .long 1072437561 - .long 983892938 - .long 1072433073 - .long 2722858568 - .long 1072428537 - .long 302790515 - .long 1072423954 - .long 759811057 - .long 1072419322 - .long 2507809922 - .long 1072414641 - .long 2388408813 - .long 1072407528 - .long 2084492942 - .long 1072397870 - .long 2435703301 - .long 1072388010 - .long 1935433360 - .long 1072377945 - .long 2742047290 - .long 1072367671 - .long 2053284205 - .long 1072357185 - .long 657783367 - .long 1072346483 - .long 2893664841 - .long 1072335560 - .long 3718906405 - .long 1072324413 - .long 1547896303 - .long 1072313038 - .long 2494058440 - .long 1072301429 - .long 3133238742 - .long 1072289582 - .long 3327000086 - .long 1072277492 - .long 1860667274 - .long 1072265154 - .long 665340747 - .long 1072252562 - .long 443347841 - .long 1072239710 - .long 581282618 - .long 1072226592 - .long 3349780465 - .long 1072213201 - .long 914217606 - .long 1072199532 - .long 989797661 - .long 1072185576 - .long 945436416 - .long 1072171326 - .long 549291300 - .long 1072156774 - .long 1814636389 - .long 1072141911 - .long 239092858 - .long 1072126729 - .long 1794680724 - .long 1072111217 - .long 1241534678 - .long 1072095366 - .long 3366566214 - .long 1072079164 - .long 1244090828 - .long 1072062601 - .long 1708448120 - .long 1072045663 - .long 3544260650 - .long 1072028337 - .long 1402741403 - .long 1072010610 - .long 2551936888 - .long 1071992465 - .long 617669739 - .long 1071973887 - .long 794002186 - .long 1071954857 - .long 2021237693 - .long 1071935356 - .long 540450384 - .long 1071915364 - .long 1920555537 - .long 1071894857 - .long 2879585206 - .long 1071873811 - .long 3000237455 - .long 1071852199 - .long 3352974346 - .long 1071829991 - .long 569629937 - .long 1071807155 - .long 2077237208 - .long 1071783653 - .long 2284891805 - .long 1071759446 - .long 1226651784 - .long 1071734489 - .long 1102047405 - .long 1071708731 - .long 2009896384 - .long 1071682115 - .long 927419082 - .long 1071654577 - .long 85010366 - .long 1071607413 - .long 696431025 - .long 1071548180 - .long 2611410541 - .long 1071486585 - .long 2612593658 - .long 1071422396 - .long 3548155306 - .long 1071355336 - .long 3887997484 - .long 1071285073 - .long 244854763 - .long 1071211202 - .long 4214445648 - .long 1071133216 - .long 2303966727 - .long 1071050478 - .long 3991040013 - .long 1070962152 - .long 3126952278 - .long 1070867118 - .long 1817448378 - .long 1070763804 - .long 1793814864 - .long 1070649884 - .long 3507224072 - .long 1070447193 - .long 4027609105 - .long 1070148772 - .long 577507993 - .long 1069779414 - .long 2310232419 - .long 1068931829 - .long 856972295 - .long 1016178214 - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 3164710438 - .long 1413754136 - .long 3221823995 - .long 856972295 - .long 1017226790 - .long 1413754136 - .long 1074340347 - .long 4160749568 - .long 4294967295 - .long 4160749568 - .long 4294967295 - .long 0 - .long 0 - .long 1431655765 - .long 3217380693 - .long 858993459 - .long 3216192307 - .long 3067833783 - .long 3215383405 - .long 780903145 - .long 1066854586 - .long 858993459 - .long 1068708659 - .long 3340530119 - .long 1067392113 - .long 1431655765 - .long 1069897045 - .long 1321528399 - .long 1066517740 - .long 3067833783 - .long 1067899757 - .long 2021159460 - .long 1065855096 - .long 2576980378 - .long 1066178969 - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 4294950912 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 1071644672 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,6112 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosf_wmt.S deleted file mode 100644 index b2e8659e00..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosf_wmt.S +++ /dev/null @@ -1,551 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acosf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin acosf - .text - .align 16,0x90 - .globl acosf -acosf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %eax - cvtps2pd %xmm0, %xmm1 - movsd 1040(%ebx), %xmm3 - movl $2147483647, %ecx - andl %eax, %ecx - subl $1015021568, %ecx - cmpl $49283072, %ecx - jae .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - movl $8388608, %edx - mulsd %xmm1, %xmm1 - cvtps2pd %xmm0, %xmm2 - shrl $23, %ecx - addl $1, %ecx - shrl %cl, %edx - subsd %xmm1, %xmm3 - orl %edx, %eax - negl %edx - andl %edx, %eax - movd %eax, %xmm4 - sqrtsd %xmm3, %xmm3 - addl %edx, %edx - andl $16777215, %edx - andl %edx, %eax - negl %ecx - addl $24, %ecx - orl $8388608, %eax - shrl %cl, %eax - addl %eax, %eax - movsd (%ebx,%eax,8), %xmm5 - psrlq $31, %xmm0 - movsd 8(%ebx,%eax,8), %xmm1 - psllq $63, %xmm0 - cvtps2pd %xmm4, %xmm4 - mulsd %xmm5, %xmm2 - orpd %xmm1, %xmm0 - movsd 1056(%ebx), %xmm5 - movsd 1072(%ebx), %xmm1 - mulsd %xmm3, %xmm4 - movsd 1088(%ebx), %xmm3 - subsd %xmm4, %xmm2 - pshufd $68, %xmm2, %xmm4 - mulsd %xmm2, %xmm2 - subsd 1024(%ebx), %xmm0 - mulsd %xmm4, %xmm5 - mulsd %xmm4, %xmm1 - mulsd %xmm4, %xmm3 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - subsd %xmm3, %xmm5 - addsd %xmm1, %xmm4 - mulsd %xmm5, %xmm2 - addsd %xmm4, %xmm0 - subsd %xmm0, %xmm2 - movsd %xmm2, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - jge .L_2TAG_PACKET_3.0.3 - addl $1015021568, %ecx - cmpl $964689920, %ecx - jb .L_2TAG_PACKET_4.0.3 - movsd 1072(%ebx), %xmm2 - movapd %xmm1, %xmm0 - movsd 1024(%ebx), %xmm3 - mulsd %xmm1, %xmm1 - mulsd %xmm1, %xmm2 - mulsd %xmm0, %xmm2 - subsd %xmm0, %xmm3 - subsd %xmm2, %xmm3 - cvtsd2ss %xmm3, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - movsd 1024(%ebx), %xmm2 - subsd %xmm1, %xmm2 - cvtsd2ss %xmm2, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - movl %eax, %edx - addl %edx, %edx - cmpl $2130706432, %edx - jb .L_2TAG_PACKET_5.0.3 - jne .L_2TAG_PACKET_6.0.3 - shrl $31, %eax - movsd 1136(%ebx,%eax,8), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_5.0.3: - cmpl $0, %eax - jl .L_2TAG_PACKET_1.0.3 - xorpd %xmm2, %xmm2 - movl $16352, %eax - pinsrw $3, %eax, %xmm2 - subsd %xmm1, %xmm3 - mulsd %xmm2, %xmm3 - sqrtsd %xmm3, %xmm3 - movsd 1120(%ebx), %xmm4 - movsd 1056(%ebx), %xmm5 - movsd 1072(%ebx), %xmm0 - movsd 1088(%ebx), %xmm1 - pshufd $68, %xmm3, %xmm2 - mulsd %xmm3, %xmm3 - addpd %xmm2, %xmm2 - mulsd %xmm3, %xmm4 - mulsd %xmm3, %xmm1 - mulsd %xmm3, %xmm2 - mulsd %xmm3, %xmm3 - subsd %xmm5, %xmm4 - addsd %xmm0, %xmm1 - mulsd %xmm3, %xmm4 - addsd %xmm1, %xmm4 - mulsd %xmm2, %xmm4 - pshufd $238, %xmm2, %xmm2 - addsd %xmm4, %xmm2 - cvtpd2ps %xmm2, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - cmpl $-16777216, %edx - ja .L_2TAG_PACKET_7.0.3 - xorps %xmm0, %xmm0 - movl $2139095040, %edx - movd %edx, %xmm1 - mulss %xmm1, %xmm0 - movss %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $62, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_7.0.3: - addss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_2.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type acosf,@function - .size acosf,.-acosf - .data -# -- End acosf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4290772864 - .long 1072693183 - .long 2864569868 - .long 1065353226 - .long 3955135328 - .long 1072692671 - .long 152932388 - .long 1066926224 - .long 1671525387 - .long 1072691647 - .long 2415589551 - .long 1067712845 - .long 2799290704 - .long 1072690109 - .long 3864800403 - .long 1068237715 - .long 2477707161 - .long 1072688057 - .long 725093587 - .long 1068630990 - .long 2787892653 - .long 1072685489 - .long 2536557765 - .long 1068893940 - .long 4138691444 - .long 1072682403 - .long 62552236 - .long 1069157247 - .long 941089134 - .long 1072678798 - .long 165833141 - .long 1069420976 - .long 3045724825 - .long 1072674669 - .long 2611259588 - .long 1069616357 - .long 1338788729 - .long 1072670015 - .long 2616012614 - .long 1069748746 - .long 2049955026 - .long 1072664831 - .long 11397492 - .long 1069881450 - .long 922854000 - .long 1072659114 - .long 2157235516 - .long 1070014503 - .long 326738075 - .long 1072652859 - .long 2788743992 - .long 1070147943 - .long 589211462 - .long 1072646061 - .long 3920198733 - .long 1070281807 - .long 4203970809 - .long 1072638714 - .long 3416546056 - .long 1070416134 - .long 2847908959 - .long 1072630814 - .long 4071425947 - .long 1070550963 - .long 3041144817 - .long 1072622353 - .long 623140044 - .long 1070641216 - .long 254499552 - .long 1072613325 - .long 307519074 - .long 1070709195 - .long 247322296 - .long 1072603721 - .long 2945179265 - .long 1070777488 - .long 1734768715 - .long 1072593533 - .long 3301227932 - .long 1070846119 - .long 512284341 - .long 1072582753 - .long 148694291 - .long 1070915112 - .long 2150320922 - .long 1072571370 - .long 959165711 - .long 1070984490 - .long 307214965 - .long 1072559375 - .long 862254873 - .long 1071054280 - .long 2261822985 - .long 1072546755 - .long 303820077 - .long 1071124509 - .long 2878424532 - .long 1072533499 - .long 1279667396 - .long 1071195205 - .long 1489389340 - .long 1072519594 - .long 3626865975 - .long 1071266398 - .long 1561634021 - .long 1072505025 - .long 1381197995 - .long 1071338121 - .long 1731593006 - .long 1072489777 - .long 685577004 - .long 1071410406 - .long 3972360633 - .long 1072473833 - .long 3426639945 - .long 1071483288 - .long 231016948 - .long 1072457177 - .long 3858097791 - .long 1071556806 - .long 1951983052 - .long 1072439787 - .long 2522397359 - .long 1071631000 - .long 806900869 - .long 1072421644 - .long 1565390008 - .long 1071675292 - .long 2352519275 - .long 1072402724 - .long 2655228975 - .long 1071713130 - .long 3752547712 - .long 1072383003 - .long 3066292715 - .long 1071751375 - .long 1444584515 - .long 1072362455 - .long 933027783 - .long 1071790054 - .long 2960036461 - .long 1072341049 - .long 3589869088 - .long 1071829194 - .long 4214933698 - .long 1072318754 - .long 2973206241 - .long 1071868828 - .long 957213757 - .long 1072295536 - .long 2756129430 - .long 1071908989 - .long 4263431727 - .long 1072271354 - .long 2767348050 - .long 1071949714 - .long 4197201246 - .long 1072246168 - .long 874994578 - .long 1071991044 - .long 1821133236 - .long 1072219931 - .long 3810301671 - .long 1072033022 - .long 2102004657 - .long 1072192590 - .long 4064603671 - .long 1072075699 - .long 1957725919 - .long 1072164088 - .long 276553332 - .long 1072119130 - .long 3365782140 - .long 1072134360 - .long 1120469626 - .long 1072163374 - .long 4096932877 - .long 1072103334 - .long 4291572900 - .long 1072208500 - .long 177757517 - .long 1072070929 - .long 2376322938 - .long 1072254587 - .long 4029755771 - .long 1072037049 - .long 3060434712 - .long 1072301721 - .long 497611374 - .long 1072001591 - .long 4010165530 - .long 1072350003 - .long 3306304935 - .long 1071964429 - .long 388249839 - .long 1072399550 - .long 539435036 - .long 1071925423 - .long 165779504 - .long 1072450495 - .long 2497352827 - .long 1071884403 - .long 1343287957 - .long 1072502997 - .long 884164153 - .long 1071841172 - .long 1828157318 - .long 1072557245 - .long 3653025069 - .long 1071795489 - .long 2128712154 - .long 1072613466 - .long 3056817116 - .long 1071747064 - .long 1489283833 - .long 1072671938 - .long 1840990109 - .long 1071695534 - .long 2059782629 - .long 1072713127 - .long 3931971716 - .long 1071636206 - .long 1027831985 - .long 1072745180 - .long 3187721039 - .long 1071517691 - .long 3329524973 - .long 1072779038 - .long 3649449467 - .long 1071389244 - .long 2110923290 - .long 1072815090 - .long 4055205277 - .long 1071248617 - .long 2992048670 - .long 1072853879 - .long 2715653706 - .long 1071092488 - .long 419466969 - .long 1072896214 - .long 2030806678 - .long 1070915559 - .long 1069790871 - .long 1072943387 - .long 2084655462 - .long 1070708358 - .long 3811755941 - .long 1072997722 - .long 3549768261 - .long 1070304457 - .long 884757291 - .long 1073064302 - .long 4261330719 - .long 1069543419 - .long 3631318613 - .long 1073160613 - .long 1413754136 - .long 1073291771 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 3067833783 - .long 3215383405 - .long 0 - .long 0 - .long 1431655765 - .long 1069897045 - .long 0 - .long 0 - .long 858993459 - .long 1068708659 - .long 0 - .long 0 - .long 1 - .long 1072693248 - .long 0 - .long 0 - .long 3340530119 - .long 1067392113 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1413754136 - .long 1074340347 - .type static_const_table,@object - .size static_const_table,1152 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosh_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosh_wmt.S deleted file mode 100644 index 36112ecb6e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosh_wmt.S +++ /dev/null @@ -1,1922 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acosh_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin acosh - .text - .align 16,0x90 - .globl acosh -acosh: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movl 116(%esp), %eax - subl $1072693248, %eax - je .L_2TAG_PACKET_0.0.3 - cmpl $1073741824, %eax - jae .L_2TAG_PACKET_1.0.3 - cmpl $6144, %eax - jl .L_2TAG_PACKET_2.0.3 - cmpl $29360128, %eax - jge .L_2TAG_PACKET_3.0.3 - cmpl $2293760, %eax - jl .L_2TAG_PACKET_4.0.3 - movq 112(%ebx), %xmm1 - movapd %xmm0, %xmm2 - mulsd %xmm0, %xmm0 - addsd 112(%ebx), %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm2, %xmm0 - paddw 288(%ebx), %xmm2 - divsd %xmm0, %xmm1 - movapd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_4.0.3: - movapd %xmm0, %xmm1 - movapd %xmm0, %xmm3 - pand 208(%ebx), %xmm0 - movapd %xmm0, %xmm2 - subsd %xmm0, %xmm1 - addsd %xmm0, %xmm3 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm3 - subsd 128(%ebx), %xmm0 - movapd %xmm3, %xmm4 - addsd %xmm0, %xmm3 - sqrtsd %xmm3, %xmm3 - movapd %xmm3, %xmm5 - pand 208(%ebx), %xmm3 - subsd %xmm3, %xmm5 - movapd %xmm3, %xmm6 - movapd %xmm3, %xmm7 - addsd %xmm3, %xmm2 - mulsd %xmm3, %xmm3 - mulsd %xmm5, %xmm6 - addsd %xmm5, %xmm7 - subsd %xmm3, %xmm0 - subsd %xmm6, %xmm0 - addsd %xmm0, %xmm4 - movapd %xmm2, %xmm0 - divsd %xmm7, %xmm4 - addsd %xmm5, %xmm4 - mulsd 96(%ebx), %xmm4 - addsd %xmm4, %xmm1 -.L_2TAG_PACKET_5.0.3: - movq 240(%ebx), %xmm3 - addsd %xmm1, %xmm0 - movapd %xmm0, %xmm5 - psrlq $41, %xmm5 - pextrw $0, %xmm5, %ecx - pand 208(%ebx), %xmm0 - subsd %xmm0, %xmm2 - addsd %xmm2, %xmm1 - pshufd $68, %xmm0, %xmm4 - pand 192(%ebx), %xmm0 - pand 224(%ebx), %xmm4 - psubd %xmm4, %xmm3 - psubw 128(%ebx), %xmm4 - psrlq $52, %xmm4 - por 128(%ebx), %xmm0 - por 160(%ebx), %xmm4 - mulsd %xmm3, %xmm1 - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_3.0.3: - shrl $20, %eax - addl $1, %eax - movd %eax, %xmm4 - unpcklpd %xmm4, %xmm4 - movl 116(%esp), %ecx - por 160(%ebx), %xmm4 - pand 192(%ebx), %xmm0 - por 128(%ebx), %xmm0 - movapd %xmm0, %xmm1 - pand 208(%ebx), %xmm0 - subsd %xmm0, %xmm1 - shrl $9, %ecx -.L_2TAG_PACKET_6.0.3: - subpd 160(%ebx), %xmm4 - movq 80(%ebx), %xmm2 - andl $2040, %ecx - mulpd 256(%ebx), %xmm4 - mulsd 4400(%ebx,%ecx), %xmm0 - mulsd 4400(%ebx,%ecx), %xmm1 - subsd 128(%ebx), %xmm0 - movapd %xmm0, %xmm5 - addsd %xmm1, %xmm0 - movapd %xmm0, %xmm3 - unpcklpd %xmm0, %xmm0 - addpd 304(%ebx,%ecx,2), %xmm4 - movhlps %xmm4, %xmm6 - mulpd %xmm0, %xmm0 - mulsd %xmm0, %xmm2 - addpd 64(%ebx), %xmm2 - mulpd %xmm0, %xmm2 - addpd 48(%ebx), %xmm2 - mulpd %xmm0, %xmm2 - movhlps %xmm2, %xmm0 - mulsd %xmm3, %xmm0 - addsd %xmm2, %xmm0 - addsd %xmm1, %xmm0 - addsd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - addsd %xmm5, %xmm0 - movsd %xmm0, 24(%esp) - fldl 24(%esp) - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_2.0.3: - subsd 128(%ebx), %xmm0 - movapd %xmm0, %xmm1 - mulsd 144(%ebx), %xmm0 - movapd %xmm0, %xmm2 - movq 32(%ebx), %xmm7 - mulsd %xmm1, %xmm7 - addsd 24(%ebx), %xmm7 - mulsd %xmm1, %xmm7 - addsd 16(%ebx), %xmm7 - mulsd %xmm1, %xmm7 - addsd 8(%ebx), %xmm7 - mulsd %xmm1, %xmm7 - addsd (%ebx), %xmm7 - mulsd %xmm1, %xmm7 - movapd %xmm7, %xmm1 - sqrtsd %xmm0, %xmm0 - movapd %xmm0, %xmm3 - movapd %xmm0, %xmm4 - pand 208(%ebx), %xmm0 - subsd %xmm0, %xmm3 - movapd %xmm0, %xmm5 - movapd %xmm0, %xmm6 - mulsd %xmm0, %xmm0 - subsd %xmm0, %xmm2 - movapd %xmm7, %xmm0 - mulsd %xmm3, %xmm5 - subsd %xmm5, %xmm2 - divsd %xmm4, %xmm2 - addsd %xmm3, %xmm2 - mulsd 96(%ebx), %xmm2 - pand 208(%ebx), %xmm7 - subsd %xmm7, %xmm1 - mulsd %xmm6, %xmm7 - mulsd %xmm6, %xmm1 - mulsd %xmm2, %xmm0 - addsd %xmm1, %xmm0 - addsd %xmm2, %xmm0 - addsd %xmm7, %xmm0 - addsd %xmm6, %xmm0 - movsd %xmm0, 24(%esp) - fldl 24(%esp) - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_0.0.3: - movl 112(%esp), %ecx - testl %ecx, %ecx - jne .L_2TAG_PACKET_2.0.3 - fldz - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_1.0.3: - addl $1072693248, %eax - movl $2147483647, %ecx - andl %eax, %ecx - cmpl $2146435072, %ecx - jge .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_9.0.3: - xorpd %xmm1, %xmm1 - mulsd 224(%ebx), %xmm1 - movsd %xmm1, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $136, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_8.0.3: - cmpl $-1048576, %eax - je .L_2TAG_PACKET_10.0.3 - jmp .L_2TAG_PACKET_11.0.3 -.L_2TAG_PACKET_10.0.3: - movl 112(%esp), %eax - testl %eax, %eax - je .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_11.0.3: - addsd %xmm0, %xmm0 - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_7.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type acosh,@function - .size acosh,.-acosh - .data -# -- End acosh - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1431655760 - .long 3216332117 - .long 858954823 - .long 1066611507 - .long 2956777430 - .long 3212237677 - .long 4158004615 - .long 1063197775 - .long 2173429939 - .long 3209085130 - .long 0 - .long 0 - .long 0 - .long 3219128320 - .long 1431621855 - .long 1070945621 - .long 4294842013 - .long 3218079743 - .long 1289448124 - .long 1070176674 - .long 2077359316 - .long 3217380703 - .long 0 - .long 0 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 0 - .long 3220176896 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 1073741824 - .long 0 - .long 1073741824 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .long 0 - .long 4294967295 - .long 0 - .long 4294967295 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 0 - .long 2145386496 - .long 0 - .long 2145386496 - .long 897137782 - .long 1038760431 - .long 4276092928 - .long 1072049730 - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 1048576 - .long 0 - .long 0 - .long 662290844 - .long 1040545122 - .long 0 - .long 1063257089 - .long 1410206301 - .long 1039423595 - .long 0 - .long 1064833554 - .long 1576129908 - .long 1044327686 - .long 0 - .long 1065621801 - .long 3771466512 - .long 1043372267 - .long 0 - .long 1066152307 - .long 2250061482 - .long 1041942323 - .long 0 - .long 1066510009 - .long 241025648 - .long 1043818160 - .long 0 - .long 1066777242 - .long 3481293707 - .long 1039994007 - .long 0 - .long 1067045544 - .long 17391197 - .long 1042467788 - .long 0 - .long 1067281191 - .long 1429304634 - .long 1045705663 - .long 0 - .long 1067500943 - .long 2258946786 - .long 1045312243 - .long 0 - .long 1067619660 - .long 725099158 - .long 1043780790 - .long 0 - .long 1067755853 - .long 1795694751 - .long 1046370967 - .long 0 - .long 1067875476 - .long 218276363 - .long 1045874206 - .long 0 - .long 1067995528 - .long 3918058606 - .long 1045941877 - .long 0 - .long 1068133258 - .long 2029669416 - .long 1040964778 - .long 0 - .long 1068254238 - .long 111041497 - .long 1042505837 - .long 0 - .long 1068375655 - .long 9214008 - .long 1042394003 - .long 0 - .long 1068497513 - .long 3222421290 - .long 1046711220 - .long 0 - .long 1068559379 - .long 1120482910 - .long 1046024006 - .long 0 - .long 1068620754 - .long 3817590987 - .long 1046519755 - .long 0 - .long 1068682354 - .long 3431328350 - .long 1046805053 - .long 0 - .long 1068744181 - .long 3088376696 - .long 1046390788 - .long 0 - .long 1068806237 - .long 3229576382 - .long 1046428373 - .long 0 - .long 1068859611 - .long 1328753044 - .long 1046554315 - .long 0 - .long 1068922096 - .long 1186666727 - .long 1044788651 - .long 0 - .long 1068984815 - .long 603190068 - .long 1044621365 - .long 0 - .long 1069047769 - .long 1647019864 - .long 1045911122 - .long 0 - .long 1069101918 - .long 4200935885 - .long 1044407410 - .long 0 - .long 1069165314 - .long 3581720604 - .long 1046840144 - .long 0 - .long 1069219844 - .long 2217841072 - .long 1046325234 - .long 0 - .long 1069283688 - .long 1963222525 - .long 1047002562 - .long 0 - .long 1069338605 - .long 2828272122 - .long 1046012177 - .long 0 - .long 1069393703 - .long 3730942205 - .long 1046476867 - .long 0 - .long 1069458213 - .long 3166604115 - .long 1047518079 - .long 0 - .long 1069513705 - .long 2095461845 - .long 1046790089 - .long 0 - .long 1069558451 - .long 322388698 - .long 1046865736 - .long 0 - .long 1069586382 - .long 2407253617 - .long 1047545084 - .long 0 - .long 1069619086 - .long 3437791416 - .long 1047490483 - .long 0 - .long 1069647220 - .long 2693469775 - .long 1045625134 - .long 0 - .long 1069675449 - .long 1454696571 - .long 1045327327 - .long 0 - .long 1069703773 - .long 1940756848 - .long 1043926274 - .long 0 - .long 1069732193 - .long 2244096130 - .long 1047717922 - .long 0 - .long 1069760709 - .long 2856509870 - .long 1047123452 - .long 0 - .long 1069789323 - .long 116200689 - .long 1043361536 - .long 0 - .long 1069813243 - .long 4018367049 - .long 1048385867 - .long 0 - .long 1069842036 - .long 3162755613 - .long 1048496333 - .long 0 - .long 1069870929 - .long 2730655796 - .long 1048315252 - .long 0 - .long 1069899922 - .long 892380602 - .long 1046868829 - .long 0 - .long 1069929016 - .long 3139480334 - .long 1046190510 - .long 0 - .long 1069953338 - .long 1886171545 - .long 1048270714 - .long 0 - .long 1069982617 - .long 2203106387 - .long 1048291228 - .long 0 - .long 1070007095 - .long 659271154 - .long 1044549473 - .long 0 - .long 1070036564 - .long 377790372 - .long 1045759361 - .long 0 - .long 1070066136 - .long 1269824164 - .long 1047357396 - .long 0 - .long 1070090859 - .long 1643831617 - .long 1048231604 - .long 0 - .long 1070115655 - .long 57265969 - .long 1047663307 - .long 0 - .long 1070145508 - .long 2640032722 - .long 1046479978 - .long 0 - .long 1070170467 - .long 2420992102 - .long 1043079769 - .long 0 - .long 1070200516 - .long 2711573521 - .long 1045731911 - .long 0 - .long 1070225639 - .long 1973048145 - .long 1048077010 - .long 0 - .long 1070250837 - .long 4093691059 - .long 1046627963 - .long 0 - .long 1070276112 - .long 4182783767 - .long 1047690348 - .long 0 - .long 1070306542 - .long 2883525439 - .long 1048055018 - .long 0 - .long 1070331985 - .long 3917130655 - .long 1046818760 - .long 0 - .long 1070357506 - .long 2320146059 - .long 1048132455 - .long 0 - .long 1070383104 - .long 3464331364 - .long 1047738634 - .long 0 - .long 1070408781 - .long 674627443 - .long 1046468986 - .long 0 - .long 1070434537 - .long 2152289494 - .long 1046214007 - .long 0 - .long 1070460372 - .long 37897452 - .long 1048575202 - .long 0 - .long 1070486286 - .long 1899477568 - .long 1044793529 - .long 0 - .long 1070512282 - .long 2077140689 - .long 1048534003 - .long 0 - .long 1070538357 - .long 448558287 - .long 1045911230 - .long 0 - .long 1070564515 - .long 3867352000 - .long 1046082819 - .long 0 - .long 1070590754 - .long 2206537816 - .long 1049157739 - .long 0 - .long 1070606585 - .long 1799603998 - .long 1049369388 - .long 0 - .long 1070619787 - .long 4075457018 - .long 1048703324 - .long 0 - .long 1070630379 - .long 572844178 - .long 1049388451 - .long 0 - .long 1070643656 - .long 540240475 - .long 1048063456 - .long 0 - .long 1070656976 - .long 2413664112 - .long 1047739393 - .long 0 - .long 1070670338 - .long 2592177285 - .long 1048727389 - .long 0 - .long 1070681058 - .long 1541931453 - .long 1048698417 - .long 0 - .long 1070694497 - .long 3345398163 - .long 1049085432 - .long 0 - .long 1070707979 - .long 2241984547 - .long 1049164260 - .long 0 - .long 1070718796 - .long 890223989 - .long 1048265646 - .long 0 - .long 1070732357 - .long 1226890683 - .long 1048781783 - .long 0 - .long 1070743237 - .long 1600520378 - .long 1048834273 - .long 0 - .long 1070756877 - .long 1081324478 - .long 1048934847 - .long 0 - .long 1070767821 - .long 1928471339 - .long 1042640487 - .long 0 - .long 1070781542 - .long 982084959 - .long 1048971733 - .long 0 - .long 1070792550 - .long 2380239162 - .long 1047711062 - .long 0 - .long 1070806352 - .long 3609542249 - .long 1048031507 - .long 0 - .long 1070817426 - .long 3466499103 - .long 1049126511 - .long 0 - .long 1070828529 - .long 1626165976 - .long 1048431820 - .long 0 - .long 1070842450 - .long 261635432 - .long 1048113242 - .long 0 - .long 1070853620 - .long 1670437810 - .long 1046604532 - .long 0 - .long 1070864820 - .long 3910575981 - .long 1049365107 - .long 0 - .long 1070876049 - .long 727294688 - .long 1048407484 - .long 0 - .long 1070890129 - .long 3260008354 - .long 1047549258 - .long 0 - .long 1070901427 - .long 872084085 - .long 1048711456 - .long 0 - .long 1070912755 - .long 754632403 - .long 1048687679 - .long 0 - .long 1070924114 - .long 1033413261 - .long 1048105461 - .long 0 - .long 1070935504 - .long 1155773876 - .long 1047412165 - .long 0 - .long 1070946925 - .long 746670859 - .long 1046841493 - .long 0 - .long 1070961245 - .long 1820254373 - .long 1048237327 - .long 0 - .long 1070972736 - .long 3605217861 - .long 1047440922 - .long 0 - .long 1070984259 - .long 2212317823 - .long 1049212421 - .long 0 - .long 1070995813 - .long 2826670683 - .long 1047678316 - .long 0 - .long 1071007400 - .long 3532575187 - .long 1049339451 - .long 0 - .long 1071019018 - .long 413443603 - .long 1049028939 - .long 0 - .long 1071030669 - .long 2964472999 - .long 1043732931 - .long 0 - .long 1071042353 - .long 389771102 - .long 1049430622 - .long 0 - .long 1071051136 - .long 1005132876 - .long 1048342053 - .long 0 - .long 1071062877 - .long 2877512173 - .long 1049492173 - .long 0 - .long 1071074650 - .long 1874411204 - .long 1048724858 - .long 0 - .long 1071086457 - .long 1011596427 - .long 1048646627 - .long 0 - .long 1071098297 - .long 838498113 - .long 1043068341 - .long 0 - .long 1071110171 - .long 409945993 - .long 1047118137 - .long 0 - .long 1071122078 - .long 2035722984 - .long 1049263601 - .long 0 - .long 1071131030 - .long 4272650650 - .long 1048435570 - .long 0 - .long 1071142997 - .long 867757828 - .long 1047923871 - .long 0 - .long 1071154998 - .long 433900304 - .long 1048766295 - .long 0 - .long 1071164021 - .long 2626749065 - .long 1049334020 - .long 0 - .long 1071176082 - .long 2721103389 - .long 1049448370 - .long 0 - .long 1071188178 - .long 3401674810 - .long 1049424769 - .long 0 - .long 1071197273 - .long 3030733799 - .long 1047804815 - .long 0 - .long 1071209431 - .long 1532130487 - .long 1045537774 - .long 0 - .long 1071221624 - .long 225486125 - .long 1049520040 - .long 0 - .long 1071230791 - .long 1326263423 - .long 1044918825 - .long 0 - .long 1071243047 - .long 3029302589 - .long 1049469599 - .long 0 - .long 1071252261 - .long 3326443421 - .long 1042360275 - .long 0 - .long 1071264580 - .long 3770244744 - .long 1048027184 - .long 0 - .long 1071273842 - .long 2568976454 - .long 1045847505 - .long 0 - .long 1071286224 - .long 628040571 - .long 1048248574 - .long 0 - .long 1071295534 - .long 2688775955 - .long 1048311770 - .long 0 - .long 1071307980 - .long 3357093336 - .long 1047484659 - .long 0 - .long 1071317339 - .long 2753529189 - .long 1047343532 - .long 0 - .long 1071329850 - .long 625560417 - .long 1043404964 - .long 0 - .long 1071339258 - .long 2456374941 - .long 1048890167 - .long 0 - .long 1071351834 - .long 748255530 - .long 1049487286 - .long 0 - .long 1071361291 - .long 2246865993 - .long 1048768259 - .long 0 - .long 1071370770 - .long 205672663 - .long 1047230532 - .long 0 - .long 1071383442 - .long 4242870741 - .long 1046367538 - .long 0 - .long 1071392971 - .long 2016709797 - .long 1049037028 - .long 0 - .long 1071402521 - .long 2569308411 - .long 1049159850 - .long 0 - .long 1071415289 - .long 3242472523 - .long 1048132214 - .long 0 - .long 1071424891 - .long 1602055934 - .long 1044691415 - .long 0 - .long 1071434515 - .long 1307177952 - .long 1049244134 - .long 0 - .long 1071444160 - .long 2152237414 - .long 1048407400 - .long 0 - .long 1071457056 - .long 2598207309 - .long 1047639998 - .long 0 - .long 1071466754 - .long 3115077937 - .long 1048719780 - .long 0 - .long 1071476474 - .long 1272724396 - .long 1048321721 - .long 0 - .long 1071486217 - .long 2860867658 - .long 1049612888 - .long 0 - .long 1071495982 - .long 1467300368 - .long 1047143154 - .long 0 - .long 1071509039 - .long 3449085837 - .long 1046095654 - .long 0 - .long 1071518858 - .long 2146871948 - .long 1044681726 - .long 0 - .long 1071528700 - .long 3066750144 - .long 1046492840 - .long 0 - .long 1071538565 - .long 1416401583 - .long 1048453263 - .long 0 - .long 1071548453 - .long 2249840317 - .long 1046959692 - .long 0 - .long 1071558365 - .long 4172904720 - .long 1048039642 - .long 0 - .long 1071568300 - .long 1549017192 - .long 1046702261 - .long 0 - .long 1071578259 - .long 3220736011 - .long 1048855214 - .long 0 - .long 1071588241 - .long 630967006 - .long 1049477219 - .long 0 - .long 1071598247 - .long 3624057028 - .long 1046733189 - .long 0 - .long 1071608278 - .long 3730794064 - .long 1048259820 - .long 0 - .long 1071618332 - .long 570378657 - .long 1049316661 - .long 0 - .long 1071628410 - .long 2814556357 - .long 1048696327 - .long 0 - .long 1071638513 - .long 194866917 - .long 1048899904 - .long 0 - .long 1071646656 - .long 3497355923 - .long 1047579730 - .long 0 - .long 1071651732 - .long 984418162 - .long 1048576793 - .long 0 - .long 1071656820 - .long 1973276684 - .long 1050136256 - .long 0 - .long 1071661920 - .long 3329497336 - .long 1049987327 - .long 0 - .long 1071667033 - .long 1374214759 - .long 1047073231 - .long 0 - .long 1071672159 - .long 2689110139 - .long 1044696853 - .long 0 - .long 1071675583 - .long 3281519615 - .long 1049239454 - .long 0 - .long 1071680729 - .long 106060705 - .long 1049441252 - .long 0 - .long 1071685888 - .long 994445709 - .long 1048383906 - .long 0 - .long 1071691060 - .long 968365306 - .long 1050219142 - .long 0 - .long 1071696244 - .long 1127183666 - .long 1048063436 - .long 0 - .long 1071701442 - .long 1176023037 - .long 1048767474 - .long 0 - .long 1071704914 - .long 494386159 - .long 1048610025 - .long 0 - .long 1071710133 - .long 3484359724 - .long 1048499390 - .long 0 - .long 1071715365 - .long 3217980016 - .long 1048823654 - .long 0 - .long 1071720610 - .long 422622404 - .long 1048883138 - .long 0 - .long 1071724114 - .long 1262752531 - .long 1048980778 - .long 0 - .long 1071729381 - .long 3412819100 - .long 1049899918 - .long 0 - .long 1071734661 - .long 4248496658 - .long 1048338572 - .long 0 - .long 1071738189 - .long 644483909 - .long 1050165690 - .long 0 - .long 1071743491 - .long 3881343467 - .long 1050118499 - .long 0 - .long 1071748807 - .long 2653622880 - .long 1048337361 - .long 0 - .long 1071752359 - .long 2812002981 - .long 1050155308 - .long 0 - .long 1071757697 - .long 224311686 - .long 1050482530 - .long 0 - .long 1071763049 - .long 679701015 - .long 1049869325 - .long 0 - .long 1071766625 - .long 3027506890 - .long 1049908641 - .long 0 - .long 1071772000 - .long 3751375892 - .long 1049481244 - .long 0 - .long 1071777389 - .long 1920294497 - .long 1050102004 - .long 0 - .long 1071780989 - .long 1483524208 - .long 1050119127 - .long 0 - .long 1071786401 - .long 97441208 - .long 1049658186 - .long 0 - .long 1071790017 - .long 3008178484 - .long 1050468097 - .long 0 - .long 1071795452 - .long 3633428993 - .long 1048933205 - .long 0 - .long 1071799084 - .long 272261604 - .long 1048795103 - .long 0 - .long 1071804543 - .long 1886467610 - .long 1049658772 - .long 0 - .long 1071810016 - .long 3703763111 - .long 1048691245 - .long 0 - .long 1071813673 - .long 3272554440 - .long 1049215679 - .long 0 - .long 1071819170 - .long 1615609844 - .long 1047938702 - .long 0 - .long 1071822843 - .long 2101526408 - .long 1049159037 - .long 0 - .long 1071826522 - .long 3501340145 - .long 1048964151 - .long 0 - .long 1071832053 - .long 3398848880 - .long 1050181422 - .long 0 - .long 1071835748 - .long 3113670222 - .long 1047639078 - .long 0 - .long 1071841304 - .long 3113807767 - .long 1050490134 - .long 0 - .long 1071845015 - .long 2638078905 - .long 1050508198 - .long 0 - .long 1071850595 - .long 3402790998 - .long 1048094059 - .long 0 - .long 1071854324 - .long 2677940860 - .long 1046276297 - .long 0 - .long 1071859929 - .long 2914178933 - .long 1050613895 - .long 0 - .long 1071863673 - .long 1395015268 - .long 1049805645 - .long 0 - .long 1071867425 - .long 3443880395 - .long 1049880454 - .long 0 - .long 1071873065 - .long 3880277067 - .long 1046944118 - .long 0 - .long 1071876834 - .long 4190954257 - .long 1048963456 - .long 0 - .long 1071880609 - .long 975315090 - .long 1050660599 - .long 0 - .long 1071886284 - .long 3981445309 - .long 1048841548 - .long 0 - .long 1071890077 - .long 340978156 - .long 1049630357 - .long 0 - .long 1071893876 - .long 3056282856 - .long 1048349819 - .long 0 - .long 1071899588 - .long 3637866925 - .long 1050038234 - .long 0 - .long 1071903404 - .long 1233925752 - .long 1047565029 - .long 0 - .long 1071907228 - .long 3365276628 - .long 1049120293 - .long 0 - .long 1071912976 - .long 1364708917 - .long 1048863613 - .long 0 - .long 1071916817 - .long 2949393003 - .long 1048806573 - .long 0 - .long 1071920665 - .long 2588933741 - .long 1049057850 - .long 0 - .long 1071924520 - .long 1317344960 - .long 1048679202 - .long 0 - .long 1071930316 - .long 4264843208 - .long 1047591051 - .long 0 - .long 1071934189 - .long 1772398646 - .long 1047786577 - .long 0 - .long 1071938069 - .long 855212881 - .long 1049083903 - .long 0 - .long 1071941956 - .long 111728933 - .long 1050121939 - .long 0 - .long 1071947800 - .long 2934994658 - .long 1046035147 - .long 0 - .long 1071951706 - .long 3504420384 - .long 1049933751 - .long 0 - .long 1071955618 - .long 2295312686 - .long 1049747989 - .long 0 - .long 1071959538 - .long 185383186 - .long 1050276648 - .long 0 - .long 1071963465 - .long 2699459344 - .long 1049336105 - .long 0 - .long 1071967400 - .long 3020028019 - .long 1048472693 - .long 0 - .long 1071973316 - .long 365843238 - .long 1049205247 - .long 0 - .long 1071977269 - .long 1597522098 - .long 1045226127 - .long 0 - .long 1071981230 - .long 731482298 - .long 1047741244 - .long 0 - .long 1071985198 - .long 19057756 - .long 1050243827 - .long 0 - .long 1071989173 - .long 2890838867 - .long 1050654615 - .long 0 - .long 1071993156 - .long 2027053605 - .long 1050184234 - .long 0 - .long 1071997147 - .long 858789886 - .long 1047748038 - .long 0 - .long 1072001146 - .long 4288580762 - .long 1046326129 - .long 0 - .long 1072007158 - .long 3861103191 - .long 1049816977 - .long 0 - .long 1072011175 - .long 1902054808 - .long 1050330775 - .long 0 - .long 1072015200 - .long 568089353 - .long 1050301118 - .long 0 - .long 1072019233 - .long 3743438430 - .long 1049790563 - .long 0 - .long 1072023274 - .long 2063211846 - .long 1047622979 - .long 0 - .long 1072027323 - .long 1911797542 - .long 1049675962 - .long 0 - .long 1072031379 - .long 3660869822 - .long 1050198853 - .long 0 - .long 1072035443 - .long 616847508 - .long 1050494731 - .long 0 - .long 1072039515 - .long 225141268 - .long 1050627992 - .long 0 - .long 1072043595 - .long 3898487111 - .long 1050663410 - .long 0 - .long 1072047683 - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .type static_const_table,@object - .size static_const_table,6448 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acoshf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acoshf_wmt.S deleted file mode 100644 index b2bf2ceab0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acoshf_wmt.S +++ /dev/null @@ -1,1292 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acoshf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin acoshf - .text - .align 16,0x90 - .globl acoshf -acoshf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movl 112(%esp), %eax - subl $1065353217, %eax - cmpl $1073741823, %eax - jae .L_2TAG_PACKET_0.0.3 - subl $4194303, %eax - js .L_2TAG_PACKET_1.0.3 - cmpl $130023424, %eax - ja .L_2TAG_PACKET_2.0.3 - movss 112(%esp), %xmm0 - cvtps2pd %xmm0, %xmm0 - movapd %xmm0, %xmm1 - mulsd %xmm0, %xmm0 - subsd 96(%ebx), %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm1, %xmm0 - pshufd $85, %xmm0, %xmm1 - movd %xmm1, %eax - movl %eax, %ecx - shrl $20, %eax - shrl $9, %ecx - subl $1023, %eax - cvtsi2sdl %eax, %xmm2 - andpd 112(%ebx), %xmm0 - orpd 96(%ebx), %xmm0 - andl $2040, %ecx - movq 72(%ebx), %xmm1 - mulsd 2176(%ebx,%ecx), %xmm0 - subsd 96(%ebx), %xmm0 - mulsd 80(%ebx), %xmm2 - mulsd %xmm0, %xmm1 - addsd 64(%ebx), %xmm1 - mulsd %xmm0, %xmm1 - addsd 128(%ebx,%ecx), %xmm2 - mulsd %xmm0, %xmm1 - addsd %xmm1, %xmm0 - addsd %xmm2, %xmm0 - movsd %xmm0, 24(%esp) - fldl 24(%esp) - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_2.0.3: - movss 112(%esp), %xmm0 - cvtss2sd %xmm0, %xmm0 - addl $1069547520, %eax - movl %eax, %ecx - shrl $23, %eax - subl $126, %eax - shrl $12, %ecx - cvtsi2sdl %eax, %xmm2 - andpd 112(%ebx), %xmm0 - orpd 96(%ebx), %xmm0 - andl $2040, %ecx - movq 72(%ebx), %xmm1 - mulsd 2176(%ebx,%ecx), %xmm0 - subsd 96(%ebx), %xmm0 - mulsd 80(%ebx), %xmm2 - mulsd %xmm0, %xmm1 - addsd 64(%ebx), %xmm1 - mulsd %xmm0, %xmm1 - addsd 128(%ebx,%ecx), %xmm2 - mulsd %xmm0, %xmm1 - addsd %xmm1, %xmm0 - addsd %xmm2, %xmm0 - movsd %xmm0, 24(%esp) - fldl 24(%esp) - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_1.0.3: - movss 112(%esp), %xmm0 - cvtps2pd %xmm0, %xmm0 - movdqa 48(%ebx), %xmm3 - subsd 96(%ebx), %xmm0 - movdqa %xmm0, %xmm2 - movdqa %xmm0, %xmm1 - addsd %xmm0, %xmm0 - sqrtsd %xmm0, %xmm0 - mulsd %xmm2, %xmm2 - pshufd $68, %xmm1, %xmm1 - pshufd $68, %xmm2, %xmm2 - mulpd %xmm2, %xmm3 - addpd 32(%ebx), %xmm3 - mulpd %xmm2, %xmm3 - addpd 16(%ebx), %xmm3 - mulpd %xmm2, %xmm3 - addpd (%ebx), %xmm3 - mulpd %xmm1, %xmm3 - pshufd $238, %xmm3, %xmm2 - mulsd %xmm3, %xmm1 - addsd %xmm2, %xmm1 - mulsd %xmm0, %xmm1 - addsd %xmm1, %xmm0 - movsd %xmm0, 24(%esp) - fldl 24(%esp) - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_0.0.3: - incl %eax - movl 112(%esp), %edx - je .L_2TAG_PACKET_4.0.3 - andl $2147483647, %edx - cmpl $2139095040, %edx - ja .L_2TAG_PACKET_5.0.3 - cmpl $1073741824, %eax - je .L_2TAG_PACKET_5.0.3 - pcmpeqd %xmm1, %xmm1 - pslld $23, %xmm1 - subss %xmm1, %xmm1 - movss %xmm1, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $137, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_4.0.3: - fldz - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_5.0.3: - flds 112(%esp) - fadd %st(0), %st -.L_2TAG_PACKET_3.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type acoshf,@function - .size acoshf,.-acoshf - .data -# -- End acoshf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 305580873 - .long 1066611507 - .long 1429119421 - .long 3216332117 - .long 2886529429 - .long 1063197348 - .long 3670928078 - .long 3212237666 - .long 2610913564 - .long 1060186234 - .long 1100460448 - .long 3209089799 - .long 3532580246 - .long 1056164631 - .long 3531562621 - .long 3205972992 - .long 3879088107 - .long 3219128321 - .long 1754324240 - .long 1070945626 - .long 4277811695 - .long 1072049730 - .long 4277811695 - .long 1072049730 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .long 1440057502 - .long 1063257089 - .long 341338964 - .long 1064833554 - .long 4184355568 - .long 1065621801 - .long 2227658503 - .long 1066152307 - .long 449262470 - .long 1066510009 - .long 1570422842 - .long 1066777242 - .long 121841140 - .long 1067045544 - .long 630691842 - .long 1067281191 - .long 2711485097 - .long 1067500943 - .long 2026622491 - .long 1067619660 - .long 766078039 - .long 1067755853 - .long 4074027864 - .long 1067875476 - .long 3056660584 - .long 1067995528 - .long 3195252556 - .long 1068133258 - .long 116861598 - .long 1068254238 - .long 325086471 - .long 1068375655 - .long 296456961 - .long 1068497513 - .long 2623383041 - .long 1068559379 - .long 1681725707 - .long 1068620754 - .long 2231263004 - .long 1068682354 - .long 2815553124 - .long 1068744181 - .long 2057310944 - .long 1068806237 - .long 2095798018 - .long 1068859611 - .long 2302040698 - .long 1068922096 - .long 745232013 - .long 1068984815 - .long 659581512 - .long 1069047769 - .long 1566132617 - .long 1069101918 - .long 550036981 - .long 1069165314 - .long 2887419564 - .long 1069219844 - .long 1990183441 - .long 1069283688 - .long 3220050856 - .long 1069338605 - .long 1669613218 - .long 1069393703 - .long 2145455994 - .long 1069458213 - .long 4275830246 - .long 1069513705 - .long 1392453108 - .long 1069558451 - .long 1469915213 - .long 1069586382 - .long 2183652476 - .long 1069619086 - .long 2109656884 - .long 1069647220 - .long 636640577 - .long 1069675449 - .long 510517079 - .long 1069703773 - .long 210141498 - .long 1069732193 - .long 2537624622 - .long 1069760709 - .long 1733817001 - .long 1069789323 - .long 137854980 - .long 1069813243 - .long 3905576828 - .long 1069842036 - .long 4131810788 - .long 1069870929 - .long 3760956694 - .long 1069899922 - .long 1473082581 - .long 1069929016 - .long 926113142 - .long 1069953338 - .long 3669742467 - .long 1069982617 - .long 3711755290 - .long 1070007095 - .long 311386407 - .long 1070036564 - .long 705364525 - .long 1070066136 - .long 1973375279 - .long 1070090859 - .long 3589645072 - .long 1070115655 - .long 2425772059 - .long 1070145508 - .long 1074899574 - .long 1070170467 - .long 118003300 - .long 1070200516 - .long 691310403 - .long 1070225639 - .long 3273036717 - .long 1070250837 - .long 1226436560 - .long 1070276112 - .long 2481153995 - .long 1070306542 - .long 3227997535 - .long 1070331985 - .long 1421812646 - .long 1070357506 - .long 3386588242 - .long 1070383104 - .long 2580043380 - .long 1070408781 - .long 1068692560 - .long 1070434537 - .long 938143489 - .long 1070460372 - .long 4293333010 - .long 1070486286 - .long 373864817 - .long 1070512282 - .long 4208958430 - .long 1070538357 - .long 783121462 - .long 1070564515 - .long 870975437 - .long 1070590754 - .long 3338886172 - .long 1070606585 - .long 3772343130 - .long 1070619787 - .long 2408245143 - .long 1070630379 - .long 3811383569 - .long 1070643656 - .long 1622638721 - .long 1070656976 - .long 1290798655 - .long 1070670338 - .long 2457529556 - .long 1070681058 - .long 2398194399 - .long 1070694497 - .long 3190801979 - .long 1070707979 - .long 3352241197 - .long 1070718796 - .long 1829681364 - .long 1070732357 - .long 2568927817 - .long 1070743237 - .long 2676427515 - .long 1070756877 - .long 2882402820 - .long 1070767821 - .long 44944622 - .long 1070781542 - .long 2957945300 - .long 1070792550 - .long 1261787704 - .long 1070806352 - .long 1589923677 - .long 1070817426 - .long 3274931829 - .long 1070828529 - .long 1999843716 - .long 1070842450 - .long 1673619518 - .long 1070853620 - .long 601221319 - .long 1070864820 - .long 3763576649 - .long 1070876049 - .long 1974923437 - .long 1070890129 - .long 1096100617 - .long 1070901427 - .long 2424897952 - .long 1070912755 - .long 2376202600 - .long 1070924114 - .long 1665651958 - .long 1070935504 - .long 1014729354 - .long 1070946925 - .long 722545241 - .long 1070961245 - .long 1800682930 - .long 1070972736 - .long 1029453230 - .long 1070984259 - .long 3450874911 - .long 1070995813 - .long 1228255906 - .long 1071007400 - .long 3711032981 - .long 1071019018 - .long 3075102917 - .long 1071030669 - .long 92696812 - .long 1071042353 - .long 3897749690 - .long 1071051136 - .long 1907922160 - .long 1071062877 - .long 4023807324 - .long 1071074650 - .long 2452345726 - .long 1071086457 - .long 2292128226 - .long 1071098297 - .long 58635942 - .long 1071110171 - .long 864186929 - .long 1071122078 - .long 3555691467 - .long 1071131030 - .long 2003684347 - .long 1071142997 - .long 1479703759 - .long 1071154998 - .long 2537208015 - .long 1071164021 - .long 3699909861 - .long 1071176082 - .long 3934098706 - .long 1071188178 - .long 3885764182 - .long 1071197273 - .long 1357790931 - .long 1071209431 - .long 295956059 - .long 1071221624 - .long 4080877676 - .long 1071230791 - .long 202970280 - .long 1071243047 - .long 3977575845 - .long 1071252261 - .long 35977849 - .long 1071264580 - .long 1585496963 - .long 1071273842 - .long 375247257 - .long 1071286224 - .long 1812199574 - .long 1071295534 - .long 1876912769 - .long 1071307980 - .long 1051846544 - .long 1071317339 - .long 979589448 - .long 1071329850 - .long 71706889 - .long 1071339258 - .long 2790898835 - .long 1071351834 - .long 4013797733 - .long 1071361291 - .long 2541231151 - .long 1071370770 - .long 921733145 - .long 1071383442 - .long 508375805 - .long 1071392971 - .long 3091669954 - .long 1071402521 - .long 3343209673 - .long 1071415289 - .long 1693047557 - .long 1071424891 - .long 173861808 - .long 1071434515 - .long 3515822703 - .long 1071444160 - .long 1974837761 - .long 1071457056 - .long 1189018219 - .long 1071466754 - .long 2441946573 - .long 1071476474 - .long 1887102255 - .long 1071486217 - .long 4271031636 - .long 1071495982 - .long 876995759 - .long 1071509039 - .long 438773454 - .long 1071518858 - .long 172621632 - .long 1071528700 - .long 544035182 - .long 1071538565 - .long 2021801298 - .long 1071548453 - .long 783063308 - .long 1071558365 - .long 1598254051 - .long 1071568300 - .long 651258553 - .long 1071578259 - .long 2719315456 - .long 1071588241 - .long 3993180461 - .long 1071598247 - .long 667093936 - .long 1071608278 - .long 1823716217 - .long 1071618332 - .long 3664357648 - .long 1071628410 - .long 2393914686 - .long 1071638513 - .long 1405419566 - .long 1071646656 - .long 563652001 - .long 1071651732 - .long 1074554091 - .long 1071656820 - .long 3195405229 - .long 1071661920 - .long 2890399284 - .long 1071667033 - .long 420597586 - .long 1071672159 - .long 87278952 - .long 1071675583 - .long 1753119502 - .long 1071680729 - .long 1959759897 - .long 1071685888 - .long 975389815 - .long 1071691060 - .long 3365155278 - .long 1071696244 - .long 811309190 - .long 1071701442 - .long 1269811480 - .long 1071704914 - .long 1108583542 - .long 1071710133 - .long 1034517919 - .long 1071715365 - .long 1327340287 - .long 1071720610 - .long 1388251237 - .long 1071724114 - .long 1488234797 - .long 1071729381 - .long 2711385691 - .long 1071734661 - .long 952179194 - .long 1071738189 - .long 3255685427 - .long 1071743491 - .long 3159039803 - .long 1071748807 - .long 951558972 - .long 1071752359 - .long 3234424125 - .long 1071757697 - .long 3904573547 - .long 1071763049 - .long 2648729924 - .long 1071766625 - .long 2729250212 - .long 1071772000 - .long 2000712574 - .long 1071777389 - .long 3125257108 - .long 1071780989 - .long 3160324803 - .long 1071786401 - .long 2216316974 - .long 1071790017 - .long 3875016090 - .long 1071795452 - .long 1439520610 - .long 1071799084 - .long 1298103361 - .long 1071804543 - .long 2217517956 - .long 1071810016 - .long 1191753587 - .long 1071813673 - .long 1728773900 - .long 1071819170 - .long 747445441 - .long 1071822843 - .long 1670772213 - .long 1071826522 - .long 1471209283 - .long 1071832053 - .long 3287905877 - .long 1071835748 - .long 594038131 - .long 1071841304 - .long 3920147917 - .long 1071845015 - .long 3957142762 - .long 1071850595 - .long 826988438 - .long 1071854324 - .long 242509008 - .long 1071859929 - .long 4173610350 - .long 1071863673 - .long 2518313625 - .long 1071867425 - .long 2671523434 - .long 1071873065 - .long 387544807 - .long 1071876834 - .long 1470497767 - .long 1071880609 - .long 4269259217 - .long 1071886284 - .long 1345663925 - .long 1071890077 - .long 2159323299 - .long 1071893876 - .long 957937516 - .long 1071899588 - .long 2994656967 - .long 1071903404 - .long 556124819 - .long 1071907228 - .long 1631098658 - .long 1071912976 - .long 1368257861 - .long 1071916817 - .long 1309849279 - .long 1071920665 - .long 1567156841 - .long 1071924520 - .long 1179420986 - .long 1071930316 - .long 569448444 - .long 1071934189 - .long 669557459 - .long 1071938069 - .long 1593834700 - .long 1071941956 - .long 3166083125 - .long 1071947800 - .long 211641815 - .long 1071951706 - .long 2780675719 - .long 1071955618 - .long 2400234567 - .long 1071959538 - .long 3482927192 - .long 1071963465 - .long 1852089988 - .long 1071967400 - .long 1020849000 - .long 1071973316 - .long 1718090839 - .long 1071977269 - .long 121152472 - .long 1071981230 - .long 646346839 - .long 1071985198 - .long 3415709705 - .long 1071989173 - .long 4257004898 - .long 1071993156 - .long 3293664199 - .long 1071997147 - .long 649825382 - .long 1072001146 - .long 248887552 - .long 1072007158 - .long 2541522737 - .long 1072011175 - .long 3593780107 - .long 1072015200 - .long 3533041935 - .long 1072019233 - .long 2487426809 - .long 1072023274 - .long 585795318 - .long 1072027323 - .long 2252723088 - .long 1072031379 - .long 3323604690 - .long 1072035443 - .long 3929561382 - .long 1072039515 - .long 4202479723 - .long 1072043595 - .long 4275017539 - .long 1072047683 - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .type static_const_table,@object - .size static_const_table,4224 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acoshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acoshl.S deleted file mode 100644 index 205ab9b444..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acoshl.S +++ /dev/null @@ -1,883 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acoshl.c" - .text -..TXTST0: -# -- Begin acoshl - .text - .align 16,0x90 - .globl acoshl -acoshl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - movl %eax, %ebx - movzbl 17(%ebp), %esi - andl $32767, %ebx - shrl $7, %esi - shll $15, %esi - movl 12(%ebp), %edi - orl %ebx, %esi - movl %edi, %edx - shll $16, %esi - shrl $16, %edx - orl %edx, %esi - addl $-1073709056, %esi - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $1073741824, %esi - jae ..B1.44 -..B1.4: - cmpl $8192, %esi - jae ..B1.21 -..B1.5: - cmpl $64, %esi - jae ..B1.14 -..B1.6: - cmpl $16383, %ebx - je ..B1.39 -..B1.7: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.8: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - movl $1, %eax -..B1.11: - fldt 8(%ebp) - testl %eax, %eax - fldl _TWO_52H@GOTOFF(%ecx) - fld %st(0) - fxch %st(2) - faddl 8+_ones@GOTOFF(%ecx) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(0) - fmul %st(1), %st - fld %st(1) - fsub %st(4), %st - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 60+_Q1@GOTOFF(%ecx) - fmul %st(2), %st - fldt 36+_Q1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_Q1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_Q1@GOTOFF(%ecx) - fmul %st(3), %st - fldt 24+_Q1@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt _Q1@GOTOFF(%ecx) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st, %st(2) - fld %st(2) - fxch %st(1) - fmulp %st, %st(5) - fadd %st(4), %st - fsqrt - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(4) - fld %st(3) - fsubr %st(1), %st - fld %st(4) - fmul %st(5), %st - fsubrp %st, %st(6) - fld %st(4) - fmul %st(1), %st - fsubrp %st, %st(6) - fxch %st(3) - faddp %st, %st(5) - fdivrp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmulp %st, %st(2) - fadd %st(1), %st - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.13 -..B1.12: - fldcw 14(%esp) -..B1.13: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.42 -..B1.15: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.16: - fldcw 12(%esp) -..B1.17: - movl $1, %eax -..B1.18: - fldt 8(%ebp) - testl %eax, %eax - fldl _TWO_52H@GOTOFF(%ecx) - fldt 132+_Q@GOTOFF(%ecx) - fxch %st(2) - faddl 8+_ones@GOTOFF(%ecx) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(1) - fld %st(1) - fsub %st(3), %st - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fxch %st(4) - fstpt 16(%esp) - fldt 16(%esp) - fmul %st(0), %st - fadd %st, %st(4) - fxch %st(3) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 156+_Q@GOTOFF(%ecx) - fmul %st(5), %st - faddp %st, %st(6) - fxch %st(4) - fmul %st, %st(5) - fldt 108+_Q@GOTOFF(%ecx) - faddp %st, %st(6) - fmul %st, %st(5) - fldt 84+_Q@GOTOFF(%ecx) - faddp %st, %st(6) - fmul %st, %st(5) - fldt 60+_Q@GOTOFF(%ecx) - faddp %st, %st(6) - fmul %st, %st(5) - fldt 36+_Q@GOTOFF(%ecx) - faddp %st, %st(6) - fmul %st, %st(5) - fldt 12+_Q@GOTOFF(%ecx) - faddp %st, %st(6) - fmul %st, %st(5) - fldt 144+_Q@GOTOFF(%ecx) - fmul %st(1), %st - fldt 120+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 96+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt _Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fldt 180+_Q@GOTOFF(%ecx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fmulp %st, %st(1) - fldt 168+_Q@GOTOFF(%ecx) - fld %st(0) - fmul %st(3), %st - faddp %st, %st(4) - fldt 16(%esp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldl _TWO_52H@GOTOFF(%ecx) - fld %st(0) - fadd %st(3), %st - fsub %st(1), %st - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st, %st(4) - fld %st(4) - fxch %st(1) - fmulp %st, %st(3) - fadd %st(2), %st - fsqrt - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fsubrp %st, %st(3) - fld %st(1) - fsubr %st(1), %st - fld %st(2) - fmul %st(1), %st - fsubrp %st, %st(4) - fxch %st(5) - faddp %st, %st(3) - fdivrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fld %st(0) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmulp %st, %st(4) - fadd %st(3), %st - fmulp %st, %st(4) - fld %st(1) - fmul %st(3), %st - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fmul %st(2), %st - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.20 -..B1.19: - fldcw 14(%esp) -..B1.20: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.21: - movzwl 14(%esp), %esi - movl %esi, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.43 -..B1.22: - orl $-64768, %esi - movw %si, 12(%esp) -..B1.23: - fldcw 12(%esp) -..B1.24: - movzwl 16(%ebp), %eax - movl %eax, %ebx - movl $1, %edx - andl $32767, %ebx -..B1.25: - cmpl $16417, %ebx - jge ..B1.34 -..B1.26: - fldt 8(%ebp) - cmpl $16388, %ebx - jge ..B1.28 -..B1.27: - fldl _TWO_52H@GOTOFF(%ecx) - lea 8+_ones@GOTOFF(%ecx), %eax - fld %st(0) - fld %st(2) - fadd %st(2), %st - fsub %st(2), %st - fld %st(0) - fld %st(4) - fsub %st(2), %st - fmul %st, %st(1) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(1) - fld %st(1) - fmul %st(2), %st - faddl (%eax) - fld %st(0) - fadd %st(2), %st - fsqrt - fadd %st, %st(4) - fxch %st(5) - fsubrp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fsubrp %st, %st(1) - fld %st(3) - fxch %st(4) - fsubr %st, %st(5) - fxch %st(4) - fmul %st(5), %st - fsubrp %st, %st(1) - faddp %st, %st(1) - fld %st(2) - fadd %st(4), %st - fdivrp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(1) - fstpt 16(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl -8(%eax) - jmp ..B1.33 -..B1.28: - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - lea _ones@GOTOFF(%ecx), %eax - fmul %st(1), %st - fld %st(0) - fldl _TWO_32H@GOTOFF(%ecx) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fsubr %st(1), %st - fldl (%eax) - addl $8, %eax - cmpl $16394, %ebx - fldl (%eax) - jge ..B1.30 -..B1.29: - fstp %st(3) - fld %st(3) - fadd %st(3), %st - fld %st(4) - fadd %st(2), %st - fmulp %st, %st(1) - fsqrt - faddp %st, %st(4) - fxch %st(3) - fdivrp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - jmp ..B1.33 -..B1.30: - fstp %st(4) - cmpl $16401, %ebx - jge ..B1.32 -..B1.31: - fld %st(3) - fdiv %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fdivrp %st, %st(3) - faddp %st, %st(2) - jmp ..B1.33 -..B1.32: - fxch %st(2) - fdivrp %st, %st(3) - faddp %st, %st(2) -..B1.33: - fldt 16(%esp) - fld %st(0) - fadd %st(3), %st - fstpt 8(%ebp) - movzwl 16(%ebp), %ebx - andl $32767, %ebx - movl %ebx, %esi - addl $-16383, %ebx - negl %esi - fxch %st(1) - fstpt (%esp) - addl $-2, %esi - movzwl 8(%esp), %edi - andl $32767, %esi - andl $-32768, %edi - orl %esi, %edi - movw %di, 8(%esp) - fldt (%esp) - fmul %st, %st(1) - fxch %st(1) - fstpt 16(%esp) - fmulp %st, %st(1) - jmp ..B1.35 -..B1.34: - fldl _TWO_52H@GOTOFF(%ecx) - andl $-32768, %eax - orl $-49153, %eax - addl $-16382, %ebx - movw %ax, 16(%ebp) - lea 8+_ones@GOTOFF(%ecx), %eax - fldt 8(%ebp) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fsubrp %st, %st(1) -..B1.35: - fldt 16(%esp) - fldt 60+_P@GOTOFF(%ecx) - fldt 36+_P@GOTOFF(%ecx) - fldt 12+_P@GOTOFF(%ecx) - movl 12(%ebp), %esi - shrl $23, %esi - andl $255, %esi - movl %ebx, (%esp) - fildl (%esp) - flds __libm_rcp_table_256@GOTOFF(%ecx,%esi,4) - fmul %st, %st(5) - fmulp %st, %st(6) - fxch %st(4) - faddl (%eax) - fld %st(0) - shll $4, %esi - fadd %st(6), %st - fld %st(0) - testl %edx, %edx - fmul %st(1), %st - fmul %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fstpt 8(%ebp) - fldt 48+_P@GOTOFF(%ecx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.2@GOTOFF(%ecx) - fmul %st(2), %st - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - fmulp %st, %st(3) - faddl 8+__libm_logl_table_256@GOTOFF(%ecx,%esi) - faddp %st, %st(3) - fxch %st(1) - faddl __libm_logl_table_256@GOTOFF(%esi,%ecx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.37 -..B1.36: - fldcw 14(%esp) -..B1.37: - fldt 16(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - xorl %eax, %eax - jmp ..B1.11 -..B1.39: - cmpl $-2147483648, %edi - jne ..B1.7 -..B1.40: - cmpl $0, 8(%ebp) - jne ..B1.7 -..B1.41: - fldl _zeros@GOTOFF(%ecx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.42: - xorl %eax, %eax - jmp ..B1.18 -..B1.43: - xorl %edx, %edx - jmp ..B1.25 -..B1.44: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.57 -..B1.45: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.46: - fldcw 12(%esp) -..B1.47: - movzwl 16(%ebp), %ebx - movl $1, %edx - andl $32767, %ebx -..B1.48: - cmpl $32767, %ebx - jne ..B1.53 -..B1.49: - cmpl $-2147483648, 12(%ebp) - jne ..B1.52 -..B1.50: - cmpl $0, 8(%ebp) - jne ..B1.52 -..B1.51: - movzbl 17(%ebp), %eax - testl $128, %eax - jne ..B1.53 -..B1.52: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ecx) - fstpt (%esp) - jmp ..B1.54 -..B1.53: - fldl _infs@GOTOFF(%ecx) - fmull _zeros@GOTOFF(%ecx) - fstpt (%esp) -..B1.54: - testl %edx, %edx - je ..B1.56 -..B1.55: - fldcw 14(%esp) -..B1.56: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.57: - xorl %edx, %edx - jmp ..B1.48 - .align 16,0x90 - .type acoshl,@function - .size acoshl,.-acoshl - .data -# -- End acoshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_Q1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49147 - .word 0 - .word 37372 - .word 39321 - .word 39321 - .word 39321 - .word 16377 - .word 0 - .word 18586 - .word 55971 - .word 28086 - .word 46811 - .word 49143 - .word 0 - .word 15813 - .word 59837 - .word 36396 - .word 63715 - .word 16373 - .word 0 - .word 53727 - .word 45078 - .word 40330 - .word 46917 - .word 49140 - .word 0 - .word 48396 - .word 8155 - .word 33124 - .word 36271 - .word 16371 - .word 0 - .type _Q1,@object - .size _Q1,72 - .align 2 -_Q: - .word 48098 - .word 43690 - .word 43690 - .word 43690 - .word 16366 - .word 0 - .word 20923 - .word 52462 - .word 52428 - .word 52428 - .word 49132 - .word 0 - .word 38527 - .word 56172 - .word 28086 - .word 46811 - .word 49143 - .word 0 - .word 47050 - .word 58060 - .word 36408 - .word 63715 - .word 16373 - .word 0 - .word 28121 - .word 12720 - .word 53620 - .word 46917 - .word 49140 - .word 0 - .word 5738 - .word 23392 - .word 25199 - .word 36391 - .word 16371 - .word 0 - .word 9822 - .word 24561 - .word 52037 - .word 58572 - .word 49137 - .word 0 - .word 32045 - .word 31633 - .word 41878 - .word 48451 - .word 16368 - .word 0 - .word 16262 - .word 24754 - .word 13643 - .word 40941 - .word 49135 - .word 0 - .word 36557 - .word 45689 - .word 21168 - .word 35169 - .word 16366 - .word 0 - .word 29793 - .word 40103 - .word 23573 - .word 60969 - .word 49132 - .word 0 - .word 51189 - .word 17117 - .word 14297 - .word 51855 - .word 16363 - .word 0 - .word 6461 - .word 12463 - .word 55551 - .word 38957 - .word 49130 - .word 0 - .word 34939 - .word 19802 - .word 20012 - .word 37205 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43696 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39328 - .word 16377 - .word 0 - .type _Q,@object - .size _Q,192 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .type _P,@object - .size _P,72 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosl.S deleted file mode 100644 index d13c14dad3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/acosl.S +++ /dev/null @@ -1,1211 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acosl.c" - .text -..TXTST0: -# -- Begin acosl - .text - .align 16,0x90 - .globl acosl -acosl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %edi - pushl %ebx - subl $88, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzbl 17(%ebp), %edx - movzwl 16(%ebp), %eax - andl $128, %edx - andl $32767, %eax - shrl $7, %edx - movzwl 14(%esp), %ecx - cmpl $16383, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jge ..B1.60 -..B1.4: - cmpl $16382, %eax - jge ..B1.47 -..B1.5: - cmpl $16376, %eax - jge ..B1.37 -..B1.6: - cmpl $16371, %eax - jge ..B1.30 -..B1.7: - cmpl $16365, %eax - jge ..B1.23 -..B1.8: - cmpl $16308, %eax - jge ..B1.16 -..B1.9: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.78 -..B1.10: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.11: - fldcw 12(%esp) -..B1.12: - movl $1, %eax -..B1.13: - fldt 12+_pi_02@GOTOFF(%ebx) - testl %eax, %eax - fldt _pi_02@GOTOFF(%ebx) - fldt 8(%ebp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.15 -..B1.14: - fldcw 14(%esp) -..B1.15: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.79 -..B1.17: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.18: - fldcw 12(%esp) -..B1.19: - movl $1, %eax -..B1.20: - fldt 8(%ebp) - testl %eax, %eax - fldt _P4@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fldt 12+_pi_02@GOTOFF(%ebx) - fsubp %st, %st(1) - fldt _pi_02@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.22 -..B1.21: - fldcw 14(%esp) -..B1.22: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.80 -..B1.24: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.25: - fldcw 12(%esp) -..B1.26: - movl $1, %eax -..B1.27: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_P3@GOTOFF(%ebx) - fmul %st(1), %st - fldt _P3@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fldt 12+_pi_02@GOTOFF(%ebx) - fsubp %st, %st(1) - fldt _pi_02@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.29 -..B1.28: - fldcw 14(%esp) -..B1.29: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.30: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.81 -..B1.31: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.32: - fldcw 12(%esp) -..B1.33: - movl $1, %eax -..B1.34: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fld %st(2) - fld %st(3) - fldl _TWO_32H@GOTOFF(%ebx) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fsub %st(1), %st - fldt 36+_P2@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_P2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_P2@GOTOFF(%ebx) - fmulp %st, %st(4) - fldt _P2@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(4) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 12+_pi_02@GOTOFF(%ebx) - fsubp %st, %st(1) - fldt _pi_02@GOTOFF(%ebx) - fsubp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.36 -..B1.35: - fldcw 14(%esp) -..B1.36: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.37: - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.82 -..B1.38: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.39: - fldcw 12(%esp) -..B1.40: - movzwl 16(%ebp), %eax - movl $1, %edx - andl $32767, %eax -..B1.41: - fldt 8(%ebp) - cmpl $16381, %eax - fld %st(0) - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fldl _TWO_52H@GOTOFF(%ebx) - fmul %st, %st(2) - fstpt 32(%esp) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(1) - fld %st(1) - fsub %st(3), %st - fmul %st, %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fld %st(3) - fmul %st(4), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 48(%esp) - fldt 48(%esp) - fld %st(2) - fmul %st(2), %st - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fld %st(1) - fmul %st(2), %st - fadd %st, %st(1) - fxch %st(3) - fstpt 16(%esp) - jge ..B1.43 -..B1.42: - fstp %st(2) - fldt 132+_P1@GOTOFF(%ebx) - fmul %st(2), %st - fldt 108+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_P1@GOTOFF(%ebx) - fldt 120+_P1@GOTOFF(%ebx) - fmul %st(4), %st - fldt 96+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt _P1@GOTOFF(%ebx) - faddp %st, %st(3) - fldt 48(%esp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 16(%esp) - fldt 144+_P1@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - fxch %st(1) - jmp ..B1.44 -..B1.43: - fldt 204+_P@GOTOFF(%ebx) - fmul %st(1), %st - fldt 180+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 156+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 132+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 108+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 192+_P@GOTOFF(%ebx) - fmul %st(2), %st - fldt 168+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 144+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 120+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _P@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 48(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 64(%esp) - fldt 16(%esp) - fldt 228+_P@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(4) - fldt 216+_P@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fld %st(3) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 32(%esp) - fmul %st(3), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) -..B1.44: - fldt (%esp) - testl %edx, %edx - fmulp %st, %st(1) - fld %st(2) - fmul %st(2), %st - faddp %st, %st(1) - faddp %st, %st(2) - fmul %st(2), %st - faddp %st, %st(2) - fldt _pi_02@GOTOFF(%ebx) - fld %st(0) - fsubr %st(3), %st - fchs - fsub %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fldt 12+_pi_02@GOTOFF(%ebx) - fsubp %st, %st(2) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.46 -..B1.45: - fldcw 14(%esp) -..B1.46: - fldt 16(%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.47: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.83 -..B1.48: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.49: - fldcw 12(%esp) -..B1.50: - movl $1, %ecx -..B1.51: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ebx,%edx,8) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fldl _TWO_32H@GOTOFF(%ebx) - fldl _TWO_52H@GOTOFF(%ebx) - fstpt 16(%esp) - fldt 16(%esp) - fxch %st(3) - fsubrl _ones@GOTOFF(%ebx) - fmul %st(2), %st - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(1) - fxch %st(1) - fsub %st(2), %st - fadd %st, %st(1) - fxch %st(1) - fsqrt - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(5) - fld %st(4) - fmul %st(5), %st - fsubr %st, %st(3) - fld %st(5) - fxch %st(2) - fsub %st(6), %st - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fld %st(4) - fadd %st(1), %st - fdivrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fld %st(2) - fadd %st(2), %st - fld %st(0) - fmul %st(3), %st - fld %st(4) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fstpt 48(%esp) - fldt 48(%esp) - fld %st(1) - fmul %st(4), %st - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(1) - fstpt (%esp) - fld %st(2) - fmul %st(3), %st - fadd %st, %st(1) - fxch %st(2) - fstpt 64(%esp) - fldt 64(%esp) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fcompp - fnstsw %ax - sahf - jbe ..B1.53 -..B1.52: - fstp %st(1) - fldt 132+_P1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 108+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_P1@GOTOFF(%ebx) - fldt 120+_P1@GOTOFF(%ebx) - fmul %st(3), %st - fldt 96+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _P1@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 48(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt (%esp) - fldt 144+_P1@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(2) - fxch %st(1) - jmp ..B1.54 -..B1.53: - fldt 204+_P@GOTOFF(%ebx) - fmul %st(1), %st - fldt 180+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 156+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 132+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 108+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 192+_P@GOTOFF(%ebx) - fmul %st(2), %st - fldt 168+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 144+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 120+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _P@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 48(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 32(%esp) - fldt (%esp) - fldt 228+_P@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(3) - fldt 216+_P@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fldt 16(%esp) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) -..B1.54: - fldt 64(%esp) - testl %edx, %edx - fmulp %st, %st(2) - fld %st(2) - fmul %st(1), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - je ..B1.56 -..B1.55: - fstp %st(1) - fstp %st(2) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fmul %st, %st(2) - fmulp %st, %st(1) - fldt _pi_00@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fldt 12+_pi_00@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.57 -..B1.56: - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fxch %st(1) - fsub %st, %st(4) - fxch %st(4) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt (%esp) -..B1.57: - testl %ecx, %ecx - je ..B1.59 -..B1.58: - fldcw 14(%esp) -..B1.59: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.60: - movl %ecx, %edi - andl $768, %edi - cmpl $768, %edi - je ..B1.84 -..B1.61: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.62: - fldcw 12(%esp) -..B1.63: - movzwl 16(%ebp), %eax - movl $1, %ecx - andl $32767, %eax -..B1.64: - cmpl $32767, %eax - jne ..B1.68 -..B1.65: - cmpl $-2147483648, 12(%ebp) - jne ..B1.67 -..B1.66: - cmpl $0, 8(%ebp) - je ..B1.74 -..B1.67: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ebx) - fstpt (%esp) - jmp ..B1.75 -..B1.68: - cmpl $16383, %eax - jne ..B1.74 -..B1.69: - cmpl $-2147483648, 12(%ebp) - jne ..B1.74 -..B1.70: - cmpl $0, 8(%ebp) - jne ..B1.74 -..B1.71: - testl %edx, %edx - je ..B1.73 -..B1.72: - fldt _pi_0l@GOTOFF(%ebx) - fldt _small_value_80@GOTOFF(%ebx) - fsubrp %st, %st(1) - fstpt (%esp) - jmp ..B1.75 -..B1.73: - fldl _zeros@GOTOFF(%ebx) - fstpt (%esp) - jmp ..B1.75 -..B1.74: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - fstpt (%esp) -..B1.75: - testl %ecx, %ecx - je ..B1.77 -..B1.76: - fldcw 14(%esp) -..B1.77: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.78: - xorl %eax, %eax - jmp ..B1.13 -..B1.79: - xorl %eax, %eax - jmp ..B1.20 -..B1.80: - xorl %eax, %eax - jmp ..B1.27 -..B1.81: - xorl %eax, %eax - jmp ..B1.34 -..B1.82: - xorl %edx, %edx - jmp ..B1.41 -..B1.83: - xorl %ecx, %ecx - jmp ..B1.51 -..B1.84: - xorl %ecx, %ecx - jmp ..B1.64 - .align 16,0x90 - .type acosl,@function - .size acosl,.-acosl - .data -# -- End acosl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_pi_02: - .word 0 - .word 0 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 35374 - .word 4889 - .word 2259 - .word 34211 - .word 16349 - .word 0 - .type _pi_02,@object - .size _pi_02,24 - .align 2 -_P4: - .word 43691 - .word 44938 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _P4,@object - .size _P4,12 - .align 2 -_P3: - .word 36763 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 40704 - .word 58046 - .word 39460 - .word 39321 - .word 16379 - .word 0 - .type _P3,@object - .size _P3,24 - .align 2 -_P2: - .word 43688 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 20771 - .word 39331 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 23807 - .word 53798 - .word 28073 - .word 46811 - .word 16378 - .word 0 - .word 35198 - .word 7516 - .word 54204 - .word 63722 - .word 16377 - .word 0 - .type _P2,@object - .size _P2,48 - .align 2 -_P1: - .word 43589 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 39364 - .word 39321 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 17602 - .word 56173 - .word 28086 - .word 46811 - .word 16378 - .word 0 - .word 47501 - .word 58414 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 27078 - .word 6583 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 39781 - .word 21053 - .word 25224 - .word 36391 - .word 16377 - .word 0 - .word 46568 - .word 6235 - .word 50749 - .word 58572 - .word 16376 - .word 0 - .word 41318 - .word 51558 - .word 37628 - .word 48452 - .word 16376 - .word 0 - .word 55026 - .word 7893 - .word 43866 - .word 40925 - .word 16376 - .word 0 - .word 43387 - .word 19951 - .word 2911 - .word 35445 - .word 16376 - .word 0 - .word 32572 - .word 59281 - .word 11243 - .word 56666 - .word 16375 - .word 0 - .word 49800 - .word 50337 - .word 42707 - .word 39184 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16380 - .word 0 - .type _P1,@object - .size _P1,156 - .align 2 -_P: - .word 42691 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 4317 - .word 52400 - .word 52428 - .word 52428 - .word 49134 - .word 0 - .word 26206 - .word 56172 - .word 28086 - .word 46811 - .word 16378 - .word 0 - .word 36130 - .word 58514 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 21592 - .word 8113 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 3093 - .word 49950 - .word 25215 - .word 36391 - .word 16377 - .word 0 - .word 21499 - .word 24428 - .word 51889 - .word 58572 - .word 16376 - .word 0 - .word 54828 - .word 41264 - .word 61120 - .word 48451 - .word 16376 - .word 0 - .word 10243 - .word 1489 - .word 39717 - .word 40940 - .word 16376 - .word 0 - .word 51433 - .word 46039 - .word 63564 - .word 35220 - .word 16376 - .word 0 - .word 60402 - .word 39286 - .word 25675 - .word 60826 - .word 16375 - .word 0 - .word 34219 - .word 36833 - .word 44839 - .word 57547 - .word 16375 - .word 0 - .word 13013 - .word 26091 - .word 19721 - .word 60832 - .word 16374 - .word 0 - .word 22353 - .word 41544 - .word 55443 - .word 55735 - .word 16376 - .word 0 - .word 14948 - .word 7038 - .word 38091 - .word 38339 - .word 49145 - .word 0 - .word 61727 - .word 61480 - .word 15906 - .word 51927 - .word 16378 - .word 0 - .word 13386 - .word 23084 - .word 64443 - .word 55906 - .word 49146 - .word 0 - .word 17499 - .word 23573 - .word 43947 - .word 42761 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39328 - .word 16379 - .word 0 - .type _P,@object - .size _P,240 - .align 2 -_pi_00: - .word 0 - .word 0 - .word 55970 - .word 51471 - .word 16384 - .word 0 - .word 35374 - .word 4889 - .word 2259 - .word 34211 - .word 16350 - .word 0 - .type _pi_00,@object - .size _pi_00,24 - .align 2 -_pi_0l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16384 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49152 - .word 0 - .type _pi_0l,@object - .size _pi_0l,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asin_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asin_wmt.S deleted file mode 100644 index f15bcefa0d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asin_wmt.S +++ /dev/null @@ -1,2008 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asin_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin asin - .text - .align 16,0x90 - .globl asin -asin: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - stmxcsr 16(%esp) - movl 16(%esp), %edx - andl $-24577, %edx - cmpl %edx, 16(%esp) - jne .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - movsd 5984(%ebx), %xmm4 - movsd 6016(%ebx), %xmm3 - xorpd %xmm5, %xmm5 - movsd 6000(%ebx), %xmm2 - movl $8192, %ecx - pinsrw $2, %ecx, %xmm5 - movapd %xmm0, %xmm1 - movsd %xmm0, 8(%esp) - psrlq $44, %xmm0 - movd %xmm0, %edx - movapd %xmm1, %xmm7 - movl $8192, %ecx - pinsrw $2, %ecx, %xmm5 - movapd %xmm1, %xmm0 - movl $524287, %eax - andl %edx, %eax - subl $260864, %eax - cmpl $955, %eax - jae .L_2TAG_PACKET_2.0.3 - mulsd %xmm1, %xmm1 - andl $65535, %edx - subsd %xmm1, %xmm3 - sqrtsd %xmm3, %xmm3 - andpd %xmm7, %xmm2 - andl $-4, %edx - subl $64256, %edx - movsd 3936(%ebx,%edx,2), %xmm1 - orpd %xmm5, %xmm2 - movapd 96(%ebx,%edx,4), %xmm4 - movapd %xmm7, %xmm6 - addsd %xmm2, %xmm7 - subsd %xmm2, %xmm0 - mulsd %xmm7, %xmm0 - mulsd %xmm1, %xmm6 - mulsd %xmm2, %xmm3 - movapd %xmm6, %xmm1 - addsd %xmm3, %xmm6 - divsd %xmm6, %xmm0 - movsd 80(%ebx), %xmm7 - movsd 64(%ebx), %xmm5 - subsd %xmm3, %xmm1 - andpd 6064(%ebx), %xmm2 - movapd %xmm1, %xmm3 - mulsd %xmm1, %xmm1 - movsd 72(%ebx), %xmm6 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm7 - mulsd %xmm3, %xmm5 - xorpd %xmm2, %xmm4 - mulsd %xmm1, %xmm3 - addsd %xmm7, %xmm6 - mulsd %xmm3, %xmm6 - addsd %xmm4, %xmm5 - pshufd $238, %xmm4, %xmm4 - addsd %xmm5, %xmm6 - orpd %xmm2, %xmm4 - addsd %xmm6, %xmm0 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_3.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_3.0.3: - addsd %xmm4, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_2.0.3: - subl $955, %eax - cmpl $67, %eax - jae .L_2TAG_PACKET_5.0.3 - mulsd %xmm1, %xmm1 - subsd %xmm1, %xmm3 - sqrtsd %xmm3, %xmm3 - movl %edx, %eax - andpd 5984(%ebx), %xmm0 - andpd 6048(%ebx), %xmm7 - movapd %xmm0, %xmm1 - movsd 6016(%ebx), %xmm4 - movapd %xmm7, %xmm6 - subsd %xmm7, %xmm1 - mulsd %xmm7, %xmm7 - addsd %xmm6, %xmm0 - subsd %xmm7, %xmm4 - mulsd %xmm1, %xmm0 - movapd %xmm3, %xmm7 - andpd %xmm3, %xmm2 - psllq $2, %xmm3 - pextrw $3, %xmm3, %edx - orpd %xmm5, %xmm2 - subl $65216, %edx - addl %edx, %edx - mulsd 3936(%ebx,%edx,4), %xmm7 - mulsd %xmm2, %xmm6 - movapd 6080(%ebx), %xmm3 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - subsd %xmm7, %xmm6 - addsd %xmm1, %xmm6 - subsd %xmm2, %xmm4 - addsd %xmm7, %xmm7 - movsd 64(%ebx), %xmm5 - subsd %xmm0, %xmm4 - addsd %xmm6, %xmm7 - movsd 80(%ebx), %xmm0 - divsd %xmm7, %xmm4 - movsd 72(%ebx), %xmm2 - subpd 96(%ebx,%edx,8), %xmm3 - movapd %xmm6, %xmm1 - mulsd %xmm6, %xmm6 - andl $524288, %eax - shrl $4, %eax - mulsd %xmm6, %xmm0 - mulsd %xmm6, %xmm1 - mulsd %xmm1, %xmm5 - mulsd %xmm6, %xmm1 - addsd %xmm2, %xmm0 - pxor %xmm6, %xmm6 - mulsd %xmm1, %xmm0 - addsd %xmm3, %xmm5 - pinsrw $3, %eax, %xmm6 - addsd %xmm5, %xmm0 - movapd %xmm4, %xmm5 - pshufd $238, %xmm3, %xmm3 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm3 - subsd %xmm3, %xmm5 - subsd %xmm5, %xmm0 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_6.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_6.0.3: - xorpd %xmm6, %xmm0 - xorpd %xmm6, %xmm4 - subsd %xmm4, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_5.0.3: - addl $15291, %eax - cmpl $14336, %eax - jae .L_2TAG_PACKET_7.0.3 - unpcklpd %xmm7, %xmm7 - movapd (%ebx), %xmm1 - movapd %xmm7, %xmm6 - movapd 16(%ebx), %xmm2 - movapd 32(%ebx), %xmm4 - mulpd %xmm7, %xmm7 - mulpd %xmm7, %xmm6 - mulpd %xmm7, %xmm1 - mulpd %xmm7, %xmm7 - movapd %xmm6, %xmm3 - mulsd %xmm6, %xmm6 - addpd %xmm2, %xmm1 - mulpd %xmm7, %xmm4 - mulsd %xmm3, %xmm6 - addpd %xmm4, %xmm1 - mulpd %xmm6, %xmm1 - pshufd $238, %xmm1, %xmm2 - addsd %xmm2, %xmm1 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_8.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_8.0.3: - addsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_7.0.3: - subl $15358, %eax - cmpl $2, %eax - jae .L_2TAG_PACKET_9.0.3 - mulsd %xmm1, %xmm1 - subsd %xmm1, %xmm3 - sqrtsd %xmm3, %xmm3 - movl %edx, %eax - andpd 6032(%ebx), %xmm7 - pshufd $68, %xmm3, %xmm5 - andpd 6032(%ebx), %xmm3 - movapd %xmm7, %xmm1 - movsd 6016(%ebx), %xmm4 - movapd %xmm7, %xmm6 - subsd %xmm7, %xmm0 - mulsd %xmm7, %xmm7 - addsd %xmm1, %xmm1 - mulsd %xmm0, %xmm1 - subsd %xmm7, %xmm4 - movapd %xmm3, %xmm6 - mulsd %xmm3, %xmm3 - mulsd %xmm0, %xmm0 - subsd %xmm1, %xmm4 - subsd %xmm5, %xmm6 - addsd %xmm5, %xmm5 - subsd %xmm3, %xmm4 - movapd (%ebx), %xmm2 - pshufd $238, %xmm5, %xmm3 - subsd %xmm0, %xmm4 - addsd %xmm6, %xmm5 - pshufd $238, %xmm3, %xmm7 - addsd %xmm3, %xmm3 - mulsd %xmm6, %xmm5 - addsd %xmm5, %xmm4 - pshufd $238, %xmm7, %xmm6 - divsd %xmm3, %xmm4 - movapd 48(%ebx), %xmm1 - movapd 16(%ebx), %xmm5 - movapd 32(%ebx), %xmm0 - mulpd %xmm7, %xmm7 - movapd %xmm6, %xmm3 - mulpd %xmm7, %xmm2 - mulpd %xmm7, %xmm6 - shrl $4, %eax - andl $32768, %eax - mulsd %xmm7, %xmm1 - mulpd %xmm7, %xmm7 - addpd %xmm2, %xmm5 - movapd %xmm6, %xmm2 - mulsd %xmm6, %xmm6 - mulpd %xmm0, %xmm7 - movapd 6080(%ebx), %xmm0 - mulsd %xmm6, %xmm2 - addpd %xmm5, %xmm7 - pshufd $238, %xmm1, %xmm5 - mulsd %xmm2, %xmm6 - mulpd %xmm2, %xmm7 - addsd %xmm5, %xmm1 - xorpd %xmm5, %xmm5 - pshufd $238, %xmm7, %xmm2 - mulsd %xmm6, %xmm1 - pshufd $238, %xmm0, %xmm6 - addsd %xmm2, %xmm7 - movapd %xmm3, %xmm2 - pinsrw $3, %eax, %xmm5 - subsd %xmm6, %xmm3 - addsd %xmm1, %xmm0 - addsd %xmm3, %xmm6 - addsd %xmm4, %xmm7 - subsd %xmm6, %xmm2 - subsd %xmm7, %xmm0 - subsd %xmm2, %xmm0 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_10.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_10.0.3: - xorpd %xmm5, %xmm0 - xorpd %xmm5, %xmm3 - subsd %xmm3, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_9.0.3: - addl $261886, %eax - cmpl $261888, %eax - jb .L_2TAG_PACKET_11.0.3 - movd %xmm0, %ecx - psrlq $32, %xmm0 - movd %xmm0, %edx - andl $2147483647, %edx - movl $1072693248, %eax - subl %edx, %eax - orl %ecx, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_12.0.3 - movq 8(%esp), %xmm2 - movd %xmm2, %edx - psrlq $32, %xmm2 - movd %xmm2, %ecx - andl $2147483647, %ecx - subl $1, %edx - sbbl $2146435072, %ecx - cmpl $0, %ecx - jge .L_2TAG_PACKET_11.0.3 - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %edx - pinsrw $3, %edx, %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $61, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_13.0.3 -.L_2TAG_PACKET_12.0.3: - movsd 5984(%ebx), %xmm1 - movsd 6080(%ebx), %xmm2 - movsd 6088(%ebx), %xmm0 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_14.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_14.0.3: - andnpd %xmm7, %xmm1 - orpd %xmm1, %xmm0 - orpd %xmm1, %xmm2 - addsd %xmm2, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_0.0.3: - movl 16(%esp), %edx - andl $-24577, %edx - movl %edx, 24(%esp) - ldmxcsr 24(%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_11.0.3: - movsd 8(%esp), %xmm0 - xorpd %xmm6, %xmm6 - movapd %xmm0, %xmm7 - pextrw $3, %xmm0, %edx - andl $32752, %edx - subl $16, %edx - cmpl $32736, %edx - jb .L_2TAG_PACKET_15.0.3 - addsd %xmm0, %xmm6 - orpd %xmm6, %xmm0 - mulsd %xmm0, %xmm7 -.L_2TAG_PACKET_15.0.3: - movsd %xmm0, (%esp) - fldl (%esp) -.L_2TAG_PACKET_13.0.3: - movl 16(%esp), %edx - andl $-24577, %edx - cmpl 16(%esp), %edx - je .L_2TAG_PACKET_4.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %edx - andl $24576, %edx - orl %edx, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_4.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type asin,@function - .size asin,.-asin - .data -# -- End asin - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 780903145 - .long 1066854586 - .long 858993459 - .long 1068708659 - .long 3340530119 - .long 1067392113 - .long 1431655765 - .long 1069897045 - .long 1321528399 - .long 1066517740 - .long 3067833783 - .long 1067899757 - .long 2021159460 - .long 1065855096 - .long 2576980378 - .long 1066178969 - .long 1431655765 - .long 1069897045 - .long 858993459 - .long 1068708659 - .long 3067833783 - .long 1067899757 - .long 0 - .long 0 - .long 3822952792 - .long 1021639372 - .long 182792448 - .long 1068507836 - .long 2264213271 - .long 1019558908 - .long 649052928 - .long 1068524253 - .long 1797139609 - .long 1022295143 - .long 1243095296 - .long 1068540671 - .long 1415938756 - .long 1021439537 - .long 2033294592 - .long 1068557090 - .long 2356809978 - .long 1021777916 - .long 3088063744 - .long 1068573510 - .long 2669055318 - .long 1022124482 - .long 180888576 - .long 1068589932 - .long 3566445325 - .long 1021358712 - .long 1970196992 - .long 1068606354 - .long 896980323 - .long 1021319659 - .long 4229555456 - .long 1068622777 - .long 436049712 - .long 1021319758 - .long 2732572160 - .long 1068639202 - .long 583123209 - .long 1020797960 - .long 1842831872 - .long 1068655628 - .long 1370449804 - .long 1021429270 - .long 1628994560 - .long 1068672055 - .long 2411391464 - .long 1021057980 - .long 2159763712 - .long 1068688483 - .long 1208692749 - .long 1021943903 - .long 3503886336 - .long 1068704912 - .long 538793309 - .long 1019744063 - .long 1435187200 - .long 1068721343 - .long 4085087612 - .long 1020608419 - .long 317469952 - .long 1068737775 - .long 144386942 - .long 1021440732 - .long 219617280 - .long 1068754208 - .long 2940088361 - .long 1019981122 - .long 1210558208 - .long 1068770642 - .long 2176850347 - .long 1018373705 - .long 3359268352 - .long 1068787077 - .long 2395611454 - .long 1021889042 - .long 2439803648 - .long 1068803514 - .long 1650705253 - .long 1020227966 - .long 2816203520 - .long 1068819952 - .long 3702166386 - .long 1019379914 - .long 262620672 - .long 1068836392 - .long 1855649370 - .long 1020453124 - .long 3438159616 - .long 1068852832 - .long 923063860 - .long 1019273834 - .long 3822105856 - .long 1068869274 - .long 4289947947 - .long 1019434249 - .long 1483729920 - .long 1068885718 - .long 787455814 - .long 1020738379 - .long 787321088 - .long 1068902163 - .long 3321653337 - .long 1021842569 - .long 1802253312 - .long 1068918609 - .long 2653633526 - .long 1021821525 - .long 302985984 - .long 1068935057 - .long 161272028 - .long 1021655149 - .long 653966080 - .long 1068951506 - .long 2566098667 - .long 1020066219 - .long 2924727296 - .long 1068967956 - .long 3646493722 - .long 1014292285 - .long 2889890304 - .long 1068984408 - .long 1081009196 - .long 1022189620 - .long 619098112 - .long 1069000862 - .long 4011643355 - .long 1021773297 - .long 477017600 - .long 1069017317 - .long 4030305534 - .long 1021292252 - .long 2533403904 - .long 1069033773 - .long 2645187591 - .long 1019527099 - .long 2563102208 - .long 1069050231 - .long 3857293792 - .long 1022311697 - .long 635982336 - .long 1069066691 - .long 3625936637 - .long 1017511744 - .long 1116940800 - .long 1069083152 - .long 3653872993 - .long 1022016631 - .long 4075964160 - .long 1069099614 - .long 2468900271 - .long 1021769532 - .long 993165568 - .long 1069116079 - .long 1358104224 - .long 1021199776 - .long 528586752 - .long 1069132545 - .long 2200950332 - .long 1022024872 - .long 2752395776 - .long 1069149012 - .long 3197072454 - .long 1017751319 - .long 3439855616 - .long 1069165481 - .long 1651081806 - .long 1020809338 - .long 2661257728 - .long 1069181952 - .long 539032752 - .long 1021728805 - .long 486957312 - .long 1069198425 - .long 3136045149 - .long 1016888671 - .long 1282340352 - .long 1069214899 - .long 2593963259 - .long 1018956103 - .long 822921728 - .long 1069231375 - .long 2146032737 - .long 1022306465 - .long 3474216192 - .long 1069247852 - .long 3976811625 - .long 1021350207 - .long 716902656 - .long 1069264332 - .long 718267222 - .long 1018624727 - .long 1211594496 - .long 1069280813 - .long 1485641389 - .long 1018447451 - .long 734070272 - .long 1069297296 - .long 354455128 - .long 1021341291 - .long 3650110720 - .long 1069313780 - .long 682185947 - .long 1021651853 - .long 1440663040 - .long 1069330267 - .long 3558574550 - .long 1021615110 - .long 2766612224 - .long 1069346755 - .long 874607978 - .long 1017746872 - .long 3404011008 - .long 1069363245 - .long 4154988502 - .long 1021439906 - .long 3423949056 - .long 1069379737 - .long 2263202309 - .long 1021479615 - .long 2897587712 - .long 1069396231 - .long 2562065031 - .long 1022090363 - .long 1896159232 - .long 1069412727 - .long 3836237663 - .long 1019867288 - .long 490968576 - .long 1069429225 - .long 3322056743 - .long 1006752762 - .long 3048360192 - .long 1069445724 - .long 1152314833 - .long 1013122252 - .long 1049850624 - .long 1069462226 - .long 3601590727 - .long 1022214610 - .long 3156899584 - .long 1069478729 - .long 1855169970 - .long 1019487271 - .long 851173376 - .long 1069495235 - .long 312649594 - .long 1020868604 - .long 2794281728 - .long 1069511742 - .long 1093490181 - .long 1020777577 - .long 468042496 - .long 1069528252 - .long 1152540679 - .long 1021403732 - .long 2534219264 - .long 1069544763 - .long 2292126035 - .long 1021872430 - .long 1376146432 - .long 1069558527 - .long 3293753641 - .long 1020500454 - .long 4175442432 - .long 1069575044 - .long 3626347564 - .long 1021610969 - .long 3523113472 - .long 1069591566 - .long 339956500 - .long 1021119039 - .long 4003350528 - .long 1069608092 - .long 3429333082 - .long 1022813542 - .long 1611067392 - .long 1069624623 - .long 2298017544 - .long 1021977587 - .long 931782144 - .long 1069641158 - .long 2164684743 - .long 1021250988 - .long 2256725504 - .long 1069657697 - .long 1138762335 - .long 1021443776 - .long 1582853120 - .long 1069674241 - .long 1084010382 - .long 1022994693 - .long 3497758720 - .long 1069690789 - .long 406366244 - .long 1022713586 - .long 3999816960 - .long 1069707342 - .long 1488723042 - .long 1023381290 - .long 3383096064 - .long 1069723900 - .long 2541558953 - .long 1019137887 - .long 1942403584 - .long 1069740463 - .long 1879620343 - .long 1022653642 - .long 4268263680 - .long 1069757030 - .long 3039077047 - .long 1022252545 - .long 2067062272 - .long 1069773603 - .long 4190670677 - .long 1020725863 - .long 4225828096 - .long 1069790180 - .long 1998567321 - .long 1022014385 - .long 2452507136 - .long 1069806763 - .long 1511628873 - .long 1021900300 - .long 1340746240 - .long 1069823351 - .long 788367341 - .long 1022726208 - .long 1190035456 - .long 1069839944 - .long 3856337230 - .long 1021834118 - .long 2300688384 - .long 1069856542 - .long 3211396579 - .long 1022621365 - .long 678886400 - .long 1069873146 - .long 4001011887 - .long 1022042646 - .long 921594112 - .long 1069889755 - .long 557811968 - .long 1023065533 - .long 3331668992 - .long 1069906369 - .long 1877060679 - .long 1022419742 - .long 3917875200 - .long 1069922989 - .long 1181055171 - .long 1022752712 - .long 2984829696 - .long 1069939615 - .long 4294526932 - .long 1021499988 - .long 838049024 - .long 1069956247 - .long 3658081878 - .long 1022957952 - .long 2078928384 - .long 1069972884 - .long 820353701 - .long 1019391107 - .long 2719854336 - .long 1069989527 - .long 1644022489 - .long 1023378240 - .long 3069117696 - .long 1070006176 - .long 2771393702 - .long 1019319954 - .long 3435962368 - .long 1070022831 - .long 3876394145 - .long 1023024433 - .long 4130595328 - .long 1070039492 - .long 1630447748 - .long 1021465882 - .long 1169236224 - .long 1070056160 - .long 2828355997 - .long 1020458120 - .long 3453997312 - .long 1070072833 - .long 164091641 - .long 1020388279 - .long 2708127744 - .long 1070089513 - .long 3036550223 - .long 1023328684 - .long 3540797696 - .long 1070106199 - .long 3710949463 - .long 1022568805 - .long 1972276736 - .long 1070122892 - .long 3885277950 - .long 1019761674 - .long 2613815552 - .long 1070139591 - .long 2764165077 - .long 1022921023 - .long 1487791616 - .long 1070156297 - .long 1330644769 - .long 1023162679 - .long 3207593472 - .long 1070173009 - .long 3911007221 - .long 1022993496 - .long 3797764608 - .long 1070189728 - .long 979712598 - .long 1022554580 - .long 3578920448 - .long 1070206454 - .long 2825738223 - .long 1020223708 - .long 2872795648 - .long 1070223187 - .long 392451124 - .long 1022666279 - .long 2002258432 - .long 1070239927 - .long 3730407632 - .long 1023148291 - .long 1291326464 - .long 1070256674 - .long 3723802980 - .long 1022514089 - .long 1065180928 - .long 1070273428 - .long 2635617463 - .long 1022654470 - .long 1650181632 - .long 1070290189 - .long 2061982883 - .long 1022853411 - .long 3373882880 - .long 1070306957 - .long 319732785 - .long 1022017175 - .long 2270081280 - .long 1070323733 - .long 2237757411 - .long 1023064087 - .long 2963732736 - .long 1070340516 - .long 468839165 - .long 1023293774 - .long 1491099904 - .long 1070357307 - .long 1502657946 - .long 1021533479 - .long 2479636480 - .long 1070374105 - .long 482913562 - .long 1021986286 - .long 1968133632 - .long 1070390911 - .long 3281474337 - .long 1022646400 - .long 291639040 - .long 1070407725 - .long 2453320259 - .long 1022812423 - .long 2081472512 - .long 1070424546 - .long 2939989570 - .long 1023091888 - .long 3380340480 - .long 1070441375 - .long 2850707499 - .long 1021921109 - .long 232287488 - .long 1070458213 - .long 3674625342 - .long 1020725130 - .long 1567614208 - .long 1070475058 - .long 9347334 - .long 1022024009 - .long 3433091072 - .long 1070491911 - .long 282524999 - .long 1021433523 - .long 1876877312 - .long 1070508773 - .long 3470449440 - .long 1019309721 - .long 1538472192 - .long 1070525643 - .long 2089486825 - .long 1019698916 - .long 2763830784 - .long 1070542521 - .long 443498115 - .long 1020505194 - .long 1605381632 - .long 1070559408 - .long 3018871601 - .long 1022869913 - .long 2706946048 - .long 1070576303 - .long 3936260892 - .long 1023175875 - .long 2123887360 - .long 1070593207 - .long 2994220655 - .long 1022825948 - .long 104015104 - .long 1070603108 - .long 335054493 - .long 1023441853 - .long 2904568832 - .long 1070615800 - .long 1451215633 - .long 1023853857 - .long 3456197120 - .long 1070632739 - .long 436334733 - .long 1024026432 - .long 252452352 - .long 1070649697 - .long 34596167 - .long 1024031396 - .long 3328018432 - .long 1070666672 - .long 2644547073 - .long 1024296758 - .long 1255829248 - .long 1070683667 - .long 552832586 - .long 1023763122 - .long 4097058560 - .long 1070700680 - .long 1955640623 - .long 1021394654 - .long 451770112 - .long 1070717714 - .long 3428903777 - .long 1022941142 - .long 408920832 - .long 1070734767 - .long 165503263 - .long 1023894958 - .long 1186960640 - .long 1070751840 - .long 435826450 - .long 1024026134 - .long 19078656 - .long 1070768934 - .long 1834169749 - .long 1022899284 - .long 2743490304 - .long 1070786048 - .long 494581074 - .long 1018818479 - .long 2328961024 - .long 1070803184 - .long 2987908834 - .long 1022581110 - .long 350011392 - .long 1070820342 - .long 240771184 - .long 1024143083 - .long 2692326912 - .long 1070837521 - .long 666056837 - .long 1022394776 - .long 2373274368 - .long 1070854723 - .long 2484337770 - .long 1024228156 - .long 1017131520 - .long 1070871948 - .long 3285648279 - .long 1024025789 - .long 265558272 - .long 1070889196 - .long 392241896 - .long 1024252809 - .long 1778008064 - .long 1070906467 - .long 1536107943 - .long 1023949300 - .long 2937184768 - .long 1070923762 - .long 3541062251 - .long 1019448646 - .long 1144442880 - .long 1070941082 - .long 3691683781 - .long 1022123948 - .long 2410165504 - .long 1070958426 - .long 1804181960 - .long 1023945221 - .long 4174350848 - .long 1070975795 - .long 2016094861 - .long 1021716585 - .long 3897012480 - .long 1070993190 - .long 175294410 - .long 1023703404 - .long 3353623040 - .long 1071010611 - .long 167973242 - .long 1023240839 - .long 45671168 - .long 1071028059 - .long 2166856113 - .long 1021565413 - .long 86063872 - .long 1071045533 - .long 2676254727 - .long 1023985299 - .long 1019772672 - .long 1071063034 - .long 989043593 - .long 1021549587 - .long 414297344 - .long 1071080563 - .long 3960972046 - .long 1024307251 - .long 155173120 - .long 1071098120 - .long 1830919291 - .long 1021592251 - .long 2151562240 - .long 1071115705 - .long 405408666 - .long 1023423128 - .long 4041854720 - .long 1071133319 - .long 2043497827 - .long 1024411503 - .long 3489224192 - .long 1071150963 - .long 3072215864 - .long 1022698635 - .long 2477196288 - .long 1071168637 - .long 1812195139 - .long 1022689192 - .long 3015298816 - .long 1071186341 - .long 764841969 - .long 1021027331 - .long 2844731136 - .long 1071204076 - .long 2878117321 - .long 1019116513 - .long 4028950528 - .long 1071221842 - .long 698911452 - .long 1023265602 - .long 69441536 - .long 1071239641 - .long 3253467847 - .long 1020795075 - .long 1676209920 - .long 1071257471 - .long 4272431167 - .long 1022873982 - .long 2408752384 - .long 1071275334 - .long 648519100 - .long 1024385717 - .long 151623680 - .long 1071293231 - .long 345257017 - .long 1019561408 - .long 1410154240 - .long 1071311161 - .long 197863993 - .long 1023224207 - .long 4131351552 - .long 1071329125 - .long 2620801789 - .long 1024411169 - .long 1999664384 - .long 1071347125 - .long 3952692616 - .long 1024168086 - .long 1617668864 - .long 1071365160 - .long 3019889809 - .long 1021907692 - .long 1032074240 - .long 1071383231 - .long 59469899 - .long 1023656194 - .long 2619492096 - .long 1071401338 - .long 1417526820 - .long 1021457783 - .long 202429440 - .long 1071419483 - .long 2927667935 - .long 1019175447 - .long 525044224 - .long 1071437665 - .long 38166811 - .long 1023981879 - .long 1779258880 - .long 1071455885 - .long 481252500 - .long 1023310234 - .long 2195673600 - .long 1071474144 - .long 3962395981 - .long 1021339088 - .long 44573696 - .long 1071492443 - .long 3936281395 - .long 1023014829 - .long 2226905344 - .long 1071510781 - .long 1515320476 - .long 1024320623 - .long 2800512512 - .long 1071529160 - .long 1225403697 - .long 1021081846 - .long 161113600 - .long 1071547581 - .long 3064809733 - .long 1024173917 - .long 1338410240 - .long 1071566043 - .long 2027604973 - .long 1024362526 - .long 522433280 - .long 1071584548 - .long 2055171723 - .long 1023858825 - .long 539595776 - .long 1071603096 - .long 3868820135 - .long 1022936424 - .long 4264017664 - .long 1071621687 - .long 3228065145 - .long 1023479578 - .long 1733924096 - .long 1071640324 - .long 3511934475 - .long 1022496355 - .long 108880384 - .long 1071651839 - .long 615880967 - .long 1023519706 - .long 3517856512 - .long 1071661202 - .long 3113108559 - .long 1025190289 - .long 4043153152 - .long 1071670589 - .long 1571836218 - .long 1023106116 - .long 3251299072 - .long 1071680000 - .long 3444076102 - .long 1022187841 - .long 2736921600 - .long 1071689435 - .long 272771483 - .long 1025095280 - .long 3897698560 - .long 1071703633 - .long 2075390188 - .long 1022489022 - .long 3209485056 - .long 1071722652 - .long 1438094065 - .long 1021844944 - .long 3781432064 - .long 1071741774 - .long 1675017145 - .long 1024143828 - .long 2684184064 - .long 1071761003 - .long 2259963753 - .long 1024731393 - .long 1840489728 - .long 1071780342 - .long 3372883597 - .long 1023431408 - .long 3764087808 - .long 1071799794 - .long 3307523102 - .long 1024485788 - .long 3006232320 - .long 1071819364 - .long 3088971966 - .long 1025213251 - .long 3374881280 - .long 1071839055 - .long 834437749 - .long 1025236452 - .long 797284864 - .long 1071858872 - .long 3122663941 - .long 1025320473 - .long 545765120 - .long 1071878818 - .long 826539625 - .long 1022450955 - .long 107562240 - .long 1071898898 - .long 339584600 - .long 1022481255 - .long 2123649024 - .long 1071919116 - .long 3912959833 - .long 1024321009 - .long 1562385664 - .long 1071939478 - .long 2846067230 - .long 1023343981 - .long 2963085824 - .long 1071959988 - .long 954548627 - .long 1021475211 - .long 3325550592 - .long 1071980652 - .long 3459651155 - .long 1025305573 - .long 775752448 - .long 1072001476 - .long 3582746667 - .long 1023859460 - .long 3238590720 - .long 1072022464 - .long 634636162 - .long 1024472353 - .long 2758801920 - .long 1072043624 - .long 3078216319 - .long 1025304516 - .long 1370319104 - .long 1072064962 - .long 2570569078 - .long 1025099442 - .long 2615805184 - .long 1072086484 - .long 3729933412 - .long 1024605112 - .long 3077336576 - .long 1072108198 - .long 1948916066 - .long 1024781603 - .long 1099528192 - .long 1072130112 - .long 3139143157 - .long 1023729360 - .long 1231903232 - .long 1072152233 - .long 1349513477 - .long 1024737515 - .long 1507504128 - .long 1072174570 - .long 3484516322 - .long 1024000959 - .long 2214659840 - .long 1072197132 - .long 2563820917 - .long 1025225535 - .long 1804739840 - .long 1072219929 - .long 760038746 - .long 1024482855 - .long 1413746688 - .long 1072242971 - .long 3401734714 - .long 1025129838 - .long 821409536 - .long 1072266269 - .long 3729772551 - .long 1025484796 - .long 3031825664 - .long 1072289834 - .long 122256749 - .long 1024752594 - .long 1710784256 - .long 1072313680 - .long 1518205483 - .long 1024724809 - .long 3025265152 - .long 1072337819 - .long 409951989 - .long 1022835555 - .long 287769088 - .long 1072362267 - .long 800355594 - .long 1022484850 - .long 198179840 - .long 1072387038 - .long 3502926213 - .long 1024209373 - .long 1909130496 - .long 1072412149 - .long 3064694319 - .long 1025380823 - .long 1941732096 - .long 1072437619 - .long 4112930390 - .long 1024294679 - .long 3492010496 - .long 1072463467 - .long 2684918107 - .long 1023220233 - .long 81959680 - .long 1072489716 - .long 220021366 - .long 1020635131 - .long 2297837056 - .long 1072516387 - .long 4027683826 - .long 1021041185 - .long 270404096 - .long 1072543508 - .long 2012766065 - .long 1021780753 - .long 3667376896 - .long 1072571105 - .long 2727981522 - .long 1023009874 - .long 330400256 - .long 1072599212 - .long 2940017003 - .long 1025393439 - .long 1119293952 - .long 1072627861 - .long 1608550416 - .long 1022675612 - .long 3536155904 - .long 1072657091 - .long 349665778 - .long 1025156751 - .long 3078046720 - .long 1072686946 - .long 2016159996 - .long 1022193169 - .long 455228416 - .long 1072705361 - .long 1908539328 - .long 1026126332 - .long 1871505664 - .long 1072720988 - .long 2784700894 - .long 1025922277 - .long 1630994432 - .long 1072737010 - .long 361107678 - .long 1022887244 - .long 2084558336 - .long 1072753462 - .long 2642784509 - .long 1072689083 - .long 1514442531 - .long 1072688953 - .long 333108933 - .long 1072688821 - .long 3392112024 - .long 1072688686 - .long 2099852862 - .long 1072688550 - .long 749609004 - .long 1072688412 - .long 3634632596 - .long 1072688271 - .long 2163248461 - .long 1072688129 - .long 628657846 - .long 1072687985 - .long 3324036511 - .long 1072687838 - .long 1657632815 - .long 1072687690 - .long 4217538760 - .long 1072687539 - .long 2411951597 - .long 1072687387 - .long 533944872 - .long 1072687233 - .long 2876566508 - .long 1072687076 - .long 847936891 - .long 1072686918 - .long 3036019913 - .long 1072686757 - .long 848884575 - .long 1072686595 - .long 2874443326 - .long 1072686430 - .long 520713666 - .long 1072686264 - .long 2375556481 - .long 1072686095 - .long 4141904948 - .long 1072685924 - .long 1522666382 - .long 1072685752 - .long 3105624104 - .long 1072685577 - .long 298666327 - .long 1072685401 - .long 1689524500 - .long 1072685222 - .long 2981002200 - .long 1072685041 - .long 4170844284 - .long 1072684858 - .long 961802263 - .long 1072684674 - .long 1941503454 - .long 1072684487 - .long 2812647170 - .long 1072684298 - .long 3572873869 - .long 1072684107 - .long 4219797823 - .long 1072683914 - .long 456039788 - .long 1072683720 - .long 869096151 - .long 1072683523 - .long 1161535119 - .long 1072683324 - .long 1330865866 - .long 1072683123 - .long 1374571204 - .long 1072682920 - .long 1290107538 - .long 1072682715 - .long 1074904836 - .long 1072682508 - .long 726366587 - .long 1072682299 - .long 241869763 - .long 1072682088 - .long 3913732079 - .long 1072681874 - .long 3149342765 - .long 1072681659 - .long 2240966306 - .long 1072681442 - .long 1185873216 - .long 1072681223 - .long 4276274591 - .long 1072681001 - .long 2919452883 - .long 1072680778 - .long 1407565635 - .long 1072680553 - .long 4032743551 - .long 1072680325 - .long 2202188565 - .long 1072680096 - .long 207977577 - .long 1072679865 - .long 2342160518 - .long 1072679631 - .long 11858423 - .long 1072679396 - .long 1804034453 - .long 1072679158 - .long 3420722787 - .long 1072678918 - .long 563930456 - .long 1072678677 - .long 1820539192 - .long 1072678433 - .long 2892501606 - .long 1072678187 - .long 3776710320 - .long 1072677939 - .long 175063337 - .long 1072677690 - .long 674333171 - .long 1072677438 - .long 976363026 - .long 1072677184 - .long 1077935934 - .long 1072676928 - .long 1921075490 - .long 1072676540 - .long 881493302 - .long 1072676016 - .long 3275752439 - .long 1072675483 - .long 486855588 - .long 1072674943 - .long 1077229111 - .long 1072674394 - .long 723950308 - .long 1072673837 - .long 3693582199 - .long 1072673271 - .long 1367335316 - .long 1072672698 - .long 2305837020 - .long 1072672116 - .long 2184358641 - .long 1072671526 - .long 972682840 - .long 1072670928 - .long 2935101762 - .long 1072670321 - .long 3745513263 - .long 1072669706 - .long 3372320886 - .long 1072669083 - .long 1783464620 - .long 1072668452 - .long 3241386215 - .long 1072667812 - .long 3418125284 - .long 1072667164 - .long 2280219148 - .long 1072666508 - .long 4088700758 - .long 1072665843 - .long 219227400 - .long 1072665171 - .long 3521816918 - .long 1072664489 - .long 1076205279 - .long 1072663800 - .long 1436484616 - .long 1072663102 - .long 271362610 - .long 1072662396 - .long 1838996688 - .long 1072661681 - .long 1807122518 - .long 1072660958 - .long 137953542 - .long 1072660227 - .long 1088178584 - .long 1072659487 - .long 324057537 - .long 1072658739 - .long 2101288076 - .long 1072657982 - .long 2085133974 - .long 1072657217 - .long 235324451 - .long 1072656444 - .long 806051592 - .long 1072655662 - .long 3756033140 - .long 1072654871 - .long 453542543 - .long 1072654073 - .long 3741177327 - .long 1072653265 - .long 691216109 - .long 1072652450 - .long 4145223372 - .long 1072651625 - .long 1174439091 - .long 1072650793 - .long 324416139 - .long 1072649952 - .long 1550246310 - .long 1072649102 - .long 511524674 - .long 1072648244 - .long 1457248482 - .long 1072647377 - .long 45944955 - .long 1072646502 - .long 525537397 - .long 1072645618 - .long 2848440188 - .long 1072644725 - .long 2671555633 - .long 1072643824 - .long 4241172637 - .long 1072642914 - .long 3213094278 - .long 1072641996 - .long 3832503688 - .long 1072641069 - .long 1754091534 - .long 1072640134 - .long 1221921804 - .long 1072639190 - .long 2184526489 - .long 1072638237 - .long 294902089 - .long 1072637276 - .long 4090375270 - .long 1072636305 - .long 632860906 - .long 1072635327 - .long 2753498702 - .long 1072634339 - .long 1808009252 - .long 1072633343 - .long 2036428672 - .long 1072632338 - .long 3383235626 - .long 1072631324 - .long 1497347484 - .long 1072630302 - .long 617018317 - .long 1072629271 - .long 684933058 - .long 1072628231 - .long 1643170798 - .long 1072627182 - .long 3011066360 - .long 1072625592 - .long 957158713 - .long 1072623442 - .long 1390907941 - .long 1072621256 - .long 3819155270 - .long 1072619034 - .long 3443571196 - .long 1072616777 - .long 4045412458 - .long 1072614484 - .long 805503923 - .long 1072612156 - .long 1778922015 - .long 1072609791 - .long 2125033665 - .long 1072607390 - .long 1287203863 - .long 1072604953 - .long 2992629568 - .long 1072602479 - .long 2367267127 - .long 1072599969 - .long 3115526047 - .long 1072597422 - .long 340219539 - .long 1072594839 - .long 2017215719 - .long 1072592218 - .long 3225443424 - .long 1072589560 - .long 3326565673 - .long 1072586865 - .long 1669811211 - .long 1072584133 - .long 1886735022 - .long 1072581363 - .long 3301071171 - .long 1072578555 - .long 928514283 - .long 1072575710 - .long 2656364059 - .long 1072572826 - .long 3473490507 - .long 1072569904 - .long 2649965606 - .long 1072566944 - .long 3736819052 - .long 1072563945 - .long 1680885175 - .long 1072560908 - .long 4413771 - .long 1072557832 - .long 2214869753 - .long 1072554716 - .long 3214725184 - .long 1072551561 - .long 2186079903 - .long 1072548367 - .long 2590372131 - .long 1072545133 - .long 3578146079 - .long 1072541859 - .long 4283712755 - .long 1072538545 - .long 3824834510 - .long 1072535191 - .long 1302400298 - .long 1072531797 - .long 95058636 - .long 1072528362 - .long 3563906063 - .long 1072524885 - .long 2167230730 - .long 1072521368 - .long 3524918334 - .long 1072517809 - .long 2353304918 - .long 1072514209 - .long 1939625839 - .long 1072510567 - .long 1256714581 - .long 1072506883 - .long 3552525848 - .long 1072503156 - .long 3464809522 - .long 1072499387 - .long 4200542593 - .long 1072495575 - .long 355609124 - .long 1072491721 - .long 3684139099 - .long 1072487822 - .long 148355918 - .long 1072483881 - .long 1457689242 - .long 1072479895 - .long 2118591596 - .long 1072475865 - .long 908848089 - .long 1072471791 - .long 877032689 - .long 1072467672 - .long 752012304 - .long 1072463508 - .long 3532301749 - .long 1072459298 - .long 3600563221 - .long 1072455043 - .long 3902857084 - .long 1072450742 - .long 3063101036 - .long 1072446395 - .long 3972344374 - .long 1072442001 - .long 903183549 - .long 1072437561 - .long 983892938 - .long 1072433073 - .long 2722858568 - .long 1072428537 - .long 302790515 - .long 1072423954 - .long 759811057 - .long 1072419322 - .long 2507809922 - .long 1072414641 - .long 2388408813 - .long 1072407528 - .long 2084492942 - .long 1072397870 - .long 2435703301 - .long 1072388010 - .long 1935433360 - .long 1072377945 - .long 2742047290 - .long 1072367671 - .long 2053284205 - .long 1072357185 - .long 657783367 - .long 1072346483 - .long 2893664841 - .long 1072335560 - .long 3718906405 - .long 1072324413 - .long 1547896303 - .long 1072313038 - .long 2494058440 - .long 1072301429 - .long 3133238742 - .long 1072289582 - .long 3327000086 - .long 1072277492 - .long 1860667274 - .long 1072265154 - .long 665340747 - .long 1072252562 - .long 443347841 - .long 1072239710 - .long 581282618 - .long 1072226592 - .long 3349780465 - .long 1072213201 - .long 914217606 - .long 1072199532 - .long 989797661 - .long 1072185576 - .long 945436416 - .long 1072171326 - .long 549291300 - .long 1072156774 - .long 1814636389 - .long 1072141911 - .long 239092858 - .long 1072126729 - .long 1794680724 - .long 1072111217 - .long 1241534678 - .long 1072095366 - .long 3366566214 - .long 1072079164 - .long 1244090828 - .long 1072062601 - .long 1708448120 - .long 1072045663 - .long 3544260650 - .long 1072028337 - .long 1402741403 - .long 1072010610 - .long 2551936888 - .long 1071992465 - .long 617669739 - .long 1071973887 - .long 794002186 - .long 1071954857 - .long 2021237693 - .long 1071935356 - .long 540450384 - .long 1071915364 - .long 1920555537 - .long 1071894857 - .long 2879585206 - .long 1071873811 - .long 3000237455 - .long 1071852199 - .long 3352974346 - .long 1071829991 - .long 569629937 - .long 1071807155 - .long 2077237208 - .long 1071783653 - .long 2284891805 - .long 1071759446 - .long 1226651784 - .long 1071734489 - .long 1102047405 - .long 1071708731 - .long 2009896384 - .long 1071682115 - .long 927419082 - .long 1071654577 - .long 85010366 - .long 1071607413 - .long 696431025 - .long 1071548180 - .long 2611410541 - .long 1071486585 - .long 2612593658 - .long 1071422396 - .long 3548155306 - .long 1071355336 - .long 3887997484 - .long 1071285073 - .long 244854763 - .long 1071211202 - .long 4214445648 - .long 1071133216 - .long 2303966727 - .long 1071050478 - .long 3991040013 - .long 1070962152 - .long 3126952278 - .long 1070867118 - .long 1817448378 - .long 1070763804 - .long 1793814864 - .long 1070649884 - .long 3507224072 - .long 1070447193 - .long 4027609105 - .long 1070148772 - .long 577507993 - .long 1069779414 - .long 2310232419 - .long 1068931829 - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 4294950912 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 4160749568 - .long 4294967295 - .long 4160749568 - .long 4294967295 - .long 0 - .long 2147483584 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 856972295 - .long 1016178214 - .long 1413754136 - .long 1073291771 - .type static_const_table,@object - .size static_const_table,6096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinf_wmt.S deleted file mode 100644 index 40bb17db58..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinf_wmt.S +++ /dev/null @@ -1,514 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin asinf - .text - .align 16,0x90 - .globl asinf -asinf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - cvtps2pd %xmm0, %xmm1 - movd %xmm0, %eax - movsd 1040(%ebx), %xmm3 - movl $2139095040, %ecx - movl $8388608, %edx - andl %eax, %ecx - subl $1015021568, %ecx - cmpl $50331648, %ecx - jae .L_2TAG_PACKET_0.0.3 - mulsd %xmm1, %xmm1 - cvtps2pd %xmm0, %xmm2 - shrl $23, %ecx - addl $1, %ecx - shrl %cl, %edx - subsd %xmm1, %xmm3 - orl %edx, %eax - negl %edx - andl %edx, %eax - movd %eax, %xmm4 - sqrtsd %xmm3, %xmm3 - addl %edx, %edx - andl $16777215, %edx - andl %edx, %eax - negl %ecx - addl $24, %ecx - orl $8388608, %eax - shrl %cl, %eax - addl %eax, %eax - movsd (%ebx,%eax,8), %xmm5 - psrlq $31, %xmm0 - movsd 8(%ebx,%eax,8), %xmm1 - psllq $63, %xmm0 - cvtps2pd %xmm4, %xmm4 - mulsd %xmm5, %xmm2 - orpd %xmm1, %xmm0 - movsd 1056(%ebx), %xmm5 - movsd 1072(%ebx), %xmm1 - mulsd %xmm3, %xmm4 - movsd 1088(%ebx), %xmm3 - subsd %xmm4, %xmm2 - pshufd $68, %xmm2, %xmm4 - mulsd %xmm2, %xmm2 - mulsd %xmm4, %xmm5 - mulsd %xmm4, %xmm1 - mulsd %xmm4, %xmm3 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - addsd %xmm5, %xmm3 - addsd %xmm1, %xmm4 - mulsd %xmm3, %xmm2 - addsd %xmm4, %xmm0 - addsd %xmm2, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - jge .L_2TAG_PACKET_2.0.3 - addl $1015021568, %ecx - cmpl $964689920, %ecx - jb .L_2TAG_PACKET_3.0.3 - movsd 1072(%ebx), %xmm2 - movapd %xmm1, %xmm0 - movsd 1088(%ebx), %xmm3 - mulsd %xmm1, %xmm1 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm1 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - mulsd %xmm3, %xmm1 - addsd %xmm2, %xmm0 - addsd %xmm0, %xmm1 - cvtpd2ps %xmm1, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - movsd 1104(%ebx), %xmm5 - mulsd %xmm5, %xmm1 - cvtpd2ps %xmm1, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - addl %eax, %eax - cmpl $2130706432, %eax - jne .L_2TAG_PACKET_4.0.3 - movapd 1024(%ebx), %xmm0 - psrlq $63, %xmm1 - psllq $63, %xmm1 - orpd %xmm1, %xmm0 - cvtpd2ps %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_4.0.3: - cmpl $-16777216, %eax - ja .L_2TAG_PACKET_5.0.3 - xorps %xmm0, %xmm0 - movl $2139095040, %edx - movd %edx, %xmm1 - mulss %xmm1, %xmm0 - movss %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $62, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_5.0.3: - addss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_1.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type asinf,@function - .size asinf,.-asinf - .data -# -- End asinf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4290772864 - .long 1072693183 - .long 2864569868 - .long 1065353226 - .long 3955135328 - .long 1072692671 - .long 152932388 - .long 1066926224 - .long 1671525387 - .long 1072691647 - .long 2415589551 - .long 1067712845 - .long 2799290704 - .long 1072690109 - .long 3864800403 - .long 1068237715 - .long 2477707161 - .long 1072688057 - .long 725093587 - .long 1068630990 - .long 2787892653 - .long 1072685489 - .long 2536557765 - .long 1068893940 - .long 4138691444 - .long 1072682403 - .long 62552236 - .long 1069157247 - .long 941089134 - .long 1072678798 - .long 165833141 - .long 1069420976 - .long 3045724825 - .long 1072674669 - .long 2611259588 - .long 1069616357 - .long 1338788729 - .long 1072670015 - .long 2616012614 - .long 1069748746 - .long 2049955026 - .long 1072664831 - .long 11397492 - .long 1069881450 - .long 922854000 - .long 1072659114 - .long 2157235516 - .long 1070014503 - .long 326738075 - .long 1072652859 - .long 2788743992 - .long 1070147943 - .long 589211462 - .long 1072646061 - .long 3920198733 - .long 1070281807 - .long 4203970809 - .long 1072638714 - .long 3416546056 - .long 1070416134 - .long 2847908959 - .long 1072630814 - .long 4071425947 - .long 1070550963 - .long 3041144817 - .long 1072622353 - .long 623140044 - .long 1070641216 - .long 254499552 - .long 1072613325 - .long 307519074 - .long 1070709195 - .long 247322296 - .long 1072603721 - .long 2945179265 - .long 1070777488 - .long 1734768715 - .long 1072593533 - .long 3301227932 - .long 1070846119 - .long 512284341 - .long 1072582753 - .long 148694291 - .long 1070915112 - .long 2150320922 - .long 1072571370 - .long 959165711 - .long 1070984490 - .long 307214965 - .long 1072559375 - .long 862254873 - .long 1071054280 - .long 2261822985 - .long 1072546755 - .long 303820077 - .long 1071124509 - .long 2878424532 - .long 1072533499 - .long 1279667396 - .long 1071195205 - .long 1489389340 - .long 1072519594 - .long 3626865975 - .long 1071266398 - .long 1561634021 - .long 1072505025 - .long 1381197995 - .long 1071338121 - .long 1731593006 - .long 1072489777 - .long 685577004 - .long 1071410406 - .long 3972360633 - .long 1072473833 - .long 3426639945 - .long 1071483288 - .long 231016948 - .long 1072457177 - .long 3858097791 - .long 1071556806 - .long 1951983052 - .long 1072439787 - .long 2522397359 - .long 1071631000 - .long 806900869 - .long 1072421644 - .long 1565390008 - .long 1071675292 - .long 2352519275 - .long 1072402724 - .long 2655228975 - .long 1071713130 - .long 3752547712 - .long 1072383003 - .long 3066292715 - .long 1071751375 - .long 1444584515 - .long 1072362455 - .long 933027783 - .long 1071790054 - .long 2960036461 - .long 1072341049 - .long 3589869088 - .long 1071829194 - .long 4214933698 - .long 1072318754 - .long 2973206241 - .long 1071868828 - .long 957213757 - .long 1072295536 - .long 2756129430 - .long 1071908989 - .long 4263431727 - .long 1072271354 - .long 2767348050 - .long 1071949714 - .long 4197201246 - .long 1072246168 - .long 874994578 - .long 1071991044 - .long 1821133236 - .long 1072219931 - .long 3810301671 - .long 1072033022 - .long 2102004657 - .long 1072192590 - .long 4064603671 - .long 1072075699 - .long 1957725919 - .long 1072164088 - .long 276553332 - .long 1072119130 - .long 3365782140 - .long 1072134360 - .long 1120469626 - .long 1072163374 - .long 4096932877 - .long 1072103334 - .long 4291572900 - .long 1072208500 - .long 177757517 - .long 1072070929 - .long 2376322938 - .long 1072254587 - .long 4029755771 - .long 1072037049 - .long 3060434712 - .long 1072301721 - .long 497611374 - .long 1072001591 - .long 4010165530 - .long 1072350003 - .long 3306304935 - .long 1071964429 - .long 388249839 - .long 1072399550 - .long 539435036 - .long 1071925423 - .long 165779504 - .long 1072450495 - .long 2497352827 - .long 1071884403 - .long 1343287957 - .long 1072502997 - .long 884164153 - .long 1071841172 - .long 1828157318 - .long 1072557245 - .long 3653025069 - .long 1071795489 - .long 2128712154 - .long 1072613466 - .long 3056817116 - .long 1071747064 - .long 1489283833 - .long 1072671938 - .long 1840990109 - .long 1071695534 - .long 2059782629 - .long 1072713127 - .long 3931971716 - .long 1071636206 - .long 1027831985 - .long 1072745180 - .long 3187721039 - .long 1071517691 - .long 3329524973 - .long 1072779038 - .long 3649449467 - .long 1071389244 - .long 2110923290 - .long 1072815090 - .long 4055205277 - .long 1071248617 - .long 2992048670 - .long 1072853879 - .long 2715653706 - .long 1071092488 - .long 419466969 - .long 1072896214 - .long 2030806678 - .long 1070915559 - .long 1069790871 - .long 1072943387 - .long 2084655462 - .long 1070708358 - .long 3811755941 - .long 1072997722 - .long 3549768261 - .long 1070304457 - .long 884757291 - .long 1073064302 - .long 4261330719 - .long 1069543419 - .long 3631318613 - .long 1073160613 - .long 1413754136 - .long 1073291771 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 3067833783 - .long 1067899757 - .long 0 - .long 0 - .long 1431655765 - .long 1069897045 - .long 0 - .long 0 - .long 858993459 - .long 1068708659 - .long 0 - .long 0 - .long 1 - .long 1072693248 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,1120 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinh_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinh_wmt.S deleted file mode 100644 index 0a8baf7567..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinh_wmt.S +++ /dev/null @@ -1,1860 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinh_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin asinh - .text - .align 16,0x90 - .globl asinh -asinh: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movapd %xmm0, %xmm5 - movsd %xmm0, 8(%esp) - pand 240(%ebx), %xmm0 - pextrw $3, %xmm0, %eax - cmpl $32752, %eax - jge .L_2TAG_PACKET_0.0.2 - cmpl $16304, %eax - jle .L_2TAG_PACKET_1.0.2 - pand 144(%ebx), %xmm5 - movq %xmm5, (%esp) - cmpl $16403, %eax - jle .L_2TAG_PACKET_2.0.2 - cmpl $16816, %eax - jge .L_2TAG_PACKET_3.0.2 - movq 112(%ebx), %xmm1 - movapd %xmm0, %xmm2 - mulsd %xmm0, %xmm0 - addsd 112(%ebx), %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm2, %xmm0 - paddw 256(%ebx), %xmm2 - divsd %xmm0, %xmm1 - movapd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_2.0.2: - movapd %xmm0, %xmm1 - movapd %xmm0, %xmm3 - pand 176(%ebx), %xmm0 - movapd %xmm0, %xmm2 - subsd %xmm0, %xmm1 - addsd %xmm0, %xmm3 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm3 - addsd 112(%ebx), %xmm0 - movapd %xmm3, %xmm4 - addsd %xmm0, %xmm3 - sqrtsd %xmm3, %xmm3 - movapd %xmm3, %xmm5 - pand 176(%ebx), %xmm3 - subsd %xmm3, %xmm5 - movapd %xmm3, %xmm6 - movapd %xmm3, %xmm7 - addsd %xmm3, %xmm2 - mulsd %xmm3, %xmm3 - mulsd %xmm5, %xmm6 - addsd %xmm5, %xmm7 - subsd %xmm3, %xmm0 - subsd %xmm6, %xmm0 - addsd %xmm0, %xmm4 - movapd %xmm2, %xmm0 - divsd %xmm7, %xmm4 - addsd %xmm5, %xmm4 - mulsd 96(%ebx), %xmm4 - addsd %xmm4, %xmm1 -.L_2TAG_PACKET_4.0.2: - movq 208(%ebx), %xmm3 - addsd %xmm1, %xmm0 - movapd %xmm0, %xmm5 - psrlq $41, %xmm5 - pextrw $0, %xmm5, %ecx - pand 176(%ebx), %xmm0 - subsd %xmm0, %xmm2 - addsd %xmm2, %xmm1 - pshufd $68, %xmm0, %xmm4 - pand 160(%ebx), %xmm0 - pand 192(%ebx), %xmm4 - psubd %xmm4, %xmm3 - psubw 112(%ebx), %xmm4 - psrlq $52, %xmm4 - por 112(%ebx), %xmm0 - por 128(%ebx), %xmm4 - mulsd %xmm3, %xmm1 - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_3.0.2: - shrl $4, %eax - subl $1022, %eax - movd %eax, %xmm4 - unpcklpd %xmm4, %xmm4 - movl 12(%esp), %ecx - por 128(%ebx), %xmm4 - pand 160(%ebx), %xmm0 - por 112(%ebx), %xmm0 - movapd %xmm0, %xmm1 - pand 176(%ebx), %xmm0 - subsd %xmm0, %xmm1 - shrl $9, %ecx -.L_2TAG_PACKET_5.0.2: - subpd 128(%ebx), %xmm4 - movq 80(%ebx), %xmm2 - andl $2040, %ecx - mulpd 224(%ebx), %xmm4 - mulsd 4384(%ebx,%ecx), %xmm0 - mulsd 4384(%ebx,%ecx), %xmm1 - subsd 112(%ebx), %xmm0 - movapd %xmm0, %xmm5 - addsd %xmm1, %xmm0 - movapd %xmm0, %xmm3 - unpcklpd %xmm0, %xmm0 - addpd 288(%ebx,%ecx,2), %xmm4 - movhlps %xmm4, %xmm6 - mulpd %xmm0, %xmm0 - mulsd %xmm0, %xmm2 - addpd 64(%ebx), %xmm2 - mulpd %xmm0, %xmm2 - addpd 48(%ebx), %xmm2 - mulpd %xmm0, %xmm2 - movhlps %xmm2, %xmm0 - mulsd %xmm3, %xmm0 - addsd %xmm2, %xmm0 - addsd %xmm1, %xmm0 - movsd (%esp), %xmm1 - addsd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - addsd %xmm5, %xmm0 - por %xmm1, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_1.0.2: - cmpl $15456, %eax - jle .L_2TAG_PACKET_7.0.2 - fldl 8(%esp) - fldl 8(%esp) - fmul %st(0), %st - fldl 32(%ebx) - fmul %st(1), %st - faddl 24(%ebx) - fmul %st(1), %st - faddl 16(%ebx) - fmul %st(1), %st - faddl 8(%ebx) - fmul %st(1), %st - faddl (%ebx) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_7.0.2: - andl $32752, %eax - je .L_2TAG_PACKET_8.0.2 - pextrw $3, %xmm5, %ecx - shrl $15, %ecx - fldl 8(%esp) - fldl 272(%ebx,%ecx,8) - fmul %st(0), %st - fsubrp %st, %st(1) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_8.0.2: - fldl 8(%esp) - fld %st(0) - fmul %st(1), %st - fstpl (%esp) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_0.0.2: - addsd %xmm5, %xmm5 - movq %xmm5, (%esp) - fldl (%esp) -.L_2TAG_PACKET_6.0.2: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type asinh,@function - .size asinh,.-asinh - .data -# -- End asinh - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1431655746 - .long 3217380693 - .long 858875226 - .long 1068708659 - .long 2809361764 - .long 3215383405 - .long 1241898124 - .long 1067392054 - .long 966918340 - .long 3214324669 - .long 0 - .long 0 - .long 0 - .long 3219128320 - .long 1431621855 - .long 1070945621 - .long 4294842013 - .long 3218079743 - .long 1289448124 - .long 1070176674 - .long 2077359316 - .long 3217380703 - .long 0 - .long 0 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .long 0 - .long 4294967295 - .long 0 - .long 4294967295 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 0 - .long 2145386496 - .long 0 - .long 2145386496 - .long 897137782 - .long 1038760431 - .long 4276092928 - .long 1072049730 - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 1048576 - .long 0 - .long 0 - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .long 662290844 - .long 1040545122 - .long 0 - .long 1063257089 - .long 1410206301 - .long 1039423595 - .long 0 - .long 1064833554 - .long 1576129908 - .long 1044327686 - .long 0 - .long 1065621801 - .long 3771466512 - .long 1043372267 - .long 0 - .long 1066152307 - .long 2250061482 - .long 1041942323 - .long 0 - .long 1066510009 - .long 241025648 - .long 1043818160 - .long 0 - .long 1066777242 - .long 3481293707 - .long 1039994007 - .long 0 - .long 1067045544 - .long 17391197 - .long 1042467788 - .long 0 - .long 1067281191 - .long 1429304634 - .long 1045705663 - .long 0 - .long 1067500943 - .long 2258946786 - .long 1045312243 - .long 0 - .long 1067619660 - .long 725099158 - .long 1043780790 - .long 0 - .long 1067755853 - .long 1795694751 - .long 1046370967 - .long 0 - .long 1067875476 - .long 218276363 - .long 1045874206 - .long 0 - .long 1067995528 - .long 3918058606 - .long 1045941877 - .long 0 - .long 1068133258 - .long 2029669416 - .long 1040964778 - .long 0 - .long 1068254238 - .long 111041497 - .long 1042505837 - .long 0 - .long 1068375655 - .long 9214008 - .long 1042394003 - .long 0 - .long 1068497513 - .long 3222421290 - .long 1046711220 - .long 0 - .long 1068559379 - .long 1120482910 - .long 1046024006 - .long 0 - .long 1068620754 - .long 3817590987 - .long 1046519755 - .long 0 - .long 1068682354 - .long 3431328350 - .long 1046805053 - .long 0 - .long 1068744181 - .long 3088376696 - .long 1046390788 - .long 0 - .long 1068806237 - .long 3229576382 - .long 1046428373 - .long 0 - .long 1068859611 - .long 1328753044 - .long 1046554315 - .long 0 - .long 1068922096 - .long 1186666727 - .long 1044788651 - .long 0 - .long 1068984815 - .long 603190068 - .long 1044621365 - .long 0 - .long 1069047769 - .long 1647019864 - .long 1045911122 - .long 0 - .long 1069101918 - .long 4200935885 - .long 1044407410 - .long 0 - .long 1069165314 - .long 3581720604 - .long 1046840144 - .long 0 - .long 1069219844 - .long 2217841072 - .long 1046325234 - .long 0 - .long 1069283688 - .long 1963222525 - .long 1047002562 - .long 0 - .long 1069338605 - .long 2828272122 - .long 1046012177 - .long 0 - .long 1069393703 - .long 3730942205 - .long 1046476867 - .long 0 - .long 1069458213 - .long 3166604115 - .long 1047518079 - .long 0 - .long 1069513705 - .long 2095461845 - .long 1046790089 - .long 0 - .long 1069558451 - .long 322388698 - .long 1046865736 - .long 0 - .long 1069586382 - .long 2407253617 - .long 1047545084 - .long 0 - .long 1069619086 - .long 3437791416 - .long 1047490483 - .long 0 - .long 1069647220 - .long 2693469775 - .long 1045625134 - .long 0 - .long 1069675449 - .long 1454696571 - .long 1045327327 - .long 0 - .long 1069703773 - .long 1940756848 - .long 1043926274 - .long 0 - .long 1069732193 - .long 2244096130 - .long 1047717922 - .long 0 - .long 1069760709 - .long 2856509870 - .long 1047123452 - .long 0 - .long 1069789323 - .long 116200689 - .long 1043361536 - .long 0 - .long 1069813243 - .long 4018367049 - .long 1048385867 - .long 0 - .long 1069842036 - .long 3162755613 - .long 1048496333 - .long 0 - .long 1069870929 - .long 2730655796 - .long 1048315252 - .long 0 - .long 1069899922 - .long 892380602 - .long 1046868829 - .long 0 - .long 1069929016 - .long 3139480334 - .long 1046190510 - .long 0 - .long 1069953338 - .long 1886171545 - .long 1048270714 - .long 0 - .long 1069982617 - .long 2203106387 - .long 1048291228 - .long 0 - .long 1070007095 - .long 659271154 - .long 1044549473 - .long 0 - .long 1070036564 - .long 377790372 - .long 1045759361 - .long 0 - .long 1070066136 - .long 1269824164 - .long 1047357396 - .long 0 - .long 1070090859 - .long 1643831617 - .long 1048231604 - .long 0 - .long 1070115655 - .long 57265969 - .long 1047663307 - .long 0 - .long 1070145508 - .long 2640032722 - .long 1046479978 - .long 0 - .long 1070170467 - .long 2420992102 - .long 1043079769 - .long 0 - .long 1070200516 - .long 2711573521 - .long 1045731911 - .long 0 - .long 1070225639 - .long 1973048145 - .long 1048077010 - .long 0 - .long 1070250837 - .long 4093691059 - .long 1046627963 - .long 0 - .long 1070276112 - .long 4182783767 - .long 1047690348 - .long 0 - .long 1070306542 - .long 2883525439 - .long 1048055018 - .long 0 - .long 1070331985 - .long 3917130655 - .long 1046818760 - .long 0 - .long 1070357506 - .long 2320146059 - .long 1048132455 - .long 0 - .long 1070383104 - .long 3464331364 - .long 1047738634 - .long 0 - .long 1070408781 - .long 674627443 - .long 1046468986 - .long 0 - .long 1070434537 - .long 2152289494 - .long 1046214007 - .long 0 - .long 1070460372 - .long 37897452 - .long 1048575202 - .long 0 - .long 1070486286 - .long 1899477568 - .long 1044793529 - .long 0 - .long 1070512282 - .long 2077140689 - .long 1048534003 - .long 0 - .long 1070538357 - .long 448558287 - .long 1045911230 - .long 0 - .long 1070564515 - .long 3867352000 - .long 1046082819 - .long 0 - .long 1070590754 - .long 2206537816 - .long 1049157739 - .long 0 - .long 1070606585 - .long 1799603998 - .long 1049369388 - .long 0 - .long 1070619787 - .long 4075457018 - .long 1048703324 - .long 0 - .long 1070630379 - .long 572844178 - .long 1049388451 - .long 0 - .long 1070643656 - .long 540240475 - .long 1048063456 - .long 0 - .long 1070656976 - .long 2413664112 - .long 1047739393 - .long 0 - .long 1070670338 - .long 2592177285 - .long 1048727389 - .long 0 - .long 1070681058 - .long 1541931453 - .long 1048698417 - .long 0 - .long 1070694497 - .long 3345398163 - .long 1049085432 - .long 0 - .long 1070707979 - .long 2241984547 - .long 1049164260 - .long 0 - .long 1070718796 - .long 890223989 - .long 1048265646 - .long 0 - .long 1070732357 - .long 1226890683 - .long 1048781783 - .long 0 - .long 1070743237 - .long 1600520378 - .long 1048834273 - .long 0 - .long 1070756877 - .long 1081324478 - .long 1048934847 - .long 0 - .long 1070767821 - .long 1928471339 - .long 1042640487 - .long 0 - .long 1070781542 - .long 982084959 - .long 1048971733 - .long 0 - .long 1070792550 - .long 2380239162 - .long 1047711062 - .long 0 - .long 1070806352 - .long 3609542249 - .long 1048031507 - .long 0 - .long 1070817426 - .long 3466499103 - .long 1049126511 - .long 0 - .long 1070828529 - .long 1626165976 - .long 1048431820 - .long 0 - .long 1070842450 - .long 261635432 - .long 1048113242 - .long 0 - .long 1070853620 - .long 1670437810 - .long 1046604532 - .long 0 - .long 1070864820 - .long 3910575981 - .long 1049365107 - .long 0 - .long 1070876049 - .long 727294688 - .long 1048407484 - .long 0 - .long 1070890129 - .long 3260008354 - .long 1047549258 - .long 0 - .long 1070901427 - .long 872084085 - .long 1048711456 - .long 0 - .long 1070912755 - .long 754632403 - .long 1048687679 - .long 0 - .long 1070924114 - .long 1033413261 - .long 1048105461 - .long 0 - .long 1070935504 - .long 1155773876 - .long 1047412165 - .long 0 - .long 1070946925 - .long 746670859 - .long 1046841493 - .long 0 - .long 1070961245 - .long 1820254373 - .long 1048237327 - .long 0 - .long 1070972736 - .long 3605217861 - .long 1047440922 - .long 0 - .long 1070984259 - .long 2212317823 - .long 1049212421 - .long 0 - .long 1070995813 - .long 2826670683 - .long 1047678316 - .long 0 - .long 1071007400 - .long 3532575187 - .long 1049339451 - .long 0 - .long 1071019018 - .long 413443603 - .long 1049028939 - .long 0 - .long 1071030669 - .long 2964472999 - .long 1043732931 - .long 0 - .long 1071042353 - .long 389771102 - .long 1049430622 - .long 0 - .long 1071051136 - .long 1005132876 - .long 1048342053 - .long 0 - .long 1071062877 - .long 2877512173 - .long 1049492173 - .long 0 - .long 1071074650 - .long 1874411204 - .long 1048724858 - .long 0 - .long 1071086457 - .long 1011596427 - .long 1048646627 - .long 0 - .long 1071098297 - .long 838498113 - .long 1043068341 - .long 0 - .long 1071110171 - .long 409945993 - .long 1047118137 - .long 0 - .long 1071122078 - .long 2035722984 - .long 1049263601 - .long 0 - .long 1071131030 - .long 4272650650 - .long 1048435570 - .long 0 - .long 1071142997 - .long 867757828 - .long 1047923871 - .long 0 - .long 1071154998 - .long 433900304 - .long 1048766295 - .long 0 - .long 1071164021 - .long 2626749065 - .long 1049334020 - .long 0 - .long 1071176082 - .long 2721103389 - .long 1049448370 - .long 0 - .long 1071188178 - .long 3401674810 - .long 1049424769 - .long 0 - .long 1071197273 - .long 3030733799 - .long 1047804815 - .long 0 - .long 1071209431 - .long 1532130487 - .long 1045537774 - .long 0 - .long 1071221624 - .long 225486125 - .long 1049520040 - .long 0 - .long 1071230791 - .long 1326263423 - .long 1044918825 - .long 0 - .long 1071243047 - .long 3029302589 - .long 1049469599 - .long 0 - .long 1071252261 - .long 3326443421 - .long 1042360275 - .long 0 - .long 1071264580 - .long 3770244744 - .long 1048027184 - .long 0 - .long 1071273842 - .long 2568976454 - .long 1045847505 - .long 0 - .long 1071286224 - .long 628040571 - .long 1048248574 - .long 0 - .long 1071295534 - .long 2688775955 - .long 1048311770 - .long 0 - .long 1071307980 - .long 3357093336 - .long 1047484659 - .long 0 - .long 1071317339 - .long 2753529189 - .long 1047343532 - .long 0 - .long 1071329850 - .long 625560417 - .long 1043404964 - .long 0 - .long 1071339258 - .long 2456374941 - .long 1048890167 - .long 0 - .long 1071351834 - .long 748255530 - .long 1049487286 - .long 0 - .long 1071361291 - .long 2246865993 - .long 1048768259 - .long 0 - .long 1071370770 - .long 205672663 - .long 1047230532 - .long 0 - .long 1071383442 - .long 4242870741 - .long 1046367538 - .long 0 - .long 1071392971 - .long 2016709797 - .long 1049037028 - .long 0 - .long 1071402521 - .long 2569308411 - .long 1049159850 - .long 0 - .long 1071415289 - .long 3242472523 - .long 1048132214 - .long 0 - .long 1071424891 - .long 1602055934 - .long 1044691415 - .long 0 - .long 1071434515 - .long 1307177952 - .long 1049244134 - .long 0 - .long 1071444160 - .long 2152237414 - .long 1048407400 - .long 0 - .long 1071457056 - .long 2598207309 - .long 1047639998 - .long 0 - .long 1071466754 - .long 3115077937 - .long 1048719780 - .long 0 - .long 1071476474 - .long 1272724396 - .long 1048321721 - .long 0 - .long 1071486217 - .long 2860867658 - .long 1049612888 - .long 0 - .long 1071495982 - .long 1467300368 - .long 1047143154 - .long 0 - .long 1071509039 - .long 3449085837 - .long 1046095654 - .long 0 - .long 1071518858 - .long 2146871948 - .long 1044681726 - .long 0 - .long 1071528700 - .long 3066750144 - .long 1046492840 - .long 0 - .long 1071538565 - .long 1416401583 - .long 1048453263 - .long 0 - .long 1071548453 - .long 2249840317 - .long 1046959692 - .long 0 - .long 1071558365 - .long 4172904720 - .long 1048039642 - .long 0 - .long 1071568300 - .long 1549017192 - .long 1046702261 - .long 0 - .long 1071578259 - .long 3220736011 - .long 1048855214 - .long 0 - .long 1071588241 - .long 630967006 - .long 1049477219 - .long 0 - .long 1071598247 - .long 3624057028 - .long 1046733189 - .long 0 - .long 1071608278 - .long 3730794064 - .long 1048259820 - .long 0 - .long 1071618332 - .long 570378657 - .long 1049316661 - .long 0 - .long 1071628410 - .long 2814556357 - .long 1048696327 - .long 0 - .long 1071638513 - .long 194866917 - .long 1048899904 - .long 0 - .long 1071646656 - .long 3497355923 - .long 1047579730 - .long 0 - .long 1071651732 - .long 984418162 - .long 1048576793 - .long 0 - .long 1071656820 - .long 1973276684 - .long 1050136256 - .long 0 - .long 1071661920 - .long 3329497336 - .long 1049987327 - .long 0 - .long 1071667033 - .long 1374214759 - .long 1047073231 - .long 0 - .long 1071672159 - .long 2689110139 - .long 1044696853 - .long 0 - .long 1071675583 - .long 3281519615 - .long 1049239454 - .long 0 - .long 1071680729 - .long 106060705 - .long 1049441252 - .long 0 - .long 1071685888 - .long 994445709 - .long 1048383906 - .long 0 - .long 1071691060 - .long 968365306 - .long 1050219142 - .long 0 - .long 1071696244 - .long 1127183666 - .long 1048063436 - .long 0 - .long 1071701442 - .long 1176023037 - .long 1048767474 - .long 0 - .long 1071704914 - .long 494386159 - .long 1048610025 - .long 0 - .long 1071710133 - .long 3484359724 - .long 1048499390 - .long 0 - .long 1071715365 - .long 3217980016 - .long 1048823654 - .long 0 - .long 1071720610 - .long 422622404 - .long 1048883138 - .long 0 - .long 1071724114 - .long 1262752531 - .long 1048980778 - .long 0 - .long 1071729381 - .long 3412819100 - .long 1049899918 - .long 0 - .long 1071734661 - .long 4248496658 - .long 1048338572 - .long 0 - .long 1071738189 - .long 644483909 - .long 1050165690 - .long 0 - .long 1071743491 - .long 3881343467 - .long 1050118499 - .long 0 - .long 1071748807 - .long 2653622880 - .long 1048337361 - .long 0 - .long 1071752359 - .long 2812002981 - .long 1050155308 - .long 0 - .long 1071757697 - .long 224311686 - .long 1050482530 - .long 0 - .long 1071763049 - .long 679701015 - .long 1049869325 - .long 0 - .long 1071766625 - .long 3027506890 - .long 1049908641 - .long 0 - .long 1071772000 - .long 3751375892 - .long 1049481244 - .long 0 - .long 1071777389 - .long 1920294497 - .long 1050102004 - .long 0 - .long 1071780989 - .long 1483524208 - .long 1050119127 - .long 0 - .long 1071786401 - .long 97441208 - .long 1049658186 - .long 0 - .long 1071790017 - .long 3008178484 - .long 1050468097 - .long 0 - .long 1071795452 - .long 3633428993 - .long 1048933205 - .long 0 - .long 1071799084 - .long 272261604 - .long 1048795103 - .long 0 - .long 1071804543 - .long 1886467610 - .long 1049658772 - .long 0 - .long 1071810016 - .long 3703763111 - .long 1048691245 - .long 0 - .long 1071813673 - .long 3272554440 - .long 1049215679 - .long 0 - .long 1071819170 - .long 1615609844 - .long 1047938702 - .long 0 - .long 1071822843 - .long 2101526408 - .long 1049159037 - .long 0 - .long 1071826522 - .long 3501340145 - .long 1048964151 - .long 0 - .long 1071832053 - .long 3398848880 - .long 1050181422 - .long 0 - .long 1071835748 - .long 3113670222 - .long 1047639078 - .long 0 - .long 1071841304 - .long 3113807767 - .long 1050490134 - .long 0 - .long 1071845015 - .long 2638078905 - .long 1050508198 - .long 0 - .long 1071850595 - .long 3402790998 - .long 1048094059 - .long 0 - .long 1071854324 - .long 2677940860 - .long 1046276297 - .long 0 - .long 1071859929 - .long 2914178933 - .long 1050613895 - .long 0 - .long 1071863673 - .long 1395015268 - .long 1049805645 - .long 0 - .long 1071867425 - .long 3443880395 - .long 1049880454 - .long 0 - .long 1071873065 - .long 3880277067 - .long 1046944118 - .long 0 - .long 1071876834 - .long 4190954257 - .long 1048963456 - .long 0 - .long 1071880609 - .long 975315090 - .long 1050660599 - .long 0 - .long 1071886284 - .long 3981445309 - .long 1048841548 - .long 0 - .long 1071890077 - .long 340978156 - .long 1049630357 - .long 0 - .long 1071893876 - .long 3056282856 - .long 1048349819 - .long 0 - .long 1071899588 - .long 3637866925 - .long 1050038234 - .long 0 - .long 1071903404 - .long 1233925752 - .long 1047565029 - .long 0 - .long 1071907228 - .long 3365276628 - .long 1049120293 - .long 0 - .long 1071912976 - .long 1364708917 - .long 1048863613 - .long 0 - .long 1071916817 - .long 2949393003 - .long 1048806573 - .long 0 - .long 1071920665 - .long 2588933741 - .long 1049057850 - .long 0 - .long 1071924520 - .long 1317344960 - .long 1048679202 - .long 0 - .long 1071930316 - .long 4264843208 - .long 1047591051 - .long 0 - .long 1071934189 - .long 1772398646 - .long 1047786577 - .long 0 - .long 1071938069 - .long 855212881 - .long 1049083903 - .long 0 - .long 1071941956 - .long 111728933 - .long 1050121939 - .long 0 - .long 1071947800 - .long 2934994658 - .long 1046035147 - .long 0 - .long 1071951706 - .long 3504420384 - .long 1049933751 - .long 0 - .long 1071955618 - .long 2295312686 - .long 1049747989 - .long 0 - .long 1071959538 - .long 185383186 - .long 1050276648 - .long 0 - .long 1071963465 - .long 2699459344 - .long 1049336105 - .long 0 - .long 1071967400 - .long 3020028019 - .long 1048472693 - .long 0 - .long 1071973316 - .long 365843238 - .long 1049205247 - .long 0 - .long 1071977269 - .long 1597522098 - .long 1045226127 - .long 0 - .long 1071981230 - .long 731482298 - .long 1047741244 - .long 0 - .long 1071985198 - .long 19057756 - .long 1050243827 - .long 0 - .long 1071989173 - .long 2890838867 - .long 1050654615 - .long 0 - .long 1071993156 - .long 2027053605 - .long 1050184234 - .long 0 - .long 1071997147 - .long 858789886 - .long 1047748038 - .long 0 - .long 1072001146 - .long 4288580762 - .long 1046326129 - .long 0 - .long 1072007158 - .long 3861103191 - .long 1049816977 - .long 0 - .long 1072011175 - .long 1902054808 - .long 1050330775 - .long 0 - .long 1072015200 - .long 568089353 - .long 1050301118 - .long 0 - .long 1072019233 - .long 3743438430 - .long 1049790563 - .long 0 - .long 1072023274 - .long 2063211846 - .long 1047622979 - .long 0 - .long 1072027323 - .long 1911797542 - .long 1049675962 - .long 0 - .long 1072031379 - .long 3660869822 - .long 1050198853 - .long 0 - .long 1072035443 - .long 616847508 - .long 1050494731 - .long 0 - .long 1072039515 - .long 225141268 - .long 1050627992 - .long 0 - .long 1072043595 - .long 3898487111 - .long 1050663410 - .long 0 - .long 1072047683 - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .type static_const_table,@object - .size static_const_table,6432 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinhf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinhf_wmt.S deleted file mode 100644 index a754208a16..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinhf_wmt.S +++ /dev/null @@ -1,1256 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinhf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin asinhf - .text - .align 16,0x90 - .globl asinhf -asinhf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %eax - movl %eax, %ecx - movss %xmm0, 8(%esp) - andl $2147483647, %eax - cmpl $2139095040, %eax - jge .L_2TAG_PACKET_0.0.2 - cmpl $1056964608, %eax - jle .L_2TAG_PACKET_1.0.2 - cvtps2pd %xmm0, %xmm0 - movapd %xmm0, %xmm3 - andpd 128(%ebx), %xmm0 - andpd 112(%ebx), %xmm3 - cmpl $1199570944, %eax - jge .L_2TAG_PACKET_2.0.2 - movapd %xmm0, %xmm1 - mulsd %xmm0, %xmm0 - addsd 96(%ebx), %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm1, %xmm0 - pshufd $85, %xmm0, %xmm1 - movd %xmm1, %eax - movl %eax, %ecx - shrl $20, %eax - shrl $9, %ecx - subl $1023, %eax - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_2.0.2: - movl %eax, %ecx - shrl $23, %eax - subl $126, %eax - shrl $12, %ecx -.L_2TAG_PACKET_3.0.2: - cvtsi2sdl %eax, %xmm2 - andpd 144(%ebx), %xmm0 - orpd 96(%ebx), %xmm0 - andl $2040, %ecx - movq 72(%ebx), %xmm1 - mulsd 2224(%ebx,%ecx), %xmm0 - subsd 96(%ebx), %xmm0 - mulsd 80(%ebx), %xmm2 - mulsd %xmm0, %xmm1 - addsd 64(%ebx), %xmm1 - mulsd %xmm0, %xmm1 - addsd 176(%ebx,%ecx), %xmm2 - mulsd %xmm0, %xmm1 - addsd %xmm1, %xmm0 - addsd %xmm2, %xmm0 - orpd %xmm3, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_1.0.2: - cmpl $838860800, %eax - jle .L_2TAG_PACKET_5.0.2 - cvtps2pd %xmm0, %xmm0 - movapd 48(%ebx), %xmm3 - movapd %xmm0, %xmm1 - mulsd %xmm0, %xmm0 - movapd %xmm0, %xmm2 - mulsd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm2 - unpcklpd %xmm0, %xmm0 - mulpd %xmm0, %xmm3 - addpd 32(%ebx), %xmm3 - mulpd %xmm0, %xmm3 - addpd 16(%ebx), %xmm3 - mulpd %xmm0, %xmm3 - addpd (%ebx), %xmm3 - mulpd %xmm2, %xmm3 - pshufd $238, %xmm3, %xmm0 - addsd %xmm3, %xmm0 - mulsd %xmm1, %xmm0 - addsd %xmm1, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_5.0.2: - andl $2139095040, %eax - je .L_2TAG_PACKET_6.0.2 - shrl $31, %ecx - flds 8(%esp) - fsubl 160(%ebx,%ecx,8) - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_6.0.2: - flds 8(%esp) - fld %st(0) - fmul %st(1), %st - fstps (%esp) - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_0.0.2: - addss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_4.0.2: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type asinhf,@function - .size asinhf,.-asinhf - .data -# -- End asinhf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1429119421 - .long 3217380693 - .long 305580873 - .long 1068708659 - .long 3670928078 - .long 3215383394 - .long 2886529429 - .long 1067391652 - .long 1100460448 - .long 3214332679 - .long 2610913564 - .long 1066477690 - .long 3531562621 - .long 3213313024 - .long 3532580246 - .long 1064553239 - .long 3879088107 - .long 3219128321 - .long 1754324240 - .long 1070945626 - .long 4277811695 - .long 1072049730 - .long 4277811695 - .long 1072049730 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .long 0 - .long 862978048 - .long 0 - .long 3010461696 - .long 1440057502 - .long 1063257089 - .long 341338964 - .long 1064833554 - .long 4184355568 - .long 1065621801 - .long 2227658503 - .long 1066152307 - .long 449262470 - .long 1066510009 - .long 1570422842 - .long 1066777242 - .long 121841140 - .long 1067045544 - .long 630691842 - .long 1067281191 - .long 2711485097 - .long 1067500943 - .long 2026622491 - .long 1067619660 - .long 766078039 - .long 1067755853 - .long 4074027864 - .long 1067875476 - .long 3056660584 - .long 1067995528 - .long 3195252556 - .long 1068133258 - .long 116861598 - .long 1068254238 - .long 325086471 - .long 1068375655 - .long 296456961 - .long 1068497513 - .long 2623383041 - .long 1068559379 - .long 1681725707 - .long 1068620754 - .long 2231263004 - .long 1068682354 - .long 2815553124 - .long 1068744181 - .long 2057310944 - .long 1068806237 - .long 2095798018 - .long 1068859611 - .long 2302040698 - .long 1068922096 - .long 745232013 - .long 1068984815 - .long 659581512 - .long 1069047769 - .long 1566132617 - .long 1069101918 - .long 550036981 - .long 1069165314 - .long 2887419564 - .long 1069219844 - .long 1990183441 - .long 1069283688 - .long 3220050856 - .long 1069338605 - .long 1669613218 - .long 1069393703 - .long 2145455994 - .long 1069458213 - .long 4275830246 - .long 1069513705 - .long 1392453108 - .long 1069558451 - .long 1469915213 - .long 1069586382 - .long 2183652476 - .long 1069619086 - .long 2109656884 - .long 1069647220 - .long 636640577 - .long 1069675449 - .long 510517079 - .long 1069703773 - .long 210141498 - .long 1069732193 - .long 2537624622 - .long 1069760709 - .long 1733817001 - .long 1069789323 - .long 137854980 - .long 1069813243 - .long 3905576828 - .long 1069842036 - .long 4131810788 - .long 1069870929 - .long 3760956694 - .long 1069899922 - .long 1473082581 - .long 1069929016 - .long 926113142 - .long 1069953338 - .long 3669742467 - .long 1069982617 - .long 3711755290 - .long 1070007095 - .long 311386407 - .long 1070036564 - .long 705364525 - .long 1070066136 - .long 1973375279 - .long 1070090859 - .long 3589645072 - .long 1070115655 - .long 2425772059 - .long 1070145508 - .long 1074899574 - .long 1070170467 - .long 118003300 - .long 1070200516 - .long 691310403 - .long 1070225639 - .long 3273036717 - .long 1070250837 - .long 1226436560 - .long 1070276112 - .long 2481153995 - .long 1070306542 - .long 3227997535 - .long 1070331985 - .long 1421812646 - .long 1070357506 - .long 3386588242 - .long 1070383104 - .long 2580043380 - .long 1070408781 - .long 1068692560 - .long 1070434537 - .long 938143489 - .long 1070460372 - .long 4293333010 - .long 1070486286 - .long 373864817 - .long 1070512282 - .long 4208958430 - .long 1070538357 - .long 783121462 - .long 1070564515 - .long 870975437 - .long 1070590754 - .long 3338886172 - .long 1070606585 - .long 3772343130 - .long 1070619787 - .long 2408245143 - .long 1070630379 - .long 3811383569 - .long 1070643656 - .long 1622638721 - .long 1070656976 - .long 1290798655 - .long 1070670338 - .long 2457529556 - .long 1070681058 - .long 2398194399 - .long 1070694497 - .long 3190801979 - .long 1070707979 - .long 3352241197 - .long 1070718796 - .long 1829681364 - .long 1070732357 - .long 2568927817 - .long 1070743237 - .long 2676427515 - .long 1070756877 - .long 2882402820 - .long 1070767821 - .long 44944622 - .long 1070781542 - .long 2957945300 - .long 1070792550 - .long 1261787704 - .long 1070806352 - .long 1589923677 - .long 1070817426 - .long 3274931829 - .long 1070828529 - .long 1999843716 - .long 1070842450 - .long 1673619518 - .long 1070853620 - .long 601221319 - .long 1070864820 - .long 3763576649 - .long 1070876049 - .long 1974923437 - .long 1070890129 - .long 1096100617 - .long 1070901427 - .long 2424897952 - .long 1070912755 - .long 2376202600 - .long 1070924114 - .long 1665651958 - .long 1070935504 - .long 1014729354 - .long 1070946925 - .long 722545241 - .long 1070961245 - .long 1800682930 - .long 1070972736 - .long 1029453230 - .long 1070984259 - .long 3450874911 - .long 1070995813 - .long 1228255906 - .long 1071007400 - .long 3711032981 - .long 1071019018 - .long 3075102917 - .long 1071030669 - .long 92696812 - .long 1071042353 - .long 3897749690 - .long 1071051136 - .long 1907922160 - .long 1071062877 - .long 4023807324 - .long 1071074650 - .long 2452345726 - .long 1071086457 - .long 2292128226 - .long 1071098297 - .long 58635942 - .long 1071110171 - .long 864186929 - .long 1071122078 - .long 3555691467 - .long 1071131030 - .long 2003684347 - .long 1071142997 - .long 1479703759 - .long 1071154998 - .long 2537208015 - .long 1071164021 - .long 3699909861 - .long 1071176082 - .long 3934098706 - .long 1071188178 - .long 3885764182 - .long 1071197273 - .long 1357790931 - .long 1071209431 - .long 295956059 - .long 1071221624 - .long 4080877676 - .long 1071230791 - .long 202970280 - .long 1071243047 - .long 3977575845 - .long 1071252261 - .long 35977849 - .long 1071264580 - .long 1585496963 - .long 1071273842 - .long 375247257 - .long 1071286224 - .long 1812199574 - .long 1071295534 - .long 1876912769 - .long 1071307980 - .long 1051846544 - .long 1071317339 - .long 979589448 - .long 1071329850 - .long 71706889 - .long 1071339258 - .long 2790898835 - .long 1071351834 - .long 4013797733 - .long 1071361291 - .long 2541231151 - .long 1071370770 - .long 921733145 - .long 1071383442 - .long 508375805 - .long 1071392971 - .long 3091669954 - .long 1071402521 - .long 3343209673 - .long 1071415289 - .long 1693047557 - .long 1071424891 - .long 173861808 - .long 1071434515 - .long 3515822703 - .long 1071444160 - .long 1974837761 - .long 1071457056 - .long 1189018219 - .long 1071466754 - .long 2441946573 - .long 1071476474 - .long 1887102255 - .long 1071486217 - .long 4271031636 - .long 1071495982 - .long 876995759 - .long 1071509039 - .long 438773454 - .long 1071518858 - .long 172621632 - .long 1071528700 - .long 544035182 - .long 1071538565 - .long 2021801298 - .long 1071548453 - .long 783063308 - .long 1071558365 - .long 1598254051 - .long 1071568300 - .long 651258553 - .long 1071578259 - .long 2719315456 - .long 1071588241 - .long 3993180461 - .long 1071598247 - .long 667093936 - .long 1071608278 - .long 1823716217 - .long 1071618332 - .long 3664357648 - .long 1071628410 - .long 2393914686 - .long 1071638513 - .long 1405419566 - .long 1071646656 - .long 563652001 - .long 1071651732 - .long 1074554091 - .long 1071656820 - .long 3195405229 - .long 1071661920 - .long 2890399284 - .long 1071667033 - .long 420597586 - .long 1071672159 - .long 87278952 - .long 1071675583 - .long 1753119502 - .long 1071680729 - .long 1959759897 - .long 1071685888 - .long 975389815 - .long 1071691060 - .long 3365155278 - .long 1071696244 - .long 811309190 - .long 1071701442 - .long 1269811480 - .long 1071704914 - .long 1108583542 - .long 1071710133 - .long 1034517919 - .long 1071715365 - .long 1327340287 - .long 1071720610 - .long 1388251237 - .long 1071724114 - .long 1488234797 - .long 1071729381 - .long 2711385691 - .long 1071734661 - .long 952179194 - .long 1071738189 - .long 3255685427 - .long 1071743491 - .long 3159039803 - .long 1071748807 - .long 951558972 - .long 1071752359 - .long 3234424125 - .long 1071757697 - .long 3904573547 - .long 1071763049 - .long 2648729924 - .long 1071766625 - .long 2729250212 - .long 1071772000 - .long 2000712574 - .long 1071777389 - .long 3125257108 - .long 1071780989 - .long 3160324803 - .long 1071786401 - .long 2216316974 - .long 1071790017 - .long 3875016090 - .long 1071795452 - .long 1439520610 - .long 1071799084 - .long 1298103361 - .long 1071804543 - .long 2217517956 - .long 1071810016 - .long 1191753587 - .long 1071813673 - .long 1728773900 - .long 1071819170 - .long 747445441 - .long 1071822843 - .long 1670772213 - .long 1071826522 - .long 1471209283 - .long 1071832053 - .long 3287905877 - .long 1071835748 - .long 594038131 - .long 1071841304 - .long 3920147917 - .long 1071845015 - .long 3957142762 - .long 1071850595 - .long 826988438 - .long 1071854324 - .long 242509008 - .long 1071859929 - .long 4173610350 - .long 1071863673 - .long 2518313625 - .long 1071867425 - .long 2671523434 - .long 1071873065 - .long 387544807 - .long 1071876834 - .long 1470497767 - .long 1071880609 - .long 4269259217 - .long 1071886284 - .long 1345663925 - .long 1071890077 - .long 2159323299 - .long 1071893876 - .long 957937516 - .long 1071899588 - .long 2994656967 - .long 1071903404 - .long 556124819 - .long 1071907228 - .long 1631098658 - .long 1071912976 - .long 1368257861 - .long 1071916817 - .long 1309849279 - .long 1071920665 - .long 1567156841 - .long 1071924520 - .long 1179420986 - .long 1071930316 - .long 569448444 - .long 1071934189 - .long 669557459 - .long 1071938069 - .long 1593834700 - .long 1071941956 - .long 3166083125 - .long 1071947800 - .long 211641815 - .long 1071951706 - .long 2780675719 - .long 1071955618 - .long 2400234567 - .long 1071959538 - .long 3482927192 - .long 1071963465 - .long 1852089988 - .long 1071967400 - .long 1020849000 - .long 1071973316 - .long 1718090839 - .long 1071977269 - .long 121152472 - .long 1071981230 - .long 646346839 - .long 1071985198 - .long 3415709705 - .long 1071989173 - .long 4257004898 - .long 1071993156 - .long 3293664199 - .long 1071997147 - .long 649825382 - .long 1072001146 - .long 248887552 - .long 1072007158 - .long 2541522737 - .long 1072011175 - .long 3593780107 - .long 1072015200 - .long 3533041935 - .long 1072019233 - .long 2487426809 - .long 1072023274 - .long 585795318 - .long 1072027323 - .long 2252723088 - .long 1072031379 - .long 3323604690 - .long 1072035443 - .long 3929561382 - .long 1072039515 - .long 4202479723 - .long 1072043595 - .long 4275017539 - .long 1072047683 - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .type static_const_table,@object - .size static_const_table,4272 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinhl.S deleted file mode 100644 index 4842b34a58..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinhl.S +++ /dev/null @@ -1,1003 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinhl.c" - .text -..TXTST0: -# -- Begin asinhl - .text - .align 16,0x90 - .globl asinhl -asinhl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $56, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %ebx - andl $32767, %ebx - movzwl 14(%esp), %eax - cmpl $32767, %ebx - je ..B1.73 -..B1.4: - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $16382, %ebx - jge ..B1.46 -..B1.5: - cmpl $16376, %ebx - jge ..B1.39 -..B1.6: - cmpl $16371, %ebx - jge ..B1.32 -..B1.7: - cmpl $16365, %ebx - jge ..B1.25 -..B1.8: - cmpl $16308, %ebx - jge ..B1.18 -..B1.9: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.67 -..B1.10: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.11: - fldcw 12(%esp) -..B1.12: - movzwl 16(%ebp), %ebx - movl $1, %eax - andl $32767, %ebx -..B1.13: - testl %ebx, %ebx - jle ..B1.63 -..B1.14: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ecx) - fmul %st(1), %st - fsubp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ecx) - fstpt (%esp) -..B1.15: - testl %eax, %eax - je ..B1.17 -..B1.16: - fldcw 14(%esp) -..B1.17: - fldt (%esp) - addl $56, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.68 -..B1.19: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.20: - fldcw 12(%esp) -..B1.21: - movl $1, %eax -..B1.22: - fldt 8(%ebp) - testl %eax, %eax - fldt _Q3@GOTOFF(%ecx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.24 -..B1.23: - fldcw 14(%esp) -..B1.24: - fldt (%esp) - addl $56, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.69 -..B1.26: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.27: - fldcw 12(%esp) -..B1.28: - movl $1, %eax -..B1.29: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_Q2@GOTOFF(%ecx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.31 -..B1.30: - fldcw 14(%esp) -..B1.31: - fldt (%esp) - addl $56, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.70 -..B1.33: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.34: - fldcw 12(%esp) -..B1.35: - movl $1, %eax -..B1.36: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%ecx) - fmul %st(1), %st - fldt 12+_Q1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%ecx) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.38 -..B1.37: - fldcw 14(%esp) -..B1.38: - fldt (%esp) - addl $56, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.71 -..B1.40: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.41: - fldcw 12(%esp) -..B1.42: - movl $1, %eax -..B1.43: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fld %st(1) - fldl _TWO_53H@GOTOFF(%ecx) - fmul %st(3), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fxch %st(2) - fstpt (%esp) - fldt (%esp) - fmul %st(0), %st - fstpt 32(%esp) - fldt 32(%esp) - fadd %st, %st(2) - fld %st(2) - fmul %st(2), %st - fxch %st(4) - fstpt 16(%esp) - fld %st(1) - fmul %st(1), %st - faddp %st, %st(4) - fld %st(3) - fxch %st(1) - fmul %st(0), %st - fadd %st, %st(1) - fldt 228+_Q@GOTOFF(%ecx) - fmul %st(2), %st - fldt 204+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 180+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 156+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 132+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 108+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 216+_Q@GOTOFF(%ecx) - fmul %st(3), %st - fldt 192+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 168+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 144+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 120+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt _Q@GOTOFF(%ecx) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldt 252+_Q@GOTOFF(%ecx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fmulp %st, %st(3) - fldt 240+_Q@GOTOFF(%ecx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt 32(%esp) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 16(%esp) - fld %st(0) - fldl _TWO_48H@GOTOFF(%ecx) - fld %st(0) - fadd %st(5), %st - fsubp %st, %st(1) - fmul %st, %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fldt 8(%ebp) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt (%esp) - fmul %st, %st(2) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.45 -..B1.44: - fldcw 14(%esp) -..B1.45: - fldt (%esp) - addl $56, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.72 -..B1.47: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.48: - fldcw 12(%esp) -..B1.49: - movl $1, %edx -..B1.50: - fldt 8(%ebp) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl ones@GOTOFF(%ecx,%eax,8) - fmul %st, %st(1) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - movzwl 16(%ebp), %ebx - movl %ebx, %eax - andl $32767, %eax - cmpl $16421, %eax - jge ..B1.59 -..B1.51: - cmpl $16388, %eax - jge ..B1.53 -..B1.52: - fldl _TWO_52H@GOTOFF(%ecx) - fld %st(0) - fld %st(2) - fadd %st(2), %st - fsub %st(2), %st - fld %st(0) - fld %st(4) - fsub %st(2), %st - fmul %st, %st(1) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(1) - fld %st(1) - fmul %st(2), %st - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsqrt - fadd %st, %st(4) - fxch %st(5) - fsubrp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fsubrp %st, %st(1) - fld %st(3) - fxch %st(4) - fsubr %st, %st(5) - fxch %st(4) - fmul %st(5), %st - fsubrp %st, %st(1) - faddp %st, %st(1) - fld %st(2) - fadd %st(4), %st - fdivrp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(1) - fstpt 16(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fxch %st(1) - jmp ..B1.58 -..B1.53: - fldt .L_2il0floatpacket.2@GOTOFF(%ecx) - cmpl $16394, %eax - fmul %st(1), %st - fld %st(0) - fldl _TWO_32H@GOTOFF(%ecx) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fsubr %st(1), %st - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - jge ..B1.55 -..B1.54: - fstp %st(2) - fld %st(2) - fmul %st(3), %st - fadd %st(2), %st - fsqrt - faddp %st, %st(3) - fxch %st(1) - fdiv %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - jmp ..B1.58 -..B1.55: - fstp %st(3) - cmpl $16401, %eax - jge ..B1.57 -..B1.56: - fld %st(2) - fdiv %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fdivr %st(2), %st - faddp %st, %st(1) - jmp ..B1.58 -..B1.57: - fxch %st(1) - fdivr %st(2), %st - faddp %st, %st(1) -..B1.58: - fldt 16(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 8(%ebp) - movzwl 16(%ebp), %eax - andl $32767, %eax - movl %eax, %ebx - addl $-16383, %eax - negl %ebx - fxch %st(2) - fstpt (%esp) - addl $-2, %ebx - movzwl 8(%esp), %esi - andl $32767, %ebx - andl $-32768, %esi - orl %ebx, %esi - movw %si, 8(%esp) - fldt (%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 16(%esp) - fmulp %st, %st(1) - jmp ..B1.60 -..B1.59: - fstp %st(0) - fldl _TWO_52H@GOTOFF(%ecx) - andl $-32768, %ebx - orl $-49153, %ebx - addl $-16382, %eax - movw %bx, 16(%ebp) - fldt 8(%ebp) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fsubrp %st, %st(1) -..B1.60: - fldt 16(%esp) - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - fldt 60+_P@GOTOFF(%ecx) - movl 12(%ebp), %ebx - shrl $23, %ebx - movzbl %bl, %ebx - movl %eax, (%esp) - flds __libm_rcp_table_256@GOTOFF(%ecx,%ebx,4) - fmul %st, %st(3) - shll $4, %ebx - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - testl %edx, %edx - fxch %st(4) - fmulp %st, %st(2) - fxch %st(1) - fadd %st, %st(3) - fld %st(3) - fmul %st(4), %st - fmul %st, %st(2) - fxch %st(4) - fstpt 8(%ebp) - fldt 8(%ebp) - fildl (%esp) - fldt 36+_P@GOTOFF(%ecx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fmulp %st, %st(1) - fldt 48+_P@GOTOFF(%ecx) - fmul %st(5), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt _P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - faddp %st, %st(3) - fldt .L_2il0floatpacket.4@GOTOFF(%ecx) - fmul %st(1), %st - fldt .L_2il0floatpacket.5@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl 8+__libm_logl_table_256@GOTOFF(%ecx,%ebx) - faddp %st, %st(3) - faddl __libm_logl_table_256@GOTOFF(%ebx,%ecx) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%esp) - je ..B1.62 -..B1.61: - fldcw 14(%esp) -..B1.62: - fldt 16(%esp) - addl $56, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.63: - cmpl $0, 12(%ebp) - jne ..B1.65 -..B1.64: - cmpl $0, 8(%ebp) - je ..B1.66 -..B1.65: - fldt 8(%ebp) - fldt _small_value_80@GOTOFF(%ecx) - movzbl 17(%ebp), %ebx - andl $128, %ebx - shrl $7, %ebx - lea (,%ebx,8), %edx - lea (%edx,%ebx,4), %esi - fldt _small_value_80@GOTOFF(%ecx,%esi) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpt (%esp) - jmp ..B1.15 -..B1.66: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.15 -..B1.67: - xorl %eax, %eax - jmp ..B1.13 -..B1.68: - xorl %eax, %eax - jmp ..B1.22 -..B1.69: - xorl %eax, %eax - jmp ..B1.29 -..B1.70: - xorl %eax, %eax - jmp ..B1.36 -..B1.71: - xorl %eax, %eax - jmp ..B1.43 -..B1.72: - xorl %edx, %edx - jmp ..B1.50 -..B1.73: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.79 -..B1.74: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.75: - fldcw 12(%esp) -..B1.76: - fldt 8(%ebp) - fstpt (%esp) -..B1.77: - fldcw 14(%esp) -..B1.78: - fldt (%esp) - addl $56, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.79: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.78 - .align 16,0x90 - .type asinhl,@function - .size asinhl,.-asinhl - .data -# -- End asinhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_Q3: - .word 6991 - .word 42216 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 33268 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 9764 - .word 39322 - .word 39161 - .word 39321 - .word 16379 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 43682 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 14144 - .word 39303 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 10686 - .word 40209 - .word 28068 - .word 46811 - .word 49146 - .word 0 - .word 6376 - .word 25459 - .word 13370 - .word 63707 - .word 16377 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 42228 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 4505 - .word 52442 - .word 52428 - .word 52428 - .word 49134 - .word 0 - .word 31967 - .word 56173 - .word 28086 - .word 46811 - .word 49146 - .word 0 - .word 26124 - .word 58234 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 22137 - .word 23222 - .word 53620 - .word 46917 - .word 49145 - .word 0 - .word 45395 - .word 61656 - .word 25205 - .word 36391 - .word 16377 - .word 0 - .word 28077 - .word 15147 - .word 52421 - .word 58572 - .word 49144 - .word 0 - .word 19650 - .word 2873 - .word 50009 - .word 48451 - .word 16376 - .word 0 - .word 47538 - .word 64725 - .word 9133 - .word 40943 - .word 49144 - .word 0 - .word 42460 - .word 64288 - .word 29314 - .word 35191 - .word 16376 - .word 0 - .word 54924 - .word 18085 - .word 19628 - .word 61339 - .word 49143 - .word 0 - .word 8359 - .word 63244 - .word 48955 - .word 54066 - .word 16375 - .word 0 - .word 13301 - .word 22367 - .word 28967 - .word 48066 - .word 49143 - .word 0 - .word 47487 - .word 41074 - .word 54143 - .word 42870 - .word 16375 - .word 0 - .word 18176 - .word 28317 - .word 25378 - .word 37849 - .word 49143 - .word 0 - .word 2947 - .word 59345 - .word 39582 - .word 64148 - .word 16374 - .word 0 - .word 7071 - .word 46945 - .word 60101 - .word 49232 - .word 49142 - .word 0 - .word 33184 - .word 23492 - .word 18153 - .word 62298 - .word 16373 - .word 0 - .word 44779 - .word 60944 - .word 30881 - .word 55868 - .word 49140 - .word 0 - .word 22870 - .word 51718 - .word 28591 - .word 51709 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39328 - .word 16379 - .word 0 - .type _Q,@object - .size _Q,264 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .type _P,@object - .size _P,72 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinl.S deleted file mode 100644 index 99ef476461..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/asinl.S +++ /dev/null @@ -1,1176 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinl.c" - .text -..TXTST0: -# -- Begin asinl - .text - .align 16,0x90 - .globl asinl -asinl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %edi - pushl %ebx - subl $88, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzbl 17(%ebp), %edx - movzwl 16(%ebp), %eax - andl $128, %edx - andl $32767, %eax - shrl $7, %edx - movzwl 14(%esp), %ebx - cmpl $16383, %eax - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - jge ..B1.59 -..B1.4: - cmpl $16382, %eax - jge ..B1.49 -..B1.5: - cmpl $16376, %eax - jge ..B1.39 -..B1.6: - cmpl $16371, %eax - jge ..B1.32 -..B1.7: - cmpl $16365, %eax - jge ..B1.25 -..B1.8: - cmpl $16308, %eax - jge ..B1.18 -..B1.9: - movl %ebx, %edi - andl $768, %edi - cmpl $768, %edi - je ..B1.79 -..B1.10: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.11: - fldcw 12(%esp) -..B1.12: - movzwl 16(%ebp), %eax - movl $1, %ebx - andl $32767, %eax -..B1.13: - testl %eax, %eax - jle ..B1.75 -..B1.14: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ecx) - fmul %st(1), %st - faddp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ecx) - fstpt (%esp) -..B1.15: - testl %ebx, %ebx - je ..B1.17 -..B1.16: - fldcw 14(%esp) -..B1.17: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.80 -..B1.19: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.20: - fldcw 12(%esp) -..B1.21: - movl $1, %eax -..B1.22: - fldt 8(%ebp) - testl %eax, %eax - fldt _P4@GOTOFF(%ecx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.24 -..B1.23: - fldcw 14(%esp) -..B1.24: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.81 -..B1.26: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.27: - fldcw 12(%esp) -..B1.28: - movl $1, %eax -..B1.29: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_P3@GOTOFF(%ecx) - fmul %st(1), %st - fldt _P3@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.31 -..B1.30: - fldcw 14(%esp) -..B1.31: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.82 -..B1.33: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.34: - fldcw 12(%esp) -..B1.35: - movl $1, %eax -..B1.36: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_P2@GOTOFF(%ecx) - fmul %st(1), %st - fldt 12+_P2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_P2@GOTOFF(%ecx) - fmulp %st, %st(2) - fldt _P2@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.38 -..B1.37: - fldcw 14(%esp) -..B1.38: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - movl %ebx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.83 -..B1.40: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.41: - fldcw 12(%esp) -..B1.42: - movzwl 16(%ebp), %eax - movl $1, %edx - andl $32767, %eax -..B1.43: - fldt 8(%ebp) - cmpl $16381, %eax - fld %st(0) - fldl _TWO_52H@GOTOFF(%ecx) - fmul %st, %st(1) - fld %st(1) - fadd %st(3), %st - fsubp %st, %st(2) - fld %st(1) - fxch %st(1) - fstpt 16(%esp) - fld %st(1) - fsubr %st(3), %st - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fxch %st(2) - fstpt 64(%esp) - fldt 64(%esp) - fmul %st(0), %st - fld %st(0) - fadd %st(3), %st - fstpt 48(%esp) - fldt 48(%esp) - fld %st(1) - fmul %st(4), %st - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - fstpt 32(%esp) - fldt 32(%esp) - fld %st(2) - fmul %st(3), %st - fld %st(0) - faddp %st, %st(2) - jge ..B1.45 -..B1.44: - fstp %st(0) - fldt 132+_P1@GOTOFF(%ecx) - fmul %st(1), %st - fldt 108+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_P1@GOTOFF(%ecx) - fldt 120+_P1@GOTOFF(%ecx) - fmul %st(3), %st - fldt 96+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _P1@GOTOFF(%ecx) - faddp %st, %st(2) - fldt 48(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt (%esp) - fldt 144+_P1@GOTOFF(%ecx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - jmp ..B1.46 -..B1.45: - fldt 204+_P@GOTOFF(%ecx) - fmul %st(2), %st - fldt 180+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 156+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 132+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 108+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 192+_P@GOTOFF(%ecx) - fmul %st(3), %st - fldt 168+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 144+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 120+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt _P@GOTOFF(%ecx) - faddp %st, %st(3) - fldt 48(%esp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 32(%esp) - fldt (%esp) - fldt 228+_P@GOTOFF(%ecx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fldt 216+_P@GOTOFF(%ecx) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(2) - fld %st(1) - fxch %st(5) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 16(%esp) - fmul %st(1), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fsub %st(3), %st - faddp %st, %st(1) -..B1.46: - fldt 64(%esp) - fld %st(2) - fmul %st(4), %st - testl %edx, %edx - fxch %st(5) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 64(%esp) - je ..B1.48 -..B1.47: - fldcw 14(%esp) -..B1.48: - fldt 64(%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.49: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.84 -..B1.50: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.51: - fldcw 12(%esp) -..B1.52: - movl $1, %ebx -..B1.53: - fldl _ones@GOTOFF(%ecx,%edx,8) - fstl 80(%esp) - fldt 8(%ebp) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fldl _TWO_32H@GOTOFF(%ecx) - fldl _TWO_52H@GOTOFF(%ecx) - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(3) - fsubrl _ones@GOTOFF(%ecx) - fmul %st(2), %st - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(1) - fxch %st(1) - fsub %st(2), %st - fadd %st, %st(1) - fxch %st(1) - fsqrt - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(5) - fld %st(4) - fmul %st(5), %st - fsubr %st, %st(3) - fld %st(5) - fxch %st(2) - fsub %st(6), %st - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fld %st(4) - fadd %st(1), %st - fdivrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fld %st(1) - fld %st(3) - fadd %st(3), %st - fmul %st, %st(1) - fld %st(4) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fld %st(2) - fadd %st(1), %st - fstpt 64(%esp) - fldt 64(%esp) - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 48(%esp) - fldt 48(%esp) - fld %st(2) - fmul %st(3), %st - fld %st(0) - faddp %st, %st(2) - fxch %st(2) - fstpt (%esp) - fldt (%esp) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fcompp - fnstsw %ax - sahf - jbe ..B1.55 -..B1.54: - fstp %st(1) - fldt 132+_P1@GOTOFF(%ecx) - fmul %st(1), %st - fldt 108+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_P1@GOTOFF(%ecx) - fldt 120+_P1@GOTOFF(%ecx) - fmul %st(3), %st - fldt 96+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P1@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _P1@GOTOFF(%ecx) - faddp %st, %st(2) - fldt 64(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 16(%esp) - fldt 144+_P1@GOTOFF(%ecx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(2) - fxch %st(1) - jmp ..B1.56 -..B1.55: - fldt 204+_P@GOTOFF(%ecx) - fmul %st(1), %st - fldt 180+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 156+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 132+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 108+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 192+_P@GOTOFF(%ecx) - fmul %st(2), %st - fldt 168+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 144+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 120+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _P@GOTOFF(%ecx) - faddp %st, %st(2) - fldt 64(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 48(%esp) - fldt 16(%esp) - fldt 228+_P@GOTOFF(%ecx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(3) - fldt 216+_P@GOTOFF(%ecx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fldt 32(%esp) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) -..B1.56: - fldt (%esp) - testl %ebx, %ebx - fmulp %st, %st(2) - fld %st(2) - fmul %st(1), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st(2), %st - faddp %st, %st(2) - fldt .L_2il0floatpacket.2@GOTOFF(%ecx) - fmul %st, %st(1) - fmulp %st, %st(2) - fldt _pi_02@GOTOFF(%ecx) - fld %st(0) - fadd %st(3), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fldt 12+_pi_02@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fmull 80(%esp) - fstpt 16(%esp) - je ..B1.58 -..B1.57: - fldcw 14(%esp) -..B1.58: - fldt 16(%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.59: - movl %ebx, %edi - andl $768, %edi - cmpl $768, %edi - je ..B1.85 -..B1.60: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.61: - fldcw 12(%esp) -..B1.62: - movzwl 16(%ebp), %eax - movl $1, %ebx - andl $32767, %eax -..B1.63: - cmpl $32767, %eax - jne ..B1.67 -..B1.64: - cmpl $-2147483648, 12(%ebp) - jne ..B1.66 -..B1.65: - cmpl $0, 8(%ebp) - je ..B1.71 -..B1.66: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ecx) - fstpt (%esp) - jmp ..B1.72 -..B1.67: - cmpl $16383, %eax - jne ..B1.71 -..B1.68: - cmpl $-2147483648, 12(%ebp) - jne ..B1.71 -..B1.69: - cmpl $0, 8(%ebp) - jne ..B1.71 -..B1.70: - lea (,%edx,8), %eax - lea (%eax,%edx,4), %edx - fldt _pi_2l@GOTOFF(%edx,%ecx) - fldt _small_value_80@GOTOFF(%edx,%ecx) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.72 -..B1.71: - fldl _infs@GOTOFF(%ecx) - fmull _zeros@GOTOFF(%ecx) - fstpt (%esp) -..B1.72: - testl %ebx, %ebx - je ..B1.74 -..B1.73: - fldcw 14(%esp) -..B1.74: - fldt (%esp) - addl $88, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.75: - cmpl $0, 12(%ebp) - jne ..B1.77 -..B1.76: - cmpl $0, 8(%ebp) - je ..B1.78 -..B1.77: - fldt 8(%ebp) - lea (,%edx,8), %eax - fldt _small_value_80@GOTOFF(%ecx) - lea (%eax,%edx,4), %edx - fldt _small_value_80@GOTOFF(%ecx,%edx) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.15 -..B1.78: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.15 -..B1.79: - xorl %ebx, %ebx - jmp ..B1.13 -..B1.80: - xorl %eax, %eax - jmp ..B1.22 -..B1.81: - xorl %eax, %eax - jmp ..B1.29 -..B1.82: - xorl %eax, %eax - jmp ..B1.36 -..B1.83: - xorl %edx, %edx - jmp ..B1.43 -..B1.84: - xorl %ebx, %ebx - jmp ..B1.53 -..B1.85: - xorl %ebx, %ebx - jmp ..B1.63 - .align 16,0x90 - .type asinl,@function - .size asinl,.-asinl - .data -# -- End asinl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_P4: - .word 43691 - .word 44938 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _P4,@object - .size _P4,12 - .align 2 -_P3: - .word 36763 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 40704 - .word 58046 - .word 39460 - .word 39321 - .word 16379 - .word 0 - .type _P3,@object - .size _P3,24 - .align 2 -_P2: - .word 43688 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 20771 - .word 39331 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 23807 - .word 53798 - .word 28073 - .word 46811 - .word 16378 - .word 0 - .word 35198 - .word 7516 - .word 54204 - .word 63722 - .word 16377 - .word 0 - .type _P2,@object - .size _P2,48 - .align 2 -_P1: - .word 43589 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 39364 - .word 39321 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 17602 - .word 56173 - .word 28086 - .word 46811 - .word 16378 - .word 0 - .word 47501 - .word 58414 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 27078 - .word 6583 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 39781 - .word 21053 - .word 25224 - .word 36391 - .word 16377 - .word 0 - .word 46568 - .word 6235 - .word 50749 - .word 58572 - .word 16376 - .word 0 - .word 41318 - .word 51558 - .word 37628 - .word 48452 - .word 16376 - .word 0 - .word 55026 - .word 7893 - .word 43866 - .word 40925 - .word 16376 - .word 0 - .word 43387 - .word 19951 - .word 2911 - .word 35445 - .word 16376 - .word 0 - .word 32572 - .word 59281 - .word 11243 - .word 56666 - .word 16375 - .word 0 - .word 49800 - .word 50337 - .word 42707 - .word 39184 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16380 - .word 0 - .type _P1,@object - .size _P1,156 - .align 2 -_P: - .word 42691 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 4317 - .word 52400 - .word 52428 - .word 52428 - .word 49134 - .word 0 - .word 26206 - .word 56172 - .word 28086 - .word 46811 - .word 16378 - .word 0 - .word 36130 - .word 58514 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 21592 - .word 8113 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 3093 - .word 49950 - .word 25215 - .word 36391 - .word 16377 - .word 0 - .word 21499 - .word 24428 - .word 51889 - .word 58572 - .word 16376 - .word 0 - .word 54828 - .word 41264 - .word 61120 - .word 48451 - .word 16376 - .word 0 - .word 10243 - .word 1489 - .word 39717 - .word 40940 - .word 16376 - .word 0 - .word 51433 - .word 46039 - .word 63564 - .word 35220 - .word 16376 - .word 0 - .word 60402 - .word 39286 - .word 25675 - .word 60826 - .word 16375 - .word 0 - .word 34219 - .word 36833 - .word 44839 - .word 57547 - .word 16375 - .word 0 - .word 13013 - .word 26091 - .word 19721 - .word 60832 - .word 16374 - .word 0 - .word 22353 - .word 41544 - .word 55443 - .word 55735 - .word 16376 - .word 0 - .word 14948 - .word 7038 - .word 38091 - .word 38339 - .word 49145 - .word 0 - .word 61727 - .word 61480 - .word 15906 - .word 51927 - .word 16378 - .word 0 - .word 13386 - .word 23084 - .word 64443 - .word 55906 - .word 49146 - .word 0 - .word 17499 - .word 23573 - .word 43947 - .word 42761 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39328 - .word 16379 - .word 0 - .type _P,@object - .size _P,240 - .align 2 -_pi_02: - .word 0 - .word 0 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 35374 - .word 4889 - .word 2259 - .word 34211 - .word 16349 - .word 0 - .type _pi_02,@object - .size _pi_02,24 - .align 2 -_pi_2l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49151 - .word 0 - .type _pi_2l,@object - .size _pi_2l,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2_wmt.S deleted file mode 100644 index 31a1c073cb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2_wmt.S +++ /dev/null @@ -1,1219 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan2_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin atan2 - .text - .align 16,0x90 - .globl atan2 -atan2: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 136(%esp), %xmm1 - movsd 128(%esp), %xmm0 - pextrw $3, %xmm0, %eax - movq %xmm0, 8(%esp) - andl $32752, %eax - movq %xmm1, 16(%esp) - subl $14448, %eax - cmpl $3840, %eax - ja .L_2TAG_PACKET_0.0.3 - pextrw $3, %xmm1, %eax - andl $32752, %eax - subl $14448, %eax - cmpl $3840, %eax - ja .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - unpcklpd %xmm1, %xmm0 - xorpd %xmm5, %xmm5 - xorpd %xmm3, %xmm3 - movl $2048, %eax - pinsrw $3, %eax, %xmm5 - paddw %xmm1, %xmm5 - psrlq $29, %xmm5 - rcpss %xmm5, %xmm3 - xorpd %xmm4, %xmm4 - movl $14336, %ecx - pinsrw $3, %ecx, %xmm4 - psllq $29, %xmm3 - paddw %xmm4, %xmm3 - mulsd %xmm0, %xmm3 - xorpd %xmm2, %xmm2 - xorpd %xmm6, %xmm6 - xorpd %xmm7, %xmm7 - movl $32768, %eax - pinsrw $2, %eax, %xmm6 - movl $32767, %ecx - pinsrw $3, %ecx, %xmm7 - paddd %xmm6, %xmm3 - andpd %xmm7, %xmm3 - movapd %xmm3, %xmm5 - pextrw $3, %xmm3, %eax - movl $16448, %ecx - pinsrw $3, %ecx, %xmm2 - minsd %xmm2, %xmm3 - movmskpd %xmm0, %edx - psllq $1, %xmm0 - psrlq $1, %xmm0 - cmpsd $2, %xmm2, %xmm5 - psllq $1, %xmm1 - psrlq $1, %xmm1 - movapd %xmm1, %xmm6 - movapd %xmm1, %xmm7 - movapd %xmm0, %xmm2 - movl $0, %ecx - pinsrw $0, %ecx, %xmm6 - subsd %xmm6, %xmm7 - movapd %xmm0, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm4 - mulsd %xmm3, %xmm7 - andpd %xmm5, %xmm0 - subsd %xmm6, %xmm0 - andpd %xmm5, %xmm1 - addsd %xmm1, %xmm4 - subsd %xmm7, %xmm0 - andl $32752, %eax - subl $16286, %eax - cmpl $1121, %eax - ja .L_2TAG_PACKET_3.0.3 - divsd %xmm4, %xmm0 - pextrw $3, %xmm3, %ecx - movsd 2944(%ebx), %xmm2 - movsd 2960(%ebx), %xmm3 - pextrw $0, %xmm5, %eax - addl %edx, %edx - movapd 2688(%ebx,%edx,8), %xmm6 - movapd 2752(%ebx,%edx,8), %xmm1 - subl $16286, %ecx - notl %eax - andl $1, %eax - addl %eax, %ecx - addl %ecx, %ecx - movapd (%ebx,%ecx,8), %xmm5 - xorpd %xmm1, %xmm5 - addpd %xmm6, %xmm5 - movapd %xmm5, %xmm6 - unpckhpd %xmm5, %xmm5 - xorpd %xmm0, %xmm1 - movapd %xmm1, %xmm4 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm2 - addsd %xmm0, %xmm3 - addsd %xmm6, %xmm1 - subsd %xmm1, %xmm6 - addsd %xmm4, %xmm6 - addsd 2952(%ebx), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm4 - addsd %xmm5, %xmm6 - mulsd %xmm4, %xmm2 - addsd 2968(%ebx), %xmm3 - mulsd %xmm3, %xmm2 - addsd %xmm6, %xmm2 - addsd %xmm2, %xmm1 - movsd %xmm1, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_3.0.3: - addl $942, %eax - cmpl $942, %eax - ja .L_2TAG_PACKET_5.0.3 - xorpd %xmm4, %xmm4 - movl $16368, %ecx - pinsrw $3, %ecx, %xmm4 - divsd %xmm1, %xmm4 - addl %edx, %edx - movapd 2752(%ebx,%edx,8), %xmm6 - unpcklpd %xmm3, %xmm3 - xorpd %xmm6, %xmm0 - xorpd %xmm6, %xmm2 - xorpd %xmm6, %xmm3 - movapd 2816(%ebx,%edx,8), %xmm7 - movsd 2944(%ebx), %xmm1 - movsd 2960(%ebx), %xmm5 - andpd 2880(%ebx,%edx,8), %xmm3 - mulsd %xmm4, %xmm2 - mulsd %xmm4, %xmm0 - movapd %xmm2, %xmm6 - mulsd %xmm2, %xmm2 - mulsd %xmm2, %xmm1 - addsd %xmm2, %xmm5 - mulsd %xmm2, %xmm6 - addsd 2952(%ebx), %xmm1 - mulsd %xmm2, %xmm5 - addsd %xmm0, %xmm7 - addpd %xmm3, %xmm7 - mulsd %xmm6, %xmm1 - addsd 2968(%ebx), %xmm5 - mulsd %xmm1, %xmm5 - addsd %xmm7, %xmm5 - unpckhpd %xmm7, %xmm7 - addsd %xmm7, %xmm5 - movsd %xmm5, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_5.0.3: - movsd 16(%esp), %xmm1 - movsd 8(%esp), %xmm0 - pextrw $3, %xmm1, %eax - andl $32752, %eax - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl %eax, %ecx - jg .L_2TAG_PACKET_6.0.3 - pextrw $3, %xmm1, %ecx - cmpl $32767, %ecx - jg .L_2TAG_PACKET_7.0.3 - divsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_7.0.3: - andpd 2672(%ebx), %xmm0 - movsd 2640(%ebx), %xmm2 - xorpd %xmm2, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_6.0.3: - andpd 2672(%ebx), %xmm0 - movsd 2624(%ebx), %xmm2 - xorpd %xmm2, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_0.0.3: -.L_2TAG_PACKET_1.0.3: - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - pextrw $3, %xmm1, %eax - andl $32752, %eax - cmpl $32752, %ecx - je .L_2TAG_PACKET_8.0.3 - cmpl $32752, %eax - je .L_2TAG_PACKET_9.0.3 - movsd 2992(%ebx), %xmm3 - movl $1024, %edx - movsd 2976(%ebx), %xmm4 - xorpd %xmm6, %xmm6 - movsd 3008(%ebx), %xmm7 - cmpl $0, %ecx - je .L_2TAG_PACKET_10.0.3 -.L_2TAG_PACKET_11.0.3: - cmpl $0, %eax - je .L_2TAG_PACKET_12.0.3 -.L_2TAG_PACKET_13.0.3: - addl %ecx, %edx - subl %eax, %edx - cmpl $2048, %edx - ja .L_2TAG_PACKET_5.0.3 - addl $15344, %edx - pinsrw $3, %edx, %xmm6 - andpd %xmm4, %xmm0 - andpd %xmm4, %xmm1 - orpd %xmm6, %xmm0 - orpd %xmm7, %xmm1 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_10.0.3: - subl $880, %edx - mulsd %xmm3, %xmm0 - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl $0, %ecx - je .L_2TAG_PACKET_14.0.3 - jmp .L_2TAG_PACKET_11.0.3 -.L_2TAG_PACKET_12.0.3: - addl $880, %edx - mulsd %xmm3, %xmm1 - pextrw $3, %xmm1, %eax - andl $32752, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_15.0.3 - jmp .L_2TAG_PACKET_13.0.3 -.L_2TAG_PACKET_8.0.3: - movd %xmm0, %edx - movapd %xmm0, %xmm2 - psrlq $32, %xmm2 - movd %xmm2, %ecx - andl $1048575, %ecx - orl %edx, %ecx - cmpl $0, %ecx - jne .L_2TAG_PACKET_16.0.3 - psrlq $63, %xmm0 - psllq $63, %xmm0 - cmpl $32752, %eax - jae .L_2TAG_PACKET_17.0.3 - movapd 2624(%ebx), %xmm5 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - orpd %xmm5, %xmm0 -.L_2TAG_PACKET_18.0.3: - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_16.0.3: - addsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_17.0.3: - movd %xmm1, %eax - movapd %xmm1, %xmm2 - psrlq $32, %xmm2 - movd %xmm2, %ecx - movl $-2147483648, %edx - andl %ecx, %edx - andl $1048575, %ecx - orl %eax, %ecx - cmpl $0, %ecx - jne .L_2TAG_PACKET_19.0.3 - cmpl $0, %edx - jne .L_2TAG_PACKET_20.0.3 - movapd 2656(%ebx), %xmm5 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - orpd %xmm5, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_19.0.3: - movapd %xmm1, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_20.0.3: - movapd 2656(%ebx), %xmm5 - movapd 2624(%ebx), %xmm6 - addpd %xmm6, %xmm5 - pshufd $238, %xmm5, %xmm6 - addpd %xmm6, %xmm5 - orpd %xmm5, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_9.0.3: - movd %xmm1, %eax - movapd %xmm1, %xmm2 - psrlq $32, %xmm2 - movd %xmm2, %ecx - movl $-2147483648, %edx - andl %ecx, %edx - andl $1048575, %ecx - orl %eax, %ecx - cmpl $0, %ecx - jne .L_2TAG_PACKET_19.0.3 - psrlq $63, %xmm0 - psllq $63, %xmm0 - cmpl $0, %edx - jne .L_2TAG_PACKET_21.0.3 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_21.0.3: - movapd 2640(%ebx), %xmm5 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - orpd %xmm5, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_14.0.3: - pextrw $3, %xmm1, %edx - andl $32768, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_22.0.3 - movapd 2640(%ebx), %xmm5 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - comisd %xmm0, %xmm1 - orpd %xmm5, %xmm0 - jne .L_2TAG_PACKET_23.0.3 -.L_2TAG_PACKET_24.0.3: - movsd %xmm0, (%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 136(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $37, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_23.0.3: - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_22.0.3: - comisd %xmm0, %xmm1 - jne .L_2TAG_PACKET_23.0.3 - je .L_2TAG_PACKET_24.0.3 -.L_2TAG_PACKET_15.0.3: - movapd 2624(%ebx), %xmm5 - psrlq $63, %xmm0 - psllq $63, %xmm0 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - orpd %xmm5, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) -.L_2TAG_PACKET_4.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type atan2,@function - .size atan2,.-atan2 - .data -# -- End atan2 - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 3390881280 - .long 1067318733 - .long 1411116779 - .long 1018950063 - .long 2985987840 - .long 1067384211 - .long 2088903695 - .long 1018086027 - .long 3148445184 - .long 1067449685 - .long 2044163806 - .long 1017271335 - .long 3667629184 - .long 1067515494 - .long 2353092775 - .long 1019967309 - .long 1546568832 - .long 1067580954 - .long 611991315 - .long 1017602584 - .long 3815996800 - .long 1067646404 - .long 466038598 - .long 1019686426 - .long 4050241920 - .long 1067711845 - .long 3265026328 - .long 1019626952 - .long 120454912 - .long 1067777277 - .long 1542207696 - .long 1020155608 - .long 2784639744 - .long 1067842697 - .long 3883834623 - .long 1018602870 - .long 1328010624 - .long 1067908107 - .long 1791097456 - .long 1019053126 - .long 2217794048 - .long 1067973505 - .long 551619938 - .long 1018494194 - .long 3333520000 - .long 1068038891 - .long 2390331823 - .long 1019033022 - .long 2557052032 - .long 1068104265 - .long 2423976108 - .long 1019728674 - .long 2067649536 - .long 1068169626 - .long 3757397745 - .long 1018672362 - .long 4047094784 - .long 1068234973 - .long 481613184 - .long 1019275104 - .long 2089853184 - .long 1068300307 - .long 1733914374 - .long 1020124677 - .long 2678003840 - .long 1068365626 - .long 1373600282 - .long 1013935474 - .long 3706496128 - .long 1068430930 - .long 1000610902 - .long 1019673285 - .long 3073179008 - .long 1068496219 - .long 1497143008 - .long 1019900342 - .long 2803716736 - .long 1068562846 - .long 1476677416 - .long 1019444094 - .long 3204984128 - .long 1068628077 - .long 1192335905 - .long 1018748628 - .long 831146624 - .long 1068693273 - .long 2733586224 - .long 1018823295 - .long 243029376 - .long 1068758431 - .long 950106081 - .long 1019046675 - .long 1735561920 - .long 1068823549 - .long 3546440856 - .long 1020104712 - .long 1339217792 - .long 1068888626 - .long 3028812387 - .long 1019818321 - .long 3706342144 - .long 1068953659 - .long 3814564029 - .long 1017763871 - .long 637726976 - .long 1069018648 - .long 3584007699 - .long 1017976868 - .long 1148779264 - .long 1069083589 - .long 2282532133 - .long 1019483954 - .long 1406131392 - .long 1069148481 - .long 1547359113 - .long 1019786342 - .long 1908875904 - .long 1069213322 - .long 1315508410 - .long 1020009473 - .long 3194947520 - .long 1069278110 - .long 3845393201 - .long 1015803761 - .long 1547487744 - .long 1069342844 - .long 3863107865 - .long 1019810104 - .long 1881061952 - .long 1069407521 - .long 4288343548 - .long 1019687581 - .long 563086336 - .long 1069472140 - .long 2582230241 - .long 1020099350 - .long 2594975552 - .long 1069536698 - .long 2306443764 - .long 1019667244 - .long 3438545024 - .long 1069606573 - .long 957455549 - .long 1015587735 - .long 4211357472 - .long 1069670906 - .long 2611778754 - .long 1017877214 - .long 3002835424 - .long 1069735101 - .long 235580458 - .long 1020211685 - .long 3905315424 - .long 1069799150 - .long 3630647617 - .long 1018736849 - .long 2849656576 - .long 1069863047 - .long 2412165062 - .long 1019693004 - .long 507429472 - .long 1069926785 - .long 1397750723 - .long 1018412717 - .long 2307470272 - .long 1069990356 - .long 1796470904 - .long 1019796181 - .long 1271814912 - .long 1070053755 - .long 189761565 - .long 1016149115 - .long 3800538144 - .long 1070116974 - .long 2524871582 - .long 1018263353 - .long 3916203552 - .long 1070180008 - .long 127848658 - .long 1017672664 - .long 457192032 - .long 1070242851 - .long 4020400938 - .long 1019823010 - .long 1385324704 - .long 1070305495 - .long 564511179 - .long 1016079094 - .long 2322869856 - .long 1070367935 - .long 2347103319 - .long 1018927760 - .long 3743438624 - .long 1070430165 - .long 877973862 - .long 1019638162 - .long 2392255552 - .long 1070492180 - .long 2432782267 - .long 1018872629 - .long 4180443328 - .long 1070553973 - .long 3102990015 - .long 1020093101 - .long 2547540832 - .long 1070636485 - .long 3877738253 - .long 1017300424 - .long 2735468912 - .long 1070697461 - .long 2446470256 - .long 1019235378 - .long 542633792 - .long 1070757943 - .long 583606328 - .long 1018624131 - .long 923265984 - .long 1070817911 - .long 1793926708 - .long 1019714161 - .long 918728448 - .long 1070877348 - .long 3726463586 - .long 1019433296 - .long 2572275008 - .long 1070936237 - .long 1845354238 - .long 1019459238 - .long 50974688 - .long 1070994564 - .long 983808064 - .long 1016685418 - .long 1105518320 - .long 1071052313 - .long 2357496692 - .long 1015139882 - .long 1264825328 - .long 1071109472 - .long 2244129354 - .long 1019046344 - .long 961157920 - .long 1071166029 - .long 3124185339 - .long 1018541776 - .long 1162701584 - .long 1071221973 - .long 1279780948 - .long 1019268918 - .long 3284935664 - .long 1071277294 - .long 2670033472 - .long 1019833744 - .long 497441888 - .long 1071331985 - .long 1032737410 - .long 1019795212 - .long 3377383904 - .long 1071386036 - .long 2356897182 - .long 1020205553 - .long 1126962000 - .long 1071439443 - .long 3723724586 - .long 1015212418 - .long 90291008 - .long 1071492199 - .long 4178672431 - .long 1020186971 - .long 190059536 - .long 1071595741 - .long 1763589807 - .long 1019162163 - .long 2497392840 - .long 1071670654 - .long 3036997041 - .long 1020204325 - .long 2616971944 - .long 1071719773 - .long 300151069 - .long 1017041957 - .long 2883518128 - .long 1071767563 - .long 2203981414 - .long 1019190108 - .long 1496354352 - .long 1071814030 - .long 332287966 - .long 1016846435 - .long 483276728 - .long 1071859184 - .long 653845024 - .long 1018830914 - .long 3097401072 - .long 1071903039 - .long 1514746408 - .long 1019278972 - .long 2737217248 - .long 1071945615 - .long 1358845067 - .long 1017268275 - .long 2072577560 - .long 1071986933 - .long 3041024735 - .long 1019929672 - .long 2266405656 - .long 1072027017 - .long 1271261130 - .long 1012925070 - .long 958652544 - .long 1072065894 - .long 2158017058 - .long 1019955372 - .long 3312993840 - .long 1072103591 - .long 765809169 - .long 1019114443 - .long 3177001304 - .long 1072140139 - .long 144180084 - .long 1019822186 - .long 3071642184 - .long 1072175568 - .long 4004602424 - .long 1019420740 - .long 4283953648 - .long 1072209909 - .long 1511950430 - .long 1020176966 - .long 1413754136 - .long 1072243195 - .long 856972295 - .long 1015129638 - .long 4073202944 - .long 1072306725 - .long 4068194804 - .long 1019714860 - .long 946117760 - .long 1072366415 - .long 694980733 - .long 1020150135 - .long 3980632032 - .long 1072422512 - .long 1313251280 - .long 1019948709 - .long 1468297112 - .long 1072475260 - .long 330111143 - .long 1019809198 - .long 3478063816 - .long 1072524887 - .long 2930067044 - .long 1017784081 - .long 1153979856 - .long 1072571613 - .long 2225786102 - .long 1017634481 - .long 2089828808 - .long 1072615641 - .long 474621367 - .long 1017043414 - .long 3531732632 - .long 1072657163 - .long 2276396220 - .long 1018757240 - .long 775214612 - .long 1072694803 - .long 3209744818 - .long 1019963015 - .long 662307284 - .long 1072713319 - .long 1381696763 - .long 1019763781 - .long 1192776652 - .long 1072730830 - .long 3017932994 - .long 1015179769 - .long 744202396 - .long 1072747407 - .long 2073854034 - .long 1019512292 - .long 8337908 - .long 1072763115 - .long 16004448 - .long 1019599514 - .long 3589868768 - .long 1072778013 - .long 1374369804 - .long 1018019237 - .long 121647320 - .long 1072792159 - .long 128481634 - .long 1018115438 - .long 2464923204 - .long 1072805601 - .long 1787331214 - .long 1016798022 - .long 4093304372 - .long 1072830562 - .long 3306868969 - .long 1019384078 - .long 1436891684 - .long 1072853231 - .long 676347266 - .long 1017302183 - .long 1104571840 - .long 1072873890 - .long 2870400285 - .long 1019938149 - .long 2037009832 - .long 1072892781 - .long 2956702105 - .long 1016472908 - .long 3139037960 - .long 1072910111 - .long 916057147 - .long 1018364335 - .long 1826698064 - .long 1072926058 - .long 2171961098 - .long 1019669816 - .long 1353941060 - .long 1072940774 - .long 1722928782 - .long 1019926215 - .long 1803191644 - .long 1072954391 - .long 1547878639 - .long 1020259262 - .long 1092591296 - .long 1072967024 - .long 3070107923 - .long 1018320401 - .long 2205372832 - .long 1072978772 - .long 787328196 - .long 1014621351 - .long 1291577100 - .long 1072989723 - .long 2964757301 - .long 1020242528 - .long 4234512804 - .long 1072999952 - .long 3136030038 - .long 1017522144 - .long 3248069132 - .long 1073009528 - .long 1506192355 - .long 1018050472 - .long 3932628500 - .long 1073018509 - .long 1045823554 - .long 1019946655 - .long 4195697848 - .long 1073026948 - .long 233443322 - .long 1018917447 - .long 2501811452 - .long 1073034892 - .long 901427976 - .long 1017333852 - .long 866379428 - .long 1073049455 - .long 2437443742 - .long 1019678792 - .long 1376865888 - .long 1073062480 - .long 3365790232 - .long 1014547152 - .long 3290094268 - .long 1073074195 - .long 3898947415 - .long 1018683566 - .long 354764884 - .long 1073084787 - .long 3854322404 - .long 1019662058 - .long 3332975496 - .long 1073094406 - .long 3171701655 - .long 1017830922 - .long 1141460088 - .long 1073103181 - .long 3946082701 - .long 1020032019 - .long 745761284 - .long 1073111216 - .long 1347210591 - .long 1019106121 - .long 1673304508 - .long 1073118600 - .long 1760606642 - .long 1017324577 - .long 983388240 - .long 1073125409 - .long 3740651204 - .long 1019514104 - .long 3895509100 - .long 1073131706 - .long 2409629983 - .long 1020069322 - .long 2128523668 - .long 1073137548 - .long 3045605368 - .long 1018579174 - .long 2075485692 - .long 1073142981 - .long 3720571789 - .long 1017557436 - .long 121855976 - .long 1073148047 - .long 2391744767 - .long 1020160645 - .long 4181733780 - .long 1073152780 - .long 995028816 - .long 1019681295 - .long 2887813280 - .long 1073157214 - .long 218733247 - .long 1020003509 - .long 2862180896 - .long 1073161375 - .long 2043806490 - .long 1018602288 - .long 3909375184 - .long 1073168973 - .long 1559903412 - .long 1020103444 - .long 3533966292 - .long 1073175738 - .long 734884149 - .long 1018462962 - .long 3815044608 - .long 1073181799 - .long 3630523428 - .long 1017250093 - .long 739639376 - .long 1073187261 - .long 4167476661 - .long 1020008277 - .long 1068309648 - .long 1073192207 - .long 2110061437 - .long 1019295858 - .long 2350566352 - .long 1073196707 - .long 582596516 - .long 1018568821 - .long 2529520024 - .long 1073200819 - .long 745552787 - .long 1019053165 - .long 1841667508 - .long 1073204591 - .long 3982568700 - .long 1016503327 - .long 2242261080 - .long 1073208063 - .long 3433582258 - .long 1016196763 - .long 715134328 - .long 1073211270 - .long 355901358 - .long 1020087916 - .long 2700735876 - .long 1073214240 - .long 3640957736 - .long 1019780205 - .long 141607580 - .long 1073217000 - .long 2488245051 - .long 1020262395 - .long 287934404 - .long 1073219570 - .long 2392691085 - .long 1019883292 - .long 2363373988 - .long 1073221969 - .long 4194561737 - .long 1019237447 - .long 3829340424 - .long 1073224214 - .long 429455526 - .long 1019490975 - .long 1988805928 - .long 1073226320 - .long 3029848706 - .long 1018104889 - .long 1647572320 - .long 1073230161 - .long 10289938 - .long 1017394880 - .long 3988000624 - .long 1073233576 - .long 1957559169 - .long 1019434816 - .long 4263843944 - .long 1073236633 - .long 204710264 - .long 1019908761 - .long 663197724 - .long 1073239386 - .long 1921757578 - .long 1019778948 - .long 3560800700 - .long 1073241876 - .long 3994348896 - .long 1019230192 - .long 2441785656 - .long 1073244141 - .long 871468611 - .long 1014800505 - .long 3277400272 - .long 1073246209 - .long 4092218139 - .long 1020040842 - .long 3951990120 - .long 1073248105 - .long 4276546478 - .long 1019763677 - .long 2737338540 - .long 1073249850 - .long 252776012 - .long 1018794951 - .long 1511361316 - .long 1073251461 - .long 3119653999 - .long 1018514803 - .long 3969162516 - .long 1073252952 - .long 1037069016 - .long 1016792900 - .long 413985240 - .long 1073254338 - .long 4110171432 - .long 1020001345 - .long 3681283576 - .long 1073255627 - .long 1463092818 - .long 1020260354 - .long 3146455488 - .long 1073256831 - .long 1031209123 - .long 1016554799 - .long 95214512 - .long 1073257958 - .long 1373808632 - .long 1019493031 - .long 4250240828 - .long 1073259013 - .long 3891047882 - .long 1020108730 - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .long 1413754136 - .long 1074340347 - .long 856972295 - .long 1017226790 - .long 1413754136 - .long 1072243195 - .long 856972295 - .long 1015129638 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1413754136 - .long 1074340347 - .long 856972295 - .long 1017226790 - .long 1413754136 - .long 3221823995 - .long 856972295 - .long 3164710438 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 856972295 - .long 1017226790 - .long 1413754136 - .long 1074340347 - .long 856972295 - .long 3164710438 - .long 1413754136 - .long 3221823995 - .long 0 - .long 0 - .long 4294967295 - .long 4294967295 - .long 0 - .long 0 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 0 - .long 0 - .long 4294967295 - .long 4294967295 - .long 0 - .long 0 - .long 2006262985 - .long 1069310863 - .long 2358449471 - .long 3217342131 - .long 3845454352 - .long 1069952297 - .long 2829679149 - .long 1073771565 - .long 4294967295 - .long 2148532223 - .long 0 - .long 0 - .long 0 - .long 1130364928 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,3024 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2dl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2dl.S deleted file mode 100644 index b468d4da20..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2dl.S +++ /dev/null @@ -1,1431 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan2dl.c" - .text -..TXTST0: -# -- Begin atand2l - .text - .align 16,0x90 - .globl atand2l -atand2l: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %ebx - subl $60, %esp - fldt 8(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpt (%esp) - fldt 20(%ebp) - fstpt 12(%esp) - call atan2dl@PLT -..B1.2: - addl $60, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type atand2l,@function - .size atand2l,.-atand2l - .data -# -- End atand2l - .text -# -- Begin atan2dl - .text - .align 16,0x90 - .globl atan2dl -atan2dl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $68, %esp -..B2.2: - fnstcw 62(%esp) -..B2.3: - movzbl 29(%ebp), %ecx - movzbl 17(%ebp), %esi - andl $128, %ecx - movzwl 16(%ebp), %edi - andl $128, %esi - andl $32767, %edi - movzwl 28(%ebp), %ebx - shrl $7, %ecx - andl $32767, %ebx - shrl $7, %esi - call ..L4 -..L4: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%edx), %edx - cmpl $32767, %edi - je ..B2.114 -..B2.4: - cmpl $32767, %ebx - je ..B2.95 -..B2.5: - testl %edi, %edi - jne ..B2.8 -..B2.6: - cmpl $0, 12(%ebp) - jne ..B2.8 -..B2.7: - cmpl $0, 8(%ebp) - je ..B2.13 -..B2.8: - testl %ebx, %ebx - jne ..B2.29 -..B2.9: - cmpl $0, 24(%ebp) - jne ..B2.29 -..B2.10: - cmpl $0, 20(%ebp) - jne ..B2.29 -..B2.11: - testl %edi, %edi - jne ..B2.25 -..B2.12: - cmpl $0, 12(%ebp) - je ..B2.122 - jmp ..B2.23 -..B2.13: - jne ..B2.23 -..B2.14: - testl %ebx, %ebx - jne ..B2.19 -..B2.15: - cmpl $0, 24(%ebp) - jne ..B2.18 -..B2.16: - cmpl $0, 20(%ebp) - je ..B2.89 -..B2.17: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 40(%esp) - jmp ..B2.19 -..B2.18: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 40(%esp) -..B2.19: - testl %ecx, %ecx - je ..B2.21 -..B2.20: - fldl c180@GOTOFF(%edx,%esi,8) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.21: - fldl _zeros@GOTOFF(%edx,%esi,8) -..B2.22: - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.23: - testl %ebx, %ebx - jne ..B2.29 -..B2.24: - cmpl $0, 24(%ebp) - jne ..B2.29 -..B2.25: - cmpl $0, 20(%ebp) - jne ..B2.29 -..B2.26: - testl %edi, %edi - jne ..B2.28 -..B2.27: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 40(%esp) -..B2.28: - fldl c90@GOTOFF(%edx,%esi,8) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.29: - cmpl %edi, %ebx - jne ..B2.35 -..B2.30: - movl 24(%ebp), %eax - cmpl 12(%ebp), %eax - jne ..B2.35 -..B2.31: - movl 20(%ebp), %eax - cmpl 8(%ebp), %eax - jne ..B2.35 -..B2.32: - orl %edi, %ebx - jne ..B2.34 -..B2.33: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 40(%esp) -..B2.34: - lea (%esi,%ecx,2), %eax - fldl exact@GOTOFF(%edx,%eax,8) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.35: - movzwl 62(%esp), %eax - movl %eax, (%esp) - andl $3840, %eax - cmpl $768, %eax - je ..B2.94 -..B2.36: - movl (%esp), %eax - andl $-3841, %eax - orl $-64768, %eax - movw %ax, 60(%esp) -..B2.37: - fldcw 60(%esp) -..B2.38: - movl $1, 36(%esp) -..B2.39: - cmpl $8191, %ebx - jg ..B2.43 -..B2.40: - cmpl $8191, %edi - jg ..B2.42 -..B2.41: - fldt _TWO_8192@GOTOFF(%edx) - fldt 20(%ebp) - fmul %st(1), %st - fstpt 20(%ebp) - fldt 20(%ebp) - fldt 8(%ebp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - movzwl 28(%ebp), %ebx - movzwl 16(%ebp), %edi - andl $32767, %ebx - andl $32767, %edi - jmp ..B2.44 -..B2.42: - fldt 20(%ebp) - fldt 8(%ebp) - jmp ..B2.47 -..B2.43: - fldt 20(%ebp) - fldt 8(%ebp) -..B2.44: - cmpl $24575, %ebx - jl ..B2.47 -..B2.45: - cmpl $24575, %edi - jl ..B2.47 -..B2.46: - fldt 12+_TWO_8192@GOTOFF(%edx) - fmul %st, %st(2) - fxch %st(2) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - movzwl 28(%ebp), %ebx - movzwl 16(%ebp), %edi - andl $32767, %ebx - andl $32767, %edi -..B2.47: - fxch %st(1) - fmull _ones@GOTOFF(%edx,%ecx,8) - fld %st(1) - fldl _ones@GOTOFF(%edx,%esi,8) - fmul %st, %st(1) - fxch %st(2) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.75 -..B2.48: - lea 12(%edi), %eax - cmpl %eax, %ebx - jle ..B2.71 -..B2.49: - lea 75(%edi), %eax - cmpl %eax, %ebx - jle ..B2.68 -..B2.50: - fstp %st(0) - fstp %st(0) - fstp %st(0) - testl %ecx, %ecx - je ..B2.52 -..B2.51: - fstp %st(0) - lea (,%esi,8), %eax - lea (%eax,%esi,4), %ecx - fldt _small_value_80@GOTOFF(%edx,%ecx) - fsubrl c180@GOTOFF(%edx,%esi,8) - fstpt 48(%esp) - jmp ..B2.86 -..B2.52: - testl %edi, %edi - jle ..B2.93 -..B2.53: - fstp %st(0) - xorl %eax, %eax -..B2.54: - fldl _TWO_32H@GOTOFF(%edx) - shll $15, %ecx - fld %st(0) - orl $-49153, %ecx - movw %cx, 28(%ebp) - fldt 20(%ebp) - fld %st(0) - fmul %st(3), %st - fld %st(1) - shll $15, %esi - fsubr %st(1), %st - movzwl 16(%ebp), %edi - orl $-49153, %esi - movw %si, 16(%ebp) - andl $32767, %edi - subl %edi, %ebx - fsubrp %st, %st(1) - fld %st(1) - cmpl $16382, %ebx - fsub %st(1), %st - fxch %st(2) - fstpt 24(%esp) - fldt 24(%esp) - fldl _ones@GOTOFF(%edx) - fld %st(0) - fdivp %st, %st(2) - fxch %st(1) - fmul %st, %st(4) - fld %st(4) - fsub %st(1), %st - fsubrp %st, %st(5) - fld %st(4) - fsubr %st(1), %st - fld %st(3) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(2) - fxch %st(3) - fmul %st(5), %st - fsubr %st(2), %st - fsubp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(2) - fldl _C180byPi@GOTOFF(%edx) - fmul %st, %st(4) - fmulp %st, %st(2) - fldl 8+_C180byPi@GOTOFF(%edx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 8(%ebp) - fld %st(0) - fmul %st(5), %st - fld %st(1) - fsubr %st(1), %st - fsubrp %st, %st(1) - fxch %st(4) - fmul %st, %st(5) - fld %st(5) - fsub %st(1), %st - fsubrp %st, %st(6) - fsub %st(5), %st - faddp %st, %st(2) - fmul %st, %st(1) - fld %st(0) - fsub %st(4), %st - fmul %st(5), %st - faddp %st, %st(2) - fld %st(1) - fxch %st(5) - fmulp %st, %st(4) - fxch %st(3) - fadd %st, %st(4) - fld %st(4) - fxch %st(1) - fsub %st(5), %st - faddp %st, %st(2) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fmul %st(5), %st - fsubr %st, %st(1) - fxch %st(1) - fchs - fsubrp %st, %st(1) - fstpt 48(%esp) - fldt 48(%esp) - fsubrp %st, %st(4) - fxch %st(3) - fstpt 12(%esp) - fldt 12(%esp) - faddp %st, %st(3) - jl ..B2.58 -..B2.55: - fldt _small@GOTOFF(%edx) - addl $-16318, %ebx - fmul %st, %st(3) - cmpl $16382, %ebx - fldt 48(%esp) - fmul %st(1), %st - fstpt 48(%esp) - jl ..B2.57 -..B2.56: - fldt 48(%esp) - addl $-16318, %ebx - fmul %st(1), %st - fstpt 48(%esp) - fldt 48(%esp) - fstpt (%esp) - fmulp %st, %st(3) - jmp ..B2.59 -..B2.57: - fstp %st(0) - fldt 48(%esp) - fstpt (%esp) - jmp ..B2.59 -..B2.58: - fldt 48(%esp) - fstpt (%esp) -..B2.59: - movl %ebx, %ecx - negl %ecx - addl $16383, %ecx - fstpt 12(%esp) - testl %eax, %eax - movw %cx, 20(%esp) - je ..B2.61 -..B2.60: - fldt 12(%esp) - fmull 8+_two64@GOTOFF(%edx) - fstpt 12(%esp) - fldt 12(%esp) - jmp ..B2.62 -..B2.61: - fldt 12(%esp) -..B2.62: - movzwl 8(%esp), %ecx - andl $32767, %ecx - subl %eax, %ecx - subl %ebx, %ecx - cmpl $-9, %ecx - jl ..B2.65 -..B2.63: - testl %ecx, %ecx - jg ..B2.65 -..B2.64: - fldt 48(%esp) - fmul %st(1), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - jmp ..B2.66 -..B2.65: - fldt 48(%esp) - faddp %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) -..B2.66: - fldl _zeros@GOTOFF(%edx) - fldt 48(%esp) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.123 - je ..B2.67 -..B2.123: - fstp %st(0) - fstp %st(0) - jmp ..B2.86 -..B2.67: - fldt 24(%esp) - fdivrp %st, %st(2) - fmulp %st, %st(1) - fstpt 48(%esp) - jmp ..B2.86 -..B2.68: - fstp %st(3) - testl %ecx, %ecx - je ..B2.70 -..B2.69: - fldl _TWO_32H@GOTOFF(%edx) - fxch %st(3) - fdivrp %st, %st(1) - fmul %st, %st(2) - fld %st(2) - fadd %st(1), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubp %st, %st(3) - fld %st(2) - fsubr %st(1), %st - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fxch %st(3) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _C180byPi@GOTOFF(%edx) - fmul %st, %st(6) - fmulp %st, %st(3) - fldl 8+_C180byPi@GOTOFF(%edx) - fmul %st(2), %st - faddp %st, %st(3) - fldt 36+_P@GOTOFF(%edx) - fmul %st(4), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(5) - fldt _P@GOTOFF(%edx) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fsubrl 8200+__libm_atandl_table_128@GOTOFF(%edx) - faddl 8192+__libm_atandl_table_128@GOTOFF(%edx) - fmulp %st, %st(1) - fstpt 48(%esp) - jmp ..B2.86 -..B2.70: - fldt 36+_P@GOTOFF(%edx) - fld %st(1) - fdiv %st(4), %st - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(3) - fxch %st(5) - fstpl 24(%esp) - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(5) - fldt _P@GOTOFF(%edx) - faddp %st, %st(5) - fxch %st(2) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fld %st(1) - fld %st(1) - fld %st(3) - fld %st(3) - fldl _TWO_32H@GOTOFF(%edx) - fmul %st, %st(4) - fxch %st(2) - fadd %st(4), %st - fsubp %st, %st(4) - fxch %st(3) - fsubr %st, %st(5) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(3) - fsub %st(3), %st - fld %st(2) - fxch %st(5) - fmull 8+_C180byPi@GOTOFF(%edx) - fldl _C180byPi@GOTOFF(%edx) - fmul %st, %st(5) - fxch %st(5) - fmul %st, %st(6) - fxch %st(5) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(5) - fadd %st(2), %st - fld %st(4) - fadd %st(6), %st - fsubp %st, %st(6) - fxch %st(4) - fsub %st(5), %st - faddp %st, %st(1) - fxch %st(3) - fdivrl _ones@GOTOFF(%edx) - fmul %st, %st(2) - fld %st(2) - fadd %st(1), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubp %st, %st(3) - fld %st(2) - fsubr %st(1), %st - fld %st(2) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(7) - faddp %st, %st(2) - fxch %st(2) - fmul %st(3), %st - fldt (%esp) - fxch %st(1) - faddl 8+_ones@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(6) - fxch %st(5) - fsubrp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fxch %st(3) - fadd %st(4), %st - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmull 24(%esp) - fstpt 48(%esp) - jmp ..B2.86 -..B2.71: - fstp %st(3) - fldl _TWO_63H@GOTOFF(%edx) - fld %st(1) - fxch %st(3) - fstpl 24(%esp) - fld %st(3) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(3), %st - fdiv %st(5), %st - fadd %st(2), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubp %st, %st(2) - fld %st(4) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmulp %st, %st(3) - fld %st(3) - fldl _TWO_48H@GOTOFF(%edx) - fmul %st, %st(6) - movl 12(%esp), %eax - fxch %st(1) - fadd %st(6), %st - shll $4, %eax - fsubp %st, %st(6) - testl %ecx, %ecx - fxch %st(4) - fsub %st(5), %st - fld %st(0) - fmul %st(4), %st - fxch %st(3) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(6) - fxch %st(2) - fadd %st(6), %st - fld %st(5) - fmul %st(4), %st - fadd %st(3), %st - fxch %st(4) - fmul %st, %st(7) - fxch %st(7) - fsubrp %st, %st(2) - fld %st(3) - fadd %st(1), %st - fxch %st(3) - fmulp %st, %st(7) - fxch %st(6) - fsubrp %st, %st(5) - fld %st(2) - fxch %st(2) - fdivrl _ones@GOTOFF(%edx) - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubp %st, %st(5) - fld %st(4) - fsubr %st(1), %st - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(7) - fxch %st(7) - faddp %st, %st(3) - fxch %st(3) - fmul %st(4), %st - faddl 8+_ones@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(4) - fsubrp %st, %st(1) - fld %st(1) - fmul %st(4), %st - fxch %st(3) - fadd %st, %st(4) - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fld %st(2) - fxch %st(4) - fmulp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fadd %st(2), %st - fmul %st, %st(4) - fld %st(3) - fmul %st(3), %st - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fxch %st(1) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(4) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _C180byPi@GOTOFF(%edx) - fmul %st, %st(3) - fmulp %st, %st(4) - fldl 8+_C180byPi@GOTOFF(%edx) - fmul %st(5), %st - faddp %st, %st(4) - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(3) - fldt _P@GOTOFF(%edx) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldl 24(%esp) - je ..B2.73 -..B2.72: - negl %eax - fld %st(2) - fldl 8192+__libm_atandl_table_128@GOTOFF(%edx,%eax) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fldl 8200+__libm_atandl_table_128@GOTOFF(%edx,%eax) - fsubp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - jmp ..B2.74 -..B2.73: - fldl __libm_atandl_table_128@GOTOFF(%eax,%edx) - fld %st(3) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fxch %st(2) - faddl 8+__libm_atandl_table_128@GOTOFF(%eax,%edx) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 48(%esp) -..B2.74: - fldt 48(%esp) - fmulp %st, %st(1) - fstpt 48(%esp) - jmp ..B2.86 -..B2.75: - fstp %st(3) - lea 12(%ebx), %eax - cmpl %eax, %edi - jle ..B2.82 -..B2.76: - addl $75, %ebx - cmpl %ebx, %edi - jle ..B2.78 -..B2.77: - fstp %st(2) - fstp %st(1) - fstp %st(0) - lea (,%esi,8), %eax - lea (%eax,%esi,4), %ecx - fldt _small_value_80@GOTOFF(%edx,%ecx) - fsubrl c90@GOTOFF(%edx,%esi,8) - fstpt 48(%esp) - jmp ..B2.86 -..B2.78: - fldl _TWO_32H@GOTOFF(%edx) - testl %ecx, %ecx - fxch %st(1) - fdivrp %st, %st(3) - fmul %st(2), %st - fld %st(0) - fadd %st(3), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubp %st, %st(1) - fld %st(0) - fsubr %st(3), %st - fld %st(3) - fmul %st(4), %st - fld %st(0) - fmul %st(1), %st - fxch %st(5) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _C180byPi@GOTOFF(%edx) - fmul %st, %st(4) - fmulp %st, %st(3) - fldl 8+_C180byPi@GOTOFF(%edx) - fmul %st(2), %st - faddp %st, %st(3) - fldt 36+_P@GOTOFF(%edx) - fmul %st(6), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(6), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(7) - fldt _P@GOTOFF(%edx) - faddp %st, %st(7) - fxch %st(1) - fmulp %st, %st(6) - faddp %st, %st(5) - fmulp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fldl 4096+__libm_atandl_table_128@GOTOFF(%edx) - fstpt 48(%esp) - fldl 4104+__libm_atandl_table_128@GOTOFF(%edx) - je ..B2.80 -..B2.79: - fldt 48(%esp) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - jmp ..B2.81 -..B2.80: - fldt 48(%esp) - fxch %st(3) - fsubrp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) -..B2.81: - fldt 48(%esp) - fmulp %st, %st(1) - fstpt 48(%esp) - jmp ..B2.86 -..B2.82: - fldl _TWO_63H@GOTOFF(%edx) - fld %st(3) - fxch %st(3) - fstpl 24(%esp) - fld %st(1) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(5), %st - fdiv %st(3), %st - fadd %st(2), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubp %st, %st(2) - fld %st(4) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmulp %st, %st(3) - fld %st(3) - fldl _TWO_48H@GOTOFF(%edx) - fmul %st, %st(6) - movl 12(%esp), %eax - fxch %st(2) - fadd %st(6), %st - shll $4, %eax - fsubp %st, %st(6) - fld %st(5) - testl %ecx, %ecx - fmul %st(4), %st - fxch %st(6) - fsubr %st, %st(7) - fxch %st(2) - fmul %st, %st(3) - fxch %st(1) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fld %st(6) - fmul %st(4), %st - fadd %st(5), %st - fxch %st(4) - fmul %st, %st(5) - fxch %st(5) - fsubrp %st, %st(7) - fmul %st, %st(4) - fxch %st(4) - fsubrp %st, %st(1) - fxch %st(3) - faddp %st, %st(4) - fld %st(3) - fadd %st(2), %st - fld %st(4) - fxch %st(1) - fdivrl _ones@GOTOFF(%edx) - fmul %st, %st(2) - fld %st(2) - fadd %st(1), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubp %st, %st(3) - fld %st(2) - fsubr %st(1), %st - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddl 8+_ones@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(2) - fsubp %st, %st(1) - fld %st(2) - fmul %st(4), %st - fxch %st(2) - fadd %st, %st(4) - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fld %st(1) - fxch %st(4) - fmulp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fadd %st(3), %st - fmul %st, %st(4) - fld %st(2) - fmul %st(4), %st - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fxch %st(1) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(4) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _C180byPi@GOTOFF(%edx) - fmul %st, %st(4) - fmulp %st, %st(3) - fldl 8+_C180byPi@GOTOFF(%edx) - fmul %st(5), %st - faddp %st, %st(3) - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(3) - fldt _P@GOTOFF(%edx) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fldl 24(%esp) - je ..B2.84 -..B2.83: - fldl 4096+__libm_atandl_table_128@GOTOFF(%edx,%eax) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(3) - faddl 4104+__libm_atandl_table_128@GOTOFF(%edx,%eax) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - jmp ..B2.85 -..B2.84: - negl %eax - fld %st(1) - fldl 4096+__libm_atandl_table_128@GOTOFF(%edx,%eax) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(3) - fldl 4104+__libm_atandl_table_128@GOTOFF(%edx,%eax) - fsubp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 48(%esp) -..B2.85: - fldt 48(%esp) - fmulp %st, %st(1) - fstpt 48(%esp) -..B2.86: - cmpl $0, 36(%esp) - je ..B2.88 -..B2.87: - fldcw 62(%esp) -..B2.88: - fldt 48(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.89: - testl %ecx, %ecx - je ..B2.91 -..B2.90: - fldl c180@GOTOFF(%edx,%esi,8) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.91: - fldl _zeros@GOTOFF(%edx,%esi,8) -..B2.92: - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.93: - fmull _two64@GOTOFF(%edx) - movl $64, %eax - fstpt 8(%ebp) - jmp ..B2.54 -..B2.94: - movl $0, 36(%esp) - jmp ..B2.39 -..B2.95: - cmpl $-2147483648, 24(%ebp) - jne ..B2.109 -..B2.96: - cmpl $0, 20(%ebp) - jne ..B2.109 -..B2.97: - testl %edi, %edi - jne ..B2.104 -..B2.98: - cmpl $0, 12(%ebp) - jne ..B2.100 -..B2.99: - cmpl $0, 8(%ebp) - je ..B2.103 -..B2.100: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 40(%esp) -..B2.101: - cmpl $32767, %ebx - je ..B2.104 -..B2.102: - fldl c90@GOTOFF(%edx,%esi,8) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.103: - shll $3, %esi - jmp ..B2.105 -..B2.104: - shll $3, %esi - cmpl $32767, %edi - je ..B2.110 -..B2.105: - testl %ecx, %ecx - je ..B2.107 -..B2.106: - fldl c180@GOTOFF(%esi,%edx) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.107: - fldl _zeros@GOTOFF(%esi,%edx) -..B2.108: - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.109: - fldt 20(%ebp) - fldt 8(%ebp) - fmulp %st, %st(1) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.110: - testl %ecx, %ecx - je ..B2.112 -..B2.111: - fldl c135@GOTOFF(%edx,%esi) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.112: - fldl c45@GOTOFF(%edx,%esi) -..B2.113: - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.114: - cmpl $-2147483648, 12(%ebp) - jne ..B2.109 -..B2.115: - cmpl $0, 8(%ebp) - jne ..B2.109 -..B2.116: - cmpl $32767, %ebx - je ..B2.95 -..B2.117: - testl %ebx, %ebx - jne ..B2.101 -..B2.118: - cmpl $0, 24(%ebp) - jne ..B2.100 -..B2.119: - cmpl $0, 20(%ebp) - jne ..B2.100 - jmp ..B2.102 -..B2.122: - cmpl $0, 8(%ebp) - je ..B2.14 - jmp ..B2.23 - .align 16,0x90 - .type atan2dl,@function - .size atan2dl,.-atan2dl - .data -# -- End atan2dl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x80,0x13,0x40,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 16 -_TWO_8192: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .type _TWO_8192,@object - .size _TWO_8192,24 - .space 8, 0x00 # pad - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .space 8, 0x00 # pad - .align 16 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .space 8, 0x00 # pad - .align 16 -_C180byPi: - .long 442499072 - .long 1078765020 - .long 3272251219 - .long 1042157501 - .type _C180byPi,@object - .size _C180byPi,16 - .align 16 -_small: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 65 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32769 - .word 0 - .type _small,@object - .size _small,24 - .space 8, 0x00 # pad - .align 16 -_two64: - .long 0 - .long 1139802112 - .long 0 - .long 1005584384 - .type _two64,@object - .size _two64,16 - .align 16 -_P: - .word 54228 - .word 26975 - .word 60215 - .word 39113 - .word 49155 - .word 0 - .word 30637 - .word 6142 - .word 46044 - .word 46936 - .word 16386 - .word 0 - .word 47408 - .word 26349 - .word 14153 - .word 33526 - .word 49154 - .word 0 - .word 53934 - .word 32714 - .word 35699 - .word 52145 - .word 16385 - .word 0 - .type _P,@object - .size _P,48 - .align 16 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .space 8, 0x00 # pad - .align 16 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 8 -c180: - .long 0x00000000,0x40668000 - .long 0x00000000,0xc0668000 - .type c180,@object - .size c180,16 - .align 8 -c90: - .long 0x00000000,0x40568000 - .long 0x00000000,0xc0568000 - .type c90,@object - .size c90,16 - .align 8 -exact: - .long 0x00000000,0x40468000 - .long 0x00000000,0xc0468000 - .long 0x00000000,0x4060e000 - .long 0x00000000,0xc060e000 - .type exact,@object - .size exact,32 - .align 8 -c135: - .long 0x00000000,0x4060e000 - .long 0x00000000,0xc060e000 - .type c135,@object - .size c135,16 - .align 8 -c45: - .long 0x00000000,0x40468000 - .long 0x00000000,0xc0468000 - .type c45,@object - .size c45,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .data - .hidden __libm_atandl_table_128 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2f_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2f_wmt.S deleted file mode 100644 index ea10669117..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2f_wmt.S +++ /dev/null @@ -1,791 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan2f_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin atan2f - .text - .align 16,0x90 - .globl atan2f -atan2f: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movss 116(%esp), %xmm1 - movl 112(%esp), %edx - movl 116(%esp), %ecx - movss %xmm0, 8(%esp) - movss %xmm1, 12(%esp) - movl %edx, %eax - andl $2147483647, %edx - subl $528482304, %edx - cmpl $1073741824, %edx - jae .L_2TAG_PACKET_0.0.3 - movl %ecx, %edx - andl $-2147483648, %ecx - andl $2147483647, %edx - subl $528482304, %edx - cmpl $1073741824, %edx - jae .L_2TAG_PACKET_1.0.3 - divss %xmm1, %xmm0 - movss 8(%esp), %xmm5 -.L_2TAG_PACKET_2.0.3: - movl $-262144, %edx - movd %edx, %xmm3 - movss %xmm1, %xmm6 - movl $262144, %edx - movd %edx, %xmm4 - movss %xmm1, %xmm2 - shrl $31, %eax - shrl $30, %ecx - orl %eax, %ecx - andps %xmm3, %xmm6 - subss %xmm6, %xmm1 - andps %xmm0, %xmm3 - movd %xmm0, %edx - orps %xmm4, %xmm3 - mulss %xmm3, %xmm6 - mulss %xmm3, %xmm1 - movl %edx, %eax - andl $2146959360, %edx - subl $1023410176, %edx - cmpl $83361792, %edx - ja .L_2TAG_PACKET_3.0.3 - mulss %xmm5, %xmm3 - subss %xmm6, %xmm5 - addss %xmm3, %xmm2 - subss %xmm1, %xmm5 - divss %xmm2, %xmm5 - shrl $16, %edx - addl $8, %edx - andl $-2147483648, %eax - movd %eax, %xmm0 - movss (%ebx,%edx), %xmm1 - movss 4(%ebx,%edx), %xmm3 - movl $-1096111855, %eax - movd %eax, %xmm4 - movss 1440(%ebx,%ecx,8), %xmm6 - xorps %xmm0, %xmm1 - xorps %xmm0, %xmm3 - movss %xmm1, %xmm7 - addss 1444(%ebx,%ecx,8), %xmm1 - addss %xmm6, %xmm3 - movss 1444(%ebx,%ecx,8), %xmm6 - movss %xmm5, %xmm2 - mulss %xmm5, %xmm5 - movss %xmm1, %xmm0 - subss %xmm1, %xmm6 - mulss %xmm2, %xmm4 - addss %xmm2, %xmm1 - addss %xmm7, %xmm6 - subss %xmm1, %xmm0 - mulss %xmm4, %xmm5 - addss %xmm6, %xmm3 - addss %xmm2, %xmm0 - addss %xmm3, %xmm5 - addss %xmm5, %xmm0 - addss %xmm1, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_3.0.3: - addl $75497472, %edx - cmpl $158859264, %edx - ja .L_2TAG_PACKET_5.0.3 - movss 8(%esp), %xmm0 - movss 12(%esp), %xmm1 - cvtps2pd %xmm0, %xmm0 - cvtps2pd %xmm1, %xmm1 - divsd %xmm1, %xmm0 - movsd 1360(%ebx), %xmm7 - movsd 1368(%ebx), %xmm2 - movss 1440(%ebx,%ecx,8), %xmm3 - movss 1444(%ebx,%ecx,8), %xmm4 - cvtps2pd %xmm3, %xmm3 - cvtps2pd %xmm4, %xmm4 - addsd %xmm4, %xmm3 - mulsd %xmm0, %xmm7 - movapd %xmm0, %xmm1 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm0 - addsd %xmm3, %xmm1 - mulsd %xmm7, %xmm0 - addsd %xmm2, %xmm0 - addsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_5.0.3: - addl $947912704, %edx - cmpl $1106771968, %edx - jae .L_2TAG_PACKET_6.0.3 - movss 1440(%ebx,%ecx,8), %xmm2 - movss 1444(%ebx,%ecx,8), %xmm1 - addss %xmm2, %xmm0 - addss %xmm1, %xmm0 -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_6.0.3: - cmpl $1602224128, %edx - jae .L_2TAG_PACKET_8.0.3 - movss 8(%esp), %xmm0 - movss 12(%esp), %xmm1 - movl $-2147483648, %edx - movd %edx, %xmm7 - xorps %xmm7, %xmm0 - cvtps2pd %xmm0, %xmm5 - cvtps2pd %xmm1, %xmm0 - divsd %xmm5, %xmm0 - movsd 1376(%ebx), %xmm2 - andl $1, %ecx - movsd 1344(%ebx,%ecx,8), %xmm3 - mulsd %xmm0, %xmm2 - movapd %xmm0, %xmm1 - mulsd %xmm0, %xmm0 - addsd %xmm3, %xmm1 - mulsd %xmm2, %xmm0 - addsd %xmm1, %xmm0 - cvtsd2ss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_8.0.3: - movss 1408(%ebx), %xmm0 - movss 1412(%ebx), %xmm1 - shll $31, %ecx - movd %ecx, %xmm3 - addss %xmm1, %xmm0 - xorps %xmm3, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_0.0.3: - addl $528482304, %edx - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_9.0.3 - cmpl $0, %edx - je .L_2TAG_PACKET_10.0.3 - movl %ecx, %edx - andl $-2147483648, %ecx - andl $2147483647, %edx - subl $528482304, %edx -.L_2TAG_PACKET_1.0.3: - addl $528482304, %edx - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_11.0.3 - cmpl $0, %edx - je .L_2TAG_PACKET_12.0.3 - cvtss2sd %xmm0, %xmm0 - cvtss2sd %xmm1, %xmm3 - divsd %xmm3, %xmm0 - movss 8(%esp), %xmm5 - pextrw $3, %xmm0, %edx - andl $32767, %edx - subl $15344, %edx - cmpl $2048, %edx - jae .L_2TAG_PACKET_13.0.3 - movd %xmm1, %edx - cvtsd2ss %xmm0, %xmm0 - andl $2147483647, %edx - cmpl $276824064, %edx - jb .L_2TAG_PACKET_14.0.3 - cmpl $1602224128, %edx - ja .L_2TAG_PACKET_15.0.3 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_15.0.3: - movl $796917760, %edx - movd %edx, %xmm4 - mulss %xmm4, %xmm1 - mulss %xmm4, %xmm5 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_14.0.3: - movl $1333788672, %edx - movd %edx, %xmm4 - mulss %xmm4, %xmm1 - mulss %xmm4, %xmm5 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_13.0.3: - shrl $31, %eax - shrl $30, %ecx - orl %eax, %ecx - addl $15344, %edx - cmpl $17392, %edx - jae .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_16.0.3: - cmpl $2, %ecx - jb .L_2TAG_PACKET_17.0.3 - movss 1440(%ebx,%ecx,8), %xmm2 - movss 1444(%ebx,%ecx,8), %xmm0 - addss %xmm2, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_17.0.3: - movsd 1392(%ebx), %xmm1 - mulsd %xmm1, %xmm0 - cvtsd2ss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_9.0.3: - ja .L_2TAG_PACKET_18.0.3 - movl %ecx, %edx - andl $-2147483648, %ecx - andl $2147483647, %edx - cmpl $2139095040, %edx - je .L_2TAG_PACKET_19.0.3 - ja .L_2TAG_PACKET_20.0.3 - movss 1408(%ebx), %xmm0 - movss 1412(%ebx), %xmm1 - andl $-2147483648, %eax - movd %eax, %xmm3 - addss %xmm1, %xmm0 - xorps %xmm3, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_19.0.3: - movss 1408(%ebx), %xmm0 - movss 1412(%ebx), %xmm1 - movl $1056964608, %edx - sarl $31, %ecx - andl $12582912, %ecx - addl %ecx, %edx - movd %edx, %xmm2 - addss %xmm1, %xmm0 - mulss %xmm2, %xmm0 - andl $-2147483648, %eax - movd %eax, %xmm3 - xorps %xmm3, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_18.0.3: - addss %xmm1, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_10.0.3: - movl %ecx, %edx - andl $-2147483648, %ecx - andl $2147483647, %edx - cmpl $2139095040, %edx - ja .L_2TAG_PACKET_20.0.3 - cmpl $0, %edx - je .L_2TAG_PACKET_21.0.3 - cmpl $0, %ecx - jne .L_2TAG_PACKET_22.0.3 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_23.0.3: -.L_2TAG_PACKET_22.0.3: - movss 1456(%ebx), %xmm0 - movss 1460(%ebx), %xmm1 - andl $-2147483648, %eax - movd %eax, %xmm3 - addss %xmm1, %xmm0 - xorps %xmm3, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_24.0.3: - movss 1456(%ebx), %xmm0 - movss 1460(%ebx), %xmm1 - andl $-2147483648, %eax - movd %eax, %xmm3 - addss %xmm1, %xmm0 - xorps %xmm3, %xmm0 - jmp .L_2TAG_PACKET_25.0.3 -.L_2TAG_PACKET_21.0.3: - cmpl $0, %ecx - jne .L_2TAG_PACKET_24.0.3 -.L_2TAG_PACKET_25.0.3: - movss %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 116(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $38, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_20.0.3: - movss %xmm1, %xmm0 - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_11.0.3: - ja .L_2TAG_PACKET_20.0.3 - cmpl $0, %ecx - jne .L_2TAG_PACKET_23.0.3 - andl $-2147483648, %eax - movd %eax, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_12.0.3: - movss 1408(%ebx), %xmm0 - movss 1412(%ebx), %xmm1 - andl $-2147483648, %eax - movd %eax, %xmm3 - addss %xmm1, %xmm0 - xorps %xmm3, %xmm0 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_4.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type atan2f,@function - .size atan2f,.-atan2f - .data -# -- End atan2f - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 1023669327 - .long 803928991 - .long 1024193038 - .long 2966692170 - .long 1024716678 - .long 811692700 - .long 1025240245 - .long 792964392 - .long 1025763734 - .long 802148141 - .long 1026287141 - .long 819324013 - .long 1026810463 - .long 790037051 - .long 1027333695 - .long 759154391 - .long 1027856833 - .long 817525057 - .long 1028379874 - .long 808527090 - .long 1028902813 - .long 821626264 - .long 1029425647 - .long 817580405 - .long 1029948372 - .long 2952445505 - .long 1030470983 - .long 801005003 - .long 1030993477 - .long 800387983 - .long 1031515850 - .long 2942256123 - .long 1032048979 - .long 2968250322 - .long 1032570964 - .long 822790803 - .long 1033092672 - .long 826289861 - .long 1033614088 - .long 2976224418 - .long 1034135194 - .long 824490938 - .long 1034655977 - .long 822527213 - .long 1035176421 - .long 784232806 - .long 1035696510 - .long 822531604 - .long 1036216230 - .long 2967672936 - .long 1036735564 - .long 826515440 - .long 1037254499 - .long 2944102134 - .long 1037773019 - .long 2977774463 - .long 1038291108 - .long 795957866 - .long 1038808753 - .long 2972700386 - .long 1039325938 - .long 2975253635 - .long 1039842648 - .long 807079588 - .long 1040402092 - .long 822355304 - .long 1040917290 - .long 805504040 - .long 1041431409 - .long 2978896586 - .long 1041944391 - .long 836680090 - .long 1042456182 - .long 826352980 - .long 1042966726 - .long 2973619487 - .long 1043475968 - .long 2937629464 - .long 1043983855 - .long 831159584 - .long 1044490335 - .long 820394738 - .long 1044995356 - .long 2965290852 - .long 1045498867 - .long 772017454 - .long 1046000819 - .long 2978687103 - .long 1046501162 - .long 836200518 - .long 1046999850 - .long 836883769 - .long 1047496836 - .long 826905524 - .long 1047992074 - .long 824423170 - .long 1048653779 - .long 2993658277 - .long 1049143506 - .long 2988293347 - .long 1049629355 - .long 838635411 - .long 1050111172 - .long 2981083232 - .long 1050588809 - .long 840069395 - .long 1051062131 - .long 2985487843 - .long 1051531009 - .long 2987007755 - .long 1051995325 - .long 2954909954 - .long 1052454971 - .long 2992105648 - .long 1052909846 - .long 2984512837 - .long 1053359860 - .long 2974535271 - .long 1053804931 - .long 834850816 - .long 1054244987 - .long 2990399399 - .long 1054679962 - .long 2986843574 - .long 1055109800 - .long 841668384 - .long 1055534454 - .long 840878179 - .long 1056161628 - .long 2959648204 - .long 1056972004 - .long 2999182783 - .long 1057370275 - .long 2987693957 - .long 1057757908 - .long 848029633 - .long 1058134927 - .long 833824667 - .long 1058501396 - .long 838916473 - .long 1058857417 - .long 2982869562 - .long 1059203123 - .long 2987447445 - .long 1059538675 - .long 2986943103 - .long 1059864257 - .long 2962018373 - .long 1060180073 - .long 3001690183 - .long 1060486341 - .long 3000978470 - .long 1060783292 - .long 855353569 - .long 1061071169 - .long 847903241 - .long 1061350219 - .long 2995336148 - .long 1061620693 - .long 848940038 - .long 1062010885 - .long 848518105 - .long 1062503512 - .long 2989792343 - .long 1062966414 - .long 2998000194 - .long 1063401558 - .long 2966602495 - .long 1063810833 - .long 841421013 - .long 1064196033 - .long 853285487 - .long 1064558850 - .long 831341538 - .long 1064900868 - .long 2999260393 - .long 1065223564 - .long 3001104089 - .long 1065440763 - .long 856880849 - .long 1065584798 - .long 852830020 - .long 1065721082 - .long 862757435 - .long 1065850159 - .long 2998927867 - .long 1065972528 - .long 2998512290 - .long 1066088651 - .long 2998663603 - .long 1066198953 - .long 2996780932 - .long 1066354340 - .long 3007554211 - .long 1066544552 - .long 2996943326 - .long 1066717600 - .long 3000009859 - .long 1066875577 - .long 856175525 - .long 1067020272 - .long 836800017 - .long 1067153216 - .long 3008748444 - .long 1067275724 - .long 851983949 - .long 1067388933 - .long 862585050 - .long 1067493827 - .long 3009301766 - .long 1067591258 - .long 2988483069 - .long 1067681973 - .long 3005223458 - .long 1067766623 - .long 839061141 - .long 1067845782 - .long 2995523700 - .long 1067919954 - .long 2995663457 - .long 1067989585 - .long 858133164 - .long 1068055072 - .long 829335339 - .long 1068146290 - .long 856294518 - .long 1068256389 - .long 3003850806 - .long 1068355146 - .long 856998103 - .long 1068444206 - .long 2999569255 - .long 1068524912 - .long 3011255227 - .long 1068598373 - .long 841513866 - .long 1068665514 - .long 841710807 - .long 1068727109 - .long 2949159239 - .long 1068783812 - .long 2995542644 - .long 1068836179 - .long 3007665083 - .long 1068884685 - .long 3006087365 - .long 1068929739 - .long 2996180184 - .long 1068971695 - .long 3006313179 - .long 1069010859 - .long 849476222 - .long 1069047500 - .long 860722755 - .long 1069081853 - .long 859062603 - .long 1069129538 - .long 2979745798 - .long 1069186846 - .long 842801502 - .long 1069238035 - .long 3010794384 - .long 1069284031 - .long 3010162926 - .long 1069325584 - .long 3005589807 - .long 1069363306 - .long 853875835 - .long 1069397703 - .long 851842476 - .long 1069429195 - .long 3001807968 - .long 1069458133 - .long 859424355 - .long 1069484817 - .long 3004202910 - .long 1069509498 - .long 843503196 - .long 1069532394 - .long 856475636 - .long 1069553692 - .long 2995114457 - .long 1069573552 - .long 860725119 - .long 1069592116 - .long 859745384 - .long 1069609507 - .long 3009201804 - .long 1069633623 - .long 855498560 - .long 1069662574 - .long 858167444 - .long 1069688405 - .long 853306415 - .long 1069711594 - .long 846705105 - .long 1069732526 - .long 858976312 - .long 1069751516 - .long 2999172562 - .long 1069768821 - .long 2999539371 - .long 1069784656 - .long 2998679696 - .long 1069799200 - .long 861304267 - .long 1069812606 - .long 843012447 - .long 1069825002 - .long 3010989671 - .long 1069836497 - .long 3005173143 - .long 1069847186 - .long 853102954 - .long 1069857152 - .long 2993551140 - .long 1069866465 - .long 3000116992 - .long 1069875187 - .long 827148142 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 2147418112 - .long 0 - .long 0 - .long 0 - .long 32768 - .long 0 - .long 0 - .long 1413754136 - .long 1073291771 - .long 1413754136 - .long 3220775419 - .long 2576980378 - .long 1070176665 - .long 1431655765 - .long 3218429269 - .long 1431655765 - .long 3218429269 - .long 0 - .long 0 - .long 4194304 - .long 1072693248 - .long 0 - .long 0 - .long 1070141402 - .long 866263400 - .long 1078530010 - .long 874652008 - .long 1061752794 - .long 857874792 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 874652008 - .long 1078530010 - .long 3022135656 - .long 3226013658 - .type static_const_table,@object - .size static_const_table,1472 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2l.S deleted file mode 100644 index 795987a9ca..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan2l.S +++ /dev/null @@ -1,1195 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan2l.c" - .text -..TXTST0: -# -- Begin atan2l - .text - .align 16,0x90 - .globl atan2l -atan2l: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp -..B1.2: - fnstcw 30(%esp) -..B1.3: - movzbl 29(%ebp), %edi - movzbl 17(%ebp), %ebx - andl $128, %edi - movzwl 16(%ebp), %ecx - andl $128, %ebx - andl $32767, %ecx - movzwl 28(%ebp), %esi - shrl $7, %edi - andl $32767, %esi - shrl $7, %ebx - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $32767, %ecx - je ..B1.90 -..B1.4: - cmpl $32767, %esi - je ..B1.90 -..B1.5: - testl %ecx, %ecx - jne ..B1.8 -..B1.6: - cmpl $0, 12(%ebp) - jne ..B1.8 -..B1.7: - cmpl $0, 8(%ebp) - je ..B1.11 -..B1.8: - testl %esi, %esi - jne ..B1.32 -..B1.9: - cmpl $0, 24(%ebp) - jne ..B1.32 -..B1.10: - cmpl $0, 20(%ebp) - jne ..B1.32 -..B1.11: - movzwl 30(%esp), %eax - movl %eax, 12(%esp) - andl $768, %eax - cmpl $768, %eax - je ..B1.88 -..B1.12: - movl 12(%esp), %eax - orl $-64768, %eax - movw %ax, 28(%esp) -..B1.13: - fldcw 28(%esp) -..B1.14: - movl $1, %eax -..B1.15: - testl %ecx, %ecx - jne ..B1.28 -..B1.16: - cmpl $0, 12(%ebp) - jne ..B1.27 -..B1.17: - cmpl $0, 8(%ebp) - jne ..B1.26 -..B1.18: - testl %esi, %esi - jne ..B1.23 -..B1.19: - cmpl $0, 24(%ebp) - jne ..B1.22 -..B1.20: - cmpl $0, 20(%ebp) - je ..B1.85 -..B1.21: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 56(%esp) - jmp ..B1.23 -..B1.22: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 56(%esp) -..B1.23: - testl %edi, %edi - je ..B1.25 -..B1.24: - lea (,%ebx,8), %ecx - lea (%ecx,%ebx,4), %ebx - fldt _pi_00l@GOTOFF(%ebx,%edx) - fldt _small_value_80@GOTOFF(%ebx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.29 -..B1.25: - fldl _zeros@GOTOFF(%edx,%ebx,8) - fstpt 64(%esp) - jmp ..B1.29 -..B1.26: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 56(%esp) - jmp ..B1.28 -..B1.27: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 56(%esp) -..B1.28: - lea (,%ebx,8), %ecx - lea (%ecx,%ebx,4), %ebx - fldt _pi_02l@GOTOFF(%ebx,%edx) - fldt _small_value_80@GOTOFF(%ebx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) -..B1.29: - testl %eax, %eax - je ..B1.31 -..B1.30: - fldcw 30(%esp) -..B1.31: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - movzwl 30(%esp), %eax - movl %eax, 12(%esp) - andl $768, %eax - cmpl $768, %eax - je ..B1.89 -..B1.33: - movl 12(%esp), %eax - orl $-64768, %eax - movw %ax, 28(%esp) -..B1.34: - fldcw 28(%esp) -..B1.35: - movl $1, 12(%esp) -..B1.36: - cmpl $8191, %esi - jg ..B1.40 -..B1.37: - cmpl $8191, %ecx - jg ..B1.39 -..B1.38: - fldt _TWO_8192@GOTOFF(%edx) - fldt 20(%ebp) - fmul %st(1), %st - fstpt 20(%ebp) - fldt 20(%ebp) - fldt 8(%ebp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - movzwl 28(%ebp), %esi - movzwl 16(%ebp), %ecx - andl $32767, %esi - andl $32767, %ecx - jmp ..B1.41 -..B1.39: - fldt 20(%ebp) - fldt 8(%ebp) - jmp ..B1.44 -..B1.40: - fldt 20(%ebp) - fldt 8(%ebp) -..B1.41: - cmpl $24575, %esi - jl ..B1.44 -..B1.42: - cmpl $24575, %ecx - jl ..B1.44 -..B1.43: - fldt 12+_TWO_8192@GOTOFF(%edx) - fmul %st, %st(2) - fxch %st(2) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - movzwl 28(%ebp), %esi - movzwl 16(%ebp), %ecx - andl $32767, %esi - andl $32767, %ecx -..B1.44: - fldl _ones@GOTOFF(%edx,%ebx,8) - fld %st(2) - fld %st(2) - fmul %st(2), %st - fxch %st(1) - fmull _ones@GOTOFF(%edx,%edi,8) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B1.68 -..B1.45: - lea 12(%ecx), %eax - cmpl %eax, %esi - jle ..B1.62 -..B1.46: - addl $75, %ecx - cmpl %ecx, %esi - jle ..B1.55 -..B1.47: - fstp %st(1) - fstp %st(0) - fstp %st(0) - testl %edi, %edi - je ..B1.49 -..B1.48: - fstp %st(1) - fstp %st(0) - lea (,%ebx,8), %eax - lea (%eax,%ebx,4), %ecx - fldt _pi_00l@GOTOFF(%ecx,%edx) - fldt _small_value_80@GOTOFF(%ecx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.52 -..B1.49: - fdivp %st, %st(1) - fstpt 64(%esp) - movzwl 72(%esp), %eax - testl $32767, %eax - jne ..B1.51 -..B1.50: - fldt _small_value_80@GOTOFF(%edx) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.52 -..B1.51: - fldt _small_value_80@GOTOFF(%edx) - faddl _ones@GOTOFF(%edx) - fstpt (%esp) -..B1.52: - cmpl $0, 12(%esp) - je ..B1.54 -..B1.53: - fldcw 30(%esp) -..B1.54: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.55: - fstp %st(4) - fstp %st(2) - testl %edi, %edi - je ..B1.59 -..B1.56: - fldt 36+_P@GOTOFF(%edx) - fxch %st(3) - fdivrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - fxch %st(3) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 12+_P@GOTOFF(%edx) - cmpl $0, 12(%esp) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(1) - fldt _P@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - faddp %st, %st(2) - fxch %st(1) - fsubrl 8200+__libm_atanl_table_128@GOTOFF(%edx) - faddl 8192+__libm_atanl_table_128@GOTOFF(%edx) - fmulp %st, %st(1) - fstpt 64(%esp) - je ..B1.58 -..B1.57: - fldcw 30(%esp) -..B1.58: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.59: - fldt 36+_P@GOTOFF(%edx) - fld %st(2) - fdiv %st(4), %st - fld %st(0) - fmul %st(1), %st - fxch %st(3) - fstpl 48(%esp) - fld %st(2) - fmul %st(3), %st - fmul %st, %st(2) - fldt 12+_P@GOTOFF(%edx) - cmpl $0, 12(%esp) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(1) - fld %st(4) - fldt _P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 32(%esp) - fld %st(2) - fld %st(3) - fld %st(3) - fldl _TWO_32H@GOTOFF(%edx) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(5) - fld %st(5) - fadd %st(1), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(3) - fadd %st(4), %st - fsubp %st, %st(4) - fxch %st(3) - fsubr %st, %st(4) - fld %st(3) - fxch %st(2) - fdivrl _ones@GOTOFF(%edx) - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fstpt 16(%esp) - fldt 16(%esp) - fsubp %st, %st(4) - fld %st(3) - fsubr %st(1), %st - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(7) - fxch %st(7) - faddp %st, %st(3) - fxch %st(3) - fmul %st, %st(4) - fld %st(5) - fmul %st(1), %st - fxch %st(2) - fadd %st, %st(6) - fmulp %st, %st(1) - fxch %st(4) - faddl 8+_ones@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(4) - fsubrp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 32(%esp) - faddp %st, %st(2) - faddp %st, %st(1) - fmull 48(%esp) - fstpt 64(%esp) - je ..B1.61 -..B1.60: - fldt 16(%esp) - fstpt 32(%esp) -..B1.123: - fldcw 30(%esp) -..B1.61: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.62: - fstp %st(4) - fstp %st(2) - fldl _TWO_63H@GOTOFF(%edx) - fld %st(2) - fxch %st(2) - fstpl 48(%esp) - fld %st(2) - fld %st(4) - fld %st(5) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(6), %st - fdiv %st(7), %st - fadd %st(4), %st - fstpt 32(%esp) - fldt 32(%esp) - fsubp %st, %st(4) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmulp %st, %st(4) - fldl _TWO_48H@GOTOFF(%edx) - fmul %st, %st(3) - movl 32(%esp), %eax - fxch %st(3) - fadd %st, %st(5) - shll $4, %eax - fsubrp %st, %st(5) - fld %st(4) - testl %edi, %edi - fmul %st(4), %st - fxch %st(5) - fsubr %st, %st(6) - fxch %st(2) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(6) - fld %st(5) - fmul %st(4), %st - fadd %st(7), %st - fxch %st(4) - fmul %st, %st(7) - fxch %st(7) - fsubrp %st, %st(6) - fmul %st, %st(6) - fxch %st(6) - fsubrp %st, %st(1) - fxch %st(5) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fdivrl _ones@GOTOFF(%edx) - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt 16(%esp) - fldt 16(%esp) - fsubp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fld %st(4) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fxch %st(2) - fmul %st, %st(4) - fld %st(0) - fmul %st(6), %st - fxch %st(6) - fadd %st(7), %st - fxch %st(7) - fmulp %st, %st(1) - fxch %st(4) - faddl 8+_ones@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(2) - fsubp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 20(%ebp) - fldt 20(%ebp) - fld %st(1) - fmul %st(3), %st - fld %st(2) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(3) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(3) - fldt _P@GOTOFF(%edx) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl 48(%esp) - je ..B1.64 -..B1.63: - negl %eax - fld %st(2) - fldl 8192+__libm_atanl_table_128@GOTOFF(%edx,%eax) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fldl 8200+__libm_atanl_table_128@GOTOFF(%edx,%eax) - fsubp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B1.65 -..B1.64: - fldl __libm_atanl_table_128@GOTOFF(%eax,%edx) - fld %st(3) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fldl 8+__libm_atanl_table_128@GOTOFF(%eax,%edx) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) -..B1.65: - fstpt 64(%esp) - cmpl $0, 12(%esp) - je ..B1.67 -..B1.66: - fldt 16(%esp) - fstpt 32(%esp) -..B1.124: - fldcw 30(%esp) -..B1.67: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.68: - fstp %st(4) - fstp %st(2) - lea 12(%esi), %eax - cmpl %eax, %ecx - jle ..B1.79 -..B1.69: - addl $75, %esi - cmpl %esi, %ecx - jle ..B1.73 -..B1.70: - fstp %st(1) - fstp %st(1) - fstp %st(0) - cmpl $0, 12(%esp) - lea (,%ebx,8), %eax - lea (%eax,%ebx,4), %ecx - fldt _pi_02l@GOTOFF(%ecx,%edx) - fldt _small_value_80@GOTOFF(%ecx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) - je ..B1.72 -..B1.71: - fldcw 30(%esp) -..B1.72: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.73: - fldt 12+_P@GOTOFF(%edx) - testl %edi, %edi - fxch %st(2) - fdivrp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fld %st(0) - fmul %st(1), %st - fxch %st(4) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 36+_P@GOTOFF(%edx) - fmul %st(5), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(5) - fldt _P@GOTOFF(%edx) - faddp %st, %st(5) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(2) - fldl 4096+__libm_atanl_table_128@GOTOFF(%edx) - fldl 4104+__libm_atanl_table_128@GOTOFF(%edx) - je ..B1.75 -..B1.74: - faddp %st, %st(3) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B1.76 -..B1.75: - fsubp %st, %st(3) - faddp %st, %st(2) - fmulp %st, %st(1) -..B1.76: - fstpt 64(%esp) - cmpl $0, 12(%esp) - je ..B1.78 -..B1.77: - fldcw 30(%esp) -..B1.78: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.79: - fldl _TWO_63H@GOTOFF(%edx) - fld %st(3) - fxch %st(2) - fstpl 48(%esp) - fld %st(2) - fld %st(3) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(6), %st - fdiv %st(5), %st - fadd %st(3), %st - fstpt 32(%esp) - fldt 32(%esp) - fsubp %st, %st(3) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmulp %st, %st(3) - fld %st(5) - fldl _TWO_48H@GOTOFF(%edx) - fmul %st, %st(5) - movl 32(%esp), %eax - fxch %st(1) - fadd %st(5), %st - shll $4, %eax - fsubp %st, %st(5) - testl %edi, %edi - fxch %st(4) - fsubr %st, %st(6) - fld %st(6) - fmul %st(4), %st - fxch %st(3) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(5) - fxch %st(2) - fadd %st(5), %st - fld %st(1) - fmul %st(4), %st - fadd %st(3), %st - fxch %st(4) - fmul %st, %st(6) - fxch %st(6) - fsubrp %st, %st(7) - fxch %st(2) - fmulp %st, %st(5) - fsubp %st, %st(4) - fld %st(1) - fadd %st(1), %st - fdivrl _ones@GOTOFF(%edx) - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fstpt 16(%esp) - fldt 16(%esp) - fsubp %st, %st(4) - fld %st(3) - fsubr %st(1), %st - fld %st(3) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - fmul %st(4), %st - fld %st(4) - fmul %st(7), %st - fxch %st(6) - fadd %st, %st(7) - fmulp %st, %st(5) - faddl 8+_ones@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 20(%ebp) - fldt 20(%ebp) - fld %st(1) - fmul %st(3), %st - fld %st(2) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(3) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(3) - fldt _P@GOTOFF(%edx) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl 48(%esp) - je ..B1.81 -..B1.80: - fldl 4096+__libm_atanl_table_128@GOTOFF(%edx,%eax) - fld %st(3) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fldl 4104+__libm_atanl_table_128@GOTOFF(%edx,%eax) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B1.82 -..B1.81: - negl %eax - fld %st(2) - fldl 4096+__libm_atanl_table_128@GOTOFF(%edx,%eax) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fldl 4104+__libm_atanl_table_128@GOTOFF(%edx,%eax) - fsubp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) -..B1.82: - fstpt 64(%esp) - cmpl $0, 12(%esp) - je ..B1.84 -..B1.83: - fldt 16(%esp) - fstpt 32(%esp) -..B1.125: - fldcw 30(%esp) -..B1.84: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.85: - testl %edi, %edi - je ..B1.87 -..B1.86: - lea (,%ebx,8), %ecx - lea (%ecx,%ebx,4), %ebx - fldt _pi_00l@GOTOFF(%ebx,%edx) - fldt _small_value_80@GOTOFF(%ebx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.29 -..B1.87: - fldl _zeros@GOTOFF(%edx,%ebx,8) - fstpt 64(%esp) - jmp ..B1.29 -..B1.88: - xorl %eax, %eax - jmp ..B1.15 -..B1.89: - movl $0, 12(%esp) - jmp ..B1.36 -..B1.90: - movzwl 30(%esp), %eax - movl %eax, 12(%esp) - andl $768, %eax - cmpl $768, %eax - je ..B1.120 -..B1.91: - movl 12(%esp), %eax - orl $-64768, %eax - movw %ax, 28(%esp) -..B1.92: - fldcw 28(%esp) -..B1.93: - movl $1, %eax -..B1.94: - cmpl $32767, %ecx - je ..B1.118 -..B1.95: - cmpl $32767, %esi - je ..B1.115 -..B1.96: - testl %ecx, %ecx - jne ..B1.99 -..B1.97: - cmpl $0, 12(%ebp) - jne ..B1.102 -..B1.98: - cmpl $0, 8(%ebp) - jne ..B1.102 -..B1.99: - testl %esi, %esi - jne ..B1.103 -..B1.100: - cmpl $0, 24(%ebp) - jne ..B1.102 -..B1.101: - cmpl $0, 20(%ebp) - je ..B1.104 -..B1.102: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 56(%esp) -..B1.103: - cmpl $32767, %esi - je ..B1.108 -..B1.104: - lea (,%ebx,8), %ecx - lea (%ecx,%ebx,4), %ebx - fldt _pi_02l@GOTOFF(%ebx,%edx) - fldt _small_value_80@GOTOFF(%ebx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) -..B1.105: - testl %eax, %eax - je ..B1.107 -..B1.106: - fldcw 30(%esp) -..B1.107: - fldt 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.108: - cmpl $32767, %ecx - je ..B1.112 -..B1.109: - testl %edi, %edi - je ..B1.111 -..B1.110: - lea (,%ebx,8), %ecx - lea (%ecx,%ebx,4), %ebx - fldt _pi_00l@GOTOFF(%ebx,%edx) - fldt _small_value_80@GOTOFF(%ebx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.105 -..B1.111: - fldl _zeros@GOTOFF(%edx,%ebx,8) - fstpt 64(%esp) - jmp ..B1.105 -..B1.112: - testl %edi, %edi - lea (,%ebx,8), %ecx - lea (%ecx,%ebx,4), %ecx - je ..B1.114 -..B1.113: - fldt _pi_34l@GOTOFF(%ecx,%edx) - fldt _small_value_80@GOTOFF(%ecx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.105 -..B1.114: - fldt _pi_04l@GOTOFF(%ecx,%edx) - fldt _small_value_80@GOTOFF(%ecx,%edx) - fsubrp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.105 -..B1.115: - cmpl $-2147483648, 24(%ebp) - jne ..B1.117 -..B1.116: - cmpl $0, 20(%ebp) - je ..B1.96 -..B1.117: - fldt 20(%ebp) - fldt 8(%ebp) - fmulp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.105 -..B1.118: - cmpl $-2147483648, 12(%ebp) - jne ..B1.117 -..B1.119: - cmpl $0, 8(%ebp) - jne ..B1.117 - jmp ..B1.95 -..B1.120: - xorl %eax, %eax - jmp ..B1.94 - .align 16,0x90 - .type atan2l,@function - .size atan2l,.-atan2l - .data -# -- End atan2l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 2 -_pi_00l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16384 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49152 - .word 0 - .type _pi_00l,@object - .size _pi_00l,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_pi_02l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49151 - .word 0 - .type _pi_02l,@object - .size _pi_02l,24 - .align 2 -_TWO_8192: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .type _TWO_8192,@object - .size _TWO_8192,24 - .align 2 -_P: - .word 43664 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 43235 - .word 52379 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 59507 - .word 38278 - .word 9340 - .word 37449 - .word 49148 - .word 0 - .word 9132 - .word 55602 - .word 8665 - .word 58245 - .word 16379 - .word 0 - .type _P,@object - .size _P,48 - .align 2 -_pi_34l: - .word 37288 - .word 39182 - .word 58361 - .word 38603 - .word 16384 - .word 0 - .word 37288 - .word 39182 - .word 58361 - .word 38603 - .word 49152 - .word 0 - .type _pi_34l,@object - .size _pi_34l,24 - .align 2 -_pi_04l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16382 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49150 - .word 0 - .type _pi_04l,@object - .size _pi_04l,24 - .data - .hidden __libm_atanl_table_128 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan_wmt.S deleted file mode 100644 index 8d01ca578e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atan_wmt.S +++ /dev/null @@ -1,922 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin atan - .text - .align 16,0x90 - .globl atan -atan: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd 2640(%ebx), %xmm3 - movsd 2624(%ebx), %xmm5 - movsd 2656(%ebx), %xmm4 - movsd %xmm0, 8(%esp) - pextrw $3, %xmm0, %edx - andpd %xmm0, %xmm3 - pshufd $68, %xmm0, %xmm1 - orpd %xmm4, %xmm3 - movl %edx, %eax - andl $32767, %edx - subl $16288, %edx - cmpl $159, %edx - ja .L_2TAG_PACKET_0.0.2 - mulsd %xmm3, %xmm1 - subsd %xmm3, %xmm0 - addsd %xmm5, %xmm1 - divsd %xmm1, %xmm0 - addl $1, %edx - movsd 2672(%ebx), %xmm2 - movsd 2688(%ebx), %xmm4 - andl $32768, %eax - xorpd %xmm7, %xmm7 - pinsrw $3, %eax, %xmm7 - addl %edx, %edx - movsd (%ebx,%edx,8), %xmm6 - movsd 8(%ebx,%edx,8), %xmm5 - xorpd %xmm7, %xmm5 - xorpd %xmm7, %xmm6 - movsd 2680(%ebx), %xmm7 - pshufd $68, %xmm0, %xmm1 - mulsd %xmm0, %xmm0 - pshufd $68, %xmm1, %xmm3 - addsd %xmm6, %xmm1 - mulsd %xmm0, %xmm2 - addsd %xmm0, %xmm4 - subsd %xmm1, %xmm6 - mulsd %xmm0, %xmm4 - addsd %xmm7, %xmm2 - mulsd %xmm3, %xmm0 - addsd %xmm3, %xmm6 - mulsd %xmm2, %xmm0 - addsd 2696(%ebx), %xmm4 - addsd %xmm5, %xmm6 - mulsd %xmm4, %xmm0 - addsd %xmm6, %xmm0 - addsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_0.0.2: - addl $944, %edx - cmpl $1103, %edx - ja .L_2TAG_PACKET_2.0.2 - movsd 2672(%ebx), %xmm4 - movsd 2688(%ebx), %xmm7 - movsd 8(%esp), %xmm0 - mulsd %xmm1, %xmm1 - movsd 2680(%ebx), %xmm2 - movsd 2696(%ebx), %xmm5 - mulsd %xmm1, %xmm4 - addsd %xmm1, %xmm7 - movapd %xmm1, %xmm6 - mulsd %xmm0, %xmm1 - addsd %xmm4, %xmm2 - mulsd %xmm6, %xmm7 - mulsd %xmm1, %xmm2 - addsd %xmm5, %xmm7 - mulsd %xmm7, %xmm2 - addsd %xmm2, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - addl $15344, %edx - cmpl $16368, %edx - ja .L_2TAG_PACKET_3.0.2 - movsd 8(%esp), %xmm0 - movsd 8(%esp), %xmm1 - cmpl $16, %edx - jae .L_2TAG_PACKET_4.0.2 - mulsd %xmm0, %xmm1 -.L_2TAG_PACKET_4.0.2: - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_3.0.2: - cmpl $17392, %edx - jae .L_2TAG_PACKET_5.0.2 - xorpd %xmm1, %xmm1 - movl $49136, %ecx - pinsrw $3, %ecx, %xmm1 - divsd %xmm0, %xmm1 - movsd 2672(%ebx), %xmm2 - movsd 2688(%ebx), %xmm4 - andl $32768, %eax - xorpd %xmm7, %xmm7 - pinsrw $3, %eax, %xmm7 - addl %edx, %edx - movsd 2592(%ebx), %xmm6 - movsd 2600(%ebx), %xmm5 - xorpd %xmm7, %xmm5 - xorpd %xmm7, %xmm6 - movsd 2680(%ebx), %xmm7 - pshufd $68, %xmm1, %xmm0 - mulsd %xmm1, %xmm1 - pshufd $68, %xmm0, %xmm3 - addsd %xmm6, %xmm0 - mulsd %xmm1, %xmm2 - addsd %xmm1, %xmm4 - subsd %xmm0, %xmm6 - mulsd %xmm1, %xmm4 - addsd %xmm7, %xmm2 - mulsd %xmm3, %xmm1 - addsd %xmm3, %xmm6 - mulsd %xmm2, %xmm1 - addsd 2696(%ebx), %xmm4 - addsd %xmm5, %xmm6 - mulsd %xmm4, %xmm1 - addsd %xmm6, %xmm1 - addsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_5.0.2: - movsd 8(%esp), %xmm4 - movsd 2608(%ebx), %xmm0 - movsd 2592(%ebx), %xmm2 - movsd 2600(%ebx), %xmm3 - movd %xmm1, %eax - psrlq $32, %xmm1 - movd %xmm1, %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - jae .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_7.0.2: - andnpd %xmm4, %xmm0 - orpd %xmm0, %xmm2 - orpd %xmm3, %xmm0 - addsd %xmm2, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_6.0.2: - subl $2146435072, %edx - orl %edx, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_7.0.2 - movapd %xmm4, %xmm0 - addsd %xmm0, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) -.L_2TAG_PACKET_1.0.2: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type atan,@function - .size atan,.-atan - .data -# -- End atan - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 3819695742 - .long 1067482761 - .long 2398680355 - .long 3155462074 - .long 2998791009 - .long 1067548225 - .long 3868465248 - .long 3157182472 - .long 3339424991 - .long 1067613680 - .long 3296670360 - .long 1010752543 - .long 2710002256 - .long 1067679126 - .long 3403896007 - .long 1010910768 - .long 3275701428 - .long 1067744562 - .long 119959933 - .long 1011482843 - .long 2908636881 - .long 1067809988 - .long 2464489612 - .long 1011545526 - .long 3777889398 - .long 1067875403 - .long 3262682165 - .long 1009703919 - .long 3759667419 - .long 1067940807 - .long 1838130851 - .long 3157373556 - .long 732369940 - .long 1068006200 - .long 1203428313 - .long 1010055371 - .long 1166616461 - .long 1068071580 - .long 2901274051 - .long 3158549977 - .long 2945472892 - .long 1068136947 - .long 3726120658 - .long 1009762715 - .long 3954480976 - .long 1068202301 - .long 1289173457 - .long 1009429861 - .long 2081752829 - .long 1068267642 - .long 1836909874 - .long 1006212095 - .long 3807999788 - .long 1068332968 - .long 2172459940 - .long 3156162078 - .long 2731789884 - .long 1068398280 - .long 3450718392 - .long 3159216547 - .long 1044477961 - .long 1068463577 - .long 2230553229 - .long 1011424339 - .long 1486930287 - .long 1068530218 - .long 2861547474 - .long 1012041376 - .long 2293016881 - .long 1068595466 - .long 136843272 - .long 1012684797 - .long 201518157 - .long 1068660680 - .long 63231984 - .long 1012427198 - .long 4054234584 - .long 1068725856 - .long 3927006960 - .long 1011878955 - .long 1246477213 - .long 1068790995 - .long 1494265652 - .long 3155219350 - .long 678186699 - .long 1068856093 - .long 1264361424 - .long 3159256693 - .long 2690594995 - .long 1068921148 - .long 3906996379 - .long 1009288267 - .long 3362611517 - .long 1068986159 - .long 1650970041 - .long 3158331771 - .long 3102162111 - .long 1069051124 - .long 365917035 - .long 3160264153 - .long 2352611067 - .long 1069116041 - .long 4008970190 - .long 3159478182 - .long 1594134794 - .long 1069180908 - .long 466690178 - .long 1012526501 - .long 1345079306 - .long 1069245723 - .long 2268273568 - .long 3160164092 - .long 2163300970 - .long 1069310484 - .long 2750834800 - .long 3158113482 - .long 352522716 - .long 1069375190 - .long 1750411372 - .long 1011790845 - .long 848541647 - .long 1069439838 - .long 2164207573 - .long 1011698350 - .long 40647312 - .long 1069504427 - .long 2949165434 - .long 3159107267 - .long 2216766270 - .long 1069574357 - .long 2197920765 - .long 3161055954 - .long 1090914384 - .long 1069638757 - .long 2330454674 - .long 1013365998 - .long 387601244 - .long 1069703022 - .long 3185681168 - .long 1013434071 - .long 3991640484 - .long 1069767144 - .long 1313211590 - .long 3161087959 - .long 3322489502 - .long 1069831118 - .long 3013977995 - .long 1013053011 - .long 3121698570 - .long 1069894936 - .long 4069015667 - .long 1013023362 - .long 4289964660 - .long 1069958591 - .long 1736191156 - .long 3158266731 - .long 3903312386 - .long 1070022077 - .long 1833592413 - .long 3159731471 - .long 3818449864 - .long 1070085387 - .long 851036429 - .long 3159730451 - .long 2097480306 - .long 1070148515 - .long 3506390884 - .long 3160462302 - .long 1611694502 - .long 1070211454 - .long 2785735540 - .long 3160465144 - .long 1464694796 - .long 1070274198 - .long 4229277299 - .long 3159907000 - .long 1299612775 - .long 1070336741 - .long 4116653788 - .long 3160427739 - .long 1310544789 - .long 1070399077 - .long 1064430331 - .long 1013218202 - .long 2253168030 - .long 1070461200 - .long 1405044609 - .long 3157623179 - .long 1159567373 - .long 1070523105 - .long 2353445521 - .long 3159992176 - .long 1359373750 - .long 1070605818 - .long 1748171336 - .long 3161879263 - .long 908341706 - .long 1070667034 - .long 3372710815 - .long 3161775245 - .long 1743027350 - .long 1070727765 - .long 687089934 - .long 3160507171 - .long 2055355646 - .long 1070787992 - .long 2392855242 - .long 1013682469 - .long 690426164 - .long 1070847697 - .long 1103926666 - .long 1014052810 - .long 1483247847 - .long 1070906862 - .long 2082645847 - .long 3161345479 - .long 392040270 - .long 1070965472 - .long 2407720023 - .long 1014053754 - .long 2673846014 - .long 1071023511 - .long 1293605532 - .long 3158464385 - .long 1384215810 - .long 1071080967 - .long 2446095872 - .long 3159216407 - .long 3101660631 - .long 1071137826 - .long 698040758 - .long 1014855328 - .long 2094057058 - .long 1071194078 - .long 2282048339 - .long 1014040385 - .long 1712750594 - .long 1071249712 - .long 1204372378 - .long 3162276464 - .long 1411515787 - .long 1071304719 - .long 949080808 - .long 1015006403 - .long 931538085 - .long 1071359091 - .long 3027127039 - .long 1014307233 - .long 179139065 - .long 1071412821 - .long 4285547492 - .long 3161934731 - .long 3387721259 - .long 1071465902 - .long 373225773 - .long 1013486625 - .long 2132236852 - .long 1071544299 - .long 3250533429 - .long 1014031677 - .long 1942070284 - .long 1071645596 - .long 1237964179 - .long 3163239113 - .long 1532707802 - .long 1071695380 - .long 330645583 - .long 1012495610 - .long 2294184979 - .long 1071743834 - .long 3959472897 - .long 1015833116 - .long 3805060714 - .long 1071790961 - .long 2671256142 - .long 1013727772 - .long 2215037898 - .long 1071836770 - .long 2683359117 - .long 1015831902 - .long 483661594 - .long 1071881273 - .long 836288326 - .long 3162648643 - .long 1534679894 - .long 1071924486 - .long 373258696 - .long 3162470096 - .long 1538714628 - .long 1071966430 - .long 3199433068 - .long 1015325501 - .long 527642555 - .long 1072007128 - .long 3636832592 - .long 3161843145 - .long 291339150 - .long 1072046605 - .long 890169537 - .long 3160586117 - .long 2450210201 - .long 1072084888 - .long 1636353294 - .long 3163193400 - .long 2411367951 - .long 1072122007 - .long 374899873 - .long 1011331750 - .long 681549971 - .long 1072157992 - .long 506411689 - .long 1015373954 - .long 1466745541 - .long 1072192873 - .long 2143860931 - .long 1013364334 - .long 2845622366 - .long 1072226682 - .long 2869178209 - .long 3162423682 - .long 2838871438 - .long 1072275456 - .long 3742223599 - .long 1014338577 - .long 4200275274 - .long 1072337034 - .long 1566539915 - .long 3161839550 - .long 3034733530 - .long 1072394897 - .long 652621408 - .long 3162261964 - .long 3207412993 - .long 1072449290 - .long 3206124665 - .long 1014408733 - .long 624461478 - .long 1072500450 - .long 932437485 - .long 1015204343 - .long 767665908 - .long 1072548600 - .long 1037911952 - .long 3163527627 - .long 1110773639 - .long 1072593952 - .long 2371517912 - .long 3160465741 - .long 1940828530 - .long 1072636704 - .long 2731408428 - .long 3162895795 - .long 1911329388 - .long 1072677041 - .long 1773089615 - .long 3159569267 - .long 1764715788 - .long 1072704191 - .long 691346949 - .long 3164069946 - .long 3332979233 - .long 1072722195 - .long 3550733983 - .long 1014770628 - .long 1321870254 - .long 1072739231 - .long 1415315820 - .long 1016224052 - .long 3657429030 - .long 1072755365 - .long 3910539033 - .long 1015966402 - .long 4197624557 - .long 1072770661 - .long 2333399254 - .long 3164546480 - .long 1512059493 - .long 1072785177 - .long 2701510318 - .long 1016178092 - .long 453379037 - .long 1072798965 - .long 4046344253 - .long 3162814364 - .long 1942345162 - .long 1072818388 - .long 621134147 - .long 1016335195 - .long 4210176273 - .long 1072842164 - .long 2701013387 - .long 3164326619 - .long 4185644010 - .long 1072863795 - .long 4163699341 - .long 1016203112 - .long 679688788 - .long 1072883543 - .long 4147276762 - .long 1014066750 - .long 29432865 - .long 1072901630 - .long 970415797 - .long 1016902063 - .long 4070721092 - .long 1072918247 - .long 2539004411 - .long 3163736096 - .long 2252468843 - .long 1072933561 - .long 3424082887 - .long 3163407177 - .long 2929724825 - .long 1072947712 - .long 3661482235 - .long 3163846989 - .long 1377513368 - .long 1072960824 - .long 3987926680 - .long 1013647908 - .long 1031632908 - .long 1072973003 - .long 3672217151 - .long 1016614619 - .long 2516508130 - .long 1072984342 - .long 545855020 - .long 3162728930 - .long 3792452178 - .long 1072994923 - .long 3420119467 - .long 1016471430 - .long 3147791459 - .long 1073004818 - .long 1342204979 - .long 1013937254 - .long 999189752 - .long 1073014090 - .long 1006335472 - .long 3162850919 - .long 711011011 - .long 1073022794 - .long 4633488 - .long 3162966895 - .long 15640363 - .long 1073030980 - .long 1686389560 - .long 3164376226 - .long 1218463589 - .long 1073042382 - .long 1526837110 - .long 3163533985 - .long 2538470555 - .long 1073056144 - .long 2273304406 - .long 3163784996 - .long 1229720947 - .long 1073068489 - .long 2971628206 - .long 3162356540 - .long 3115427016 - .long 1073079621 - .long 4215132957 - .long 3164282762 - .long 4030612557 - .long 1073089709 - .long 1913251691 - .long 3163671292 - .long 2728521257 - .long 1073098892 - .long 2861089500 - .long 1015454459 - .long 1118696283 - .long 1073107285 - .long 1628948053 - .long 1016179658 - .long 2682711255 - .long 1073114984 - .long 2906306266 - .long 1014142643 - .long 2073898081 - .long 1073122072 - .long 1322740454 - .long 3164497217 - .long 1403700297 - .long 1073128618 - .long 416137895 - .long 3162781466 - .long 2502685617 - .long 1073134681 - .long 3242008732 - .long 1014593495 - .long 1531926851 - .long 1073140313 - .long 1362708094 - .long 1016517604 - .long 3572814411 - .long 1073145557 - .long 3709790527 - .long 1012646874 - .long 1695536111 - .long 1073150453 - .long 3980346340 - .long 1016705136 - .long 2363057203 - .long 1073155033 - .long 2551194792 - .long 1012569695 - .long 2873365682 - .long 1073159327 - .long 3181154748 - .long 1017041450 - .long 1053384691 - .long 1073165288 - .long 3074536879 - .long 1016965660 - .long 3270542712 - .long 1073172451 - .long 2535319415 - .long 3163051778 - .long 1353631484 - .long 1073178850 - .long 1173833755 - .long 1015534537 - .long 3511218460 - .long 1073184599 - .long 1243608109 - .long 3161592122 - .long 4121259284 - .long 1073189793 - .long 398584912 - .long 3163829923 - .long 1193862106 - .long 1073194509 - .long 1873745539 - .long 3163802819 - .long 3861949790 - .long 1073198808 - .long 3841261147 - .long 1015587248 - .long 1486904578 - .long 1073202745 - .long 1634726776 - .long 3163847886 - .long 2879153715 - .long 1073206362 - .long 200456242 - .long 3164138657 - .long 385353253 - .long 1073209698 - .long 1186355517 - .long 1014887155 - .long 1125865839 - .long 1073212783 - .long 203561262 - .long 3161244927 - .long 1221361475 - .long 1073215645 - .long 3382476563 - .long 1014936138 - .long 2077323573 - .long 1073218307 - .long 1005121005 - .long 3164430752 - .long 215611373 - .long 1073220790 - .long 353198764 - .long 3164485137 - .long 2347419265 - .long 1073223110 - .long 1103143360 - .long 1016542137 - .long 1379112765 - .long 1073225284 - .long 381583533 - .long 3162870833 - .long 3891198463 - .long 1073228298 - .long 1771275754 - .long 1014654681 - .long 3395914051 - .long 1073231917 - .long 2350900914 - .long 3164013978 - .long 2799919478 - .long 1073235146 - .long 2893950164 - .long 3163260901 - .long 1138673476 - .long 1073238045 - .long 2622204785 - .long 3164174388 - .long 3408855940 - .long 1073240661 - .long 2800881650 - .long 1016008624 - .long 2044858738 - .long 1073243035 - .long 604544785 - .long 1017022901 - .long 2578795176 - .long 1073245198 - .long 2557332925 - .long 1016135165 - .long 4196285314 - .long 1073247177 - .long 2032365307 - .long 1016194735 - .long 224877747 - .long 1073248996 - .long 497926916 - .long 1016947111 - .long 3271386490 - .long 1073250671 - .long 2689994846 - .long 1016631513 - .long 813635989 - .long 1073252221 - .long 747035277 - .long 3164530136 - .long 369829519 - .long 1073253658 - .long 2182033858 - .long 3163190340 - .long 1187679052 - .long 1073254994 - .long 673954443 - .long 1016149821 - .long 4232586098 - .long 1073256239 - .long 497775200 - .long 3162179015 - .long 426690558 - .long 1073257404 - .long 3063343247 - .long 1016865578 - .long 1624065902 - .long 1073258494 - .long 1354224996 - .long 3163503778 - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 4294901760 - .long 0 - .long 0 - .long 0 - .long 32768 - .long 0 - .long 0 - .long 2006262985 - .long 1069310863 - .long 2358449471 - .long 3217342131 - .long 3845454352 - .long 1069952297 - .long 2829679149 - .long 1073771565 - .type static_const_table,@object - .size static_const_table,2704 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atandl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atandl_table.S deleted file mode 100644 index d80f401005..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atandl_table.S +++ /dev/null @@ -1,2100 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atandl_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_atandl_table_128 - .globl __libm_atandl_table_128 -__libm_atandl_table_128: - .long 0 - .long 0 - .long 0 - .long 0 - .long 3896508416 - .long 1071424949 - .long 2497855885 - .long 1035107781 - .long 1447034880 - .long 1072473411 - .long 1733066939 - .long 3185173141 - .long 1421869056 - .long 1073052515 - .long 1368774744 - .long 1038726731 - .long 1314914304 - .long 1073521529 - .long 3636885973 - .long 3186244272 - .long 1199570944 - .long 1073866069 - .long 2275810035 - .long 3185989885 - .long 476053504 - .long 1074100319 - .long 3721769433 - .long 3184582046 - .long 3514826752 - .long 1074334397 - .long 1919096566 - .long 3184722268 - .long 845152256 - .long 1074568277 - .long 2005889037 - .long 1036405998 - .long 2545942528 - .long 1074796164 - .long 4215566178 - .long 1040782263 - .long 4057989120 - .long 1074912862 - .long 2215314489 - .long 1040552811 - .long 3430940672 - .long 1075029419 - .long 314220031 - .long 3187779646 - .long 1717567488 - .long 1075145821 - .long 2152308088 - .long 1040271717 - .long 455081984 - .long 1075262054 - .long 1186928436 - .long 1040902706 - .long 1694498816 - .long 1075378104 - .long 4227739998 - .long 1040491905 - .long 3747610624 - .long 1075493958 - .long 535382953 - .long 1040666985 - .long 1226833920 - .long 1075609604 - .long 1790336138 - .long 1040185867 - .long 2260729856 - .long 1075725027 - .long 3899937368 - .long 3188375434 - .long 3525312512 - .long 1075839595 - .long 4053544535 - .long 3185741100 - .long 3957325824 - .long 1075897065 - .long 4030890856 - .long 1040553080 - .long 3248488448 - .long 1075954405 - .long 1333464106 - .long 3189137055 - .long 452984832 - .long 1076011609 - .long 3448918206 - .long 3189528508 - .long 3615490048 - .long 1076068669 - .long 608092114 - .long 1041523725 - .long 4020240384 - .long 1076125581 - .long 1336102440 - .long 3188870826 - .long 1960837120 - .long 1076182339 - .long 2391933274 - .long 3189275321 - .long 2470445056 - .long 1076238936 - .long 4283795024 - .long 1041937846 - .long 2451570688 - .long 1076295367 - .long 4217000778 - .long 1039765656 - .long 3560964096 - .long 1076351626 - .long 3936906987 - .long 3182578922 - .long 3640655872 - .long 1076407708 - .long 1439536878 - .long 1040659594 - .long 1023410176 - .long 1076463608 - .long 2552585681 - .long 3189615238 - .long 3122659328 - .long 1076519319 - .long 31715936 - .long 1042073699 - .long 689963008 - .long 1076574838 - .long 3139108801 - .long 1040611849 - .long 2164260864 - .long 1076630158 - .long 1139819401 - .long 3187965768 - .long 3623878656 - .long 1076685275 - .long 3513262155 - .long 1039670426 - .long 1679818752 - .long 1076740185 - .long 728891110 - .long 1041952788 - .long 2069889024 - .long 1076794882 - .long 3614319306 - .long 1039599785 - .long 2480930816 - .long 1076849362 - .long 1879438446 - .long 3188546042 - .long 2720006144 - .long 1076895586 - .long 4246516390 - .long 1042916956 - .long 574619648 - .long 1076922603 - .long 3568262924 - .long 1040145602 - .long 3061841920 - .long 1076949504 - .long 290418758 - .long 3187677511 - .long 1539309568 - .long 1076976289 - .long 635731916 - .long 1042641148 - .long 532676608 - .long 1077002955 - .long 4225033962 - .long 3189573420 - .long 545259520 - .long 1077029500 - .long 2007583995 - .long 1042491810 - .long 2369781760 - .long 1077055922 - .long 2061076001 - .long 3190167169 - .long 2774532096 - .long 1077082220 - .long 2608380742 - .long 1042446121 - .long 3112173568 - .long 1077108392 - .long 2901961231 - .long 1042075808 - .long 715128832 - .long 1077134437 - .long 3828632392 - .long 3189418038 - .long 1782579200 - .long 1077160352 - .long 519110621 - .long 1041924126 - .long 4206886912 - .long 1077186136 - .long 2078221814 - .long 1039357043 - .long 1858076672 - .long 1077211789 - .long 2404314454 - .long 3190701797 - .long 1763704832 - .long 1077237308 - .long 1129624783 - .long 3189333294 - .long 2638217216 - .long 1077262692 - .long 1872508293 - .long 3187027668 - .long 3464495104 - .long 1077287940 - .long 2518581518 - .long 1039154339 - .long 3493855232 - .long 1077313051 - .long 2874645533 - .long 3188678970 - .long 2241855488 - .long 1077338024 - .long 182480744 - .long 3187988055 - .long 3783262208 - .long 1077362857 - .long 41710967 - .long 3189176765 - .long 3860856832 - .long 1077387550 - .long 3921914980 - .long 1040188295 - .long 2770337792 - .long 1077412102 - .long 2195237132 - .long 1043018421 - .long 1061158912 - .long 1077436512 - .long 1866130671 - .long 1042885968 - .long 3825205248 - .long 1077460778 - .long 2099274145 - .long 1043277518 - .long 3519021056 - .long 1077484901 - .long 2434136291 - .long 3190760305 - .long 1423966208 - .long 1077508880 - .long 786043090 - .long 3189674834 - .long 3361734656 - .long 1077532713 - .long 1735814367 - .long 1041228653 - .long 2501902336 - .long 1077556401 - .long 2532076405 - .long 1041674477 - .long 832569344 - .long 1077579943 - .long 1067893357 - .long 1041790735 - .long 568328192 - .long 1077603338 - .long 42353869 - .long 1040967961 - .long 4143972352 - .long 1077626585 - .long 3035382168 - .long 1043228732 - .long 1329594368 - .long 1077649686 - .long 2622169537 - .long 1042608561 - .long 3579838464 - .long 1077672638 - .long 3279279360 - .long 1039969098 - .long 1082130432 - .long 1077695443 - .long 152088799 - .long 1042154031 - .long 1409286144 - .long 1077718099 - .long 1577179566 - .long 1043010748 - .long 3743416320 - .long 1077740606 - .long 164745699 - .long 3187116092 - .long 3162505216 - .long 1077762965 - .long 3525309094 - .long 3189988831 - .long 3525312512 - .long 1077785175 - .long 790013831 - .long 3189219565 - .long 287309824 - .long 1077807237 - .long 3014793090 - .long 3190791112 - .long 1965031424 - .long 1077829149 - .long 2967000185 - .long 3189805146 - .long 73400320 - .long 1077850913 - .long 923692587 - .long 1033248306 - .long 3477078016 - .long 1077872527 - .long 797568562 - .long 1037083943 - .long 4024434688 - .long 1077893993 - .long 1829946853 - .long 1043203029 - .long 2319450112 - .long 1077915311 - .long 1559006781 - .long 3189221910 - .long 1704984576 - .long 1077936304 - .long 2364400925 - .long 3186972503 - .long 4104126464 - .long 1077946814 - .long 2278278095 - .long 3191749589 - .long 2438987776 - .long 1077957251 - .long 3465285131 - .long 1042435970 - .long 1606418432 - .long 1077967614 - .long 1692530062 - .long 1043648146 - .long 2273312768 - .long 1077977903 - .long 4155795398 - .long 1043918312 - .long 878706688 - .long 1077988119 - .long 1476207680 - .long 1043900034 - .long 2516582400 - .long 1077998261 - .long 2925970384 - .long 1039575776 - .long 3751804928 - .long 1078008330 - .long 2856171667 - .long 3191395954 - .long 1207959552 - .long 1078018327 - .long 2148760563 - .long 1039453383 - .long 161480704 - .long 1078028251 - .long 3632513556 - .long 3191302868 - .long 1642070016 - .long 1078038102 - .long 3240138768 - .long 1043718443 - .long 2447376384 - .long 1078047881 - .long 3100705142 - .long 3191740341 - .long 3709861888 - .long 1078057588 - .long 1674862667 - .long 1041748151 - .long 2325741568 - .long 1078067224 - .long 4255018693 - .long 1044226144 - .long 3827302400 - .long 1078076788 - .long 4142119676 - .long 3191232448 - .long 899678208 - .long 1078086282 - .long 700553623 - .long 1043581423 - .long 3462397952 - .long 1078095704 - .long 1067893357 - .long 3190322959 - .long 4286578688 - .long 1078105056 - .long 3385731218 - .long 1043691060 - .long 486539264 - .long 1078114339 - .long 2289432889 - .long 1035999008 - .long 2092957696 - .long 1078123551 - .long 653388941 - .long 3186809946 - .long 1996488704 - .long 1078132694 - .long 3139143286 - .long 3191209215 - .long 1709178880 - .long 1078141768 - .long 643854101 - .long 3190510369 - .long 2778726400 - .long 1078150773 - .long 2948057503 - .long 3191040876 - .long 2485125120 - .long 1078159710 - .long 172509481 - .long 1044304413 - .long 2438987776 - .long 1078168579 - .long 1352848207 - .long 1043175137 - .long 4271898624 - .long 1078177380 - .long 2864918449 - .long 1043427968 - .long 1054867456 - .long 1078186115 - .long 1735520057 - .long 1044098886 - .long 3063939072 - .long 1078194782 - .long 2894826982 - .long 1043616305 - .long 3418357760 - .long 1078203383 - .long 442938097 - .long 3191392387 - .long 3844079616 - .long 1078211918 - .long 4004776912 - .long 1043962348 - .long 1801453568 - .long 1078220388 - .long 2102624066 - .long 1044353828 - .long 3355443200 - .long 1078228792 - .long 1225643377 - .long 3190452555 - .long 1700790272 - .long 1078237132 - .long 2531804346 - .long 3191195152 - .long 2936012800 - .long 1078245407 - .long 928991542 - .long 1043548181 - .long 293601280 - .long 1078253619 - .long 3229203938 - .long 1042779359 - .long 4194304000 - .long 1078261766 - .long 1071139240 - .long 1044201053 - .long 3600809984 - .long 1078269851 - .long 3018208080 - .long 1043941200 - .long 371195904 - .long 1078277874 - .long 2039162957 - .long 3189903110 - .long 666894336 - .long 1078285834 - .long 1431034507 - .long 3190628953 - .long 2071986176 - .long 1078293732 - .long 3412027605 - .long 3191381190 - .long 2176843776 - .long 1078301569 - .long 183216755 - .long 3188772215 - .long 2877292544 - .long 1078309345 - .long 3207515339 - .long 3189828782 - .long 1778384896 - .long 1078317061 - .long 847503884 - .long 3191075565 - .long 784334848 - .long 1078324717 - .long 2952309205 - .long 1043794080 - .long 1809842176 - .long 1078332313 - .long 467544888 - .long 1042040199 - .long 2472542208 - .long 1078339850 - .long 3311174937 - .long 1039371295 - .long 396361728 - .long 1078347329 - .long 676857836 - .long 3191368341 - .long 1795162112 - .long 1078354749 - .long 2052116880 - .long 3191818486 - .long 0 - .long 1078362112 - .long 0 - .long 0 - .long 2499805184 - .long 1078369474 - .long 2052116880 - .long 1044334838 - .long 3898605568 - .long 1078376894 - .long 676857836 - .long 1043884693 - .long 1822425088 - .long 1078384373 - .long 3311174937 - .long 3186854943 - .long 2485125120 - .long 1078391910 - .long 467544888 - .long 3189523847 - .long 3510632448 - .long 1078399506 - .long 2952309205 - .long 3191277728 - .long 2516582400 - .long 1078407162 - .long 847503884 - .long 1043591917 - .long 1417674752 - .long 1078414878 - .long 3207515339 - .long 1042345134 - .long 2118123520 - .long 1078422654 - .long 183216755 - .long 1041288567 - .long 2222981120 - .long 1078430491 - .long 3412027605 - .long 1043897542 - .long 3628072960 - .long 1078438389 - .long 1431034507 - .long 1043145305 - .long 3923771392 - .long 1078446349 - .long 2039162957 - .long 1042419462 - .long 694157312 - .long 1078454372 - .long 3018208080 - .long 3191424848 - .long 100663296 - .long 1078462457 - .long 1071139240 - .long 3191684701 - .long 4001366016 - .long 1078470604 - .long 3229203938 - .long 3190263007 - .long 1358954496 - .long 1078478816 - .long 928991542 - .long 3191031829 - .long 2594177024 - .long 1078487091 - .long 2531804346 - .long 1043711504 - .long 939524096 - .long 1078495431 - .long 1225643377 - .long 1042968907 - .long 2493513728 - .long 1078503835 - .long 2102624066 - .long 3191837476 - .long 450887680 - .long 1078512305 - .long 4004776912 - .long 3191445996 - .long 876609536 - .long 1078520840 - .long 442938097 - .long 1043908739 - .long 1231028224 - .long 1078529441 - .long 2894826982 - .long 3191099953 - .long 3240099840 - .long 1078538108 - .long 1735520057 - .long 3191582534 - .long 23068672 - .long 1078546843 - .long 2864918449 - .long 3190911616 - .long 1855979520 - .long 1078555644 - .long 1352848207 - .long 3190658785 - .long 1809842176 - .long 1078564513 - .long 172509481 - .long 3191788061 - .long 1516240896 - .long 1078573450 - .long 2948057503 - .long 1043557228 - .long 2585788416 - .long 1078582455 - .long 643854101 - .long 1043026721 - .long 2298478592 - .long 1078591529 - .long 3139143286 - .long 1043725567 - .long 2202009600 - .long 1078600672 - .long 653388941 - .long 1039326298 - .long 3808428032 - .long 1078609884 - .long 2289432889 - .long 3183482656 - .long 8388608 - .long 1078619167 - .long 3385731218 - .long 3191174708 - .long 832569344 - .long 1078628519 - .long 1067893357 - .long 1042839311 - .long 3395289088 - .long 1078637941 - .long 700553623 - .long 3191065071 - .long 467664896 - .long 1078647435 - .long 4142119676 - .long 1043748800 - .long 1969225728 - .long 1078656999 - .long 4255018693 - .long 3191709792 - .long 585105408 - .long 1078666635 - .long 1674862667 - .long 3189231799 - .long 1847590912 - .long 1078676342 - .long 3100705142 - .long 1044256693 - .long 2652897280 - .long 1078686121 - .long 3240138768 - .long 3191202091 - .long 4133486592 - .long 1078695972 - .long 3632513556 - .long 1043819220 - .long 3087007744 - .long 1078705896 - .long 2148760563 - .long 3186937031 - .long 543162368 - .long 1078715893 - .long 2856171667 - .long 1043912306 - .long 1778384896 - .long 1078725962 - .long 2925970384 - .long 3187059424 - .long 3416260608 - .long 1078736104 - .long 1476207680 - .long 3191383682 - .long 2021654528 - .long 1078746320 - .long 4155795398 - .long 3191401960 - .long 2688548864 - .long 1078756609 - .long 1692530062 - .long 3191131794 - .long 1855979520 - .long 1078766972 - .long 3465285131 - .long 3189919618 - .long 190840832 - .long 1078777409 - .long 2278278095 - .long 1044265941 - .long 2589982720 - .long 1078787919 - .long 2364400925 - .long 1039488855 - .long 987758592 - .long 1078798504 - .long 1559006781 - .long 1041738262 - .long 134217728 - .long 1078809163 - .long 1232510221 - .long 1043398165 - .long 408944640 - .long 1078819896 - .long 797568562 - .long 3184567591 - .long 2109734912 - .long 1078830703 - .long 1936866404 - .long 1044380280 - .long 1166016512 - .long 1078841585 - .long 2811467203 - .long 3191322578 - .long 2004877312 - .long 1078852541 - .long 2787570751 - .long 3190829595 - .long 385875968 - .long 1078863572 - .long 3023722014 - .long 3191478212 - .long 566231040 - .long 1078874677 - .long 3525309094 - .long 1042505183 - .long 2424307712 - .long 1078885856 - .long 1063445218 - .long 3191768956 - .long 1442840576 - .long 1078897110 - .long 1577179566 - .long 3190494396 - .long 1606418432 - .long 1078908438 - .long 152088799 - .long 3189637679 - .long 2503999488 - .long 1078919840 - .long 1405657776 - .long 1044264267 - .long 3630170112 - .long 1078931316 - .long 2622169537 - .long 3190092209 - .long 75497472 - .long 1078942867 - .long 3035382168 - .long 3190712380 - .long 4009754624 - .long 1078954490 - .long 3752802150 - .long 1044153052 - .long 1730150400 - .long 1078966188 - .long 806768485 - .long 1043980860 - .long 895483904 - .long 1078977959 - .long 2588206371 - .long 1044009924 - .long 2380267520 - .long 1078987253 - .long 1393635940 - .long 1044120466 - .long 3938451456 - .long 1078993211 - .long 1171997210 - .long 1044632170 - .long 2342518784 - .long 1078999206 - .long 2612691399 - .long 3192403747 - .long 1191182336 - .long 1079005237 - .long 2099274145 - .long 3190761166 - .long 4028628992 - .long 1079011303 - .long 3828434628 - .long 1045017771 - .long 1455423488 - .long 1079017406 - .long 1622551107 - .long 3192310957 - .long 1182793728 - .long 1079023544 - .long 2124167878 - .long 3191930936 - .long 2275409920 - .long 1079029717 - .long 41710967 - .long 1041693117 - .long 3735027712 - .long 1079035925 - .long 514060819 - .long 3191694645 - .long 201326592 - .long 1079042169 - .long 1430947390 - .long 3192785388 - .long 3428843520 - .long 1079048446 - .long 2518581518 - .long 3186637987 - .long 3636461568 - .long 1079054758 - .long 1552096852 - .long 3192868489 - .long 3854565376 - .long 1079061104 - .long 1865077452 - .long 3191449780 - .long 2757754880 - .long 1079067484 - .long 2620146859 - .long 3192418374 - .long 3242196992 - .long 1079073897 - .long 1679886032 - .long 1045390684 - .long 3848273920 - .long 1079080343 - .long 1008852996 - .long 1045213180 - .long 3042967552 - .long 1079086822 - .long 1190325550 - .long 3191428594 - .long 3516923904 - .long 1079093333 - .long 2901961231 - .long 3189559456 - .long 3600809984 - .long 1079099876 - .long 843293277 - .long 1043776619 - .long 1556086784 - .long 1079106451 - .long 2705956472 - .long 3192552031 - .long 4158652416 - .long 1079113056 - .long 2007583995 - .long 3189975458 - .long 941621248 - .long 1079119693 - .long 1619354403 - .long 3192676122 - .long 2835349504 - .long 1079126359 - .long 4136034317 - .long 1045078976 - .long 3529506816 - .long 1079133055 - .long 290418758 - .long 1040193863 - .long 929038336 - .long 1079139781 - .long 3915023624 - .long 1045366041 - .long 1468006400 - .long 1079146535 - .long 1061629098 - .long 3192285591 - .long 2910846976 - .long 1079153317 - .long 1308671630 - .long 1043573567 - .long 2963275776 - .long 1079160127 - .long 1320907030 - .long 3192436805 - .long 3548381184 - .long 1079166964 - .long 182222777 - .long 3191258117 - .long 2231369728 - .long 1079173828 - .long 3513262155 - .long 3187154074 - .long 803209216 - .long 1079180718 - .long 1139819401 - .long 1040482120 - .long 987758592 - .long 1079187633 - .long 929259512 - .long 3191000897 - .long 146800640 - .long 1079194573 - .long 3229154456 - .long 3191288344 - .long 4167041024 - .long 1079201536 - .long 2552585681 - .long 1042131590 - .long 1692401664 - .long 1079208524 - .long 1439536878 - .long 3188143242 - .long 2776629248 - .long 1079215534 - .long 353720209 - .long 3191860659 - .long 230686720 - .long 1079222567 - .long 2411046197 - .long 3190921481 - .long 3986685952 - .long 1079229620 - .long 3756699850 - .long 3192084150 - .long 2438987776 - .long 1079236695 - .long 1671725142 - .long 1043734190 - .long 1107296256 - .long 1079243790 - .long 1240754629 - .long 1045055957 - .long 1157627904 - .long 1079250904 - .long 1534601222 - .long 1045263230 - .long 3701473280 - .long 1079258036 - .long 3448918206 - .long 1042044860 - .long 1203765248 - .long 1079265187 - .long 3924779397 - .long 1045089235 - .long 3263168512 - .long 1079272354 - .long 3287244582 - .long 1042979553 - .long 2243952640 - .long 1079279538 - .long 820395291 - .long 3190740781 - .long 3349151744 - .long 1079286737 - .long 1366866651 - .long 3192280071 - .long 3143630848 - .long 1079293951 - .long 2762624284 - .long 1045102639 - .long 2449473536 - .long 1079301179 - .long 1845586757 - .long 1044548329 - .long 2040528896 - .long 1079308420 - .long 3762298090 - .long 1045345703 - .long 2654994432 - .long 1079315673 - .long 3683913357 - .long 1045057884 - .long 698351616 - .long 1079322938 - .long 2953393071 - .long 3191482668 - .long 1128267776 - .long 1079330213 - .long 1034464320 - .long 3191720696 - .long 283115520 - .long 1079337498 - .long 1039826403 - .long 1041577546 - .long 3061841920 - .long 1079344791 - .long 19850279 - .long 1042922258 - .long 1449132032 - .long 1079352093 - .long 294154384 - .long 1045031347 - .long 293601280 - .long 1079359402 - .long 1192966610 - .long 3192379901 - .long 119537664 - .long 1079366717 - .long 152130161 - .long 3190257939 - .long 1438646272 - .long 1079374037 - .long 3963433176 - .long 1043378887 - .long 448790528 - .long 1079381362 - .long 2261136335 - .long 1044042197 - .long 1923088384 - .long 1079388690 - .long 3535382687 - .long 1045010726 - .long 2036334592 - .long 1079396021 - .long 3576784639 - .long 3192441914 - .long 1243611136 - .long 1079403354 - .long 3804918049 - .long 3191900478 - .long 0 - .long 1079410688 - .long 0 - .long 0 - .long 3051356160 - .long 1079418021 - .long 3804918049 - .long 1044416830 - .long 2258632704 - .long 1079425354 - .long 3576784639 - .long 1044958266 - .long 2371878912 - .long 1079432685 - .long 3535382687 - .long 3192494374 - .long 3846176768 - .long 1079440013 - .long 2261136335 - .long 3191525845 - .long 2856321024 - .long 1079447338 - .long 3963433176 - .long 3190862535 - .long 4175429632 - .long 1079454658 - .long 152130161 - .long 1042774291 - .long 4001366016 - .long 1079461973 - .long 1192966610 - .long 1044896253 - .long 2845835264 - .long 1079469282 - .long 294154384 - .long 3192514995 - .long 1233125376 - .long 1079476584 - .long 19850279 - .long 3190405906 - .long 4011851776 - .long 1079483877 - .long 1039826403 - .long 3189061194 - .long 3166699520 - .long 1079491162 - .long 1034464320 - .long 1044237048 - .long 3596615680 - .long 1079498437 - .long 2953393071 - .long 1043999020 - .long 1639972864 - .long 1079505702 - .long 3683913357 - .long 3192541532 - .long 2254438400 - .long 1079512955 - .long 3762298090 - .long 3192829351 - .long 1845493760 - .long 1079520196 - .long 1845586757 - .long 3192031977 - .long 1151336448 - .long 1079527424 - .long 2762624284 - .long 3192586287 - .long 945815552 - .long 1079534638 - .long 1366866651 - .long 1044796423 - .long 2051014656 - .long 1079541837 - .long 820395291 - .long 1043257133 - .long 1031798784 - .long 1079549021 - .long 3287244582 - .long 3190463201 - .long 3091202048 - .long 1079556188 - .long 3924779397 - .long 3192572883 - .long 593494016 - .long 1079563339 - .long 3448918206 - .long 3189528508 - .long 3137339392 - .long 1079570471 - .long 1534601222 - .long 3192746878 - .long 3187671040 - .long 1079577585 - .long 1240754629 - .long 3192539605 - .long 1855979520 - .long 1079584680 - .long 1671725142 - .long 3191217838 - .long 308281344 - .long 1079591755 - .long 3756699850 - .long 1044600502 - .long 4064280576 - .long 1079598808 - .long 2411046197 - .long 1043437833 - .long 1518338048 - .long 1079605841 - .long 353720209 - .long 1044377011 - .long 2602565632 - .long 1079612851 - .long 1439536878 - .long 1040659594 - .long 127926272 - .long 1079619839 - .long 2552585681 - .long 3189615238 - .long 4148166656 - .long 1079626802 - .long 3229154456 - .long 1043804696 - .long 3307208704 - .long 1079633742 - .long 929259512 - .long 1043517249 - .long 3491758080 - .long 1079640657 - .long 1139819401 - .long 3187965768 - .long 2063597568 - .long 1079647547 - .long 3513262155 - .long 1039670426 - .long 746586112 - .long 1079654411 - .long 182222777 - .long 1043774469 - .long 1331691520 - .long 1079661248 - .long 1320907030 - .long 1044953157 - .long 1384120320 - .long 1079668058 - .long 1308671630 - .long 3191057215 - .long 2826960896 - .long 1079674840 - .long 1061629098 - .long 1044801943 - .long 3365928960 - .long 1079681594 - .long 3915023624 - .long 3192849689 - .long 765460480 - .long 1079688320 - .long 290418758 - .long 3187677511 - .long 1459617792 - .long 1079695016 - .long 4136034317 - .long 3192562624 - .long 3353346048 - .long 1079701682 - .long 1619354403 - .long 1045192474 - .long 136314880 - .long 1079708319 - .long 2007583995 - .long 1042491810 - .long 2738880512 - .long 1079714924 - .long 2705956472 - .long 1045068383 - .long 694157312 - .long 1079721499 - .long 843293277 - .long 3191260267 - .long 778043392 - .long 1079728042 - .long 2901961231 - .long 1042075808 - .long 1251999744 - .long 1079734553 - .long 1190325550 - .long 1043944946 - .long 446693376 - .long 1079741032 - .long 1008852996 - .long 3192696828 - .long 1052770304 - .long 1079747478 - .long 1679886032 - .long 3192874332 - .long 1537212416 - .long 1079753891 - .long 2620146859 - .long 1044934726 - .long 440401920 - .long 1079760271 - .long 1865077452 - .long 1043966132 - .long 658505728 - .long 1079766617 - .long 1552096852 - .long 1045384841 - .long 866123776 - .long 1079772929 - .long 2518581518 - .long 1039154339 - .long 4093640704 - .long 1079779206 - .long 1430947390 - .long 1045301740 - .long 559939584 - .long 1079785450 - .long 514060819 - .long 1044210997 - .long 2019557376 - .long 1079791658 - .long 41710967 - .long 3189176765 - .long 3112173568 - .long 1079797831 - .long 2124167878 - .long 1044447288 - .long 2839543808 - .long 1079803969 - .long 1622551107 - .long 1044827309 - .long 266338304 - .long 1079810072 - .long 3828434628 - .long 3192501419 - .long 3103784960 - .long 1079816138 - .long 2099274145 - .long 1043277518 - .long 1952448512 - .long 1079822169 - .long 2612691399 - .long 1044920099 - .long 356515840 - .long 1079828164 - .long 1171997210 - .long 3192115818 - .long 1914699776 - .long 1079834122 - .long 1393635940 - .long 3191604114 - .long 1698693120 - .long 1079840044 - .long 3000864111 - .long 1044567581 - .long 3428843520 - .long 1079845929 - .long 3891583054 - .long 1044582113 - .long 2290089984 - .long 1079851778 - .long 3752802150 - .long 3191636700 - .long 2109734912 - .long 1079857590 - .long 3035382168 - .long 1043228732 - .long 2480930816 - .long 1079863365 - .long 2565683088 - .long 3192570771 - .long 3042967552 - .long 1079869103 - .long 1405657776 - .long 3191747915 - .long 3491758080 - .long 1079874804 - .long 152088799 - .long 1042154031 - .long 3573547008 - .long 1079880468 - .long 1577179566 - .long 1043010748 - .long 3082813440 - .long 1079886095 - .long 1063445218 - .long 1044285308 - .long 1864368128 - .long 1079891685 - .long 3525309094 - .long 3189988831 - .long 4102029312 - .long 1079897237 - .long 3023722014 - .long 1043994564 - .long 1145044992 - .long 1079902753 - .long 2787570751 - .long 1043345947 - .long 1564475392 - .long 1079908231 - .long 2811467203 - .long 1043838930 - .long 1092616192 - .long 1079913672 - .long 1936866404 - .long 3191863928 - .long 4091543552 - .long 1079919075 - .long 2980113444 - .long 3192905397 - .long 2080374784 - .long 1079924442 - .long 1232510221 - .long 3190881813 - .long 3800039424 - .long 1079929771 - .long 878865976 - .long 1045236413 - .long 851443712 - .long 1079935064 - .long 1134072023 - .long 1045386565 - .long 2051014656 - .long 1079940319 - .long 1008344600 - .long 1044439573 - .long 3368026112 - .long 1079945537 - .long 1281162365 - .long 3192613919 - .long 803209216 - .long 1079950719 - .long 1692530062 - .long 1043648146 - .long 3284140032 - .long 1079955863 - .long 4155795398 - .long 1043918312 - .long 2587885568 - .long 1079960971 - .long 3556863456 - .long 3192106174 - .long 3405774848 - .long 1079966042 - .long 2925970384 - .long 1039575776 - .long 1874853888 - .long 1079971077 - .long 2866881462 - .long 1044616390 - .long 2751463424 - .long 1079976075 - .long 2148760563 - .long 1039453383 - .long 2227175424 - .long 1079981037 - .long 2478710518 - .long 1044662933 - .long 822083584 - .long 1079985963 - .long 527414264 - .long 3192196970 - .long 3370123264 - .long 1079990852 - .long 597131077 - .long 1044444197 - .long 1855979520 - .long 1079995706 - .long 327513079 - .long 3192718825 - .long 1163919360 - .long 1080000524 - .long 2167457950 - .long 3191943119 - .long 1912602624 - .long 1080005306 - .long 2223907458 - .long 1044698143 - .long 450887680 - .long 1080010053 - .long 1797206836 - .long 3192265480 - .long 1730150400 - .long 1080014764 - .long 806768485 - .long 1045029436 - .long 2143289344 - .long 1080019440 - .long 3385731218 - .long 1043691060 - .long 2390753280 - .long 1080024081 - .long 2289432889 - .long 1035999008 - .long 3193962496 - .long 1080028687 - .long 653388941 - .long 3186809946 - .long 998244352 - .long 1080033259 - .long 3139143286 - .long 3191209215 - .long 427819008 - .long 1080035538 - .long 617352675 - .long 3193137764 - .long 1767899136 - .long 1080037789 - .long 2820938545 - .long 1044793929 - .long 2768240640 - .long 1080040023 - .long 1116869194 - .long 1045935239 - .long 3831496704 - .long 1080042240 - .long 2883013420 - .long 3192429127 - .long 1067450368 - .long 1080044441 - .long 716229612 - .long 1045716128 - .long 3485466624 - .long 1080046624 - .long 3427207267 - .long 3192006748 - .long 2912944128 - .long 1080048791 - .long 1797448570 - .long 1045763212 - .long 4074766336 - .long 1080050941 - .long 963007300 - .long 1046072799 - .long 3107979264 - .long 1080053075 - .long 1001194228 - .long 1045849723 - .long 450887680 - .long 1080055193 - .long 3243655263 - .long 3191879277 - .long 838860800 - .long 1080057294 - .long 1225643377 - .long 3190452555 - .long 425721856 - .long 1080059379 - .long 632951086 - .long 3193270660 - .long 3955228672 - .long 1080061447 - .long 928991542 - .long 1043548181 - .long 3294625792 - .long 1080063500 - .long 3229203938 - .long 1042779359 - .long 3196059648 - .long 1080065537 - .long 1071139240 - .long 1044201053 - .long 4120903680 - .long 1080067558 - .long 754552020 - .long 1045844436 - .long 2239758336 - .long 1080069564 - .long 1637692909 - .long 1045134398 - .long 2313158656 - .long 1080071554 - .long 3579217071 - .long 1046240180 - .long 517996544 - .long 1080073529 - .long 3412027605 - .long 3191381190 - .long 1616904192 - .long 1080075488 - .long 2404468057 - .long 1046410024 - .long 1793064960 - .long 1080077432 - .long 3207515339 - .long 3189828782 - .long 1518338048 - .long 1080079361 - .long 847503884 - .long 3191075565 - .long 1270874112 - .long 1080081275 - .long 3556889995 - .long 3193585111 - .long 1526726656 - .long 1080083174 - .long 478427801 - .long 3192682319 - .long 2766143488 - .long 1080085058 - .long 30743511 - .long 3192873887 - .long 1172307968 - .long 1080086928 - .long 1809054730 - .long 1044630197 - .long 1522532352 - .long 1080088783 - .long 2052116880 - .long 3191818486 - .long 0 - .long 1080090624 - .long 0 - .long 0 - .long 2772434944 - .long 1080092464 - .long 2052116880 - .long 1044334838 - .long 3122659328 - .long 1080094319 - .long 1809054730 - .long 3192113845 - .long 1528823808 - .long 1080096189 - .long 30743511 - .long 1045390239 - .long 2768240640 - .long 1080098073 - .long 478427801 - .long 1045198671 - .long 3024093184 - .long 1080099972 - .long 3556889995 - .long 1046101463 - .long 2776629248 - .long 1080101886 - .long 847503884 - .long 1043591917 - .long 2501902336 - .long 1080103815 - .long 3207515339 - .long 1042345134 - .long 2678063104 - .long 1080105759 - .long 2404468057 - .long 3193893672 - .long 3776970752 - .long 1080107718 - .long 3412027605 - .long 1043897542 - .long 1981808640 - .long 1080109693 - .long 3579217071 - .long 3193723828 - .long 2055208960 - .long 1080111683 - .long 1637692909 - .long 3192618046 - .long 174063616 - .long 1080113689 - .long 754552020 - .long 3193328084 - .long 1098907648 - .long 1080115710 - .long 1071139240 - .long 3191684701 - .long 1000341504 - .long 1080117747 - .long 3229203938 - .long 3190263007 - .long 339738624 - .long 1080119800 - .long 928991542 - .long 3191031829 - .long 3869245440 - .long 1080121868 - .long 632951086 - .long 1045787012 - .long 3456106496 - .long 1080123953 - .long 1225643377 - .long 1042968907 - .long 3844079616 - .long 1080126054 - .long 3243655263 - .long 1044395629 - .long 1186988032 - .long 1080128172 - .long 1001194228 - .long 3193333371 - .long 220200960 - .long 1080130306 - .long 963007300 - .long 3193556447 - .long 1382023168 - .long 1080132456 - .long 1797448570 - .long 3193246860 - .long 809500672 - .long 1080134623 - .long 3427207267 - .long 1044523100 - .long 3227516928 - .long 1080136806 - .long 716229612 - .long 3193199776 - .long 463470592 - .long 1080139007 - .long 2883013420 - .long 1044945479 - .long 1526726656 - .long 1080141224 - .long 1116869194 - .long 3193418887 - .long 2527068160 - .long 1080143458 - .long 2820938545 - .long 3192277577 - .long 3867148288 - .long 1080145709 - .long 617352675 - .long 1045654116 - .long 1648361472 - .long 1080147978 - .long 3139143286 - .long 1043725567 - .long 551550976 - .long 1080150264 - .long 2539927630 - .long 3193943182 - .long 952107008 - .long 1080152567 - .long 2289432889 - .long 3183482656 - .long 3223322624 - .long 1080154887 - .long 3385731218 - .long 3191174708 - .long 3428843520 - .long 1080157225 - .long 3891583054 - .long 1045630689 - .long 1923088384 - .long 1080159581 - .long 3396363878 - .long 3193238139 - .long 3338665984 - .long 1080161954 - .long 2223907458 - .long 3192181791 - .long 3714056192 - .long 1080164345 - .long 1063754673 - .long 3193399320 - .long 3368026112 - .long 1080166754 - .long 1983727109 - .long 3193011467 - .long 2608857088 - .long 1080169181 - .long 1848918109 - .long 1045923309 - .long 1736441856 - .long 1080171626 - .long 527414264 - .long 1044713322 - .long 1033895936 - .long 1080174089 - .long 2478710518 - .long 3192146581 - .long 771751936 - .long 1080176570 - .long 2148760563 - .long 3186937031 - .long 1210056704 - .long 1080179069 - .long 2866881462 - .long 3192100038 - .long 2592079872 - .long 1080181586 - .long 2925970384 - .long 3187059424 - .long 853540864 - .long 1080184122 - .long 3556863456 - .long 1044622526 - .long 505413632 - .long 1080186676 - .long 4155795398 - .long 3191401960 - .long 1744830464 - .long 1080189248 - .long 1724351133 - .long 1046137947 - .long 463470592 - .long 1080191839 - .long 1281162365 - .long 1045130271 - .long 1121976320 - .long 1080194448 - .long 1008344600 - .long 3191923221 - .long 3869245440 - .long 1080197075 - .long 1134072023 - .long 3192870213 - .long 247463936 - .long 1080199722 - .long 878865976 - .long 3192720061 - .long 3254779904 - .long 1080202386 - .long 1232510221 - .long 1043398165 - .long 102760448 - .long 1080205070 - .long 657426926 - .long 3192918181 - .long 3749707776 - .long 1080207771 - .long 3810750695 - .long 3193438561 - .long 1365245952 - .long 1080210492 - .long 2811467203 - .long 3191322578 - .long 1574961152 - .long 1080213231 - .long 2787570751 - .long 3190829595 - .long 96468992 - .long 1080215989 - .long 3023722014 - .long 3191478212 - .long 1216348160 - .long 1080218765 - .long 96207275 - .long 3193803844 - .long 606076928 - .long 1080221560 - .long 1063445218 - .long 3191768956 - .long 2508193792 - .long 1080224373 - .long 1577179566 - .long 3190494396 - .long 2548039680 - .long 1080227205 - .long 258929906 - .long 1046355933 - .long 627048448 - .long 1080230056 - .long 722327380 - .long 3193467565 - .long 908066816 - .long 1080232925 - .long 864642104 - .long 3193085494 - .long 3240099840 - .long 1080235812 - .long 3035382168 - .long 3190712380 - .long 3149922304 - .long 1080238718 - .long 3752802150 - .long 1044153052 - .long 432013312 - .long 1080241643 - .long 201692121 - .long 1045854351 - .long 3445620736 - .long 1080244585 - .long 3000864111 - .long 3192051229 - .long 3338665984 - .long 1080247546 - .long 1799074663 - .long 3193503515 - .long 4116709376 - .long 1080250525 - .long 1171997210 - .long 1044632170 - .long 1170210816 - .long 1080253523 - .long 841137948 - .long 1045685358 - .long 2743074816 - .long 1080256538 - .long 2099274145 - .long 3190761166 - .long 4162846720 - .long 1080259571 - .long 233266334 - .long 3193120170 - .long 727711744 - .long 1080262623 - .long 1622551107 - .long 3192310957 - .long 591396864 - .long 1080265692 - .long 2124167878 - .long 3191930936 - .long 3286237184 - .long 1080268778 - .long 802699433 - .long 3193868388 - .long 4013948928 - .long 1080271882 - .long 3092710267 - .long 1045997234 - .long 2248146944 - .long 1080275004 - .long 1430947390 - .long 3192785388 - .long 1713373184 - .long 1080278143 - .long 1906804220 - .long 1046462221 - .long 1818230784 - .long 1080281299 - .long 1552096852 - .long 3192868489 - .long 1927282688 - .long 1080284472 - .long 1865077452 - .long 3191449780 - .long 1377828864 - .long 1080287662 - .long 2984893867 - .long 1045678044 - .long 3768582144 - .long 1080290868 - .long 1679886032 - .long 1045390684 - .long 4072669184 - .long 1080294091 - .long 3790540798 - .long 3193022465 - .long 1520435200 - .long 1080297331 - .long 1849902261 - .long 1046063747 - .long 3904897024 - .long 1080300586 - .long 4113594719 - .long 1046360821 - .long 1801453568 - .long 1080303858 - .long 862918505 - .long 3193589477 - .long 2925527040 - .long 1080307145 - .long 2705956472 - .long 3192552031 - .long 2078277632 - .long 1080310448 - .long 2970277473 - .long 1046321867 - .long 2617245696 - .long 1080313766 - .long 3485290095 - .long 1045549170 - .long 3565158400 - .long 1080317099 - .long 4136034317 - .long 1045078976 - .long 3913285632 - .long 1080320447 - .long 3346367614 - .long 3193929525 - .long 2613051392 - .long 1080323810 - .long 189971836 - .long 3192946035 - .long 2881486848 - .long 1080327187 - .long 1061629098 - .long 3192285591 - .long 3602907136 - .long 1080330578 - .long 1308671630 - .long 1043573567 - .long 3628072960 - .long 1080333983 - .long 1487030133 - .long 1045668829 - .long 1774190592 - .long 1080337402 - .long 182222777 - .long 3191258117 - .long 1115684864 - .long 1080340834 - .long 3513262155 - .long 3187154074 - .long 402653184 - .long 1080344279 - .long 3185606116 - .long 3193920517 - .long 2640314368 - .long 1080347736 - .long 2988910594 - .long 1046170671 - .long 2220883968 - .long 1080351206 - .long 3229154456 - .long 3191288344 - .long 2084569088 - .long 1080354688 - .long 2524817955 - .long 3193840983 - .long 845152256 - .long 1080358182 - .long 2907804489 - .long 1046431323 - .long 1388314624 - .long 1080361687 - .long 353720209 - .long 3191860659 - .long 2262827008 - .long 1080365203 - .long 2411046197 - .long 3190921481 - .long 1992294400 - .long 1080368730 - .long 2416617371 - .long 1045845156 - .long 3368026112 - .long 1080372267 - .long 1729552362 - .long 3193600084 - .long 553648128 - .long 1080375815 - .long 1240754629 - .long 1045055957 - .long 578813952 - .long 1080379372 - .long 1534601222 - .long 1045263230 - .long 1851785216 - .long 1080382938 - .long 858184436 - .long 3193846404 - .long 2749366272 - .long 1080386513 - .long 3924779397 - .long 1045089235 - .long 1631584256 - .long 1080390097 - .long 3287244582 - .long 1042979553 - .long 1121976320 - .long 1080393689 - .long 820395291 - .long 3190740781 - .long 3821010944 - .long 1080397288 - .long 1464050323 - .long 1045747196 - .long 3720347648 - .long 1080400895 - .long 766171506 - .long 3193077736 - .long 3372220416 - .long 1080404509 - .long 1845586757 - .long 1044548329 - .long 1021313024 - .long 1080408130 - .long 266334603 - .long 3192956204 - .long 3474980864 - .long 1080411756 - .long 3683913357 - .long 1045057884 - .long 348127232 - .long 1080415389 - .long 3556619028 - .long 1046050228 - .long 2711617536 - .long 1080419026 - .long 1034464320 - .long 3191720696 - .long 142606336 - .long 1080422669 - .long 1545623586 - .long 3193875611 - .long 3678404608 - .long 1080426315 - .long 19850279 - .long 1042922258 - .long 2873098240 - .long 1080429966 - .long 2000406456 - .long 3193113382 - .long 146800640 - .long 1080433621 - .long 1192966610 - .long 3192379901 - .long 2206203904 - .long 1080437278 - .long 2665338290 - .long 1046286557 - .long 2866806784 - .long 1080440938 - .long 3963433176 - .long 1043378887 - .long 224395264 - .long 1080444601 - .long 2261136335 - .long 1044042197 - .long 962592768 - .long 1080448265 - .long 2527275953 - .long 3193123692 - .long 3164602368 - .long 1080451930 - .long 2506574977 - .long 1045666274 - .long 620756992 - .long 1080455597 - .long 2392508272 - .long 1045936992 - .long 0 - .long 1080459264 - .long 0 - .long 0 - .type __libm_atandl_table_128,@object - .size __libm_atandl_table_128,8208 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanf_wmt.S deleted file mode 100644 index 02e10ea064..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanf_wmt.S +++ /dev/null @@ -1,596 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin atanf - .text - .align 16,0x90 - .globl atanf -atanf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl $-524288, %eax - movd %eax, %xmm3 - movss 1376(%ebx), %xmm5 - movl $262144, %ecx - movd %ecx, %xmm4 - movl 112(%esp), %edx - andps %xmm0, %xmm3 - movss %xmm0, %xmm1 - orps %xmm4, %xmm3 - movl %edx, %eax - andl $2146959360, %edx - subl $1023410176, %edx - cmpl $83361792, %edx - ja .L_2TAG_PACKET_0.0.2 - mulss %xmm3, %xmm1 - subss %xmm3, %xmm0 - addss %xmm5, %xmm1 - divss %xmm1, %xmm0 - shrl $16, %edx - addl $8, %edx - movl $-1096111855, %ecx - movd %ecx, %xmm4 - movss (%ebx,%edx), %xmm2 - movss 4(%ebx,%edx), %xmm3 - andl $-2147483648, %eax - movd %eax, %xmm5 - xorps %xmm5, %xmm2 - xorps %xmm5, %xmm3 - movss %xmm2, %xmm5 - movss %xmm0, %xmm1 - mulss %xmm0, %xmm0 - mulss %xmm1, %xmm4 - addss %xmm1, %xmm2 - subss %xmm2, %xmm5 - mulss %xmm4, %xmm0 - addss %xmm5, %xmm1 - addss %xmm3, %xmm0 - addss %xmm1, %xmm0 - addss %xmm2, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_0.0.2: - addl $75497472, %edx - cmpl $158859264, %edx - ja .L_2TAG_PACKET_2.0.2 - movss 1360(%ebx), %xmm2 - movss 1364(%ebx), %xmm4 - mulss %xmm1, %xmm1 - mulss %xmm0, %xmm4 - mulss %xmm0, %xmm2 - movss %xmm1, %xmm5 - mulss %xmm1, %xmm1 - mulss %xmm5, %xmm4 - mulss %xmm2, %xmm1 - addss %xmm4, %xmm1 - addss %xmm1, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - addl $947912704, %edx - cmpl $1106771968, %edx - jae .L_2TAG_PACKET_3.0.2 - movl $1065353217, %eax - movd %xmm0, %ecx - cmpl $8388608, %edx - cmovb %ecx, %eax - movd %eax, %xmm1 - mulss %xmm1, %xmm1 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_3.0.2: - cmpl $1602224128, %edx - jae .L_2TAG_PACKET_4.0.2 - movl $-1082130432, %ecx - movd %ecx, %xmm1 - divss %xmm0, %xmm1 - cmpl $1182793728, %edx - jae .L_2TAG_PACKET_5.0.2 - movl $-1096111855, %ecx - movd %ecx, %xmm4 - movss 1344(%ebx), %xmm2 - movss 1348(%ebx), %xmm3 - andl $-2147483648, %eax - movd %eax, %xmm5 - xorps %xmm5, %xmm2 - xorps %xmm5, %xmm3 - movss %xmm2, %xmm5 - movss %xmm1, %xmm0 - mulss %xmm1, %xmm1 - mulss %xmm0, %xmm4 - addss %xmm0, %xmm2 - subss %xmm2, %xmm5 - mulss %xmm4, %xmm1 - addss %xmm5, %xmm0 - addss %xmm3, %xmm1 - addss %xmm1, %xmm0 - addss %xmm2, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_5.0.2: - movss 1344(%ebx), %xmm0 - movss 1348(%ebx), %xmm3 - andl $-2147483648, %eax - movd %eax, %xmm5 - xorps %xmm5, %xmm0 - xorps %xmm5, %xmm3 - movss %xmm0, %xmm5 - addss %xmm1, %xmm0 - subss %xmm0, %xmm5 - addss %xmm5, %xmm1 - addss %xmm1, %xmm3 - addss %xmm3, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_4.0.2: - movss 1344(%ebx), %xmm2 - movss 1348(%ebx), %xmm3 - cmpl $2139029504, %edx - ja .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_7.0.2: - andl $-2147483648, %eax - movd %eax, %xmm0 - orps %xmm0, %xmm2 - orps %xmm3, %xmm0 - addss %xmm2, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_6.0.2: - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - je .L_2TAG_PACKET_7.0.2 - addss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_1.0.2: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type atanf,@function - .size atanf,.-atanf - .data -# -- End atanf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 1023669327 - .long 803928991 - .long 1024193038 - .long 2966692170 - .long 1024716678 - .long 811692700 - .long 1025240245 - .long 792964392 - .long 1025763734 - .long 802148141 - .long 1026287141 - .long 819324013 - .long 1026810463 - .long 790037051 - .long 1027333695 - .long 759154391 - .long 1027856833 - .long 817525057 - .long 1028379874 - .long 808527090 - .long 1028902813 - .long 821626264 - .long 1029425647 - .long 817580405 - .long 1029948372 - .long 2952445505 - .long 1030470983 - .long 801005003 - .long 1030993477 - .long 800387983 - .long 1031515850 - .long 2942256123 - .long 1032048979 - .long 2968250322 - .long 1032570964 - .long 822790803 - .long 1033092672 - .long 826289861 - .long 1033614088 - .long 2976224418 - .long 1034135194 - .long 824490938 - .long 1034655977 - .long 822527213 - .long 1035176421 - .long 784232806 - .long 1035696510 - .long 822531604 - .long 1036216230 - .long 2967672936 - .long 1036735564 - .long 826515440 - .long 1037254499 - .long 2944102134 - .long 1037773019 - .long 2977774463 - .long 1038291108 - .long 795957866 - .long 1038808753 - .long 2972700386 - .long 1039325938 - .long 2975253635 - .long 1039842648 - .long 807079588 - .long 1040402092 - .long 822355304 - .long 1040917290 - .long 805504040 - .long 1041431409 - .long 2978896586 - .long 1041944391 - .long 836680090 - .long 1042456182 - .long 826352980 - .long 1042966726 - .long 2973619487 - .long 1043475968 - .long 2937629464 - .long 1043983855 - .long 831159584 - .long 1044490335 - .long 820394738 - .long 1044995356 - .long 2965290852 - .long 1045498867 - .long 772017454 - .long 1046000819 - .long 2978687103 - .long 1046501162 - .long 836200518 - .long 1046999850 - .long 836883769 - .long 1047496836 - .long 826905524 - .long 1047992074 - .long 824423170 - .long 1048653779 - .long 2993658277 - .long 1049143506 - .long 2988293347 - .long 1049629355 - .long 838635411 - .long 1050111172 - .long 2981083232 - .long 1050588809 - .long 840069395 - .long 1051062131 - .long 2985487843 - .long 1051531009 - .long 2987007755 - .long 1051995325 - .long 2954909954 - .long 1052454971 - .long 2992105648 - .long 1052909846 - .long 2984512837 - .long 1053359860 - .long 2974535271 - .long 1053804931 - .long 834850816 - .long 1054244987 - .long 2990399399 - .long 1054679962 - .long 2986843574 - .long 1055109800 - .long 841668384 - .long 1055534454 - .long 840878179 - .long 1056161628 - .long 2959648204 - .long 1056972004 - .long 2999182783 - .long 1057370275 - .long 2987693957 - .long 1057757908 - .long 848029633 - .long 1058134927 - .long 833824667 - .long 1058501396 - .long 838916473 - .long 1058857417 - .long 2982869562 - .long 1059203123 - .long 2987447445 - .long 1059538675 - .long 2986943103 - .long 1059864257 - .long 2962018373 - .long 1060180073 - .long 3001690183 - .long 1060486341 - .long 3000978470 - .long 1060783292 - .long 855353569 - .long 1061071169 - .long 847903241 - .long 1061350219 - .long 2995336148 - .long 1061620693 - .long 848940038 - .long 1062010885 - .long 848518105 - .long 1062503512 - .long 2989792343 - .long 1062966414 - .long 2998000194 - .long 1063401558 - .long 2966602495 - .long 1063810833 - .long 841421013 - .long 1064196033 - .long 853285487 - .long 1064558850 - .long 831341538 - .long 1064900868 - .long 2999260393 - .long 1065223564 - .long 3001104089 - .long 1065440763 - .long 856880849 - .long 1065584798 - .long 852830020 - .long 1065721082 - .long 862757435 - .long 1065850159 - .long 2998927867 - .long 1065972528 - .long 2998512290 - .long 1066088651 - .long 2998663603 - .long 1066198953 - .long 2996780932 - .long 1066354340 - .long 3007554211 - .long 1066544552 - .long 2996943326 - .long 1066717600 - .long 3000009859 - .long 1066875577 - .long 856175525 - .long 1067020272 - .long 836800017 - .long 1067153216 - .long 3008748444 - .long 1067275724 - .long 851983949 - .long 1067388933 - .long 862585050 - .long 1067493827 - .long 3009301766 - .long 1067591258 - .long 2988483069 - .long 1067681973 - .long 3005223458 - .long 1067766623 - .long 839061141 - .long 1067845782 - .long 2995523700 - .long 1067919954 - .long 2995663457 - .long 1067989585 - .long 858133164 - .long 1068055072 - .long 829335339 - .long 1068146290 - .long 856294518 - .long 1068256389 - .long 3003850806 - .long 1068355146 - .long 856998103 - .long 1068444206 - .long 2999569255 - .long 1068524912 - .long 3011255227 - .long 1068598373 - .long 841513866 - .long 1068665514 - .long 841710807 - .long 1068727109 - .long 2949159239 - .long 1068783812 - .long 2995542644 - .long 1068836179 - .long 3007665083 - .long 1068884685 - .long 3006087365 - .long 1068929739 - .long 2996180184 - .long 1068971695 - .long 3006313179 - .long 1069010859 - .long 849476222 - .long 1069047500 - .long 860722755 - .long 1069081853 - .long 859062603 - .long 1069129538 - .long 2979745798 - .long 1069186846 - .long 842801502 - .long 1069238035 - .long 3010794384 - .long 1069284031 - .long 3010162926 - .long 1069325584 - .long 3005589807 - .long 1069363306 - .long 853875835 - .long 1069397703 - .long 851842476 - .long 1069429195 - .long 3001807968 - .long 1069458133 - .long 859424355 - .long 1069484817 - .long 3004202910 - .long 1069509498 - .long 843503196 - .long 1069532394 - .long 856475636 - .long 1069553692 - .long 2995114457 - .long 1069573552 - .long 860725119 - .long 1069592116 - .long 859745384 - .long 1069609507 - .long 3009201804 - .long 1069633623 - .long 855498560 - .long 1069662574 - .long 858167444 - .long 1069688405 - .long 853306415 - .long 1069711594 - .long 846705105 - .long 1069732526 - .long 858976312 - .long 1069751516 - .long 2999172562 - .long 1069768821 - .long 2999539371 - .long 1069784656 - .long 2998679696 - .long 1069799200 - .long 861304267 - .long 1069812606 - .long 843012447 - .long 1069825002 - .long 3010989671 - .long 1069836497 - .long 3005173143 - .long 1069847186 - .long 853102954 - .long 1069857152 - .long 2993551140 - .long 1069866465 - .long 3000116992 - .long 1069875187 - .long 827148142 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 32768 - .long 0 - .long 0 - .long 1431655765 - .long 3218429269 - .long 0 - .long 0 - .long 1070141402 - .long 866263400 - .long 0 - .long 0 - .long 1045220557 - .long 3198855851 - .long 0 - .long 0 - .long 1065353216 - .long 0 - .long 0 - .long 0 - .long 3198855441 - .long 0 - .long 0 - .long 0 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 2146959360 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,1440 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanh_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanh_wmt.S deleted file mode 100644 index 3c618294c5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanh_wmt.S +++ /dev/null @@ -1,1380 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanh_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin atanh - .text - .align 16,0x90 - .globl atanh -atanh: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movl 116(%esp), %eax - movl %eax, %ecx - movq %xmm0, 8(%esp) - movl %eax, %edx - andl $2147483647, %eax - cmpl $1072693248, %eax - jge .L_2TAG_PACKET_0.0.3 - cmpl $1068498944, %eax - jl .L_2TAG_PACKET_1.0.3 - movsd 96(%ebx), %xmm2 - movsd 112(%ebx), %xmm4 - movsd 112(%ebx), %xmm3 - movsd 144(%ebx), %xmm6 - andpd %xmm2, %xmm0 - movq %xmm0, %xmm1 - movq %xmm0, %xmm7 - subsd %xmm4, %xmm0 - addsd %xmm4, %xmm1 - divsd %xmm0, %xmm4 - movq %xmm0, %xmm5 - movq %xmm1, %xmm2 - andpd 128(%ebx), %xmm5 - addsd %xmm0, %xmm3 - addsd %xmm2, %xmm6 - subsd %xmm5, %xmm0 - subsd %xmm7, %xmm3 - subsd %xmm7, %xmm6 - mulsd %xmm4, %xmm1 - andpd 128(%ebx), %xmm1 - mulsd %xmm1, %xmm5 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm0 - subsd %xmm5, %xmm2 - subsd %xmm3, %xmm6 - cvtsd2ss %xmm1, %xmm7 - subsd %xmm0, %xmm2 - rcpss %xmm7, %xmm7 - subsd %xmm6, %xmm2 - mulsd %xmm4, %xmm2 - cvtss2sd %xmm7, %xmm3 - paddd 160(%ebx), %xmm3 - andpd 176(%ebx), %xmm3 - mulsd %xmm3, %xmm1 - subsd 192(%ebx), %xmm1 - mulsd %xmm3, %xmm2 - psrlq $40, %xmm3 - movq %xmm1, %xmm4 - addsd %xmm2, %xmm1 - movd %xmm3, %eax - movl $4080, %ecx - andl %eax, %ecx - andl $8384512, %eax - cvtsi2sdl %eax, %xmm3 - movapd 272(%ebx,%ecx), %xmm5 - pshufd $68, %xmm3, %xmm3 - mulpd 208(%ebx), %xmm3 - subpd %xmm3, %xmm5 - pshufd $68, %xmm1, %xmm6 - movapd 224(%ebx), %xmm0 - mulpd %xmm6, %xmm0 - mulsd %xmm1, %xmm1 - addpd 240(%ebx), %xmm0 - pshufd $238, %xmm5, %xmm3 - addsd %xmm2, %xmm5 - movq %xmm3, %xmm7 - addsd %xmm4, %xmm3 - subsd %xmm3, %xmm7 - pshufd $238, %xmm0, %xmm2 - mulsd %xmm1, %xmm0 - addsd %xmm2, %xmm0 - andl $-2147483648, %edx - mulsd %xmm1, %xmm0 - addsd %xmm7, %xmm4 - subsd %xmm6, %xmm0 - addsd %xmm4, %xmm5 - mulsd %xmm6, %xmm0 - movd %edx, %xmm2 - psllq $32, %xmm2 - addsd %xmm5, %xmm0 - addsd %xmm3, %xmm0 - orpd %xmm2, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - cmpl $1003487232, %eax - jl .L_2TAG_PACKET_3.0.3 - movapd 32(%ebx), %xmm1 - movapd %xmm0, %xmm2 - mulsd %xmm0, %xmm0 - movapd %xmm0, %xmm3 - mulsd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm3 - mulpd %xmm0, %xmm1 - addpd 16(%ebx), %xmm1 - mulpd %xmm0, %xmm1 - addpd (%ebx), %xmm1 - mulpd %xmm3, %xmm1 - movhlps %xmm1, %xmm0 - addsd %xmm1, %xmm0 - mulsd %xmm2, %xmm0 - addsd %xmm2, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - andl $2146435072, %eax - je .L_2TAG_PACKET_4.0.3 - fldl 8(%esp) - fld1 - fld %st(1) - faddp - fmulp - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - fldl 8(%esp) - fld %st(0) - fmul %st(1), %st - fstpl (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - movl 8(%esp), %ecx - jne .L_2TAG_PACKET_5.0.3 - testl %ecx, %ecx - je .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_5.0.3: - cmpl $2146435072, %eax - jg .L_2TAG_PACKET_7.0.3 - je .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_9.0.3: - xorpd %xmm0, %xmm0 - mulsd 256(%ebx), %xmm0 - movsd %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $131, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - xorpd %xmm1, %xmm1 - divsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $132, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_8.0.3: - testl %ecx, %ecx - je .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_7.0.3: - addsd %xmm0, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) -.L_2TAG_PACKET_2.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type atanh,@function - .size atanh,.-atanh - .data -# -- End atanh - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1431655765 - .long 1070945621 - .long 2576980801 - .long 1070176665 - .long 2453616913 - .long 1069697316 - .long 1427436931 - .long 1069314503 - .long 2129349532 - .long 1068975486 - .long 1629438381 - .long 1068756329 - .long 0 - .long 3219128320 - .long 1431621855 - .long 1070945621 - .long 4294842013 - .long 3218079743 - .long 1289448124 - .long 1070176674 - .long 2077359316 - .long 3217380703 - .long 0 - .long 0 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 4026531840 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 3220176896 - .long 0 - .long 4293918976 - .long 0 - .long 4293918976 - .long 0 - .long 4294963200 - .long 0 - .long 4294963200 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 3164486458 - .long 1017968538 - .long 4277796864 - .long 1058418242 - .long 2640218915 - .long 3222623584 - .long 4294812536 - .long 3221225471 - .long 1158309786 - .long 1074370979 - .long 1431613876 - .long 1073042773 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 3961250687 - .long 1024388927 - .long 3715808466 - .long 1081484075 - .long 2810985123 - .long 3168028234 - .long 3782743078 - .long 1081484067 - .long 2030471786 - .long 1021588483 - .long 3982853962 - .long 1081484059 - .long 724716906 - .long 1026766458 - .long 20143440 - .long 1081484052 - .long 481208597 - .long 1024261464 - .long 483527638 - .long 1081484044 - .long 769498347 - .long 1026449044 - .long 1077032516 - .long 1081484036 - .long 662383902 - .long 3174188397 - .long 1799662888 - .long 1081484028 - .long 4195513590 - .long 3173820974 - .long 2650434932 - .long 1081484020 - .long 216019017 - .long 3171160333 - .long 3628376034 - .long 1081484012 - .long 3037216435 - .long 3174203912 - .long 437557316 - .long 1081484005 - .long 2242287414 - .long 3173446660 - .long 1666962648 - .long 1081483997 - .long 488659010 - .long 3174389563 - .long 3020684720 - .long 1081483989 - .long 2411277324 - .long 3174261033 - .long 202826760 - .long 1081483982 - .long 1552614370 - .long 3174374647 - .long 1802404272 - .long 1081483974 - .long 1761159654 - .long 1025358045 - .long 3523541100 - .long 1081483966 - .long 1227029918 - .long 1022400056 - .long 1070371174 - .long 1081483959 - .long 1017266216 - .long 1025927327 - .long 3031940236 - .long 1081483951 - .long 541289881 - .long 3173823840 - .long 817434636 - .long 1081483944 - .long 827704132 - .long 1025095119 - .long 3015919542 - .long 1081483936 - .long 12934210 - .long 3172513362 - .long 1036600450 - .long 1081483929 - .long 1022949985 - .long 3172215173 - .long 3468561396 - .long 1081483921 - .long 217728403 - .long 1020883592 - .long 1721026464 - .long 1081483914 - .long 1773946939 - .long 1027063347 - .long 88130720 - .long 1081483907 - .long 3351615536 - .long 3172077507 - .long 2864018200 - .long 1081483899 - .long 4106838151 - .long 3174156261 - .long 1457939880 - .long 1081483892 - .long 2465439606 - .long 3172344168 - .long 164057338 - .long 1081483885 - .long 657024829 - .long 1026968941 - .long 3276540740 - .long 1081483877 - .long 239284496 - .long 1025773300 - .long 2204666832 - .long 1081483870 - .long 563503993 - .long 3172683562 - .long 1242622588 - .long 1081483863 - .long 610254749 - .long 3174232732 - .long 389635916 - .long 1081483856 - .long 1002592152 - .long 1020145289 - .long 3939910132 - .long 1081483848 - .long 3079709802 - .long 1025793649 - .long 3302754668 - .long 1081483841 - .long 4156588929 - .long 3174405388 - .long 2772388732 - .long 1081483834 - .long 2177005711 - .long 3173706385 - .long 2348072008 - .long 1081483827 - .long 430264461 - .long 3174137709 - .long 2029071860 - .long 1081483820 - .long 3379887614 - .long 1025826683 - .long 1814663212 - .long 1081483813 - .long 1712456239 - .long 1026917505 - .long 1704128456 - .long 1081483806 - .long 3085449310 - .long 1022564341 - .long 1696757342 - .long 1081483799 - .long 1141334958 - .long 3171815944 - .long 1791846876 - .long 1081483792 - .long 1462201563 - .long 1025647829 - .long 1988701228 - .long 1081483785 - .long 140047506 - .long 3174122852 - .long 2286631636 - .long 1081483778 - .long 2759845912 - .long 1024469925 - .long 2684956298 - .long 1081483771 - .long 804042514 - .long 1026845100 - .long 3183000296 - .long 1081483764 - .long 3646267136 - .long 3171049236 - .long 3780095494 - .long 1081483757 - .long 2796072414 - .long 1025179136 - .long 180613146 - .long 1081483751 - .long 2935558853 - .long 1026289947 - .long 973833004 - .long 1081483744 - .long 3867040372 - .long 3174062522 - .long 1864139448 - .long 1081483737 - .long 3192294445 - .long 1024114853 - .long 2850890576 - .long 1081483730 - .long 2309059177 - .long 1026558495 - .long 3933450840 - .long 1081483723 - .long 3300904614 - .long 3173180909 - .long 816223656 - .long 1081483717 - .long 2836209699 - .long 1026670938 - .long 2088520500 - .long 1081483710 - .long 3053174336 - .long 3174287073 - .long 3454757072 - .long 1081483703 - .long 875601420 - .long 1025878424 - .long 619355076 - .long 1081483697 - .long 4096202184 - .long 1026024994 - .long 2171644060 - .long 1081483690 - .long 2316702776 - .long 3172256416 - .long 3816057542 - .long 1081483683 - .long 3057023477 - .long 3173172612 - .long 1257034828 - .long 1081483677 - .long 2024148590 - .long 1026183907 - .long 3083922828 - .long 1081483670 - .long 3658022801 - .long 3174540653 - .long 706204916 - .long 1081483664 - .long 965620747 - .long 3174139185 - .long 2713239208 - .long 1081483657 - .long 3558523119 - .long 3173414325 - .long 514520144 - .long 1081483651 - .long 2031819201 - .long 1024415865 - .long 2699416774 - .long 1081483644 - .long 2356933624 - .long 3174155910 - .long 677434328 - .long 1081483638 - .long 62190434 - .long 1027016638 - .long 3037952504 - .long 1081483631 - .long 3933781504 - .long 1025915529 - .long 1190487056 - .long 1081483625 - .long 2941696762 - .long 1025734775 - .long 3724428072 - .long 1081483618 - .long 2414317168 - .long 3170887182 - .long 2049301558 - .long 1081483612 - .long 2475288969 - .long 3174544243 - .long 459540440 - .long 1081483606 - .long 2871120870 - .long 3173072625 - .long 3249582612 - .long 1081483599 - .long 3658024676 - .long 3173912579 - .long 1828968996 - .long 1081483593 - .long 3145428063 - .long 1025702909 - .long 492147244 - .long 1081483587 - .long 3377090674 - .long 1025855275 - .long 3533569804 - .long 1081483580 - .long 441975505 - .long 3174521119 - .long 2362791964 - .long 1081483574 - .long 2700361953 - .long 1024904554 - .long 1274275566 - .long 1081483568 - .long 384688735 - .long 1024271063 - .long 267519784 - .long 1081483562 - .long 3294550047 - .long 1024123281 - .long 3636995640 - .long 1081483555 - .long 1629023504 - .long 3173808292 - .long 2792276776 - .long 1081483549 - .long 2896290296 - .long 1023457608 - .long 2027843168 - .long 1081483543 - .long 4214876422 - .long 3173347505 - .long 1343211900 - .long 1081483537 - .long 2089044909 - .long 1026320237 - .long 737904392 - .long 1081483531 - .long 1248769281 - .long 1026719018 - .long 211446364 - .long 1081483525 - .long 3287536014 - .long 1027064288 - .long 4058335068 - .long 1081483518 - .long 139482549 - .long 3171419957 - .long 3688170062 - .long 1081483512 - .long 2409197073 - .long 3174045711 - .long 3395456928 - .long 1081483506 - .long 469604718 - .long 3170908568 - .long 3179738046 - .long 1081483500 - .long 252575166 - .long 3173898937 - .long 3040559844 - .long 1081483494 - .long 659008259 - .long 3173067756 - .long 2977472740 - .long 1081483488 - .long 2489152120 - .long 1026987818 - .long 2990031104 - .long 1081483482 - .long 1288476519 - .long 3174460243 - .long 3077793216 - .long 1081483476 - .long 1544468634 - .long 3174466384 - .long 3240321200 - .long 1081483470 - .long 1563709080 - .long 1022000721 - .long 3477181002 - .long 1081483464 - .long 2370511724 - .long 3174484932 - .long 3787942340 - .long 1081483458 - .long 1487230717 - .long 3173625849 - .long 4172178648 - .long 1081483452 - .long 2208332257 - .long 3172980377 - .long 334499754 - .long 1081483447 - .long 3734805764 - .long 3173286476 - .long 864421012 - .long 1081483441 - .long 3848175750 - .long 1026823789 - .long 1466559484 - .long 1081483435 - .long 3339650886 - .long 1026799228 - .long 2140503092 - .long 1081483429 - .long 2587112486 - .long 1025074103 - .long 2885843270 - .long 1081483423 - .long 4237329462 - .long 1026571343 - .long 3702174928 - .long 1081483417 - .long 928919292 - .long 3173697437 - .long 294129124 - .long 1081483412 - .long 3350657575 - .long 3169758933 - .long 1251242194 - .long 1081483406 - .long 703498847 - .long 3173578839 - .long 2278151956 - .long 1081483400 - .long 1741773245 - .long 3169646323 - .long 3374466840 - .long 1081483394 - .long 938088363 - .long 3174103745 - .long 244831272 - .long 1081483389 - .long 1870507923 - .long 1024486077 - .long 1478794808 - .long 1081483383 - .long 3798424972 - .long 1026574662 - .long 2781008336 - .long 1081483377 - .long 1376042227 - .long 3171831111 - .long 4151093216 - .long 1081483371 - .long 516241188 - .long 1026864009 - .long 1293706648 - .long 1081483366 - .long 1238744632 - .long 3164368610 - .long 2798410838 - .long 1081483360 - .long 534941416 - .long 3172335234 - .long 74901872 - .long 1081483355 - .long 4279792400 - .long 3172103338 - .long 1712748064 - .long 1081483349 - .long 1565180338 - .long 1018613718 - .long 3416618846 - .long 1081483343 - .long 3951527485 - .long 3168909417 - .long 891186624 - .long 1081483338 - .long 3344344018 - .long 1024361841 - .long 2726028632 - .long 1081483332 - .long 1292300217 - .long 3174285210 - .long 330855832 - .long 1081483327 - .long 3519999099 - .long 1026857199 - .long 2295251240 - .long 1081483321 - .long 4255457731 - .long 1024555694 - .long 28931548 - .long 1081483316 - .long 1490990106 - .long 1024547962 - .long 2121485436 - .long 1081483310 - .long 3260941522 - .long 3172283917 - .long 4277602488 - .long 1081483304 - .long 246767963 - .long 1026252459 - .long 2201975040 - .long 1081483299 - .long 128194825 - .long 1026112424 - .long 189232752 - .long 1081483294 - .long 363902483 - .long 3169513578 - .long 2534007978 - .long 1081483288 - .long 3008515840 - .long 3172261022 - .long 646033852 - .long 1081483283 - .long 352511539 - .long 3170570563 - .long 3114915334 - .long 1081483277 - .long 1843039765 - .long 1026777816 - .long 1350390812 - .long 1081483272 - .long 946690324 - .long 3173265177 - .long 3942070448 - .long 1081483266 - .long 3545145670 - .long 1022546257 - .long 2299697768 - .long 1081483261 - .long 1496129287 - .long 1023820421 - .long 717920726 - .long 1081483256 - .long 3170447711 - .long 1026758832 - .long 3491389776 - .long 1081483250 - .long 3744391389 - .long 3173610490 - .long 2029855968 - .long 1081483245 - .long 394239962 - .long 3173947840 - .long 627974684 - .long 1081483240 - .long 4224315822 - .long 3174184559 - .long 3580403740 - .long 1081483234 - .long 2728751382 - .long 3174034570 - .long 2296901464 - .long 1081483229 - .long 1826853394 - .long 1026771661 - .long 1072130448 - .long 1081483224 - .long 976251207 - .long 1023454847 - .long 4200755644 - .long 1081483218 - .long 3540660088 - .long 3173642356 - .long 3092542436 - .long 1081483213 - .long 642222050 - .long 3174357226 - .long 2042160404 - .long 1081483208 - .long 4271938163 - .long 1024746297 - .long 1049314112 - .long 1081483203 - .long 2763050982 - .long 3171347092 - .long 113710388 - .long 1081483198 - .long 3792557536 - .long 1023308621 - .long 3530025584 - .long 1081483192 - .long 311855242 - .long 1025741510 - .long 2708036380 - .long 1081483187 - .long 246870760 - .long 3174242823 - .long 1942423536 - .long 1081483182 - .long 3741324184 - .long 1024230514 - .long 1232902676 - .long 1081483177 - .long 738314997 - .long 1025672705 - .long 579191580 - .long 1081483172 - .long 2156805174 - .long 1024422082 - .long 4275977444 - .long 1081483166 - .long 1311555958 - .long 3174065520 - .long 3733047680 - .long 1081483161 - .long 3764263691 - .long 3174151698 - .long 3245093668 - .long 1081483156 - .long 3869296466 - .long 3171928183 - .long 2811841556 - .long 1081483151 - .long 690806523 - .long 1025267317 - .long 2433019534 - .long 1081483146 - .long 2145634608 - .long 1026057800 - .long 2108357812 - .long 1081483141 - .long 3978517915 - .long 1027003985 - .long 1837588600 - .long 1081483136 - .long 1798363739 - .long 1024820509 - .long 1620446092 - .long 1081483131 - .long 1050593265 - .long 3173881020 - .long 1456666440 - .long 1081483126 - .long 992424745 - .long 3172306519 - .long 1345987738 - .long 1081483121 - .long 3429191021 - .long 3172872803 - .long 1288150008 - .long 1081483116 - .long 80339595 - .long 1025975133 - .long 1282895172 - .long 1081483111 - .long 1099626523 - .long 3173274851 - .long 1329967044 - .long 1081483106 - .long 37527030 - .long 1026870817 - .long 1429111296 - .long 1081483101 - .long 4119125584 - .long 3165241791 - .long 1580075462 - .long 1081483096 - .long 2270013714 - .long 1025817458 - .long 1782608896 - .long 1081483091 - .long 3203429680 - .long 1025496563 - .long 2036462774 - .long 1081483086 - .long 1148983882 - .long 1026950273 - .long 2341390064 - .long 1081483081 - .long 4068830577 - .long 1025284407 - .long 2697145518 - .long 1081483076 - .long 1923810050 - .long 1026721061 - .long 3103485644 - .long 1081483071 - .long 3762557359 - .long 1025074748 - .long 3560168702 - .long 1081483066 - .long 253913897 - .long 3171090011 - .long 4066954676 - .long 1081483061 - .long 1497751894 - .long 3172734642 - .long 328637968 - .long 1081483057 - .long 3363029157 - .long 3172289292 - .long 934916564 - .long 1081483052 - .long 3896109434 - .long 1024906782 - .long 1590588242 - .long 1081483047 - .long 570002366 - .long 3166515828 - .long 2295419742 - .long 1081483042 - .long 1386275374 - .long 1027010807 - .long 3049179448 - .long 1081483037 - .long 352253063 - .long 1025583264 - .long 3851637384 - .long 1081483032 - .long 606289825 - .long 1026218875 - .long 407597888 - .long 1081483028 - .long 2091542702 - .long 1025209018 - .long 1306768794 - .long 1081483023 - .long 1253650337 - .long 1026509039 - .long 2253957632 - .long 1081483018 - .long 4231155942 - .long 1026471430 - .long 3248940804 - .long 1081483013 - .long 3016566426 - .long 1026594534 - .long 4291496268 - .long 1081483008 - .long 2473443710 - .long 3172512713 - .long 1086436232 - .long 1081483004 - .long 3621506366 - .long 1025637579 - .long 2223476316 - .long 1081482999 - .long 1546124245 - .long 3173819367 - .long 3407431776 - .long 1081482994 - .long 906095450 - .long 3170941588 - .long 343119360 - .long 1081482990 - .long 610131836 - .long 3173841951 - .long 1620259200 - .long 1081482985 - .long 989279629 - .long 3174040346 - .long 2943671008 - .long 1081482980 - .long 3822867778 - .long 1024701039 - .long 18175958 - .long 1081482976 - .long 1622666714 - .long 3174118882 - .long 1433498564 - .long 1081482971 - .long 2171198509 - .long 1026059907 - .long 2894462876 - .long 1081482966 - .long 348671320 - .long 1025985459 - .long 105894376 - .long 1081482962 - .long 3585216657 - .long 3171231928 - .long 1657521836 - .long 1081482957 - .long 3446444124 - .long 1025447652 - .long 3254173534 - .long 1081482952 - .long 1463686921 - .long 3170751639 - .long 600679136 - .long 1081482948 - .long 3946680458 - .long 3172628318 - .long 2286771562 - .long 1081482943 - .long 2898292254 - .long 3173607956 - .long 4017283204 - .long 1081482938 - .long 378425754 - .long 1024364086 - .long 1497047798 - .long 1081482934 - .long 2208076810 - .long 1021550089 - .long 3315802306 - .long 1081482929 - .long 518466868 - .long 3170182275 - .long 883415824 - .long 1081482925 - .long 2262926030 - .long 3173232842 - .long 2789627944 - .long 1081482920 - .long 1857642286 - .long 3174551967 - .long 444310372 - .long 1081482916 - .long 312835987 - .long 1025199986 - .long 2437205282 - .long 1081482911 - .long 1932061261 - .long 3169727498 - .long 178186948 - .long 1081482907 - .long 2992653487 - .long 1024639967 - .long 2257000084 - .long 1081482902 - .long 2345620679 - .long 1020767444 - .long 83521478 - .long 1081482898 - .long 1865371320 - .long 3168909500 - .long 2247498342 - .long 1081482893 - .long 3458599018 - .long 1024937135 - .long 158809936 - .long 1081482889 - .long 2726616459 - .long 1023093864 - .long 2407205926 - .long 1081482884 - .long 3206755402 - .long 1022531411 - .long 402568002 - .long 1081482880 - .long 3974974073 - .long 3174453501 - .long 2734648240 - .long 1081482875 - .long 3634353085 - .long 3173855629 - .long 813330716 - .long 1081482871 - .long 1275754339 - .long 3172404325 - .long 3228369874 - .long 1081482866 - .long 2459942624 - .long 1026394723 - .long 1389652140 - .long 1081482862 - .long 3894317897 - .long 1022143780 - .long 3886934286 - .long 1081482857 - .long 2409656812 - .long 3174419085 - .long 2130105044 - .long 1081482853 - .long 399990141 - .long 3174164192 - .long 413956172 - .long 1081482849 - .long 1897372421 - .long 3171133891 - .long 3033280560 - .long 1081482844 - .long 2252287291 - .long 3171644317 - .long 1397970330 - .long 1081482840 - .long 1092600795 - .long 3174474273 - .long 4097787896 - .long 1081482835 - .long 636054898 - .long 1024727874 - .long 2542627584 - .long 1081482831 - .long 893978442 - .long 3170953397 - .long 1027286708 - .long 1081482827 - .long 1310200238 - .long 3172082428 - .long 3846563656 - .long 1081482822 - .long 1929717761 - .long 3174303818 - .long 2410356004 - .long 1081482818 - .long 2079265613 - .long 3173603756 - .long 1013464276 - .long 1081482814 - .long 138096117 - .long 3172000995 - .long 3950690054 - .long 1081482809 - .long 3014271250 - .long 1025494367 - .long 2631934076 - .long 1081482805 - .long 1516771853 - .long 1025097570 - .long 1352000006 - .long 1081482801 - .long 205057013 - .long 1025200619 - .long 110725238 - .long 1081482797 - .long 4146523933 - .long 3174010180 - .long 3202915484 - .long 1081482792 - .long 1438530950 - .long 3172691622 - .long 2038475574 - .long 1081482788 - .long 3556059382 - .long 1022109351 - .long 912213234 - .long 1081482784 - .long 3429560596 - .long 3174416385 - .long 4118937184 - .long 1081482779 - .long 21605584 - .long 3173029554 - .long 3068555236 - .long 1081482775 - .long 812212829 - .long 3174509580 - .long 2055878076 - .long 1081482771 - .long 3822203782 - .long 3172686714 - .long 1080750056 - .long 1081482767 - .long 2015620057 - .long 1020790313 - .long 143016496 - .long 1081482763 - .long 497128390 - .long 3173548042 - .long 3537490964 - .long 1081482758 - .long 2709103148 - .long 3174501920 - .long 2674086084 - .long 1081482754 - .long 567743127 - .long 3172450622 - .long 1847617306 - .long 1081482750 - .long 2788161622 - .long 3174369501 - .long 1057933720 - .long 1081482746 - .long 3612383344 - .long 3174048564 - .long 304885332 - .long 1081482742 - .long 2310781260 - .long 3173370133 - .long 3883290364 - .long 1081482737 - .long 2417832061 - .long 1025537953 - .long 3203066056 - .long 1081482733 - .long 2228257300 - .long 1023509958 - .long 2559032440 - .long 1081482729 - .long 3413175845 - .long 1026737228 - .long 1951043140 - .long 1081482725 - .long 1019314226 - .long 1026188380 - .long 1378952672 - .long 1081482721 - .long 1939366236 - .long 3173263748 - .long 842616428 - .long 1081482717 - .long 2826522465 - .long 1026654019 - .long 341890668 - .long 1081482713 - .long 510868637 - .long 3173428756 - .long 4171599824 - .long 1081482708 - .long 2348490647 - .long 1026914531 - .long 3741667284 - .long 1081482704 - .long 1992702016 - .long 3171098997 - .long 3346919190 - .long 1081482700 - .long 1915735778 - .long 3171038930 - .long 2987215220 - .long 1081482696 - .long 708866615 - .long 1023303854 - .long 2662415896 - .long 1081482692 - .long 1533252285 - .long 1025288173 - .long 2372382570 - .long 1081482688 - .long 3419174070 - .long 3173768463 - .long 2116977420 - .long 1081482684 - .long 2278659151 - .long 1025060560 - .long 1896063436 - .long 1081482680 - .long 2525715938 - .long 3169189535 - .long 1709504428 - .long 1081482676 - .long 1253833294 - .long 1025773641 - .long 1557165004 - .long 1081482672 - .long 3815681768 - .long 3168831918 - .long 1438910576 - .long 1081482668 - .long 3615821994 - .long 1021226882 - .long 1354607344 - .long 1081482664 - .long 3031132768 - .long 1026704265 - .long 1304122296 - .long 1081482660 - .long 997386977 - .long 3171874671 - .long 1287323204 - .long 1081482656 - .type static_const_table,@object - .size static_const_table,4384 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanhf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanhf_wmt.S deleted file mode 100644 index 9a19241900..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanhf_wmt.S +++ /dev/null @@ -1,1328 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanhf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin atanhf - .text - .align 16,0x90 - .globl atanhf -atanhf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 52(%esp) - call static_func - movl %eax, %ebx - movss 128(%esp), %xmm0 - movl 128(%esp), %eax - movss %xmm0, 16(%esp) - andl $2147483647, %eax - cmpl $1065353216, %eax - jge .L_2TAG_PACKET_0.0.3 - cmpl $1056964608, %eax - jl .L_2TAG_PACKET_1.0.3 - pshufd $0, %xmm0, %xmm0 - cvtps2pd %xmm0, %xmm0 - xorpd 176(%ebx), %xmm0 - addpd 112(%ebx), %xmm0 - movapd %xmm0, %xmm1 - psrlq $41, %xmm0 - pextrw $0, %xmm0, %eax - pextrw $4, %xmm0, %ecx - psrlq $11, %xmm0 - movhlps %xmm0, %xmm2 - andl $2040, %eax - andl $2040, %ecx - movq 192(%ebx,%ecx), %xmm3 - subsd 192(%ebx,%eax), %xmm3 - movq 2240(%ebx,%eax), %xmm4 - movhpd 2240(%ebx,%ecx), %xmm4 - psubd %xmm0, %xmm2 - movd %xmm2, %eax - movapd 80(%ebx), %xmm5 - cvtsi2sdl %eax, %xmm2 - mulsd 96(%ebx), %xmm2 - andpd 128(%ebx), %xmm1 - orpd 112(%ebx), %xmm1 - mulpd %xmm4, %xmm1 - subpd 112(%ebx), %xmm1 - mulpd %xmm1, %xmm5 - addpd 64(%ebx), %xmm5 - mulpd %xmm1, %xmm5 - mulpd %xmm1, %xmm5 - addpd %xmm5, %xmm1 - movhlps %xmm1, %xmm0 - addsd %xmm3, %xmm2 - subsd %xmm1, %xmm0 - addsd %xmm2, %xmm0 - psubw 160(%ebx), %xmm0 - movq %xmm0, (%esp) - movhpd %xmm0, 8(%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - cmpl $838860800, %eax - jl .L_2TAG_PACKET_3.0.3 - flds 16(%esp) - flds 16(%esp) - fxch - fmul %st(0), %st - fldl 56(%ebx) - fld %st(1) - fxch %st(2) - fmul %st(0), %st - fldl 48(%ebx) - fxch - fmul %st, %st(2) - fmul %st, %st(1) - fxch %st(2) - faddl 40(%ebx) - fxch - faddl 32(%ebx) - fxch - fmul %st(2), %st - fxch - fmul %st(2), %st - fxch - faddl 24(%ebx) - fxch - faddl 16(%ebx) - fxch - fmul %st(2), %st - fxch - fmul %st(2), %st - fxch - faddl 8(%ebx) - fxch - faddl (%ebx) - fxch - fmulp %st, %st(2) - fmulp %st, %st(2) - faddp - fmul %st(1), %st - faddp - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - andl $2139095040, %eax - je .L_2TAG_PACKET_4.0.3 - flds 16(%esp) - fld1 - fadd %st(1), %st - fstps (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - flds 16(%esp) - fld %st(0) - fmul %st(1), %st - fstps (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - je .L_2TAG_PACKET_5.0.3 - cmpl $2139095040, %eax - jg .L_2TAG_PACKET_6.0.3 - xorps %xmm0, %xmm0 - mulss 144(%ebx), %xmm0 - movss %xmm0, (%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $133, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_5.0.3: - xorps %xmm1, %xmm1 - divss %xmm1, %xmm0 - movss %xmm0, (%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $134, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - addss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_2.0.3: - movl 52(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type atanhf,@function - .size atanhf,.-atanhf - .data -# -- End atanhf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1370222587 - .long 1070945621 - .long 2417412325 - .long 1070176668 - .long 2969394279 - .long 1069697198 - .long 1510013680 - .long 1069319176 - .long 1692635884 - .long 1068924049 - .long 3693828232 - .long 1069068511 - .long 4025937356 - .long 3211315437 - .long 476477515 - .long 1070012413 - .long 3879088107 - .long 3219128321 - .long 3879088107 - .long 3219128321 - .long 1754324240 - .long 1070945626 - .long 1754324240 - .long 1070945626 - .long 4277811695 - .long 1072049730 - .long 4277811695 - .long 1072049730 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .long 2139095040 - .long 2139095040 - .long 2139095040 - .long 2139095040 - .long 0 - .long 1048576 - .long 0 - .long 1048576 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 1440057502 - .long 1063257089 - .long 341338964 - .long 1064833554 - .long 4184355568 - .long 1065621801 - .long 2227658503 - .long 1066152307 - .long 449262470 - .long 1066510009 - .long 1570422842 - .long 1066777242 - .long 121841140 - .long 1067045544 - .long 630691842 - .long 1067281191 - .long 2711485097 - .long 1067500943 - .long 2026622491 - .long 1067619660 - .long 766078039 - .long 1067755853 - .long 4074027864 - .long 1067875476 - .long 3056660584 - .long 1067995528 - .long 3195252556 - .long 1068133258 - .long 116861598 - .long 1068254238 - .long 325086471 - .long 1068375655 - .long 296456961 - .long 1068497513 - .long 2623383041 - .long 1068559379 - .long 1681725707 - .long 1068620754 - .long 2231263004 - .long 1068682354 - .long 2815553124 - .long 1068744181 - .long 2057310944 - .long 1068806237 - .long 2095798018 - .long 1068859611 - .long 2302040698 - .long 1068922096 - .long 745232013 - .long 1068984815 - .long 659581512 - .long 1069047769 - .long 1566132617 - .long 1069101918 - .long 550036981 - .long 1069165314 - .long 2887419564 - .long 1069219844 - .long 1990183441 - .long 1069283688 - .long 3220050856 - .long 1069338605 - .long 1669613218 - .long 1069393703 - .long 2145455994 - .long 1069458213 - .long 4275830246 - .long 1069513705 - .long 1392453108 - .long 1069558451 - .long 1469915213 - .long 1069586382 - .long 2183652476 - .long 1069619086 - .long 2109656884 - .long 1069647220 - .long 636640577 - .long 1069675449 - .long 510517079 - .long 1069703773 - .long 210141498 - .long 1069732193 - .long 2537624622 - .long 1069760709 - .long 1733817001 - .long 1069789323 - .long 137854980 - .long 1069813243 - .long 3905576828 - .long 1069842036 - .long 4131810788 - .long 1069870929 - .long 3760956694 - .long 1069899922 - .long 1473082581 - .long 1069929016 - .long 926113142 - .long 1069953338 - .long 3669742467 - .long 1069982617 - .long 3711755290 - .long 1070007095 - .long 311386407 - .long 1070036564 - .long 705364525 - .long 1070066136 - .long 1973375279 - .long 1070090859 - .long 3589645072 - .long 1070115655 - .long 2425772059 - .long 1070145508 - .long 1074899574 - .long 1070170467 - .long 118003300 - .long 1070200516 - .long 691310403 - .long 1070225639 - .long 3273036717 - .long 1070250837 - .long 1226436560 - .long 1070276112 - .long 2481153995 - .long 1070306542 - .long 3227997535 - .long 1070331985 - .long 1421812646 - .long 1070357506 - .long 3386588242 - .long 1070383104 - .long 2580043380 - .long 1070408781 - .long 1068692560 - .long 1070434537 - .long 938143489 - .long 1070460372 - .long 4293333010 - .long 1070486286 - .long 373864817 - .long 1070512282 - .long 4208958430 - .long 1070538357 - .long 783121462 - .long 1070564515 - .long 870975437 - .long 1070590754 - .long 3338886172 - .long 1070606585 - .long 3772343130 - .long 1070619787 - .long 2408245143 - .long 1070630379 - .long 3811383569 - .long 1070643656 - .long 1622638721 - .long 1070656976 - .long 1290798655 - .long 1070670338 - .long 2457529556 - .long 1070681058 - .long 2398194399 - .long 1070694497 - .long 3190801979 - .long 1070707979 - .long 3352241197 - .long 1070718796 - .long 1829681364 - .long 1070732357 - .long 2568927817 - .long 1070743237 - .long 2676427515 - .long 1070756877 - .long 2882402820 - .long 1070767821 - .long 44944622 - .long 1070781542 - .long 2957945300 - .long 1070792550 - .long 1261787704 - .long 1070806352 - .long 1589923677 - .long 1070817426 - .long 3274931829 - .long 1070828529 - .long 1999843716 - .long 1070842450 - .long 1673619518 - .long 1070853620 - .long 601221319 - .long 1070864820 - .long 3763576649 - .long 1070876049 - .long 1974923437 - .long 1070890129 - .long 1096100617 - .long 1070901427 - .long 2424897952 - .long 1070912755 - .long 2376202600 - .long 1070924114 - .long 1665651958 - .long 1070935504 - .long 1014729354 - .long 1070946925 - .long 722545241 - .long 1070961245 - .long 1800682930 - .long 1070972736 - .long 1029453230 - .long 1070984259 - .long 3450874911 - .long 1070995813 - .long 1228255906 - .long 1071007400 - .long 3711032981 - .long 1071019018 - .long 3075102917 - .long 1071030669 - .long 92696812 - .long 1071042353 - .long 3897749690 - .long 1071051136 - .long 1907922160 - .long 1071062877 - .long 4023807324 - .long 1071074650 - .long 2452345726 - .long 1071086457 - .long 2292128226 - .long 1071098297 - .long 58635942 - .long 1071110171 - .long 864186929 - .long 1071122078 - .long 3555691467 - .long 1071131030 - .long 2003684347 - .long 1071142997 - .long 1479703759 - .long 1071154998 - .long 2537208015 - .long 1071164021 - .long 3699909861 - .long 1071176082 - .long 3934098706 - .long 1071188178 - .long 3885764182 - .long 1071197273 - .long 1357790931 - .long 1071209431 - .long 295956059 - .long 1071221624 - .long 4080877676 - .long 1071230791 - .long 202970280 - .long 1071243047 - .long 3977575845 - .long 1071252261 - .long 35977849 - .long 1071264580 - .long 1585496963 - .long 1071273842 - .long 375247257 - .long 1071286224 - .long 1812199574 - .long 1071295534 - .long 1876912769 - .long 1071307980 - .long 1051846544 - .long 1071317339 - .long 979589448 - .long 1071329850 - .long 71706889 - .long 1071339258 - .long 2790898835 - .long 1071351834 - .long 4013797733 - .long 1071361291 - .long 2541231151 - .long 1071370770 - .long 921733145 - .long 1071383442 - .long 508375805 - .long 1071392971 - .long 3091669954 - .long 1071402521 - .long 3343209673 - .long 1071415289 - .long 1693047557 - .long 1071424891 - .long 173861808 - .long 1071434515 - .long 3515822703 - .long 1071444160 - .long 1974837761 - .long 1071457056 - .long 1189018219 - .long 1071466754 - .long 2441946573 - .long 1071476474 - .long 1887102255 - .long 1071486217 - .long 4271031636 - .long 1071495982 - .long 876995759 - .long 1071509039 - .long 438773454 - .long 1071518858 - .long 172621632 - .long 1071528700 - .long 544035182 - .long 1071538565 - .long 2021801298 - .long 1071548453 - .long 783063308 - .long 1071558365 - .long 1598254051 - .long 1071568300 - .long 651258553 - .long 1071578259 - .long 2719315456 - .long 1071588241 - .long 3993180461 - .long 1071598247 - .long 667093936 - .long 1071608278 - .long 1823716217 - .long 1071618332 - .long 3664357648 - .long 1071628410 - .long 2393914686 - .long 1071638513 - .long 1405419566 - .long 1071646656 - .long 563652001 - .long 1071651732 - .long 1074554091 - .long 1071656820 - .long 3195405229 - .long 1071661920 - .long 2890399284 - .long 1071667033 - .long 420597586 - .long 1071672159 - .long 87278952 - .long 1071675583 - .long 1753119502 - .long 1071680729 - .long 1959759897 - .long 1071685888 - .long 975389815 - .long 1071691060 - .long 3365155278 - .long 1071696244 - .long 811309190 - .long 1071701442 - .long 1269811480 - .long 1071704914 - .long 1108583542 - .long 1071710133 - .long 1034517919 - .long 1071715365 - .long 1327340287 - .long 1071720610 - .long 1388251237 - .long 1071724114 - .long 1488234797 - .long 1071729381 - .long 2711385691 - .long 1071734661 - .long 952179194 - .long 1071738189 - .long 3255685427 - .long 1071743491 - .long 3159039803 - .long 1071748807 - .long 951558972 - .long 1071752359 - .long 3234424125 - .long 1071757697 - .long 3904573547 - .long 1071763049 - .long 2648729924 - .long 1071766625 - .long 2729250212 - .long 1071772000 - .long 2000712574 - .long 1071777389 - .long 3125257108 - .long 1071780989 - .long 3160324803 - .long 1071786401 - .long 2216316974 - .long 1071790017 - .long 3875016090 - .long 1071795452 - .long 1439520610 - .long 1071799084 - .long 1298103361 - .long 1071804543 - .long 2217517956 - .long 1071810016 - .long 1191753587 - .long 1071813673 - .long 1728773900 - .long 1071819170 - .long 747445441 - .long 1071822843 - .long 1670772213 - .long 1071826522 - .long 1471209283 - .long 1071832053 - .long 3287905877 - .long 1071835748 - .long 594038131 - .long 1071841304 - .long 3920147917 - .long 1071845015 - .long 3957142762 - .long 1071850595 - .long 826988438 - .long 1071854324 - .long 242509008 - .long 1071859929 - .long 4173610350 - .long 1071863673 - .long 2518313625 - .long 1071867425 - .long 2671523434 - .long 1071873065 - .long 387544807 - .long 1071876834 - .long 1470497767 - .long 1071880609 - .long 4269259217 - .long 1071886284 - .long 1345663925 - .long 1071890077 - .long 2159323299 - .long 1071893876 - .long 957937516 - .long 1071899588 - .long 2994656967 - .long 1071903404 - .long 556124819 - .long 1071907228 - .long 1631098658 - .long 1071912976 - .long 1368257861 - .long 1071916817 - .long 1309849279 - .long 1071920665 - .long 1567156841 - .long 1071924520 - .long 1179420986 - .long 1071930316 - .long 569448444 - .long 1071934189 - .long 669557459 - .long 1071938069 - .long 1593834700 - .long 1071941956 - .long 3166083125 - .long 1071947800 - .long 211641815 - .long 1071951706 - .long 2780675719 - .long 1071955618 - .long 2400234567 - .long 1071959538 - .long 3482927192 - .long 1071963465 - .long 1852089988 - .long 1071967400 - .long 1020849000 - .long 1071973316 - .long 1718090839 - .long 1071977269 - .long 121152472 - .long 1071981230 - .long 646346839 - .long 1071985198 - .long 3415709705 - .long 1071989173 - .long 4257004898 - .long 1071993156 - .long 3293664199 - .long 1071997147 - .long 649825382 - .long 1072001146 - .long 248887552 - .long 1072007158 - .long 2541522737 - .long 1072011175 - .long 3593780107 - .long 1072015200 - .long 3533041935 - .long 1072019233 - .long 2487426809 - .long 1072023274 - .long 585795318 - .long 1072027323 - .long 2252723088 - .long 1072031379 - .long 3323604690 - .long 1072035443 - .long 3929561382 - .long 1072039515 - .long 4202479723 - .long 1072043595 - .long 4275017539 - .long 1072047683 - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .type static_const_table,@object - .size static_const_table,4288 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanhl.S deleted file mode 100644 index cd538f8a50..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanhl.S +++ /dev/null @@ -1,905 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanhl.c" - .text -..TXTST0: -# -- Begin atanhl - .text - .align 16,0x90 - .globl atanhl -atanhl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - movzwl 14(%esp), %edx - cmpl $16383, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jge ..B1.53 -..B1.4: - cmpl $16381, %eax - jge ..B1.46 -..B1.5: - cmpl $16376, %eax - jge ..B1.39 -..B1.6: - cmpl $16371, %eax - jge ..B1.32 -..B1.7: - cmpl $16365, %eax - jge ..B1.25 -..B1.8: - cmpl $16308, %eax - jge ..B1.18 -..B1.9: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.68 -..B1.10: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.11: - fldcw 12(%esp) -..B1.12: - movzwl 16(%ebp), %eax - movl $1, %esi - andl $32767, %eax -..B1.13: - testl %eax, %eax - jle ..B1.64 -..B1.14: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ebx) - fstpt (%esp) -..B1.15: - testl %esi, %esi - je ..B1.17 -..B1.16: - fldcw 14(%esp) -..B1.17: - fldt (%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.69 -..B1.19: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.20: - fldcw 12(%esp) -..B1.21: - movl $1, %eax -..B1.22: - fldt 8(%ebp) - testl %eax, %eax - fldt _Q3@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.24 -..B1.23: - fldcw 14(%esp) -..B1.24: - fldt (%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.70 -..B1.26: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.27: - fldcw 12(%esp) -..B1.28: - movl $1, %eax -..B1.29: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_Q2@GOTOFF(%ebx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.31 -..B1.30: - fldcw 14(%esp) -..B1.31: - fldt (%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.71 -..B1.33: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.34: - fldcw 12(%esp) -..B1.35: - movl $1, %eax -..B1.36: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%ebx) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.38 -..B1.37: - fldcw 14(%esp) -..B1.38: - fldt (%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.72 -..B1.40: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.41: - fldcw 12(%esp) -..B1.42: - movl $1, %eax -..B1.43: - fldt 8(%ebp) - testl %eax, %eax - fldl _TWO_52H@GOTOFF(%ebx) - fmul %st(1), %st - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fstpt 16(%esp) - fldt 16(%esp) - fld %st(1) - fmul %st(1), %st - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fmul %st(0), %st - fld %st(0) - fadd %st(3), %st - fmul %st, %st(2) - fld %st(1) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - fmul %st(0), %st - fld %st(0) - fadd %st(3), %st - fldt 132+_Q@GOTOFF(%ebx) - fmul %st(1), %st - fldt 108+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 120+_Q@GOTOFF(%ebx) - fmul %st(2), %st - fldt 96+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_Q@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _Q@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 156+_Q@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(2) - fldt 144+_Q@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 32(%esp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fldt 16(%esp) - fld %st(0) - fldl _TWO_48H@GOTOFF(%ebx) - fadd %st, %st(3) - fsubrp %st, %st(3) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fldt 8(%ebp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(2) - fldt (%esp) - fmul %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.45 -..B1.44: - fldcw 14(%esp) -..B1.45: - fldt (%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.73 -..B1.47: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.48: - fldcw 12(%esp) -..B1.49: - movl $1, %ecx -..B1.50: - fldt 8(%ebp) - fldl _ones@GOTOFF(%ebx) - movzbl 17(%ebp), %edx - fld %st(0) - andl $128, %edx - fld %st(1) - shrl $7, %edx - fxch %st(2) - fstpt (%esp) - fldt (%esp) - fldl _TWO_48H@GOTOFF(%ebx) - movzwl 8(%esp), %edi - fxch %st(4) - fmull _ones@GOTOFF(%ebx,%edx,8) - andl $-32768, %edi - fsubr %st, %st(2) - fld %st(2) - fmul %st(5), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fsubr %st(2), %st - fsub %st(1), %st - fld %st(3) - fadd %st(1), %st - fxch %st(2) - fadd %st, %st(5) - fld %st(5) - fmul %st(7), %st - fadd %st, %st(6) - fsubrp %st, %st(6) - fxch %st(5) - fstpt 16(%esp) - fldt 16(%esp) - fsubr %st(3), %st - faddp %st, %st(5) - fld %st(1) - fdivr %st(3), %st - fmul %st, %st(6) - fld %st(0) - fadd %st(7), %st - fsubp %st, %st(7) - fxch %st(1) - fmul %st(6), %st - fld %st(1) - fsub %st(7), %st - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(4) - fmul %st(6), %st - fsubrp %st, %st(3) - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fldt 16(%esp) - fadd %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 8(%ebp) - fldt 60+_P@GOTOFF(%ebx) - fldt 36+_P@GOTOFF(%ebx) - fldt 12+_P@GOTOFF(%ebx) - movzwl 16(%ebp), %eax - andl $32767, %eax - movl %eax, %esi - addl $-16383, %eax - negl %esi - addl $-2, %esi - andl $32767, %esi - orl %esi, %edi - movw %di, 8(%esp) - fldt (%esp) - movl 12(%ebp), %esi - shrl $23, %esi - fmul %st, %st(4) - fmulp %st, %st(5) - andl $255, %esi - movl %eax, 32(%esp) - fildl 32(%esp) - fxch %st(4) - fmuls __libm_rcp_table_256@GOTOFF(%ebx,%esi,4) - fxch %st(5) - fmuls __libm_rcp_table_256@GOTOFF(%ebx,%esi,4) - fxch %st(5) - faddl 8+_ones@GOTOFF(%ebx) - fld %st(0) - shll $4, %esi - fadd %st(6), %st - fld %st(0) - testl %ecx, %ecx - fmul %st(1), %st - fmul %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fstpt 8(%ebp) - fldt 48+_P@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _P@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fmul %st(2), %st - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fmulp %st, %st(3) - faddl 8+__libm_logl_table_256@GOTOFF(%ebx,%esi) - faddp %st, %st(3) - fxch %st(1) - faddl __libm_logl_table_256@GOTOFF(%esi,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - fmull halfs@GOTOFF(%ebx,%edx,8) - fstpt 16(%esp) - je ..B1.52 -..B1.51: - fldcw 14(%esp) -..B1.52: - fldt 16(%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.53: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.79 -..B1.54: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.55: - fldcw 12(%esp) -..B1.56: - movzwl 16(%ebp), %eax - movl $1, %edx - andl $32767, %eax -..B1.57: - cmpl $32767, %eax - jl ..B1.74 -..B1.58: - cmpl $-2147483648, 12(%ebp) - jne ..B1.60 -..B1.59: - cmpl $0, 8(%ebp) - je ..B1.74 -..B1.60: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ebx) - fstpt (%esp) -..B1.61: - testl %edx, %edx - je ..B1.63 -..B1.62: - fldcw 14(%esp) -..B1.63: - fldt (%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.64: - cmpl $0, 12(%ebp) - jne ..B1.66 -..B1.65: - cmpl $0, 8(%ebp) - je ..B1.67 -..B1.66: - fldt 8(%ebp) - fldt _small_value_80@GOTOFF(%ebx) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _small_value_80@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.15 -..B1.67: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.15 -..B1.68: - xorl %esi, %esi - jmp ..B1.13 -..B1.69: - xorl %eax, %eax - jmp ..B1.22 -..B1.70: - xorl %eax, %eax - jmp ..B1.29 -..B1.71: - xorl %eax, %eax - jmp ..B1.36 -..B1.72: - xorl %eax, %eax - jmp ..B1.43 -..B1.73: - xorl %ecx, %ecx - jmp ..B1.50 -..B1.74: - cmpl $16383, %eax - jne ..B1.78 -..B1.75: - cmpl $-2147483648, 12(%ebp) - jne ..B1.78 -..B1.76: - cmpl $0, 8(%ebp) - jne ..B1.78 -..B1.77: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl _ones@GOTOFF(%ebx,%eax,8) - fdivl _zeros@GOTOFF(%ebx) - fstpt (%esp) - jmp ..B1.61 -..B1.78: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - fstpt (%esp) - jmp ..B1.61 -..B1.79: - xorl %edx, %edx - jmp ..B1.57 - .align 16,0x90 - .type atanhl,@function - .size atanhl,.-atanhl - .data -# -- End atanhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 8 -halfs: - .long 0x00000000,0x3fe00000 - .long 0x00000000,0xbfe00000 - .type halfs,@object - .size halfs,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_Q3: - .word 43691 - .word 45330 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 33124 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 58478 - .word 29023 - .word 52648 - .word 52428 - .word 16380 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 43686 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 5258 - .word 52447 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 10439 - .word 34405 - .word 9349 - .word 37449 - .word 16380 - .word 0 - .word 25253 - .word 49895 - .word 32943 - .word 58261 - .word 16379 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 43101 - .word 43690 - .word 43690 - .word 43690 - .word 16369 - .word 0 - .word 4657 - .word 52441 - .word 52428 - .word 52428 - .word 16368 - .word 0 - .word 42633 - .word 18723 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 11223 - .word 36719 - .word 14563 - .word 58254 - .word 16379 - .word 0 - .word 64465 - .word 27664 - .word 35746 - .word 47662 - .word 16379 - .word 0 - .word 6969 - .word 8211 - .word 55486 - .word 40329 - .word 16379 - .word 0 - .word 15522 - .word 40807 - .word 33480 - .word 34952 - .word 16379 - .word 0 - .word 44124 - .word 7207 - .word 21918 - .word 61682 - .word 16378 - .word 0 - .word 13236 - .word 62073 - .word 35694 - .word 55158 - .word 16378 - .word 0 - .word 859 - .word 55468 - .word 55479 - .word 50356 - .word 16378 - .word 0 - .word 19186 - .word 33607 - .word 822 - .word 41715 - .word 16378 - .word 0 - .word 51623 - .word 9477 - .word 49456 - .word 61855 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52416 - .word 16380 - .word 0 - .type _Q,@object - .size _Q,168 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .type _P,@object - .size _P,72 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanl.S deleted file mode 100644 index 71ffec484f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanl.S +++ /dev/null @@ -1,732 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanl.c" - .text -..TXTST0: -# -- Begin atanl - .text - .align 16,0x90 - .globl atanl -atanl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $72, %esp -..B1.2: - fnstcw 38(%esp) -..B1.3: - movzbl 17(%ebp), %ecx - movzwl 16(%ebp), %eax - andl $128, %ecx - andl $32767, %eax - shrl $7, %ecx - movzwl 38(%esp), %ebx - cmpl $16394, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - jge ..B1.48 -..B1.4: - cmpl $16376, %eax - jge ..B1.38 -..B1.5: - cmpl $16371, %eax - jge ..B1.31 -..B1.6: - cmpl $16365, %eax - jge ..B1.24 -..B1.7: - cmpl $16308, %eax - jge ..B1.17 -..B1.8: - movl %ebx, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.68 -..B1.9: - orl $-64768, %ebx - movw %bx, 36(%esp) -..B1.10: - fldcw 36(%esp) -..B1.11: - movzwl 16(%ebp), %eax - movl $1, %ebx - andl $32767, %eax -..B1.12: - testl %eax, %eax - jle ..B1.64 -..B1.13: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%edx) - fmul %st(1), %st - fsubp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%edx) - fstpt (%esp) -..B1.14: - testl %ebx, %ebx - je ..B1.16 -..B1.15: - fldcw 38(%esp) -..B1.16: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.69 -..B1.18: - orl $-64768, %ebx - movw %bx, 36(%esp) -..B1.19: - fldcw 36(%esp) -..B1.20: - movl $1, %eax -..B1.21: - fldt 8(%ebp) - testl %eax, %eax - fldt _P2@GOTOFF(%edx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.23 -..B1.22: - fldcw 38(%esp) -..B1.23: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.24: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.70 -..B1.25: - orl $-64768, %ebx - movw %bx, 36(%esp) -..B1.26: - fldcw 36(%esp) -..B1.27: - movl $1, %eax -..B1.28: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%edx) - fmul %st(1), %st - fldt _P1@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.30 -..B1.29: - fldcw 38(%esp) -..B1.30: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.71 -..B1.32: - orl $-64768, %ebx - movw %bx, 36(%esp) -..B1.33: - fldcw 36(%esp) -..B1.34: - movl $1, %eax -..B1.35: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(2) - fldt _P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.37 -..B1.36: - fldcw 38(%esp) -..B1.37: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.72 -..B1.39: - orl $-64768, %ebx - movw %bx, 36(%esp) -..B1.40: - fldcw 36(%esp) -..B1.41: - movl $1, %ebx -..B1.42: - fldl ones@GOTOFF(%edx,%ecx,8) - fstl 56(%esp) - fldt 8(%ebp) - fmulp %st, %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_63H@GOTOFF(%edx) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - movzwl 16(%ebp), %eax - andl $32767, %eax - cmpl $16383, %eax - jge ..B1.44 -..B1.43: - fldl _TWO_48H@GOTOFF(%edx) - fld %st(3) - fmul %st(1), %st - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(1) - fxch %st(2) - fmul %st(4), %st - fadd %st(3), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubp %st, %st(3) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmulp %st, %st(3) - fld %st(3) - movl 12(%esp), %eax - fsub %st(3), %st - fld %st(0) - fxch %st(3) - fsubr %st, %st(5) - fxch %st(4) - fmul %st, %st(5) - fmulp %st, %st(4) - fld %st(1) - fmul %st(1), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fsub %st(2), %st - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fadd %st, %st(4) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - fstpt (%esp) - fxch %st(3) - fxch %st(4) - fxch %st(1) - fxch %st(2) - jmp ..B1.45 -..B1.44: - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fld %st(3) - fdivr %st(1), %st - fmulp %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fstpt 12(%esp) - fldt 12(%esp) - fld %st(3) - movl 12(%esp), %eax - fxch %st(3) - fsubrp %st, %st(1) - fld %st(3) - negl %eax - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - addl $256, %eax - fmulp %st, %st(2) - fldl _TWO_48H@GOTOFF(%edx) - fmul %st, %st(1) - fxch %st(1) - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(3) - fmul %st(2), %st - fxch %st(4) - fsubr %st, %st(5) - fld %st(5) - fmul %st(3), %st - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - fstpt (%esp) - fldt (%esp) - faddp %st, %st(6) - fld %st(1) - fadd %st(4), %st - fmul %st, %st(3) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(1) - fsubr %st(2), %st - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(5) - fldl _TWO_48H@GOTOFF(%edx) -..B1.45: - fld %st(1) - shll $4, %eax - fadd %st(6), %st - fdivrp %st, %st(4) - testl %ebx, %ebx - fmul %st(3), %st - fld %st(0) - fadd %st(4), %st - fsubp %st, %st(1) - fld %st(0) - fsubr %st(4), %st - fld %st(2) - fmul %st(2), %st - fxch %st(5) - fmul %st, %st(7) - fxch %st(1) - fmul %st, %st(3) - fxch %st(7) - faddp %st, %st(3) - fxch %st(1) - fstpt 40(%esp) - fldt (%esp) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fldt 40(%esp) - fmulp %st, %st(2) - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 36+_P@GOTOFF(%edx) - fmul %st(3), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_P@GOTOFF(%edx) - fmulp %st, %st(4) - fldt _P@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(2) - fldl __libm_atanl_table_128@GOTOFF(%edx,%eax) - fld %st(0) - fadd %st(2), %st - fldl _TWO_32H@GOTOFF(%edx) - fmul %st(1), %st - fadd %st, %st(1) - fsubr %st(1), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - faddl 8+__libm_atanl_table_128@GOTOFF(%edx,%eax) - faddp %st, %st(1) - faddp %st, %st(1) - fmull 56(%esp) - fstpt 24(%esp) - je ..B1.80 -..B1.46: - fstpt 12(%esp) -..B1.79: - fldcw 38(%esp) - jmp ..B1.47 -..B1.80: - fstp %st(0) -..B1.47: - fldt 24(%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.48: - movl %ebx, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.76 -..B1.49: - orl $-64768, %ebx - movw %bx, 36(%esp) -..B1.50: - fldcw 36(%esp) -..B1.51: - movzwl 16(%ebp), %eax - movl $1, %ebx - andl $32767, %eax -..B1.52: - cmpl $32767, %eax - je ..B1.73 -..B1.53: - cmpl $16448, %eax - jge ..B1.60 -..B1.54: - fldt 8(%ebp) - xorl %eax, %eax - testl %ecx, %ecx - sete %al - fdivrl ones@GOTOFF(%edx,%eax,8) - fstpt 8(%ebp) - fldt 8(%ebp) - movzwl 16(%ebp), %eax - andl $32767, %eax - fstpt (%esp) - cmpl $16398, %eax - jge ..B1.56 -..B1.55: - fldt (%esp) - fld %st(0) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%edx) - fmul %st(1), %st - fldt _P1@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.59 -..B1.56: - cmpl $16408, %eax - jge ..B1.59 -..B1.57: - fldt _P2@GOTOFF(%edx) - fldt (%esp) - fmul %st, %st(1) - fmul %st, %st(1) - fmul %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) -..B1.59: - fldt .L_2il0floatpacket.4@GOTOFF(%edx) - fldt (%esp) - faddp %st, %st(1) - fldt .L_2il0floatpacket.5@GOTOFF(%edx) - faddp %st, %st(1) - fmull ones@GOTOFF(%edx,%ecx,8) - fstpt (%esp) - jmp ..B1.61 -..B1.60: - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %ecx - fldt _pi_2l@GOTOFF(%ecx,%edx) - fldt _small_value_80@GOTOFF(%ecx,%edx) - fsubrp %st, %st(1) - fstpt (%esp) -..B1.61: - testl %ebx, %ebx - je ..B1.63 -..B1.62: - fldcw 38(%esp) -..B1.63: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.64: - cmpl $0, 12(%ebp) - jne ..B1.66 -..B1.65: - cmpl $0, 8(%ebp) - je ..B1.67 -..B1.66: - fldt _small_value_80@GOTOFF(%edx) - lea (,%ecx,8), %eax - fldt 8(%ebp) - lea (%eax,%ecx,4), %ecx - fldt _small_value_80@GOTOFF(%edx,%ecx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fsubrp %st, %st(1) - fstpt (%esp) - jmp ..B1.14 -..B1.67: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.14 -..B1.68: - xorl %ebx, %ebx - jmp ..B1.12 -..B1.69: - xorl %eax, %eax - jmp ..B1.21 -..B1.70: - xorl %eax, %eax - jmp ..B1.28 -..B1.71: - xorl %eax, %eax - jmp ..B1.35 -..B1.72: - xorl %ebx, %ebx - jmp ..B1.42 -..B1.73: - cmpl $-2147483648, 12(%ebp) - jne ..B1.75 -..B1.74: - cmpl $0, 8(%ebp) - je ..B1.53 -..B1.75: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.61 -..B1.76: - xorl %ebx, %ebx - jmp ..B1.52 - .align 16,0x90 - .type atanl,@function - .size atanl,.-atanl - .data -# -- End atanl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x88,0x19,0x13,0xd3,0x08,0xa3,0x85,0xdd,0x3f,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0xa2,0xda,0x0f,0xc9,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_P2: - .word 43691 - .word 41642 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .type _P2,@object - .size _P2,12 - .align 2 -_P1: - .word 23723 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 22830 - .word 33705 - .word 52154 - .word 52428 - .word 16380 - .word 0 - .type _P1,@object - .size _P1,24 - .align 2 -_P: - .word 43664 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 43235 - .word 52379 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 59507 - .word 38278 - .word 9340 - .word 37449 - .word 49148 - .word 0 - .word 9132 - .word 55602 - .word 8665 - .word 58245 - .word 16379 - .word 0 - .type _P,@object - .size _P,48 - .align 2 -_pi_2l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49151 - .word 0 - .type _pi_2l,@object - .size _pi_2l,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_atanl_table_128 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanl_table.S deleted file mode 100644 index 63a3d207c1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/atanl_table.S +++ /dev/null @@ -1,1074 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanl_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_atanl_table_128 - .globl __libm_atanl_table_128 -__libm_atanl_table_128: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x55c00000,0x3f7fffd5 - .long 0x4bfcee57,0xbd5115a3 - .long 0x5bc00000,0x3f8fff55 - .long 0x220c39d5,0xbd623595 - .long 0x18800000,0x3f97fee0 - .long 0x286313f8,0xbdaad1e5 - .long 0xbb800000,0x3f9ffd55 - .long 0x542779d7,0x3da4bb12 - .long 0xf1600000,0x3fa3fd65 - .long 0x2e4614e3,0x3d9393b2 - .long 0x84400000,0x3fa7fb81 - .long 0x0c377c7c,0xbd9e4bac - .long 0xf1400000,0x3fabf8dd - .long 0x89fe34b3,0xbd88eef1 - .long 0xb7400000,0x3faff55b - .long 0x39269b0e,0xbda30216 - .long 0xbf000000,0x3fb1f86d - .long 0xbda88e23,0x3da05ab1 - .long 0x0e800000,0x3fb3f59f - .long 0xa7663af4,0xbd8d5314 - .long 0x4fc00000,0x3fb5f232 - .long 0x62a36910,0x3db2d7b2 - .long 0x26000000,0x3fb7ee18 - .long 0x6093567e,0x3d878874 - .long 0x53c00000,0x3fb9e941 - .long 0xd19970eb,0x3dafb9e2 - .long 0xbe400000,0x3fbbe39e - .long 0xbef71e53,0x3dc783e1 - .long 0x70400000,0x3fbddd21 - .long 0xcd620065,0xbdc0a2c8 - .long 0x9ac00000,0x3fbfd5ba - .long 0x39a6ed0d,0xbdb3d092 - .long 0xcce00000,0x3fc0e6ad - .long 0x8a397391,0x3dc40881 - .long 0xfb000000,0x3fc1e1fa - .long 0x92de9bad,0x3da0dc9b - .long 0xb3000000,0x3fc2dcbd - .long 0x386bc7d5,0xbda17803 - .long 0xe8c00000,0x3fc3d6ee - .long 0x61a3b0cf,0x3da989b1 - .long 0xa9c00000,0x3fc4d087 - .long 0x47cc8fc7,0x3dca4f17 - .long 0x1e400000,0x3fc5c981 - .long 0x0a956580,0xbd83d962 - .long 0x89800000,0x3fc6c1d4 - .long 0xb5aad628,0x3db267b1 - .long 0x4c000000,0x3fc7b97b - .long 0xecb84f4b,0xbdd8d27e - .long 0xe2800000,0x3fc8b06e - .long 0xee732cfd,0x3dae70a2 - .long 0xe9400000,0x3fc9a6a8 - .long 0x0e7b00f4,0x3dd64313 - .long 0x1b400000,0x3fca9c23 - .long 0xd177d13a,0x3d593ca1 - .long 0x52c00000,0x3fcb90d7 - .long 0xfdd09de6,0xbdd6cfae - .long 0x8a800000,0x3fcc84bf - .long 0x656f741a,0xbdb7a324 - .long 0xdf400000,0x3fcd77d5 - .long 0x8e6dcbab,0xbdcfa8c9 - .long 0x8e800000,0x3fce6a14 - .long 0x619ac881,0x3dc6ec4d - .long 0xf9400000,0x3fcf5b75 - .long 0x9d52470c,0xbdc37f22 - .long 0x51200000,0x3fd025fa - .long 0x59cb7da1,0xbdd99a4a - .long 0x97c00000,0x3fd09dc5 - .long 0x58b91ce4,0x3dd86362 - .long 0x36200000,0x3fd1151a - .long 0xb2372370,0x3db0c726 - .long 0xa3200000,0x3fd18bf5 - .long 0xd9e6b717,0xbdd40e87 - .long 0x67e00000,0x3fd20255 - .long 0x73e6e6b8,0x3db1f257 - .long 0x20400000,0x3fd27837 - .long 0xbe20c8b2,0x3dd7ef45 - .long 0x7a800000,0x3fd2ed98 - .long 0xb91258ea,0x3da1e7f1 - .long 0x37000000,0x3fd36277 - .long 0x34e2d5da,0x3dbfaf2f - .long 0x29400000,0x3fd3d6d1 - .long 0xbb20d6f9,0xbdd8eecb - .long 0x36c00000,0x3fd44aa4 - .long 0x45437875,0x3da5784d - .long 0x58600000,0x3fd4bdee - .long 0x86c8e20f,0x3dc121cd - .long 0x99400000,0x3fd530ad - .long 0xdb5336ff,0x3dd1cd49 - .long 0x17400000,0x3fd5a2e0 - .long 0x44edea3e,0x3dde0f4e - .long 0x03000000,0x3fd61484 - .long 0x2c6d4754,0x3dc39fc3 - .long 0x9f400000,0x3fd68597 - .long 0xf6d43f59,0x3ddfa6fd - .long 0x41c00000,0x3fd6f619 - .long 0x4738aa32,0x3de26f78 - .long 0x52800000,0x3fd76607 - .long 0x11774372,0x3d97501f - .long 0x4b400000,0x3fd7d560 - .long 0xad3910b8,0x3de1d9fb - .long 0xb9000000,0x3fd84422 - .long 0x4512bfad,0xbde03514 - .long 0x39400000,0x3fd8b24d - .long 0xdb685d1c,0x3dc4364a - .long 0x7cc00000,0x3fd91fde - .long 0x441d0620,0x3dd0c662 - .long 0x45400000,0x3fd98cd5 - .long 0xcf364c48,0x3dcad630 - .long 0x66000000,0x3fd9f930 - .long 0x8df63ee1,0x3dd68001 - .long 0xc3c00000,0x3fda64ee - .long 0x6d909f25,0x3dc847f9 - .long 0x54400000,0x3fdad00f - .long 0x80ecf31e,0xbdddfa74 - .long 0x1dc00000,0x3fdb3a91 - .long 0x9479e139,0xbdd9a393 - .long 0x37800000,0x3fdba473 - .long 0x519a1b47,0x3db89295 - .long 0xc9400000,0x3fdc0db4 - .long 0x19f18c7b,0x3dcd93df - .long 0x0ac00000,0x3fdc7655 - .long 0x5d2e2ffe,0xbdd28e07 - .long 0x43000000,0x3fdcde53 - .long 0x4ba60b78,0x3de609a8 - .long 0xca000000,0x3fdd45ae - .long 0xced7bdd4,0xbdd379d4 - .long 0x05800000,0x3fddac67 - .long 0x97520377,0xbdde44b0 - .long 0x6b000000,0x3fde127b - .long 0xb53d9e72,0x3dbd12bf - .long 0x7f400000,0x3fde77eb - .long 0xde35847d,0xbde452e5 - .long 0xd4400000,0x3fdedcb6 - .long 0xf25d8cc2,0xbd7ef2c7 - .long 0x0b800000,0x3fdf40dd - .long 0x1a3992dc,0xbde5f5f4 - .long 0xd3400000,0x3fdfa45d - .long 0xb94ac7b8,0xbdeeb6d3 - .long 0x73e00000,0x3fe0039c - .long 0x6ccb2527,0xbdee5bf4 - .long 0x09400000,0x3fe034b7 - .long 0xce0c98e5,0xbdeafb77 - .long 0x94e00000,0x3fe0657e - .long 0xeada4afb,0xbdc33cc0 - .long 0x08600000,0x3fe095f3 - .long 0xdbc9bebd,0x3daa58fd - .long 0x5b600000,0x3fe0c614 - .long 0xcd160bd9,0xbdc2f097 - .long 0x8b600000,0x3fe0f5e2 - .long 0x004c46c6,0x3dcf8a54 - .long 0x9be00000,0x3fe1255d - .long 0xf6a1288f,0x3debd2a8 - .long 0x96400000,0x3fe15485 - .long 0xa5d3e2a4,0xbdd1372c - .long 0x88c00000,0x3fe1835a - .long 0xe778c500,0xbda83ec8 - .long 0x87800000,0x3fe1b1dc - .long 0xede17375,0x3de04284 - .long 0xabe00000,0x3fe1e00b - .long 0xc946f944,0xbda014c0 - .long 0x13e00000,0x3fe20de8 - .long 0x43714561,0x3dd04763 - .long 0xe2c00000,0x3fe23b71 - .long 0x3884393e,0x3dd93cd4 - .long 0x40800000,0x3fe268a9 - .long 0xf1765bb0,0xbde69259 - .long 0x59400000,0x3fe2958e - .long 0x4279cec3,0xbddee39e - .long 0x5e000000,0x3fe2c221 - .long 0xd68fde4c,0x3db2232f - .long 0x84000000,0x3fe2ee62 - .long 0xc5d5e9ff,0x3dcb2f29 - .long 0x04a00000,0x3fe31a52 - .long 0xafcd51e1,0xbde78b41 - .long 0x1ce00000,0x3fe345f0 - .long 0xbbf7bb21,0xbde1c844 - .long 0x0e000000,0x3fe3713d - .long 0x14f789e0,0xbdd275f8 - .long 0x1ce00000,0x3fe39c39 - .long 0x9182198f,0xbdd7d1cc - .long 0x91c00000,0x3fe3c6e4 - .long 0x1ebaf6b0,0x3dce3712 - .long 0xb8a00000,0x3fe3f13f - .long 0x260e96db,0xbda690bc - .long 0xe0800000,0x3fe41b4a - .long 0xec29f5ad,0xbde015be - .long 0x5b800000,0x3fe44506 - .long 0xfbb680b2,0xbdca92a8 - .long 0x7f000000,0x3fe46e72 - .long 0x39b9b1b8,0xbdab8ea1 - .long 0xa3200000,0x3fe4978f - .long 0x920cd440,0x3dca7b84 - .long 0x22e00000,0x3fe4c05e - .long 0x02b07c28,0xbda6b1b7 - .long 0x5ba00000,0x3fe4e8de - .long 0x528cf6fb,0x3de6ec04 - .long 0xadc00000,0x3fe51110 - .long 0x91ee6b42,0x3dc7b604 - .long 0x7b800000,0x3fe538f5 - .long 0x72245aa1,0x3dd20c3d - .long 0x29c00000,0x3fe5608d - .long 0x9939cf0e,0x3dcc30d1 - .long 0x1f800000,0x3fe587d8 - .long 0x57972763,0xbdd9a08a - .long 0xc5800000,0x3fe5aed6 - .long 0x5cc4bdc5,0x3de09517 - .long 0x87000000,0x3fe5d589 - .long 0x10028e4c,0x3de69b18 - .long 0xd0c00000,0x3fe5fbf0 - .long 0xf2598180,0x3de5cc49 - .long 0x11400000,0x3fe6220d - .long 0xed487acb,0x3ded7b8d - .long 0xb8c00000,0x3fe647de - .long 0xf84d7eff,0x3df105c7 - .long 0x39400000,0x3fe66d66 - .long 0x2dd4dfd8,0xbdec1f79 - .long 0x05400000,0x3fe692a4 - .long 0x7652e56a,0x3de6fb6a - .long 0x92000000,0x3fe6b798 - .long 0x2bfe3cf4,0x3dd67b31 - .long 0x55000000,0x3fe6dc44 - .long 0xf203bce5,0x3de553ae - .long 0xc5800000,0x3fe700a7 - .long 0xc61a692d,0xbdcee730 - .long 0x5b400000,0x3fe724c3 - .long 0x1948b32e,0x3ddf5cf6 - .long 0x8f800000,0x3fe74897 - .long 0x82f654c3,0x3dfd4707 - .long 0xdcc00000,0x3fe76c24 - .long 0x1952551b,0x3dcb1b01 - .long 0xbd400000,0x3fe78f6b - .long 0x501a8226,0x3ded315e - .long 0xad400000,0x3fe7b26c - .long 0x73a037cc,0xbde1af02 - .long 0x28c00000,0x3fe7d528 - .long 0x553efbc4,0xbdf02fb6 - .long 0xacc00000,0x3fe7f79e - .long 0x02a357f1,0xbdca1d9e - .long 0xb7400000,0x3fe819d0 - .long 0x9bf7622a,0xbdf53ad9 - .long 0xc6000000,0x3fe83bbe - .long 0xf677c77e,0xbdf908ee - .long 0x57800000,0x3fe85d69 - .long 0xe9499180,0xbde33d3a - .long 0xeb000000,0x3fe87ed0 - .long 0xef50a527,0xbdf1d2ea - .long 0xff800000,0x3fe89ff5 - .long 0x2ab734bc,0xbdf40704 - .long 0x14400000,0x3fe8c0d9 - .long 0x6fa901db,0x3decf49d - .long 0xa9800000,0x3fe8e17a - .long 0xc27cfaaa,0x3decc05d - .long 0x3ec00000,0x3fe901db - .long 0xad0ccbcb,0x3df778c3 - .long 0x54400000,0x3fe921fb - .long 0x1a626331,0x3dc0b461 - .long 0x69800000,0x3fe9421b - .long 0x33179a03,0x3de968a9 - .long 0xff000000,0x3fe9627b - .long 0x354bc911,0xbde4662d - .long 0x94400000,0x3fe9831d - .long 0xe277d043,0xbde49a6c - .long 0xa9000000,0x3fe9a400 - .long 0x714fcd89,0x3df8341c - .long 0xbdc00000,0x3fe9c525 - .long 0x942d841a,0xbde3fff9 - .long 0x51000000,0x3fe9e68d - .long 0x767ac319,0x3deb976b - .long 0xe2c00000,0x3fea0837 - .long 0x177cfdb1,0xbdc64fc6 - .long 0xf1800000,0x3fea2a25 - .long 0x75c01427,0xbdda6038 - .long 0xfbc00000,0x3fea4c57 - .long 0x1bb40f2a,0x3dddc330 - .long 0x80000000,0x3fea6ece - .long 0xc850d6e0,0xbde74662 - .long 0xfb400000,0x3fea9189 - .long 0x00d16965,0x3dea0933 - .long 0xeb000000,0x3feab48a - .long 0x1e8b57b9,0x3df59469 - .long 0xcbc00000,0x3fead7d1 - .long 0x6dc9c51f,0x3da93704 - .long 0x18c00000,0x3feafb5f - .long 0x0e891026,0x3ddb9843 - .long 0x4d400000,0x3feb1f33 - .long 0xfdcc9ff9,0xbdcd5129 - .long 0xe3400000,0x3feb434e - .long 0xa0a41a0e,0xbdf7f601 - .long 0x53800000,0x3feb67b2 - .long 0xc9a51699,0xbdd9f2fc - .long 0x16800000,0x3feb8c5e - .long 0x466f670a,0xbdb71b40 - .long 0xa3400000,0x3febb152 - .long 0xd24367a3,0xbddd4273 - .long 0x6f800000,0x3febd690 - .long 0x44f9ee90,0xbdeb8656 - .long 0xef800000,0x3febfc17 - .long 0x4e4b19cd,0x3df32750 - .long 0x97400000,0x3fec21e9 - .long 0x60174932,0xbde5215d - .long 0xd7c00000,0x3fec4805 - .long 0xca509fcf,0xbddae432 - .long 0x21800000,0x3fec6e6d - .long 0x05a2b966,0xbddc81cf - .long 0xe2c00000,0x3fec951f - .long 0x983639ea,0x3dfbe28c - .long 0x89000000,0x3fecbc1e - .long 0xb8fcc54a,0x3de52a75 - .long 0x7ec00000,0x3fece369 - .long 0x6e2bdd53,0x3da4dfc2 - .long 0x2d000000,0x3fed0b01 - .long 0x7c1f76fe,0xbd957dc5 - .long 0xfac00000,0x3fed32e5 - .long 0x45acb642,0x3db3657b - .long 0x4cc00000,0x3fed5b18 - .long 0x3aa43a9e,0x3de16e2c - .long 0x85c00000,0x3fed8398 - .long 0x02a3c6a5,0xbde63ab4 - .long 0x05800000,0x3fedac67 - .long 0x97520377,0xbdee44b0 - .long 0x29800000,0x3fedd584 - .long 0x41999968,0x3dd42635 - .long 0x4d000000,0x3fedfef0 - .long 0x983da38a,0x3dddfdb5 - .long 0xc8400000,0x3fee28ab - .long 0x43526c5d,0xbdf3c808 - .long 0xf0000000,0x3fee52b6 - .long 0xb06de4fa,0xbde63cc3 - .long 0x16c00000,0x3fee7d12 - .long 0xb04e7d93,0x3d998d80 - .long 0x8b800000,0x3feea7bd - .long 0x6af91f30,0x3dfa218b - .long 0x9a800000,0x3feed2b9 - .long 0x97acf689,0x3de1952c - .long 0x8bc00000,0x3feefe06 - .long 0xdb5c4d1a,0xbdc7762a - .long 0xa4000000,0x3fef29a4 - .long 0x017c85fc,0xbd6a8dc3 - .long 0x24800000,0x3fef5594 - .long 0xbbbb718e,0x3da8e661 - .long 0x4a800000,0x3fef81d5 - .long 0x497cd73d,0x3dc8572a - .long 0x4f400000,0x3fefae68 - .long 0xae6e18fa,0x3de7cbff - .long 0x68000000,0x3fefdb4d - .long 0x7ea78d48,0x3deeec8a - .long 0x62e00000,0x3ff00442 - .long 0x3c43ac1a,0xbdc110e6 - .long 0x4a400000,0x3ff01b07 - .long 0x75bc4774,0x3df01b3f - .long 0x7e400000,0x3ff031f5 - .long 0x4ce2d096,0x3df4adbe - .long 0x10800000,0x3ff0490d - .long 0x82c10772,0xbdcfa151 - .long 0x0fe00000,0x3ff0604e - .long 0x37517bd1,0x3dd3bc3a - .long 0x89200000,0x3ff077b8 - .long 0xe01b22eb,0x3de0f5c6 - .long 0x86600000,0x3ff08f4c - .long 0x34b7fb7b,0xbdf9bc3c - .long 0x0e800000,0x3ff0a70a - .long 0xc68f0ff4,0x3df03bcd - .long 0x26800000,0x3ff0bef1 - .long 0x403b5a47,0x3df68b2b - .long 0xd0000000,0x3ff0d701 - .long 0x57ba4ad6,0x3df35a50 - .long 0x09e00000,0x3ff0ef3c - .long 0x38183ba9,0xbde2d69f - .long 0xcfc00000,0x3ff1079f - .long 0xa4c23582,0xbdecaa57 - .long 0x1a600000,0x3ff1202d - .long 0xe7f15aff,0x3dcad893 - .long 0xdf800000,0x3ff138e3 - .long 0x19efe544,0x3dcc4411 - .long 0x11600000,0x3ff151c4 - .long 0xa76ac475,0x3dee5024 - .long 0x9f200000,0x3ff16acd - .long 0x0e8af659,0x3df44c0b - .long 0x74800000,0x3ff18400 - .long 0xa4ca4f57,0xbdba974c - .long 0x79800000,0x3ff19d5c - .long 0x5a25f72a,0x3dc2df62 - .long 0x92e00000,0x3ff1b6e1 - .long 0xd8da3354,0x3de77c88 - .long 0xa1c00000,0x3ff1d08f - .long 0xf49d1082,0x3de2171a - .long 0x83800000,0x3ff1ea66 - .long 0x7ce9b3be,0xbddb5eef - .long 0x11800000,0x3ff20466 - .long 0x1de424cc,0x3df8d09a - .long 0x22000000,0x3ff21e8e - .long 0x394b3186,0xbdef0ac7 - .long 0x86600000,0x3ff238de - .long 0x8bf7b8bf,0x3dc51f77 - .long 0x0cc00000,0x3ff25357 - .long 0x2bb7111b,0x3dfa95fd - .long 0x7f400000,0x3ff26df7 - .long 0x64b0a9b1,0xbdd1512a - .long 0xa3400000,0x3ff288bf - .long 0x18e684e8,0x3df12419 - .long 0x3ac00000,0x3ff2a3af - .long 0xce4f6ebe,0xbdb72e81 - .long 0x03000000,0x3ff2bec6 - .long 0xa69c6179,0xbdee5b5b - .long 0xb5000000,0x3ff2da03 - .long 0x6b22ae89,0x3deff6ff - .long 0x06000000,0x3ff2f568 - .long 0x29a8e5ae,0xbdecb362 - .long 0xa6000000,0x3ff310f2 - .long 0xd243f145,0x3de88f44 - .long 0x41600000,0x3ff32ca3 - .long 0xdff820e0,0x3de68034 - .long 0x7fa00000,0x3ff34879 - .long 0x5295ddf4,0x3dce7ebe - .long 0x03c00000,0x3ff36475 - .long 0x45f88767,0x3de5eab8 - .long 0x6c600000,0x3ff38095 - .long 0x91c711ec,0x3de886b1 - .long 0x53800000,0x3ff39cda - .long 0x10aefe1c,0x3dbb91fe - .long 0x4e800000,0x3ff3b943 - .long 0x4aa2e1c3,0xbdf356bb - .long 0xee000000,0x3ff3d5cf - .long 0x303c34f3,0xbdf0463a - .long 0xbe200000,0x3ff3f27f - .long 0x2b7ef915,0x3de411bd - .long 0x46a00000,0x3ff40f52 - .long 0x472305ef,0xbde8fd54 - .long 0x09e00000,0x3ff42c47 - .long 0x3560ce8b,0x3dfa68cb - .long 0x86a00000,0x3ff4495d - .long 0xacb59491,0xbdfdcdda - .long 0x35a00000,0x3ff46695 - .long 0xc6803028,0x3dcceec5 - .long 0x8c200000,0x3ff483ed - .long 0xae20cd3f,0x3dec628d - .long 0xfa600000,0x3ff4a165 - .long 0x30a5d59f,0xbdf4f20d - .long 0xeb800000,0x3ff4befd - .long 0xd1246921,0x3db30ba3 - .long 0xc6c00000,0x3ff4dcb4 - .long 0x922b65ab,0xbdd37d68 - .long 0xee400000,0x3ff4fa89 - .long 0x60d4a327,0x3dec287f - .long 0xc0000000,0x3ff5187c - .long 0xe85bc1a4,0x3dc49d56 - .long 0x95200000,0x3ff5368c - .long 0x5bd1e523,0xbdb63036 - .long 0xc2600000,0x3ff554b8 - .long 0x9a653fbc,0x3df14f8e - .long 0x98800000,0x3ff57300 - .long 0x8799adbe,0xbdffddce - .long 0x62c00000,0x3ff59163 - .long 0x4677c807,0x3e0ad3a5 - .long 0x6a000000,0x3ff5afe0 - .long 0xf3e67f75,0xbdec3df7 - .long 0xf0c00000,0x3ff5ce76 - .long 0x1e243ad8,0x3dfc26c9 - .long 0x37000000,0x3ff5ed26 - .long 0x82f9d88f,0x3df69c53 - .long 0x78000000,0x3ff60bed - .long 0xa1b60137,0xbde98cd9 - .long 0xeac00000,0x3ff62acb - .long 0x038d593e,0x3de4c370 - .long 0xc3400000,0x3ff649c0 - .long 0x6a610a4b,0xbe067cb1 - .long 0x30800000,0x3ff668cb - .long 0xaa91e345,0xbdcd59a7 - .long 0x5f000000,0x3ff687ea - .long 0xbb3e0da7,0x3de1c66a - .long 0x77400000,0x3ff6a71d - .long 0x447484ba,0xbdf49f35 - .long 0x9e000000,0x3ff6c663 - .long 0x9fa408f5,0xbdfb4727 - .long 0xf5000000,0x3ff6e5bb - .long 0x95fe5c11,0xbdfc59cc - .long 0x9a800000,0x3ff70525 - .long 0x0aa8b52d,0x3e02d604 - .long 0xaac00000,0x3ff7249f - .long 0x4ae67c31,0xbe034aef - .long 0x3d400000,0x3ff74429 - .long 0x0226c6c8,0x3dc20b8b - .long 0x68800000,0x3ff763c1 - .long 0xf8a3257f,0xbe0161b1 - .long 0x3f000000,0x3ff78367 - .long 0xc02f3514,0x3ddcbd24 - .long 0xd2000000,0x3ff7a319 - .long 0xa2288de1,0xbdfc01f8 - .long 0x2f400000,0x3ff7c2d8 - .long 0x81b988ed,0x3ddbfe74 - .long 0x63800000,0x3ff7e2a1 - .long 0xc80c4d5f,0xbe01cc20 - .long 0x78400000,0x3ff80274 - .long 0xb8ab545b,0x3df3aa42 - .long 0x76800000,0x3ff82250 - .long 0xf0c39b49,0x3de58a51 - .long 0x64c00000,0x3ff84234 - .long 0x594dab29,0xbdd68427 - .long 0x48000000,0x3ff8621f - .long 0x7b64bb5f,0x3e015323 - .long 0x24c00000,0x3ff88210 - .long 0x0881fe1d,0xbddc84da - .long 0xfd400000,0x3ff8a205 - .long 0xb3f75cfe,0x3df5873f - .long 0xd4000000,0x3ff8c1ff - .long 0x90244e94,0xbdfcfc58 - .long 0xa9800000,0x3ff8e1fc - .long 0x22533dd2,0x3de96c66 - .long 0x7ec00000,0x3ff901fb - .long 0xd7b5cc04,0x3e0738ae - .long 0x54400000,0x3ff921fb - .long 0x1a626331,0x3dd0b461 - .long 0x29800000,0x3ff941fb - .long 0xddc59991,0x3df9e8d2 - .long 0xff000000,0x3ff961f9 - .long 0x0fe1b542,0xbdd1700a - .long 0xd4c00000,0x3ff981f6 - .long 0xe2aa7fd3,0xbdfaa976 - .long 0xab400000,0x3ff9a1f0 - .long 0x4d8c56ca,0xbdea5a1e - .long 0x83c00000,0x3ff9c1e6 - .long 0x1ea36240,0x3deef6ce - .long 0x60800000,0x3ff9e1d7 - .long 0x69984526,0xbdfa4c16 - .long 0x43c00000,0x3ffa01c2 - .long 0xc70938c6,0x3debf674 - .long 0x32000000,0x3ffa21a6 - .long 0x5984e061,0xbdc357c3 - .long 0x30400000,0x3ffa4182 - .long 0x56f44585,0xbde6a024 - .long 0x45000000,0x3ffa6155 - .long 0x0ea4e62b,0x3e05f939 - .long 0x79400000,0x3ffa811e - .long 0xcc2cf5d5,0x3db5a936 - .long 0xd6c00000,0x3ffaa0dc - .long 0xd0a64087,0xbdfba3d6 - .long 0x69800000,0x3ffac08f - .long 0xd256453b,0x3db2ae75 - .long 0x40000000,0x3ffae035 - .long 0x3f3bbe4b,0x3e058eca - .long 0x6b400000,0x3ffaffcd - .long 0xb3b162ff,0x3dd862fc - .long 0xfe000000,0x3ffb1f56 - .long 0xdd01d604,0xbdf10ff0 - .long 0x0e000000,0x3ffb3ed1 - .long 0x882038c2,0xbdfd51d7 - .long 0xb3c00000,0x3ffb5e3a - .long 0xdcd07256,0xbdfb4c02 - .long 0x0ac00000,0x3ffb7d93 - .long 0xd32ac572,0xbdfc5ea7 - .long 0x31400000,0x3ffb9cd9 - .long 0xd1a5b653,0x3dfcf965 - .long 0x49800000,0x3ffbbc0c - .long 0x0dbaa75b,0xbda1209a - .long 0x78000000,0x3ffbdb2b - .long 0x0506dc03,0x3de80acb - .long 0xe5800000,0x3ffbfa35 - .long 0x3c1973a2,0xbde558d9 - .long 0xbdc00000,0x3ffc192a - .long 0xa4abd834,0xbdc03c3b - .long 0x30c00000,0x3ffc3809 - .long 0x50f9e6e6,0xbe056fb1 - .long 0x71800000,0x3ffc56d0 - .long 0xeb914ded,0xbdec8445 - .long 0xb7c00000,0x3ffc757f - .long 0x90f3093f,0xbdf3cc98 - .long 0x3e800000,0x3ffc9416 - .long 0x87247153,0x3df6792c - .long 0x45800000,0x3ffcb293 - .long 0x0041a18b,0x3df2b2e6 - .long 0x10000000,0x3ffcd0f6 - .long 0x8a656fab,0x3e041bff - .long 0xe6000000,0x3ffcef3d - .long 0xf2cbf1dc,0x3df70aa1 - .long 0x13400000,0x3ffd0d6a - .long 0xf97727f5,0x3e04de99 - .long 0xe8800000,0x3ffd2b79 - .long 0xc096e590,0x3dd71a16 - .long 0xba400000,0x3ffd496c - .long 0x8ce47feb,0xbdd6e83c - .long 0xe2000000,0x3ffd6741 - .long 0xa721fa7e,0xbe09633a - .long 0xbd000000,0x3ffd84f8 - .long 0x407bac1a,0x3ddca5d9 - .long 0xae400000,0x3ffda290 - .long 0x1147c641,0xbdc59e12 - .long 0x1c400000,0x3ffdc009 - .long 0xb620caf9,0x3dfa28e9 - .long 0x73000000,0x3ffddd61 - .long 0x2b9ed46c,0xbdfb43a8 - .long 0x22400000,0x3ffdfa99 - .long 0x630c9ceb,0xbe0cebfa - .long 0x9e800000,0x3ffe17af - .long 0xafa0c61c,0x3debe2ca - .long 0x61c00000,0x3ffe34a4 - .long 0x58615a48,0x3e0a6c6d - .long 0xea400000,0x3ffe5176 - .long 0xf771b50e,0x3dfe5151 - .long 0xba800000,0x3ffe6e26 - .long 0xbd6d668c,0x3df8a06a - .long 0x5a000000,0x3ffe8ab3 - .long 0xd7d4135c,0x3dfbb0eb - .long 0x55000000,0x3ffea71c - .long 0xb09906dc,0x3dda8442 - .long 0x3c000000,0x3ffec361 - .long 0xc44da8a3,0x3dfc16d7 - .long 0xa4c00000,0x3ffedf81 - .long 0xae5890d5,0xbdc4d95c - .long 0x29000000,0x3ffefb7d - .long 0x3d218a26,0xbdfb75a7 - .long 0x67400000,0x3fff1753 - .long 0xf1656f6c,0xbe0172f4 - .long 0x02800000,0x3fff3304 - .long 0xdf863851,0xbdcf6b8e - .long 0xa2800000,0x3fff4e8e - .long 0xa205a470,0x3df6b3e1 - .long 0xf3800000,0x3fff69f2 - .long 0xa18096af,0xbdde853c - .long 0xa5800000,0x3fff8530 - .long 0x607f6255,0x3df787de - .long 0x6dc00000,0x3fffa047 - .long 0x542c5109,0x3de39a31 - .long 0x05400000,0x3fffbb37 - .long 0x176aa69e,0xbde193d1 - .long 0x29400000,0x3fffd5ff - .long 0x4cbab80a,0x3de95cf6 - .long 0x9bc00000,0x3ffff09f - .long 0x9e85df82,0xbdf23bcc - .long 0x11200000,0x4000058c - .long 0x644dc57f,0xbdfa49be - .long 0x43400000,0x400012b4 - .long 0x29d6ca5c,0x3df7df94 - .long 0x4b800000,0x40001fc8 - .long 0x90b2f333,0xbdf07669 - .long 0x12800000,0x40002cc8 - .long 0xd8d73d10,0x3dee63d8 - .long 0x83600000,0x400039b3 - .long 0xa3aad512,0xbda62b9d - .long 0x8ac00000,0x4000468a - .long 0x20c417ef,0x3dfc9bec - .long 0x17800000,0x4000534d - .long 0x07b1cace,0x3dd7f911 - .long 0x1a000000,0x40005ffb - .long 0xaefbad1c,0x3de4074a - .long 0x84a00000,0x40006c94 - .long 0x7ea63b40,0x3df40e25 - .long 0x4b800000,0x40007919 - .long 0x397bcf5e,0x3df9321e - .long 0x64800000,0x40008589 - .long 0xa7ccd3c1,0x3dd346b9 - .long 0xc7200000,0x400091e4 - .long 0xefccf9c7,0xbdfb00e1 - .long 0x6c800000,0x40009e2b - .long 0xd036d9d3,0xbe04a851 - .long 0x4f600000,0x4000aa5d - .long 0xad856126,0xbdec74ff - .long 0x6c400000,0x4000b67a - .long 0x9512327c,0xbde6003f - .long 0xc1000000,0x4000c282 - .long 0x6614515e,0xbdec61f5 - .long 0x4d000000,0x4000ce76 - .long 0xe577796c,0xbddf8674 - .long 0x11200000,0x4000da55 - .long 0x0f49689f,0x3dc0b366 - .long 0x0fa00000,0x4000e61f - .long 0x1d23a023,0x3dffdf4d - .long 0x4c600000,0x4000f1d4 - .long 0x00a32d5c,0xbdfc94de - .long 0xcc000000,0x4000fd74 - .long 0x7b12a50e,0x3de89cb5 - .long 0x95200000,0x40010900 - .long 0x7f633dfc,0xbde8a71b - .long 0xaf200000,0x40011477 - .long 0xa22c576e,0xbddf043b - .long 0x22e00000,0x40011fda - .long 0xab4658e4,0xbdf583b2 - .long 0xfa400000,0x40012b27 - .long 0xc88a542e,0xbddc7052 - .long 0x40600000,0x40013661 - .long 0xb5fa251c,0x3dfc7430 - .long 0x01a00000,0x40014186 - .long 0x10065ac4,0x3dd53d2d - .long 0x4b200000,0x40014c96 - .long 0xfd4d5831,0x3dde4bf5 - .long 0x2b400000,0x40015792 - .long 0xdd63dfb7,0x3de0ceee - .long 0xb1400000,0x40016279 - .long 0xf44e5d9e,0x3e05a47a - .long 0xeda00000,0x40016d4c - .long 0xa9526aef,0xbd9c196f - .long 0xf1600000,0x4001780b - .long 0xddc7ed97,0xbdf1c75a - .long 0xce800000,0x400182b6 - .long 0x4537fbd1,0x3e03f9fd - .long 0x98600000,0x40018d4d - .long 0xcd4bedf5,0xbe0643b6 - .long 0x62400000,0x400197d0 - .long 0x7be31051,0xbdceee39 - .long 0x41000000,0x4001a23f - .long 0xe43916c2,0x3dab5864 - .long 0x49e00000,0x4001ac9a - .long 0xe65659f4,0x3dca8519 - .long 0x92e00000,0x4001b6e1 - .long 0xd8da3354,0x3df77c88 - .long 0x32e00000,0x4001c115 - .long 0xe2f9d62a,0xbde910ea - .long 0x41200000,0x4001cb35 - .long 0xc81075db,0xbe002e72 - .long 0xd5a00000,0x4001d541 - .long 0x272999cb,0xbdf8dc27 - .long 0x09000000,0x4001df3b - .long 0x46435ee9,0x3de1604f - .long 0xf4a00000,0x4001e920 - .long 0x86402d52,0xbdf84ccd - .long 0xb2000000,0x4001f2f3 - .long 0x7a698864,0xbdc1d852 - .long 0x5b800000,0x4001fcb3 - .long 0xe9f5ef5e,0x3de8ef47 - .long 0x0be00000,0x40020660 - .long 0x9d33bfe4,0x3deef548 - .long 0xde400000,0x40020ff9 - .long 0x9fe2acc6,0x3e07899e - .long 0xee800000,0x40021980 - .long 0x8586539c,0xbdea2a41 - .long 0x58600000,0x400222f5 - .long 0x8233d068,0xbde59a3f - .long 0x38600000,0x40022c57 - .long 0xafae28e0,0x3df61d5b - .long 0xab600000,0x400235a6 - .long 0xc0e105c1,0x3e07d566 - .long 0xcea00000,0x40023ee3 - .long 0x23305012,0x3de397c9 - .long 0xbf600000,0x4002480e - .long 0x7f34ee7e,0x3dedaddf - .long 0x9b800000,0x40025127 - .long 0x7552e9aa,0x3d940c8b - .long 0x80e00000,0x40025a2e - .long 0xe67562cc,0x3e06022a - .long 0x8e200000,0x40026323 - .long 0x36711271,0xbdfe8be0 - .long 0xe1400000,0x40026c06 - .long 0x34e171b8,0x3e03c83c - .long 0x99800000,0x400274d8 - .long 0x22b44c41,0xbdea7471 - .long 0xd5600000,0x40027d98 - .long 0x0cc87ce6,0x3dfb5597 - .long 0xb4400000,0x40028647 - .long 0xf1599d09,0x3df3fd61 - .long 0x55400000,0x40028ee5 - .long 0x432216e7,0x3e0074b2 - .long 0xd7e00000,0x40029771 - .long 0x55426d45,0x3dede47d - .long 0x5b800000,0x40029fed - .long 0xa81068a7,0x3e059214 - .long 0x00000000,0x4002a858 - .long 0xb830bfcf,0xbdd5c614 - .long 0xe4c00000,0x4002b0b1 - .long 0xaba3f9d3,0x3e092d16 - .long 0x2a000000,0x4002b8fb - .long 0xc83d37e0,0xbdefb3d7 - .long 0xef200000,0x4002c133 - .long 0x7f368cdd,0x3e0953b3 - .long 0x54800000,0x4002c95c - .long 0x27d71621,0x3df28d47 - .long 0x79e00000,0x4002d174 - .long 0x316a6da4,0xbdd16890 - .long 0x7f400000,0x4002d97c - .long 0x961b1ace,0xbdf9bc5b - .long 0x84800000,0x4002e184 - .long 0xe02465ce,0x3df0e16c - .long 0xa9e00000,0x4002e99c - .long 0x50352ef1,0xbdd817f9 - .long 0x0f400000,0x4002f1c5 - .long 0x1551a7ab,0xbe03100f - .long 0xd4800000,0x4002f9fd - .long 0xa40bccd6,0xbe01cf65 - .long 0x19800000,0x40030247 - .long 0x7c81d6bf,0x3dfa2d1b - .long 0xfe600000,0x40030aa0 - .long 0x01d5fa59,0x3df1f8ce - .long 0xa2c00000,0x4003130b - .long 0xc1d47c8b,0x3e00b18f - .long 0x26800000,0x40031b87 - .long 0xb6bb61ec,0xbdc357ae - .long 0xa9200000,0x40032413 - .long 0xb27a6369,0xbdf4621b - .long 0x4a200000,0x40032cb1 - .long 0x763f4a8f,0xbdddd864 - .long 0x29000000,0x40033560 - .long 0x71fd6503,0xbded9c9c - .long 0x64e00000,0x40033e20 - .long 0x6523f086,0x3df9c181 - .long 0x1d200000,0x400346f2 - .long 0x95f9190b,0xbdfb092f - .long 0x70600000,0x40034fd5 - .long 0xf5c5232a,0xbdf4ecd6 - .long 0x7d800000,0x400358ca - .long 0xf920fb33,0xbdff7d0c - .long 0x62e00000,0x400361d1 - .long 0x4be8fd7d,0x3de86e2d - .long 0x3f000000,0x40036aea - .long 0x5e8566d0,0xbdc27d37 - .long 0x2fc00000,0x40037415 - .long 0x118d12de,0x3dc5db22 - .long 0x53000000,0x40037d52 - .long 0x56fc208e,0xbe0191c2 - .long 0xc5e00000,0x400386a1 - .long 0x920dd0c2,0x3e0b34f6 - .long 0xa6200000,0x40039003 - .long 0xb58e26b3,0xbe0455cb - .long 0x10000000,0x40039978 - .long 0x34b985e6,0xbe0331cb - .long 0x20200000,0x4003a2ff - .long 0x35fdc794,0xbe0145fa - .long 0xf2800000,0x4003ac98 - .long 0xd680ac6a,0xbdc79adb - .long 0xa2e00000,0x4003b645 - .long 0x9da56c1b,0x3d6f49bd - .long 0x4c600000,0x4003c005 - .long 0x462df6e3,0x3ded84a6 - .long 0x09e00000,0x4003c9d8 - .long 0xa5f60849,0xbdfb2be9 - .long 0xf5600000,0x4003d3bd - .long 0x8540d783,0x3dceb909 - .long 0x28c00000,0x4003ddb7 - .long 0xfd79b218,0x3e02b1b7 - .long 0xbd400000,0x4003e7c3 - .long 0x31f55b0e,0x3e067217 - .long 0xcb800000,0x4003f1e3 - .long 0x4546b57a,0x3df90fbe - .long 0x6b600000,0x4003fc17 - .long 0xfd77cb88,0x3e0a855f - .long 0xb4800000,0x4004065e - .long 0x2dfdfe4d,0x3de26d4b - .long 0xbd600000,0x400410b9 - .long 0x5950035e,0x3de7590b - .long 0x9c200000,0x40041b28 - .long 0x03462c6f,0x3df06510 - .long 0x66200000,0x400425ab - .long 0x467966c2,0xbddbc526 - .long 0x2fe00000,0x40043042 - .long 0xb6a62d3d,0xbdfb6cb1 - .long 0x0d200000,0x40043aed - .long 0x27372402,0xbe00d8ae - .long 0x10c00000,0x400445ac - .long 0x24de2821,0x3de9ef5d - .long 0x4d200000,0x4004507f - .long 0x14d2f0d7,0xbdfec1ad - .long 0xd3200000,0x40045b66 - .long 0x945f6a25,0x3dd07f45 - .long 0xb3400000,0x40046662 - .long 0x51d9d163,0x3dd3d12d - .long 0xfcc00000,0x40047172 - .long 0x3f20ced0,0x3ddcdff6 - .long 0xbe000000,0x40047c97 - .long 0xc460b56d,0xbdefd9cf - .long 0x04200000,0x400487d1 - .long 0x85ec5f71,0x3df3a35d - .long 0xdba00000,0x4004931e - .long 0x80efdcb7,0xbdfdf504 - .long 0x4f400000,0x40049e81 - .long 0xbc54e040,0x3df44857 - .long 0x69400000,0x4004a9f8 - .long 0x937b6963,0x3df8dad6 - .long 0x32600000,0x4004b584 - .long 0x203bef0d,0x3d8c770b - .long 0xb2000000,0x4004c124 - .long 0x6a367be0,0x3e048e13 - .long 0xeec00000,0x4004ccd9 - .long 0x4959d5be,0xbdf35804 - .long 0xed400000,0x4004d8a3 - .long 0x23c13aa2,0x3de4e1b8 - .long 0xb1600000,0x4004e482 - .long 0x0d27a8c0,0x3df468e6 - .long 0x3d600000,0x4004f076 - .long 0x86d3f314,0x3dfab843 - .long 0x92200000,0x4004fc7e - .long 0x9e52e3a3,0x3df78768 - .long 0xaf200000,0x4005089b - .long 0xaab9c284,0xbe029f1b - .long 0x92000000,0x400514cd - .long 0x179103ea,0xbde45027 - .long 0x37400000,0x40052114 - .long 0x61cb6216,0x3e03c415 - .long 0x99e00000,0x40052d6f - .long 0xa75a55d3,0x3dded669 - .long 0xb2e00000,0x400539df - .long 0xcb6409f3,0xbde955aa - .long 0x79c00000,0x40054664 - .long 0xab71c36a,0xbdde1b72 - .long 0xe4600000,0x400552fd - .long 0xe25f9eb7,0x3dc41d1b - .long 0xe6c00000,0x40055fab - .long 0x247755ec,0x3e11a241 - .long 0x73800000,0x40056c6e - .long 0x5982d93b,0x3e07f5ae - .long 0x7b000000,0x40057945 - .long 0x81ce421b,0x3dea714b - .long 0xec000000,0x40058630 - .long 0xe6287509,0xbe10aaa8 - .long 0xb3000000,0x40059330 - .long 0xcdc1a134,0xbe018126 - .long 0xbb000000,0x4005a044 - .long 0x54f98005,0x3e0a53da - .long 0xed800000,0x4005ad6c - .long 0x31fa1c07,0xbe164bbe - .long 0x30800000,0x4005baa9 - .long 0x724fa9e7,0x3dfec315 - .long 0x69c00000,0x4005c7f9 - .long 0x49c8cff7,0xbd839929 - .long 0x7c000000,0x4005d55d - .long 0xa8203893,0xbe1aabb3 - .long 0x47800000,0x4005e2d5 - .long 0x4d9d0f03,0x3dc5d181 - .long 0xab800000,0x4005f060 - .long 0x39a53408,0x3e0a7fb5 - .long 0x84c00000,0x4005fdff - .long 0x01eb07f8,0xbe05ebb4 - .long 0xad400000,0x40060bb1 - .long 0x338ef683,0xbe128b26 - .long 0xfd400000,0x40061976 - .long 0xa822b748,0xbe07c5a2 - .long 0x4ac00000,0x4006274f - .long 0x5b4a549e,0x3e07b699 - .long 0x6a000000,0x4006353a - .long 0xef14ab75,0xbdf8030f - .long 0x2c000000,0x40064338 - .long 0xd329b8ff,0x3dee44e8 - .long 0x60800000,0x40065148 - .long 0xbc20f78f,0xbe13e3e3 - .long 0xd3c00000,0x40065f6a - .long 0x09e8e22c,0x3e11798e - .long 0x51400000,0x40066d9f - .long 0x7dfadb85,0x3e086b2e - .long 0xa1000000,0x40067be5 - .long 0x0b2e31ec,0x3e09f36f - .long 0x89400000,0x40068a3d - .long 0x23a7eaa9,0xbdf1ca09 - .long 0xcd800000,0x400698a6 - .long 0xee7c7516,0xbe0428c8 - .long 0x2f000000,0x4006a721 - .long 0xbdfcb3ab,0x3e0f4af1 - .long 0x6d400000,0x4006b5ac - .long 0x6678c10f,0x3e1197cf - .long 0x45000000,0x4006c448 - .long 0x0097612f,0xbdf8350f - .long 0x70400000,0x4006d2f4 - .long 0xc4ae0128,0xbdeb4341 - .long 0xa7400000,0x4006e1b0 - .long 0x2be5865a,0x3dee7616 - .long 0xa0000000,0x4006f07c - .long 0xbe2a9051,0xbe0d5116 - .long 0x0d800000,0x4006ff58 - .long 0xbe4813cb,0xbda6483b - .long 0xa1400000,0x40070e42 - .long 0xf702ea60,0x3df24157 - .long 0x0a000000,0x40071d3c - .long 0xc8e90440,0x3e11b030 - .long 0xf4800000,0x40072c43 - .long 0x3836de9f,0x3e18b285 - .long 0x0b400000,0x40073b5a - .long 0x707eec44,0x3e0abe53 - .long 0xf6400000,0x40074a7d - .long 0xdf7f7587,0x3e0227a4 - .long 0x5b800000,0x400759af - .long 0x69c4146d,0x3e0cea31 - .long 0xdf000000,0x400768ed - .long 0x2652ac89,0x3e0b070e - .long 0x22800000,0x40077839 - .long 0xb25e69d2,0x3e0029f0 - .long 0xc5800000,0x40078790 - .long 0xf2649c57,0x3e16b25a - .long 0x66400000,0x400796f4 - .long 0x229099f4,0xbe122655 - .long 0x9f800000,0x4007a663 - .long 0x90be8ad7,0x3ded1da0 - .long 0x0b800000,0x4007b5de - .long 0x5c75a10e,0x3e15cced - .long 0x42400000,0x4007c563 - .long 0xd4519719,0x3e102078 - .long 0xd9800000,0x4007d4f2 - .long 0x690de7e8,0x3e134413 - .long 0x65c00000,0x4007e48c - .long 0xfddbebee,0xbdf0721c - .long 0x79000000,0x4007f42f - .long 0x537a47ec,0x3e0472f8 - .long 0xa4800000,0x400803db - .long 0xd84d1e5e,0x3e03e9a5 - .long 0x77800000,0x40081390 - .long 0xa415fcda,0xbdf626df - .long 0x7f800000,0x4008234d - .long 0x279a2fcb,0xbe013463 - .long 0x48c00000,0x40083312 - .long 0x9b75c695,0x3dd9ba26 - .long 0x5e400000,0x400842de - .long 0x2aa926e7,0x3e00b4da - .long 0x49c00000,0x400852b1 - .long 0x44adccf7,0xbe0a51cf - .long 0x93400000,0x4008628a - .long 0x16e3fd45,0xbe15f538 - .long 0xc1c00000,0x40087269 - .long 0xce0df60f,0x3de6596a - .long 0x5c000000,0x4008824e - .long 0x5260007c,0xbe17daca - .long 0xe6400000,0x40089237 - .long 0xff43ed28,0x3df7d75a - .long 0xe5800000,0x4008a225 - .long 0x6082ccc7,0xbe0886df - .long 0xdc800000,0x4008b217 - .long 0xfbad1fdf,0xbdb73f18 - .long 0x4e400000,0x4008c20d - .long 0xc29df075,0xbdf92ca0 - .long 0xbc800000,0x4008d205 - .long 0xdc3f35d7,0xbdc7a0f1 - .long 0xa8c00000,0x4008e200 - .long 0xfa8ff5ca,0x3df9b457 - .long 0x94400000,0x4008f1fd - .long 0x1262ed72,0xbe1633d0 - .long 0xff000000,0x400901fb - .long 0x541ee425,0xbe078e5a - .long 0x69800000,0x400911fb - .long 0xfb02186a,0x3e094f3a - .long 0x54400000,0x400921fb - .long 0x1a626331,0x3de0b461 - .type __libm_atanl_table_128,@object - .size __libm_atanl_table_128,8208 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabs.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabs.S deleted file mode 100644 index b66ec717a8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabs.S +++ /dev/null @@ -1,76 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cabs.c" - .text -..TXTST0: -# -- Begin cabs - .text - .align 16,0x90 - .globl cabs -cabs: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %ebx - subl $60, %esp - fldl 16(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpl (%esp) - fldl 8(%ebp) - fstpl 8(%esp) - call hypot@PLT -..B1.4: - addl $60, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type cabs,@function - .size cabs,.-cabs - .data -# -- End cabs - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabsf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabsf.S deleted file mode 100644 index 382d1d02c4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabsf.S +++ /dev/null @@ -1,71 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cabsf.c" - .text -..TXTST0: -# -- Begin cabsf - .text - .align 16,0x90 - .globl cabsf -cabsf: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $24, %esp - flds 36(%esp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpl (%esp) - flds 32(%esp) - fstpl 8(%esp) - call hypot@PLT -..B1.4: - addl $24, %esp - popl %ebx - ret - .align 16,0x90 - .type cabsf,@function - .size cabsf,.-cabsf - .data -# -- End cabsf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabsl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabsl.S deleted file mode 100644 index 300d337946..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cabsl.S +++ /dev/null @@ -1,76 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cabsl.c" - .text -..TXTST0: -# -- Begin cabsl - .text - .align 16,0x90 - .globl cabsl -cabsl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %ebx - subl $60, %esp - fldt 20(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpt (%esp) - fldt 8(%ebp) - fstpt 12(%esp) - call hypotl@PLT -..B1.4: - addl $60, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type cabsl,@function - .size cabsl,.-cabsl - .data -# -- End cabsl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacos.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacos.S deleted file mode 100644 index 96bcfa3631..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacos.S +++ /dev/null @@ -1,779 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacos.c" - .text -..TXTST0: -# -- Begin cacos - .text - .align 16,0x90 - .globl cacos -cacos: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 192(%esp) - fstl 176(%esp) - fstpl 184(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 18(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %ecx - jge ..B1.38 -..B1.4: - testl %ecx, %ecx - jle ..B1.64 -..B1.5: - movzwl 26(%ebp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - jge ..B1.38 -..B1.6: - testl %edx, %edx - jle ..B1.62 -..B1.7: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.61 -..B1.8: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - movl $1, %edi -..B1.11: - fldl 12(%ebp) - fstl 160(%esp) - fabs - fldl 20(%ebp) - fstl 168(%esp) - fabs - fld %st(0) - fmul %st(1), %st - fstpt 120(%esp) - fldt 120(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fld %st(0) - fsubr %st(4), %st - fld %st(0) - fmul %st(1), %st - fadd %st(3), %st - fsqrt - fstpt 88(%esp) - fldt 88(%esp) - fld %st(2) - fadd %st(6), %st - fld %st(0) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(4) - fsqrt - fstpt 104(%esp) - fldt 104(%esp) - fxch %st(1) - fucom %st(2) - fnstsw %ax - faddp %st, %st(1) - fxch %st(1) - fstpt 136(%esp) - sahf - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmul %st, %st(1) - jp ..B1.12 - je ..B1.13 -..B1.12: - fldt 88(%esp) - fldt 136(%esp) - fsubrp %st, %st(1) - fstpt 72(%esp) - jmp ..B1.14 -..B1.13: - fxch %st(4) - fstpt 72(%esp) - fldt 72(%esp) - fxch %st(4) -..B1.14: - fldt _Bcross@GOTOFF(%ebx) - fmul %st(2), %st - fcomp %st(6) - fnstsw %ax - sahf - jbe ..B1.16 -..B1.15: - fstp %st(4) - fld %st(4) - addl $-16, %esp - fdiv %st(1), %st - fstpt (%esp) - fxch %st(4) - fstpl 80(%esp) - fxch %st(1) - fstpt 16(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt 48(%esp) - fstpt 64(%esp) - call acosl@PLT -..B1.104: - fldt 64(%esp) - fldt 48(%esp) - fldt 32(%esp) - fldt 16(%esp) - fldl 80(%esp) - addl $16, %esp - jmp ..B1.19 -..B1.16: - fxch %st(2) - fcom %st(5) - fnstsw %ax - sahf - jb ..B1.18 -..B1.17: - fstp %st(4) - addl $-32, %esp - fld %st(2) - fld %st(1) - fadd %st(6), %st - fmul %st(3), %st - fldt 136(%esp) - faddp %st, %st(2) - fldt 152(%esp) - fdivp %st, %st(2) - fldt 104(%esp) - faddp %st, %st(2) - fmulp %st, %st(1) - fsqrt - fstpt (%esp) - fxch %st(4) - fstpt 12(%esp) - fldt 12(%esp) - fstpl 96(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt 48(%esp) - fstpt 64(%esp) - fstpt 80(%esp) - call atan2l@PLT - jmp ..B1.106 -..B1.18: - fxch %st(1) - fstpt 48(%esp) - fldt 48(%esp) - fxch %st(3) - fstpt (%esp) - fldt (%esp) - addl $-32, %esp - fxch %st(3) - fadd %st(5), %st - fldt 136(%esp) - faddp %st, %st(4) - fdiv %st, %st(3) - fldt 168(%esp) - fldt 120(%esp) - faddp %st, %st(1) - fdivrp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fsqrt - fmulp %st, %st(3) - fxch %st(2) - fstpt (%esp) - fxch %st(2) - fstpt 12(%esp) - fldt 12(%esp) - fstpl 96(%esp) - fxch %st(1) - fstpt 48(%esp) - fstpt 64(%esp) - fldt 32(%esp) - fstpt 32(%esp) - fldt 80(%esp) - fstpt 80(%esp) - call atan2l@PLT -..B1.106: - fldt 80(%esp) - fldt 64(%esp) - fldt 48(%esp) - fldt 32(%esp) - fldl 96(%esp) - addl $32, %esp -..B1.19: - fldt _Across@GOTOFF(%ebx) - fcomp %st(5) - fnstsw %ax - sahf - jb ..B1.24 -..B1.20: - fldt 104(%esp) - faddp %st, %st(2) - fcomp %st(3) - fnstsw %ax - fldt 120(%esp) - fdivp %st, %st(1) - sahf - jae ..B1.22 - jp ..B1.22 -..B1.21: - fldt 72(%esp) - fldt 120(%esp) - fdivp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - jmp ..B1.23 -..B1.22: - fldt 88(%esp) - fldt 136(%esp) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) -..B1.23: - addl $-16, %esp - fxch %st(1) - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%esp) - fstpt 16(%esp) - call log1pl@PLT - jmp ..B1.108 -..B1.24: - fstp %st(1) - fstp %st(1) - fstp %st(0) - fld %st(1) - addl $-16, %esp - fmul %st(2), %st - fsubp %st, %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%esp) - fstpt 16(%esp) - call logl@PLT -..B1.108: - fldt 16(%esp) - addl $16, %esp -..B1.25: - fldl _DBL_PZERO@GOTOFF(%ebx) - fcoml 160(%esp) - fnstsw %ax - sahf - jbe ..B1.27 -..B1.26: - fldt _LDBL_PPI@GOTOFF(%ebx) - fsubp %st, %st(2) -..B1.27: - fldl 168(%esp) - fcompp - fnstsw %ax - sahf - jbe ..B1.29 -..B1.28: - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fmulp %st, %st(2) -..B1.29: - fstpl 176(%esp) - movzwl 182(%esp), %edx - testl $32752, %edx - fstpl 184(%esp) - jne ..B1.32 -..B1.30: - testl $1048575, 180(%esp) - jne ..B1.35 -..B1.31: - cmpl $0, 176(%esp) - jne ..B1.35 -..B1.32: - movzwl 190(%esp), %edx - testl $32752, %edx - jne ..B1.36 -..B1.33: - testl $1048575, 188(%esp) - jne ..B1.35 -..B1.34: - cmpl $0, 184(%esp) - je ..B1.36 -..B1.35: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 152(%esp) -..B1.36: - testl %edi, %edi - je ..B1.59 -..B1.37: - fldcw 14(%esp) - jmp ..B1.59 -..B1.38: - testl %ecx, %ecx - jne ..B1.42 -..B1.39: - testl $1048575, 16(%ebp) - jne ..B1.42 -..B1.40: - cmpl $0, 12(%ebp) - jne ..B1.42 -..B1.41: - fldl _DBL_PPIBY2@GOTOFF(%ebx) - fstl 176(%esp) - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - faddp %st, %st(1) - fstpl 152(%esp) - addl $-16, %esp - fldl 20(%ebp) - fstpl (%esp) - call asinh@PLT -..B1.109: - addl $16, %esp - fchs - fstpl 184(%esp) - jmp ..B1.59 -..B1.42: - movzwl 26(%ebp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - je ..B1.98 -..B1.115: - cmpl $2047, %ecx -..B1.43: - je ..B1.88 -..B1.44: - cmpl $2047, %edx - je ..B1.85 -..B1.45: - testl %edx, %edx - jne ..B1.54 -..B1.46: - testl $1048575, 24(%ebp) - jne ..B1.54 -..B1.47: - cmpl $0, 20(%ebp) - jne ..B1.54 -..B1.48: - cmpl $1023, %ecx - jl ..B1.52 -..B1.49: - fldl 12(%ebp) - addl $-16, %esp - fabs - fstpl (%esp) - call acosh@PLT -..B1.110: - addl $16, %esp - movzbl 19(%ebp), %edx - testl $128, %edx - fstpl 184(%esp) - je ..B1.51 -..B1.50: - fldl _DBL_PPI@GOTOFF(%ebx) - fstl 176(%esp) - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - faddp %st, %st(1) - fstpl 152(%esp) - jmp ..B1.53 -..B1.51: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 176(%esp) - jmp ..B1.53 -..B1.52: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 184(%esp) - addl $-16, %esp - fldl 12(%ebp) - fstpl (%esp) - call acos@PLT -..B1.111: - addl $16, %esp - fstpl 176(%esp) -..B1.53: - movzbl 27(%ebp), %edi - shrl $7, %edi - notl %edi - movzbl 191(%esp), %edx - shll $7, %edi - andl $127, %edx - orl %edi, %edx - movb %dl, 191(%esp) - jmp ..B1.59 -..B1.54: - cmpl $2047, %ecx - je ..B1.67 -..B1.55: - jge ..B1.57 -..B1.56: - fldl _DBL_PPIBY2@GOTOFF(%ebx) - fstl 176(%esp) - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - faddp %st, %st(1) - fstpl 152(%esp) - fldl _DBL_PZERO@GOTOFF(%ebx) - faddl 12(%ebp) - fstpl 152(%esp) - jmp ..B1.58 -..B1.57: - fldl 12(%ebp) - faddl _DBL_PZERO@GOTOFF(%ebx) - fstpl 176(%esp) -..B1.58: - fldl 20(%ebp) - fchs - fstpl 184(%esp) -..B1.59: - movl 176(%esp), %edx - movl %edx, (%esi) - movl 180(%esp), %ecx - movl 184(%esp), %edi - movl 188(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 12(%esi) - movl 192(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.66 -..B1.60: - movl %esi, %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.61: - xorl %edi, %edi - jmp ..B1.11 -..B1.62: - testl $1048575, 24(%ebp) - jne ..B1.7 -..B1.63: - cmpl $0, 20(%ebp) - jne ..B1.7 - jmp ..B1.38 -..B1.64: - testl $1048575, 16(%ebp) - jne ..B1.5 -..B1.65: - cmpl $0, 12(%ebp) - jne ..B1.5 - jmp ..B1.38 -..B1.66: - call __stack_chk_fail@PLT -..B1.67: - testl $1048575, 16(%ebp) - jne ..B1.113 -..B1.68: - cmpl $0, 12(%ebp) - jne ..B1.113 -..B1.69: - fldl 12(%ebp) - cmpl $2047, %edx - fmul %st(0), %st - fstpl 184(%esp) - jge ..B1.76 -..B1.70: - movzbl 19(%ebp), %edx - testl $128, %edx - je ..B1.72 -..B1.71: - fldl _DBL_PPI@GOTOFF(%ebx) - fstl 176(%esp) - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - faddp %st, %st(1) - fstpl 152(%esp) - fldl _DBL_PZERO@GOTOFF(%ebx) - jmp ..B1.73 -..B1.72: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstl 176(%esp) -..B1.73: - movzbl 27(%ebp), %edx - testl $128, %edx - jne ..B1.75 -..B1.74: - movzbl 191(%esp), %edi - movl %edi, %edx - shrl $7, %edi - andl $127, %edx - notl %edi - shll $7, %edi - orl %edi, %edx - movb %dl, 191(%esp) -..B1.75: - faddl 20(%ebp) - fstpl 152(%esp) - jmp ..B1.59 -..B1.76: - testl $1048575, 24(%ebp) - jne ..B1.84 -..B1.77: - cmpl $0, 20(%ebp) - jne ..B1.84 -..B1.78: - movzbl 19(%ebp), %edx - testl $128, %edx - je ..B1.80 -..B1.79: - fldl _DBL_P3PIBY4@GOTOFF(%ebx) - jmp ..B1.81 -..B1.80: - fldl _DBL_PPIBY4@GOTOFF(%ebx) -..B1.81: - movzbl 27(%ebp), %edx - testl $128, %edx - fstl 176(%esp) - jne ..B1.83 -..B1.82: - movzbl 191(%esp), %edi - movl %edi, %edx - shrl $7, %edi - andl $127, %edx - notl %edi - shll $7, %edi - orl %edi, %edx - movb %dl, 191(%esp) -..B1.83: - faddl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fstpl 152(%esp) - jmp ..B1.59 -..B1.84: - fldl 20(%ebp) - fmul %st(0), %st - fstpl 176(%esp) - jmp ..B1.59 -..B1.85: - testl $1048575, 24(%ebp) - jne ..B1.87 -..B1.86: - cmpl $0, 20(%ebp) - je ..B1.54 -..B1.87: - fldl 20(%ebp) - fmul %st(0), %st - fstpl 176(%esp) - fldl 12(%ebp) - fmul %st(0), %st - fstpl 184(%esp) - jmp ..B1.59 -..B1.88: - testl $1048575, 16(%ebp) - jne ..B1.90 -..B1.89: - cmpl $0, 12(%ebp) - je ..B1.92 -..B1.90: - cmpl $2047, %edx - jge ..B1.92 -..B1.91: - fldl 12(%ebp) - fmul %st(0), %st - fstl 176(%esp) - fstpl 184(%esp) - jmp ..B1.59 -..B1.92: - testl $1048575, 16(%ebp) - jne ..B1.94 -..B1.93: - cmpl $0, 12(%ebp) - je ..B1.44 -..B1.94: - cmpl $2047, %edx - jne ..B1.45 -..B1.95: - testl $1048575, 24(%ebp) - jne ..B1.97 -..B1.96: - cmpl $0, 20(%ebp) - je ..B1.85 -..B1.97: - fldl 12(%ebp) - fmul %st(0), %st - fstpl 176(%esp) - fldl 20(%ebp) - fmul %st(0), %st - fstpl 184(%esp) - jmp ..B1.59 -..B1.98: - testl $1048575, 24(%ebp) - jne ..B1.100 -..B1.99: - cmpl $0, 20(%ebp) - je ..B1.112 -..B1.100: - cmpl $2047, %ecx - jge ..B1.43 -..B1.101: - fldl 20(%ebp) - fmul %st(0), %st - fstl 176(%esp) - fstpl 184(%esp) - jmp ..B1.59 -..B1.112: - cmpl $2047, %ecx - je ..B1.88 - jmp ..B1.44 -..B1.113: - cmpl $2047, %ecx - jl ..B1.56 - jmp ..B1.57 - .align 16,0x90 - .type cacos,@function - .size cacos,.-cacos - .data -# -- End cacos - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,12 - .space 4, 0x00 # pad - .align 16 -_Bcross: - .word -2936 - .word -10277 - .word 29569 - .word -23482 - .word 16382 - .word 0 - .type _Bcross,@object - .size _Bcross,12 - .space 4, 0x00 # pad - .align 16 -_Across: - .word 0 - .word 0 - .word 0 - .word -16384 - .word 16383 - .word 0 - .type _Across,@object - .size _Across,12 - .space 4, 0x00 # pad - .align 16 -_DBL_PZERO: - .long 0 - .long 0 - .type _DBL_PZERO,@object - .size _DBL_PZERO,8 - .space 8, 0x00 # pad - .align 16 -_LDBL_PPI: - .word -15819 - .word 8552 - .word -9566 - .word -14065 - .word 16384 - .word 0 - .type _LDBL_PPI,@object - .size _LDBL_PPI,12 - .space 4, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPIBY2: - .long 1413754136 - .long 1073291771 - .type _DBL_PPIBY2,@object - .size _DBL_PPIBY2,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPI: - .long 1413754136 - .long 1074340347 - .type _DBL_PPI,@object - .size _DBL_PPI,8 - .space 8, 0x00 # pad - .align 16 -_DBL_P3PIBY4: - .long 2134057426 - .long 1073928572 - .type _DBL_P3PIBY4,@object - .size _DBL_P3PIBY4,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPIBY4: - .long 1413754136 - .long 1072243195 - .type _DBL_PPIBY4,@object - .size _DBL_PPIBY4,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosf.S deleted file mode 100644 index 2e7bef3937..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosf.S +++ /dev/null @@ -1,638 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacosf.c" - .text -..TXTST0: -# -- Begin cacosf - .text - .align 16,0x90 - .globl cacosf -cacosf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %ebx - subl $124, %esp - fldz - movzwl 10(%ebp), %edx - andl $32640, %edx - shrl $7, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $255, %edx - fsts 104(%esp) - fsts 108(%esp) - jge ..B1.28 -..B1.2: - testl %edx, %edx - jle ..B1.50 -..B1.3: - movzwl 14(%ebp), %eax - andl $32640, %eax - shrl $7, %eax - cmpl $255, %eax - jge ..B1.91 -..B1.4: - testl %eax, %eax - jle ..B1.49 -..B1.5: - flds 8(%ebp) - fsts 96(%esp) - fld1 - fsts 92(%esp) - fxch %st(1) - fabs - fld %st(0) - fsub %st(2), %st - fld %st(0) - fmul %st(1), %st - fld %st(2) - faddp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fxch %st(2) - fstl 72(%esp) - flds 12(%ebp) - fsts 100(%esp) - fabs - fld %st(0) - fmul %st(1), %st - fstl 56(%esp) - fadd %st, %st(3) - fxch %st(3) - fsqrt - fstl 64(%esp) - fxch %st(3) - faddp %st, %st(4) - fxch %st(3) - fsqrt - fstl 48(%esp) - fxch %st(1) - fucomp %st(2) - fnstsw %ax - faddp %st, %st(1) - fldl .L_2il0floatpacket.6@GOTOFF(%ebx) - sahf - fmul %st, %st(1) - jp ..B1.6 - je ..B1.7 -..B1.6: - fldl 64(%esp) - fsubl 72(%esp) - fstpl 40(%esp) - jmp ..B1.8 -..B1.7: - fxch %st(2) - fstl 40(%esp) - fxch %st(2) -..B1.8: - fldl _Bcross@GOTOFF(%ebx) - fmul %st(2), %st - fcomp %st(4) - fnstsw %ax - sahf - jbe ..B1.10 -..B1.9: - fstp %st(2) - fld %st(2) - fdiv %st(1), %st - fstpl (%esp) - fxch %st(2) - fstps 80(%esp) - fxch %st(2) - fstpl 16(%esp) - fxch %st(1) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - call acos@PLT - jmp ..B1.85 -..B1.10: - flds 92(%esp) - fcomp %st(4) - fnstsw %ax - sahf - jb ..B1.12 -..B1.11: - fstp %st(2) - fld %st(3) - fld %st(1) - fadd %st(4), %st - fmul %st(3), %st - fxch %st(1) - faddl 48(%esp) - fdivrl 56(%esp) - faddl 40(%esp) - fmulp %st, %st(1) - fsqrt - fxch %st(3) - fstl 8(%esp) - fxch %st(3) - fstpl (%esp) - fxch %st(2) - fstps 80(%esp) - fxch %st(2) - fstpl 16(%esp) - fxch %st(1) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - call atan2@PLT - jmp ..B1.85 -..B1.12: - fldl 72(%esp) - fld %st(2) - fadd %st(5), %st - fxch %st(6) - fstl 16(%esp) - fxch %st(1) - faddl 64(%esp) - fxch %st(1) - faddl 48(%esp) - fdivr %st(6), %st - fxch %st(1) - fdivrp %st, %st(6) - faddp %st, %st(5) - fmul %st, %st(4) - fxch %st(4) - fsqrt - fmulp %st, %st(2) - fxch %st(2) - fstl 8(%esp) - fxch %st(1) - fstpl (%esp) - fstps 80(%esp) - fxch %st(1) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - fldl 16(%esp) - fstpl 16(%esp) - call atan2@PLT -..B1.85: - flds 84(%esp) - fldl 32(%esp) - fldl 24(%esp) - fldl 16(%esp) - flds 80(%esp) -..B1.13: - fldl _Across@GOTOFF(%ebx) - fcomp %st(4) - fnstsw %ax - sahf - jb ..B1.18 -..B1.14: - flds 92(%esp) - fcompp - fnstsw %ax - faddl 48(%esp) - fdivrl 56(%esp) - sahf - jbe ..B1.16 -..B1.15: - fldl 56(%esp) - fdivl 40(%esp) - faddp %st, %st(1) - fmulp %st, %st(1) - jmp ..B1.17 -..B1.16: - fldl 72(%esp) - faddl 64(%esp) - faddp %st, %st(1) - fmulp %st, %st(1) -..B1.17: - fxch %st(1) - fadds 92(%esp) - fmul %st(1), %st - fsqrt - faddp %st, %st(1) - fstpl (%esp) - fxch %st(1) - fstpl 16(%esp) - fstps 84(%esp) - call log1p@PLT - jmp ..B1.87 -..B1.18: - fstp %st(1) - fstp %st(1) - fstp %st(0) - fld %st(0) - fmul %st(1), %st - fsubs 92(%esp) - fsqrt - faddp %st, %st(1) - fstpl (%esp) - fxch %st(1) - fstpl 16(%esp) - fstps 84(%esp) - call log@PLT -..B1.87: - flds 84(%esp) - fldl 16(%esp) -..B1.19: - fxch %st(1) - fcoms 96(%esp) - fnstsw %ax - sahf - jbe ..B1.21 -..B1.20: - fxch %st(1) - fsubrl _DBL_PPI@GOTOFF(%ebx) - fxch %st(1) -..B1.21: - flds 100(%esp) - fcompp - fnstsw %ax - sahf - jbe ..B1.23 -..B1.22: - fxch %st(1) - fchs - fxch %st(1) -..B1.23: - fstps 104(%esp) - movzwl 106(%esp), %eax - testl $32640, %eax - fstps 108(%esp) - jne ..B1.25 -..B1.24: - testl $8388607, 104(%esp) - jne ..B1.27 -..B1.25: - movzwl 110(%esp), %eax - testl $32640, %eax - jne ..B1.48 -..B1.26: - testl $8388607, 108(%esp) - je ..B1.48 -..B1.27: - flds .L_2il0floatpacket.11@GOTOFF(%ebx) - fmul %st(0), %st - fstps 88(%esp) - jmp ..B1.48 -..B1.28: - je ..B1.79 -..B1.29: - testl %edx, %edx - jne ..B1.32 -..B1.30: - testl $8388607, 8(%ebp) - jne ..B1.32 -..B1.31: - fstp %st(0) - movl $1070141403, %eax - movl %eax, 104(%esp) - movl %eax, 88(%esp) - addl $4, %esp - pushl 12(%ebp) - call asinhf@PLT -..B1.88: - fchs - fstps 108(%esp) - jmp ..B1.48 -..B1.32: - movzwl 14(%ebp), %eax - andl $32640, %eax - shrl $7, %eax - cmpl $255, %eax - je ..B1.76 -..B1.33: - cmpl $255, %edx - je ..B1.69 -..B1.34: - cmpl $255, %eax - je ..B1.95 -..B1.35: - testl %eax, %eax - jne ..B1.43 -..B1.36: - testl $8388607, 12(%ebp) - jne ..B1.43 -..B1.37: - cmpl $127, %edx - jl ..B1.41 -..B1.38: - flds 8(%ebp) - fabs - fstps (%esp) - fstps 84(%esp) - call acoshf@PLT -..B1.89: - flds 84(%esp) - movzbl 11(%ebp), %eax - testl $128, %eax - fxch %st(1) - fstps 108(%esp) - je ..B1.40 -..B1.39: - fstp %st(0) - movl $1078530011, %eax - movl %eax, 104(%esp) - movl %eax, 88(%esp) - jmp ..B1.42 -..B1.40: - fstps 104(%esp) - jmp ..B1.42 -..B1.41: - movl 8(%ebp), %eax - fstps 108(%esp) - movl %eax, (%esp) - call acosf@PLT -..B1.90: - fstps 104(%esp) -..B1.42: - movzbl 15(%ebp), %eax - shrl $7, %eax - notl %eax - movzbl 111(%esp), %edx - shll $7, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 111(%esp) - jmp ..B1.48 -..B1.43: - cmpl $255, %edx - je ..B1.51 -..B1.44: - fstp %st(0) - cmpl $255, %edx - jge ..B1.46 -..B1.45: - movl 8(%ebp), %edx - movl $1070141403, %eax - movl %eax, 88(%esp) - movl %eax, 104(%esp) - movl %edx, 88(%esp) - jmp ..B1.47 -..B1.46: - movl 8(%ebp), %eax - movl %eax, 104(%esp) -..B1.47: - flds 12(%ebp) - fchs - fstps 108(%esp) -..B1.48: - movl 104(%esp), %eax - movl 108(%esp), %edx - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.49: - testl $8388607, 12(%ebp) - jne ..B1.5 - jmp ..B1.91 -..B1.50: - testl $8388607, 8(%ebp) - jne ..B1.3 - jmp ..B1.91 -..B1.51: - testl $8388607, 8(%ebp) - jne ..B1.44 -..B1.52: - flds 8(%ebp) - cmpl $255, %eax - fmul %st(0), %st - fstps 108(%esp) - jge ..B1.59 -..B1.53: - movzbl 11(%ebp), %eax - testl $128, %eax - je ..B1.55 -..B1.54: - fstp %st(0) - movl $1078530011, %eax - movl %eax, 104(%esp) - movl %eax, 88(%esp) - jmp ..B1.56 -..B1.55: - fstps 104(%esp) -..B1.56: - movzbl 15(%ebp), %eax - testl $128, %eax - jne ..B1.58 -..B1.57: - movzbl 111(%esp), %eax - movl %eax, %edx - shrl $7, %eax - andl $127, %edx - notl %eax - shll $7, %eax - orl %eax, %edx - movb %dl, 111(%esp) -..B1.58: - movl 12(%ebp), %eax - movl %eax, 88(%esp) - jmp ..B1.48 -..B1.59: - fstp %st(0) - testl $8388607, 12(%ebp) - jne ..B1.66 -..B1.60: - movzbl 11(%ebp), %eax - testl $128, %eax - je ..B1.62 -..B1.61: - flds .L_2il0floatpacket.9@GOTOFF(%ebx) - jmp ..B1.63 -..B1.62: - flds .L_2il0floatpacket.10@GOTOFF(%ebx) -..B1.63: - movzbl 15(%ebp), %eax - testl $128, %eax - fsts 104(%esp) - jne ..B1.65 -..B1.64: - movzbl 111(%esp), %eax - movl %eax, %edx - shrl $7, %eax - andl $127, %edx - notl %eax - shll $7, %eax - orl %eax, %edx - movb %dl, 111(%esp) -..B1.65: - fadds .L_2il0floatpacket.11@GOTOFF(%ebx) - fstps 88(%esp) - jmp ..B1.48 -..B1.66: - flds 12(%ebp) - fmul %st(0), %st - fstps 104(%esp) - jmp ..B1.48 -..B1.95: - testl $8388607, 12(%ebp) -..B1.67: - je ..B1.43 -..B1.68: - fstp %st(0) - flds 12(%ebp) - fmul %st(0), %st - fstps 104(%esp) - flds 8(%ebp) - fmul %st(0), %st - fstps 108(%esp) - jmp ..B1.48 -..B1.69: - testl $8388607, 8(%ebp) - je ..B1.72 -..B1.70: - cmpl $255, %eax - jge ..B1.94 -..B1.71: - fstp %st(0) - flds 8(%ebp) - fmul %st(0), %st - fsts 104(%esp) - fstps 108(%esp) - jmp ..B1.48 -..B1.72: - je ..B1.34 -..B1.73: - cmpl $255, %eax - jne ..B1.35 -..B1.74: - testl $8388607, 12(%ebp) - je ..B1.67 -..B1.75: - fstp %st(0) - flds 8(%ebp) - fmul %st(0), %st - fstps 104(%esp) - flds 12(%ebp) - fmul %st(0), %st - fstps 108(%esp) - jmp ..B1.48 -..B1.76: - testl $8388607, 12(%ebp) - je ..B1.33 -..B1.77: - cmpl $255, %edx - jge ..B1.33 -..B1.78: - fstp %st(0) - flds 12(%ebp) - fmul %st(0), %st - fsts 104(%esp) - fstps 108(%esp) - jmp ..B1.48 -..B1.79: - testl $8388607, 8(%ebp) - je ..B1.32 -..B1.80: - flds 8(%ebp) - fadd %st(0), %st - fstps 8(%ebp) - movzwl 10(%ebp), %edx - andl $32640, %edx - shrl $7, %edx - jmp ..B1.29 -..B1.91: - cmpl $255, %edx - je ..B1.79 - jmp ..B1.29 -..B1.94: - testl $8388607, 8(%ebp) - jne ..B1.73 - jmp ..B1.34 - .align 16,0x90 - .type cacosf,@function - .size cacosf,.-cacosf - .data -# -- End cacosf - .section .rodata, "a" - .align 16 - .align 16 -_Bcross: - .long 1882913663 - .long 1071941838 - .type _Bcross,@object - .size _Bcross,8 - .space 8, 0x00 # pad - .align 16 -_Across: - .long 0 - .long 1073217536 - .type _Across,@object - .size _Across,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPI: - .long 1413754136 - .long 1074340347 - .type _DBL_PPI,@object - .size _DBL_PPI,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 4 -.L_2il0floatpacket.7: - .long 0x3fc90fdb - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,4 - .align 4 -.L_2il0floatpacket.8: - .long 0x40490fdb - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,4 - .align 4 -.L_2il0floatpacket.9: - .long 0x4016cbe4 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,4 - .align 4 -.L_2il0floatpacket.10: - .long 0x3f490fdb - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,4 - .align 4 -.L_2il0floatpacket.11: - .long 0x00800000 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosh.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosh.S deleted file mode 100644 index 6b85720176..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosh.S +++ /dev/null @@ -1,789 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacosh.c" - .text -..TXTST0: -# -- Begin cacosh - .text - .align 16,0x90 - .globl cacosh -cacosh: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 184(%esp) - fstl 168(%esp) - fstpl 176(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 18(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %ecx - jge ..B1.36 -..B1.4: - testl %ecx, %ecx - jle ..B1.71 -..B1.5: - movzwl 26(%ebp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - jge ..B1.37 -..B1.6: - testl %edx, %edx - jle ..B1.69 -..B1.7: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.68 -..B1.8: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - movl $1, %edi -..B1.11: - fldl 12(%ebp) - fstl 152(%esp) - fabs - fldl 20(%ebp) - fabs - fld %st(0) - fmul %st(1), %st - fstpt 120(%esp) - fldt 120(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fld %st(0) - fsubr %st(4), %st - fld %st(0) - fmul %st(1), %st - fadd %st(3), %st - fsqrt - fstpt 88(%esp) - fldt 88(%esp) - fld %st(2) - fadd %st(6), %st - fld %st(0) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(4) - fsqrt - fstpt 104(%esp) - fldt 104(%esp) - fxch %st(1) - fucom %st(2) - fnstsw %ax - faddp %st, %st(1) - fxch %st(1) - fstpt 136(%esp) - sahf - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmul %st, %st(1) - jp ..B1.12 - je ..B1.13 -..B1.12: - fldt 88(%esp) - fldt 136(%esp) - fsubrp %st, %st(1) - fstpt 72(%esp) - jmp ..B1.14 -..B1.13: - fxch %st(4) - fstpt 72(%esp) - fldt 72(%esp) - fxch %st(4) -..B1.14: - fldt _Bcross@GOTOFF(%ebx) - fmul %st(2), %st - fcomp %st(6) - fnstsw %ax - sahf - jbe ..B1.16 -..B1.15: - fstp %st(4) - fld %st(4) - addl $-16, %esp - fdiv %st(1), %st - fstpt (%esp) - fxch %st(4) - fstpl 80(%esp) - fxch %st(1) - fstpt 16(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt 48(%esp) - fstpt 64(%esp) - call acosl@PLT -..B1.109: - fldt 64(%esp) - fldt 48(%esp) - fldt 32(%esp) - fldt 16(%esp) - fldl 80(%esp) - addl $16, %esp - jmp ..B1.19 -..B1.16: - fxch %st(2) - fcom %st(5) - fnstsw %ax - sahf - jb ..B1.18 -..B1.17: - fstp %st(4) - addl $-32, %esp - fld %st(2) - fld %st(1) - fadd %st(6), %st - fmul %st(3), %st - fldt 136(%esp) - faddp %st, %st(2) - fldt 152(%esp) - fdivp %st, %st(2) - fldt 104(%esp) - faddp %st, %st(2) - fmulp %st, %st(1) - fsqrt - fstpt (%esp) - fxch %st(4) - fstpt 12(%esp) - fldt 12(%esp) - fstpl 96(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt 48(%esp) - fstpt 64(%esp) - fstpt 80(%esp) - call atan2l@PLT - jmp ..B1.111 -..B1.18: - fxch %st(1) - fstpt 48(%esp) - fldt 48(%esp) - fxch %st(3) - fstpt (%esp) - fldt (%esp) - addl $-32, %esp - fxch %st(3) - fadd %st(5), %st - fldt 136(%esp) - faddp %st, %st(4) - fdiv %st, %st(3) - fldt 168(%esp) - fldt 120(%esp) - faddp %st, %st(1) - fdivrp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fsqrt - fmulp %st, %st(3) - fxch %st(2) - fstpt (%esp) - fxch %st(2) - fstpt 12(%esp) - fldt 12(%esp) - fstpl 96(%esp) - fxch %st(1) - fstpt 48(%esp) - fstpt 64(%esp) - fldt 32(%esp) - fstpt 32(%esp) - fldt 80(%esp) - fstpt 80(%esp) - call atan2l@PLT -..B1.111: - fldt 80(%esp) - fldt 64(%esp) - fldt 48(%esp) - fldt 32(%esp) - fldl 96(%esp) - addl $32, %esp -..B1.19: - fldl _DBL_PZERO@GOTOFF(%ebx) - fcompl 152(%esp) - fnstsw %ax - sahf - jbe ..B1.21 -..B1.20: - fldt _LDBL_PPI@GOTOFF(%ebx) - fsubp %st, %st(6) -..B1.21: - fldt _Across@GOTOFF(%ebx) - movzbl 27(%ebp), %ecx - fcomp %st(5) - fnstsw %ax - fxch %st(5) - fstpl 176(%esp) - andl $-128, %ecx - movzbl 183(%esp), %edx - andl $127, %edx - orl %ecx, %edx - movb %dl, 183(%esp) - sahf - jb ..B1.26 -..B1.22: - fldt 104(%esp) - faddp %st, %st(1) - fxch %st(4) - fcomp %st(2) - fnstsw %ax - fldt 120(%esp) - fdivp %st, %st(4) - sahf - jae ..B1.24 - jp ..B1.24 -..B1.23: - fldt 72(%esp) - fldt 120(%esp) - fdivp %st, %st(1) - faddp %st, %st(4) - fmulp %st, %st(3) - jmp ..B1.25 -..B1.24: - fldt 88(%esp) - fldt 136(%esp) - faddp %st, %st(1) - faddp %st, %st(4) - fmulp %st, %st(3) -..B1.25: - addl $-16, %esp - faddp %st, %st(1) - fmul %st(1), %st - fsqrt - faddp %st, %st(1) - fstpt (%esp) - call log1pl@PLT - jmp ..B1.113 -..B1.26: - fstp %st(0) - fstp %st(0) - fstp %st(2) - fld %st(0) - addl $-16, %esp - fmul %st(1), %st - fsubp %st, %st(2) - fxch %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%esp) - call logl@PLT -..B1.113: - addl $16, %esp - fstpl 168(%esp) -..B1.27: - movzwl 174(%esp), %edx - testl $32752, %edx - jne ..B1.30 -..B1.28: - testl $1048575, 172(%esp) - jne ..B1.33 -..B1.29: - cmpl $0, 168(%esp) - jne ..B1.33 -..B1.30: - movzwl 182(%esp), %edx - testl $32752, %edx - jne ..B1.34 -..B1.31: - testl $1048575, 180(%esp) - jne ..B1.33 -..B1.32: - cmpl $0, 176(%esp) - je ..B1.34 -..B1.33: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 160(%esp) -..B1.34: - testl %edi, %edi - je ..B1.66 -..B1.35: - fldcw 14(%esp) - jmp ..B1.66 -..B1.36: - movzwl 26(%ebp), %edx - andl $32752, %edx - shrl $4, %edx -..B1.37: - testl %edx, %edx - jne ..B1.49 -..B1.38: - testl $1048575, 24(%ebp) - jne ..B1.49 -..B1.39: - cmpl $0, 20(%ebp) - jne ..B1.49 -..B1.40: - cmpl $2047, %ecx - jl ..B1.43 -..B1.41: - testl $1048575, 16(%ebp) - jne ..B1.49 -..B1.42: - cmpl $0, 12(%ebp) - jne ..B1.49 -..B1.43: - cmpl $1023, %ecx - jl ..B1.47 -..B1.44: - fldl 12(%ebp) - addl $-16, %esp - fabs - fstpl (%esp) - call acosh@PLT -..B1.114: - addl $16, %esp - movzbl 19(%ebp), %edx - testl $128, %edx - fstpl 168(%esp) - je ..B1.46 -..B1.45: - fldl _DBL_PPI@GOTOFF(%ebx) - fstl 176(%esp) - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - faddp %st, %st(1) - fstpl 160(%esp) - jmp ..B1.48 -..B1.46: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 176(%esp) - jmp ..B1.48 -..B1.47: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 168(%esp) - addl $-16, %esp - fldl 12(%ebp) - fstpl (%esp) - call acos@PLT -..B1.115: - addl $16, %esp - fstpl 176(%esp) -..B1.48: - movzbl 183(%esp), %edx - movzbl 27(%ebp), %edi - andl $127, %edx - andl $-128, %edi - orl %edi, %edx - movb %dl, 183(%esp) - jmp ..B1.66 -..B1.49: - testl %ecx, %ecx - jne ..B1.56 -..B1.50: - testl $1048575, 16(%ebp) - jne ..B1.57 -..B1.51: - cmpl $0, 12(%ebp) - jne ..B1.57 -..B1.52: - cmpl $2047, %edx - jl ..B1.55 -..B1.53: - testl $1048575, 24(%ebp) - jne ..B1.57 -..B1.54: - cmpl $0, 20(%ebp) - jne ..B1.57 -..B1.55: - fldl 20(%ebp) - fstl (%esp) - addl $-16, %esp - fabs - fstpl (%esp) - call asinh@PLT -..B1.117: - fldl 12(%ebp) - addl $16, %esp - fxch %st(1) - fstpl 168(%esp) - addl $-16, %esp - fstpl 8(%esp) - fldl 16(%esp) - fstpl (%esp) - call atan2@PLT -..B1.116: - addl $16, %esp - fstpl 176(%esp) - jmp ..B1.66 -..B1.56: - cmpl $2047, %ecx - je ..B1.97 -..B1.57: - cmpl $2047, %edx - je ..B1.93 -..B1.121: - cmpl $2047, %ecx -..B1.58: - je ..B1.75 -..B1.59: - jge ..B1.64 -..B1.60: - movzbl 27(%ebp), %edx - testl $128, %edx - je ..B1.62 -..B1.61: - fldl _DBL_NPIBY2@GOTOFF(%ebx) - jmp ..B1.63 -..B1.62: - fldl _DBL_PPIBY2@GOTOFF(%ebx) -..B1.63: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fadd %st(1), %st - fstpl 160(%esp) - fstpl 176(%esp) - fldl _DBL_PZERO@GOTOFF(%ebx) - faddl 12(%ebp) - fstpl 160(%esp) - jmp ..B1.65 -..B1.64: - fldl 12(%ebp) - faddl _DBL_PZERO@GOTOFF(%ebx) - fstpl 176(%esp) -..B1.65: - fldl 20(%ebp) - fmul %st(0), %st - fstpl 168(%esp) -..B1.66: - movl 168(%esp), %edx - movl %edx, (%esi) - movl 172(%esp), %ecx - movl 176(%esp), %edi - movl 180(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 12(%esi) - movl 184(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.74 -..B1.67: - movl %esi, %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.68: - xorl %edi, %edi - jmp ..B1.11 -..B1.69: - testl $1048575, 24(%ebp) - jne ..B1.7 -..B1.70: - cmpl $0, 20(%ebp) - jne ..B1.7 - jmp ..B1.37 -..B1.71: - testl $1048575, 16(%ebp) - jne ..B1.5 -..B1.72: - cmpl $0, 12(%ebp) - jne ..B1.5 - jmp ..B1.36 -..B1.74: - call __stack_chk_fail@PLT -..B1.75: - testl $1048575, 16(%ebp) - jne ..B1.119 -..B1.76: - cmpl $0, 12(%ebp) - jne ..B1.119 -..B1.77: - fldl 12(%ebp) - cmpl $2047, %edx - fmul %st(0), %st - fstpl 168(%esp) - jge ..B1.84 -..B1.78: - movzbl 19(%ebp), %edx - testl $128, %edx - je ..B1.80 -..B1.79: - fldl _DBL_PPI@GOTOFF(%ebx) - fstl 176(%esp) - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - faddp %st, %st(1) - fstpl 160(%esp) - fldl _DBL_PZERO@GOTOFF(%ebx) - jmp ..B1.81 -..B1.80: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstl 176(%esp) -..B1.81: - movzbl 27(%ebp), %edx - testl $128, %edx - je ..B1.83 -..B1.82: - movzbl 183(%esp), %edi - movl %edi, %edx - shrl $7, %edi - andl $127, %edx - notl %edi - shll $7, %edi - orl %edi, %edx - movb %dl, 183(%esp) -..B1.83: - faddl 20(%ebp) - fstpl 160(%esp) - jmp ..B1.66 -..B1.84: - testl $1048575, 24(%ebp) - jne ..B1.92 -..B1.85: - cmpl $0, 20(%ebp) - jne ..B1.92 -..B1.86: - movzbl 19(%ebp), %edx - testl $128, %edx - je ..B1.88 -..B1.87: - fldl _DBL_P3PIBY4@GOTOFF(%ebx) - jmp ..B1.89 -..B1.88: - fldl _DBL_PPIBY4@GOTOFF(%ebx) -..B1.89: - movzbl 27(%ebp), %edx - testl $128, %edx - fstpl 176(%esp) - je ..B1.91 -..B1.90: - movzbl 183(%esp), %edi - movl %edi, %edx - shrl $7, %edi - andl $127, %edx - notl %edi - shll $7, %edi - orl %edi, %edx - movb %dl, 183(%esp) -..B1.91: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - faddl 176(%esp) - fstpl 160(%esp) - jmp ..B1.66 -..B1.92: - fldl 20(%ebp) - fmul %st(0), %st - fstpl 176(%esp) - jmp ..B1.66 -..B1.93: - testl $1048575, 24(%ebp) - jne ..B1.95 -..B1.94: - cmpl $0, 20(%ebp) - je ..B1.118 -..B1.95: - cmpl $2047, %ecx - jge ..B1.58 -..B1.96: - fldl 20(%ebp) - fmul %st(0), %st - fstl 168(%esp) - fstpl 176(%esp) - jmp ..B1.66 -..B1.97: - testl $1048575, 16(%ebp) - jne ..B1.99 -..B1.98: - cmpl $0, 12(%ebp) - je ..B1.100 -..B1.99: - cmpl $2047, %edx - je ..B1.104 -..B1.100: - testl $1048575, 16(%ebp) - jne ..B1.102 -..B1.101: - cmpl $0, 12(%ebp) - je ..B1.57 -..B1.102: - cmpl $2047, %edx - jge ..B1.57 -..B1.103: - fldl 12(%ebp) - fmul %st(0), %st - fstl 168(%esp) - fstpl 176(%esp) - jmp ..B1.66 -..B1.104: - testl $1048575, 24(%ebp) - jne ..B1.106 -..B1.105: - cmpl $0, 20(%ebp) - je ..B1.100 -..B1.106: - fldl 12(%ebp) - fmul %st(0), %st - fstpl 168(%esp) - fldl 20(%ebp) - fmul %st(0), %st - fstpl 176(%esp) - jmp ..B1.66 -..B1.118: - cmpl $2047, %ecx - je ..B1.75 - jmp ..B1.59 -..B1.119: - cmpl $2047, %ecx - jl ..B1.60 - jmp ..B1.64 - .align 16,0x90 - .type cacosh,@function - .size cacosh,.-cacosh - .data -# -- End cacosh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -_Bcross: - .word -2936 - .word -10277 - .word 29569 - .word -23482 - .word 16382 - .word 0 - .type _Bcross,@object - .size _Bcross,12 - .space 4, 0x00 # pad - .align 16 -_DBL_PZERO: - .long 0 - .long 0 - .type _DBL_PZERO,@object - .size _DBL_PZERO,8 - .space 8, 0x00 # pad - .align 16 -_LDBL_PPI: - .word -15819 - .word 8552 - .word -9566 - .word -14065 - .word 16384 - .word 0 - .type _LDBL_PPI,@object - .size _LDBL_PPI,12 - .space 4, 0x00 # pad - .align 16 -_Across: - .word 0 - .word 0 - .word 0 - .word -16384 - .word 16383 - .word 0 - .type _Across,@object - .size _Across,12 - .space 4, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPI: - .long 1413754136 - .long 1074340347 - .type _DBL_PPI,@object - .size _DBL_PPI,8 - .space 8, 0x00 # pad - .align 16 -_DBL_NPIBY2: - .long 1413754136 - .long -1074191877 - .type _DBL_NPIBY2,@object - .size _DBL_NPIBY2,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPIBY2: - .long 1413754136 - .long 1073291771 - .type _DBL_PPIBY2,@object - .size _DBL_PPIBY2,8 - .space 8, 0x00 # pad - .align 16 -_DBL_P3PIBY4: - .long 2134057426 - .long 1073928572 - .type _DBL_P3PIBY4,@object - .size _DBL_P3PIBY4,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPIBY4: - .long 1413754136 - .long 1072243195 - .type _DBL_PPIBY4,@object - .size _DBL_PPIBY4,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacoshf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacoshf.S deleted file mode 100644 index 06b07b0f47..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacoshf.S +++ /dev/null @@ -1,639 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacoshf.c" - .text -..TXTST0: -# -- Begin cacoshf - .text - .align 16,0x90 - .globl cacoshf -cacoshf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %ebx - subl $108, %esp - fldz - movzwl 10(%ebp), %edx - andl $32640, %edx - shrl $7, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $255, %edx - fsts 100(%esp) - fsts 104(%esp) - jge ..B1.26 -..B1.2: - testl %edx, %edx - jle ..B1.55 -..B1.3: - movzwl 14(%ebp), %eax - andl $32640, %eax - shrl $7, %eax - cmpl $255, %eax - jge ..B1.27 -..B1.4: - testl %eax, %eax - jle ..B1.54 -..B1.5: - flds 8(%ebp) - fsts 92(%esp) - fld1 - fsts 88(%esp) - fxch %st(1) - fabs - fld %st(0) - fsub %st(2), %st - fld %st(0) - fmul %st(1), %st - fld %st(2) - faddp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fxch %st(2) - fstl 72(%esp) - flds 12(%ebp) - fabs - fld %st(0) - fmul %st(1), %st - fstl 56(%esp) - fadd %st, %st(3) - fxch %st(3) - fsqrt - fstl 64(%esp) - fxch %st(3) - faddp %st, %st(4) - fxch %st(3) - fsqrt - fstl 48(%esp) - fxch %st(1) - fucomp %st(2) - fnstsw %ax - faddp %st, %st(1) - fldl .L_2il0floatpacket.6@GOTOFF(%ebx) - sahf - fmul %st, %st(1) - jp ..B1.6 - je ..B1.7 -..B1.6: - fldl 64(%esp) - fsubl 72(%esp) - fstpl 40(%esp) - jmp ..B1.8 -..B1.7: - fxch %st(2) - fstl 40(%esp) - fxch %st(2) -..B1.8: - fldl _Bcross@GOTOFF(%ebx) - fmul %st(2), %st - fcomp %st(4) - fnstsw %ax - sahf - jbe ..B1.10 -..B1.9: - fstp %st(2) - fld %st(2) - fdiv %st(1), %st - fstpl (%esp) - fxch %st(2) - fstps 80(%esp) - fxch %st(2) - fstpl 16(%esp) - fxch %st(1) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - call acos@PLT - jmp ..B1.89 -..B1.10: - flds 88(%esp) - fcomp %st(4) - fnstsw %ax - sahf - jb ..B1.12 -..B1.11: - fstp %st(2) - fld %st(3) - fld %st(1) - fadd %st(4), %st - fmul %st(3), %st - fxch %st(1) - faddl 48(%esp) - fdivrl 56(%esp) - faddl 40(%esp) - fmulp %st, %st(1) - fsqrt - fxch %st(3) - fstl 8(%esp) - fxch %st(3) - fstpl (%esp) - fxch %st(2) - fstps 80(%esp) - fxch %st(2) - fstpl 16(%esp) - fxch %st(1) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - call atan2@PLT - jmp ..B1.89 -..B1.12: - fldl 72(%esp) - fld %st(2) - fadd %st(5), %st - fxch %st(6) - fstl 16(%esp) - fxch %st(1) - faddl 64(%esp) - fxch %st(1) - faddl 48(%esp) - fdivr %st(6), %st - fxch %st(1) - fdivrp %st, %st(6) - faddp %st, %st(5) - fmul %st, %st(4) - fxch %st(4) - fsqrt - fmulp %st, %st(2) - fxch %st(2) - fstl 8(%esp) - fxch %st(1) - fstpl (%esp) - fstps 80(%esp) - fxch %st(1) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - fldl 16(%esp) - fstpl 16(%esp) - call atan2@PLT -..B1.89: - flds 84(%esp) - fldl 32(%esp) - fldl 24(%esp) - fldl 16(%esp) - flds 80(%esp) -..B1.13: - fxch %st(4) - fcomps 92(%esp) - fnstsw %ax - sahf - jbe ..B1.15 -..B1.14: - fxch %st(4) - fsubrl _DBL_PPI@GOTOFF(%ebx) - fxch %st(4) -..B1.15: - fxch %st(4) - fstps 104(%esp) - fldl _Across@GOTOFF(%ebx) - movzbl 107(%esp), %ecx - fcomp %st(2) - fnstsw %ax - movzbl 15(%ebp), %edx - andl $127, %ecx - andl $-128, %edx - orl %edx, %ecx - movb %cl, 107(%esp) - sahf - jb ..B1.20 -..B1.16: - flds 88(%esp) - fcomp %st(3) - fnstsw %ax - fxch %st(2) - fstp %st(0) - fxch %st(2) - faddl 48(%esp) - fdivrl 56(%esp) - sahf - jbe ..B1.18 -..B1.17: - fldl 56(%esp) - fdivl 40(%esp) - faddp %st, %st(1) - fmulp %st, %st(1) - jmp ..B1.19 -..B1.18: - fldl 72(%esp) - faddl 64(%esp) - faddp %st, %st(1) - fmulp %st, %st(1) -..B1.19: - fxch %st(1) - fadds 88(%esp) - fmul %st(1), %st - fsqrt - faddp %st, %st(1) - fstpl (%esp) - call log1p@PLT - jmp ..B1.91 -..B1.20: - fstp %st(3) - fstp %st(2) - fstp %st(0) - fld %st(0) - fmul %st(1), %st - fsubs 88(%esp) - fsqrt - faddp %st, %st(1) - fstpl (%esp) - call log@PLT -..B1.91: - fstps 100(%esp) -..B1.21: - movzwl 102(%esp), %eax - testl $32640, %eax - jne ..B1.23 -..B1.22: - testl $8388607, 100(%esp) - jne ..B1.25 -..B1.23: - movzwl 106(%esp), %eax - testl $32640, %eax - jne ..B1.53 -..B1.24: - testl $8388607, 104(%esp) - je ..B1.53 -..B1.25: - flds .L_2il0floatpacket.10@GOTOFF(%ebx) - fmul %st(0), %st - fstps 96(%esp) - jmp ..B1.53 -..B1.26: - movzwl 14(%ebp), %eax - andl $32640, %eax - shrl $7, %eax -..B1.27: - cmpl $255, %edx - je ..B1.83 -..B1.28: - testl %eax, %eax - jne ..B1.38 -..B1.29: - testl $8388607, 12(%ebp) - jne ..B1.38 -..B1.30: - cmpl $255, %edx - jl ..B1.32 -..B1.31: - testl $8388607, 8(%ebp) - jne ..B1.38 -..B1.32: - cmpl $127, %edx - jl ..B1.36 -..B1.33: - flds 8(%ebp) - fabs - fstps (%esp) - fstps 84(%esp) - call acoshf@PLT -..B1.92: - flds 84(%esp) - movzbl 11(%ebp), %eax - testl $128, %eax - fxch %st(1) - fstps 100(%esp) - je ..B1.35 -..B1.34: - fstp %st(0) - movl $1078530011, %eax - movl %eax, 104(%esp) - movl %eax, 96(%esp) - jmp ..B1.37 -..B1.35: - fstps 104(%esp) - jmp ..B1.37 -..B1.36: - movl 8(%ebp), %eax - fstps 100(%esp) - movl %eax, (%esp) - call acosf@PLT -..B1.93: - fstps 104(%esp) -..B1.37: - movzbl 107(%esp), %edx - movzbl 15(%ebp), %eax - andl $127, %edx - andl $-128, %eax - orl %eax, %edx - movb %dl, 107(%esp) - jmp ..B1.53 -..B1.38: - testl %edx, %edx - jne ..B1.43 -..B1.39: - testl $8388607, 8(%ebp) - jne ..B1.44 -..B1.40: - cmpl $255, %eax - jl ..B1.42 -..B1.41: - testl $8388607, 12(%ebp) - jne ..B1.44 -..B1.42: - fstp %st(0) - flds 12(%ebp) - fsts 16(%esp) - fabs - fstps (%esp) - call asinhf@PLT -..B1.95: - movl 8(%ebp), %eax - movl %eax, 4(%esp) - flds 16(%esp) - fstps (%esp) - fstps 100(%esp) - call atan2f@PLT -..B1.94: - fstps 104(%esp) - jmp ..B1.53 -..B1.43: - cmpl $255, %edx - je ..B1.76 -..B1.44: - cmpl $255, %eax - je ..B1.73 -..B1.45: - cmpl $255, %edx - je ..B1.57 -..B1.46: - fstp %st(0) - cmpl $255, %edx - jge ..B1.51 -..B1.47: - movzbl 15(%ebp), %eax - testl $128, %eax - je ..B1.49 -..B1.48: - flds .L_2il0floatpacket.8@GOTOFF(%ebx) - jmp ..B1.50 -..B1.49: - flds .L_2il0floatpacket.9@GOTOFF(%ebx) -..B1.50: - flds .L_2il0floatpacket.10@GOTOFF(%ebx) - movl 8(%ebp), %eax - fadd %st(1), %st - fstps 96(%esp) - fstps 104(%esp) - movl %eax, 96(%esp) - jmp ..B1.52 -..B1.51: - movl 8(%ebp), %eax - movl %eax, 104(%esp) -..B1.52: - flds 12(%ebp) - fmul %st(0), %st - fstps 100(%esp) -..B1.53: - movl 100(%esp), %eax - movl 104(%esp), %edx - addl $108, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.54: - testl $8388607, 12(%ebp) - jne ..B1.5 - jmp ..B1.27 -..B1.55: - testl $8388607, 8(%ebp) - jne ..B1.3 - jmp ..B1.26 -..B1.57: - testl $8388607, 8(%ebp) - jne ..B1.46 -..B1.58: - flds 8(%ebp) - cmpl $255, %eax - fmul %st(0), %st - fstps 100(%esp) - jge ..B1.65 -..B1.59: - movzbl 11(%ebp), %eax - testl $128, %eax - je ..B1.61 -..B1.60: - fstp %st(0) - movl $1078530011, %eax - movl %eax, 104(%esp) - movl %eax, 96(%esp) - jmp ..B1.62 -..B1.61: - fstps 104(%esp) -..B1.62: - movzbl 15(%ebp), %eax - testl $128, %eax - je ..B1.64 -..B1.63: - movzbl 107(%esp), %eax - movl %eax, %edx - shrl $7, %eax - andl $127, %edx - notl %eax - shll $7, %eax - orl %eax, %edx - movb %dl, 107(%esp) -..B1.64: - movl 12(%ebp), %eax - movl %eax, 96(%esp) - jmp ..B1.53 -..B1.65: - fstp %st(0) - testl $8388607, 12(%ebp) - jne ..B1.72 -..B1.66: - movzbl 11(%ebp), %eax - testl $128, %eax - je ..B1.68 -..B1.67: - movl $1075235812, %edx - jmp ..B1.69 -..B1.68: - movl $1061752795, %edx -..B1.69: - movzbl 15(%ebp), %eax - testl $128, %eax - movl %edx, 104(%esp) - je ..B1.71 -..B1.70: - shrl $24, %edx - orl $-128, %edx - movb %dl, 107(%esp) -..B1.71: - flds .L_2il0floatpacket.10@GOTOFF(%ebx) - fadds 104(%esp) - fstps 96(%esp) - jmp ..B1.53 -..B1.72: - flds 12(%ebp) - fmul %st(0), %st - fstps 104(%esp) - jmp ..B1.53 -..B1.73: - testl $8388607, 12(%ebp) - je ..B1.45 -..B1.74: - cmpl $255, %edx - jge ..B1.45 -..B1.75: - fstp %st(0) - flds 12(%ebp) - fmul %st(0), %st - fsts 100(%esp) - fstps 104(%esp) - jmp ..B1.53 -..B1.76: - testl $8388607, 8(%ebp) - je ..B1.78 -..B1.77: - cmpl $255, %eax - je ..B1.81 -..B1.97: - testl $8388607, 8(%ebp) -..B1.78: - je ..B1.44 -..B1.79: - cmpl $255, %eax - jge ..B1.44 -..B1.80: - fstp %st(0) - flds 8(%ebp) - fmul %st(0), %st - fsts 100(%esp) - fstps 104(%esp) - jmp ..B1.53 -..B1.81: - testl $8388607, 12(%ebp) - je ..B1.96 -..B1.82: - fstp %st(0) - flds 8(%ebp) - fmul %st(0), %st - fstps 100(%esp) - flds 12(%ebp) - fmul %st(0), %st - fstps 104(%esp) - jmp ..B1.53 -..B1.83: - testl $8388607, 8(%ebp) - je ..B1.28 -..B1.84: - flds 8(%ebp) - fadd %st(0), %st - fstps 8(%ebp) - movzwl 10(%ebp), %edx - andl $32640, %edx - shrl $7, %edx - jmp ..B1.28 -..B1.96: - testl $8388607, 8(%ebp) - jne ..B1.79 - jmp ..B1.44 - .align 16,0x90 - .type cacoshf,@function - .size cacoshf,.-cacoshf - .data -# -- End cacoshf - .section .rodata, "a" - .align 16 - .align 16 -_Bcross: - .long 1882913663 - .long 1071941838 - .type _Bcross,@object - .size _Bcross,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPI: - .long 1413754136 - .long 1074340347 - .type _DBL_PPI,@object - .size _DBL_PPI,8 - .space 8, 0x00 # pad - .align 16 -_Across: - .long 0 - .long 1073217536 - .type _Across,@object - .size _Across,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 4 -.L_2il0floatpacket.7: - .long 0x40490fdb - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,4 - .align 4 -.L_2il0floatpacket.8: - .long 0xbfc90fdb - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,4 - .align 4 -.L_2il0floatpacket.9: - .long 0x3fc90fdb - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,4 - .align 4 -.L_2il0floatpacket.10: - .long 0x00800000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,4 - .align 4 -.L_2il0floatpacket.11: - .long 0x4016cbe4 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,4 - .align 4 -.L_2il0floatpacket.12: - .long 0x3f490fdb - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacoshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacoshl.S deleted file mode 100644 index d293f81ceb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacoshl.S +++ /dev/null @@ -1,459 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacoshl.c" - .text -..TXTST0: -# -- Begin cacoshl - .text - .align 16,0x90 - .globl cacoshl -cacoshl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $308, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl 8(%ebp), %eax - movl %eax, 12(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 268(%esp) - fstpt (%esp) - fldt (%esp) - fstpt 244(%esp) - fldt 244(%esp) - fstpt 256(%esp) -..B1.2: - fnstcw 18(%esp) -..B1.3: - movzwl 18(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.67 -..B1.4: - orl $-64768, %edx - movw %dx, 16(%esp) -..B1.5: - fldcw 16(%esp) -..B1.6: - movl $1, %esi -..B1.7: - movzwl 20(%ebp), %eax - andl $32767, %eax - cmpl $32767, %eax - jge ..B1.16 -..B1.8: - testl %eax, %eax - jle ..B1.46 -..B1.9: - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.16 -..B1.10: - testl %edx, %edx - jle ..B1.44 -..B1.11: - addl $-48, %esp - lea 12(%ebp), %eax - lea 24(%ebp), %edx - lea 264(%esp), %ecx - lea 236(%esp), %edi - movl %eax, (%esp) - lea 208(%esp), %eax - movl %edx, 4(%esp) - lea 180(%esp), %edx - movl %ecx, 8(%esp) - lea 152(%esp), %ecx - movl %edi, 12(%esp) - lea 68(%esp), %edi - movl %eax, 16(%esp) - lea 96(%esp), %eax - movl %edx, 20(%esp) - lea 124(%esp), %edx - movl %ecx, 24(%esp) - movl %edx, 28(%esp) - movl %eax, 32(%esp) - movl %edi, 36(%esp) - call __libm_carctrigprepare_k80 -..B1.70: - lea 96(%esp), %eax - lea 124(%esp), %edx -..B1.12: - lea 12(%ebp), %ecx - movl %ecx, (%esp) - lea 24(%ebp), %ecx - movl %ecx, 4(%esp) - lea 264(%esp), %ecx - movl %ecx, 8(%esp) - lea 236(%esp), %ecx - movl %ecx, 12(%esp) - lea 208(%esp), %ecx - movl %ecx, 16(%esp) - lea 180(%esp), %ecx - movl %ecx, 20(%esp) - lea 152(%esp), %ecx - movl %ecx, 24(%esp) - movl %edx, 28(%esp) - movl %eax, 32(%esp) - movl %edi, 36(%esp) - call __libm_recacoshl_k80 -..B1.71: - lea 96(%esp), %eax - lea 124(%esp), %edx - addl $48, %esp -..B1.13: - fstpt 244(%esp) - addl $-48, %esp - lea 12(%ebp), %ecx - movl %ecx, (%esp) - lea 24(%ebp), %ecx - movl %ecx, 4(%esp) - lea 264(%esp), %ecx - movl %ecx, 8(%esp) - lea 236(%esp), %ecx - movl %ecx, 12(%esp) - lea 208(%esp), %ecx - movl %ecx, 16(%esp) - lea 180(%esp), %ecx - movl %ecx, 20(%esp) - lea 152(%esp), %ecx - movl %ecx, 24(%esp) - movl %edx, 28(%esp) - movl %eax, 32(%esp) - movl %edi, 36(%esp) - call __libm_recacosl_k80 -..B1.72: - addl $48, %esp -..B1.14: - movzbl 33(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl ones@GOTOFF(%ebx,%eax,8) - fmulp %st, %st(1) - fstpt 256(%esp) - jmp ..B1.40 -..B1.16: - movl 28(%ebp), %ecx -..B1.17: - testl %ecx, %ecx - jne ..B1.27 -..B1.81: - cmpl $0, 24(%ebp) -..B1.18: - jne ..B1.27 -..B1.19: - cmpl $32767, %eax - jl ..B1.22 -..B1.20: - movl 16(%ebp), %edi - cmpl $-2147483648, %edi - jne ..B1.28 -..B1.21: - cmpl $0, 12(%ebp) - jne ..B1.34 -..B1.22: - cmpl $16383, %eax - jl ..B1.24 -..B1.23: - fldt 12(%ebp) - movzbl 21(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl ones@GOTOFF(%ebx,%eax,8) - fstl (%esp) - addl $-16, %esp - fmulp %st, %st(1) - fstpt (%esp) - call acoshl@PLT -..B1.74: - addl $16, %esp - fstpt 244(%esp) - addl $-16, %esp - fldl 16(%esp) - fstpt (%esp) - call acosl@PLT - jmp ..B1.75 -..B1.24: - fldt (%esp) - fstpt 244(%esp) - addl $-16, %esp - fldt 12(%ebp) - fstpt (%esp) - call acosl@PLT -..B1.75: - addl $16, %esp - lea 256(%esp), %edx -..B1.25: - movzbl 33(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fmull ones@GOTOFF(%ebx,%eax,8) - fstpt (%edx) - jmp ..B1.40 -..B1.27: - movl 16(%ebp), %edi -..B1.28: - testl %edi, %edi - jne ..B1.34 -..B1.29: - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $0, 12(%ebp) - jne ..B1.35 -..B1.30: - cmpl $32767, %edx - jl ..B1.33 -..B1.31: - cmpl $-2147483648, %ecx - jne ..B1.35 -..B1.32: - cmpl $0, 24(%ebp) - jne ..B1.35 -..B1.33: - fldt 24(%ebp) - movzbl 33(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fstpt (%esp) - fldt (%esp) - addl $-16, %esp - fldl ones@GOTOFF(%ebx,%eax,8) - fmulp %st, %st(1) - fstpt (%esp) - call asinhl@PLT -..B1.77: - fldt 12(%ebp) - addl $16, %esp - fxch %st(1) - fstpt 244(%esp) - addl $-32, %esp - fldt 32(%esp) - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT - jmp ..B1.78 -..B1.34: - movzwl 32(%ebp), %edx - andl $32767, %edx -..B1.35: - cmpl $32767, %eax - je ..B1.57 -..B1.36: - cmpl $32767, %edx - je ..B1.53 -..B1.80: - cmpl $32767, %eax -..B1.37: - je ..B1.50 -..B1.38: - fldt 24(%ebp) - fld %st(0) - fmul %st(1), %st - fstpt 244(%esp) - fldt 12(%ebp) - fxch %st(1) -..B1.39: - addl $-32, %esp - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT -..B1.78: - addl $32, %esp - fstpt 256(%esp) -..B1.40: - testl %esi, %esi - je ..B1.42 -..B1.41: - fldcw 18(%esp) -..B1.42: - movl 12(%esp), %eax - movl 244(%esp), %edx - movl 248(%esp), %ecx - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl 252(%esp), %esi - movl 256(%esp), %edi - movl 260(%esp), %edx - movl 264(%esp), %ecx - movl %esi, 8(%eax) - movl %edi, 12(%eax) - movl %edx, 16(%eax) - movl %ecx, 20(%eax) - movl 268(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.49 -..B1.43: - movl 12(%esp), %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.44: - movl 28(%ebp), %ecx - testl %ecx, %ecx - jne ..B1.11 -..B1.45: - cmpl $0, 24(%ebp) - jne ..B1.11 - jmp ..B1.18 -..B1.46: - cmpl $0, 16(%ebp) - jne ..B1.9 -..B1.47: - cmpl $0, 12(%ebp) - jne ..B1.9 - jmp ..B1.16 -..B1.49: - call __stack_chk_fail@PLT -..B1.50: - cmpl $-2147483648, %edi - jne ..B1.38 -..B1.51: - cmpl $0, 12(%ebp) - jne ..B1.38 -..B1.52: - fldt 12(%ebp) - fld %st(0) - fmul %st(1), %st - fstpt 244(%esp) - fldt 24(%ebp) - jmp ..B1.39 -..B1.53: - cmpl $-2147483648, %ecx - jne ..B1.55 -..B1.54: - cmpl $0, 24(%ebp) - je ..B1.79 -..B1.55: - cmpl $32767, %eax - jge ..B1.37 -..B1.56: - fldt 24(%ebp) - fmul %st(0), %st - fstpt 244(%esp) - fldt 244(%esp) - fstpt 256(%esp) - jmp ..B1.40 -..B1.57: - cmpl $-2147483648, %edi - jne ..B1.59 -..B1.58: - cmpl $0, 12(%ebp) - je ..B1.61 -..B1.59: - cmpl $32767, %edx - je ..B1.64 -..B1.60: - cmpl $-2147483648, %edi - jne ..B1.62 -..B1.82: - cmpl $0, 12(%ebp) -..B1.61: - je ..B1.36 -..B1.62: - cmpl $32767, %edx - jge ..B1.36 -..B1.63: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 244(%esp) - fldt 244(%esp) - fstpt 256(%esp) - jmp ..B1.40 -..B1.64: - cmpl $-2147483648, %ecx - jne ..B1.66 -..B1.65: - cmpl $0, 24(%ebp) - je ..B1.60 -..B1.66: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 244(%esp) - fldt 24(%ebp) - fmul %st(0), %st - fstpt 256(%esp) - jmp ..B1.40 -..B1.67: - xorl %esi, %esi - jmp ..B1.7 -..B1.79: - cmpl $32767, %eax - je ..B1.50 - jmp ..B1.38 - .align 16,0x90 - .type cacoshl,@function - .size cacoshl,.-cacoshl - .data -# -- End cacoshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .hidden __libm_recacosl_k80 - .hidden __libm_recacoshl_k80 - .hidden __libm_carctrigprepare_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosl.S deleted file mode 100644 index 7797c091c0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cacosl.S +++ /dev/null @@ -1,455 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacosl.c" - .text -..TXTST0: -# -- Begin cacosl - .text - .align 16,0x90 - .globl cacosl -cacosl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $308, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 272(%esp) - fstpt 8(%esp) - fldt 8(%esp) - fstpt 248(%esp) - fldt 248(%esp) - fstpt 260(%esp) -..B1.2: - fnstcw 22(%esp) -..B1.3: - movzwl 22(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.62 -..B1.4: - orl $-64768, %ecx - movw %cx, 20(%esp) -..B1.5: - fldcw 20(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 20(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - jge ..B1.16 -..B1.8: - testl %ecx, %ecx - jle ..B1.41 -..B1.9: - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.16 -..B1.10: - testl %edx, %edx - jle ..B1.38 -..B1.11: - addl $-48, %esp - lea 12(%ebp), %edx - lea 24(%ebp), %ecx - movl %edx, (%esp) - lea 268(%esp), %edx - movl %ecx, 4(%esp) - lea 100(%esp), %ecx - movl %edx, 8(%esp) - lea 240(%esp), %edx - movl %edx, 12(%esp) - lea 212(%esp), %edx - movl %edx, 16(%esp) - lea 184(%esp), %edx - movl %edx, 20(%esp) - lea 156(%esp), %edx - movl %edx, 24(%esp) - lea 128(%esp), %edx - movl %edx, 28(%esp) - lea 72(%esp), %edx - movl %ecx, 32(%esp) - movl %edx, 36(%esp) - call __libm_carctrigprepare_k80 -..B1.65: - lea 72(%esp), %edx - lea 100(%esp), %ecx -..B1.12: - lea 12(%ebp), %eax - movl %eax, (%esp) - lea 24(%ebp), %eax - movl %eax, 4(%esp) - lea 268(%esp), %eax - movl %eax, 8(%esp) - lea 240(%esp), %eax - movl %eax, 12(%esp) - lea 212(%esp), %eax - movl %eax, 16(%esp) - lea 184(%esp), %eax - movl %eax, 20(%esp) - lea 156(%esp), %eax - movl %eax, 24(%esp) - lea 128(%esp), %eax - movl %eax, 28(%esp) - movl %ecx, 32(%esp) - movl %edx, 36(%esp) - call __libm_recacosl_k80 -..B1.66: - lea 72(%esp), %edx - lea 100(%esp), %ecx - addl $48, %esp -..B1.13: - fstpt 248(%esp) - addl $-48, %esp - lea 12(%ebp), %eax - movl %eax, (%esp) - lea 24(%ebp), %eax - movl %eax, 4(%esp) - lea 268(%esp), %eax - movl %eax, 8(%esp) - lea 240(%esp), %eax - movl %eax, 12(%esp) - lea 212(%esp), %eax - movl %eax, 16(%esp) - lea 184(%esp), %eax - movl %eax, 20(%esp) - lea 156(%esp), %eax - movl %eax, 24(%esp) - lea 128(%esp), %eax - movl %eax, 28(%esp) - movl %ecx, 32(%esp) - movl %edx, 36(%esp) - call __libm_recacoshl_k80 -..B1.67: - addl $48, %esp -..B1.14: - movzbl 33(%ebp), %edx - andl $128, %edx - shrl $7, %edx - xorl $1, %edx - fldl ones@GOTOFF(%ebx,%edx,8) - fmulp %st, %st(1) - fstpt 260(%esp) - jmp ..B1.34 -..B1.16: - movl 16(%ebp), %eax -..B1.17: - testl %eax, %eax - jne ..B1.20 -..B1.77: - cmpl $0, 12(%ebp) -..B1.18: - jne ..B1.20 -..B1.19: - addl $-16, %esp - fldt 24(%esp) - fstpt (%esp) - call acosl@PLT -..B1.69: - fldt 24(%ebp) - addl $16, %esp - fxch %st(1) - fstpt 248(%esp) - addl $-16, %esp - fstpt (%esp) - call asinhl@PLT -..B1.68: - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fstpt 260(%esp) - jmp ..B1.34 -..B1.20: - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.58 -..B1.75: - cmpl $32767, %ecx -..B1.21: - je ..B1.47 -..B1.22: - movl 28(%ebp), %eax -..B1.23: - cmpl $32767, %edx - je ..B1.44 -..B1.24: - testl %eax, %eax - jne ..B1.30 -..B1.25: - cmpl $0, 24(%ebp) - jne ..B1.30 -..B1.26: - fldt 12(%ebp) - cmpl $16383, %ecx - jl ..B1.28 -..B1.27: - movzbl 21(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl ones@GOTOFF(%ebx,%edx,8) - fstl (%esp) - addl $-16, %esp - fmulp %st, %st(1) - fstpt (%esp) - call acoshl@PLT -..B1.71: - fstpt 24(%esp) - fldl 16(%esp) - fstpt (%esp) - call acosl@PLT - jmp ..B1.72 -..B1.28: - addl $-16, %esp - fstpt (%esp) - call acosl@PLT -..B1.72: - addl $16, %esp - fstpt 248(%esp) -..B1.29: - fldt 8(%esp) - movzbl 33(%ebp), %edx - andl $128, %edx - shrl $7, %edx - xorl $1, %edx - fmull ones@GOTOFF(%ebx,%edx,8) - fstpt 260(%esp) - jmp ..B1.34 -..B1.30: - fldt 24(%ebp) - cmpl $32767, %edx - fldt 12(%ebp) - je ..B1.32 -..B1.31: - fld %st(0) - fmul %st(1), %st - jmp ..B1.33 -..B1.32: - fld %st(1) - fmul %st(2), %st -..B1.33: - movzbl 33(%ebp), %edx - andl $128, %edx - shrl $7, %edx - movl %edx, (%esp) - xorl $1, %edx - fmull ones@GOTOFF(%ebx,%edx,8) - fstpt 260(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT -..B1.73: - addl $32, %esp - movl (%esp), %edx - fmull ones@GOTOFF(%ebx,%edx,8) - fstpt 248(%esp) -..B1.34: - testl %edi, %edi - je ..B1.36 -..B1.35: - fldcw 22(%esp) -..B1.36: - movl 248(%esp), %edx - movl %edx, (%esi) - movl 260(%esp), %edx - movl %edx, 12(%esi) - movl 264(%esp), %edx - movl %edx, 16(%esi) - movl 252(%esp), %ecx - movl 256(%esp), %edi - movl 268(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 272(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.43 -..B1.37: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.38: - cmpl $0, 28(%ebp) - jne ..B1.11 -..B1.39: - cmpl $0, 24(%ebp) - jne ..B1.11 - jmp ..B1.16 -..B1.41: - movl 16(%ebp), %eax - testl %eax, %eax - jne ..B1.9 -..B1.42: - cmpl $0, 12(%ebp) - jne ..B1.9 - jmp ..B1.18 -..B1.43: - call __stack_chk_fail@PLT -..B1.44: - cmpl $-2147483648, %eax - jne ..B1.46 -..B1.78: - cmpl $0, 24(%ebp) -..B1.45: - je ..B1.30 -..B1.46: - fldt 24(%ebp) - fmul %st(0), %st - fstpt 248(%esp) - fldt 12(%ebp) - fmul %st(0), %st - fstpt 260(%esp) - jmp ..B1.34 -..B1.47: - cmpl $-2147483648, %eax - jne ..B1.49 -..B1.48: - cmpl $0, 12(%ebp) - je ..B1.52 -..B1.49: - cmpl $32767, %edx - jge ..B1.51 -..B1.50: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 248(%esp) - fldt 248(%esp) - fstpt 260(%esp) - jmp ..B1.34 -..B1.51: - cmpl $-2147483648, %eax - jne ..B1.53 -..B1.76: - cmpl $0, 12(%ebp) -..B1.52: - je ..B1.22 -..B1.53: - movl 28(%ebp), %eax - cmpl $32767, %edx - jne ..B1.24 -..B1.55: - cmpl $-2147483648, %eax - jne ..B1.57 -..B1.56: - cmpl $0, 24(%ebp) - je ..B1.45 -..B1.57: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 248(%esp) - fldt 24(%ebp) - fmul %st(0), %st - fstpt 260(%esp) - jmp ..B1.34 -..B1.58: - cmpl $-2147483648, 28(%ebp) - jne ..B1.60 -..B1.59: - cmpl $0, 24(%ebp) - je ..B1.74 -..B1.60: - cmpl $32767, %ecx - jge ..B1.21 -..B1.61: - fldt 24(%ebp) - fmul %st(0), %st - fstpt 248(%esp) - fldt 248(%esp) - fstpt 260(%esp) - jmp ..B1.34 -..B1.62: - xorl %edi, %edi - jmp ..B1.7 -..B1.74: - cmpl $32767, %ecx - je ..B1.47 - jmp ..B1.22 - .align 16,0x90 - .type cacosl,@function - .size cacosl,.-cacosl - .data -# -- End cacosl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .hidden __libm_recacosl_k80 - .hidden __libm_recacoshl_k80 - .hidden __libm_carctrigprepare_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/carg.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/carg.S deleted file mode 100644 index 72a7d2fea1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/carg.S +++ /dev/null @@ -1,94 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "carg.c" - .text -..TXTST0: -# -- Begin carg - .text - .align 16,0x90 - .globl carg -carg: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %ebx - subl $28, %esp - movzwl 14(%ebp), %eax - andl $32752, %eax - cmpl $32752, %eax - je ..B1.4 -..B1.2: - fldl 8(%ebp) -..B1.3: - fldl 16(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fxch %st(1) - fstpl 8(%esp) - fstpl (%esp) - call atan2@PLT -..B1.10: - addl $28, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.4: - testl $1048575, 12(%ebp) - jne ..B1.6 -..B1.5: - cmpl $0, 8(%ebp) - je ..B1.2 -..B1.6: - fldl 8(%ebp) - fmul %st(0), %st - fstl 8(%ebp) - jmp ..B1.3 - .align 16,0x90 - .type carg,@function - .size carg,.-carg - .data -# -- End carg - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cargf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cargf.S deleted file mode 100644 index 4ab98a5de0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cargf.S +++ /dev/null @@ -1,71 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cargf.c" - .text -..TXTST0: -# -- Begin cargf - .text - .align 16,0x90 - .globl cargf -cargf: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $24, %esp - flds 36(%esp) - flds 32(%esp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpl 8(%esp) - fstpl (%esp) - call atan2@PLT -..B1.4: - addl $24, %esp - popl %ebx - ret - .align 16,0x90 - .type cargf,@function - .size cargf,.-cargf - .data -# -- End cargf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cargl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cargl.S deleted file mode 100644 index 3a7cfd7852..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cargl.S +++ /dev/null @@ -1,76 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cargl.c" - .text -..TXTST0: -# -- Begin cargl - .text - .align 16,0x90 - .globl cargl -cargl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %ebx - subl $60, %esp - fldt 20(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpt (%esp) - fldt 8(%ebp) - fstpt 12(%esp) - call atan2l@PLT -..B1.4: - addl $60, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type cargl,@function - .size cargl,.-cargl - .data -# -- End cargl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casin.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casin.S deleted file mode 100644 index 182c1ccc76..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casin.S +++ /dev/null @@ -1,237 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casin.c" - .text -..TXTST0: -# -- Begin casin - .text - .align 16,0x90 - .globl casin -casin: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $72, %esp - fldz - fldl 20(%ebp) - fldl 12(%ebp) - movzwl 26(%ebp), %ecx - andl $32752, %ecx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 64(%esp) - cmpl $32752, %ecx - fstpl 56(%esp) - fxch %st(1) - fstl 16(%esp) - fstl 24(%esp) - fstl 32(%esp) - fstpl 40(%esp) - fstpl 48(%esp) - jl ..B1.4 -..B1.2: - testl $1048575, 24(%ebp) - jne ..B1.5 -..B1.3: - cmpl $0, 20(%ebp) - jne ..B1.5 -..B1.4: - movzbl 27(%ebp), %edx - notl %edx - movzbl 55(%esp), %ecx - andl $128, %edx - andl $127, %ecx - orl %edx, %ecx - movb %cl, 55(%esp) -..B1.5: - addl $-32, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea 32(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl 48(%ecx), %ecx - movl %ecx, (%edx) - movl 84(%esp), %ecx - movl %ecx, 4(%edx) - movl 88(%esp), %ecx - movl %ecx, 8(%edx) - movl 92(%esp), %ecx - movl %ecx, 12(%edx) - call casinh@PLT -..B1.14: - addl $28, %esp - fldl (%esp) - movzwl 6(%esp), %edx - andl $32752, %edx - fstl 16(%esp) - cmpl $32752, %edx - fstpl 40(%esp) - fldl 8(%esp) - fstl 24(%esp) - fstpl 32(%esp) - jl ..B1.8 -..B1.6: - testl $1048575, 20(%esp) - jne ..B1.9 -..B1.7: - cmpl $0, 16(%esp) - jne ..B1.9 -..B1.8: - movzbl 23(%esp), %edx - notl %edx - movzbl 47(%esp), %ecx - andl $128, %edx - andl $127, %ecx - orl %edx, %ecx - movb %cl, 47(%esp) -..B1.9: - movl 32(%esp), %edx - movl %edx, (%esi) - movl 40(%esp), %edx - movl %edx, 8(%esi) - movl 36(%esp), %ecx - movl 44(%esp), %edx - movl %ecx, 4(%esi) - movl %edx, 12(%esi) - movl 64(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.11 -..B1.10: - movl %esi, %eax - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.11: - call __stack_chk_fail@PLT - .align 16,0x90 - .type casin,@function - .size casin,.-casin - .data -# -- End casin - .text -# -- Begin casinf - .text - .align 16,0x90 - .globl casinf -casinf: -# parameter 1: 48 + %esp -..B2.1: -..L3: - - pushl %ebx - subl $40, %esp - xorl %eax, %eax - movl %eax, 16(%esp) - movl %eax, 20(%esp) - movl %eax, 24(%esp) - movl %eax, 28(%esp) - movzwl 54(%esp), %eax - andl $32640, %eax - movl 52(%esp), %edx - cmpl $32640, %eax - movl 48(%esp), %ecx - movl %edx, 32(%esp) - movl %ecx, 36(%esp) - jl ..B2.3 -..B2.2: - testl $8388607, 52(%esp) - jne ..B2.4 -..B2.3: - movzbl 55(%esp), %eax - notl %eax - movzbl 35(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 35(%esp) -..B2.4: - addl $8, %esp - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - pushl 28(%esp) - pushl 28(%esp) - call casinhf@PLT -..B2.10: - movl %eax, 16(%esp) - movl %eax, 28(%esp) - shrl $16, %eax - andl $32640, %eax - cmpl $32640, %eax - movl %edx, 20(%esp) - movl %edx, 24(%esp) - jl ..B2.6 -..B2.5: - testl $8388607, 16(%esp) - jne ..B2.7 -..B2.6: - movzbl 19(%esp), %eax - notl %eax - movzbl 31(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 31(%esp) -..B2.7: - movl 24(%esp), %eax - movl 28(%esp), %edx - addl $40, %esp - popl %ebx - ret - .align 16,0x90 - .type casinf,@function - .size casinf,.-casinf - .data -# -- End casinf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinh.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinh.S deleted file mode 100644 index a923b4424a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinh.S +++ /dev/null @@ -1,783 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casinh.c" - .text -..TXTST0: -# -- Begin casinh - .text - .align 16,0x90 - .globl casinh -casinh: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 192(%esp) - fstl 176(%esp) - fstpl 184(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 18(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %ecx - jge ..B1.38 -..B1.4: - testl %ecx, %ecx - jle ..B1.73 -..B1.5: - movzwl 26(%ebp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - jge ..B1.39 -..B1.6: - testl %edx, %edx - jle ..B1.71 -..B1.7: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.70 -..B1.8: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - movl $1, %edi -..B1.11: - fldl 20(%ebp) - fstl 160(%esp) - fabs - fldl 12(%ebp) - fstl 152(%esp) - fabs - fld %st(0) - fmul %st(1), %st - fstpt 104(%esp) - fldt 104(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fld %st(0) - fsubr %st(4), %st - fld %st(0) - fmul %st(1), %st - fadd %st(3), %st - fsqrt - fstpt 88(%esp) - fldt 88(%esp) - fld %st(2) - fadd %st(6), %st - fld %st(0) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(4) - fsqrt - fstpt 120(%esp) - fldt 120(%esp) - fxch %st(1) - fucom %st(2) - fnstsw %ax - faddp %st, %st(1) - fxch %st(1) - fstpt 136(%esp) - sahf - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmul %st, %st(1) - jp ..B1.12 - je ..B1.13 -..B1.12: - fldt 88(%esp) - fldt 136(%esp) - fsubrp %st, %st(1) - fstpt 72(%esp) - jmp ..B1.14 -..B1.13: - fxch %st(4) - fstpt 72(%esp) - fldt 72(%esp) - fxch %st(4) -..B1.14: - fldt _Bcross@GOTOFF(%ebx) - fmul %st(2), %st - fcomp %st(6) - fnstsw %ax - sahf - jb ..B1.16 -..B1.15: - fstp %st(4) - fld %st(4) - addl $-16, %esp - fdiv %st(1), %st - fstpt (%esp) - fxch %st(4) - fstpl 80(%esp) - fxch %st(1) - fstpt 16(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt 48(%esp) - fstpt 64(%esp) - call asinl@PLT -..B1.107: - fldt 64(%esp) - fldt 48(%esp) - fldt 32(%esp) - fldt 16(%esp) - fldl 80(%esp) - addl $16, %esp - fxch %st(5) - fstpl 184(%esp) - jmp ..B1.19 -..B1.16: - fxch %st(2) - fcom %st(5) - fnstsw %ax - sahf - jb ..B1.18 -..B1.17: - fstp %st(4) - addl $-32, %esp - fld %st(2) - fld %st(1) - fadd %st(6), %st - fmul %st(3), %st - fxch %st(6) - fstpt (%esp) - fldt (%esp) - fldt 152(%esp) - faddp %st, %st(2) - fldt 136(%esp) - fdivp %st, %st(2) - fldt 104(%esp) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(6) - fxch %st(5) - fsqrt - fstpt 12(%esp) - fxch %st(4) - fstpl 96(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt 48(%esp) - fstpt 64(%esp) - fstpt 80(%esp) - call atan2l@PLT - jmp ..B1.109 -..B1.18: - fxch %st(1) - fstpt 48(%esp) - fldt 48(%esp) - fxch %st(3) - fstpt (%esp) - fldt (%esp) - addl $-32, %esp - fxch %st(3) - fadd %st(5), %st - fxch %st(5) - fstpt (%esp) - fldt (%esp) - fldt 152(%esp) - faddp %st, %st(4) - fxch %st(3) - fdivr %st(5), %st - fldt 168(%esp) - fldt 120(%esp) - faddp %st, %st(1) - fdivrp %st, %st(6) - faddp %st, %st(5) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - fsqrt - fmulp %st, %st(3) - fxch %st(2) - fstpt 12(%esp) - fstpl 96(%esp) - fxch %st(1) - fstpt 48(%esp) - fstpt 64(%esp) - fldt 32(%esp) - fstpt 32(%esp) - fldt 80(%esp) - fstpt 80(%esp) - call atan2l@PLT -..B1.109: - fldt 80(%esp) - fldt 64(%esp) - fldt 48(%esp) - fldt 32(%esp) - fldl 96(%esp) - addl $32, %esp - fxch %st(5) - fstpl 184(%esp) -..B1.19: - fldt _Across@GOTOFF(%ebx) - fcomp %st(4) - fnstsw %ax - sahf - jb ..B1.24 -..B1.20: - fldt 120(%esp) - faddp %st, %st(1) - fxch %st(4) - fcomp %st(2) - fnstsw %ax - fldt 104(%esp) - fdivp %st, %st(4) - sahf - jae ..B1.22 - jp ..B1.22 -..B1.21: - fldt 72(%esp) - fldt 104(%esp) - fdivp %st, %st(1) - faddp %st, %st(4) - fmulp %st, %st(3) - jmp ..B1.23 -..B1.22: - fldt 88(%esp) - fldt 136(%esp) - faddp %st, %st(1) - faddp %st, %st(4) - fmulp %st, %st(3) -..B1.23: - addl $-16, %esp - faddp %st, %st(1) - fmul %st(1), %st - fsqrt - faddp %st, %st(1) - fstpt (%esp) - call log1pl@PLT - jmp ..B1.111 -..B1.24: - fstp %st(0) - fstp %st(0) - fstp %st(2) - fld %st(0) - addl $-16, %esp - fmul %st(1), %st - fsubp %st, %st(2) - fxch %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%esp) - call logl@PLT -..B1.111: - addl $16, %esp - fstpl 176(%esp) -..B1.25: - fldl _DBL_PZERO@GOTOFF(%ebx) - fcoml 160(%esp) - fnstsw %ax - sahf - jbe ..B1.27 -..B1.26: - movzbl 191(%esp), %ecx - movl %ecx, %edx - shrl $7, %ecx - andl $127, %edx - notl %ecx - shll $7, %ecx - orl %ecx, %edx - movb %dl, 191(%esp) -..B1.27: - fcompl 152(%esp) - fnstsw %ax - sahf - jbe ..B1.29 -..B1.28: - movzbl 183(%esp), %ecx - movl %ecx, %edx - shrl $7, %ecx - andl $127, %edx - notl %ecx - shll $7, %ecx - orl %ecx, %edx - movb %dl, 183(%esp) -..B1.29: - movzwl 182(%esp), %edx - testl $32752, %edx - jne ..B1.32 -..B1.30: - testl $1048575, 180(%esp) - jne ..B1.35 -..B1.31: - cmpl $0, 176(%esp) - jne ..B1.35 -..B1.32: - movzwl 190(%esp), %edx - testl $32752, %edx - jne ..B1.36 -..B1.33: - testl $1048575, 188(%esp) - jne ..B1.35 -..B1.34: - cmpl $0, 184(%esp) - je ..B1.36 -..B1.35: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 168(%esp) -..B1.36: - testl %edi, %edi - je ..B1.68 -..B1.37: - fldcw 14(%esp) - jmp ..B1.68 -..B1.38: - movzwl 26(%ebp), %edx - andl $32752, %edx - shrl $4, %edx -..B1.39: - testl %edx, %edx - jne ..B1.43 -..B1.40: - testl $1048575, 24(%ebp) - jne ..B1.43 -..B1.41: - cmpl $0, 20(%ebp) - jne ..B1.43 -..B1.42: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call asinh@PLT -..B1.112: - fldl 20(%ebp) - addl $16, %esp - fstpl 184(%esp) - fstpl 176(%esp) - jmp ..B1.68 -..B1.43: - testl %ecx, %ecx - jne ..B1.56 -..B1.44: - testl $1048575, 16(%ebp) - jne ..B1.57 -..B1.45: - cmpl $0, 12(%ebp) - jne ..B1.57 -..B1.46: - cmpl $2047, %edx - jl ..B1.49 -..B1.47: - testl $1048575, 24(%ebp) - jne ..B1.57 -..B1.48: - cmpl $0, 20(%ebp) - jne ..B1.57 -..B1.49: - cmpl $1023, %edx - jl ..B1.54 -..B1.50: - fldl 20(%ebp) - movzbl 27(%ebp), %edx - andl $128, %edx - shrl $7, %edx - movl %edx, (%esp) - addl $-16, %esp - fmull ones@GOTOFF(%ebx,%edx,8) - fstpl (%esp) - call acosh@PLT -..B1.113: - addl $16, %esp - fstpl 176(%esp) - cmpl $0, (%esp) - je ..B1.52 -..B1.51: - fldl _DBL_NPIBY2@GOTOFF(%ebx) - jmp ..B1.53 -..B1.52: - fldl _DBL_PPIBY2@GOTOFF(%ebx) -..B1.53: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fadd %st(1), %st - fstpl 168(%esp) - fstpl 184(%esp) - fldl 176(%esp) - jmp ..B1.55 -..B1.54: - fldl _DBL_PZERO@GOTOFF(%ebx) - addl $-16, %esp - fldl 20(%ebp) - fstpl (%esp) - fstpl 16(%esp) - call asin@PLT -..B1.114: - fldl 16(%esp) - addl $16, %esp - fxch %st(1) - fstpl 184(%esp) -..B1.55: - movzbl 19(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fmull ones@GOTOFF(%ebx,%edx,8) - fstpl 176(%esp) - jmp ..B1.68 -..B1.56: - cmpl $2047, %ecx - je ..B1.95 -..B1.57: - cmpl $2047, %edx - je ..B1.91 -..B1.118: - cmpl $2047, %ecx -..B1.58: - je ..B1.77 -..B1.59: - jge ..B1.67 -..B1.60: - movzbl 27(%ebp), %edx - testl $128, %edx - je ..B1.62 -..B1.61: - fldl _DBL_NPIBY2@GOTOFF(%ebx) - jmp ..B1.63 -..B1.62: - fldl _DBL_PPIBY2@GOTOFF(%ebx) -..B1.63: - movzbl 19(%ebp), %edx - testl $128, %edx - fstl 184(%esp) - je ..B1.65 -..B1.64: - fldl _DBL_NINF@GOTOFF(%ebx) - jmp ..B1.66 -..B1.65: - fldl _DBL_PINF@GOTOFF(%ebx) -..B1.66: - fstpl 176(%esp) - fldl _DBL_PZERO@GOTOFF(%ebx) - fxch %st(1) - faddl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fstpl 168(%esp) - faddl 12(%ebp) - fstpl 168(%esp) - jmp ..B1.68 -..B1.67: - fldl 20(%ebp) - fstpl 176(%esp) - fldl 12(%ebp) - fmul %st(0), %st - fstpl 184(%esp) -..B1.68: - movl 176(%esp), %edx - movl %edx, (%esi) - movl 180(%esp), %ecx - movl 184(%esp), %edi - movl 188(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 12(%esi) - movl 192(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.76 -..B1.69: - movl %esi, %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.70: - xorl %edi, %edi - jmp ..B1.11 -..B1.71: - testl $1048575, 24(%ebp) - jne ..B1.7 -..B1.72: - cmpl $0, 20(%ebp) - jne ..B1.7 - jmp ..B1.39 -..B1.73: - testl $1048575, 16(%ebp) - jne ..B1.5 -..B1.74: - cmpl $0, 12(%ebp) - jne ..B1.5 - jmp ..B1.38 -..B1.76: - call __stack_chk_fail@PLT -..B1.77: - testl $1048575, 16(%ebp) - jne ..B1.116 -..B1.78: - cmpl $0, 12(%ebp) - jne ..B1.116 -..B1.79: - fldl 12(%ebp) - cmpl $2047, %edx - fstpl 176(%esp) - jge ..B1.84 -..B1.80: - movzbl 27(%ebp), %edx - testl $128, %edx - je ..B1.82 -..B1.81: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 184(%esp) - fldl _DBL_PZERO@GOTOFF(%ebx) - jmp ..B1.83 -..B1.82: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstl 184(%esp) -..B1.83: - faddl 20(%ebp) - fstpl 168(%esp) - jmp ..B1.68 -..B1.84: - testl $1048575, 24(%ebp) - jne ..B1.90 -..B1.85: - cmpl $0, 20(%ebp) - jne ..B1.90 -..B1.86: - movzbl 27(%ebp), %edx - testl $128, %edx - je ..B1.88 -..B1.87: - fldl _DBL_NPIBY4@GOTOFF(%ebx) - jmp ..B1.89 -..B1.88: - fldl _DBL_PPIBY4@GOTOFF(%ebx) -..B1.89: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fadd %st(1), %st - fstpl 168(%esp) - fstpl 184(%esp) - jmp ..B1.68 -..B1.90: - fldl 20(%ebp) - fmul %st(0), %st - fstpl 184(%esp) - jmp ..B1.68 -..B1.91: - testl $1048575, 24(%ebp) - jne ..B1.93 -..B1.92: - cmpl $0, 20(%ebp) - je ..B1.115 -..B1.93: - cmpl $2047, %ecx - jge ..B1.58 -..B1.94: - fldl 20(%ebp) - fmul %st(0), %st - fstl 176(%esp) - fstpl 184(%esp) - jmp ..B1.68 -..B1.95: - testl $1048575, 16(%ebp) - jne ..B1.97 -..B1.96: - cmpl $0, 12(%ebp) - je ..B1.98 -..B1.97: - cmpl $2047, %edx - je ..B1.102 -..B1.98: - testl $1048575, 16(%ebp) - jne ..B1.100 -..B1.99: - cmpl $0, 12(%ebp) - je ..B1.57 -..B1.100: - cmpl $2047, %edx - jge ..B1.57 -..B1.101: - fldl 12(%ebp) - fmul %st(0), %st - fstl 176(%esp) - fstpl 184(%esp) - jmp ..B1.68 -..B1.102: - testl $1048575, 24(%ebp) - jne ..B1.104 -..B1.103: - cmpl $0, 20(%ebp) - je ..B1.98 -..B1.104: - fldl 12(%ebp) - fmul %st(0), %st - fstpl 176(%esp) - fldl 20(%ebp) - fmul %st(0), %st - fstpl 184(%esp) - jmp ..B1.68 -..B1.115: - cmpl $2047, %ecx - je ..B1.77 - jmp ..B1.59 -..B1.116: - cmpl $2047, %ecx - jl ..B1.60 - jmp ..B1.67 - .align 16,0x90 - .type casinh,@function - .size casinh,.-casinh - .data -# -- End casinh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -_Bcross: - .word 26214 - .word 26214 - .word 26214 - .word -6554 - .word 16382 - .word 0 - .type _Bcross,@object - .size _Bcross,12 - .space 4, 0x00 # pad - .align 16 -_Across: - .word 0 - .word 0 - .word 0 - .word -16384 - .word 16383 - .word 0 - .type _Across,@object - .size _Across,12 - .space 4, 0x00 # pad - .align 16 -_DBL_PZERO: - .long 0 - .long 0 - .type _DBL_PZERO,@object - .size _DBL_PZERO,8 - .space 8, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 16 -_DBL_NPIBY2: - .long 1413754136 - .long -1074191877 - .type _DBL_NPIBY2,@object - .size _DBL_NPIBY2,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPIBY2: - .long 1413754136 - .long 1073291771 - .type _DBL_PPIBY2,@object - .size _DBL_PPIBY2,8 - .space 8, 0x00 # pad - .align 16 -_DBL_NINF: - .long 0 - .long -1048576 - .type _DBL_NINF,@object - .size _DBL_NINF,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PINF: - .long 0 - .long 2146435072 - .type _DBL_PINF,@object - .size _DBL_PINF,8 - .space 8, 0x00 # pad - .align 16 -_DBL_NZERO: - .long 0 - .long -2147483648 - .type _DBL_NZERO,@object - .size _DBL_NZERO,8 - .space 8, 0x00 # pad - .align 16 -_DBL_NPIBY4: - .long 1413754136 - .long -1075240453 - .type _DBL_NPIBY4,@object - .size _DBL_NPIBY4,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPIBY4: - .long 1413754136 - .long 1072243195 - .type _DBL_PPIBY4,@object - .size _DBL_PPIBY4,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinhf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinhf.S deleted file mode 100644 index de937f356e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinhf.S +++ /dev/null @@ -1,630 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casinhf.c" - .text -..TXTST0: -# -- Begin casinhf - .text - .align 16,0x90 - .globl casinhf -casinhf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %edi - pushl %ebx - subl $120, %esp - fldz - movzwl 10(%ebp), %eax - andl $32640, %eax - shrl $7, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $255, %eax - fsts 104(%esp) - fsts 108(%esp) - jge ..B1.28 -..B1.2: - testl %eax, %eax - jle ..B1.57 -..B1.3: - movzwl 14(%ebp), %edx - andl $32640, %edx - shrl $7, %edx - cmpl $255, %edx - jge ..B1.29 -..B1.4: - testl %edx, %edx - jle ..B1.56 -..B1.5: - flds 12(%ebp) - fsts 100(%esp) - fld1 - fsts 92(%esp) - fxch %st(1) - fabs - fld %st(0) - fsub %st(2), %st - fld %st(0) - fmul %st(1), %st - fld %st(2) - faddp %st, %st(4) - fxch %st(3) - fstl 48(%esp) - fmul %st(0), %st - fxch %st(1) - fstl 72(%esp) - flds 8(%ebp) - fsts 96(%esp) - fabs - fld %st(0) - fmul %st(1), %st - fstl 56(%esp) - fadd %st, %st(5) - fxch %st(5) - fsqrt - fstl 64(%esp) - fxch %st(5) - faddp %st, %st(3) - fxch %st(2) - fsqrt - fld %st(0) - fadd %st(5), %st - fxch %st(5) - fucomp %st(2) - fnstsw %ax - fxch %st(1) - fstp %st(0) - fldl .L_2il0floatpacket.6@GOTOFF(%ebx) - fmul %st, %st(4) - sahf - jp ..B1.6 - je ..B1.7 -..B1.6: - fldl 64(%esp) - fsubl 72(%esp) - fstpl 40(%esp) - jmp ..B1.8 -..B1.7: - fxch %st(2) - fstl 40(%esp) - fxch %st(2) -..B1.8: - fldl _Bcross@GOTOFF(%ebx) - fmul %st(5), %st - fcomp %st(4) - fnstsw %ax - sahf - jb ..B1.10 -..B1.9: - fstp %st(2) - fld %st(2) - fdiv %st(4), %st - fstpl (%esp) - fxch %st(2) - fstps 80(%esp) - fxch %st(1) - fstpl 16(%esp) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - call asin@PLT - jmp ..B1.85 -..B1.10: - flds 92(%esp) - fcomp %st(4) - fnstsw %ax - sahf - jb ..B1.12 -..B1.11: - fstp %st(2) - fldl 48(%esp) - fadd %st(1), %st - fld %st(4) - fadd %st(4), %st - fmul %st(3), %st - fxch %st(1) - fdivrl 56(%esp) - faddl 40(%esp) - fmulp %st, %st(1) - fsqrt - fstpl 8(%esp) - fxch %st(2) - fstl (%esp) - fstps 80(%esp) - fxch %st(1) - fstpl 16(%esp) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - call atan2@PLT - jmp ..B1.85 -..B1.12: - fldl 48(%esp) - fadd %st(2), %st - fxch %st(2) - fstpl 16(%esp) - fld %st(4) - fadd %st(4), %st - fdiv %st, %st(2) - fldl 72(%esp) - faddl 64(%esp) - fdivrp %st, %st(1) - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fsqrt - fmulp %st, %st(2) - fxch %st(1) - fstpl 8(%esp) - fxch %st(1) - fstl (%esp) - fstps 80(%esp) - fstpl 24(%esp) - fstpl 32(%esp) - fstps 84(%esp) - fldl 16(%esp) - fstpl 16(%esp) - call atan2@PLT -..B1.85: - flds 84(%esp) - fxch %st(1) - fstps 108(%esp) - fldl 32(%esp) - fldl 24(%esp) - fldl 16(%esp) - flds 80(%esp) -..B1.13: - fldl _Across@GOTOFF(%ebx) - fcomp %st(4) - fnstsw %ax - sahf - jb ..B1.18 -..B1.14: - flds 92(%esp) - fcompp - fnstsw %ax - faddl 48(%esp) - fdivrl 56(%esp) - sahf - jbe ..B1.16 -..B1.15: - fldl 56(%esp) - fdivl 40(%esp) - faddp %st, %st(1) - fmulp %st, %st(1) - jmp ..B1.17 -..B1.16: - fldl 72(%esp) - faddl 64(%esp) - faddp %st, %st(1) - fmulp %st, %st(1) -..B1.17: - fxch %st(1) - fadds 92(%esp) - fmul %st(1), %st - fsqrt - faddp %st, %st(1) - fstpl (%esp) - fstps 84(%esp) - call log1p@PLT - jmp ..B1.87 -..B1.18: - fstp %st(1) - fstp %st(1) - fstp %st(0) - fld %st(0) - fmul %st(1), %st - fsubs 92(%esp) - fsqrt - faddp %st, %st(1) - fstpl (%esp) - fstps 84(%esp) - call log@PLT -..B1.87: - flds 84(%esp) - fxch %st(1) - fstps 104(%esp) -..B1.19: - fcoms 100(%esp) - fnstsw %ax - sahf - jbe ..B1.21 -..B1.20: - movzbl 111(%esp), %edi - movl %edi, %eax - shrl $7, %edi - andl $127, %eax - notl %edi - shll $7, %edi - orl %edi, %eax - movb %al, 111(%esp) -..B1.21: - fcomps 96(%esp) - fnstsw %ax - sahf - jbe ..B1.23 -..B1.22: - movzbl 107(%esp), %edi - movl %edi, %eax - shrl $7, %edi - andl $127, %eax - notl %edi - shll $7, %edi - orl %edi, %eax - movb %al, 107(%esp) -..B1.23: - movzwl 106(%esp), %eax - testl $32640, %eax - jne ..B1.25 -..B1.24: - testl $8388607, 104(%esp) - jne ..B1.27 -..B1.25: - movzwl 110(%esp), %eax - testl $32640, %eax - jne ..B1.55 -..B1.26: - testl $8388607, 108(%esp) - je ..B1.55 -..B1.27: - flds .L_2il0floatpacket.9@GOTOFF(%ebx) - fmul %st(0), %st - fstps 88(%esp) - jmp ..B1.55 -..B1.28: - movzwl 14(%ebp), %edx - andl $32640, %edx - shrl $7, %edx -..B1.29: - testl %edx, %edx - jne ..B1.32 -..B1.30: - testl $8388607, 12(%ebp) - jne ..B1.32 -..B1.31: - fstp %st(0) - addl $4, %esp - pushl 8(%ebp) - call asinhf@PLT -..B1.88: - movl 12(%ebp), %eax - fstps 104(%esp) - movl %eax, 108(%esp) - jmp ..B1.55 -..B1.32: - testl %eax, %eax - jne ..B1.43 -..B1.33: - testl $8388607, 8(%ebp) - jne ..B1.44 -..B1.34: - cmpl $255, %edx - jl ..B1.36 -..B1.35: - testl $8388607, 12(%ebp) - jne ..B1.44 -..B1.36: - cmpl $127, %edx - jl ..B1.41 -..B1.37: - fstp %st(0) - flds 12(%ebp) - movzbl 15(%ebp), %edi - andl $128, %edi - shrl $7, %edi - fmuls ones@GOTOFF(%ebx,%edi,4) - fstps (%esp) - call acoshf@PLT -..B1.89: - fstps 104(%esp) - testl %edi, %edi - je ..B1.39 -..B1.38: - flds .L_2il0floatpacket.7@GOTOFF(%ebx) - jmp ..B1.40 -..B1.39: - flds .L_2il0floatpacket.8@GOTOFF(%ebx) -..B1.40: - flds .L_2il0floatpacket.9@GOTOFF(%ebx) - fadd %st(1), %st - fstps 88(%esp) - fstps 108(%esp) - flds 104(%esp) - jmp ..B1.42 -..B1.41: - movl 12(%ebp), %eax - movl %eax, (%esp) - fstps 84(%esp) - call asinf@PLT -..B1.90: - flds 84(%esp) - fxch %st(1) - fstps 108(%esp) -..B1.42: - movzbl 11(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fmuls ones@GOTOFF(%ebx,%eax,4) - fstps 104(%esp) - jmp ..B1.55 -..B1.43: - cmpl $255, %eax - je ..B1.74 -..B1.44: - cmpl $255, %edx - je ..B1.71 -..B1.93: - cmpl $255, %eax -..B1.45: - je ..B1.59 -..B1.96: - fstp %st(0) -..B1.46: - jge ..B1.54 -..B1.47: - movzbl 15(%ebp), %eax - testl $128, %eax - je ..B1.49 -..B1.48: - flds .L_2il0floatpacket.7@GOTOFF(%ebx) - jmp ..B1.50 -..B1.49: - flds .L_2il0floatpacket.8@GOTOFF(%ebx) -..B1.50: - movzbl 11(%ebp), %eax - testl $128, %eax - fsts 108(%esp) - je ..B1.52 -..B1.51: - movl $-8388608, %eax - jmp ..B1.53 -..B1.52: - movl $2139095040, %eax -..B1.53: - movl %eax, 104(%esp) - movl 8(%ebp), %eax - fadds .L_2il0floatpacket.9@GOTOFF(%ebx) - fstps 88(%esp) - movl %eax, 88(%esp) - jmp ..B1.55 -..B1.54: - flds 8(%ebp) - fmul %st(0), %st - movl 12(%ebp), %eax - movl %eax, 104(%esp) - fstps 108(%esp) -..B1.55: - movl 104(%esp), %eax - movl 108(%esp), %edx - addl $120, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.56: - testl $8388607, 12(%ebp) - jne ..B1.5 - jmp ..B1.29 -..B1.57: - testl $8388607, 8(%ebp) - jne ..B1.3 - jmp ..B1.28 -..B1.59: - testl $8388607, 8(%ebp) - jne ..B1.92 -..B1.60: - movl 8(%ebp), %eax - cmpl $255, %edx - movl %eax, 104(%esp) - jge ..B1.65 -..B1.61: - movzbl 15(%ebp), %eax - testl $128, %eax - je ..B1.64 -..B1.62: - fstp %st(0) - flds .L_2il0floatpacket.10@GOTOFF(%ebx) -..B1.64: - movl 12(%ebp), %eax - fstps 108(%esp) - movl %eax, 88(%esp) - jmp ..B1.55 -..B1.65: - fstp %st(0) - testl $8388607, 12(%ebp) - jne ..B1.70 -..B1.66: - movzbl 15(%ebp), %eax - testl $128, %eax - je ..B1.68 -..B1.67: - flds .L_2il0floatpacket.11@GOTOFF(%ebx) - jmp ..B1.69 -..B1.68: - flds .L_2il0floatpacket.12@GOTOFF(%ebx) -..B1.69: - flds .L_2il0floatpacket.9@GOTOFF(%ebx) - fadd %st(1), %st - fstps 88(%esp) - fstps 108(%esp) - jmp ..B1.55 -..B1.70: - flds 12(%ebp) - fmul %st(0), %st - fstps 108(%esp) - jmp ..B1.55 -..B1.71: - testl $8388607, 12(%ebp) - je ..B1.91 -..B1.72: - cmpl $255, %eax - jge ..B1.45 -..B1.73: - fstp %st(0) - flds 12(%ebp) - fmul %st(0), %st - fsts 104(%esp) - fstps 108(%esp) - jmp ..B1.55 -..B1.74: - testl $8388607, 8(%ebp) - je ..B1.76 -..B1.75: - cmpl $255, %edx - je ..B1.79 -..B1.95: - testl $8388607, 8(%ebp) -..B1.76: - je ..B1.44 -..B1.77: - cmpl $255, %edx - jge ..B1.44 -..B1.78: - fstp %st(0) - flds 8(%ebp) - fmul %st(0), %st - fsts 104(%esp) - fstps 108(%esp) - jmp ..B1.55 -..B1.79: - testl $8388607, 12(%ebp) - je ..B1.94 -..B1.80: - fstp %st(0) - flds 8(%ebp) - fmul %st(0), %st - fstps 104(%esp) - flds 12(%ebp) - fmul %st(0), %st - fstps 108(%esp) - jmp ..B1.55 -..B1.91: - cmpl $255, %eax - je ..B1.59 - jmp ..B1.96 -..B1.92: - fstp %st(0) - cmpl $255, %eax - jl ..B1.47 - jmp ..B1.54 -..B1.94: - testl $8388607, 8(%ebp) - jne ..B1.77 - jmp ..B1.44 - .align 16,0x90 - .type casinhf,@function - .size casinhf,.-casinhf - .data -# -- End casinhf - .section .rodata, "a" - .align 16 - .align 16 -_Bcross: - .long -858993459 - .long 1072483532 - .type _Bcross,@object - .size _Bcross,8 - .space 8, 0x00 # pad - .align 16 -_Across: - .long 0 - .long 1073217536 - .type _Across,@object - .size _Across,8 - .space 8, 0x00 # pad - .align 16 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 4 -.L_2il0floatpacket.7: - .long 0xbfc90fdb - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,4 - .align 4 -.L_2il0floatpacket.8: - .long 0x3fc90fdb - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,4 - .align 4 -.L_2il0floatpacket.9: - .long 0x00800000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,4 - .align 4 -.L_2il0floatpacket.10: - .long 0x80000000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,4 - .align 4 -.L_2il0floatpacket.11: - .long 0xbf490fdb - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,4 - .align 4 -.L_2il0floatpacket.12: - .long 0x3f490fdb - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .align 4 -.L_2il0floatpacket.13: - .long 0xff800000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,4 - .align 4 -.L_2il0floatpacket.14: - .long 0x7f800000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinhl.S deleted file mode 100644 index 31dd4fbe27..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinhl.S +++ /dev/null @@ -1,441 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casinhl.c" - .text -..TXTST0: -# -- Begin casinhl - .text - .align 16,0x90 - .globl casinhl -casinhl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $308, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 272(%esp) - fstpt 8(%esp) - fldt 8(%esp) - fstpt 248(%esp) - fldt 248(%esp) - fstpt 260(%esp) -..B1.2: - fnstcw 22(%esp) -..B1.3: - movzwl 22(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.62 -..B1.4: - orl $-64768, %ecx - movw %cx, 20(%esp) -..B1.5: - fldcw 20(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 20(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - jge ..B1.16 -..B1.8: - testl %ecx, %ecx - jle ..B1.41 -..B1.9: - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.16 -..B1.10: - testl %edx, %edx - jle ..B1.39 -..B1.11: - addl $-48, %esp - lea 24(%ebp), %edx - lea 12(%ebp), %ecx - movl %edx, (%esp) - lea 268(%esp), %edx - movl %ecx, 4(%esp) - movl %edx, 8(%esp) - lea 240(%esp), %edx - movl %edx, 12(%esp) - lea 212(%esp), %edx - movl %edx, 16(%esp) - lea 184(%esp), %edx - movl %edx, 20(%esp) - lea 156(%esp), %edx - movl %edx, 24(%esp) - lea 128(%esp), %edx - movl %edx, 28(%esp) - lea 100(%esp), %edx - movl %edx, 32(%esp) - lea 72(%esp), %edx - movl %edx, 36(%esp) - call __libm_carctrigprepare_k80 -..B1.65: - lea 72(%esp), %edx - lea 12(%ebp), %ecx -..B1.12: - lea 24(%ebp), %eax - movl %eax, (%esp) - lea 268(%esp), %eax - movl %ecx, 4(%esp) - movl %eax, 8(%esp) - lea 240(%esp), %eax - movl %eax, 12(%esp) - lea 212(%esp), %eax - movl %eax, 16(%esp) - lea 184(%esp), %eax - movl %eax, 20(%esp) - lea 156(%esp), %eax - movl %eax, 24(%esp) - lea 128(%esp), %eax - movl %eax, 28(%esp) - lea 100(%esp), %eax - movl %eax, 32(%esp) - movl %edx, 36(%esp) - call __libm_recacoshl_k80 -..B1.66: - lea 72(%esp), %edx - addl $48, %esp - lea 12(%ebp), %ecx -..B1.13: - movzbl 9(%ecx), %eax - andl $128, %eax - shrl $7, %eax - fldl ones@GOTOFF(%ebx,%eax,8) - lea 24(%ebp), %eax - fmulp %st, %st(1) - fstpt 248(%esp) - addl $-48, %esp - movl %eax, (%esp) - movl %ecx, 4(%esp) - lea 268(%esp), %ecx - movl %ecx, 8(%esp) - lea 240(%esp), %ecx - movl %ecx, 12(%esp) - lea 212(%esp), %ecx - movl %ecx, 16(%esp) - lea 184(%esp), %ecx - movl %ecx, 20(%esp) - lea 156(%esp), %ecx - movl %ecx, 24(%esp) - lea 128(%esp), %ecx - movl %ecx, 28(%esp) - lea 100(%esp), %ecx - movl %ecx, 32(%esp) - movl %edx, 36(%esp) - call __libm_recasinl_k80 -..B1.67: - addl $48, %esp -..B1.14: - fstpt 260(%esp) - jmp ..B1.35 -..B1.16: - movl 28(%ebp), %edx -..B1.17: - testl %edx, %edx - jne ..B1.20 -..B1.75: - cmpl $0, 24(%ebp) -..B1.18: - jne ..B1.20 -..B1.19: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call asinhl@PLT -..B1.68: - fldt 24(%ebp) - addl $16, %esp - fstpt 260(%esp) - fstpt 248(%esp) - jmp ..B1.35 -..B1.20: - movl 16(%ebp), %eax - testl %eax, %eax - movl %eax, (%esp) - jne ..B1.29 -..B1.21: - movzwl 32(%ebp), %eax - andl $32767, %eax - cmpl $0, 12(%ebp) - jne ..B1.30 -..B1.22: - cmpl $32767, %eax - jl ..B1.25 -..B1.23: - cmpl $-2147483648, %edx - jne ..B1.30 -..B1.24: - cmpl $0, 24(%ebp) - jne ..B1.30 -..B1.25: - fldt 24(%ebp) - cmpl $16383, %eax - jl ..B1.27 -..B1.26: - movzbl 33(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl ones@GOTOFF(%ebx,%edx,8) - fstl (%esp) - addl $-16, %esp - fmulp %st, %st(1) - fstpt (%esp) - call acoshl@PLT -..B1.70: - fstpt 24(%esp) - fldl 16(%esp) - fstpt (%esp) - call asinl@PLT - jmp ..B1.71 -..B1.27: - addl $-16, %esp - fstpt (%esp) - call asinl@PLT -..B1.71: - addl $16, %esp - fstpt 260(%esp) -..B1.28: - fldt 8(%esp) - movzbl 21(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fmull ones@GOTOFF(%ebx,%edx,8) - fstpt 248(%esp) - jmp ..B1.35 -..B1.29: - movzwl 32(%ebp), %eax - andl $32767, %eax -..B1.30: - cmpl $32767, %ecx - je ..B1.52 -..B1.31: - cmpl $32767, %eax - je ..B1.48 -..B1.74: - cmpl $32767, %ecx -..B1.32: - je ..B1.45 -..B1.33: - fldt 24(%ebp) - fld %st(0) - fmul %st(1), %st - fldt 12(%ebp) - fxch %st(2) -..B1.34: - movzbl 21(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl ones@GOTOFF(%ebx,%edx,8) - fmul %st, %st(2) - fxch %st(2) - fstpt 248(%esp) - addl $-32, %esp - fxch %st(2) - fmulp %st, %st(1) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT -..B1.72: - addl $32, %esp - fstpt 260(%esp) -..B1.35: - testl %edi, %edi - je ..B1.37 -..B1.36: - fldcw 22(%esp) -..B1.37: - movl 248(%esp), %edx - movl %edx, (%esi) - movl 260(%esp), %edx - movl %edx, 12(%esi) - movl 264(%esp), %edx - movl %edx, 16(%esi) - movl 252(%esp), %ecx - movl 256(%esp), %edi - movl 268(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 272(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.44 -..B1.38: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.39: - movl 28(%ebp), %edx - testl %edx, %edx - jne ..B1.11 -..B1.40: - cmpl $0, 24(%ebp) - jne ..B1.11 - jmp ..B1.18 -..B1.41: - cmpl $0, 16(%ebp) - jne ..B1.9 -..B1.42: - cmpl $0, 12(%ebp) - jne ..B1.9 - jmp ..B1.16 -..B1.44: - call __stack_chk_fail@PLT -..B1.45: - cmpl $-2147483648, (%esp) - jne ..B1.33 -..B1.46: - cmpl $0, 12(%ebp) - jne ..B1.33 -..B1.47: - fldt 12(%ebp) - fld %st(0) - fmul %st(1), %st - fldt 24(%ebp) - jmp ..B1.34 -..B1.48: - cmpl $-2147483648, %edx - jne ..B1.50 -..B1.49: - cmpl $0, 24(%ebp) - je ..B1.73 -..B1.50: - cmpl $32767, %ecx - jge ..B1.32 -..B1.51: - fldt 24(%ebp) - fmul %st(0), %st - fstpt 248(%esp) - fldt 248(%esp) - fstpt 260(%esp) - jmp ..B1.35 -..B1.52: - cmpl $-2147483648, (%esp) - jne ..B1.54 -..B1.53: - cmpl $0, 12(%ebp) - je ..B1.56 -..B1.54: - cmpl $32767, %eax - je ..B1.59 -..B1.55: - cmpl $-2147483648, (%esp) - jne ..B1.57 -..B1.76: - cmpl $0, 12(%ebp) -..B1.56: - je ..B1.31 -..B1.57: - cmpl $32767, %eax - jge ..B1.31 -..B1.58: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 248(%esp) - fldt 248(%esp) - fstpt 260(%esp) - jmp ..B1.35 -..B1.59: - cmpl $-2147483648, %edx - jne ..B1.61 -..B1.60: - cmpl $0, 24(%ebp) - je ..B1.55 -..B1.61: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 248(%esp) - fldt 24(%ebp) - fmul %st(0), %st - fstpt 260(%esp) - jmp ..B1.35 -..B1.62: - xorl %edi, %edi - jmp ..B1.7 -..B1.73: - cmpl $32767, %ecx - je ..B1.45 - jmp ..B1.33 - .align 16,0x90 - .type casinhl,@function - .size casinhl,.-casinhl - .data -# -- End casinhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .hidden __libm_recasinl_k80 - .hidden __libm_recacoshl_k80 - .hidden __libm_carctrigprepare_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinl.S deleted file mode 100644 index efe03286b1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/casinl.S +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casinl.c" - .text -..TXTST0: -# -- Begin casinl - .text - .align 16,0x90 - .globl casinl -casinl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 100(%esp) - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - fldt 28(%esp) - fstpt 40(%esp) - fldt 40(%esp) - fstpt 52(%esp) - fldt 52(%esp) - fstpt 64(%esp) -..B1.2: - fnstcw 2(%esp) -..B1.3: - movzwl 2(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.20 -..B1.4: - orl $-64768, %ecx - movw %cx, (%esp) -..B1.5: - fldcw (%esp) -..B1.6: - movl $1, %edi -..B1.7: - fldt 24(%ebp) - movzwl 32(%ebp), %edx - andl $32767, %edx - fstpt 52(%esp) - cmpl $32767, %edx - fldt 12(%ebp) - fstpt 64(%esp) - jl ..B1.10 -..B1.8: - cmpl $-2147483648, 28(%ebp) - jne ..B1.11 -..B1.9: - cmpl $0, 24(%ebp) - jne ..B1.11 -..B1.10: - movzbl 33(%ebp), %ecx - notl %ecx - movzbl 61(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 61(%esp) -..B1.11: - addl $-32, %esp - lea 108(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl -24(%ecx), %ecx - movl %ecx, (%edx) - movl 88(%esp), %ecx - movl %ecx, 4(%edx) - movl 92(%esp), %ecx - movl %ecx, 8(%edx) - movl 96(%esp), %ecx - movl %ecx, 12(%edx) - movl 100(%esp), %ecx - movl %ecx, 16(%edx) - movl 104(%esp), %ecx - movl %ecx, 20(%edx) - call casinhl@PLT -..B1.23: - addl $28, %esp - fldt 76(%esp) - movzwl 84(%esp), %edx - andl $32767, %edx - fstpt 4(%esp) - fldt 4(%esp) - cmpl $32767, %edx - fstpt 40(%esp) - fldt 88(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - jl ..B1.14 -..B1.12: - cmpl $-2147483648, 8(%esp) - jne ..B1.15 -..B1.13: - cmpl $0, 4(%esp) - jne ..B1.15 -..B1.14: - movzbl 13(%esp), %ecx - notl %ecx - movzbl 49(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 49(%esp) -..B1.15: - testl %edi, %edi - je ..B1.17 -..B1.16: - fldcw 2(%esp) -..B1.17: - movl 28(%esp), %edx - movl %edx, (%esi) - movl 40(%esp), %edx - movl %edx, 12(%esi) - movl 44(%esp), %edx - movl %edx, 16(%esi) - movl 32(%esp), %ecx - movl 36(%esp), %edi - movl 48(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 100(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.19 -..B1.18: - movl %esi, %eax - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.19: - call __stack_chk_fail@PLT -..B1.20: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type casinl,@function - .size casinl,.-casinl - .data -# -- End casinl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catan.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catan.S deleted file mode 100644 index 6439e8be43..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catan.S +++ /dev/null @@ -1,237 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catan.c" - .text -..TXTST0: -# -- Begin catan - .text - .align 16,0x90 - .globl catan -catan: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $72, %esp - fldz - fldl 20(%ebp) - fldl 12(%ebp) - movzwl 26(%ebp), %ecx - andl $32752, %ecx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 64(%esp) - cmpl $32752, %ecx - fstpl 56(%esp) - fxch %st(1) - fstl 16(%esp) - fstl 24(%esp) - fstl 32(%esp) - fstpl 40(%esp) - fstpl 48(%esp) - jl ..B1.4 -..B1.2: - testl $1048575, 24(%ebp) - jne ..B1.5 -..B1.3: - cmpl $0, 20(%ebp) - jne ..B1.5 -..B1.4: - movzbl 27(%ebp), %edx - notl %edx - movzbl 55(%esp), %ecx - andl $128, %edx - andl $127, %ecx - orl %edx, %ecx - movb %cl, 55(%esp) -..B1.5: - addl $-32, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea 32(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl 48(%ecx), %ecx - movl %ecx, (%edx) - movl 84(%esp), %ecx - movl %ecx, 4(%edx) - movl 88(%esp), %ecx - movl %ecx, 8(%edx) - movl 92(%esp), %ecx - movl %ecx, 12(%edx) - call catanh@PLT -..B1.14: - addl $28, %esp - fldl (%esp) - movzwl 6(%esp), %edx - andl $32752, %edx - fstl 16(%esp) - cmpl $32752, %edx - fstpl 40(%esp) - fldl 8(%esp) - fstl 24(%esp) - fstpl 32(%esp) - jl ..B1.8 -..B1.6: - testl $1048575, 20(%esp) - jne ..B1.9 -..B1.7: - cmpl $0, 16(%esp) - jne ..B1.9 -..B1.8: - movzbl 23(%esp), %edx - notl %edx - movzbl 47(%esp), %ecx - andl $128, %edx - andl $127, %ecx - orl %edx, %ecx - movb %cl, 47(%esp) -..B1.9: - movl 32(%esp), %edx - movl %edx, (%esi) - movl 40(%esp), %edx - movl %edx, 8(%esi) - movl 36(%esp), %ecx - movl 44(%esp), %edx - movl %ecx, 4(%esi) - movl %edx, 12(%esi) - movl 64(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.11 -..B1.10: - movl %esi, %eax - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.11: - call __stack_chk_fail@PLT - .align 16,0x90 - .type catan,@function - .size catan,.-catan - .data -# -- End catan - .text -# -- Begin catanf - .text - .align 16,0x90 - .globl catanf -catanf: -# parameter 1: 48 + %esp -..B2.1: -..L3: - - pushl %ebx - subl $40, %esp - xorl %eax, %eax - movl %eax, 16(%esp) - movl %eax, 20(%esp) - movl %eax, 24(%esp) - movl %eax, 28(%esp) - movzwl 54(%esp), %eax - andl $32640, %eax - movl 52(%esp), %edx - cmpl $32640, %eax - movl 48(%esp), %ecx - movl %edx, 32(%esp) - movl %ecx, 36(%esp) - jl ..B2.3 -..B2.2: - testl $8388607, 52(%esp) - jne ..B2.4 -..B2.3: - movzbl 55(%esp), %eax - notl %eax - movzbl 35(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 35(%esp) -..B2.4: - addl $8, %esp - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - pushl 28(%esp) - pushl 28(%esp) - call catanhf@PLT -..B2.10: - movl %eax, 16(%esp) - movl %eax, 28(%esp) - shrl $16, %eax - andl $32640, %eax - cmpl $32640, %eax - movl %edx, 20(%esp) - movl %edx, 24(%esp) - jl ..B2.6 -..B2.5: - testl $8388607, 16(%esp) - jne ..B2.7 -..B2.6: - movzbl 19(%esp), %eax - notl %eax - movzbl 31(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 31(%esp) -..B2.7: - movl 24(%esp), %eax - movl 28(%esp), %edx - addl $40, %esp - popl %ebx - ret - .align 16,0x90 - .type catanf,@function - .size catanf,.-catanf - .data -# -- End catanf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanh.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanh.S deleted file mode 100644 index 41181a538b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanh.S +++ /dev/null @@ -1,727 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catanh.c" - .text -..TXTST0: -# -- Begin catanh - .text - .align 16,0x90 - .globl catanh -catanh: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 192(%esp) - fstl 176(%esp) - fstpl 184(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 18(%ebp), %edx - andl $32752, %edx - shrl $4, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %edx - jge ..B1.19 -..B1.4: - testl %edx, %edx - jle ..B1.74 -..B1.5: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $2047, %ecx - jge ..B1.20 -..B1.6: - testl %ecx, %ecx - jle ..B1.72 -..B1.7: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.71 -..B1.8: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - movl $1, %edi -..B1.11: - fldl 12(%ebp) - fstl 160(%esp) - fmul %st(0), %st - fstpt 80(%esp) - fldt 80(%esp) - fldl 20(%ebp) - fld %st(0) - fmul %st(1), %st - fstpt 144(%esp) - fldt 144(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fstpt 128(%esp) - fldt 128(%esp) - fsubp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 28(%esp) - fldt 28(%esp) - fabs - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fstpt 96(%esp) - fldt 96(%esp) - fcompp - fnstsw %ax - sahf - jbe ..B1.13 -..B1.12: - fldl 160(%esp) - fldt 128(%esp) - faddp %st, %st(1) - fstpt 112(%esp) - fldt 112(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fxch %st(1) - fstpt 12(%esp) - fstpt 48(%esp) - call atan2l@PLT -..B1.106: - fldt 48(%esp) - addl $32, %esp - fchs - fxch %st(1) - fstpt 40(%esp) - fldt 128(%esp) - fsubl 160(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - fldt 12(%esp) - fstpt 32(%esp) - call atan2l@PLT -..B1.105: - fldt 32(%esp) - addl $32, %esp - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fstpt 16(%esp) - fldt 16(%esp) - fxch %st(2) - fstpt 52(%esp) - fldt 40(%esp) - fldt 52(%esp) - fsubrp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpl 184(%esp) - jmp ..B1.14 -..B1.13: - fldt 28(%esp) - addl $-32, %esp - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT -..B1.107: - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - addl $32, %esp - fstpt 16(%esp) - fldt 16(%esp) - fmulp %st, %st(1) - fstpl 184(%esp) - fldl 160(%esp) - fld %st(0) - fldt 128(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpt 112(%esp) - fsubp %st, %st(1) -..B1.14: - fldt 112(%esp) - fstpt 40(%esp) - fchs - fldt 40(%esp) - fldt 40(%esp) - fmulp %st, %st(1) - fldt 144(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpt 64(%esp) - fxch %st(1) - fstpt 52(%esp) - fldt 52(%esp) - fldt 52(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 28(%esp) - fldt 64(%esp) - fldt 28(%esp) - fsubrp %st, %st(1) - fabs - fldt 28(%esp) - fldt 96(%esp) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B1.16 - jp ..B1.16 -..B1.15: - fldt 64(%esp) - fldt 28(%esp) - addl $-16, %esp - fdivrp %st, %st(1) - fstpt (%esp) - call logl@PLT -..B1.108: - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fstpl 176(%esp) - jmp ..B1.17 -..B1.16: - fldt 80(%esp) - fldt 144(%esp) - faddp %st, %st(1) - fldt 128(%esp) - faddp %st, %st(1) - fstpt 28(%esp) - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fmull 160(%esp) - fstpt 64(%esp) - fldt 64(%esp) - fldt 28(%esp) - addl $-16, %esp - fdivrp %st, %st(1) - fstpt (%esp) - call atanhl@PLT -..B1.109: - addl $16, %esp - fldt 16(%esp) - fmulp %st, %st(1) - fstpl 176(%esp) -..B1.17: - testl %edi, %edi - je ..B1.62 -..B1.18: - fldcw 14(%esp) - jmp ..B1.62 -..B1.19: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx -..B1.20: - cmpl $2047, %edx - je ..B1.90 -..B1.21: - cmpl $2047, %ecx - je ..B1.83 -..B1.22: - cmpl $2047, %ecx - jge ..B1.54 -..B1.23: - testl %edx, %edx - jle ..B1.80 -..B1.24: - cmpl $1023, %edx - jge ..B1.28 -..B1.25: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call atanh@PLT -..B1.110: - addl $16, %esp - movzbl 27(%ebp), %edx - testl $128, %edx - fstpl 176(%esp) - je ..B1.27 -..B1.26: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 184(%esp) - jmp ..B1.62 -..B1.27: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 184(%esp) - jmp ..B1.62 -..B1.28: - je ..B1.78 -..B1.29: - cmpl $2047, %edx - jge ..B1.43 -..B1.30: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.77 -..B1.31: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.32: - fldcw 12(%esp) -..B1.33: - movl $1, %edx -..B1.34: - fldl 12(%ebp) - fld %st(0) - fld %st(1) - fmul %st(2), %st - fldl 20(%ebp) - fmul %st(0), %st - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fld %st(0) - fsub %st(5), %st - fchs - fxch %st(1) - fadd %st, %st(4) - fxch %st(4) - fstpt 40(%esp) - fldt 40(%esp) - fldt 40(%esp) - fmulp %st, %st(1) - fadd %st(2), %st - fstpt 64(%esp) - fstpt 52(%esp) - fldt 52(%esp) - fldt 52(%esp) - fmulp %st, %st(1) - fadd %st(1), %st - fstpt 28(%esp) - fldt 64(%esp) - fldt 28(%esp) - fsubrp %st, %st(1) - fabs - fldt 28(%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B1.36 - jp ..B1.36 -..B1.35: - fstp %st(2) - fstp %st(1) - fstp %st(0) - fstp %st(0) - fldt 64(%esp) - fldt 28(%esp) - addl $-16, %esp - fdivrp %st, %st(1) - fstpt (%esp) - movl %edx, 16(%esp) - call logl@PLT -..B1.111: - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - fmulp %st, %st(1) - movl 16(%esp), %edx - addl $16, %esp - fstpl 176(%esp) - jmp ..B1.37 -..B1.36: - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 28(%esp) - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fldt 28(%esp) - addl $-16, %esp - fdivrp %st, %st(1) - fstpt (%esp) - movl %edx, 16(%esp) - call atanhl@PLT -..B1.112: - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fmulp %st, %st(1) - movl 16(%esp), %edx - addl $16, %esp - fstpl 176(%esp) -..B1.37: - testl %edx, %edx - je ..B1.39 -..B1.38: - fldcw 14(%esp) -..B1.39: - movzbl 27(%ebp), %edx - testl $128, %edx - je ..B1.41 -..B1.40: - fldl _DBL_NPIBY2@GOTOFF(%ebx) - jmp ..B1.42 -..B1.41: - fldl _DBL_PPIBY2@GOTOFF(%ebx) -..B1.42: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fxch %st(1) - fstl 184(%esp) - faddp %st, %st(1) - fstpl 168(%esp) - jmp ..B1.62 -..B1.43: - testl %ecx, %ecx - jne ..B1.47 -..B1.44: - testl $1048575, 24(%ebp) - jne ..B1.46 -..B1.45: - cmpl $0, 20(%ebp) - je ..B1.47 -..B1.46: - fldl .L_2il0floatpacket.12@GOTOFF(%ebx) - faddl 20(%ebp) - fstpl 168(%esp) -..B1.47: - movzbl 19(%ebp), %edx - testl $128, %edx - je ..B1.49 -..B1.48: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 176(%esp) - jmp ..B1.50 -..B1.49: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 176(%esp) -..B1.50: - movzbl 27(%ebp), %edx - testl $128, %edx - je ..B1.52 -..B1.51: - fldl _DBL_NPIBY2@GOTOFF(%ebx) - jmp ..B1.53 -..B1.52: - fldl _DBL_PPIBY2@GOTOFF(%ebx) -..B1.53: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fxch %st(1) - fstl 184(%esp) - faddp %st, %st(1) - fstpl 168(%esp) - jmp ..B1.62 -..B1.54: - testl %edx, %edx - jne ..B1.58 -..B1.55: - testl $1048575, 16(%ebp) - jne ..B1.57 -..B1.56: - cmpl $0, 12(%ebp) - je ..B1.58 -..B1.57: - fldl .L_2il0floatpacket.12@GOTOFF(%ebx) - faddl 12(%ebp) - fstpl 168(%esp) -..B1.58: - movzbl 19(%ebp), %edx - testl $128, %edx - je ..B1.60 -..B1.59: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 176(%esp) - jmp ..B1.61 -..B1.60: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 176(%esp) -..B1.61: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call atan@PLT -..B1.113: - addl $16, %esp - fstpl 184(%esp) -..B1.62: - movzwl 182(%esp), %edx - testl $32752, %edx - jne ..B1.65 -..B1.63: - testl $1048575, 180(%esp) - jne ..B1.68 -..B1.64: - cmpl $0, 176(%esp) - jne ..B1.68 -..B1.65: - movzwl 190(%esp), %edx - testl $32752, %edx - jne ..B1.69 -..B1.66: - testl $1048575, 188(%esp) - jne ..B1.68 -..B1.67: - cmpl $0, 184(%esp) - je ..B1.69 -..B1.68: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 168(%esp) -..B1.69: - movl 176(%esp), %edx - movl %edx, (%esi) - movl 180(%esp), %ecx - movl 184(%esp), %edi - movl 188(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 12(%esi) - movl 192(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.82 -..B1.70: - movl %esi, %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.71: - xorl %edi, %edi - jmp ..B1.11 -..B1.72: - testl $1048575, 24(%ebp) - jne ..B1.7 -..B1.73: - cmpl $0, 20(%ebp) - jne ..B1.7 - jmp ..B1.20 -..B1.74: - testl $1048575, 16(%ebp) - jne ..B1.5 -..B1.75: - cmpl $0, 12(%ebp) - jne ..B1.5 - jmp ..B1.19 -..B1.77: - xorl %edx, %edx - jmp ..B1.34 -..B1.78: - testl $1048575, 16(%ebp) - jne ..B1.29 -..B1.79: - cmpl $0, 12(%ebp) - je ..B1.25 - jmp ..B1.29 -..B1.80: - testl $1048575, 16(%ebp) - jne ..B1.24 -..B1.81: - cmpl $0, 12(%ebp) - jne ..B1.24 - jmp ..B1.54 -..B1.82: - call __stack_chk_fail@PLT -..B1.83: - testl $1048575, 24(%ebp) - jne ..B1.85 -..B1.84: - cmpl $0, 20(%ebp) - je ..B1.22 -..B1.85: - cmpl $2047, %edx - jge ..B1.22 -..B1.86: - testl %edx, %edx - jle ..B1.88 -..B1.87: - fldl 20(%ebp) - fmul %st(0), %st - fstl 176(%esp) - fstpl 184(%esp) - jmp ..B1.62 -..B1.88: - testl $1048575, 16(%ebp) - jne ..B1.87 -..B1.89: - cmpl $0, 12(%ebp) - jne ..B1.87 - jmp ..B1.22 -..B1.90: - testl $1048575, 16(%ebp) - jne ..B1.92 -..B1.91: - cmpl $0, 12(%ebp) - je ..B1.21 -..B1.92: - fldl 12(%ebp) - cmpl $2047, %ecx - fmul %st(0), %st - jge ..B1.94 -..B1.93: - fstl 12(%ebp) - fmul %st(0), %st - fstl 176(%esp) - fstpl 184(%esp) - jmp ..B1.62 -..B1.94: - testl $1048575, 24(%ebp) - jne ..B1.101 -..B1.95: - cmpl $0, 20(%ebp) - jne ..B1.101 -..B1.96: - fmul %st(0), %st - fstpl 12(%ebp) - fldl _DBL_PZERO@GOTOFF(%ebx) - movzbl 27(%ebp), %edx - testl $128, %edx - fstpl 176(%esp) - je ..B1.98 -..B1.97: - fldl _DBL_NPIBY2@GOTOFF(%ebx) - jmp ..B1.99 -..B1.98: - fldl _DBL_PPIBY2@GOTOFF(%ebx) -..B1.99: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fxch %st(1) - fstl 184(%esp) - faddp %st, %st(1) - fstpl 168(%esp) - jmp ..B1.62 -..B1.101: - fstl 12(%ebp) -..B1.102: - fmul %st(0), %st - fstpl 176(%esp) - fldl 20(%ebp) - fmul %st(0), %st - fstpl 184(%esp) - jmp ..B1.62 - .align 16,0x90 - .type catanh,@function - .size catanh,.-catanh - .data -# -- End catanh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0xc0,0xf5,0x28,0x5c,0x8f,0xc2,0xf5,0xf9,0x3f,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,12 - .space 4, 0x00 # pad - .align 16 -_DBL_NZERO: - .long 0 - .long -2147483648 - .type _DBL_NZERO,@object - .size _DBL_NZERO,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PZERO: - .long 0 - .long 0 - .type _DBL_PZERO,@object - .size _DBL_PZERO,8 - .space 8, 0x00 # pad - .align 16 -_DBL_NPIBY2: - .long 1413754136 - .long -1074191877 - .type _DBL_NPIBY2,@object - .size _DBL_NPIBY2,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PPIBY2: - .long 1413754136 - .long 1073291771 - .type _DBL_PPIBY2,@object - .size _DBL_PPIBY2,8 - .space 8, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanhf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanhf.S deleted file mode 100644 index 7766d9302a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanhf.S +++ /dev/null @@ -1,557 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catanhf.c" - .text -..TXTST0: -# -- Begin catanhf - .text - .align 16,0x90 - .globl catanhf -catanhf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $120, %esp - xorl %edi, %edi - movzwl 10(%ebp), %eax - andl $32640, %eax - shrl $7, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $255, %eax - movl %edi, 108(%esp) - movl %edi, 112(%esp) - jge ..B1.11 -..B1.2: - testl %eax, %eax - jle ..B1.53 -..B1.3: - movzwl 14(%ebp), %edx - andl $32640, %edx - shrl $7, %edx - cmpl $255, %edx - jge ..B1.12 -..B1.4: - testl %edx, %edx - jle ..B1.52 -..B1.5: - flds 8(%ebp) - fsts 100(%esp) - fld1 - fsts 96(%esp) - fxch %st(1) - fmul %st(0), %st - fstl 32(%esp) - fsubrp %st, %st(1) - flds 12(%ebp) - fld %st(0) - fmul %st(1), %st - fstl 72(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpl 40(%esp) - fldl 40(%esp) - fabs - fldl .L_2il0floatpacket.6@GOTOFF(%ebx) - fstl 80(%esp) - fcompp - fnstsw %ax - sahf - jbe ..B1.7 -..B1.6: - flds 100(%esp) - fadds 96(%esp) - fstl 88(%esp) - fstpl 8(%esp) - fstl (%esp) - fstpl 16(%esp) - call atan2@PLT -..B1.74: - fldl 16(%esp) - fchs - fxch %st(1) - fstpl 48(%esp) - flds 96(%esp) - fsubs 100(%esp) - fstl 8(%esp) - fxch %st(1) - fstpl (%esp) - fstpl 24(%esp) - call atan2@PLT -..B1.73: - fldl 24(%esp) - fxch %st(1) - fstpl 56(%esp) - fldl 48(%esp) - fldl 56(%esp) - fsubrp %st, %st(1) - fldl .L_2il0floatpacket.7@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - fstps 112(%esp) - fxch %st(1) - jmp ..B1.8 -..B1.7: - fldl 40(%esp) - fstpl 8(%esp) - fldl .L_2il0floatpacket.8@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpl (%esp) - call atan2@PLT -..B1.75: - fldl .L_2il0floatpacket.7@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - fstps 112(%esp) - flds 100(%esp) - fld %st(0) - flds 96(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpl 88(%esp) - fsubp %st, %st(1) -..B1.8: - fldl 88(%esp) - fstpl 48(%esp) - fchs - fldl 48(%esp) - fldl 48(%esp) - fmulp %st, %st(1) - fldl 72(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpl 64(%esp) - fxch %st(1) - fstpl 56(%esp) - fldl 56(%esp) - fldl 56(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpl 40(%esp) - fldl 64(%esp) - fldl 40(%esp) - fsubrp %st, %st(1) - fabs - fldl 40(%esp) - fmull 80(%esp) - fcompp - fnstsw %ax - sahf - jae ..B1.10 - jp ..B1.10 -..B1.9: - fstp %st(0) - fldl 64(%esp) - fldl 40(%esp) - fdivrp %st, %st(1) - fstpl (%esp) - call log@PLT -..B1.76: - fmull .L_2il0floatpacket.9@GOTOFF(%ebx) - fstps 108(%esp) - jmp ..B1.46 -..B1.10: - fldl 72(%esp) - fldl .L_2il0floatpacket.8@GOTOFF(%ebx) - fmuls 100(%esp) - fxch %st(1) - faddl 32(%esp) - fadds 96(%esp) - fstpl 40(%esp) - fstpl 64(%esp) - fldl 64(%esp) - fldl 40(%esp) - fdivrp %st, %st(1) - fstpl (%esp) - fstpl 16(%esp) - call atanh@PLT -..B1.77: - fldl 16(%esp) - fmulp %st, %st(1) - fstps 108(%esp) - jmp ..B1.46 -..B1.11: - movzwl 14(%ebp), %edx - andl $32640, %edx - shrl $7, %edx -..B1.12: - cmpl $255, %eax - je ..B1.62 -..B1.13: - cmpl $255, %edx - je ..B1.57 -..B1.14: - cmpl $255, %edx - jge ..B1.39 -..B1.15: - testl %eax, %eax - jle ..B1.56 -..B1.16: - cmpl $127, %eax - jge ..B1.20 -..B1.17: - addl $4, %esp - pushl 8(%ebp) - call atanhf@PLT -..B1.78: - movzbl 15(%ebp), %eax - testl $128, %eax - fstps 108(%esp) - je ..B1.19 -..B1.18: - movl $-2147483648, 112(%esp) - jmp ..B1.46 -..B1.19: - movl %edi, 112(%esp) - jmp ..B1.46 -..B1.20: - je ..B1.55 -..B1.21: - cmpl $255, %eax - jge ..B1.29 -..B1.22: - flds 8(%ebp) - fld %st(0) - fld %st(1) - fld1 - fadd %st, %st(2) - fxch %st(2) - fstpl 48(%esp) - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fsubr %st(2), %st - fchs - flds 12(%ebp) - fmul %st(0), %st - fldl 48(%esp) - fldl 48(%esp) - fmulp %st, %st(1) - fadd %st(1), %st - fstpl 64(%esp) - fxch %st(1) - fstpl 56(%esp) - fldl 56(%esp) - fldl 56(%esp) - fmulp %st, %st(1) - fadd %st(1), %st - fstpl 40(%esp) - fldl 64(%esp) - fldl 40(%esp) - fsubrp %st, %st(1) - fabs - fldl 40(%esp) - fmull .L_2il0floatpacket.6@GOTOFF(%ebx) - fcompp - fnstsw %ax - sahf - jae ..B1.24 - jp ..B1.24 -..B1.23: - fstp %st(2) - fstp %st(1) - fstp %st(0) - fstp %st(0) - fldl 64(%esp) - fldl 40(%esp) - fdivrp %st, %st(1) - fstpl (%esp) - call log@PLT -..B1.79: - fmull .L_2il0floatpacket.9@GOTOFF(%ebx) - fstps 108(%esp) - jmp ..B1.25 -..B1.24: - faddp %st, %st(1) - faddp %st, %st(1) - fstpl 40(%esp) - fldl .L_2il0floatpacket.8@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpl 64(%esp) - fldl 64(%esp) - fldl 40(%esp) - fdivrp %st, %st(1) - fstpl (%esp) - call atanh@PLT -..B1.80: - fmull .L_2il0floatpacket.7@GOTOFF(%ebx) - fstps 108(%esp) -..B1.25: - movzbl 15(%ebp), %eax - testl $128, %eax - je ..B1.27 -..B1.26: - flds .L_2il0floatpacket.10@GOTOFF(%ebx) - jmp ..B1.28 -..B1.27: - flds .L_2il0floatpacket.11@GOTOFF(%ebx) -..B1.28: - flds .L_2il0floatpacket.14@GOTOFF(%ebx) - fxch %st(1) - fsts 112(%esp) - faddp %st, %st(1) - fstps 104(%esp) - jmp ..B1.46 -..B1.29: - testl %edx, %edx - jne ..B1.32 -..B1.30: - testl $8388607, 12(%ebp) - je ..B1.32 -..B1.31: - flds .L_2il0floatpacket.12@GOTOFF(%ebx) - fadds 12(%ebp) - fstps 104(%esp) -..B1.32: - movzbl 11(%ebp), %eax - testl $128, %eax - je ..B1.34 -..B1.33: - movl $-2147483648, 108(%esp) - jmp ..B1.35 -..B1.34: - movl %edi, 108(%esp) -..B1.35: - movzbl 15(%ebp), %eax - testl $128, %eax - je ..B1.37 -..B1.36: - flds .L_2il0floatpacket.10@GOTOFF(%ebx) - jmp ..B1.38 -..B1.37: - flds .L_2il0floatpacket.11@GOTOFF(%ebx) -..B1.38: - flds .L_2il0floatpacket.14@GOTOFF(%ebx) - fxch %st(1) - fsts 112(%esp) - faddp %st, %st(1) - fstps 104(%esp) - jmp ..B1.46 -..B1.39: - testl %eax, %eax - jne ..B1.42 -..B1.40: - testl $8388607, 8(%ebp) - je ..B1.42 -..B1.41: - flds .L_2il0floatpacket.12@GOTOFF(%ebx) - fadds 8(%ebp) - fstps 104(%esp) -..B1.42: - movzbl 11(%ebp), %eax - testl $128, %eax - je ..B1.44 -..B1.43: - movl $-2147483648, 108(%esp) - jmp ..B1.45 -..B1.44: - movl %edi, 108(%esp) -..B1.45: - movl 12(%ebp), %eax - movl %eax, (%esp) - call atanf@PLT -..B1.81: - fstps 112(%esp) -..B1.46: - movzwl 110(%esp), %eax - testl $32640, %eax - jne ..B1.48 -..B1.47: - testl $8388607, 108(%esp) - jne ..B1.50 -..B1.48: - movzwl 114(%esp), %eax - testl $32640, %eax - jne ..B1.51 -..B1.49: - testl $8388607, 112(%esp) - je ..B1.51 -..B1.50: - flds .L_2il0floatpacket.14@GOTOFF(%ebx) - fmul %st(0), %st - fstps 104(%esp) -..B1.51: - movl 108(%esp), %eax - movl 112(%esp), %edx - addl $120, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.52: - testl $8388607, 12(%ebp) - jne ..B1.5 - jmp ..B1.12 -..B1.53: - testl $8388607, 8(%ebp) - jne ..B1.3 - jmp ..B1.11 -..B1.55: - testl $8388607, 8(%ebp) - je ..B1.17 - jmp ..B1.21 -..B1.56: - testl $8388607, 8(%ebp) - jne ..B1.16 - jmp ..B1.39 -..B1.57: - testl $8388607, 12(%ebp) - je ..B1.14 -..B1.58: - cmpl $255, %eax - jge ..B1.14 -..B1.59: - testl %eax, %eax - jle ..B1.61 -..B1.60: - flds 12(%ebp) - fmul %st(0), %st - fsts 108(%esp) - fstps 112(%esp) - jmp ..B1.46 -..B1.61: - testl $8388607, 8(%ebp) - jne ..B1.60 - jmp ..B1.14 -..B1.62: - testl $8388607, 8(%ebp) - je ..B1.13 -..B1.63: - flds 8(%ebp) - cmpl $255, %edx - fmul %st(0), %st - jge ..B1.65 -..B1.64: - fsts 8(%ebp) - fmul %st(0), %st - fsts 108(%esp) - fstps 112(%esp) - jmp ..B1.46 -..B1.65: - testl $8388607, 12(%ebp) - jne ..B1.70 -..B1.66: - fmul %st(0), %st - movzbl 15(%ebp), %eax - testl $128, %eax - fstps 8(%ebp) - movl %edi, 108(%esp) - je ..B1.68 -..B1.67: - flds .L_2il0floatpacket.10@GOTOFF(%ebx) - jmp ..B1.69 -..B1.68: - flds .L_2il0floatpacket.11@GOTOFF(%ebx) -..B1.69: - flds .L_2il0floatpacket.14@GOTOFF(%ebx) - fxch %st(1) - fsts 112(%esp) - faddp %st, %st(1) - fstps 104(%esp) - jmp ..B1.46 -..B1.70: - fsts 8(%ebp) - fmul %st(0), %st - fstps 108(%esp) - flds 12(%ebp) - fmul %st(0), %st - fstps 112(%esp) - jmp ..B1.46 - .align 16,0x90 - .type catanhf,@function - .size catanhf,.-catanhf - .data -# -- End catanhf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.6: - .long 0xe0000000,0x3f9eb851 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x3fd00000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 4 -.L_2il0floatpacket.10: - .long 0xbfc90fdb - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,4 - .align 4 -.L_2il0floatpacket.11: - .long 0x3fc90fdb - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,4 - .align 4 -.L_2il0floatpacket.12: - .long 0x3f000000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .align 4 -.L_2il0floatpacket.13: - .long 0x80000000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,4 - .align 4 -.L_2il0floatpacket.14: - .long 0x00800000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanhl.S deleted file mode 100644 index af73cb76de..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanhl.S +++ /dev/null @@ -1,2875 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catanhl.c" - .text -..TXTST0: -# -- Begin catanhl - .text - .align 16,0x90 - .globl catanhl -catanhl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.17@GOTOFF(%ebx) - movl %edx, 28(%esp) - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) -..B1.2: - fnstcw 2(%esp) -..B1.3: - movzwl 2(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.54 -..B1.4: - orl $-64768, %ecx - movw %cx, (%esp) -..B1.5: - fldcw (%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 20(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - jge ..B1.14 -..B1.8: - testl %ecx, %ecx - jle ..B1.34 -..B1.9: - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.15 -..B1.10: - testl %edx, %edx - jle ..B1.32 -..B1.11: - fldt 12(%ebp) - addl $-32, %esp - fstpt (%esp) - fldt 24(%ebp) - fstpt 12(%esp) - call recatanhl -..B1.57: - addl $32, %esp -..B1.12: - fldt 24(%ebp) - fxch %st(1) - fstpt 4(%esp) - addl $-32, %esp - fldt 12(%ebp) - fstpt (%esp) - fstpt 12(%esp) - call imcatanhl -..B1.58: - addl $32, %esp -..B1.13: - fstpt 16(%esp) - jmp ..B1.28 -..B1.14: - movzwl 32(%ebp), %edx - andl $32767, %edx -..B1.15: - cmpl $32767, %ecx - je ..B1.46 -..B1.16: - cmpl $32767, %edx - je ..B1.40 -..B1.17: - cmpl $32767, %edx - jge ..B1.27 -..B1.18: - movl 16(%ebp), %edx - testl %edx, %edx - jne ..B1.20 -..B1.19: - cmpl $0, 12(%ebp) - je ..B1.27 -..B1.20: - cmpl $16383, %ecx - jge ..B1.22 -..B1.21: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call atanhl@PLT -..B1.59: - fldt 48+_CONSTANTS@GOTOFF(%ebx) - addl $16, %esp - movzbl 33(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - fxch %st(1) - fstpt 4(%esp) - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - fldt _CONSTANTS@GOTOFF(%ebx,%edx) - fmulp %st, %st(1) - fstpt 16(%esp) - jmp ..B1.28 -..B1.22: - je ..B1.37 -..B1.23: - cmpl $32767, %ecx - jl ..B1.25 -..B1.24: - fldt 48+_CONSTANTS@GOTOFF(%ebx) - movzbl 21(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - movzbl 33(%ebp), %ecx - fldt _CONSTANTS@GOTOFF(%ebx,%edx) - andl $128, %ecx - fmulp %st, %st(1) - shrl $7, %ecx - fstpt 4(%esp) - addl $-16, %esp - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - fldt _CONSTANTS@GOTOFF(%ebx,%edx) - fstpt (%esp) - call asinl@PLT - jmp ..B1.63 -..B1.25: - fldt 12(%ebp) - addl $-32, %esp - fstpt (%esp) - fldt 24(%ebp) - fstpt 12(%esp) - call recatanhl -..B1.61: - addl $32, %esp -..B1.26: - movzbl 33(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - fstpt 4(%esp) - addl $-16, %esp - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - fldt _CONSTANTS@GOTOFF(%ebx,%edx) - fstpt (%esp) - call asinl@PLT - jmp ..B1.63 -..B1.27: - fldt 48+_CONSTANTS@GOTOFF(%ebx) - fldt 24(%ebp) - movzbl 21(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - fldt _CONSTANTS@GOTOFF(%ebx,%edx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 4(%esp) - addl $-16, %esp - fstpt (%esp) - call atanl@PLT -..B1.63: - addl $16, %esp - fstpt 16(%esp) -..B1.28: - testl %edi, %edi - je ..B1.30 -..B1.29: - fldcw 2(%esp) -..B1.30: - movl 4(%esp), %edx - movl %edx, (%esi) - movl 16(%esp), %edx - movl %edx, 12(%esi) - movl 20(%esp), %edx - movl %edx, 16(%esi) - movl 8(%esp), %ecx - movl 12(%esp), %edi - movl 24(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 28(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.39 -..B1.31: - movl %esi, %eax - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.32: - cmpl $0, 28(%ebp) - jne ..B1.11 -..B1.33: - cmpl $0, 24(%ebp) - jne ..B1.11 - jmp ..B1.15 -..B1.34: - cmpl $0, 16(%ebp) - jne ..B1.9 -..B1.35: - cmpl $0, 12(%ebp) - jne ..B1.9 - jmp ..B1.14 -..B1.37: - cmpl $-2147483648, %edx - jne ..B1.23 -..B1.38: - cmpl $0, 12(%ebp) - je ..B1.21 - jmp ..B1.23 -..B1.39: - call __stack_chk_fail@PLT -..B1.40: - cmpl $-2147483648, 28(%ebp) - jne ..B1.42 -..B1.41: - cmpl $0, 24(%ebp) - je ..B1.17 -..B1.42: - cmpl $32767, %ecx - jge ..B1.17 -..B1.43: - cmpl $0, 16(%ebp) - jne ..B1.45 -..B1.44: - cmpl $0, 12(%ebp) - je ..B1.17 -..B1.45: - fldt 24(%ebp) - fmul %st(0), %st - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) - jmp ..B1.28 -..B1.46: - cmpl $-2147483648, 16(%ebp) - jne ..B1.48 -..B1.47: - cmpl $0, 12(%ebp) - je ..B1.16 -..B1.48: - cmpl $32767, %edx - jge ..B1.50 -..B1.49: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) - jmp ..B1.28 -..B1.50: - cmpl $-2147483648, 28(%ebp) - jne ..B1.53 -..B1.51: - cmpl $0, 24(%ebp) - jne ..B1.53 -..B1.52: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 12(%ebp) - fldt 48+_CONSTANTS@GOTOFF(%ebx) - fstpt 4(%esp) - addl $-16, %esp - fldt 24(%ebp) - fstpt (%esp) - call atanl@PLT - jmp ..B1.63 -..B1.53: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 4(%esp) - fldt 24(%ebp) - fmul %st(0), %st - fstpt 16(%esp) - jmp ..B1.28 -..B1.54: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type catanhl,@function - .size catanhl,.-catanhl - .data -# -- End catanhl - .text -# -- Begin recatanhl - .text - .align 16,0x90 -recatanhl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $436, %esp - fldt 8(%ebp) - call ..L4 -..L4: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%edx), %edx - movl %edx, 76(%esp) - movl %gs:20, %eax - fldt 48+_CONSTANTS@GOTOFF(%edx) - xorl %esp, %eax - movl %eax, 388(%esp) - movl $0, 160(%esp) - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(1) - fstpt 136(%esp) - fstpt 148(%esp) - addl $4, %esp - lea 132(%esp), %ecx - pushl %ecx - call __libm_normalizel_k80 -..B2.2: - fldt 20(%ebp) - movl $0, 188(%esp) - fstpt 164(%esp) - fldt 32(%esp) - fstpt 176(%esp) - addl $4, %esp - lea 160(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.3: - fldt 32(%esp) - xorl %esi, %esi - movl 76(%esp), %eax - movzwl 144(%esp), %ecx - movl %ecx, %ebx - andl $32767, %ebx - movl %esi, 216(%esp) - cmpl $8383, %ebx - fstpt 204(%esp) - fldt _CONSTANTS@GOTOFF(%eax) - fstpt 192(%esp) - jl ..B2.7 -..B2.4: - cmpl $24383, %ebx - jg ..B2.7 -..B2.5: - movzwl 200(%esp), %edx - movl %edx, 44(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B2.7 -..B2.6: - cmpl $24383, %edx - jle ..B2.10 -..B2.7: - addl $4, %esp - lea 132(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.8: - addl $4, %esp - lea 188(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.9: - movzwl 144(%esp), %ecx - movl %ecx, %ebx - movzwl 200(%esp), %edx - andl $32767, %ebx - movl 216(%esp), %esi - movl %edx, 44(%esp) - andl $32767, %edx -..B2.10: - movl 160(%esp), %eax - movl %eax, 48(%esp) - lea (%ebx,%eax), %edi - movl %edi, 32(%esp) - lea -134(%esi,%edx), %eax - cmpl %eax, %edi - jle ..B2.27 -..B2.11: - movl 140(%esp), %eax - lea 134(%esi,%edx), %edi - cmpl 32(%esp), %edi - jle ..B2.28 -..B2.12: - testl %eax, %eax - jne ..B2.14 -..B2.13: - cmpl $0, 136(%esp) - je ..B2.29 -..B2.14: - cmpl $0, 196(%esp) - jne ..B2.16 -..B2.15: - cmpl $0, 192(%esp) - je ..B2.28 -..B2.16: - cmpl 48(%esp), %esi - je ..B2.18 -..B2.17: - fldt 136(%esp) - fldt 148(%esp) - movl 48(%esp), %eax - subl %esi, %eax - andb $127, 41(%esp) - addl $16383, %eax - movzwl 40(%esp), %edx - andl $32767, %eax - andl $-32768, %edx - orl %eax, %edx - movw %dx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %esi, 160(%esp) - fxch %st(2) - fstpt 136(%esp) - fldt 136(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 148(%esp) - fldt 148(%esp) - movzwl 144(%esp), %ecx - jmp ..B2.19 -..B2.18: - fldt 136(%esp) - fldt 148(%esp) -..B2.19: - fldt 192(%esp) - andl $32767, %ecx - movl 44(%esp), %eax - fld %st(2) - andl $32767, %eax - fadd %st(1), %st - movl %esi, 244(%esp) - cmpl %eax, %ecx - jg ..B2.24 -..B2.20: - jne ..B2.25 -..B2.21: - movl 140(%esp), %eax - movl 196(%esp), %edx - cmpl %edx, %eax - ja ..B2.24 -..B2.22: - jne ..B2.25 -..B2.23: - movl 136(%esp), %eax - cmpl 192(%esp), %eax - jbe ..B2.25 -..B2.24: - fldt 204(%esp) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - jmp ..B2.26 -..B2.25: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 204(%esp) - faddp %st, %st(2) -..B2.26: - fld %st(1) - fadd %st(1), %st - fstpt 220(%esp) - fldt 220(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 232(%esp) - jmp ..B2.33 -..B2.27: - movl 140(%esp), %eax -..B2.28: - testl %eax, %eax - jne ..B2.30 -..B2.162: - cmpl $0, 136(%esp) -..B2.29: - je ..B2.31 -..B2.30: - lea -16517(%esi,%edx), %ecx - movl 48(%esp), %edx - lea -16383(%edx,%ebx), %ebx - cmpl %ebx, %ecx - jl ..B2.32 -..B2.31: - movl 192(%esp), %eax - movl %eax, 220(%esp) - movl 196(%esp), %edx - movl 200(%esp), %ecx - movl 204(%esp), %ebx - movl 208(%esp), %esi - movl 212(%esp), %edi - movl 216(%esp), %eax - movl %edx, 224(%esp) - movl %ecx, 228(%esp) - movl %ebx, 232(%esp) - movl %esi, 236(%esp) - movl %edi, 240(%esp) - movl %eax, 244(%esp) - jmp ..B2.33 -..B2.32: - movl %eax, 224(%esp) - movl 136(%esp), %edx - movl 144(%esp), %eax - movl 148(%esp), %ecx - movl 152(%esp), %ebx - movl 156(%esp), %esi - movl 48(%esp), %edi - movl %edx, 220(%esp) - movl %eax, 228(%esp) - movl %ecx, 232(%esp) - movl %ebx, 236(%esp) - movl %esi, 240(%esp) - movl %edi, 244(%esp) -..B2.33: - movzwl 228(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.35 -..B2.34: - cmpl $24383, %eax - jle ..B2.37 -..B2.35: - addl $4, %esp - lea 216(%esp), %ebx - pushl %ebx - call __libm_normalizel_k80 -..B2.36: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B2.37: - fldt 220(%esp) - movl 76(%esp), %edx - fld %st(0) - fld %st(1) - fld %st(2) - fldt 232(%esp) - fmulp %st, %st(4) - movl 244(%esp), %eax - fxch %st(3) - fadd %st(0), %st - fldt 60+_CONSTANTS@GOTOFF(%edx) - addl %eax, %eax - fmul %st, %st(3) - movl %eax, 272(%esp) - fxch %st(2) - fsub %st(3), %st - movzwl 172(%esp), %eax - faddp %st, %st(3) - fld %st(2) - andl $32767, %eax - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(4) - fmul %st(4), %st - cmpl $8383, %eax - fadd %st(0), %st - fxch %st(2) - fstpt 48(%esp) - fxch %st(3) - fmul %st(0), %st - fld %st(1) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 248(%esp) - fldt 248(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 260(%esp) - jl ..B2.39 -..B2.38: - cmpl $24383, %eax - jle ..B2.41 -..B2.39: - addl $4, %esp - lea 160(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.40: - addl $4, %esp - lea 160(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.41: - fldt 164(%esp) - fld %st(0) - fld %st(1) - fldt 48(%esp) - fldt 176(%esp) - fmul %st(4), %st - movzwl 256(%esp), %ecx - movl %ecx, %ebx - andl $32767, %ebx - fadd %st(0), %st - fxch %st(4) - fmulp %st, %st(1) - movl 188(%esp), %esi - fsubr %st, %st(2) - addl %esi, %esi - faddp %st, %st(2) - fld %st(1) - cmpl $8383, %ebx - fmul %st(2), %st - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(2) - movl %esi, 300(%esp) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsub %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(1) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 276(%esp) - fldt 276(%esp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 288(%esp) - fstpt 64(%esp) - jl ..B2.45 -..B2.42: - cmpl $24383, %ebx - jg ..B2.45 -..B2.43: - movzwl 284(%esp), %edx - movl %edx, 44(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B2.45 -..B2.44: - cmpl $24383, %edx - jle ..B2.48 -..B2.45: - addl $4, %esp - lea 244(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.46: - addl $4, %esp - lea 272(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.47: - movzwl 256(%esp), %ecx - movl %ecx, %ebx - movzwl 284(%esp), %edx - andl $32767, %ebx - movl 300(%esp), %esi - movl %edx, 44(%esp) - andl $32767, %edx -..B2.48: - movl 272(%esp), %eax - movl %eax, 80(%esp) - lea (%ebx,%eax), %edi - movl %edi, 60(%esp) - lea -134(%esi,%edx), %eax - cmpl %eax, %edi - jle ..B2.65 -..B2.49: - movl 252(%esp), %eax - lea 134(%esi,%edx), %edi - cmpl 60(%esp), %edi - jle ..B2.66 -..B2.50: - testl %eax, %eax - jne ..B2.52 -..B2.51: - cmpl $0, 248(%esp) - je ..B2.67 -..B2.52: - cmpl $0, 280(%esp) - jne ..B2.54 -..B2.53: - cmpl $0, 276(%esp) - je ..B2.66 -..B2.54: - cmpl 80(%esp), %esi - je ..B2.56 -..B2.55: - fldt 64(%esp) - movl 80(%esp), %eax - fstpt 32(%esp) - subl %esi, %eax - fldt 248(%esp) - addl $16383, %eax - fldt 260(%esp) - andl $32767, %eax - andb $127, 41(%esp) - movzwl 40(%esp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %esi, 272(%esp) - fxch %st(2) - fstpt 248(%esp) - fldt 248(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 260(%esp) - fldt 260(%esp) - fxch %st(1) - fstpt 64(%esp) - movzwl 256(%esp), %ecx - jmp ..B2.57 -..B2.56: - fldt 248(%esp) - fstpt 64(%esp) - fldt 260(%esp) -..B2.57: - fldt 276(%esp) - andl $32767, %ecx - fldt 64(%esp) - movl 44(%esp), %eax - andl $32767, %eax - fadd %st(1), %st - movl %esi, 328(%esp) - cmpl %eax, %ecx - jg ..B2.62 -..B2.58: - jne ..B2.63 -..B2.59: - movl 252(%esp), %eax - movl 280(%esp), %edx - cmpl %edx, %eax - ja ..B2.62 -..B2.60: - jne ..B2.63 -..B2.61: - movl 248(%esp), %eax - cmpl 276(%esp), %eax - jbe ..B2.63 -..B2.62: - fldt 64(%esp) - fsub %st(1), %st - faddp %st, %st(2) - fldt 288(%esp) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 64(%esp) - jmp ..B2.64 -..B2.63: - fldt 64(%esp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 288(%esp) - faddp %st, %st(1) - fstpt 64(%esp) -..B2.64: - fldt 64(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 304(%esp) - fldt 304(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 316(%esp) - jmp ..B2.71 -..B2.65: - movl 252(%esp), %eax -..B2.66: - testl %eax, %eax - jne ..B2.68 -..B2.164: - cmpl $0, 248(%esp) -..B2.67: - je ..B2.69 -..B2.68: - lea -16517(%esi,%edx), %ecx - movl 80(%esp), %edx - lea -16383(%edx,%ebx), %ebx - cmpl %ebx, %ecx - jl ..B2.70 -..B2.69: - movl 276(%esp), %eax - movl %eax, 304(%esp) - movl 280(%esp), %edx - movl 284(%esp), %ecx - movl 288(%esp), %ebx - movl 292(%esp), %esi - movl 296(%esp), %edi - movl 300(%esp), %eax - movl %edx, 308(%esp) - movl %ecx, 312(%esp) - movl %ebx, 316(%esp) - movl %esi, 320(%esp) - movl %edi, 324(%esp) - movl %eax, 328(%esp) - jmp ..B2.71 -..B2.70: - movl %eax, 308(%esp) - movl 248(%esp), %edx - movl 256(%esp), %eax - movl 260(%esp), %ecx - movl 264(%esp), %ebx - movl 268(%esp), %esi - movl 80(%esp), %edi - movl %edx, 304(%esp) - movl %eax, 312(%esp) - movl %ecx, 316(%esp) - movl %ebx, 320(%esp) - movl %esi, 324(%esp) - movl %edi, 328(%esp) -..B2.71: - movzwl 144(%esp), %ebx - movl %ebx, %esi - andl $32767, %esi - cmpl $8383, %esi - jl ..B2.75 -..B2.72: - cmpl $24383, %esi - jg ..B2.75 -..B2.73: - movzwl 200(%esp), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B2.75 -..B2.74: - cmpl $24383, %ecx - jle ..B2.78 -..B2.75: - addl $4, %esp - lea 132(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.76: - addl $4, %esp - lea 188(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.77: - movzwl 144(%esp), %ebx - movl %ebx, %esi - movzwl 200(%esp), %ecx - andl $32767, %esi - movl %ecx, 44(%esp) - andl $32767, %ecx -..B2.78: - movl 160(%esp), %eax - movl 216(%esp), %edx - movl %eax, 80(%esp) - lea (%esi,%eax), %edi - movl %edi, 60(%esp) - lea -134(%edx,%ecx), %eax - cmpl %eax, %edi - jle ..B2.95 -..B2.79: - movl 140(%esp), %eax - lea 134(%edx,%ecx), %edi - cmpl 60(%esp), %edi - jle ..B2.96 -..B2.80: - testl %eax, %eax - jne ..B2.82 -..B2.81: - cmpl $0, 136(%esp) - je ..B2.97 -..B2.82: - cmpl $0, 196(%esp) - jne ..B2.84 -..B2.83: - cmpl $0, 192(%esp) - je ..B2.96 -..B2.84: - cmpl 80(%esp), %edx - je ..B2.86 -..B2.85: - fldt 64(%esp) - movl 80(%esp), %eax - fstpt 32(%esp) - subl %edx, %eax - fldt 136(%esp) - addl $16383, %eax - fldt 148(%esp) - andl $32767, %eax - andb $127, 41(%esp) - movzwl 40(%esp), %ecx - andl $-32768, %ecx - orl %eax, %ecx - movw %cx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 160(%esp) - fxch %st(2) - fstpt 136(%esp) - fldt 136(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 148(%esp) - fldt 148(%esp) - movzwl 144(%esp), %ebx - jmp ..B2.87 -..B2.86: - fldt 136(%esp) - fldt 148(%esp) -..B2.87: - fldt 192(%esp) - andl $32767, %ebx - movl 44(%esp), %eax - fld %st(2) - andl $32767, %eax - fsub %st(1), %st - movl %edx, 244(%esp) - cmpl %eax, %ebx - jg ..B2.92 -..B2.88: - jne ..B2.93 -..B2.89: - movl 140(%esp), %eax - movl 196(%esp), %edx - cmpl %edx, %eax - ja ..B2.92 -..B2.90: - jne ..B2.93 -..B2.91: - movl 136(%esp), %eax - cmpl 192(%esp), %eax - jbe ..B2.93 -..B2.92: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 204(%esp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - jmp ..B2.94 -..B2.93: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 204(%esp) - fsubrp %st, %st(2) -..B2.94: - fld %st(1) - fadd %st(1), %st - fstpt 220(%esp) - fldt 220(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 232(%esp) - jmp ..B2.101 -..B2.95: - movl 140(%esp), %eax -..B2.96: - testl %eax, %eax - jne ..B2.98 -..B2.161: - cmpl $0, 136(%esp) -..B2.97: - je ..B2.99 -..B2.98: - lea -16517(%edx,%ecx), %ebx - movl 80(%esp), %ecx - lea -16383(%ecx,%esi), %esi - cmpl %esi, %ebx - jl ..B2.100 -..B2.99: - fldt 192(%esp) - fchs - movl %edx, 244(%esp) - fstpt 220(%esp) - fldt 204(%esp) - fchs - fstpt 232(%esp) - jmp ..B2.101 -..B2.100: - movl %eax, 224(%esp) - movl 136(%esp), %edx - movl 144(%esp), %eax - movl 148(%esp), %ecx - movl 152(%esp), %ebx - movl 156(%esp), %esi - movl 80(%esp), %edi - movl %edx, 220(%esp) - movl %eax, 228(%esp) - movl %ecx, 232(%esp) - movl %ebx, 236(%esp) - movl %esi, 240(%esp) - movl %edi, 244(%esp) -..B2.101: - movzwl 228(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.103 -..B2.102: - cmpl $24383, %eax - jle ..B2.105 -..B2.103: - addl $4, %esp - lea 216(%esp), %ebx - pushl %ebx - call __libm_normalizel_k80 -..B2.104: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B2.105: - fldt 220(%esp) - fld %st(0) - fld %st(1) - fldt 48(%esp) - fldt 232(%esp) - fxch %st(1) - fmul %st(4), %st - movl 244(%esp), %ebx - fsubr %st, %st(3) - addl %ebx, %ebx - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(2) - fsub %st(3), %st - fmul %st, %st(3) - movl %ebx, 272(%esp) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(1) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 248(%esp) - fldt 248(%esp) - fsubrp %st, %st(2) - movzwl 256(%esp), %ecx - fadd %st, %st(1) - movl %ecx, 84(%esp) - andl $32767, %ecx - fxch %st(1) - fstpt 260(%esp) - cmpl $8383, %ecx - fstpt 64(%esp) - jl ..B2.109 -..B2.106: - cmpl $24383, %ecx - jg ..B2.109 -..B2.107: - movzwl 284(%esp), %eax - movl %eax, 60(%esp) - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.109 -..B2.108: - cmpl $24383, %eax - jle ..B2.112 -..B2.109: - addl $4, %esp - lea 244(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.110: - addl $4, %esp - lea 272(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.111: - movzwl 256(%esp), %ecx - movzwl 284(%esp), %eax - movl 272(%esp), %ebx - movl %ecx, 84(%esp) - andl $32767, %ecx - movl %eax, 60(%esp) - andl $32767, %eax -..B2.112: - movl 300(%esp), %edx - lea (%ebx,%ecx), %esi - movl %esi, 80(%esp) - lea -134(%edx,%eax), %edi - cmpl %edi, %esi - jle ..B2.129 -..B2.113: - movl 252(%esp), %esi - lea 134(%edx,%eax), %edi - movl %esi, 44(%esp) - cmpl 80(%esp), %edi - jle ..B2.130 -..B2.114: - cmpl $0, 44(%esp) - jne ..B2.116 -..B2.115: - cmpl $0, 248(%esp) - je ..B2.131 -..B2.116: - cmpl $0, 280(%esp) - jne ..B2.118 -..B2.117: - cmpl $0, 276(%esp) - je ..B2.130 -..B2.118: - cmpl %edx, %ebx - je ..B2.120 -..B2.119: - fldt 64(%esp) - subl %edx, %ebx - fstpt 32(%esp) - addl $16383, %ebx - fldt 248(%esp) - andl $32767, %ebx - fldt 260(%esp) - andb $127, 41(%esp) - movzwl 40(%esp), %eax - andl $-32768, %eax - orl %ebx, %eax - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 272(%esp) - fxch %st(2) - fstpt 248(%esp) - fldt 248(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 260(%esp) - fldt 260(%esp) - movzwl 256(%esp), %ecx - movl %ecx, 84(%esp) - jmp ..B2.121 -..B2.120: - fldt 248(%esp) - fldt 260(%esp) -..B2.121: - fldt 276(%esp) - fld %st(2) - movl 84(%esp), %eax - fadd %st(1), %st - movl 60(%esp), %ecx - andl $32767, %eax - andl $32767, %ecx - movl %edx, 356(%esp) - cmpl %ecx, %eax - jg ..B2.126 -..B2.122: - jne ..B2.127 -..B2.123: - movl 252(%esp), %eax - movl 280(%esp), %ecx - cmpl %ecx, %eax - ja ..B2.126 -..B2.124: - jne ..B2.127 -..B2.125: - movl 248(%esp), %eax - cmpl 276(%esp), %eax - jbe ..B2.127 -..B2.126: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 288(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.128 -..B2.127: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 288(%esp) - faddp %st, %st(1) -..B2.128: - fld %st(0) - fadd %st(2), %st - fstpt 332(%esp) - fldt 332(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 344(%esp) - jmp ..B2.135 -..B2.129: - movl 252(%esp), %esi - movl %esi, 44(%esp) -..B2.130: - cmpl $0, 44(%esp) - jne ..B2.132 -..B2.163: - cmpl $0, 248(%esp) -..B2.131: - je ..B2.133 -..B2.132: - lea -16517(%edx,%eax), %eax - lea -16383(%ebx,%ecx), %ecx - cmpl %ecx, %eax - jl ..B2.134 -..B2.133: - movl 276(%esp), %eax - movl %eax, 332(%esp) - movl 280(%esp), %ecx - movl 284(%esp), %ebx - movl 288(%esp), %esi - movl 292(%esp), %edi - movl 296(%esp), %eax - movl %ecx, 336(%esp) - movl %ebx, 340(%esp) - movl %esi, 344(%esp) - movl %edi, 348(%esp) - movl %eax, 352(%esp) - movl %edx, 356(%esp) - jmp ..B2.135 -..B2.134: - movl %esi, %edx - movl %edx, 336(%esp) - movl 248(%esp), %eax - movl 256(%esp), %ecx - movl 260(%esp), %ebx - movl 264(%esp), %esi - movl 268(%esp), %edi - movl 272(%esp), %edx - movl %eax, 332(%esp) - movl %ecx, 340(%esp) - movl %ebx, 344(%esp) - movl %esi, 348(%esp) - movl %edi, 352(%esp) - movl %edx, 356(%esp) -..B2.135: - movzwl 312(%esp), %esi - movzwl 340(%esp), %eax - andl $32767, %esi - andl $32767, %eax - movl 328(%esp), %edi - lea (%edi,%esi), %ebx - lea (%edx,%eax), %ecx - subl %ecx, %ebx - cmpl $-1, %ebx - jge ..B2.145 -..B2.136: - cmpl $8383, %esi - jl ..B2.140 -..B2.137: - cmpl $24383, %esi - jg ..B2.140 -..B2.138: - cmpl $8383, %eax - jl ..B2.140 -..B2.139: - cmpl $24383, %eax - jle ..B2.143 -..B2.140: - addl $4, %esp - lea 300(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.141: - addl $4, %esp - lea 328(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.142: - movl 328(%esp), %edi - movl 356(%esp), %edx -..B2.143: - fldt 332(%esp) - subl %edx, %edi - fld %st(0) - fld %st(1) - fldt 304(%esp) - fld %st(0) - fdiv %st(4), %st - fldt 48(%esp) - fld %st(0) - fmul %st(2), %st - fld %st(0) - movl %edi, 104(%esp) - fsubr %st(3), %st - faddp %st, %st(1) - fld %st(0) - fsubr %st(3), %st - fxch %st(2) - fmul %st(7), %st - fsubr %st, %st(6) - faddp %st, %st(6) - fxch %st(4) - fsub %st(5), %st - fld %st(4) - fmul %st(6), %st - fxch %st(2) - fmul %st, %st(6) - fxch %st(1) - fmul %st, %st(5) - fxch %st(6) - faddp %st, %st(5) - fld %st(4) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fsubp %st, %st(1) - fldt 316(%esp) - faddp %st, %st(1) - fldt 344(%esp) - fmul %st(2), %st - fsubrp %st, %st(1) - fdivp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 80(%esp) - fldt 80(%esp) - fsubrp %st, %st(1) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - faddp %st, %st(1) - fstpt 92(%esp) - addl $8, %esp - lea 72(%esp), %eax - lea 352(%esp), %edx - pushl %eax - pushl %edx - call __libm_log_k80 - jmp ..B2.153 -..B2.145: - movzwl 144(%esp), %ecx - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B2.149 -..B2.146: - cmpl $24383, %ecx - jg ..B2.149 -..B2.147: - cmpl $8383, %eax - jl ..B2.149 -..B2.148: - cmpl $24383, %eax - jle ..B2.152 -..B2.149: - addl $4, %esp - lea 132(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.150: - addl $4, %esp - lea 328(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.151: - movl 356(%esp), %edx -..B2.152: - fldt 136(%esp) - fld %st(0) - fldt 332(%esp) - fdivr %st, %st(1) - fld %st(0) - fld %st(1) - fldt 48(%esp) - fld %st(0) - fmul %st(5), %st - fld %st(0) - movl 160(%esp), %eax - fsubr %st(6), %st - subl %edx, %eax - faddp %st, %st(1) - fld %st(0) - addl $2, %eax - movl %eax, 132(%esp) - fsubr %st(6), %st - fxch %st(2) - fmul %st(5), %st - fsubr %st, %st(4) - faddp %st, %st(4) - fxch %st(2) - fsub %st(3), %st - fld %st(2) - fmul %st(4), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fsubrp %st, %st(3) - fldt 148(%esp) - faddp %st, %st(3) - fldt 344(%esp) - fmul %st(2), %st - fsubrp %st, %st(3) - fdivrp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 108(%esp) - fldt 108(%esp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 120(%esp) - fstpt 32(%esp) - addl $8, %esp - lea 100(%esp), %edx - lea 352(%esp), %ecx - pushl %edx - pushl %ecx - call __libm_log1p_k80 -..B2.153: - movl 384(%esp), %eax - addl $-2, %eax - movl %eax, 384(%esp) -..B2.154: - fldt 360(%esp) - fstpt (%esp) - fldt 372(%esp) - fstpt 12(%esp) - movl %eax, 24(%esp) - call __libm_scalbl_k80 -..B2.155: - movl 388(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.157 -..B2.156: - addl $436, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.157: - fstp %st(0) - movl 76(%esp), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type recatanhl,@function - .size recatanhl,.-recatanhl - .data -# -- End recatanhl - .text -# -- Begin imcatanhl - .text - .align 16,0x90 -imcatanhl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B3.1: -..L5: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $436, %esp - fldt 8(%ebp) - movzbl 17(%ebp), %esi - andl $128, %esi - call ..L6 -..L6: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L6](%eax), %eax - shrl $7, %esi - movl %eax, 88(%esp) - fldt 48+_CONSTANTS@GOTOFF(%eax) - movl %gs:20, %edx - xorl %esp, %edx - lea (,%esi,8), %ebx - movl %edx, 428(%esp) - lea (%ebx,%esi,4), %edi - fldt _CONSTANTS@GOTOFF(%eax,%edi) - movzbl 29(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fmulp %st, %st(2) - movl $0, 256(%esp) - lea (,%edx,8), %ecx - fxch %st(1) - fstpt 232(%esp) - lea (%ecx,%edx,4), %ecx - fstpt 32(%esp) - fldt 32(%esp) - fstpt 244(%esp) - fldt 24+_CONSTANTS@GOTOFF(%eax,%ecx) - fstpt 48(%esp) - addl $4, %esp - lea 228(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.2: - fldt 20(%ebp) - fldt 32(%esp) - movzbl 29(%ebp), %edx - andl $128, %edx - shrl $7, %edx - movl 88(%esp), %ecx - movl $0, 284(%esp) - fstpt 272(%esp) - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ebx - fldt _CONSTANTS@GOTOFF(%ecx,%ebx) - fmulp %st, %st(1) - fstpt 260(%esp) - addl $4, %esp - lea 256(%esp), %esi - pushl %esi - call __libm_normalizel_k80 -..B3.3: - fldt 32(%esp) - movl 88(%esp), %eax - movl $0, 312(%esp) - fstpt 300(%esp) - fldt _CONSTANTS@GOTOFF(%eax) - movzwl 240(%esp), %eax - andl $32767, %eax - fstpt 288(%esp) - cmpl $8383, %eax - jl ..B3.5 -..B3.4: - cmpl $24383, %eax - jle ..B3.7 -..B3.5: - addl $4, %esp - lea 228(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.6: - addl $4, %esp - lea 228(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.7: - fldt 232(%esp) - movl 88(%esp), %edx - fld %st(0) - fld %st(1) - fld %st(2) - fld %st(3) - fldt 60+_CONSTANTS@GOTOFF(%edx) - fmul %st, %st(4) - movl 256(%esp), %eax - fxch %st(3) - fsubr %st(4), %st - fld %st(0) - addl %eax, %eax - fchs - movl %eax, 340(%esp) - fadd %st(5), %st - fld %st(0) - fxch %st(2) - fsubrp %st, %st(6) - fxch %st(1) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - fsub %st(5), %st - fmul %st, %st(2) - fxch %st(3) - fmul %st, %st(5) - movzwl 268(%esp), %eax - fxch %st(5) - faddp %st, %st(2) - fxch %st(4) - fmulp %st, %st(2) - fxch %st(2) - fstpt 32(%esp) - fld %st(1) - andl $32767, %eax - fadd %st(3), %st - cmpl $8383, %eax - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 244(%esp) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 316(%esp) - fldt 316(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 328(%esp) - jl ..B3.9 -..B3.8: - cmpl $24383, %eax - jle ..B3.11 -..B3.9: - addl $4, %esp - lea 256(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.10: - addl $4, %esp - lea 256(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.11: - fldt 260(%esp) - fld %st(0) - fld %st(1) - fldt 32(%esp) - fmul %st(3), %st - movzwl 296(%esp), %ebx - movl %ebx, %esi - andl $32767, %esi - fsubr %st, %st(2) - movl 284(%esp), %eax - faddp %st, %st(2) - fld %st(1) - addl %eax, %eax - fmul %st(2), %st - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(2) - cmpl $8383, %esi - movl %eax, 368(%esp) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fldt 272(%esp) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 344(%esp) - fldt 344(%esp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 356(%esp) - fstpt 64(%esp) - jl ..B3.15 -..B3.12: - cmpl $24383, %esi - jg ..B3.15 -..B3.13: - movzwl 324(%esp), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B3.15 -..B3.14: - cmpl $24383, %ecx - jle ..B3.18 -..B3.15: - addl $4, %esp - lea 284(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.16: - addl $4, %esp - lea 312(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.17: - movzwl 296(%esp), %ebx - movl %ebx, %esi - movzwl 324(%esp), %ecx - andl $32767, %esi - movl %ecx, 44(%esp) - andl $32767, %ecx -..B3.18: - movl 312(%esp), %eax - movl 340(%esp), %edx - movl %eax, 60(%esp) - lea (%esi,%eax), %edi - movl %edi, 32(%esp) - lea -134(%edx,%ecx), %eax - cmpl %eax, %edi - jle ..B3.35 -..B3.19: - movl 292(%esp), %eax - lea 134(%edx,%ecx), %edi - cmpl 32(%esp), %edi - jle ..B3.36 -..B3.20: - testl %eax, %eax - jne ..B3.22 -..B3.21: - cmpl $0, 288(%esp) - je ..B3.37 -..B3.22: - cmpl $0, 320(%esp) - jne ..B3.24 -..B3.23: - cmpl $0, 316(%esp) - je ..B3.36 -..B3.24: - cmpl 60(%esp), %edx - je ..B3.26 -..B3.25: - fldt 64(%esp) - movl 60(%esp), %eax - fstpt 32(%esp) - subl %edx, %eax - fldt 288(%esp) - addl $16383, %eax - fldt 300(%esp) - andl $32767, %eax - andb $127, 41(%esp) - movzwl 40(%esp), %ecx - andl $-32768, %ecx - orl %eax, %ecx - movw %cx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 312(%esp) - fxch %st(2) - fstpt 288(%esp) - fldt 288(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 300(%esp) - fldt 300(%esp) - fxch %st(1) - fstpt 64(%esp) - movzwl 296(%esp), %ebx - jmp ..B3.27 -..B3.26: - fldt 288(%esp) - fstpt 64(%esp) - fldt 300(%esp) -..B3.27: - fldt 316(%esp) - andl $32767, %ebx - fldt 64(%esp) - movl 44(%esp), %eax - andl $32767, %eax - fsub %st(1), %st - movl %edx, 396(%esp) - cmpl %eax, %ebx - jg ..B3.32 -..B3.28: - jne ..B3.33 -..B3.29: - movl 292(%esp), %eax - movl 320(%esp), %edx - cmpl %edx, %eax - ja ..B3.32 -..B3.30: - jne ..B3.33 -..B3.31: - movl 288(%esp), %eax - cmpl 316(%esp), %eax - jbe ..B3.33 -..B3.32: - fldt 64(%esp) - fsub %st(1), %st - fsubp %st, %st(2) - fldt 328(%esp) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 64(%esp) - jmp ..B3.34 -..B3.33: - fldt 64(%esp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - fldt 328(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) -..B3.34: - fldt 64(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 372(%esp) - fldt 372(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 384(%esp) - jmp ..B3.41 -..B3.35: - movl 292(%esp), %eax -..B3.36: - testl %eax, %eax - jne ..B3.38 -..B3.179: - cmpl $0, 288(%esp) -..B3.37: - je ..B3.39 -..B3.38: - lea -16517(%edx,%ecx), %ebx - movl 60(%esp), %ecx - lea -16383(%ecx,%esi), %esi - cmpl %esi, %ebx - jl ..B3.40 -..B3.39: - fldt 316(%esp) - fchs - movl %edx, 396(%esp) - fstpt 372(%esp) - fldt 328(%esp) - fchs - fstpt 384(%esp) - jmp ..B3.41 -..B3.40: - movl %eax, 376(%esp) - movl 288(%esp), %edx - movl 296(%esp), %eax - movl 300(%esp), %ecx - movl 304(%esp), %ebx - movl 308(%esp), %esi - movl 60(%esp), %edi - movl %edx, 372(%esp) - movl %eax, 380(%esp) - movl %ecx, 384(%esp) - movl %ebx, 388(%esp) - movl %esi, 392(%esp) - movl %edi, 396(%esp) -..B3.41: - movzwl 380(%esp), %ebx - movl %ebx, %esi - andl $32767, %esi - cmpl $8383, %esi - jl ..B3.45 -..B3.42: - cmpl $24383, %esi - jg ..B3.45 -..B3.43: - movzwl 352(%esp), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B3.45 -..B3.44: - cmpl $24383, %ecx - jle ..B3.48 -..B3.45: - addl $4, %esp - lea 368(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.46: - addl $4, %esp - lea 340(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.47: - movzwl 380(%esp), %ebx - movl %ebx, %esi - movzwl 352(%esp), %ecx - andl $32767, %esi - movl %ecx, 44(%esp) - andl $32767, %ecx -..B3.48: - movl 368(%esp), %edx - movl 396(%esp), %eax - movl %eax, 76(%esp) - lea (%esi,%eax), %edi - movl %edi, 60(%esp) - lea -134(%edx,%ecx), %eax - cmpl %eax, %edi - jle ..B3.65 -..B3.49: - movl 376(%esp), %eax - lea 134(%edx,%ecx), %edi - cmpl 60(%esp), %edi - jle ..B3.66 -..B3.50: - testl %eax, %eax - jne ..B3.52 -..B3.51: - cmpl $0, 372(%esp) - je ..B3.67 -..B3.52: - cmpl $0, 348(%esp) - jne ..B3.54 -..B3.53: - cmpl $0, 344(%esp) - je ..B3.66 -..B3.54: - cmpl 76(%esp), %edx - je ..B3.56 -..B3.55: - fldt 64(%esp) - movl 76(%esp), %eax - fstpt 32(%esp) - subl %edx, %eax - fldt 372(%esp) - addl $16383, %eax - fldt 384(%esp) - andl $32767, %eax - andb $127, 41(%esp) - movzwl 40(%esp), %ecx - andl $-32768, %ecx - orl %eax, %ecx - movw %cx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 396(%esp) - fxch %st(2) - fstpt 372(%esp) - fldt 372(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 384(%esp) - fldt 384(%esp) - fstpt 64(%esp) - movzwl 380(%esp), %ebx - jmp ..B3.57 -..B3.56: - fldt 372(%esp) - fldt 384(%esp) - fstpt 64(%esp) -..B3.57: - fldt 344(%esp) - andl $32767, %ebx - movl 44(%esp), %eax - fld %st(1) - andl $32767, %eax - fsub %st(1), %st - movl %edx, 424(%esp) - cmpl %eax, %ebx - jg ..B3.62 -..B3.58: - jne ..B3.63 -..B3.59: - movl 376(%esp), %eax - movl 348(%esp), %ecx - cmpl %ecx, %eax - ja ..B3.62 -..B3.60: - jne ..B3.63 -..B3.61: - movl 372(%esp), %eax - cmpl 344(%esp), %eax - jbe ..B3.63 -..B3.62: - fldt 64(%esp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fldt 356(%esp) - fsubrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) - jmp ..B3.64 -..B3.63: - fldt 356(%esp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fldt 64(%esp) - faddp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) -..B3.64: - fldt 64(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 400(%esp) - fldt 400(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 412(%esp) - jmp ..B3.71 -..B3.65: - movl 376(%esp), %eax -..B3.66: - testl %eax, %eax - jne ..B3.68 -..B3.180: - cmpl $0, 372(%esp) -..B3.67: - je ..B3.69 -..B3.68: - lea -16517(%edx,%ecx), %ebx - movl 76(%esp), %ecx - lea -16383(%ecx,%esi), %esi - cmpl %esi, %ebx - jl ..B3.70 -..B3.69: - fldt 344(%esp) - fchs - movl %edx, 424(%esp) - fstpt 400(%esp) - fldt 356(%esp) - fchs - fstpt 412(%esp) - jmp ..B3.71 -..B3.70: - movl 372(%esp), %edx - movl %edx, 400(%esp) - movl %eax, 404(%esp) - movl 380(%esp), %eax - movl 384(%esp), %ecx - movl 388(%esp), %ebx - movl 392(%esp), %esi - movl 76(%esp), %edx - movl %eax, 408(%esp) - movl %ecx, 412(%esp) - movl %ebx, 416(%esp) - movl %esi, 420(%esp) - movl %edx, 424(%esp) -..B3.71: - movzwl 408(%esp), %eax - andl $32767, %eax - lea -16383(%edx,%eax), %edx - cmpl $-6, %edx - jge ..B3.164 -..B3.72: - movzwl 296(%esp), %esi - movl %esi, 84(%esp) - andl $32767, %esi - cmpl $8383, %esi - jl ..B3.76 -..B3.73: - cmpl $24383, %esi - jg ..B3.76 -..B3.74: - movzwl 240(%esp), %eax - movl %eax, 60(%esp) - andl $32767, %eax - movl %eax, 76(%esp) - cmpl $8383, %eax - jl ..B3.76 -..B3.75: - cmpl $24383, 76(%esp) - jle ..B3.79 -..B3.76: - addl $4, %esp - lea 284(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.77: - addl $4, %esp - lea 228(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.78: - movzwl 240(%esp), %eax - movzwl 296(%esp), %esi - movl %eax, 60(%esp) - andl $32767, %eax - movl %eax, 76(%esp) - movl %esi, 84(%esp) - andl $32767, %esi -..B3.79: - movl 256(%esp), %ecx - movl 312(%esp), %edx - lea (%eax,%ecx), %ebx - lea -134(%ecx,%eax), %edi - movl %edi, 80(%esp) - lea (%esi,%edx), %eax - cmpl %eax, %edi - jge ..B3.96 -..B3.80: - movl 292(%esp), %edi - movl %edi, 44(%esp) - movl 76(%esp), %edi - lea 134(%ecx,%edi), %edi - cmpl %edi, %eax - jge ..B3.97 -..B3.81: - cmpl $0, 44(%esp) - jne ..B3.83 -..B3.82: - cmpl $0, 288(%esp) - je ..B3.98 -..B3.83: - cmpl $0, 236(%esp) - jne ..B3.85 -..B3.84: - cmpl $0, 232(%esp) - je ..B3.97 -..B3.85: - cmpl %ecx, %edx - je ..B3.87 -..B3.86: - fldt 64(%esp) - subl %ecx, %edx - fstpt 32(%esp) - addl $16383, %edx - fldt 288(%esp) - andl $32767, %edx - fldt 300(%esp) - andb $127, 41(%esp) - movzwl 40(%esp), %eax - andl $-32768, %eax - orl %edx, %eax - movl %ecx, %edx - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 288(%esp) - fldt 288(%esp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 296(%esp), %esi - movl %esi, 84(%esp) - andl $32767, %esi - movl %ecx, 312(%esp) - movl %esi, %eax - fstpt 300(%esp) - fldt 300(%esp) - jmp ..B3.88 -..B3.87: - fldt 288(%esp) - fldt 300(%esp) - movl 84(%esp), %eax - andl $32767, %eax -..B3.88: - fldt 232(%esp) - fld %st(2) - movl 60(%esp), %edi - fadd %st(1), %st - andl $32767, %edi - movl %ecx, 116(%esp) - cmpl %edi, %eax - jg ..B3.93 -..B3.89: - jne ..B3.94 -..B3.90: - movl 292(%esp), %eax - movl 236(%esp), %edi - cmpl %edi, %eax - ja ..B3.93 -..B3.91: - jne ..B3.94 -..B3.92: - movl 288(%esp), %eax - cmpl 232(%esp), %eax - jbe ..B3.94 -..B3.93: - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 244(%esp) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 64(%esp) - jmp ..B3.95 -..B3.94: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 244(%esp) - faddp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) -..B3.95: - fldt 64(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 92(%esp) - fldt 92(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 104(%esp) - jmp ..B3.102 -..B3.96: - movl 292(%esp), %eax - movl %eax, 44(%esp) -..B3.97: - cmpl $0, 44(%esp) - jne ..B3.99 -..B3.178: - cmpl $0, 288(%esp) -..B3.98: - je ..B3.100 -..B3.99: - movl 76(%esp), %eax - lea -16517(%ecx,%eax), %edi - lea -16383(%edx,%esi), %eax - cmpl %eax, %edi - jl ..B3.101 -..B3.100: - movl 232(%esp), %eax - movl 236(%esp), %edi - movl %eax, 92(%esp) - movl %edi, 96(%esp) - movl 240(%esp), %eax - movl 244(%esp), %edi - movl %eax, 100(%esp) - movl %edi, 104(%esp) - movl 248(%esp), %eax - movl 252(%esp), %edi - movl %eax, 108(%esp) - movl %edi, 112(%esp) - movl %ecx, 116(%esp) - jmp ..B3.102 -..B3.101: - movl 288(%esp), %eax - movl 44(%esp), %edi - movl %eax, 92(%esp) - movl %edi, 96(%esp) - movl 296(%esp), %eax - movl 300(%esp), %edi - movl %eax, 100(%esp) - movl %edi, 104(%esp) - movl 304(%esp), %eax - movl 308(%esp), %edi - movl %eax, 108(%esp) - movl %edi, 112(%esp) - movl %edx, 116(%esp) -..B3.102: - cmpl $8383, %esi - jl ..B3.106 -..B3.103: - cmpl $24383, %esi - jg ..B3.106 -..B3.104: - cmpl $8383, 76(%esp) - jl ..B3.106 -..B3.105: - cmpl $24383, 76(%esp) - jle ..B3.109 -..B3.106: - addl $4, %esp - lea 284(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.107: - addl $4, %esp - lea 228(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.108: - movzwl 240(%esp), %eax - movl %eax, 60(%esp) - andl $32767, %eax - movl 256(%esp), %ecx - movl 312(%esp), %edx - lea -134(%ecx,%eax), %esi - movl %esi, 80(%esp) - movzwl 296(%esp), %esi - lea (%ecx,%eax), %ebx - movl %esi, 84(%esp) - andl $32767, %esi -..B3.109: - lea (%edx,%esi), %eax - movl %eax, 44(%esp) - cmpl 80(%esp), %eax - jle ..B3.126 -..B3.110: - movl 292(%esp), %eax - lea 134(%ebx), %edi - cmpl 44(%esp), %edi - jle ..B3.127 -..B3.111: - testl %eax, %eax - jne ..B3.113 -..B3.112: - cmpl $0, 288(%esp) - je ..B3.128 -..B3.113: - cmpl $0, 236(%esp) - jne ..B3.115 -..B3.114: - cmpl $0, 232(%esp) - je ..B3.127 -..B3.115: - cmpl %ecx, %edx - je ..B3.117 -..B3.116: - fldt 64(%esp) - subl %ecx, %edx - fstpt 32(%esp) - addl $16383, %edx - fldt 288(%esp) - andl $32767, %edx - fldt 300(%esp) - andb $127, 41(%esp) - movzwl 40(%esp), %eax - andl $-32768, %eax - orl %edx, %eax - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %ecx, 312(%esp) - fxch %st(2) - fstpt 288(%esp) - fldt 288(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 300(%esp) - fldt 300(%esp) - movzwl 296(%esp), %edx - fxch %st(1) - fstpt 64(%esp) - movl %edx, 84(%esp) - jmp ..B3.118 -..B3.117: - fldt 288(%esp) - fstpt 64(%esp) - fldt 300(%esp) -..B3.118: - fldt 232(%esp) - fldt 64(%esp) - movl 84(%esp), %eax - movl 60(%esp), %edx - andl $32767, %eax - andl $32767, %edx - fsub %st(1), %st - movl %ecx, 144(%esp) - cmpl %edx, %eax - jg ..B3.123 -..B3.119: - jne ..B3.124 -..B3.120: - movl 292(%esp), %eax - movl 236(%esp), %edx - cmpl %edx, %eax - ja ..B3.123 -..B3.121: - jne ..B3.124 -..B3.122: - movl 288(%esp), %eax - cmpl 232(%esp), %eax - jbe ..B3.124 -..B3.123: - fldt 64(%esp) - fsub %st(1), %st - fsubp %st, %st(2) - fldt 244(%esp) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 64(%esp) - jmp ..B3.125 -..B3.124: - fldt 64(%esp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - fldt 244(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) -..B3.125: - fldt 64(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 120(%esp) - fldt 120(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 132(%esp) - jmp ..B3.132 -..B3.126: - movl 292(%esp), %eax -..B3.127: - testl %eax, %eax - jne ..B3.129 -..B3.177: - cmpl $0, 288(%esp) -..B3.128: - je ..B3.130 -..B3.129: - addl $-16517, %ebx - lea -16383(%edx,%esi), %edx - cmpl %edx, %ebx - jl ..B3.131 -..B3.130: - fldt 232(%esp) - fchs - movl %ecx, 144(%esp) - fstpt 120(%esp) - fldt 244(%esp) - fchs - fstpt 132(%esp) - jmp ..B3.132 -..B3.131: - movl %eax, 124(%esp) - movl 288(%esp), %edx - movl 296(%esp), %eax - movl 300(%esp), %ecx - movl 304(%esp), %ebx - movl 308(%esp), %esi - movl 312(%esp), %edi - movl %edx, 120(%esp) - movl %eax, 128(%esp) - movl %ecx, 132(%esp) - movl %ebx, 136(%esp) - movl %esi, 140(%esp) - movl %edi, 144(%esp) -..B3.132: - addl $12, %esp - lea 80(%esp), %eax - lea 136(%esp), %ecx - pushl %eax - lea 252(%esp), %edx - pushl %edx - pushl %ecx - call __libm_atan2l_k80 -..B3.133: - addl $12, %esp - lea 108(%esp), %eax - lea 164(%esp), %ecx - pushl %eax - lea 252(%esp), %edx - pushl %edx - pushl %ecx - call __libm_atan2l_k80 -..B3.134: - movzwl 156(%esp), %ebx - movl %ebx, %esi - andl $32767, %esi - cmpl $8383, %esi - jl ..B3.138 -..B3.135: - cmpl $24383, %esi - jg ..B3.138 -..B3.136: - movzwl 184(%esp), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B3.138 -..B3.137: - cmpl $24383, %ecx - jle ..B3.141 -..B3.138: - addl $4, %esp - lea 144(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.139: - addl $4, %esp - lea 172(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B3.140: - movzwl 156(%esp), %ebx - movl %ebx, %esi - movzwl 184(%esp), %ecx - andl $32767, %esi - movl %ecx, 44(%esp) - andl $32767, %ecx -..B3.141: - movl 200(%esp), %edx - movl 172(%esp), %eax - movl %eax, 76(%esp) - lea (%esi,%eax), %edi - movl %edi, 60(%esp) - lea -134(%edx,%ecx), %eax - cmpl %eax, %edi - jle ..B3.158 -..B3.142: - movl 152(%esp), %eax - lea 134(%edx,%ecx), %edi - cmpl 60(%esp), %edi - jle ..B3.159 -..B3.143: - testl %eax, %eax - jne ..B3.145 -..B3.144: - cmpl $0, 148(%esp) - je ..B3.160 -..B3.145: - cmpl $0, 180(%esp) - jne ..B3.147 -..B3.146: - cmpl $0, 176(%esp) - je ..B3.159 -..B3.147: - cmpl 76(%esp), %edx - je ..B3.149 -..B3.148: - fldt 64(%esp) - movl 76(%esp), %eax - fstpt 32(%esp) - subl %edx, %eax - fldt 148(%esp) - addl $16383, %eax - fldt 160(%esp) - andl $32767, %eax - andb $127, 41(%esp) - movzwl 40(%esp), %ecx - andl $-32768, %ecx - orl %eax, %ecx - movw %cx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 172(%esp) - fxch %st(2) - fstpt 148(%esp) - fldt 148(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 160(%esp) - fldt 160(%esp) - movzwl 156(%esp), %ebx - jmp ..B3.150 -..B3.149: - fldt 148(%esp) - fldt 160(%esp) -..B3.150: - fldt 176(%esp) - andl $32767, %ebx - movl 44(%esp), %eax - fld %st(2) - andl $32767, %eax - fadd %st(1), %st - movl %edx, 228(%esp) - cmpl %eax, %ebx - jg ..B3.155 -..B3.151: - jne ..B3.156 -..B3.152: - movl 152(%esp), %eax - movl 180(%esp), %ecx - cmpl %ecx, %eax - ja ..B3.155 -..B3.153: - jne ..B3.156 -..B3.154: - movl 148(%esp), %eax - cmpl 176(%esp), %eax - jbe ..B3.156 -..B3.155: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 188(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - jmp ..B3.157 -..B3.156: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 188(%esp) - faddp %st, %st(1) - fstpt 32(%esp) - fldt 32(%esp) -..B3.157: - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - jmp ..B3.167 -..B3.158: - movl 152(%esp), %eax -..B3.159: - testl %eax, %eax - jne ..B3.161 -..B3.181: - cmpl $0, 148(%esp) -..B3.160: - je ..B3.162 -..B3.161: - lea -16517(%edx,%ecx), %ebx - movl 76(%esp), %ecx - lea -16383(%ecx,%esi), %esi - cmpl %esi, %ebx - jl ..B3.163 -..B3.162: - movl 176(%esp), %eax - movl %eax, 204(%esp) - movl 180(%esp), %ecx - movl 184(%esp), %ebx - movl 188(%esp), %esi - movl 192(%esp), %edi - movl 196(%esp), %eax - movl %ecx, 208(%esp) - movl %ebx, 212(%esp) - fldt 204(%esp) - movl %esi, 216(%esp) - movl %edi, 220(%esp) - movl %eax, 224(%esp) - fldt 216(%esp) - movl %edx, 228(%esp) - jmp ..B3.167 -..B3.163: - movl 148(%esp), %edx - movl %eax, 208(%esp) - movl 156(%esp), %eax - movl 160(%esp), %ecx - movl 164(%esp), %ebx - movl 168(%esp), %esi - movl %edx, 204(%esp) - movl %eax, 212(%esp) - fldt 204(%esp) - movl 76(%esp), %edx - movl %ecx, 216(%esp) - movl %ebx, 220(%esp) - movl %esi, 224(%esp) - fldt 216(%esp) - movl %edx, 228(%esp) - jmp ..B3.167 -..B3.164: - je ..B3.171 -..B3.165: - incl 284(%esp) - addl $12, %esp - lea 388(%esp), %eax - lea 192(%esp), %ecx - pushl %eax - lea 252(%esp), %edx - pushl %edx - pushl %ecx - call __libm_atan2l_k80 -..B3.166: - fldt 204(%esp) - fldt 216(%esp) - movl 228(%esp), %edx -..B3.167: - fldt 48(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt (%esp) - fldt (%esp) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fxch %st(1) - fstpt 204(%esp) - fstpt 216(%esp) - movl %edx, 24(%esp) - call __libm_scalbl_k80 -..B3.168: - movl 428(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B3.170 -..B3.169: - addl $436, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B3.170: - fstp %st(0) - movl 88(%esp), %ebx - call __stack_chk_fail@PLT -..B3.171: - movl 88(%esp), %edx - movl 376(%esp), %eax - cmpl 76+_CONSTANTS@GOTOFF(%edx), %eax - jb ..B3.72 -..B3.172: - jne ..B3.165 -..B3.173: - movl 372(%esp), %eax - cmpl 72+_CONSTANTS@GOTOFF(%edx), %eax - jb ..B3.72 - jmp ..B3.165 - .align 16,0x90 - .type imcatanhl,@function - .size imcatanhl,.-imcatanhl - .data -# -- End imcatanhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.17: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,12 - .space 4, 0x00 # pad - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .word 32768 - .word 16415 - .word 0 - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,84 - .data - .hidden __libm_normalizel_k80 - .hidden __libm_log_k80 - .hidden __libm_log1p_k80 - .hidden __libm_atan2l_k80 - .hidden __libm_scalbl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanl.S deleted file mode 100644 index 3263ee5461..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/catanl.S +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catanl.c" - .text -..TXTST0: -# -- Begin catanl - .text - .align 16,0x90 - .globl catanl -catanl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 100(%esp) - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - fldt 28(%esp) - fstpt 40(%esp) - fldt 40(%esp) - fstpt 52(%esp) - fldt 52(%esp) - fstpt 64(%esp) -..B1.2: - fnstcw 2(%esp) -..B1.3: - movzwl 2(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.20 -..B1.4: - orl $-64768, %ecx - movw %cx, (%esp) -..B1.5: - fldcw (%esp) -..B1.6: - movl $1, %edi -..B1.7: - fldt 24(%ebp) - movzwl 32(%ebp), %edx - andl $32767, %edx - fstpt 52(%esp) - cmpl $32767, %edx - fldt 12(%ebp) - fstpt 64(%esp) - jl ..B1.10 -..B1.8: - cmpl $-2147483648, 28(%ebp) - jne ..B1.11 -..B1.9: - cmpl $0, 24(%ebp) - jne ..B1.11 -..B1.10: - movzbl 33(%ebp), %ecx - notl %ecx - movzbl 61(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 61(%esp) -..B1.11: - addl $-32, %esp - lea 108(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl -24(%ecx), %ecx - movl %ecx, (%edx) - movl 88(%esp), %ecx - movl %ecx, 4(%edx) - movl 92(%esp), %ecx - movl %ecx, 8(%edx) - movl 96(%esp), %ecx - movl %ecx, 12(%edx) - movl 100(%esp), %ecx - movl %ecx, 16(%edx) - movl 104(%esp), %ecx - movl %ecx, 20(%edx) - call catanhl@PLT -..B1.23: - addl $28, %esp - fldt 76(%esp) - movzwl 84(%esp), %edx - andl $32767, %edx - fstpt 4(%esp) - fldt 4(%esp) - cmpl $32767, %edx - fstpt 40(%esp) - fldt 88(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - jl ..B1.14 -..B1.12: - cmpl $-2147483648, 8(%esp) - jne ..B1.15 -..B1.13: - cmpl $0, 4(%esp) - jne ..B1.15 -..B1.14: - movzbl 13(%esp), %ecx - notl %ecx - movzbl 49(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 49(%esp) -..B1.15: - testl %edi, %edi - je ..B1.17 -..B1.16: - fldcw 2(%esp) -..B1.17: - movl 28(%esp), %edx - movl %edx, (%esi) - movl 40(%esp), %edx - movl %edx, 12(%esi) - movl 44(%esp), %edx - movl %edx, 16(%esi) - movl 32(%esp), %ecx - movl 36(%esp), %edi - movl 48(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 100(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.19 -..B1.18: - movl %esi, %eax - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.19: - call __stack_chk_fail@PLT -..B1.20: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type catanl,@function - .size catanl,.-catanl - .data -# -- End catanl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrt_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrt_wmt.S deleted file mode 100644 index 5afefab75a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrt_wmt.S +++ /dev/null @@ -1,735 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cbrt_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin cbrt - .text - .align 16,0x90 - .globl cbrt -cbrt: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %esi, 52(%esp) - call static_func - movl %eax, %esi - movsd 128(%esp), %xmm0 - movapd %xmm0, %xmm7 - movsd %xmm0, 8(%esp) - movl $524032, %edx - movsd 64(%esi), %xmm5 - movsd 80(%esi), %xmm3 - psrlq $44, %xmm7 - pextrw $0, %xmm7, %ecx - movd %xmm7, %eax - movsd 96(%esi), %xmm1 - movsd 112(%esi), %xmm2 - movl %ebx, 16(%esp) - andl $248, %ecx - movsd 128(%ecx,%esi), %xmm4 - movl %eax, %ebx - andl %eax, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_0.0.2 - cmpl $524032, %edx - je .L_2TAG_PACKET_1.0.2 - shrl $8, %edx - shrl $8, %ebx - andpd %xmm0, %xmm2 - andpd %xmm5, %xmm0 - orpd %xmm2, %xmm3 - orpd %xmm0, %xmm1 - movapd (%esi), %xmm5 - movl $5462, %eax - movapd 16(%esi), %xmm6 - mull %edx - movl %ebx, %edx - andl $2047, %ebx - shrl $14, %eax - andl $2048, %edx - subl %eax, %ebx - subl %eax, %ebx - subl %eax, %ebx - shll $8, %ebx - addl $682, %eax - orl %edx, %eax - movd %eax, %xmm7 - addl %ebx, %ecx - psllq $52, %xmm7 -.L_2TAG_PACKET_2.0.2: - movapd 32(%esi), %xmm2 - movapd 48(%esi), %xmm0 - subsd %xmm3, %xmm1 - movq %xmm7, %xmm3 - mulsd 384(%ecx,%esi), %xmm7 - mulsd %xmm4, %xmm1 - mulsd 1152(%ecx,%esi), %xmm3 - movapd %xmm1, %xmm4 - unpcklpd %xmm1, %xmm1 - mulpd %xmm1, %xmm5 - mulpd %xmm1, %xmm6 - mulpd %xmm1, %xmm1 - addpd %xmm5, %xmm2 - addpd %xmm6, %xmm0 - mulpd %xmm1, %xmm2 - mulpd %xmm1, %xmm1 - mulsd %xmm7, %xmm4 - addpd %xmm2, %xmm0 - movl 16(%esp), %ebx - mulsd %xmm0, %xmm1 - unpckhpd %xmm0, %xmm0 - addsd %xmm1, %xmm0 - mulsd %xmm4, %xmm0 - addsd %xmm3, %xmm0 - addsd %xmm7, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - mulsd 1984(%esi), %xmm0 - movq %xmm0, %xmm7 - movl $524032, %edx - psrlq $44, %xmm7 - pextrw $0, %xmm7, %ecx - movd %xmm7, %eax - andl $248, %ecx - movsd 128(%ecx,%esi), %xmm4 - movl %eax, %ebx - andl %eax, %edx - shrl $8, %edx - shrl $8, %ebx - cmpl $0, %edx - je .L_2TAG_PACKET_4.0.2 - andpd %xmm0, %xmm2 - andpd %xmm5, %xmm0 - orpd %xmm2, %xmm3 - orpd %xmm0, %xmm1 - movapd (%esi), %xmm5 - movl $5462, %eax - movapd 16(%esi), %xmm6 - mull %edx - movl %ebx, %edx - andl $2047, %ebx - shrl $14, %eax - andl $2048, %edx - subl %eax, %ebx - subl %eax, %ebx - subl %eax, %ebx - shll $8, %ebx - addl $661, %eax - orl %edx, %eax - movd %eax, %xmm7 - addl %ebx, %ecx - psllq $52, %xmm7 - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_4.0.2: - cmpl $0, %ebx - jne .L_2TAG_PACKET_5.0.2 - movl 16(%esp), %ebx - fldl 1952(%esi) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_5.0.2: - movl 16(%esp), %ebx - fldl 1968(%esi) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_1.0.2: - movl 16(%esp), %ebx - movl 132(%esp), %eax - movl 128(%esp), %edx - movl %eax, %ecx - andl $2147483647, %ecx - cmpl $2146435072, %ecx - ja .L_2TAG_PACKET_6.0.2 - cmpl $0, %edx - jne .L_2TAG_PACKET_6.0.2 - cmpl $2146435072, %eax - jne .L_2TAG_PACKET_7.0.2 - fldl 1920(%esi) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_7.0.2: - fldl 1936(%esi) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_6.0.2: - movsd 8(%esp), %xmm0 - addsd %xmm0, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) -.L_2TAG_PACKET_3.0.2: - movl 52(%esp), %esi - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type cbrt,@function - .size cbrt,.-cbrt - .data -# -- End cbrt - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1553778919 - .long 3213899486 - .long 3534952507 - .long 3215266280 - .long 1646371399 - .long 3214412045 - .long 477218588 - .long 3216798151 - .long 3582521621 - .long 1066628362 - .long 1007461464 - .long 1068473053 - .long 889629714 - .long 1067378449 - .long 1431655765 - .long 1070945621 - .long 4294967295 - .long 1048575 - .long 0 - .long 0 - .long 0 - .long 3220193280 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 1032192 - .long 0 - .long 0 - .long 528611360 - .long 3220144632 - .long 2884679527 - .long 3220082993 - .long 1991868891 - .long 3220024928 - .long 2298714891 - .long 3219970134 - .long 58835168 - .long 3219918343 - .long 3035110223 - .long 3219869313 - .long 1617585086 - .long 3219822831 - .long 2500867033 - .long 3219778702 - .long 4241943008 - .long 3219736752 - .long 258732970 - .long 3219696825 - .long 404232216 - .long 3219658776 - .long 2172167368 - .long 3219622476 - .long 1544257904 - .long 3219587808 - .long 377579543 - .long 3219554664 - .long 1616385542 - .long 3219522945 - .long 813783277 - .long 3219492562 - .long 3940743189 - .long 3219463431 - .long 2689777499 - .long 3219435478 - .long 1700977147 - .long 3219408632 - .long 3169102082 - .long 3219382828 - .long 327235604 - .long 3219358008 - .long 1244336319 - .long 3219334115 - .long 1300311200 - .long 3219311099 - .long 3095471925 - .long 3219288912 - .long 2166487928 - .long 3219267511 - .long 2913108253 - .long 3219246854 - .long 293672978 - .long 3219226904 - .long 288737297 - .long 3219207624 - .long 1810275472 - .long 3219188981 - .long 174592167 - .long 3219170945 - .long 3539053052 - .long 3219153485 - .long 2164392968 - .long 3219136576 - .long 572345495 - .long 1072698681 - .long 1998204467 - .long 1072709382 - .long 3861501553 - .long 1072719872 - .long 2268192434 - .long 1072730162 - .long 2981979308 - .long 1072740260 - .long 270859143 - .long 1072750176 - .long 2958651392 - .long 1072759916 - .long 313113243 - .long 1072769490 - .long 919449400 - .long 1072778903 - .long 2809328903 - .long 1072788162 - .long 2222981587 - .long 1072797274 - .long 2352530781 - .long 1072806244 - .long 594152517 - .long 1072815078 - .long 1555767199 - .long 1072823780 - .long 4282421314 - .long 1072832355 - .long 2355578597 - .long 1072840809 - .long 1162590619 - .long 1072849145 - .long 797864051 - .long 1072857367 - .long 431273680 - .long 1072865479 - .long 2669831148 - .long 1072873484 - .long 733477752 - .long 1072881387 - .long 4280220604 - .long 1072889189 - .long 801961634 - .long 1072896896 - .long 2915370760 - .long 1072904508 - .long 1159613482 - .long 1072912030 - .long 2689944798 - .long 1072919463 - .long 1248687822 - .long 1072926811 - .long 2967951030 - .long 1072934075 - .long 630170432 - .long 1072941259 - .long 3760898254 - .long 1072948363 - .long 0 - .long 1072955392 - .long 2370273294 - .long 1072962345 - .long 1261754802 - .long 1072972640 - .long 546334065 - .long 1072986123 - .long 1054893830 - .long 1072999340 - .long 1571187597 - .long 1073012304 - .long 1107975175 - .long 1073025027 - .long 3606909377 - .long 1073037519 - .long 1113616747 - .long 1073049792 - .long 4154744632 - .long 1073061853 - .long 3358931423 - .long 1073073713 - .long 4060702372 - .long 1073085379 - .long 747576176 - .long 1073096860 - .long 3023138255 - .long 1073108161 - .long 1419988548 - .long 1073119291 - .long 1914185305 - .long 1073130255 - .long 294389948 - .long 1073141060 - .long 3761802570 - .long 1073151710 - .long 978281566 - .long 1073162213 - .long 823148820 - .long 1073172572 - .long 2420954441 - .long 1073182792 - .long 3815449908 - .long 1073192878 - .long 2046058587 - .long 1073202835 - .long 1807524753 - .long 1073212666 - .long 2628681401 - .long 1073222375 - .long 3225667357 - .long 1073231966 - .long 1555307421 - .long 1073241443 - .long 3454043099 - .long 1073250808 - .long 1208137896 - .long 1073260066 - .long 3659916772 - .long 1073269218 - .long 1886261264 - .long 1073278269 - .long 3593647839 - .long 1073287220 - .long 3086012205 - .long 1073296075 - .long 2769796922 - .long 1073304836 - .long 888716057 - .long 1073317807 - .long 2201465623 - .long 1073334794 - .long 164369365 - .long 1073351447 - .long 3462666733 - .long 1073367780 - .long 2773905457 - .long 1073383810 - .long 1342879088 - .long 1073399550 - .long 2543933975 - .long 1073415012 - .long 1684477781 - .long 1073430209 - .long 3532178543 - .long 1073445151 - .long 1147747300 - .long 1073459850 - .long 1928031793 - .long 1073474314 - .long 2079717015 - .long 1073488553 - .long 4016765315 - .long 1073502575 - .long 3670431139 - .long 1073516389 - .long 3549227225 - .long 1073530002 - .long 11637607 - .long 1073543422 - .long 588220169 - .long 1073556654 - .long 2635407503 - .long 1073569705 - .long 2042029317 - .long 1073582582 - .long 1925128962 - .long 1073595290 - .long 4136375664 - .long 1073607834 - .long 759964600 - .long 1073620221 - .long 4257606771 - .long 1073632453 - .long 297278907 - .long 1073644538 - .long 3655053093 - .long 1073656477 - .long 2442253172 - .long 1073668277 - .long 1111876799 - .long 1073679941 - .long 3330973139 - .long 1073691472 - .long 3438879452 - .long 1073702875 - .long 3671565478 - .long 1073714153 - .long 1317849547 - .long 1073725310 - .long 1642364115 - .long 1073736348 - .long 4050900474 - .long 1014427190 - .long 1157977860 - .long 1016444461 - .long 1374568199 - .long 1017271387 - .long 2809163288 - .long 1016882676 - .long 3742377377 - .long 1013168191 - .long 3101606597 - .long 1017541672 - .long 65224358 - .long 1017217597 - .long 2691591250 - .long 1017266643 - .long 4020758549 - .long 1017689313 - .long 1316310992 - .long 1018030788 - .long 1031537856 - .long 1014090882 - .long 3261395239 - .long 1016413641 - .long 886424999 - .long 1016313335 - .long 3114776834 - .long 1014195875 - .long 1681120620 - .long 1017825416 - .long 1329600273 - .long 1016625740 - .long 465474623 - .long 1017097119 - .long 4251633980 - .long 1017169077 - .long 1986990133 - .long 1017710645 - .long 752958613 - .long 1017159641 - .long 2216216792 - .long 1018020163 - .long 4282860129 - .long 1015924861 - .long 1557627859 - .long 1016039538 - .long 3889219754 - .long 1018086237 - .long 3684996408 - .long 1017353275 - .long 723532103 - .long 1017717141 - .long 2951149676 - .long 1012528470 - .long 831890937 - .long 1017830553 - .long 1031212645 - .long 1017387331 - .long 2741737450 - .long 1017604974 - .long 2863311531 - .long 1003776682 - .long 4276736099 - .long 1013153088 - .long 4111778382 - .long 1015673686 - .long 1728065769 - .long 1016413986 - .long 2708718031 - .long 1018078833 - .long 1069335005 - .long 1015291224 - .long 700037144 - .long 1016482032 - .long 2904566452 - .long 1017226861 - .long 4074156649 - .long 1017622651 - .long 25019565 - .long 1015245366 - .long 3601952608 - .long 1015771755 - .long 3267129373 - .long 1017904664 - .long 503203103 - .long 1014921629 - .long 2122011730 - .long 1018027866 - .long 3927295461 - .long 1014189456 - .long 2790625147 - .long 1016024251 - .long 1330460186 - .long 1016940346 - .long 4033568463 - .long 1015538390 - .long 3695818227 - .long 1017509621 - .long 257573361 - .long 1017208868 - .long 3227697852 - .long 1017337964 - .long 234118548 - .long 1017169577 - .long 4009025803 - .long 1017278524 - .long 1948343394 - .long 1017749310 - .long 678398162 - .long 1018144239 - .long 3083864863 - .long 1016669086 - .long 2415453452 - .long 1017890370 - .long 175467344 - .long 1017330033 - .long 3197359580 - .long 1010339928 - .long 2071276951 - .long 1015941358 - .long 268372543 - .long 1016737773 - .long 938132959 - .long 1017389108 - .long 1816750559 - .long 1017337448 - .long 4119203749 - .long 1017152174 - .long 2578653878 - .long 1013108497 - .long 2470331096 - .long 1014678606 - .long 123855735 - .long 1016553320 - .long 1265650889 - .long 1014782687 - .long 3414398172 - .long 1017182638 - .long 1040773369 - .long 1016158401 - .long 3483628886 - .long 1016886550 - .long 4140499405 - .long 1016191425 - .long 3893477850 - .long 1016964495 - .long 3935319771 - .long 1009634717 - .long 2978982660 - .long 1015027112 - .long 2452709923 - .long 1017990229 - .long 3190365712 - .long 1015835149 - .long 4237588139 - .long 1015832925 - .long 2610678389 - .long 1017962711 - .long 2127316774 - .long 1017405770 - .long 824267502 - .long 1017959463 - .long 2165924042 - .long 1017912225 - .long 2774007076 - .long 1013257418 - .long 4123916326 - .long 1017582284 - .long 1976417958 - .long 1016959909 - .long 4092806412 - .long 1017711279 - .long 119251817 - .long 1015363631 - .long 3475418768 - .long 1017675415 - .long 1972580503 - .long 1015470684 - .long 815541017 - .long 1017517969 - .long 2429917451 - .long 1017397776 - .long 4062888482 - .long 1016749897 - .long 68284153 - .long 1017925678 - .long 2207779246 - .long 1016320298 - .long 1183466520 - .long 1017408657 - .long 143326427 - .long 1017060403 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 0 - .long 4293918720 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 1138753536 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,2000 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtf_wmt.S deleted file mode 100644 index b04fe14b04..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtf_wmt.S +++ /dev/null @@ -1,504 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cbrtf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin cbrtf - .text - .align 16,0x90 - .globl cbrtf -cbrtf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %esi, 44(%esp) - call static_func - movl %eax, %esi - movss 112(%esp), %xmm0 - movss %xmm0, 4(%esp) - movl %ebx, 8(%esp) - movl $8388607, %edx - movd %edx, %xmm5 - movl $-1081999360, %ebx - movd %ebx, %xmm3 - movl $-1082130432, %ebx - movd %ebx, %xmm1 - movl $8257536, %edx - movd %edx, %xmm2 - pextrw $1, %xmm0, %ecx - movl %ecx, %eax - andl $124, %ecx - movss 16(%ecx,%esi), %xmm4 - shrl $7, %eax - movl $255, %edx - andl %eax, %edx - movl %eax, %ebx - cmpl $0, %edx - je .L_2TAG_PACKET_0.0.2 - cmpl $255, %edx - je .L_2TAG_PACKET_1.0.2 - andps %xmm0, %xmm2 - andps %xmm5, %xmm0 - orps %xmm2, %xmm3 - orps %xmm0, %xmm1 - movss (%esi), %xmm5 - movss 4(%esi), %xmm6 - movl %edx, %eax - addl %eax, %eax - addl %eax, %eax - addl %edx, %eax - movl %eax, %edx - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %edx - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %edx, %eax - movl %ebx, %edx - andl $255, %ebx - subl $1, %ebx - shrl $12, %eax - andl $256, %edx - subl %eax, %ebx - subl %eax, %ebx - subl %eax, %ebx - shll $7, %ebx - addl $85, %eax - orl %edx, %eax - movd %eax, %xmm7 - addl %ebx, %ecx - psllq $23, %xmm7 -.L_2TAG_PACKET_2.0.2: - movss 8(%esi), %xmm2 - movss 12(%esi), %xmm0 - subss %xmm3, %xmm1 - movaps %xmm7, %xmm3 - mulss 144(%ecx,%esi), %xmm7 - mulss %xmm4, %xmm1 - mulss 528(%ecx,%esi), %xmm3 - movss %xmm1, %xmm4 - mulss %xmm1, %xmm5 - mulss %xmm1, %xmm6 - mulss %xmm1, %xmm1 - addss %xmm5, %xmm2 - addss %xmm6, %xmm0 - mulss %xmm1, %xmm2 - mulss %xmm7, %xmm4 - addss %xmm2, %xmm0 - movl 8(%esp), %ebx - mulss %xmm4, %xmm0 - addss %xmm3, %xmm0 - addss %xmm7, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - movq %xmm0, %xmm7 - movd %xmm0, %eax - movl %eax, %ebx - shll $9, %eax - movl $23, %ecx - shrl $23, %ebx -.L_2TAG_PACKET_4.0.2: - cmpl $-2147483648, %eax - jae .L_2TAG_PACKET_5.0.2 - shll $1, %eax - addl $1, %edx - loop .L_2TAG_PACKET_4.0.2 - cmpl $0, %eax - je .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_5.0.2: - movl %edx, %ecx - incl %ecx - movd %ecx, %xmm7 - orl %edx, %ebx - psllq %xmm7, %xmm0 - shrl $24, %eax - andl $124, %eax - movsd 16(%esi,%eax), %xmm4 - movl %eax, %ecx - andps %xmm0, %xmm2 - andps %xmm5, %xmm0 - orps %xmm2, %xmm3 - orps %xmm0, %xmm1 - movss (%esi), %xmm5 - movl $1366, %eax - movss 4(%esi), %xmm6 - mull %edx - movl %ebx, %edx - andl $255, %ebx - addl $1, %ebx - shrl $12, %eax - andl $256, %edx - subl %eax, %ebx - subl %eax, %ebx - subl %eax, %ebx - cmpl $0, %ebx - je .L_2TAG_PACKET_7.0.2 - incl %eax - subl $3, %ebx - negl %ebx -.L_2TAG_PACKET_7.0.2: - shll $7, %ebx - addl %ebx, %ecx - movl $85, %ebx - subl %eax, %ebx - orl %edx, %ebx - movd %ebx, %xmm7 - psllq $23, %xmm7 - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_6.0.2: - cmpl $0, %ebx - jne .L_2TAG_PACKET_8.0.2 - movl 8(%esp), %ebx - fldl 944(%esi) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_8.0.2: - movl 8(%esp), %ebx - fldl 960(%esi) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_1.0.2: - movl 8(%esp), %ebx - movl 4(%esp), %eax - movl %eax, %ecx - andl $2147483647, %ecx - cmpl $2139095040, %ecx - ja .L_2TAG_PACKET_9.0.2 - cmpl $2139095040, %eax - jne .L_2TAG_PACKET_10.0.2 - fldl 912(%esi) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_10.0.2: - fldl 928(%esi) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_9.0.2: - movss 4(%esp), %xmm0 - addss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_3.0.2: - movl 44(%esp), %esi - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type cbrtf,@function - .size cbrtf,.-cbrtf - .data -# -- End cbrtf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 3173551943 - .long 3185806905 - .long 1031591658 - .long 1051372203 - .long 3212578753 - .long 3212085645 - .long 3211621124 - .long 3211182772 - .long 3210768440 - .long 3210376206 - .long 3210004347 - .long 3209651317 - .long 3209315720 - .long 3208996296 - .long 3208691905 - .long 3208401508 - .long 3208124163 - .long 3207859009 - .long 3207605259 - .long 3207362194 - .long 3207129151 - .long 3206905525 - .long 3206690755 - .long 3206484326 - .long 3206285761 - .long 3206094618 - .long 3205910490 - .long 3205732998 - .long 3205561788 - .long 3205396533 - .long 3205236929 - .long 3205082689 - .long 3204933547 - .long 3204789256 - .long 3204649583 - .long 3204514308 - .long 1065396681 - .long 1065482291 - .long 1065566215 - .long 1065648532 - .long 1065729317 - .long 1065808640 - .long 1065886565 - .long 1065963152 - .long 1066038457 - .long 1066112533 - .long 1066185428 - .long 1066257188 - .long 1066327857 - .long 1066397474 - .long 1066466079 - .long 1066533708 - .long 1066600394 - .long 1066666169 - .long 1066731064 - .long 1066795108 - .long 1066858329 - .long 1066920751 - .long 1066982401 - .long 1067043301 - .long 1067103474 - .long 1067162941 - .long 1067221722 - .long 1067279837 - .long 1067337305 - .long 1067394143 - .long 1067450368 - .long 1067505996 - .long 1067588354 - .long 1067696217 - .long 1067801953 - .long 1067905666 - .long 1068007450 - .long 1068107390 - .long 1068205570 - .long 1068302063 - .long 1068396942 - .long 1068490271 - .long 1068582113 - .long 1068672525 - .long 1068761562 - .long 1068849275 - .long 1068935712 - .long 1069020919 - .long 1069104937 - .long 1069187809 - .long 1069269572 - .long 1069350263 - .long 1069429915 - .long 1069508563 - .long 1069586236 - .long 1069662966 - .long 1069738778 - .long 1069813702 - .long 1069887762 - .long 1069960982 - .long 1070033387 - .long 1070104998 - .long 1070175837 - .long 1070245925 - .long 1070349689 - .long 1070485588 - .long 1070618808 - .long 1070749478 - .long 1070877717 - .long 1071003634 - .long 1071127332 - .long 1071248907 - .long 1071368446 - .long 1071486034 - .long 1071601747 - .long 1071715659 - .long 1071827839 - .long 1071938350 - .long 1072047254 - .long 1072154608 - .long 1072260465 - .long 1072364876 - .long 1072467891 - .long 1072569555 - .long 1072669911 - .long 1072769001 - .long 1072866863 - .long 1072963536 - .long 1073059054 - .long 1073153452 - .long 1073246762 - .long 1073339014 - .long 1073430238 - .long 1073520462 - .long 1073609714 - .long 1073698019 - .long 839340838 - .long 867750258 - .long 851786446 - .long 853949398 - .long 864938789 - .long 864102364 - .long 864209792 - .long 865422805 - .long 867593594 - .long 854482593 - .long 848298042 - .long 860064854 - .long 844792593 - .long 870701309 - .long 872023170 - .long 860255342 - .long 849966899 - .long 863561479 - .long 869115319 - .long 871961375 - .long 859537336 - .long 871954398 - .long 863817578 - .long 861687921 - .long 849594757 - .long 816486846 - .long 858183533 - .long 864500406 - .long 850523240 - .long 808125243 - .long 514020693 - .long 861173761 - .long 859000219 - .long 823158129 - .long 871826232 - .long 871183196 - .long 839030530 - .long 867690638 - .long 840440923 - .long 868033274 - .long 855856030 - .long 865094453 - .long 860418487 - .long 866225006 - .long 866458226 - .long 865124659 - .long 864837702 - .long 811742505 - .long 869432099 - .long 864584201 - .long 864183978 - .long 844810573 - .long 869245699 - .long 859556409 - .long 870675446 - .long 814190139 - .long 870686941 - .long 861800510 - .long 855649163 - .long 869347119 - .long 864252033 - .long 867276215 - .long 868189817 - .long 849541095 - .long 866633177 - .long 843967686 - .long 857522493 - .long 862339487 - .long 850054662 - .long 864048556 - .long 868027089 - .long 848093931 - .long 865355299 - .long 848111485 - .long 865557362 - .long 870297525 - .long 863416216 - .long 869675693 - .long 865888071 - .long 825332584 - .long 843309506 - .long 870885636 - .long 869119784 - .long 865466648 - .long 867459244 - .long 861192764 - .long 871247716 - .long 864927982 - .long 869195129 - .long 864849564 - .long 840005936 - .long 852579258 - .long 860852782 - .long 869711141 - .long 862506141 - .long 837959274 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 0 - .long 4293918720 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,976 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtl.S deleted file mode 100644 index 71fe91a6ac..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtl.S +++ /dev/null @@ -1,374 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cbrtl.c" - .text -..TXTST0: -# -- Begin cbrtl - .text - .align 16,0x90 - .globl cbrtl -cbrtl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp -..B1.2: - fnstcw 30(%esp) -..B1.3: - movzwl 16(%ebp), %esi - movl %esi, %ebx - andl $32767, %ebx - movzwl 30(%esp), %ecx - cmpl $32767, %ebx - je ..B1.23 -..B1.4: - movl %ecx, %edx - movzbl 17(%ebp), %eax - andl $768, %edx - andl $128, %eax - shrl $7, %eax - cmpl $768, %edx - je ..B1.22 -..B1.5: - orl $-64768, %ecx - movw %cx, 28(%esp) -..B1.6: - fldcw 28(%esp) -..B1.7: - movzwl 16(%ebp), %esi - movl %esi, %ebx - movl $1, %edi - andl $32767, %ebx -..B1.8: - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - testl %ebx, %ebx - jne ..B1.15 -..B1.9: - cmpl $0, 12(%ebp) - jne ..B1.14 -..B1.10: - cmpl $0, 8(%ebp) - jne ..B1.14 -..B1.11: - fldl _zeros@GOTOFF(%ecx,%eax,8) - testl %edi, %edi - fstpl (%esp) - je ..B1.13 -..B1.12: - fldcw 30(%esp) -..B1.13: - fldl (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - fldt 8(%ebp) - movl $-25, %edx - fmull _TWO_75@GOTOFF(%ecx) - fstpt 8(%ebp) - movzwl 16(%ebp), %esi - movl %esi, %ebx - andl $32767, %ebx - jmp ..B1.16 -..B1.15: - xorl %edx, %edx -..B1.16: - fldl ones@GOTOFF(%ecx,%eax,8) - andl $-32768, %esi - imull $21845, %ebx, %eax - orl $-49153, %esi - fstpt (%esp) - fldt (%esp) - fldl _TWO_32H@GOTOFF(%ecx) - fld %st(0) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - movw %si, 16(%ebp) - addl $21845, %eax - fldt 8(%ebp) - fmulp %st, %st(4) - shrl $16, %eax - fxch %st(1) - fadd %st(3), %st - movl %edi, 12(%esp) - lea (%eax,%eax), %edi - subl %edi, %ebx - lea 10922(%edx,%eax), %edx - movl 12(%ebp), %edi - fsubp %st, %st(2) - shrl $23, %edi - fxch %st(1) - fsubr %st, %st(2) - fldt 72+_P@GOTOFF(%ecx) - fldt 48+_P@GOTOFF(%ecx) - andl $255, %edi - movzwl 8(%esp), %esi - andl $-32768, %esi - orl %edx, %esi - flds __libm_rcp_table_256@GOTOFF(%ecx,%edi,4) - fld %st(0) - fmulp %st, %st(4) - shll $4, %edi - fxch %st(3) - fsub %st(4), %st - fxch %st(3) - fmulp %st, %st(5) - movw %si, 8(%esp) - subl %eax, %ebx - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fmul %st(3), %st - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fmul %st(1), %st - fldt 60+_P@GOTOFF(%ecx) - fmul %st(4), %st - fldt 36+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt _P@GOTOFF(%ecx) - fmulp %st, %st(1) - faddp %st, %st(2) - fadd %st(1), %st - fstpt 16(%esp) - fldl 8+__libm_cbrtl_table_256@GOTOFF(%ecx,%edi) - fldl __libm_cbrtl_table_256@GOTOFF(%ecx,%edi) - fldt (%esp) - movl 12(%esp), %edi - jne ..B1.18 -..B1.17: - fldt 16(%esp) - fmulp %st, %st(3) - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%esp) - jmp ..B1.19 -..B1.18: - fxch %st(2) - fmull -8+_SH@GOTOFF(%ecx,%ebx,8) - fldl 24+_SH@GOTOFF(%ecx,%ebx,8) - fmul %st(2), %st - faddp %st, %st(1) - fxch %st(1) - fmull 8+_SH@GOTOFF(%ecx,%ebx,8) - fmul %st, %st(3) - fldt 16(%esp) - fmulp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 16(%esp) -..B1.19: - testl %edi, %edi - je ..B1.21 -..B1.20: - fldcw 30(%esp) -..B1.21: - fldt 16(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.22: - xorl %edi, %edi - jmp ..B1.8 -..B1.23: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.24: - orl $-64768, %ecx - movw %cx, 28(%esp) -..B1.25: - fldcw 28(%esp) -..B1.26: - fldt 8(%ebp) - fstpt (%esp) -..B1.27: - fldcw 30(%esp) -..B1.28: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.29: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.28 - .align 16,0x90 - .type cbrtl,@function - .size cbrtl,.-cbrtl - .data -# -- End cbrtl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -_SH: - .long 0xf98d728b,0x3ff428a2 - .long 0xa53d6e3d,0x3ff965fe - .long 0xf8000000,0x3ff428a2 - .long 0xa4000000,0x3ff965fe - .long 0xae223ddb,0x3e38d728 - .long 0xc82b059a,0x3e33d6e3 - .type _SH,@object - .size _SH,48 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_P: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 58320 - .word 36408 - .word 14563 - .word 58254 - .word 49147 - .word 0 - .word 50474 - .word 25890 - .word 59872 - .word 64726 - .word 16378 - .word 0 - .word 45217 - .word 37017 - .word 18069 - .word 43151 - .word 49146 - .word 0 - .word 45059 - .word 7616 - .word 35240 - .word 63288 - .word 16377 - .word 0 - .word 54522 - .word 17175 - .word 48475 - .word 49224 - .word 49145 - .word 0 - .word 568 - .word 55426 - .word 44619 - .word 39848 - .word 16377 - .word 0 - .type _P,@object - .size _P,84 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_cbrtl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtl_table.S deleted file mode 100644 index 336596680a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cbrtl_table.S +++ /dev/null @@ -1,560 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cbrtl_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_cbrtl_table_256 - .globl __libm_cbrtl_table_256 -__libm_cbrtl_table_256: - .long 0x8e000000,0x3ff002ab - .long 0x20d8688c,0x3e2230dd - .long 0x08000000,0x3ff00808 - .long 0xeff25f12,0x3e3610f3 - .long 0xba000000,0x3ff00d6b - .long 0x3efe3543,0xbe0b4bfa - .long 0xb2000000,0x3ff012d6 - .long 0x2c9e7759,0xbe32d173 - .long 0x4e000000,0x3ff0179a - .long 0x013f2daf,0x3e1eca95 - .long 0x1a000000,0x3ff01d13 - .long 0x1a1a641f,0xbe35afd8 - .long 0x5a000000,0x3ff02293 - .long 0xa40f870c,0x3e3acf85 - .long 0xc6000000,0x3ff02769 - .long 0x8b30b2ed,0xbe1bd4a4 - .long 0x3c000000,0x3ff02cf8 - .long 0xc2b35d57,0xbe10fe10 - .long 0x2e000000,0x3ff031db - .long 0x9aefd6bc,0x3e1dc088 - .long 0x1a000000,0x3ff03778 - .long 0x26cf8b86,0xbe3983d8 - .long 0xcc000000,0x3ff03c67 - .long 0xa0938ea4,0x3e33f7ce - .long 0x8a000000,0x3ff0415d - .long 0x1f4527e6,0x3e1271e1 - .long 0x1e000000,0x3ff04710 - .long 0xe014332a,0x3e2e39c2 - .long 0xf4000000,0x3ff04c12 - .long 0x4801f107,0x3e28aa39 - .long 0xfc000000,0x3ff0511b - .long 0x5e2d9f07,0x3dbd36bd - .long 0x42000000,0x3ff0562b - .long 0xc47ab24f,0x3df8a6e2 - .long 0xd4000000,0x3ff05b40 - .long 0x24da1d13,0x3e249ec6 - .long 0xc2000000,0x3ff0605c - .long 0x31b189b7,0xbe227295 - .long 0x16000000,0x3ff0657f - .long 0x7872e1cd,0x3e17f761 - .long 0xe2000000,0x3ff06aa7 - .long 0xc4a6c979,0xbe18ff8e - .long 0x32000000,0x3ff06fd7 - .long 0x37586fc9,0xbe22bc1f - .long 0x1e000000,0x3ff0744e - .long 0xda6466ae,0x3e213213 - .long 0xb0000000,0x3ff07989 - .long 0xd1b04779,0xbe181829 - .long 0xf0000000,0x3ff07ecb - .long 0x52cf55c8,0xbe2d5de3 - .long 0xea000000,0x3ff08414 - .long 0xa790ab31,0x3e3e5ef6 - .long 0x0a000000,0x3ff088a2 - .long 0x7bee6b1f,0xbe33c01d - .long 0xb2000000,0x3ff08df7 - .long 0xed26e53e,0x3e0b930b - .long 0xc4000000,0x3ff0928f - .long 0x35afee34,0xbe2f72c3 - .long 0x4e000000,0x3ff097f2 - .long 0x1166e9a4,0x3e256094 - .long 0x82000000,0x3ff09c95 - .long 0x5ae9d19c,0xbe01eed4 - .long 0xe8000000,0x3ff0a13d - .long 0x82f9b502,0x3e22e1bc - .long 0xac000000,0x3ff0a6b3 - .long 0xdecb71aa,0xbe13744b - .long 0x7c000000,0x3ff0ab67 - .long 0x79520489,0xbe34918f - .long 0x9e000000,0x3ff0b020 - .long 0xf330a139,0x3df882be - .long 0x20000000,0x3ff0b4df - .long 0xc3236255,0x3e1c8694 - .long 0xe6000000,0x3ff0ba6e - .long 0x119c7384,0xbdd954af - .long 0x30000000,0x3ff0bf39 - .long 0x17946a4f,0x3e17e600 - .long 0xfc000000,0x3ff0c408 - .long 0xa96efefe,0x3dfcfd4a - .long 0x54000000,0x3ff0c8de - .long 0xc29018c1,0x3e137bfa - .long 0x44000000,0x3ff0cdb9 - .long 0x6b55ea13,0x3e075409 - .long 0xd8000000,0x3ff0d299 - .long 0x17222364,0xbe2c80ba - .long 0x1a000000,0x3ff0d780 - .long 0xf030bcdb,0xbe36c2d9 - .long 0xae000000,0x3ff0db99 - .long 0x583eb4fd,0x3e23f39e - .long 0x7a000000,0x3ff0e08a - .long 0x1bc25b4a,0xbe2ee94c - .long 0x14000000,0x3ff0e581 - .long 0x2f4f4e2c,0xbe2785bf - .long 0x88000000,0x3ff0ea7d - .long 0xd8bcbdfc,0x3e3525a2 - .long 0xe6000000,0x3ff0ef7f - .long 0xed67b448,0x3e359433 - .long 0x16000000,0x3ff0f3b1 - .long 0xc931fbd5,0x3e2bf870 - .long 0x6a000000,0x3ff0f8be - .long 0xe78cbbad,0xbe32480c - .long 0xca000000,0x3ff0fcf8 - .long 0x795e6dd9,0x3e1f7d67 - .long 0x3a000000,0x3ff10211 - .long 0xfbf1714f,0x3e239cff - .long 0xce000000,0x3ff1072f - .long 0x55d6f69a,0xbe272643 - .long 0xac000000,0x3ff10b78 - .long 0xfdfa2d3b,0xbe286878 - .long 0xdc000000,0x3ff10fc5 - .long 0xd49627b5,0x3e1c95db - .long 0x0c000000,0x3ff114f5 - .long 0xf6a23fbe,0xbe2e06fe - .long 0xda000000,0x3ff1194b - .long 0x8f075abc,0x3e34ceb2 - .long 0xac000000,0x3ff11e86 - .long 0x90dc17c3,0x3e066bd5 - .long 0x40000000,0x3ff122e7 - .long 0xc04b5d49,0x3e359eb9 - .long 0x54000000,0x3ff1274c - .long 0xaf65cf99,0x3df316d4 - .long 0xec000000,0x3ff12bb5 - .long 0x7163f782,0x3e1b91b5 - .long 0x74000000,0x3ff13107 - .long 0xb1d8a38e,0xbe171e82 - .long 0x1c000000,0x3ff1357b - .long 0x142a679f,0xbe1645ad - .long 0x64000000,0x3ff139f3 - .long 0x03011ac3,0xbe119734 - .long 0x54000000,0x3ff13e70 - .long 0xceefd26a,0x3e12c753 - .long 0xf6000000,0x3ff142f1 - .long 0x1ae3077b,0xbdff336e - .long 0x50000000,0x3ff14778 - .long 0xa313efdd,0x3e3167c3 - .long 0x6e000000,0x3ff14c03 - .long 0xe0d315a6,0x3e23d347 - .long 0x56000000,0x3ff15093 - .long 0x8ec79515,0x3e34284e - .long 0x14000000,0x3ff15528 - .long 0x6ca0e852,0xbdfd2648 - .long 0xae000000,0x3ff159c1 - .long 0x33a7b5b1,0xbe21074d - .long 0x2c000000,0x3ff15e60 - .long 0x6aaf8c8a,0x3e311566 - .long 0x9c000000,0x3ff16303 - .long 0xdfa56cef,0xbe04190c - .long 0x02000000,0x3ff167ac - .long 0x96f8f747,0x3e30bf5f - .long 0x6c000000,0x3ff16c59 - .long 0x67e1e977,0x3dddd97d - .long 0xfc000000,0x3ff1701a - .long 0xf643cd8e,0xbe32877d - .long 0x80000000,0x3ff174d1 - .long 0x618d0ab4,0xbe318a71 - .long 0x1e000000,0x3ff1798d - .long 0xe66a5be3,0x3e373f3e - .long 0xe6000000,0x3ff17e4d - .long 0xca1da90a,0x3e0c534f - .long 0x0e000000,0x3ff1821f - .long 0xe06a8431,0xbe0ec5e5 - .long 0x32000000,0x3ff186e9 - .long 0xbb5373b7,0x3e06cc6a - .long 0x98000000,0x3ff18bb8 - .long 0x80c817c3,0x3e23ddc1 - .long 0x88000000,0x3ff18f95 - .long 0x70817aed,0xbe25cef4 - .long 0x7e000000,0x3ff1946e - .long 0x71612988,0x3e0b7bf2 - .long 0x22000000,0x3ff19853 - .long 0xdad7b32a,0xbe3008d5 - .long 0xc8000000,0x3ff19d35 - .long 0x558f59ee,0x3e3d2925 - .long 0x3c000000,0x3ff1a122 - .long 0x97916e24,0xbe112012 - .long 0xba000000,0x3ff1a60e - .long 0xf6235d3b,0xbe361be1 - .long 0x14000000,0x3ff1aa03 - .long 0xefaa3b2e,0x3e33a9bc - .long 0x8a000000,0x3ff1aef9 - .long 0x95d61bf1,0xbe3045d7 - .long 0xec000000,0x3ff1b2f5 - .long 0xe5b6bd1c,0x3e1a939c - .long 0xea000000,0x3ff1b6f5 - .long 0x00756ed3,0x3e118b3c - .long 0x02000000,0x3ff1bbfb - .long 0x34057364,0xbe20e5cf - .long 0x30000000,0x3ff1c003 - .long 0x701907b3,0xbe0e1837 - .long 0x0c000000,0x3ff1c40f - .long 0x7c6221b9,0xbe282207 - .long 0x9a000000,0x3ff1c81e - .long 0x71d8c073,0xbe09f360 - .long 0x4a000000,0x3ff1cd37 - .long 0x436616b2,0xbe3261a0 - .long 0x40000000,0x3ff1d14f - .long 0xc7c5e4df,0x3df7af5c - .long 0xfe000000,0x3ff1d56a - .long 0x5ae36062,0xbdfc61a1 - .long 0x88000000,0x3ff1d98a - .long 0xed667c98,0x3e167fd8 - .long 0xe6000000,0x3ff1ddad - .long 0xa010e825,0xbe16ada9 - .long 0x1c000000,0x3ff1e1d5 - .long 0x012f4beb,0xbdbb777c - .long 0x92000000,0x3ff1e70b - .long 0xe05d5c18,0x3e275a5a - .long 0x88000000,0x3ff1eb3b - .long 0x87963143,0x3e1f6ec9 - .long 0x6c000000,0x3ff1ef6f - .long 0xc77f5502,0xbdf400a5 - .long 0x44000000,0x3ff1f3a7 - .long 0x83209a84,0xbe2057a6 - .long 0x14000000,0x3ff1f7e3 - .long 0xcdb4bd2e,0x3e3b8696 - .long 0xea000000,0x3ff1fc22 - .long 0x7dac9b38,0xbe29872a - .long 0xc4000000,0x3ff20066 - .long 0x7e34701c,0x3e22a9a1 - .long 0xae000000,0x3ff204ae - .long 0xae177d59,0x3e2257cd - .long 0x4c000000,0x3ff207e7 - .long 0x6fe6d0dd,0xbe119fb7 - .long 0x60000000,0x3ff20c36 - .long 0x22ab7e20,0xbe18a6a1 - .long 0x94000000,0x3ff21089 - .long 0xca9c3288,0x3e2c8440 - .long 0xf2000000,0x3ff214e0 - .long 0x8575ebf1,0x3e200f9a - .long 0x80000000,0x3ff2193c - .long 0x219c164a,0xbe2140a7 - .long 0x44000000,0x3ff21d9c - .long 0x2238e180,0xbe326ebd - .long 0x44000000,0x3ff22200 - .long 0x0f5fa626,0xbe084ae9 - .long 0x10000000,0x3ff2254e - .long 0x20e924cc,0x3e34737d - .long 0x90000000,0x3ff229b9 - .long 0x7241c459,0xbe233bae - .long 0x60000000,0x3ff22e29 - .long 0xecaa31e6,0xbe2cc059 - .long 0x14000000,0x3ff23180 - .long 0x7a5a0dea,0x3e2bcde5 - .long 0x84000000,0x3ff235f7 - .long 0x52b90575,0x3e333da0 - .long 0x5a000000,0x3ff23a73 - .long 0x1b60c92e,0x3e3a7d2b - .long 0x24000000,0x3ff23dd3 - .long 0xb235ec84,0x3df512e9 - .long 0xc0000000,0x3ff24256 - .long 0x1f3855f6,0xbe1a9d64 - .long 0xd6000000,0x3ff246de - .long 0xfe758c34,0x3e12b491 - .long 0xde000000,0x3ff24a47 - .long 0x607a2edb,0xbe320de4 - .long 0xde000000,0x3ff24ed7 - .long 0xbc58ecd4,0x3dd8f375 - .long 0xde000000,0x3ff25246 - .long 0xda99c7ed,0xbe1ee42e - .long 0xe2000000,0x3ff256de - .long 0x88f4f655,0xbe220405 - .long 0xec000000,0x3ff25a53 - .long 0xc2b1fe7f,0x3e0eec7d - .long 0x0c000000,0x3ff25ef4 - .long 0xb6841168,0xbe1523a2 - .long 0x34000000,0x3ff2626f - .long 0x7056af50,0x3e200ef9 - .long 0x8a000000,0x3ff26717 - .long 0x8197860c,0xbe3643a3 - .long 0xe2000000,0x3ff26a98 - .long 0x52183874,0x3e204b1a - .long 0x84000000,0x3ff26f49 - .long 0x89899f96,0x3e2ce41f - .long 0x22000000,0x3ff272d1 - .long 0x2eba11d7,0x3e33edcf - .long 0x2e000000,0x3ff2778a - .long 0x9b69a0ac,0xbdd15cbf - .long 0x26000000,0x3ff27b18 - .long 0x4c9cfc18,0xbe384c83 - .long 0xd8000000,0x3ff27ea8 - .long 0x00ebd8b6,0x3e32abcc - .long 0x16000000,0x3ff2836e - .long 0xf0c27bf5,0xbe334f0d - .long 0x3e000000,0x3ff28705 - .long 0x2c84c19b,0x3e19ba08 - .long 0x34000000,0x3ff28a9f - .long 0x765ba98f,0xbe351348 - .long 0xd6000000,0x3ff28f70 - .long 0x0bb50259,0x3e25fd61 - .long 0x5c000000,0x3ff29311 - .long 0x1f0ba391,0x3e36468e - .long 0xbc000000,0x3ff296b4 - .long 0x5eb0d555,0xbe1b4b50 - .long 0xf4000000,0x3ff29a5a - .long 0x1684aafd,0x3e322e1b - .long 0x10000000,0x3ff29f3d - .long 0x7f3902f7,0xbe1143a0 - .long 0x04000000,0x3ff2a2ea - .long 0x9d87f711,0xbe296bf0 - .long 0xe0000000,0x3ff2a699 - .long 0xd317cd41,0xbe267680 - .long 0xa8000000,0x3ff2aa4c - .long 0x895632cb,0x3de71246 - .long 0x60000000,0x3ff2ae02 - .long 0x70ae3e69,0x3e383f37 - .long 0x48000000,0x3ff2b2f9 - .long 0x183dd905,0x3e019525 - .long 0xee000000,0x3ff2b6b5 - .long 0xb11ed34f,0xbde2956c - .long 0x92000000,0x3ff2ba75 - .long 0xebcee2d4,0x3e139d57 - .long 0x3a000000,0x3ff2be38 - .long 0x25efe1d2,0xbe24080b - .long 0xe8000000,0x3ff2c1fd - .long 0xca843d11,0xbe22f3d1 - .long 0xa0000000,0x3ff2c5c6 - .long 0x27157d0b,0x3e25d6d0 - .long 0x6a000000,0x3ff2c992 - .long 0x47c03cbd,0xbe1f901f - .long 0x46000000,0x3ff2cd61 - .long 0xc7d41505,0x3e0c9c6b - .long 0x3a000000,0x3ff2d133 - .long 0x4c9cbf49,0x3e335b1a - .long 0x4e000000,0x3ff2d508 - .long 0xf0d67754,0xbe31f5cc - .long 0x80000000,0x3ff2d8e0 - .long 0x08d6ec2a,0xbe14dddd - .long 0xd8000000,0x3ff2dcbb - .long 0xd1a31600,0x3df4f684 - .long 0x5a000000,0x3ff2e09a - .long 0xe7cb28ec,0x3e23d67d - .long 0x0c000000,0x3ff2e47c - .long 0x64fad19f,0xbe0416e4 - .long 0xf0000000,0x3ff2e860 - .long 0xc1845328,0x3e15f191 - .long 0x0e000000,0x3ff2ec49 - .long 0x0e8212a2,0xbe3407e4 - .long 0x66000000,0x3ff2f034 - .long 0xa6af14fb,0xbe119cdf - .long 0x00000000,0x3ff2f423 - .long 0xdd2ff4b2,0xbdd785b8 - .long 0xe0000000,0x3ff2f814 - .long 0x3c8bc168,0x3e0f9d26 - .long 0x0c000000,0x3ff2fc0a - .long 0x7f285f7f,0xbe25e721 - .long 0x54000000,0x3ff2feaf - .long 0xe4707431,0xbde3d3dc - .long 0x06000000,0x3ff302aa - .long 0x54e59df9,0x3e1b2c8a - .long 0x12000000,0x3ff306a8 - .long 0x5bf8bf35,0xbe35f560 - .long 0x78000000,0x3ff30aa9 - .long 0x1bf7ce44,0xbe201d62 - .long 0x40000000,0x3ff30eae - .long 0x268d3880,0xbda201ac - .long 0x6e000000,0x3ff312b6 - .long 0x78463451,0x3e323ba0 - .long 0x74000000,0x3ff31568 - .long 0x431ff6b5,0x3e27f197 - .long 0x5c000000,0x3ff31976 - .long 0x1d86063e,0xbe3cd285 - .long 0xb4000000,0x3ff31d87 - .long 0xde58cb2b,0xbe038490 - .long 0x86000000,0x3ff3219c - .long 0x0d0ecee4,0x3e2b6d7a - .long 0x04000000,0x3ff32457 - .long 0x67a045ac,0x3e081609 - .long 0xae000000,0x3ff32871 - .long 0x218aae81,0xbe2e422a - .long 0xde000000,0x3ff32c8f - .long 0x77d29102,0xbe27b381 - .long 0xa0000000,0x3ff32f50 - .long 0x1b3eff6b,0x3e21691f - .long 0xbe000000,0x3ff33374 - .long 0xd026a2c6,0x3e04f8ad - .long 0x72000000,0x3ff3379c - .long 0x4d48535f,0xbe22ae68 - .long 0x94000000,0x3ff33a63 - .long 0x1f2825ca,0x3df10fe6 - .long 0x4c000000,0x3ff33e91 - .long 0x0279faec,0x3e2a71d3 - .long 0xaa000000,0x3ff342c2 - .long 0x78d2f376,0xbe04bba3 - .long 0x46000000,0x3ff34590 - .long 0x998a41e9,0xbe03e672 - .long 0xc0000000,0x3ff349c7 - .long 0x36ef8407,0x3e3019b2 - .long 0xee000000,0x3ff34e02 - .long 0x645bac29,0x3e35fca4 - .long 0x20000000,0x3ff350d7 - .long 0x07bfe20f,0xbe25ac45 - .long 0x86000000,0x3ff35518 - .long 0x5aa1ebf5,0xbe2e6547 - .long 0xe0000000,0x3ff357f0 - .long 0xee89ceb5,0xbe287b40 - .long 0x8c000000,0x3ff35c38 - .long 0xa4e8d2ef,0x3e17e02f - .long 0x1c000000,0x3ff35f15 - .long 0xd982cb35,0xbe1b64a3 - .long 0x22000000,0x3ff36363 - .long 0x51a0e2b8,0xbe398839 - .long 0xfc000000,0x3ff367b4 - .long 0x5db6b242,0xbe243ecf - .long 0x5c000000,0x3ff36a98 - .long 0x04aa635d,0x3e2322a4 - .long 0xaa000000,0x3ff36ef0 - .long 0xdffe6c15,0xbe09399e - .long 0x5e000000,0x3ff371d8 - .long 0x25a11d1c,0xbe330e55 - .long 0xce000000,0x3ff374c1 - .long 0x3129afdf,0xbe268d7b - .long 0x3e000000,0x3ff37923 - .long 0xb97189dc,0xbe26657a - .long 0x10000000,0x3ff37c11 - .long 0xea29a16b,0xbe1fb083 - .long 0x1c000000,0x3ff38079 - .long 0x95fa7d47,0xbe340007 - .long 0x5a000000,0x3ff3836b - .long 0x5dc9ac54,0x3e10d40e - .long 0x12000000,0x3ff387da - .long 0x5012ad99,0x3e10b74e - .long 0xca000000,0x3ff38ad0 - .long 0xf7bd2128,0x3e2b0108 - .long 0x40000000,0x3ff38f46 - .long 0x9cc0ea9d,0x3e35e485 - .long 0x7e000000,0x3ff39241 - .long 0x770980a5,0x3e2ea300 - .long 0x90000000,0x3ff3953e - .long 0xd4c7a782,0xbe344ce9 - .long 0x96000000,0x3ff399bd - .long 0x940f9584,0xbe33e2fe - .long 0x3a000000,0x3ff39cbf - .long 0x24087e1a,0x3e2194f5 - .long 0xba000000,0x3ff39fc2 - .long 0x89c83cca,0xbe231d00 - .long 0x72000000,0x3ff3a44b - .long 0x3f2ced31,0x3e307ed8 - .long 0x98000000,0x3ff3a753 - .long 0x3dad14f7,0x3e34644c - .long 0xa0000000,0x3ff3aa5d - .long 0x44bf6650,0xbe198a0f - .long 0x32000000,0x3ff3aef0 - .long 0x83ce161a,0xbe13523e - .long 0xf2000000,0x3ff3b1fe - .long 0x3e4fb0ba,0xbe2b016e - .long 0x98000000,0x3ff3b50f - .long 0x5a266eb9,0xbe00c90d - .long 0x28000000,0x3ff3b9ac - .long 0x5d6435a9,0x3df6946b - .long 0x9a000000,0x3ff3bcc1 - .long 0xb51ea777,0x3deb71b8 - .long 0xfa000000,0x3ff3bfd8 - .long 0xddbd1e72,0x3e23310e - .long 0x4c000000,0x3ff3c2f2 - .long 0x3b61a362,0xbe036033 - .long 0xee000000,0x3ff3c79b - .long 0xfc551ad6,0xbe125411 - .long 0x22000000,0x3ff3caba - .long 0xf4f97f1b,0x3df6c6c6 - .long 0x4e000000,0x3ff3cdda - .long 0x34b9c5a5,0x3e265154 - .long 0x76000000,0x3ff3d0fc - .long 0x63686af4,0xbe11e3d1 - .long 0x6a000000,0x3ff3d5b3 - .long 0x41549461,0x3e22cde8 - .long 0x8e000000,0x3ff3d8da - .long 0x77ad6645,0xbe270a08 - .long 0xb2000000,0x3ff3dc03 - .long 0x15410840,0x3e008be3 - .long 0xdc000000,0x3ff3df2e - .long 0xcbeff11b,0xbe23e35d - .long 0x0c000000,0x3ff3e25c - .long 0x4f6d956b,0xbe26e298 - .long 0x44000000,0x3ff3e58b - .long 0xccfac644,0x3dfe9b4c - .long 0xee000000,0x3ff3ea55 - .long 0x67939d69,0x3e31da2e - .long 0x48000000,0x3ff3ed8a - .long 0x801a7764,0x3e1351ce - .long 0xb4000000,0x3ff3f0c0 - .long 0x501a20c7,0xbe3857a0 - .long 0x30000000,0x3ff3f3f9 - .long 0x57940f51,0xbdd234a1 - .long 0xc4000000,0x3ff3f733 - .long 0x3f2233b4,0xbe2ac2d6 - .long 0x6e000000,0x3ff3fa70 - .long 0xedca8a34,0x3e18e528 - .long 0x34000000,0x3ff3fdaf - .long 0x08b5b935,0x3de3efe5 - .long 0x16000000,0x3ff400f0 - .long 0x3ba01202,0x3e204ec9 - .long 0x64000000,0x3ff405d5 - .long 0x619a3fdd,0x3e3888e9 - .long 0x9c000000,0x3ff4091b - .long 0x5d7bbc67,0xbe35c660 - .long 0xf4000000,0x3ff40c63 - .long 0x371a5b37,0x3e312962 - .long 0x78000000,0x3ff40fae - .long 0xfd4427e8,0xbe266865 - .long 0x24000000,0x3ff412fb - .long 0xe4fe1e06,0xbe095508 - .long 0xfe000000,0x3ff41649 - .long 0x7f425eed,0xbe2d87f6 - .long 0x04000000,0x3ff4199b - .long 0xed161ccb,0x3e3a37a5 - .long 0x40000000,0x3ff41cee - .long 0xf32e9c13,0x3dd0ac84 - .long 0xb0000000,0x3ff42043 - .long 0x6f5637aa,0xbe33e54f - .long 0x56000000,0x3ff4239b - .long 0xb5063313,0xbe393f2e - .long 0x34000000,0x3ff426f5 - .long 0xbfa6486b,0xbe1a1603 - .type __libm_cbrtl_table_256,@object - .size __libm_cbrtl_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccos.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccos.S deleted file mode 100644 index c17b68ec18..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccos.S +++ /dev/null @@ -1,181 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccos.c" - .text -..TXTST0: -# -- Begin ccos - .text - .align 16,0x90 - .globl ccos -ccos: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp - fldl 12(%ebp) - fldl 20(%ebp) - movzwl 26(%ebp), %ecx - andl $32752, %ecx - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 32(%esp) - cmpl $32752, %ecx - fstpl 16(%esp) - fstpl 24(%esp) - jl ..B1.4 -..B1.2: - testl $1048575, 24(%ebp) - jne ..B1.5 -..B1.3: - cmpl $0, 20(%ebp) - jne ..B1.5 -..B1.4: - movzbl 27(%ebp), %esi - notl %esi - movzbl 23(%esp), %edx - andl $128, %esi - andl $127, %edx - orl %esi, %edx - movb %dl, 23(%esp) -..B1.5: - addl $-32, %esp - movl 48(%esp), %ecx - lea 32(%esp), %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %esi, (%esp) - lea 4(%esp), %edx - movl %ecx, (%edx) - movl 20(%esi), %ecx - movl %ecx, 4(%edx) - movl 24(%esi), %ecx - movl %ecx, 8(%edx) - movl 28(%esi), %ecx - movl %ecx, 12(%edx) - call ccosh@PLT -..B1.10: - movl (%esi), %edx - addl $28, %esp - movl %edx, (%edi) - movl 4(%esi), %ecx - movl 8(%esi), %edx - movl 12(%esi), %esi - movl %ecx, 4(%edi) - movl %edx, 8(%edi) - movl %esi, 12(%edi) - movl 32(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.7 -..B1.6: - movl %edi, %eax - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.7: - call __stack_chk_fail@PLT - .align 16,0x90 - .type ccos,@function - .size ccos,.-ccos - .data -# -- End ccos - .text -# -- Begin ccosf - .text - .align 16,0x90 - .globl ccosf -ccosf: -# parameter 1: 32 + %esp -..B2.1: -..L3: - - pushl %ebx - subl $24, %esp - movzwl 38(%esp), %ecx - andl $32640, %ecx - movl 32(%esp), %eax - cmpl $32640, %ecx - movl 36(%esp), %edx - movl %eax, 20(%esp) - movl %edx, 16(%esp) - jl ..B2.3 -..B2.2: - testl $8388607, 36(%esp) - jne ..B2.4 -..B2.3: - movzbl 39(%esp), %eax - notl %eax - movzbl 19(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 19(%esp) -..B2.4: - addl $8, %esp - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - pushl 12(%esp) - pushl 12(%esp) - call ccoshf@PLT -..B2.7: - addl $24, %esp - popl %ebx - ret - .align 16,0x90 - .type ccosf,@function - .size ccosf,.-ccosf - .data -# -- End ccosf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccosh.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccosh.S deleted file mode 100644 index 258c30ebed..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccosh.S +++ /dev/null @@ -1,468 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccosh.c" - .text -..TXTST0: -# -- Begin ccosh - .text - .align 16,0x90 - .globl ccosh -ccosh: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 88(%esp) - fstl 72(%esp) - fstpl 80(%esp) -..B1.2: - fnstcw 62(%esp) -..B1.3: - movzwl 18(%ebp), %esi - andl $32752, %esi - shrl $4, %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %esi - jge ..B1.19 -..B1.4: - testl %esi, %esi - jle ..B1.55 -..B1.5: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $2047, %ecx - jge ..B1.20 -..B1.6: - testl %ecx, %ecx - jle ..B1.53 -..B1.7: - cmpl $1034, %esi - jl ..B1.11 -..B1.8: - fldl _DBL_MAX_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fldl 20(%ebp) - fstl (%esp) - addl $-16, %esp - fstpl (%esp) - fstpl 24(%esp) - movl %ecx, 32(%esp) - call cos@PLT -..B1.69: - fldl 24(%esp) - fmul %st, %st(1) - fldl 12(%ebp) - movl 32(%esp), %ecx - addl $16, %esp - fmulp %st, %st(1) - testl %ecx, %ecx - fxch %st(1) - fstpl 72(%esp) - jle ..B1.10 -..B1.9: - addl $-16, %esp - fldl 16(%esp) - fstpl (%esp) - fstpl 24(%esp) - call sin@PLT -..B1.70: - fldl 24(%esp) - addl $16, %esp - fmulp %st, %st(1) - fstpl 80(%esp) - jmp ..B1.46 -..B1.10: - fmull (%esp) - fstpl 80(%esp) - jmp ..B1.46 -..B1.11: - movzwl 62(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.52 -..B1.12: - orl $-64768, %ecx - movw %cx, 60(%esp) -..B1.13: - fldcw 60(%esp) -..B1.14: - movl $1, 56(%esp) -..B1.15: - fldl 12(%ebp) - fstpl 48(%esp) - addl $-32, %esp - fldl 20(%ebp) - lea 32(%esp), %edx - lea 44(%esp), %ecx - fstpt (%esp) - movl %edx, 12(%esp) - movl %ecx, 16(%esp) - call sincosl@PLT -..B1.16: - fldl 80(%esp) - lea 56(%esp), %edx - lea 68(%esp), %ecx - fstpt (%esp) - movl %edx, 12(%esp) - movl %ecx, 16(%esp) - call sinhcoshl@PLT -..B1.72: - addl $32, %esp -..B1.17: - fldt 12(%esp) - fldt 36(%esp) - fmulp %st, %st(1) - fstpl 72(%esp) - fldt (%esp) - fldt 24(%esp) - fmulp %st, %st(1) - fstpl 80(%esp) - cmpl $0, 56(%esp) - je ..B1.46 -..B1.18: - fldcw 62(%esp) - jmp ..B1.46 -..B1.19: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx -..B1.20: - testl %ecx, %ecx - jne ..B1.27 -..B1.21: - testl $1048575, 24(%ebp) - jne ..B1.27 -..B1.22: - cmpl $0, 20(%ebp) - jne ..B1.27 -..B1.23: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call cosh@PLT -..B1.73: - fldl 20(%ebp) - addl $16, %esp - fstpl 80(%esp) - cmpl $2047, %esi - fstpl 72(%esp) - jl ..B1.26 -..B1.24: - testl $1048575, 16(%ebp) - jne ..B1.46 -..B1.25: - cmpl $0, 12(%ebp) - jne ..B1.46 -..B1.26: - movzbl 87(%esp), %esi - movl %esi, %edx - movzbl 19(%ebp), %ecx - andl $127, %edx - shrl $7, %esi - shrl $7, %ecx - xorl %ecx, %esi - shll $7, %esi - orl %esi, %edx - movb %dl, 87(%esp) - jmp ..B1.46 -..B1.27: - cmpl $2047, %ecx - jge ..B1.41 -..B1.28: - movl 16(%ebp), %edx - andl $1048575, %edx - testl %esi, %esi - jne ..B1.35 -..B1.29: - testl %edx, %edx - jne ..B1.40 -..B1.30: - cmpl $0, 12(%ebp) - jne ..B1.36 -..B1.31: - fldl 20(%ebp) - fstl 8(%esp) - addl $-16, %esp - fstpl (%esp) - movl %ecx, 32(%esp) - call cos@PLT -..B1.74: - fldl 12(%ebp) - movl 32(%esp), %ecx - addl $16, %esp - fxch %st(1) - fstpl 72(%esp) - testl %ecx, %ecx - jle ..B1.33 -..B1.32: - addl $-16, %esp - fldl 24(%esp) - fstpl (%esp) - fstpl 16(%esp) - call sin@PLT -..B1.75: - fldl 16(%esp) - addl $16, %esp - fmulp %st, %st(1) - jmp ..B1.34 -..B1.33: - fmull 8(%esp) -..B1.34: - fldl _DBL_MAX_NORMAL@GOTOFF(%ebx) - fxch %st(1) - fstpl 80(%esp) - fsubl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fstpl 64(%esp) - jmp ..B1.46 -..B1.35: - testl %edx, %edx - jne ..B1.40 -..B1.81: - cmpl $0, 12(%ebp) -..B1.36: - jne ..B1.40 -..B1.37: - fldl 12(%ebp) - cmpl $1023, %ecx - fstl 24(%esp) - fmul %st(0), %st - fstpl 16(%esp) - jge ..B1.39 -..B1.38: - fldl 16(%esp) - fstpl 72(%esp) - fldl 24(%esp) - fmull 20(%ebp) - fstpl 80(%esp) - jmp ..B1.46 -..B1.39: - fldl 20(%ebp) - fstl 8(%esp) - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.77: - addl $16, %esp - fstpl (%esp) - addl $-16, %esp - fldl 24(%esp) - fstpl (%esp) - call cos@PLT -..B1.76: - addl $16, %esp - fldl 16(%esp) - fmulp %st, %st(1) - fstpl 72(%esp) - fldl 24(%esp) - fmull (%esp) - fstpl 80(%esp) - jmp ..B1.46 -..B1.40: - fldl 12(%ebp) - fmul %st(0), %st - fstl 72(%esp) - fstpl 80(%esp) - jmp ..B1.46 -..B1.41: - cmpl $2047, %esi - jge ..B1.43 -..B1.42: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call cos@PLT - jmp ..B1.79 -..B1.43: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call cosh@PLT -..B1.79: - addl $16, %esp - fstpl 72(%esp) -..B1.44: - testl %esi, %esi - jle ..B1.59 -..B1.45: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.80: - addl $16, %esp - fstpl 80(%esp) -..B1.46: - movzwl 86(%esp), %edx - testl $32752, %edx - jne ..B1.50 -..B1.47: - testl $1048575, 84(%esp) - jne ..B1.49 -..B1.48: - cmpl $0, 80(%esp) - je ..B1.50 -..B1.49: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 64(%esp) -..B1.50: - movl 72(%esp), %edx - movl %edx, (%edi) - movl 76(%esp), %ecx - movl 80(%esp), %esi - movl 84(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 88(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.58 -..B1.51: - movl %edi, %eax - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.52: - movl $0, 56(%esp) - jmp ..B1.15 -..B1.53: - testl $1048575, 24(%ebp) - jne ..B1.7 -..B1.54: - cmpl $0, 20(%ebp) - jne ..B1.7 - jmp ..B1.20 -..B1.55: - testl $1048575, 16(%ebp) - jne ..B1.5 -..B1.56: - cmpl $0, 12(%ebp) - jne ..B1.5 - jmp ..B1.19 -..B1.58: - call __stack_chk_fail@PLT -..B1.59: - testl $1048575, 16(%ebp) - jne ..B1.45 -..B1.60: - cmpl $0, 12(%ebp) - jne ..B1.45 -..B1.61: - testl $1048575, 24(%ebp) - jne ..B1.66 -..B1.62: - cmpl $0, 20(%ebp) - jne ..B1.66 -..B1.63: - movzbl 19(%ebp), %ecx - movzbl 27(%ebp), %edx - andl $128, %ecx - andl $128, %edx - shrl $7, %ecx - shrl $7, %edx - cmpl %ecx, %edx - je ..B1.65 -..B1.64: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 80(%esp) - jmp ..B1.46 -..B1.65: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 80(%esp) - jmp ..B1.46 -..B1.66: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 80(%esp) - jmp ..B1.46 - .align 16,0x90 - .type ccosh,@function - .size ccosh,.-ccosh - .data -# -- End ccosh - .section .rodata, "a" - .align 16 - .align 16 -_DBL_MAX_NORMAL: - .long -1 - .long 2146435071 - .type _DBL_MAX_NORMAL,@object - .size _DBL_MAX_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -_DBL_NZERO: - .long 0 - .long -2147483648 - .type _DBL_NZERO,@object - .size _DBL_NZERO,8 - .space 8, 0x00 # pad - .align 16 -_DBL_PZERO: - .long 0 - .long 0 - .type _DBL_PZERO,@object - .size _DBL_PZERO,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccoshf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccoshf.S deleted file mode 100644 index fdc1d3bfc2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccoshf.S +++ /dev/null @@ -1,410 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccoshf.c" - .text -..TXTST0: -# -- Begin ccoshf - .text - .align 16,0x90 - .globl ccoshf -ccoshf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - xorl %eax, %eax - movl %eax, 48(%esp) - movl %eax, 52(%esp) -..B1.2: - fnstcw 38(%esp) -..B1.3: - movzwl 10(%ebp), %esi - andl $32640, %esi - shrl $7, %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $255, %esi - jge ..B1.18 -..B1.4: - testl %esi, %esi - jle ..B1.47 -..B1.5: - movzwl 14(%ebp), %edi - andl $32640, %edi - shrl $7, %edi - cmpl $255, %edi - jge ..B1.19 -..B1.6: - testl %edi, %edi - jle ..B1.46 -..B1.7: - cmpl $138, %esi - jl ..B1.11 -..B1.8: - fldl _DBL_MAX_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - flds 12(%ebp) - fsts 8(%esp) - addl $-16, %esp - fstps (%esp) - fstpl 16(%esp) - call cosf@PLT -..B1.57: - fldl 16(%esp) - addl $16, %esp - fmul %st, %st(1) - testl %edi, %edi - fxch %st(1) - fstps 48(%esp) - flds 8(%ebp) - fmulp %st, %st(1) - jle ..B1.10 -..B1.9: - addl $-16, %esp - flds 24(%esp) - fstps (%esp) - fstpl 16(%esp) - call sinf@PLT -..B1.58: - fldl 16(%esp) - addl $16, %esp - fmulp %st, %st(1) - fstps 52(%esp) - jmp ..B1.41 -..B1.10: - fmuls 8(%esp) - fstps 52(%esp) - jmp ..B1.41 -..B1.11: - movzwl 38(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.12: - orl $-64768, %edx - movw %dx, 36(%esp) -..B1.13: - fldcw 36(%esp) -..B1.14: - movl $1, %esi -..B1.15: - flds 8(%ebp) - fstps 32(%esp) - flds 12(%ebp) - fsts 24(%esp) - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.61: - addl $16, %esp - fstpl 16(%esp) - addl $-16, %esp - flds 40(%esp) - fstpl (%esp) - call cos@PLT -..B1.60: - addl $16, %esp - fstpl 24(%esp) - addl $-16, %esp - flds 48(%esp) - lea 16(%esp), %eax - lea 24(%esp), %edx - fstpl (%esp) - movl %eax, 8(%esp) - movl %edx, 12(%esp) - call sinhcosh@PLT -..B1.59: - addl $16, %esp -..B1.16: - fldl 24(%esp) - testl %esi, %esi - fmull 8(%esp) - fstps 48(%esp) - fldl 16(%esp) - fmull (%esp) - fstps 52(%esp) - je ..B1.41 -..B1.17: - fldcw 38(%esp) - jmp ..B1.41 -..B1.18: - movzwl 14(%ebp), %edi - andl $32640, %edi - shrl $7, %edi -..B1.19: - testl %edi, %edi - jne ..B1.24 -..B1.20: - testl $8388607, 12(%ebp) - jne ..B1.24 -..B1.21: - addl $-16, %esp - movl 8(%ebp), %eax - movl %eax, (%esp) - call coshf@PLT -..B1.62: - movl 12(%ebp), %eax - addl $16, %esp - fstps 48(%esp) - cmpl $255, %esi - movl %eax, 52(%esp) - jl ..B1.23 -..B1.22: - testl $8388607, 8(%ebp) - jne ..B1.41 -..B1.23: - movzbl 55(%esp), %edi - movl %edi, %eax - movzbl 11(%ebp), %esi - andl $127, %eax - shrl $7, %edi - shrl $7, %esi - xorl %esi, %edi - shll $7, %edi - orl %edi, %eax - movb %al, 55(%esp) - jmp ..B1.41 -..B1.24: - cmpl $255, %edi - jge ..B1.36 -..B1.25: - movl 8(%ebp), %eax - andl $8388607, %eax - testl %esi, %esi - jne ..B1.70 -..B1.26: - testl %eax, %eax - jne ..B1.31 -..B1.27: - flds 12(%ebp) - fsts 4(%esp) - addl $-16, %esp - fstps (%esp) - call cosf@PLT -..B1.63: - flds 8(%ebp) - addl $16, %esp - fxch %st(1) - fstps 48(%esp) - testl %edi, %edi - jle ..B1.29 -..B1.28: - addl $-16, %esp - flds 20(%esp) - fstps (%esp) - fstps 16(%esp) - call sinf@PLT -..B1.64: - flds 16(%esp) - addl $16, %esp - fmulp %st, %st(1) - jmp ..B1.30 -..B1.29: - fmuls 4(%esp) -..B1.30: - fldl _DBL_MAX_NORMAL@GOTOFF(%ebx) - fxch %st(1) - fstps 52(%esp) - fsubl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fstpl 40(%esp) - jmp ..B1.41 -..B1.70: - testl %eax, %eax -..B1.31: - flds 8(%ebp) - jne ..B1.35 -..B1.32: - fld %st(0) - cmpl $127, %edi - fmul %st(1), %st - fstps 8(%esp) - jge ..B1.34 -..B1.33: - flds 8(%esp) - fstps 48(%esp) - fmuls 12(%ebp) - fstps 52(%esp) - jmp ..B1.41 -..B1.34: - addl $-16, %esp - movl 12(%ebp), %esi - movl %esi, (%esp) - fstps 20(%esp) - call sinf@PLT -..B1.66: - flds 20(%esp) - addl $16, %esp - fxch %st(1) - fstps (%esp) - addl $-16, %esp - movl %esi, (%esp) - fstps 20(%esp) - call cosf@PLT -..B1.65: - flds 20(%esp) - addl $16, %esp - flds 8(%esp) - fmulp %st, %st(2) - fxch %st(1) - fstps 48(%esp) - fmuls (%esp) - fstps 52(%esp) - jmp ..B1.41 -..B1.35: - fmul %st(0), %st - fsts 48(%esp) - fstps 52(%esp) - jmp ..B1.41 -..B1.36: - cmpl $255, %esi - jge ..B1.38 -..B1.37: - addl $-16, %esp - movl 12(%ebp), %eax - movl %eax, (%esp) - call cosf@PLT - jmp ..B1.68 -..B1.38: - addl $-16, %esp - movl 8(%ebp), %eax - movl %eax, (%esp) - call coshf@PLT -..B1.68: - addl $16, %esp - fstps 48(%esp) -..B1.39: - testl %esi, %esi - jle ..B1.49 -..B1.40: - addl $-16, %esp - movl 12(%ebp), %eax - movl %eax, (%esp) - call sinf@PLT -..B1.69: - addl $16, %esp - fstps 52(%esp) -..B1.41: - movzwl 54(%esp), %eax - testl $32640, %eax - jne ..B1.44 -..B1.42: - testl $8388607, 52(%esp) - je ..B1.44 -..B1.43: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 40(%esp) -..B1.44: - movl 48(%esp), %eax - movl 52(%esp), %edx - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - xorl %esi, %esi - jmp ..B1.15 -..B1.46: - testl $8388607, 12(%ebp) - jne ..B1.7 - jmp ..B1.19 -..B1.47: - testl $8388607, 8(%ebp) - jne ..B1.5 - jmp ..B1.18 -..B1.49: - testl $8388607, 8(%ebp) - jne ..B1.40 -..B1.50: - testl $8388607, 12(%ebp) - jne ..B1.53 -..B1.51: - movzbl 11(%ebp), %edx - movzbl 15(%ebp), %eax - andl $128, %edx - andl $128, %eax - shrl $7, %edx - shrl $7, %eax - cmpl %edx, %eax - je ..B1.53 -..B1.52: - movl $-2147483648, 52(%esp) - jmp ..B1.41 -..B1.53: - movl $0, 52(%esp) - jmp ..B1.41 - .align 16,0x90 - .type ccoshf,@function - .size ccoshf,.-ccoshf - .data -# -- End ccoshf - .section .rodata, "a" - .align 16 - .align 16 -_DBL_MAX_NORMAL: - .long -1 - .long 2146435071 - .type _DBL_MAX_NORMAL,@object - .size _DBL_MAX_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .align 4 -.L_2il0floatpacket.6: - .long 0x80000000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccoshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccoshl.S deleted file mode 100644 index 208111211c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccoshl.S +++ /dev/null @@ -1,698 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccoshl.c" - .text -..TXTST0: -# -- Begin ccoshl - .text - .align 16,0x90 - .globl ccoshl -ccoshl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $308, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 244(%esp) - fstpt 112(%esp) - fldt 112(%esp) - fstpt 220(%esp) - fldt 220(%esp) - fstpt 232(%esp) -..B1.2: - fnstcw 62(%esp) -..B1.3: - movzwl 62(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.65 -..B1.4: - orl $-64768, %ecx - movw %cx, 60(%esp) -..B1.5: - fldcw 60(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 20(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - jge ..B1.33 -..B1.8: - testl %ecx, %ecx - jle ..B1.60 -..B1.9: - movzwl 32(%ebp), %edx - andl $32767, %edx - movl %edx, 12(%esp) - cmpl $32767, %edx - jge ..B1.33 -..B1.10: - cmpl $0, 12(%esp) - jle ..B1.58 -..B1.11: - cmpl $16398, %ecx - jl ..B1.19 -..B1.12: - fldt _CONSTANTS@GOTOFF(%ebx) - fmul %st(0), %st - fldt 24(%ebp) - fstpt (%esp) - fldt (%esp) - addl $-16, %esp - fstpt (%esp) - fstpt 32(%esp) - call cosl@PLT -..B1.68: - fldt 32(%esp) - addl $16, %esp - fmul %st, %st(1) - fxch %st(1) - fstpt 220(%esp) - fldt 12(%ebp) - fmulp %st, %st(1) - cmpl $0, 12(%esp) - jle ..B1.14 -..B1.13: - addl $-16, %esp - fldt 16(%esp) - fstpt (%esp) - fstpt 32(%esp) - call sinl@PLT -..B1.69: - fldt 32(%esp) - addl $16, %esp - fmulp %st, %st(1) - jmp ..B1.15 -..B1.14: - fldt (%esp) - fmulp %st, %st(1) -..B1.15: - fstpt 232(%esp) - testl %edi, %edi - je ..B1.17 -..B1.16: - fldcw 62(%esp) -..B1.17: - movl 220(%esp), %edx - movl %edx, (%esi) - movl 232(%esp), %edx - movl %edx, 12(%esi) - movl 236(%esp), %edx - movl %edx, 16(%esi) - movl 224(%esp), %ecx - movl 228(%esp), %edi - movl 240(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 244(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.57 -..B1.18: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.19: - fldt 12(%ebp) - addl $-16, %esp - lea 164(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - call __libm_coshl_k80 -..B1.70: - addl $16, %esp -..B1.20: - fldt 36+_CONSTANTS@GOTOFF(%ebx) - movzwl 20(%ebp), %ecx - fadd %st, %st(1) - fxch %st(1) - fstpt (%esp) - andl $32767, %ecx - fldt 148(%esp) - cmpl $16183, %ecx - fld %st(0) - fldt 160(%esp) - movl (%esp), %edx - fadd %st, %st(1) - fld %st(1) - fxch %st(2) - fsub %st, %st(3) - movl %edx, 28(%esp) - fxch %st(3) - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fld %st(0) - fmul %st(4), %st - fsub %st, %st(3) - fsubp %st, %st(3) - fxch %st(2) - fstpt 16(%esp) - fldt 16(%esp) - fsubrp %st, %st(3) - faddp %st, %st(2) - jge ..B1.22 -..B1.21: - fstp %st(2) - fldt 12(%ebp) - lea 184(%esp), %eax - fldt 24+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt -12(%eax) - fldt -72(%eax) - movzwl -4(%eax), %ecx - movl %ecx, %edx - andl $32767, %edx - andl $-32768, %ecx - addl $-16639, %edx - orl $-49153, %ecx - fstpt (%eax) - movl %edx, 44(%esp) - movw %cx, -4(%eax) - jmp ..B1.24 -..B1.22: - fldt 12(%ebp) - addl $-16, %esp - lea 188(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - fxch %st(2) - fstpt 16(%esp) - fstpt -124(%edx) - fstpt 48(%esp) - call __libm_sinhl_k80 -..B1.71: - fldt 48(%esp) - fldt 64(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.23: - faddp %st, %st(3) - fxch %st(2) - fstpt (%esp) - lea 184(%esp), %eax - movl (%esp), %edx - movl %edx, 44(%esp) - fxch %st(1) -..B1.24: - fldt 172(%esp) - fld %st(0) - fld %st(3) - fldt (%eax) - fadd %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fsubr %st(1), %st - fsubrp %st, %st(1) - fstpt 64(%esp) - fldt 64(%esp) - addl $-16, %esp - fxch %st(2) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt 24(%ebp) - fstpt (%esp) - lea 212(%esp), %edx - movl %edx, 12(%esp) - fxch %st(1) - fstpt 64(%esp) - fstpt -100(%edx) - fstpt 48(%esp) - call __libm_cosl_k80 -..B1.72: - fldt 48(%esp) - fxch %st(1) - fstpt 96(%esp) - fldt 112(%esp) - fldt 64(%esp) - addl $16, %esp -..B1.25: - fldt 196(%esp) - fld %st(0) - fldt 208(%esp) - movzwl 32(%ebp), %edx - fadd %st, %st(1) - fld %st(1) - andl $32767, %edx - cmpl $16183, %edx - fxch %st(2) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fld %st(5) - fmul %st(3), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 80(%esp) - fmul %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%esp) - fldt 12+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(1) - jge ..B1.27 -..B1.26: - fldt 24(%ebp) - fldt 24+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 124(%esp) - fldt 112(%esp) - movzwl 132(%esp), %ecx - movl %ecx, %edx - andl $-32768, %ecx - andl $32767, %edx - orl $-49153, %ecx - addl $-16639, %edx - movw %cx, 132(%esp) - fstpt 136(%esp) - fldt 124(%esp) - movl %edx, 12(%esp) - jmp ..B1.29 -..B1.27: - fldt 24(%ebp) - addl $-16, %esp - lea 140(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - fxch %st(1) - fstpt -76(%edx) - fstpt 16(%esp) - fstpt -28(%edx) - fstpt -92(%edx) - call __libm_sinl_k80 -..B1.73: - fldt 48(%esp) - fldt 112(%esp) - fldt 16(%esp) - fldt 64(%esp) - addl $16, %esp -..B1.28: - fldt 124(%esp) - fmul %st(5), %st - fstpt 124(%esp) - fldt 124(%esp) - fldt 136(%esp) - fmulp %st, %st(6) - fxch %st(5) - fstpt 112(%esp) - fldt 112(%esp) - fstpt 136(%esp) - movl $0, 12(%esp) - fxch %st(2) - fxch %st(3) - fxch %st(4) -..B1.29: - fldt 112(%esp) - fld %st(1) - fadd %st(1), %st - fmul %st, %st(6) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fsubr %st(6), %st - fsubrp %st, %st(6) - fxch %st(1) - fsub %st(5), %st - faddp %st, %st(1) - fstpt (%esp) - fld %st(1) - fldt 16(%esp) - fld %st(0) - fmul %st(3), %st - fxch %st(4) - fmulp %st, %st(3) - fldt 80(%esp) - addl $-32, %esp - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl 60(%esp), %edx - movl %edx, 24(%esp) - fstpt 128(%esp) - fstpt 64(%esp) - call __libm_scalbl_k80 -..B1.74: - fldt 64(%esp) - fldt 128(%esp) - addl $32, %esp -..B1.30: - fldt 64(%esp) - fld %st(0) - fmul %st(3), %st - fld %st(2) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(4) - fstpt 220(%esp) - fldt (%esp) - addl $-32, %esp - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl 76(%esp), %edx - addl 44(%esp), %edx - movl %edx, 24(%esp) - call __libm_scalbl_k80 -..B1.75: - addl $32, %esp -..B1.31: - fstpt 232(%esp) - jmp ..B1.53 -..B1.33: - movl 28(%ebp), %edx -..B1.34: - testl %edx, %edx - jne ..B1.40 -..B1.85: - cmpl $0, 24(%ebp) -..B1.35: - jne ..B1.40 -..B1.36: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - movl %ecx, 16(%esp) - call coshl@PLT -..B1.76: - fldt 24(%ebp) - movl 16(%esp), %ecx - addl $16, %esp - fstpt 232(%esp) - cmpl $32767, %ecx - fstpt 220(%esp) - jl ..B1.39 -..B1.37: - cmpl $-2147483648, 16(%ebp) - jne ..B1.53 -..B1.38: - cmpl $0, 12(%ebp) - jne ..B1.53 -..B1.39: - movzbl 241(%esp), %eax - movl %eax, %edx - movzbl 21(%ebp), %ecx - andl $127, %edx - shrl $7, %eax - shrl $7, %ecx - xorl %ecx, %eax - shll $7, %eax - orl %eax, %edx - movb %dl, 241(%esp) - jmp ..B1.53 -..B1.40: - movzwl 32(%ebp), %eax - andl $32767, %eax - movl %eax, 12(%esp) - cmpl $32767, %eax - jge ..B1.43 -..B1.41: - fldt 12(%ebp) - fstpt 32(%esp) - fldt 32(%esp) - addl $-16, %esp - fstpt (%esp) - call coshl@PLT -..B1.78: - fstpt 16(%esp) - addl $16, %esp - fldt 24(%ebp) - fstpt 16(%esp) - fldt 16(%esp) - addl $-16, %esp - fstpt (%esp) - call cosl@PLT -..B1.77: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpt 220(%esp) - cmpl $0, 12(%esp) - jle ..B1.63 -..B1.42: - addl $-16, %esp - fldt 48(%esp) - fstpt (%esp) - call sinhl@PLT -..B1.80: - fstpt 16(%esp) - fldt 32(%esp) - fstpt (%esp) - call sinl@PLT -..B1.79: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpt 232(%esp) - jmp ..B1.53 -..B1.43: - cmpl $32767, %ecx - jge ..B1.45 -..B1.44: - fldt 24(%ebp) - addl $-16, %esp - fstpt (%esp) - movl %edx, 16(%esp) - call cosl@PLT - jmp ..B1.82 -..B1.45: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - movl %edx, 16(%esp) - call coshl@PLT -..B1.82: - movl 16(%esp), %edx - addl $16, %esp - fstpt 220(%esp) -..B1.46: - cmpl $0, 16(%ebp) - jne ..B1.48 -..B1.47: - cmpl $0, 12(%ebp) - je ..B1.49 -..B1.48: - fldt 24(%ebp) - addl $-16, %esp - fstpt (%esp) - call sinl@PLT -..B1.83: - addl $16, %esp - fstpt 232(%esp) - jmp ..B1.53 -..B1.49: - cmpl $-2147483648, %edx - jne ..B1.52 -..B1.50: - cmpl $0, 24(%ebp) - jne ..B1.52 -..B1.51: - movzbl 21(%ebp), %ecx - fldz - movzbl 33(%ebp), %edx - andl $128, %ecx - andl $128, %edx - shrl $7, %ecx - shrl $7, %edx - xorl %edx, %ecx - fmull ones@GOTOFF(%ebx,%ecx,8) - fstpt 232(%esp) - jmp ..B1.53 -..B1.52: - fldt 112(%esp) - fstpt 232(%esp) -..B1.53: - testl %edi, %edi - je ..B1.55 -..B1.54: - fldcw 62(%esp) -..B1.55: - movl 220(%esp), %edx - movl %edx, (%esi) - movl 232(%esp), %edx - movl %edx, 12(%esi) - movl 236(%esp), %edx - movl %edx, 16(%esi) - movl 224(%esp), %ecx - movl 228(%esp), %edi - movl 240(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 244(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.57 -..B1.56: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.57: - call __stack_chk_fail@PLT -..B1.58: - movl 28(%ebp), %edx - testl %edx, %edx - jne ..B1.11 -..B1.59: - cmpl $0, 24(%ebp) - jne ..B1.11 - jmp ..B1.35 -..B1.60: - cmpl $0, 16(%ebp) - jne ..B1.9 -..B1.61: - cmpl $0, 12(%ebp) - jne ..B1.9 - jmp ..B1.33 -..B1.63: - addl $-16, %esp - fldt 48(%esp) - fstpt (%esp) - call sinhl@PLT -..B1.84: - addl $16, %esp - fldt 16(%esp) - fmulp %st, %st(1) - fstpt 232(%esp) - jmp ..B1.53 -..B1.65: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type ccoshl,@function - .size ccoshl,.-ccoshl - .data -# -- End ccoshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,48 - .align 16 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .hidden __libm_sinl_k80 - .hidden __libm_cosl_k80 - .hidden __libm_sinhl_k80 - .hidden __libm_coshl_k80 - .hidden __libm_scalbl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccosl.S deleted file mode 100644 index fbbf3f444e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ccosl.S +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccosl.c" - .text -..TXTST0: -# -- Begin ccosl - .text - .align 16,0x90 - .globl ccosl -ccosl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.5@GOTOFF(%ebx) - movl %edx, 76(%esp) - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - fldt 28(%esp) - fstpt 40(%esp) -..B1.2: - fnstcw 2(%esp) -..B1.3: - movzwl 2(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.16 -..B1.4: - orl $-64768, %ecx - movw %cx, (%esp) -..B1.5: - fldcw (%esp) -..B1.6: - movl $1, %edi -..B1.7: - fldt 12(%ebp) - movzwl 32(%ebp), %edx - andl $32767, %edx - fstpt 40(%esp) - cmpl $32767, %edx - fldt 24(%ebp) - fstpt 28(%esp) - jl ..B1.10 -..B1.8: - cmpl $-2147483648, 28(%ebp) - jne ..B1.11 -..B1.9: - cmpl $0, 24(%ebp) - jne ..B1.11 -..B1.10: - movzbl 33(%ebp), %ecx - notl %ecx - movzbl 37(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 37(%esp) -..B1.11: - addl $-32, %esp - lea 84(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl -24(%ecx), %ecx - movl %ecx, (%edx) - movl 64(%esp), %ecx - movl %ecx, 4(%edx) - movl 68(%esp), %ecx - movl %ecx, 8(%edx) - movl 72(%esp), %ecx - movl %ecx, 12(%edx) - movl 76(%esp), %ecx - movl %ecx, 16(%edx) - movl 80(%esp), %ecx - movl %ecx, 20(%edx) - call ccoshl@PLT -..B1.19: - addl $28, %esp - fldt 52(%esp) - testl %edi, %edi - fstpt 4(%esp) - fldt 64(%esp) - fstpt 16(%esp) - je ..B1.13 -..B1.12: - fldcw 2(%esp) -..B1.13: - movl 4(%esp), %edx - movl %edx, (%esi) - movl 16(%esp), %edx - movl %edx, 12(%esi) - movl 20(%esp), %edx - movl %edx, 16(%esi) - movl 8(%esp), %ecx - movl 12(%esp), %edi - movl 24(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 76(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.15 -..B1.14: - movl %esi, %eax - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.15: - call __stack_chk_fail@PLT -..B1.16: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type ccosl,@function - .size ccosl,.-ccosl - .data -# -- End ccosl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceil_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceil_wmt.S deleted file mode 100644 index 98442a5cc8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceil_wmt.S +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ceil_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin ceil - .text - .align 16,0x90 - .globl ceil -ceil: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - call static_func - movl %eax, %edx - movsd 112(%esp), %xmm0 - pextrw $3, %xmm0, %eax - movl $32752, %ecx - andl %eax, %ecx - cmpl $17184, %ecx - ja .L_2TAG_PACKET_0.0.2 - je .L_2TAG_PACKET_1.0.2 - cmpl $16368, %ecx - jl .L_2TAG_PACKET_2.0.2 - movq (%edx), %xmm1 - addsd %xmm0, %xmm1 - subsd (%edx), %xmm1 - cmpnlesd %xmm1, %xmm0 - movd %xmm0, %eax - movsd %xmm1, 24(%esp) - fldl 24(%esp) - fadds 20(%edx,%eax,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_2.0.2: - pxor %xmm1, %xmm1 - cmpnltsd %xmm0, %xmm1 - movd %xmm1, %ecx - shrl $15, %eax - subl %eax, %ecx - flds 40(%edx,%ecx,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_1.0.2: - pextrw $0, %xmm0, %eax - andl $1, %eax - fldl 112(%esp) - fadds 48(%edx,%eax,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - cmpl $32752, %ecx - fldl 112(%esp) - jae .L_2TAG_PACKET_4.0.2 - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_4.0.2: - fldz - faddp -.L_2TAG_PACKET_3.0.2: - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type ceil,@function - .size ceil,.-ceil - .data -# -- End ceil - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 1065353216 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 1065353216 - .long 0 - .long 0 - .long 1056964608 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1071644672 - .type static_const_table,@object - .size static_const_table,128 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceilf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceilf_gen.S deleted file mode 100644 index 73bdfbe79c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceilf_gen.S +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ceilf_gen.c" - .text -..TXTST0: -# -- Begin ceilf - .text - .align 16,0x90 - .globl ceilf -ceilf: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - movzwl 18(%esp), %edx - andl $32640, %edx - shrl $7, %edx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - cmpl $149, %edx - jge ..B1.11 -..B1.2: - cmpl $127, %edx - jl ..B1.7 -..B1.3: - flds .L_2il0floatpacket.0@GOTOFF(%eax) - flds 16(%esp) - fld %st(0) - fadd %st(2), %st - fstps (%esp) - flds (%esp) - fsubp %st, %st(2) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.6 -..B1.4: - fld1 - faddp %st, %st(1) -..B1.6: - addl $12, %esp - ret -..B1.7: - testl %edx, %edx - jne ..B1.10 -..B1.8: - testl $8388607, 16(%esp) - jne ..B1.10 -..B1.9: - flds 16(%esp) - addl $12, %esp - ret -..B1.10: - movzbl 19(%esp), %ecx - andl $128, %ecx - shrl $7, %ecx - movl 16(%esp), %edx - movl %edx, (%esp) - flds _pone_nzero@GOTOFF(%eax,%ecx,4) - addl $12, %esp - ret -..B1.11: - cmpl $150, %edx - jge ..B1.16 -..B1.12: - flds 16(%esp) - testb $1, 16(%esp) - je ..B1.15 -..B1.13: - fadds .L_2il0floatpacket.1@GOTOFF(%eax) -..B1.15: - addl $12, %esp - ret -..B1.16: - flds 16(%esp) - addl $12, %esp - ret - .align 16,0x90 - .type ceilf,@function - .size ceilf,.-ceilf - .data -# -- End ceilf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4b400000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x3f000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_pone_nzero: - .long 1065353216 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceill.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceill.S deleted file mode 100644 index 312cf5ecf6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ceill.S +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ceill.c" - .text -..TXTST0: -# -- Begin ceill - .text - .align 16,0x90 - .globl ceill -ceill: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $16445, %eax - jge ..B1.21 -..B1.4: - cmpl $16383, %eax - jl ..B1.15 -..B1.5: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.6: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.7: - fldcw 12(%esp) -..B1.8: - movl $1, %ecx -..B1.9: - fldt 8(%ebp) - fld %st(0) - fldl _TWO_63H@GOTOFF(%edx) - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt (%esp) - fldt (%esp) - fcompp - fnstsw %ax - sahf - jae ..B1.12 - jp ..B1.12 -..B1.10: - fldt (%esp) - faddl _ones@GOTOFF(%edx) - fstpt (%esp) -..B1.12: - testl %ecx, %ecx - je ..B1.14 -..B1.13: - fldcw 14(%esp) -..B1.14: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.15: - testl %eax, %eax - jne ..B1.20 -..B1.16: - cmpl $0, 12(%ebp) - jne ..B1.19 -..B1.17: - cmpl $0, 8(%ebp) - jne ..B1.19 -..B1.18: - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.19: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 16(%esp) -..B1.20: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl _pone_nzero@GOTOFF(%edx,%eax,8) - movl %ebp, %esp - popl %ebp - ret -..B1.21: - cmpl $16446, %eax - jge ..B1.30 -..B1.22: - testb $1, 8(%ebp) - je ..B1.29 -..B1.23: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.37 -..B1.24: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.25: - fldcw 12(%esp) -..B1.26: - fldt 8(%ebp) - faddl _halfs@GOTOFF(%edx) - fstpt (%esp) -..B1.27: - fldcw 14(%esp) -..B1.28: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.29: - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.30: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.31: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.32: - fldcw 12(%esp) -..B1.33: - fldt 8(%ebp) - fmull _ones@GOTOFF(%edx) - fstpt (%esp) -..B1.34: - fldcw 14(%esp) -..B1.35: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.36: - xorl %ecx, %ecx - jmp ..B1.9 -..B1.37: - fldt 8(%ebp) - faddl _halfs@GOTOFF(%edx) - fstpt (%esp) - jmp ..B1.28 -..B1.38: - fldt 8(%ebp) - fmull _ones@GOTOFF(%edx) - fstpt (%esp) - jmp ..B1.35 - .align 16,0x90 - .type ceill,@function - .size ceill,.-ceill - .data -# -- End ceill - .section .rodata, "a" - .align 4 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_pone_nzero: - .long 0 - .long 1072693248 - .long 0 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,16 - .align 4 -_halfs: - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .type _halfs,@object - .size _halfs,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexp_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexp_gen.S deleted file mode 100644 index 34e0d3f9ce..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexp_gen.S +++ /dev/null @@ -1,739 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cexp_gen.c" - .text -..TXTST0: -# -- Begin __libm_internal_cexp - .text - .align 16,0x90 - .hidden __libm_internal_cexp - .globl __libm_internal_cexp -__libm_internal_cexp: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 72(%esp) - fsts (%esp) - fstl 56(%esp) - fstpl 64(%esp) -..B1.2: - fnstcw 42(%esp) -..B1.3: - movzwl 18(%ebp), %edx - andl $32752, %edx - shrl $4, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %edx - jge ..B1.18 -..B1.4: - testl %edx, %edx - jle ..B1.46 -..B1.5: - movzwl 26(%ebp), %edi - andl $32752, %edi - shrl $4, %edi - cmpl $2047, %edi - jge ..B1.19 -..B1.6: - testl %edi, %edi - jle ..B1.44 -..B1.7: - cmpl $1034, %edx - jl ..B1.11 -..B1.8: - fldl 20(%ebp) - movzbl 19(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - fstl 16(%esp) - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - fldt _BIG_SMALL@GOTOFF(%ebx,%edx) - fmul %st(0), %st - fstpt (%esp) - addl $-16, %esp - fstpt (%esp) - call cosl@PLT -..B1.56: - addl $16, %esp - fldt (%esp) - testl %edi, %edi - fmulp %st, %st(1) - fstpl 56(%esp) - jle ..B1.10 -..B1.9: - addl $-16, %esp - fldl 32(%esp) - fstpt (%esp) - call sinl@PLT -..B1.57: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpl 64(%esp) - jmp ..B1.34 -..B1.10: - fldl 16(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpl 64(%esp) - jmp ..B1.34 -..B1.11: - movzwl 42(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.43 -..B1.12: - orl $-64768, %ecx - movw %cx, 40(%esp) -..B1.13: - fldcw 40(%esp) -..B1.14: - movl $1, 36(%esp) -..B1.15: - fldl 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call expl@PLT -..B1.59: - fldl 20(%ebp) - addl $-16, %esp - lea 32(%esp), %edx - lea 44(%esp), %ecx - fstpt (%esp) - movl %edx, 12(%esp) - movl %ecx, 16(%esp) - fstpt 24(%edx) - call sincosl@PLT -..B1.58: - fldt 56(%esp) - addl $32, %esp -..B1.16: - fldt 12(%esp) - fmul %st(1), %st - fstpl 56(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpl 64(%esp) - cmpl $0, 36(%esp) - je ..B1.34 -..B1.17: - fldcw 42(%esp) - jmp ..B1.34 -..B1.18: - movzwl 26(%ebp), %edi - andl $32752, %edi - shrl $4, %edi -..B1.19: - testl %edi, %edi - jne ..B1.23 -..B1.20: - testl $1048575, 24(%ebp) - jne ..B1.23 -..B1.21: - cmpl $0, 20(%ebp) - jne ..B1.23 -..B1.22: - fldl 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call expl@PLT -..B1.60: - fldl 20(%ebp) - addl $16, %esp - fstpl 64(%esp) - fstpl 56(%esp) - jmp ..B1.34 -..B1.23: - cmpl $2047, %edi - jge ..B1.26 -..B1.24: - fldl 12(%ebp) - addl $-16, %esp - fstpt (%esp) - movl %edx, 28(%esp) - call expl@PLT -..B1.62: - fstpt 16(%esp) - fldl 20(%ebp) - movl 28(%esp), %edx - addl $16, %esp - fstl 16(%esp) - addl $-16, %esp - fstpt (%esp) - movl %edx, 28(%esp) - call cosl@PLT -..B1.61: - movl 28(%esp), %edx - addl $16, %esp - testl %edi, %edi - fldt (%esp) - fmulp %st, %st(1) - fstpl 56(%esp) - jle ..B1.49 -..B1.25: - addl $-16, %esp - fldl 32(%esp) - fstpt (%esp) - call sinl@PLT -..B1.63: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpl 64(%esp) - jmp ..B1.34 -..B1.26: - cmpl $2047, %edx - jge ..B1.28 -..B1.27: - fldl 20(%ebp) - addl $-16, %esp - fstpt (%esp) - call sinl@PLT -..B1.64: - addl $16, %esp - fstl 56(%esp) - fstpl 64(%esp) - jmp ..B1.34 -..B1.28: - testl $1048575, 16(%ebp) - jne ..B1.30 -..B1.29: - cmpl $0, 12(%ebp) - je ..B1.31 -..B1.30: - fldl 12(%ebp) - fmul %st(0), %st - fstl 56(%esp) - fldl 20(%ebp) - fmulp %st, %st(1) - fstpl 64(%esp) - jmp ..B1.34 -..B1.31: - movzbl 19(%ebp), %edx - testl $128, %edx - je ..B1.33 -..B1.32: - fldl 20(%ebp) - fmul %st(0), %st - fstpl 20(%ebp) - flds (%esp) - fstl 56(%esp) - fstpl 64(%esp) - jmp ..B1.34 -..B1.33: - fldl 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call expl@PLT -..B1.66: - fldl 20(%ebp) - addl $16, %esp - fxch %st(1) - fstpl 56(%esp) - addl $-16, %esp - fstpt (%esp) - call sinl@PLT -..B1.65: - addl $16, %esp - fstpl 64(%esp) -..B1.34: - movzwl 62(%esp), %edx - testl $32752, %edx - jne ..B1.37 -..B1.35: - testl $1048575, 60(%esp) - jne ..B1.40 -..B1.36: - cmpl $0, 56(%esp) - jne ..B1.40 -..B1.37: - movzwl 70(%esp), %edx - testl $32752, %edx - jne ..B1.41 -..B1.38: - testl $1048575, 68(%esp) - jne ..B1.40 -..B1.39: - cmpl $0, 64(%esp) - je ..B1.41 -..B1.40: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 48(%esp) -..B1.41: - movl 56(%esp), %edx - movl %edx, (%esi) - movl 60(%esp), %ecx - movl 64(%esp), %edi - movl 68(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 12(%esi) - movl 72(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.53 -..B1.42: - movl %esi, %eax - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.43: - movl $0, 36(%esp) - jmp ..B1.15 -..B1.44: - testl $1048575, 24(%ebp) - jne ..B1.7 -..B1.45: - cmpl $0, 20(%ebp) - jne ..B1.7 - jmp ..B1.19 -..B1.46: - testl $1048575, 16(%ebp) - jne ..B1.5 -..B1.47: - cmpl $0, 12(%ebp) - jne ..B1.5 - jmp ..B1.18 -..B1.49: - testl %edx, %edx - jne ..B1.52 -..B1.50: - testl $1048575, 16(%ebp) - jne ..B1.52 -..B1.51: - cmpl $0, 12(%ebp) - je ..B1.25 -..B1.52: - fldl 16(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpl 64(%esp) - jmp ..B1.34 -..B1.53: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __libm_internal_cexp,@function - .size __libm_internal_cexp,.-__libm_internal_cexp - .data -# -- End __libm_internal_cexp - .text -# -- Begin cexp - .text - .align 16,0x90 - .globl cexp -cexp: -# parameter 1: 12 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - fldz - fldl 12(%ebp) - fldl 20(%ebp) - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 80(%esp) - fstpl 72(%esp) - fstpl 64(%esp) - fsts (%esp) - fstl 48(%esp) - fstpl 56(%esp) -..B2.2: - fnstcw 38(%esp) -..B2.3: - movzwl 70(%esp), %esi - andl $32752, %esi - shrl $4, %esi - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - cmpl $2047, %esi - jge ..B2.18 -..B2.4: - testl %esi, %esi - jle ..B2.46 -..B2.5: - movzwl 78(%esp), %edi - andl $32752, %edi - shrl $4, %edi - cmpl $2047, %edi - jge ..B2.19 -..B2.6: - testl %edi, %edi - jle ..B2.44 -..B2.7: - cmpl $1034, %esi - jl ..B2.11 -..B2.8: - fldl 72(%esp) - movzbl 71(%esp), %edx - andl $128, %edx - shrl $7, %edx - fstl 16(%esp) - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _BIG_SMALL@GOTOFF(%ebx,%ecx) - fmul %st(0), %st - fstpt (%esp) - addl $-16, %esp - fstpt (%esp) - call cosl@PLT -..B2.56: - addl $16, %esp - fldt (%esp) - testl %edi, %edi - fmulp %st, %st(1) - fstpl 48(%esp) - jle ..B2.10 -..B2.9: - addl $-16, %esp - fldl 32(%esp) - fstpt (%esp) - call sinl@PLT -..B2.57: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpl 56(%esp) - jmp ..B2.34 -..B2.10: - fldl 16(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpl 56(%esp) - jmp ..B2.34 -..B2.11: - movzwl 38(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.43 -..B2.12: - orl $-64768, %edx - movw %dx, 36(%esp) -..B2.13: - fldcw 36(%esp) -..B2.14: - movl $1, %esi -..B2.15: - addl $-16, %esp - fldl 80(%esp) - fstpt (%esp) - call expl@PLT -..B2.59: - addl $-16, %esp - fldl 104(%esp) - lea 32(%esp), %eax - lea 44(%esp), %edx - fstpt (%esp) - movl %eax, 12(%esp) - movl %edx, 16(%esp) - fstpt 24(%eax) - call sincosl@PLT -..B2.58: - fldt 56(%esp) - addl $32, %esp -..B2.16: - fldt 12(%esp) - testl %esi, %esi - fmul %st(1), %st - fstpl 48(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpl 56(%esp) - je ..B2.34 -..B2.17: - fldcw 38(%esp) - jmp ..B2.34 -..B2.18: - movzwl 78(%esp), %edi - andl $32752, %edi - shrl $4, %edi -..B2.19: - testl %edi, %edi - jne ..B2.23 -..B2.20: - testl $1048575, 76(%esp) - jne ..B2.23 -..B2.21: - cmpl $0, 72(%esp) - jne ..B2.23 -..B2.22: - addl $-16, %esp - fldl 80(%esp) - fstpt (%esp) - call expl@PLT -..B2.60: - addl $16, %esp - fldl 72(%esp) - fstpl 56(%esp) - fstpl 48(%esp) - jmp ..B2.34 -..B2.23: - cmpl $2047, %edi - jge ..B2.26 -..B2.24: - fldl 64(%esp) - addl $-16, %esp - fstpt (%esp) - call expl@PLT -..B2.62: - fstpt 16(%esp) - addl $16, %esp - fldl 72(%esp) - fstl 16(%esp) - addl $-16, %esp - fstpt (%esp) - call cosl@PLT -..B2.61: - addl $16, %esp - fldt (%esp) - testl %edi, %edi - fmulp %st, %st(1) - fstpl 48(%esp) - jle ..B2.49 -..B2.25: - addl $-16, %esp - fldl 32(%esp) - fstpt (%esp) - call sinl@PLT -..B2.63: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpl 56(%esp) - jmp ..B2.34 -..B2.26: - cmpl $2047, %esi - jge ..B2.28 -..B2.27: - addl $-16, %esp - fldl 88(%esp) - fstpt (%esp) - call sinl@PLT -..B2.64: - addl $16, %esp - fstl 48(%esp) - fstpl 56(%esp) - jmp ..B2.34 -..B2.28: - testl $1048575, 68(%esp) - jne ..B2.30 -..B2.29: - cmpl $0, 64(%esp) - je ..B2.31 -..B2.30: - fldl 64(%esp) - fmul %st(0), %st - fstl 48(%esp) - fldl 72(%esp) - fmulp %st, %st(1) - fstpl 56(%esp) - jmp ..B2.34 -..B2.31: - movzbl 71(%esp), %eax - testl $128, %eax - je ..B2.33 -..B2.32: - fldl 72(%esp) - fmul %st(0), %st - fstpl 72(%esp) - flds (%esp) - fstl 48(%esp) - fstpl 56(%esp) - jmp ..B2.34 -..B2.33: - addl $-16, %esp - fldl 80(%esp) - fstpt (%esp) - call expl@PLT -..B2.66: - addl $16, %esp - fstpl 48(%esp) - addl $-16, %esp - fldl 88(%esp) - fstpt (%esp) - call sinl@PLT -..B2.65: - addl $16, %esp - fstpl 56(%esp) -..B2.34: - movzwl 54(%esp), %eax - testl $32752, %eax - jne ..B2.37 -..B2.35: - testl $1048575, 52(%esp) - jne ..B2.40 -..B2.36: - cmpl $0, 48(%esp) - jne ..B2.40 -..B2.37: - movzwl 62(%esp), %eax - testl $32752, %eax - jne ..B2.41 -..B2.38: - testl $1048575, 60(%esp) - jne ..B2.40 -..B2.39: - cmpl $0, 56(%esp) - je ..B2.41 -..B2.40: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 40(%esp) -..B2.41: - fldl 48(%esp) - movl 8(%ebp), %eax - movl 52(%esp), %ecx - movl 48(%esp), %edx - movl 60(%esp), %edi - movl 56(%esp), %esi - fstp %st(0) - fldl 56(%esp) - fstp %st(0) - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl %esi, 8(%eax) - movl %edi, 12(%eax) - movl 80(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B2.53 -..B2.42: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B2.43: - xorl %esi, %esi - jmp ..B2.15 -..B2.44: - testl $1048575, 76(%esp) - jne ..B2.7 -..B2.45: - cmpl $0, 72(%esp) - jne ..B2.7 - jmp ..B2.19 -..B2.46: - testl $1048575, 68(%esp) - jne ..B2.5 -..B2.47: - cmpl $0, 64(%esp) - jne ..B2.5 - jmp ..B2.18 -..B2.49: - testl %esi, %esi - jne ..B2.52 -..B2.50: - testl $1048575, 68(%esp) - jne ..B2.52 -..B2.51: - cmpl $0, 64(%esp) - je ..B2.25 -..B2.52: - fldl 16(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpl 56(%esp) - jmp ..B2.34 -..B2.53: - call __stack_chk_fail@PLT - .align 16,0x90 - .type cexp,@function - .size cexp,.-cexp - .data -# -- End cexp - .section .rodata, "a" - .align 16 - .align 16 -_BIG_SMALL: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _BIG_SMALL,@object - .size _BIG_SMALL,24 - .space 8, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexpf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexpf_gen.S deleted file mode 100644 index 59cec37b81..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexpf_gen.S +++ /dev/null @@ -1,223 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cexpf_gen.c" - .text -..TXTST0: -# -- Begin __libm_internal_cexpf - .text - .align 16,0x90 - .hidden __libm_internal_cexpf - .globl __libm_internal_cexpf -__libm_internal_cexpf: -# parameter 1: 64 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $56, %esp - xorl %ecx, %ecx - flds 64(%esp) - flds 68(%esp) - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 44(%esp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpl 36(%esp) - movl %ecx, 4(%esp) - movl %ecx, 8(%esp) - fstpl 28(%esp) - addl $-32, %esp - movl 60(%esp), %edx - lea 44(%esp), %eax - movl 20(%eax), %ecx - movl %eax, (%esp) - lea 4(%esp), %eax - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl 68(%esp), %edx - movl 72(%esp), %ecx - movl %edx, 8(%eax) - movl %ecx, 12(%eax) - call cexp@PLT -..B1.11: - addl $28, %esp - fldl 12(%esp) - fsts 4(%esp) - fldl 20(%esp) - movzwl 6(%esp), %eax - testl $32640, %eax - fsts 8(%esp) - jne ..B1.3 -..B1.2: - testl $8388607, 4(%esp) - jne ..B1.5 -..B1.3: - movzwl 10(%esp), %eax - testl $32640, %eax - jne ..B1.6 -..B1.4: - testl $8388607, 8(%esp) - je ..B1.6 -..B1.5: - fstp %st(0) - fstp %st(0) - flds .L_2il0floatpacket.4@GOTOFF(%ebx) - fmul %st(0), %st - fstps (%esp) - flds 4(%esp) - flds 8(%esp) -..B1.6: - fxch %st(1) - fstps 4(%esp) - fstps 8(%esp) - movl 44(%esp), %ecx - xorl %esp, %ecx - movl 4(%esp), %eax - movl 8(%esp), %edx - cmpl %gs:20, %ecx - jne ..B1.8 -..B1.7: - addl $56, %esp - popl %ebx - ret -..B1.8: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __libm_internal_cexpf,@function - .size __libm_internal_cexpf,.-__libm_internal_cexpf - .data -# -- End __libm_internal_cexpf - .text -# -- Begin cexpf - .text - .align 16,0x90 - .globl cexpf -cexpf: -# parameter 1: 64 + %esp -..B2.1: -..L3: - - pushl %ebx - subl $56, %esp - xorl %ecx, %ecx - flds 64(%esp) - flds 68(%esp) - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 44(%esp) - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - fstpl 36(%esp) - movl %ecx, 4(%esp) - movl %ecx, 8(%esp) - fstpl 28(%esp) - addl $-32, %esp - movl 60(%esp), %edx - lea 44(%esp), %eax - movl 20(%eax), %ecx - movl %eax, (%esp) - lea 4(%esp), %eax - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl 68(%esp), %edx - movl 72(%esp), %ecx - movl %edx, 8(%eax) - movl %ecx, 12(%eax) - call cexp@PLT -..B2.11: - addl $28, %esp - fldl 12(%esp) - fsts 4(%esp) - fldl 20(%esp) - movzwl 6(%esp), %eax - testl $32640, %eax - fsts 8(%esp) - jne ..B2.3 -..B2.2: - testl $8388607, 4(%esp) - jne ..B2.5 -..B2.3: - movzwl 10(%esp), %eax - testl $32640, %eax - jne ..B2.6 -..B2.4: - testl $8388607, 8(%esp) - je ..B2.6 -..B2.5: - fstp %st(0) - fstp %st(0) - flds .L_2il0floatpacket.4@GOTOFF(%ebx) - fmul %st(0), %st - fstps (%esp) - flds 4(%esp) - flds 8(%esp) -..B2.6: - fxch %st(1) - fstps 4(%esp) - fstps 8(%esp) - movl 44(%esp), %ecx - xorl %esp, %ecx - movl 4(%esp), %eax - movl 8(%esp), %edx - cmpl %gs:20, %ecx - jne ..B2.8 -..B2.7: - addl $56, %esp - popl %ebx - ret -..B2.8: - call __stack_chk_fail@PLT - .align 16,0x90 - .type cexpf,@function - .size cexpf,.-cexpf - .data -# -- End cexpf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.4: - .long 0x00800000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexpl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexpl.S deleted file mode 100644 index 41bcd10d22..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cexpl.S +++ /dev/null @@ -1,611 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cexpl.c" - .text -..TXTST0: -# -- Begin cexpl - .text - .align 16,0x90 - .globl cexpl -cexpl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - movl %edx, 228(%esp) - fstpt 96(%esp) - fldt 96(%esp) - fstpt 204(%esp) - fldt 204(%esp) - fstpt 216(%esp) -..B1.2: - fnstcw 46(%esp) -..B1.3: - movzwl 46(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.61 -..B1.4: - orl $-64768, %ecx - movw %cx, 44(%esp) -..B1.5: - fldcw 44(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 20(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.31 -..B1.8: - testl %edx, %edx - jle ..B1.54 -..B1.9: - movzwl 32(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - jge ..B1.31 -..B1.10: - testl %ecx, %ecx - jle ..B1.52 -..B1.11: - fldt 12(%ebp) - lea 180(%esp), %ecx - fstpt (%ecx) - fldt -84(%ecx) - fstpt 12(%ecx) - addl $-16, %esp - lea 172(%esp), %edx - movl %edx, (%esp) - movl %ecx, 4(%esp) - call __libm_expl_k80 -..B1.64: - fstpt 96(%esp) - addl $16, %esp -..B1.12: - movzwl 164(%esp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.51 -..B1.13: - testl %edx, %edx - je ..B1.22 -..B1.14: - fldt 36+_CONSTANTS@GOTOFF(%ebx) - fldt 80(%esp) - faddp %st, %st(1) - fstpt (%esp) - fldt 156(%esp) - fld %st(0) - fldt 168(%esp) - movl (%esp), %edx - fadd %st, %st(1) - fld %st(1) - fxch %st(2) - fsub %st, %st(3) - movl %edx, 28(%esp) - fxch %st(3) - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fmul %st, %st(2) - fld %st(2) - fsub %st(4), %st - fsubrp %st, %st(3) - fxch %st(2) - fstpt 32(%esp) - fldt 32(%esp) - addl $-16, %esp - fsubrp %st, %st(3) - faddp %st, %st(2) - fldt 24(%ebp) - fstpt (%esp) - lea 148(%esp), %ecx - movl %ecx, 12(%esp) - fstpt -84(%ecx) - fstpt -68(%ecx) - call __libm_cosl_k80 -..B1.65: - fldt 80(%esp) - fldt 64(%esp) - addl $16, %esp -..B1.15: - fldt 132(%esp) - fld %st(0) - fldt 144(%esp) - movzwl 32(%ebp), %edx - fadd %st, %st(1) - andl $32767, %edx - fxch %st(1) - fsub %st, %st(2) - cmpl $16183, %edx - fxch %st(2) - fsubrp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fld %st(0) - fsub %st(3), %st - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st(4), %st - fxch %st(1) - fmulp %st, %st(4) - fldt 12+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(1) - jge ..B1.17 -..B1.16: - fldt 24(%ebp) - fldt 24+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 108(%esp) - fldt 96(%esp) - movzwl 116(%esp), %ecx - movl %ecx, %edx - andl $-32768, %ecx - andl $32767, %edx - orl $-49153, %ecx - addl $-16639, %edx - movw %cx, 116(%esp) - fstpt 120(%esp) - fldt 108(%esp) - movl %edx, 12(%esp) - jmp ..B1.19 -..B1.17: - fldt 24(%ebp) - addl $-16, %esp - lea 124(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - fxch %st(3) - fstpt 16(%esp) - fxch %st(2) - fstpt -92(%edx) - fxch %st(1) - fstpt -60(%edx) - fstpt -44(%edx) - call __libm_sinl_k80 -..B1.66: - fldt 80(%esp) - fldt 64(%esp) - fldt 32(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.18: - fldt 108(%esp) - fmul %st(5), %st - fstpt 108(%esp) - fldt 108(%esp) - fldt 120(%esp) - fmulp %st, %st(6) - fxch %st(5) - fstpt 96(%esp) - fldt 96(%esp) - fstpt 120(%esp) - movl $0, 12(%esp) - fxch %st(4) -..B1.19: - fldt 96(%esp) - fld %st(1) - fadd %st(1), %st - fmul %st, %st(4) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(3) - fsub %st(2), %st - fsubrp %st, %st(4) - fxch %st(1) - fsub %st(3), %st - faddp %st, %st(1) - fld %st(3) - fmul %st(5), %st - fldt 32(%esp) - addl $-32, %esp - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - fstpt (%esp) - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fstpt 12(%esp) - movl 60(%esp), %edx - movl %edx, 24(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt 80(%esp) - fstpt 96(%esp) - call __libm_scalbl_k80 -..B1.67: - fldt 96(%esp) - fldt 80(%esp) - fldt 32(%esp) - addl $32, %esp -..B1.20: - fxch %st(3) - fstpt 204(%esp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(2) - fldt 32(%esp) - addl $-32, %esp - fld %st(0) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%esp) - movl 60(%esp), %edx - addl 44(%esp), %edx - movl %edx, 24(%esp) - call __libm_scalbl_k80 -..B1.68: - addl $32, %esp -..B1.21: - fstpt 216(%esp) - jmp ..B1.46 -..B1.22: - fldt 12+_CONSTANTS@GOTOFF(%ebx) - fmul %st(0), %st - fstpt 16(%esp) -..B1.23: - fldt 16(%esp) - fstpt 156(%esp) - fldt 24(%ebp) - fstpt (%esp) - fldt (%esp) - addl $-16, %esp - fstpt (%esp) - call cosl@PLT -..B1.69: - addl $16, %esp - fldt 16(%esp) - fmulp %st, %st(1) - movzwl 32(%ebp), %edx - testl $32767, %edx - fstpt 204(%esp) - jle ..B1.25 -..B1.24: - addl $-16, %esp - fldt 16(%esp) - fstpt (%esp) - call sinl@PLT -..B1.70: - addl $16, %esp - fldt 16(%esp) - fmulp %st, %st(1) - fstpt 216(%esp) - jmp ..B1.26 -..B1.25: - fldt (%esp) - fldt 16(%esp) - fmulp %st, %st(1) - fstpt 216(%esp) -..B1.26: - testl %edi, %edi - je ..B1.28 -..B1.27: - fldt 80(%esp) - fstpt (%esp) -..B1.71: - fldcw 46(%esp) -..B1.28: - movl 204(%esp), %edx - movl %edx, (%esi) - movl 216(%esp), %edx - movl %edx, 12(%esi) - movl 220(%esp), %edx - movl %edx, 16(%esi) - movl 208(%esp), %ecx - movl 212(%esp), %edi - movl 224(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 228(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.50 -..B1.29: - movl %esi, %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.31: - movl 28(%ebp), %ecx -..B1.32: - testl %ecx, %ecx - jne ..B1.35 -..B1.79: - cmpl $0, 24(%ebp) -..B1.33: - jne ..B1.35 -..B1.34: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call expl@PLT -..B1.72: - fldt 24(%ebp) - addl $16, %esp - fstpt 216(%esp) - fstpt 204(%esp) - jmp ..B1.46 -..B1.35: - movzwl 32(%ebp), %ecx - andl $32767, %ecx - movl %ecx, 12(%esp) - cmpl $32767, %ecx - jge ..B1.38 -..B1.36: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call expl@PLT -..B1.74: - fldt 24(%ebp) - fxch %st(1) - fstpt 16(%esp) - fstpt (%esp) - fldt (%esp) - fstpt 32(%esp) - call cosl@PLT -..B1.73: - fldt 32(%esp) - addl $16, %esp - fldt (%esp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 204(%esp) - cmpl $0, 12(%esp) - jle ..B1.57 -..B1.37: - addl $-16, %esp - fstpt (%esp) - call sinl@PLT -..B1.75: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpt 216(%esp) - jmp ..B1.46 -..B1.38: - cmpl $32767, %edx - jge ..B1.40 -..B1.39: - fldt 24(%ebp) - addl $-16, %esp - fstpt (%esp) - call sinl@PLT -..B1.76: - addl $16, %esp - fstpt 204(%esp) - fldt 204(%esp) - fstpt 216(%esp) - jmp ..B1.46 -..B1.40: - cmpl $-2147483648, 16(%ebp) - jne ..B1.42 -..B1.41: - cmpl $0, 12(%ebp) - je ..B1.43 -..B1.42: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 204(%esp) - fldt 204(%esp) - fldt 24(%ebp) - fmulp %st, %st(1) - fstpt 216(%esp) - jmp ..B1.46 -..B1.43: - movzbl 21(%ebp), %edx - testl $128, %edx - je ..B1.45 -..B1.44: - fldt 24(%ebp) - fmul %st(0), %st - fstpt 24(%ebp) - fldt 96(%esp) - fstpt 204(%esp) - fldt 204(%esp) - fstpt 216(%esp) - jmp ..B1.46 -..B1.45: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call expl@PLT -..B1.78: - fldt 24(%ebp) - addl $16, %esp - fxch %st(1) - fstpt 204(%esp) - addl $-16, %esp - fstpt (%esp) - call sinl@PLT -..B1.77: - addl $16, %esp - fstpt 216(%esp) -..B1.46: - testl %edi, %edi - je ..B1.48 -..B1.47: - fldcw 46(%esp) -..B1.48: - movl 204(%esp), %edx - movl %edx, (%esi) - movl 216(%esp), %edx - movl %edx, 12(%esi) - movl 220(%esp), %edx - movl %edx, 16(%esi) - movl 208(%esp), %ecx - movl 212(%esp), %edi - movl 224(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 228(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.50 -..B1.49: - movl %esi, %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.50: - call __stack_chk_fail@PLT -..B1.51: - fldt _CONSTANTS@GOTOFF(%ebx) - fmul %st(0), %st - fstpt 16(%esp) - jmp ..B1.23 -..B1.52: - cmpl $0, 28(%ebp) - jne ..B1.11 -..B1.53: - cmpl $0, 24(%ebp) - jne ..B1.11 - jmp ..B1.33 -..B1.54: - cmpl $0, 16(%ebp) - jne ..B1.9 -..B1.55: - cmpl $0, 12(%ebp) - jne ..B1.9 - jmp ..B1.31 -..B1.57: - cmpl $0, 16(%ebp) - jne ..B1.59 -..B1.58: - cmpl $0, 12(%ebp) - je ..B1.37 -..B1.59: - fldt (%esp) - fmulp %st, %st(1) - fstpt 216(%esp) - jmp ..B1.46 -..B1.61: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type cexpl,@function - .size cexpl,.-cexpl - .data -# -- End cexpl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,48 - .data - .hidden __libm_cosl_k80 - .hidden __libm_sinl_k80 - .hidden __libm_expl_k80 - .hidden __libm_scalbl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimag.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimag.S deleted file mode 100644 index 6472dcce03..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimag.S +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cimag.c" - .text -..TXTST0: -# -- Begin cimag - .text - .align 16,0x90 - .globl cimag -cimag: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - fldl 12(%esp) - ret - .align 16,0x90 - .type cimag,@function - .size cimag,.-cimag - .data -# -- End cimag - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimagf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimagf.S deleted file mode 100644 index 9ab930d96a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimagf.S +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cimagf.c" - .text -..TXTST0: -# -- Begin cimagf - .text - .align 16,0x90 - .globl cimagf -cimagf: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - flds 8(%esp) - ret - .align 16,0x90 - .type cimagf,@function - .size cimagf,.-cimagf - .data -# -- End cimagf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimagl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimagl.S deleted file mode 100644 index aeb0c31d74..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cimagl.S +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cimagl.c" - .text -..TXTST0: -# -- Begin cimagl - .text - .align 16,0x90 - .globl cimagl -cimagl: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - fldt 16(%esp) - ret - .align 16,0x90 - .type cimagl,@function - .size cimagl,.-cimagl - .data -# -- End cimagl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog10.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog10.S deleted file mode 100644 index 3832ba4422..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog10.S +++ /dev/null @@ -1,716 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clog10.c" - .text -..TXTST0: -# -- Begin clog10f - .text - .align 16,0x90 - .globl clog10f -clog10f: -# parameter 1: 64 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $56, %esp - flds 64(%esp) - flds 68(%esp) - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 40(%esp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpl 32(%esp) - fstpl 24(%esp) - addl $-32, %esp - movl 56(%esp), %edx - lea 40(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %eax - movl 20(%ecx), %ecx - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl 64(%esp), %edx - movl 68(%esp), %ecx - movl %edx, 8(%eax) - movl %ecx, 12(%eax) - call clog10@PLT -..B1.7: - addl $28, %esp -..B1.2: - fldl 8(%esp) - fstps (%esp) - fldl 16(%esp) - fstps 4(%esp) - movl 40(%esp), %ecx - xorl %esp, %ecx - movl (%esp), %eax - movl 4(%esp), %edx - cmpl %gs:20, %ecx - jne ..B1.4 -..B1.3: - addl $56, %esp - popl %ebx - ret -..B1.4: - call __stack_chk_fail@PLT - .align 16,0x90 - .type clog10f,@function - .size clog10f,.-clog10f - .data -# -- End clog10f - .text -# -- Begin clog10 - .text - .align 16,0x90 - .globl clog10 -clog10: -# parameter 1: 12 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 176(%esp) - fstl 160(%esp) - fstpl 168(%esp) -..B2.2: - fnstcw 150(%esp) -..B2.3: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isnan -..B2.67: - addl $16, %esp -..B2.4: - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - testl %eax, %eax - jne ..B2.15 -..B2.5: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isnan -..B2.68: - addl $16, %esp -..B2.6: - testl %eax, %eax - jne ..B2.15 -..B2.7: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isinf -..B2.69: - addl $16, %esp -..B2.8: - testl %eax, %eax - jne ..B2.15 -..B2.9: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isinf -..B2.70: - addl $16, %esp -..B2.10: - testl %eax, %eax - jne ..B2.15 -..B2.11: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_iszero -..B2.71: - addl $16, %esp -..B2.12: - testl %eax, %eax - je ..B2.45 -..B2.13: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_iszero -..B2.72: - addl $16, %esp -..B2.14: - testl %eax, %eax - je ..B2.45 -..B2.15: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isnan -..B2.73: - addl $16, %esp -..B2.16: - testl %eax, %eax - je ..B2.21 -..B2.17: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isinf -..B2.74: - addl $16, %esp -..B2.18: - testl %eax, %eax - je ..B2.20 -..B2.19: - fldl 20(%ebp) - fmul %st(0), %st - fstpl 160(%esp) - fldl 12(%ebp) - fmul %st(0), %st - fstpl 168(%esp) - jmp ..B2.60 -..B2.20: - fldl 12(%ebp) - fmull 20(%ebp) - fstl 160(%esp) - fstpl 168(%esp) - jmp ..B2.60 -..B2.21: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isnan -..B2.75: - addl $16, %esp -..B2.22: - testl %eax, %eax - je ..B2.28 -..B2.23: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isinf -..B2.76: - addl $16, %esp -..B2.24: - testl %eax, %eax - je ..B2.26 -..B2.25: - fldl 12(%ebp) - fmul %st(0), %st - fstpl 160(%esp) - fldl 20(%ebp) - fmul %st(0), %st - jmp ..B2.27 -..B2.26: - fldl 20(%ebp) - fmul %st(0), %st - fstl 160(%esp) -..B2.27: - fstpl 168(%esp) - jmp ..B2.60 -..B2.28: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isinf -..B2.77: - addl $16, %esp -..B2.29: - testl %eax, %eax - je ..B2.35 -..B2.30: - fldl 12(%ebp) - fld1 - fsts 12(%esp) - addl $-16, %esp - fstpl (%esp) - fstl 8(%esp) - fstpl 16(%esp) - call copysign@PLT -..B2.78: - fldl 16(%esp) - fmul %st, %st(1) - addl $16, %esp - fldl 20(%ebp) - fld %st(0) - fmul %st(1), %st - faddp %st, %st(3) - fxch %st(2) - fstpl 160(%esp) - fldt CLOG10RECA@GOTOFF(%ebx) - fldl NEGINFA@GOTOFF(%ebx) - fucomp %st(2) - fnstsw %ax - sahf - jp ..B2.31 - je ..B2.62 -..B2.31: - fldl POSINFA@GOTOFF(%ebx) - fucomp %st(2) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - jne ..B2.34 - jp ..B2.34 -..B2.33: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fmulp %st, %st(1) -..B2.34: - addl $-16, %esp - flds 28(%esp) - fstpl (%esp) - fxch %st(1) - fstpl 8(%esp) - fstpt 16(%esp) - call copysign@PLT -..B2.79: - fldt 16(%esp) - addl $16, %esp - fmulp %st, %st(1) - fstpl 168(%esp) - jmp ..B2.60 -..B2.35: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isinf -..B2.80: - addl $16, %esp -..B2.36: - testl %eax, %eax - je ..B2.41 -..B2.37: - fldl 12(%ebp) - fldl POSINFA@GOTOFF(%ebx) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.38 - je ..B2.39 -..B2.38: - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fldt CLOG10RECA@GOTOFF(%ebx) - fmulp %st, %st(1) - jmp ..B2.40 -..B2.39: - fldl ZEROA@GOTOFF(%ebx) -..B2.40: - fldl 20(%ebp) - fxch %st(2) - fmul %st(0), %st - fadd %st(2), %st - fstpl 160(%esp) - fstl 168(%esp) - addl $-16, %esp - fstpl (%esp) - fstpl 8(%esp) - call copysign@PLT -..B2.81: - addl $16, %esp - fstpl 168(%esp) - jmp ..B2.60 -..B2.41: - fldl .L_2il0floatpacket.2@GOTOFF(%ebx) - fdivl ZEROA@GOTOFF(%ebx) - fstpl 160(%esp) - addl $-16, %esp - fldl 12(%ebp) - fstpl (%esp) - call __libm_internal_isnegzero -..B2.82: - addl $16, %esp -..B2.42: - testl %eax, %eax - je ..B2.44 -..B2.43: - fldl 20(%ebp) - addl $-16, %esp - fld1 - fstpl (%esp) - fstpl 8(%esp) - call copysign@PLT -..B2.83: - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fldt CLOG10RECA@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fmulp %st, %st(1) - fstpl 168(%esp) - jmp ..B2.60 -..B2.44: - fldl 20(%ebp) - fstpl 168(%esp) - jmp ..B2.60 -..B2.45: - movzwl 150(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B2.64 -..B2.46: - orl $-64768, %ecx - movw %cx, 148(%esp) -..B2.47: - fldcw 148(%esp) -..B2.48: - movl $1, %edi -..B2.49: - fldl 12(%ebp) - fld %st(0) - fabs - fldl 20(%ebp) - fld %st(0) - fabs - fcom %st(2) - fnstsw %ax - sahf - jae ..B2.51 - jp ..B2.51 -..B2.50: - fld %st(2) - jmp ..B2.52 -..B2.51: - fld %st(0) -..B2.52: - fxch %st(1) - fcom %st(3) - fnstsw %ax - sahf - jbe ..B2.54 -..B2.53: - fstp %st(0) - jmp ..B2.55 -..B2.54: - fstp %st(3) -..B2.55: - fld %st(0) - fmul %st(1), %st - fld %st(0) - fld %st(4) - fmul %st(5), %st - fadd %st, %st(1) - fld1 - fsubr %st(2), %st - fabs - fcompl .L_2il0floatpacket.4@GOTOFF(%ebx) - fnstsw %ax - sahf - jbe ..B2.57 -..B2.56: - fstp %st(5) - fstp %st(2) - fstp %st(3) - fstp %st(2) - addl $-16, %esp - fxch %st(1) - fstpt (%esp) - fstpl 16(%esp) - fstpl 168(%esp) - call logl@PLT -..B2.84: - fldl 168(%esp) - fldl 16(%esp) - addl $16, %esp - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fmulp %st, %st(3) - jmp ..B2.58 -..B2.57: - fstp %st(4) - fstp %st(5) - fstp %st(4) - fldt .L_2il0floatpacket.5@GOTOFF(%ebx) - fld %st(1) - fmulp %st, %st(1) - fxch %st(4) - fstpt 16(%esp) - fxch %st(3) - fstpt 28(%esp) - fxch %st(1) - fstpt (%esp) - fldt 28(%esp) - fldt 28(%esp) - fsub %st(3), %st - fsubrp %st, %st(1) - fstpt 40(%esp) - fldt 40(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 52(%esp) - fldt 40(%esp) - fldt 40(%esp) - fmulp %st, %st(1) - fldt 16(%esp) - fsubrp %st, %st(1) - fldt 52(%esp) - fldt 40(%esp) - fldt 52(%esp) - fldt 52(%esp) - fmulp %st, %st(1) - fldt (%esp) - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - fstpt 64(%esp) - fxch %st(2) - fstpt 76(%esp) - fldt .L_2il0floatpacket.5@GOTOFF(%ebx) - fmul %st(2), %st - fstpt 28(%esp) - fldt 28(%esp) - fldt 28(%esp) - fsub %st(3), %st - fsubrp %st, %st(1) - fstpt 88(%esp) - fldt 88(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 100(%esp) - fldt 88(%esp) - fldt 88(%esp) - fmulp %st, %st(1) - fldt 76(%esp) - fsubrp %st, %st(1) - fldt 100(%esp) - fmulp %st, %st(2) - fldt 88(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 100(%esp) - fldt 100(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 112(%esp) - fldt 16(%esp) - fldt 76(%esp) - faddp %st, %st(1) - fstpt 124(%esp) - fldt 124(%esp) - fldt 16(%esp) - fsubrp %st, %st(1) - fstpt 136(%esp) - fldt 16(%esp) - fldt 124(%esp) - fldt 136(%esp) - fsubrp %st, %st(1) - fsubrp %st, %st(1) - fldt 76(%esp) - fldt 136(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 136(%esp) - fldt 124(%esp) - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - fsubrp %st, %st(1) - fstpt 124(%esp) - fldt 124(%esp) - fldt 136(%esp) - fldt 64(%esp) - faddp %st, %st(1) - fldt 112(%esp) - addl $-16, %esp - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - call log1pl@PLT -..B2.85: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fldl 12(%ebp) - fldl 20(%ebp) -..B2.58: - fldt INVLN10A@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - fstpl 160(%esp) - fxch %st(2) - fstpt (%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT -..B2.86: - addl $32, %esp - fldt (%esp) - testl %edi, %edi - fmulp %st, %st(1) - fstpl 168(%esp) - je ..B2.60 -..B2.59: - fldcw 150(%esp) -..B2.60: - movl 160(%esp), %edx - movl %edx, (%esi) - movl 164(%esp), %ecx - movl 168(%esp), %edi - movl 172(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 12(%esi) - movl 176(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B2.63 -..B2.61: - movl %esi, %eax - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B2.62: - fstp %st(1) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fmulp %st, %st(1) - jmp ..B2.34 -..B2.63: - call __stack_chk_fail@PLT -..B2.64: - xorl %edi, %edi - jmp ..B2.49 - .align 16,0x90 - .type clog10,@function - .size clog10,.-clog10 - .data -# -- End clog10 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,12 - .space 4, 0x00 # pad - .align 16 -CLOG10RECA: - .long 2547844487 - .long 2929975909 - .long 16382 - .long 0 - .type CLOG10RECA,@object - .size CLOG10RECA,16 - .align 16 -NEGINFA: - .long 0 - .long 4293918720 - .type NEGINFA,@object - .size NEGINFA,8 - .space 8, 0x00 # pad - .align 16 -POSINFA: - .long 0 - .long 2146435072 - .type POSINFA,@object - .size POSINFA,8 - .space 8, 0x00 # pad - .align 16 -ZEROA: - .long 0 - .long 0 - .type ZEROA,@object - .size ZEROA,8 - .space 8, 0x00 # pad - .align 16 -INVLN10A: - .long 925397397 - .long 3730561193 - .long 16381 - .long 0 - .type INVLN10A,@object - .size INVLN10A,16 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xeb851eb8,0x3f9eb851 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .data - .hidden __libm_internal_isnegzero - .hidden __libm_internal_iszero - .hidden __libm_internal_isnan - .hidden __libm_internal_isinf - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog10l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog10l.S deleted file mode 100644 index 089f09f5b8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog10l.S +++ /dev/null @@ -1,975 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clog10l.c" - .text -..TXTST0: -# -- Begin clog10l - .text - .align 16,0x90 - .globl clog10l -clog10l: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 224(%esp) - fstpt 80(%esp) - fldt 80(%esp) - fstpt 200(%esp) - fldt 200(%esp) - fstpt 212(%esp) -..B1.2: - fnstcw 46(%esp) -..B1.3: - movzwl 46(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.77 -..B1.4: - orl $-64768, %ecx - movw %cx, 44(%esp) -..B1.5: - fldcw 44(%esp) -..B1.6: - movl $1, %esi -..B1.7: - movzwl 20(%ebp), %ecx - andl $32767, %ecx - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $32767, %ecx - jge ..B1.46 -..B1.8: - cmpl $32767, %edx - jge ..B1.85 -..B1.9: - testl %ecx, %ecx - jne ..B1.15 -..B1.10: - cmpl $0, 16(%ebp) - jne ..B1.15 -..B1.11: - cmpl $0, 12(%ebp) - jne ..B1.15 -..B1.12: - testl %edx, %edx - jne ..B1.15 -..B1.13: - cmpl $0, 28(%ebp) - jne ..B1.15 -..B1.14: - cmpl $0, 24(%ebp) - je ..B1.45 -..B1.15: - fldt 12(%ebp) - fld %st(0) - fabs - fstpt 16(%esp) - fldt 16(%esp) - fldt 24(%ebp) - fld %st(0) - fabs - fstpt (%esp) - fldt (%esp) - movzwl 24(%esp), %ecx - movzwl 8(%esp), %edx - andl $32767, %ecx - andl $32767, %edx - cmpl %edx, %ecx - jl ..B1.20 -..B1.16: - jne ..B1.21 -..B1.17: - movl 20(%esp), %edx - movl 4(%esp), %eax - cmpl %eax, %edx - jb ..B1.20 -..B1.18: - jne ..B1.21 -..B1.19: - movl 16(%esp), %edx - cmpl (%esp), %edx - jae ..B1.21 -..B1.20: - fstpt 16(%esp) - fldt 16(%esp) - movzwl 24(%esp), %ecx - fxch %st(2) - fstpt (%esp) - fldt (%esp) - andl $32767, %ecx -..B1.21: - cmpl $16382, %ecx - jg ..B1.26 -..B1.22: - jne ..B1.42 -..B1.23: - movl 20(%esp), %edx - cmpl 16+_CONSTANTS@GOTOFF(%ebx), %edx - ja ..B1.26 -..B1.24: - jne ..B1.42 -..B1.25: - movl 12+_CONSTANTS@GOTOFF(%ebx), %edx - cmpl 16(%esp), %edx - ja ..B1.42 -..B1.26: - cmpl $16383, %ecx - jl ..B1.31 -..B1.27: - jne ..B1.42 -..B1.28: - movl 20(%esp), %edx - cmpl 28+_CONSTANTS@GOTOFF(%ebx), %edx - jb ..B1.31 -..B1.29: - jne ..B1.42 -..B1.30: - movl 16(%esp), %edx - cmpl 24+_CONSTANTS@GOTOFF(%ebx), %edx - ja ..B1.42 -..B1.31: - movzwl 8(%esp), %edx - andl $32767, %edx - cmpl $8256, %edx - jg ..B1.36 -..B1.32: - jne ..B1.37 -..B1.33: - movl 4(%esp), %eax - cmpl 40+_CONSTANTS@GOTOFF(%ebx), %eax - ja ..B1.36 -..B1.34: - jne ..B1.37 -..B1.35: - movl (%esp), %eax - cmpl 36+_CONSTANTS@GOTOFF(%ebx), %eax - jbe ..B1.37 -..B1.36: - fldt _CONSTANTS@GOTOFF(%ebx) - fld %st(3) - fmul %st(4), %st - fld %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fsubr %st, %st(1) - fxch %st(1) - fabs - fcomp %st(2) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - jae ..B1.86 - jp ..B1.86 - jmp ..B1.38 -..B1.37: - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fld %st(3) - fmul %st(4), %st - fsub %st(1), %st - fabs - fldt _CONSTANTS@GOTOFF(%ebx) - fcompp - fnstsw %ax - sahf - jbe ..B1.86 -..B1.38: - fstp %st(2) - cmpl $16183, %edx - jl ..B1.40 -..B1.39: - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fld %st(3) - fmul %st(1), %st - lea _CONSTANTS@GOTOFF(%ebx), %eax - fxch %st(5) - fstpt (%esp) - fld %st(3) - fsubr %st(5), %st - fsubrp %st, %st(5) - fld %st(4) - lea 72(%eax), %edx - fmul %st(5), %st - fld %st(2) - fmulp %st, %st(2) - fxch %st(4) - fsub %st(5), %st - fld %st(2) - addl $84, %eax - movl %edx, 12(%esp) - fsubr %st(2), %st - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - fmul %st(4), %st - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(4) - fmul %st(0), %st - fstpt 48(%esp) - fld %st(5) - fadd %st(3), %st - fsub %st, %st(6) - fxch %st(6) - fsubrp %st, %st(3) - fmulp %st, %st(6) - fmul %st, %st(5) - fxch %st(3) - fsubrp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fld %st(0) - fsub %st(5), %st - fsubr %st, %st(2) - fld %st(1) - fsubp %st, %st(1) - fsubrp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fadd %st(5), %st - fld %st(0) - faddp %st, %st(3) - fld %st(2) - fxch %st(4) - fmul %st(0), %st - fstpt 16(%esp) - fldt 16(%esp) - faddp %st, %st(4) - fxch %st(3) - fstpt 64(%esp) - fldt 64(%esp) - fldt 48(%esp) - faddp %st, %st(1) - fldt 12+_Q1@GOTOFF(%ebx) - fmul %st(1), %st - fldt _Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fld %st(1) - fmul %st(2), %st - fmulp %st, %st(1) - fld %st(4) - fsub %st(6), %st - fsubr %st, %st(7) - fsubr %st(5), %st - fsubrp %st, %st(6) - fxch %st(5) - faddp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) - fld %st(1) - fsub %st(3), %st - fldt 32(%esp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(3), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fld %st(3) - fldt 64(%esp) - fld %st(0) - fsub %st(3), %st - fldt 16(%esp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(2), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(4) - fsub %st(2), %st - fldt 48(%esp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(6), %st - fsubrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fld %st(0) - fmul %st(4), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt (%edx) - fld %st(0) - fmul %st(3), %st - fldt (%eax) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 200(%esp) - fldt (%esp) - fxch %st(1) - jmp ..B1.49 -..B1.40: - cmpl $16383, %ecx - je ..B1.55 -..B1.41: - fstp %st(0) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fld %st(2) - fmul %st(1), %st - fld %st(3) - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fmul %st(1), %st - lea 72(%eax), %edx - addl $84, %eax - fsubp %st, %st(3) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - fmulp %st, %st(1) - fmul %st(3), %st - fld %st(0) - fld %st(3) - fxch %st(5) - fmul %st(0), %st - movl %edx, 12(%esp) - fadd %st, %st(1) - fxch %st(1) - fadd %st, %st(5) - fxch %st(4) - fsubr %st(5), %st - fxch %st(2) - fsubr %st(4), %st - fsubrp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - faddp %st, %st(2) - fld %st(2) - fmul %st(3), %st - fldt 12+_Q1@GOTOFF(%ebx) - fmul %st(4), %st - fldt _Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(0) - fmul %st(3), %st - fld %st(3) - fsubr %st(1), %st - fsubrp %st, %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt (%edx) - fld %st(0) - fmul %st(3), %st - fldt (%eax) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 200(%esp) - jmp ..B1.49 -..B1.42: - fstp %st(0) - fstp %st(1) - addl $-32, %esp - lea 80(%esp), %edx - movl %edx, (%esp) - fxch %st(1) - fstpt 4(%esp) - fstpt 16(%esp) - call __libm_hypot2l_k80 -..B1.80: - addl $32, %esp -..B1.43: - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fmul %st, %st(1) - fstpt 32(%esp) - fldt 120+_CONSTANTS@GOTOFF(%ebx) - fmul %st(1), %st - fstpt 16(%esp) - fldt 132+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%esp) - addl $-32, %esp - fldt 80(%esp) - lea 124(%esp), %edx - fstpt (%esp) - fldt -32(%edx) - fstpt 12(%esp) - movl %edx, 24(%esp) - call __libm_logl_k80 -..B1.81: - addl $32, %esp -..B1.44: - fldt 32(%esp) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fmulp %st, %st(1) - lea 72(%eax), %edx - fldt 92(%esp) - addl $84, %eax - movl %edx, 12(%esp) - fmul %st(1), %st - fldt 104(%esp) - fmulp %st, %st(2) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fld %st(0) - fmul %st(2), %st - fld %st(0) - fsub %st(3), %st - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fldt (%edx) - fld %st(0) - fmul %st(4), %st - fldt (%eax) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fmulp %st, %st(6) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt 16(%esp) - fld %st(0) - fadd %st(3), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt (%esp) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 200(%esp) - fldt 12(%ebp) - fxch %st(1) - jmp ..B1.49 -..B1.45: - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fldz - fdivrl .L_2il0floatpacket.12@GOTOFF(%ebx) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fstpt 200(%esp) - lea 72(%eax), %edx - fldt 12(%ebp) - addl $84, %eax - movl %edx, 12(%esp) - fxch %st(1) - jmp ..B1.49 -..B1.46: - je ..B1.70 -..B1.47: - cmpl $32767, %edx - je ..B1.63 -..B1.48: - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fldt 48(%eax) - lea 72(%eax), %edx - fmul %st(0), %st - addl $84, %eax - fstpt 200(%esp) - fldt 12(%ebp) - movl %edx, 12(%esp) - fxch %st(1) -..B1.49: - fldt 80(%esp) - xorl %edx, %edx - movl %edx, 140(%esp) - fstpt 128(%esp) - fldt 128(%esp) - fxch %st(2) - fstpt 116(%esp) - movl %edx, 168(%esp) - fxch %st(1) - fstpt 156(%esp) - fldt 24(%ebp) - fstpt 144(%esp) - addl $-16, %esp - lea 188(%esp), %ecx - lea 160(%esp), %edx - movl %ecx, (%esp) - lea 132(%esp), %ecx - movl %edx, 4(%esp) - movl %ecx, 8(%esp) - movl %eax, -116(%edx) - fstpt -128(%edx) - call __libm_atan2l_k80 -..B1.82: - fldt 32(%esp) - movl 44(%esp), %eax - addl $16, %esp -..B1.50: - fldt 172(%esp) - fmul %st, %st(1) - fld %st(0) - movl 12(%esp), %edx - fsubr %st(2), %st - movl 196(%esp), %ecx - fsubrp %st, %st(2) - fsub %st(1), %st - fldt 184(%esp) - addl $-32, %esp - faddp %st, %st(1) - fldt (%edx) - fld %st(0) - fmul %st(3), %st - fstpt (%esp) - fldt (%eax) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 12(%esp) - movl %ecx, 24(%esp) - call __libm_scalbl_k80 -..B1.83: - addl $32, %esp -..B1.51: - fstpt 212(%esp) - testl %esi, %esi - je ..B1.53 -..B1.52: - fldcw 46(%esp) -..B1.53: - movl 200(%esp), %edx - movl %edx, (%edi) - movl 212(%esp), %edx - movl %edx, 12(%edi) - movl 216(%esp), %edx - movl %edx, 16(%edi) - movl 204(%esp), %ecx - movl 208(%esp), %esi - movl 220(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 20(%edi) - movl 224(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.62 -..B1.54: - movl %edi, %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.55: - cmpl $-2147483648, 20(%esp) - jne ..B1.41 -..B1.56: - cmpl $0, 16(%esp) - jne ..B1.41 -..B1.57: - fstp %st(2) - fstp %st(0) - cmpl $0, 4(%esp) - jne ..B1.60 -..B1.58: - cmpl $0, (%esp) - jne ..B1.60 -..B1.59: - fstp %st(0) - fldt 80(%esp) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fstpt 200(%esp) - lea 72(%eax), %edx - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - addl $84, %eax - movl %edx, 12(%esp) - jmp ..B1.49 -..B1.60: - fstp %st(1) - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fldt 108(%eax) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - movzwl 8(%esp), %ecx - movl %ecx, %edx - andl $-32768, %ecx - fld %st(0) - orl $-49153, %ecx - fld %st(1) - movw %cx, 8(%esp) - lea 72(%eax), %ecx - fldt (%esp) - addl $84, %eax - fmul %st, %st(2) - fld %st(0) - movl %ecx, 12(%esp) - addl $-32, %esp - andl $32767, %edx - fsubr %st(3), %st - fsubrp %st, %st(3) - fld %st(2) - lea -33167(%edx,%edx), %edx - fmul %st(3), %st - fmul %st, %st(2) - fld %st(2) - fsub %st(1), %st - fsubrp %st, %st(3) - fsub %st(2), %st - fxch %st(1) - fsub %st(3), %st - fmul %st, %st(3) - fxch %st(5) - fmulp %st, %st(3) - fld %st(4) - fmulp %st, %st(5) - fxch %st(2) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fldt (%ecx) - fld %st(0) - fmul %st(4), %st - fstpt (%esp) - fldt (%eax) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - movl %edx, 24(%esp) - movl %eax, 60(%esp) - fstpt 48(%esp) - call __libm_scalbl_k80 -..B1.84: - fldt 48(%esp) - movl 60(%esp), %eax - addl $32, %esp -..B1.61: - fxch %st(1) - fstpt 200(%esp) - fldt 12(%ebp) - fxch %st(1) - jmp ..B1.49 -..B1.62: - call __stack_chk_fail@PLT -..B1.63: - cmpl $-2147483648, 28(%ebp) - jne ..B1.65 -..B1.64: - cmpl $0, 24(%ebp) - je ..B1.48 -..B1.65: - cmpl $32767, %ecx - je ..B1.67 -..B1.66: - fldt 24(%ebp) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fmul %st(0), %st - lea 72(%eax), %edx - fstpt 200(%esp) - addl $84, %eax - fldt 12(%ebp) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - movl %edx, 12(%esp) - jmp ..B1.49 -..B1.67: - cmpl $-2147483648, 16(%ebp) - jne ..B1.66 -..B1.68: - cmpl $0, 12(%ebp) - jne ..B1.66 -..B1.69: - fldt 12(%ebp) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fld %st(0) - lea 72(%eax), %edx - fmul %st(1), %st - addl $84, %eax - fstpt 200(%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - movl %edx, 12(%esp) - jmp ..B1.49 -..B1.70: - cmpl $-2147483648, 16(%ebp) - jne ..B1.72 -..B1.71: - cmpl $0, 12(%ebp) - je ..B1.47 -..B1.72: - cmpl $32767, %edx - je ..B1.74 -..B1.73: - fldt 12(%ebp) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fldt 24(%ebp) - lea 72(%eax), %edx - fmul %st(1), %st - addl $84, %eax - fstpt 200(%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - movl %edx, 12(%esp) - jmp ..B1.49 -..B1.74: - cmpl $-2147483648, 28(%ebp) - jne ..B1.73 -..B1.75: - cmpl $0, 24(%ebp) - jne ..B1.73 -..B1.76: - fldt 24(%ebp) - lea _CONSTANTS@GOTOFF(%ebx), %eax - fmul %st(0), %st - lea 72(%eax), %edx - fstpt 200(%esp) - addl $84, %eax - fldt 12(%ebp) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - movl %edx, 12(%esp) - jmp ..B1.49 -..B1.77: - xorl %esi, %esi - jmp ..B1.7 -..B1.85: - cmpl $32767, %ecx - je ..B1.70 - jmp ..B1.47 -..B1.86: - fstp %st(0) - jmp ..B1.42 - .align 16,0x90 - .type clog10l,@function - .size clog10l,.-clog10l - .data -# -- End clog10l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,12 - .space 4, 0x00 # pad - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16358 - .word 0 - .word 37342 - .word 47265 - .word 62214 - .word 46340 - .word 16382 - .word 0 - .word 64512 - .word 65535 - .word 31 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8256 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 55465 - .word 56923 - .word 16381 - .word 0 - .word 43711 - .word 54638 - .word 50772 - .word 56481 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16583 - .word 0 - .word 0 - .word 0 - .word 39557 - .word 39456 - .word 16381 - .word 0 - .word 51839 - .word 3796 - .word 3310 - .word 34305 - .word 49112 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,144 - .align 16 -_Q1: - .word 3134 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 49331 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .type _Q1,@object - .size _Q1,24 - .align 8 -.L_2il0floatpacket.12: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .data - .hidden __libm_logl_k80 - .hidden __libm_hypot2l_k80 - .hidden __libm_scalbl_k80 - .hidden __libm_atan2l_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog_gen.S deleted file mode 100644 index 82d47aa12f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clog_gen.S +++ /dev/null @@ -1,756 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clog_gen.c" - .text -..TXTST0: -# -- Begin __libm_internal_clog - .text - .align 16,0x90 - .hidden __libm_internal_clog - .globl __libm_internal_clog -__libm_internal_clog: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 168(%esp) - fstl 152(%esp) - fstpl 160(%esp) -..B1.2: - fnstcw 134(%esp) -..B1.3: - movzwl 18(%ebp), %ecx - andl $32752, %ecx - movzwl 26(%ebp), %edx - andl $32752, %edx - shrl $4, %ecx - shrl $4, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %ecx - jge ..B1.21 -..B1.4: - cmpl $2047, %edx - jge ..B1.48 -..B1.5: - movzwl 134(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.26 -..B1.6: - orl $-64768, %ecx - movw %cx, 132(%esp) -..B1.7: - fldcw 132(%esp) -..B1.8: - movl $1, %edi -..B1.9: - fldl 12(%ebp) - fabs - fldl 20(%ebp) - fabs - fcom %st(1) - fnstsw %ax - sahf - jae ..B1.11 - jp ..B1.11 -..B1.10: - fld %st(1) - jmp ..B1.12 -..B1.11: - fld %st(0) -..B1.12: - fxch %st(1) - fcom %st(2) - fnstsw %ax - sahf - jbe ..B1.14 -..B1.13: - fstp %st(0) - jmp ..B1.15 -..B1.14: - fstp %st(2) -..B1.15: - fld %st(0) - fmul %st(1), %st - fld %st(0) - fld %st(3) - fmul %st(4), %st - fadd %st, %st(1) - fld1 - fsubr %st(2), %st - fabs - fcompl .L_2il0floatpacket.6@GOTOFF(%ebx) - fnstsw %ax - sahf - jbe ..B1.17 -..B1.16: - fstp %st(3) - fstp %st(2) - fstp %st(2) - fstp %st(1) - addl $-16, %esp - fstpt (%esp) - call logl@PLT -..B1.44: - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fstpl 152(%esp) - jmp ..B1.18 -..B1.17: - fstp %st(1) - fxch %st(3) - fstpt 136(%esp) - fstpt (%esp) - fld %st(0) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fldt 12(%esp) - fsub %st(2), %st - fsubrp %st, %st(1) - fstpt 24(%esp) - fldt 24(%esp) - fsubrp %st, %st(1) - fstpt 36(%esp) - fldt 24(%esp) - fldt 24(%esp) - fmulp %st, %st(1) - fldt (%esp) - fsubrp %st, %st(1) - fldt 36(%esp) - fldt 24(%esp) - fldt 36(%esp) - fldt 36(%esp) - fmulp %st, %st(1) - fldt 136(%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - fstpt 48(%esp) - fxch %st(2) - fstpt 60(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fmul %st(2), %st - fstpt 12(%esp) - fldt 12(%esp) - fldt 12(%esp) - fsub %st(3), %st - fsubrp %st, %st(1) - fstpt 72(%esp) - fldt 72(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 84(%esp) - fldt 72(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fldt 60(%esp) - fsubrp %st, %st(1) - fldt 84(%esp) - fmulp %st, %st(2) - fldt 72(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 84(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 96(%esp) - fldt (%esp) - fldt 60(%esp) - faddp %st, %st(1) - fstpt 108(%esp) - fldt 108(%esp) - fldt (%esp) - fsubrp %st, %st(1) - fstpt 120(%esp) - fldt (%esp) - fldt 108(%esp) - fldt 120(%esp) - fsubrp %st, %st(1) - fsubrp %st, %st(1) - fldt 60(%esp) - fldt 120(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 120(%esp) - fldt 108(%esp) - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fsubrp %st, %st(1) - fstpt 108(%esp) - fldt 108(%esp) - fldt 120(%esp) - fldt 48(%esp) - faddp %st, %st(1) - fldt 96(%esp) - addl $-16, %esp - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - call log1pl@PLT -..B1.45: - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fstpl 152(%esp) -..B1.18: - testl %edi, %edi - je ..B1.20 -..B1.19: - fldcw 134(%esp) -..B1.20: - fldl 20(%ebp) - addl $-16, %esp - fldl 12(%ebp) - fstpl 8(%esp) - fstpl (%esp) - call atan2@PLT - jmp ..B1.47 -..B1.21: - je ..B1.35 -..B1.22: - cmpl $2047, %edx - je ..B1.28 -..B1.23: - fldl _DBL_PINF@GOTOFF(%ebx) - fstpl 152(%esp) - addl $-16, %esp - fldl 20(%ebp) - fldl 12(%ebp) - fstpl 8(%esp) - fstpl (%esp) - call atan2@PLT -..B1.47: - addl $16, %esp - fstpl 160(%esp) -..B1.24: - movl 152(%esp), %edx - movl %edx, (%esi) - movl 156(%esp), %ecx - movl 160(%esp), %edi - movl 164(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 12(%esi) - movl 168(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.27 -..B1.25: - movl %esi, %eax - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.26: - xorl %edi, %edi - jmp ..B1.9 -..B1.27: - call __stack_chk_fail@PLT -..B1.28: - testl $1048575, 24(%ebp) - jne ..B1.30 -..B1.29: - cmpl $0, 20(%ebp) - je ..B1.23 -..B1.30: - fldl 20(%ebp) - cmpl $2047, %ecx - fmul %st(0), %st - fstl 160(%esp) - je ..B1.32 -..B1.31: - fstpl 152(%esp) - jmp ..B1.24 -..B1.32: - testl $1048575, 16(%ebp) - jne ..B1.31 -..B1.33: - cmpl $0, 12(%ebp) - jne ..B1.31 -..B1.34: - fstp %st(0) - fldl 12(%ebp) - fmul %st(0), %st - fstpl 152(%esp) - jmp ..B1.24 -..B1.35: - testl $1048575, 16(%ebp) - jne ..B1.37 -..B1.36: - cmpl $0, 12(%ebp) - je ..B1.22 -..B1.37: - fldl 12(%ebp) - cmpl $2047, %edx - fld %st(0) - fmul %st(1), %st - fstpl 160(%esp) - je ..B1.39 -..B1.38: - fldl 20(%ebp) - fmulp %st, %st(1) - fstpl 152(%esp) - jmp ..B1.24 -..B1.39: - testl $1048575, 24(%ebp) - jne ..B1.38 -..B1.40: - cmpl $0, 20(%ebp) - jne ..B1.38 -..B1.41: - fstp %st(0) - fldl 20(%ebp) - fmul %st(0), %st - fstpl 152(%esp) - jmp ..B1.24 -..B1.48: - cmpl $2047, %ecx - je ..B1.35 - jmp ..B1.22 - .align 16,0x90 - .type __libm_internal_clog,@function - .size __libm_internal_clog,.-__libm_internal_clog - .data -# -- End __libm_internal_clog - .text -# -- Begin clog - .text - .align 16,0x90 - .globl clog -clog: -# parameter 1: 12 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - fldz - fldl 12(%ebp) - fldl 20(%ebp) - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 184(%esp) - fstpl 176(%esp) - fstpl 168(%esp) - fstl 152(%esp) - fstpl 160(%esp) -..B2.2: - fnstcw 134(%esp) -..B2.3: - movzwl 174(%esp), %edx - andl $32752, %edx - movzwl 182(%esp), %eax - andl $32752, %eax - shrl $4, %edx - shrl $4, %eax - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - cmpl $2047, %edx - jge ..B2.21 -..B2.4: - cmpl $2047, %eax - jge ..B2.48 -..B2.5: - movzwl 134(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.26 -..B2.6: - orl $-64768, %edx - movw %dx, 132(%esp) -..B2.7: - fldcw 132(%esp) -..B2.8: - movl $1, %esi -..B2.9: - fldl 168(%esp) - fabs - fldl 176(%esp) - fabs - fcom %st(1) - fnstsw %ax - sahf - jae ..B2.11 - jp ..B2.11 -..B2.10: - fld %st(1) - jmp ..B2.12 -..B2.11: - fld %st(0) -..B2.12: - fxch %st(1) - fcom %st(2) - fnstsw %ax - sahf - jbe ..B2.14 -..B2.13: - fstp %st(0) - jmp ..B2.15 -..B2.14: - fstp %st(2) -..B2.15: - fld %st(0) - fmul %st(1), %st - fld %st(0) - fld %st(3) - fmul %st(4), %st - fadd %st, %st(1) - fld1 - fsubr %st(2), %st - fabs - fcompl .L_2il0floatpacket.6@GOTOFF(%ebx) - fnstsw %ax - sahf - jbe ..B2.17 -..B2.16: - fstp %st(3) - fstp %st(2) - fstp %st(2) - fstp %st(1) - addl $-16, %esp - fstpt (%esp) - call logl@PLT -..B2.44: - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fstpl 152(%esp) - jmp ..B2.18 -..B2.17: - fstp %st(1) - fxch %st(3) - fstpt 136(%esp) - fstpt (%esp) - fld %st(0) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fldt 12(%esp) - fsub %st(2), %st - fsubrp %st, %st(1) - fstpt 24(%esp) - fldt 24(%esp) - fsubrp %st, %st(1) - fstpt 36(%esp) - fldt 24(%esp) - fldt 24(%esp) - fmulp %st, %st(1) - fldt (%esp) - fsubrp %st, %st(1) - fldt 36(%esp) - fldt 24(%esp) - fldt 36(%esp) - fldt 36(%esp) - fmulp %st, %st(1) - fldt 136(%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - fstpt 48(%esp) - fxch %st(2) - fstpt 60(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fmul %st(2), %st - fstpt 12(%esp) - fldt 12(%esp) - fldt 12(%esp) - fsub %st(3), %st - fsubrp %st, %st(1) - fstpt 72(%esp) - fldt 72(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 84(%esp) - fldt 72(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fldt 60(%esp) - fsubrp %st, %st(1) - fldt 84(%esp) - fmulp %st, %st(2) - fldt 72(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 84(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 96(%esp) - fldt (%esp) - fldt 60(%esp) - faddp %st, %st(1) - fstpt 108(%esp) - fldt 108(%esp) - fldt (%esp) - fsubrp %st, %st(1) - fstpt 120(%esp) - fldt (%esp) - fldt 108(%esp) - fldt 120(%esp) - fsubrp %st, %st(1) - fsubrp %st, %st(1) - fldt 60(%esp) - fldt 120(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 120(%esp) - fldt 108(%esp) - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fsubrp %st, %st(1) - fstpt 108(%esp) - fldt 108(%esp) - fldt 120(%esp) - fldt 48(%esp) - faddp %st, %st(1) - fldt 96(%esp) - addl $-16, %esp - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - call log1pl@PLT -..B2.45: - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fstpl 152(%esp) -..B2.18: - testl %esi, %esi - je ..B2.20 -..B2.19: - fldcw 134(%esp) -..B2.20: - fldl 176(%esp) - fldl 168(%esp) - addl $-16, %esp - fstpl 8(%esp) - fstpl (%esp) - call atan2@PLT - jmp ..B2.47 -..B2.21: - je ..B2.35 -..B2.22: - cmpl $2047, %eax - je ..B2.28 -..B2.23: - fldl _DBL_PINF@GOTOFF(%ebx) - fstpl 152(%esp) - fldl 176(%esp) - fldl 168(%esp) - addl $-16, %esp - fstpl 8(%esp) - fstpl (%esp) - call atan2@PLT -..B2.47: - addl $16, %esp - fstpl 160(%esp) -..B2.24: - fldl 152(%esp) - movl 8(%ebp), %eax - movl 156(%esp), %ecx - movl 152(%esp), %edx - movl 164(%esp), %edi - movl 160(%esp), %esi - fstp %st(0) - fldl 160(%esp) - fstp %st(0) - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl %esi, 8(%eax) - movl %edi, 12(%eax) - movl 184(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B2.27 -..B2.25: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B2.26: - xorl %esi, %esi - jmp ..B2.9 -..B2.27: - call __stack_chk_fail@PLT -..B2.28: - testl $1048575, 180(%esp) - jne ..B2.30 -..B2.29: - cmpl $0, 176(%esp) - je ..B2.23 -..B2.30: - fldl 176(%esp) - cmpl $2047, %edx - fmul %st(0), %st - fstl 160(%esp) - je ..B2.32 -..B2.31: - fstpl 152(%esp) - jmp ..B2.24 -..B2.32: - testl $1048575, 172(%esp) - jne ..B2.31 -..B2.33: - cmpl $0, 168(%esp) - jne ..B2.31 -..B2.34: - fstp %st(0) - fldl 168(%esp) - fmul %st(0), %st - fstpl 152(%esp) - jmp ..B2.24 -..B2.35: - testl $1048575, 172(%esp) - jne ..B2.37 -..B2.36: - cmpl $0, 168(%esp) - je ..B2.22 -..B2.37: - fldl 168(%esp) - cmpl $2047, %eax - fld %st(0) - fmul %st(1), %st - fstpl 160(%esp) - je ..B2.39 -..B2.38: - fldl 176(%esp) - fmulp %st, %st(1) - fstpl 152(%esp) - jmp ..B2.24 -..B2.39: - testl $1048575, 180(%esp) - jne ..B2.38 -..B2.40: - cmpl $0, 176(%esp) - jne ..B2.38 -..B2.41: - fstp %st(0) - fldl 176(%esp) - fmul %st(0), %st - fstpl 152(%esp) - jmp ..B2.24 -..B2.48: - cmpl $2047, %edx - je ..B2.35 - jmp ..B2.22 - .align 16,0x90 - .type clog,@function - .size clog,.-clog - .data -# -- End clog - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,12 - .space 4, 0x00 # pad - .align 16 -_DBL_PINF: - .long 0 - .long 2146435072 - .type _DBL_PINF,@object - .size _DBL_PINF,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xeb851eb8,0x3f9eb851 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clogf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clogf_wmt.S deleted file mode 100644 index 91bc907cf1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clogf_wmt.S +++ /dev/null @@ -1,2539 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clogf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin clogf - .text - .align 16,0x90 - .globl clogf -clogf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $136, %esp - movl %esi, 80(%esp) - call static_func - movl %eax, %esi - movss 144(%esp), %xmm0 - movss 148(%esp), %xmm1 - movss %xmm0, (%esp) - movss %xmm1, 4(%esp) - movl %ebx, 8(%esp) - movaps %xmm0, %xmm2 - cvtss2sd %xmm1, %xmm0 - cvtss2sd %xmm2, %xmm1 - movsd %xmm0, 40(%esp) - movsd %xmm1, 32(%esp) - andpd 3248(%esi), %xmm0 - andpd 3248(%esi), %xmm1 - movl 4(%esp), %edx - movl (%esp), %ecx - movl $-2147483648, %eax - andl %edx, %eax - andl $2139095040, %edx - subl $8388608, %edx - cmpl $2130706432, %edx - jae .L_2TAG_PACKET_0.0.2 - movl %ecx, %edx - andl $-2147483648, %ecx - andl $2139095040, %edx - subl $8388608, %edx - cmpl $2130706432, %edx - jae .L_2TAG_PACKET_1.0.2 - movapd %xmm0, %xmm3 - divsd %xmm1, %xmm0 - movq 3232(%esi), %xmm2 - mulsd %xmm1, %xmm1 - mulsd %xmm3, %xmm3 - addsd %xmm3, %xmm1 - movq %xmm1, 16(%esp) - pand %xmm1, %xmm2 - pextrw $3, %xmm1, %edx - subsd 4800(%esi), %xmm1 - pand 3248(%esi), %xmm1 - cmpltsd 2048(%esi), %xmm1 - movmskpd %xmm1, %ebx - por 4800(%esi), %xmm2 - testl $1, %ebx - jne .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_3.0.2: - xorl %ecx, %eax - movl 20(%esp), %ebx - sarl $4, %edx - andl $1044480, %ebx - movsd 4816(%esi), %xmm3 - xorpd %xmm4, %xmm4 - subl $1023, %edx - xorpd %xmm7, %xmm7 - sarl $31, %ecx - movl %edx, 12(%esp) - movd %ecx, %xmm6 - pshufd $0, %xmm6, %xmm6 - andpd 4848(%esi), %xmm6 - andpd %xmm0, %xmm3 - pextrw $3, %xmm0, %edx - shrl $9, %ebx - movsd %xmm0, %xmm1 - subl $16288, %edx - cmpl $1119, %edx - ja .L_2TAG_PACKET_4.0.2 - movl $16464, %ecx - pinsrw $3, %ecx, %xmm4 - shrl $16, %eax - orpd 4832(%esi), %xmm3 - movsd %xmm4, %xmm7 - mulsd (%esi,%ebx), %xmm2 - cmpsd $6, %xmm3, %xmm4 - movsd 4800(%esi), %xmm5 - minsd %xmm7, %xmm3 - andpd %xmm4, %xmm0 - mulsd %xmm3, %xmm1 - andpd %xmm4, %xmm5 - subsd %xmm3, %xmm0 - subsd 4800(%esi), %xmm2 - addsd %xmm5, %xmm1 - movq 3296(%esi), %xmm5 - divsd %xmm1, %xmm0 - cvtsi2sdl 12(%esp), %xmm1 - movl $176, %ecx - cmpl $176, %edx - cmova %ecx, %edx - addl $1, %edx - movsd 4880(%esi), %xmm4 - pinsrw $3, %eax, %xmm7 - addsd 3376(%esi,%edx,8), %xmm6 - xorpd %xmm7, %xmm6 - mulsd %xmm2, %xmm5 - addsd 3288(%esi), %xmm5 - mulsd %xmm2, %xmm5 - addsd 3280(%esi), %xmm5 - mulsd %xmm2, %xmm5 - xorpd %xmm0, %xmm7 - mulsd 3264(%esi), %xmm1 - mulsd %xmm0, %xmm0 - mulsd %xmm7, %xmm4 - addsd %xmm6, %xmm7 - mulsd %xmm4, %xmm0 - addsd 4976(%esi,%ebx), %xmm1 - addsd %xmm7, %xmm0 - addsd %xmm1, %xmm5 - mulsd 2064(%esi), %xmm5 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm5, %xmm5 - movd %xmm0, %edx - movd %xmm5, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_4.0.2: - addl $944, %edx - cmpl $2063, %edx - ja .L_2TAG_PACKET_6.0.2 - movq 4864(%esi), %xmm3 - shrl $16, %eax - movsd 4872(%esi), %xmm4 - mulsd (%esi,%ebx), %xmm2 - pinsrw $3, %eax, %xmm7 - mulsd %xmm1, %xmm1 - subsd 4800(%esi), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm3 - movsd %xmm1, %xmm5 - mulsd %xmm1, %xmm1 - addsd %xmm6, %xmm0 - cvtsi2sdl 12(%esp), %xmm6 - mulsd %xmm5, %xmm4 - mulsd %xmm3, %xmm1 - movq 3296(%esi), %xmm3 - mulsd %xmm2, %xmm3 - addsd 3288(%esi), %xmm3 - mulsd %xmm2, %xmm3 - mulsd 3264(%esi), %xmm6 - addsd 3280(%esi), %xmm3 - addsd 4976(%esi,%ebx), %xmm6 - mulsd %xmm2, %xmm3 - addsd %xmm4, %xmm1 - addsd %xmm6, %xmm3 - addsd %xmm1, %xmm0 - xorpd %xmm7, %xmm0 - mulsd 2064(%esi), %xmm3 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm3, %xmm3 - movd %xmm0, %edx - movd %xmm3, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_6.0.2: - addl $15344, %edx - cmpl $17392, %edx - mulsd (%esi,%ebx), %xmm2 - subsd 4800(%esi), %xmm2 - jae .L_2TAG_PACKET_7.0.2 - shrl $16, %eax - pinsrw $3, %eax, %xmm7 - addsd %xmm6, %xmm0 - cvtsi2sdl 12(%esp), %xmm6 - movq 3296(%esi), %xmm3 - mulsd %xmm2, %xmm3 - pextrw $3, %xmm0, %edx - addsd 3288(%esi), %xmm3 - xorpd %xmm7, %xmm0 - andl $32752, %edx - mulsd %xmm2, %xmm3 - mulsd 3264(%esi), %xmm6 - addsd 3280(%esi), %xmm3 - movl $1065353217, %eax - movl $8388608, %ecx - addsd 4976(%esi,%ebx), %xmm6 - mulsd %xmm2, %xmm3 - cmpl $14352, %edx - cmovb %ecx, %eax - movd %eax, %xmm1 - addsd %xmm6, %xmm3 - mulss %xmm1, %xmm1 - mulsd 2064(%esi), %xmm3 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm3, %xmm3 - movd %xmm0, %edx - movd %xmm3, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_7.0.2: - movss 4944(%esi), %xmm4 - movss 4948(%esi), %xmm1 - cvtsi2sdl 12(%esp), %xmm6 - shrl $16, %eax - andl $32768, %ecx - movq 3296(%esi), %xmm3 - mulsd %xmm2, %xmm3 - addsd 3288(%esi), %xmm3 - xorl %ecx, %eax - mulsd %xmm2, %xmm3 - xorps %xmm0, %xmm0 - mulsd 3264(%esi), %xmm6 - addsd 3280(%esi), %xmm3 - pinsrw $1, %eax, %xmm0 - addsd 4976(%esi,%ebx), %xmm6 - mulsd %xmm2, %xmm3 - orps %xmm0, %xmm4 - addsd %xmm6, %xmm3 - orps %xmm1, %xmm0 - mulsd 2064(%esi), %xmm3 - cvtsd2ss %xmm3, %xmm3 - addss %xmm4, %xmm0 - movd %xmm0, %edx - movd %xmm3, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_2.0.2: - movsd 32(%esp), %xmm5 - mulsd %xmm5, %xmm5 - movq 16(%esp), %xmm1 - movq 16(%esp), %xmm6 - movq 16(%esp), %xmm2 - subsd %xmm5, %xmm1 - subsd %xmm1, %xmm6 - subsd %xmm1, %xmm3 - subsd %xmm6, %xmm5 - addsd %xmm3, %xmm5 - xorl %ecx, %eax - movsd 4816(%esi), %xmm3 - xorpd %xmm4, %xmm4 - xorpd %xmm7, %xmm7 - sarl $31, %ecx - movd %ecx, %xmm6 - pshufd $0, %xmm6, %xmm6 - andpd 4848(%esi), %xmm6 - subsd 4800(%esi), %xmm2 - andpd %xmm0, %xmm3 - pextrw $3, %xmm0, %edx - movsd %xmm0, %xmm1 - addsd %xmm5, %xmm2 - subl $16288, %edx - cmpl $1119, %edx - ja .L_2TAG_PACKET_8.0.2 - movl $16464, %ecx - pinsrw $3, %ecx, %xmm4 - shrl $16, %eax - orpd 4832(%esi), %xmm3 - movsd %xmm4, %xmm7 - cmpsd $6, %xmm3, %xmm4 - movsd 4800(%esi), %xmm5 - minsd %xmm7, %xmm3 - andpd %xmm4, %xmm0 - mulsd %xmm3, %xmm1 - andpd %xmm4, %xmm5 - subsd %xmm3, %xmm0 - movq 3344(%esi), %xmm3 - addsd %xmm5, %xmm1 - divsd %xmm1, %xmm0 - mulsd %xmm2, %xmm3 - movl $176, %ecx - cmpl $176, %edx - cmova %ecx, %edx - addl $1, %edx - movsd 4880(%esi), %xmm4 - addsd 3336(%esi), %xmm3 - pinsrw $3, %eax, %xmm7 - addsd 3376(%esi,%edx,8), %xmm6 - mulsd %xmm2, %xmm3 - xorpd %xmm7, %xmm6 - addsd 3328(%esi), %xmm3 - xorpd %xmm0, %xmm7 - mulsd %xmm2, %xmm3 - mulsd %xmm0, %xmm0 - addsd 3320(%esi), %xmm3 - mulsd %xmm7, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm6, %xmm7 - addsd 3312(%esi), %xmm3 - mulsd %xmm4, %xmm0 - mulsd %xmm2, %xmm3 - addsd %xmm7, %xmm0 - cvtsd2ss %xmm3, %xmm3 - cvtpd2ps %xmm0, %xmm0 - movd %xmm3, %eax - movd %xmm0, %edx - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_8.0.2: - addl $944, %edx - cmpl $2063, %edx - ja .L_2TAG_PACKET_9.0.2 - movq 4864(%esi), %xmm3 - shrl $16, %eax - movsd 4872(%esi), %xmm4 - pinsrw $3, %eax, %xmm7 - mulsd %xmm1, %xmm1 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm3 - movsd %xmm1, %xmm5 - mulsd %xmm1, %xmm1 - addsd %xmm6, %xmm0 - movq 3344(%esi), %xmm6 - mulsd %xmm2, %xmm6 - addsd 3336(%esi), %xmm6 - mulsd %xmm5, %xmm4 - mulsd %xmm2, %xmm6 - addsd 3328(%esi), %xmm6 - mulsd %xmm3, %xmm1 - mulsd %xmm2, %xmm6 - addsd 3320(%esi), %xmm6 - addsd %xmm4, %xmm1 - mulsd %xmm2, %xmm6 - addsd %xmm1, %xmm0 - addsd 3312(%esi), %xmm6 - xorpd %xmm7, %xmm0 - mulsd %xmm2, %xmm6 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm6, %xmm6 - movd %xmm0, %edx - movd %xmm6, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_9.0.2: - addl $15344, %edx - cmpl $17392, %edx - jae .L_2TAG_PACKET_10.0.2 - movq 3344(%esi), %xmm3 - mulsd %xmm2, %xmm3 - shrl $16, %eax - addsd 3336(%esi), %xmm3 - pinsrw $3, %eax, %xmm7 - mulsd %xmm2, %xmm3 - addsd %xmm6, %xmm0 - addsd 3328(%esi), %xmm3 - pextrw $3, %xmm0, %edx - mulsd %xmm2, %xmm3 - xorpd %xmm7, %xmm0 - addsd 3320(%esi), %xmm3 - andl $32752, %edx - movl $1065353217, %eax - movl 8(%esp), %ecx - movl $8388608, %ecx - mulsd %xmm2, %xmm3 - cmpl $14352, %edx - cmovb %ecx, %eax - movd %eax, %xmm1 - addsd 3312(%esi), %xmm3 - mulss %xmm1, %xmm1 - mulsd %xmm2, %xmm3 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm3, %xmm3 - movd %xmm0, %edx - movd %xmm3, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_10.0.2: - movss 4944(%esi), %xmm4 - movq 3344(%esi), %xmm3 - mulsd %xmm2, %xmm3 - movss 4948(%esi), %xmm1 - addsd 3336(%esi), %xmm3 - shrl $16, %eax - mulsd %xmm2, %xmm3 - andl $32768, %ecx - addsd 3328(%esi), %xmm3 - xorl %ecx, %eax - mulsd %xmm2, %xmm3 - xorps %xmm0, %xmm0 - addsd 3320(%esi), %xmm3 - pinsrw $1, %eax, %xmm0 - mulsd %xmm2, %xmm3 - orps %xmm0, %xmm4 - addsd 3312(%esi), %xmm3 - orps %xmm1, %xmm0 - mulsd %xmm2, %xmm3 - addss %xmm4, %xmm0 - cvtsd2ss %xmm3, %xmm3 - movd %xmm0, %edx - movd %xmm3, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_0.0.2: - andl $-2147483648, %ecx -.L_2TAG_PACKET_1.0.2: - movl 4(%esp), %edx - andl $2147483647, %edx - je .L_2TAG_PACKET_11.0.2 - andl $2139095040, %edx - jne .L_2TAG_PACKET_11.0.2 - movss 4(%esp), %xmm0 - orps 4896(%esi), %xmm0 - cvtss2sd %xmm0, %xmm0 - movsd 4928(%esi), %xmm2 - andpd %xmm0, %xmm2 - orpd 4912(%esi), %xmm2 - subsd %xmm2, %xmm0 - movsd %xmm0, 40(%esp) -.L_2TAG_PACKET_11.0.2: - movl (%esp), %edx - andl $2147483647, %edx - je .L_2TAG_PACKET_12.0.2 - andl $2139095040, %edx - jne .L_2TAG_PACKET_12.0.2 - movss (%esp), %xmm1 - orps 4896(%esi), %xmm1 - cvtss2sd %xmm1, %xmm1 - movsd 4928(%esi), %xmm2 - andpd %xmm1, %xmm2 - orpd 4912(%esi), %xmm2 - subsd %xmm2, %xmm1 - movsd %xmm1, 32(%esp) -.L_2TAG_PACKET_12.0.2: - movsd 40(%esp), %xmm0 - movsd 32(%esp), %xmm1 - pextrw $3, %xmm0, %edx - andl $32752, %edx - subl $16, %edx - cmpl $32736, %edx - jae .L_2TAG_PACKET_13.0.2 - pextrw $3, %xmm1, %edx - andl $32752, %edx - subl $16, %edx - cmpl $32736, %edx - jae .L_2TAG_PACKET_14.0.2 - movq %xmm0, %xmm3 - divsd %xmm1, %xmm0 - movq 3232(%esi), %xmm2 - mulsd %xmm1, %xmm1 - mulsd %xmm3, %xmm3 - addsd %xmm3, %xmm1 - movq %xmm1, 16(%esp) - pand %xmm1, %xmm2 - pextrw $3, %xmm1, %edx - subsd 4800(%esi), %xmm1 - pand 3248(%esi), %xmm1 - cmpltsd 2048(%esi), %xmm1 - movmskpd %xmm1, %ebx - por 4800(%esi), %xmm2 - testl $1, %ebx - movl 8(%esp), %ebx - psllq $1, %xmm0 - psrlq $1, %xmm0 - jne .L_2TAG_PACKET_2.0.2 - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_13.0.2: - addl $16, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_15.0.2 - movsd %xmm0, %xmm2 - psllq $12, %xmm2 - xorpd %xmm3, %xmm3 - pcmpeqd %xmm3, %xmm2 - psrlq $16, %xmm2 - movd %xmm2, %edx - cmpl $-1, %edx - je .L_2TAG_PACKET_16.0.2 - movss 4(%esp), %xmm0 - movl (%esp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - mulss %xmm0, %xmm0 - jg .L_2TAG_PACKET_17.0.2 - je .L_2TAG_PACKET_18.0.2 - movd %xmm0, %edx - movd %xmm0, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_18.0.2: - movd %xmm0, %edx - movl $2139095040, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_17.0.2: - movss (%esp), %xmm1 - mulss %xmm0, %xmm0 - mulss %xmm1, %xmm1 - movd %xmm0, %edx - movd %xmm1, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_15.0.2: - pextrw $3, %xmm1, %edx - andl $32752, %edx - cmpl $32752, %edx - jne .L_2TAG_PACKET_19.0.2 - movsd %xmm1, %xmm2 - psllq $12, %xmm2 - xorpd %xmm3, %xmm3 - pcmpeqd %xmm3, %xmm2 - psrlq $16, %xmm2 - movd %xmm2, %edx - cmpl $-1, %edx - jne .L_2TAG_PACKET_20.0.2 -.L_2TAG_PACKET_19.0.2: - cmpl $0, %ecx - jne .L_2TAG_PACKET_21.0.2 - movl %eax, %edx - movl (%esp), %eax - cmpl $0, %eax - je .L_2TAG_PACKET_22.0.2 - cmpl $2139095040, %eax - je .L_2TAG_PACKET_23.0.2 - movl (%esp), %eax - movl %edx, 28(%esp) - andl $2147483647, %eax - movl %eax, 24(%esp) - jmp .L_2TAG_PACKET_24.0.2 -.L_2TAG_PACKET_21.0.2: - movss 4952(%esi), %xmm2 - movss 4956(%esi), %xmm3 - addss %xmm3, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl (%esp), %eax - cmpl $-2147483648, %eax - je .L_2TAG_PACKET_22.0.2 - cmpl $-8388608, %eax - je .L_2TAG_PACKET_23.0.2 - movl (%esp), %eax - movl %edx, 28(%esp) - andl $2147483647, %eax - movl %eax, 24(%esp) - jmp .L_2TAG_PACKET_24.0.2 -.L_2TAG_PACKET_22.0.2: - pxor %xmm1, %xmm1 - movss 3216(%esi), %xmm0 - divss %xmm1, %xmm0 - movl $-8388608, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_23.0.2: - movl $2139095040, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_16.0.2: - pextrw $3, %xmm1, %edx - andl $32752, %edx - cmpl $32752, %edx - je .L_2TAG_PACKET_25.0.2 - movss 4944(%esi), %xmm2 - movss 4948(%esi), %xmm3 - addss %xmm3, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl $2139095040, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_25.0.2: - movsd %xmm1, %xmm2 - psllq $12, %xmm2 - xorpd %xmm3, %xmm3 - pcmpeqd %xmm3, %xmm2 - psrlq $16, %xmm2 - movd %xmm2, %edx - cmpl $-1, %edx - jne .L_2TAG_PACKET_26.0.2 - cmpl $0, %ecx - je .L_2TAG_PACKET_27.0.2 - movss 4944(%esi), %xmm2 - movss 4948(%esi), %xmm3 - movss 4960(%esi), %xmm4 - movss 4964(%esi), %xmm5 - addss %xmm3, %xmm2 - addss %xmm5, %xmm4 - addss %xmm4, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl $2139095040, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_27.0.2: - movss 4960(%esi), %xmm4 - movss 4964(%esi), %xmm5 - addss %xmm5, %xmm4 - movd %xmm4, %edx - orl %eax, %edx - movl $2139095040, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_14.0.2: - addl $16, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_28.0.2 - movsd %xmm1, %xmm2 - psllq $12, %xmm2 - xorps %xmm3, %xmm3 - pcmpeqd %xmm3, %xmm2 - psrlq $16, %xmm2 - movd %xmm2, %edx - cmpl $-1, %edx - jne .L_2TAG_PACKET_20.0.2 - cmpl $0, %ecx - jne .L_2TAG_PACKET_29.0.2 - movl %eax, %edx - movl $2139095040, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_29.0.2: - movss 4952(%esi), %xmm2 - movss 4956(%esi), %xmm3 - addss %xmm3, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl $2139095040, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_28.0.2: - movss 4944(%esi), %xmm2 - movss 4948(%esi), %xmm3 - addss %xmm3, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl 4(%esp), %eax - movl %edx, 28(%esp) - andl $2147483647, %eax - movl %eax, 24(%esp) - jmp .L_2TAG_PACKET_24.0.2 -.L_2TAG_PACKET_20.0.2: - addsd %xmm1, %xmm1 - cvtpd2ps %xmm1, %xmm0 - movd %xmm0, %edx - movl %edx, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_26.0.2: - addsd %xmm1, %xmm1 - cvtpd2ps %xmm1, %xmm0 - movd %xmm0, %edx - movl $2139095040, %eax - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_24.0.2: - movss 24(%esp), %xmm0 - movsd 3168(%esi), %xmm1 - movsd 3184(%esi), %xmm3 - pextrw $1, %xmm0, %eax - movaps %xmm0, %xmm4 - psllq $29, %xmm0 - andpd %xmm0, %xmm1 - orpd %xmm3, %xmm1 - movsd 2080(%esi), %xmm5 - movsd 2088(%esi), %xmm6 - movsd 2096(%esi), %xmm2 - movl %eax, %edx - movl $32639, %ecx - subl %edx, %ecx - subl $128, %edx - orl %ecx, %edx - cmpl $32768, %edx - jae .L_2TAG_PACKET_30.0.2 - movl $16191, %ecx -.L_2TAG_PACKET_31.0.2: - movd %ecx, %xmm0 - movsd 2640(%esi), %xmm3 - andl $127, %eax - addl $1, %eax - andl $254, %eax - addl %eax, %eax - addl %eax, %eax - movsd 2640(%esi,%eax), %xmm7 - psrlq $16, %xmm4 - psubd %xmm0, %xmm4 - psrad $7, %xmm4 - cvtdq2pd %xmm4, %xmm4 - movsd 2112(%esi,%eax), %xmm0 - mulsd %xmm7, %xmm1 - subsd %xmm3, %xmm1 - movsd %xmm1, %xmm7 - mulsd %xmm1, %xmm5 - movsd %xmm1, %xmm3 - mulsd %xmm1, %xmm1 - addsd %xmm6, %xmm5 - mulsd 3264(%esi), %xmm4 - mulsd %xmm1, %xmm7 - mulsd %xmm1, %xmm2 - addsd %xmm3, %xmm2 - mulsd %xmm5, %xmm7 - addsd %xmm4, %xmm0 - addsd %xmm7, %xmm2 - addsd %xmm2, %xmm0 - cvtpd2ps %xmm0, %xmm0 - movd %xmm0, %eax - movl 28(%esp), %edx - movl 8(%esp), %ebx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_30.0.2: - movl 24(%esp), %edx - mulss 3200(%esi), %xmm4 - movsd 3168(%esi), %xmm1 - pextrw $1, %xmm4, %eax - cvtps2pd %xmm4, %xmm0 - andpd %xmm0, %xmm1 - orpd %xmm3, %xmm1 - movl $24383, %ecx - jmp .L_2TAG_PACKET_31.0.2 -.L_2TAG_PACKET_5.0.2: - movl 80(%esp), %esi - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type clogf,@function - .size clogf,.-clogf - .data -# -- End clogf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .long 3951369912 - .long 1067366481 - .long 3951369912 - .long 3214850129 - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .long 0 - .long 3218079744 - .long 1431655765 - .long 1070945621 - .long 0 - .long 3219128320 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2969299638 - .long 1066385576 - .long 242759278 - .long 1067418267 - .long 4130528649 - .long 1067938904 - .long 3222363743 - .long 1068436016 - .long 2518406343 - .long 1068712407 - .long 2330290349 - .long 1068953810 - .long 977983493 - .long 1069191789 - .long 1848308976 - .long 1069426439 - .long 2094042057 - .long 1069602686 - .long 4162844547 - .long 1069716818 - .long 1825274911 - .long 1069829419 - .long 1890030541 - .long 1069940528 - .long 34658761 - .long 1070050185 - .long 2633258952 - .long 1070158426 - .long 1317059912 - .long 1070265289 - .long 3348798148 - .long 1070370807 - .long 1848308976 - .long 1070475015 - .long 1834892534 - .long 1070577944 - .long 3799224489 - .long 1070637860 - .long 2880153273 - .long 1070688092 - .long 4224678190 - .long 1070737729 - .long 3135315492 - .long 1070786786 - .long 1432962655 - .long 1070835276 - .long 3256639515 - .long 1070883211 - .long 2267936667 - .long 1070930605 - .long 3210218142 - .long 1070977469 - .long 513480033 - .long 1071023816 - .long 4139503392 - .long 1071069655 - .long 998420681 - .long 1071115000 - .long 2260812359 - .long 1071159859 - .long 471930696 - .long 1071204244 - .long 288677044 - .long 3218237794 - .long 1666870396 - .long 3218194329 - .long 2183652263 - .long 3218151310 - .long 1615681869 - .long 3218108728 - .long 1823715893 - .long 3218053404 - .long 4293333700 - .long 3217969934 - .long 4066729029 - .long 3217887287 - .long 943445964 - .long 3217805447 - .long 1015733272 - .long 3217724397 - .long 3707174790 - .long 3217644122 - .long 1699848676 - .long 3217564609 - .long 2339728692 - .long 3217485842 - .long 1800683248 - .long 3217407808 - .long 2201203741 - .long 3217330493 - .long 2954203727 - .long 3217253884 - .long 709476838 - .long 3217177969 - .long 2183652973 - .long 3217102734 - .long 970708496 - .long 3217025169 - .long 1669614391 - .long 3216877351 - .long 2376949106 - .long 3216730824 - .long 1566133827 - .long 3216585566 - .long 183157569 - .long 3216441555 - .long 1562411141 - .long 3216298769 - .long 2756121236 - .long 3216157188 - .long 3047046473 - .long 3216016792 - .long 3453858674 - .long 3215772531 - .long 346008798 - .long 3215496362 - .long 3559775130 - .long 3215222446 - .long 2313636156 - .long 3214950749 - .long 684243850 - .long 3214428453 - .long 1486053291 - .long 3213893718 - .long 1971906393 - .long 3212840981 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 528611360 - .long 1072660984 - .long 4034666248 - .long 1072629697 - .long 2884679527 - .long 1072599345 - .long 505290270 - .long 1072569886 - .long 1991868891 - .long 1072541280 - .long 490853405 - .long 1072513492 - .long 2298714891 - .long 1072486486 - .long 477218588 - .long 1072460231 - .long 58835168 - .long 1072434695 - .long 348240592 - .long 1072409849 - .long 3035110223 - .long 1072385665 - .long 3164712744 - .long 1072362118 - .long 1617585086 - .long 1072339183 - .long 440509466 - .long 1072316836 - .long 2500867033 - .long 1072295054 - .long 2576980378 - .long 1072273817 - .long 4241943008 - .long 1072253104 - .long 2409371898 - .long 1072232897 - .long 258732970 - .long 1072213177 - .long 409044504 - .long 1072193926 - .long 404232216 - .long 1072175128 - .long 1098712564 - .long 1072156767 - .long 2172167368 - .long 1072138828 - .long 1952257862 - .long 1072121297 - .long 1544257904 - .long 1072104160 - .long 381774871 - .long 1072087404 - .long 377579543 - .long 1072071016 - .long 1493901668 - .long 1072054984 - .long 1616385542 - .long 1072039297 - .long 731058263 - .long 1072023944 - .long 813783277 - .long 1072008914 - .long 1431655765 - .long 1071994197 - .long 3940743189 - .long 1071979783 - .long 2804876601 - .long 1071965664 - .long 2689777499 - .long 1071951830 - .long 1202590843 - .long 1071938273 - .long 1700977147 - .long 1071924984 - .long 336860180 - .long 1071911956 - .long 3169102082 - .long 1071899180 - .long 330382100 - .long 1071886651 - .long 327235604 - .long 1071874360 - .long 4213930177 - .long 1071862300 - .long 1244336319 - .long 1071850467 - .long 3181457256 - .long 1071838852 - .long 1300311200 - .long 1071827451 - .long 702812830 - .long 1071816257 - .long 3095471925 - .long 1071805264 - .long 2454267026 - .long 1071794468 - .long 2166487928 - .long 1071783863 - .long 2109808496 - .long 1071773444 - .long 2913108253 - .long 1071763206 - .long 1629125526 - .long 1071753145 - .long 293672978 - .long 1071743256 - .long 1601513229 - .long 1071733534 - .long 288737297 - .long 1071723976 - .long 286331153 - .long 1071714577 - .long 1810275472 - .long 1071705333 - .long 1337776699 - .long 1071696241 - .long 174592167 - .long 1071687297 - .long 138547332 - .long 1071678497 - .long 3539053052 - .long 1071669837 - .long 272696336 - .long 1071661316 - .long 2164392968 - .long 1071652928 - .long 0 - .long 1071644672 - .long 0 - .long 0 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 1602224128 - .long 1602224128 - .long 0 - .long 0 - .long 1065353216 - .long 1065353216 - .long 0 - .long 0 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4277811695 - .long 1072049730 - .long 4277811695 - .long 1072049730 - .long 0 - .long 1072693248 - .long 3879088107 - .long 3219128321 - .long 1754324240 - .long 1070945626 - .long 0 - .long 0 - .long 12982 - .long 1071644672 - .long 3503368358 - .long 3218079743 - .long 300625100 - .long 1069897045 - .long 3513684914 - .long 3217031970 - .long 1735899863 - .long 1069129695 - .long 0 - .long 0 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3819695742 - .long 1067482761 - .long 2998791009 - .long 1067548225 - .long 3339424991 - .long 1067613680 - .long 2710002256 - .long 1067679126 - .long 3275701428 - .long 1067744562 - .long 2908636881 - .long 1067809988 - .long 3777889398 - .long 1067875403 - .long 3759667419 - .long 1067940807 - .long 732369940 - .long 1068006200 - .long 1166616461 - .long 1068071580 - .long 2945472892 - .long 1068136947 - .long 3954480976 - .long 1068202301 - .long 2081752829 - .long 1068267642 - .long 3807999788 - .long 1068332968 - .long 2731789884 - .long 1068398280 - .long 1044477961 - .long 1068463577 - .long 1486930287 - .long 1068530218 - .long 2293016881 - .long 1068595466 - .long 201518157 - .long 1068660680 - .long 4054234584 - .long 1068725856 - .long 1246477213 - .long 1068790995 - .long 678186699 - .long 1068856093 - .long 2690594995 - .long 1068921148 - .long 3362611517 - .long 1068986159 - .long 3102162111 - .long 1069051124 - .long 2352611067 - .long 1069116041 - .long 1594134794 - .long 1069180908 - .long 1345079306 - .long 1069245723 - .long 2163300970 - .long 1069310484 - .long 352522716 - .long 1069375190 - .long 848541647 - .long 1069439838 - .long 40647312 - .long 1069504427 - .long 2216766270 - .long 1069574357 - .long 1090914384 - .long 1069638757 - .long 387601244 - .long 1069703022 - .long 3991640484 - .long 1069767144 - .long 3322489502 - .long 1069831118 - .long 3121698570 - .long 1069894936 - .long 4289964660 - .long 1069958591 - .long 3903312386 - .long 1070022077 - .long 3818449864 - .long 1070085387 - .long 2097480306 - .long 1070148515 - .long 1611694502 - .long 1070211454 - .long 1464694796 - .long 1070274198 - .long 1299612775 - .long 1070336741 - .long 1310544789 - .long 1070399077 - .long 2253168030 - .long 1070461200 - .long 1159567373 - .long 1070523105 - .long 1359373750 - .long 1070605818 - .long 908341706 - .long 1070667034 - .long 1743027350 - .long 1070727765 - .long 2055355646 - .long 1070787992 - .long 690426164 - .long 1070847697 - .long 1483247847 - .long 1070906862 - .long 392040270 - .long 1070965472 - .long 2673846014 - .long 1071023511 - .long 1384215810 - .long 1071080967 - .long 3101660631 - .long 1071137826 - .long 2094057058 - .long 1071194078 - .long 1712750594 - .long 1071249712 - .long 1411515787 - .long 1071304719 - .long 931538085 - .long 1071359091 - .long 179139065 - .long 1071412821 - .long 3387721259 - .long 1071465902 - .long 2132236852 - .long 1071544299 - .long 1942070284 - .long 1071645596 - .long 1532707802 - .long 1071695380 - .long 2294184979 - .long 1071743834 - .long 3805060714 - .long 1071790961 - .long 2215037898 - .long 1071836770 - .long 483661594 - .long 1071881273 - .long 1534679894 - .long 1071924486 - .long 1538714628 - .long 1071966430 - .long 527642555 - .long 1072007128 - .long 291339150 - .long 1072046605 - .long 2450210201 - .long 1072084888 - .long 2411367951 - .long 1072122007 - .long 681549971 - .long 1072157992 - .long 1466745541 - .long 1072192873 - .long 2845622366 - .long 1072226682 - .long 2838871438 - .long 1072275456 - .long 4200275274 - .long 1072337034 - .long 3034733530 - .long 1072394897 - .long 3207412993 - .long 1072449290 - .long 624461478 - .long 1072500450 - .long 767665908 - .long 1072548600 - .long 1110773639 - .long 1072593952 - .long 1940828530 - .long 1072636704 - .long 1911329388 - .long 1072677041 - .long 1764715788 - .long 1072704191 - .long 3332979233 - .long 1072722195 - .long 1321870254 - .long 1072739231 - .long 3657429030 - .long 1072755365 - .long 4197624557 - .long 1072770661 - .long 1512059493 - .long 1072785177 - .long 453379037 - .long 1072798965 - .long 1942345162 - .long 1072818388 - .long 4210176273 - .long 1072842164 - .long 4185644010 - .long 1072863795 - .long 679688788 - .long 1072883543 - .long 29432865 - .long 1072901630 - .long 4070721092 - .long 1072918247 - .long 2252468843 - .long 1072933561 - .long 2929724825 - .long 1072947712 - .long 1377513368 - .long 1072960824 - .long 1031632908 - .long 1072973003 - .long 2516508130 - .long 1072984342 - .long 3792452178 - .long 1072994923 - .long 3147791459 - .long 1073004818 - .long 999189752 - .long 1073014090 - .long 711011011 - .long 1073022794 - .long 15640363 - .long 1073030980 - .long 1218463589 - .long 1073042382 - .long 2538470555 - .long 1073056144 - .long 1229720947 - .long 1073068489 - .long 3115427016 - .long 1073079621 - .long 4030612557 - .long 1073089709 - .long 2728521257 - .long 1073098892 - .long 1118696283 - .long 1073107285 - .long 2682711255 - .long 1073114984 - .long 2073898081 - .long 1073122072 - .long 1403700297 - .long 1073128618 - .long 2502685617 - .long 1073134681 - .long 1531926851 - .long 1073140313 - .long 3572814411 - .long 1073145557 - .long 1695536111 - .long 1073150453 - .long 2363057203 - .long 1073155033 - .long 2873365682 - .long 1073159327 - .long 1053384691 - .long 1073165288 - .long 3270542712 - .long 1073172451 - .long 1353631484 - .long 1073178850 - .long 3511218460 - .long 1073184599 - .long 4121259284 - .long 1073189793 - .long 1193862106 - .long 1073194509 - .long 3861949790 - .long 1073198808 - .long 1486904578 - .long 1073202745 - .long 2879153715 - .long 1073206362 - .long 385353253 - .long 1073209698 - .long 1125865839 - .long 1073212783 - .long 1221361475 - .long 1073215645 - .long 2077323573 - .long 1073218307 - .long 215611373 - .long 1073220790 - .long 2347419265 - .long 1073223110 - .long 1379112765 - .long 1073225284 - .long 3891198463 - .long 1073228298 - .long 3395914051 - .long 1073231917 - .long 2799919478 - .long 1073235146 - .long 1138673476 - .long 1073238045 - .long 3408855940 - .long 1073240661 - .long 2044858738 - .long 1073243035 - .long 2578795176 - .long 1073245198 - .long 4196285314 - .long 1073247177 - .long 224877747 - .long 1073248996 - .long 3271386490 - .long 1073250671 - .long 813635989 - .long 1073252221 - .long 369829519 - .long 1073253658 - .long 1187679052 - .long 1073254994 - .long 4232586098 - .long 1073256239 - .long 426690558 - .long 1073257404 - .long 1624065902 - .long 1073258494 - .long 84029729 - .long 1073260006 - .long 700437654 - .long 1073261820 - .long 1437260555 - .long 1073263438 - .long 2813372195 - .long 1073264890 - .long 1607849324 - .long 1073266201 - .long 1011572952 - .long 1073267390 - .long 2039290225 - .long 1073268473 - .long 2435855138 - .long 1073269464 - .long 3389310384 - .long 1073270374 - .long 2790682322 - .long 1073271213 - .long 960266323 - .long 1073271989 - .long 1766929455 - .long 1073272708 - .long 627058932 - .long 1073273377 - .long 2388650377 - .long 1073274000 - .long 422252385 - .long 1073274583 - .long 2848853896 - .long 1073275128 - .long 1413754136 - .long 1073291771 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 2147418112 - .long 0 - .long 2147418112 - .long 0 - .long 32768 - .long 0 - .long 32768 - .long 1413754136 - .long 3221823995 - .long 0 - .long 0 - .long 2576980378 - .long 1070176665 - .long 1431655765 - .long 3218429269 - .long 1431655765 - .long 3218429269 - .long 1431655765 - .long 3218429269 - .long 8388608 - .long 0 - .long 0 - .long 0 - .long 0 - .long 940572672 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 1070141402 - .long 866263400 - .long 1078530010 - .long 874652008 - .long 1061752794 - .long 857874792 - .long 0 - .long 0 - .long 1440057502 - .long 1063257089 - .long 341338964 - .long 1064833554 - .long 4184355568 - .long 1065621801 - .long 2227658503 - .long 1066152307 - .long 449262470 - .long 1066510009 - .long 1570422842 - .long 1066777242 - .long 121841140 - .long 1067045544 - .long 630691842 - .long 1067281191 - .long 2711485097 - .long 1067500943 - .long 2026622491 - .long 1067619660 - .long 766078039 - .long 1067755853 - .long 4074027864 - .long 1067875476 - .long 3056660584 - .long 1067995528 - .long 3195252556 - .long 1068133258 - .long 116861598 - .long 1068254238 - .long 325086471 - .long 1068375655 - .long 296456961 - .long 1068497513 - .long 2623383041 - .long 1068559379 - .long 1681725707 - .long 1068620754 - .long 2231263004 - .long 1068682354 - .long 2815553124 - .long 1068744181 - .long 2057310944 - .long 1068806237 - .long 2095798018 - .long 1068859611 - .long 2302040698 - .long 1068922096 - .long 745232013 - .long 1068984815 - .long 659581512 - .long 1069047769 - .long 1566132617 - .long 1069101918 - .long 550036981 - .long 1069165314 - .long 2887419564 - .long 1069219844 - .long 1990183441 - .long 1069283688 - .long 3220050856 - .long 1069338605 - .long 1669613218 - .long 1069393703 - .long 2145455994 - .long 1069458213 - .long 4275830246 - .long 1069513705 - .long 1392453108 - .long 1069558451 - .long 1469915213 - .long 1069586382 - .long 2183652476 - .long 1069619086 - .long 2109656884 - .long 1069647220 - .long 636640577 - .long 1069675449 - .long 510517079 - .long 1069703773 - .long 210141498 - .long 1069732193 - .long 2537624622 - .long 1069760709 - .long 1733817001 - .long 1069789323 - .long 137854980 - .long 1069813243 - .long 3905576828 - .long 1069842036 - .long 4131810788 - .long 1069870929 - .long 3760956694 - .long 1069899922 - .long 1473082581 - .long 1069929016 - .long 926113142 - .long 1069953338 - .long 3669742467 - .long 1069982617 - .long 3711755290 - .long 1070007095 - .long 311386407 - .long 1070036564 - .long 705364525 - .long 1070066136 - .long 1973375279 - .long 1070090859 - .long 3589645072 - .long 1070115655 - .long 2425772059 - .long 1070145508 - .long 1074899574 - .long 1070170467 - .long 118003300 - .long 1070200516 - .long 691310403 - .long 1070225639 - .long 3273036717 - .long 1070250837 - .long 1226436560 - .long 1070276112 - .long 2481153995 - .long 1070306542 - .long 3227997535 - .long 1070331985 - .long 1421812646 - .long 1070357506 - .long 3386588242 - .long 1070383104 - .long 2580043380 - .long 1070408781 - .long 1068692560 - .long 1070434537 - .long 938143489 - .long 1070460372 - .long 4293333010 - .long 1070486286 - .long 373864817 - .long 1070512282 - .long 4208958430 - .long 1070538357 - .long 783121462 - .long 1070564515 - .long 870975437 - .long 1070590754 - .long 3338886172 - .long 1070606585 - .long 3772343130 - .long 1070619787 - .long 2408245143 - .long 1070630379 - .long 3811383569 - .long 1070643656 - .long 1622638721 - .long 1070656976 - .long 1290798655 - .long 1070670338 - .long 2457529556 - .long 1070681058 - .long 2398194399 - .long 1070694497 - .long 3190801979 - .long 1070707979 - .long 3352241197 - .long 1070718796 - .long 1829681364 - .long 1070732357 - .long 2568927817 - .long 1070743237 - .long 2676427515 - .long 1070756877 - .long 2882402820 - .long 1070767821 - .long 44944622 - .long 1070781542 - .long 2957945300 - .long 1070792550 - .long 1261787704 - .long 1070806352 - .long 1589923677 - .long 1070817426 - .long 3274931829 - .long 1070828529 - .long 1999843716 - .long 1070842450 - .long 1673619518 - .long 1070853620 - .long 601221319 - .long 1070864820 - .long 3763576649 - .long 1070876049 - .long 1974923437 - .long 1070890129 - .long 1096100617 - .long 1070901427 - .long 2424897952 - .long 1070912755 - .long 2376202600 - .long 1070924114 - .long 1665651958 - .long 1070935504 - .long 1014729354 - .long 1070946925 - .long 722545241 - .long 1070961245 - .long 1800682930 - .long 1070972736 - .long 1029453230 - .long 1070984259 - .long 3450874911 - .long 1070995813 - .long 1228255906 - .long 1071007400 - .long 3711032981 - .long 1071019018 - .long 3075102917 - .long 1071030669 - .long 92696812 - .long 1071042353 - .long 3897749690 - .long 1071051136 - .long 1907922160 - .long 1071062877 - .long 4023807324 - .long 1071074650 - .long 2452345726 - .long 1071086457 - .long 2292128226 - .long 1071098297 - .long 58635942 - .long 1071110171 - .long 864186929 - .long 1071122078 - .long 3555691467 - .long 1071131030 - .long 2003684347 - .long 1071142997 - .long 1479703759 - .long 1071154998 - .long 2537208015 - .long 1071164021 - .long 3699909861 - .long 1071176082 - .long 3934098706 - .long 1071188178 - .long 3885764182 - .long 1071197273 - .long 1357790931 - .long 1071209431 - .long 295956059 - .long 1071221624 - .long 4080877676 - .long 1071230791 - .long 202970280 - .long 1071243047 - .long 3977575845 - .long 1071252261 - .long 35977849 - .long 1071264580 - .long 1585496963 - .long 1071273842 - .long 375247257 - .long 1071286224 - .long 1812199574 - .long 1071295534 - .long 1876912769 - .long 1071307980 - .long 1051846544 - .long 1071317339 - .long 979589448 - .long 1071329850 - .long 71706889 - .long 1071339258 - .long 2790898835 - .long 1071351834 - .long 4013797733 - .long 1071361291 - .long 2541231151 - .long 1071370770 - .long 921733145 - .long 1071383442 - .long 508375805 - .long 1071392971 - .long 3091669954 - .long 1071402521 - .long 3343209673 - .long 1071415289 - .long 1693047557 - .long 1071424891 - .long 173861808 - .long 1071434515 - .long 3515822703 - .long 1071444160 - .long 1974837761 - .long 1071457056 - .long 1189018219 - .long 1071466754 - .long 2441946573 - .long 1071476474 - .long 1887102255 - .long 1071486217 - .long 4271031636 - .long 1071495982 - .long 876995759 - .long 1071509039 - .long 438773454 - .long 1071518858 - .long 172621632 - .long 1071528700 - .long 544035182 - .long 1071538565 - .long 2021801298 - .long 1071548453 - .long 783063308 - .long 1071558365 - .long 1598254051 - .long 1071568300 - .long 651258553 - .long 1071578259 - .long 2719315456 - .long 1071588241 - .long 3993180461 - .long 1071598247 - .long 667093936 - .long 1071608278 - .long 1823716217 - .long 1071618332 - .long 3664357648 - .long 1071628410 - .long 2393914686 - .long 1071638513 - .long 1405419566 - .long 1071646656 - .long 563652001 - .long 1071651732 - .long 1074554091 - .long 1071656820 - .long 3195405229 - .long 1071661920 - .long 2890399284 - .long 1071667033 - .long 420597586 - .long 1071672159 - .long 87278952 - .long 1071675583 - .long 1753119502 - .long 1071680729 - .long 1959759897 - .long 1071685888 - .long 975389815 - .long 1071691060 - .long 3365155278 - .long 1071696244 - .long 811309190 - .long 1071701442 - .long 1269811480 - .long 1071704914 - .long 1108583542 - .long 1071710133 - .long 1034517919 - .long 1071715365 - .long 1327340287 - .long 1071720610 - .long 1388251237 - .long 1071724114 - .long 1488234797 - .long 1071729381 - .long 2711385691 - .long 1071734661 - .long 952179194 - .long 1071738189 - .long 3255685427 - .long 1071743491 - .long 3159039803 - .long 1071748807 - .long 951558972 - .long 1071752359 - .long 3234424125 - .long 1071757697 - .long 3904573547 - .long 1071763049 - .long 2648729924 - .long 1071766625 - .long 2729250212 - .long 1071772000 - .long 2000712574 - .long 1071777389 - .long 3125257108 - .long 1071780989 - .long 3160324803 - .long 1071786401 - .long 2216316974 - .long 1071790017 - .long 3875016090 - .long 1071795452 - .long 1439520610 - .long 1071799084 - .long 1298103361 - .long 1071804543 - .long 2217517956 - .long 1071810016 - .long 1191753587 - .long 1071813673 - .long 1728773900 - .long 1071819170 - .long 747445441 - .long 1071822843 - .long 1670772213 - .long 1071826522 - .long 1471209283 - .long 1071832053 - .long 3287905877 - .long 1071835748 - .long 594038131 - .long 1071841304 - .long 3920147917 - .long 1071845015 - .long 3957142762 - .long 1071850595 - .long 826988438 - .long 1071854324 - .long 242509008 - .long 1071859929 - .long 4173610350 - .long 1071863673 - .long 2518313625 - .long 1071867425 - .long 2671523434 - .long 1071873065 - .long 387544807 - .long 1071876834 - .long 1470497767 - .long 1071880609 - .long 4269259217 - .long 1071886284 - .long 1345663925 - .long 1071890077 - .long 2159323299 - .long 1071893876 - .long 957937516 - .long 1071899588 - .long 2994656967 - .long 1071903404 - .long 556124819 - .long 1071907228 - .long 1631098658 - .long 1071912976 - .long 1368257861 - .long 1071916817 - .long 1309849279 - .long 1071920665 - .long 1567156841 - .long 1071924520 - .long 1179420986 - .long 1071930316 - .long 569448444 - .long 1071934189 - .long 669557459 - .long 1071938069 - .long 1593834700 - .long 1071941956 - .long 3166083125 - .long 1071947800 - .long 211641815 - .long 1071951706 - .long 2780675719 - .long 1071955618 - .long 2400234567 - .long 1071959538 - .long 3482927192 - .long 1071963465 - .long 1852089988 - .long 1071967400 - .long 1020849000 - .long 1071973316 - .long 1718090839 - .long 1071977269 - .long 121152472 - .long 1071981230 - .long 646346839 - .long 1071985198 - .long 3415709705 - .long 1071989173 - .long 4257004898 - .long 1071993156 - .long 3293664199 - .long 1071997147 - .long 649825382 - .long 1072001146 - .long 248887552 - .long 1072007158 - .long 2541522737 - .long 1072011175 - .long 3593780107 - .long 1072015200 - .long 3533041935 - .long 1072019233 - .long 2487426809 - .long 1072023274 - .long 585795318 - .long 1072027323 - .long 2252723088 - .long 1072031379 - .long 3323604690 - .long 1072035443 - .long 3929561382 - .long 1072039515 - .long 4202479723 - .long 1072043595 - .long 4275017539 - .long 1072047683 - .type static_const_table,@object - .size static_const_table,7024 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clogl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clogl.S deleted file mode 100644 index 995d8729e9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/clogl.S +++ /dev/null @@ -1,751 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clogl.c" - .text -..TXTST0: -# -- Begin clogl - .text - .align 16,0x90 - .globl clogl -clogl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - movl %edx, 124(%esp) - fstpt 100(%esp) - fldt 100(%esp) - fstpt 112(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.78 -..B1.4: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.5: - fldcw 12(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 20(%ebp), %ecx - andl $32767, %ecx - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $32767, %ecx - jge ..B1.47 -..B1.8: - cmpl $32767, %edx - jge ..B1.89 -..B1.9: - testl %ecx, %ecx - jne ..B1.15 -..B1.10: - cmpl $0, 16(%ebp) - jne ..B1.15 -..B1.11: - cmpl $0, 12(%ebp) - jne ..B1.15 -..B1.12: - testl %edx, %edx - jne ..B1.15 -..B1.13: - cmpl $0, 28(%ebp) - jne ..B1.15 -..B1.14: - cmpl $0, 24(%ebp) - je ..B1.46 -..B1.15: - fldt 12(%ebp) - fld %st(0) - fabs - fstpt (%esp) - fldt (%esp) - fldt 24(%ebp) - fld %st(0) - fabs - fstpt 16(%esp) - fldt 16(%esp) - movzwl 8(%esp), %ecx - movzwl 24(%esp), %edx - andl $32767, %ecx - andl $32767, %edx - cmpl %edx, %ecx - jl ..B1.20 -..B1.16: - jne ..B1.21 -..B1.17: - movl 4(%esp), %edx - movl 20(%esp), %eax - cmpl %eax, %edx - jb ..B1.20 -..B1.18: - jne ..B1.21 -..B1.19: - movl (%esp), %edx - cmpl 16(%esp), %edx - jae ..B1.21 -..B1.20: - fstpt (%esp) - fldt (%esp) - movzwl 8(%esp), %ecx - fxch %st(2) - fstpt 16(%esp) - fldt 16(%esp) - andl $32767, %ecx -..B1.21: - cmpl $16382, %ecx - jg ..B1.26 -..B1.22: - jne ..B1.43 -..B1.23: - movl 4(%esp), %edx - cmpl 16+_CONSTANTS@GOTOFF(%ebx), %edx - ja ..B1.26 -..B1.24: - jne ..B1.43 -..B1.25: - movl 12+_CONSTANTS@GOTOFF(%ebx), %edx - cmpl (%esp), %edx - ja ..B1.43 -..B1.26: - cmpl $16383, %ecx - jl ..B1.31 -..B1.27: - jne ..B1.43 -..B1.28: - movl 4(%esp), %edx - cmpl 28+_CONSTANTS@GOTOFF(%ebx), %edx - jb ..B1.31 -..B1.29: - jne ..B1.43 -..B1.30: - movl (%esp), %edx - cmpl 24+_CONSTANTS@GOTOFF(%ebx), %edx - ja ..B1.43 -..B1.31: - movzwl 24(%esp), %edx - andl $32767, %edx - cmpl $8256, %edx - jg ..B1.36 -..B1.32: - jne ..B1.37 -..B1.33: - movl 20(%esp), %eax - cmpl 64+_CONSTANTS@GOTOFF(%ebx), %eax - ja ..B1.36 -..B1.34: - jne ..B1.37 -..B1.35: - movl 16(%esp), %eax - cmpl 60+_CONSTANTS@GOTOFF(%ebx), %eax - jbe ..B1.37 -..B1.36: - fldt _CONSTANTS@GOTOFF(%ebx) - fld %st(3) - fmul %st(4), %st - fld %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - fsubr %st, %st(1) - fxch %st(1) - fabs - fxch %st(2) - fcomp %st(2) - fnstsw %ax - sahf - fxch %st(1) - ja ..B1.38 - jmp ..B1.90 -..B1.37: - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - fld %st(3) - fmul %st(4), %st - fsub %st(1), %st - fabs - fldt _CONSTANTS@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.90 -..B1.38: - cmpl $16183, %edx - jl ..B1.40 -..B1.39: - fstp %st(0) - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fld %st(4) - fxch %st(4) - fstpt (%esp) - fxch %st(5) - fstpt 16(%esp) - fld %st(3) - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - fsub %st, %st(4) - fsubp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fld %st(3) - fxch %st(5) - fsubr %st, %st(6) - fxch %st(2) - fmul %st(4), %st - fsub %st, %st(5) - fsubp %st, %st(5) - fld %st(4) - fmul %st(5), %st - fxch %st(4) - fsub %st(5), %st - fxch %st(5) - fmul %st(7), %st - fmul %st(5), %st - fstpt 56(%esp) - fldt 56(%esp) - fxch %st(5) - fmul %st(0), %st - fstpt 72(%esp) - fld %st(0) - fadd %st(4), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(6) - fmulp %st, %st(1) - fmul %st(4), %st - fxch %st(1) - fsubrp %st, %st(5) - fld %st(4) - fadd %st(2), %st - fld %st(0) - fsub %st(6), %st - fsubr %st, %st(3) - fld %st(1) - fsubp %st, %st(1) - fsubrp %st, %st(6) - fxch %st(5) - faddp %st, %st(2) - fld %st(4) - fadd %st(1), %st - fld %st(0) - faddp %st, %st(4) - fld %st(3) - fxch %st(5) - fmul %st(0), %st - fstpt 40(%esp) - fldt 40(%esp) - faddp %st, %st(5) - fxch %st(4) - fstpt 88(%esp) - fldt 88(%esp) - fldt 72(%esp) - faddp %st, %st(1) - fldt 12+_Q1@GOTOFF(%ebx) - fmul %st(1), %st - fldt _Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fld %st(1) - fmul %st(2), %st - fmulp %st, %st(1) - fld %st(5) - fsub %st(7), %st - fsubr %st, %st(3) - fsubr %st(6), %st - fsubrp %st, %st(7) - fxch %st(6) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(2) - fsub %st(4), %st - fldt 56(%esp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(4), %st - fsubrp %st, %st(5) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fldt 88(%esp) - fld %st(0) - fsub %st(3), %st - fldt 40(%esp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(2), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(2) - fsub %st(2), %st - fldt 72(%esp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(4), %st - fsubrp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 28(%esp) - fldt 28(%esp) - fstpt 100(%esp) - addl $-32, %esp - fldt 32(%esp) - fstpt (%esp) - fldt 48(%esp) - fstpt 12(%esp) - call atan2l@PLT - jmp ..B1.87 -..B1.40: - cmpl $16383, %ecx - je ..B1.54 -..B1.41: - fstp %st(2) - fxch %st(1) - fstpt 28(%esp) -..B1.42: - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fmul %st(3), %st - fld %st(3) - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fsubp %st, %st(2) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fmulp %st, %st(1) - fmul %st(3), %st - fld %st(0) - fxch %st(4) - fmul %st(0), %st - fadd %st, %st(4) - fxch %st(1) - fsubr %st(4), %st - fsubrp %st, %st(1) - fld %st(1) - fadd %st(4), %st - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - faddp %st, %st(3) - fld %st(0) - fmul %st(1), %st - fldt 12+_Q1@GOTOFF(%ebx) - fmul %st(2), %st - fldt _Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 100(%esp) - addl $-32, %esp - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT - jmp ..B1.87 -..B1.43: - fstp %st(2) - fstp %st(1) - addl $-32, %esp - lea 72(%esp), %edx - movl %edx, (%esp) - fxch %st(1) - fstpt 4(%esp) - fstpt 16(%esp) - call __libm_hypot2l_k80 -..B1.83: - addl $32, %esp -..B1.44: - fldt 36+_CONSTANTS@GOTOFF(%ebx) - fmul %st(1), %st - fstpt 16(%esp) - fldt 48+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%esp) - addl $-32, %esp - fldt 72(%esp) - lea 96(%esp), %edx - fstpt (%esp) - fldt -12(%edx) - fstpt 12(%esp) - movl %edx, 24(%esp) - call __libm_logl_k80 -..B1.84: - addl $32, %esp -..B1.45: - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmulp %st, %st(1) - fldt 64(%esp) - fmul %st(1), %st - fldt 76(%esp) - fmulp %st, %st(2) - fldt 16(%esp) - fld %st(0) - fadd %st(2), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt (%esp) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 28(%esp) - fldt 28(%esp) - fstpt 100(%esp) - addl $-32, %esp - fldt 24(%ebp) - fstpt (%esp) - fldt 12(%ebp) - fstpt 12(%esp) - call atan2l@PLT - jmp ..B1.87 -..B1.46: - fldt 24(%ebp) - fldz - fldt 12(%ebp) - fxch %st(1) - fdivrl .L_2il0floatpacket.8@GOTOFF(%ebx) - fstpt 100(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT - jmp ..B1.87 -..B1.47: - je ..B1.71 -..B1.48: - cmpl $32767, %edx - je ..B1.64 -..B1.49: - fldt 72+_CONSTANTS@GOTOFF(%ebx) - fmul %st(0), %st - fstpt 100(%esp) - addl $-32, %esp - fldt 24(%ebp) - fstpt (%esp) - fldt 12(%ebp) - fstpt 12(%esp) - call atan2l@PLT -..B1.87: - addl $32, %esp - fstpt 112(%esp) -..B1.50: - testl %edi, %edi - je ..B1.52 -..B1.51: - fldcw 14(%esp) -..B1.52: - movl 100(%esp), %edx - movl %edx, (%esi) - movl 112(%esp), %edx - movl %edx, 12(%esi) - movl 116(%esp), %edx - movl %edx, 16(%esi) - movl 104(%esp), %ecx - movl 108(%esp), %edi - movl 120(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 124(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.63 -..B1.53: - movl %esi, %eax - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.54: - cmpl $-2147483648, 4(%esp) - jne ..B1.41 -..B1.56: - cmpl $0, (%esp) - jne ..B1.41 -..B1.58: - fstp %st(0) - fstp %st(0) - fstp %st(2) - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fmul %st(2), %st - fmulp %st, %st(2) - fxch %st(1) - fstpt 28(%esp) - fldt 28(%esp) - movzwl 36(%esp), %edx - testl $32767, %edx - jne ..B1.62 -..B1.59: - cmpl $0, 32(%esp) - jne ..B1.61 -..B1.60: - cmpl $0, 28(%esp) - je ..B1.62 -..B1.61: - fldt 84+_CONSTANTS@GOTOFF(%ebx) - fmul %st(0), %st - faddp %st, %st(1) - fstpt 28(%esp) - fldt 28(%esp) -..B1.62: - fstpt 100(%esp) - addl $-32, %esp - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT - jmp ..B1.87 -..B1.63: - call __stack_chk_fail@PLT -..B1.64: - cmpl $-2147483648, 28(%ebp) - jne ..B1.66 -..B1.65: - cmpl $0, 24(%ebp) - je ..B1.49 -..B1.66: - fldt 24(%ebp) - cmpl $32767, %ecx - fmul %st(0), %st - fstpt 112(%esp) - fldt 112(%esp) - je ..B1.68 -..B1.67: - fstpt 100(%esp) - jmp ..B1.50 -..B1.68: - cmpl $-2147483648, 16(%ebp) - jne ..B1.67 -..B1.69: - cmpl $0, 12(%ebp) - jne ..B1.67 -..B1.70: - fstp %st(0) - fldt 12(%ebp) - fmul %st(0), %st - fstpt 100(%esp) - jmp ..B1.50 -..B1.71: - cmpl $-2147483648, 16(%ebp) - jne ..B1.73 -..B1.72: - cmpl $0, 12(%ebp) - je ..B1.48 -..B1.73: - fldt 12(%ebp) - cmpl $32767, %edx - fld %st(0) - fmul %st(1), %st - fstpt 112(%esp) - je ..B1.75 -..B1.74: - fldt 24(%ebp) - fmulp %st, %st(1) - fstpt 100(%esp) - jmp ..B1.50 -..B1.75: - cmpl $-2147483648, 28(%ebp) - jne ..B1.74 -..B1.76: - cmpl $0, 24(%ebp) - jne ..B1.74 -..B1.77: - fstp %st(0) - fldt 24(%ebp) - fmul %st(0), %st - fstpt 100(%esp) - jmp ..B1.50 -..B1.78: - xorl %edi, %edi - jmp ..B1.7 -..B1.89: - cmpl $32767, %ecx - je ..B1.71 - jmp ..B1.48 -..B1.90: - fstp %st(0) - fstp %st(0) - jmp ..B1.43 - .align 16,0x90 - .type clogl,@function - .size clogl,.-clogl - .data -# -- End clogl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,12 - .space 4, 0x00 # pad - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16358 - .word 0 - .word 37342 - .word 47265 - .word 62214 - .word 46340 - .word 16382 - .word 0 - .word 64512 - .word 65535 - .word 31 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 53710 - .word 6135 - .word 45426 - .word 16381 - .word 0 - .word 505 - .word 55756 - .word 58609 - .word 48341 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8256 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,96 - .align 16 -_Q1: - .word 3134 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 49331 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .type _Q1,@object - .size _Q1,24 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .data - .hidden __libm_logl_k80 - .hidden __libm_hypot2l_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/complex_real.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/complex_real.S deleted file mode 100644 index 8bcc1ddca2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/complex_real.S +++ /dev/null @@ -1,291 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "complex_real.c" - .text -..TXTST0: -# -- Begin __libm_internal_isinf - .text - .align 16,0x90 - .hidden __libm_internal_isinf - .globl __libm_internal_isinf -__libm_internal_isinf: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - jne ..B1.4 -..B1.2: - cmpl $0, 4(%esp) - jne ..B1.4 -..B1.3: - movl $1, %eax - ret -..B1.4: - xorl %eax, %eax - ret - .align 16,0x90 - .type __libm_internal_isinf,@function - .size __libm_internal_isinf,.-__libm_internal_isinf - .data -# -- End __libm_internal_isinf - .text -# -- Begin __libm_internal_ispinf - .text - .align 16,0x90 - .hidden __libm_internal_ispinf - .globl __libm_internal_ispinf -__libm_internal_ispinf: -# parameter 1: 4 + %esp -..B2.1: -..L2: - - cmpl $2146435072, 8(%esp) - jne ..B2.4 -..B2.2: - cmpl $0, 4(%esp) - jne ..B2.4 -..B2.3: - movl $1, %eax - ret -..B2.4: - xorl %eax, %eax - ret - .align 16,0x90 - .type __libm_internal_ispinf,@function - .size __libm_internal_ispinf,.-__libm_internal_ispinf - .data -# -- End __libm_internal_ispinf - .text -# -- Begin __libm_internal_isninf - .text - .align 16,0x90 - .hidden __libm_internal_isninf - .globl __libm_internal_isninf -__libm_internal_isninf: -# parameter 1: 4 + %esp -..B3.1: -..L3: - - cmpl $-1048576, 8(%esp) - jne ..B3.4 -..B3.2: - cmpl $0, 4(%esp) - jne ..B3.4 -..B3.3: - movl $1, %eax - ret -..B3.4: - xorl %eax, %eax - ret - .align 16,0x90 - .type __libm_internal_isninf,@function - .size __libm_internal_isninf,.-__libm_internal_isninf - .data -# -- End __libm_internal_isninf - .text -# -- Begin __libm_internal_isnan - .text - .align 16,0x90 - .hidden __libm_internal_isnan - .globl __libm_internal_isnan -__libm_internal_isnan: -# parameter 1: 4 + %esp -..B4.1: -..L4: - - movl 8(%esp), %edx - movl %edx, %eax - andl $2146435072, %eax - cmpl $2146435072, %eax - jne ..B4.5 -..B4.2: - testl $1048575, %edx - jne ..B4.4 -..B4.3: - cmpl $0, 4(%esp) - je ..B4.5 -..B4.4: - movl $1, %eax - ret -..B4.5: - xorl %eax, %eax - ret - .align 16,0x90 - .type __libm_internal_isnan,@function - .size __libm_internal_isnan,.-__libm_internal_isnan - .data -# -- End __libm_internal_isnan - .text -# -- Begin __libm_internal_isposzero - .text - .align 16,0x90 - .hidden __libm_internal_isposzero - .globl __libm_internal_isposzero -__libm_internal_isposzero: -# parameter 1: 4 + %esp -..B5.1: -..L5: - - cmpl $0, 8(%esp) - jne ..B5.4 -..B5.2: - cmpl $0, 4(%esp) - jne ..B5.4 -..B5.3: - movl $1, %eax - ret -..B5.4: - xorl %eax, %eax - ret - .align 16,0x90 - .type __libm_internal_isposzero,@function - .size __libm_internal_isposzero,.-__libm_internal_isposzero - .data -# -- End __libm_internal_isposzero - .text -# -- Begin __libm_internal_iszero - .text - .align 16,0x90 - .hidden __libm_internal_iszero - .globl __libm_internal_iszero -__libm_internal_iszero: -# parameter 1: 4 + %esp -..B6.1: -..L6: - - testl $2147483647, 8(%esp) - jne ..B6.4 -..B6.2: - cmpl $0, 4(%esp) - jne ..B6.4 -..B6.3: - movl $1, %eax - ret -..B6.4: - xorl %eax, %eax - ret - .align 16,0x90 - .type __libm_internal_iszero,@function - .size __libm_internal_iszero,.-__libm_internal_iszero - .data -# -- End __libm_internal_iszero - .text -# -- Begin __libm_internal_isnegzero - .text - .align 16,0x90 - .hidden __libm_internal_isnegzero - .globl __libm_internal_isnegzero -__libm_internal_isnegzero: -# parameter 1: 4 + %esp -..B7.1: -..L7: - - cmpl $-2147483648, 8(%esp) - jne ..B7.4 -..B7.2: - cmpl $0, 4(%esp) - jne ..B7.4 -..B7.3: - movl $1, %eax - ret -..B7.4: - xorl %eax, %eax - ret - .align 16,0x90 - .type __libm_internal_isnegzero,@function - .size __libm_internal_isnegzero,.-__libm_internal_isnegzero - .data -# -- End __libm_internal_isnegzero - .text -# -- Begin __libm_internal_isnzfinite - .text - .align 16,0x90 - .hidden __libm_internal_isnzfinite - .globl __libm_internal_isnzfinite -__libm_internal_isnzfinite: -# parameter 1: 4 + %esp -..B8.1: -..L8: - - movl 8(%esp), %edx - movl %edx, %eax - andl $2146435072, %eax - cmpl $2146435072, %eax - jae ..B8.3 -..B8.2: - andl $2147483647, %edx - orl 4(%esp), %edx - jne ..B8.4 -..B8.3: - xorl %eax, %eax - ret -..B8.4: - movl $1, %eax - ret - .align 16,0x90 - .type __libm_internal_isnzfinite,@function - .size __libm_internal_isnzfinite,.-__libm_internal_isnzfinite - .data -# -- End __libm_internal_isnzfinite - .text -# -- Begin __libm_internal_isfinite - .text - .align 16,0x90 - .hidden __libm_internal_isfinite - .globl __libm_internal_isfinite -__libm_internal_isfinite: -# parameter 1: 4 + %esp -..B9.1: -..L9: - - movl 8(%esp), %eax - andl $2146435072, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __libm_internal_isfinite,@function - .size __libm_internal_isfinite,.-__libm_internal_isfinite - .data -# -- End __libm_internal_isfinite - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conj.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conj.S deleted file mode 100644 index 0ecb94916a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conj.S +++ /dev/null @@ -1,91 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "conj.c" - .text -..TXTST0: -# -- Begin conj - .text - .align 16,0x90 - .globl conj -conj: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp - fldl 12(%ebp) - fldl 20(%ebp) - movl 8(%ebp), %eax - fchs - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 16(%esp) - movl 16(%ebp), %edx - movl 12(%ebp), %ecx - fstpl 8(%esp) - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%esp), %ecx - movl 12(%esp), %edx - fstpl (%esp) - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - movl 16(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B1.3 -..B1.2: - movl %ebp, %esp - popl %ebp - ret $4 -..B1.3: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type conj,@function - .size conj,.-conj - .data -# -- End conj - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conjf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conjf.S deleted file mode 100644 index 69b5023b59..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conjf.S +++ /dev/null @@ -1,65 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "conjf.c" - .text -..TXTST0: -# -- Begin conjf - .text - .align 16,0x90 - .globl conjf -conjf: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - flds 20(%esp) - fchs - fstps 4(%esp) - movl 16(%esp), %eax - movl 4(%esp), %edx - movl %eax, (%esp) - addl $12, %esp - ret - .align 16,0x90 - .type conjf,@function - .size conjf,.-conjf - .data -# -- End conjf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conjl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conjl.S deleted file mode 100644 index 795764f468..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/conjl.S +++ /dev/null @@ -1,98 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "conjl.c" - .text -..TXTST0: -# -- Begin conjl - .text - .align 16,0x90 - .globl conjl -conjl: -# parameter 1: 36 + %esp -..B1.1: -..L1: - - subl $28, %esp - fldt 36(%esp) - fldt 48(%esp) - movl 32(%esp), %eax - fchs - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 24(%esp) - movl 40(%esp), %edx - movl 36(%esp), %ecx - fstpt 12(%esp) - fstpt (%esp) - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%esp), %ecx - movl 12(%esp), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - movl 16(%esp), %ecx - movl 20(%esp), %edx - movl %ecx, 16(%eax) - movl %edx, 20(%eax) - movl 24(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B1.3 -..B1.2: - addl $28, %esp - ret $4 -..B1.3: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type conjl,@function - .size conjl,.-conjl - .data -# -- End conjl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysign_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysign_wmt.S deleted file mode 100644 index ecd9d241b4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysign_wmt.S +++ /dev/null @@ -1,108 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "copysign_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin copysign - .text - .align 16,0x90 - .globl copysign -copysign: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd 120(%esp), %xmm1 - xorpd %xmm3, %xmm3 - addsd %xmm1, %xmm3 - movq (%ebx), %xmm2 - pand %xmm2, %xmm0 - pandn %xmm1, %xmm2 - por %xmm2, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type copysign,@function - .size copysign,.-copysign - .data -# -- End copysign - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysignf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysignf_wmt.S deleted file mode 100644 index dd79812725..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysignf_wmt.S +++ /dev/null @@ -1,118 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "copysignf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin copysignf - .text - .align 16,0x90 - .globl copysignf -copysignf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 36(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movss 116(%esp), %xmm1 - movl 112(%esp), %eax - movl 116(%esp), %ecx - ucomiss %xmm0, %xmm0 - jp .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - ucomiss %xmm1, %xmm1 - andl $2147483647, %eax - andl $-2147483648, %ecx - orl %ecx, %eax - movl %eax, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_0.0.2: - xorps %xmm2, %xmm2 - addss %xmm2, %xmm0 - movd %xmm0, %eax - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - movl 36(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type copysignf,@function - .size copysignf,.-copysignf - .data -# -- End copysignf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysignl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysignl.S deleted file mode 100644 index ef77a51b39..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/copysignl.S +++ /dev/null @@ -1,119 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "copysignl.c" - .text -..TXTST0: -# -- Begin copysignl - .text - .align 16,0x90 - .globl copysignl -copysignl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $48, %esp - fldt 8(%ebp) - fstpt 24(%esp) -..B1.2: - fnstcw 38(%esp) -..B1.3: - movzwl 38(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.10 -..B1.4: - orl $-64768, %edx - movw %dx, 36(%esp) -..B1.5: - fldcw 36(%esp) -..B1.6: - movl $1, %eax -..B1.7: - fldt 20(%ebp) - fldt 24(%esp) - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - movzbl 29(%ebp), %ecx - andl $-128, %ecx - fldl _ones@GOTOFF(%edx) - fmul %st, %st(1) - fxch %st(1) - fstpt 12(%esp) - fmulp %st, %st(1) - movzbl 21(%esp), %edx - andl $127, %edx - orl %ecx, %edx - fstpt (%esp) - testl %eax, %eax - movb %dl, 21(%esp) - je ..B1.9 -..B1.8: - fldcw 38(%esp) -..B1.9: - fldt 12(%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.10: - xorl %eax, %eax - jmp ..B1.7 - .align 16,0x90 - .type copysignl,@function - .size copysignl,.-copysignl - .data -# -- End copysignl - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cos_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cos_wmt.S deleted file mode 100644 index 2b50954709..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cos_wmt.S +++ /dev/null @@ -1,765 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cos_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin cos - .text - .align 16,0x90 - .globl cos -cos: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 56(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - pextrw $3, %xmm0, %eax - andl $32767, %eax - subl $12336, %eax - cmpl $4293, %eax - ja .L_2TAG_PACKET_0.0.2 - movsd 2160(%ebx), %xmm1 - mulsd %xmm0, %xmm1 - movapd 2240(%ebx), %xmm5 - movsd 2224(%ebx), %xmm4 - andpd %xmm0, %xmm4 - orps %xmm4, %xmm5 - movsd 2128(%ebx), %xmm3 - movapd 2112(%ebx), %xmm2 - addpd %xmm5, %xmm1 - cvttsd2si %xmm1, %edx - cvtsi2sdl %edx, %xmm1 - mulsd %xmm1, %xmm3 - unpcklpd %xmm1, %xmm1 - addl $1865232, %edx - movapd %xmm0, %xmm4 - andl $63, %edx - movapd 2096(%ebx), %xmm5 - lea (%ebx), %eax - shll $5, %edx - addl %edx, %eax - mulpd %xmm1, %xmm2 - subsd %xmm3, %xmm0 - mulsd 2144(%ebx), %xmm1 - subsd %xmm3, %xmm4 - movsd 8(%eax), %xmm7 - unpcklpd %xmm0, %xmm0 - movapd %xmm4, %xmm3 - subsd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - movapd 2064(%ebx), %xmm6 - mulsd %xmm4, %xmm7 - subsd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subsd %xmm2, %xmm3 - movapd (%eax), %xmm2 - subsd %xmm3, %xmm1 - movsd 24(%eax), %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm7 - mulsd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulsd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm0 - addpd 2080(%ebx), %xmm5 - mulsd (%eax), %xmm4 - addpd 2048(%ebx), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, %xmm0 - addsd 8(%eax), %xmm3 - mulpd %xmm7, %xmm1 - movapd %xmm4, %xmm7 - addsd %xmm3, %xmm4 - addpd %xmm5, %xmm6 - movsd 8(%eax), %xmm5 - subsd %xmm3, %xmm5 - subsd %xmm4, %xmm3 - addsd 16(%eax), %xmm1 - mulpd %xmm2, %xmm6 - addsd %xmm0, %xmm5 - addsd %xmm7, %xmm3 - addsd %xmm5, %xmm1 - addsd %xmm3, %xmm1 - addsd %xmm6, %xmm1 - unpckhpd %xmm6, %xmm6 - addsd %xmm6, %xmm1 - addsd %xmm1, %xmm4 - movsd %xmm4, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_0.0.2: - jg .L_2TAG_PACKET_2.0.2 - pextrw $3, %xmm0, %eax - andl $32767, %eax - pinsrw $3, %eax, %xmm0 - movsd 2192(%ebx), %xmm1 - subsd %xmm0, %xmm1 - movsd %xmm1, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - movl 132(%esp), %eax - andl $2146435072, %eax - cmpl $2146435072, %eax - je .L_2TAG_PACKET_3.0.2 - subl $32, %esp - movsd %xmm0, (%esp) - lea 40(%esp), %eax - movl %eax, 8(%esp) - movl $1, %eax - movl %eax, 12(%esp) - call __libm_sincos_huge - addl $32, %esp - fldl 8(%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_3.0.2: - fldl 128(%esp) - fmull 2208(%ebx) -.L_2TAG_PACKET_1.0.2: - movl 56(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type cos,@function - .size cos,.-cos - .data -# -- End cos - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 1072693248 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1071644672 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 1071644672 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1070596096 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 1070596096 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1069547520 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 3217031168 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 3218079744 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 3218079744 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 3219128320 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 3220176896 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3219128320 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 3219128320 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3218079744 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 3218079744 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 1069547520 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 1070596096 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 1070596096 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 1071644672 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 1072693248 - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .long 2773927732 - .long 1053236707 - .long 436314138 - .long 1056571808 - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .long 1413480448 - .long 1069097467 - .long 0 - .long 0 - .long 771977331 - .long 996350346 - .long 0 - .long 0 - .long 1841940611 - .long 1076125488 - .long 0 - .long 0 - .long 0 - .long 1127743488 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .type static_const_table,@object - .size static_const_table,2256 - .data - .hidden __libm_sincos_huge - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosdl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosdl.S deleted file mode 100644 index 384287a1c8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosdl.S +++ /dev/null @@ -1,689 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cosdl.c" - .text -..TXTST0: -# -- Begin cosdl - .text - .align 16,0x90 - .globl cosdl -cosdl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp -..B1.2: - fnstcw 30(%esp) -..B1.3: - movzwl 30(%esp), %edx - movl %edx, %eax - andl $3840, %eax - cmpl $768, %eax - je ..B1.38 -..B1.4: - andl $-3841, %edx - orl $-64768, %edx - movw %dx, 28(%esp) -..B1.5: - fldcw 28(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 16(%ebp), %esi - andl $32767, %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $16446, %esi - jge ..B1.19 -..B1.8: - cmpl $16318, %esi - jge ..B1.12 -..B1.9: - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fldt 8(%ebp) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - testl %edi, %edi - fmuls ones@GOTOFF(%ebx,%eax,4) - fsubrp %st, %st(1) - fstpt (%esp) - je ..B1.11 -..B1.10: - fldcw 30(%esp) -..B1.11: - fldt (%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.12: - fldt 8(%ebp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fldt _Rcp90@GOTOFF(%ebx) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fxch %st(4) - fmuls ones@GOTOFF(%ebx,%edx,4) - fmul %st, %st(2) - fxch %st(2) - fadd %st(3), %st - fstpt 92(%esp) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 92(%esp) - movl 92(%esp), %edx - fsubp %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - incl %edx - movl %edx, %ecx - fsubrp %st, %st(1) - andl $2, %ecx - fucom %st(1) - fnstsw %ax - fxch %st(1) - fstp %st(0) - shrl $1, %ecx - sahf - jp ..B1.13 - je ..B1.31 -..B1.13: - fldt .L_2il0floatpacket.4@GOTOFF(%ebx) - testb $1, %dl - fmul %st(1), %st - fld %st(1) - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fld %st(2) - fsub %st(2), %st - fmul %st, %st(2) - fld %st(3) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(3) - fld %st(1) - fld %st(4) - fldl _TWO_53H@GOTOFF(%ebx) - fld %st(0) - fmul %st(5), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(5) - fxch %st(1) - fmul %st, %st(2) - fld %st(5) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(1) - fsub %st(2), %st - fstpt 80(%esp) - fld %st(4) - fmul %st(5), %st - fld %st(0) - fmul %st(1), %st - flds ones@GOTOFF(%ebx,%ecx,4) - fstps 12(%esp) - je ..B1.15 -..B1.14: - fstp %st(6) - fstp %st(2) - fld %st(2) - fmul %st(3), %st - fmul %st, %st(1) - fld %st(2) - fmul %st(5), %st - fxch %st(4) - fstpt (%esp) - fldt (%esp) - fld %st(3) - fmul %st(7), %st - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(5) - fld %st(1) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fstpt 16(%esp) - fldt 16(%esp) - fsubrp %st, %st(1) - faddp %st, %st(3) - fldt 84+_cosdl_poly_coeff@GOTOFF(%ebx) - fmul %st(5), %st - fldt 60+_cosdl_poly_coeff@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 36+_cosdl_poly_coeff@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_cosdl_poly_coeff@GOTOFF(%ebx) - fmul %st(6), %st - fldt 48+_cosdl_poly_coeff@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(6), %st - fldt 24+_cosdl_poly_coeff@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fldl 24+_cosdl_mp_poly_coeff@GOTOFF(%ebx) - fmulp %st, %st(5) - faddp %st, %st(4) - fldl 8+_cosdl_mp_poly_coeff@GOTOFF(%ebx) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl 16+_cosdl_mp_poly_coeff@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldl _cosdl_mp_poly_coeff@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldt (%esp) - fmulp %st, %st(2) - fld %st(1) - fldt 16(%esp) - fmulp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - flds 12(%esp) - fld %st(0) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fld %st(0) - fadd %st(4), %st - fmul %st, %st(2) - fsubrp %st, %st(1) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.16 -..B1.15: - fld %st(6) - fmul %st(2), %st - fstpt 32(%esp) - fld %st(4) - fmul %st(4), %st - fmul %st, %st(3) - fxch %st(6) - fmul %st(7), %st - fxch %st(2) - fstpt 16(%esp) - fxch %st(3) - fstpt (%esp) - fldt 80(%esp) - fmul %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fld %st(4) - fadd %st(2), %st - fsubp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - fldt 48(%esp) - fsubrp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 96+_sindl_poly_coeff@GOTOFF(%ebx) - fmul %st(1), %st - fldt 72+_sindl_poly_coeff@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_sindl_poly_coeff@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_sindl_poly_coeff@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 60+_sindl_poly_coeff@GOTOFF(%ebx) - fldt 36+_sindl_poly_coeff@GOTOFF(%ebx) - fldt 16(%esp) - fmulp %st, %st(3) - fldt 84+_sindl_poly_coeff@GOTOFF(%ebx) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 32(%esp) - fmul %st, %st(1) - fldl 24+_sindl_mp_poly_coeff@GOTOFF(%ebx) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl 8+_sindl_mp_poly_coeff@GOTOFF(%ebx) - fmulp %st, %st(4) - faddp %st, %st(3) - fldl 16+_sindl_mp_poly_coeff@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldl _sindl_mp_poly_coeff@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldt (%esp) - fmulp %st, %st(2) - fld %st(1) - fldt 48(%esp) - fmulp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - flds 12(%esp) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 64(%esp) -..B1.16: - testl %edi, %edi - je ..B1.18 -..B1.17: - fldcw 30(%esp) -..B1.18: - fldt 64(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - cmpl $32767, %esi - je ..B1.37 -..B1.20: - lea -16446(%esi), %ecx - cmpl $14, %ecx - jle ..B1.22 -..B1.21: - addl $-16449, %esi - movl $715827883, %eax - imull %esi - movl %esi, %ecx - sarl $1, %edx - sarl $31, %ecx - subl %ecx, %edx - lea (,%edx,8), %ecx - lea (%ecx,%edx,4), %eax - subl %eax, %esi - lea 3(%esi), %ecx -..B1.22: - movl %edi, (%esp) - movl $381774871, %eax - movl 12(%ebp), %edi - movl %edi, %esi - shll $8, %esi - andl $-16777216, %edi - movl %esi, %edx - shrl $3, %edx - mull %edx - shrl $2, %edx - imull $-360, %edx, %eax - movl %edi, %edx - shrl $19, %edi - addl %eax, %esi - movl $381774871, %eax - shrl $16, %edx - movl %edx, 4(%esp) - mull %edi - shrl $2, %edx - imull $-360, %edx, %edi - movl 4(%esp), %eax - addl %edi, %eax - movl 8(%ebp), %edi - movl %edi, %edx - shrl $3, %edx - addl %eax, %esi - movl $381774871, %eax - mull %edx - shrl $2, %edx - imull $-360, %edx, %eax - addl %eax, %edi - movl $-1240768329, %eax - addl %edi, %esi - shll %cl, %esi - imull %esi - addl %esi, %edx - movl %esi, %ecx - sarl $8, %edx - sarl $31, %ecx - subl %ecx, %edx - imull $-360, %edx, %eax - addl %eax, %esi - movl (%esp), %edi - cmpl $180, %esi - jl ..B1.24 -..B1.23: - addl $-180, %esi - movl $3, %eax - jmp ..B1.25 -..B1.24: - movl $1, %eax -..B1.25: - cmpl $90, %esi - jl ..B1.27 -..B1.26: - incl %eax - addl $-90, %esi -..B1.27: - movl %eax, %edx - andl $1, %eax - shll $4, %eax - andl $2, %edx - shll $5, %esi - addl %esi, %eax - shrl $1, %edx - fldl __libm_sindl_cosdl_table@GOTOFF(%eax,%ebx) - faddl 8+__libm_sindl_cosdl_table@GOTOFF(%ebx,%eax) - fmuls ones@GOTOFF(%ebx,%edx,4) - fstpt (%esp) -..B1.28: - testl %edi, %edi - je ..B1.30 -..B1.29: - fldcw 30(%esp) -..B1.30: - fldt (%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - fstp %st(0) - testb $1, %dl - je ..B1.33 -..B1.32: - flds ones@GOTOFF(%ebx,%ecx,4) - fstps (%esp) - jmp ..B1.34 -..B1.33: - fldz - fstps (%esp) -..B1.34: - testl %edi, %edi - je ..B1.36 -..B1.35: - fldcw 30(%esp) -..B1.36: - flds (%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.37: - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fldt 8(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.28 -..B1.38: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type cosdl,@function - .size cosdl,.-cosdl - .data -# -- End cosdl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3e,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0x05,0x40,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -_cosdl_poly_coeff: - .word 52350 - .word 41213 - .word 3800 - .word 40885 - .word 49138 - .word 0 - .word 28613 - .word 7908 - .word 35668 - .word 34008 - .word 16355 - .word 0 - .word 19927 - .word 58728 - .word 49885 - .word 45261 - .word 49106 - .word 0 - .word 32884 - .word 22035 - .word 23267 - .word 64541 - .word 16320 - .word 0 - .word 36401 - .word 51897 - .word 8309 - .word 57265 - .word 49070 - .word 0 - .word 34286 - .word 2728 - .word 41564 - .word 34642 - .word 16284 - .word 0 - .word 63248 - .word 18030 - .word 35596 - .word 60796 - .word 49032 - .word 0 - .word 52149 - .word 21294 - .word 63985 - .word 40123 - .word 16245 - .word 0 - .type _cosdl_poly_coeff,@object - .size _cosdl_poly_coeff,96 - .align 16 -_cosdl_mp_poly_coeff: - .long 3675529145 - .long 3206805153 - .long 2134983071 - .long 3151100167 - .long 1787026573 - .long 1043372817 - .long 205083639 - .long 988746860 - .type _cosdl_mp_poly_coeff,@object - .size _cosdl_mp_poly_coeff,32 - .align 16 -_sindl_poly_coeff: - .word 51374 - .word 38121 - .word 13586 - .word 36602 - .word 16377 - .word 0 - .word 50116 - .word 41339 - .word 4204 - .word 60892 - .word 49130 - .word 0 - .word 33704 - .word 2155 - .word 42839 - .word 60780 - .word 16346 - .word 0 - .word 21250 - .word 19076 - .word 27901 - .word 57780 - .word 49097 - .word 0 - .word 9076 - .word 49244 - .word 613 - .word 64083 - .word 16311 - .word 0 - .word 40572 - .word 30418 - .word 36251 - .word 46520 - .word 49061 - .word 0 - .word 3227 - .word 25505 - .word 5540 - .word 47626 - .word 16274 - .word 0 - .word 60933 - .word 3300 - .word 57416 - .word 36218 - .word 49023 - .word 0 - .word 45811 - .word 42646 - .word 37125 - .word 42185 - .word 16235 - .word 0 - .type _sindl_poly_coeff,@object - .size _sindl_poly_coeff,108 - .space 4, 0x00 # pad - .align 16 -_sindl_mp_poly_coeff: - .long 2723323193 - .long 1066524486 - .long 2863989530 - .long 1008058840 - .long 227815288 - .long 3199056770 - .long 3752327299 - .long 3142458725 - .type _sindl_mp_poly_coeff,@object - .size _sindl_mp_poly_coeff,32 - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 2 -_Rcp90: - .word 46603 - .word 2912 - .word 24758 - .word 46603 - .word 16376 - .word 0 - .type _Rcp90,@object - .size _Rcp90,12 - .data - .hidden __libm_sindl_cosdl_table - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosf_wmt.S deleted file mode 100644 index 871b6636b2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosf_wmt.S +++ /dev/null @@ -1,590 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cosf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin cosf - .text - .align 16,0x90 - .globl cosf -cosf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 36(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %ecx - subl $16, %esp - stmxcsr 4(%esp) - movl 4(%esp), %eax - andl $-24577, %eax - cmpl %eax, 4(%esp) - jne .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - movapd %xmm0, %xmm1 - cvtps2pd %xmm1, %xmm1 - movsd 1296(%ebx), %xmm2 - movl $2147483647, %eax - movl $1241513983, %edx - andl %ecx, %eax - subl %eax, %edx - subl $964689920, %eax - orl %eax, %edx - jl .L_2TAG_PACKET_2.0.2 - movsd 1312(%ebx), %xmm4 - mulsd %xmm1, %xmm2 - movsd 1328(%ebx), %xmm3 - movapd %xmm2, %xmm5 - addsd %xmm4, %xmm2 - movd %xmm2, %ecx - subsd %xmm4, %xmm2 - mulsd %xmm3, %xmm1 -.L_2TAG_PACKET_3.0.2: - movl $384, %eax - movsd 1344(%ebx), %xmm4 - subsd %xmm2, %xmm5 - addl %ecx, %ecx - movl %ecx, %edx - shll $24, %ecx - sarl $31, %ecx - andl %edx, %eax - addl %ecx, %edx - xorl %ecx, %edx - addsd %xmm5, %xmm1 - andl $254, %edx - movsd (%ebx,%edx,8), %xmm3 - movsd 1352(%ebx), %xmm0 - pshufd $68, %xmm1, %xmm2 - mulsd %xmm1, %xmm1 - movsd 8(%ebx,%edx,8), %xmm5 - movl %eax, %ecx - andl $256, %ecx - shll $23, %ecx - mulsd %xmm2, %xmm3 - movd %ecx, %xmm2 - subsd %xmm1, %xmm0 - addl $128, %eax - andl $256, %eax - shll $23, %eax - subsd %xmm1, %xmm4 - psllq $32, %xmm2 - movd %eax, %xmm1 - xorpd %xmm2, %xmm4 - mulsd %xmm5, %xmm0 - mulsd %xmm4, %xmm3 - psllq $32, %xmm1 - xorpd %xmm1, %xmm0 - addsd %xmm3, %xmm0 - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_4.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_4.0.2: - cvtpd2ps %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_2.0.2: - andl $2147483647, %ecx - cmpl $1040187392, %ecx - ja .L_2TAG_PACKET_6.0.2 - movl $1065353216, %eax - movd %eax, %xmm0 - cmpl $0, %ecx - je .L_2TAG_PACKET_7.0.2 - movl $805306368, %eax - movd %eax, %xmm1 - subss %xmm1, %xmm0 -.L_2TAG_PACKET_7.0.2: - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_8.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_8.0.2: - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_0.0.2: - movl 4(%esp), %eax - andl $-24577, %eax - movl %eax, 8(%esp) - ldmxcsr 8(%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_6.0.2: - movd %xmm0, %eax - andl $2139095040, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_9.0.2 - shrl $23, %ecx - subl $142, %ecx - andl $65528, %ecx - movsd 1040(%ebx,%ecx,2), %xmm3 - movsd 1048(%ebx,%ecx,2), %xmm5 - movsd 1360(%ebx), %xmm2 - xorpd %xmm4, %xmm4 - movl $17208, %eax - pinsrw $3, %eax, %xmm4 - andpd %xmm3, %xmm2 - psllq $40, %xmm3 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm1 - movapd %xmm2, %xmm0 - addsd %xmm3, %xmm2 - movapd %xmm2, %xmm5 - subsd %xmm2, %xmm0 - addsd %xmm4, %xmm2 - addsd %xmm0, %xmm3 - movd %xmm2, %ecx - subsd %xmm4, %xmm2 - addsd %xmm3, %xmm1 - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_9.0.2: - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_10.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_10.0.2: - subss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_5.0.2: - addl $16, %esp - movl 36(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type cosf,@function - .size cosf,.-cosf - .data -# -- End cosf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 3384690142 - .long 1060355388 - .long 918535681 - .long 3195026356 - .long 735532773 - .long 1060354999 - .long 3431923622 - .long 3196074611 - .long 2385983684 - .long 1060353830 - .long 3670374716 - .long 3196605580 - .long 2769466396 - .long 1060351883 - .long 3087185898 - .long 3197121906 - .long 2627920248 - .long 1060349159 - .long 624330694 - .long 3197386271 - .long 418831766 - .long 1060345660 - .long 1991825541 - .long 3197649836 - .long 900924147 - .long 1060341387 - .long 3917367244 - .long 3197912443 - .long 2243801771 - .long 1060336343 - .long 2803392399 - .long 3198165367 - .long 316258674 - .long 1060330532 - .long 2429158325 - .long 3198295476 - .long 1563320407 - .long 1060323956 - .long 1382541649 - .long 3198424870 - .long 1522351063 - .long 1060316620 - .long 4207787592 - .long 3198553470 - .long 1992674941 - .long 1060308528 - .long 321119318 - .long 3198681201 - .long 2434209605 - .long 1060299685 - .long 2865853451 - .long 3198807983 - .long 4249822861 - .long 1060290096 - .long 1666812989 - .long 3198933742 - .long 2181617495 - .long 1060279768 - .long 2082609563 - .long 3199058401 - .long 1475857720 - .long 1060268706 - .long 3726787968 - .long 3199181885 - .long 687004205 - .long 1060256917 - .long 2478530408 - .long 3199254748 - .long 250409509 - .long 1060244408 - .long 3681356269 - .long 3199315204 - .long 2463945945 - .long 1060231186 - .long 1535093810 - .long 3199374963 - .long 2878576948 - .long 1060217260 - .long 350661592 - .long 3199433988 - .long 3162654741 - .long 1060202638 - .long 2042383238 - .long 3199492243 - .long 2490283769 - .long 1060187329 - .long 1925003623 - .long 3199549694 - .long 1813501338 - .long 1060171342 - .long 1689375324 - .long 3199606306 - .long 3838419993 - .long 1060154686 - .long 902054988 - .long 3199662045 - .long 115411415 - .long 1060137373 - .long 1388494065 - .long 3199716877 - .long 1077921708 - .long 1060119411 - .long 3024934267 - .long 3199770769 - .long 3311502568 - .long 1060091288 - .long 3823857331 - .long 3199823689 - .long 1148832537 - .long 1060052839 - .long 17970311 - .long 3199875606 - .long 652328457 - .long 1060013161 - .long 3322544997 - .long 3199926486 - .long 1395127179 - .long 1059972278 - .long 2361617751 - .long 3199976301 - .long 1772140623 - .long 1059930215 - .long 1401987205 - .long 3200025020 - .long 3231311734 - .long 1059886997 - .long 3250975870 - .long 3200072613 - .long 1618129506 - .long 1059842651 - .long 742418353 - .long 3200119053 - .long 4288148241 - .long 1059797202 - .long 2580634211 - .long 3200164310 - .long 4268074870 - .long 1059750679 - .long 3348027550 - .long 3200208358 - .long 1659779181 - .long 1059703110 - .long 755484892 - .long 3200251171 - .long 3567792879 - .long 1059654522 - .long 2993330 - .long 3200273337 - .long 2550341159 - .long 1059604946 - .long 488211833 - .long 3200293469 - .long 2313428161 - .long 1059554411 - .long 3436142021 - .long 3200312945 - .long 453708735 - .long 1059502948 - .long 1407782048 - .long 3200331755 - .long 1264637048 - .long 1059450587 - .long 1575056534 - .long 3200349886 - .long 2771364651 - .long 1059397360 - .long 4275292648 - .long 3200367327 - .long 944109265 - .long 1059343300 - .long 3039475318 - .long 3200384069 - .long 2500108843 - .long 1059288438 - .long 1799297257 - .long 3200400101 - .long 3344537919 - .long 1059232808 - .long 2028347177 - .long 3200415413 - .long 1369913724 - .long 1059176444 - .long 2767093429 - .long 3200429996 - .long 664370609 - .long 1059119379 - .long 646746141 - .long 3200443842 - .long 1372808103 - .long 1059061535 - .long 2796885356 - .long 3200456941 - .long 941816458 - .long 1058944809 - .long 1097233945 - .long 3200469287 - .long 1373383079 - .long 1058826890 - .long 2262842797 - .long 3200480871 - .long 2796081240 - .long 1058707849 - .long 2093526290 - .long 3200491687 - .long 3945677176 - .long 1058587758 - .long 2671784286 - .long 3200501728 - .long 1979618421 - .long 1058466690 - .long 3789723003 - .long 3200510988 - .long 879820317 - .long 1058344717 - .long 2964703016 - .long 3200519462 - .long 2674059679 - .long 1058221912 - .long 4043704933 - .long 3200527144 - .long 2950925715 - .long 1058098350 - .long 36665700 - .long 3200534031 - .long 2811721921 - .long 1057935027 - .long 3193221610 - .long 3200540116 - .long 3297207428 - .long 1057685321 - .long 2063766514 - .long 3200545398 - .long 544295963 - .long 1057434550 - .long 163641427 - .long 3200549873 - .long 3381119115 - .long 1057182863 - .long 3096463640 - .long 3200553537 - .long 3054827835 - .long 1056896220 - .long 1381230637 - .long 3200556390 - .long 3419039295 - .long 1056390099 - .long 522802171 - .long 3200558429 - .long 1693671239 - .long 1055850091 - .long 3836476539 - .long 3200559652 - .long 1466910230 - .long 1054802127 - .long 3861233235 - .long 3200560060 - .long 0 - .long 0 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1916669064 - .long 1072155675 - .long 660066805 - .long 1024797180 - .long 3829231700 - .long 1062745828 - .long 2884172442 - .long 1017445907 - .long 540874025 - .long 1055617650 - .long 4198409884 - .long 1011844330 - .long 2839315448 - .long 1046639136 - .long 4204424928 - .long 1000582120 - .long 1329339431 - .long 1038229673 - .long 1295478839 - .long 993391741 - .long 658191860 - .long 1024797180 - .long 3691886121 - .long 979325773 - .long 1966800710 - .long 1020436418 - .long 1882642597 - .long 977095991 - .long 2100977488 - .long 1012908661 - .long 1840335565 - .long 967470816 - .long 4198093645 - .long 1000582120 - .long 3307942521 - .long 957055414 - .long 2839123165 - .long 996851343 - .long 1387472776 - .long 952638316 - .long 2788761024 - .long 988712873 - .long 3005712498 - .long 944467026 - .long 3694676832 - .long 979325773 - .long 1326507024 - .long 934847846 - .long 221775557 - .long 970149340 - .long 1133527550 - .long 924162364 - .long 4286578688 - .long 1072693247 - .long 0 - .long 0 - .long 1845493760 - .long 1078222640 - .long 0 - .long 0 - .long 0 - .long 1127743488 - .long 0 - .long 0 - .long 2908765579 - .long 3193641918 - .long 0 - .long 0 - .long 2308576600 - .long 1086551075 - .long 1646446368 - .long 1084878895 - .long 4278190080 - .long 4294967295 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,1376 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosh_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosh_wmt.S deleted file mode 100644 index 49ce3ddac9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosh_wmt.S +++ /dev/null @@ -1,1351 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cosh_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin cosh - .text - .align 16,0x90 - .globl cosh -cosh: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd 4240(%ebx), %xmm3 - xorpd %xmm4, %xmm4 - movsd 4192(%ebx), %xmm1 - movsd 4200(%ebx), %xmm2 - movl $32768, %eax - pinsrw $3, %eax, %xmm4 - movsd 4096(%ebx), %xmm6 - pextrw $3, %xmm0, %ecx - andpd %xmm0, %xmm3 - andnpd %xmm0, %xmm4 - pshufd $68, %xmm4, %xmm5 - andl $32767, %ecx - subl $16320, %ecx - cmpl $200, %ecx - jae .L_2TAG_PACKET_0.0.3 - subsd %xmm3, %xmm4 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm2 - cvtsd2si %xmm3, %eax - movapd %xmm3, %xmm7 - addsd %xmm6, %xmm3 - mulsd %xmm4, %xmm1 - xorpd %xmm5, %xmm5 - subsd %xmm6, %xmm3 - movapd 4112(%ebx), %xmm4 - addsd %xmm1, %xmm2 - movapd 4128(%ebx), %xmm6 - subsd %xmm3, %xmm7 - movl $32704, %edx - pinsrw $3, %edx, %xmm5 - movapd 4144(%ebx), %xmm1 - addsd %xmm7, %xmm2 - movl $127, %edx - andl %eax, %edx - addl %edx, %edx - shrl $3, %eax - andl $65520, %eax - addl $16352, %eax - xorpd %xmm0, %xmm0 - cmpl $184, %ecx - jae .L_2TAG_PACKET_1.0.3 - pshufd $68, %xmm5, %xmm5 - pinsrw $3, %eax, %xmm0 - pshufd $68, %xmm0, %xmm0 - psubw %xmm0, %xmm5 - mulpd (%ebx,%edx,8), %xmm0 - mulpd 2048(%ebx,%edx,8), %xmm5 - pshufd $68, %xmm2, %xmm3 - movapd 4160(%ebx), %xmm7 - pshufd $68, %xmm2, %xmm2 - mulpd %xmm3, %xmm3 - mulpd %xmm2, %xmm4 - mulpd %xmm2, %xmm6 - mulpd 4176(%ebx), %xmm2 - mulpd %xmm3, %xmm1 - mulpd %xmm3, %xmm7 - mulpd %xmm3, %xmm4 - mulpd %xmm3, %xmm1 - addpd %xmm7, %xmm6 - movapd %xmm0, %xmm7 - addpd %xmm1, %xmm4 - shufpd $0, %xmm5, %xmm7 - addpd %xmm5, %xmm0 - mulpd %xmm7, %xmm2 - addpd %xmm6, %xmm4 - subsd %xmm0, %xmm7 - mulpd %xmm2, %xmm4 - pshufd $238, %xmm0, %xmm6 - addsd %xmm5, %xmm7 - addpd %xmm2, %xmm4 - addsd %xmm6, %xmm7 - pshufd $238, %xmm4, %xmm2 - addsd %xmm7, %xmm2 - addsd %xmm4, %xmm2 - addsd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - addl $16320, %ecx - cmpl $16320, %ecx - ja .L_2TAG_PACKET_3.0.3 - cmpl $15952, %ecx - jae .L_2TAG_PACKET_4.0.3 - addsd %xmm2, %xmm6 - movsd 4248(%ebx), %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - subl $16352, %eax - movl %eax, %ecx - andl $32752, %eax - shrl $1, %eax - andl $65520, %eax - subl %eax, %ecx - addl $16352, %eax - pinsrw $3, %eax, %xmm0 - pshufd $68, %xmm0, %xmm0 - mulpd (%ebx,%edx,8), %xmm0 - pshufd $68, %xmm2, %xmm3 - movsd 4160(%ebx), %xmm7 - mulsd %xmm3, %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm6 - mulsd 4176(%ebx), %xmm2 - mulsd %xmm3, %xmm1 - mulsd %xmm3, %xmm7 - mulsd %xmm3, %xmm4 - addl $16368, %ecx - pinsrw $3, %ecx, %xmm5 - mulsd %xmm3, %xmm1 - addsd %xmm7, %xmm6 - addsd %xmm1, %xmm4 - mulsd %xmm0, %xmm2 - addsd %xmm6, %xmm4 - mulsd %xmm2, %xmm4 - pshufd $238, %xmm0, %xmm6 - addsd %xmm6, %xmm4 - addsd %xmm4, %xmm2 - addsd %xmm2, %xmm0 - mulsd %xmm5, %xmm0 - pextrw $3, %xmm0, %eax - andl $32752, %eax - movl $64, %edx - cmpl $32752, %eax - je .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - movapd 4208(%ebx), %xmm1 - mulpd %xmm5, %xmm5 - movapd 4224(%ebx), %xmm2 - xorpd %xmm3, %xmm3 - movapd %xmm5, %xmm0 - mulpd %xmm5, %xmm1 - movsd 4248(%ebx), %xmm6 - mulpd %xmm5, %xmm5 - movl $16352, %eax - pinsrw $3, %eax, %xmm3 - addpd %xmm2, %xmm1 - mulpd %xmm5, %xmm1 - pshufd $238, %xmm1, %xmm2 - mulsd %xmm1, %xmm5 - mulsd %xmm3, %xmm0 - addsd %xmm5, %xmm2 - addsd %xmm2, %xmm0 - addsd %xmm6, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $32752, %ecx - jae .L_2TAG_PACKET_6.0.3 - xorpd %xmm0, %xmm0 - movl $32736, %eax - pinsrw $3, %eax, %xmm0 - mulsd %xmm0, %xmm0 - movl $64, %edx -.L_2TAG_PACKET_5.0.3: - movsd %xmm0, (%esp) - movsd 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_6.0.3: - mulsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_2.0.3: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_7.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type cosh,@function - .size cosh,.-cosh - .data -# -- End cosh - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 2851812149 - .long 1072698941 - .long 2595802551 - .long 1016815913 - .long 1048019041 - .long 1072704666 - .long 1398474845 - .long 3161559171 - .long 3899555717 - .long 1072710421 - .long 427280750 - .long 3163595548 - .long 3541402996 - .long 1072716208 - .long 2759177317 - .long 1015903202 - .long 702412510 - .long 1072722027 - .long 3803266087 - .long 3163328991 - .long 410360776 - .long 1072727877 - .long 1269990655 - .long 1013024446 - .long 3402036099 - .long 1072733758 - .long 405889334 - .long 1016154232 - .long 1828292879 - .long 1072739672 - .long 1255956747 - .long 1016636974 - .long 728909815 - .long 1072745618 - .long 383930225 - .long 1016078044 - .long 852742562 - .long 1072751596 - .long 667253586 - .long 1010842135 - .long 2952712987 - .long 1072757606 - .long 3293494651 - .long 3161168877 - .long 3490863953 - .long 1072763649 - .long 960797498 - .long 3163997456 - .long 3228316108 - .long 1072769725 - .long 3010241991 - .long 3159471380 - .long 2930322912 - .long 1072775834 - .long 2599499422 - .long 3163762623 - .long 3366293073 - .long 1072781976 - .long 3119426314 - .long 1015169130 - .long 1014845819 - .long 1072788152 - .long 3117910646 - .long 3162607681 - .long 948735466 - .long 1072794361 - .long 3516338028 - .long 3163623459 - .long 3949972341 - .long 1072800603 - .long 2068408548 - .long 1015962444 - .long 2214878420 - .long 1072806880 - .long 892270087 - .long 3164164998 - .long 828946858 - .long 1072813191 - .long 10642492 - .long 1016988014 - .long 586995997 - .long 1072819536 - .long 41662348 - .long 3163676568 - .long 2288159958 - .long 1072825915 - .long 2169144469 - .long 1015924597 - .long 2440944790 - .long 1072832329 - .long 2492769774 - .long 1015196030 - .long 1853186616 - .long 1072838778 - .long 3066496371 - .long 1016705150 - .long 1337108031 - .long 1072845262 - .long 3203724452 - .long 1015726421 - .long 1709341917 - .long 1072851781 - .long 2571168217 - .long 1015201075 - .long 3790955393 - .long 1072858335 - .long 2352942462 - .long 3164228666 - .long 4112506593 - .long 1072864925 - .long 2947355221 - .long 1015419624 - .long 3504003472 - .long 1072871551 - .long 3594001060 - .long 3158379228 - .long 2799960843 - .long 1072878213 - .long 1423655381 - .long 1016070727 - .long 2839424854 - .long 1072884911 - .long 1171596163 - .long 1014090255 - .long 171030293 - .long 1072891646 - .long 3526460132 - .long 1015477354 - .long 4232894513 - .long 1072898416 - .long 2383938684 - .long 1015717095 - .long 2992903935 - .long 1072905224 - .long 2218154406 - .long 1016276769 - .long 1603444721 - .long 1072912069 - .long 1548633640 - .long 3163249902 - .long 926591435 - .long 1072918951 - .long 3208833762 - .long 3163962090 - .long 1829099622 - .long 1072925870 - .long 1016661181 - .long 3164509581 - .long 887463927 - .long 1072932827 - .long 3596744163 - .long 3161842742 - .long 3272845541 - .long 1072939821 - .long 928852419 - .long 3164536824 - .long 1276261410 - .long 1072946854 - .long 300981948 - .long 1015732745 - .long 78413852 - .long 1072953925 - .long 4183226867 - .long 3164065827 - .long 569847338 - .long 1072961034 - .long 472945272 - .long 3160339305 - .long 3645941911 - .long 1072968181 - .long 3814685081 - .long 3162621917 - .long 1617004845 - .long 1072975368 - .long 82804944 - .long 1011391354 - .long 3978100823 - .long 1072982593 - .long 3513027190 - .long 1016894539 - .long 3049340112 - .long 1072989858 - .long 3062915824 - .long 1014219171 - .long 4040676318 - .long 1072997162 - .long 4090609238 - .long 1016712034 - .long 3577096743 - .long 1073004506 - .long 2951496418 - .long 1014842263 - .long 2583551245 - .long 1073011890 - .long 3161094195 - .long 1016655067 - .long 1990012071 - .long 1073019314 - .long 3529070563 - .long 3163861769 - .long 2731501122 - .long 1073026778 - .long 1774031855 - .long 3163518597 - .long 1453150082 - .long 1073034283 - .long 498154669 - .long 3162536638 - .long 3395129871 - .long 1073041828 - .long 4025345435 - .long 3163383964 - .long 917841882 - .long 1073049415 - .long 18715565 - .long 1016707884 - .long 3566716925 - .long 1073057042 - .long 1536826856 - .long 1015191009 - .long 3712504873 - .long 1073064711 - .long 88491949 - .long 1016476236 - .long 2321106615 - .long 1073072422 - .long 2171176610 - .long 1010584347 - .long 363667784 - .long 1073080175 - .long 813753950 - .long 1016833785 - .long 3111574537 - .long 1073087969 - .long 2606161479 - .long 3163808322 - .long 2956612997 - .long 1073095806 - .long 2118169751 - .long 3163784129 - .long 885834528 - .long 1073103686 - .long 1973258547 - .long 3163310140 - .long 2186617381 - .long 1073111608 - .long 2270764084 - .long 3164321289 - .long 3561793907 - .long 1073119573 - .long 1157054053 - .long 1012938926 - .long 1719614413 - .long 1073127582 - .long 330458198 - .long 3164331316 - .long 1963711167 - .long 1073135634 - .long 1744767757 - .long 3161622870 - .long 1013258799 - .long 1073143730 - .long 1748797611 - .long 3161177658 - .long 4182873220 - .long 1073151869 - .long 629542646 - .long 3163044879 - .long 3907805044 - .long 1073160053 - .long 2257091225 - .long 3162598983 - .long 1218806132 - .long 1073168282 - .long 1818613052 - .long 3163597017 - .long 1447192521 - .long 1073176555 - .long 1462857171 - .long 3163563097 - .long 1339972927 - .long 1073184873 - .long 167908909 - .long 1016620728 - .long 1944781191 - .long 1073193236 - .long 3993278767 - .long 3162772855 - .long 19972402 - .long 1073201645 - .long 3507899862 - .long 1017057868 - .long 919555682 - .long 1073210099 - .long 3121969534 - .long 1013996802 - .long 1413356050 - .long 1073218599 - .long 1651349291 - .long 3163716742 - .long 2571947539 - .long 1073227145 - .long 3558159064 - .long 3164425245 - .long 1176749997 - .long 1073235738 - .long 2738998779 - .long 3163084420 - .long 2604962541 - .long 1073244377 - .long 2614425274 - .long 3164587768 - .long 3649726105 - .long 1073253063 - .long 4085036346 - .long 1016698050 - .long 1110089947 - .long 1073261797 - .long 1451641639 - .long 1016523249 - .long 380978316 - .long 1073270578 - .long 854188970 - .long 3161511262 - .long 2568320822 - .long 1073279406 - .long 2732824428 - .long 1015401491 - .long 194117574 - .long 1073288283 - .long 777528612 - .long 3164460665 - .long 2966275557 - .long 1073297207 - .long 2176155324 - .long 3160891335 - .long 3418903055 - .long 1073306180 - .long 2527457337 - .long 3161869180 - .long 2682146384 - .long 1073315202 - .long 2082178513 - .long 3164411995 - .long 1892288442 - .long 1073324273 - .long 2446255666 - .long 3163648957 - .long 2191782032 - .long 1073333393 - .long 2960257726 - .long 1014791238 - .long 434316067 - .long 1073342563 - .long 2028358766 - .long 1014506698 - .long 2069751141 - .long 1073351782 - .long 1562170675 - .long 3163773257 - .long 3964284211 - .long 1073361051 - .long 2111583915 - .long 1016475740 - .long 2990417245 - .long 1073370371 - .long 3683467745 - .long 3164417902 - .long 321958744 - .long 1073379742 - .long 3401933767 - .long 1016843134 - .long 1434058175 - .long 1073389163 - .long 251133233 - .long 1016134345 - .long 3218338682 - .long 1073398635 - .long 3404164304 - .long 3163525684 - .long 2572866477 - .long 1073408159 - .long 878562433 - .long 1016570317 - .long 697153126 - .long 1073417735 - .long 1283515429 - .long 3164331765 - .long 3092190715 - .long 1073427362 - .long 814012168 - .long 3160571998 - .long 2380618042 - .long 1073437042 - .long 3149557219 - .long 3164369375 - .long 4076559943 - .long 1073446774 - .long 2119478331 - .long 3161806927 - .long 815859274 - .long 1073456560 - .long 240396590 - .long 3164536019 - .long 2420883922 - .long 1073466398 - .long 2049810052 - .long 1015168464 - .long 1540824585 - .long 1073476290 - .long 1064017011 - .long 3164536266 - .long 3716502172 - .long 1073486235 - .long 2303740125 - .long 1015091301 - .long 1610600570 - .long 1073496235 - .long 3766732298 - .long 1016808759 - .long 777507147 - .long 1073506289 - .long 4282924205 - .long 1016236109 - .long 2483480501 - .long 1073516397 - .long 1216371780 - .long 1014082748 - .long 3706687593 - .long 1073526560 - .long 3521726940 - .long 1014301643 - .long 1432208378 - .long 1073536779 - .long 1401068914 - .long 3163412539 - .long 1242007932 - .long 1073547053 - .long 1132034716 - .long 3164388407 - .long 135105010 - .long 1073557383 - .long 1906148728 - .long 3164424315 - .long 3707479175 - .long 1073567768 - .long 3613079303 - .long 1015213314 - .long 382305176 - .long 1073578211 - .long 2347622376 - .long 3163627201 - .long 64696965 - .long 1073588710 - .long 1768797490 - .long 1016865536 - .long 4076975200 - .long 1073599265 - .long 2029000899 - .long 1016257111 - .long 863738719 - .long 1073609879 - .long 1326992220 - .long 3163661773 - .long 351641897 - .long 1073620550 - .long 2172261526 - .long 3164059175 - .long 3884662774 - .long 1073631278 - .long 2158611599 - .long 1015258761 - .long 4224142467 - .long 1073642065 - .long 3389820386 - .long 1016255778 - .long 2728693978 - .long 1073652911 - .long 396109971 - .long 3164511267 - .long 764307441 - .long 1073663816 - .long 3021057420 - .long 3164378099 - .long 3999357479 - .long 1073674779 - .long 2258941616 - .long 1016973300 - .long 929806999 - .long 1073685803 - .long 3205336643 - .long 1016308133 - .long 1533953344 - .long 1073696886 - .long 769171851 - .long 1016714209 - .long 2912730644 - .long 1073708029 - .long 3490067722 - .long 3164453650 - .long 2174652632 - .long 1073719233 - .long 4087714590 - .long 1015498835 - .long 730821105 - .long 1073730498 - .long 2523232743 - .long 1013115764 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 730821105 - .long 1072681922 - .long 2523232743 - .long 1012067188 - .long 2174652632 - .long 1072670657 - .long 4087714590 - .long 1014450259 - .long 2912730644 - .long 1072659453 - .long 3490067722 - .long 3163405074 - .long 1533953344 - .long 1072648310 - .long 769171851 - .long 1015665633 - .long 929806999 - .long 1072637227 - .long 3205336643 - .long 1015259557 - .long 3999357479 - .long 1072626203 - .long 2258941616 - .long 1015924724 - .long 764307441 - .long 1072615240 - .long 3021057420 - .long 3163329523 - .long 2728693978 - .long 1072604335 - .long 396109971 - .long 3163462691 - .long 4224142467 - .long 1072593489 - .long 3389820386 - .long 1015207202 - .long 3884662774 - .long 1072582702 - .long 2158611599 - .long 1014210185 - .long 351641897 - .long 1072571974 - .long 2172261526 - .long 3163010599 - .long 863738719 - .long 1072561303 - .long 1326992220 - .long 3162613197 - .long 4076975200 - .long 1072550689 - .long 2029000899 - .long 1015208535 - .long 64696965 - .long 1072540134 - .long 1768797490 - .long 1015816960 - .long 382305176 - .long 1072529635 - .long 2347622376 - .long 3162578625 - .long 3707479175 - .long 1072519192 - .long 3613079303 - .long 1014164738 - .long 135105010 - .long 1072508807 - .long 1906148728 - .long 3163375739 - .long 1242007932 - .long 1072498477 - .long 1132034716 - .long 3163339831 - .long 1432208378 - .long 1072488203 - .long 1401068914 - .long 3162363963 - .long 3706687593 - .long 1072477984 - .long 3521726940 - .long 1013253067 - .long 2483480501 - .long 1072467821 - .long 1216371780 - .long 1013034172 - .long 777507147 - .long 1072457713 - .long 4282924205 - .long 1015187533 - .long 1610600570 - .long 1072447659 - .long 3766732298 - .long 1015760183 - .long 3716502172 - .long 1072437659 - .long 2303740125 - .long 1014042725 - .long 1540824585 - .long 1072427714 - .long 1064017011 - .long 3163487690 - .long 2420883922 - .long 1072417822 - .long 2049810052 - .long 1014119888 - .long 815859274 - .long 1072407984 - .long 240396590 - .long 3163487443 - .long 4076559943 - .long 1072398198 - .long 2119478331 - .long 3160758351 - .long 2380618042 - .long 1072388466 - .long 3149557219 - .long 3163320799 - .long 3092190715 - .long 1072378786 - .long 814012168 - .long 3159523422 - .long 697153126 - .long 1072369159 - .long 1283515429 - .long 3163283189 - .long 2572866477 - .long 1072359583 - .long 878562433 - .long 1015521741 - .long 3218338682 - .long 1072350059 - .long 3404164304 - .long 3162477108 - .long 1434058175 - .long 1072340587 - .long 251133233 - .long 1015085769 - .long 321958744 - .long 1072331166 - .long 3401933767 - .long 1015794558 - .long 2990417245 - .long 1072321795 - .long 3683467745 - .long 3163369326 - .long 3964284211 - .long 1072312475 - .long 2111583915 - .long 1015427164 - .long 2069751141 - .long 1072303206 - .long 1562170675 - .long 3162724681 - .long 434316067 - .long 1072293987 - .long 2028358766 - .long 1013458122 - .long 2191782032 - .long 1072284817 - .long 2960257726 - .long 1013742662 - .long 1892288442 - .long 1072275697 - .long 2446255666 - .long 3162600381 - .long 2682146384 - .long 1072266626 - .long 2082178513 - .long 3163363419 - .long 3418903055 - .long 1072257604 - .long 2527457337 - .long 3160820604 - .long 2966275557 - .long 1072248631 - .long 2176155324 - .long 3159842759 - .long 194117574 - .long 1072239707 - .long 777528612 - .long 3163412089 - .long 2568320822 - .long 1072230830 - .long 2732824428 - .long 1014352915 - .long 380978316 - .long 1072222002 - .long 854188970 - .long 3160462686 - .long 1110089947 - .long 1072213221 - .long 1451641639 - .long 1015474673 - .long 3649726105 - .long 1072204487 - .long 4085036346 - .long 1015649474 - .long 2604962541 - .long 1072195801 - .long 2614425274 - .long 3163539192 - .long 1176749997 - .long 1072187162 - .long 2738998779 - .long 3162035844 - .long 2571947539 - .long 1072178569 - .long 3558159064 - .long 3163376669 - .long 1413356050 - .long 1072170023 - .long 1651349291 - .long 3162668166 - .long 919555682 - .long 1072161523 - .long 3121969534 - .long 1012948226 - .long 19972402 - .long 1072153069 - .long 3507899862 - .long 1016009292 - .long 1944781191 - .long 1072144660 - .long 3993278767 - .long 3161724279 - .long 1339972927 - .long 1072136297 - .long 167908909 - .long 1015572152 - .long 1447192521 - .long 1072127979 - .long 1462857171 - .long 3162514521 - .long 1218806132 - .long 1072119706 - .long 1818613052 - .long 3162548441 - .long 3907805044 - .long 1072111477 - .long 2257091225 - .long 3161550407 - .long 4182873220 - .long 1072103293 - .long 629542646 - .long 3161996303 - .long 1013258799 - .long 1072095154 - .long 1748797611 - .long 3160129082 - .long 1963711167 - .long 1072087058 - .long 1744767757 - .long 3160574294 - .long 1719614413 - .long 1072079006 - .long 330458198 - .long 3163282740 - .long 3561793907 - .long 1072070997 - .long 1157054053 - .long 1011890350 - .long 2186617381 - .long 1072063032 - .long 2270764084 - .long 3163272713 - .long 885834528 - .long 1072055110 - .long 1973258547 - .long 3162261564 - .long 2956612997 - .long 1072047230 - .long 2118169751 - .long 3162735553 - .long 3111574537 - .long 1072039393 - .long 2606161479 - .long 3162759746 - .long 363667784 - .long 1072031599 - .long 813753950 - .long 1015785209 - .long 2321106615 - .long 1072023846 - .long 2171176610 - .long 1009535771 - .long 3712504873 - .long 1072016135 - .long 88491949 - .long 1015427660 - .long 3566716925 - .long 1072008466 - .long 1536826856 - .long 1014142433 - .long 917841882 - .long 1072000839 - .long 18715565 - .long 1015659308 - .long 3395129871 - .long 1071993252 - .long 4025345435 - .long 3162335388 - .long 1453150082 - .long 1071985707 - .long 498154669 - .long 3161488062 - .long 2731501122 - .long 1071978202 - .long 1774031855 - .long 3162470021 - .long 1990012071 - .long 1071970738 - .long 3529070563 - .long 3162813193 - .long 2583551245 - .long 1071963314 - .long 3161094195 - .long 1015606491 - .long 3577096743 - .long 1071955930 - .long 2951496418 - .long 1013793687 - .long 4040676318 - .long 1071948586 - .long 4090609238 - .long 1015663458 - .long 3049340112 - .long 1071941282 - .long 3062915824 - .long 1013170595 - .long 3978100823 - .long 1071934017 - .long 3513027190 - .long 1015845963 - .long 1617004845 - .long 1071926792 - .long 82804944 - .long 1010342778 - .long 3645941911 - .long 1071919605 - .long 3814685081 - .long 3161573341 - .long 569847338 - .long 1071912458 - .long 472945272 - .long 3159290729 - .long 78413852 - .long 1071905349 - .long 4183226867 - .long 3163017251 - .long 1276261410 - .long 1071898278 - .long 300981948 - .long 1014684169 - .long 3272845541 - .long 1071891245 - .long 928852419 - .long 3163488248 - .long 887463927 - .long 1071884251 - .long 3596744163 - .long 3160794166 - .long 1829099622 - .long 1071877294 - .long 1016661181 - .long 3163461005 - .long 926591435 - .long 1071870375 - .long 3208833762 - .long 3162913514 - .long 1603444721 - .long 1071863493 - .long 1548633640 - .long 3162201326 - .long 2992903935 - .long 1071856648 - .long 2218154406 - .long 1015228193 - .long 4232894513 - .long 1071849840 - .long 2383938684 - .long 1014668519 - .long 171030293 - .long 1071843070 - .long 3526460132 - .long 1014428778 - .long 2839424854 - .long 1071836335 - .long 1171596163 - .long 1013041679 - .long 2799960843 - .long 1071829637 - .long 1423655381 - .long 1015022151 - .long 3504003472 - .long 1071822975 - .long 3594001060 - .long 3157330652 - .long 4112506593 - .long 1071816349 - .long 2947355221 - .long 1014371048 - .long 3790955393 - .long 1071809759 - .long 2352942462 - .long 3163180090 - .long 1709341917 - .long 1071803205 - .long 2571168217 - .long 1014152499 - .long 1337108031 - .long 1071796686 - .long 3203724452 - .long 1014677845 - .long 1853186616 - .long 1071790202 - .long 3066496371 - .long 1015656574 - .long 2440944790 - .long 1071783753 - .long 2492769774 - .long 1014147454 - .long 2288159958 - .long 1071777339 - .long 2169144469 - .long 1014876021 - .long 586995997 - .long 1071770960 - .long 41662348 - .long 3162627992 - .long 828946858 - .long 1071764615 - .long 10642492 - .long 1015939438 - .long 2214878420 - .long 1071758304 - .long 892270087 - .long 3163116422 - .long 3949972341 - .long 1071752027 - .long 2068408548 - .long 1014913868 - .long 948735466 - .long 1071745785 - .long 3516338028 - .long 3162574883 - .long 1014845819 - .long 1071739576 - .long 3117910646 - .long 3161559105 - .long 3366293073 - .long 1071733400 - .long 3119426314 - .long 1014120554 - .long 2930322912 - .long 1071727258 - .long 2599499422 - .long 3162714047 - .long 3228316108 - .long 1071721149 - .long 3010241991 - .long 3158422804 - .long 3490863953 - .long 1071715073 - .long 960797498 - .long 3162948880 - .long 2952712987 - .long 1071709030 - .long 3293494651 - .long 3160120301 - .long 852742562 - .long 1071703020 - .long 667253586 - .long 1009793559 - .long 728909815 - .long 1071697042 - .long 383930225 - .long 1015029468 - .long 1828292879 - .long 1071691096 - .long 1255956747 - .long 1015588398 - .long 3402036099 - .long 1071685182 - .long 405889334 - .long 1015105656 - .long 410360776 - .long 1071679301 - .long 1269990655 - .long 1011975870 - .long 702412510 - .long 1071673451 - .long 3803266087 - .long 3162280415 - .long 3541402996 - .long 1071667632 - .long 2759177317 - .long 1014854626 - .long 3899555717 - .long 1071661845 - .long 427280750 - .long 3162546972 - .long 1048019041 - .long 1071656090 - .long 1398474845 - .long 3160510595 - .long 2851812149 - .long 1071650365 - .long 2595802551 - .long 1015767337 - .long 0 - .long 1127743488 - .long 0 - .long 3275227136 - .long 3607404736 - .long 1044146952 - .long 3607404736 - .long 3191630600 - .long 4277811695 - .long 1063661122 - .long 4277811695 - .long 3211144770 - .long 2140175755 - .long 1033864261 - .long 2140175755 - .long 1033864261 - .long 4289495988 - .long 1054113747 - .long 4289495988 - .long 1054113747 - .long 4277811695 - .long 1064709698 - .long 4277811695 - .long 3212193346 - .long 1610612736 - .long 1080497479 - .long 4166901572 - .long 1053077003 - .long 3078135644 - .long 1049787983 - .long 381774870 - .long 1062650220 - .long 436314137 - .long 1056571808 - .long 1431655765 - .long 1067799893 - .long 4160749568 - .long 2147483647 - .long 0 - .long 1072693248 - .type static_const_table,@object - .size static_const_table,4256 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/coshf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/coshf_wmt.S deleted file mode 100644 index 59ce011471..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/coshf_wmt.S +++ /dev/null @@ -1,405 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "coshf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin coshf - .text - .align 16,0x90 - .globl coshf -coshf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movsd 608(%ebx), %xmm3 - movsd 512(%ebx), %xmm6 - movss %xmm0, 8(%esp) - movd %xmm0, %ecx - psllq $33, %xmm0 - psrlq $4, %xmm0 - movapd 528(%ebx), %xmm4 - andl $2147418112, %ecx - subl $1040187392, %ecx - cmpl $79691776, %ecx - jae .L_2TAG_PACKET_0.0.3 - mulsd %xmm0, %xmm3 - movapd %xmm3, %xmm2 - addsd %xmm6, %xmm3 - xorpd %xmm0, %xmm0 - movd %xmm3, %eax - subsd %xmm6, %xmm3 - movapd 544(%ebx), %xmm1 - xorpd %xmm5, %xmm5 - subsd %xmm3, %xmm2 - movl $31, %edx - andl %eax, %edx - shrl $1, %eax - addl %edx, %edx - andl $65520, %eax - addl $16352, %eax - cmpl $71303168, %ecx - jae .L_2TAG_PACKET_1.0.3 - pinsrw $3, %eax, %xmm0 - movl $32704, %ecx - subl %eax, %ecx - movapd 560(%ebx), %xmm3 - movapd (%ebx,%edx,8), %xmm7 - pinsrw $3, %ecx, %xmm5 - pshufd $68, %xmm2, %xmm2 - shufpd $0, %xmm5, %xmm0 - movapd 576(%ebx), %xmm6 - mulpd %xmm2, %xmm4 - mulpd %xmm2, %xmm1 - mulpd %xmm2, %xmm3 - mulpd %xmm7, %xmm0 - mulpd %xmm2, %xmm4 - addpd %xmm1, %xmm6 - mulpd %xmm0, %xmm3 - addpd %xmm6, %xmm4 - mulpd %xmm3, %xmm4 - addpd %xmm4, %xmm0 - pshufd $78, %xmm0, %xmm4 - addpd %xmm4, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - addl $1040187392, %ecx - cmpl $1040187392, %ecx - ja .L_2TAG_PACKET_3.0.3 - cmpl $956301312, %ecx - jae .L_2TAG_PACKET_4.0.3 - movss 592(%ebx), %xmm3 - mulss %xmm3, %xmm3 - fld1 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - pinsrw $3, %eax, %xmm0 - movsd 560(%ebx), %xmm3 - pshufd $68, %xmm2, %xmm2 - mulsd (%ebx,%edx,8), %xmm0 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm1, %xmm4 - mulsd %xmm2, %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm3, %xmm4 - mulsd %xmm0, %xmm4 - addsd %xmm4, %xmm0 - cvtsd2ss %xmm0, %xmm0 - pextrw $1, %xmm0, %eax - andl $32640, %eax - movl $65, %edx - cmpl $32640, %eax - je .L_2TAG_PACKET_5.0.3 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - movss 592(%ebx), %xmm7 - movss 8(%esp), %xmm1 - mulss %xmm1, %xmm1 - movss 596(%ebx), %xmm2 - movl $1056964608, %eax - movd %eax, %xmm3 - movss %xmm1, %xmm0 - mulss %xmm1, %xmm7 - movl $1065353216, %edx - movd %edx, %xmm6 - mulss %xmm1, %xmm1 - addss %xmm2, %xmm7 - mulps %xmm1, %xmm7 - mulss %xmm3, %xmm0 - addss %xmm7, %xmm0 - addss %xmm6, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $2139095040, %ecx - jae .L_2TAG_PACKET_6.0.3 - xorps %xmm0, %xmm0 - movl $32512, %eax - pinsrw $1, %eax, %xmm0 - mulss %xmm0, %xmm0 -.L_2TAG_PACKET_5.0.3: - movss %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $65, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - movss 8(%esp), %xmm0 - mulss %xmm0, %xmm0 -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_2.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type coshf,@function - .size coshf,.-coshf - .data -# -- End coshf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 3541402996 - .long 1072716208 - .long 1533953344 - .long 1072648310 - .long 1828292879 - .long 1072739672 - .long 2728693978 - .long 1072604335 - .long 3490863953 - .long 1072763649 - .long 863738719 - .long 1072561303 - .long 1014845819 - .long 1072788152 - .long 3707479175 - .long 1072519192 - .long 828946858 - .long 1072813191 - .long 3706687593 - .long 1072477984 - .long 1853186616 - .long 1072838778 - .long 3716502172 - .long 1072437659 - .long 4112506593 - .long 1072864925 - .long 4076559943 - .long 1072398198 - .long 171030293 - .long 1072891646 - .long 2572866477 - .long 1072359583 - .long 926591435 - .long 1072918951 - .long 2990417245 - .long 1072321795 - .long 1276261410 - .long 1072946854 - .long 2191782032 - .long 1072284817 - .long 1617004845 - .long 1072975368 - .long 2966275557 - .long 1072248631 - .long 3577096743 - .long 1073004506 - .long 1110089947 - .long 1072213221 - .long 1453150082 - .long 1073034283 - .long 2571947539 - .long 1072178569 - .long 3712504873 - .long 1073064711 - .long 1944781191 - .long 1072144660 - .long 2956612997 - .long 1073095806 - .long 3907805044 - .long 1072111477 - .long 1719614413 - .long 1073127582 - .long 1719614413 - .long 1072079006 - .long 3907805044 - .long 1073160053 - .long 2956612997 - .long 1072047230 - .long 1944781191 - .long 1073193236 - .long 3712504873 - .long 1072016135 - .long 2571947539 - .long 1073227145 - .long 1453150082 - .long 1071985707 - .long 1110089947 - .long 1073261797 - .long 3577096743 - .long 1071955930 - .long 2966275557 - .long 1073297207 - .long 1617004845 - .long 1071926792 - .long 2191782032 - .long 1073333393 - .long 1276261410 - .long 1071898278 - .long 2990417245 - .long 1073370371 - .long 926591435 - .long 1071870375 - .long 2572866477 - .long 1073408159 - .long 171030293 - .long 1071843070 - .long 4076559943 - .long 1073446774 - .long 4112506593 - .long 1071816349 - .long 3716502172 - .long 1073486235 - .long 1853186616 - .long 1071790202 - .long 3706687593 - .long 1073526560 - .long 828946858 - .long 1071764615 - .long 3707479175 - .long 1073567768 - .long 1014845819 - .long 1071739576 - .long 863738719 - .long 1073609879 - .long 3490863953 - .long 1071715073 - .long 2728693978 - .long 1073652911 - .long 1828292879 - .long 1071691096 - .long 1533953344 - .long 1073696886 - .long 3541402996 - .long 1071667632 - .long 0 - .long 1127743488 - .long 0 - .long 3275227136 - .long 4289495988 - .long 1058308051 - .long 4289495988 - .long 1058308051 - .long 4277811695 - .long 1065758274 - .long 4277811695 - .long 3213241922 - .long 4277811695 - .long 1066806850 - .long 4277811695 - .long 3214290498 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 985008993 - .long 1026206379 - .long 0 - .long 0 - .long 1697350398 - .long 2017924423 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,640 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/coshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/coshl.S deleted file mode 100644 index 5b0301b800..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/coshl.S +++ /dev/null @@ -1,942 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "coshl.c" - .text -..TXTST0: -# -- Begin coshl - .text - .align 16,0x90 - .globl coshl -coshl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $72, %esp -..B1.2: - fnstcw 58(%esp) -..B1.3: - movzwl 16(%ebp), %ebx - andl $32767, %ebx - movl 12(%ebp), %ecx - movl %ebx, %esi - movl %ecx, %edx - shll $16, %esi - shrl $16, %edx - movzbl 17(%ebp), %eax - orl %edx, %esi - andl $128, %eax - shrl $7, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $1073992020, %esi - jae ..B1.50 -..B1.4: - movzwl 58(%esp), %ecx - cmpl $16382, %ebx - jge ..B1.43 -..B1.5: - cmpl $16378, %ebx - jge ..B1.36 -..B1.6: - cmpl $16372, %ebx - jge ..B1.29 -..B1.7: - cmpl $16365, %ebx - jge ..B1.22 -..B1.8: - cmpl $16308, %ebx - jge ..B1.16 -..B1.9: - movl %ecx, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.69 -..B1.10: - orl $-64768, %ecx - movw %cx, 56(%esp) -..B1.11: - fldcw 56(%esp) -..B1.12: - movzbl 17(%ebp), %eax - movl $1, %ecx - andl $128, %eax - shrl $7, %eax -..B1.13: - fldt 8(%ebp) - testl %ecx, %ecx - fmull ones@GOTOFF(%edx,%eax,8) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.15 -..B1.14: - fldcw 58(%esp) -..B1.15: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.70 -..B1.17: - orl $-64768, %ecx - movw %cx, 56(%esp) -..B1.18: - fldcw 56(%esp) -..B1.19: - fldt 8(%ebp) - fldt _Q3@GOTOFF(%edx) - fmul %st(1), %st - fmulp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - faddp %st, %st(1) - fstpt (%esp) -..B1.20: - fldcw 58(%esp) -..B1.21: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.22: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.71 -..B1.23: - orl $-64768, %ecx - movw %cx, 56(%esp) -..B1.24: - fldcw 56(%esp) -..B1.25: - movl $1, %eax -..B1.26: - fldt 8(%ebp) - testl %eax, %eax - fmul %st(0), %st - fldt 12+_Q2@GOTOFF(%edx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.28 -..B1.27: - fldcw 58(%esp) -..B1.28: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.29: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.72 -..B1.30: - orl $-64768, %ecx - movw %cx, 56(%esp) -..B1.31: - fldcw 56(%esp) -..B1.32: - movl $1, %eax -..B1.33: - fldt 8(%ebp) - testl %eax, %eax - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%edx) - fmul %st(1), %st - fldt 12+_Q1@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%edx) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.35 -..B1.34: - fldcw 58(%esp) -..B1.35: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.36: - movl %ecx, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.73 -..B1.37: - orl $-64768, %ecx - movw %cx, 56(%esp) -..B1.38: - fldcw 56(%esp) -..B1.39: - movzbl 17(%ebp), %eax - movl $1, %ecx - andl $128, %eax - shrl $7, %eax -..B1.40: - fldl _TWO_48H@GOTOFF(%edx) - testl %ecx, %ecx - fld %st(0) - fldt 8(%ebp) - fmull ones@GOTOFF(%edx,%eax,8) - fstpt 8(%ebp) - fldt 8(%ebp) - fadd %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fld %st(2) - fmul %st(3), %st - fld %st(0) - fmul %st(1), %st - fldt 84+_Q@GOTOFF(%edx) - fmul %st(1), %st - fldt 72+_Q@GOTOFF(%edx) - fmul %st(2), %st - fldt 60+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fld %st(4) - fmul %st(4), %st - fxch %st(6) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(5) - fxch %st(3) - fmul %st(0), %st - fldt 12+_Q@GOTOFF(%edx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fldt 108+_Q@GOTOFF(%edx) - fld %st(0) - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - fmul %st, %st(1) - fldt 96+_Q@GOTOFF(%edx) - fld %st(0) - fmul %st(5), %st - fxch %st(3) - fmul %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(2) - fmul %st, %st(3) - fld %st(3) - fxch %st(3) - fmulp %st, %st(1) - fadd %st, %st(2) - fldl _TWO_48H@GOTOFF(%edx) - fadd %st, %st(3) - fsubr %st(3), %st - fsubr %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - je ..B1.83 -..B1.41: - fstpt 44(%esp) -..B1.82: - fldcw 58(%esp) - jmp ..B1.42 -..B1.83: - fstp %st(0) -..B1.42: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.43: - movl %ecx, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.74 -..B1.44: - orl $-64768, %ecx - movw %cx, 56(%esp) -..B1.45: - fldcw 56(%esp) -..B1.46: - movzbl 17(%ebp), %eax - movl $1, %ecx - andl $128, %eax - shrl $7, %eax -..B1.47: - fldt 8(%ebp) - fmull ones@GOTOFF(%edx,%eax,8) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_63H@GOTOFF(%edx) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(2), %st - fadd %st(1), %st - fstpt 44(%esp) - fldt 44(%esp) - fsubp %st, %st(1) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmul %st(1), %st - movl 44(%esp), %eax - fsubrp %st, %st(2) - fld %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fmulp %st, %st(2) - movsbl %al, %esi - fsub %st(1), %st - fldl _TWO_32P@GOTOFF(%edx) - subl %esi, %eax - fmul %st(1), %st - fxch %st(1) - fmull _TWO_32@GOTOFF(%edx) - shll $4, %esi - fsubrp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - shrl $8, %eax - fxch %st(2) - fsubrp %st, %st(3) - movl %eax, %ebx - negl %eax - shll $23, %ebx - fadd %st(2), %st - fld %st(0) - addl $1056964608, %ebx - fmul %st(1), %st - fldt 48+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - shll $23, %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - addl $1056964608, %eax - fldt 12+_P@GOTOFF(%edx) - movl %ebx, 12(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - movl %eax, 28(%esp) - fxch %st(2) - faddp %st, %st(4) - fld %st(3) - fldt _P@GOTOFF(%edx) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - fadd %st, %st(1) - fsubp %st, %st(3) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%esi) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%esi) - negl %esi - fstpt 16(%esp) - fldt 16(%esp) - testl %ecx, %ecx - fadd %st(1), %st - fmulp %st, %st(2) - fld %st(0) - fmul %st(3), %st - faddp %st, %st(2) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%esi) - fld %st(0) - fmul %st(4), %st - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%esi) - fld %st(0) - fadd %st(3), %st - fmulp %st, %st(7) - fxch %st(1) - fsubrp %st, %st(6) - fxch %st(5) - fstpt 32(%esp) - fldt 16(%esp) - fld %st(0) - fmul %st(5), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - fmul %st(4), %st - fld %st(4) - fsub %st(1), %st - fsubr %st, %st(5) - fxch %st(1) - fsubrp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fldt 32(%esp) - faddp %st, %st(3) - flds 12(%esp) - fmul %st, %st(2) - fmulp %st, %st(1) - flds 28(%esp) - fmul %st, %st(4) - fld %st(4) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.49 -..B1.48: - fldcw 58(%esp) -..B1.49: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.50: - cmpl $16396, %ebx - jge ..B1.58 -..B1.51: - movzwl 58(%esp), %ebx - movl %ebx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.75 -..B1.52: - orl $-64768, %ebx - movw %bx, 56(%esp) -..B1.53: - fldcw 56(%esp) -..B1.54: - movzbl 17(%ebp), %eax - movl $1, %ecx - andl $128, %eax - shrl $7, %eax -..B1.55: - fldt 8(%ebp) - fmull ones@GOTOFF(%edx,%eax,8) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - fstpt (%esp) - fldl _TWO_63H@GOTOFF(%edx) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(2), %st - movzwl 8+.L_2il0floatpacket.3@GOTOFF(%edx), %ebx - fadd %st(1), %st - fstpt 44(%esp) - fldt 44(%esp) - andl $-32768, %ebx - movl 44(%esp), %eax - fsubp %st, %st(1) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmul %st(1), %st - movsbl %al, %esi - fsubrp %st, %st(2) - fld %st(1) - subl %esi, %eax - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fmulp %st, %st(2) - shll $4, %esi - fsub %st(1), %st - fldl _TWO_32@GOTOFF(%edx) - fldl _TWO_32P@GOTOFF(%edx) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - shrl $8, %eax - fxch %st(2) - fsubrp %st, %st(1) - fld %st(0) - addl $16350, %eax - andl $32767, %eax - fxch %st(1) - fsubr %st, %st(4) - orl %eax, %ebx - fxch %st(3) - fsubrp %st, %st(4) - movw %bx, 8(%esp) - testl %ecx, %ecx - fadd %st(3), %st - fld %st(0) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(5) - fldt _P@GOTOFF(%edx) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%esi) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%esi) - fld %st(0) - fmul %st(5), %st - fxch %st(4) - fadd %st, %st(5) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fldt (%esp) - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.57 -..B1.56: - fldcw 58(%esp) -..B1.57: - fldt 16(%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.58: - je ..B1.77 -..B1.59: - movzwl 58(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.76 -..B1.60: - orl $-64768, %ecx - movw %cx, 56(%esp) -..B1.61: - fldcw 56(%esp) -..B1.62: - movzwl 16(%ebp), %ebx - movl $1, %ecx - andl $32767, %ebx -..B1.63: - cmpl $32767, %ebx - jne ..B1.65 -..B1.64: - fldt 8(%ebp) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fmull ones@GOTOFF(%edx,%eax,8) - fstpt (%esp) - jmp ..B1.66 -..B1.65: - fldt _large_value_80@GOTOFF(%edx) - fmul %st(0), %st - fstpt (%esp) -..B1.66: - testl %ecx, %ecx - je ..B1.68 -..B1.67: - fldcw 58(%esp) -..B1.68: - fldt (%esp) - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.69: - xorl %ecx, %ecx - jmp ..B1.13 -..B1.70: - fldt 8(%ebp) - fldt _Q3@GOTOFF(%edx) - fmul %st(1), %st - fmulp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.21 -..B1.71: - xorl %eax, %eax - jmp ..B1.26 -..B1.72: - xorl %eax, %eax - jmp ..B1.33 -..B1.73: - xorl %ecx, %ecx - jmp ..B1.40 -..B1.74: - xorl %ecx, %ecx - jmp ..B1.47 -..B1.75: - xorl %ecx, %ecx - jmp ..B1.55 -..B1.76: - xorl %ecx, %ecx - jmp ..B1.63 -..B1.77: - cmpl $-1317741120, %ecx - jb ..B1.51 -..B1.78: - jne ..B1.59 -..B1.79: - cmpl $833536233, 8(%ebp) - jbe ..B1.51 - jmp ..B1.59 - .align 16,0x90 - .type coshl,@function - .size coshl,.-coshl - .data -# -- End coshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 2 -_Q3: - .word 21845 - .word 213 - .word 0 - .word 32768 - .word 16382 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 62430 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 22894 - .word 21845 - .word 43733 - .word 43690 - .word 16378 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 65531 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 7054 - .word 43693 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 25016 - .word 58228 - .word 24755 - .word 46603 - .word 16373 - .word 0 - .word 57397 - .word 35800 - .word 53031 - .word 53262 - .word 16367 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 18360 - .word 43637 - .word 28980 - .word 40373 - .word 49076 - .word 0 - .word 16302 - .word 43691 - .word 43690 - .word 43690 - .word 16362 - .word 0 - .word 46125 - .word 2912 - .word 24758 - .word 46603 - .word 16373 - .word 0 - .word 29965 - .word 3335 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 54950 - .word 46751 - .word 32187 - .word 37874 - .word 16361 - .word 0 - .word 30733 - .word 25775 - .word 51110 - .word 36726 - .word 16354 - .word 0 - .word 49850 - .word 450 - .word 9929 - .word 51659 - .word 16346 - .word 0 - .word 2776 - .word 45191 - .word 37201 - .word 55334 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16378 - .word 0 - .type _Q,@object - .size _Q,120 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _P,@object - .size _P,60 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosl.S deleted file mode 100644 index 2db539db3c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cosl.S +++ /dev/null @@ -1,1022 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cosl.c" - .text -..TXTST0: -# -- Begin cosl - .text - .align 16,0x90 - .globl cosl -cosl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 136(%esp) -..B1.2: - fnstcw 46(%esp) -..B1.3: - movzwl 16(%ebp), %edx - andl $32767, %edx - movzwl 46(%esp), %eax - cmpl $16378, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jge ..B1.47 -..B1.4: - cmpl $16372, %edx - jge ..B1.39 -..B1.5: - cmpl $16364, %edx - jge ..B1.31 -..B1.6: - cmpl $16308, %edx - jge ..B1.23 -..B1.7: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.77 -..B1.8: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.9: - fldcw 44(%esp) -..B1.10: - movzwl 16(%ebp), %edx - movl $1, %eax - andl $32767, %edx -..B1.11: - testl %edx, %edx - jne ..B1.17 -..B1.12: - cmpl $0, 12(%ebp) - jne ..B1.14 -..B1.13: - cmpl $0, 8(%ebp) - je ..B1.18 -..B1.91: - cmpl $0, 12(%ebp) -..B1.14: - jne ..B1.16 -..B1.15: - cmpl $0, 8(%ebp) - je ..B1.17 -..B1.16: - fldl _smallest_value_64@GOTOFF(%ebx) - fstpl (%esp) -..B1.17: - fldt _small_value_80@GOTOFF(%ebx) - fsubrl _ones@GOTOFF(%ebx) - fstpt 8(%esp) - jmp ..B1.19 -..B1.18: - fldl _ones@GOTOFF(%ebx) - fstpt 8(%esp) -..B1.19: - testl %eax, %eax - je ..B1.21 -..B1.20: - fldcw 46(%esp) -..B1.21: - movl 136(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.76 -..B1.22: - fldt 8(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.79 -..B1.24: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.25: - fldcw 44(%esp) -..B1.26: - movl $1, %eax -..B1.27: - fldt 8(%ebp) - testl %eax, %eax - fldt _CP3@GOTOFF(%ebx) - fmul %st(1), %st - fmulp %st, %st(1) - faddl _ones@GOTOFF(%ebx) - fstpt 8(%esp) - je ..B1.29 -..B1.28: - fldcw 46(%esp) -..B1.29: - movl 136(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.76 -..B1.30: - fldt 8(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.81 -..B1.32: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.33: - fldcw 44(%esp) -..B1.34: - movl $1, %eax -..B1.35: - fldt 8(%ebp) - testl %eax, %eax - fmul %st(0), %st - fldt 12+_CP2@GOTOFF(%ebx) - fmul %st(1), %st - fldt _CP2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddl _ones@GOTOFF(%ebx) - fstpt 8(%esp) - je ..B1.37 -..B1.36: - fldcw 46(%esp) -..B1.37: - movl 136(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.76 -..B1.38: - fldt 8(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.83 -..B1.40: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.41: - fldcw 44(%esp) -..B1.42: - movl $1, %eax -..B1.43: - fldt 8(%ebp) - testl %eax, %eax - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_CP1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_CP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_CP1@GOTOFF(%ebx) - fmulp %st, %st(2) - fldt _CP1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddl _ones@GOTOFF(%ebx) - fstpt 8(%esp) - je ..B1.45 -..B1.44: - fldcw 46(%esp) -..B1.45: - movl 136(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.76 -..B1.46: - fldt 8(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.47: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.86 -..B1.48: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.49: - fldcw 44(%esp) -..B1.50: - movzwl 16(%ebp), %edx - movl $1, %esi - andl $32767, %edx -..B1.51: - cmpl $16413, %edx - jge ..B1.58 -..B1.52: - fldt 8(%ebp) - fldl _Pi4Inv@GOTOFF(%ebx) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fxch %st(1) - fmull _ones@GOTOFF(%ebx,%eax,8) - fmul %st, %st(1) - fxch %st(1) - fstpt 20(%esp) - movzwl 28(%esp), %ecx - andl $32767, %ecx - cmpl $16383, %ecx - jge ..B1.54 -..B1.53: - fldl _TWO_52H@GOTOFF(%ebx) - xorl %eax, %eax - fmul %st(1), %st - fld %st(1) - movl $1, %ecx - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(1) - fsub %st(1), %st - fxch %st(2) - fxch %st(1) - fxch %st(2) - jmp ..B1.69 -..B1.54: - fldl _TWO_32H@GOTOFF(%ebx) - negl %ecx - addl $30, %ecx - movl 24(%esp), %eax - shrl %cl, %eax - lea 1(%eax), %ecx - movl %ecx, %edi - andl $-2, %edi - movl %edi, 8(%esp) - cmpl $16400, %edx - fildl 8(%esp) - jge ..B1.56 -..B1.55: - fldl _Pi04x3@GOTOFF(%ebx) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_Pi04x3@GOTOFF(%ebx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_Pi04x3@GOTOFF(%ebx) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - jmp ..B1.57 -..B1.56: - fldl _Pi04x5@GOTOFF(%ebx) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_Pi04x5@GOTOFF(%ebx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_Pi04x5@GOTOFF(%ebx) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl 24+_Pi04x5@GOTOFF(%ebx) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl 32+_Pi04x5@GOTOFF(%ebx) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) -..B1.57: - fldl _TWO_52H@GOTOFF(%ebx) - addl $3, %eax - fmul %st(1), %st - fld %st(1) - shrl $2, %eax - fadd %st(1), %st - andl $1, %eax - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fxch %st(1) - fxch %st(2) - jmp ..B1.69 -..B1.58: - cmpl $32767, %edx - jne ..B1.67 -..B1.59: - cmpl $-2147483648, 12(%ebp) - jne ..B1.62 -..B1.60: - cmpl $0, 8(%ebp) - jne ..B1.62 -..B1.61: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - fstpt 8(%esp) - jmp ..B1.63 -..B1.62: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ebx) - fstpt 8(%esp) -..B1.63: - testl %esi, %esi - je ..B1.65 -..B1.64: - fldcw 46(%esp) -..B1.65: - movl 136(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.76 -..B1.66: - fldt 8(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.67: - fldt 8(%ebp) - addl $-32, %esp - movzbl 17(%ebp), %eax - lea 152(%esp), %edx - andl $128, %eax - shrl $7, %eax - fmull _ones@GOTOFF(%ebx,%eax,8) - fstpt (%esp) - movl $0, 12(%esp) - movl %edx, 16(%esp) - call __libm_reduce_pi04l -..B1.89: - movl %eax, %ecx - addl $32, %esp -..B1.68: - fldl 120(%esp) - lea 3(%ecx), %eax - fldl _TWO_52H@GOTOFF(%ebx) - incl %ecx - fmul %st(1), %st - fld %st(0) - shrl $2, %eax - fadd %st(2), %st - andl $1, %eax - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddl 128(%esp) - fadd %st, %st(1) -..B1.69: - fldl _TWO_53H@GOTOFF(%ebx) - testb $2, %cl - fstpt 48(%esp) - fld %st(2) - fmul %st(1), %st - fld %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fstpt 80(%esp) - fldt 80(%esp) - fld %st(3) - fmul %st(4), %st - fld %st(0) - fadd %st(2), %st - fstpt 32(%esp) - fldt 32(%esp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fld %st(1) - fmul %st(2), %st - fld %st(0) - faddp %st, %st(2) - fldl _ones@GOTOFF(%ebx,%eax,8) - fstpl 112(%esp) - je ..B1.71 -..B1.70: - fldt 96+_SP@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(6) - fstpt 8(%esp) - fldt 84+_SP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 72+_SP@GOTOFF(%ebx) - faddp %st, %st(7) - fxch %st(2) - fmul %st, %st(6) - fldt 60+_SP@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 48+_SP@GOTOFF(%ebx) - faddp %st, %st(7) - fmul %st, %st(6) - fldt 36+_SP@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 24+_SP@GOTOFF(%ebx) - faddp %st, %st(7) - fmul %st, %st(6) - fldt 12+_SP@GOTOFF(%ebx) - faddp %st, %st(3) - fmulp %st, %st(2) - fldt _SP@GOTOFF(%ebx) - faddp %st, %st(6) - fldt 32(%esp) - fmulp %st, %st(6) - fxch %st(1) - faddp %st, %st(5) - fldt 64(%esp) - fldt 80(%esp) - fldt 120+_SP@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(7) - fxch %st(1) - fmulp %st, %st(2) - fldt 108+_SP@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(1) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(5) - fxch %st(1) - fadd %st(4), %st - fld %st(2) - fldt 48(%esp) - fmul %st(2), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(5) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 8(%esp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fadd %st, %st(1) - fldl 112(%esp) - fmul %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%esp) - jmp ..B1.72 -..B1.71: - fstp %st(3) - fstp %st(3) - fstp %st(3) - fldt 96+_CP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 84+_CP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 72+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 36+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 24+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 12+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt _CP@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 32(%esp) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 64(%esp) - fldt 80(%esp) - fldt 120+_CP@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fldt 108+_CP@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fldt 48(%esp) - fmul %st(1), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(0) - fldl 112(%esp) - fldl _ones@GOTOFF(%ebx) - fadd %st, %st(2) - fsub %st(2), %st - faddp %st, %st(3) - fxch %st(2) - fadd %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%esp) -..B1.72: - testl %esi, %esi - je ..B1.92 -..B1.73: - fstpt 20(%esp) -..B1.90: - fldcw 46(%esp) - jmp ..B1.74 -..B1.92: - fstp %st(0) -..B1.74: - movl 136(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.76 -..B1.75: - fldt 96(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.76: - call __stack_chk_fail@PLT -..B1.77: - xorl %eax, %eax - jmp ..B1.11 -..B1.79: - xorl %eax, %eax - jmp ..B1.27 -..B1.81: - xorl %eax, %eax - jmp ..B1.35 -..B1.83: - xorl %eax, %eax - jmp ..B1.43 -..B1.86: - xorl %esi, %esi - jmp ..B1.51 - .align 16,0x90 - .type cosl,@function - .size cosl,.-cosl - .data -# -- End cosl - .section .rodata, "a" - .align 16 - .align 16 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 16 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .space 8, 0x00 # pad - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_CP3: - .word 0 - .word 65450 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .type _CP3,@object - .size _CP3,12 - .space 4, 0x00 # pad - .align 16 -_CP2: - .word 63855 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 18238 - .word 17476 - .word 43656 - .word 43690 - .word 16378 - .word 0 - .type _CP2,@object - .size _CP2,24 - .space 8, 0x00 # pad - .align 16 -_CP1: - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 47533 - .word 43689 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 14131 - .word 49466 - .word 24756 - .word 46603 - .word 49141 - .word 0 - .word 37142 - .word 18013 - .word 35855 - .word 53259 - .word 16367 - .word 0 - .type _CP1,@object - .size _CP1,48 - .align 16 -_Pi4Inv: - .long 1841940611 - .long 1072979760 - .type _Pi4Inv,@object - .size _Pi4Inv,8 - .space 8, 0x00 # pad - .align 16 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .space 8, 0x00 # pad - .align 16 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .space 8, 0x00 # pad - .align 16 -_Pi04x3: - .long 1413754112 - .long 1072243195 - .long 2563527040 - .long 1021855384 - .long 3417685868 - .long 3118450936 - .type _Pi04x3,@object - .size _Pi04x3,24 - .space 8, 0x00 # pad - .align 16 -_Pi04x5: - .long 1413480448 - .long 1072243195 - .long 442499072 - .long 1036039265 - .long 771751936 - .long 999496074 - .long 622854144 - .long 963347354 - .long 1396597664 - .long 922906692 - .type _Pi04x5,@object - .size _Pi04x5,40 - .space 8, 0x00 # pad - .align 16 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 16 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 16 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .space 8, 0x00 # pad - .align 16 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .type _SP,@object - .size _SP,132 - .space 12, 0x00 # pad - .align 16 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .type _CP,@object - .size _CP,132 - .data - .hidden __libm_reduce_pi04l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cpow.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cpow.S deleted file mode 100644 index 541a0cb524..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cpow.S +++ /dev/null @@ -1,898 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cpow.c" - .text -..TXTST0: -# -- Begin cpowf - .text - .align 16,0x90 - .globl cpowf -cpowf: -# parameter 1: 80 + %esp -# parameter 2: 88 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $72, %esp - flds 80(%esp) - flds 84(%esp) - flds 88(%esp) - flds 92(%esp) - movl %gs:20, %ecx - xorl %esp, %ecx - movl %ecx, 56(%esp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpl 48(%esp) - fxch %st(2) - fstpl 24(%esp) - fstpl 32(%esp) - fstpl 40(%esp) - addl $-48, %esp - movl 72(%esp), %ecx - lea 56(%esp), %eax - movl %eax, (%esp) - lea 4(%esp), %edx - movl 20(%eax), %eax - movl %ecx, (%edx) - movl %eax, 4(%edx) - movl 80(%esp), %ecx - movl 84(%esp), %eax - movl %ecx, 8(%edx) - movl %eax, 12(%edx) - lea 20(%esp), %eax - movl 88(%esp), %edx - movl %edx, (%eax) - movl 92(%esp), %edx - movl %edx, 4(%eax) - movl 96(%esp), %ecx - movl 100(%esp), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call cpow@PLT -..B1.7: - addl $44, %esp -..B1.2: - fldl 8(%esp) - fstps (%esp) - fldl 16(%esp) - fstps 4(%esp) - movl 56(%esp), %ecx - xorl %esp, %ecx - movl (%esp), %eax - movl 4(%esp), %edx - cmpl %gs:20, %ecx - jne ..B1.4 -..B1.3: - addl $72, %esp - popl %ebx - ret -..B1.4: - call __stack_chk_fail@PLT - .align 16,0x90 - .type cpowf,@function - .size cpowf,.-cpowf - .data -# -- End cpowf - .text -# -- Begin cpow - .text - .align 16,0x90 - .globl cpow -cpow: -# parameter 1: 12 + %ebp -# parameter 2: 28 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 224(%esp) - fstl 208(%esp) - fstpl 216(%esp) -..B2.2: - fnstcw 206(%esp) -..B2.3: - movzwl 206(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B2.38 -..B2.4: - orl $-64768, %ecx - movw %cx, 204(%esp) -..B2.5: - fldcw 204(%esp) -..B2.6: - movl $1, %esi -..B2.7: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isnzfinite -..B2.41: - addl $16, %esp -..B2.8: - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - testl %eax, %eax - jne ..B2.31 -..B2.9: - fldl 20(%ebp) - fldl ZEROA@GOTOFF(%ebx) - fucom %st(1) - fnstsw %ax - sahf - jp ..B2.10 - je ..B2.27 -..B2.10: - fldl 28(%ebp) - fucom %st(1) - fnstsw %ax - sahf - jp ..B2.11 - je ..B2.25 -..B2.11: - fxch %st(2) - fucom %st(1) - fnstsw %ax - sahf - jp ..B2.12 - je ..B2.20 -..B2.12: - fstp %st(2) - fldl 36(%ebp) - fucompp - fnstsw %ax - sahf - jp ..B2.13 - je ..B2.19 -..B2.13: - fldl 12(%ebp) - fstpt 36(%esp) - fstpt 48(%esp) - fldt 36(%esp) - fldt 36(%esp) - fmulp %st, %st(1) - fldt 48(%esp) - fldt 48(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 108(%esp) - fldt 108(%esp) - addl $-16, %esp - fstpt (%esp) - call logl@PLT -..B2.49: - addl $16, %esp - fstpt 120(%esp) - fldt 48(%esp) - fldt 36(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2dl@PLT -..B2.48: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - addl $32, %esp - fstpt (%esp) - fldt (%esp) - fxch %st(1) - fstpt 60(%esp) - fldt 120(%esp) - addl $-16, %esp - fldl 28(%ebp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt (%esp) - call expl@PLT -..B2.47: - fldt _LD_PI_DIV_180@GOTOFF(%ebx) - addl $16, %esp - fxch %st(1) - fstpt 156(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 36(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - call expl@PLT -..B2.46: - fldl 36(%ebp) - addl $16, %esp - fxch %st(1) - fstpt 168(%esp) - fldt 156(%esp) - fldt 168(%esp) - fdivrp %st, %st(1) - fstpt 72(%esp) - fldt 120(%esp) - addl $-16, %esp - fldt 16(%esp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt (%esp) - call cosl@PLT -..B2.45: - addl $16, %esp - fstpt 132(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call cosdl@PLT -..B2.44: - addl $16, %esp - fstpt 84(%esp) - fldt 120(%esp) - addl $-16, %esp - fldt 16(%esp) - fmull 36(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - call sinl@PLT -..B2.43: - addl $16, %esp - fstpt 144(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call sindl@PLT -..B2.42: - addl $16, %esp - fstpt 96(%esp) - fldt 132(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - fldt 144(%esp) - fldt 96(%esp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpt 180(%esp) - fldt 144(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - fldt 96(%esp) - fldt 132(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 192(%esp) - fldt 180(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fstpl 208(%esp) - fldt 192(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fstpl 216(%esp) -..B2.14: - testl %esi, %esi - je ..B2.16 -..B2.15: - fldcw 206(%esp) -..B2.16: - movl 208(%esp), %edx - movl %edx, (%edi) - movl 212(%esp), %ecx - movl 216(%esp), %esi - movl 220(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 224(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B2.18 -..B2.17: - movl %edi, %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B2.18: - call __stack_chk_fail@PLT -..B2.19: - fldl 12(%ebp) - fstpt 36(%esp) - fstpt 48(%esp) - fldt 36(%esp) - fldt 36(%esp) - fmulp %st, %st(1) - fldt 48(%esp) - fldt 48(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 108(%esp) - fldt 108(%esp) - addl $-32, %esp - fstpt (%esp) - fldl .L_2il0floatpacket.0@GOTOFF(%ebx) - fmull 28(%ebp) - fstpt 12(%esp) - call powl@PLT -..B2.53: - addl $32, %esp - fstpt 72(%esp) - fldt 48(%esp) - fldt 36(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2dl@PLT -..B2.52: - addl $32, %esp - fstpt 60(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call cosdl@PLT -..B2.51: - addl $16, %esp - fstpt 132(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call sindl@PLT -..B2.50: - addl $16, %esp - fstpt 144(%esp) - fldt 72(%esp) - fldt 132(%esp) - fmulp %st, %st(1) - fstpl 208(%esp) - fldt 72(%esp) - fldt 144(%esp) - fmulp %st, %st(1) - fstpl 216(%esp) - jmp ..B2.14 -..B2.20: - fldl 12(%ebp) - fcom %st(2) - fnstsw %ax - sahf - jbe ..B2.22 -..B2.21: - fstp %st(1) - fstp %st(1) - addl $-32, %esp - fstpt (%esp) - fstpt 12(%esp) - call powl@PLT -..B2.57: - fldl 12(%ebp) - addl $32, %esp - fxch %st(1) - fstpt 72(%esp) - addl $-16, %esp - fstpt (%esp) - call logl@PLT -..B2.56: - addl $16, %esp - fstpt 24(%esp) - fldt 24(%esp) - addl $-16, %esp - fmull 36(%ebp) - fstpt (%esp) - call cosl@PLT -..B2.55: - addl $16, %esp - fstpt 132(%esp) - fldt 24(%esp) - addl $-16, %esp - fmull 36(%ebp) - fstpt (%esp) - call sinl@PLT -..B2.54: - addl $16, %esp - fstpt 144(%esp) - fldt 132(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fstpl 208(%esp) - fldt 144(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fstpl 216(%esp) - jmp ..B2.14 -..B2.22: - fstp %st(3) - fxch %st(1) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B2.24 -..B2.23: - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fchs - fstpt 12(%esp) - fstpt 48(%esp) - fldt 12(%esp) - addl $-16, %esp - fstpt (%esp) - call logl@PLT -..B2.65: - addl $16, %esp - fstpt 120(%esp) - fldt 48(%esp) - fldt 36(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2dl@PLT -..B2.64: - addl $32, %esp - fstpt 60(%esp) - fldt 120(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call expl@PLT -..B2.63: - fldt _LD_PI_DIV_180@GOTOFF(%ebx) - addl $16, %esp - fxch %st(1) - fstpt 156(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 36(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - call expl@PLT -..B2.62: - addl $16, %esp - fstpt 168(%esp) - fldt 156(%esp) - fldt 168(%esp) - fdivrp %st, %st(1) - fstpt 72(%esp) - fldt 120(%esp) - addl $-16, %esp - fmull 36(%ebp) - fstpt (%esp) - call cosl@PLT -..B2.61: - addl $16, %esp - fstpt 132(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call cosdl@PLT -..B2.60: - addl $16, %esp - fstpt 84(%esp) - fldt 120(%esp) - addl $-16, %esp - fmull 36(%ebp) - fstpt (%esp) - call sinl@PLT -..B2.59: - addl $16, %esp - fstpt 144(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call sindl@PLT -..B2.58: - addl $16, %esp - fstpt 96(%esp) - fldt 132(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - fldt 144(%esp) - fldt 96(%esp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpt 180(%esp) - fldt 144(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - fldt 96(%esp) - fldt 132(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 192(%esp) - fldt 180(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fstpl 208(%esp) - fldt 192(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fstpl 216(%esp) - jmp ..B2.14 -..B2.24: - fxch %st(1) - fstpl 208(%esp) - fstpl 216(%esp) - jmp ..B2.14 -..B2.25: - fldl 36(%ebp) - fucomp %st(2) - fnstsw %ax - sahf - jne ..B2.11 - jp ..B2.11 -..B2.26: - fstp %st(0) - fstp %st(0) - fldl 12(%ebp) - fstpt 36(%esp) - fstpt 48(%esp) - fldt 36(%esp) - fldt 36(%esp) - fmulp %st, %st(1) - fldt 48(%esp) - fldt 48(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 108(%esp) - fldt 108(%esp) - addl $-16, %esp - fstpt (%esp) - call logl@PLT -..B2.69: - addl $16, %esp - fstpt 120(%esp) - fldt 48(%esp) - fldt 36(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2l@PLT -..B2.68: - addl $32, %esp - fstpt 60(%esp) - fldt 120(%esp) - fldt 60(%esp) - addl $-16, %esp - faddp %st, %st(1) - fstpt (%esp) - call sinl@PLT -..B2.67: - fldl ZEROA@GOTOFF(%ebx) - fld1 - addl $16, %esp - fstpl 208(%esp) - addl $-16, %esp - fstpl (%esp) - fstpl 8(%esp) - call copysign@PLT -..B2.66: - addl $16, %esp - fstpl 216(%esp) - jmp ..B2.14 -..B2.27: - fldl 36(%ebp) - fucomp %st(1) - fnstsw %ax - sahf - jne ..B2.10 - jp ..B2.10 -..B2.28: - fldl 12(%ebp) - fxch %st(1) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.30 -..B2.29: - fstpt 36(%esp) - fldt 36(%esp) - fchs - fstpt 12(%esp) - fstpt 48(%esp) - fldt 48(%esp) - fldt 36(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2dl@PLT -..B2.73: - fldl 28(%ebp) - addl $32, %esp - fxch %st(1) - fstpt 60(%esp) - fldt 12(%esp) - addl $-32, %esp - fstpt (%esp) - fstpt 12(%esp) - call powl@PLT -..B2.72: - addl $32, %esp - fstpt 72(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call cosdl@PLT -..B2.71: - addl $16, %esp - fstpt 84(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call sindl@PLT -..B2.70: - addl $16, %esp - fstpt 96(%esp) - fldt 72(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - fstpl 208(%esp) - fldt 72(%esp) - fldt 96(%esp) - fmulp %st, %st(1) - fstpl 216(%esp) - jmp ..B2.14 -..B2.30: - fldl 28(%ebp) - addl $-16, %esp - fstpl 8(%esp) - fstpl (%esp) - fstpl 16(%esp) - call pow@PLT -..B2.74: - fldl 16(%esp) - addl $16, %esp - fstpl 216(%esp) - fstpl 208(%esp) - jmp ..B2.14 -..B2.31: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isnzfinite -..B2.75: - addl $16, %esp -..B2.32: - testl %eax, %eax - je ..B2.9 -..B2.33: - fldl 28(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isnzfinite -..B2.76: - addl $16, %esp -..B2.34: - testl %eax, %eax - je ..B2.9 -..B2.35: - fldl 36(%ebp) - addl $-16, %esp - fstpl (%esp) - call __libm_internal_isnzfinite -..B2.77: - addl $16, %esp -..B2.36: - testl %eax, %eax - je ..B2.9 -..B2.37: - fldl 12(%ebp) - fstpt 36(%esp) - fldl 20(%ebp) - fstpt 48(%esp) - fldt 36(%esp) - fldt 36(%esp) - fmulp %st, %st(1) - fldt 48(%esp) - fldt 48(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 108(%esp) - fldt 108(%esp) - addl $-16, %esp - fstpt (%esp) - call logl@PLT -..B2.85: - addl $16, %esp - fstpt 120(%esp) - fldt 48(%esp) - fldt 36(%esp) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - call atan2dl@PLT -..B2.84: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - addl $32, %esp - fstpt (%esp) - fldt (%esp) - fxch %st(1) - fstpt 60(%esp) - fldt 120(%esp) - addl $-16, %esp - fldl 28(%ebp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt (%esp) - call expl@PLT -..B2.83: - fldt _LD_PI_DIV_180@GOTOFF(%ebx) - addl $16, %esp - fxch %st(1) - fstpt 156(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 36(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - call expl@PLT -..B2.82: - fldl 36(%ebp) - addl $16, %esp - fxch %st(1) - fstpt 168(%esp) - fldt 156(%esp) - fldt 168(%esp) - fdivrp %st, %st(1) - fstpt 72(%esp) - fldt 120(%esp) - addl $-16, %esp - fldt 16(%esp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt (%esp) - call cosl@PLT -..B2.81: - addl $16, %esp - fstpt 132(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call cosdl@PLT -..B2.80: - addl $16, %esp - fstpt 84(%esp) - fldt 120(%esp) - addl $-16, %esp - fldt 16(%esp) - fmull 36(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - call sinl@PLT -..B2.79: - addl $16, %esp - fstpt 144(%esp) - fldt 60(%esp) - addl $-16, %esp - fmull 28(%ebp) - fstpt (%esp) - call sindl@PLT -..B2.78: - addl $16, %esp - fstpt 96(%esp) - fldt 132(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - fldt 144(%esp) - fldt 96(%esp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpt 180(%esp) - fldt 144(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - fldt 96(%esp) - fldt 132(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 192(%esp) - fldt 180(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fstpl 208(%esp) - fldt 192(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - fstpl 216(%esp) - jmp ..B2.14 -..B2.38: - xorl %esi, %esi - jmp ..B2.7 - .align 16,0x90 - .type cpow,@function - .size cpow,.-cpow - .data -# -- End cpow - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -ZEROA: - .long 0 - .long 0 - .type ZEROA,@object - .size ZEROA,8 - .space 8, 0x00 # pad - .align 16 -_LD_PI_DIV_180: - .word 51374 - .word 38121 - .word 13586 - .word 36602 - .word 16377 - .word 0 - .type _LD_PI_DIV_180,@object - .size _LD_PI_DIV_180,12 - .space 4, 0x00 # pad - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .hidden __libm_internal_isnzfinite - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cpowl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cpowl.S deleted file mode 100644 index 232f82c9a2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cpowl.S +++ /dev/null @@ -1,190 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cpowl.c" - .text -..TXTST0: -# -- Begin cpowl - .text - .align 16,0x90 - .globl cpowl -cpowl: -# parameter 1: 12 + %ebp -# parameter 2: 36 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $104, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %eax - xorl %esp, %eax - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - movl %eax, 100(%esp) - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) -..B1.2: - fnstcw 2(%esp) -..B1.3: - movzwl 2(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.12 -..B1.4: - orl $-64768, %edx - movw %dx, (%esp) -..B1.5: - fldcw (%esp) -..B1.6: - movl $1, %esi -..B1.7: - addl $-32, %esp - movl 12(%ebp), %ecx - lea 60(%esp), %edx - movl %edx, (%esp) - lea 4(%esp), %eax - movl 16(%ebp), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 20(%ebp), %ecx - movl 24(%ebp), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - movl 28(%ebp), %ecx - movl 32(%ebp), %edx - movl %ecx, 16(%eax) - movl %edx, 20(%eax) - call clogl@PLT -..B1.16: - fldt 36(%ebp) - addl $28, %esp - fld %st(0) - fldt 48(%ebp) - fld %st(0) - fldt 28(%esp) - fmul %st, %st(3) - fmulp %st, %st(2) - fldt 40(%esp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(2) - fstpt 76(%esp) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 88(%esp) - addl $-32, %esp - movl 108(%esp), %ecx - lea 84(%esp), %edx - movl %edx, (%esp) - lea 4(%esp), %eax - movl 28(%edx), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 116(%esp), %ecx - movl 120(%esp), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - movl 124(%esp), %ecx - movl 128(%esp), %edx - movl %ecx, 16(%eax) - movl %edx, 20(%eax) - call cexpl@PLT -..B1.15: - addl $28, %esp - fldt 52(%esp) - testl %esi, %esi - fstpt 4(%esp) - fldt 64(%esp) - fstpt 16(%esp) - je ..B1.9 -..B1.8: - fldcw 2(%esp) -..B1.9: - movl 8(%ebp), %eax - movl 4(%esp), %edx - movl 8(%esp), %ecx - movl 12(%esp), %esi - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl %esi, 8(%eax) - movl 16(%esp), %edx - movl 20(%esp), %ecx - movl 24(%esp), %esi - movl %edx, 12(%eax) - movl %ecx, 16(%eax) - movl %esi, 20(%eax) - movl 100(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.11 -..B1.10: - addl $104, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.11: - call __stack_chk_fail@PLT -..B1.12: - xorl %esi, %esi - jmp ..B1.7 - .align 16,0x90 - .type cpowl,@function - .size cpowl,.-cpowl - .data -# -- End cpowl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cproj.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cproj.S deleted file mode 100644 index 1cff21c17e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cproj.S +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cproj.c" - .text -..TXTST0: -# -- Begin cproj - .text - .align 16,0x90 - .globl cproj -cproj: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp - fldz - movl %gs:20, %ecx - movl 8(%ebp), %eax - xorl %esp, %ecx - movl %ecx, 16(%esp) - movzwl 18(%ebp), %ecx - andl $32752, %ecx - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $32752, %ecx - je ..B1.15 -..B1.2: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - cmpl $32752, %ecx - je ..B1.6 -..B1.3: - fstp %st(0) - movl 12(%ebp), %ecx - movl %ecx, (%eax) - movl 16(%ebp), %ecx - movl %ecx, 4(%eax) - movl 20(%ebp), %ecx - movl %ecx, 8(%eax) - movl 24(%ebp), %ecx - movl %ecx, 12(%eax) - movl 16(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B1.5 -..B1.4: - movl %ebp, %esp - popl %ebp - ret $4 -..B1.5: - movl %edx, %ebx - call __stack_chk_fail@PLT -..B1.6: - testl $1048575, 24(%ebp) - jne ..B1.3 -..B1.7: - cmpl $0, 20(%ebp) - jne ..B1.3 -..B1.8: - fstl 8(%esp) - fstpl (%esp) -..B1.9: - fldl DBL_PINFA@GOTOFF(%edx) - movzbl 27(%ebp), %ecx - testl $128, %ecx - fstpl (%esp) - je ..B1.11 -..B1.10: - fldl DBL_NZEROA@GOTOFF(%edx) - fstpl 8(%esp) - jmp ..B1.12 -..B1.11: - fldl DBL_PZEROA@GOTOFF(%edx) - fstpl 8(%esp) -..B1.12: - movl (%esp), %ecx - movl %ecx, (%eax) - movl 4(%esp), %ecx - movl %ecx, 4(%eax) - movl 8(%esp), %ecx - movl %ecx, 8(%eax) - movl 12(%esp), %ecx - movl %ecx, 12(%eax) - movl 16(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B1.5 - jmp ..B1.4 -..B1.15: - testl $1048575, 16(%ebp) - jne ..B1.2 -..B1.16: - cmpl $0, 12(%ebp) - je ..B1.8 - jmp ..B1.2 - .align 16,0x90 - .type cproj,@function - .size cproj,.-cproj - .data -# -- End cproj - .section .rodata, "a" - .align 16 - .align 16 -DBL_PINFA: - .long 0 - .long 2146435072 - .type DBL_PINFA,@object - .size DBL_PINFA,8 - .space 8, 0x00 # pad - .align 16 -DBL_NZEROA: - .long 0 - .long 2147483648 - .type DBL_NZEROA,@object - .size DBL_NZEROA,8 - .space 8, 0x00 # pad - .align 16 -DBL_PZEROA: - .long 0 - .long 0 - .type DBL_PZEROA,@object - .size DBL_PZEROA,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cprojf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cprojf.S deleted file mode 100644 index 7ad2437823..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cprojf.S +++ /dev/null @@ -1,110 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cprojf.c" - .text -..TXTST0: -# -- Begin cprojf - .text - .align 16,0x90 - .globl cprojf -cprojf: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - movzwl 18(%esp), %eax - andl $32640, %eax - cmpl $32640, %eax - je ..B1.10 -..B1.2: - movzwl 22(%esp), %eax - andl $32640, %eax - cmpl $32640, %eax - je ..B1.4 -..B1.3: - movl 16(%esp), %eax - movl 20(%esp), %edx - addl $12, %esp - ret -..B1.4: - testl $8388607, 20(%esp) - jne ..B1.3 -..B1.5: - xorl %eax, %eax - movl %eax, 4(%esp) - movl %eax, (%esp) -..B1.6: - movzbl 23(%esp), %eax - testl $128, %eax - movl $2139095040, (%esp) - je ..B1.8 -..B1.7: - movl $-2147483648, 4(%esp) - jmp ..B1.9 -..B1.8: - xorl %eax, %eax - movl %eax, 4(%esp) -..B1.9: - movl (%esp), %eax - movl 4(%esp), %edx - addl $12, %esp - ret -..B1.10: - testl $8388607, 16(%esp) - je ..B1.5 - jmp ..B1.2 - .align 16,0x90 - .type cprojf,@function - .size cprojf,.-cprojf - .data -# -- End cprojf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.5: - .long 0x7f800000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,4 - .align 4 -.L_2il0floatpacket.6: - .long 0x80000000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cprojl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cprojl.S deleted file mode 100644 index f04c70da83..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/cprojl.S +++ /dev/null @@ -1,155 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cprojl.c" - .text -..TXTST0: -# -- Begin cprojl - .text - .align 16,0x90 - .globl cprojl -cprojl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %ebx - subl $28, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movzwl 20(%ebp), %ecx - andl $32767, %ecx - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - movl %gs:20, %edx - movl 8(%ebp), %eax - xorl %esp, %edx - movl %edx, 24(%esp) - cmpl $32767, %ecx - movzbl 9+.L_2il0floatpacket.7@GOTOFF(%ebx), %edx - je ..B1.11 -..B1.2: - movzwl 32(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.7 -..B1.3: - fstp %st(0) - fldt 12(%ebp) - fstpt (%esp) - fldt 24(%ebp) - fstpt 12(%esp) -..B1.4: - movl (%esp), %edx - movl 4(%esp), %ecx - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl 8(%esp), %edx - movl 12(%esp), %ecx - movl %edx, 8(%eax) - movl %ecx, 12(%eax) - movl 16(%esp), %edx - movl 20(%esp), %ecx - movl %edx, 16(%eax) - movl %ecx, 20(%eax) - movl 24(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.6 -..B1.5: - addl $28, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret $4 -..B1.6: - call __stack_chk_fail@PLT -..B1.7: - cmpl $-2147483648, 28(%ebp) - jne ..B1.3 -..B1.8: - cmpl $0, 24(%ebp) - jne ..B1.3 -..B1.9: - fstpt 12(%esp) - fldt 12(%esp) - fstpt (%esp) - fldt (%esp) -..B1.10: - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - andl $127, %edx - movzwl 8+.L_2il0floatpacket.8@GOTOFF(%ebx), %ecx - fstpt (%esp) - orl $-32769, %ecx - movw %cx, 8(%esp) - movzbl 33(%ebp), %ecx - andl $-128, %ecx - fstpt 12(%esp) - orl %ecx, %edx - movb %dl, 21(%esp) - jmp ..B1.4 -..B1.11: - cmpl $-2147483648, 16(%ebp) - jne ..B1.2 -..B1.12: - cmpl $0, 12(%ebp) - je ..B1.9 - jmp ..B1.2 - .align 16,0x90 - .type cprojl,@function - .size cprojl,.-cprojl - .data -# -- End cprojl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/creal.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/creal.S deleted file mode 100644 index 4cea6579ee..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/creal.S +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "creal.c" - .text -..TXTST0: -# -- Begin creal - .text - .align 16,0x90 - .globl creal -creal: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - fldl 4(%esp) - ret - .align 16,0x90 - .type creal,@function - .size creal,.-creal - .data -# -- End creal - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/crealf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/crealf.S deleted file mode 100644 index 263d39c9ac..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/crealf.S +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "crealf.c" - .text -..TXTST0: -# -- Begin crealf - .text - .align 16,0x90 - .globl crealf -crealf: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - flds 4(%esp) - ret - .align 16,0x90 - .type crealf,@function - .size crealf,.-crealf - .data -# -- End crealf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/creall.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/creall.S deleted file mode 100644 index a9c3e1b82f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/creall.S +++ /dev/null @@ -1,58 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "creall.c" - .text -..TXTST0: -# -- Begin creall - .text - .align 16,0x90 - .globl creall -creall: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - fldt 4(%esp) - ret - .align 16,0x90 - .type creall,@function - .size creall,.-creall - .data -# -- End creall - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csin.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csin.S deleted file mode 100644 index 2d9cb57967..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csin.S +++ /dev/null @@ -1,237 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csin.c" - .text -..TXTST0: -# -- Begin csin - .text - .align 16,0x90 - .globl csin -csin: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $72, %esp - fldz - fldl 20(%ebp) - fldl 12(%ebp) - movzwl 26(%ebp), %ecx - andl $32752, %ecx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 64(%esp) - cmpl $32752, %ecx - fstpl 56(%esp) - fxch %st(1) - fstl 16(%esp) - fstl 24(%esp) - fstl 32(%esp) - fstpl 40(%esp) - fstpl 48(%esp) - jl ..B1.4 -..B1.2: - testl $1048575, 24(%ebp) - jne ..B1.5 -..B1.3: - cmpl $0, 20(%ebp) - jne ..B1.5 -..B1.4: - movzbl 27(%ebp), %edx - notl %edx - movzbl 55(%esp), %ecx - andl $128, %edx - andl $127, %ecx - orl %edx, %ecx - movb %cl, 55(%esp) -..B1.5: - addl $-32, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea 32(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl 48(%ecx), %ecx - movl %ecx, (%edx) - movl 84(%esp), %ecx - movl %ecx, 4(%edx) - movl 88(%esp), %ecx - movl %ecx, 8(%edx) - movl 92(%esp), %ecx - movl %ecx, 12(%edx) - call csinh@PLT -..B1.14: - addl $28, %esp - fldl (%esp) - movzwl 6(%esp), %edx - andl $32752, %edx - fstl 16(%esp) - cmpl $32752, %edx - fstpl 40(%esp) - fldl 8(%esp) - fstl 24(%esp) - fstpl 32(%esp) - jl ..B1.8 -..B1.6: - testl $1048575, 20(%esp) - jne ..B1.9 -..B1.7: - cmpl $0, 16(%esp) - jne ..B1.9 -..B1.8: - movzbl 23(%esp), %edx - notl %edx - movzbl 47(%esp), %ecx - andl $128, %edx - andl $127, %ecx - orl %edx, %ecx - movb %cl, 47(%esp) -..B1.9: - movl 32(%esp), %edx - movl %edx, (%esi) - movl 40(%esp), %edx - movl %edx, 8(%esi) - movl 36(%esp), %ecx - movl 44(%esp), %edx - movl %ecx, 4(%esi) - movl %edx, 12(%esi) - movl 64(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.11 -..B1.10: - movl %esi, %eax - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.11: - call __stack_chk_fail@PLT - .align 16,0x90 - .type csin,@function - .size csin,.-csin - .data -# -- End csin - .text -# -- Begin csinf - .text - .align 16,0x90 - .globl csinf -csinf: -# parameter 1: 48 + %esp -..B2.1: -..L3: - - pushl %ebx - subl $40, %esp - xorl %eax, %eax - movl %eax, 16(%esp) - movl %eax, 20(%esp) - movl %eax, 24(%esp) - movl %eax, 28(%esp) - movzwl 54(%esp), %eax - andl $32640, %eax - movl 52(%esp), %edx - cmpl $32640, %eax - movl 48(%esp), %ecx - movl %edx, 32(%esp) - movl %ecx, 36(%esp) - jl ..B2.3 -..B2.2: - testl $8388607, 52(%esp) - jne ..B2.4 -..B2.3: - movzbl 55(%esp), %eax - notl %eax - movzbl 35(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 35(%esp) -..B2.4: - addl $8, %esp - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - pushl 28(%esp) - pushl 28(%esp) - call csinhf@PLT -..B2.10: - movl %eax, 16(%esp) - movl %eax, 28(%esp) - shrl $16, %eax - andl $32640, %eax - cmpl $32640, %eax - movl %edx, 20(%esp) - movl %edx, 24(%esp) - jl ..B2.6 -..B2.5: - testl $8388607, 16(%esp) - jne ..B2.7 -..B2.6: - movzbl 19(%esp), %eax - notl %eax - movzbl 31(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 31(%esp) -..B2.7: - movl 24(%esp), %eax - movl 28(%esp), %edx - addl $40, %esp - popl %ebx - ret - .align 16,0x90 - .type csinf,@function - .size csinf,.-csinf - .data -# -- End csinf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinh.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinh.S deleted file mode 100644 index ff2ae257ef..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinh.S +++ /dev/null @@ -1,408 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csinh.c" - .text -..TXTST0: -# -- Begin csinh - .text - .align 16,0x90 - .globl csinh -csinh: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 88(%esp) - fstl 72(%esp) - fstpl 80(%esp) -..B1.2: - fnstcw 62(%esp) -..B1.3: - movzwl 18(%ebp), %esi - andl $32752, %esi - shrl $4, %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %esi - jge ..B1.19 -..B1.4: - testl %esi, %esi - jle ..B1.56 -..B1.5: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $2047, %ecx - jge ..B1.20 -..B1.6: - testl %ecx, %ecx - jle ..B1.54 -..B1.7: - cmpl $1034, %esi - jl ..B1.11 -..B1.8: - fldl _DBL_MAX_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 8(%esp) - fldl 20(%ebp) - fstl (%esp) - addl $-16, %esp - fstpl (%esp) - movl %ecx, 32(%esp) - call cos@PLT -..B1.62: - movl 32(%esp), %ecx - addl $16, %esp - testl %ecx, %ecx - fmull 8(%esp) - fmull 12(%ebp) - fstpl 72(%esp) - jle ..B1.10 -..B1.9: - addl $-16, %esp - fldl 16(%esp) - fstpl (%esp) - call sin@PLT -..B1.63: - addl $16, %esp - fldl 8(%esp) - fmulp %st, %st(1) - fstpl 80(%esp) - jmp ..B1.44 -..B1.10: - fldl 8(%esp) - fmull (%esp) - fstpl 80(%esp) - jmp ..B1.44 -..B1.11: - movzwl 62(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.53 -..B1.12: - orl $-64768, %ecx - movw %cx, 60(%esp) -..B1.13: - fldcw 60(%esp) -..B1.14: - movl $1, 56(%esp) -..B1.15: - fldl 12(%ebp) - fstpl 48(%esp) - addl $-32, %esp - fldl 20(%ebp) - lea 32(%esp), %edx - lea 44(%esp), %ecx - fstpt (%esp) - movl %edx, 12(%esp) - movl %ecx, 16(%esp) - call sincosl@PLT -..B1.16: - fldl 80(%esp) - lea 56(%esp), %edx - lea 68(%esp), %ecx - fstpt (%esp) - movl %edx, 12(%esp) - movl %ecx, 16(%esp) - call sinhcoshl@PLT -..B1.65: - addl $32, %esp -..B1.17: - fldt 24(%esp) - fldt 12(%esp) - fmulp %st, %st(1) - fstpl 72(%esp) - fldt 36(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpl 80(%esp) - cmpl $0, 56(%esp) - je ..B1.44 -..B1.18: - fldcw 62(%esp) - jmp ..B1.44 -..B1.19: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx -..B1.20: - testl %ecx, %ecx - jne ..B1.24 -..B1.21: - testl $1048575, 24(%ebp) - jne ..B1.24 -..B1.22: - cmpl $0, 20(%ebp) - jne ..B1.24 -..B1.23: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call sinh@PLT -..B1.66: - fldl 20(%ebp) - addl $16, %esp - fstpl 80(%esp) - fstpl 72(%esp) - jmp ..B1.44 -..B1.24: - cmpl $2047, %ecx - jge ..B1.38 -..B1.25: - movl 16(%ebp), %edx - andl $1048575, %edx - testl %esi, %esi - jne ..B1.32 -..B1.26: - testl %edx, %edx - jne ..B1.37 -..B1.27: - cmpl $0, 12(%ebp) - jne ..B1.33 -..B1.28: - fldl 20(%ebp) - addl $-16, %esp - fstl (%esp) - fstpl 16(%esp) - movl %ecx, 32(%esp) - call cos@PLT -..B1.67: - fldl 16(%esp) - fxch %st(1) - fmull 12(%ebp) - movl 32(%esp), %ecx - addl $16, %esp - fstpl 72(%esp) - testl %ecx, %ecx - jle ..B1.31 -..B1.29: - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.68: - addl $16, %esp -..B1.31: - fldl _DBL_MAX_NORMAL@GOTOFF(%ebx) - fxch %st(1) - fstpl 80(%esp) - fsubl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fstpl 64(%esp) - jmp ..B1.44 -..B1.32: - testl %edx, %edx - jne ..B1.37 -..B1.73: - cmpl $0, 12(%ebp) -..B1.33: - jne ..B1.37 -..B1.34: - fldl 12(%ebp) - cmpl $1023, %ecx - fstl 16(%esp) - fmul %st(0), %st - fstpl 24(%esp) - jge ..B1.36 -..B1.35: - fldl 16(%esp) - fstpl 72(%esp) - fldl 24(%esp) - fmull 20(%ebp) - fstpl 80(%esp) - jmp ..B1.44 -..B1.36: - fldl 20(%ebp) - fstl 8(%esp) - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.70: - addl $16, %esp - fstpl (%esp) - addl $-16, %esp - fldl 24(%esp) - fstpl (%esp) - call cos@PLT -..B1.69: - addl $16, %esp - fldl 16(%esp) - fmulp %st, %st(1) - fstpl 72(%esp) - fldl 24(%esp) - fmull (%esp) - fstpl 80(%esp) - jmp ..B1.44 -..B1.37: - fldl 12(%ebp) - fmul %st(0), %st - fstl 72(%esp) - fstpl 80(%esp) - jmp ..B1.44 -..B1.38: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.71: - addl $16, %esp - fstl 80(%esp) - cmpl $2047, %esi - je ..B1.42 -..B1.39: - testl %esi, %esi - jne ..B1.43 -..B1.40: - testl $1048575, 16(%ebp) - jne ..B1.43 -..B1.41: - cmpl $0, 12(%ebp) - jne ..B1.43 -..B1.42: - fstp %st(0) - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call sinh@PLT -..B1.72: - addl $16, %esp - fstpl 72(%esp) - jmp ..B1.44 -..B1.43: - fldl 12(%ebp) - fmulp %st, %st(1) - fstpl 72(%esp) -..B1.44: - movzwl 78(%esp), %edx - testl $32752, %edx - jne ..B1.47 -..B1.45: - testl $1048575, 76(%esp) - jne ..B1.50 -..B1.46: - cmpl $0, 72(%esp) - jne ..B1.50 -..B1.47: - movzwl 86(%esp), %edx - testl $32752, %edx - jne ..B1.51 -..B1.48: - testl $1048575, 84(%esp) - jne ..B1.50 -..B1.49: - cmpl $0, 80(%esp) - je ..B1.51 -..B1.50: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 64(%esp) -..B1.51: - movl 72(%esp), %edx - movl %edx, (%edi) - movl 76(%esp), %ecx - movl 80(%esp), %esi - movl 84(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 88(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.59 -..B1.52: - movl %edi, %eax - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.53: - movl $0, 56(%esp) - jmp ..B1.15 -..B1.54: - testl $1048575, 24(%ebp) - jne ..B1.7 -..B1.55: - cmpl $0, 20(%ebp) - jne ..B1.7 - jmp ..B1.20 -..B1.56: - testl $1048575, 16(%ebp) - jne ..B1.5 -..B1.57: - cmpl $0, 12(%ebp) - jne ..B1.5 - jmp ..B1.19 -..B1.59: - call __stack_chk_fail@PLT - .align 16,0x90 - .type csinh,@function - .size csinh,.-csinh - .data -# -- End csinh - .section .rodata, "a" - .align 16 - .align 16 -_DBL_MAX_NORMAL: - .long -1 - .long 2146435071 - .type _DBL_MAX_NORMAL,@object - .size _DBL_MAX_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinhf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinhf.S deleted file mode 100644 index e646fcc0d2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinhf.S +++ /dev/null @@ -1,368 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csinhf.c" - .text -..TXTST0: -# -- Begin csinhf - .text - .align 16,0x90 - .globl csinhf -csinhf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - xorl %ecx, %ecx - movl %ecx, 48(%esp) - movl %ecx, 52(%esp) -..B1.2: - fnstcw 38(%esp) -..B1.3: - movzwl 10(%ebp), %esi - andl $32640, %esi - shrl $7, %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $255, %esi - jge ..B1.18 -..B1.4: - testl %esi, %esi - jle ..B1.47 -..B1.5: - movzwl 14(%ebp), %edi - andl $32640, %edi - shrl $7, %edi - cmpl $255, %edi - jge ..B1.19 -..B1.6: - testl %edi, %edi - jle ..B1.46 -..B1.7: - cmpl $138, %esi - jl ..B1.11 -..B1.8: - fldl _DBL_MAX_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl (%esp) - flds 12(%ebp) - fsts 8(%esp) - addl $-16, %esp - fstps (%esp) - call cosf@PLT -..B1.51: - addl $16, %esp - fmull (%esp) - testl %edi, %edi - fmuls 8(%ebp) - fstps 48(%esp) - jle ..B1.10 -..B1.9: - addl $-16, %esp - flds 24(%esp) - fstps (%esp) - call sinf@PLT -..B1.52: - addl $16, %esp - fldl (%esp) - fmulp %st, %st(1) - fstps 52(%esp) - jmp ..B1.39 -..B1.10: - fldl (%esp) - fmuls 8(%esp) - fstps 52(%esp) - jmp ..B1.39 -..B1.11: - movzwl 38(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.12: - orl $-64768, %edx - movw %dx, 36(%esp) -..B1.13: - fldcw 36(%esp) -..B1.14: - movl $1, %esi -..B1.15: - flds 8(%ebp) - fstps 32(%esp) - flds 12(%ebp) - fsts 24(%esp) - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.55: - addl $16, %esp - fstpl 16(%esp) - addl $-16, %esp - flds 40(%esp) - fstpl (%esp) - call cos@PLT -..B1.54: - addl $16, %esp - fstpl 24(%esp) - addl $-16, %esp - flds 48(%esp) - lea 16(%esp), %eax - lea 24(%esp), %edx - fstpl (%esp) - movl %eax, 8(%esp) - movl %edx, 12(%esp) - call sinhcosh@PLT -..B1.53: - addl $16, %esp -..B1.16: - fldl (%esp) - testl %esi, %esi - fmull 24(%esp) - fstps 48(%esp) - fldl 8(%esp) - fmull 16(%esp) - fstps 52(%esp) - je ..B1.39 -..B1.17: - fldcw 38(%esp) - jmp ..B1.39 -..B1.18: - movzwl 14(%ebp), %edi - andl $32640, %edi - shrl $7, %edi -..B1.19: - testl %edi, %edi - jne ..B1.22 -..B1.20: - testl $8388607, 12(%ebp) - jne ..B1.22 -..B1.21: - addl $-16, %esp - movl 8(%ebp), %eax - movl %eax, (%esp) - call sinhf@PLT -..B1.56: - movl 12(%ebp), %eax - addl $16, %esp - fstps 48(%esp) - movl %eax, 52(%esp) - jmp ..B1.39 -..B1.22: - cmpl $255, %edi - jge ..B1.34 -..B1.23: - movl 8(%ebp), %eax - andl $8388607, %eax - testl %esi, %esi - jne ..B1.63 -..B1.24: - testl %eax, %eax - jne ..B1.29 -..B1.25: - flds 12(%ebp) - addl $-16, %esp - fsts (%esp) - fstps 16(%esp) - call cosf@PLT -..B1.57: - flds 16(%esp) - addl $16, %esp - fxch %st(1) - fmuls 8(%ebp) - testl %edi, %edi - fstps 48(%esp) - jle ..B1.28 -..B1.26: - addl $-16, %esp - fstps (%esp) - call sinf@PLT -..B1.58: - addl $16, %esp -..B1.28: - fldl _DBL_MAX_NORMAL@GOTOFF(%ebx) - fxch %st(1) - fstps 52(%esp) - fsubl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fstpl 40(%esp) - jmp ..B1.39 -..B1.63: - testl %eax, %eax -..B1.29: - flds 8(%ebp) - jne ..B1.33 -..B1.30: - fld %st(0) - cmpl $127, %edi - fmul %st(1), %st - fstps 8(%esp) - jge ..B1.32 -..B1.31: - flds 8(%esp) - fxch %st(1) - fstps 48(%esp) - fmuls 12(%ebp) - fstps 52(%esp) - jmp ..B1.39 -..B1.32: - addl $-16, %esp - movl 12(%ebp), %esi - movl %esi, (%esp) - fstps 20(%esp) - call sinf@PLT -..B1.60: - flds 20(%esp) - addl $16, %esp - fxch %st(1) - fstps (%esp) - addl $-16, %esp - movl %esi, (%esp) - fstps 20(%esp) - call cosf@PLT -..B1.59: - flds 20(%esp) - addl $16, %esp - fmulp %st, %st(1) - fstps 48(%esp) - flds 8(%esp) - fmuls (%esp) - fstps 52(%esp) - jmp ..B1.39 -..B1.33: - fmul %st(0), %st - fsts 48(%esp) - fstps 52(%esp) - jmp ..B1.39 -..B1.34: - addl $-16, %esp - movl 12(%ebp), %eax - movl %eax, (%esp) - call sinf@PLT -..B1.61: - addl $16, %esp - fsts 52(%esp) - cmpl $255, %esi - je ..B1.37 -..B1.35: - testl %esi, %esi - jne ..B1.38 -..B1.36: - testl $8388607, 8(%ebp) - jne ..B1.38 -..B1.37: - fstp %st(0) - addl $-16, %esp - movl 8(%ebp), %eax - movl %eax, (%esp) - call sinhf@PLT -..B1.62: - addl $16, %esp - fstps 48(%esp) - jmp ..B1.39 -..B1.38: - flds 8(%ebp) - fmulp %st, %st(1) - fstps 48(%esp) -..B1.39: - movzwl 50(%esp), %eax - testl $32640, %eax - jne ..B1.41 -..B1.40: - testl $8388607, 48(%esp) - jne ..B1.43 -..B1.41: - movzwl 54(%esp), %eax - testl $32640, %eax - jne ..B1.44 -..B1.42: - testl $8388607, 52(%esp) - je ..B1.44 -..B1.43: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 40(%esp) -..B1.44: - movl 48(%esp), %eax - movl 52(%esp), %edx - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - movl %ecx, %esi - jmp ..B1.15 -..B1.46: - testl $8388607, 12(%ebp) - jne ..B1.7 - jmp ..B1.19 -..B1.47: - testl $8388607, 8(%ebp) - jne ..B1.5 - jmp ..B1.18 - .align 16,0x90 - .type csinhf,@function - .size csinhf,.-csinhf - .data -# -- End csinhf - .section .rodata, "a" - .align 16 - .align 16 -_DBL_MAX_NORMAL: - .long -1 - .long 2146435071 - .type _DBL_MAX_NORMAL,@object - .size _DBL_MAX_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinhl.S deleted file mode 100644 index 9a215bb5b3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinhl.S +++ /dev/null @@ -1,655 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csinhl.c" - .text -..TXTST0: -# -- Begin csinhl - .text - .align 16,0x90 - .globl csinhl -csinhl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $308, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - movl %edx, 244(%esp) - fstpt 112(%esp) - fldt 112(%esp) - fstpt 220(%esp) - fldt 220(%esp) - fstpt 232(%esp) -..B1.2: - fnstcw 62(%esp) -..B1.3: - movzwl 62(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.59 -..B1.4: - orl $-64768, %ecx - movw %cx, 60(%esp) -..B1.5: - fldcw 60(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 20(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.33 -..B1.8: - testl %edx, %edx - jle ..B1.52 -..B1.9: - movzwl 32(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - jge ..B1.33 -..B1.10: - testl %ecx, %ecx - jle ..B1.50 -..B1.11: - cmpl $16398, %edx - jl ..B1.19 -..B1.12: - fldt _CONSTANTS@GOTOFF(%ebx) - fmul %st(0), %st - fldt 12(%ebp) - fmul %st(1), %st - fstpt (%esp) - fldt 24(%ebp) - fstpt 16(%esp) - fldt 16(%esp) - addl $-16, %esp - fstpt (%esp) - fstpt 48(%esp) - movl %ecx, 28(%esp) - call cosl@PLT -..B1.62: - fldt 48(%esp) - movl 28(%esp), %ecx - addl $16, %esp - fldt (%esp) - testl %ecx, %ecx - fmulp %st, %st(2) - fxch %st(1) - fstpt 220(%esp) - jle ..B1.14 -..B1.13: - addl $-16, %esp - fldt 32(%esp) - fstpt (%esp) - fstpt 48(%esp) - call sinl@PLT -..B1.63: - fldt 48(%esp) - addl $16, %esp - fmulp %st, %st(1) - jmp ..B1.15 -..B1.14: - fldt 16(%esp) - fmulp %st, %st(1) -..B1.15: - fstpt 232(%esp) - testl %edi, %edi - je ..B1.17 -..B1.16: - fldcw 62(%esp) -..B1.17: - movl 220(%esp), %edx - movl %edx, (%esi) - movl 232(%esp), %edx - movl %edx, 12(%esi) - movl 236(%esp), %edx - movl %edx, 16(%esi) - movl 224(%esp), %ecx - movl 228(%esp), %edi - movl 240(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 244(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.49 -..B1.18: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.19: - fldt 12(%ebp) - addl $-16, %esp - lea 164(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - call __libm_coshl_k80 -..B1.64: - addl $16, %esp -..B1.20: - fldt 36+_CONSTANTS@GOTOFF(%ebx) - movzwl 20(%ebp), %ecx - fadd %st, %st(1) - fxch %st(1) - fstpt (%esp) - andl $32767, %ecx - fldt 148(%esp) - cmpl $16183, %ecx - fld %st(0) - fldt 160(%esp) - movl (%esp), %edx - fadd %st, %st(1) - fld %st(1) - fxch %st(2) - fsub %st, %st(3) - movl %edx, 28(%esp) - fxch %st(3) - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - fld %st(0) - fmul %st(4), %st - fsub %st, %st(3) - fsubp %st, %st(3) - fxch %st(2) - fstpt 16(%esp) - fldt 16(%esp) - fsubrp %st, %st(3) - faddp %st, %st(2) - jge ..B1.22 -..B1.21: - fstp %st(2) - fldt 12(%ebp) - lea 184(%esp), %eax - fldt 24+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt -12(%eax) - fldt -72(%eax) - movzwl -4(%eax), %ecx - movl %ecx, %edx - andl $32767, %edx - andl $-32768, %ecx - addl $-16639, %edx - orl $-49153, %ecx - fstpt (%eax) - movl %edx, 44(%esp) - movw %cx, -4(%eax) - jmp ..B1.24 -..B1.22: - fldt 12(%ebp) - addl $-16, %esp - lea 188(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - fxch %st(2) - fstpt 16(%esp) - fstpt 48(%esp) - fstpt -124(%edx) - call __libm_sinhl_k80 -..B1.65: - fldt 64(%esp) - fldt 48(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.23: - faddp %st, %st(3) - fxch %st(2) - fstpt (%esp) - lea 184(%esp), %eax - movl (%esp), %edx - movl %edx, 44(%esp) - fxch %st(1) -..B1.24: - fldt 172(%esp) - fld %st(0) - fld %st(3) - fldt (%eax) - fadd %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fsubr %st(1), %st - fsubrp %st, %st(1) - fstpt 64(%esp) - fldt 64(%esp) - addl $-16, %esp - fxch %st(2) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt 24(%ebp) - fstpt (%esp) - lea 212(%esp), %edx - movl %edx, 12(%esp) - fstpt -100(%edx) - fstpt 48(%esp) - fstpt 64(%esp) - call __libm_cosl_k80 -..B1.66: - fldt 64(%esp) - fxch %st(1) - fstpt 96(%esp) - fldt 48(%esp) - fldt 112(%esp) - addl $16, %esp -..B1.25: - fldt 196(%esp) - fld %st(0) - fldt 208(%esp) - movzwl 32(%ebp), %edx - fadd %st, %st(1) - fld %st(1) - andl $32767, %edx - cmpl $16183, %edx - fxch %st(2) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fld %st(5) - fmul %st(3), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 80(%esp) - fmul %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%esp) - fldt 12+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(1) - jge ..B1.27 -..B1.26: - fldt 24(%ebp) - fldt 24+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 124(%esp) - fldt 112(%esp) - movzwl 132(%esp), %ecx - movl %ecx, %edx - andl $-32768, %ecx - andl $32767, %edx - orl $-49153, %ecx - addl $-16639, %edx - movw %cx, 132(%esp) - fstpt 136(%esp) - fldt 124(%esp) - movl %edx, 12(%esp) - jmp ..B1.29 -..B1.27: - fldt 24(%ebp) - addl $-16, %esp - lea 140(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - fxch %st(1) - fstpt -28(%edx) - fstpt 16(%esp) - fstpt -92(%edx) - fstpt -76(%edx) - call __libm_sinl_k80 -..B1.67: - fldt 64(%esp) - fldt 48(%esp) - fldt 16(%esp) - fldt 112(%esp) - addl $16, %esp -..B1.28: - fldt 124(%esp) - fmul %st(5), %st - fstpt 124(%esp) - fldt 124(%esp) - fldt 136(%esp) - fmulp %st, %st(6) - fxch %st(5) - fstpt 112(%esp) - fldt 112(%esp) - fstpt 136(%esp) - movl $0, 12(%esp) - fxch %st(2) - fxch %st(3) - fxch %st(4) -..B1.29: - fldt 112(%esp) - fld %st(1) - fadd %st(1), %st - fmul %st, %st(6) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fsubr %st(6), %st - fsubrp %st, %st(6) - fxch %st(1) - fsub %st(5), %st - faddp %st, %st(1) - fstpt (%esp) - fld %st(1) - fldt 64(%esp) - fld %st(0) - fmul %st(3), %st - fxch %st(4) - fmulp %st, %st(3) - fldt 80(%esp) - addl $-32, %esp - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl 76(%esp), %edx - movl %edx, 24(%esp) - fstpt 64(%esp) - fstpt 80(%esp) - call __libm_scalbl_k80 -..B1.68: - fldt 80(%esp) - fldt 64(%esp) - addl $32, %esp -..B1.30: - fldt 16(%esp) - fld %st(0) - fmul %st(3), %st - fld %st(2) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(4) - fstpt 220(%esp) - fldt (%esp) - addl $-32, %esp - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl 60(%esp), %edx - addl 44(%esp), %edx - movl %edx, 24(%esp) - call __libm_scalbl_k80 -..B1.69: - addl $32, %esp -..B1.31: - fstpt 232(%esp) - jmp ..B1.45 -..B1.33: - movl 28(%ebp), %ecx -..B1.34: - testl %ecx, %ecx - jne ..B1.37 -..B1.78: - cmpl $0, 24(%ebp) -..B1.35: - jne ..B1.37 -..B1.36: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call sinhl@PLT -..B1.70: - fldt 24(%ebp) - addl $16, %esp - fstpt 232(%esp) - fstpt 220(%esp) - jmp ..B1.45 -..B1.37: - movzwl 32(%ebp), %ecx - andl $32767, %ecx - movl %ecx, 12(%esp) - cmpl $32767, %ecx - jge ..B1.40 -..B1.38: - fldt 12(%ebp) - fstpt 32(%esp) - fldt 32(%esp) - addl $-16, %esp - fstpt (%esp) - call sinhl@PLT -..B1.72: - fstpt 16(%esp) - addl $16, %esp - fldt 24(%ebp) - fstpt 16(%esp) - fldt 16(%esp) - addl $-16, %esp - fstpt (%esp) - call cosl@PLT -..B1.71: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpt 220(%esp) - cmpl $0, 12(%esp) - jle ..B1.55 -..B1.39: - addl $-16, %esp - fldt 48(%esp) - fstpt (%esp) - call coshl@PLT -..B1.74: - fstpt 16(%esp) - fldt 32(%esp) - fstpt (%esp) - call sinl@PLT -..B1.73: - addl $16, %esp - fldt (%esp) - fmulp %st, %st(1) - fstpt 232(%esp) - jmp ..B1.45 -..B1.40: - fldt 24(%ebp) - addl $-16, %esp - fstpt (%esp) - movl %edx, 16(%esp) - call sinl@PLT -..B1.75: - movl 16(%esp), %edx - addl $16, %esp - fstpt 232(%esp) - fldt 232(%esp) - cmpl $32767, %edx - je ..B1.43 -..B1.41: - cmpl $0, 16(%ebp) - jne ..B1.44 -..B1.42: - cmpl $0, 12(%ebp) - jne ..B1.44 -..B1.43: - fstp %st(0) - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call sinhl@PLT -..B1.76: - addl $16, %esp - fstpt 220(%esp) - jmp ..B1.45 -..B1.44: - fldt 12(%ebp) - fmulp %st, %st(1) - fstpt 220(%esp) -..B1.45: - testl %edi, %edi - je ..B1.47 -..B1.46: - fldcw 62(%esp) -..B1.47: - movl 220(%esp), %edx - movl %edx, (%esi) - movl 232(%esp), %edx - movl %edx, 12(%esi) - movl 236(%esp), %edx - movl %edx, 16(%esi) - movl 224(%esp), %ecx - movl 228(%esp), %edi - movl 240(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 244(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.49 -..B1.48: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.49: - call __stack_chk_fail@PLT -..B1.50: - cmpl $0, 28(%ebp) - jne ..B1.11 -..B1.51: - cmpl $0, 24(%ebp) - jne ..B1.11 - jmp ..B1.35 -..B1.52: - cmpl $0, 16(%ebp) - jne ..B1.9 -..B1.53: - cmpl $0, 12(%ebp) - jne ..B1.9 - jmp ..B1.33 -..B1.55: - cmpl $0, 16(%ebp) - jne ..B1.57 -..B1.56: - cmpl $0, 12(%ebp) - je ..B1.39 -..B1.57: - addl $-16, %esp - fldt 48(%esp) - fstpt (%esp) - call coshl@PLT -..B1.77: - addl $16, %esp - fldt 16(%esp) - fmulp %st, %st(1) - fstpt 232(%esp) - jmp ..B1.45 -..B1.59: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type csinhl,@function - .size csinhl,.-csinhl - .data -# -- End csinhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,12 - .space 4, 0x00 # pad - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,48 - .data - .hidden __libm_sinl_k80 - .hidden __libm_cosl_k80 - .hidden __libm_sinhl_k80 - .hidden __libm_coshl_k80 - .hidden __libm_scalbl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinl.S deleted file mode 100644 index 5b9c99558e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csinl.S +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csinl.c" - .text -..TXTST0: -# -- Begin csinl - .text - .align 16,0x90 - .globl csinl -csinl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 100(%esp) - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - fldt 28(%esp) - fstpt 40(%esp) - fldt 40(%esp) - fstpt 52(%esp) - fldt 52(%esp) - fstpt 64(%esp) -..B1.2: - fnstcw 2(%esp) -..B1.3: - movzwl 2(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.20 -..B1.4: - orl $-64768, %ecx - movw %cx, (%esp) -..B1.5: - fldcw (%esp) -..B1.6: - movl $1, %edi -..B1.7: - fldt 24(%ebp) - movzwl 32(%ebp), %edx - andl $32767, %edx - fstpt 52(%esp) - cmpl $32767, %edx - fldt 12(%ebp) - fstpt 64(%esp) - jl ..B1.10 -..B1.8: - cmpl $-2147483648, 28(%ebp) - jne ..B1.11 -..B1.9: - cmpl $0, 24(%ebp) - jne ..B1.11 -..B1.10: - movzbl 33(%ebp), %ecx - notl %ecx - movzbl 61(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 61(%esp) -..B1.11: - addl $-32, %esp - lea 108(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl -24(%ecx), %ecx - movl %ecx, (%edx) - movl 88(%esp), %ecx - movl %ecx, 4(%edx) - movl 92(%esp), %ecx - movl %ecx, 8(%edx) - movl 96(%esp), %ecx - movl %ecx, 12(%edx) - movl 100(%esp), %ecx - movl %ecx, 16(%edx) - movl 104(%esp), %ecx - movl %ecx, 20(%edx) - call csinhl@PLT -..B1.23: - addl $28, %esp - fldt 76(%esp) - movzwl 84(%esp), %edx - andl $32767, %edx - fstpt 4(%esp) - fldt 4(%esp) - cmpl $32767, %edx - fstpt 40(%esp) - fldt 88(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - jl ..B1.14 -..B1.12: - cmpl $-2147483648, 8(%esp) - jne ..B1.15 -..B1.13: - cmpl $0, 4(%esp) - jne ..B1.15 -..B1.14: - movzbl 13(%esp), %ecx - notl %ecx - movzbl 49(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 49(%esp) -..B1.15: - testl %edi, %edi - je ..B1.17 -..B1.16: - fldcw 2(%esp) -..B1.17: - movl 28(%esp), %edx - movl %edx, (%esi) - movl 40(%esp), %edx - movl %edx, 12(%esi) - movl 44(%esp), %edx - movl %edx, 16(%esi) - movl 32(%esp), %ecx - movl 36(%esp), %edi - movl 48(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 100(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.19 -..B1.18: - movl %esi, %eax - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.19: - call __stack_chk_fail@PLT -..B1.20: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type csinl,@function - .size csinl,.-csinl - .data -# -- End csinl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrt_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrt_wmt.S deleted file mode 100644 index fff8343914..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrt_wmt.S +++ /dev/null @@ -1,763 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csqrt_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin csqrt - .text - .align 16,0x90 - .globl csqrt -csqrt: -# parameter 1: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $184, %esp - movl %esi, 128(%esp) - call static_func - movl %eax, %esi - movl 192(%esp), %edx - movsd 196(%esp), %xmm0 - movsd 204(%esp), %xmm1 - movl %edx, (%esp) - movsd %xmm0, 16(%esp) - movsd %xmm1, 24(%esp) - lea 16(%esp), %ecx - movq (%esi), %xmm2 - movl %edx, (%esp) - movl %ebx, 40(%esp) - movl %ecx, 44(%esp) - movq (%esi), %xmm3 - movq 32(%esi), %xmm7 - pand %xmm0, %xmm2 - pand %xmm1, %xmm3 - pand 16(%esi), %xmm0 - pand 16(%esi), %xmm1 - movq %xmm2, %xmm4 - movq %xmm3, %xmm5 - movl 4(%ecx), %eax - movl 12(%ecx), %ebx - andl $2147483647, %eax - andl $2147483647, %ebx - subl $591396864, %eax - movq %xmm0, 64(%esp) - subl $591396864, %ebx - cmpl $1017118720, %eax - movq %xmm1, 72(%esp) - jae .L_2TAG_PACKET_0.0.2 - cmpl $1017118720, %ebx - jae .L_2TAG_PACKET_0.0.2 - addl $591396864, %eax - addl $591396864, %ebx - movl %eax, %edx - subl %ebx, %edx - cmpl $60817408, %edx - jg .L_2TAG_PACKET_1.0.2 - cmpl $-60817408, %edx - movl (%esp), %edx - jl .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_3.0.2: - subsd %xmm2, %xmm0 - subsd %xmm3, %xmm1 - mulsd %xmm2, %xmm2 - mulsd %xmm3, %xmm3 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm5 - movq %xmm2, %xmm6 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - movq %xmm7, 80(%esp) - movq %xmm2, %xmm7 - addsd %xmm3, %xmm2 - addsd %xmm4, %xmm0 - subsd %xmm2, %xmm7 - addsd %xmm5, %xmm1 - movq %xmm2, 56(%esp) - addsd %xmm7, %xmm2 - addsd %xmm7, %xmm3 - movq 56(%esp), %xmm7 - addsd %xmm4, %xmm0 - subsd %xmm2, %xmm6 - addsd %xmm5, %xmm1 - movq 56(%esp), %xmm5 - movq %xmm0, %xmm2 - movq %xmm0, %xmm4 - addsd %xmm3, %xmm6 - addsd %xmm1, %xmm0 - subsd %xmm0, %xmm2 - movq %xmm0, %xmm3 - addsd %xmm2, %xmm0 - addsd %xmm2, %xmm1 - pshufd $221, %xmm7, %xmm2 - subsd %xmm0, %xmm4 - movq 48(%esi), %xmm0 - addsd %xmm4, %xmm1 - pand %xmm7, %xmm0 - addsd %xmm3, %xmm7 - addsd %xmm6, %xmm1 - subsd %xmm7, %xmm5 - subsd %xmm0, %xmm7 - movq %xmm0, %xmm4 - addsd %xmm5, %xmm3 - movq %xmm0, %xmm5 - addsd %xmm7, %xmm1 - movq %xmm0, %xmm7 - psrlq $29, %xmm0 - addsd %xmm3, %xmm1 - pand 64(%esi), %xmm0 - movq 160(%esi), %xmm3 - pxor 80(%esi), %xmm0 - addsd %xmm1, %xmm4 - paddd 96(%esi), %xmm0 - psubd 112(%esi), %xmm2 - rsqrtss %xmm0, %xmm0 - pand 128(%esi), %xmm2 - psrld $3, %xmm0 - psrld $1, %xmm2 - paddd 144(%esi), %xmm0 - psubd %xmm2, %xmm0 - psllq $32, %xmm0 - movq %xmm0, %xmm2 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm7 - mulsd %xmm1, %xmm0 - subsd 32(%esi), %xmm7 - addsd %xmm0, %xmm7 - movq 176(%esi), %xmm0 - movq %xmm7, %xmm6 - mulsd %xmm7, %xmm7 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm0 - addsd 192(%esi), %xmm3 - addsd 208(%esi), %xmm0 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm0 - addsd 224(%esi), %xmm3 - mulsd %xmm6, %xmm3 - addsd %xmm0, %xmm3 - movq 64(%esp), %xmm0 - mulsd %xmm2, %xmm3 - mulsd %xmm4, %xmm3 - movq 64(%esp), %xmm4 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - movq %xmm5, %xmm2 - addsd 64(%esp), %xmm5 - movq 48(%esi), %xmm7 - addsd %xmm3, %xmm1 - subsd %xmm5, %xmm4 - movq %xmm5, %xmm3 - addsd %xmm4, %xmm5 - addsd %xmm2, %xmm4 - subsd %xmm5, %xmm0 - addsd %xmm0, %xmm4 - movq 240(%esi), %xmm0 - addsd %xmm1, %xmm4 - movq %xmm3, %xmm1 - movq %xmm3, %xmm2 - addsd %xmm4, %xmm3 - subsd %xmm3, %xmm1 - mulsd %xmm3, %xmm0 - pand %xmm0, %xmm7 - addsd %xmm1, %xmm3 - addsd %xmm4, %xmm1 - movq %xmm7, %xmm4 - subsd %xmm2, %xmm3 - movq %xmm7, %xmm5 - pshufd $221, %xmm0, %xmm2 - subsd %xmm7, %xmm0 - subsd %xmm3, %xmm1 - mulsd 240(%esi), %xmm1 - addsd %xmm0, %xmm1 - movq %xmm7, %xmm0 - psrlq $29, %xmm7 - movq 160(%esi), %xmm3 - pand 64(%esi), %xmm7 - psubd 112(%esi), %xmm2 - pxor 80(%esi), %xmm7 - addsd %xmm1, %xmm4 - paddd 96(%esi), %xmm7 - rsqrtss %xmm7, %xmm7 - psrld $3, %xmm7 - pand 128(%esi), %xmm2 - psrld $1, %xmm2 - paddd 144(%esi), %xmm7 - psubd %xmm2, %xmm7 - psllq $32, %xmm7 - movq %xmm7, %xmm2 - mulsd %xmm7, %xmm7 - mulsd %xmm7, %xmm0 - mulsd %xmm1, %xmm7 - subsd 32(%esi), %xmm0 - addsd %xmm7, %xmm0 - movq 176(%esi), %xmm7 - movq %xmm0, %xmm6 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm7 - addsd 192(%esi), %xmm3 - addsd 208(%esi), %xmm7 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm7 - addsd 224(%esi), %xmm3 - mulsd %xmm6, %xmm3 - movq 72(%esp), %xmm6 - addsd %xmm7, %xmm3 - mulsd 240(%esi), %xmm6 - mulsd %xmm2, %xmm3 - mulsd %xmm3, %xmm4 - pxor %xmm7, %xmm7 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - cmpnlesd (%ecx), %xmm7 - addsd %xmm4, %xmm1 - movq 48(%esi), %xmm4 - pand %xmm6, %xmm4 - subsd %xmm4, %xmm6 - addsd %xmm5, %xmm1 - movq %xmm2, %xmm5 - mulsd %xmm4, %xmm2 - mulsd %xmm3, %xmm4 - movq %xmm1, %xmm0 - pand %xmm7, %xmm0 - mulsd %xmm6, %xmm3 - mulsd %xmm5, %xmm6 - movq 8(%ecx), %xmm5 - addsd %xmm4, %xmm3 - addsd %xmm3, %xmm6 - addsd %xmm6, %xmm2 - movq %xmm7, %xmm6 - pandn %xmm2, %xmm6 - pand %xmm7, %xmm2 - pandn %xmm1, %xmm7 - pand 256(%esi), %xmm5 - por %xmm6, %xmm0 - por %xmm7, %xmm2 - por %xmm5, %xmm0 - mulsd 80(%esp), %xmm2 - mulsd 80(%esp), %xmm0 - movsd %xmm2, (%edx) - movsd %xmm0, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_0.0.2: - addl $591396864, %eax - addl $591396864, %ebx - cmpl $2146435072, %eax - jge .L_2TAG_PACKET_5.0.2 - cmpl $2146435072, %ebx - jge .L_2TAG_PACKET_6.0.2 - movl (%ecx), %edx - orl %eax, %edx - movl 8(%ecx), %edx - je .L_2TAG_PACKET_7.0.2 - orl %ebx, %edx - je .L_2TAG_PACKET_8.0.2 - movl %eax, %edx - subl %ebx, %edx - cmpl $60817408, %edx - jg .L_2TAG_PACKET_1.0.2 - cmpl $-60817408, %edx - jl .L_2TAG_PACKET_2.0.2 - cmpl $1072693248, %eax - jl .L_2TAG_PACKET_9.0.2 - mulsd 272(%esi), %xmm0 - mulsd 272(%esi), %xmm1 - movq 288(%esi), %xmm7 - movq 48(%esi), %xmm2 - movq 48(%esi), %xmm3 - pand %xmm0, %xmm2 - pand %xmm1, %xmm3 - movq %xmm2, %xmm4 - movl (%esp), %edx - movq %xmm3, %xmm5 - movq %xmm0, 64(%esp) - movq %xmm1, 72(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_9.0.2: - mulsd 304(%esi), %xmm0 - mulsd 304(%esi), %xmm1 - movq 320(%esi), %xmm7 - movq 48(%esi), %xmm2 - movq 48(%esi), %xmm3 - pand %xmm0, %xmm2 - pand %xmm1, %xmm3 - movq %xmm2, %xmm4 - movl (%esp), %edx - movq %xmm3, %xmm5 - movq %xmm0, 64(%esp) - movq %xmm1, 72(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_2.0.2: -.L_2TAG_PACKET_7.0.2: - cmpl $2097152, %ebx - movl (%esp), %edx - jl .L_2TAG_PACKET_10.0.2 - mulsd 240(%esi), %xmm1 - sqrtsd %xmm1, %xmm1 - movsd 8(%ecx), %xmm2 - pand 256(%esi), %xmm2 - movsd %xmm1, (%edx) - por %xmm2, %xmm1 - movsd %xmm1, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_10.0.2: - mulsd 336(%esi), %xmm1 - sqrtsd %xmm1, %xmm1 - movsd 8(%ecx), %xmm2 - pand 256(%esi), %xmm2 - mulsd 352(%esi), %xmm1 - movsd %xmm1, (%edx) - por %xmm2, %xmm1 - movsd %xmm1, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_8.0.2: - sqrtsd %xmm0, %xmm0 - movl 4(%ecx), %eax - cmpl $0, %eax - movl (%esp), %edx - jl .L_2TAG_PACKET_11.0.2 - movsd 8(%ecx), %xmm2 - pand 256(%esi), %xmm2 - movsd %xmm2, 8(%edx) - movsd %xmm0, (%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_11.0.2: - pxor %xmm3, %xmm3 - movsd %xmm3, (%edx) - movsd 8(%ecx), %xmm2 - pand 256(%esi), %xmm2 - por %xmm0, %xmm2 - movsd %xmm2, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_1.0.2: - cmpl $57671680, %ebx - movsd %xmm0, %xmm4 - subsd %xmm2, %xmm0 - movq %xmm2, %xmm5 - movq %xmm2, %xmm7 - pshufd $221, %xmm2, %xmm1 - jl .L_2TAG_PACKET_12.0.2 - mulsd 416(%esi), %xmm2 - mulsd 416(%esi), %xmm0 - mulsd 416(%esi), %xmm4 - movsd %xmm2, %xmm5 - movsd %xmm2, %xmm7 - pshufd $221, %xmm2, %xmm1 - shrl $21, %eax - shrl $20, %ebx - psrlq $29, %xmm2 - pand 64(%esi), %xmm2 - pxor 80(%esi), %xmm2 - paddd 96(%esi), %xmm2 - rsqrtss %xmm2, %xmm2 - subl $511, %eax - subl $1023, %ebx - psubd 112(%esi), %xmm1 - psrld $3, %xmm2 - pand 128(%esi), %xmm1 - psrld $1, %xmm1 - paddd 144(%esi), %xmm2 - psubd %xmm1, %xmm2 - subl %eax, %ebx - psllq $32, %xmm2 - movq %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - mulsd %xmm2, %xmm7 - mulsd %xmm0, %xmm2 - subsd 32(%esi), %xmm7 - cmpl $-1020, %ebx - addsd %xmm2, %xmm7 - movq %xmm7, %xmm6 - mulsd %xmm7, %xmm7 - movq 160(%esi), %xmm3 - movq 176(%esi), %xmm2 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm2 - addsd 192(%esi), %xmm3 - addsd 208(%esi), %xmm2 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm2 - addsd 224(%esi), %xmm3 - mulsd %xmm6, %xmm3 - addsd %xmm2, %xmm3 - mulsd %xmm1, %xmm3 - mulsd %xmm3, %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm5 - addsd %xmm4, %xmm0 - mulsd 448(%esi), %xmm5 - mulsd 448(%esi), %xmm0 - mulsd 432(%esi), %xmm1 - mulsd 432(%esi), %xmm3 - jl .L_2TAG_PACKET_13.0.2 - movsd 72(%esp), %xmm2 - addsd %xmm5, %xmm0 - mulsd 240(%esi), %xmm1 - mulsd 240(%esi), %xmm3 - movq 48(%esi), %xmm4 - pand %xmm2, %xmm4 - subsd %xmm4, %xmm2 - movq %xmm1, %xmm5 - mulsd %xmm4, %xmm1 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm3 - mulsd %xmm5, %xmm2 - addsd %xmm4, %xmm3 - addsd %xmm3, %xmm2 - addsd %xmm2, %xmm1 -.L_2TAG_PACKET_14.0.2: - movsd 8(%ecx), %xmm3 - pand 256(%esi), %xmm3 - movl 4(%ecx), %eax - cmpl $0, %eax - movl (%esp), %edx - jl .L_2TAG_PACKET_15.0.2 - por %xmm3, %xmm1 - movsd %xmm0, (%edx) - movsd %xmm1, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_15.0.2: - por %xmm3, %xmm0 - movsd %xmm1, (%edx) - movsd %xmm0, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_12.0.2: - psrlq $29, %xmm2 - pand 64(%esi), %xmm2 - pxor 80(%esi), %xmm2 - paddd 96(%esi), %xmm2 - rsqrtss %xmm2, %xmm2 - psubd 112(%esi), %xmm1 - psrld $3, %xmm2 - pand 128(%esi), %xmm1 - psrld $1, %xmm1 - paddd 144(%esi), %xmm2 - psubd %xmm1, %xmm2 - psllq $32, %xmm2 - movq %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - mulsd %xmm2, %xmm7 - mulsd %xmm0, %xmm2 - subsd 32(%esi), %xmm7 - addsd %xmm2, %xmm7 - movq %xmm7, %xmm6 - mulsd %xmm7, %xmm7 - movq 160(%esi), %xmm3 - movq 176(%esi), %xmm2 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm2 - addsd 192(%esi), %xmm3 - addsd 208(%esi), %xmm2 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm2 - addsd 224(%esi), %xmm3 - mulsd %xmm6, %xmm3 - addsd %xmm2, %xmm3 - mulsd %xmm1, %xmm3 - mulsd %xmm3, %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm5 - addsd %xmm4, %xmm0 -.L_2TAG_PACKET_13.0.2: - addsd %xmm5, %xmm0 - movq 72(%esp), %xmm2 - mulsd 368(%esi), %xmm2 - mulsd 336(%esi), %xmm2 - movq 48(%esi), %xmm4 - pand %xmm2, %xmm4 - subsd %xmm4, %xmm2 - movq %xmm1, %xmm5 - mulsd %xmm4, %xmm1 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm3 - mulsd %xmm5, %xmm2 - addsd %xmm4, %xmm3 - addsd %xmm3, %xmm2 - movq %xmm1, %xmm3 - addsd %xmm2, %xmm1 - pextrw $3, %xmm1, %eax - mulsd 384(%esi), %xmm1 - mulsd 400(%esi), %xmm1 - cmpl $19216, %eax - jge .L_2TAG_PACKET_14.0.2 - movq 384(%esi), %xmm5 - mulsd %xmm5, %xmm5 - cmpl $19056, %eax - jle .L_2TAG_PACKET_14.0.2 - movq 48(%esi), %xmm1 - pand %xmm3, %xmm1 - subsd %xmm1, %xmm3 - addsd %xmm3, %xmm2 - mulsd 384(%esi), %xmm1 - mulsd 384(%esi), %xmm2 - mulsd 400(%esi), %xmm1 - mulsd 400(%esi), %xmm2 - addsd %xmm2, %xmm1 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_6.0.2: -.L_2TAG_PACKET_16.0.2: - movq 32(%esi), %xmm0 - addsd 8(%ecx), %xmm0 - movsd %xmm0, 8(%edx) - mulsd %xmm0, %xmm0 - movsd %xmm0, (%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_5.0.2: - movsd (%ecx), %xmm1 - mulsd %xmm1, %xmm1 - cmpl $2146435072, %ebx - jl .L_2TAG_PACKET_17.0.2 - movl 8(%ecx), %ebx - jg .L_2TAG_PACKET_18.0.2 - andl %ebx, %ebx - jne .L_2TAG_PACKET_18.0.2 - jmp .L_2TAG_PACKET_16.0.2 -.L_2TAG_PACKET_18.0.2: - movq 32(%esi), %xmm0 - addsd 8(%ecx), %xmm0 - cmpl $2146435072, %eax - movl (%ecx), %ebx - jg .L_2TAG_PACKET_19.0.2 - andl %ebx, %ebx - movl 4(%ecx), %ebx - jne .L_2TAG_PACKET_19.0.2 - cmpl $2146435072, %ebx - je .L_2TAG_PACKET_20.0.2 - mulsd %xmm1, %xmm1 - movsd %xmm0, (%edx) - movsd %xmm1, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_19.0.2: -.L_2TAG_PACKET_20.0.2: - movsd %xmm1, (%edx) - movsd %xmm0, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_17.0.2: - cmpl $2146435072, %eax - movl (%ecx), %eax - jg .L_2TAG_PACKET_21.0.2 - andl %eax, %eax - jne .L_2TAG_PACKET_21.0.2 - pxor %xmm2, %xmm2 - movl 4(%ecx), %eax - movq 8(%ecx), %xmm3 - testl $-2147483648, %eax - pand 256(%esi), %xmm3 - jne .L_2TAG_PACKET_22.0.2 - por %xmm3, %xmm2 - movsd %xmm1, (%edx) - movsd %xmm2, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_22.0.2: - por %xmm3, %xmm1 - movsd %xmm2, (%edx) - movsd %xmm1, 8(%edx) - movl 40(%esp), %ebx - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_21.0.2: - movsd %xmm1, (%edx) - movsd %xmm1, 8(%edx) - movl 40(%esp), %ebx -.L_2TAG_PACKET_4.0.2: - movl 128(%esp), %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B2.3: - .align 16,0x90 - .type csqrt,@function - .size csqrt,.-csqrt - .data -# -- End csqrt - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4160749568 - .long 2147483647 - .long 4160749568 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 4160749568 - .long 4294967295 - .long 4160749568 - .long 4294967295 - .long 16777215 - .long 16777215 - .long 16777215 - .long 16777215 - .long 8388608 - .long 8388608 - .long 8388608 - .long 8388608 - .long 1065353216 - .long 1065353216 - .long 1065353216 - .long 1065353216 - .long 1048576 - .long 1048576 - .long 1048576 - .long 1048576 - .long 4292870144 - .long 4292870144 - .long 4292870144 - .long 4292870144 - .long 1475346432 - .long 1475346432 - .long 1475346432 - .long 1475346432 - .long 0 - .long 3218046976 - .long 0 - .long 3218046976 - .long 0 - .long 1070694400 - .long 0 - .long 1070694400 - .long 0 - .long 3218341888 - .long 0 - .long 3218341888 - .long 0 - .long 1071120384 - .long 0 - .long 1071120384 - .long 0 - .long 3219128320 - .long 0 - .long 3219128320 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 533725184 - .long 0 - .long 533725184 - .long 0 - .long 1342177280 - .long 0 - .long 1342177280 - .long 0 - .long 1722810368 - .long 0 - .long 1722810368 - .long 0 - .long 747634688 - .long 0 - .long 747634688 - .long 0 - .long 1281359872 - .long 0 - .long 1281359872 - .long 0 - .long 967835648 - .long 0 - .long 967835648 - .long 0 - .long 2121269248 - .long 0 - .long 2121269248 - .long 0 - .long 24117248 - .long 0 - .long 24117248 - .long 0 - .long 862978048 - .long 0 - .long 862978048 - .long 0 - .long 1062207488 - .long 0 - .long 1062207488 - .long 0 - .long 1067450368 - .long 0 - .long 1067450368 - .long 0 - .long 1077936128 - .long 0 - .long 1077936128 - .type static_const_table,@object - .size static_const_table,464 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrtf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrtf_wmt.S deleted file mode 100644 index e551616238..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrtf_wmt.S +++ /dev/null @@ -1,351 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csqrtf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin csqrtf - .text - .align 16,0x90 - .globl csqrtf -csqrtf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $216, %esp - movl %ebx, 160(%esp) - call static_func - movl %eax, %ebx - movss 224(%esp), %xmm0 - movss 228(%esp), %xmm1 - movss %xmm0, (%esp) - movss %xmm1, 4(%esp) - movl (%esp), %eax - movl 4(%esp), %ecx - unpcklps %xmm1, %xmm0 - movl %ecx, %edx - andl $2139095040, %eax - andl $2139095040, %ecx - subl $8388608, %eax - subl $8388608, %ecx - andl $2139095040, %eax - andl $2139095040, %ecx - subl $2130706432, %eax - subl $2130706432, %ecx - testl %ecx, %eax - jns .L_2TAG_PACKET_0.0.2 - cvtps2pd %xmm0, %xmm0 - pxor %xmm4, %xmm4 - movl $16, %eax - movapd %xmm0, %xmm1 - unpckhpd %xmm1, %xmm1 - movapd %xmm0, %xmm7 - mulsd %xmm0, %xmm0 - movapd %xmm7, %xmm6 - mulsd %xmm1, %xmm1 - pinsrw $3, %eax, %xmm4 - addsd %xmm1, %xmm0 - andpd (%ebx), %xmm7 - sqrtsd %xmm0, %xmm0 - addsd %xmm7, %xmm0 - psubd %xmm4, %xmm0 - movsd %xmm0, %xmm7 - movdqa %xmm0, %xmm1 - pand 16(%ebx), %xmm0 - movdqa %xmm1, %xmm2 - paddd 32(%ebx), %xmm0 - psrld $1, %xmm1 - psrlq $29, %xmm0 - pand 48(%ebx), %xmm1 - rsqrtss %xmm0, %xmm0 - psubd 64(%ebx), %xmm1 - psllq $29, %xmm0 - movapd 80(%ebx), %xmm3 - psubd %xmm1, %xmm0 - movapd 96(%ebx), %xmm1 - mulsd %xmm0, %xmm2 - movapd 48(%ebx), %xmm4 - mulsd %xmm0, %xmm2 - subsd %xmm4, %xmm2 - mulsd %xmm2, %xmm3 - addsd %xmm1, %xmm3 - mulsd %xmm2, %xmm3 - mulsd %xmm0, %xmm3 - addsd %xmm3, %xmm0 - mulpd 112(%ebx), %xmm7 - unpcklpd %xmm0, %xmm0 -.L_2TAG_PACKET_1.0.2: - pextrw $3, %xmm6, %eax - mulpd %xmm7, %xmm0 - andl $-2147483648, %edx - cvtpd2ps %xmm0, %xmm1 - testl $32768, %eax - pshufd $17, %xmm1, %xmm2 - je .L_2TAG_PACKET_2.0.2 - movd %xmm1, %ecx - movd %xmm2, %eax - orl %ecx, %edx - testl $2139095040, %eax - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_2.0.2: - movd %xmm2, %ecx - movd %xmm1, %eax - orl %ecx, %edx - testl $2139095040, %ecx -.L_2TAG_PACKET_3.0.2: - je .L_2TAG_PACKET_4.0.2 - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_4.0.2: - testl $2147483647, 4(%esp) - jne .L_2TAG_PACKET_6.0.2 - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_6.0.2: - movhpd %xmm0, 112(%esp) - testl $2139095040, %eax - fldl 112(%esp) - fstps 112(%esp) - je .L_2TAG_PACKET_7.0.2 - andl $-2147483648, %edx - orl 112(%esp), %edx - jmp .L_2TAG_PACKET_8.0.2 -.L_2TAG_PACKET_7.0.2: - movl 112(%esp), %eax -.L_2TAG_PACKET_8.0.2: - movl $8388608, 116(%esp) - flds 112(%esp) - fmul %st(0), %st - fstps 112(%esp) - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_0.0.2: - movdqa %xmm0, %xmm2 - movdqa 128(%ebx), %xmm4 - pshufd $80, %xmm0, %xmm0 - pxor %xmm5, %xmm5 - movdqa %xmm2, %xmm3 - pand 144(%ebx), %xmm0 - pshufd $115, %xmm2, %xmm2 - pcmpeqd %xmm4, %xmm0 - movdqa %xmm2, %xmm6 - movmskps %xmm0, %eax - pand %xmm2, %xmm4 - testl %eax, %eax - jne .L_2TAG_PACKET_9.0.2 - pxor %xmm0, %xmm0 -.L_2TAG_PACKET_10.0.2: - pand (%ebx), %xmm2 - pcmpeqd %xmm5, %xmm4 - movdqa %xmm4, %xmm3 - pand 160(%ebx), %xmm4 - psrlq $3, %xmm2 - pand 176(%ebx), %xmm3 - por %xmm4, %xmm2 - paddd 192(%ebx), %xmm3 - subpd %xmm4, %xmm2 - paddd %xmm3, %xmm2 - pandn %xmm2, %xmm0 - pxor %xmm4, %xmm4 - movl $16, %eax - movapd %xmm0, %xmm1 - unpckhpd %xmm1, %xmm1 - movapd %xmm0, %xmm7 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - pinsrw $3, %eax, %xmm4 - addsd %xmm1, %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm7, %xmm0 - psubd %xmm4, %xmm0 - movsd %xmm0, %xmm7 - sqrtsd %xmm0, %xmm1 - movapd 48(%ebx), %xmm0 - divsd %xmm1, %xmm0 - mulpd 112(%ebx), %xmm7 - unpcklpd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_9.0.2: - cmpl $5, %eax - je .L_2TAG_PACKET_11.0.2 - testl $10, %eax - jne .L_2TAG_PACKET_12.0.2 - pshufd $160, %xmm0, %xmm0 - jmp .L_2TAG_PACKET_10.0.2 -.L_2TAG_PACKET_11.0.2: - xorl %eax, %eax - andl $-2147483648, %edx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_12.0.2: - movl %edx, %ecx - andl $2147483647, %ecx - movd %xmm3, %eax - cmpl $2139095040, %ecx - je .L_2TAG_PACKET_13.0.2 - ja .L_2TAG_PACKET_14.0.2 - andl $-2147483648, %edx - cmpl $-8388608, %eax - je .L_2TAG_PACKET_15.0.2 - cmpl $2139095040, %eax - jne .L_2TAG_PACKET_16.0.2 - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_15.0.2: - xorl %eax, %eax - orl $2139095040, %edx - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_14.0.2: - cmpl $2139095040, %eax - je .L_2TAG_PACKET_17.0.2 - cmpl $-8388608, %eax - je .L_2TAG_PACKET_18.0.2 -.L_2TAG_PACKET_16.0.2: - mulss %xmm3, %xmm1 - flds (%esp) - flds 4(%esp) - movd %xmm1, %eax - movl %eax, %edx - jmp .L_2TAG_PACKET_19.0.2 -.L_2TAG_PACKET_17.0.2: - flds 4(%esp) - flds 4(%esp) - orl $4194304, %edx - jmp .L_2TAG_PACKET_19.0.2 -.L_2TAG_PACKET_18.0.2: - flds 4(%esp) - flds 4(%esp) - movl %edx, %eax - movl $2139095040, %edx - orl $4194304, %eax - jmp .L_2TAG_PACKET_19.0.2 -.L_2TAG_PACKET_13.0.2: - flds (%esp) - fld1 - movl $2139095040, %eax -.L_2TAG_PACKET_19.0.2: - fmulp - fstp %st(0) -.L_2TAG_PACKET_5.0.2: - movl 160(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type csqrtf,@function - .size csqrtf,.-csqrtf - .data -# -- End csqrtf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2097151 - .long 4294967295 - .long 2097151 - .long 0 - .long 132120576 - .long 0 - .long 132120576 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 1475346432 - .long 0 - .long 1475346432 - .long 2148429837 - .long 1071120401 - .long 2148429837 - .long 1071120401 - .long 195330 - .long 3219128325 - .long 195330 - .long 3219128325 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 0 - .long 2139095040 - .long 0 - .long 2139095040 - .long 2147483647 - .long 2139095040 - .long 2147483647 - .long 2139095040 - .long 0 - .long 133169152 - .long 0 - .long 133169152 - .long 0 - .long 4162846720 - .long 0 - .long 4162846720 - .long 0 - .long 939524096 - .long 0 - .long 939524096 - .type static_const_table,@object - .size static_const_table,208 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrtl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrtl.S deleted file mode 100644 index becf7f5166..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/csqrtl.S +++ /dev/null @@ -1,739 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csqrtl.c" - .text -..TXTST0: -# -- Begin csqrtl - .text - .align 16,0x90 - .globl csqrtl -csqrtl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl 8(%ebp), %eax - movl %eax, 44(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 196(%esp) - fstpt 172(%esp) - fldt 172(%esp) - fstpt 184(%esp) -..B1.2: - fnstcw 62(%esp) -..B1.3: - movzwl 62(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.69 -..B1.4: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.5: - fldcw 60(%esp) -..B1.6: - movl $1, %esi -..B1.7: - movzwl 20(%ebp), %ecx - movl %ecx, %edi - andl $32767, %edi - cmpl $32767, %edi - jge ..B1.30 -..B1.8: - cmpl $0, 16(%ebp) - jne ..B1.10 -..B1.9: - cmpl $0, 12(%ebp) - je ..B1.30 -..B1.10: - movzwl 32(%ebp), %eax - movl %eax, %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.48 -..B1.11: - cmpl $0, 28(%ebp) - jne ..B1.13 -..B1.12: - cmpl $0, 24(%ebp) - je ..B1.32 -..B1.13: - fldt 12(%ebp) - testl %edi, %edi - jle ..B1.56 -..B1.14: - andl $-32768, %ecx - addl $-16383, %edi - fstpt 148(%esp) - fldt 148(%esp) - orl $-49153, %ecx - movw %cx, 156(%esp) -..B1.15: - fldt 24(%ebp) - testl %edx, %edx - movb $63, 157(%esp) - jle ..B1.55 -..B1.16: - andl $-32768, %eax - addl $-16383, %edx - fstpt 76(%esp) - fldt 76(%esp) - orl $-49153, %eax - movw %ax, 84(%esp) -..B1.17: - fldt 72+_CONSTANTS@GOTOFF(%ebx) - movb $63, 85(%esp) - fstpt 88(%esp) - fldt 88(%esp) - addl $-32, %esp - lea 132(%esp), %eax - movl %eax, (%esp) - fxch %st(2) - fstpt 4(%esp) - fstpt 16(%esp) - fstpt 32(%esp) - movl %edx, -72(%eax) - call __libm_hypot2l_k80 -..B1.72: - fldt 32(%esp) - movl 60(%esp), %edx - addl $32, %esp -..B1.18: - fldt 132+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fldt 100(%esp) - fld %st(0) - fsqrt - fldt 84+_CONSTANTS@GOTOFF(%ebx) - fstpt 32(%esp) - fldt 32(%esp) - fmul %st(1), %st - fld %st(0) - movl (%esp), %eax - fsubr %st(2), %st - sarl $1, %eax - faddp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fsubrp %st, %st(2) - fldt 112(%esp) - faddp %st, %st(2) - fldt 24+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(1) - fdivr %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 124(%esp) - fldt 124(%esp) - fsubr %st, %st(1) - movzwl 132(%esp), %ecx - fxch %st(1) - faddp %st, %st(2) - andl $32767, %ecx - movl %ecx, 12(%esp) - fxch %st(1) - fstpt 136(%esp) - fldt 136(%esp) - lea -16464(%ecx,%eax), %ecx - cmpl %ecx, %edi - jle ..B1.22 -..B1.19: - movl 12(%esp), %ecx - lea -16302(%ecx,%eax), %ecx - cmpl %ecx, %edi - jge ..B1.21 -..B1.20: - fstp %st(2) - subl %eax, %edi - fld %st(0) - addl $16383, %edi - fld %st(1) - movzwl 156(%esp), %ecx - andl $32767, %edi - andl $-32768, %ecx - orl %edi, %ecx - movl %eax, %edi - movw %cx, 156(%esp) - fldt 148(%esp) - fadd %st, %st(2) - fld %st(2) - fxch %st(2) - fsubr %st(3), %st - fsubr %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - fsubp %st, %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - jmp ..B1.23 -..B1.21: - fstp %st(0) - fstp %st(0) - fldt 148(%esp) - jmp ..B1.23 -..B1.22: - fstp %st(2) - movl %eax, %edi -..B1.23: - fldt 32(%esp) - lea 1(%edi), %ecx - andl $1, %ecx - subl %ecx, %edi - decl %edi - sarl $1, %edi - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %eax - fldt 48+_CONSTANTS@GOTOFF(%eax,%ebx) - fmul %st, %st(2) - fld %st(2) - fsqrt - fmul %st, %st(2) - fld %st(2) - fsubr %st(1), %st - faddp %st, %st(3) - fld %st(2) - fsubr %st(1), %st - fxch %st(2) - fmulp %st, %st(5) - fld %st(2) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt 16(%esp) - fmulp %st, %st(2) - fxch %st(1) - fdiv %st(2), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 48(%esp) - fldt 48(%esp) - addl $-32, %esp - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - fldt 12(%esp) - movl %edi, 24(%esp) - fstpt 96(%esp) - movl %edx, 60(%esp) - call __libm_scalbl_k80 -..B1.73: - fldt 96(%esp) - movl 60(%esp), %edx - fxch %st(1) - fstpt 32(%esp) - addl $32, %esp -..B1.24: - fldt 76(%esp) - subl %edi, %edx - fldt 48(%esp) - fld %st(0) - fdivr %st(2), %st - fmul %st, %st(3) - fld %st(1) - fldt 32(%esp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - fsubr %st(4), %st - faddp %st, %st(1) - fld %st(0) - fsubr %st(4), %st - fxch %st(2) - fmul %st(5), %st - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fmul %st(2), %st - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fld %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - fsubrp %st, %st(3) - fldt 88(%esp) - faddp %st, %st(3) - fxch %st(3) - fsubrp %st, %st(2) - fldt 48(%esp) - fdivrp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 16(%esp) - fmul %st, %st(2) - fmulp %st, %st(1) - addl $-32, %esp - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl %edx, 24(%esp) - call __libm_scalbl_k80 -..B1.74: - addl $32, %esp -..B1.25: - movzbl 21(%ebp), %eax - testl $128, %eax - jne ..B1.27 -..B1.26: - fldt (%esp) - lea 184(%esp), %edi - fstpt -12(%edi) - jmp ..B1.28 -..B1.27: - fldt (%esp) - lea 184(%esp), %edi - fxch %st(1) - fstpt -12(%edi) -..B1.28: - movzbl 33(%ebp), %edx - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _CONSTANTS@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt (%edi) - jmp ..B1.51 -..B1.30: - movzwl 32(%ebp), %edx - andl $32767, %edx -..B1.31: - cmpl $32767, %edx - jge ..B1.48 -..B1.32: - movl 16(%ebp), %eax - testl %eax, %eax - jne ..B1.40 -..B1.33: - cmpl $0, 12(%ebp) - jne ..B1.40 -..B1.34: - cmpl $0, 28(%ebp) - jne ..B1.36 -..B1.35: - cmpl $0, 24(%ebp) - je ..B1.40 -..B1.36: - fldt 24(%ebp) - movzbl 33(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - cmpl $2, %edx - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %eax - fldt _CONSTANTS@GOTOFF(%eax,%ebx) - jl ..B1.38 -..B1.37: - fldt 24+_CONSTANTS@GOTOFF(%ebx,%eax) - fmulp %st, %st(2) - fxch %st(1) - fsqrt - jmp ..B1.39 -..B1.38: - fldt 108+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fsqrt - fldt 156+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) -..B1.39: - fstpt 172(%esp) - fldt 172(%esp) - fmulp %st, %st(1) - fstpt 184(%esp) - jmp ..B1.51 -..B1.40: - cmpl $32767, %edi - jl ..B1.43 -..B1.41: - cmpl $-2147483648, %eax - jne ..B1.47 -..B1.42: - cmpl $0, 12(%ebp) - jne ..B1.47 -..B1.43: - fldt 12(%ebp) - fldt 72+_CONSTANTS@GOTOFF(%ebx) - movzbl 21(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - testl %ecx, %ecx - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %edx - fldt _CONSTANTS@GOTOFF(%ebx,%edx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 148(%esp) - fldt 148(%esp) - fsqrt - jne ..B1.45 -..B1.44: - fstpt 172(%esp) - lea 184(%esp), %edi - jmp ..B1.46 -..B1.45: - fxch %st(1) - fstpt 172(%esp) - lea 184(%esp), %edi -..B1.46: - movzbl 33(%ebp), %edx - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _CONSTANTS@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt (%edi) - jmp ..B1.51 -..B1.47: - fldt 12(%ebp) - fmul %st(0), %st - fstpt 172(%esp) - fldt 172(%esp) - fstpt 184(%esp) - jmp ..B1.51 -..B1.48: - je ..B1.63 -..B1.49: - cmpl $32767, %edi - je ..B1.58 -..B1.50: - fldt 12(%ebp) - fld %st(0) - fldt 24(%ebp) - fmul %st, %st(1) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fstpt 172(%esp) - fmulp %st, %st(1) - fstpt 184(%esp) -..B1.51: - testl %esi, %esi - je ..B1.53 -..B1.52: - fldcw 62(%esp) -..B1.53: - movl 44(%esp), %eax - movl 172(%esp), %edx - movl 176(%esp), %ecx - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl 180(%esp), %esi - movl 184(%esp), %edi - movl 188(%esp), %edx - movl 192(%esp), %ecx - movl %esi, 8(%eax) - movl %edi, 12(%eax) - movl %edx, 16(%eax) - movl %ecx, 20(%eax) - movl 196(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.57 -..B1.54: - movl 44(%esp), %eax - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.55: - fldt 120+_CONSTANTS@GOTOFF(%ebx) - fmul %st(1), %st - fstpt 76(%esp) - movzwl 84(%esp), %eax - movl %eax, %edx - andl $-32768, %eax - andl $32767, %edx - orl $-49153, %eax - addl $-16639, %edx - movw %ax, 84(%esp) - jmp ..B1.17 -..B1.56: - fldt 120+_CONSTANTS@GOTOFF(%ebx) - fmul %st(1), %st - fstpt 148(%esp) - movzwl 156(%esp), %ecx - movl %ecx, %edi - andl $-32768, %ecx - andl $32767, %edi - orl $-49153, %ecx - addl $-16639, %edi - movw %cx, 156(%esp) - jmp ..B1.15 -..B1.57: - call __stack_chk_fail@PLT -..B1.58: - cmpl $-2147483648, 16(%ebp) - jne ..B1.50 -..B1.59: - cmpl $0, 12(%ebp) - jne ..B1.50 -..B1.60: - fldt 12(%ebp) - movzbl 21(%ebp), %eax - testl $128, %eax - fmul %st(0), %st - fldt 24(%ebp) - fmul %st(0), %st - jne ..B1.62 -..B1.61: - fxch %st(1) - fstpt 172(%esp) - fstpt 184(%esp) - jmp ..B1.51 -..B1.62: - fstpt 172(%esp) - fstpt 184(%esp) - jmp ..B1.51 -..B1.63: - cmpl $-2147483648, 28(%ebp) - jne ..B1.49 -..B1.64: - cmpl $0, 24(%ebp) - jne ..B1.49 -..B1.65: - fldt 24(%ebp) - movzbl 33(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fmul %st(0), %st - cmpl $32767, %edi - fstpt 172(%esp) - fldt 172(%esp) - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _CONSTANTS@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt 184(%esp) - jne ..B1.51 -..B1.66: - cmpl $-2147483648, 16(%ebp) - jne ..B1.68 -..B1.67: - cmpl $0, 12(%ebp) - je ..B1.51 -..B1.68: - fldt 12(%ebp) - fldt _CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 12(%ebp) - jmp ..B1.51 -..B1.69: - xorl %esi, %esi - jmp ..B1.7 - .align 16,0x90 - .type csqrtl,@function - .size csqrtl,.-csqrtl - .data -# -- End csqrtl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .word 32768 - .word 16415 - .word 0 - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16127 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,168 - .data - .hidden __libm_hypot2l_k80 - .hidden __libm_scalbl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctan.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctan.S deleted file mode 100644 index 15a3451d26..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctan.S +++ /dev/null @@ -1,237 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctan.c" - .text -..TXTST0: -# -- Begin ctan - .text - .align 16,0x90 - .globl ctan -ctan: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $72, %esp - fldz - fldl 20(%ebp) - fldl 12(%ebp) - movzwl 26(%ebp), %ecx - andl $32752, %ecx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 64(%esp) - cmpl $32752, %ecx - fstpl 56(%esp) - fxch %st(1) - fstl 16(%esp) - fstl 24(%esp) - fstl 32(%esp) - fstpl 40(%esp) - fstpl 48(%esp) - jl ..B1.4 -..B1.2: - testl $1048575, 24(%ebp) - jne ..B1.5 -..B1.3: - cmpl $0, 20(%ebp) - jne ..B1.5 -..B1.4: - movzbl 27(%ebp), %edx - notl %edx - movzbl 55(%esp), %ecx - andl $128, %edx - andl $127, %ecx - orl %edx, %ecx - movb %cl, 55(%esp) -..B1.5: - addl $-32, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea 32(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl 48(%ecx), %ecx - movl %ecx, (%edx) - movl 84(%esp), %ecx - movl %ecx, 4(%edx) - movl 88(%esp), %ecx - movl %ecx, 8(%edx) - movl 92(%esp), %ecx - movl %ecx, 12(%edx) - call ctanh@PLT -..B1.14: - addl $28, %esp - fldl (%esp) - movzwl 6(%esp), %edx - andl $32752, %edx - fstl 16(%esp) - cmpl $32752, %edx - fstpl 40(%esp) - fldl 8(%esp) - fstl 24(%esp) - fstpl 32(%esp) - jl ..B1.8 -..B1.6: - testl $1048575, 20(%esp) - jne ..B1.9 -..B1.7: - cmpl $0, 16(%esp) - jne ..B1.9 -..B1.8: - movzbl 23(%esp), %edx - notl %edx - movzbl 47(%esp), %ecx - andl $128, %edx - andl $127, %ecx - orl %edx, %ecx - movb %cl, 47(%esp) -..B1.9: - movl 32(%esp), %edx - movl %edx, (%esi) - movl 40(%esp), %edx - movl %edx, 8(%esi) - movl 36(%esp), %ecx - movl 44(%esp), %edx - movl %ecx, 4(%esi) - movl %edx, 12(%esi) - movl 64(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.11 -..B1.10: - movl %esi, %eax - addl $72, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.11: - call __stack_chk_fail@PLT - .align 16,0x90 - .type ctan,@function - .size ctan,.-ctan - .data -# -- End ctan - .text -# -- Begin ctanf - .text - .align 16,0x90 - .globl ctanf -ctanf: -# parameter 1: 48 + %esp -..B2.1: -..L3: - - pushl %ebx - subl $40, %esp - xorl %eax, %eax - movl %eax, 16(%esp) - movl %eax, 20(%esp) - movl %eax, 24(%esp) - movl %eax, 28(%esp) - movzwl 54(%esp), %eax - andl $32640, %eax - movl 52(%esp), %edx - cmpl $32640, %eax - movl 48(%esp), %ecx - movl %edx, 32(%esp) - movl %ecx, 36(%esp) - jl ..B2.3 -..B2.2: - testl $8388607, 52(%esp) - jne ..B2.4 -..B2.3: - movzbl 55(%esp), %eax - notl %eax - movzbl 35(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 35(%esp) -..B2.4: - addl $8, %esp - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - pushl 28(%esp) - pushl 28(%esp) - call ctanhf@PLT -..B2.10: - movl %eax, 16(%esp) - movl %eax, 28(%esp) - shrl $16, %eax - andl $32640, %eax - cmpl $32640, %eax - movl %edx, 20(%esp) - movl %edx, 24(%esp) - jl ..B2.6 -..B2.5: - testl $8388607, 16(%esp) - jne ..B2.7 -..B2.6: - movzbl 19(%esp), %eax - notl %eax - movzbl 31(%esp), %edx - andl $128, %eax - andl $127, %edx - orl %eax, %edx - movb %dl, 31(%esp) -..B2.7: - movl 24(%esp), %eax - movl 28(%esp), %edx - addl $40, %esp - popl %ebx - ret - .align 16,0x90 - .type ctanf,@function - .size ctanf,.-ctanf - .data -# -- End ctanf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanh.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanh.S deleted file mode 100644 index 6f34afcfcb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanh.S +++ /dev/null @@ -1,565 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctanh.c" - .text -..TXTST0: -# -- Begin ctanh - .text - .align 16,0x90 - .globl ctanh -ctanh: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - fldz - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - movl %edx, 80(%esp) - fstl 64(%esp) - fstpl 72(%esp) -..B1.2: - fnstcw 50(%esp) -..B1.3: - movzwl 18(%ebp), %edx - andl $32752, %edx - shrl $4, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %edx - jge ..B1.31 -..B1.4: - testl %edx, %edx - jle ..B1.54 -..B1.5: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $2047, %ecx - jge ..B1.32 -..B1.6: - cmpl $1032, %edx - jl ..B1.23 -..B1.7: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - movzbl 19(%ebp), %edx - andl $128, %edx - shrl $7, %edx - testl %ecx, %ecx - fldl ones@GOTOFF(%ebx,%edx,8) - fsub %st(1), %st - fstpl 64(%esp) - jne ..B1.15 -..B1.8: - testl $1048575, 24(%ebp) - jne ..B1.13 -..B1.9: - cmpl $0, 20(%ebp) - jne ..B1.13 -..B1.10: - fstp %st(0) - movzbl 27(%ebp), %edx - testl $128, %edx - jne ..B1.12 -..B1.11: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.12: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.13: - fldl 20(%ebp) - jmp ..B1.16 -..B1.15: - fldl 20(%ebp) - jne ..B1.19 -..B1.16: - movzbl 27(%ebp), %edx - testl $128, %edx - fadd %st(0), %st - fstpl 56(%esp) - jne ..B1.18 -..B1.17: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.22 -..B1.18: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.22 -..B1.19: - addl $-16, %esp - fstl (%esp) - fstpl 24(%esp) - fstpl 40(%esp) - call sin@PLT -..B1.104: - fldl 40(%esp) - fldl 24(%esp) - addl $16, %esp - fxch %st(2) - fstpl (%esp) - addl $-16, %esp - fxch %st(1) - fstpl (%esp) - fstpl 40(%esp) - call cos@PLT -..B1.103: - fldl 40(%esp) - addl $16, %esp - fldl (%esp) - fmulp %st, %st(2) - fxch %st(1) - fstpl 16(%esp) - movzbl 23(%esp), %edx - testl $128, %edx - jne ..B1.21 -..B1.20: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.22 -..B1.21: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 72(%esp) -..B1.22: - fmul %st(0), %st - fstpl 56(%esp) - jmp ..B1.44 -..B1.23: - movzwl 50(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.53 -..B1.24: - orl $-64768, %ecx - movw %cx, 48(%esp) -..B1.25: - fldcw 48(%esp) -..B1.26: - movl $1, %edi -..B1.27: - fldl 12(%ebp) - addl $-32, %esp - lea 32(%esp), %edx - lea 44(%esp), %ecx - fstpt (%esp) - movl %edx, 12(%esp) - movl %ecx, 16(%esp) - call sinhcoshl@PLT -..B1.28: - fldl 20(%ebp) - lea 56(%esp), %edx - lea 68(%esp), %ecx - fstpt (%esp) - movl %edx, 12(%esp) - movl %ecx, 16(%esp) - call sincosl@PLT -..B1.106: - addl $32, %esp -..B1.29: - fldt (%esp) - testl %edi, %edi - fld %st(0) - fmul %st(1), %st - fldt 36(%esp) - fld %st(0) - fmul %st(1), %st - faddp %st, %st(2) - fldt 12(%esp) - fmulp %st, %st(3) - fxch %st(1) - fdivr %st, %st(2) - fxch %st(2) - fstpl 64(%esp) - fldt 24(%esp) - fmulp %st, %st(1) - fdivp %st, %st(1) - fstpl 72(%esp) - je ..B1.44 -..B1.30: - fldcw 50(%esp) - jmp ..B1.44 -..B1.31: - movzwl 26(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx -..B1.32: - cmpl $2047, %edx - je ..B1.62 -..B1.33: - cmpl $2047, %ecx - je ..B1.58 -..B1.34: - testl %edx, %edx - jne ..B1.43 -..B1.35: - testl $1048575, 16(%ebp) - jne ..B1.43 -..B1.36: - cmpl $0, 12(%ebp) - jne ..B1.43 -..B1.37: - testl %ecx, %ecx - jne ..B1.41 -..B1.38: - testl $1048575, 24(%ebp) - jne ..B1.41 -..B1.39: - cmpl $0, 20(%ebp) - jne ..B1.41 -..B1.40: - fldl 12(%ebp) - fstpl 64(%esp) - fldl 20(%ebp) - fstpl 72(%esp) - jmp ..B1.44 -..B1.41: - cmpl $2047, %ecx - jge ..B1.44 -..B1.42: - fldl 12(%ebp) - fstpl 64(%esp) - addl $-16, %esp - fldl 20(%ebp) - fstpl (%esp) - call tan@PLT -..B1.107: - addl $16, %esp - fstpl 72(%esp) - jmp ..B1.44 -..B1.43: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call tanh@PLT -..B1.108: - fldl 20(%ebp) - addl $16, %esp - fstpl 72(%esp) - fstpl 64(%esp) -..B1.44: - movzwl 70(%esp), %edx - testl $32752, %edx - jne ..B1.47 -..B1.45: - testl $1048575, 68(%esp) - jne ..B1.50 -..B1.46: - cmpl $0, 64(%esp) - jne ..B1.50 -..B1.47: - movzwl 78(%esp), %edx - testl $32752, %edx - jne ..B1.51 -..B1.48: - testl $1048575, 76(%esp) - jne ..B1.50 -..B1.49: - cmpl $0, 72(%esp) - je ..B1.51 -..B1.50: - fldl _DBL_MIN_NORMAL@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 56(%esp) -..B1.51: - movl 64(%esp), %edx - movl %edx, (%esi) - movl 68(%esp), %ecx - movl 72(%esp), %edi - movl 76(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 12(%esi) - movl 80(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.57 -..B1.52: - movl %esi, %eax - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.53: - xorl %edi, %edi - jmp ..B1.27 -..B1.54: - testl $1048575, 16(%ebp) - jne ..B1.5 -..B1.55: - cmpl $0, 12(%ebp) - jne ..B1.5 - jmp ..B1.31 -..B1.57: - call __stack_chk_fail@PLT -..B1.58: - testl $1048575, 24(%ebp) - jne ..B1.61 -..B1.59: - cmpl $0, 20(%ebp) - jne ..B1.61 -..B1.60: - fldl 20(%ebp) - addl $-16, %esp - fstpl (%esp) - call tan@PLT -..B1.109: - addl $16, %esp - fstl 64(%esp) - fstpl 72(%esp) - jmp ..B1.44 -..B1.61: - fldl 20(%ebp) - fmul %st(0), %st - fstl 64(%esp) - fstpl 72(%esp) - jmp ..B1.44 -..B1.62: - testl $1048575, 16(%ebp) - jne ..B1.80 -..B1.63: - cmpl $0, 12(%ebp) - jne ..B1.112 -..B1.64: - movzbl 19(%ebp), %edx - andl $128, %edx - shrl $7, %edx - testl %ecx, %ecx - fldl ones@GOTOFF(%ebx,%edx,8) - fstpl 64(%esp) - jne ..B1.70 -..B1.65: - testl $1048575, 24(%ebp) - jne ..B1.71 -..B1.66: - cmpl $0, 20(%ebp) - jne ..B1.71 -..B1.67: - movzbl 27(%ebp), %edx - testl $128, %edx - jne ..B1.69 -..B1.68: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.69: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.70: - cmpl $2047, %ecx - je ..B1.92 -..B1.71: - cmpl $1023, %ecx - jge ..B1.77 -..B1.72: - testl %ecx, %ecx - jne ..B1.74 -..B1.73: - fldl 20(%ebp) - fadd %st(0), %st - fstpl 56(%esp) -..B1.74: - movzbl 27(%ebp), %edx - testl $128, %edx - jne ..B1.76 -..B1.75: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.76: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.77: - fldl 20(%ebp) - fstl 8(%esp) - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.111: - addl $16, %esp - fstpl (%esp) - addl $-16, %esp - fldl 24(%esp) - fstpl (%esp) - call cos@PLT -..B1.110: - addl $16, %esp - fldl (%esp) - fmulp %st, %st(1) - fstpl 16(%esp) - movzbl 23(%esp), %edx - testl $128, %edx - jne ..B1.79 -..B1.78: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.79: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.80: - jne ..B1.82 -..B1.81: - cmpl $0, 12(%ebp) - je ..B1.33 -..B1.82: - fldl 12(%ebp) - testl %ecx, %ecx - fmul %st(0), %st - fstl 64(%esp) - jne ..B1.90 -..B1.83: - testl $1048575, 24(%ebp) - jne ..B1.91 -..B1.84: - cmpl $0, 20(%ebp) - jne ..B1.91 -..B1.85: - fstp %st(0) - movzbl 27(%ebp), %edx - testl $128, %edx - jne ..B1.87 -..B1.86: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.87: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.90: - cmpl $2047, %ecx - je ..B1.98 -..B1.91: - fstpl 72(%esp) - jmp ..B1.44 -..B1.92: - testl $1048575, 24(%ebp) - jne ..B1.97 -..B1.93: - cmpl $0, 20(%ebp) - jne ..B1.97 -..B1.94: - movzbl 27(%ebp), %edx - testl $128, %edx - jne ..B1.96 -..B1.95: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.96: - fldl _DBL_NZERO@GOTOFF(%ebx) - fstpl 72(%esp) - jmp ..B1.44 -..B1.97: - fldl _DBL_PZERO@GOTOFF(%ebx) - fstpl 72(%esp) - fldl 20(%ebp) - fmul %st(0), %st - fstpl 56(%esp) - jmp ..B1.44 -..B1.98: - testl $1048575, 24(%ebp) - jne ..B1.100 -..B1.99: - cmpl $0, 20(%ebp) - je ..B1.91 -..B1.100: - fstp %st(0) - fldl 20(%ebp) - fmul %st(0), %st - fstpl 72(%esp) - jmp ..B1.44 -..B1.112: - testl $1048575, 16(%ebp) - jne ..B1.82 - jmp ..B1.81 - .align 16,0x90 - .type ctanh,@function - .size ctanh,.-ctanh - .data -# -- End ctanh - .section .rodata, "a" - .align 16 - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .space 8, 0x00 # pad - .align 16 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 16 -_DBL_PZERO: - .long 0 - .long 0 - .type _DBL_PZERO,@object - .size _DBL_PZERO,8 - .space 8, 0x00 # pad - .align 16 -_DBL_NZERO: - .long 0 - .long -2147483648 - .type _DBL_NZERO,@object - .size _DBL_NZERO,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanhf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanhf.S deleted file mode 100644 index e859a5cccd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanhf.S +++ /dev/null @@ -1,470 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctanhf.c" - .text -..TXTST0: -# -- Begin ctanhf - .text - .align 16,0x90 - .globl ctanhf -ctanhf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp - fldz - fsts 16(%esp) - fsts 36(%esp) - fstps 40(%esp) -..B1.2: - fnstcw 30(%esp) -..B1.3: - movzwl 10(%ebp), %eax - andl $32640, %eax - shrl $7, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $255, %eax - jge ..B1.28 -..B1.4: - testl %eax, %eax - jle ..B1.46 -..B1.5: - movzwl 14(%ebp), %ecx - andl $32640, %ecx - shrl $7, %ecx - cmpl $255, %ecx - jge ..B1.29 -..B1.6: - cmpl $133, %eax - jl ..B1.21 -..B1.7: - flds .L_2il0floatpacket.6@GOTOFF(%ebx) - movzbl 11(%ebp), %eax - andl $128, %eax - shrl $7, %eax - testl %ecx, %ecx - flds ones@GOTOFF(%ebx,%eax,4) - fsub %st(1), %st - fstps 36(%esp) - jne ..B1.13 -..B1.8: - testl $8388607, 12(%ebp) - jne ..B1.12 -..B1.9: - fstp %st(0) - movzbl 15(%ebp), %eax - testl $128, %eax - jne ..B1.11 -..B1.10: - flds 16(%esp) - fstps 40(%esp) - jmp ..B1.39 -..B1.11: - movl $-2147483648, 40(%esp) - jmp ..B1.39 -..B1.12: - flds 12(%ebp) - jmp ..B1.14 -..B1.13: - flds 12(%ebp) - jne ..B1.17 -..B1.14: - movzbl 15(%ebp), %eax - testl $128, %eax - fadd %st(0), %st - fstps 32(%esp) - jne ..B1.19 -..B1.15: - flds 16(%esp) - fstps 40(%esp) - jmp ..B1.20 -..B1.17: - addl $-16, %esp - fsts (%esp) - fstps 24(%esp) - fstps 28(%esp) - call sinf@PLT -..B1.86: - flds 28(%esp) - flds 24(%esp) - addl $16, %esp - fxch %st(2) - fstps (%esp) - addl $-16, %esp - fxch %st(1) - fstps (%esp) - fstps 28(%esp) - call cosf@PLT -..B1.85: - flds 28(%esp) - addl $16, %esp - flds (%esp) - fmulp %st, %st(2) - fxch %st(1) - fstps 4(%esp) - movzbl 7(%esp), %eax - testl $128, %eax - jne ..B1.19 -..B1.18: - flds 16(%esp) - fstps 40(%esp) - jmp ..B1.20 -..B1.19: - movl $-2147483648, 40(%esp) -..B1.20: - fmul %st(0), %st - fstps 32(%esp) - jmp ..B1.39 -..B1.21: - movzwl 30(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.22: - orl $-64768, %edx - movw %dx, 28(%esp) -..B1.23: - fldcw 28(%esp) -..B1.24: - movl $1, %esi -..B1.25: - flds 8(%ebp) - addl $-16, %esp - lea 16(%esp), %eax - lea 24(%esp), %edx - fstpl (%esp) - movl %eax, 8(%esp) - movl %edx, 12(%esp) - call sinhcosh@PLT -..B1.87: - addl $16, %esp -..B1.26: - flds 12(%ebp) - fsts 24(%esp) - addl $-16, %esp - fstpl (%esp) - call sin@PLT -..B1.89: - addl $16, %esp - fstpl 16(%esp) - addl $-16, %esp - flds 40(%esp) - fstpl (%esp) - call cos@PLT -..B1.88: - addl $16, %esp - fld %st(0) - testl %esi, %esi - fmul %st(1), %st - fxch %st(1) - fmull 16(%esp) - fldl (%esp) - fld %st(0) - fmul %st(1), %st - faddp %st, %st(3) - fxch %st(1) - fdiv %st(2), %st - fstps 40(%esp) - fmull 8(%esp) - fdivp %st, %st(1) - fstps 36(%esp) - je ..B1.39 -..B1.27: - fldcw 30(%esp) - jmp ..B1.39 -..B1.28: - movzwl 14(%ebp), %ecx - andl $32640, %ecx - shrl $7, %ecx -..B1.29: - cmpl $255, %eax - je ..B1.51 -..B1.30: - cmpl $255, %ecx - je ..B1.48 -..B1.31: - testl %eax, %eax - jne ..B1.38 -..B1.32: - testl $8388607, 8(%ebp) - jne ..B1.38 -..B1.33: - testl %ecx, %ecx - jne ..B1.36 -..B1.34: - testl $8388607, 12(%ebp) - jne ..B1.36 -..B1.35: - movl 8(%ebp), %eax - movl 12(%ebp), %edx - movl %eax, 36(%esp) - movl %edx, 40(%esp) - jmp ..B1.39 -..B1.36: - cmpl $255, %ecx - jge ..B1.39 -..B1.37: - movl 8(%ebp), %eax - movl %eax, 36(%esp) - addl $-16, %esp - movl 12(%ebp), %edx - movl %edx, (%esp) - call tanf@PLT -..B1.90: - addl $16, %esp - fstps 40(%esp) - jmp ..B1.39 -..B1.38: - addl $-16, %esp - movl 8(%ebp), %eax - movl %eax, (%esp) - call tanhf@PLT -..B1.91: - movl 12(%ebp), %eax - addl $16, %esp - fstps 36(%esp) - movl %eax, 40(%esp) -..B1.39: - movzwl 38(%esp), %eax - testl $32640, %eax - jne ..B1.41 -..B1.40: - testl $8388607, 36(%esp) - jne ..B1.43 -..B1.41: - movzwl 42(%esp), %eax - testl $32640, %eax - jne ..B1.44 -..B1.42: - testl $8388607, 40(%esp) - je ..B1.44 -..B1.43: - flds .L_2il0floatpacket.6@GOTOFF(%ebx) - fmul %st(0), %st - fstps 32(%esp) -..B1.44: - movl 36(%esp), %eax - movl 40(%esp), %edx - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - xorl %esi, %esi - jmp ..B1.25 -..B1.46: - testl $8388607, 8(%ebp) - jne ..B1.5 - jmp ..B1.28 -..B1.48: - testl $8388607, 12(%ebp) - jne ..B1.50 -..B1.49: - addl $-16, %esp - movl 12(%ebp), %eax - movl %eax, (%esp) - call tanf@PLT -..B1.92: - addl $16, %esp - fsts 36(%esp) - fstps 40(%esp) - jmp ..B1.39 -..B1.50: - flds 12(%ebp) - fmul %st(0), %st - fsts 36(%esp) - fstps 40(%esp) - jmp ..B1.39 -..B1.51: - testl $8388607, 8(%ebp) - jne ..B1.67 -..B1.52: - movzbl 11(%ebp), %eax - andl $128, %eax - shrl $7, %eax - testl %ecx, %ecx - movl ones@GOTOFF(%ebx,%eax,4), %edx - movl %edx, 36(%esp) - jne ..B1.57 -..B1.53: - testl $8388607, 12(%ebp) - jne ..B1.58 -..B1.54: - movzbl 15(%ebp), %eax - testl $128, %eax - jne ..B1.11 -..B1.55: - flds 16(%esp) - fstps 40(%esp) - jmp ..B1.39 -..B1.57: - cmpl $255, %ecx - je ..B1.76 -..B1.58: - cmpl $127, %ecx - jge ..B1.64 -..B1.59: - testl %ecx, %ecx - jne ..B1.61 -..B1.60: - flds 12(%ebp) - fadd %st(0), %st - fstps 32(%esp) -..B1.61: - movzbl 15(%ebp), %eax - testl $128, %eax - jne ..B1.11 -..B1.62: - flds 16(%esp) - fstps 40(%esp) - jmp ..B1.39 -..B1.64: - addl $-16, %esp - movl 12(%ebp), %esi - movl %esi, (%esp) - call sinf@PLT -..B1.94: - addl $16, %esp - fstps (%esp) - addl $-16, %esp - movl %esi, (%esp) - call cosf@PLT -..B1.93: - addl $16, %esp - flds (%esp) - fmulp %st, %st(1) - fstps 4(%esp) - movzbl 7(%esp), %eax - testl $128, %eax - jne ..B1.11 -..B1.65: - flds 16(%esp) - fstps 40(%esp) - jmp ..B1.39 -..B1.67: - je ..B1.30 -..B1.68: - flds 8(%ebp) - testl %ecx, %ecx - fmul %st(0), %st - fsts 36(%esp) - jne ..B1.74 -..B1.69: - testl $8388607, 12(%ebp) - jne ..B1.75 -..B1.70: - fstp %st(0) - movzbl 15(%ebp), %eax - testl $128, %eax - jne ..B1.11 -..B1.71: - flds 16(%esp) - fstps 40(%esp) - jmp ..B1.39 -..B1.74: - cmpl $255, %ecx - je ..B1.81 -..B1.75: - fstps 40(%esp) - jmp ..B1.39 -..B1.76: - testl $8388607, 12(%ebp) - jne ..B1.80 -..B1.77: - movzbl 15(%ebp), %eax - testl $128, %eax - jne ..B1.11 -..B1.78: - flds 16(%esp) - fstps 40(%esp) - jmp ..B1.39 -..B1.80: - flds 16(%esp) - fstps 40(%esp) - flds 12(%ebp) - fmul %st(0), %st - fstps 32(%esp) - jmp ..B1.39 -..B1.81: - testl $8388607, 12(%ebp) - je ..B1.75 -..B1.82: - fstp %st(0) - flds 12(%ebp) - fmul %st(0), %st - fstps 40(%esp) - jmp ..B1.39 - .align 16,0x90 - .type ctanhf,@function - .size ctanhf,.-ctanhf - .data -# -- End ctanhf - .section .rodata, "a" - .align 16 - .align 16 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -.L_2il0floatpacket.6: - .long 0x00800000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,4 - .align 4 -.L_2il0floatpacket.7: - .long 0x80000000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanhl.S deleted file mode 100644 index 3d8f2c4a0e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanhl.S +++ /dev/null @@ -1,975 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctanhl.c" - .text -..TXTST0: -# -- Begin ctanhl - .text - .align 16,0x90 - .globl ctanhl -ctanhl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $308, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 304(%esp) - fstpt 280(%esp) - fldt 280(%esp) - fstpt 292(%esp) -..B1.2: - fnstcw 94(%esp) -..B1.3: - movzwl 94(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.81 -..B1.4: - orl $-64768, %ecx - movw %cx, 92(%esp) -..B1.5: - fldcw 92(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzwl 20(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.50 -..B1.8: - movzwl 32(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - jge ..B1.50 -..B1.9: - cmpl $0, 16(%ebp) - jne ..B1.11 -..B1.10: - cmpl $0, 12(%ebp) - je ..B1.50 -..B1.11: - cmpl $16396, %edx - jl ..B1.22 -..B1.12: - fldt 24+_CONSTANTS@GOTOFF(%ebx) - movzbl 21(%ebp), %eax - andl $128, %eax - shrl $7, %eax - cmpl $0, 28(%ebp) - lea (,%eax,8), %edx - lea (%edx,%eax,4), %edx - fldt _CONSTANTS@GOTOFF(%ebx,%edx) - fsub %st(1), %st - fstpt 280(%esp) - jne ..B1.14 -..B1.13: - cmpl $0, 24(%ebp) - je ..B1.15 -..B1.14: - fmul %st(0), %st - fstpt 292(%esp) - jmp ..B1.16 -..B1.15: - fstp %st(0) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fstpt 292(%esp) -..B1.16: - testl %ecx, %ecx - jle ..B1.74 -..B1.17: - fldt 24(%ebp) - addl $-16, %esp - fstpt (%esp) - call tanl@PLT -..B1.84: - addl $16, %esp - fstpt 172(%esp) - movzbl 301(%esp), %edx - movzbl 181(%esp), %ecx - andl $127, %edx - andl $-128, %ecx - orl %ecx, %edx -..B1.18: - movb %dl, 301(%esp) - testl %edi, %edi - je ..B1.20 -..B1.19: - fldcw 94(%esp) -..B1.20: - movl 280(%esp), %edx - movl %edx, (%esi) - movl 292(%esp), %edx - movl %edx, 12(%esi) - movl 296(%esp), %edx - movl %edx, 16(%esi) - movl 284(%esp), %ecx - movl 288(%esp), %edi - movl 300(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 304(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.73 -..B1.21: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.22: - fldt 12(%ebp) - addl $-16, %esp - lea 224(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - call __libm_coshl_k80 -..B1.85: - addl $16, %esp -..B1.23: - fldt 48+_CONSTANTS@GOTOFF(%ebx) - fstpt 64(%esp) - fldt 64(%esp) - faddp %st, %st(1) - fstpt (%esp) - fldt 208(%esp) - fld %st(0) - fldt 220(%esp) - movzwl 20(%ebp), %ecx - fadd %st, %st(1) - andl $32767, %ecx - fxch %st(1) - fsub %st, %st(2) - movl (%esp), %edx - cmpl $16183, %ecx - movl %edx, 76(%esp) - fxch %st(2) - fsubrp %st, %st(1) - fstpt 40(%esp) - jge ..B1.25 -..B1.24: - fldt 12(%ebp) - lea 196(%esp), %eax - fldt 36+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt -12(%eax) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - movzwl -4(%eax), %ecx - movl %ecx, %edx - andl $32767, %edx - andl $-32768, %ecx - addl $-16639, %edx - orl $-49153, %ecx - fstpt (%eax) - movl %edx, 52(%esp) - movw %cx, -4(%eax) - jmp ..B1.27 -..B1.25: - fldt 12(%ebp) - addl $-16, %esp - lea 200(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - fstpt 32(%esp) - call __libm_sinhl_k80 -..B1.86: - fldt 32(%esp) - addl $16, %esp -..B1.26: - fldt 64(%esp) - lea 196(%esp), %eax - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - movl (%esp), %edx - movl %edx, 52(%esp) -..B1.27: - fldt 184(%esp) - fld %st(0) - fldt (%eax) - fadd %st, %st(1) - fxch %st(1) - fstpt 28(%esp) - fldt 28(%esp) - addl $-16, %esp - fsubp %st, %st(2) - fsubp %st, %st(1) - fldt 24(%ebp) - fstpt (%esp) - lea 248(%esp), %edx - movl %edx, 12(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt -104(%edx) - call __libm_cosl_k80 -..B1.87: - fldt 144(%esp) - fldt 32(%esp) - addl $16, %esp -..B1.28: - fldt 232(%esp) - fld %st(0) - fldt 244(%esp) - movl 52(%esp), %ecx - fadd %st, %st(1) - movzwl 36(%esp), %edx - fxch %st(1) - fsub %st, %st(2) - andl $32767, %edx - fxch %st(2) - fsubrp %st, %st(1) - fxch %st(1) - fmul %st(4), %st - fxch %st(1) - fmulp %st, %st(4) - addl %ecx, 76(%esp) - addl %ecx, %edx - fxch %st(3) - fstpt (%esp) - fldt (%esp) - fld %st(1) - fldt 24+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(5) - fxch %st(4) - fstpt 144(%esp) - fldt 144(%esp) - fstpt 16(%esp) - fldt 28(%esp) - fld %st(0) - fld %st(1) - fxch %st(2) - fstpt 96(%esp) - fldt 96(%esp) - fldt 96+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - movzwl 24(%esp), %ecx - fxch %st(2) - fsub %st, %st(3) - andl $32767, %ecx - fsubp %st, %st(3) - fsub %st(2), %st - fadd %st(5), %st - fld %st(4) - fmul %st(2), %st - fsub %st, %st(7) - fsubp %st, %st(7) - fxch %st(4) - fsub %st(6), %st - fxch %st(1) - fstpt 80(%esp) - fld %st(1) - lea 64(%ecx), %eax - fmul %st(6), %st - cmpl %eax, %edx - fldt 40(%esp) - faddp %st, %st(2) - fld %st(1) - fmul %st(5), %st - fxch %st(7) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(6) - fmulp %st, %st(1) - faddp %st, %st(4) - fld %st(3) - fadd %st(2), %st - fstpt 112(%esp) - fldt 112(%esp) - fsubp %st, %st(2) - fxch %st(1) - fsubrp %st, %st(3) - fldt 144(%esp) - jge ..B1.33 -..B1.29: - addl $-64, %ecx - cmpl %ecx, %edx - jle ..B1.100 -..B1.30: - movl 52(%esp), %edx - fstpt 28(%esp) - fstpt 40(%esp) - lea (%edx,%edx), %ecx - movl %ecx, 12(%esp) - movzwl 36(%esp), %ecx - movl %ecx, %eax - subl %edx, %ecx - andl $-32768, %eax - andl $32767, %ecx - orl %ecx, %eax - movzwl 8(%esp), %ecx - andl $32767, %ecx - subl %edx, %ecx - movw %ax, 36(%esp) - testl %ecx, %ecx - jle ..B1.32 -..B1.31: - fldt 28(%esp) - movzwl 48(%esp), %edx - movl %edx, %ecx - subl 52(%esp), %edx - andl $-32768, %ecx - andl $32767, %edx - orl %edx, %ecx - movw %cx, 48(%esp) - fxch %st(1) - jmp ..B1.36 -..B1.32: - fldt 28(%esp) - fxch %st(1) - jmp ..B1.36 -..B1.33: - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fstpt 28(%esp) - fldt 28(%esp) - fstpt 40(%esp) - fldt 40(%esp) - jl ..B1.35 -..B1.34: - fstp %st(2) - fstp %st(0) - movl 52(%esp), %edx - lea (%edx,%edx), %ecx - movl %ecx, 12(%esp) - fxch %st(1) - jmp ..B1.36 -..B1.35: - fstp %st(3) - fstpt 96(%esp) - movl $0, 12(%esp) -..B1.36: - addl $-32, %esp - lea 288(%esp), %edx - movl %edx, (%esp) - fldt 128(%esp) - fstpt 4(%esp) - fxch %st(1) - fstpt 16(%esp) - fstpt -128(%edx) - fstpt -112(%edx) - call __libm_hypot2l_k80 -..B1.88: - fldt 176(%esp) - fldt 160(%esp) - addl $32, %esp -..B1.37: - fldt 64(%esp) - movzwl 8+_CONSTANTS@GOTOFF(%ebx), %edx - movl %edx, %eax - andl $-32768, %eax - faddp %st, %st(3) - fxch %st(2) - fstpt 52(%esp) - fldt _CONSTANTS@GOTOFF(%ebx) - movl 52(%esp), %ecx - addl %edx, %ecx - andl $32767, %ecx - fstpt 172(%esp) - orl %ecx, %eax - fldt 256(%esp) - fldt 268(%esp) - fldt 96(%esp) - fldt 28(%esp) - fldt 84+_CONSTANTS@GOTOFF(%ebx) - movw %ax, 180(%esp) - fmul %st, %st(2) - fxch %st(6) - fmulp %st, %st(2) - fmulp %st, %st(5) - fldt 172(%esp) - fmul %st, %st(3) - fxch %st(3) - fstpt 144(%esp) - fldt 144(%esp) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - fstpt 256(%esp) - fldt 256(%esp) - fldt 40(%esp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fstpt 268(%esp) - fldt 268(%esp) - fldt 112(%esp) - fld %st(0) - fdiv %st(4), %st - fstpt 160(%esp) - fldt 160(%esp) - fldt 72+_CONSTANTS@GOTOFF(%ebx) - fld %st(0) - fmul %st(2), %st - fld %st(0) - fsubr %st(3), %st - faddp %st, %st(1) - fld %st(0) - fsubrp %st, %st(3) - fxch %st(1) - fstpt 128(%esp) - fldt 128(%esp) - fmul %st(6), %st - fld %st(6) - fsub %st(1), %st - faddp %st, %st(1) - fld %st(0) - fsubrp %st, %st(7) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fmul %st(7), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) - fxch %st(4) - fsubrp %st, %st(1) - fsubp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 160(%esp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(0) - fldt 144(%esp) - addl $-32, %esp - fdivrp %st, %st(3) - fadd %st(2), %st - fstpt (%esp) - fldt (%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 12(%esp) - movl 108(%esp), %edx - subl 44(%esp), %edx - movl %edx, 24(%esp) - call __libm_scalbl_k80 -..B1.89: - addl $32, %esp -..B1.38: - fstpt 280(%esp) - cmpl $0, 28(%ebp) - jne ..B1.44 -..B1.39: - cmpl $0, 24(%ebp) - jne ..B1.44 -..B1.40: - fldt 24(%ebp) - testl %edi, %edi - fstpt 292(%esp) - je ..B1.42 -..B1.41: - fldcw 94(%esp) -..B1.42: - movl 280(%esp), %edx - movl %edx, (%esi) - movl 292(%esp), %edx - movl %edx, 12(%esi) - movl 296(%esp), %edx - movl %edx, 16(%esi) - movl 284(%esp), %ecx - movl 288(%esp), %edi - movl 300(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 304(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.73 -..B1.43: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.44: - movzwl 32(%ebp), %edx - andl $32767, %edx - cmpl $16183, %edx - jge ..B1.46 -..B1.45: - fldt 24(%ebp) - fldt 36+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 52(%esp) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - movzwl 60(%esp), %edx - movl %edx, %ecx - andl $-32768, %edx - andl $32767, %ecx - orl $-49153, %edx - addl $-16639, %ecx - movw %dx, 60(%esp) - fstpt 64(%esp) - fldt 64(%esp) - fldt 52(%esp) - fxch %st(1) - jmp ..B1.48 -..B1.46: - fldt 24(%ebp) - addl $-16, %esp - lea 68(%esp), %edx - fstpt (%esp) - movl %edx, 12(%esp) - call __libm_sinl_k80 -..B1.90: - addl $16, %esp -..B1.47: - fldt 52(%esp) - xorl %ecx, %ecx - fmul %st(1), %st - fstpt 52(%esp) - fldt 52(%esp) - fldt 64(%esp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) - fldt 64(%esp) -..B1.48: - fldt 80(%esp) - fld %st(0) - fld %st(3) - fadd %st(3), %st - fmul %st, %st(1) - fsub %st, %st(4) - fxch %st(4) - fsubrp %st, %st(3) - fld %st(3) - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fldt 16(%esp) - fmul %st, %st(2) - fld %st(0) - fsubr %st(3), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fxch %st(1) - fsub %st(2), %st - fxch %st(2) - fstpt 28(%esp) - fldt 28(%esp) - fldt (%esp) - faddp %st, %st(3) - fld %st(2) - fmul %st(5), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - fstpt 40(%esp) - fldt 256(%esp) - fld %st(0) - fdivr %st(2), %st - fld %st(1) - fldt 128(%esp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - fsubr %st(4), %st - faddp %st, %st(1) - fld %st(0) - fsubr %st(4), %st - fxch %st(2) - fmul %st(5), %st - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fmul %st(2), %st - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fld %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt 268(%esp) - fmul %st(3), %st - fsubrp %st, %st(2) - fldt 256(%esp) - fdivrp %st, %st(2) - addl $-32, %esp - fadd %st(1), %st - fstpt (%esp) - fldt (%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%esp) - subl 44(%esp), %ecx - movl %ecx, 24(%esp) - call __libm_scalbl_k80 -..B1.91: - addl $32, %esp -..B1.49: - fstpt 292(%esp) - jmp ..B1.69 -..B1.50: - movl 28(%ebp), %eax - testl %eax, %eax - jne ..B1.53 -..B1.51: - cmpl $0, 24(%ebp) - jne ..B1.53 -..B1.52: - movl 16(%ebp), %ecx - jmp ..B1.55 -..B1.53: - movzwl 32(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - jge ..B1.60 -..B1.54: - movl 16(%ebp), %ecx - cmpl $32767, %edx - je ..B1.77 -..B1.55: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - movl %ecx, 16(%esp) - call tanhl@PLT -..B1.92: - movl 16(%esp), %ecx - addl $16, %esp - fstpt 280(%esp) - testl %ecx, %ecx - jne ..B1.57 -..B1.56: - cmpl $0, 12(%ebp) - je ..B1.59 -..B1.57: - movzwl 32(%ebp), %edx - testl $32767, %edx - jle ..B1.76 -..B1.58: - fldt 24(%ebp) - addl $-16, %esp - fstpt (%esp) - call tanl@PLT -..B1.93: - fldt 60+_CONSTANTS@GOTOFF(%ebx) - addl $16, %esp - fmulp %st, %st(1) - fstpt 292(%esp) - jmp ..B1.69 -..B1.59: - fldt 24(%ebp) - addl $-16, %esp - fstpt (%esp) - call tanl@PLT -..B1.94: - addl $16, %esp - fstpt 292(%esp) - jmp ..B1.69 -..B1.60: - cmpl $32767, %edx - jge ..B1.62 -..B1.61: - fldt 24(%ebp) - addl $-16, %esp - fstpt (%esp) - call tanl@PLT -..B1.95: - addl $16, %esp - fstpt 280(%esp) - fldt 280(%esp) - fstpt 292(%esp) - jmp ..B1.69 -..B1.62: - cmpl $-2147483648, 16(%ebp) - jne ..B1.64 -..B1.63: - cmpl $0, 12(%ebp) - je ..B1.65 -..B1.64: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call tanhl@PLT -..B1.96: - fldt 24(%ebp) - addl $16, %esp - fmul %st(1), %st - fstpt 292(%esp) - fstpt 280(%esp) - jmp ..B1.69 -..B1.65: - cmpl $-2147483648, %eax - jne ..B1.67 -..B1.66: - cmpl $0, 24(%ebp) - je ..B1.68 -..B1.67: - fldt 24(%ebp) - addl $-16, %esp - fmul %st(0), %st - fstpt 24(%ebp) - fldt 12(%ebp) - fstpt (%esp) - call tanhl@PLT -..B1.97: - fldt 60+_CONSTANTS@GOTOFF(%ebx) - addl $16, %esp - fstpt 292(%esp) - fstpt 280(%esp) - jmp ..B1.69 -..B1.68: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call tanhl@PLT -..B1.98: - fldt 60+_CONSTANTS@GOTOFF(%ebx) - addl $16, %esp - movzbl 33(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - fxch %st(1) - fstpt 280(%esp) - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - fldt _CONSTANTS@GOTOFF(%ebx,%edx) - fmulp %st, %st(1) - fstpt 292(%esp) -..B1.69: - testl %edi, %edi - je ..B1.71 -..B1.70: - fldcw 94(%esp) -..B1.71: - movl 280(%esp), %edx - movl %edx, (%esi) - movl 292(%esp), %edx - movl %edx, 12(%esi) - movl 296(%esp), %edx - movl %edx, 16(%esi) - movl 284(%esp), %ecx - movl 288(%esp), %edi - movl 300(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 304(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.73 -..B1.72: - movl %esi, %eax - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.73: - call __stack_chk_fail@PLT -..B1.74: - movzbl 301(%esp), %edx - movzbl 33(%ebp), %ecx - andl $127, %edx - andl $-128, %ecx - orl %ecx, %edx - jmp ..B1.18 -..B1.76: - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fldt 24(%ebp) - fmulp %st, %st(1) - fstpt 292(%esp) - jmp ..B1.69 -..B1.77: - cmpl $-2147483648, %ecx - jne ..B1.60 -..B1.78: - cmpl $0, 12(%ebp) - jne ..B1.60 -..B1.79: - fldt 12(%ebp) - addl $-16, %esp - fstpt (%esp) - call tanhl@PLT -..B1.99: - addl $16, %esp - fstpt 280(%esp) - jmp ..B1.57 -..B1.81: - xorl %edi, %edi - jmp ..B1.7 -..B1.100: - cmpl %eax, %edx - jmp ..B1.33 - .align 16,0x90 - .type ctanhl,@function - .size ctanhl,.-ctanhl - .data -# -- End ctanhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .word 32768 - .word 16415 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .word 0 - .word 16384 - .word 0 - .word 32768 - .word 16416 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,108 - .data - .hidden __libm_sinl_k80 - .hidden __libm_cosl_k80 - .hidden __libm_sinhl_k80 - .hidden __libm_coshl_k80 - .hidden __libm_hypot2l_k80 - .hidden __libm_scalbl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanl.S deleted file mode 100644 index 0d6e6e8894..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ctanl.S +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctanl.c" - .text -..TXTST0: -# -- Begin ctanl - .text - .align 16,0x90 - .globl ctanl -ctanl: -# parameter 1: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - movl 8(%ebp), %esi - xorl %esp, %edx - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - movl %edx, 100(%esp) - fstpt 4(%esp) - fldt 4(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - fldt 28(%esp) - fstpt 40(%esp) - fldt 40(%esp) - fstpt 52(%esp) - fldt 52(%esp) - fstpt 64(%esp) -..B1.2: - fnstcw 2(%esp) -..B1.3: - movzwl 2(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.20 -..B1.4: - orl $-64768, %ecx - movw %cx, (%esp) -..B1.5: - fldcw (%esp) -..B1.6: - movl $1, %edi -..B1.7: - fldt 24(%ebp) - movzwl 32(%ebp), %edx - andl $32767, %edx - fstpt 52(%esp) - cmpl $32767, %edx - fldt 12(%ebp) - fstpt 64(%esp) - jl ..B1.10 -..B1.8: - cmpl $-2147483648, 28(%ebp) - jne ..B1.11 -..B1.9: - cmpl $0, 24(%ebp) - jne ..B1.11 -..B1.10: - movzbl 33(%ebp), %ecx - notl %ecx - movzbl 61(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 61(%esp) -..B1.11: - addl $-32, %esp - lea 108(%esp), %ecx - movl %ecx, (%esp) - lea 4(%esp), %edx - movl -24(%ecx), %ecx - movl %ecx, (%edx) - movl 88(%esp), %ecx - movl %ecx, 4(%edx) - movl 92(%esp), %ecx - movl %ecx, 8(%edx) - movl 96(%esp), %ecx - movl %ecx, 12(%edx) - movl 100(%esp), %ecx - movl %ecx, 16(%edx) - movl 104(%esp), %ecx - movl %ecx, 20(%edx) - call ctanhl@PLT -..B1.23: - addl $28, %esp - fldt 76(%esp) - movzwl 84(%esp), %edx - andl $32767, %edx - fstpt 4(%esp) - fldt 4(%esp) - cmpl $32767, %edx - fstpt 40(%esp) - fldt 88(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 28(%esp) - jl ..B1.14 -..B1.12: - cmpl $-2147483648, 8(%esp) - jne ..B1.15 -..B1.13: - cmpl $0, 4(%esp) - jne ..B1.15 -..B1.14: - movzbl 13(%esp), %ecx - notl %ecx - movzbl 49(%esp), %edx - andl $128, %ecx - andl $127, %edx - orl %ecx, %edx - movb %dl, 49(%esp) -..B1.15: - testl %edi, %edi - je ..B1.17 -..B1.16: - fldcw 2(%esp) -..B1.17: - movl 28(%esp), %edx - movl %edx, (%esi) - movl 40(%esp), %edx - movl %edx, 12(%esi) - movl 44(%esp), %edx - movl %edx, 16(%esi) - movl 32(%esp), %ecx - movl 36(%esp), %edi - movl 48(%esp), %edx - movl %ecx, 4(%esi) - movl %edi, 8(%esi) - movl %edx, 20(%esi) - movl 100(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.19 -..B1.18: - movl %esi, %eax - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B1.19: - call __stack_chk_fail@PLT -..B1.20: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type ctanl,@function - .size ctanl,.-ctanl - .data -# -- End ctanl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_bessel.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_bessel.S deleted file mode 100644 index 1f582af9a9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_bessel.S +++ /dev/null @@ -1,7116 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_bessel.c" - .text -..TXTST0: -# -- Begin __dpml_ux_bessel__ - .text - .align 16,0x90 -__dpml_ux_bessel__: -# parameter 1: %eax -# parameter 2: 196 + %esp -# parameter 3: 204 + %esp -# parameter 4: %edx -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $172, %esp - movl %eax, %ebp - movl %edx, 44(%esp) - movl $2, %edx - movl %gs:20, %ecx - movl 196(%esp), %esi - xorl %esp, %ecx - subl %edx, %esi - movl %ecx, 168(%esp) - movl $0, %ecx - movl 200(%esp), %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - sbbl %ecx, %edi - jge ..B1.28 -..B1.2: - movl 204(%esp), %edi - movl 196(%esp), %esi - movl 12(%ebp), %ecx - movl %ecx, 40(%esp) - movl 4(%ebp), %ecx - lea (%esi,%edi), %esi - movl 8(%ebp), %edx - lea (%esi,%esi,2), %esi - cmpl $5, %ecx - jle ..B1.20 -..B1.72: - lea __bessel_x_table@GOTOFF(%ebx), %edi -..B1.3: - xorl %ecx, %ecx - lea 144(%esp), %edx - addl $20, %esp - pushl %edx - pushl %ecx - pushl $2 - pushl %ebp - pushl %ecx - call __dpml_divide__ -..B1.4: - movl 196(%esp), %edx - orl 200(%esp), %edx - jne ..B1.6 -..B1.5: - movl $10, 32(%esp) - lea 18168(%edi), %ecx - addl $18504, %edi - jmp ..B1.7 -..B1.6: - movl $9, 32(%esp) - lea 18872(%edi), %ecx - addl $19208, %edi -..B1.7: - addl $28, %esp - lea 20(%esp), %edx - pushl %edx - pushl $268435456 - pushl $68 - pushl $0 - pushl $9 - pushl %ecx - lea 140(%esp), %ecx - pushl %ecx - call __dpml_evaluate_rational__ -..B1.8: - xorl %ecx, %ecx - lea 72(%esp), %edx - addl $28, %esp - pushl %edx - pushl %ecx - pushl $70 - pushl %ecx - pushl 20(%esp) - pushl %edi - lea 140(%esp), %esi - pushl %esi - call __dpml_evaluate_rational__ -..B1.9: - movl 200(%esp), %edi - movl 196(%esp), %esi - lea (%edi,%edi), %ecx - lea (%esi,%esi), %edx - shrl $31, %esi - orl %ecx, %esi - movl $1, %ecx - xorl %eax, %eax - subl %edx, %ecx - movl $0, %edx - lea 96(%esp), %edi - sbbl %esi, %eax - subl 204(%esp), %ecx - sbbl 208(%esp), %eax - addl $24, %esp - pushl %edi - pushl %edx - pushl $3 - pushl %eax - pushl %ecx - pushl %ebp - call __dpml_ux_sincos -..B1.10: - addl $12, %esp - lea 36(%esp), %edx - pushl %edx - lea 88(%esp), %eax - pushl %eax - pushl %edx - call __dpml_multiply__ -..B1.11: - addl $12, %esp - lea 60(%esp), %edx - lea 108(%esp), %eax - pushl %edx - pushl %eax - pushl %edx - call __dpml_multiply__ -..B1.12: - movl 196(%esp), %eax - orl 200(%esp), %eax - je ..B1.14 -..B1.13: - xorl %eax, %eax - jmp ..B1.15 -..B1.14: - movl $1, %eax -..B1.15: - addl $20, %esp - lea 28(%esp), %edx - pushl %edx - pushl $0 - pushl %eax - lea 64(%esp), %eax - pushl %eax - pushl %edx - call __dpml_addsub__ -..B1.16: - lea 72(%esp), %ecx - pushl %ecx - pushl $0 - pushl $1 - lea 156(%esp), %ebp - pushl %ebp - call __dpml_ux_sqrt_evaluation__ -..B1.17: - addl $28, %esp - pushl 32(%esp) - lea 64(%esp), %eax - pushl %eax - lea 44(%esp), %edx - pushl %edx - call __dpml_multiply__ -..B1.18: - movl 168(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.31 -..B1.19: - addl $172, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.20: - je ..B1.63 -..B1.21: - movl 19552+__bessel_x_table@GOTOFF(%ebx,%esi,8), %esi - testl %ecx, %ecx - lea __bessel_x_table@GOTOFF(%ebx,%esi), %edi - jl ..B1.33 -..B1.22: - negl %ecx - addl $5, %ecx - cmpl $31, %ecx - jbe ..B1.24 -..B1.23: - movl 40(%esp), %edx - movl $0, 32(%esp) - shrl %cl, %edx -..B1.25: - movl 32(%esp), %ecx - jmp ..B1.26 -..B1.24: - movl 40(%esp), %esi - shrdl %cl, %esi, %edx - shrl %cl, %esi - movl %esi, 32(%esp) - jmp ..B1.25 -..B1.27: - movl 12(%edi), %esi - andl $1023, %esi - addl %esi, %edi -..B1.26: - movl %edx, %eax - movl %ecx, %esi - subl (%edi), %eax - sbbl 4(%edi), %esi - jb ..B1.33 -..B1.68: - orl %esi, %eax - je ..B1.33 - jmp ..B1.27 -..B1.28: - movl 196(%esp), %ecx - movl %ebp, %eax - movl 200(%esp), %esi - movl 204(%esp), %edi - movl 208(%esp), %edx - movl %ecx, 4(%esp) - movl %esi, 8(%esp) - movl %edi, 12(%esp) - movl %edx, 16(%esp) - movl 44(%esp), %edx - call __dpml_ux_large_order_bessel__ -..B1.29: - movl 168(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.31 -..B1.30: - addl $172, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.31: - call __stack_chk_fail@PLT -..B1.33: - movl 12(%edi), %edx - xorl %ecx, %ecx - movl 8(%edi), %esi - movl %edx, 40(%esp) - movl %esi, %edx - andl $8388608, %edx - orl %ecx, %edx - jne ..B1.35 -..B1.34: - movl %ebp, 36(%esp) - jmp ..B1.38 -..B1.35: - movl 16(%edi), %edx - lea 48(%esp), %ecx - movl 20(%edi), %eax - movl %edx, 32(%ecx) - movl %eax, 36(%ecx) - movl 24(%edi), %edx - movl 28(%edi), %eax - movl %edx, 40(%ecx) - xorl %edx, %edx - movl %eax, 44(%ecx) - movl %edx, 24(%ecx) - movl 40(%edi), %eax - andl $7, %eax - movl %eax, -16(%ecx) - movl %eax, 28(%ecx) - lea 72(%esp), %eax - addl $20, %esp - pushl %ecx - pushl %edx - pushl $1 - pushl %eax - pushl %ebp - call __dpml_addsub__ -..B1.36: - movl 32(%edi), %edx - movl 36(%edi), %ecx - movl %edx, 80(%esp) - movl %ecx, 84(%esp) - movl 40(%edi), %edx - movl 44(%edi), %ecx - movl %edx, 88(%esp) - movl 32(%esp), %edx - addl $-128, %edx - movl %ecx, 92(%esp) - movl %edx, 76(%esp) - addl $20, %esp - lea 28(%esp), %ecx - pushl %ecx - pushl $0 - pushl $1 - lea 64(%esp), %edx - pushl %edx - pushl %ecx - call __dpml_addsub__ -..B1.37: - lea 48(%esp), %edx - movl %edx, -12(%edx) -..B1.38: - movl %esi, %edx - movl %esi, %eax - shrl $14, %edx - andl $16777216, %eax - xorl %ecx, %ecx - addl $48, %edi - andl $127, %edx - orl %ecx, %eax - je ..B1.43 -..B1.39: - addl $-48, %esp - movl 84(%esp), %ecx - movl %ecx, (%esp) - movl %edx, 4(%esp) - movl %esi, %edx - shrl $7, %edx - andl $127, %edx - movl $0, 8(%esp) - cmpl $31, %edx - movl %edi, 12(%esp) - movl %edx, 80(%esp) - jbe ..B1.41 -..B1.40: - movl $1, %edx - xorl %edi, %edi - movl 80(%esp), %ecx - shll %cl, %edx - jmp ..B1.42 -..B1.41: - xorl %edx, %edx - movl $1, %edi - movl 80(%esp), %ecx - shldl %cl, %edi, %edx - shll %cl, %edi -..B1.42: - addl $-1, %edi - adcl $-1, %edx - movl %edi, 16(%esp) - movl %edx, 20(%esp) - movl %esi, %edx - andl $127, %edx - movl %edx, 24(%esp) - movl $0, 28(%esp) - movl 92(%esp), %ecx - movl %ecx, 32(%esp) - call __dpml_evaluate_packed_poly__@PLT -..B1.71: - addl $48, %esp - jmp ..B1.44 -..B1.43: - addl $28, %esp - pushl 16(%esp) - pushl 16(%esp) - pushl %esi - pushl $0 - pushl %edx - pushl %edi - pushl 32(%esp) - call __dpml_evaluate_rational__ -..B1.44: - movl %esi, %ecx - xorl %edx, %edx - shrl $11, %ecx - andl $3, %ecx - orl %ecx, %edx - je ..B1.46 -..B1.45: - addl $20, %esp - xorl %edi, %edi - addl $-1, %ecx - movl 24(%esp), %edx - pushl %edx - adcl $-1, %edi - pushl %edi - pushl %ecx - lea 24(%edx), %ecx - pushl %ecx - pushl %edx - call __dpml_addsub__ -..B1.46: - movl %esi, %ecx - xorl %edx, %edx - andl $4194304, %ecx - orl %edx, %ecx - je ..B1.48 -..B1.47: - addl $12, %esp - movl 32(%esp), %edx - pushl %edx - pushl %edx - pushl 32(%esp) - call __dpml_multiply__ -..B1.48: - movl %esi, %ecx - xorl %edx, %edx - andl $8192, %ecx - orl %edx, %ecx - je ..B1.50 -..B1.49: - movl 44(%esp), %edx - xorl $-2147483648, (%edx) -..B1.50: - andl $2097152, %esi - xorl %edx, %edx - orl %edx, %esi - je ..B1.58 -..B1.51: - cmpl 36(%esp), %ebp - jne ..B1.53 -..B1.52: - movl 40(%esp), %edx - sarl $26, %edx - subl %edx, 4(%ebp) -..B1.53: - movl $1, %edx - negl %edx - addl 196(%esp), %edx - orl 200(%esp), %edx - je ..B1.61 -..B1.54: - addl $12, %esp - lea 19664+__bessel_x_table@GOTOFF(%ebx), %ecx - lea 36(%esp), %esi - pushl %esi - pushl %ecx - pushl %ebp - call __dpml_ux_log__ -..B1.55: - movl 196(%esp), %ecx - xorl %edx, %edx - movl 200(%esp), %edi - movl %ebp, %eax - movl %ecx, 4(%esp) - movl %edi, 8(%esp) - movl %edx, 12(%esp) - movl %edx, 16(%esp) - lea 72(%esp), %edx - call __dpml_ux_bessel__ -..B1.56: - addl $12, %esp - pushl %esi - pushl %esi - lea 68(%esp), %eax - pushl %eax - call __dpml_multiply__ -..B1.57: - addl $20, %esp - movl 24(%esp), %eax - pushl %eax - pushl $0 - pushl $1 - pushl %eax - pushl %esi - call __dpml_addsub__ -..B1.58: - movl 168(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.31 - jmp ..B1.19 -..B1.61: - addl $20, %esp - lea 19640+__bessel_x_table@GOTOFF(%ebx), %ecx - lea 52(%esp), %edx - pushl %edx - pushl $0 - pushl $2 - pushl %ebp - pushl %ecx - call __dpml_divide__ -..B1.62: - addl $20, %esp - xorl %edx, %edx - movl 24(%esp), %esi - pushl %esi - pushl %edx - pushl %edx - lea 64(%esp), %ecx - pushl %ecx - pushl %esi - call __dpml_addsub__ - jmp ..B1.54 -..B1.63: - movl %edx, %eax - lea __bessel_x_table@GOTOFF(%ebx), %edi - subl 19544+__bessel_x_table@GOTOFF(%ebx,%esi,8), %eax - movl %eax, 36(%esp) - movl 40(%esp), %eax - sbbl 19548+__bessel_x_table@GOTOFF(%ebx,%esi,8), %eax - movl %eax, 32(%esp) - jb ..B1.64 -..B1.69: - movl 36(%esp), %eax - orl 32(%esp), %eax - jne ..B1.3 -..B1.64: - movl 19552+__bessel_x_table@GOTOFF(%ebx,%esi,8), %esi - addl %esi, %edi - jmp ..B1.22 - .align 16,0x90 - .type __dpml_ux_bessel__,@function - .size __dpml_ux_bessel__,.-__dpml_ux_bessel__ - .data -# -- End __dpml_ux_bessel__ - .text -# -- Begin __dpml_ux_large_order_bessel__ - .text - .align 16,0x90 -__dpml_ux_large_order_bessel__: -# parameter 1: %eax -# parameter 2: 12 + %ebp -# parameter 3: 20 + %ebp -# parameter 4: %edx -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $292, %esp - xorl %ebx, %ebx - movl %edx, 76(%esp) - lea 240(%esp), %edx - movl %gs:20, %ecx - movl %eax, %esi - xorl %esp, %ecx - movl %ecx, 48(%edx) - addl $20, %esp - pushl %edx - pushl %ebx - pushl $2 - pushl %esi - pushl %ebx - call __dpml_divide__ -..B2.2: - movl 12(%ebp), %ebx - lea 168(%esp), %eax - movl 16(%ebp), %edi - lea 192(%esp), %edx - movl %eax, -108(%eax) - lea 216(%esp), %ecx - movl %edx, -52(%eax) - movl %ecx, -76(%eax) - movl %ebx, 8(%eax) - movl %edi, 12(%eax) - addl $12, %esp - pushl $0 - pushl $2 - pushl %eax - call __dpml_ffs_and_shift__ -..B2.3: - movl $64, %ecx - xorl %edi, %edi - subl %eax, %ecx - movl 4(%esi), %eax - sbbl %edx, %edi - cltd - movl %edx, %ebx - movl %ecx, %edx - movl %eax, 64(%esp) - subl %eax, %edx - movl 12(%ebp), %eax - movl %eax, 120(%esp) - movl 16(%ebp), %eax - movl %esi, 32(%esp) - movl %edi, %esi - movl %eax, 124(%esp) - sbbl %ebx, %esi - fildll 120(%esp) - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - fstpl 128(%esp) - fldl 128(%esp) - movl %edx, 120(%esp) - fldt .L_2il0floatpacket.96@GOTOFF(%ebx) - movl %esi, 124(%esp) - movl %edx, 44(%esp) - movl $1, %edx - subl %ecx, %edx - movl %esi, 40(%esp) - movl $0, %esi - sbbl %edi, %esi - fstpt 104(%esp) - fldt 104(%esp) - fildll 120(%esp) - movl %ecx, 120(%esp) - movl %edi, 124(%esp) - movl $2, %edi - fstpl 128(%esp) - negl %edi - fldl 128(%esp) - fildll 120(%esp) - fstpl 128(%esp) - fldt .L_2il0floatpacket.97@GOTOFF(%ebx) - movl %edx, 120(%esp) - fsubrp %st, %st(1) - fmulp %st, %st(2) - fldl 128(%esp) - fldt .L_2il0floatpacket.98@GOTOFF(%ebx) - movl %esi, 124(%esp) - fsubrp %st, %st(1) - fmulp %st, %st(1) - addl 20(%ebp), %edi - fsubrp %st, %st(1) - fstpl 128(%esp) - fldl 128(%esp) - fildll 120(%esp) - fstpl 128(%esp) - fldl 128(%esp) - movl 32(%esp), %esi - fsub %st(1), %st - fstpl 128(%esp) - fldl 128(%esp) - orl 24(%ebp), %edi - je ..B2.62 -..B2.4: - fstp %st(1) - fldt .L_2il0floatpacket.100@GOTOFF(%ebx) - fcompp - fnstsw %ax - sahf - jbe ..B2.8 -..B2.5: - movl $-65536, %ecx - xorl %eax, %eax -..B2.6: - movl 76(%esp), %edx - movl %eax, (%edx) - xorl %eax, %eax - movl %ecx, 4(%edx) - movl %eax, 8(%edx) - movl $-2147483648, 12(%edx) - movl %eax, 16(%edx) - movl %eax, 20(%edx) - movl 288(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B2.41 -..B2.7: - addl $292, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.8: - negl %ecx - movl 8(%esi), %edx - addl $64, %ecx - movl %edx, 48(%esp) - cmpl $31, %ecx - movl 12(%esi), %edx - jbe ..B2.10 -..B2.9: - movl %edx, %edi - shrl %cl, %edi - movl $0, 36(%esp) - movl %edi, 32(%esp) - jmp ..B2.11 -..B2.10: - movl 48(%esp), %edi - shrdl %cl, %edx, %edi - movl %edi, 32(%esp) - movl %edx, %edi - shrl %cl, %edi - movl %edi, 36(%esp) -..B2.11: - xorl %ecx, %ecx - movl 40(%esp), %edi - subl %ecx, %edi - jl ..B2.47 -..B2.66: - orl 44(%esp), %edi - je ..B2.47 -..B2.12: - movl %edx, %ecx - movl 48(%esp), %eax - shll $31, %ecx - shrl $1, %eax - shrl $1, %edx - orl %eax, %ecx - movl %ecx, 120(%esp) - movl %edx, 124(%esp) - fildll 120(%esp) - movl 12(%ebp), %edx - movl 16(%ebp), %esi - movl %edx, 120(%esp) - movl %esi, 124(%esp) - fstps 44(%esp) - fildll 120(%esp) - fstps 120(%esp) - flds 120(%esp) - fstpt 32(%esp) - fldt 32(%esp) - fstps (%esp) - call log2f@PLT -..B2.13: - fldt .L_2il0floatpacket.101@GOTOFF(%ebx) - fmul %st(1), %st - fldt .L_2il0floatpacket.102@GOTOFF(%ebx) - faddp %st, %st(1) - fstps 120(%esp) - fldt .L_2il0floatpacket.103@GOTOFF(%ebx) - fldt 32(%esp) - faddp %st, %st(1) - flds 44(%esp) - fxch %st(1) - fadds 120(%esp) - fstps 120(%esp) - flds 120(%esp) - fstpt 80(%esp) - fstps (%esp) - fstpt 48(%esp) - call log2f@PLT -..B2.71: - fldt 48(%esp) -..B2.14: - fldt .L_2il0floatpacket.104@GOTOFF(%ebx) - fldt .L_2il0floatpacket.105@GOTOFF(%ebx) - fldt 104(%esp) - fldt 32(%esp) - movl 64(%esp), %eax - fadd %st(1), %st - addl $-64, %eax - movl %eax, 120(%esp) - fildl 120(%esp) - fstps 120(%esp) - fldt 80(%esp) - fxch %st(6) - fadds 120(%esp) - faddp %st, %st(4) - fxch %st(3) - fstps 120(%esp) - flds 120(%esp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fsts 44(%esp) - fsubp %st, %st(3) - fxch %st(2) - fstpl 128(%esp) - fldl 128(%esp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstps 120(%esp) - flds 120(%esp) - fstpt 48(%esp) - fstps (%esp) - call log2f@PLT -..B2.15: - fldt .L_2il0floatpacket.106@GOTOFF(%ebx) - fstpt 64(%esp) - fldt 64(%esp) - fld %st(1) - fmulp %st, %st(1) - fxch %st(1) - fsubs 44(%esp) - fstpl 128(%esp) - fldt 48(%esp) - faddp %st, %st(1) - fldl 128(%esp) - fdivrp %st, %st(1) - fstps 120(%esp) - fldt 80(%esp) - fldt 104(%esp) - fxch %st(1) - fadds 120(%esp) - fstpl 128(%esp) - fldl 128(%esp) - fmulp %st, %st(1) - fstps 120(%esp) - flds 120(%esp) - fstpt 32(%esp) - fldt 32(%esp) - fstps (%esp) - call log2f@PLT -..B2.16: - fldt 64(%esp) - fldt 48(%esp) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fldt 32(%esp) - fxch %st(2) - fsubs 44(%esp) - fstpl 128(%esp) - fldl 128(%esp) - fdivrp %st, %st(1) - fstps 120(%esp) - fldt 104(%esp) - fxch %st(1) - fadds 120(%esp) - fstpl 128(%esp) - fldl 128(%esp) - fmulp %st, %st(1) - fstps 120(%esp) - flds 120(%esp) - fstpt 80(%esp) - fldt 80(%esp) - fstps (%esp) - call log2f@PLT -..B2.17: - fldt 64(%esp) - movl $-2147483648, %ecx - fmul %st(1), %st - fxch %st(1) - fsubs 44(%esp) - fstpl 128(%esp) - fldt 48(%esp) - movl 16(%ebp), %edx - faddp %st, %st(1) - fldl 128(%esp) - fdivrp %st, %st(1) - fstps 120(%esp) - fldt 80(%esp) - fldt 104(%esp) - fldt .L_2il0floatpacket.107@GOTOFF(%ebx) - flds .L_2il0floatpacket.108@GOTOFF(%ebx) - fxch %st(3) - fadds 120(%esp) - fstpl 128(%esp) - fldl 128(%esp) - fmulp %st, %st(2) - fxch %st(1) - fstps 120(%esp) - flds 120(%esp) - faddp %st, %st(1) - fcom %st(1) - fnstsw %ax - fsub %st, %st(1) - sahf - jae ..L5 - fst %st(1) -..L5: - fstp %st(0) - jae ..L6 - movl $0, %ecx -..L6: - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 96(%esp) - fldcw 32(%esp) - movl 12(%ebp), %eax - addl $1, %eax - movl 96(%esp), %esi - adcl $0, %edx - addl 100(%esp), %ecx - movl %esi, 140(%esp) - subl %eax, %esi - movl %ecx, %edi - movl %edx, 136(%esp) - sbbl %edx, %edi - jb ..B2.19 -..B2.67: - orl %edi, %esi - je ..B2.19 -..B2.18: - movl %ecx, 136(%esp) - jmp ..B2.20 -..B2.19: - movl %eax, 140(%esp) -..B2.20: - movl 140(%esp), %edx - xorl %eax, %eax - andl $1, %edx - movl %eax, 168(%esp) - orl %eax, %edx - movl $-262144, 172(%esp) - movl %eax, 176(%esp) - movl %eax, 180(%esp) - movl %eax, 184(%esp) - movl %eax, 188(%esp) - movl %eax, 192(%esp) - movl $1, 196(%esp) - movl %eax, 200(%esp) - movl $-2147483648, 204(%esp) - movl %eax, 208(%esp) - movl %eax, 212(%esp) - movl %eax, 144(%esp) - je ..B2.22 -..B2.21: - movl $-262144, 148(%esp) - movl %eax, 152(%esp) - movl %eax, 156(%esp) - movl %eax, 160(%esp) - movl %eax, 164(%esp) - jmp ..B2.23 -..B2.22: - movl $1, 148(%esp) - movl %eax, 152(%esp) - movl $-2147483648, 156(%esp) - movl %eax, 160(%esp) - movl %eax, 164(%esp) -..B2.23: - movl 136(%esp), %esi - movl 140(%esp), %ecx - movl %ecx, %eax - shrl $31, %eax - lea (%esi,%esi), %edi - orl %edi, %eax - addl %ecx, %ecx - movl %ecx, 272(%esp) - movl %eax, 276(%esp) - addl $12, %esp - lea 252(%esp), %edx - pushl $0 - pushl $2 - pushl %edx - call __dpml_ffs_and_shift__ -..B2.24: - movl 268(%esp), %ecx - addl $-2, %ecx - cmpl $31, %ecx - jbe ..B2.26 -..B2.25: - movl $-2147483648, %eax - xorl %edx, %edx - shrl %cl, %eax - jmp ..B2.27 -..B2.26: - xorl %eax, %eax - movl $-2147483648, %edx - shrdl %cl, %edx, %eax - shrl %cl, %edx -..B2.27: - movl %ebx, 44(%esp) - movl %edx, 32(%esp) - movl %eax, 36(%esp) - movl 92(%esp), %ebx - movl 60(%esp), %esi -..B2.28: - addl $12, %esp - pushl %ebx - lea 256(%esp), %eax - pushl %eax - lea 236(%esp), %edx - pushl %edx - call __dpml_multiply__ -..B2.29: - addl $12, %esp - pushl %ebx - pushl %ebx - pushl 112(%esp) - call __dpml_multiply__ -..B2.30: - addl $12, %esp - xorl %ecx, %ecx - pushl %ecx - pushl %ecx - pushl %ebx - call __dpml_ffs_and_shift__ -..B2.31: - addl $12, %esp - xorl %ecx, %ecx - pushl %ecx - pushl %ecx - pushl %esi - call __dpml_ffs_and_shift__ -..B2.32: - addl $20, %esp - pushl %ebx - pushl $0 - pushl $1 - pushl %esi - pushl %ebx - call __dpml_addsub__ -..B2.33: - movl 140(%esp), %eax - addl $-1, %eax - movl 136(%esp), %edx - adcl $-1, %edx - movl %eax, 140(%esp) - orl %edx, %eax - movl %edx, 136(%esp) - je ..B2.42 -..B2.34: - movl 140(%esp), %edx - movl 136(%esp), %eax - subl 12(%ebp), %edx - subl 16(%ebp), %eax - orl %eax, %edx - jne ..B2.36 -..B2.35: - movl 76(%esp), %eax - movl (%ebx), %edx - movl 4(%ebx), %ecx - movl 8(%ebx), %edi - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl %edi, 8(%eax) - movl 12(%ebx), %edx - movl 16(%ebx), %ecx - movl 20(%ebx), %edi - movl %edx, 12(%eax) - movl %ecx, 16(%eax) - movl %edi, 20(%eax) -..B2.36: - movl 140(%esp), %edx - xorl %eax, %eax - andl $1, %edx - orl %eax, %edx - jne ..B2.38 -..B2.37: - addl $20, %esp - lea 124(%esp), %edx - pushl %edx - pushl %eax - pushl %eax - pushl %ebx - pushl %edx - call __dpml_addsub__ -..B2.38: - movl %esi, %eax - movl $-2147483648, %ecx - movl 116(%esp), %esi - movl %ebx, 116(%esp) - movl %eax, %ebx - movl 272(%esp), %eax - subl 36(%esp), %eax - movl 276(%esp), %edx - sbbl 32(%esp), %edx - movl %edx, %edi - subl %ecx, %edi - jae ..B2.40 -..B2.39: - addl %eax, %eax - movl 36(%esp), %ecx - adcl %edx, %edx - addl %ecx, %ecx - movl 32(%esp), %edi - adcl %edi, %edi - decl 268(%esp) - movl %ecx, 36(%esp) - movl %edi, 32(%esp) -..B2.40: - movl %eax, 272(%esp) - movl %edx, 276(%esp) - jmp ..B2.28 -..B2.41: - call __stack_chk_fail@PLT -..B2.42: - movl %ebx, 92(%esp) - lea 144(%esp), %esi - movl -100(%esi), %ebx - xorl %eax, %eax - incl 4(%esi) - addl $20, %esp - pushl %esi - pushl %eax - pushl %eax - pushl %esi - pushl 88(%esp) - call __dpml_addsub__ -..B2.43: - addl $20, %esp - movl 56(%esp), %eax - pushl %eax - pushl $0 - pushl $2 - pushl %esi - pushl %eax - call __dpml_divide__ -..B2.44: - movl 288(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.41 - jmp ..B2.7 -..B2.47: - movl 44(%esp), %ecx - orl 40(%esp), %ecx - jne ..B2.49 -..B2.48: - movl 32(%esp), %ecx - subl 12(%ebp), %ecx - movl 36(%esp), %edi - sbbl 16(%ebp), %edi - jb ..B2.12 -..B2.49: - movl 20(%ebp), %edi - xorl %ecx, %ecx - movl 24(%ebp), %edx - movl %esi, %eax - movl %ecx, 4(%esp) - movl %ecx, 8(%esp) - movl %edi, 12(%esp) - movl %edx, 16(%esp) - lea 168(%esp), %edx - call __dpml_ux_bessel__ -..B2.50: - movl 20(%ebp), %ecx - movl %esi, %eax - movl 24(%ebp), %edi - movl $1, 4(%esp) - movl $0, 8(%esp) - movl %ecx, 12(%esp) - movl %edi, 16(%esp) - movl 116(%esp), %edx - call __dpml_ux_bessel__ -..B2.51: - movl 12(%ebp), %esi - xorl %edx, %edx - addl $-1, %esi - movl 16(%ebp), %eax - adcl $-1, %eax - movl $-2147483648, %ecx - movl %ebx, 44(%esp) - movl %edx, 264(%esp) - movl $2, 268(%esp) - movl %edx, 272(%esp) - movl $-2147483648, 276(%esp) - movl %edx, 280(%esp) - movl %edx, 284(%esp) - movl %ecx, 36(%esp) - movl %eax, 40(%esp) - movl %edx, 32(%esp) - movl 92(%esp), %ebx -..B2.52: - addl $12, %esp - pushl %ebx - lea 256(%esp), %eax - pushl %eax - lea 236(%esp), %edx - pushl %edx - call __dpml_multiply__ -..B2.53: - addl $12, %esp - pushl %ebx - pushl %ebx - pushl 112(%esp) - call __dpml_multiply__ -..B2.54: - addl $20, %esp - pushl %ebx - pushl $0 - pushl $1 - pushl 52(%esp) - pushl %ebx - call __dpml_addsub__ -..B2.55: - addl $-1, %esi - movl 40(%esp), %eax - adcl $-1, %eax - xorl %edx, %edx - movl %eax, 40(%esp) - subl %edx, %eax - jl ..B2.76 -..B2.68: - orl %esi, %eax - je ..B2.76 -..B2.56: - movl 60(%esp), %ecx - movl 116(%esp), %edx - movl 32(%esp), %eax - movl %ebx, 116(%esp) - movl %ecx, %ebx - movl 272(%esp), %ecx - addl %eax, %ecx - movl %edx, 60(%esp) - movl %ecx, %edi - movl 276(%esp), %edx - adcl 36(%esp), %edx - subl %eax, %edi - movl %edx, %eax - sbbl 36(%esp), %eax - jae ..B2.58 -..B2.57: - movl %edx, %edi - shll $31, %edi - shrl $1, %ecx - orl %edi, %ecx - movl 36(%esp), %edi - movl %edi, %eax - shrl $1, %edi - movl %edi, 36(%esp) - movl 32(%esp), %edi - shll $31, %eax - shrl $1, %edi - shrl $1, %edx - orl %eax, %edi - incl 268(%esp) - addl $-2147483648, %edx - movl %edi, 32(%esp) -..B2.58: - movl %ecx, 272(%esp) - movl %edx, 276(%esp) - jmp ..B2.52 -..B2.76: - movl %ebx, 92(%esp) - movl 44(%esp), %ebx -..B2.59: - movl 92(%esp), %eax - movl 76(%esp), %edx - movl (%eax), %ecx - movl 4(%eax), %esi - movl %ecx, (%edx) - movl %esi, 4(%edx) - movl 8(%eax), %edi - movl 12(%eax), %ecx - movl 16(%eax), %esi - movl 20(%eax), %eax - movl %edi, 8(%edx) - movl %ecx, 12(%edx) - movl %esi, 16(%edx) - movl %eax, 20(%edx) - movl 288(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B2.41 - jmp ..B2.7 -..B2.62: - fstp %st(0) - fldt .L_2il0floatpacket.99@GOTOFF(%ebx) - fcompp - fnstsw %ax - sahf - jae ..B2.49 - jp ..B2.49 -..B2.63: - movl $65536, %ecx - movl $-2147483648, %eax - jmp ..B2.6 - .align 16,0x90 - .type __dpml_ux_large_order_bessel__,@function - .size __dpml_ux_large_order_bessel__,.-__dpml_ux_large_order_bessel__ - .data -# -- End __dpml_ux_large_order_bessel__ - .text -# -- Begin __j0q - .text - .align 16,0x90 - .globl __j0q -__j0q: -# parameter 1: 24 + %ebp -..B3.1: -..L7: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $164, %esp - xorl %esi, %esi - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 160(%esp) - call ..L8 -..L8: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L8](%ebx), %ebx - movl $1, 40(%esp) - movl %esi, 44(%esp) - movl %esi, 32(%esp) - lea __bessel_x_table@GOTOFF(%ebx), %ecx - movl %esi, 36(%esp) - addl $24, %esp - lea 8(%esp), %eax - lea 84(%esp), %edx - pushl %eax - lea 124(%esp), %eax - pushl %eax - pushl %ecx - pushl %edx - pushl %esi - lea 24(%ebp), %ecx - pushl %ecx - call __dpml_unpack_x_or_y__ -..B3.2: - subl %esi, %edx - jl ..B3.6 -..B3.4: - movl %esi, 4(%esp) - lea 60(%esp), %edx - movl %esi, 8(%esp) - lea 108(%esp), %eax - movl %esi, 12(%esp) - movl %esi, (%eax) - movl %esi, 16(%esp) - call __dpml_ux_bessel__ -..B3.5: - addl $28, %esp - lea 4(%esp), %edx - pushl %edx - pushl %esi - pushl %esi - pushl %esi - pushl %esi - lea 136(%esp), %ecx - pushl %ecx - lea 56(%esp), %esi - pushl %esi - call __dpml_pack__ -..B3.6: - movl 144(%esp), %edx - movl %edx, (%edi) - movl 148(%esp), %ecx - movl 152(%esp), %esi - movl 156(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 160(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B3.8 -..B3.7: - movl %edi, %eax - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B3.8: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __j0q,@function - .size __j0q,.-__j0q - .data -# -- End __j0q - .text -# -- Begin __j1q - .text - .align 16,0x90 - .globl __j1q -__j1q: -# parameter 1: 24 + %ebp -..B4.1: -..L9: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $164, %esp - xorl %ecx, %ecx - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 160(%esp) - call ..L10 -..L10: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L10](%ebx), %ebx - movl $1, 40(%esp) - movl %ecx, 44(%esp) - movl %ecx, 32(%esp) - lea 8+__bessel_x_table@GOTOFF(%ebx), %esi - movl %ecx, 36(%esp) - addl $24, %esp - lea 8(%esp), %eax - lea 84(%esp), %edx - pushl %eax - lea 124(%esp), %eax - pushl %eax - pushl %esi - pushl %edx - pushl %ecx - movl 36(%ebp), %esi - lea 24(%ebp), %ecx - pushl %ecx - andl $-2147483648, %esi - call __dpml_unpack_x_or_y__ -..B4.16: - movl %edx, %ecx -..B4.2: - xorl %edx, %edx - subl %edx, %ecx - jge ..B4.6 -..B4.3: - movl 156(%esp), %ecx - movl %ecx, %edx - movl $2147418112, %eax - andl $2147418112, %edx - subl %eax, %edx - xorl %eax, %eax - orl %edx, %eax - movl 152(%esp), %edx - je ..B4.5 -..B4.4: - orl %esi, %ecx -..B4.5: - movl %edx, 152(%esp) - movl %ecx, 156(%esp) - jmp ..B4.11 -..B4.6: - movl $1, 4(%esp) - lea 60(%esp), %edx - xorl %ecx, %ecx - lea 108(%esp), %eax - movl %ecx, 8(%esp) - movl %ecx, 12(%esp) - movl %ecx, (%eax) - movl %ecx, 16(%esp) - call __dpml_ux_bessel__ -..B4.7: - xorl %esi, 60(%esp) - je ..B4.9 -..B4.8: - movl $8, %ecx - jmp ..B4.10 -..B4.9: - xorl %ecx, %ecx -..B4.10: - movl $513, %esi - addl $28, %esp - shrl %cl, %esi - lea 4(%esp), %edx - andl $255, %esi - pushl %edx - pushl 4+__bessel_error_codes@GOTOFF(%ebx) - pushl __bessel_error_codes@GOTOFF(%ebx) - pushl 4+__bessel_error_codes@GOTOFF(%ebx,%esi,8) - pushl __bessel_error_codes@GOTOFF(%ebx,%esi,8) - lea 136(%esp), %edx - pushl %edx - lea 56(%esp), %edx - pushl %edx - call __dpml_pack__ -..B4.11: - movl 144(%esp), %edx - movl %edx, (%edi) - movl 148(%esp), %ecx - movl 152(%esp), %esi - movl 156(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 160(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B4.13 -..B4.12: - movl %edi, %eax - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B4.13: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __j1q,@function - .size __j1q,.-__j1q - .data -# -- End __j1q - .text -# -- Begin __jnq - .text - .align 16,0x90 - .globl __jnq -__jnq: -# parameter 1: 12 + %ebp -# parameter 2: 24 + %ebp -..B5.1: -..L11: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $164, %esp - movl 8(%ebp), %esi - movl %esi, 64(%esp) - movl 12(%ebp), %esi - movl %esi, %eax - cltd - movl %gs:20, %ecx - movl %edx, %ebx - xorl %esp, %ecx - movl %ecx, 160(%esp) - xorl %ecx, %ecx - movl 36(%ebp), %edi - subl %ecx, %edx - movl $1, 40(%esp) - movl %ecx, 44(%esp) - movl %ecx, 32(%esp) - movl %ecx, 36(%esp) - jge ..B5.3 -..B5.2: - movl %esi, %edx - xorl %esi, %esi - xorl $-2147483648, %edi - subl %edx, %esi - movl %ebx, %edx - movl %ecx, %ebx - sbbl %edx, %ebx -..B5.3: - movl %esi, %ecx - xorl %edx, %edx - andl $1, %ecx - orl %edx, %ecx - jne ..B5.6 -..B5.5: - xorl %edi, %edi -..B5.6: - movl $2, %ecx - movl %esi, %edx - andl $-2147483648, %edi - movl %ebx, %eax - subl %ecx, %edx - movl $0, %ecx - sbbl %ecx, %eax - jl ..B5.8 -..B5.24: - orl %eax, %edx - je ..B5.8 -..B5.7: - movl $2, %edx - jmp ..B5.9 -..B5.8: - movl %esi, %edx -..B5.9: - call ..L12 -..L12: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L12](%ecx), %ecx - addl $24, %esp - movl %ecx, 36(%esp) - lea 8(%esp), %eax - lea __bessel_x_table@GOTOFF(%ecx,%edx,8), %edx - lea 92(%esp), %ecx - pushl %eax - lea 124(%esp), %eax - pushl %eax - pushl %edx - pushl %ecx - pushl $0 - lea 24(%ebp), %edx - pushl %edx - call __dpml_unpack_x_or_y__ -..B5.25: - movl %edx, %ecx -..B5.10: - xorl %edx, %edx - subl %edx, %ecx - jge ..B5.14 -..B5.11: - movl 156(%esp), %edx - movl %edx, %eax - movl $2147418112, %ebx - andl $2147418112, %eax - subl %ebx, %eax - xorl %esi, %esi - movl 152(%esp), %ecx - orl %eax, %esi - je ..B5.13 -..B5.12: - orl %edi, %edx -..B5.13: - movl %ecx, 152(%esp) - movl %edx, 156(%esp) - jmp ..B5.19 -..B5.14: - movl %esi, 4(%esp) - lea 68(%esp), %edx - movl %ebx, 8(%esp) - lea 116(%esp), %eax - xorl %ecx, %ecx - movl %ecx, 12(%esp) - movl %ecx, (%eax) - movl %ecx, 16(%esp) - call __dpml_ux_bessel__ -..B5.15: - xorl %edi, 68(%esp) - je ..B5.17 -..B5.16: - movl $8, %ecx - jmp ..B5.18 -..B5.17: - xorl %ecx, %ecx -..B5.18: - addl $28, %esp - movl $1027, %edx - shrl %cl, %edx - lea 4(%esp), %eax - pushl %eax - movl 28(%eax), %ebx - movzbl %dl, %edx - pushl 4+__bessel_error_codes@GOTOFF(%ebx) - pushl __bessel_error_codes@GOTOFF(%ebx) - pushl 4+__bessel_error_codes@GOTOFF(%ebx,%edx,8) - pushl __bessel_error_codes@GOTOFF(%ebx,%edx,8) - lea 136(%esp), %esi - pushl %esi - lea 64(%esp), %edi - pushl %edi - call __dpml_pack__ -..B5.19: - movl 64(%esp), %esi - movl 144(%esp), %eax - movl 148(%esp), %edx - movl 152(%esp), %ecx - movl 156(%esp), %ebx - movl %eax, (%esi) - movl %edx, 4(%esi) - movl %ecx, 8(%esi) - movl %ebx, 12(%esi) - movl 160(%esp), %edi - xorl %esp, %edi - cmpl %gs:20, %edi - jne ..B5.21 -..B5.20: - movl %esi, %eax - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B5.21: - movl 60(%esp), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type __jnq,@function - .size __jnq,.-__jnq - .data -# -- End __jnq - .text -# -- Begin __y0q - .text - .align 16,0x90 - .globl __y0q -__y0q: -# parameter 1: 24 + %ebp -..B6.1: -..L13: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $164, %esp - xorl %esi, %esi - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 160(%esp) - call ..L14 -..L14: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L14](%ebx), %ebx - movl $1, 40(%esp) - movl %esi, 44(%esp) - movl %esi, 32(%esp) - lea 40+__bessel_x_table@GOTOFF(%ebx), %ecx - movl %esi, 36(%esp) - addl $24, %esp - lea 8(%esp), %eax - lea 84(%esp), %edx - pushl %eax - lea 124(%esp), %eax - pushl %eax - pushl %ecx - pushl %edx - pushl %esi - lea 24(%ebp), %ecx - pushl %ecx - call __dpml_unpack_x_or_y__ -..B6.2: - subl %esi, %edx - jl ..B6.6 -..B6.4: - movl %esi, 4(%esp) - lea 60(%esp), %edx - movl %esi, 8(%esp) - lea 108(%esp), %eax - movl $2, 12(%esp) - movl %esi, (%eax) - movl %esi, 16(%esp) - call __dpml_ux_bessel__ -..B6.5: - addl $28, %esp - lea 4(%esp), %edx - pushl %edx - pushl %esi - pushl %esi - pushl %esi - pushl %esi - lea 136(%esp), %ecx - pushl %ecx - lea 56(%esp), %esi - pushl %esi - call __dpml_pack__ -..B6.6: - movl 144(%esp), %edx - movl %edx, (%edi) - movl 148(%esp), %ecx - movl 152(%esp), %esi - movl 156(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 160(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B6.8 -..B6.7: - movl %edi, %eax - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B6.8: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __y0q,@function - .size __y0q,.-__y0q - .data -# -- End __y0q - .text -# -- Begin __y1q - .text - .align 16,0x90 - .globl __y1q -__y1q: -# parameter 1: 24 + %ebp -..B7.1: -..L15: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $164, %esp - xorl %ecx, %ecx - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 160(%esp) - call ..L16 -..L16: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L16](%ebx), %ebx - movl $1, 40(%esp) - movl %ecx, 44(%esp) - movl %ecx, 32(%esp) - lea 48+__bessel_x_table@GOTOFF(%ebx), %esi - movl %ecx, 36(%esp) - addl $24, %esp - lea 8(%esp), %eax - lea 84(%esp), %edx - pushl %eax - lea 124(%esp), %eax - pushl %eax - pushl %esi - pushl %edx - pushl %ecx - movl 36(%ebp), %esi - lea 24(%ebp), %ecx - pushl %ecx - andl $-2147483648, %esi - call __dpml_unpack_x_or_y__ -..B7.16: - movl %edx, %ecx -..B7.2: - xorl %edx, %edx - subl %edx, %ecx - jge ..B7.6 -..B7.3: - movl 156(%esp), %ecx - movl %ecx, %edx - movl $2147418112, %eax - andl $2147418112, %edx - subl %eax, %edx - xorl %eax, %eax - orl %edx, %eax - movl 152(%esp), %edx - je ..B7.5 -..B7.4: - orl %esi, %ecx -..B7.5: - movl %edx, 152(%esp) - movl %ecx, 156(%esp) - jmp ..B7.11 -..B7.6: - movl $1, 4(%esp) - lea 60(%esp), %edx - xorl %ecx, %ecx - lea 108(%esp), %eax - movl %ecx, 8(%esp) - movl $2, 12(%esp) - movl %ecx, (%eax) - movl %ecx, 16(%esp) - call __dpml_ux_bessel__ -..B7.7: - xorl %esi, 60(%esp) - je ..B7.9 -..B7.8: - movl $24, %ecx - jmp ..B7.10 -..B7.9: - movl $16, %ecx -..B7.10: - movl $83886080, %esi - addl $28, %esp - shrl %cl, %esi - lea 4(%esp), %edx - andl $255, %esi - pushl %edx - pushl 4+__bessel_error_codes@GOTOFF(%ebx,%esi,8) - pushl __bessel_error_codes@GOTOFF(%ebx,%esi,8) - pushl 4+__bessel_error_codes@GOTOFF(%ebx) - pushl __bessel_error_codes@GOTOFF(%ebx) - lea 136(%esp), %edx - pushl %edx - lea 56(%esp), %edx - pushl %edx - call __dpml_pack__ -..B7.11: - movl 144(%esp), %edx - movl %edx, (%edi) - movl 148(%esp), %ecx - movl 152(%esp), %esi - movl 156(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 160(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B7.13 -..B7.12: - movl %edi, %eax - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B7.13: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __y1q,@function - .size __y1q,.-__y1q - .data -# -- End __y1q - .text -# -- Begin __ynq - .text - .align 16,0x90 - .globl __ynq -__ynq: -# parameter 1: 12 + %ebp -# parameter 2: 24 + %ebp -..B8.1: -..L17: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $164, %esp - movl 8(%ebp), %esi - movl %esi, 64(%esp) - movl 12(%ebp), %esi - movl %esi, %eax - cltd - movl %gs:20, %ecx - movl %edx, %ebx - xorl %esp, %ecx - movl %ecx, 160(%esp) - xorl %ecx, %ecx - movl 36(%ebp), %edi - subl %ecx, %edx - movl $1, 40(%esp) - movl %ecx, 44(%esp) - movl %ecx, 32(%esp) - movl %ecx, 36(%esp) - jge ..B8.3 -..B8.2: - movl %esi, %edx - xorl %esi, %esi - xorl $-2147483648, %edi - subl %edx, %esi - movl %ebx, %edx - movl %ecx, %ebx - sbbl %edx, %ebx -..B8.3: - movl %esi, %ecx - xorl %edx, %edx - andl $1, %ecx - orl %edx, %ecx - jne ..B8.6 -..B8.5: - xorl %edi, %edi -..B8.6: - movl $2, %ecx - movl %esi, %edx - andl $-2147483648, %edi - movl %ebx, %eax - subl %ecx, %edx - movl $0, %ecx - sbbl %ecx, %eax - jl ..B8.8 -..B8.24: - orl %eax, %edx - je ..B8.8 -..B8.7: - movl $2, %edx - jmp ..B8.9 -..B8.8: - movl %esi, %edx -..B8.9: - call ..L18 -..L18: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L18](%ecx), %ecx - addl $24, %esp - movl %ecx, 36(%esp) - lea 8(%esp), %eax - lea 40+__bessel_x_table@GOTOFF(%ecx,%edx,8), %edx - lea 92(%esp), %ecx - pushl %eax - lea 124(%esp), %eax - pushl %eax - pushl %edx - pushl %ecx - pushl $0 - lea 24(%ebp), %edx - pushl %edx - call __dpml_unpack_x_or_y__ -..B8.25: - movl %edx, %ecx -..B8.10: - xorl %edx, %edx - subl %edx, %ecx - jge ..B8.14 -..B8.11: - movl 156(%esp), %edx - movl %edx, %eax - movl $2147418112, %ebx - andl $2147418112, %eax - subl %ebx, %eax - xorl %esi, %esi - movl 152(%esp), %ecx - orl %eax, %esi - je ..B8.13 -..B8.12: - orl %edi, %edx -..B8.13: - movl %ecx, 152(%esp) - movl %edx, 156(%esp) - jmp ..B8.19 -..B8.14: - movl %esi, 4(%esp) - lea 68(%esp), %edx - movl %ebx, 8(%esp) - lea 116(%esp), %eax - movl $2, 12(%esp) - xorl %ecx, %ecx - movl %ecx, (%eax) - movl %ecx, 16(%esp) - call __dpml_ux_bessel__ -..B8.15: - xorl %edi, 68(%esp) - je ..B8.17 -..B8.16: - movl $24, %ecx - jmp ..B8.18 -..B8.17: - movl $16, %ecx -..B8.18: - addl $28, %esp - movl $117833728, %edx - shrl %cl, %edx - lea 4(%esp), %eax - pushl %eax - movzbl %dl, %edx - movl 28(%eax), %ebx - pushl 4+__bessel_error_codes@GOTOFF(%ebx,%edx,8) - pushl __bessel_error_codes@GOTOFF(%ebx,%edx,8) - pushl 4+__bessel_error_codes@GOTOFF(%ebx) - pushl __bessel_error_codes@GOTOFF(%ebx) - lea 136(%esp), %esi - pushl %esi - lea 64(%esp), %edi - pushl %edi - call __dpml_pack__ -..B8.19: - movl 64(%esp), %esi - movl 144(%esp), %eax - movl 148(%esp), %edx - movl 152(%esp), %ecx - movl 156(%esp), %ebx - movl %eax, (%esi) - movl %edx, 4(%esi) - movl %ecx, 8(%esi) - movl %ebx, 12(%esi) - movl 160(%esp), %edi - xorl %esp, %edi - cmpl %gs:20, %edi - jne ..B8.21 -..B8.20: - movl %esi, %eax - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B8.21: - movl 60(%esp), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type __ynq,@function - .size __ynq,.-__ynq - .data -# -- End __ynq - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.96: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.96,@object - .size .L_2il0floatpacket.96,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.97: - .byte 0x00,0xf0,0x25,0x8d,0xd1,0x3a,0xaa,0xb8,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.97,@object - .size .L_2il0floatpacket.97,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.98: - .byte 0x00,0xe0,0x96,0x4f,0xd2,0x1c,0xb2,0xe9,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.98,@object - .size .L_2il0floatpacket.98,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.99: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x0d,0x40,0x00,0x00 - .type .L_2il0floatpacket.99,@object - .size .L_2il0floatpacket.99,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.100: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0xdc,0x80,0x0d,0xc0,0x00,0x00 - .type .L_2il0floatpacket.100,@object - .size .L_2il0floatpacket.100,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.101: - .byte 0x00,0x00,0x00,0x00,0x00,0xe2,0x95,0x8f,0x02,0x40,0x00,0x00 - .type .L_2il0floatpacket.101,@object - .size .L_2il0floatpacket.101,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.102: - .byte 0x00,0x00,0x00,0x00,0x00,0x91,0xdd,0xa3,0x03,0x40,0x00,0x00 - .type .L_2il0floatpacket.102,@object - .size .L_2il0floatpacket.102,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.103: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.103,@object - .size .L_2il0floatpacket.103,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.104: - .byte 0x00,0x00,0x00,0x00,0x00,0x3b,0xaa,0xb8,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.104,@object - .size .L_2il0floatpacket.104,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.105: - .byte 0x00,0x00,0x00,0x00,0x00,0xa9,0xe2,0xe6,0x05,0x40,0x00,0x00 - .type .L_2il0floatpacket.105,@object - .size .L_2il0floatpacket.105,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.106: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x01,0x40,0x00,0x00 - .type .L_2il0floatpacket.106,@object - .size .L_2il0floatpacket.106,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.107: - .byte 0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.107,@object - .size .L_2il0floatpacket.107,12 - .space 4, 0x00 # pad - .align 8 -__bessel_error_codes: - .long 0x00000000,0x00000000 - .long 0x00000081,0x00000000 - .long 0x00000082,0x00000000 - .long 0x00000083,0x00000000 - .long 0x00000084,0x00000000 - .long 0x0000008c,0x00000000 - .long 0x00000090,0x00000000 - .long 0x0000008f,0x00000000 - .type __bessel_error_codes,@object - .size __bessel_error_codes,64 - .align 4 -__bessel_x_table: - .long 4527112 - .long 882002208 - .long 4527112 - .long 609222656 - .long 4527112 - .long 340787200 - .long 0 - .long 0 - .long 2 - .long 0 - .long 2162758664 - .long 1056696334 - .long 15799304 - .long 796782607 - .long 2163807240 - .long 536868879 - .long 0 - .long 0 - .long 136 - .long 0 - .long 137 - .long 0 - .long 138 - .long 0 - .long 139 - .long 0 - .long 141 - .long 0 - .long 142 - .long 0 - .long 2943289511 - .long 514282869 - .long 12841452 - .long 4160750144 - .long 3101294049 - .long 2582161780 - .long 1312087176 - .long 1489306811 - .long 19644348 - .long 45583118 - .long 2057404378 - .long 3169098683 - .long 3035415578 - .long 893843444 - .long 337 - .long 0 - .long 1783633315 - .long 1777532950 - .long 15440 - .long 0 - .long 1098024042 - .long 3019602458 - .long 814258 - .long 0 - .long 225592541 - .long 3983311110 - .long 37212291 - .long 0 - .long 2852953733 - .long 2839658485 - .long 1458597808 - .long 0 - .long 4135355606 - .long 2153351721 - .long 1172250754 - .long 11 - .long 1418543880 - .long 1134849789 - .long 691229967 - .long 312 - .long 221999422 - .long 2942275987 - .long 892175906 - .long 7082 - .long 183528404 - .long 1091137495 - .long 33669418 - .long 128779 - .long 2062842702 - .long 3593466159 - .long 2350547321 - .long 1825862 - .long 3242024385 - .long 1732973365 - .long 1193716022 - .long 19485117 - .long 1037993584 - .long 3230003709 - .long 1091314384 - .long 149320065 - .long 865418991 - .long 2685299556 - .long 265703573 - .long 769292094 - .long 699915261 - .long 300027119 - .long 1754654657 - .long 2412548808 - .long 1339780591 - .long 830077839 - .long 3026944889 - .long 3889644321 - .long 4103150545 - .long 428322165 - .long 2828272473 - .long 2229721522 - .long 2 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 367384380 - .long 4326353 - .long 2148 - .long 0 - .long 3463681883 - .long 689773508 - .long 115915 - .long 0 - .long 1865635225 - .long 1707083401 - .long 5659280 - .long 0 - .long 57566505 - .long 2904667094 - .long 238211523 - .long 0 - .long 2506436672 - .long 4038967033 - .long 4242689712 - .long 1 - .long 900230770 - .long 2061385255 - .long 3485051853 - .long 59 - .long 3028033191 - .long 3312441247 - .long 2225862006 - .long 1485 - .long 2615755381 - .long 2826778077 - .long 1673380806 - .long 29835 - .long 355106258 - .long 2404984212 - .long 1016211595 - .long 472327 - .long 1503440334 - .long 2187913929 - .long 749248049 - .long 5704462 - .long 3147631426 - .long 2675016444 - .long 3447985920 - .long 50328354 - .long 3866449770 - .long 2131485908 - .long 579515915 - .long 305317757 - .long 1140039843 - .long 2720631446 - .long 456203296 - .long 1162742504 - .long 3233022265 - .long 2052397230 - .long 3523447208 - .long 2379802096 - .long 4168515076 - .long 4109278998 - .long 173166154 - .long 1854372776 - .long 2 - .long 0 - .long 1759813577 - .long 941616103 - .long 12816876 - .long 4227858976 - .long 1634871482 - .long 2963569369 - .long 683137648 - .long 2191944453 - .long 1580116130 - .long 3956925442 - .long 2076563715 - .long 714524096 - .long 1425042529 - .long 556010 - .long 0 - .long 0 - .long 2705967279 - .long 111702325 - .long 0 - .long 0 - .long 3713308765 - .long 3252247564 - .long 4 - .long 0 - .long 2100681787 - .long 1255672466 - .long 747 - .long 0 - .long 3619987580 - .long 2926178414 - .long 99420 - .long 0 - .long 2512861058 - .long 4217543322 - .long 11034432 - .long 0 - .long 2336326559 - .long 4282922616 - .long 1003296232 - .long 0 - .long 961767164 - .long 880412311 - .long 74952366 - .long 17 - .long 651638352 - .long 3978983768 - .long 3866178891 - .long 965 - .long 1596163871 - .long 1924711161 - .long 2529806704 - .long 41195 - .long 4143448985 - .long 965000726 - .long 2579935101 - .long 1257069 - .long 3252814079 - .long 2428688082 - .long 440599394 - .long 25575240 - .long 2037391762 - .long 3718324471 - .long 2593618161 - .long 310260222 - .long 3513168611 - .long 3970741434 - .long 128123702 - .long 1820672813 - .long 3402733470 - .long 3892867495 - .long 1270945360 - .long 2922852432 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1986947947 - .long 53265381 - .long 0 - .long 0 - .long 3270284272 - .long 1932314788 - .long 2 - .long 0 - .long 4084347788 - .long 3083682757 - .long 409 - .long 0 - .long 2552809164 - .long 4060325593 - .long 58254 - .long 0 - .long 3829133869 - .long 1310009699 - .long 6940915 - .long 0 - .long 3083277873 - .long 3078742755 - .long 680947971 - .long 0 - .long 3385783917 - .long 3611832980 - .long 2295622592 - .long 12 - .long 3171596108 - .long 2891115348 - .long 838843771 - .long 777 - .long 3771422218 - .long 1148182025 - .long 434950258 - .long 36482 - .long 393135174 - .long 80483983 - .long 3817092537 - .long 1235511 - .long 594123027 - .long 65162621 - .long 1218473398 - .long 28145623 - .long 3536617861 - .long 375824456 - .long 425129817 - .long 385237492 - .long 633237591 - .long 649365651 - .long 313906709 - .long 2545942344 - .long 873029334 - .long 423671385 - .long 1111949612 - .long 4235958077 - .long 4294967293 - .long 0 - .long 4159743234 - .long 1365459778 - .long 12825068 - .long 4227858976 - .long 1727418030 - .long 2322967398 - .long 1034782148 - .long 1761143608 - .long 748103118 - .long 681764742 - .long 1945985884 - .long 1037518188 - .long 2731139269 - .long 559058 - .long 0 - .long 0 - .long 3638286185 - .long 115784543 - .long 0 - .long 0 - .long 484918398 - .long 4013875548 - .long 4 - .long 0 - .long 868380236 - .long 106340102 - .long 775 - .long 0 - .long 3771022282 - .long 1666157217 - .long 103048 - .long 0 - .long 470645992 - .long 2100027425 - .long 11422638 - .long 0 - .long 1279250702 - .long 1788924811 - .long 1036227271 - .long 0 - .long 3067063928 - .long 3886781995 - .long 2181909072 - .long 17 - .long 103786080 - .long 119465851 - .long 1602069376 - .long 987 - .long 314091048 - .long 4120514941 - .long 1703984391 - .long 41665 - .long 3153492716 - .long 1769936992 - .long 3277791366 - .long 1248908 - .long 2480865882 - .long 357555572 - .long 1426486202 - .long 24641724 - .long 925215435 - .long 3875415602 - .long 2242310174 - .long 283170307 - .long 1206749920 - .long 1745236754 - .long 421850802 - .long 1512988987 - .long 554528472 - .long 4124376878 - .long 999726568 - .long 2331757501 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 844883384 - .long 48877615 - .long 0 - .long 0 - .long 613626429 - .long 1016694622 - .long 2 - .long 0 - .long 733791182 - .long 4037492605 - .long 370 - .long 0 - .long 2511602797 - .long 962949943 - .long 52209 - .long 0 - .long 2469661725 - .long 4226370589 - .long 6143972 - .long 0 - .long 2060721069 - .long 3581658067 - .long 593539814 - .long 0 - .long 2839602819 - .long 4222464368 - .long 3064291281 - .long 10 - .long 592311022 - .long 275206449 - .long 2221002398 - .long 647 - .long 3453980290 - .long 1100410175 - .long 2256369516 - .long 29367 - .long 965726650 - .long 341239821 - .long 1020304938 - .long 947922 - .long 2152956293 - .long 1358966229 - .long 796742083 - .long 20128900 - .long 2203770174 - .long 4010517667 - .long 1001215390 - .long 247246889 - .long 118635824 - .long 336180557 - .long 907042493 - .long 1379503488 - .long 1731363265 - .long 2376282645 - .long 3253758107 - .long 2155609720 - .long 4294967293 - .long 0 - .long 1133938837 - .long 1788275660 - .long 12816876 - .long 4227858976 - .long 328577348 - .long 3165265924 - .long 1527252342 - .long 1339392541 - .long 2394531985 - .long 243403399 - .long 1651082908 - .long 3768234999 - .long 1764410062 - .long 1127868 - .long 0 - .long 0 - .long 380965293 - .long 236501030 - .long 0 - .long 0 - .long 4057780011 - .long 296466121 - .long 10 - .long 0 - .long 1915520970 - .long 2413700929 - .long 1578 - .long 0 - .long 2515416277 - .long 1400529095 - .long 209346 - .long 0 - .long 1507502659 - .long 119133009 - .long 23121417 - .long 0 - .long 822245729 - .long 2123535665 - .long 2086838594 - .long 0 - .long 2761614169 - .long 2187408238 - .long 28089432 - .long 35 - .long 552668793 - .long 2572470762 - .long 825632309 - .long 1954 - .long 1089676525 - .long 4007660420 - .long 2284740089 - .long 81273 - .long 3790860620 - .long 4250011568 - .long 3911718864 - .long 2386138 - .long 1569325755 - .long 1413720016 - .long 751491568 - .long 45731817 - .long 955105128 - .long 1250521740 - .long 2097840313 - .long 506337017 - .long 1624392615 - .long 4258574603 - .long 3379569620 - .long 2624122564 - .long 4107144163 - .long 2368467334 - .long 1634973330 - .long 3993629493 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 818934838 - .long 89458952 - .long 0 - .long 0 - .long 1917175450 - .long 275918876 - .long 4 - .long 0 - .long 745599157 - .long 3172395316 - .long 667 - .long 0 - .long 2952822384 - .long 492051402 - .long 92937 - .long 0 - .long 2206545778 - .long 108664272 - .long 10789849 - .long 0 - .long 3593487476 - .long 2223761325 - .long 1025213015 - .long 0 - .long 4186460497 - .long 2115107000 - .long 546575231 - .long 18 - .long 4222869425 - .long 1697786641 - .long 1644425336 - .long 1067 - .long 2279245768 - .long 3297743944 - .long 144043411 - .long 46814 - .long 528690514 - .long 2305832912 - .long 3885610801 - .long 1446642 - .long 3948180674 - .long 1400240622 - .long 2848238597 - .long 29038477 - .long 365799999 - .long 3493109055 - .long 720503959 - .long 333431672 - .long 4157886487 - .long 4286999543 - .long 464978815 - .long 1767352013 - .long 3339500879 - .long 5789261 - .long 740497786 - .long 2709489262 - .long 4294967292 - .long 0 - .long 675685466 - .long 2210650544 - .long 12825068 - .long 4227858976 - .long 2475592912 - .long 4007987703 - .long 795233231 - .long 3544111414 - .long 3119445785 - .long 4019086602 - .long 1815298636 - .long 3651400695 - .long 250417896 - .long 1132895 - .long 0 - .long 0 - .long 1599660003 - .long 238893558 - .long 0 - .long 0 - .long 4178878964 - .long 640014589 - .long 10 - .long 0 - .long 3652653430 - .long 1664916825 - .long 1586 - .long 0 - .long 506609104 - .long 279824532 - .long 209578 - .long 0 - .long 3394823516 - .long 2710891899 - .long 23032181 - .long 0 - .long 1068742364 - .long 3396859346 - .long 2065409978 - .long 0 - .long 1532264156 - .long 1783373111 - .long 1537162281 - .long 34 - .long 3404313527 - .long 645034109 - .long 1238696626 - .long 1897 - .long 2815751506 - .long 1216048877 - .long 2381163022 - .long 77819 - .long 681356606 - .long 1742374831 - .long 1470157118 - .long 2245756 - .long 3583839604 - .long 3430133311 - .long 3428750273 - .long 42198880 - .long 2624104293 - .long 3836925937 - .long 2616934709 - .long 458497922 - .long 4091889117 - .long 2154475757 - .long 1334377092 - .long 2344404304 - .long 3811467832 - .long 4225344580 - .long 3014131639 - .long 3548440700 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2101683395 - .long 163038220 - .long 0 - .long 0 - .long 1150331703 - .long 1497034637 - .long 7 - .long 0 - .long 1295008257 - .long 2962522183 - .long 1195 - .long 0 - .long 193789761 - .long 1257830278 - .long 164530 - .long 0 - .long 3810960890 - .long 1878269909 - .long 18845080 - .long 0 - .long 2863024615 - .long 258783337 - .long 1761897164 - .long 0 - .long 2435461135 - .long 4254653612 - .long 2378780257 - .long 30 - .long 3635296493 - .long 4161741958 - .long 2074908190 - .long 1757 - .long 3250897880 - .long 2210089015 - .long 2132559608 - .long 74948 - .long 2166588251 - .long 3427170173 - .long 756319997 - .long 2241223 - .long 107629526 - .long 2814783011 - .long 580266263 - .long 43402774 - .long 2488417593 - .long 4037868436 - .long 2684236844 - .long 482393505 - .long 1636043988 - .long 2549915956 - .long 1055410979 - .long 2500896928 - .long 2063349270 - .long 3231350804 - .long 4156853657 - .long 3802515847 - .long 4294967291 - .long 0 - .long 191176124 - .long 2632795962 - .long 12816876 - .long 4227858976 - .long 1355787731 - .long 2425457148 - .long 539364904 - .long 1079897623 - .long 897043330 - .long 2066037045 - .long 1494461853 - .long 2159441332 - .long 2366379069 - .long 1131867 - .long 0 - .long 0 - .long 161545432 - .long 239220328 - .long 0 - .long 0 - .long 762722372 - .long 576200370 - .long 10 - .long 0 - .long 3468035492 - .long 1642011913 - .long 1578 - .long 0 - .long 4253764606 - .long 2733292311 - .long 207600 - .long 0 - .long 2811470101 - .long 3269311219 - .long 22691285 - .long 0 - .long 1825255966 - .long 1189284970 - .long 2021353589 - .long 0 - .long 717526141 - .long 2244953537 - .long 1522450794 - .long 33 - .long 693565287 - .long 2333767130 - .long 715945548 - .long 1824 - .long 2985180089 - .long 935432992 - .long 3298648348 - .long 73985 - .long 1392357808 - .long 2627674694 - .long 3107871798 - .long 2108973 - .long 3903806984 - .long 3473675411 - .long 4215247699 - .long 39146099 - .long 2236383345 - .long 2775867013 - .long 1051360344 - .long 420899965 - .long 715332657 - .long 3204539120 - .long 3177676604 - .long 2136936117 - .long 1567224951 - .long 2092241552 - .long 1304170706 - .long 3225156278 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3855812151 - .long 148081926 - .long 0 - .long 0 - .long 1028065361 - .long 2668697612 - .long 6 - .long 0 - .long 728439685 - .long 892227407 - .long 1067 - .long 0 - .long 615906957 - .long 1950415562 - .long 145255 - .long 0 - .long 3284206690 - .long 4202823521 - .long 16428718 - .long 0 - .long 1576659798 - .long 3860187404 - .long 1513740564 - .long 0 - .long 1223428711 - .long 1000755308 - .long 3492805977 - .long 25 - .long 1363712775 - .long 563079876 - .long 2891886022 - .long 1456 - .long 1912616499 - .long 4019273916 - .long 1170042322 - .long 60815 - .long 2578791056 - .long 3763338518 - .long 4013988507 - .long 1778302 - .long 596369036 - .long 4167829437 - .long 495223280 - .long 33706721 - .long 3069656582 - .long 1025646758 - .long 2029385299 - .long 368055588 - .long 4229256156 - .long 252497843 - .long 655863054 - .long 1886199584 - .long 3468886839 - .long 4222796798 - .long 2935312587 - .long 2855531945 - .long 4294967291 - .long 0 - .long 2797952740 - .long 3054806814 - .long 12825068 - .long 4227858976 - .long 2679935261 - .long 2846977675 - .long 1518593598 - .long 771365947 - .long 2901840529 - .long 102047653 - .long 404923885 - .long 709259131 - .long 475240934 - .long 1125214 - .long 0 - .long 0 - .long 1836195777 - .long 237921320 - .long 0 - .long 0 - .long 620715017 - .long 203920416 - .long 10 - .long 0 - .long 2730396855 - .long 4074598327 - .long 1558 - .long 0 - .long 149951721 - .long 1542475780 - .long 204126 - .long 0 - .long 895086698 - .long 26046181 - .long 22194201 - .long 0 - .long 1052098554 - .long 3499556639 - .long 1964976743 - .long 0 - .long 3912081837 - .long 3256319751 - .long 845978380 - .long 32 - .long 2103533506 - .long 1288917748 - .long 344362072 - .long 1747 - .long 586607141 - .long 2789855780 - .long 789521480 - .long 70264 - .long 1029756229 - .long 2597195099 - .long 1036923741 - .long 1985929 - .long 570319344 - .long 1441637551 - .long 3714173380 - .long 36574571 - .long 1955754200 - .long 3807195269 - .long 90410504 - .long 390763661 - .long 2874958444 - .long 3633243115 - .long 2931863300 - .long 1975635819 - .long 32243731 - .long 2591757144 - .long 3895319176 - .long 2976685396 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3502958424 - .long 134252990 - .long 0 - .long 0 - .long 2150545646 - .long 4111632521 - .long 5 - .long 0 - .long 2999463670 - .long 3120574364 - .long 951 - .long 0 - .long 681502082 - .long 4195687681 - .long 128253 - .long 0 - .long 442998991 - .long 979480158 - .long 14344565 - .long 0 - .long 151969242 - .long 4070078334 - .long 1305331397 - .long 0 - .long 1826390155 - .long 1249420678 - .long 4104872299 - .long 21 - .long 1355768955 - .long 3758834208 - .long 3412700795 - .long 1220 - .long 1644384830 - .long 2135273975 - .long 2887874099 - .long 50190 - .long 1150050798 - .long 2243957583 - .long 2798432622 - .long 1445747 - .long 3460890697 - .long 2393108922 - .long 2317365582 - .long 27037249 - .long 135336093 - .long 93459488 - .long 4047224670 - .long 292116325 - .long 2632066877 - .long 2478679361 - .long 3592211274 - .long 1486901023 - .long 4259160346 - .long 2383522946 - .long 1229950112 - .long 2245322564 - .long 4294967291 - .long 0 - .long 4131724546 - .long 247119503 - .long 229390 - .long 4227858728 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1920268374 - .long 676671 - .long 0 - .long 0 - .long 2648589321 - .long 145893005 - .long 0 - .long 0 - .long 86363579 - .long 792199897 - .long 6 - .long 0 - .long 3569661012 - .long 3338031321 - .long 964 - .long 0 - .long 3537357668 - .long 2546852361 - .long 127350 - .long 0 - .long 1674639321 - .long 989707703 - .long 14008565 - .long 0 - .long 633069455 - .long 3178427980 - .long 1260770870 - .long 0 - .long 2929308222 - .long 1214878390 - .long 581189477 - .long 21 - .long 3037977477 - .long 3608983388 - .long 2481839655 - .long 1183 - .long 1571270935 - .long 1253493999 - .long 1158050441 - .long 49710 - .long 2588063047 - .long 3245086386 - .long 381774870 - .long 1491308 - .long 2638540175 - .long 477218587 - .long 3340530119 - .long 29826161 - .long 1326835123 - .long 1431655765 - .long 1431655765 - .long 357913941 - .long 4293747565 - .long 4294967295 - .long 4294967295 - .long 2147483647 - .long 4294964933 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 0 - .long 0 - .long 105434711 - .long 715574136 - .long 12825068 - .long 4227858976 - .long 2071479615 - .long 4114262957 - .long 3040350773 - .long 3578447305 - .long 1647168078 - .long 978698920 - .long 1144287138 - .long 3827795094 - .long 3787403973 - .long 562609 - .long 0 - .long 0 - .long 1649578671 - .long 117913179 - .long 0 - .long 0 - .long 3082368152 - .long 40122077 - .long 5 - .long 0 - .long 602895375 - .long 3952322020 - .long 783 - .long 0 - .long 3838465116 - .long 2181233212 - .long 103846 - .long 0 - .long 851468155 - .long 4001763569 - .long 11469451 - .long 0 - .long 3659498813 - .long 523695164 - .long 1037041443 - .long 0 - .long 2978199351 - .long 773277203 - .long 2051066178 - .long 17 - .long 4092624060 - .long 3930860161 - .long 3294762475 - .long 984 - .long 1105652893 - .long 1066438988 - .long 3642064414 - .long 41652 - .long 2196971596 - .long 2146191353 - .long 3442355222 - .long 1259557 - .long 3918894073 - .long 188553237 - .long 818155667 - .long 25403502 - .long 852571760 - .long 3121326526 - .long 2509267963 - .long 306918409 - .long 2896427178 - .long 2552665716 - .long 2229539464 - .long 1835168886 - .long 1453277625 - .long 518768794 - .long 1711011538 - .long 3459676865 - .long 0 - .long 0 - .long 2062472710 - .long 69166 - .long 0 - .long 0 - .long 673615662 - .long 23833985 - .long 0 - .long 0 - .long 630248642 - .long 363685088 - .long 1 - .long 0 - .long 288759411 - .long 2697305718 - .long 181 - .long 0 - .long 2130785052 - .long 823708847 - .long 25870 - .long 0 - .long 1430316470 - .long 3023974030 - .long 3089586 - .long 0 - .long 3827036731 - .long 3302510044 - .long 304068797 - .long 0 - .long 3738696708 - .long 3274114857 - .long 2670490624 - .long 5 - .long 287265850 - .long 4109473262 - .long 3360573366 - .long 350 - .long 38249035 - .long 2812769293 - .long 2052670485 - .long 16622 - .long 3926290357 - .long 206759826 - .long 2443135158 - .long 571444 - .long 1809246839 - .long 3759763742 - .long 1694050886 - .long 13356266 - .long 1847069514 - .long 3357213528 - .long 2594247192 - .long 192045418 - .long 1427481913 - .long 3504276391 - .long 3430325004 - .long 1423790384 - .long 900295939 - .long 3843660490 - .long 2372410664 - .long 3611630842 - .long 4294967294 - .long 0 - .long 774013863 - .long 1145724988 - .long 12816876 - .long 4227858976 - .long 2744287014 - .long 3766464413 - .long 1053213460 - .long 3969062622 - .long 1083456455 - .long 3049621789 - .long 3365086587 - .long 561540346 - .long 2996396832 - .long 575091 - .long 0 - .long 0 - .long 42660608 - .long 117761546 - .long 0 - .long 0 - .long 3056183536 - .long 25400137 - .long 5 - .long 0 - .long 3539354956 - .long 964064098 - .long 784 - .long 0 - .long 1133846550 - .long 3354628177 - .long 103987 - .long 0 - .long 837408368 - .long 1875825334 - .long 11493772 - .long 0 - .long 4020356818 - .long 15105701 - .long 1039623118 - .long 0 - .long 2432213228 - .long 4116600081 - .long 2213395342 - .long 17 - .long 346536517 - .long 2329406249 - .long 1562759336 - .long 985 - .long 1904777685 - .long 777730941 - .long 3468653957 - .long 41521 - .long 2565172885 - .long 3392131685 - .long 216627896 - .long 1245806 - .long 777484384 - .long 1373172746 - .long 529073424 - .long 24734325 - .long 1189796029 - .long 1140288371 - .long 1770133260 - .long 289389693 - .long 2194668596 - .long 3631308278 - .long 3147219318 - .long 1613893367 - .long 344927104 - .long 1168140252 - .long 980702046 - .long 2577974684 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1881749350 - .long 46062706 - .long 0 - .long 0 - .long 2009952654 - .long 475434148 - .long 2 - .long 0 - .long 3595153284 - .long 3894518978 - .long 350 - .long 0 - .long 1401741016 - .long 800557075 - .long 49546 - .long 0 - .long 1250374609 - .long 1417939249 - .long 5854570 - .long 0 - .long 3066837935 - .long 3745800702 - .long 568662855 - .long 0 - .long 4187727968 - .long 1730013373 - .long 1461665574 - .long 10 - .long 3341641980 - .long 2588791038 - .long 1829968615 - .long 631 - .long 888818201 - .long 3523374130 - .long 852659386 - .long 29067 - .long 3905449900 - .long 720793762 - .long 1836357526 - .long 959598 - .long 711023215 - .long 2187868163 - .long 363719992 - .long 21124528 - .long 3782390642 - .long 1386816912 - .long 3690959132 - .long 275994811 - .long 3562870039 - .long 2887822114 - .long 2407074109 - .long 1720896075 - .long 723327461 - .long 1298307143 - .long 454424891 - .long 2939711024 - .long 4294967293 - .long 0 - .long 4220957082 - .long 1571153381 - .long 12825068 - .long 4227858976 - .long 4024519172 - .long 2730919557 - .long 1456036120 - .long 3256132268 - .long 2931624203 - .long 1339507405 - .long 1357793012 - .long 1094045067 - .long 1129712150 - .long 1138961 - .long 0 - .long 0 - .long 2372829177 - .long 237557530 - .long 0 - .long 0 - .long 534122416 - .long 423932365 - .long 10 - .long 0 - .long 4247263216 - .long 4283734547 - .long 1580 - .long 0 - .long 2387955306 - .long 607897802 - .long 209396 - .long 0 - .long 2812500241 - .long 994269493 - .long 23101510 - .long 0 - .long 3000333735 - .long 388858992 - .long 2083539857 - .long 0 - .long 1161363350 - .long 3153424268 - .long 4076649817 - .long 34 - .long 1819801357 - .long 1812729011 - .long 330148996 - .long 1953 - .long 3163500019 - .long 3864465446 - .long 4064814974 - .long 81467 - .long 3858761013 - .long 3692736596 - .long 1902533809 - .long 2406436 - .long 3293643408 - .long 375345917 - .long 2826147377 - .long 46631566 - .long 4164807482 - .long 4162856869 - .long 2610851470 - .long 525451848 - .long 2048614181 - .long 1569367797 - .long 3543942876 - .long 2777034414 - .long 3312093651 - .long 708453697 - .long 1978042629 - .long 4289897122 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2071065822 - .long 86614531 - .long 0 - .long 0 - .long 2391713785 - .long 4060239028 - .long 3 - .long 0 - .long 4029056008 - .long 1846783416 - .long 650 - .long 0 - .long 161647879 - .long 3413412248 - .long 90917 - .long 0 - .long 436274283 - .long 2466277660 - .long 10613189 - .long 0 - .long 671943584 - .long 553150431 - .long 1015563947 - .long 0 - .long 1753238306 - .long 1517906611 - .long 532738342 - .long 18 - .long 618689867 - .long 596492050 - .long 2460930076 - .long 1080 - .long 414131426 - .long 1367052230 - .long 3308909536 - .long 48209 - .long 4126473295 - .long 3381931776 - .long 1805298000 - .long 1525871 - .long 636148702 - .long 2186154781 - .long 2942928489 - .long 31683165 - .long 999999630 - .long 4126401816 - .long 259460410 - .long 380946890 - .long 231980038 - .long 363549591 - .long 883055596 - .long 2118559672 - .long 3622330114 - .long 1609129610 - .long 63100786 - .long 3373399958 - .long 4294967292 - .long 0 - .long 1588683414 - .long 1994957096 - .long 12816876 - .long 4227858976 - .long 2267877675 - .long 3576551320 - .long 1765045200 - .long 3464483214 - .long 1351689592 - .long 3801296041 - .long 352384788 - .long 331703635 - .long 605298272 - .long 1136492 - .long 0 - .long 0 - .long 2681104739 - .long 238950871 - .long 0 - .long 0 - .long 3149807504 - .long 621710226 - .long 10 - .long 0 - .long 2595166296 - .long 121246070 - .long 1585 - .long 0 - .long 2215012362 - .long 2482367452 - .long 209363 - .long 0 - .long 470943915 - .long 668008525 - .long 23014074 - .long 0 - .long 3763658407 - .long 3343124614 - .long 2065508072 - .long 0 - .long 249623666 - .long 2390602642 - .long 1795904366 - .long 34 - .long 1346725057 - .long 2927659279 - .long 1029310809 - .long 1906 - .long 3831989490 - .long 3024162362 - .long 457912312 - .long 78555 - .long 1623643704 - .long 979247650 - .long 4029398248 - .long 2282874 - .long 2791098952 - .long 2391841680 - .long 2696257895 - .long 43306505 - .long 262637107 - .long 3763159487 - .long 2938992385 - .long 475778611 - .long 3299175406 - .long 3677201670 - .long 2349553020 - .long 2458659840 - .long 206020084 - .long 2363120772 - .long 2638136209 - .long 3751386051 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3034634732 - .long 80259059 - .long 0 - .long 0 - .long 2987375659 - .long 2703374687 - .long 3 - .long 0 - .long 1215607278 - .long 4163686255 - .long 592 - .long 0 - .long 781938720 - .long 2086477677 - .long 82005 - .long 0 - .long 3556471813 - .long 3031971904 - .long 9451560 - .long 0 - .long 2005655437 - .long 2494233436 - .long 890598760 - .long 0 - .long 1167836918 - .long 114850616 - .long 2568442225 - .long 15 - .long 2351511177 - .long 1547877599 - .long 2724662709 - .long 908 - .long 1583056039 - .long 1830443712 - .long 1719394286 - .long 39382 - .long 1124627201 - .long 674092017 - .long 1868383046 - .long 1202161 - .long 4262245498 - .long 1815295967 - .long 3756878985 - .long 23872494 - .long 1013133814 - .long 1390137141 - .long 1845508344 - .long 272711216 - .long 2632746813 - .long 493954138 - .long 4257964097 - .long 1450886530 - .long 1659393003 - .long 4235627183 - .long 3605632322 - .long 2252460395 - .long 4294967292 - .long 0 - .long 1932081087 - .long 2418003218 - .long 12825068 - .long 4227858976 - .long 675685466 - .long 2210650544 - .long 2635457388 - .long 3001216681 - .long 2383987892 - .long 1958452314 - .long 200318573 - .long 1670080688 - .long 1772035109 - .long 1132935 - .long 0 - .long 0 - .long 2224132738 - .long 239067824 - .long 0 - .long 0 - .long 2504702558 - .long 548466910 - .long 10 - .long 0 - .long 120798343 - .long 3554901277 - .long 1577 - .long 0 - .long 2434954499 - .long 1660365081 - .long 207659 - .long 0 - .long 2744534538 - .long 1767005024 - .long 22722744 - .long 0 - .long 1354085614 - .long 573653951 - .long 2027648348 - .long 0 - .long 2302238895 - .long 940817979 - .long 2333007942 - .long 33 - .long 4044378246 - .long 2424318367 - .long 54614345 - .long 1841 - .long 3277428544 - .long 937510890 - .long 2353849014 - .long 75024 - .long 4005612974 - .long 1580435742 - .long 1601652905 - .long 2151432 - .long 3782038889 - .long 2892349902 - .long 3709353570 - .long 40211969 - .long 2209533886 - .long 1632935844 - .long 1972351296 - .long 435469920 - .long 2489865929 - .long 3249608891 - .long 2176055770 - .long 2225282526 - .long 4163770951 - .long 1426482641 - .long 75146285 - .long 3375249381 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2220915002 - .long 147504303 - .long 0 - .long 0 - .long 3383683424 - .long 2662024159 - .long 6 - .long 0 - .long 4203741875 - .long 3065385408 - .long 1071 - .long 0 - .long 94574798 - .long 3694012699 - .long 146649 - .long 0 - .long 548197575 - .long 3705365680 - .long 16693691 - .long 0 - .long 2971661595 - .long 3995690294 - .long 1550219778 - .long 0 - .long 3364157924 - .long 536970539 - .long 2951498969 - .long 26 - .long 3606982515 - .long 2998613798 - .long 1572386296 - .long 1523 - .long 54159713 - .long 2382254602 - .long 1960159626 - .long 64476 - .long 164299812 - .long 2501105432 - .long 2657580848 - .long 1915496 - .long 4191466314 - .long 1475491836 - .long 409725690 - .long 36942237 - .long 2000214888 - .long 3808326374 - .long 4191271566 - .long 410491162 - .long 3021924263 - .long 3759042010 - .long 567945948 - .long 2137524835 - .long 2922089864 - .long 3203830329 - .long 752382353 - .long 3278805360 - .long 4294967291 - .long 0 - .long 223335381 - .long 2840633637 - .long 12816876 - .long 4227858976 - .long 191176124 - .long 2632795962 - .long 792829484 - .long 4194095148 - .long 1561179743 - .long 586327156 - .long 2807878837 - .long 3545818423 - .long 1415596998 - .long 1125924 - .long 0 - .long 0 - .long 2335397241 - .long 237899312 - .long 0 - .long 0 - .long 898966976 - .long 220219689 - .long 10 - .long 0 - .long 3140042207 - .long 3171383055 - .long 1560 - .long 0 - .long 2021920923 - .long 1061467961 - .long 204590 - .long 0 - .long 1780915469 - .long 3394528573 - .long 22279398 - .long 0 - .long 2938289575 - .long 3726010345 - .long 1976658045 - .long 0 - .long 1742882295 - .long 3191343047 - .long 2047550512 - .long 32 - .long 3647296052 - .long 2253947992 - .long 1300129447 - .long 1768 - .long 2864334604 - .long 1571083743 - .long 2473956825 - .long 71411 - .long 902177211 - .long 1309134586 - .long 1494319522 - .long 2027873 - .long 1978202312 - .long 2898857432 - .long 1838265108 - .long 37534288 - .long 440015974 - .long 4230775195 - .long 1255344562 - .long 402981746 - .long 1205443830 - .long 4140044432 - .long 3282462476 - .long 2046231097 - .long 2809323527 - .long 1074462473 - .long 1051546203 - .long 3093465233 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1994591040 - .long 134874738 - .long 0 - .long 0 - .long 1154796671 - .long 33466848 - .long 6 - .long 0 - .long 944609558 - .long 611410016 - .long 964 - .long 0 - .long 3394269576 - .long 3253723903 - .long 130617 - .long 0 - .long 1604599336 - .long 2571734283 - .long 14700043 - .long 0 - .long 2720136884 - .long 1760790051 - .long 1347449133 - .long 0 - .long 3340661604 - .long 3195040324 - .long 3680379603 - .long 22 - .long 3451695816 - .long 2081337828 - .long 1427065647 - .long 1283 - .long 2755833528 - .long 3578899323 - .long 1127406403 - .long 53342 - .long 2103438216 - .long 2925829331 - .long 133275521 - .long 1554875 - .long 3003940918 - .long 1302060887 - .long 2008749614 - .long 29436400 - .long 4279932662 - .long 1473928468 - .long 533396292 - .long 321840330 - .long 3248261436 - .long 2035472962 - .long 372258839 - .long 1655927148 - .long 3127294521 - .long 3128066919 - .long 2865156314 - .long 2523236171 - .long 4294967291 - .long 0 - .long 1890690921 - .long 3263011055 - .long 12825068 - .long 4227858976 - .long 2797952740 - .long 3054806814 - .long 1894667006 - .long 214237447 - .long 1296756846 - .long 4060330468 - .long 1098085821 - .long 3604642180 - .long 1726893371 - .long 1115219 - .long 0 - .long 0 - .long 494710856 - .long 235638241 - .long 0 - .long 0 - .long 1193585816 - .long 3981686648 - .long 9 - .long 0 - .long 143797405 - .long 762868814 - .long 1536 - .long 0 - .long 898881458 - .long 2220674218 - .long 200569 - .long 0 - .long 271788931 - .long 1836576498 - .long 21741122 - .long 0 - .long 3732597210 - .long 2567748600 - .long 1918751890 - .long 0 - .long 3683010637 - .long 2674911154 - .long 1453366689 - .long 31 - .long 3314792629 - .long 3590832641 - .long 792084225 - .long 1695 - .long 710884882 - .long 1421882797 - .long 453673326 - .long 67984 - .long 4289998525 - .long 1545801705 - .long 2082770245 - .long 1917055 - .long 1427259630 - .long 3087470940 - .long 1747456958 - .long 35251400 - .long 2597591904 - .long 3049486553 - .long 2056710479 - .long 376393410 - .long 2213091204 - .long 2641098163 - .long 3971809407 - .long 1903717223 - .long 3244722564 - .long 177715146 - .long 3090222263 - .long 2872209565 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 4193727727 - .long 246007177 - .long 0 - .long 0 - .long 768822418 - .long 3782320021 - .long 10 - .long 0 - .long 2196079823 - .long 201893182 - .long 1732 - .long 0 - .long 1661061158 - .long 4260475543 - .long 232537 - .long 0 - .long 3959757821 - .long 1648015928 - .long 25908825 - .long 0 - .long 2136418328 - .long 2790862444 - .long 2348699355 - .long 0 - .long 14984150 - .long 3359899422 - .long 1557173094 - .long 39 - .long 2579163115 - .long 4209094591 - .long 2975956643 - .long 2181 - .long 809874233 - .long 1287653529 - .long 1784169535 - .long 89477 - .long 836980350 - .long 209256478 - .long 3015626027 - .long 2573945 - .long 2016221741 - .long 1745099515 - .long 1018088912 - .long 48139690 - .long 3329474215 - .long 1010710723 - .long 642962579 - .long 521003091 - .long 801578433 - .long 3224757113 - .long 3341503980 - .long 2660978634 - .long 2199935228 - .long 4052003304 - .long 2221814426 - .long 4038241008 - .long 4294967290 - .long 0 - .long 3178730751 - .long 116147812 - .long 14854636 - .long 416 - .long 416371481 - .long 2823641499 - .long 2506915568 - .long 4124207639 - .long 950494682 - .long 256731865 - .long 619428904 - .long 3037288495 - .long 4208811624 - .long 884105690 - .long 0 - .long 0 - .long 3410106176 - .long 4245208708 - .long 126 - .long 0 - .long 3116091236 - .long 3070791485 - .long 44137 - .long 0 - .long 1379902983 - .long 2256834745 - .long 12232777 - .long 0 - .long 2097914520 - .long 545273602 - .long 2619411277 - .long 0 - .long 215423817 - .long 3507318412 - .long 256238311 - .long 97 - .long 3668117219 - .long 4022295396 - .long 2420542464 - .long 10890 - .long 3822143167 - .long 3930114069 - .long 1325150521 - .long 798528 - .long 3699121161 - .long 791807715 - .long 67391017 - .long 33958538 - .long 3257898816 - .long 678025854 - .long 1894699409 - .long 674718922 - .long 1201340557 - .long 2594901103 - .long 3933905415 - .long 3704843775 - .long 4294967294 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 982743186 - .long 1840382683 - .long 8 - .long 0 - .long 2770471380 - .long 1232287742 - .long 3186 - .long 0 - .long 2689925901 - .long 4291161637 - .long 993651 - .long 0 - .long 1865452386 - .long 278667130 - .long 243198017 - .long 0 - .long 941914362 - .long 1579381843 - .long 2208801237 - .long 10 - .long 4030005343 - .long 1439537596 - .long 2913266490 - .long 1415 - .long 897709932 - .long 2611261457 - .long 3831192043 - .long 129715 - .long 2599986828 - .long 562288571 - .long 873738186 - .long 7347842 - .long 1676792497 - .long 2643238970 - .long 1059645264 - .long 218261805 - .long 3968061936 - .long 1814410518 - .long 4215318874 - .long 2360677848 - .long 4294967294 - .long 0 - .long 1965065697 - .long 125333813 - .long 29671681 - .long 368 - .long 2696892906 - .long 3837883846 - .long 4163818448 - .long 2636579655 - .long 352076257 - .long 2995873374 - .long 2356022824 - .long 2864685933 - .long 507647155 - .long 87534215 - .long 364999993 - .long 2297262027 - .long 3804603314 - .long 421232362 - .long 623004025 - .long 2436698064 - .long 857209363 - .long 4104727312 - .long 1300779075 - .long 2300222395 - .long 3549420260 - .long 815695431 - .long 3490474032 - .long 2175015012 - .long 273829883 - .long 837019448 - .long 1150859439 - .long 4129001094 - .long 166114890 - .long 262582295 - .long 2200440235 - .long 3934411649 - .long 4260765987 - .long 1496016656 - .long 613554758 - .long 3765455772 - .long 1537995402 - .long 3112915065 - .long 3831973801 - .long 3621881222 - .long 371259347 - .long 563988192 - .long 2577068580 - .long 3504039397 - .long 3892719810 - .long 2774136061 - .long 761863973 - .long 3413069278 - .long 932429307 - .long 3533847854 - .long 670352073 - .long 3351189942 - .long 332608650 - .long 3102655069 - .long 2958547113 - .long 3322177573 - .long 146996155 - .long 3411645617 - .long 2215850181 - .long 3332037184 - .long 590982538 - .long 2197714658 - .long 1764878165 - .long 3390200984 - .long 952267699 - .long 417090737 - .long 3487943763 - .long 3519763458 - .long 1338819266 - .long 2605877443 - .long 347561299 - .long 3761505334 - .long 3379093939 - .long 2405540353 - .long 1506019226 - .long 3884741458 - .long 2785505456 - .long 3086386584 - .long 2046080941 - .long 3789068741 - .long 1518238185 - .long 1088338119 - .long 1804079185 - .long 4226925859 - .long 2303172266 - .long 2741263628 - .long 633622237 - .long 3777083586 - .long 3757196004 - .long 294895316 - .long 27640459 - .long 432 - .long 2828420652 - .long 3361833042 - .long 1412248364 - .long 2211183849 - .long 0 - .long 3547577142 - .long 1 - .long 0 - .long 2851890648 - .long 450899591 - .long 287024625 - .long 4159553752 - .long 3788600515 - .long 2561792324 - .long 3962766183 - .long 3512577319 - .long 2861699545 - .long 2196522185 - .long 1554209519 - .long 4198958626 - .long 3194489346 - .long 2786967510 - .long 3304318871 - .long 3344542374 - .long 4105608152 - .long 867728568 - .long 2708443992 - .long 3505223656 - .long 1032912387 - .long 3711167273 - .long 1214238009 - .long 2611213035 - .long 3368625691 - .long 5584441 - .long 2611408711 - .long 2384597091 - .long 1152098306 - .long 3591611965 - .long 2962228819 - .long 3281323244 - .long 3071980506 - .long 3920864562 - .long 3855393805 - .long 2582452787 - .long 3343479107 - .long 1168797990 - .long 3053975971 - .long 3222544278 - .long 3909139483 - .long 1083468961 - .long 2101774947 - .long 2160722632 - .long 2110801092 - .long 4019214560 - .long 1350065479 - .long 2376260138 - .long 42240602 - .long 3769900699 - .long 2854857645 - .long 2686999005 - .long 4198697477 - .long 4081736268 - .long 2846299562 - .long 2478988733 - .long 427675101 - .long 2445602520 - .long 4233423029 - .long 2355264427 - .long 1558515652 - .long 2279564152 - .long 62666641 - .long 3298296210 - .long 1417642332 - .long 61859471 - .long 2115062510 - .long 2696409612 - .long 326492679 - .long 2534854374 - .long 1679925266 - .long 2160906787 - .long 3251033635 - .long 2671487866 - .long 2862247032 - .long 3574405396 - .long 3009660033 - .long 339349497 - .long 3007548001 - .long 2840034127 - .long 2252903388 - .long 1330394071 - .long 2157393054 - .long 2200692478 - .long 621144332 - .long 3987984878 - .long 1728372573 - .long 3841939891 - .long 2649374871 - .long 2008708732 - .long 1354882191 - .long 2904204888 - .long 3398077461 - .long 3906455313 - .long 2501808239 - .long 2340852904 - .long 257973487 - .long 728759453 - .long 30163463 - .long 848 - .long 3266633231 - .long 4249524844 - .long 2065907802 - .long 2501410748 - .long 2077120351 - .long 1559182036 - .long 2148606178 - .long 4119882265 - .long 315045067 - .long 14812806 - .long 1274331647 - .long 3156365682 - .long 238086315 - .long 2517423111 - .long 2041601736 - .long 2711078025 - .long 3652406632 - .long 753691269 - .long 2734041400 - .long 3820625006 - .long 2380832782 - .long 158270193 - .long 2340065183 - .long 2273321385 - .long 393890025 - .long 2894667190 - .long 1573700686 - .long 4092887025 - .long 464562897 - .long 303515614 - .long 3848216904 - .long 3328255744 - .long 1036006886 - .long 2121885428 - .long 3704818897 - .long 3211297370 - .long 1325824312 - .long 3493125121 - .long 3338748802 - .long 3232443331 - .long 3112594497 - .long 3307298736 - .long 2809691794 - .long 3731360010 - .long 3573632495 - .long 2312925567 - .long 629450595 - .long 3622381915 - .long 989010185 - .long 3398558103 - .long 4153621291 - .long 3607201927 - .long 2629100272 - .long 1953994464 - .long 1943384301 - .long 2759420002 - .long 2305022315 - .long 2391039855 - .long 612094863 - .long 3951603967 - .long 1340433416 - .long 3334026995 - .long 1491763737 - .long 4186248678 - .long 4198464715 - .long 87224683 - .long 4220145159 - .long 3881216024 - .long 2007772778 - .long 1722917095 - .long 2388984076 - .long 3799859053 - .long 732951595 - .long 3919415462 - .long 528829945 - .long 3610037081 - .long 3992395594 - .long 4037851002 - .long 1844118200 - .long 3714769074 - .long 3432638667 - .long 3108186388 - .long 746542694 - .long 3818486016 - .long 557823754 - .long 2427510280 - .long 3516120961 - .long 3892142094 - .long 1703329579 - .long 996501429 - .long 4081661750 - .long 3974028169 - .long 480847786 - .long 3006112619 - .long 1403431905 - .long 4065364793 - .long 1900483787 - .long 2649330773 - .long 651669812 - .long 4162988739 - .long 1619173352 - .long 1864819711 - .long 1131374484 - .long 4267744761 - .long 1834860043 - .long 2423625113 - .long 288099716 - .long 2190363742 - .long 2708503338 - .long 4126097102 - .long 3654529011 - .long 2251412339 - .long 3753107947 - .long 3496449780 - .long 2610603179 - .long 2317533940 - .long 3862344650 - .long 1030964414 - .long 451338797 - .long 2389337002 - .long 2524196363 - .long 569491811 - .long 2946926522 - .long 2467527406 - .long 196512138 - .long 497579000 - .long 2195809742 - .long 2552928386 - .long 1662952651 - .long 780129586 - .long 2880189481 - .long 2646511583 - .long 1545658730 - .long 789982365 - .long 191310475 - .long 2749424166 - .long 1470909419 - .long 1234100077 - .long 2044585165 - .long 2862876216 - .long 928663178 - .long 2102054363 - .long 3690288476 - .long 2988326180 - .long 2216922123 - .long 2305139484 - .long 4174545259 - .long 3130608048 - .long 1755153610 - .long 918723953 - .long 2738745609 - .long 3294047809 - .long 721728203 - .long 1773737866 - .long 4101484425 - .long 3433511350 - .long 1857351114 - .long 2879235855 - .long 1363799643 - .long 3536910801 - .long 4061718601 - .long 908917583 - .long 3005712244 - .long 4215915540 - .long 243897838 - .long 7660553 - .long 2731769662 - .long 2727825412 - .long 1695068807 - .long 2615038300 - .long 234665196 - .long 3149409338 - .long 2025012071 - .long 1264893574 - .long 1155162898 - .long 2643506208 - .long 3781832745 - .long 2126832235 - .long 1395780981 - .long 2754722035 - .long 4274723882 - .long 199777100 - .long 1853759306 - .long 3583381494 - .long 3072425958 - .long 993425135 - .long 3004341385 - .long 3435215656 - .long 3198694093 - .long 620059688 - .long 2085750463 - .long 2400804391 - .long 1026440073 - .long 2116228661 - .long 3422860059 - .long 3767238370 - .long 376557070 - .long 669608662 - .long 2826299222 - .long 4021726431 - .long 97861608 - .long 623049618 - .long 457143492 - .long 3494791496 - .long 647336461 - .long 20390326 - .long 156262610 - .long 3457815221 - .long 2242302115 - .long 1153736377 - .long 29917573 - .long 608 - .long 956831540 - .long 3804294695 - .long 1233656524 - .long 1169011973 - .long 3512247603 - .long 731707668 - .long 3804813427 - .long 3532496868 - .long 3861713254 - .long 3920998321 - .long 3249242362 - .long 2983748142 - .long 4254521127 - .long 3419828215 - .long 3612752470 - .long 3427243214 - .long 1865130836 - .long 1528519591 - .long 3104638828 - .long 2778394947 - .long 2428343797 - .long 2183879732 - .long 1050296790 - .long 3773933110 - .long 3652345540 - .long 2906583603 - .long 1426288469 - .long 3900013225 - .long 3885984869 - .long 2566242072 - .long 2597085889 - .long 3387828672 - .long 3402407620 - .long 2004411987 - .long 1378225957 - .long 3062031935 - .long 3648787989 - .long 92338370 - .long 4236899602 - .long 2817389734 - .long 1952242004 - .long 2304097414 - .long 127945474 - .long 2582972800 - .long 4281889637 - .long 2697225196 - .long 2199799063 - .long 2368525439 - .long 2882311446 - .long 2124741744 - .long 2454581530 - .long 2175676414 - .long 1363442533 - .long 235950345 - .long 3278607019 - .long 3991475143 - .long 2338347060 - .long 892652237 - .long 3886541672 - .long 3654822706 - .long 2206999749 - .long 359442761 - .long 1344250324 - .long 3448127457 - .long 2316542980 - .long 3829127353 - .long 220674587 - .long 3338303659 - .long 280815351 - .long 3269930602 - .long 4246425196 - .long 2475208849 - .long 3336161088 - .long 2206265573 - .long 1212344344 - .long 2473891454 - .long 491190659 - .long 2156317952 - .long 2981239741 - .long 2515194909 - .long 3609278228 - .long 1234146757 - .long 1026744012 - .long 2624029530 - .long 2704274272 - .long 1975162568 - .long 3276945619 - .long 2578639571 - .long 1034382165 - .long 2590969465 - .long 713762072 - .long 2201806508 - .long 4228198051 - .long 3980119693 - .long 4056525840 - .long 3097891989 - .long 2284336932 - .long 1932639591 - .long 1092540108 - .long 4171705026 - .long 1025654624 - .long 2806138305 - .long 3009647326 - .long 4248184906 - .long 1890367717 - .long 2289438980 - .long 2899757860 - .long 2719293081 - .long 2021534083 - .long 143536689 - .long 3592569555 - .long 2232683115 - .long 1092535430 - .long 1236892532 - .long 4153044331 - .long 2589276857 - .long 3416977538 - .long 1252322112 - .long 2546684106 - .long 3041465242 - .long 1082461383 - .long 209063033 - .long 689512483 - .long 3233542783 - .long 2486702483 - .long 195380297 - .long 3370408231 - .long 2473507057 - .long 2649928714 - .long 3477888857 - .long 4011137876 - .long 2392519727 - .long 735960098 - .long 892635115 - .long 2839435691 - .long 3648562506 - .long 4276128797 - .long 1399354710 - .long 1604489874 - .long 3300188966 - .long 3618086195 - .long 2363035047 - .long 3798645379 - .long 2910302351 - .long 2872403096 - .long 1995870309 - .long 1272108261 - .long 2577818883 - .long 1355290640 - .long 1576944867 - .long 29835783 - .long 528 - .long 602586217 - .long 2744039853 - .long 1836018387 - .long 1812008391 - .long 2257334696 - .long 1529386301 - .long 1071982020 - .long 1483132946 - .long 4031485769 - .long 2132222880 - .long 3196630878 - .long 2436179952 - .long 499786504 - .long 1744292863 - .long 2290711216 - .long 2504292584 - .long 1896329063 - .long 3237324739 - .long 2330780121 - .long 3744707929 - .long 1734827082 - .long 3296507779 - .long 823995655 - .long 3906271181 - .long 1416288288 - .long 2226659999 - .long 3321781362 - .long 3715853563 - .long 2544842791 - .long 504837419 - .long 2958966103 - .long 2231720942 - .long 750175301 - .long 4084077163 - .long 2549224941 - .long 3250807824 - .long 1369606438 - .long 3223323496 - .long 2083589876 - .long 3384767572 - .long 4248382916 - .long 4144081438 - .long 3229998485 - .long 3165770641 - .long 3223334087 - .long 2485373121 - .long 3818931504 - .long 3388848075 - .long 1252536709 - .long 1652370242 - .long 2624409840 - .long 2964694704 - .long 823791654 - .long 1167018965 - .long 2939238153 - .long 2953436515 - .long 884228550 - .long 292276865 - .long 734484637 - .long 2205305082 - .long 1913113287 - .long 3765099297 - .long 3745471985 - .long 4167966771 - .long 2931697765 - .long 3673300473 - .long 2182221826 - .long 2649024091 - .long 1975627272 - .long 3727134676 - .long 3712743943 - .long 2356773214 - .long 1995177638 - .long 1132588444 - .long 1959425557 - .long 2466886350 - .long 1844669961 - .long 3530525712 - .long 760398624 - .long 4132176514 - .long 1979460773 - .long 796554174 - .long 3170959411 - .long 3438043671 - .long 1989653354 - .long 84033345 - .long 407935807 - .long 2705661215 - .long 1743925380 - .long 3102969454 - .long 3987162576 - .long 3388329870 - .long 1765097355 - .long 2209606903 - .long 1187505799 - .long 2507493218 - .long 161532103 - .long 2079767141 - .long 2713931831 - .long 2181209439 - .long 3726577836 - .long 2678974047 - .long 4042300458 - .long 3044993725 - .long 569618662 - .long 2942019385 - .long 2267421895 - .long 3217189858 - .long 2072134893 - .long 690975306 - .long 3699981379 - .long 4279355559 - .long 3941553639 - .long 955448001 - .long 4102577460 - .long 2173892384 - .long 1871059570 - .long 2340022155 - .long 2864020166 - .long 2805153080 - .long 3271562790 - .long 928990650 - .long 4206766333 - .long 3357221519 - .long 685259147 - .long 3780305127 - .long 2513405378 - .long 4289834595 - .long 2048010913 - .long 1999500835 - .long 12816876 - .long 4227858976 - .long 255479044 - .long 3586592293 - .long 3058876998 - .long 264515361 - .long 3124897887 - .long 2490659405 - .long 1648870444 - .long 499533912 - .long 41235212 - .long 1135645 - .long 0 - .long 0 - .long 1870875844 - .long 237807939 - .long 0 - .long 0 - .long 1220251845 - .long 534075739 - .long 10 - .long 0 - .long 1566916386 - .long 2806728368 - .long 1584 - .long 0 - .long 359612094 - .long 1988210364 - .long 209791 - .long 0 - .long 4018390684 - .long 3143652161 - .long 23114812 - .long 0 - .long 1385310342 - .long 3191552623 - .long 2079730388 - .long 0 - .long 391712962 - .long 3496232483 - .long 3188676879 - .long 34 - .long 712670475 - .long 2384468018 - .long 3612170541 - .long 1928 - .long 2944407817 - .long 162857838 - .long 3871824152 - .long 79642 - .long 1897150183 - .long 2209645725 - .long 1648691441 - .long 2316814 - .long 4189666301 - .long 2103634775 - .long 2832836870 - .long 43914735 - .long 100148761 - .long 3544145710 - .long 882453749 - .long 480946030 - .long 743895637 - .long 1440146064 - .long 1167801510 - .long 2472892869 - .long 2527288726 - .long 3429197137 - .long 3389012105 - .long 3751366970 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3328931461 - .long 85211143 - .long 0 - .long 0 - .long 1806098240 - .long 3730920547 - .long 3 - .long 0 - .long 1452363271 - .long 241457122 - .long 632 - .long 0 - .long 2408523024 - .long 2523801313 - .long 87488 - .long 0 - .long 2245774023 - .long 1447128763 - .long 10087333 - .long 0 - .long 741575833 - .long 1516712297 - .long 950654827 - .long 0 - .long 188657751 - .long 2834063720 - .long 2756671478 - .long 16 - .long 1878890455 - .long 1600190830 - .long 298103694 - .long 968 - .long 2704961479 - .long 3096990934 - .long 62735862 - .long 41831 - .long 4224033960 - .long 872206772 - .long 3368762420 - .long 1269793 - .long 1493275548 - .long 4226875193 - .long 156115358 - .long 24976936 - .long 3675413693 - .long 3939858976 - .long 1188049005 - .long 281407884 - .long 4246420658 - .long 2584806369 - .long 1500891563 - .long 1472264476 - .long 3550606718 - .long 2355970614 - .long 848338822 - .long 2246143015 - .long 4294967292 - .long 0 - .long 4176598204 - .long 2421744458 - .long 12825068 - .long 4227858976 - .long 26255947 - .long 2214716320 - .long 3008850950 - .long 1148166722 - .long 3688411584 - .long 3263035913 - .long 28940749 - .long 823708345 - .long 2778463383 - .long 1133123 - .long 0 - .long 0 - .long 3375994644 - .long 239287696 - .long 0 - .long 0 - .long 1307882943 - .long 652616536 - .long 10 - .long 0 - .long 1617272991 - .long 332362201 - .long 1584 - .long 0 - .long 1120342694 - .long 786793736 - .long 208818 - .long 0 - .long 1754116211 - .long 4140995168 - .long 22886713 - .long 0 - .long 1065416575 - .long 2365212708 - .long 2045489262 - .long 0 - .long 4094841 - .long 1336050951 - .long 3805124179 - .long 33 - .long 2857461896 - .long 1181810454 - .long 3505581240 - .long 1861 - .long 317401726 - .long 1588400515 - .long 2236524720 - .long 75909 - .long 1498310037 - .long 3569634182 - .long 656796315 - .long 2175950 - .long 1147851401 - .long 3112077225 - .long 3624068591 - .long 40608505 - .long 3302439284 - .long 1412013598 - .long 1600554036 - .long 438608161 - .long 1138396370 - .long 2245711018 - .long 3467973442 - .long 2233633025 - .long 867533488 - .long 947112014 - .long 1198607031 - .long 3375241932 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1112979214 - .long 155431282 - .long 0 - .long 0 - .long 751906521 - .long 4198567473 - .long 6 - .long 0 - .long 1613582890 - .long 3858662071 - .long 1129 - .long 0 - .long 750469660 - .long 730914801 - .long 154615 - .long 0 - .long 3704035494 - .long 424802513 - .long 17595297 - .long 0 - .long 3547752153 - .long 653012047 - .long 1632696395 - .long 0 - .long 3895749118 - .long 1312132433 - .long 283540480 - .long 28 - .long 69337464 - .long 2039495909 - .long 480366968 - .long 1598 - .long 3999973752 - .long 512131576 - .long 3264765906 - .long 67376 - .long 1470627556 - .long 3527817596 - .long 506357093 - .long 1990112 - .long 1150644769 - .long 1706533685 - .long 1646793404 - .long 38078290 - .long 2272838918 - .long 315551185 - .long 931114118 - .long 418976801 - .long 799519248 - .long 833405850 - .long 3700723307 - .long 2157812839 - .long 1885423178 - .long 2894024424 - .long 986247108 - .long 3272778907 - .long 4294967291 - .long 0 - .long 205941362 - .long 2843814473 - .long 12816876 - .long 4227858976 - .long 4284396776 - .long 2636211962 - .long 2729248679 - .long 228940808 - .long 2721630221 - .long 4033427380 - .long 3518215373 - .long 3318265016 - .long 1583232401 - .long 1129188 - .long 0 - .long 0 - .long 2240090200 - .long 238747566 - .long 0 - .long 0 - .long 2182354368 - .long 422793662 - .long 10 - .long 0 - .long 2344384525 - .long 3611967473 - .long 1569 - .long 0 - .long 2363261376 - .long 55742926 - .long 206011 - .long 0 - .long 2169713945 - .long 2081106389 - .long 22457193 - .long 0 - .long 808249952 - .long 3928968053 - .long 1994189663 - .long 0 - .long 2498399120 - .long 610170797 - .long 3374767919 - .long 32 - .long 2499128949 - .long 806866088 - .long 2667994898 - .long 1785 - .long 1293127093 - .long 1533235693 - .long 3364558966 - .long 72094 - .long 3484449920 - .long 4142457389 - .long 393414345 - .long 2045553 - .long 1815566734 - .long 3205349654 - .long 1699048752 - .long 37804868 - .long 885836718 - .long 797019709 - .long 3601921623 - .long 405043970 - .long 1414187968 - .long 4238799387 - .long 2244838147 - .long 2051616278 - .long 2091776204 - .long 3735546130 - .long 1436809887 - .long 3093461814 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 194035164 - .long 141017056 - .long 0 - .long 0 - .long 3307569967 - .long 1206991859 - .long 6 - .long 0 - .long 3663448937 - .long 3391377880 - .long 1007 - .long 0 - .long 4126701083 - .long 2994857527 - .long 136467 - .long 0 - .long 1667733955 - .long 4058943102 - .long 15345719 - .long 0 - .long 2611265876 - .long 3831769830 - .long 1404776386 - .long 0 - .long 209321266 - .long 573187068 - .long 3359330694 - .long 23 - .long 1677262110 - .long 637572110 - .long 2122511782 - .long 1331 - .long 3496561941 - .long 3652813901 - .long 3559168047 - .long 55128 - .long 1750715127 - .long 4228815409 - .long 1050316 - .long 1598795 - .long 1840387030 - .long 2463042611 - .long 3094434052 - .long 30079053 - .long 2629602118 - .long 2049759618 - .long 945167723 - .long 326505049 - .long 3298129216 - .long 3410065465 - .long 1686243051 - .long 1666911635 - .long 3383305094 - .long 1693255217 - .long 2403972032 - .long 2519963779 - .long 4294967291 - .long 0 - .long 3238416553 - .long 3265778049 - .long 12825068 - .long 4227858976 - .long 3177200532 - .long 3057752043 - .long 1963397648 - .long 3926923754 - .long 1015831100 - .long 3054277238 - .long 214260357 - .long 3388682645 - .long 329260597 - .long 1120080 - .long 0 - .long 0 - .long 1129382972 - .long 236791308 - .long 0 - .long 0 - .long 200550114 - .long 4225205647 - .long 9 - .long 0 - .long 3987740840 - .long 662463985 - .long 1546 - .long 0 - .long 3625695977 - .long 942803776 - .long 202014 - .long 0 - .long 4082097994 - .long 2934588234 - .long 21910543 - .long 0 - .long 2081364333 - .long 826431917 - .long 1934499234 - .long 0 - .long 1761358361 - .long 1915853684 - .long 2581201468 - .long 31 - .long 1458338458 - .long 480335293 - .long 641318311 - .long 1709 - .long 2934587087 - .long 1935466844 - .long 4209158963 - .long 68508 - .long 2290297886 - .long 2520183995 - .long 2347470795 - .long 1930078 - .long 1214972608 - .long 3678131539 - .long 56536087 - .long 35444212 - .long 1624218450 - .long 2947499939 - .long 75007111 - .long 377830189 - .long 794554122 - .long 1484978356 - .long 1550658172 - .long 1907426674 - .long 1950966402 - .long 3741059307 - .long 468440577 - .long 2872207806 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2513119405 - .long 255601926 - .long 0 - .long 0 - .long 1340053149 - .long 1293535308 - .long 11 - .long 0 - .long 2520596056 - .long 243966073 - .long 1798 - .long 0 - .long 1240269441 - .long 1692289976 - .long 241208 - .long 0 - .long 486505533 - .long 4176826391 - .long 26843964 - .long 0 - .long 1085031321 - .long 2229862700 - .long 2429583838 - .long 0 - .long 3607912919 - .long 1284443184 - .long 2708483256 - .long 40 - .long 4286170020 - .long 2109173108 - .long 2872722597 - .long 2245 - .long 3765965368 - .long 2873757161 - .long 2280026745 - .long 91776 - .long 975034122 - .long 907445528 - .long 4183785771 - .long 2628820 - .long 2401876752 - .long 1790794470 - .long 4120636181 - .long 48923208 - .long 3456079977 - .long 3312351896 - .long 2533182876 - .long 526592659 - .long 300202939 - .long 3214183676 - .long 2700781633 - .long 2674019932 - .long 3409370037 - .long 142796896 - .long 590138558 - .long 4034348900 - .long 4294967290 - .long 0 - .long 2441521498 - .long 242594037 - .long 2326542 - .long 4227858728 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 292802143 - .long 2930268 - .long 0 - .long 0 - .long 535415153 - .long 618901269 - .long 0 - .long 0 - .long 1086559041 - .long 2797303288 - .long 25 - .long 0 - .long 4140762130 - .long 803311064 - .long 3903 - .long 0 - .long 3260682281 - .long 805348165 - .long 501094 - .long 0 - .long 946699523 - .long 2655018074 - .long 53417808 - .long 0 - .long 3184188054 - .long 357148693 - .long 343191017 - .long 1 - .long 2991785955 - .long 1885266767 - .long 2475080337 - .long 74 - .long 3202232014 - .long 1390745085 - .long 1906741299 - .long 3974 - .long 2460394114 - .long 145617371 - .long 1237048646 - .long 157131 - .long 2499420999 - .long 890518540 - .long 2984098479 - .long 4365826 - .long 4044160094 - .long 3502963765 - .long 4084883256 - .long 78771967 - .long 1855836510 - .long 1773383726 - .long 696038818 - .long 812348145 - .long 1371130586 - .long 4224739114 - .long 2913286396 - .long 3734813411 - .long 3022964429 - .long 4251306649 - .long 3856945722 - .long 3368235169 - .long 4294967295 - .long 0 - .long 3259021111 - .long 321006842 - .long 29835651 - .long 528 - .long 4287764257 - .long 2359162534 - .long 538435925 - .long 1893177075 - .long 2620595140 - .long 1125567552 - .long 2991073306 - .long 2159239491 - .long 623213113 - .long 2440954329 - .long 3454983919 - .long 2690441248 - .long 1981777827 - .long 3070641374 - .long 600396448 - .long 3989904562 - .long 503111015 - .long 2398913263 - .long 3729609173 - .long 2560895207 - .long 4264522276 - .long 1827510236 - .long 1453587439 - .long 2856034995 - .long 3530335573 - .long 2910390539 - .long 3830755809 - .long 3395214488 - .long 581887236 - .long 170861812 - .long 3783767784 - .long 3801720292 - .long 3874334995 - .long 3776894534 - .long 3941576344 - .long 4151651145 - .long 672178724 - .long 1876155966 - .long 2300153670 - .long 2280168405 - .long 2930820789 - .long 310363638 - .long 2337608734 - .long 2504022121 - .long 679615860 - .long 1866145491 - .long 925134179 - .long 2749395452 - .long 4164495461 - .long 1691717726 - .long 3504269286 - .long 3018609133 - .long 4091749652 - .long 2913918638 - .long 75440378 - .long 3313861766 - .long 2260863989 - .long 1783565696 - .long 3478989690 - .long 3637556251 - .long 386210930 - .long 165743778 - .long 2898550894 - .long 3992273458 - .long 138300613 - .long 2474605972 - .long 1444508693 - .long 2190379430 - .long 3716173044 - .long 211495398 - .long 2076026756 - .long 2402948622 - .long 884026613 - .long 3273453185 - .long 2774793032 - .long 2635331838 - .long 862601524 - .long 3461868441 - .long 1569319307 - .long 2889017487 - .long 2379289701 - .long 4014175908 - .long 4105967090 - .long 3165345439 - .long 4280005796 - .long 3658970897 - .long 1734788832 - .long 3465258574 - .long 1142155173 - .long 2128929843 - .long 1454912392 - .long 3791483352 - .long 1572825138 - .long 4100167805 - .long 2209491991 - .long 4149468636 - .long 1302034421 - .long 2240019943 - .long 2903825538 - .long 2241250238 - .long 1470684676 - .long 2909933371 - .long 1614391894 - .long 2346034557 - .long 3663942245 - .long 150553254 - .long 581996432 - .long 2853498413 - .long 2851485478 - .long 1062112106 - .long 2360862824 - .long 4080591848 - .long 3037166561 - .long 3942859811 - .long 2491765597 - .long 2637624859 - .long 3670749589 - .long 1175994297 - .long 2568760650 - .long 2257943156 - .long 4233645441 - .long 2769385451 - .long 3183971100 - .long 4072128784 - .long 1432427446 - .long 3380851706 - .long 2013943478 - .long 2236760609 - .long 4221662466 - .long 494326959 - .long 27640328 - .long 432 - .long 4152930537 - .long 3261335210 - .long 1647304022 - .long 2421513631 - .long 0 - .long 2182303040 - .long 2 - .long 0 - .long 2440707372 - .long 2648025301 - .long 1920343642 - .long 4033309261 - .long 228472035 - .long 951557190 - .long 1587559315 - .long 2974493459 - .long 2596925677 - .long 961292909 - .long 2340517507 - .long 4069972126 - .long 3800775586 - .long 2435894136 - .long 1723862257 - .long 2750240234 - .long 1983413582 - .long 438211295 - .long 1298530652 - .long 3389699362 - .long 2457352961 - .long 2834143237 - .long 3251433817 - .long 4162244914 - .long 2624345295 - .long 2198133979 - .long 1723202388 - .long 2299670239 - .long 3808420354 - .long 1821904843 - .long 3390094422 - .long 2531701946 - .long 1851152974 - .long 2701629785 - .long 1724191120 - .long 2482272915 - .long 648872229 - .long 865545185 - .long 2559674717 - .long 2406027884 - .long 910915727 - .long 2144582723 - .long 1642929274 - .long 4137212570 - .long 2336042754 - .long 239465408 - .long 3865561517 - .long 3439416156 - .long 2422534192 - .long 3569472253 - .long 2978472155 - .long 2559905612 - .long 2875291331 - .long 4046158321 - .long 3949085588 - .long 3503570860 - .long 2128927569 - .long 1225899162 - .long 2147335523 - .long 2230618794 - .long 2283389284 - .long 1333752198 - .long 1465231956 - .long 2336128911 - .long 2753251442 - .long 2966939997 - .long 2922138241 - .long 2536578790 - .long 2666112773 - .long 3385813147 - .long 623901210 - .long 3462131994 - .long 668414005 - .long 3701008851 - .long 3126176950 - .long 3345113301 - .long 358440900 - .long 3717742396 - .long 3947881290 - .long 3263003015 - .long 2610140914 - .long 3090322344 - .long 447998310 - .long 4170300383 - .long 397141160 - .long 2942373728 - .long 3824192808 - .long 2641349034 - .long 2658982609 - .long 4233303079 - .long 2524818000 - .long 3312990274 - .long 228893295 - .long 2515147602 - .long 3476745001 - .long 2698739548 - .long 2970265182 - .long 931672352 - .long 30032391 - .long 720 - .long 1031893951 - .long 2915037812 - .long 3514686481 - .long 3480585297 - .long 183393903 - .long 2624056858 - .long 28546027 - .long 1683875686 - .long 92539635 - .long 470440642 - .long 3104544566 - .long 2542111380 - .long 2423082850 - .long 4223302981 - .long 1880783390 - .long 3172707188 - .long 2733291596 - .long 4028584963 - .long 3133521808 - .long 2155982074 - .long 1545518760 - .long 2360167907 - .long 1514977624 - .long 3361750727 - .long 1775829359 - .long 1268098089 - .long 293245362 - .long 2922889930 - .long 4260567272 - .long 2130738070 - .long 78442230 - .long 3811451694 - .long 3185114409 - .long 1528069252 - .long 1469017227 - .long 3009687218 - .long 817620842 - .long 541098266 - .long 3429120157 - .long 3247469802 - .long 1386496969 - .long 2684347079 - .long 284179228 - .long 4184596161 - .long 3638765322 - .long 371021313 - .long 2606681771 - .long 2672602875 - .long 1153440841 - .long 681666828 - .long 2588485140 - .long 3667250000 - .long 2323000426 - .long 796579017 - .long 4170606170 - .long 2503045697 - .long 3134166249 - .long 3700272898 - .long 3134839549 - .long 3388945252 - .long 703661802 - .long 1462722757 - .long 1341451622 - .long 2296227379 - .long 443948971 - .long 1838486354 - .long 1829780795 - .long 3113397699 - .long 3423557800 - .long 3677683794 - .long 2988390605 - .long 4220311422 - .long 2364782699 - .long 377168398 - .long 988912816 - .long 2859792771 - .long 2272449576 - .long 2425114493 - .long 3394168911 - .long 3875037301 - .long 2614813611 - .long 1136311064 - .long 3219605340 - .long 2624778863 - .long 2109052744 - .long 2469309985 - .long 1975730813 - .long 3554907757 - .long 1295201579 - .long 391105893 - .long 1554957189 - .long 2406549547 - .long 576394664 - .long 1543244524 - .long 1882413337 - .long 3257006239 - .long 1017054059 - .long 1977139902 - .long 2097363325 - .long 2203699043 - .long 1908366122 - .long 67963273 - .long 641406479 - .long 2982177629 - .long 3746196521 - .long 1016392834 - .long 2077695946 - .long 4016838075 - .long 2069372298 - .long 3280381472 - .long 2122130600 - .long 2685921991 - .long 1883255817 - .long 3264982359 - .long 4098768927 - .long 3758603957 - .long 3506210954 - .long 1836307129 - .long 2822017765 - .long 2764063917 - .long 2012804049 - .long 1836928984 - .long 1054120456 - .long 2619585574 - .long 1055724672 - .long 2194227394 - .long 2447214543 - .long 2687690031 - .long 1327427687 - .long 1655178620 - .long 3028234167 - .long 3556180690 - .long 2927424394 - .long 229520228 - .long 65594667 - .long 3227047264 - .long 1689555076 - .long 4247943379 - .long 172770419 - .long 3675678736 - .long 657796043 - .long 288113065 - .long 2256116365 - .long 2460956283 - .long 2381283399 - .long 3352776929 - .long 3687288864 - .long 3224422563 - .long 672976042 - .long 857803139 - .long 2956970725 - .long 3269238901 - .long 2326138918 - .long 3946484787 - .long 3349422960 - .long 2579382025 - .long 3310332749 - .long 822582390 - .long 2446752418 - .long 2381540812 - .long 4287345289 - .long 449373617 - .long 1629474989 - .long 2287047921 - .long 3156879118 - .long 2932312680 - .long 4059116599 - .long 3501115759 - .long 2653478600 - .long 1047527497 - .long 2387670671 - .long 2153577515 - .long 4278907533 - .long 1522300626 - .long 2248985742 - .long 2923309751 - .long 2050095503 - .long 1358740372 - .long 29884806 - .long 576 - .long 189636935 - .long 2307472755 - .long 73850715 - .long 2629855449 - .long 3883672823 - .long 618265067 - .long 3875053116 - .long 3917969758 - .long 1449807750 - .long 2492768441 - .long 781111022 - .long 3190435238 - .long 1482976409 - .long 3746699123 - .long 673296220 - .long 2543135664 - .long 1097012132 - .long 2731166546 - .long 2691838079 - .long 3591085575 - .long 4108503415 - .long 2072634685 - .long 3936623385 - .long 2185856579 - .long 1923690262 - .long 3646023575 - .long 4216469600 - .long 2465929342 - .long 431460727 - .long 596938224 - .long 2153081083 - .long 2604407262 - .long 2280668022 - .long 3134357508 - .long 2589033740 - .long 2773504679 - .long 2807242375 - .long 2817121462 - .long 2773778968 - .long 2997091783 - .long 1733040470 - .long 818736373 - .long 2513276750 - .long 3273702286 - .long 3677662487 - .long 322072717 - .long 1865747051 - .long 3233516951 - .long 2915555540 - .long 937584400 - .long 659945040 - .long 2820584615 - .long 2133192181 - .long 2691571362 - .long 4196086611 - .long 2727659532 - .long 896759672 - .long 1769906504 - .long 3035342266 - .long 2750209132 - .long 1576632880 - .long 1478621509 - .long 1238707153 - .long 3507491969 - .long 126298229 - .long 3524093915 - .long 2681332129 - .long 2656870434 - .long 2282193125 - .long 2123250942 - .long 2537777848 - .long 2313555892 - .long 2236573588 - .long 3014805274 - .long 1599407648 - .long 4251279069 - .long 1359728578 - .long 2438133930 - .long 1558056398 - .long 2562927734 - .long 3023480919 - .long 1448378982 - .long 1701562892 - .long 2340149056 - .long 1506041285 - .long 779806113 - .long 4234929211 - .long 2470659521 - .long 3801687606 - .long 3749889093 - .long 4112153792 - .long 4129315601 - .long 3087235106 - .long 3558690450 - .long 4001893244 - .long 3474539130 - .long 508945001 - .long 2957303106 - .long 3788800591 - .long 2700334225 - .long 1697795651 - .long 4047812965 - .long 4036703836 - .long 3519182687 - .long 4240516712 - .long 1475971627 - .long 1575184661 - .long 2515949915 - .long 1673437412 - .long 2377231640 - .long 3395057130 - .long 2344040799 - .long 1065264411 - .long 1317525997 - .long 664446688 - .long 3082671496 - .long 1521403251 - .long 50174553 - .long 2566979079 - .long 3666263822 - .long 3888565980 - .long 425393181 - .long 383974 - .long 2211658859 - .long 3190477332 - .long 1452652764 - .long 881590408 - .long 2658571543 - .long 2768922591 - .long 607349007 - .long 1340513656 - .long 2982866930 - .long 2042743989 - .long 2907958666 - .long 2030930082 - .long 2170145182 - .long 1493033626 - .long 3329402172 - .long 1968890141 - .long 2331822590 - .long 2408886146 - .long 1783184274 - .long 12825068 - .long 4227858976 - .long 2710581281 - .long 3153889734 - .long 3238022506 - .long 4176533952 - .long 1531340198 - .long 4025201404 - .long 2485789300 - .long 650490227 - .long 2321085797 - .long 625172 - .long 0 - .long 0 - .long 1069281709 - .long 251624587 - .long 0 - .long 0 - .long 4197074614 - .long 91585281 - .long 10 - .long 0 - .long 2135656897 - .long 267376913 - .long 1588 - .long 0 - .long 3403656332 - .long 967418652 - .long 209472 - .long 0 - .long 463318414 - .long 1993660658 - .long 23089564 - .long 0 - .long 1930917064 - .long 2053446879 - .long 2077215423 - .long 0 - .long 657157488 - .long 2477268698 - .long 3166180846 - .long 34 - .long 1532275274 - .long 3903843069 - .long 3017665745 - .long 1932 - .long 3296114418 - .long 3153699036 - .long 1621212020 - .long 80134 - .long 1258014930 - .long 2176092298 - .long 1175504463 - .long 2347208 - .long 1382073311 - .long 570037013 - .long 1129603108 - .long 44970025 - .long 2202866424 - .long 1579426883 - .long 3017508354 - .long 499448209 - .long 4088025423 - .long 891205158 - .long 1193661411 - .long 2604580528 - .long 2532457727 - .long 3946349630 - .long 1951385266 - .long 3993662730 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2589520468 - .long 104644116 - .long 0 - .long 0 - .long 3884787564 - .long 2761065855 - .long 3 - .long 0 - .long 3187602994 - .long 4135562377 - .long 626 - .long 0 - .long 1724989792 - .long 1713856870 - .long 86304 - .long 0 - .long 2484708115 - .long 4089533751 - .long 10036248 - .long 0 - .long 275209371 - .long 2697520380 - .long 952228456 - .long 0 - .long 3236472558 - .long 1226316501 - .long 3598685087 - .long 16 - .long 3284813591 - .long 1063192554 - .long 3944393543 - .long 991 - .long 1278466978 - .long 2628971736 - .long 1168074903 - .long 43599 - .long 848711725 - .long 2087159795 - .long 759297680 - .long 1353656 - .long 1425592604 - .long 1129358307 - .long 2754552431 - .long 27432831 - .long 3204498819 - .long 300826889 - .long 3605445756 - .long 320203780 - .long 1698536723 - .long 3065896691 - .long 309908814 - .long 1734061231 - .long 3912468499 - .long 396401915 - .long 3674073704 - .long 2719285114 - .long 4294967292 - .long 0 - .long 3981914375 - .long 2206547233 - .long 12816876 - .long 4227858976 - .long 4096021827 - .long 3999001670 - .long 1063371522 - .long 3989528078 - .long 874562813 - .long 2447814409 - .long 1858302676 - .long 4162682718 - .long 1605953959 - .long 1135435 - .long 0 - .long 0 - .long 2549031326 - .long 239160205 - .long 0 - .long 0 - .long 454697744 - .long 620180210 - .long 10 - .long 0 - .long 2436299213 - .long 3355768607 - .long 1582 - .long 0 - .long 351390256 - .long 799610387 - .long 208707 - .long 0 - .long 25800287 - .long 698915934 - .long 22891066 - .long 0 - .long 4130988338 - .long 676217935 - .long 2048657779 - .long 0 - .long 2657270905 - .long 3829767903 - .long 59128891 - .long 34 - .long 1037582638 - .long 2935003680 - .long 713523288 - .long 1875 - .long 901580945 - .long 1268517119 - .long 2358220346 - .long 76826 - .long 1912766477 - .long 222206216 - .long 632792841 - .long 2216812 - .long 4065471431 - .long 1410808044 - .long 2022595908 - .long 41710361 - .long 438075994 - .long 598703158 - .long 1085011105 - .long 454516776 - .long 604410846 - .long 4058435110 - .long 2236814241 - .long 2333657313 - .long 2448294355 - .long 2704068860 - .long 1114425723 - .long 3548452336 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3769919769 - .long 153956907 - .long 0 - .long 0 - .long 646070119 - .long 4028818701 - .long 6 - .long 0 - .long 2588679469 - .long 1052177761 - .long 1128 - .long 0 - .long 2209274989 - .long 523514771 - .long 155204 - .long 0 - .long 2126396778 - .long 3565792859 - .long 17775584 - .long 0 - .long 2013180833 - .long 1908602229 - .long 1662519428 - .long 0 - .long 3793993839 - .long 1441646378 - .long 3693455390 - .long 28 - .long 3379423244 - .long 3965194379 - .long 1988414356 - .long 1663 - .long 1712981619 - .long 805217952 - .long 1789525478 - .long 71195 - .long 1327601011 - .long 2853644807 - .long 2041759317 - .long 2141557 - .long 944030315 - .long 2463564559 - .long 1071870408 - .long 41839542 - .long 3377497270 - .long 1387686562 - .long 1015294515 - .long 470457582 - .long 3802633795 - .long 4019363939 - .long 1055805497 - .long 2472026772 - .long 1903142729 - .long 1756051618 - .long 411357926 - .long 3811072860 - .long 4294967291 - .long 0 - .long 2342180209 - .long 2629357739 - .long 12825068 - .long 4227858976 - .long 4176598204 - .long 2421744458 - .long 608412369 - .long 593975024 - .long 2402997778 - .long 853372562 - .long 4106233885 - .long 999432807 - .long 1956711771 - .long 1129902 - .long 0 - .long 0 - .long 3668311682 - .long 238634701 - .long 0 - .long 0 - .long 1969498866 - .long 413457374 - .long 10 - .long 0 - .long 2816017558 - .long 1616523229 - .long 1570 - .long 0 - .long 3757647515 - .long 3035182130 - .long 206269 - .long 0 - .long 2187487164 - .long 1784472528 - .long 22516356 - .long 0 - .long 559031239 - .long 1740008181 - .long 2003371129 - .long 0 - .long 661394403 - .long 1757559962 - .long 108872688 - .long 33 - .long 2108184885 - .long 2675738113 - .long 243072689 - .long 1805 - .long 1896660970 - .long 944386947 - .long 1395829566 - .long 73206 - .long 2645692570 - .long 1073605584 - .long 391090218 - .long 2088195 - .long 3576186609 - .long 249080280 - .long 1318613440 - .long 38820429 - .long 1698387538 - .long 1714182690 - .long 2486672428 - .long 418377280 - .long 786186663 - .long 550325920 - .long 34733209 - .long 2130294753 - .long 123703415 - .long 1830333669 - .long 555170427 - .long 3225161241 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 372615672 - .long 141112893 - .long 0 - .long 0 - .long 3315900643 - .long 1327290262 - .long 6 - .long 0 - .long 3811139837 - .long 3724885846 - .long 1016 - .long 0 - .long 989130504 - .long 3252199933 - .long 138436 - .long 0 - .long 1221640456 - .long 1442402103 - .long 15666709 - .long 0 - .long 4152936768 - .long 1813348380 - .long 1445091735 - .long 0 - .long 4193896088 - .long 3387134533 - .long 2948009907 - .long 24 - .long 2262704738 - .long 1989650954 - .long 3803792063 - .long 1396 - .long 2783464578 - .long 434957745 - .long 1316597970 - .long 58551 - .long 1368551733 - .long 528983851 - .long 2424303193 - .long 1721511 - .long 2488297655 - .long 3464245304 - .long 3652031881 - .long 32861225 - .long 3506409524 - .long 3965838759 - .long 4041530878 - .long 361842100 - .long 1191665382 - .long 3299555859 - .long 1239122770 - .long 1871471448 - .long 3889602930 - .long 4175372373 - .long 3489971328 - .long 2859914059 - .long 4294967291 - .long 0 - .long 4097644266 - .long 3051847358 - .long 12816876 - .long 4227858976 - .long 205941362 - .long 2843814473 - .long 1373054629 - .long 908624394 - .long 572230967 - .long 3772158671 - .long 2295107357 - .long 875890232 - .long 1676909203 - .long 1121011 - .long 0 - .long 0 - .long 3140758008 - .long 236890113 - .long 0 - .long 0 - .long 78883718 - .long 4270561461 - .long 9 - .long 0 - .long 653004353 - .long 1003106748 - .long 1549 - .long 0 - .long 1997655276 - .long 2810156938 - .long 202673 - .long 0 - .long 816790074 - .long 126500350 - .long 22018895 - .long 0 - .long 483718758 - .long 1693602023 - .long 1948244742 - .long 0 - .long 1719888843 - .long 3024114415 - .long 3912173698 - .long 31 - .long 857585795 - .long 2024050081 - .long 2152155389 - .long 1731 - .long 2161391665 - .long 4153338473 - .long 3453597175 - .long 69665 - .long 690916841 - .long 3408680089 - .long 1481878010 - .long 1970802 - .long 4244781337 - .long 1956485181 - .long 3004849658 - .long 36347304 - .long 3508046261 - .long 2375922782 - .long 3796433011 - .long 389053187 - .long 1871421647 - .long 319248902 - .long 2844007792 - .long 1971197416 - .long 814256252 - .long 534724998 - .long 4096580698 - .long 2976687819 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1862921762 - .long 128829141 - .long 0 - .long 0 - .long 2226943868 - .long 3083060057 - .long 5 - .long 0 - .long 3790004556 - .long 3473372331 - .long 913 - .long 0 - .long 1912405170 - .long 4207391429 - .long 123223 - .long 0 - .long 2818206388 - .long 546560525 - .long 13795947 - .long 0 - .long 926024359 - .long 466562391 - .long 1257280106 - .long 0 - .long 3443963035 - .long 4102181261 - .long 824629355 - .long 21 - .long 1095781235 - .long 2590304783 - .long 3003378070 - .long 1181 - .long 3706684271 - .long 2607807817 - .long 1026954074 - .long 48765 - .long 2542600140 - .long 2410120938 - .long 1491060906 - .long 1411271 - .long 1675138874 - .long 3651173547 - .long 1198416212 - .long 26539599 - .long 842200953 - .long 401492709 - .long 2211503215 - .long 288538794 - .long 1943642431 - .long 940486719 - .long 4288006473 - .long 1478519853 - .long 2666730960 - .long 3798148012 - .long 941219805 - .long 2247821888 - .long 4294967291 - .long 0 - .long 3590128009 - .long 612654688 - .long 716769122 - .long 2 - .long 1828204245 - .long 1775926740 - .long 862431319 - .long 1672 - .long 437955120 - .long 677313132 - .long 3681074436 - .long 185717 - .long 2884200252 - .long 2090641138 - .long 3992138721 - .long 6428191 - .long 3221531446 - .long 2371910721 - .long 4237081542 - .long 91796659 - .long 3709028830 - .long 1986863955 - .long 2283696654 - .long 618613015 - .long 1322699753 - .long 485003501 - .long 4170891366 - .long 2092077992 - .long 1956040154 - .long 1117518145 - .long 962574367 - .long 3571830532 - .long 3307700780 - .long 4011234461 - .long 1774218710 - .long 2881343143 - .long 391584861 - .long 529954976 - .long 2825691418 - .long 856722023 - .long 0 - .long 0 - .long 3298396499 - .long 2495110602 - .long 2303999958 - .long 1 - .long 2542348583 - .long 3627482097 - .long 3224340298 - .long 1074 - .long 967783320 - .long 1406672934 - .long 4087851085 - .long 117404 - .long 4177416572 - .long 3106181469 - .long 261241013 - .long 4043478 - .long 202539330 - .long 3294545774 - .long 2496277142 - .long 57629426 - .long 720582238 - .long 1814713548 - .long 3091376339 - .long 388014697 - .long 146526450 - .long 4271301162 - .long 2338306966 - .long 1311627297 - .long 2070656804 - .long 1921999658 - .long 2258254113 - .long 2238807899 - .long 242296837 - .long 3253310178 - .long 207686852 - .long 1805761504 - .long 0 - .long 0 - .long 0 - .long 536870912 - .long 3 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3266800725 - .long 2413762801 - .long 3330613244 - .long 98 - .long 1201359419 - .long 2714872150 - .long 3208385380 - .long 20210 - .long 1956238602 - .long 4223228119 - .long 2784422263 - .long 1028397 - .long 3439473030 - .long 2410851869 - .long 3292470576 - .long 20253447 - .long 1686397776 - .long 592553810 - .long 969547707 - .long 185741930 - .long 3468583933 - .long 1250725515 - .long 2117116206 - .long 869064170 - .long 3909100790 - .long 1843251452 - .long 3871208694 - .long 2155104570 - .long 4148130288 - .long 2464912491 - .long 1300300682 - .long 2809133898 - .long 4014582188 - .long 344247779 - .long 2796123058 - .long 1784697576 - .long 195792426 - .long 264977488 - .long 3560329357 - .long 428361011 - .long 4294967290 - .long 0 - .long 258978617 - .long 1401350217 - .long 414758348 - .long 0 - .long 3858563520 - .long 693344438 - .long 929988021 - .long 164 - .long 3412169140 - .long 2002911005 - .long 1900957617 - .long 27838 - .long 201299732 - .long 2653786175 - .long 836100553 - .long 1342443 - .long 112595646 - .long 24843945 - .long 2773043450 - .long 25894040 - .long 839565763 - .long 2401088019 - .long 1862800896 - .long 235227666 - .long 241900887 - .long 2111181527 - .long 559246656 - .long 1095314964 - .long 1679323588 - .long 170716610 - .long 3844392689 - .long 2709031418 - .long 2888224069 - .long 91827283 - .long 2484028115 - .long 3525834755 - .long 3046356865 - .long 465368430 - .long 2789327597 - .long 2238015503 - .long 0 - .long 0 - .long 0 - .long 536870912 - .long 3 - .long 0 - .long 1629800756 - .long 211083125 - .long 74954925 - .long 0 - .long 1545370875 - .long 1864504884 - .long 4276848488 - .long 99 - .long 535444102 - .long 452832597 - .long 341934841 - .long 25395 - .long 995111971 - .long 3604718273 - .long 313159131 - .long 1483348 - .long 467529526 - .long 927033629 - .long 3631579950 - .long 30995691 - .long 2550211567 - .long 3003753623 - .long 1495846756 - .long 281435025 - .long 1095077789 - .long 2892497672 - .long 2221613791 - .long 1215372727 - .long 1191801615 - .long 1667552124 - .long 2428434537 - .long 2551716115 - .long 1201465291 - .long 1874197394 - .long 578557072 - .long 2461680298 - .long 391584923 - .long 529954976 - .long 2825691418 - .long 856722023 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 677405811 - .long 113109491 - .long 129649144 - .long 114 - .long 3825428504 - .long 3691782001 - .long 3484121609 - .long 31057 - .long 2790365057 - .long 1503600960 - .long 2128362517 - .long 1842108 - .long 1815120706 - .long 3864377339 - .long 1520525307 - .long 38689413 - .long 2352056310 - .long 3376817110 - .long 3997253088 - .long 352036787 - .long 1198120374 - .long 2050750776 - .long 3970142361 - .long 1521787235 - .long 3363842978 - .long 1133863107 - .long 832963017 - .long 3196692150 - .long 3821983599 - .long 1263968260 - .long 873004851 - .long 3084767199 - .long 0 - .long 0 - .long 0 - .long 1073741824 - .long 2 - .long 0 - .long 2651322308 - .long 3386393833 - .long 2831116449 - .long 5 - .long 4289850283 - .long 2368640529 - .long 3021143330 - .long 3284 - .long 1866387201 - .long 153493322 - .long 2018528397 - .long 295326 - .long 712913332 - .long 628654228 - .long 3881360594 - .long 8668773 - .long 2507640802 - .long 239249479 - .long 2566710297 - .long 108181087 - .long 2758175823 - .long 567857163 - .long 2134567225 - .long 650389544 - .long 3640757112 - .long 2804269303 - .long 645858985 - .long 1991928169 - .long 804414238 - .long 2280600022 - .long 3914463340 - .long 3114948090 - .long 1937917503 - .long 2252804771 - .long 1940556944 - .long 2322010631 - .long 293688586 - .long 2544949880 - .long 3193010387 - .long 642541517 - .long 4294967291 - .long 0 - .long 453133727 - .long 877370797 - .long 1558279443 - .long 6 - .long 2547899573 - .long 3360184680 - .long 1178296802 - .long 2954 - .long 1755214995 - .long 2061159704 - .long 3531983056 - .long 253712 - .long 543505238 - .long 128612626 - .long 629116815 - .long 7334610 - .long 100838038 - .long 3022980312 - .long 2298747174 - .long 90954203 - .long 3014766307 - .long 96539771 - .long 3590315363 - .long 545180116 - .long 2964798914 - .long 2705356255 - .long 3013291713 - .long 1667101568 - .long 3407956254 - .long 2146783552 - .long 2206958848 - .long 2604739160 - .long 1922050233 - .long 3165283613 - .long 2563978608 - .long 1940712607 - .long 0 - .long 0 - .long 0 - .long 536870912 - .long 3 - .long 0 - .long 2797952740 - .long 3054806814 - .long 120 - .long 0 - .long 18168 - .long 0 - .long 1890690921 - .long 3263011055 - .long 3960 - .long 0 - .long 18872 - .long 0 - .long 3238416553 - .long 3265778049 - .long 8064 - .long 0 - .long 18168 - .long 0 - .long 4097644266 - .long 3051847358 - .long 13440 - .long 0 - .long 18872 - .long 0 - .long 0 - .long 0 - .long 1313084713 - .long 2734261102 - .long 4113882560 - .long 4230436817 - .long 0 - .long 4294967295 - .long 4105493977 - .long 3790490747 - .long 2885543867 - .long 1813033052 - .long 0 - .long 0 - .type __bessel_x_table,@object - .size __bessel_x_table,19696 - .align 4 -.L_2il0floatpacket.108: - .long 0x5f000000 - .type .L_2il0floatpacket.108,@object - .size .L_2il0floatpacket.108,4 - .data - .hidden __dpml_ux_sqrt_evaluation__ - .hidden __dpml_multiply__ - .hidden __dpml_divide__ - .hidden __dpml_ux_log__ - .hidden __dpml_ux_sincos - .hidden __dpml_ffs_and_shift__ - .hidden __dpml_addsub__ - .hidden __dpml_evaluate_rational__ - .hidden __dpml_pack__ - .hidden __dpml_unpack_x_or_y__ - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_log.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_log.S deleted file mode 100644 index d199fe4588..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_log.S +++ /dev/null @@ -1,365 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_log.c" - .text -..TXTST0: -# -- Begin __dpml_ux_log_poly__ - .text - .align 16,0x90 - .hidden __dpml_ux_log_poly__ - .globl __dpml_ux_log_poly__ -__dpml_ux_log_poly__: -# parameter 1: 48 + %esp -# parameter 2: 52 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - subl $36, %esp - xorl %eax, %eax - movl 52(%esp), %edi - addl $28, %esp - pushl %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - pushl %eax - pushl $6 - pushl %eax - pushl $17 - lea 128+__log_x_table@GOTOFF(%ebx), %edx - pushl %edx - pushl 44(%esp) - call __dpml_evaluate_rational__ -..B1.2: - addl $12, %esp - lea 472+__log_x_table@GOTOFF(%ebx), %eax - pushl %edi - pushl %eax - pushl %edi - call __dpml_multiply__ -..B1.3: - addl $36, %esp - popl %ebx - popl %edi - ret - .align 16,0x90 - .type __dpml_ux_log_poly__,@function - .size __dpml_ux_log_poly__,.-__dpml_ux_log_poly__ - .data -# -- End __dpml_ux_log_poly__ - .text -# -- Begin __dpml_ux_log__ - .text - .align 16,0x90 - .hidden __dpml_ux_log__ - .globl __dpml_ux_log__ -__dpml_ux_log__: -# parameter 1: 112 + %esp -# parameter 2: 116 + %esp -# parameter 3: 120 + %esp -..B2.1: -..L3: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $92, %esp - movl 112(%esp), %ecx - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - movl 8(%ecx), %esi - movl %gs:20, %eax - xorl %esp, %eax - subl 112+__log_x_table@GOTOFF(%ebx), %esi - movl 12(%ecx), %ebp - movl 4(%ecx), %edx - movl %edx, %edi - movl %eax, 80(%esp) - sbbl 116+__log_x_table@GOTOFF(%ebx), %ebp - jb ..B2.2 -..B2.19: - orl %ebp, %esi - jne ..B2.3 -..B2.2: - lea -1(%edx), %edi -..B2.3: - addl $20, %esp - lea 424+__log_x_table@GOTOFF(%ebx), %ebp - subl %edi, %edx - lea 12(%esp), %esi - pushl %esi - pushl $0 - pushl $6 - pushl %ebp - pushl %ecx - movl %edx, 4(%ecx) - call __dpml_addsub__ -..B2.4: - movl 112(%esp), %ecx - movl 120(%esp), %ebp - addl $20, %esp - addl %edi, 4(%ecx) - lea 36(%esp), %edx - pushl %ebp - pushl $0 - pushl $2 - pushl %esi - pushl %edx - call __dpml_divide__ -..B2.5: - addl $28, %esp - xorl %edx, %edx - pushl %esi - pushl %edx - pushl $6 - pushl %edx - pushl $17 - lea 128+__log_x_table@GOTOFF(%ebx), %ecx - pushl %ecx - pushl %ebp - call __dpml_evaluate_rational__ -..B2.6: - addl $12, %esp - movl %edi, %eax - pushl $0 - pushl $1 - cltd - pushl %ebp - movl %edi, 8(%ebp) - movl %edx, 12(%ebp) - call __dpml_ffs_and_shift__ -..B2.7: - addl $20, %esp - pushl %ebp - pushl $0 - pushl $8 - pushl %esi - pushl %ebp - call __dpml_addsub__ -..B2.8: - movl 116(%esp), %esi - testl %esi, %esi - je ..B2.10 -..B2.9: - addl $12, %esp - pushl %ebp - pushl %esi - pushl %ebp - call __dpml_multiply__ -..B2.10: - cmpl $-262144, 60(%esp) - je ..B2.15 -..B2.11: - movl $1, %eax -..B2.12: - movl 80(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B2.14 -..B2.13: - xorl %edx, %edx - addl $92, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B2.14: - call __stack_chk_fail@PLT -..B2.15: - testl %esi, %esi - jne ..B2.11 -..B2.16: - xorl %eax, %eax - jmp ..B2.12 - .align 16,0x90 - .type __dpml_ux_log__,@function - .size __dpml_ux_log__,.-__dpml_ux_log__ - .data -# -- End __dpml_ux_log__ - .section .rodata, "a" - .align 4 - .align 4 -__log_x_table: - .long 1088750600 - .long 519758862 - .long 58 - .long 0 - .long 59 - .long 0 - .long 60 - .long 0 - .long 1088750600 - .long 519758862 - .long 61 - .long 0 - .long 62 - .long 0 - .long 63 - .long 0 - .long 1088750600 - .long 519758862 - .long 64 - .long 0 - .long 65 - .long 0 - .long 66 - .long 0 - .long 15008776 - .long 336609536 - .long 58 - .long 0 - .long 4192101508 - .long 3037000499 - .long 4243534402 - .long 1518500249 - .long 1261892956 - .long 1305769775 - .long 706307789 - .long 114052365 - .long 2125978754 - .long 1401519948 - .long 2628436525 - .long 90640697 - .long 1075745124 - .long 4046945230 - .long 850547722 - .long 100185346 - .long 3858047057 - .long 2069326047 - .long 3415016796 - .long 106820841 - .long 196219186 - .long 3461778520 - .long 1283971156 - .long 114747264 - .long 133398994 - .long 3894487089 - .long 1548005786 - .long 123926548 - .long 4002430868 - .long 3905024888 - .long 1104860464 - .long 134702783 - .long 1396868873 - .long 2152947579 - .long 2102985887 - .long 147531619 - .long 361329122 - .long 2531697111 - .long 2794113080 - .long 163061263 - .long 2117398987 - .long 2352680084 - .long 3122626672 - .long 182244941 - .long 299366278 - .long 2801833386 - .long 1248329477 - .long 206544267 - .long 99864504 - .long 1693623838 - .long 1770762254 - .long 238320308 - .long 959885721 - .long 1462617677 - .long 2483170600 - .long 281651273 - .long 2353710846 - .long 1786830293 - .long 2080549112 - .long 344240445 - .long 2781107612 - .long 1683788319 - .long 2061424959 - .long 442594858 - .long 2924123738 - .long 1498310185 - .long 3744988402 - .long 619632801 - .long 2019498699 - .long 1065527877 - .long 1946680041 - .long 1032721336 - .long 1763524233 - .long 3196583632 - .long 1545072827 - .long 3098164009 - .long 2 - .long 0 - .long 0 - .long 1 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 2 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3520035243 - .long 2977044471 - .long 66254511 - .long 3387143064 - .long 0 - .long 4294967295 - .long 4224710552 - .long 2585827972 - .long 192713080 - .long 2408143276 - .long 0 - .long 0 - .type __log_x_table,@object - .size __log_x_table,528 - .data - .hidden __dpml_multiply__ - .hidden __dpml_divide__ - .hidden __dpml_ffs_and_shift__ - .hidden __dpml_addsub__ - .hidden __dpml_evaluate_rational__ - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_ops.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_ops.S deleted file mode 100644 index 6a06e77f6f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_ops.S +++ /dev/null @@ -1,3653 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_ops.c" - .text -..TXTST0: -# -- Begin __dpml_ffs_and_shift__ - .text - .align 16,0x90 - .hidden __dpml_ffs_and_shift__ - .globl __dpml_ffs_and_shift__ -__dpml_ffs_and_shift__: -# parameter 1: 64 + %esp -# parameter 2: 68 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $44, %esp - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - movl %eax, 28(%esp) - movl 64(%esp), %ecx - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 40(%esp) - movl 72(%esp), %eax - movl 68(%esp), %edx - movl 8(%ecx), %ebp - orl %eax, %edx - movl 12(%ecx), %ebx - jne ..B1.4 -..B1.2: - movl 64(%esp), %eax - xorl %ecx, %ecx - movl %ebx, %esi - subl %ecx, %esi - movl 4(%eax), %edx - movl %edx, 20(%esp) - jl ..B1.13 -..B1.3: - movl 64(%esp), %eax - movl 16(%eax), %esi - movl 20(%eax), %edx - jmp ..B1.9 -..B1.4: - movl $1, %edx - movl 68(%esp), %ecx - subl %edx, %ecx - orl %eax, %ecx - jne ..B1.7 -..B1.5: - xorl %eax, %eax - movl %ebx, %edx - subl %eax, %edx - jl ..B1.16 - jmp ..B1.8 -..B1.7: - xorl %eax, %eax -..B1.8: - movl 64(%esp), %edx - xorl %esi, %esi - movl $64, 20(%esp) - movl %ebp, 8(%edx) - movl %ebx, 12(%edx) - movl %esi, 16(%edx) - movl %esi, 20(%edx) - movl %eax, (%edx) - xorl %edx, %edx -..B1.9: - xorl %ecx, %ecx - movl $2, %edi - xorl %eax, %eax - movl %eax, 24(%esp) - movl %ebx, (%esp) - movl %ebp, 4(%esp) - movl %eax, %ebx - jmp ..B1.10 -..B1.12: - xorl %esi, %esi - xorl %edx, %edx -..B1.10: - movl 4(%esp), %ebp - orl (%esp), %ebp - jne ..B1.20 -..B1.11: - addl $64, %eax - movl %edx, (%esp) - adcl $0, %ebx - addl $-1, %edi - movl %edi, %edx - adcl $-1, %ecx - movl %esi, 4(%esp) - orl %ecx, %edx - jne ..B1.12 - jmp ..B1.17 -..B1.13: - movl 40(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.15 -..B1.14: - xorl %eax, %eax - xorl %edx, %edx - addl $44, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.15: - movl 28(%esp), %ebx - call __stack_chk_fail@PLT -..B1.16: - xorl %edx, %edx - movl %ebp, %eax - xorl %ebp, %ebp - movl %ebx, %ecx - xorl %ebx, %ebx - subl %eax, %ebp - sbbl %ecx, %ebx - movl $-2147483648, %eax - jmp ..B1.8 -..B1.17: - movl 64(%esp), %edx - movl %ebx, 24(%esp) - movl $-262144, 4(%edx) - movl 40(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B1.15 -..B1.18: - movl %ebx, %edx - addl $44, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.20: - movl %ebx, 24(%esp) - xorl %ecx, %ecx - movl (%esp), %ebx - movl %ebx, %edi - movl 4(%esp), %ebp - subl %ecx, %edi - jl ..B1.36 -..B1.21: - movl %ebx, %ecx - xorl %edi, %edi - shrl $26, %ecx - andl $30, %ecx - orl %ecx, %edi - je ..B1.23 -..B1.22: - movl $21932, %edi - shrl %cl, %edi - andl $3, %edi - incl %edi - movl %edi, 16(%esp) - movl $0, 12(%esp) - jmp ..B1.26 -..B1.23: - movl %ebp, %edi - movl %ebx, %ecx - andl $-256, %edi - orl %edi, %ecx - jne ..B1.25 -..B1.24: - movl %ebp, %edi -..B1.25: - movl %edi, (%esp) - movl %ebx, %edi - movl %ebx, 4(%esp) - fildll (%esp) - shrl $31, %edi - movl 28(%esp), %ecx - movl %edx, 8(%esp) - faddl .L_2il0floatpacket.1@GOTOFF(%ecx,%edi,8) - movl $1086, %edi - fstpl 32(%esp) - movl 36(%esp), %edx - movl %edx, %ecx - sarl $20, %ecx - sarl $31, %edx - subl %ecx, %edi - movl $0, %ecx - sbbl %edx, %ecx - movl 8(%esp), %edx - movl %edi, 16(%esp) - movl %ecx, 12(%esp) -..B1.26: - cmpl $31, 16(%esp) - jbe ..B1.28 -..B1.27: - movl %ebp, %ebx - movl %edi, %ecx - movl $0, 4(%esp) - shll %cl, %ebx - jmp ..B1.29 -..B1.28: - movl %edi, %ecx - shldl %cl, %ebp, %ebx - shll %cl, %ebp - movl %ebp, 4(%esp) -..B1.29: - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B1.31 -..B1.30: - movl %edx, %ebp - movl $0, (%esp) - shrl %cl, %ebp - jmp ..B1.32 -..B1.31: - movl %edx, %edi - movl %esi, %ebp - shrl %cl, %edi - shrdl %cl, %edx, %ebp - movl %edi, (%esp) -..B1.32: - orl 4(%esp), %ebp - orl (%esp), %ebx - movl %esi, 8(%esp) - cmpl $31, 16(%esp) - jbe ..B1.34 -..B1.33: - movl 16(%esp), %ecx - xorl %esi, %esi - movl 8(%esp), %edx - shll %cl, %edx - jmp ..B1.35 -..B1.34: - movl 16(%esp), %ecx - shldl %cl, %esi, %edx - shll %cl, %esi -..B1.35: - addl 16(%esp), %eax - movl 24(%esp), %ecx - adcl 12(%esp), %ecx - movl %ecx, 24(%esp) -..B1.36: - movl 64(%esp), %ecx - movl %edx, 20(%ecx) - movl 20(%esp), %edx - subl %eax, %edx - movl %ebp, 8(%ecx) - movl %ebx, 12(%ecx) - movl %esi, 16(%ecx) - movl %edx, 4(%ecx) - movl 40(%esp), %ebx - xorl %esp, %ebx - cmpl %gs:20, %ebx - jne ..B1.15 -..B1.37: - movl 24(%esp), %edx - addl $44, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret - .align 16,0x90 - .type __dpml_ffs_and_shift__,@function - .size __dpml_ffs_and_shift__,.-__dpml_ffs_and_shift__ - .data -# -- End __dpml_ffs_and_shift__ - .text -# -- Begin __dpml_unpack2__ - .text - .align 16,0x90 - .hidden __dpml_unpack2__ - .globl __dpml_unpack2__ -__dpml_unpack2__: -# parameter 1: 64 + %esp -# parameter 2: 68 + %esp -# parameter 3: 72 + %esp -# parameter 4: 76 + %esp -# parameter 5: 80 + %esp -# parameter 6: 84 + %esp -# parameter 7: 88 + %esp -..B2.1: -..L3: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $44, %esp - movl 80(%esp), %ebx - movl 84(%esp), %eax - movl 88(%esp), %edx - movl %ebx, 12(%esp) - movl %eax, 16(%esp) - movl %edx, 20(%esp) - xorl %edx, %edx - movl 64(%esp), %eax - movl 72(%esp), %ecx - call __dpml_unpack_x_or_y__..0 -..B2.13: - movl %eax, %esi - movl %edx, %ebp -..B2.2: - xorl %ecx, %ecx - movl %ebp, %edi - subl %ecx, %edi - jl ..B2.9 -..B2.3: - cmpl $0, 68(%esp) - je ..B2.9 -..B2.4: - addl $-32, %esp - lea (,%esi,4), %ecx - movl 8(%ebx), %edi - cmpl $31, %ecx - movl 12(%ebx), %eax - jbe ..B2.6 -..B2.5: - sarl %cl, %eax - jmp ..B2.7 -..B2.6: - movl %eax, %edx - movl %edi, %eax - shrdl %cl, %edx, %eax -..B2.7: - andl $15, %eax - movl 116(%esp), %edi - movl 120(%esp), %ecx - movl 100(%esp), %edx - lea (%ebx,%eax,8), %ebx - movl %ebx, 12(%esp) - movl %edi, 16(%esp) - movl %ecx, 20(%esp) - movl 96(%esp), %eax - movl 108(%esp), %ecx - call __dpml_unpack_x_or_y__. -..B2.8: - movl %esi, %ecx - shrl $28, %ecx - shll $4, %esi - shll $4, %ebp - orl %eax, %esi - orl %ebp, %ecx - movl %esi, %eax - orl %ecx, %edx - addl $76, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B2.9: - movl %esi, %eax - movl %ebp, %edx - addl $44, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret - .align 16,0x90 - .type __dpml_unpack2__,@function - .size __dpml_unpack2__,.-__dpml_unpack2__ - .data -# -- End __dpml_unpack2__ - .text -# -- Begin __dpml_unpack_x_or_y__..0 - .text - .align 16,0x90 -__dpml_unpack_x_or_y__..0: -# parameter 1: %eax -# parameter 2: %edx -# parameter 3: %ecx -# parameter 4: 156 + %esp -# parameter 5: 160 + %esp -# parameter 6: 164 + %esp -..B3.1: -..L4: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $124, %esp - call ..L5 -..L5: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L5](%edx), %edx - movl %edx, 52(%esp) - movl 12(%eax), %edx - movl %ecx, 64(%esp) - movl %edx, %edi - movl %eax, 56(%esp) - andl $-2147483648, %edi - movl %gs:20, %ebp - xorl %esp, %ebp - movl %ebp, 116(%esp) - movl 164(%esp), %ebx - movl %edi, (%ecx) - movl %edx, %ecx - shrl $16, %ecx - andl $32767, %ecx - movl 8(%eax), %esi - movl %eax, 20(%ebx) - movl %edx, %ebx - movl %ecx, 60(%esp) - movl 4(%eax), %edi - lea -16382(%ecx), %ebp - movl %ebp, 16(%esp) - movl %esi, %ebp - shrl $17, %ebp - shll $15, %esi - shll $15, %ebx - movl (%eax), %ecx - movl %edi, %eax - shrl $17, %eax - orl %ebx, %ebp - movl %esi, %ebx - orl $-2147483648, %ebp - addl %esi, %ebx - movl %ebp, 20(%esp) - adcl %ebp, %ebp - orl %eax, %esi - movl %ecx, %eax - orl %edi, %ebp - shll $15, %eax - orl %ecx, %ebx - movl %esi, 76(%esp) - movl %ecx, %esi - movl %eax, 72(%esp) - movl %edi, %eax - shrl $17, %esi - lea -65536(%edx), %edi - shll $15, %eax - xorl %ecx, %ecx - orl %eax, %esi - lea 65536(%edx), %eax - movl %esi, 68(%esp) - movl %edx, %esi - xorl %edi, %eax - shrl $31, %esi - movl %edi, 24(%esp) - subl %ecx, %eax - movl 76(%esp), %edi - jl ..B3.39 -..B3.2: - movl 64(%esp), %eax - movl 72(%esp), %edx - movl 68(%esp), %ebx - movl %edi, 8(%eax) - movl 20(%esp), %edi - movl 16(%esp), %ebp - movl %edx, 16(%eax) - movl $4, %edx - movl %ebx, 20(%eax) - movl %edi, 12(%eax) - movl %ebp, 4(%eax) -..B3.3: - movl 164(%esp), %eax - addl %edx, %esi - movl $1, %edx - movl %esi, %ecx - movl %edx, 32(%esp) - movl (%eax), %ebp - movl %ebp, %edi - shll %cl, %edx - shll $10, %ebp - movl 4(%eax), %ebx - orl %edx, %ebp - shrl $22, %edi - shll $10, %ebx - movl %edx, 36(%esp) - xorl %edx, %edx - orl %ebx, %edi - movl %ebp, (%eax) - orl %esi, %edx - movl %edi, 4(%eax) - jne ..B3.5 -..B3.4: - movl $2139095040, 48(%esp) - flds 48(%esp) - flds 48(%esp) - fsubrp %st, %st(1) - fstps 48(%esp) -..B3.5: - movl $6, %eax - mull %esi - movl 156(%esp), %ebx - cmpl $31, %eax - movl (%ebx), %edi - movl 4(%ebx), %ebx - jbe ..B3.7 -..B3.6: - movl %eax, %ecx - movl %ebx, %edi - sarl %cl, %edi - jmp ..B3.8 -..B3.7: - movl %eax, %ecx - shrdl %cl, %ebx, %edi -..B3.8: - movl %edi, %ecx - xorl %edx, %edx - shrl $3, %edi - xorl %eax, %eax - andl $7, %edi - andl $7, %ecx - shrl $28, %ebx - orl %edi, %eax - je ..B3.32 -..B3.9: - movl 36(%esp), %ebp - movl %edx, %eax - andl $240, %ebp - movl %ebp, 24(%esp) - subl %edx, %eax - jl ..B3.10 -..B3.72: - orl %ecx, %eax - jne ..B3.14 -..B3.10: - movl %ecx, %ebx - orl %edx, %ebx - jne ..B3.12 -..B3.11: - movl 56(%esp), %ebx - movl %ebx, 20(%esp) - jmp ..B3.13 -..B3.12: - movl $0, 20(%esp) -..B3.13: - movl %ebp, %ebx - movl %ebx, 16(%esp) - jmp ..B3.15 -..B3.14: - addl %ecx, %ebx - movl 156(%esp), %edx - movl 52(%esp), %ebp - movl -8(%edx,%ebx,8), %ecx - movl -4(%edx,%ebx,8), %edx - movl 32(%esp), %ebx - shll %cl, %ebx - andl $240, %ebx - movl %ebx, 16(%esp) - movl %ecx, %ebx - shll $4, %ebx - addl __x_constants__@GOT(%ebp), %ebx - movl %ebx, 20(%esp) -..B3.15: - movl $7, %ebp - xorl %ebx, %ebx - negl %ebp - addl %edi, %ebp - orl %ebx, %ebp - je ..B3.36 -..B3.16: - movl 164(%esp), %ebx - movl 8(%ebx), %ebp - orl 12(%ebx), %ebp - je ..B3.19 -..B3.17: - movl 16(%esp), %ebp - xorl %ebx, %ebx - orl 24(%esp), %ebp - orl %ebx, %ebp - je ..B3.19 -..B3.18: - movl $1182793727, 44(%esp) - flds 44(%esp) - flds 44(%esp) - fmulp %st, %st(1) - fstps 44(%esp) -..B3.19: - movl 20(%esp), %ebx - movl 32(%esp), %eax - negl %eax - movl 8(%ebx), %ebp - addl %edi, %eax - movl %ebp, 16(%esp) - movl 12(%ebx), %ebp - xorl %ebx, %ebx - orl %ebx, %eax - je ..B3.35 -..B3.20: - movl $3, %eax - negl %eax - addl %edi, %eax - orl %ebx, %eax - je ..B3.25 -..B3.21: - movl $4, %eax - negl %eax - addl %edi, %eax - orl %ebx, %eax - jne ..B3.23 -..B3.22: - andl $2147483647, %ebp - jmp ..B3.26 -..B3.23: - movl $5, %ebx - subl %ebx, %edi - xorl %ebx, %ebx - orl %ebx, %edi - jne ..B3.26 -..B3.24: - movl 56(%esp), %ebx - andl $2147483647, %ebp - movl 12(%ebx), %edi - andl $-2147483648, %edi - orl %edi, %ebp - jmp ..B3.26 -..B3.25: - xorl $-2147483648, %ebp -..B3.26: - movl 160(%esp), %ebx - movl 16(%esp), %edi - testl $192, 36(%esp) - movl %ebp, 12(%ebx) - movl 20(%esp), %ebp - movl %edi, 8(%ebx) - movl (%ebp), %edi - movl 4(%ebp), %ebp - movl %edi, (%ebx) - movl %ebp, 4(%ebx) - je ..B3.30 -..B3.27: - xorl %ebx, %ebx - subl %ebx, %edx - jl ..B3.28 -..B3.73: - orl %edx, %ecx - jne ..B3.30 -..B3.28: - movl 164(%esp), %edx - movl 8(%edx), %ebx - orl 12(%edx), %ebx - je ..B3.30 -..B3.29: - movl 52(%esp), %edx - movl $8388608, 40(%esp) - flds 40(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%edx) - fmulp %st, %st(1) - fstps 40(%esp) -..B3.30: - movl 116(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B3.34 -..B3.31: - movl %esi, %eax - movl $-2147483648, %edx - addl $124, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B3.32: - movl 116(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B3.34 -..B3.33: - movl %esi, %eax - xorl %edx, %edx - addl $124, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B3.34: - movl 52(%esp), %ebx - call __stack_chk_fail@PLT -..B3.35: - orl $32768, %ebp - jmp ..B3.26 -..B3.36: - movl 160(%esp), %edi - andl $-2013265921, %ecx - orl $268435456, %ecx - movl %ecx, 56(%esp) - movl (%edi), %ebx - movl 4(%edi), %ebp - movl %ebx, 84(%esp) - movl %ebp, 88(%esp) - movl 8(%edi), %ebx - movl 12(%edi), %ebp - movl %ebx, 92(%esp) - movl %ebp, 96(%esp) - movl %edx, 60(%esp) - addl $4, %esp - lea 52(%esp), %edx - pushl %edx - call __dpml_exception -..B3.37: - movl 160(%esp), %ecx - movl (%eax), %edx - movl 4(%eax), %ebx - movl %edx, (%ecx) - movl %ebx, 4(%ecx) - movl 8(%eax), %ebp - movl 12(%eax), %edi - movl %ebp, 8(%ecx) - movl %edi, 12(%ecx) - jmp ..B3.30 -..B3.39: - movl 24(%esp), %ecx - xorl %eax, %eax - xorl %edx, %ecx - subl %eax, %ecx - jl ..B3.43 -..B3.40: - movl 64(%esp), %eax - orl %ebp, %ebx - movl 72(%esp), %ecx - movl %edi, 8(%eax) - movl 20(%esp), %edi - movl %ecx, 16(%eax) - movl %edi, 12(%eax) - movl 68(%esp), %ecx - movl 16(%esp), %edi - movl %ecx, 20(%eax) - movl %edi, 4(%eax) - jne ..B3.42 -..B3.41: - movl $2, %edx - jmp ..B3.3 -..B3.42: - shrl $15, %edx - movl %edx, %esi - xorl %edx, %edx - andl $1, %esi - jmp ..B3.3 -..B3.43: - orl %ebp, %ebx - jne ..B3.45 -..B3.44: - movl 64(%esp), %eax - movl 72(%esp), %edx - movl 68(%esp), %ebx - movl %edi, 8(%eax) - movl 20(%esp), %edi - movl 16(%esp), %ebp - movl %edx, 16(%eax) - movl $8, %edx - movl %ebx, 20(%eax) - movl %edi, 12(%eax) - movl %ebp, 4(%eax) - jmp ..B3.3 -..B3.45: - movl 20(%esp), %ebx - xorl %edx, %edx - addl $-2147483648, %ebx - movl %ebx, %eax - addl $-16381, 60(%esp) - movl %ebx, 20(%esp) - subl %edx, %eax - movl %edi, 36(%esp) - jl ..B3.69 -..B3.46: - movl 72(%esp), %edx - xorl %ecx, %ecx - movl %edx, 24(%esp) - movl $2, %eax - movl %edi, 76(%esp) - xorl %ebp, %ebp - movl 68(%esp), %edx - movl 24(%esp), %edi - movl %ecx, 32(%esp) - movl %esi, 16(%esp) - jmp ..B3.47 -..B3.49: - xorl %edi, %edi - xorl %edx, %edx -..B3.47: - movl 36(%esp), %esi - orl %ebx, %esi - jne ..B3.52 -..B3.48: - addl $64, 32(%esp) - movl %edx, %ebx - movl %edi, 36(%esp) - adcl $0, %ebp - addl $-1, %eax - movl %eax, %edx - adcl $-1, %ecx - orl %ecx, %edx - jne ..B3.49 -..B3.50: - movl 64(%esp), %ebp - movl 76(%esp), %edi - movl 72(%esp), %edx - movl %edi, 8(%ebp) - movl 68(%esp), %ebx - movl 20(%esp), %edi - movl 16(%esp), %esi - movl %edx, 16(%ebp) - movl %ebx, 20(%ebp) - movl %edi, 12(%ebp) - movl $-262144, 4(%ebp) -..B3.51: - movl $2048, 28(%esp) - movl $6, %edx - flds 28(%esp) - flds 28(%esp) - faddp %st, %st(1) - fstps 28(%esp) - jmp ..B3.3 -..B3.52: - movl %edi, 24(%esp) - movl %ebx, %edi - xorl %ebp, %ebp - movl 16(%esp), %esi - subl %ebp, %edi - jl ..B3.68 -..B3.53: - movl %ebx, %ecx - shrl $26, %ecx - andl $30, %ecx - orl %ecx, %ebp - je ..B3.55 -..B3.54: - movl $21932, %eax - shrl %cl, %eax - andl $3, %eax - incl %eax - jmp ..B3.58 -..B3.55: - movl 36(%esp), %edi - movl %ebx, %ebp - andl $-256, %edi - orl %edi, %ebp - jne ..B3.57 -..B3.56: - movl 36(%esp), %edi -..B3.57: - movl %edi, 16(%esp) - movl %ebx, %edi - movl %ebx, 20(%esp) - fildll 16(%esp) - shrl $31, %edi - movl 52(%esp), %ebp - faddl .L_2il0floatpacket.1@GOTOFF(%ebp,%edi,8) - fstpl 68(%esp) - movl 72(%esp), %eax - sarl $20, %eax - negl %eax - addl $1086, %eax -..B3.58: - cmpl $31, %eax - jbe ..B3.60 -..B3.59: - movl %eax, %ecx - xorl %edi, %edi - movl 36(%esp), %ebx - shll %cl, %ebx - jmp ..B3.61 -..B3.60: - movl %eax, %ecx - movl 36(%esp), %edi - shldl %cl, %edi, %ebx - shll %cl, %edi -..B3.61: - movl %eax, %ecx - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B3.63 -..B3.62: - movl %edx, %ebp - shrl %cl, %ebp - movl $0, 16(%esp) - movl %ebp, 36(%esp) - jmp ..B3.64 -..B3.63: - movl 24(%esp), %ebp - shrdl %cl, %edx, %ebp - movl %ebp, 36(%esp) - movl %edx, %ebp - shrl %cl, %ebp - movl %ebp, 16(%esp) -..B3.64: - orl %edi, 36(%esp) - orl 16(%esp), %ebx - movl 24(%esp), %ebp - cmpl $31, %eax - jbe ..B3.66 -..B3.65: - movl %eax, %ecx - movl %ebp, %edx - movl $0, 24(%esp) - shll %cl, %edx - jmp ..B3.67 -..B3.66: - movl %eax, %ecx - shldl %cl, %ebp, %edx - shll %cl, %ebp - movl %ebp, 24(%esp) -..B3.67: - addl %eax, 32(%esp) -..B3.68: - movl 64(%esp), %edi - movl 36(%esp), %ebp - movl %edx, 20(%edi) - movl 60(%esp), %edx - movl %ebx, 12(%edi) - movl 24(%esp), %ebx - subl 32(%esp), %edx - movl %ebp, 8(%edi) - movl %ebx, 16(%edi) - movl %edx, 4(%edi) - jmp ..B3.51 -..B3.69: - movl 64(%esp), %eax - movl 72(%esp), %edx - movl 68(%esp), %ebx - movl %edi, 8(%eax) - movl 20(%esp), %edi - movl 60(%esp), %ebp - movl %edx, 16(%eax) - movl %ebx, 20(%eax) - movl %edi, 12(%eax) - movl %ebp, 4(%eax) - jmp ..B3.51 - .align 16,0x90 - .type __dpml_unpack_x_or_y__..0,@function - .size __dpml_unpack_x_or_y__..0,.-__dpml_unpack_x_or_y__..0 - .data -# -- End __dpml_unpack_x_or_y__..0 - .text -# -- Begin __dpml_unpack_x_or_y__ - .text - .align 16,0x90 - .hidden __dpml_unpack_x_or_y__ - .globl __dpml_unpack_x_or_y__ -__dpml_unpack_x_or_y__: -# parameter 1: %eax -# parameter 2: %edx -# parameter 3: %ecx -# parameter 4: 172 + %esp -# parameter 5: 176 + %esp -# parameter 6: 180 + %esp -..B4.1: -..L6: - - movl 4(%esp), %eax - movl 8(%esp), %edx - movl 12(%esp), %ecx - .hidden __dpml_unpack_x_or_y__. - .globl __dpml_unpack_x_or_y__. -__dpml_unpack_x_or_y__.: - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $140, %esp - xorl %edi, %edi - testl %edx, %edx - movl %eax, 68(%esp) - movl %edi, %eax - movl %ecx, 88(%esp) - setne %al - movl %edx, 60(%esp) - movl %gs:20, %ebp - xorl %esp, %ebp - movl %ebp, 128(%esp) - orl %eax, %edi - movl %eax, 56(%esp) - je ..B4.3 -..B4.2: - movl %edx, %eax - jmp ..B4.4 -..B4.3: - movl 68(%esp), %eax -..B4.4: - movl 180(%esp), %edx - movl 56(%esp), %ebx - movl 8(%eax), %esi - movl %eax, 20(%edx,%ebx,4) - movl 12(%eax), %edx - movl %edx, %edi - movl %edx, %ebp - shrl $16, %edi - andl $-2147483648, %ebp - movl %ecx, %ebx - andl $32767, %edi - movl %edx, %ecx - shll $15, %ecx - movl %ebp, (%ebx) - movl %esi, %ebx - shrl $17, %ebx - lea -16382(%edi), %ebp - movl %edi, 72(%esp) - orl %ecx, %ebx - movl (%eax), %edi - orl $-2147483648, %ebx - movl 4(%eax), %eax - movl %eax, %ecx - shll $15, %esi - movl %ebp, 24(%esp) - movl %esi, %ebp - shrl $17, %ecx - addl %esi, %ebp - movl %ebx, 20(%esp) - adcl %ebx, %ebx - orl %ecx, %esi - movl %esi, 84(%esp) - movl %edi, %esi - shll $15, %esi - movl %edi, %ecx - movl %esi, 80(%esp) - movl %eax, %esi - shrl $17, %ecx - orl %edi, %ebp - shll $15, %esi - orl %eax, %ebx - orl %esi, %ecx - lea -65536(%edx), %edi - movl %edx, %esi - lea 65536(%edx), %eax - movl %edi, 16(%esp) - xorl %edi, %eax - xorl %edi, %edi - shrl $31, %esi - movl %ecx, 76(%esp) - subl %edi, %eax - call ..L7 -..L7: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L7](%edi), %edi - movl %edi, 64(%esp) - movl 20(%esp), %edi - jl ..B4.42 -..B4.5: - movl 88(%esp), %eax - movl 80(%esp), %edx - movl %ecx, %ebx - movl %edi, 12(%eax) - movl 84(%esp), %ebp - movl 24(%esp), %edi - movl %edx, 16(%eax) - movl $4, %edx - movl %ebx, 20(%eax) - movl %ebp, 8(%eax) - movl %edi, 4(%eax) -..B4.6: - movl 180(%esp), %eax - addl %edx, %esi - movl $1, %edx - movl %esi, %ecx - movl %edx, 28(%esp) - movl (%eax), %ebp - movl %ebp, %edi - shll %cl, %edx - shll $10, %ebp - movl 4(%eax), %ebx - orl %edx, %ebp - shrl $22, %edi - shll $10, %ebx - movl %edx, 36(%esp) - xorl %edx, %edx - orl %ebx, %edi - movl %ebp, (%eax) - orl %esi, %edx - movl %edi, 4(%eax) - jne ..B4.8 -..B4.7: - movl $2139095040, 52(%esp) - flds 52(%esp) - flds 52(%esp) - fsubrp %st, %st(1) - fstps 52(%esp) -..B4.8: - movl $6, %eax - mull %esi - movl 172(%esp), %ebx - cmpl $31, %eax - movl (%ebx), %edx - movl 4(%ebx), %ebp - jbe ..B4.10 -..B4.9: - movl %eax, %ecx - movl %ebp, %edx - sarl %cl, %edx - jmp ..B4.11 -..B4.10: - movl %eax, %ecx - shrdl %cl, %ebp, %edx -..B4.11: - movl %edx, %ecx - xorl %ebx, %ebx - shrl $3, %edx - xorl %edi, %edi - andl $7, %edx - andl $7, %ecx - shrl $28, %ebp - orl %edx, %edi - je ..B4.35 -..B4.12: - movl %ecx, %edi - movl 36(%esp), %eax - andl $240, %eax - subl 56(%esp), %edi - movl %eax, 16(%esp) - movl %edi, 24(%esp) - movl %ebx, %edi - sbbl %ebx, %edi - movl %edi, 20(%esp) - jl ..B4.13 -..B4.75: - movl 24(%esp), %eax - orl 20(%esp), %eax - jne ..B4.17 -..B4.13: - movl %ecx, %ebp - orl %ebx, %ebp - jne ..B4.16 -..B4.14: - movl 68(%esp), %ebp - movl %ebp, 60(%esp) -..B4.16: - movl 16(%esp), %ebp - jmp ..B4.18 -..B4.17: - addl %ecx, %ebp - movl 172(%esp), %ebx - movl 64(%esp), %eax - movl -8(%ebx,%ebp,8), %ecx - movl %ecx, %edi - shll $4, %edi - movl -4(%ebx,%ebp,8), %ebx - movl 28(%esp), %ebp - shll %cl, %ebp - addl __x_constants__@GOT(%eax), %edi - andl $240, %ebp - movl %edi, 60(%esp) -..B4.18: - movl $7, %edi - xorl %eax, %eax - negl %edi - addl %edx, %edi - orl %eax, %edi - je ..B4.39 -..B4.19: - movl 180(%esp), %eax - movl 8(%eax), %edi - orl 12(%eax), %edi - je ..B4.22 -..B4.20: - orl 16(%esp), %ebp - xorl %eax, %eax - orl %eax, %ebp - je ..B4.22 -..B4.21: - movl $1182793727, 48(%esp) - flds 48(%esp) - flds 48(%esp) - fmulp %st, %st(1) - fstps 48(%esp) -..B4.22: - movl 60(%esp), %eax - xorl %edi, %edi - movl 8(%eax), %ebp - movl %ebp, 16(%esp) - movl 12(%eax), %ebp - movl 28(%esp), %eax - negl %eax - addl %edx, %eax - orl %edi, %eax - je ..B4.38 -..B4.23: - movl $3, %edi - xorl %eax, %eax - negl %edi - addl %edx, %edi - orl %eax, %edi - je ..B4.28 -..B4.24: - movl $4, %edi - negl %edi - addl %edx, %edi - orl %eax, %edi - jne ..B4.26 -..B4.25: - andl $2147483647, %ebp - jmp ..B4.29 -..B4.26: - movl $5, %eax - xorl %edi, %edi - subl %eax, %edx - orl %edi, %edx - jne ..B4.29 -..B4.27: - movl 68(%esp), %edx - andl $2147483647, %ebp - movl 12(%edx), %edx - andl $-2147483648, %edx - orl %edx, %ebp - jmp ..B4.29 -..B4.28: - xorl $-2147483648, %ebp -..B4.29: - movl 176(%esp), %edx - movl 16(%esp), %eax - testl $192, 36(%esp) - movl %ebp, 12(%edx) - movl 60(%esp), %ebp - movl %eax, 8(%edx) - movl (%ebp), %edi - movl 4(%ebp), %ebp - movl %edi, (%edx) - movl %ebp, 4(%edx) - je ..B4.33 -..B4.30: - xorl %edx, %edx - subl 56(%esp), %ecx - sbbl %edx, %ebx - jl ..B4.31 -..B4.76: - orl %ebx, %ecx - jne ..B4.33 -..B4.31: - movl 180(%esp), %edx - movl 8(%edx), %ebx - orl 12(%edx), %ebx - je ..B4.33 -..B4.32: - movl 64(%esp), %edx - movl $8388608, 44(%esp) - flds 44(%esp) - fldt .L_2il0floatpacket.8@GOTOFF(%edx) - fmulp %st, %st(1) - fstps 44(%esp) -..B4.33: - movl 128(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B4.37 -..B4.34: - movl %esi, %eax - movl $-2147483648, %edx - addl $140, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B4.35: - movl 128(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B4.37 -..B4.36: - movl %esi, %eax - xorl %edx, %edx - addl $140, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B4.37: - movl 64(%esp), %ebx - call __stack_chk_fail@PLT -..B4.38: - orl $32768, %ebp - jmp ..B4.29 -..B4.39: - movl 176(%esp), %eax - andl $-2013265921, %ecx - orl $268435456, %ecx - movl %ecx, 68(%esp) - movl (%eax), %edx - movl 4(%eax), %ebp - movl %edx, 96(%esp) - movl %ebp, 100(%esp) - movl 8(%eax), %edx - movl 12(%eax), %ebp - movl %edx, 104(%esp) - movl %ebp, 108(%esp) - movl %ebx, 72(%esp) - addl $4, %esp - lea 64(%esp), %ebx - pushl %ebx - call __dpml_exception -..B4.40: - movl 176(%esp), %ecx - movl (%eax), %edx - movl 4(%eax), %ebx - movl %edx, (%ecx) - movl %ebx, 4(%ecx) - movl 8(%eax), %ebp - movl 12(%eax), %edi - movl %ebp, 8(%ecx) - movl %edi, 12(%ecx) - jmp ..B4.33 -..B4.42: - movl 16(%esp), %ecx - xorl %eax, %eax - xorl %edx, %ecx - subl %eax, %ecx - jl ..B4.46 -..B4.43: - movl 88(%esp), %eax - orl %ebx, %ebp - movl 80(%esp), %ecx - movl %ecx, 16(%eax) - movl 76(%esp), %ecx - movl %ecx, 20(%eax) - movl %edi, 12(%eax) - movl 84(%esp), %ecx - movl 24(%esp), %edi - movl %ecx, 8(%eax) - movl %edi, 4(%eax) - jne ..B4.45 -..B4.44: - movl $2, %edx - jmp ..B4.6 -..B4.45: - shrl $15, %edx - movl %edx, %esi - xorl %edx, %edx - andl $1, %esi - jmp ..B4.6 -..B4.46: - orl %ebx, %ebp - jne ..B4.48 -..B4.47: - movl 88(%esp), %eax - movl 80(%esp), %edx - movl 76(%esp), %ebx - movl %edi, 12(%eax) - movl 84(%esp), %ebp - movl 24(%esp), %edi - movl %edx, 16(%eax) - movl $8, %edx - movl %ebx, 20(%eax) - movl %ebp, 8(%eax) - movl %edi, 4(%eax) - jmp ..B4.6 -..B4.48: - addl $-2147483648, %edi - movl %edi, %ebp - addl $-16381, 72(%esp) - movl 84(%esp), %edx - subl %eax, %ebp - movl %edi, 40(%esp) - jl ..B4.72 -..B4.49: - movl 80(%esp), %ebp - movl 76(%esp), %ebx - movl %ebp, 28(%esp) - movl $2, %ebp - movl %ebx, 24(%esp) - xorl %ebx, %ebx - movl %edi, 20(%esp) - movl %esi, 16(%esp) - movl %eax, 36(%esp) - movl 28(%esp), %esi - movl 24(%esp), %edi - jmp ..B4.50 -..B4.52: - xorl %esi, %esi - xorl %edi, %edi -..B4.50: - movl %edx, %ecx - orl 40(%esp), %ecx - jne ..B4.55 -..B4.51: - addl $64, 36(%esp) - movl %esi, %edx - movl %edi, 40(%esp) - adcl $0, %ebx - addl $-1, %ebp - movl %ebp, %ecx - adcl $-1, %eax - orl %eax, %ecx - jne ..B4.52 -..B4.53: - movl 88(%esp), %eax - movl 20(%esp), %edi - movl 80(%esp), %edx - movl 76(%esp), %ebx - movl 84(%esp), %ebp - movl 16(%esp), %esi - movl %edx, 16(%eax) - movl %ebx, 20(%eax) - movl %ebp, 8(%eax) - movl %edi, 12(%eax) - movl $-262144, 4(%eax) -..B4.54: - movl $2048, 32(%esp) - movl $6, %edx - flds 32(%esp) - flds 32(%esp) - faddp %st, %st(1) - fstps 32(%esp) - jmp ..B4.6 -..B4.55: - xorl %ebx, %ebx - movl 40(%esp), %ebp - movl %esi, 28(%esp) - subl %ebx, %ebp - movl %edi, 24(%esp) - movl 16(%esp), %esi - jl ..B4.71 -..B4.56: - movl 40(%esp), %ecx - shrl $26, %ecx - andl $30, %ecx - orl %ecx, %ebx - je ..B4.58 -..B4.57: - movl $21932, %ebp - shrl %cl, %ebp - andl $3, %ebp - incl %ebp - jmp ..B4.61 -..B4.58: - movl %edx, %ebp - andl $-256, %ebp - movl 40(%esp), %ebx - orl %ebp, %ebx - jne ..B4.60 -..B4.59: - movl %edx, %ebp -..B4.60: - movl 40(%esp), %ebx - movl %ebp, 16(%esp) - movl %ebx, 20(%esp) - fildll 16(%esp) - shrl $31, %ebx - movl 64(%esp), %ebp - faddl .L_2il0floatpacket.1@GOTOFF(%ebp,%ebx,8) - fstpl 76(%esp) - movl 80(%esp), %ebp - sarl $20, %ebp - negl %ebp - addl $1086, %ebp -..B4.61: - cmpl $31, %ebp - jbe ..B4.63 -..B4.62: - movl %ebp, %ecx - xorl %ebx, %ebx - shll %cl, %edx - movl %edx, 40(%esp) - jmp ..B4.64 -..B4.63: - movl %ebp, %ecx - movl 40(%esp), %ebx - shldl %cl, %edx, %ebx - movl %ebx, 40(%esp) - movl %edx, %ebx - shll %cl, %ebx -..B4.64: - movl %ebp, %ecx - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B4.66 -..B4.65: - movl %edi, %edx - xorl %edi, %edi - shrl %cl, %edx - jmp ..B4.67 -..B4.66: - movl 28(%esp), %edx - shrdl %cl, %edi, %edx - shrl %cl, %edi -..B4.67: - orl %edi, 40(%esp) - orl %ebx, %edx - movl 28(%esp), %ebx - cmpl $31, %ebp - jbe ..B4.69 -..B4.68: - movl %ebp, %ecx - shll %cl, %ebx - movl $0, 28(%esp) - movl %ebx, 24(%esp) - jmp ..B4.70 -..B4.69: - movl %ebp, %ecx - movl 24(%esp), %edi - shldl %cl, %ebx, %edi - shll %cl, %ebx - movl %edi, 24(%esp) - movl %ebx, 28(%esp) -..B4.70: - addl %ebp, 36(%esp) -..B4.71: - movl 88(%esp), %eax - movl 72(%esp), %edi - movl 28(%esp), %ebx - movl %edx, 8(%eax) - movl 40(%esp), %edx - movl 24(%esp), %ebp - subl 36(%esp), %edi - movl %edx, 12(%eax) - movl %ebx, 16(%eax) - movl %ebp, 20(%eax) - movl %edi, 4(%eax) - jmp ..B4.54 -..B4.72: - movl 88(%esp), %eax - movl 80(%esp), %edx - movl 76(%esp), %ebx - movl %edi, 12(%eax) - movl 84(%esp), %ebp - movl 72(%esp), %edi - movl %edx, 16(%eax) - movl %ebx, 20(%eax) - movl %ebp, 8(%eax) - movl %edi, 4(%eax) - jmp ..B4.54 - .align 16,0x90 - .type __dpml_unpack_x_or_y__,@function - .size __dpml_unpack_x_or_y__,.-__dpml_unpack_x_or_y__ - .data -# -- End __dpml_unpack_x_or_y__ - .text -# -- Begin __dpml_pack__ - .text - .align 16,0x90 - .hidden __dpml_pack__ - .globl __dpml_pack__ -__dpml_pack__: -# parameter 1: 160 + %esp -# parameter 2: 164 + %esp -# parameter 3: 168 + %esp -# parameter 4: 176 + %esp -# parameter 5: 184 + %esp -..B5.1: -..L8: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $140, %esp - movl 160(%esp), %edx - call ..L9 -..L9: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L9](%ecx), %ecx - movl %ecx, 48(%esp) - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 136(%esp) - movl 12(%edx), %esi - movl %esi, %edi - movl 8(%edx), %ecx - movl %ecx, %ebp - movl 4(%edx), %eax - xorl %edx, %edx - movl %esi, %ebx - subl %edx, %edi - jl ..B5.7 -..B5.2: - movl 160(%esp), %edi - movl $2, 32(%esp) - movl %ebx, 68(%esp) - movl 16(%edi), %edx - movl %edx, 56(%esp) - movl 20(%edi), %edx - xorl %edi, %edi - movl %edi, 52(%esp) - movl %esi, 44(%esp) - movl %ecx, 36(%esp) - movl %eax, 60(%esp) - movl %ebp, 64(%esp) - movl 56(%esp), %esi - movl %edi, %ebx - movl 52(%esp), %eax - movl 32(%esp), %ecx - jmp ..B5.3 -..B5.5: - xorl %esi, %esi - xorl %edx, %edx -..B5.3: - movl 64(%esp), %ebp - orl 68(%esp), %ebp - jne ..B5.47 -..B5.4: - addl $64, %eax - movl %edx, 68(%esp) - adcl $0, %ebx - addl $-1, %ecx - movl %ecx, %edx - adcl $-1, %edi - movl %esi, 64(%esp) - orl %edi, %edx - jne ..B5.5 -..B5.6: - movl 160(%esp), %eax - movl 44(%esp), %esi - movl 36(%esp), %ecx - movl $-262144, 4(%eax) - movl $-262144, %eax -..B5.7: - cmpl $-262144, %eax - je ..B5.44 -..B5.8: - movl $-16381, %ebx - movl $-1, %ebp - cltd - subl %eax, %ebx - sbbl %edx, %ebp - xorl %edi, %edi - movl %ebp, %edx - subl %edi, %edx - jl ..B5.16 -..B5.66: - orl %ebx, %edx - je ..B5.16 -..B5.9: - movl 160(%esp), %edx - addl %ebx, %eax - movl %eax, 116(%esp) - lea 112(%esp), %eax - movl %edx, %ecx - movl (%edx), %esi - movl %edi, 8(%esp) - movl %edi, 8(%eax) - movl $-2147483648, 12(%eax) - movl %edi, 16(%eax) - movl %edi, 20(%eax) - movl %esi, (%eax) - movl %edi, 12(%esp) - call __dpml_addsub__..0 -..B5.10: - movl $113, %eax - movl %ebx, %ecx - subl %eax, %ecx - movl %ebp, %eax - sbbl %edi, %eax - jl ..B5.15 -..B5.67: - orl %eax, %ecx - je ..B5.15 -..B5.11: - movl $245763, %eax - negl %eax - addl %ebx, %eax - orl %ebp, %eax - je ..B5.39 -..B5.12: - movl $49155, %edx - movl $-16383, %eax - subl %edx, %ebx - sbbl %edi, %ebp - jl ..B5.14 -..B5.68: - orl %ebp, %ebx - je ..B5.14 -..B5.13: - movl 160(%esp), %edx - decl %eax - movl 8(%edx), %ecx - movl 12(%edx), %esi - jmp ..B5.16 -..B5.14: - movl 160(%esp), %edx - movl 8(%edx), %ecx - movl 12(%edx), %esi - jmp ..B5.16 -..B5.15: - movl 160(%esp), %edx - movl $-16382, %eax - movl 8(%edx), %ecx - movl 12(%edx), %esi -..B5.16: - movl 160(%esp), %ebx - movl $16384, %edx - movl 16(%ebx), %edi - addl $16384, %edi - movl %edi, %ebp - movl 20(%ebx), %ebx - adcl $0, %ebx - subl %edx, %ebp - movl $0, %edx - movl %ebx, %ebp - sbbl %edx, %ebp - jae ..B5.18 -..B5.17: - movl $1, %ebp - jmp ..B5.19 -..B5.18: - xorl %ebp, %ebp -..B5.19: - movl %ebx, %edx - addl %ebp, %ecx - adcl $0, %esi - shll $17, %edx - shrl $15, %edi - orl %edi, %edx - movl %ecx, %edi - shrl $15, %ebx - subl %ebp, %edi - movl $0, %ebp - movl %esi, %edi - sbbl %ebp, %edi - jae ..B5.22 -..B5.20: - movl $1, %ebp -..B5.22: - movl %ecx, %edi - shll $17, %edi - orl %edi, %ebx - movl 164(%esp), %edi - shrl $15, %ecx - movl %ebx, 4(%edi) - movl %esi, %ebx - shll $17, %ebx - movl %edx, (%edi) - xorl %edx, %edx - shrl $15, %esi - orl %ecx, %ebx - orl %edx, %ebp - je ..B5.24 -..B5.23: - incl %eax - xorl %ebx, %ebx - movl $65536, %esi -..B5.24: - movl %eax, %ecx - cltd - addl $16381, %ecx - movl %edx, %ebp - movl %ecx, %edx - adcl $0, %ebp - shll $16, %edx - addl %esi, %edx - movl 160(%esp), %esi - movl (%esi), %edi - orl %edi, %edx - movl %edi, 32(%esp) - movl $32766, %esi - movl %ecx, %edi - subl %esi, %edi - movl $0, %esi - sbbl %esi, %ebp - jae ..B5.29 -..B5.25: - movl 164(%esp), %eax - movl %edx, 12(%eax) - movl 184(%esp), %edx - movl %ebx, 8(%eax) - movl 8(%edx), %ecx - orl 12(%edx), %ecx - je ..B5.27 -..B5.26: - movl $1182793727, 40(%esp) - flds 40(%esp) - flds 40(%esp) - fmulp %st, %st(1) - fstps 40(%esp) -..B5.27: - movl 136(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B5.40 -..B5.28: - addl $140, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B5.29: - testl %eax, %eax - movl 168(%esp), %ebp - movl 172(%esp), %eax - jl ..L10 - movl 176(%esp), %ebp -..L10: - jl ..L11 - movl 180(%esp), %eax -..L11: - incl %ecx - testl %ecx, %ecx - jg ..B5.35 -..B5.30: - js ..B5.42 -..B5.31: - movl 164(%esp), %ecx - movl %edx, 12(%ecx) - movl 184(%esp), %edx - movl %ebx, 8(%ecx) - movl 8(%edx), %ebx - orl 12(%edx), %ebx - je ..B5.33 -..B5.32: - orl $-2147483648, %eax - jmp ..B5.36 -..B5.33: - movl 136(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B5.40 -..B5.34: - addl $140, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B5.35: - movl 164(%esp), %ecx - movl %ebx, 8(%ecx) - movl %edx, 12(%ecx) -..B5.36: - movl 164(%esp), %ebx - andl $-2013265921, %ebp - orl $268435456, %ebp - movl %ebp, 52(%esp) - movl (%ebx), %edx - movl 4(%ebx), %ecx - movl 8(%ebx), %esi - movl 12(%ebx), %edi - movl %edx, 80(%esp) - movl %ecx, 84(%esp) - movl %esi, 88(%esp) - movl %edi, 92(%esp) - movl %eax, 56(%esp) - addl $4, %esp - lea 48(%esp), %eax - pushl %eax - call __dpml_exception -..B5.69: - movl %eax, %ecx -..B5.37: - movl 164(%esp), %ebp - movl (%ecx), %eax - movl 4(%ecx), %edx - movl %eax, (%ebp) - movl %edx, 4(%ebp) - movl 8(%ecx), %ebx - movl 12(%ecx), %ecx - movl %ebx, 8(%ebp) - movl %ecx, 12(%ebp) - movl 136(%esp), %esi - xorl %esp, %esi - cmpl %gs:20, %esi - jne ..B5.40 -..B5.38: - addl $140, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B5.39: - movl $-16382, %eax - jmp ..B5.13 -..B5.40: - movl 48(%esp), %ebx - call __stack_chk_fail@PLT -..B5.42: - movl 164(%esp), %ecx - movl 32(%esp), %edx - movl $0, 8(%ecx) - movl %edx, 12(%ecx) - jmp ..B5.36 -..B5.44: - movl 160(%esp), %eax - xorl %edx, %edx - movl 164(%esp), %ebx - movl (%eax), %ecx - movl %edx, (%ebx) - movl %edx, 4(%ebx) - movl %edx, 8(%ebx) - movl %ecx, 12(%ebx) - movl 136(%esp), %ebp - xorl %esp, %ebp - cmpl %gs:20, %ebp - jne ..B5.40 - jmp ..B5.28 -..B5.47: - movl 68(%esp), %ebx - xorl %ecx, %ecx - movl %esi, 56(%esp) - movl %ebx, %esi - movl %eax, 52(%esp) - subl %ecx, %esi - movl 60(%esp), %eax - movl 64(%esp), %ebp - jl ..B5.63 -..B5.48: - movl %ebx, %ecx - xorl %esi, %esi - shrl $26, %ecx - andl $30, %ecx - orl %ecx, %esi - je ..B5.50 -..B5.49: - movl $21932, %esi - shrl %cl, %esi - andl $3, %esi - incl %esi - jmp ..B5.53 -..B5.50: - movl %ebp, %esi - movl %ebx, %ecx - andl $-256, %esi - orl %esi, %ecx - jne ..B5.52 -..B5.51: - movl %ebp, %esi -..B5.52: - movl %esi, 32(%esp) - movl %ebx, %esi - movl %ebx, 36(%esp) - fildll 32(%esp) - shrl $31, %esi - movl 48(%esp), %ecx - faddl .L_2il0floatpacket.1@GOTOFF(%ecx,%esi,8) - fstpl 60(%esp) - movl 64(%esp), %esi - sarl $20, %esi - negl %esi - addl $1086, %esi -..B5.53: - cmpl $31, %esi - jbe ..B5.55 -..B5.54: - movl %esi, %ecx - movl %ebp, %ebx - movl $0, 32(%esp) - shll %cl, %ebx - jmp ..B5.56 -..B5.55: - movl %esi, %ecx - shldl %cl, %ebp, %ebx - shll %cl, %ebp - movl %ebp, 32(%esp) -..B5.56: - movl %esi, %ecx - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B5.58 -..B5.57: - movl %edx, %ebp - movl $0, 36(%esp) - shrl %cl, %ebp - jmp ..B5.59 -..B5.58: - movl %edx, %edi - movl 56(%esp), %ebp - shrl %cl, %edi - shrdl %cl, %edx, %ebp - movl %edi, 36(%esp) -..B5.59: - orl 32(%esp), %ebp - orl 36(%esp), %ebx - movl 56(%esp), %edi - cmpl $31, %esi - jbe ..B5.61 -..B5.60: - movl %esi, %ecx - movl %edi, %edx - movl $0, 56(%esp) - shll %cl, %edx - jmp ..B5.62 -..B5.61: - movl %esi, %ecx - shldl %cl, %edi, %edx - shll %cl, %edi - movl %edi, 56(%esp) -..B5.62: - addl %esi, 52(%esp) -..B5.63: - movl 160(%esp), %edi - movl %ebx, %esi - subl 52(%esp), %eax - movl %ebp, %ecx - movl %ebx, 12(%edi) - movl 56(%esp), %ebx - movl %ebp, 8(%edi) - movl %ebx, 16(%edi) - movl %edx, 20(%edi) - movl %eax, 4(%edi) - jmp ..B5.7 - .align 16,0x90 - .type __dpml_pack__,@function - .size __dpml_pack__,.-__dpml_pack__ - .data -# -- End __dpml_pack__ - .text -# -- Begin __dpml_addsub__..0 - .text - .align 16,0x90 -__dpml_addsub__..0: -# parameter 1: %eax -# parameter 2: %edx -# parameter 3: 184 + %esp -# parameter 4: %ecx -..B6.1: -..L12: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $156, %esp - movl %edx, %edi - movl %eax, %ebx - movl %ecx, 132(%esp) - movl %gs:20, %ebp - xorl %esp, %ebp - movl %ebp, 144(%esp) - movl (%ebx), %ebp - movl (%edi), %eax - xorl %ebp, %eax - shrl $31, %eax - movl 4(%ebx), %ecx - movl %eax, 124(%esp) - movl %ecx, %eax - cltd - movl 4(%edi), %eax - movl %edx, %esi - cltd - movl %edx, %eax - movl %ecx, %edx - subl 4(%edi), %edx - movl %ecx, 104(%esp) - sbbl %eax, %esi - xorl %eax, %eax - movl %esi, %ecx - movl $0, 112(%esp) - subl %eax, %ecx - movl 104(%esp), %eax - jl ..B6.3 -..B6.2: - movl $0, 92(%esp) - jmp ..B6.7 -..B6.3: - movl %ebx, %ecx - movl %edi, %ebx - movl %ecx, %edi - movl %edx, %ecx - xorl %edx, %edx - subl %ecx, %edx - movl %esi, %ecx - movl $0, %esi - sbbl %ecx, %esi - addl %edx, %eax - movl 124(%esp), %ecx - orl 112(%esp), %ecx - jne ..B6.5 -..B6.4: - xorl %ecx, %ecx - jmp ..B6.6 -..B6.5: - movl $-2147483648, %ecx -..B6.6: - movl $-2147483648, 92(%esp) - xorl %ecx, %ebp -..B6.7: - movl 16(%edi), %ecx - movl %ecx, 100(%esp) - movl 20(%edi), %ecx - movl %ecx, 96(%esp) - movl 8(%edi), %ecx - movl 12(%edi), %edi - movl %ecx, 120(%esp) - movl %edi, 116(%esp) - movl $2, %edi - movl $0, (%esp) - call ..L13 -..L13: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L13](%ecx), %ecx - movl %ebp, 108(%esp) - movl %ecx, 8(%esp) - movl %edi, 4(%esp) - movl %eax, 104(%esp) - movl %ebx, 128(%esp) - movl (%esp), %ebp - jmp ..B6.8 -..B6.10: - xorl %eax, %eax - movl %eax, 120(%esp) - movl %eax, 116(%esp) -..B6.8: - movl $64, %ebx - xorl %edi, %edi - xorl %eax, %eax - subl %edx, %ebx - sbbl %esi, %eax - movl %eax, %ecx - subl %edi, %ecx - jl ..B6.9 -..B6.85: - orl %ebx, %ecx - jne ..B6.14 -..B6.9: - movl 116(%esp), %esi - movl 120(%esp), %edx - movl %esi, 96(%esp) - xorl %esi, %esi - movl %edx, 100(%esp) - xorl %edx, %edx - subl %ebx, %edx - sbbl %eax, %esi - movl 4(%esp), %eax - addl $-1, %eax - movl %eax, 4(%esp) - adcl $-1, %ebp - orl %ebp, %eax - jne ..B6.10 -..B6.11: - movl 132(%esp), %eax - movl 128(%esp), %ebx - movl 8(%ebx), %ecx - movl 12(%ebx), %esi - movl %ecx, 8(%eax) - movl %esi, 12(%eax) - movl 4(%ebx), %edx - movl 16(%ebx), %edi - movl 20(%ebx), %ebx - movl 108(%esp), %ebp - movl %edx, 4(%eax) - movl %edi, 16(%eax) - movl %ebx, 20(%eax) - movl %ebp, (%eax) - movl 144(%esp), %ebp - xorl %esp, %ebp - cmpl %gs:20, %ebp - jne ..B6.13 -..B6.12: - addl $156, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B6.13: - movl 8(%esp), %ebx - call __stack_chk_fail@PLT -..B6.14: - movl %ebx, 4(%esp) - orl %edx, %esi - movl 108(%esp), %ebp - movl 104(%esp), %eax - movl 128(%esp), %ebx - je ..B6.25 -..B6.15: - cmpl $31, %edx - jbe ..B6.17 -..B6.16: - movl %edx, %ecx - xorl %esi, %esi - movl 96(%esp), %edi - shrl %cl, %edi - movl %edi, 100(%esp) - jmp ..B6.18 -..B6.17: - movl %edx, %ecx - movl 100(%esp), %edi - movl 96(%esp), %esi - shrdl %cl, %esi, %edi - movl %edi, 100(%esp) - shrl %cl, %esi -..B6.18: - cmpl $31, 4(%esp) - jbe ..B6.20 -..B6.19: - movl 4(%esp), %ecx - movl 120(%esp), %edi - shll %cl, %edi - movl $0, (%esp) - movl %edi, 96(%esp) - jmp ..B6.21 -..B6.20: - movl %ebp, 108(%esp) - movl 4(%esp), %ecx - movl 116(%esp), %edi - movl 120(%esp), %ebp - shldl %cl, %ebp, %edi - shll %cl, %ebp - movl %ebp, (%esp) - movl %edi, 96(%esp) - movl 108(%esp), %ebp -..B6.21: - movl (%esp), %edi - orl %edi, 100(%esp) - orl %esi, 96(%esp) - movl 116(%esp), %esi - cmpl $31, %edx - jbe ..B6.23 -..B6.22: - movl %edx, %ecx - shrl %cl, %esi - movl $0, 116(%esp) - movl %esi, 120(%esp) -..B6.25: - xorl %esi, %esi - movl %ebp, 108(%esp) - movl %esi, 48(%esp) - movl %eax, 104(%esp) - movl %ebx, 128(%esp) - jmp ..B6.26 -..B6.23: - movl %edx, %ecx - movl 120(%esp), %edi - shrdl %cl, %esi, %edi - shrl %cl, %esi - movl %edi, 120(%esp) - movl %esi, 116(%esp) - jmp ..B6.25 -..B6.55: - movl 128(%esp), %edi - movl $1, %edx - movl 124(%esp), %eax - xorl %ecx, %ecx - subl %eax, %edx - movl 108(%esp), %ebp - movl 4(%edi), %eax - movl 112(%esp), %ebx - sbbl %ebx, %ecx - xorl 92(%esp), %ebp - xorl $2, %esi - addl $24, 132(%esp) - movl %edx, 124(%esp) - movl %ecx, 112(%esp) - movl %ebp, 108(%esp) - movl %eax, 104(%esp) -..B6.26: - movl 128(%esp), %edx - movl 124(%esp), %eax - orl 112(%esp), %eax - movl 16(%edx), %ebx - movl 20(%edx), %edx - jne ..B6.38 -..B6.27: - movl %ebx, %ebp - movl %edx, %ecx - addl 100(%esp), %ebp - movl %ebp, %eax - adcl 96(%esp), %ecx - andl $15, %esi - subl %ebx, %eax - movl %ecx, %ebx - movl $0, 48(%esp) - sbbl %edx, %ebx - jae ..B6.29 -..B6.28: - movl $1, 72(%esp) - jmp ..B6.30 -..B6.29: - movl $0, 72(%esp) -..B6.30: - movl 128(%esp), %edi - movl 72(%esp), %edx - movl 8(%edi), %ebx - movl %ebx, 52(%esp) - movl 120(%esp), %ebx - movl 12(%edi), %eax - addl %edx, %ebx - movl %eax, 80(%esp) - movl %ebx, %eax - movl 116(%esp), %edi - adcl $0, %edi - subl %edx, %eax - movl $0, %edx - movl %edi, %eax - sbbl %edx, %eax - jae ..B6.32 -..B6.31: - movl $1, 68(%esp) - jmp ..B6.33 -..B6.32: - movl $0, 68(%esp) -..B6.33: - movl 52(%esp), %eax - addl %eax, %ebx - movl %ebx, %edx - adcl 80(%esp), %edi - subl %eax, %edx - movl %edi, %eax - sbbl 80(%esp), %eax - jae ..B6.35 -..B6.34: - movl $1, %edx - jmp ..B6.36 -..B6.35: - xorl %edx, %edx -..B6.36: - movl 68(%esp), %eax - addl %edx, %eax - xorl %edx, %edx - orl %edx, %eax - je ..B6.52 -..B6.37: - movl %ecx, %eax - movl %ebx, %edx - shll $31, %eax - shrl $1, %ebp - orl %eax, %ebp - movl %edi, %eax - shrl $1, %ecx - shll $31, %edx - shll $31, %eax - orl %edx, %ecx - shrl $1, %edi - shrl $1, %ebx - orl $-2147483648, %edi - incl 104(%esp) - orl %eax, %ebx - jmp ..B6.52 -..B6.38: - addl $-8, %esi - movl 100(%esp), %ecx - adcl $-1, 48(%esp) - subl %ebx, %ecx - movl 96(%esp), %eax - sbbl %edx, %eax - jb ..B6.40 -..B6.86: - orl %eax, %ecx - je ..B6.40 -..B6.39: - movl $1, %eax - jmp ..B6.41 -..B6.40: - xorl %eax, %eax -..B6.41: - movl 128(%esp), %edi - movl %ebx, %ebp - subl 100(%esp), %ebp - movl %edx, %ecx - movl 116(%esp), %ebx - movl 8(%edi), %edx - movl %edx, 60(%esp) - movl 12(%edi), %edx - movl 120(%esp), %edi - sbbl 96(%esp), %ecx - addl %eax, %edi - movl %edi, 56(%esp) - adcl $0, %ebx - subl %eax, %edi - movl $0, %eax - movl %ebx, 76(%esp) - sbbl %eax, %ebx - jae ..B6.43 -..B6.42: - movl $1, 64(%esp) - jmp ..B6.44 -..B6.43: - movl $0, 64(%esp) -..B6.44: - movl 60(%esp), %eax - movl %eax, %ebx - subl 56(%esp), %ebx - movl %edx, %edi - sbbl 76(%esp), %edi - subl %ebx, %eax - sbbl %edi, %edx - jae ..B6.46 -..B6.45: - movl $1, %edx - jmp ..B6.47 -..B6.46: - xorl %edx, %edx -..B6.47: - movl 64(%esp), %eax - addl %edx, %eax - xorl %edx, %edx - orl %edx, %eax - je ..B6.52 -..B6.48: - xorl %eax, %eax - movl %ebp, %edx - xorl %ebp, %ebp - subl %edx, %ebp - movl %ecx, %edx - movl %eax, %ecx - movl %ebp, %eax - sbbl %edx, %ecx - xorl $-2147483648, 108(%esp) - orl %ecx, %eax - jne ..B6.50 -..B6.49: - movl $0, 44(%esp) - jmp ..B6.51 -..B6.50: - movl $-1, 44(%esp) -..B6.51: - movl 44(%esp), %eax - cltd - movl %ebx, %eax - movl 44(%esp), %ebx - subl %eax, %ebx - movl %edi, %eax - movl %edx, %edi - movl $-2147483648, 92(%esp) - sbbl %eax, %edi -..B6.52: - movl 132(%esp), %edx - movl 108(%esp), %eax - movl %eax, (%edx) - movl %esi, %edx - andl $16, %edx - xorl %eax, %eax - orl %eax, %edx - jne ..B6.56 -..B6.53: - movl 132(%esp), %edx - movl 104(%esp), %eax - movl %eax, 4(%edx) - movl %ebp, 16(%edx) - movl %ecx, 20(%edx) - movl %ebx, 8(%edx) - movl %edi, 12(%edx) -..B6.54: - movl %esi, %edx - xorl %eax, %eax - andl $2, %edx - orl %eax, %edx - jne ..B6.55 - jmp ..B6.61 -..B6.56: - movl %edi, %edx - movl %ebx, 84(%esp) - subl %eax, %edx - movl %edi, 88(%esp) - jl ..B6.53 -..B6.57: - movl $2, %edx - movl %ebp, 36(%esp) - movl %ecx, 40(%esp) - movl %eax, 32(%esp) - movl %ebx, 12(%esp) - movl %esi, 28(%esp) - movl %edi, 20(%esp) - movl %ecx, 24(%esp) - movl %ebp, 16(%esp) - movl 36(%esp), %esi - movl 40(%esp), %edi - movl %eax, %ebx - movl 32(%esp), %ecx - jmp ..B6.58 -..B6.60: - xorl %esi, %esi - xorl %edi, %edi -..B6.58: - movl 84(%esp), %ebp - orl 88(%esp), %ebp - jne ..B6.65 -..B6.59: - addl $64, %ecx - movl %esi, 84(%esp) - adcl $0, %ebx - addl $-1, %edx - movl %edx, %ebp - adcl $-1, %eax - movl %edi, 88(%esp) - orl %eax, %ebp - jne ..B6.60 - jmp ..B6.64 -..B6.61: - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B6.13 - jmp ..B6.12 -..B6.64: - movl 132(%esp), %eax - movl 12(%esp), %ebx - movl 16(%esp), %ebp - movl 20(%esp), %edi - movl 24(%esp), %ecx - movl 28(%esp), %esi - movl %ebp, 16(%eax) - movl %ecx, 20(%eax) - movl %ebx, 8(%eax) - movl %edi, 12(%eax) - movl $-262144, 4(%eax) - jmp ..B6.54 -..B6.65: - xorl %eax, %eax - movl 88(%esp), %edx - movl %esi, 36(%esp) - subl %eax, %edx - movl %edi, 40(%esp) - movl %ecx, 32(%esp) - movl 28(%esp), %esi - jl ..B6.81 -..B6.66: - movl 88(%esp), %ecx - shrl $26, %ecx - andl $30, %ecx - orl %ecx, %eax - je ..B6.68 -..B6.67: - movl $21932, %edx - shrl %cl, %edx - andl $3, %edx - incl %edx - jmp ..B6.71 -..B6.68: - movl 84(%esp), %edx - andl $-256, %edx - movl 88(%esp), %eax - orl %edx, %eax - jne ..B6.70 -..B6.69: - movl 84(%esp), %edx -..B6.70: - movl 88(%esp), %eax - movl %edx, (%esp) - movl %eax, 4(%esp) - fildll (%esp) - shrl $31, %eax - movl 8(%esp), %edx - faddl .L_2il0floatpacket.1@GOTOFF(%edx,%eax,8) - fstpl 136(%esp) - movl 140(%esp), %edx - sarl $20, %edx - negl %edx - addl $1086, %edx -..B6.71: - cmpl $31, %edx - jbe ..B6.73 -..B6.72: - movl %edx, %ecx - xorl %eax, %eax - movl 84(%esp), %ebx - shll %cl, %ebx - movl %ebx, 88(%esp) - jmp ..B6.74 -..B6.73: - movl %edx, %ecx - movl 84(%esp), %eax - movl 88(%esp), %ebx - shldl %cl, %eax, %ebx - movl %ebx, 88(%esp) - shll %cl, %eax -..B6.74: - movl %edx, %ecx - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B6.76 -..B6.75: - movl %edi, %ebx - xorl %ebp, %ebp - shrl %cl, %ebx - movl %ebx, 84(%esp) - jmp ..B6.77 -..B6.76: - movl 36(%esp), %ebx - movl %edi, %ebp - shrdl %cl, %ebp, %ebx - movl %ebx, 84(%esp) - shrl %cl, %ebp -..B6.77: - orl %eax, 84(%esp) - orl %ebp, 88(%esp) - movl 36(%esp), %ebx - cmpl $31, %edx - jbe ..B6.79 -..B6.78: - movl %edx, %ecx - shll %cl, %ebx - movl $0, 36(%esp) - movl %ebx, 40(%esp) - jmp ..B6.80 -..B6.79: - movl %edx, %ecx - movl %edi, %eax - shldl %cl, %ebx, %eax - shll %cl, %ebx - movl %eax, 40(%esp) - movl %ebx, 36(%esp) -..B6.80: - addl %edx, 32(%esp) -..B6.81: - movl 132(%esp), %edi - movl 104(%esp), %ebp - movl 84(%esp), %eax - movl 88(%esp), %edx - movl 36(%esp), %ecx - movl 40(%esp), %ebx - subl 32(%esp), %ebp - movl %eax, 8(%edi) - movl %edx, 12(%edi) - movl %ecx, 16(%edi) - movl %ebx, 20(%edi) - movl %ebp, 4(%edi) - jmp ..B6.54 - .align 16,0x90 - .type __dpml_addsub__..0,@function - .size __dpml_addsub__..0,.-__dpml_addsub__..0 - .data -# -- End __dpml_addsub__..0 - .text -# -- Begin __dpml_evaluate_packed_poly__ - .text - .align 16,0x90 - .globl __dpml_evaluate_packed_poly__ -__dpml_evaluate_packed_poly__: -# parameter 1: 160 + %esp -# parameter 2: 164 + %esp -# parameter 3: 172 + %esp -# parameter 4: 176 + %esp -# parameter 5: 184 + %esp -# parameter 6: 192 + %esp -..B7.1: -..L14: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $140, %esp - movl 172(%esp), %esi - movl 192(%esp), %ebp - movl %gs:20, %ecx - xorl %esp, %ecx - movl %ecx, 124(%esp) - movl 12(%esi), %ecx - movl (%esi), %ebx - movl %ebx, %edx - movl 176(%esp), %edi - notl %edi - movl %ecx, 12(%ebp) - andl %edi, %edx - movl 8(%esi), %eax - movl 4(%esi), %ecx - movl %edi, 68(%esp) - movl %ecx, %edi - movl %edx, 16(%ebp) - movl %ebx, %edx - shll $31, %ecx - andl $1, %edx - shrl $1, %ebx - movl %eax, 8(%ebp) - orl %ebx, %ecx - movl 180(%esp), %eax - notl %eax - andl 176(%esp), %ecx - andl %eax, %edi - movl %eax, 64(%esp) - xorl %eax, %eax - subl 184(%esp), %ecx - movl %edi, 20(%ebp) - orl %eax, %edx - jne ..B7.3 -..B7.2: - movl %eax, %edx - jmp ..B7.4 -..B7.3: - movl $-2147483648, %edx -..B7.4: - movl 164(%esp), %edi - addl $-1, %edi - movl %ecx, 4(%ebp) - movl 168(%esp), %ecx - adcl $-1, %ecx - movl %edx, (%ebp) - movl %ecx, %edx - call ..L15 -..L15: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L15](%ebx), %ebx - subl %eax, %edx - jl ..B7.16 -..B7.5: - movl %eax, 104(%esp) - movl %eax, 100(%esp) - movl %ecx, 80(%esp) - movl %ebx, 40(%esp) - movl %edi, 76(%esp) - movl %esi, 72(%esp) -..B7.6: - addl $12, %esp - movl 180(%esp), %eax - pushl %eax - pushl %eax - pushl 156(%esp) - call __dpml_multiply__ -..B7.7: - movl 192(%esp), %eax - xorl %ecx, %ecx - movl 12(%eax), %ebp - movl %ebp, %ebx - movl 4(%eax), %edx - subl %ecx, %ebx - movl 8(%eax), %esi - movl %edx, 56(%esp) - jl ..B7.13 -..B7.8: - movl 192(%esp), %edx - xorl %eax, %eax - movl %eax, 60(%esp) - movl %ebp, 88(%esp) - movl 16(%edx), %ebx - movl 20(%edx), %edi - movl $2, %edx - movl %esi, 84(%esp) - movl %eax, %ebp - movl 60(%esp), %ecx - jmp ..B7.9 -..B7.11: - xorl %ebx, %ebx - xorl %edi, %edi -..B7.9: - movl 84(%esp), %esi - orl 88(%esp), %esi - jne ..B7.19 -..B7.10: - addl $64, %ecx - movl %ebx, 84(%esp) - adcl $0, %ebp - addl $-1, %edx - movl %edx, %ebx - adcl $-1, %eax - movl %edi, 88(%esp) - orl %eax, %ebx - jne ..B7.11 -..B7.12: - movl 192(%esp), %eax - movl $-262144, 4(%eax) -..B7.13: - movl 72(%esp), %esi - addl $16, %esi - movl 68(%esp), %edi - movl 64(%esp), %edx - movl %esi, 72(%esp) - movl 8(%esi), %ebx - movl %ebx, 108(%esp) - movl (%esi), %eax - andl %eax, %edi - movl 4(%esi), %ebx - andl %ebx, %edx - shll $31, %ebx - movl %eax, %ecx - shrl $1, %eax - andl $1, %ecx - orl %eax, %ebx - movl 192(%esp), %eax - andl 176(%esp), %ebx - movl 12(%esi), %ebp - movl %edx, 120(%esp) - lea 100(%esp), %edx - movl %ecx, 8(%esp) - movl %eax, %ecx - movl %ebp, 12(%edx) - movl %edi, 16(%edx) - subl 184(%esp), %ebx - movl $0, 12(%esp) - call __dpml_addsub__. -..B7.14: - movl 192(%esp), %eax - xorl %ecx, %ecx - addl $-1, 76(%esp) - movl 80(%esp), %edx - adcl $-1, %edx - addl %ebx, 4(%eax) - movl %edx, 80(%esp) - subl %ecx, %edx - jge ..B7.6 -..B7.15: - movl 40(%esp), %ebx -..B7.16: - movl 124(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B7.18 -..B7.17: - addl $140, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B7.18: - call __stack_chk_fail@PLT -..B7.19: - movl 88(%esp), %ebp - movl %ebp, %edx - xorl %eax, %eax - movl 84(%esp), %esi - subl %eax, %edx - movl %ecx, 60(%esp) - jl ..B7.35 -..B7.20: - movl %ebp, %ecx - shrl $26, %ecx - andl $30, %ecx - orl %ecx, %eax - je ..B7.22 -..B7.21: - movl $21932, %eax - shrl %cl, %eax - andl $3, %eax - incl %eax - jmp ..B7.25 -..B7.22: - movl %esi, %edx - movl %ebp, %eax - andl $-256, %edx - orl %edx, %eax - jne ..B7.24 -..B7.23: - movl %esi, %edx -..B7.24: - movl %edx, 32(%esp) - movl %ebp, %edx - movl %ebp, 36(%esp) - fildll 32(%esp) - shrl $31, %edx - movl 40(%esp), %eax - faddl .L_2il0floatpacket.1@GOTOFF(%eax,%edx,8) - fstpl 92(%esp) - movl 96(%esp), %eax - sarl $20, %eax - negl %eax - addl $1086, %eax -..B7.25: - cmpl $31, %eax - jbe ..B7.27 -..B7.26: - movl %eax, %ecx - movl %esi, %ebp - movl $0, 48(%esp) - shll %cl, %ebp - jmp ..B7.28 -..B7.27: - movl %eax, %ecx - shldl %cl, %esi, %ebp - shll %cl, %esi - movl %esi, 48(%esp) -..B7.28: - movl %eax, %ecx - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B7.30 -..B7.29: - movl %edi, %esi - movl $0, 44(%esp) - shrl %cl, %esi - jmp ..B7.31 -..B7.30: - movl %edi, %edx - movl %ebx, %esi - shrl %cl, %edx - shrdl %cl, %edi, %esi - movl %edx, 44(%esp) -..B7.31: - orl 48(%esp), %esi - orl 44(%esp), %ebp - movl %ebx, 52(%esp) - cmpl $31, %eax - jbe ..B7.33 -..B7.32: - movl %eax, %ecx - xorl %ebx, %ebx - movl 52(%esp), %edi - shll %cl, %edi - jmp ..B7.34 -..B7.33: - movl %eax, %ecx - shldl %cl, %ebx, %edi - shll %cl, %ebx -..B7.34: - addl %eax, 60(%esp) -..B7.35: - movl 192(%esp), %eax - movl %ebx, 16(%eax) - movl 56(%esp), %ebx - subl 60(%esp), %ebx - movl %esi, 8(%eax) - movl %ebp, 12(%eax) - movl %edi, 20(%eax) - movl %ebx, 4(%eax) - jmp ..B7.13 - .align 16,0x90 - .type __dpml_evaluate_packed_poly__,@function - .size __dpml_evaluate_packed_poly__,.-__dpml_evaluate_packed_poly__ - .data -# -- End __dpml_evaluate_packed_poly__ - .text -# -- Begin __dpml_addsub__ - .text - .align 16,0x90 - .hidden __dpml_addsub__ - .globl __dpml_addsub__ -__dpml_addsub__: -# parameter 1: %eax -# parameter 2: %edx -# parameter 3: 184 + %esp -# parameter 4: %ecx -..B8.1: -..L16: - - movl 4(%esp), %eax - movl 8(%esp), %edx - movl 20(%esp), %ecx - .hidden __dpml_addsub__. - .globl __dpml_addsub__. -__dpml_addsub__.: - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $156, %esp - movl %eax, %esi - movl %edx, %ebp - movl 188(%esp), %edx - movl 184(%esp), %edi - movl %edi, %ebx - movl %edx, 48(%esp) - movl %edi, %edx - movl %ecx, 132(%esp) - andl $4, %ebx - movl (%esi), %eax - shll $31, %edx - movl %gs:20, %ecx - xorl %esp, %ecx - movl %ecx, 144(%esp) - xorl %ecx, %ecx - movl %eax, 108(%esp) - xorl %edx, %eax - xorl (%ebp), %eax - orl %ecx, %ebx - je ..B8.3 -..B8.2: - movl $0, 108(%esp) - jmp ..B8.4 -..B8.3: - movl %eax, %edx -..B8.4: - movl 4(%esi), %ecx - movl %ecx, %eax - shrl $31, %edx - movl %edx, 124(%esp) - cltd - movl 4(%ebp), %eax - movl %edx, %ebx - cltd - movl %ecx, %eax - subl 4(%ebp), %eax - movl %ecx, 104(%esp) - sbbl %edx, %ebx - xorl %edx, %edx - movl %ebx, %ecx - movl $0, 112(%esp) - subl %edx, %ecx - movl 124(%esp), %edx - jl ..B8.6 -..B8.5: - movl $0, 92(%esp) - jmp ..B8.10 -..B8.6: - movl %esi, %ecx - movl %ebp, %esi - movl %ecx, %ebp - movl %eax, %ecx - xorl %eax, %eax - subl %ecx, %eax - movl %ebx, %ecx - movl $0, %ebx - sbbl %ecx, %ebx - movl %edx, %ecx - addl %eax, 104(%esp) - orl 112(%esp), %ecx - jne ..B8.8 -..B8.7: - xorl %ecx, %ecx - jmp ..B8.9 -..B8.8: - movl $-2147483648, %ecx -..B8.9: - xorl %ecx, 108(%esp) - movl $-2147483648, 92(%esp) -..B8.10: - movl 16(%ebp), %ecx - movl %ecx, 100(%esp) - movl 20(%ebp), %ecx - movl %ecx, 96(%esp) - movl 8(%ebp), %ecx - movl 12(%ebp), %ebp - movl %ecx, 120(%esp) - movl %ebp, 116(%esp) - movl $2, %ebp - movl $0, (%esp) - call ..L17 -..L17: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L17](%ecx), %ecx - movl %esi, 128(%esp) - movl %ecx, 8(%esp) - movl %edi, 40(%esp) - movl %ebp, 4(%esp) - movl %edx, 124(%esp) - movl (%esp), %esi - jmp ..B8.11 -..B8.13: - xorl %edx, %edx - movl %edx, 120(%esp) - movl %edx, 116(%esp) -..B8.11: - movl $64, %ebp - xorl %edi, %edi - xorl %edx, %edx - subl %eax, %ebp - sbbl %ebx, %edx - movl %edx, %ecx - subl %edi, %ecx - jl ..B8.12 -..B8.90: - orl %ebp, %ecx - jne ..B8.19 -..B8.12: - movl 116(%esp), %ebx - movl 120(%esp), %eax - movl %ebx, 96(%esp) - xorl %ebx, %ebx - movl %eax, 100(%esp) - xorl %eax, %eax - subl %ebp, %eax - sbbl %edx, %ebx - movl 4(%esp), %edx - addl $-1, %edx - movl %edx, 4(%esp) - adcl $-1, %esi - orl %esi, %edx - jne ..B8.13 -..B8.14: - movl 132(%esp), %eax - movl 128(%esp), %esi - movl 8(%esi), %ecx - movl 12(%esi), %ebx - movl 4(%esi), %edx - movl %ecx, 8(%eax) - movl %ebx, 12(%eax) - movl %edx, 4(%eax) - movl 16(%esi), %ebp - movl 20(%esi), %edx - movl 108(%esp), %ecx - movl 40(%esp), %edi - movl %ebp, 16(%eax) - andl $2, %edi - movl %edx, 20(%eax) - movl %ecx, (%eax) - xorl %eax, %eax - orl %eax, %edi - je ..B8.16 -..B8.15: - movl 132(%esp), %eax - movl 8(%esi), %ecx - movl 12(%esi), %ebx - movl %ecx, 32(%eax) - movl %ebx, 36(%eax) - movl 108(%esp), %edi - movl 4(%esi), %edx - movl 16(%esi), %ebp - movl 20(%esi), %esi - xorl 92(%esp), %edi - movl %edx, 28(%eax) - movl %ebp, 40(%eax) - movl %esi, 44(%eax) - movl %edi, 24(%eax) -..B8.16: - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B8.18 -..B8.17: - addl $156, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B8.18: - movl 8(%esp), %ebx - call __stack_chk_fail@PLT -..B8.19: - movl %ebp, 4(%esp) - orl %eax, %ebx - movl 40(%esp), %edi - movl 124(%esp), %edx - movl 128(%esp), %esi - je ..B8.30 -..B8.20: - cmpl $31, %eax - jbe ..B8.22 -..B8.21: - movl %eax, %ecx - xorl %ebx, %ebx - movl 96(%esp), %ebp - shrl %cl, %ebp - movl %ebp, 100(%esp) - jmp ..B8.23 -..B8.22: - movl %eax, %ecx - movl 100(%esp), %ebp - movl 96(%esp), %ebx - shrdl %cl, %ebx, %ebp - movl %ebp, 100(%esp) - shrl %cl, %ebx -..B8.23: - cmpl $31, 4(%esp) - jbe ..B8.25 -..B8.24: - movl 4(%esp), %ecx - movl 120(%esp), %ebp - shll %cl, %ebp - movl $0, (%esp) - movl %ebp, 96(%esp) - jmp ..B8.26 -..B8.25: - movl %edi, 40(%esp) - movl 4(%esp), %ecx - movl 116(%esp), %edi - movl 120(%esp), %ebp - shldl %cl, %ebp, %edi - movl %edi, 96(%esp) - shll %cl, %ebp - movl %ebp, (%esp) - movl 40(%esp), %edi -..B8.26: - movl (%esp), %ebp - orl %ebp, 100(%esp) - orl %ebx, 96(%esp) - movl 116(%esp), %ebx - cmpl $31, %eax - jbe ..B8.28 -..B8.27: - movl %eax, %ecx - shrl %cl, %ebx - movl $0, 116(%esp) - movl %ebx, 120(%esp) -..B8.30: - movl %edx, 124(%esp) - movl %esi, 128(%esp) - jmp ..B8.31 -..B8.28: - movl %eax, %ecx - movl 120(%esp), %ebp - shrdl %cl, %ebx, %ebp - shrl %cl, %ebx - movl %ebp, 120(%esp) - movl %ebx, 116(%esp) - jmp ..B8.30 -..B8.60: - movl 128(%esp), %esi - movl $1, %edx - movl 124(%esp), %eax - xorl %ecx, %ecx - subl %eax, %edx - movl 108(%esp), %ebp - movl 4(%esi), %eax - movl 112(%esp), %ebx - sbbl %ebx, %ecx - xorl 92(%esp), %ebp - xorl $2, %edi - addl $24, 132(%esp) - movl %edx, 124(%esp) - movl %ecx, 112(%esp) - movl %ebp, 108(%esp) - movl %eax, 104(%esp) -..B8.31: - movl 128(%esp), %edx - movl 124(%esp), %eax - orl 112(%esp), %eax - movl 16(%edx), %ebx - movl 20(%edx), %edx - jne ..B8.43 -..B8.32: - movl %ebx, %ebp - movl %edx, %ecx - addl 100(%esp), %ebp - movl %ebp, %eax - adcl 96(%esp), %ecx - andl $15, %edi - subl %ebx, %eax - movl %ecx, %ebx - movl $0, 48(%esp) - sbbl %edx, %ebx - jae ..B8.34 -..B8.33: - movl $1, 72(%esp) - jmp ..B8.35 -..B8.34: - movl $0, 72(%esp) -..B8.35: - movl 128(%esp), %esi - movl 72(%esp), %edx - movl 8(%esi), %ebx - movl %ebx, 52(%esp) - movl 120(%esp), %ebx - movl 12(%esi), %eax - addl %edx, %ebx - movl %eax, 80(%esp) - movl %ebx, %eax - movl 116(%esp), %esi - adcl $0, %esi - subl %edx, %eax - movl $0, %edx - movl %esi, %eax - sbbl %edx, %eax - jae ..B8.37 -..B8.36: - movl $1, 68(%esp) - jmp ..B8.38 -..B8.37: - movl $0, 68(%esp) -..B8.38: - movl 52(%esp), %eax - addl %eax, %ebx - movl %ebx, %edx - adcl 80(%esp), %esi - subl %eax, %edx - movl %esi, %eax - sbbl 80(%esp), %eax - jae ..B8.40 -..B8.39: - movl $1, %edx - jmp ..B8.41 -..B8.40: - xorl %edx, %edx -..B8.41: - movl 68(%esp), %eax - addl %edx, %eax - xorl %edx, %edx - orl %edx, %eax - je ..B8.57 -..B8.42: - movl %ecx, %eax - movl %ebx, %edx - shll $31, %eax - shrl $1, %ebp - orl %eax, %ebp - movl %esi, %eax - shrl $1, %ecx - shll $31, %edx - shll $31, %eax - orl %edx, %ecx - shrl $1, %esi - shrl $1, %ebx - orl $-2147483648, %esi - incl 104(%esp) - orl %eax, %ebx - jmp ..B8.57 -..B8.43: - addl $-8, %edi - movl 100(%esp), %ecx - adcl $-1, 48(%esp) - subl %ebx, %ecx - movl 96(%esp), %eax - sbbl %edx, %eax - jb ..B8.45 -..B8.91: - orl %eax, %ecx - je ..B8.45 -..B8.44: - movl $1, %eax - jmp ..B8.46 -..B8.45: - xorl %eax, %eax -..B8.46: - movl 128(%esp), %esi - movl %ebx, %ebp - subl 100(%esp), %ebp - movl %edx, %ecx - movl 116(%esp), %ebx - movl 8(%esi), %edx - movl %edx, 60(%esp) - movl 12(%esi), %edx - movl 120(%esp), %esi - sbbl 96(%esp), %ecx - addl %eax, %esi - movl %esi, 56(%esp) - adcl $0, %ebx - subl %eax, %esi - movl $0, %eax - movl %ebx, 76(%esp) - sbbl %eax, %ebx - jae ..B8.48 -..B8.47: - movl $1, 64(%esp) - jmp ..B8.49 -..B8.48: - movl $0, 64(%esp) -..B8.49: - movl 60(%esp), %eax - movl %eax, %ebx - subl 56(%esp), %ebx - movl %edx, %esi - sbbl 76(%esp), %esi - subl %ebx, %eax - sbbl %esi, %edx - jae ..B8.51 -..B8.50: - movl $1, %edx - jmp ..B8.52 -..B8.51: - xorl %edx, %edx -..B8.52: - movl 64(%esp), %eax - addl %edx, %eax - xorl %edx, %edx - orl %edx, %eax - je ..B8.57 -..B8.53: - xorl %eax, %eax - movl %ebp, %edx - xorl %ebp, %ebp - subl %edx, %ebp - movl %ecx, %edx - movl %eax, %ecx - movl %ebp, %eax - sbbl %edx, %ecx - xorl $-2147483648, 108(%esp) - orl %ecx, %eax - jne ..B8.55 -..B8.54: - movl $0, 44(%esp) - jmp ..B8.56 -..B8.55: - movl $-1, 44(%esp) -..B8.56: - movl 44(%esp), %eax - cltd - movl %ebx, %eax - movl 44(%esp), %ebx - subl %eax, %ebx - movl %esi, %eax - movl %edx, %esi - movl $-2147483648, 92(%esp) - sbbl %eax, %esi -..B8.57: - movl 132(%esp), %edx - movl 108(%esp), %eax - movl %eax, (%edx) - movl %edi, %edx - andl $16, %edx - xorl %eax, %eax - orl %eax, %edx - jne ..B8.61 -..B8.58: - movl 132(%esp), %edx - movl 104(%esp), %eax - movl %eax, 4(%edx) - movl %ebp, 16(%edx) - movl %ecx, 20(%edx) - movl %ebx, 8(%edx) - movl %esi, 12(%edx) -..B8.59: - movl %edi, %edx - xorl %eax, %eax - andl $2, %edx - orl %eax, %edx - jne ..B8.60 - jmp ..B8.66 -..B8.61: - movl %esi, %edx - movl %ebx, 84(%esp) - subl %eax, %edx - movl %esi, 88(%esp) - jl ..B8.58 -..B8.62: - movl $2, %edx - movl %ebp, 32(%esp) - movl %ecx, 36(%esp) - movl %eax, 28(%esp) - movl %ebx, 12(%esp) - movl %edi, 40(%esp) - movl %esi, 20(%esp) - movl %ecx, 24(%esp) - movl %ebp, 16(%esp) - movl 32(%esp), %esi - movl 36(%esp), %edi - movl %eax, %ebx - movl 28(%esp), %ecx - jmp ..B8.63 -..B8.65: - xorl %esi, %esi - xorl %edi, %edi -..B8.63: - movl 84(%esp), %ebp - orl 88(%esp), %ebp - jne ..B8.70 -..B8.64: - addl $64, %ecx - movl %esi, 84(%esp) - adcl $0, %ebx - addl $-1, %edx - movl %edx, %ebp - adcl $-1, %eax - movl %edi, 88(%esp) - orl %eax, %ebp - jne ..B8.65 - jmp ..B8.69 -..B8.66: - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B8.18 - jmp ..B8.17 -..B8.69: - movl 132(%esp), %eax - movl 12(%esp), %ebx - movl 16(%esp), %ebp - movl 20(%esp), %esi - movl 24(%esp), %ecx - movl 40(%esp), %edi - movl %ebp, 16(%eax) - movl %ecx, 20(%eax) - movl %ebx, 8(%eax) - movl %esi, 12(%eax) - movl $-262144, 4(%eax) - jmp ..B8.59 -..B8.70: - xorl %eax, %eax - movl 88(%esp), %edx - movl %edi, 36(%esp) - subl %eax, %edx - movl %esi, 32(%esp) - movl %ecx, 28(%esp) - movl 40(%esp), %edi - jl ..B8.86 -..B8.71: - movl 88(%esp), %ecx - shrl $26, %ecx - andl $30, %ecx - orl %ecx, %eax - je ..B8.73 -..B8.72: - movl $21932, %edx - shrl %cl, %edx - andl $3, %edx - incl %edx - jmp ..B8.76 -..B8.73: - movl 84(%esp), %edx - andl $-256, %edx - movl 88(%esp), %eax - orl %edx, %eax - jne ..B8.75 -..B8.74: - movl 84(%esp), %edx -..B8.75: - movl 88(%esp), %eax - movl %edx, (%esp) - movl %eax, 4(%esp) - fildll (%esp) - shrl $31, %eax - movl 8(%esp), %edx - faddl .L_2il0floatpacket.1@GOTOFF(%edx,%eax,8) - fstpl 136(%esp) - movl 140(%esp), %edx - sarl $20, %edx - negl %edx - addl $1086, %edx -..B8.76: - cmpl $31, %edx - jbe ..B8.78 -..B8.77: - movl %edx, %ecx - xorl %eax, %eax - movl 84(%esp), %ebx - shll %cl, %ebx - movl %ebx, 88(%esp) - jmp ..B8.79 -..B8.78: - movl %edx, %ecx - movl 84(%esp), %eax - movl 88(%esp), %ebx - shldl %cl, %eax, %ebx - movl %ebx, 88(%esp) - shll %cl, %eax -..B8.79: - movl %edx, %ecx - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B8.81 -..B8.80: - movl 36(%esp), %ebx - xorl %ebp, %ebp - shrl %cl, %ebx - movl %ebx, 84(%esp) - jmp ..B8.82 -..B8.81: - movl %esi, %ebx - movl 36(%esp), %ebp - shrdl %cl, %ebp, %ebx - movl %ebx, 84(%esp) - shrl %cl, %ebp -..B8.82: - orl %eax, 84(%esp) - orl %ebp, 88(%esp) - movl %esi, %ebx - cmpl $31, %edx - jbe ..B8.84 -..B8.83: - movl %edx, %ecx - shll %cl, %ebx - movl $0, 32(%esp) - movl %ebx, 36(%esp) - jmp ..B8.85 -..B8.84: - movl %edx, %ecx - movl 36(%esp), %eax - shldl %cl, %ebx, %eax - shll %cl, %ebx - movl %eax, 36(%esp) - movl %ebx, 32(%esp) -..B8.85: - addl %edx, 28(%esp) -..B8.86: - movl 132(%esp), %esi - movl 104(%esp), %ebp - movl 84(%esp), %eax - movl 88(%esp), %edx - movl 32(%esp), %ecx - movl 36(%esp), %ebx - subl 28(%esp), %ebp - movl %eax, 8(%esi) - movl %edx, 12(%esi) - movl %ecx, 16(%esi) - movl %ebx, 20(%esi) - movl %ebp, 4(%esi) - jmp ..B8.59 - .align 16,0x90 - .type __dpml_addsub__,@function - .size __dpml_addsub__,.-__dpml_addsub__ - .data -# -- End __dpml_addsub__ - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x00000000,0x00000000,0x00000000,0x43f00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xe6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .align 4 - .globl __x_constants__ -__x_constants__: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1073610752 - .long 0 - .long 0 - .long 0 - .long 1073676288 - .long 0 - .long 0 - .long 0 - .long 1073741824 - .long 3306619320 - .long 2221509004 - .long 3041149649 - .long 1073648159 - .long 3306619320 - .long 2221509004 - .long 3041149649 - .long 1073779231 - .long 2479964490 - .long 592389929 - .long 3354604061 - .long 1073753495 - .long 3306619320 - .long 2221509004 - .long 3041149649 - .long 1073713695 - .long 0 - .long 0 - .long 0 - .long 1074030592 - .long 0 - .long 0 - .long 0 - .long 1074096128 - .long 0 - .long 0 - .long 0 - .long 1074138624 - .long 0 - .long 0 - .long 0 - .long 1074161664 - .long 0 - .long 0 - .long 0 - .long 2147418112 - .type __x_constants__,@object - .size __x_constants__,208 - .data - .hidden __dpml_multiply__ - .hidden __dpml_exception - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_ops_64.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_ops_64.S deleted file mode 100644 index 8b6fdba73d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_ops_64.S +++ /dev/null @@ -1,4636 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_ops_64.c" - .text -..TXTST0: -# -- Begin __dpml_multiply__ - .text - .align 16,0x90 - .hidden __dpml_multiply__ - .globl __dpml_multiply__ -__dpml_multiply__: -# parameter 1: 64 + %esp -# parameter 2: 68 + %esp -# parameter 3: 72 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $44, %esp - movl 68(%esp), %edi - movl 64(%esp), %esi - movl 12(%edi), %ebx - movl %ebx, %edx - movl 12(%esi), %ebp - movl 8(%esi), %eax - movl 8(%edi), %ecx - movl %ebp, (%esp) - imull %ecx, %ebp - imull %eax, %edx - movl %eax, 4(%esp) - addl %edx, %ebp - mull %ecx - addl %ebp, %edx - movl %eax, %esi - movl %edx, 24(%esp) - movl %ecx, %eax - movl 64(%esp), %edx - movl 68(%esp), %ebp - movl 64(%esp), %edi - mull 16(%edx) - movl 16(%ebp), %ebp - movl %ecx, %eax - movl %ebp, 20(%esp) - movl 68(%esp), %ebp - movl 20(%edi), %edi - movl %ecx, 8(%esp) - movl 20(%ebp), %ebp - movl %ebp, 16(%esp) - movl %edx, %ebp - mull %edi - movl 64(%esp), %ecx - addl %eax, %ebp - movl %edi, 36(%esp) - movl %edx, %edi - adcl $0, %edi - movl 16(%ecx), %eax - mull %ebx - addl %ebp, %eax - movl %ebx, 12(%esp) - adcl %edi, %edx - subl %ebp, %eax - movl %edx, 28(%esp) - movl 24(%esp), %ebx - sbbl %edi, %edx - jae ..B1.3 -..B1.2: - movl $1, %ebp - jmp ..B1.4 -..B1.3: - xorl %ebp, %ebp -..B1.4: - movl 36(%esp), %eax - mull 12(%esp) - addl %edx, %ebp - addl 28(%esp), %eax - movl %eax, 32(%esp) - movl 64(%esp), %eax - adcl $0, %ebp - movl 68(%esp), %edi - movl 72(%esp), %ecx - movl (%eax), %edx - xorl (%edi), %edx - movl %edx, (%ecx) - movl 4(%eax), %edx - addl 4(%edi), %edx - movl 4(%esp), %eax - movl 20(%esp), %edi - movl %edx, 4(%ecx) - mull %edi - movl %edi, %eax - movl %edx, %ecx - mull (%esp) - addl %eax, %ecx - movl %edx, %edi - movl 4(%esp), %eax - adcl $0, %edi - mull 16(%esp) - addl %ecx, %eax - adcl %edi, %edx - subl %ecx, %eax - movl %edx, 24(%esp) - sbbl %edi, %edx - jae ..B1.6 -..B1.5: - movl $1, %ecx - jmp ..B1.7 -..B1.6: - xorl %ecx, %ecx -..B1.7: - movl 16(%esp), %eax - mull (%esp) - addl %edx, %ecx - addl 24(%esp), %eax - movl 32(%esp), %edi - adcl $0, %ecx - addl %edi, %esi - movl %eax, 20(%esp) - movl %esi, %eax - adcl %ebp, %ebx - subl %edi, %eax - movl %ebx, %edx - sbbl %ebp, %edx - jae ..B1.9 -..B1.8: - movl $1, 24(%esp) - jmp ..B1.10 -..B1.9: - movl $0, 24(%esp) -..B1.10: - movl 8(%esp), %edi - movl %edi, %eax - mull 4(%esp) - movl %edi, %eax - movl %edx, %ebp - mull (%esp) - addl %eax, %ebp - movl %edx, %edi - movl 4(%esp), %eax - adcl $0, %edi - mull 12(%esp) - addl %ebp, %eax - adcl %edi, %edx - subl %ebp, %eax - movl %edx, 16(%esp) - sbbl %edi, %edx - jae ..B1.12 -..B1.11: - movl $1, %ebp - jmp ..B1.13 -..B1.12: - xorl %ebp, %ebp -..B1.13: - movl (%esp), %eax - mull 12(%esp) - addl %edx, %ebp - addl 16(%esp), %eax - movl 20(%esp), %edi - adcl $0, %ebp - addl %edi, %esi - movl %esi, %edx - adcl %ecx, %ebx - subl %edi, %edx - movl %ebx, %edi - sbbl %ecx, %edi - jae ..B1.15 -..B1.14: - movl $1, %edx - jmp ..B1.16 -..B1.15: - xorl %edx, %edx -..B1.16: - movl 24(%esp), %ecx - addl %edx, %ecx - movl 72(%esp), %edx - addl %ecx, %eax - adcl $0, %ebp - movl %esi, 16(%edx) - movl %ebx, 20(%edx) - movl %eax, 8(%edx) - movl %ebp, 12(%edx) - addl $44, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret - .align 16,0x90 - .type __dpml_multiply__,@function - .size __dpml_multiply__,.-__dpml_multiply__ - .data -# -- End __dpml_multiply__ - .text -# -- Begin __dpml_extended_multiply__ - .text - .align 16,0x90 - .hidden __dpml_extended_multiply__ - .globl __dpml_extended_multiply__ -__dpml_extended_multiply__: -# parameter 1: 80 + %esp -# parameter 2: 84 + %esp -# parameter 3: 88 + %esp -# parameter 4: 92 + %esp -..B2.1: -..L2: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $60, %esp - movl 80(%esp), %esi - movl 84(%esp), %edi - movl 20(%esi), %ebx - movl 20(%edi), %edx - movl 16(%edi), %ecx - movl 16(%esi), %ebp - movl %ebp, %eax - movl %ebx, 24(%esp) - movl %edx, 16(%esp) - imull %ecx, %ebx - imull %ebp, %edx - addl %edx, %ebx - mull %ecx - movl %eax, 36(%esp) - movl %ecx, %eax - addl %ebx, %edx - movl %edx, 40(%esp) - mull %ebp - movl 8(%esi), %ebx - movl %ecx, %eax - movl 12(%esi), %esi - movl %esi, (%esp) - movl 8(%edi), %esi - movl %esi, 12(%esp) - movl 12(%edi), %esi - movl %edx, %edi - mull 24(%esp) - addl %eax, %edi - movl %ebp, %eax - movl %esi, 4(%esp) - movl %edx, %esi - adcl $0, %esi - mull 16(%esp) - addl %edi, %eax - movl %ebx, 8(%esp) - movl %edx, %ebx - adcl %esi, %ebx - subl %edi, %eax - movl %ecx, 20(%esp) - movl %ebx, %ecx - sbbl %esi, %ecx - jae ..B2.3 -..B2.2: - movl $1, %ecx - jmp ..B2.4 -..B2.3: - xorl %ecx, %ecx -..B2.4: - movl 24(%esp), %eax - movl 16(%esp), %edi - mull %edi - addl %edx, %ecx - addl %ebx, %eax - movl 92(%esp), %esi - movl %edi, %ebx - adcl $0, %ecx - movl %ebp, 44(%esp) - movl %ecx, 52(%esp) - movl 36(%esp), %ebp - movl 40(%esp), %ecx - movl %ebp, 16(%esi) - movl %ecx, 20(%esi) - movl 80(%esp), %ebp - movl 84(%esp), %esi - movl %eax, 48(%esp) - movl 4(%ebp), %edx - movl 4(%esi), %eax - movl (%ebp), %ecx - xorl (%esi), %ecx - lea -128(%edx,%eax), %esi - movl %esi, 56(%esp) - movl (%esp), %esi - lea (%edx,%eax), %ebp - movl 8(%esp), %edx - movl 20(%esp), %eax - imull %edx, %ebx - imull %eax, %esi - mull %edx - addl %esi, %ebx - movl %edx, %edi - addl %ebx, %edi - movl %eax, %esi - movl 88(%esp), %ebx - movl 12(%esp), %edx - movl 4(%esp), %eax - movl %ecx, (%ebx) - movl %ebp, 4(%ebx) - movl 24(%esp), %ebx - movl 44(%esp), %ebp - imull %edx, %ebx - imull %ebp, %eax - addl %eax, %ebx - movl %ebp, %eax - mull %edx - addl %ebx, %edx - movl 92(%esp), %ebx - movl %edx, 32(%esp) - movl %eax, 28(%esp) - movl %ecx, (%ebx) - movl 56(%esp), %ecx - movl %ecx, 4(%ebx) - movl 48(%esp), %ebx - addl %esi, %ebx - movl %ebx, %edx - movl 52(%esp), %ecx - adcl %edi, %ecx - subl %esi, %edx - movl %ecx, %esi - sbbl %edi, %esi - jae ..B2.6 -..B2.5: - movl $1, %esi - jmp ..B2.7 -..B2.6: - xorl %esi, %esi -..B2.7: - movl %esi, 44(%esp) - movl (%esp), %edi - movl 12(%esp), %esi - movl 4(%esp), %edx - movl 8(%esp), %eax - imull %esi, %edi - imull %eax, %edx - addl %edx, %edi - mull %esi - movl 28(%esp), %esi - addl %edi, %edx - addl %esi, %ebx - movl %edx, 40(%esp) - movl %ebx, %edx - movl 32(%esp), %edi - adcl %edi, %ecx - subl %esi, %edx - movl %ecx, %edx - movl 44(%esp), %esi - sbbl %edi, %edx - movl %eax, 36(%esp) - jae ..B2.9 -..B2.8: - movl $1, %edx - jmp ..B2.10 -..B2.9: - xorl %edx, %edx -..B2.10: - addl %edx, %esi - movl %ebp, %eax - movl 92(%esp), %edx - movl %ecx, 12(%edx) - movl 12(%esp), %ecx - movl %ebx, 8(%edx) - mull %ecx - movl %ecx, %eax - movl %edx, %edi - mull 24(%esp) - addl %eax, %edi - movl %ebp, %eax - movl %edx, %ebx - adcl $0, %ebx - mull 4(%esp) - addl %edi, %eax - movl %edx, %ecx - adcl %ebx, %ecx - subl %edi, %eax - movl %ecx, %ebp - sbbl %ebx, %ebp - jae ..B2.12 -..B2.11: - movl $1, %edi - jmp ..B2.13 -..B2.12: - xorl %edi, %edi -..B2.13: - movl 24(%esp), %eax - mull 4(%esp) - addl %edx, %edi - addl %ecx, %eax - movl 36(%esp), %ebx - adcl $0, %edi - addl %ebx, %esi - movl %eax, 28(%esp) - movl %esi, %ebp - movl 40(%esp), %eax - movl %eax, %ecx - adcl $0, %ecx - subl %ebx, %ebp - movl %ecx, %edx - sbbl %eax, %edx - jae ..B2.15 -..B2.14: - movl $1, %ebp - jmp ..B2.16 -..B2.15: - xorl %ebp, %ebp -..B2.16: - movl 20(%esp), %ebx - movl %ebx, %eax - mull 8(%esp) - movl %ebx, %eax - movl %ecx, 32(%esp) - movl %edx, %ecx - mull (%esp) - addl %eax, %ecx - movl %edx, %ebx - movl 8(%esp), %eax - adcl $0, %ebx - mull 16(%esp) - addl %ecx, %eax - adcl %ebx, %edx - subl %ecx, %eax - movl %edx, 24(%esp) - movl 32(%esp), %ecx - sbbl %ebx, %edx - jae ..B2.18 -..B2.17: - movl $1, %ebx - jmp ..B2.19 -..B2.18: - xorl %ebx, %ebx -..B2.19: - movl 16(%esp), %eax - mull (%esp) - addl %edx, %ebx - addl 24(%esp), %eax - movl %eax, 20(%esp) - movl 28(%esp), %eax - adcl $0, %ebx - addl %eax, %esi - movl %esi, %edx - adcl %edi, %ecx - subl %eax, %edx - movl %ecx, %eax - sbbl %edi, %eax - jae ..B2.21 -..B2.20: - movl $1, %eax - jmp ..B2.22 -..B2.21: - xorl %eax, %eax -..B2.22: - movl 12(%esp), %edi - addl %eax, %ebp - movl %edi, %eax - mull 8(%esp) - movl %edi, %eax - movl %ebp, 24(%esp) - movl %edx, %ebp - mull (%esp) - addl %eax, %ebp - movl %edx, %edi - movl 8(%esp), %eax - adcl $0, %edi - mull 4(%esp) - addl %ebp, %eax - adcl %edi, %edx - subl %ebp, %eax - movl %edx, 16(%esp) - movl 24(%esp), %ebp - sbbl %edi, %edx - jae ..B2.24 -..B2.23: - movl $1, %edi - jmp ..B2.25 -..B2.24: - xorl %edi, %edi -..B2.25: - movl (%esp), %eax - mull 4(%esp) - addl %edx, %edi - addl 16(%esp), %eax - movl %eax, 8(%esp) - movl 20(%esp), %eax - adcl $0, %edi - addl %eax, %esi - movl %esi, %edx - adcl %ebx, %ecx - subl %eax, %edx - movl %ecx, %eax - sbbl %ebx, %eax - jae ..B2.27 -..B2.26: - movl $1, %eax - jmp ..B2.28 -..B2.27: - xorl %eax, %eax -..B2.28: - addl %eax, %ebp - movl 88(%esp), %eax - movl %ecx, 20(%eax) - movl 8(%esp), %ecx - addl %ebp, %ecx - movl %esi, 16(%eax) - adcl $0, %edi - movl %ecx, 8(%eax) - movl %edi, 12(%eax) - addl $60, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret - .align 16,0x90 - .type __dpml_extended_multiply__,@function - .size __dpml_extended_multiply__,.-__dpml_extended_multiply__ - .data -# -- End __dpml_extended_multiply__ - .text -# -- Begin __dpml_divide__ - .text - .align 16,0x90 - .hidden __dpml_divide__ - .globl __dpml_divide__ -__dpml_divide__: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -# parameter 4: 24 + %ebp -..B3.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $148, %esp - call ..L4 -..L4: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ecx), %ecx - movl 12(%ebp), %edi - testl %edi, %edi - movl 8(%ebp), %ebx - movl %ecx, 92(%esp) - lea __ux_one__@GOTOFF(%ecx), %edx - jne ..L5 - movl %edx, %edi -..L5: - testl %ebx, %ebx - movl %gs:20, %eax - jne ..L6 - movl %edx, %ebx -..L6: - xorl %esp, %eax - movl %eax, 140(%esp) - cmpl %edx, %edi - movl 16(%edi), %esi - movl 8(%edi), %eax - movl 12(%edi), %ecx - movl %esi, 104(%esp) - movl %ebx, 108(%esp) - movl %eax, 96(%esp) - movl %ecx, 100(%esp) - movl 20(%edi), %esi - je ..B3.69 -..B3.2: - xorl %edx, %edx - subl %edx, %ecx - jl ..B3.5 -..B3.3: - addl $12, %esp - pushl %edx - pushl %edx - pushl %edi - call __dpml_ffs_and_shift__ -..B3.4: - movl 8(%edi), %eax - movl 12(%edi), %edx - movl 16(%edi), %ecx - movl 20(%edi), %esi - movl %eax, 96(%esp) - movl %edx, 100(%esp) - movl %ecx, 104(%esp) -..B3.5: - addl $4, %esp - lea 108(%esp), %edx - pushl %edx - movl -20(%edx), %ebx - call fegetenv@PLT -..B3.6: - movl %esi, 56(%esp) - movl 100(%esp), %esi - movl %esi, %eax - movl 96(%esp), %ecx - movl %ecx, %edx - movl %edi, 28(%esp) - movl %esi, %edi - shll $31, %eax - shrl $1, %edx - shrl $1, %edi - orl %edx, %eax - movl %eax, 32(%esp) - movl %esi, %eax - movl %edi, 36(%esp) - andl $-64, %eax - fildll 32(%esp) - andl $63, %esi - fstpl 48(%esp) - xorl %edx, %edx - fldl 48(%esp) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fdiv %st, %st(1) - shrl $1, %eax - movl %eax, 36(%esp) - movl %ecx, %eax - movl 108(%esp), %edi - shrl $17, %eax - shll $15, %esi - movl %edx, 32(%esp) - orl %esi, %eax - movl 56(%esp), %esi - shll $15, %ecx - shrl $17, %esi - orl %esi, %ecx - movl 12(%edi), %esi - movl %esi, 80(%esp) - fxch %st(1) - fstpl 48(%esp) - fldl 48(%esp) - movl (%edi), %esi - fld %st(0) - fildll 32(%esp) - movl %eax, 36(%esp) - movl %ecx, 32(%esp) - movl 8(%edi), %eax - movl 16(%edi), %ecx - movl %eax, 84(%esp) - movl %ecx, 72(%esp) - movl 20(%edi), %eax - movl 28(%esp), %ecx - movl %eax, 76(%esp) - movl 24(%ebp), %eax - xorl (%ecx), %esi - fstpl 48(%esp) - fldl 48(%esp) - fildll 32(%esp) - movl %esi, (%eax) - fstpl 48(%esp) - fxch %st(1) - fnstcw 16(%esp) - movzwl 16(%esp), %eax - orl $3072, %eax - movl %eax, 24(%esp) - fldcw 24(%esp) - fistpll 40(%esp) - fldcw 16(%esp) - movl %edx, 32(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fldl 48(%esp) - movl 40(%esp), %eax - addl $-1280, %eax - movl 44(%esp), %esi - adcl $-1, %esi - fmul %st(1), %st - andl $-16, %esi - movl %esi, 36(%esp) - fstpl 48(%esp) - fldl 48(%esp) - fildll 32(%esp) - fstpl 48(%esp) - fldl 48(%esp) - fmul %st, %st(3) - movl 4(%edi), %edi - fxch %st(3) - fsubrp %st, %st(5) - fmul %st(2), %st - movl %esi, 88(%esp) - fsubrp %st, %st(4) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - movl 80(%esp), %eax - movl %eax, %ebx - movl 84(%esp), %esi - subl 4(%ecx), %edi - movl %esi, %ecx - shll $21, %ebx - shrl $11, %ecx - fmulp %st, %st(3) - orl %ecx, %ebx - movl %edi, 60(%esp) - movl %eax, %edi - shrl $1, %edi - movl %ebx, %ecx - shrl $22, %ecx - andl $-1024, %edi - shll $10, %ebx - orl %edi, %ecx - movl %ebx, 32(%esp) - movl %eax, %ebx - movl %ecx, 36(%esp) - andl $-64, %ebx - fxch %st(2) - fmulp %st, %st(3) - andl $63, %eax - shrl $1, %ebx - movl 76(%esp), %ecx - shll $15, %eax - shrl $17, %ecx - fxch %st(2) - fstpl 48(%esp) - fldl 48(%esp) - fildll 32(%esp) - movl %edx, 32(%esp) - movl %esi, %edx - movl %ebx, 36(%esp) - shrl $17, %edx - shll $15, %esi - orl %eax, %edx - orl %ecx, %esi - fstpl 48(%esp) - fldl 48(%esp) - movl 92(%esp), %eax - fmul %st(1), %st - fildll 32(%esp) - movl %esi, 32(%esp) - movl %edx, 36(%esp) - fstpl 48(%esp) - fldl 48(%esp) - fildll 32(%esp) - fstpl 48(%esp) - fldl 48(%esp) - fmulp %st, %st(4) - fxch %st(3) - fstpl 48(%esp) - fldl 48(%esp) - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - fmulp %st, %st(5) - fxch %st(4) - fstpl 48(%esp) - fldl 48(%esp) - fmul %st, %st(3) - fxch %st(3) - fstpl 48(%esp) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldl 48(%esp) - fxch %st(2) - fstpl 48(%esp) - fldl 48(%esp) - fldt .L_2il0floatpacket.4@GOTOFF(%eax) - fmulp %st, %st(3) - fxch %st(2) - fnstcw 16(%esp) - movzwl 16(%esp), %eax - orl $3072, %eax - movl %eax, 24(%esp) - fldcw 24(%esp) - fistpll 40(%esp) - fldcw 16(%esp) - movl 40(%esp), %ebx - movl %ebx, %edx - movl 44(%esp), %ecx - movl %ecx, %edi - fxch %st(1) - fnstcw 16(%esp) - movzwl 16(%esp), %eax - orl $3072, %eax - movl %eax, 24(%esp) - fldcw 24(%esp) - fistpll 40(%esp) - fldcw 16(%esp) - shrl $30, %edx - shll $2, %ebx - shll $2, %ecx - movl 40(%esp), %esi - orl %ecx, %edx - addl %esi, %ebx - movl %ebx, %ecx - movl 44(%esp), %eax - adcl %eax, %edx - shrl $30, %edi - subl %esi, %ecx - movl %edx, 64(%esp) - movl %edi, 68(%esp) - sbbl %eax, %edx - movl 56(%esp), %esi - movl 88(%esp), %edx - jae ..B3.8 -..B3.7: - movl $1, %ecx - jmp ..B3.9 -..B3.8: - xorl %ecx, %ecx -..B3.9: - addl %ecx, 68(%esp) - movl $1, %ecx - movl 16(%ebp), %edi - subl %ecx, %edi - orl 20(%ebp), %edi - jne ..B3.11 -..B3.10: - fstp %st(0) - xorl %eax, %eax - xorl %edx, %edx - jmp ..B3.59 -..B3.11: - movl 92(%esp), %ecx - fldt .L_2il0floatpacket.5@GOTOFF(%ecx) - fmulp %st, %st(1) - fnstcw 16(%esp) - movzwl 16(%esp), %eax - orl $3072, %eax - movl %eax, 24(%esp) - fldcw 24(%esp) - fistpll 40(%esp) - fldcw 16(%esp) - movl 44(%esp), %edi - movl 40(%esp), %ecx - movl %ecx, 28(%esp) - lea (%edi,%edx,4), %edx - movl %edx, 32(%esp) - orl %edx, %ecx - jne ..B3.13 -..B3.12: - movl $-1, %edx - movl %edx, 28(%esp) - movl %edx, 32(%esp) -..B3.13: - movl %ebx, %eax - xorl %edi, %edi - mull 104(%esp) - xorl %ecx, %ecx - movl %ebx, %eax - subl 68(%esp), %ecx - movl %ecx, 16(%esp) - movl %edx, %ecx - sbbl $0, %edi - mull %esi - addl %eax, %ecx - movl 104(%esp), %eax - movl %edi, 52(%esp) - movl %edx, %edi - adcl $0, %edi - mull 64(%esp) - addl %ecx, %eax - adcl %edi, %edx - subl %ecx, %eax - movl %edx, 20(%esp) - movl 52(%esp), %ecx - sbbl %edi, %edx - jae ..B3.15 -..B3.14: - movl $1, 48(%esp) - jmp ..B3.16 -..B3.15: - movl $0, 48(%esp) -..B3.16: - movl %esi, %eax - movl %esi, 56(%esp) - movl 64(%esp), %esi - mull %esi - movl %ecx, 52(%esp) - movl 48(%esp), %ecx - addl %edx, %ecx - movl %esi, %edx - addl 20(%esp), %eax - movl 96(%esp), %esi - adcl $0, %ecx - movl %ecx, 48(%esp) - movl 100(%esp), %ecx - movl %ecx, %edi - imull %ebx, %edi - imull %esi, %edx - movl %eax, 44(%esp) - movl %esi, %eax - addl %edx, %edi - mull %ebx - movl %eax, 24(%esp) - movl %ebx, %eax - addl %edi, %edx - movl %edx, 36(%esp) - mull %esi - movl %ebx, %eax - movl %edx, %edi - mull %ecx - addl %eax, %edi - movl %esi, %eax - movl %edx, %ecx - adcl $0, %ecx - mull 64(%esp) - addl %edi, %eax - movl 56(%esp), %esi - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 40(%esp) - sbbl %ecx, %edx - movl 52(%esp), %ecx - jae ..B3.18 -..B3.17: - movl $1, %edi - jmp ..B3.19 -..B3.18: - xorl %edi, %edi -..B3.19: - movl %ebx, 20(%esp) - andl %ecx, %esi - movl 100(%esp), %ebx - movl %ebx, %eax - mull 64(%esp) - addl %edx, %edi - andl %ebx, %ecx - addl 40(%esp), %eax - movl %eax, 56(%esp) - movl 104(%esp), %edx - adcl $0, %edi - movl 16(%esp), %eax - andl %eax, %edx - movl 44(%esp), %ebx - andl 96(%esp), %eax - addl %ebx, %edx - movl %eax, 16(%esp) - movl 48(%esp), %eax - adcl %eax, %esi - movl %edx, 104(%esp) - subl %ebx, %edx - movl %esi, %ebx - sbbl %eax, %ebx - movl 20(%esp), %ebx - jae ..B3.21 -..B3.20: - movl $1, %edx - jmp ..B3.22 -..B3.21: - xorl %edx, %edx -..B3.22: - movl %ecx, 52(%esp) - movl 24(%esp), %ecx - movl 104(%esp), %eax - addl %ecx, %eax - movl %ebx, 20(%esp) - movl 36(%esp), %ebx - adcl %ebx, %esi - movl %eax, 104(%esp) - subl %ecx, %eax - movl %esi, %ecx - sbbl %ebx, %ecx - movl 20(%esp), %ebx - movl 52(%esp), %ecx - jae ..B3.24 -..B3.23: - movl $1, %eax - jmp ..B3.25 -..B3.24: - xorl %eax, %eax -..B3.25: - addl %eax, %edx - movl %edx, 24(%esp) - movl 56(%esp), %edx - movl 16(%esp), %eax - addl %edx, %eax - movl %eax, 16(%esp) - adcl %edi, %ecx - subl %edx, %eax - movl %ecx, %edx - sbbl %edi, %edx - movl 24(%esp), %edx - jae ..B3.27 -..B3.26: - movl $1, 24(%esp) - jmp ..B3.28 -..B3.27: - movl $0, 24(%esp) -..B3.28: - movl 16(%esp), %edi - addl %edx, %edi - movl %edi, 16(%esp) - adcl $0, %ecx - subl %edx, %edi - movl $0, %edx - movl %ecx, %edi - sbbl %edx, %edi - jae ..B3.30 -..B3.29: - movl $1, %edi - jmp ..B3.31 -..B3.30: - xorl %edi, %edi -..B3.31: - xorl %eax, %eax - movl 24(%esp), %edx - addl %edi, %edx - xorl %edi, %edi - subl %edx, %edi - movl %eax, %edx - movl 72(%esp), %eax - sbbl $0, %edx - subl 104(%esp), %eax - movl 76(%esp), %eax - sbbl %esi, %eax - jae ..B3.33 -..B3.32: - movl $1, 40(%esp) - jmp ..B3.34 -..B3.33: - movl $0, 40(%esp) -..B3.34: - movl 72(%esp), %eax - subl 104(%esp), %eax - movl %eax, 36(%esp) - movl 76(%esp), %eax - sbbl %esi, %eax - movl 84(%esp), %esi - subl 16(%esp), %esi - movl 80(%esp), %esi - movl %eax, 24(%esp) - sbbl %ecx, %esi - jae ..B3.36 -..B3.35: - movl $1, %esi - jmp ..B3.37 -..B3.36: - xorl %esi, %esi -..B3.37: - subl %esi, %edi - movl 84(%esp), %esi - sbbl $0, %edx - subl 16(%esp), %esi - movl 80(%esp), %eax - movl %esi, 44(%esp) - sbbl %ecx, %eax - xorl %ecx, %ecx - subl 40(%esp), %esi - movl %eax, %esi - sbbl %ecx, %esi - jae ..B3.40 -..B3.38: - movl $1, %ecx -..B3.40: - subl %ecx, %edi - movl 44(%esp), %ecx - sbbl $0, %edx - subl 40(%esp), %ecx - sbbl $0, %eax - orl %eax, %ecx - je ..B3.42 -..B3.41: - movl $1, %esi - jmp ..B3.43 -..B3.42: - xorl %esi, %esi -..B3.43: - orl %edi, %esi - movl %esi, %ecx - movl %edx, 40(%esp) - orl %edx, %ecx - jne ..B3.46 -..B3.44: - movl 96(%esp), %edi - movl 100(%esp), %edx -..B3.46: - movl 96(%esp), %ecx - xorl %edi, %ecx - movl 100(%esp), %eax - movl 36(%esp), %edi - xorl %edx, %eax - subl %ecx, %edi - movl %ebx, 20(%esp) - movl 24(%esp), %ebx - sbbl %eax, %ebx - movl 28(%esp), %eax - mull %edi - movl 28(%esp), %eax - movl %edx, %ecx - mull %ebx - addl %eax, %ecx - movl %edi, %eax - movl %ebx, 24(%esp) - movl %edx, %ebx - adcl $0, %ebx - mull 32(%esp) - addl %ecx, %eax - adcl %ebx, %edx - subl %ecx, %eax - movl %edx, 16(%esp) - sbbl %ebx, %edx - movl 20(%esp), %ebx - jae ..B3.48 -..B3.47: - movl $1, %ecx - jmp ..B3.49 -..B3.48: - xorl %ecx, %ecx -..B3.49: - movl 24(%esp), %eax - xorl %edi, %edi - mull 32(%esp) - addl %edx, %ecx - addl 16(%esp), %eax - adcl $0, %ecx - movl %ecx, %edx - subl %edi, %edx - jl ..B3.51 -..B3.50: - xorl %edx, %edx - jmp ..B3.52 -..B3.51: - movl $1, %edx -..B3.52: - movl 84(%esp), %edi - addl %edx, %esi - movl 80(%esp), %edx - adcl $0, 40(%esp) - orl 72(%esp), %edi - orl 76(%esp), %edx - orl %edx, %edi - je ..B3.54 -..B3.53: - movl $1, %edi - jmp ..B3.55 -..B3.54: - xorl %edi, %edi -..B3.55: - movl %eax, %edx - addl %eax, %eax - shrl $31, %edx - addl %ecx, %ecx - orl %ecx, %edx - addl %edi, %eax - movl 40(%esp), %ecx - adcl $0, %edx - addl %esi, %ebx - movl %ebx, %edi - adcl %ecx, 64(%esp) - subl %esi, %edi - movl 64(%esp), %esi - sbbl %ecx, %esi - jae ..B3.57 -..B3.56: - movl $1, %ecx - jmp ..B3.58 -..B3.57: - xorl %ecx, %ecx -..B3.58: - movl 40(%esp), %esi - sarl $31, %esi - movl 68(%esp), %edi - addl %esi, %edi - addl %ecx, %edi - movl %edi, 68(%esp) -..B3.59: - movl 68(%esp), %ecx - movl %ecx, %esi - shll $31, %esi - cmpl $31, %ecx - jbe ..B3.61 -..B3.60: - movl 64(%esp), %edi - shrl %cl, %edi - movl $0, 20(%esp) - movl %edi, 24(%esp) - jmp ..B3.62 -..B3.61: - movl %ebx, %edi - movl %eax, 16(%esp) - movl 64(%esp), %eax - shrdl %cl, %eax, %edi - shrl %cl, %eax - movl %eax, 20(%esp) - movl %edi, 24(%esp) - movl 16(%esp), %eax -..B3.62: - movl 24(%ebp), %edi - orl 20(%esp), %esi - movl 24(%esp), %ecx - movl %esi, 12(%edi) - movl 68(%esp), %esi - andl %esi, %ebx - shll $31, %ebx - movl %ecx, 8(%edi) - cmpl $31, %esi - jbe ..B3.64 -..B3.63: - movl %edx, %eax - xorl %esi, %esi - movl 68(%esp), %ecx - shrl %cl, %eax - jmp ..B3.65 -..B3.64: - movl %edx, %esi - movl 68(%esp), %ecx - shrdl %cl, %edx, %eax - shrl %cl, %esi -..B3.65: - addl $4, %esp - orl %esi, %ebx - movl 24(%ebp), %ecx - lea 108(%esp), %edx - pushl %edx - movl %eax, 16(%ecx) - movl -52(%edx), %eax - addl -44(%edx), %eax - movl %ebx, 20(%ecx) - movl -20(%edx), %ebx - movl %eax, 4(%ecx) - call fesetenv@PLT -..B3.66: - movl 140(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B3.68 -..B3.67: - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B3.68: - call __stack_chk_fail@PLT -..B3.69: - movl %ebx, %eax - movl 24(%ebp), %edx - movl 8(%eax), %esi - movl 12(%eax), %edi - movl (%eax), %ecx - movl %esi, 8(%edx) - movl %edi, 12(%edx) - movl %ecx, (%edx) - movl 4(%eax), %ebx - movl 16(%eax), %ecx - movl 20(%eax), %eax - movl %ebx, 4(%edx) - movl %ecx, 16(%edx) - movl %eax, 20(%edx) - movl 140(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - je ..B3.67 -..B3.71: - movl 92(%esp), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type __dpml_divide__,@function - .size __dpml_divide__,.-__dpml_divide__ - .data -# -- End __dpml_divide__ - .text -# -- Begin __dpml_evaluate_rational__ - .text - .align 16,0x90 - .hidden __dpml_evaluate_rational__ - .globl __dpml_evaluate_rational__ -__dpml_evaluate_rational__: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -# parameter 4: 24 + %ebp -# parameter 5: 32 + %ebp -..B4.1: -..L7: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $196, %esp - movl 12(%ebp), %eax - movl %eax, 96(%esp) - xorl %eax, %eax - movl 8(%ebp), %ecx - movl %gs:20, %edx - movl 24(%ebp), %esi - xorl %esp, %edx - movl %edx, 180(%esp) - movl %esi, %edx - movl 28(%ebp), %edi - andl $68, %edx - sarl $26, %edi - addl 4(%ecx), %edi - movl %esi, 104(%esp) - orl %eax, %edx - movl %edi, 4(%ecx) - jne ..B4.3 -..B4.2: - movl 8(%ebp), %ebx - movl $136, %edx - cmpl $0, (%ebx) - jne ..L8 - movl $0, %edx -..L8: - xorl %esi, %edx - movl %edx, 104(%esp) - jmp ..B4.19 -..B4.3: - movl %edi, 56(%esp) - movl 8(%ebp), %edi - movl %esi, 88(%esp) - movl 12(%edi), %esi - movl %esi, %ebx - movl 8(%edi), %ecx - movl %ecx, %eax - imull %ecx, %ebx - mull %ecx - addl %ebx, %ebx - addl %ebx, %edx - movl 16(%edi), %ebx - movl %eax, 36(%esp) - movl %ebx, %eax - movl %edx, 40(%esp) - mull %ecx - movl 20(%edi), %edi - movl %edi, 48(%esp) - movl %edx, %edi - movl 48(%esp), %eax - mull %ecx - addl %eax, %edi - movl %esi, %eax - movl %ecx, 44(%esp) - movl %edx, %ecx - adcl $0, %ecx - mull %ebx - addl %edi, %eax - movl %esi, 32(%esp) - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 52(%esp) - movl %ebx, 64(%esp) - lea 156(%esp), %ebx - movl -68(%ebx), %esi - sbbl %ecx, %edx - movl -100(%ebx), %edi - jae ..B4.5 -..B4.4: - movl $1, %ecx - jmp ..B4.6 -..B4.5: - xorl %ecx, %ecx -..B4.6: - movl %ebx, 72(%esp) - addl %edi, %edi - movl 32(%esp), %eax - movl 48(%esp), %ebx - mull %ebx - addl %edx, %ecx - addl 52(%esp), %eax - movl %eax, 60(%esp) - adcl $0, %ecx - movl %ecx, 68(%esp) - movl 64(%esp), %ecx - movl %ecx, %eax - movl %edi, 160(%esp) - movl 44(%esp), %edi - mull %edi - movl 32(%esp), %eax - movl %esi, 88(%esp) - movl %edx, %esi - mull %ecx - addl %eax, %esi - movl %ebx, %eax - movl %edx, %ecx - adcl $0, %ecx - mull %edi - addl %esi, %eax - movl $0, 156(%esp) - adcl %ecx, %edx - subl %esi, %eax - movl %edx, 56(%esp) - movl 88(%esp), %esi - sbbl %ecx, %edx - movl 72(%esp), %ebx - movl 68(%esp), %ecx - jae ..B4.8 -..B4.7: - movl $1, %edi - jmp ..B4.9 -..B4.8: - xorl %edi, %edi -..B4.9: - movl 32(%esp), %eax - mull 48(%esp) - addl %edx, %edi - addl 56(%esp), %eax - movl %eax, 52(%esp) - adcl $0, %edi - movl %edi, 64(%esp) - movl 36(%esp), %eax - movl 60(%esp), %edi - addl %edi, %eax - movl 40(%esp), %edx - adcl %ecx, %edx - movl %eax, 36(%esp) - subl %edi, %eax - movl %edx, 40(%esp) - movl 64(%esp), %edi - sbbl %ecx, %edx - jae ..B4.11 -..B4.10: - movl $1, 48(%esp) - jmp ..B4.12 -..B4.11: - movl $0, 48(%esp) -..B4.12: - movl 32(%esp), %eax - mull 44(%esp) - movl %esi, 88(%esp) - movl %eax, %esi - movl 44(%esp), %eax - movl %edx, %ecx - mull %eax - movl %edx, %eax - movl %ecx, %edx - addl %esi, %eax - adcl $0, %edx - addl %eax, %esi - adcl %edx, %ecx - subl %eax, %esi - movl %ecx, 56(%esp) - movl 88(%esp), %esi - sbbl %edx, %ecx - jae ..B4.14 -..B4.13: - movl $1, %ecx - jmp ..B4.15 -..B4.14: - xorl %ecx, %ecx -..B4.15: - movl 32(%esp), %eax - mull %eax - addl %edx, %ecx - addl 56(%esp), %eax - movl %eax, 44(%esp) - adcl $0, %ecx - movl %ecx, 60(%esp) - movl 36(%esp), %eax - movl 52(%esp), %ecx - addl %ecx, %eax - movl 40(%esp), %edx - adcl %edi, %edx - movl %eax, 36(%esp) - subl %ecx, %eax - movl %edx, 40(%esp) - movl 60(%esp), %ecx - sbbl %edi, %edx - jae ..B4.17 -..B4.16: - movl $1, %edi - jmp ..B4.18 -..B4.17: - xorl %edi, %edi -..B4.18: - movl 48(%esp), %edx - addl %edi, %edx - movl 36(%esp), %edi - movl %edi, 172(%esp) - movl 40(%esp), %edi - movl %edi, 176(%esp) - movl 44(%esp), %edi - addl %edx, %edi - movl %edi, 164(%esp) - adcl $0, %ecx - movl %ecx, 168(%esp) -..B4.19: - addl $12, %esp - xorl %ecx, %ecx - pushl %ecx - pushl %ecx - pushl %ebx - call __dpml_ffs_and_shift__ -..B4.20: - xorl %ecx, %ecx - movl 4(%ebx), %eax - cltd - xorl %eax, %eax - movl 16(%ebp), %edi - subl %edi, %eax - sbbl 20(%ebp), %ecx - imull 4(%ebx), %ecx - imull %eax, %edx - addl %edx, %ecx - mull 4(%ebx) - addl %ecx, %edx - movl %esi, %ecx - movl %edx, 112(%esp) - andl $512, %ecx - xorl %edx, %edx - shll $4, %edi - movl %eax, 108(%esp) - orl %edx, %ecx - movl %edi, 100(%esp) - je ..B4.22 -..B4.21: - movl %esi, %ecx - andl $1024, %ecx - orl %edx, %ecx - je ..B4.23 -..B4.22: - xorl %edx, %edx - jmp ..B4.24 -..B4.23: - movl $1, %edx -..B4.24: - movl 32(%ebp), %ecx - lea (%edx,%edx,2), %edx - movl %esi, %eax - lea (,%edx,8), %edi - andl $15, %eax - lea (%ecx,%edx,8), %ecx - xorl %edx, %edx - orl %edx, %eax - call ..L9 -..L9: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L9](%edx), %edx - movl %edx, 124(%esp) - je ..B4.52 -..B4.25: - negl %edi - xorl %edx, %edx - addl 32(%ebp), %edi - movl 104(%esp), %eax - addl $24, %edi - andl $8, %eax - orl %edx, %eax - je ..B4.27 -..B4.26: - movl 124(%esp), %edx - lea __eval_neg_poly@GOTOFF(%edx), %edx - movl %edx, 32(%esp) - jmp ..B4.28 -..B4.27: - movl 124(%esp), %eax - lea __eval_pos_poly@GOTOFF(%eax), %edx - lea __eval_neg_poly@GOTOFF(%eax), %eax - movl %eax, 32(%esp) -..B4.28: - movl %esi, 88(%esp) - andl $240, %esi - xorl %eax, %eax - movl %esi, 116(%esp) - orl %esi, %eax - movl 88(%esp), %esi - jne ..B4.30 -..B4.29: - movl 32(%ebp), %ecx -..B4.30: - cmpl 32(%esp), %edx - jne ..B4.32 -..B4.31: - movl 108(%esp), %edx - movl %ebx, %eax - movl %edx, 4(%esp) - movl 112(%esp), %edx - movl %edx, 8(%esp) - movl 16(%ebp), %edx - movl %edx, 16(%esp) - movl 20(%ebp), %edx - movl %edx, 20(%esp) - movl 96(%esp), %edx - movl %ecx, 32(%esp) - call __eval_neg_poly. - jmp ..B4.153 -..B4.32: - movl 108(%esp), %edx - movl %ebx, %eax - movl %edx, 4(%esp) - movl 112(%esp), %edx - movl %edx, 8(%esp) - movl 16(%ebp), %edx - movl %edx, 16(%esp) - movl 20(%ebp), %edx - movl %edx, 20(%esp) - movl 96(%esp), %edx - movl %ecx, 32(%esp) - call __eval_pos_poly. -..B4.153: - movl 32(%esp), %ecx -..B4.33: - movl %esi, %eax - xorl %edx, %edx - andl $2, %eax - orl %edx, %eax - jne ..B4.35 -..B4.34: - movl 4(%ecx), %edx - movl %edx, 92(%esp) - jmp ..B4.51 -..B4.35: - movl 8(%ebp), %edx - movl %edi, 48(%esp) - movl %esi, 88(%esp) - movl 12(%edx), %esi - movl 12(%ecx), %edi - movl 8(%edx), %eax - movl %ebx, 72(%esp) - movl 8(%ecx), %ebx - movl %esi, 32(%esp) - movl %edi, 36(%esp) - imull %ebx, %esi - imull %eax, %edi - movl %eax, 52(%esp) - addl %edi, %esi - mull %ebx - addl %esi, %edx - movl %edx, 44(%esp) - movl 8(%ebp), %edx - movl %eax, 40(%esp) - movl %ebx, %eax - movl 8(%ebp), %edi - mull 16(%edx) - movl 16(%ecx), %esi - movl %ebx, %eax - movl %esi, 64(%esp) - movl 20(%ecx), %esi - movl 20(%edi), %edi - movl %esi, 60(%esp) - movl %edx, %esi - mull %edi - movl %ebx, 56(%esp) - addl %eax, %esi - movl 8(%ebp), %ebx - movl %edi, 84(%esp) - movl %edx, %edi - adcl $0, %edi - movl 16(%ebx), %eax - mull 36(%esp) - addl %esi, %eax - movl 72(%esp), %ebx - adcl %edi, %edx - subl %esi, %eax - movl %edx, 68(%esp) - movl 88(%esp), %esi - sbbl %edi, %edx - movl 48(%esp), %edi - jae ..B4.37 -..B4.36: - movl $1, 80(%esp) - jmp ..B4.38 -..B4.37: - movl $0, 80(%esp) -..B4.38: - movl 84(%esp), %eax - mull 36(%esp) - movl %esi, 88(%esp) - movl 80(%esp), %esi - addl %edx, %esi - addl 68(%esp), %eax - movl %edi, 48(%esp) - adcl $0, %esi - movl %esi, 80(%esp) - movl 8(%ebp), %esi - movl %eax, 76(%esp) - movl 52(%esp), %eax - movl 4(%esi), %edx - movl (%esi), %edi - addl 4(%ecx), %edx - xorl %edi, (%ecx) - movl 64(%esp), %edi - movl %edx, 92(%esp) - movl %edx, 4(%ecx) - mull %edi - movl %edi, %eax - movl %edx, %esi - mull 32(%esp) - addl %eax, %esi - movl %edx, %edi - movl 52(%esp), %eax - adcl $0, %edi - mull 60(%esp) - addl %esi, %eax - adcl %edi, %edx - subl %esi, %eax - movl %edx, 72(%esp) - movl 88(%esp), %esi - sbbl %edi, %edx - movl 48(%esp), %edi - jae ..B4.40 -..B4.39: - movl $1, 68(%esp) - jmp ..B4.41 -..B4.40: - movl $0, 68(%esp) -..B4.41: - movl 60(%esp), %eax - mull 32(%esp) - movl %esi, 88(%esp) - movl 68(%esp), %esi - addl %edx, %esi - addl 72(%esp), %eax - movl %eax, 64(%esp) - adcl $0, %esi - movl %esi, 68(%esp) - movl 76(%esp), %esi - movl 40(%esp), %eax - addl %esi, %eax - movl %edi, 48(%esp) - movl 44(%esp), %edi - movl 80(%esp), %edx - adcl %edx, %edi - movl %eax, 40(%esp) - subl %esi, %eax - movl %edi, 44(%esp) - movl 88(%esp), %esi - sbbl %edx, %edi - movl 48(%esp), %edi - jae ..B4.43 -..B4.42: - movl $1, 72(%esp) - jmp ..B4.44 -..B4.43: - movl $0, 72(%esp) -..B4.44: - movl %edi, 48(%esp) - movl 56(%esp), %edi - movl %edi, %eax - mull 52(%esp) - movl %edi, %eax - movl %esi, 88(%esp) - movl %edx, %esi - mull 32(%esp) - addl %eax, %esi - movl %edx, %edi - movl 52(%esp), %eax - adcl $0, %edi - mull 36(%esp) - addl %esi, %eax - adcl %edi, %edx - subl %esi, %eax - movl %edx, 60(%esp) - movl 88(%esp), %esi - sbbl %edi, %edx - movl 48(%esp), %edi - jae ..B4.46 -..B4.45: - movl $1, 56(%esp) - jmp ..B4.47 -..B4.46: - movl $0, 56(%esp) -..B4.47: - movl 32(%esp), %eax - mull 36(%esp) - movl %esi, 88(%esp) - movl 56(%esp), %esi - addl %edx, %esi - addl 60(%esp), %eax - movl %eax, 52(%esp) - adcl $0, %esi - movl %esi, 56(%esp) - movl 64(%esp), %esi - movl 40(%esp), %eax - addl %esi, %eax - movl %edi, 48(%esp) - movl 44(%esp), %edi - movl 68(%esp), %edx - adcl %edx, %edi - movl %eax, 40(%esp) - subl %esi, %eax - movl %edi, 44(%esp) - movl 88(%esp), %esi - sbbl %edx, %edi - movl 48(%esp), %edi - jae ..B4.49 -..B4.48: - movl $1, %edx - jmp ..B4.50 -..B4.49: - xorl %edx, %edx -..B4.50: - movl 72(%esp), %eax - addl %edx, %eax - movl 40(%esp), %edx - movl %edx, 16(%ecx) - movl 44(%esp), %edx - movl %edx, 20(%ecx) - movl 52(%esp), %edx - addl %eax, %edx - movl 56(%esp), %eax - adcl $0, %eax - movl %edx, 8(%ecx) - movl %eax, 12(%ecx) -..B4.51: - movl 96(%esp), %edx - movl 100(%esp), %eax - lea 24(%edx,%eax), %edx - movl 92(%esp), %eax - addl -8(%edx), %eax - movl %edx, 96(%esp) - movl %eax, 4(%ecx) - jmp ..B4.54 -..B4.52: - orl $-1792, %esi - movl %esi, %edx - movl %esi, %eax - andl $240, %edx - andl $1024, %eax - movl %edx, 116(%esp) - xorl %edx, %edx - movl 32(%ebp), %edi - orl %edx, %eax - je ..B4.54 -..B4.53: - movl 96(%esp), %edx - movl 100(%esp), %eax - lea 24(%edx,%eax), %edx - movl %edx, 96(%esp) -..B4.54: - xorl %edx, %edx - movl 116(%esp), %eax - orl %edx, %eax - je ..B4.82 -..B4.55: - movl 104(%esp), %eax - andl $128, %eax - orl %edx, %eax - je ..B4.57 -..B4.56: - movl 124(%esp), %edx - lea __eval_neg_poly@GOTOFF(%edx), %eax - movl %eax, %edx - jmp ..B4.58 -..B4.57: - movl 124(%esp), %edx - lea __eval_pos_poly@GOTOFF(%edx), %eax - lea __eval_neg_poly@GOTOFF(%edx), %edx -..B4.58: - cmpl %edx, %eax - jne ..B4.60 -..B4.59: - movl 108(%esp), %edx - movl %ebx, %eax - movl %edx, 4(%esp) - movl %edi, %ecx - movl 112(%esp), %edx - movl %edx, 8(%esp) - movl 16(%ebp), %edx - movl %edx, 16(%esp) - movl 20(%ebp), %edx - movl %edx, 20(%esp) - movl 96(%esp), %edx - call __eval_neg_poly. - jmp ..B4.61 -..B4.60: - movl 108(%esp), %edx - movl %ebx, %eax - movl %edx, 4(%esp) - movl %edi, %ecx - movl 112(%esp), %edx - movl %edx, 8(%esp) - movl 16(%ebp), %edx - movl %edx, 16(%esp) - movl 20(%ebp), %edx - movl %edx, 20(%esp) - movl 96(%esp), %edx - call __eval_pos_poly. -..B4.61: - movl %esi, %edx - xorl %eax, %eax - andl $32, %edx - orl %eax, %edx - jne ..B4.63 -..B4.62: - movl 4(%edi), %ebx - jmp ..B4.79 -..B4.63: - movl 8(%ebp), %ebx - movl %esi, 88(%esp) - movl 12(%edi), %edx - movl 12(%ebx), %esi - movl 8(%ebx), %eax - movl 8(%edi), %ebx - movl %esi, 32(%esp) - movl %edx, 36(%esp) - imull %ebx, %esi - imull %eax, %edx - movl %eax, 48(%esp) - addl %edx, %esi - mull %ebx - addl %esi, %edx - movl %edx, 44(%esp) - movl 8(%ebp), %edx - movl %eax, 40(%esp) - movl %ebx, %eax - movl 8(%ebp), %esi - mull 16(%edx) - movl 20(%esi), %ecx - movl %ebx, %eax - movl 16(%edi), %esi - movl %esi, 68(%esp) - movl 20(%edi), %esi - movl %esi, 56(%esp) - movl %edx, %esi - mull %ecx - movl %ebx, 52(%esp) - movl %edx, %ebx - movl 8(%ebp), %edx - addl %eax, %esi - movl %ecx, 76(%esp) - adcl $0, %ebx - movl 16(%edx), %eax - mull 36(%esp) - addl %esi, %eax - adcl %ebx, %edx - subl %esi, %eax - movl %edx, 72(%esp) - movl 88(%esp), %esi - sbbl %ebx, %edx - jae ..B4.65 -..B4.64: - movl $1, %ecx - jmp ..B4.66 -..B4.65: - xorl %ecx, %ecx -..B4.66: - movl 76(%esp), %eax - mull 36(%esp) - addl %edx, %ecx - addl 72(%esp), %eax - movl %eax, 64(%esp) - movl 8(%ebp), %eax - adcl $0, %ecx - movl %ecx, 80(%esp) - movl 68(%esp), %ecx - movl 4(%eax), %edx - addl 4(%edi), %edx - movl (%eax), %ebx - movl 48(%esp), %eax - movl %edx, 84(%esp) - movl %edx, 4(%edi) - mull %ecx - movl %ecx, %eax - xorl %ebx, (%edi) - movl %edx, %ebx - mull 32(%esp) - addl %eax, %ebx - movl %edx, %ecx - movl 48(%esp), %eax - adcl $0, %ecx - mull 56(%esp) - addl %ebx, %eax - adcl %ecx, %edx - subl %ebx, %eax - movl %edx, 60(%esp) - movl 84(%esp), %ebx - sbbl %ecx, %edx - movl 80(%esp), %ecx - jae ..B4.68 -..B4.67: - movl $1, 72(%esp) - jmp ..B4.69 -..B4.68: - movl $0, 72(%esp) -..B4.69: - movl 56(%esp), %eax - mull 32(%esp) - movl %esi, 88(%esp) - movl 72(%esp), %esi - addl %edx, %esi - addl 60(%esp), %eax - movl %eax, 68(%esp) - adcl $0, %esi - movl %esi, 72(%esp) - movl 40(%esp), %eax - movl 64(%esp), %esi - addl %esi, %eax - movl 44(%esp), %edx - adcl %ecx, %edx - movl %eax, 40(%esp) - subl %esi, %eax - movl %edx, 44(%esp) - movl 88(%esp), %esi - sbbl %ecx, %edx - jae ..B4.71 -..B4.70: - movl $1, 60(%esp) - jmp ..B4.72 -..B4.71: - movl $0, 60(%esp) -..B4.72: - movl 52(%esp), %ecx - movl %ecx, %eax - mull 48(%esp) - movl %ecx, %eax - movl %esi, 88(%esp) - movl %edx, %esi - mull 32(%esp) - addl %eax, %esi - movl %edx, %ecx - movl 48(%esp), %eax - adcl $0, %ecx - mull 36(%esp) - addl %esi, %eax - adcl %ecx, %edx - subl %esi, %eax - movl %edx, 56(%esp) - movl 88(%esp), %esi - sbbl %ecx, %edx - jae ..B4.74 -..B4.73: - movl $1, %ecx - jmp ..B4.75 -..B4.74: - xorl %ecx, %ecx -..B4.75: - movl 32(%esp), %eax - mull 36(%esp) - addl %edx, %ecx - addl 56(%esp), %eax - movl %esi, 88(%esp) - adcl $0, %ecx - movl %ecx, 52(%esp) - movl 68(%esp), %esi - movl 40(%esp), %ecx - addl %esi, %ecx - movl %eax, 48(%esp) - movl 44(%esp), %edx - movl 72(%esp), %eax - adcl %eax, %edx - movl %ecx, 40(%esp) - subl %esi, %ecx - movl %edx, 44(%esp) - movl 52(%esp), %ecx - sbbl %eax, %edx - movl 88(%esp), %esi - jae ..B4.77 -..B4.76: - movl $1, %edx - jmp ..B4.78 -..B4.77: - xorl %edx, %edx -..B4.78: - movl 60(%esp), %eax - addl %edx, %eax - movl 40(%esp), %edx - movl %edx, 16(%edi) - movl 44(%esp), %edx - movl %edx, 20(%edi) - movl 48(%esp), %edx - addl %eax, %edx - movl %edx, 8(%edi) - adcl $0, %ecx - movl %ecx, 12(%edi) -..B4.79: - movl 96(%esp), %edx - xorl %ecx, %ecx - movl 100(%esp), %eax - addl 16(%eax,%edx), %ebx - movl %ebx, 4(%edi) - movl %esi, %ebx - andl $1024, %ebx - orl %ecx, %ebx - je ..B4.83 -..B4.80: - movl 180(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B4.148 -..B4.81: - addl $196, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B4.82: - orl $-256, %esi -..B4.83: - andl $256, %esi - xorl %eax, %eax - orl %eax, %esi - jne ..B4.146 -..B4.84: - movl 124(%esp), %eax - movl 32(%ebp), %ecx - movl %ecx, %edi - addl $24, %edi - lea __ux_one__@GOTOFF(%eax), %edx - jne ..L10 - movl %edx, %edi -..L10: - testl %ecx, %ecx - movl 12(%edi), %esi - jne ..L11 - movl %edx, %ecx -..L11: - movl 8(%edi), %ebx - cmpl %edx, %edi - movl 16(%edi), %eax - movl %esi, 112(%esp) - movl %ecx, 120(%esp) - movl %ebx, 108(%esp) - movl %eax, 116(%esp) - movl 20(%edi), %esi - je ..B4.150 -..B4.85: - xorl %edx, %edx - movl 112(%esp), %ecx - subl %edx, %ecx - jl ..B4.88 -..B4.86: - addl $12, %esp - pushl %edx - pushl %edx - pushl %edi - call __dpml_ffs_and_shift__ -..B4.87: - movl 8(%edi), %eax - movl 12(%edi), %edx - movl 16(%edi), %ecx - movl 20(%edi), %esi - movl %eax, 108(%esp) - movl %edx, 112(%esp) - movl %ecx, 116(%esp) -..B4.88: - addl $4, %esp - lea 124(%esp), %edx - pushl %edx - movl -4(%edx), %ebx - call fegetenv@PLT -..B4.89: - movl %esi, 72(%esp) - movl 112(%esp), %esi - movl %esi, %eax - movl 108(%esp), %ecx - movl %ecx, %edx - movl %edi, 44(%esp) - movl %esi, %edi - shll $31, %eax - shrl $1, %edx - shrl $1, %edi - orl %edx, %eax - movl %eax, 48(%esp) - movl %esi, %eax - movl %edi, 52(%esp) - andl $-64, %eax - fildll 48(%esp) - andl $63, %esi - fstpl 64(%esp) - xorl %edx, %edx - fldl 64(%esp) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fdiv %st, %st(1) - shrl $1, %eax - movl %eax, 52(%esp) - movl %ecx, %eax - movl 120(%esp), %edi - shrl $17, %eax - shll $15, %esi - movl %edx, 48(%esp) - orl %esi, %eax - movl 72(%esp), %esi - shll $15, %ecx - shrl $17, %esi - orl %esi, %ecx - movl 12(%edi), %esi - movl %esi, 88(%esp) - fxch %st(1) - fstpl 64(%esp) - fldl 64(%esp) - movl (%edi), %esi - fld %st(0) - fildll 48(%esp) - movl %eax, 52(%esp) - movl %ecx, 48(%esp) - movl 8(%edi), %eax - movl 16(%edi), %ecx - movl %eax, 92(%esp) - movl %ecx, 80(%esp) - movl 20(%edi), %eax - movl 44(%esp), %ecx - movl %eax, 84(%esp) - movl 32(%ebp), %eax - xorl (%ecx), %esi - fstpl 64(%esp) - fldl 64(%esp) - fildll 48(%esp) - movl %esi, (%eax) - fstpl 64(%esp) - fxch %st(1) - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 56(%esp) - fldcw 32(%esp) - movl %edx, 48(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fldl 64(%esp) - movl 56(%esp), %eax - addl $-1280, %eax - movl 60(%esp), %esi - adcl $-1, %esi - fmul %st(1), %st - andl $-16, %esi - movl %esi, 52(%esp) - fstpl 64(%esp) - fldl 64(%esp) - fildll 48(%esp) - fstpl 64(%esp) - fldl 64(%esp) - fmul %st, %st(3) - movl 4(%edi), %edi - fxch %st(3) - fsubrp %st, %st(5) - fmul %st(2), %st - movl %esi, 96(%esp) - fsubrp %st, %st(4) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - movl 88(%esp), %eax - movl %eax, %ebx - movl 92(%esp), %esi - subl 4(%ecx), %edi - movl %esi, %ecx - shll $21, %ebx - shrl $11, %ecx - fmulp %st, %st(3) - orl %ecx, %ebx - movl %edi, 100(%esp) - movl %eax, %edi - shrl $1, %edi - movl %ebx, %ecx - shrl $22, %ecx - andl $-1024, %edi - shll $10, %ebx - orl %edi, %ecx - movl %ebx, 48(%esp) - movl %eax, %ebx - movl %ecx, 52(%esp) - andl $-64, %ebx - fxch %st(2) - fmulp %st, %st(3) - andl $63, %eax - shrl $1, %ebx - movl 84(%esp), %ecx - shll $15, %eax - shrl $17, %ecx - fxch %st(2) - fstpl 64(%esp) - fldl 64(%esp) - fildll 48(%esp) - movl %edx, 48(%esp) - movl %esi, %edx - movl %ebx, 52(%esp) - shrl $17, %edx - shll $15, %esi - orl %eax, %edx - orl %ecx, %esi - fstpl 64(%esp) - fldl 64(%esp) - movl 124(%esp), %eax - fmul %st(1), %st - fildll 48(%esp) - movl %esi, 48(%esp) - movl %edx, 52(%esp) - fstpl 64(%esp) - fldl 64(%esp) - fildll 48(%esp) - fstpl 64(%esp) - fldl 64(%esp) - fmulp %st, %st(4) - fxch %st(3) - fstpl 64(%esp) - fldl 64(%esp) - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - fmulp %st, %st(5) - fxch %st(4) - fstpl 64(%esp) - fldl 64(%esp) - fmul %st, %st(3) - fxch %st(3) - fstpl 64(%esp) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldl 64(%esp) - fxch %st(2) - fstpl 64(%esp) - fldl 64(%esp) - fldt .L_2il0floatpacket.4@GOTOFF(%eax) - fmulp %st, %st(3) - fxch %st(2) - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 56(%esp) - fldcw 32(%esp) - movl 56(%esp), %ebx - movl %ebx, %edx - movl 60(%esp), %ecx - movl %ecx, %edi - fxch %st(1) - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 56(%esp) - fldcw 32(%esp) - shrl $30, %edx - shll $2, %ebx - shll $2, %ecx - movl 56(%esp), %esi - orl %ecx, %edx - addl %esi, %ebx - movl %ebx, %ecx - movl 60(%esp), %eax - adcl %eax, %edx - shrl $30, %edi - subl %esi, %ecx - movl %edx, 76(%esp) - movl %edi, 104(%esp) - sbbl %eax, %edx - movl 72(%esp), %esi - movl 96(%esp), %edx - jae ..B4.91 -..B4.90: - movl $1, %ecx - jmp ..B4.92 -..B4.91: - xorl %ecx, %ecx -..B4.92: - addl %ecx, 104(%esp) - movl 124(%esp), %ecx - fldt .L_2il0floatpacket.5@GOTOFF(%ecx) - fmulp %st, %st(1) - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 56(%esp) - fldcw 32(%esp) - movl 60(%esp), %edi - movl 56(%esp), %ecx - movl %ecx, 44(%esp) - lea (%edi,%edx,4), %edx - movl %edx, 48(%esp) - orl %edx, %ecx - jne ..B4.94 -..B4.93: - movl $-1, %edx - movl %edx, 44(%esp) - movl %edx, 48(%esp) -..B4.94: - movl %ebx, %eax - xorl %edi, %edi - mull 116(%esp) - xorl %ecx, %ecx - movl %ebx, %eax - subl 104(%esp), %ecx - movl %ecx, 32(%esp) - movl %edx, %ecx - sbbl $0, %edi - mull %esi - addl %eax, %ecx - movl 116(%esp), %eax - movl %edi, 68(%esp) - movl %edx, %edi - adcl $0, %edi - mull 76(%esp) - addl %ecx, %eax - adcl %edi, %edx - subl %ecx, %eax - movl %edx, 36(%esp) - movl 68(%esp), %ecx - sbbl %edi, %edx - jae ..B4.96 -..B4.95: - movl $1, 64(%esp) - jmp ..B4.97 -..B4.96: - movl $0, 64(%esp) -..B4.97: - movl %esi, %eax - movl %esi, 72(%esp) - movl 76(%esp), %esi - mull %esi - movl %ecx, 68(%esp) - movl 64(%esp), %ecx - addl %edx, %ecx - movl %esi, %edx - addl 36(%esp), %eax - movl 108(%esp), %esi - adcl $0, %ecx - movl %ecx, 64(%esp) - movl 112(%esp), %ecx - movl %ecx, %edi - imull %ebx, %edi - imull %esi, %edx - movl %eax, 60(%esp) - movl %esi, %eax - addl %edx, %edi - mull %ebx - movl %eax, 40(%esp) - movl %ebx, %eax - addl %edi, %edx - movl %edx, 52(%esp) - mull %esi - movl %ebx, %eax - movl %edx, %edi - mull %ecx - addl %eax, %edi - movl %esi, %eax - movl %edx, %ecx - adcl $0, %ecx - mull 76(%esp) - addl %edi, %eax - movl 72(%esp), %esi - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 56(%esp) - sbbl %ecx, %edx - movl 68(%esp), %ecx - jae ..B4.99 -..B4.98: - movl $1, %edi - jmp ..B4.100 -..B4.99: - xorl %edi, %edi -..B4.100: - movl %ebx, 36(%esp) - andl %ecx, %esi - movl 112(%esp), %ebx - movl %ebx, %eax - mull 76(%esp) - addl %edx, %edi - andl %ebx, %ecx - addl 56(%esp), %eax - movl %eax, 72(%esp) - movl 116(%esp), %edx - adcl $0, %edi - movl 32(%esp), %eax - andl %eax, %edx - movl 60(%esp), %ebx - andl 108(%esp), %eax - addl %ebx, %edx - movl %eax, 32(%esp) - movl 64(%esp), %eax - adcl %eax, %esi - movl %edx, 116(%esp) - subl %ebx, %edx - movl %esi, %ebx - sbbl %eax, %ebx - movl 36(%esp), %ebx - jae ..B4.102 -..B4.101: - movl $1, %edx - jmp ..B4.103 -..B4.102: - xorl %edx, %edx -..B4.103: - movl %ecx, 68(%esp) - movl 40(%esp), %ecx - movl 116(%esp), %eax - addl %ecx, %eax - movl %ebx, 36(%esp) - movl 52(%esp), %ebx - adcl %ebx, %esi - movl %eax, 116(%esp) - subl %ecx, %eax - movl %esi, %ecx - sbbl %ebx, %ecx - movl 36(%esp), %ebx - movl 68(%esp), %ecx - jae ..B4.105 -..B4.104: - movl $1, %eax - jmp ..B4.106 -..B4.105: - xorl %eax, %eax -..B4.106: - addl %eax, %edx - movl %edx, 40(%esp) - movl 72(%esp), %edx - movl 32(%esp), %eax - addl %edx, %eax - movl %eax, 32(%esp) - adcl %edi, %ecx - subl %edx, %eax - movl %ecx, %edx - sbbl %edi, %edx - movl 40(%esp), %edx - jae ..B4.108 -..B4.107: - movl $1, 40(%esp) - jmp ..B4.109 -..B4.108: - movl $0, 40(%esp) -..B4.109: - movl 32(%esp), %edi - addl %edx, %edi - movl %edi, 32(%esp) - adcl $0, %ecx - subl %edx, %edi - movl $0, %edx - movl %ecx, %edi - sbbl %edx, %edi - jae ..B4.111 -..B4.110: - movl $1, %edi - jmp ..B4.112 -..B4.111: - xorl %edi, %edi -..B4.112: - xorl %eax, %eax - movl 40(%esp), %edx - addl %edi, %edx - xorl %edi, %edi - subl %edx, %edi - movl %eax, %edx - movl 80(%esp), %eax - sbbl $0, %edx - subl 116(%esp), %eax - movl 84(%esp), %eax - sbbl %esi, %eax - jae ..B4.114 -..B4.113: - movl $1, 56(%esp) - jmp ..B4.115 -..B4.114: - movl $0, 56(%esp) -..B4.115: - movl 80(%esp), %eax - subl 116(%esp), %eax - movl %eax, 52(%esp) - movl 84(%esp), %eax - sbbl %esi, %eax - movl 92(%esp), %esi - subl 32(%esp), %esi - movl 88(%esp), %esi - movl %eax, 40(%esp) - sbbl %ecx, %esi - jae ..B4.117 -..B4.116: - movl $1, %esi - jmp ..B4.118 -..B4.117: - xorl %esi, %esi -..B4.118: - subl %esi, %edi - movl 92(%esp), %esi - sbbl $0, %edx - subl 32(%esp), %esi - movl 88(%esp), %eax - sbbl %ecx, %eax - movl %esi, %ecx - subl 56(%esp), %ecx - movl $0, %ecx - movl %eax, 60(%esp) - sbbl %ecx, %eax - jae ..B4.121 -..B4.119: - movl $1, %ecx -..B4.121: - subl %ecx, %edi - movl 60(%esp), %ecx - sbbl $0, %edx - subl 56(%esp), %esi - sbbl $0, %ecx - orl %ecx, %esi - je ..B4.123 -..B4.122: - movl $1, %ecx - jmp ..B4.124 -..B4.123: - xorl %ecx, %ecx -..B4.124: - orl %edi, %ecx - movl %ecx, %esi - movl %edx, 56(%esp) - orl %edx, %esi - jne ..B4.127 -..B4.125: - movl 108(%esp), %edi - movl 112(%esp), %edx -..B4.127: - movl %ebx, 36(%esp) - movl 108(%esp), %ebx - xorl %edi, %ebx - movl 112(%esp), %eax - movl 52(%esp), %edi - xorl %edx, %eax - subl %ebx, %edi - movl 40(%esp), %esi - sbbl %eax, %esi - movl 44(%esp), %eax - mull %edi - movl 44(%esp), %eax - movl %edx, %ebx - mull %esi - addl %eax, %ebx - movl %edi, %eax - movl %esi, 40(%esp) - movl %edx, %esi - adcl $0, %esi - mull 48(%esp) - addl %ebx, %eax - adcl %esi, %edx - subl %ebx, %eax - movl %edx, 32(%esp) - movl 36(%esp), %ebx - sbbl %esi, %edx - jae ..B4.129 -..B4.128: - movl $1, %esi - jmp ..B4.130 -..B4.129: - xorl %esi, %esi -..B4.130: - movl 40(%esp), %eax - xorl %edi, %edi - mull 48(%esp) - addl %edx, %esi - addl 32(%esp), %eax - adcl $0, %esi - movl %esi, %edx - subl %edi, %edx - jl ..B4.132 -..B4.131: - xorl %edx, %edx - jmp ..B4.133 -..B4.132: - movl $1, %edx -..B4.133: - movl 92(%esp), %edi - addl %edx, %ecx - movl 88(%esp), %edx - adcl $0, 56(%esp) - orl 80(%esp), %edi - orl 84(%esp), %edx - orl %edx, %edi - je ..B4.135 -..B4.134: - movl $1, %edx - jmp ..B4.136 -..B4.135: - xorl %edx, %edx -..B4.136: - movl %eax, %edi - addl %eax, %eax - shrl $31, %edi - addl %esi, %esi - orl %esi, %edi - addl %edx, %eax - movl 56(%esp), %edx - adcl $0, %edi - addl %ecx, %ebx - movl %ebx, %esi - movl %edi, 32(%esp) - movl 76(%esp), %edi - adcl %edx, %edi - subl %ecx, %esi - movl %edi, 76(%esp) - sbbl %edx, %edi - jae ..B4.138 -..B4.137: - movl $1, %edx - jmp ..B4.139 -..B4.138: - xorl %edx, %edx -..B4.139: - movl 56(%esp), %edi - sarl $31, %edi - movl 104(%esp), %ecx - addl %edi, %ecx - addl %edx, %ecx - movl %ecx, %edi - shll $31, %edi - movl %ecx, 104(%esp) - cmpl $31, %ecx - jbe ..B4.141 -..B4.140: - xorl %edx, %edx - movl 76(%esp), %esi - shrl %cl, %esi - jmp ..B4.142 -..B4.141: - movl %ebx, %esi - movl 76(%esp), %edx - shrdl %cl, %edx, %esi - shrl %cl, %edx -..B4.142: - orl %edx, %edi - movl 32(%ebp), %edx - andl %ecx, %ebx - shll $31, %ebx - movl %esi, 8(%edx) - cmpl $31, %ecx - movl %edi, 12(%edx) - jbe ..B4.144 -..B4.143: - xorl %edx, %edx - movl 32(%esp), %eax - shrl %cl, %eax - jmp ..B4.145 -..B4.144: - movl 32(%esp), %edx - shrdl %cl, %edx, %eax - shrl %cl, %edx -..B4.145: - addl $4, %esp - orl %edx, %ebx - movl 32(%ebp), %edx - lea 124(%esp), %ecx - pushl %ecx - movl %eax, 16(%edx) - movl -28(%ecx), %eax - addl -24(%ecx), %eax - movl %ebx, 20(%edx) - movl -4(%ecx), %ebx - movl %eax, 4(%edx) - call fesetenv@PLT -..B4.146: - movl 180(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B4.148 -..B4.147: - addl $196, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B4.148: - movl 124(%esp), %ebx - call __stack_chk_fail@PLT -..B4.150: - movl %ecx, %eax - movl 32(%ebp), %edx - movl 8(%eax), %esi - movl 12(%eax), %edi - movl (%eax), %ecx - movl %esi, 8(%edx) - movl %edi, 12(%edx) - movl %ecx, (%edx) - movl 4(%eax), %ebx - movl 16(%eax), %ecx - movl 20(%eax), %eax - movl %ebx, 4(%edx) - movl %ecx, 16(%edx) - movl %eax, 20(%edx) - jmp ..B4.146 - .align 16,0x90 - .type __dpml_evaluate_rational__,@function - .size __dpml_evaluate_rational__,.-__dpml_evaluate_rational__ - .data -# -- End __dpml_evaluate_rational__ - .text -# -- Begin __eval_neg_poly - .text - .align 16,0x90 -__eval_neg_poly: -# parameter 1: %eax -# parameter 2: 148 + %esp -# parameter 3: %edx -# parameter 4: 160 + %esp -# parameter 5: %ecx -..B5.1: -..L12: - - movl 4(%esp), %eax - movl 16(%esp), %edx - movl 28(%esp), %ecx -__eval_neg_poly.: - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $124, %esp - movl %edx, 88(%esp) - movl 8(%eax), %edx - movl %edx, 72(%esp) - movl 12(%eax), %edx - movl %edx, 80(%esp) - movl 16(%eax), %edx - movl %edx, 76(%esp) - movl 20(%eax), %edx - movl 4(%eax), %eax - movl 164(%esp), %esi - movl %edx, 92(%esp) - cltd - movl 160(%esp), %edi - movl %esi, 96(%esp) - xorl %esi, %esi - movl %edi, 84(%esp) - movl %edx, %edi - xorl %edx, %edx - subl %eax, %edx - movl 148(%esp), %ebx - sbbl %edi, %esi - movl %ecx, (%esp) - movl %ebx, %ecx - movl %esi, 4(%esp) - movl $128, %esi - subl %esi, %ecx - movl $0, %esi - movl 152(%esp), %ebp - movl %ebp, %ecx - sbbl %esi, %ecx - jge ..B5.4 -..B5.2: - movl $1, %esi -..B5.4: - testl %esi, %esi - jne ..B5.8 -..B5.5: - movl %edx, 16(%esp) - movl %eax, 64(%esp) - movl %edi, 68(%esp) - movl 96(%esp), %edx - movl 84(%esp), %esi - movl 88(%esp), %eax -..B5.6: - addl 64(%esp), %ebx - movl %ebx, %ecx - adcl 68(%esp), %ebp - movl $128, %edi - addl $-1, %esi - adcl $-1, %edx - addl $16, %eax - subl %edi, %ecx - movl $0, %edi - movl %ebp, %ecx - sbbl %edi, %ecx - jge ..B5.6 -..B5.7: - movl %edx, 96(%esp) - movl %eax, 88(%esp) - movl %esi, 84(%esp) - movl 16(%esp), %edx - movl 68(%esp), %edi - movl 64(%esp), %eax -..B5.8: - movl $64, %esi - movl %ebx, %ecx - subl %esi, %ecx - movl $0, %esi - movl %ebp, %ecx - sbbl %esi, %ecx - jge ..B5.11 -..B5.9: - movl $1, %esi -..B5.11: - testl %esi, %esi - je ..B5.13 -..B5.12: - xorl %esi, %esi - movl %esi, 100(%esp) - movl %esi, 104(%esp) - jmp ..B5.28 -..B5.13: - movl %edi, 68(%esp) - movl %edx, 16(%esp) - movl %eax, 64(%esp) - movl 96(%esp), %esi - movl 88(%esp), %edi -..B5.14: - movl 8(%edi), %edx - lea -64(%ebx), %ecx - movl 12(%edi), %eax - cmpl $31, %ecx - jbe ..B5.16 -..B5.15: - movl %eax, %edx - movl $0, 104(%esp) - shrl %cl, %edx - jmp ..B5.17 -..B5.16: - shrdl %cl, %eax, %edx - shrl %cl, %eax - movl %eax, 104(%esp) -..B5.17: - addl 64(%esp), %ebx - movl %ebx, %ecx - adcl 68(%esp), %ebp - movl $64, %eax - addl $16, %edi - addl $-1, 84(%esp) - adcl $-1, %esi - subl %eax, %ecx - movl $0, %eax - movl %ebp, %ecx - sbbl %eax, %ecx - jl ..B5.102 -..B5.18: - movl %edx, %eax - orl 104(%esp), %eax - je ..B5.14 -..B5.19: - movl %edx, 100(%esp) - movl %edi, 88(%esp) - movl %esi, 96(%esp) - movl 16(%esp), %edx - movl 104(%esp), %esi - movl 100(%esp), %edi - movl %ebp, 36(%esp) -..B5.20: - movl 72(%esp), %eax - mull %edi - movl %edi, %eax - movl %edx, %ebp - mull 80(%esp) - addl %eax, %ebp - movl %edx, %ecx - movl 72(%esp), %eax - adcl $0, %ecx - mull %esi - addl %ebp, %eax - movl %edx, %edi - adcl %ecx, %edi - subl %ebp, %eax - movl %edi, %edx - sbbl %ecx, %edx - jae ..B5.22 -..B5.21: - movl $1, %ebp - jmp ..B5.23 -..B5.22: - xorl %ebp, %ebp -..B5.23: - movl 80(%esp), %eax - lea -64(%ebx), %ecx - mull %esi - movl 88(%esp), %esi - addl %edx, %ebp - addl %edi, %eax - adcl $0, %ebp - movl 8(%esi), %edi - cmpl $31, %ecx - movl 12(%esi), %edx - jbe ..B5.25 -..B5.24: - movl %edx, %edi - xorl %esi, %esi - shrl %cl, %edi - jmp ..B5.26 -..B5.25: - movl %edx, %esi - shrdl %cl, %edx, %edi - shrl %cl, %esi -..B5.26: - addl 64(%esp), %ebx - movl 36(%esp), %edx - adcl 68(%esp), %edx - addl $-1, 84(%esp) - movl %edx, 36(%esp) - adcl $-1, 96(%esp) - subl %eax, %edi - movl %ebx, %eax - sbbl %ebp, %esi - movl $64, %ebp - addl $16, 88(%esp) - subl %ebp, %eax - movl $0, %ebp - sbbl %ebp, %edx - jge ..B5.20 -..B5.27: - movl %edi, 100(%esp) - movl %esi, 104(%esp) - movl 36(%esp), %ebp - movl 16(%esp), %edx - movl 68(%esp), %edi - movl 64(%esp), %eax -..B5.28: - xorl %ecx, %ecx - xorl %esi, %esi - subl %ebx, %esi - movl %esi, 8(%esp) - movl %ebx, %esi - sbbl %ebp, %ecx - movl %ecx, 12(%esp) - orl %ebp, %esi - jne ..B5.30 -..B5.29: - xorl %edx, %edx - xorl %esi, %esi - jmp ..B5.78 -..B5.30: - movl %ebp, 36(%esp) - movl %edx, 16(%esp) - movl %edi, 68(%esp) - movl %eax, 64(%esp) -..B5.31: - movl 72(%esp), %esi - movl %esi, %eax - movl 100(%esp), %ebp - mull %ebp - movl %ebp, %eax - movl %edx, %edi - mull 80(%esp) - addl %eax, %edi - movl %esi, %eax - movl %edx, %ebp - adcl $0, %ebp - mull 104(%esp) - addl %edi, %eax - movl %edx, %esi - adcl %ebp, %esi - subl %edi, %eax - movl %esi, %eax - sbbl %ebp, %eax - jae ..B5.33 -..B5.32: - movl $1, %ebp - jmp ..B5.34 -..B5.33: - xorl %ebp, %ebp -..B5.34: - movl 104(%esp), %eax - mull 80(%esp) - movl 88(%esp), %edi - addl %edx, %ebp - addl %esi, %eax - movl %eax, 32(%esp) - movl 12(%edi), %esi - adcl $0, %ebp - movl %esi, 20(%esp) - cmpl $31, %ebx - movl 8(%edi), %edx - movl (%edi), %eax - movl 4(%edi), %esi - jbe ..B5.36 -..B5.35: - movl %ebx, %ecx - movl %esi, %eax - shrl %cl, %eax - xorl %edi, %edi - jmp ..B5.37 -..B5.36: - movl %ebx, %ecx - movl %esi, %edi - shrdl %cl, %esi, %eax - shrl %cl, %edi -..B5.37: - movl 8(%esp), %esi - lea 64(%esi), %ecx - cmpl $31, %ecx - jbe ..B5.39 -..B5.38: - movl %edx, %esi - shll %cl, %esi - movl $0, 24(%esp) - movl %esi, 28(%esp) - jmp ..B5.40 -..B5.39: - movl 20(%esp), %esi - shldl %cl, %edx, %esi - movl %esi, 28(%esp) - movl %edx, %esi - shll %cl, %esi - movl %esi, 24(%esp) -..B5.40: - orl 24(%esp), %eax - orl 28(%esp), %edi - cmpl $31, %ebx - jbe ..B5.42 -..B5.41: - movl %ebx, %ecx - xorl %esi, %esi - movl 20(%esp), %edx - shrl %cl, %edx - jmp ..B5.43 -..B5.42: - movl %ebx, %ecx - movl 20(%esp), %esi - shrdl %cl, %esi, %edx - shrl %cl, %esi -..B5.43: - movl 8(%esp), %ecx - addl 16(%esp), %ecx - movl %ecx, 8(%esp) - movl 12(%esp), %ecx - adcl 4(%esp), %ecx - addl 64(%esp), %ebx - movl %ecx, 12(%esp) - movl 36(%esp), %ecx - adcl 68(%esp), %ecx - addl $-1, 84(%esp) - movl %ecx, 36(%esp) - movl %eax, %ecx - adcl $-1, 96(%esp) - subl 32(%esp), %ecx - movl %ecx, 100(%esp) - movl %edi, %ecx - sbbl %ebp, %ecx - addl $16, 88(%esp) - movl 100(%esp), %ebp - subl %eax, %ebp - movl %ecx, 104(%esp) - movl %ecx, %eax - sbbl %edi, %eax - jb ..B5.45 -..B5.105: - orl %eax, %ebp - je ..B5.45 -..B5.44: - movl $1, %eax - jmp ..B5.46 -..B5.45: - xorl %eax, %eax -..B5.46: - subl %eax, %edx - movl %ebx, %eax - sbbl $0, %esi - orl 36(%esp), %eax - je ..B5.78 -..B5.47: - movl %edx, %eax - orl %esi, %eax - je ..B5.31 -..B5.48: - movl %esi, 108(%esp) - movl %edx, 112(%esp) - movl %ebx, 12(%esp) -..B5.49: - movl 80(%esp), %ecx - movl 112(%esp), %esi - movl 108(%esp), %ebx - movl 72(%esp), %eax - imull %esi, %ecx - imull %eax, %ebx - mull %esi - movl 88(%esp), %ebp - addl %ebx, %ecx - addl %ecx, %edx - movl %eax, 8(%esp) - movl %edx, 4(%esp) - movl 8(%ebp), %ebx - movl 12(%ebp), %eax - movl (%ebp), %esi - movl 4(%ebp), %edx - cmpl $31, 12(%esp) - jbe ..B5.51 -..B5.50: - movl %edx, %esi - movl 12(%esp), %ecx - movl $0, 52(%esp) - shrl %cl, %esi - jmp ..B5.52 -..B5.51: - movl 12(%esp), %ecx - shrdl %cl, %edx, %esi - shrl %cl, %edx - movl %edx, 52(%esp) -..B5.52: - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B5.54 -..B5.53: - movl %ebx, %ebp - xorl %edx, %edx - shll %cl, %ebp - jmp ..B5.55 -..B5.54: - movl %eax, %ebp - movl %ebx, %edx - shldl %cl, %ebx, %ebp - shll %cl, %edx -..B5.55: - orl %ebp, 52(%esp) - orl %edx, %esi - cmpl $31, 12(%esp) - jbe ..B5.57 -..B5.56: - movl %eax, %ebx - xorl %ebp, %ebp - movl 12(%esp), %ecx - shrl %cl, %ebx - jmp ..B5.58 -..B5.57: - movl %eax, %ebp - movl 12(%esp), %ecx - shrdl %cl, %eax, %ebx - shrl %cl, %ebp -..B5.58: - movl 112(%esp), %ecx - movl %ecx, %eax - mull 76(%esp) - movl %ecx, %eax - movl %edx, %edi - mull 92(%esp) - addl %eax, %edi - movl %edx, %ecx - movl 76(%esp), %eax - adcl $0, %ecx - mull 108(%esp) - addl %edi, %eax - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 32(%esp) - sbbl %ecx, %edx - jae ..B5.60 -..B5.59: - movl $1, %edi - jmp ..B5.61 -..B5.60: - xorl %edi, %edi -..B5.61: - movl 92(%esp), %eax - mull 108(%esp) - addl %edx, %edi - addl 32(%esp), %eax - movl %eax, 48(%esp) - movl %esi, %eax - adcl $0, %edi - subl 8(%esp), %eax - movl 52(%esp), %ecx - movl %ecx, %edx - sbbl 4(%esp), %edx - movl %eax, 20(%esp) - subl %esi, %eax - movl %edx, 16(%esp) - sbbl %ecx, %edx - jb ..B5.63 -..B5.106: - orl %edx, %eax - je ..B5.63 -..B5.62: - movl $1, %eax - jmp ..B5.64 -..B5.63: - xorl %eax, %eax -..B5.64: - movl 100(%esp), %ecx - subl %eax, %ebx - movl 72(%esp), %eax - sbbl $0, %ebp - mull %ecx - movl %ecx, %eax - movl %edx, %esi - mull 80(%esp) - addl $-1, 84(%esp) - movl %edx, %ecx - adcl $-1, 96(%esp) - addl %eax, %esi - movl 72(%esp), %eax - adcl $0, %ecx - mull 104(%esp) - addl %esi, %eax - adcl %ecx, %edx - subl %esi, %eax - movl %edx, 40(%esp) - sbbl %ecx, %edx - jae ..B5.66 -..B5.65: - movl $1, %ecx - jmp ..B5.67 -..B5.66: - xorl %ecx, %ecx -..B5.67: - movl 104(%esp), %eax - mull 80(%esp) - addl %edx, %ecx - addl 40(%esp), %eax - movl %eax, 56(%esp) - movl 20(%esp), %eax - movl %eax, %esi - adcl $0, %ecx - subl 48(%esp), %esi - movl %esi, 24(%esp) - movl 16(%esp), %esi - movl %esi, %edx - sbbl %edi, %edx - movl 24(%esp), %edi - subl %eax, %edi - movl %edx, 28(%esp) - sbbl %esi, %edx - jb ..B5.69 -..B5.107: - orl %edx, %edi - je ..B5.69 -..B5.68: - movl $1, %eax - jmp ..B5.70 -..B5.69: - xorl %eax, %eax -..B5.70: - subl %eax, %ebx - movl 12(%esp), %esi - sbbl $0, %ebp - addl 64(%esp), %esi - movl 36(%esp), %edx - adcl 68(%esp), %edx - movl %esi, 12(%esp) - movl 72(%esp), %eax - movl 112(%esp), %esi - movl %edx, 36(%esp) - mull %esi - movl %esi, %eax - movl %edx, %edi - mull 80(%esp) - addl %eax, %edi - movl %edx, %esi - movl 72(%esp), %eax - adcl $0, %esi - mull 108(%esp) - addl %edi, %eax - adcl %esi, %edx - subl %edi, %eax - movl %edx, 44(%esp) - sbbl %esi, %edx - jae ..B5.72 -..B5.71: - movl $1, %esi - jmp ..B5.73 -..B5.72: - xorl %esi, %esi -..B5.73: - movl 80(%esp), %eax - mull 108(%esp) - addl %edx, %esi - addl 44(%esp), %eax - movl 24(%esp), %edi - adcl $0, %esi - movl %esi, 60(%esp) - movl %edi, %esi - subl 56(%esp), %esi - movl %esi, 100(%esp) - movl 28(%esp), %esi - movl %esi, %edx - sbbl %ecx, %edx - movl %edx, 104(%esp) - movl 100(%esp), %edx - subl %edi, %edx - movl 104(%esp), %ecx - sbbl %esi, %ecx - movl 60(%esp), %esi - jb ..B5.75 -..B5.108: - orl %ecx, %edx - je ..B5.75 -..B5.74: - movl $1, %edx - jmp ..B5.76 -..B5.75: - xorl %edx, %edx -..B5.76: - subl %edx, %ebx - sbbl $0, %ebp - subl %eax, %ebx - movl 12(%esp), %eax - sbbl %esi, %ebp - addl $16, 88(%esp) - movl %ebx, 112(%esp) - movl %ebp, 108(%esp) - orl 36(%esp), %eax - jne ..B5.49 -..B5.77: - movl %ebp, %esi - movl %ebx, %edx -..B5.78: - xorl %eax, %eax - movl 96(%esp), %ecx - subl %eax, %ecx - jl ..B5.100 -..B5.79: - movl %esi, 108(%esp) - movl %edx, 112(%esp) -..B5.80: - movl 108(%esp), %ebp - movl %ebp, %edx - movl 80(%esp), %ecx - movl 112(%esp), %edi - movl 72(%esp), %eax - imull %edi, %ecx - imull %eax, %edx - addl %edx, %ecx - mull %edi - movl 88(%esp), %esi - addl %ecx, %edx - movl %edx, 20(%esp) - movl %eax, 12(%esp) - movl %edi, %eax - movl 8(%esi), %ecx - movl 4(%esi), %edx - movl %ecx, 52(%esp) - movl 12(%esi), %ecx - movl (%esi), %ebx - movl 76(%esp), %esi - movl %edx, 40(%esp) - mull %esi - movl %edi, %eax - movl %ebx, 28(%esp) - movl %edx, %ebx - mull 92(%esp) - addl %eax, %ebx - movl %esi, %eax - movl %edx, %edi - adcl $0, %edi - mull %ebp - addl %ebx, %eax - movl %edx, %ebp - adcl %edi, %ebp - subl %ebx, %eax - movl %ebp, %ebx - sbbl %edi, %ebx - jae ..B5.82 -..B5.81: - movl $1, %ebx - jmp ..B5.83 -..B5.82: - xorl %ebx, %ebx -..B5.83: - movl 92(%esp), %eax - mull 108(%esp) - addl %edx, %ebx - addl %ebp, %eax - movl 28(%esp), %edi - movl %edi, %esi - adcl $0, %ebx - subl 12(%esp), %esi - movl 40(%esp), %ebp - movl %eax, 44(%esp) - movl %ebp, %eax - sbbl 20(%esp), %eax - movl %esi, 8(%esp) - subl %edi, %esi - movl %eax, 4(%esp) - sbbl %ebp, %eax - jb ..B5.85 -..B5.109: - orl %eax, %esi - je ..B5.85 -..B5.84: - movl $1, %eax - jmp ..B5.86 -..B5.85: - xorl %eax, %eax -..B5.86: - movl 72(%esp), %esi - subl %eax, 52(%esp) - movl %esi, %eax - movl 100(%esp), %ebp - sbbl $0, %ecx - mull %ebp - movl %ebp, %eax - movl %edx, %edi - mull 80(%esp) - addl $-1, 84(%esp) - movl %edx, %ebp - adcl $-1, 96(%esp) - addl %eax, %edi - movl %esi, %eax - adcl $0, %ebp - mull 104(%esp) - addl %edi, %eax - adcl %ebp, %edx - subl %edi, %eax - movl %edx, 36(%esp) - sbbl %ebp, %edx - jae ..B5.88 -..B5.87: - movl $1, %ebp - jmp ..B5.89 -..B5.88: - xorl %ebp, %ebp -..B5.89: - movl 104(%esp), %eax - mull 80(%esp) - addl %edx, %ebp - addl 36(%esp), %eax - movl 8(%esp), %edi - movl %eax, 48(%esp) - movl %edi, %eax - adcl $0, %ebp - subl 44(%esp), %eax - movl 4(%esp), %edx - movl %edx, %esi - sbbl %ebx, %esi - movl %eax, 16(%esp) - subl %edi, %eax - movl %esi, 24(%esp) - sbbl %edx, %esi - jb ..B5.91 -..B5.110: - orl %esi, %eax - je ..B5.91 -..B5.90: - movl $1, %eax - jmp ..B5.92 -..B5.91: - xorl %eax, %eax -..B5.92: - movl 72(%esp), %esi - subl %eax, 52(%esp) - movl %esi, %eax - movl 112(%esp), %ebx - sbbl $0, %ecx - mull %ebx - movl %ebx, %eax - movl %edx, %edi - mull 80(%esp) - addl %eax, %edi - movl %esi, %eax - movl %edx, %ebx - adcl $0, %ebx - mull 108(%esp) - addl %edi, %eax - adcl %ebx, %edx - subl %edi, %eax - movl %edx, 32(%esp) - sbbl %ebx, %edx - jae ..B5.94 -..B5.93: - movl $1, %ebx - jmp ..B5.95 -..B5.94: - xorl %ebx, %ebx -..B5.95: - movl 80(%esp), %eax - mull 108(%esp) - addl %edx, %ebx - addl 32(%esp), %eax - movl 16(%esp), %edi - movl %edi, %esi - adcl $0, %ebx - subl 48(%esp), %esi - movl %esi, 100(%esp) - movl 24(%esp), %esi - movl %esi, %edx - sbbl %ebp, %edx - movl 100(%esp), %ebp - subl %edi, %ebp - movl %edx, 104(%esp) - sbbl %esi, %edx - jb ..B5.97 -..B5.111: - orl %edx, %ebp - je ..B5.97 -..B5.96: - movl $1, %edx - jmp ..B5.98 -..B5.97: - xorl %edx, %edx -..B5.98: - movl 52(%esp), %ebp - subl %edx, %ebp - movl 96(%esp), %edx - sbbl $0, %ecx - subl %eax, %ebp - sbbl %ebx, %ecx - xorl %eax, %eax - addl $16, 88(%esp) - movl %ebp, 112(%esp) - subl %eax, %edx - movl %ecx, 108(%esp) - jge ..B5.80 -..B5.99: - movl %ecx, %esi - movl %ebp, %edx -..B5.100: - movl (%esp), %ebx - movl 100(%esp), %eax - movl 104(%esp), %ecx - movl %edx, 8(%ebx) - xorl %edx, %edx - movl %eax, 16(%ebx) - movl %ecx, 20(%ebx) - movl %esi, 12(%ebx) - movl %edx, 4(%ebx) - movl %edx, (%ebx) - addl $124, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B5.102: - movl %edx, 100(%esp) - movl %edi, 88(%esp) - movl %esi, 96(%esp) - movl 16(%esp), %edx - movl 68(%esp), %edi - movl 64(%esp), %eax - jmp ..B5.28 - .align 16,0x90 - .type __eval_neg_poly,@function - .size __eval_neg_poly,.-__eval_neg_poly - .data -# -- End __eval_neg_poly - .text -# -- Begin __eval_pos_poly - .text - .align 16,0x90 -__eval_pos_poly: -# parameter 1: %eax -# parameter 2: 180 + %esp -# parameter 3: %edx -# parameter 4: 192 + %esp -# parameter 5: %ecx -..B6.1: -..L13: - - movl 4(%esp), %eax - movl 16(%esp), %edx - movl 28(%esp), %ecx -__eval_pos_poly.: - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $156, %esp - movl 192(%esp), %esi - movl %esi, 84(%esp) - movl 8(%eax), %esi - movl %esi, 68(%esp) - movl 12(%eax), %esi - movl %esi, 72(%esp) - movl 16(%eax), %esi - movl %esi, 76(%esp) - movl 20(%eax), %esi - movl %esi, 80(%esp) - xorl %esi, %esi - movl %ecx, 48(%esp) - xorl %ecx, %ecx - movl 196(%esp), %edi - movl 4(%eax), %eax - subl %eax, %ecx - movl %edx, 64(%esp) - cltd - movl %edi, 140(%esp) - movl %esi, %edi - movl 180(%esp), %ebx - sbbl %edx, %edi - movl %eax, 148(%esp) - movl $128, %eax - movl %edx, 144(%esp) - movl %ebx, %edx - subl %eax, %edx - movl 184(%esp), %ebp - movl %ebp, %edx - sbbl %esi, %edx - jge ..B6.3 -..B6.2: - movl $1, %edx - jmp ..B6.4 -..B6.3: - xorl %edx, %edx -..B6.4: - testl %edx, %edx - jne ..B6.8 -..B6.5: - movl %edi, 8(%esp) - movl %ecx, 12(%esp) - movl 140(%esp), %esi - movl 84(%esp), %eax - movl 64(%esp), %edx -..B6.6: - addl 148(%esp), %ebx - movl %ebx, %ecx - adcl 144(%esp), %ebp - movl $128, %edi - addl $-1, %eax - adcl $-1, %esi - addl $16, %edx - subl %edi, %ecx - movl $0, %edi - movl %ebp, %ecx - sbbl %edi, %ecx - jge ..B6.6 -..B6.7: - movl %esi, 140(%esp) - movl %eax, 84(%esp) - movl %edx, 64(%esp) - movl 8(%esp), %edi - movl 12(%esp), %ecx -..B6.8: - movl $64, %eax - movl %ebx, %edx - xorl %esi, %esi - subl %eax, %edx - movl %ebp, %edx - sbbl %esi, %edx - jge ..B6.10 -..B6.9: - movl $1, %edx - jmp ..B6.11 -..B6.10: - xorl %edx, %edx -..B6.11: - testl %edx, %edx - je ..B6.13 -..B6.12: - xorl %edx, %edx - xorl %esi, %esi - movl %esi, 88(%esp) - movl %esi, 96(%esp) - jmp ..B6.31 -..B6.13: - movl %edi, 8(%esp) - movl %ecx, 12(%esp) - movl 140(%esp), %edx - movl 64(%esp), %esi -..B6.14: - movl 8(%esi), %edi - lea -64(%ebx), %ecx - movl 12(%esi), %eax - cmpl $31, %ecx - jbe ..B6.16 -..B6.15: - movl %eax, %edi - movl $0, 96(%esp) - shrl %cl, %edi - jmp ..B6.17 -..B6.16: - shrdl %cl, %eax, %edi - shrl %cl, %eax - movl %eax, 96(%esp) -..B6.17: - addl 148(%esp), %ebx - movl %ebx, %ecx - adcl 144(%esp), %ebp - movl $64, %eax - addl $16, %esi - addl $-1, 84(%esp) - adcl $-1, %edx - subl %eax, %ecx - movl $0, %eax - movl %ebp, %ecx - sbbl %eax, %ecx - jl ..B6.126 -..B6.18: - movl %edi, %eax - orl 96(%esp), %eax - je ..B6.14 -..B6.19: - movl %edi, 88(%esp) - movl %ebx, 60(%esp) - movl %ebp, 56(%esp) - movl %edx, 140(%esp) - movl %esi, 64(%esp) - movl 96(%esp), %ebx - movl 88(%esp), %ebp -..B6.20: - movl 68(%esp), %esi - movl %esi, %eax - mull %ebp - movl %ebp, %eax - movl %edx, %ecx - mull 72(%esp) - addl %eax, %ecx - movl %esi, %eax - movl %edx, %edi - adcl $0, %edi - mull %ebx - addl %ecx, %eax - movl %edx, %ebp - adcl %edi, %ebp - subl %ecx, %eax - movl %ebp, %edx - sbbl %edi, %edx - jae ..B6.22 -..B6.21: - movl $1, %esi - jmp ..B6.23 -..B6.22: - xorl %esi, %esi -..B6.23: - movl 72(%esp), %eax - mull %ebx - movl 64(%esp), %ecx - addl %edx, %esi - movl 60(%esp), %ebx - addl %ebp, %eax - movl 8(%ecx), %ebp - adcl $0, %esi - movl 12(%ecx), %edx - lea -64(%ebx), %ecx - cmpl $31, %ecx - jbe ..B6.25 -..B6.24: - movl %edx, %ebp - xorl %ebx, %ebx - shrl %cl, %ebp - jmp ..B6.26 -..B6.25: - movl %edx, %ebx - shrdl %cl, %edx, %ebp - shrl %cl, %ebx -..B6.26: - movl 60(%esp), %ecx - movl $64, %edi - addl 148(%esp), %ecx - movl 56(%esp), %edx - adcl 144(%esp), %edx - addl $-1, 84(%esp) - movl %ecx, 60(%esp) - adcl $-1, 140(%esp) - addl %eax, %ebp - movl %edx, 56(%esp) - adcl %esi, %ebx - addl $16, 64(%esp) - subl %edi, %ecx - movl $0, %edi - sbbl %edi, %edx - jge ..B6.20 -..B6.27: - movl %ebp, 88(%esp) - movl %ebp, %edx - subl %eax, %edx - movl %ebx, 96(%esp) - movl %ebx, %eax - movl 60(%esp), %ebx - sbbl %esi, %eax - movl 56(%esp), %ebp - movl 8(%esp), %edi - movl 12(%esp), %ecx - jae ..B6.29 -..B6.28: - movl $1, %edx - jmp ..B6.30 -..B6.29: - xorl %edx, %edx -..B6.30: - xorl %esi, %esi -..B6.31: - movl %esi, 92(%esp) - xorl %esi, %esi - xorl %eax, %eax - subl %ebx, %eax - movl %eax, 4(%esp) - movl %ebx, %eax - sbbl %ebp, %esi - movl %esi, (%esp) - orl %ebp, %eax - movl 92(%esp), %esi - je ..B6.54 -..B6.32: - xorl %eax, %eax - orl %edx, %eax - jne ..B6.52 -..B6.33: - movl %edi, 8(%esp) - movl %ebp, 56(%esp) - movl %ecx, 12(%esp) - movl 96(%esp), %esi - movl 88(%esp), %edi -..B6.34: - movl 68(%esp), %eax - mull %edi - movl %edi, %eax - movl %edx, %ebp - mull 72(%esp) - addl %eax, %ebp - movl %edx, %ecx - movl 68(%esp), %eax - adcl $0, %ecx - mull %esi - addl %ebp, %eax - movl %edx, %edi - adcl %ecx, %edi - subl %ebp, %eax - movl %edi, %edx - sbbl %ecx, %edx - jae ..B6.36 -..B6.35: - movl $1, %ebp - jmp ..B6.37 -..B6.36: - xorl %ebp, %ebp -..B6.37: - movl 72(%esp), %eax - mull %esi - movl 64(%esp), %esi - addl %edx, %ebp - addl %edi, %eax - movl %eax, 28(%esp) - movl 12(%esi), %edi - adcl $0, %ebp - movl %edi, 16(%esp) - cmpl $31, %ebx - movl 8(%esi), %edx - movl (%esi), %edi - movl 4(%esi), %eax - jbe ..B6.39 -..B6.38: - movl %ebx, %ecx - movl %eax, %edi - shrl %cl, %edi - xorl %esi, %esi - jmp ..B6.40 -..B6.39: - movl %ebx, %ecx - movl %eax, %esi - shrdl %cl, %eax, %edi - shrl %cl, %esi -..B6.40: - movl 4(%esp), %eax - lea 64(%eax), %ecx - cmpl $31, %ecx - jbe ..B6.42 -..B6.41: - movl %edx, %eax - shll %cl, %eax - movl $0, 20(%esp) - movl %eax, 24(%esp) - jmp ..B6.43 -..B6.42: - movl 16(%esp), %eax - shldl %cl, %edx, %eax - movl %eax, 24(%esp) - movl %edx, %eax - shll %cl, %eax - movl %eax, 20(%esp) -..B6.43: - orl 20(%esp), %edi - orl 24(%esp), %esi - cmpl $31, %ebx - jbe ..B6.45 -..B6.44: - movl %ebx, %ecx - movl 16(%esp), %edx - movl $0, 92(%esp) - shrl %cl, %edx - jmp ..B6.46 -..B6.45: - movl %ebx, %ecx - movl 16(%esp), %eax - shrdl %cl, %eax, %edx - shrl %cl, %eax - movl %eax, 92(%esp) -..B6.46: - movl 4(%esp), %eax - addl 12(%esp), %eax - movl (%esp), %ecx - adcl 8(%esp), %ecx - addl 148(%esp), %ebx - movl %eax, 4(%esp) - movl 56(%esp), %eax - adcl 144(%esp), %eax - addl $-1, 84(%esp) - movl %ecx, (%esp) - movl 28(%esp), %ecx - adcl $-1, 140(%esp) - addl %ecx, %edi - movl %eax, 56(%esp) - movl %edi, %eax - adcl %ebp, %esi - addl $16, 64(%esp) - subl %ecx, %eax - movl %esi, %ecx - sbbl %ebp, %ecx - jae ..B6.48 -..B6.47: - movl $1, %ebp - jmp ..B6.49 -..B6.48: - xorl %ebp, %ebp -..B6.49: - addl %ebp, %edx - movl %ebx, %ebp - adcl $0, 92(%esp) - orl 56(%esp), %ebp - je ..B6.123 -..B6.50: - movl %edx, %ebp - orl 92(%esp), %ebp - je ..B6.34 -..B6.51: - movl %esi, 96(%esp) - movl %edi, 88(%esp) - movl 56(%esp), %ebp - movl 92(%esp), %esi -..B6.52: - xorl %eax, %eax - movl 140(%esp), %edi - subl %eax, %edi - jge ..B6.124 -..B6.53: - movl 48(%esp), %ebp - movl 88(%esp), %ecx - movl 96(%esp), %ebx - movl %ecx, 16(%ebp) - movl %ebx, 20(%ebp) - movl %edx, 8(%ebp) - movl %esi, 12(%ebp) - movl %eax, 4(%ebp) - movl $0, (%ebp) - addl $156, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B6.54: - xorl %eax, %eax - movl %esi, 92(%esp) - movl %eax, 52(%esp) - movl %edx, 112(%esp) -..B6.55: - xorl %eax, %eax - movl 140(%esp), %edx - subl %eax, %edx - jl ..B6.125 -..B6.56: - movl 92(%esp), %esi - movl %esi, %ebp - movl 112(%esp), %ecx - movl 68(%esp), %eax - imull %eax, %ebp - mull %ecx - movl 72(%esp), %edi - imull %ecx, %edi - addl %ebp, %edi - movl %edx, %ebp - movl 64(%esp), %edx - addl %edi, %ebp - movl %eax, 104(%esp) - movl %ecx, %eax - movl 8(%edx), %edi - movl 12(%edx), %ebx - movl %edi, 100(%esp) - movl %ebx, 108(%esp) - movl (%edx), %edi - movl 4(%edx), %ebx - mull 76(%esp) - movl %ecx, %eax - movl %ebx, 136(%esp) - movl %edx, %ebx - mull 80(%esp) - addl %eax, %ebx - movl %edx, %ecx - movl 76(%esp), %eax - adcl $0, %ecx - mull %esi - addl %ebx, %eax - adcl %ecx, %edx - subl %ebx, %eax - movl %edx, 128(%esp) - movl 136(%esp), %ebx - sbbl %ecx, %edx - jae ..B6.58 -..B6.57: - movl $1, %ecx - jmp ..B6.59 -..B6.58: - xorl %ecx, %ecx -..B6.59: - movl 80(%esp), %eax - mull 92(%esp) - addl %edx, %ecx - addl 128(%esp), %eax - movl 104(%esp), %esi - adcl $0, %ecx - addl %esi, %edi - movl %eax, 132(%esp) - movl %edi, %eax - adcl %ebp, %ebx - subl %esi, %eax - movl %ebx, %edx - sbbl %ebp, %edx - jae ..B6.61 -..B6.60: - movl $1, 116(%esp) - jmp ..B6.62 -..B6.61: - movl $0, 116(%esp) -..B6.62: - movl 68(%esp), %eax - movl 88(%esp), %ebp - mull %ebp - movl %ebp, %eax - movl %edx, %esi - mull 72(%esp) - addl $-1, 84(%esp) - movl %edx, %ebp - adcl $-1, 140(%esp) - addl %eax, %esi - movl 68(%esp), %eax - adcl $0, %ebp - mull 96(%esp) - addl %esi, %eax - adcl %ebp, %edx - subl %esi, %eax - movl %edx, 124(%esp) - sbbl %ebp, %edx - jae ..B6.64 -..B6.63: - movl $1, %ebp - jmp ..B6.65 -..B6.64: - xorl %ebp, %ebp -..B6.65: - movl 96(%esp), %eax - mull 72(%esp) - movl %eax, %esi - addl %edx, %ebp - addl 124(%esp), %esi - movl 132(%esp), %eax - adcl $0, %ebp - addl %eax, %edi - movl %edi, %edx - adcl %ecx, %ebx - subl %eax, %edx - movl %ebx, %eax - sbbl %ecx, %eax - jae ..B6.67 -..B6.66: - movl $1, %eax - jmp ..B6.68 -..B6.67: - xorl %eax, %eax -..B6.68: - movl 112(%esp), %ecx - addl %eax, 116(%esp) - movl %ecx, %eax - mull 68(%esp) - movl %ecx, %eax - movl %ebx, 136(%esp) - movl %edx, %ebx - mull 72(%esp) - addl %eax, %ebx - movl %edx, %ecx - movl 68(%esp), %eax - adcl $0, %ecx - mull 92(%esp) - addl %ebx, %eax - adcl %ecx, %edx - subl %ebx, %eax - movl %edx, 120(%esp) - movl 136(%esp), %ebx - sbbl %ecx, %edx - jae ..B6.70 -..B6.69: - movl $1, %ecx - jmp ..B6.71 -..B6.70: - xorl %ecx, %ecx -..B6.71: - movl 72(%esp), %eax - mull 92(%esp) - addl %edx, %ecx - addl 120(%esp), %eax - adcl $0, %ecx - addl %esi, %edi - movl %edi, 88(%esp) - adcl %ebp, %ebx - subl %esi, %edi - movl %ebx, 96(%esp) - sbbl %ebp, %ebx - jae ..B6.73 -..B6.72: - movl $1, %edx - jmp ..B6.74 -..B6.73: - xorl %edx, %edx -..B6.74: - movl 116(%esp), %ebx - xorl %esi, %esi - addl %edx, %ebx - movl 100(%esp), %edx - addl %ebx, %edx - movl 108(%esp), %ebp - adcl $0, %ebp - movl %edx, 100(%esp) - subl %ebx, %edx - movl %ebp, 108(%esp) - sbbl %esi, %ebp - jae ..B6.76 -..B6.75: - movl $1, %edx - jmp ..B6.77 -..B6.76: - xorl %edx, %edx -..B6.77: - movl %eax, %ebx - movl %ecx, %ebp - addl 100(%esp), %ebx - movl %ebx, 112(%esp) - adcl 108(%esp), %ebp - addl $16, 64(%esp) - subl %eax, %ebx - movl %ebp, 92(%esp) - sbbl %ecx, %ebp - jae ..B6.79 -..B6.78: - movl $1, %eax - jmp ..B6.80 -..B6.79: - xorl %eax, %eax -..B6.80: - addl %eax, %edx - xorl %eax, %eax - orl %eax, %edx - je ..B6.55 -..B6.81: - movl 96(%esp), %ebx - movl %ebx, %eax - movl 112(%esp), %esi - movl %esi, %ecx - movl 92(%esp), %edi - movl %edi, %ebp - movl 88(%esp), %edx - shll $31, %eax - shrl $1, %edx - shrl $1, %ebx - orl %eax, %edx - shll $31, %ecx - xorl %eax, %eax - shll $31, %ebp - orl %ecx, %ebx - shrl $1, %edi - shrl $1, %esi - orl $-2147483648, %edi - movl %edx, 88(%esp) - orl %ebp, %esi - incl 52(%esp) - movl 140(%esp), %edx - movl %ebx, 96(%esp) - subl %eax, %edx - movl %esi, 112(%esp) - movl %edi, 92(%esp) - jge ..B6.83 -..B6.82: - movl %edi, %esi - movl 52(%esp), %eax - movl 112(%esp), %edx - jmp ..B6.53 -..B6.83: - movl $1, %ebx - xorl %ebp, %ebp -..B6.129: - movl %ebx, 60(%esp) - movl %ebp, 56(%esp) - movl 92(%esp), %esi -..B6.84: - movl %esi, %ecx - movl 72(%esp), %ebx - movl 112(%esp), %ebp - movl 68(%esp), %eax - imull %ebp, %ebx - imull %eax, %ecx - mull %ebp - addl %ecx, %ebx - addl %ebx, %edx - movl %edx, 8(%esp) - movl 64(%esp), %edx - movl %eax, (%esp) - cmpl $31, 60(%esp) - movl 8(%edx), %edi - movl 12(%edx), %eax - movl (%edx), %ebx - movl 4(%edx), %edx - movl %edi, 24(%esp) - jbe ..B6.86 -..B6.85: - movl %edx, %ebx - xorl %ebp, %ebp - movl 60(%esp), %ecx - shrl %cl, %ebx - jmp ..B6.87 -..B6.86: - movl %edx, %ebp - movl 60(%esp), %ecx - shrdl %cl, %edx, %ebx - shrl %cl, %ebp -..B6.87: - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B6.89 -..B6.88: - xorl %edx, %edx - shll %cl, %edi - movl %edi, 44(%esp) - jmp ..B6.90 -..B6.89: - movl %eax, %edi - movl 24(%esp), %edx - shldl %cl, %edx, %edi - movl %edi, 44(%esp) - shll %cl, %edx -..B6.90: - orl 44(%esp), %ebp - orl %edx, %ebx - cmpl $31, 60(%esp) - jbe ..B6.92 -..B6.91: - movl 60(%esp), %ecx - shrl %cl, %eax - movl $0, 4(%esp) - movl %eax, 24(%esp) - jmp ..B6.93 -..B6.92: - movl 60(%esp), %ecx - movl 24(%esp), %edx - shrdl %cl, %eax, %edx - shrl %cl, %eax - movl %edx, 24(%esp) - movl %eax, 4(%esp) -..B6.93: - movl 112(%esp), %ecx - movl %ecx, %eax - mull 76(%esp) - movl %ecx, %eax - movl %edx, %edi - mull 80(%esp) - addl %eax, %edi - movl %edx, %ecx - movl 76(%esp), %eax - adcl $0, %ecx - mull %esi - addl %edi, %eax - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 40(%esp) - sbbl %ecx, %edx - jae ..B6.95 -..B6.94: - movl $1, %edi - jmp ..B6.96 -..B6.95: - xorl %edi, %edi -..B6.96: - movl 80(%esp), %eax - mull %esi - addl %edx, %edi - addl 40(%esp), %eax - movl %eax, 32(%esp) - movl (%esp), %eax - adcl $0, %edi - addl %eax, %ebx - movl %ebx, %edx - movl 8(%esp), %ecx - adcl %ecx, %ebp - subl %eax, %edx - movl %ebp, %eax - sbbl %ecx, %eax - jae ..B6.98 -..B6.97: - movl $1, 12(%esp) - jmp ..B6.99 -..B6.98: - movl $0, 12(%esp) -..B6.99: - movl 68(%esp), %eax - movl 88(%esp), %ecx - mull %ecx - movl %ecx, %eax - movl %ebp, 36(%esp) - movl %edx, %ebp - mull 72(%esp) - addl $-1, 84(%esp) - movl %edx, %ecx - adcl $-1, 140(%esp) - addl %eax, %ebp - movl 68(%esp), %eax - adcl $0, %ecx - mull 96(%esp) - addl %ebp, %eax - adcl %ecx, %edx - subl %ebp, %eax - movl %edx, 16(%esp) - movl 36(%esp), %ebp - sbbl %ecx, %edx - jae ..B6.101 -..B6.100: - movl $1, %ecx - jmp ..B6.102 -..B6.101: - xorl %ecx, %ecx -..B6.102: - movl 96(%esp), %eax - mull 72(%esp) - addl %edx, %ecx - addl 16(%esp), %eax - movl %eax, 28(%esp) - movl 32(%esp), %eax - adcl $0, %ecx - addl %eax, %ebx - movl %ebx, %edx - adcl %edi, %ebp - subl %eax, %edx - movl %ebp, %eax - sbbl %edi, %eax - jae ..B6.104 -..B6.103: - movl $1, %eax - jmp ..B6.105 -..B6.104: - xorl %eax, %eax -..B6.105: - movl %ebp, 36(%esp) - movl 60(%esp), %ebp - addl 148(%esp), %ebp - movl 56(%esp), %edx - movl %ebp, 60(%esp) - adcl 144(%esp), %edx - movl 112(%esp), %ebp - addl %eax, 12(%esp) - movl %ebp, %eax - movl %edx, 56(%esp) - mull 68(%esp) - movl %ebp, %eax - movl %edx, %edi - mull 72(%esp) - addl %eax, %edi - movl %edx, %ebp - movl 68(%esp), %eax - adcl $0, %ebp - mull %esi - addl %edi, %eax - adcl %ebp, %edx - subl %edi, %eax - movl %edx, 20(%esp) - sbbl %ebp, %edx - movl 36(%esp), %ebp - jae ..B6.107 -..B6.106: - movl $1, %edi - jmp ..B6.108 -..B6.107: - xorl %edi, %edi -..B6.108: - movl 72(%esp), %eax - mull %esi - addl %edx, %edi - addl 20(%esp), %eax - movl 28(%esp), %esi - adcl $0, %edi - addl %esi, %ebx - movl %ebx, 88(%esp) - adcl %ecx, %ebp - subl %esi, %ebx - movl %ebp, 96(%esp) - sbbl %ecx, %ebp - jae ..B6.110 -..B6.109: - movl $1, %edx - jmp ..B6.111 -..B6.110: - xorl %edx, %edx -..B6.111: - movl 12(%esp), %ecx - xorl %ebp, %ebp - addl %edx, %ecx - movl 24(%esp), %edx - addl %ecx, %edx - movl 4(%esp), %ebx - adcl $0, %ebx - movl %edx, 24(%esp) - subl %ecx, %edx - movl %ebx, 4(%esp) - sbbl %ebp, %ebx - jae ..B6.113 -..B6.112: - movl $1, %edx - jmp ..B6.114 -..B6.113: - xorl %edx, %edx -..B6.114: - movl %eax, %ecx - movl %edi, %esi - addl 24(%esp), %ecx - movl %ecx, 112(%esp) - adcl 4(%esp), %esi - addl $16, 64(%esp) - subl %eax, %ecx - movl %esi, %eax - sbbl %edi, %eax - jae ..B6.116 -..B6.115: - movl $1, %eax - jmp ..B6.117 -..B6.116: - xorl %eax, %eax -..B6.117: - addl %eax, %edx - xorl %eax, %eax - orl %eax, %edx - je ..B6.119 -..B6.118: - movl 96(%esp), %ebx - movl %ebx, %eax - movl 112(%esp), %edi - movl %edi, %ecx - movl %esi, %ebp - addl $1, 60(%esp) - movl 88(%esp), %edx - adcl $0, 56(%esp) - shll $31, %eax - shrl $1, %ebx - shrl $1, %edx - shll $31, %ecx - orl %eax, %edx - shll $31, %ebp - orl %ecx, %ebx - shrl $1, %edi - shrl $1, %esi - orl %ebp, %edi - incl 52(%esp) - orl $-2147483648, %esi - movl %edx, 88(%esp) - movl %ebx, 96(%esp) - movl %edi, 112(%esp) -..B6.119: - movl 60(%esp), %eax - orl 56(%esp), %eax - je ..B6.122 -..B6.120: - xorl %eax, %eax - movl 140(%esp), %edx - subl %eax, %edx - jge ..B6.84 -..B6.121: - movl 52(%esp), %eax - movl 112(%esp), %edx - jmp ..B6.53 -..B6.122: - movl %esi, 92(%esp) - jmp ..B6.55 -..B6.123: - movl %esi, 96(%esp) - movl %edi, 88(%esp) - movl 92(%esp), %esi - jmp ..B6.54 -..B6.124: - movl %esi, 92(%esp) - movl %eax, 52(%esp) - movl %edx, 112(%esp) - jmp ..B6.129 -..B6.125: - movl 92(%esp), %esi - movl 52(%esp), %eax - movl 112(%esp), %edx - jmp ..B6.53 -..B6.126: - movl %edx, 140(%esp) - xorl %edx, %edx - movl %edi, 88(%esp) - movl %esi, 64(%esp) - xorl %esi, %esi - movl 8(%esp), %edi - movl 12(%esp), %ecx - jmp ..B6.31 - .align 16,0x90 - .type __eval_pos_poly,@function - .size __eval_pos_poly,.-__eval_pos_poly - .data -# -- End __eval_pos_poly - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7b,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xef,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x47,0x3f,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xc3,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3d,0x40,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .align 4 -__ux_one__: - .long 0 - .long 1 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .type __ux_one__,@object - .size __ux_one__,24 - .data - .hidden __dpml_ffs_and_shift__ - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_sqrt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_sqrt.S deleted file mode 100644 index e1b2ac2e06..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_sqrt.S +++ /dev/null @@ -1,1321 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_sqrt.c" - .text -..TXTST0: -# -- Begin __dpml_ux_sqrt_evaluation__ - .text - .align 16,0x90 - .hidden __dpml_ux_sqrt_evaluation__ - .globl __dpml_ux_sqrt_evaluation__ -__dpml_ux_sqrt_evaluation__: -# parameter 1: %eax -# parameter 2: 12 + %ebp -# parameter 3: %edx -..B1.1: -..L1: - - movl 4(%esp), %eax - movl 16(%esp), %edx - .hidden __dpml_ux_sqrt_evaluation__. - .globl __dpml_ux_sqrt_evaluation__. -__dpml_ux_sqrt_evaluation__.: - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $148, %esp - movl %edx, %esi - movl %eax, 44(%esp) - movl %gs:20, %ecx - xorl %esp, %ecx - movl %ecx, 136(%esp) - addl $4, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea 80(%esp), %eax - pushl %eax - call fegetenv@PLT -..B1.2: - movl 44(%esp), %edx - movl %ebx, 80(%esp) - movl %esi, 40(%esp) - movl 8(%edx), %edi - movl %edi, %ecx - movl 12(%edx), %eax - movl %eax, %ebx - shll $21, %ebx - shrl $11, %ecx - orl %ecx, %ebx - movl 4(%edx), %ecx - movl 20(%edx), %esi - movl %ecx, %edx - andl $1, %edx - movl %esi, 36(%esp) - movl %eax, %esi - shrl $11, %esi - addl %edx, %ecx - addl $1070596096, %esi - movl %esi, 68(%esp) - lea 8(%edx), %esi - movl %esi, 32(%esp) - negl %esi - sarl $1, %ecx - movl %ecx, 72(%esp) - movl %esi, %ecx - negl %ecx - movl %ebx, 64(%esp) - addl $31, %ecx - movl %edi, %ebx - shrl %cl, %ebx - movl %esi, %ecx - movl %eax, 76(%esp) - shrl $1, %ebx - shll %cl, %eax - shll %cl, %edi - orl %ebx, %eax - movl 80(%esp), %ebx - movl 40(%esp), %esi -..B1.3: - movl 32(%esp), %ecx - shrl %cl, 36(%esp) -..B1.5: - fldl 64(%esp) - movl %eax, %ecx - orl 36(%esp), %edi - shll $21, %ecx - shrl $11, %edi - shrl $11, %eax - orl %edi, %ecx - movl %ecx, 48(%esp) - movl %eax, 52(%esp) - fildll 48(%esp) - fstpl 56(%esp) - fldl 56(%esp) -..B1.6: - movl 32(%esp), %ecx - movl 76(%esp), %eax - shrl %cl, %eax -..B1.8: - fmull 136+__sqrt_x_table@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - movl 76(%esp), %ecx - shrl $24, %ecx - shll $7, %edx - xorl %edx, %ecx - shll $4, %ecx - movl __sqrt_t_table@GOT(%ebx), %edx - movl %eax, 48(%esp) - fildl 48(%esp) - fstpl 56(%esp) - fldl 56(%esp) - fmull 128+__sqrt_x_table@GOTOFF(%ebx) - fstpl 56(%esp) - fldl 56(%esp) - fxch %st(2) - fstpl 56(%esp) - fldl 56(%esp) - fld %st(0) - movl %ebx, 80(%esp) - fadd %st(3), %st - fxch %st(2) - fmuls (%edx,%ecx) - flds 4(%edx,%ecx) - fmulp %st, %st(5) - fxch %st(4) - faddl 8(%edx,%ecx) - faddp %st, %st(4) - fxch %st(3) - fstpl 56(%esp) - fldl 56(%esp) - fmull 96+__sqrt_x_table@GOTOFF(%ebx) - fstpl 56(%esp) - fldl 56(%esp) - fxch %st(1) - fstpl 56(%esp) - fldl 56(%esp) - fld %st(0) - fmul %st(2), %st - fstps 48(%esp) - flds 48(%esp) - fxch %st(2) - fstps 48(%esp) - flds 48(%esp) - fmul %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fld %st(3) - fmulp %st, %st(2) - fldl 152+__sqrt_x_table@GOTOFF(%ebx) - fmulp %st, %st(3) - fld %st(3) - fmul %st(4), %st - fmulp %st, %st(3) - fxch %st(1) - fsubrl 104+__sqrt_x_table@GOTOFF(%ebx) - fsubp %st, %st(1) - fstpl 56(%esp) - fldl 56(%esp) - fldl 112+__sqrt_x_table@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(2) - fsubrl 144+__sqrt_x_table@GOTOFF(%ebx) - fmulp %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpl 56(%esp) - fldl 56(%esp) - flds .L_2il0floatpacket.20@GOTOFF(%ebx) - fld %st(0) - fsubr %st(3), %st - fxch %st(1) - fcomp %st(3) - fnstsw %ax - fxch %st(1) - fmull 120+__sqrt_x_table@GOTOFF(%ebx) - sahf - fxch %st(2) - jp ..L4 - jbe ..L3 -..L4: - fst %st(1) -..L3: - fstp %st(0) - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 64(%esp) - fldcw 32(%esp) - movl 64(%esp), %edx - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 64(%esp) - fldcw 32(%esp) - shll $7, %edx - movl 64(%esp), %ecx - movl %ecx, %ebx - movl 68(%esp), %edi - movl %edi, %eax - shll $20, %eax - shrl $12, %ebx - shrl $11, %ecx - orl %ebx, %eax - sarl $12, %edi - andl $1, %ecx - addl %edi, %edx - addl %ecx, %eax - adcl $0, %edx - xorl %ebx, %ebx - movl %edx, %ecx - andl $1073741824, %ecx - orl %ebx, %ecx - movl 80(%esp), %ebx - je ..B1.10 -..B1.9: - movl $2147483647, 32(%esp) - jmp ..B1.11 -..B1.10: - movl $-1, 32(%esp) -..B1.11: - movl %edx, %edi - xorl %ecx, %ecx - subl %ecx, %edi - jl ..B1.13 -..B1.12: - movl 32(%esp), %edx - movl $-1, %eax -..B1.13: - movl 72(%esp), %ecx - xorl %edi, %edi - negl %ecx - incl %ecx - movl %edi, 48(%esp) - movl %ecx, 52(%esp) - movl %eax, 56(%esp) - movl %edx, 60(%esp) - movl %edi, 64(%esp) - movl %edi, 68(%esp) - addl $12, %esp - lea 100(%esp), %eax - lea 36(%esp), %edx - pushl %eax - pushl 36(%esp) - pushl %edx - call __dpml_multiply__ -..B1.14: - addl $12, %esp - pushl %esi - lea 104(%esp), %eax - pushl %eax - lea 44(%esp), %edx - pushl %edx - call __dpml_multiply__ -..B1.15: - addl $20, %esp - lea 160+__sqrt_x_table@GOTOFF(%ebx), %eax - pushl %esi - pushl $0 - pushl $9 - pushl %esi - pushl %eax - call __dpml_addsub__ -..B1.16: - movl 12(%ebp), %edx - andl $1, %edx - orl %edi, %edx - je ..B1.18 -..B1.17: - lea 112(%esp), %eax - jmp ..B1.19 -..B1.18: - lea 48(%esp), %eax -..B1.19: - addl $12, %esp - pushl %esi - pushl %eax - pushl %esi - call __dpml_multiply__ -..B1.20: - addl $4, %esp - decl 4(%esi) - lea 80(%esp), %eax - pushl %eax - call fesetenv@PLT -..B1.21: - movl 12(%ebp), %edx - xorl %eax, %eax - andl $2, %edx - orl %eax, %edx - jne ..B1.26 -..B1.23: - movl 136(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.25 -..B1.24: - xorl %edx, %edx - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - call __stack_chk_fail@PLT -..B1.26: - addl $12, %esp - pushl %eax - pushl %eax - pushl %esi - call __dpml_ffs_and_shift__ -..B1.27: - movl 16(%esi), %edx - xorl %ecx, %ecx - movl 20(%esi), %eax - movl %edx, 40(%esp) - movl %eax, 36(%esp) - lea 8(%edx), %edi - andl $16368, %edi - orl %ecx, %edi - je ..B1.29 -..B1.28: - xorl %eax, %eax - jmp ..B1.23 -..B1.29: - lea 48(%esp), %edi - pushl %edi - lea 116(%esp), %eax - pushl %eax - pushl %esi - pushl %esi - movl %edx, %edi - andl $-32768, %edi - movl %edi, -72(%eax) - addl $16384, %edi - movl -76(%eax), %edx - adcl $0, %edx - movl %edx, -80(%eax) - movl %edi, 16(%esi) - movl %edx, 20(%esi) - call __dpml_extended_multiply__ -..B1.30: - addl $36, %esp - lea 92(%esp), %eax - pushl %eax - pushl $0 - pushl $1 - pushl %eax - pushl 40(%esp) - call __dpml_addsub__ -..B1.31: - addl $20, %esp - lea 92(%esp), %edx - pushl %edx - pushl $0 - pushl $1 - lea 40(%esp), %eax - pushl %eax - pushl %edx - call __dpml_addsub__ -..B1.32: - movl 112(%esp), %eax - testl %eax, %eax - movl 32(%esp), %edx - je ..L5 - movl 40(%esp), %edi -..L5: - je ..L6 - movl 36(%esp), %edx -..L6: - xorl %ecx, %ecx - movl %edi, 16(%esi) - movl 12(%ebp), %edi - andl $4, %edi - movl %edx, 20(%esi) - orl %ecx, %edi - je ..B1.28 -..B1.33: - movl 4(%esi), %edx - testl %eax, %eax - movl $0, %eax - sete %al - addl $-113, %edx - subl %edx, 116(%esp) - addl $20, %esp - orl $8, %eax - lea 92(%esp), %ecx - pushl %ecx - pushl $0 - pushl %eax - pushl %esi - pushl %ecx - call __dpml_addsub__ -..B1.34: - movl $8192, %eax - movl 128(%esp), %edx - subl %eax, %edx - orl 132(%esp), %edx - jne ..B1.28 -..B1.35: - movl $1, %eax - jmp ..B1.23 - .align 16,0x90 - .type __dpml_ux_sqrt_evaluation__,@function - .size __dpml_ux_sqrt_evaluation__,.-__dpml_ux_sqrt_evaluation__ - .data -# -- End __dpml_ux_sqrt_evaluation__ - .text -# -- Begin __sqrtq - .text - .align 16,0x90 - .globl __sqrtq -__sqrtq: -# parameter 1: 24 + %ebp -..B2.1: -..L7: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $132, %esp - xorl %esi, %esi - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 128(%esp) - call ..L8 -..L8: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L8](%ebx), %ebx - movl $1, 40(%esp) - movl %esi, 44(%esp) - movl %esi, 32(%esp) - lea __sqrt_x_table@GOTOFF(%ebx), %ecx - movl %esi, 36(%esp) - addl $24, %esp - lea 8(%esp), %eax - lea 60(%esp), %edx - pushl %eax - lea 92(%esp), %eax - pushl %eax - pushl %ecx - pushl %edx - pushl %esi - lea 24(%ebp), %ecx - pushl %ecx - call __dpml_unpack_x_or_y__ -..B2.2: - subl %esi, %edx - jl ..B2.8 -..B2.3: - movl $7, 4(%esp) - lea 60(%esp), %edx - movl $0, 8(%esp) - lea 84(%esp), %eax - call __dpml_ux_sqrt_evaluation__. -..B2.4: - orl %edx, %eax - jne ..B2.6 -..B2.5: - movl $1, %edx - jmp ..B2.7 -..B2.6: - movl %esi, %edx -..B2.7: - movl %edx, 40(%esp) - movl %esi, 44(%esp) - addl $28, %esp - lea 4(%esp), %edx - pushl %edx - pushl %esi - pushl %esi - pushl %esi - pushl %esi - lea 104(%esp), %ecx - pushl %ecx - lea 56(%esp), %esi - pushl %esi - call __dpml_pack__ -..B2.8: - movl 112(%esp), %edx - movl %edx, (%edi) - movl 116(%esp), %ecx - movl 120(%esp), %esi - movl 124(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 128(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B2.10 -..B2.9: - movl %edi, %eax - addl $132, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B2.10: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __sqrtq,@function - .size __sqrtq,.-__sqrtq - .data -# -- End __sqrtq - .text -# -- Begin __rsqrtq - .text - .align 16,0x90 - .globl __rsqrtq -__rsqrtq: -# parameter 1: 24 + %ebp -..B3.1: -..L9: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $132, %esp - xorl %esi, %esi - movl %gs:20, %edx - movl 8(%ebp), %edi - xorl %esp, %edx - movl %edx, 128(%esp) - call ..L10 -..L10: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L10](%ebx), %ebx - movl $1, 40(%esp) - movl %esi, 44(%esp) - movl %esi, 32(%esp) - lea 8+__sqrt_x_table@GOTOFF(%ebx), %ecx - movl %esi, 36(%esp) - addl $24, %esp - lea 8(%esp), %eax - lea 60(%esp), %edx - pushl %eax - lea 92(%esp), %eax - pushl %eax - pushl %ecx - pushl %edx - pushl %esi - lea 24(%ebp), %ecx - pushl %ecx - call __dpml_unpack_x_or_y__ -..B3.2: - subl %esi, %edx - jl ..B3.8 -..B3.3: - movl %esi, 4(%esp) - lea 60(%esp), %edx - movl %esi, 8(%esp) - lea 84(%esp), %eax - call __dpml_ux_sqrt_evaluation__. -..B3.4: - orl %edx, %eax - jne ..B3.6 -..B3.5: - movl $1, %edx - jmp ..B3.7 -..B3.6: - movl %esi, %edx -..B3.7: - movl %edx, 40(%esp) - movl %esi, 44(%esp) - addl $28, %esp - lea 4(%esp), %edx - pushl %edx - pushl %esi - pushl %esi - pushl %esi - pushl %esi - lea 104(%esp), %ecx - pushl %ecx - lea 56(%esp), %esi - pushl %esi - call __dpml_pack__ -..B3.8: - movl 112(%esp), %edx - movl %edx, (%edi) - movl 116(%esp), %ecx - movl 120(%esp), %esi - movl 124(%esp), %edx - movl %ecx, 4(%edi) - movl %esi, 8(%edi) - movl %edx, 12(%edi) - movl 128(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B3.10 -..B3.9: - movl %edi, %eax - addl $132, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret $4 -..B3.10: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __rsqrtq,@function - .size __rsqrtq,.-__rsqrtq - .data -# -- End __rsqrtq - .text -# -- Begin __dpml_ux_hypot__ - .text - .align 16,0x90 - .globl __dpml_ux_hypot__ -__dpml_ux_hypot__: -# parameter 1: 144 + %esp -# parameter 2: 148 + %esp -# parameter 3: 152 + %esp -..B4.1: -..L11: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $124, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl 144(%esp), %edx - movl %eax, 112(%esp) - addl $12, %esp - lea 28(%esp), %esi - pushl %esi - pushl %edx - pushl %edx - call __dpml_multiply__ -..B4.2: - addl $12, %esp - movl 136(%esp), %eax - lea 52(%esp), %ebx - pushl %ebx - pushl %eax - pushl %eax - call __dpml_multiply__ -..B4.3: - addl $20, %esp - xorl %ebp, %ebp - lea 68(%esp), %edi - pushl %edi - pushl %ebp - pushl %ebp - pushl %ebx - pushl %esi - call __dpml_addsub__ -..B4.4: - addl $12, %esp - pushl %ebp - pushl %ebp - pushl %edi - call __dpml_ffs_and_shift__ -..B4.5: - movl %edi, %eax - movl $7, 4(%esp) - movl 152(%esp), %edx - movl $0, 8(%esp) - call __dpml_ux_sqrt_evaluation__..0 -..B4.6: - movl %eax, %ecx - orl %edx, %ecx - je ..B4.27 -..B4.7: - movl 44(%esp), %eax - subl 68(%esp), %eax - cltd - movl %edx, %edi - subl %ebp, %edi - jge ..B4.9 -..B4.8: - movl %eax, %esi - movl %ebp, %eax - subl %esi, %eax - movl %edx, %edi - movl %ebp, %edx - movl %ebx, %esi - sbbl %edi, %edx -..B4.9: - movl $128, %ebx - movl %eax, %edi - subl %ebx, %edi - movl %edx, %ebx - sbbl %ebp, %ebx - jl ..B4.11 -..B4.34: - orl %ebx, %edi - je ..B4.11 -..B4.10: - movl %ebp, %eax - movl %eax, %edx - jmp ..B4.27 -..B4.11: - movl $1, %ecx - movl %ebp, %edi -..B4.12: - movl 8(%esi,%ecx,8), %ebp - movl 12(%esi,%ecx,8), %ebx - movl %ebp, 36(%esp) - orl %ebx, %ebp - movl %ebx, 32(%esp) - jne ..B4.31 -..B4.13: - movl $64, %ebx - movl %eax, %ebp - subl %ebx, %ebp - movl $0, %ebx - movl %edx, %ebp - sbbl %ebx, %ebp - jl ..B4.15 -..B4.14: - addl $-64, %eax - adcl $-1, %edx - addl $-1, %ecx - adcl $-1, %edi - movl %edi, %ebp - subl %ebx, %ebp - jge ..B4.12 -..B4.15: - movl 36(%esp), %esi - xorl %ebp, %ebp -..B4.16: - cmpl $31, %eax - jbe ..B4.18 -..B4.17: - movl %eax, %ecx - movl %ebp, %edx - movl 32(%esp), %ebx - shrl %cl, %ebx - jmp ..B4.19 -..B4.18: - movl %eax, %ecx - movl %esi, %ebx - movl 32(%esp), %edx - shrdl %cl, %edx, %ebx - shrl %cl, %edx -..B4.19: - cmpl $31, %eax - jbe ..B4.21 -..B4.20: - movl %eax, %ecx - movl %ebx, %edx - shll %cl, %edx - movl %ebp, %edi - jmp ..B4.22 -..B4.21: - movl %eax, %ecx - movl %ebx, %edi - shldl %cl, %ebx, %edx - shll %cl, %edi -..B4.22: - movl 32(%esp), %eax - subl %edi, %esi - subl %edx, %eax - orl %eax, %esi - jne ..B4.24 -..B4.23: - movl $1, %eax - jmp ..B4.25 -..B4.24: - movl %ebp, %eax -..B4.25: - movl %ebp, %edx -..B4.27: - movl 112(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B4.29 -..B4.28: - addl $124, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B4.29: - call ..L12 -..L12: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L12](%ebx), %ebx - call __stack_chk_fail@PLT -..B4.31: - xorl %ebp, %ebp - movl %ebp, %eax - xorl %edx, %edx - jmp ..B4.27 - .align 16,0x90 - .type __dpml_ux_hypot__,@function - .size __dpml_ux_hypot__,.-__dpml_ux_hypot__ - .data -# -- End __dpml_ux_hypot__ - .text -# -- Begin __dpml_ux_sqrt_evaluation__..0 - .text - .align 16,0x90 -__dpml_ux_sqrt_evaluation__..0: -# parameter 1: %eax -# parameter 2: 12 + %ebp -# parameter 3: %edx -..B5.1: -..L13: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $148, %esp - movl %edx, 76(%esp) - movl %eax, 72(%esp) - movl %gs:20, %ecx - xorl %esp, %ecx - movl %ecx, 136(%esp) - addl $4, %esp - call ..L14 -..L14: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L14](%ebx), %ebx - lea 80(%esp), %eax - pushl %eax - call fegetenv@PLT -..B5.2: - movl 72(%esp), %esi - movl %ebx, 36(%esp) - movl 8(%esi), %edi - movl %edi, %edx - movl 12(%esi), %eax - movl %eax, %ecx - shll $21, %ecx - shrl $11, %edx - orl %edx, %ecx - movl 4(%esi), %edx - movl 20(%esi), %ebx - movl %edx, %esi - andl $1, %esi - movl %ebx, 40(%esp) - movl %eax, %ebx - shrl $11, %ebx - addl %esi, %edx - addl $1070596096, %ebx - movl %ebx, 68(%esp) - lea 8(%esi), %ebx - movl %ebx, 32(%esp) - negl %ebx - movl %ecx, 64(%esp) - movl %ebx, %ecx - negl %ecx - sarl $1, %edx - addl $31, %ecx - movl %edx, 44(%esp) - movl %edi, %edx - shrl %cl, %edx - movl %ebx, %ecx - movl %eax, 80(%esp) - shrl $1, %edx - shll %cl, %eax - shll %cl, %edi - orl %edx, %eax - movl 40(%esp), %edx - movl 36(%esp), %ebx -..B5.3: - movl 32(%esp), %ecx - shrl %cl, %edx -..B5.5: - fldl 64(%esp) - orl %edx, %edi - movl %eax, %edx - shll $21, %edx - shrl $11, %edi - shrl $11, %eax - orl %edi, %edx - movl %edx, 48(%esp) - movl %eax, 52(%esp) - fildll 48(%esp) - fstpl 56(%esp) - fldl 56(%esp) -..B5.6: - movl 80(%esp), %eax - shrl %cl, %eax -..B5.8: - fmull 136+__sqrt_x_table@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - movl 80(%esp), %ecx - shrl $24, %ecx - shll $7, %esi - xorl %esi, %ecx - shll $4, %ecx - movl __sqrt_t_table@GOT(%ebx), %edx - movl %eax, 48(%esp) - fildl 48(%esp) - fstpl 56(%esp) - fldl 56(%esp) - fmull 128+__sqrt_x_table@GOTOFF(%ebx) - fstpl 56(%esp) - fldl 56(%esp) - fxch %st(2) - fstpl 56(%esp) - fldl 56(%esp) - fld %st(0) - fadd %st(3), %st - fxch %st(2) - fmuls (%edx,%ecx) - flds 4(%edx,%ecx) - fmulp %st, %st(5) - fxch %st(4) - faddl 8(%edx,%ecx) - faddp %st, %st(4) - fxch %st(3) - fstpl 56(%esp) - fldl 56(%esp) - fmull 96+__sqrt_x_table@GOTOFF(%ebx) - fstpl 56(%esp) - fldl 56(%esp) - fxch %st(1) - fstpl 56(%esp) - fldl 56(%esp) - fld %st(0) - fmul %st(2), %st - fstps 48(%esp) - flds 48(%esp) - fxch %st(2) - fstps 48(%esp) - flds 48(%esp) - fmul %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fld %st(3) - fmulp %st, %st(2) - fldl 152+__sqrt_x_table@GOTOFF(%ebx) - fmulp %st, %st(3) - fld %st(3) - fmul %st(4), %st - fmulp %st, %st(3) - fxch %st(1) - fsubrl 104+__sqrt_x_table@GOTOFF(%ebx) - fsubp %st, %st(1) - fstpl 56(%esp) - fldl 56(%esp) - fldl 112+__sqrt_x_table@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(2) - fsubrl 144+__sqrt_x_table@GOTOFF(%ebx) - fmulp %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpl 56(%esp) - fldl 56(%esp) - flds .L_2il0floatpacket.20@GOTOFF(%ebx) - fld %st(0) - fsubr %st(3), %st - fxch %st(1) - fcomp %st(3) - fnstsw %ax - fxch %st(1) - fmull 120+__sqrt_x_table@GOTOFF(%ebx) - sahf - fxch %st(2) - jp ..L16 - jbe ..L15 -..L16: - fst %st(1) -..L15: - fstp %st(0) - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 64(%esp) - fldcw 32(%esp) - movl 64(%esp), %edx - fnstcw 32(%esp) - movzwl 32(%esp), %eax - orl $3072, %eax - movl %eax, 40(%esp) - fldcw 40(%esp) - fistpll 64(%esp) - fldcw 32(%esp) - shll $7, %edx - movl 64(%esp), %ecx - movl %ecx, %esi - movl 68(%esp), %edi - movl %edi, %eax - shll $20, %eax - shrl $12, %esi - shrl $11, %ecx - orl %esi, %eax - sarl $12, %edi - andl $1, %ecx - addl %edi, %edx - addl %ecx, %eax - adcl $0, %edx - xorl %esi, %esi - movl %edx, %ecx - andl $1073741824, %ecx - orl %esi, %ecx - je ..B5.10 -..B5.9: - movl $2147483647, %edi - jmp ..B5.11 -..B5.10: - movl $-1, %edi -..B5.11: - movl %edx, %esi - xorl %ecx, %ecx - subl %ecx, %esi - jl ..B5.13 -..B5.12: - movl $-1, %eax - movl %edi, %edx -..B5.13: - movl 44(%esp), %esi - xorl %ecx, %ecx - negl %esi - incl %esi - movl %ecx, 48(%esp) - movl %esi, 52(%esp) - movl %eax, 56(%esp) - movl %edx, 60(%esp) - movl %ecx, 64(%esp) - movl %ecx, 68(%esp) - addl $12, %esp - lea 100(%esp), %esi - lea 36(%esp), %eax - pushl %esi - pushl 64(%esp) - pushl %eax - call __dpml_multiply__ -..B5.14: - addl $12, %esp - pushl 64(%esp) - pushl %esi - lea 44(%esp), %eax - pushl %eax - call __dpml_multiply__ -..B5.15: - addl $20, %esp - lea 160+__sqrt_x_table@GOTOFF(%ebx), %edx - movl 56(%esp), %eax - pushl %eax - pushl $0 - pushl $9 - pushl %eax - pushl %edx - call __dpml_addsub__ -..B5.16: - addl $12, %esp - movl 64(%esp), %eax - pushl %eax - pushl %esi - pushl %eax - call __dpml_multiply__ -..B5.17: - addl $4, %esp - lea 80(%esp), %eax - pushl %eax - movl -8(%eax), %edx - decl 4(%edx) - call fesetenv@PLT -..B5.18: - addl $12, %esp - xorl %ecx, %ecx - pushl %ecx - pushl %ecx - pushl 72(%esp) - call __dpml_ffs_and_shift__ -..B5.19: - movl 76(%esp), %eax - xorl %edi, %edi - movl 16(%eax), %ecx - movl 20(%eax), %edx - movl %ecx, 44(%esp) - movl %edx, 40(%esp) - lea 8(%ecx), %eax - andl $16368, %eax - orl %edi, %eax - jne ..B5.32 -..B5.21: - lea 48(%esp), %eax - pushl %eax - pushl %esi - movl 28(%eax), %edi - pushl %edi - pushl %edi - movl %ecx, %edx - andl $-32768, %edx - movl %edx, -4(%eax) - addl $16384, %edx - movl -8(%eax), %ecx - adcl $0, %ecx - movl %edx, -12(%eax) - movl %ecx, -16(%eax) - movl %edx, 16(%edi) - movl %ecx, 20(%edi) - call __dpml_extended_multiply__ -..B5.22: - addl $36, %esp - pushl %esi - pushl $0 - pushl $1 - pushl %esi - pushl 68(%esp) - call __dpml_addsub__ -..B5.23: - addl $20, %esp - pushl %esi - pushl $0 - pushl $1 - lea 40(%esp), %eax - pushl %eax - pushl %esi - call __dpml_addsub__ -..B5.24: - movl 112(%esp), %eax - testl %eax, %eax - jne ..B5.26 -..B5.25: - movl %edi, %ecx - movl 36(%esp), %eax - movl 32(%esp), %edx - movl 4(%ecx), %edi - addl $-113, %edi - movl %eax, 16(%ecx) - movl %edx, 20(%ecx) - subl %edi, 116(%esp) - jmp ..B5.27 -..B5.26: - movl 44(%esp), %edx - movl 40(%esp), %ecx - movl %edx, 16(%edi) - movl 4(%edi), %edx - addl $-113, %edx - subl %edx, 116(%esp) - movl %ecx, 20(%edi) - testl %eax, %eax - jne ..B5.28 -..B5.27: - movl $1, %eax - jmp ..B5.29 -..B5.28: - xorl %eax, %eax -..B5.29: - addl $20, %esp - orl $8, %eax - pushl %esi - pushl $0 - pushl %eax - pushl 68(%esp) - pushl %esi - call __dpml_addsub__ -..B5.30: - movl $8192, %eax - movl 128(%esp), %edx - subl %eax, %edx - orl 132(%esp), %edx - jne ..B5.32 -..B5.31: - movl $1, %eax - jmp ..B5.34 -..B5.32: - xorl %eax, %eax -..B5.34: - movl 136(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B5.36 -..B5.35: - xorl %edx, %edx - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B5.36: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __dpml_ux_sqrt_evaluation__..0,@function - .size __dpml_ux_sqrt_evaluation__..0,.-__dpml_ux_sqrt_evaluation__..0 - .data -# -- End __dpml_ux_sqrt_evaluation__..0 - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.20: - .long 0x5f000000 - .type .L_2il0floatpacket.20,@object - .size .L_2il0floatpacket.20,4 - .align 4 -__sqrt_x_table: - .long 1088750600 - .long 605086734 - .long 1088766984 - .long 519758862 - .long 112 - .long 0 - .long 113 - .long 0 - .long 114 - .long 0 - .long 0 - .long 0 - .long 0 - .long 268435456 - .long 858997845 - .long 34 - .long 1636176969 - .long 409044504 - .long 1099306057 - .long 404751376 - .long 545392672 - .long 404783624 - .long 142938632 - .long 302522498 - .long 1719614413 - .long 1073127582 - .long 0 - .long 1072693248 - .long 0 - .long 1097859072 - .long 0 - .long 1151336448 - .long 0 - .long 1047527424 - .long 0 - .long 991952896 - .long 0 - .long 1072431104 - .long 0 - .long 1071120384 - .long 0 - .long 2 - .long 0 - .long 3221225472 - .long 0 - .long 0 - .long 0 - .long 0 - .type __sqrt_x_table,@object - .size __sqrt_x_table,192 - .data - .hidden __dpml_extended_multiply__ - .hidden __dpml_multiply__ - .hidden __dpml_ffs_and_shift__ - .hidden __dpml_addsub__ - .hidden __dpml_pack__ - .hidden __dpml_unpack_x_or_y__ - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_trig.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_trig.S deleted file mode 100644 index 111fd34910..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/dpml_ux_trig.S +++ /dev/null @@ -1,4138 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_trig.c" - .text -..TXTST0: -# -- Begin __dpml_ux_radian_reduce__ - .text - .align 16,0x90 -__dpml_ux_radian_reduce__: -# parameter 1: 176 + %esp -# parameter 2: 180 + %esp -# parameter 3: 188 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $156, %esp - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - movl %eax, 76(%esp) - movl 176(%esp), %eax - movl 8(%eax), %edx - movl 12(%eax), %ecx - movl %edx, 108(%esp) - movl %ecx, 104(%esp) - movl 16(%eax), %edx - movl 20(%eax), %ecx - movl 4(%eax), %ebp - testl %ebp, %ebp - movl (%eax), %ebx - movl %edx, 128(%esp) - movl %ecx, 132(%esp) - movl %ebp, 112(%esp) - movl %ebx, 80(%esp) - jl ..B1.120 -..B1.2: - movl %ebp, %eax - xorl %ebp, %ebp - cltd - addl $8, %eax - movl %eax, %edi - adcl $0, %edx - andl $63, %eax - movl 76(%esp), %ebx - shll $26, %edx - shrl $6, %edi - orl %edx, %edi - movl __four_over_pi@GOT(%ebx), %esi - movl %edi, 72(%esp) - movl %eax, 112(%esp) - lea (%esi,%edi,8), %ecx - movl (%ecx), %ebx - movl 4(%ecx), %esi - movl %ebx, 60(%esp) - movl %esi, 56(%esp) - movl 8(%ecx), %edx - movl 12(%ecx), %edi - movl 16(%ecx), %ebx - movl 20(%ecx), %esi - movl %edx, 68(%esp) - movl %edi, 64(%esp) - movl %ebx, 36(%esp) - movl %esi, 32(%esp) - movl 24(%ecx), %ebx - movl 28(%ecx), %esi - movl 32(%ecx), %edx - movl 36(%ecx), %edi - addl $40, %ecx - movl %edx, 120(%esp) - orl %eax, %ebp - movl %edi, 124(%esp) - movl %ecx, 116(%esp) - je ..B1.28 -..B1.3: - movl %eax, %ecx - movl %ecx, %edx - negl %edx - addl $64, %edx - movl %edx, 72(%esp) - cmpl $31, %ecx - jbe ..B1.5 -..B1.4: - xorl %edx, %edx - movl 60(%esp), %ebp - shll %cl, %ebp - movl %ebp, 56(%esp) - jmp ..B1.6 -..B1.5: - movl 56(%esp), %ebp - movl 60(%esp), %edx - shldl %cl, %edx, %ebp - movl %ebp, 56(%esp) - shll %cl, %edx -..B1.6: - cmpl $31, 72(%esp) - jbe ..B1.8 -..B1.7: - movl 72(%esp), %ecx - xorl %ebp, %ebp - movl 64(%esp), %edi - shrl %cl, %edi - movl %edi, 60(%esp) - jmp ..B1.9 -..B1.8: - movl 72(%esp), %ecx - movl 68(%esp), %edi - movl 64(%esp), %ebp - shrdl %cl, %ebp, %edi - movl %edi, 60(%esp) - shrl %cl, %ebp -..B1.9: - orl %edx, 60(%esp) - orl %ebp, 56(%esp) - cmpl $31, 112(%esp) - jbe ..B1.11 -..B1.10: - movl %eax, %ecx - xorl %edx, %edx - movl 68(%esp), %ebp - shll %cl, %ebp - movl %ebp, 64(%esp) - jmp ..B1.12 -..B1.11: - movl %eax, %ecx - movl 64(%esp), %ebp - movl 68(%esp), %edx - shldl %cl, %edx, %ebp - movl %ebp, 64(%esp) - shll %cl, %edx -..B1.12: - cmpl $31, 72(%esp) - jbe ..B1.14 -..B1.13: - movl 72(%esp), %ecx - xorl %ebp, %ebp - movl 32(%esp), %edi - shrl %cl, %edi - movl %edi, 68(%esp) - jmp ..B1.15 -..B1.14: - movl 72(%esp), %ecx - movl 36(%esp), %edi - movl 32(%esp), %ebp - shrdl %cl, %ebp, %edi - movl %edi, 68(%esp) - shrl %cl, %ebp -..B1.15: - orl %edx, 68(%esp) - orl %ebp, 64(%esp) - cmpl $31, 112(%esp) - jbe ..B1.17 -..B1.16: - movl %eax, %ecx - xorl %edx, %edx - movl 36(%esp), %ebp - shll %cl, %ebp - movl %ebp, 32(%esp) - jmp ..B1.18 -..B1.17: - movl %eax, %ecx - movl 32(%esp), %ebp - movl 36(%esp), %edx - shldl %cl, %edx, %ebp - movl %ebp, 32(%esp) - shll %cl, %edx -..B1.18: - cmpl $31, 72(%esp) - jbe ..B1.20 -..B1.19: - movl %esi, %edi - xorl %ebp, %ebp - movl 72(%esp), %ecx - shrl %cl, %edi - movl %edi, 36(%esp) - jmp ..B1.21 -..B1.20: - movl %ebx, %ebp - movl 72(%esp), %ecx - shrdl %cl, %esi, %ebp - movl %ebp, 36(%esp) - movl %esi, %ebp - shrl %cl, %ebp -..B1.21: - orl %edx, 36(%esp) - orl %ebp, 32(%esp) - cmpl $31, 112(%esp) - jbe ..B1.23 -..B1.22: - movl %ebx, %esi - xorl %edx, %edx - movl %eax, %ecx - shll %cl, %esi - jmp ..B1.24 -..B1.23: - movl %ebx, %edx - movl %eax, %ecx - shldl %cl, %ebx, %esi - shll %cl, %edx -..B1.24: - cmpl $31, 72(%esp) - jbe ..B1.26 -..B1.25: - movl 72(%esp), %ecx - xorl %ebp, %ebp - movl 124(%esp), %ebx - shrl %cl, %ebx - jmp ..B1.27 -..B1.26: - movl 72(%esp), %ecx - movl 120(%esp), %ebx - movl 124(%esp), %ebp - shrdl %cl, %ebp, %ebx - shrl %cl, %ebp -..B1.27: - orl %edx, %ebx - orl %ebp, %esi -..B1.28: - movl %ebx, %eax - movl 128(%esp), %ecx - mull %ecx - movl %ebx, %eax - movl %edx, %ebp - mull 132(%esp) - addl %eax, %ebp - movl %ecx, %eax - movl %edx, %edi - adcl $0, %edi - mull %esi - addl %ebp, %eax - movl %edx, %ecx - adcl %edi, %ecx - subl %ebp, %eax - movl %ecx, %edx - sbbl %edi, %edx - jae ..B1.30 -..B1.29: - movl $1, %ebp - jmp ..B1.31 -..B1.30: - xorl %ebp, %ebp -..B1.31: - movl %esi, %eax - movl 132(%esp), %edi - mull %edi - addl %edx, %ebp - addl %ecx, %eax - movl %esi, %ecx - movl %eax, 88(%esp) - adcl $0, %ebp - movl 128(%esp), %eax - imull %ebx, %edi - imull %eax, %ecx - mull %ebx - addl %ecx, %edi - movl 104(%esp), %ecx - addl %edi, %edx - movl %edx, 100(%esp) - movl %esi, %edi - movl %ecx, %edx - movl %ebp, 92(%esp) - movl 108(%esp), %ebp - imull %ebp, %edi - imull %ebx, %edx - movl %eax, 96(%esp) - movl %ebx, %eax - addl %edx, %edi - mull %ebp - movl %eax, 40(%esp) - movl %ebx, %eax - addl %edi, %edx - movl %edx, 44(%esp) - mull %ebp - movl %ebx, %eax - movl %edx, %edi - mull %ecx - addl %eax, %edi - movl %ebp, %eax - movl %edx, %ebx - adcl $0, %ebx - mull %esi - addl %edi, %eax - movl 92(%esp), %ebp - adcl %ebx, %edx - subl %edi, %eax - movl %edx, 48(%esp) - sbbl %ebx, %edx - movl 88(%esp), %ebx - jae ..B1.33 -..B1.32: - movl $1, %ecx - jmp ..B1.34 -..B1.33: - xorl %ecx, %ecx -..B1.34: - movl %esi, %eax - mull 104(%esp) - movl %eax, %esi - addl %edx, %ecx - addl 48(%esp), %esi - movl 40(%esp), %eax - adcl $0, %ecx - addl %eax, %ebx - movl %ebx, %edx - movl 44(%esp), %edi - adcl %edi, %ebp - subl %eax, %edx - movl %ebp, %eax - sbbl %edi, %eax - jae ..B1.36 -..B1.35: - movl $1, %eax - jmp ..B1.37 -..B1.36: - xorl %eax, %eax -..B1.37: - addl %eax, %esi - movl %ebx, 88(%esp) - movl %esi, 84(%esp) - adcl $0, %ecx - movl 132(%esp), %ebx - movl %ebx, %edi - movl 32(%esp), %esi - movl %esi, %edx - movl %ebp, 92(%esp) - movl %ecx, 136(%esp) - movl 36(%esp), %ecx - movl 128(%esp), %ebp - movl %ebp, %eax - imull %ecx, %edi - imull %ebp, %edx - addl %edx, %edi - mull %ecx - movl %eax, 44(%esp) - movl %ebp, %eax - addl %edi, %edx - movl %edx, 48(%esp) - mull %ecx - movl %ecx, %eax - movl %edx, %edi - mull %ebx - addl %eax, %edi - movl %ebp, %eax - movl %edx, %ecx - adcl $0, %ecx - mull %esi - addl %edi, %eax - movl 84(%esp), %esi - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 52(%esp) - movl 88(%esp), %ebx - sbbl %ecx, %edx - movl 136(%esp), %ecx - movl 92(%esp), %ebp - jae ..B1.39 -..B1.38: - movl $1, %edi - jmp ..B1.40 -..B1.39: - xorl %edi, %edi -..B1.40: - movl 32(%esp), %eax - mull 132(%esp) - addl %edx, %edi - addl 52(%esp), %eax - movl %eax, 40(%esp) - movl 44(%esp), %eax - adcl $0, %edi - addl %eax, %ebx - movl %ebx, %edx - adcl 48(%esp), %ebp - subl %eax, %edx - movl %ebp, %eax - sbbl 48(%esp), %eax - jae ..B1.42 -..B1.41: - movl $1, 44(%esp) - jmp ..B1.43 -..B1.42: - movl $0, 44(%esp) -..B1.43: - movl 44(%esp), %eax - addl %eax, %esi - movl %esi, %edx - adcl $0, %ecx - subl %eax, %edx - movl $0, %eax - movl %ecx, %edx - sbbl %eax, %edx - jae ..B1.45 -..B1.44: - movl $1, 52(%esp) - jmp ..B1.46 -..B1.45: - movl $0, 52(%esp) -..B1.46: - movl 40(%esp), %eax - addl %eax, %esi - movl %esi, %edx - adcl %edi, %ecx - subl %eax, %edx - movl %ecx, %eax - sbbl %edi, %eax - jae ..B1.48 -..B1.47: - movl $1, %eax - jmp ..B1.49 -..B1.48: - xorl %eax, %eax -..B1.49: - movl %esi, 84(%esp) - movl %ebx, 88(%esp) - movl 104(%esp), %ebx - movl %ebx, %edi - movl 32(%esp), %esi - movl %esi, %edx - movl %ebp, 92(%esp) - movl %ecx, 136(%esp) - movl 36(%esp), %ecx - movl 108(%esp), %ebp - imull %ecx, %edi - imull %ebp, %edx - addl %eax, 52(%esp) - movl %ebp, %eax - addl %edx, %edi - mull %ecx - movl %eax, 40(%esp) - movl %ebp, %eax - addl %edi, %edx - movl %edx, 44(%esp) - mull %ecx - movl %ecx, %eax - movl %edx, %edi - mull %ebx - addl %eax, %edi - movl %ebp, %eax - movl %edx, %ecx - adcl $0, %ecx - mull %esi - addl %edi, %eax - movl 88(%esp), %ebx - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 48(%esp) - movl 84(%esp), %esi - sbbl %ecx, %edx - movl 136(%esp), %ecx - movl 92(%esp), %ebp - jae ..B1.51 -..B1.50: - movl $1, %edi - jmp ..B1.52 -..B1.51: - xorl %edi, %edi -..B1.52: - movl 32(%esp), %eax - mull 104(%esp) - addl %edx, %edi - addl 48(%esp), %eax - movl %eax, 36(%esp) - movl 40(%esp), %eax - adcl $0, %edi - addl %eax, %esi - movl %esi, %edx - adcl 44(%esp), %ecx - subl %eax, %edx - movl %ecx, %eax - sbbl 44(%esp), %eax - jae ..B1.54 -..B1.53: - movl $1, %eax - jmp ..B1.55 -..B1.54: - xorl %eax, %eax -..B1.55: - movl 52(%esp), %edx - addl 36(%esp), %edx - movl %ebp, 92(%esp) - adcl $0, %edi - addl %eax, %edx - movl %ecx, 136(%esp) - movl 132(%esp), %ecx - adcl $0, %edi - movl 64(%esp), %ebp - movl %esi, 84(%esp) - movl %ecx, %esi - movl %edx, 52(%esp) - movl %ebp, %edx - movl %ebx, 88(%esp) - movl %edi, 48(%esp) - movl 68(%esp), %edi - movl 128(%esp), %ebx - movl %ebx, %eax - imull %edi, %esi - imull %ebx, %edx - addl %edx, %esi - mull %edi - movl %eax, 32(%esp) - movl %ebx, %eax - addl %esi, %edx - movl %edx, 40(%esp) - mull %edi - movl %edi, %eax - movl %edx, %esi - mull %ecx - addl %eax, %esi - movl %ebx, %eax - movl %edx, %edi - adcl $0, %edi - mull %ebp - addl %esi, %eax - movl 88(%esp), %ebx - adcl %edi, %edx - subl %esi, %eax - movl %edx, 44(%esp) - movl 136(%esp), %ecx - sbbl %edi, %edx - movl 48(%esp), %edi - movl 84(%esp), %esi - movl 92(%esp), %ebp - jae ..B1.57 -..B1.56: - movl $1, 48(%esp) - jmp ..B1.58 -..B1.57: - movl $0, 48(%esp) -..B1.58: - movl 64(%esp), %eax - mull 132(%esp) - movl %ebx, 88(%esp) - movl 48(%esp), %ebx - addl %edx, %ebx - addl 44(%esp), %eax - movl %eax, 36(%esp) - movl 32(%esp), %eax - adcl $0, %ebx - addl %eax, %esi - movl %esi, %edx - movl %ebx, 48(%esp) - movl 40(%esp), %ebx - adcl %ebx, %ecx - subl %eax, %edx - movl %ecx, %eax - sbbl %ebx, %eax - movl 88(%esp), %ebx - jae ..B1.60 -..B1.59: - movl $1, 32(%esp) - jmp ..B1.61 -..B1.60: - movl $0, 32(%esp) -..B1.61: - movl %esi, 84(%esp) - movl %ebx, 88(%esp) - movl 104(%esp), %esi - movl 68(%esp), %ebx - movl 108(%esp), %eax - movl 64(%esp), %edx - imull %ebx, %esi - imull %eax, %edx - addl %edx, %esi - mull %ebx - movl %ecx, 136(%esp) - movl %eax, %ecx - movl %edx, %ebx - addl %esi, %ebx - addl 52(%esp), %ecx - movl 60(%esp), %esi - movl 56(%esp), %edx - adcl %edi, %ebx - movl 132(%esp), %edi - movl 128(%esp), %eax - imull %esi, %edi - imull %eax, %edx - addl %edx, %edi - mull %esi - addl 36(%esp), %ecx - adcl 48(%esp), %ebx - addl %edi, %edx - addl 32(%esp), %ecx - adcl $0, %ebx - addl %ecx, %eax - movl 180(%esp), %ecx - movl %ecx, %edi - adcl %ebx, %edx - negl %edi - cmpl $0, 80(%esp) - movl %eax, 140(%esp) - jne ..L3 - movl %ecx, %edi -..L3: - xorl %eax, %eax - shll $29, %edi - addl %edi, %edx - movl %eax, 44(%esp) - movl 88(%esp), %ebx - movl %edx, 152(%esp) - movl %eax, 40(%esp) - jmp ..B1.62 -..B1.96: - addl $64, 44(%esp) - movl 152(%esp), %ecx - movl 136(%esp), %edx - movl 84(%esp), %eax - movl 32(%esp), %esi - movl 36(%esp), %edi - movl %ebx, 84(%esp) - movl %ebp, 136(%esp) - movl 96(%esp), %ebx - movl 100(%esp), %ebp - adcl $0, 40(%esp) - andl $-536870912, %ecx - andl $536870911, %edx - orl %edx, %ecx - movl %eax, 140(%esp) - movl %ecx, 152(%esp) - movl %esi, 96(%esp) - movl %edi, 100(%esp) -..B1.62: - movl 152(%esp), %eax - xorl %edx, %edx - lea 4194304(%eax), %ecx - andl $1065353216, %ecx - orl %edx, %ecx - jne ..B1.119 -..B1.63: - movl 116(%esp), %eax - movl 120(%esp), %esi - movl 124(%esp), %edi - movl (%eax), %edx - movl %edx, 120(%esp) - xorl %edx, %edx - movl 4(%eax), %ecx - addl $8, %eax - movl %ecx, 124(%esp) - movl %eax, 116(%esp) - orl 112(%esp), %edx - je ..B1.71 -..B1.64: - cmpl $31, 112(%esp) - jbe ..B1.66 -..B1.65: - movl %esi, %edi - xorl %edx, %edx - movl 112(%esp), %ecx - shll %cl, %edi - jmp ..B1.67 -..B1.66: - movl %esi, %edx - movl 112(%esp), %ecx - shldl %cl, %esi, %edi - shll %cl, %edx -..B1.67: - cmpl $31, 72(%esp) - jbe ..B1.69 -..B1.68: - movl 72(%esp), %ecx - xorl %eax, %eax - movl 124(%esp), %esi - shrl %cl, %esi - jmp ..B1.70 -..B1.69: - movl 72(%esp), %ecx - movl 120(%esp), %esi - movl 124(%esp), %eax - shrdl %cl, %eax, %esi - shrl %cl, %eax -..B1.70: - orl %edx, %esi - orl %eax, %edi -..B1.71: - movl 132(%esp), %ecx - movl %edi, %edx - movl %ebx, 88(%esp) - movl %ecx, %ebx - movl %ebp, 92(%esp) - movl 128(%esp), %ebp - movl %ebp, %eax - imull %esi, %ebx - imull %ebp, %edx - addl %edx, %ebx - mull %esi - movl %eax, 32(%esp) - movl %ebp, %eax - addl %ebx, %edx - movl %edx, 36(%esp) - mull %esi - movl %esi, %eax - movl %edx, %ebx - mull %ecx - addl %eax, %ebx - movl %ebp, %eax - movl %edx, %ecx - adcl $0, %ecx - mull %edi - addl %ebx, %eax - movl 92(%esp), %ebp - adcl %ecx, %edx - subl %ebx, %eax - movl %edx, 56(%esp) - movl 88(%esp), %ebx - sbbl %ecx, %edx - jae ..B1.73 -..B1.72: - movl $1, %ecx - jmp ..B1.74 -..B1.73: - xorl %ecx, %ecx -..B1.74: - movl 132(%esp), %eax - mull %edi - addl %edx, %ecx - addl 56(%esp), %eax - movl 96(%esp), %edx - adcl $0, %ecx - addl %eax, %edx - movl %ebx, 88(%esp) - movl 100(%esp), %ebx - adcl %ecx, %ebx - movl %edx, 96(%esp) - subl %eax, %edx - movl %ebx, 100(%esp) - sbbl %ecx, %ebx - movl 88(%esp), %ebx - jae ..B1.76 -..B1.75: - movl $1, %ecx - jmp ..B1.77 -..B1.76: - xorl %ecx, %ecx -..B1.77: - movl 104(%esp), %edx - addl %ecx, %ebx - movl 108(%esp), %eax - movl %edi, 64(%esp) - adcl $0, %ebp - imull %esi, %edx - imull %eax, %edi - addl %edi, %edx - movl %ebx, %edi - movl %edx, 68(%esp) - mull %esi - addl 68(%esp), %edx - subl %ecx, %edi - movl $0, %ecx - movl %edx, 52(%esp) - movl %ebp, %edx - movl %eax, 48(%esp) - sbbl %ecx, %edx - movl 64(%esp), %edi - jae ..B1.80 -..B1.78: - movl $1, %ecx -..B1.80: - movl 108(%esp), %eax - mull %esi - movl %esi, %eax - movl %ebx, 88(%esp) - movl %edx, %ebx - mull 104(%esp) - addl %eax, %ebx - movl %edx, %esi - movl 108(%esp), %eax - adcl $0, %esi - mull %edi - addl %ebx, %eax - adcl %esi, %edx - subl %ebx, %eax - movl %edx, 60(%esp) - movl 88(%esp), %ebx - sbbl %esi, %edx - jae ..B1.82 -..B1.81: - movl $1, %esi - jmp ..B1.83 -..B1.82: - xorl %esi, %esi -..B1.83: - movl 104(%esp), %eax - mull %edi - addl %edx, %esi - addl 60(%esp), %eax - movl %eax, 144(%esp) - movl 48(%esp), %edx - adcl $0, %esi - movl 96(%esp), %eax - addl %edx, %eax - movl %esi, 148(%esp) - movl 52(%esp), %esi - movl 100(%esp), %edi - adcl %esi, %edi - movl %eax, 96(%esp) - subl %edx, %eax - movl %edi, 100(%esp) - movl 144(%esp), %eax - sbbl %esi, %edi - movl 148(%esp), %esi - jae ..B1.85 -..B1.84: - movl $1, %edx - jmp ..B1.86 -..B1.85: - xorl %edx, %edx -..B1.86: - addl %edx, %ebx - movl %ebx, %edi - adcl $0, %ebp - subl %edx, %edi - movl $0, %edx - movl %ebp, %edi - sbbl %edx, %edi - jae ..B1.89 -..B1.87: - movl $1, %edx -..B1.89: - addl %eax, %ebx - adcl %esi, %ebp - addl %edx, %ecx - movl %ebx, %edx - subl %eax, %edx - movl %ebp, %eax - sbbl %esi, %eax - jae ..B1.91 -..B1.90: - movl $1, %eax - jmp ..B1.92 -..B1.91: - xorl %eax, %eax -..B1.92: - addl %eax, %ecx - xorl %eax, %eax - orl %eax, %ecx - je ..B1.95 -..B1.93: - movl 84(%esp), %eax - addl $1, %eax - movl 136(%esp), %edx - adcl $0, %edx - movl %eax, 84(%esp) - orl %edx, %eax - movl %edx, 136(%esp) - jne ..B1.95 -..B1.94: - addl $1, 140(%esp) - adcl $0, 152(%esp) -..B1.95: - movl 140(%esp), %ecx - movl %ecx, %eax - movl 152(%esp), %esi - shrl $23, %eax - shll $9, %esi - orl %esi, %eax - movl 136(%esp), %edx - movl %eax, %edi - shrl $23, %edx - shll $9, %ecx - sarl $31, %edi - orl %ecx, %edx - xorl %edi, %edx - xorl %edi, %eax - orl %eax, %edx - je ..B1.96 -..B1.97: - movl 136(%esp), %ecx - movl 84(%esp), %esi - movl 152(%esp), %edx -..B1.98: - movl %ebx, 88(%esp) - lea (,%edx,4), %edi - movl 140(%esp), %ebx - movl %ebx, %eax - sarl $2, %edi - subl %ebx, %eax - movl %eax, 32(%esp) - movl %edi, %eax - sbbl %edi, %edx - sarl $31, %eax - subl %eax, %ebx - negl %eax - addl %edi, %eax - movl %edi, 36(%esp) - orl %eax, %ebx - movl 88(%esp), %ebx - jne ..B1.100 -..B1.99: - movl %esi, 140(%esp) - movl %ebx, %esi - movl %ecx, 36(%esp) - movl %ebp, %ecx - movl 96(%esp), %ebx - movl 100(%esp), %ebp - addl $64, 44(%esp) -..B1.100: - xorl %eax, %eax - subl %eax, %edi - jge ..B1.103 -..B1.102: - movl $-2147483648, %eax -..B1.103: - testl %eax, %eax - je ..B1.111 -..B1.104: - notl %ebx - notl %ebp - addl $1, %ebx - notl %esi - movl %ebx, %edi - notl %ecx - adcl $0, %ebp - notl 140(%esp) - orl %ebp, %edi - notl 36(%esp) - jne ..B1.106 -..B1.105: - movl $1, %edi - jmp ..B1.107 -..B1.106: - xorl %edi, %edi -..B1.107: - addl %edi, %esi - movl %esi, %edi - adcl $0, %ecx - orl %ecx, %edi - jne ..B1.109 -..B1.108: - movl $1, %edi - jmp ..B1.110 -..B1.109: - xorl %edi, %edi -..B1.110: - addl %edi, 140(%esp) - adcl $0, 36(%esp) -..B1.111: - movl %ebp, 92(%esp) - xorl %edi, %edi - movl %ebx, 88(%esp) - addl $12, %esp - pushl %edi - pushl %edi - movl 184(%esp), %ebx - xorl %ebp, %ebp - pushl %ebx - subl 32(%esp), %ebp - movl 80(%esp), %ebp - sbbl %edx, %edi - testl %ebp, %ebp - movl $3, 4(%ebx) - jne ..L4 - movl %edx, %edi -..L4: - xorl %ebp, %eax - movl %eax, (%ebx) - movl 140(%esp), %eax - movl 36(%esp), %edx - movl %eax, 8(%ebx) - movl %edx, 12(%ebx) - movl %esi, 16(%ebx) - movl %ecx, 20(%ebx) - movl %edi, 40(%esp) - movl 88(%esp), %ebx - movl 92(%esp), %ebp - call __dpml_ffs_and_shift__ -..B1.112: - movl 188(%esp), %ecx - movl 4(%ecx), %eax - movl %eax, %ecx - cltd - addl $-3, %ecx - adcl $-1, %edx - orl %ecx, %edx - je ..B1.117 -..B1.113: - movl 188(%esp), %esi - addl $64, %ecx - cmpl $31, %ecx - movl 16(%esi), %edx - movl 20(%esi), %esi - jbe ..B1.115 -..B1.114: - movl %ebp, %ebx - xorl %edi, %edi - shrl %cl, %ebx - jmp ..B1.116 -..B1.115: - movl %ebp, %edi - shrdl %cl, %ebp, %ebx - shrl %cl, %edi -..B1.116: - movl 188(%esp), %ecx - orl %ebx, %edx - orl %edi, %esi - movl %edx, 16(%ecx) - movl %esi, 20(%ecx) -..B1.117: - addl $12, %esp - movl 176(%esp), %ebx - pushl %ebx - movl 68(%esp), %edx - lea 1008+__trig_x_table@GOTOFF(%edx), %ecx - pushl %ecx - pushl %ebx - subl 44(%esp), %eax - movl %eax, 4(%ebx) - call __dpml_multiply__ -..B1.118: - movl 40(%esp), %eax - xorl %edx, %edx - shrl $30, %eax - addl $156, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.119: - movl 136(%esp), %ecx - movl 84(%esp), %esi - movl %eax, %edx - jmp ..B1.98 -..B1.120: - movl %ebx, %eax - sarl $31, %eax - movl 180(%esp), %ecx - cltd - addl %ecx, %eax - movl %eax, %ebp - movl 184(%esp), %ebx - adcl %ebx, %edx - andl $1, %ebp - addl %ebp, %eax - movl %eax, %edi - adcl $0, %edx - subl %eax, %ecx - movl %edx, %ebp - movl %edx, %esi - sbbl %edx, %ebx - shll $31, %ebp - shrl $1, %edi - sarl $1, %esi - orl %edi, %ebp - movl %esi, 32(%esp) - orl %ebx, %ecx - movl %ebp, 36(%esp) - je ..B1.125 -..B1.121: - xorl %eax, %eax - subl %eax, %ebx - jge ..B1.124 -..B1.123: - movl $1, %eax -..B1.124: - addl $20, %esp - pushl 168(%esp) - pushl $0 - pushl %eax - movl 68(%esp), %eax - lea 1008+__trig_x_table@GOTOFF(%eax), %edx - pushl %edx - pushl 172(%esp) - call __dpml_addsub__ - jmp ..B1.126 -..B1.125: - movl 188(%esp), %eax - movl 176(%esp), %esi - movl 108(%esp), %ebx - movl 104(%esp), %ebp - movl 80(%esp), %edx - movl %ebx, 8(%eax) - movl %ebp, 12(%eax) - movl %edx, (%eax) - movl 112(%esp), %ecx - movl 16(%esi), %edi - movl 20(%esi), %edx - movl %ecx, 4(%eax) - movl %edi, 16(%eax) - movl %edx, 20(%eax) -..B1.126: - movl 36(%esp), %eax - movl 32(%esp), %edx - addl $156, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret - .align 16,0x90 - .type __dpml_ux_radian_reduce__,@function - .size __dpml_ux_radian_reduce__,.-__dpml_ux_radian_reduce__ - .data -# -- End __dpml_ux_radian_reduce__ - .text -# -- Begin __dpml_ux_degree_reduce__ - .text - .align 16,0x90 -__dpml_ux_degree_reduce__: -# parameter 1: 128 + %esp -# parameter 2: 132 + %esp -# parameter 3: 140 + %esp -..B2.1: -..L5: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $108, %esp - movl 128(%esp), %ecx - call ..L6 -..L6: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L6](%eax), %eax - movl (%ecx), %edx - movl 4(%ecx), %ebx - cmpl $142, %ebx - movl %eax, 52(%esp) - movl %edx, 48(%esp) - jle ..B2.6 -..B2.2: - movl %eax, %ebp - lea 32641(%ebx), %esi - movl %esi, %eax - cltd - movl %edx, %ecx - mull 264+__trig_x_table@GOTOFF(%ebp) - movl %esi, %eax - movl 268+__trig_x_table@GOTOFF(%ebp), %edi - movl %edx, %ebp - mull %edi - movl %edx, %esi - addl %eax, %ebp - movl 52(%esp), %edx - adcl $0, %esi - movl 264+__trig_x_table@GOTOFF(%edx), %eax - mull %ecx - addl %ebp, %eax - adcl %esi, %edx - subl %ebp, %eax - movl %edx, 16(%esp) - sbbl %esi, %edx -..B2.5: - movl %edi, %eax - mull %ecx - addl 16(%esp), %eax - movl 128(%esp), %edi - lea (,%eax,8), %ebp - lea (%ebp,%eax,4), %esi - negl %esi - lea 32772(%esi,%ebx), %ebx - movl %ebx, 4(%edi) -..B2.6: - cmpl $16, %ebx - jl ..B2.61 -..B2.7: - movl %ebx, %eax - movl %ebx, %ebp - cltd - addl $-15, %ebp - movl %edx, %esi - movl %ebp, %ecx - adcl $-1, %esi - xorl %edx, %edx - andl $63, %ecx - movl %esi, %edi - subl %ecx, %ebx - shll $26, %edi - shrl $6, %ebp - sarl $6, %esi - orl %ebp, %edi - movl %edi, 56(%esp) - orl %ecx, %edx - je ..B2.21 -..B2.8: - movl 128(%esp), %edx - movl %ecx, %edi - negl %edi - addl $64, %edi - movl 20(%edx), %ebp - cmpl $31, %ecx - movl %edi, 28(%esp) - movl 16(%edx), %edi - movl %ebp, 16(%esp) - jbe ..B2.10 -..B2.9: - movl %edi, %edx - xorl %ebp, %ebp - shll %cl, %edx - jmp ..B2.11 -..B2.10: - movl %edi, %ebp - movl 16(%esp), %edx - shldl %cl, %edi, %edx - shll %cl, %ebp -..B2.11: - movl 128(%esp), %eax - cmpl $31, %ecx - movl %ebp, 16(%eax) - movl 12(%eax), %ebp - movl %edx, 20(%eax) - movl 8(%eax), %edx - movl %ebp, 24(%esp) - jbe ..B2.13 -..B2.12: - movl %edx, %ebp - movl $0, 32(%esp) - shll %cl, %ebp - jmp ..B2.14 -..B2.13: - movl %edx, %eax - shll %cl, %eax - shldl %cl, %edx, %ebp - movl %eax, 32(%esp) -..B2.14: - cmpl $31, 28(%esp) - jbe ..B2.16 -..B2.15: - movl 28(%esp), %ecx - movl 16(%esp), %edi - movl $0, 20(%esp) - shrl %cl, %edi - jmp ..B2.17 -..B2.16: - movl 28(%esp), %ecx - movl 16(%esp), %eax - shrdl %cl, %eax, %edi - shrl %cl, %eax - movl %eax, 20(%esp) -..B2.17: - movl 32(%esp), %eax - orl %edi, %eax - movl 128(%esp), %edi - orl 20(%esp), %ebp - cmpl $31, 28(%esp) - movl %eax, 8(%edi) - movl %ebp, 12(%edi) - jbe ..B2.19 -..B2.18: - xorl %ebp, %ebp - movl 24(%esp), %edx - shrl %cl, %edx - jmp ..B2.22 -..B2.19: - movl 24(%esp), %ebp - shrdl %cl, %ebp, %edx - shrl %cl, %ebp - jmp ..B2.22 -..B2.21: - xorl %edx, %edx - xorl %ebp, %ebp -..B2.22: - movl 128(%esp), %edi - movl %esi, %ecx - movl %edx, (%edi) - movl 56(%esp), %edx - movl %ebp, 4(%edi) - movl 8(%edi,%edx,8), %eax - movl 12(%edi,%edx,8), %edi - movl %edi, %ebp - xorl %edx, %edx - shrl $20, %ebp - subl %edx, %ecx - jl ..B2.55 -..B2.23: - movl 56(%esp), %edi - addl $1, %edi - movl %edi, 32(%esp) - adcl $0, %esi - movl %esi, %eax - movl %edi, 72(%esp) - testl %eax, %eax - jge ..B2.25 -..B2.24: - addl $1, 72(%esp) - adcl $0, %eax -..B2.25: - movl 72(%esp), %edi - shrdl $1, %eax, %edi - sarl $1, %eax - movl %edi, 72(%esp) - xorl %edi, %edi - movl %eax, %ecx - movl %edi, 28(%esp) - subl %edi, %ecx - movl %edi, 24(%esp) - jb ..B2.104 -..B2.107: - orl 72(%esp), %ecx - je ..B2.104 -..B2.26: - xorl %ecx, %ecx - movl %ecx, 64(%esp) - movl %ecx, 60(%esp) - movl %eax, 76(%esp) - movl %edi, 68(%esp) - movl %ebx, 20(%esp) - movl %esi, 16(%esp) - movl %edi, 80(%esp) - movl 28(%esp), %ecx - movl 24(%esp), %eax -..B2.27: - movl 56(%esp), %edi - movl 64(%esp), %ebx - movl 128(%esp), %esi - addl %edi, %ebx - movl %ebx, 84(%esp) - movl (%esi,%ebx,8), %edi - movl %edi, 100(%esp) - movl 4(%esi,%ebx,8), %edi - movl %edi, 88(%esp) - xorl %edi, %edi - movl %edi, (%esi,%ebx,8) - movl %edi, 4(%esi,%ebx,8) - movl %ecx, %esi - movl 100(%esp), %ebx - orl %eax, %esi - je ..B2.35 -..B2.28: - cmpl $31, %ecx - jbe ..B2.30 -..B2.29: - xorl %esi, %esi - jmp ..B2.31 -..B2.30: - movl %ebx, %esi - shll %cl, %esi -..B2.31: - andl $4095, %esi - xorl %edi, %edi - addl %esi, %ebp - adcl $0, %edx - movl $12, %esi - subl %ecx, %esi - sbbl %eax, %edi - movl %edi, 36(%esp) - cmpl $31, %esi - jbe ..B2.33 -..B2.32: - movl %esi, %ecx - xorl %eax, %eax - movl 88(%esp), %ebx - shrl %cl, %ebx - jmp ..B2.34 -..B2.33: - movl %esi, %ecx - movl 88(%esp), %eax - shrdl %cl, %eax, %ebx - shrl %cl, %eax -..B2.34: - movl %eax, 88(%esp) - xorl %eax, %eax - xorl %ecx, %ecx - subl %esi, %ecx - sbbl 36(%esp), %eax -..B2.35: - movl 88(%esp), %edi - movl %edi, %esi - shrl $28, %edi - andl $268435455, %esi - addl %edi, %ebx - adcl $0, %esi - addl %ebp, %ebx - adcl %edx, %esi - addl $4, %ecx - movl %esi, 96(%esp) - movl 128(%esp), %esi - adcl $0, %eax - movl 84(%esp), %edx - movl -4(%esi,%edx,8), %edi - movl -8(%esi,%edx,8), %ebp - movl %edi, 92(%esp) - xorl %edi, %edi - movl %edi, -8(%esi,%edx,8) - movl %edi, -4(%esi,%edx,8) - movl %ecx, %edx - orl %eax, %edx - je ..B2.43 -..B2.36: - cmpl $31, %ecx - jbe ..B2.38 -..B2.37: - movl $0, 44(%esp) - jmp ..B2.39 -..B2.38: - movl %ebp, %edx - shll %cl, %edx - movl %edx, 44(%esp) -..B2.39: - movl 44(%esp), %edx - xorl %esi, %esi - andl $4095, %edx - addl %edx, %ebx - adcl $0, 96(%esp) - movl $12, %edx - subl %ecx, %edx - sbbl %eax, %esi - movl %esi, 40(%esp) - cmpl $31, %edx - jbe ..B2.41 -..B2.40: - movl %edx, %ecx - xorl %eax, %eax - movl 92(%esp), %ebp - shrl %cl, %ebp - jmp ..B2.42 -..B2.41: - movl %edx, %ecx - movl 92(%esp), %eax - shrdl %cl, %eax, %ebp - shrl %cl, %eax -..B2.42: - movl %eax, 92(%esp) - xorl %eax, %eax - xorl %ecx, %ecx - subl %edx, %ecx - sbbl 40(%esp), %eax -..B2.43: - movl 92(%esp), %esi - movl %esi, %edx - shrl $28, %esi - andl $268435455, %edx - addl %esi, %ebp - movl 68(%esp), %edi - adcl $0, %edx - addl %ebx, %ebp - movl 80(%esp), %ebx - adcl 96(%esp), %edx - addl $4, %ecx - adcl $0, %eax - addl $-2, 64(%esp) - adcl $-1, 60(%esp) - addl $1, %ebx - movl %ebx, 80(%esp) - adcl $0, %edi - subl 72(%esp), %ebx - movl %edi, 68(%esp) - sbbl 76(%esp), %edi - jb ..B2.27 -..B2.44: - movl 80(%esp), %edi - movl %eax, 24(%esp) - movl %edi, %eax - movl %ecx, 28(%esp) - addl %edi, %edi - movl 68(%esp), %ecx - shrl $31, %eax - addl %ecx, %ecx - orl %ecx, %eax - addl $1, %edi - movl 20(%esp), %ebx - movl 16(%esp), %esi - adcl $0, %eax -..B2.45: - movl %edi, %ecx - addl $-1, %ecx - adcl $-1, %eax - subl %ecx, 32(%esp) - sbbl %eax, %esi - jb ..B2.103 -..B2.108: - movl 32(%esp), %eax - orl %esi, %eax - je ..B2.103 -..B2.46: - negl %edi - xorl %ecx, %ecx - addl 56(%esp), %edi - movl 128(%esp), %eax - movl 8(%eax,%edi,8), %esi - movl %esi, 16(%esp) - movl 12(%eax,%edi,8), %esi - movl %ecx, 8(%eax,%edi,8) - movl %ecx, 12(%eax,%edi,8) - movl 24(%esp), %edi - orl 28(%esp), %edi - je ..B2.54 -..B2.47: - cmpl $31, 28(%esp) - jbe ..B2.49 -..B2.48: - xorl %edi, %edi - jmp ..B2.50 -..B2.49: - movl 28(%esp), %ecx - movl 16(%esp), %edi - shll %cl, %edi -..B2.50: - andl $4095, %edi - addl %edi, %ebp - movl 28(%esp), %edi - adcl $0, %edx - negl %edi - addl $12, %edi - movl %edi, 28(%esp) - cmpl $31, %edi - jbe ..B2.52 -..B2.51: - movl %edi, %ecx - xorl %edi, %edi - shrl %cl, %esi - movl %esi, 16(%esp) - jmp ..B2.53 -..B2.52: - movl %edi, %ecx - movl 16(%esp), %edi - shrdl %cl, %esi, %edi - movl %edi, 16(%esp) - movl %esi, %edi - shrl %cl, %edi -..B2.53: - movl %edi, %esi -..B2.54: - movl %esi, %eax - shrl $28, %esi - andl $268435455, %eax - movl 16(%esp), %edi - addl %esi, %edi - movl 128(%esp), %esi - adcl $0, %eax - addl %edi, %ebp - movl 56(%esp), %edi - adcl %eax, %edx - movl 8(%esi,%edi,8), %eax - movl 12(%esi,%edi,8), %edi -..B2.55: - movl %edx, %esi - movl %ebp, %ecx - shll $20, %esi - shrl $12, %ecx - orl %ecx, %esi - shrl $12, %edx - movl %esi, %ecx - orl %edx, %ecx - je ..B2.59 -..B2.57: - andl $4095, %ebp - addl %esi, %ebp - movl %ebp, %ecx - adcl $0, %edx - movl %edx, %esi - shll $20, %esi - shrl $12, %ecx - orl %ecx, %esi - shrl $12, %edx - movl %esi, %ecx - orl %edx, %ecx - jne ..B2.57 -..B2.59: - addl $12, %esp - xorl %esi, %esi - pushl %esi - pushl %esi - movl 124(%esp), %edx - andl $1048575, %edi - pushl %edx - shll $20, %ebp - orl %ebp, %edi - movl 56(%esp), %ebp - movl %ebx, 4(%edx) - movl %eax, 8(%edx,%ebp,8) - movl %edi, 12(%edx,%ebp,8) - call __dpml_ffs_and_shift__ -..B2.60: - subl %eax, %ebx -..B2.61: - movl %ebx, %eax - addl $-5, %ebx - cltd - movl 128(%esp), %esi - adcl $-1, %edx - xorl %edi, %edi - subl %edi, %edx - movl %edi, (%esi) - movl 8(%esi), %ebp - movl 12(%esi), %esi - jl ..B2.66 -..B2.109: - orl %ebx, %edx - je ..B2.66 -..B2.62: - movl 52(%esp), %edi - movl %ebp, %eax - mull 256+__trig_x_table@GOTOFF(%edi) - movl %ebp, %eax - movl 260+__trig_x_table@GOTOFF(%edi), %ecx - movl %edx, %edi - mull %ecx - movl %ecx, 16(%esp) - movl %edx, %ecx - movl 52(%esp), %edx - addl %eax, %edi - adcl $0, %ecx - movl 256+__trig_x_table@GOTOFF(%edx), %eax - mull %esi - addl %edi, %eax - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 20(%esp) - sbbl %ecx, %edx - jae ..B2.64 -..B2.63: - movl $1, 28(%esp) - jmp ..B2.65 -..B2.64: - movl $0, 28(%esp) -..B2.65: - movl 16(%esp), %eax - mull %esi - movl 28(%esp), %edi - addl %edx, %edi - addl 20(%esp), %eax - movl %eax, 24(%esp) - adcl $0, %edi - movl %edi, 28(%esp) - jmp ..B2.67 -..B2.66: - xorl %edx, %edx - movl $1, %ebx - movl %edx, 24(%esp) - movl %edx, 28(%esp) -..B2.67: - negl %ebx - movl 132(%esp), %eax - andl $1, %eax - incl %eax - lea 64(%ebx), %edx - addl $63, %ebx - movl %edx, 16(%esp) - cmpl $31, %ebx - jbe ..B2.69 -..B2.68: - movl %ebx, %ecx - movl %eax, %edi - shll %cl, %edi - xorl %edx, %edx - jmp ..B2.70 -..B2.69: - movl %ebx, %ecx - xorl %edi, %edi - movl %eax, %edx - shldl %cl, %eax, %edi - shll %cl, %edx -..B2.70: - addl 24(%esp), %edx - adcl 28(%esp), %edi - cmpl $31, 16(%esp) - jbe ..B2.72 -..B2.71: - movl $1, %ebx - xorl %eax, %eax - movl 16(%esp), %ecx - shll %cl, %ebx - jmp ..B2.73 -..B2.72: - xorl %ebx, %ebx - movl $1, %eax - movl 16(%esp), %ecx - shldl %cl, %eax, %ebx - shll %cl, %eax -..B2.73: - addl $-1, %eax - notl %eax - adcl $-1, %ebx - andl %eax, %edx - notl %ebx - andl %ebx, %edi - cmpl $31, 16(%esp) - jbe ..B2.75 -..B2.74: - movl %edi, %eax - shrl %cl, %eax - jmp ..B2.76 -..B2.75: - movl %edx, %eax - shrdl %cl, %edi, %eax -..B2.76: - movl %eax, %ebx - negl %ebx - cmpl $0, 48(%esp) - jne ..L7 - movl %eax, %ebx -..L7: - movl 132(%esp), %eax - shrl $1, %eax - addl %ebx, %eax - movl %eax, 24(%esp) - movl $-1275068416, %eax - mull %edx - movl $-1275068416, %eax - movl %edx, %ecx - mull %edi - movl %edx, %ebx - movl %esi, %edi - movl %ebp, %edx - addl %ecx, %eax - adcl $0, %ebx - andl $3, %ebp - shll $30, %edi - shrl $2, %edx - orl %edx, %edi - shrl $2, %esi - subl %eax, %edi - sbbl %ebx, %esi - movl %edi, %ebx - shll $2, %edi - shrl $30, %ebx - orl %edi, %ebp - xorl %edi, %edi - lea (,%esi,4), %ecx - orl %ecx, %ebx - subl %edi, %esi - jl ..B2.99 -..B2.77: - addl $12, %esp - xorl %eax, %eax - pushl %eax - pushl %eax - movl 124(%esp), %edx - pushl %edx - movl %ebp, 8(%edx) - movl %ebx, 12(%edx) - call __dpml_ffs_and_shift__ -..B2.78: - movl 128(%esp), %esi - xorl %ebx, %ebx - andl $536870911, 24(%esp) - movl 8(%esi), %edi - movl %edi, %eax - movl 4(%esi), %ecx - movl 12(%esi), %esi - orl %esi, %eax - jne ..B2.81 -..B2.79: - movl 24(%esp), %ecx - xorl %eax, %eax - andl $2, %ecx - movl $536870912, %ebx - orl %eax, %ecx - je ..B2.97 -..B2.80: - movl 128(%esp), %eax - xorl $-2147483648, (%eax) - jmp ..B2.97 -..B2.81: - cmpl $5, %ecx - jl ..B2.96 -..B2.82: - movl 128(%esp), %eax - movl 16(%eax), %ebp - orl 20(%eax), %ebp - jne ..B2.96 -..B2.83: - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B2.85 -..B2.84: - movl %esi, %ebp - movl $0, 16(%esp) - shrl %cl, %ebp - jmp ..B2.86 -..B2.85: - movl %esi, %eax - movl %edi, %ebp - shrl %cl, %eax - shrdl %cl, %esi, %ebp - movl %eax, 16(%esp) -..B2.86: - cmpl $31, %ecx - jbe ..B2.88 -..B2.87: - movl %ebp, %eax - movl $0, 20(%esp) - shll %cl, %eax - jmp ..B2.89 -..B2.88: - movl %ebp, %edx - movl 16(%esp), %eax - shll %cl, %edx - shldl %cl, %ebp, %eax - movl %edx, 20(%esp) -..B2.89: - subl 20(%esp), %edi - subl %eax, %esi - orl %esi, %edi - jne ..B2.96 -..B2.90: - movl $30, %eax - negl %eax - addl %ebp, %eax - orl 16(%esp), %eax - jne ..B2.94 -..B2.91: - movl 24(%esp), %ecx - xorl %eax, %eax - andl $1, %ecx - orl %eax, %ecx - jne ..B2.96 -..B2.92: - movl 128(%esp), %ecx - movl $1073741824, %ebx - movl 48(%esp), %eax - xorl %eax, (%ecx) - jmp ..B2.97 -..B2.94: - movl $45, %eax - subl %eax, %ebp - orl 16(%esp), %ebp - jne ..B2.96 -..B2.95: - movl $-2147483648, %ebx -..B2.96: - movl 128(%esp), %ecx - movl 48(%esp), %eax - xorl %eax, (%ecx) -..B2.97: - addl $12, %esp - pushl 128(%esp) - movl 44(%esp), %eax - lea 216+__trig_x_table@GOTOFF(%eax), %ecx - pushl %ecx - pushl 124(%esp) - call __dpml_multiply__ -..B2.98: - movl 24(%esp), %eax - movl %ebx, %edx - addl $108, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B2.99: - movl 128(%esp), %edx - xorl %eax, %eax - xorl $-2147483648, 48(%esp) - movl 16(%edx), %ecx - movl 20(%edx), %esi - xorl %edx, %edx - subl %ecx, %edx - sbbl %esi, %eax - orl %esi, %ecx - je ..B2.101 -..B2.100: - movl $1, %ecx - jmp ..B2.102 -..B2.101: - xorl %ecx, %ecx -..B2.102: - movl 128(%esp), %esi - addl %ecx, %ebp - adcl $0, %ebx - movl %edx, 16(%esi) - xorl %edx, %edx - movl %eax, 20(%esi) - movl %ebp, %eax - xorl %ebp, %ebp - movl %ebx, %ecx - xorl %ebx, %ebx - subl %eax, %ebp - sbbl %ecx, %ebx - jmp ..B2.77 -..B2.103: - movl 56(%esp), %edi - movl 128(%esp), %esi - movl 8(%esi,%edi,8), %eax - movl 12(%esi,%edi,8), %edi - jmp ..B2.55 -..B2.104: - movl $1, %edi - xorl %eax, %eax - jmp ..B2.45 - .align 16,0x90 - .type __dpml_ux_degree_reduce__,@function - .size __dpml_ux_degree_reduce__,.-__dpml_ux_degree_reduce__ - .data -# -- End __dpml_ux_degree_reduce__ - .text -# -- Begin __dpml_ux_sincos - .text - .align 16,0x90 - .hidden __dpml_ux_sincos - .globl __dpml_ux_sincos -__dpml_ux_sincos: -# parameter 1: 192 + %esp -# parameter 2: 196 + %esp -# parameter 3: 204 + %esp -# parameter 4: 212 + %esp -..B3.1: -..L8: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $172, %esp - xorl %ecx, %ecx - call ..L9 -..L9: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L9](%eax), %eax - movl %eax, 148(%esp) - movl 204(%esp), %eax - andl $16, %eax - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 156(%esp) - orl %ecx, %eax - je ..B3.3 -..B3.2: - movl 148(%esp), %eax - lea __dpml_ux_degree_reduce__@GOTOFF(%eax), %edx - movl %edx, %eax - jmp ..B3.4 -..B3.3: - movl 148(%esp), %eax - lea __dpml_ux_radian_reduce__@GOTOFF(%eax), %edx - lea __dpml_ux_degree_reduce__@GOTOFF(%eax), %eax -..B3.4: - cmpl %eax, %edx - jne ..B3.119 -..B3.5: - movl 192(%esp), %edx - movl (%edx), %eax - movl 4(%edx), %ebx - cmpl $142, %ebx - movl %eax, 68(%esp) - jle ..B3.10 -..B3.6: - movl 148(%esp), %ebp - lea 32641(%ebx), %esi - movl %esi, %eax - cltd - movl %edx, %ecx - mull 264+__trig_x_table@GOTOFF(%ebp) - movl %esi, %eax - movl 268+__trig_x_table@GOTOFF(%ebp), %edi - movl %edx, %ebp - mull %edi - movl %edx, %esi - addl %eax, %ebp - movl 148(%esp), %edx - adcl $0, %esi - movl 264+__trig_x_table@GOTOFF(%edx), %eax - mull %ecx - addl %ebp, %eax - adcl %esi, %edx - subl %ebp, %eax - movl %edx, 32(%esp) - sbbl %esi, %edx -..B3.9: - movl %edi, %eax - mull %ecx - addl 32(%esp), %eax - movl 192(%esp), %edi - lea (,%eax,8), %ebp - lea (%ebp,%eax,4), %esi - negl %esi - lea 32772(%esi,%ebx), %ebx - movl %ebx, 4(%edi) -..B3.10: - cmpl $16, %ebx - jl ..B3.65 -..B3.11: - movl %ebx, %eax - movl %ebx, %ebp - cltd - addl $-15, %ebp - movl %edx, %esi - movl %ebp, %ecx - adcl $-1, %esi - xorl %edx, %edx - andl $63, %ecx - movl %esi, %edi - subl %ecx, %ebx - shll $26, %edi - shrl $6, %ebp - sarl $6, %esi - orl %ebp, %edi - movl %edi, 72(%esp) - orl %ecx, %edx - je ..B3.25 -..B3.12: - movl 192(%esp), %edx - movl %ecx, %edi - negl %edi - addl $64, %edi - movl 20(%edx), %ebp - cmpl $31, %ecx - movl %edi, 44(%esp) - movl 16(%edx), %edi - movl %ebp, 32(%esp) - jbe ..B3.14 -..B3.13: - movl %edi, %edx - xorl %ebp, %ebp - shll %cl, %edx - jmp ..B3.15 -..B3.14: - movl %edi, %ebp - movl 32(%esp), %edx - shldl %cl, %edi, %edx - shll %cl, %ebp -..B3.15: - movl 192(%esp), %eax - cmpl $31, %ecx - movl %ebp, 16(%eax) - movl 12(%eax), %ebp - movl %edx, 20(%eax) - movl 8(%eax), %edx - movl %ebp, 40(%esp) - jbe ..B3.17 -..B3.16: - movl %edx, %ebp - movl $0, 48(%esp) - shll %cl, %ebp - jmp ..B3.18 -..B3.17: - movl %edx, %eax - shll %cl, %eax - shldl %cl, %edx, %ebp - movl %eax, 48(%esp) -..B3.18: - cmpl $31, 44(%esp) - jbe ..B3.20 -..B3.19: - movl 44(%esp), %ecx - movl 32(%esp), %edi - movl $0, 36(%esp) - shrl %cl, %edi - jmp ..B3.21 -..B3.20: - movl 44(%esp), %ecx - movl 32(%esp), %eax - shrdl %cl, %eax, %edi - shrl %cl, %eax - movl %eax, 36(%esp) -..B3.21: - movl 48(%esp), %eax - orl %edi, %eax - movl 192(%esp), %edi - orl 36(%esp), %ebp - cmpl $31, 44(%esp) - movl %eax, 8(%edi) - movl %ebp, 12(%edi) - jbe ..B3.23 -..B3.22: - xorl %ebp, %ebp - movl 40(%esp), %edx - shrl %cl, %edx - jmp ..B3.26 -..B3.23: - movl 40(%esp), %ebp - shrdl %cl, %ebp, %edx - shrl %cl, %ebp - jmp ..B3.26 -..B3.25: - xorl %edx, %edx - xorl %ebp, %ebp -..B3.26: - movl 192(%esp), %edi - movl %edx, (%edi) - movl 72(%esp), %edx - movl %ebp, 4(%edi) - movl 8(%edi,%edx,8), %eax - movl 12(%edi,%edx,8), %edi - movl %edi, %ebp - shrl $20, %ebp - xorl %edx, %edx - movl %ebp, 48(%esp) - movl %esi, %ebp - subl %edx, %ebp - jl ..B3.59 -..B3.27: - movl 72(%esp), %eax - addl $1, %eax - movl %eax, 52(%esp) - adcl $0, %esi - movl %esi, %ebp - testl %ebp, %ebp - jge ..B3.29 -..B3.28: - addl $1, %eax - adcl $0, %ebp -..B3.29: - shrdl $1, %ebp, %eax - sarl $1, %ebp - xorl %edi, %edi - movl %ebp, %ecx - movl %edi, 44(%esp) - subl %edi, %ecx - movl %edi, 40(%esp) - jb ..B3.229 -..B3.262: - orl %eax, %ecx - je ..B3.229 -..B3.30: - xorl %ecx, %ecx - movl %ecx, 80(%esp) - movl %ecx, 76(%esp) - movl %ebp, 92(%esp) - movl %eax, 88(%esp) - movl %edi, 84(%esp) - movl %ebx, 32(%esp) - movl %esi, 36(%esp) - movl %edi, 100(%esp) - movl 44(%esp), %ecx - movl 40(%esp), %eax - movl 48(%esp), %ebp -..B3.31: - movl 72(%esp), %edi - movl 80(%esp), %ebx - movl 192(%esp), %esi - addl %edi, %ebx - movl %ebx, 96(%esp) - movl (%esi,%ebx,8), %edi - movl %edi, 116(%esp) - movl 4(%esi,%ebx,8), %edi - movl %edi, 104(%esp) - xorl %edi, %edi - movl %edi, (%esi,%ebx,8) - movl %edi, 4(%esi,%ebx,8) - movl %ecx, %esi - movl 116(%esp), %ebx - orl %eax, %esi - je ..B3.39 -..B3.32: - cmpl $31, %ecx - jbe ..B3.34 -..B3.33: - xorl %esi, %esi - jmp ..B3.35 -..B3.34: - movl %ebx, %esi - shll %cl, %esi -..B3.35: - andl $4095, %esi - xorl %edi, %edi - addl %esi, %ebp - adcl $0, %edx - movl $12, %esi - subl %ecx, %esi - sbbl %eax, %edi - movl %edi, 56(%esp) - cmpl $31, %esi - jbe ..B3.37 -..B3.36: - movl %esi, %ecx - xorl %eax, %eax - movl 104(%esp), %ebx - shrl %cl, %ebx - jmp ..B3.38 -..B3.37: - movl %esi, %ecx - movl 104(%esp), %eax - shrdl %cl, %eax, %ebx - shrl %cl, %eax -..B3.38: - movl %eax, 104(%esp) - xorl %eax, %eax - xorl %ecx, %ecx - subl %esi, %ecx - sbbl 56(%esp), %eax -..B3.39: - movl 104(%esp), %edi - movl %edi, %esi - shrl $28, %edi - andl $268435455, %esi - addl %edi, %ebx - adcl $0, %esi - addl %ebp, %ebx - adcl %edx, %esi - addl $4, %ecx - movl %esi, 112(%esp) - movl 192(%esp), %esi - adcl $0, %eax - movl 96(%esp), %edx - movl -4(%esi,%edx,8), %edi - movl -8(%esi,%edx,8), %ebp - movl %edi, 108(%esp) - xorl %edi, %edi - movl %edi, -8(%esi,%edx,8) - movl %edi, -4(%esi,%edx,8) - movl %ecx, %edx - orl %eax, %edx - je ..B3.47 -..B3.40: - cmpl $31, %ecx - jbe ..B3.42 -..B3.41: - movl $0, 64(%esp) - jmp ..B3.43 -..B3.42: - movl %ebp, %edx - shll %cl, %edx - movl %edx, 64(%esp) -..B3.43: - movl 64(%esp), %edx - xorl %esi, %esi - andl $4095, %edx - addl %edx, %ebx - adcl $0, 112(%esp) - movl $12, %edx - subl %ecx, %edx - sbbl %eax, %esi - movl %esi, 60(%esp) - cmpl $31, %edx - jbe ..B3.45 -..B3.44: - movl %edx, %ecx - xorl %eax, %eax - movl 108(%esp), %ebp - shrl %cl, %ebp - jmp ..B3.46 -..B3.45: - movl %edx, %ecx - movl 108(%esp), %eax - shrdl %cl, %eax, %ebp - shrl %cl, %eax -..B3.46: - movl %eax, 108(%esp) - xorl %eax, %eax - xorl %ecx, %ecx - subl %edx, %ecx - sbbl 60(%esp), %eax -..B3.47: - movl 108(%esp), %esi - movl %esi, %edx - shrl $28, %esi - andl $268435455, %edx - addl %esi, %ebp - movl 84(%esp), %edi - adcl $0, %edx - addl %ebx, %ebp - movl 100(%esp), %ebx - adcl 112(%esp), %edx - addl $4, %ecx - adcl $0, %eax - addl $-2, 80(%esp) - adcl $-1, 76(%esp) - addl $1, %ebx - movl %ebx, 100(%esp) - adcl $0, %edi - subl 88(%esp), %ebx - movl %edi, 84(%esp) - sbbl 92(%esp), %edi - jb ..B3.31 -..B3.48: - movl 100(%esp), %edi - movl %eax, 40(%esp) - movl %edi, %eax - movl %ebp, 48(%esp) - addl %edi, %edi - movl 84(%esp), %ebp - shrl $31, %eax - addl %ebp, %ebp - orl %ebp, %eax - addl $1, %edi - movl 32(%esp), %ebx - movl 36(%esp), %esi - adcl $0, %eax - movl %ecx, 44(%esp) -..B3.49: - movl %edi, %ebp - addl $-1, %ebp - adcl $-1, %eax - subl %ebp, 52(%esp) - sbbl %eax, %esi - jb ..B3.228 -..B3.263: - movl 52(%esp), %ebp - orl %esi, %ebp - je ..B3.228 -..B3.50: - negl %edi - xorl %esi, %esi - addl 72(%esp), %edi - movl 192(%esp), %eax - movl 8(%eax,%edi,8), %ebp - movl %ebp, 32(%esp) - movl 12(%eax,%edi,8), %ebp - movl %esi, 8(%eax,%edi,8) - movl %esi, 12(%eax,%edi,8) - movl 40(%esp), %edi - orl 44(%esp), %edi - je ..B3.58 -..B3.51: - cmpl $31, 44(%esp) - ja ..B3.54 -..B3.53: - movl 44(%esp), %ecx - movl 32(%esp), %esi - shll %cl, %esi -..B3.54: - andl $4095, %esi - addl %esi, 48(%esp) - movl 44(%esp), %esi - adcl $0, %edx - negl %esi - addl $12, %esi - movl %esi, 44(%esp) - cmpl $31, %esi - jbe ..B3.56 -..B3.55: - movl %esi, %ecx - xorl %esi, %esi - shrl %cl, %ebp - movl %ebp, 32(%esp) - jmp ..B3.57 -..B3.56: - movl %esi, %ecx - movl 32(%esp), %esi - shrdl %cl, %ebp, %esi - movl %esi, 32(%esp) - movl %ebp, %esi - shrl %cl, %esi -..B3.57: - movl %esi, %ebp -..B3.58: - movl %ebp, %edi - shrl $28, %ebp - andl $268435455, %edi - movl 32(%esp), %esi - addl %ebp, %esi - movl 192(%esp), %ebp - adcl $0, %edi - addl %esi, 48(%esp) - movl 72(%esp), %esi - adcl %edi, %edx - movl 8(%ebp,%esi,8), %eax - movl 12(%ebp,%esi,8), %edi -..B3.59: - movl %edx, %esi - movl 48(%esp), %ebp - shll $20, %esi - shrl $12, %ebp - orl %ebp, %esi - shrl $12, %edx - movl %esi, %ebp - orl %edx, %ebp - je ..B3.63 -..B3.60: - movl 48(%esp), %ebp -..B3.61: - andl $4095, %ebp - addl %esi, %ebp - movl %ebp, %ecx - adcl $0, %edx - movl %edx, %esi - shll $20, %esi - shrl $12, %ecx - orl %ecx, %esi - shrl $12, %edx - movl %esi, %ecx - orl %edx, %ecx - jne ..B3.61 -..B3.62: - movl %ebp, 48(%esp) -..B3.63: - addl $12, %esp - xorl %ebp, %ebp - pushl %ebp - pushl %ebp - movl 188(%esp), %edx - andl $1048575, %edi - pushl %edx - movl 48(%esp), %esi - shll $20, %esi - orl %esi, %edi - movl 72(%esp), %esi - movl %ebx, 4(%edx) - movl %eax, 8(%edx,%esi,8) - movl %edi, 12(%edx,%esi,8) - call __dpml_ffs_and_shift__ -..B3.64: - subl %eax, %ebx -..B3.65: - movl %ebx, %eax - addl $-5, %ebx - cltd - movl 192(%esp), %esi - adcl $-1, %edx - xorl %edi, %edi - subl %edi, %edx - movl %edi, (%esi) - movl 8(%esi), %ebp - movl 12(%esi), %esi - jl ..B3.70 -..B3.264: - orl %ebx, %edx - je ..B3.70 -..B3.66: - movl 148(%esp), %edi - movl %ebp, %eax - mull 256+__trig_x_table@GOTOFF(%edi) - movl %ebp, %eax - movl 260+__trig_x_table@GOTOFF(%edi), %ecx - movl %edx, %edi - mull %ecx - movl %ecx, 32(%esp) - movl %edx, %ecx - movl 148(%esp), %edx - addl %eax, %edi - adcl $0, %ecx - movl 256+__trig_x_table@GOTOFF(%edx), %eax - mull %esi - addl %edi, %eax - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 36(%esp) - sbbl %ecx, %edx - jae ..B3.68 -..B3.67: - movl $1, 44(%esp) - jmp ..B3.69 -..B3.68: - movl $0, 44(%esp) -..B3.69: - movl 32(%esp), %eax - mull %esi - movl 44(%esp), %edi - addl %edx, %edi - addl 36(%esp), %eax - movl %eax, 40(%esp) - adcl $0, %edi - movl %edi, 44(%esp) - jmp ..B3.71 -..B3.70: - xorl %edx, %edx - movl $1, %ebx - movl %edx, 40(%esp) - movl %edx, 44(%esp) -..B3.71: - negl %ebx - movl 196(%esp), %eax - andl $1, %eax - incl %eax - lea 64(%ebx), %edx - addl $63, %ebx - movl %edx, 32(%esp) - cmpl $31, %ebx - jbe ..B3.73 -..B3.72: - movl %ebx, %ecx - movl %eax, %edi - shll %cl, %edi - xorl %edx, %edx - jmp ..B3.74 -..B3.73: - movl %ebx, %ecx - xorl %edi, %edi - movl %eax, %edx - shldl %cl, %eax, %edi - shll %cl, %edx -..B3.74: - addl 40(%esp), %edx - adcl 44(%esp), %edi - cmpl $31, 32(%esp) - jbe ..B3.76 -..B3.75: - movl $1, %ebx - xorl %eax, %eax - movl 32(%esp), %ecx - shll %cl, %ebx - jmp ..B3.77 -..B3.76: - xorl %ebx, %ebx - movl $1, %eax - movl 32(%esp), %ecx - shldl %cl, %eax, %ebx - shll %cl, %eax -..B3.77: - addl $-1, %eax - notl %eax - adcl $-1, %ebx - andl %eax, %edx - notl %ebx - andl %ebx, %edi - cmpl $31, 32(%esp) - jbe ..B3.79 -..B3.78: - movl %edi, %eax - shrl %cl, %eax - jmp ..B3.80 -..B3.79: - movl %edx, %eax - shrdl %cl, %edi, %eax -..B3.80: - movl %eax, %ebx - negl %ebx - cmpl $0, 68(%esp) - jne ..L10 - movl %eax, %ebx -..L10: - movl 196(%esp), %eax - shrl $1, %eax - addl %ebx, %eax - movl %eax, 44(%esp) - movl $-1275068416, %eax - mull %edx - movl $-1275068416, %eax - movl %edx, %ecx - mull %edi - movl %edx, %ebx - movl %esi, %edi - movl %ebp, %edx - addl %ecx, %eax - adcl $0, %ebx - andl $3, %ebp - shll $30, %edi - shrl $2, %edx - orl %edx, %edi - shrl $2, %esi - subl %eax, %edi - sbbl %ebx, %esi - movl %edi, %ebx - shll $2, %edi - shrl $30, %ebx - orl %edi, %ebp - xorl %edi, %edi - lea (,%esi,4), %ecx - orl %ecx, %ebx - subl %edi, %esi - jl ..B3.224 -..B3.81: - addl $12, %esp - xorl %eax, %eax - pushl %eax - pushl %eax - movl 188(%esp), %edx - pushl %edx - movl %ebp, 8(%edx) - movl %ebx, 12(%edx) - call __dpml_ffs_and_shift__ -..B3.82: - movl 192(%esp), %ebp - xorl %ebx, %ebx - movl 8(%ebp), %esi - movl %esi, %eax - movl 4(%ebp), %ecx - movl 12(%ebp), %ebp - orl %ebp, %eax - jne ..B3.85 -..B3.83: - movl 44(%esp), %edx - xorl %eax, %eax - andl $2, %edx - movl $536870912, %ebx - orl %eax, %edx - je ..B3.101 -..B3.84: - movl 192(%esp), %eax - xorl $-2147483648, (%eax) - jmp ..B3.101 -..B3.85: - cmpl $5, %ecx - jl ..B3.100 -..B3.86: - movl 192(%esp), %eax - movl 16(%eax), %edx - orl 20(%eax), %edx - jne ..B3.100 -..B3.87: - negl %ecx - addl $64, %ecx - cmpl $31, %ecx - jbe ..B3.89 -..B3.88: - movl %ebp, %edx - movl $0, 32(%esp) - shrl %cl, %edx - jmp ..B3.90 -..B3.89: - movl %ebp, %eax - movl %esi, %edx - shrl %cl, %eax - shrdl %cl, %ebp, %edx - movl %eax, 32(%esp) -..B3.90: - cmpl $31, %ecx - jbe ..B3.92 -..B3.91: - movl %edx, %eax - movl $0, 36(%esp) - shll %cl, %eax - jmp ..B3.93 -..B3.92: - movl %edx, %edi - movl 32(%esp), %eax - shll %cl, %edi - shldl %cl, %edx, %eax - movl %edi, 36(%esp) -..B3.93: - subl 36(%esp), %esi - subl %eax, %ebp - orl %ebp, %esi - jne ..B3.100 -..B3.94: - movl $30, %eax - negl %eax - addl %edx, %eax - orl 32(%esp), %eax - jne ..B3.98 -..B3.95: - movl 44(%esp), %edx - xorl %eax, %eax - andl $1, %edx - orl %eax, %edx - jne ..B3.100 -..B3.96: - movl 192(%esp), %edx - movl $1073741824, %ebx - movl 68(%esp), %eax - xorl %eax, (%edx) - jmp ..B3.101 -..B3.98: - movl $45, %eax - subl %eax, %edx - orl 32(%esp), %edx - jne ..B3.100 -..B3.99: - movl $-2147483648, %ebx -..B3.100: - movl 192(%esp), %edx - movl 68(%esp), %eax - xorl %eax, (%edx) -..B3.101: - addl $12, %esp - lea 36(%esp), %eax - pushl %eax - movl 100(%eax), %edx - lea 216+__trig_x_table@GOTOFF(%edx), %ecx - pushl %ecx - pushl 188(%esp) - call __dpml_multiply__ -..B3.103: - movl 204(%esp), %esi - movl $3, %eax - andl $-17, %esi - movl %esi, %edx - subl %eax, %edx - orl 208(%esp), %edx - jne ..B3.106 -..B3.105: - movl $1, %eax -..B3.106: - sarl $29, %ebx - andl %eax, %ebx - xorl %eax, %eax - orl %eax, %ebx - jne ..B3.108 -..B3.107: - movl $1, %ebp - jmp ..B3.109 -..B3.108: - xorl %ebp, %ebp -..B3.109: - movl %esi, %ecx - movl $3, %edx - subl %edx, %ecx - movl 44(%esp), %ebx - andl $1, %ebx - orl 208(%esp), %ecx - je ..B3.220 -..B3.110: - xorl %edx, %edx - orl %edx, %ebx - je ..B3.112 -..B3.111: - movl $1216, %ecx - jmp ..B3.113 -..B3.112: - movl $1038, %ecx -..B3.113: - addl $28, %esp - xorl %edx, %edx - movl 184(%esp), %ebx - pushl %ebx - pushl %edx - pushl %ecx - pushl %edx - pushl $13 - movl 140(%esp), %ecx - lea 272+__trig_x_table@GOTOFF(%ecx), %edi - pushl %edi - lea 44(%esp), %edx - pushl %edx - call __dpml_evaluate_rational__ -..B3.114: - movl 44(%esp), %ecx - xorl %edx, %edx - andl $2, %ecx - orl %edx, %ecx - je ..B3.116 -..B3.115: - xorl $-2147483648, (%ebx) -..B3.116: - movl $3, %edx - subl %edx, %esi - orl 208(%esp), %esi - je ..B3.216 -..B3.117: - movl 156(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B3.215 -..B3.118: - movl %ebp, %eax - xorl %edx, %edx - addl $172, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B3.119: - movl 192(%esp), %ebp - movl 8(%ebp), %eax - movl 12(%ebp), %edx - movl 16(%ebp), %ecx - movl 20(%ebp), %ebx - movl 4(%ebp), %edi - testl %edi, %edi - movl (%ebp), %esi - movl %eax, 104(%esp) - movl %edx, 100(%esp) - movl %ecx, 108(%esp) - movl %ebx, 112(%esp) - movl %edi, 128(%esp) - movl %esi, 76(%esp) - jl ..B3.253 -..B3.120: - movl %edi, %eax - cltd - addl $8, %eax - movl %eax, %edi - adcl $0, %edx - andl $63, %eax - movl 148(%esp), %ebp - shll $26, %edx - shrl $6, %edi - orl %edx, %edi - movl __four_over_pi@GOT(%ebp), %esi - movl %edi, 72(%esp) - movl %eax, 128(%esp) - lea (%esi,%edi,8), %ecx - movl (%ecx), %ebx - movl 4(%ecx), %ebp - movl 8(%ecx), %esi - movl 12(%ecx), %edi - movl 20(%ecx), %edx - movl %ebx, 60(%esp) - movl %ebp, 56(%esp) - movl %esi, 68(%esp) - movl %edi, 64(%esp) - movl %edx, 32(%esp) - movl 16(%ecx), %ebp - movl 24(%ecx), %edi - movl 28(%ecx), %esi - movl 32(%ecx), %ebx - movl 36(%ecx), %edx - addl $40, %ecx - movl %ecx, 120(%esp) - xorl %ecx, %ecx - movl %ebx, 116(%esp) - orl %eax, %ecx - movl %edx, 124(%esp) - je ..B3.146 -..B3.121: - movl %eax, %ecx - movl %ecx, %edx - negl %edx - addl $64, %edx - movl %edx, 72(%esp) - cmpl $31, %ecx - jbe ..B3.123 -..B3.122: - xorl %eax, %eax - movl 60(%esp), %edx - shll %cl, %edx - movl %edx, 56(%esp) - jmp ..B3.124 -..B3.123: - movl 56(%esp), %edx - movl 60(%esp), %eax - shldl %cl, %eax, %edx - movl %edx, 56(%esp) - shll %cl, %eax -..B3.124: - cmpl $31, 72(%esp) - jbe ..B3.126 -..B3.125: - movl 72(%esp), %ecx - xorl %edx, %edx - movl 64(%esp), %ebx - shrl %cl, %ebx - movl %ebx, 60(%esp) - jmp ..B3.127 -..B3.126: - movl 72(%esp), %ecx - movl 68(%esp), %ebx - movl 64(%esp), %edx - shrdl %cl, %edx, %ebx - movl %ebx, 60(%esp) - shrl %cl, %edx -..B3.127: - orl %eax, 60(%esp) - orl %edx, 56(%esp) - cmpl $31, 128(%esp) - jbe ..B3.129 -..B3.128: - movl 128(%esp), %ecx - xorl %eax, %eax - movl 68(%esp), %edx - shll %cl, %edx - movl %edx, 64(%esp) - jmp ..B3.130 -..B3.129: - movl 128(%esp), %ecx - movl 64(%esp), %edx - movl 68(%esp), %eax - shldl %cl, %eax, %edx - movl %edx, 64(%esp) - shll %cl, %eax -..B3.130: - cmpl $31, 72(%esp) - jbe ..B3.132 -..B3.131: - movl 72(%esp), %ecx - xorl %edx, %edx - movl 32(%esp), %ebx - shrl %cl, %ebx - movl %ebx, 68(%esp) - jmp ..B3.133 -..B3.132: - movl %ebp, %ebx - movl 72(%esp), %ecx - movl 32(%esp), %edx - shrdl %cl, %edx, %ebx - movl %ebx, 68(%esp) - shrl %cl, %edx -..B3.133: - orl %eax, 68(%esp) - orl %edx, 64(%esp) - cmpl $31, 128(%esp) - jbe ..B3.135 -..B3.134: - movl 128(%esp), %ecx - xorl %edx, %edx - shll %cl, %ebp - movl %ebp, 32(%esp) - jmp ..B3.136 -..B3.135: - movl 128(%esp), %ecx - movl 32(%esp), %edx - shldl %cl, %ebp, %edx - movl %edx, 32(%esp) - movl %ebp, %edx - shll %cl, %edx -..B3.136: - cmpl $31, 72(%esp) - jbe ..B3.138 -..B3.137: - movl %esi, %ebp - xorl %ebx, %ebx - movl 72(%esp), %ecx - shrl %cl, %ebp - jmp ..B3.139 -..B3.138: - movl %edi, %ebp - movl %esi, %ebx - movl 72(%esp), %ecx - shrdl %cl, %esi, %ebp - shrl %cl, %ebx -..B3.139: - orl %ebx, 32(%esp) - orl %edx, %ebp - cmpl $31, 128(%esp) - jbe ..B3.141 -..B3.140: - movl %edi, %esi - xorl %edx, %edx - movl 128(%esp), %ecx - shll %cl, %esi - jmp ..B3.142 -..B3.141: - movl %edi, %edx - movl 128(%esp), %ecx - shldl %cl, %edi, %esi - shll %cl, %edx -..B3.142: - cmpl $31, 72(%esp) - jbe ..B3.144 -..B3.143: - movl 72(%esp), %ecx - xorl %ebx, %ebx - movl 124(%esp), %edi - shrl %cl, %edi - jmp ..B3.145 -..B3.144: - movl 72(%esp), %ecx - movl 116(%esp), %edi - movl 124(%esp), %ebx - shrdl %cl, %ebx, %edi - shrl %cl, %ebx -..B3.145: - orl %edx, %edi - orl %ebx, %esi -..B3.146: - movl %edi, %eax - mull 108(%esp) - movl %edi, %eax - movl %edx, %ecx - mull 112(%esp) - addl %eax, %ecx - movl %edx, %ebx - movl 108(%esp), %eax - adcl $0, %ebx - mull %esi - addl %ecx, %eax - adcl %ebx, %edx - subl %ecx, %eax - movl %edx, 48(%esp) - sbbl %ebx, %edx - jae ..B3.148 -..B3.147: - movl $1, %ebx - jmp ..B3.149 -..B3.148: - xorl %ebx, %ebx -..B3.149: - movl %esi, %eax - movl 112(%esp), %ecx - mull %ecx - addl %edx, %ebx - addl 48(%esp), %eax - movl %eax, 84(%esp) - adcl $0, %ebx - movl %ebx, 88(%esp) - movl %esi, %ebx - movl 108(%esp), %eax - imull %edi, %ecx - imull %eax, %ebx - mull %edi - addl %ebx, %ecx - movl 100(%esp), %ebx - addl %ecx, %edx - movl %ebp, 52(%esp) - movl %esi, %ebp - movl %edx, 96(%esp) - movl %ebx, %edx - movl 104(%esp), %ecx - imull %ecx, %ebp - imull %edi, %edx - movl %eax, 92(%esp) - movl %edi, %eax - addl %edx, %ebp - mull %ecx - movl %eax, 36(%esp) - movl %edi, %eax - addl %ebp, %edx - movl %edx, 40(%esp) - mull %ecx - movl %edi, %eax - movl %edx, %ebp - mull %ebx - addl %eax, %ebp - movl %ecx, %eax - movl %edx, %edi - adcl $0, %edi - mull %esi - addl %ebp, %eax - movl 88(%esp), %ebx - adcl %edi, %edx - subl %ebp, %eax - movl %edx, 44(%esp) - movl 52(%esp), %ebp - sbbl %edi, %edx - jae ..B3.151 -..B3.150: - movl $1, %ecx - jmp ..B3.152 -..B3.151: - xorl %ecx, %ecx -..B3.152: - movl %esi, %eax - mull 100(%esp) - movl %eax, %esi - addl %edx, %ecx - addl 44(%esp), %esi - movl 36(%esp), %edi - movl 84(%esp), %eax - adcl $0, %ecx - addl %edi, %eax - movl 40(%esp), %edx - adcl %edx, %ebx - movl %eax, 84(%esp) - subl %edi, %eax - movl %ebx, %edi - sbbl %edx, %edi - jae ..B3.154 -..B3.153: - movl $1, %edx - jmp ..B3.155 -..B3.154: - xorl %edx, %edx -..B3.155: - addl %edx, %esi - movl %esi, 80(%esp) - adcl $0, %ecx - movl %ecx, 132(%esp) - movl 112(%esp), %ecx - movl %ecx, %edi - movl 32(%esp), %esi - movl %esi, %edx - movl %ebx, 88(%esp) - movl 108(%esp), %ebx - movl %ebx, %eax - imull %ebp, %edi - imull %ebx, %edx - addl %edx, %edi - mull %ebp - movl %eax, 40(%esp) - movl %ebx, %eax - addl %edi, %edx - movl %edx, 44(%esp) - mull %ebp - movl %ebp, %eax - movl %edx, %edi - mull %ecx - addl %eax, %edi - movl %ebx, %eax - movl %edx, %ecx - adcl $0, %ecx - mull %esi - addl %edi, %eax - movl 80(%esp), %esi - adcl %ecx, %edx - subl %edi, %eax - movl %edx, 48(%esp) - movl 88(%esp), %ebx - sbbl %ecx, %edx - movl 132(%esp), %ecx - jae ..B3.157 -..B3.156: - movl $1, %edi - jmp ..B3.158 -..B3.157: - xorl %edi, %edi -..B3.158: - movl 32(%esp), %eax - mull 112(%esp) - addl %edx, %edi - addl 48(%esp), %eax - movl %eax, 36(%esp) - adcl $0, %edi - movl %edi, 52(%esp) - movl 40(%esp), %edi - movl 84(%esp), %eax - addl %edi, %eax - movl 44(%esp), %edx - adcl %edx, %ebx - movl %eax, 84(%esp) - subl %edi, %eax - movl %ebx, %edi - sbbl %edx, %edi - movl 52(%esp), %edi - jae ..B3.160 -..B3.159: - movl $1, 40(%esp) - jmp ..B3.161 -..B3.160: - movl $0, 40(%esp) -..B3.161: - movl 40(%esp), %edx - addl %edx, %esi - movl %esi, %eax - adcl $0, %ecx - subl %edx, %eax - movl $0, %edx - movl %ecx, %eax - sbbl %edx, %eax - jae ..B3.163 -..B3.162: - movl $1, 48(%esp) - jmp ..B3.164 -..B3.163: - movl $0, 48(%esp) -..B3.164: - movl 36(%esp), %edx - addl %edx, %esi - movl %esi, %eax - adcl %edi, %ecx - subl %edx, %eax - movl %ecx, %edx - sbbl %edi, %edx - jae ..B3.166 -..B3.165: - movl $1, %edx - jmp ..B3.167 -..B3.166: - xorl %edx, %edx -..B3.167: - movl %esi, 80(%esp) - movl %ecx, 132(%esp) - movl 100(%esp), %ecx - movl %ecx, %edi - movl 32(%esp), %esi - addl %edx, 48(%esp) - movl %esi, %edx - movl %ebx, 88(%esp) - movl 104(%esp), %ebx - movl %ebx, %eax - imull %ebp, %edi - imull %ebx, %edx - addl %edx, %edi - mull %ebp - movl %eax, 36(%esp) - movl %ebx, %eax - addl %edi, %edx - movl %edx, 40(%esp) - mull %ebp - movl %ebp, %eax - movl %edx, %edi - mull %ecx - addl %eax, %edi - movl %ebx, %eax - movl %edx, %ebp - adcl $0, %ebp - mull %esi - addl %edi, %eax - movl 132(%esp), %ecx - adcl %ebp, %edx - subl %edi, %eax - movl %edx, 44(%esp) - movl 80(%esp), %esi - sbbl %ebp, %edx - movl 88(%esp), %ebx - jae ..B3.169 -..B3.168: - movl $1, %ebp - jmp ..B3.170 -..B3.169: - xorl %ebp, %ebp -..B3.170: - movl 32(%esp), %eax - mull 100(%esp) - addl %edx, %ebp - addl 44(%esp), %eax - movl 36(%esp), %edi - adcl $0, %ebp - addl %edi, %esi - movl %esi, %edx - adcl 40(%esp), %ecx - subl %edi, %edx - movl %ecx, %edi - sbbl 40(%esp), %edi - jae ..B3.172 -..B3.171: - movl $1, %edx - jmp ..B3.173 -..B3.172: - xorl %edx, %edx -..B3.173: - movl %ebx, 88(%esp) - movl 48(%esp), %ebx - addl %eax, %ebx - movl %esi, 80(%esp) - adcl $0, %ebp - addl %edx, %ebx - movl %ecx, 132(%esp) - movl 112(%esp), %ecx - movl %ecx, %edi - movl 64(%esp), %esi - movl %esi, %edx - adcl $0, %ebp - movl %ebx, 48(%esp) - movl %ebp, 44(%esp) - movl 68(%esp), %ebp - movl 108(%esp), %ebx - movl %ebx, %eax - imull %ebp, %edi - imull %ebx, %edx - addl %edx, %edi - mull %ebp - movl %eax, 32(%esp) - movl %ebx, %eax - addl %edi, %edx - movl %edx, 36(%esp) - mull %ebp - movl %ebp, %eax - movl %edx, %edi - mull %ecx - addl %eax, %edi - movl %ebx, %eax - movl %edx, %ebp - adcl $0, %ebp - mull %esi - addl %edi, %eax - movl 132(%esp), %ecx - adcl %ebp, %edx - subl %edi, %eax - movl %edx, 40(%esp) - movl 80(%esp), %esi - sbbl %ebp, %edx - movl 44(%esp), %ebp - movl 88(%esp), %ebx - jae ..B3.175 -..B3.174: - movl $1, 52(%esp) - jmp ..B3.176 -..B3.175: - movl $0, 52(%esp) -..B3.176: - movl 64(%esp), %eax - mull 112(%esp) - movl 52(%esp), %edi - addl %edx, %edi - addl 40(%esp), %eax - movl %eax, 44(%esp) - movl 32(%esp), %eax - adcl $0, %edi - addl %eax, %esi - movl %esi, %edx - movl %edi, 52(%esp) - movl 36(%esp), %edi - adcl %edi, %ecx - subl %eax, %edx - movl %ecx, %eax - sbbl %edi, %eax - jae ..B3.178 -..B3.177: - movl $1, 32(%esp) - jmp ..B3.179 -..B3.178: - movl $0, 32(%esp) -..B3.179: - movl %esi, 80(%esp) - movl 100(%esp), %edi - movl 68(%esp), %esi - movl 104(%esp), %eax - movl 64(%esp), %edx - imull %esi, %edi - imull %eax, %edx - addl %edx, %edi - mull %esi - movl %ecx, 132(%esp) - movl %eax, %ecx - movl %edx, %esi - addl %edi, %esi - addl 48(%esp), %ecx - movl 60(%esp), %edi - movl 56(%esp), %edx - adcl %ebp, %esi - movl 112(%esp), %ebp - movl 108(%esp), %eax - imull %edi, %ebp - imull %eax, %edx - addl %edx, %ebp - mull %edi - addl 44(%esp), %ecx - adcl 52(%esp), %esi - addl %ebp, %edx - addl 32(%esp), %ecx - adcl $0, %esi - addl %ecx, %eax - movl 196(%esp), %ecx - movl %ecx, %ebp - adcl %esi, %edx - negl %ebp - cmpl $0, 76(%esp) - movl %eax, 136(%esp) - jne ..L11 - movl %ecx, %ebp -..L11: - xorl %eax, %eax - shll $29, %ebp - addl %ebp, %edx - movl %eax, 40(%esp) - movl 84(%esp), %ebp - movl %edx, 152(%esp) - movl %eax, 36(%esp) - jmp ..B3.180 -..B3.214: - addl $64, 40(%esp) - movl 152(%esp), %ecx - movl 132(%esp), %edx - movl 80(%esp), %eax - movl 32(%esp), %esi - movl 44(%esp), %edi - movl %ebp, 80(%esp) - movl %ebx, 132(%esp) - movl 92(%esp), %ebp - movl 96(%esp), %ebx - adcl $0, 36(%esp) - andl $-536870912, %ecx - andl $536870911, %edx - orl %edx, %ecx - movl %eax, 136(%esp) - movl %ecx, 152(%esp) - movl %esi, 92(%esp) - movl %edi, 96(%esp) -..B3.180: - movl 152(%esp), %eax - xorl %edx, %edx - lea 4194304(%eax), %ecx - andl $1065353216, %ecx - orl %edx, %ecx - jne ..B3.252 -..B3.181: - movl 120(%esp), %eax - movl 116(%esp), %esi - movl 124(%esp), %edi - movl (%eax), %edx - movl %edx, 116(%esp) - xorl %edx, %edx - movl 4(%eax), %ecx - addl $8, %eax - movl %ecx, 124(%esp) - movl %eax, 120(%esp) - orl 128(%esp), %edx - je ..B3.189 -..B3.182: - cmpl $31, 128(%esp) - jbe ..B3.184 -..B3.183: - movl %esi, %edi - xorl %edx, %edx - movl 128(%esp), %ecx - shll %cl, %edi - jmp ..B3.185 -..B3.184: - movl %esi, %edx - movl 128(%esp), %ecx - shldl %cl, %esi, %edi - shll %cl, %edx -..B3.185: - cmpl $31, 72(%esp) - jbe ..B3.187 -..B3.186: - movl 72(%esp), %ecx - xorl %eax, %eax - movl 124(%esp), %esi - shrl %cl, %esi - jmp ..B3.188 -..B3.187: - movl 72(%esp), %ecx - movl 116(%esp), %esi - movl 124(%esp), %eax - shrdl %cl, %eax, %esi - shrl %cl, %eax -..B3.188: - orl %edx, %esi - orl %eax, %edi -..B3.189: - movl 112(%esp), %ecx - movl %edi, %edx - movl %ebx, 88(%esp) - movl %ecx, %ebx - movl %ebp, 84(%esp) - movl 108(%esp), %ebp - movl %ebp, %eax - imull %esi, %ebx - imull %ebp, %edx - addl %edx, %ebx - mull %esi - movl %eax, 32(%esp) - movl %ebp, %eax - addl %ebx, %edx - movl %edx, 44(%esp) - mull %esi - movl %esi, %eax - movl %edx, %ebx - mull %ecx - addl %eax, %ebx - movl %ebp, %eax - movl %edx, %ecx - adcl $0, %ecx - mull %edi - addl %ebx, %eax - movl 84(%esp), %ebp - adcl %ecx, %edx - subl %ebx, %eax - movl %edx, 56(%esp) - movl 88(%esp), %ebx - sbbl %ecx, %edx - jae ..B3.191 -..B3.190: - movl $1, %ecx - jmp ..B3.192 -..B3.191: - xorl %ecx, %ecx -..B3.192: - movl 112(%esp), %eax - mull %edi - addl %edx, %ecx - addl 56(%esp), %eax - movl 92(%esp), %edx - adcl $0, %ecx - addl %eax, %edx - movl %ebp, 84(%esp) - movl 96(%esp), %ebp - adcl %ecx, %ebp - movl %edx, 92(%esp) - subl %eax, %edx - movl %ebp, 96(%esp) - sbbl %ecx, %ebp - movl 84(%esp), %ebp - jae ..B3.194 -..B3.193: - movl $1, %ecx - jmp ..B3.195 -..B3.194: - xorl %ecx, %ecx -..B3.195: - movl 100(%esp), %edx - addl %ecx, %ebp - movl 104(%esp), %eax - movl %edi, 64(%esp) - adcl $0, %ebx - imull %esi, %edx - imull %eax, %edi - addl %edi, %edx - movl %ebp, %edi - movl %edx, 68(%esp) - mull %esi - addl 68(%esp), %edx - subl %ecx, %edi - movl $0, %ecx - movl %edx, 52(%esp) - movl %ebx, %edx - movl %eax, 48(%esp) - sbbl %ecx, %edx - movl 64(%esp), %edi - jae ..B3.198 -..B3.196: - movl $1, %ecx -..B3.198: - movl 104(%esp), %eax - mull %esi - movl %esi, %eax - movl %ebp, 84(%esp) - movl %edx, %ebp - mull 100(%esp) - addl %eax, %ebp - movl %edx, %esi - movl 104(%esp), %eax - adcl $0, %esi - mull %edi - addl %ebp, %eax - adcl %esi, %edx - subl %ebp, %eax - movl %edx, 60(%esp) - movl 84(%esp), %ebp - sbbl %esi, %edx - jae ..B3.200 -..B3.199: - movl $1, %esi - jmp ..B3.201 -..B3.200: - xorl %esi, %esi -..B3.201: - movl 100(%esp), %eax - mull %edi - addl %edx, %esi - addl 60(%esp), %eax - movl %eax, 140(%esp) - movl 48(%esp), %edx - adcl $0, %esi - movl 92(%esp), %eax - addl %edx, %eax - movl %esi, 144(%esp) - movl 52(%esp), %esi - movl 96(%esp), %edi - adcl %esi, %edi - movl %eax, 92(%esp) - subl %edx, %eax - movl %edi, 96(%esp) - movl 140(%esp), %eax - sbbl %esi, %edi - movl 144(%esp), %esi - jae ..B3.203 -..B3.202: - movl $1, %edx - jmp ..B3.204 -..B3.203: - xorl %edx, %edx -..B3.204: - addl %edx, %ebp - movl %ebp, %edi - adcl $0, %ebx - subl %edx, %edi - movl $0, %edx - movl %ebx, %edi - sbbl %edx, %edi - jae ..B3.207 -..B3.205: - movl $1, %edx -..B3.207: - addl %eax, %ebp - adcl %esi, %ebx - addl %edx, %ecx - movl %ebp, %edx - subl %eax, %edx - movl %ebx, %eax - sbbl %esi, %eax - jae ..B3.209 -..B3.208: - movl $1, %eax - jmp ..B3.210 -..B3.209: - xorl %eax, %eax -..B3.210: - addl %eax, %ecx - xorl %eax, %eax - orl %eax, %ecx - je ..B3.213 -..B3.211: - movl 80(%esp), %eax - addl $1, %eax - movl 132(%esp), %edx - adcl $0, %edx - movl %eax, 80(%esp) - orl %edx, %eax - movl %edx, 132(%esp) - jne ..B3.213 -..B3.212: - addl $1, 136(%esp) - adcl $0, 152(%esp) -..B3.213: - movl 136(%esp), %ecx - movl %ecx, %eax - movl 152(%esp), %esi - shrl $23, %eax - shll $9, %esi - orl %esi, %eax - movl 132(%esp), %edx - movl %eax, %edi - shrl $23, %edx - shll $9, %ecx - sarl $31, %edi - orl %ecx, %edx - xorl %edi, %edx - xorl %edi, %eax - orl %eax, %edx - jne ..B3.230 - jmp ..B3.214 -..B3.215: - movl 148(%esp), %ebx - call __stack_chk_fail@PLT -..B3.216: - movl 32(%ebx), %edx - orl 36(%ebx), %edx - jne ..B3.218 -..B3.217: - movl $0, 24(%ebx) - jmp ..B3.117 -..B3.218: - movl 44(%esp), %ecx - xorl %edx, %edx - incl %ecx - andl $2, %ecx - orl %edx, %ecx - je ..B3.117 -..B3.219: - xorl $-2147483648, 24(%ebx) - jmp ..B3.117 -..B3.220: - xorl %edx, %edx - orl %edx, %ebx - je ..B3.222 -..B3.221: - movl $512, %ecx - jmp ..B3.223 -..B3.222: - xorl %ecx, %ecx -..B3.223: - orl $462, %ecx - jmp ..B3.113 -..B3.224: - movl 192(%esp), %edx - xorl %eax, %eax - xorl $-2147483648, 68(%esp) - movl 16(%edx), %ecx - movl 20(%edx), %esi - xorl %edx, %edx - subl %ecx, %edx - sbbl %esi, %eax - orl %esi, %ecx - je ..B3.226 -..B3.225: - movl $1, %ecx - jmp ..B3.227 -..B3.226: - xorl %ecx, %ecx -..B3.227: - movl 192(%esp), %esi - addl %ecx, %ebp - adcl $0, %ebx - movl %edx, 16(%esi) - xorl %edx, %edx - movl %eax, 20(%esi) - movl %ebp, %eax - xorl %ebp, %ebp - movl %ebx, %ecx - xorl %ebx, %ebx - subl %eax, %ebp - sbbl %ecx, %ebx - jmp ..B3.81 -..B3.228: - movl 72(%esp), %esi - movl 192(%esp), %ebp - movl 8(%ebp,%esi,8), %eax - movl 12(%ebp,%esi,8), %edi - jmp ..B3.59 -..B3.229: - movl $1, %edi - xorl %eax, %eax - jmp ..B3.49 -..B3.230: - movl %ebp, 84(%esp) - movl 132(%esp), %ecx - movl 80(%esp), %esi - movl 152(%esp), %edx -..B3.231: - movl 136(%esp), %edi - lea (,%edx,4), %eax - movl %edi, %ebp - sarl $2, %eax - subl %edi, %ebp - movl %ebp, 32(%esp) - movl %eax, %ebp - sbbl %eax, %edx - sarl $31, %ebp - subl %ebp, %edi - negl %ebp - addl %eax, %ebp - movl %eax, 36(%esp) - orl %ebp, %edi - jne ..B3.233 -..B3.232: - movl %ecx, %eax - movl %ebx, %ecx - movl 92(%esp), %ebx - movl %esi, 136(%esp) - movl 84(%esp), %esi - movl %ebx, 84(%esp) - movl 96(%esp), %ebx - addl $64, 40(%esp) -..B3.233: - xorl %ebp, %ebp - movl 36(%esp), %edi - subl %ebp, %edi - jge ..B3.236 -..B3.235: - movl $-2147483648, %ebp -..B3.236: - testl %ebp, %ebp - je ..B3.244 -..B3.237: - movl 84(%esp), %edi - notl %ebx - notl %edi - notl %eax - addl $1, %edi - notl %esi - movl %edi, 84(%esp) - notl %ecx - adcl $0, %ebx - notl 136(%esp) - orl %ebx, %edi - jne ..B3.239 -..B3.238: - movl $1, %edi - jmp ..B3.240 -..B3.239: - xorl %edi, %edi -..B3.240: - addl %edi, %esi - movl %esi, %edi - adcl $0, %ecx - orl %ecx, %edi - jne ..B3.242 -..B3.241: - movl $1, %edi - jmp ..B3.243 -..B3.242: - xorl %edi, %edi -..B3.243: - addl %edi, 136(%esp) - adcl $0, %eax -..B3.244: - xorl %edi, %edi - movl %ebx, 88(%esp) - xorl %ebx, %ebx - subl 32(%esp), %ebx - movl 76(%esp), %ebx - sbbl %edx, %edi - testl %ebx, %ebx - movl $3, 52(%esp) - jne ..L12 - movl %edx, %edi -..L12: - xorl %ebx, %ebp - movl %ebp, 48(%esp) - movl 136(%esp), %ebp - movl %edi, 44(%esp) - movl %ebp, 56(%esp) - movl %eax, 60(%esp) - movl %esi, 64(%esp) - movl %ecx, 68(%esp) - addl $12, %esp - xorl %ecx, %ecx - lea 36(%esp), %esi - pushl %ecx - pushl %ecx - pushl %esi - movl 40(%esi), %ebx - call __dpml_ffs_and_shift__ -..B3.245: - movl 52(%esp), %eax - movl %eax, %ecx - cltd - addl $-3, %ecx - adcl $-1, %edx - orl %ecx, %edx - je ..B3.250 -..B3.246: - addl $64, %ecx - movl 64(%esp), %esi - cmpl $31, %ecx - movl 68(%esp), %ebp - jbe ..B3.248 -..B3.247: - shrl %cl, %ebx - xorl %edx, %edx - movl %ebx, 84(%esp) - jmp ..B3.249 -..B3.248: - movl 84(%esp), %edx - shrdl %cl, %ebx, %edx - movl %edx, 84(%esp) - movl %ebx, %edx - shrl %cl, %edx -..B3.249: - orl 84(%esp), %esi - orl %edx, %ebp - movl %esi, 64(%esp) - movl %ebp, 68(%esp) -..B3.250: - subl 40(%esp), %eax - movl %eax, 52(%esp) - addl $12, %esp - lea 36(%esp), %ecx - pushl %ecx - movl 100(%ecx), %eax - lea 1008+__trig_x_table@GOTOFF(%eax), %edx - pushl %edx - pushl %ecx - call __dpml_multiply__ -..B3.251: - shrl $30, 44(%esp) - xorl %ebx, %ebx - jmp ..B3.103 -..B3.252: - movl %ebp, 84(%esp) - movl 132(%esp), %ecx - movl 80(%esp), %esi - movl %eax, %edx - jmp ..B3.231 -..B3.253: - movl %esi, %eax - sarl $31, %eax - movl 196(%esp), %ebp - cltd - addl %ebp, %eax - movl %eax, %ebx - adcl 200(%esp), %edx - andl $1, %ebx - addl %ebx, %eax - movl %eax, %ecx - adcl $0, %edx - shrl $1, %ecx - subl %eax, %ebp - movl %ecx, 44(%esp) - movl %edx, %ebx - movl 200(%esp), %ecx - sbbl %edx, %ecx - sarl $1, %ebx - orl %ecx, %ebp - je ..B3.258 -..B3.254: - xorl %eax, %eax - subl %eax, %ecx - jge ..B3.257 -..B3.256: - movl $1, %eax -..B3.257: - addl $20, %esp - lea 28(%esp), %edx - pushl %edx - pushl $0 - pushl %eax - movl 100(%edx), %eax - lea 1008+__trig_x_table@GOTOFF(%eax), %ecx - pushl %ecx - pushl 188(%esp) - call __dpml_addsub__ - jmp ..B3.103 -..B3.258: - movl %esi, %eax - movl %edi, %edx - movl 104(%esp), %ecx - movl 100(%esp), %ebp - movl 108(%esp), %esi - movl 112(%esp), %edi - movl %eax, 48(%esp) - movl %edx, 52(%esp) - movl %ecx, 56(%esp) - movl %ebp, 60(%esp) - movl %esi, 64(%esp) - movl %edi, 68(%esp) - jmp ..B3.103 - .align 16,0x90 - .type __dpml_ux_sincos,@function - .size __dpml_ux_sincos,.-__dpml_ux_sincos - .data -# -- End __dpml_ux_sincos - .section .rodata, "a" - .align 4 - .align 4 -__trig_x_table: - .long 15442952 - .long 1678786816 - .long 15709192 - .long 1414612240 - .long 15975432 - .long 1141915904 - .long 16241672 - .long 873463808 - .long 16507912 - .long 609305872 - .long 16774152 - .long 336592896 - .long 2 - .long 0 - .long 103 - .long 0 - .long 22 - .long 0 - .long 104 - .long 0 - .long 107 - .long 0 - .long 23 - .long 0 - .long 105 - .long 0 - .long 15176712 - .long 336609536 - .long 115 - .long 0 - .long 15176712 - .long 336592896 - .long 118 - .long 0 - .long 15176712 - .long 519700480 - .long 28 - .long 0 - .long 29 - .long 0 - .long 30 - .long 0 - .long 15176712 - .long 528281504 - .long 34 - .long 0 - .long 32 - .long 0 - .long 33 - .long 0 - .long 35 - .long 0 - .long 36 - .long 0 - .long 0 - .long 4294967291 - .long 2498349230 - .long 2398762258 - .long 2491794649 - .long 247854702 - .long 0 - .long 0 - .long 0 - .long 1073676288 - .long 95443718 - .long 1527099483 - .long 1431655766 - .long 357913941 - .long 2657305954 - .long 3 - .long 0 - .long 0 - .long 3705764381 - .long 2553 - .long 0 - .long 0 - .long 138031221 - .long 1532340 - .long 0 - .long 0 - .long 2983678984 - .long 775364077 - .long 0 - .long 0 - .long 20739419 - .long 3530365445 - .long 75 - .long 0 - .long 674366505 - .long 499172021 - .long 25931 - .long 0 - .long 1191312077 - .long 2630803580 - .long 7053263 - .long 0 - .long 2382099329 - .long 2712937970 - .long 1481185358 - .long 0 - .long 2412211635 - .long 2311528398 - .long 3431649258 - .long 53 - .long 3364759590 - .long 865053377 - .long 3819263687 - .long 5917 - .long 1745256079 - .long 2154301056 - .long 109078534 - .long 426088 - .long 286331142 - .long 286331153 - .long 286331153 - .long 17895697 - .long 1431655765 - .long 1431655765 - .long 1431655765 - .long 357913941 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 2851833826 - .long 97 - .long 0 - .long 0 - .long 1768459388 - .long 63846 - .long 0 - .long 0 - .long 2009193996 - .long 35243820 - .long 0 - .long 0 - .long 1368406537 - .long 3397743743 - .long 3 - .long 0 - .long 3946395699 - .long 2652434014 - .long 1440 - .long 0 - .long 2553743692 - .long 4190957063 - .long 440828 - .long 0 - .long 595011843 - .long 807348040 - .long 105798954 - .long 0 - .long 883371940 - .long 908455249 - .long 2075540478 - .long 4 - .long 761938407 - .long 3951975904 - .long 3388403475 - .long 591 - .long 217841633 - .long 3490513104 - .long 13634816 - .long 53261 - .long 3626846480 - .long 2195205506 - .long 763549741 - .long 2982616 - .long 1431655403 - .long 1431655765 - .long 1431655765 - .long 89478485 - .long 4294967292 - .long 4294967295 - .long 4294967295 - .long 1073741823 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2877741414 - .long 48456580 - .long 4555740 - .long 0 - .long 3312728015 - .long 4268104823 - .long 3744444631 - .long 1 - .long 6483522 - .long 3858350617 - .long 1187701358 - .long 879 - .long 3780777519 - .long 2626127639 - .long 2801410624 - .long 158172 - .long 3864078256 - .long 3316933375 - .long 1275824684 - .long 11667904 - .long 1744149096 - .long 2725495384 - .long 3617949641 - .long 318163395 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 3422290646 - .long 426546810 - .long 43450 - .long 0 - .long 3479121894 - .long 3493673009 - .long 236644653 - .long 0 - .long 4247003031 - .long 1084451344 - .long 1285072157 - .long 46 - .long 1927283714 - .long 2972340862 - .long 2243521359 - .long 13184 - .long 739625925 - .long 4125699428 - .long 1446479475 - .long 1522115 - .long 2250255868 - .long 2030226330 - .long 3149913922 - .long 70000510 - .long 312493331 - .long 1293839619 - .long 2186293876 - .long 1033991278 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 0 - .long 0 - .long 560513588 - .long 3373259426 - .long 2161908945 - .long 3301335691 - .long 0 - .long 0 - .type __trig_x_table,@object - .size __trig_x_table,1040 - .data - .hidden __dpml_multiply__ - .hidden __dpml_ffs_and_shift__ - .hidden __dpml_addsub__ - .hidden __dpml_evaluate_rational__ - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erf.S deleted file mode 100644 index ef56cf4dcb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erf.S +++ /dev/null @@ -1,583 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erf.c" - .text -..TXTST0: -# -- Begin erf - .text - .align 16,0x90 - .globl erf -erf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - subl $24, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movl 12(%ebp), %ecx - movl %ecx, %eax - andl $-2147483648, %eax - andl $2147483647, %ecx - orl $1065353216, %eax - movl %eax, 16(%esp) - cmpl $1075298304, %ecx - flds 16(%esp) - movl 8(%ebp), %esi - fstpt (%esp) - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - jge ..B1.11 -..B1.4: - movzwl 14(%esp), %esi - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.15 -..B1.5: - orl $-64768, %esi - movw %si, 12(%esp) -..B1.6: - fldcw 12(%esp) -..B1.7: - movl $1, %eax -..B1.8: - fldl 8(%ebp) - lea -1074331648(%ecx), %esi - shrl $20, %ecx - fabs - fldt (%esp) - addl $-1021, %ecx - cmpl $458751, %esi - ja ..L3 - movl $5, %ecx -..L3: - testl %ecx, %ecx - jg ..L4 - movl $0, %ecx -..L4: - movl %ecx, %edi - lea (%ecx,%ecx,2), %esi - shll $4, %edi - shll $7, %ecx - shll $4, %esi - testl %eax, %eax - fxch %st(1) - fmull erfRRTable@GOTOFF(%edi,%edx) - fldl 120+_dbA@GOTOFF(%edx,%ecx) - fldt 36+_ldbA@GOTOFF(%edx,%esi) - fldt 24+_ldbA@GOTOFF(%edx,%esi) - fldt 12+_ldbA@GOTOFF(%edx,%esi) - fldt _ldbA@GOTOFF(%edx,%esi) - fxch %st(5) - faddl 8+erfRRTable@GOTOFF(%edx,%edi) - fmul %st, %st(4) - fxch %st(4) - faddl 112+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 104+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 96+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 88+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 80+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 72+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 64+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 56+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 48+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 40+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 32+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 24+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 16+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl 8+_dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddl _dbA@GOTOFF(%edx,%ecx) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.10 -..B1.9: - fldcw 14(%esp) -..B1.10: - fldt (%esp) - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - cmpl $2146435072, %ecx - jl ..B1.14 -..B1.12: - je ..B1.16 -..B1.13: - fldl 8(%ebp) - fadd %st(0), %st - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - fldl 768+_dbA@GOTOFF(%edx) - fldl 776+_dbA@GOTOFF(%edx) - fldt (%esp) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - xorl %eax, %eax - jmp ..B1.8 -..B1.16: - testl %esi, %esi - jne ..B1.13 -..B1.17: - fldt (%esp) - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type erf,@function - .size erf,.-erf - .data -# -- End erf - .section .rodata, "a" - .align 16 - .align 16 -erfRRTable: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3fe00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3fd00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xc00d0000 - .type erfRRTable,@object - .size erfRRTable,96 - .align 16 -_dbA: - .long 0 - .long 0 - .long 436480805 - .long 1069343474 - .long 0 - .long 0 - .long 824702180 - .long 3214639822 - .long 0 - .long 0 - .long 3500778474 - .long 1064658364 - .long 0 - .long 0 - .long 596585212 - .long 3209429723 - .long 0 - .long 0 - .long 1470240973 - .long 1059035690 - .long 0 - .long 0 - .long 718843426 - .long 3203353528 - .long 0 - .long 0 - .long 2710426178 - .long 1052473157 - .long 0 - .long 0 - .long 3010232270 - .long 3196296923 - .long 3936437656 - .long 1065568693 - .long 2299323409 - .long 3210429089 - .long 2523607943 - .long 3208348791 - .long 2965083678 - .long 1059250351 - .long 798914934 - .long 1055054643 - .long 3446493953 - .long 3202367749 - .long 3957742900 - .long 1049125428 - .long 3166330044 - .long 1049915994 - .long 2437497479 - .long 3193689582 - .long 3701813711 - .long 3192118067 - .long 4254294173 - .long 1041707319 - .long 3041595886 - .long 1039011503 - .long 177055818 - .long 3184215269 - .long 4076941640 - .long 3180389574 - .long 3283211378 - .long 1031330936 - .long 2299430385 - .long 1025878376 - .long 1560943562 - .long 3215381929 - .long 649600356 - .long 3213783607 - .long 1925487767 - .long 1066650173 - .long 2787104668 - .long 3212012915 - .long 3819886810 - .long 3210959588 - .long 3292869653 - .long 1062994816 - .long 595535285 - .long 3206044511 - .long 2833470226 - .long 3207638255 - .long 3150087827 - .long 1058299310 - .long 4226975388 - .long 1056101349 - .long 3511121228 - .long 3203239297 - .long 4191453678 - .long 1050931364 - .long 2398545468 - .long 1052356106 - .long 1036696996 - .long 3197521914 - .long 406902450 - .long 3195737434 - .long 932124879 - .long 1046963798 - .long 2984826674 - .long 3213958277 - .long 1416337143 - .long 1067493301 - .long 1528223327 - .long 3215470371 - .long 2077734896 - .long 1068079284 - .long 500891590 - .long 3215043166 - .long 1614001607 - .long 1065167414 - .long 397732724 - .long 1066426356 - .long 245285475 - .long 3214320360 - .long 2942435727 - .long 1065970365 - .long 2515085614 - .long 1062242098 - .long 2059023426 - .long 3212710123 - .long 3590542062 - .long 1064841017 - .long 1069940521 - .long 1062119991 - .long 329470371 - .long 1062390329 - .long 2904189456 - .long 1064709094 - .long 1072026573 - .long 1063487818 - .long 2999885720 - .long 3188887951 - .long 3321998034 - .long 3194165661 - .long 778559078 - .long 3198831619 - .long 4123899724 - .long 3202964980 - .long 708728771 - .long 3206666523 - .long 2191638927 - .long 3209872513 - .long 2647513773 - .long 3212706538 - .long 349076715 - .long 3215092788 - .long 3464000864 - .long 3217125251 - .long 2469419808 - .long 3218694220 - .long 396951367 - .long 3219923315 - .long 545534675 - .long 3220654754 - .long 3101724493 - .long 3220952863 - .long 496398401 - .long 3220607311 - .long 1221104108 - .long 3219519496 - .long 4256169036 - .long 3217191486 - .long 2904280702 - .long 3204470624 - .long 1218817182 - .long 1057276414 - .long 54035796 - .long 3204757890 - .long 4162943463 - .long 1056998848 - .long 3226000836 - .long 3203731619 - .long 1250945068 - .long 1055200853 - .long 1745105165 - .long 3201249698 - .long 1720233031 - .long 1051395895 - .long 2751609749 - .long 1047829350 - .long 3766093227 - .long 3196386836 - .long 2511730864 - .long 1047725585 - .long 1042659329 - .long 3192914318 - .long 2981264223 - .long 3189366070 - .long 673045009 - .long 1042560833 - .long 421746295 - .long 3188353310 - .long 3454229363 - .long 3184015574 - .long 4294967295 - .long 1072693247 - .long 0 - .long 1017102336 - .type _dbA,@object - .size _dbA,784 - .align 16 -_ldbA: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26765 - .word 5339 - .word 47746 - .word 36974 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13107 - .word 7119 - .word 41816 - .word 49299 - .word 49149 - .word 0 - .word 64355 - .word 59506 - .word 19372 - .word 46606 - .word 16382 - .word 0 - .word 9448 - .word 50838 - .word 8555 - .word 42135 - .word 16381 - .word 0 - .word 14173 - .word 43489 - .word 45601 - .word 63202 - .word 49147 - .word 0 - .word 56288 - .word 45938 - .word 11407 - .word 56180 - .word 16374 - .word 0 - .word 64911 - .word 39894 - .word 43704 - .word 63314 - .word 16382 - .word 0 - .word 18164 - .word 49445 - .word 47413 - .word 62353 - .word 16379 - .word 0 - .word 62471 - .word 20699 - .word 19176 - .word 46765 - .word 49148 - .word 0 - .word 45860 - .word 23381 - .word 351 - .word 36373 - .word 16380 - .word 0 - .word 52190 - .word 2479 - .word 36194 - .word 65534 - .word 16382 - .word 0 - .word 53234 - .word 6547 - .word 29917 - .word 37380 - .word 16371 - .word 0 - .word 61321 - .word 42597 - .word 44875 - .word 56070 - .word 49141 - .word 0 - .word 35023 - .word 36587 - .word 42382 - .word 52955 - .word 16375 - .word 0 - .word 65130 - .word 65535 - .word 65535 - .word 65535 - .word 16382 - .word 0 - .word 49987 - .word 10941 - .word 20175 - .word 44229 - .word 16331 - .word 0 - .word 45301 - .word 36641 - .word 152 - .word 62959 - .word 49108 - .word 0 - .word 7729 - .word 55572 - .word 4515 - .word 43787 - .word 49115 - .word 0 - .word 12218 - .word 25069 - .word 64268 - .word 65535 - .word 16382 - .word 0 - .word 39514 - .word 2562 - .word 14458 - .word 38069 - .word 16364 - .word 0 - .word 36514 - .word 39186 - .word 15150 - .word 34500 - .word 49134 - .word 0 - .word 9125 - .word 14475 - .word 36819 - .word 40101 - .word 16367 - .word 0 - .type _ldbA,@object - .size _ldbA,288 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfc.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfc.S deleted file mode 100644 index 29656dfd8b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfc.S +++ /dev/null @@ -1,3498 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erfc.c" - .text -..TXTST0: -# -- Begin erfc - .text - .align 16,0x90 - .globl erfc -erfc: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $68, %esp - movzwl 14(%ebp), %ebx - andl $32752, %ebx - shrl $4, %ebx - movzbl 15(%ebp), %ecx - movl %ebx, %eax - shrl $7, %ecx - shll $31, %ecx - shll $20, %eax - movl 12(%ebp), %edx - orl %eax, %ecx - andl $1048575, %edx - orl %edx, %ecx -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.41 -..B1.4: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.5: - fldcw 12(%esp) -..B1.6: - movl $1, %edx -..B1.7: - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - cmpl $2047, %ebx - jne ..B1.16 -..B1.8: - testl $1048575, 12(%ebp) - jne ..B1.13 -..B1.9: - cmpl $0, 8(%ebp) - jne ..B1.13 -..B1.10: - movzbl 15(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - testl %edx, %edx - je ..B1.12 -..B1.11: - fldcw 14(%esp) -..B1.12: - flds zero_two@GOTOFF(%eax,%ecx,4) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - testl %edx, %edx - je ..B1.15 -..B1.14: - fldcw 14(%esp) -..B1.15: - fldl 8(%ebp) - fmul %st(0), %st - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - testl %ebx, %ebx - jne ..B1.22 -..B1.17: - testl $1048575, 12(%ebp) - jne ..B1.22 -..B1.18: - cmpl $0, 8(%ebp) - jne ..B1.22 -..B1.19: - testl %edx, %edx - je ..B1.21 -..B1.20: - fldcw 14(%esp) -..B1.21: - fld1 - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.22: - cmpl $1077578514, %ecx - jae ..B1.26 -..B1.23: - fldl 8(%ebp) - fld %st(0) - fld %st(1) - fld1 - movzwl 8+.L_2il0floatpacket.2@GOTOFF(%eax), %edi - fadd %st(3), %st - fmul %st(0), %st - andl $-32768, %edi - fmul %st(0), %st - fstpt 24(%esp) - fldl .L_2il0floatpacket.0@GOTOFF(%eax) - fmul %st(3), %st - movzwl 32(%esp), %ebx - fsub %st, %st(2) - andl $32767, %ebx - fsubp %st, %st(2) - fld %st(1) - lea (%ebx,%ebx,2), %ebx - fmul %st(2), %st - fchs - fxch %st(1) - fsub %st(2), %st - fldt .L_2il0floatpacket.1@GOTOFF(%eax) - shll $6, %ebx - fmulp %st, %st(3) - fmul %st, %st(2) - fmul %st(0), %st - fsubrp %st, %st(2) - fldt _EXPL_TABLE@GOTOFF(%eax) - fmul %st(1), %st - fldt 36+_EXPL_TABLE@GOTOFF(%eax) - fadd %st, %st(1) - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fsubp %st, %st(1) - fldt -3145536+_ERFC_TABLE@GOTOFF(%ebx,%eax) - movl 36(%esp), %ecx - movl %ecx, %esi - andl $-128, %esi - andl $127, %ecx - addl $2097024, %esi - fsubrp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fldt .L_2il0floatpacket.2@GOTOFF(%eax) - fstpt 48(%esp) - fldt 12+_EXPL_TABLE@GOTOFF(%eax) - fmul %st(2), %st - shrl $7, %esi - fsubrp %st, %st(3) - fldt 24+_EXPL_TABLE@GOTOFF(%eax) - andl $32767, %esi - fmul %st(2), %st - orl %esi, %edi - movw %di, 56(%esp) - lea (,%ecx,8), %esi - testl %edx, %edx - lea (%esi,%ecx,4), %ecx - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt -3145356+_ERFC_TABLE@GOTOFF(%eax,%ebx) - fmul %st(3), %st - fldt -3145380+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145404+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145428+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145452+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145476+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145500+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145524+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fldt -3145368+_ERFC_TABLE@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fldt -3145392+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145416+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145440+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145464+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145488+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmulp %st, %st(4) - fldt -3145512+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(4) - fxch %st(4) - fmulp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt 72+_EXP_POLY@GOTOFF(%eax) - fmul %st(1), %st - fldt 60+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt _EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fldt 48(%esp) - fldt _T_TABLE@GOTOFF(%eax,%ecx) - fmulp %st, %st(1) - fmulp %st, %st(1) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.46 -..B1.24: - fstpt 36(%esp) -..B1.44: - fldcw 14(%esp) - jmp ..B1.25 -..B1.46: - fstp %st(0) -..B1.25: - fldt (%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - cmpl $1077673984, %ecx - jae ..B1.30 -..B1.27: - fldl 8(%ebp) - fld %st(0) - fld %st(1) - fld1 - movzwl 8+.L_2il0floatpacket.2@GOTOFF(%eax), %edi - fadd %st(3), %st - fmul %st(0), %st - andl $-32768, %edi - fmul %st(0), %st - fstpt 24(%esp) - fldl .L_2il0floatpacket.0@GOTOFF(%eax) - fmul %st(3), %st - movzwl 32(%esp), %ebx - fsub %st, %st(2) - andl $32767, %ebx - fsubp %st, %st(2) - fld %st(1) - lea (%ebx,%ebx,2), %ebx - fmul %st(2), %st - fchs - fxch %st(1) - fsub %st(2), %st - fldt .L_2il0floatpacket.1@GOTOFF(%eax) - shll $6, %ebx - fmulp %st, %st(3) - fmul %st, %st(2) - fmul %st(0), %st - fsubrp %st, %st(2) - fldt _EXPL_TABLE@GOTOFF(%eax) - fmul %st(1), %st - fldt 36+_EXPL_TABLE@GOTOFF(%eax) - fadd %st, %st(1) - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fsubp %st, %st(1) - fldt -3145536+_ERFC_TABLE@GOTOFF(%ebx,%eax) - movl 36(%esp), %ecx - movl %ecx, %esi - andl $-128, %esi - andl $127, %ecx - addl $2097024, %esi - fsubrp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fldt .L_2il0floatpacket.2@GOTOFF(%eax) - fstpt 48(%esp) - fldt 12+_EXPL_TABLE@GOTOFF(%eax) - fmul %st(1), %st - shrl $7, %esi - fsubrp %st, %st(3) - fldt 24+_EXPL_TABLE@GOTOFF(%eax) - andl $32767, %esi - fmulp %st, %st(1) - orl %esi, %edi - movw %di, 56(%esp) - lea (,%ecx,8), %esi - testl %edx, %edx - lea (%esi,%ecx,4), %ecx - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt -3145356+_ERFC_TABLE@GOTOFF(%eax,%ebx) - fmul %st(2), %st - fldt -3145380+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt -3145404+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt -3145428+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt -3145452+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt -3145476+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt -3145500+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt -3145524+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fldt -3145368+_ERFC_TABLE@GOTOFF(%eax,%ebx) - fmul %st(3), %st - fldt -3145392+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145416+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145440+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145464+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt -3145488+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt -3145512+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 72+_EXP_POLY@GOTOFF(%eax) - fmul %st(2), %st - fldt 60+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _EXP_POLY@GOTOFF(%eax) - faddp %st, %st(2) - fldt 48(%esp) - fldt _T_TABLE@GOTOFF(%eax,%ecx) - fmulp %st, %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpl 16(%esp) - je ..B1.29 -..B1.28: - fldcw 14(%esp) -..B1.29: - fldl 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.30: - cmpl $2146435072, %ecx - jb ..B1.38 -..B1.31: - cmpl $-1072168960, %ecx - jae ..B1.35 -..B1.32: - fldl 8(%ebp) - fld %st(0) - fld %st(1) - fchs - fld1 - movzwl 8+.L_2il0floatpacket.2@GOTOFF(%eax), %edi - fadd %st(1), %st - fmul %st(0), %st - andl $-32768, %edi - fmul %st(0), %st - fstpt 24(%esp) - fldl .L_2il0floatpacket.0@GOTOFF(%eax) - fmul %st(3), %st - movzwl 32(%esp), %ebx - fsub %st, %st(2) - andl $32767, %ebx - fsubp %st, %st(2) - fld %st(1) - lea (%ebx,%ebx,2), %ebx - fmul %st(2), %st - fchs - fxch %st(2) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.1@GOTOFF(%eax) - shll $6, %ebx - fmulp %st, %st(1) - fmul %st(3), %st - fxch %st(3) - fmul %st(0), %st - fsubrp %st, %st(3) - fldt _EXPL_TABLE@GOTOFF(%eax) - fmul %st(2), %st - fldt 36+_EXPL_TABLE@GOTOFF(%eax) - fadd %st, %st(1) - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fsubp %st, %st(1) - fldt -3145536+_ERFC_TABLE@GOTOFF(%ebx,%eax) - movl 36(%esp), %ecx - movl %ecx, %esi - andl $-128, %esi - andl $127, %ecx - addl $2097024, %esi - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fldt .L_2il0floatpacket.2@GOTOFF(%eax) - fstpt 48(%esp) - fldt 12+_EXPL_TABLE@GOTOFF(%eax) - fmul %st(2), %st - shrl $7, %esi - fsubrp %st, %st(4) - fldt 24+_EXPL_TABLE@GOTOFF(%eax) - andl $32767, %esi - fmul %st(2), %st - orl %esi, %edi - movw %di, 56(%esp) - lea (,%ecx,8), %esi - testl %edx, %edx - lea (%esi,%ecx,4), %ecx - fsubrp %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fldt -3145356+_ERFC_TABLE@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fldt -3145380+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145404+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145428+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145452+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145476+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145500+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt -3145524+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fldt -3145368+_ERFC_TABLE@GOTOFF(%eax,%ebx) - fmul %st(5), %st - fldt -3145392+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(5), %st - fldt -3145416+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(5), %st - fldt -3145440+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(5), %st - fldt -3145464+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmul %st(5), %st - fldt -3145488+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt -3145512+_ERFC_TABLE@GOTOFF(%eax,%ebx) - faddp %st, %st(5) - fxch %st(2) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fldt 72+_EXP_POLY@GOTOFF(%eax) - fmul %st(2), %st - fldt 60+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_EXP_POLY@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _EXP_POLY@GOTOFF(%eax) - faddp %st, %st(2) - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - fldt 48(%esp) - fldt _T_TABLE@GOTOFF(%eax,%ecx) - fmulp %st, %st(1) - fmulp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fsubp %st, %st(1) - fldt 60+_EXPL_TABLE@GOTOFF(%eax) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.47 -..B1.33: - fstpt 36(%esp) -..B1.45: - fldcw 14(%esp) - jmp ..B1.34 -..B1.47: - fstp %st(0) -..B1.34: - fldt (%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.35: - fldt 48+_EXPL_TABLE@GOTOFF(%eax) - testl %edx, %edx - fldt 72+_EXPL_TABLE@GOTOFF(%eax) - fmulp %st, %st(1) - fstpl 16(%esp) - je ..B1.37 -..B1.36: - fldcw 14(%esp) -..B1.37: - fldl 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - fldt 84+_EXPL_TABLE@GOTOFF(%eax) - testl %edx, %edx - fmul %st(0), %st - fstpl 16(%esp) - je ..B1.40 -..B1.39: - fldcw 14(%esp) -..B1.40: - fldl 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - xorl %edx, %edx - jmp ..B1.7 - .align 16,0x90 - .type erfc,@function - .size erfc,.-erfc - .data -# -- End erfc - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -zero_two: - .long 0x00000000 - .long 0x40000000 - .type zero_two,@object - .size zero_two,8 - .space 8, 0x00 # pad - .align 16 -_ERFC_TABLE: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 26765 - .word 5339 - .word 47746 - .word 36974 - .word 49151 - .word 0 - .word 65515 - .word 65535 - .word 65535 - .word 65535 - .word 16382 - .word 0 - .word 10533 - .word 7119 - .word 41816 - .word 49299 - .word 49150 - .word 0 - .word 52669 - .word 65527 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 16123 - .word 5294 - .word 46560 - .word 39439 - .word 49149 - .word 0 - .word 45245 - .word 18034 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 4032 - .word 40793 - .word 62556 - .word 45073 - .word 49147 - .word 0 - .word 4147 - .word 29718 - .word 43156 - .word 43690 - .word 16378 - .word 0 - .word 16916 - .word 58237 - .word 36396 - .word 40065 - .word 49145 - .word 0 - .word 30369 - .word 5547 - .word 38547 - .word 34949 - .word 16376 - .word 0 - .word 5723 - .word 34549 - .word 4774 - .word 58209 - .word 49142 - .word 0 - .word 32046 - .word 45872 - .word 27437 - .word 46045 - .word 16373 - .word 0 - .word 53798 - .word 26622 - .word 41794 - .word 32792 - .word 49140 - .word 0 - .word 43993 - .word 60371 - .word 27258 - .word 64442 - .word 16369 - .word 0 - .word 19322 - .word 28101 - .word 33420 - .word 49599 - .word 16380 - .word 0 - .word 7793 - .word 15289 - .word 7920 - .word 53594 - .word 16382 - .word 0 - .word 28952 - .word 49971 - .word 44506 - .word 53668 - .word 49150 - .word 0 - .word 36016 - .word 10961 - .word 40954 - .word 43439 - .word 16382 - .word 0 - .word 20915 - .word 61681 - .word 29972 - .word 60599 - .word 49149 - .word 0 - .word 24299 - .word 42445 - .word 45918 - .word 37706 - .word 16381 - .word 0 - .word 61980 - .word 35870 - .word 4262 - .word 42772 - .word 49148 - .word 0 - .word 2378 - .word 21048 - .word 27187 - .word 44880 - .word 16379 - .word 0 - .word 26023 - .word 38535 - .word 63103 - .word 44029 - .word 49146 - .word 0 - .word 51865 - .word 42701 - .word 357 - .word 40715 - .word 16377 - .word 0 - .word 52714 - .word 49990 - .word 38847 - .word 35713 - .word 49144 - .word 0 - .word 43806 - .word 65105 - .word 55139 - .word 59728 - .word 16374 - .word 0 - .word 64429 - .word 64517 - .word 6745 - .word 47746 - .word 49141 - .word 0 - .word 3465 - .word 57626 - .word 20546 - .word 36179 - .word 16372 - .word 0 - .word 22094 - .word 56102 - .word 37959 - .word 48728 - .word 49138 - .word 0 - .word 23306 - .word 25455 - .word 51183 - .word 43976 - .word 16368 - .word 0 - .word 37393 - .word 59257 - .word 52431 - .word 54291 - .word 16381 - .word 0 - .word 39090 - .word 10024 - .word 15035 - .word 43415 - .word 16382 - .word 0 - .word 43741 - .word 37879 - .word 6777 - .word 37983 - .word 49150 - .word 0 - .word 35426 - .word 24730 - .word 14790 - .word 55364 - .word 16381 - .word 0 - .word 35922 - .word 59851 - .word 47783 - .word 35355 - .word 49149 - .word 0 - .word 26997 - .word 19270 - .word 26422 - .word 40719 - .word 16380 - .word 0 - .word 44927 - .word 10365 - .word 61824 - .word 43075 - .word 49147 - .word 0 - .word 58693 - .word 50832 - .word 29111 - .word 42397 - .word 16378 - .word 0 - .word 18548 - .word 6343 - .word 29493 - .word 39194 - .word 49145 - .word 0 - .word 63186 - .word 18681 - .word 63761 - .word 34279 - .word 16376 - .word 0 - .word 30590 - .word 51670 - .word 24700 - .word 57056 - .word 49142 - .word 0 - .word 12395 - .word 18187 - .word 53964 - .word 45381 - .word 16373 - .word 0 - .word 8442 - .word 17290 - .word 60340 - .word 34554 - .word 49140 - .word 0 - .word 42583 - .word 52808 - .word 14422 - .word 49744 - .word 16370 - .word 0 - .word 38491 - .word 10790 - .word 17138 - .word 62758 - .word 49136 - .word 0 - .word 64957 - .word 43359 - .word 35041 - .word 51589 - .word 16366 - .word 0 - .word 54760 - .word 44346 - .word 63893 - .word 44681 - .word 16382 - .word 0 - .word 58037 - .word 18353 - .word 47660 - .word 34940 - .word 16382 - .word 0 - .word 12942 - .word 61844 - .word 37020 - .word 52609 - .word 49149 - .word 0 - .word 9074 - .word 21010 - .word 41308 - .word 34012 - .word 16381 - .word 0 - .word 33111 - .word 27346 - .word 43463 - .word 39226 - .word 49148 - .word 0 - .word 56229 - .word 38650 - .word 52618 - .word 41280 - .word 16379 - .word 0 - .word 28394 - .word 30437 - .word 45662 - .word 40246 - .word 49146 - .word 0 - .word 60627 - .word 1334 - .word 52268 - .word 36747 - .word 16377 - .word 0 - .word 31481 - .word 19361 - .word 56420 - .word 63358 - .word 49143 - .word 0 - .word 4433 - .word 31036 - .word 44150 - .word 51896 - .word 16374 - .word 0 - .word 21935 - .word 37845 - .word 52167 - .word 40591 - .word 49141 - .word 0 - .word 52857 - .word 25760 - .word 12934 - .word 60865 - .word 16371 - .word 0 - .word 30097 - .word 40209 - .word 51883 - .word 43747 - .word 49138 - .word 0 - .word 3097 - .word 41736 - .word 19718 - .word 59248 - .word 16368 - .word 0 - .word 62213 - .word 58640 - .word 23379 - .word 34650 - .word 49135 - .word 0 - .word 39490 - .word 47564 - .word 3293 - .word 51441 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 37057 - .word 51893 - .word 15367 - .word 56044 - .word 16381 - .word 0 - .word 32940 - .word 48642 - .word 29176 - .word 35810 - .word 49149 - .word 0 - .word 5161 - .word 6502 - .word 37918 - .word 40467 - .word 16380 - .word 0 - .word 17565 - .word 33655 - .word 49092 - .word 41537 - .word 49147 - .word 0 - .word 53678 - .word 44288 - .word 26743 - .word 39397 - .word 16378 - .word 0 - .word 31872 - .word 15269 - .word 30938 - .word 34942 - .word 49145 - .word 0 - .word 20440 - .word 62677 - .word 51881 - .word 58469 - .word 16375 - .word 0 - .word 54439 - .word 520 - .word 12343 - .word 46457 - .word 49142 - .word 0 - .word 50526 - .word 61632 - .word 2909 - .word 35241 - .word 16373 - .word 0 - .word 37830 - .word 61581 - .word 47207 - .word 51261 - .word 49139 - .word 0 - .word 25082 - .word 64640 - .word 37139 - .word 35852 - .word 16370 - .word 0 - .word 4883 - .word 40101 - .word 42814 - .word 48151 - .word 49136 - .word 0 - .word 19629 - .word 49380 - .word 65167 - .word 60688 - .word 16366 - .word 0 - .word 28545 - .word 10321 - .word 37155 - .word 65097 - .word 49132 - .word 0 - .word 64819 - .word 9690 - .word 1918 - .word 43254 - .word 16362 - .word 0 - .word 21215 - .word 7025 - .word 57507 - .word 45167 - .word 16383 - .word 0 - .word 55056 - .word 34238 - .word 8713 - .word 44914 - .word 16381 - .word 0 - .word 4267 - .word 1060 - .word 46425 - .word 48156 - .word 49148 - .word 0 - .word 14908 - .word 57526 - .word 48994 - .word 46896 - .word 16379 - .word 0 - .word 21326 - .word 53665 - .word 1969 - .word 42227 - .word 49146 - .word 0 - .word 25051 - .word 4472 - .word 10229 - .word 35587 - .word 16377 - .word 0 - .word 2076 - .word 31531 - .word 22832 - .word 56640 - .word 49143 - .word 0 - .word 60662 - .word 38735 - .word 55096 - .word 42849 - .word 16374 - .word 0 - .word 46215 - .word 1268 - .word 63191 - .word 61960 - .word 49140 - .word 0 - .word 4281 - .word 13548 - .word 25997 - .word 42995 - .word 16371 - .word 0 - .word 59094 - .word 61396 - .word 50012 - .word 57465 - .word 49137 - .word 0 - .word 56623 - .word 39859 - .word 52689 - .word 37061 - .word 16368 - .word 0 - .word 9718 - .word 28760 - .word 6243 - .word 45969 - .word 49134 - .word 0 - .word 22149 - .word 16273 - .word 53084 - .word 53283 - .word 16364 - .word 0 - .word 34037 - .word 57333 - .word 5882 - .word 51824 - .word 49130 - .word 0 - .word 11184 - .word 36893 - .word 23744 - .word 61115 - .word 16359 - .word 0 - .word 51465 - .word 62396 - .word 58983 - .word 59913 - .word 16383 - .word 0 - .word 21679 - .word 9895 - .word 5635 - .word 36049 - .word 16381 - .word 0 - .word 37768 - .word 22289 - .word 42182 - .word 64290 - .word 49147 - .word 0 - .word 29929 - .word 29351 - .word 11432 - .word 53291 - .word 16378 - .word 0 - .word 58374 - .word 18153 - .word 737 - .word 41523 - .word 49145 - .word 0 - .word 31896 - .word 56867 - .word 6398 - .word 61321 - .word 16375 - .word 0 - .word 55425 - .word 64032 - .word 46488 - .word 43176 - .word 49142 - .word 0 - .word 62735 - .word 35007 - .word 19863 - .word 58262 - .word 16372 - .word 0 - .word 2759 - .word 46881 - .word 15376 - .word 37816 - .word 49139 - .word 0 - .word 27202 - .word 45269 - .word 46930 - .word 47379 - .word 16369 - .word 0 - .word 36329 - .word 2846 - .word 16122 - .word 57442 - .word 49135 - .word 0 - .word 7470 - .word 414 - .word 53668 - .word 33732 - .word 16366 - .word 0 - .word 4702 - .word 32984 - .word 47709 - .word 38156 - .word 49132 - .word 0 - .word 59392 - .word 2467 - .word 11268 - .word 40167 - .word 16362 - .word 0 - .word 49683 - .word 209 - .word 55200 - .word 35020 - .word 49128 - .word 0 - .word 45504 - .word 61587 - .word 60548 - .word 36340 - .word 16357 - .word 0 - .word 27380 - .word 54941 - .word 64714 - .word 38724 - .word 16384 - .word 0 - .word 47150 - .word 21425 - .word 33441 - .word 58047 - .word 16380 - .word 0 - .word 10709 - .word 48511 - .word 39648 - .word 42794 - .word 49147 - .word 0 - .word 60862 - .word 8841 - .word 14633 - .word 59785 - .word 16377 - .word 0 - .word 38166 - .word 61183 - .word 58848 - .word 39827 - .word 49144 - .word 0 - .word 18364 - .word 43708 - .word 39063 - .word 50867 - .word 16374 - .word 0 - .word 61920 - .word 34013 - .word 44157 - .word 62530 - .word 49140 - .word 0 - .word 62014 - .word 46109 - .word 55800 - .word 37115 - .word 16371 - .word 0 - .word 46135 - .word 31864 - .word 22791 - .word 42668 - .word 49137 - .word 0 - .word 58857 - .word 54577 - .word 2989 - .word 47612 - .word 16367 - .word 0 - .word 34902 - .word 37732 - .word 51405 - .word 51663 - .word 49133 - .word 0 - .word 9364 - .word 27291 - .word 20920 - .word 54522 - .word 16363 - .word 0 - .word 37485 - .word 50 - .word 60675 - .word 55504 - .word 49129 - .word 0 - .word 35187 - .word 50155 - .word 51754 - .word 52385 - .word 16359 - .word 0 - .word 14814 - .word 63962 - .word 41088 - .word 40486 - .word 49125 - .word 0 - .word 11362 - .word 25769 - .word 50575 - .word 36669 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .word 26223 - .word 5353 - .word 5097 - .word 46924 - .word 16380 - .word 0 - .word 30267 - .word 42379 - .word 29288 - .word 57013 - .word 49146 - .word 0 - .word 42189 - .word 50693 - .word 61652 - .word 33311 - .word 16377 - .word 0 - .word 47396 - .word 16957 - .word 12509 - .word 37576 - .word 49143 - .word 0 - .word 23478 - .word 31241 - .word 24950 - .word 41038 - .word 16373 - .word 0 - .word 17240 - .word 63077 - .word 25824 - .word 43503 - .word 49139 - .word 0 - .word 25576 - .word 39889 - .word 51350 - .word 44857 - .word 16369 - .word 0 - .word 13068 - .word 16791 - .word 29619 - .word 45074 - .word 49135 - .word 0 - .word 60332 - .word 2969 - .word 19586 - .word 44206 - .word 16365 - .word 0 - .word 37599 - .word 42283 - .word 62126 - .word 42363 - .word 49131 - .word 0 - .word 41529 - .word 34093 - .word 65146 - .word 39638 - .word 16361 - .word 0 - .word 10083 - .word 55225 - .word 38396 - .word 35838 - .word 49127 - .word 0 - .word 53136 - .word 32600 - .word 23694 - .word 59889 - .word 16356 - .word 0 - .word 63669 - .word 4602 - .word 61995 - .word 40592 - .word 49122 - .word 0 - .word 64442 - .word 41272 - .word 29937 - .word 63695 - .word 16350 - .word 0 - .word 21215 - .word 7025 - .word 57507 - .word 61551 - .word 16384 - .word 0 - .word 60759 - .word 43057 - .word 21108 - .word 38100 - .word 16380 - .word 0 - .word 19048 - .word 27034 - .word 20875 - .word 38100 - .word 49146 - .word 0 - .word 43286 - .word 62467 - .word 46495 - .word 37059 - .word 16376 - .word 0 - .word 18535 - .word 3739 - .word 31085 - .word 35131 - .word 49142 - .word 0 - .word 47338 - .word 988 - .word 43337 - .word 65023 - .word 16371 - .word 0 - .word 53014 - .word 19205 - .word 31790 - .word 58830 - .word 49137 - .word 0 - .word 64942 - .word 4422 - .word 52367 - .word 52104 - .word 16367 - .word 0 - .word 18376 - .word 62542 - .word 21190 - .word 45226 - .word 49133 - .word 0 - .word 36541 - .word 5903 - .word 55315 - .word 38509 - .word 16363 - .word 0 - .word 58232 - .word 34982 - .word 30759 - .word 64373 - .word 49128 - .word 0 - .word 53034 - .word 58877 - .word 34756 - .word 52727 - .word 16358 - .word 0 - .word 43589 - .word 44050 - .word 54239 - .word 41804 - .word 49124 - .word 0 - .word 58188 - .word 24032 - .word 18788 - .word 61115 - .word 16353 - .word 0 - .word 53178 - .word 32234 - .word 55399 - .word 35974 - .word 49119 - .word 0 - .word 32107 - .word 65066 - .word 9168 - .word 48562 - .word 16347 - .word 0 - .word 25732 - .word 63966 - .word 62259 - .word 38148 - .word 16385 - .word 0 - .word 1290 - .word 5604 - .word 33063 - .word 62145 - .word 16379 - .word 0 - .word 61015 - .word 23258 - .word 11350 - .word 51162 - .word 49145 - .word 0 - .word 27005 - .word 25391 - .word 61437 - .word 41308 - .word 16375 - .word 0 - .word 36713 - .word 64273 - .word 62675 - .word 65487 - .word 49140 - .word 0 - .word 27734 - .word 12066 - .word 17277 - .word 51007 - .word 16370 - .word 0 - .word 22545 - .word 24708 - .word 32287 - .word 39069 - .word 49136 - .word 0 - .word 7137 - .word 26934 - .word 42406 - .word 58901 - .word 16365 - .word 0 - .word 28920 - .word 48738 - .word 2272 - .word 43725 - .word 49131 - .word 0 - .word 12386 - .word 49194 - .word 59841 - .word 63966 - .word 16360 - .word 0 - .word 12291 - .word 20618 - .word 59744 - .word 46112 - .word 49126 - .word 0 - .word 45255 - .word 8860 - .word 16074 - .word 65374 - .word 16355 - .word 0 - .word 24201 - .word 30931 - .word 20557 - .word 44934 - .word 49121 - .word 0 - .word 57092 - .word 56173 - .word 59274 - .word 56860 - .word 16350 - .word 0 - .word 421 - .word 9843 - .word 65450 - .word 57636 - .word 49115 - .word 0 - .word 26834 - .word 64481 - .word 48830 - .word 33265 - .word 16344 - .word 0 - .word 27380 - .word 54941 - .word 64714 - .word 46916 - .word 16385 - .word 0 - .word 16042 - .word 6176 - .word 23933 - .word 50894 - .word 16379 - .word 0 - .word 15496 - .word 30354 - .word 41738 - .word 34536 - .word 49145 - .word 0 - .word 16771 - .word 22379 - .word 52151 - .word 46241 - .word 16374 - .word 0 - .word 13611 - .word 51387 - .word 33531 - .word 61111 - .word 49139 - .word 0 - .word 58938 - .word 199 - .word 35276 - .word 39876 - .word 16369 - .word 0 - .word 34069 - .word 62119 - .word 6313 - .word 51412 - .word 49134 - .word 0 - .word 26024 - .word 61062 - .word 29148 - .word 65510 - .word 16363 - .word 0 - .word 21349 - .word 54243 - .word 12871 - .word 41265 - .word 49129 - .word 0 - .word 4785 - .word 38663 - .word 43132 - .word 51413 - .word 16358 - .word 0 - .word 24101 - .word 62567 - .word 22734 - .word 63346 - .word 49123 - .word 0 - .word 15399 - .word 49395 - .word 40313 - .word 38484 - .word 16353 - .word 0 - .word 28161 - .word 41902 - .word 27845 - .word 45418 - .word 49118 - .word 0 - .word 12182 - .word 20933 - .word 3877 - .word 49303 - .word 16347 - .word 0 - .word 20492 - .word 46011 - .word 10667 - .word 42720 - .word 49112 - .word 0 - .word 46757 - .word 22481 - .word 16184 - .word 41956 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57344 - .word 16385 - .word 0 - .word 15972 - .word 32891 - .word 13820 - .word 41838 - .word 16379 - .word 0 - .word 63823 - .word 14280 - .word 41618 - .word 46885 - .word 49144 - .word 0 - .word 62247 - .word 60117 - .word 61219 - .word 52049 - .word 16373 - .word 0 - .word 4514 - .word 2791 - .word 14455 - .word 57256 - .word 49138 - .word 0 - .word 8237 - .word 29451 - .word 46967 - .word 62423 - .word 16367 - .word 0 - .word 38621 - .word 18263 - .word 65293 - .word 33733 - .word 49133 - .word 0 - .word 20437 - .word 17700 - .word 46099 - .word 36151 - .word 16362 - .word 0 - .word 7628 - .word 50188 - .word 47081 - .word 38422 - .word 49127 - .word 0 - .word 27034 - .word 6950 - .word 65014 - .word 40504 - .word 16356 - .word 0 - .word 929 - .word 31466 - .word 57314 - .word 42341 - .word 49121 - .word 0 - .word 51218 - .word 18814 - .word 40699 - .word 43755 - .word 16350 - .word 0 - .word 60139 - .word 33609 - .word 1443 - .word 43987 - .word 49115 - .word 0 - .word 28121 - .word 19894 - .word 16 - .word 40667 - .word 16344 - .word 0 - .word 47275 - .word 5106 - .word 2805 - .word 59896 - .word 49108 - .word 0 - .word 45414 - .word 34202 - .word 16579 - .word 49848 - .word 16336 - .word 0 - .word 43375 - .word 36280 - .word 61521 - .word 34871 - .word 16386 - .word 0 - .word 16506 - .word 6420 - .word 3056 - .word 34509 - .word 16379 - .word 0 - .word 1987 - .word 42760 - .word 41343 - .word 63988 - .word 49143 - .word 0 - .word 60842 - .word 56864 - .word 63566 - .word 58939 - .word 16372 - .word 0 - .word 55417 - .word 6969 - .word 17921 - .word 53943 - .word 49137 - .word 0 - .word 51573 - .word 24611 - .word 61942 - .word 49060 - .word 16366 - .word 0 - .word 60047 - .word 61936 - .word 1505 - .word 44346 - .word 49131 - .word 0 - .word 6985 - .word 28094 - .word 62181 - .word 39841 - .word 16360 - .word 0 - .word 44966 - .word 25211 - .word 37807 - .word 35582 - .word 49125 - .word 0 - .word 18549 - .word 30768 - .word 43886 - .word 63182 - .word 16353 - .word 0 - .word 28367 - .word 55574 - .word 54863 - .word 55743 - .word 49118 - .word 0 - .word 14135 - .word 59968 - .word 11402 - .word 48712 - .word 16347 - .word 0 - .word 10831 - .word 6630 - .word 39162 - .word 41467 - .word 49112 - .word 0 - .word 44318 - .word 36886 - .word 57433 - .word 64946 - .word 16340 - .word 0 - .word 48971 - .word 52692 - .word 39577 - .word 40471 - .word 49105 - .word 0 - .word 51132 - .word 42759 - .word 59794 - .word 56909 - .word 16332 - .word 0 - .word 25732 - .word 63966 - .word 62259 - .word 42244 - .word 16386 - .word 0 - .word 59756 - .word 3318 - .word 14822 - .word 57094 - .word 16378 - .word 0 - .word 53698 - .word 1627 - .word 14262 - .word 43879 - .word 49143 - .word 0 - .word 39975 - .word 26109 - .word 52231 - .word 33570 - .word 16372 - .word 0 - .word 51646 - .word 31403 - .word 31812 - .word 51139 - .word 49136 - .word 0 - .word 2483 - .word 26589 - .word 1676 - .word 38780 - .word 16365 - .word 0 - .word 48498 - .word 1356 - .word 1608 - .word 58560 - .word 49129 - .word 0 - .word 3924 - .word 17004 - .word 812 - .word 44025 - .word 16358 - .word 0 - .word 46861 - .word 28945 - .word 33303 - .word 32957 - .word 49123 - .word 0 - .word 44566 - .word 64586 - .word 45755 - .word 49135 - .word 16351 - .word 0 - .word 24613 - .word 10799 - .word 48364 - .word 36456 - .word 49116 - .word 0 - .word 30085 - .word 45589 - .word 61330 - .word 53663 - .word 16344 - .word 0 - .word 33497 - .word 5155 - .word 3788 - .word 38522 - .word 49109 - .word 0 - .word 14725 - .word 21779 - .word 34456 - .word 50904 - .word 16337 - .word 0 - .word 52940 - .word 10411 - .word 49330 - .word 53514 - .word 49101 - .word 0 - .word 34723 - .word 21028 - .word 57012 - .word 63430 - .word 16328 - .word 0 - .word 27380 - .word 54941 - .word 64714 - .word 51012 - .word 16386 - .word 0 - .word 45653 - .word 64195 - .word 32236 - .word 47349 - .word 16378 - .word 0 - .word 879 - .word 33324 - .word 35436 - .word 60443 - .word 49142 - .word 0 - .word 46894 - .word 26961 - .word 28118 - .word 38458 - .word 16371 - .word 0 - .word 44554 - .word 3572 - .word 63976 - .word 48787 - .word 49135 - .word 0 - .word 2272 - .word 4313 - .word 35324 - .word 61701 - .word 16363 - .word 0 - .word 30703 - .word 23672 - .word 41539 - .word 38897 - .word 49128 - .word 0 - .word 37671 - .word 61454 - .word 12213 - .word 48895 - .word 16356 - .word 0 - .word 61848 - .word 29005 - .word 2524 - .word 61278 - .word 49120 - .word 0 - .word 28836 - .word 16521 - .word 28345 - .word 38282 - .word 16349 - .word 0 - .word 22288 - .word 21607 - .word 62473 - .word 47665 - .word 49113 - .word 0 - .word 61670 - .word 56396 - .word 40174 - .word 58939 - .word 16341 - .word 0 - .word 11500 - .word 65235 - .word 61923 - .word 35576 - .word 49106 - .word 0 - .word 11242 - .word 2180 - .word 826 - .word 39560 - .word 16334 - .word 0 - .word 43321 - .word 47027 - .word 63349 - .word 35004 - .word 49098 - .word 0 - .word 4958 - .word 42423 - .word 31587 - .word 34920 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 16386 - .word 0 - .word 62439 - .word 8267 - .word 42241 - .word 39352 - .word 16378 - .word 0 - .word 51100 - .word 10343 - .word 41485 - .word 41791 - .word 49142 - .word 0 - .word 22569 - .word 27301 - .word 5322 - .word 44285 - .word 16370 - .word 0 - .word 35593 - .word 39735 - .word 46317 - .word 46825 - .word 49134 - .word 0 - .word 62209 - .word 35548 - .word 38355 - .word 49405 - .word 16362 - .word 0 - .word 41076 - .word 45055 - .word 12154 - .word 52016 - .word 49126 - .word 0 - .word 33794 - .word 34841 - .word 26433 - .word 54648 - .word 16354 - .word 0 - .word 32708 - .word 8606 - .word 28372 - .word 57292 - .word 49118 - .word 0 - .word 58537 - .word 41843 - .word 17546 - .word 59935 - .word 16346 - .word 0 - .word 14261 - .word 60109 - .word 32952 - .word 62535 - .word 49110 - .word 0 - .word 15086 - .word 37621 - .word 31044 - .word 64853 - .word 16338 - .word 0 - .word 41112 - .word 8679 - .word 1028 - .word 32860 - .word 49103 - .word 0 - .word 5006 - .word 59706 - .word 53773 - .word 61388 - .word 16330 - .word 0 - .word 8320 - .word 26227 - .word 30276 - .word 45657 - .word 49094 - .word 0 - .word 12516 - .word 27384 - .word 49627 - .word 38295 - .word 16321 - .word 0 - .word 43375 - .word 36280 - .word 61521 - .word 36919 - .word 16387 - .word 0 - .word 13964 - .word 47780 - .word 48486 - .word 65532 - .word 16377 - .word 0 - .word 53655 - .word 14178 - .word 29810 - .word 57985 - .word 49141 - .word 0 - .word 40644 - .word 13825 - .word 33576 - .word 51229 - .word 16369 - .word 0 - .word 43867 - .word 51159 - .word 21808 - .word 45192 - .word 49133 - .word 0 - .word 64774 - .word 25334 - .word 42575 - .word 39806 - .word 16361 - .word 0 - .word 8550 - .word 43268 - .word 19146 - .word 35010 - .word 49125 - .word 0 - .word 10274 - .word 39807 - .word 58829 - .word 61491 - .word 16352 - .word 0 - .word 64510 - .word 64333 - .word 45409 - .word 53921 - .word 49116 - .word 0 - .word 7837 - .word 47962 - .word 10236 - .word 47211 - .word 16344 - .word 0 - .word 58632 - .word 16136 - .word 57648 - .word 41252 - .word 49108 - .word 0 - .word 50839 - .word 20695 - .word 9993 - .word 35851 - .word 16336 - .word 0 - .word 53977 - .word 3173 - .word 20021 - .word 60931 - .word 49099 - .word 0 - .word 21252 - .word 21065 - .word 18238 - .word 47764 - .word 16327 - .word 0 - .word 15598 - .word 48005 - .word 54092 - .word 59667 - .word 49090 - .word 0 - .word 43865 - .word 24204 - .word 30376 - .word 42053 - .word 16317 - .word 0 - .word 25732 - .word 63966 - .word 62259 - .word 44292 - .word 16387 - .word 0 - .word 57042 - .word 17954 - .word 41982 - .word 54649 - .word 16377 - .word 0 - .word 35272 - .word 59341 - .word 60292 - .word 40343 - .word 49141 - .word 0 - .word 50299 - .word 52389 - .word 64962 - .word 59502 - .word 16368 - .word 0 - .word 39701 - .word 8675 - .word 64086 - .word 43833 - .word 49132 - .word 0 - .word 32919 - .word 36749 - .word 17653 - .word 64514 - .word 16359 - .word 0 - .word 20450 - .word 29105 - .word 54347 - .word 47425 - .word 49123 - .word 0 - .word 51457 - .word 46834 - .word 19008 - .word 34827 - .word 16351 - .word 0 - .word 56572 - .word 25900 - .word 35557 - .word 51097 - .word 49114 - .word 0 - .word 52629 - .word 22805 - .word 35492 - .word 37443 - .word 16342 - .word 0 - .word 60134 - .word 44346 - .word 29251 - .word 54790 - .word 49105 - .word 0 - .word 40525 - .word 1894 - .word 29226 - .word 39888 - .word 16333 - .word 0 - .word 58308 - .word 40784 - .word 61879 - .word 56822 - .word 49096 - .word 0 - .word 39626 - .word 13594 - .word 33728 - .word 37362 - .word 16324 - .word 0 - .word 30018 - .word 64156 - .word 50426 - .word 39179 - .word 49087 - .word 0 - .word 26770 - .word 35175 - .word 34395 - .word 46390 - .word 16313 - .word 0 - .word 27380 - .word 54941 - .word 64714 - .word 53060 - .word 16387 - .word 0 - .word 21489 - .word 47049 - .word 52913 - .word 45633 - .word 16377 - .word 0 - .word 34273 - .word 45339 - .word 64425 - .word 56278 - .word 49140 - .word 0 - .word 9281 - .word 44296 - .word 1457 - .word 34678 - .word 16368 - .word 0 - .word 54032 - .word 26533 - .word 19904 - .word 42704 - .word 49131 - .word 0 - .word 4885 - .word 48150 - .word 35442 - .word 52549 - .word 16358 - .word 0 - .word 37026 - .word 46558 - .word 719 - .word 64617 - .word 49121 - .word 0 - .word 24924 - .word 32254 - .word 45168 - .word 39698 - .word 16349 - .word 0 - .word 58798 - .word 11406 - .word 38703 - .word 48743 - .word 49112 - .word 0 - .word 65026 - .word 39487 - .word 36015 - .word 59805 - .word 16339 - .word 0 - .word 17049 - .word 61342 - .word 62907 - .word 36661 - .word 49103 - .word 0 - .word 29048 - .word 51483 - .word 25283 - .word 44910 - .word 16330 - .word 0 - .word 26979 - .word 49508 - .word 25129 - .word 54883 - .word 49093 - .word 0 - .word 1679 - .word 10398 - .word 12735 - .word 33027 - .word 16321 - .word 0 - .word 27523 - .word 22868 - .word 1994 - .word 36413 - .word 49084 - .word 0 - .word 13664 - .word 7895 - .word 2857 - .word 54679 - .word 16310 - .word 0 - .type _ERFC_TABLE,@object - .size _ERFC_TABLE,3840 - .space 768, 0x00 # pad - .align 16 -_EXP_POLY: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 46603 - .word 2912 - .word 24758 - .word 46603 - .word 16373 - .word 0 - .type _EXP_POLY,@object - .size _EXP_POLY,84 - .space 12, 0x00 # pad - .align 16 -_T_TABLE: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 43884 - .word 55705 - .word 60751 - .word 32945 - .word 16383 - .word 0 - .word 1907 - .word 48131 - .word 53747 - .word 33124 - .word 16383 - .word 0 - .word 9708 - .word 29692 - .word 44867 - .word 33304 - .word 16383 - .word 0 - .word 41431 - .word 44075 - .word 34456 - .word 33485 - .word 16383 - .word 0 - .word 60983 - .word 61366 - .word 22862 - .word 33667 - .word 16383 - .word 0 - .word 16454 - .word 44254 - .word 10435 - .word 33850 - .word 16383 - .word 0 - .word 6697 - .word 14236 - .word 63062 - .word 34033 - .word 16383 - .word 0 - .word 31509 - .word 52296 - .word 50023 - .word 34218 - .word 16383 - .word 0 - .word 47620 - .word 37439 - .word 37211 - .word 34404 - .word 16383 - .word 0 - .word 4112 - .word 40589 - .word 24982 - .word 34591 - .word 16383 - .word 0 - .word 55186 - .word 63128 - .word 13695 - .word 34779 - .word 16383 - .word 0 - .word 34087 - .word 37594 - .word 3712 - .word 34968 - .word 16383 - .word 0 - .word 24541 - .word 24974 - .word 60931 - .word 35157 - .word 16383 - .word 0 - .word 64922 - .word 18798 - .word 54645 - .word 35348 - .word 16383 - .word 0 - .word 35108 - .word 11378 - .word 50757 - .word 35540 - .word 16383 - .word 0 - .word 55015 - .word 60043 - .word 49635 - .word 35733 - .word 16383 - .word 0 - .word 19934 - .word 25711 - .word 51652 - .word 35927 - .word 16383 - .word 0 - .word 43494 - .word 32347 - .word 57179 - .word 36122 - .word 16383 - .word 0 - .word 40150 - .word 8934 - .word 1056 - .word 36319 - .word 16383 - .word 0 - .word 21440 - .word 17869 - .word 14731 - .word 36516 - .word 16383 - .word 0 - .word 58820 - .word 59080 - .word 33047 - .word 36714 - .word 16383 - .word 0 - .word 45532 - .word 5222 - .word 56387 - .word 36913 - .word 16383 - .word 0 - .word 45355 - .word 61156 - .word 19595 - .word 37114 - .word 16383 - .word 0 - .word 49974 - .word 43793 - .word 54131 - .word 37315 - .word 16383 - .word 0 - .word 63916 - .word 38193 - .word 29309 - .word 37518 - .word 16383 - .word 0 - .word 59692 - .word 5094 - .word 11055 - .word 37722 - .word 16383 - .word 0 - .word 1206 - .word 43804 - .word 65295 - .word 37926 - .word 16383 - .word 0 - .word 2401 - .word 65271 - .word 61352 - .word 38132 - .word 16383 - .word 0 - .word 32751 - .word 54988 - .word 65158 - .word 38339 - .word 16383 - .word 0 - .word 23040 - .word 8216 - .word 11575 - .word 38548 - .word 16383 - .word 0 - .word 45198 - .word 61818 - .word 32073 - .word 38757 - .word 16383 - .word 0 - .word 43375 - .word 36280 - .word 61521 - .word 38967 - .word 16383 - .word 0 - .word 35242 - .word 26305 - .word 34786 - .word 39179 - .word 16383 - .word 0 - .word 64101 - .word 8375 - .word 17811 - .word 39392 - .word 16383 - .word 0 - .word 34378 - .word 38143 - .word 11004 - .word 39606 - .word 16383 - .word 0 - .word 21817 - .word 54606 - .word 14777 - .word 39821 - .word 16383 - .word 0 - .word 11309 - .word 11971 - .word 29544 - .word 40037 - .word 16383 - .word 0 - .word 46929 - .word 11519 - .word 55719 - .word 40254 - .word 16383 - .word 0 - .word 9248 - .word 40263 - .word 28184 - .word 40473 - .word 16383 - .word 0 - .word 4526 - .word 37281 - .word 12896 - .word 40693 - .word 16383 - .word 0 - .word 56582 - .word 25600 - .word 10277 - .word 40914 - .word 16383 - .word 0 - .word 20418 - .word 47473 - .word 20751 - .word 41136 - .word 16383 - .word 0 - .word 46820 - .word 34116 - .word 44746 - .word 41359 - .word 16383 - .word 0 - .word 26649 - .word 3145 - .word 17155 - .word 41584 - .word 16383 - .word 0 - .word 48019 - .word 59394 - .word 3944 - .word 41810 - .word 16383 - .word 0 - .word 32926 - .word 2534 - .word 5550 - .word 42037 - .word 16383 - .word 0 - .word 62265 - .word 48798 - .word 22406 - .word 42265 - .word 16383 - .word 0 - .word 14570 - .word 45393 - .word 54953 - .word 42494 - .word 16383 - .word 0 - .word 27422 - .word 61160 - .word 38095 - .word 42725 - .word 16383 - .word 0 - .word 13674 - .word 59749 - .word 37812 - .word 42957 - .word 16383 - .word 0 - .word 3593 - .word 31538 - .word 54550 - .word 43190 - .word 16383 - .word 0 - .word 3832 - .word 60028 - .word 23220 - .word 43425 - .word 16383 - .word 0 - .word 30249 - .word 60560 - .word 9810 - .word 43661 - .word 16383 - .word 0 - .word 54071 - .word 43326 - .word 14773 - .word 43898 - .word 16383 - .word 0 - .word 59689 - .word 48703 - .word 38564 - .word 44136 - .word 16383 - .word 0 - .word 19142 - .word 17057 - .word 16106 - .word 44376 - .word 16383 - .word 0 - .word 47118 - .word 51765 - .word 13394 - .word 44617 - .word 16383 - .word 0 - .word 17269 - .word 26890 - .word 30893 - .word 44859 - .word 16383 - .word 0 - .word 17796 - .word 46816 - .word 3531 - .word 45103 - .word 16383 - .word 0 - .word 9616 - .word 53932 - .word 62849 - .word 45347 - .word 16383 - .word 0 - .word 65083 - .word 26136 - .word 12710 - .word 45594 - .word 16383 - .word 0 - .word 9353 - .word 43281 - .word 50194 - .word 45841 - .word 16383 - .word 0 - .word 38977 - .word 25931 - .word 44706 - .word 46090 - .word 16383 - .word 0 - .word 25732 - .word 63966 - .word 62259 - .word 46340 - .word 16383 - .word 0 - .word 63340 - .word 24277 - .word 37800 - .word 46592 - .word 16383 - .word 0 - .word 30609 - .word 10449 - .word 37347 - .word 46845 - .word 16383 - .word 0 - .word 7804 - .word 36004 - .word 61386 - .word 47099 - .word 16383 - .word 0 - .word 40681 - .word 25339 - .word 44871 - .word 47355 - .word 16383 - .word 0 - .word 40427 - .word 11275 - .word 53829 - .word 47612 - .word 16383 - .word 0 - .word 17915 - .word 4926 - .word 23218 - .word 47871 - .word 16383 - .word 0 - .word 64269 - .word 62185 - .word 19070 - .word 48131 - .word 16383 - .word 0 - .word 14015 - .word 22540 - .word 41887 - .word 48392 - .word 16383 - .word 0 - .word 37858 - .word 34313 - .word 26633 - .word 48655 - .word 16383 - .word 0 - .word 4227 - .word 31347 - .word 39350 - .word 48919 - .word 16383 - .word 0 - .word 36272 - .word 61648 - .word 15009 - .word 49185 - .word 16383 - .word 0 - .word 37974 - .word 26224 - .word 19658 - .word 49452 - .word 16383 - .word 0 - .word 26227 - .word 7741 - .word 53809 - .word 49720 - .word 16383 - .word 0 - .word 25607 - .word 9367 - .word 52442 - .word 49990 - .word 16383 - .word 0 - .word 52019 - .word 21300 - .word 16076 - .word 50262 - .word 16383 - .word 0 - .word 56029 - .word 21766 - .word 10769 - .word 50535 - .word 16383 - .word 0 - .word 24441 - .word 43556 - .word 37045 - .word 50809 - .word 16383 - .word 0 - .word 45405 - .word 43961 - .word 29896 - .word 51085 - .word 16383 - .word 0 - .word 11333 - .word 36862 - .word 55388 - .word 51362 - .word 16383 - .word 0 - .word 10147 - .word 28207 - .word 48518 - .word 51641 - .word 16383 - .word 0 - .word 30542 - .word 17040 - .word 9822 - .word 51922 - .word 16383 - .word 0 - .word 31837 - .word 62066 - .word 5374 - .word 52204 - .word 16383 - .word 0 - .word 52690 - .word 20541 - .word 35718 - .word 52487 - .word 16383 - .word 0 - .word 32996 - .word 8068 - .word 35861 - .word 52772 - .word 16383 - .word 0 - .word 6337 - .word 6425 - .word 6351 - .word 53059 - .word 16383 - .word 0 - .word 9621 - .word 61227 - .word 13274 - .word 53347 - .word 16383 - .word 0 - .word 39622 - .word 20841 - .word 57186 - .word 53636 - .word 16383 - .word 0 - .word 58458 - .word 61738 - .word 7569 - .word 53928 - .word 16383 - .word 0 - .word 50041 - .word 34202 - .word 61593 - .word 54220 - .word 16383 - .word 0 - .word 64031 - .word 53229 - .word 23211 - .word 54515 - .word 16383 - .word 0 - .word 52743 - .word 40859 - .word 24062 - .word 54811 - .word 16383 - .word 0 - .word 27380 - .word 54941 - .word 64714 - .word 55108 - .word 16383 - .word 0 - .word 11396 - .word 28083 - .word 14668 - .word 55408 - .word 16383 - .word 0 - .word 55222 - .word 30895 - .word 5570 - .word 55709 - .word 16383 - .word 0 - .word 52338 - .word 10953 - .word 37999 - .word 56011 - .word 16383 - .word 0 - .word 14165 - .word 56050 - .word 46999 - .word 56315 - .word 16383 - .word 0 - .word 19488 - .word 2098 - .word 33157 - .word 56621 - .word 16383 - .word 0 - .word 37156 - .word 24078 - .word 62594 - .word 56928 - .word 16383 - .word 0 - .word 17440 - .word 47344 - .word 4830 - .word 57238 - .word 16383 - .word 0 - .word 57617 - .word 10900 - .word 57068 - .word 57548 - .word 16383 - .word 0 - .word 54121 - .word 65155 - .word 23295 - .word 57861 - .word 16383 - .word 0 - .word 23121 - .word 48778 - .word 35186 - .word 58175 - .word 16383 - .word 0 - .word 43149 - .word 14141 - .word 27808 - .word 58491 - .word 16383 - .word 0 - .word 18600 - .word 31875 - .word 1767 - .word 58809 - .word 16383 - .word 0 - .word 52770 - .word 60959 - .word 23210 - .word 59128 - .word 16383 - .word 0 - .word 56424 - .word 15435 - .word 27216 - .word 59449 - .word 16383 - .word 0 - .word 35927 - .word 27727 - .word 14400 - .word 59772 - .word 16383 - .word 0 - .word 14639 - .word 56612 - .word 50919 - .word 60096 - .word 16383 - .word 0 - .word 48604 - .word 19484 - .word 6326 - .word 60423 - .word 16383 - .word 0 - .word 11140 - .word 55700 - .word 12318 - .word 60751 - .word 16383 - .word 0 - .word 603 - .word 3491 - .word 3992 - .word 61081 - .word 16383 - .word 0 - .word 62923 - .word 56538 - .word 47515 - .word 61412 - .word 16383 - .word 0 - .word 17673 - .word 44297 - .word 12455 - .word 61746 - .word 16383 - .word 0 - .word 45370 - .word 23039 - .word 30524 - .word 62081 - .word 16383 - .word 0 - .word 6747 - .word 14948 - .word 36830 - .word 62418 - .word 16383 - .word 0 - .word 52268 - .word 9350 - .word 32021 - .word 62757 - .word 16383 - .word 0 - .word 33902 - .word 29503 - .word 16748 - .word 63098 - .word 16383 - .word 0 - .word 15289 - .word 2769 - .word 57203 - .word 63440 - .word 16383 - .word 0 - .word 47732 - .word 24020 - .word 22971 - .word 63785 - .word 16383 - .word 0 - .word 826 - .word 29226 - .word 45787 - .word 64131 - .word 16383 - .word 0 - .word 40009 - .word 58864 - .word 60780 - .word 64479 - .word 16383 - .word 0 - .word 49525 - .word 62598 - .word 3084 - .word 64830 - .word 16383 - .word 0 - .word 34892 - .word 31631 - .word 4444 - .word 65182 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .type _T_TABLE,@object - .size _T_TABLE,1548 - .space 4, 0x00 # pad - .align 8 -.L_2il0floatpacket.0: - .long 0x00100000,0x41f00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 2 -_EXPL_TABLE: - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 16390 - .word 0 - .word 0 - .word 53760 - .word 6135 - .word 45426 - .word 16375 - .word 0 - .word 40944 - .word 28977 - .word 20696 - .word 49689 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 16382 - .word 0 - .word 1 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 1 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .word 1 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _EXPL_TABLE,@object - .size _EXPL_TABLE,96 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfcf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfcf.S deleted file mode 100644 index 468faf1c02..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfcf.S +++ /dev/null @@ -1,635 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erfcf.c" - .text -..TXTST0: -# -- Begin erfcf - .text - .align 16,0x90 - .globl erfcf -erfcf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $56, %esp - movl 8(%ebp), %edi - movl %edi, %eax - andl $2147483647, %eax - shrl $31, %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2139095040, %eax - jae ..B1.24 -..B1.2: - cmpl range@GOTOFF(%ebx,%edi,4), %eax - jae ..B1.21 -..B1.3: - cmpl $1081081856, %eax - jae ..B1.15 -..B1.4: - cmpl $1073741824, %eax - jae ..B1.11 -..B1.5: - cmpl $1056964608, %eax - jae ..B1.10 -..B1.6: - flds 8(%ebp) - cmpl $847249408, %eax - jae ..B1.8 -..B1.7: - fld1 - fsubp %st, %st(1) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.8: - fldl 40+_A@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fld1 - fxch %st(3) - faddl 24+_A@GOTOFF(%ebx) - fmul %st(1), %st - fldl 48+_A@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 8+_A@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(1) - faddl 32+_A@GOTOFF(%ebx) - fmul %st(1), %st - faddl 16+_A@GOTOFF(%ebx) - fmulp %st, %st(1) - faddl _A@GOTOFF(%ebx) - fmulp %st, %st(2) - faddp %st, %st(1) -..B1.9: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.10: - flds 8(%ebp) - fabs - fld1 - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl 48+_AP@GOTOFF(%ebx) - fmul %st(1), %st - fldl 56+_AP@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 32+_AP@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 40+_AP@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 16+_AP@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 24+_AP@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl _AP@GOTOFF(%ebx) - fldl 48+_AQ@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(2) - faddl 8+_AP@GOTOFF(%ebx) - fmul %st(4), %st - faddp %st, %st(1) - fldl 56+_AQ@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(2) - faddl 32+_AQ@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(2) - faddl 40+_AQ@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(2) - faddl 16+_AQ@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(2) - faddl 24+_AQ@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(1) - faddl _AQ@GOTOFF(%ebx) - fxch %st(2) - faddl 8+_AQ@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fdivrp %st, %st(1) - fmuls _ones@GOTOFF(%ebx,%edi,4) - faddl _erfc1@GOTOFF(%ebx,%edi,8) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - flds 8(%ebp) - testl %edi, %edi - fabs - faddl .L_2il0floatpacket.2@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - je ..B1.13 -..B1.12: - fldl 48+_BP1@GOTOFF(%ebx) - fmul %st(1), %st - fldl 40+_BP1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 32+_BP1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 24+_BP1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 16+_BP1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 8+_BP1@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl _BP1@GOTOFF(%ebx) - fldl 48+_BQ1@GOTOFF(%ebx) - fmul %st(3), %st - fldl 40+_BQ1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 32+_BQ1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 24+_BQ1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 16+_BQ1@GOTOFF(%ebx) - fmulp %st, %st(4) - faddl 8+_BQ1@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(2) - faddl _BQ1@GOTOFF(%ebx) - fxch %st(2) - jmp ..B1.14 -..B1.13: - fldl 80+_BP2@GOTOFF(%ebx) - fmul %st(1), %st - fldl 88+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 64+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 72+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 48+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 56+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 32+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 40+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 16+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 24+_BP2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl _BP2@GOTOFF(%ebx) - fldl 64+_BQ2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(2) - faddl 8+_BP2@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl 48+_BQ2@GOTOFF(%ebx) - fmul %st(3), %st - fldl 56+_BQ2@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 32+_BQ2@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 40+_BQ2@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 16+_BQ2@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 24+_BQ2@GOTOFF(%ebx) - fmulp %st, %st(4) - faddl _BQ2@GOTOFF(%ebx) - fxch %st(3) - faddl 8+_BQ2@GOTOFF(%ebx) - fmulp %st, %st(4) -..B1.14: - faddp %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fdivrp %st, %st(1) - fmuls _ones@GOTOFF(%ebx,%edi,4) - faddl _erfc4@GOTOFF(%ebx,%edi,8) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - flds 8(%ebp) - fabs - fld1 - fdiv %st(1), %st - fstpl 24(%esp) - fmul %st(0), %st - fchs - fstpl (%esp) - call __libm_exp_k32 -..B1.16: - fldl 24(%esp) - testl %edi, %edi - fmul %st, %st(1) - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fldl 56+_R1@GOTOFF(%ebx) - fmul %st(1), %st - fldl 48+_R1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 40+_R1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 32+_R1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 24+_R1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 16+_R1@GOTOFF(%ebx) - fmulp %st, %st(2) - faddl 8+_R1@GOTOFF(%ebx) - fmulp %st, %st(2) - faddl _R1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - jne ..B1.20 -..B1.17: - fsts 20(%esp) - cmpl $8388608, 20(%esp) - jl ..B1.28 -..B1.19: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.20: - fsubrs .L_2il0floatpacket.0@GOTOFF(%ebx) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.21: - testl %edi, %edi - je ..B1.29 -..B1.22: - flds .L_2il0floatpacket.0@GOTOFF(%ebx) -..B1.23: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.24: - jne ..B1.26 -..B1.25: - flds zero_two@GOTOFF(%ebx,%edi,4) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - flds 8(%ebp) -..B1.27: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.28: - fstp %st(0) - flds .L_2il0floatpacket.1@GOTOFF(%ebx) - fmul %st(0), %st - fstps 16(%esp) - flds 20(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.29: - flds .L_2il0floatpacket.1@GOTOFF(%ebx) - fmul %st(0), %st - fsts 20(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type erfcf,@function - .size erfcf,.-erfcf - .data -# -- End erfcf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0xc0000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x40000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x0d800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -range: - .long 1092825907 - .long 1081791557 - .type range,@object - .size range,8 - .align 4 -_A: - .long 1346541978 - .long 3220311511 - .long 1794662342 - .long 1071125108 - .long 250944106 - .long 3216827122 - .long 215131671 - .long 1067156170 - .long 548330146 - .long 3212141823 - .long 76350191 - .long 1061937114 - .long 2772654316 - .long 3206307213 - .type _A,@object - .size _A,56 - .align 4 -_AP: - .long 4064916629 - .long 3190878451 - .long 2877165718 - .long 3218164236 - .long 2764139057 - .long 1068232842 - .long 168293639 - .long 3215329394 - .long 881203975 - .long 3215292554 - .long 342818617 - .long 1065638313 - .long 817546319 - .long 3212004140 - .long 1510911299 - .long 3202390104 - .type _AP,@object - .size _AP,64 - .align 4 -_AQ: - .long 1883560946 - .long 1071960885 - .long 853592313 - .long 1071685196 - .long 191605458 - .long 1071250674 - .long 2183121159 - .long 1070390698 - .long 3347411101 - .long 1068928985 - .long 273856425 - .long 1067608207 - .long 671820230 - .long 1065177551 - .long 2414119437 - .long 1063328696 - .type _AQ,@object - .size _AQ,64 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 4 -_erfc1: - .long 1879048192 - .long 1069818465 - .long 3523215360 - .long 1073576883 - .type _erfc1,@object - .size _erfc1,16 - .align 4 -_BP1: - .long 4019088381 - .long 1060143686 - .long 4231883845 - .long 3209038463 - .long 1510730124 - .long 1061755778 - .long 2929202078 - .long 3208591153 - .long 1409179897 - .long 1059475758 - .long 439372548 - .long 3204538649 - .long 3357266387 - .long 1053229132 - .type _BP1,@object - .size _BP1,56 - .align 4 -_BQ1: - .long 3444570556 - .long 1068208773 - .long 4145425017 - .long 1069029647 - .long 1145740212 - .long 1069192522 - .long 2413502193 - .long 1068797491 - .long 2712383784 - .long 1068007659 - .long 3941762314 - .long 1066743858 - .long 3272105283 - .long 1065447630 - .type _BQ1,@object - .size _BQ1,56 - .align 4 -_BP2: - .long 3138848853 - .long 1062211012 - .long 544119287 - .long 3211644465 - .long 2662071917 - .long 1064935492 - .long 2106254088 - .long 3212505578 - .long 377059754 - .long 1064517936 - .long 3523110848 - .long 3210978388 - .long 64932799 - .long 1062023575 - .long 2232373525 - .long 3207568747 - .long 3004568351 - .long 1057518327 - .long 1553969795 - .long 3201939481 - .long 865068135 - .long 1050709866 - .long 348213498 - .long 3193161330 - .type _BP2,@object - .size _BP2,96 - .align 4 -_BQ2: - .long 2220299070 - .long 1070256111 - .long 1607355279 - .long 1069737707 - .long 3222185356 - .long 1069664669 - .long 1988590515 - .long 1068489586 - .long 2612211906 - .long 1067468794 - .long 3802943557 - .long 1065572613 - .long 4286646379 - .long 1063895282 - .long 45248763 - .long 1061257684 - .long 3494068347 - .long 1058887001 - .type _BQ2,@object - .size _BQ2,72 - .align 4 -_erfc4: - .long 0 - .long 1045463040 - .long 4225761280 - .long 1073741823 - .type _erfc4,@object - .size _erfc4,16 - .align 4 -_R1: - .long 1340517714 - .long 1071779287 - .long 1760660317 - .long 3218214358 - .long 3277598851 - .long 1071322187 - .long 1776282588 - .long 3220235438 - .long 2229586924 - .long 1074588991 - .long 2042215417 - .long 3224150558 - .long 1374528972 - .long 1078534706 - .long 1825320511 - .long 3227067102 - .type _R1,@object - .size _R1,64 - .align 4 -zero_two: - .long 0x00000000 - .long 0x40000000 - .type zero_two,@object - .size zero_two,8 - .data - .hidden __libm_exp_k32 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfcl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfcl.S deleted file mode 100644 index 4433175004..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfcl.S +++ /dev/null @@ -1,3850 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erfcl.c" - .text -..TXTST0: -# -- Begin erfcl - .text - .align 16,0x90 - .globl erfcl -erfcl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $164, %esp - fldt 8(%ebp) - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 148(%esp) - fstpt 56(%esp) -..B1.2: - fnstcw 70(%esp) -..B1.3: - movzwl 70(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.76 -..B1.4: - orl $-64768, %edx - movw %dx, 68(%esp) -..B1.5: - fldcw 68(%esp) -..B1.6: - movl $1, %edx -..B1.7: - movl 16(%ebp), %eax - movl %eax, %esi - shrl $15, %esi - andl $32767, %eax - andl $1, %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $32767, %eax - je ..B1.56 -..B1.8: - fldt 8(%ebp) - fldl _zeros@GOTOFF(%ebx) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B1.9 - je ..B1.51 -..B1.9: - fldt _erfcl_RT1@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.15 - jp ..B1.15 -..B1.10: - fldt 12+_erfcl_RT1@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jb ..B1.15 -..B1.11: - fstp %st(0) - fldt _Epsilon@GOTOFF(%ebx) - testl %edx, %edx - fsubrl _ones@GOTOFF(%ebx) - fstpt 12(%esp) - je ..B1.13 -..B1.12: - fldcw 70(%esp) -..B1.13: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 -..B1.14: - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - fldl 8+_erfcl_ASYMPT@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jb ..B1.46 -..B1.16: - fcompl _erfcl_ASYMPT@GOTOFF(%ebx) - fnstsw %ax - sahf - jae ..B1.21 -..B1.17: - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - testl %edx, %edx - fldt _Epsilon@GOTOFF(%ebx) - fsubrp %st, %st(1) - fstpt 12(%esp) - je ..B1.19 -..B1.18: - fldcw 70(%esp) -..B1.19: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 -..B1.20: - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.21: - fldl _ones@GOTOFF(%ebx) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - andl $32767, 64(%esp) - fstpt 24(%esp) - fldt 24(%esp) - fldt 56(%esp) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fmul %st(1), %st - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 12(%esp) - fld %st(0) - fmulp %st, %st(2) - fld %st(0) - movl 20(%esp), %edi - fsub %st(2), %st - andl $32767, %edi - faddp %st, %st(2) - fld %st(1) - lea -16383(%edi), %eax - fmul %st(2), %st - movl %edi, 52(%esp) - movl %eax, %edi - shll $6, %edi - fchs - fld %st(1) - shll $7, %eax - fsub %st(3), %st - fmul %st, %st(3) - addl %eax, %edi - fxch %st(3) - fchs - lea 100(%esp), %eax - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(1) - fstpt 12(%eax) - addl $-16, %esp - fstpt (%eax) - lea 140(%esp), %ecx - movl %ecx, (%esp) - movl %eax, 4(%esp) - fstpt -60(%eax) - movl %edx, -64(%eax) - call __libm_expl_k80 -..B1.79: - fldt 56(%esp) - movl 52(%esp), %edx - addl $16, %esp -..B1.22: - fldl _TWO_63H@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - movl 12(%esp), %ecx - cmpl $-16300, %ecx - fstpt 12(%esp) - fldt 12(%esp) - jle ..B1.24 -..B1.23: - fldt 124(%esp) - addl $16383, %ecx - movzwl 20(%esp), %eax - andl $32767, %ecx - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 20(%esp) - lea 136(%esp), %eax - fldt (%eax) - fxch %st(1) - jmp ..B1.25 -..B1.24: - fldl _TWO_POW_M400@GOTOFF(%ebx) - fldt 124(%esp) - movl %edi, 36(%esp) - movzwl 20(%esp), %edi - movl %edi, %eax - andl $-32768, %eax - fmul %st(1), %st - lea 400(%edi,%ecx), %ecx - andl $32767, %ecx - orl %ecx, %eax - movw %ax, 20(%esp) - lea 136(%esp), %eax - fldt (%eax) - fmulp %st, %st(2) - movl -100(%eax), %edi -..B1.25: - fldt 24(%esp) - fld %st(1) - fxch %st(1) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 72(%esp) - fldt 72(%esp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%eax) - fldt (%eax) - fxch %st(1) - fstpt 124(%esp) - fldt 56(%esp) - fldt _erfcl_CHDX@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.27 -..B1.26: - fldl _erfcl_DX@GOTOFF(%ebx) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - fadd %st(2), %st - fxch %st(1) - jmp ..B1.28 -..B1.27: - fldl 8+_erfcl_DX@GOTOFF(%ebx) - fld %st(1) - fadd %st(1), %st - fld %st(2) - fsub %st(1), %st - faddp %st, %st(2) -..B1.28: - fldt 24(%esp) - testl %esi, %esi - fld %st(0) - fld %st(2) - fxch %st(6) - fstpt 88(%esp) - fld %st(2) - movl 52(%esp), %ecx - fadd %st(4), %st - fdivr %st(7), %st - lea -131064(,%ecx,8), %eax - fmul %st, %st(1) - lea -65532(%eax,%ecx,4), %eax - fxch %st(7) - fstpt 40(%esp) - fld %st(0) - fadd %st(7), %st - fsubp %st, %st(1) - fsubr %st, %st(6) - fld %st(2) - fmul %st(2), %st - fadd %st, %st(6) - fsubrp %st, %st(6) - fxch %st(2) - fsub %st(5), %st - faddp %st, %st(3) - fld %st(5) - fmul %st(3), %st - fld %st(2) - fmul %st(6), %st - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(5) - fmul %st(6), %st - faddp %st, %st(5) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fld %st(0) - fsub %st(3), %st - fxch %st(1) - fstpt 56(%esp) - fldt 56(%esp) - fsub %st(1), %st - fsubp %st, %st(3) - fxch %st(5) - fsubrp %st, %st(2) - fld %st(0) - fmul %st(5), %st - fld %st(5) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(5) - fxch %st(5) - faddp %st, %st(2) - fld %st(5) - fmul %st(2), %st - fld %st(3) - fmul %st(6), %st - fxch %st(3) - fmulp %st, %st(4) - faddp %st, %st(3) - fld %st(0) - fmul %st(2), %st - fxch %st(5) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(2) - fld %st(0) - fadd %st(4), %st - fsubp %st, %st(4) - fsub %st(3), %st - faddp %st, %st(1) - fldt _erfcl_C@GOTOFF(%eax,%ebx) - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fldt 168+_erfcl_Q@GOTOFF(%ebx,%edi) - fmul %st(1), %st - fldt 144+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 120+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 96+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt _erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fldt 180+_erfcl_Q@GOTOFF(%ebx,%edi) - fmul %st(2), %st - fldt 156+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(2), %st - fldt 132+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(2), %st - fldt 108+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 12+_erfcl_Q@GOTOFF(%ebx,%edi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(3) - fldt 40(%esp) - fld %st(0) - fadd %st(4), %st - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fld %st(5) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fldt 88(%esp) - fldt _erfcl_S@GOTOFF(%eax,%ebx) - fmul %st, %st(5) - fxch %st(3) - fmul %st(5), %st - fxch %st(3) - fmulp %st, %st(2) - fld %st(4) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fldt 72(%esp) - fld %st(0) - fmul %st(5), %st - fmul %st, %st(7) - fxch %st(3) - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(2) - fadd %st(7), %st - fsubp %st, %st(7) - fxch %st(2) - fsub %st(6), %st - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fld %st(2) - fmul %st(4), %st - fxch %st(1) - fmul %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 12(%esp) - je ..B1.30 -..B1.29: - fldt 56(%esp) - fxch %st(1) - fmul %st, %st(2) - fmulp %st, %st(3) - fld %st(0) - fsub %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - fsub %st(2), %st - fsub %st(3), %st - faddp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - jmp ..B1.33 -..B1.30: - fld %st(1) - fadd %st(3), %st - fmul %st(1), %st - fstpt 12(%esp) - movzwl 20(%esp), %eax - testl $32767, %eax - jne ..B1.33 -..B1.31: - movzwl 18(%esp), %eax - testl %eax, %eax - jbe ..B1.33 -..B1.32: - fldt 24(%esp) - fmul %st(2), %st - fld %st(2) - fsubr %st(1), %st - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - fadd %st(3), %st - fmul %st(1), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 12(%esp) -..B1.33: - fstp %st(0) - fstp %st(1) - fstp %st(0) - fldt 8(%ebp) - fldt _erfcl_UNDERFLOW_INT@GOTOFF(%ebx) - fcompp - fnstsw %ax - sahf - jp ..B1.34 - jbe ..B1.41 -..B1.34: - testl %edx, %edx - je ..B1.36 -..B1.35: - fldcw 70(%esp) -..B1.36: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 -..B1.37: - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.41: - fldt _small_value_80@GOTOFF(%ebx) - testl %edx, %edx - fmul %st(0), %st - fstpt (%esp) - je ..B1.43 -..B1.42: - fldcw 70(%esp) -..B1.43: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 - jmp ..B1.14 -..B1.46: - fstp %st(0) - fldt _Epsilon@GOTOFF(%ebx) - testl %edx, %edx - fmul %st(0), %st - fstpt 12(%esp) - je ..B1.48 -..B1.47: - fldcw 70(%esp) -..B1.48: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 - jmp ..B1.14 -..B1.51: - fstp %st(0) - fldl _ones@GOTOFF(%ebx) - testl %edx, %edx - fstpt 12(%esp) - je ..B1.53 -..B1.52: - fldcw 70(%esp) -..B1.53: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 - jmp ..B1.14 -..B1.56: - movl 12(%ebp), %eax - testl %esi, %esi - jne ..B1.63 -..B1.57: - cmpl $-2147483648, %eax - jne ..B1.69 -..B1.58: - cmpl $0, 8(%ebp) - jne ..B1.69 -..B1.59: - fldl _zeros@GOTOFF(%ebx) - testl %edx, %edx - fstpt 12(%esp) - je ..B1.61 -..B1.60: - fldcw 70(%esp) -..B1.61: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 -..B1.62: - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.63: - cmpl $-2147483648, %eax - jne ..B1.69 -..B1.64: - cmpl $0, 8(%ebp) - jne ..B1.69 -..B1.65: - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - testl %edx, %edx - fstpt 12(%esp) - je ..B1.67 -..B1.66: - fldcw 70(%esp) -..B1.67: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 -..B1.68: - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.69: - fldt 8(%ebp) - testl %edx, %edx - fmull _ones@GOTOFF(%ebx) - fstpt 12(%esp) - je ..B1.71 -..B1.70: - fldcw 70(%esp) -..B1.71: - fldt 12(%esp) - movl 148(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.38 -..B1.72: - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.76: - xorl %edx, %edx - jmp ..B1.7 - .align 16,0x90 - .type erfcl,@function - .size erfcl,.-erfcl - .data -# -- End erfcl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_erfcl_ASYMPT: - .long 0 - .long 3222929408 - .long 0 - .long 1079689216 - .type _erfcl_ASYMPT,@object - .size _erfcl_ASYMPT,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_POW_M400: - .long 0 - .long 653262848 - .type _TWO_POW_M400,@object - .size _TWO_POW_M400,8 - .align 4 -_erfcl_DX: - .long 0 - .long 1072431104 - .long 0 - .long 1071906816 - .type _erfcl_DX,@object - .size _erfcl_DX,16 - .align 2 -_erfcl_RT1: - .word 21820 - .word 42875 - .word 50317 - .word 58079 - .word 49086 - .word 0 - .word 21820 - .word 42875 - .word 50317 - .word 58079 - .word 16317 - .word 0 - .type _erfcl_RT1,@object - .size _erfcl_RT1,24 - .align 2 -_Epsilon: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _Epsilon,@object - .size _Epsilon,12 - .align 2 -_erfcl_CHDX: - .word 54762 - .word 44346 - .word 63893 - .word 44681 - .word 16382 - .word 0 - .type _erfcl_CHDX,@object - .size _erfcl_CHDX,12 - .align 2 -_erfcl_C: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50944 - .word 39545 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 61184 - .word 35913 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 64512 - .word 55108 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 38967 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 58112 - .word 52540 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 34340 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 43938 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 55351 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 34462 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 42532 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 52130 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 63543 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 38558 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 46628 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 56226 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 63488 - .word 33819 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 40606 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 48676 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 58274 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 63488 - .word 34843 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 41630 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 49700 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 59298 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 63488 - .word 35355 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 42142 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 50212 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 54690 - .word 16389 - .word 0 - .type _erfcl_C,@object - .size _erfcl_C,336 - .align 2 -_erfcl_Q: - .word 13465 - .word 63964 - .word 23888 - .word 38962 - .word 49066 - .word 0 - .word 56793 - .word 9364 - .word 2074 - .word 60725 - .word 16376 - .word 0 - .word 38094 - .word 52495 - .word 21659 - .word 37955 - .word 49149 - .word 0 - .word 56255 - .word 60659 - .word 19352 - .word 51197 - .word 16381 - .word 0 - .word 38745 - .word 34996 - .word 58130 - .word 47148 - .word 49149 - .word 0 - .word 27061 - .word 31727 - .word 37700 - .word 35458 - .word 16381 - .word 0 - .word 30316 - .word 60982 - .word 15920 - .word 46457 - .word 49148 - .word 0 - .word 52759 - .word 48094 - .word 27926 - .word 54790 - .word 16379 - .word 0 - .word 31704 - .word 15513 - .word 33742 - .word 59335 - .word 49146 - .word 0 - .word 10280 - .word 12123 - .word 40636 - .word 59798 - .word 16377 - .word 0 - .word 55231 - .word 62106 - .word 54809 - .word 56625 - .word 49144 - .word 0 - .word 36666 - .word 22902 - .word 8427 - .word 50746 - .word 16375 - .word 0 - .word 46592 - .word 43726 - .word 50753 - .word 43230 - .word 49142 - .word 0 - .word 64491 - .word 43284 - .word 59259 - .word 34800 - .word 16373 - .word 0 - .word 61229 - .word 19548 - .word 49801 - .word 49926 - .word 49139 - .word 0 - .word 1687 - .word 39069 - .word 16746 - .word 48555 - .word 16369 - .word 0 - .word 55359 - .word 55853 - .word 34963 - .word 33408 - .word 16366 - .word 0 - .word 24851 - .word 44488 - .word 55772 - .word 44700 - .word 49147 - .word 0 - .word 44447 - .word 58130 - .word 38723 - .word 40258 - .word 49147 - .word 0 - .word 1500 - .word 15080 - .word 64595 - .word 34359 - .word 16380 - .word 0 - .word 52078 - .word 14763 - .word 48694 - .word 63117 - .word 49147 - .word 0 - .word 4694 - .word 53159 - .word 65475 - .word 45416 - .word 16379 - .word 0 - .word 37430 - .word 32424 - .word 1930 - .word 56261 - .word 49146 - .word 0 - .word 33679 - .word 45771 - .word 8173 - .word 62515 - .word 16377 - .word 0 - .word 49757 - .word 3681 - .word 5948 - .word 63753 - .word 49144 - .word 0 - .word 9193 - .word 10955 - .word 22026 - .word 60547 - .word 16375 - .word 0 - .word 55541 - .word 20458 - .word 54828 - .word 54096 - .word 49142 - .word 0 - .word 47142 - .word 16345 - .word 20299 - .word 45812 - .word 16373 - .word 0 - .word 29126 - .word 37494 - .word 48225 - .word 36984 - .word 49140 - .word 0 - .word 15107 - .word 34726 - .word 44130 - .word 57191 - .word 16370 - .word 0 - .word 57806 - .word 26620 - .word 53230 - .word 42777 - .word 49137 - .word 0 - .word 45097 - .word 47803 - .word 25447 - .word 61330 - .word 16367 - .word 0 - .word 40016 - .word 15109 - .word 58793 - .word 33461 - .word 16367 - .word 0 - .word 6456 - .word 21547 - .word 27586 - .word 56453 - .word 49147 - .word 0 - .word 5294 - .word 26959 - .word 24309 - .word 57122 - .word 49144 - .word 0 - .word 9256 - .word 20178 - .word 27285 - .word 56054 - .word 16378 - .word 0 - .word 11974 - .word 6713 - .word 58610 - .word 53898 - .word 49146 - .word 0 - .word 56155 - .word 5104 - .word 43351 - .word 37953 - .word 16378 - .word 0 - .word 31236 - .word 18492 - .word 31580 - .word 45205 - .word 49145 - .word 0 - .word 20337 - .word 4737 - .word 24808 - .word 48018 - .word 16376 - .word 0 - .word 43780 - .word 34731 - .word 45426 - .word 46730 - .word 49143 - .word 0 - .word 61467 - .word 48142 - .word 38368 - .word 42346 - .word 16374 - .word 0 - .word 39936 - .word 34435 - .word 51154 - .word 36121 - .word 49141 - .word 0 - .word 41171 - .word 26385 - .word 45942 - .word 58461 - .word 16371 - .word 0 - .word 31471 - .word 18426 - .word 18937 - .word 45145 - .word 49138 - .word 0 - .word 23734 - .word 23053 - .word 7429 - .word 33424 - .word 16369 - .word 0 - .word 28624 - .word 21549 - .word 30360 - .word 48021 - .word 49135 - .word 0 - .word 9108 - .word 57175 - .word 16609 - .word 33031 - .word 16366 - .word 0 - .word 44968 - .word 30293 - .word 53704 - .word 38182 - .word 16364 - .word 0 - .word 63279 - .word 65139 - .word 8683 - .word 42110 - .word 49144 - .word 0 - .word 43283 - .word 52727 - .word 26719 - .word 56933 - .word 49146 - .word 0 - .word 18528 - .word 63869 - .word 40120 - .word 60712 - .word 16378 - .word 0 - .word 28913 - .word 42968 - .word 213 - .word 43569 - .word 49146 - .word 0 - .word 2240 - .word 11347 - .word 26371 - .word 51717 - .word 16377 - .word 0 - .word 7147 - .word 20723 - .word 31050 - .word 54241 - .word 49144 - .word 0 - .word 49648 - .word 51324 - .word 11444 - .word 51872 - .word 16375 - .word 0 - .word 8690 - .word 5809 - .word 9903 - .word 46065 - .word 49142 - .word 0 - .word 1296 - .word 54160 - .word 11620 - .word 38443 - .word 16373 - .word 0 - .word 251 - .word 19098 - .word 34161 - .word 60807 - .word 49139 - .word 0 - .word 46412 - .word 5592 - .word 55877 - .word 45861 - .word 16370 - .word 0 - .word 5959 - .word 21591 - .word 50019 - .word 33145 - .word 49137 - .word 0 - .word 2025 - .word 457 - .word 9244 - .word 46095 - .word 16367 - .word 0 - .word 54038 - .word 55252 - .word 55370 - .word 62518 - .word 49133 - .word 0 - .word 47036 - .word 16304 - .word 12880 - .word 40628 - .word 16364 - .word 0 - .word 18241 - .word 19196 - .word 21406 - .word 57530 - .word 16365 - .word 0 - .word 21199 - .word 5012 - .word 49009 - .word 34179 - .word 49146 - .word 0 - .word 54990 - .word 53386 - .word 65270 - .word 33668 - .word 49145 - .word 0 - .word 28726 - .word 33993 - .word 32251 - .word 45542 - .word 16377 - .word 0 - .word 13837 - .word 35230 - .word 52966 - .word 64362 - .word 49144 - .word 0 - .word 39173 - .word 47380 - .word 34462 - .word 36139 - .word 16376 - .word 0 - .word 39489 - .word 64902 - .word 49120 - .word 35472 - .word 49143 - .word 0 - .word 21714 - .word 58783 - .word 27254 - .word 63315 - .word 16373 - .word 0 - .word 7367 - .word 49518 - .word 65112 - .word 52470 - .word 49140 - .word 0 - .word 43556 - .word 37199 - .word 28377 - .word 40908 - .word 16371 - .word 0 - .word 37864 - .word 51941 - .word 23210 - .word 60543 - .word 49137 - .word 0 - .word 51520 - .word 41236 - .word 58920 - .word 42796 - .word 16368 - .word 0 - .word 27066 - .word 4055 - .word 50549 - .word 58076 - .word 49134 - .word 0 - .word 8077 - .word 7791 - .word 5643 - .word 37977 - .word 16365 - .word 0 - .word 56642 - .word 7120 - .word 1392 - .word 48650 - .word 49131 - .word 0 - .word 33215 - .word 4176 - .word 55081 - .word 59653 - .word 16361 - .word 0 - .word 38962 - .word 43845 - .word 18883 - .word 41782 - .word 16366 - .word 0 - .word 9405 - .word 19610 - .word 41716 - .word 40526 - .word 49146 - .word 0 - .word 22463 - .word 33011 - .word 2834 - .word 59404 - .word 49138 - .word 0 - .word 23962 - .word 42196 - .word 52880 - .word 56044 - .word 16375 - .word 0 - .word 56651 - .word 1819 - .word 25970 - .word 41984 - .word 49143 - .word 0 - .word 36494 - .word 8013 - .word 55275 - .word 45183 - .word 16374 - .word 0 - .word 29601 - .word 10973 - .word 29140 - .word 41460 - .word 49141 - .word 0 - .word 33142 - .word 6988 - .word 53485 - .word 34321 - .word 16372 - .word 0 - .word 42305 - .word 46215 - .word 46985 - .word 52653 - .word 49138 - .word 0 - .word 32750 - .word 12648 - .word 9511 - .word 38000 - .word 16369 - .word 0 - .word 28037 - .word 7223 - .word 39341 - .word 52115 - .word 49135 - .word 0 - .word 43511 - .word 40096 - .word 33119 - .word 34189 - .word 16366 - .word 0 - .word 41081 - .word 59110 - .word 54072 - .word 43128 - .word 49132 - .word 0 - .word 52022 - .word 40239 - .word 12039 - .word 52524 - .word 16362 - .word 0 - .word 9970 - .word 11940 - .word 19019 - .word 62959 - .word 49128 - .word 0 - .word 8444 - .word 14648 - .word 8577 - .word 36069 - .word 16359 - .word 0 - .word 47055 - .word 6244 - .word 23935 - .word 45569 - .word 16364 - .word 0 - .word 17962 - .word 25012 - .word 42920 - .word 38222 - .word 49146 - .word 0 - .word 32361 - .word 55573 - .word 62116 - .word 40518 - .word 16375 - .word 0 - .word 23469 - .word 12285 - .word 11074 - .word 41169 - .word 16373 - .word 0 - .word 29710 - .word 22026 - .word 53610 - .word 45713 - .word 49141 - .word 0 - .word 19101 - .word 51375 - .word 37915 - .word 49464 - .word 16372 - .word 0 - .word 1487 - .word 25012 - .word 26269 - .word 42849 - .word 49139 - .word 0 - .word 24702 - .word 7300 - .word 26639 - .word 32851 - .word 16370 - .word 0 - .word 5625 - .word 62032 - .word 62646 - .word 46360 - .word 49136 - .word 0 - .word 16670 - .word 28857 - .word 9900 - .word 61429 - .word 16366 - .word 0 - .word 46530 - .word 36341 - .word 10884 - .word 38667 - .word 49133 - .word 0 - .word 26979 - .word 7608 - .word 53990 - .word 46612 - .word 16363 - .word 0 - .word 13306 - .word 33772 - .word 42194 - .word 54094 - .word 49129 - .word 0 - .word 5215 - .word 26849 - .word 40637 - .word 60704 - .word 16359 - .word 0 - .word 22157 - .word 10775 - .word 9954 - .word 33697 - .word 49126 - .word 0 - .word 62485 - .word 60905 - .word 33942 - .word 35703 - .word 16356 - .word 0 - .word 47033 - .word 9473 - .word 12114 - .word 36373 - .word 16366 - .word 0 - .word 18718 - .word 57887 - .word 63790 - .word 64802 - .word 49145 - .word 0 - .word 60436 - .word 32137 - .word 16772 - .word 44812 - .word 16375 - .word 0 - .word 22870 - .word 68 - .word 14788 - .word 47045 - .word 49139 - .word 0 - .word 13858 - .word 11038 - .word 51083 - .word 33832 - .word 49139 - .word 0 - .word 24411 - .word 53664 - .word 52423 - .word 44992 - .word 16370 - .word 0 - .word 23130 - .word 50537 - .word 29298 - .word 38364 - .word 49137 - .word 0 - .word 59445 - .word 25072 - .word 42634 - .word 55036 - .word 16367 - .word 0 - .word 27750 - .word 60051 - .word 51021 - .word 35697 - .word 49134 - .word 0 - .word 41673 - .word 42346 - .word 29154 - .word 43180 - .word 16364 - .word 0 - .word 24646 - .word 17588 - .word 60780 - .word 49501 - .word 49130 - .word 0 - .word 30636 - .word 48402 - .word 41439 - .word 54315 - .word 16360 - .word 0 - .word 53530 - .word 51574 - .word 33266 - .word 57402 - .word 49126 - .word 0 - .word 24832 - .word 32214 - .word 6566 - .word 58730 - .word 16356 - .word 0 - .word 57338 - .word 52017 - .word 53845 - .word 59748 - .word 49122 - .word 0 - .word 1236 - .word 12983 - .word 25321 - .word 57902 - .word 16352 - .word 0 - .word 42696 - .word 11590 - .word 13704 - .word 47288 - .word 16367 - .word 0 - .word 20112 - .word 35255 - .word 63039 - .word 51665 - .word 49145 - .word 0 - .word 20272 - .word 45351 - .word 26440 - .word 36407 - .word 16375 - .word 0 - .word 23351 - .word 42139 - .word 19582 - .word 38935 - .word 49140 - .word 0 - .word 65431 - .word 27369 - .word 16464 - .word 36140 - .word 16367 - .word 0 - .word 53584 - .word 5561 - .word 32961 - .word 55717 - .word 16367 - .word 0 - .word 39374 - .word 7231 - .word 45599 - .word 56117 - .word 49134 - .word 0 - .word 1294 - .word 6051 - .word 44462 - .word 39418 - .word 16365 - .word 0 - .word 34729 - .word 52585 - .word 9627 - .word 47645 - .word 49131 - .word 0 - .word 17858 - .word 59905 - .word 65371 - .word 52695 - .word 16361 - .word 0 - .word 43933 - .word 27878 - .word 22295 - .word 54792 - .word 49127 - .word 0 - .word 57164 - .word 8466 - .word 41536 - .word 54342 - .word 16357 - .word 0 - .word 62613 - .word 13809 - .word 4914 - .word 51847 - .word 49123 - .word 0 - .word 51382 - .word 5505 - .word 45058 - .word 47893 - .word 16353 - .word 0 - .word 20574 - .word 54447 - .word 25989 - .word 44189 - .word 49119 - .word 0 - .word 20867 - .word 50041 - .word 5177 - .word 38746 - .word 16349 - .word 0 - .word 51710 - .word 33997 - .word 26466 - .word 39335 - .word 16367 - .word 0 - .word 35180 - .word 39426 - .word 44580 - .word 39632 - .word 49145 - .word 0 - .word 39102 - .word 49560 - .word 46254 - .word 52105 - .word 16374 - .word 0 - .word 49858 - .word 3610 - .word 18403 - .word 60348 - .word 49139 - .word 0 - .word 63577 - .word 52764 - .word 23423 - .word 53731 - .word 16368 - .word 0 - .word 17746 - .word 20210 - .word 17254 - .word 46087 - .word 49131 - .word 0 - .word 57780 - .word 38655 - .word 62917 - .word 51922 - .word 49131 - .word 0 - .word 56818 - .word 27103 - .word 46800 - .word 44610 - .word 16362 - .word 0 - .word 42772 - .word 47939 - .word 39429 - .word 53363 - .word 49128 - .word 0 - .word 7127 - .word 43872 - .word 47188 - .word 55109 - .word 16358 - .word 0 - .word 35603 - .word 15923 - .word 26337 - .word 52288 - .word 49124 - .word 0 - .word 15540 - .word 23148 - .word 44469 - .word 46826 - .word 16354 - .word 0 - .word 38573 - .word 44351 - .word 49528 - .word 40134 - .word 49120 - .word 0 - .word 46922 - .word 10206 - .word 58026 - .word 33232 - .word 16350 - .word 0 - .word 48893 - .word 37264 - .word 47364 - .word 55135 - .word 49115 - .word 0 - .word 34563 - .word 54412 - .word 19025 - .word 43320 - .word 16345 - .word 0 - .word 50485 - .word 58441 - .word 18478 - .word 53939 - .word 16366 - .word 0 - .word 57295 - .word 1543 - .word 39725 - .word 59283 - .word 49144 - .word 0 - .word 61902 - .word 50672 - .word 60234 - .word 34832 - .word 16374 - .word 0 - .word 47445 - .word 686 - .word 22678 - .word 38214 - .word 49139 - .word 0 - .word 38808 - .word 16930 - .word 17219 - .word 37683 - .word 16368 - .word 0 - .word 15851 - .word 55325 - .word 43407 - .word 60214 - .word 49132 - .word 0 - .word 1143 - .word 605 - .word 3834 - .word 44087 - .word 16360 - .word 0 - .word 37926 - .word 51721 - .word 32650 - .word 51423 - .word 16358 - .word 0 - .word 719 - .word 37404 - .word 19156 - .word 44137 - .word 49125 - .word 0 - .word 35866 - .word 56877 - .word 40751 - .word 46818 - .word 16355 - .word 0 - .word 17240 - .word 30023 - .word 36586 - .word 42015 - .word 49121 - .word 0 - .word 54230 - .word 7254 - .word 30602 - .word 34461 - .word 16351 - .word 0 - .word 8012 - .word 12609 - .word 22719 - .word 53286 - .word 49116 - .word 0 - .word 30585 - .word 22802 - .word 38382 - .word 39498 - .word 16346 - .word 0 - .word 49910 - .word 61459 - .word 13066 - .word 58648 - .word 49111 - .word 0 - .word 4234 - .word 29117 - .word 43487 - .word 41014 - .word 16341 - .word 0 - .word 15283 - .word 31 - .word 53183 - .word 37265 - .word 16366 - .word 0 - .word 38704 - .word 430 - .word 57551 - .word 43591 - .word 49144 - .word 0 - .word 53647 - .word 31489 - .word 59377 - .word 44715 - .word 16373 - .word 0 - .word 58843 - .word 40196 - .word 27184 - .word 44045 - .word 49138 - .word 0 - .word 21712 - .word 17792 - .word 22495 - .word 41091 - .word 16367 - .word 0 - .word 4064 - .word 22340 - .word 38581 - .word 35349 - .word 49132 - .word 0 - .word 24218 - .word 42337 - .word 60128 - .word 52640 - .word 16360 - .word 0 - .word 20378 - .word 19984 - .word 2299 - .word 54122 - .word 49124 - .word 0 - .word 31249 - .word 59274 - .word 16273 - .word 55107 - .word 49119 - .word 0 - .word 52834 - .word 54517 - .word 12431 - .word 49909 - .word 16351 - .word 0 - .word 54832 - .word 24393 - .word 30353 - .word 51256 - .word 49117 - .word 0 - .word 65180 - .word 60129 - .word 24669 - .word 41244 - .word 16347 - .word 0 - .word 6591 - .word 13357 - .word 31681 - .word 59287 - .word 49112 - .word 0 - .word 26454 - .word 14700 - .word 42966 - .word 39875 - .word 16342 - .word 0 - .word 2956 - .word 33652 - .word 3414 - .word 53265 - .word 49107 - .word 0 - .word 52370 - .word 22181 - .word 28024 - .word 33144 - .word 16337 - .word 0 - .word 13170 - .word 827 - .word 21750 - .word 47190 - .word 16367 - .word 0 - .word 46086 - .word 34614 - .word 16391 - .word 63371 - .word 49143 - .word 0 - .word 23901 - .word 55438 - .word 56964 - .word 55951 - .word 16372 - .word 0 - .word 6825 - .word 37234 - .word 16184 - .word 48173 - .word 49137 - .word 0 - .word 100 - .word 15349 - .word 44285 - .word 40213 - .word 16366 - .word 0 - .word 46705 - .word 62401 - .word 15619 - .word 64493 - .word 49130 - .word 0 - .word 5832 - .word 45818 - .word 5603 - .word 48870 - .word 16359 - .word 0 - .word 26154 - .word 11509 - .word 12905 - .word 33853 - .word 49124 - .word 0 - .word 57899 - .word 64916 - .word 17522 - .word 39399 - .word 16352 - .word 0 - .word 11797 - .word 62659 - .word 15787 - .word 52982 - .word 49115 - .word 0 - .word 4387 - .word 49305 - .word 27685 - .word 41688 - .word 49112 - .word 0 - .word 8893 - .word 53993 - .word 6961 - .word 62732 - .word 16342 - .word 0 - .word 6561 - .word 49840 - .word 37854 - .word 49392 - .word 49108 - .word 0 - .word 22913 - .word 52496 - .word 16836 - .word 64532 - .word 16337 - .word 0 - .word 61478 - .word 12903 - .word 22917 - .word 40137 - .word 49103 - .word 0 - .word 20254 - .word 5653 - .word 41280 - .word 45163 - .word 16332 - .word 0 - .word 9250 - .word 21583 - .word 29887 - .word 42398 - .word 16367 - .word 0 - .word 21296 - .word 56033 - .word 20302 - .word 45697 - .word 49143 - .word 0 - .word 2595 - .word 14223 - .word 9373 - .word 34428 - .word 16372 - .word 0 - .word 43880 - .word 13192 - .word 17465 - .word 51046 - .word 49136 - .word 0 - .word 10750 - .word 52386 - .word 15061 - .word 37140 - .word 16365 - .word 0 - .word 43380 - .word 26688 - .word 4603 - .word 52842 - .word 49129 - .word 0 - .word 57923 - .word 50589 - .word 40806 - .word 36546 - .word 16358 - .word 0 - .word 41550 - .word 43340 - .word 52700 - .word 48703 - .word 49122 - .word 0 - .word 2829 - .word 50954 - .word 33981 - .word 61546 - .word 16350 - .word 0 - .word 53540 - .word 53334 - .word 26985 - .word 35726 - .word 49115 - .word 0 - .word 1383 - .word 41626 - .word 39002 - .word 35204 - .word 16343 - .word 0 - .word 4988 - .word 17152 - .word 47624 - .word 42298 - .word 49106 - .word 0 - .word 13081 - .word 59676 - .word 51281 - .word 43278 - .word 49102 - .word 0 - .word 20576 - .word 9083 - .word 44900 - .word 60572 - .word 16332 - .word 0 - .word 5241 - .word 64752 - .word 26216 - .word 43285 - .word 49098 - .word 0 - .word 54740 - .word 4493 - .word 22744 - .word 47855 - .word 16327 - .word 0 - .word 43008 - .word 40170 - .word 38190 - .word 50840 - .word 16367 - .word 0 - .word 64000 - .word 51124 - .word 38392 - .word 32771 - .word 49143 - .word 0 - .word 6193 - .word 27449 - .word 18043 - .word 41906 - .word 16371 - .word 0 - .word 55083 - .word 10857 - .word 24850 - .word 53024 - .word 49135 - .word 0 - .word 39204 - .word 24043 - .word 43883 - .word 33151 - .word 16364 - .word 0 - .word 16615 - .word 33399 - .word 37109 - .word 40897 - .word 49128 - .word 0 - .word 45005 - .word 13768 - .word 23576 - .word 49662 - .word 16356 - .word 0 - .word 19875 - .word 47904 - .word 27295 - .word 59169 - .word 49120 - .word 0 - .word 50767 - .word 38341 - .word 26349 - .word 34421 - .word 16349 - .word 0 - .word 61460 - .word 9200 - .word 49063 - .word 38824 - .word 49113 - .word 0 - .word 17698 - .word 13464 - .word 19312 - .word 41938 - .word 16341 - .word 0 - .word 14145 - .word 49711 - .word 41841 - .word 42410 - .word 49105 - .word 0 - .word 52259 - .word 38890 - .word 11861 - .word 38197 - .word 16333 - .word 0 - .word 37928 - .word 15208 - .word 58116 - .word 52459 - .word 49096 - .word 0 - .word 32955 - .word 48671 - .word 55988 - .word 42873 - .word 49084 - .word 0 - .word 10284 - .word 13591 - .word 10015 - .word 45425 - .word 16321 - .word 0 - .word 60165 - .word 7231 - .word 29309 - .word 47020 - .word 16366 - .word 0 - .word 2826 - .word 34241 - .word 10052 - .word 46822 - .word 49142 - .word 0 - .word 38150 - .word 11520 - .word 57874 - .word 50634 - .word 16370 - .word 0 - .word 13154 - .word 32010 - .word 59285 - .word 54374 - .word 49134 - .word 0 - .word 3630 - .word 36258 - .word 15737 - .word 57945 - .word 16362 - .word 0 - .word 33484 - .word 32040 - .word 11194 - .word 61229 - .word 49126 - .word 0 - .word 29890 - .word 19177 - .word 6587 - .word 64088 - .word 16354 - .word 0 - .word 47912 - .word 33375 - .word 45262 - .word 33179 - .word 49119 - .word 0 - .word 35727 - .word 49010 - .word 4249 - .word 33927 - .word 16347 - .word 0 - .word 48287 - .word 11774 - .word 34966 - .word 34177 - .word 49111 - .word 0 - .word 59219 - .word 12218 - .word 14591 - .word 33807 - .word 16339 - .word 0 - .word 45587 - .word 38263 - .word 60150 - .word 65351 - .word 49102 - .word 0 - .word 64248 - .word 19753 - .word 11467 - .word 61248 - .word 16330 - .word 0 - .word 8987 - .word 4417 - .word 35296 - .word 54967 - .word 49094 - .word 0 - .word 58348 - .word 59855 - .word 58179 - .word 46574 - .word 16322 - .word 0 - .word 838 - .word 40288 - .word 16803 - .word 34203 - .word 49086 - .word 0 - .word 19985 - .word 64792 - .word 35689 - .word 34160 - .word 16365 - .word 0 - .word 63242 - .word 24737 - .word 37564 - .word 33357 - .word 49142 - .word 0 - .word 21080 - .word 30395 - .word 32053 - .word 60879 - .word 16369 - .word 0 - .word 31967 - .word 27284 - .word 22818 - .word 55292 - .word 49133 - .word 0 - .word 25886 - .word 29922 - .word 20917 - .word 49964 - .word 16361 - .word 0 - .word 16415 - .word 22145 - .word 37135 - .word 44903 - .word 49125 - .word 0 - .word 60061 - .word 56529 - .word 59607 - .word 40115 - .word 16353 - .word 0 - .word 61716 - .word 63444 - .word 60667 - .word 35604 - .word 49117 - .word 0 - .word 44658 - .word 58531 - .word 9530 - .word 62744 - .word 16344 - .word 0 - .word 62260 - .word 39586 - .word 42345 - .word 54833 - .word 49108 - .word 0 - .word 28253 - .word 12485 - .word 44364 - .word 47473 - .word 16336 - .word 0 - .word 12640 - .word 24607 - .word 1626 - .word 40656 - .word 49100 - .word 0 - .word 34428 - .word 36370 - .word 1024 - .word 34362 - .word 16328 - .word 0 - .word 29040 - .word 20316 - .word 63988 - .word 57186 - .word 49091 - .word 0 - .word 56625 - .word 35023 - .word 4494 - .word 47694 - .word 16319 - .word 0 - .word 12074 - .word 64589 - .word 55447 - .word 37930 - .word 49083 - .word 0 - .word 50967 - .word 1382 - .word 5204 - .word 52101 - .word 16367 - .word 0 - .word 3284 - .word 33134 - .word 2262 - .word 47439 - .word 49141 - .word 0 - .word 46363 - .word 11691 - .word 13356 - .word 36476 - .word 16369 - .word 0 - .word 3419 - .word 29155 - .word 56063 - .word 55913 - .word 49132 - .word 0 - .word 46070 - .word 27060 - .word 45787 - .word 42709 - .word 16360 - .word 0 - .word 48455 - .word 49617 - .word 63339 - .word 65012 - .word 49123 - .word 0 - .word 11309 - .word 38321 - .word 50476 - .word 49291 - .word 16351 - .word 0 - .word 63177 - .word 54179 - .word 19446 - .word 37218 - .word 49115 - .word 0 - .word 17008 - .word 20702 - .word 63396 - .word 55953 - .word 16342 - .word 0 - .word 58916 - .word 21526 - .word 44533 - .word 41856 - .word 49106 - .word 0 - .word 4054 - .word 60910 - .word 64524 - .word 62288 - .word 16333 - .word 0 - .word 572 - .word 56463 - .word 6651 - .word 46074 - .word 49097 - .word 0 - .word 294 - .word 32916 - .word 12940 - .word 33845 - .word 16325 - .word 0 - .word 61241 - .word 23461 - .word 12133 - .word 49362 - .word 49088 - .word 0 - .word 43813 - .word 54697 - .word 47595 - .word 36628 - .word 16316 - .word 0 - .word 7023 - .word 63196 - .word 1211 - .word 52552 - .word 49079 - .word 0 - .word 49710 - .word 23216 - .word 57316 - .word 57937 - .word 16366 - .word 0 - .word 16917 - .word 54685 - .word 15559 - .word 33684 - .word 49141 - .word 0 - .word 19402 - .word 20755 - .word 35177 - .word 43607 - .word 16368 - .word 0 - .word 18988 - .word 7708 - .word 26373 - .word 56330 - .word 49131 - .word 0 - .word 31678 - .word 36048 - .word 15370 - .word 36299 - .word 16359 - .word 0 - .word 62053 - .word 9463 - .word 59420 - .word 46669 - .word 49122 - .word 0 - .word 43189 - .word 37083 - .word 47017 - .word 59851 - .word 16349 - .word 0 - .word 56431 - .word 23594 - .word 54456 - .word 38275 - .word 49113 - .word 0 - .word 57207 - .word 5358 - .word 61057 - .word 48816 - .word 16340 - .word 0 - .word 55955 - .word 61547 - .word 7096 - .word 62073 - .word 49103 - .word 0 - .word 38324 - .word 43297 - .word 2038 - .word 39337 - .word 16331 - .word 0 - .word 48019 - .word 63539 - .word 58854 - .word 49683 - .word 49094 - .word 0 - .word 38415 - .word 45891 - .word 48038 - .word 62495 - .word 16321 - .word 0 - .word 6285 - .word 58141 - .word 38062 - .word 39153 - .word 49085 - .word 0 - .word 8535 - .word 47970 - .word 20521 - .word 50223 - .word 16312 - .word 0 - .word 3599 - .word 31205 - .word 53376 - .word 62523 - .word 49075 - .word 0 - .word 53390 - .word 39428 - .word 31508 - .word 33365 - .word 16367 - .word 0 - .word 24907 - .word 1998 - .word 17203 - .word 47787 - .word 49140 - .word 0 - .word 65154 - .word 44054 - .word 55771 - .word 52050 - .word 16367 - .word 0 - .word 59345 - .word 56252 - .word 17241 - .word 56609 - .word 49130 - .word 0 - .word 21068 - .word 33081 - .word 36502 - .word 61470 - .word 16357 - .word 0 - .word 5838 - .word 32265 - .word 27141 - .word 33320 - .word 49121 - .word 0 - .word 13157 - .word 36097 - .word 56398 - .word 36061 - .word 16348 - .word 0 - .word 34641 - .word 3406 - .word 61161 - .word 38959 - .word 49111 - .word 0 - .word 36822 - .word 2107 - .word 7812 - .word 42013 - .word 16338 - .word 0 - .word 57689 - .word 7026 - .word 46609 - .word 45217 - .word 49101 - .word 0 - .word 65442 - .word 46672 - .word 32230 - .word 48567 - .word 16328 - .word 0 - .word 38794 - .word 56166 - .word 59740 - .word 52052 - .word 49091 - .word 0 - .word 7020 - .word 42539 - .word 58408 - .word 55641 - .word 16318 - .word 0 - .word 5792 - .word 16154 - .word 40642 - .word 59348 - .word 49081 - .word 0 - .word 45758 - .word 39239 - .word 10684 - .word 64996 - .word 16308 - .word 0 - .word 17135 - .word 25280 - .word 14240 - .word 34593 - .word 49072 - .word 0 - .word 22956 - .word 27174 - .word 6236 - .word 35739 - .word 16367 - .word 0 - .word 41448 - .word 9608 - .word 15061 - .word 33872 - .word 49140 - .word 0 - .word 35041 - .word 22115 - .word 31787 - .word 62060 - .word 16366 - .word 0 - .word 47943 - .word 57954 - .word 5630 - .word 56794 - .word 49129 - .word 0 - .word 12256 - .word 51468 - .word 48243 - .word 51918 - .word 16356 - .word 0 - .word 16861 - .word 555 - .word 19712 - .word 47409 - .word 49119 - .word 0 - .word 14521 - .word 28998 - .word 64476 - .word 43241 - .word 16346 - .word 0 - .word 42742 - .word 52364 - .word 18112 - .word 39394 - .word 49109 - .word 0 - .word 11937 - .word 57143 - .word 59317 - .word 35844 - .word 16336 - .word 0 - .word 54775 - .word 41142 - .word 37066 - .word 65147 - .word 49098 - .word 0 - .word 52047 - .word 20166 - .word 2989 - .word 59124 - .word 16325 - .word 0 - .word 63890 - .word 14576 - .word 19973 - .word 53583 - .word 49088 - .word 0 - .word 51017 - .word 21644 - .word 32682 - .word 48474 - .word 16315 - .word 0 - .word 14951 - .word 9527 - .word 54932 - .word 43797 - .word 49078 - .word 0 - .word 19956 - .word 63323 - .word 21590 - .word 40697 - .word 16305 - .word 0 - .word 13287 - .word 59412 - .word 52293 - .word 36781 - .word 49068 - .word 0 - .word 20654 - .word 3963 - .word 37243 - .word 46202 - .word 16367 - .word 0 - .word 14259 - .word 41161 - .word 56379 - .word 47991 - .word 49139 - .word 0 - .word 29552 - .word 20159 - .word 19967 - .word 36969 - .word 16366 - .word 0 - .word 36671 - .word 37033 - .word 31146 - .word 56915 - .word 49128 - .word 0 - .word 40096 - .word 16159 - .word 8745 - .word 43779 - .word 16355 - .word 0 - .word 31426 - .word 40251 - .word 6629 - .word 33649 - .word 49118 - .word 0 - .word 62460 - .word 14572 - .word 46922 - .word 51685 - .word 16344 - .word 0 - .word 21330 - .word 50824 - .word 20752 - .word 39663 - .word 49107 - .word 0 - .word 59043 - .word 6300 - .word 36178 - .word 60824 - .word 16333 - .word 0 - .word 11117 - .word 55297 - .word 15596 - .word 46598 - .word 49096 - .word 0 - .word 52972 - .word 24185 - .word 7857 - .word 35668 - .word 16323 - .word 0 - .word 48165 - .word 35957 - .word 4973 - .word 54554 - .word 49085 - .word 0 - .word 40559 - .word 40135 - .word 50657 - .word 41665 - .word 16312 - .word 0 - .word 22209 - .word 12399 - .word 38770 - .word 63599 - .word 49074 - .word 0 - .word 21134 - .word 56966 - .word 28654 - .word 49967 - .word 16301 - .word 0 - .word 55252 - .word 38724 - .word 60696 - .word 38196 - .word 49064 - .word 0 - .word 50324 - .word 38050 - .word 41691 - .word 52128 - .word 16367 - .word 0 - .word 57576 - .word 19017 - .word 35093 - .word 33984 - .word 49139 - .word 0 - .word 45261 - .word 53464 - .word 26203 - .word 44021 - .word 16365 - .word 0 - .word 59506 - .word 58350 - .word 50456 - .word 56993 - .word 49127 - .word 0 - .word 39656 - .word 29013 - .word 30706 - .word 36875 - .word 16354 - .word 0 - .word 15950 - .word 25278 - .word 29858 - .word 47692 - .word 49116 - .word 0 - .word 44951 - .word 52254 - .word 26639 - .word 61649 - .word 16342 - .word 0 - .word 14884 - .word 15288 - .word 36355 - .word 39823 - .word 49105 - .word 0 - .word 33589 - .word 37339 - .word 42662 - .word 51420 - .word 16331 - .word 0 - .word 59837 - .word 52901 - .word 27833 - .word 33178 - .word 49094 - .word 0 - .word 23530 - .word 8792 - .word 46326 - .word 42790 - .word 16320 - .word 0 - .word 22918 - .word 41993 - .word 30280 - .word 55154 - .word 49082 - .word 0 - .word 22935 - .word 40180 - .word 10208 - .word 35510 - .word 16309 - .word 0 - .word 24655 - .word 6092 - .word 5569 - .word 45708 - .word 49071 - .word 0 - .word 1836 - .word 9946 - .word 17030 - .word 60600 - .word 16297 - .word 0 - .word 58034 - .word 64044 - .word 12732 - .word 39095 - .word 49060 - .word 0 - .word 54043 - .word 4884 - .word 4993 - .word 50896 - .word 16365 - .word 0 - .word 52175 - .word 36282 - .word 1403 - .word 48115 - .word 49138 - .word 0 - .word 8979 - .word 278 - .word 60581 - .word 52397 - .word 16364 - .word 0 - .word 62427 - .word 36042 - .word 64958 - .word 57041 - .word 49126 - .word 0 - .word 22617 - .word 56486 - .word 29933 - .word 62075 - .word 16352 - .word 0 - .word 6668 - .word 34800 - .word 16726 - .word 33764 - .word 49115 - .word 0 - .word 58438 - .word 34332 - .word 45904 - .word 36716 - .word 16341 - .word 0 - .word 64514 - .word 12491 - .word 17770 - .word 39912 - .word 49103 - .word 0 - .word 38781 - .word 4147 - .word 20350 - .word 43369 - .word 16329 - .word 0 - .word 11653 - .word 23288 - .word 23101 - .word 47107 - .word 49091 - .word 0 - .word 24538 - .word 52112 - .word 19258 - .word 51147 - .word 16317 - .word 0 - .word 55081 - .word 11864 - .word 2795 - .word 55511 - .word 49079 - .word 0 - .word 30359 - .word 7516 - .word 42523 - .word 60199 - .word 16305 - .word 0 - .word 51632 - .word 54516 - .word 60788 - .word 65273 - .word 49067 - .word 0 - .word 8259 - .word 26817 - .word 16640 - .word 36463 - .word 16294 - .word 0 - .word 25358 - .word 21633 - .word 63088 - .word 39650 - .word 49056 - .word 0 - .word 37940 - .word 45084 - .word 22741 - .word 53976 - .word 16366 - .word 0 - .word 56905 - .word 35663 - .word 13071 - .word 34053 - .word 49138 - .word 0 - .word 6338 - .word 45524 - .word 29128 - .word 62353 - .word 16363 - .word 0 - .word 53870 - .word 55231 - .word 26051 - .word 57072 - .word 49125 - .word 0 - .word 25356 - .word 27338 - .word 39402 - .word 52225 - .word 16351 - .word 0 - .word 53832 - .word 61470 - .word 21273 - .word 47778 - .word 49113 - .word 0 - .word 58577 - .word 63695 - .word 35460 - .word 43698 - .word 16339 - .word 0 - .word 4520 - .word 44723 - .word 47409 - .word 39956 - .word 49101 - .word 0 - .word 1812 - .word 29018 - .word 42821 - .word 36525 - .word 16327 - .word 0 - .word 59061 - .word 29228 - .word 16191 - .word 33380 - .word 49089 - .word 0 - .word 39396 - .word 18010 - .word 60638 - .word 60994 - .word 16314 - .word 0 - .word 49088 - .word 9900 - .word 51011 - .word 55711 - .word 49076 - .word 0 - .word 37150 - .word 50516 - .word 56492 - .word 50852 - .word 16302 - .word 0 - .word 28484 - .word 40361 - .word 52896 - .word 46416 - .word 49064 - .word 0 - .word 62255 - .word 31126 - .word 18737 - .word 43665 - .word 16290 - .word 0 - .word 12057 - .word 58357 - .word 2287 - .word 39984 - .word 49052 - .word 0 - .word 10303 - .word 34822 - .word 30753 - .word 42638 - .word 16367 - .word 0 - .word 35383 - .word 38620 - .word 16953 - .word 48193 - .word 49137 - .word 0 - .word 33393 - .word 6703 - .word 23267 - .word 37093 - .word 16363 - .word 0 - .word 15343 - .word 55882 - .word 8818 - .word 57090 - .word 49124 - .word 0 - .word 43704 - .word 64267 - .word 56511 - .word 43925 - .word 16350 - .word 0 - .word 4607 - .word 47760 - .word 9543 - .word 33791 - .word 49112 - .word 0 - .word 56389 - .word 24814 - .word 13621 - .word 51980 - .word 16337 - .word 0 - .word 53957 - .word 28278 - .word 52920 - .word 39972 - .word 49099 - .word 0 - .word 44558 - .word 56829 - .word 64035 - .word 61466 - .word 16324 - .word 0 - .word 38720 - .word 53021 - .word 48635 - .word 47250 - .word 49086 - .word 0 - .word 44746 - .word 16730 - .word 48948 - .word 36315 - .word 16312 - .word 0 - .word 35899 - .word 1861 - .word 5901 - .word 55812 - .word 49073 - .word 0 - .word 22074 - .word 38313 - .word 14608 - .word 42863 - .word 16299 - .word 0 - .word 55515 - .word 23576 - .word 64018 - .word 32920 - .word 49061 - .word 0 - .word 12839 - .word 2194 - .word 19804 - .word 52126 - .word 16286 - .word 0 - .word 11439 - .word 41150 - .word 15351 - .word 40172 - .word 49048 - .word 0 - .word 29431 - .word 9874 - .word 45662 - .word 49530 - .word 16366 - .word 0 - .word 65266 - .word 58931 - .word 1289 - .word 34097 - .word 49137 - .word 0 - .word 37900 - .word 52013 - .word 19533 - .word 44126 - .word 16362 - .word 0 - .word 56648 - .word 29183 - .word 44293 - .word 57098 - .word 49123 - .word 0 - .word 6159 - .word 2813 - .word 55364 - .word 36937 - .word 16349 - .word 0 - .word 43479 - .word 31839 - .word 13895 - .word 47785 - .word 49110 - .word 0 - .word 5187 - .word 20139 - .word 24873 - .word 61810 - .word 16335 - .word 0 - .word 122 - .word 12763 - .word 63612 - .word 39970 - .word 49097 - .word 0 - .word 44050 - .word 14658 - .word 36451 - .word 51689 - .word 16322 - .word 0 - .word 25644 - .word 4873 - .word 38936 - .word 33417 - .word 49084 - .word 0 - .word 47798 - .word 57836 - .word 54492 - .word 43203 - .word 16309 - .word 0 - .word 13594 - .word 52300 - .word 36178 - .word 55848 - .word 49070 - .word 0 - .word 62324 - .word 37045 - .word 44215 - .word 36078 - .word 16296 - .word 0 - .word 9408 - .word 55695 - .word 35369 - .word 46620 - .word 49057 - .word 0 - .word 55933 - .word 58459 - .word 63135 - .word 62102 - .word 16282 - .word 0 - .word 9035 - .word 28599 - .word 9663 - .word 40267 - .word 49044 - .word 0 - .word 64440 - .word 9942 - .word 11459 - .word 51063 - .word 16366 - .word 0 - .word 54621 - .word 1381 - .word 54593 - .word 57593 - .word 49136 - .word 0 - .word 57672 - .word 22144 - .word 48770 - .word 34240 - .word 16362 - .word 0 - .word 41335 - .word 40315 - .word 35384 - .word 40709 - .word 49123 - .word 0 - .word 44154 - .word 2667 - .word 29983 - .word 48395 - .word 16348 - .word 0 - .word 11933 - .word 28752 - .word 33333 - .word 57526 - .word 49109 - .word 0 - .word 28038 - .word 64578 - .word 40018 - .word 34186 - .word 16335 - .word 0 - .word 37517 - .word 65009 - .word 17291 - .word 40628 - .word 49096 - .word 0 - .word 55118 - .word 35846 - .word 36301 - .word 48278 - .word 16321 - .word 0 - .word 8485 - .word 24440 - .word 14912 - .word 57363 - .word 49082 - .word 0 - .word 32377 - .word 28880 - .word 65211 - .word 34074 - .word 16308 - .word 0 - .word 34616 - .word 16831 - .word 8616 - .word 40478 - .word 49069 - .word 0 - .word 8999 - .word 50919 - .word 12017 - .word 48079 - .word 16294 - .word 0 - .word 35787 - .word 61739 - .word 12812 - .word 57101 - .word 49055 - .word 0 - .word 44504 - .word 58876 - .word 42861 - .word 33904 - .word 16281 - .word 0 - .word 47876 - .word 27247 - .word 49503 - .word 40257 - .word 49042 - .word 0 - .type _erfcl_Q,@object - .size _erfcl_Q,5376 - .align 2 -_erfcl_S: - .word 0 - .word 0 - .word 0 - .word 57344 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56559 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55197 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45662 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45290 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44607 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43781 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42924 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42104 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41357 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40696 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40122 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39629 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39210 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38855 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38556 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38304 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38091 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37913 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37763 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37637 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37531 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37442 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37368 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37305 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37252 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37208 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37189 - .word 16382 - .word 0 - .type _erfcl_S,@object - .size _erfcl_S,336 - .align 2 -_erfcl_UNDERFLOW_INT: - .word 42217 - .word 46880 - .word 24677 - .word 54546 - .word 16389 - .word 0 - .type _erfcl_UNDERFLOW_INT,@object - .size _erfcl_UNDERFLOW_INT,12 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_expl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erff.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erff.S deleted file mode 100644 index 2280e0db4c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erff.S +++ /dev/null @@ -1,251 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erff.c" - .text -..TXTST0: -# -- Begin erff - .text - .align 16,0x90 - .globl erff -erff: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - movl 16(%esp), %edx - movl %edx, %eax - andl $-2147483648, %eax - andl $2147483647, %edx - orl $1065353216, %eax - movl %eax, (%esp) - cmpl $2139095040, %edx - flds (%esp) - jge ..B1.8 -..B1.2: - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - cmpl $1081791744, %edx - jge ..B1.7 -..B1.3: - cmpl $1065353216, %edx - jl ..B1.5 -..B1.4: - movl %edx, %ecx - andl $8388607, %edx - shrl $23, %ecx - orl $1065353216, %edx - movl %edx, (%esp) - flds (%esp) - fsubl .L_2il0floatpacket.0@GOTOFF(%eax) - fld %st(0) - lea (%ecx,%ecx,2), %ecx - shll $5, %ecx - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldl -12104+_dbA@GOTOFF(%eax,%ecx) - fmul %st(3), %st - fldl -12120+_dbA@GOTOFF(%eax,%ecx) - fmul %st(4), %st - fxch %st(1) - faddl -12112+_dbA@GOTOFF(%eax,%ecx) - fmul %st(3), %st - faddp %st, %st(1) - fldl -12072+_dbA@GOTOFF(%eax,%ecx) - fmul %st(4), %st - fxch %st(1) - faddl -12128+_dbA@GOTOFF(%eax,%ecx) - fxch %st(1) - faddl -12080+_dbA@GOTOFF(%eax,%ecx) - fmul %st(3), %st - fldl -12088+_dbA@GOTOFF(%eax,%ecx) - fmul %st(5), %st - faddp %st, %st(1) - fldl -12040+_dbA@GOTOFF(%eax,%ecx) - fmul %st(5), %st - fxch %st(1) - faddl -12096+_dbA@GOTOFF(%eax,%ecx) - fxch %st(1) - faddl -12048+_dbA@GOTOFF(%eax,%ecx) - fmulp %st, %st(4) - fldl -12056+_dbA@GOTOFF(%eax,%ecx) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fxch %st(2) - faddl -12064+_dbA@GOTOFF(%eax,%ecx) - fmul %st(1), %st - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - addl $12, %esp - ret -..B1.5: - fstp %st(0) - flds 16(%esp) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldl 48+_dbA@GOTOFF(%eax) - fmul %st(1), %st - fldl 56+_dbA@GOTOFF(%eax) - fmul %st(2), %st - fxch %st(1) - faddl 32+_dbA@GOTOFF(%eax) - fmul %st(2), %st - fxch %st(1) - faddl 40+_dbA@GOTOFF(%eax) - fmul %st(2), %st - fxch %st(1) - faddl 16+_dbA@GOTOFF(%eax) - fmul %st(2), %st - fxch %st(1) - faddl 24+_dbA@GOTOFF(%eax) - fmulp %st, %st(2) - faddl _dbA@GOTOFF(%eax) - fxch %st(1) - faddl 8+_dbA@GOTOFF(%eax) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) -..B1.6: - addl $12, %esp - ret -..B1.7: - fldl 256+_dbA@GOTOFF(%eax) - fmulp %st, %st(1) - addl $12, %esp - ret -..B1.8: - je ..B1.11 -..B1.9: - fstp %st(0) - flds 16(%esp) - fadd %st(0), %st -..B1.11: - addl $12, %esp - ret - .align 16,0x90 - .type erff,@function - .size erff,.-erff - .data -# -- End erff - .section .rodata, "a" - .align 16 - .align 16 -_dbA: - .long 1346373606 - .long 1072827863 - .long 1710987328 - .long 3218608756 - .long 2039146822 - .long 1069343472 - .long 2052989911 - .long 3214639770 - .long 3741021613 - .long 1064657550 - .long 2828932584 - .long 3209415657 - .long 556515485 - .long 1058898537 - .long 1493771156 - .long 3202627648 - .long 1460823802 - .long 1072622165 - .long 647757120 - .long 1069445687 - .long 1478820123 - .long 3217479081 - .long 827266439 - .long 1069662880 - .long 4153551678 - .long 3215381932 - .long 3249389370 - .long 3213783616 - .long 3875823656 - .long 1066650297 - .long 2479749796 - .long 3212012677 - .long 4079794357 - .long 3210967401 - .long 3292960271 - .long 1062989018 - .long 1338933997 - .long 3204757561 - .long 4209598023 - .long 3207545998 - .long 2886434981 - .long 1072693201 - .long 1721637260 - .long 1060257935 - .long 960688093 - .long 3210436681 - .long 1128797080 - .long 1064950642 - .long 798939459 - .long 3213958757 - .long 937205111 - .long 1067493282 - .long 3504975339 - .long 3215465534 - .long 3388113641 - .long 1068080152 - .long 9542307 - .long 3215088353 - .long 1310184383 - .long 1065080747 - .long 3264801679 - .long 1066837484 - .long 3394984936 - .long 3214223095 - .long 4294967295 - .long 1072693247 - .type _dbA,@object - .size _dbA,264 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3ff80000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfl.S deleted file mode 100644 index 8a7b0eb63c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/erfl.S +++ /dev/null @@ -1,1925 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erfl.c" - .text -..TXTST0: -# -- Begin erfl - .text - .align 16,0x90 - .globl erfl -erfl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $68, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.39 -..B1.4: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.5: - fldcw 12(%esp) -..B1.6: - movl $1, %ecx -..B1.7: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movzwl 16(%ebp), %esi - andl $32767, %esi - flds ones@GOTOFF(%ebx,%edx,4) - movl %esi, %edx - movl 12(%ebp), %edi - movl %edi, %eax - shll $16, %edx - shrl $16, %eax - orl %eax, %edx - fstpt 48(%esp) - cmpl $32767, %esi - je ..B1.32 -..B1.8: - cmpl $1073860832, %edx - jge ..B1.26 -..B1.9: - fldt 8(%ebp) - fstpt 32(%esp) - fldt 32(%esp) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fucompp - fnstsw %ax - sahf - jp ..B1.10 - je ..B1.29 -..B1.10: - cmpl $16343, %esi - jle ..B1.18 -..B1.11: - cmpl $16380, %esi - jge ..B1.15 -..B1.12: - fldt 32(%esp) - testl %ecx, %ecx - fld %st(0) - fmul %st(1), %st - fld %st(1) - fld %st(2) - fldl _TWO_32H@GOTOFF(%ebx) - fmul %st(4), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fsub %st(1), %st - fldt 96+_ldbA@GOTOFF(%ebx) - fmul %st(3), %st - fldt 84+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 60+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt 12+_ldbA@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(3) - fmulp %st, %st(4) - fldt _ldbA@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%esp) - je ..B1.14 -..B1.13: - fldcw 14(%esp) -..B1.14: - fldt 32(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - fldt 48(%esp) - lea -1073793024(%edx), %eax - fldt 32(%esp) - shrl $16, %edx - addl $-16380, %edx - cmpl $47103, %eax - fmulp %st, %st(1) - ja ..L3 - movl $6, %edx -..L3: - movl %edx, %esi - shll $4, %esi - imull $360, %edx, %edx - fmull erfRRTable@GOTOFF(%esi,%ebx) - fldt 456+_ldbA@GOTOFF(%ebx,%edx) - testl %ecx, %ecx - fldt 444+_ldbA@GOTOFF(%ebx,%edx) - fldt 432+_ldbA@GOTOFF(%ebx,%edx) - fldt 420+_ldbA@GOTOFF(%ebx,%edx) - fldt 408+_ldbA@GOTOFF(%ebx,%edx) - fldt 396+_ldbA@GOTOFF(%ebx,%edx) - fldt 384+_ldbA@GOTOFF(%ebx,%edx) - fxch %st(7) - faddl 8+erfRRTable@GOTOFF(%ebx,%esi) - fmul %st, %st(6) - fxch %st(5) - faddp %st, %st(6) - fxch %st(4) - fmul %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fxch %st(2) - fmul %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmul %st(1), %st - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - fldt 372+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 360+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 348+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 336+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 324+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 312+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 300+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 288+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 276+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 264+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fmul %st, %st(1) - fld %st(0) - fldt 252+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 240+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 228+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(3) - fmul %st, %st(2) - fld %st(0) - fldt 216+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fldt 204+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(4) - fxch %st(3) - fstpt (%esp) - fldl _TWO_32H@GOTOFF(%ebx) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fld %st(0) - fxch %st(3) - fsub %st(4), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fmul %st(6), %st - fmul %st(2), %st - faddp %st, %st(3) - fld %st(3) - fmul %st(1), %st - fadd %st, %st(5) - fsubrp %st, %st(5) - fsub %st(4), %st - faddp %st, %st(2) - fldt 132+_ldbA@GOTOFF(%ebx,%edx) - fld %st(0) - fmul %st(6), %st - fstpt 16(%esp) - fmul %st(1), %st - fldt 144+_ldbA@GOTOFF(%ebx,%edx) - fmul %st(7), %st - faddp %st, %st(1) - fldt 180+_ldbA@GOTOFF(%ebx,%edx) - fmul %st, %st(6) - fmulp %st, %st(2) - fldt 192+_ldbA@GOTOFF(%ebx,%edx) - fmulp %st, %st(7) - fxch %st(6) - faddp %st, %st(1) - fldt 156+_ldbA@GOTOFF(%ebx,%edx) - fld %st(0) - fadd %st(6), %st - fmul %st, %st(4) - fsubr %st, %st(1) - fxch %st(6) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 168+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(1) - fld %st(4) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fmul %st(4), %st - fxch %st(3) - fsubr %st, %st(5) - fxch %st(1) - faddp %st, %st(5) - fxch %st(3) - fmul %st(4), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 108+_ldbA@GOTOFF(%ebx,%edx) - fld %st(0) - fldt 16(%esp) - fadd %st, %st(1) - fld %st(1) - fadd %st(5), %st - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(5) - faddp %st, %st(2) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fldt 32(%esp) - fld %st(0) - fmul %st(1), %st - fmul %st(1), %st - fmulp %st, %st(1) - fldt (%esp) - fmulp %st, %st(1) - fldt 120+_ldbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 48(%esp) - fmulp %st, %st(1) - fstpt 48(%esp) - je ..B1.17 -..B1.16: - fldcw 14(%esp) -..B1.17: - fldt 48(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - fldt _TWO5600@GOTOFF(%ebx) - testl %esi, %esi - fldt 32(%esp) - fmul %st(1), %st - fstpt 32(%esp) - fldt 32(%esp) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_32H@GOTOFF(%ebx) - fld %st(0) - fmul %st(2), %st - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(1) - fld %st(0) - fsubr %st(3), %st - fldt _ldbA@GOTOFF(%ebx) - fmul %st, %st(2) - fmulp %st, %st(1) - fldt 12+_ldbA@GOTOFF(%ebx) - fmulp %st, %st(4) - faddp %st, %st(3) - jne ..B1.22 -..B1.19: - testl $65520, %edx - je ..B1.22 -..B1.20: - fldt 48(%esp) - fldt 32(%esp) - fmulp %st, %st(1) - fldt _DenoBND@GOTOFF(%ebx) - fmul %st(5), %st - fcompp - fnstsw %ax - sahf - jbe ..B1.22 -..B1.21: - fstp %st(3) - fld %st(2) - fadd %st(2), %st - fmul %st, %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fldt 12+_TWO5600@GOTOFF(%ebx) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.23 -..B1.22: - fstp %st(1) - fstp %st(2) - faddp %st, %st(1) - fldt 12+_TWO5600@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%esp) -..B1.23: - testl %ecx, %ecx - je ..B1.25 -..B1.24: - fldcw 14(%esp) -..B1.25: - fldt (%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - fldt _Epsilon@GOTOFF(%ebx) - testl %ecx, %ecx - fldt 48(%esp) - fmul %st, %st(1) - fsubp %st, %st(1) - fstpt 48(%esp) - je ..B1.28 -..B1.27: - fldcw 14(%esp) -..B1.28: - fldt 48(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.29: - testl %ecx, %ecx - je ..B1.31 -..B1.30: - fldcw 14(%esp) - fldt 8(%ebp) - fstpt 32(%esp) -..B1.31: - fldt 32(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - cmpl $-2147483648, %edi - jne ..B1.34 -..B1.33: - cmpl $0, 8(%ebp) - je ..B1.36 -..B1.34: - fldt 8(%ebp) - fadd %st(0), %st - fstpt 48(%esp) -..B1.36: - testl %ecx, %ecx - je ..B1.38 -..B1.37: - fldcw 14(%esp) -..B1.38: - fldt 48(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - xorl %ecx, %ecx - jmp ..B1.7 - .align 16,0x90 - .type erfl,@function - .size erfl,.-erfl - .data -# -- End erfl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -_ldbA: - .word 0 - .word 0 - .word 47746 - .word 36974 - .word 16383 - .word 0 - .word 30720 - .word 36515 - .word 17515 - .word 42715 - .word 16348 - .word 0 - .word 13842 - .word 7119 - .word 41816 - .word 49299 - .word 49149 - .word 0 - .word 3215 - .word 8543 - .word 37072 - .word 59159 - .word 16379 - .word 0 - .word 33545 - .word 17489 - .word 29065 - .word 56342 - .word 49145 - .word 0 - .word 23161 - .word 4543 - .word 59015 - .word 43821 - .word 16375 - .word 0 - .word 15198 - .word 65095 - .word 55656 - .word 57366 - .word 49140 - .word 0 - .word 11319 - .word 61676 - .word 11803 - .word 64720 - .word 16369 - .word 0 - .word 23735 - .word 16978 - .word 56014 - .word 63664 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 61888 - .word 54818 - .word 16380 - .word 0 - .word 10044 - .word 28505 - .word 55013 - .word 60780 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 27524 - .word 35697 - .word 16380 - .word 0 - .word 61965 - .word 13477 - .word 25391 - .word 40556 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 8518 - .word 53546 - .word 49142 - .word 0 - .word 60180 - .word 52984 - .word 38086 - .word 60834 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 60744 - .word 44249 - .word 49140 - .word 0 - .word 63138 - .word 9916 - .word 20408 - .word 61684 - .word 16340 - .word 0 - .word 50506 - .word 17424 - .word 9343 - .word 52291 - .word 16367 - .word 0 - .word 50365 - .word 34444 - .word 5016 - .word 49178 - .word 16364 - .word 0 - .word 17941 - .word 44182 - .word 56946 - .word 34035 - .word 49128 - .word 0 - .word 41364 - .word 35872 - .word 36905 - .word 43189 - .word 49124 - .word 0 - .word 47342 - .word 2906 - .word 40861 - .word 33222 - .word 16352 - .word 0 - .word 48408 - .word 44394 - .word 43316 - .word 61646 - .word 16347 - .word 0 - .word 52639 - .word 32949 - .word 29686 - .word 51873 - .word 49111 - .word 0 - .word 13354 - .word 8312 - .word 46883 - .word 36813 - .word 49107 - .word 0 - .word 10783 - .word 42642 - .word 20549 - .word 33739 - .word 16335 - .word 0 - .word 42435 - .word 44080 - .word 27835 - .word 37640 - .word 16330 - .word 0 - .word 55413 - .word 51626 - .word 37570 - .word 37609 - .word 49094 - .word 0 - .word 62471 - .word 35756 - .word 61962 - .word 33520 - .word 49089 - .word 0 - .word 40388 - .word 48302 - .word 32466 - .word 36673 - .word 16317 - .word 0 - .word 21782 - .word 37556 - .word 26897 - .word 52597 - .word 16311 - .word 0 - .word 35272 - .word 16771 - .word 34830 - .word 63430 - .word 49075 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26972 - .word 52968 - .word 16381 - .word 0 - .word 34629 - .word 50944 - .word 29785 - .word 56844 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 26328 - .word 64248 - .word 16380 - .word 0 - .word 5285 - .word 428 - .word 53188 - .word 60110 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 19746 - .word 48186 - .word 49145 - .word 0 - .word 3964 - .word 321 - .word 7123 - .word 45083 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 25230 - .word 61571 - .word 49142 - .word 0 - .word 57803 - .word 48946 - .word 59164 - .word 36732 - .word 49110 - .word 0 - .word 46948 - .word 32819 - .word 54758 - .word 43668 - .word 16372 - .word 0 - .word 16614 - .word 63709 - .word 23635 - .word 47684 - .word 16368 - .word 0 - .word 5734 - .word 50071 - .word 41702 - .word 52540 - .word 49134 - .word 0 - .word 1767 - .word 50346 - .word 34241 - .word 45792 - .word 49129 - .word 0 - .word 21673 - .word 57712 - .word 23306 - .word 47181 - .word 16360 - .word 0 - .word 30917 - .word 34592 - .word 23220 - .word 33297 - .word 16352 - .word 0 - .word 55246 - .word 63001 - .word 17535 - .word 33707 - .word 49122 - .word 0 - .word 5457 - .word 35457 - .word 53300 - .word 62645 - .word 16347 - .word 0 - .word 9460 - .word 62267 - .word 29700 - .word 39878 - .word 16347 - .word 0 - .word 54791 - .word 30369 - .word 50586 - .word 36074 - .word 49110 - .word 0 - .word 2078 - .word 44475 - .word 65531 - .word 40136 - .word 49108 - .word 0 - .word 65081 - .word 909 - .word 65384 - .word 51785 - .word 16335 - .word 0 - .word 42502 - .word 52825 - .word 47801 - .word 35033 - .word 16333 - .word 0 - .word 56809 - .word 22568 - .word 24289 - .word 58056 - .word 49096 - .word 0 - .word 53182 - .word 10272 - .word 7761 - .word 53779 - .word 49093 - .word 0 - .word 48071 - .word 2665 - .word 17237 - .word 54209 - .word 16321 - .word 0 - .word 49513 - .word 25795 - .word 55780 - .word 36409 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19372 - .word 46606 - .word 16382 - .word 0 - .word 22905 - .word 34398 - .word 64354 - .word 59506 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 8556 - .word 42135 - .word 16381 - .word 0 - .word 15826 - .word 39989 - .word 27742 - .word 58791 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 45602 - .word 63202 - .word 49147 - .word 0 - .word 61021 - .word 62759 - .word 37190 - .word 44093 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 11408 - .word 56180 - .word 16374 - .word 0 - .word 10545 - .word 4814 - .word 18495 - .word 39194 - .word 49109 - .word 0 - .word 49818 - .word 2604 - .word 44885 - .word 39501 - .word 16376 - .word 0 - .word 35457 - .word 26400 - .word 3144 - .word 55829 - .word 49141 - .word 0 - .word 1168 - .word 22940 - .word 48307 - .word 56355 - .word 49139 - .word 0 - .word 60825 - .word 56496 - .word 32133 - .word 38661 - .word 16370 - .word 0 - .word 41837 - .word 62246 - .word 39292 - .word 38617 - .word 16366 - .word 0 - .word 61718 - .word 27283 - .word 11883 - .word 33288 - .word 49134 - .word 0 - .word 51738 - .word 39830 - .word 42849 - .word 49937 - .word 16360 - .word 0 - .word 45393 - .word 52381 - .word 54757 - .word 41874 - .word 16361 - .word 0 - .word 45169 - .word 44591 - .word 30009 - .word 57007 - .word 49125 - .word 0 - .word 11552 - .word 4380 - .word 40671 - .word 40665 - .word 49124 - .word 0 - .word 28211 - .word 31057 - .word 64947 - .word 47497 - .word 16353 - .word 0 - .word 61755 - .word 33819 - .word 30246 - .word 61557 - .word 16350 - .word 0 - .word 57599 - .word 65445 - .word 31608 - .word 55873 - .word 49116 - .word 0 - .word 21063 - .word 33239 - .word 23242 - .word 34595 - .word 49113 - .word 0 - .word 24566 - .word 16137 - .word 47167 - .word 52509 - .word 16343 - .word 0 - .word 20857 - .word 62758 - .word 44126 - .word 43729 - .word 16338 - .word 0 - .word 26678 - .word 64201 - .word 37761 - .word 41436 - .word 49106 - .word 0 - .word 15315 - .word 3435 - .word 56025 - .word 62814 - .word 16331 - .word 0 - .word 19814 - .word 59948 - .word 14740 - .word 56311 - .word 16332 - .word 0 - .word 36977 - .word 22840 - .word 9289 - .word 39778 - .word 49096 - .word 0 - .word 62085 - .word 64048 - .word 54574 - .word 65118 - .word 49094 - .word 0 - .word 28752 - .word 34202 - .word 22833 - .word 38817 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 43704 - .word 63314 - .word 16382 - .word 0 - .word 17048 - .word 17271 - .word 64911 - .word 39894 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 47414 - .word 62353 - .word 16379 - .word 0 - .word 53119 - .word 3173 - .word 58504 - .word 64362 - .word 49113 - .word 0 - .word 0 - .word 0 - .word 19176 - .word 46765 - .word 49148 - .word 0 - .word 36591 - .word 64385 - .word 59980 - .word 41399 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 352 - .word 36373 - .word 16380 - .word 0 - .word 63217 - .word 55085 - .word 16723 - .word 42154 - .word 49116 - .word 0 - .word 62758 - .word 20699 - .word 19176 - .word 46765 - .word 49146 - .word 0 - .word 18142 - .word 49445 - .word 47413 - .word 62353 - .word 49144 - .word 0 - .word 54343 - .word 9201 - .word 60310 - .word 40529 - .word 16377 - .word 0 - .word 62797 - .word 60885 - .word 40240 - .word 39787 - .word 49143 - .word 0 - .word 7512 - .word 45008 - .word 10012 - .word 39639 - .word 49142 - .word 0 - .word 20359 - .word 48234 - .word 1564 - .word 57372 - .word 16373 - .word 0 - .word 11764 - .word 26683 - .word 64145 - .word 49882 - .word 49137 - .word 0 - .word 32393 - .word 50330 - .word 31801 - .word 34151 - .word 49139 - .word 0 - .word 5247 - .word 4806 - .word 33577 - .word 41709 - .word 16369 - .word 0 - .word 43823 - .word 34097 - .word 44124 - .word 38558 - .word 16367 - .word 0 - .word 65526 - .word 14942 - .word 25531 - .word 60526 - .word 49134 - .word 0 - .word 38557 - .word 7794 - .word 42920 - .word 40918 - .word 16362 - .word 0 - .word 31363 - .word 35665 - .word 11710 - .word 52655 - .word 16363 - .word 0 - .word 33312 - .word 35439 - .word 34687 - .word 46194 - .word 49129 - .word 0 - .word 21144 - .word 58026 - .word 60687 - .word 57306 - .word 49127 - .word 0 - .word 20701 - .word 12315 - .word 12846 - .word 54836 - .word 16358 - .word 0 - .word 45362 - .word 30760 - .word 28723 - .word 42182 - .word 16354 - .word 0 - .word 16353 - .word 46602 - .word 41748 - .word 42697 - .word 49123 - .word 0 - .word 20735 - .word 3347 - .word 26735 - .word 62816 - .word 16351 - .word 0 - .word 13205 - .word 16964 - .word 38504 - .word 48289 - .word 16351 - .word 0 - .word 28004 - .word 15789 - .word 31604 - .word 37913 - .word 49117 - .word 0 - .word 17923 - .word 56666 - .word 63953 - .word 36481 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 36194 - .word 65534 - .word 16382 - .word 0 - .word 12232 - .word 62525 - .word 48597 - .word 39676 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 29918 - .word 37380 - .word 16371 - .word 0 - .word 48638 - .word 64479 - .word 2811 - .word 58988 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 44876 - .word 56070 - .word 49141 - .word 0 - .word 64093 - .word 3811 - .word 8439 - .word 45892 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 42382 - .word 52955 - .word 16375 - .word 0 - .word 7924 - .word 29399 - .word 61525 - .word 36582 - .word 16343 - .word 0 - .word 46606 - .word 18426 - .word 11663 - .word 35044 - .word 49145 - .word 0 - .word 15382 - .word 23178 - .word 43683 - .word 34109 - .word 16378 - .word 0 - .word 6438 - .word 10314 - .word 6872 - .word 49529 - .word 49146 - .word 0 - .word 64583 - .word 11206 - .word 41955 - .word 52421 - .word 16378 - .word 0 - .word 13495 - .word 31464 - .word 61723 - .word 36178 - .word 49146 - .word 0 - .word 28427 - .word 18799 - .word 40522 - .word 59729 - .word 16375 - .word 0 - .word 47510 - .word 26829 - .word 39947 - .word 33535 - .word 16377 - .word 0 - .word 64666 - .word 11700 - .word 15653 - .word 46358 - .word 49145 - .word 0 - .word 6475 - .word 64324 - .word 16618 - .word 52067 - .word 16376 - .word 0 - .word 31765 - .word 32664 - .word 9436 - .word 33916 - .word 16373 - .word 0 - .word 38078 - .word 37286 - .word 55507 - .word 62195 - .word 49143 - .word 0 - .word 16438 - .word 19728 - .word 54394 - .word 45557 - .word 16375 - .word 0 - .word 34868 - .word 45266 - .word 60847 - .word 41133 - .word 49140 - .word 0 - .word 6929 - .word 9316 - .word 56077 - .word 32933 - .word 49142 - .word 0 - .word 60039 - .word 42217 - .word 20756 - .word 52409 - .word 16373 - .word 0 - .word 38571 - .word 57934 - .word 18985 - .word 61369 - .word 49138 - .word 0 - .word 44492 - .word 40353 - .word 2663 - .word 35859 - .word 49140 - .word 0 - .word 54254 - .word 26892 - .word 54523 - .word 56697 - .word 16370 - .word 0 - .word 63636 - .word 38694 - .word 30824 - .word 51163 - .word 49138 - .word 0 - .word 56107 - .word 41638 - .word 48577 - .word 57632 - .word 49138 - .word 0 - .word 13301 - .word 46198 - .word 34221 - .word 52080 - .word 16368 - .word 0 - .word 6730 - .word 19704 - .word 41453 - .word 49062 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 32541 - .word 25746 - .word 20185 - .word 50811 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 40118 - .word 38623 - .word 16333 - .word 0 - .word 63899 - .word 60569 - .word 18971 - .word 35021 - .word 49068 - .word 0 - .word 0 - .word 0 - .word 35006 - .word 57940 - .word 49105 - .word 0 - .word 31190 - .word 18012 - .word 64261 - .word 44050 - .word 16305 - .word 0 - .word 0 - .word 0 - .word 44288 - .word 57137 - .word 16341 - .word 0 - .word 30741 - .word 21478 - .word 2085 - .word 43126 - .word 49077 - .word 0 - .word 43184 - .word 28511 - .word 48193 - .word 41628 - .word 49113 - .word 0 - .word 38069 - .word 12322 - .word 59848 - .word 47812 - .word 16348 - .word 0 - .word 14423 - .word 51984 - .word 32740 - .word 45128 - .word 49119 - .word 0 - .word 4208 - .word 46602 - .word 27709 - .word 35782 - .word 16354 - .word 0 - .word 36873 - .word 25112 - .word 30428 - .word 48402 - .word 49124 - .word 0 - .word 10843 - .word 45056 - .word 322 - .word 58525 - .word 16358 - .word 0 - .word 34740 - .word 5397 - .word 19459 - .word 63343 - .word 49128 - .word 0 - .word 43258 - .word 62838 - .word 12965 - .word 52557 - .word 16362 - .word 0 - .word 52181 - .word 57107 - .word 24596 - .word 44275 - .word 49132 - .word 0 - .word 8033 - .word 61170 - .word 58452 - .word 55638 - .word 16366 - .word 0 - .word 18754 - .word 55045 - .word 40463 - .word 41822 - .word 49134 - .word 0 - .word 31326 - .word 56708 - .word 50347 - .word 42397 - .word 49136 - .word 0 - .word 54840 - .word 45764 - .word 11355 - .word 33431 - .word 49141 - .word 0 - .word 56285 - .word 35328 - .word 49599 - .word 58875 - .word 49141 - .word 0 - .word 42904 - .word 46324 - .word 60880 - .word 56231 - .word 16375 - .word 0 - .word 42754 - .word 64912 - .word 63809 - .word 36632 - .word 16379 - .word 0 - .word 28983 - .word 59630 - .word 18663 - .word 33292 - .word 16381 - .word 0 - .word 56135 - .word 38086 - .word 60740 - .word 37575 - .word 16382 - .word 0 - .word 11769 - .word 21615 - .word 56585 - .word 54481 - .word 16382 - .word 0 - .word 64055 - .word 1299 - .word 36942 - .word 50744 - .word 16382 - .word 0 - .word 6073 - .word 42872 - .word 14757 - .word 53598 - .word 16381 - .word 0 - .word 7021 - .word 43375 - .word 58781 - .word 46458 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 64268 - .word 65535 - .word 16382 - .word 0 - .word 36579 - .word 26545 - .word 24435 - .word 50138 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 14458 - .word 38069 - .word 16364 - .word 0 - .word 15998 - .word 59065 - .word 36918 - .word 41001 - .word 16328 - .word 0 - .word 0 - .word 0 - .word 15150 - .word 34500 - .word 49134 - .word 0 - .word 33246 - .word 7128 - .word 23211 - .word 39186 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 36820 - .word 40101 - .word 16367 - .word 0 - .word 45920 - .word 25716 - .word 39121 - .word 51060 - .word 49103 - .word 0 - .word 52724 - .word 56956 - .word 1384 - .word 33467 - .word 49136 - .word 0 - .word 16783 - .word 11603 - .word 62021 - .word 42511 - .word 16368 - .word 0 - .word 34064 - .word 49622 - .word 4121 - .word 42444 - .word 49136 - .word 0 - .word 14084 - .word 4161 - .word 1985 - .word 33838 - .word 16368 - .word 0 - .word 65189 - .word 58247 - .word 7682 - .word 43141 - .word 49135 - .word 0 - .word 15983 - .word 3226 - .word 43602 - .word 43186 - .word 16366 - .word 0 - .word 7235 - .word 9522 - .word 4836 - .word 63885 - .word 49132 - .word 0 - .word 33104 - .word 49991 - .word 48728 - .word 55353 - .word 16362 - .word 0 - .word 10837 - .word 43216 - .word 47090 - .word 42202 - .word 16359 - .word 0 - .word 11340 - .word 13469 - .word 16673 - .word 42993 - .word 49128 - .word 0 - .word 19848 - .word 42271 - .word 35005 - .word 38963 - .word 16359 - .word 0 - .word 38280 - .word 23060 - .word 26803 - .word 65491 - .word 49124 - .word 0 - .word 3155 - .word 63825 - .word 24453 - .word 53521 - .word 49121 - .word 0 - .word 8736 - .word 25576 - .word 59728 - .word 40305 - .word 16354 - .word 0 - .word 21836 - .word 54867 - .word 10689 - .word 53743 - .word 49120 - .word 0 - .word 35590 - .word 40641 - .word 40511 - .word 35834 - .word 16349 - .word 0 - .word 42959 - .word 52506 - .word 48660 - .word 55474 - .word 16348 - .word 0 - .word 62734 - .word 58818 - .word 9020 - .word 51302 - .word 49115 - .word 0 - .word 59117 - .word 1762 - .word 19420 - .word 58690 - .word 16344 - .word 0 - .word 54865 - .word 3647 - .word 6267 - .word 65292 - .word 16342 - .word 0 - .word 35287 - .word 43939 - .word 50577 - .word 38705 - .word 49110 - .word 0 - .word 78 - .word 46283 - .word 25201 - .word 34088 - .word 16338 - .word 0 - .type _ldbA,@object - .size _ldbA,2628 - .space 12, 0x00 # pad - .align 16 -erfRRTable: - .long 0x00000000,0x40200000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x40100000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x40000000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3fe00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3fd00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xc00d0000 - .type erfRRTable,@object - .size erfRRTable,112 - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_TWO5600: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 21983 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 10783 - .word 0 - .type _TWO5600,@object - .size _TWO5600,24 - .align 2 -_DenoBND: - .word 43678 - .word 54205 - .word 57926 - .word 29039 - .word 0 - .word 0 - .type _DenoBND,@object - .size _DenoBND,12 - .align 2 -_Epsilon: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16313 - .word 0 - .type _Epsilon,@object - .size _Epsilon,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10_wmt.S deleted file mode 100644 index 3357dec2b8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10_wmt.S +++ /dev/null @@ -1,580 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp10_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin exp10 - .text - .align 16,0x90 - .globl exp10 -exp10: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - unpcklpd %xmm0, %xmm0 - movapd 64(%ebx), %xmm1 - movapd 48(%ebx), %xmm6 - movapd 80(%ebx), %xmm2 - movapd 96(%ebx), %xmm3 - pextrw $3, %xmm0, %eax - andl $32767, %eax - movl $16500, %edx - subl %eax, %edx - subl $15472, %eax - orl %eax, %edx - cmpl $-2147483648, %edx - jae .L_2TAG_PACKET_0.0.3 - mulpd %xmm0, %xmm1 - addpd %xmm6, %xmm1 - movapd %xmm1, %xmm7 - subpd %xmm6, %xmm1 - mulpd %xmm1, %xmm2 - movapd 112(%ebx), %xmm4 - mulpd %xmm1, %xmm3 - movapd 1168(%ebx), %xmm1 - movapd 128(%ebx), %xmm5 - subpd %xmm2, %xmm0 - movd %xmm7, %eax - movl %eax, %ecx - andl $63, %ecx - shll $4, %ecx - sarl $6, %eax - movl %eax, %edx - subpd %xmm3, %xmm0 - movapd 144(%ebx,%ecx), %xmm2 - mulpd %xmm0, %xmm4 - mulpd %xmm0, %xmm1 - mulpd %xmm0, %xmm0 - addpd %xmm4, %xmm5 - mulsd %xmm0, %xmm0 - addsd %xmm2, %xmm1 - unpckhpd %xmm2, %xmm2 - movdqa 16(%ebx), %xmm6 - pand %xmm6, %xmm7 - movdqa 32(%ebx), %xmm6 - paddq %xmm6, %xmm7 - psllq $46, %xmm7 - mulpd %xmm5, %xmm0 - addsd %xmm0, %xmm1 - orpd %xmm7, %xmm2 - unpckhpd %xmm0, %xmm0 - addsd %xmm1, %xmm0 - addl $894, %edx - cmpl $1916, %edx - ja .L_2TAG_PACKET_1.0.3 - mulsd %xmm2, %xmm0 - addsd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - fstcw 24(%esp) - movzwl 24(%esp), %edx - orl $768, %edx - movw %dx, 28(%esp) - fldcw 28(%esp) - movl %eax, %edx - sarl $1, %eax - subl %eax, %edx - movdqa (%ebx), %xmm6 - pandn %xmm2, %xmm6 - addl $1023, %eax - movd %eax, %xmm3 - psllq $52, %xmm3 - orpd %xmm3, %xmm6 - addl $1023, %edx - movd %edx, %xmm4 - psllq $52, %xmm4 - movsd %xmm0, 8(%esp) - fldl 8(%esp) - movsd %xmm6, 16(%esp) - fldl 16(%esp) - fmul %st, %st(1) - faddp %st, %st(1) - movsd %xmm4, 8(%esp) - fldl 8(%esp) - fmulp %st, %st(1) - fstpl 8(%esp) - movsd 8(%esp), %xmm0 - fldcw 24(%esp) - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl $32752, %ecx - jae .L_2TAG_PACKET_3.0.3 - movl $265, %edx - cmpl $0, %ecx - je .L_2TAG_PACKET_4.0.3 - jmp .L_2TAG_PACKET_2.0.3 - cmpl $-2147483648, %ecx - jb .L_2TAG_PACKET_3.0.3 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - movl $166, %edx -.L_2TAG_PACKET_4.0.3: - movsd %xmm0, (%esp) - movsd 128(%esp), %xmm0 - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_6.0.3: - cmpl $2146435072, %eax - jae .L_2TAG_PACKET_7.0.3 - movl 132(%esp), %eax - cmpl $-2147483648, %eax - jae .L_2TAG_PACKET_8.0.3 - movsd 1208(%ebx), %xmm0 - mulsd %xmm0, %xmm0 - movl $166, %edx - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_8.0.3: - movsd 1216(%ebx), %xmm0 - mulsd %xmm0, %xmm0 - movl $265, %edx - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_7.0.3: - movl 128(%esp), %edx - cmpl $2146435072, %eax - ja .L_2TAG_PACKET_9.0.3 - cmpl $0, %edx - jne .L_2TAG_PACKET_9.0.3 - movl 132(%esp), %eax - cmpl $2146435072, %eax - jne .L_2TAG_PACKET_10.0.3 - movsd 1192(%ebx), %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_10.0.3: - movsd 1200(%ebx), %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_9.0.3: - movsd 128(%esp), %xmm0 - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - movl 132(%esp), %eax - andl $2147483647, %eax - cmpl $1081344000, %eax - jae .L_2TAG_PACKET_6.0.3 - movsd 128(%esp), %xmm0 - addsd 1184(%ebx), %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_2.0.3: - movsd %xmm0, 48(%esp) - fldl 48(%esp) -.L_2TAG_PACKET_5.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type exp10,@function - .size exp10,.-exp10 - .data -# -- End exp10 - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 4293918720 - .long 0 - .long 4293918720 - .long 4294967232 - .long 0 - .long 4294967232 - .long 0 - .long 65472 - .long 0 - .long 65472 - .long 0 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 158966641 - .long 1080726351 - .long 158966641 - .long 1080726351 - .long 1352531968 - .long 1064518675 - .long 1352531968 - .long 1064518675 - .long 824119987 - .long 1027055599 - .long 824119987 - .long 1027055599 - .long 3549356600 - .long 1071727285 - .long 2447043358 - .long 1073760005 - .long 2974317904 - .long 1072872823 - .long 3342652200 - .long 1074083108 - .long 0 - .long 0 - .long 0 - .long 0 - .long 235107661 - .long 1018002367 - .long 1048019040 - .long 11418 - .long 896005651 - .long 1015861842 - .long 3541402996 - .long 22960 - .long 1642514529 - .long 1012987726 - .long 410360776 - .long 34629 - .long 1568897900 - .long 1016568486 - .long 1828292879 - .long 46424 - .long 1882168529 - .long 1010744893 - .long 852742562 - .long 58348 - .long 509852888 - .long 1017336174 - .long 3490863952 - .long 70401 - .long 653277307 - .long 1017431380 - .long 2930322911 - .long 82586 - .long 1649557430 - .long 1017729363 - .long 1014845818 - .long 94904 - .long 1058231231 - .long 1015777676 - .long 3949972341 - .long 107355 - .long 1044000607 - .long 1016786167 - .long 828946858 - .long 119943 - .long 1151779725 - .long 1015705409 - .long 2288159958 - .long 132667 - .long 3819481236 - .long 1016499965 - .long 1853186616 - .long 145530 - .long 2552227826 - .long 1015039787 - .long 1709341917 - .long 158533 - .long 1829350193 - .long 1015216097 - .long 4112506593 - .long 171677 - .long 1913391795 - .long 1015756674 - .long 2799960843 - .long 184965 - .long 1303423926 - .long 1015238005 - .long 171030293 - .long 198398 - .long 1574172746 - .long 1016061241 - .long 2992903935 - .long 211976 - .long 3424156969 - .long 1017196428 - .long 926591434 - .long 225703 - .long 1938513547 - .long 1017631273 - .long 887463926 - .long 239579 - .long 2804567149 - .long 1015390024 - .long 1276261410 - .long 253606 - .long 631083525 - .long 1017690182 - .long 569847337 - .long 267786 - .long 1623370770 - .long 1011049453 - .long 1617004845 - .long 282120 - .long 3667985273 - .long 1013894369 - .long 3049340112 - .long 296610 - .long 3145379760 - .long 1014403278 - .long 3577096743 - .long 311258 - .long 2603100681 - .long 1017152460 - .long 1990012070 - .long 326066 - .long 3249202951 - .long 1017448880 - .long 1453150081 - .long 341035 - .long 419288974 - .long 1016280325 - .long 917841882 - .long 356167 - .long 3793507337 - .long 1016095713 - .long 3712504873 - .long 371463 - .long 728023093 - .long 1016345318 - .long 363667784 - .long 386927 - .long 2582678538 - .long 1017123460 - .long 2956612996 - .long 402558 - .long 7592966 - .long 1016721543 - .long 2186617380 - .long 418360 - .long 228611441 - .long 1016696141 - .long 1719614412 - .long 434334 - .long 2261665670 - .long 1017457593 - .long 1013258798 - .long 450482 - .long 544148907 - .long 1017323666 - .long 3907805043 - .long 466805 - .long 2383914918 - .long 1017143586 - .long 1447192520 - .long 483307 - .long 1176412038 - .long 1017267372 - .long 1944781190 - .long 499988 - .long 2882956373 - .long 1013312481 - .long 919555682 - .long 516851 - .long 3154077648 - .long 1016528543 - .long 2571947538 - .long 533897 - .long 348651999 - .long 1016405780 - .long 2604962540 - .long 551129 - .long 3253791412 - .long 1015920431 - .long 1110089947 - .long 568549 - .long 1509121860 - .long 1014756995 - .long 2568320822 - .long 586158 - .long 2617649212 - .long 1017340090 - .long 2966275556 - .long 603959 - .long 553214634 - .long 1016457425 - .long 2682146383 - .long 621954 - .long 730975783 - .long 1014083580 - .long 2191782032 - .long 640145 - .long 1486499517 - .long 1016818996 - .long 2069751140 - .long 658534 - .long 2595788928 - .long 1016407932 - .long 2990417244 - .long 677123 - .long 1853053619 - .long 1015310724 - .long 1434058175 - .long 695915 - .long 2462790535 - .long 1015814775 - .long 2572866477 - .long 714911 - .long 3693944214 - .long 1017259110 - .long 3092190714 - .long 734114 - .long 2979333550 - .long 1017188654 - .long 4076559942 - .long 753526 - .long 174054861 - .long 1014300631 - .long 2420883922 - .long 773150 - .long 816778419 - .long 1014197934 - .long 3716502172 - .long 792987 - .long 3507050924 - .long 1015341199 - .long 777507147 - .long 813041 - .long 1821514088 - .long 1013410604 - .long 3706687593 - .long 833312 - .long 920623539 - .long 1016295433 - .long 1242007931 - .long 853805 - .long 2789017511 - .long 1014276997 - .long 3707479175 - .long 874520 - .long 3586233004 - .long 1015962192 - .long 64696965 - .long 895462 - .long 474650514 - .long 1016642419 - .long 863738718 - .long 916631 - .long 1614448851 - .long 1014281732 - .long 3884662774 - .long 938030 - .long 2450082086 - .long 1016164135 - .long 2728693977 - .long 959663 - .long 1101668360 - .long 1015989180 - .long 3999357479 - .long 981531 - .long 835814894 - .long 1015702697 - .long 1533953344 - .long 1003638 - .long 1301400989 - .long 1014466875 - .long 2174652632 - .long 1025985 - .long 3149223190 - .long 1073900465 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 4294967295 - .long 2146435071 - .long 0 - .long 1048576 - .type static_const_table,@object - .size static_const_table,1224 - .data - .section .note.GNU-stack, "" -# End - - .globl pow10 - .equ pow10, exp10 - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10f_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10f_wmt.S deleted file mode 100644 index c09cfab5d8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10f_wmt.S +++ /dev/null @@ -1,763 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp10f_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin exp10f - .text - .align 16,0x90 - .globl exp10f -exp10f: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %ecx - movsd 2064(%ebx), %xmm3 - xorpd %xmm7, %xmm7 - movl $17208, %eax - pinsrw $3, %eax, %xmm7 - cvtps2pd %xmm0, %xmm1 - andl $2147483647, %ecx - subl $830472192, %ecx - cmpl $278378496, %ecx - jae .L_2TAG_PACKET_0.0.3 - movsd 2048(%ebx), %xmm6 - mulsd %xmm1, %xmm3 - movapd %xmm7, %xmm2 - xorpd %xmm1, %xmm1 - addsd %xmm3, %xmm7 - movsd 2056(%ebx), %xmm5 - movd %xmm7, %eax - subsd %xmm7, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - xorpd %xmm4, %xmm4 - movl %eax, %ecx - andl $255, %eax - movsd (%ebx,%eax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - addl $830472192, %ecx - cmpl $830472192, %ecx - jb .L_2TAG_PACKET_2.0.3 - cmpl $1115684864, %ecx - jae .L_2TAG_PACKET_3.0.3 - movsd 2048(%ebx), %xmm6 - mulsd %xmm1, %xmm3 - movapd %xmm7, %xmm2 - xorpd %xmm1, %xmm1 - addsd %xmm3, %xmm7 - movsd 2056(%ebx), %xmm5 - movd %xmm7, %eax - subsd %xmm7, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - xorpd %xmm4, %xmm4 - movl %eax, %ecx - andl $255, %eax - movsd (%ebx,%eax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - movd %xmm0, %eax - cmpl $8388608, %eax - jb .L_2TAG_PACKET_4.0.3 - cmpl $2139095040, %eax - je .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - movd %xmm0, %edx - cmpl $2139095040, %ecx - jae .L_2TAG_PACKET_6.0.3 - testl $-2147483648, %edx - je .L_2TAG_PACKET_5.0.3 - movl $8388608, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 -.L_2TAG_PACKET_4.0.3: - movl $266, %edx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_5.0.3: - movl $2130706432, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 - movl $167, %edx -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_2.0.3: - movl $1065353216, %eax - movd %eax, %xmm1 - addss %xmm1, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_6.0.3: - cmpl $-8388608, %edx - je .L_2TAG_PACKET_9.0.3 - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_9.0.3: - fldz - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_1.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type exp10f,@function - .size exp10f,.-exp10f - .data -# -- End exp10f - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 4200250559 - .long 1072696090 - .long 2851812149 - .long 1072698941 - .long 339411585 - .long 1072701800 - .long 1048019041 - .long 1072704666 - .long 772914124 - .long 1072707540 - .long 3899555717 - .long 1072710421 - .long 1928746161 - .long 1072713311 - .long 3541402996 - .long 1072716208 - .long 238821257 - .long 1072719114 - .long 702412510 - .long 1072722027 - .long 728934454 - .long 1072724948 - .long 410360776 - .long 1072727877 - .long 4133881824 - .long 1072730813 - .long 3402036099 - .long 1072733758 - .long 2602514713 - .long 1072736711 - .long 1828292879 - .long 1072739672 - .long 1172597893 - .long 1072742641 - .long 728909815 - .long 1072745618 - .long 590962156 - .long 1072748603 - .long 852742562 - .long 1072751596 - .long 1608493509 - .long 1072754597 - .long 2952712987 - .long 1072757606 - .long 685187902 - .long 1072760624 - .long 3490863953 - .long 1072763649 - .long 2875075254 - .long 1072766683 - .long 3228316108 - .long 1072769725 - .long 351405227 - .long 1072772776 - .long 2930322912 - .long 1072775834 - .long 2471440686 - .long 1072778901 - .long 3366293073 - .long 1072781976 - .long 1416741826 - .long 1072785060 - .long 1014845819 - .long 1072788152 - .long 2257959872 - .long 1072791252 - .long 948735466 - .long 1072794361 - .long 1480023343 - .long 1072797478 - .long 3949972341 - .long 1072800603 - .long 4162030108 - .long 1072803737 - .long 2214878420 - .long 1072806880 - .long 2502433899 - .long 1072810031 - .long 828946858 - .long 1072813191 - .long 1588871207 - .long 1072816359 - .long 586995997 - .long 1072819536 - .long 2218315341 - .long 1072822721 - .long 2288159958 - .long 1072825915 - .long 897099801 - .long 1072829118 - .long 2440944790 - .long 1072832329 - .long 2725843665 - .long 1072835549 - .long 1853186616 - .long 1072838778 - .long 4219606026 - .long 1072842015 - .long 1337108031 - .long 1072845262 - .long 1897844341 - .long 1072848517 - .long 1709341917 - .long 1072851781 - .long 874372905 - .long 1072855054 - .long 3790955393 - .long 1072858335 - .long 1972484976 - .long 1072861626 - .long 4112506593 - .long 1072864925 - .long 1724976915 - .long 1072868234 - .long 3504003472 - .long 1072871551 - .long 964107055 - .long 1072874878 - .long 2799960843 - .long 1072878213 - .long 526652809 - .long 1072881558 - .long 2839424854 - .long 1072884911 - .long 1253935211 - .long 1072888274 - .long 171030293 - .long 1072891646 - .long 3991843581 - .long 1072895026 - .long 4232894513 - .long 1072898416 - .long 1000925746 - .long 1072901816 - .long 2992903935 - .long 1072905224 - .long 1726216749 - .long 1072908642 - .long 1603444721 - .long 1072912069 - .long 2732492859 - .long 1072915505 - .long 926591435 - .long 1072918951 - .long 589198666 - .long 1072922406 - .long 1829099622 - .long 1072925870 - .long 460407023 - .long 1072929344 - .long 887463927 - .long 1072932827 - .long 3219942644 - .long 1072936319 - .long 3272845541 - .long 1072939821 - .long 1156440435 - .long 1072943333 - .long 1276261410 - .long 1072946854 - .long 3743175029 - .long 1072950384 - .long 78413852 - .long 1072953925 - .long 3278348324 - .long 1072957474 - .long 569847338 - .long 1072961034 - .long 654919306 - .long 1072964603 - .long 3645941911 - .long 1072968181 - .long 1065662932 - .long 1072971770 - .long 1617004845 - .long 1072975368 - .long 1118294578 - .long 1072978976 - .long 3978100823 - .long 1072982593 - .long 1720398391 - .long 1072986221 - .long 3049340112 - .long 1072989858 - .long 3784486610 - .long 1072993505 - .long 4040676318 - .long 1072997162 - .long 3933059031 - .long 1073000829 - .long 3577096743 - .long 1073004506 - .long 3088564500 - .long 1073008193 - .long 2583551245 - .long 1073011890 - .long 2178460671 - .long 1073015597 - .long 1990012071 - .long 1073019314 - .long 2135241198 - .long 1073023041 - .long 2731501122 - .long 1073026778 - .long 3896463087 - .long 1073030525 - .long 1453150082 - .long 1073034283 - .long 4109806887 - .long 1073038050 - .long 3395129871 - .long 1073041828 - .long 3723038930 - .long 1073045616 - .long 917841882 - .long 1073049415 - .long 3689071823 - .long 1073053223 - .long 3566716925 - .long 1073057042 - .long 671025100 - .long 1073060872 - .long 3712504873 - .long 1073064711 - .long 4222122499 - .long 1073068561 - .long 2321106615 - .long 1073072422 - .long 2425981843 - .long 1073076293 - .long 363667784 - .long 1073080175 - .long 551349105 - .long 1073084067 - .long 3111574537 - .long 1073087969 - .long 3872257780 - .long 1073091882 - .long 2956612997 - .long 1073095806 - .long 488188413 - .long 1073099741 - .long 885834528 - .long 1073103686 - .long 4273770423 - .long 1073107641 - .long 2186617381 - .long 1073111608 - .long 3339203574 - .long 1073115585 - .long 3561793907 - .long 1073119573 - .long 2979960120 - .long 1073123572 - .long 1719614413 - .long 1073127582 - .long 4201977662 - .long 1073131602 - .long 1963711167 - .long 1073135634 - .long 3721688645 - .long 1073139676 - .long 1013258799 - .long 1073143730 - .long 2555984613 - .long 1073147794 - .long 4182873220 - .long 1073151869 - .long 1727278727 - .long 1073155956 - .long 3907805044 - .long 1073160053 - .long 2263535754 - .long 1073164162 - .long 1218806132 - .long 1073168282 - .long 903334909 - .long 1073172413 - .long 1447192521 - .long 1073176555 - .long 2980802057 - .long 1073180708 - .long 1339972927 - .long 1073184873 - .long 950803702 - .long 1073189049 - .long 1944781191 - .long 1073193236 - .long 158781403 - .long 1073197435 - .long 19972402 - .long 1073201645 - .long 1660913392 - .long 1073205866 - .long 919555682 - .long 1073210099 - .long 2224145553 - .long 1073214343 - .long 1413356050 - .long 1073218599 - .long 2916157145 - .long 1073222866 - .long 2571947539 - .long 1073227145 - .long 515457527 - .long 1073231436 - .long 1176749997 - .long 1073235738 - .long 396319521 - .long 1073240052 - .long 2604962541 - .long 1073244377 - .long 3643909174 - .long 1073248714 - .long 3649726105 - .long 1073253063 - .long 2759350287 - .long 1073257424 - .long 1110089947 - .long 1073261797 - .long 3134592888 - .long 1073266181 - .long 380978316 - .long 1073270578 - .long 1577608921 - .long 1073274986 - .long 2568320822 - .long 1073279406 - .long 3492293770 - .long 1073283838 - .long 194117574 - .long 1073288283 - .long 1403662306 - .long 1073292739 - .long 2966275557 - .long 1073297207 - .long 727685349 - .long 1073301688 - .long 3418903055 - .long 1073306180 - .long 2591453363 - .long 1073310685 - .long 2682146384 - .long 1073315202 - .long 3833209506 - .long 1073319731 - .long 1892288442 - .long 1073324273 - .long 1297350157 - .long 1073328827 - .long 2191782032 - .long 1073333393 - .long 424392917 - .long 1073337972 - .long 434316067 - .long 1073342563 - .long 2366108318 - .long 1073347166 - .long 2069751141 - .long 1073351782 - .long 3985553595 - .long 1073356410 - .long 3964284211 - .long 1073361051 - .long 2152073944 - .long 1073365705 - .long 2990417245 - .long 1073370371 - .long 2331271250 - .long 1073375050 - .long 321958744 - .long 1073379742 - .long 1405169241 - .long 1073384446 - .long 1434058175 - .long 1073389163 - .long 557149882 - .long 1073393893 - .long 3218338682 - .long 1073398635 - .long 977020788 - .long 1073403391 - .long 2572866477 - .long 1073408159 - .long 3861050111 - .long 1073412940 - .long 697153126 - .long 1073417735 - .long 1822067026 - .long 1073422542 - .long 3092190715 - .long 1073427362 - .long 364333489 - .long 1073432196 - .long 2380618042 - .long 1073437042 - .long 703710506 - .long 1073441902 - .long 4076559943 - .long 1073446774 - .long 4062661092 - .long 1073451660 - .long 815859274 - .long 1073456560 - .long 3080351519 - .long 1073461472 - .long 2420883922 - .long 1073466398 - .long 3287523847 - .long 1073471337 - .long 1540824585 - .long 1073476290 - .long 1631695677 - .long 1073481256 - .long 3716502172 - .long 1073486235 - .long 3657065772 - .long 1073491228 - .long 1610600570 - .long 1073496235 - .long 2029714210 - .long 1073501255 - .long 777507147 - .long 1073506289 - .long 2307442995 - .long 1073511336 - .long 2483480501 - .long 1073516397 - .long 1464976603 - .long 1073521472 - .long 3706687593 - .long 1073526560 - .long 778901109 - .long 1073531663 - .long 1432208378 - .long 1073536779 - .long 1532734324 - .long 1073541909 - .long 1242007932 - .long 1073547053 - .long 721996136 - .long 1073552211 - .long 135105010 - .long 1073557383 - .long 3939148246 - .long 1073562568 - .long 3707479175 - .long 1073567768 - .long 3898795731 - .long 1073572982 - .long 382305176 - .long 1073578211 - .long 1912561781 - .long 1073583453 - .long 64696965 - .long 1073588710 - .long 3594158869 - .long 1073593980 - .long 4076975200 - .long 1073599265 - .long 1679558232 - .long 1073604565 - .long 863738719 - .long 1073609879 - .long 1796832535 - .long 1073615207 - .long 351641897 - .long 1073620550 - .long 991358482 - .long 1073625907 - .long 3884662774 - .long 1073631278 - .long 610758006 - .long 1073636665 - .long 4224142467 - .long 1073642065 - .long 2009970496 - .long 1073647481 - .long 2728693978 - .long 1073652911 - .long 2256325230 - .long 1073658356 - .long 764307441 - .long 1073663816 - .long 2719515920 - .long 1073669290 - .long 3999357479 - .long 1073674779 - .long 481706282 - .long 1073680284 - .long 929806999 - .long 1073685803 - .long 1222472308 - .long 1073691337 - .long 1533953344 - .long 1073696886 - .long 2038973688 - .long 1073702450 - .long 2912730644 - .long 1073708029 - .long 35929225 - .long 1073713624 - .long 2174652632 - .long 1073719233 - .long 915592468 - .long 1073724858 - .long 730821105 - .long 1073730498 - .long 1797923801 - .long 1073736153 - .long 4286760334 - .long 1053736893 - .long 4277826245 - .long 1063661122 - .long 158966641 - .long 1082823503 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,2088 - .data - .section .note.GNU-stack, "" -# End - - .globl pow10f - .equ pow10f, exp10f - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10l.S deleted file mode 100644 index d351269cc8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp10l.S +++ /dev/null @@ -1,1162 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp10l.c" - .text -..TXTST0: -# -- Begin exp10l - .text - .align 16,0x90 - .globl exp10l -exp10l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp -..B1.2: - fnstcw 74(%esp) -..B1.3: - movzbl 17(%ebp), %edx - movl %edx, %ecx - movzwl 16(%ebp), %ebx - movl %ebx, %esi - shrl $7, %ecx - andl $32767, %esi - shll $15, %ecx - orl %esi, %ecx - shll $16, %ecx - movzwl 14(%ebp), %eax - orl %eax, %ecx - addl $-1073709056, %ecx - cmpl $284672, %ecx - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - ja ..B1.6 -..B1.4: - fldt 8(%ebp) - fld %st(0) - fldl _TWO_23H@GOTOFF(%ecx) - fadd %st, %st(1) - fxch %st(1) - fstps 68(%esp) - flds 68(%esp) - fsubp %st, %st(1) - fucompp - fnstsw %ax - sahf - jp ..B1.5 - je ..B1.85 -..B1.5: - movl %ebx, %esi - andl $32767, %esi -..B1.6: - cmpl $16388, %esi - jge ..B1.45 -..B1.7: - movzwl 74(%esp), %eax - cmpl $16375, %esi - jge ..B1.38 -..B1.8: - cmpl $16368, %esi - jge ..B1.31 -..B1.9: - cmpl $16357, %esi - jge ..B1.24 -..B1.10: - cmpl $16316, %esi - jge ..B1.17 -..B1.11: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.74 -..B1.12: - orl $-64768, %eax - movw %ax, 72(%esp) -..B1.13: - fldcw 72(%esp) -..B1.14: - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - fldt 8(%ebp) - faddp %st, %st(1) - fstpt (%esp) -..B1.15: - fldcw 74(%esp) -..B1.16: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.75 -..B1.18: - orl $-64768, %eax - movw %ax, 72(%esp) -..B1.19: - fldcw 72(%esp) -..B1.20: - movl $1, %eax -..B1.21: - fldt 8(%ebp) - testl %eax, %eax - fldt 12+_Q2@GOTOFF(%ecx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.23 -..B1.22: - fldcw 74(%esp) -..B1.23: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.24: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.76 -..B1.25: - orl $-64768, %eax - movw %ax, 72(%esp) -..B1.26: - fldcw 72(%esp) -..B1.27: - movl $1, %eax -..B1.28: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%ecx) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%ecx) - fmul %st(2), %st - fldt 12+_Q1@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.30 -..B1.29: - fldcw 74(%esp) -..B1.30: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.77 -..B1.32: - orl $-64768, %eax - movw %ax, 72(%esp) -..B1.33: - fldcw 72(%esp) -..B1.34: - movl $1, %eax -..B1.35: - fldl _TWO_48H@GOTOFF(%ecx) - testl %eax, %eax - fldt 8(%ebp) - fld %st(0) - fmul %st(1), %st - fld %st(1) - fadd %st(3), %st - fsub %st, %st(3) - fld %st(2) - fsub %st(4), %st - fldt 84+_Q0@GOTOFF(%ecx) - fmul %st(3), %st - fldt 72+_Q0@GOTOFF(%ecx) - fmul %st(4), %st - fldt 60+_Q0@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 48+_Q0@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 36+_Q0@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 24+_Q0@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 12+_Q0@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fldt _Q0@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 96+_Q0@GOTOFF(%ecx) - fmul %st, %st(4) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - je ..B1.91 -..B1.36: - fstpt 24(%esp) -..B1.88: - fldcw 74(%esp) - jmp ..B1.37 -..B1.91: - fstp %st(0) -..B1.37: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.78 -..B1.39: - orl $-64768, %eax - movw %ax, 72(%esp) -..B1.40: - fldcw 72(%esp) -..B1.41: - movl $1, %ebx -..B1.42: - fldl _TWO_63H@GOTOFF(%ecx) - fldt 8(%ebp) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st(1), %st - fadd %st(2), %st - fstpt 24(%esp) - fldt 24(%esp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmul %st(2), %st - movl 24(%esp), %eax - fsubrp %st, %st(1) - fld %st(0) - fldt .L_2il0floatpacket.2@GOTOFF(%ecx) - fmulp %st, %st(3) - movsbl %al, %edx - fsub %st(2), %st - fldl _TWO_48H@GOTOFF(%ecx) - subl %edx, %eax - shll $4, %edx - fadd %st, %st(1) - shrl $8, %eax - fsubr %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - shll $23, %eax - fxch %st(4) - fsubrp %st, %st(3) - addl $1065353216, %eax - fadd %st(2), %st - fld %st(0) - testl %ebx, %ebx - fmul %st(1), %st - fldt 60+_P@GOTOFF(%ecx) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%ecx) - fmul %st(2), %st - fldt 36+_P@GOTOFF(%ecx) - movl %eax, 36(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fldt _P@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 72+_P@GOTOFF(%ecx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(3) - fldl 2056+__libm_expl_table_256@GOTOFF(%ecx,%edx) - fldl 2048+__libm_expl_table_256@GOTOFF(%ecx,%edx) - fld %st(0) - fmul %st(4), %st - fxch %st(4) - fadd %st(5), %st - fmul %st(2), %st - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fmul %st, %st(3) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmuls 36(%esp) - fstpt (%esp) - je ..B1.92 -..B1.43: - fstpt 24(%esp) -..B1.89: - fldcw 74(%esp) - jmp ..B1.44 -..B1.92: - fstp %st(0) -..B1.44: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ebx - movzwl 8+_ranges@GOTOFF(%ebx,%ecx), %eax - andl $32767, %eax - cmpl %eax, %esi - jl ..B1.50 -..B1.46: - jne ..B1.63 -..B1.47: - movl 12(%ebp), %eax - cmpl 4+_ranges@GOTOFF(%ebx,%ecx), %eax - jb ..B1.50 -..B1.48: - jne ..B1.63 -..B1.49: - movl 8(%ebp), %eax - cmpl _ranges@GOTOFF(%ebx,%ecx), %eax - jae ..B1.63 -..B1.50: - movzwl 74(%esp), %esi - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.79 -..B1.51: - orl $-64768, %esi - movw %si, 72(%esp) -..B1.52: - fldcw 72(%esp) -..B1.53: - movl $1, %esi -..B1.54: - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - fstpt (%esp) - fldl _TWO_63H@GOTOFF(%ecx) - fldt 8(%ebp) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st(1), %st - movl %ebx, 36(%esp) - fadd %st(2), %st - fstpt 24(%esp) - fldt 24(%esp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmul %st(2), %st - movl 24(%esp), %eax - movl %eax, %ebx - movsbl %al, %edi - addl $4196735, %eax - subl %edi, %ebx - fsubr %st(1), %st - fld %st(0) - fldt .L_2il0floatpacket.2@GOTOFF(%ecx) - fmulp %st, %st(4) - shll $4, %edi - fsub %st(3), %st - fldl _TWO_48H@GOTOFF(%ecx) - shrl $8, %ebx - fadd %st, %st(1) - fxch %st(1) - fstpt 40(%esp) - fldt 40(%esp) - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - addl SC2_BIAS@GOTOFF(%ecx,%edx,4), %ebx - fxch %st(4) - fsubrp %st, %st(2) - movl %esi, 52(%esp) - andl $32767, %ebx - movzwl 8+.L_2il0floatpacket.3@GOTOFF(%ecx), %esi - fadd %st(1), %st - fld %st(0) - andl $-32768, %esi - fmul %st(1), %st - orl %ebx, %esi - fldt 60+_P@GOTOFF(%ecx) - cmpl $3070, %eax - fmul %st(1), %st - fldt 48+_P@GOTOFF(%ecx) - fmul %st(2), %st - fldt 36+_P@GOTOFF(%ecx) - movw %si, 8(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ecx) - movl 52(%esp), %esi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%ecx) - movl 36(%esp), %ebx - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fldt _P@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 72+_P@GOTOFF(%ecx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(3) - fldl 2048+__libm_expl_table_256@GOTOFF(%ecx,%edi) - fld %st(0) - fmul %st(2), %st - fxch %st(2) - fadd %st(4), %st - fxch %st(1) - fmul %st, %st(4) - faddp %st, %st(4) - fmull 2056+__libm_expl_table_256@GOTOFF(%ecx,%edi) - faddp %st, %st(1) - faddl 2056+__libm_expl_table_256@GOTOFF(%ecx,%edi) - ja ..B1.57 -..B1.55: - fldt _exp10but@GOTOFF(%ecx) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B1.57 -..B1.56: - fstp %st(1) - fldl _TWO_12H@GOTOFF(%ecx) - fld %st(2) - fadd %st(2), %st - fmul %st, %st(1) - fadd %st(1), %st - fstpt 40(%esp) - fldt 40(%esp) - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt _SC2@GOTOFF(%ebx,%ecx) - fldt (%esp) - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 56(%esp) - jmp ..B1.58 -..B1.57: - fstp %st(1) - fldt (%esp) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt _SC2@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt 56(%esp) -..B1.58: - fldt _minnorm@GOTOFF(%ecx) - fldt 56(%esp) - fcompp - fnstsw %ax - sahf - jae ..B1.60 - jp ..B1.60 -..B1.59: - fldt _small_value_80@GOTOFF(%ecx) - fmul %st(0), %st - fstpt 12(%esp) -..B1.60: - testl %esi, %esi - je ..B1.62 -..B1.61: - fldt 40(%esp) - fstpt 24(%esp) -..B1.90: - fldcw 74(%esp) -..B1.62: - fldt 56(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.63: - movzwl 74(%esp), %ebx - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.84 -..B1.64: - orl $-64768, %ebx - movw %bx, 72(%esp) -..B1.65: - fldcw 72(%esp) -..B1.66: - movzwl 16(%ebp), %esi - movl $1, %eax - andl $32767, %esi -..B1.67: - cmpl $32767, %esi - je ..B1.80 -..B1.68: - testl %edx, %edx - je ..B1.70 -..B1.69: - fldt _small_value_80@GOTOFF(%ecx) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.71 -..B1.70: - fldt _large_value_80@GOTOFF(%ecx) - fmul %st(0), %st - fstpt (%esp) -..B1.71: - testl %eax, %eax - je ..B1.73 -..B1.72: - fldcw 74(%esp) -..B1.73: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.74: - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - fldt 8(%ebp) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.16 -..B1.75: - xorl %eax, %eax - jmp ..B1.21 -..B1.76: - xorl %eax, %eax - jmp ..B1.28 -..B1.77: - xorl %eax, %eax - jmp ..B1.35 -..B1.78: - xorl %ebx, %ebx - jmp ..B1.42 -..B1.79: - xorl %esi, %esi - jmp ..B1.54 -..B1.80: - cmpl $-2147483648, 12(%ebp) - jne ..B1.83 -..B1.81: - cmpl $0, 8(%ebp) - jne ..B1.83 -..B1.82: - fldl _inf_zeros@GOTOFF(%ecx,%edx,8) - fstpt (%esp) - jmp ..B1.71 -..B1.83: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.71 -..B1.84: - xorl %eax, %eax - jmp ..B1.67 -..B1.85: - movl 68(%esp), %edx - andl $4194303, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ebx - fldt -12+_exact_values@GOTOFF(%ecx,%ebx) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type exp10l,@function - .size exp10l,.-exp10l - .data -# -- End exp10l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x88,0x1b,0xcd,0x4b,0x78,0x9a,0xd4,0x08,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x85,0x9a,0x20,0x9a,0xf5,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0xc8,0xd4,0x0e,0xee,0x0c,0x01,0x86,0xd0,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .align 4 -_TWO_23H: - .long 0 - .long 1097334784 - .type _TWO_23H,@object - .size _TWO_23H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -SC2_BIAS: - .long 8191 - .long 24575 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 4 -_inf_zeros: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zeros,@object - .size _inf_zeros,16 - .align 2 -_Q2: - .word 45097 - .word 43688 - .word 36317 - .word 37725 - .word 16384 - .word 0 - .word 18666 - .word 59219 - .word 9785 - .word 43433 - .word 16384 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 44055 - .word 43688 - .word 36317 - .word 37725 - .word 16384 - .word 0 - .word 17466 - .word 59219 - .word 9785 - .word 43433 - .word 16384 - .word 0 - .word 8942 - .word 31610 - .word 11407 - .word 33336 - .word 16384 - .word 0 - .word 11423 - .word 35775 - .word 45136 - .word 38379 - .word 16383 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q0: - .word 11092 - .word 42962 - .word 43694 - .word 58436 - .word 49135 - .word 0 - .word 17467 - .word 59219 - .word 9785 - .word 43433 - .word 16384 - .word 0 - .word 8985 - .word 61797 - .word 11406 - .word 33336 - .word 16384 - .word 0 - .word 8830 - .word 60614 - .word 45135 - .word 38379 - .word 16383 - .word 0 - .word 62265 - .word 59600 - .word 65512 - .word 35348 - .word 16382 - .word 0 - .word 36045 - .word 15298 - .word 47170 - .word 54262 - .word 16380 - .word 0 - .word 33342 - .word 6003 - .word 33899 - .word 35698 - .word 16379 - .word 0 - .word 20958 - .word 58269 - .word 28628 - .word 41099 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37726 - .word 16384 - .word 0 - .type _Q0,@object - .size _Q0,108 - .align 2 -_P: - .word 405 - .word 44055 - .word 43688 - .word 36317 - .word 16368 - .word 0 - .word 17467 - .word 59219 - .word 9785 - .word 43433 - .word 16384 - .word 0 - .word 7929 - .word 61789 - .word 11406 - .word 33336 - .word 16384 - .word 0 - .word 36964 - .word 60605 - .word 45135 - .word 38379 - .word 16383 - .word 0 - .word 55739 - .word 36897 - .word 684 - .word 35349 - .word 16382 - .word 0 - .word 13923 - .word 51509 - .word 48217 - .word 54262 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37725 - .word 16384 - .word 0 - .type _P,@object - .size _P,84 - .align 2 -_ranges: - .word 63385 - .word 64463 - .word 39556 - .word 39456 - .word 16395 - .word 0 - .word 55376 - .word 5815 - .word 21149 - .word 39608 - .word 16395 - .word 0 - .type _ranges,@object - .size _ranges,24 - .align 2 -_exp10but: - .word 6424 - .word 10152 - .word 51584 - .word 39451 - .word 49163 - .word 0 - .type _exp10but,@object - .size _exp10but,12 - .align 2 -_SC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .type _SC2,@object - .size _SC2,24 - .align 2 -_minnorm: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _minnorm,@object - .size _minnorm,12 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_exact_values: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64000 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40000 - .word 16396 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50000 - .word 16399 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62500 - .word 16402 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39062 - .word 16406 - .word 0 - .word 0 - .word 0 - .word 8192 - .word 48828 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 10240 - .word 61035 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 63744 - .word 38146 - .word 16416 - .word 0 - .word 0 - .word 0 - .word 46912 - .word 47683 - .word 16419 - .word 0 - .word 0 - .word 0 - .word 42256 - .word 59604 - .word 16422 - .word 0 - .word 0 - .word 0 - .word 59178 - .word 37252 - .word 16426 - .word 0 - .word 0 - .word 32768 - .word 8436 - .word 46566 - .word 16429 - .word 0 - .word 0 - .word 40960 - .word 43313 - .word 58207 - .word 16432 - .word 0 - .word 0 - .word 1024 - .word 51647 - .word 36379 - .word 16436 - .word 0 - .word 0 - .word 50432 - .word 48174 - .word 45474 - .word 16439 - .word 0 - .word 0 - .word 30272 - .word 27450 - .word 56843 - .word 16442 - .word 0 - .word 0 - .word 35304 - .word 8964 - .word 35527 - .word 16446 - .word 0 - .word 0 - .word 44130 - .word 60357 - .word 44408 - .word 16449 - .word 0 - .word 32768 - .word 6010 - .word 9911 - .word 55511 - .word 16452 - .word 0 - .word 36864 - .word 28332 - .word 30770 - .word 34694 - .word 16456 - .word 0 - .word 46080 - .word 2647 - .word 5695 - .word 43368 - .word 16459 - .word 0 - .word 41216 - .word 52461 - .word 7118 - .word 54210 - .word 16462 - .word 0 - .word 33952 - .word 16404 - .word 20833 - .word 33881 - .word 16466 - .word 0 - .word 42440 - .word 36889 - .word 42425 - .word 42351 - .word 16469 - .word 0 - .word 3898 - .word 62496 - .word 36647 - .word 52939 - .word 16472 - .word 0 - .type _exact_values,@object - .size _exact_values,324 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End - - .globl pow10l - .equ pow10l, exp10l - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2_wmt.S deleted file mode 100644 index 3d17e6a948..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2_wmt.S +++ /dev/null @@ -1,908 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp2_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin exp2 - .text - .align 16,0x90 - .globl exp2 -exp2: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - stmxcsr 16(%esp) - movl 16(%esp), %edx - andl $-24577, %edx - cmpl %edx, 16(%esp) - jne .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - movsd 2112(%ebx), %xmm1 - movsd (%ebx), %xmm2 - paddd %xmm0, %xmm1 - pextrw $3, %xmm0, %ecx - andl $32767, %ecx - movl $16527, %edx - subl %ecx, %edx - subl $15504, %ecx - orl %ecx, %edx - cmpl $-2147483648, %edx - jae .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cvtsd2si %xmm1, %eax - movq %xmm1, %xmm0 - addsd %xmm2, %xmm1 - movapd 2064(%ebx), %xmm6 - subsd %xmm2, %xmm1 - movapd 2080(%ebx), %xmm7 - subsd %xmm1, %xmm0 - movsd 2096(%ebx), %xmm2 - unpcklpd %xmm0, %xmm0 - movapd %xmm0, %xmm1 - movl %eax, %ecx - sarl $7, %ecx - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - andl $2032, %eax - movsd 16(%ebx,%eax), %xmm3 - movsd 24(%ebx,%eax), %xmm4 - addl $1023, %ecx - pinsrw $0, %ecx, %xmm5 - psllq $52, %xmm5 - mulpd %xmm0, %xmm6 - mulpd %xmm0, %xmm0 - orpd %xmm5, %xmm3 - mulsd %xmm1, %xmm2 - addpd %xmm7, %xmm6 - movl $2046, %edx - subl %ecx, %edx - subl $60, %ecx - orl %ecx, %edx - cmpl $-2147483648, %edx - jae .L_2TAG_PACKET_4.0.3 - movapd %xmm3, %xmm7 - mulsd %xmm0, %xmm3 - mulsd %xmm6, %xmm0 - unpckhpd %xmm6, %xmm6 - mulsd %xmm7, %xmm2 - mulsd %xmm5, %xmm4 - addsd %xmm6, %xmm0 - addsd %xmm4, %xmm2 - mulsd %xmm3, %xmm0 - addsd %xmm2, %xmm0 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_5.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_5.0.3: - addsd %xmm7, %xmm0 - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_4.0.3: - xorpd %xmm5, %xmm3 - addl $60, %ecx - movl %ecx, %edx - subl $1023, %ecx - movl %ecx, %eax - sarl $1, %ecx - subl %ecx, %eax - addl $1023, %ecx - addl $1023, %eax - movd %eax, %xmm7 - psllq $52, %xmm7 - movl $1, %eax - subl %edx, %eax - movd %eax, %xmm5 - movsd 2160(%ebx), %xmm1 - psllq %xmm5, %xmm1 - orpd %xmm7, %xmm3 - mulsd %xmm7, %xmm4 - movapd %xmm3, %xmm7 - movd %ecx, %xmm5 - psllq $52, %xmm5 - andpd %xmm3, %xmm1 - mulsd %xmm0, %xmm3 - mulsd %xmm6, %xmm0 - unpckhpd %xmm6, %xmm6 - mulsd %xmm7, %xmm2 - addsd %xmm6, %xmm0 - addsd %xmm4, %xmm2 - subsd %xmm1, %xmm7 - mulsd %xmm3, %xmm0 - addsd %xmm2, %xmm0 - addsd %xmm7, %xmm0 - cmpl $2047, %edx - jge .L_2TAG_PACKET_7.0.3 - mulsd %xmm5, %xmm1 - mulsd %xmm5, %xmm0 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_8.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_8.0.3: - addsd %xmm1, %xmm0 - pextrw $3, %xmm0, %eax - movl $162, %edx - andl $32752, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_9.0.3 - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_7.0.3: - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_10.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_10.0.3: - addsd %xmm1, %xmm0 - mulsd %xmm5, %xmm0 - pextrw $3, %xmm0, %eax - movl $161, %edx - andl $32752, %eax - cmpl $32752, %eax - je .L_2TAG_PACKET_9.0.3 - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_0.0.3: - movl 16(%esp), %edx - andl $-24577, %edx - movl %edx, 24(%esp) - ldmxcsr 24(%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_9.0.3: - movsd %xmm0, (%esp) - movsd 128(%esp), %xmm0 - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_11.0.3 -.L_2TAG_PACKET_12.0.3: - cmpl $32752, %ecx - jae .L_2TAG_PACKET_13.0.3 - movl 132(%esp), %ecx - cmpl $-2147483648, %ecx - jae .L_2TAG_PACKET_14.0.3 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_15.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_15.0.3: - movsd 2144(%ebx), %xmm0 - mulsd %xmm0, %xmm0 - movl $161, %edx - jmp .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_14.0.3: - cmpl $-1064253440, %ecx - jbe .L_2TAG_PACKET_3.0.3 - shrl $4, %ecx - subl $201919680, %ecx - shrl $31, %ecx - xorpd %xmm0, %xmm0 - movd %ecx, %xmm0 - movl 16(%esp), %eax - andl $-24577, %eax - cmpl 16(%esp), %eax - je .L_2TAG_PACKET_16.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %eax - andl $24576, %eax - orl %eax, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_16.0.3: - movsd 2152(%ebx), %xmm1 - mulsd %xmm1, %xmm1 - movl $162, %edx - jmp .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_13.0.3: - movl 128(%esp), %edx - movl 132(%esp), %eax - movl $2147483647, %ecx - andl %eax, %ecx - cmpl $2146435072, %ecx - ja .L_2TAG_PACKET_17.0.3 - cmpl $0, %edx - jne .L_2TAG_PACKET_17.0.3 - cmpl $2146435072, %eax - jne .L_2TAG_PACKET_18.0.3 - movsd 2128(%ebx), %xmm0 - jmp .L_2TAG_PACKET_19.0.3 -.L_2TAG_PACKET_18.0.3: - movsd 2136(%ebx), %xmm0 - jmp .L_2TAG_PACKET_19.0.3 -.L_2TAG_PACKET_17.0.3: - movsd 128(%esp), %xmm0 - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_19.0.3 -.L_2TAG_PACKET_2.0.3: - addl $15504, %ecx - cmpl $16527, %ecx - jae .L_2TAG_PACKET_12.0.3 - movsd 128(%esp), %xmm0 - addsd 2120(%ebx), %xmm0 - jmp .L_2TAG_PACKET_19.0.3 -.L_2TAG_PACKET_6.0.3: - movsd %xmm0, 48(%esp) - fldl 48(%esp) - jmp .L_2TAG_PACKET_11.0.3 -.L_2TAG_PACKET_19.0.3: - movsd %xmm0, 48(%esp) - fldl 48(%esp) - movl 16(%esp), %edx - andl $-24577, %edx - cmpl 16(%esp), %edx - je .L_2TAG_PACKET_11.0.3 - stmxcsr 24(%esp) - movl 16(%esp), %edx - andl $24576, %edx - orl %edx, 24(%esp) - ldmxcsr 24(%esp) -.L_2TAG_PACKET_11.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type exp2,@function - .size exp2,.-exp2 - .data -# -- End exp2 - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2851812149 - .long 5693 - .long 2595802551 - .long 1016815913 - .long 1048019041 - .long 11418 - .long 1398474845 - .long 3161559171 - .long 3899555717 - .long 17173 - .long 427280750 - .long 3163595548 - .long 3541402996 - .long 22960 - .long 2759177317 - .long 1015903202 - .long 702412510 - .long 28779 - .long 3803266086 - .long 3163328991 - .long 410360776 - .long 34629 - .long 1269990655 - .long 1013024446 - .long 3402036099 - .long 40510 - .long 405889333 - .long 1016154232 - .long 1828292879 - .long 46424 - .long 1255956746 - .long 1016636974 - .long 728909815 - .long 52370 - .long 383930225 - .long 1016078044 - .long 852742562 - .long 58348 - .long 667253586 - .long 1010842135 - .long 2952712987 - .long 64358 - .long 3293494651 - .long 3161168877 - .long 3490863953 - .long 70401 - .long 960797497 - .long 3163997456 - .long 3228316108 - .long 76477 - .long 3010241991 - .long 3159471380 - .long 2930322912 - .long 82586 - .long 2599499422 - .long 3163762623 - .long 3366293073 - .long 88728 - .long 3119426313 - .long 1015169130 - .long 1014845819 - .long 94904 - .long 3117910645 - .long 3162607681 - .long 948735466 - .long 101113 - .long 3516338027 - .long 3163623459 - .long 3949972341 - .long 107355 - .long 2068408548 - .long 1015962444 - .long 2214878420 - .long 113632 - .long 892270087 - .long 3164164998 - .long 828946858 - .long 119943 - .long 10642492 - .long 1016988014 - .long 586995997 - .long 126288 - .long 41662347 - .long 3163676568 - .long 2288159958 - .long 132667 - .long 2169144468 - .long 1015924597 - .long 2440944790 - .long 139081 - .long 2492769773 - .long 1015196030 - .long 1853186616 - .long 145530 - .long 3066496370 - .long 1016705150 - .long 1337108031 - .long 152014 - .long 3203724452 - .long 1015726421 - .long 1709341917 - .long 158533 - .long 2571168217 - .long 1015201075 - .long 3790955393 - .long 165087 - .long 2352942461 - .long 3164228666 - .long 4112506593 - .long 171677 - .long 2947355221 - .long 1015419624 - .long 3504003472 - .long 178303 - .long 3594001059 - .long 3158379228 - .long 2799960843 - .long 184965 - .long 1423655380 - .long 1016070727 - .long 2839424854 - .long 191663 - .long 1171596163 - .long 1014090255 - .long 171030293 - .long 198398 - .long 3526460132 - .long 1015477354 - .long 4232894513 - .long 205168 - .long 2383938684 - .long 1015717095 - .long 2992903935 - .long 211976 - .long 2218154405 - .long 1016276769 - .long 1603444721 - .long 218821 - .long 1548633640 - .long 3163249902 - .long 926591435 - .long 225703 - .long 3208833761 - .long 3163962090 - .long 1829099622 - .long 232622 - .long 1016661180 - .long 3164509581 - .long 887463927 - .long 239579 - .long 3596744162 - .long 3161842742 - .long 3272845541 - .long 246573 - .long 928852419 - .long 3164536824 - .long 1276261410 - .long 253606 - .long 300981947 - .long 1015732745 - .long 78413852 - .long 260677 - .long 4183226867 - .long 3164065827 - .long 569847338 - .long 267786 - .long 472945272 - .long 3160339305 - .long 3645941911 - .long 274933 - .long 3814685080 - .long 3162621917 - .long 1617004845 - .long 282120 - .long 82804943 - .long 1011391354 - .long 3978100823 - .long 289345 - .long 3513027190 - .long 1016894539 - .long 3049340112 - .long 296610 - .long 3062915824 - .long 1014219171 - .long 4040676318 - .long 303914 - .long 4090609238 - .long 1016712034 - .long 3577096743 - .long 311258 - .long 2951496418 - .long 1014842263 - .long 2583551245 - .long 318642 - .long 3161094195 - .long 1016655067 - .long 1990012071 - .long 326066 - .long 3529070563 - .long 3163861769 - .long 2731501122 - .long 333530 - .long 1774031854 - .long 3163518597 - .long 1453150082 - .long 341035 - .long 498154668 - .long 3162536638 - .long 3395129871 - .long 348580 - .long 4025345434 - .long 3163383964 - .long 917841882 - .long 356167 - .long 18715564 - .long 1016707884 - .long 3566716925 - .long 363794 - .long 1536826855 - .long 1015191009 - .long 3712504873 - .long 371463 - .long 88491948 - .long 1016476236 - .long 2321106615 - .long 379174 - .long 2171176610 - .long 1010584347 - .long 363667784 - .long 386927 - .long 813753949 - .long 1016833785 - .long 3111574537 - .long 394721 - .long 2606161479 - .long 3163808322 - .long 2956612997 - .long 402558 - .long 2118169750 - .long 3163784129 - .long 885834528 - .long 410438 - .long 1973258546 - .long 3163310140 - .long 2186617381 - .long 418360 - .long 2270764083 - .long 3164321289 - .long 3561793907 - .long 426325 - .long 1157054052 - .long 1012938926 - .long 1719614413 - .long 434334 - .long 330458197 - .long 3164331316 - .long 1963711167 - .long 442386 - .long 1744767756 - .long 3161622870 - .long 1013258799 - .long 450482 - .long 1748797610 - .long 3161177658 - .long 4182873220 - .long 458621 - .long 629542646 - .long 3163044879 - .long 3907805044 - .long 466805 - .long 2257091225 - .long 3162598983 - .long 1218806132 - .long 475034 - .long 1818613051 - .long 3163597017 - .long 1447192521 - .long 483307 - .long 1462857171 - .long 3163563097 - .long 1339972927 - .long 491625 - .long 167908908 - .long 1016620728 - .long 1944781191 - .long 499988 - .long 3993278767 - .long 3162772855 - .long 19972402 - .long 508397 - .long 3507899861 - .long 1017057868 - .long 919555682 - .long 516851 - .long 3121969534 - .long 1013996802 - .long 1413356050 - .long 525351 - .long 1651349290 - .long 3163716742 - .long 2571947539 - .long 533897 - .long 3558159063 - .long 3164425245 - .long 1176749997 - .long 542490 - .long 2738998779 - .long 3163084420 - .long 2604962541 - .long 551129 - .long 2614425274 - .long 3164587768 - .long 3649726105 - .long 559815 - .long 4085036346 - .long 1016698050 - .long 1110089947 - .long 568549 - .long 1451641638 - .long 1016523249 - .long 380978316 - .long 577330 - .long 854188970 - .long 3161511262 - .long 2568320822 - .long 586158 - .long 2732824428 - .long 1015401491 - .long 194117574 - .long 595035 - .long 777528611 - .long 3164460665 - .long 2966275557 - .long 603959 - .long 2176155323 - .long 3160891335 - .long 3418903055 - .long 612932 - .long 2527457337 - .long 3161869180 - .long 2682146384 - .long 621954 - .long 2082178512 - .long 3164411995 - .long 1892288442 - .long 631025 - .long 2446255666 - .long 3163648957 - .long 2191782032 - .long 640145 - .long 2960257726 - .long 1014791238 - .long 434316067 - .long 649315 - .long 2028358766 - .long 1014506698 - .long 2069751141 - .long 658534 - .long 1562170674 - .long 3163773257 - .long 3964284211 - .long 667803 - .long 2111583915 - .long 1016475740 - .long 2990417245 - .long 677123 - .long 3683467745 - .long 3164417902 - .long 321958744 - .long 686494 - .long 3401933766 - .long 1016843134 - .long 1434058175 - .long 695915 - .long 251133233 - .long 1016134345 - .long 3218338682 - .long 705387 - .long 3404164304 - .long 3163525684 - .long 2572866477 - .long 714911 - .long 878562433 - .long 1016570317 - .long 697153126 - .long 724487 - .long 1283515428 - .long 3164331765 - .long 3092190715 - .long 734114 - .long 814012167 - .long 3160571998 - .long 2380618042 - .long 743794 - .long 3149557219 - .long 3164369375 - .long 4076559943 - .long 753526 - .long 2119478330 - .long 3161806927 - .long 815859274 - .long 763312 - .long 240396590 - .long 3164536019 - .long 2420883922 - .long 773150 - .long 2049810052 - .long 1015168464 - .long 1540824585 - .long 783042 - .long 1064017010 - .long 3164536266 - .long 3716502172 - .long 792987 - .long 2303740125 - .long 1015091301 - .long 1610600570 - .long 802987 - .long 3766732298 - .long 1016808759 - .long 777507147 - .long 813041 - .long 4282924204 - .long 1016236109 - .long 2483480501 - .long 823149 - .long 1216371780 - .long 1014082748 - .long 3706687593 - .long 833312 - .long 3521726939 - .long 1014301643 - .long 1432208378 - .long 843531 - .long 1401068914 - .long 3163412539 - .long 1242007932 - .long 853805 - .long 1132034716 - .long 3164388407 - .long 135105010 - .long 864135 - .long 1906148727 - .long 3164424315 - .long 3707479175 - .long 874520 - .long 3613079302 - .long 1015213314 - .long 382305176 - .long 884963 - .long 2347622376 - .long 3163627201 - .long 64696965 - .long 895462 - .long 1768797490 - .long 1016865536 - .long 4076975200 - .long 906017 - .long 2029000898 - .long 1016257111 - .long 863738719 - .long 916631 - .long 1326992219 - .long 3163661773 - .long 351641897 - .long 927302 - .long 2172261526 - .long 3164059175 - .long 3884662774 - .long 938030 - .long 2158611599 - .long 1015258761 - .long 4224142467 - .long 948817 - .long 3389820385 - .long 1016255778 - .long 2728693978 - .long 959663 - .long 396109971 - .long 3164511267 - .long 764307441 - .long 970568 - .long 3021057420 - .long 3164378099 - .long 3999357479 - .long 981531 - .long 2258941616 - .long 1016973300 - .long 929806999 - .long 992555 - .long 3205336643 - .long 1016308133 - .long 1533953344 - .long 1003638 - .long 769171850 - .long 1016714209 - .long 2912730644 - .long 1014781 - .long 3490067721 - .long 3164453650 - .long 2174652632 - .long 1025985 - .long 4087714590 - .long 1015498835 - .long 730821105 - .long 1037250 - .long 2523232743 - .long 1013115764 - .long 3884607281 - .long 1025890431 - .long 3607404735 - .long 1046244104 - .long 1874480759 - .long 1036235435 - .long 4286760334 - .long 1055834045 - .long 4277811695 - .long 1064709698 - .long 0 - .long 0 - .long 0 - .long 7340032 - .long 0 - .long 1072693248 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 4294967295 - .long 2146435071 - .long 0 - .long 508559360 - .long 4294967295 - .long 4294967295 - .type static_const_table,@object - .size static_const_table,2168 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2f_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2f_wmt.S deleted file mode 100644 index acfe909d67..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2f_wmt.S +++ /dev/null @@ -1,754 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp2f_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin exp2f - .text - .align 16,0x90 - .globl exp2f -exp2f: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %ecx - xorpd %xmm7, %xmm7 - movl $17080, %eax - pinsrw $3, %eax, %xmm7 - cvtps2pd %xmm0, %xmm3 - andl $2147483647, %ecx - subl $830472192, %ecx - cmpl $293339136, %ecx - jae .L_2TAG_PACKET_0.0.3 - movsd 2048(%ebx), %xmm6 - movapd %xmm7, %xmm2 - addsd %xmm3, %xmm7 - xorpd %xmm1, %xmm1 - movsd 2056(%ebx), %xmm5 - movd %xmm7, %eax - subsd %xmm7, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - xorpd %xmm4, %xmm4 - movl %eax, %ecx - andl $255, %eax - movsd (%ebx,%eax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - addl $830472192, %ecx - cmpl $830472192, %ecx - jb .L_2TAG_PACKET_2.0.3 - cmpl $1126170624, %ecx - jae .L_2TAG_PACKET_3.0.3 - movsd 2048(%ebx), %xmm6 - movapd %xmm7, %xmm2 - addsd %xmm3, %xmm7 - xorpd %xmm1, %xmm1 - movsd 2056(%ebx), %xmm5 - movd %xmm7, %eax - subsd %xmm7, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - xorpd %xmm4, %xmm4 - movl %eax, %ecx - andl $255, %eax - movsd (%ebx,%eax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - movd %xmm0, %eax - cmpl $8388608, %eax - jb .L_2TAG_PACKET_4.0.3 - cmpl $2139095040, %eax - je .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - movd %xmm0, %edx - cmpl $2139095040, %ecx - jae .L_2TAG_PACKET_6.0.3 - testl $-2147483648, %edx - je .L_2TAG_PACKET_5.0.3 - movl $8388608, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 -.L_2TAG_PACKET_4.0.3: - movl $164, %edx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_5.0.3: - movl $2130706432, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 - movl $163, %edx -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_2.0.3: - movl $1065353216, %eax - movd %eax, %xmm1 - addss %xmm1, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_6.0.3: - cmpl $-8388608, %edx - je .L_2TAG_PACKET_9.0.3 - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_9.0.3: - fldz - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_1.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type exp2f,@function - .size exp2f,.-exp2f - .data -# -- End exp2f - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 4200250559 - .long 1072696090 - .long 2851812149 - .long 1072698941 - .long 339411585 - .long 1072701800 - .long 1048019041 - .long 1072704666 - .long 772914124 - .long 1072707540 - .long 3899555717 - .long 1072710421 - .long 1928746161 - .long 1072713311 - .long 3541402996 - .long 1072716208 - .long 238821257 - .long 1072719114 - .long 702412510 - .long 1072722027 - .long 728934454 - .long 1072724948 - .long 410360776 - .long 1072727877 - .long 4133881824 - .long 1072730813 - .long 3402036099 - .long 1072733758 - .long 2602514713 - .long 1072736711 - .long 1828292879 - .long 1072739672 - .long 1172597893 - .long 1072742641 - .long 728909815 - .long 1072745618 - .long 590962156 - .long 1072748603 - .long 852742562 - .long 1072751596 - .long 1608493509 - .long 1072754597 - .long 2952712987 - .long 1072757606 - .long 685187902 - .long 1072760624 - .long 3490863953 - .long 1072763649 - .long 2875075254 - .long 1072766683 - .long 3228316108 - .long 1072769725 - .long 351405227 - .long 1072772776 - .long 2930322912 - .long 1072775834 - .long 2471440686 - .long 1072778901 - .long 3366293073 - .long 1072781976 - .long 1416741826 - .long 1072785060 - .long 1014845819 - .long 1072788152 - .long 2257959872 - .long 1072791252 - .long 948735466 - .long 1072794361 - .long 1480023343 - .long 1072797478 - .long 3949972341 - .long 1072800603 - .long 4162030108 - .long 1072803737 - .long 2214878420 - .long 1072806880 - .long 2502433899 - .long 1072810031 - .long 828946858 - .long 1072813191 - .long 1588871207 - .long 1072816359 - .long 586995997 - .long 1072819536 - .long 2218315341 - .long 1072822721 - .long 2288159958 - .long 1072825915 - .long 897099801 - .long 1072829118 - .long 2440944790 - .long 1072832329 - .long 2725843665 - .long 1072835549 - .long 1853186616 - .long 1072838778 - .long 4219606026 - .long 1072842015 - .long 1337108031 - .long 1072845262 - .long 1897844341 - .long 1072848517 - .long 1709341917 - .long 1072851781 - .long 874372905 - .long 1072855054 - .long 3790955393 - .long 1072858335 - .long 1972484976 - .long 1072861626 - .long 4112506593 - .long 1072864925 - .long 1724976915 - .long 1072868234 - .long 3504003472 - .long 1072871551 - .long 964107055 - .long 1072874878 - .long 2799960843 - .long 1072878213 - .long 526652809 - .long 1072881558 - .long 2839424854 - .long 1072884911 - .long 1253935211 - .long 1072888274 - .long 171030293 - .long 1072891646 - .long 3991843581 - .long 1072895026 - .long 4232894513 - .long 1072898416 - .long 1000925746 - .long 1072901816 - .long 2992903935 - .long 1072905224 - .long 1726216749 - .long 1072908642 - .long 1603444721 - .long 1072912069 - .long 2732492859 - .long 1072915505 - .long 926591435 - .long 1072918951 - .long 589198666 - .long 1072922406 - .long 1829099622 - .long 1072925870 - .long 460407023 - .long 1072929344 - .long 887463927 - .long 1072932827 - .long 3219942644 - .long 1072936319 - .long 3272845541 - .long 1072939821 - .long 1156440435 - .long 1072943333 - .long 1276261410 - .long 1072946854 - .long 3743175029 - .long 1072950384 - .long 78413852 - .long 1072953925 - .long 3278348324 - .long 1072957474 - .long 569847338 - .long 1072961034 - .long 654919306 - .long 1072964603 - .long 3645941911 - .long 1072968181 - .long 1065662932 - .long 1072971770 - .long 1617004845 - .long 1072975368 - .long 1118294578 - .long 1072978976 - .long 3978100823 - .long 1072982593 - .long 1720398391 - .long 1072986221 - .long 3049340112 - .long 1072989858 - .long 3784486610 - .long 1072993505 - .long 4040676318 - .long 1072997162 - .long 3933059031 - .long 1073000829 - .long 3577096743 - .long 1073004506 - .long 3088564500 - .long 1073008193 - .long 2583551245 - .long 1073011890 - .long 2178460671 - .long 1073015597 - .long 1990012071 - .long 1073019314 - .long 2135241198 - .long 1073023041 - .long 2731501122 - .long 1073026778 - .long 3896463087 - .long 1073030525 - .long 1453150082 - .long 1073034283 - .long 4109806887 - .long 1073038050 - .long 3395129871 - .long 1073041828 - .long 3723038930 - .long 1073045616 - .long 917841882 - .long 1073049415 - .long 3689071823 - .long 1073053223 - .long 3566716925 - .long 1073057042 - .long 671025100 - .long 1073060872 - .long 3712504873 - .long 1073064711 - .long 4222122499 - .long 1073068561 - .long 2321106615 - .long 1073072422 - .long 2425981843 - .long 1073076293 - .long 363667784 - .long 1073080175 - .long 551349105 - .long 1073084067 - .long 3111574537 - .long 1073087969 - .long 3872257780 - .long 1073091882 - .long 2956612997 - .long 1073095806 - .long 488188413 - .long 1073099741 - .long 885834528 - .long 1073103686 - .long 4273770423 - .long 1073107641 - .long 2186617381 - .long 1073111608 - .long 3339203574 - .long 1073115585 - .long 3561793907 - .long 1073119573 - .long 2979960120 - .long 1073123572 - .long 1719614413 - .long 1073127582 - .long 4201977662 - .long 1073131602 - .long 1963711167 - .long 1073135634 - .long 3721688645 - .long 1073139676 - .long 1013258799 - .long 1073143730 - .long 2555984613 - .long 1073147794 - .long 4182873220 - .long 1073151869 - .long 1727278727 - .long 1073155956 - .long 3907805044 - .long 1073160053 - .long 2263535754 - .long 1073164162 - .long 1218806132 - .long 1073168282 - .long 903334909 - .long 1073172413 - .long 1447192521 - .long 1073176555 - .long 2980802057 - .long 1073180708 - .long 1339972927 - .long 1073184873 - .long 950803702 - .long 1073189049 - .long 1944781191 - .long 1073193236 - .long 158781403 - .long 1073197435 - .long 19972402 - .long 1073201645 - .long 1660913392 - .long 1073205866 - .long 919555682 - .long 1073210099 - .long 2224145553 - .long 1073214343 - .long 1413356050 - .long 1073218599 - .long 2916157145 - .long 1073222866 - .long 2571947539 - .long 1073227145 - .long 515457527 - .long 1073231436 - .long 1176749997 - .long 1073235738 - .long 396319521 - .long 1073240052 - .long 2604962541 - .long 1073244377 - .long 3643909174 - .long 1073248714 - .long 3649726105 - .long 1073253063 - .long 2759350287 - .long 1073257424 - .long 1110089947 - .long 1073261797 - .long 3134592888 - .long 1073266181 - .long 380978316 - .long 1073270578 - .long 1577608921 - .long 1073274986 - .long 2568320822 - .long 1073279406 - .long 3492293770 - .long 1073283838 - .long 194117574 - .long 1073288283 - .long 1403662306 - .long 1073292739 - .long 2966275557 - .long 1073297207 - .long 727685349 - .long 1073301688 - .long 3418903055 - .long 1073306180 - .long 2591453363 - .long 1073310685 - .long 2682146384 - .long 1073315202 - .long 3833209506 - .long 1073319731 - .long 1892288442 - .long 1073324273 - .long 1297350157 - .long 1073328827 - .long 2191782032 - .long 1073333393 - .long 424392917 - .long 1073337972 - .long 434316067 - .long 1073342563 - .long 2366108318 - .long 1073347166 - .long 2069751141 - .long 1073351782 - .long 3985553595 - .long 1073356410 - .long 3964284211 - .long 1073361051 - .long 2152073944 - .long 1073365705 - .long 2990417245 - .long 1073370371 - .long 2331271250 - .long 1073375050 - .long 321958744 - .long 1073379742 - .long 1405169241 - .long 1073384446 - .long 1434058175 - .long 1073389163 - .long 557149882 - .long 1073393893 - .long 3218338682 - .long 1073398635 - .long 977020788 - .long 1073403391 - .long 2572866477 - .long 1073408159 - .long 3861050111 - .long 1073412940 - .long 697153126 - .long 1073417735 - .long 1822067026 - .long 1073422542 - .long 3092190715 - .long 1073427362 - .long 364333489 - .long 1073432196 - .long 2380618042 - .long 1073437042 - .long 703710506 - .long 1073441902 - .long 4076559943 - .long 1073446774 - .long 4062661092 - .long 1073451660 - .long 815859274 - .long 1073456560 - .long 3080351519 - .long 1073461472 - .long 2420883922 - .long 1073466398 - .long 3287523847 - .long 1073471337 - .long 1540824585 - .long 1073476290 - .long 1631695677 - .long 1073481256 - .long 3716502172 - .long 1073486235 - .long 3657065772 - .long 1073491228 - .long 1610600570 - .long 1073496235 - .long 2029714210 - .long 1073501255 - .long 777507147 - .long 1073506289 - .long 2307442995 - .long 1073511336 - .long 2483480501 - .long 1073516397 - .long 1464976603 - .long 1073521472 - .long 3706687593 - .long 1073526560 - .long 778901109 - .long 1073531663 - .long 1432208378 - .long 1073536779 - .long 1532734324 - .long 1073541909 - .long 1242007932 - .long 1073547053 - .long 721996136 - .long 1073552211 - .long 135105010 - .long 1073557383 - .long 3939148246 - .long 1073562568 - .long 3707479175 - .long 1073567768 - .long 3898795731 - .long 1073572982 - .long 382305176 - .long 1073578211 - .long 1912561781 - .long 1073583453 - .long 64696965 - .long 1073588710 - .long 3594158869 - .long 1073593980 - .long 4076975200 - .long 1073599265 - .long 1679558232 - .long 1073604565 - .long 863738719 - .long 1073609879 - .long 1796832535 - .long 1073615207 - .long 351641897 - .long 1073620550 - .long 991358482 - .long 1073625907 - .long 3884662774 - .long 1073631278 - .long 610758006 - .long 1073636665 - .long 4224142467 - .long 1073642065 - .long 2009970496 - .long 1073647481 - .long 2728693978 - .long 1073652911 - .long 2256325230 - .long 1073658356 - .long 764307441 - .long 1073663816 - .long 2719515920 - .long 1073669290 - .long 3999357479 - .long 1073674779 - .long 481706282 - .long 1073680284 - .long 929806999 - .long 1073685803 - .long 1222472308 - .long 1073691337 - .long 1533953344 - .long 1073696886 - .long 2038973688 - .long 1073702450 - .long 2912730644 - .long 1073708029 - .long 35929225 - .long 1073713624 - .long 2174652632 - .long 1073719233 - .long 915592468 - .long 1073724858 - .long 730821105 - .long 1073730498 - .long 1797923801 - .long 1073736153 - .long 4286760334 - .long 1070514109 - .long 4277826245 - .long 1072049730 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,2080 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2l.S deleted file mode 100644 index 7318adec21..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp2l.S +++ /dev/null @@ -1,1010 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp2l.c" - .text -..TXTST0: -# -- Begin exp2l - .text - .align 16,0x90 - .globl exp2l -exp2l: -# parameter 1: 80 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - subl $64, %esp -..B1.2: - fnstcw 54(%esp) -..B1.3: - movzwl 88(%esp), %ebx - movl %ebx, %eax - andl $32767, %eax - lea -16383(%eax), %edx - cmpl $15, %edx - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - jae ..B1.10 -..B1.4: - movl %eax, %ecx - movl $-1, %esi - negl %ecx - addl $30, %ecx - shll %cl, %esi - notl %esi - andl 84(%esp), %esi - orl 80(%esp), %esi - jne ..B1.10 -..B1.5: - fldt 80(%esp) - faddl _TWO_23H@GOTOFF(%edx) - fstps 48(%esp) - movl 48(%esp), %ecx - shll $10, %ecx - sarl $10, %ecx - lea 16445(%ecx), %eax - cmpl $32828, %eax - ja ..B1.9 -..B1.6: - movl %ecx, %edx - andb $127, 21(%esp) - addl $16383, %edx - jle ..B1.77 -..B1.7: - movzwl 20(%esp), %eax - andl $32767, %edx - andl $-32768, %eax - orl %edx, %eax - movw %ax, 20(%esp) - movl $-2147483648, 16(%esp) - movl $0, 12(%esp) -..B1.8: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.9: - movl %ebx, %eax - andl $32767, %eax -..B1.10: - cmpl $16389, %eax - jge ..B1.49 -..B1.11: - movzwl 54(%esp), %ecx - cmpl $16377, %eax - jge ..B1.42 -..B1.12: - cmpl $16369, %eax - jge ..B1.35 -..B1.13: - cmpl $16359, %eax - jge ..B1.28 -..B1.14: - cmpl $16316, %eax - jge ..B1.21 -..B1.15: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.80 -..B1.16: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.17: - fldcw 52(%esp) -..B1.18: - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fldt 80(%esp) - faddp %st, %st(1) - fstpt 12(%esp) -..B1.19: - fldcw 54(%esp) -..B1.20: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.21: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.81 -..B1.22: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.23: - fldcw 52(%esp) -..B1.24: - movl $1, %eax -..B1.25: - fldt 80(%esp) - testl %eax, %eax - fldt 12+_Q2@GOTOFF(%edx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - faddp %st, %st(1) - fstpt 12(%esp) - je ..B1.27 -..B1.26: - fldcw 54(%esp) -..B1.27: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.28: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.82 -..B1.29: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.30: - fldcw 52(%esp) -..B1.31: - movl $1, %eax -..B1.32: - fldt 80(%esp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%edx) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%edx) - fmul %st(2), %st - fldt 12+_Q1@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - faddp %st, %st(1) - fstpt 12(%esp) - je ..B1.34 -..B1.33: - fldcw 54(%esp) -..B1.34: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.35: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.83 -..B1.36: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.37: - fldcw 52(%esp) -..B1.38: - movl $1, %eax -..B1.39: - fldl _TWO_48H@GOTOFF(%edx) - testl %eax, %eax - fldt 80(%esp) - fld %st(0) - fmul %st(1), %st - fld %st(1) - fadd %st(3), %st - fsub %st, %st(3) - fld %st(2) - fsub %st(4), %st - fldt 84+_Q0@GOTOFF(%edx) - fmul %st(3), %st - fldt 72+_Q0@GOTOFF(%edx) - fmul %st(4), %st - fldt 60+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 48+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 36+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 24+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 12+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fldt _Q0@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 96+_Q0@GOTOFF(%edx) - fmul %st, %st(4) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - je ..B1.100 -..B1.40: - fstpt 24(%esp) -..B1.96: - fldcw 54(%esp) - jmp ..B1.41 -..B1.100: - fstp %st(0) -..B1.41: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.42: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.84 -..B1.43: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.44: - fldcw 52(%esp) -..B1.45: - movl $1, %ebx -..B1.46: - fldl _TWO_63H@GOTOFF(%edx) - fldt 80(%esp) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(1), %st - fadd %st(2), %st - fstpt 24(%esp) - fldt 24(%esp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmulp %st, %st(2) - movl 24(%esp), %eax - fsubp %st, %st(1) - fldl _TWO_48H@GOTOFF(%edx) - fld %st(0) - movsbl %al, %ecx - fadd %st(2), %st - subl %ecx, %eax - fsub %st, %st(1) - fld %st(1) - fxch %st(2) - fsubr %st, %st(3) - shll $4, %ecx - fxch %st(2) - fadd %st(3), %st - fld %st(0) - fmul %st(1), %st - fldt 60+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 36+_P@GOTOFF(%edx) - shrl $8, %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - shll $23, %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - addl $1065353216, %eax - fldt 12+_P@GOTOFF(%edx) - testl %ebx, %ebx - movl %eax, 36(%esp) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fldt _P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 72+_P@GOTOFF(%edx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(3) - fmulp %st, %st(2) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%ecx) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%ecx) - fld %st(0) - fmul %st(5), %st - fxch %st(4) - fadd %st, %st(5) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fmul %st(3), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmuls 36(%esp) - fstpt 12(%esp) - je ..B1.101 -..B1.47: - fstpt 24(%esp) -..B1.97: - fldcw 54(%esp) - jmp ..B1.48 -..B1.101: - fstp %st(0) -..B1.48: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.49: - movzbl 89(%esp), %ebx - andl $128, %ebx - shrl $7, %ebx - lea (,%ebx,8), %ecx - lea (%ecx,%ebx,4), %ecx - movzwl 8+_ranges@GOTOFF(%ecx,%edx), %esi - andl $32767, %esi - cmpl %esi, %eax - jl ..B1.54 -..B1.50: - jne ..B1.66 -..B1.51: - movl 84(%esp), %esi - cmpl 4+_ranges@GOTOFF(%ecx,%edx), %esi - jb ..B1.54 -..B1.52: - jne ..B1.66 -..B1.53: - movl 80(%esp), %esi - cmpl _ranges@GOTOFF(%ecx,%edx), %esi - jae ..B1.66 -..B1.54: - movzwl 54(%esp), %esi - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.88 -..B1.55: - orl $-64768, %esi - movw %si, 52(%esp) -..B1.56: - fldcw 52(%esp) -..B1.57: - movl $1, %esi -..B1.58: - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fstpt 36(%esp) - fldl _TWO_63H@GOTOFF(%edx) - fldt 80(%esp) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(1), %st - movl %ecx, 12(%esp) - fadd %st(2), %st - fstpt 24(%esp) - fldt 24(%esp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmulp %st, %st(2) - movl 24(%esp), %eax - movl %eax, %ecx - movsbl %al, %edi - addl $4196735, %eax - subl %edi, %ecx - fsubp %st, %st(1) - fldl _TWO_48H@GOTOFF(%edx) - fld %st(0) - shll $4, %edi - fadd %st(2), %st - shrl $8, %ecx - fsub %st, %st(1) - fld %st(1) - fxch %st(2) - fsubr %st, %st(3) - addl SC2_BIAS@GOTOFF(%edx,%ebx,4), %ecx - fxch %st(2) - fadd %st(3), %st - fld %st(0) - andl $32767, %ecx - fmul %st(1), %st - fldt 60+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 36+_P@GOTOFF(%edx) - movl %esi, 16(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - movzwl 8+.L_2il0floatpacket.2@GOTOFF(%edx), %esi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - andl $-32768, %esi - fldt 12+_P@GOTOFF(%edx) - orl %ecx, %esi - movw %si, 44(%esp) - cmpl $3070, %eax - movl 16(%esp), %esi - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fldt _P@GOTOFF(%edx) - movl 12(%esp), %ecx - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 72+_P@GOTOFF(%edx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(3) - fmulp %st, %st(2) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%edi) - fld %st(0) - fmul %st(4), %st - fxch %st(3) - fadd %st, %st(4) - fmul %st(1), %st - faddp %st, %st(1) - fxch %st(3) - fmull 2056+__libm_expl_table_256@GOTOFF(%edx,%edi) - faddp %st, %st(2) - fldt 80(%esp) - fxch %st(2) - faddl 2056+__libm_expl_table_256@GOTOFF(%edx,%edi) - ja ..B1.61 -..B1.59: - fldt _exp2but@GOTOFF(%edx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B1.61 -..B1.60: - fstp %st(1) - fstp %st(1) - fldl _TWO_12H@GOTOFF(%edx) - fld %st(2) - fadd %st(2), %st - fmul %st, %st(1) - fadd %st(1), %st - fsub %st, %st(1) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt _SC2@GOTOFF(%ecx,%edx) - fldt 36(%esp) - fmul %st, %st(4) - fxch %st(1) - fmul %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - fldt 12(%esp) - jmp ..B1.62 -..B1.61: - fstp %st(2) - fldt 36(%esp) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fldt _SC2@GOTOFF(%ecx,%edx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - fldt 12(%esp) -..B1.62: - fldt _minnorm@GOTOFF(%edx) - fcompp - fnstsw %ax - sahf - ja ..B1.85 -..B1.63: - testl %esi, %esi - je ..B1.102 -..B1.64: - fstpt 24(%esp) -..B1.98: - fldcw 54(%esp) - jmp ..B1.65 -..B1.102: - fstp %st(0) -..B1.65: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.66: - movzwl 54(%esp), %esi - movl %esi, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.93 -..B1.67: - orl $-64768, %esi - movw %si, 52(%esp) -..B1.68: - fldcw 52(%esp) -..B1.69: - movzwl 88(%esp), %eax - movl $1, %ecx - andl $32767, %eax -..B1.70: - cmpl $32767, %eax - je ..B1.89 -..B1.71: - testl %ebx, %ebx - je ..B1.73 -..B1.72: - fldt _small_value_80@GOTOFF(%edx) - fmul %st(0), %st - fstpt 12(%esp) - jmp ..B1.74 -..B1.73: - fldt _large_value_80@GOTOFF(%edx) - fmul %st(0), %st - fstpt 12(%esp) -..B1.74: - testl %ecx, %ecx - je ..B1.76 -..B1.75: - fldcw 54(%esp) -..B1.76: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.77: - movzwl 20(%esp), %eax - andl $-32768, %eax - movw %ax, 20(%esp) - cmpl $-31, %edx - jle ..B1.79 -..B1.78: - addl $16413, %ecx - movl $1, %eax - shll %cl, %eax - movl %eax, 16(%esp) - movl $0, 12(%esp) - jmp ..B1.8 -..B1.79: - addl $16413, %ecx - movl $1, %eax - shll %cl, %eax - movl $0, 16(%esp) - movl %eax, 12(%esp) - jmp ..B1.8 -..B1.80: - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fldt 80(%esp) - faddp %st, %st(1) - fstpt 12(%esp) - jmp ..B1.20 -..B1.81: - xorl %eax, %eax - jmp ..B1.25 -..B1.82: - xorl %eax, %eax - jmp ..B1.32 -..B1.83: - xorl %eax, %eax - jmp ..B1.39 -..B1.84: - xorl %ebx, %ebx - jmp ..B1.46 -..B1.85: - fldt _small_value_80@GOTOFF(%edx) - testl %esi, %esi - fmul %st(0), %st - fstpt (%esp) - je ..B1.103 -..B1.86: - fstpt 24(%esp) -..B1.99: - fldcw 54(%esp) - jmp ..B1.87 -..B1.103: - fstp %st(0) -..B1.87: - fldt 12(%esp) - addl $64, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.88: - xorl %esi, %esi - jmp ..B1.58 -..B1.89: - cmpl $-2147483648, 84(%esp) - jne ..B1.92 -..B1.90: - cmpl $0, 80(%esp) - jne ..B1.92 -..B1.91: - fldl _inf_zeros@GOTOFF(%edx,%ebx,8) - fstpt 12(%esp) - jmp ..B1.74 -..B1.92: - fldt 80(%esp) - fstpt 12(%esp) - jmp ..B1.74 -..B1.93: - xorl %ecx, %ecx - jmp ..B1.70 - .align 16,0x90 - .type exp2l,@function - .size exp2l,.-exp2l - .data -# -- End exp2l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf7,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .align 4 -_TWO_23H: - .long 0 - .long 1097334784 - .type _TWO_23H,@object - .size _TWO_23H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -SC2_BIAS: - .long 8191 - .long 24575 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 4 -_inf_zeros: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zeros,@object - .size _inf_zeros,16 - .align 2 -_Q2: - .word 32967 - .word 53711 - .word 6135 - .word 45426 - .word 16382 - .word 0 - .word 32541 - .word 5676 - .word 61436 - .word 62973 - .word 16380 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 31148 - .word 53711 - .word 6135 - .word 45426 - .word 16382 - .word 0 - .word 30019 - .word 5676 - .word 61436 - .word 62973 - .word 16380 - .word 0 - .word 64504 - .word 31847 - .word 18104 - .word 58200 - .word 16378 - .word 0 - .word 27878 - .word 3845 - .word 23422 - .word 40341 - .word 16376 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q0: - .word 20226 - .word 52574 - .word 36475 - .word 49086 - .word 16363 - .word 0 - .word 30019 - .word 5676 - .word 61436 - .word 62973 - .word 16380 - .word 0 - .word 64711 - .word 9477 - .word 18104 - .word 58200 - .word 16378 - .word 0 - .word 47522 - .word 53875 - .word 23421 - .word 40341 - .word 16376 - .word 0 - .word 43745 - .word 20212 - .word 65340 - .word 44739 - .word 16373 - .word 0 - .word 65207 - .word 12853 - .word 35196 - .word 41348 - .word 16370 - .word 0 - .word 16083 - .word 62062 - .word 13520 - .word 65510 - .word 16366 - .word 0 - .word 39312 - .word 30281 - .word 14077 - .word 45408 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45426 - .word 16382 - .word 0 - .type _Q0,@object - .size _Q0,108 - .align 2 -_P: - .word 12039 - .word 52575 - .word 36475 - .word 49086 - .word 16363 - .word 0 - .word 30020 - .word 5676 - .word 61436 - .word 62973 - .word 16380 - .word 0 - .word 64966 - .word 9463 - .word 18104 - .word 58200 - .word 16378 - .word 0 - .word 46891 - .word 53866 - .word 23421 - .word 40341 - .word 16376 - .word 0 - .word 12114 - .word 63546 - .word 699 - .word 44740 - .word 16373 - .word 0 - .word 63250 - .word 29232 - .word 35994 - .word 41348 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45426 - .word 16382 - .word 0 - .type _P,@object - .size _P,84 - .align 2 -_ranges: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16397 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 32894 - .word 16397 - .word 0 - .type _ranges,@object - .size _ranges,24 - .align 2 -_exp2but: - .word 0 - .word 0 - .word 0 - .word 65528 - .word 49164 - .word 0 - .type _exp2but,@object - .size _exp2but,12 - .align 2 -_SC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .type _SC2,@object - .size _SC2,24 - .align 2 -_minnorm: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _minnorm,@object - .size _minnorm,12 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp_table.S deleted file mode 100644 index 4463ad2089..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp_table.S +++ /dev/null @@ -1,522 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_exp_hi_table_64 - .globl __libm_exp_hi_table_64 -__libm_exp_hi_table_64: - .long 0x667f3c00,0x3fe6a09e - .long 0x3c651a40,0x3fe6dfb2 - .long 0xe8ec5f80,0x3fe71f75 - .long 0x56426800,0x3fe75feb - .long 0x73eb01c0,0x3fe7a114 - .long 0x36cf4e80,0x3fe7e2f3 - .long 0x994cce20,0x3fe82589 - .long 0x9b449300,0x3fe868d9 - .long 0x422aa0e0,0x3fe8ace5 - .long 0x99157740,0x3fe8f1ae - .long 0xb0cdc600,0x3fe93737 - .long 0x9fde4e60,0x3fe97d82 - .long 0x82a3f0a0,0x3fe9c491 - .long 0x7b5de580,0x3fea0c66 - .long 0xb23e2560,0x3fea5503 - .long 0x5579fdc0,0x3fea9e6b - .long 0x995ad3c0,0x3feae89f - .long 0xb84f1600,0x3feb33a2 - .long 0xf2fb5e60,0x3feb7f76 - .long 0x904bc1e0,0x3febcc1e - .long 0xdd8552a0,0x3fec199b - .long 0x2e57d150,0x3fec67f1 - .long 0xdcef9070,0x3fecb720 - .long 0x4a078980,0x3fed072d - .long 0xdcfba490,0x3fed5818 - .long 0x03db3290,0x3feda9e6 - .long 0x337b9b60,0x3fedfc97 - .long 0xe78b3ff8,0x3fee502e - .long 0xa2a490e0,0x3feea4af - .long 0xee615a28,0x3feefa1b - .long 0x5b6e4544,0x3fef5076 - .long 0x819e90da,0x3fefa7c1 - .long 0x00000000,0x3ff00000 - .long 0x3e778060,0x3ff02c9a - .long 0xd3158574,0x3ff059b0 - .long 0x18759bc8,0x3ff08745 - .long 0x6cf9890c,0x3ff0b558 - .long 0x32d3d1a0,0x3ff0e3ec - .long 0xd0125b50,0x3ff11301 - .long 0xaea92dd8,0x3ff1429a - .long 0x3c7d5178,0x3ff172b8 - .long 0xeb6fcb70,0x3ff1a35b - .long 0x3168b9a8,0x3ff1d487 - .long 0x88628cd0,0x3ff2063b - .long 0x6e756230,0x3ff2387a - .long 0x65e27cd0,0x3ff26b45 - .long 0xf51fdee0,0x3ff29e9d - .long 0xa6e40300,0x3ff2d285 - .long 0x0a31b710,0x3ff306fe - .long 0xb26416f0,0x3ff33c08 - .long 0x373aa9c0,0x3ff371a7 - .long 0x34e59ff0,0x3ff3a7db - .long 0x4c123420,0x3ff3dea6 - .long 0x21f72e20,0x3ff4160a - .long 0x60618920,0x3ff44e08 - .long 0xb5c13cc0,0x3ff486a2 - .long 0xd5362a20,0x3ff4bfda - .long 0x769d2ca0,0x3ff4f9b2 - .long 0x569d4f80,0x3ff5342b - .long 0x36b527c0,0x3ff56f47 - .long 0xdd485420,0x3ff5ab07 - .long 0x15ad2140,0x3ff5e76f - .long 0xb03a5580,0x3ff6247e - .long 0x82552220,0x3ff66238 - .long 0x667f3bc0,0x3ff6a09e - .type __libm_exp_hi_table_64,@object - .size __libm_exp_hi_table_64,520 - .space 8, 0x00 # pad - .align 16 - .hidden __libm_exp_mi_table_64 - .globl __libm_exp_mi_table_64 -__libm_exp_mi_table_64: - .long 0x33018800,0xbfd2bec3 - .long 0x8735cb80,0xbfd2409b - .long 0x2e274100,0xbfd1c114 - .long 0x537b3000,0xbfd14029 - .long 0x1829fc80,0xbfd0bdd7 - .long 0x92616300,0xbfd03a19 - .long 0x9accc780,0xbfcf69d9 - .long 0x92edb400,0xbfce5c99 - .long 0xf7557c80,0xbfcd4c6a - .long 0x9baa2300,0xbfcc3945 - .long 0x3cc8e800,0xbfcb2321 - .long 0x8086c680,0xbfca09f5 - .long 0xf5703d80,0xbfc8edb9 - .long 0x12886a00,0xbfc7ce66 - .long 0x37076a80,0xbfc6abf1 - .long 0xaa180900,0xbfc58652 - .long 0x9a94b100,0xbfc45d81 - .long 0x1ec3a800,0xbfc33175 - .long 0x34128680,0xbfc20224 - .long 0xbed0f880,0xbfc0cf85 - .long 0x13d56b00,0xbfbf3321 - .long 0x8d417580,0xbfbcc076 - .long 0x18837c80,0xbfba46f9 - .long 0xafc3b400,0xbfb7c695 - .long 0x1822db80,0xbfb53f39 - .long 0xe1266b80,0xbfb2b0cf - .long 0x64232500,0xbfb01b46 - .long 0x874c0080,0xbfaafd11 - .long 0xd5b6f200,0xbfa5b505 - .long 0x19ea5d80,0xbfa05e41 - .long 0x92375780,0xbf95f134 - .long 0x985bc980,0xbf860f9f - .long 0x00000000,0x00000000 - .long 0x3bc03000,0x3f864d1f - .long 0xc5615d00,0x3f966c34 - .long 0x0eb37900,0x3fa0e8a3 - .long 0x9f312180,0x3fa6ab0d - .long 0x5a7a3400,0x3fac7d86 - .long 0x0125b500,0x3fb1301d - .long 0xea92dd80,0x3fb429aa - .long 0xc7d51780,0x3fb72b83 - .long 0xb6fcb700,0x3fba35be - .long 0x168b9a80,0x3fbd4873 - .long 0x43146680,0x3fc031dc - .long 0x73ab1180,0x3fc1c3d3 - .long 0x2f13e680,0x3fc35a2b - .long 0xa8fef700,0x3fc4f4ef - .long 0x37201800,0x3fc6942d - .long 0x518db880,0x3fc837f0 - .long 0x9320b780,0x3fc9e045 - .long 0xb9d54e00,0x3fcb8d39 - .long 0xa72cff80,0x3fcd3ed9 - .long 0x6091a100,0x3fcef532 - .long 0x87dcb880,0x3fd05828 - .long 0x81862480,0x3fd13821 - .long 0xd704f300,0x3fd21a8a - .long 0x54d8a880,0x3fd2ff6b - .long 0xda74b280,0x3fd3e6c9 - .long 0x5a753e00,0x3fd4d0ad - .long 0xdad49f00,0x3fd5bd1c - .long 0x75215080,0x3fd6ac1f - .long 0x56b48500,0x3fd79dbc - .long 0xc0e95600,0x3fd891fa - .long 0x09548880,0x3fd988e2 - .long 0x99fcef00,0x3fda8279 - .type __libm_exp_mi_table_64,@object - .size __libm_exp_mi_table_64,520 - .space 8, 0x00 # pad - .align 16 - .hidden __libm_exp_lo_table_64 - .globl __libm_exp_lo_table_64 -__libm_exp_lo_table_64: - .long 0x682764c9,0xbcf9b7ba - .long 0x1d341e44,0xbce10ddf - .long 0x1e1a21ea,0xbcd845b9 - .long 0xb2ae62dc,0xbcfba048 - .long 0x77ee0499,0xbcfc9415 - .long 0xfd45ea87,0xbcedefa2 - .long 0xeea0a997,0xbcdaea60 - .long 0xe26f53db,0xbce37f1b - .long 0xea979b4e,0xbcc29160 - .long 0xb17471a2,0xbcd3a8cf - .long 0xe3c0dabf,0xbceb0baf - .long 0x6df06e17,0xbce07461 - .long 0x729f1c1b,0xbcdfc707 - .long 0x25747355,0xbceb4d65 - .long 0xdb71a83c,0xbcbba5ed - .long 0x78840167,0xbc97829b - .long 0xcb2e88ce,0xbce2a178 - .long 0xbc6109ae,0xbcc42500 - .long 0x4f7e54ac,0xbce91558 - .long 0xbe174986,0xbcdbb708 - .long 0xa76afb72,0xbcbeeef9 - .long 0x200b7c35,0xbcc2d77b - .long 0xd0b85ad9,0xbccbabf0 - .long 0x743797aa,0xbcc1cbc3 - .long 0xf4a29324,0xbcd1b44b - .long 0xfcb49256,0xbcd51ee7 - .long 0x53c612d7,0xbca46973 - .long 0xcfeac66e,0xbcad8c2e - .long 0x3179c289,0xbcc9e9c2 - .long 0xbcada4a8,0xbc911c05 - .long 0xda44ebcf,0xbcbcc583 - .long 0x818b4d9c,0xbcad16f5 - .long 0x00000000,0x00000000 - .long 0x95949ef4,0x3cadcdef - .long 0xa475b465,0x3c8d73e2 - .long 0x4bb284ff,0x3c6186be - .long 0xc95b8c21,0x3ccb14c5 - .long 0x1727c57b,0x3cc0103a - .long 0xe35db263,0x3ca49d77 - .long 0x0650ec96,0x3cdecd04 - .long 0xe4628759,0x3cc6e6fb - .long 0x63da4b47,0x3cd4f2da - .long 0xc0144c88,0x3cc3c02d - .long 0xac0a5425,0x3cd8ee3b - .long 0xf5b6382c,0x3ce0cd83 - .long 0xce6503a7,0x3cea4af4 - .long 0x15f5a24b,0x3cb2c25d - .long 0x3aa6da0f,0x3ce68012 - .long 0x56918c17,0x3cd4b7a3 - .long 0x0c21b2cd,0x3cee9939 - .long 0xaa05e8a9,0x3ce54e28 - .long 0x24a67828,0x3cdba86f - .long 0x911f09ec,0x3cc1ada0 - .long 0x4b71e7b7,0x3ce3f086 - .long 0xde813be0,0x3cea0626 - .long 0xa3b69063,0x3cf013c1 - .long 0x5ebfb10c,0x3cdc750e - .long 0x62da6a82,0x3cdab4cf - .long 0x3c49d86a,0x3cbdf0a8 - .long 0xb004764f,0x3cfa66ec - .long 0x602a323d,0x3ce2b192 - .long 0xc9840733,0x3ce0dd37 - .long 0xe81bf4b7,0x3cd2c7c3 - .long 0x678a6e3d,0x3cd2449f - .long 0x5f626cdd,0x3ce92116 - .type __libm_exp_lo_table_64,@object - .size __libm_exp_lo_table_64,520 - .space 8, 0x00 # pad - .align 16 - .hidden __libm_exp_table_128 - .globl __libm_exp_table_128 -__libm_exp_table_128: - .long 0x908b2fb1,0x3def3bcc - .long 0x66600000,0x3fe6a09e - .long 0xdaed5330,0x3dd7b57d - .long 0x75000000,0x3fe6c012 - .long 0xc8838b30,0x3dc468bb - .long 0x3c600000,0x3fe6dfb2 - .long 0xcf87e1b5,0x3de19483 - .long 0xf9400000,0x3fe6ff7d - .long 0xba46e1e6,0x3dd8bee7 - .long 0xe8e00000,0x3fe71f75 - .long 0xf572693a,0x3dc605ce - .long 0x48a00000,0x3fe73f9a - .long 0xfb74d51a,0x3db33e45 - .long 0x56400000,0x3fe75feb - .long 0x619ae028,0x3dee5d3f - .long 0x4fc00000,0x3fe78069 - .long 0xafaa2048,0x3dd6030d - .long 0x73e00000,0x3fe7a114 - .long 0x7c493344,0x3de0c132 - .long 0x01200000,0x3fe7c1ed - .long 0x20ba0574,0x3dde9cc4 - .long 0x36c00000,0x3fe7e2f3 - .long 0xb60de676,0x3dee1a11 - .long 0x54200000,0x3fe80427 - .long 0x159f115f,0x3dd99c25 - .long 0x99400000,0x3fe82589 - .long 0x7297b5cc,0x3dbe3d66 - .long 0x46200000,0x3fe8471a - .long 0x03907643,0x3dc24bb2 - .long 0x9b400000,0x3fe868d9 - .long 0xcca6179c,0x3dd4cd32 - .long 0xd9800000,0x3fe88ac7 - .long 0xb74f8ab4,0x3dd541b6 - .long 0x42200000,0x3fe8ace5 - .long 0xef2aa1cd,0x3de5448b - .long 0x16a00000,0x3fe8cf32 - .long 0x2b982746,0x3de57736 - .long 0x99000000,0x3fe8f1ae - .long 0x88a61b47,0x3de1ffc5 - .long 0x0b800000,0x3fe9145b - .long 0xe8a0387e,0x3ddb8bc9 - .long 0xb0c00000,0x3fe93737 - .long 0xd36906d3,0x3dd0a41d - .long 0xcbc00000,0x3fe95a44 - .long 0x8b9e9210,0x3dee4e4f - .long 0x9fc00000,0x3fe97d82 - .long 0x74621372,0x3dd40f73 - .long 0x70c00000,0x3fe9a0f1 - .long 0xe3e23584,0x3dbf8480 - .long 0x82a00000,0x3fe9c491 - .long 0xc12653c7,0x3db91918 - .long 0x19e00000,0x3fe9e863 - .long 0xb29ada8c,0x3dede564 - .long 0x7b400000,0x3fea0c66 - .long 0xb182e3ef,0x3dd45a66 - .long 0xec400000,0x3fea309b - .long 0x8b424492,0x3dee255c - .long 0xb2200000,0x3fea5503 - .long 0x6f2dfb2b,0x3de0b358 - .long 0x13200000,0x3fea799e - .long 0x43eb243c,0x3de9fdbf - .long 0x55600000,0x3fea9e6b - .long 0xc0db966a,0x3de3f379 - .long 0xbfc00000,0x3feac36b - .long 0x5e8734d1,0x3dead3ad - .long 0x99400000,0x3feae89f - .long 0x2108559c,0x3ddb6ccb - .long 0x29800000,0x3feb0e07 - .long 0xed7fa1cf,0x3dde2bf5 - .long 0xb8400000,0x3feb33a2 - .long 0x38e20444,0x3dc564e6 - .long 0x8de00000,0x3feb5972 - .long 0xeaa7b082,0x3deb5e46 - .long 0xf2e00000,0x3feb7f76 - .long 0x40cb3c6b,0x3da06498 - .long 0x30a00000,0x3feba5b0 - .long 0x48f741e9,0x3dd783a4 - .long 0x90400000,0x3febcc1e - .long 0x8408d702,0x3de71e08 - .long 0x5bc00000,0x3febf2c2 - .long 0x88832c4b,0x3dc54a70 - .long 0xdd800000,0x3fec199b - .long 0x6d14df82,0x3defd07a - .long 0x5fe00000,0x3fec40ab - .long 0x4a2137fd,0x3de7d14b - .long 0x2e400000,0x3fec67f1 - .long 0x46b2f122,0x3dcb9ed4 - .long 0x94000000,0x3fec8f6d - .long 0x2a0797a4,0x3ddf20d2 - .long 0xdce00000,0x3fecb720 - .long 0xc44f8959,0x3dedc3f9 - .long 0x55400000,0x3fecdf0b - .long 0x343c8bc8,0x3dce25ee - .long 0x4a000000,0x3fed072d - .long 0x15bc2473,0x3ddb13e3 - .long 0x08000000,0x3fed2f87 - .long 0x25da05af,0x3deba487 - .long 0xdce00000,0x3fed5818 - .long 0x7709f3a1,0x3dd3072f - .long 0x16c00000,0x3fed80e3 - .long 0x708c01a6,0x3deb3285 - .long 0x03c00000,0x3feda9e6 - .long 0xb695de3c,0x3dab4604 - .long 0xf3000000,0x3fedd321 - .long 0xb968cac4,0x3deb9b5e - .long 0x33600000,0x3fedfc97 - .long 0xa12761fa,0x3de5a128 - .long 0x14e00000,0x3fee2646 - .long 0x4e7a2603,0x3dd67fec - .long 0xe7800000,0x3fee502e - .long 0x2d522ca1,0x3dcd320d - .long 0xfbc00000,0x3fee7a51 - .long 0x163dce86,0x3dc24366 - .long 0xa2a00000,0x3feea4af - .long 0x1b60625f,0x3ddccfe1 - .long 0x2d800000,0x3feecf48 - .long 0x71fd21a9,0x3da5a277 - .long 0xee600000,0x3feefa1b - .long 0x9d0d2df8,0x3dd7752e - .long 0x37600000,0x3fef252b - .long 0xce9f096f,0x3ddc8a80 - .long 0x5b600000,0x3fef5076 - .long 0x8913b4c0,0x3decbe13 - .long 0xad800000,0x3fef7bfd - .long 0x2e90a7e7,0x3dee90d8 - .long 0x81800000,0x3fefa7c1 - .long 0x12eb7496,0x3ddee3e2 - .long 0x2b800000,0x3fefd3c2 - .long 0x00000000,0x00000000 - .long 0x00000000,0x3ff00000 - .long 0x6d84a66b,0x3dfb3335 - .long 0xa9e00000,0x3ff0163d - .long 0xee6f7cad,0x3df78060 - .long 0x3e600000,0x3ff02c9a - .long 0x7ae71f34,0x3decff09 - .long 0xe8600000,0x3ff04315 - .long 0x3ae7c549,0x3df58574 - .long 0xd3000000,0x3ff059b0 - .long 0xc6dc403b,0x3dfdf6dd - .long 0x29c00000,0x3ff0706b - .long 0x08c35f26,0x3df59bc8 - .long 0x18600000,0x3ff08745 - .long 0x14878183,0x3ddbce0d - .long 0xcac00000,0x3ff09e3e - .long 0x6298b92b,0x3df9890f - .long 0x6ce00000,0x3ff0b558 - .long 0x407b705c,0x3df247f7 - .long 0x2b600000,0x3ff0cc92 - .long 0x020742e5,0x3df3d1a2 - .long 0x32c00000,0x3ff0e3ec - .long 0xf232091e,0x3dfed31a - .long 0xafe00000,0x3ff0fb66 - .long 0xa4ebbf1b,0x3df25b50 - .long 0xd0000000,0x3ff11301 - .long 0xf72575a6,0x3de86397 - .long 0xc0600000,0x3ff12abd - .long 0x66820328,0x3de25bbf - .long 0xaea00000,0x3ff1429a - .long 0x920355cf,0x3dd63944 - .long 0xc8a00000,0x3ff15a98 - .long 0xdcdf7c8c,0x3dfd517a - .long 0x3c600000,0x3ff172b8 - .long 0x777ee173,0x3de91bd3 - .long 0x38800000,0x3ff18af9 - .long 0x796d31ed,0x3def96ea - .long 0xeb600000,0x3ff1a35b - .long 0x6ac79cad,0x3dd1734e - .long 0x84000000,0x3ff1bbe0 - .long 0xf00b7005,0x3de17354 - .long 0x31600000,0x3ff1d487 - .long 0xb8819ff6,0x3dfcd91c - .long 0x22e00000,0x3ff1ed50 - .long 0xdc775815,0x3dc466b1 - .long 0x88600000,0x3ff2063b - .long 0x2552fd29,0x3dfddc96 - .long 0x91600000,0x3ff21f49 - .long 0x66c1fadb,0x3df56238 - .long 0x6e600000,0x3ff2387a - .long 0x3582ab7e,0x3df2a63f - .long 0x4fa00000,0x3ff251ce - .long 0x2bd33994,0x3dc3e6e9 - .long 0x65e00000,0x3ff26b45 - .long 0x96cf15cf,0x3df56380 - .long 0xe1e00000,0x3ff284df - .long 0x2c25d15f,0x3dffdee1 - .long 0xf5000000,0x3ff29e9d - .long 0xfddea465,0x3dfad98f - .long 0xd0c00000,0x3ff2b87f - .long 0x0024754e,0x3dd00c2d - .long 0xa6e00000,0x3ff2d285 - .long 0x11ca0f46,0x3dfe2f56 - .long 0xa9200000,0x3ff2ecaf - .long 0x2de8d5a4,0x3df1b715 - .long 0x0a200000,0x3ff306fe - .long 0x6a739e38,0x3de9b062 - .long 0xfc400000,0x3ff32170 - .long 0x32721843,0x3dd05bfd - .long 0xb2600000,0x3ff33c08 - .long 0xc9462347,0x3df29ff0 - .long 0x5f800000,0x3ff356c5 - .long 0xa7145503,0x3dfaa9ca - .long 0x37200000,0x3ff371a7 - .long 0x16a72c36,0x3dd76196 - .long 0x6d000000,0x3ff38cae - .long 0xa86f24a6,0x3dd67fdb - .long 0x34e00000,0x3ff3a7db - .long 0x84001f23,0x3df3a8e4 - .long 0xc3000000,0x3ff3c32d - .long 0x35b41224,0x3df23422 - .long 0x4c000000,0x3ff3dea6 - .long 0x417ee035,0x3de90037 - .long 0x04a00000,0x3ff3fa45 - .long 0xf84325b9,0x3df72e29 - .long 0x21e00000,0x3ff4160a - .long 0xdc704439,0x3df0a896 - .long 0xd9400000,0x3ff431f5 - .long 0x3136f40a,0x3db892d0 - .long 0x60600000,0x3ff44e08 - .long 0x72512f46,0x3dfd0057 - .long 0xed000000,0x3ff46a41 - .long 0x3c1a3b69,0x3db3cd01 - .long 0xb5c00000,0x3ff486a2 - .long 0x672d8bcf,0x3df7d3de - .long 0xf0c00000,0x3ff4a32a - .long 0x1d4397b0,0x3df62a27 - .long 0xd5200000,0x3ff4bfda - .long 0x63b36ef2,0x3dfddd0d - .long 0x99e00000,0x3ff4dcb2 - .long 0xad33d8b7,0x3dfd2ca6 - .long 0x76800000,0x3ff4f9b2 - .long 0x8225ea59,0x3deecc83 - .long 0xa2c00000,0x3ff516da - .long 0xdf0a83c5,0x3dfd4f81 - .long 0x56800000,0x3ff5342b - .long 0xc52ec620,0x3dfd920e - .long 0xca400000,0x3ff551a4 - .long 0x66ecb004,0x3df527da - .long 0x36a00000,0x3ff56f47 - .long 0x252bc2b7,0x3df7c7fd - .long 0xd4800000,0x3ff58d12 - .long 0xb192602a,0x3de0a852 - .long 0xdd400000,0x3ff5ab07 - .long 0x01c4b1b8,0x3df946b7 - .long 0x8a400000,0x3ff5c926 - .long 0xdd37c984,0x3dea4290 - .long 0x15a00000,0x3ff5e76f - .long 0xb076f593,0x3df6dc08 - .long 0xb9600000,0x3ff605e1 - .long 0xb1f0fa07,0x3dfa5584 - .long 0xb0200000,0x3ff6247e - .long 0x8edf0e2a,0x3de9863f - .long 0x34c00000,0x3ff64346 - .long 0x9127d9e3,0x3df52224 - .long 0x82400000,0x3ff66238 - .long 0x1038ae45,0x3de952e6 - .long 0xd4400000,0x3ff68155 - .long 0x908b2fb1,0x3dff3bcc - .long 0x66600000,0x3ff6a09e - .type __libm_exp_table_128,@object - .size __libm_exp_table_128,2064 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp_wmt.S deleted file mode 100644 index 6b9e3cda83..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/exp_wmt.S +++ /dev/null @@ -1,587 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin exp - .text - .align 16,0x90 - .globl exp -exp: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - unpcklpd %xmm0, %xmm0 - movapd 64(%ebx), %xmm1 - movapd 48(%ebx), %xmm6 - movapd 80(%ebx), %xmm2 - movapd 96(%ebx), %xmm3 - pextrw $3, %xmm0, %eax - andl $32767, %eax - movl $16527, %edx - subl %eax, %edx - subl $15504, %eax - orl %eax, %edx - cmpl $-2147483648, %edx - jae .L_2TAG_PACKET_0.0.3 - mulpd %xmm0, %xmm1 - addpd %xmm6, %xmm1 - movapd %xmm1, %xmm7 - subpd %xmm6, %xmm1 - mulpd %xmm1, %xmm2 - movapd 128(%ebx), %xmm4 - mulpd %xmm1, %xmm3 - movapd 144(%ebx), %xmm5 - subpd %xmm2, %xmm0 - movd %xmm7, %eax - movl %eax, %ecx - andl $63, %ecx - shll $4, %ecx - sarl $6, %eax - movl %eax, %edx - movdqa 16(%ebx), %xmm6 - pand %xmm6, %xmm7 - movdqa 32(%ebx), %xmm6 - paddq %xmm6, %xmm7 - psllq $46, %xmm7 - subpd %xmm3, %xmm0 - movapd 160(%ebx,%ecx), %xmm2 - mulpd %xmm0, %xmm4 - movapd %xmm0, %xmm6 - movapd %xmm0, %xmm1 - mulpd %xmm6, %xmm6 - mulpd %xmm6, %xmm0 - addpd %xmm4, %xmm5 - mulsd %xmm6, %xmm0 - mulpd 112(%ebx), %xmm6 - addsd %xmm2, %xmm1 - unpckhpd %xmm2, %xmm2 - mulpd %xmm5, %xmm0 - addsd %xmm0, %xmm1 - orpd %xmm7, %xmm2 - unpckhpd %xmm0, %xmm0 - addsd %xmm1, %xmm0 - addsd %xmm6, %xmm0 - addl $894, %edx - cmpl $1916, %edx - ja .L_2TAG_PACKET_1.0.3 - mulsd %xmm2, %xmm0 - addsd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - fstcw 24(%esp) - movzwl 24(%esp), %edx - orl $768, %edx - movw %dx, 28(%esp) - fldcw 28(%esp) - movl %eax, %edx - sarl $1, %eax - subl %eax, %edx - movdqa (%ebx), %xmm6 - pandn %xmm2, %xmm6 - addl $1023, %eax - movd %eax, %xmm3 - psllq $52, %xmm3 - orpd %xmm3, %xmm6 - addl $1023, %edx - movd %edx, %xmm4 - psllq $52, %xmm4 - movsd %xmm0, 8(%esp) - fldl 8(%esp) - movsd %xmm6, 16(%esp) - fldl 16(%esp) - fmul %st, %st(1) - faddp %st, %st(1) - movsd %xmm4, 8(%esp) - fldl 8(%esp) - fmulp %st, %st(1) - fstpl 8(%esp) - movsd 8(%esp), %xmm0 - fldcw 24(%esp) - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl $32752, %ecx - jae .L_2TAG_PACKET_3.0.3 - cmpl $0, %ecx - je .L_2TAG_PACKET_4.0.3 - jmp .L_2TAG_PACKET_2.0.3 - cmpl $-2147483648, %ecx - jb .L_2TAG_PACKET_3.0.3 - cmpl $-1064950997, %ecx - jb .L_2TAG_PACKET_2.0.3 - ja .L_2TAG_PACKET_4.0.3 - movl 128(%esp), %edx - cmpl $-17155601, %edx - jb .L_2TAG_PACKET_2.0.3 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_3.0.3: - movl $14, %edx - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_4.0.3: - movl $15, %edx -.L_2TAG_PACKET_5.0.3: - movsd %xmm0, (%esp) - movsd 128(%esp), %xmm0 - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_7.0.3: - cmpl $2146435072, %eax - jae .L_2TAG_PACKET_8.0.3 - movl 132(%esp), %eax - cmpl $-2147483648, %eax - jae .L_2TAG_PACKET_9.0.3 - movsd 1208(%ebx), %xmm0 - mulsd %xmm0, %xmm0 - movl $14, %edx - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_9.0.3: - movsd 1216(%ebx), %xmm0 - mulsd %xmm0, %xmm0 - movl $15, %edx - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_8.0.3: - movl 128(%esp), %edx - cmpl $2146435072, %eax - ja .L_2TAG_PACKET_10.0.3 - cmpl $0, %edx - jne .L_2TAG_PACKET_10.0.3 - movl 132(%esp), %eax - cmpl $2146435072, %eax - jne .L_2TAG_PACKET_11.0.3 - movsd 1192(%ebx), %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_11.0.3: - movsd 1200(%ebx), %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_10.0.3: - movsd 128(%esp), %xmm0 - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - movl 132(%esp), %eax - andl $2147483647, %eax - cmpl $1083179008, %eax - jae .L_2TAG_PACKET_7.0.3 - movsd 128(%esp), %xmm0 - addsd 1184(%ebx), %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_2.0.3: - movsd %xmm0, 48(%esp) - fldl 48(%esp) -.L_2TAG_PACKET_6.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type exp,@function - .size exp,.-exp - .data -# -- End exp - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 4293918720 - .long 0 - .long 4293918720 - .long 4294967232 - .long 0 - .long 4294967232 - .long 0 - .long 65472 - .long 0 - .long 65472 - .long 0 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 1697350398 - .long 1079448903 - .long 1697350398 - .long 1079448903 - .long 4277796864 - .long 1065758274 - .long 4277796864 - .long 1065758274 - .long 3164486458 - .long 1025308570 - .long 3164486458 - .long 1025308570 - .long 4294967294 - .long 1071644671 - .long 4294967294 - .long 1071644671 - .long 3811088480 - .long 1062650204 - .long 1432067621 - .long 1067799893 - .long 3230715663 - .long 1065423125 - .long 1431604129 - .long 1069897045 - .long 0 - .long 0 - .long 0 - .long 0 - .long 235107661 - .long 1018002367 - .long 1048019040 - .long 11418 - .long 896005651 - .long 1015861842 - .long 3541402996 - .long 22960 - .long 1642514529 - .long 1012987726 - .long 410360776 - .long 34629 - .long 1568897900 - .long 1016568486 - .long 1828292879 - .long 46424 - .long 1882168529 - .long 1010744893 - .long 852742562 - .long 58348 - .long 509852888 - .long 1017336174 - .long 3490863952 - .long 70401 - .long 653277307 - .long 1017431380 - .long 2930322911 - .long 82586 - .long 1649557430 - .long 1017729363 - .long 1014845818 - .long 94904 - .long 1058231231 - .long 1015777676 - .long 3949972341 - .long 107355 - .long 1044000607 - .long 1016786167 - .long 828946858 - .long 119943 - .long 1151779725 - .long 1015705409 - .long 2288159958 - .long 132667 - .long 3819481236 - .long 1016499965 - .long 1853186616 - .long 145530 - .long 2552227826 - .long 1015039787 - .long 1709341917 - .long 158533 - .long 1829350193 - .long 1015216097 - .long 4112506593 - .long 171677 - .long 1913391795 - .long 1015756674 - .long 2799960843 - .long 184965 - .long 1303423926 - .long 1015238005 - .long 171030293 - .long 198398 - .long 1574172746 - .long 1016061241 - .long 2992903935 - .long 211976 - .long 3424156969 - .long 1017196428 - .long 926591434 - .long 225703 - .long 1938513547 - .long 1017631273 - .long 887463926 - .long 239579 - .long 2804567149 - .long 1015390024 - .long 1276261410 - .long 253606 - .long 631083525 - .long 1017690182 - .long 569847337 - .long 267786 - .long 1623370770 - .long 1011049453 - .long 1617004845 - .long 282120 - .long 3667985273 - .long 1013894369 - .long 3049340112 - .long 296610 - .long 3145379760 - .long 1014403278 - .long 3577096743 - .long 311258 - .long 2603100681 - .long 1017152460 - .long 1990012070 - .long 326066 - .long 3249202951 - .long 1017448880 - .long 1453150081 - .long 341035 - .long 419288974 - .long 1016280325 - .long 917841882 - .long 356167 - .long 3793507337 - .long 1016095713 - .long 3712504873 - .long 371463 - .long 728023093 - .long 1016345318 - .long 363667784 - .long 386927 - .long 2582678538 - .long 1017123460 - .long 2956612996 - .long 402558 - .long 7592966 - .long 1016721543 - .long 2186617380 - .long 418360 - .long 228611441 - .long 1016696141 - .long 1719614412 - .long 434334 - .long 2261665670 - .long 1017457593 - .long 1013258798 - .long 450482 - .long 544148907 - .long 1017323666 - .long 3907805043 - .long 466805 - .long 2383914918 - .long 1017143586 - .long 1447192520 - .long 483307 - .long 1176412038 - .long 1017267372 - .long 1944781190 - .long 499988 - .long 2882956373 - .long 1013312481 - .long 919555682 - .long 516851 - .long 3154077648 - .long 1016528543 - .long 2571947538 - .long 533897 - .long 348651999 - .long 1016405780 - .long 2604962540 - .long 551129 - .long 3253791412 - .long 1015920431 - .long 1110089947 - .long 568549 - .long 1509121860 - .long 1014756995 - .long 2568320822 - .long 586158 - .long 2617649212 - .long 1017340090 - .long 2966275556 - .long 603959 - .long 553214634 - .long 1016457425 - .long 2682146383 - .long 621954 - .long 730975783 - .long 1014083580 - .long 2191782032 - .long 640145 - .long 1486499517 - .long 1016818996 - .long 2069751140 - .long 658534 - .long 2595788928 - .long 1016407932 - .long 2990417244 - .long 677123 - .long 1853053619 - .long 1015310724 - .long 1434058175 - .long 695915 - .long 2462790535 - .long 1015814775 - .long 2572866477 - .long 714911 - .long 3693944214 - .long 1017259110 - .long 3092190714 - .long 734114 - .long 2979333550 - .long 1017188654 - .long 4076559942 - .long 753526 - .long 174054861 - .long 1014300631 - .long 2420883922 - .long 773150 - .long 816778419 - .long 1014197934 - .long 3716502172 - .long 792987 - .long 3507050924 - .long 1015341199 - .long 777507147 - .long 813041 - .long 1821514088 - .long 1013410604 - .long 3706687593 - .long 833312 - .long 920623539 - .long 1016295433 - .long 1242007931 - .long 853805 - .long 2789017511 - .long 1014276997 - .long 3707479175 - .long 874520 - .long 3586233004 - .long 1015962192 - .long 64696965 - .long 895462 - .long 474650514 - .long 1016642419 - .long 863738718 - .long 916631 - .long 1614448851 - .long 1014281732 - .long 3884662774 - .long 938030 - .long 2450082086 - .long 1016164135 - .long 2728693977 - .long 959663 - .long 1101668360 - .long 1015989180 - .long 3999357479 - .long 981531 - .long 835814894 - .long 1015702697 - .long 1533953344 - .long 1003638 - .long 1301400989 - .long 1014466875 - .long 2174652632 - .long 1025985 - .long 0 - .long 1072693248 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 4294967295 - .long 2146435071 - .long 0 - .long 1048576 - .type static_const_table,@object - .size static_const_table,1224 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expf_wmt.S deleted file mode 100644 index 73a3aa54a6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expf_wmt.S +++ /dev/null @@ -1,759 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin expf - .text - .align 16,0x90 - .globl expf -expf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %ecx - movsd 2064(%ebx), %xmm3 - xorpd %xmm7, %xmm7 - movl $17208, %eax - pinsrw $3, %eax, %xmm7 - cvtps2pd %xmm0, %xmm1 - andl $2147483647, %ecx - subl $830472192, %ecx - cmpl $288180587, %ecx - jae .L_2TAG_PACKET_0.0.3 - movsd 2048(%ebx), %xmm6 - mulsd %xmm1, %xmm3 - movapd %xmm7, %xmm2 - xorpd %xmm1, %xmm1 - addsd %xmm3, %xmm7 - movsd 2056(%ebx), %xmm5 - movd %xmm7, %eax - subsd %xmm7, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - xorpd %xmm4, %xmm4 - movl %eax, %ecx - andl $255, %eax - movsd (%ebx,%eax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - addl $830472192, %ecx - cmpl $830472192, %ecx - jb .L_2TAG_PACKET_2.0.3 - cmpl $1124073472, %ecx - jae .L_2TAG_PACKET_3.0.3 - movsd 2048(%ebx), %xmm6 - mulsd %xmm1, %xmm3 - movapd %xmm7, %xmm2 - xorpd %xmm1, %xmm1 - addsd %xmm3, %xmm7 - movsd 2056(%ebx), %xmm5 - movd %xmm7, %eax - subsd %xmm7, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - xorpd %xmm4, %xmm4 - movl %eax, %ecx - andl $255, %eax - movsd (%ebx,%eax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - movd %xmm0, %eax - cmpl $8388608, %eax - jb .L_2TAG_PACKET_4.0.3 - cmpl $2139095040, %eax - je .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - movd %xmm0, %edx - cmpl $2139095040, %ecx - jae .L_2TAG_PACKET_6.0.3 - testl $-2147483648, %edx - je .L_2TAG_PACKET_5.0.3 - movl $8388608, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 -.L_2TAG_PACKET_4.0.3: - movl $17, %edx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_5.0.3: - movl $2130706432, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 - movl $16, %edx -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_2.0.3: - movl $1065353216, %eax - movd %eax, %xmm1 - addss %xmm1, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_6.0.3: - cmpl $-8388608, %edx - je .L_2TAG_PACKET_9.0.3 - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_9.0.3: - fldz - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_1.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type expf,@function - .size expf,.-expf - .data -# -- End expf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 4200250559 - .long 1072696090 - .long 2851812149 - .long 1072698941 - .long 339411585 - .long 1072701800 - .long 1048019041 - .long 1072704666 - .long 772914124 - .long 1072707540 - .long 3899555717 - .long 1072710421 - .long 1928746161 - .long 1072713311 - .long 3541402996 - .long 1072716208 - .long 238821257 - .long 1072719114 - .long 702412510 - .long 1072722027 - .long 728934454 - .long 1072724948 - .long 410360776 - .long 1072727877 - .long 4133881824 - .long 1072730813 - .long 3402036099 - .long 1072733758 - .long 2602514713 - .long 1072736711 - .long 1828292879 - .long 1072739672 - .long 1172597893 - .long 1072742641 - .long 728909815 - .long 1072745618 - .long 590962156 - .long 1072748603 - .long 852742562 - .long 1072751596 - .long 1608493509 - .long 1072754597 - .long 2952712987 - .long 1072757606 - .long 685187902 - .long 1072760624 - .long 3490863953 - .long 1072763649 - .long 2875075254 - .long 1072766683 - .long 3228316108 - .long 1072769725 - .long 351405227 - .long 1072772776 - .long 2930322912 - .long 1072775834 - .long 2471440686 - .long 1072778901 - .long 3366293073 - .long 1072781976 - .long 1416741826 - .long 1072785060 - .long 1014845819 - .long 1072788152 - .long 2257959872 - .long 1072791252 - .long 948735466 - .long 1072794361 - .long 1480023343 - .long 1072797478 - .long 3949972341 - .long 1072800603 - .long 4162030108 - .long 1072803737 - .long 2214878420 - .long 1072806880 - .long 2502433899 - .long 1072810031 - .long 828946858 - .long 1072813191 - .long 1588871207 - .long 1072816359 - .long 586995997 - .long 1072819536 - .long 2218315341 - .long 1072822721 - .long 2288159958 - .long 1072825915 - .long 897099801 - .long 1072829118 - .long 2440944790 - .long 1072832329 - .long 2725843665 - .long 1072835549 - .long 1853186616 - .long 1072838778 - .long 4219606026 - .long 1072842015 - .long 1337108031 - .long 1072845262 - .long 1897844341 - .long 1072848517 - .long 1709341917 - .long 1072851781 - .long 874372905 - .long 1072855054 - .long 3790955393 - .long 1072858335 - .long 1972484976 - .long 1072861626 - .long 4112506593 - .long 1072864925 - .long 1724976915 - .long 1072868234 - .long 3504003472 - .long 1072871551 - .long 964107055 - .long 1072874878 - .long 2799960843 - .long 1072878213 - .long 526652809 - .long 1072881558 - .long 2839424854 - .long 1072884911 - .long 1253935211 - .long 1072888274 - .long 171030293 - .long 1072891646 - .long 3991843581 - .long 1072895026 - .long 4232894513 - .long 1072898416 - .long 1000925746 - .long 1072901816 - .long 2992903935 - .long 1072905224 - .long 1726216749 - .long 1072908642 - .long 1603444721 - .long 1072912069 - .long 2732492859 - .long 1072915505 - .long 926591435 - .long 1072918951 - .long 589198666 - .long 1072922406 - .long 1829099622 - .long 1072925870 - .long 460407023 - .long 1072929344 - .long 887463927 - .long 1072932827 - .long 3219942644 - .long 1072936319 - .long 3272845541 - .long 1072939821 - .long 1156440435 - .long 1072943333 - .long 1276261410 - .long 1072946854 - .long 3743175029 - .long 1072950384 - .long 78413852 - .long 1072953925 - .long 3278348324 - .long 1072957474 - .long 569847338 - .long 1072961034 - .long 654919306 - .long 1072964603 - .long 3645941911 - .long 1072968181 - .long 1065662932 - .long 1072971770 - .long 1617004845 - .long 1072975368 - .long 1118294578 - .long 1072978976 - .long 3978100823 - .long 1072982593 - .long 1720398391 - .long 1072986221 - .long 3049340112 - .long 1072989858 - .long 3784486610 - .long 1072993505 - .long 4040676318 - .long 1072997162 - .long 3933059031 - .long 1073000829 - .long 3577096743 - .long 1073004506 - .long 3088564500 - .long 1073008193 - .long 2583551245 - .long 1073011890 - .long 2178460671 - .long 1073015597 - .long 1990012071 - .long 1073019314 - .long 2135241198 - .long 1073023041 - .long 2731501122 - .long 1073026778 - .long 3896463087 - .long 1073030525 - .long 1453150082 - .long 1073034283 - .long 4109806887 - .long 1073038050 - .long 3395129871 - .long 1073041828 - .long 3723038930 - .long 1073045616 - .long 917841882 - .long 1073049415 - .long 3689071823 - .long 1073053223 - .long 3566716925 - .long 1073057042 - .long 671025100 - .long 1073060872 - .long 3712504873 - .long 1073064711 - .long 4222122499 - .long 1073068561 - .long 2321106615 - .long 1073072422 - .long 2425981843 - .long 1073076293 - .long 363667784 - .long 1073080175 - .long 551349105 - .long 1073084067 - .long 3111574537 - .long 1073087969 - .long 3872257780 - .long 1073091882 - .long 2956612997 - .long 1073095806 - .long 488188413 - .long 1073099741 - .long 885834528 - .long 1073103686 - .long 4273770423 - .long 1073107641 - .long 2186617381 - .long 1073111608 - .long 3339203574 - .long 1073115585 - .long 3561793907 - .long 1073119573 - .long 2979960120 - .long 1073123572 - .long 1719614413 - .long 1073127582 - .long 4201977662 - .long 1073131602 - .long 1963711167 - .long 1073135634 - .long 3721688645 - .long 1073139676 - .long 1013258799 - .long 1073143730 - .long 2555984613 - .long 1073147794 - .long 4182873220 - .long 1073151869 - .long 1727278727 - .long 1073155956 - .long 3907805044 - .long 1073160053 - .long 2263535754 - .long 1073164162 - .long 1218806132 - .long 1073168282 - .long 903334909 - .long 1073172413 - .long 1447192521 - .long 1073176555 - .long 2980802057 - .long 1073180708 - .long 1339972927 - .long 1073184873 - .long 950803702 - .long 1073189049 - .long 1944781191 - .long 1073193236 - .long 158781403 - .long 1073197435 - .long 19972402 - .long 1073201645 - .long 1660913392 - .long 1073205866 - .long 919555682 - .long 1073210099 - .long 2224145553 - .long 1073214343 - .long 1413356050 - .long 1073218599 - .long 2916157145 - .long 1073222866 - .long 2571947539 - .long 1073227145 - .long 515457527 - .long 1073231436 - .long 1176749997 - .long 1073235738 - .long 396319521 - .long 1073240052 - .long 2604962541 - .long 1073244377 - .long 3643909174 - .long 1073248714 - .long 3649726105 - .long 1073253063 - .long 2759350287 - .long 1073257424 - .long 1110089947 - .long 1073261797 - .long 3134592888 - .long 1073266181 - .long 380978316 - .long 1073270578 - .long 1577608921 - .long 1073274986 - .long 2568320822 - .long 1073279406 - .long 3492293770 - .long 1073283838 - .long 194117574 - .long 1073288283 - .long 1403662306 - .long 1073292739 - .long 2966275557 - .long 1073297207 - .long 727685349 - .long 1073301688 - .long 3418903055 - .long 1073306180 - .long 2591453363 - .long 1073310685 - .long 2682146384 - .long 1073315202 - .long 3833209506 - .long 1073319731 - .long 1892288442 - .long 1073324273 - .long 1297350157 - .long 1073328827 - .long 2191782032 - .long 1073333393 - .long 424392917 - .long 1073337972 - .long 434316067 - .long 1073342563 - .long 2366108318 - .long 1073347166 - .long 2069751141 - .long 1073351782 - .long 3985553595 - .long 1073356410 - .long 3964284211 - .long 1073361051 - .long 2152073944 - .long 1073365705 - .long 2990417245 - .long 1073370371 - .long 2331271250 - .long 1073375050 - .long 321958744 - .long 1073379742 - .long 1405169241 - .long 1073384446 - .long 1434058175 - .long 1073389163 - .long 557149882 - .long 1073393893 - .long 3218338682 - .long 1073398635 - .long 977020788 - .long 1073403391 - .long 2572866477 - .long 1073408159 - .long 3861050111 - .long 1073412940 - .long 697153126 - .long 1073417735 - .long 1822067026 - .long 1073422542 - .long 3092190715 - .long 1073427362 - .long 364333489 - .long 1073432196 - .long 2380618042 - .long 1073437042 - .long 703710506 - .long 1073441902 - .long 4076559943 - .long 1073446774 - .long 4062661092 - .long 1073451660 - .long 815859274 - .long 1073456560 - .long 3080351519 - .long 1073461472 - .long 2420883922 - .long 1073466398 - .long 3287523847 - .long 1073471337 - .long 1540824585 - .long 1073476290 - .long 1631695677 - .long 1073481256 - .long 3716502172 - .long 1073486235 - .long 3657065772 - .long 1073491228 - .long 1610600570 - .long 1073496235 - .long 2029714210 - .long 1073501255 - .long 777507147 - .long 1073506289 - .long 2307442995 - .long 1073511336 - .long 2483480501 - .long 1073516397 - .long 1464976603 - .long 1073521472 - .long 3706687593 - .long 1073526560 - .long 778901109 - .long 1073531663 - .long 1432208378 - .long 1073536779 - .long 1532734324 - .long 1073541909 - .long 1242007932 - .long 1073547053 - .long 721996136 - .long 1073552211 - .long 135105010 - .long 1073557383 - .long 3939148246 - .long 1073562568 - .long 3707479175 - .long 1073567768 - .long 3898795731 - .long 1073572982 - .long 382305176 - .long 1073578211 - .long 1912561781 - .long 1073583453 - .long 64696965 - .long 1073588710 - .long 3594158869 - .long 1073593980 - .long 4076975200 - .long 1073599265 - .long 1679558232 - .long 1073604565 - .long 863738719 - .long 1073609879 - .long 1796832535 - .long 1073615207 - .long 351641897 - .long 1073620550 - .long 991358482 - .long 1073625907 - .long 3884662774 - .long 1073631278 - .long 610758006 - .long 1073636665 - .long 4224142467 - .long 1073642065 - .long 2009970496 - .long 1073647481 - .long 2728693978 - .long 1073652911 - .long 2256325230 - .long 1073658356 - .long 764307441 - .long 1073663816 - .long 2719515920 - .long 1073669290 - .long 3999357479 - .long 1073674779 - .long 481706282 - .long 1073680284 - .long 929806999 - .long 1073685803 - .long 1222472308 - .long 1073691337 - .long 1533953344 - .long 1073696886 - .long 2038973688 - .long 1073702450 - .long 2912730644 - .long 1073708029 - .long 35929225 - .long 1073713624 - .long 2174652632 - .long 1073719233 - .long 915592468 - .long 1073724858 - .long 730821105 - .long 1073730498 - .long 1797923801 - .long 1073736153 - .long 4286760334 - .long 1053736893 - .long 4277826245 - .long 1063661122 - .long 1697350398 - .long 1081546055 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,2088 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expl.S deleted file mode 100644 index 48b0f7f0dd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expl.S +++ /dev/null @@ -1,969 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expl.c" - .text -..TXTST0: -# -- Begin expl - .text - .align 16,0x90 - .globl expl -expl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp -..B1.2: - fnstcw 70(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $16389, %eax - jge ..B1.50 -..B1.4: - movzwl 70(%esp), %ecx - cmpl $16378, %eax - jge ..B1.43 -..B1.5: - cmpl $16372, %eax - jge ..B1.36 -..B1.6: - cmpl $16365, %eax - jge ..B1.29 -..B1.7: - cmpl $16357, %eax - jge ..B1.22 -..B1.8: - cmpl $16316, %eax - jge ..B1.15 -..B1.9: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.78 -..B1.10: - orl $-64768, %ecx - movw %cx, 68(%esp) -..B1.11: - fldcw 68(%esp) -..B1.12: - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - fldt 8(%ebp) - faddp %st, %st(1) - fstpt (%esp) -..B1.13: - fldcw 70(%esp) -..B1.14: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.79 -..B1.16: - orl $-64768, %ecx - movw %cx, 68(%esp) -..B1.17: - fldcw 68(%esp) -..B1.18: - movl $1, %eax -..B1.19: - fldt 8(%ebp) - testl %eax, %eax - fldt _Q3@GOTOFF(%edx) - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.21 -..B1.20: - fldcw 70(%esp) -..B1.21: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.22: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.80 -..B1.23: - orl $-64768, %ecx - movw %cx, 68(%esp) -..B1.24: - fldcw 68(%esp) -..B1.25: - movl $1, %eax -..B1.26: - fldt 8(%ebp) - testl %eax, %eax - fldt 12+_Q2@GOTOFF(%edx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.28 -..B1.27: - fldcw 70(%esp) -..B1.28: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.29: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.81 -..B1.30: - orl $-64768, %ecx - movw %cx, 68(%esp) -..B1.31: - fldcw 68(%esp) -..B1.32: - movl $1, %eax -..B1.33: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(1) - fldt 36+_Q1@GOTOFF(%edx) - fmul %st(2), %st - fldt 24+_Q1@GOTOFF(%edx) - fmul %st(3), %st - fldt 12+_Q1@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt _Q1@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - fadd %st, %st(2) - fsubr %st(2), %st - fsubrp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.35 -..B1.34: - fldcw 70(%esp) -..B1.35: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.36: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.82 -..B1.37: - orl $-64768, %ecx - movw %cx, 68(%esp) -..B1.38: - fldcw 68(%esp) -..B1.39: - movl $1, %eax -..B1.40: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 84+_Q0@GOTOFF(%edx) - fmul %st(1), %st - fldt 72+_Q0@GOTOFF(%edx) - fmul %st(2), %st - fldt 60+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmul %st(3), %st - fldt _Q0@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - fadd %st, %st(1) - fsubr %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.42 -..B1.41: - fldcw 70(%esp) -..B1.42: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.43: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.83 -..B1.44: - orl $-64768, %ecx - movw %cx, 68(%esp) -..B1.45: - fldcw 68(%esp) -..B1.46: - movl $1, %ebx -..B1.47: - fldl _TWO_63H@GOTOFF(%edx) - fldt 8(%ebp) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(1), %st - fadd %st(2), %st - fstpt 24(%esp) - fldt 24(%esp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmul %st(2), %st - movl 24(%esp), %eax - fsubrp %st, %st(1) - fld %st(0) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fmulp %st, %st(3) - movsbl %al, %ecx - fsub %st(2), %st - fldl _TWO_32H@GOTOFF(%edx) - subl %ecx, %eax - shll $4, %ecx - fadd %st, %st(1) - shrl $8, %eax - fsubr %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - shll $23, %eax - fxch %st(4) - fsubrp %st, %st(3) - addl $1065353216, %eax - fadd %st(2), %st - fld %st(0) - testl %ebx, %ebx - fmul %st(1), %st - fldt 48+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - movl %eax, 36(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - faddp %st, %st(2) - fldt _P@GOTOFF(%edx) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%ecx) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%ecx) - fld %st(0) - fmul %st(4), %st - fxch %st(4) - fadd %st(5), %st - fmul %st(2), %st - faddp %st, %st(4) - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmuls 36(%esp) - fstpt (%esp) - je ..B1.95 -..B1.48: - fstpt 24(%esp) -..B1.93: - fldcw 70(%esp) - jmp ..B1.49 -..B1.95: - fstp %st(0) -..B1.49: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.50: - movzbl 17(%ebp), %ebx - andl $128, %ebx - shrl $7, %ebx - lea (,%ebx,8), %ecx - lea (%ecx,%ebx,4), %ecx - movzwl 8+_ranges@GOTOFF(%ecx,%edx), %esi - andl $32767, %esi - cmpl %esi, %eax - jl ..B1.55 -..B1.51: - jne ..B1.67 -..B1.52: - movl 12(%ebp), %esi - cmpl 4+_ranges@GOTOFF(%ecx,%edx), %esi - jb ..B1.55 -..B1.53: - jne ..B1.67 -..B1.54: - movl 8(%ebp), %esi - cmpl _ranges@GOTOFF(%ecx,%edx), %esi - jae ..B1.67 -..B1.55: - movzwl 70(%esp), %esi - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.85 -..B1.56: - orl $-64768, %esi - movw %si, 68(%esp) -..B1.57: - fldcw 68(%esp) -..B1.58: - movl $1, %esi -..B1.59: - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - fstpt (%esp) - fldl _TWO_63H@GOTOFF(%edx) - fldt 8(%ebp) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(1), %st - movl %ecx, 36(%esp) - fadd %st(2), %st - fstpt 24(%esp) - fldt 24(%esp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmul %st(2), %st - movl 24(%esp), %eax - movl %eax, %ecx - movsbl %al, %edi - addl $4196735, %eax - subl %edi, %ecx - fsubr %st(1), %st - fld %st(0) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fmulp %st, %st(4) - shll $4, %edi - fsub %st(3), %st - fldl _TWO_32H@GOTOFF(%edx) - shrl $8, %ecx - fadd %st, %st(1) - fxch %st(1) - fstpt 40(%esp) - fldt 40(%esp) - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - addl SC2_BIAS@GOTOFF(%edx,%ebx,4), %ecx - fxch %st(4) - fsubrp %st, %st(2) - movl %esi, 52(%esp) - andl $32767, %ecx - movzwl 8+.L_2il0floatpacket.3@GOTOFF(%edx), %esi - fadd %st(1), %st - fld %st(0) - andl $-32768, %esi - fmul %st(1), %st - orl %ecx, %esi - fldt 48+_P@GOTOFF(%edx) - cmpl $3070, %eax - fmul %st(1), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - movw %si, 8(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - movl 52(%esp), %esi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - movl 36(%esp), %ecx - faddp %st, %st(2) - fldt _P@GOTOFF(%edx) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%edi) - fld %st(0) - fmul %st(2), %st - fxch %st(2) - fadd %st(4), %st - fxch %st(1) - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - fxch %st(1) - fmull 2056+__libm_expl_table_256@GOTOFF(%edx,%edi) - faddp %st, %st(2) - faddl 2056+__libm_expl_table_256@GOTOFF(%edx,%edi) - faddp %st, %st(1) - ja ..B1.62 -..B1.60: - fldt _expbut@GOTOFF(%edx) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B1.62 -..B1.61: - fstp %st(1) - fldl _TWO_12H@GOTOFF(%edx) - fld %st(2) - fadd %st(2), %st - fmul %st, %st(1) - fadd %st(1), %st - fstpt 40(%esp) - fldt 40(%esp) - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt _SC2@GOTOFF(%ecx,%edx) - fldt (%esp) - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 56(%esp) - jmp ..B1.63 -..B1.62: - fstp %st(1) - fldt (%esp) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt _SC2@GOTOFF(%ecx,%edx) - fmulp %st, %st(1) - fstpt 56(%esp) -..B1.63: - fldt _minnorm@GOTOFF(%edx) - fldt 56(%esp) - fcompp - fnstsw %ax - sahf - jp ..B1.64 - jb ..B1.84 -..B1.64: - testl %esi, %esi - je ..B1.66 -..B1.65: - fldt 40(%esp) - fstpt 24(%esp) -..B1.94: - fldcw 70(%esp) -..B1.66: - fldt 56(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.67: - movzwl 70(%esp), %esi - movl %esi, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.90 -..B1.68: - orl $-64768, %esi - movw %si, 68(%esp) -..B1.69: - fldcw 68(%esp) -..B1.70: - movzwl 16(%ebp), %eax - movl $1, %ecx - andl $32767, %eax -..B1.71: - cmpl $32767, %eax - je ..B1.86 -..B1.72: - testl %ebx, %ebx - je ..B1.74 -..B1.73: - fldt _small_value_80@GOTOFF(%edx) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.75 -..B1.74: - fldt _large_value_80@GOTOFF(%edx) - fmul %st(0), %st - fstpt (%esp) -..B1.75: - testl %ecx, %ecx - je ..B1.77 -..B1.76: - fldcw 70(%esp) -..B1.77: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.78: - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - fldt 8(%ebp) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.14 -..B1.79: - xorl %eax, %eax - jmp ..B1.19 -..B1.80: - xorl %eax, %eax - jmp ..B1.26 -..B1.81: - xorl %eax, %eax - jmp ..B1.33 -..B1.82: - xorl %eax, %eax - jmp ..B1.40 -..B1.83: - xorl %ebx, %ebx - jmp ..B1.47 -..B1.84: - fldt _small_value_80@GOTOFF(%edx) - fmul %st(0), %st - fstpt 12(%esp) - jmp ..B1.64 -..B1.85: - xorl %esi, %esi - jmp ..B1.59 -..B1.86: - cmpl $-2147483648, 12(%ebp) - jne ..B1.89 -..B1.87: - cmpl $0, 8(%ebp) - jne ..B1.89 -..B1.88: - fldl _inf_zeros@GOTOFF(%edx,%ebx,8) - fstpt (%esp) - jmp ..B1.75 -..B1.89: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.75 -..B1.90: - xorl %ecx, %ecx - jmp ..B1.71 - .align 16,0x90 - .type expl,@function - .size expl,.-expl - .data -# -- End expl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -SC2_BIAS: - .long 8191 - .long 24575 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 4 -_inf_zeros: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zeros,@object - .size _inf_zeros,16 - .align 2 -_Q3: - .word 1 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 21845 - .word 85 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 13107 - .word 43827 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 65172 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 43275 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 49902 - .word 27670 - .word 43713 - .word 43690 - .word 16378 - .word 0 - .word 39976 - .word 2496 - .word 34972 - .word 34952 - .word 16376 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q0: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 62628 - .word 43690 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 53890 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 62001 - .word 21104 - .word 24757 - .word 46603 - .word 16373 - .word 0 - .word 21793 - .word 10330 - .word 207 - .word 53261 - .word 16370 - .word 0 - .word 18027 - .word 53571 - .word 10421 - .word 53262 - .word 16367 - .word 0 - .word 54394 - .word 23739 - .word 10794 - .word 47344 - .word 16364 - .word 0 - .type _Q0,@object - .size _Q0,96 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _P,@object - .size _P,60 - .align 2 -_ranges: - .word 31148 - .word 53711 - .word 6135 - .word 45426 - .word 16396 - .word 0 - .word 488 - .word 27074 - .word 50247 - .word 45600 - .word 16396 - .word 0 - .type _ranges,@object - .size _ranges,24 - .align 2 -_expbut: - .word 60207 - .word 4624 - .word 35943 - .word 45420 - .word 49164 - .word 0 - .type _expbut,@object - .size _expbut,12 - .align 2 -_SC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .type _SC2,@object - .size _SC2,24 - .align 2 -_minnorm: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _minnorm,@object - .size _minnorm,12 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expl_table.S deleted file mode 100644 index a3b1c92bfa..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expl_table.S +++ /dev/null @@ -1,562 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expl_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_expl_table_256 - .globl __libm_expl_table_256 -__libm_expl_table_256: - .long 0x66800000,0x3fe6a09e - .long 0xee9a09d9,0xbd98866d - .long 0xfa800000,0x3fe6b052 - .long 0xcb8e15a7,0xbdd5d183 - .long 0x75000000,0x3fe6c012 - .long 0xdaed5330,0x3dd7b57d - .long 0xde000000,0x3fe6cfdc - .long 0x470aac92,0xbdf5c4dd - .long 0x3c400000,0x3fe6dfb2 - .long 0x79107166,0x3df28d17 - .long 0x98400000,0x3fe6ef92 - .long 0xbd1a2d88,0x3de93ae4 - .long 0xf9400000,0x3fe6ff7d - .long 0xcf87e1b5,0x3de19483 - .long 0x67000000,0x3fe70f74 - .long 0xf314dd96,0xbdd7a2f1 - .long 0xe9000000,0x3fe71f75 - .long 0x22dc8f0d,0xbde3a08c - .long 0x87000000,0x3fe72f82 - .long 0x482a80b3,0xbde52f76 - .long 0x48c00000,0x3fe73f9a - .long 0x42a365b2,0xbdea7e8c - .long 0x35c00000,0x3fe74fbd - .long 0x411ff586,0x3de7cbfd - .long 0x56400000,0x3fe75feb - .long 0xfb74d51a,0x3db33e45 - .long 0xb1c00000,0x3fe77024 - .long 0x921e23a6,0xbde491f6 - .long 0x4fc00000,0x3fe78069 - .long 0x619ae028,0x3dee5d3f - .long 0x38c00000,0x3fe790b9 - .long 0xb2d95e75,0xbde3e309 - .long 0x74000000,0x3fe7a114 - .long 0x282aefdc,0xbde4fe79 - .long 0x09800000,0x3fe7b17b - .long 0xdf5dac23,0xbdd2604a - .long 0x01000000,0x3fe7c1ed - .long 0x3e2499a2,0x3df86099 - .long 0x63000000,0x3fe7d26a - .long 0x4224048d,0xbd8e43ee - .long 0x36c00000,0x3fe7e2f3 - .long 0x20ba0574,0x3dde9cc4 - .long 0x84800000,0x3fe7f387 - .long 0xdf01dc61,0x3de1c490 - .long 0x54400000,0x3fe80427 - .long 0x9f21989b,0xbdae5ee4 - .long 0xae000000,0x3fe814d2 - .long 0x573791e6,0xbdf77c93 - .long 0x99400000,0x3fe82589 - .long 0x159f115f,0x3dd99c25 - .long 0x1e800000,0x3fe8364c - .long 0xb3373464,0x3dfca0fb - .long 0x46400000,0x3fe8471a - .long 0x31ad0947,0xbdec3853 - .long 0x17800000,0x3fe857f4 - .long 0xf9162dc2,0x3def5b20 - .long 0x9b400000,0x3fe868d9 - .long 0x03907643,0x3dc24bb2 - .long 0xd9400000,0x3fe879ca - .long 0xa8b4a0b5,0xbddcb793 - .long 0xd9800000,0x3fe88ac7 - .long 0xcca6179c,0x3dd4cd32 - .long 0xa4800000,0x3fe89bd0 - .long 0x2ac6abb9,0xbdce9fc2 - .long 0x42400000,0x3fe8ace5 - .long 0xa4583aa6,0xbde55f24 - .long 0xbac00000,0x3fe8be05 - .long 0x7b2d7bf1,0x3de61778 - .long 0x16c00000,0x3fe8cf32 - .long 0x21aabc66,0xbdd576e8 - .long 0x5e400000,0x3fe8e06a - .long 0xae2294e0,0xbdfbcc93 - .long 0x99000000,0x3fe8f1ae - .long 0x2b982746,0x3de57736 - .long 0xd0000000,0x3fe902fe - .long 0x2b25950c,0x3df41645 - .long 0x0b800000,0x3fe9145b - .long 0x88a61b47,0x3de1ffc5 - .long 0x53800000,0x3fe925c3 - .long 0xecbaa05a,0x3df517f0 - .long 0xb0c00000,0x3fe93737 - .long 0xe8a0387e,0x3ddb8bc9 - .long 0x2b400000,0x3fe948b8 - .long 0xc478530d,0x3def98e4 - .long 0xcbc00000,0x3fe95a44 - .long 0xd36906d3,0x3dd0a41d - .long 0x9a400000,0x3fe96bdd - .long 0x7c8b4d30,0x3dfb3859 - .long 0x9fc00000,0x3fe97d82 - .long 0x8b9e9210,0x3dee4e4f - .long 0xe4800000,0x3fe98f33 - .long 0x8d509577,0xbdc77577 - .long 0x70c00000,0x3fe9a0f1 - .long 0x74621372,0x3dd40f73 - .long 0x4d400000,0x3fe9b2bb - .long 0x889ec6c8,0x3de3fe0c - .long 0x82800000,0x3fe9c491 - .long 0x0e3e2358,0x3df1f848 - .long 0x19400000,0x3fe9d674 - .long 0x574a0ae1,0x3dd771a9 - .long 0x19c00000,0x3fe9e863 - .long 0x8c12653c,0x3df19191 - .long 0x8d000000,0x3fe9fa5e - .long 0x5ab18aa8,0x3dcfca77 - .long 0x7b400000,0x3fea0c66 - .long 0xb29ada8c,0x3dede564 - .long 0xed800000,0x3fea1e7a - .long 0xe330c774,0x3ddd7176 - .long 0xec400000,0x3fea309b - .long 0xb182e3ef,0x3dd45a66 - .long 0x80400000,0x3fea42c9 - .long 0x5587fa76,0x3dc82b5e - .long 0xb2400000,0x3fea5503 - .long 0x4bdbb6e3,0xbdadaa37 - .long 0x8b000000,0x3fea674a - .long 0xeaf0a9d0,0xbdd73f5b - .long 0x13400000,0x3fea799e - .long 0x21a409aa,0xbdde994f - .long 0x53c00000,0x3fea8bfe - .long 0xc1e61351,0x3da2e58a - .long 0x55400000,0x3fea9e6b - .long 0xa1f5921e,0x3dfcfedf - .long 0x21400000,0x3feab0e5 - .long 0x9d8f3894,0xbdd5228b - .long 0xbfc00000,0x3feac36b - .long 0xc0db966a,0x3de3f379 - .long 0x3a400000,0x3fead5ff - .long 0x0218892a,0xbdbec45d - .long 0x99800000,0x3feae89f - .long 0x50bc6597,0xbdf29629 - .long 0xe6400000,0x3feafb4c - .long 0x52cbf03d,0xbded0d01 - .long 0x29800000,0x3feb0e07 - .long 0x2108559c,0x3ddb6ccb - .long 0x6c800000,0x3feb20ce - .long 0x53740928,0x3dea8952 - .long 0xb8800000,0x3feb33a2 - .long 0x84a0178c,0xbdf87502 - .long 0x15c00000,0x3feb4684 - .long 0x3eec7bd4,0xbdd16c9e - .long 0x8e000000,0x3feb5972 - .long 0x71c77eef,0xbdeaa6c6 - .long 0x2a000000,0x3feb6c6e - .long 0x6ab8656c,0xbddc75ab - .long 0xf3000000,0x3feb7f76 - .long 0x55613df9,0xbdc286e4 - .long 0xf2400000,0x3feb928c - .long 0x6dc85953,0xbde8b61c - .long 0x30c00000,0x3feba5b0 - .long 0x7bf34c39,0xbdeef9b6 - .long 0xb7c00000,0x3febb8e0 - .long 0x80fa968e,0xbdf2c870 - .long 0x90400000,0x3febcc1e - .long 0x48f741e9,0x3dd783a4 - .long 0xc4000000,0x3febdf69 - .long 0x0384c46c,0xbdd8bbf2 - .long 0x5c000000,0x3febf2c2 - .long 0xbdfb947f,0xbdf470fb - .long 0x61400000,0x3fec0628 - .long 0x4eb4abc1,0x3dab33cc - .long 0xdd800000,0x3fec199b - .long 0x88832c4b,0x3dc54a70 - .long 0xd9c00000,0x3fec2d1c - .long 0xd235d3d0,0x3dfd3295 - .long 0x60000000,0x3fec40ab - .long 0x75903ef8,0xbd77c2c9 - .long 0x79000000,0x3fec5447 - .long 0xed0f8db7,0xbdc41376 - .long 0x2e400000,0x3fec67f1 - .long 0x4a2137fd,0x3de7d14b - .long 0x89c00000,0x3fec7ba8 - .long 0x9e76bbbe,0xbdfb9b66 - .long 0x94000000,0x3fec8f6d - .long 0x46b2f122,0x3dcb9ed4 - .long 0x57400000,0x3feca340 - .long 0xd01a825e,0x3de1c4da - .long 0xdd000000,0x3fecb720 - .long 0xeafc342e,0xbde06f96 - .long 0x2e800000,0x3feccb0f - .long 0x1d220f86,0xbde2e98b - .long 0x55400000,0x3fecdf0b - .long 0xc44f8959,0x3dedc3f9 - .long 0x5b800000,0x3fecf315 - .long 0x3411d371,0xbdf22a46 - .long 0x4a000000,0x3fed072d - .long 0x343c8bc8,0x3dce25ee - .long 0x2b000000,0x3fed1b53 - .long 0xaab1b10d,0x3dd192d0 - .long 0x08000000,0x3fed2f87 - .long 0x15bc2473,0x3ddb13e3 - .long 0xeac00000,0x3fed43c8 - .long 0x9eda9dfb,0x3dd543ac - .long 0xdd000000,0x3fed5818 - .long 0x6897e945,0xbdc16de3 - .long 0xe8400000,0x3fed6c76 - .long 0x83fd0f49,0x3df17369 - .long 0x16c00000,0x3fed80e3 - .long 0x7709f3a1,0x3dd3072f - .long 0x72000000,0x3fed955d - .long 0xfd692233,0xbd93f152 - .long 0x04000000,0x3feda9e6 - .long 0x47b9ff2d,0xbdf266bd - .long 0xd6400000,0x3fedbe7c - .long 0xb76f1927,0xbdc5f3ad - .long 0xf3000000,0x3fedd321 - .long 0xb695de3c,0x3dab4604 - .long 0x64000000,0x3fede7d5 - .long 0x8d6ab5c6,0x3dec0657 - .long 0x33800000,0x3fedfc97 - .long 0x1a5cd4f2,0xbdc19285 - .long 0x6b000000,0x3fee1167 - .long 0xed4ad643,0x3de97d16 - .long 0x15000000,0x3fee2646 - .long 0xbdb13c0c,0xbdd4bdae - .long 0x3b000000,0x3fee3b33 - .long 0x982d6f38,0x3de6ee11 - .long 0xe7c00000,0x3fee502e - .long 0xec61767f,0xbdfa6004 - .long 0x24800000,0x3fee6539 - .long 0x2c7ff0ea,0xbde8928a - .long 0xfbc00000,0x3fee7a51 - .long 0x2d522ca1,0x3dcd320d - .long 0x77c00000,0x3fee8f79 - .long 0x77bb5bfa,0x3ddb6e7f - .long 0xa2c00000,0x3feea4af - .long 0x7a708c5e,0xbdeb6f26 - .long 0x86800000,0x3feeb9f4 - .long 0x6f9a1bae,0xbdb9ac8d - .long 0x2d800000,0x3feecf48 - .long 0x1b60625f,0x3ddccfe1 - .long 0xa2000000,0x3feee4aa - .long 0x471a3692,0x3de88510 - .long 0xee400000,0x3feefa1b - .long 0xbb8fe90d,0x3df0ad13 - .long 0x1cc00000,0x3fef0f9c - .long 0x99100329,0xbdd37dac - .long 0x37800000,0x3fef252b - .long 0xb1796904,0xbde44568 - .long 0x48c00000,0x3fef3ac9 - .long 0xe6a5a5c1,0x3ded7273 - .long 0x5b800000,0x3fef5076 - .long 0x98b07b49,0xbde1babf - .long 0x79800000,0x3fef6632 - .long 0xfd1bd9aa,0x3dd089f0 - .long 0xadc00000,0x3fef7bfd - .long 0x3b7625a0,0xbdf1a0f6 - .long 0x02400000,0x3fef91d8 - .long 0x08975454,0xbdebc377 - .long 0x81c00000,0x3fefa7c1 - .long 0xe8b7ac0c,0xbdf0b793 - .long 0x36800000,0x3fefbdba - .long 0xe6988ceb,0x3de2d513 - .long 0x2b800000,0x3fefd3c2 - .long 0x12eb7496,0x3ddee3e2 - .long 0x6b400000,0x3fefe9d9 - .long 0xeb59fc8c,0xbde5dc26 - .long 0x00000000,0x3ff00000 - .long 0x00000000,0x00000000 - .long 0xfa600000,0x3ff00b1a - .long 0xa7b5953b,0xbdd50d04 - .long 0xaa000000,0x3ff0163d - .long 0x49ed6654,0xbdd3332a - .long 0x14400000,0x3ff02168 - .long 0x95f9887e,0xbdd3f5fc - .long 0x3e800000,0x3ff02c9a - .long 0x232106a7,0xbde0ff3e - .long 0x2e200000,0x3ff037d4 - .long 0xea97ee11,0xbdec8867 - .long 0xe8800000,0x3ff04315 - .long 0x428c7066,0xbdf1807b - .long 0x73000000,0x3ff04e5f - .long 0xacf21b15,0xbde3569d - .long 0xd3200000,0x3ff059b0 - .long 0x8a30756e,0xbde4f517 - .long 0x0e400000,0x3ff0650a - .long 0xb96f6af3,0xbdcf03ba - .long 0x29e00000,0x3ff0706b - .long 0xc91dfe2b,0xbdc04911 - .long 0x2b800000,0x3ff07bd4 - .long 0xb3732eaf,0xbdeaaf93 - .long 0x18800000,0x3ff08745 - .long 0xee7941b4,0xbde4c86f - .long 0xf6600000,0x3ff092bd - .long 0x97f9c7ff,0x3dd81f7e - .long 0xcac00000,0x3ff09e3e - .long 0x14878183,0x3ddbce0d - .long 0x9b200000,0x3ff0a9c7 - .long 0x8ba4de31,0xbda8dcda - .long 0x6d000000,0x3ff0b558 - .long 0x759d1b52,0xbdd9dbc2 - .long 0x45e00000,0x3ff0c0f1 - .long 0x4f98906d,0x3dd1b215 - .long 0x2b600000,0x3ff0cc92 - .long 0x407b705c,0x3df247f7 - .long 0x23400000,0x3ff0d83b - .long 0xbc14de44,0xbdda8851 - .long 0x32e00000,0x3ff0e3ec - .long 0xfbf17a36,0xbde85cbb - .long 0x5fe00000,0x3ff0efa5 - .long 0x9db9bc54,0xbd958ed4 - .long 0xb0000000,0x3ff0fb66 - .long 0xdcdf6e22,0xbdb2ce50 - .long 0x28c00000,0x3ff10730 - .long 0x3a8dd62d,0x3df7233e - .long 0xd0200000,0x3ff11301 - .long 0xb62881ca,0xbdeb495e - .long 0xab600000,0x3ff11edb - .long 0x29153dc1,0xbdbd54a7 - .long 0xc0600000,0x3ff12abd - .long 0xf72575a6,0x3de86397 - .long 0x14e00000,0x3ff136a8 - .long 0xf477b823,0x3df204aa - .long 0xaea00000,0x3ff1429a - .long 0x66820328,0x3de25bbf - .long 0x93600000,0x3ff14e95 - .long 0x3723d073,0xbdf0ced2 - .long 0xc8a00000,0x3ff15a98 - .long 0x920355cf,0x3dd63944 - .long 0x54600000,0x3ff166a4 - .long 0x063c8ee1,0x3df1c3c2 - .long 0x3c800000,0x3ff172b8 - .long 0x19041b9d,0xbdc57429 - .long 0x86a00000,0x3ff17ed4 - .long 0xdec3803b,0xbde4887f - .long 0x38800000,0x3ff18af9 - .long 0x777ee173,0x3de91bd3 - .long 0x58400000,0x3ff19726 - .long 0x5aa913d0,0xbde145a1 - .long 0xeb600000,0x3ff1a35b - .long 0x796d31ed,0x3def96ea - .long 0xf8200000,0x3ff1af99 - .long 0x4203d2da,0xbde8ebc7 - .long 0x84000000,0x3ff1bbe0 - .long 0x6ac79cad,0x3dd1734e - .long 0x95200000,0x3ff1c82f - .long 0x804bbc01,0x3de038d6 - .long 0x31800000,0x3ff1d487 - .long 0x87fa47fd,0xbdf74655 - .long 0x5ec00000,0x3ff1e0e7 - .long 0xb7eec044,0xbde77fb2 - .long 0x23000000,0x3ff1ed50 - .long 0x3bf3004f,0xbdc9371a - .long 0x84400000,0x3ff1f9c1 - .long 0xbf524a09,0xbddcc6cd - .long 0x88600000,0x3ff2063b - .long 0xdc775815,0x3dc466b1 - .long 0x35600000,0x3ff212be - .long 0x4d64b4b4,0x3df8a819 - .long 0x91800000,0x3ff21f49 - .long 0xd56816b7,0xbdc11b4e - .long 0xa2800000,0x3ff22bdd - .long 0x16582554,0xbddbb4bb - .long 0x6e800000,0x3ff2387a - .long 0x327c0a4a,0xbde53b8f - .long 0xfba00000,0x3ff2451f - .long 0xca6066de,0xbdfdebf5 - .long 0x4fc00000,0x3ff251ce - .long 0x94faa904,0xbdeab381 - .long 0x71200000,0x3ff25e85 - .long 0x07976d4f,0xbdb318ab - .long 0x65e00000,0x3ff26b45 - .long 0x2bd33994,0x3dc3e6e9 - .long 0x34200000,0x3ff2780e - .long 0x3f307f41,0xbdc106b4 - .long 0xe1e00000,0x3ff284df - .long 0x96cf15cf,0x3df56380 - .long 0x75800000,0x3ff291ba - .long 0xda671baf,0x3df1bb6f - .long 0xf5200000,0x3ff29e9d - .long 0xed175053,0xbd808f69 - .long 0x66c00000,0x3ff2ab8a - .long 0x9aa2f39c,0x3df10f12 - .long 0xd0e00000,0x3ff2b87f - .long 0x08856e6b,0xbdd499c0 - .long 0x39600000,0x3ff2c57e - .long 0xabfae964,0x3df71b2e - .long 0xa7000000,0x3ff2d285 - .long 0xbff6e2ad,0xbdfbfcf4 - .long 0x1f600000,0x3ff2df96 - .long 0xd16cffbc,0x3dd05625 - .long 0xa9400000,0x3ff2ecaf - .long 0xe35f0ba3,0xbdbd0a9e - .long 0x4ac00000,0x3ff2f9d2 - .long 0x54f1554d,0xbdc3bca8 - .long 0x0a200000,0x3ff306fe - .long 0x2de8d5a4,0x3df1b715 - .long 0xee000000,0x3ff31432 - .long 0xcd4cb818,0xbdf14d02 - .long 0xfc400000,0x3ff32170 - .long 0x6a739e38,0x3de9b062 - .long 0x3ba00000,0x3ff32eb8 - .long 0x1dd0be1a,0x3de1d463 - .long 0xb2600000,0x3ff33c08 - .long 0x32721843,0x3dd05bfd - .long 0x66e00000,0x3ff34962 - .long 0xca58a6cf,0x3dcfd166 - .long 0x5fa00000,0x3ff356c5 - .long 0x6d73b971,0xbdeac01e - .long 0xa2e00000,0x3ff36431 - .long 0x8628940e,0xbdb77c53 - .long 0x37400000,0x3ff371a7 - .long 0x63aeabf4,0xbdd558d5 - .long 0x23200000,0x3ff37f26 - .long 0x7d72a7b4,0xbdb8ab66 - .long 0x6d000000,0x3ff38cae - .long 0x16a72c36,0x3dd76196 - .long 0x1b800000,0x3ff39a40 - .long 0xcd4d2fe4,0xbded7e22 - .long 0x34e00000,0x3ff3a7db - .long 0xa86f24a6,0x3dd67fdb - .long 0xc0000000,0x3ff3b57f - .long 0xaace6476,0xbdf3930b - .long 0xc3200000,0x3ff3c32d - .long 0xf7ffc1bb,0xbde8ae36 - .long 0x44e00000,0x3ff3d0e5 - .long 0x3fd1a118,0x3debc2e6 - .long 0x4c200000,0x3ff3dea6 - .long 0x9497dbb8,0xbdeb97bb - .long 0xdf200000,0x3ff3ec70 - .long 0xaf6637b9,0xbdcd7459 - .long 0x04a00000,0x3ff3fa45 - .long 0x417ee035,0x3de90037 - .long 0xc3600000,0x3ff40822 - .long 0xdeefc5b8,0x3dde8090 - .long 0x22000000,0x3ff4160a - .long 0x0f79b48e,0xbde1a3ac - .long 0x27000000,0x3ff423fb - .long 0x3dce91fa,0x3de28d13 - .long 0xd9600000,0x3ff431f5 - .long 0x471f778d,0xbdeeaed2 - .long 0x3f800000,0x3ff43ffa - .long 0xc405f4b8,0x3dd2e750 - .long 0x60600000,0x3ff44e08 - .long 0x3136f40a,0x3db892d0 - .long 0x42a00000,0x3ff45c20 - .long 0xcf37ccfa,0x3ddf48c7 - .long 0xed200000,0x3ff46a41 - .long 0x6d7685d3,0xbdc7fd44 - .long 0x66800000,0x3ff4786d - .long 0x1ef87896,0x3de6646d - .long 0xb5c00000,0x3ff486a2 - .long 0x3c1a3b69,0x3db3cd01 - .long 0xe1a00000,0x3ff494e1 - .long 0x4eca2579,0xbdeaa25c - .long 0xf0e00000,0x3ff4a32a - .long 0x31a4e861,0xbde05843 - .long 0xea800000,0x3ff4b17d - .long 0x224b70fe,0xbdf24829 - .long 0xd5400000,0x3ff4bfda - .long 0xc578d0a0,0xbde3abb1 - .long 0xb8000000,0x3ff4ce41 - .long 0x4178a5a4,0x3df7c114 - .long 0x9a000000,0x3ff4dcb2 - .long 0xe2648873,0xbdc11794 - .long 0x81e00000,0x3ff4eb2d - .long 0x5257d2e6,0xbddd5005 - .long 0x76a00000,0x3ff4f9b2 - .long 0x96613a4b,0xbdc69aca - .long 0x7f400000,0x3ff50841 - .long 0x68926d27,0x3dd4c7b8 - .long 0xa2c00000,0x3ff516da - .long 0x8225ea59,0x3deecc83 - .long 0xe8400000,0x3ff5257d - .long 0x9331a87e,0xbda62223 - .long 0x56a00000,0x3ff5342b - .long 0x07abe1db,0xbdc583f1 - .long 0xf4e00000,0x3ff542e2 - .long 0x2f24da32,0x3df6ad27 - .long 0xca600000,0x3ff551a4 - .long 0xd689ceff,0xbdc36f89 - .long 0xde000000,0x3ff56070 - .long 0x43edb85a,0xbdf6ef2e - .long 0x36800000,0x3ff56f47 - .long 0x33765802,0x3e0a93ed - .long 0xdbc00000,0x3ff57e27 - .long 0x5e8ce6eb,0x3e016267 - .long 0xd4800000,0x3ff58d12 - .long 0x252bc2b7,0x3df7c7fd - .long 0x28000000,0x3ff59c08 - .long 0xf1677234,0xbdaf068b - .long 0xdd400000,0x3ff5ab07 - .long 0xb192602a,0x3de0a852 - .long 0xfb800000,0x3ff5ba11 - .long 0x4910bd68,0x3e043d01 - .long 0x8a400000,0x3ff5c926 - .long 0x01c4b1b8,0x3df946b7 - .long 0x90800000,0x3ff5d845 - .long 0x8ca5615d,0x3df98b92 - .long 0x15800000,0x3ff5e76f - .long 0x374df261,0x3e0690a4 - .long 0x20c00000,0x3ff5f6a3 - .long 0xcc2a4438,0x3dfceb70 - .long 0xb9800000,0x3ff605e1 - .long 0x9f1214db,0xbde247ee - .long 0xe6c00000,0x3ff6152a - .long 0xf259f256,0x3debede8 - .long 0xb0400000,0x3ff6247e - .long 0x383c17e4,0xbdd6a9ed - .long 0x1d000000,0x3ff633dd - .long 0x611c42fb,0x3df929fd - .long 0x34c00000,0x3ff64346 - .long 0x8edf0e2a,0x3de9863f - .long 0xfec00000,0x3ff652b9 - .long 0x5c7ab935,0xbdcb824b - .long 0x82400000,0x3ff66238 - .long 0x9127d9e3,0x3df52224 - .long 0xc7000000,0x3ff671c1 - .long 0x85e3369e,0x3de067eb - .long 0xd4400000,0x3ff68155 - .long 0x1038ae45,0x3de952e6 - .long 0xb1c00000,0x3ff690f4 - .long 0xe7fb4265,0xbe00b563 - .long 0x66800000,0x3ff6a09e - .long 0xee9a09d9,0xbda8866d - .type __libm_expl_table_256,@object - .size __libm_expl_table_256,4112 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1_wmt.S deleted file mode 100644 index 6a5235a8eb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1_wmt.S +++ /dev/null @@ -1,703 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expm1_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin expm1 - .text - .align 16,0x90 - .globl expm1 -expm1: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - unpcklpd %xmm0, %xmm0 - movapd 64(%ebx), %xmm1 - movapd 48(%ebx), %xmm6 - movapd 80(%ebx), %xmm2 - movapd 96(%ebx), %xmm3 - pextrw $3, %xmm0, %eax - andl $32767, %eax - movl $16527, %edx - subl %eax, %edx - subl $16304, %eax - orl %eax, %edx - cmpl $-2147483648, %edx - jae .L_2TAG_PACKET_0.0.3 - mulpd %xmm0, %xmm1 - addpd %xmm6, %xmm1 - movapd %xmm1, %xmm7 - subpd %xmm6, %xmm1 - mulpd %xmm1, %xmm2 - movapd 112(%ebx), %xmm4 - mulpd %xmm1, %xmm3 - movapd 128(%ebx), %xmm5 - subpd %xmm2, %xmm0 - movd %xmm7, %eax - movl %eax, %ecx - andl $63, %ecx - shll $4, %ecx - sarl $6, %eax - movl %eax, %edx - subpd %xmm3, %xmm0 - movapd 160(%ebx,%ecx), %xmm2 - movsd 144(%ebx), %xmm3 - mulpd %xmm0, %xmm4 - movapd %xmm0, %xmm1 - mulpd %xmm0, %xmm0 - mulsd %xmm0, %xmm3 - addpd %xmm4, %xmm5 - mulsd %xmm0, %xmm0 - movapd %xmm2, %xmm4 - unpckhpd %xmm2, %xmm2 - movdqa 16(%ebx), %xmm6 - pand %xmm6, %xmm7 - movdqa 32(%ebx), %xmm6 - paddq %xmm6, %xmm7 - psllq $46, %xmm7 - mulsd %xmm0, %xmm3 - mulpd %xmm5, %xmm0 - addsd %xmm3, %xmm0 - addl $894, %edx - cmpl $1916, %edx - ja .L_2TAG_PACKET_1.0.3 - xorpd %xmm3, %xmm3 - movl $16368, %eax - pinsrw $3, %eax, %xmm3 - orpd %xmm7, %xmm2 - mulsd %xmm4, %xmm7 - movapd %xmm3, %xmm6 - addsd %xmm1, %xmm3 - pextrw $3, %xmm2, %edx - pshufd $238, %xmm0, %xmm5 - psrlq $38, %xmm3 - psllq $38, %xmm3 - movapd %xmm2, %xmm4 - subsd %xmm3, %xmm6 - addsd %xmm5, %xmm0 - addsd %xmm6, %xmm1 - addsd %xmm7, %xmm4 - mulsd %xmm3, %xmm7 - mulsd %xmm2, %xmm3 - xorpd %xmm5, %xmm5 - movl $16368, %eax - pinsrw $3, %eax, %xmm5 - addsd %xmm1, %xmm0 - movl $17184, %ecx - subl %edx, %ecx - subl $16256, %edx - orl %edx, %ecx - jl .L_2TAG_PACKET_2.0.3 - mulsd %xmm4, %xmm0 - subsd %xmm5, %xmm3 - addsd %xmm7, %xmm0 - addsd %xmm3, %xmm0 -.L_2TAG_PACKET_3.0.3: - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_2.0.3: - cmpl $0, %edx - jl .L_2TAG_PACKET_5.0.3 - mulsd %xmm4, %xmm0 - subsd %xmm5, %xmm7 - addsd %xmm7, %xmm0 - addsd %xmm3, %xmm0 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_5.0.3: - mulsd %xmm4, %xmm0 - addsd %xmm7, %xmm0 - addsd %xmm3, %xmm0 - subsd %xmm5, %xmm0 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_1.0.3: - movl 132(%esp), %ecx - addsd %xmm0, %xmm1 - unpckhpd %xmm0, %xmm0 - addsd %xmm1, %xmm0 - cmpl $0, %ecx - jl .L_2TAG_PACKET_6.0.3 - fstcw 24(%esp) - movzwl 24(%esp), %edx - orl $768, %edx - movw %dx, 28(%esp) - fldcw 28(%esp) - movl %eax, %edx - sarl $1, %eax - subl %eax, %edx - movdqa (%ebx), %xmm6 - pandn %xmm2, %xmm6 - addl $1023, %eax - movd %eax, %xmm3 - psllq $52, %xmm3 - orpd %xmm3, %xmm6 - mulsd %xmm3, %xmm4 - movsd %xmm0, 8(%esp) - fldl 8(%esp) - movsd %xmm6, 16(%esp) - fldl 16(%esp) - movsd %xmm4, 16(%esp) - fldl 16(%esp) - addl $1023, %edx - movd %edx, %xmm4 - psllq $52, %xmm4 - faddp %st, %st(1) - fmul %st, %st(1) - faddp %st, %st(1) - movsd %xmm4, 8(%esp) - fldl 8(%esp) - fmulp %st, %st(1) - fstpl 8(%esp) - movsd 8(%esp), %xmm0 - fldcw 24(%esp) - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl $32752, %ecx - jae .L_2TAG_PACKET_7.0.3 - jmp .L_2TAG_PACKET_4.0.3 - cmpl $-2147483648, %ecx - jb .L_2TAG_PACKET_7.0.3 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_7.0.3: - movl $41, %edx -.L_2TAG_PACKET_8.0.3: - movsd %xmm0, (%esp) - movsd 128(%esp), %xmm0 - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_10.0.3: - cmpl $2146435072, %eax - jae .L_2TAG_PACKET_11.0.3 - movsd 1272(%ebx), %xmm0 - mulsd %xmm0, %xmm0 - movl $41, %edx - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_11.0.3: - movl 132(%esp), %eax - movl 128(%esp), %edx - movl %eax, %ecx - andl $2147483647, %eax - cmpl $2146435072, %eax - ja .L_2TAG_PACKET_12.0.3 - cmpl $0, %edx - jne .L_2TAG_PACKET_12.0.3 - cmpl $0, %ecx - jl .L_2TAG_PACKET_13.0.3 - movsd 1256(%ebx), %xmm0 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_13.0.3: - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_12.0.3: - movsd 128(%esp), %xmm0 - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_14.0.3: - addl $16304, %eax - cmpl $15504, %eax - jb .L_2TAG_PACKET_15.0.3 - movapd 1184(%ebx), %xmm2 - pshufd $68, %xmm0, %xmm1 - movapd 1200(%ebx), %xmm3 - movapd 1216(%ebx), %xmm4 - movsd 1232(%ebx), %xmm5 - mulsd %xmm1, %xmm1 - xorpd %xmm6, %xmm6 - movl $16352, %eax - pinsrw $3, %eax, %xmm6 - mulpd %xmm0, %xmm2 - xorpd %xmm7, %xmm7 - movl $16368, %edx - pinsrw $3, %edx, %xmm7 - addpd %xmm3, %xmm2 - mulsd %xmm1, %xmm5 - pshufd $228, %xmm1, %xmm3 - mulpd %xmm1, %xmm1 - mulsd %xmm0, %xmm6 - mulpd %xmm0, %xmm2 - addpd %xmm4, %xmm2 - movapd %xmm7, %xmm4 - addsd %xmm6, %xmm7 - mulpd %xmm3, %xmm1 - psrlq $27, %xmm7 - psllq $27, %xmm7 - movsd 1288(%ebx), %xmm3 - subsd %xmm7, %xmm4 - mulpd %xmm1, %xmm2 - addsd %xmm4, %xmm6 - pshufd $238, %xmm2, %xmm1 - addsd %xmm2, %xmm6 - andpd %xmm0, %xmm3 - movapd %xmm0, %xmm4 - addsd %xmm6, %xmm1 - subsd %xmm3, %xmm0 - addsd %xmm5, %xmm1 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm0 - mulsd %xmm1, %xmm4 - addsd %xmm4, %xmm0 - addsd %xmm3, %xmm0 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_15.0.3: - cmpl $16, %eax - jae .L_2TAG_PACKET_3.0.3 - movapd %xmm0, %xmm2 - movd %xmm0, %eax - psrlq $31, %xmm2 - movd %xmm2, %ecx - orl %ecx, %eax - je .L_2TAG_PACKET_3.0.3 - movl $16, %edx - xorpd %xmm1, %xmm1 - pinsrw $3, %edx, %xmm1 - mulsd %xmm1, %xmm1 - movl $42, %edx - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_0.0.3: - cmpl $0, %eax - jl .L_2TAG_PACKET_14.0.3 - movl 132(%esp), %eax - cmpl $1083179008, %eax - jge .L_2TAG_PACKET_10.0.3 - cmpl $-1048576, %eax - jae .L_2TAG_PACKET_11.0.3 -.L_2TAG_PACKET_6.0.3: - xorpd %xmm0, %xmm0 - movl $49136, %eax - pinsrw $3, %eax, %xmm0 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_4.0.3: - movsd %xmm0, 48(%esp) - fldl 48(%esp) -.L_2TAG_PACKET_9.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type expm1,@function - .size expm1,.-expm1 - .data -# -- End expm1 - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 4293918720 - .long 0 - .long 4293918720 - .long 4294967232 - .long 0 - .long 4294967232 - .long 0 - .long 65472 - .long 0 - .long 65472 - .long 0 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 1697350398 - .long 1079448903 - .long 1697350398 - .long 1079448903 - .long 4277796864 - .long 1065758274 - .long 4277796864 - .long 1065758274 - .long 3164486458 - .long 1025308570 - .long 3164486458 - .long 1025308570 - .long 1963358694 - .long 1065423121 - .long 1431655765 - .long 1069897045 - .long 1431655765 - .long 1067799893 - .long 0 - .long 1071644672 - .long 381774871 - .long 1062650220 - .long 381774871 - .long 1062650220 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1000070955 - .long 1042145304 - .long 1040187392 - .long 11418 - .long 988267849 - .long 1039500660 - .long 3539992576 - .long 22960 - .long 36755401 - .long 1042114290 - .long 402653184 - .long 34629 - .long 3634769483 - .long 1042178627 - .long 1820327936 - .long 46424 - .long 2155991225 - .long 1041560680 - .long 847249408 - .long 58348 - .long 2766913307 - .long 1039293264 - .long 3489660928 - .long 70401 - .long 3651174602 - .long 1040488175 - .long 2927624192 - .long 82586 - .long 3073892131 - .long 1042240606 - .long 1006632960 - .long 94904 - .long 1328391742 - .long 1042019037 - .long 3942645760 - .long 107355 - .long 2650893825 - .long 1041903210 - .long 822083584 - .long 119943 - .long 2397289153 - .long 1041802037 - .long 2281701376 - .long 132667 - .long 430997175 - .long 1042110606 - .long 1845493760 - .long 145530 - .long 1230936525 - .long 1041801015 - .long 1702887424 - .long 158533 - .long 740675935 - .long 1040178913 - .long 4110417920 - .long 171677 - .long 3489810261 - .long 1041825986 - .long 2793406464 - .long 184965 - .long 2532600530 - .long 1040767882 - .long 167772160 - .long 198398 - .long 3542557060 - .long 1041827263 - .long 2986344448 - .long 211976 - .long 1401563777 - .long 1041061093 - .long 922746880 - .long 225703 - .long 3129406026 - .long 1041852413 - .long 880803840 - .long 239579 - .long 900993572 - .long 1039283234 - .long 1275068416 - .long 253606 - .long 2115029358 - .long 1042140042 - .long 562036736 - .long 267786 - .long 1086643152 - .long 1041785419 - .long 1610612736 - .long 282120 - .long 82864366 - .long 1041256244 - .long 3045064704 - .long 296610 - .long 2392968152 - .long 1040913683 - .long 3573547008 - .long 311258 - .long 2905856183 - .long 1040002214 - .long 1988100096 - .long 326066 - .long 3742008261 - .long 1040011137 - .long 1451229184 - .long 341035 - .long 863393794 - .long 1040880621 - .long 914358272 - .long 356167 - .long 1446136837 - .long 1041372426 - .long 3707764736 - .long 371463 - .long 927855201 - .long 1040617636 - .long 360710144 - .long 386927 - .long 1492679939 - .long 1041050306 - .long 2952790016 - .long 402558 - .long 608827001 - .long 1041582217 - .long 2181038080 - .long 418360 - .long 606260204 - .long 1042271987 - .long 1711276032 - .long 434334 - .long 3163044019 - .long 1041843851 - .long 1006632960 - .long 450482 - .long 4148747325 - .long 1041962972 - .long 3900702720 - .long 466805 - .long 802924201 - .long 1041275378 - .long 1442840576 - .long 483307 - .long 3052749833 - .long 1041940577 - .long 1937768448 - .long 499988 - .long 2216116399 - .long 1041486744 - .long 914358272 - .long 516851 - .long 2729697836 - .long 1041445764 - .long 2566914048 - .long 533897 - .long 540608356 - .long 1041310907 - .long 2600468480 - .long 551129 - .long 2916344493 - .long 1040535661 - .long 1107296256 - .long 568549 - .long 731391814 - .long 1039497014 - .long 2566914048 - .long 586158 - .long 1024722704 - .long 1041461625 - .long 2961178624 - .long 603959 - .long 3806831748 - .long 1041732499 - .long 2675965952 - .long 621954 - .long 238953304 - .long 1040316488 - .long 2189426688 - .long 640145 - .long 749123235 - .long 1041725785 - .long 2063597568 - .long 658534 - .long 1168187977 - .long 1041175214 - .long 2986344448 - .long 677123 - .long 3506096399 - .long 1042186095 - .long 1426063360 - .long 695915 - .long 1470221620 - .long 1041675499 - .long 2566914048 - .long 714911 - .long 3182425146 - .long 1041483134 - .long 3087007744 - .long 734114 - .long 3131698208 - .long 1042208657 - .long 4068474880 - .long 753526 - .long 2300504125 - .long 1041428596 - .long 2415919104 - .long 773150 - .long 2290297931 - .long 1037388400 - .long 3716153344 - .long 792987 - .long 3532148223 - .long 1041626194 - .long 771751936 - .long 813041 - .long 1161884404 - .long 1042015258 - .long 3699376128 - .long 833312 - .long 876383176 - .long 1037968878 - .long 1241513984 - .long 853805 - .long 3379986796 - .long 1042213153 - .long 3699376128 - .long 874520 - .long 1545797737 - .long 1041681569 - .long 58720256 - .long 895462 - .long 2925146801 - .long 1042212567 - .long 855638016 - .long 916631 - .long 1316627971 - .long 1038516204 - .long 3883925504 - .long 938030 - .long 3267869137 - .long 1040337004 - .long 2726297600 - .long 959663 - .long 3720868999 - .long 1041782409 - .long 3992977408 - .long 981531 - .long 433316142 - .long 1041994064 - .long 1526726656 - .long 1003638 - .long 781232103 - .long 1040093400 - .long 2172649472 - .long 1025985 - .long 2773927732 - .long 1053236707 - .long 381774871 - .long 1062650220 - .long 379653899 - .long 1056571845 - .long 286331153 - .long 1065423121 - .long 436314138 - .long 1059717536 - .long 1431655765 - .long 1067799893 - .long 1431655765 - .long 1069897045 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 4294967295 - .long 2146435071 - .long 0 - .long 1048576 - .long 4227858432 - .long 4294967295 - .type static_const_table,@object - .size static_const_table,1296 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1f_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1f_wmt.S deleted file mode 100644 index 72ccdac276..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1f_wmt.S +++ /dev/null @@ -1,808 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expm1f_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin expm1f - .text - .align 16,0x90 - .globl expm1f -expm1f: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %ecx - movsd 2112(%ebx), %xmm3 - xorpd %xmm7, %xmm7 - movl $17208, %eax - pinsrw $3, %eax, %xmm7 - cvtps2pd %xmm0, %xmm1 - movl %ecx, %edx - andl $2147483647, %ecx - subl $1043662067, %ecx - cmpl $74990712, %ecx - jae .L_2TAG_PACKET_0.0.3 - movsd 2096(%ebx), %xmm6 - mulsd %xmm1, %xmm3 - movapd %xmm7, %xmm2 - xorpd %xmm1, %xmm1 - addsd %xmm3, %xmm7 - movsd 2104(%ebx), %xmm5 - movd %xmm7, %eax - subsd %xmm7, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - xorpd %xmm4, %xmm4 - movl %eax, %ecx - andl $255, %eax - movsd (%ebx,%eax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - subsd %xmm1, %xmm0 - cvtpd2ps %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - addl $1043662067, %ecx - cmpl $1043662067, %ecx - jb .L_2TAG_PACKET_2.0.3 - cmpl $0, %edx - jl .L_2TAG_PACKET_3.0.3 - cmpl $1124073472, %ecx - jae .L_2TAG_PACKET_4.0.3 - movsd 2096(%ebx), %xmm6 - mulsd %xmm1, %xmm3 - movapd %xmm7, %xmm2 - xorpd %xmm1, %xmm1 - addsd %xmm3, %xmm7 - movsd 2104(%ebx), %xmm5 - movd %xmm7, %eax - subsd %xmm7, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - xorpd %xmm4, %xmm4 - movl %eax, %ecx - andl $255, %eax - movsd (%ebx,%eax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - movd %xmm0, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_4.0.3: - cmpl $2139095040, %ecx - jae .L_2TAG_PACKET_6.0.3 - movl $2130706432, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 -.L_2TAG_PACKET_5.0.3: - movl $43, %edx -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_2.0.3: - cmpl $855638016, %ecx - jb .L_2TAG_PACKET_9.0.3 - cmpl $998244352, %ecx - jb .L_2TAG_PACKET_10.0.3 - movapd 2048(%ebx), %xmm2 - pshufd $68, %xmm1, %xmm0 - pshufd $68, %xmm1, %xmm1 - movapd 2064(%ebx), %xmm4 - mulpd %xmm0, %xmm2 - mulpd %xmm1, %xmm1 - pshufd $68, %xmm0, %xmm7 - addpd %xmm4, %xmm2 - movapd 2080(%ebx), %xmm6 - mulsd %xmm1, %xmm7 - mulpd %xmm0, %xmm2 - mulsd %xmm7, %xmm1 - addpd %xmm6, %xmm2 - mulpd %xmm1, %xmm2 - pshufd $238, %xmm2, %xmm3 - addsd %xmm3, %xmm2 - addsd %xmm2, %xmm0 - cvtpd2ps %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_10.0.3: - movl $1042983595, %eax - movd %eax, %xmm2 - movss %xmm0, %xmm1 - movl $1056964608, %edx - movd %edx, %xmm3 - mulss %xmm0, %xmm2 - mulss %xmm1, %xmm1 - addss %xmm3, %xmm2 - mulss %xmm1, %xmm2 - addss %xmm2, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_9.0.3: - cmpl $8388608, %ecx - jb .L_2TAG_PACKET_11.0.3 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_11.0.3: - cmpl $0, %ecx - je .L_2TAG_PACKET_1.0.3 - movl $8388608, %eax - movd %eax, %xmm2 - mulss %xmm2, %xmm2 - movl $44, %edx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $2139095040, %ecx - ja .L_2TAG_PACKET_6.0.3 - movl $-1082130432, %edx - movd %edx, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_6.0.3: - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_1.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type expm1f,@function - .size expm1f,.-expm1f - .data -# -- End expm1f - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 4200250559 - .long 1072696090 - .long 2851812149 - .long 1072698941 - .long 339411585 - .long 1072701800 - .long 1048019041 - .long 1072704666 - .long 772914124 - .long 1072707540 - .long 3899555717 - .long 1072710421 - .long 1928746161 - .long 1072713311 - .long 3541402996 - .long 1072716208 - .long 238821257 - .long 1072719114 - .long 702412510 - .long 1072722027 - .long 728934454 - .long 1072724948 - .long 410360776 - .long 1072727877 - .long 4133881824 - .long 1072730813 - .long 3402036099 - .long 1072733758 - .long 2602514713 - .long 1072736711 - .long 1828292879 - .long 1072739672 - .long 1172597893 - .long 1072742641 - .long 728909815 - .long 1072745618 - .long 590962156 - .long 1072748603 - .long 852742562 - .long 1072751596 - .long 1608493509 - .long 1072754597 - .long 2952712987 - .long 1072757606 - .long 685187902 - .long 1072760624 - .long 3490863953 - .long 1072763649 - .long 2875075254 - .long 1072766683 - .long 3228316108 - .long 1072769725 - .long 351405227 - .long 1072772776 - .long 2930322912 - .long 1072775834 - .long 2471440686 - .long 1072778901 - .long 3366293073 - .long 1072781976 - .long 1416741826 - .long 1072785060 - .long 1014845819 - .long 1072788152 - .long 2257959872 - .long 1072791252 - .long 948735466 - .long 1072794361 - .long 1480023343 - .long 1072797478 - .long 3949972341 - .long 1072800603 - .long 4162030108 - .long 1072803737 - .long 2214878420 - .long 1072806880 - .long 2502433899 - .long 1072810031 - .long 828946858 - .long 1072813191 - .long 1588871207 - .long 1072816359 - .long 586995997 - .long 1072819536 - .long 2218315341 - .long 1072822721 - .long 2288159958 - .long 1072825915 - .long 897099801 - .long 1072829118 - .long 2440944790 - .long 1072832329 - .long 2725843665 - .long 1072835549 - .long 1853186616 - .long 1072838778 - .long 4219606026 - .long 1072842015 - .long 1337108031 - .long 1072845262 - .long 1897844341 - .long 1072848517 - .long 1709341917 - .long 1072851781 - .long 874372905 - .long 1072855054 - .long 3790955393 - .long 1072858335 - .long 1972484976 - .long 1072861626 - .long 4112506593 - .long 1072864925 - .long 1724976915 - .long 1072868234 - .long 3504003472 - .long 1072871551 - .long 964107055 - .long 1072874878 - .long 2799960843 - .long 1072878213 - .long 526652809 - .long 1072881558 - .long 2839424854 - .long 1072884911 - .long 1253935211 - .long 1072888274 - .long 171030293 - .long 1072891646 - .long 3991843581 - .long 1072895026 - .long 4232894513 - .long 1072898416 - .long 1000925746 - .long 1072901816 - .long 2992903935 - .long 1072905224 - .long 1726216749 - .long 1072908642 - .long 1603444721 - .long 1072912069 - .long 2732492859 - .long 1072915505 - .long 926591435 - .long 1072918951 - .long 589198666 - .long 1072922406 - .long 1829099622 - .long 1072925870 - .long 460407023 - .long 1072929344 - .long 887463927 - .long 1072932827 - .long 3219942644 - .long 1072936319 - .long 3272845541 - .long 1072939821 - .long 1156440435 - .long 1072943333 - .long 1276261410 - .long 1072946854 - .long 3743175029 - .long 1072950384 - .long 78413852 - .long 1072953925 - .long 3278348324 - .long 1072957474 - .long 569847338 - .long 1072961034 - .long 654919306 - .long 1072964603 - .long 3645941911 - .long 1072968181 - .long 1065662932 - .long 1072971770 - .long 1617004845 - .long 1072975368 - .long 1118294578 - .long 1072978976 - .long 3978100823 - .long 1072982593 - .long 1720398391 - .long 1072986221 - .long 3049340112 - .long 1072989858 - .long 3784486610 - .long 1072993505 - .long 4040676318 - .long 1072997162 - .long 3933059031 - .long 1073000829 - .long 3577096743 - .long 1073004506 - .long 3088564500 - .long 1073008193 - .long 2583551245 - .long 1073011890 - .long 2178460671 - .long 1073015597 - .long 1990012071 - .long 1073019314 - .long 2135241198 - .long 1073023041 - .long 2731501122 - .long 1073026778 - .long 3896463087 - .long 1073030525 - .long 1453150082 - .long 1073034283 - .long 4109806887 - .long 1073038050 - .long 3395129871 - .long 1073041828 - .long 3723038930 - .long 1073045616 - .long 917841882 - .long 1073049415 - .long 3689071823 - .long 1073053223 - .long 3566716925 - .long 1073057042 - .long 671025100 - .long 1073060872 - .long 3712504873 - .long 1073064711 - .long 4222122499 - .long 1073068561 - .long 2321106615 - .long 1073072422 - .long 2425981843 - .long 1073076293 - .long 363667784 - .long 1073080175 - .long 551349105 - .long 1073084067 - .long 3111574537 - .long 1073087969 - .long 3872257780 - .long 1073091882 - .long 2956612997 - .long 1073095806 - .long 488188413 - .long 1073099741 - .long 885834528 - .long 1073103686 - .long 4273770423 - .long 1073107641 - .long 2186617381 - .long 1073111608 - .long 3339203574 - .long 1073115585 - .long 3561793907 - .long 1073119573 - .long 2979960120 - .long 1073123572 - .long 1719614413 - .long 1073127582 - .long 4201977662 - .long 1073131602 - .long 1963711167 - .long 1073135634 - .long 3721688645 - .long 1073139676 - .long 1013258799 - .long 1073143730 - .long 2555984613 - .long 1073147794 - .long 4182873220 - .long 1073151869 - .long 1727278727 - .long 1073155956 - .long 3907805044 - .long 1073160053 - .long 2263535754 - .long 1073164162 - .long 1218806132 - .long 1073168282 - .long 903334909 - .long 1073172413 - .long 1447192521 - .long 1073176555 - .long 2980802057 - .long 1073180708 - .long 1339972927 - .long 1073184873 - .long 950803702 - .long 1073189049 - .long 1944781191 - .long 1073193236 - .long 158781403 - .long 1073197435 - .long 19972402 - .long 1073201645 - .long 1660913392 - .long 1073205866 - .long 919555682 - .long 1073210099 - .long 2224145553 - .long 1073214343 - .long 1413356050 - .long 1073218599 - .long 2916157145 - .long 1073222866 - .long 2571947539 - .long 1073227145 - .long 515457527 - .long 1073231436 - .long 1176749997 - .long 1073235738 - .long 396319521 - .long 1073240052 - .long 2604962541 - .long 1073244377 - .long 3643909174 - .long 1073248714 - .long 3649726105 - .long 1073253063 - .long 2759350287 - .long 1073257424 - .long 1110089947 - .long 1073261797 - .long 3134592888 - .long 1073266181 - .long 380978316 - .long 1073270578 - .long 1577608921 - .long 1073274986 - .long 2568320822 - .long 1073279406 - .long 3492293770 - .long 1073283838 - .long 194117574 - .long 1073288283 - .long 1403662306 - .long 1073292739 - .long 2966275557 - .long 1073297207 - .long 727685349 - .long 1073301688 - .long 3418903055 - .long 1073306180 - .long 2591453363 - .long 1073310685 - .long 2682146384 - .long 1073315202 - .long 3833209506 - .long 1073319731 - .long 1892288442 - .long 1073324273 - .long 1297350157 - .long 1073328827 - .long 2191782032 - .long 1073333393 - .long 424392917 - .long 1073337972 - .long 434316067 - .long 1073342563 - .long 2366108318 - .long 1073347166 - .long 2069751141 - .long 1073351782 - .long 3985553595 - .long 1073356410 - .long 3964284211 - .long 1073361051 - .long 2152073944 - .long 1073365705 - .long 2990417245 - .long 1073370371 - .long 2331271250 - .long 1073375050 - .long 321958744 - .long 1073379742 - .long 1405169241 - .long 1073384446 - .long 1434058175 - .long 1073389163 - .long 557149882 - .long 1073393893 - .long 3218338682 - .long 1073398635 - .long 977020788 - .long 1073403391 - .long 2572866477 - .long 1073408159 - .long 3861050111 - .long 1073412940 - .long 697153126 - .long 1073417735 - .long 1822067026 - .long 1073422542 - .long 3092190715 - .long 1073427362 - .long 364333489 - .long 1073432196 - .long 2380618042 - .long 1073437042 - .long 703710506 - .long 1073441902 - .long 4076559943 - .long 1073446774 - .long 4062661092 - .long 1073451660 - .long 815859274 - .long 1073456560 - .long 3080351519 - .long 1073461472 - .long 2420883922 - .long 1073466398 - .long 3287523847 - .long 1073471337 - .long 1540824585 - .long 1073476290 - .long 1631695677 - .long 1073481256 - .long 3716502172 - .long 1073486235 - .long 3657065772 - .long 1073491228 - .long 1610600570 - .long 1073496235 - .long 2029714210 - .long 1073501255 - .long 777507147 - .long 1073506289 - .long 2307442995 - .long 1073511336 - .long 2483480501 - .long 1073516397 - .long 1464976603 - .long 1073521472 - .long 3706687593 - .long 1073526560 - .long 778901109 - .long 1073531663 - .long 1432208378 - .long 1073536779 - .long 1532734324 - .long 1073541909 - .long 1242007932 - .long 1073547053 - .long 721996136 - .long 1073552211 - .long 135105010 - .long 1073557383 - .long 3939148246 - .long 1073562568 - .long 3707479175 - .long 1073567768 - .long 3898795731 - .long 1073572982 - .long 382305176 - .long 1073578211 - .long 1912561781 - .long 1073583453 - .long 64696965 - .long 1073588710 - .long 3594158869 - .long 1073593980 - .long 4076975200 - .long 1073599265 - .long 1679558232 - .long 1073604565 - .long 863738719 - .long 1073609879 - .long 1796832535 - .long 1073615207 - .long 351641897 - .long 1073620550 - .long 991358482 - .long 1073625907 - .long 3884662774 - .long 1073631278 - .long 610758006 - .long 1073636665 - .long 4224142467 - .long 1073642065 - .long 2009970496 - .long 1073647481 - .long 2728693978 - .long 1073652911 - .long 2256325230 - .long 1073658356 - .long 764307441 - .long 1073663816 - .long 2719515920 - .long 1073669290 - .long 3999357479 - .long 1073674779 - .long 481706282 - .long 1073680284 - .long 929806999 - .long 1073685803 - .long 1222472308 - .long 1073691337 - .long 1533953344 - .long 1073696886 - .long 2038973688 - .long 1073702450 - .long 2912730644 - .long 1073708029 - .long 35929225 - .long 1073713624 - .long 2174652632 - .long 1073719233 - .long 915592468 - .long 1073724858 - .long 730821105 - .long 1073730498 - .long 1797923801 - .long 1073736153 - .long 436314138 - .long 1059717536 - .long 1431655765 - .long 1067799893 - .long 872628277 - .long 1062650688 - .long 1431655765 - .long 1069897045 - .long 286331153 - .long 1065423121 - .long 0 - .long 1071644672 - .long 4286760334 - .long 1053736893 - .long 4277826245 - .long 1063661122 - .long 1697350398 - .long 1081546055 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,2136 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1l.S deleted file mode 100644 index f10c63d328..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/expm1l.S +++ /dev/null @@ -1,1235 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expm1l.c" - .text -..TXTST0: -# -- Begin expm1l - .text - .align 16,0x90 - .globl expm1l -expm1l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $68, %esp -..B1.2: - fnstcw 58(%esp) -..B1.3: - movzwl 16(%ebp), %ebx - andl $32767, %ebx - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $16389, %ebx - jge ..B1.55 -..B1.4: - movzwl 58(%esp), %eax - cmpl $16381, %ebx - jge ..B1.45 -..B1.5: - cmpl $16370, %ebx - jge ..B1.38 -..B1.6: - cmpl $16359, %ebx - jge ..B1.31 -..B1.7: - cmpl $16345, %ebx - jge ..B1.24 -..B1.8: - cmpl $16308, %ebx - jge ..B1.18 -..B1.9: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.88 -..B1.10: - orl $-64768, %eax - movw %ax, 56(%esp) -..B1.11: - fldcw 56(%esp) -..B1.12: - movzwl 16(%ebp), %ebx - movl $1, %edx - andl $32767, %ebx -..B1.13: - testl %ebx, %ebx - jle ..B1.84 -..B1.14: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ecx) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fmul %st(1), %st - fxch %st(1) - fmull ones@GOTOFF(%ecx,%eax,8) - faddp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ecx) - fstpt 16(%esp) -..B1.15: - testl %edx, %edx - je ..B1.17 -..B1.16: - fldcw 58(%esp) -..B1.17: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.89 -..B1.19: - orl $-64768, %eax - movw %ax, 56(%esp) -..B1.20: - fldcw 56(%esp) -..B1.21: - fldt 8(%ebp) - fldt _Q3@GOTOFF(%ecx) - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) -..B1.22: - fldcw 58(%esp) -..B1.23: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.24: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.90 -..B1.25: - orl $-64768, %eax - movw %ax, 56(%esp) -..B1.26: - fldcw 56(%esp) -..B1.27: - movl $1, %eax -..B1.28: - fldt 8(%ebp) - testl %eax, %eax - fldt 12+_Q2@GOTOFF(%ecx) - fmul %st(1), %st - fmul %st(1), %st - fldt _Q2@GOTOFF(%ecx) - fmul %st(2), %st - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.30 -..B1.29: - fldcw 58(%esp) -..B1.30: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.91 -..B1.32: - orl $-64768, %eax - movw %ax, 56(%esp) -..B1.33: - fldcw 56(%esp) -..B1.34: - movl $1, %eax -..B1.35: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%ecx) - fmul %st(1), %st - fldt 12+_Q1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%ecx) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.37 -..B1.36: - fldcw 58(%esp) -..B1.37: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.92 -..B1.39: - orl $-64768, %eax - movw %ax, 56(%esp) -..B1.40: - fldcw 56(%esp) -..B1.41: - movl $1, %eax -..B1.42: - fldl _TWO_54H@GOTOFF(%ecx) - testl %eax, %eax - fld %st(0) - fldt 8(%ebp) - fld %st(0) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 16(%esp) - fldt 16(%esp) - fsubp %st, %st(3) - fsub %st(2), %st - fld %st(1) - fmul %st(2), %st - fldt 156+_Q@GOTOFF(%ecx) - fmul %st(1), %st - fldt 144+_Q@GOTOFF(%ecx) - fmul %st(2), %st - fldt 132+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_Q@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fld %st(4) - fmul %st(3), %st - fld %st(4) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(5) - fldt _Q@GOTOFF(%ecx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(3) - fld %st(5) - fmul %st(6), %st - fmul %st, %st(2) - fld %st(4) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(2) - fldt 192+_Q@GOTOFF(%ecx) - fmul %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fld %st(3) - fldt 180+_Q@GOTOFF(%ecx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(2) - fldt 168+_Q@GOTOFF(%ecx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - fmulp %st, %st(2) - fldt 8(%ebp) - fld %st(0) - fadd %st(4), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fsubr %st, %st(1) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%esp) - je ..B1.44 -..B1.43: - fldt 16(%esp) - fstpt 44(%esp) -..B1.103: - fldcw 58(%esp) -..B1.44: - fldt 32(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.93 -..B1.46: - orl $-64768, %eax - movw %ax, 56(%esp) -..B1.47: - fldcw 56(%esp) -..B1.48: - movl $1, %eax -..B1.49: - fldl _TWO_63H@GOTOFF(%ecx) - fldt 8(%ebp) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st(1), %st - fadd %st(2), %st - fstpt 44(%esp) - fldt 44(%esp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmul %st(2), %st - movl 44(%esp), %edx - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%ecx) - fmulp %st, %st(2) - fld %st(0) - movsbl %dl, %ebx - fsub %st(2), %st - fldl _TWO_32H@GOTOFF(%ecx) - subl %ebx, %edx - shll $4, %ebx - fadd %st, %st(1) - shrl $8, %edx - fsubr %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - shll $23, %edx - fxch %st(4) - fsubrp %st, %st(3) - addl $1065353216, %edx - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%ecx) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%ecx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ecx) - movl %edx, 12(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmul %st(2), %st - fldt 12+_P@GOTOFF(%ecx) - movzbl 17(%ebp), %edx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - andl $128, %edx - fmulp %st, %st(3) - shrl $7, %edx - faddp %st, %st(2) - fldt _P@GOTOFF(%ecx) - testl %edx, %edx - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fldl 2056+__libm_expl_table_256@GOTOFF(%ecx,%ebx) - fldl 2048+__libm_expl_table_256@GOTOFF(%ecx,%ebx) - fld %st(0) - fmul %st(4), %st - fxch %st(4) - fadd %st(5), %st - fmul %st(2), %st - faddp %st, %st(4) - fmul %st, %st(4) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - flds 12(%esp) - fmul %st, %st(3) - fmulp %st, %st(2) - je ..B1.51 -..B1.50: - fldt .L_2il0floatpacket.4@GOTOFF(%ecx) - fadd %st(3), %st - fstpt 16(%esp) - fldt 16(%esp) - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - faddp %st, %st(1) - fsubp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(1) - jmp ..B1.52 -..B1.51: - movzwl 16(%ebp), %esi - shll $15, %edx - andl $32767, %esi - orl %esi, %edx - shll $16, %edx - movzwl 14(%ebp), %edi - orl %edi, %edx - cmpl $1074049228, %edx - movl $0, %edx - setb %dl - fldl zero_one@GOTOFF(%ecx,%edx,8) - xorl $1, %edx - fsubrp %st, %st(3) - fxch %st(2) - fstpt 16(%esp) - fsubl zero_one@GOTOFF(%ecx,%edx,8) -..B1.52: - fldt 16(%esp) - testl %eax, %eax - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.107 -..B1.53: - fstpt 44(%esp) -..B1.104: - fldcw 58(%esp) - jmp ..B1.54 -..B1.107: - fstp %st(0) -..B1.54: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.55: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %eax - movzwl 8+_ranges@GOTOFF(%eax,%ecx), %esi - andl $32767, %esi - cmpl %esi, %ebx - jl ..B1.60 -..B1.56: - jne ..B1.74 -..B1.57: - movl 12(%ebp), %esi - cmpl 4+_ranges@GOTOFF(%eax,%ecx), %esi - jb ..B1.60 -..B1.58: - jne ..B1.74 -..B1.59: - movl 8(%ebp), %esi - cmpl _ranges@GOTOFF(%eax,%ecx), %esi - jae ..B1.74 -..B1.60: - movzwl 58(%esp), %esi - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.94 -..B1.61: - orl $-64768, %esi - movw %si, 56(%esp) -..B1.62: - fldcw 56(%esp) -..B1.63: - movzwl 16(%ebp), %ebx - movl $1, %edi - andl $32767, %ebx -..B1.64: - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - cmpl $16396, %ebx - movzwl 8+.L_2il0floatpacket.3@GOTOFF(%ecx), %esi - movl %esi, 40(%esp) - fstpt 28(%esp) - fldt 28(%esp) - fldl _TWO_63H@GOTOFF(%ecx) - fldt 8(%ebp) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st(1), %st - fadd %st(2), %st - fstpt 44(%esp) - fldt 44(%esp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmul %st(2), %st - movl 44(%esp), %eax - fsubrp %st, %st(1) - fld %st(0) - fldt .L_2il0floatpacket.2@GOTOFF(%ecx) - fmulp %st, %st(3) - fsub %st(2), %st - fldl _TWO_32H@GOTOFF(%ecx) - movsbl %al, %esi - fadd %st, %st(1) - fsubr %st(1), %st - fsubr %st, %st(2) - fxch %st(3) - fsubrp %st, %st(2) - jge ..B1.71 -..B1.65: - fldt 48+_P@GOTOFF(%ecx) - fxch %st(1) - fstpt 16(%esp) - fld %st(2) - fadd %st(2), %st - fld %st(0) - subl %esi, %eax - fmul %st(1), %st - fmul %st, %st(2) - fldt 36+_P@GOTOFF(%ecx) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%ecx) - shll $4, %esi - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fmul %st, %st(3) - fldt 12+_P@GOTOFF(%ecx) - shrl $8, %eax - faddp %st, %st(2) - fmul %st, %st(1) - addl $16383, %eax - fxch %st(2) - fmulp %st, %st(1) - andl $32767, %eax - movl %edi, 12(%esp) - faddp %st, %st(2) - fldt _P@GOTOFF(%ecx) - fmulp %st, %st(1) - movl 40(%esp), %edi - faddp %st, %st(1) - andl $-32768, %edi - faddp %st, %st(1) - fldl 2048+__libm_expl_table_256@GOTOFF(%ecx,%esi) - orl %eax, %edi - fld %st(0) - testl %edx, %edx - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fld %st(0) - movw %di, 36(%esp) - fadd %st(4), %st - movl 12(%esp), %edi - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fldt 28(%esp) - fmul %st, %st(4) - fxch %st(2) - fmull 2056+__libm_expl_table_256@GOTOFF(%ecx,%esi) - faddp %st, %st(3) - faddl 2056+__libm_expl_table_256@GOTOFF(%ecx,%esi) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt 16(%esp) - je ..B1.67 -..B1.66: - fldt .L_2il0floatpacket.4@GOTOFF(%ecx) - fadd %st(3), %st - fstpt 16(%esp) - fldt 16(%esp) - faddp %st, %st(4) - fxch %st(2) - fsubrp %st, %st(3) - fsubp %st, %st(2) - fxch %st(1) - jmp ..B1.68 -..B1.67: - fstp %st(3) - movzbl 17(%ebp), %eax - xorl %edx, %edx - shrl $7, %eax - shll $15, %eax - orl %ebx, %eax - shll $16, %eax - movzwl 14(%ebp), %esi - orl %esi, %eax - cmpl $1074049228, %eax - setb %dl - fldl zero_one@GOTOFF(%ecx,%edx,8) - xorl $1, %edx - fsubrp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fsubl zero_one@GOTOFF(%ecx,%edx,8) -..B1.68: - fldt 16(%esp) - testl %edi, %edi - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.108 -..B1.69: - fstpt 44(%esp) -..B1.105: - fldcw 58(%esp) - jmp ..B1.70 -..B1.108: - fstp %st(0) -..B1.70: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.71: - fstp %st(3) - fldt 48+_P@GOTOFF(%ecx) - fld %st(2) - fadd %st(2), %st - fld %st(0) - subl %esi, %eax - fmul %st(1), %st - fmul %st, %st(2) - fldt 36+_P@GOTOFF(%ecx) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%ecx) - shll $4, %esi - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fmul %st, %st(3) - fldt 12+_P@GOTOFF(%ecx) - shrl $8, %eax - faddp %st, %st(2) - fmul %st, %st(1) - addl $8191, %eax - fxch %st(2) - fmulp %st, %st(1) - andl $32767, %eax - movzwl 36(%esp), %edx - faddp %st, %st(2) - fldt _P@GOTOFF(%ecx) - andl $-32768, %edx - fmulp %st, %st(1) - orl %eax, %edx - movw %dx, 36(%esp) - testl %edi, %edi - faddp %st, %st(1) - faddp %st, %st(1) - fldl 2056+__libm_expl_table_256@GOTOFF(%ecx,%esi) - fldl 2048+__libm_expl_table_256@GOTOFF(%ecx,%esi) - fld %st(0) - fmul %st(3), %st - fxch %st(3) - fadd %st(4), %st - fmul %st(2), %st - faddp %st, %st(3) - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 28(%esp) - fmulp %st, %st(1) - fldt _SC2@GOTOFF(%ecx) - fmulp %st, %st(1) - fstpt 16(%esp) - je ..B1.109 -..B1.72: - fstpt 44(%esp) -..B1.106: - fldcw 58(%esp) - jmp ..B1.73 -..B1.109: - fstp %st(0) -..B1.73: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.74: - movzwl 58(%esp), %esi - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.100 -..B1.75: - orl $-64768, %esi - movw %si, 56(%esp) -..B1.76: - fldcw 56(%esp) -..B1.77: - movzwl 16(%ebp), %ebx - movl $1, %eax - andl $32767, %ebx -..B1.78: - cmpl $32767, %ebx - je ..B1.96 -..B1.79: - testl %edx, %edx - je ..B1.95 -..B1.80: - fldt .L_2il0floatpacket.4@GOTOFF(%ecx) - fldt _small_value_80@GOTOFF(%ecx) - faddp %st, %st(1) - fstpt 16(%esp) -..B1.81: - testl %eax, %eax - je ..B1.83 -..B1.82: - fldcw 58(%esp) -..B1.83: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.84: - cmpl $0, 12(%ebp) - jne ..B1.86 -..B1.85: - cmpl $0, 8(%ebp) - je ..B1.87 -..B1.86: - fldt _small_value_80@GOTOFF(%ecx) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fmul %st(0), %st - fstpt (%esp) - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(1) - fmull ones@GOTOFF(%ecx,%eax,8) - faddp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ecx) - fstpt 16(%esp) - jmp ..B1.15 -..B1.87: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.15 -..B1.88: - xorl %edx, %edx - jmp ..B1.13 -..B1.89: - fldt 8(%ebp) - fldt _Q3@GOTOFF(%ecx) - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B1.23 -..B1.90: - xorl %eax, %eax - jmp ..B1.28 -..B1.91: - xorl %eax, %eax - jmp ..B1.35 -..B1.92: - xorl %eax, %eax - jmp ..B1.42 -..B1.93: - xorl %eax, %eax - jmp ..B1.49 -..B1.94: - xorl %edi, %edi - jmp ..B1.64 -..B1.95: - fldt _large_value_80@GOTOFF(%ecx) - fmul %st(0), %st - fstpt 16(%esp) - jmp ..B1.81 -..B1.96: - cmpl $-2147483648, 12(%ebp) - jne ..B1.99 -..B1.97: - cmpl $0, 8(%ebp) - jne ..B1.99 -..B1.98: - fldl _inf_none@GOTOFF(%ecx,%edx,8) - fstpt 16(%esp) - jmp ..B1.81 -..B1.99: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.81 -..B1.100: - xorl %eax, %eax - jmp ..B1.78 - .align 16,0x90 - .type expm1l,@function - .size expm1l,.-expm1l - .data -# -- End expm1l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -zero_one: - .long 0x00000000,0x00000000 - .long 0x00000000,0x3ff00000 - .type zero_one,@object - .size zero_one,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_54H: - .long 0 - .long 1129840640 - .type _TWO_54H,@object - .size _TWO_54H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_inf_none: - .long 0 - .long 2146435072 - .long 0 - .long 3220176896 - .type _inf_none,@object - .size _inf_none,16 - .align 2 -_Q3: - .word 1 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 2731 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 46967 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 65530 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 43687 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 52365 - .word 52428 - .word 43692 - .word 43690 - .word 16378 - .word 0 - .word 56491 - .word 10318 - .word 34954 - .word 34952 - .word 16376 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 39683 - .word 36691 - .word 42743 - .word 55145 - .word 16297 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16370 - .word 0 - .word 43680 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 46686 - .word 2912 - .word 24758 - .word 46603 - .word 16373 - .word 0 - .word 53372 - .word 3328 - .word 208 - .word 53261 - .word 16370 - .word 0 - .word 5395 - .word 3321 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 7401 - .word 46642 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 52768 - .word 7506 - .word 32188 - .word 37874 - .word 16361 - .word 0 - .word 23003 - .word 12485 - .word 11072 - .word 55090 - .word 16357 - .word 0 - .word 3702 - .word 18929 - .word 50035 - .word 36726 - .word 16354 - .word 0 - .word 2630 - .word 23096 - .word 11140 - .word 45202 - .word 16350 - .word 0 - .word 46660 - .word 62794 - .word 49270 - .word 51706 - .word 16346 - .word 0 - .word 61237 - .word 7998 - .word 19059 - .word 55154 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43648 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43648 - .word 16378 - .word 0 - .type _Q,@object - .size _Q,204 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _P,@object - .size _P,60 - .align 2 -_ranges: - .word 31148 - .word 53711 - .word 6135 - .word 45426 - .word 16396 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16389 - .word 0 - .type _ranges,@object - .size _ranges,24 - .align 2 -_SC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .type _SC2,@object - .size _SC2,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabs.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabs.S deleted file mode 100644 index 93c7d46fa0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabs.S +++ /dev/null @@ -1,61 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fabs.c" - .text -..TXTST0: -# -- Begin fabs - .text - .align 16,0x90 - .globl fabs -fabs: -# parameter 1: 4 + %esp -..B1.1: -..L1: - -..B1.2: - fldl 4(%esp) - fabs - ret -..B1.3: - .align 16,0x90 - .type fabs,@function - .size fabs,.-fabs - .data -# -- End fabs - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabsf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabsf.S deleted file mode 100644 index 7cb3dfc071..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabsf.S +++ /dev/null @@ -1,61 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fabsf.c" - .text -..TXTST0: -# -- Begin fabsf - .text - .align 16,0x90 - .globl fabsf -fabsf: -# parameter 1: 4 + %esp -..B1.1: -..L1: - -..B1.2: - flds 4(%esp) - fabs - ret -..B1.3: - .align 16,0x90 - .type fabsf,@function - .size fabsf,.-fabsf - .data -# -- End fabsf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabsl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabsl.S deleted file mode 100644 index 38a16d68ec..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fabsl.S +++ /dev/null @@ -1,121 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fabsl.c" - .text -..TXTST0: -# -- Begin fabsl - .text - .align 16,0x90 - .globl fabsl -fabsl: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - subl $28, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.15 -..B1.4: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.5: - fldcw 12(%esp) -..B1.6: - movl $1, %eax -..B1.7: - movzwl 40(%esp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.12 -..B1.8: - fldt 32(%esp) - movzbl 41(%esp), %ecx - andl $128, %ecx - shrl $7, %ecx - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - fmull ones@GOTOFF(%edx,%ecx,8) - fstpt (%esp) -..B1.9: - testl %eax, %eax - je ..B1.11 -..B1.10: - fldcw 14(%esp) -..B1.11: - fldt (%esp) - addl $28, %esp - ret -..B1.12: - cmpl $-2147483648, 36(%esp) - jne ..B1.14 -..B1.13: - cmpl $0, 32(%esp) - je ..B1.8 -..B1.14: - fldt 32(%esp) - movzbl 41(%esp), %edx - fstpt (%esp) - andl $127, %edx - movb %dl, 9(%esp) - jmp ..B1.9 -..B1.15: - xorl %eax, %eax - jmp ..B1.7 - .align 16,0x90 - .type fabsl,@function - .size fabsl,.-fabsl - .data -# -- End fabsl - .section .rodata, "a" - .align 8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdim_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdim_wmt.S deleted file mode 100644 index 92c666fe59..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdim_wmt.S +++ /dev/null @@ -1,181 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fdim_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin fdim - .text - .align 16,0x90 - .globl fdim -fdim: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - stmxcsr 8(%esp) - movsd 112(%esp), %xmm0 - movsd 120(%esp), %xmm1 - movapd %xmm0, %xmm2 - ucomisd %xmm0, %xmm1 - movl 8(%esp), %eax - jp .L_2TAG_PACKET_0.0.3 - testl $8, %eax - cmpnlesd %xmm1, %xmm0 - andpd %xmm0, %xmm1 - andpd %xmm2, %xmm0 - jne .L_2TAG_PACKET_1.0.3 - subsd %xmm1, %xmm0 - andpd (%ebx), %xmm0 - pextrw $3, %xmm0, %eax - cmpl $32751, %eax - jb .L_2TAG_PACKET_2.0.3 - stmxcsr 12(%esp) - movl 12(%esp), %eax - testl $8, %eax - jne .L_2TAG_PACKET_3.0.3 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - andl $-9, %eax - movl %eax, 12(%esp) - ldmxcsr 12(%esp) - cmpnlesd %xmm1, %xmm0 - andpd %xmm0, %xmm1 - andpd %xmm2, %xmm0 - subsd %xmm1, %xmm0 - andpd (%ebx), %xmm0 - stmxcsr 12(%esp) - movl 12(%esp), %eax - testl $8, %eax - jne .L_2TAG_PACKET_3.0.3 - ldmxcsr 8(%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - fldl 112(%esp) - fldl 120(%esp) - faddp %st, %st(1) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_3.0.3: - movl $196, %edx -.L_2TAG_PACKET_5.0.3: - movsd %xmm0, (%esp) - movsd 112(%esp), %xmm0 - movsd 120(%esp), %xmm1 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 120(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_2.0.3: - movsd %xmm0, 32(%esp) - fldl 32(%esp) -.L_2TAG_PACKET_4.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type fdim,@function - .size fdim,.-fdim - .data -# -- End fdim - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .type static_const_table,@object - .size static_const_table,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdimf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdimf_wmt.S deleted file mode 100644 index b2ac1a5c69..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdimf_wmt.S +++ /dev/null @@ -1,181 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fdimf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin fdimf - .text - .align 16,0x90 - .globl fdimf -fdimf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - stmxcsr 8(%esp) - movss 112(%esp), %xmm0 - movss 116(%esp), %xmm1 - movss %xmm0, %xmm2 - ucomiss %xmm0, %xmm1 - movl 8(%esp), %eax - jp .L_2TAG_PACKET_0.0.3 - testl $8, %eax - cmpnless %xmm1, %xmm0 - andps %xmm0, %xmm1 - andps %xmm2, %xmm0 - jne .L_2TAG_PACKET_1.0.3 - subss %xmm1, %xmm0 - andps (%ebx), %xmm0 - movd %xmm0, %eax - cmpl $2139095039, %eax - jb .L_2TAG_PACKET_2.0.3 - stmxcsr 12(%esp) - movl 12(%esp), %eax - testl $8, %eax - jne .L_2TAG_PACKET_3.0.3 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - andl $-9, %eax - movl %eax, 12(%esp) - ldmxcsr 12(%esp) - cmpnless %xmm1, %xmm0 - andps %xmm0, %xmm1 - andps %xmm2, %xmm0 - subss %xmm1, %xmm0 - andps (%ebx), %xmm0 - stmxcsr 12(%esp) - movl 12(%esp), %eax - testl $8, %eax - jne .L_2TAG_PACKET_3.0.3 - ldmxcsr 8(%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - flds 112(%esp) - flds 116(%esp) - faddp %st, %st(1) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_3.0.3: - movl $196, %edx -.L_2TAG_PACKET_5.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - movss 116(%esp), %xmm1 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 116(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_2.0.3: - movss %xmm0, 32(%esp) - flds 32(%esp) -.L_2TAG_PACKET_4.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type fdimf,@function - .size fdimf,.-fdimf - .data -# -- End fdimf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 2147483647 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdiml.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdiml.S deleted file mode 100644 index 2170a2c478..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fdiml.S +++ /dev/null @@ -1,292 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fdiml.c" - .text -..TXTST0: -# -- Begin fdiml - .text - .align 16,0x90 - .globl fdiml -fdiml: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %edi - pushl %ebx - subl $24, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %ecx - andl $32767, %ecx - movzwl 28(%ebp), %edx - andl $32767, %edx - cmpl $32767, %ecx - je ..B1.39 -..B1.4: - cmpl $32767, %edx - je ..B1.30 -..B1.5: - movzwl 14(%esp), %ebx - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.6: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.7: - fldcw 12(%esp) -..B1.8: - movl $1, %edi -..B1.9: - fldt 20(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fldl _zeros@GOTOFF(%ebx) - fstpt (%esp) - fldt 8(%ebp) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B1.43 -..B1.10: - cmpl $32767, %ecx - je ..B1.14 -..B1.11: - cmpl $32767, %edx - je ..B1.14 -..B1.12: - cmpl $32766, %ecx - je ..B1.26 -..B1.13: - cmpl $32766, %edx - je ..B1.18 -..B1.14: - fsubp %st, %st(1) - fstpt (%esp) - jmp ..B1.15 -..B1.43: - fstp %st(0) - fstp %st(0) -..B1.15: - testl %edi, %edi - je ..B1.17 -..B1.16: - fldcw 14(%esp) -..B1.17: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - testl %ecx, %ecx - jne ..B1.22 -..B1.19: - cmpl $0, 12(%ebp) - jne ..B1.21 -..B1.20: - cmpl $0, 8(%ebp) - je ..B1.22 -..B1.21: - fldt _ranges@GOTOFF(%ebx) - fxch %st(2) - fsubrp %st, %st(1) - fstpt (%esp) - fldt (%esp) - fucompp - fnstsw %ax - sahf - jne ..B1.15 - jp ..B1.15 - jmp ..B1.24 -..B1.22: - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fmul %st, %st(1) - fmulp %st, %st(2) - fsubp %st, %st(1) - fldt 12+_ranges@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jp ..B1.23 - jbe ..B1.25 -..B1.23: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.15 -..B1.24: - fldt _large_value_80@GOTOFF(%ebx) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.15 -..B1.25: - fstp %st(0) - fldt _large_value_80@GOTOFF(%ebx) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.15 -..B1.26: - testl %edx, %edx - jne ..B1.22 -..B1.27: - cmpl $0, 24(%ebp) - jne ..B1.21 -..B1.28: - cmpl $0, 20(%ebp) - jne ..B1.21 - jmp ..B1.22 -..B1.29: - xorl %edi, %edi - jmp ..B1.9 -..B1.30: - cmpl $-2147483648, 24(%ebp) - jne ..B1.32 -..B1.31: - cmpl $0, 20(%ebp) - je ..B1.5 -..B1.32: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.33: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.34: - fldcw 12(%esp) -..B1.35: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) -..B1.36: - fldcw 14(%esp) -..B1.37: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.37 -..B1.39: - cmpl $-2147483648, 12(%ebp) - jne ..B1.32 -..B1.40: - cmpl $0, 8(%ebp) - je ..B1.4 - jmp ..B1.32 - .align 16,0x90 - .type fdiml,@function - .size fdiml,.-fdiml - .data -# -- End fdiml - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_ranges: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .type _ranges,@object - .size _ranges,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feclearexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feclearexcept.S deleted file mode 100644 index a0bf0865ef..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feclearexcept.S +++ /dev/null @@ -1,94 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feclearexcept.c" - .text -..TXTST0: -# -- Begin feclearexcept - .text - .align 16,0x90 - .globl feclearexcept -feclearexcept: -# parameter 1: 48 + %esp -..B1.1: -..L1: - - subl $44, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 32(%esp) - movl 48(%esp), %eax - andl $63, %eax - je ..B1.8 -..B1.2: - fnstenv 4(%esp) -..B1.3: - notl %eax - andw %ax, 8(%esp) -..B1.4: - fnclex -..B1.5: - fldenv 4(%esp) -..B1.6: - stmxcsr (%esp) - movl (%esp), %edx -..B1.7: - andl %eax, %edx - movl %edx, (%esp) - ldmxcsr (%esp) -..B1.8: - movl 32(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.10 -..B1.9: - xorl %eax, %eax - addl $44, %esp - ret -..B1.10: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type feclearexcept,@function - .size feclearexcept,.-feclearexcept - .data -# -- End feclearexcept - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fedisableexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fedisableexcept.S deleted file mode 100644 index 619a544f81..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fedisableexcept.S +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fedisableexcept.c" - .text -..TXTST0: -# -- Begin fedisableexcept - .text - .align 16,0x90 - .globl fedisableexcept -fedisableexcept: -# parameter 1: 48 + %esp -..B1.1: -..L1: - - subl $44, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 36(%esp) - movl 48(%esp), %eax - andl $63, %eax -..B1.2: - fnstcw 4(%esp) -..B1.3: - testl %eax, %eax - je ..B1.10 -..B1.4: - fnstenv 6(%esp) -..B1.5: - orw %ax, 6(%esp) -..B1.6: - fnclex -..B1.7: - fldenv 6(%esp) -..B1.8: - stmxcsr (%esp) -..B1.9: - shll $7, %eax - orl (%esp), %eax - movl %eax, (%esp) - ldmxcsr (%esp) -..B1.10: - movzwl 4(%esp), %eax - movl 36(%esp), %edx - notl %eax - xorl %esp, %edx - andl $63, %eax - cmpl %gs:20, %edx - jne ..B1.12 -..B1.11: - addl $44, %esp - ret -..B1.12: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type fedisableexcept,@function - .size fedisableexcept,.-fedisableexcept - .data -# -- End fedisableexcept - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feenableexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feenableexcept.S deleted file mode 100644 index a25752ab85..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feenableexcept.S +++ /dev/null @@ -1,102 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feenableexcept.c" - .text -..TXTST0: -# -- Begin feenableexcept - .text - .align 16,0x90 - .globl feenableexcept -feenableexcept: -# parameter 1: 48 + %esp -..B1.1: -..L1: - - subl $44, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 36(%esp) - movl 48(%esp), %edx - andl $63, %edx -..B1.2: - fnstcw 4(%esp) -..B1.3: - testl %edx, %edx - je ..B1.10 -..B1.4: - fnstenv 6(%esp) -..B1.5: - movl %edx, %eax - notl %eax - andw %ax, 6(%esp) -..B1.6: - fnclex -..B1.7: - fldenv 6(%esp) -..B1.8: - stmxcsr (%esp) -..B1.9: - shll $7, %edx - notl %edx - andl (%esp), %edx - movl %edx, (%esp) - ldmxcsr (%esp) -..B1.10: - movzwl 4(%esp), %eax - movl 36(%esp), %edx - notl %eax - xorl %esp, %edx - andl $63, %eax - cmpl %gs:20, %edx - jne ..B1.12 -..B1.11: - addl $44, %esp - ret -..B1.12: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type feenableexcept,@function - .size feenableexcept,.-feenableexcept - .data -# -- End feenableexcept - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetenv.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetenv.S deleted file mode 100644 index 6479bf83c9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetenv.S +++ /dev/null @@ -1,75 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fegetenv.c" - .text -..TXTST0: -# -- Begin fegetenv - .text - .align 16,0x90 - .globl fegetenv -fegetenv: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp -..B1.2: - movl 16(%esp), %eax -..B1.3: - fnstenv (%eax) -..B1.4: - fnclex -..B1.5: - fldenv (%eax) -..B1.6: - stmxcsr (%esp) - movl (%esp), %eax -..B1.7: - movl 16(%esp), %edx - andl $63, %eax - orw %ax, 4(%edx) - xorl %eax, %eax - addl $12, %esp - ret - .align 16,0x90 - .type fegetenv,@function - .size fegetenv,.-fegetenv - .data -# -- End fegetenv - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetexcept.S deleted file mode 100644 index 021aab378b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetexcept.S +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fegetexcept.c" - .text -..TXTST0: -# -- Begin fegetexcept - .text - .align 16,0x90 - .globl fegetexcept -fegetexcept: -..B1.1: -..L1: - - subl $12, %esp -..B1.2: - fstcw (%esp) -..B1.3: - movzwl (%esp), %eax - notl %eax - andl $63, %eax - addl $12, %esp - ret - .align 16,0x90 - .type fegetexcept,@function - .size fegetexcept,.-fegetexcept - .data -# -- End fegetexcept - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetexceptflag.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetexceptflag.S deleted file mode 100644 index 14aa8d1bca..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetexceptflag.S +++ /dev/null @@ -1,73 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fegetexceptflag.c" - .text -..TXTST0: -# -- Begin fegetexceptflag - .text - .align 16,0x90 - .globl fegetexceptflag -fegetexceptflag: -# parameter 1: 16 + %esp -# parameter 2: 20 + %esp -..B1.1: -..L1: - - subl $12, %esp - movl 20(%esp), %eax - andl $63, %eax -..B1.2: - fnstsw 4(%esp) -..B1.3: - stmxcsr (%esp) -..B1.4: - movl 16(%esp), %ecx - movzwl 4(%esp), %edx - orl (%esp), %edx - andl %eax, %edx - xorl %eax, %eax - movw %dx, (%ecx) - addl $12, %esp - ret - .align 16,0x90 - .type fegetexceptflag,@function - .size fegetexceptflag,.-fegetexceptflag - .data -# -- End fegetexceptflag - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetround.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetround.S deleted file mode 100644 index f636955a37..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fegetround.S +++ /dev/null @@ -1,63 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fegetround.c" - .text -..TXTST0: -# -- Begin fegetround - .text - .align 16,0x90 - .globl fegetround -fegetround: -..B1.1: -..L1: - - subl $12, %esp -..B1.2: - fnstcw (%esp) -..B1.3: - movzwl (%esp), %eax - andl $3072, %eax - addl $12, %esp - ret - .align 16,0x90 - .type fegetround,@function - .size fegetround,.-fegetround - .data -# -- End fegetround - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feholdexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feholdexcept.S deleted file mode 100644 index 74ba663802..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feholdexcept.S +++ /dev/null @@ -1,102 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feholdexcept.c" - .text -..TXTST0: -# -- Begin feholdexcept - .text - .align 16,0x90 - .globl feholdexcept -feholdexcept: -# parameter 1: 48 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $40, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 32(%esp) - stmxcsr (%esp) - movl (%esp), %ecx -..B1.2: - fnstenv 4(%esp) -..B1.3: - movl 48(%esp), %eax - movl %ecx, %ebx - andl $63, %ebx - andl $-64, %ecx - movzwl 8(%esp), %edx - orl %edx, %ebx - movw %bx, 4(%eax) - andl $-64, %edx - movzwl 4(%esp), %ebx - orl $8064, %ecx - movw %bx, (%eax) - orl $63, %ebx - movw %dx, 8(%esp) - movw %bx, 4(%esp) -..B1.4: - fnclex -..B1.5: - fldenv 4(%esp) -..B1.6: - movl %ecx, (%esp) - movl 32(%esp), %eax - xorl %esp, %eax - ldmxcsr (%esp) - cmpl %gs:20, %eax - jne ..B1.8 -..B1.7: - xorl %eax, %eax - addl $40, %esp - popl %ebx - ret -..B1.8: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type feholdexcept,@function - .size feholdexcept,.-feholdexcept - .data -# -- End feholdexcept - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feraiseexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feraiseexcept.S deleted file mode 100644 index cb7981847a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feraiseexcept.S +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feraiseexcept.c" - .text -..TXTST0: -# -- Begin feraiseexcept - .text - .align 16,0x90 - .globl feraiseexcept -feraiseexcept: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - movl 16(%esp), %eax - testb $1, %al - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - je ..B1.3 -..B1.2: - flds d_zero@GOTOFF(%edx) - fwait - flds d_zero@GOTOFF(%edx) - fwait - fdivrp %st, %st(1) - fwait - fstps (%esp) - fwait -..B1.3: - testb $4, %al - je ..B1.5 -..B1.4: - movl p_one@GOTOFF(%edx), %ecx - flds (%ecx) - fwait - movl p_zero@GOTOFF(%edx), %ecx - flds (%ecx) - fwait - fdivrp %st, %st(1) - fwait - fstps (%esp) - fwait -..B1.5: - testb $2, %al - je ..B1.7 -..B1.6: - flds d_tiny@GOTOFF(%edx) - fwait - flds d_tiny@GOTOFF(%edx) - fwait - faddp %st, %st(1) - fwait - fstps (%esp) - fwait -..B1.7: - testb $8, %al - je ..B1.9 -..B1.8: - flds d_huge@GOTOFF(%edx) - fwait - flds d_huge@GOTOFF(%edx) - fwait - fmulp %st, %st(1) - fwait - fstps (%esp) - fwait -..B1.9: - testb $16, %al - je ..B1.11 -..B1.10: - flds d_norm@GOTOFF(%edx) - fwait - flds d_norm@GOTOFF(%edx) - fwait - fmulp %st, %st(1) - fwait - fstps (%esp) - fwait -..B1.11: - testb $32, %al - je ..B1.13 -..B1.12: - movl p_one@GOTOFF(%edx), %eax - movl p_norm@GOTOFF(%edx), %edx - flds (%eax) - fwait - flds (%edx) - fwait - faddp %st, %st(1) - fwait - fstps (%esp) - fwait -..B1.13: - xorl %eax, %eax - addl $12, %esp - ret - .align 16,0x90 - .type feraiseexcept,@function - .size feraiseexcept,.-feraiseexcept - .data -# -- End feraiseexcept - .section .rodata, "a" - .align 4 - .align 4 -d_zero: - .long 0 - .type d_zero,@object - .size d_zero,4 - .align 4 -d_one: - .long 1065353216 - .type d_one,@object - .size d_one,4 - .align 4 -d_tiny: - .long 8388607 - .type d_tiny,@object - .size d_tiny,4 - .align 4 -d_huge: - .long 2139095039 - .type d_huge,@object - .size d_huge,4 - .align 4 -d_norm: - .long 8388608 - .type d_norm,@object - .size d_norm,4 - .section .data.rel.ro.local, "aw",@progbits - .align 4 - .align 4 -p_one: - .long d_one - .type p_one,@object - .size p_one,4 - .align 4 -p_zero: - .long d_zero - .type p_zero,@object - .size p_zero,4 - .align 4 -p_norm: - .long d_norm - .type p_norm,@object - .size p_norm,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetenv.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetenv.S deleted file mode 100644 index 44b7335baa..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetenv.S +++ /dev/null @@ -1,124 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fesetenv.c" - .text -..TXTST0: -# -- Begin fesetenv - .text - .align 16,0x90 - .globl fesetenv -fesetenv: -# parameter 1: 64 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - pushl %ebp - subl $48, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 32(%esp) - stmxcsr (%esp) - movl (%esp), %ecx -..B1.2: - fnstenv 4(%esp) -..B1.3: - movzwl 4(%esp), %edi - andl $-32704, %ecx - movzwl 8(%esp), %eax - andl $-3136, %edi - movl 64(%esp), %ebp - andl $-64, %eax - cmpl $-1, %ebp - je ..B1.10 -..B1.4: - movzwl (%ebp), %edx - movl %edx, %ebx - movzwl 4(%ebp), %ebp - andl $3135, %ebx - andl $63, %ebp - orl %ebx, %edi - orl %ebp, %eax - movw %ax, 8(%esp) - movl %edx, %eax - andl $63, %eax - andl $3072, %edx - shll $7, %eax - shll $3, %edx - orl %eax, %ecx - orl %edx, %ecx - movw %di, 4(%esp) - orl %ebp, %ecx -..B1.5: - fnclex -..B1.6: - fldenv 4(%esp) -..B1.7: - movl %ecx, (%esp) - movl 32(%esp), %eax - xorl %esp, %eax - ldmxcsr (%esp) - cmpl %gs:20, %eax - jne ..B1.9 -..B1.8: - xorl %eax, %eax - addl $48, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.9: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - call __stack_chk_fail@PLT -..B1.10: - orl $63, %edi - orl $8064, %ecx - movw %ax, 8(%esp) - movw %di, 4(%esp) - jmp ..B1.5 - .align 16,0x90 - .type fesetenv,@function - .size fesetenv,.-fesetenv - .data -# -- End fesetenv - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetexceptflag.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetexceptflag.S deleted file mode 100644 index 6574e54d20..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetexceptflag.S +++ /dev/null @@ -1,109 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fesetexceptflag.c" - .text -..TXTST0: -# -- Begin fesetexceptflag - .text - .align 16,0x90 - .globl fesetexceptflag -fesetexceptflag: -# parameter 1: 48 + %esp -# parameter 2: 52 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - subl $36, %esp - movl %gs:20, %eax - movl 52(%esp), %ecx - xorl %esp, %eax - movl %eax, 32(%esp) - andl $63, %ecx - je ..B1.8 -..B1.2: - fnstenv 4(%esp) -..B1.3: - movl 48(%esp), %edx - movl %ecx, %eax - notl %eax - movzwl 8(%esp), %edi - movzwl (%edx), %ebx - andl %eax, %edi - andl %ecx, %ebx - orl %ebx, %edi - movw %di, 8(%esp) -..B1.4: - fnclex -..B1.5: - fldenv 4(%esp) -..B1.6: - stmxcsr (%esp) - movl (%esp), %ebx -..B1.7: - andl %eax, %ebx - movzwl (%edx), %eax - andl %ecx, %eax - orl %eax, %ebx - movl %ebx, (%esp) - ldmxcsr (%esp) -..B1.8: - movl 32(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.10 -..B1.9: - xorl %eax, %eax - addl $36, %esp - popl %ebx - popl %edi - ret -..B1.10: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type fesetexceptflag,@function - .size fesetexceptflag,.-fesetexceptflag - .data -# -- End fesetexceptflag - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetround.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetround.S deleted file mode 100644 index 37e6202a5f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fesetround.S +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fesetround.c" - .text -..TXTST0: -# -- Begin fesetround - .text - .align 16,0x90 - .globl fesetround -fesetround: -# parameter 1: 48 + %esp -..B1.1: -..L1: - - subl $44, %esp - movl %gs:20, %eax - movl 48(%esp), %edx - xorl %esp, %eax - movl %eax, 32(%esp) - testl $-3073, %edx - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - jne ..B1.9 -..B1.2: - fnstenv 4(%esp) -..B1.3: - movzwl 4(%esp), %eax - andl $-3073, %eax - orl %edx, %eax - movw %ax, 4(%esp) -..B1.4: - fnclex -..B1.5: - fldenv 4(%esp) -..B1.6: - stmxcsr (%esp) - movl (%esp), %eax -..B1.7: - andl $-24577, %eax - shll $3, %edx - orl %edx, %eax - movl %eax, (%esp) - movl 32(%esp), %eax - xorl %esp, %eax - ldmxcsr (%esp) - cmpl %gs:20, %eax - jne ..B1.11 -..B1.8: - xorl %eax, %eax - addl $44, %esp - ret -..B1.9: - movl 32(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.11 -..B1.10: - movl $1, %eax - addl $44, %esp - ret -..B1.11: - movl %ecx, %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type fesetround,@function - .size fesetround,.-fesetround - .data -# -- End fesetround - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fetestexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fetestexcept.S deleted file mode 100644 index 72b9f7572e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fetestexcept.S +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fetestexcept.c" - .text -..TXTST0: -# -- Begin fetestexcept - .text - .align 16,0x90 - .globl fetestexcept -fetestexcept: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - movl 16(%esp), %edx - andl $63, %edx - je ..B1.5 -..B1.2: - fnstsw 4(%esp) -..B1.3: - stmxcsr (%esp) -..B1.4: - movzwl 4(%esp), %eax - orl (%esp), %eax - andl %edx, %eax - addl $12, %esp - ret -..B1.5: - xorl %eax, %eax - addl $12, %esp - ret - .align 16,0x90 - .type fetestexcept,@function - .size fetestexcept,.-fetestexcept - .data -# -- End fetestexcept - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feupdateenv.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feupdateenv.S deleted file mode 100644 index 4c564b74e2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/feupdateenv.S +++ /dev/null @@ -1,83 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feupdateenv.c" - .text -..TXTST0: -# -- Begin feupdateenv - .text - .align 16,0x90 - .globl feupdateenv -feupdateenv: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $8, %esp -..B1.2: - fnstsw 4(%esp) -..B1.3: - stmxcsr (%esp) - movl (%esp), %eax -..B1.4: - movl 16(%esp), %edx - orw %ax, 4(%esp) - addl $-16, %esp - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %edx, (%esp) - call fesetenv@PLT -..B1.5: - movzwl 20(%esp), %eax - andl $63, %eax - movl %eax, (%esp) - call feraiseexcept@PLT -..B1.6: - xorl %eax, %eax - addl $24, %esp - popl %ebx - ret - .align 16,0x90 - .type feupdateenv,@function - .size feupdateenv,.-feupdateenv - .data -# -- End feupdateenv - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floor_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floor_wmt.S deleted file mode 100644 index 93d2632114..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floor_wmt.S +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "floor_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin floor - .text - .align 16,0x90 - .globl floor -floor: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - pextrw $3, %xmm0, %eax - movl $32752, %ecx - andl %eax, %ecx - cmpl $17184, %ecx - ja .L_2TAG_PACKET_0.0.2 - je .L_2TAG_PACKET_1.0.2 - cmpl $16368, %ecx - jl .L_2TAG_PACKET_2.0.2 - movq (%ebx), %xmm1 - addsd %xmm0, %xmm1 - subsd (%ebx), %xmm1 - cmpltsd %xmm1, %xmm0 - movq %xmm1, (%esp) - movd %xmm0, %eax - fldl (%esp) - fsubs 20(%ebx,%eax,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_2.0.2: - pxor %xmm1, %xmm1 - cmpnlesd %xmm0, %xmm1 - movd %xmm1, %ecx - shrl $15, %eax - subl %ecx, %eax - flds 32(%ebx,%eax,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_1.0.2: - pextrw $0, %xmm0, %eax - andl $1, %eax - movq %xmm0, (%esp) - fldl (%esp) - fsubs 48(%ebx,%eax,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - cmpl $32752, %ecx - movq %xmm0, (%esp) - fldl (%esp) - jae .L_2TAG_PACKET_4.0.2 - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_4.0.2: - fldz - faddp -.L_2TAG_PACKET_3.0.2: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type floor,@function - .size floor,.-floor - .data -# -- End floor - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1127743488 - .long 0 - .long 0 - .long 1065353216 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 3212836864 - .long 0 - .long 0 - .long 1056964608 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,64 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floorf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floorf_gen.S deleted file mode 100644 index bd3d935fd3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floorf_gen.S +++ /dev/null @@ -1,145 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "floorf_gen.c" - .text -..TXTST0: -# -- Begin floorf - .text - .align 16,0x90 - .globl floorf -floorf: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - movzwl 18(%esp), %eax - andl $32640, %eax - shrl $7, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $149, %eax - jge ..B1.11 -..B1.2: - cmpl $127, %eax - jl ..B1.7 -..B1.3: - flds .L_2il0floatpacket.0@GOTOFF(%edx) - flds 16(%esp) - fld %st(0) - fadd %st(2), %st - fstps (%esp) - flds (%esp) - fsubp %st, %st(2) - fcomp %st(1) - fnstsw %ax - sahf - jae ..B1.6 - jp ..B1.6 -..B1.4: - fadds .L_2il0floatpacket.1@GOTOFF(%edx) -..B1.6: - addl $12, %esp - ret -..B1.7: - testl %eax, %eax - jne ..B1.10 -..B1.8: - testl $8388607, 16(%esp) - jne ..B1.10 -..B1.9: - flds 16(%esp) - addl $12, %esp - ret -..B1.10: - movzbl 19(%esp), %ecx - andl $128, %ecx - shrl $7, %ecx - movl 16(%esp), %eax - movl %eax, (%esp) - flds _pzero_none@GOTOFF(%edx,%ecx,4) - addl $12, %esp - ret -..B1.11: - cmpl $150, %eax - jge ..B1.16 -..B1.12: - flds 16(%esp) - testb $1, 16(%esp) - je ..B1.15 -..B1.13: - fadds .L_2il0floatpacket.2@GOTOFF(%edx) -..B1.15: - addl $12, %esp - ret -..B1.16: - flds 16(%esp) - addl $12, %esp - ret - .align 16,0x90 - .type floorf,@function - .size floorf,.-floorf - .data -# -- End floorf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4b400000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0xbf800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0xbf000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -_pzero_none: - .long 0 - .long 3212836864 - .type _pzero_none,@object - .size _pzero_none,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floorl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floorl.S deleted file mode 100644 index 00c0faac22..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/floorl.S +++ /dev/null @@ -1,246 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "floorl.c" - .text -..TXTST0: -# -- Begin floorl - .text - .align 16,0x90 - .globl floorl -floorl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $16445, %eax - jge ..B1.21 -..B1.4: - cmpl $16383, %eax - jl ..B1.15 -..B1.5: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.6: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.7: - fldcw 12(%esp) -..B1.8: - movl $1, %ecx -..B1.9: - fldt 8(%ebp) - fld %st(0) - fldl _TWO_63H@GOTOFF(%edx) - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt (%esp) - fldt (%esp) - fcompp - fnstsw %ax - sahf - jbe ..B1.12 -..B1.10: - fldt (%esp) - faddl 8+_ones@GOTOFF(%edx) - fstpt (%esp) -..B1.12: - testl %ecx, %ecx - je ..B1.14 -..B1.13: - fldcw 14(%esp) -..B1.14: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.15: - testl %eax, %eax - jne ..B1.20 -..B1.16: - cmpl $0, 12(%ebp) - jne ..B1.19 -..B1.17: - cmpl $0, 8(%ebp) - jne ..B1.19 -..B1.18: - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.19: - fldl _smallest_value_64@GOTOFF(%edx) - fstpl 16(%esp) -..B1.20: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl _pzero_none@GOTOFF(%edx,%eax,8) - movl %ebp, %esp - popl %ebp - ret -..B1.21: - cmpl $16446, %eax - jge ..B1.30 -..B1.22: - testb $1, 8(%ebp) - je ..B1.29 -..B1.23: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.37 -..B1.24: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.25: - fldcw 12(%esp) -..B1.26: - fldt 8(%ebp) - faddl 8+_halfs@GOTOFF(%edx) - fstpt (%esp) -..B1.27: - fldcw 14(%esp) -..B1.28: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.29: - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.30: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.31: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.32: - fldcw 12(%esp) -..B1.33: - fldt 8(%ebp) - fmull _ones@GOTOFF(%edx) - fstpt (%esp) -..B1.34: - fldcw 14(%esp) -..B1.35: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.36: - xorl %ecx, %ecx - jmp ..B1.9 -..B1.37: - fldt 8(%ebp) - faddl 8+_halfs@GOTOFF(%edx) - fstpt (%esp) - jmp ..B1.28 -..B1.38: - fldt 8(%ebp) - fmull _ones@GOTOFF(%edx) - fstpt (%esp) - jmp ..B1.35 - .align 16,0x90 - .type floorl,@function - .size floorl,.-floorl - .data -# -- End floorl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_pzero_none: - .long 0 - .long 0 - .long 0 - .long 3220176896 - .type _pzero_none,@object - .size _pzero_none,16 - .align 4 -_halfs: - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .type _halfs,@object - .size _halfs,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fma.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fma.S deleted file mode 100644 index d7cc6ab0a1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fma.S +++ /dev/null @@ -1,1208 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fma.c" - .text -..TXTST0: -# -- Begin fma - .text - .align 16,0x90 - .globl fma -fma: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -# parameter 3: 24 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp -..B1.2: - fnstcw 80(%esp) -..B1.3: - movl 12(%ebp), %esi - movl 16(%ebp), %ecx - movl 24(%ebp), %eax - movzwl 80(%esp), %edx - movl %esi, 60(%esp) - andl $2147483647, %esi - andl $3072, %edx - movl %edx, 56(%esp) - movl 20(%ebp), %edx - movl %edx, %edi - movl %ecx, 76(%esp) - andl $2147483647, %edi - movl 28(%ebp), %ecx - movl %eax, 72(%esp) - movl %esi, %eax - movl 8(%ebp), %ebx - movl %ecx, 68(%esp) - andl $2147483647, %ecx - orl %ebx, %eax - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - movl %eax, 64(%esp) - jne ..B1.4 -..B1.130: - cmpl $2146435072, %esi - ja ..B1.8 - jmp ..B1.6 -..B1.4: - cmpl $2146435072, %esi - jb ..B1.9 -..B1.5: - ja ..B1.8 -..B1.6: - jne ..B1.134 -..B1.7: - testl %ebx, %ebx - jne ..B1.8 -..B1.133: - cmpl $2146435072, %edi - ja ..B1.15 - jmp ..B1.13 -..B1.8: - fldl 8(%ebp) - faddl 16(%ebp) - fmull 24(%ebp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - lea -1072693248(%esi), %eax - orl %ebx, %eax - je ..B1.133 -..B1.10: - movl %edi, %eax - orl 76(%esp), %eax - je ..B1.133 -..B1.11: - cmpl $2146435072, %edi - jae ..B1.12 - jmp ..B1.16 -..B1.134: - cmpl $2146435072, %edi -..B1.12: - ja ..B1.15 -..B1.13: - jne ..B1.138 -..B1.14: - cmpl $0, 76(%esp) - jne ..B1.15 -..B1.137: - cmpl $2146435072, %ecx - ja ..B1.22 - jmp ..B1.20 -..B1.15: - fldl 16(%ebp) - faddl 24(%ebp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - lea -1072693248(%edi), %eax - orl 76(%esp), %eax - je ..B1.137 -..B1.17: - movl %ecx, %eax - orl 72(%esp), %eax - je ..B1.137 -..B1.18: - cmpl $2146435072, %ecx - jae ..B1.19 - jmp ..B1.28 -..B1.138: - cmpl $2146435072, %ecx -..B1.19: - ja ..B1.22 -..B1.20: - jne ..B1.23 -..B1.21: - cmpl $0, 72(%esp) - je ..B1.23 -..B1.22: - fldl 24(%ebp) - movl 64(%esp), %eax - fmull _ones@GOTOFF(%eax) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - cmpl $2146435072, %esi - jae ..B1.27 -..B1.24: - cmpl $2146435072, %edi - jae ..B1.27 -..B1.25: - cmpl $2146435072, %ecx - jb ..B1.27 -..B1.26: - fldl 24(%ebp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.27: - fldl 8(%ebp) - fmull 16(%ebp) - faddl 24(%ebp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.28: - cmpl $1048576, %esi - jae ..B1.30 -..B1.29: - movl 60(%esp), %ebx - movl %ebx, %eax - shrl $31, %eax - orl $1072693248, %ebx - movl 64(%esp), %esi - movl %ebx, 12(%ebp) - fldl 8(%ebp) - fsubl _ones@GOTOFF(%esi,%eax,8) - fstpl 8(%ebp) - movl 12(%ebp), %esi - movl %esi, 60(%esp) - andl $2147483647, %esi - movl %esi, %eax - shrl $20, %eax - addl $-1022, %eax - movl 8(%ebp), %ebx - movl %eax, 4(%esp) - jmp ..B1.31 -..B1.30: - movl %esi, %eax - shrl $20, %eax - movl %eax, 4(%esp) -..B1.31: - cmpl $1048576, %edi - jae ..B1.33 -..B1.32: - movl %edx, %edi - orl $1072693248, %edx - shrl $31, %edi - movl %edx, 20(%ebp) - fldl 16(%ebp) - movl 64(%esp), %edx - fsubl _ones@GOTOFF(%edx,%edi,8) - fstpl 16(%ebp) - movl 20(%ebp), %edx - movl %edx, %edi - movl 16(%ebp), %eax - andl $2147483647, %edi - movl %eax, 76(%esp) - movl %edi, %eax - shrl $20, %eax - addl $-1022, %eax - movl %eax, 16(%esp) - jmp ..B1.34 -..B1.33: - movl %edi, %eax - shrl $20, %eax - movl %eax, 16(%esp) -..B1.34: - cmpl $1048576, %ecx - jae ..B1.36 -..B1.35: - movl 68(%esp), %eax - movl %eax, %ecx - shrl $31, %ecx - orl $1072693248, %eax - movl %eax, 28(%ebp) - fldl 24(%ebp) - movl 64(%esp), %eax - fsubl _ones@GOTOFF(%eax,%ecx,8) - fstpl 24(%ebp) - movl 28(%ebp), %ecx - movl 24(%ebp), %eax - movl %ecx, 68(%esp) - andl $2147483647, %ecx - movl %eax, 72(%esp) - movl %ecx, %eax - shrl $20, %eax - addl $-1022, %eax - movl %eax, (%esp) - jmp ..B1.37 -..B1.36: - movl %ecx, %eax - shrl $20, %eax - movl %eax, (%esp) -..B1.37: - andl $1048575, %ecx - movl %ebx, %eax - orl $1048576, %ecx - andl $1048575, %esi - movl %ecx, 20(%esp) - orl $1048576, %esi - movl 60(%esp), %ecx - andl $1048575, %edi - xorl %edx, %ecx - orl $1048576, %edi - andl $-2147483648, %ecx - movl %ecx, 60(%esp) - movl 4(%esp), %edx - movl 16(%esp), %ecx - lea -1023(%edx,%ecx), %edx - movl 76(%esp), %ecx - movl %edx, 32(%esp) - mull %ecx - movl %eax, 44(%esp) - movl %ecx, %eax - movl %edx, 24(%esp) - mull %esi - movl %eax, %ecx - movl %ebx, %eax - movl %edx, 28(%esp) - mull %edi - movl %eax, 52(%esp) - movl %esi, %eax - movl %edx, %ebx - xorl %esi, %esi - mull %edi - addl 52(%esp), %ecx - movl 28(%esp), %edi - adcl $0, %esi - addl 24(%esp), %ecx - movl %ecx, 48(%esp) - adcl $0, %esi - addl %eax, %esi - movl $0, %eax - movl 20(%esp), %ecx - adcl $0, %eax - addl %ebx, %edi - movl $0, %ebx - adcl $0, %ebx - addl %edi, %esi - movl %esi, 40(%esp) - adcl %ebx, %eax - addl %eax, %edx - movl %edx, 36(%esp) - testl $512, %edx - je ..B1.39 -..B1.38: - movl %esi, %eax - shll $11, %edx - shrl $21, %eax - orl %eax, %edx - movl %edx, 36(%esp) - movl 48(%esp), %eax - movl %eax, %ebx - movl 44(%esp), %edx - movl %edx, %edi - shll $11, %esi - shrl $21, %ebx - shll $11, %eax - orl %ebx, %esi - shrl $21, %edi - shll $11, %edx - orl %edi, %eax - incl 32(%esp) - movl %esi, 40(%esp) - movl %eax, 48(%esp) - movl %edx, 44(%esp) - jmp ..B1.40 -..B1.39: - movl %esi, %eax - shll $12, %edx - shrl $20, %eax - orl %eax, %edx - movl %edx, 36(%esp) - movl 48(%esp), %eax - movl %eax, %ebx - movl 44(%esp), %edx - movl %edx, %edi - shll $12, %esi - shrl $20, %ebx - shll $12, %eax - orl %ebx, %esi - shrl $20, %edi - shll $12, %edx - orl %edi, %eax - movl %esi, 40(%esp) - movl %eax, 48(%esp) - movl %edx, 44(%esp) -..B1.40: - movl 32(%esp), %eax - cmpl (%esp), %eax - jg ..B1.45 -..B1.41: - cmpl (%esp), %eax - jne ..B1.46 -..B1.42: - cmpl 36(%esp), %ecx - jb ..B1.45 -..B1.43: - jne ..B1.46 -..B1.44: - movl 72(%esp), %eax - cmpl 40(%esp), %eax - ja ..B1.46 -..B1.45: - movl 72(%esp), %eax - movl 32(%esp), %edx - movl 68(%esp), %ebx - movl %eax, 24(%esp) - andl $-2147483648, %ebx - xorl %eax, %eax - subl (%esp), %edx - movl %ecx, 20(%esp) - movl %ebx, 16(%esp) - movl %eax, 28(%esp) - jmp ..B1.47 -..B1.46: - movl 36(%esp), %ebx - movl %ebx, 20(%esp) - movl 72(%esp), %ebx - movl %ebx, 40(%esp) - movl (%esp), %eax - movl %eax, %edx - movl 60(%esp), %ebx - movl 48(%esp), %edi - movl %ebx, 16(%esp) - subl 32(%esp), %edx - movl 68(%esp), %ebx - movl %eax, 32(%esp) - andl $-2147483648, %ebx - movl 44(%esp), %eax - movl %ebx, 60(%esp) - xorl %ebx, %ebx - movl %esi, 24(%esp) - movl %edi, 28(%esp) - movl %ecx, 36(%esp) - movl %ebx, 44(%esp) - movl %ebx, 48(%esp) -..B1.47: - testl %edx, %edx - je ..B1.57 -..B1.48: - cmpl $32, %edx - jge ..B1.50 -..B1.49: - movl %edx, %esi - movl %edx, %ecx - negl %esi - movl %eax, %ebx - movl %esi, (%esp) - movl $-1, %esi - shrl %cl, %esi - movl (%esp), %ecx - notl %esi - shll %cl, %ebx - movl 28(%esp), %edi - andl %esi, %ebx - movl %ebx, 52(%esp) - movl %edi, %ebx - shll %cl, %ebx - movl %edx, %ecx - shrl %cl, %eax - andl %esi, %ebx - orl %ebx, %eax - movl %eax, 4(%esp) - movl 24(%esp), %eax - movl %eax, %ebx - movl (%esp), %ecx - shll %cl, %ebx - movl %edx, %ecx - shrl %cl, %edi - andl %esi, %ebx - orl %ebx, %edi - movl 20(%esp), %ebx - movl %edi, 28(%esp) - movl %ebx, %edi - movl (%esp), %ecx - shll %cl, %edi - movl %edx, %ecx - shrl %cl, %eax - andl %esi, %edi - orl %edi, %eax - movl %eax, 24(%esp) - shrl %cl, %ebx - movl %ebx, 20(%esp) - movl 4(%esp), %eax - jmp ..B1.58 -..B1.50: - cmpl $64, %edx - jge ..B1.52 -..B1.51: - movl %edx, %esi - movl %edx, %ecx - movl $-1, %edi - negl %esi - movl %esi, (%esp) - testl %eax, %eax - movl 28(%esp), %ebx - movl $0, %eax - setne %al - shrl %cl, %edi - movl (%esp), %ecx - notl %edi - shll %cl, %ebx - andl %edi, %ebx - movl 24(%esp), %esi - orl %eax, %ebx - movl %esi, %eax - shll %cl, %eax - movl %edx, %ecx - movl %ebx, 52(%esp) - andl %edi, %eax - movl 28(%esp), %ebx - shrl %cl, %ebx - movl (%esp), %ecx - orl %ebx, %eax - movl 20(%esp), %ebx - shll %cl, %ebx - movl %edx, %ecx - shrl %cl, %esi - andl %edi, %ebx - orl %esi, %ebx - movl %ebx, 28(%esp) - movl 20(%esp), %ebx - shrl %cl, %ebx - movl %ebx, 24(%esp) - movl $0, 20(%esp) - jmp ..B1.58 -..B1.52: - cmpl $96, %edx - jge ..B1.54 -..B1.53: - movl %edx, %edi - movl %edx, %ecx - movl $-1, %esi - negl %edi - movl %edi, (%esp) - shrl %cl, %esi - orl 28(%esp), %eax - notl %esi - movl (%esp), %ecx - movl $0, %eax - movl 24(%esp), %ebx - setne %al - shll %cl, %ebx - andl %esi, %ebx - orl %eax, %ebx - movl %ebx, 52(%esp) - movl 20(%esp), %ebx - movl %ebx, %eax - shll %cl, %eax - movl %edx, %ecx - andl %esi, %eax - xorl %edx, %edx - movl 24(%esp), %esi - shrl %cl, %esi - shrl %cl, %ebx - orl %esi, %eax - movl %ebx, 28(%esp) - movl %edx, 24(%esp) - movl %edx, 20(%esp) - jmp ..B1.58 -..B1.54: - cmpl $128, %edx - jge ..B1.56 -..B1.55: - movl %edx, %ebx - movl %edx, %ecx - negl %ebx - movl $-1, %edi - movl 20(%esp), %esi - shrl %cl, %edi - movl %ebx, %ecx - movl %esi, %ebx - notl %edi - shll %cl, %ebx - movl 24(%esp), %ecx - andl %edi, %ebx - orl 28(%esp), %ecx - orl %eax, %ecx - movl $0, %eax - movl %edx, %ecx - setne %al - xorl %edx, %edx - orl %eax, %ebx - movl %esi, %eax - movl %ebx, 52(%esp) - shrl %cl, %eax - movl %edx, 28(%esp) - movl %edx, 24(%esp) - movl %edx, 20(%esp) - jmp ..B1.58 -..B1.56: - movl 20(%esp), %edi - orl 24(%esp), %edi - orl 28(%esp), %edi - orl %eax, %edi - movl $0, %eax - setne %al - movl %eax, 52(%esp) - xorl %eax, %eax - movl %eax, 28(%esp) - movl %eax, 24(%esp) - movl %eax, 20(%esp) - jmp ..B1.58 -..B1.57: - movl $0, 52(%esp) -..B1.58: - movl 60(%esp), %ecx - cmpl 16(%esp), %ecx - jne ..B1.62 -..B1.59: - movl 44(%esp), %esi - addl %esi, %eax - xorl %ecx, %ecx - cmpl %esi, %eax - movl 48(%esp), %ebx - setb %cl - xorl %edi, %edi - addl 28(%esp), %ebx - adcl $0, %edi - addl %ecx, %ebx - movl 40(%esp), %ecx - adcl $0, %edi - addl 24(%esp), %ecx - movl %ebx, 48(%esp) - movl $0, %ebx - adcl $0, %ebx - addl %edi, %ecx - movl %ecx, 40(%esp) - movl 36(%esp), %ecx - adcl $0, %ebx - addl 20(%esp), %ecx - addl %ebx, %ecx - movl %ecx, 36(%esp) - testl $2097152, %ecx - je ..B1.61 -..B1.60: - orl 48(%esp), %eax - orl 52(%esp), %eax - movl 40(%esp), %esi - movl %esi, %edx - movl %ecx, %ebx - movl $0, %eax - movl %ebx, %ecx - setne %al - shll $31, %edx - shll $31, %ecx - orl %eax, %edx - shrl $1, %esi - shrl $1, %ebx - orl %ecx, %esi - andl $1048575, %ebx - incl 32(%esp) - movl %edx, 20(%esp) - movl %esi, 40(%esp) - movl %ebx, 36(%esp) - jmp ..B1.84 -..B1.61: - orl 52(%esp), %eax - movl $0, %eax - setne %al - orl 48(%esp), %eax - andl $1048575, 36(%esp) - movl %eax, 20(%esp) - jmp ..B1.84 -..B1.62: - xorl %ebx, %ebx - negl 52(%esp) - movl 44(%esp), %esi - setne %bl - xorl %edi, %edi - subl %eax, %esi - movl $0, %eax - sbbl $0, %eax - subl %ebx, %esi - movl 48(%esp), %ecx - sbbl $0, %eax - subl 28(%esp), %ecx - cltd - sbbl $0, %edi - addl %eax, %ecx - movl 40(%esp), %ebx - adcl %edx, %edi - subl 24(%esp), %ebx - movl %edi, %eax - movl %esi, 44(%esp) - movl $0, %esi - cltd - sbbl $0, %esi - addl %ebx, %edi - movl 36(%esp), %eax - adcl %edx, %esi - subl 20(%esp), %eax - movl %ecx, 48(%esp) - addl %esi, %eax - movl %edi, 16(%esp) - movl %eax, 36(%esp) - je ..B1.64 -..B1.63: - shll $11, %eax - movl $0, 4(%esp) - jmp ..B1.72 -..B1.64: - cmpl $0, 16(%esp) - je ..B1.66 -..B1.65: - movl %edi, %eax - movl $21, 4(%esp) - jmp ..B1.72 -..B1.66: - cmpl $0, 48(%esp) - je ..B1.68 -..B1.67: - movl %ecx, %eax - movl $53, 4(%esp) - jmp ..B1.72 -..B1.68: - cmpl $0, 44(%esp) - je ..B1.70 -..B1.69: - movl 44(%esp), %eax - movl $85, 4(%esp) - jmp ..B1.72 -..B1.70: - cmpl $0, 52(%esp) - je ..B1.123 -..B1.71: - movl 52(%esp), %eax - movl $117, 4(%esp) -..B1.72: - testl $-2147483648, %eax - jne ..B1.76 -..B1.73: - movl 4(%esp), %edx -..B1.74: - addl %eax, %eax - incl %edx - testl $-2147483648, %eax - je ..B1.74 -..B1.75: - movl %edx, 4(%esp) -..B1.76: - cmpl $32, 4(%esp) - jge ..B1.78 -..B1.77: - movl 4(%esp), %ebx - movl %ebx, %esi - movl 44(%esp), %eax - negl %esi - orl 52(%esp), %eax - movl %ebx, %ecx - movl %esi, (%esp) - movl $0, %eax - movl 48(%esp), %esi - movl %esi, %edx - setne %al - movl $1, %edi - shll %cl, %edx - orl %eax, %edx - movl %edx, 20(%esp) - movl 16(%esp), %edx - movl %edx, %eax - shll %cl, %edi - shll %cl, %eax - decl %edi - movl (%esp), %ecx - shrl %cl, %esi - movl %ebx, %ecx - andl %edi, %esi - orl %esi, %eax - movl %eax, 40(%esp) - movl 36(%esp), %eax - shll %cl, %eax - movl (%esp), %ecx - shrl %cl, %edx - andl %edi, %edx - orl %edx, %eax - andl $1048575, %eax - movl %eax, 36(%esp) - jmp ..B1.83 -..B1.78: - cmpl $64, 4(%esp) - jge ..B1.80 -..B1.79: - movl 4(%esp), %ebx - movl %ebx, %esi - cmpl $0, 52(%esp) - movl %ebx, %ecx - movl $0, %eax - setne %al - movl $1, %edi - negl %esi - movl %esi, (%esp) - movl 44(%esp), %esi - movl %esi, %edx - shll %cl, %edx - orl %eax, %edx - movl %edx, 20(%esp) - movl 48(%esp), %edx - movl %edx, %eax - shll %cl, %edi - shll %cl, %eax - decl %edi - movl (%esp), %ecx - shrl %cl, %esi - movl %ebx, %ecx - andl %edi, %esi - orl %esi, %eax - movl %eax, 40(%esp) - movl 16(%esp), %eax - shll %cl, %eax - movl (%esp), %ecx - shrl %cl, %edx - andl %edi, %edx - orl %edx, %eax - andl $1048575, %eax - movl %eax, 36(%esp) - jmp ..B1.83 -..B1.80: - cmpl $96, 4(%esp) - jge ..B1.82 -..B1.81: - movl 4(%esp), %edi - movl %edi, %ebx - negl %ebx - movl %edi, %ecx - movl %ebx, (%esp) - movl $1, %ebx - movl 44(%esp), %esi - movl %esi, %edx - movl 52(%esp), %eax - shll %cl, %ebx - shll %cl, %eax - decl %ebx - shll %cl, %edx - movl (%esp), %ecx - movl %eax, 20(%esp) - shrl %cl, %eax - movl %edi, %ecx - andl %ebx, %eax - orl %eax, %edx - movl %edx, 40(%esp) - movl 48(%esp), %edx - shll %cl, %edx - movl (%esp), %ecx - shrl %cl, %esi - andl %ebx, %esi - orl %esi, %edx - andl $1048575, %edx - movl %edx, 36(%esp) - jmp ..B1.83 -..B1.82: - movl 4(%esp), %ecx - xorl %eax, %eax - movl 44(%esp), %edx - shll %cl, %edx - andl $1048575, %edx - cmpl $128, %ecx - movl %eax, 20(%esp) - jl ..L3 - movl $0, %edx -..L3: - movl %eax, 40(%esp) - movl %edx, 36(%esp) -..B1.83: - movl 32(%esp), %eax - subl 4(%esp), %eax - movl %eax, 32(%esp) -..B1.84: - movl 32(%esp), %eax - lea -1(%eax), %edx - cmpl $2046, %edx - jb ..B1.92 -..B1.85: - cmpl $2047, 32(%esp) - jge ..B1.91 -..B1.86: - negl %eax - incl %eax - orl $1048576, 36(%esp) - movl %eax, 32(%esp) - cmpl $32, %eax - jge ..B1.88 -..B1.87: - movl %eax, %ecx - movl %ecx, %edx - negl %edx - movl $-1, %edi - movl 20(%esp), %eax - movl %eax, %ebx - shrl %cl, %edi - movl %edx, %ecx - movl 40(%esp), %esi - notl %edi - shll %cl, %esi - movl 32(%esp), %ecx - andl %edi, %esi - shrl %cl, %ebx - movl %edx, %ecx - shll %cl, %eax - orl %ebx, %esi - testl %edi, %eax - movl $0, %eax - setne %al - orl %esi, %eax - movl %eax, 20(%esp) - movl 36(%esp), %eax - movl %eax, %esi - shll %cl, %esi - movl 32(%esp), %ecx - andl %edi, %esi - movl 40(%esp), %edi - shrl %cl, %edi - orl %esi, %edi - movl %edi, 40(%esp) - shrl %cl, %eax - jmp ..B1.93 -..B1.88: - xorl %eax, %eax - cmpl $53, 32(%esp) - jg ..B1.90 -..B1.89: - movl %eax, (%esp) - movl 32(%esp), %eax - movl %eax, %edx - negl %edx - movl %eax, %ecx - movl %edx, 4(%esp) - movl $-1, %edx - shrl %cl, %edx - movl 4(%esp), %ecx - notl %edx - movl 36(%esp), %edi - movl 40(%esp), %esi - movl %esi, %ebx - shll %cl, %edi - movl %eax, %ecx - shrl %cl, %ebx - andl %edx, %edi - movl 4(%esp), %ecx - orl %ebx, %edi - shll %cl, %esi - movl %eax, %ecx - andl %edx, %esi - xorl %edx, %edx - orl 20(%esp), %esi - movl 36(%esp), %esi - setne %dl - shrl %cl, %esi - orl %edi, %edx - movl (%esp), %eax - movl %edx, 20(%esp) - movl %esi, 40(%esp) - jmp ..B1.93 -..B1.90: - movl $1, 20(%esp) - movl %eax, 40(%esp) - jmp ..B1.94 -..B1.91: - movl 60(%esp), %eax - shrl $31, %eax - movl 64(%esp), %edx - fldl _large_value_64@GOTOFF(%edx,%eax,8) - fmull _large_value_64@GOTOFF(%edx) - fstl 8(%esp) - fstl (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.92: - movl %eax, %edx - shll $20, %edx - movl 36(%esp), %eax - orl %edx, %eax -..B1.93: - cmpl $0, 20(%esp) - je ..B1.122 -..B1.94: - movl 64(%esp), %edx - cmpl $0, 56(%esp) - fldl _small_value_64@GOTOFF(%edx) - fldl _ones@GOTOFF(%edx) - fadd %st(1), %st - fstpl 8(%esp) - je ..B1.124 -..B1.95: - cmpl $3072, 56(%esp) - je ..B1.118 -..B1.96: - cmpl $2048, 56(%esp) - jne ..B1.107 -..B1.97: - cmpl $0, 60(%esp) - je ..B1.99 -..B1.98: - cmpl $1048576, %eax - jb ..B1.104 - jmp ..B1.139 -..B1.99: - cmpl $1048575, %eax - jb ..B1.104 -..B1.100: - jne ..B1.105 -..B1.101: - cmpl $-1, 40(%esp) - jb ..B1.104 -..B1.102: - jne ..B1.105 -..B1.103: - cmpl $-2147483648, 20(%esp) - jae ..B1.105 -..B1.104: - fmul %st(0), %st - fstl 8(%esp) - cmpl $0, 60(%esp) - jne ..B1.139 -..B1.105: - fstp %st(0) - xorl %edx, %edx - incl 40(%esp) - sete %dl - addl %edx, %eax - cmpl $2146435072, %eax - jb ..B1.122 -..B1.106: - movl 60(%esp), %eax - shrl $31, %eax - movl 64(%esp), %edx - fldl _large_value_64@GOTOFF(%edx,%eax,8) - fmull _large_value_64@GOTOFF(%edx) - fstl 8(%esp) - fstl (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.107: - cmpl $1024, 56(%esp) - jne ..B1.139 -..B1.108: - cmpl $0, 60(%esp) - jne ..B1.110 -..B1.109: - cmpl $1048576, %eax - jb ..B1.115 - jmp ..B1.139 -..B1.110: - cmpl $1048575, %eax - jb ..B1.115 -..B1.111: - jne ..B1.116 -..B1.112: - cmpl $-1, 40(%esp) - jb ..B1.115 -..B1.113: - jne ..B1.116 -..B1.114: - cmpl $-2147483648, 20(%esp) - jae ..B1.116 -..B1.115: - fmul %st(0), %st - fstl 8(%esp) - cmpl $0, 60(%esp) - je ..B1.139 -..B1.116: - fstp %st(0) - xorl %edx, %edx - incl 40(%esp) - sete %dl - addl %edx, %eax - cmpl $2146435072, %eax - jb ..B1.122 -..B1.117: - movl 60(%esp), %eax - shrl $31, %eax - movl 64(%esp), %edx - fldl _large_value_64@GOTOFF(%edx,%eax,8) - fmull _large_value_64@GOTOFF(%edx) - fstl 8(%esp) - fstl (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.118: - cmpl $1048576, %eax - jb ..B1.121 -..B1.119: - lea -1048576(%eax), %edx - orl 40(%esp), %edx - jne ..B1.139 -..B1.120: - cmpl $-2147483648, 20(%esp) - jne ..B1.139 -..B1.121: - fmul %st(0), %st - fstpl 8(%esp) -..B1.122: - movl 60(%esp), %edx - orl %eax, %edx - movl 40(%esp), %eax - movl %edx, 4(%esp) - movl %eax, (%esp) - fldl (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.123: - xorl %eax, %eax - cmpl $1024, 56(%esp) - movl 64(%esp), %edi - sete %al - fldl _zeros@GOTOFF(%edi,%eax,8) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.124: - testl $-2147483648, 20(%esp) - je ..B1.118 -..B1.125: - movl 40(%esp), %ecx - movl 20(%esp), %edx - andl $1, %ecx - andl $2147483647, %edx - orl %edx, %ecx - je ..B1.118 -..B1.126: - xorl %edx, %edx - incl 40(%esp) - sete %dl - addl %edx, %eax - cmpl $2146435072, %eax - jb ..B1.118 -..B1.127: - fstp %st(0) - movl 60(%esp), %eax - shrl $31, %eax - movl 64(%esp), %edx - fldl _large_value_64@GOTOFF(%edx,%eax,8) - fmull _large_value_64@GOTOFF(%edx) - fstl 8(%esp) - fstl (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.139: - fstp %st(0) - jmp ..B1.122 - .align 16,0x90 - .type fma,@function - .size fma,.-fma - .data -# -- End fma - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaf_wmt.S deleted file mode 100644 index b76202b99e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaf_wmt.S +++ /dev/null @@ -1,425 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmaf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin fmaf - .text - .align 16,0x90 - .globl fmaf -fmaf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $136, %esp - movl %ebx, 80(%esp) - call static_func - movl %eax, %ebx - movss 144(%esp), %xmm0 - movss 148(%esp), %xmm1 - movss 152(%esp), %xmm2 - movss %xmm0, 8(%esp) - movss %xmm1, 16(%esp) - movss %xmm2, 24(%esp) - movl 8(%esp), %eax - ucomiss %xmm1, %xmm0 - movl 16(%esp), %ecx - jp .L_2TAG_PACKET_0.0.2 - movl 24(%esp), %edx - ucomiss %xmm2, %xmm2 - jp .L_2TAG_PACKET_1.0.2 - andl $2147483647, %eax - je .L_2TAG_PACKET_2.0.2 - cmpl $1065353216, %eax - je .L_2TAG_PACKET_3.0.2 - cmpl $2139095040, %eax - je .L_2TAG_PACKET_4.0.2 - andl $2147483647, %ecx - je .L_2TAG_PACKET_2.0.2 - cmpl $1065353216, %ecx - je .L_2TAG_PACKET_3.0.2 - cmpl $2139095040, %ecx - je .L_2TAG_PACKET_4.0.2 - andl $2147483647, %edx - je .L_2TAG_PACKET_5.0.2 - cmpl $2139095040, %edx - je .L_2TAG_PACKET_6.0.2 - cmpl $8388608, %eax - jl .L_2TAG_PACKET_7.0.2 - cvtps2pd %xmm0, %xmm3 -.L_2TAG_PACKET_8.0.2: - cmpl $8388608, %ecx - jl .L_2TAG_PACKET_9.0.2 - cvtps2pd %xmm1, %xmm4 -.L_2TAG_PACKET_10.0.2: - cmpl $8388608, %edx - jl .L_2TAG_PACKET_11.0.2 - cvtps2pd %xmm2, %xmm0 -.L_2TAG_PACKET_12.0.2: - mulsd %xmm4, %xmm3 - pextrw $3, %xmm3, %edx - andl $32752, %edx - movl $96, %eax - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - addl %edx, %eax - subl %ecx, %eax - cmpl $560, %eax - jae .L_2TAG_PACKET_13.0.2 - addsd %xmm3, %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_0.0.2: -.L_2TAG_PACKET_2.0.2: -.L_2TAG_PACKET_3.0.2: -.L_2TAG_PACKET_4.0.2: -.L_2TAG_PACKET_5.0.2: - flds 8(%esp) - fmuls 16(%esp) - fadds 24(%esp) - jmp .L_2TAG_PACKET_15.0.2 -.L_2TAG_PACKET_1.0.2: - flds 8(%esp) - fadds 24(%esp) - jmp .L_2TAG_PACKET_15.0.2 -.L_2TAG_PACKET_6.0.2: - flds 24(%esp) - jmp .L_2TAG_PACKET_15.0.2 -.L_2TAG_PACKET_7.0.2: - movaps (%ebx), %xmm3 - pand %xmm0, %xmm3 - movaps 48(%ebx), %xmm5 - orpd 16(%ebx), %xmm3 - pand %xmm0, %xmm5 - subsd 16(%ebx), %xmm3 - psllq $32, %xmm5 - mulsd 32(%ebx), %xmm3 - orpd %xmm5, %xmm3 - jmp .L_2TAG_PACKET_8.0.2 -.L_2TAG_PACKET_9.0.2: - movaps (%ebx), %xmm4 - pand %xmm1, %xmm4 - movaps 48(%ebx), %xmm5 - orpd 16(%ebx), %xmm4 - pand %xmm1, %xmm5 - subsd 16(%ebx), %xmm4 - psllq $32, %xmm5 - mulsd 32(%ebx), %xmm4 - orpd %xmm5, %xmm4 - jmp .L_2TAG_PACKET_10.0.2 -.L_2TAG_PACKET_11.0.2: - movaps (%ebx), %xmm0 - pand %xmm2, %xmm0 - movaps 48(%ebx), %xmm5 - orpd 16(%ebx), %xmm0 - pand %xmm2, %xmm5 - subsd 16(%ebx), %xmm0 - psllq $32, %xmm5 - mulsd 32(%ebx), %xmm0 - orpd %xmm5, %xmm0 - jmp .L_2TAG_PACKET_12.0.2 -.L_2TAG_PACKET_13.0.2: - pextrw $1, %xmm2, %ecx - pextrw $3, %xmm3, %edx - sarl $4, %eax - xorl %edx, %ecx - testl $32768, %ecx - jne .L_2TAG_PACKET_16.0.2 - cmpl $53, %eax - jge .L_2TAG_PACKET_17.0.2 - cmpl $-19, %eax - jle .L_2TAG_PACKET_18.0.2 - cmpl $6, %eax - jge .L_2TAG_PACKET_19.0.2 - movl $6, %ecx - subl %eax, %ecx - addl $58, %eax - movsd 64(%ebx), %xmm1 - pand 64(%ebx), %xmm3 - pxor %xmm5, %xmm5 - por 96(%ebx), %xmm3 - pxor %xmm2, %xmm2 - pinsrw $0, %eax, %xmm5 - pinsrw $0, %ecx, %xmm2 - pand %xmm0, %xmm1 - pand 80(%ebx), %xmm0 - movdqa %xmm3, %xmm4 - psllq %xmm5, %xmm3 - por 96(%ebx), %xmm1 - psrlq %xmm2, %xmm4 - psrlq $40, %xmm3 - paddq %xmm4, %xmm1 - movdqa %xmm1, %xmm5 - psrlq $53, %xmm1 - movdqa %xmm5, %xmm4 - psrlq %xmm1, %xmm5 - pand %xmm1, %xmm4 - psllq $52, %xmm1 - por %xmm3, %xmm5 - paddq %xmm1, %xmm0 - por %xmm4, %xmm5 - pand 64(%ebx), %xmm5 - por %xmm5, %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_17.0.2: - movapd 112(%ebx), %xmm0 - orpd %xmm3, %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_18.0.2: - orpd 112(%ebx), %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_19.0.2: - movl $70, %ecx - subl %eax, %ecx - subl $6, %eax - movsd 64(%ebx), %xmm1 - pand 64(%ebx), %xmm0 - pxor %xmm5, %xmm5 - por 96(%ebx), %xmm0 - pxor %xmm2, %xmm2 - pinsrw $0, %ecx, %xmm5 - pinsrw $0, %eax, %xmm2 - pand %xmm3, %xmm1 - pand 80(%ebx), %xmm3 - movdqa %xmm0, %xmm4 - psllq %xmm5, %xmm0 - por 96(%ebx), %xmm1 - psrlq %xmm2, %xmm4 - pxor %xmm2, %xmm2 - psrlq $18, %xmm0 - psubq %xmm0, %xmm2 - paddq %xmm4, %xmm1 - psrlq $63, %xmm2 - movdqa %xmm1, %xmm0 - psrlq $53, %xmm1 - movdqa %xmm0, %xmm4 - psrlq %xmm1, %xmm0 - pand %xmm1, %xmm4 - psllq $52, %xmm1 - por %xmm2, %xmm0 - paddq %xmm1, %xmm3 - por %xmm4, %xmm0 - pand 64(%ebx), %xmm0 - por %xmm3, %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_16.0.2: - cmpl $53, %eax - jge .L_2TAG_PACKET_20.0.2 - cmpl $-22, %eax - jle .L_2TAG_PACKET_21.0.2 - cmpl $6, %eax - jge .L_2TAG_PACKET_22.0.2 - movl $6, %ecx - subl %eax, %ecx - addl $58, %eax - movsd 64(%ebx), %xmm1 - pand 64(%ebx), %xmm3 - pxor %xmm5, %xmm5 - por 96(%ebx), %xmm3 - pxor %xmm2, %xmm2 - pinsrw $0, %eax, %xmm5 - pinsrw $0, %ecx, %xmm2 - pand %xmm0, %xmm1 - pand 80(%ebx), %xmm0 - movdqa %xmm3, %xmm4 - psllq %xmm5, %xmm3 - por 96(%ebx), %xmm1 - psrlq %xmm2, %xmm4 - pxor %xmm2, %xmm2 - psrlq $37, %xmm3 - psubq %xmm3, %xmm2 - psubq %xmm4, %xmm1 - psrlq $63, %xmm2 - psubq %xmm2, %xmm1 - movdqa %xmm1, %xmm3 - movsd 112(%ebx), %xmm2 - psrlq $52, %xmm1 - psubq %xmm1, %xmm2 - movdqa %xmm2, %xmm1 - psllq $52, %xmm2 - psllq %xmm1, %xmm3 - pand 64(%ebx), %xmm3 - psubq %xmm2, %xmm0 - por %xmm3, %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_20.0.2: - movsd 64(%ebx), %xmm1 - pand %xmm3, %xmm1 - por 96(%ebx), %xmm1 - psubq 112(%ebx), %xmm1 - movapd %xmm1, %xmm0 - psrlq $52, %xmm1 - movapd 112(%ebx), %xmm4 - psubq %xmm1, %xmm4 - psllq %xmm4, %xmm0 - psllq $52, %xmm4 - pand 80(%ebx), %xmm3 - psubq %xmm4, %xmm3 - pand 64(%ebx), %xmm0 - por %xmm3, %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_21.0.2: - movsd 64(%ebx), %xmm1 - pand %xmm0, %xmm1 - por 96(%ebx), %xmm1 - psubq 112(%ebx), %xmm1 - movapd %xmm1, %xmm2 - psrlq $52, %xmm1 - movapd 112(%ebx), %xmm3 - psubq %xmm1, %xmm3 - psllq %xmm3, %xmm2 - psllq $52, %xmm3 - pand 80(%ebx), %xmm0 - psubq %xmm3, %xmm0 - pand 64(%ebx), %xmm2 - por %xmm2, %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_22.0.2: - movl $70, %ecx - subl %eax, %ecx - subl $6, %eax - movsd 64(%ebx), %xmm1 - pand 64(%ebx), %xmm0 - pxor %xmm5, %xmm5 - por 96(%ebx), %xmm0 - pxor %xmm2, %xmm2 - pinsrw $0, %ecx, %xmm5 - pinsrw $0, %eax, %xmm2 - pand %xmm3, %xmm1 - pand 80(%ebx), %xmm3 - movdqa %xmm0, %xmm4 - psllq %xmm5, %xmm0 - por 96(%ebx), %xmm1 - psrlq %xmm2, %xmm4 - pxor %xmm2, %xmm2 - psrlq $18, %xmm0 - psubq %xmm0, %xmm2 - psubq %xmm4, %xmm1 - psrlq $63, %xmm2 - psubq %xmm2, %xmm1 - movdqa %xmm1, %xmm0 - movsd 112(%ebx), %xmm2 - psrlq $52, %xmm1 - psubq %xmm1, %xmm2 - movdqa %xmm2, %xmm1 - psllq $52, %xmm2 - psllq %xmm1, %xmm0 - pand 64(%ebx), %xmm0 - psubq %xmm2, %xmm3 - por %xmm3, %xmm0 - jmp .L_2TAG_PACKET_14.0.2 -.L_2TAG_PACKET_14.0.2: - movq %xmm0, (%esp) - fldl (%esp) - fstps 32(%esp) - flds 32(%esp) -.L_2TAG_PACKET_15.0.2: - movl 80(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type fmaf,@function - .size fmaf,.-fmaf - .data -# -- End fmaf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 970981376 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 4294967295 - .long 1048575 - .long 0 - .long 0 - .long 0 - .long 4293918720 - .long 0 - .long 0 - .long 0 - .long 1048576 - .long 0 - .long 0 - .long 1 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,128 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmal.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmal.S deleted file mode 100644 index d7267db387..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmal.S +++ /dev/null @@ -1,1483 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmal.c" - .text -..TXTST0: -# -- Begin fmal - .text - .align 16,0x90 - .globl fmal -fmal: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -# parameter 3: 32 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $100, %esp -..B1.2: - fnstcw 62(%esp) -..B1.3: - fnstcw 88(%esp) -..B1.4: - movzbl 17(%ebp), %edi - movzbl 41(%ebp), %ebx - andl $128, %edi - andl $128, %ebx - movzbl 29(%ebp), %edx - shrl $7, %edi - andl $128, %edx - shrl $7, %ebx - movzwl 88(%esp), %ecx - movl %edi, 80(%esp) - andl $3072, %ecx - movl %ebx, 84(%esp) - movzwl 16(%ebp), %edi - movzwl 40(%ebp), %ebx - movl %ebx, %eax - movl %ecx, 72(%esp) - movl %edi, %ecx - shrl $7, %edx - andl $32767, %ecx - movzwl 28(%ebp), %esi - andl $32767, %eax - movl %edx, 32(%esp) - movl %esi, %edx - movl %eax, 56(%esp) - andl $32767, %edx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - cmpl $32767, %ecx - movl %eax, 76(%esp) - je ..B1.21 -..B1.5: - testl %ecx, %ecx - jne ..B1.8 -..B1.6: - cmpl $0, 12(%ebp) - jne ..B1.9 -..B1.7: - cmpl $0, 8(%ebp) - je ..B1.20 - jmp ..B1.9 -..B1.8: - cmpl $16383, %ecx - je ..B1.204 -..B1.9: - cmpl $32767, %edx - je ..B1.18 -..B1.10: - testl %edx, %edx - jne ..B1.13 -..B1.11: - cmpl $0, 24(%ebp) - jne ..B1.14 -..B1.12: - cmpl $0, 20(%ebp) - je ..B1.18 - jmp ..B1.14 -..B1.13: - cmpl $16383, %edx - je ..B1.202 -..B1.14: - cmpl $32767, 56(%esp) - je ..B1.18 -..B1.15: - cmpl $0, 56(%esp) - jne ..B1.54 -..B1.16: - cmpl $0, 36(%ebp) - jne ..B1.54 -..B1.17: - cmpl $0, 32(%ebp) - jne ..B1.54 -..B1.18: - testl %ecx, %ecx - jne ..B1.21 -..B1.19: - cmpl $0, 12(%ebp) - jne ..B1.27 -..B1.209: - cmpl $0, 8(%ebp) -..B1.20: - jne ..B1.27 -..B1.21: - testl %edx, %edx - jne ..B1.24 -..B1.22: - cmpl $0, 24(%ebp) - jne ..B1.27 -..B1.23: - cmpl $0, 20(%ebp) - jne ..B1.27 -..B1.24: - cmpl $0, 56(%esp) - jne ..B1.28 -..B1.25: - cmpl $0, 36(%ebp) - jne ..B1.27 -..B1.26: - cmpl $0, 32(%ebp) - je ..B1.28 -..B1.27: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl 64(%esp) -..B1.28: - cmpl $32767, %ecx - je ..B1.185 -..B1.29: - cmpl $32767, %edx - je ..B1.176 -..B1.30: - cmpl $32767, 56(%esp) - je ..B1.167 -..B1.31: - cmpl $32767, %ecx - jge ..B1.34 -..B1.32: - cmpl $32767, %edx - jge ..B1.34 -..B1.33: - cmpl $32767, 56(%esp) - je ..B1.206 -..B1.34: - movzwl 62(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.166 -..B1.35: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.36: - fldcw 60(%esp) -..B1.37: - movzwl 16(%ebp), %edi - movl $1, %edx -..B1.38: - fldt 8(%ebp) - testl $32767, %edi - fldt 20(%ebp) - fmulp %st, %st(1) - jne ..B1.41 -..B1.39: - cmpl $0, 12(%ebp) - jne ..B1.41 -..B1.40: - cmpl $0, 8(%ebp) - je ..B1.50 -..B1.41: - movzwl 28(%ebp), %eax - testl $32767, %eax - jne ..B1.46 -..B1.42: - cmpl $0, 24(%ebp) - jne ..B1.46 -..B1.43: - cmpl $0, 20(%ebp) - je ..B1.50 -..B1.46: - fstpt 20(%esp) - fldt 20(%esp) -..B1.47: - movzwl 28(%esp), %eax - testl $32767, %eax - jne ..B1.50 -..B1.48: - cmpl $0, 24(%esp) - jne ..B1.50 -..B1.49: - cmpl $0, 20(%esp) - je ..B1.51 -..B1.50: - fldt 32(%ebp) - faddp %st, %st(1) - fstpt 20(%esp) - fldt 20(%esp) -..B1.51: - fstp %st(0) - testl %edx, %edx - je ..B1.53 -..B1.52: - fldcw 62(%esp) -..B1.53: - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.54: - testl %ecx, %ecx - je ..B1.57 -..B1.55: - testl %edx, %edx - je ..B1.57 -..B1.56: - cmpl $0, 56(%esp) - jne ..B1.69 -..B1.57: - fldl _smallest_value_64@GOTOFF(%eax) - movzwl 62(%esp), %eax - movl %eax, (%esp) - andl $768, %eax - fstpl 64(%esp) - cmpl $768, %eax - je ..B1.201 -..B1.58: - movl (%esp), %eax - orl $-64768, %eax - movw %ax, 60(%esp) -..B1.59: - fldcw 60(%esp) -..B1.60: - movzwl 16(%ebp), %edi - movl $1, %eax - movzwl 28(%ebp), %esi - movzwl 40(%ebp), %ebx -..B1.61: - testl $32767, %edi - jne ..B1.63 -..B1.62: - andl $-32768, %edi - orl $-49153, %edi - movw %di, 16(%ebp) - movl 76(%esp), %ecx - movl 80(%esp), %edi - orl $-2147483648, 12(%ebp) - fldt 8(%ebp) - fsubl _ones@GOTOFF(%ecx,%edi,8) - fstpt 8(%ebp) - movzwl 16(%ebp), %ecx - andl $32767, %ecx - addl $-16382, %ecx -..B1.63: - testl $32767, %esi - jne ..B1.65 -..B1.64: - andl $-32768, %esi - orl $-49153, %esi - movw %si, 28(%ebp) - movl 76(%esp), %edx - movl 32(%esp), %esi - orl $-2147483648, 24(%ebp) - fldt 20(%ebp) - fsubl _ones@GOTOFF(%edx,%esi,8) - fstpt 20(%ebp) - movzwl 28(%ebp), %edx - andl $32767, %edx - addl $-16382, %edx -..B1.65: - testl $32767, %ebx - jne ..B1.67 -..B1.66: - andl $-32768, %ebx - orl $-49153, %ebx - movw %bx, 40(%ebp) - movl 76(%esp), %ebx - movl 84(%esp), %esi - orl $-2147483648, 36(%ebp) - fldt 32(%ebp) - fsubl _ones@GOTOFF(%ebx,%esi,8) - fstpt 32(%ebp) - movzwl 40(%ebp), %edi - andl $32767, %edi - addl $-16382, %edi - movl %edi, 56(%esp) -..B1.67: - testl %eax, %eax - je ..B1.69 -..B1.68: - fldcw 62(%esp) -..B1.69: - movl 36(%ebp), %eax - lea -16383(%ecx,%edx), %edx - movl %eax, 4(%esp) - movl 32(%ebp), %eax - movl %eax, (%esp) - movl 32(%esp), %eax - movl 8(%ebp), %edi - xorl %eax, 80(%esp) - movl %edi, %eax - movl 20(%ebp), %ebx - movl %edx, 52(%esp) - mull %ebx - movl %eax, 44(%esp) - movl %ebx, %eax - movl 12(%ebp), %esi - movl %edx, 20(%esp) - mull %esi - movl %eax, %ecx - movl %edi, %eax - movl 24(%ebp), %ebx - movl %edx, 24(%esp) - mull %ebx - movl %eax, %edi - movl %esi, %eax - movl %edx, 28(%esp) - xorl %esi, %esi - addl %edi, %ecx - adcl $0, %esi - mull %ebx - addl 20(%esp), %ecx - movl %edx, %ebx - movl %ecx, 48(%esp) - adcl $0, %esi - xorl %edx, %edx - addl %eax, %esi - movl 24(%esp), %ecx - adcl $0, %edx - xorl %eax, %eax - addl 28(%esp), %ecx - adcl $0, %eax - addl %ecx, %esi - adcl %eax, %edx - addl %edx, %ebx - movl 52(%esp), %edx - testl $-2147483648, %ebx - je ..B1.71 -..B1.70: - incl %edx - jmp ..B1.72 -..B1.71: - movl %esi, %edi - addl %ebx, %ebx - shrl $31, %edi - addl %esi, %esi - movl 48(%esp), %eax - orl %edi, %ebx - movl %eax, %edi - addl %eax, %eax - shrl $31, %edi - movl 44(%esp), %ecx - orl %edi, %esi - movl %ecx, %edi - addl %ecx, %ecx - shrl $31, %edi - orl %edi, %eax - movl %eax, 48(%esp) - movl %ecx, 44(%esp) -..B1.72: - cmpl 56(%esp), %edx - jg ..B1.77 -..B1.73: - jne ..B1.78 -..B1.74: - cmpl 4(%esp), %ebx - ja ..B1.77 -..B1.75: - jne ..B1.78 -..B1.76: - cmpl (%esp), %esi - jb ..B1.78 -..B1.77: - movl %edx, %eax - subl 56(%esp), %eax - movl 4(%esp), %edi - movl %eax, 32(%esp) - movl (%esp), %eax - movl %edi, 28(%esp) - xorl %edi, %edi - movl %eax, 36(%esp) - movl %edi, 40(%esp) - jmp ..B1.79 -..B1.78: - movl 56(%esp), %eax - movl %eax, %edi - subl %edx, %edi - movl %eax, %edx - movl 80(%esp), %eax - movl %eax, 84(%esp) - movzbl 41(%ebp), %eax - movl %ebx, 28(%esp) - andl $128, %eax - movl 48(%esp), %ebx - movl %edi, 32(%esp) - shrl $7, %eax - movl %esi, 36(%esp) - movl %ebx, 40(%esp) - movl 44(%esp), %edi - movl %eax, 80(%esp) - xorl %eax, %eax - movl 4(%esp), %ebx - movl (%esp), %esi - movl %eax, 44(%esp) - movl %eax, 48(%esp) -..B1.79: - cmpl $0, 32(%esp) - je ..B1.89 -..B1.80: - cmpl $32, 32(%esp) - jge ..B1.82 -..B1.81: - movl %esi, 20(%esp) - movl %edi, %eax - movl 32(%esp), %esi - movl %esi, %ecx - movl %edx, 52(%esp) - movl %esi, %edx - movl %ebx, 24(%esp) - negl %edx - movl $-1, %ebx - shrl %cl, %ebx - movl %edx, %ecx - shll %cl, %eax - notl %ebx - movl %eax, 56(%esp) - movl 40(%esp), %eax - shll %cl, %eax - movl %esi, %ecx - shrl %cl, %edi - andl %ebx, %eax - orl %eax, %edi - movl %edx, %ecx - movl %edi, 4(%esp) - movl 36(%esp), %edi - movl %edi, %eax - shll %cl, %eax - movl %esi, %ecx - andl %ebx, %eax - movl %eax, (%esp) - movl 40(%esp), %eax - shrl %cl, %eax - movl %edx, %ecx - orl (%esp), %eax - movl 28(%esp), %edx - movl %eax, 40(%esp) - movl %edx, %eax - shll %cl, %eax - movl %esi, %ecx - shrl %cl, %edi - andl %ebx, %eax - shrl %cl, %edx - orl %eax, %edi - movl %edi, 36(%esp) - movl %edx, 28(%esp) - movl 20(%esp), %esi - movl 52(%esp), %edx - movl 24(%esp), %ebx - movl 4(%esp), %edi - jmp ..B1.90 -..B1.82: - cmpl $64, 32(%esp) - jge ..B1.84 -..B1.83: - movl %ebx, 24(%esp) - movl 32(%esp), %ebx - movl %ebx, %ecx - movl %edx, 52(%esp) - movl %ebx, %edx - movl %esi, 20(%esp) - negl %edx - movl $-1, %esi - shrl %cl, %esi - movl %edx, %ecx - movl 40(%esp), %eax - notl %esi - shll %cl, %eax - xorl %ecx, %ecx - testl %edi, %edi - movl %esi, (%esp) - setne %cl - andl (%esp), %eax - movl 36(%esp), %esi - orl %ecx, %eax - movl %edx, %ecx - movl %esi, %edi - shll %cl, %edi - movl %ebx, %ecx - movl %eax, 56(%esp) - movl 40(%esp), %eax - andl (%esp), %edi - shrl %cl, %eax - movl %edx, %ecx - movl 28(%esp), %edx - orl %eax, %edi - movl %edx, %eax - shll %cl, %eax - movl %ebx, %ecx - andl (%esp), %eax - shrl %cl, %esi - shrl %cl, %edx - orl %esi, %eax - movl %edx, 36(%esp) - movl %eax, 40(%esp) - movl $0, 28(%esp) - movl 20(%esp), %esi - movl 52(%esp), %edx - movl 24(%esp), %ebx - jmp ..B1.90 -..B1.84: - cmpl $96, 32(%esp) - jge ..B1.86 -..B1.85: - movl %edx, 52(%esp) - movl 32(%esp), %edx - movl %edx, %ecx - movl %ebx, 24(%esp) - movl %edx, %ebx - movl %esi, 20(%esp) - movl $-1, %esi - negl %ebx - movl %ebx, (%esp) - shrl %cl, %esi - xorl %ebx, %ebx - orl 40(%esp), %edi - notl %esi - movl (%esp), %ecx - movl 36(%esp), %eax - setne %bl - shll %cl, %eax - andl %esi, %eax - orl %ebx, %eax - movl %eax, 56(%esp) - movl 28(%esp), %eax - movl %eax, %edi - shll %cl, %edi - movl %edx, %ecx - andl %esi, %edi - xorl %edx, %edx - movl 36(%esp), %esi - shrl %cl, %esi - shrl %cl, %eax - orl %esi, %edi - movl %edx, 36(%esp) - movl %edx, 28(%esp) - movl %eax, 40(%esp) - movl 20(%esp), %esi - movl 52(%esp), %edx - movl 24(%esp), %ebx - jmp ..B1.90 -..B1.86: - cmpl $128, 32(%esp) - jge ..B1.88 -..B1.87: - movl %edx, 52(%esp) - movl 32(%esp), %edx - movl %edx, %eax - movl %ebx, 24(%esp) - negl %eax - movl %edx, %ecx - movl $-1, %ebx - movl %esi, 20(%esp) - movl 28(%esp), %esi - shrl %cl, %ebx - movl %eax, %ecx - movl %esi, %eax - notl %ebx - shll %cl, %eax - movl 36(%esp), %ecx - andl %ebx, %eax - orl 40(%esp), %ecx - xorl %ebx, %ebx - orl %edi, %ecx - movl %edx, %ecx - movl %esi, %edi - setne %bl - xorl %edx, %edx - movl %edx, 40(%esp) - orl %ebx, %eax - movl %edx, 36(%esp) - movl %edx, 28(%esp) - movl %eax, 56(%esp) - shrl %cl, %edi - movl 20(%esp), %esi - movl 52(%esp), %edx - movl 24(%esp), %ebx - jmp ..B1.90 -..B1.88: - movl 28(%esp), %ecx - orl 36(%esp), %ecx - xorl %eax, %eax - orl 40(%esp), %ecx - orl %edi, %ecx - setne %al - xorl %edi, %edi - movl %eax, 56(%esp) - movl %edi, 40(%esp) - movl %edi, 36(%esp) - movl %edi, 28(%esp) - jmp ..B1.90 -..B1.89: - movl $0, 56(%esp) -..B1.90: - movl 80(%esp), %eax - cmpl 84(%esp), %eax - jne ..B1.94 -..B1.91: - movl 44(%esp), %eax - addl %eax, %edi - cmpl %eax, %edi - movl $0, %eax - movl 48(%esp), %ecx - setb %al - addl 40(%esp), %ecx - movl %edi, 4(%esp) - movl $0, %edi - adcl $0, %edi - addl %eax, %ecx - adcl $0, %edi - xorl %eax, %eax - addl 36(%esp), %esi - movl %ecx, 48(%esp) - adcl $0, %eax - addl %edi, %esi - adcl $0, %eax - xorl %edi, %edi - addl 28(%esp), %ebx - adcl $0, %edi - addl %eax, %ebx - adcl $0, %edi - movl 4(%esp), %edi - je ..B1.93 -..B1.92: - orl 48(%esp), %edi - movl %esi, %eax - shll $31, %eax - incl %edx - orl 56(%esp), %edi - movl %eax, 36(%esp) - movl %ebx, %edi - movl $0, %eax - setne %al - shll $31, %edi - shrl $1, %esi - shrl $1, %ebx - orl %edi, %esi - orl %eax, 36(%esp) - orl $-2147483648, %ebx - jmp ..B1.116 -..B1.93: - orl 56(%esp), %edi - movl $0, %eax - setne %al - orl 48(%esp), %eax - movl %eax, 36(%esp) - jmp ..B1.116 -..B1.94: - negl 56(%esp) - movl %edx, 52(%esp) - movl $0, %edx - movl 44(%esp), %ecx - setne %dl - xorl %eax, %eax - subl %edi, %ecx - movl 48(%esp), %edi - sbbl $0, %eax - subl %edx, %ecx - movl %ecx, 44(%esp) - sbbl $0, %eax - xorl %ecx, %ecx - subl 40(%esp), %edi - cltd - sbbl $0, %ecx - addl %eax, %edi - movl %edi, 48(%esp) - adcl %edx, %ecx - xorl %edi, %edi - subl 36(%esp), %esi - movl %ecx, %eax - cltd - sbbl $0, %edi - addl %esi, %ecx - movl %ecx, 32(%esp) - adcl %edx, %edi - subl 28(%esp), %ebx - movl 52(%esp), %edx - addl %edi, %ebx - je ..B1.96 -..B1.95: - movl $0, 28(%esp) - movl %ebx, %eax - jmp ..B1.104 -..B1.96: - cmpl $0, 32(%esp) - je ..B1.98 -..B1.97: - movl %ecx, %eax - movl $32, 28(%esp) - jmp ..B1.104 -..B1.98: - cmpl $0, 48(%esp) - je ..B1.100 -..B1.99: - movl 48(%esp), %eax - movl $64, 28(%esp) - jmp ..B1.104 -..B1.100: - cmpl $0, 44(%esp) - je ..B1.102 -..B1.101: - movl 44(%esp), %eax - movl $96, 28(%esp) - jmp ..B1.104 -..B1.102: - cmpl $0, 56(%esp) - je ..B1.165 -..B1.103: - movl 56(%esp), %eax - movl $128, 28(%esp) -..B1.104: - testl $-2147483648, %eax - jne ..B1.108 -..B1.105: - movl 28(%esp), %esi -..B1.106: - addl %eax, %eax - incl %esi - testl $-2147483648, %eax - je ..B1.106 -..B1.107: - movl %esi, 28(%esp) -..B1.108: - cmpl $32, 28(%esp) - jge ..B1.110 -..B1.109: - movl 28(%esp), %edi - movl %edi, %esi - movl %edx, 52(%esp) - movl %edi, %ecx - movl $1, %edx - negl %esi - movl %esi, (%esp) - shll %cl, %edx - movl 44(%esp), %esi - decl %edx - orl 56(%esp), %esi - movl %ebx, 24(%esp) - movl 48(%esp), %ebx - movl %ebx, %eax - movl %edx, 4(%esp) - movl $0, %edx - setne %dl - shll %cl, %eax - orl %edx, %eax - movl %eax, 36(%esp) - movl 32(%esp), %eax - movl %eax, %esi - shll %cl, %esi - movl (%esp), %ecx - shrl %cl, %ebx - movl %edi, %ecx - andl 4(%esp), %ebx - orl %ebx, %esi - movl 24(%esp), %ebx - shll %cl, %ebx - movl (%esp), %ecx - shrl %cl, %eax - andl 4(%esp), %eax - movl 52(%esp), %edx - orl %eax, %ebx - jmp ..B1.115 -..B1.110: - cmpl $64, 28(%esp) - jge ..B1.112 -..B1.111: - movl 28(%esp), %eax - movl %eax, %ecx - movl %edx, 52(%esp) - movl $1, %edx - shll %cl, %edx - movl %eax, %esi - decl %edx - negl %esi - cmpl $0, 56(%esp) - movl 44(%esp), %edi - movl %edi, %ebx - movl %edx, 4(%esp) - movl $0, %edx - setne %dl - shll %cl, %ebx - orl %edx, %ebx - movl %ebx, 36(%esp) - movl %esi, (%esp) - movl 48(%esp), %ebx - movl %ebx, %esi - shll %cl, %esi - movl (%esp), %ecx - shrl %cl, %edi - movl %eax, %ecx - andl 4(%esp), %edi - orl %edi, %esi - movl 32(%esp), %edi - shll %cl, %edi - movl (%esp), %ecx - shrl %cl, %ebx - andl 4(%esp), %ebx - movl 52(%esp), %edx - orl %edi, %ebx - jmp ..B1.115 -..B1.112: - cmpl $96, 28(%esp) - jge ..B1.114 -..B1.113: - movl 28(%esp), %eax - movl %eax, %esi - movl %eax, %ecx - movl $1, %edi - movl %edx, 52(%esp) - negl %esi - movl 56(%esp), %edx - movl 44(%esp), %ebx - shll %cl, %edx - movl %esi, (%esp) - movl %ebx, %esi - movl %edx, 36(%esp) - shll %cl, %edi - shll %cl, %esi - decl %edi - movl (%esp), %ecx - shrl %cl, %edx - movl %eax, %ecx - andl %edi, %edx - orl %edx, %esi - movl 48(%esp), %edx - shll %cl, %edx - movl (%esp), %ecx - shrl %cl, %ebx - andl %edi, %ebx - orl %edx, %ebx - movl 52(%esp), %edx - jmp ..B1.115 -..B1.114: - movl 28(%esp), %ecx - xorl %eax, %eax - movl 44(%esp), %ebx - xorl %esi, %esi - shll %cl, %ebx - cmpl $128, %ecx - movl %eax, 36(%esp) - jl ..L3 - movl $0, %ebx -..L3: -..B1.115: - subl 28(%esp), %edx -..B1.116: - lea -1(%edx), %edi - cmpl $32766, %edi - jb ..B1.126 -..B1.117: - cmpl $32767, %edx - jge ..B1.164 -..B1.118: - negl %edx - incl %edx - cmpl $32, %edx - jge ..B1.120 -..B1.119: - movl %edx, %edi - movl %edx, %ecx - negl %edi - xorl %eax, %eax - movl %edi, (%esp) - movl $-1, %edi - shrl %cl, %edi - cmpl $0, 36(%esp) - notl %edi - movl (%esp), %ecx - movl %esi, 20(%esp) - setne %al - shll %cl, %esi - andl %edi, %esi - orl %esi, %eax - movl %eax, 36(%esp) - movl %ebx, %eax - movl (%esp), %ecx - shll %cl, %eax - movl %edx, %ecx - movl 20(%esp), %esi - andl %edi, %eax - shrl %cl, %esi - shrl %cl, %ebx - orl %eax, %esi - jmp ..B1.125 -..B1.120: - cmpl $64, %edx - jge ..B1.122 -..B1.121: - movl %edx, %edi - movl %edx, %ecx - negl %edi - movl $-1, %eax - shrl %cl, %eax - movl %edi, %ecx - movl %ebx, %edi - notl %eax - shll %cl, %edi - movl %edx, %ecx - andl %eax, %edi - xorl %eax, %eax - orl 36(%esp), %esi - movl %ebx, %esi - setne %al - xorl %ebx, %ebx - orl %edi, %eax - movl %eax, 36(%esp) - shrl %cl, %esi - jmp ..B1.125 -..B1.122: - cmpl $96, %edx - jge ..B1.124 -..B1.123: - movl %edx, %edi - movl %edx, %ecx - negl %edi - movl $-1, %eax - movl %ebx, %edx - shrl %cl, %eax - shrl %cl, %edx - movl %edi, %ecx - shll %cl, %ebx - notl %eax - andl %eax, %ebx - orl %esi, %ebx - orl 36(%esp), %ebx - movl $0, %ebx - setne %bl - xorl %esi, %esi - orl %edx, %ebx - movl %ebx, 36(%esp) - xorl %ebx, %ebx - jmp ..B1.125 -..B1.124: - xorl %esi, %esi - movl $1, 36(%esp) - xorl %ebx, %ebx -..B1.125: - xorl %edx, %edx -..B1.126: - cmpl $0, 36(%esp) - je ..B1.163 -..B1.127: - movl 76(%esp), %edi - cmpl $0, 72(%esp) - fldt _small_value_80@GOTOFF(%edi) - fldl _ones@GOTOFF(%edi) - fadd %st(1), %st - fstpt 8(%esp) - je ..B1.194 -..B1.128: - cmpl $3072, 72(%esp) - je ..B1.159 -..B1.129: - cmpl $2048, 72(%esp) - jne ..B1.144 -..B1.130: - testl %edx, %edx - jne ..B1.138 -..B1.131: - cmpl $0, 80(%esp) - jne ..B1.137 -..B1.132: - cmpl $2147483647, %ebx - jb ..B1.137 -..B1.133: - jne ..B1.139 -..B1.134: - cmpl $-1, %esi - jb ..B1.137 -..B1.135: - jne ..B1.139 -..B1.136: - cmpl $-2147483648, 36(%esp) - jae ..B1.139 -..B1.137: - fmul %st(0), %st - fstpt 8(%esp) - fldt 8(%esp) -..B1.138: - cmpl $0, 80(%esp) - jne ..B1.211 -..B1.139: - fstp %st(0) - incl %esi - jne ..B1.142 -..B1.140: - movl $-2147483648, %edi - testl %edx, %edx - je ..L4 - movl $0, %edi -..L4: - incl %ebx - cmpl %edi, %ebx - jne ..B1.142 -..B1.141: - orl $-2147483648, %ebx - incl %edx -..B1.142: - cmpl $32767, %edx - jl ..B1.163 -..B1.143: - movl 80(%esp), %edx - movl 76(%esp), %ebx - lea (,%edx,8), %eax - fldt _large_value_80@GOTOFF(%ebx) - lea (%eax,%edx,4), %ecx - fldt _large_value_80@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt 8(%esp) - fldt 8(%esp) - fstpt 20(%esp) - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.144: - cmpl $1024, 72(%esp) - jne ..B1.211 -..B1.145: - testl %edx, %edx - jne ..B1.153 -..B1.146: - cmpl $0, 80(%esp) - je ..B1.152 -..B1.147: - cmpl $2147483647, %ebx - jb ..B1.152 -..B1.148: - jne ..B1.154 -..B1.149: - cmpl $-1, %esi - jb ..B1.152 -..B1.150: - jne ..B1.154 -..B1.151: - cmpl $-2147483648, 36(%esp) - jae ..B1.154 -..B1.152: - fmul %st(0), %st - fstpt 8(%esp) - fldt 8(%esp) -..B1.153: - cmpl $0, 80(%esp) - je ..B1.211 -..B1.154: - fstp %st(0) - incl %esi - jne ..B1.157 -..B1.155: - movl $-2147483648, %edi - testl %edx, %edx - je ..L5 - movl $0, %edi -..L5: - incl %ebx - cmpl %edi, %ebx - jne ..B1.157 -..B1.156: - orl $-2147483648, %ebx - incl %edx -..B1.157: - cmpl $32767, %edx - jl ..B1.163 -..B1.158: - movl 80(%esp), %edx - movl 76(%esp), %ebx - lea (,%edx,8), %eax - fldt _large_value_80@GOTOFF(%ebx) - lea (%eax,%edx,4), %ecx - fldt _large_value_80@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt 8(%esp) - fldt 8(%esp) - fstpt 20(%esp) - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.159: - testl %edx, %edx - je ..B1.162 -..B1.160: - lea -1(%edx), %eax - lea -2147483648(%ebx), %edi - orl %edi, %eax - orl %esi, %eax - jne ..B1.211 -..B1.161: - cmpl $-2147483648, 36(%esp) - jne ..B1.211 -..B1.162: - fmul %st(0), %st - fstpt 8(%esp) -..B1.163: - movzbl 29(%esp), %eax - andl $32767, %edx - movl 80(%esp), %edi - andl $127, %eax - shll $7, %edi - orl %edi, %eax - movb %al, 29(%esp) - movzwl 28(%esp), %edi - andl $-32768, %edi - orl %edx, %edi - movw %di, 28(%esp) - movl %ebx, 24(%esp) - movl %esi, 20(%esp) - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.164: - movl 80(%esp), %edx - movl 76(%esp), %ebx - lea (,%edx,8), %eax - fldt _large_value_80@GOTOFF(%ebx) - lea (%eax,%edx,4), %ecx - fldt _large_value_80@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt 8(%esp) - fldt 8(%esp) - fstpt 20(%esp) - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.165: - xorl %eax, %eax - cmpl $1024, 72(%esp) - movl 76(%esp), %edi - sete %al - fldl _zeros@GOTOFF(%edi,%eax,8) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.166: - xorl %edx, %edx - jmp ..B1.38 -..B1.167: - cmpl $-2147483648, 36(%ebp) - jne ..B1.169 -..B1.168: - cmpl $0, 32(%ebp) - je ..B1.31 -..B1.169: - movzwl 62(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.175 -..B1.170: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.171: - fldcw 60(%esp) -..B1.172: - fldt 32(%ebp) - fldt 8(%ebp) - fmulp %st, %st(1) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt 20(%esp) -..B1.173: - fldcw 62(%esp) -..B1.174: - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.175: - fldt 32(%ebp) - fldt 8(%ebp) - fmulp %st, %st(1) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt 20(%esp) - jmp ..B1.174 -..B1.176: - cmpl $-2147483648, 24(%ebp) - jne ..B1.178 -..B1.177: - cmpl $0, 20(%ebp) - je ..B1.30 -..B1.178: - movzwl 62(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.184 -..B1.179: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.180: - fldcw 60(%esp) -..B1.181: - fldt 20(%ebp) - fldt 32(%ebp) - fmulp %st, %st(1) - fldt 8(%ebp) - fmulp %st, %st(1) - fstpt 20(%esp) -..B1.182: - fldcw 62(%esp) -..B1.183: - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.184: - fldt 20(%ebp) - fldt 32(%ebp) - fmulp %st, %st(1) - fldt 8(%ebp) - fmulp %st, %st(1) - fstpt 20(%esp) - jmp ..B1.183 -..B1.185: - cmpl $-2147483648, 12(%ebp) - jne ..B1.187 -..B1.186: - cmpl $0, 8(%ebp) - je ..B1.29 -..B1.187: - movzwl 62(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.193 -..B1.188: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.189: - fldcw 60(%esp) -..B1.190: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fldt 32(%ebp) - fmulp %st, %st(1) - fstpt 20(%esp) -..B1.191: - fldcw 62(%esp) -..B1.192: - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.193: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fldt 32(%ebp) - fmulp %st, %st(1) - fstpt 20(%esp) - jmp ..B1.192 -..B1.194: - testl $-2147483648, 36(%esp) - je ..B1.159 -..B1.195: - movl %esi, %eax - movl 36(%esp), %edi - andl $1, %eax - andl $2147483647, %edi - orl %edi, %eax - je ..B1.159 -..B1.196: - incl %esi - jne ..B1.199 -..B1.197: - movl $-2147483648, %edi - testl %edx, %edx - je ..L6 - movl $0, %edi -..L6: - incl %ebx - cmpl %edi, %ebx - jne ..B1.199 -..B1.198: - orl $-2147483648, %ebx - incl %edx -..B1.199: - cmpl $32767, %edx - jl ..B1.159 -..B1.200: - fstp %st(0) - movl 80(%esp), %edx - movl 76(%esp), %ebx - lea (,%edx,8), %eax - fldt _large_value_80@GOTOFF(%ebx) - lea (%eax,%edx,4), %ecx - fldt _large_value_80@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt 8(%esp) - fldt 8(%esp) - fstpt 20(%esp) - fldt 20(%esp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.201: - xorl %eax, %eax - jmp ..B1.61 -..B1.202: - cmpl $-2147483648, 24(%ebp) - jne ..B1.14 -..B1.203: - cmpl $0, 20(%ebp) - je ..B1.18 - jmp ..B1.14 -..B1.204: - cmpl $-2147483648, 12(%ebp) - jne ..B1.9 -..B1.205: - cmpl $0, 8(%ebp) - je ..B1.21 - jmp ..B1.9 -..B1.206: - fldt 32(%ebp) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.211: - fstp %st(0) - jmp ..B1.163 - .align 16,0x90 - .type fmal,@function - .size fmal,.-fmal - .data -# -- End fmal - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmax_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmax_wmt.S deleted file mode 100644 index 4359fdb54f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmax_wmt.S +++ /dev/null @@ -1,113 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmax_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin fmax - .text - .align 16,0x90 - .globl fmax -fmax: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $88, %esp - movl %ebx, 32(%esp) - call static_func - movl %eax, %ebx - movsd 96(%esp), %xmm0 - movsd 104(%esp), %xmm1 - ucomisd %xmm0, %xmm1 - jp .L_2TAG_PACKET_0.0.2 - jc .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - fldl 104(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - ucomisd %xmm0, %xmm0 - jp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_1.0.2: - fldl 96(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_3.0.2: - movl 32(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type fmax,@function - .size fmax,.-fmax - .data -# -- End fmax - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaxf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaxf_wmt.S deleted file mode 100644 index 736bb2354a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaxf_wmt.S +++ /dev/null @@ -1,113 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmaxf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin fmaxf - .text - .align 16,0x90 - .globl fmaxf -fmaxf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $88, %esp - movl %ebx, 32(%esp) - call static_func - movl %eax, %ebx - movss 96(%esp), %xmm0 - movss 100(%esp), %xmm1 - ucomiss %xmm0, %xmm1 - jp .L_2TAG_PACKET_0.0.2 - jc .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - flds 100(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - ucomiss %xmm0, %xmm0 - jp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_1.0.2: - flds 96(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_3.0.2: - movl 32(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type fmaxf,@function - .size fmaxf,.-fmaxf - .data -# -- End fmaxf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaxl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaxl.S deleted file mode 100644 index 6f40bb3fc4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmaxl.S +++ /dev/null @@ -1,189 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmaxl.c" - .text -..TXTST0: -# -- Begin fmaxl - .text - .align 16,0x90 - .globl fmaxl -fmaxl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - movl %eax, %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.33 -..B1.4: - movzwl 28(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.16 -..B1.5: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.15 -..B1.6: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.7: - fldcw 12(%esp) -..B1.8: - movl $1, %edx -..B1.9: - fldt 8(%ebp) - fstpt 16(%esp) - fldt 16(%esp) - fldt 20(%ebp) - fxch %st(1) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.11 -..B1.10: - fstp %st(0) - jmp ..B1.12 -..B1.11: - fstpt 16(%esp) -..B1.12: - testl %edx, %edx - je ..B1.14 -..B1.13: - fldcw 14(%esp) -..B1.14: - fldt 16(%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.15: - xorl %edx, %edx - jmp ..B1.9 -..B1.16: - cmpl $-2147483648, 24(%ebp) - jne ..B1.18 -..B1.17: - cmpl $0, 20(%ebp) - je ..B1.5 -..B1.18: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.32 -..B1.19: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.20: - fldcw 12(%esp) -..B1.21: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) -..B1.22: - fldcw 14(%esp) - movzwl 16(%ebp), %eax -..B1.23: - andl $32767, %eax - cmpl $32767, %eax - je ..B1.25 -..B1.24: - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.25: - cmpl $-2147483648, 12(%ebp) - jne ..B1.27 -..B1.26: - cmpl $0, 8(%ebp) - je ..B1.24 -..B1.27: - movzwl 28(%ebp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.29 -..B1.28: - fldt 20(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.29: - cmpl $-2147483648, 24(%ebp) - jne ..B1.31 -..B1.30: - cmpl $0, 20(%ebp) - je ..B1.28 -..B1.31: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.32: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.23 -..B1.33: - cmpl $-2147483648, 12(%ebp) - jne ..B1.18 -..B1.34: - cmpl $0, 8(%ebp) - je ..B1.4 - jmp ..B1.18 - .align 16,0x90 - .type fmaxl,@function - .size fmaxl,.-fmaxl - .data -# -- End fmaxl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmin_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmin_wmt.S deleted file mode 100644 index 1fd7131d75..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmin_wmt.S +++ /dev/null @@ -1,113 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmin_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin fmin - .text - .align 16,0x90 - .globl fmin -fmin: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $88, %esp - movl %ebx, 32(%esp) - call static_func - movl %eax, %ebx - movsd 96(%esp), %xmm0 - movsd 104(%esp), %xmm1 - ucomisd %xmm1, %xmm0 - jp .L_2TAG_PACKET_0.0.2 - jc .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - fldl 104(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - ucomisd %xmm0, %xmm0 - jp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_1.0.2: - fldl 96(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_3.0.2: - movl 32(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type fmin,@function - .size fmin,.-fmin - .data -# -- End fmin - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fminf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fminf_wmt.S deleted file mode 100644 index ccc69eb475..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fminf_wmt.S +++ /dev/null @@ -1,113 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fminf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin fminf - .text - .align 16,0x90 - .globl fminf -fminf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $88, %esp - movl %ebx, 32(%esp) - call static_func - movl %eax, %ebx - movss 96(%esp), %xmm0 - movss 100(%esp), %xmm1 - ucomiss %xmm1, %xmm0 - jp .L_2TAG_PACKET_0.0.2 - jc .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - flds 100(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - ucomiss %xmm0, %xmm0 - jp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_1.0.2: - flds 96(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_3.0.2: - movl 32(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type fminf,@function - .size fminf,.-fminf - .data -# -- End fminf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fminl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fminl.S deleted file mode 100644 index ea94a255d0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fminl.S +++ /dev/null @@ -1,190 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fminl.c" - .text -..TXTST0: -# -- Begin fminl - .text - .align 16,0x90 - .globl fminl -fminl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - movl %eax, %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.33 -..B1.4: - movzwl 28(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.16 -..B1.5: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.15 -..B1.6: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.7: - fldcw 12(%esp) -..B1.8: - movl $1, %edx -..B1.9: - fldt 8(%ebp) - fstpt 16(%esp) - fldt 16(%esp) - fldt 20(%ebp) - fcom %st(1) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - jbe ..B1.11 -..B1.10: - fstp %st(0) - jmp ..B1.12 -..B1.11: - fstpt 16(%esp) -..B1.12: - testl %edx, %edx - je ..B1.14 -..B1.13: - fldcw 14(%esp) -..B1.14: - fldt 16(%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.15: - xorl %edx, %edx - jmp ..B1.9 -..B1.16: - cmpl $-2147483648, 24(%ebp) - jne ..B1.18 -..B1.17: - cmpl $0, 20(%ebp) - je ..B1.5 -..B1.18: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.32 -..B1.19: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.20: - fldcw 12(%esp) -..B1.21: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) -..B1.22: - fldcw 14(%esp) - movzwl 16(%ebp), %eax -..B1.23: - andl $32767, %eax - cmpl $32767, %eax - je ..B1.25 -..B1.24: - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.25: - cmpl $-2147483648, 12(%ebp) - jne ..B1.27 -..B1.26: - cmpl $0, 8(%ebp) - je ..B1.24 -..B1.27: - movzwl 28(%ebp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.29 -..B1.28: - fldt 20(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.29: - cmpl $-2147483648, 24(%ebp) - jne ..B1.31 -..B1.30: - cmpl $0, 20(%ebp) - je ..B1.28 -..B1.31: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.32: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.23 -..B1.33: - cmpl $-2147483648, 12(%ebp) - jne ..B1.18 -..B1.34: - cmpl $0, 8(%ebp) - je ..B1.4 - jmp ..B1.18 - .align 16,0x90 - .type fminl,@function - .size fminl,.-fminl - .data -# -- End fminl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmod_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmod_wmt.S deleted file mode 100644 index 5355b80710..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmod_wmt.S +++ /dev/null @@ -1,214 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmod_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin fmod - .text - .align 16,0x90 - .globl fmod -fmod: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 120(%esp), %xmm1 - movsd 112(%esp), %xmm0 - fldl 120(%esp) - fldl 112(%esp) - unpcklpd %xmm0, %xmm1 - movdqa (%ebx), %xmm2 - pshufd $212, %xmm1, %xmm1 - movdqa 16(%ebx), %xmm3 - pand %xmm2, %xmm1 - pcmpeqd %xmm1, %xmm3 - movmskps %xmm3, %eax - cmpl $2, %eax - jg .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - fprem - fstsw %ax - sahf - jp .L_2TAG_PACKET_1.0.3 - fstp %st(1) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - movl %eax, %edx - andl $3, %eax - cmpl $3, %eax - jne .L_2TAG_PACKET_3.0.3 - movl 112(%esp), %edx - movl 116(%esp), %ecx - xorl %eax, %eax - andl $2147483647, %ecx - subl %edx, %eax - orl %edx, %eax - shrl $31, %eax - orl %eax, %ecx - cmpl $2146435072, %ecx - ja .L_2TAG_PACKET_4.0.3 - fstp %st(0) - fstp %st(0) - movl $2139095040, 8(%esp) - fldz - flds 8(%esp) - fmulp - fstpl (%esp) - movl $121, %edx -.L_2TAG_PACKET_5.0.3: - movsd 112(%esp), %xmm0 - movsd 120(%esp), %xmm1 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 120(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_3.0.3: - movl 112(%esp), %eax - xorl %ecx, %ecx - subl %eax, %ecx - orl %ecx, %eax - shrl $31, %eax - movl 116(%esp), %ecx - orl %ecx, %eax - andl $2147483647, %eax - movl 120(%esp), %edx - xorl %ecx, %ecx - subl %edx, %ecx - orl %ecx, %edx - shrl $31, %edx - movl 124(%esp), %ecx - orl %ecx, %edx - andl $2147483647, %edx - cmpl $2146435072, %eax - ja .L_2TAG_PACKET_4.0.3 - cmpl $2146435072, %edx - ja .L_2TAG_PACKET_4.0.3 - cmpl $2146435072, %eax - je .L_2TAG_PACKET_7.0.3 - fstp %st(1) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - faddp - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_7.0.3: - fstp %st(1) - fldz - fmulp - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_2.0.3: -.L_2TAG_PACKET_6.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type fmod,@function - .size fmod,.-fmod - .data -# -- End fmod - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 2147483647 - .long 2146435072 - .long 2146435072 - .long 0 - .long 0 - .long 2146435072 - .long 2146435072 - .type static_const_table,@object - .size static_const_table,32 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmodf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmodf.S deleted file mode 100644 index 45adea29c7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmodf.S +++ /dev/null @@ -1,156 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmodf.c" - .text -..TXTST0: -# -- Begin fmodf - .text - .align 16,0x90 - .globl fmodf -fmodf: -# parameter 1: 16 + %esp -# parameter 2: 20 + %esp -..B1.1: -..L1: - - subl $12, %esp - movzwl 22(%esp), %ecx - andl $32640, %ecx - shrl $7, %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - testl %ecx, %ecx - jne ..B1.3 -..B1.2: - testl $8388607, 20(%esp) - je ..B1.8 -..B1.3: - movzwl 18(%esp), %edx - andl $32640, %edx - shrl $7, %edx - cmpl $255, %edx - je ..B1.22 -..B1.4: - cmpl $255, %ecx - je ..B1.12 -..B1.6: - flds 20(%esp) - flds 16(%esp) -.L_2TAG_PACKET_0.0.2: - fprem - fstsw %ax - sahf - jp .L_2TAG_PACKET_0.0.2 - fstp %st(1) - fstps (%esp) -..B1.7: - flds (%esp) - addl $12, %esp - ret -..B1.8: - movzwl 18(%esp), %edx - andl $32640, %edx - cmpl $32640, %edx - jne ..B1.11 -..B1.9: - testl $8388607, 16(%esp) - je ..B1.11 -..B1.10: - flds 16(%esp) - fadds 20(%esp) - addl $12, %esp - ret -..B1.11: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%eax) - fsts (%esp) - addl $12, %esp - ret -..B1.12: - testl $8388607, 20(%esp) - jne ..B1.16 -..B1.13: - cmpl $255, %edx - je ..B1.20 -..B1.14: - cmpl $255, %ecx - je ..B1.17 - jmp ..B1.6 -..B1.16: - flds 16(%esp) - fadds 20(%esp) - addl $12, %esp - ret -..B1.17: - testl $8388607, 20(%esp) - jne ..B1.6 -..B1.18: - flds 16(%esp) - addl $12, %esp - ret -..B1.20: - testl $8388607, 16(%esp) - jne ..B1.14 -..B1.21: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%eax) - addl $12, %esp - ret -..B1.22: - testl $8388607, 16(%esp) - jne ..B1.16 -..B1.23: - cmpl $255, %ecx - je ..B1.12 - jmp ..B1.13 - .align 16,0x90 - .type fmodf,@function - .size fmodf,.-fmodf - .data -# -- End fmodf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x7f800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmodl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmodl.S deleted file mode 100644 index 7413bbd1ba..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fmodl.S +++ /dev/null @@ -1,336 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmodl.c" - .text -..TXTST0: -# -- Begin fmodl - .text - .align 16,0x90 - .globl fmodl -fmodl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - subl $28, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 28(%ebp), %edx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - andl $32767, %edx - jne ..B1.6 -..B1.4: - cmpl $0, 24(%ebp) - jne ..B1.6 -..B1.5: - cmpl $0, 20(%ebp) - je ..B1.45 -..B1.6: - movzwl 16(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.42 -..B1.7: - cmpl $32767, %edx - je ..B1.17 -..B1.8: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.16 -..B1.9: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.10: - fldcw 12(%esp) -..B1.11: - movl $1, %esi -..B1.12: - addl $-16, %esp - lea 8(%ebp), %eax - movl %eax, (%esp) - call __fmodl -..B1.60: - fstpt 16(%esp) - addl $16, %esp -..B1.13: - testl %esi, %esi - je ..B1.15 -..B1.14: - fldcw 14(%esp) -..B1.15: - fldt (%esp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - xorl %esi, %esi - jmp ..B1.12 -..B1.17: - cmpl $-2147483648, 24(%ebp) - jne ..B1.19 -..B1.18: - cmpl $0, 20(%ebp) - je ..B1.25 -..B1.19: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.31 -..B1.20: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.21: - fldcw 12(%esp) -..B1.22: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) -..B1.23: - fldcw 14(%esp) -..B1.24: - fldt (%esp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - cmpl $32767, %ecx - je ..B1.32 -..B1.26: - testl %ecx, %ecx - jne ..B1.30 -..B1.27: - cmpl $0, 12(%ebp) - jne ..B1.29 -..B1.28: - cmpl $0, 8(%ebp) - je ..B1.30 -..B1.29: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl 16(%esp) -..B1.30: - fldt 8(%ebp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.24 -..B1.32: - cmpl $-2147483648, 12(%ebp) - jne ..B1.30 -..B1.33: - cmpl $0, 8(%ebp) - jne ..B1.30 -..B1.34: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.41 -..B1.35: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.36: - fldcw 12(%esp) -..B1.37: - movl $1, %edx -..B1.38: - fldl _infs@GOTOFF(%eax) - testl %edx, %edx - fmull _zeros@GOTOFF(%eax) - fstpl (%esp) - je ..B1.40 -..B1.39: - fldcw 14(%esp) -..B1.40: - fldl (%esp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - xorl %edx, %edx - jmp ..B1.38 -..B1.42: - cmpl $-2147483648, 12(%ebp) - jne ..B1.19 -..B1.43: - cmpl $0, 8(%ebp) - jne ..B1.19 -..B1.44: - cmpl $32767, %edx - je ..B1.17 - jmp ..B1.25 -..B1.45: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.57 -..B1.46: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.47: - fldcw 12(%esp) -..B1.48: - movl $1, %ecx -..B1.49: - movzwl 16(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - jne ..B1.53 -..B1.50: - cmpl $-2147483648, 12(%ebp) - jne ..B1.52 -..B1.51: - cmpl $0, 8(%ebp) - je ..B1.53 -..B1.52: - fldt 8(%ebp) - fmull _ones@GOTOFF(%eax) - fstpt (%esp) - jmp ..B1.54 -..B1.53: - fldl _infs@GOTOFF(%eax) - fmull _zeros@GOTOFF(%eax) - fstpt (%esp) -..B1.54: - testl %ecx, %ecx - je ..B1.56 -..B1.55: - fldcw 14(%esp) -..B1.56: - fldt (%esp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.57: - xorl %ecx, %ecx - jmp ..B1.49 - .align 16,0x90 - .type fmodl,@function - .size fmodl,.-fmodl - .data -# -- End fmodl - .text -# -- Begin __fmodl - .text - .align 16,0x90 -__fmodl: -# parameter 1: 4 + %esp -..B2.1: -..L3: - -..B2.2: - movl 4(%esp), %ecx - fldt 12(%ecx) - fldt (%ecx) -.L_2TAG_PACKET_0.0.2: - fprem - fstsw %ax - sahf - jp .L_2TAG_PACKET_0.0.2 - fstp %st(1) - ret -..B2.3: - .align 16,0x90 - .type __fmodl,@function - .size __fmodl,.-__fmodl - .data -# -- End __fmodl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fpclassify.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fpclassify.S deleted file mode 100644 index 9eec1838b3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/fpclassify.S +++ /dev/null @@ -1,465 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fpclassify.c" - .text -..TXTST0: -# -- Begin __fpclassifyd - .text - .align 16,0x90 - .globl __fpclassifyd -__fpclassifyd: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - fldl 4(%esp) - fwait - fstp %st(0) - movl 8(%esp), %edx - andl $2147483647, %edx - movl 4(%esp), %ecx - cmpl $2146435072, %edx - jb ..B1.6 -..B1.2: - movl $2146435072, %eax - subl %eax, %edx - jb ..B1.4 -..B1.14: - orl %edx, %ecx - je ..B1.4 -..B1.3: - xorl %eax, %eax - ret -..B1.4: - movl $1, %eax -..B1.5: - ret -..B1.6: - cmpl $1048576, %edx - jae ..B1.11 -..B1.7: - orl %edx, %ecx - je ..B1.9 -..B1.8: - movl $3, %eax - ret -..B1.9: - movl $2, %eax -..B1.10: - ret -..B1.11: - movl $4, %eax - ret - .align 16,0x90 - .type __fpclassifyd,@function - .size __fpclassifyd,.-__fpclassifyd - .data -# -- End __fpclassifyd - .text -# -- Begin fpclassifyd - .text - .align 16,0x90 - .globl fpclassifyd -fpclassifyd: -# parameter 1: 4 + %esp -..B2.1: -..L2: - - fldl 4(%esp) - fwait - fstp %st(0) - movl 8(%esp), %edx - andl $2147483647, %edx - movl 4(%esp), %ecx - cmpl $2146435072, %edx - jb ..B2.6 -..B2.2: - movl $2146435072, %eax - subl %eax, %edx - jb ..B2.4 -..B2.14: - orl %edx, %ecx - je ..B2.4 -..B2.3: - xorl %eax, %eax - ret -..B2.4: - movl $1, %eax -..B2.5: - ret -..B2.6: - cmpl $1048576, %edx - jae ..B2.11 -..B2.7: - orl %edx, %ecx - je ..B2.9 -..B2.8: - movl $3, %eax - ret -..B2.9: - movl $2, %eax -..B2.10: - ret -..B2.11: - movl $4, %eax - ret - .align 16,0x90 - .type fpclassifyd,@function - .size fpclassifyd,.-fpclassifyd - .data -# -- End fpclassifyd - .text -# -- Begin __fpclassify - .text - .align 16,0x90 - .globl __fpclassify -__fpclassify: -# parameter 1: 4 + %esp -..B3.1: -..L3: - - fldl 4(%esp) - fwait - fstp %st(0) - movl 8(%esp), %edx - andl $2147483647, %edx - movl 4(%esp), %ecx - cmpl $2146435072, %edx - jb ..B3.6 -..B3.2: - movl $2146435072, %eax - subl %eax, %edx - jb ..B3.4 -..B3.14: - orl %edx, %ecx - je ..B3.4 -..B3.3: - xorl %eax, %eax - ret -..B3.4: - movl $1, %eax -..B3.5: - ret -..B3.6: - cmpl $1048576, %edx - jae ..B3.11 -..B3.7: - orl %edx, %ecx - je ..B3.9 -..B3.8: - movl $3, %eax - ret -..B3.9: - movl $2, %eax -..B3.10: - ret -..B3.11: - movl $4, %eax - ret - .align 16,0x90 - .type __fpclassify,@function - .size __fpclassify,.-__fpclassify - .data -# -- End __fpclassify - .text -# -- Begin fpclassify - .text - .align 16,0x90 - .globl fpclassify -fpclassify: -# parameter 1: 4 + %esp -..B4.1: -..L4: - - fldl 4(%esp) - fwait - fstp %st(0) - movl 8(%esp), %edx - andl $2147483647, %edx - movl 4(%esp), %ecx - cmpl $2146435072, %edx - jb ..B4.6 -..B4.2: - movl $2146435072, %eax - subl %eax, %edx - jb ..B4.4 -..B4.14: - orl %edx, %ecx - je ..B4.4 -..B4.3: - xorl %eax, %eax - ret -..B4.4: - movl $1, %eax -..B4.5: - ret -..B4.6: - cmpl $1048576, %edx - jae ..B4.11 -..B4.7: - orl %edx, %ecx - je ..B4.9 -..B4.8: - movl $3, %eax - ret -..B4.9: - movl $2, %eax -..B4.10: - ret -..B4.11: - movl $4, %eax - ret - .align 16,0x90 - .type fpclassify,@function - .size fpclassify,.-fpclassify - .data -# -- End fpclassify - .text -# -- Begin __fpclassifyf - .text - .align 16,0x90 - .globl __fpclassifyf -__fpclassifyf: -# parameter 1: 4 + %esp -..B5.1: -..L5: - - flds 4(%esp) - fwait - fstp %st(0) - movl 4(%esp), %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - jb ..B5.3 -..B5.2: - movl $0, %eax - setbe %al - ret -..B5.3: - cmpl $8388608, %edx - jae ..B5.5 -..B5.4: - testl %edx, %edx - movl $0, %eax - setne %al - addl $2, %eax - ret -..B5.5: - movl $4, %eax - ret - .align 16,0x90 - .type __fpclassifyf,@function - .size __fpclassifyf,.-__fpclassifyf - .data -# -- End __fpclassifyf - .text -# -- Begin fpclassifyf - .text - .align 16,0x90 - .globl fpclassifyf -fpclassifyf: -# parameter 1: 4 + %esp -..B6.1: -..L6: - - flds 4(%esp) - fwait - fstp %st(0) - movl 4(%esp), %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - jb ..B6.3 -..B6.2: - movl $0, %eax - setbe %al - ret -..B6.3: - cmpl $8388608, %edx - jae ..B6.5 -..B6.4: - testl %edx, %edx - movl $0, %eax - setne %al - addl $2, %eax - ret -..B6.5: - movl $4, %eax - ret - .align 16,0x90 - .type fpclassifyf,@function - .size fpclassifyf,.-fpclassifyf - .data -# -- End fpclassifyf - .text -# -- Begin __fpclassifyl - .text - .align 16,0x90 - .globl __fpclassifyl -__fpclassifyl: -# parameter 1: 8 + %esp -..B7.1: -..L7: - - pushl %ebx - movzwl 16(%esp), %ecx - andl $32767, %ecx - movl 12(%esp), %ebx - movl %ecx, %eax - movl %ebx, %edx - shll $16, %eax - shrl $16, %edx - orl %edx, %eax - cmpl $2147418112, %eax - jb ..B7.5 -..B7.2: - cmpl $32767, %ecx - je ..B7.12 -..B7.3: - xorl %eax, %eax -..B7.4: - popl %ebx - ret -..B7.5: - cmpl $65536, %eax - jae ..B7.11 -..B7.6: - testl %ebx, %ebx - jne ..B7.8 -..B7.7: - cmpl $0, 8(%esp) - je ..B7.9 -..B7.8: - movl $3, %eax - popl %ebx - ret -..B7.9: - movl $2, %eax -..B7.10: - popl %ebx - ret -..B7.11: - andl $32768, %eax - shrl $15, %eax - addl $3, %eax - popl %ebx - ret -..B7.12: - cmpl $-2147483648, %ebx - jne ..B7.3 -..B7.13: - cmpl $0, 8(%esp) - jne ..B7.3 -..B7.14: - movl $1, %eax - popl %ebx - ret - .align 16,0x90 - .type __fpclassifyl,@function - .size __fpclassifyl,.-__fpclassifyl - .data -# -- End __fpclassifyl - .text -# -- Begin fpclassifyl - .text - .align 16,0x90 - .globl fpclassifyl -fpclassifyl: -# parameter 1: 8 + %esp -..B8.1: -..L8: - - pushl %ebx - movzwl 16(%esp), %ecx - andl $32767, %ecx - movl 12(%esp), %ebx - movl %ecx, %eax - movl %ebx, %edx - shll $16, %eax - shrl $16, %edx - orl %edx, %eax - cmpl $2147418112, %eax - jb ..B8.5 -..B8.2: - cmpl $32767, %ecx - je ..B8.12 -..B8.3: - xorl %eax, %eax -..B8.4: - popl %ebx - ret -..B8.5: - cmpl $65536, %eax - jae ..B8.11 -..B8.6: - testl %ebx, %ebx - jne ..B8.8 -..B8.7: - cmpl $0, 8(%esp) - je ..B8.9 -..B8.8: - movl $3, %eax - popl %ebx - ret -..B8.9: - movl $2, %eax -..B8.10: - popl %ebx - ret -..B8.11: - andl $32768, %eax - shrl $15, %eax - addl $3, %eax - popl %ebx - ret -..B8.12: - cmpl $-2147483648, %ebx - jne ..B8.3 -..B8.13: - cmpl $0, 8(%esp) - jne ..B8.3 -..B8.14: - movl $1, %eax - popl %ebx - ret - .align 16,0x90 - .type fpclassifyl,@function - .size fpclassifyl,.-fpclassifyl - .data -# -- End fpclassifyl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexp_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexp_wmt.S deleted file mode 100644 index 28f863b30d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexp_wmt.S +++ /dev/null @@ -1,149 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "frexp_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin frexp - .text - .align 16,0x90 - .globl frexp -frexp: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd %xmm0, 8(%esp) - movl 120(%esp), %ecx - pextrw $3, %xmm0, %eax - movq (%ebx), %xmm1 - andl $32767, %eax - movq 16(%ebx), %xmm2 - subl $16, %eax - js .L_2TAG_PACKET_0.0.2 - cmpl $32736, %eax - jae .L_2TAG_PACKET_1.0.2 - shrl $4, %eax - pand %xmm1, %xmm0 - subl $1021, %eax - por %xmm2, %xmm0 - movl %eax, (%ecx) - movq %xmm0, 8(%esp) - fldl 8(%esp) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_0.0.2: - pxor %xmm3, %xmm3 - movq 32(%ebx), %xmm4 - xorl %eax, %eax - comisd %xmm3, %xmm0 - je .L_2TAG_PACKET_3.0.2 - mulsd %xmm4, %xmm0 - pextrw $3, %xmm0, %eax - andl $32767, %eax - pand %xmm1, %xmm0 - shrl $4, %eax - por %xmm2, %xmm0 - subl $1077, %eax - movq %xmm0, 8(%esp) -.L_2TAG_PACKET_3.0.2: - movl %eax, (%ecx) - fldl 8(%esp) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_1.0.2: - xorl %eax, %eax - fld1 - movl %eax, (%ecx) - fmull 8(%esp) -.L_2TAG_PACKET_2.0.2: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type frexp,@function - .size frexp,.-frexp - .data -# -- End frexp - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 2148532223 - .long 4294967295 - .long 2148532223 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 0 - .long 1130364928 - .long 0 - .long 1130364928 - .type static_const_table,@object - .size static_const_table,48 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexpf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexpf.S deleted file mode 100644 index 56c001b928..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexpf.S +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "frexpf.c" - .text -..TXTST0: -# -- Begin frexpf - .text - .align 16,0x90 - .globl frexpf -frexpf: -# parameter 1: 8 + %esp -# parameter 2: 12 + %esp -..B1.1: -..L1: - - pushl %edi - movl 8(%esp), %ecx - movl %ecx, %edx - andl $2147483647, %edx - movl 12(%esp), %eax - lea -8388608(%edx), %edi - cmpl $2130706432, %edi - jb ..B1.5 -..B1.2: - decl %edx - cmpl $2139095039, %edx - jae ..B1.6 -..B1.3: - flds 8(%esp) - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - fmuls .L_2il0floatpacket.0@GOTOFF(%edx) - fstps 8(%esp) - movl 8(%esp), %ecx - movl %ecx, %edi - andl $2147483647, %edi - andl $-2139095041, %ecx - shrl $23, %edi - orl $1056964608, %ecx - movl %ecx, 8(%esp) - addl $-151, %edi - flds 8(%esp) - movl %edi, (%eax) -..B1.4: - popl %edi - ret -..B1.5: - andl $-2139095041, %ecx - shrl $23, %edi - orl $1056964608, %ecx - movl %ecx, 8(%esp) - addl $-125, %edi - flds 8(%esp) - movl %edi, (%eax) - popl %edi - ret -..B1.6: - flds 8(%esp) - movl $0, (%eax) - popl %edi - ret - .align 16,0x90 - .type frexpf,@function - .size frexpf,.-frexpf - .data -# -- End frexpf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexpl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexpl.S deleted file mode 100644 index 09d572fc81..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/frexpl.S +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "frexpl.c" - .text -..TXTST0: -# -- Begin frexpl - .text - .align 16,0x90 - .globl frexpl -frexpl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp - movl 20(%ebp), %edx -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %ecx - movl %ecx, %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.16 -..B1.4: - testl %eax, %eax - jne ..B1.14 -..B1.5: - cmpl $0, 12(%ebp) - jne ..B1.8 -..B1.6: - cmpl $0, 8(%ebp) - jne ..B1.8 -..B1.7: - fldt 8(%ebp) - movl $0, (%edx) - movl %ebp, %esp - popl %ebp - ret -..B1.8: - movzwl 14(%esp), %eax - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - je ..B1.15 -..B1.9: - orl $-64768, %eax - movl $0, (%edx) - movw %ax, 12(%esp) -..B1.10: - fldcw 12(%esp) -..B1.11: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%ecx) - fstpt 8(%ebp) -..B1.12: - fldcw 14(%esp) -..B1.13: - movzwl 16(%ebp), %ecx - movl %ecx, %eax - andl $-32768, %ecx - andl $32767, %eax - orl $-49154, %ecx - addl $-16457, %eax - movw %cx, 16(%ebp) - fldt 8(%ebp) - movl %eax, (%edx) - movl %ebp, %esp - popl %ebp - ret -..B1.14: - andl $-32768, %ecx - addl $-16382, %eax - orl $-49154, %ecx - movw %cx, 16(%ebp) - fldt 8(%ebp) - movl %eax, (%edx) - movl %ebp, %esp - popl %ebp - ret -..B1.15: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%ecx) - fstpt 8(%ebp) - jmp ..B1.13 -..B1.16: - movl $0, (%edx) - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.22 -..B1.17: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.18: - fldcw 12(%esp) -..B1.19: - fldt 8(%ebp) - fstpt (%esp) -..B1.20: - fldcw 14(%esp) -..B1.21: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.22: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.21 - .align 16,0x90 - .type frexpl,@function - .size frexpl,.-frexpl - .data -# -- End frexpl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypot_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypot_wmt.S deleted file mode 100644 index 36b50289d9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypot_wmt.S +++ /dev/null @@ -1,230 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "hypot_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin hypot - .text - .align 16,0x90 - .globl hypot -hypot: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $152, %esp - movl %ebx, 96(%esp) - call static_func - movl %eax, %ebx - movapd (%ebx), %xmm3 - movsd 160(%esp), %xmm0 - movsd 168(%esp), %xmm1 - andpd %xmm3, %xmm0 - andpd %xmm3, %xmm1 - pextrw $3, %xmm0, %eax - pextrw $3, %xmm1, %edx - cmpl $24528, %eax - ja .L_2TAG_PACKET_0.0.3 - cmpl $24528, %edx - ja .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - fldl 160(%esp) - fldl 168(%esp) - fxch %st(1) - fmul %st(0), %st - fxch %st(1) - nop - fmul %st(0), %st - faddp %st, %st(1) - fsqrt - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - cmpl $32752, %eax - movl %eax, %ecx - jae .L_2TAG_PACKET_3.0.3 - subl %edx, %ecx - cmpl $32752, %edx - jae .L_2TAG_PACKET_3.0.3 - addl $928, %ecx - addl %edx, %eax - cmpl $1856, %ecx - ja .L_2TAG_PACKET_4.0.3 - cmpl $49056, %eax - jb .L_2TAG_PACKET_1.0.3 - fldl 160(%esp) - fldl 168(%esp) - fxch %st(1) - fmul %st(0), %st - fxch %st(1) - nop - fmul %st(0), %st - faddp %st, %st(1) - fsqrt -.L_2TAG_PACKET_5.0.3: - fstl (%esp) - fstpt 16(%esp) - xorl %eax, %eax - movw 24(%esp), %ax - cmpl $17407, %eax - jae .L_2TAG_PACKET_6.0.3 - fldl (%esp) - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_4.0.3: - movsd %xmm0, 32(%esp) - movsd %xmm1, 40(%esp) - fldl 32(%esp) - faddl 40(%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_6.0.3: - movl $46, %edx -.L_2TAG_PACKET_8.0.3: - movsd 160(%esp), %xmm0 - movsd 168(%esp), %xmm1 - subl $32, %esp - lea 160(%esp), %eax - movl %eax, (%esp) - lea 168(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_3.0.3: - shufpd $0, %xmm1, %xmm0 - movdqa %xmm0, %xmm2 - movdqa 16(%ebx), %xmm3 - movsd %xmm0, 32(%esp) - movsd %xmm1, 40(%esp) - cmppd $3, %xmm0, %xmm2 - cmppd $0, %xmm0, %xmm3 - movmskpd %xmm2, %edx - movmskpd %xmm3, %eax - testl %edx, %edx - je .L_2TAG_PACKET_9.0.3 - fldl 32(%esp) - fmull 40(%esp) - testl $1, %eax - jne .L_2TAG_PACKET_10.0.3 - testl $2, %eax - jne .L_2TAG_PACKET_11.0.3 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_9.0.3: - fldl 32(%esp) - faddl 40(%esp) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_10.0.3: - fstpl 40(%esp) - fldl 32(%esp) - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_11.0.3: - fstpl 32(%esp) - fldl 40(%esp) - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_2.0.3: -.L_2TAG_PACKET_7.0.3: - movl 96(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type hypot,@function - .size hypot,.-hypot - .data -# -- End hypot - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .type static_const_table,@object - .size static_const_table,32 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypotf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypotf.S deleted file mode 100644 index c57ab39b1f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypotf.S +++ /dev/null @@ -1,183 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "hypotf.c" - .text -..TXTST0: -# -- Begin hypotf - .text - .align 16,0x90 - .globl hypotf -hypotf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp - movzwl 10(%ebp), %ecx - andl $32640, %ecx - movzwl 14(%ebp), %edx - andl $32640, %edx - shrl $7, %ecx - shrl $7, %edx - cmpl $255, %ecx - je ..B1.9 -..B1.2: - cmpl $255, %edx - je ..B1.9 -..B1.3: - movl %ecx, %eax - subl %edx, %eax - addl $28, %eax - cmpl $56, %eax - ja ..B1.5 -..B1.4: - flds 8(%ebp) - addl %edx, %ecx - fmul %st(0), %st - cmpl $378, %ecx - flds 12(%ebp) - fmul %st(0), %st - faddp %st, %st(1) - fsqrt - jg ..B1.7 - jmp ..B1.6 -..B1.5: - flds 8(%ebp) - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - fabs - flds 12(%ebp) - fabs - fldl .L_2il0floatpacket.0@GOTOFF(%eax) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstps 8(%esp) - flds 8(%esp) - fmuls .L_2il0floatpacket.1@GOTOFF(%eax) - cmpl $2130706432, 8(%esp) -..B1.6: - movl %ebp, %esp - popl %ebp - ret -..B1.7: - fstl (%esp) - cmpl $1206910976, 4(%esp) - jl ..B1.6 -..B1.8: - movl %ebp, %esp - popl %ebp - ret -..B1.9: - andb $127, 11(%ebp) - andb $127, 15(%ebp) - cmpl $255, %ecx - je ..B1.21 -..B1.10: - cmpl $255, %edx - je ..B1.19 -..B1.11: - flds 8(%ebp) - fld %st(0) - fadds 12(%ebp) - fstps 8(%esp) -..B1.12: - cmpl $255, %ecx - je ..B1.17 -..B1.13: - fstp %st(0) - cmpl $255, %edx - jne ..B1.16 -..B1.14: - testl $8388607, 12(%ebp) - jne ..B1.16 -..B1.15: - flds 12(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.16: - flds 8(%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.17: - testl $8388607, 8(%ebp) - jne ..B1.13 -..B1.18: - movl %ebp, %esp - popl %ebp - ret -..B1.19: - testl $8388607, 12(%ebp) - je ..B1.11 -..B1.20: - flds 8(%ebp) - fld %st(0) - fmuls 12(%ebp) - fstps 8(%esp) - jmp ..B1.12 -..B1.21: - testl $8388607, 8(%ebp) - jne ..B1.20 - jmp ..B1.10 - .align 16,0x90 - .type hypotf,@function - .size hypotf,.-hypotf - .data -# -- End hypotf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 4 -.L_2il0floatpacket.1: - .long 0x40000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypotl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypotl.S deleted file mode 100644 index 0533320ea7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/hypotl.S +++ /dev/null @@ -1,858 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "hypotl.c" - .text -..TXTST0: -# -- Begin hypotl - .text - .align 16,0x90 - .globl hypotl -hypotl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $24, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - andb $127, 17(%ebp) - andb $127, 29(%ebp) - movzwl 16(%ebp), %esi - andl $32767, %esi - movzwl 28(%ebp), %ebx - andl $32767, %ebx - cmpl $32767, %esi - je ..B1.73 -..B1.4: - cmpl $32767, %ebx - je ..B1.73 -..B1.5: - movl %esi, %eax - subl %ebx, %eax - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - lea 64(%eax), %edx - cmpl $128, %edx - ja ..B1.27 -..B1.6: - lea (%esi,%ebx), %edx - cmpl $18376, %edx - jge ..B1.38 -..B1.7: - testl %esi, %esi - jne ..B1.14 -..B1.8: - cmpl $0, 12(%ebp) - jne ..B1.14 -..B1.9: - cmpl $0, 8(%ebp) - jne ..B1.14 -..B1.10: - testl %ebx, %ebx - jne ..B1.14 -..B1.11: - cmpl $0, 24(%ebp) - jne ..B1.14 -..B1.12: - cmpl $0, 20(%ebp) - jne ..B1.14 -..B1.13: - fldl _zeros@GOTOFF(%ecx) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - movzwl 14(%esp), %ebx - movl %ebx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.37 -..B1.15: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.16: - fldcw 12(%esp) -..B1.17: - movl $1, %ebx -..B1.18: - fldt _scales@GOTOFF(%ecx) - lea 4(%eax), %edx - fldt 8(%ebp) - cmpl $8, %edx - fmul %st(1), %st - fldt 20(%ebp) - fmulp %st, %st(2) - ja ..B1.22 -..B1.19: - fldl _TWO_48H@GOTOFF(%ecx) - fld %st(1) - fmul %st(1), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(4) - fxch %st(3) - fmul %st(5), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fld %st(4) - fsub %st(3), %st - fmul %st, %st(2) - fld %st(6) - fsub %st(5), %st - fmul %st, %st(2) - fxch %st(6) - fcom %st(7) - fnstsw %ax - fmulp %st, %st(1) - sahf - faddp %st, %st(2) - fxch %st(5) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmul %st(0), %st - fld %st(0) - fxch %st(2) - fmul %st(0), %st - fadd %st, %st(2) - fldl _TWO_32H@GOTOFF(%ecx) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - jbe ..B1.21 -..B1.20: - fxch %st(1) - fsubr %st(3), %st - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - jmp ..B1.24 -..B1.21: - fxch %st(2) - fsubr %st(3), %st - fsubrp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - jmp ..B1.24 -..B1.22: - fldl _TWO_48H@GOTOFF(%ecx) - testl %eax, %eax - fldl _TWO_32H@GOTOFF(%ecx) - jle ..B1.36 -..B1.23: - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(3) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - fxch %st(1) - fxch %st(2) - fxch %st(1) -..B1.24: - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fld %st(1) - testl %ebx, %ebx - fadd %st(4), %st - fsqrt - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fsubrp %st, %st(3) - fld %st(3) - fxch %st(1) - fsub %st(4), %st - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(4) - faddp %st, %st(2) - fld %st(2) - fadd %st(4), %st - fdivrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 12+_scales@GOTOFF(%ecx) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.26 -..B1.25: - fldcw 14(%esp) -..B1.26: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.27: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.72 -..B1.28: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.29: - fldcw 12(%esp) -..B1.30: - movl $1, %edx -..B1.31: - fldt 8(%ebp) - fldt 20(%ebp) - faddp %st, %st(1) - fstpt (%esp) - fldt (%esp) - fldt 12+_ranges@GOTOFF(%ecx) - fcompp - fnstsw %ax - sahf - jae ..B1.33 - jp ..B1.33 -..B1.32: - fldt _large_value_80@GOTOFF(%ecx) - fmul %st(0), %st - fstpt (%esp) -..B1.33: - testl %edx, %edx - je ..B1.35 -..B1.34: - fldcw 14(%esp) -..B1.35: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.36: - fxch %st(1) - fmul %st(3), %st - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(4) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st(0), %st - jmp ..B1.24 -..B1.37: - xorl %ebx, %ebx - jmp ..B1.18 -..B1.38: - movzwl 14(%esp), %ebx - cmpl $47156, %edx - jle ..B1.54 -..B1.39: - movl %ebx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.69 -..B1.40: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.41: - fldcw 12(%esp) -..B1.42: - xorl %ebx, %ebx - incl %ebx -..B1.43: - fldt 12+_scales@GOTOFF(%ecx) - lea 4(%eax), %edx - fldt 8(%ebp) - cmpl $8, %edx - fmul %st(1), %st - fldt 20(%ebp) - fmulp %st, %st(2) - ja ..B1.47 -..B1.44: - fldl _TWO_48H@GOTOFF(%ecx) - fld %st(1) - fmul %st(1), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(4) - fxch %st(3) - fmul %st(5), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fld %st(4) - fsub %st(3), %st - fmul %st, %st(2) - fld %st(6) - fsub %st(5), %st - fmul %st, %st(2) - fxch %st(6) - fcom %st(7) - fnstsw %ax - fmulp %st, %st(1) - sahf - faddp %st, %st(2) - fxch %st(5) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmul %st(0), %st - fld %st(0) - fxch %st(2) - fmul %st(0), %st - fadd %st, %st(2) - fldl _TWO_32H@GOTOFF(%ecx) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - jbe ..B1.46 -..B1.45: - fxch %st(1) - fsubr %st(3), %st - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - jmp ..B1.49 -..B1.46: - fxch %st(2) - fsubr %st(3), %st - fsubrp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - jmp ..B1.49 -..B1.47: - fldl _TWO_48H@GOTOFF(%ecx) - testl %eax, %eax - fldl _TWO_32H@GOTOFF(%ecx) - jle ..B1.68 -..B1.48: - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(3) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - fxch %st(1) - fxch %st(2) - fxch %st(1) -..B1.49: - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fld %st(1) - fadd %st(4), %st - fsqrt - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fsubrp %st, %st(3) - fld %st(3) - fxch %st(1) - fsub %st(4), %st - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(4) - faddp %st, %st(2) - fld %st(2) - fadd %st(4), %st - fdivrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - fldt (%esp) - fldt _ranges@GOTOFF(%ecx) - fcompp - fnstsw %ax - sahf - jp ..B1.50 - jbe ..B1.67 -..B1.50: - fldt _scales@GOTOFF(%ecx) - fldt (%esp) - fmulp %st, %st(1) - fstpt (%esp) -..B1.51: - testl %ebx, %ebx - je ..B1.53 -..B1.52: - fldcw 14(%esp) -..B1.53: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.54: - movl %ebx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.71 -..B1.55: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.56: - fldcw 12(%esp) -..B1.57: - xorl %ebx, %ebx - incl %ebx -..B1.58: - lea 4(%eax), %edx - cmpl $8, %edx - ja ..B1.62 -..B1.59: - fldt 8(%ebp) - fld %st(0) - fld %st(1) - fld %st(2) - fldt 20(%ebp) - fld %st(0) - fxch %st(5) - fcom %st(1) - fnstsw %ax - fldl _TWO_48H@GOTOFF(%ecx) - fmul %st, %st(5) - sahf - fxch %st(4) - fadd %st(5), %st - fsubp %st, %st(5) - fld %st(4) - fld %st(2) - fxch %st(3) - fmul %st, %st(5) - fxch %st(3) - fadd %st(5), %st - fsubp %st, %st(5) - fld %st(4) - fxch %st(4) - fsub %st(6), %st - fmul %st, %st(1) - fxch %st(5) - fsubr %st, %st(7) - fxch %st(4) - fmul %st(7), %st - fxch %st(2) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fmul %st(0), %st - fld %st(0) - fxch %st(2) - fmul %st(0), %st - fadd %st, %st(2) - fldl _TWO_32H@GOTOFF(%ecx) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - jbe ..B1.61 -..B1.60: - fxch %st(1) - fsubr %st(3), %st - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - fxch %st(1) - jmp ..B1.64 -..B1.61: - fxch %st(2) - fsubr %st(3), %st - fsubrp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - fxch %st(1) - jmp ..B1.64 -..B1.62: - fldt 8(%ebp) - testl %eax, %eax - fldt 20(%ebp) - fldl _TWO_48H@GOTOFF(%ecx) - fldl _TWO_32H@GOTOFF(%ecx) - jle ..B1.70 -..B1.63: - fxch %st(1) - fmul %st(3), %st - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(4) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st(0), %st - fxch %st(2) - fxch %st(1) - fxch %st(2) -..B1.64: - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fld %st(1) - testl %ebx, %ebx - fadd %st(3), %st - fsqrt - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(5) - fld %st(4) - fmul %st(5), %st - fsubrp %st, %st(3) - fld %st(4) - fxch %st(1) - fsub %st(5), %st - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(3) - fadd %st(3), %st - fdivrp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.66 -..B1.65: - fldcw 14(%esp) -..B1.66: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.67: - fldt _large_value_80@GOTOFF(%ecx) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.51 -..B1.68: - fxch %st(1) - fmul %st(3), %st - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(4) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st(0), %st - jmp ..B1.49 -..B1.69: - xorl %ebx, %ebx - jmp ..B1.43 -..B1.70: - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(3) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - jmp ..B1.64 -..B1.71: - xorl %ebx, %ebx - jmp ..B1.58 -..B1.72: - xorl %edx, %edx - jmp ..B1.31 -..B1.73: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.96 -..B1.74: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.75: - fldcw 12(%esp) -..B1.76: - movl $1, %eax -..B1.77: - cmpl $32767, %esi - je ..B1.94 -..B1.78: - cmpl $32767, %ebx - je ..B1.91 -..B1.79: - fldt 8(%ebp) - fldt 20(%ebp) - faddp %st, %st(1) - fstpt (%esp) -..B1.80: - testl %eax, %eax - je ..B1.82 -..B1.81: - fldcw 14(%esp) -..B1.82: - cmpl $32767, %esi - je ..B1.88 -..B1.83: - cmpl $32767, %ebx - jne ..B1.87 -..B1.84: - cmpl $-2147483648, 24(%ebp) - jne ..B1.87 -..B1.85: - cmpl $0, 20(%ebp) - jne ..B1.87 -..B1.86: - fldt 20(%ebp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.87: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.88: - cmpl $-2147483648, 12(%ebp) - jne ..B1.83 -..B1.89: - cmpl $0, 8(%ebp) - jne ..B1.83 -..B1.90: - fldt 8(%ebp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.91: - cmpl $-2147483648, 24(%ebp) - jne ..B1.93 -..B1.92: - cmpl $0, 20(%ebp) - je ..B1.79 -..B1.93: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.80 -..B1.94: - cmpl $-2147483648, 12(%ebp) - jne ..B1.93 -..B1.95: - cmpl $0, 8(%ebp) - jne ..B1.93 - jmp ..B1.78 -..B1.96: - xorl %eax, %eax - jmp ..B1.77 - .align 16,0x90 - .type hypotl,@function - .size hypotl,.-hypotl - .data -# -- End hypotl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_scales: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24653 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8113 - .word 0 - .type _scales,@object - .size _scales,24 - .align 2 -_ranges: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24497 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 32766 - .word 0 - .type _ranges,@object - .size _ranges,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogb_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogb_wmt.S deleted file mode 100644 index 0f482dfe93..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogb_wmt.S +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ilogb_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin ilogb - .text - .align 16,0x90 - .globl ilogb -ilogb: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd %xmm0, 8(%esp) - psrlq $52, %xmm0 - movd %xmm0, %eax - andl $2047, %eax - subl $1, %eax - cmpl $2046, %eax - jae .L_2TAG_PACKET_0.0.3 - subl $1022, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - movq 8(%esp), %xmm0 - movq (%ebx), %xmm1 - pxor %xmm2, %xmm2 - testl %eax, %eax - jg .L_2TAG_PACKET_2.0.3 - comisd %xmm2, %xmm0 - mulsd %xmm1, %xmm0 - je .L_2TAG_PACKET_3.0.3 - psrlq $52, %xmm0 - movd %xmm0, %eax - andl $2047, %eax - subl $1078, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - ucomisd %xmm0, %xmm0 - movl $2147483647, %eax - movl $-2147483648, %edx - cmovc %edx, %eax - xorpd %xmm0, %xmm0 - movq 16(%ebx), %xmm1 - mulsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - movl $-2147483648, %edx - movl %edx, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $157, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - movl (%esp), %eax - xorpd %xmm0, %xmm0 - movq 16(%ebx), %xmm1 - mulsd %xmm0, %xmm1 -.L_2TAG_PACKET_1.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type ilogb,@function - .size ilogb,.-ilogb - .data -# -- End ilogb - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1130364928 - .long 0 - .long 1130364928 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .type static_const_table,@object - .size static_const_table,32 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogbf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogbf.S deleted file mode 100644 index b6ea2b1e32..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogbf.S +++ /dev/null @@ -1,129 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ilogbf.c" - .text -..TXTST0: -# -- Begin ilogbf - .text - .align 16,0x90 - .globl ilogbf -ilogbf: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - movl 16(%esp), %eax - andl $2147483647, %eax - addl $-8388608, %eax - cmpl $2130706432, %eax - jb ..B1.6 -..B1.2: - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - testl %eax, %eax - jl ..B1.7 -..B1.3: - fldz - cmpl $2130706432, %eax - fmuls .L_2il0floatpacket.0@GOTOFF(%edx) - fstps (%esp) - je ..B1.5 -..B1.4: - flds 16(%esp) - movl $-2147483648, %eax - fmul %st(0), %st - fstps 16(%esp) - movl 16(%esp), %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - jae ..L3 - movl $0, %eax -..L3: - addl $12, %esp - ret -..B1.5: - movl $2147483647, %eax - addl $12, %esp - ret -..B1.6: - shrl $23, %eax - addl $-126, %eax - addl $12, %esp - ret -..B1.7: - cmpl $-8388608, %eax - je ..B1.9 -..B1.8: - flds 16(%esp) - fmuls .L_2il0floatpacket.1@GOTOFF(%edx) - fstps 16(%esp) - movl 16(%esp), %eax - andl $2147483647, %eax - shrl $23, %eax - addl $-152, %eax - addl $12, %esp - ret -..B1.9: - fldz - movl $-2147483648, %eax - fmuls .L_2il0floatpacket.0@GOTOFF(%edx) - fstps (%esp) - addl $12, %esp - ret - .align 16,0x90 - .type ilogbf,@function - .size ilogbf,.-ilogbf - .data -# -- End ilogbf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x7f800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4c000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogbl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogbl.S deleted file mode 100644 index 7165b3f701..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ilogbl.S +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ilogbl.c" - .text -..TXTST0: -# -- Begin ilogbl - .text - .align 16,0x90 - .globl ilogbl -ilogbl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $32767, %eax - je ..B1.20 -..B1.4: - testl %eax, %eax - jne ..B1.13 -..B1.5: - cmpl $0, 12(%ebp) - jne ..B1.7 -..B1.6: - cmpl $0, 8(%ebp) - je ..B1.14 -..B1.7: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.19 -..B1.8: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%edx) - fstpt 8(%ebp) -..B1.11: - fldcw 14(%esp) -..B1.12: - movzwl 16(%ebp), %eax - andl $32767, %eax - addl $-16458, %eax - movl %ebp, %esp - popl %ebp - ret -..B1.13: - addl $-16383, %eax - movl %ebp, %esp - popl %ebp - ret -..B1.14: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.18 -..B1.15: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.16: - fldcw 12(%esp) -..B1.17: - fldcw 14(%esp) -..B1.18: - fldl _infs@GOTOFF(%edx) - movl $-2147483648, %eax - fmull _zeros@GOTOFF(%edx) - fstpl 16(%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.19: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%edx) - fstpt 8(%ebp) - jmp ..B1.12 -..B1.20: - cmpl $-2147483648, 12(%ebp) - fldl _infs@GOTOFF(%edx) - fmull _zeros@GOTOFF(%edx) - fstpl 16(%esp) - jne ..B1.23 -..B1.21: - cmpl $0, 8(%ebp) - jne ..B1.23 -..B1.22: - movl $2147483647, %eax - movl %ebp, %esp - popl %ebp - ret -..B1.23: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.24: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.25: - fldcw 12(%esp) -..B1.26: - fldt 8(%ebp) - fstpt (%esp) -..B1.27: - fldcw 14(%esp) -..B1.28: - movl $-2147483648, %eax - movl %ebp, %esp - popl %ebp - ret -..B1.29: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.28 - .align 16,0x90 - .type ilogbl,@function - .size ilogbl,.-ilogbl - .data -# -- End ilogbl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/intel_quad_exception.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/intel_quad_exception.S deleted file mode 100644 index c5fabfb8ce..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/intel_quad_exception.S +++ /dev/null @@ -1,2258 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "intel_quad_exception.c" - .text -..TXTST0: -# -- Begin __dpml_exception - .text - .align 16,0x90 - .hidden __dpml_exception - .globl __dpml_exception -__dpml_exception: -# parameter 1: 48 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $28, %esp - xorl %eax, %eax - movl 48(%esp), %edx - movl (%edx), %ecx - movl 4(%edx), %edx - movl %edx, %ebx - subl %eax, %ebx - jge ..B1.3 -..B1.2: - andl $2147483647, %edx -..B1.3: - call ..L2 -..L2: - popl %ebp - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebp), %ebp - movl %ecx, %ebx - andl $134217727, %ecx - movl %edx, %esi - shll $5, %esi - shrl $27, %ebx - orl %ebx, %esi - movzbl 7+__dpml_response_table@GOTOFF(%ebp,%ecx,8), %edi - movzbl 6+__dpml_response_table@GOTOFF(%ebp,%ecx,8), %ebx - movl %ebx, %eax - movl %edi, 16(%esp) - movl $4, %edi - subl %edi, %eax - xorl %edi, %edi - orl %edi, %eax - jne ..B1.5 -..B1.4: - movl 48(%esp), %eax - lea 28(%eax), %edi - jmp ..B1.6 -..B1.5: - movl 16(%esp), %eax - shll $5, %eax - lea (%eax,%esi,8), %edi - addl __dpml_globals_table@GOT(%ebp), %edi -..B1.6: - addl $-4, %ecx - movl %ecx, %esi - adcl $-1, %edx - movl $171, %eax - subl %eax, %esi - movl $0, %eax - sbbl %eax, %edx - jb ..B1.7 -..B1.89: - orl %edx, %esi - jne ..B1.74 -..B1.7: - movzbl .2.9_2.switchtab.1@GOTOFF(%ebp,%ecx), %eax - lea ..1.1_0.TAG.12.0.1@GOTOFF(%ebp,%eax), %eax - jmp *%eax -..1.1_0.TAG.12.0.1: -..1.1_0.TAG.9.0.1: -..1.1_0.TAG.11.0.1: -..1.1_0.TAG.8.0.1: -..B1.64: - movl 48(%esp), %edi - xorl %ebx, %ebx - lea 28(%edi), %edi - jmp ..B1.75 -..1.1_0.TAG.171.0.1: -..1.1_0.TAG.170.0.1: -..1.1_0.TAG.145.0.1: -..1.1_0.TAG.144.0.1: -..1.1_0.TAG.140.0.1: -..1.1_0.TAG.139.0.1: -..1.1_0.TAG.138.0.1: -..1.1_0.TAG.136.0.1: -..1.1_0.TAG.135.0.1: -..1.1_0.TAG.133.0.1: -..1.1_0.TAG.128.0.1: -..1.1_0.TAG.127.0.1: -..1.1_0.TAG.126.0.1: -..1.1_0.TAG.125.0.1: -..1.1_0.TAG.116.0.1: -..1.1_0.TAG.115.0.1: -..1.1_0.TAG.114.0.1: -..1.1_0.TAG.112.0.1: -..1.1_0.TAG.111.0.1: -..1.1_0.TAG.104.0.1: -..1.1_0.TAG.103.0.1: -..1.1_0.TAG.102.0.1: -..1.1_0.TAG.101.0.1: -..1.1_0.TAG.100.0.1: -..1.1_0.TAG.99.0.1: -..1.1_0.TAG.98.0.1: -..1.1_0.TAG.97.0.1: -..1.1_0.TAG.79.0.1: -..1.1_0.TAG.76.0.1: -..1.1_0.TAG.67.0.1: -..1.1_0.TAG.64.0.1: -..1.1_0.TAG.62.0.1: -..1.1_0.TAG.61.0.1: -..1.1_0.TAG.59.0.1: -..1.1_0.TAG.58.0.1: -..1.1_0.TAG.56.0.1: -..1.1_0.TAG.55.0.1: -..1.1_0.TAG.34.0.1: -..1.1_0.TAG.33.0.1: -..1.1_0.TAG.32.0.1: -..1.1_0.TAG.31.0.1: -..1.1_0.TAG.30.0.1: -..1.1_0.TAG.29.0.1: -..1.1_0.TAG.28.0.1: -..1.1_0.TAG.26.0.1: -..1.1_0.TAG.25.0.1: -..1.1_0.TAG.24.0.1: -..1.1_0.TAG.23.0.1: -..1.1_0.TAG.22.0.1: -..1.1_0.TAG.19.0.1: -..1.1_0.TAG.18.0.1: -..1.1_0.TAG.13.0.1: -..1.1_0.TAG.10.0.1: -..1.1_0.TAG.7.0.1: -..1.1_0.TAG.6.0.1: -..1.1_0.TAG.4.0.1: -..1.1_0.TAG.3.0.1: -..1.1_0.TAG.2.0.1: -..1.1_0.SWBASE.0.1: -..1.1_0.TAG.0.0.1: -..B1.74: - movl %ebx, %esi - movl $4, %edx - xorl %ecx, %ecx - subl %edx, %esi - sbbl %ecx, %ecx - jb ..B1.75 -..B1.90: - orl %ecx, %esi - jne ..B1.86 -..B1.75: - movzbl .2.9_2.switchtab.2@GOTOFF(%ebp,%ebx), %eax - lea ..1.1_1.TAG.4.0.1@GOTOFF(%ebp,%eax), %eax - jmp *%eax -..1.1_1.TAG.4.0.1: -..B1.77: - fldt .L_2il0floatpacket.2@GOTOFF(%ebp) - movl $8388608, 12(%esp) - flds 12(%esp) - fmulp %st, %st(1) - fstps 12(%esp) - jmp ..B1.86 -..1.1_1.TAG.3.0.1: -..B1.79: - movl $2130706432, 8(%esp) - flds 8(%esp) - flds 8(%esp) - fmulp %st, %st(1) - fstps 8(%esp) - jmp ..B1.86 -..1.1_1.TAG.2.0.1: -..B1.81: - movl $0, 4(%esp) -..B1.82: - flds 4(%esp) - fldt .L_2il0floatpacket.3@GOTOFF(%ebp) - fdivp %st, %st(1) - fstps 4(%esp) - jmp ..B1.86 -..1.1_1.TAG.1.0.1: -..B1.84: - movl $2139095040, (%esp) - flds (%esp) - flds (%esp) - fsubrp %st, %st(1) - fstps (%esp) -..1.1_1.TAG.0.0.1: -..B1.86: - movl %edi, %eax - addl $28, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret - .align 16,0x90 - .type __dpml_exception,@function - .size __dpml_exception,.-__dpml_exception - .section .rodata, "a" - .align 16 - .align 1 -.2.9_2.switchtab.1: - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.12.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.12.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.12.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.12.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .align 1 -.2.9_2.switchtab.2: - .byte ..1.1_1.TAG.0.0.1 - ..1.1_1.TAG.4.0.1 - .byte ..1.1_1.TAG.1.0.1 - ..1.1_1.TAG.4.0.1 - .byte ..1.1_1.TAG.2.0.1 - ..1.1_1.TAG.4.0.1 - .byte ..1.1_1.TAG.3.0.1 - ..1.1_1.TAG.4.0.1 - .byte ..1.1_1.TAG.4.0.1 - ..1.1_1.TAG.4.0.1 - .data -# -- End __dpml_exception - .text -# -- Begin __dpml_intel_atan_fixup - .text - .align 16,0x90 - .globl __dpml_intel_atan_fixup -__dpml_intel_atan_fixup: -# parameter 1: 32 + %esp -# parameter 2: 40 + %esp -# parameter 3: 44 + %esp -# parameter 4: 52 + %esp -..B2.1: -..L3: - - pushl %esi - pushl %edi - pushl %ebp - subl $16, %esp - movl 52(%esp), %eax - movl 36(%esp), %esi - andl $2147483647, %esi - movl 32(%esp), %edx - orl 56(%esp), %eax - je ..B2.3 -..B2.2: - movl %esi, %eax - movl %edx, %ecx - shll $28, %eax - andl $15, %ecx - shrl $4, %edx - shrl $4, %esi - orl %eax, %edx - jmp ..B2.4 -..B2.3: - movl $4, %ecx -..B2.4: - movl $10, %eax - lea (%esi,%esi,4), %edi - mull %edx - movl %eax, %esi - lea (%edx,%edi,2), %eax - addl %ecx, %esi - adcl $0, %eax - movl $77, %ecx - xorl %ebp, %ebp - addl $-22, %esi - movl %esi, %edx - adcl $-1, %eax - subl %ecx, %edx - sbbl %ebp, %eax - jb ..B2.5 -..B2.110: - orl %eax, %edx - jne ..B2.107 -..B2.5: - call ..L4 -..L4: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%edi), %edi - movl 44(%esp), %ecx - movl 48(%esp), %edx - movl __x_constants__@GOT(%edi), %ebp - movzwl .2.10_2.switchtab.4@GOTOFF(%edi,%esi,2), %eax - lea ..1.2_0.TAG.77.0.2@GOTOFF(%edi,%eax), %eax - jmp *%eax -..1.2_0.TAG.77.0.2: -..B2.7: - orl %edx, %ecx - je ..B2.9 -..B2.8: - movl $5, %esi - jmp ..B2.10 -..B2.9: - movl $11, %esi -..B2.10: - movl $3, %eax - jmp ..B2.101 -..1.2_0.TAG.76.0.2: -..B2.12: - movl $3, %eax - xorl %esi, %esi - jmp ..B2.104 -..1.2_0.TAG.75.0.2: -..1.2_0.TAG.73.0.2: -..1.2_0.TAG.71.0.2: -..1.2_0.TAG.65.0.2: -..1.2_0.TAG.63.0.2: -..1.2_0.TAG.61.0.2: -..1.2_0.TAG.57.0.2: -..1.2_0.TAG.56.0.2: -..1.2_0.TAG.51.0.2: -..1.2_0.TAG.47.0.2: -..1.2_0.TAG.46.0.2: -..1.2_0.TAG.41.0.2: -..1.2_0.TAG.37.0.2: -..1.2_0.TAG.36.0.2: -..1.2_0.TAG.31.0.2: -..1.2_0.TAG.27.0.2: -..1.2_0.TAG.26.0.2: -..1.2_0.TAG.21.0.2: -..1.2_0.TAG.17.0.2: -..1.2_0.TAG.16.0.2: -..1.2_0.TAG.15.0.2: -..1.2_0.TAG.14.0.2: -..1.2_0.TAG.13.0.2: -..1.2_0.TAG.12.0.2: -..1.2_0.TAG.7.0.2: -..1.2_0.TAG.6.0.2: -..1.2_0.TAG.5.0.2: -..1.2_0.TAG.4.0.2: -..1.2_0.TAG.3.0.2: -..1.2_0.TAG.2.0.2: -..B2.14: - xorl %eax, %eax - orl %edx, %ecx - jmp ..B2.101 -..1.2_0.TAG.67.0.2: -..B2.20: - orl %edx, %ecx - je ..B2.22 -..B2.21: - movl $5, %esi - jmp ..B2.100 -..B2.22: - movl $11, %esi - jmp ..B2.100 -..1.2_0.TAG.66.0.2: -..B2.25: - movl $2, %eax - xorl %esi, %esi - jmp ..B2.104 -..1.2_0.TAG.11.0.2: -..B2.69: - orl %edx, %ecx - je ..B2.71 -..B2.70: - movl $6, %esi - jmp ..B2.72 -..B2.71: - movl $10, %esi -..B2.72: - movl $3, %eax - jmp ..B2.101 -..1.2_0.TAG.10.0.2: -..B2.74: - orl %edx, %ecx - je ..B2.76 -..B2.75: - movl $4, %esi - jmp ..B2.77 -..B2.76: - movl $8, %esi -..B2.77: - movl $3, %eax - jmp ..B2.101 -..1.2_0.TAG.1.0.2: -..B2.92: - orl %edx, %ecx - je ..B2.94 -..B2.93: - movl $6, %esi - jmp ..B2.100 -..B2.94: - movl $10, %esi - jmp ..B2.100 -..1.2_0.TAG.0.0.2: -..B2.97: - orl %edx, %ecx - je ..B2.99 -..B2.98: - movl $4, %esi - jmp ..B2.100 -..B2.99: - movl $8, %esi -..B2.100: - movl $2, %eax -..B2.101: - je ..B2.103 -..B2.102: - movl $1182793727, (%esp) - flds (%esp) - flds (%esp) - fmulp %st, %st(1) - fstps (%esp) -..B2.103: - xorl %edx, %edx - orl %eax, %edx - je ..B2.107 -..B2.104: - shll $4, %esi - movl $3, %edi - subl %edi, %eax - xorl %edi, %edi - orl %edi, %eax - movl 8(%ebp,%esi), %ecx - movl 12(%ebp,%esi), %edx - jne ..B2.106 -..B2.105: - xorl $-2147483648, %edx -..B2.106: - movl 40(%esp), %eax - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - movl (%ebp,%esi), %edx - movl 4(%ebp,%esi), %ecx - movl %edx, (%eax) - movl %ecx, 4(%eax) - addl $16, %esp - popl %ebp - popl %edi - popl %esi - ret -..1.2_0.SWBASE.0.2: -..B2.107: - addl $16, %esp - popl %ebp - popl %edi - popl %esi - ret - .align 16,0x90 - .type __dpml_intel_atan_fixup,@function - .size __dpml_intel_atan_fixup,.-__dpml_intel_atan_fixup - .section .rodata, "a" - .space 1, 0x00 # pad - .align 2 -.2.10_2.switchtab.4: - .word ..1.2_0.TAG.0.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.1.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.10.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.11.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.66.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.67.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.76.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.77.0.2 - ..1.2_0.TAG.77.0.2 - .data -# -- End __dpml_intel_atan_fixup - .text -# -- Begin __dpml_intel_pow_fixup - .text - .align 16,0x90 - .globl __dpml_intel_pow_fixup -__dpml_intel_pow_fixup: -# parameter 1: 96 + %esp -# parameter 2: 104 + %esp -# parameter 3: 108 + %esp -# parameter 4: 112 + %esp -# parameter 5: 116 + %esp -# parameter 6: 120 + %esp -# parameter 7: 124 + %esp -..B3.1: -..L5: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $76, %esp - xorl %ecx, %ecx - call ..L6 -..L6: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L6](%eax), %eax - movl 96(%esp), %esi - movl %esi, %ebp - movl 100(%esp), %ebx - andl $15, %ebp - shrl $4, %esi - movl %eax, 40(%esp) - movl %ebx, %eax - andl $15, %esi - subl %ecx, %eax - jl ..B3.41 -..B3.2: - movl 112(%esp), %ecx - movl $-2147483648, %eax - movl 12(%ecx), %edi - subl %eax, %edi - orl 8(%ecx), %edi - jne ..B3.4 -..B3.3: - movl $1, %ecx - jmp ..B3.5 -..B3.4: - xorl %ecx, %ecx -..B3.5: - movl 112(%esp), %eax - movl 16(%eax), %edi - orl 20(%eax), %edi - jne ..B3.7 -..B3.6: - movl $1, %eax - jmp ..B3.8 -..B3.7: - xorl %eax, %eax -..B3.8: - andl %eax, %ecx - movl $10, %eax - mull %esi - movl $94, %esi - addl %ebp, %eax - adcl $0, %edx - negl %esi - addl %eax, %esi - orl %edx, %esi - je ..B3.37 -..B3.9: - movl %eax, %esi - movl $1, %edi - addl $-42, %esi - movl %ebp, 36(%esp) - movl %edx, %ebp - adcl $-1, %ebp - subl %edi, %esi - movl $0, %edi - sbbl %edi, %ebp - movl %ebp, 32(%esp) - movl 36(%esp), %ebp - jb ..B3.28 -..B3.58: - orl 32(%esp), %esi - je ..B3.28 -..B3.10: - movl %eax, %esi - movl $1, %edi - addl $-52, %esi - movl %ebp, 36(%esp) - movl %edx, %ebp - adcl $-1, %ebp - subl %edi, %esi - movl $0, %edi - sbbl %edi, %ebp - movl %ebp, 32(%esp) - movl 36(%esp), %ebp - jb ..B3.28 -..B3.59: - orl 32(%esp), %esi - je ..B3.28 -..B3.11: - movl %eax, %esi - movl %edx, %ecx - addl $-34, %esi - adcl $-1, %ecx - movl $1, %edi - subl %edi, %esi - movl $0, %edi - sbbl %edi, %ecx - jb ..B3.12 -..B3.60: - orl %ecx, %esi - jne ..B3.19 -..B3.12: - movl 40(%esp), %eax - movl __x_constants__@GOT(%eax), %ecx - movl 104(%esp), %eax - movl (%ecx), %esi - movl 4(%ecx), %edi - movl %esi, (%eax) - movl %edi, 4(%eax) - movl $5, %eax - subl %eax, %ebp - xorl %eax, %eax - orl %eax, %ebp - je ..B3.15 -..B3.13: - movl $2147418112, %eax -..B3.15: - movl $3, %ecx - movl 124(%esp), %esi - subl %ecx, %esi - movl 128(%esp), %ebp - orl %ebp, %esi - je ..B3.17 -..B3.16: - xorl %ecx, %ecx - jmp ..B3.18 -..B3.17: - movl $-2147483648, %ecx -..B3.18: - xorl %ecx, %eax - orl $-2147483648, %ebx - movl 104(%esp), %ecx - movl $0, 8(%ecx) - movl %eax, 12(%ecx) - jmp ..B3.34 -..B3.19: - movl $44, %ecx - subl %ecx, %eax - orl %edx, %eax - jne ..B3.34 -..B3.20: - movl 116(%esp), %eax - movl %eax, %ecx - movl 40(%esp), %ebp - movl 8(%eax), %edi - movl __x_constants__@GOT(%ebp), %eax - movl 12(%ecx), %esi - subl 24(%eax), %edi - subl 28(%eax), %esi - orl %esi, %edi - jne ..B3.34 -..B3.21: - movl 116(%esp), %ecx - movl %ecx, %ebp - movl (%ecx), %edi - movl 4(%ebp), %esi - subl 16(%eax), %edi - subl 20(%eax), %esi - orl %esi, %edi - jne ..B3.34 -..B3.22: - movl 120(%esp), %ebp - pushl %ebp - pushl $0 - pushl $7 - pushl 124(%esp) - call __dpml_ux_sqrt_evaluation__ -..B3.65: - addl $16, %esp -..B3.23: - orl %edx, %eax - jne ..B3.25 -..B3.24: - movl $1, %eax - jmp ..B3.26 -..B3.25: - xorl %eax, %eax -..B3.26: - xorl %ecx, %ecx - movl %eax, 40(%esp) - movl %ecx, 44(%esp) - addl $28, %esp - lea 4(%esp), %eax - pushl %eax - pushl %ecx - pushl %ecx - pushl %ecx - pushl %ecx - pushl 96(%esp) - pushl %ebp - call __dpml_pack__ - jmp ..B3.33 -..B3.28: - movl 40(%esp), %esi - movl __x_constants__@GOT(%esi), %edx - movl 40(%edx), %edi - movl %edi, 32(%esp) - movl 44(%edx), %esi - movl 32(%edx), %eax - movl 36(%edx), %edi - movl 104(%esp), %edx - movl %eax, (%edx) - movl 112(%esp), %eax - movl %edi, 4(%edx) - movl 4(%eax), %eax - cmpl $1, %eax - je ..B3.35 -..B3.29: - movl $2, %ecx - xorl %esi, %esi - subl %ecx, %ebp - orl %esi, %ebp - je ..B3.31 -..B3.30: - xorl %ecx, %ecx - jmp ..B3.32 -..B3.31: - movl $1, %ecx -..B3.32: - testl %eax, %eax - movl $0, %eax - movl 104(%esp), %esi - setle %al - cmpl %eax, %ecx - movl $2147418112, %ecx - movl $0, 8(%esi) - jne ..L7 - movl $0, %ecx -..L7: - movl %ecx, 12(%esi) -..B3.33: - orl $-2147483648, %ebx -..B3.34: - movl 96(%esp), %eax - movl %ebx, %edx - addl $76, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B3.35: - xorl %edi, %edi - orl %edi, %ecx - je ..B3.29 -..B3.36: - movl 104(%esp), %ecx - movl 32(%esp), %eax - movl %eax, 8(%ecx) - movl %esi, 12(%ecx) - jmp ..B3.33 -..B3.37: - movl $3, %eax - movl 124(%esp), %ebp - subl %eax, %ebp - movl 128(%esp), %ecx - orl %ecx, %ebp - je ..B3.39 -..B3.38: - xorl %eax, %eax - jmp ..B3.40 -..B3.39: - movl $-2147483648, %eax -..B3.40: - movl 104(%esp), %edi - orl $-2147483648, %ebx - movl %eax, 12(%edi) - movl 108(%esp), %eax - movl %eax, %ecx - movl $0, 8(%edi) - movl (%eax), %ebp - movl 4(%ecx), %esi - movl %ebp, (%edi) - movl %esi, 4(%edi) - jmp ..B3.34 -..B3.41: - movl $10, %eax - movl $95, %ecx - mull %esi - addl %eax, %ebp - adcl $0, %edx - negl %ecx - addl %ebp, %ecx - orl %edx, %ecx - je ..B3.53 -..B3.42: - movl %ebp, %edi - movl %edx, %esi - addl $-40, %edi - adcl $-1, %esi - movl $1, %eax - xorl %ecx, %ecx - subl %eax, %edi - sbbl %ecx, %esi - jb ..B3.50 -..B3.61: - orl %esi, %edi - je ..B3.50 -..B3.43: - movl %ebp, %edi - movl %edx, %esi - addl $-80, %edi - adcl $-1, %esi - subl %eax, %edi - sbbl %ecx, %esi - jb ..B3.49 -..B3.62: - orl %esi, %edi - je ..B3.49 -..B3.44: - movl %ebp, %edi - movl %edx, %esi - addl $-90, %edi - adcl $-1, %esi - subl %eax, %edi - sbbl %ecx, %esi - jb ..B3.49 -..B3.63: - orl %esi, %edi - je ..B3.49 -..B3.45: - addl $-46, %ebp - adcl $-1, %edx - subl %eax, %ebp - sbbl %ecx, %edx - jb ..B3.46 -..B3.64: - orl %edx, %ebp - jne ..B3.34 -..B3.46: - movl 108(%esp), %eax - movl %eax, %ecx - movl 40(%esp), %ebp - movl 8(%eax), %edi - movl __x_constants__@GOT(%ebp), %eax - movl 12(%ecx), %esi - subl 40(%eax), %edi - subl 44(%eax), %esi - orl %esi, %edi - jne ..B3.48 -..B3.47: - movl 108(%esp), %ecx - movl %ecx, %ebp - movl (%ecx), %edi - movl 4(%ebp), %esi - subl 32(%eax), %edi - subl 36(%eax), %esi - orl %esi, %edi - je ..B3.34 -..B3.48: - movl $1182793727, 60(%esp) - flds 60(%esp) - flds 60(%esp) - fmulp %st, %st(1) - fstps 60(%esp) - jmp ..B3.34 -..B3.49: - movl 116(%esp), %ecx - movl %ecx, %ebp - movl 104(%esp), %eax - movl 8(%ecx), %esi - movl 12(%ebp), %edi - orl $32768, %edi - movl %esi, 8(%eax) - movl %edi, 12(%eax) - movl (%ecx), %ebp - movl 4(%ecx), %ecx - movl %ebp, (%eax) - movl %ecx, 4(%eax) - jmp ..B3.34 -..B3.50: - movl 40(%esp), %eax - movl 108(%esp), %ecx - movl 108(%esp), %ebp - movl __x_constants__@GOT(%eax), %eax - movl 8(%ecx), %ecx - movl 12(%ebp), %ebp - movl 40(%eax), %edi - subl %edi, %ecx - movl 44(%eax), %esi - subl %esi, %ebp - orl %ebp, %ecx - jne ..B3.49 -..B3.51: - movl 32(%eax), %ebp - movl 36(%eax), %ecx - movl 108(%esp), %eax - movl 108(%esp), %edx - movl (%eax), %eax - movl 4(%edx), %edx - subl %ebp, %eax - subl %ecx, %edx - orl %edx, %eax - jne ..B3.49 -..B3.52: - movl 104(%esp), %eax - movl %esi, 12(%eax) - movl %ebp, %esi - movl %edi, 8(%eax) - movl %esi, (%eax) - movl %ecx, 4(%eax) - jmp ..B3.34 -..B3.53: - movl 128(%esp), %ecx - movl 124(%esp), %eax - orl %eax, %ecx - je ..B3.34 -..B3.54: - movl 124(%esp), %ecx - xorl %eax, %eax - andl $2, %ecx - orl %eax, %ecx - je ..B3.34 -..B3.55: - movl 104(%esp), %eax - xorl $-2147483648, 12(%eax) - jmp ..B3.34 - .align 16,0x90 - .type __dpml_intel_pow_fixup,@function - .size __dpml_intel_pow_fixup,.-__dpml_intel_pow_fixup - .data -# -- End __dpml_intel_pow_fixup - .text -# -- Begin __dpml_d_intel_order_fixup - .text - .align 16,0x90 - .globl __dpml_d_intel_order_fixup -__dpml_d_intel_order_fixup: -# parameter 1: 4 + %esp -..B4.1: -..L8: - - fldl 4(%esp) - ret - .align 16,0x90 - .type __dpml_d_intel_order_fixup,@function - .size __dpml_d_intel_order_fixup,.-__dpml_d_intel_order_fixup - .data -# -- End __dpml_d_intel_order_fixup - .section .rodata, "a" - .space 2, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xe6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .align 4 -__dpml_response_table: - .long 0 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 1 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 2 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 3 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 3 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 4 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 4 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 6 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 7 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 8 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 8 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 8 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 9 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 9 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 9 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 10 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 10 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 10 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 11 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 11 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 39 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 39 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 12 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 13 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 14 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 33 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 33 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 33 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 33 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 33 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 33 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 34 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 34 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 34 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 34 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 34 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 34 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 34 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 34 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 16 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 16 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 16 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 16 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 17 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 17 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 17 - .byte 0 - .byte 12 - .byte 0 - .byte 12 - .long 38 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 38 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 38 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 47 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 47 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 47 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 47 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 47 - .byte 0 - .byte 8 - .byte 0 - .byte 8 - .long 47 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 47 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 47 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 37 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 18 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 18 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 18 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 19 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 19 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 19 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 20 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 20 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 20 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 45 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 45 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 21 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 21 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 21 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 40 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 40 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 40 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 40 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 22 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 22 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 22 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 22 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 22 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 22 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 22 - .byte 0 - .byte 11 - .byte 0 - .byte 11 - .long 22 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 22 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 22 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 22 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 22 - .byte 0 - .byte 8 - .byte 0 - .byte 8 - .long 22 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 22 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 22 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 41 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 41 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 41 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 41 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 41 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 41 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 41 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 48 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 48 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 23 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 23 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 23 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 24 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 31 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 32 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 32 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 25 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 25 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 26 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 26 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 26 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 27 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 63 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 63 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 28 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 29 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 29 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 29 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 29 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 29 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 30 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 30 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 35 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 36 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 36 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 49 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 50 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 51 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 50 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 50 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 51 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 51 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 42 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 43 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 44 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 42 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 42 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 43 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 43 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 43 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 44 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 44 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 44 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 44 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 46 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 46 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 46 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 46 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 46 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 53 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 78 - .byte 0 - .byte 1 - .byte 0 - .byte 0 - .long 64 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 64 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 64 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 64 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 66 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 66 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 66 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 67 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 67 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 67 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 65 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 65 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 65 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 65 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 65 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 65 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 65 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 68 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 69 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 70 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 71 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 72 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 72 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 72 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 73 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 73 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 73 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 73 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 74 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 74 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 77 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 77 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 77 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 77 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 77 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 77 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 79 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 79 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .type __dpml_response_table,@object - .size __dpml_response_table,1520 - .align 4 - .globl __dpml_globals_table -__dpml_globals_table: - .long 4290772992 - .long 0 - .long 0 - .long 4294443008 - .long 0 - .long 0 - .long 0 - .long 4294934528 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 1 - .long 0 - .long 1 - .long 0 - .long 0 - .long 0 - .long 2147483649 - .long 0 - .long 1 - .long 2147483648 - .long 1 - .long 0 - .long 0 - .long 2147483648 - .long 2139095039 - .long 0 - .long 4294967295 - .long 2146435071 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 2147418111 - .long 4286578687 - .long 0 - .long 4294967295 - .long 4293918719 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 4294901759 - .long 2139095040 - .long 0 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 0 - .long 2147418112 - .long 4286578688 - .long 0 - .long 0 - .long 4293918720 - .long 0 - .long 0 - .long 0 - .long 4294901760 - .long 872415232 - .long 0 - .long 0 - .long 1018167296 - .long 0 - .long 0 - .long 0 - .long 1066336256 - .long 3019898880 - .long 0 - .long 0 - .long 3165650944 - .long 0 - .long 0 - .long 0 - .long 3213819904 - .long 1065353216 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 1073676288 - .long 3212836864 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 3221159936 - .type __dpml_globals_table,@object - .size __dpml_globals_table,416 - .data - .hidden __dpml_ux_sqrt_evaluation__ - .hidden __dpml_pack__ - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isfinite.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isfinite.S deleted file mode 100644 index d6e0559c12..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isfinite.S +++ /dev/null @@ -1,389 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "isfinite.c" - .text -..TXTST0: -# -- Begin isfinitel - .text - .align 16,0x90 - .globl isfinitel -isfinitel: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - movzwl 12(%esp), %edx - shll $16, %edx - movzwl 10(%esp), %eax - orl %eax, %edx - andl $2147483647, %edx - xorl %eax, %eax - cmpl $2147418112, %edx - setb %al - ret - .align 16,0x90 - .type isfinitel,@function - .size isfinitel,.-isfinitel - .data -# -- End isfinitel - .text -# -- Begin __isfinitel - .text - .align 16,0x90 - .globl __isfinitel -__isfinitel: -# parameter 1: 4 + %esp -..B2.1: -..L2: - - movzwl 12(%esp), %edx - shll $16, %edx - movzwl 10(%esp), %eax - orl %eax, %edx - andl $2147483647, %edx - xorl %eax, %eax - cmpl $2147418112, %edx - setb %al - ret - .align 16,0x90 - .type __isfinitel,@function - .size __isfinitel,.-__isfinitel - .data -# -- End __isfinitel - .text -# -- Begin isfinitef - .text - .align 16,0x90 - .globl isfinitef -isfinitef: -# parameter 1: 4 + %esp -..B3.1: -..L3: - - movl 4(%esp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type isfinitef,@function - .size isfinitef,.-isfinitef - .data -# -- End isfinitef - .text -# -- Begin __isfinitef - .text - .align 16,0x90 - .globl __isfinitef -__isfinitef: -# parameter 1: 4 + %esp -..B4.1: -..L4: - - movl 4(%esp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __isfinitef,@function - .size __isfinitef,.-__isfinitef - .data -# -- End __isfinitef - .text -# -- Begin isfinite - .text - .align 16,0x90 - .globl isfinite -isfinite: -# parameter 1: 4 + %esp -..B5.1: -..L5: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type isfinite,@function - .size isfinite,.-isfinite - .data -# -- End isfinite - .text -# -- Begin __isfinite - .text - .align 16,0x90 - .globl __isfinite -__isfinite: -# parameter 1: 4 + %esp -..B6.1: -..L6: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __isfinite,@function - .size __isfinite,.-__isfinite - .data -# -- End __isfinite - .text -# -- Begin isfinited - .text - .align 16,0x90 - .globl isfinited -isfinited: -# parameter 1: 4 + %esp -..B7.1: -..L7: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type isfinited,@function - .size isfinited,.-isfinited - .data -# -- End isfinited - .text -# -- Begin __isfinited - .text - .align 16,0x90 - .globl __isfinited -__isfinited: -# parameter 1: 4 + %esp -..B8.1: -..L8: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __isfinited,@function - .size __isfinited,.-__isfinited - .data -# -- End __isfinited - .text -# -- Begin finitel - .text - .align 16,0x90 - .globl finitel -finitel: -# parameter 1: 4 + %esp -..B9.1: -..L9: - - movzwl 12(%esp), %edx - shll $16, %edx - movzwl 10(%esp), %eax - orl %eax, %edx - andl $2147483647, %edx - xorl %eax, %eax - cmpl $2147418112, %edx - setb %al - ret - .align 16,0x90 - .type finitel,@function - .size finitel,.-finitel - .data -# -- End finitel - .text -# -- Begin __finitel - .text - .align 16,0x90 - .globl __finitel -__finitel: -# parameter 1: 4 + %esp -..B10.1: -..L10: - - movzwl 12(%esp), %edx - shll $16, %edx - movzwl 10(%esp), %eax - orl %eax, %edx - andl $2147483647, %edx - xorl %eax, %eax - cmpl $2147418112, %edx - setb %al - ret - .align 16,0x90 - .type __finitel,@function - .size __finitel,.-__finitel - .data -# -- End __finitel - .text -# -- Begin finitef - .text - .align 16,0x90 - .globl finitef -finitef: -# parameter 1: 4 + %esp -..B11.1: -..L11: - - movl 4(%esp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type finitef,@function - .size finitef,.-finitef - .data -# -- End finitef - .text -# -- Begin __finitef - .text - .align 16,0x90 - .globl __finitef -__finitef: -# parameter 1: 4 + %esp -..B12.1: -..L12: - - movl 4(%esp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __finitef,@function - .size __finitef,.-__finitef - .data -# -- End __finitef - .text -# -- Begin finite - .text - .align 16,0x90 - .globl finite -finite: -# parameter 1: 4 + %esp -..B13.1: -..L13: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type finite,@function - .size finite,.-finite - .data -# -- End finite - .text -# -- Begin __finite - .text - .align 16,0x90 - .globl __finite -__finite: -# parameter 1: 4 + %esp -..B14.1: -..L14: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __finite,@function - .size __finite,.-__finite - .data -# -- End __finite - .text -# -- Begin finited - .text - .align 16,0x90 - .globl finited -finited: -# parameter 1: 4 + %esp -..B15.1: -..L15: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type finited,@function - .size finited,.-finited - .data -# -- End finited - .text -# -- Begin __finited - .text - .align 16,0x90 - .globl __finited -__finited: -# parameter 1: 4 + %esp -..B16.1: -..L16: - - movl 8(%esp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __finited,@function - .size __finited,.-__finited - .data -# -- End __finited - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isinf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isinf.S deleted file mode 100644 index bed0122708..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isinf.S +++ /dev/null @@ -1,313 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "isinf.c" - .text -..TXTST0: -# -- Begin __isinfd - .text - .align 16,0x90 - .globl __isinfd -__isinfd: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - movl $2146435072, %ecx - negl %ecx - movl 8(%esp), %eax - addl %eax, %ecx - movl 4(%esp), %edx - orl %edx, %ecx - jne ..B1.3 -..B1.2: - movl $1, %eax - ret -..B1.3: - movl $-1048576, %ecx - subl %ecx, %eax - orl %eax, %edx - jne ..B1.5 -..B1.4: - movl $-1, %eax - ret -..B1.5: - xorl %eax, %eax -..B1.6: - ret - .align 16,0x90 - .type __isinfd,@function - .size __isinfd,.-__isinfd - .data -# -- End __isinfd - .text -# -- Begin isinfd - .text - .align 16,0x90 - .globl isinfd -isinfd: -# parameter 1: 4 + %esp -..B2.1: -..L2: - - movl $2146435072, %ecx - negl %ecx - movl 8(%esp), %eax - addl %eax, %ecx - movl 4(%esp), %edx - orl %edx, %ecx - jne ..B2.3 -..B2.2: - movl $1, %eax - ret -..B2.3: - movl $-1048576, %ecx - subl %ecx, %eax - orl %eax, %edx - jne ..B2.5 -..B2.4: - movl $-1, %eax - ret -..B2.5: - xorl %eax, %eax -..B2.6: - ret - .align 16,0x90 - .type isinfd,@function - .size isinfd,.-isinfd - .data -# -- End isinfd - .text -# -- Begin __isinf - .text - .align 16,0x90 - .globl __isinf -__isinf: -# parameter 1: 4 + %esp -..B3.1: -..L3: - - movl $2146435072, %ecx - negl %ecx - movl 8(%esp), %eax - addl %eax, %ecx - movl 4(%esp), %edx - orl %edx, %ecx - jne ..B3.3 -..B3.2: - movl $1, %eax - ret -..B3.3: - movl $-1048576, %ecx - subl %ecx, %eax - orl %eax, %edx - jne ..B3.5 -..B3.4: - movl $-1, %eax - ret -..B3.5: - xorl %eax, %eax -..B3.6: - ret - .align 16,0x90 - .type __isinf,@function - .size __isinf,.-__isinf - .data -# -- End __isinf - .text -# -- Begin isinf - .text - .align 16,0x90 - .globl isinf -isinf: -# parameter 1: 4 + %esp -..B4.1: -..L4: - - movl $2146435072, %ecx - negl %ecx - movl 8(%esp), %eax - addl %eax, %ecx - movl 4(%esp), %edx - orl %edx, %ecx - jne ..B4.3 -..B4.2: - movl $1, %eax - ret -..B4.3: - movl $-1048576, %ecx - subl %ecx, %eax - orl %eax, %edx - jne ..B4.5 -..B4.4: - movl $-1, %eax - ret -..B4.5: - xorl %eax, %eax -..B4.6: - ret - .align 16,0x90 - .type isinf,@function - .size isinf,.-isinf - .data -# -- End isinf - .text -# -- Begin __isinff - .text - .align 16,0x90 - .globl __isinff -__isinff: -# parameter 1: 4 + %esp -..B5.1: -..L5: - - movl 4(%esp), %edx - cmpl $2139095040, %edx - jne ..B5.3 -..B5.2: - movl $1, %eax - ret -..B5.3: - cmpl $-8388608, %edx - movl $0, %eax - setne %al - decl %eax - ret - .align 16,0x90 - .type __isinff,@function - .size __isinff,.-__isinff - .data -# -- End __isinff - .text -# -- Begin isinff - .text - .align 16,0x90 - .globl isinff -isinff: -# parameter 1: 4 + %esp -..B6.1: -..L6: - - movl 4(%esp), %edx - cmpl $2139095040, %edx - jne ..B6.3 -..B6.2: - movl $1, %eax - ret -..B6.3: - cmpl $-8388608, %edx - movl $0, %eax - setne %al - decl %eax - ret - .align 16,0x90 - .type isinff,@function - .size isinff,.-isinff - .data -# -- End isinff - .text -# -- Begin __isinfl - .text - .align 16,0x90 - .globl __isinfl -__isinfl: -# parameter 1: 4 + %esp -..B7.1: -..L7: - - movzwl 12(%esp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B7.3 -..B7.2: - xorl %eax, %eax - ret -..B7.3: - cmpl $-2147483648, 8(%esp) - jne ..B7.2 -..B7.4: - cmpl $0, 4(%esp) - jne ..B7.2 -..B7.5: - movzbl 13(%esp), %eax - notl %eax - andl $128, %eax - shrl $6, %eax - decl %eax - ret - .align 16,0x90 - .type __isinfl,@function - .size __isinfl,.-__isinfl - .data -# -- End __isinfl - .text -# -- Begin isinfl - .text - .align 16,0x90 - .globl isinfl -isinfl: -# parameter 1: 4 + %esp -..B8.1: -..L8: - - movzwl 12(%esp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B8.3 -..B8.2: - xorl %eax, %eax - ret -..B8.3: - cmpl $-2147483648, 8(%esp) - jne ..B8.2 -..B8.4: - cmpl $0, 4(%esp) - jne ..B8.2 -..B8.5: - movzbl 13(%esp), %eax - notl %eax - andl $128, %eax - shrl $6, %eax - decl %eax - ret - .align 16,0x90 - .type isinfl,@function - .size isinfl,.-isinfl - .data -# -- End isinfl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isnan.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isnan.S deleted file mode 100644 index e49ab0acab..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isnan.S +++ /dev/null @@ -1,271 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "isnan.c" - .text -..TXTST0: -# -- Begin __isnand - .text - .align 16,0x90 - .globl __isnand -__isnand: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - movl $2146435072, %eax - movl 8(%esp), %edx - andl $2147483647, %edx - movl 4(%esp), %ecx - subl %eax, %edx - jb ..B1.3 -..B1.7: - orl %edx, %ecx - je ..B1.3 -..B1.2: - movl $1, %eax - ret -..B1.3: - xorl %eax, %eax -..B1.4: - ret - .align 16,0x90 - .type __isnand,@function - .size __isnand,.-__isnand - .data -# -- End __isnand - .text -# -- Begin isnand - .text - .align 16,0x90 - .globl isnand -isnand: -# parameter 1: 4 + %esp -..B2.1: -..L2: - - movl $2146435072, %eax - movl 8(%esp), %edx - andl $2147483647, %edx - movl 4(%esp), %ecx - subl %eax, %edx - jb ..B2.3 -..B2.7: - orl %edx, %ecx - je ..B2.3 -..B2.2: - movl $1, %eax - ret -..B2.3: - xorl %eax, %eax -..B2.4: - ret - .align 16,0x90 - .type isnand,@function - .size isnand,.-isnand - .data -# -- End isnand - .text -# -- Begin __isnan - .text - .align 16,0x90 - .globl __isnan -__isnan: -# parameter 1: 4 + %esp -..B3.1: -..L3: - - movl $2146435072, %eax - movl 8(%esp), %edx - andl $2147483647, %edx - movl 4(%esp), %ecx - subl %eax, %edx - jb ..B3.3 -..B3.7: - orl %edx, %ecx - je ..B3.3 -..B3.2: - movl $1, %eax - ret -..B3.3: - xorl %eax, %eax -..B3.4: - ret - .align 16,0x90 - .type __isnan,@function - .size __isnan,.-__isnan - .data -# -- End __isnan - .text -# -- Begin isnan - .text - .align 16,0x90 - .globl isnan -isnan: -# parameter 1: 4 + %esp -..B4.1: -..L4: - - movl $2146435072, %eax - movl 8(%esp), %edx - andl $2147483647, %edx - movl 4(%esp), %ecx - subl %eax, %edx - jb ..B4.3 -..B4.7: - orl %edx, %ecx - je ..B4.3 -..B4.2: - movl $1, %eax - ret -..B4.3: - xorl %eax, %eax -..B4.4: - ret - .align 16,0x90 - .type isnan,@function - .size isnan,.-isnan - .data -# -- End isnan - .text -# -- Begin __isnanf - .text - .align 16,0x90 - .globl __isnanf -__isnanf: -# parameter 1: 4 + %esp -..B5.1: -..L5: - - movl 4(%esp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - movl $0, %eax - seta %al - ret - .align 16,0x90 - .type __isnanf,@function - .size __isnanf,.-__isnanf - .data -# -- End __isnanf - .text -# -- Begin isnanf - .text - .align 16,0x90 - .globl isnanf -isnanf: -# parameter 1: 4 + %esp -..B6.1: -..L6: - - movl 4(%esp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - movl $0, %eax - seta %al - ret - .align 16,0x90 - .type isnanf,@function - .size isnanf,.-isnanf - .data -# -- End isnanf - .text -# -- Begin __isnanl - .text - .align 16,0x90 - .globl __isnanl -__isnanl: -# parameter 1: 4 + %esp -..B7.1: -..L7: - - movzwl 12(%esp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B7.4 -..B7.2: - xorl %eax, %eax -..B7.3: - ret -..B7.4: - cmpl $-2147483648, 8(%esp) - jne ..B7.6 -..B7.5: - cmpl $0, 4(%esp) - je ..B7.2 -..B7.6: - movl $1, %eax - ret - .align 16,0x90 - .type __isnanl,@function - .size __isnanl,.-__isnanl - .data -# -- End __isnanl - .text -# -- Begin isnanl - .text - .align 16,0x90 - .globl isnanl -isnanl: -# parameter 1: 4 + %esp -..B8.1: -..L8: - - movzwl 12(%esp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B8.4 -..B8.2: - xorl %eax, %eax -..B8.3: - ret -..B8.4: - cmpl $-2147483648, 8(%esp) - jne ..B8.6 -..B8.5: - cmpl $0, 4(%esp) - je ..B8.2 -..B8.6: - movl $1, %eax - ret - .align 16,0x90 - .type isnanl,@function - .size isnanl,.-isnanl - .data -# -- End isnanl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isnormal.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isnormal.S deleted file mode 100644 index abc76f0b8d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/isnormal.S +++ /dev/null @@ -1,241 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "isnormal.c" - .text -..TXTST0: -# -- Begin __isnormald - .text - .align 16,0x90 - .globl __isnormald -__isnormald: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - movl 8(%esp), %eax - andl $2147483647, %eax - addl $-1048576, %eax - cmpl $2145386496, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __isnormald,@function - .size __isnormald,.-__isnormald - .data -# -- End __isnormald - .text -# -- Begin isnormald - .text - .align 16,0x90 - .globl isnormald -isnormald: -# parameter 1: 4 + %esp -..B2.1: -..L2: - - movl 8(%esp), %eax - andl $2147483647, %eax - addl $-1048576, %eax - cmpl $2145386496, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type isnormald,@function - .size isnormald,.-isnormald - .data -# -- End isnormald - .text -# -- Begin __isnormal - .text - .align 16,0x90 - .globl __isnormal -__isnormal: -# parameter 1: 4 + %esp -..B3.1: -..L3: - - movl 8(%esp), %eax - andl $2147483647, %eax - addl $-1048576, %eax - cmpl $2145386496, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __isnormal,@function - .size __isnormal,.-__isnormal - .data -# -- End __isnormal - .text -# -- Begin isnormal - .text - .align 16,0x90 - .globl isnormal -isnormal: -# parameter 1: 4 + %esp -..B4.1: -..L4: - - movl 8(%esp), %eax - andl $2147483647, %eax - addl $-1048576, %eax - cmpl $2145386496, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type isnormal,@function - .size isnormal,.-isnormal - .data -# -- End isnormal - .text -# -- Begin __isnormalf - .text - .align 16,0x90 - .globl __isnormalf -__isnormalf: -# parameter 1: 4 + %esp -..B5.1: -..L5: - - movl 4(%esp), %eax - andl $2147483647, %eax - addl $-8388608, %eax - cmpl $2130706432, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type __isnormalf,@function - .size __isnormalf,.-__isnormalf - .data -# -- End __isnormalf - .text -# -- Begin isnormalf - .text - .align 16,0x90 - .globl isnormalf -isnormalf: -# parameter 1: 4 + %esp -..B6.1: -..L6: - - movl 4(%esp), %eax - andl $2147483647, %eax - addl $-8388608, %eax - cmpl $2130706432, %eax - movl $0, %eax - setb %al - ret - .align 16,0x90 - .type isnormalf,@function - .size isnormalf,.-isnormalf - .data -# -- End isnormalf - .text -# -- Begin __isnormall - .text - .align 16,0x90 - .globl __isnormall -__isnormall: -# parameter 1: 4 + %esp -..B7.1: -..L7: - - movzwl 12(%esp), %edx - shll $16, %edx - movzwl 10(%esp), %eax - orl %eax, %edx - andl $2147483647, %edx - cmpl $4096, %edx - jb ..B7.4 -..B7.2: - testl $32768, %edx - jne ..B7.4 -..B7.3: - xorl %eax, %eax - ret -..B7.4: - addl $-65536, %edx - xorl %eax, %eax - cmpl $2147352576, %edx - setb %al - ret - .align 16,0x90 - .type __isnormall,@function - .size __isnormall,.-__isnormall - .data -# -- End __isnormall - .text -# -- Begin isnormall - .text - .align 16,0x90 - .globl isnormall -isnormall: -# parameter 1: 4 + %esp -..B8.1: -..L8: - - movzwl 12(%esp), %edx - shll $16, %edx - movzwl 10(%esp), %eax - orl %eax, %edx - andl $2147483647, %edx - cmpl $4096, %edx - jb ..B8.4 -..B8.2: - testl $32768, %edx - jne ..B8.4 -..B8.3: - xorl %eax, %eax - ret -..B8.4: - addl $-65536, %edx - xorl %eax, %eax - cmpl $2147352576, %edx - setb %al - ret - .align 16,0x90 - .type isnormall,@function - .size isnormall,.-isnormall - .data -# -- End isnormall - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0.S deleted file mode 100644 index e0d0e8793e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0.S +++ /dev/null @@ -1,2689 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j0.c" - .text -..TXTST0: -# -- Begin __j0l - .text - .align 16,0x90 - .hidden __j0l - .globl __j0l -__j0l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %ebx - subl $120, %esp - fldt 8(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fldt 132+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jb ..B1.9 -..B1.2: - fldt _S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.4 -..B1.3: - fldt _Z@GOTOFF(%ebx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt _P1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 132+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 156+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 168+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 180+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 192+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 204+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 216+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 228+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 240+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.4: - movl $1, %edx -..B1.5: - lea (,%edx,8), %ecx - lea (%ecx,%edx,4), %ecx - fldt _S@GOTOFF(%ebx,%ecx) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.8 - jp ..B1.8 -..B1.6: - incl %edx - cmpl $11, %edx - jl ..B1.5 -..B1.7: - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx -..B1.8: - fldt _Z@GOTOFF(%ecx,%ebx) - movl %edx, %eax - fsubrp %st, %st(1) - shll $4, %eax - fld %st(0) - subl %edx, %eax - shll $4, %eax - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt -240+_P@GOTOFF(%eax,%ebx) - fmul %st(1), %st - fldt -228+_P@GOTOFF(%eax,%ebx) - fmul %st(2), %st - fldt -216+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -204+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -192+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -180+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -168+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -156+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -144+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -132+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -120+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -108+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -96+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -84+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -72+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -60+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -48+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -36+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt -24+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt -12+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - fldl _ones@GOTOFF(%ebx) - lea 92(%esp), %eax - fdiv %st(1), %st - lea 64(%esp), %edx - fxch %st(1) - fxch %st(1) - fstpt -60(%eax) - fldt -60(%eax) - fxch %st(1) - fstpt (%esp) - fldt _val_36_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt -28(%eax) - fldt -28(%eax) - movl %eax, 12(%esp) - movl %edx, 16(%esp) - movl $-1, 20(%esp) - fxch %st(1) - fstpt (%eax) - fldt (%eax) - fldt _PP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _QP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 60+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 96+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt 108+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt -44(%eax) - fldt 108+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt -12(%eax) - call __libm_sincos_pi4l -..B1.10: - fldt 8(%ebp) - fldt 80(%esp) - fldt 48(%esp) - fldt 64(%esp) - fmulp %st, %st(1) - fldt 92(%esp) - fmulp %st, %st(2) - fsub %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt _val_0_03L@GOTOFF(%ebx) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B1.12 - jp ..B1.12 -..B1.11: - fstp %st(1) - fldt _tonpi@GOTOFF(%ebx) - fldt 32(%esp) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.12: - fstp %st(0) - lea 32(%esp), %esi - movl %esi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.19: - addl $-32, %esp - movl (%esi), %ecx - lea 80(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%esi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%esi), %ecx - movl 12(%esi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __j0q@PLT -..B1.18: - addl $28, %esp -..B1.13: - movl 48(%esp), %eax - movl %eax, (%esi) - movl 52(%esp), %edx - movl 56(%esp), %ecx - movl 60(%esp), %eax - addl $4, %esp - pushl %esi - movl %edx, 4(%esi) - movl %ecx, 8(%esi) - movl %eax, 12(%esi) - call __qtol@PLT -..B1.14: - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __j0l,@function - .size __j0l,.-__j0l - .data -# -- End __j0l - .text -# -- Begin j0 - .text - .align 16,0x90 - .globl j0 -j0: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp -..B2.2: - fnstcw 46(%esp) -..B2.3: - movl 12(%ebp), %eax - andl $2147483647, %eax - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - cmpl $2146435072, %eax - jge ..B2.26 -..B2.4: - cmpl $1012924416, %eax - jl ..B2.25 -..B2.5: - movzwl 46(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.31 -..B2.6: - orl $-64768, %edx - movw %dx, 44(%esp) -..B2.7: - fldcw 44(%esp) -..B2.8: - movl $1, %edi -..B2.9: - fldl 8(%ebp) - fabs - fldt 132+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jb ..B2.17 -..B2.10: - fldt _S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.12 -..B2.11: - fldt _Z@GOTOFF(%ebx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 76(%esp) - fldt 76(%esp) - fldt _P1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 132+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 156+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 168+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 180+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 192+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 204+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 216+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 228+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 240+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B2.22 -..B2.12: - movl $1, %edx -..B2.13: - lea (,%edx,8), %ecx - lea (%ecx,%edx,4), %ecx - fldt _S@GOTOFF(%ebx,%ecx) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B2.16 - jp ..B2.16 -..B2.14: - incl %edx - cmpl $11, %edx - jl ..B2.13 -..B2.15: - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx -..B2.16: - fldt _Z@GOTOFF(%ecx,%ebx) - movl %edx, %eax - shll $4, %eax - fsubrp %st, %st(1) - subl %edx, %eax - fld %st(0) - shll $4, %eax - fmul %st(1), %st - fstpt 76(%esp) - fldt 76(%esp) - fldt -240+_P@GOTOFF(%eax,%ebx) - fmul %st(1), %st - fldt -228+_P@GOTOFF(%eax,%ebx) - fmul %st(2), %st - fldt -216+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -204+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -192+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -180+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -168+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -156+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -144+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -132+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -120+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -108+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -96+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -84+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -72+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -60+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -48+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -36+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt -24+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt -12+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B2.22 -..B2.17: - fldl _ones@GOTOFF(%ebx) - fdiv %st(1), %st - fstpt (%esp) - fldt (%esp) - fldt _val_36_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(1) - fstpt 76(%esp) - fldt 76(%esp) - addl $-32, %esp - lea 108(%esp), %eax - lea 64(%esp), %edx - fxch %st(2) - fstpt (%esp) - fldt (%esp) - fldt _PP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PP@GOTOFF(%ebx) - movl %eax, 12(%esp) - faddp %st, %st(1) - fmul %st(2), %st - fldt _QP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_QP@GOTOFF(%ebx) - movl %edx, 16(%esp) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_PP@GOTOFF(%ebx) - movl $-1, 20(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fstpt -12(%eax) - fldt 24+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 108+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt -60(%eax) - fldt 108+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -28(%eax) - call __libm_sincos_pi4l -..B2.34: - fldt 96(%esp) - fldt 80(%esp) - fldt 48(%esp) - addl $32, %esp -..B2.18: - fldt 32(%esp) - fmulp %st, %st(1) - fldt 76(%esp) - fmulp %st, %st(2) - fsub %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt _val_0_03L@GOTOFF(%ebx) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B2.20 - jp ..B2.20 -..B2.19: - fstp %st(1) - fldt _tonpi@GOTOFF(%ebx) - fldt (%esp) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - fstpt 16(%esp) - jmp ..B2.22 -..B2.20: - fstp %st(0) - addl $-16, %esp - lea 16(%esp), %esi - movl %esi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B2.36: - addl $-16, %esp - movl (%esi), %ecx - lea 48(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%esi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%esi), %ecx - movl 12(%esi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __j0q@PLT -..B2.35: - addl $28, %esp -..B2.21: - movl 16(%esp), %eax - movl %eax, (%esi) - movl 20(%esp), %edx - movl 24(%esp), %ecx - movl 28(%esp), %eax - addl $-16, %esp - movl %edx, 4(%esi) - movl %ecx, 8(%esi) - movl %eax, 12(%esi) - movl %esi, (%esp) - call __qtol@PLT -..B2.37: - fstpt 32(%esp) - addl $16, %esp -..B2.22: - testl %edi, %edi - je ..B2.24 -..B2.23: - fldcw 46(%esp) -..B2.24: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.25: - fldl 8(%ebp) - fabs - fsubrl _ones@GOTOFF(%ebx) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.26: - andl $-2146435073, %eax - orl 8(%ebp), %eax - je ..B2.28 -..B2.27: - fldl _ones@GOTOFF(%ebx) - fmull 8(%ebp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.28: - fldl _zeros@GOTOFF(%ebx) -..B2.29: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.31: - xorl %edi, %edi - jmp ..B2.9 - .align 16,0x90 - .type j0,@function - .size j0,.-j0 - .data -# -- End j0 - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_S: - .word 17728 - .word 31608 - .word 43949 - .word 62778 - .word 16384 - .word 0 - .word 32551 - .word 41874 - .word 44957 - .word 57471 - .word 16385 - .word 0 - .word 18949 - .word 61409 - .word 34437 - .word 41670 - .word 16386 - .word 0 - .word 4396 - .word 34605 - .word 55192 - .word 54573 - .word 16386 - .word 0 - .word 9307 - .word 10310 - .word 55728 - .word 33731 - .word 16387 - .word 0 - .word 7613 - .word 2917 - .word 18234 - .word 40173 - .word 16387 - .word 0 - .word 24292 - .word 42693 - .word 42782 - .word 46612 - .word 16387 - .word 0 - .word 12570 - .word 29960 - .word 47214 - .word 53050 - .word 16387 - .word 0 - .word 24415 - .word 36838 - .word 59299 - .word 59487 - .word 16387 - .word 0 - .word 32322 - .word 22879 - .word 15219 - .word 32962 - .word 16388 - .word 0 - .word 56404 - .word 12107 - .word 18542 - .word 36180 - .word 16388 - .word 0 - .word 18639 - .word 44635 - .word 10526 - .word 39398 - .word 16388 - .word 0 - .type _S,@object - .size _S,144 - .align 2 -_Z: - .word 64993 - .word 47321 - .word 43380 - .word 39400 - .word 16384 - .word 0 - .word 10427 - .word 24946 - .word 31449 - .word 45220 - .word 16385 - .word 0 - .word 20142 - .word 26358 - .word 43878 - .word 35445 - .word 16386 - .word 0 - .word 45380 - .word 5013 - .word 8196 - .word 48298 - .word 16386 - .word 0 - .word 36049 - .word 37774 - .word 2551 - .word 61157 - .word 16386 - .word 0 - .word 44499 - .word 20687 - .word 35324 - .word 37009 - .word 16387 - .word 0 - .word 37149 - .word 40892 - .word 28299 - .word 43441 - .word 16387 - .word 0 - .word 59921 - .word 2742 - .word 56472 - .word 49873 - .word 16387 - .word 0 - .word 35749 - .word 60152 - .word 42287 - .word 56306 - .word 16387 - .word 0 - .word 36553 - .word 24054 - .word 44174 - .word 62739 - .word 16387 - .word 0 - .word 12707 - .word 13183 - .word 28829 - .word 34586 - .word 16388 - .word 0 - .word 24309 - .word 45263 - .word 7124 - .word 37803 - .word 16388 - .word 0 - .type _Z,@object - .size _Z,144 - .align 2 -_P1: - .word 41974 - .word 50359 - .word 55 - .word 49432 - .word 49085 - .word 0 - .word 46729 - .word 24287 - .word 10077 - .word 43682 - .word 16323 - .word 0 - .word 54556 - .word 53463 - .word 26566 - .word 47408 - .word 16327 - .word 0 - .word 61625 - .word 30678 - .word 34691 - .word 56786 - .word 49099 - .word 0 - .word 32205 - .word 55323 - .word 47622 - .word 59679 - .word 49103 - .word 0 - .word 29650 - .word 64976 - .word 4011 - .word 64391 - .word 16339 - .word 0 - .word 31057 - .word 21065 - .word 6935 - .word 59041 - .word 16343 - .word 0 - .word 36662 - .word 39842 - .word 13910 - .word 57058 - .word 49115 - .word 0 - .word 21879 - .word 21964 - .word 7382 - .word 44566 - .word 49119 - .word 0 - .word 35904 - .word 38403 - .word 56995 - .word 38056 - .word 16355 - .word 0 - .word 18301 - .word 44371 - .word 51380 - .word 49148 - .word 16358 - .word 0 - .word 24372 - .word 2933 - .word 6164 - .word 36455 - .word 49130 - .word 0 - .word 49391 - .word 5716 - .word 15337 - .word 37270 - .word 49133 - .word 0 - .word 25965 - .word 16194 - .word 56568 - .word 46953 - .word 16368 - .word 0 - .word 45667 - .word 13925 - .word 5584 - .word 35484 - .word 16371 - .word 0 - .word 49022 - .word 26773 - .word 37576 - .word 36812 - .word 49142 - .word 0 - .word 36832 - .word 53763 - .word 58864 - .word 36312 - .word 49144 - .word 0 - .word 33543 - .word 46187 - .word 17185 - .word 59351 - .word 16378 - .word 0 - .word 40102 - .word 5284 - .word 63312 - .word 56590 - .word 16379 - .word 0 - .word 857 - .word 43156 - .word 55730 - .word 34022 - .word 49150 - .word 0 - .word 52121 - .word 9280 - .word 35775 - .word 47190 - .word 16318 - .word 0 - .type _P1,@object - .size _P1,252 - .align 2 -_P: - .word 25701 - .word 56152 - .word 43593 - .word 44746 - .word 49091 - .word 0 - .word 48832 - .word 40943 - .word 62738 - .word 40407 - .word 49095 - .word 0 - .word 27954 - .word 18691 - .word 56371 - .word 61331 - .word 16331 - .word 0 - .word 59673 - .word 34431 - .word 10026 - .word 51320 - .word 16335 - .word 0 - .word 19628 - .word 6656 - .word 43961 - .word 34852 - .word 49108 - .word 0 - .word 10797 - .word 38877 - .word 18617 - .word 49740 - .word 49111 - .word 0 - .word 55276 - .word 31862 - .word 41256 - .word 61817 - .word 16347 - .word 0 - .word 56169 - .word 58452 - .word 6548 - .word 36482 - .word 16351 - .word 0 - .word 22526 - .word 12680 - .word 38609 - .word 41195 - .word 49123 - .word 0 - .word 35707 - .word 29316 - .word 48923 - .word 38609 - .word 49126 - .word 0 - .word 54924 - .word 17159 - .word 27854 - .word 39283 - .word 16362 - .word 0 - .word 7410 - .word 20104 - .word 60324 - .word 54971 - .word 16364 - .word 0 - .word 42961 - .word 8606 - .word 41997 - .word 49951 - .word 49136 - .word 0 - .word 20439 - .word 51893 - .word 4000 - .word 47026 - .word 49138 - .word 0 - .word 59638 - .word 54459 - .word 36852 - .word 37873 - .word 16374 - .word 0 - .word 53889 - .word 4789 - .word 65352 - .word 38847 - .word 16375 - .word 0 - .word 1714 - .word 3910 - .word 34394 - .word 55562 - .word 49146 - .word 0 - .word 303 - .word 16967 - .word 38717 - .word 64635 - .word 49145 - .word 0 - .word 5713 - .word 19393 - .word 12368 - .word 44599 - .word 16381 - .word 0 - .word 21960 - .word 14969 - .word 53843 - .word 43675 - .word 16319 - .word 0 - .word 52500 - .word 174 - .word 33388 - .word 44907 - .word 16323 - .word 0 - .word 36805 - .word 62602 - .word 43329 - .word 35133 - .word 16327 - .word 0 - .word 27761 - .word 25841 - .word 3607 - .word 63286 - .word 49099 - .word 0 - .word 6612 - .word 54609 - .word 58140 - .word 43860 - .word 49103 - .word 0 - .word 37993 - .word 17870 - .word 56109 - .word 35856 - .word 16340 - .word 0 - .word 61675 - .word 27140 - .word 56422 - .word 41440 - .word 16343 - .word 0 - .word 56971 - .word 52432 - .word 57814 - .word 63191 - .word 49115 - .word 0 - .word 25412 - .word 37118 - .word 3118 - .word 58735 - .word 49118 - .word 0 - .word 38291 - .word 36319 - .word 26004 - .word 41665 - .word 16355 - .word 0 - .word 50251 - .word 22788 - .word 9163 - .word 59245 - .word 16357 - .word 0 - .word 15018 - .word 28 - .word 26139 - .word 39028 - .word 49130 - .word 0 - .word 33331 - .word 48247 - .word 16919 - .word 39314 - .word 49132 - .word 0 - .word 9684 - .word 33609 - .word 24106 - .word 48128 - .word 16368 - .word 0 - .word 51011 - .word 47822 - .word 659 - .word 60363 - .word 16369 - .word 0 - .word 37534 - .word 11575 - .word 45084 - .word 34566 - .word 49142 - .word 0 - .word 45912 - .word 27680 - .word 6912 - .word 42099 - .word 49142 - .word 0 - .word 56715 - .word 12873 - .word 49782 - .word 46172 - .word 16378 - .word 0 - .word 26728 - .word 49648 - .word 65144 - .word 32891 - .word 16377 - .word 0 - .word 40426 - .word 15254 - .word 52157 - .word 35579 - .word 49149 - .word 0 - .word 38384 - .word 45177 - .word 47511 - .word 58357 - .word 16319 - .word 0 - .word 58158 - .word 44133 - .word 45474 - .word 44841 - .word 49091 - .word 0 - .word 25822 - .word 50828 - .word 25446 - .word 60617 - .word 49094 - .word 0 - .word 15324 - .word 12408 - .word 38243 - .word 63699 - .word 16331 - .word 0 - .word 14774 - .word 16677 - .word 5572 - .word 37105 - .word 16335 - .word 0 - .word 22149 - .word 54660 - .word 59654 - .word 35846 - .word 49108 - .word 0 - .word 11697 - .word 52785 - .word 2274 - .word 34156 - .word 49111 - .word 0 - .word 53627 - .word 64285 - .word 10253 - .word 62534 - .word 16347 - .word 0 - .word 24801 - .word 65406 - .word 2005 - .word 46814 - .word 16350 - .word 0 - .word 32190 - .word 19121 - .word 50201 - .word 40636 - .word 49123 - .word 0 - .word 54751 - .word 12899 - .word 38715 - .word 45207 - .word 49125 - .word 0 - .word 43490 - .word 42082 - .word 27556 - .word 37283 - .word 16362 - .word 0 - .word 22028 - .word 56865 - .word 50900 - .word 56715 - .word 16363 - .word 0 - .word 16346 - .word 12991 - .word 64075 - .word 44659 - .word 49136 - .word 0 - .word 52492 - .word 22409 - .word 7105 - .word 40702 - .word 49137 - .word 0 - .word 6702 - .word 59476 - .word 47051 - .word 61808 - .word 16373 - .word 0 - .word 62316 - .word 14189 - .word 19866 - .word 53935 - .word 16373 - .word 0 - .word 9195 - .word 51568 - .word 61124 - .word 40040 - .word 49146 - .word 0 - .word 6439 - .word 11299 - .word 34414 - .word 41343 - .word 49144 - .word 0 - .word 46739 - .word 24947 - .word 62261 - .word 60937 - .word 16380 - .word 0 - .word 58365 - .word 23430 - .word 12962 - .word 38007 - .word 49087 - .word 0 - .word 58251 - .word 41189 - .word 49383 - .word 44339 - .word 16323 - .word 0 - .word 48598 - .word 60621 - .word 33089 - .word 52046 - .word 16326 - .word 0 - .word 15609 - .word 33598 - .word 37151 - .word 63031 - .word 49099 - .word 0 - .word 47302 - .word 16218 - .word 41542 - .word 62539 - .word 49102 - .word 0 - .word 57122 - .word 24762 - .word 37625 - .word 35182 - .word 16340 - .word 0 - .word 14554 - .word 11813 - .word 4690 - .word 56239 - .word 16342 - .word 0 - .word 54525 - .word 1724 - .word 15173 - .word 60713 - .word 49115 - .word 0 - .word 63047 - .word 59633 - .word 16097 - .word 37474 - .word 49118 - .word 0 - .word 47674 - .word 64044 - .word 50935 - .word 38909 - .word 16355 - .word 0 - .word 10733 - .word 57181 - .word 7346 - .word 35019 - .word 16357 - .word 0 - .word 60139 - .word 34186 - .word 61790 - .word 35089 - .word 49130 - .word 0 - .word 42252 - .word 41404 - .word 34184 - .word 42385 - .word 49131 - .word 0 - .word 1522 - .word 6058 - .word 55347 - .word 41209 - .word 16368 - .word 0 - .word 8896 - .word 65510 - .word 60684 - .word 58885 - .word 16368 - .word 0 - .word 5547 - .word 57306 - .word 64532 - .word 55968 - .word 49141 - .word 0 - .word 14723 - .word 16104 - .word 43168 - .word 38160 - .word 49141 - .word 0 - .word 64145 - .word 20360 - .word 50512 - .word 35772 - .word 16378 - .word 0 - .word 36202 - .word 63428 - .word 51591 - .word 58021 - .word 16375 - .word 0 - .word 65464 - .word 45991 - .word 59516 - .word 54144 - .word 49148 - .word 0 - .word 24568 - .word 20436 - .word 61634 - .word 37862 - .word 49086 - .word 0 - .word 45319 - .word 25104 - .word 37206 - .word 43484 - .word 49091 - .word 0 - .word 21849 - .word 55910 - .word 13070 - .word 44688 - .word 49094 - .word 0 - .word 3252 - .word 24429 - .word 41684 - .word 61678 - .word 16331 - .word 0 - .word 18877 - .word 5474 - .word 3532 - .word 52835 - .word 16334 - .word 0 - .word 29000 - .word 47276 - .word 64838 - .word 34154 - .word 49108 - .word 0 - .word 20967 - .word 63980 - .word 13404 - .word 46613 - .word 49110 - .word 0 - .word 52562 - .word 53463 - .word 21966 - .word 58373 - .word 16347 - .word 0 - .word 9777 - .word 2939 - .word 17549 - .word 60815 - .word 16349 - .word 0 - .word 26283 - .word 15936 - .word 57935 - .word 36992 - .word 49123 - .word 0 - .word 53769 - .word 29752 - .word 63351 - .word 55571 - .word 49124 - .word 0 - .word 39733 - .word 64164 - .word 46820 - .word 32952 - .word 16362 - .word 0 - .word 176 - .word 24001 - .word 47175 - .word 32916 - .word 16363 - .word 0 - .word 42514 - .word 53223 - .word 40190 - .word 38228 - .word 49136 - .word 0 - .word 32337 - .word 51109 - .word 43299 - .word 44928 - .word 49136 - .word 0 - .word 59799 - .word 62803 - .word 25577 - .word 51379 - .word 16373 - .word 0 - .word 14970 - .word 20015 - .word 15936 - .word 57562 - .word 16372 - .word 0 - .word 65161 - .word 31438 - .word 7531 - .word 65214 - .word 49145 - .word 0 - .word 20513 - .word 44789 - .word 62889 - .word 43571 - .word 49143 - .word 0 - .word 4307 - .word 19900 - .word 64182 - .word 49211 - .word 16380 - .word 0 - .word 23601 - .word 8473 - .word 7427 - .word 49494 - .word 49087 - .word 0 - .word 7362 - .word 8526 - .word 7254 - .word 42403 - .word 16323 - .word 0 - .word 35188 - .word 37258 - .word 23196 - .word 38516 - .word 16326 - .word 0 - .word 28716 - .word 28394 - .word 59353 - .word 59952 - .word 49099 - .word 0 - .word 5380 - .word 17306 - .word 43095 - .word 44938 - .word 49102 - .word 0 - .word 62603 - .word 29353 - .word 43042 - .word 32969 - .word 16340 - .word 0 - .word 14219 - .word 29360 - .word 8286 - .word 39065 - .word 16342 - .word 0 - .word 51755 - .word 8774 - .word 37073 - .word 55906 - .word 49115 - .word 0 - .word 56892 - .word 44416 - .word 43797 - .word 50190 - .word 49117 - .word 0 - .word 61329 - .word 48733 - .word 6023 - .word 35132 - .word 16355 - .word 0 - .word 7541 - .word 9021 - .word 40244 - .word 45179 - .word 16356 - .word 0 - .word 26533 - .word 29344 - .word 18926 - .word 62060 - .word 49129 - .word 0 - .word 30572 - .word 2598 - .word 8389 - .word 52807 - .word 49130 - .word 0 - .word 51943 - .word 22643 - .word 23287 - .word 35717 - .word 16368 - .word 0 - .word 64388 - .word 35284 - .word 47919 - .word 35658 - .word 16368 - .word 0 - .word 29632 - .word 11036 - .word 42088 - .word 47700 - .word 49141 - .word 0 - .word 31422 - .word 44089 - .word 40511 - .word 45376 - .word 49140 - .word 0 - .word 24082 - .word 23937 - .word 40663 - .word 60291 - .word 16377 - .word 0 - .word 35871 - .word 18767 - .word 59204 - .word 34260 - .word 16375 - .word 0 - .word 55945 - .word 59437 - .word 40276 - .word 45420 - .word 49148 - .word 0 - .word 36087 - .word 44447 - .word 31316 - .word 65259 - .word 16318 - .word 0 - .word 33015 - .word 55199 - .word 13485 - .word 41205 - .word 49091 - .word 0 - .word 28040 - .word 38678 - .word 23200 - .word 33402 - .word 49094 - .word 0 - .word 24126 - .word 8131 - .word 32863 - .word 58069 - .word 16331 - .word 0 - .word 35392 - .word 16287 - .word 64004 - .word 38564 - .word 16334 - .word 0 - .word 24419 - .word 65021 - .word 26451 - .word 63502 - .word 49107 - .word 0 - .word 50428 - .word 39809 - .word 46675 - .word 33151 - .word 49110 - .word 0 - .word 43497 - .word 65182 - .word 62592 - .word 53510 - .word 16347 - .word 0 - .word 13653 - .word 47792 - .word 51483 - .word 42124 - .word 16349 - .word 0 - .word 51670 - .word 53417 - .word 2690 - .word 33418 - .word 49123 - .word 0 - .word 18048 - .word 20017 - .word 2806 - .word 37530 - .word 49124 - .word 0 - .word 28377 - .word 1564 - .word 33730 - .word 58682 - .word 16361 - .word 0 - .word 50365 - .word 41139 - .word 10086 - .word 43478 - .word 16362 - .word 0 - .word 61280 - .word 6173 - .word 58518 - .word 33596 - .word 49136 - .word 0 - .word 37780 - .word 41188 - .word 55897 - .word 58318 - .word 49135 - .word 0 - .word 54954 - .word 62311 - .word 27470 - .word 44684 - .word 16373 - .word 0 - .word 57442 - .word 38159 - .word 64608 - .word 36945 - .word 16372 - .word 0 - .word 24087 - .word 55434 - .word 11948 - .word 56328 - .word 49145 - .word 0 - .word 3958 - .word 29640 - .word 49133 - .word 55700 - .word 49142 - .word 0 - .word 27700 - .word 45302 - .word 5983 - .word 42389 - .word 16380 - .word 0 - .word 40427 - .word 54367 - .word 12482 - .word 37240 - .word 16320 - .word 0 - .word 59852 - .word 29007 - .word 23004 - .word 39969 - .word 16323 - .word 0 - .word 34211 - .word 57602 - .word 36659 - .word 58360 - .word 16325 - .word 0 - .word 44442 - .word 16364 - .word 9911 - .word 56161 - .word 49099 - .word 0 - .word 28102 - .word 25155 - .word 37530 - .word 33414 - .word 49102 - .word 0 - .word 6555 - .word 37232 - .word 8513 - .word 61132 - .word 16339 - .word 0 - .word 19389 - .word 63961 - .word 54328 - .word 56964 - .word 16341 - .word 0 - .word 46901 - .word 14299 - .word 54235 - .word 51269 - .word 49115 - .word 0 - .word 21562 - .word 53008 - .word 37762 - .word 35900 - .word 49117 - .word 0 - .word 39053 - .word 49830 - .word 37166 - .word 63741 - .word 16354 - .word 0 - .word 45681 - .word 41863 - .word 1807 - .word 63504 - .word 16355 - .word 0 - .word 32524 - .word 20075 - .word 31047 - .word 55727 - .word 49129 - .word 0 - .word 19491 - .word 55333 - .word 6932 - .word 36559 - .word 49130 - .word 0 - .word 44244 - .word 33552 - .word 34722 - .word 63577 - .word 16367 - .word 0 - .word 16901 - .word 42071 - .word 41001 - .word 48810 - .word 16367 - .word 0 - .word 62438 - .word 12223 - .word 44142 - .word 42160 - .word 49141 - .word 0 - .word 23223 - .word 6493 - .word 11343 - .word 61664 - .word 49139 - .word 0 - .word 62523 - .word 30008 - .word 29610 - .word 53050 - .word 16377 - .word 0 - .word 14947 - .word 31100 - .word 26993 - .word 46432 - .word 16374 - .word 0 - .word 54892 - .word 55125 - .word 25696 - .word 39893 - .word 49148 - .word 0 - .word 64089 - .word 10154 - .word 50994 - .word 64131 - .word 16319 - .word 0 - .word 25208 - .word 35455 - .word 35497 - .word 38745 - .word 49091 - .word 0 - .word 22601 - .word 23897 - .word 16529 - .word 51375 - .word 49093 - .word 0 - .word 39957 - .word 27913 - .word 24611 - .word 54302 - .word 16331 - .word 0 - .word 45382 - .word 20134 - .word 36574 - .word 58452 - .word 16333 - .word 0 - .word 42298 - .word 30543 - .word 37555 - .word 58890 - .word 49107 - .word 0 - .word 22768 - .word 53677 - .word 2298 - .word 49504 - .word 49109 - .word 0 - .word 58111 - .word 6687 - .word 35097 - .word 49208 - .word 16347 - .word 0 - .word 10603 - .word 28285 - .word 57192 - .word 62022 - .word 16348 - .word 0 - .word 32868 - .word 54034 - .word 283 - .word 60966 - .word 49122 - .word 0 - .word 45349 - .word 58038 - .word 8163 - .word 54564 - .word 49123 - .word 0 - .word 55920 - .word 35455 - .word 60237 - .word 53133 - .word 16361 - .word 0 - .word 60123 - .word 63321 - .word 17152 - .word 62548 - .word 16361 - .word 0 - .word 39317 - .word 30736 - .word 60380 - .word 60458 - .word 49135 - .word 0 - .word 49393 - .word 44945 - .word 51803 - .word 41616 - .word 49135 - .word 0 - .word 20738 - .word 26362 - .word 9659 - .word 40012 - .word 16373 - .word 0 - .word 60223 - .word 27976 - .word 18717 - .word 52467 - .word 16371 - .word 0 - .word 54339 - .word 42843 - .word 18062 - .word 50282 - .word 49145 - .word 0 - .word 34001 - .word 60559 - .word 43103 - .word 39476 - .word 49142 - .word 0 - .word 26526 - .word 28531 - .word 16125 - .word 37792 - .word 16380 - .word 0 - .word 6095 - .word 56607 - .word 38079 - .word 40348 - .word 49087 - .word 0 - .word 15971 - .word 7192 - .word 49983 - .word 37562 - .word 16323 - .word 0 - .word 50443 - .word 47213 - .word 11879 - .word 45566 - .word 16325 - .word 0 - .word 11802 - .word 10368 - .word 62578 - .word 52530 - .word 49099 - .word 0 - .word 31461 - .word 32590 - .word 25910 - .word 51580 - .word 49101 - .word 0 - .word 23034 - .word 4503 - .word 56149 - .word 56800 - .word 16339 - .word 0 - .word 23084 - .word 49532 - .word 8891 - .word 43466 - .word 16341 - .word 0 - .word 52278 - .word 51985 - .word 56128 - .word 47325 - .word 49115 - .word 0 - .word 64046 - .word 3409 - .word 24460 - .word 54209 - .word 49116 - .word 0 - .word 21815 - .word 55080 - .word 59949 - .word 58476 - .word 16354 - .word 0 - .word 52803 - .word 16320 - .word 8321 - .word 47500 - .word 16355 - .word 0 - .word 52718 - .word 62993 - .word 9405 - .word 50844 - .word 49129 - .word 0 - .word 54524 - .word 45491 - .word 53115 - .word 54272 - .word 49129 - .word 0 - .word 17147 - .word 2195 - .word 64554 - .word 57739 - .word 16367 - .word 0 - .word 25716 - .word 30593 - .word 61559 - .word 36022 - .word 16367 - .word 0 - .word 34582 - .word 27844 - .word 9712 - .word 38156 - .word 49141 - .word 0 - .word 11089 - .word 32571 - .word 7121 - .word 45346 - .word 49139 - .word 0 - .word 19256 - .word 10500 - .word 41195 - .word 47904 - .word 16377 - .word 0 - .word 34688 - .word 57357 - .word 16578 - .word 34099 - .word 16374 - .word 0 - .word 33812 - .word 7938 - .word 37351 - .word 35991 - .word 49148 - .word 0 - .word 39461 - .word 41125 - .word 38968 - .word 43650 - .word 16319 - .word 0 - .word 44025 - .word 18687 - .word 5475 - .word 36436 - .word 49091 - .word 0 - .word 23695 - .word 42035 - .word 32968 - .word 40701 - .word 49093 - .word 0 - .word 38927 - .word 50812 - .word 3019 - .word 50863 - .word 16331 - .word 0 - .word 61445 - .word 40975 - .word 17938 - .word 45887 - .word 16333 - .word 0 - .word 29652 - .word 52899 - .word 3582 - .word 54866 - .word 49107 - .word 0 - .word 20058 - .word 59066 - .word 2994 - .word 38517 - .word 49109 - .word 0 - .word 39274 - .word 56137 - .word 36322 - .word 45609 - .word 16347 - .word 0 - .word 15638 - .word 5070 - .word 53701 - .word 47866 - .word 16348 - .word 0 - .word 51166 - .word 27629 - .word 45907 - .word 56238 - .word 49122 - .word 0 - .word 29387 - .word 28474 - .word 13265 - .word 41814 - .word 49123 - .word 0 - .word 6001 - .word 55757 - .word 63641 - .word 48808 - .word 16361 - .word 0 - .word 65207 - .word 5152 - .word 25385 - .word 47657 - .word 16361 - .word 0 - .word 16879 - .word 18288 - .word 49778 - .word 55345 - .word 49135 - .word 0 - .word 63014 - .word 23411 - .word 42365 - .word 63147 - .word 49134 - .word 0 - .word 41060 - .word 50204 - .word 58630 - .word 36532 - .word 16373 - .word 0 - .word 38440 - .word 64136 - .word 63792 - .word 39699 - .word 16371 - .word 0 - .word 22495 - .word 32960 - .word 60573 - .word 45833 - .word 49145 - .word 0 - .word 59007 - .word 19608 - .word 21801 - .word 59681 - .word 49141 - .word 0 - .word 39231 - .word 52779 - .word 63106 - .word 34425 - .word 16380 - .word 0 - .word 40257 - .word 55273 - .word 33242 - .word 51859 - .word 16320 - .word 0 - .type _P,@object - .size _P,2640 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,12 - .align 2 -_PP: - .word 3555 - .word 4199 - .word 61716 - .word 36505 - .word 49086 - .word 0 - .word 21640 - .word 56203 - .word 47336 - .word 57608 - .word 16322 - .word 0 - .word 3059 - .word 27554 - .word 42044 - .word 45622 - .word 49095 - .word 0 - .word 55815 - .word 35656 - .word 54748 - .word 47307 - .word 16332 - .word 0 - .word 42025 - .word 6728 - .word 28939 - .word 34692 - .word 49106 - .word 0 - .word 58943 - .word 11189 - .word 14960 - .word 38786 - .word 16344 - .word 0 - .word 43526 - .word 20005 - .word 29826 - .word 37014 - .word 49119 - .word 0 - .word 58976 - .word 17109 - .word 36079 - .word 36708 - .word 16359 - .word 0 - .word 58243 - .word 36408 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _PP,@object - .size _PP,120 - .align 2 -_QP: - .word 30466 - .word 14887 - .word 33885 - .word 35327 - .word 16316 - .word 0 - .word 41139 - .word 65374 - .word 59488 - .word 50915 - .word 49088 - .word 0 - .word 35675 - .word 30946 - .word 22284 - .word 35505 - .word 16325 - .word 0 - .word 65216 - .word 29458 - .word 42913 - .word 63176 - .word 49097 - .word 0 - .word 5130 - .word 24339 - .word 48915 - .word 38634 - .word 16335 - .word 0 - .word 30040 - .word 27658 - .word 23448 - .word 34596 - .word 49109 - .word 0 - .word 37816 - .word 17431 - .word 24401 - .word 49646 - .word 16347 - .word 0 - .word 4377 - .word 35057 - .word 45578 - .word 33037 - .word 49123 - .word 0 - .word 19863 - .word 65266 - .word 6202 - .word 53939 - .word 16363 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 49142 - .word 0 - .type _QP,@object - .size _QP,120 - .align 2 -_val_0_03L: - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .type _val_0_03L,@object - .size _val_0_03L,12 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .type _tonpi,@object - .size _tonpi,12 - .data - .hidden __libm_sincos_pi4l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0f.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0f.S deleted file mode 100644 index 574ec9509c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0f.S +++ /dev/null @@ -1,588 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j0f.c" - .text -..TXTST0: -# -- Begin j0f - .text - .align 16,0x90 - .globl j0f -j0f: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %ebx - subl $124, %esp - movl 8(%ebp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - jae ..B1.24 -..B1.2: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $1099154394, %eax - jae ..B1.22 -..B1.3: - cmpl $1081424556, %eax - jae ..B1.14 -..B1.4: - cmpl $1048576000, %eax - jae ..B1.13 -..B1.5: - cmpl $998244352, %eax - jae ..B1.12 -..B1.6: - cmpl $947912704, %eax - jae ..B1.11 -..B1.7: - flds 8(%ebp) - cmpl $838860800, %eax - fld1 - jae ..B1.9 -..B1.8: - fxch %st(1) - fabs - fsubrp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.9: - fxch %st(1) - fmul %st(0), %st - fsubrp %st, %st(1) -..B1.10: - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.11: - flds 8(%ebp) - fmul %st(0), %st - fld1 - fldl 8+_Q3@GOTOFF(%ebx) - fmul %st(2), %st - faddl _Q3@GOTOFF(%ebx) - fmulp %st, %st(2) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.12: - flds 8(%ebp) - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fld1 - fldl 24+_Q2@GOTOFF(%ebx) - fmul %st(2), %st - fldl 16+_Q2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 8+_Q2@GOTOFF(%ebx) - fmulp %st, %st(3) - faddl _Q2@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.13: - flds 8(%ebp) - fabs - fldl 104+_Q1@GOTOFF(%ebx) - fldl 88+_Q1@GOTOFF(%ebx) - fldl 96+_Q1@GOTOFF(%ebx) - fldl 80+_Q1@GOTOFF(%ebx) - fxch %st(4) - fsubl 112+_Q1@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 72+_Q1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 56+_Q1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 40+_Q1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 24+_Q1@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(4) - fxch %st(2) - faddl 64+_Q1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 8+_Q1@GOTOFF(%ebx) - fmulp %st, %st(1) - fxch %st(2) - faddl 32+_Q1@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 48+_Q1@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(2) - faddl 16+_Q1@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddl _Q1@GOTOFF(%ebx) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.14: - cmpl $1092798087, %eax - jae ..B1.18 -..B1.15: - cmpl $1088454576, %eax - jae ..B1.17 -..B1.16: - lea _P1@GOTOFF(%ebx), %eax - jmp ..B1.21 -..B1.17: - lea _P2@GOTOFF(%ebx), %eax - jmp ..B1.21 -..B1.18: - cmpl $1096101336, %eax - jae ..B1.20 -..B1.19: - lea _P3@GOTOFF(%ebx), %eax - jmp ..B1.21 -..B1.20: - lea _P4@GOTOFF(%ebx), %eax -..B1.21: - flds 8(%ebp) - fabs - fldl 96(%eax) - fldl 80(%eax) - fldl 88(%eax) - fldl 72(%eax) - fxch %st(4) - fsubl 104(%eax) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 64(%eax) - fmul %st(5), %st - fxch %st(4) - faddl 48(%eax) - fmul %st(5), %st - fxch %st(4) - faddl 32(%eax) - fmul %st(5), %st - fxch %st(4) - faddl 16(%eax) - fmul %st(1), %st - faddp %st, %st(4) - fxch %st(2) - faddl 56(%eax) - fmul %st(4), %st - fxch %st(3) - faddl (%eax) - fxch %st(5) - faddl 40(%eax) - fmulp %st, %st(4) - fxch %st(2) - faddl 24(%eax) - fmulp %st, %st(1) - fmul %st(1), %st - fxch %st(2) - faddl 8(%eax) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.22: - flds 8(%ebp) - lea 32(%esp), %eax - fabs - lea 40(%esp), %edx - fld1 - fdiv %st(1), %st - fstl 16(%eax) - fldl _val_16_0@GOTOFF(%ebx) - fmulp %st, %st(1) - fstl 24(%eax) - fmul %st(0), %st - fstl 32(%eax) - fmul %st(0), %st - fxch %st(1) - fstpl (%esp) - movl %eax, 8(%esp) - movl %edx, 12(%esp) - movl $-1, 16(%esp) - fstpl 40(%eax) - call __libm_sincos_k32 -..B1.23: - fldl 72(%esp) - fldl 64(%esp) - fldl _tonpi@GOTOFF(%ebx) - fmull 48(%esp) - fsqrt - fldl 40+_PP@GOTOFF(%ebx) - fmul %st(3), %st - fldl 32+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 24+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 16+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 8+_PP@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl _PP@GOTOFF(%ebx) - faddp %st, %st(1) - fldl 40+_QP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - fmull 40(%esp) - fxch %st(1) - faddl 24+_QP@GOTOFF(%ebx) - fmul %st(4), %st - fldl 32+_QP@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(1) - faddl 8+_QP@GOTOFF(%ebx) - fmulp %st, %st(4) - faddl 16+_QP@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - faddl _QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmull 56(%esp) - fmull 32(%esp) - fsubrp %st, %st(2) - fmulp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.24: - ja ..B1.26 -..B1.25: - fldz - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.26: - flds 8(%ebp) -..B1.27: - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type j0f,@function - .size j0f,.-j0f - .data -# -- End j0f - .section .rodata, "a" - .align 4 - .align 4 -_Q3: - .long 4294966841 - .long 3218079743 - .long 477219499 - .long 1066401791 - .type _Q3,@object - .size _Q3,16 - .align 4 -_Q2: - .long 4294967005 - .long 3218079743 - .long 4292583532 - .long 1066401791 - .long 2963922746 - .long 3208409541 - .long 1698509326 - .long 1054632110 - .type _Q2,@object - .size _Q2,32 - .align 4 -_Q1: - .long 569392270 - .long 3163659129 - .long 911539783 - .long 3219168475 - .long 3927550863 - .long 1069261278 - .long 1680954783 - .long 1068301032 - .long 3247602706 - .long 3212950300 - .long 1528576945 - .long 3210869138 - .long 2120930432 - .long 1060197251 - .long 3147753376 - .long 1057418557 - .long 3445667889 - .long 3201446637 - .long 160313185 - .long 3198274950 - .long 2157358765 - .long 1047004568 - .long 1405517519 - .long 1043512506 - .long 3055202941 - .long 3187001715 - .long 562966967 - .long 3183555197 - .long 781654848 - .long 1073954069 - .type _Q1,@object - .size _Q1,120 - .align 4 -_P1: - .long 2556390964 - .long 3162487616 - .long 168113101 - .long 1070974694 - .long 3865632959 - .long 3214905202 - .long 3384884860 - .long 3215663440 - .long 3461368592 - .long 1064499199 - .long 2947775703 - .long 1063419441 - .long 1964351934 - .long 3207001659 - .long 1081690493 - .long 3204998104 - .long 2315304668 - .long 1053480462 - .long 3655541446 - .long 1050880364 - .long 988219424 - .long 3194139699 - .long 2647984383 - .long 3191029766 - .long 3459760917 - .long 1038956170 - .long 1529622085 - .long 1075188879 - .type _P1,@object - .size _P1,112 - .align 4 -_P2: - .long 2989381656 - .long 3164006638 - .long 2007135498 - .long 3218169721 - .long 3461465629 - .long 1066405759 - .long 1292000183 - .long 1067879320 - .long 1048188593 - .long 3211038307 - .long 2811900586 - .long 3210797269 - .long 275024305 - .long 1058896216 - .long 2179928921 - .long 1057456107 - .long 2316750355 - .long 3200463196 - .long 1626245786 - .long 3198355713 - .long 2429961783 - .long 1046264853 - .long 3081665457 - .long 1043557342 - .long 3760684269 - .long 3186121773 - .long 1825365706 - .long 1075924661 - .type _P2,@object - .size _P2,112 - .align 4 -_P3: - .long 915277891 - .long 3163740397 - .long 1721892699 - .long 1070448958 - .long 3433548142 - .long 3213111280 - .long 3603643349 - .long 3215166749 - .long 2193444562 - .long 1062884841 - .long 1036402988 - .long 1063136790 - .long 2039602830 - .long 3205750717 - .long 2039806946 - .long 3204828766 - .long 3757243411 - .long 1052487712 - .long 2819184679 - .long 1050816211 - .long 1638789445 - .long 3193302656 - .long 96077275 - .long 3191008024 - .long 34207204 - .long 1038327735 - .long 8549046 - .long 1076335940 - .type _P3,@object - .size _P3,112 - .align 4 -_P4: - .long 4010378302 - .long 3164933090 - .long 260862994 - .long 3217715229 - .long 793353311 - .long 1065112761 - .long 2823013001 - .long 1067546520 - .long 4006575139 - .long 3209863700 - .long 3390737311 - .long 3210433566 - .long 1793352299 - .long 1057800372 - .long 3528876835 - .long 1057234714 - .long 2505438989 - .long 3199512871 - .long 2785865938 - .long 3198229698 - .long 565130724 - .long 1045495083 - .long 410977742 - .long 1043470609 - .long 4266013081 - .long 3185543354 - .long 1056076242 - .long 1076747425 - .type _P4,@object - .size _P4,112 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_PP: - .long 4294966288 - .long 1072693247 - .long 4269912424 - .long 3207725055 - .long 1780799603 - .long 1052554744 - .long 2285933488 - .long 3194113879 - .long 3892950982 - .long 1041746526 - .long 150212775 - .long 3184818833 - .type _PP,@object - .size _PP,48 - .align 4 -_QP: - .long 4294921804 - .long 3212836863 - .long 4153409851 - .long 1056096255 - .long 2226361937 - .long 3196916170 - .long 3849695089 - .long 1044094312 - .long 663042994 - .long 3187124278 - .long 3336948587 - .long 1035486718 - .type _QP,@object - .size _QP,48 - .data - .hidden __libm_sincos_k32 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0l.S deleted file mode 100644 index c834714533..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j0l.S +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j0l.c" - .text -..TXTST0: -# -- Begin j0l - .text - .align 16,0x90 - .globl j0l -j0l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $56, %esp - fldt 8(%ebp) - lea 16(%esp), %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %edi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.6: - addl $-32, %esp - movl (%edi), %ecx - lea 64(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%edi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%edi), %ecx - movl 12(%edi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __j0q@PLT -..B1.5: - addl $28, %esp -..B1.2: - movl 32(%esp), %eax - movl %eax, (%edi) - movl 36(%esp), %edx - movl 40(%esp), %ecx - movl 44(%esp), %eax - addl $4, %esp - pushl %edi - movl %edx, 4(%edi) - movl %ecx, 8(%edi) - movl %eax, 12(%edi) - call __qtol@PLT -..B1.7: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type j0l,@function - .size j0l,.-j0l - .data -# -- End j0l - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1.S deleted file mode 100644 index ebd71cb540..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1.S +++ /dev/null @@ -1,2716 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j1.c" - .text -..TXTST0: -# -- Begin __j1l - .text - .align 16,0x90 - .hidden __j1l - .globl __j1l -__j1l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %ebx - subl $120, %esp - fldt 8(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fldt 132+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.9 -..B1.2: - fldt _S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.4 -..B1.3: - fldt 12+_P1@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fstpt 88(%esp) - fmul %st, %st(1) - fstpt 76(%esp) - fldt 76(%esp) - fldt _P1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 48+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 60+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 72+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 84+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 96+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 108+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 120+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 132+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 144+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 156+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 168+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 180+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 192+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 204+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmulp %st, %st(2) - fldt 216+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.4: - movl $1, %edx -..B1.5: - lea (,%edx,8), %ecx - lea (%ecx,%edx,4), %esi - fldt _S@GOTOFF(%ebx,%esi) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.8 - jp ..B1.8 -..B1.6: - incl %edx - cmpl $11, %edx - jl ..B1.5 -..B1.8: - lea -8(,%edx,8), %ecx - lea -1(%edx), %eax - movl %eax, %esi - lea -4(%ecx,%edx,4), %edx - fldt _Z@GOTOFF(%ebx,%edx) - shll $4, %esi - fsubrp %st, %st(1) - subl %eax, %esi - fld %st(0) - shll $4, %esi - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fstpt 88(%esp) - fstpt 76(%esp) - fldt 76(%esp) - fldt _P@GOTOFF(%esi,%ebx) - fmul %st(1), %st - fldt 12+_P@GOTOFF(%esi,%ebx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 132+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 156+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 168+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 180+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 192+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 204+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 216+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 228+_P@GOTOFF(%esi,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - fldl _ones@GOTOFF(%ebx) - lea 76(%esp), %eax - fdiv %st(1), %st - lea 88(%esp), %edx - fxch %st(1) - fxch %st(1) - fstpt -44(%eax) - fldt -44(%eax) - fxch %st(1) - fstpt (%esp) - fldt _val_36_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 12(%eax) - fldt 12(%eax) - movl %eax, 12(%esp) - movl %edx, 16(%esp) - movl $-3, 20(%esp) - fxch %st(1) - fstpt (%eax) - fldt (%eax) - fldt _PP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _QP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 60+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 96+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt 108+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt -28(%eax) - fldt 108+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt -12(%eax) - call __libm_sincos_pi4l -..B1.10: - fldt 8(%ebp) - fldt 64(%esp) - fldt 48(%esp) - fldt 88(%esp) - fmulp %st, %st(1) - fldt 76(%esp) - fmulp %st, %st(2) - fsub %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt _val_0_03L@GOTOFF(%ebx) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B1.12 - jp ..B1.12 -..B1.11: - fstp %st(1) - fldt _tonpi@GOTOFF(%ebx) - fldt 32(%esp) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.12: - fstp %st(0) - lea 32(%esp), %esi - movl %esi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.19: - addl $-32, %esp - movl (%esi), %ecx - lea 80(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%esi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%esi), %ecx - movl 12(%esi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __j1q@PLT -..B1.18: - addl $28, %esp -..B1.13: - movl 48(%esp), %eax - movl %eax, (%esi) - movl 52(%esp), %edx - movl 56(%esp), %ecx - movl 60(%esp), %eax - addl $4, %esp - pushl %esi - movl %edx, 4(%esi) - movl %ecx, 8(%esi) - movl %eax, 12(%esi) - call __qtol@PLT -..B1.14: - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __j1l,@function - .size __j1l,.-__j1l - .data -# -- End __j1l - .text -# -- Begin j1 - .text - .align 16,0x90 - .globl j1 -j1: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp -..B2.2: - fnstcw 46(%esp) -..B2.3: - movl 12(%ebp), %edi - movl %edi, %edx - andl $2147483647, %edx - shrl $31, %edi - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - cmpl $2146435072, %edx - jge ..B2.34 -..B2.4: - cmpl $1012924416, %edx - jge ..B2.11 -..B2.5: - cmpl $2097152, %edx - jl ..B2.7 -..B2.6: - fldl 8(%ebp) - fmull .L_2il0floatpacket.0@GOTOFF(%ebx) - fldl .L_2il0floatpacket.1@GOTOFF(%ebx) - fmul %st(1), %st - fldl .L_2il0floatpacket.2@GOTOFF(%ebx) - fmulp %st, %st(2) - fsubp %st, %st(1) - fstpl 88(%esp) - fldl 88(%esp) - fmull .L_2il0floatpacket.3@GOTOFF(%ebx) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.7: - movl 8(%ebp), %eax - orl %eax, %edx - je ..B2.9 -..B2.8: - fldl _small_value_64@GOTOFF(%ebx,%edi,8) - fmull _small_value_64@GOTOFF(%ebx) - fstpl 88(%esp) - fldl 88(%esp) - fldl 8(%ebp) - fmull .L_2il0floatpacket.1@GOTOFF(%ebx) - fsubp %st, %st(1) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.9: - fldl 8(%ebp) -..B2.10: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.11: - movzwl 46(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.39 -..B2.12: - orl $-64768, %edx - movw %dx, 44(%esp) -..B2.13: - fldcw 44(%esp) -..B2.14: - movl $1, %esi -..B2.15: - fldl 8(%ebp) - fabs - fldt 132+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.23 -..B2.16: - fldt _S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.18 -..B2.17: - fldt _P1@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 72(%esp) - fstpt 60(%esp) - fldt 60(%esp) - fldt 12+_P1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 36+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 48+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 60+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 72+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 84+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 96+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 108+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 120+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 132+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 144+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 156+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 168+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 180+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 192+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 204+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt 216+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B2.28 -..B2.18: - movl $1, %edx -..B2.19: - lea (,%edx,8), %ecx - lea (%ecx,%edx,4), %eax - fldt _S@GOTOFF(%ebx,%eax) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B2.22 - jp ..B2.22 -..B2.20: - incl %edx - cmpl $11, %edx - jl ..B2.19 -..B2.22: - lea -8(,%edx,8), %ecx - lea -1(%edx), %eax - lea -4(%ecx,%edx,4), %edx - movl %eax, %ecx - fldt _Z@GOTOFF(%ebx,%edx) - shll $4, %ecx - fsubrp %st, %st(1) - subl %eax, %ecx - fld %st(0) - shll $4, %ecx - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fstpt 72(%esp) - fstpt 60(%esp) - fldt 60(%esp) - fldt _P@GOTOFF(%ecx,%ebx) - fmul %st(1), %st - fldt 12+_P@GOTOFF(%ecx,%ebx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 132+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 156+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 168+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 180+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 192+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 204+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 216+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 228+_P@GOTOFF(%ecx,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B2.28 -..B2.23: - fldl _ones@GOTOFF(%ebx) - fdiv %st(1), %st - fstpt (%esp) - fldt (%esp) - fldt _val_36_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 72(%esp) - fldt 72(%esp) - fxch %st(1) - fstpt 60(%esp) - fldt 60(%esp) - addl $-32, %esp - lea 92(%esp), %eax - lea 104(%esp), %edx - fxch %st(2) - fstpt (%esp) - fldt (%esp) - fldt _PP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PP@GOTOFF(%ebx) - movl %eax, 12(%esp) - faddp %st, %st(1) - fmul %st(2), %st - fldt _QP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_QP@GOTOFF(%ebx) - movl %edx, 16(%esp) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_PP@GOTOFF(%ebx) - movl $-3, 20(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fstpt -12(%eax) - fldt 24+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 108+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt -44(%eax) - fldt 108+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -28(%eax) - call __libm_sincos_pi4l -..B2.42: - fldt 80(%esp) - fldt 64(%esp) - fldt 48(%esp) - addl $32, %esp -..B2.24: - fldt 72(%esp) - fmulp %st, %st(1) - fldt 60(%esp) - fmulp %st, %st(2) - fsub %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt _val_0_03L@GOTOFF(%ebx) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B2.26 - jp ..B2.26 -..B2.25: - fstp %st(1) - fldt _tonpi@GOTOFF(%ebx) - fldt (%esp) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - fstpt 16(%esp) - jmp ..B2.28 -..B2.26: - fstp %st(0) - addl $-16, %esp - lea 16(%esp), %edx - movl %edx, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B2.44: - lea 16(%esp), %edx - addl $-16, %esp - lea 48(%esp), %ecx - movl %ecx, (%esp) - lea 16(%esp), %eax - movl (%edx), %ecx - movl %ecx, (%eax) - movl 4(%edx), %ecx - movl %ecx, 4(%eax) - movl 8(%edx), %ecx - movl %ecx, 8(%eax) - movl 12(%edx), %ecx - movl %ecx, 12(%eax) - call __j1q@PLT -..B2.43: - lea 28(%esp), %edx - addl $28, %esp -..B2.27: - movl 16(%esp), %eax - movl 20(%esp), %ecx - movl %eax, (%edx) - movl %ecx, 4(%edx) - movl 24(%esp), %eax - movl 28(%esp), %ecx - addl $-16, %esp - movl %eax, 8(%edx) - movl %ecx, 12(%edx) - movl %edx, (%esp) - call __qtol@PLT -..B2.45: - fstpt 32(%esp) - addl $16, %esp -..B2.28: - testl %esi, %esi - je ..B2.30 -..B2.29: - fldcw 46(%esp) -..B2.30: - testl %edi, %edi - je ..B2.33 -..B2.31: - fldt 16(%esp) - fchs - fstpt 16(%esp) -..B2.33: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.34: - andl $-2146435073, %edx - orl 8(%ebp), %edx - je ..B2.36 -..B2.35: - fldl _ones@GOTOFF(%ebx) - fmull 8(%ebp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.36: - fldl _zeros@GOTOFF(%ebx,%edi,8) -..B2.37: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.39: - xorl %esi, %esi - jmp ..B2.15 - .align 16,0x90 - .type j1,@function - .size j1,.-j1 - .data -# -- End j1 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x43b00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x3c700000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x3c300000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_S: - .word 64993 - .word 47321 - .word 43380 - .word 39400 - .word 16384 - .word 0 - .word 10427 - .word 24946 - .word 31449 - .word 45220 - .word 16385 - .word 0 - .word 20142 - .word 26358 - .word 43878 - .word 35445 - .word 16386 - .word 0 - .word 45380 - .word 5013 - .word 8196 - .word 48298 - .word 16386 - .word 0 - .word 36049 - .word 37774 - .word 2551 - .word 61157 - .word 16386 - .word 0 - .word 44499 - .word 20687 - .word 35324 - .word 37009 - .word 16387 - .word 0 - .word 37149 - .word 40892 - .word 28299 - .word 43441 - .word 16387 - .word 0 - .word 59921 - .word 2742 - .word 56472 - .word 49873 - .word 16387 - .word 0 - .word 35749 - .word 60152 - .word 42287 - .word 56306 - .word 16387 - .word 0 - .word 36553 - .word 24054 - .word 44174 - .word 62739 - .word 16387 - .word 0 - .word 12707 - .word 13183 - .word 28829 - .word 34586 - .word 16388 - .word 0 - .word 24309 - .word 45263 - .word 7124 - .word 37803 - .word 16388 - .word 0 - .type _S,@object - .size _S,144 - .align 2 -_P1: - .word 26041 - .word 45178 - .word 34801 - .word 41495 - .word 49090 - .word 0 - .word 65370 - .word 9956 - .word 39004 - .word 61276 - .word 49094 - .word 0 - .word 9622 - .word 32383 - .word 51277 - .word 45692 - .word 16332 - .word 0 - .word 53955 - .word 64596 - .word 5222 - .word 35592 - .word 49100 - .word 0 - .word 34986 - .word 10535 - .word 24469 - .word 42796 - .word 49108 - .word 0 - .word 2569 - .word 3934 - .word 58827 - .word 40937 - .word 49103 - .word 0 - .word 16535 - .word 14264 - .word 30755 - .word 37884 - .word 16348 - .word 0 - .word 39497 - .word 52694 - .word 37205 - .word 63078 - .word 49104 - .word 0 - .word 50010 - .word 60332 - .word 8210 - .word 49710 - .word 49123 - .word 0 - .word 10498 - .word 63852 - .word 64151 - .word 35274 - .word 49105 - .word 0 - .word 55591 - .word 43795 - .word 24807 - .word 46603 - .word 16362 - .word 0 - .word 15642 - .word 32907 - .word 52420 - .word 55914 - .word 49103 - .word 0 - .word 53151 - .word 24867 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 37497 - .word 10412 - .word 6022 - .word 55715 - .word 49100 - .word 0 - .word 14397 - .word 43702 - .word 43690 - .word 43690 - .word 16374 - .word 0 - .word 57427 - .word 55015 - .word 8445 - .word 53508 - .word 49095 - .word 0 - .word 64958 - .word 65535 - .word 65535 - .word 65535 - .word 49146 - .word 0 - .word 64696 - .word 39566 - .word 31598 - .word 54025 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .type _P1,@object - .size _P1,228 - .align 2 -_Z: - .word 17728 - .word 31608 - .word 43949 - .word 62778 - .word 16384 - .word 0 - .word 32551 - .word 41874 - .word 44957 - .word 57471 - .word 16385 - .word 0 - .word 18949 - .word 61409 - .word 34437 - .word 41670 - .word 16386 - .word 0 - .word 4396 - .word 34605 - .word 55192 - .word 54573 - .word 16386 - .word 0 - .word 9307 - .word 10310 - .word 55728 - .word 33731 - .word 16387 - .word 0 - .word 7613 - .word 2917 - .word 18234 - .word 40173 - .word 16387 - .word 0 - .word 24292 - .word 42693 - .word 42782 - .word 46612 - .word 16387 - .word 0 - .word 12570 - .word 29960 - .word 47214 - .word 53050 - .word 16387 - .word 0 - .word 24415 - .word 36838 - .word 59299 - .word 59487 - .word 16387 - .word 0 - .word 32322 - .word 22879 - .word 15219 - .word 32962 - .word 16388 - .word 0 - .word 56404 - .word 12107 - .word 18542 - .word 36180 - .word 16388 - .word 0 - .type _Z,@object - .size _Z,132 - .align 2 -_P: - .word 43464 - .word 52019 - .word 16370 - .word 39301 - .word 16323 - .word 0 - .word 45212 - .word 20213 - .word 4367 - .word 36322 - .word 16327 - .word 0 - .word 62182 - .word 43016 - .word 65056 - .word 63104 - .word 49099 - .word 0 - .word 45004 - .word 1793 - .word 2432 - .word 46043 - .word 49103 - .word 0 - .word 10697 - .word 46113 - .word 34013 - .word 35792 - .word 16340 - .word 0 - .word 9065 - .word 41098 - .word 5532 - .word 44900 - .word 16343 - .word 0 - .word 26003 - .word 49876 - .word 4534 - .word 63025 - .word 49115 - .word 0 - .word 42133 - .word 20669 - .word 62629 - .word 33244 - .word 49119 - .word 0 - .word 10663 - .word 14825 - .word 55564 - .word 41652 - .word 16355 - .word 0 - .word 21046 - .word 62601 - .word 18713 - .word 35715 - .word 16358 - .word 0 - .word 28431 - .word 25084 - .word 11881 - .word 39361 - .word 49130 - .word 0 - .word 40049 - .word 63841 - .word 60004 - .word 52172 - .word 49132 - .word 0 - .word 992 - .word 25066 - .word 14104 - .word 49616 - .word 16368 - .word 0 - .word 44948 - .word 43537 - .word 5801 - .word 46886 - .word 16370 - .word 0 - .word 65381 - .word 44162 - .word 41036 - .word 37465 - .word 49142 - .word 0 - .word 14125 - .word 39149 - .word 41569 - .word 43450 - .word 49143 - .word 0 - .word 9425 - .word 2504 - .word 59629 - .word 56004 - .word 16378 - .word 0 - .word 7469 - .word 36200 - .word 7418 - .word 55109 - .word 16378 - .word 0 - .word 63186 - .word 26107 - .word 31425 - .word 52790 - .word 49149 - .word 0 - .word 52143 - .word 25611 - .word 44594 - .word 35227 - .word 49085 - .word 0 - .word 35717 - .word 29166 - .word 20585 - .word 41467 - .word 49091 - .word 0 - .word 2832 - .word 5439 - .word 21266 - .word 33717 - .word 49095 - .word 0 - .word 5378 - .word 24417 - .word 51356 - .word 63335 - .word 16331 - .word 0 - .word 48412 - .word 30659 - .word 29190 - .word 42335 - .word 16335 - .word 0 - .word 9054 - .word 19776 - .word 30431 - .word 35870 - .word 49108 - .word 0 - .word 1836 - .word 17934 - .word 4966 - .word 40411 - .word 49111 - .word 0 - .word 4836 - .word 40500 - .word 17629 - .word 63063 - .word 16347 - .word 0 - .word 23076 - .word 41820 - .word 25860 - .word 58134 - .word 16350 - .word 0 - .word 39832 - .word 57656 - .word 52920 - .word 41521 - .word 49123 - .word 0 - .word 22342 - .word 1014 - .word 59094 - .word 59974 - .word 49125 - .word 0 - .word 25371 - .word 16474 - .word 28775 - .word 38931 - .word 16362 - .word 0 - .word 48127 - .word 54624 - .word 55306 - .word 41258 - .word 16364 - .word 0 - .word 60537 - .word 50282 - .word 14991 - .word 48309 - .word 49136 - .word 0 - .word 15691 - .word 57338 - .word 50654 - .word 33690 - .word 49138 - .word 0 - .word 40468 - .word 19472 - .word 58347 - .word 35325 - .word 16374 - .word 0 - .word 2985 - .word 7922 - .word 38039 - .word 52517 - .word 16374 - .word 0 - .word 33464 - .word 30509 - .word 7663 - .word 49252 - .word 49146 - .word 0 - .word 63790 - .word 6933 - .word 28208 - .word 44856 - .word 49145 - .word 0 - .word 21342 - .word 14964 - .word 50588 - .word 39336 - .word 16381 - .word 0 - .word 56226 - .word 19816 - .word 23757 - .word 47758 - .word 16316 - .word 0 - .word 41064 - .word 34118 - .word 40187 - .word 42472 - .word 16323 - .word 0 - .word 9004 - .word 37522 - .word 42571 - .word 60097 - .word 16326 - .word 0 - .word 40290 - .word 31235 - .word 60424 - .word 63498 - .word 49099 - .word 0 - .word 59943 - .word 36153 - .word 34778 - .word 37099 - .word 49103 - .word 0 - .word 23867 - .word 38881 - .word 17085 - .word 35787 - .word 16340 - .word 0 - .word 43845 - .word 22338 - .word 8742 - .word 34578 - .word 16343 - .word 0 - .word 21920 - .word 9728 - .word 29300 - .word 62498 - .word 49115 - .word 0 - .word 43241 - .word 30911 - .word 50314 - .word 48209 - .word 49118 - .word 0 - .word 5869 - .word 26658 - .word 63775 - .word 40733 - .word 16355 - .word 0 - .word 50245 - .word 25343 - .word 31579 - .word 47683 - .word 16357 - .word 0 - .word 51932 - .word 37189 - .word 37317 - .word 37600 - .word 49130 - .word 0 - .word 35305 - .word 45319 - .word 11991 - .word 61881 - .word 49131 - .word 0 - .word 43727 - .word 7380 - .word 41898 - .word 45538 - .word 16368 - .word 0 - .word 55996 - .word 31666 - .word 20048 - .word 46502 - .word 16369 - .word 0 - .word 20142 - .word 56563 - .word 4676 - .word 64142 - .word 49141 - .word 0 - .word 42758 - .word 26948 - .word 20336 - .word 64653 - .word 49141 - .word 0 - .word 18102 - .word 54076 - .word 11950 - .word 42374 - .word 16378 - .word 0 - .word 55144 - .word 962 - .word 65430 - .word 51473 - .word 16376 - .word 0 - .word 35076 - .word 30182 - .word 41634 - .word 65458 - .word 49148 - .word 0 - .word 45599 - .word 55541 - .word 39885 - .word 63330 - .word 49086 - .word 0 - .word 11397 - .word 64373 - .word 55097 - .word 42716 - .word 49091 - .word 0 - .word 7278 - .word 1186 - .word 16759 - .word 52647 - .word 49094 - .word 0 - .word 55821 - .word 1941 - .word 7835 - .word 62966 - .word 16331 - .word 0 - .word 43692 - .word 51803 - .word 23893 - .word 63855 - .word 16334 - .word 0 - .word 7306 - .word 740 - .word 42177 - .word 35243 - .word 49108 - .word 0 - .word 20304 - .word 26112 - .word 14593 - .word 58152 - .word 49110 - .word 0 - .word 44429 - .word 26104 - .word 43204 - .word 60999 - .word 16347 - .word 0 - .word 43100 - .word 25366 - .word 26069 - .word 39382 - .word 16350 - .word 0 - .word 53318 - .word 3475 - .word 36258 - .word 39277 - .word 49123 - .word 0 - .word 61289 - .word 34432 - .word 35705 - .word 37567 - .word 49125 - .word 0 - .word 47881 - .word 43207 - .word 60352 - .word 35669 - .word 16362 - .word 0 - .word 3664 - .word 62231 - .word 63343 - .word 46625 - .word 16363 - .word 0 - .word 41733 - .word 11611 - .word 33384 - .word 42291 - .word 49136 - .word 0 - .word 22414 - .word 28668 - .word 61827 - .word 33289 - .word 49137 - .word 0 - .word 39839 - .word 31083 - .word 29085 - .word 58078 - .word 16373 - .word 0 - .word 45039 - .word 64406 - .word 35589 - .word 44277 - .word 16373 - .word 0 - .word 21856 - .word 35851 - .word 11264 - .word 37516 - .word 49146 - .word 0 - .word 38193 - .word 55017 - .word 53611 - .word 34369 - .word 49144 - .word 0 - .word 50065 - .word 40254 - .word 39875 - .word 57241 - .word 16380 - .word 0 - .word 21434 - .word 36257 - .word 28860 - .word 44273 - .word 16318 - .word 0 - .word 24899 - .word 55058 - .word 27384 - .word 42408 - .word 16323 - .word 0 - .word 23952 - .word 61552 - .word 63266 - .word 45785 - .word 16326 - .word 0 - .word 20309 - .word 44505 - .word 41003 - .word 61821 - .word 49099 - .word 0 - .word 9759 - .word 19768 - .word 52219 - .word 54624 - .word 49102 - .word 0 - .word 3188 - .word 41981 - .word 52169 - .word 34347 - .word 16340 - .word 0 - .word 7467 - .word 53297 - .word 24491 - .word 48747 - .word 16342 - .word 0 - .word 26956 - .word 25629 - .word 26154 - .word 58912 - .word 49115 - .word 0 - .word 2746 - .word 62708 - .word 29606 - .word 64476 - .word 49117 - .word 0 - .word 23526 - .word 40632 - .word 17955 - .word 37512 - .word 16355 - .word 0 - .word 58003 - .word 45489 - .word 17648 - .word 59859 - .word 16356 - .word 0 - .word 12684 - .word 55359 - .word 8573 - .word 33616 - .word 49130 - .word 0 - .word 29881 - .word 6055 - .word 26438 - .word 36076 - .word 49131 - .word 0 - .word 37160 - .word 17925 - .word 32887 - .word 39269 - .word 16368 - .word 0 - .word 52986 - .word 52867 - .word 51415 - .word 50108 - .word 16368 - .word 0 - .word 29602 - .word 44157 - .word 62211 - .word 53157 - .word 49141 - .word 0 - .word 14158 - .word 17332 - .word 5318 - .word 65232 - .word 49140 - .word 0 - .word 63939 - .word 33203 - .word 7646 - .word 33955 - .word 16378 - .word 0 - .word 29120 - .word 11480 - .word 39280 - .word 50030 - .word 16375 - .word 0 - .word 42029 - .word 1146 - .word 14309 - .word 51502 - .word 49148 - .word 0 - .word 13934 - .word 45324 - .word 64176 - .word 62054 - .word 49087 - .word 0 - .word 407 - .word 40447 - .word 21497 - .word 41724 - .word 49091 - .word 0 - .word 29047 - .word 47840 - .word 58616 - .word 39773 - .word 49094 - .word 0 - .word 45982 - .word 37340 - .word 60343 - .word 60272 - .word 16331 - .word 0 - .word 61708 - .word 5158 - .word 50916 - .word 46783 - .word 16334 - .word 0 - .word 15241 - .word 33011 - .word 52635 - .word 33255 - .word 49108 - .word 0 - .word 27136 - .word 17183 - .word 21500 - .word 41066 - .word 49110 - .word 0 - .word 41313 - .word 44818 - .word 44575 - .word 56585 - .word 16347 - .word 0 - .word 1149 - .word 8286 - .word 16932 - .word 53342 - .word 16349 - .word 0 - .word 29145 - .word 29789 - .word 51640 - .word 35705 - .word 49123 - .word 0 - .word 48645 - .word 17912 - .word 55357 - .word 48589 - .word 49124 - .word 0 - .word 34105 - .word 33794 - .word 2760 - .word 63371 - .word 16361 - .word 0 - .word 30589 - .word 55184 - .word 63547 - .word 57492 - .word 16362 - .word 0 - .word 36766 - .word 25700 - .word 37915 - .word 36654 - .word 49136 - .word 0 - .word 54115 - .word 65102 - .word 9808 - .word 39287 - .word 49136 - .word 0 - .word 15191 - .word 22168 - .word 7058 - .word 49192 - .word 16373 - .word 0 - .word 21631 - .word 11360 - .word 58072 - .word 50534 - .word 16372 - .word 0 - .word 52725 - .word 34636 - .word 1139 - .word 62446 - .word 49145 - .word 0 - .word 53409 - .word 43718 - .word 34635 - .word 38501 - .word 49143 - .word 0 - .word 21083 - .word 16045 - .word 34961 - .word 47202 - .word 16380 - .word 0 - .word 38780 - .word 63942 - .word 22964 - .word 35475 - .word 16316 - .word 0 - .word 58574 - .word 20162 - .word 19964 - .word 40809 - .word 16323 - .word 0 - .word 36576 - .word 45489 - .word 13327 - .word 34648 - .word 16326 - .word 0 - .word 40869 - .word 46352 - .word 6352 - .word 58511 - .word 49099 - .word 0 - .word 38766 - .word 2767 - .word 13055 - .word 40283 - .word 49102 - .word 0 - .word 11002 - .word 40490 - .word 24288 - .word 64180 - .word 16339 - .word 0 - .word 21330 - .word 2672 - .word 53484 - .word 34906 - .word 16342 - .word 0 - .word 11637 - .word 63948 - .word 58709 - .word 54245 - .word 49115 - .word 0 - .word 16451 - .word 23295 - .word 46139 - .word 44738 - .word 49117 - .word 0 - .word 40013 - .word 16865 - .word 3459 - .word 33992 - .word 16355 - .word 0 - .word 28055 - .word 62424 - .word 59084 - .word 40217 - .word 16356 - .word 0 - .word 37015 - .word 7577 - .word 64481 - .word 59907 - .word 49129 - .word 0 - .word 8219 - .word 9822 - .word 27279 - .word 47011 - .word 49130 - .word 0 - .word 859 - .word 2558 - .word 12826 - .word 34425 - .word 16368 - .word 0 - .word 34289 - .word 12934 - .word 665 - .word 63599 - .word 16367 - .word 0 - .word 15142 - .word 54455 - .word 30227 - .word 45946 - .word 49141 - .word 0 - .word 13599 - .word 50987 - .word 20426 - .word 40603 - .word 49140 - .word 0 - .word 224 - .word 55674 - .word 54991 - .word 58096 - .word 16377 - .word 0 - .word 12803 - .word 33902 - .word 43760 - .word 61618 - .word 16374 - .word 0 - .word 3255 - .word 47153 - .word 28829 - .word 43826 - .word 49148 - .word 0 - .word 57503 - .word 42370 - .word 48259 - .word 34977 - .word 16317 - .word 0 - .word 28464 - .word 31222 - .word 4873 - .word 39771 - .word 49091 - .word 0 - .word 7076 - .word 4355 - .word 19850 - .word 60674 - .word 49093 - .word 0 - .word 58695 - .word 18024 - .word 41082 - .word 56674 - .word 16331 - .word 0 - .word 1100 - .word 13540 - .word 64577 - .word 34943 - .word 16334 - .word 0 - .word 25873 - .word 27686 - .word 11323 - .word 61856 - .word 49107 - .word 0 - .word 12188 - .word 35264 - .word 2250 - .word 59962 - .word 49109 - .word 0 - .word 59387 - .word 26772 - .word 9493 - .word 52010 - .word 16347 - .word 0 - .word 50361 - .word 26279 - .word 61391 - .word 38047 - .word 16349 - .word 0 - .word 40446 - .word 22175 - .word 52931 - .word 64839 - .word 49122 - .word 0 - .word 16288 - .word 22519 - .word 41833 - .word 33884 - .word 49124 - .word 0 - .word 22795 - .word 59507 - .word 36930 - .word 56848 - .word 16361 - .word 0 - .word 9090 - .word 34727 - .word 62738 - .word 39279 - .word 16362 - .word 0 - .word 6548 - .word 61899 - .word 57259 - .word 65037 - .word 49135 - .word 0 - .word 20477 - .word 44577 - .word 947 - .word 52780 - .word 49135 - .word 0 - .word 9901 - .word 21929 - .word 34492 - .word 43241 - .word 16373 - .word 0 - .word 52812 - .word 31464 - .word 11463 - .word 33533 - .word 16372 - .word 0 - .word 16273 - .word 3725 - .word 28705 - .word 54534 - .word 49145 - .word 0 - .word 28551 - .word 65013 - .word 38971 - .word 50753 - .word 49142 - .word 0 - .word 55907 - .word 45101 - .word 33737 - .word 41084 - .word 16380 - .word 0 - .word 43426 - .word 25495 - .word 20291 - .word 49461 - .word 49086 - .word 0 - .word 1975 - .word 51775 - .word 24779 - .word 38683 - .word 16323 - .word 0 - .word 29807 - .word 50650 - .word 32397 - .word 53456 - .word 16325 - .word 0 - .word 5564 - .word 52273 - .word 7778 - .word 54851 - .word 49099 - .word 0 - .word 7750 - .word 4868 - .word 38403 - .word 61120 - .word 49101 - .word 0 - .word 15407 - .word 2698 - .word 46605 - .word 59622 - .word 16339 - .word 0 - .word 137 - .word 48802 - .word 34590 - .word 52040 - .word 16341 - .word 0 - .word 61391 - .word 58349 - .word 18865 - .word 49927 - .word 49115 - .word 0 - .word 11732 - .word 37228 - .word 55154 - .word 32778 - .word 49117 - .word 0 - .word 21770 - .word 7395 - .word 32621 - .word 61994 - .word 16354 - .word 0 - .word 14091 - .word 47411 - .word 37523 - .word 57988 - .word 16355 - .word 0 - .word 50358 - .word 51525 - .word 37270 - .word 54151 - .word 49129 - .word 0 - .word 22903 - .word 22329 - .word 47941 - .word 33412 - .word 49130 - .word 0 - .word 47512 - .word 65334 - .word 39843 - .word 61750 - .word 16367 - .word 0 - .word 35590 - .word 32984 - .word 45077 - .word 44683 - .word 16367 - .word 0 - .word 56839 - .word 21073 - .word 60125 - .word 40948 - .word 49141 - .word 0 - .word 16525 - .word 17598 - .word 3587 - .word 56588 - .word 49139 - .word 0 - .word 56933 - .word 2767 - .word 44815 - .word 51549 - .word 16377 - .word 0 - .word 35966 - .word 59943 - .word 1117 - .word 42745 - .word 16374 - .word 0 - .word 40172 - .word 7271 - .word 14707 - .word 38800 - .word 49148 - .word 0 - .word 8476 - .word 4419 - .word 45780 - .word 62512 - .word 49087 - .word 0 - .word 49137 - .word 16671 - .word 19871 - .word 37593 - .word 49091 - .word 0 - .word 63934 - .word 59521 - .word 24158 - .word 47409 - .word 49093 - .word 0 - .word 31258 - .word 33926 - .word 28141 - .word 53090 - .word 16331 - .word 0 - .word 17384 - .word 36966 - .word 994 - .word 53889 - .word 16333 - .word 0 - .word 55527 - .word 7910 - .word 53076 - .word 57518 - .word 49107 - .word 0 - .word 18447 - .word 54969 - .word 49626 - .word 45611 - .word 49109 - .word 0 - .word 13282 - .word 62682 - .word 5627 - .word 48010 - .word 16347 - .word 0 - .word 7550 - .word 10759 - .word 6881 - .word 57138 - .word 16348 - .word 0 - .word 65344 - .word 23540 - .word 39388 - .word 59430 - .word 49122 - .word 0 - .word 2956 - .word 21512 - .word 45255 - .word 50285 - .word 49123 - .word 0 - .word 29054 - .word 47408 - .word 36565 - .word 51766 - .word 16361 - .word 0 - .word 19154 - .word 63758 - .word 53467 - .word 57697 - .word 16361 - .word 0 - .word 22082 - .word 2480 - .word 53967 - .word 58888 - .word 49135 - .word 0 - .word 52243 - .word 32283 - .word 44909 - .word 38447 - .word 49135 - .word 0 - .word 7267 - .word 45206 - .word 61308 - .word 38976 - .word 16373 - .word 0 - .word 10717 - .word 24270 - .word 52189 - .word 48572 - .word 16371 - .word 0 - .word 40118 - .word 3643 - .word 65534 - .word 49002 - .word 49145 - .word 0 - .word 44194 - .word 5661 - .word 50617 - .word 36641 - .word 49142 - .word 0 - .word 26911 - .word 20494 - .word 63331 - .word 36858 - .word 16380 - .word 0 - .word 20013 - .word 62028 - .word 17108 - .word 33468 - .word 16320 - .word 0 - .word 9949 - .word 25572 - .word 4049 - .word 36529 - .word 16323 - .word 0 - .word 39945 - .word 24442 - .word 45585 - .word 42322 - .word 16325 - .word 0 - .word 59756 - .word 52868 - .word 48949 - .word 51417 - .word 49099 - .word 0 - .word 35066 - .word 41141 - .word 44695 - .word 47881 - .word 49101 - .word 0 - .word 42453 - .word 21162 - .word 44569 - .word 55557 - .word 16339 - .word 0 - .word 30136 - .word 39390 - .word 37319 - .word 40338 - .word 16341 - .word 0 - .word 60101 - .word 48639 - .word 6972 - .word 46254 - .word 49115 - .word 0 - .word 56660 - .word 41165 - .word 63413 - .word 50313 - .word 49116 - .word 0 - .word 13109 - .word 12767 - .word 29074 - .word 57119 - .word 16354 - .word 0 - .word 2453 - .word 26502 - .word 15952 - .word 44109 - .word 16355 - .word 0 - .word 44844 - .word 50072 - .word 22431 - .word 49646 - .word 49129 - .word 0 - .word 33416 - .word 16999 - .word 40271 - .word 50445 - .word 49129 - .word 0 - .word 26560 - .word 32264 - .word 54945 - .word 56373 - .word 16367 - .word 0 - .word 58100 - .word 55846 - .word 35515 - .word 33528 - .word 16367 - .word 0 - .word 44190 - .word 42353 - .word 4741 - .word 37259 - .word 49141 - .word 0 - .word 47772 - .word 5308 - .word 50468 - .word 42281 - .word 49139 - .word 0 - .word 53822 - .word 6159 - .word 32580 - .word 46797 - .word 16377 - .word 0 - .word 5509 - .word 51700 - .word 62457 - .word 63728 - .word 16373 - .word 0 - .word 52274 - .word 35926 - .word 43999 - .word 35182 - .word 49148 - .word 0 - .word 33647 - .word 41025 - .word 45844 - .word 37383 - .word 16317 - .word 0 - .type _P,@object - .size _P,2640 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,12 - .align 2 -_PP: - .word 52008 - .word 23245 - .word 2457 - .word 38658 - .word 16318 - .word 0 - .word 61876 - .word 57278 - .word 25234 - .word 61346 - .word 49090 - .word 0 - .word 33834 - .word 23040 - .word 39409 - .word 49003 - .word 16327 - .word 0 - .word 54525 - .word 6554 - .word 40935 - .word 51421 - .word 49100 - .word 0 - .word 9848 - .word 9769 - .word 18248 - .word 38344 - .word 16338 - .word 0 - .word 45790 - .word 60252 - .word 47538 - .word 43957 - .word 49112 - .word 0 - .word 27022 - .word 41654 - .word 23333 - .word 43744 - .word 16351 - .word 0 - .word 12816 - .word 40723 - .word 46387 - .word 47196 - .word 49127 - .word 0 - .word 4849 - .word 19418 - .word 12136 - .word 48545 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _PP,@object - .size _PP,120 - .align 2 -_QP: - .word 65402 - .word 6822 - .word 45128 - .word 37300 - .word 49084 - .word 0 - .word 41532 - .word 52948 - .word 50360 - .word 54021 - .word 16320 - .word 0 - .word 21320 - .word 30785 - .word 26870 - .word 37955 - .word 49093 - .word 0 - .word 55382 - .word 38611 - .word 29746 - .word 34115 - .word 16330 - .word 0 - .word 37194 - .word 6554 - .word 16235 - .word 42314 - .word 49103 - .word 0 - .word 17886 - .word 15840 - .word 33918 - .word 38666 - .word 16341 - .word 0 - .word 62905 - .word 55876 - .word 18072 - .word 57284 - .word 49115 - .word 0 - .word 28423 - .word 64693 - .word 26579 - .word 40379 - .word 16355 - .word 0 - .word 40135 - .word 58793 - .word 24002 - .word 37757 - .word 49132 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16376 - .word 0 - .type _QP,@object - .size _QP,120 - .align 2 -_val_0_03L: - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .type _val_0_03L,@object - .size _val_0_03L,12 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .type _tonpi,@object - .size _tonpi,12 - .data - .hidden __libm_sincos_pi4l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1f.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1f.S deleted file mode 100644 index dec0258eb9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1f.S +++ /dev/null @@ -1,695 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j1f.c" - .text -..TXTST0: -# -- Begin j1f - .text - .align 16,0x90 - .globl j1f -j1f: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %ebx - subl $120, %esp - movl 8(%ebp), %esi - movl %esi, %eax - andl $2147483647, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2139095040, %eax - jae ..B1.37 -..B1.2: - cmpl $1099993482, %eax - jae ..B1.32 -..B1.3: - cmpl $1075439785, %eax - jae ..B1.19 -..B1.4: - cmpl $1048576000, %eax - jae ..B1.15 -..B1.5: - cmpl $998244352, %eax - jae ..B1.14 -..B1.6: - cmpl $838860800, %eax - jae ..B1.13 -..B1.7: - shrl $31, %esi - cmpl $16777216, %eax - jb ..B1.9 -..B1.8: - flds 8(%ebp) - fmuls .L_2il0floatpacket.1@GOTOFF(%ebx) - flds .L_2il0floatpacket.0@GOTOFF(%ebx) - fmul %st(1), %st - fldl .L_2il0floatpacket.2@GOTOFF(%ebx) - fmulp %st, %st(2) - fsubp %st, %st(1) - fstps 32(%esp) - flds 32(%esp) - fmuls .L_2il0floatpacket.3@GOTOFF(%ebx) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - testl %eax, %eax - je ..B1.11 -..B1.10: - flds _small_value_32@GOTOFF(%ebx,%esi,4) - fmuls .L_2il0floatpacket.4@GOTOFF(%ebx) - fsts 32(%esp) - flds 8(%ebp) - fmuls .L_2il0floatpacket.0@GOTOFF(%ebx) - fsubp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - flds 8(%ebp) -..B1.12: - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - flds 8(%ebp) - fmuls .L_2il0floatpacket.0@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fldl 8+_Q2@GOTOFF(%ebx) - fmul %st(1), %st - faddl _Q2@GOTOFF(%ebx) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - flds 8(%ebp) - fmuls .L_2il0floatpacket.0@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldl 24+_Q2@GOTOFF(%ebx) - fmul %st(1), %st - fldl 16+_Q2@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 8+_Q2@GOTOFF(%ebx) - fmulp %st, %st(2) - faddl _Q2@GOTOFF(%ebx) - fmulp %st, %st(2) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - flds 8(%ebp) - testl $-2147483648, %esi - fabs - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldl 88+_Q1@GOTOFF(%ebx) - fmul %st(1), %st - fldl 72+_Q1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 56+_Q1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 40+_Q1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 24+_Q1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 8+_Q1@GOTOFF(%ebx) - fmul %st(3), %st - faddp %st, %st(1) - fldl 64+_Q1@GOTOFF(%ebx) - fmul %st(2), %st - fldl 80+_Q1@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 32+_Q1@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 48+_Q1@GOTOFF(%ebx) - fmulp %st, %st(3) - faddl _Q1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl 16+_Q1@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - je ..B1.18 -..B1.16: - fchs -..B1.18: - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - flds 8(%ebp) - andl $-2147483648, %esi - fabs - cmpl $1097786634, %eax - jae ..B1.27 -..B1.20: - cmpl $1091204523, %eax - jae ..B1.24 -..B1.21: - cmpl $1085318267, %eax - jae ..B1.23 -..B1.22: - lea _P1@GOTOFF(%ebx), %eax - jmp ..B1.28 -..B1.23: - lea _P2@GOTOFF(%ebx), %eax - jmp ..B1.28 -..B1.24: - cmpl $1094494752, %eax - jae ..B1.26 -..B1.25: - lea _P3@GOTOFF(%ebx), %eax - jmp ..B1.28 -..B1.26: - lea _P4@GOTOFF(%ebx), %eax - jmp ..B1.28 -..B1.27: - lea _P5@GOTOFF(%ebx), %eax -..B1.28: - fldl 104(%eax) - testl %esi, %esi - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldl 96(%eax) - fmul %st(1), %st - fldl 80(%eax) - fmul %st(2), %st - fxch %st(1) - faddl 64(%eax) - fmul %st(2), %st - fxch %st(1) - faddl 48(%eax) - fmul %st(2), %st - fxch %st(1) - faddl 32(%eax) - fmul %st(2), %st - fxch %st(1) - faddl 16(%eax) - fmul %st(3), %st - faddp %st, %st(1) - fldl 72(%eax) - fmul %st(2), %st - fxch %st(1) - faddl (%eax) - fxch %st(1) - faddl 40(%eax) - fmul %st(2), %st - fldl 88(%eax) - fmul %st(3), %st - fxch %st(1) - faddl 8(%eax) - fmul %st(5), %st - fxch %st(1) - faddl 56(%eax) - fmulp %st, %st(3) - fxch %st(2) - faddl 24(%eax) - fmulp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - je ..B1.31 -..B1.29: - fchs -..B1.31: - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - flds 8(%ebp) - lea 40(%esp), %eax - fabs - lea 48(%esp), %edx - fld1 - fdiv %st(1), %st - andl $-2147483648, %esi - fstl 16(%eax) - fldl _val_16_0@GOTOFF(%ebx) - fmulp %st, %st(1) - fstl 24(%eax) - fmul %st(0), %st - fstl 32(%eax) - fmul %st(0), %st - fxch %st(1) - fstpl (%esp) - movl %eax, 8(%esp) - movl %edx, 12(%esp) - movl $-3, 16(%esp) - fstpl 40(%eax) - call __libm_sincos_k32 -..B1.33: - fldl 80(%esp) - testl %esi, %esi - fldl 72(%esp) - fldl _tonpi@GOTOFF(%ebx) - fmull 56(%esp) - fsqrt - fldl 40+_PP@GOTOFF(%ebx) - fmul %st(3), %st - fldl 32+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 24+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 16+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 8+_PP@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl _PP@GOTOFF(%ebx) - faddp %st, %st(1) - fldl 40+_QP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - fmull 48(%esp) - fxch %st(1) - faddl 24+_QP@GOTOFF(%ebx) - fmul %st(4), %st - fldl 32+_QP@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(1) - faddl 8+_QP@GOTOFF(%ebx) - fmulp %st, %st(4) - faddl 16+_QP@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - faddl _QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmull 64(%esp) - fmull 40(%esp) - fsubrp %st, %st(2) - fmulp %st, %st(1) - je ..B1.36 -..B1.34: - fchs -..B1.36: - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.37: - ja ..B1.39 -..B1.38: - shrl $31, %esi - flds _zeros@GOTOFF(%ebx,%esi,4) - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - flds 8(%ebp) -..B1.40: - addl $120, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type j1f,@function - .size j1f,.-j1f - .data -# -- End j1f - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x3e500000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x3f000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4d800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x31800000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -.L_2il0floatpacket.4: - .long 0x0d800000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -_Q2: - .long 4294942533 - .long 3219128319 - .long 1380922587 - .long 1068848469 - .long 4229217063 - .long 3212603831 - .long 2485211372 - .long 1060546867 - .type _Q2,@object - .size _Q2,32 - .align 4 -_Q1: - .long 4294875887 - .long 1071644671 - .long 4170968197 - .long 1038133990 - .long 82133904 - .long 3215982592 - .long 2332230043 - .long 1043853917 - .long 2564340116 - .long 1063605580 - .long 220691470 - .long 1046506888 - .long 254563561 - .long 3205265147 - .long 694808779 - .long 1046622203 - .long 4019568744 - .long 1051070668 - .long 1556554770 - .long 1044540217 - .long 1786312313 - .long 3191946521 - .long 1750363188 - .long 1039907362 - .type _Q1,@object - .size _Q1,96 - .align 4 -_P1: - .long 3288017007 - .long 3163666881 - .long 1479173198 - .long 3218720463 - .long 2681037136 - .long 1068165283 - .long 482223942 - .long 1068193949 - .long 1641242500 - .long 3212130132 - .long 3602486439 - .long 3210890035 - .long 1295520927 - .long 1059513544 - .long 2893642677 - .long 1057503730 - .long 2144568350 - .long 3200875225 - .long 914896231 - .long 3198366754 - .long 1774974526 - .long 1046581392 - .long 3090631217 - .long 1043566169 - .long 3310618599 - .long 3186783429 - .long 1974431497 - .long 1074702165 - .type _P1,@object - .size _P1,112 - .align 4 -_P2: - .long 216484910 - .long 1015040375 - .long 3011708428 - .long 1070806296 - .long 3332724636 - .long 3214272269 - .long 3160644008 - .long 3215461507 - .long 2925435221 - .long 1063888050 - .long 725350898 - .long 1063337916 - .long 297499451 - .long 3206574940 - .long 3278099830 - .long 3204945545 - .long 2222993240 - .long 1053042193 - .long 2059286351 - .long 1050869046 - .long 306569625 - .long 3193793299 - .long 95256688 - .long 3191038309 - .long 616794992 - .long 1039029534 - .long 4088689232 - .long 1075580917 - .type _P2,@object - .size _P2,112 - .align 4 -_P3: - .long 1314465059 - .long 1017127215 - .long 1413823668 - .long 3218077268 - .long 4087546795 - .long 1065951807 - .long 3559351807 - .long 1067757765 - .long 338531188 - .long 3210711466 - .long 2516776276 - .long 3210695105 - .long 1548953411 - .long 1058452686 - .long 3819184955 - .long 1057373236 - .long 1262833741 - .long 3200137243 - .long 325214128 - .long 3198310046 - .long 1253465703 - .long 1045913252 - .long 3453826356 - .long 1043528319 - .long 2667154656 - .long 3186140571 - .long 3502111785 - .long 1076123856 - .type _P3,@object - .size _P3,112 - .align 4 -_P4: - .long 1657852450 - .long 3163577804 - .long 2020212262 - .long 1070330675 - .long 774106997 - .long 3212888122 - .long 2119717923 - .long 3215085957 - .long 2098754573 - .long 1062575793 - .long 2137093530 - .long 1063017421 - .long 2437037263 - .long 3205513537 - .long 2698759453 - .long 3204752976 - .long 1998212634 - .long 1052165362 - .long 2817762251 - .long 1050764623 - .long 357372240 - .long 3193071576 - .long 3891599306 - .long 3190966182 - .long 2865549426 - .long 1038348895 - .long 4077970850 - .long 1076536762 - .type _P4,@object - .size _P4,112 - .align 4 -_P5: - .long 1537387514 - .long 3166104464 - .long 4237757176 - .long 3217630662 - .long 789391682 - .long 1064857043 - .long 3122547501 - .long 1067488355 - .long 3303098147 - .long 3209681410 - .long 2944525948 - .long 3210343613 - .long 1468487066 - .long 1057519518 - .long 285546763 - .long 1057172625 - .long 830693909 - .long 3199311383 - .long 1284260698 - .long 3198182585 - .long 1823688212 - .long 1045254801 - .long 1962790020 - .long 1043427779 - .long 1867031598 - .long 3185590079 - .long 906299589 - .long 1076918395 - .type _P5,@object - .size _P5,112 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_PP: - .long 551 - .long 1072693248 - .long 4267608614 - .long 1061027839 - .long 3690881252 - .long 3200414971 - .long 3933039373 - .long 1046848465 - .long 3246008603 - .long 3189439465 - .long 1689113401 - .long 1037483563 - .type _PP,@object - .size _PP,48 - .align 4 -_QP: - .long 4294954956 - .long 1066926079 - .long 4141388976 - .long 3204071423 - .long 1500123100 - .long 1049740228 - .long 3264213437 - .long 3191856517 - .long 1489731078 - .long 1039824630 - .long 1807021260 - .long 3183130166 - .type _QP,@object - .size _QP,48 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .data - .hidden __libm_sincos_k32 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1l.S deleted file mode 100644 index 5c7f1c4c13..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/j1l.S +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j1l.c" - .text -..TXTST0: -# -- Begin j1l - .text - .align 16,0x90 - .globl j1l -j1l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $56, %esp - fldt 8(%ebp) - lea 16(%esp), %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %edi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.6: - addl $-32, %esp - movl (%edi), %ecx - lea 64(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%edi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%edi), %ecx - movl 12(%edi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __j1q@PLT -..B1.5: - addl $28, %esp -..B1.2: - movl 32(%esp), %eax - movl %eax, (%edi) - movl 36(%esp), %edx - movl 40(%esp), %ecx - movl 44(%esp), %eax - addl $4, %esp - pushl %edi - movl %edx, 4(%edi) - movl %ecx, 8(%edi) - movl %eax, 12(%edi) - call __qtol@PLT -..B1.7: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type j1l,@function - .size j1l,.-j1l - .data -# -- End j1l - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jn.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jn.S deleted file mode 100644 index f3e165bf3b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jn.S +++ /dev/null @@ -1,1477 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "jn.c" - .text -..TXTST0: -# -- Begin jn - .text - .align 16,0x90 - .globl jn -jn: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - movl 8(%ebp), %edx -..B1.2: - fnstcw 102(%esp) -..B1.3: - movzwl 18(%ebp), %eax - andl $32752, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $32752, %eax - je ..B1.75 -..B1.4: - testl %edx, %edx - je ..B1.51 -..B1.5: - fldl 12(%ebp) - fldl _zeros@GOTOFF(%ebx) - fucom %st(1) - fnstsw %ax - sahf - jp ..B1.6 - je ..B1.79 -..B1.6: - testl %edx, %edx - jl ..B1.74 -..B1.7: - movl $1, %edi -..B1.8: - fcom %st(1) - fnstsw %ax - sahf - jbe ..B1.10 -..B1.9: - movl %edi, %eax - fxch %st(1) - fchs - negl %eax - testb $1, %dl - fstl 12(%ebp) - je ..L3 - movl %eax, %edi -..L3: - fxch %st(1) -..B1.10: - cmpl $1, %edx - je ..B1.71 -..B1.11: - movl %edx, %eax - sarl $5, %eax - cmpl $160, %eax - jg ..B1.13 -..B1.12: - fldl XZERO@GOTOFF(%ebx,%eax,8) - jmp ..B1.14 -..B1.13: - lea -640(,%eax,4), %eax - lea (,%eax,8), %ecx - subl %eax, %ecx - movl %ecx, 80(%esp) - fildl 80(%esp) - faddl .L_2il0floatpacket.0@GOTOFF(%ebx) -..B1.14: - fcomp %st(2) - fnstsw %ax - sahf - ja ..B1.50 -..B1.15: - fstp %st(0) - movzwl 102(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.70 -..B1.16: - fstp %st(0) - orl $-64768, %ecx - movw %cx, 100(%esp) -..B1.17: - fldcw 100(%esp) -..B1.18: - fldl 12(%ebp) - movl $1, %esi -..B1.19: - movl %edx, 80(%esp) - cmpl $1753, %edx - fildl 80(%esp) - jg ..B1.28 -..B1.20: - fldt val_0_4@GOTOFF(%ebx) - fmul %st(1), %st - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B1.28 -..B1.21: - fstp %st(0) - fldt _val_2_0L@GOTOFF(%ebx) - testl %edx, %edx - fdivrp %st, %st(1) - fldt _val_1_0L@GOTOFF(%ebx) - fld %st(0) - fld %st(0) - fld %st(2) - fld %st(3) - jle ..B1.24 -..B1.22: - xorl %eax, %eax -..B1.23: - incl %eax - fmul %st(5), %st - cmpl %edx, %eax - fxch %st(1) - fmul %st(3), %st - fxch %st(3) - fadd %st(4), %st - fxch %st(3) - fxch %st(1) - jb ..B1.23 -..B1.24: - fstp %st(3) -..B1.25: - fxch %st(4) - fmul %st(0), %st - xorl %ecx, %ecx - fchs -..B1.26: - incl %ecx - incl %edx - movl %ecx, %ebx - fld %st(3) - imull %edx, %ebx - fxch %st(1) - fmul %st, %st(2) - movl %ebx, 80(%esp) - fildl 80(%esp) - fdivrp %st, %st(3) - fxch %st(2) - fadd %st, %st(4) - fxch %st(1) - fucomp %st(4) - fnstsw %ax - sahf - fxch %st(1) - jne ..B1.26 - jp ..B1.26 -..B1.27: - fstp %st(0) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(2) - fdivrp %st, %st(1) - fxch %st(1) - fstpt 56(%esp) - jmp ..B1.41 -..B1.28: - fcom %st(1) - fnstsw %ax - sahf - ja ..B1.47 -..B1.29: - fldt _val_20_0L@GOTOFF(%ebx) - fmul %st(1), %st - fldt _val_1000_0L@GOTOFF(%ebx) - faddp %st, %st(1) - fcomp %st(2) - fnstsw %ax - sahf - ja ..B1.53 -..B1.30: - fldt _val_4_0L@GOTOFF(%ebx) - movl $-1, %eax - movl %ebx, 12(%esp) - xorl %ecx, %ecx - fstpt 152(%esp) - fldt 152(%esp) - fld %st(1) - fmulp %st, %st(1) - fmulp %st, %st(1) - fstpt 184(%esp) - fldt 184(%esp) - fxch %st(1) - fstpt 104(%esp) - fldt 104(%esp) - fldt _val_8_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 168(%esp) - fldt 168(%esp) - fldt _val_1_0L@GOTOFF(%ebx) - fld %st(0) - fsubrp %st, %st(3) - fxch %st(1) - fdivrp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 88(%esp) - fldt _val_2_0L@GOTOFF(%ebx) - fstpt 136(%esp) - fldt 136(%esp) - fstpt 48(%esp) - fldt _val_3_0L@GOTOFF(%ebx) - fstpt 120(%esp) - fldt 120(%esp) - fldt _val_5_0L@GOTOFF(%ebx) - movl %eax, %ebx - fstpt (%esp) - fldt (%esp) - fldt 120(%esp) - fldt 48(%esp) - fldt 16(%esp) -..B1.31: - fldt 168(%esp) - fld %st(3) - fmul %st(4), %st - testl %ebx, %ebx - fxch %st(4) - fstpt 120(%esp) - fxch %st(2) - fstpt 48(%esp) - fldt 48(%esp) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fstpt 72(%esp) - fldt 72(%esp) - fldt 184(%esp) - fsub %st, %st(4) - fxch %st(3) - fdivrp %st, %st(4) - fxch %st(6) - fmulp %st, %st(3) - fld %st(3) - fmul %st(4), %st - fsubrp %st, %st(2) - fdivrp %st, %st(1) - fmul %st(1), %st - fldt 120(%esp) - fldt 48(%esp) - jle ..B1.33 -..B1.32: - fxch %st(3) - faddp %st, %st(6) - fldt 32(%esp) - fadd %st(2), %st - fstpt 32(%esp) - jmp ..B1.34 -..B1.33: - fxch %st(3) - fsubrp %st, %st(6) - fldt 32(%esp) - fsub %st(2), %st - fstpt 32(%esp) -..B1.34: - fldt 136(%esp) - fadd %st, %st(3) - faddp %st, %st(5) - fldt 152(%esp) - fadd %st, %st(1) - faddp %st, %st(4) - fld %st(1) - fdiv %st(6), %st - fabs - fldt 88(%esp) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.36 -..B1.35: - fstpt 88(%esp) - movl $1, %ecx - jmp ..B1.37 -..B1.36: - fstp %st(0) - testl %ecx, %ecx - jne ..B1.52 -..B1.37: - fldt (%esp) - negl %ebx - fucomp %st(6) - fnstsw %ax - sahf - fxch %st(2) - fxch %st(1) - fxch %st(5) - jne ..B1.31 - jp ..B1.31 -..B1.38: - fstp %st(4) - fstp %st(1) - fstp %st(0) - fstp %st(0) - fldt 72(%esp) - movl 12(%esp), %ebx - fstpt (%esp) - fstpt 16(%esp) - fstpt 56(%esp) - fldt 104(%esp) -..B1.39: - addl $-32, %esp - addl %edx, %edx - negl %edx - lea 32(%esp), %eax - decl %edx - lea 88(%esp), %ecx - fstpt (%esp) - fldt (%esp) - movl %eax, 12(%esp) - movl %ecx, 16(%esp) - movl %edx, 20(%esp) - fstpt 104(%eax) - call __libm_sincos_pi4l -..B1.82: - fldt 136(%esp) - addl $32, %esp -..B1.40: - fldt _tonpi@GOTOFF(%ebx) - fdivp %st, %st(1) - fsqrt - fldt 56(%esp) - fldt 16(%esp) - fmulp %st, %st(1) - fldt (%esp) - fldt 32(%esp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fmulp %st, %st(1) -..B1.41: - testl %edi, %edi - jl ..B1.43 -..B1.42: - fstpt (%esp) - jmp ..B1.44 -..B1.43: - fchs - fstpt (%esp) -..B1.44: - testl %esi, %esi - je ..B1.46 -..B1.45: - fldcw 102(%esp) -..B1.46: - fldt (%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.47: - fstp %st(0) - fldt _val_0_0L@GOTOFF(%ebx) - lea (%edx,%edx), %eax - movl %eax, 80(%esp) - fstpt 32(%esp) - fld %st(0) - fmul %st(1), %st - fchs - fstpt 64(%esp) - fld %st(0) - fxch %st(1) - fstpt 104(%esp) - fldt _val_1_0L@GOTOFF(%ebx) - fstpt (%esp) - fldt (%esp) - fld %st(0) - fxch %st(1) - fstpt 16(%esp) - fildl 80(%esp) - fld %st(0) - fldt _val_2_0L@GOTOFF(%ebx) - fstpt 48(%esp) - fldt (%esp) - jmp ..B1.48 -..B1.49: - fstp %st(0) - fxch %st(4) - fxch %st(3) - fxch %st(2) -..B1.48: - fldt 48(%esp) - faddp %st, %st(2) - fld %st(4) - fmul %st(2), %st - fldt 64(%esp) - fmul %st, %st(2) - fldt 32(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(3) - fmul %st(3), %st - faddp %st, %st(2) - fxch %st(5) - fstpt 32(%esp) - fld %st(4) - fxch %st(1) - fdivr %st, %st(5) - fxch %st(4) - fucom %st(5) - fnstsw %ax - sahf - jne ..B1.49 - jp ..B1.49 - jmp ..B1.63 -..B1.50: - fstp %st(1) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.51: - fldl 12(%ebp) - addl $-16, %esp - fstpl (%esp) - call j0@PLT -..B1.83: - addl $260, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.52: - fstp %st(4) - fstp %st(3) - fstp %st(0) - fstp %st(0) - fldt 72(%esp) - movl 12(%esp), %ebx - fstpt (%esp) - fxch %st(1) - fstpt 16(%esp) - fstpt 56(%esp) - fldt 104(%esp) - jmp ..B1.39 -..B1.53: - fstp %st(0) - fldt _val_36_0L@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B1.57 -..B1.54: - fstp %st(0) - addl $-16, %esp - fstpt (%esp) - fldt (%esp) - movl %edx, 52(%esp) - fstpt 120(%esp) - call __j0l@PLT -..B1.84: - fldt 120(%esp) - movl 52(%esp), %edx - addl $16, %esp -..B1.55: - fxch %st(1) - fstpt 56(%esp) - addl $-16, %esp - fstpt (%esp) - fldt (%esp) - movl %edx, 52(%esp) - fstpt 120(%esp) - call __j1l@PLT -..B1.85: - fldt 120(%esp) - movl 52(%esp), %edx - addl $16, %esp -..B1.56: - fxch %st(1) - jmp ..B1.59 -..B1.57: - fldl _ones@GOTOFF(%ebx) - fdiv %st(2), %st - fmul %st, %st(1) - fld %st(1) - fmul %st(2), %st - fstpt 12(%esp) - fldt 12(%esp) - fxch %st(1) - fstpt 24(%esp) - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fldt _PP0@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _PP1@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PP0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 60+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_PP1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_PP0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_PP1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 96+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 108+_PP0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fstpt 40(%esp) - addl $-32, %esp - lea 44(%esp), %eax - lea 32(%esp), %ecx - fxch %st(3) - fstpt (%esp) - fldt (%esp) - fldt 108+_PP1@GOTOFF(%ebx) - movl %eax, 12(%esp) - faddp %st, %st(4) - fldt _QP0@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_QP0@GOTOFF(%ebx) - movl %ecx, 16(%esp) - faddp %st, %st(1) - fmul %st(3), %st - fldt _QP1@GOTOFF(%ebx) - fmul %st(4), %st - fldt 12+_QP1@GOTOFF(%ebx) - movl $-1, 20(%esp) - faddp %st, %st(1) - fmul %st(4), %st - fxch %st(5) - fstpt 60(%eax) - movl %edx, 24(%eax) - fxch %st(1) - fstpt 92(%eax) - fldt 24+_QP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_QP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_QP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_QP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_QP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_QP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_QP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fldt 36+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 48+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 60+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 72+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 84+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 96+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmulp %st, %st(3) - fldt 108+_QP0@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fstpt 44(%eax) - fldt 108+_QP1@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 76(%eax) - call __libm_sincos_pi4l -..B1.86: - fldt 136(%esp) - fldt 120(%esp) - fldt 104(%esp) - fldt 88(%esp) - movl 68(%esp), %edx - addl $32, %esp -..B1.58: - fldt _tonpi@GOTOFF(%ebx) - fldt 24(%esp) - fmulp %st, %st(1) - fsqrt - fldt (%esp) - fldt 12(%esp) - fmul %st, %st(3) - fmulp %st, %st(4) - fldt 40(%esp) - fmul %st(1), %st - fsubp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fstpt 56(%esp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) -..B1.59: - fldt _val_2_0L@GOTOFF(%ebx) - cmpl $1, %edx - fld %st(0) - jle ..B1.91 -..B1.60: - fldt 56(%esp) - decl %edx - xorl %eax, %eax -..B1.61: - fld %st(1) - incl %eax - fdiv %st(5), %st - cmpl %edx, %eax - fmul %st(4), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(2) - fsubp %st, %st(1) - fld %st(3) - jae ..B1.62 -..B1.92: - fstp %st(4) - fxch %st(3) - jmp ..B1.61 -..B1.62: - fstp %st(0) - fstp %st(1) - fstp %st(3) - fstp %st(0) - fstpt 56(%esp) - jmp ..B1.41 -..B1.63: - fstp %st(1) - fstp %st(3) - fstp %st(0) - fstp %st(2) - fstp %st(1) - fldt 48(%esp) - decl %edx - fldt 16(%esp) - xorl %eax, %eax - movl %edx, 80(%esp) - fld %st(0) - fxch %st(1) - fdiv %st, %st(3) - fildl 80(%esp) - fmul %st(3), %st - fldt 104(%esp) - fdivr %st, %st(3) -..B1.64: - fld %st(5) - incl %eax - fmul %st(2), %st - fxch %st(2) - fsub %st(5), %st - fxch %st(1) - fmul %st, %st(3) - cmpl %edx, %eax - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fld %st(5) - fld %st(1) - jge ..B1.65 -..B1.93: - fstp %st(7) - fstp %st(1) - fxch %st(2) - jmp ..B1.64 -..B1.65: - fstp %st(0) - fstp %st(4) - fstp %st(4) - fstp %st(0) - fxch %st(2) - fstpt 56(%esp) - fldt 56(%esp) - fxch %st(1) - fabs - fxch %st(1) - fabs - fcompp - fnstsw %ax - fxch %st(1) - fstpt (%esp) - sahf - jae ..B1.68 - jp ..B1.68 -..B1.66: - addl $-16, %esp - fstpt (%esp) - call __j1l@PLT -..B1.87: - addl $16, %esp -..B1.67: - fldt (%esp) - fdivrp %st, %st(1) - jmp ..B1.41 -..B1.68: - addl $-16, %esp - fstpt (%esp) - call __j0l@PLT -..B1.88: - addl $16, %esp -..B1.69: - fldt 56(%esp) - fdivrp %st, %st(1) - jmp ..B1.41 -..B1.70: - xorl %esi, %esi - jmp ..B1.19 -..B1.71: - fstp %st(0) - addl $-16, %esp - fstpl (%esp) - call j1@PLT -..B1.89: - addl $16, %esp - testl %edi, %edi - jge ..B1.73 -..B1.72: - fchs -..B1.73: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.74: - movl %edx, %eax - negl %edx - notl %eax - andl $1, %eax - lea -1(%eax,%eax), %edi - jmp ..B1.8 -..B1.75: - testl $1048575, 16(%ebp) - jne ..B1.77 -..B1.76: - cmpl $0, 12(%ebp) - je ..B1.78 -..B1.77: - fldl 12(%ebp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.78: - movzbl 19(%ebp), %ecx - movl %edx, %eax - andl $128, %ecx - shrl $7, %ecx - shrl $31, %eax - xorl %eax, %ecx - andl %edx, %ecx - fldl _zeros@GOTOFF(%ebx,%ecx,8) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.79: - fstp %st(0) - fstp %st(0) - movzbl 19(%ebp), %ecx - movl %edx, %eax - andl $128, %ecx - shrl $7, %ecx - shrl $31, %eax - xorl %eax, %ecx - andl %edx, %ecx - fldl _zeros@GOTOFF(%ebx,%ecx,8) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.91: - fstp %st(0) - fstp %st(2) - fstp %st(1) - jmp ..B1.41 - .align 16,0x90 - .type jn,@function - .size jn,.-jn - .data -# -- End jn - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x40add600 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -XZERO: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x33333333,0x3fd33333 - .long 0x66666666,0x3ff66666 - .long 0x00000000,0x400c0000 - .long 0x00000000,0x401c0000 - .long 0x00000000,0x40280000 - .long 0xcccccccd,0x40324ccc - .long 0x00000000,0x403a0000 - .long 0x00000000,0x40418000 - .long 0x9999999a,0x40469999 - .long 0x00000000,0x404c4000 - .long 0x33333333,0x40513333 - .long 0x00000000,0x40548000 - .long 0x00000000,0x40580000 - .long 0x33333333,0x405bb333 - .long 0xcccccccd,0x405f8ccc - .long 0xcccccccd,0x4061cccc - .long 0x33333333,0x4063e333 - .long 0xcccccccd,0x40660ccc - .long 0x33333333,0x40684333 - .long 0xcccccccd,0x406a8ccc - .long 0x33333333,0x406ce333 - .long 0x66666666,0x406f4666 - .long 0x9999999a,0x4070d999 - .long 0x00000000,0x40721800 - .long 0x9999999a,0x40735999 - .long 0x9999999a,0x4074a199 - .long 0x66666666,0x4075ee66 - .long 0x00000000,0x40774000 - .long 0xcccccccd,0x407894cc - .long 0x66666666,0x4079ee66 - .long 0x33333333,0x407b4b33 - .long 0x33333333,0x407cab33 - .long 0x00000000,0x407e1000 - .long 0x66666666,0x407f7666 - .long 0xcccccccd,0x408070cc - .long 0x33333333,0x40812733 - .long 0x33333333,0x4081df33 - .long 0xcccccccd,0x408298cc - .long 0x33333333,0x40835333 - .long 0x33333333,0x40840f33 - .long 0xcccccccd,0x4084cccc - .long 0x66666666,0x40858a66 - .long 0x66666666,0x40864a66 - .long 0x66666666,0x40870a66 - .long 0x00000000,0x4087cc00 - .long 0x66666666,0x40888e66 - .long 0x9999999a,0x40895199 - .long 0x9999999a,0x408a1599 - .long 0x33333333,0x408adb33 - .long 0xcccccccd,0x408ba0cc - .long 0x00000000,0x408c6000 - .long 0x00000000,0x408d2800 - .long 0x00000000,0x408df000 - .long 0x00000000,0x408ec000 - .long 0x00000000,0x408f8800 - .long 0x00000000,0x40902800 - .long 0x00000000,0x40909000 - .long 0x00000000,0x4090f400 - .long 0x00000000,0x40915c00 - .long 0x00000000,0x4091c000 - .long 0x00000000,0x40922800 - .long 0x00000000,0x40929000 - .long 0x00000000,0x4092f800 - .long 0x00000000,0x40935c00 - .long 0x00000000,0x4093c400 - .long 0x00000000,0x40943000 - .long 0x00000000,0x40949800 - .long 0x00000000,0x40950000 - .long 0x00000000,0x40956800 - .long 0x00000000,0x4095d000 - .long 0x00000000,0x40963c00 - .long 0x00000000,0x4096a400 - .long 0x00000000,0x40971000 - .long 0x00000000,0x40977800 - .long 0x00000000,0x4097e400 - .long 0x00000000,0x40984c00 - .long 0x00000000,0x4098b800 - .long 0x00000000,0x40992400 - .long 0x00000000,0x40999000 - .long 0x00000000,0x4099f800 - .long 0x00000000,0x409a6400 - .long 0x00000000,0x409ad000 - .long 0x00000000,0x409b3c00 - .long 0x00000000,0x409ba800 - .long 0x00000000,0x409c1400 - .long 0x00000000,0x409c8000 - .long 0x00000000,0x409cec00 - .long 0x00000000,0x409d5c00 - .long 0x00000000,0x409dc800 - .long 0x00000000,0x409e3400 - .long 0x00000000,0x409ea000 - .long 0x00000000,0x409f1000 - .long 0x00000000,0x409f7c00 - .long 0x00000000,0x409fe800 - .long 0x00000000,0x40a02c00 - .long 0x00000000,0x40a06200 - .long 0x00000000,0x40a09a00 - .long 0x00000000,0x40a0d000 - .long 0x00000000,0x40a10800 - .long 0x00000000,0x40a13e00 - .long 0x00000000,0x40a17600 - .long 0x00000000,0x40a1ae00 - .long 0x00000000,0x40a1e400 - .long 0x00000000,0x40a21c00 - .long 0x00000000,0x40a25400 - .long 0x00000000,0x40a28c00 - .long 0x00000000,0x40a2c200 - .long 0x00000000,0x40a2fa00 - .long 0x00000000,0x40a33200 - .long 0x00000000,0x40a36a00 - .long 0x00000000,0x40a3a200 - .long 0x00000000,0x40a3da00 - .long 0x00000000,0x40a41200 - .long 0x00000000,0x40a44a00 - .long 0x00000000,0x40a48200 - .long 0x00000000,0x40a4ba00 - .long 0x00000000,0x40a4f200 - .long 0x00000000,0x40a52a00 - .long 0x00000000,0x40a56200 - .long 0x00000000,0x40a59a00 - .long 0x00000000,0x40a5d200 - .long 0x00000000,0x40a60a00 - .long 0x00000000,0x40a64400 - .long 0x00000000,0x40a67c00 - .long 0x00000000,0x40a6b400 - .long 0x00000000,0x40a6ec00 - .long 0x00000000,0x40a72600 - .long 0x00000000,0x40a75e00 - .long 0x00000000,0x40a79600 - .long 0x00000000,0x40a7d000 - .long 0x00000000,0x40a80800 - .long 0x00000000,0x40a84000 - .long 0x00000000,0x40a87a00 - .long 0x00000000,0x40a8b200 - .long 0x00000000,0x40a8ec00 - .long 0x00000000,0x40a92400 - .long 0x00000000,0x40a95c00 - .long 0x00000000,0x40a99600 - .long 0x00000000,0x40a9ce00 - .long 0x00000000,0x40aa0800 - .long 0x00000000,0x40aa4200 - .long 0x00000000,0x40aa7a00 - .long 0x00000000,0x40aab400 - .long 0x00000000,0x40aaec00 - .long 0x00000000,0x40ab2600 - .long 0x00000000,0x40ab6000 - .long 0x00000000,0x40ab9800 - .long 0x00000000,0x40abd200 - .long 0x00000000,0x40ac0a00 - .long 0x00000000,0x40ac4400 - .long 0x00000000,0x40ac7e00 - .long 0x00000000,0x40acb800 - .long 0x00000000,0x40acf000 - .long 0x00000000,0x40ad2a00 - .long 0x00000000,0x40ad6400 - .long 0x00000000,0x40ad9e00 - .long 0x00000000,0x40add600 - .type XZERO,@object - .size XZERO,1288 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -val_0_4: - .byte 0x00,0xd0,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xfd,0x3f,0x00,0x00 - .type val_0_4,@object - .size val_0_4,12 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_val_2_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .type _val_2_0L,@object - .size _val_2_0L,12 - .align 2 -_val_1_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _val_1_0L,@object - .size _val_1_0L,12 - .align 2 -_val_20_0L: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16387 - .word 0 - .type _val_20_0L,@object - .size _val_20_0L,12 - .align 2 -_val_1000_0L: - .word 0 - .word 0 - .word 0 - .word 64000 - .word 16392 - .word 0 - .type _val_1000_0L,@object - .size _val_1000_0L,12 - .align 2 -_val_4_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16385 - .word 0 - .type _val_4_0L,@object - .size _val_4_0L,12 - .align 2 -_val_8_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16386 - .word 0 - .type _val_8_0L,@object - .size _val_8_0L,12 - .align 2 -_val_3_0L: - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .type _val_3_0L,@object - .size _val_3_0L,12 - .align 2 -_val_5_0L: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16385 - .word 0 - .type _val_5_0L,@object - .size _val_5_0L,12 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .type _tonpi,@object - .size _tonpi,12 - .align 2 -_val_0_0L: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _val_0_0L,@object - .size _val_0_0L,12 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,12 - .align 2 -_PP0: - .word 3555 - .word 4199 - .word 61716 - .word 36505 - .word 49086 - .word 0 - .word 21640 - .word 56203 - .word 47336 - .word 57608 - .word 16322 - .word 0 - .word 3059 - .word 27554 - .word 42044 - .word 45622 - .word 49095 - .word 0 - .word 55815 - .word 35656 - .word 54748 - .word 47307 - .word 16332 - .word 0 - .word 42025 - .word 6728 - .word 28939 - .word 34692 - .word 49106 - .word 0 - .word 58943 - .word 11189 - .word 14960 - .word 38786 - .word 16344 - .word 0 - .word 43526 - .word 20005 - .word 29826 - .word 37014 - .word 49119 - .word 0 - .word 58976 - .word 17109 - .word 36079 - .word 36708 - .word 16359 - .word 0 - .word 58243 - .word 36408 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _PP0,@object - .size _PP0,120 - .align 2 -_PP1: - .word 52008 - .word 23245 - .word 2457 - .word 38658 - .word 16318 - .word 0 - .word 61876 - .word 57278 - .word 25234 - .word 61346 - .word 49090 - .word 0 - .word 33834 - .word 23040 - .word 39409 - .word 49003 - .word 16327 - .word 0 - .word 54525 - .word 6554 - .word 40935 - .word 51421 - .word 49100 - .word 0 - .word 9848 - .word 9769 - .word 18248 - .word 38344 - .word 16338 - .word 0 - .word 45790 - .word 60252 - .word 47538 - .word 43957 - .word 49112 - .word 0 - .word 27022 - .word 41654 - .word 23333 - .word 43744 - .word 16351 - .word 0 - .word 12816 - .word 40723 - .word 46387 - .word 47196 - .word 49127 - .word 0 - .word 4849 - .word 19418 - .word 12136 - .word 48545 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _PP1,@object - .size _PP1,120 - .align 2 -_QP0: - .word 30466 - .word 14887 - .word 33885 - .word 35327 - .word 16316 - .word 0 - .word 41139 - .word 65374 - .word 59488 - .word 50915 - .word 49088 - .word 0 - .word 35675 - .word 30946 - .word 22284 - .word 35505 - .word 16325 - .word 0 - .word 65216 - .word 29458 - .word 42913 - .word 63176 - .word 49097 - .word 0 - .word 5130 - .word 24339 - .word 48915 - .word 38634 - .word 16335 - .word 0 - .word 30040 - .word 27658 - .word 23448 - .word 34596 - .word 49109 - .word 0 - .word 37816 - .word 17431 - .word 24401 - .word 49646 - .word 16347 - .word 0 - .word 4377 - .word 35057 - .word 45578 - .word 33037 - .word 49123 - .word 0 - .word 19863 - .word 65266 - .word 6202 - .word 53939 - .word 16363 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 49142 - .word 0 - .type _QP0,@object - .size _QP0,120 - .align 2 -_QP1: - .word 65402 - .word 6822 - .word 45128 - .word 37300 - .word 49084 - .word 0 - .word 41532 - .word 52948 - .word 50360 - .word 54021 - .word 16320 - .word 0 - .word 21320 - .word 30785 - .word 26870 - .word 37955 - .word 49093 - .word 0 - .word 55382 - .word 38611 - .word 29746 - .word 34115 - .word 16330 - .word 0 - .word 37194 - .word 6554 - .word 16235 - .word 42314 - .word 49103 - .word 0 - .word 17886 - .word 15840 - .word 33918 - .word 38666 - .word 16341 - .word 0 - .word 62905 - .word 55876 - .word 18072 - .word 57284 - .word 49115 - .word 0 - .word 28423 - .word 64693 - .word 26579 - .word 40379 - .word 16355 - .word 0 - .word 40135 - .word 58793 - .word 24002 - .word 37757 - .word 49132 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16376 - .word 0 - .type _QP1,@object - .size _QP1,120 - .data - .hidden __libm_sincos_pi4l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jnf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jnf.S deleted file mode 100644 index e62e1f69fb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jnf.S +++ /dev/null @@ -1,1401 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "jnf.c" - .text -..TXTST0: -# -- Begin jnf - .text - .align 16,0x90 - .globl jnf -jnf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - fldz - movl 12(%ebp), %edi - movl %edi, %edx - andl $2147483647, %edx - movl 8(%ebp), %esi - cmpl $2139095040, %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jae ..B1.41 -..B1.2: - testl %esi, %esi - je ..B1.39 -..B1.3: - xorl %esi, %edi - shrl $31, %edi - andl %esi, %edi - testl %edx, %edx - je ..B1.38 -..B1.4: - flds 12(%ebp) - movl %esi, %eax - cltd - xorl %edx, %esi - fabs - subl %edx, %esi - fsts 12(%ebp) - cmpl $1, %esi - je ..B1.61 -..B1.5: - movl %esi, %edx - sarl $3, %edx - cmpl $320, %edx - jg ..B1.7 -..B1.6: - flds function_zeros@GOTOFF(%ebx,%edx,4) - jmp ..B1.8 -..B1.7: - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - lea -320(%edx), %ecx - lea -2560(,%edx,8), %edx - subl %ecx, %edx - movl %edx, 168(%esp) - fildl 168(%esp) - fstps 168(%esp) - flds 168(%esp) - faddp %st, %st(1) - fstps 168(%esp) - flds 168(%esp) -..B1.8: - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.37 -..B1.9: - movl %esi, 168(%esp) - cmpl $170, %esi - fildl 168(%esp) - fstpl 192(%esp) - fldl 192(%esp) - jg ..B1.18 -..B1.10: - fldl _val_0_6@GOTOFF(%ebx) - fmul %st(1), %st - fcomp %st(2) - fnstsw %ax - sahf - jb ..B1.18 -..B1.11: - fstp %st(2) - fstp %st(1) - fldl _val_2_0@GOTOFF(%ebx) - testl %esi, %esi - fdivrp %st, %st(1) - fstpl 192(%esp) - fld1 - fld %st(0) - fld %st(1) - fldl 192(%esp) - jle ..B1.15 -..B1.12: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fld %st(2) - xorl %edx, %edx - .align 16,0x90 -..B1.13: - fxch %st(2) - fmul %st, %st(3) - incl %edx - fxch %st(3) - fstpl 192(%esp) - cmpl %esi, %edx - fxch %st(1) - fmul %st, %st(3) - fadd %st(1), %st - fldl 192(%esp) - fxch %st(4) - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(4) - fxch %st(3) - fxch %st(2) - fxch %st(1) - fxch %st(4) - jb ..B1.13 -..B1.14: - fstp %st(1) - fstp %st(0) -..B1.15: - fldl _TWO_19H@GOTOFF(%ebx) - xorl %edx, %edx - fxch %st(1) - fmul %st(0), %st - fchs - fstpl 192(%esp) - fxch %st(3) - fstl 176(%esp) - fstl 56(%esp) - fldl 192(%esp) -..B1.16: - fldl 176(%esp) - incl %edx - incl %esi - movl %edx, %ecx - imull %esi, %ecx - fmul %st(1), %st - fldl 56(%esp) - movl %ecx, 168(%esp) - fildl 168(%esp) - fstpl 192(%esp) - fldl 192(%esp) - fdivrp %st, %st(2) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fstl 176(%esp) - faddp %st, %st(1) - fstpl 192(%esp) - fld %st(4) - fldl 192(%esp) - fmul %st, %st(1) - fxch %st(1) - fstpl 192(%esp) - fstl 56(%esp) - fldl 192(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpl 184(%esp) - fldl 184(%esp) - fsubp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(2) - fucomp %st(2) - fnstsw %ax - sahf - jne ..B1.16 - jp ..B1.16 -..B1.17: - fstp %st(0) - fstp %st(0) - fstp %st(2) - fxch %st(1) - fmull 56(%esp) - fdivp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) - jmp ..B1.30 -..B1.18: - fcom %st(1) - fnstsw %ax - sahf - ja ..B1.34 -..B1.19: - lea (%esi,%esi,4), %edx - lea 1000(,%edx,4), %ecx - movl %ecx, 168(%esp) - fildl 168(%esp) - fstpl 192(%esp) - fldl 192(%esp) - fcomp %st(2) - fnstsw %ax - sahf - ja ..B1.47 -..B1.20: - fstp %st(2) - fldl _val_4_0@GOTOFF(%ebx) - movl $-1, %ecx - fstl 152(%esp) - fld %st(2) - fmulp %st, %st(1) - xorl %edx, %edx - fmulp %st, %st(2) - fxch %st(1) - fstpl 192(%esp) - fstpt 112(%esp) - fldt 112(%esp) - fldl 192(%esp) - fld %st(0) - fxch %st(1) - fstpt 128(%esp) - fldl _val_8_0@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fstpt 96(%esp) - fldt 96(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fstpt 80(%esp) - fldt 80(%esp) - fsubrp %st, %st(2) - fdivrp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fstpt 64(%esp) - fldt 64(%esp) - fstpl 176(%esp) - fldl _val_2_0@GOTOFF(%ebx) - fstl 144(%esp) - fldl _val_3_0@GOTOFF(%ebx) - fstpt 48(%esp) - fldt 48(%esp) - fldl _val_5_0@GOTOFF(%ebx) - fstpt 32(%esp) - fld1 - fld %st(0) - fstpl 160(%esp) - fldt 80(%esp) - fldt 32(%esp) - fldt 48(%esp) -..B1.21: - fldt 96(%esp) - fld %st(6) - fmul %st(1), %st - testl %ecx, %ecx - fxch %st(1) - fmul %st(6), %st - fxch %st(5) - fstpl 56(%esp) - fld %st(1) - fmul %st(2), %st - fxch %st(4) - fstpt 80(%esp) - fldt 128(%esp) - fsub %st, %st(4) - fxch %st(1) - fdivrp %st, %st(4) - fld %st(2) - fmul %st(3), %st - fsubrp %st, %st(1) - fdivp %st, %st(4) - fxch %st(2) - fmull 176(%esp) - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(3) - fstpl 192(%esp) - fldl 192(%esp) - fmul %st(3), %st - fstpl 192(%esp) - fldl 192(%esp) - fldt 80(%esp) - jle ..B1.46 -..B1.22: - faddp %st, %st(4) - fxch %st(3) - fstpl 192(%esp) - fldl 192(%esp) - fldt 64(%esp) - fadd %st(4), %st - fstpl 192(%esp) - fldl 192(%esp) - fstpt 64(%esp) -..B1.23: - fldl 144(%esp) - fadd %st, %st(6) - fxch %st(6) - fstpl 192(%esp) - fxch %st(5) - faddp %st, %st(4) - fxch %st(2) - fstl 176(%esp) - fdiv %st(4), %st - fldl 192(%esp) - fxch %st(4) - fstpl 192(%esp) - fldl 192(%esp) - fldl 152(%esp) - fadd %st, %st(3) - fxch %st(3) - fstpl 192(%esp) - fxch %st(2) - faddp %st, %st(3) - fldl 192(%esp) - fxch %st(3) - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fabs - fldl 160(%esp) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.25 -..B1.24: - fstpl 160(%esp) - movl $1, %edx - jmp ..B1.26 -..B1.25: - fstp %st(0) - testl %edx, %edx - jne ..B1.45 -..B1.26: - fldl _TWO_19H@GOTOFF(%ebx) - negl %ecx - fmul %st(5), %st - fstpl 192(%esp) - fld %st(4) - fldl 192(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpl 184(%esp) - fldl 184(%esp) - fsubp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fldl 56(%esp) - fucomp %st(1) - fnstsw %ax - sahf - fxch %st(3) - fxch %st(2) - fxch %st(4) - fxch %st(5) - fxch %st(2) - jne ..B1.21 - jp ..B1.21 -..B1.27: - fstp %st(3) - fstp %st(2) - fstp %st(1) - fstp %st(1) - fstp %st(1) - fldt 112(%esp) - fxch %st(1) - fstpt 80(%esp) -..B1.28: - addl %esi, %esi - lea 56(%esp), %edx - negl %esi - lea 176(%esp), %ecx - fstl (%esp) - decl %esi - movl %edx, 8(%esp) - movl %ecx, 12(%esp) - movl %esi, 16(%esp) - fstpt 56(%edx) - call __libm_sincos_k32 -..B1.29: - fldt 112(%esp) - fldt 80(%esp) - fmull 176(%esp) - fldl _tonpi@GOTOFF(%ebx) - fdivp %st, %st(2) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fsqrt - fstpl 192(%esp) - fldl 192(%esp) - fldt 64(%esp) - fmull 56(%esp) - fsubrp %st, %st(2) - fmulp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) -..B1.30: - testl %edi, %edi - je ..B1.33 -..B1.31: - fchs -..B1.33: - fstps 168(%esp) - flds 168(%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.34: - fstp %st(0) - fldl _val_2_0@GOTOFF(%ebx) - lea (%esi,%esi), %edx - movl %edx, 168(%esp) - fstpl 88(%esp) - fld %st(0) - fmul %st(1), %st - fchs - fld1 - fstl 176(%esp) - fld %st(0) - fxch %st(3) - fstl 48(%esp) - fxch %st(1) - fstpt 32(%esp) - fxch %st(3) - fstl 56(%esp) - fxch %st(3) - fstpt 112(%esp) - fildl 168(%esp) - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fstpt 64(%esp) - fldl _TWO_19H@GOTOFF(%ebx) - fstpl 80(%esp) - fld %st(0) - fldl 48(%esp) - jmp ..B1.35 -..B1.36: - fstp %st(1) - fstl 56(%esp) - fstpl 176(%esp) - fxch %st(2) - fxch %st(3) - fxch %st(1) - fxch %st(4) - fxch %st(1) -..B1.35: - fldt 64(%esp) - fmul %st, %st(5) - fld %st(1) - fxch %st(1) - fmulp %st, %st(5) - fld %st(3) - fxch %st(3) - faddl 88(%esp) - fstpl 192(%esp) - fldl 192(%esp) - fmul %st, %st(1) - fxch %st(6) - faddp %st, %st(1) - fstpl 192(%esp) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(3) - fldl 192(%esp) - fld %st(0) - fxch %st(4) - fstpl 192(%esp) - fldl 192(%esp) - fdivr %st, %st(1) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fld %st(0) - fld %st(1) - fxch %st(1) - fmull 80(%esp) - fstpl 192(%esp) - fldl 192(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpl 184(%esp) - fldl 184(%esp) - fsubp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fldl 176(%esp) - fucomp %st(1) - fnstsw %ax - sahf - jne ..B1.36 - jp ..B1.36 - jmp ..B1.57 -..B1.37: - fstp %st(0) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - fstp %st(0) - flds _zeros@GOTOFF(%ebx,%edi,4) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - fstpl 56(%esp) - addl $4, %esp - pushl 12(%ebp) - call j0f@PLT -..B1.40: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - fstp %st(0) - ja ..B1.43 -..B1.42: - xorl %esi, %edi - shrl $31, %edi - andl %esi, %edi - flds _zeros@GOTOFF(%ebx,%edi,4) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.43: - flds 12(%ebp) -..B1.44: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - fstp %st(2) - fstp %st(1) - fstp %st(0) - fstp %st(0) - fldt 112(%esp) - fxch %st(1) - fstpt 80(%esp) - jmp ..B1.28 -..B1.46: - fsubp %st, %st(4) - fxch %st(3) - fstpl 192(%esp) - fldl 192(%esp) - fldt 64(%esp) - fsub %st(4), %st - fstpl 192(%esp) - fldl 192(%esp) - fstpt 64(%esp) - jmp ..B1.23 -..B1.47: - fstp %st(0) - fxch %st(1) - fstpl 56(%esp) - fldl _val_17_0@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.51 -..B1.48: - fstl (%esp) - fstpt 112(%esp) - call j0@PLT -..B1.69: - fldt 112(%esp) -..B1.49: - fstl (%esp) - fxch %st(1) - fstpl 176(%esp) - fstpt 112(%esp) - call j1@PLT -..B1.70: - fldt 112(%esp) -..B1.50: - fxch %st(1) - jmp ..B1.53 -..B1.51: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - lea 96(%esp), %edx - fdiv %st(1), %st - lea 104(%esp), %ecx - fstpl 96(%edx) - fldl 96(%edx) - fstpt -64(%edx) - fldt -64(%edx) - fldl _val_16_0@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpl 96(%edx) - fldl 96(%edx) - fld %st(0) - fmul %st(1), %st - fstpl 96(%edx) - fldl 96(%edx) - fld %st(0) - fmul %st(1), %st - fstpl 96(%edx) - fldl 96(%edx) - fxch %st(3) - fstl (%esp) - movl %edx, 8(%esp) - movl %ecx, 12(%esp) - movl $-1, 16(%esp) - fxch %st(1) - fstpt -48(%edx) - fxch %st(2) - fstpt -32(%edx) - fstpt -16(%edx) - fstpt 16(%edx) - call __libm_sincos_k32 -..B1.52: - fldt 112(%esp) - fldt 80(%esp) - fldt 64(%esp) - fldt 48(%esp) - fldl 40+_PP0@GOTOFF(%ebx) - fmul %st(2), %st - fldl 32+_PP0@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 24+_PP0@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 16+_PP0@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 8+_PP0@GOTOFF(%ebx) - fmul %st(2), %st - fstpl 192(%esp) - fldl 192(%esp) - fldl 32+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl _PP0@GOTOFF(%ebx) - fstpl 192(%esp) - fldl 192(%esp) - faddp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fldl 40+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl 16+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl 24+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl _PP1@GOTOFF(%ebx) - fldl 32+_QP0@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(3) - faddl 8+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - faddp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fldl 40+_QP0@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(3) - faddl 16+_QP0@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(3) - faddl 24+_QP0@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(3) - faddl _QP0@GOTOFF(%ebx) - fmul %st(6), %st - fxch %st(3) - faddl 8+_QP0@GOTOFF(%ebx) - fmul %st(4), %st - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - fstpl 192(%esp) - fldl 192(%esp) - fldl 40+_QP1@GOTOFF(%ebx) - fmul %st(5), %st - faddl 24+_QP1@GOTOFF(%ebx) - fmul %st(5), %st - faddl 8+_QP1@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fldl 32+_QP1@GOTOFF(%ebx) - fmul %st(5), %st - faddl 16+_QP1@GOTOFF(%ebx) - fmulp %st, %st(5) - fldl _tonpi@GOTOFF(%ebx) - fxch %st(5) - faddl _QP1@GOTOFF(%ebx) - fmulp %st, %st(6) - faddp %st, %st(5) - fxch %st(4) - fstpl 192(%esp) - fldl 192(%esp) - fldt 32(%esp) - fmulp %st, %st(4) - fxch %st(3) - fstpl 192(%esp) - fldl 192(%esp) - fsqrt - fstpl 192(%esp) - fldl 192(%esp) - fldl 96(%esp) - fmul %st, %st(3) - fmulp %st, %st(2) - fldl 104(%esp) - fmul %st, %st(5) - fxch %st(3) - fsubrp %st, %st(5) - fmul %st, %st(4) - fxch %st(4) - fstpl 176(%esp) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) -..B1.53: - fldl _val_2_0@GOTOFF(%ebx) - cmpl $1, %esi - fdivp %st, %st(2) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - jle ..B1.74 -..B1.54: - fldl 176(%esp) - movl $1, %edx -..B1.55: - movl %edx, 168(%esp) - incl %edx - fildl 168(%esp) - fstpl 192(%esp) - fld %st(2) - fldl 192(%esp) - cmpl %esi, %edx - fmul %st(3), %st - fmulp %st, %st(4) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(2) - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(2) - jl ..B1.55 -..B1.56: - fstp %st(0) - fstp %st(0) - jmp ..B1.30 -..B1.57: - fstp %st(3) - fstp %st(2) - fstp %st(3) - fstp %st(1) - fstp %st(1) - fstp %st(1) - fldl 88(%esp) - lea -2(%esi,%esi), %edx - fldt 32(%esp) - decl %esi - fldt 112(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fdiv %st, %st(4) - movl %edx, 168(%esp) - xorl %edx, %edx - fxch %st(4) - fstpl 192(%esp) - fdivr %st, %st(3) - fildl 168(%esp) - fldl 192(%esp) - fxch %st(1) - fstpl 192(%esp) - fldl 192(%esp) - fxch %st(5) - fstpl 192(%esp) - fldl 192(%esp) -..B1.58: - fld %st(1) - incl %edx - fmul %st(6), %st - fxch %st(5) - fsubr %st, %st(6) - fxch %st(3) - fmul %st, %st(4) - cmpl %esi, %edx - fxch %st(4) - fsubrp %st, %st(5) - fmul %st, %st(4) - fxch %st(4) - fstpl 192(%esp) - fld %st(0) - fldl 192(%esp) - fld %st(0) - fxch %st(7) - fstpl 192(%esp) - fldl 192(%esp) - jge ..B1.59 -..B1.75: - fstp %st(3) - fstp %st(0) - fxch %st(3) - fxch %st(2) - fxch %st(4) - fxch %st(5) - fxch %st(1) - fxch %st(5) - jmp ..B1.58 -..B1.59: - fstp %st(6) - fstp %st(3) - fstp %st(0) - fstp %st(4) - fstp %st(2) - fxch %st(1) - fstpl 176(%esp) - fxch %st(1) - fstpl 56(%esp) - fstpl (%esp) - call j0@PLT -..B1.60: - fldl 176(%esp) - fdivrp %st, %st(1) - fstpl 192(%esp) - fldl 192(%esp) - jmp ..B1.30 -..B1.61: - fxch %st(1) - fstpl 56(%esp) - fstps (%esp) - call j1f@PLT -..B1.62: - testl %edi, %edi - je ..B1.65 -..B1.63: - fchs -..B1.65: - fstps 168(%esp) - flds 168(%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.74: - fstp %st(0) - jmp ..B1.30 - .align 16,0x90 - .type jnf,@function - .size jnf,.-jnf - .data -# -- End jnf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x8e,0x0a,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 4 -function_zeros: - .long 0x00000000 - .long 0x00000000 - .long 0x00000000 - .long 0x00000000 - .long 0x00000000 - .long 0x3f000000 - .long 0x3fcccccd - .long 0x40600000 - .long 0x40c33333 - .long 0x4111999a - .long 0x414b3333 - .long 0x4184cccd - .long 0x41a66666 - .long 0x41ca6666 - .long 0x41f0cccd - .long 0x420c0000 - .long 0x42206666 - .long 0x4235999a - .long 0x424b3333 - .long 0x42613333 - .long 0x42780000 - .long 0x42876666 - .long 0x42930000 - .long 0x429ecccd - .long 0x42aacccd - .long 0x42b6cccd - .long 0x42c30000 - .long 0x42cf6666 - .long 0x42dbcccd - .long 0x42e86666 - .long 0x42f50000 - .long 0x4300e666 - .long 0x43074ccd - .long 0x430db333 - .long 0x43143333 - .long 0x431ab333 - .long 0x43214ccd - .long 0x4327e666 - .long 0x432e8000 - .long 0x4335199a - .long 0x433bcccd - .long 0x43428000 - .long 0x43493333 - .long 0x43500000 - .long 0x43560000 - .long 0x435d0000 - .long 0x43640000 - .long 0x436b0000 - .long 0x43720000 - .long 0x43780000 - .long 0x437f0000 - .long 0x43830000 - .long 0x43868000 - .long 0x438a0000 - .long 0x438d8000 - .long 0x43910000 - .long 0x43948000 - .long 0x43980000 - .long 0x439b8000 - .long 0x439f0000 - .long 0x43a28000 - .long 0x43a60000 - .long 0x43a98000 - .long 0x43ad0000 - .long 0x43b08000 - .long 0x43b40000 - .long 0x43b78000 - .long 0x43bb0000 - .long 0x43bf0000 - .long 0x43c28000 - .long 0x43c60000 - .long 0x43c98000 - .long 0x43cd0000 - .long 0x43d08000 - .long 0x43d40000 - .long 0x43d80000 - .long 0x43db8000 - .long 0x43df0000 - .long 0x43e28000 - .long 0x43e60000 - .long 0x43ea0000 - .long 0x43ed8000 - .long 0x43f10000 - .long 0x43f48000 - .long 0x43f88000 - .long 0x43fc0000 - .long 0x43ff8000 - .long 0x44018000 - .long 0x44038000 - .long 0x44054000 - .long 0x44070000 - .long 0x44090000 - .long 0x440ac000 - .long 0x440c8000 - .long 0x440e4000 - .long 0x44104000 - .long 0x44120000 - .long 0x4413c000 - .long 0x4415c000 - .long 0x44178000 - .long 0x44194000 - .long 0x441b4000 - .long 0x441d0000 - .long 0x441ec000 - .long 0x4420c000 - .long 0x44228000 - .long 0x44244000 - .long 0x44264000 - .long 0x44280000 - .long 0x442a0000 - .long 0x442bc000 - .long 0x442d8000 - .long 0x442f8000 - .long 0x44314000 - .long 0x44334000 - .long 0x44350000 - .long 0x4436c000 - .long 0x4438c000 - .long 0x443a8000 - .long 0x443c8000 - .long 0x443e4000 - .long 0x44400000 - .long 0x44420000 - .long 0x4443c000 - .long 0x4445c000 - .long 0x44478000 - .long 0x44498000 - .long 0x444b4000 - .long 0x444d0000 - .long 0x444f0000 - .long 0x4450c000 - .long 0x4452c000 - .long 0x44548000 - .long 0x44568000 - .long 0x44584000 - .long 0x445a4000 - .long 0x445c0000 - .long 0x445e0000 - .long 0x445fc000 - .long 0x4461c000 - .long 0x44638000 - .long 0x44658000 - .long 0x44674000 - .long 0x44694000 - .long 0x446b0000 - .long 0x446cc000 - .long 0x446ec000 - .long 0x44708000 - .long 0x44728000 - .long 0x44744000 - .long 0x44764000 - .long 0x44784000 - .long 0x447a0000 - .long 0x447c0000 - .long 0x447dc000 - .long 0x447fc000 - .long 0x4480c000 - .long 0x4481c000 - .long 0x4482a000 - .long 0x4483a000 - .long 0x44848000 - .long 0x44858000 - .long 0x44866000 - .long 0x44876000 - .long 0x44884000 - .long 0x44894000 - .long 0x448a2000 - .long 0x448b2000 - .long 0x448c0000 - .long 0x448d0000 - .long 0x448e0000 - .long 0x448ee000 - .long 0x448fe000 - .long 0x4490c000 - .long 0x4491c000 - .long 0x4492a000 - .long 0x4493a000 - .long 0x44948000 - .long 0x44958000 - .long 0x44968000 - .long 0x44976000 - .long 0x44986000 - .long 0x44994000 - .long 0x449a4000 - .long 0x449b2000 - .long 0x449c2000 - .long 0x449d2000 - .long 0x449e0000 - .long 0x449f0000 - .long 0x449fe000 - .long 0x44a0e000 - .long 0x44a1c000 - .long 0x44a2c000 - .long 0x44a3c000 - .long 0x44a4a000 - .long 0x44a5a000 - .long 0x44a68000 - .long 0x44a78000 - .long 0x44a88000 - .long 0x44a96000 - .long 0x44aa6000 - .long 0x44ab4000 - .long 0x44ac4000 - .long 0x44ad4000 - .long 0x44ae2000 - .long 0x44af2000 - .long 0x44b00000 - .long 0x44b10000 - .long 0x44b20000 - .long 0x44b2e000 - .long 0x44b3e000 - .long 0x44b4c000 - .long 0x44b5c000 - .long 0x44b6c000 - .long 0x44b7a000 - .long 0x44b8a000 - .long 0x44b9a000 - .long 0x44ba8000 - .long 0x44bb8000 - .long 0x44bc6000 - .long 0x44bd6000 - .long 0x44be6000 - .long 0x44bf4000 - .long 0x44c04000 - .long 0x44c14000 - .long 0x44c22000 - .long 0x44c32000 - .long 0x44c40000 - .long 0x44c50000 - .long 0x44c60000 - .long 0x44c6e000 - .long 0x44c7e000 - .long 0x44c8e000 - .long 0x44c9c000 - .long 0x44cac000 - .long 0x44cba000 - .long 0x44cca000 - .long 0x44cda000 - .long 0x44ce8000 - .long 0x44cf8000 - .long 0x44d08000 - .long 0x44d16000 - .long 0x44d26000 - .long 0x44d36000 - .long 0x44d44000 - .long 0x44d54000 - .long 0x44d64000 - .long 0x44d72000 - .long 0x44d82000 - .long 0x44d92000 - .long 0x44da0000 - .long 0x44db0000 - .long 0x44dc0000 - .long 0x44dce000 - .long 0x44dde000 - .long 0x44dec000 - .long 0x44dfc000 - .long 0x44e0c000 - .long 0x44e1a000 - .long 0x44e2a000 - .long 0x44e3a000 - .long 0x44e48000 - .long 0x44e58000 - .long 0x44e68000 - .long 0x44e76000 - .long 0x44e86000 - .long 0x44e96000 - .long 0x44ea4000 - .long 0x44eb4000 - .long 0x44ec4000 - .long 0x44ed4000 - .long 0x44ee2000 - .long 0x44ef2000 - .long 0x44f02000 - .long 0x44f10000 - .long 0x44f20000 - .long 0x44f30000 - .long 0x44f3e000 - .long 0x44f4e000 - .long 0x44f5e000 - .long 0x44f6c000 - .long 0x44f7c000 - .long 0x44f8c000 - .long 0x44f9a000 - .long 0x44faa000 - .long 0x44fba000 - .long 0x44fc8000 - .long 0x44fd8000 - .long 0x44fe8000 - .long 0x44ff6000 - .long 0x45003000 - .long 0x4500b000 - .long 0x45013000 - .long 0x4501a000 - .long 0x45022000 - .long 0x4502a000 - .long 0x45031000 - .long 0x45039000 - .long 0x45041000 - .long 0x45048000 - .long 0x45050000 - .long 0x45058000 - .long 0x4505f000 - .long 0x45067000 - .long 0x4506f000 - .long 0x45077000 - .long 0x4507e000 - .long 0x45086000 - .long 0x4508e000 - .long 0x45095000 - .long 0x4509d000 - .long 0x450a5000 - .long 0x450ac000 - .long 0x450b4000 - .long 0x450bc000 - .long 0x450c4000 - .long 0x450cb000 - .long 0x450d3000 - .long 0x450db000 - .long 0x450e2000 - .long 0x450ea000 - .type function_zeros,@object - .size function_zeros,1284 - .align 4 -_val_0_6: - .long 858993459 - .long 1071854387 - .type _val_0_6,@object - .size _val_0_6,8 - .align 4 -_val_2_0: - .long 0 - .long 1073741824 - .type _val_2_0,@object - .size _val_2_0,8 - .align 4 -_TWO_19H: - .long 0 - .long 1093140480 - .type _TWO_19H,@object - .size _TWO_19H,8 - .align 4 -_val_4_0: - .long 0 - .long 1074790400 - .type _val_4_0,@object - .size _val_4_0,8 - .align 4 -_val_8_0: - .long 0 - .long 1075838976 - .type _val_8_0,@object - .size _val_8_0,8 - .align 4 -_val_3_0: - .long 0 - .long 1074266112 - .type _val_3_0,@object - .size _val_3_0,8 - .align 4 -_val_5_0: - .long 0 - .long 1075052544 - .type _val_5_0,@object - .size _val_5_0,8 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .align 4 -_val_17_0: - .long 0 - .long 1076953088 - .type _val_17_0,@object - .size _val_17_0,8 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_PP0: - .long 4294966288 - .long 1072693247 - .long 4269912424 - .long 3207725055 - .long 1780799603 - .long 1052554744 - .long 2285933488 - .long 3194113879 - .long 3892950982 - .long 1041746526 - .long 150212775 - .long 3184818833 - .type _PP0,@object - .size _PP0,48 - .align 4 -_PP1: - .long 551 - .long 1072693248 - .long 4267608614 - .long 1061027839 - .long 3690881252 - .long 3200414971 - .long 3933039373 - .long 1046848465 - .long 3246008603 - .long 3189439465 - .long 1689113401 - .long 1037483563 - .type _PP1,@object - .size _PP1,48 - .align 4 -_QP0: - .long 4294921804 - .long 3212836863 - .long 4153409851 - .long 1056096255 - .long 2226361937 - .long 3196916170 - .long 3849695089 - .long 1044094312 - .long 663042994 - .long 3187124278 - .long 3336948587 - .long 1035486718 - .type _QP0,@object - .size _QP0,48 - .align 4 -_QP1: - .long 4294954956 - .long 1066926079 - .long 4141388976 - .long 3204071423 - .long 1500123100 - .long 1049740228 - .long 3264213437 - .long 3191856517 - .long 1489731078 - .long 1039824630 - .long 1807021260 - .long 3183130166 - .type _QP1,@object - .size _QP1,48 - .data - .hidden __libm_sincos_k32 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jnl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jnl.S deleted file mode 100644 index 4879bd4aa8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/jnl.S +++ /dev/null @@ -1,109 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "jnl.c" - .text -..TXTST0: -# -- Begin jnl - .text - .align 16,0x90 - .globl jnl -jnl: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $56, %esp - fldt 12(%ebp) - lea 16(%esp), %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %edi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.6: - addl $-32, %esp - movl 8(%ebp), %ecx - lea 64(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl %ecx, 4(%esp) - movl (%edi), %edx - movl 4(%edi), %ecx - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl 8(%edi), %edx - movl 12(%edi), %ecx - movl %edx, 8(%eax) - movl %ecx, 12(%eax) - call __jnq@PLT -..B1.5: - addl $28, %esp -..B1.2: - movl 32(%esp), %eax - movl %eax, (%edi) - movl 36(%esp), %edx - movl 40(%esp), %ecx - movl 44(%esp), %eax - addl $4, %esp - pushl %edi - movl %edx, 4(%edi) - movl %ecx, 8(%edi) - movl %eax, 12(%edi) - call __qtol@PLT -..B1.7: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type jnl,@function - .size jnl,.-jnl - .data -# -- End jnl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/l2q.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/l2q.S deleted file mode 100644 index bd2cb43042..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/l2q.S +++ /dev/null @@ -1,109 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "l2q.c" - .text -..TXTST0: -# -- Begin __ltoq - .text - .align 16,0x90 - .globl __ltoq -__ltoq: -# parameter 1: 32 + %esp -# parameter 2: 36 + %esp -..B1.1: -..L1: - - pushl %edi - subl $24, %esp -..B1.2: - fnstcw 12(%esp) -..B1.3: - movzwl 12(%esp), %eax - orl $-64768, %eax - movw %ax, 14(%esp) -..B1.4: - fldcw 14(%esp) -..B1.5: - fldt 36(%esp) - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - fldt __l_one@GOTOFF(%eax) - fmulp %st, %st(1) - fstpt (%esp) -..B1.6: - fldcw 12(%esp) -..B1.7: - movl 32(%esp), %edx - movl (%esp), %ecx - movl %ecx, %edi - shll $17, %edi - movl %edi, 4(%edx) - movl 4(%esp), %edi - movl %edi, %eax - shll $17, %eax - shrl $15, %ecx - shrl $15, %edi - orl %ecx, %eax - movl 8(%esp), %ecx - movzwl %di, %edi - shll $16, %ecx - orl %ecx, %edi - movl $0, (%edx) - movl %eax, 8(%edx) - movl %edi, 12(%edx) - addl $24, %esp - popl %edi - ret - .align 16,0x90 - .type __ltoq,@function - .size __ltoq,.-__ltoq - .data -# -- End __ltoq - .section .rodata, "a" - .align 4 - .align 4 -__l_one: - .long 0 - .long 2147483648 - .long 16383 - .type __l_one,@object - .size __l_one,12 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexp_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexp_wmt.S deleted file mode 100644 index 3db7e3e8dd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexp_wmt.S +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ldexp_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin ldexp - .text - .align 16,0x90 - .globl ldexp -ldexp: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movq 64(%ebx), %xmm4 - movsd 128(%esp), %xmm0 - movsd %xmm0, 8(%esp) - movl 136(%esp), %ecx - movl $65536, %eax - movl $-65536, %edx - cmpl %eax, %ecx - cmovg %eax, %ecx - cmpl %edx, %ecx - cmovl %edx, %ecx - andpd %xmm0, %xmm4 - xorpd %xmm4, %xmm0 - ucomisd 128(%ebx), %xmm0 - jp .L_2TAG_PACKET_0.0.3 - je .L_2TAG_PACKET_0.0.3 - comisd 80(%ebx), %xmm0 - jc .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - movapd %xmm0, %xmm2 - movapd (%ebx), %xmm3 - psrlq $52, %xmm2 - movd %ecx, %xmm1 - andpd %xmm3, %xmm2 - paddq %xmm1, %xmm2 - movd %xmm2, %eax - movapd 16(%ebx), %xmm3 - testl %eax, %eax - jle .L_2TAG_PACKET_3.0.3 - cmpl $2047, %eax - jge .L_2TAG_PACKET_4.0.3 - andpd %xmm3, %xmm0 - psllq $52, %xmm2 - xorpd %xmm4, %xmm0 - orpd %xmm2, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_0.0.3: - fldl 8(%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_1.0.3: - comisd 144(%ebx), %xmm0 - je .L_2TAG_PACKET_0.0.3 - mulsd 96(%ebx), %xmm0 - subl $55, %ecx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $-52, %eax - jl .L_2TAG_PACKET_6.0.3 - xorpd %xmm5, %xmm5 - andpd %xmm3, %xmm0 - shufpd $1, %xmm3, %xmm3 - paddq %xmm3, %xmm2 - xorpd %xmm4, %xmm0 - psllq $52, %xmm2 - orpd %xmm2, %xmm0 - mulsd 112(%ebx), %xmm0 - comisd %xmm5, %xmm0 - je .L_2TAG_PACKET_6.0.3 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_4.0.3: - lea 32(%ebx), %edx - movl $146, %ecx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_6.0.3: - lea 48(%ebx), %edx - movl $147, %ecx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_7.0.3: - pextrw $3, %xmm4, %eax - shrl $12, %eax - addl %edx, %eax - movq (%edx), %xmm0 - mulsd (%eax), %xmm0 - movq %xmm0, (%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 136(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %ecx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) -.L_2TAG_PACKET_5.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type ldexp,@function - .size ldexp,.-ldexp - .data -# -- End ldexp - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 2047 - .long 0 - .long 4294967241 - .long 4294967295 - .long 4294967295 - .long 2148532223 - .long 55 - .long 0 - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 1048576 - .long 0 - .long 1048576 - .long 0 - .long 1130364928 - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .long 0 - .long 1015021568 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,160 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexpf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexpf.S deleted file mode 100644 index 9cfcd9f517..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexpf.S +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ldexpf.c" - .text -..TXTST0: -# -- Begin ldexpf - .text - .align 16,0x90 - .globl ldexpf -ldexpf: -# parameter 1: 16 + %esp -# parameter 2: 20 + %esp -..B1.1: -..L1: - - pushl %ebx - pushl %ebp - pushl %esi - movzwl 18(%esp), %eax - movl %eax, %ecx - andl $32640, %ecx - shrl $7, %ecx - movl 20(%esp), %edx - cmpl $255, %ecx - je ..B1.15 -..B1.2: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - testl %ecx, %ecx - jne ..B1.5 -..B1.3: - testl $8388607, 16(%esp) - je ..B1.9 -..B1.4: - flds 16(%esp) - fmuls .L_2il0floatpacket.0@GOTOFF(%ebx) - fstps 16(%esp) - movzwl 18(%esp), %eax - movl %eax, %ecx - andl $32640, %ecx - shrl $7, %ecx - addl $-25, %ecx -..B1.5: - cmpl $65536, %edx - jle ..L3 - movl $65536, %edx -..L3: - cmpl $-65536, %edx - jg ..L4 - movl $-65536, %edx -..L4: - lea (%ecx,%edx), %ebp - testl %ebp, %ebp - jle ..B1.11 -..B1.6: - cmpl $255, %ebp - jge ..B1.10 -..B1.7: - andl $255, %ebp - andl $-32641, %eax - shll $7, %ebp - orl %ebp, %eax - movw %ax, 18(%esp) - flds 16(%esp) -..B1.8: - popl %ecx - popl %ebp - popl %ebx - ret -..B1.9: - flds 16(%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.10: - movzbl 19(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _large_value_32@GOTOFF(%ebx,%eax,4) - fmuls .L_2il0floatpacket.1@GOTOFF(%ebx) - fsts (%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.11: - cmpl $-23, %ebp - jl ..B1.14 -..B1.12: - movl 16(%esp), %eax - lea 25(%ecx,%edx), %edx - movl %eax, (%esp) - shrl $16, %eax - movzbl %dl, %edx - andl $-32641, %eax - shll $7, %edx - orl %edx, %eax - movw %ax, 2(%esp) - flds (%esp) - fmuls .L_2il0floatpacket.3@GOTOFF(%ebx) - fsts (%esp) -..B1.13: - popl %ecx - popl %ebp - popl %ebx - ret -..B1.14: - movzbl 19(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _small_value_32@GOTOFF(%ebx,%eax,4) - fmuls .L_2il0floatpacket.2@GOTOFF(%ebx) - fsts (%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.15: - flds 16(%esp) - popl %ecx - popl %ebp - popl %ebx - ret - .align 16,0x90 - .type ldexpf,@function - .size ldexpf,.-ldexpf - .data -# -- End ldexpf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x0d800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x33000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexpl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexpl.S deleted file mode 100644 index dffdf3c60b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ldexpl.S +++ /dev/null @@ -1,337 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ldexpl.c" - .text -..TXTST0: -# -- Begin ldexpl - .text - .align 16,0x90 - .globl ldexpl -ldexpl: -# parameter 1: 32 + %esp -# parameter 2: 44 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - pushl %ebp - subl $16, %esp - movl 44(%esp), %ebx -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 40(%esp), %eax - movl %eax, %ecx - andl $32767, %ecx - call ..L2 -..L2: - popl %ebp - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebp), %ebp - cmpl $32767, %ecx - je ..B1.43 -..B1.4: - testl %ecx, %ecx - jne ..B1.14 -..B1.5: - cmpl $0, 36(%esp) - jne ..B1.8 -..B1.6: - cmpl $0, 32(%esp) - jne ..B1.8 -..B1.7: - fldt 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.8: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.42 -..B1.9: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.10: - fldcw 12(%esp) -..B1.11: - fldt 32(%esp) - fmull _TWO_75@GOTOFF(%ebp) - fstpt 32(%esp) -..B1.12: - fldcw 14(%esp) -..B1.13: - movzwl 40(%esp), %eax - movl %eax, %ecx - andl $32767, %ecx - addl $-75, %ecx -..B1.14: - cmpl $65536, %ebx - jle ..L3 - movl $65536, %ebx -..L3: - cmpl $-65536, %ebx - jg ..L4 - movl $-65536, %ebx -..L4: - lea (%ecx,%ebx), %edi - testl %edi, %edi - jle ..B1.25 -..B1.15: - cmpl $32767, %edi - jge ..B1.17 -..B1.16: - andl $-32768, %eax - andl $32767, %edi - orl %edi, %eax - movw %ax, 40(%esp) - fldt 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.17: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.24 -..B1.18: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.19: - fldcw 12(%esp) -..B1.20: - movl $1, %ebx -..B1.21: - fldt _large_value_80@GOTOFF(%ebp) - movzbl 41(%esp), %edx - andl $128, %edx - shrl $7, %edx - testl %ebx, %ebx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _large_value_80@GOTOFF(%ebp,%ecx) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.23 -..B1.22: - fldcw 14(%esp) -..B1.23: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.24: - xorl %ebx, %ebx - jmp ..B1.21 -..B1.25: - movzwl 14(%esp), %edx - cmpl $-63, %edi - jl ..B1.34 -..B1.26: - movl %edx, %edi - andl $768, %edi - cmpl $768, %edi - je ..B1.33 -..B1.27: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.28: - fldcw 12(%esp) -..B1.29: - movzwl 40(%esp), %eax - movl $1, %edi -..B1.30: - fldt 32(%esp) - lea 75(%ecx,%ebx), %edx - andl $-32768, %eax - andl $32767, %edx - fstpt (%esp) - orl %edx, %eax - movw %ax, 8(%esp) - testl %edi, %edi - fldt (%esp) - fmull 8+_TWO_75@GOTOFF(%ebp) - fstpt (%esp) - je ..B1.32 -..B1.31: - fldcw 14(%esp) -..B1.32: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.33: - xorl %edi, %edi - jmp ..B1.30 -..B1.34: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.41 -..B1.35: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.36: - fldcw 12(%esp) -..B1.37: - movl $1, %ebx -..B1.38: - fldt _small_value_80@GOTOFF(%ebp) - movzbl 41(%esp), %edx - andl $128, %edx - shrl $7, %edx - testl %ebx, %ebx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _small_value_80@GOTOFF(%ebp,%ecx) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.40 -..B1.39: - fldcw 14(%esp) -..B1.40: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.41: - xorl %ebx, %ebx - jmp ..B1.38 -..B1.42: - fldt 32(%esp) - fmull _TWO_75@GOTOFF(%ebp) - fstpt 32(%esp) - jmp ..B1.13 -..B1.43: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.49 -..B1.44: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.45: - fldcw 12(%esp) -..B1.46: - fldt 32(%esp) - fmull _ones@GOTOFF(%ebp) - fstpt (%esp) -..B1.47: - fldcw 14(%esp) -..B1.48: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.49: - fldt 32(%esp) - fmull _ones@GOTOFF(%ebp) - fstpt (%esp) - jmp ..B1.48 - .align 16,0x90 - .type ldexpl,@function - .size ldexpl,.-ldexpl - .data -# -- End ldexpl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgamma.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgamma.S deleted file mode 100644 index ef07e0fff1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgamma.S +++ /dev/null @@ -1,6404 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lgamma.c" - .text -..TXTST0: -# -- Begin lgamma - .text - .align 16,0x90 - .globl lgamma -lgamma: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - subl $28, %esp - fldl 32(%esp) - lea 16(%esp), %eax - fstpl (%esp) - movl %eax, 8(%esp) - call __libm_lgamma -..B1.2: - addl $28, %esp - ret - .align 16,0x90 - .type lgamma,@function - .size lgamma,.-lgamma - .data -# -- End lgamma - .text -# -- Begin __libm_lgamma - .text - .align 16,0x90 -__libm_lgamma: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L2: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - movl 16(%ebp), %eax - movzwl 14(%ebp), %ecx - andl $32752, %ecx - movl %eax, 16(%esp) - shrl $4, %ecx - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 144(%esp) - movl 12(%ebp), %eax - movzbl 15(%ebp), %edx - andl $1048575, %eax - movl %ecx, 4(%esp) - andl $128, %edx - shll $20, %ecx - shrl $7, %edx - orl %eax, %ecx - movl %ecx, 12(%esp) - movl %edx, (%esp) -..B2.2: - fnstcw 46(%esp) -..B2.3: - call fegetround -..B2.208: - movl %eax, 28(%esp) -..B2.4: - cmpl $0, 28(%esp) - jne ..B2.6 -..B2.5: - xorl %edi, %edi - jmp ..B2.8 -..B2.6: - addl $-16, %esp - movl $0, (%esp) - call fesetround -..B2.209: - addl $16, %esp -..B2.7: - movl $1, %edi -..B2.8: - movzwl 46(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.205 -..B2.9: - orl $-64768, %edx - movw %dx, 44(%esp) -..B2.10: - fldcw 44(%esp) -..B2.11: - movl $1, %esi -..B2.12: - call ..L3 -..L3: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L3](%ebx), %ebx - cmpl $2047, 4(%esp) - jne ..B2.19 -..B2.13: - movl 16(%esp), %eax - testl %esi, %esi - movl $1, (%eax) - je ..B2.15 -..B2.14: - fldcw 46(%esp) -..B2.15: - testl %edi, %edi - je ..B2.17 -..B2.16: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.210: - addl $16, %esp -..B2.17: - fldl 8(%ebp) - movl 144(%esp), %eax - xorl %esp, %eax - fmul %st(0), %st - cmpl %gs:20, %eax - jne ..B2.99 -..B2.18: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.19: - cmpl $0, 4(%esp) - jne ..B2.24 -..B2.20: - testl $1048575, 12(%ebp) - jne ..B2.24 -..B2.21: - cmpl $0, 8(%ebp) - je ..B2.100 -..B2.24: - movl 16(%esp), %eax - movl $1, (%eax) -..B2.25: - cmpl $0, (%esp) - je ..B2.126 -..B2.26: - fldl 8(%ebp) - addl $-16, %esp - fstpl (%esp) - call nearbyint@PLT -..B2.211: - fldl 8(%ebp) - addl $16, %esp - fxch %st(1) - fstpl 112(%esp) - fldl 112(%esp) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.27 - je ..B2.119 -..B2.27: - fldl .L_2il0floatpacket.0@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jae ..B2.244 - jp ..B2.244 -..B2.28: - fld %st(1) - frndint - fcom %st(2) - fnstsw %ax - sahf - jnb ..L4 - fld1 - faddp %st, %st(1) -..L4: - fstpl 112(%esp) - fldl 112(%esp) - faddp %st, %st(1) - fstpl 112(%esp) - testb $1, 112(%esp) - jne ..B2.31 -..B2.29: - movl 16(%esp), %eax - movl $-1, (%eax) - jmp ..B2.31 -..B2.244: - fstp %st(0) -..B2.31: - cmpl $1073741824, 12(%esp) - jae ..B2.43 -..B2.32: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.111 -..B2.33: - fld %st(0) -..B2.34: - fmul %st(2), %st - fxch %st(1) - fadd %st, %st(2) - fcom %st(2) - fnstsw %ax - sahf - fxch %st(1) - ja ..B2.34 -..B2.35: - fstp %st(1) - fstpt 72(%esp) -..B2.36: - andb $127, 81(%esp) - addl $-16, %esp - fldt 88(%esp) - fstpt (%esp) - fstpt 104(%esp) - call logl@PLT -..B2.213: - fldt 104(%esp) - addl $16, %esp - fxch %st(1) - fstpt 72(%esp) - fldt 72(%esp) - addl $-16, %esp - fxch %st(1) - fstpt (%esp) - fstpt 16(%esp) - call lgamma_pos -..B2.212: - fldt 16(%esp) - addl $16, %esp - testl %edi, %edi - je ..B2.39 -..B2.37: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.214: - fldt 16(%esp) - addl $16, %esp -..B2.38: - fldt 72(%esp) -..B2.39: - testl %esi, %esi - fsubrp %st, %st(1) - fstpl 112(%esp) - je ..B2.41 -..B2.40: - fldcw 46(%esp) -..B2.41: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.42: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.43: - cmpl $1076756480, 12(%esp) - jae ..B2.73 -..B2.44: - fldl _TWO_52H@GOTOFF(%ebx) - fld %st(1) - fldt .L_2il0floatpacket.4@GOTOFF(%ebx) - fxch %st(1) - faddl .L_2il0floatpacket.3@GOTOFF(%ebx) - fstpl 64(%esp) - fldl 64(%esp) - fsubr %st(2), %st - fstpl 112(%esp) - fldl 112(%esp) - movl 112(%esp), %ecx - fsubp %st, %st(2) - fxch %st(1) - fstpl 112(%esp) - lea 1(%ecx), %edx - fldl 112(%esp) - fldl 64(%esp) - faddp %st, %st(1) - fcompp - fnstsw %ax - sahf - jp ..L6 - jb ..L5 -..L6: - movl %ecx, %edx -..L5: - lea (%edx,%edx,2), %ecx - fcoml _LRIB@GOTOFF(%ebx,%ecx,8) - fnstsw %ax - sahf - jbe ..B2.53 -..B2.45: - fldl 16+_LRIB@GOTOFF(%ebx,%ecx,8) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.53 -..B2.46: - fldl _LRP16@GOTOFF(%ebx,%edx,8) - fxch %st(1) - fsubl 8+_LRIB@GOTOFF(%ebx,%ecx,8) - shll $6, %ecx - fld %st(0) - testl %edi, %edi - fmul %st(1), %st - fmul %st, %st(2) - fldt 64+_LRP@GOTOFF(%ecx,%ebx) - fldt 32+_LRP@GOTOFF(%ecx,%ebx) - fldt _LRP@GOTOFF(%ecx,%ebx) - fldt 48+_LRP@GOTOFF(%ecx,%ebx) - fldt 16+_LRP@GOTOFF(%ecx,%ebx) - fxch %st(7) - faddl 152+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(5), %st - faddl 136+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(5), %st - faddl 120+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(5), %st - faddl 104+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(5), %st - faddl 88+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(5), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fstpt 72(%esp) - fldt 72(%esp) - fldl 160+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(3), %st - faddl 144+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(3), %st - faddl 128+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(3), %st - faddl 112+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(3), %st - faddl 96+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(3), %st - faddl 80+_LRP@GOTOFF(%ecx,%ebx) - fmul %st(3), %st - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%esp) - je ..B2.49 -..B2.47: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.215: - addl $16, %esp -..B2.48: - fldt 72(%esp) -..B2.49: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstpl 112(%esp) - je ..B2.51 -..B2.50: - fldcw 46(%esp) -..B2.51: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.52: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.53: - fcoml _RRIB@GOTOFF(%ebx,%ecx,8) - fnstsw %ax - sahf - jbe ..B2.62 -..B2.54: - fldl 16+_RRIB@GOTOFF(%ebx,%ecx,8) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.62 -..B2.55: - fsubl 8+_RRIB@GOTOFF(%ebx,%ecx,8) - fld %st(0) - lea (%edx,%edx,4), %eax - shll $5, %eax - fmul %st(1), %st - testl %edi, %edi - fldl 72+_RRP@GOTOFF(%eax,%ebx) - fmul %st(1), %st - fldt 32+_RRP@GOTOFF(%eax,%ebx) - fldt _RRP@GOTOFF(%eax,%ebx) - fldl 64+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 120+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 112+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 88+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 80+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 136+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 128+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 104+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 96+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - fxch %st(3) - faddl 152+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fstpt 72(%esp) - fldt 72(%esp) - fldt 48+_RRP@GOTOFF(%eax,%ebx) - fldt 16+_RRP@GOTOFF(%eax,%ebx) - fxch %st(3) - faddl 144+_RRP@GOTOFF(%eax,%ebx) - fmul %st(4), %st - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fstpt (%esp) - je ..B2.58 -..B2.56: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.216: - addl $16, %esp -..B2.57: - fldt 72(%esp) -..B2.58: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstpl 112(%esp) - je ..B2.60 -..B2.59: - fldcw 46(%esp) -..B2.60: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.61: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.62: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.115 -..B2.63: - fld %st(0) -..B2.64: - fmul %st(2), %st - fxch %st(1) - fadd %st, %st(2) - fcom %st(2) - fnstsw %ax - sahf - fxch %st(1) - ja ..B2.64 -..B2.65: - fstp %st(1) - fstpt 72(%esp) -..B2.66: - andb $127, 81(%esp) - addl $-16, %esp - fldt 88(%esp) - fstpt (%esp) - fstpt 104(%esp) - call logl@PLT -..B2.218: - fldt 104(%esp) - addl $16, %esp - fxch %st(1) - fstpt 72(%esp) - fldt 72(%esp) - addl $-16, %esp - fxch %st(1) - fstpt (%esp) - fstpt 16(%esp) - call lgamma_pos -..B2.217: - fldt 16(%esp) - addl $16, %esp - testl %edi, %edi - je ..B2.69 -..B2.67: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.219: - fldt 16(%esp) - addl $16, %esp -..B2.68: - fldt 72(%esp) -..B2.69: - testl %esi, %esi - fsubrp %st, %st(1) - fstpl 112(%esp) - je ..B2.71 -..B2.70: - fldcw 46(%esp) -..B2.71: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.72: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.73: - cmpl $1076953088, 12(%esp) - jae ..B2.84 -..B2.74: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fstpt 120(%esp) - fldt 120(%esp) - fcom %st(1) - fnstsw %ax - fldt .L_2il0floatpacket.4@GOTOFF(%ebx) - fstpt 132(%esp) - fldt 132(%esp) - sahf - jbe ..B2.245 -..B2.75: - fldt .L_2il0floatpacket.5@GOTOFF(%ebx) - fstpt 16(%esp) - fstpt (%esp) - .align 16,0x90 -..B2.76: - fldt (%esp) - fstp %st(0) - fld %st(1) - fxch %st(2) - fldt 16(%esp) - fld %st(0) - fmul %st(2), %st - fadd %st, %st(4) - fxch %st(4) - fstpt 100(%esp) - fldt 100(%esp) - fsubp %st, %st(4) - fld %st(1) - fsub %st(4), %st - fxch %st(2) - fadd %st(3), %st - fcom %st(3) - fnstsw %ax - fldt 120(%esp) - fmul %st, %st(2) - fld %st(0) - sahf - fadd %st(3), %st - fstpt 100(%esp) - fldt 132(%esp) - fldt 100(%esp) - fsubp %st, %st(4) - fxch %st(1) - fsub %st(3), %st - faddp %st, %st(1) - fld %st(3) - fmul %st(1), %st - fld %st(6) - fmul %st(4), %st - fxch %st(2) - fmulp %st, %st(7) - faddp %st, %st(6) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fadd %st(2), %st - fstpt 120(%esp) - fldt 120(%esp) - fsubp %st, %st(2) - fxch %st(3) - fsubp %st, %st(1) - fstpt 132(%esp) - jp ..B2.77 - jb ..B2.76 -..B2.77: - fstp %st(0) -..B2.78: - andb $127, 129(%esp) - addl $-16, %esp - fldt 136(%esp) - fstpt (%esp) - fstpt 104(%esp) - call logl@PLT -..B2.221: - fldt 104(%esp) - fxch %st(1) - fstpt 32(%esp) - fstpt (%esp) - call lgamma_pos -..B2.220: - addl $16, %esp - testl %edi, %edi - je ..B2.80 -..B2.79: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.222: - fldt 16(%esp) - addl $16, %esp -..B2.80: - fldt 16(%esp) - testl %esi, %esi - fsubrp %st, %st(1) - fstpl 112(%esp) - je ..B2.82 -..B2.81: - fldcw 46(%esp) -..B2.82: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.83: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.84: - cmpl $1082130432, 12(%esp) - jb ..B2.92 -..B2.85: - fldt _LN_SQRT_TWO_PI@GOTOFF(%ebx) - fstpt (%esp) - addl $-16, %esp - fld %st(0) - fchs - fstpt (%esp) - fldt (%esp) - fstpt 32(%esp) - fstpt 104(%esp) - fldt 104(%esp) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fsubrp %st, %st(1) - fstpt 64(%esp) - call logl@PLT -..B2.223: - fldt 104(%esp) - fldt 64(%esp) - fmulp %st, %st(2) - fldt 32(%esp) - addl $16, %esp - fldt (%esp) - testl %edi, %edi - fsubrp %st, %st(3) - fxch %st(1) - fsubr %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fdiv %st(1), %st - fld %st(0) - fmul %st(1), %st - fmull _W4@GOTOFF(%ebx) - fldt _W2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl _TWO_52H@GOTOFF(%ebx) - fstl 112(%esp) - fldl 112(%esp) - fsubp %st, %st(2) - fxch %st(1) - fstpl 112(%esp) - fldl 112(%esp) - fsubp %st, %st(1) - fstpl 112(%esp) - fldl 112(%esp) - fsubrp %st, %st(1) - fstpt 32(%esp) - fldt 32(%esp) - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fldl _S26@GOTOFF(%ebx) - fmul %st(1), %st - fldt _S10@GOTOFF(%ebx) - fldt _S06@GOTOFF(%ebx) - fldt _S02@GOTOFF(%ebx) - fldl _S28@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl _S22@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl _S24@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl _S18@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl _S20@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl _S14@GOTOFF(%ebx) - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(3) - faddl _S16@GOTOFF(%ebx) - fmul %st(1), %st - fldt _S12@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt _S08@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt _S04@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 72(%esp) - fldt 72(%esp) - je ..B2.88 -..B2.86: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - fstpt 64(%esp) - call fesetround -..B2.224: - fldt 64(%esp) - addl $16, %esp -..B2.87: - fldt 72(%esp) -..B2.88: - andb $127, 41(%esp) - addl $-16, %esp - fldt 48(%esp) - fstpt (%esp) - fsubrp %st, %st(1) - fstpt 64(%esp) - call logl@PLT -..B2.225: - fldt 64(%esp) - addl $16, %esp - testl %esi, %esi - fsubp %st, %st(1) - fstpl 112(%esp) - je ..B2.90 -..B2.89: - fldcw 46(%esp) -..B2.90: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.91: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.92: - fldl _TWO_52H@GOTOFF(%ebx) - fstl 112(%esp) - fldl 112(%esp) - fsub %st(2), %st - fstpl 112(%esp) - fxch %st(1) - fchs - fldl 112(%esp) - fsubp %st, %st(2) - fxch %st(1) - fstpl 112(%esp) - fldl 112(%esp) - fsubr %st(1), %st - fstpt 32(%esp) - fldt 32(%esp) - fmul %st(0), %st - fstpt (%esp) - addl $-16, %esp - fstpt (%esp) - call logl@PLT -..B2.227: - fchs - fldl 8(%ebp) - fchs - fstpt (%esp) - fstpt 32(%esp) - call lgamma_pos -..B2.226: - fldt 32(%esp) - addl $16, %esp - fldt (%esp) - testl %edi, %edi - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fmul %st(2), %st - fldl _S26@GOTOFF(%ebx) - fmul %st(1), %st - fldt _S10@GOTOFF(%ebx) - fldt _S06@GOTOFF(%ebx) - fldt _S02@GOTOFF(%ebx) - fldt _S12@GOTOFF(%ebx) - fxch %st(4) - faddl _S22@GOTOFF(%ebx) - fmul %st(5), %st - faddl _S18@GOTOFF(%ebx) - fmul %st(5), %st - faddl _S14@GOTOFF(%ebx) - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(4) - fldl _S28@GOTOFF(%ebx) - fmul %st(2), %st - fldt _S08@GOTOFF(%ebx) - fldt _S04@GOTOFF(%ebx) - fxch %st(2) - faddl _S24@GOTOFF(%ebx) - fmul %st(4), %st - faddl _S20@GOTOFF(%ebx) - fmul %st(4), %st - faddl _S16@GOTOFF(%ebx) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 72(%esp) - fldt 72(%esp) - je ..B2.95 -..B2.93: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - fstpt 32(%esp) - call fesetround -..B2.228: - fldt 32(%esp) - addl $16, %esp -..B2.94: - fldt 72(%esp) -..B2.95: - andb $127, 41(%esp) - addl $-16, %esp - fldt 48(%esp) - fstpt (%esp) - fsubrp %st, %st(1) - fstpt 32(%esp) - call logl@PLT -..B2.229: - fldt 32(%esp) - addl $16, %esp - testl %esi, %esi - fsubp %st, %st(1) - fstpl 112(%esp) - je ..B2.97 -..B2.96: - fldcw 46(%esp) -..B2.97: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.98: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.99: - fstp %st(0) - call __stack_chk_fail@PLT -..B2.100: - cmpl $0, (%esp) - je ..B2.102 -..B2.101: - movl 16(%esp), %eax - movl $-1, (%eax) - jmp ..B2.103 -..B2.102: - movl 16(%esp), %eax - movl $1, (%eax) -..B2.103: - testl %edi, %edi - je ..B2.105 -..B2.104: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.230: - addl $16, %esp -..B2.105: - fld1 - fldz - testl %esi, %esi - fstpl 112(%esp) - fldl 112(%esp) - fdivrp %st, %st(1) - fstpl 112(%esp) - je ..B2.107 -..B2.106: - fldcw 46(%esp) -..B2.107: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 - jmp ..B2.18 -..B2.111: - fstpt 72(%esp) - jmp ..B2.36 -..B2.115: - fstpt 72(%esp) - jmp ..B2.66 -..B2.119: - fstp %st(0) - testl %edi, %edi - je ..B2.121 -..B2.120: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.231: - addl $16, %esp -..B2.121: - fld1 - fldz - testl %esi, %esi - fstpl 112(%esp) - fldl 112(%esp) - fdivrp %st, %st(1) - fstpl 112(%esp) - je ..B2.123 -..B2.122: - fldcw 46(%esp) -..B2.123: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 - jmp ..B2.18 -..B2.126: - movzwl 14(%ebp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2037, %eax - jg ..B2.198 -..B2.127: - je ..B2.195 -..B2.128: - fldl 8(%ebp) - fld1 - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.129 - je ..B2.188 -..B2.129: - cmpl $1032, 4(%esp) - jb ..B2.136 -..B2.130: - fldt _LN_SQRT_TWO_PI@GOTOFF(%ebx) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fsubr %st(2), %st - fstpt (%esp) - addl $-16, %esp - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fxch %st(1) - fstpt 48(%esp) - fstpt 32(%esp) - call logl@PLT -..B2.232: - fldt 32(%esp) - fldt 48(%esp) - addl $16, %esp - fldt (%esp) - testl %edi, %edi - fmulp %st, %st(3) - faddp %st, %st(2) - fsubr %st, %st(1) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fdivp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fmull _W4@GOTOFF(%ebx) - fldt _W2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - je ..B2.132 -..B2.131: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 48(%esp) - call fesetround -..B2.233: - fldt 48(%esp) - fldt 16(%esp) - addl $16, %esp -..B2.132: - testl %esi, %esi - faddp %st, %st(1) - fstpl 112(%esp) - je ..B2.134 -..B2.133: - fldcw 46(%esp) -..B2.134: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.135: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.136: - cmpl $1025, 4(%esp) - jb ..B2.143 -..B2.137: - movl 4(%esp), %eax - fsubl -8200+_A@GOTOFF(%ebx,%eax,8) - fmull -8200+_B@GOTOFF(%ebx,%eax,8) - lea -9225(%eax,%eax,8), %edx - shll $5, %edx - fld %st(0) - fmul %st(1), %st - testl %edi, %edi - fldt 12+_C5@GOTOFF(%edx,%ebx) - fmul %st(2), %st - fadd %st(1), %st - fldt _C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fldt 36+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 24+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 60+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 48+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 84+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 72+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 108+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 96+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 132+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 120+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 156+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 144+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 180+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 168+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 204+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 192+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 228+_C5@GOTOFF(%edx,%ebx) - fmul %st(3), %st - fadd %st(2), %st - fldt 216+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 252+_C5@GOTOFF(%edx,%ebx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 240+_C5@GOTOFF(%edx,%ebx) - faddp %st, %st(1) - fmul %st, %st(1) - fxch %st(1) - fstpt 8(%esp) - fstpt 72(%esp) - je ..B2.139 -..B2.138: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - movl %edx, 16(%esp) - call fesetround -..B2.234: - movl 16(%esp), %edx - addl $16, %esp -..B2.139: - fldt 264+_C5@GOTOFF(%edx,%ebx) - testl %esi, %esi - fldt 8(%esp) - fmulp %st, %st(1) - fstpl 112(%esp) - je ..B2.141 -..B2.140: - fldcw 46(%esp) -..B2.141: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.142: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.143: - cmpl $1073872896, 12(%esp) - jb ..B2.150 -..B2.144: - fldt 12+_C4@GOTOFF(%ebx) - testl %edi, %edi - fmul %st(1), %st - fld %st(1) - fmul %st(2), %st - fadd %st, %st(1) - fldt _C4@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 36+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 24+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 60+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 48+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 84+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 72+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 108+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 96+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 132+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 120+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 156+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 144+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 180+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 168+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 204+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 192+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 228+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st(1), %st - fldt 216+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 252+_C4@GOTOFF(%ebx) - fmul %st(3), %st - faddp %st, %st(1) - fldt 240+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st, %st(1) - fstpt 72(%esp) - fldt 264+_C4@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%esp) - je ..B2.146 -..B2.145: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - fstpt 32(%esp) - call fesetround -..B2.235: - fldt 32(%esp) - addl $16, %esp -..B2.146: - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - testl %esi, %esi - fsubrp %st, %st(1) - fldt (%esp) - fmulp %st, %st(1) - fstpl 112(%esp) - je ..B2.148 -..B2.147: - fldcw 46(%esp) -..B2.148: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.149: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.150: - cmpl $1073479680, 12(%esp) - jb ..B2.158 -..B2.151: - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - testl %edi, %edi - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl 168+_C3@GOTOFF(%ebx) - fmul %st(1), %st - fldl 160+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 152+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 144+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 136+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 128+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 120+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 112+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 104+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 96+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 88+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 80+_C3@GOTOFF(%ebx) - fmul %st(2), %st - fldt 64+_C3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 32+_C3@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _C3@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - fstpt 72(%esp) - fldt 72(%esp) - fldt 48+_C3@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 16+_C3@GOTOFF(%ebx) - faddp %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%esp) - je ..B2.154 -..B2.152: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.236: - addl $16, %esp -..B2.153: - fldt 72(%esp) -..B2.154: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstpl 112(%esp) - je ..B2.156 -..B2.155: - fldcw 46(%esp) -..B2.156: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.157: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.158: - cmpl $1072955392, 12(%esp) - jb ..B2.166 -..B2.159: - fldt _LM@GOTOFF(%ebx) - testl %edi, %edi - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl 184+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(1), %st - fldt 80+_LGAMMA_C2@GOTOFF(%ebx) - fldt 48+_LGAMMA_C2@GOTOFF(%ebx) - fldt 16+_LGAMMA_C2@GOTOFF(%ebx) - fldt 32+_LGAMMA_C2@GOTOFF(%ebx) - fldt _LGAMMA_C2@GOTOFF(%ebx) - fxch %st(5) - faddl 168+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(6), %st - faddl 152+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(6), %st - faddl 136+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(6), %st - faddl 120+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(6), %st - faddl 104+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fmulp %st, %st(4) - fxch %st(3) - fstpt 72(%esp) - fldt 72(%esp) - fldl 176+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(3), %st - fldt 64+_LGAMMA_C2@GOTOFF(%ebx) - fxch %st(1) - faddl 160+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(4), %st - faddl 144+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(4), %st - faddl 128+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(4), %st - faddl 112+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(4), %st - faddl 96+_LGAMMA_C2@GOTOFF(%ebx) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - je ..B2.162 -..B2.160: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.237: - addl $16, %esp -..B2.161: - fldt 72(%esp) -..B2.162: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstpl 112(%esp) - je ..B2.164 -..B2.163: - fldcw 46(%esp) -..B2.164: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.165: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.166: - cmpl $1072431104, 12(%esp) - jb ..B2.174 -..B2.167: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - testl %edi, %edi - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl 168+_C1@GOTOFF(%ebx) - fmul %st(1), %st - fldl 160+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 152+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 144+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 136+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 128+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 120+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 112+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 104+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 96+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 88+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 80+_C1@GOTOFF(%ebx) - fmul %st(2), %st - fldt 64+_C1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 32+_C1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _C1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - fstpt 72(%esp) - fldt 72(%esp) - fldt 48+_C1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 16+_C1@GOTOFF(%ebx) - faddp %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%esp) - je ..B2.170 -..B2.168: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.238: - addl $16, %esp -..B2.169: - fldt 72(%esp) -..B2.170: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstpl 112(%esp) - je ..B2.172 -..B2.171: - fldcw 46(%esp) -..B2.172: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.173: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.174: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - addl $-16, %esp - fadd %st(1), %st - fstpt (%esp) - fstpt 32(%esp) - call lgamma_pos -..B2.240: - fldt 32(%esp) - fxch %st(1) - fstpt 16(%esp) - fstpt (%esp) - call logl@PLT -..B2.239: - addl $16, %esp - fstpt 72(%esp) - fldt 72(%esp) - testl %edi, %edi - je ..B2.177 -..B2.175: - fstp %st(0) - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.241: - addl $16, %esp -..B2.176: - fldt 72(%esp) -..B2.177: - fldt (%esp) - testl %esi, %esi - fsubp %st, %st(1) - fstpl 112(%esp) - je ..B2.179 -..B2.178: - fldcw 46(%esp) -..B2.179: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 -..B2.180: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.188: - fstp %st(0) - testl %esi, %esi - je ..B2.190 -..B2.189: - fldcw 46(%esp) -..B2.190: - testl %edi, %edi - je ..B2.192 -..B2.191: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.242: - addl $16, %esp -..B2.192: - movl 144(%esp), %eax - fldz - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 - jmp ..B2.18 -..B2.195: - movl 12(%ebp), %eax - andl $1048575, %eax - cmpl $480473, %eax - jg ..B2.198 -..B2.196: - jne ..B2.128 -..B2.197: - cmpl $663441831, 8(%ebp) - jbe ..B2.128 -..B2.198: - testl %edi, %edi - je ..B2.200 -..B2.199: - addl $-16, %esp - movl 44(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.243: - addl $16, %esp -..B2.200: - fldl _PBIG@GOTOFF(%ebx) - testl %esi, %esi - fmul %st(0), %st - fstpl 112(%esp) - je ..B2.202 -..B2.201: - fldcw 46(%esp) -..B2.202: - fldl 112(%esp) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.99 - jmp ..B2.18 -..B2.205: - xorl %esi, %esi - jmp ..B2.12 -..B2.245: - fstp %st(1) - fstp %st(0) - jmp ..B2.78 - .align 16,0x90 - .type __libm_lgamma,@function - .size __libm_lgamma,.-__libm_lgamma - .data -# -- End __libm_lgamma - .text -# -- Begin lgamma_pos - .text - .align 16,0x90 -lgamma_pos: -# parameter 1: 8 + %ebp -..B3.1: -..L7: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp - fldt 8(%ebp) - fstl (%esp) - movzwl 6(%esp), %ecx - andl $32752, %ecx - shrl $4, %ecx - movl 4(%esp), %edx - shll $20, %ecx - andl $1048575, %edx - orl %edx, %ecx - call ..L8 -..L8: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L8](%eax), %eax - cmpl $1074790400, %ecx - jb ..B3.3 -..B3.2: - addl $-1074790400, %ecx - sarl $20, %ecx - fldl _A@GOTOFF(%eax,%ecx,8) - lea (%ecx,%ecx,8), %edx - shll $5, %edx - fsubrp %st, %st(1) - fmull _B@GOTOFF(%eax,%ecx,8) - fld %st(0) - fmul %st(1), %st - fldt 12+_C5@GOTOFF(%eax,%edx) - fmul %st(2), %st - fadd %st(1), %st - fldt 36+_C5@GOTOFF(%eax,%edx) - fmul %st(3), %st - fadd %st(2), %st - fldt 24+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fldt 60+_C5@GOTOFF(%eax,%edx) - fmul %st(4), %st - fadd %st(3), %st - fldt 48+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fldt 84+_C5@GOTOFF(%eax,%edx) - fmul %st(5), %st - fadd %st(4), %st - fldt 108+_C5@GOTOFF(%eax,%edx) - fmul %st(6), %st - fadd %st(5), %st - fldt _C5@GOTOFF(%edx,%eax) - faddp %st, %st(5) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - fldt 72+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 96+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 132+_C5@GOTOFF(%eax,%edx) - fmul %st(3), %st - fadd %st(2), %st - fldt 120+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 156+_C5@GOTOFF(%eax,%edx) - fmul %st(3), %st - fadd %st(2), %st - fldt 144+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 180+_C5@GOTOFF(%eax,%edx) - fmul %st(3), %st - fadd %st(2), %st - fldt 168+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 204+_C5@GOTOFF(%eax,%edx) - fmul %st(3), %st - fadd %st(2), %st - fldt 192+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 228+_C5@GOTOFF(%eax,%edx) - fmul %st(3), %st - fadd %st(2), %st - fldt 216+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 252+_C5@GOTOFF(%eax,%edx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 240+_C5@GOTOFF(%eax,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 264+_C5@GOTOFF(%eax,%edx) - fmulp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.3: - cmpl $1073872896, %ecx - jb ..B3.5 -..B3.4: - fldt 12+_C4@GOTOFF(%eax) - fmul %st(1), %st - fld %st(1) - fmul %st(2), %st - fadd %st, %st(1) - fldt _C4@GOTOFF(%eax) - faddp %st, %st(2) - fldt 36+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 24+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 60+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 48+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 84+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 72+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 108+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 96+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 132+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 120+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 156+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 144+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 180+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 168+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 204+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 192+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 228+_C4@GOTOFF(%eax) - fmul %st(3), %st - fadd %st(1), %st - fldt 216+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 252+_C4@GOTOFF(%eax) - fmul %st(3), %st - faddp %st, %st(1) - fldt 240+_C4@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 264+_C4@GOTOFF(%eax) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.6@GOTOFF(%eax) - fsubrp %st, %st(2) - fmulp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.5: - cmpl $1073479680, %ecx - jb ..B3.7 -..B3.6: - fldt .L_2il0floatpacket.6@GOTOFF(%eax) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl 160+_C3@GOTOFF(%eax) - fmul %st(1), %st - fldt 48+_C3@GOTOFF(%eax) - fldt 16+_C3@GOTOFF(%eax) - fldt 64+_C3@GOTOFF(%eax) - fldt 32+_C3@GOTOFF(%eax) - fldt _C3@GOTOFF(%eax) - fxch %st(5) - faddl 144+_C3@GOTOFF(%eax) - fmul %st(6), %st - faddl 128+_C3@GOTOFF(%eax) - fmul %st(6), %st - faddl 112+_C3@GOTOFF(%eax) - fmul %st(6), %st - faddl 96+_C3@GOTOFF(%eax) - fmul %st(6), %st - faddl 80+_C3@GOTOFF(%eax) - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldl 168+_C3@GOTOFF(%eax) - fmul %st(5), %st - faddl 152+_C3@GOTOFF(%eax) - fmul %st(5), %st - faddl 136+_C3@GOTOFF(%eax) - fmul %st(5), %st - faddl 120+_C3@GOTOFF(%eax) - fmul %st(5), %st - faddl 104+_C3@GOTOFF(%eax) - fmul %st(5), %st - faddl 88+_C3@GOTOFF(%eax) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.7: - cmpl $1072955392, %ecx - jb ..B3.9 -..B3.8: - fldt _LM@GOTOFF(%eax) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl 176+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(1), %st - fldt 64+_LGAMMA_C2@GOTOFF(%eax) - fldt 32+_LGAMMA_C2@GOTOFF(%eax) - fldt _LGAMMA_C2@GOTOFF(%eax) - fldt 48+_LGAMMA_C2@GOTOFF(%eax) - fldt 80+_LGAMMA_C2@GOTOFF(%eax) - fxch %st(5) - faddl 160+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(6), %st - faddl 144+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(6), %st - faddl 128+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(6), %st - faddl 112+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(6), %st - faddl 96+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fldl 184+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(4), %st - faddl 168+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(4), %st - faddl 152+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(4), %st - faddl 136+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(4), %st - faddl 120+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(4), %st - faddl 104+_LGAMMA_C2@GOTOFF(%eax) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 16+_LGAMMA_C2@GOTOFF(%eax) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.9: - cmpl $1072431104, %ecx - jb ..B3.11 -..B3.10: - fldt .L_2il0floatpacket.1@GOTOFF(%eax) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl 160+_C1@GOTOFF(%eax) - fmul %st(1), %st - fldt 48+_C1@GOTOFF(%eax) - fldt 16+_C1@GOTOFF(%eax) - fldt 64+_C1@GOTOFF(%eax) - fldt 32+_C1@GOTOFF(%eax) - fldt _C1@GOTOFF(%eax) - fxch %st(5) - faddl 144+_C1@GOTOFF(%eax) - fmul %st(6), %st - faddl 128+_C1@GOTOFF(%eax) - fmul %st(6), %st - faddl 112+_C1@GOTOFF(%eax) - fmul %st(6), %st - faddl 96+_C1@GOTOFF(%eax) - fmul %st(6), %st - faddl 80+_C1@GOTOFF(%eax) - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldl 168+_C1@GOTOFF(%eax) - fmul %st(5), %st - faddl 152+_C1@GOTOFF(%eax) - fmul %st(5), %st - faddl 136+_C1@GOTOFF(%eax) - fmul %st(5), %st - faddl 120+_C1@GOTOFF(%eax) - fmul %st(5), %st - faddl 104+_C1@GOTOFF(%eax) - fmul %st(5), %st - faddl 88+_C1@GOTOFF(%eax) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.11: - fstp %st(0) - fldz -..B3.12: - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type lgamma_pos,@function - .size lgamma_pos,.-lgamma_pos - .data -# -- End lgamma_pos - .text -# -- Begin gamma - .text - .align 16,0x90 - .globl gamma -gamma: -# parameter 1: 32 + %esp -..B4.1: -..L9: - - subl $28, %esp - fldl 32(%esp) - lea 16(%esp), %eax - fstpl (%esp) - movl %eax, 8(%esp) - call __libm_lgamma -..B4.2: - addl $28, %esp - ret - .align 16,0x90 - .type gamma,@function - .size gamma,.-gamma - .data -# -- End gamma - .text -# -- Begin lgamma_r - .text - .align 16,0x90 - .globl lgamma_r -lgamma_r: -# parameter 1: 4 + %esp -# parameter 2: 12 + %esp -..B5.1: -..L10: - - jmp __libm_lgamma - .align 16,0x90 - .type lgamma_r,@function - .size lgamma_r,.-lgamma_r - .data -# -- End lgamma_r - .text -# -- Begin gamma_r - .text - .align 16,0x90 - .globl gamma_r -gamma_r: -# parameter 1: 4 + %esp -# parameter 2: 12 + %esp -..B6.1: -..L11: - - jmp __libm_lgamma - .align 16,0x90 - .type gamma_r,@function - .size gamma_r,.-gamma_r - .data -# -- End gamma_r - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,12 - .space 4, 0x00 # pad - .align 16 -_LRIB: - .long 3639930760 - .long 3221638968 - .long 169597185 - .long 3221617473 - .long 994230906 - .long 3221595977 - .long 249193764 - .long 3222253755 - .long 1417424869 - .long 3222250609 - .long 2585655974 - .long 3222247463 - .long 679699934 - .long 3222534303 - .long 2054089469 - .long 3222533975 - .long 3428479004 - .long 3222533647 - .long 1666697798 - .long 3222798023 - .long 4119983117 - .long 3222797970 - .long 2278301140 - .long 3222797918 - .long 753528318 - .long 3223060435 - .long 4151019248 - .long 3223060427 - .long 3253542882 - .long 3223060420 - .long 1221915992 - .long 3223322618 - .long 2139183567 - .long 3223322617 - .long 3056451142 - .long 3223322616 - .long 2968798493 - .long 3223453695 - .long 2743618512 - .long 3223453695 - .long 2518438531 - .long 3223453695 - .long 4156721779 - .long 3223584767 - .long 4139833280 - .long 3223584767 - .long 4122944781 - .long 3223584767 - .long 4282834537 - .long 3223715839 - .long 4280864212 - .long 3223715839 - .long 4278893887 - .long 3223715839 - .long 4293918703 - .long 3223846911 - .long 4293792039 - .long 3223846911 - .long 4293665375 - .long 3223846911 - .long 4294888151 - .long 3223977983 - .long 4294876892 - .long 3223977983 - .long 4294865633 - .long 3223977983 - .long 4294961261 - .long 3224109055 - .long 4294960839 - .long 3224109055 - .long 4294960417 - .long 3224109055 - .long 4294966894 - .long 3224240127 - .long 4294966866 - .long 3224240127 - .long 4294966838 - .long 3224240127 - .type _LRIB,@object - .size _LRIB,312 - .space 8, 0x00 # pad - .align 16 -_LRP16: - .long 2378050348 - .long 1101969305 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .type _LRP16,@object - .size _LRP16,104 - .space 8, 0x00 # pad - .align 16 -_LRP: - .word 17751 - .word 54196 - .word 10629 - .word 51164 - .word 16330 - .word 0 - .word 0 - .word 0 - .word 41133 - .word 9612 - .word 27976 - .word 62729 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 42459 - .word 13010 - .word 63969 - .word 39219 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 65437 - .word 25696 - .word 54808 - .word 41154 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 58026 - .word 20377 - .word 22118 - .word 64130 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 35937 - .word 22559 - .word 22660 - .word 49256 - .word 8259 - .word 31940 - .word 14143 - .word 16516 - .word 36722 - .word 48879 - .word 8761 - .word 49313 - .word 17702 - .word 59215 - .word 47717 - .word 16573 - .word 13453 - .word 50588 - .word 11555 - .word 49370 - .word 8896 - .word 4195 - .word 22549 - .word 16631 - .word 8306 - .word 47544 - .word 1832 - .word 49429 - .word 60153 - .word 61869 - .word 6523 - .word 16691 - .word 63612 - .word 2764 - .word 26286 - .word 49489 - .word 63356 - .word 31621 - .word 64278 - .word 16751 - .word 24055 - .word 64192 - .word 21464 - .word 49552 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49769 - .word 49242 - .word 6580 - .word 61152 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 7708 - .word 25266 - .word 60595 - .word 42444 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 45975 - .word 8629 - .word 62832 - .word 64438 - .word 16390 - .word 0 - .word 0 - .word 0 - .word 39855 - .word 22905 - .word 44266 - .word 59689 - .word 49162 - .word 0 - .word 0 - .word 0 - .word 10240 - .word 41089 - .word 5368 - .word 62588 - .word 16398 - .word 0 - .word 0 - .word 0 - .word 3194 - .word 32877 - .word 5879 - .word 49457 - .word 40173 - .word 43959 - .word 59635 - .word 16755 - .word 53371 - .word 1664 - .word 56254 - .word 49591 - .word 34510 - .word 44659 - .word 12150 - .word 16893 - .word 33872 - .word 42862 - .word 8799 - .word 49730 - .word 10662 - .word 44157 - .word 53571 - .word 17030 - .word 55074 - .word 58798 - .word 65525 - .word 49868 - .word 1276 - .word 34610 - .word 36363 - .word 17170 - .word 7041 - .word 29575 - .word 61144 - .word 50007 - .word 19121 - .word 53977 - .word 34010 - .word 17312 - .word 54457 - .word 12310 - .word 48419 - .word 50149 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55737 - .word 12115 - .word 42602 - .word 40775 - .word 16337 - .word 0 - .word 0 - .word 0 - .word 42581 - .word 53029 - .word 20983 - .word 59666 - .word 49157 - .word 0 - .word 0 - .word 0 - .word 24816 - .word 20947 - .word 58172 - .word 55961 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 3130 - .word 13042 - .word 49143 - .word 34463 - .word 49170 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 24697 - .word 14253 - .word 47765 - .word 16408 - .word 0 - .word 0 - .word 0 - .word 32693 - .word 5691 - .word 15709 - .word 49649 - .word 20491 - .word 21402 - .word 35932 - .word 16986 - .word 44071 - .word 16276 - .word 1675 - .word 49861 - .word 13758 - .word 14468 - .word 65445 - .word 17200 - .word 60394 - .word 3375 - .word 60434 - .word 50075 - .word 49748 - .word 2796 - .word 14419 - .word 17415 - .word 61579 - .word 22133 - .word 33066 - .word 50291 - .word 25055 - .word 28661 - .word 31699 - .word 17632 - .word 55823 - .word 18661 - .word 6347 - .word 50508 - .word 58142 - .word 19935 - .word 64799 - .word 17849 - .word 41216 - .word 59562 - .word 42287 - .word 50726 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16006 - .word 65034 - .word 42959 - .word 34185 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 40843 - .word 53953 - .word 46369 - .word 45839 - .word 49160 - .word 0 - .word 0 - .word 0 - .word 54179 - .word 42767 - .word 58812 - .word 64462 - .word 16400 - .word 0 - .word 0 - .word 0 - .word 50676 - .word 3143 - .word 1093 - .word 60276 - .word 49177 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56865 - .word 38982 - .word 63406 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 65273 - .word 45226 - .word 24230 - .word 49857 - .word 23450 - .word 59950 - .word 19796 - .word 17236 - .word 4038 - .word 16755 - .word 26702 - .word 50152 - .word 24087 - .word 51196 - .word 62539 - .word 17533 - .word 25486 - .word 58858 - .word 44079 - .word 50450 - .word 31845 - .word 29909 - .word 37453 - .word 17831 - .word 19699 - .word 12384 - .word 3664 - .word 50750 - .word 26808 - .word 47918 - .word 18611 - .word 18131 - .word 25376 - .word 13791 - .word 62285 - .word 51048 - .word 64886 - .word 33542 - .word 28786 - .word 18433 - .word 54686 - .word 5814 - .word 3500 - .word 51351 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33175 - .word 51870 - .word 55516 - .word 61254 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 3685 - .word 30034 - .word 48430 - .word 40287 - .word 49163 - .word 0 - .word 0 - .word 0 - .word 3323 - .word 33320 - .word 53546 - .word 49572 - .word 16406 - .word 0 - .word 0 - .word 0 - .word 19902 - .word 19517 - .word 60782 - .word 40648 - .word 49186 - .word 0 - .word 0 - .word 0 - .word 28672 - .word 31090 - .word 60187 - .word 37497 - .word 16430 - .word 0 - .word 0 - .word 0 - .word 4362 - .word 57115 - .word 1063 - .word 50082 - .word 17298 - .word 34206 - .word 30558 - .word 17506 - .word 19701 - .word 2977 - .word 30695 - .word 50467 - .word 45209 - .word 25144 - .word 62418 - .word 17892 - .word 6287 - .word 3260 - .word 59477 - .word 50854 - .word 26251 - .word 62311 - .word 23506 - .word 18281 - .word 50215 - .word 3065 - .word 23294 - .word 51244 - .word 519 - .word 28602 - .word 60080 - .word 18671 - .word 56824 - .word 33188 - .word 7096 - .word 51634 - .word 27357 - .word 50961 - .word 5574 - .word 19062 - .word 7770 - .word 52374 - .word 38304 - .word 52025 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33559 - .word 2783 - .word 4720 - .word 38214 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 65291 - .word 24589 - .word 47090 - .word 40315 - .word 49166 - .word 0 - .word 0 - .word 0 - .word 7930 - .word 21505 - .word 15205 - .word 49607 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 61775 - .word 9936 - .word 17817 - .word 40691 - .word 49195 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 37628 - .word 658 - .word 37550 - .word 16442 - .word 0 - .word 0 - .word 0 - .word 14352 - .word 33815 - .word 3114 - .word 50322 - .word 43816 - .word 13363 - .word 33081 - .word 17794 - .word 62601 - .word 27719 - .word 33798 - .word 50803 - .word 1036 - .word 16074 - .word 700 - .word 18277 - .word 33117 - .word 56648 - .word 64173 - .word 51286 - .word 17251 - .word 52492 - .word 29265 - .word 18761 - .word 11155 - .word 27451 - .word 30367 - .word 51772 - .word 7487 - .word 7247 - .word 2371 - .word 19248 - .word 14759 - .word 9929 - .word 13587 - .word 52258 - .word 11730 - .word 26190 - .word 56262 - .word 19733 - .word 56923 - .word 11047 - .word 18072 - .word 52745 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37589 - .word 36570 - .word 62298 - .word 45320 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 17708 - .word 57749 - .word 28642 - .word 45359 - .word 49169 - .word 0 - .word 0 - .word 0 - .word 40067 - .word 38581 - .word 2689 - .word 62790 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 36505 - .word 63458 - .word 34596 - .word 57945 - .word 49204 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 38946 - .word 9029 - .word 60159 - .word 16454 - .word 0 - .word 0 - .word 0 - .word 61014 - .word 7077 - .word 17362 - .word 50576 - .word 11572 - .word 44638 - .word 49972 - .word 18098 - .word 64171 - .word 46242 - .word 17172 - .word 51158 - .word 7607 - .word 1130 - .word 63213 - .word 18682 - .word 20847 - .word 56361 - .word 38627 - .word 51744 - .word 49497 - .word 58620 - .word 43800 - .word 19268 - .word 63056 - .word 11021 - .word 657 - .word 52330 - .word 42127 - .word 49291 - .word 30722 - .word 19856 - .word 13674 - .word 31481 - .word 1908 - .word 52917 - .word 60194 - .word 12516 - .word 3868 - .word 20445 - .word 3386 - .word 31577 - .word 62924 - .word 53506 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44838 - .word 25647 - .word 6736 - .word 62345 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 31560 - .word 12645 - .word 60726 - .word 56699 - .word 49172 - .word 0 - .word 0 - .word 0 - .word 56942 - .word 25011 - .word 17364 - .word 49055 - .word 16425 - .word 0 - .word 0 - .word 0 - .word 3371 - .word 3119 - .word 24466 - .word 56588 - .word 49214 - .word 0 - .word 0 - .word 0 - .word 14336 - .word 15684 - .word 2636 - .word 36719 - .word 16468 - .word 0 - .word 0 - .word 0 - .word 47554 - .word 44810 - .word 53673 - .word 50840 - .word 53371 - .word 50832 - .word 58584 - .word 18417 - .word 46548 - .word 9025 - .word 35353 - .word 51530 - .word 2727 - .word 25780 - .word 5967 - .word 19108 - .word 27113 - .word 1073 - .word 59097 - .word 52222 - .word 11834 - .word 38905 - .word 4058 - .word 19800 - .word 56017 - .word 55971 - .word 60637 - .word 52914 - .word 5287 - .word 8439 - .word 65517 - .word 20493 - .word 37028 - .word 58958 - .word 62480 - .word 53607 - .word 57582 - .word 43721 - .word 1738 - .word 21188 - .word 9819 - .word 37368 - .word 17165 - .word 54304 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13429 - .word 7444 - .word 20593 - .word 34837 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 49742 - .word 37689 - .word 16091 - .word 38981 - .word 49176 - .word 0 - .word 0 - .word 0 - .word 46524 - .word 21314 - .word 39987 - .word 46372 - .word 16432 - .word 0 - .word 0 - .word 0 - .word 14081 - .word 37459 - .word 64348 - .word 36776 - .word 49225 - .word 0 - .word 0 - .word 0 - .word 30720 - .word 57650 - .word 51740 - .word 32812 - .word 16482 - .word 0 - .word 0 - .word 0 - .word 13868 - .word 61714 - .word 32487 - .word 51118 - .word 53288 - .word 8914 - .word 15189 - .word 18750 - .word 25547 - .word 51031 - .word 54157 - .word 51918 - .word 4587 - .word 22569 - .word 2868 - .word 19552 - .word 4628 - .word 56702 - .word 63256 - .word 52720 - .word 60585 - .word 38579 - .word 10763 - .word 20354 - .word 20343 - .word 32825 - .word 42223 - .word 53523 - .word 15259 - .word 21287 - .word 25207 - .word 21157 - .word 19232 - .word 27853 - .word 30722 - .word 54327 - .word 6202 - .word 34921 - .word 46892 - .word 21963 - .word 54314 - .word 63337 - .word 3818 - .word 55135 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12932 - .word 7413 - .word 50416 - .word 52775 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 49070 - .word 42612 - .word 57119 - .word 58471 - .word 49179 - .word 0 - .word 0 - .word 0 - .word 37517 - .word 48554 - .word 12217 - .word 52169 - .word 16439 - .word 0 - .word 0 - .word 0 - .word 3686 - .word 14060 - .word 10284 - .word 62061 - .word 49235 - .word 0 - .word 0 - .word 0 - .word 12288 - .word 36186 - .word 45004 - .word 41528 - .word 16496 - .word 0 - .word 0 - .word 0 - .word 36572 - .word 10708 - .word 62070 - .word 51404 - .word 43863 - .word 23526 - .word 34237 - .word 19093 - .word 49453 - .word 49937 - .word 30100 - .word 52320 - .word 42622 - .word 48103 - .word 45810 - .word 20009 - .word 63343 - .word 18283 - .word 24986 - .word 53236 - .word 211 - .word 7406 - .word 23986 - .word 20928 - .word 55487 - .word 58939 - .word 35978 - .word 54154 - .word 20786 - .word 29108 - .word 45903 - .word 21845 - .word 43676 - .word 27033 - .word 56912 - .word 55073 - .word 56762 - .word 13326 - .word 51569 - .word 22766 - .word 11195 - .word 61166 - .word 50980 - .word 55993 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8176 - .word 5164 - .word 64154 - .word 36090 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 19140 - .word 63711 - .word 39190 - .word 47508 - .word 49183 - .word 0 - .word 0 - .word 0 - .word 61957 - .word 29915 - .word 7046 - .word 34440 - .word 16447 - .word 0 - .word 0 - .word 0 - .word 29909 - .word 15770 - .word 39264 - .word 33288 - .word 49247 - .word 0 - .word 0 - .word 0 - .word 38912 - .word 2108 - .word 35420 - .word 36197 - .word 16511 - .word 0 - .word 0 - .word 0 - .word 63755 - .word 16362 - .word 32791 - .word 51700 - .word 7043 - .word 34288 - .word 50374 - .word 19448 - .word 36869 - .word 13569 - .word 51161 - .word 52734 - .word 30422 - .word 39536 - .word 34368 - .word 20483 - .word 2356 - .word 27571 - .word 10627 - .word 53769 - .word 24204 - .word 35273 - .word 27312 - .word 21520 - .word 8451 - .word 46569 - .word 41820 - .word 54805 - .word 23553 - .word 63476 - .word 47626 - .word 22556 - .word 30024 - .word 47627 - .word 14141 - .word 55843 - .word 22061 - .word 10635 - .word 17534 - .word 23595 - .word 50593 - .word 17237 - .word 38322 - .word 56882 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26357 - .word 41545 - .word 7157 - .word 37888 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 28550 - .word 47270 - .word 51275 - .word 41572 - .word 49187 - .word 0 - .word 0 - .word 0 - .word 7474 - .word 4460 - .word 27226 - .word 52743 - .word 16454 - .word 0 - .word 0 - .word 0 - .word 18816 - .word 51641 - .word 26417 - .word 44610 - .word 49258 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 61733 - .word 61279 - .word 42447 - .word 16526 - .word 0 - .word 0 - .word 0 - .word 45407 - .word 18829 - .word 2399 - .word 52005 - .word 35928 - .word 2098 - .word 15792 - .word 19814 - .word 23614 - .word 62930 - .word 12196 - .word 53160 - .word 7674 - .word 56712 - .word 55660 - .word 20970 - .word 53358 - .word 2019 - .word 18277 - .word 54318 - .word 57563 - .word 186 - .word 18788 - .word 22129 - .word 38957 - .word 32276 - .word 61462 - .word 55475 - .word 46995 - .word 58305 - .word 12150 - .word 23287 - .word 60702 - .word 18274 - .word 9955 - .word 56635 - .word 40407 - .word 43665 - .word 14520 - .word 24448 - .word 50736 - .word 28578 - .word 16181 - .word 57795 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5404 - .word 12511 - .word 60447 - .word 38763 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 42770 - .word 34093 - .word 51209 - .word 39016 - .word 49191 - .word 0 - .word 0 - .word 0 - .word 6888 - .word 59302 - .word 12508 - .word 46457 - .word 16462 - .word 0 - .word 0 - .word 0 - .word 49565 - .word 60790 - .word 42341 - .word 36877 - .word 49270 - .word 0 - .word 0 - .word 0 - .word 28672 - .word 39351 - .word 39031 - .word 32932 - .word 16542 - .word 0 - .word 0 - .word 0 - .word 35933 - .word 37102 - .word 41613 - .word 52318 - .word 59745 - .word 3284 - .word 26050 - .word 20190 - .word 16458 - .word 62792 - .word 1547 - .word 53599 - .word 38519 - .word 37566 - .word 10560 - .word 21472 - .word 36560 - .word 62869 - .word 6875 - .word 54881 - .word 58623 - .word 15626 - .word 21634 - .word 22754 - .word 22503 - .word 3380 - .word 55147 - .word 56163 - .word 21679 - .word 23644 - .word 42908 - .word 24037 - .word 43760 - .word 1032 - .word 52442 - .word 57447 - .word 14782 - .word 45605 - .word 45261 - .word 25322 - .word 22271 - .word 11633 - .word 47287 - .word 58733 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _LRP,@object - .size _LRP,2496 - .align 16 -_RRIB: - .long 4234632914 - .long 3221491298 - .long 2516645996 - .long 3221465084 - .long 798659078 - .long 3221438870 - .long 2133702104 - .long 3221835523 - .long 3164494255 - .long 3221825037 - .long 4195286406 - .long 3221814551 - .long 816546054 - .long 3222285677 - .long 2019136897 - .long 3222284366 - .long 3221727740 - .long 3222283055 - .long 2093868532 - .long 3222538608 - .long 1475393241 - .long 3222538346 - .long 856917950 - .long 3222538084 - .long 2471449286 - .long 3222798751 - .long 629767309 - .long 3222798699 - .long 3083052628 - .long 3222798646 - .long 862741805 - .long 3223060539 - .long 4260232735 - .long 3223060531 - .long 3362756369 - .long 3223060524 - .long 3046734174 - .long 3223322627 - .long 1076409337 - .long 3223322627 - .long 3401051796 - .long 3223322626 - .long 1762435764 - .long 3223453696 - .long 1551329531 - .long 3223453696 - .long 1340223298 - .long 3223453696 - .long 175962963 - .long 3223584768 - .long 155133815 - .long 3223584768 - .long 134304667 - .long 3223584768 - .long 16073407 - .long 3223715840 - .long 14103082 - .long 3223715840 - .long 12132757 - .long 3223715840 - .long 1330068 - .long 3223846912 - .long 1175257 - .long 3223846912 - .long 1020446 - .long 3223846912 - .long 101663 - .long 3223977984 - .long 90404 - .long 3223977984 - .long 79145 - .long 3223977984 - .long 7020 - .long 3224109056 - .long 6457 - .long 3224109056 - .long 5894 - .long 3224109056 - .type _RRIB,@object - .size _RRIB,312 - .space 8, 0x00 # pad - .align 16 -_RRP: - .word 26273 - .word 65347 - .word 56168 - .word 33169 - .word 16329 - .word 0 - .word 0 - .word 0 - .word 899 - .word 31387 - .word 19253 - .word 49663 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 58984 - .word 6058 - .word 23936 - .word 39799 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 62168 - .word 21442 - .word 12332 - .word 46245 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 32619 - .word 37054 - .word 53131 - .word 16575 - .word 61379 - .word 13125 - .word 14178 - .word 16562 - .word 10270 - .word 45115 - .word 37615 - .word 16506 - .word 38745 - .word 51073 - .word 34560 - .word 16498 - .word 53490 - .word 20212 - .word 2544 - .word 16440 - .word 38291 - .word 26669 - .word 54063 - .word 16440 - .word 45779 - .word 11956 - .word 18019 - .word 16540 - .word 18677 - .word 64033 - .word 42794 - .word 16529 - .word 35035 - .word 51098 - .word 10618 - .word 16473 - .word 64107 - .word 31719 - .word 36522 - .word 16468 - .word 8831 - .word 57419 - .word 13215 - .word 16407 - .word 40450 - .word 31904 - .word 29069 - .word 16417 - .word 3821 - .word 29651 - .word 12061 - .word 62640 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 3177 - .word 32099 - .word 13049 - .word 63749 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 10153 - .word 35464 - .word 38075 - .word 52902 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 20859 - .word 27364 - .word 47250 - .word 57481 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 12411 - .word 3381 - .word 24721 - .word 16978 - .word 33723 - .word 48761 - .word 26869 - .word 16934 - .word 60995 - .word 48715 - .word 17741 - .word 16804 - .word 43031 - .word 16238 - .word 40105 - .word 16761 - .word 3889 - .word 41280 - .word 47482 - .word 16635 - .word 43797 - .word 63405 - .word 37827 - .word 16594 - .word 62186 - .word 39109 - .word 61647 - .word 16889 - .word 62356 - .word 27755 - .word 9779 - .word 16848 - .word 54712 - .word 4438 - .word 22518 - .word 16720 - .word 46932 - .word 1372 - .word 7843 - .word 16677 - .word 64555 - .word 14297 - .word 39523 - .word 16553 - .word 24913 - .word 15735 - .word 26400 - .word 16514 - .word 23128 - .word 31275 - .word 33489 - .word 52246 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 56543 - .word 37040 - .word 59300 - .word 54866 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 35342 - .word 2554 - .word 44652 - .word 41504 - .word 16391 - .word 0 - .word 0 - .word 0 - .word 60438 - .word 21728 - .word 35033 - .word 43725 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 2425 - .word 35124 - .word 13908 - .word 17426 - .word 60985 - .word 47869 - .word 25665 - .word 17352 - .word 21213 - .word 45459 - .word 26876 - .word 17133 - .word 52591 - .word 14597 - .word 24526 - .word 17060 - .word 20426 - .word 18941 - .word 5374 - .word 16845 - .word 38724 - .word 49064 - .word 24125 - .word 16773 - .word 29994 - .word 36366 - .word 21088 - .word 17279 - .word 13269 - .word 25406 - .word 24800 - .word 17205 - .word 56893 - .word 35190 - .word 33689 - .word 16988 - .word 18235 - .word 52539 - .word 13276 - .word 16916 - .word 8454 - .word 46451 - .word 9758 - .word 16704 - .word 59084 - .word 57882 - .word 27928 - .word 16633 - .word 38110 - .word 57460 - .word 5118 - .word 49980 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 32056 - .word 19825 - .word 28737 - .word 63161 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 37650 - .word 4479 - .word 6518 - .word 59238 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 47963 - .word 64405 - .word 49841 - .word 37534 - .word 16402 - .word 0 - .word 0 - .word 0 - .word 53082 - .word 25478 - .word 58397 - .word 17968 - .word 35980 - .word 11362 - .word 59289 - .word 17858 - .word 37178 - .word 29007 - .word 44012 - .word 17530 - .word 40762 - .word 17715 - .word 56491 - .word 17422 - .word 58318 - .word 3223 - .word 43216 - .word 17097 - .word 46157 - .word 23530 - .word 32141 - .word 16991 - .word 63138 - .word 35190 - .word 24151 - .word 17748 - .word 9862 - .word 36309 - .word 14376 - .word 17639 - .word 38034 - .word 65220 - .word 2337 - .word 17314 - .word 16819 - .word 31850 - .word 22525 - .word 17205 - .word 7604 - .word 29558 - .word 57367 - .word 16883 - .word 27719 - .word 62170 - .word 8797 - .word 16778 - .word 19348 - .word 65423 - .word 37299 - .word 53534 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 8233 - .word 55180 - .word 9457 - .word 46319 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 43066 - .word 26574 - .word 6722 - .word 65137 - .word 16400 - .word 0 - .word 0 - .word 0 - .word 4285 - .word 7102 - .word 7454 - .word 61224 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 1453 - .word 4915 - .word 61926 - .word 18584 - .word 43088 - .word 28644 - .word 50480 - .word 18434 - .word 16532 - .word 18100 - .word 54137 - .word 17983 - .word 49885 - .word 46980 - .word 54409 - .word 17832 - .word 24326 - .word 38273 - .word 20489 - .word 17385 - .word 28149 - .word 12270 - .word 61982 - .word 17236 - .word 4581 - .word 37632 - .word 45525 - .word 18282 - .word 46626 - .word 30655 - .word 34430 - .word 18132 - .word 63429 - .word 60638 - .word 37201 - .word 17683 - .word 18031 - .word 50879 - .word 14891 - .word 17535 - .word 64064 - .word 1811 - .word 54229 - .word 17089 - .word 27163 - .word 21077 - .word 40059 - .word 16943 - .word 43177 - .word 42972 - .word 46613 - .word 45511 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 51480 - .word 49923 - .word 15697 - .word 40352 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 9513 - .word 31676 - .word 11989 - .word 49652 - .word 16406 - .word 0 - .word 0 - .word 0 - .word 30527 - .word 7034 - .word 38319 - .word 40746 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 7022 - .word 27009 - .word 58741 - .word 19257 - .word 64033 - .word 16049 - .word 22023 - .word 19062 - .word 45243 - .word 42262 - .word 39716 - .word 18476 - .word 50731 - .word 20793 - .word 36853 - .word 18281 - .word 36100 - .word 48270 - .word 37858 - .word 17699 - .word 42104 - .word 28941 - .word 36380 - .word 17506 - .word 23499 - .word 6717 - .word 19492 - .word 18866 - .word 55911 - .word 14060 - .word 7353 - .word 18672 - .word 26519 - .word 16988 - .word 4787 - .word 18087 - .word 28065 - .word 5309 - .word 5697 - .word 17893 - .word 40193 - .word 22022 - .word 5795 - .word 17314 - .word 8456 - .word 42078 - .word 24130 - .word 17122 - .word 59016 - .word 62162 - .word 39673 - .word 39540 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 38154 - .word 49049 - .word 18422 - .word 40324 - .word 16398 - .word 0 - .word 0 - .word 0 - .word 42164 - .word 50610 - .word 50330 - .word 49617 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 25875 - .word 59750 - .word 15469 - .word 40704 - .word 16427 - .word 0 - .word 0 - .word 0 - .word 34173 - .word 58862 - .word 54392 - .word 19977 - .word 59819 - .word 8454 - .word 18296 - .word 19734 - .word 30024 - .word 20882 - .word 32589 - .word 19004 - .word 29754 - .word 31085 - .word 31060 - .word 18761 - .word 52191 - .word 27376 - .word 34749 - .word 18035 - .word 4562 - .word 4929 - .word 33854 - .word 17794 - .word 25001 - .word 9100 - .word 13901 - .word 19490 - .word 47424 - .word 1290 - .word 2840 - .word 19248 - .word 22386 - .word 25633 - .word 77 - .word 18519 - .word 15514 - .word 17548 - .word 1870 - .word 18277 - .word 63012 - .word 41083 - .word 3742 - .word 17554 - .word 48968 - .word 51531 - .word 22462 - .word 17314 - .word 41404 - .word 42732 - .word 62757 - .word 38778 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 7009 - .word 42712 - .word 36892 - .word 45360 - .word 16401 - .word 0 - .word 0 - .word 0 - .word 39847 - .word 2109 - .word 39294 - .word 62791 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 32179 - .word 43914 - .word 44915 - .word 57947 - .word 16436 - .word 0 - .word 0 - .word 0 - .word 27779 - .word 16034 - .word 51140 - .word 20738 - .word 17003 - .word 57008 - .word 53620 - .word 20444 - .word 23469 - .word 38349 - .word 865 - .word 19562 - .word 25226 - .word 11109 - .word 43957 - .word 19268 - .word 36845 - .word 29881 - .word 17299 - .word 18390 - .word 19837 - .word 16116 - .word 50064 - .word 18098 - .word 57862 - .word 29290 - .word 2992 - .word 20149 - .word 46818 - .word 59090 - .word 31382 - .word 19856 - .word 61466 - .word 30954 - .word 38749 - .word 18976 - .word 30984 - .word 39998 - .word 63388 - .word 18682 - .word 41543 - .word 16681 - .word 17428 - .word 17808 - .word 20643 - .word 64049 - .word 24643 - .word 17517 - .word 52468 - .word 15578 - .word 48717 - .word 44571 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 54595 - .word 6191 - .word 4821 - .word 56700 - .word 16404 - .word 0 - .word 0 - .word 0 - .word 50514 - .word 10282 - .word 25695 - .word 49055 - .word 16425 - .word 0 - .word 0 - .word 0 - .word 13176 - .word 11594 - .word 38881 - .word 56588 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 28019 - .word 59660 - .word 42453 - .word 21536 - .word 50810 - .word 20541 - .word 28938 - .word 21188 - .word 53928 - .word 47752 - .word 60679 - .word 20146 - .word 24270 - .word 60826 - .word 4097 - .word 19800 - .word 57327 - .word 59875 - .word 35368 - .word 18762 - .word 31038 - .word 58486 - .word 58593 - .word 18417 - .word 41074 - .word 26743 - .word 60755 - .word 20839 - .word 49334 - .word 8669 - .word 63919 - .word 20493 - .word 20472 - .word 19395 - .word 59120 - .word 19454 - .word 27230 - .word 61299 - .word 5980 - .word 19108 - .word 60536 - .word 14479 - .word 53684 - .word 18072 - .word 24589 - .word 24698 - .word 60903 - .word 17729 - .word 24724 - .word 11272 - .word 24781 - .word 60135 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 54850 - .word 34200 - .word 16766 - .word 38981 - .word 16408 - .word 0 - .word 0 - .word 0 - .word 58717 - .word 18738 - .word 40849 - .word 46372 - .word 16432 - .word 0 - .word 0 - .word 0 - .word 11614 - .word 63671 - .word 65373 - .word 36776 - .word 16457 - .word 0 - .word 0 - .word 0 - .word 54464 - .word 24503 - .word 3823 - .word 22367 - .word 6780 - .word 11041 - .word 46896 - .word 21963 - .word 31922 - .word 33372 - .word 42225 - .word 20755 - .word 24666 - .word 18144 - .word 10765 - .word 20354 - .word 1690 - .word 51390 - .word 54159 - .word 19150 - .word 40728 - .word 53860 - .word 15190 - .word 18750 - .word 62163 - .word 16835 - .word 30725 - .word 21559 - .word 49586 - .word 46435 - .word 25209 - .word 21157 - .word 392 - .word 18629 - .word 63258 - .word 19952 - .word 57023 - .word 35208 - .word 2869 - .word 19552 - .word 15849 - .word 23514 - .word 32489 - .word 18350 - .word 45455 - .word 56342 - .word 1433 - .word 17952 - .word 26203 - .word 24931 - .word 14914 - .word 64372 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 32494 - .word 4334 - .word 57160 - .word 58471 - .word 16411 - .word 0 - .word 0 - .word 0 - .word 38313 - .word 48554 - .word 12217 - .word 52169 - .word 16439 - .word 0 - .word 0 - .word 0 - .word 13841 - .word 14060 - .word 10284 - .word 62061 - .word 16467 - .word 0 - .word 0 - .word 0 - .word 27928 - .word 25887 - .word 22600 - .word 23226 - .word 25867 - .word 43031 - .word 24792 - .word 22767 - .word 61361 - .word 28179 - .word 36008 - .word 21386 - .word 1901 - .word 19713 - .word 23997 - .word 20928 - .word 53849 - .word 49977 - .word 30100 - .word 19552 - .word 12987 - .word 23545 - .word 34237 - .word 19093 - .word 36035 - .word 18526 - .word 55738 - .word 22305 - .word 4173 - .word 53170 - .word 44844 - .word 21845 - .word 20134 - .word 6065 - .word 24986 - .word 20468 - .word 63684 - .word 40633 - .word 45810 - .word 20009 - .word 28281 - .word 10708 - .word 62070 - .word 18636 - .word 42557 - .word 63889 - .word 18197 - .word 18180 - .word 24464 - .word 43564 - .word 52277 - .word 36083 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 8651 - .word 37688 - .word 39193 - .word 47508 - .word 16415 - .word 0 - .word 0 - .word 0 - .word 61957 - .word 29915 - .word 7046 - .word 34440 - .word 16447 - .word 0 - .word 0 - .word 0 - .word 29909 - .word 15770 - .word 39264 - .word 33288 - .word 16479 - .word 0 - .word 0 - .word 0 - .word 16042 - .word 19253 - .word 38322 - .word 24114 - .word 28448 - .word 10617 - .word 17534 - .word 23595 - .word 64229 - .word 46570 - .word 41820 - .word 22037 - .word 23727 - .word 35273 - .word 27312 - .word 21520 - .word 36874 - .word 13569 - .word 51161 - .word 19966 - .word 7043 - .word 34288 - .word 50374 - .word 19448 - .word 38316 - .word 47529 - .word 14141 - .word 23075 - .word 12297 - .word 63477 - .word 47626 - .word 22556 - .word 1229 - .word 27571 - .word 10627 - .word 21001 - .word 30426 - .word 39536 - .word 34368 - .word 20483 - .word 63755 - .word 16362 - .word 32791 - .word 18932 - .word 1939 - .word 19329 - .word 44209 - .word 18417 - .word 1291 - .word 6677 - .word 4999 - .word 37888 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 36671 - .word 58224 - .word 51275 - .word 41572 - .word 16419 - .word 0 - .word 0 - .word 0 - .word 7476 - .word 4460 - .word 27226 - .word 52743 - .word 16454 - .word 0 - .word 0 - .word 0 - .word 18838 - .word 51641 - .word 26417 - .word 44610 - .word 16490 - .word 0 - .word 0 - .word 0 - .word 10710 - .word 48640 - .word 32083 - .word 25027 - .word 33620 - .word 55766 - .word 26236 - .word 24448 - .word 24667 - .word 39142 - .word 61464 - .word 22707 - .word 56170 - .word 8470 - .word 18789 - .word 22129 - .word 23296 - .word 62931 - .word 12196 - .word 20392 - .word 57231 - .word 2098 - .word 15792 - .word 19814 - .word 1704 - .word 49608 - .word 9547 - .word 23867 - .word 46419 - .word 24648 - .word 11891 - .word 23287 - .word 19376 - .word 1296 - .word 18277 - .word 21550 - .word 46223 - .word 56399 - .word 55660 - .word 20970 - .word 45364 - .word 18829 - .word 2399 - .word 19237 - .word 9387 - .word 60414 - .word 47613 - .word 18660 - .type _RRP,@object - .size _RRP,2080 - .align 16 -_LN_SQRT_TWO_PI: - .word 42293 - .word 9717 - .word 36419 - .word 60223 - .word 16382 - .word 0 - .type _LN_SQRT_TWO_PI,@object - .size _LN_SQRT_TWO_PI,12 - .space 4, 0x00 # pad - .align 16 -_W2: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16379 - .word 0 - .type _W2,@object - .size _W2,12 - .space 4, 0x00 # pad - .align 16 -_S10: - .word 26777 - .word 63736 - .word 61426 - .word 52480 - .word 49148 - .word 0 - .type _S10,@object - .size _S10,12 - .space 4, 0x00 # pad - .align 16 -_S06: - .word 26251 - .word 64205 - .word 25991 - .word 44448 - .word 49149 - .word 0 - .type _S06,@object - .size _S06,12 - .space 4, 0x00 # pad - .align 16 -_S02: - .word 39072 - .word 38974 - .word 13074 - .word 53901 - .word 49151 - .word 0 - .type _S02,@object - .size _S02,12 - .space 4, 0x00 # pad - .align 16 -_S12: - .word 13864 - .word 61389 - .word 41932 - .word 43701 - .word 49148 - .word 0 - .type _S12,@object - .size _S12,12 - .space 4, 0x00 # pad - .align 16 -_S08: - .word 6565 - .word 12686 - .word 39772 - .word 32901 - .word 49149 - .word 0 - .type _S08,@object - .size _S08,12 - .space 4, 0x00 # pad - .align 16 -_S04: - .word 60211 - .word 16071 - .word 37206 - .word 35465 - .word 49150 - .word 0 - .type _S04,@object - .size _S04,12 - .space 4, 0x00 # pad - .align 16 -_A: - .long 0 - .long 1074790400 - .long 0 - .long 1075838976 - .long 0 - .long 1076887552 - .long 0 - .long 1077936128 - .long 0 - .long 1078984704 - .long 0 - .long 1080033280 - .long 0 - .long 1081081856 - .type _A,@object - .size _A,56 - .space 8, 0x00 # pad - .align 16 -_B: - .long 0 - .long 1070596096 - .long 0 - .long 1069547520 - .long 0 - .long 1068498944 - .long 0 - .long 1067450368 - .long 0 - .long 1066401792 - .long 0 - .long 1065353216 - .long 0 - .long 1064304640 - .type _B,@object - .size _B,56 - .space 8, 0x00 # pad - .align 16 -_C5: - .word 65250 - .word 31226 - .word 64195 - .word 51294 - .word 16385 - .word 0 - .word 2062 - .word 11523 - .word 15490 - .word 40735 - .word 49153 - .word 0 - .word 32754 - .word 31980 - .word 31403 - .word 49421 - .word 16385 - .word 0 - .word 43174 - .word 39951 - .word 44282 - .word 37916 - .word 49153 - .word 0 - .word 17740 - .word 24638 - .word 31711 - .word 45907 - .word 16385 - .word 0 - .word 40119 - .word 37337 - .word 13155 - .word 65076 - .word 49152 - .word 0 - .word 17604 - .word 23486 - .word 20029 - .word 41172 - .word 16385 - .word 0 - .word 33185 - .word 5727 - .word 44714 - .word 50187 - .word 49152 - .word 0 - .word 59315 - .word 25153 - .word 8859 - .word 35740 - .word 16385 - .word 0 - .word 56975 - .word 59828 - .word 57702 - .word 65082 - .word 49151 - .word 0 - .word 44451 - .word 24185 - .word 18874 - .word 60288 - .word 16384 - .word 0 - .word 63603 - .word 63450 - .word 63770 - .word 55108 - .word 49150 - .word 0 - .word 29224 - .word 39171 - .word 38378 - .word 49676 - .word 16384 - .word 0 - .word 11522 - .word 59843 - .word 6225 - .word 34695 - .word 16381 - .word 0 - .word 52920 - .word 16467 - .word 35974 - .word 40266 - .word 16384 - .word 0 - .word 32911 - .word 20526 - .word 49212 - .word 40083 - .word 16383 - .word 0 - .word 50633 - .word 19120 - .word 5716 - .word 64631 - .word 16383 - .word 0 - .word 27278 - .word 20509 - .word 60679 - .word 63371 - .word 16383 - .word 0 - .word 47711 - .word 23018 - .word 38994 - .word 51179 - .word 16383 - .word 0 - .word 57200 - .word 35818 - .word 16826 - .word 37630 - .word 16384 - .word 0 - .word 2413 - .word 19605 - .word 64315 - .word 49218 - .word 16381 - .word 0 - .word 41670 - .word 6403 - .word 34702 - .word 40993 - .word 16383 - .word 0 - .word 6011 - .word 2134 - .word 32659 - .word 52266 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42605 - .word 32107 - .word 35187 - .word 43545 - .word 16382 - .word 0 - .word 3574 - .word 60450 - .word 45882 - .word 53610 - .word 16383 - .word 0 - .word 2808 - .word 20835 - .word 5027 - .word 56256 - .word 16383 - .word 0 - .word 3021 - .word 28181 - .word 33636 - .word 39028 - .word 16384 - .word 0 - .word 14493 - .word 33433 - .word 18281 - .word 35725 - .word 16384 - .word 0 - .word 39323 - .word 51299 - .word 2596 - .word 32961 - .word 16384 - .word 0 - .word 28336 - .word 24032 - .word 53553 - .word 44237 - .word 16384 - .word 0 - .word 52853 - .word 63658 - .word 36534 - .word 41882 - .word 16383 - .word 0 - .word 47917 - .word 51227 - .word 19034 - .word 54081 - .word 16384 - .word 0 - .word 51044 - .word 31166 - .word 18963 - .word 37856 - .word 16381 - .word 0 - .word 35962 - .word 40199 - .word 871 - .word 65049 - .word 16384 - .word 0 - .word 39889 - .word 54182 - .word 40011 - .word 55797 - .word 49150 - .word 0 - .word 29169 - .word 47361 - .word 8730 - .word 38268 - .word 16385 - .word 0 - .word 39706 - .word 37143 - .word 20168 - .word 33289 - .word 49152 - .word 0 - .word 16433 - .word 42895 - .word 21426 - .word 43820 - .word 16385 - .word 0 - .word 1625 - .word 9463 - .word 65082 - .word 51468 - .word 49152 - .word 0 - .word 58247 - .word 1594 - .word 2790 - .word 48648 - .word 16385 - .word 0 - .word 20868 - .word 31765 - .word 34026 - .word 33401 - .word 49153 - .word 0 - .word 23737 - .word 4448 - .word 39427 - .word 52225 - .word 16385 - .word 0 - .word 3456 - .word 40222 - .word 65015 - .word 38939 - .word 49153 - .word 0 - .word 35551 - .word 41260 - .word 40325 - .word 54131 - .word 16385 - .word 0 - .word 8973 - .word 47485 - .word 2472 - .word 41842 - .word 49153 - .word 0 - .word 43053 - .word 31703 - .word 19755 - .word 33274 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36731 - .word 27611 - .word 11212 - .word 55816 - .word 16382 - .word 0 - .word 63893 - .word 30149 - .word 45246 - .word 60594 - .word 16383 - .word 0 - .word 47198 - .word 37666 - .word 57801 - .word 61119 - .word 16383 - .word 0 - .word 25856 - .word 56265 - .word 35798 - .word 40402 - .word 16384 - .word 0 - .word 6470 - .word 34102 - .word 54471 - .word 38654 - .word 16384 - .word 0 - .word 9295 - .word 39366 - .word 17179 - .word 34081 - .word 16384 - .word 0 - .word 45822 - .word 31766 - .word 42784 - .word 47587 - .word 16384 - .word 0 - .word 5059 - .word 11140 - .word 37473 - .word 43359 - .word 16383 - .word 0 - .word 58055 - .word 60744 - .word 5900 - .word 57832 - .word 16384 - .word 0 - .word 38212 - .word 45613 - .word 58947 - .word 40054 - .word 16381 - .word 0 - .word 7938 - .word 56610 - .word 27106 - .word 34591 - .word 16385 - .word 0 - .word 32824 - .word 16764 - .word 60057 - .word 56720 - .word 49150 - .word 0 - .word 10908 - .word 30532 - .word 62164 - .word 40510 - .word 16385 - .word 0 - .word 63750 - .word 13029 - .word 27501 - .word 34026 - .word 49152 - .word 0 - .word 33477 - .word 11068 - .word 13144 - .word 46215 - .word 16385 - .word 0 - .word 42530 - .word 57434 - .word 58521 - .word 52671 - .word 49152 - .word 0 - .word 18986 - .word 9605 - .word 39740 - .word 51163 - .word 16385 - .word 0 - .word 28928 - .word 13634 - .word 42974 - .word 34196 - .word 49153 - .word 0 - .word 35215 - .word 30142 - .word 47225 - .word 54824 - .word 16385 - .word 0 - .word 28719 - .word 4316 - .word 52012 - .word 39873 - .word 49153 - .word 0 - .word 4508 - .word 8703 - .word 27075 - .word 56773 - .word 16385 - .word 0 - .word 26288 - .word 30246 - .word 8808 - .word 42848 - .word 49153 - .word 0 - .word 44455 - .word 3575 - .word 25942 - .word 45691 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2794 - .word 62330 - .word 8461 - .word 63853 - .word 16382 - .word 0 - .word 21479 - .word 44765 - .word 7865 - .word 64840 - .word 16383 - .word 0 - .word 31874 - .word 33681 - .word 56423 - .word 65041 - .word 16383 - .word 0 - .word 21473 - .word 44172 - .word 64358 - .word 41494 - .word 16384 - .word 0 - .word 32222 - .word 10523 - .word 55592 - .word 40956 - .word 16384 - .word 0 - .word 21434 - .word 30837 - .word 63797 - .word 34911 - .word 16384 - .word 0 - .word 39649 - .word 32992 - .word 36682 - .word 50257 - .word 16384 - .word 0 - .word 13095 - .word 39473 - .word 7384 - .word 44359 - .word 16383 - .word 0 - .word 31843 - .word 64809 - .word 59872 - .word 60895 - .word 16384 - .word 0 - .word 8672 - .word 5021 - .word 16314 - .word 40945 - .word 16381 - .word 0 - .word 39714 - .word 18801 - .word 4723 - .word 36324 - .word 16385 - .word 0 - .word 614 - .word 42734 - .word 5731 - .word 57950 - .word 49150 - .word 0 - .word 64434 - .word 24821 - .word 2679 - .word 42435 - .word 16385 - .word 0 - .word 12194 - .word 23846 - .word 20957 - .word 34750 - .word 49152 - .word 0 - .word 10830 - .word 21930 - .word 2400 - .word 48308 - .word 16385 - .word 0 - .word 22166 - .word 52453 - .word 43476 - .word 53777 - .word 49152 - .word 0 - .word 47257 - .word 46311 - .word 24367 - .word 53391 - .word 16385 - .word 0 - .word 54217 - .word 40926 - .word 61378 - .word 34907 - .word 49153 - .word 0 - .word 63951 - .word 56465 - .word 60729 - .word 57145 - .word 16385 - .word 0 - .word 26614 - .word 13946 - .word 18662 - .word 40698 - .word 49153 - .word 0 - .word 1838 - .word 12847 - .word 15941 - .word 59142 - .word 16385 - .word 0 - .word 4759 - .word 49273 - .word 38799 - .word 43731 - .word 49153 - .word 0 - .word 26568 - .word 56798 - .word 57629 - .word 34217 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25804 - .word 39657 - .word 51638 - .word 34652 - .word 16383 - .word 0 - .word 2771 - .word 24731 - .word 11874 - .word 33806 - .word 16384 - .word 0 - .word 19474 - .word 34269 - .word 14010 - .word 33912 - .word 16384 - .word 0 - .word 56824 - .word 53459 - .word 23053 - .word 42279 - .word 16384 - .word 0 - .word 18742 - .word 13031 - .word 52011 - .word 42483 - .word 16384 - .word 0 - .word 5937 - .word 64580 - .word 50859 - .word 35501 - .word 16384 - .word 0 - .word 23055 - .word 38603 - .word 6524 - .word 51938 - .word 16384 - .word 0 - .word 3664 - .word 27625 - .word 50793 - .word 45121 - .word 16383 - .word 0 - .word 52489 - .word 3557 - .word 32438 - .word 62735 - .word 16384 - .word 0 - .word 894 - .word 16203 - .word 51477 - .word 42152 - .word 16381 - .word 0 - .word 34963 - .word 47118 - .word 6430 - .word 37322 - .word 16385 - .word 0 - .word 26422 - .word 42936 - .word 42081 - .word 58310 - .word 49150 - .word 0 - .word 13130 - .word 21399 - .word 54693 - .word 43505 - .word 16385 - .word 0 - .word 30323 - .word 50910 - .word 30337 - .word 35076 - .word 49152 - .word 0 - .word 38115 - .word 10576 - .word 10000 - .word 49442 - .word 16385 - .word 0 - .word 37599 - .word 18432 - .word 63354 - .word 54317 - .word 49152 - .word 0 - .word 58822 - .word 42699 - .word 64187 - .word 54575 - .word 16385 - .word 0 - .word 64288 - .word 61574 - .word 23831 - .word 35266 - .word 49153 - .word 0 - .word 11805 - .word 33285 - .word 40274 - .word 58365 - .word 16385 - .word 0 - .word 20167 - .word 739 - .word 36989 - .word 41119 - .word 49153 - .word 0 - .word 62447 - .word 46690 - .word 58491 - .word 60379 - .word 16385 - .word 0 - .word 1463 - .word 47000 - .word 35484 - .word 44185 - .word 49153 - .word 0 - .word 64817 - .word 40328 - .word 40776 - .word 61320 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60250 - .word 42976 - .word 52322 - .word 36598 - .word 16383 - .word 0 - .word 26918 - .word 53639 - .word 1629 - .word 34777 - .word 16384 - .word 0 - .word 192 - .word 43979 - .word 65472 - .word 34978 - .word 16384 - .word 0 - .word 52261 - .word 56023 - .word 49807 - .word 42881 - .word 16384 - .word 0 - .word 1627 - .word 46939 - .word 43260 - .word 43630 - .word 16384 - .word 0 - .word 60557 - .word 13735 - .word 20430 - .word 35946 - .word 16384 - .word 0 - .word 37731 - .word 15708 - .word 47147 - .word 53188 - .word 16384 - .word 0 - .word 21753 - .word 29315 - .word 41089 - .word 45691 - .word 16383 - .word 0 - .word 6001 - .word 56966 - .word 64901 - .word 64096 - .word 16384 - .word 0 - .word 60203 - .word 9392 - .word 60017 - .word 43055 - .word 16381 - .word 0 - .word 63698 - .word 8838 - .word 668 - .word 38058 - .word 16385 - .word 0 - .word 63354 - .word 11979 - .word 38628 - .word 58569 - .word 49150 - .word 0 - .word 14495 - .word 23154 - .word 18917 - .word 44293 - .word 16385 - .word 0 - .word 21391 - .word 34042 - .word 43308 - .word 35313 - .word 49152 - .word 0 - .word 19364 - .word 56057 - .word 34969 - .word 50274 - .word 16385 - .word 0 - .word 24688 - .word 56191 - .word 53239 - .word 54710 - .word 49152 - .word 0 - .word 29387 - .word 5660 - .word 12964 - .word 55444 - .word 16385 - .word 0 - .word 35686 - .word 64227 - .word 46433 - .word 35526 - .word 49153 - .word 0 - .word 36666 - .word 59843 - .word 47733 - .word 59258 - .word 16385 - .word 0 - .word 36678 - .word 17293 - .word 20572 - .word 41425 - .word 49153 - .word 0 - .word 18431 - .word 63251 - .word 49151 - .word 61285 - .word 16385 - .word 0 - .word 60545 - .word 37455 - .word 56348 - .word 44514 - .word 49153 - .word 0 - .word 37261 - .word 1613 - .word 29792 - .word 57954 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15271 - .word 17124 - .word 50042 - .word 38057 - .word 16383 - .word 0 - .word 7933 - .word 60764 - .word 31972 - .word 35498 - .word 16384 - .word 0 - .word 36698 - .word 903 - .word 21735 - .word 35834 - .word 16384 - .word 0 - .word 61921 - .word 64342 - .word 37428 - .word 43367 - .word 16384 - .word 0 - .word 25723 - .word 57108 - .word 17005 - .word 44538 - .word 16384 - .word 0 - .word 55361 - .word 30601 - .word 552 - .word 36302 - .word 16384 - .word 0 - .word 60144 - .word 14680 - .word 32635 - .word 54172 - .word 16384 - .word 0 - .word 56958 - .word 12456 - .word 10479 - .word 46147 - .word 16383 - .word 0 - .word 483 - .word 34108 - .word 14727 - .word 65164 - .word 16384 - .word 0 - .word 43794 - .word 49057 - .word 50532 - .word 43789 - .word 16381 - .word 0 - .word 12225 - .word 29228 - .word 35085 - .word 38633 - .word 16385 - .word 0 - .word 54219 - .word 64754 - .word 11030 - .word 58760 - .word 49150 - .word 0 - .word 52932 - .word 63137 - .word 8758 - .word 44908 - .word 16385 - .word 0 - .word 27270 - .word 37632 - .word 62601 - .word 35495 - .word 49152 - .word 0 - .word 53773 - .word 63879 - .word 47305 - .word 50923 - .word 16385 - .word 0 - .word 29965 - .word 53650 - .word 14162 - .word 55014 - .word 49152 - .word 0 - .word 10444 - .word 24307 - .word 52989 - .word 56120 - .word 16385 - .word 0 - .word 12949 - .word 6021 - .word 2059 - .word 35728 - .word 49153 - .word 0 - .word 41140 - .word 26313 - .word 26076 - .word 59954 - .word 16385 - .word 0 - .word 53675 - .word 12584 - .word 54309 - .word 41661 - .word 49153 - .word 0 - .word 28849 - .word 13964 - .word 11627 - .word 61991 - .word 16385 - .word 0 - .word 33057 - .word 63851 - .word 41026 - .word 44769 - .word 49153 - .word 0 - .word 61939 - .word 60366 - .word 37868 - .word 56319 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _C5,@object - .size _C5,2016 - .align 16 -_C4: - .word 39764 - .word 13333 - .word 46799 - .word 55432 - .word 16385 - .word 0 - .word 6306 - .word 35111 - .word 59607 - .word 63624 - .word 49153 - .word 0 - .word 40772 - .word 10749 - .word 40067 - .word 48311 - .word 16382 - .word 0 - .word 17977 - .word 41258 - .word 10043 - .word 63023 - .word 16381 - .word 0 - .word 17757 - .word 54940 - .word 38650 - .word 52104 - .word 16384 - .word 0 - .word 36152 - .word 14316 - .word 50442 - .word 43322 - .word 49148 - .word 0 - .word 48990 - .word 25502 - .word 42020 - .word 58640 - .word 16385 - .word 0 - .word 57431 - .word 49505 - .word 17362 - .word 46284 - .word 49151 - .word 0 - .word 34483 - .word 2420 - .word 54299 - .word 50782 - .word 16386 - .word 0 - .word 37575 - .word 3091 - .word 26415 - .word 50860 - .word 49152 - .word 0 - .word 5185 - .word 25440 - .word 63351 - .word 37946 - .word 16387 - .word 0 - .word 37934 - .word 12918 - .word 47534 - .word 41618 - .word 49153 - .word 0 - .word 59537 - .word 51974 - .word 16286 - .word 51369 - .word 16387 - .word 0 - .word 31611 - .word 51820 - .word 58572 - .word 58708 - .word 49153 - .word 0 - .word 57757 - .word 54077 - .word 23114 - .word 64558 - .word 16387 - .word 0 - .word 63584 - .word 48263 - .word 62815 - .word 37616 - .word 49154 - .word 0 - .word 281 - .word 14439 - .word 46939 - .word 38182 - .word 16388 - .word 0 - .word 63169 - .word 10307 - .word 53265 - .word 44896 - .word 49154 - .word 0 - .word 22654 - .word 54923 - .word 22649 - .word 42855 - .word 16388 - .word 0 - .word 37607 - .word 64061 - .word 25856 - .word 50581 - .word 49154 - .word 0 - .word 47296 - .word 11647 - .word 64103 - .word 45853 - .word 16388 - .word 0 - .word 30544 - .word 55384 - .word 11467 - .word 54194 - .word 49154 - .word 0 - .word 39553 - .word 55407 - .word 30581 - .word 33698 - .word 49111 - .word 0 - .type _C4,@object - .size _C4,276 - .space 12, 0x00 # pad - .align 16 -_C3: - .word 28854 - .word 1182 - .word 12345 - .word 55415 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 12848 - .word 12413 - .word 26149 - .word 42266 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 13313 - .word 43952 - .word 210 - .word 35312 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 13187 - .word 60452 - .word 5475 - .word 43161 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 20972 - .word 51120 - .word 32272 - .word 61954 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 22296 - .word 60123 - .word 44502 - .word 16231 - .word 21517 - .word 49855 - .word 35525 - .word 48979 - .word 44698 - .word 63620 - .word 45930 - .word 16192 - .word 34147 - .word 51190 - .word 16340 - .word 48941 - .word 42301 - .word 55313 - .word 4730 - .word 16154 - .word 35999 - .word 24973 - .word 36325 - .word 48903 - .word 63277 - .word 55760 - .word 33014 - .word 16117 - .word 6314 - .word 46281 - .word 52205 - .word 48867 - .word 12513 - .word 17037 - .word 21130 - .word 16082 - .word 49946 - .word 1999 - .word 4813 - .word 48833 - .word 595 - .word 34534 - .word 265 - .word 16049 - .word 36690 - .word 64093 - .word 7546 - .word 48800 - .type _C3,@object - .size _C3,176 - .align 16 -_LM: - .word 64512 - .word 46577 - .word 49946 - .word 47894 - .word 16383 - .word 0 - .type _LM,@object - .size _LM,12 - .space 4, 0x00 # pad - .align 16 -_LGAMMA_C2: - .word 3599 - .word 7250 - .word 52710 - .word 63693 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 31159 - .word 473 - .word 17060 - .word 35466 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 23705 - .word 29125 - .word 24135 - .word 63417 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 8259 - .word 13793 - .word 15470 - .word 38689 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 1592 - .word 43035 - .word 5286 - .word 33882 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 34241 - .word 35161 - .word 18170 - .word 34381 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 17215 - .word 38817 - .word 26343 - .word 16274 - .word 43407 - .word 38166 - .word 8095 - .word 49029 - .word 9256 - .word 10755 - .word 64736 - .word 16248 - .word 19293 - .word 8064 - .word 12058 - .word 49006 - .word 55284 - .word 28504 - .word 33554 - .word 16226 - .word 50892 - .word 40251 - .word 63876 - .word 48982 - .word 34903 - .word 32886 - .word 50950 - .word 16204 - .word 5270 - .word 55866 - .word 9779 - .word 48962 - .word 8284 - .word 46907 - .word 3681 - .word 16183 - .word 12968 - .word 35363 - .word 2442 - .word 48942 - .word 52637 - .word 49970 - .word 50463 - .word 16163 - .word 28134 - .word 34361 - .word 26628 - .word 48914 - .type _LGAMMA_C2,@object - .size _LGAMMA_C2,192 - .align 16 -_C1: - .word 51111 - .word 32176 - .word 26595 - .word 37828 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 38980 - .word 38974 - .word 13074 - .word 53901 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30416 - .word 21910 - .word 43743 - .word 52518 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 47709 - .word 16075 - .word 37206 - .word 35465 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 15719 - .word 21694 - .word 57533 - .word 54364 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 13628 - .word 45309 - .word 46092 - .word 16325 - .word 18814 - .word 7557 - .word 28730 - .word 49090 - .word 30522 - .word 27866 - .word 4275 - .word 16320 - .word 35905 - .word 26356 - .word 32871 - .word 49084 - .word 38506 - .word 60969 - .word 40989 - .word 16313 - .word 18199 - .word 53198 - .word 18595 - .word 49079 - .word 21817 - .word 41319 - .word 22094 - .word 16309 - .word 3261 - .word 2506 - .word 46646 - .word 49075 - .word 41261 - .word 44393 - .word 26269 - .word 16306 - .word 45347 - .word 5923 - .word 3109 - .word 49073 - .word 3843 - .word 55608 - .word 31192 - .word 16299 - .word 33944 - .word 58380 - .word 1271 - .word 49050 - .type _C1,@object - .size _C1,176 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xc3300000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x40080000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_W4: - .long 381774871 - .long 3211182444 - .type _W4,@object - .size _W4,8 - .align 4 -_S26: - .long 1826776023 - .long 1070820717 - .type _S26,@object - .size _S26,8 - .align 4 -_S28: - .long 2468013457 - .long 3218873328 - .type _S28,@object - .size _S28,8 - .align 4 -_S22: - .long 342869935 - .long 3214497781 - .type _S22,@object - .size _S22,8 - .align 4 -_S24: - .long 3872164012 - .long 3218225849 - .type _S24,@object - .size _S24,8 - .align 4 -_S18: - .long 1060196486 - .long 3216761200 - .type _S18,@object - .size _S18,8 - .align 4 -_S20: - .long 1339685656 - .long 3216855407 - .type _S20,@object - .size _S20,8 - .align 4 -_S14: - .long 3265047626 - .long 3217180894 - .type _S14,@object - .size _S14,8 - .align 4 -_S16: - .long 618803264 - .long 3217033139 - .type _S16,@object - .size _S16,8 - .align 4 -_PBIG: - .long 4294967295 - .long 2146435071 - .type _PBIG,@object - .size _PBIG,8 - .data - .hidden fesetround - .hidden fegetround - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgammaf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgammaf.S deleted file mode 100644 index 650c48a2f9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgammaf.S +++ /dev/null @@ -1,2280 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lgammaf.c" - .text -..TXTST0: -# -- Begin lgammaf - .text - .align 16,0x90 - .globl lgammaf -lgammaf: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - subl $20, %esp - lea 8(%esp), %eax - pushl %eax - pushl 28(%esp) - call __libm_lgammaf -..B1.2: - addl $28, %esp - ret - .align 16,0x90 - .type lgammaf,@function - .size lgammaf,.-lgammaf - .data -# -- End lgammaf - .text -# -- Begin __libm_lgammaf - .text - .align 16,0x90 -__libm_lgammaf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L2: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - movzwl 10(%ebp), %ebx - andl $32640, %ebx - shrl $7, %ebx - movl %ebx, %edi - movzbl 11(%ebp), %ecx - movl 8(%ebp), %edx - andl $128, %ecx - movl 12(%ebp), %eax - andl $8388607, %edx - shll $23, %edi - shrl $7, %ecx - orl %edx, %edi - movl %eax, 12(%esp) - movl %ecx, (%esp) -..B2.2: - fnstcw 90(%esp) -..B2.3: - call fegetround -..B2.164: - movl %eax, 84(%esp) -..B2.4: - cmpl $0, 84(%esp) - jne ..B2.6 -..B2.5: - xorl %edx, %edx - jmp ..B2.8 -..B2.6: - addl $-16, %esp - movl $0, (%esp) - call fesetround -..B2.165: - addl $16, %esp -..B2.7: - movl $1, %edx -..B2.8: - movzwl 90(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.161 -..B2.9: - orl $-64768, %ecx - movw %cx, 88(%esp) -..B2.10: - fldcw 88(%esp) -..B2.11: - movl $1, %esi -..B2.12: - cmpl $255, %ebx - jne ..B2.18 -..B2.13: - movl 12(%esp), %eax - testl %esi, %esi - movl $1, (%eax) - je ..B2.15 -..B2.14: - fldcw 90(%esp) -..B2.15: - testl %edx, %edx - je ..B2.17 -..B2.16: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.166: - addl $16, %esp -..B2.17: - flds 8(%ebp) - fmul %st(0), %st - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.18: - testl %edi, %edi - je ..B2.153 -..B2.19: - movl 12(%esp), %eax - call ..L3 -..L3: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L3](%ebx), %ebx - movl $1, (%eax) - cmpl $0, (%esp) - jne ..B2.76 -..B2.20: - cmpl $2084876174, %edi - jae ..B2.140 -..B2.21: - flds 8(%ebp) - fld1 - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.22 - je ..B2.135 -..B2.22: - cmpl $1174405120, %edi - jb ..B2.28 -..B2.23: - fldt _LN_SQRT_TWO_PI@GOTOFF(%ebx) - fstpt (%esp) - addl $-16, %esp - fstl (%esp) - fstpt 32(%esp) - fldt 32(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - movl %edx, 96(%esp) - fsubrp %st, %st(1) - fstpt 48(%esp) - call log@PLT -..B2.167: - fldt 32(%esp) - fldt 48(%esp) - movl 96(%esp), %edx - addl $16, %esp - fmulp %st, %st(2) - testl %edx, %edx - fxch %st(1) - je ..B2.25 -..B2.24: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - fstpt 48(%esp) - fstpt 32(%esp) - call fesetround -..B2.168: - fldt 32(%esp) - fldt 48(%esp) - addl $16, %esp -..B2.25: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fsubp %st, %st(1) - fstps 76(%esp) - je ..B2.27 -..B2.26: - fldcw 90(%esp) -..B2.27: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.28: - cmpl $1082130432, %edi - jb ..B2.35 -..B2.29: - addl $-1082130432, %edi - sarl $23, %edi - movl %edi, %eax - shll $6, %eax - testl %edx, %edx - fsubs _A@GOTOFF(%ebx,%edi,4) - fmuls _B@GOTOFF(%ebx,%edi,4) - lea (%edi,%edi,2), %ecx - fld %st(0) - fmul %st(1), %st - fldl 8+_C5@GOTOFF(%eax,%ebx) - fmul %st(1), %st - faddl 40+_C5@GOTOFF(%eax,%ebx) - fmul %st(1), %st - faddl 8+_C5_0@GOTOFF(%ebx,%ecx,8) - fmul %st(1), %st - faddl 56+_C5@GOTOFF(%eax,%ebx) - fmul %st(1), %st - faddl 24+_C5@GOTOFF(%eax,%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fldl _C5@GOTOFF(%eax,%ebx) - fmul %st(2), %st - faddl 32+_C5@GOTOFF(%eax,%ebx) - fmul %st(2), %st - faddl _C5_0@GOTOFF(%ebx,%ecx,8) - fmul %st(2), %st - faddl 48+_C5@GOTOFF(%eax,%ebx) - fmul %st(2), %st - faddl 16+_C5@GOTOFF(%eax,%ebx) - fmulp %st, %st(2) - fxch %st(1) - faddl 16+_C5_0@GOTOFF(%ebx,%ecx,8) - fstpt (%esp) - je ..B2.32 -..B2.30: - fstp %st(0) - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.169: - addl $16, %esp -..B2.31: - fldt 36(%esp) -..B2.32: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstps 76(%esp) - je ..B2.34 -..B2.33: - fldcw 90(%esp) -..B2.34: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.35: - flds .L_2il0floatpacket.3@GOTOFF(%ebx) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.36 - je ..B2.130 -..B2.36: - cmpl $1073741824, %edi - jbe ..B2.42 -..B2.37: - fldl 8+_C4@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - testl %edx, %edx - fmul %st, %st(1) - fldl _C4@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(2) - faddl 40+_C4@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(2) - faddl 32+_C4@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(2) - faddl 72+_C4@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(2) - faddl 64+_C4@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(2) - faddl 56+_C4@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(2) - faddl 48+_C4@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(2) - faddl 24+_C4@GOTOFF(%ebx) - fmul %st(3), %st - fstpt 36(%esp) - fldt 36(%esp) - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - fsubrp %st, %st(4) - fxch %st(2) - faddl 16+_C4@GOTOFF(%ebx) - fmulp %st, %st(1) - faddl 80+_C4@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - je ..B2.39 -..B2.38: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.170: - fldt 16(%esp) - addl $16, %esp -..B2.39: - fstps 76(%esp) - testl %esi, %esi - je ..B2.41 -..B2.40: - fldcw 90(%esp) -..B2.41: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.42: - cmpl $1071644672, %edi - jb ..B2.49 -..B2.43: - fldl 16+_C3@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - testl %edx, %edx - fmul %st, %st(1) - fxch %st(1) - faddl 48+_C3@GOTOFF(%ebx) - fmul %st(1), %st - faddl 32+_C3@GOTOFF(%ebx) - fmul %st(1), %st - faddl 64+_C3@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fldl 8+_C3@GOTOFF(%ebx) - fmul %st(2), %st - faddl 40+_C3@GOTOFF(%ebx) - fmul %st(2), %st - faddl 24+_C3@GOTOFF(%ebx) - fmul %st(2), %st - faddl 56+_C3@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - faddl _C3@GOTOFF(%ebx) - fstpt (%esp) - je ..B2.46 -..B2.44: - fstp %st(0) - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.171: - addl $16, %esp -..B2.45: - fldt 36(%esp) -..B2.46: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstps 76(%esp) - je ..B2.48 -..B2.47: - fldcw 90(%esp) -..B2.48: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.49: - cmpl $1069547520, %edi - jb ..B2.56 -..B2.50: - fldl 16+_LGAMMAF_C2@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - testl %edx, %edx - fmul %st, %st(1) - fxch %st(1) - faddl 48+_LGAMMAF_C2@GOTOFF(%ebx) - fmul %st(1), %st - faddl 32+_LGAMMAF_C2@GOTOFF(%ebx) - fmul %st(1), %st - faddl 64+_LGAMMAF_C2@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fldl 8+_LGAMMAF_C2@GOTOFF(%ebx) - fmul %st(2), %st - faddl 40+_LGAMMAF_C2@GOTOFF(%ebx) - fmul %st(2), %st - faddl 24+_LGAMMAF_C2@GOTOFF(%ebx) - fmul %st(2), %st - faddl 56+_LGAMMAF_C2@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - faddl _LGAMMAF_C2@GOTOFF(%ebx) - fstpt (%esp) - je ..B2.53 -..B2.51: - fstp %st(0) - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.172: - addl $16, %esp -..B2.52: - fldt 36(%esp) -..B2.53: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstps 76(%esp) - je ..B2.55 -..B2.54: - fldcw 90(%esp) -..B2.55: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.56: - cmpl $1067450368, %edi - jb ..B2.63 -..B2.57: - fldl 16+_C1@GOTOFF(%ebx) - testl %edx, %edx - fxch %st(1) - fsubl _LM@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(2) - faddl 48+_C1@GOTOFF(%ebx) - fmul %st(2), %st - faddl 32+_C1@GOTOFF(%ebx) - fmul %st(2), %st - faddl 64+_C1@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fldl 8+_C1@GOTOFF(%ebx) - fmul %st(2), %st - faddl 40+_C1@GOTOFF(%ebx) - fmul %st(2), %st - faddl 24+_C1@GOTOFF(%ebx) - fmul %st(2), %st - faddl 56+_C1@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - faddl _C1@GOTOFF(%ebx) - fstpt (%esp) - je ..B2.60 -..B2.58: - fstp %st(0) - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.173: - addl $16, %esp -..B2.59: - fldt 36(%esp) -..B2.60: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstps 76(%esp) - je ..B2.62 -..B2.61: - fldcw 90(%esp) -..B2.62: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.63: - cmpl $1065353216, %edi - jb ..B2.70 -..B2.64: - fldl 16+_C0@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - testl %edx, %edx - fmul %st, %st(1) - fxch %st(1) - faddl 48+_C0@GOTOFF(%ebx) - fmul %st(1), %st - faddl 32+_C0@GOTOFF(%ebx) - fmul %st(1), %st - faddl 64+_C0@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fldl 8+_C0@GOTOFF(%ebx) - fmul %st(2), %st - faddl 40+_C0@GOTOFF(%ebx) - fmul %st(2), %st - faddl 24+_C0@GOTOFF(%ebx) - fmul %st(2), %st - faddl 56+_C0@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - faddl _C0@GOTOFF(%ebx) - fstpt (%esp) - je ..B2.67 -..B2.65: - fstp %st(0) - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.174: - addl $16, %esp -..B2.66: - fldt 36(%esp) -..B2.67: - fldt (%esp) - testl %esi, %esi - faddp %st, %st(1) - fstps 76(%esp) - je ..B2.69 -..B2.68: - fldcw 90(%esp) -..B2.69: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.70: - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - addl $-16, %esp - fadd %st(1), %st - fstpt (%esp) - fstpt 32(%esp) - movl %edx, 96(%esp) - call lgammaf_pos -..B2.176: - fldt 32(%esp) - movl 96(%esp), %edx - fxch %st(1) - fstpt 16(%esp) - fstpl (%esp) - movl %edx, 96(%esp) - call log@PLT -..B2.175: - movl 96(%esp), %edx - addl $16, %esp - fstpt 36(%esp) - fldt 36(%esp) - testl %edx, %edx - je ..B2.73 -..B2.71: - fstp %st(0) - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.177: - addl $16, %esp -..B2.72: - fldt 36(%esp) -..B2.73: - fldt (%esp) - testl %esi, %esi - fsubp %st, %st(1) - fstps 76(%esp) - je ..B2.75 -..B2.74: - fldcw 90(%esp) -..B2.75: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.76: - addl $-16, %esp - movl 8(%ebp), %eax - movl %eax, (%esp) - movl %edx, 96(%esp) - call nearbyintf@PLT -..B2.178: - flds 8(%ebp) - movl 96(%esp), %edx - addl $16, %esp - fxch %st(1) - fstps 76(%esp) - flds 76(%esp) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.77 - je ..B2.148 -..B2.77: - fcoms .L_2il0floatpacket.0@GOTOFF(%ebx) - fnstsw %ax - sahf - jbe ..B2.80 -..B2.78: - fld %st(0) - frndint - fcom %st(1) - fnstsw %ax - sahf - jnb ..L4 - fld1 - faddp %st, %st(1) -..L4: - fistpl 16(%esp) - movl 16(%esp), %eax - testb $1, %al - jne ..B2.80 -..B2.79: - movl 12(%esp), %eax - movl $-1, (%eax) -..B2.80: - cmpl $1073741824, %edi - jae ..B2.91 -..B2.81: - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.145 -..B2.82: - fld %st(0) -..B2.83: - fmul %st(2), %st - fxch %st(1) - fadd %st, %st(2) - fcom %st(2) - fnstsw %ax - sahf - fxch %st(1) - ja ..B2.83 -..B2.84: - fstp %st(1) - fstpt 36(%esp) -..B2.85: - andb $127, 45(%esp) - fldt 36(%esp) - addl $-16, %esp - fstpl (%esp) - fstpt 80(%esp) - movl %edx, 96(%esp) - call log@PLT -..B2.180: - fldt 80(%esp) - movl 96(%esp), %edx - addl $16, %esp - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - addl $-16, %esp - fxch %st(1) - fstpt (%esp) - fstpt 16(%esp) - movl %edx, 96(%esp) - call lgammaf_pos -..B2.179: - fldt 16(%esp) - movl 96(%esp), %edx - addl $16, %esp - testl %edx, %edx - je ..B2.88 -..B2.86: - fstp %st(0) - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.181: - fldt 16(%esp) - addl $16, %esp -..B2.87: - fldt 36(%esp) -..B2.88: - testl %esi, %esi - fsubrp %st, %st(1) - fstps 76(%esp) - je ..B2.90 -..B2.89: - fldcw 90(%esp) -..B2.90: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.91: - cmpl $1082130432, %edi - jae ..B2.108 -..B2.92: - flds .L_2il0floatpacket.4@GOTOFF(%ebx) - fsub %st(1), %st - fstps 76(%esp) - flds 76(%esp) - flds .L_2il0floatpacket.5@GOTOFF(%ebx) - fadd %st, %st(1) - fxch %st(1) - fstps 76(%esp) - flds 76(%esp) - movl 76(%esp), %edi - fsubp %st, %st(1) - andl $1, %edi - fstps 76(%esp) - lea (%edi,%edi,2), %ecx - fcoml _LRIB@GOTOFF(%ebx,%ecx,8) - fnstsw %ax - sahf - jbe ..B2.95 -..B2.93: - fldl 16+_LRIB@GOTOFF(%ebx,%ecx,8) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.95 -..B2.94: - fldl 8+_LRIB@GOTOFF(%ebx,%ecx,8) - shll $5, %edi - fsubrp %st, %st(1) - fldl _LRP@GOTOFF(%edi,%ebx) - fmul %st(1), %st - faddl 8+_LRP@GOTOFF(%edi,%ebx) - fmul %st(1), %st - faddl 16+_LRP@GOTOFF(%edi,%ebx) - fmulp %st, %st(1) - faddl 24+_LRP@GOTOFF(%edi,%ebx) - jmp ..B2.103 -..B2.95: - fcoml _RRIB@GOTOFF(%ebx,%ecx,8) - fnstsw %ax - sahf - jbe ..B2.98 -..B2.96: - fldl 16+_RRIB@GOTOFF(%ebx,%ecx,8) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.98 -..B2.97: - fldl 8+_RRIB@GOTOFF(%ebx,%ecx,8) - shll $5, %edi - fsubrp %st, %st(1) - fldl _RRP@GOTOFF(%edi,%ebx) - fmul %st(1), %st - faddl 8+_RRP@GOTOFF(%edi,%ebx) - fmul %st(1), %st - faddl 16+_RRP@GOTOFF(%edi,%ebx) - fmulp %st, %st(1) - faddl 24+_RRP@GOTOFF(%edi,%ebx) - jmp ..B2.103 -..B2.98: - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.146 -..B2.99: - fld %st(0) -..B2.100: - fmul %st(2), %st - fxch %st(1) - fadd %st, %st(2) - fcom %st(2) - fnstsw %ax - sahf - fxch %st(1) - ja ..B2.100 -..B2.101: - fstp %st(1) - fstpt 36(%esp) -..B2.102: - andb $127, 45(%esp) - fldt 36(%esp) - addl $-16, %esp - fstpl (%esp) - fstpt 80(%esp) - movl %edx, 96(%esp) - call log@PLT -..B2.183: - fldt 80(%esp) - movl 96(%esp), %edx - addl $16, %esp - fxch %st(1) - fstl (%esp) - fstpt 36(%esp) - addl $-16, %esp - fstpt (%esp) - movl %edx, 96(%esp) - call lgammaf_pos -..B2.182: - movl 96(%esp), %edx - addl $16, %esp - fsubl (%esp) -..B2.103: - testl %edx, %edx - je ..B2.105 -..B2.104: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.184: - fldt 16(%esp) - addl $16, %esp -..B2.105: - fstps 76(%esp) - testl %esi, %esi - je ..B2.107 -..B2.106: - fldcw 90(%esp) -..B2.107: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.108: - cmpl $1091567616, %edi - jae ..B2.119 -..B2.109: - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.147 -..B2.110: - fld %st(0) -..B2.111: - fmul %st(2), %st - fxch %st(1) - fadd %st, %st(2) - fcom %st(2) - fnstsw %ax - sahf - fxch %st(1) - ja ..B2.111 -..B2.112: - fstp %st(1) - fstpt 36(%esp) -..B2.113: - andb $127, 45(%esp) - fldt 36(%esp) - addl $-16, %esp - fstpl (%esp) - fstpt 80(%esp) - movl %edx, 96(%esp) - call log@PLT -..B2.186: - fldt 80(%esp) - movl 96(%esp), %edx - addl $16, %esp - fxch %st(1) - fstpt 36(%esp) - fldt 36(%esp) - addl $-16, %esp - fxch %st(1) - fstpt (%esp) - fstpt 16(%esp) - movl %edx, 96(%esp) - call lgammaf_pos -..B2.185: - fldt 16(%esp) - movl 96(%esp), %edx - addl $16, %esp - testl %edx, %edx - je ..B2.116 -..B2.114: - fstp %st(0) - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.187: - fldt 16(%esp) - addl $16, %esp -..B2.115: - fldt 36(%esp) -..B2.116: - testl %esi, %esi - fsubrp %st, %st(1) - fstps 76(%esp) - je ..B2.118 -..B2.117: - fldcw 90(%esp) -..B2.118: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.119: - flds .L_2il0floatpacket.5@GOTOFF(%ebx) - cmpl $1174405120, %edi - jb ..B2.125 -..B2.120: - fldt _LN_SQRT_TWO_PI@GOTOFF(%ebx) - fstpt 24(%esp) - addl $-16, %esp - fld %st(1) - fchs - fstpl (%esp) - fstps 16(%esp) - fstpt 80(%esp) - fldt 80(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - movl %edx, 96(%esp) - fsubrp %st, %st(1) - fstpt 24(%esp) - call log@PLT -..B2.189: - fldt 80(%esp) - flds 16(%esp) - fldt 24(%esp) - movl 96(%esp), %edx - addl $16, %esp - fmulp %st, %st(3) - fsts 76(%esp) - fldt 24(%esp) - fsubrp %st, %st(3) - fxch %st(1) - fsubr %st, %st(2) - fchs - flds 76(%esp) - fldl _S16@GOTOFF(%ebx) - fxch %st(1) - fsubs 8(%ebp) - fstps 76(%esp) - flds 76(%esp) - fsubp %st, %st(3) - fxch %st(2) - fstps 76(%esp) - flds 76(%esp) - fsubrp %st, %st(1) - fstpt 52(%esp) - fldt 52(%esp) - fmul %st(0), %st - fmul %st, %st(1) - andb $127, 61(%esp) - fxch %st(1) - faddl _S14@GOTOFF(%ebx) - fmul %st(1), %st - faddl _S12@GOTOFF(%ebx) - fmul %st(1), %st - faddl _S10@GOTOFF(%ebx) - fmul %st(1), %st - faddl _S08@GOTOFF(%ebx) - fmul %st(1), %st - faddl _S06@GOTOFF(%ebx) - fmul %st(1), %st - faddl _S04@GOTOFF(%ebx) - fmul %st(1), %st - faddl _S02@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fsubrp %st, %st(1) - fldt 52(%esp) - addl $-16, %esp - fstpl (%esp) - fstpt 24(%esp) - movl %edx, 96(%esp) - call log@PLT -..B2.188: - fldt 24(%esp) - movl 96(%esp), %edx - addl $16, %esp - testl %edx, %edx - fxch %st(1) - je ..B2.122 -..B2.121: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - fstpl 16(%esp) - fstpt 24(%esp) - call fesetround -..B2.190: - fldt 24(%esp) - fldl 16(%esp) - addl $16, %esp -..B2.122: - testl %esi, %esi - fsubrp %st, %st(1) - fstps 76(%esp) - je ..B2.124 -..B2.123: - fldcw 90(%esp) -..B2.124: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.125: - fld %st(0) - fsub %st(2), %st - fstps 76(%esp) - flds 76(%esp) - fsubp %st, %st(1) - fstps 76(%esp) - fld %st(0) - fchs - fstpt 40(%esp) - fldt 40(%esp) - fxch %st(1) - fchs - flds 76(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 52(%esp) - fldt 52(%esp) - fmul %st(0), %st - fstpt 24(%esp) - addl $-16, %esp - fstpl (%esp) - movl %edx, 96(%esp) - call log@PLT -..B2.193: - movl 96(%esp), %edx - fchs - fldt 56(%esp) - fstpt (%esp) - fstpt 24(%esp) - movl %edx, 96(%esp) - call lgammaf_pos -..B2.192: - fldt 24(%esp) - movl 96(%esp), %edx - fsubp %st, %st(1) - addl $16, %esp - fldt 24(%esp) - fld %st(0) - fmul %st(1), %st - fldl _S14@GOTOFF(%ebx) - fmul %st(1), %st - fldl _S16@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl _S10@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl _S12@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl _S06@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl _S08@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl _S02@GOTOFF(%ebx) - fmulp %st, %st(3) - faddl _S04@GOTOFF(%ebx) - fmulp %st, %st(1) - andb $127, 61(%esp) - faddp %st, %st(1) - fstpt 36(%esp) - fldt 36(%esp) - fsubrp %st, %st(1) - fldt 52(%esp) - addl $-16, %esp - fstpl (%esp) - fstpt 24(%esp) - movl %edx, 96(%esp) - call log@PLT -..B2.191: - fldt 24(%esp) - movl 96(%esp), %edx - addl $16, %esp - testl %edx, %edx - fxch %st(1) - je ..B2.127 -..B2.126: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - fstpl 16(%esp) - fstpt 24(%esp) - call fesetround -..B2.194: - fldt 24(%esp) - fldl 16(%esp) - addl $16, %esp -..B2.127: - testl %esi, %esi - fsubrp %st, %st(1) - fstps 76(%esp) - je ..B2.129 -..B2.128: - fldcw 90(%esp) -..B2.129: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.130: - fstp %st(0) - testl %esi, %esi - je ..B2.132 -..B2.131: - fldcw 90(%esp) -..B2.132: - testl %edx, %edx - je ..B2.134 -..B2.133: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.195: - addl $16, %esp -..B2.134: - fldz - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.135: - fstp %st(0) - testl %esi, %esi - je ..B2.137 -..B2.136: - fldcw 90(%esp) -..B2.137: - testl %edx, %edx - je ..B2.139 -..B2.138: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.196: - addl $16, %esp -..B2.139: - fldz - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.140: - testl %edx, %edx - je ..B2.142 -..B2.141: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.197: - addl $16, %esp -..B2.142: - fldl _PBIG@GOTOFF(%ebx) - testl %esi, %esi - fmul %st(0), %st - fstps 76(%esp) - je ..B2.144 -..B2.143: - fldcw 90(%esp) -..B2.144: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.145: - fstpt 36(%esp) - jmp ..B2.85 -..B2.146: - fstpt 36(%esp) - jmp ..B2.102 -..B2.147: - fstpt 36(%esp) - jmp ..B2.113 -..B2.148: - fstp %st(0) - testl %edx, %edx - je ..B2.150 -..B2.149: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.198: - addl $16, %esp -..B2.150: - fld1 - movl $0, 76(%esp) - testl %esi, %esi - flds 76(%esp) - fdivrp %st, %st(1) - fstps 76(%esp) - je ..B2.152 -..B2.151: - fldcw 90(%esp) -..B2.152: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.153: - cmpl $0, (%esp) - je ..B2.155 -..B2.154: - movl 12(%esp), %eax - movl $-1, (%eax) - jmp ..B2.156 -..B2.155: - movl 12(%esp), %eax - movl $1, (%eax) -..B2.156: - testl %edx, %edx - je ..B2.158 -..B2.157: - addl $-16, %esp - movl 100(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.199: - addl $16, %esp -..B2.158: - fld1 - movl $0, 76(%esp) - testl %esi, %esi - flds 76(%esp) - fdivrp %st, %st(1) - fstps 76(%esp) - je ..B2.160 -..B2.159: - fldcw 90(%esp) -..B2.160: - flds 76(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.161: - xorl %esi, %esi - jmp ..B2.12 - .align 16,0x90 - .type __libm_lgammaf,@function - .size __libm_lgammaf,.-__libm_lgammaf - .data -# -- End __libm_lgammaf - .text -# -- Begin lgammaf_pos - .text - .align 16,0x90 -lgammaf_pos: -# parameter 1: 8 + %ebp -..B3.1: -..L5: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp - fldt 8(%ebp) - fstl (%esp) - movzwl 6(%esp), %edx - andl $32752, %edx - shrl $4, %edx - movl 4(%esp), %eax - shll $20, %edx - andl $1048575, %eax - orl %eax, %edx - call ..L6 -..L6: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L6](%ecx), %ecx - cmpl $1074790400, %edx - jb ..B3.3 -..B3.2: - addl $-1074790400, %edx - sarl $20, %edx - movl %edx, %eax - shll $6, %eax - flds _A@GOTOFF(%ecx,%edx,4) - fsubrp %st, %st(1) - fmuls _B@GOTOFF(%ecx,%edx,4) - lea (%edx,%edx,2), %edx - fld %st(0) - fmul %st(1), %st - fldl _C5@GOTOFF(%eax,%ecx) - fmul %st(1), %st - fldl 8+_C5@GOTOFF(%ecx,%eax) - fmul %st(2), %st - fxch %st(1) - faddl 32+_C5@GOTOFF(%ecx,%eax) - fmul %st(2), %st - fxch %st(1) - faddl 40+_C5@GOTOFF(%ecx,%eax) - fmul %st(2), %st - fxch %st(1) - faddl _C5_0@GOTOFF(%ecx,%edx,8) - fmul %st(2), %st - fxch %st(1) - faddl 8+_C5_0@GOTOFF(%ecx,%edx,8) - fmul %st(2), %st - fxch %st(1) - faddl 48+_C5@GOTOFF(%ecx,%eax) - fmul %st(2), %st - fxch %st(1) - faddl 56+_C5@GOTOFF(%ecx,%eax) - fmul %st(2), %st - fxch %st(1) - faddl 16+_C5@GOTOFF(%ecx,%eax) - fmulp %st, %st(2) - faddl 24+_C5@GOTOFF(%ecx,%eax) - fmulp %st, %st(2) - faddl 16+_C5_0@GOTOFF(%ecx,%edx,8) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.3: - cmpl $1073741824, %edx - jne ..B3.5 -..B3.4: - fstp %st(0) - fldt .L_2il0floatpacket.7@GOTOFF(%ecx) - movl %ebp, %esp - popl %ebp - ret -..B3.5: - jbe ..B3.7 -..B3.6: - fldl _C4@GOTOFF(%ecx) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fldl 8+_C4@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 32+_C4@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 40+_C4@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 64+_C4@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 72+_C4@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 48+_C4@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 56+_C4@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 16+_C4@GOTOFF(%ecx) - fmulp %st, %st(1) - fxch %st(1) - faddl 24+_C4@GOTOFF(%ecx) - fmul %st(2), %st - fxch %st(1) - faddl 80+_C4@GOTOFF(%ecx) - faddp %st, %st(1) - fldt .L_2il0floatpacket.6@GOTOFF(%ecx) - fsubrp %st, %st(2) - fmulp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.7: - cmpl $1073479680, %edx - jb ..B3.9 -..B3.8: - fldl 8+_C3@GOTOFF(%ecx) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fldl 16+_C3@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 40+_C3@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 48+_C3@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 24+_C3@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 32+_C3@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 56+_C3@GOTOFF(%ecx) - fmulp %st, %st(1) - fxch %st(1) - faddl 64+_C3@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl _C3@GOTOFF(%ecx) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.9: - cmpl $1073217536, %edx - jb ..B3.11 -..B3.10: - fldl 8+_LGAMMAF_C2@GOTOFF(%ecx) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fldl 16+_LGAMMAF_C2@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 40+_LGAMMAF_C2@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 48+_LGAMMAF_C2@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 24+_LGAMMAF_C2@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 32+_LGAMMAF_C2@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 56+_LGAMMAF_C2@GOTOFF(%ecx) - fmulp %st, %st(1) - fxch %st(1) - faddl 64+_LGAMMAF_C2@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl _LGAMMAF_C2@GOTOFF(%ecx) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.11: - cmpl $1072955392, %edx - jb ..B3.13 -..B3.12: - fldl _LM@GOTOFF(%ecx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl 8+_C1@GOTOFF(%ecx) - fmul %st(1), %st - fldl 16+_C1@GOTOFF(%ecx) - fmul %st(2), %st - fxch %st(1) - faddl 40+_C1@GOTOFF(%ecx) - fmul %st(2), %st - fxch %st(1) - faddl 48+_C1@GOTOFF(%ecx) - fmul %st(2), %st - fxch %st(1) - faddl 24+_C1@GOTOFF(%ecx) - fmul %st(2), %st - fxch %st(1) - faddl 32+_C1@GOTOFF(%ecx) - fmul %st(2), %st - fxch %st(1) - faddl 56+_C1@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl 64+_C1@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl _C1@GOTOFF(%ecx) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.13: - cmpl $1072693248, %edx - jb ..B3.15 -..B3.14: - fldl 8+_C0@GOTOFF(%ecx) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fldl 16+_C0@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 40+_C0@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 48+_C0@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 24+_C0@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 32+_C0@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(2) - faddl 56+_C0@GOTOFF(%ecx) - fmulp %st, %st(1) - fxch %st(1) - faddl 64+_C0@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl _C0@GOTOFF(%ecx) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B3.15: - fstp %st(0) - fldz -..B3.16: - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type lgammaf_pos,@function - .size lgammaf_pos,.-lgammaf_pos - .data -# -- End lgammaf_pos - .text -# -- Begin gammaf - .text - .align 16,0x90 - .globl gammaf -gammaf: -# parameter 1: 32 + %esp -..B4.1: -..L7: - - subl $20, %esp - lea 8(%esp), %eax - pushl %eax - pushl 28(%esp) - call __libm_lgammaf -..B4.2: - addl $28, %esp - ret - .align 16,0x90 - .type gammaf,@function - .size gammaf,.-gammaf - .data -# -- End gammaf - .text -# -- Begin lgammaf_r - .text - .align 16,0x90 - .globl lgammaf_r -lgammaf_r: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -..B5.1: -..L8: - - jmp __libm_lgammaf - .align 16,0x90 - .type lgammaf_r,@function - .size lgammaf_r,.-lgammaf_r - .data -# -- End lgammaf_r - .text -# -- Begin gammaf_r - .text - .align 16,0x90 - .globl gammaf_r -gammaf_r: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -..B6.1: -..L9: - - jmp __libm_lgammaf - .align 16,0x90 - .type gammaf_r,@function - .size gammaf_r,.-gammaf_r - .data -# -- End gammaf_r - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,12 - .space 4, 0x00 # pad - .align 16 -_LN_SQRT_TWO_PI: - .word 42293 - .word 9717 - .word 36419 - .word 60223 - .word 16382 - .word 0 - .type _LN_SQRT_TWO_PI,@object - .size _LN_SQRT_TWO_PI,12 - .space 4, 0x00 # pad - .align 16 -_A: - .long 1082130432 - .long 1090519040 - .long 1098907648 - .long 1107296256 - .long 1115684864 - .long 1124073472 - .long 1132462080 - .long 1140850688 - .long 1149239296 - .long 1157627904 - .long 1166016512 - .type _A,@object - .size _A,44 - .space 4, 0x00 # pad - .align 16 -_B: - .long 1048576000 - .long 1040187392 - .long 1031798784 - .long 1023410176 - .long 1015021568 - .long 1006632960 - .long 998244352 - .long 989855744 - .long 981467136 - .long 973078528 - .long 964689920 - .type _B,@object - .size _B,44 - .space 4, 0x00 # pad - .align 16 -_C5: - .long 2219950285 - .long 1064025046 - .long 657069815 - .long 3214307011 - .long 2744833897 - .long 1073883684 - .long 3746154693 - .long 1075058958 - .long 24044097 - .long 1068577021 - .long 1852002888 - .long 3217117620 - .long 426096126 - .long 1071550305 - .long 3945160253 - .long 3219869968 - .long 889741930 - .long 1064529657 - .long 2918550257 - .long 3214927323 - .long 3306758232 - .long 1074858655 - .long 2801363753 - .long 1076895752 - .long 216130741 - .long 1069082446 - .long 2022127190 - .long 3217667546 - .long 4043317980 - .long 1072274701 - .long 948933764 - .long 3220711872 - .long 1837011561 - .long 1065353117 - .long 614133169 - .long 3215620106 - .long 128884864 - .long 1075872424 - .long 1749057555 - .long 1078324632 - .long 1278187959 - .long 1069867493 - .long 1878987920 - .long 3218464301 - .long 2508500615 - .long 1073176520 - .long 3716705454 - .long 3221664954 - .long 1971591775 - .long 1066198339 - .long 3489274850 - .long 3216507307 - .long 2978044890 - .long 1076904104 - .long 399657850 - .long 1079744937 - .long 2176842243 - .long 1070795947 - .long 1642919051 - .long 3219397359 - .long 325839939 - .long 1074155724 - .long 1189620011 - .long 3222667808 - .long 583706808 - .long 1067149757 - .long 1974968851 - .long 3217478792 - .long 3433705325 - .long 1077944360 - .long 3946626575 - .long 1081121452 - .long 1495561758 - .long 1071787114 - .long 4062466621 - .long 3220390645 - .long 1556755231 - .long 1075170624 - .long 75679593 - .long 3223694033 - .long 3504606470 - .long 1068150172 - .long 1348305099 - .long 3218489288 - .long 3580634696 - .long 1078988808 - .long 1259291510 - .long 1082352761 - .long 652214916 - .long 1072807425 - .long 4143445962 - .long 3221412067 - .long 2123749472 - .long 1076202613 - .long 4248403985 - .long 3224731560 - .long 1507106795 - .long 1069174188 - .long 3519298167 - .long 3219518582 - .long 3633366982 - .long 1080035328 - .long 2867629808 - .long 1083583554 - .long 3975256969 - .long 1073841792 - .long 2533063588 - .long 3222447083 - .long 3711656185 - .long 1077242956 - .long 3206083648 - .long 3225774644 - .long 4129446490 - .long 1070209876 - .long 3121668168 - .long 3220557159 - .long 3645659330 - .long 1081082878 - .long 1254870306 - .long 1084814091 - .long 1589013900 - .long 1074883091 - .long 485315198 - .long 3223488795 - .long 402512060 - .long 1078287430 - .long 1922980292 - .long 3226820482 - .long 157052617 - .long 1071251449 - .long 2992469705 - .long 3221600396 - .long 1492808525 - .long 1082130942 - .long 3131814131 - .long 1086044499 - .long 2683002247 - .long 1075927855 - .long 2649378904 - .long 3224533843 - .long 3018380877 - .long 1079333956 - .long 653917322 - .long 3227867691 - .long 2713966257 - .long 1072296037 - .long 4209563533 - .long 3222646006 - .long 943575735 - .long 1083179262 - .long 512478091 - .long 1087274844 - .long 3856346814 - .long 1076974372 - .long 1324813592 - .long 3225580569 - .long 1409229319 - .long 1080381507 - .long 3787450294 - .long 3228915583 - .long 3333539597 - .long 1073342203 - .long 2943809629 - .long 3223692845 - .long 794946536 - .long 1084227710 - .long 1068889795 - .long 1088463522 - .long 3231716378 - .long 1078021787 - .long 4072054083 - .long 3226628144 - .long 1998042203 - .long 1081429569 - .long 1148344549 - .long 3229963818 - .type _C5,@object - .size _C5,704 - .align 16 -_C5_0: - .long 2415979356 - .long 1070304454 - .long 2697119297 - .long 3218348439 - .long 4195263586 - .long 1073523467 - .long 3725211212 - .long 1070931684 - .long 2560716363 - .long 3219131775 - .long 4079479268 - .long 1075907809 - .long 1732432466 - .long 1071796064 - .long 3508892908 - .long 3219947991 - .long 2788858919 - .long 1077667382 - .long 2647999156 - .long 1072759450 - .long 547175205 - .long 3220886396 - .long 4254853098 - .long 1079215590 - .long 2099688739 - .long 1073767129 - .long 1386213411 - .long 3221881825 - .long 1373988558 - .long 1080631372 - .long 3012547841 - .long 1074795638 - .long 3012018428 - .long 3222904295 - .long 3968063321 - .long 1082046682 - .long 2372211290 - .long 1075829504 - .long 1852200321 - .long 3223939920 - .long 822603622 - .long 1083320025 - .long 2940107565 - .long 1076868074 - .long 1118670349 - .long 3224982033 - .long 4034033966 - .long 1084551076 - .long 3328910691 - .long 1077911588 - .long 4065388177 - .long 3226027369 - .long 3374537656 - .long 1085781831 - .long 3604631852 - .long 1078957575 - .long 786281660 - .long 3227074315 - .long 3320933858 - .long 1087012393 - .long 4128496013 - .long 1080004805 - .long 820316847 - .long 3228122065 - .long 596318476 - .long 1088242837 - .type _C5_0,@object - .size _C5_0,264 - .space 8, 0x00 # pad - .align 16 -_C4: - .long 951661919 - .long 3199388794 - .long 406044492 - .long 1057185581 - .long 2144499589 - .long 3220511658 - .long 1533861631 - .long 1073519965 - .long 4190848711 - .long 3208779382 - .long 4195628742 - .long 1064581106 - .long 501584638 - .long 3218581252 - .long 4276665641 - .long 1072296199 - .long 2679252139 - .long 3214810152 - .long 1146917984 - .long 1069511714 - .long 3597634954 - .long 3220184694 - .type _C4,@object - .size _C4,88 - .space 8, 0x00 # pad - .align 16 -_C3: - .long 953601802 - .long 1073782987 - .long 53392282 - .long 1061851682 - .long 2280564131 - .long 3213671573 - .long 126074441 - .long 1073190208 - .long 1099663909 - .long 3221770684 - .long 2017365083 - .long 1069271442 - .long 1709742889 - .long 3219105406 - .long 4029656968 - .long 1074967560 - .long 3888843833 - .long 3222480972 - .type _C3,@object - .size _C3,72 - .space 8, 0x00 # pad - .align 16 -_LGAMMAF_C2: - .long 4192182476 - .long 1073863432 - .long 3945858175 - .long 1063638439 - .long 2616885214 - .long 3215216300 - .long 3886441432 - .long 1074077679 - .long 3758761250 - .long 3222447567 - .long 984616456 - .long 1070653784 - .long 2508733349 - .long 3220210863 - .long 2272977058 - .long 1075337602 - .long 3074119607 - .long 3222665277 - .type _LGAMMAF_C2,@object - .size _LGAMMAF_C2,72 - .space 8, 0x00 # pad - .align 16 -_C1: - .long 3166931522 - .long 3216972217 - .long 900077338 - .long 1065586189 - .long 3591574455 - .long 3213040571 - .long 425993680 - .long 1068534592 - .long 2772351024 - .long 3217220647 - .long 3693139651 - .long 1066567133 - .long 2619486276 - .long 3214985484 - .long 3371509884 - .long 1071576875 - .long 2931564028 - .long 1032391485 - .type _C1,@object - .size _C1,72 - .space 8, 0x00 # pad - .align 16 -_LM: - .long 1666629183 - .long 1073177304 - .type _LM,@object - .size _LM,8 - .space 8, 0x00 # pad - .align 16 -_C0: - .long 561403216 - .long 1074066324 - .long 3155481408 - .long 1068272863 - .long 4228834524 - .long 3219267730 - .long 2107372888 - .long 1076349696 - .long 3392182390 - .long 3224133636 - .long 3282054928 - .long 1074040136 - .long 4253763640 - .long 3223020498 - .long 1528000942 - .long 1076400076 - .long 4059292707 - .long 3223275314 - .type _C0,@object - .size _C0,72 - .space 8, 0x00 # pad - .align 16 -_LRIB: - .long 2838661661 - .long 3221617475 - .long 169597185 - .long 3221617473 - .long 1795500005 - .long 3221617470 - .long 3503748181 - .long 3222250619 - .long 1417424869 - .long 3222250609 - .long 2147483648 - .long 3222250589 - .type _LRIB,@object - .size _LRIB,48 - .align 16 -_LRP: - .long 3272807679 - .long 3224639578 - .long 1009311715 - .long 1076045439 - .long 2835657108 - .long 3221135661 - .long 817526409 - .long 1017707397 - .long 2658191496 - .long 3232572725 - .long 2929834182 - .long 1081046750 - .long 2523682372 - .long 3224680861 - .long 915934040 - .long 3166559235 - .type _LRP,@object - .size _LRP,64 - .align 16 -_RRIB: - .long 890743176 - .long 3221465087 - .long 2516645996 - .long 3221465084 - .long 4142548816 - .long 3221465081 - .long 1538591435 - .long 3221825040 - .long 3164494255 - .long 3221825037 - .long 495429779 - .long 3221825035 - .type _RRIB,@object - .size _RRIB,48 - .align 16 -_RRP: - .long 93164946 - .long 1073124518 - .long 2953029931 - .long 1075015403 - .long 1722766176 - .long 1073233897 - .long 1830807661 - .long 1016083003 - .long 308861496 - .long 1079775543 - .long 2541562915 - .long 1077531858 - .long 1596959842 - .long 1075781798 - .long 3819862626 - .long 1021220357 - .type _RRP,@object - .size _RRP,64 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,12 - .align 4 -.L_2il0floatpacket.0: - .long 0xcb400000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x40000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -.L_2il0floatpacket.4: - .long 0xc0200000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,4 - .align 4 -.L_2il0floatpacket.5: - .long 0x4b400000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,4 - .align 4 -_S16: - .long 2760304672 - .long 3218442033 - .type _S16,@object - .size _S16,8 - .align 4 -_S14: - .long 3264091561 - .long 3215213868 - .type _S14,@object - .size _S14,8 - .align 4 -_S12: - .long 1381164920 - .long 3217582605 - .type _S12,@object - .size _S12,8 - .align 4 -_S10: - .long 3387828299 - .long 3217636872 - .type _S10,@object - .size _S10,8 - .align 4 -_S08: - .long 3786959951 - .long 3218084854 - .type _S08,@object - .size _S08,8 - .align 4 -_S06: - .long 2675586079 - .long 3218453489 - .type _S06,@object - .size _S06,8 - .align 4 -_S04: - .long 1432133341 - .long 3219214642 - .type _S04,@object - .size _S04,8 - .align 4 -_S02: - .long 1648889397 - .long 3220853158 - .type _S02,@object - .size _S02,8 - .align 4 -_PBIG: - .long 2139095039 - .long 2139095039 - .type _PBIG,@object - .size _PBIG,8 - .data - .hidden fesetround - .hidden fegetround - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgammal.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgammal.S deleted file mode 100644 index ff23a64296..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lgammal.S +++ /dev/null @@ -1,8398 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lgammal.c" - .text -..TXTST0: -# -- Begin lgammal - .text - .align 16,0x90 - .globl lgammal -lgammal: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - subl $28, %esp - fldt 32(%esp) - lea 16(%esp), %eax - fstpt (%esp) - movl %eax, 12(%esp) - call __libm_lgammal -..B1.2: - addl $28, %esp - ret - .align 16,0x90 - .type lgammal,@function - .size lgammal,.-lgammal - .data -# -- End lgammal - .text -# -- Begin __libm_lgammal - .text - .align 16,0x90 -__libm_lgammal: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B2.1: -..L2: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - movl 20(%ebp), %eax - movl %eax, 44(%esp) - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 232(%esp) -..B2.2: - fnstcw 182(%esp) -..B2.3: - call fegetround -..B2.291: - movl %eax, 140(%esp) -..B2.4: - cmpl $0, 140(%esp) - jne ..B2.6 -..B2.5: - xorl %edi, %edi - jmp ..B2.8 -..B2.6: - addl $-16, %esp - movl $0, (%esp) - call fesetround -..B2.292: - addl $16, %esp -..B2.7: - movl $1, %edi -..B2.8: - movzwl 182(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.288 -..B2.9: - orl $-64768, %edx - movw %dx, 180(%esp) -..B2.10: - fldcw 180(%esp) -..B2.11: - movl $1, %esi -..B2.12: - movzbl 17(%ebp), %eax - movl %eax, (%esp) - andl $128, %eax - shrl $7, %eax - call ..L3 -..L3: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L3](%ebx), %ebx - movzwl 16(%ebp), %edx - andl $32767, %edx - flds ones@GOTOFF(%ebx,%eax,4) - shll $15, %eax - movl 12(%ebp), %ecx - orl %edx, %eax - movl %ecx, 8(%esp) - shll $16, %eax - shrl $16, %ecx - orl %ecx, %eax - movl %eax, 4(%esp) - cmpl $32767, %edx - je ..B2.273 -..B2.13: - fldt 8(%ebp) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fucom %st(1) - fnstsw %ax - sahf - jp ..B2.14 - je ..B2.266 -..B2.14: - fldt _OFW_BOUND@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - sahf - jb ..B2.258 -..B2.15: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fucom %st(2) - fnstsw %ax - sahf - jp ..B2.16 - je ..B2.249 -..B2.16: - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fstpt 168(%esp) - fldt 168(%esp) - fucomp %st(3) - fnstsw %ax - sahf - jp ..B2.17 - je ..B2.249 -..B2.17: - cmpl $0, 4(%esp) - jl ..B2.241 -..B2.18: - cmpl $16382, %edx - jl ..B2.177 -..B2.19: - cmpl $16463, %edx - jge ..B2.170 -..B2.20: - fldt .L_2il0floatpacket.4@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B2.160 -..B2.21: - fldt .L_2il0floatpacket.5@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jae ..B2.121 - jp ..B2.121 -..B2.22: - fstp %st(3) - movl 4(%esp), %eax - andl $2147483647, %eax - cmpl $1073659904, %eax - jl ..B2.112 -..B2.23: - fcom %st(1) - fnstsw %ax - sahf - jae ..B2.26 - jp ..B2.26 -..B2.24: - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B2.26 -..B2.25: - fstp %st(0) - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - movl 44(%esp), %eax - movl $1, (%eax) - jmp ..B2.29 -..B2.26: - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fcom %st(2) - fnstsw %ax - sahf - jae ..B2.39 - jp ..B2.39 -..B2.27: - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B2.39 -..B2.28: - fstp %st(1) - movl 44(%esp), %eax - movl $1, (%eax) -..B2.29: - fcomp %st(1) - fnstsw %ax - lea 2100+_ldbA@GOTOFF(%ebx), %edx - sahf - lea 480+_dbA@GOTOFF(%ebx), %ecx - jae ..B2.31 - jp ..B2.31 -..B2.30: - fstp %st(1) - fldt 168(%esp) - addl $176, %ecx - addl $84, %edx - fsubrp %st, %st(1) - jmp ..B2.32 -..B2.31: - fsubrp %st, %st(1) -..B2.32: - fldl _TWO_32H@GOTOFF(%ebx) - fld %st(1) - fmul %st(1), %st - fld %st(2) - testl %edi, %edi - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(2) - fsub %st(1), %st - fldl 88(%ecx) - fmul %st(4), %st - fldt (%edx) - fldt 36(%edx) - fldt 12(%edx) - fxch %st(3) - faddl 104(%ecx) - fmul %st(7), %st - faddl 96(%ecx) - fmul %st(7), %st - faddl 80(%ecx) - fmul %st(7), %st - faddl 152(%ecx) - fmul %st(7), %st - faddl 120(%ecx) - fmul %st(7), %st - faddl 112(%ecx) - fmul %st(7), %st - faddl 136(%ecx) - fmul %st(7), %st - faddl 128(%ecx) - fmul %st(7), %st - faddl 40(%ecx) - fmul %st(7), %st - faddl 32(%ecx) - fmul %st(7), %st - faddl 56(%ecx) - fmul %st(7), %st - faddl 48(%ecx) - fmul %st(7), %st - faddl 144(%ecx) - fmul %st(7), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(1) - fmul %st(5), %st - faddp %st, %st(1) - fmul %st(4), %st - fldt 48(%edx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 24(%edx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 60(%edx) - faddp %st, %st(1) - fmul %st(4), %st - fld %st(3) - fldt 72(%edx) - faddp %st, %st(2) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - fmul %st(6), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fldl (%ecx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(5) - fmul %st(2), %st - fxch %st(1) - faddl 72(%ecx) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmul %st(5), %st - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldl 16(%ecx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fxch %st(1) - faddl 168(%ecx) - faddp %st, %st(2) - fld %st(5) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldl 64(%ecx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fxch %st(1) - faddl 8(%ecx) - faddp %st, %st(2) - fld %st(5) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldl 160(%ecx) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(6) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddl 24(%ecx) - faddp %st, %st(1) - fld %st(1) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(2) - fmul %st(4), %st - fxch %st(1) - fsub %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - fstpt 16(%esp) - fldt 16(%esp) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 4(%esp) - fldt 4(%esp) - fxch %st(1) - je ..B2.35 -..B2.33: - fstp %st(1) - fstp %st(0) - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.293: - addl $16, %esp -..B2.34: - fldt 4(%esp) - fldt 16(%esp) -..B2.35: - testl %esi, %esi - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.37 -..B2.36: - fldcw 182(%esp) -..B2.37: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.38: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.39: - fstp %st(0) - fcom %st(1) - fnstsw %ax - sahf - jae ..B2.48 - jp ..B2.48 -..B2.40: - fldt 168(%esp) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B2.48 -..B2.41: - fstp %st(2) - fstp %st(1) - movl 44(%esp), %eax - addl $-32, %esp - lea 832+_dbA@GOTOFF(%ebx), %edx - lea 36(%esp), %ecx - movl $1, (%eax) - lea 2268+_ldbA@GOTOFF(%ebx), %eax - fldt (%eax) - addl $12, %eax - fsubrp %st, %st(1) - fstpt (%esp) - call __libm_p25 -..B2.294: - addl $32, %esp -..B2.42: - testl %edi, %edi - je ..B2.44 -..B2.43: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.295: - addl $16, %esp -..B2.44: - fldt 4(%esp) - testl %esi, %esi - fldt 16(%esp) - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.46 -..B2.45: - fldcw 182(%esp) -..B2.46: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.47: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.48: - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.103 -..B2.49: - fldt .L_2il0floatpacket.14@GOTOFF(%ebx) - fcom %st(2) - fnstsw %ax - sahf - jae ..B2.58 - jp ..B2.58 -..B2.50: - fstp %st(0) - fldt .L_2il0floatpacket.15@GOTOFF(%ebx) - fcom %st(2) - fnstsw %ax - sahf - jbe ..B2.58 -..B2.51: - fstp %st(3) - fstp %st(0) - movl 44(%esp), %eax - addl $-32, %esp - fsubp %st, %st(1) - movl $-1, (%eax) - lea 2568+_ldbA@GOTOFF(%ebx), %eax - fstpt (%esp) - lea 1360+_dbA@GOTOFF(%ebx), %edx - lea 36(%esp), %ecx - call __libm_p25 -..B2.296: - addl $32, %esp -..B2.52: - testl %edi, %edi - je ..B2.54 -..B2.53: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.297: - addl $16, %esp -..B2.54: - fldt 4(%esp) - testl %esi, %esi - fldt 16(%esp) - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.56 -..B2.55: - fldcw 182(%esp) -..B2.56: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.57: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.58: - fstp %st(0) - addl $-16, %esp - fxch %st(1) - fstpt (%esp) - fldt (%esp) - movl %edx, 16(%esp) - fxch %st(2) - fstpt 144(%esp) - fstpt 160(%esp) - fstpt 48(%esp) - call nearbyintl@PLT -..B2.298: - fldt 48(%esp) - movl 16(%esp), %edx - fucom %st(1) - fnstsw %ax - fldt 160(%esp) - fldt 144(%esp) - addl $16, %esp - sahf - jp ..B2.59 - je ..B2.205 -..B2.59: - fldt .L_2il0floatpacket.17@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - ja ..B2.71 - jp ..B2.71 -..B2.60: - fldt .L_2il0floatpacket.18@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jb ..B2.71 -..B2.61: - fstp %st(3) - fldt .L_2il0floatpacket.19@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - sahf - jae ..B2.63 - jp ..B2.63 -..B2.62: - movl 44(%esp), %eax - movl $-1, (%eax) - jmp ..B2.64 -..B2.63: - movl 44(%esp), %eax - movl $1, (%eax) -..B2.64: - fxch %st(2) - faddp %st, %st(1) - fstpt 84(%esp) - fldt 84(%esp) - fld %st(0) - movzbl 93(%esp), %eax - andl $128, %eax - fmul %st(1), %st - shrl $7, %eax - fstpt 72(%esp) - fld %st(0) - fchs - fstpt (%esp) - addl $-32, %esp - fmuls ones@GOTOFF(%ebx,%eax,4) - lea 216(%esp), %edx - fstpt (%esp) - fstpt 12(%esp) - movl %edx, 24(%esp) - call __libm_logl_k80 -..B2.299: - fstp %st(0) - addl $32, %esp -..B2.65: - fldt 84(%esp) - testl %edi, %edi - fldt (%esp) - fldl 1560+_dbA@GOTOFF(%ebx) - fmul %st(2), %st - fldt 2700+_ldbA@GOTOFF(%ebx) - fldt 2688+_ldbA@GOTOFF(%ebx) - fldt 2676+_ldbA@GOTOFF(%ebx) - fldt 2664+_ldbA@GOTOFF(%ebx) - fldt 2736+_ldbA@GOTOFF(%ebx) - fxch %st(5) - faddl 1552+_dbA@GOTOFF(%ebx) - fmul %st(7), %st - faddl 1544+_dbA@GOTOFF(%ebx) - fmul %st(7), %st - faddl 1536+_dbA@GOTOFF(%ebx) - fmul %st(7), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - faddp %st, %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fmulp %st, %st(3) - fldl 1568+_dbA@GOTOFF(%ebx) - fmul %st(2), %st - fldt 72(%esp) - fldt 2748+_ldbA@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(3) - fmul %st, %st(2) - fxch %st(1) - faddl 1576+_dbA@GOTOFF(%ebx) - fmul %st(3), %st - fldt 2724+_ldbA@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - faddl 1584+_dbA@GOTOFF(%ebx) - fmul %st(3), %st - faddl 1592+_dbA@GOTOFF(%ebx) - fmul %st(3), %st - faddl 1600+_dbA@GOTOFF(%ebx) - fmul %st(3), %st - faddl 1608+_dbA@GOTOFF(%ebx) - fmul %st(3), %st - faddl 1616+_dbA@GOTOFF(%ebx) - fmul %st(3), %st - faddl 1624+_dbA@GOTOFF(%ebx) - fmul %st(3), %st - fmul %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fstpt 208(%esp) - fldt 208(%esp) - faddp %st, %st(3) - fldt 2712+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fsubp %st, %st(1) - je ..B2.67 -..B2.66: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.300: - fldt 16(%esp) - addl $16, %esp -..B2.67: - fldt 196(%esp) - testl %esi, %esi - fsubrp %st, %st(1) - fldt 184(%esp) - fsubrp %st, %st(1) - fstpt 116(%esp) - je ..B2.69 -..B2.68: - fldcw 182(%esp) -..B2.69: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.70: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.71: - fstp %st(0) - fxch %st(2) - fnstcw (%esp) - movzwl (%esp), %eax - orl $3072, %eax - movl %eax, 8(%esp) - fldcw 8(%esp) - fistl 16(%esp) - fldcw (%esp) - fld %st(1) - movl 16(%esp), %ecx - fsubp %st, %st(1) - negl %ecx - lea -2(%ecx), %eax - movl %eax, 12(%esp) - andl $1, %ecx - jne ..B2.74 -..B2.72: - fcom %st(2) - fnstsw %ax - sahf - jae ..B2.75 - jp ..B2.75 -..B2.73: - movl 44(%esp), %eax - movl $-1, (%eax) - jmp ..B2.76 -..B2.74: - jne ..B2.202 -..B2.75: - movl 44(%esp), %eax - movl $1, (%eax) -..B2.76: - fldt .L_2il0floatpacket.20@GOTOFF(%ebx) - movl 12(%esp), %ecx - fcomp %st(2) - fnstsw %ax - sahf - fcom %st(2) - fnstsw %ax - jae ..L4 - jp ..L4 - movl $0, %ecx -..L4: - sahf - movl $17, %eax - ja ..L5 - movl $0, %eax -..L5: - addl %eax, %ecx - movl %ecx, 12(%esp) - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %eax - fldt 636+_ldbA@GOTOFF(%eax,%ebx) - lea (%ecx,%ecx,2), %ecx - fsubr %st(2), %st - fldt 1068+_ldbA@GOTOFF(%ebx,%ecx,8) - fcomp %st(3) - fnstsw %ax - sahf - jae ..B2.86 - jp ..B2.86 -..B2.77: - fldt 1080+_ldbA@GOTOFF(%ebx,%ecx,8) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B2.86 -..B2.79: - fstp %st(2) - fstp %st(2) - movl 12(%esp), %edx - addl $-32, %esp - lea (,%edx,4), %eax - fstpt (%esp) - lea (%edx,%edx,4), %edx - shll $5, %edx - lea 3360(%eax,%eax,8), %ecx - fstpt 32(%esp) - lea _ldbA@GOTOFF(%ebx,%ecx), %eax - lea 240(%esp), %ecx - lea 2432+_dbA@GOTOFF(%ebx,%edx), %edx - call __libm_p19root -..B2.301: - fldt 32(%esp) - addl $32, %esp -..B2.80: - testl %edi, %edi - je ..B2.82 -..B2.81: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.302: - fldt 16(%esp) - addl $16, %esp -..B2.82: - fldt 208(%esp) - testl %esi, %esi - fldt 220(%esp) - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.344 -..B2.83: - fstpt 84(%esp) -..B2.303: - fldcw 182(%esp) - jmp ..B2.84 -..B2.344: - fstp %st(0) -..B2.84: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.85: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.86: - fstp %st(0) - fstpt 84(%esp) -..B2.87: - lea -16382(%edx), %ecx - cmpl $2, %ecx - jne ..B2.89 -..B2.88: - fldt .L_2il0floatpacket.21@GOTOFF(%ebx) - addl $-16380, %edx - fcomp %st(1) - fnstsw %ax - sahf - jbe ..L6 - movl %edx, %ecx -..L6: -..B2.89: - fldt .L_2il0floatpacket.19@GOTOFF(%ebx) - movl %ecx, %eax - fmul %st, %st(1) - lea (,%ecx,8), %edx - shll $7, %eax - fxch %st(1) - fstpt 156(%esp) - subl %edx, %eax - fxch %st(1) - fstpt 144(%esp) - lea (%ecx,%ecx,4), %edx - fldt .L_2il0floatpacket.16@GOTOFF(%ebx) - movzwl 164(%esp), %ecx - fldt 2868+_ldbA@GOTOFF(%ebx,%eax) - andl $-32768, %ecx - fldt 2856+_ldbA@GOTOFF(%ebx,%eax) - orl $-49153, %ecx - fldt 2820+_ldbA@GOTOFF(%ebx,%eax) - fldt 2808+_ldbA@GOTOFF(%ebx,%eax) - movw %cx, 164(%esp) - fldt 156(%esp) - shll $5, %edx - fsubp %st, %st(5) - fxch %st(4) - fstpt 156(%esp) - fldt 156(%esp) - fldl 1784+_dbA@GOTOFF(%ebx,%edx) - fmul %st(1), %st - fldt 2844+_ldbA@GOTOFF(%ebx,%eax) - fxch %st(1) - faddl 1776+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1768+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1760+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1752+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1744+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1736+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1728+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1720+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1712+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1704+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddl 1696+_dbA@GOTOFF(%ebx,%edx) - fmul %st(2), %st - faddp %st, %st(5) - fxch %st(1) - fmul %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 2832+_ldbA@GOTOFF(%ebx,%eax) - faddp %st, %st(3) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmul %st(1), %st - fldt 2796+_ldbA@GOTOFF(%ebx,%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 2784+_ldbA@GOTOFF(%ebx,%eax) - faddp %st, %st(1) - fmul %st(1), %st - fld %st(1) - fldt 2772+_ldbA@GOTOFF(%ebx,%eax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 2760+_ldbA@GOTOFF(%ebx,%eax) - faddp %st, %st(1) - fldl _TWO_32H@GOTOFF(%ebx) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(2) - fstpt 48(%esp) - fldt 48(%esp) - fld %st(2) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(2), %st - fxch %st(1) - fsubr %st, %st(3) - fld %st(3) - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(6) - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(3) - fstpt 16(%esp) - fldt 16(%esp) - fldl 1632+_dbA@GOTOFF(%ebx,%edx) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - fld %st(4) - fxch %st(1) - faddl 1640+_dbA@GOTOFF(%ebx,%edx) - faddp %st, %st(3) - fld %st(1) - fmul %st(5), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fld %st(4) - fmul %st(4), %st - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(2) - fldl 1680+_dbA@GOTOFF(%ebx,%edx) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - fld %st(4) - fxch %st(1) - faddl 1688+_dbA@GOTOFF(%ebx,%edx) - faddp %st, %st(3) - fld %st(1) - fmul %st(5), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fld %st(4) - fmul %st(4), %st - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(2) - fldl 1664+_dbA@GOTOFF(%ebx,%edx) - fld %st(0) - fadd %st(5), %st - fmul %st, %st(2) - fxch %st(2) - fstpt 72(%esp) - fldt 72(%esp) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(5) - fld %st(1) - fadd %st(1), %st - fstpt 60(%esp) - fldt 60(%esp) - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(4) - faddl 1672+_dbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fxch %st(3) - fmul %st(4), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fldl 1648+_dbA@GOTOFF(%ebx,%edx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fldt 8(%ebp) - fmulp %st, %st(4) - faddl 1656+_dbA@GOTOFF(%ebx,%edx) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - addl $-32, %esp - lea 240(%esp), %eax - fxch %st(1) - fstpt (%esp) - fldt -64(%eax) - fstpt 12(%esp) - fldt 12(%esp) - movl %eax, 24(%esp) - fxch %st(1) - fstpt 64(%esp) - fstpt -64(%eax) - call __libm_logl_k80 -..B2.304: - fstp %st(0) - fldt 176(%esp) - fldt 64(%esp) - addl $32, %esp -..B2.90: - fldt 84(%esp) - movzbl 93(%esp), %eax - addl $-32, %esp - andl $128, %eax - lea 216(%esp), %edx - shrl $7, %eax - fmuls ones@GOTOFF(%ebx,%eax,4) - fstpt (%esp) - fldt (%esp) - fxch %st(2) - fstpt 12(%esp) - movl %edx, 24(%esp) - fxch %st(1) - fstpt 80(%esp) - fstpt 64(%esp) - call __libm_logl_k80 -..B2.305: - fstp %st(0) - fldt 64(%esp) - fldt 80(%esp) - addl $32, %esp -..B2.91: - fldt 16(%esp) - fld %st(1) - fmul %st(1), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(2) - fsub %st(1), %st - fxch %st(3) - fmul %st(0), %st - fldt 408+_ldbA@GOTOFF(%ebx) - fmul %st(1), %st - fldt 396+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 384+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 372+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 360+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 348+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 336+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 324+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 312+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 300+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 288+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 276+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 264+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 252+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fld %st(3) - fldt 240+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fld %st(2) - fmul %st(3), %st - fmul %st, %st(2) - fldt 228+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 168(%esp) - fmulp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fxch %st(5) - fmul %st(0), %st - faddp %st, %st(5) - fld %st(2) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(1) - fld %st(1) - fxch %st(3) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(6) - fld %st(4) - fmul %st(2), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(1) - fld %st(3) - fmul %st(3), %st - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(2) - fmul %st(5), %st - faddp %st, %st(1) - fldl 64+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(4) - fmul %st(3), %st - fxch %st(1) - faddl 72+_dbA@GOTOFF(%ebx) - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fmul %st(5), %st - fld %st(3) - fmul %st(3), %st - faddp %st, %st(1) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fldl 48+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddl 56+_dbA@GOTOFF(%ebx) - faddp %st, %st(2) - fld %st(0) - fadd %st(4), %st - fsubp %st, %st(4) - fsub %st(3), %st - faddp %st, %st(1) - fld %st(1) - fmul %st(3), %st - fxch %st(3) - fmul %st(4), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(2) - fld %st(3) - fldt (%esp) - faddp %st, %st(2) - fxch %st(1) - fstpt 72(%esp) - fldt 72(%esp) - fldt 208(%esp) - fld %st(0) - fxch %st(1) - fadd %st, %st(3) - fldt 220(%esp) - movzbl 81(%esp), %edx - fadd %st, %st(2) - fxch %st(2) - fstpt 60(%esp) - fldt 60(%esp) - andl $128, %edx - movzbl 69(%esp), %ecx - andl $128, %ecx - shrl $7, %edx - shrl $7, %ecx - fxch %st(3) - fmuls ones@GOTOFF(%ebx,%edx,4) - fstpt 72(%esp) - fldt 72(%esp) - fxch %st(3) - fmuls ones@GOTOFF(%ebx,%ecx,4) - fstpt 60(%esp) - fldt 60(%esp) - fcomp %st(3) - fnstsw %ax - fxch %st(2) - fstp %st(0) - sahf - jae ..B2.93 - jp ..B2.93 -..B2.92: - fxch %st(2) - fsubr %st, %st(5) - fxch %st(1) - faddp %st, %st(5) - fldt (%esp) - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - jmp ..B2.94 -..B2.93: - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(5) - faddp %st, %st(4) - fldt (%esp) - faddp %st, %st(4) -..B2.94: - fldt 184(%esp) - fld %st(2) - fadd %st(1), %st - fchs - fadd %st, %st(1) - fxch %st(1) - fchs - fsubp %st, %st(3) - fldt 196(%esp) - fsubrp %st, %st(3) - fxch %st(3) - fsubrp %st, %st(2) - fld %st(2) - fadd %st(2), %st - fstpt 72(%esp) - fldt 72(%esp) - fld %st(1) - movzbl 81(%esp), %edx - fsubr %st(4), %st - andl $128, %edx - shrl $7, %edx - flds ones@GOTOFF(%ebx,%edx,4) - fmulp %st, %st(2) - fxch %st(1) - fstpt 72(%esp) - fldt 72(%esp) - fld %st(2) - fadd %st(6), %st - fstpt 60(%esp) - fldt 60(%esp) - movzbl 69(%esp), %ecx - andl $128, %ecx - shrl $7, %ecx - flds ones@GOTOFF(%ebx,%ecx,4) - fmulp %st, %st(1) - fxch %st(1) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.96 -..B2.95: - fxch %st(1) - fsubr %st, %st(4) - fxch %st(2) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(2) - fxch %st(1) - jmp ..B2.97 -..B2.96: - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(4) - fxch %st(4) - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) -..B2.97: - testl %edi, %edi - je ..B2.99 -..B2.98: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 32(%esp) - fstpt 48(%esp) - call fesetround -..B2.306: - fldt 48(%esp) - fldt 32(%esp) - fldt 16(%esp) - addl $16, %esp -..B2.99: - testl %esi, %esi - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.345 -..B2.100: - fstpt 60(%esp) -..B2.307: - fldcw 182(%esp) - jmp ..B2.101 -..B2.345: - fstp %st(0) -..B2.101: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.102: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.103: - fstp %st(2) - fstp %st(1) - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - lea 1008+_dbA@GOTOFF(%ebx), %ecx - movl 44(%esp), %eax - cmpl $16385, %edx - movl %ecx, (%esp) - fmul %st, %st(1) - movl $1, (%eax) - lea 2376+_ldbA@GOTOFF(%ebx), %eax - jne ..B2.105 -..B2.104: - fmul %st, %st(1) - addl $96, %eax - addl $176, (%esp) -..B2.105: - fstp %st(0) - fldt .L_2il0floatpacket.16@GOTOFF(%ebx) - addl $-32, %esp - fsubrp %st, %st(1) - fstpt (%esp) - lea 36(%esp), %ecx - movl 32(%esp), %edx - call __libm_p25 -..B2.308: - addl $32, %esp -..B2.106: - testl %edi, %edi - je ..B2.108 -..B2.107: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.309: - addl $16, %esp -..B2.108: - fldt 4(%esp) - testl %esi, %esi - fldt 16(%esp) - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.110 -..B2.109: - fldcw 182(%esp) -..B2.110: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.111: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.112: - fstp %st(2) - fstp %st(1) - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fld %st(1) - cmpl $0, 4(%esp) - lea 1908+_ldbA@GOTOFF(%ebx), %eax - lea 128+_dbA@GOTOFF(%ebx), %edx - fsub %st(1), %st - jl ..B2.214 -..B2.113: - fstp %st(1) - fstp %st(1) - movl 44(%esp), %ecx - movl $1, (%ecx) -..B2.114: - addl $-32, %esp - lea 36(%esp), %ecx - fstpt (%esp) - call __libm_p25 -..B2.310: - addl $32, %esp -..B2.115: - testl %edi, %edi - je ..B2.117 -..B2.116: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.311: - addl $16, %esp -..B2.117: - fldt 4(%esp) - testl %esi, %esi - fldt 16(%esp) - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.119 -..B2.118: - fldcw 182(%esp) -..B2.119: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.120: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.121: - addl $-16, %esp - fxch %st(2) - fstpt (%esp) - fldt (%esp) - fxch %st(2) - fstpt 144(%esp) - fxch %st(2) - fstps 44(%esp) - fxch %st(1) - fstpt 160(%esp) - fstpt 48(%esp) - call nearbyintl@PLT -..B2.312: - fldt 48(%esp) - fld %st(0) - fsub %st(2), %st - fldt 160(%esp) - fucom %st(1) - fnstsw %ax - flds 44(%esp) - fldt 144(%esp) - addl $16, %esp - sahf - jp ..B2.122 - je ..B2.223 -..B2.122: - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fcomp %st(5) - fnstsw %ax - sahf - jae ..B2.139 - jp ..B2.139 -..B2.123: - fxch %st(5) - fnstcw (%esp) - movzwl (%esp), %eax - orl $3072, %eax - movl %eax, 8(%esp) - fldcw 8(%esp) - fistl 16(%esp) - fldcw (%esp) - movl 16(%esp), %edx - fxch %st(3) - fcom %st(2) - fnstsw %ax - movl %edx, 12(%esp) - negl %edx - lea -2(%edx), %ecx - addl $15, %edx - sahf - ja ..L7 - movl %ecx, %edx -..L7: - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt 636+_ldbA@GOTOFF(%ecx,%ebx) - lea (%edx,%edx,2), %ecx - fsubr %st(5), %st - fldt 1068+_ldbA@GOTOFF(%ebx,%ecx,8) - fcomp %st(6) - fnstsw %ax - sahf - jae ..B2.137 - jp ..B2.137 -..B2.124: - fldt 1080+_ldbA@GOTOFF(%ebx,%ecx,8) - fcomp %st(6) - fnstsw %ax - sahf - jbe ..B2.137 -..B2.125: - fstp %st(6) - fstp %st(3) - fstp %st(3) - fstp %st(2) - movl 12(%esp), %eax - negl %eax - andl $1, %eax - movl %eax, 12(%esp) - jne ..B2.128 -..B2.126: - fcom %st(1) - fnstsw %ax - sahf - jae ..B2.129 - jp ..B2.129 -..B2.127: - fstp %st(1) - movl 44(%esp), %eax - movl $-1, (%eax) - jmp ..B2.130 -..B2.128: - cmpl $0, 12(%esp) - jne ..B2.216 -..B2.129: - fstp %st(1) - movl 44(%esp), %eax - movl $1, (%eax) -..B2.130: - addl $-32, %esp - lea (,%edx,4), %eax - lea (%edx,%edx,4), %edx - shll $5, %edx - lea 3360(%eax,%eax,8), %ecx - lea _ldbA@GOTOFF(%ebx,%ecx), %eax - fxch %st(1) - fstpt (%esp) - lea 240(%esp), %ecx - fstpt 32(%esp) - lea 2432+_dbA@GOTOFF(%ebx,%edx), %edx - call __libm_p19root -..B2.313: - fldt 32(%esp) - addl $32, %esp -..B2.131: - testl %edi, %edi - je ..B2.133 -..B2.132: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.314: - fldt 16(%esp) - addl $16, %esp -..B2.133: - fldt 208(%esp) - testl %esi, %esi - fldt 220(%esp) - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.346 -..B2.134: - fstpt 84(%esp) -..B2.315: - fldcw 182(%esp) - jmp ..B2.135 -..B2.346: - fstp %st(0) -..B2.135: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.136: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.137: - fstp %st(0) - fstpt 84(%esp) - fldt 84(%esp) - fxch %st(5) - fxch %st(3) - fxch %st(5) - jmp ..B2.140 -..B2.139: - fxch %st(3) - fstpt 84(%esp) - fldt 84(%esp) -..B2.140: - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - fmul %st, %st(6) - fstpt 96(%esp) - addl $-16, %esp - fxch %st(5) - fstpt (%esp) - fldt (%esp) - fstpt 32(%esp) - fxch %st(4) - fstpt 16(%esp) - fxch %st(1) - fstpt 144(%esp) - fxch %st(2) - fstps 44(%esp) - fxch %st(1) - fstpt 160(%esp) - fstpt 48(%esp) - call nearbyintl@PLT -..B2.316: - fldt 48(%esp) - fldt 160(%esp) - flds 44(%esp) - fldt 144(%esp) - fldt 16(%esp) - fldt 32(%esp) - addl $16, %esp - fucomp %st(6) - fnstsw %ax - fxch %st(5) - fstp %st(0) - sahf - jp ..B2.141 - je ..B2.220 -..B2.141: - fxch %st(4) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B2.143 -..B2.142: - movl 44(%esp), %eax - movl $-1, (%eax) - jmp ..B2.144 -..B2.143: - movl 44(%esp), %eax - movl $1, (%eax) -..B2.144: - fmulp %st, %st(2) - fxch %st(1) - fstpt 156(%esp) - fldt 156(%esp) - addl $-32, %esp - lea 240(%esp), %eax - fstpt (%esp) - fstpt 12(%esp) - fldt 12(%esp) - movl %eax, 24(%esp) - fxch %st(1) - fstpt -80(%eax) - fstpt -64(%eax) - call __libm_logl_k80 -..B2.317: - fstp %st(0) - fldt 176(%esp) - fldt 160(%esp) - addl $32, %esp -..B2.145: - fldt 156(%esp) - lea 420+_ldbA@GOTOFF(%ebx), %ecx - fld %st(0) - fld %st(1) - fxch %st(4) - fstpt 144(%esp) - lea 80+_dbA@GOTOFF(%ebx), %edx - fxch %st(2) - fstpt 128(%esp) - fldt 128(%esp) - fldl _TWO_32H@GOTOFF(%ebx) - fstpt (%esp) - fldt (%esp) - fmul %st, %st(3) - fxch %st(3) - fadd %st, %st(4) - fsubrp %st, %st(4) - fxch %st(3) - fstpt 48(%esp) - fldt 48(%esp) - fld %st(1) - fsub %st(1), %st - fldt 208(%esp) - fldt 96(%esp) - fld %st(0) - fmul %st(2), %st - fstpt 112(%esp) - fxch %st(6) - fsubrp %st, %st(1) - fmul %st, %st(4) - fxch %st(4) - fstpt 72(%esp) - fldt 72(%esp) - fld %st(4) - fadd %st(1), %st - fstpt 60(%esp) - fldt 60(%esp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fsubr %st, %st(5) - fmul %st(2), %st - fldt 220(%esp) - fmul %st, %st(7) - faddp %st, %st(6) - fxch %st(4) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fld %st(0) - fldt 112(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(3) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - fxch %st(1) - fstp %st(0) - fldt 144(%esp) - fldt 128(%esp) - sahf - jbe ..B2.147 -..B2.146: - addl $108, %ecx - addl $16, %edx -..B2.147: - fldt (%esp) - fld %st(0) - fld %st(4) - movzbl 93(%esp), %eax - fadd %st(6), %st - fdivr %st(3), %st - andl $128, %eax - fmul %st, %st(1) - fld %st(5) - fxch %st(5) - fstpt 144(%esp) - fld %st(1) - shrl $7, %eax - fadd %st(1), %st - fsubp %st, %st(2) - fxch %st(1) - fmul %st, %st(5) - fxch %st(3) - fsubrp %st, %st(5) - fsub %st(2), %st - fld %st(0) - fadd %st(3), %st - fmul %st, %st(6) - fxch %st(1) - fmul %st, %st(4) - fxch %st(6) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - fsubrp %st, %st(3) - fld %st(0) - fadd %st(3), %st - fmul %st(0), %st - fldt 96(%ecx) - fmul %st(1), %st - fldt 84(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldl (%edx) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(4) - fld %st(0) - fadd %st(5), %st - fsubp %st, %st(5) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(4), %st - fstpt 208(%esp) - fldt 208(%esp) - fxch %st(2) - fsub %st(4), %st - fxch %st(4) - fmul %st(5), %st - fxch %st(1) - faddl 8(%edx) - faddp %st, %st(4) - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 220(%esp) - fldt 220(%esp) - fldl 112+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddl 120+_dbA@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt 96(%esp) - fldt 84(%esp) - addl $-32, %esp - fmuls ones@GOTOFF(%ebx,%eax,4) - lea 216(%esp), %edx - fstpt (%esp) - fldt (%esp) - fldt -40(%edx) - fstpt 12(%esp) - movl %edx, 24(%esp) - fstpt -72(%edx) - fstpt -56(%edx) - call __libm_logl_k80 -..B2.318: - fstp %st(0) - fldt 160(%esp) - fldt 144(%esp) - addl $32, %esp -..B2.148: - fldt (%esp) - fld %st(1) - fmul %st(1), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(2) - fsub %st(1), %st - fxch %st(3) - fmul %st(0), %st - fldt 408+_ldbA@GOTOFF(%ebx) - fmul %st(1), %st - fldt 396+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 384+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 372+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 360+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 348+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 336+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 324+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 312+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 300+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 288+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 276+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 264+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 252+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 240+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fld %st(1) - fmul %st(2), %st - fldt 228+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fld %st(3) - fmul %st(1), %st - fldt 168(%esp) - fmulp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fxch %st(5) - fmul %st(0), %st - faddp %st, %st(5) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fld %st(2) - fxch %st(2) - fsub %st(4), %st - faddp %st, %st(6) - fld %st(4) - fmul %st(3), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - fmul %st(5), %st - fld %st(3) - fmul %st(3), %st - faddp %st, %st(1) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fldl 64+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fxch %st(1) - faddl 72+_dbA@GOTOFF(%ebx) - faddp %st, %st(3) - fld %st(4) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - fld %st(3) - fmul %st(2), %st - faddp %st, %st(1) - fxch %st(1) - fmul %st(5), %st - faddp %st, %st(1) - fldl 48+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(2) - fsub %st(4), %st - fld %st(3) - fmul %st(5), %st - fxch %st(5) - fmul %st(6), %st - fxch %st(3) - faddl 56+_dbA@GOTOFF(%ebx) - faddp %st, %st(2) - faddp %st, %st(1) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(4) - fadd %st(3), %st - fstpt 48(%esp) - fldt 48(%esp) - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 96(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 184(%esp) - fld %st(0) - fchs - fldt 32(%esp) - fld %st(0) - fadd %st(3), %st - fstpt 116(%esp) - fldt 116(%esp) - fxch %st(1) - fcomp %st(2) - fnstsw %ax - fxch %st(1) - fstp %st(0) - fldt 196(%esp) - sahf - jbe ..B2.150 -..B2.149: - fldt 32(%esp) - fsub %st(2), %st - faddp %st, %st(3) - fldt 16(%esp) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - jmp ..B2.151 -..B2.150: - fldt 32(%esp) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 16(%esp) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) -..B2.151: - movzbl 125(%esp), %edx - fld %st(0) - movzbl 57(%esp), %ecx - andl $128, %edx - andl $128, %ecx - fadd %st(2), %st - shrl $7, %edx - shrl $7, %ecx - flds ones@GOTOFF(%ebx,%edx,4) - fmul %st(2), %st - fstpt 72(%esp) - fldt 72(%esp) - flds ones@GOTOFF(%ebx,%ecx,4) - fmul %st(4), %st - fxch %st(1) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.153 -..B2.152: - fldt 32(%esp) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - jmp ..B2.154 -..B2.153: - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt 32(%esp) - faddp %st, %st(2) -..B2.154: - testl %edi, %edi - je ..B2.156 -..B2.155: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 32(%esp) - fstpt 48(%esp) - call fesetround -..B2.319: - fldt 48(%esp) - fldt 32(%esp) - fldt 16(%esp) - addl $16, %esp -..B2.156: - testl %esi, %esi - faddp %st, %st(1) - fchs - fstpt 116(%esp) - je ..B2.347 -..B2.157: - fstpt 60(%esp) -..B2.320: - fldcw 182(%esp) - jmp ..B2.158 -..B2.347: - fstp %st(0) -..B2.158: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.159: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.160: - fstp %st(3) - movl 44(%esp), %eax - addl $-32, %esp - lea 240(%esp), %edx - movl $1, (%eax) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl %edx, 24(%esp) - fstpt -80(%edx) - call __libm_logl_k80 -..B2.321: - fstp %st(0) - fldt 160(%esp) - addl $32, %esp -..B2.161: - fldt 8(%ebp) - lea 420+_ldbA@GOTOFF(%ebx), %ecx - fld %st(0) - fld %st(1) - fxch %st(3) - fstpt 128(%esp) - fldt 128(%esp) - fld %st(2) - fldl _TWO_32H@GOTOFF(%ebx) - lea 80+_dbA@GOTOFF(%ebx), %edx - fmul %st, %st(3) - fxch %st(3) - fadd %st, %st(5) - fsubrp %st, %st(5) - fxch %st(4) - fstpt 32(%esp) - fldt 32(%esp) - fsubr %st, %st(4) - fxch %st(2) - fstpt 48(%esp) - fldt 48(%esp) - fldt 208(%esp) - fld %st(0) - fxch %st(3) - fsubrp %st, %st(1) - fmul %st, %st(1) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fld %st(1) - fadd %st(1), %st - fstpt (%esp) - fldt (%esp) - fsubp %st, %st(1) - fmul %st, %st(5) - fsubr %st, %st(1) - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - fstpt 64(%esp) - fldt 220(%esp) - fmul %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(5) - fmulp %st, %st(2) - fld %st(1) - fldt 64(%esp) - fadd %st, %st(1) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 128(%esp) - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B2.163 -..B2.162: - addl $108, %ecx - addl $16, %edx -..B2.163: - fldt 32(%esp) - testl %edi, %edi - fsubr %st, %st(3) - fxch %st(4) - fstpt 64(%esp) - fld %st(3) - fadd %st(3), %st - fdivr %st(1), %st - fxch %st(2) - fstpt 80(%esp) - fldt 48(%esp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - fadd %st(4), %st - fsubp %st, %st(1) - fsubr %st, %st(3) - fld %st(3) - fadd %st(1), %st - fmul %st, %st(5) - fld %st(6) - fmul %st(5), %st - faddp %st, %st(6) - fxch %st(1) - fmul %st, %st(6) - fxch %st(3) - fsubrp %st, %st(6) - fxch %st(4) - faddp %st, %st(5) - fxch %st(4) - fmulp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fmul %st(0), %st - fldt 96(%ecx) - fmul %st(1), %st - fldt 84(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldl (%edx) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(1) - fsub %st(4), %st - fld %st(3) - fmul %st(5), %st - fstpt 208(%esp) - fldt 208(%esp) - fxch %st(3) - fmul %st, %st(5) - fxch %st(2) - faddl 8(%edx) - faddp %st, %st(1) - fmul %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 220(%esp) - fldt 220(%esp) - fldl 112+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fldt 64(%esp) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fxch %st(1) - faddl 120+_dbA@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 80(%esp) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - je ..B2.166 -..B2.164: - fstpt 116(%esp) - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 80(%esp) - call fesetround -..B2.322: - fldt 80(%esp) - addl $16, %esp -..B2.165: - fldt 116(%esp) -..B2.166: - testl %esi, %esi - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.168 -..B2.167: - fldt 32(%esp) - fstpt 48(%esp) - fldt (%esp) - fstpt 60(%esp) - fldt 16(%esp) - fstpt 72(%esp) -..B2.323: - fldcw 182(%esp) -..B2.168: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.169: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.170: - fstp %st(3) - movl 44(%esp), %eax - addl $-32, %esp - lea 240(%esp), %edx - movl $1, (%eax) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl %edx, 24(%esp) - fstpt -80(%edx) - call __libm_logl_k80 -..B2.324: - fstp %st(0) - fldt 160(%esp) - addl $32, %esp -..B2.171: - fldt 8(%ebp) - testl %edi, %edi - fldt 12+_TWO5600@GOTOFF(%ebx) - fmulp %st, %st(1) - fld %st(0) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_32H@GOTOFF(%ebx) - fld %st(0) - fmul %st(2), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fsubr %st(2), %st - fldt 208(%esp) - fsubp %st, %st(5) - fxch %st(1) - fmul %st(4), %st - fld %st(4) - fadd %st(1), %st - fld %st(0) - fsub %st(2), %st - fmul %st, %st(3) - fxch %st(6) - fstpt 208(%esp) - fldt 208(%esp) - fsub %st(6), %st - fldt 220(%esp) - faddp %st, %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - fmul %st, %st(4) - fxch %st(2) - fxch %st(3) - fxch %st(4) - fxch %st(1) - je ..B2.173 -..B2.172: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 32(%esp) - fstpt 48(%esp) - fstpt 64(%esp) - fstpt 80(%esp) - call fesetround -..B2.325: - fldt 80(%esp) - fldt 64(%esp) - fldt 48(%esp) - fldt 32(%esp) - fldt 16(%esp) - addl $16, %esp -..B2.173: - fldt _TWO5600@GOTOFF(%ebx) - testl %esi, %esi - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 116(%esp) - je ..B2.348 -..B2.174: - fstpt 48(%esp) - fstpt 60(%esp) - fstpt 72(%esp) -..B2.326: - fldcw 182(%esp) - jmp ..B2.175 -..B2.348: - fstp %st(2) - fstp %st(1) - fstp %st(0) -..B2.175: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.176: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.177: - fstp %st(0) - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B2.179 -..B2.178: - movl 44(%esp), %eax - movl $-1, (%eax) - jmp ..B2.180 -..B2.179: - movl 44(%esp), %eax - movl $1, (%eax) -..B2.180: - fxch %st(2) - fmulp %st, %st(1) - addl $-32, %esp - fstpt (%esp) - fldt (%esp) - lea 240(%esp), %eax - fxch %st(1) - fstpt 12(%esp) - movl %eax, 24(%esp) - movl %edx, 32(%esp) - fstpt 64(%esp) - call __libm_logl_k80 -..B2.327: - fstp %st(0) - fldt 64(%esp) - movl 32(%esp), %edx - addl $32, %esp -..B2.181: - cmpl $16313, %edx - jge ..B2.188 -..B2.182: - fldt 208(%esp) - testl %edi, %edi - fldt 220(%esp) - faddp %st, %st(1) - fchs - fstpt 116(%esp) - je ..B2.184 -..B2.183: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 48(%esp) - call fesetround -..B2.328: - fldt 48(%esp) - addl $16, %esp -..B2.184: - testl %esi, %esi - je ..B2.349 -..B2.185: - fstpt 156(%esp) -..B2.329: - fldcw 182(%esp) - jmp ..B2.186 -..B2.349: - fstp %st(0) -..B2.186: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.187: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.188: - fldt 216+_ldbA@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(1) - fstpt 156(%esp) - fldt 156(%esp) - fldt 204+_ldbA@GOTOFF(%ebx) - cmpl $0, 4(%esp) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 192+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 180+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 168+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 156+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 144+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 132+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 120+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 108+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 96+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 84+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 72+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 60+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 48+_ldbA@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fld %st(0) - fldt 36+_ldbA@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fld %st(0) - fldt 24+_ldbA@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fldt 12+_ldbA@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt _ldbA@GOTOFF(%ebx) - faddp %st, %st(4) - fld %st(3) - fldl _TWO_32H@GOTOFF(%ebx) - fld %st(0) - fmul %st(6), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fmul %st, %st(3) - fxch %st(3) - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(1) - fsub %st(4), %st - fld %st(5) - fsub %st(2), %st - fmul %st(5), %st - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fxch %st(1) - fmul %st(4), %st - fxch %st(3) - fstpt 48(%esp) - fldt 48(%esp) - fldl 32+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - fld %st(1) - fmul %st(5), %st - fxch %st(1) - faddl 40+_dbA@GOTOFF(%ebx) - faddp %st, %st(3) - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fld %st(3) - fmul %st(5), %st - fld %st(2) - fmul %st(6), %st - fxch %st(3) - fmul %st(7), %st - faddp %st, %st(1) - fxch %st(4) - fmul %st(6), %st - faddp %st, %st(4) - fldl 16+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fxch %st(1) - faddl 24+_dbA@GOTOFF(%ebx) - faddp %st, %st(5) - fld %st(1) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(5) - faddp %st, %st(3) - fld %st(2) - fmul %st(6), %st - fxch %st(5) - fmul %st(7), %st - faddp %st, %st(5) - fxch %st(2) - fmul %st(6), %st - faddp %st, %st(4) - fldl _dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(2) - fxch %st(2) - fstpt 104(%esp) - fldt 104(%esp) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fstpt 88(%esp) - fldt 88(%esp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fsubr %st, %st(2) - fmul %st(7), %st - fxch %st(3) - faddl 8+_dbA@GOTOFF(%ebx) - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fld %st(0) - fmul %st(5), %st - faddp %st, %st(2) - fmulp %st, %st(5) - faddp %st, %st(4) - fldt 208(%esp) - jl ..B2.234 -..B2.189: - fstp %st(1) - fldt 220(%esp) - fld %st(2) - testl %edi, %edi - fsub %st(2), %st - fadd %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fxch %st(2) - je ..B2.192 -..B2.190: - fstpt 116(%esp) - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 32(%esp) - fstpt 48(%esp) - call fesetround -..B2.330: - fldt 48(%esp) - fldt 32(%esp) - addl $16, %esp -..B2.191: - fldt 116(%esp) -..B2.192: - testl %esi, %esi - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.350 -..B2.193: - fldt 104(%esp) - fstpt 72(%esp) - fstpt 48(%esp) - fldt 88(%esp) - fstpt 60(%esp) -..B2.331: - fldcw 182(%esp) - jmp ..B2.194 -..B2.350: - fstp %st(0) -..B2.194: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 -..B2.195: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.196: - fstp %st(0) - call __stack_chk_fail@PLT -..B2.202: - fcom %st(2) - fnstsw %ax - sahf - ja ..B2.73 - jmp ..B2.75 -..B2.205: - fstp %st(0) - fstp %st(2) - fstp %st(0) - fstp %st(0) - movl 44(%esp), %eax - testl %edi, %edi - movl $1, (%eax) - je ..B2.207 -..B2.206: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.332: - addl $16, %esp -..B2.207: - fld1 - fldz - testl %esi, %esi - fdivrp %st, %st(1) - fstpt 116(%esp) - je ..B2.209 -..B2.208: - fldcw 182(%esp) -..B2.209: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 - jmp ..B2.38 -..B2.214: - fstp %st(0) - movl 44(%esp), %ecx - addl $176, %edx - addl $96, %eax - faddp %st, %st(1) - movl $-1, (%ecx) - jmp ..B2.114 -..B2.216: - fcom %st(1) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - jbe ..B2.218 -..B2.217: - movl 44(%esp), %eax - movl $-1, (%eax) - jmp ..B2.130 -..B2.218: - movl 44(%esp), %eax - movl $1, (%eax) - jmp ..B2.130 -..B2.220: - fxch %st(4) - fcomp %st(2) - fnstsw %ax - sahf - jae ..B2.143 - jp ..B2.143 - jmp ..B2.142 -..B2.223: - fstp %st(0) - fstp %st(4) - fstp %st(2) - fstp %st(1) - fstp %st(1) - movl 44(%esp), %eax - testl %edi, %edi - movl $1, (%eax) - je ..B2.225 -..B2.224: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B2.333: - fldt 16(%esp) - addl $16, %esp -..B2.225: - fld1 - fldz - testl %esi, %esi - fdivrp %st, %st(1) - fstpt 116(%esp) - je ..B2.351 -..B2.226: - fstpt 84(%esp) -..B2.334: - fldcw 182(%esp) - jmp ..B2.227 -..B2.351: - fstp %st(0) -..B2.227: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 - jmp ..B2.38 -..B2.234: - fldt 408+_ldbA@GOTOFF(%ebx) - testl %edi, %edi - fxch %st(1) - fstpt 16(%esp) - fld %st(1) - fsub %st(4), %st - fxch %st(2) - fmul %st(0), %st - fmul %st, %st(1) - fxch %st(5) - fstpt (%esp) - fxch %st(3) - fstpt 32(%esp) - fldt 32(%esp) - fldt 396+_ldbA@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fldt 384+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 372+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 360+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 348+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 336+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 324+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 312+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 300+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 288+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 276+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 264+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 252+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 240+_ldbA@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(4) - fldt 228+_ldbA@GOTOFF(%ebx) - faddp %st, %st(4) - fld %st(3) - fld %st(3) - fmul %st(4), %st - fldt 168(%esp) - fmulp %st, %st(5) - fxch %st(2) - fmul %st, %st(4) - fmul %st(0), %st - faddp %st, %st(4) - fld %st(1) - fldt 48(%esp) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(6) - fld %st(0) - fmul %st(7), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(6) - fmul %st(5), %st - fld %st(3) - fmul %st(7), %st - faddp %st, %st(1) - fxch %st(5) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(5) - fldl 64+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fxch %st(1) - faddl 72+_dbA@GOTOFF(%ebx) - faddp %st, %st(6) - fld %st(1) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(5) - faddp %st, %st(2) - fld %st(2) - fmul %st(5), %st - fxch %st(5) - fmul %st(6), %st - fld %st(3) - fmul %st(3), %st - faddp %st, %st(1) - fxch %st(2) - fmul %st(6), %st - faddp %st, %st(2) - fldl 48+_dbA@GOTOFF(%ebx) - fld %st(0) - fadd %st(6), %st - fmul %st, %st(2) - fsubr %st, %st(1) - fxch %st(6) - faddp %st, %st(1) - faddl 56+_dbA@GOTOFF(%ebx) - faddp %st, %st(2) - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fmul %st(5), %st - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(4) - faddp %st, %st(3) - fld %st(0) - fldt 16(%esp) - fadd %st, %st(1) - fxch %st(1) - fchs - fadd %st, %st(1) - fxch %st(1) - fchs - fsubp %st, %st(2) - fldt 220(%esp) - fsubrp %st, %st(2) - fldt (%esp) - fsubrp %st, %st(2) - fld %st(0) - fsub %st(3), %st - fsub %st, %st(1) - fxch %st(1) - fchs - fsubp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fldt 32(%esp) - fxch %st(2) - fxch %st(1) - je ..B2.236 -..B2.235: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 32(%esp) - fstpt 48(%esp) - call fesetround -..B2.335: - fldt 48(%esp) - fldt 32(%esp) - fldt 16(%esp) - addl $16, %esp -..B2.236: - testl %esi, %esi - faddp %st, %st(1) - fstpt 116(%esp) - je ..B2.352 -..B2.237: - fldt 104(%esp) - fstpt 72(%esp) - fstpt 48(%esp) - fldt 88(%esp) - fstpt 60(%esp) -..B2.336: - fldcw 182(%esp) - jmp ..B2.238 -..B2.352: - fstp %st(0) -..B2.238: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 - jmp ..B2.38 -..B2.241: - cmpl $16446, %edx - jle ..B2.18 -..B2.242: - fstp %st(0) - fstp %st(1) - fstp %st(0) - fstp %st(0) - movl 44(%esp), %eax - testl %edi, %edi - movl $1, (%eax) - je ..B2.244 -..B2.243: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.337: - addl $16, %esp -..B2.244: - fld1 - fldz - testl %esi, %esi - fdivrp %st, %st(1) - fstpt 116(%esp) - je ..B2.246 -..B2.245: - fldcw 182(%esp) -..B2.246: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 - jmp ..B2.38 -..B2.249: - fstp %st(0) - fstp %st(1) - fstp %st(1) - movl 44(%esp), %eax - movl $1, (%eax) -..B2.250: - testl %edi, %edi - je ..B2.252 -..B2.251: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - fstpt 160(%esp) - call fesetround -..B2.338: - fldt 160(%esp) - addl $16, %esp -..B2.252: - fstpt 116(%esp) - testl %esi, %esi - je ..B2.254 -..B2.253: - fldcw 182(%esp) -..B2.254: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 - jmp ..B2.38 -..B2.258: - fstp %st(0) - fstp %st(1) - movl 44(%esp), %eax - testl %edi, %edi - movl $1, (%eax) - je ..B2.261 -..B2.259: - fstp %st(0) - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.339: - addl $16, %esp -..B2.260: - fldt 8(%ebp) -..B2.261: - fld %st(0) - testl %esi, %esi - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 116(%esp) - je ..B2.263 -..B2.262: - fldcw 182(%esp) -..B2.263: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 - jmp ..B2.38 -..B2.266: - fstp %st(1) - fstp %st(0) - fstp %st(0) - testl %edi, %edi - je ..B2.268 -..B2.267: - movl 44(%esp), %eax - addl $-16, %esp - movl 156(%esp), %edx - movl $1, (%eax) - movl %edx, (%esp) - call fesetround -..B2.340: - movzbl 17(%ebp), %eax - addl $16, %esp - movl %eax, (%esp) -..B2.268: - fld1 - fldz - fdivrp %st, %st(1) - movl (%esp), %eax - andl $128, %eax - shrl $7, %eax - movl 44(%esp), %edx - addl %eax, %eax - negl %eax - incl %eax - fstpt 116(%esp) - testl %esi, %esi - movl %eax, (%edx) - je ..B2.270 -..B2.269: - fldcw 182(%esp) -..B2.270: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 - jmp ..B2.38 -..B2.273: - fstp %st(0) - cmpl $-2147483648, 8(%esp) - jne ..B2.275 -..B2.274: - cmpl $0, 8(%ebp) - je ..B2.278 -..B2.275: - movl 44(%esp), %eax - testl %edi, %edi - movl $0, (%eax) - je ..B2.277 -..B2.276: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.341: - addl $16, %esp -..B2.277: - fldt 8(%ebp) - fadd %st(0), %st - fstpt 116(%esp) - jmp ..B2.281 -..B2.278: - movl 44(%esp), %eax - testl %edi, %edi - movl $1, (%eax) - je ..B2.280 -..B2.279: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.342: - addl $16, %esp -..B2.280: - fldt 8(%ebp) - fmul %st(0), %st - fstpt 116(%esp) -..B2.281: - testl %edi, %edi - je ..B2.283 -..B2.282: - addl $-16, %esp - movl 156(%esp), %eax - movl %eax, (%esp) - call fesetround -..B2.343: - addl $16, %esp -..B2.283: - testl %esi, %esi - je ..B2.285 -..B2.284: - fldcw 182(%esp) -..B2.285: - fldt 116(%esp) - movl 232(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.196 - jmp ..B2.38 -..B2.288: - xorl %esi, %esi - jmp ..B2.12 - .align 16,0x90 - .type __libm_lgammal,@function - .size __libm_lgammal,.-__libm_lgammal - .data -# -- End __libm_lgammal - .text -# -- Begin __libm_p25 - .text - .align 16,0x90 -__libm_p25: -# parameter 1: 8 + %esp -# parameter 2: %eax -# parameter 3: %edx -# parameter 4: %ecx -..B3.1: -..L8: - - pushl %edi - movl %eax, %edi - fldt 8(%esp) - call ..L9 -..L9: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L9](%eax), %eax - fld %st(0) - fld %st(1) - fldl 56(%edx) - fmul %st(3), %st - fldl _TWO_32H@GOTOFF(%eax) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(3) - fsub %st(3), %st - fldt 48(%edi) - fxch %st(2) - faddl 48(%edx) - fmul %st(5), %st - fldt (%edi) - fldt 60(%edi) - fxch %st(2) - faddl 152(%edx) - fmul %st(7), %st - faddl 144(%edx) - fmul %st(7), %st - faddl 168(%edx) - fmul %st(7), %st - faddl 160(%edx) - fmul %st(7), %st - faddl 104(%edx) - fmul %st(7), %st - faddl 96(%edx) - fmul %st(7), %st - faddl 120(%edx) - fmul %st(7), %st - faddl 112(%edx) - fmul %st(7), %st - faddl 136(%edx) - fmul %st(7), %st - faddl 128(%edx) - fmul %st(7), %st - faddl 40(%edx) - fmul %st(7), %st - faddl 32(%edx) - fmul %st(7), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 12(%edi) - faddp %st, %st(1) - fmul %st(4), %st - fldt 72(%edi) - faddp %st, %st(1) - fmul %st(4), %st - fldt 24(%edi) - faddp %st, %st(1) - fmul %st(4), %st - fldt 84(%edi) - faddp %st, %st(1) - fmul %st(4), %st - fld %st(2) - fldt 36(%edi) - faddp %st, %st(2) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - fmul %st(6), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fldl (%edx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(4) - fmul %st(2), %st - fxch %st(1) - faddl 88(%edx) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmul %st(5), %st - fld %st(4) - fmul %st(2), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldl 64(%edx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(4) - fmul %st(3), %st - fxch %st(1) - faddl 72(%edx) - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fld %st(4) - fmul %st(2), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldl 16(%edx) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(4) - fmul %st, %st(5) - fsubr %st, %st(2) - fmulp %st, %st(3) - fxch %st(3) - faddl 24(%edx) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fldl 80(%edx) - fld %st(0) - fadd %st(2), %st - fstpt (%ecx) - fldt (%ecx) - fsubrp %st, %st(1) - faddp %st, %st(1) - faddl 8(%edx) - faddp %st, %st(1) - fstpt 12(%ecx) - popl %edi - ret - .align 16,0x90 - .type __libm_p25,@function - .size __libm_p25,.-__libm_p25 - .data -# -- End __libm_p25 - .text -# -- Begin __libm_p19root - .text - .align 16,0x90 -__libm_p19root: -# parameter 1: 32 + %esp -# parameter 2: %eax -# parameter 3: %edx -# parameter 4: %ecx -..B4.1: -..L10: - - pushl %edi - subl $24, %esp - fldt 32(%esp) - call ..L11 -..L11: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L11](%edi), %edi - fld %st(0) - fld %st(1) - fldl 152(%edx) - fmul %st(3), %st - fldl _TWO_32H@GOTOFF(%edi) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(3) - fsub %st(3), %st - fldt 24(%eax) - fxch %st(2) - faddl 144(%edx) - fmul %st(5), %st - fldt 12(%eax) - fldt (%eax) - fxch %st(2) - faddl 136(%edx) - fmul %st(7), %st - faddl 128(%edx) - fmul %st(7), %st - faddl 120(%edx) - fmul %st(7), %st - faddl 112(%edx) - fmul %st(7), %st - faddl 104(%edx) - fmul %st(7), %st - faddl 96(%edx) - fmul %st(7), %st - faddl 88(%edx) - fmul %st(7), %st - faddl 80(%edx) - fmul %st(7), %st - faddl 72(%edx) - fmul %st(7), %st - faddl 64(%edx) - fmul %st(7), %st - faddl 56(%edx) - fmul %st(7), %st - faddl 48(%edx) - fmul %st(7), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fld %st(1) - fld %st(3) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - fmul %st(6), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldl 32(%edx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(4) - fmul %st(2), %st - fxch %st(1) - faddl 40(%edx) - faddp %st, %st(4) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fmul %st(5), %st - fld %st(4) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldl 16(%edx) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(1) - fmul %st(4), %st - fxch %st(2) - fsub %st(4), %st - fxch %st(4) - fmulp %st, %st(5) - faddl 24(%edx) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt (%esp) - fldt (%esp) - fldl (%edx) - fld %st(0) - fld %st(1) - fadd %st(4), %st - fldl 8(%edx) - fadd %st, %st(2) - fxch %st(2) - fstpt 12(%esp) - fldt 12(%esp) - movzbl 9(%esp), %edx - movzbl 21(%esp), %eax - andl $128, %edx - andl $128, %eax - shrl $7, %edx - shrl $7, %eax - fxch %st(4) - fmuls ones@GOTOFF(%edi,%edx,4) - fstpt (%esp) - fldt (%esp) - fxch %st(4) - fmuls ones@GOTOFF(%edi,%eax,4) - fcomp %st(4) - fnstsw %ax - fxch %st(3) - fstp %st(0) - sahf - jae ..B4.3 - jp ..B4.3 -..B4.2: - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - jmp ..B4.4 -..B4.3: - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) -..B4.4: - fstpt (%ecx) - fstpt 12(%ecx) - addl $24, %esp - popl %edi - ret - .align 16,0x90 - .type __libm_p19root,@function - .size __libm_p19root,.-__libm_p19root - .data -# -- End __libm_p19root - .text -# -- Begin gammal - .text - .align 16,0x90 - .globl gammal -gammal: -# parameter 1: 32 + %esp -..B5.1: -..L12: - - subl $28, %esp - fldt 32(%esp) - lea 16(%esp), %eax - fstpt (%esp) - movl %eax, 12(%esp) - call __libm_lgammal -..B5.2: - addl $28, %esp - ret - .align 16,0x90 - .type gammal,@function - .size gammal,.-gammal - .data -# -- End gammal - .text -# -- Begin lgammal_r - .text - .align 16,0x90 - .globl lgammal_r -lgammal_r: -# parameter 1: 4 + %esp -# parameter 2: 16 + %esp -..B6.1: -..L13: - - jmp __libm_lgammal - .align 16,0x90 - .type lgammal_r,@function - .size lgammal_r,.-lgammal_r - .data -# -- End lgammal_r - .text -# -- Begin gammal_r - .text - .align 16,0x90 - .globl gammal_r -gammal_r: -# parameter 1: 4 + %esp -# parameter 2: 16 + %esp -..B7.1: -..L14: - - jmp __libm_lgammal - .align 16,0x90 - .type gammal_r,@function - .size gammal_r,.-gammal_r - .data -# -- End gammal_r - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x40,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xc0,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0xbf,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x02,0x40,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x03,0xc0,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.12: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.14: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xa6,0x00,0xc0,0x00,0x00 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.15: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x00,0xc0,0x00,0x00 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.16: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.17: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0xff,0xbf,0x00,0x00 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.18: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0xbf,0x00,0x00 - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.19: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00 - .type .L_2il0floatpacket.19,@object - .size .L_2il0floatpacket.19,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.20: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0x00 - .type .L_2il0floatpacket.20,@object - .size .L_2il0floatpacket.20,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.21: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0xc0,0x00,0x00 - .type .L_2il0floatpacket.21,@object - .size .L_2il0floatpacket.21,12 - .space 4, 0x00 # pad - .align 16 -_ldbA: - .word 48403 - .word 16065 - .word 37206 - .word 35465 - .word 16381 - .word 0 - .word 32498 - .word 21186 - .word 57533 - .word 54364 - .word 49148 - .word 0 - .word 48455 - .word 64043 - .word 25991 - .word 44448 - .word 16380 - .word 0 - .word 36906 - .word 8596 - .word 53485 - .word 37761 - .word 49148 - .word 0 - .word 16786 - .word 63789 - .word 39740 - .word 32901 - .word 16380 - .word 0 - .word 43334 - .word 50722 - .word 13591 - .word 58371 - .word 49147 - .word 0 - .word 51242 - .word 42271 - .word 52839 - .word 52480 - .word 16379 - .word 0 - .word 22272 - .word 27707 - .word 58025 - .word 47684 - .word 49147 - .word 0 - .word 48537 - .word 42093 - .word 143 - .word 43693 - .word 16379 - .word 0 - .word 5437 - .word 23105 - .word 19142 - .word 40288 - .word 49147 - .word 0 - .word 43105 - .word 25781 - .word 60600 - .word 37244 - .word 16379 - .word 0 - .word 64996 - .word 46896 - .word 33038 - .word 34212 - .word 49147 - .word 0 - .word 8055 - .word 35794 - .word 25027 - .word 61223 - .word 16378 - .word 0 - .word 26586 - .word 4739 - .word 1082 - .word 51475 - .word 49146 - .word 0 - .word 65450 - .word 65402 - .word 39793 - .word 38562 - .word 16378 - .word 0 - .word 18875 - .word 24550 - .word 64026 - .word 48031 - .word 49145 - .word 0 - .word 3811 - .word 11690 - .word 33485 - .word 45433 - .word 16376 - .word 0 - .word 21488 - .word 64404 - .word 56511 - .word 56861 - .word 49142 - .word 0 - .word 64157 - .word 44249 - .word 62935 - .word 34811 - .word 16372 - .word 0 - .word 1503 - .word 1560 - .word 25992 - .word 44448 - .word 49149 - .word 0 - .word 53495 - .word 49976 - .word 39767 - .word 32901 - .word 49149 - .word 0 - .word 21693 - .word 55175 - .word 61890 - .word 52480 - .word 49148 - .word 0 - .word 18005 - .word 14879 - .word 27421 - .word 43701 - .word 49148 - .word 0 - .word 4785 - .word 48109 - .word 28463 - .word 37451 - .word 49148 - .word 0 - .word 17404 - .word 30303 - .word 36440 - .word 32768 - .word 49148 - .word 0 - .word 19413 - .word 44833 - .word 30216 - .word 58252 - .word 49147 - .word 0 - .word 61231 - .word 61633 - .word 10791 - .word 52455 - .word 49147 - .word 0 - .word 18500 - .word 21868 - .word 57423 - .word 47400 - .word 49147 - .word 0 - .word 24302 - .word 39700 - .word 47161 - .word 45652 - .word 49147 - .word 0 - .word 48514 - .word 20900 - .word 46081 - .word 58518 - .word 49146 - .word 0 - .word 11885 - .word 12460 - .word 35625 - .word 41968 - .word 49148 - .word 0 - .word 41690 - .word 14982 - .word 21018 - .word 53469 - .word 16380 - .word 0 - .word 2894 - .word 27339 - .word 226 - .word 41728 - .word 49150 - .word 0 - .word 26025 - .word 18501 - .word 20978 - .word 46979 - .word 16382 - .word 0 - .word 53900 - .word 55553 - .word 17653 - .word 38916 - .word 49150 - .word 0 - .word 46603 - .word 2912 - .word 24758 - .word 46603 - .word 49142 - .word 0 - .word 53261 - .word 3328 - .word 208 - .word 53261 - .word 16372 - .word 0 - .word 39946 - .word 2496 - .word 49308 - .word 39945 - .word 49140 - .word 0 - .word 6840 - .word 51193 - .word 61784 - .word 56488 - .word 16372 - .word 0 - .word 58384 - .word 51683 - .word 34508 - .word 64341 - .word 49141 - .word 0 - .word 53773 - .word 3360 - .word 8402 - .word 53773 - .word 16375 - .word 0 - .word 48865 - .word 31388 - .word 13912 - .word 61972 - .word 49145 - .word 0 - .word 65489 - .word 61491 - .word 45504 - .word 47092 - .word 16380 - .word 0 - .word 53102 - .word 49401 - .word 14344 - .word 45627 - .word 49151 - .word 0 - .word 2166 - .word 2831 - .word 24758 - .word 46603 - .word 49142 - .word 0 - .word 9580 - .word 21681 - .word 206 - .word 53261 - .word 16372 - .word 0 - .word 30177 - .word 46479 - .word 48966 - .word 39945 - .word 49140 - .word 0 - .word 52333 - .word 51482 - .word 18491 - .word 56488 - .word 16372 - .word 0 - .word 40942 - .word 14796 - .word 26057 - .word 64313 - .word 49141 - .word 0 - .word 50177 - .word 16139 - .word 15070 - .word 53362 - .word 16375 - .word 0 - .word 2931 - .word 59423 - .word 29748 - .word 57837 - .word 49145 - .word 0 - .word 12931 - .word 12185 - .word 50840 - .word 32873 - .word 16380 - .word 0 - .word 60991 - .word 64091 - .word 63067 - .word 49777 - .word 49149 - .word 0 - .word 24747 - .word 1987 - .word 58544 - .word 40255 - .word 49152 - .word 0 - .word 31726 - .word 62157 - .word 28132 - .word 51504 - .word 49152 - .word 0 - .word 1560 - .word 52396 - .word 29634 - .word 33090 - .word 49153 - .word 0 - .word 51301 - .word 34230 - .word 21183 - .word 41027 - .word 49153 - .word 0 - .word 26476 - .word 19428 - .word 22828 - .word 49163 - .word 49153 - .word 0 - .word 62911 - .word 28656 - .word 40943 - .word 57345 - .word 49153 - .word 0 - .word 51702 - .word 17823 - .word 6657 - .word 32768 - .word 49154 - .word 0 - .word 55405 - .word 47943 - .word 739 - .word 36864 - .word 49154 - .word 0 - .word 47506 - .word 63803 - .word 73 - .word 40960 - .word 49154 - .word 0 - .word 21270 - .word 47505 - .word 6 - .word 45056 - .word 49154 - .word 0 - .word 51059 - .word 36726 - .word 0 - .word 49152 - .word 49154 - .word 0 - .word 8970 - .word 2825 - .word 0 - .word 53248 - .word 49154 - .word 0 - .word 52133 - .word 201 - .word 0 - .word 57344 - .word 49154 - .word 0 - .word 29690 - .word 13 - .word 0 - .word 61440 - .word 49154 - .word 0 - .word 27552 - .word 0 - .word 0 - .word 32768 - .word 49155 - .word 0 - .word 1621 - .word 0 - .word 0 - .word 34816 - .word 49155 - .word 0 - .word 90 - .word 0 - .word 0 - .word 36864 - .word 49155 - .word 0 - .word 5 - .word 0 - .word 0 - .word 38912 - .word 49155 - .word 0 - .word 1630 - .word 57032 - .word 2128 - .word 45018 - .word 49152 - .word 0 - .word 10332 - .word 57727 - .word 35491 - .word 64803 - .word 49152 - .word 0 - .word 59042 - .word 30551 - .word 48083 - .word 40890 - .word 49153 - .word 0 - .word 27388 - .word 36768 - .word 38828 - .word 49140 - .word 49153 - .word 0 - .word 32744 - .word 23607 - .word 24507 - .word 57342 - .word 49153 - .word 0 - .word 30841 - .word 2766 - .word 52220 - .word 65535 - .word 49153 - .word 0 - .word 33024 - .word 16990 - .word 64796 - .word 36863 - .word 49154 - .word 0 - .word 64973 - .word 1725 - .word 65462 - .word 40959 - .word 49154 - .word 0 - .word 40731 - .word 18030 - .word 65529 - .word 45055 - .word 49154 - .word 0 - .word 14452 - .word 28809 - .word 65535 - .word 49151 - .word 49154 - .word 0 - .word 56566 - .word 62710 - .word 65535 - .word 53247 - .word 49154 - .word 0 - .word 13403 - .word 65334 - .word 65535 - .word 57343 - .word 49154 - .word 0 - .word 35846 - .word 65522 - .word 65535 - .word 61439 - .word 49154 - .word 0 - .word 10432 - .word 65535 - .word 65535 - .word 65535 - .word 49154 - .word 0 - .word 63915 - .word 65535 - .word 65535 - .word 34815 - .word 49155 - .word 0 - .word 65446 - .word 65535 - .word 65535 - .word 36863 - .word 49155 - .word 0 - .word 65531 - .word 65535 - .word 65535 - .word 38911 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38912 - .word 49152 - .word 0 - .word 47937 - .word 50671 - .word 32821 - .word 51896 - .word 49152 - .word 0 - .word 8469 - .word 62640 - .word 24113 - .word 51168 - .word 49152 - .word 0 - .word 23666 - .word 39283 - .word 12728 - .word 33144 - .word 49153 - .word 0 - .word 1338 - .word 16824 - .word 25401 - .word 33044 - .word 49153 - .word 0 - .word 38006 - .word 50858 - .word 35636 - .word 41038 - .word 49153 - .word 0 - .word 6523 - .word 10616 - .word 46244 - .word 41017 - .word 49153 - .word 0 - .word 30889 - .word 22666 - .word 15710 - .word 49165 - .word 49153 - .word 0 - .word 22694 - .word 63464 - .word 47653 - .word 49161 - .word 49153 - .word 0 - .word 7860 - .word 665 - .word 58690 - .word 57345 - .word 49153 - .word 0 - .word 35199 - .word 5838 - .word 25732 - .word 57345 - .word 49153 - .word 0 - .word 27551 - .word 53562 - .word 7766 - .word 32768 - .word 49154 - .word 0 - .word 34954 - .word 15277 - .word 5706 - .word 32768 - .word 49154 - .word 0 - .word 10026 - .word 1321 - .word 863 - .word 36864 - .word 49154 - .word 0 - .word 38128 - .word 3645 - .word 634 - .word 36864 - .word 49154 - .word 0 - .word 22656 - .word 19824 - .word 86 - .word 40960 - .word 49154 - .word 0 - .word 3271 - .word 26602 - .word 63 - .word 40960 - .word 49154 - .word 0 - .word 57583 - .word 55422 - .word 7 - .word 45056 - .word 49154 - .word 0 - .word 8869 - .word 50081 - .word 5 - .word 45056 - .word 49154 - .word 0 - .word 59569 - .word 42847 - .word 0 - .word 49152 - .word 49154 - .word 0 - .word 6316 - .word 31480 - .word 0 - .word 49152 - .word 49154 - .word 0 - .word 65078 - .word 3295 - .word 0 - .word 53248 - .word 49154 - .word 0 - .word 35775 - .word 2421 - .word 0 - .word 53248 - .word 49154 - .word 0 - .word 28054 - .word 235 - .word 0 - .word 57344 - .word 49154 - .word 0 - .word 63410 - .word 172 - .word 0 - .word 57344 - .word 49154 - .word 0 - .word 45561 - .word 15 - .word 0 - .word 61440 - .word 49154 - .word 0 - .word 34811 - .word 11 - .word 0 - .word 61440 - .word 49154 - .word 0 - .word 32144 - .word 0 - .word 0 - .word 32768 - .word 49155 - .word 0 - .word 23616 - .word 0 - .word 0 - .word 32768 - .word 49155 - .word 0 - .word 1891 - .word 0 - .word 0 - .word 34816 - .word 49155 - .word 0 - .word 1389 - .word 0 - .word 0 - .word 34816 - .word 49155 - .word 0 - .word 105 - .word 0 - .word 0 - .word 36864 - .word 49155 - .word 0 - .word 77 - .word 0 - .word 0 - .word 36864 - .word 49155 - .word 0 - .word 6 - .word 0 - .word 0 - .word 38912 - .word 49155 - .word 0 - .word 5 - .word 0 - .word 0 - .word 38912 - .word 49155 - .word 0 - .word 30094 - .word 17612 - .word 34825 - .word 45621 - .word 49152 - .word 0 - .word 27787 - .word 64487 - .word 61865 - .word 44498 - .word 49152 - .word 0 - .word 45180 - .word 62215 - .word 30788 - .word 64910 - .word 49152 - .word 0 - .word 56909 - .word 5419 - .word 21954 - .word 64678 - .word 49152 - .word 0 - .word 26983 - .word 61012 - .word 55414 - .word 40900 - .word 49153 - .word 0 - .word 17042 - .word 26812 - .word 58543 - .word 40878 - .word 49153 - .word 0 - .word 17649 - .word 49100 - .word 16895 - .word 49142 - .word 49153 - .word 0 - .word 47753 - .word 6644 - .word 42105 - .word 49138 - .word 49153 - .word 0 - .word 56665 - .word 15855 - .word 40064 - .word 57342 - .word 49153 - .word 0 - .word 9214 - .word 11959 - .word 6291 - .word 57342 - .word 49153 - .word 0 - .word 44995 - .word 64071 - .word 54163 - .word 65535 - .word 49153 - .word 0 - .word 35553 - .word 53091 - .word 49943 - .word 65535 - .word 49153 - .word 0 - .word 39205 - .word 16423 - .word 64904 - .word 36863 - .word 49154 - .word 0 - .word 61074 - .word 52942 - .word 64669 - .word 36863 - .word 49154 - .word 0 - .word 11000 - .word 54094 - .word 65472 - .word 40959 - .word 49154 - .word 0 - .word 41911 - .word 24986 - .word 65449 - .word 40959 - .word 49154 - .word 0 - .word 33350 - .word 16833 - .word 65530 - .word 45055 - .word 49154 - .word 0 - .word 41532 - .word 8229 - .word 65528 - .word 45055 - .word 49154 - .word 0 - .word 52046 - .word 34170 - .word 65535 - .word 49151 - .word 49154 - .word 0 - .word 9080 - .word 22531 - .word 65535 - .word 49151 - .word 49154 - .word 0 - .word 19128 - .word 63123 - .word 65535 - .word 53247 - .word 49154 - .word 0 - .word 61194 - .word 62227 - .word 65535 - .word 53247 - .word 49154 - .word 0 - .word 43497 - .word 65363 - .word 65535 - .word 57343 - .word 49154 - .word 0 - .word 46501 - .word 65299 - .word 65535 - .word 57343 - .word 49154 - .word 0 - .word 33483 - .word 65524 - .word 65535 - .word 61439 - .word 49154 - .word 0 - .word 16207 - .word 65520 - .word 65535 - .word 61439 - .word 49154 - .word 0 - .word 18477 - .word 65535 - .word 65535 - .word 65535 - .word 49154 - .word 0 - .word 1013 - .word 65535 - .word 65535 - .word 65535 - .word 49154 - .word 0 - .word 64152 - .word 65535 - .word 65535 - .word 34815 - .word 49155 - .word 0 - .word 63638 - .word 65535 - .word 65535 - .word 34815 - .word 49155 - .word 0 - .word 65459 - .word 65535 - .word 65535 - .word 36863 - .word 49155 - .word 0 - .word 65431 - .word 65535 - .word 65535 - .word 36863 - .word 49155 - .word 0 - .word 65532 - .word 65535 - .word 65535 - .word 38911 - .word 49155 - .word 0 - .word 65531 - .word 65535 - .word 65535 - .word 38911 - .word 49155 - .word 0 - .word 16368 - .word 23276 - .word 14028 - .word 45039 - .word 16386 - .word 0 - .word 59281 - .word 7220 - .word 1358 - .word 44002 - .word 16385 - .word 0 - .word 209 - .word 31529 - .word 17251 - .word 45971 - .word 16384 - .word 0 - .word 22774 - .word 54591 - .word 46864 - .word 55119 - .word 16383 - .word 0 - .word 36309 - .word 6992 - .word 45734 - .word 65508 - .word 49154 - .word 0 - .word 57509 - .word 44567 - .word 44472 - .word 62561 - .word 49153 - .word 0 - .word 24352 - .word 36914 - .word 35595 - .word 62910 - .word 49152 - .word 0 - .word 36298 - .word 16311 - .word 10079 - .word 34683 - .word 49152 - .word 0 - .word 8745 - .word 24487 - .word 32401 - .word 58540 - .word 16393 - .word 0 - .word 64710 - .word 25493 - .word 17440 - .word 41602 - .word 16391 - .word 0 - .word 9540 - .word 49275 - .word 24345 - .word 64260 - .word 16388 - .word 0 - .word 32123 - .word 43450 - .word 42726 - .word 58824 - .word 16386 - .word 0 - .word 56179 - .word 18517 - .word 55467 - .word 35137 - .word 49163 - .word 0 - .word 59411 - .word 7122 - .word 11027 - .word 48002 - .word 49160 - .word 0 - .word 11599 - .word 47165 - .word 19459 - .word 34091 - .word 49158 - .word 0 - .word 3871 - .word 11740 - .word 51838 - .word 51028 - .word 49155 - .word 0 - .word 54329 - .word 49239 - .word 6514 - .word 47686 - .word 16379 - .word 0 - .word 32133 - .word 56 - .word 14391 - .word 58371 - .word 16379 - .word 0 - .word 29265 - .word 29887 - .word 53486 - .word 37761 - .word 16380 - .word 0 - .word 40734 - .word 56364 - .word 61890 - .word 52480 - .word 16379 - .word 0 - .word 62017 - .word 50151 - .word 39767 - .word 32901 - .word 16380 - .word 0 - .word 62465 - .word 1557 - .word 25992 - .word 44448 - .word 16380 - .word 0 - .word 46350 - .word 21258 - .word 57533 - .word 54364 - .word 16380 - .word 0 - .word 28472 - .word 57318 - .word 11755 - .word 48239 - .word 49136 - .word 0 - .word 64030 - .word 27012 - .word 42555 - .word 59902 - .word 49138 - .word 0 - .word 15295 - .word 64624 - .word 11797 - .word 40022 - .word 49141 - .word 0 - .word 40088 - .word 48672 - .word 55416 - .word 53395 - .word 16369 - .word 0 - .word 32150 - .word 7351 - .word 22467 - .word 34203 - .word 16372 - .word 0 - .word 32397 - .word 56161 - .word 46934 - .word 48494 - .word 16374 - .word 0 - .word 35896 - .word 51119 - .word 32272 - .word 61954 - .word 49143 - .word 0 - .word 64369 - .word 46577 - .word 49946 - .word 47894 - .word 16383 - .word 0 - .word 13507 - .word 11243 - .word 36867 - .word 37912 - .word 16374 - .word 0 - .word 13500 - .word 7397 - .word 345 - .word 51175 - .word 16375 - .word 0 - .word 36308 - .word 1299 - .word 15549 - .word 37687 - .word 16377 - .word 0 - .word 1494 - .word 43036 - .word 5286 - .word 33882 - .word 16379 - .word 0 - .word 51612 - .word 44256 - .word 49203 - .word 47051 - .word 49141 - .word 0 - .word 24103 - .word 45476 - .word 53751 - .word 61816 - .word 49142 - .word 0 - .word 18204 - .word 4207 - .word 64680 - .word 43260 - .word 49144 - .word 0 - .word 39634 - .word 35210 - .word 18170 - .word 34381 - .word 49146 - .word 0 - .word 30073 - .word 2874 - .word 60159 - .word 61890 - .word 16373 - .word 0 - .word 21923 - .word 37483 - .word 63587 - .word 45930 - .word 16375 - .word 0 - .word 17610 - .word 34235 - .word 25953 - .word 38432 - .word 16377 - .word 0 - .word 27391 - .word 45200 - .word 21903 - .word 41572 - .word 16379 - .word 0 - .word 8472 - .word 18376 - .word 37439 - .word 36904 - .word 49141 - .word 0 - .word 15138 - .word 28105 - .word 43771 - .word 52749 - .word 49142 - .word 0 - .word 19597 - .word 13484 - .word 38971 - .word 41168 - .word 49144 - .word 0 - .word 3303 - .word 60299 - .word 50447 - .word 38102 - .word 49146 - .word 0 - .word 47075 - .word 52558 - .word 55475 - .word 37762 - .word 16374 - .word 0 - .word 52173 - .word 35461 - .word 11437 - .word 59897 - .word 16375 - .word 0 - .word 36076 - .word 14373 - .word 35326 - .word 54659 - .word 16377 - .word 0 - .word 59562 - .word 13882 - .word 310 - .word 33073 - .word 16380 - .word 0 - .word 21162 - .word 13390 - .word 51910 - .word 43836 - .word 49141 - .word 0 - .word 25864 - .word 5553 - .word 52105 - .word 33196 - .word 49143 - .word 0 - .word 50214 - .word 4354 - .word 50978 - .word 55906 - .word 49144 - .word 0 - .word 22538 - .word 16515 - .word 54348 - .word 57115 - .word 49146 - .word 0 - .word 25669 - .word 8964 - .word 45428 - .word 52429 - .word 16390 - .word 0 - .word 42066 - .word 12451 - .word 5346 - .word 32773 - .word 16389 - .word 0 - .word 59247 - .word 49506 - .word 42126 - .word 43753 - .word 16387 - .word 0 - .word 41212 - .word 16190 - .word 63627 - .word 33236 - .word 16386 - .word 0 - .word 43030 - .word 44942 - .word 52710 - .word 59310 - .word 49135 - .word 0 - .word 4241 - .word 60350 - .word 9519 - .word 55057 - .word 49131 - .word 0 - .word 13201 - .word 63684 - .word 48400 - .word 58952 - .word 49135 - .word 0 - .word 43405 - .word 43520 - .word 7800 - .word 38026 - .word 49140 - .word 0 - .word 51109 - .word 32176 - .word 26595 - .word 37828 - .word 16382 - .word 0 - .word 39193 - .word 38974 - .word 13074 - .word 53901 - .word 16382 - .word 0 - .word 18403 - .word 21914 - .word 43743 - .word 52518 - .word 16381 - .word 0 - .word 11905 - .word 16066 - .word 37206 - .word 35465 - .word 16381 - .word 0 - .word 39192 - .word 38974 - .word 13074 - .word 53901 - .word 16383 - .word 0 - .word 16822 - .word 16066 - .word 37206 - .word 35465 - .word 16382 - .word 0 - .word 12453 - .word 1560 - .word 25992 - .word 44448 - .word 16381 - .word 0 - .word 46918 - .word 49948 - .word 39767 - .word 32901 - .word 16381 - .word 0 - .word 993 - .word 37711 - .word 1229 - .word 53967 - .word 16378 - .word 0 - .word 22241 - .word 58002 - .word 54887 - .word 56142 - .word 49145 - .word 0 - .word 8639 - .word 23392 - .word 41786 - .word 61781 - .word 16376 - .word 0 - .word 824 - .word 14446 - .word 39837 - .word 35166 - .word 49144 - .word 0 - .word 4398 - .word 47415 - .word 48788 - .word 40961 - .word 16375 - .word 0 - .word 53320 - .word 18702 - .word 33902 - .word 48514 - .word 49142 - .word 0 - .word 47965 - .word 49933 - .word 53838 - .word 58200 - .word 16373 - .word 0 - .word 46987 - .word 9286 - .word 62309 - .word 35268 - .word 49141 - .word 0 - .word 6461 - .word 640 - .word 17377 - .word 43104 - .word 16372 - .word 0 - .word 30338 - .word 25067 - .word 12218 - .word 53050 - .word 49139 - .word 0 - .word 3327 - .word 27408 - .word 8301 - .word 61564 - .word 16378 - .word 0 - .word 59387 - .word 42287 - .word 60059 - .word 60716 - .word 49145 - .word 0 - .word 13826 - .word 21215 - .word 7405 - .word 64741 - .word 16376 - .word 0 - .word 26137 - .word 29234 - .word 53880 - .word 36165 - .word 49144 - .word 0 - .word 10231 - .word 52926 - .word 36203 - .word 41655 - .word 16375 - .word 0 - .word 23407 - .word 27273 - .word 49305 - .word 49005 - .word 49142 - .word 0 - .word 11641 - .word 23288 - .word 44339 - .word 58553 - .word 16373 - .word 0 - .word 25249 - .word 6483 - .word 6272 - .word 35397 - .word 49141 - .word 0 - .word 42921 - .word 12425 - .word 13798 - .word 43198 - .word 16372 - .word 0 - .word 50188 - .word 64017 - .word 41333 - .word 53119 - .word 49139 - .word 0 - .word 25097 - .word 45200 - .word 21903 - .word 41572 - .word 16379 - .word 0 - .word 10972 - .word 60304 - .word 50447 - .word 38102 - .word 49146 - .word 0 - .word 15639 - .word 33828 - .word 25953 - .word 38432 - .word 16377 - .word 0 - .word 37131 - .word 35786 - .word 38971 - .word 41168 - .word 49144 - .word 0 - .word 11219 - .word 39714 - .word 63573 - .word 45930 - .word 16375 - .word 0 - .word 59109 - .word 9738 - .word 44211 - .word 52749 - .word 49142 - .word 0 - .word 51163 - .word 1079 - .word 49343 - .word 61890 - .word 16373 - .word 0 - .word 19090 - .word 15031 - .word 12079 - .word 36906 - .word 49141 - .word 0 - .word 28236 - .word 6956 - .word 155 - .word 44549 - .word 16372 - .word 0 - .word 54475 - .word 22231 - .word 8036 - .word 54711 - .word 49139 - .word 0 - .word 43885 - .word 13882 - .word 310 - .word 33073 - .word 16380 - .word 0 - .word 49382 - .word 16501 - .word 54348 - .word 57115 - .word 49146 - .word 0 - .word 54884 - .word 14552 - .word 35326 - .word 54659 - .word 16377 - .word 0 - .word 24455 - .word 7515 - .word 50978 - .word 55906 - .word 49144 - .word 0 - .word 57687 - .word 611 - .word 11437 - .word 59897 - .word 16375 - .word 0 - .word 26110 - .word 1729 - .word 52102 - .word 33196 - .word 49143 - .word 0 - .word 49827 - .word 25553 - .word 55506 - .word 37762 - .word 16374 - .word 0 - .word 45356 - .word 51283 - .word 52132 - .word 43836 - .word 49141 - .word 0 - .word 37526 - .word 52421 - .word 6331 - .word 51720 - .word 16372 - .word 0 - .word 23504 - .word 7355 - .word 4713 - .word 61833 - .word 49139 - .word 0 - .word 28030 - .word 45200 - .word 21903 - .word 41572 - .word 16379 - .word 0 - .word 64882 - .word 60298 - .word 50447 - .word 38102 - .word 49146 - .word 0 - .word 36628 - .word 34230 - .word 25953 - .word 38432 - .word 16377 - .word 0 - .word 2186 - .word 13495 - .word 38971 - .word 41168 - .word 49144 - .word 0 - .word 42048 - .word 38474 - .word 63587 - .word 45930 - .word 16375 - .word 0 - .word 44984 - .word 21655 - .word 43771 - .word 52749 - .word 49142 - .word 0 - .word 10340 - .word 31180 - .word 60154 - .word 61890 - .word 16373 - .word 0 - .word 29368 - .word 33685 - .word 37418 - .word 36904 - .word 49141 - .word 0 - .word 632 - .word 28858 - .word 25336 - .word 44574 - .word 16372 - .word 0 - .word 47657 - .word 7722 - .word 28520 - .word 54386 - .word 49139 - .word 0 - .word 48861 - .word 21442 - .word 12332 - .word 46245 - .word 16383 - .word 0 - .word 55836 - .word 1266 - .word 27621 - .word 35724 - .word 16386 - .word 0 - .word 19864 - .word 22843 - .word 65282 - .word 47516 - .word 16385 - .word 0 - .word 55755 - .word 27362 - .word 47250 - .word 57481 - .word 16389 - .word 0 - .word 27703 - .word 47960 - .word 491 - .word 37689 - .word 16392 - .word 0 - .word 41421 - .word 53711 - .word 6590 - .word 52435 - .word 16394 - .word 0 - .word 57789 - .word 21731 - .word 35033 - .word 43725 - .word 16395 - .word 0 - .word 55298 - .word 55134 - .word 50960 - .word 52072 - .word 16399 - .word 0 - .word 30636 - .word 39282 - .word 62891 - .word 33072 - .word 16404 - .word 0 - .word 7959 - .word 64403 - .word 49841 - .word 37534 - .word 16402 - .word 0 - .word 5854 - .word 54131 - .word 61334 - .word 53522 - .word 16408 - .word 0 - .word 5803 - .word 45364 - .word 48027 - .word 40704 - .word 16415 - .word 0 - .word 1370 - .word 7138 - .word 7454 - .word 61224 - .word 16409 - .word 0 - .word 57336 - .word 44117 - .word 55954 - .word 64739 - .word 16418 - .word 0 - .word 54670 - .word 41483 - .word 43064 - .word 36510 - .word 16428 - .word 0 - .word 42312 - .word 7696 - .word 38319 - .word 40746 - .word 16418 - .word 0 - .word 12302 - .word 62594 - .word 5410 - .word 37618 - .word 16430 - .word 0 - .word 9293 - .word 14879 - .word 6832 - .word 37045 - .word 16442 - .word 0 - .word 2958 - .word 50542 - .word 15469 - .word 40704 - .word 16427 - .word 0 - .word 42649 - .word 12819 - .word 63050 - .word 37565 - .word 16442 - .word 0 - .word 6063 - .word 43732 - .word 62723 - .word 36980 - .word 16457 - .word 0 - .word 22453 - .word 18298 - .word 44915 - .word 57947 - .word 16436 - .word 0 - .word 20554 - .word 96 - .word 8145 - .word 60162 - .word 16454 - .word 0 - .word 27743 - .word 60960 - .word 41480 - .word 33312 - .word 16473 - .word 0 - .word 22238 - .word 6527 - .word 38867 - .word 56588 - .word 16446 - .word 0 - .word 38516 - .word 42313 - .word 15095 - .word 36719 - .word 16468 - .word 0 - .word 36587 - .word 28039 - .word 41391 - .word 50829 - .word 16489 - .word 0 - .word 29867 - .word 13204 - .word 65176 - .word 36776 - .word 16457 - .word 0 - .word 31042 - .word 28858 - .word 52725 - .word 32812 - .word 16482 - .word 0 - .word 10384 - .word 4515 - .word 18607 - .word 62455 - .word 16506 - .word 0 - .word 9765 - .word 184 - .word 10999 - .word 62061 - .word 16467 - .word 0 - .word 31509 - .word 19231 - .word 45642 - .word 41528 - .word 16496 - .word 0 - .word 9807 - .word 42010 - .word 46528 - .word 59283 - .word 16524 - .word 0 - .word 34508 - .word 54054 - .word 11762 - .word 33288 - .word 16479 - .word 0 - .word 35651 - .word 17126 - .word 61083 - .word 36196 - .word 16511 - .word 0 - .word 61937 - .word 2245 - .word 55342 - .word 41983 - .word 16543 - .word 0 - .word 55800 - .word 52004 - .word 63053 - .word 44600 - .word 16490 - .word 0 - .word 1794 - .word 6965 - .word 62764 - .word 42435 - .word 16526 - .word 0 - .word 31259 - .word 48342 - .word 51287 - .word 43067 - .word 16562 - .word 0 - .word 51054 - .word 24828 - .word 3408 - .word 36750 - .word 16502 - .word 0 - .word 10851 - .word 65289 - .word 49628 - .word 32780 - .word 16542 - .word 0 - .word 55922 - .word 53580 - .word 2985 - .word 62379 - .word 16581 - .word 0 - .word 3514 - .word 59781 - .word 19773 - .word 36749 - .word 16514 - .word 0 - .word 6233 - .word 41678 - .word 56685 - .word 32779 - .word 16558 - .word 0 - .word 7397 - .word 40156 - .word 60492 - .word 62376 - .word 16601 - .word 0 - .word 64764 - .word 30182 - .word 28471 - .word 44055 - .word 16526 - .word 0 - .word 47394 - .word 43518 - .word 20307 - .word 41745 - .word 16574 - .word 0 - .word 48961 - .word 13130 - .word 26792 - .word 42193 - .word 16622 - .word 0 - .word 13149 - .word 49204 - .word 39329 - .word 62843 - .word 16538 - .word 0 - .word 63753 - .word 8765 - .word 38452 - .word 33516 - .word 16591 - .word 0 - .word 60000 - .word 22498 - .word 28021 - .word 38134 - .word 16643 - .word 0 - .word 10643 - .word 26389 - .word 15903 - .word 44739 - .word 16551 - .word 0 - .word 24943 - .word 57881 - .word 5976 - .word 53687 - .word 16607 - .word 0 - .word 62568 - .word 44908 - .word 48389 - .word 34359 - .word 16664 - .word 0 - .word 36352 - .word 25695 - .word 54808 - .word 41154 - .word 49155 - .word 0 - .word 53950 - .word 20364 - .word 22118 - .word 64130 - .word 16388 - .word 0 - .word 29016 - .word 1013 - .word 8897 - .word 49860 - .word 49158 - .word 0 - .word 48790 - .word 22905 - .word 44266 - .word 59689 - .word 49162 - .word 0 - .word 10097 - .word 41173 - .word 5368 - .word 62588 - .word 16398 - .word 0 - .word 18460 - .word 26935 - .word 48131 - .word 34999 - .word 49171 - .word 0 - .word 39812 - .word 13033 - .word 49143 - .word 34463 - .word 49170 - .word 0 - .word 11756 - .word 24889 - .word 14253 - .word 47765 - .word 16408 - .word 0 - .word 27397 - .word 56992 - .word 59569 - .word 35306 - .word 49183 - .word 0 - .word 1499 - .word 3328 - .word 1093 - .word 60276 - .word 49177 - .word 0 - .word 54443 - .word 57316 - .word 38982 - .word 63406 - .word 16418 - .word 0 - .word 46810 - .word 23189 - .word 13701 - .word 35573 - .word 49196 - .word 0 - .word 40551 - .word 19489 - .word 60782 - .word 40648 - .word 49186 - .word 0 - .word 16371 - .word 31130 - .word 60187 - .word 37497 - .word 16430 - .word 0 - .word 56271 - .word 55717 - .word 16120 - .word 36897 - .word 49210 - .word 0 - .word 11488 - .word 11046 - .word 17817 - .word 40691 - .word 49195 - .word 0 - .word 54617 - .word 39007 - .word 658 - .word 37550 - .word 16442 - .word 0 - .word 32140 - .word 49295 - .word 21536 - .word 36961 - .word 49225 - .word 0 - .word 5702 - .word 58081 - .word 34597 - .word 57945 - .word 49204 - .word 0 - .word 48280 - .word 56894 - .word 9030 - .word 60159 - .word 16454 - .word 0 - .word 61535 - .word 4768 - .word 37086 - .word 33310 - .word 49241 - .word 0 - .word 53564 - .word 21787 - .word 24446 - .word 56588 - .word 49214 - .word 0 - .word 35771 - .word 11952 - .word 2619 - .word 36719 - .word 16468 - .word 0 - .word 47624 - .word 53808 - .word 19802 - .word 50829 - .word 49257 - .word 0 - .word 42706 - .word 15946 - .word 64291 - .word 36776 - .word 49225 - .word 0 - .word 8317 - .word 44716 - .word 51672 - .word 32812 - .word 16482 - .word 0 - .word 31251 - .word 20899 - .word 16102 - .word 62455 - .word 49274 - .word 0 - .word 2105 - .word 17517 - .word 10872 - .word 62061 - .word 49235 - .word 0 - .word 60728 - .word 14335 - .word 45529 - .word 41528 - .word 16496 - .word 0 - .word 1336 - .word 56903 - .word 46326 - .word 59283 - .word 49292 - .word 0 - .word 34501 - .word 54054 - .word 11762 - .word 33288 - .word 49247 - .word 0 - .word 35638 - .word 17126 - .word 61083 - .word 36196 - .word 16511 - .word 0 - .word 12489 - .word 2246 - .word 55342 - .word 41983 - .word 49311 - .word 0 - .word 55790 - .word 52004 - .word 63053 - .word 44600 - .word 49258 - .word 0 - .word 1778 - .word 6965 - .word 62764 - .word 42435 - .word 16526 - .word 0 - .word 47762 - .word 48342 - .word 51287 - .word 43067 - .word 49330 - .word 0 - .word 51047 - .word 24828 - .word 3408 - .word 36750 - .word 49270 - .word 0 - .word 10839 - .word 65289 - .word 49628 - .word 32780 - .word 16542 - .word 0 - .word 14289 - .word 53581 - .word 2985 - .word 62379 - .word 49349 - .word 0 - .word 3506 - .word 59781 - .word 19773 - .word 36749 - .word 49282 - .word 0 - .word 6220 - .word 41678 - .word 56685 - .word 32779 - .word 16558 - .word 0 - .word 31299 - .word 40156 - .word 60492 - .word 62376 - .word 49369 - .word 0 - .word 64754 - .word 30182 - .word 28471 - .word 44055 - .word 49294 - .word 0 - .word 47368 - .word 43518 - .word 20307 - .word 41745 - .word 16574 - .word 0 - .word 65114 - .word 13130 - .word 26792 - .word 42193 - .word 49390 - .word 0 - .word 13136 - .word 49204 - .word 39329 - .word 62843 - .word 49306 - .word 0 - .word 63757 - .word 8765 - .word 38452 - .word 33516 - .word 16591 - .word 0 - .word 9085 - .word 22499 - .word 28021 - .word 38134 - .word 49411 - .word 0 - .word 10631 - .word 26389 - .word 15903 - .word 44739 - .word 49319 - .word 0 - .word 24915 - .word 57881 - .word 5976 - .word 53687 - .word 16607 - .word 0 - .word 16910 - .word 44909 - .word 48389 - .word 34359 - .word 49432 - .word 0 - .type _ldbA,@object - .size _ldbA,4620 - .space 4, 0x00 # pad - .align 16 -_dbA: - .long 4235179544 - .long 3219290252 - .long 3295226828 - .long 3164508998 - .long 1649608659 - .long 1072320934 - .long 3173846476 - .long 1014071527 - .long 1542107862 - .long 3218711765 - .long 2540989727 - .long 3163202496 - .long 1649608660 - .long 3220853158 - .long 859914669 - .long 1017880115 - .long 717740104 - .long 3219214642 - .long 2376945980 - .long 3162254827 - .long 1431655765 - .long 1068848469 - .long 1431655765 - .long 1012225365 - .long 1431655765 - .long 1068848469 - .long 42583435 - .long 1011709190 - .long 3362045620 - .long 1072523249 - .long 4064281872 - .long 1016386130 - .long 4002465326 - .long 3220678216 - .long 1750589542 - .long 1014054706 - .long 2343010478 - .long 3220651595 - .long 2022209519 - .long 3165213628 - .long 3582788241 - .long 1077376220 - .long 3584976419 - .long 3225506388 - .long 2237448112 - .long 1085305363 - .long 634573353 - .long 3233318238 - .long 2248101888 - .long 1073427871 - .long 1861873466 - .long 1016835790 - .long 2560862412 - .long 1071060948 - .long 30404090 - .long 3163588833 - .long 1673151062 - .long 1081107801 - .long 641486499 - .long 3229145757 - .long 2847476088 - .long 1079825078 - .long 4109693297 - .long 3227890617 - .long 80699903 - .long 1078574114 - .long 2114691410 - .long 3226679074 - .long 1354791574 - .long 1083527322 - .long 1238563653 - .long 3231741049 - .long 2909836308 - .long 1082322123 - .long 2961745666 - .long 3230453807 - .long 4254370204 - .long 3222569838 - .long 2523116623 - .long 1016608103 - .long 3036354677 - .long 3220338375 - .long 4197032384 - .long 3163739097 - .long 618767413 - .long 1086658447 - .long 4224046954 - .long 3235503748 - .long 918515347 - .long 1104466354 - .long 1558545744 - .long 3253448772 - .long 3598672851 - .long 1075147148 - .long 1862579612 - .long 1019557195 - .long 814211565 - .long 1073042505 - .long 3816489657 - .long 3166119701 - .long 1438601496 - .long 1094947899 - .long 3932640262 - .long 3243813893 - .long 1025077628 - .long 1092155011 - .long 4084583552 - .long 3241103782 - .long 2491631644 - .long 1089473568 - .long 3212116569 - .long 3238261210 - .long 764386880 - .long 1100022671 - .long 1839771210 - .long 3248755462 - .long 3990369246 - .long 1097905463 - .long 1112302030 - .long 3246751353 - .long 717740104 - .long 1070682418 - .long 230143214 - .long 1014072542 - .long 1542107862 - .long 1071228117 - .long 2869986399 - .long 1017025354 - .long 2620920409 - .long 1068568872 - .long 3005931917 - .long 1068498895 - .long 3773030413 - .long 1068741081 - .long 221735135 - .long 1068648815 - .long 1649608659 - .long 1072320934 - .long 2259103138 - .long 1014410184 - .long 1798481678 - .long 1068036068 - .long 1435858614 - .long 1066348979 - .long 2798813559 - .long 1068114295 - .long 1711004053 - .long 1067747678 - .long 2010902109 - .long 1068166444 - .long 2474987820 - .long 1068059813 - .long 780818753 - .long 1068375890 - .long 4117616766 - .long 1068267614 - .long 1604677386 - .long 1068848813 - .long 1854392195 - .long 1067982657 - .long 4235179544 - .long 1071806604 - .long 2606438347 - .long 1015960145 - .long 2893907075 - .long 1066734370 - .long 2294698909 - .long 1014073149 - .long 441808390 - .long 3216064000 - .long 1880662273 - .long 1012321168 - .long 3253204732 - .long 3200326446 - .long 3649195207 - .long 1051723342 - .long 1676415034 - .long 3202599881 - .long 856428669 - .long 1053972858 - .long 3299217318 - .long 1070900044 - .long 4151699616 - .long 1010498715 - .long 1123572530 - .long 1044951237 - .long 3942090667 - .long 3191111442 - .long 179320158 - .long 3191607973 - .long 648955671 - .long 3189543958 - .long 338963396 - .long 3195730567 - .long 729244107 - .long 1047109933 - .long 491939632 - .long 3198035439 - .long 2441649049 - .long 1049392674 - .long 4000663347 - .long 1056276700 - .long 3497022620 - .long 3193423889 - .long 119575502 - .long 1071320806 - .long 3893526980 - .long 3160417465 - .long 2378611747 - .long 3217220647 - .long 3721041488 - .long 3160948136 - .long 212213087 - .long 1003805565 - .long 3707885569 - .long 946762142 - .long 954325311 - .long 1061996326 - .long 2572405945 - .long 3208784108 - .long 2047107390 - .long 1053958905 - .long 2157300588 - .long 3201555925 - .long 3371055275 - .long 1071576875 - .long 1069844800 - .long 1015429887 - .long 3166931521 - .long 3216972217 - .long 3220968514 - .long 3161728497 - .long 4141120019 - .long 1057975373 - .long 3048513049 - .long 3204734413 - .long 1172170140 - .long 1059250739 - .long 2600146741 - .long 3206041877 - .long 2751605624 - .long 1060573214 - .long 1663282963 - .long 3207426590 - .long 3895324829 - .long 1055298027 - .long 157415216 - .long 3202171477 - .long 3734613381 - .long 1056602430 - .long 277770430 - .long 3203481600 - .long 3198889327 - .long 3217706325 - .long 2705408501 - .long 1014676637 - .long 59787751 - .long 1073579891 - .long 1470716836 - .long 1013369721 - .long 2045320829 - .long 1061536716 - .long 93552279 - .long 3208285776 - .long 1578930691 - .long 1053381091 - .long 2541023 - .long 3199217833 - .long 2303467340 - .long 1072252569 - .long 567354353 - .long 1016170573 - .long 4277811695 - .long 1072049730 - .long 3950020367 - .long 3160819724 - .long 2523318625 - .long 1057215902 - .long 2302510246 - .long 3203993877 - .long 298082853 - .long 1058616118 - .long 2097322096 - .long 3205466603 - .long 1798601470 - .long 1060132265 - .long 1407285416 - .long 3206822737 - .long 4077669298 - .long 1054450862 - .long 2333929458 - .long 3201533971 - .long 2747507284 - .long 1055881541 - .long 2839080721 - .long 3202576178 - .long 3383958356 - .long 3218498155 - .long 613656875 - .long 1017795528 - .long 173059452 - .long 1075530818 - .long 704088483 - .long 1015836313 - .long 669591746 - .long 1061765380 - .long 2029568326 - .long 3208524070 - .long 4157429832 - .long 1054150757 - .long 704852271 - .long 3201323640 - .long 846452204 - .long 1073165719 - .long 1707052239 - .long 1015225852 - .long 1011120585 - .long 1074996836 - .long 2354399398 - .long 3161432137 - .long 954697072 - .long 1057288366 - .long 1270411324 - .long 3204047380 - .long 711769130 - .long 1058758297 - .long 1128721 - .long 3205559284 - .long 179011054 - .long 1060257504 - .long 4204770871 - .long 3206955261 - .long 3137275514 - .long 1053955134 - .long 762311517 - .long 3199983289 - .long 728345252 - .long 1056011172 - .long 1369631397 - .long 3202845593 - .long 3569027386 - .long 3214047105 - .long 3629871173 - .long 3159432582 - .long 2480864277 - .long 1072801415 - .long 765976303 - .long 1016615598 - .long 759560957 - .long 1082479958 - .long 4267700141 - .long 3214355674 - .long 519344805 - .long 3246817843 - .long 220815467 - .long 3246677566 - .long 585197945 - .long 1074992152 - .long 3068616556 - .long 1020233496 - .long 4125953813 - .long 3215772665 - .long 1932096513 - .long 3151829739 - .long 891522464 - .long 1087323966 - .long 2489260670 - .long 3237524288 - .long 198576582 - .long 1086294508 - .long 1118764770 - .long 3231025522 - .long 4028480604 - .long 1084377135 - .long 1979567970 - .long 3223360994 - .long 4063308394 - .long 3244561236 - .long 4166146281 - .long 3246077527 - .long 2664161993 - .long 3240072782 - .long 259025260 - .long 3242645417 - .long 378360574 - .long 1070238620 - .long 2959696752 - .long 1069921292 - .long 573154909 - .long 1069707436 - .long 4044344316 - .long 1069551882 - .long 477218588 - .long 1069314503 - .long 0 - .long 3217031168 - .long 2454267026 - .long 1069697316 - .long 1431655765 - .long 3217380693 - .long 2576980378 - .long 1070176665 - .long 0 - .long 3218079744 - .long 1431655765 - .long 1070945621 - .long 0 - .long 3219128320 - .long 2759451285 - .long 3216787420 - .long 439852373 - .long 3160440428 - .long 925239789 - .long 1070204188 - .long 1052235825 - .long 1014694615 - .long 2825585883 - .long 3219218351 - .long 1250510261 - .long 3158266606 - .long 4280873151 - .long 1070880196 - .long 3382653115 - .long 1014364358 - .long 3432120556 - .long 1060112640 - .long 1689864936 - .long 3206804514 - .long 2559966835 - .long 1058598642 - .long 1675881979 - .long 3205446725 - .long 3157807190 - .long 1057195995 - .long 83437824 - .long 3203930944 - .long 714759041 - .long 1055696489 - .long 94115283 - .long 3202310560 - .long 231342353 - .long 1053665780 - .long 2283895727 - .long 3199602663 - .long 2514471110 - .long 1050042839 - .long 1783553765 - .long 3194406773 - .long 2977985131 - .long 3217141333 - .long 1199854581 - .long 3162366396 - .long 2962538897 - .long 3216960405 - .long 4143040985 - .long 3159573871 - .long 1505583242 - .long 1067626192 - .long 1685935487 - .long 1007379916 - .long 1307717362 - .long 1071507942 - .long 2592844004 - .long 1015649171 - .long 799685378 - .long 1060113448 - .long 3181808512 - .long 3206805166 - .long 237118685 - .long 1058600582 - .long 1021521704 - .long 3205452843 - .long 562863096 - .long 1057199158 - .long 124222188 - .long 3203968611 - .long 666083857 - .long 1055962453 - .long 2573104645 - .long 3202709164 - .long 3241565485 - .long 1053885149 - .long 1335355988 - .long 3200533016 - .long 1040080838 - .long 1054134824 - .long 2847172487 - .long 3201012249 - .long 3198889327 - .long 3217706325 - .long 1543330549 - .long 3160864782 - .long 4277811695 - .long 1072049730 - .long 993295933 - .long 1014676638 - .long 59787751 - .long 1073579891 - .long 130295530 - .long 1013369744 - .long 2303467340 - .long 1072252569 - .long 3943765603 - .long 1016170278 - .long 3608922566 - .long 1060045649 - .long 1453569939 - .long 3207287740 - .long 3338057825 - .long 3206066477 - .long 3038862383 - .long 3208900206 - .long 2094875998 - .long 3209983096 - .long 1016858122 - .long 3211012944 - .long 2854570659 - .long 3211659217 - .long 1144696552 - .long 3211904901 - .long 2176258130 - .long 3211749311 - .long 3478125247 - .long 3210994876 - .long 2355567962 - .long 3209692799 - .long 3598755244 - .long 3207186288 - .long 3383958356 - .long 3218498155 - .long 141035778 - .long 3162876606 - .long 1011120585 - .long 1074996836 - .long 1865540452 - .long 1017795522 - .long 173059452 - .long 1075530818 - .long 1582816653 - .long 1015838421 - .long 846452204 - .long 1073165719 - .long 2382960778 - .long 1015259319 - .long 3627221817 - .long 1060257525 - .long 782594551 - .long 3206955283 - .long 1981242537 - .long 1058758037 - .long 1755079229 - .long 3205559658 - .long 2436997517 - .long 1057278666 - .long 3384076381 - .long 3204067450 - .long 2476719666 - .long 1056224805 - .long 337705071 - .long 3201230508 - .long 776493412 - .long 3197801902 - .long 2139883963 - .long 3204685556 - .long 1475852201 - .long 3204789337 - .long 945638604 - .long 3203947238 - .long 3198889327 - .long 3217706325 - .long 4282828456 - .long 3160832800 - .long 4277811695 - .long 1072049730 - .long 993624082 - .long 1014676638 - .long 59787751 - .long 1073579891 - .long 1881378167 - .long 1013369744 - .long 2303467340 - .long 1072252569 - .long 2285482445 - .long 1016170301 - .long 2583886559 - .long 1060132251 - .long 2972085422 - .long 3206822622 - .long 1867851267 - .long 1058615355 - .long 680445507 - .long 3205461644 - .long 1455562209 - .long 1057201491 - .long 2171135678 - .long 3203931082 - .long 973516116 - .long 1055683749 - .long 442346719 - .long 3202274605 - .long 3339219778 - .long 1053603010 - .long 4261370927 - .long 3199529466 - .long 1389725956 - .long 1049937931 - .long 3421055527 - .long 3194266408 - .long 3440444171 - .long 3149749917 - .long 2683862484 - .long 3093774621 - .long 1722766174 - .long 1073233897 - .long 1535800986 - .long 1017782563 - .long 2952983900 - .long 1075015403 - .long 1613333390 - .long 1019450778 - .long 1747624399 - .long 1077465903 - .long 1323746741 - .long 1077414384 - .long 2170768622 - .long 1079283370 - .long 3681271869 - .long 1079585146 - .long 2395326938 - .long 1081247483 - .long 1534348539 - .long 1081774816 - .long 339892429 - .long 1083288020 - .long 3528406654 - .long 1083985153 - .long 2588043907 - .long 1085376283 - .long 2346296707 - .long 1086214596 - .long 207705063 - .long 1087509517 - .long 2560418979 - .long 1088486188 - .long 2868926017 - .long 1088759609 - .long 1843351610 - .long 1091968574 - .long 2991121454 - .long 1008150290 - .long 2149211495 - .long 952864023 - .long 1596959828 - .long 1075781798 - .long 2172289614 - .long 1019977377 - .long 2540785903 - .long 1077531858 - .long 1236674410 - .long 1020936929 - .long 4153228343 - .long 1087542211 - .long 2696338690 - .long 1090238842 - .long 878599865 - .long 1092951715 - .long 1553131440 - .long 1095784438 - .long 1380037893 - .long 1098488966 - .long 2667481451 - .long 1101284640 - .long 2282526011 - .long 1104162081 - .long 2355356013 - .long 1106903006 - .long 2198000318 - .long 1109722332 - .long 415847444 - .long 1112609215 - .long 1244368631 - .long 1115409383 - .long 1504872183 - .long 1118250351 - .long 1483597343 - .long 1121215185 - .long 2372686104 - .long 1123791138 - .long 2950620603 - .long 1012416763 - .long 1854687498 - .long 952811571 - .long 4103214658 - .long 1077594716 - .long 2773032534 - .long 1020189917 - .long 3447799694 - .long 1081361429 - .long 400789830 - .long 1023147708 - .long 3214535591 - .long 1099259453 - .long 1237622722 - .long 1103959294 - .long 3800166525 - .long 1108620252 - .long 3349752687 - .long 1113359257 - .long 1736707866 - .long 1118068670 - .long 1604218008 - .long 1122855127 - .long 472376766 - .long 1127573289 - .long 2849635624 - .long 1132420823 - .long 1552594705 - .long 1137123494 - .long 3251899291 - .long 1141973158 - .long 523050174 - .long 1146711894 - .long 2820496385 - .long 1151553661 - .long 507113183 - .long 1156515491 - .long 3382661695 - .long 1160984436 - .long 1797993220 - .long 1014085677 - .long 1007534641 - .long 957814894 - .long 136949250 - .long 1079957294 - .long 360284395 - .long 1016466469 - .long 784478107 - .long 1086123203 - .long 2737766812 - .long 1029538613 - .long 1541190179 - .long 1113554317 - .long 209153222 - .long 1120512208 - .long 2353533988 - .long 1127569405 - .long 445988592 - .long 1134692642 - .long 3579939511 - .long 1141824664 - .long 1580626808 - .long 1148890066 - .long 214151816 - .long 1156005346 - .long 2068712408 - .long 1163158821 - .long 839406419 - .long 1170342165 - .long 3247543387 - .long 1177546316 - .long 4025420415 - .long 1184654254 - .long 956971024 - .long 1191825477 - .long 2268897124 - .long 1199100768 - .long 3197790250 - .long 1206020453 - .long 2712668744 - .long 1014362371 - .long 420246125 - .long 958137372 - .long 2654663338 - .long 1082564068 - .long 4161996347 - .long 1025251297 - .long 1213005072 - .long 1091554851 - .long 789699257 - .long 1035400076 - .long 800710857 - .long 1129640478 - .long 2496483081 - .long 1139363849 - .long 599798751 - .long 1149188652 - .long 1701185240 - .long 1158910290 - .long 2369516264 - .long 1168692319 - .long 283492325 - .long 1178587937 - .long 3183141054 - .long 1188335795 - .long 3641040163 - .long 1198179274 - .long 561697907 - .long 1208059224 - .long 1909654917 - .long 1217858291 - .long 2831089635 - .long 1227776627 - .long 2923368563 - .long 1237613769 - .long 3277782853 - .long 1247623400 - .long 2305379544 - .long 1257247294 - .long 2173558120 - .long 3167899773 - .long 3928519072 - .long 3112134976 - .long 2855828427 - .long 1085518855 - .long 2402042833 - .long 1029906467 - .long 3668949703 - .long 1097350789 - .long 1498999354 - .long 1041534216 - .long 1894732623 - .long 1147309596 - .long 3157447236 - .long 1159959522 - .long 1106557451 - .long 1172641345 - .long 2830063624 - .long 1185354419 - .long 1827524850 - .long 1198100435 - .long 3148494391 - .long 1210882790 - .long 408406249 - .long 1223697282 - .long 1409028207 - .long 1236424336 - .long 3586220107 - .long 1249179206 - .long 1522157876 - .long 1261965775 - .long 1820647987 - .long 1274787293 - .long 141517691 - .long 1287671841 - .long 1169226569 - .long 1300517027 - .long 1216765362 - .long 1313047128 - .long 1448028998 - .long 1021264728 - .long 3859033985 - .long 964258238 - .long 4275468065 - .long 1088663688 - .long 2839015045 - .long 1031960699 - .long 2471825140 - .long 1103641144 - .long 2116308392 - .long 1045704405 - .long 320063693 - .long 1166181438 - .long 1786259137 - .long 1181976509 - .long 2022503488 - .long 1197803342 - .long 3654410397 - .long 1213661261 - .long 3612544687 - .long 1229551918 - .long 2586390227 - .long 1245478664 - .long 4037720966 - .long 1261441627 - .long 425603198 - .long 1277313397 - .long 2335359117 - .long 1293212748 - .long 663099774 - .long 1309143515 - .long 3275152075 - .long 1325108897 - .long 3939307299 - .long 1341142935 - .long 2389223216 - .long 1357131850 - .long 3001851795 - .long 1372807567 - .long 2843660044 - .long 1027797837 - .long 4081430736 - .long 972886614 - .long 59873159 - .long 1091970578 - .long 89491691 - .long 1036070212 - .long 800587417 - .long 1110354163 - .long 1316695415 - .long 1054362062 - .long 1053415956 - .long 1186120592 - .long 1951112295 - .long 1205224339 - .long 3452306653 - .long 1224406940 - .long 3087408826 - .long 1243649885 - .long 3141065505 - .long 1262791580 - .long 1611223017 - .long 1282016047 - .long 2457220276 - .long 1301315843 - .long 567478369 - .long 1320490698 - .long 744018712 - .long 1339759601 - .long 3767838035 - .long 1359052970 - .long 2731826519 - .long 1378265330 - .long 2965944329 - .long 1397620918 - .long 3792836018 - .long 1416954415 - .long 4140163483 - .long 1435938859 - .long 3803251356 - .long 1031449026 - .long 1468351707 - .long 974519095 - .long 1510773204 - .long 1095479170 - .long 3459876679 - .long 1039900066 - .long 2329980675 - .long 1117254636 - .long 1442547585 - .long 1060380811 - .long 3793321184 - .long 1207035105 - .long 3851928555 - .long 1229621800 - .long 221632261 - .long 1252267869 - .long 2942953492 - .long 1274996464 - .long 3017520070 - .long 1297616871 - .long 239470767 - .long 1320348902 - .long 1043025700 - .long 1343095998 - .long 252688637 - .long 1365768517 - .long 3880214591 - .long 1388528317 - .long 3579258508 - .long 1411323545 - .long 4034496078 - .long 1434003397 - .long 4007330572 - .long 1456787727 - .long 4167750282 - .long 1479686237 - .long 1263363363 - .long 1502124177 - .long 1204128515 - .long 3180787222 - .long 711751003 - .long 3124411148 - .long 655669005 - .long 1099106472 - .long 1779452985 - .long 1041271036 - .long 3714137145 - .long 1124508819 - .long 3422050113 - .long 1068643358 - .long 2129754319 - .long 1228815190 - .long 1696310114 - .long 1255068559 - .long 1933048134 - .long 1281362741 - .long 1387613391 - .long 1307637530 - .long 3120180336 - .long 1333930483 - .long 2543548174 - .long 1360241860 - .long 1743952085 - .long 1386572739 - .long 830746048 - .long 1412924879 - .long 3823372438 - .long 1439300663 - .long 3126160514 - .long 1465701841 - .long 3650788872 - .long 1492126330 - .long 1753940109 - .long 1518485640 - .long 4158688957 - .long 1544943454 - .long 2419002512 - .long 1571054314 - .long 1387068573 - .long 1036196119 - .long 693317055 - .long 975620966 - .long 85037501 - .long 1102875900 - .long 2766547698 - .long 1047046221 - .long 692715848 - .long 1132034342 - .long 4084350207 - .long 1074738271 - .long 3670967869 - .long 1251313085 - .long 877136010 - .long 1281389973 - .long 2367669872 - .long 1311355635 - .long 127681551 - .long 1341415835 - .long 294488793 - .long 1371561390 - .long 2268228308 - .long 1401588863 - .long 1971903155 - .long 1431680659 - .long 3068569563 - .long 1461838328 - .long 2810042085 - .long 1491968471 - .long 1803405805 - .long 1522051425 - .long 2718559511 - .long 1552192554 - .long 1282364655 - .long 1582403523 - .long 2077022624 - .long 1612690417 - .long 3574791831 - .long 1642467624 - .long 1679930357 - .long 3189181796 - .long 2680901783 - .long 3131938295 - .long 3217922759 - .long 1106719372 - .long 512421297 - .long 1047804811 - .long 767402551 - .long 1139855610 - .long 1780644693 - .long 1084244525 - .long 2568107092 - .long 1274594461 - .long 3742446639 - .long 1308542877 - .long 2828203709 - .long 1342408213 - .long 1035153137 - .long 1376332101 - .long 135830143 - .long 1410361976 - .long 3493601403 - .long 1444258562 - .long 2859691870 - .long 1478279541 - .long 289914903 - .long 1512259079 - .long 388251426 - .long 1546250265 - .long 3047966471 - .long 1580303536 - .long 3861742472 - .long 1614266653 - .long 1260166508 - .long 1648392316 - .long 904399223 - .long 1682450578 - .long 3334685854 - .long 1716212562 - .long 883499133 - .long 1045834798 - .long 1040153219 - .long 987496666 - .long 789418155 - .long 1110723643 - .long 2045920566 - .long 1052287721 - .long 682953991 - .long 1147781119 - .long 96584340 - .long 1092099645 - .long 666163210 - .long 1298545479 - .long 1527740296 - .long 1336421526 - .long 43027861 - .long 1374344588 - .long 1893757912 - .long 1412317817 - .long 3310921752 - .long 1450264132 - .long 1086815150 - .long 1488186400 - .long 2822587825 - .long 1526147814 - .long 1629445394 - .long 1564156239 - .long 2622810410 - .long 1602221540 - .long 2876661682 - .long 1640163607 - .long 151499969 - .long 1678143447 - .long 3591180187 - .long 1716205976 - .long 126024331 - .long 1754364017 - .long 3251093187 - .long 1792100966 - .long 2455853998 - .long 3194846833 - .long 2105329433 - .long 3137419111 - .long 1677091468 - .long 1114834807 - .long 3103559369 - .long 1057563919 - .long 156965555 - .long 1155965375 - .long 1332523955 - .long 1098438055 - .long 2734085455 - .long 1323184128 - .long 3116950081 - .long 1365165587 - .long 2683234966 - .long 1407189808 - .long 2373753488 - .long 1449192848 - .long 1367022160 - .long 1491213979 - .long 3828829922 - .long 1533253445 - .long 649201501 - .long 1575312310 - .long 1349232455 - .long 1617392311 - .long 2871919995 - .long 1659495809 - .long 3481654166 - .long 1701624529 - .long 3617101938 - .long 1743779051 - .long 431481593 - .long 1785867563 - .long 121308995 - .long 1828052659 - .long 357611834 - .long 1869892289 - .long 294133886 - .long 3202139689 - .long 3712546231 - .long 3146198591 - .long 3880935161 - .long 1119029102 - .long 59549724 - .long 1063684005 - .long 3647913141 - .long 1164353962 - .long 4227156178 - .long 1109331949 - .long 3682674216 - .long 1348349871 - .long 2807072537 - .long 1394525619 - .long 2124002856 - .long 1440744183 - .long 2605559380 - .long 1486941516 - .long 2185296140 - .long 1533156938 - .long 3364132884 - .long 1579390693 - .long 3636842097 - .long 1625643843 - .long 1564856349 - .long 1671918127 - .long 282911834 - .long 1718215904 - .long 224295158 - .long 1764538898 - .long 1397797422 - .long 1810887684 - .long 130160665 - .long 1857170584 - .long 3494254532 - .long 1903549984 - .long 2087544159 - .long 1949584056 - .long 2070009724 - .long 3207114478 - .long 3313155961 - .long 3151739743 - .long 1799064076 - .long 1123301109 - .long 3318052585 - .long 1067728611 - .long 1398608221 - .long 1172933154 - .long 3195587656 - .long 1117275768 - .long 3966862011 - .long 1374007527 - .long 3094801078 - .long 1424457063 - .long 201966774 - .long 1474951107 - .long 1216746698 - .long 1525492144 - .long 4169038329 - .long 1576047750 - .long 2574869838 - .long 1626540825 - .long 3353136223 - .long 1677069826 - .long 246421124 - .long 1727641760 - .long 3497001028 - .long 1778265406 - .long 1014877316 - .long 1828833334 - .long 2620327651 - .long 1879376562 - .long 1343179361 - .long 1929994932 - .long 3499694378 - .long 1980775534 - .long 852481763 - .long 2031094897 - .long 858300611 - .long 1060903333 - .long 1069421656 - .long 1004554972 - .long 381774873 - .long 1127661932 - .long 2890562600 - .long 1072008419 - .long 3230239600 - .long 1181757061 - .long 1093463150 - .long 1126994478 - .long 2041459920 - .long 1400246667 - .long 1834149192 - .long 1455089424 - .long 3431867819 - .long 1509997896 - .long 673297555 - .long 1564813682 - .long 2939272129 - .long 1619727956 - .long 2561583193 - .long 1674674892 - .long 1592460776 - .long 1729549373 - .long 4229377564 - .long 1784543364 - .long 3147274091 - .long 1839450750 - .long 199676655 - .long 1894400365 - .long 515597810 - .long 1949398723 - .long 2826001657 - .long 2004337665 - .long 1832191040 - .long 2059473164 - .long 486033509 - .long 2114113687 - .long 2615285763 - .long 3215685247 - .long 3139164341 - .long 3160067829 - .long 2576980377 - .long 1132042649 - .long 2136544456 - .long 1076438044 - .long 1202590842 - .long 1190427361 - .long 3058408830 - .long 1135356281 - .long 2163381214 - .long 1426480799 - .long 2353327718 - .long 1485745575 - .long 3794661129 - .long 1544911246 - .long 3594844771 - .long 1604225727 - .long 3801864141 - .long 1663434111 - .long 1474426882 - .long 1722809436 - .long 2103181697 - .long 1782019277 - .long 1306699518 - .long 1841386098 - .long 2394149058 - .long 1900657427 - .long 2802357954 - .long 1959997432 - .long 4190579671 - .long 2019374921 - .long 1589399104 - .long 2078657782 - .long 459261522 - .long 2137266825 - .long 4294967295 - .long 2146435071 - .long 158971950 - .long 3154658393 - .long 3459173435 - .long 3099360488 - .long 2835657100 - .long 3221135661 - .long 3134582638 - .long 3163662002 - .long 1009146449 - .long 1076045439 - .long 2177907437 - .long 1020724564 - .long 2093419253 - .long 1082406719 - .long 3184966549 - .long 3231785529 - .long 3799028631 - .long 1086175845 - .long 81768581 - .long 3235523877 - .long 1017495356 - .long 1089951767 - .long 1546026610 - .long 3239380678 - .long 980092412 - .long 1093867758 - .long 4064795288 - .long 3243341671 - .long 3027586419 - .long 1097863735 - .long 1002816472 - .long 3247290528 - .long 985745927 - .long 1101758613 - .long 1714999460 - .long 3251222455 - .long 808706777 - .long 1105883774 - .long 2540867906 - .long 3255308994 - .long 1548702939 - .long 3157340334 - .long 1276328330 - .long 3102548777 - .long 2523682374 - .long 3224680861 - .long 1002691513 - .long 3168986622 - .long 2919511741 - .long 1081046750 - .long 3737147325 - .long 1024759629 - .long 2879373926 - .long 1098115315 - .long 103788827 - .long 3250052030 - .long 3732555687 - .long 1107111798 - .long 3845853773 - .long 3259114079 - .long 3808164400 - .long 1116131626 - .long 1738785984 - .long 3268214722 - .long 581652 - .long 1125291233 - .long 3382894442 - .long 3277322952 - .long 2879368705 - .long 1134502288 - .long 2391566275 - .long 3286518813 - .long 274553400 - .long 1143638273 - .long 512789562 - .long 3295790146 - .long 3583864087 - .long 1152986324 - .long 2337425402 - .long 3304798727 - .long 1854575809 - .long 3159867196 - .long 1765059742 - .long 3103980390 - .long 1056564255 - .long 3227329098 - .long 957604928 - .long 3170301297 - .long 1737111893 - .long 1086018364 - .long 3821479224 - .long 1030262355 - .long 1397067068 - .long 1113230428 - .long 1054232731 - .long 3267692171 - .long 1978243918 - .long 1127284645 - .long 3722409577 - .long 3281775634 - .long 1918858489 - .long 1141323813 - .long 3391721543 - .long 3295903979 - .long 2607178807 - .long 1155564765 - .long 3212344015 - .long 3310103974 - .long 3369531970 - .long 1169698149 - .long 335451402 - .long 3324302881 - .long 431247382 - .long 1183973580 - .long 3717434926 - .long 3338657222 - .long 1904523769 - .long 1198380992 - .long 8765522 - .long 3352646819 - .long 2089515505 - .long 1016996008 - .long 1260660699 - .long 961055715 - .long 2755288594 - .long 3230032374 - .long 651647436 - .long 3174928677 - .long 3079991920 - .long 1091533276 - .long 3443268597 - .long 1035583207 - .long 3925746702 - .long 1129598292 - .long 1087270140 - .long 3286788174 - .long 494941268 - .long 1149105228 - .long 1413067450 - .long 3306335280 - .long 2943951130 - .long 1168609830 - .long 1917094202 - .long 3325955583 - .long 3282582259 - .long 1188254230 - .long 205065768 - .long 3345548222 - .long 3975827413 - .long 1207978573 - .long 608024766 - .long 3365228477 - .long 514952666 - .long 1227617187 - .long 1683103546 - .long 3384985256 - .long 3324939681 - .long 1247457575 - .long 4078451799 - .long 3404527118 - .long 3100987862 - .long 1019853288 - .long 2384335067 - .long 962691388 - .long 2781784351 - .long 3233000439 - .long 1271614660 - .long 3176489869 - .long 626016822 - .long 1097348250 - .long 3842822006 - .long 1040353260 - .long 2239739676 - .long 1147303774 - .long 189136319 - .long 3307436007 - .long 2396687400 - .long 1172632530 - .long 1908223243 - .long 3332827221 - .long 2121588596 - .long 1198087089 - .long 3983173167 - .long 3358350016 - .long 2487337699 - .long 1223686165 - .long 3249965797 - .long 3383895554 - .long 3887284480 - .long 1249163916 - .long 138948171 - .long 3409430498 - .long 1463100005 - .long 1274763805 - .long 34738943 - .long 3435142323 - .long 2889101777 - .long 1300502035 - .long 2665757401 - .long 3460504734 - .long 987318156 - .long 3170486179 - .long 252831213 - .long 3113594951 - .long 4266405771 - .long 3236147062 - .long 52757777 - .long 3180182741 - .long 1823142101 - .long 1103640807 - .long 3806357955 - .long 1046313461 - .long 875359927 - .long 1166180665 - .long 1815208659 - .long 3329459206 - .long 1303129141 - .long 1197802172 - .long 4280462790 - .long 3361143469 - .long 626701262 - .long 1229550147 - .long 2303856491 - .long 3392960132 - .long 2759522360 - .long 1261440286 - .long 145515022 - .long 3424795397 - .long 2201193688 - .long 1293210725 - .long 2057332964 - .long 3456624552 - .long 3539517099 - .long 1325105434 - .long 1364231459 - .long 3488625947 - .long 3421843712 - .long 1357133388 - .long 200896422 - .long 3520281853 - .long 951171540 - .long 1026768452 - .long 3090769089 - .long 971487574 - .long 4234403032 - .long 3239454189 - .long 1460268972 - .long 3184474466 - .long 1346899734 - .long 1110354113 - .long 145456861 - .long 1052864217 - .long 2924701438 - .long 1186120500 - .long 3023147446 - .long 3352707860 - .long 1486479387 - .long 1224406765 - .long 1193997181 - .long 3391133412 - .long 2679629000 - .long 1262791412 - .long 2670450976 - .long 3429499462 - .long 1831795719 - .long 1301315682 - .long 3473315319 - .long 3467974125 - .long 2616420704 - .long 1339759302 - .long 1949536880 - .long 3506536322 - .long 2518396463 - .long 1378264708 - .long 142869669 - .long 3545106524 - .long 804820494 - .long 1416958345 - .long 2985125801 - .long 3583414179 - .long 2729716642 - .long 3174389784 - .long 1779261930 - .long 3115790859 - .long 2784196366 - .long 3242962813 - .long 2825451289 - .long 3185986297 - .long 2032114899 - .long 1117254632 - .long 1505002334 - .long 1059738942 - .long 3277658686 - .long 1207035096 - .long 498115686 - .long 3377105433 - .long 1711172328 - .long 1252267855 - .long 261417437 - .long 3422480089 - .long 1133240684 - .long 1297616851 - .long 1456800292 - .long 3467832532 - .long 2145797446 - .long 1343095967 - .long 2516644728 - .long 3513252141 - .long 725820954 - .long 1388528302 - .long 3986994814 - .long 3558807006 - .long 1955265405 - .long 1434003000 - .long 122646123 - .long 3604272992 - .long 1491943337 - .long 1479689885 - .long 1036478018 - .long 3649599135 - .long 523859850 - .long 3181400160 - .long 3846079041 - .long 3121433884 - .long 3639230521 - .long 3246590119 - .long 2638130497 - .long 3191278647 - .long 2154057324 - .long 1124508819 - .long 3236410824 - .long 1069265219 - .long 175871336 - .long 1228815189 - .long 2852522281 - .long 3402552205 - .long 1806384070 - .long 1281362740 - .long 423509286 - .long 3455121177 - .long 1160294737 - .long 1333930482 - .long 3543120866 - .long 3507725506 - .long 1036273485 - .long 1386572737 - .long 2942188771 - .long 3560408527 - .long 2777944578 - .long 1439300670 - .long 2738100981 - .long 3613185349 - .long 527942274 - .long 1492126097 - .long 1294011372 - .long 3665970729 - .long 3274455694 - .long 1544947882 - .long 1889769429 - .long 3718530789 - .long 136073262 - .long 1038797747 - .long 502134597 - .long 982165232 - .long 4211775762 - .long 3250359547 - .long 1347037926 - .long 3194312374 - .long 543769047 - .long 1132034342 - .long 1153606166 - .long 1076402838 - .long 3293430877 - .long 1251313085 - .long 540290119 - .long 3428873621 - .long 1766589444 - .long 1311355635 - .long 3887512491 - .long 3488899482 - .long 4113271272 - .long 1371561389 - .long 1216453194 - .long 3549072511 - .long 761821280 - .long 1431680659 - .long 3412859739 - .long 3609321978 - .long 1736216465 - .long 1491968482 - .long 1379671921 - .long 3669534956 - .long 871564305 - .long 1552192257 - .long 3755076681 - .long 3729888559 - .long 465380849 - .long 1612696812 - .long 1801521440 - .long 3789943511 - .long 926050541 - .long 3187761455 - .long 2363428923 - .long 3130505121 - .long 3212464044 - .long 3254203020 - .long 1767044225 - .long 3196691034 - .long 767402551 - .long 1139855610 - .long 3251527812 - .long 1084244526 - .long 2568107110 - .long 1274594461 - .long 3742439917 - .long 3456026525 - .long 2828194370 - .long 1342408213 - .long 1036563767 - .long 3523815749 - .long 138125806 - .long 1410361976 - .long 3332253618 - .long 3591742210 - .long 2265969007 - .long 1478279541 - .long 2044799860 - .long 3659742729 - .long 3159788672 - .long 1546250274 - .long 3040087996 - .long 3727787101 - .long 3566786041 - .long 1614266310 - .long 3445702274 - .long 3795877266 - .long 1647738551 - .long 1682455451 - .long 820553625 - .long 3863686600 - .long 2466985759 - .long 1045839115 - .long 2115301394 - .long 988248469 - .long 789067623 - .long 3258207291 - .long 2594430310 - .long 3200300918 - .long 682953991 - .long 1147781119 - .long 334308353 - .long 1092099647 - .long 666163226 - .long 1298545479 - .long 1527735017 - .long 3483905174 - .long 43015025 - .long 1374344588 - .long 1895454381 - .long 3559801465 - .long 3313337462 - .long 1450264132 - .long 938251762 - .long 3635670048 - .long 2344246077 - .long 1526147814 - .long 3329926839 - .long 3711639890 - .long 2189826955 - .long 1602221552 - .long 307911546 - .long 3787647166 - .long 4271816317 - .long 1678143122 - .long 3455709496 - .long 3863691777 - .long 509127304 - .long 1754367541 - .long 2246034954 - .long 3939578533 - .long 309332673 - .long 3194846686 - .long 4050026421 - .long 3139306075 - .long 1677069013 - .long 3262318455 - .long 407665306 - .long 3207206552 - .long 156965555 - .long 1155965375 - .long 2320115828 - .long 1098438062 - .long 2734085477 - .long 1323184128 - .long 3116943360 - .long 3512649235 - .long 2683227306 - .long 1407189808 - .long 2374702532 - .long 3596676496 - .long 1369556142 - .long 1491213979 - .long 3682738445 - .long 3680737093 - .long 208207094 - .long 1575312310 - .long 1070212038 - .long 3764875962 - .long 1332751409 - .long 1659495819 - .long 2960239586 - .long 3849108041 - .long 1328259946 - .long 1743778590 - .long 2152673987 - .long 3933352648 - .long 2459568424 - .long 1828057070 - .long 1053026559 - .long 4017368800 - .long 4272716315 - .long 3202139688 - .long 2347479448 - .long 3145750572 - .long 3880933726 - .long 3266512750 - .long 1526392126 - .long 3209922805 - .long 3647913141 - .long 1164353962 - .long 3796124307 - .long 1109331951 - .long 3682674239 - .long 1348349871 - .long 2807065817 - .long 3542009267 - .long 2123995152 - .long 1440744183 - .long 2606508288 - .long 3634425164 - .long 2187838465 - .long 1533156938 - .long 3218070138 - .long 3726874341 - .long 3194985081 - .long 1625643843 - .long 1282672122 - .long 3819401778 - .long 3085269549 - .long 1718215913 - .long 4171823927 - .long 3912022409 - .long 2286527342 - .long 1810887222 - .long 4263058773 - .long 4004655668 - .long 276869381 - .long 1903554397 - .long 2981609009 - .long 4097060567 - .long 2069415824 - .long 3207114478 - .long 3815897610 - .long 3150201997 - .long 1799063985 - .long 3270784757 - .long 609928762 - .long 3210962773 - .long 1398608221 - .long 1172933154 - .long 2839394180 - .long 1117275773 - .long 3966862031 - .long 1374007527 - .long 3094795956 - .long 3571940711 - .long 201952387 - .long 1474951107 - .long 1218377639 - .long 3672975792 - .long 4171572408 - .long 1576047750 - .long 2433360787 - .long 3774024473 - .long 2872117748 - .long 1677069826 - .long 1125668053 - .long 3875125411 - .long 1838424462 - .long 1778265418 - .long 1923560800 - .long 3976316898 - .long 2192672438 - .long 1879376253 - .long 2795231406 - .long 4077480577 - .long 3134618972 - .long 1980778833 - .long 2542206299 - .long 4178570441 - .long 858317418 - .long 1060903333 - .long 3120786235 - .long 1004681431 - .long 381774867 - .long 3275145580 - .long 1575769843 - .long 3219836452 - .long 3230239600 - .long 1181757061 - .long 1694309796 - .long 1126994475 - .long 2041459926 - .long 1400246667 - .long 1834143305 - .long 3602573072 - .long 3431862699 - .long 1509997896 - .long 674489055 - .long 3712297330 - .long 2942256815 - .long 1619727956 - .long 2430104127 - .long 3822158540 - .long 1181772448 - .long 1729549373 - .long 3316918483 - .long 3932027016 - .long 2290692518 - .long 1839450757 - .long 717742192 - .long 4041883887 - .long 2723262413 - .long 1949398481 - .long 726994291 - .long 4151823214 - .long 2316520017 - .long 2059476550 - .long 3506192554 - .long 4261590717 - .long 2615285756 - .long 3215685247 - .long 3456994573 - .long 3158988097 - .long 2576980377 - .long 3279526297 - .long 457772008 - .long 3222963352 - .long 1202590842 - .long 1190427361 - .long 3150210795 - .long 1135356295 - .long 2163381170 - .long 1426480799 - .long 2353315751 - .long 3633229223 - .long 3794716365 - .long 1544911246 - .long 3598226895 - .long 3751709375 - .long 3778743776 - .long 1663434111 - .long 1038551128 - .long 3870293084 - .long 2177305923 - .long 1782019278 - .long 316150431 - .long 3988869748 - .long 3666573938 - .long 1900657340 - .long 1225202613 - .long 4107481261 - .long 4106613245 - .long 2019377222 - .long 3685171119 - .long 4226128894 - .long 3001847201 - .long 2137308914 - .long 4294967295 - .long 4293918719 - .type _dbA,@object - .size _dbA,8032 - .space 672, 0x00 # pad - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_OFW_BOUND: - .word 60404 - .word 65533 - .word 19595 - .word 47317 - .word 32753 - .word 0 - .type _OFW_BOUND,@object - .size _OFW_BOUND,12 - .align 2 -_TWO5600: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 21983 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 10783 - .word 0 - .type _TWO5600,@object - .size _TWO5600,24 - .data - .hidden __libm_logl_k80 - .hidden fesetround - .hidden fegetround - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_atan2l_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_atan2l_k80.S deleted file mode 100644 index 525d374d7f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_atan2l_k80.S +++ /dev/null @@ -1,1634 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_atan2l_k80.c" - .text -..TXTST0: -# -- Begin __libm_atan2l_k80 - .text - .align 16,0x90 - .hidden __libm_atan2l_k80 - .globl __libm_atan2l_k80 -__libm_atan2l_k80: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - movl 16(%ebp), %edx - movl 12(%ebp), %ecx - movl %gs:20, %eax - movzbl 9(%edx), %esi - xorl %esp, %eax - andl $128, %esi - movl %eax, 172(%esp) - shrl $7, %esi - movl %esi, 44(%esp) - movzbl 9(%ecx), %esi - movzwl 8(%ecx), %eax - andl $128, %esi - andl $32767, %eax - movzwl 8(%edx), %edi - shrl $7, %esi - andl $32767, %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $32767, %eax - je ..B1.110 -..B1.2: - cmpl $32767, %edi - je ..B1.97 -..B1.3: - movl 4(%ecx), %eax - testl %eax, %eax - jne ..B1.5 -..B1.4: - cmpl $0, (%ecx) - je ..B1.8 -..B1.5: - cmpl $0, 4(%edx) - jne ..B1.20 -..B1.6: - cmpl $0, (%edx) - jne ..B1.20 -..B1.7: - testl %eax, %eax - jne ..B1.17 -..B1.116: - cmpl $0, (%ecx) -..B1.8: - jne ..B1.17 -..B1.9: - cmpl $0, 4(%edx) - jne ..B1.14 -..B1.10: - cmpl $0, (%edx) - jne ..B1.14 -..B1.11: - movl 8(%ebp), %eax - cmpl $0, 44(%esp) - movl $0, 24(%eax) - je ..B1.13 -..B1.12: - movl 8(%ebp), %ecx - lea (,%esi,8), %eax - lea (%eax,%esi,4), %edx - fldt _pi_00l@GOTOFF(%edx,%ebx) - fstpt (%ecx) - fldt _pilo_00l@GOTOFF(%edx,%ebx) - fldt _small_value_80@GOTOFF(%edx,%ebx) - fsubrp %st, %st(1) - fstpt 12(%ecx) - jmp ..B1.18 -..B1.13: - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fldz - fmull ones@GOTOFF(%ebx,%esi,8) - movl 8(%ebp), %eax - fstpt (%eax) - fstpt 12(%eax) - jmp ..B1.18 -..B1.14: - movl 8(%ebp), %eax - cmpl $0, 44(%esp) - movl $0, 24(%eax) - je ..B1.16 -..B1.15: - movl 8(%ebp), %ecx - lea (,%esi,8), %eax - lea (%eax,%esi,4), %edx - fldt _pi_00l@GOTOFF(%edx,%ebx) - fstpt (%ecx) - fldt _pilo_00l@GOTOFF(%edx,%ebx) - fldt _small_value_80@GOTOFF(%edx,%ebx) - fsubrp %st, %st(1) - fstpt 12(%ecx) - jmp ..B1.18 -..B1.16: - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fldz - fmull ones@GOTOFF(%ebx,%esi,8) - movl 8(%ebp), %eax - fstpt (%eax) - fstpt 12(%eax) - jmp ..B1.18 -..B1.17: - movl 8(%ebp), %edx - lea (,%esi,8), %eax - lea (%eax,%esi,4), %esi - fldt _pi_02l@GOTOFF(%esi,%ebx) - movl $0, 24(%edx) - fstpt (%edx) - fldt _pilo_02l@GOTOFF(%esi,%ebx) - fldt _small_value_80@GOTOFF(%esi,%ebx) - fsubrp %st, %st(1) - fstpt 12(%edx) -..B1.18: - movl 172(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.89 -..B1.19: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.20: - movl (%edx), %edi - lea 116(%esp), %eax - movl %edi, (%eax) - movl 4(%edx), %edi - movl %edi, 4(%eax) - movl 8(%edx), %edi - movl %edi, 8(%eax) - movl 12(%edx), %edi - movl %edi, 12(%eax) - movl 16(%edx), %edi - movl %edi, 16(%eax) - movl 20(%edx), %edi - movl 24(%edx), %edx - movl %edi, 20(%eax) - movl %edx, 24(%eax) - movl (%ecx), %edx - movl 4(%ecx), %edi - movl %edx, 28(%eax) - movl %edi, 32(%eax) - movl 8(%ecx), %edx - movl 12(%ecx), %edi - movl %edx, 36(%eax) - movl %edi, 40(%eax) - movl 16(%ecx), %edx - movl 20(%ecx), %edi - movl 24(%ecx), %ecx - movl %edx, 44(%eax) - movl %edi, 48(%eax) - movl %ecx, 52(%eax) - addl $4, %esp - pushl %eax - call __libm_normalizel_k80 -..B1.21: - addl $4, %esp - lea 140(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.22: - fldt 116(%esp) - fld %st(0) - fldt 128(%esp) - movl 44(%esp), %eax - fadd %st, %st(1) - movl 140(%esp), %ecx - fxch %st(1) - fsub %st, %st(2) - movl 168(%esp), %edx - cmpl %edx, %ecx - fxch %st(2) - fsubrp %st, %st(1) - fldt 144(%esp) - fld %st(0) - fldt 156(%esp) - fadd %st, %st(1) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fldl ones@GOTOFF(%ebx,%eax,8) - fmul %st, %st(4) - fmulp %st, %st(3) - fldl ones@GOTOFF(%ebx,%esi,8) - fmul %st, %st(2) - fmul %st, %st(1) - jg ..B1.25 -..B1.23: - jne ..B1.75 -..B1.24: - fxch %st(4) - fcom %st(2) - fnstsw %ax - sahf - fxch %st(4) - jbe ..B1.75 -..B1.25: - lea 12(%edx), %eax - cmpl %eax, %ecx - jle ..B1.70 -..B1.26: - lea 75(%edx), %eax - cmpl %eax, %ecx - jle ..B1.43 -..B1.27: - cmpl $0, 44(%esp) - je ..B1.29 -..B1.28: - fstp %st(0) - fstp %st(2) - fstp %st(1) - fstp %st(0) - fstp %st(0) - movl 8(%ebp), %edx - lea (,%esi,8), %eax - lea (%eax,%esi,4), %esi - fldt _pi_00l@GOTOFF(%esi,%ebx) - movl $0, 24(%edx) - fstpt (%edx) - fldt _pilo_00l@GOTOFF(%esi,%ebx) - fldt _small_value_80@GOTOFF(%esi,%ebx) - fsubrp %st, %st(1) - fstpt 12(%edx) - jmp ..B1.41 -..B1.29: - fxch %st(2) - fstpt 144(%esp) - fldt 144(%esp) - movzwl 152(%esp), %eax - andl $32767, %eax - fxch %st(4) - fstpt 116(%esp) - fldt 116(%esp) - cmpl $8383, %eax - jge ..B1.31 -..B1.30: - fstp %st(4) - fstp %st(3) - fxch %st(2) - fstpt 156(%esp) - fstpt 128(%esp) - jmp ..B1.37 -..B1.31: - cmpl $24383, %eax - jg ..B1.30 -..B1.33: - movzwl 124(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.30 -..B1.35: - cmpl $24383, %eax - fxch %st(3) - fxch %st(2) - fxch %st(4) - fxch %st(1) - jle ..B1.40 -..B1.36: - fstp %st(1) - fstp %st(2) - fxch %st(1) - fstpt 156(%esp) - fstpt 128(%esp) -..B1.37: - addl $4, %esp - lea 140(%esp), %eax - pushl %eax - fstpt -40(%eax) - call __libm_normalizel_k80 -..B1.38: - fldt 104(%esp) - addl $4, %esp - lea 112(%esp), %eax - pushl %eax - fstpt -12(%eax) - call __libm_normalizel_k80 -..B1.39: - fldt 104(%esp) - fldt 116(%esp) - fldt 128(%esp) - fldt 144(%esp) - fldt 156(%esp) - movl 140(%esp), %ecx - movl 168(%esp), %edx -..B1.40: - fld %st(1) - subl %ecx, %edx - fdiv %st(4), %st - fstpt 48(%esp) - fldt 48(%esp) - fxch %st(5) - fstpt 104(%esp) - fxch %st(3) - fstpt 32(%esp) - fldt 32(%esp) - fldt .L_2il0floatpacket.16@GOTOFF(%ebx) - fld %st(0) - fmul %st(6), %st - fld %st(0) - movl 8(%ebp), %eax - fsubr %st(7), %st - movl %edx, 24(%eax) - faddp %st, %st(1) - fld %st(0) - fsubrp %st, %st(7) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fsub %st(1), %st - faddp %st, %st(1) - fsubr %st, %st(2) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fmul %st(7), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(6) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(5) - fsubrp %st, %st(1) - fsubp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 48(%esp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(0) - fldt 32(%esp) - fdivrp %st, %st(3) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt 104(%esp) - fmul %st, %st(1) - fxch %st(1) - fstpt (%eax) - fmulp %st, %st(1) - fstpt 12(%eax) - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - fldt _small_value_80@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt 16(%esp) -..B1.41: - movl 172(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.89 -..B1.42: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.43: - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - subl %ecx, %edx - movzwl 8+.L_2il0floatpacket.12@GOTOFF(%ebx), %eax - addl $16383, %edx - movl %eax, 28(%esp) - andl $-32768, %eax - andl $32767, %edx - fstpt 88(%esp) - fldt 88(%esp) - orl %edx, %eax - movw %ax, 96(%esp) - xorl %edx, %edx - fxch %st(5) - fstpt 116(%esp) - fldt 116(%esp) - xorl %eax, %eax - fxch %st(5) - fstpt 64(%esp) - xorl %ecx, %ecx - fldt 88(%esp) - fmul %st, %st(3) - fxch %st(3) - fstpt 144(%esp) - fldt 144(%esp) - movzwl 152(%esp), %esi - andl $32767, %esi - fxch %st(3) - fmulp %st, %st(2) - cmpl $0, 44(%esp) - je ..B1.57 -..B1.44: - cmpl $8383, %esi - jge ..B1.46 -..B1.45: - fstp %st(2) - fstp %st(3) - movl %eax, 168(%esp) - movl %eax, 140(%esp) - fxch %st(2) - fstpt 156(%esp) - fstpt 128(%esp) - jmp ..B1.52 -..B1.46: - cmpl $24383, %esi - jg ..B1.45 -..B1.48: - movzwl 124(%esp), %esi - andl $32767, %esi - cmpl $8383, %esi - jl ..B1.45 -..B1.50: - cmpl $24383, %esi - fxch %st(4) - fxch %st(3) - fxch %st(2) - fxch %st(1) - jle ..B1.55 -..B1.51: - fstp %st(1) - fstp %st(2) - movl %eax, 168(%esp) - movl %eax, 140(%esp) - fxch %st(1) - fstpt 156(%esp) - fstpt 128(%esp) -..B1.52: - addl $4, %esp - lea 140(%esp), %eax - pushl %eax - fstpt -40(%eax) - call __libm_normalizel_k80 -..B1.53: - fldt 104(%esp) - addl $4, %esp - lea 112(%esp), %eax - pushl %eax - fstpt -12(%eax) - call __libm_normalizel_k80 -..B1.54: - fldt 104(%esp) - fldt 116(%esp) - fldt 128(%esp) - fldt 144(%esp) - fldt 156(%esp) - movl 140(%esp), %edx - movl 168(%esp), %ecx -..B1.55: - fld %st(1) - subl %edx, %ecx - fdiv %st(4), %st - addl $16383, %ecx - fstpt 48(%esp) - fldt 48(%esp) - andl $32767, %ecx - fxch %st(5) - fstpt 104(%esp) - fxch %st(3) - fstpt 32(%esp) - fldt 32(%esp) - fldt .L_2il0floatpacket.16@GOTOFF(%ebx) - fld %st(0) - fmul %st(6), %st - fld %st(0) - movl 28(%esp), %eax - fsubr %st(7), %st - andl $-32768, %eax - faddp %st, %st(1) - fld %st(0) - orl %ecx, %eax - movl 8(%ebp), %edx - fsubrp %st, %st(7) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fsub %st(1), %st - faddp %st, %st(1) - fsubr %st, %st(2) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fmul %st(7), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(6) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(5) - fsubrp %st, %st(1) - fsubp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 48(%esp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fldt 32(%esp) - fdivrp %st, %st(2) - faddp %st, %st(1) - fldt 64(%esp) - fstpt 88(%esp) - fldt 36+_P@GOTOFF(%ebx) - fldt 12+_P@GOTOFF(%ebx) - fldt 24+_P@GOTOFF(%ebx) - fldt _P@GOTOFF(%ebx) - movw %ax, 96(%esp) - fldt 88(%esp) - fmulp %st, %st(5) - fld %st(4) - fmul %st(5), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - fadd %st(1), %st - fxch %st(1) - fstpt 88(%esp) - fldl 8192+__libm_atanl_table_128@GOTOFF(%ebx) - fldl 8200+__libm_atanl_table_128@GOTOFF(%ebx) - movl $0, 24(%edx) - fsubp %st, %st(2) - fldt 104(%esp) - fmul %st, %st(1) - fld %st(1) - fxch %st(1) - fmulp %st, %st(3) - fadd %st(2), %st - fstpt (%edx) - fldt (%edx) - fsubp %st, %st(1) - fsubrp %st, %st(1) - fstpt 12(%edx) - movl 172(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B1.89 -..B1.56: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.57: - cmpl $8383, %esi - jge ..B1.59 -..B1.58: - fstp %st(2) - fstp %st(3) - movl %eax, 168(%esp) - movl %eax, 140(%esp) - fxch %st(2) - fstpt 156(%esp) - fstpt 128(%esp) - jmp ..B1.65 -..B1.59: - cmpl $24383, %esi - jg ..B1.58 -..B1.61: - movzwl 124(%esp), %esi - andl $32767, %esi - cmpl $8383, %esi - jl ..B1.58 -..B1.63: - cmpl $24383, %esi - fxch %st(4) - fxch %st(3) - fxch %st(2) - fxch %st(1) - jle ..B1.68 -..B1.64: - fstp %st(1) - fstp %st(2) - movl %eax, 168(%esp) - movl %eax, 140(%esp) - fxch %st(1) - fstpt 156(%esp) - fstpt 128(%esp) -..B1.65: - addl $4, %esp - lea 140(%esp), %eax - pushl %eax - fstpt -40(%eax) - call __libm_normalizel_k80 -..B1.66: - fldt 104(%esp) - addl $4, %esp - lea 112(%esp), %eax - pushl %eax - fstpt -12(%eax) - call __libm_normalizel_k80 -..B1.67: - fldt 104(%esp) - fldt 116(%esp) - fldt 128(%esp) - fldt 144(%esp) - fldt 156(%esp) - movl 140(%esp), %edx - movl 168(%esp), %ecx -..B1.68: - fld %st(1) - subl %edx, %ecx - fdiv %st(4), %st - addl $16383, %ecx - fstpt 48(%esp) - fldt 48(%esp) - andl $32767, %ecx - fxch %st(5) - fstpt 104(%esp) - fxch %st(3) - fstpt 32(%esp) - fldt 32(%esp) - fldt .L_2il0floatpacket.16@GOTOFF(%ebx) - fld %st(0) - fmul %st(6), %st - fld %st(0) - movl 28(%esp), %eax - fsubr %st(7), %st - andl $-32768, %eax - faddp %st, %st(1) - fld %st(0) - orl %ecx, %eax - movl 8(%ebp), %edx - fsubrp %st, %st(7) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - movl $0, 24(%edx) - fsub %st(1), %st - faddp %st, %st(1) - fsubr %st, %st(2) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fmul %st(7), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(6) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(5) - fsubrp %st, %st(1) - fsubp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 48(%esp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fldt 32(%esp) - fdivrp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt 64(%esp) - fstpt 88(%esp) - fldt 36+_P@GOTOFF(%ebx) - fldt 12+_P@GOTOFF(%ebx) - fldt _P@GOTOFF(%ebx) - movw %ax, 96(%esp) - fldt 88(%esp) - fmul %st, %st(4) - fmul %st, %st(4) - fld %st(4) - fmul %st(5), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fxch %st(1) - fmul %st, %st(6) - fmulp %st, %st(6) - fxch %st(4) - fstpt 88(%esp) - fldt 88(%esp) - fldt 24+_P@GOTOFF(%ebx) - fmulp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(2) - fldt 104(%esp) - fmul %st, %st(1) - fxch %st(1) - fstpt (%edx) - fmulp %st, %st(1) - fstpt 12(%edx) - movl 172(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B1.89 -..B1.69: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.70: - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - subl %ecx, %edx - addl $16383, %edx - movzwl 8+.L_2il0floatpacket.12@GOTOFF(%ebx), %eax - andl $32767, %edx - andl $-32768, %eax - fstpt 88(%esp) - orl %edx, %eax - movw %ax, 96(%esp) - fld %st(4) - fxch %st(1) - fstpt 104(%esp) - xorl %edx, %edx - fxch %st(4) - fstpt 116(%esp) - fldt 116(%esp) - fxch %st(3) - fstpt 128(%esp) - fldt 128(%esp) - fldt 88(%esp) - fmul %st, %st(3) - fxch %st(3) - fstpt 144(%esp) - fldt 144(%esp) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpt 156(%esp) - fldt 156(%esp) - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - fmul %st(3), %st - fdiv %st(4), %st - fldt .L_2il0floatpacket.14@GOTOFF(%ebx) - movl %edx, 140(%esp) - movl %edx, 168(%esp) - fxch %st(1) - faddl _TWO_63H@GOTOFF(%ebx) - fstpt 76(%esp) - fldt 76(%esp) - fldl _TWO_48H@GOTOFF(%ebx) - movl 76(%esp), %eax - shll $4, %eax - fxch %st(1) - fsubl _TWO_63H@GOTOFF(%ebx) - fmulp %st, %st(2) - fld %st(5) - fmul %st(1), %st - cmpl $0, 44(%esp) - fadd %st, %st(7) - fxch %st(7) - fstpt 76(%esp) - fldt 76(%esp) - fsubp %st, %st(7) - fxch %st(5) - fsub %st(6), %st - faddp %st, %st(3) - fld %st(4) - fmul %st(4), %st - fld %st(0) - fadd %st(5), %st - fstpt 76(%esp) - fldt 76(%esp) - fsubp %st, %st(1) - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fld %st(3) - fmul %st(1), %st - fadd %st(3), %st - fld %st(2) - fmul %st(2), %st - fadd %st(7), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - fsubrp %st, %st(5) - fxch %st(3) - fmulp %st, %st(6) - fxch %st(5) - fsubrp %st, %st(1) - fld %st(4) - fadd %st(2), %st - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - fdivp %st, %st(1) - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fstpt 76(%esp) - fxch %st(4) - fstpt 88(%esp) - fldt 88(%esp) - fxch %st(2) - fmul %st(4), %st - fldt 76(%esp) - fsubp %st, %st(3) - fld %st(2) - fsubr %st(5), %st - fld %st(6) - fmul %st(1), %st - faddp %st, %st(2) - fxch %st(3) - fmul %st, %st(6) - fldt .L_2il0floatpacket.15@GOTOFF(%ebx) - faddp %st, %st(7) - fxch %st(1) - faddp %st, %st(6) - fxch %st(5) - fmulp %st, %st(4) - fxch %st(3) - fsubrp %st, %st(1) - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fld %st(1) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(2) - fmul %st(3), %st - fxch %st(2) - fadd %st(3), %st - fld %st(1) - fmul %st(1), %st - faddp %st, %st(3) - fld %st(3) - fmul %st(4), %st - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fldt 36+_P@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%ebx) - fmulp %st, %st(2) - fldt _P@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 104(%esp) - je ..B1.72 -..B1.71: - negl %eax - fld %st(2) - fldl 8192+__libm_atanl_table_128@GOTOFF(%ebx,%eax) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fxch %st(3) - fstpt 88(%esp) - fldt 88(%esp) - fldl 8200+__libm_atanl_table_128@GOTOFF(%ebx,%eax) - fsubp %st, %st(3) - faddp %st, %st(2) - jmp ..B1.73 -..B1.72: - fldl __libm_atanl_table_128@GOTOFF(%eax,%ebx) - fld %st(3) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fxch %st(3) - fstpt 88(%esp) - fldt 88(%esp) - fldl 8+__libm_atanl_table_128@GOTOFF(%eax,%ebx) - faddp %st, %st(3) - faddp %st, %st(2) -..B1.73: - fmul %st, %st(2) - fld %st(2) - fxch %st(2) - fmulp %st, %st(1) - movl 8(%ebp), %eax - fadd %st, %st(1) - movl $0, 24(%eax) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fstpt 12(%eax) - fstpt (%eax) - movl 172(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.89 -..B1.74: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.75: - lea 12(%ecx), %eax - cmpl %eax, %edx - jle ..B1.84 -..B1.76: - fstp %st(3) - fstp %st(0) - lea 75(%ecx), %eax - cmpl %eax, %edx - jg ..B1.82 -..B1.77: - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - subl %ecx, %edx - addl $16383, %edx - movzwl 8+.L_2il0floatpacket.12@GOTOFF(%ebx), %eax - andl $32767, %edx - andl $-32768, %eax - fstpt 88(%esp) - orl %edx, %eax - fldt 36+_P@GOTOFF(%ebx) - fldt _P@GOTOFF(%ebx) - movw %ax, 96(%esp) - fldt 88(%esp) - fmulp %st, %st(3) - fxch %st(2) - fdivrp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fldt 12+_P@GOTOFF(%ebx) - movl 8(%ebp), %edx - faddp %st, %st(3) - fmul %st, %st(2) - fldt 24+_P@GOTOFF(%ebx) - fmulp %st, %st(1) - cmpl $0, 44(%esp) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(2) - fldl 4096+__libm_atanl_table_128@GOTOFF(%ebx) - fmul %st(1), %st - fldl 4104+__libm_atanl_table_128@GOTOFF(%ebx) - movl $0, 24(%edx) - je ..B1.79 -..B1.78: - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - jmp ..B1.80 -..B1.79: - fsubp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) -..B1.80: - fld %st(0) - movl 8(%ebp), %eax - fadd %st(2), %st - fstpt (%eax) - fldt (%eax) - fsubp %st, %st(1) - fsubrp %st, %st(1) - fstpt 12(%eax) - movl 172(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.89 -..B1.81: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.82: - fstp %st(1) - fstp %st(0) - fstp %st(0) - movl 8(%ebp), %edx - lea (,%esi,8), %eax - lea (%eax,%esi,4), %esi - fldt _pi_02l@GOTOFF(%esi,%ebx) - movl $0, 24(%edx) - fstpt (%edx) - fldt _pilo_02l@GOTOFF(%esi,%ebx) - fldt _small_value_80@GOTOFF(%esi,%ebx) - fsubrp %st, %st(1) - fstpt 12(%edx) - movl 172(%esp), %ecx - xorl %esp, %ecx - cmpl %gs:20, %ecx - jne ..B1.89 -..B1.83: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.84: - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - subl %ecx, %edx - addl $16383, %edx - movzwl 8+.L_2il0floatpacket.12@GOTOFF(%ebx), %eax - andl $32767, %edx - andl $-32768, %eax - fstpt 88(%esp) - orl %edx, %eax - movw %ax, 96(%esp) - fld %st(4) - fxch %st(1) - fstpt 104(%esp) - xorl %edx, %edx - fxch %st(4) - fstpt 116(%esp) - fldt 116(%esp) - fxch %st(3) - fstpt 128(%esp) - fldt 128(%esp) - fldt 88(%esp) - fmul %st, %st(3) - fxch %st(3) - fstpt 144(%esp) - fldt 144(%esp) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpt 156(%esp) - fldt 156(%esp) - fldt .L_2il0floatpacket.13@GOTOFF(%ebx) - fmul %st(4), %st - fdiv %st(3), %st - fldt .L_2il0floatpacket.14@GOTOFF(%ebx) - movl %edx, 140(%esp) - movl %edx, 168(%esp) - fxch %st(1) - faddl _TWO_63H@GOTOFF(%ebx) - fstpt 76(%esp) - fld %st(4) - fldt 76(%esp) - movl 76(%esp), %eax - shll $4, %eax - fsubl _TWO_63H@GOTOFF(%ebx) - fmulp %st, %st(2) - fldl _TWO_48H@GOTOFF(%ebx) - fmul %st, %st(7) - cmpl $0, 44(%esp) - fxch %st(1) - fadd %st(7), %st - fstpt 76(%esp) - fldt 76(%esp) - fsubp %st, %st(7) - fxch %st(5) - fsub %st(6), %st - faddp %st, %st(3) - fld %st(4) - fmul %st(4), %st - fld %st(0) - fadd %st(5), %st - fstpt 76(%esp) - fldt 76(%esp) - fsubp %st, %st(1) - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fld %st(5) - fmul %st(1), %st - fadd %st(2), %st - fstpt 32(%esp) - fld %st(2) - fmul %st(1), %st - fadd %st(4), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(6) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(1) - fldt 32(%esp) - fadd %st(2), %st - fldt 32(%esp) - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - fdivp %st, %st(2) - fxch %st(1) - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fstpt 76(%esp) - fxch %st(4) - fstpt 88(%esp) - fldt 88(%esp) - fxch %st(3) - fmul %st(4), %st - fldt 76(%esp) - fsubp %st, %st(4) - fld %st(3) - fsubr %st(5), %st - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 32(%esp) - fmul %st(4), %st - fldt .L_2il0floatpacket.15@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fsubp %st, %st(3) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fadd %st(4), %st - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fld %st(2) - fxch %st(4) - fmulp %st, %st(2) - fmul %st(1), %st - fld %st(2) - fadd %st(2), %st - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fld %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%ebx) - fmulp %st, %st(2) - fldt _P@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 104(%esp) - je ..B1.86 -..B1.85: - fldl 4096+__libm_atanl_table_128@GOTOFF(%ebx,%eax) - fld %st(3) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fxch %st(3) - fstpt 88(%esp) - fldt 88(%esp) - fldl 4104+__libm_atanl_table_128@GOTOFF(%ebx,%eax) - faddp %st, %st(3) - faddp %st, %st(2) - jmp ..B1.87 -..B1.86: - negl %eax - fld %st(2) - fldl 4096+__libm_atanl_table_128@GOTOFF(%ebx,%eax) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fxch %st(3) - fstpt 88(%esp) - fldt 88(%esp) - fldl 4104+__libm_atanl_table_128@GOTOFF(%ebx,%eax) - fsubp %st, %st(3) - faddp %st, %st(2) -..B1.87: - fmul %st, %st(2) - fld %st(2) - fxch %st(2) - fmulp %st, %st(1) - movl 8(%ebp), %eax - fadd %st, %st(1) - movl $0, 24(%eax) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fstpt 12(%eax) - fstpt (%eax) - movl 172(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.89 -..B1.88: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.89: - call __stack_chk_fail@PLT -..B1.97: - cmpl $-2147483648, 4(%edx) - jne ..B1.99 -..B1.98: - cmpl $0, (%edx) - je ..B1.100 -..B1.99: - fldt (%edx) - fldt (%ecx) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - movl 8(%ebp), %eax - movl $0, 24(%eax) - fstpt 12(%eax) - fstpt (%eax) - jmp ..B1.104 -..B1.100: - movl 8(%ebp), %edx - cmpl $32767, %eax - movl $0, 24(%edx) - je ..B1.107 -..B1.101: - cmpl $0, 44(%esp) - je ..B1.103 -..B1.102: - movl 8(%ebp), %ecx - lea (,%esi,8), %eax - lea (%eax,%esi,4), %edx - fldt _pi_00l@GOTOFF(%edx,%ebx) - fstpt (%ecx) - fldt _pilo_00l@GOTOFF(%edx,%ebx) - fldt _small_value_80@GOTOFF(%edx,%ebx) - fsubrp %st, %st(1) - fstpt 12(%ecx) - jmp ..B1.104 -..B1.103: - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fldz - fmull ones@GOTOFF(%ebx,%esi,8) - movl 8(%ebp), %eax - fstpt (%eax) - fstpt 12(%eax) -..B1.104: - movl 172(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.89 - jmp ..B1.19 -..B1.107: - cmpl $0, 44(%esp) - lea (,%esi,8), %eax - lea (%eax,%esi,4), %edx - je ..B1.109 -..B1.108: - fldt _pi_34l@GOTOFF(%edx,%ebx) - fldt _pilo_34l@GOTOFF(%edx,%ebx) - fldt _small_value_80@GOTOFF(%edx,%ebx) - movl 8(%ebp), %eax - fsubrp %st, %st(1) - fstpt 12(%eax) - fstpt (%eax) - jmp ..B1.104 -..B1.109: - fldt _pi_04l@GOTOFF(%edx,%ebx) - fldt _pilo_04l@GOTOFF(%edx,%ebx) - fldt _small_value_80@GOTOFF(%edx,%ebx) - movl 8(%ebp), %eax - fsubrp %st, %st(1) - fstpt 12(%eax) - fstpt (%eax) - jmp ..B1.104 -..B1.110: - cmpl $-2147483648, 4(%ecx) - jne ..B1.99 -..B1.111: - cmpl $0, (%ecx) - jne ..B1.99 -..B1.112: - cmpl $32767, %edi - je ..B1.97 -..B1.113: - movl 8(%ebp), %edx - lea (,%esi,8), %eax - lea (%eax,%esi,4), %esi - fldt _pi_02l@GOTOFF(%esi,%ebx) - movl $0, 24(%edx) - fstpt (%edx) - fldt _pilo_02l@GOTOFF(%esi,%ebx) - fldt _small_value_80@GOTOFF(%esi,%ebx) - fsubrp %st, %st(1) - fstpt 12(%edx) - jmp ..B1.104 - .align 16,0x90 - .type __libm_atan2l_k80,@function - .size __libm_atan2l_k80,.-__libm_atan2l_k80 - .data -# -- End __libm_atan2l_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.12: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x40,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.14: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x3f,0x00,0x00 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.15: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.16: - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0x40,0x00,0x00 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 2 -_pi_00l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16384 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49152 - .word 0 - .type _pi_00l,@object - .size _pi_00l,24 - .align 2 -_pilo_00l: - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 49086 - .word 0 - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 16318 - .word 0 - .type _pilo_00l,@object - .size _pilo_00l,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_pi_02l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49151 - .word 0 - .type _pi_02l,@object - .size _pi_02l,24 - .align 2 -_pilo_02l: - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 49085 - .word 0 - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 16317 - .word 0 - .type _pilo_02l,@object - .size _pilo_02l,24 - .align 2 -_P: - .word 43664 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 43235 - .word 52379 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 59507 - .word 38278 - .word 9340 - .word 37449 - .word 49148 - .word 0 - .word 9132 - .word 55602 - .word 8665 - .word 58245 - .word 16379 - .word 0 - .type _P,@object - .size _P,48 - .align 2 -_pi_34l: - .word 37288 - .word 39182 - .word 58361 - .word 38603 - .word 16384 - .word 0 - .word 37288 - .word 39182 - .word 58361 - .word 38603 - .word 49152 - .word 0 - .type _pi_34l,@object - .size _pi_34l,24 - .align 2 -_pilo_34l: - .word 54470 - .word 48821 - .word 27694 - .word 55510 - .word 49087 - .word 0 - .word 54470 - .word 48821 - .word 27694 - .word 55510 - .word 16319 - .word 0 - .type _pilo_34l,@object - .size _pilo_34l,24 - .align 2 -_pi_04l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16382 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49150 - .word 0 - .type _pi_04l,@object - .size _pi_04l,24 - .align 2 -_pilo_04l: - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 49084 - .word 0 - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 16316 - .word 0 - .type _pilo_04l,@object - .size _pilo_04l,24 - .data - .hidden __libm_atanl_table_128 - .hidden __libm_normalizel_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_coshl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_coshl_k80.S deleted file mode 100644 index 88642ecaeb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_coshl_k80.S +++ /dev/null @@ -1,724 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_coshl_k80.c" - .text -..TXTST0: -# -- Begin __libm_coshl_k80 - .text - .align 16,0x90 - .hidden __libm_coshl_k80 - .globl __libm_coshl_k80 -__libm_coshl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $68, %esp - movzwl 16(%ebp), %eax - andl $32767, %eax - movl 20(%ebp), %ebx - cmpl $16405, %eax - call ..L2 -..L2: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi - jge ..B1.17 -..B1.2: - cmpl $16382, %eax - jge ..B1.13 -..B1.3: - cmpl $16378, %eax - jge ..B1.11 -..B1.4: - fldt .L_2il0floatpacket.1@GOTOFF(%esi) - cmpl $16372, %eax - jge ..B1.10 -..B1.5: - cmpl $16365, %eax - jge ..B1.9 -..B1.6: - fstpt (%ebx) - cmpl $16308, %eax - jge ..B1.8 -..B1.7: - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - fstpt 12(%ebx) - fldt 12(%ebx) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.8: - fldt 8(%ebp) - fldt _Q3@GOTOFF(%esi) - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 12(%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - fldt 8(%ebp) - fmul %st(0), %st - fxch %st(1) - fstpt (%ebx) - fldt 12+_Q2@GOTOFF(%esi) - fmul %st(1), %st - fldt _Q2@GOTOFF(%esi) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 12(%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.10: - fldt 8(%ebp) - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fstpt (%ebx) - fldt 36+_Q1@GOTOFF(%esi) - fmul %st(2), %st - fldt 12+_Q1@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_Q1@GOTOFF(%esi) - fmulp %st, %st(3) - fldt _Q1@GOTOFF(%esi) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - fldt 8(%ebp) - fld %st(0) - fld %st(1) - fld %st(2) - fmul %st(3), %st - fld %st(0) - fmul %st(1), %st - fldl _TWO_48H@GOTOFF(%esi) - fadd %st, %st(4) - fxch %st(4) - fstpt 56(%esp) - fldt 56(%esp) - fsub %st(4), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(1) - fmul %st(4), %st - fxch %st(6) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(5) - fxch %st(2) - fmul %st(0), %st - fldt 72+_Q@GOTOFF(%esi) - fmul %st(3), %st - fldt 48+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_Q@GOTOFF(%esi) - fmul %st(4), %st - fldt 60+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(4), %st - fldt 36+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmulp %st, %st(4) - fld %st(5) - fldt 12+_Q@GOTOFF(%esi) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fldt 108+_Q@GOTOFF(%esi) - fld %st(0) - fmul %st(7), %st - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmul %st, %st(2) - fldt 96+_Q@GOTOFF(%esi) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(2) - fmulp %st, %st(4) - fld %st(1) - fadd %st(4), %st - fadd %st(3), %st - fstpt 56(%esp) - fldt 56(%esp) - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 12(%ebx) - fldt .L_2il0floatpacket.1@GOTOFF(%esi) - faddp %st, %st(1) - fstpt (%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) -..B1.12: - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - fldt 8(%ebp) - fldl _TWO_63H@GOTOFF(%esi) - fldt _KLN2@GOTOFF(%esi) - fldt _LN2K@GOTOFF(%esi) - fldt 12+_LN2K@GOTOFF(%esi) - fldl _TWO_32@GOTOFF(%esi) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fxch %st(5) - fmull ones@GOTOFF(%esi,%eax,8) - fmul %st, %st(3) - fxch %st(3) - fadd %st(4), %st - fstpt 56(%esp) - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 56(%esp) - movl 56(%esp), %eax - fsubp %st, %st(4) - fxch %st(1) - fmul %st(3), %st - movsbl %al, %ecx - fsubrp %st, %st(1) - fld %st(0) - subl %ecx, %eax - fxch %st(2) - fmulp %st, %st(3) - movzwl 16(%ebp), %edx - fxch %st(1) - fsub %st(2), %st - fldl _TWO_32P@GOTOFF(%esi) - andl $32767, %edx - fmul %st(1), %st - fxch %st(4) - fmulp %st, %st(1) - sarl $8, %eax - fsubrp %st, %st(3) - fld %st(2) - cmpl $16387, %edx - fxch %st(1) - fsub %st(3), %st - fsubp %st, %st(2) - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%esi) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(1), %st - fldt _P@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%esi) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%esi) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - jle ..B1.15 -..B1.14: - shll $4, %ecx - decl %eax - movl %eax, 48(%esp) - faddp %st, %st(1) - fildl 48(%esp) - fldl 2056+__libm_expl_table_256@GOTOFF(%esi,%ecx) - fldl 2048+__libm_expl_table_256@GOTOFF(%esi,%ecx) - fld %st(0) - fmul %st(4), %st - fxch %st(4) - fadd %st(5), %st - fmul %st(2), %st - movzbl 17(%ebp), %eax - faddp %st, %st(4) - fmul %st, %st(4) - fld %st(0) - andl $128, %eax - shrl $7, %eax - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fldl ones@GOTOFF(%esi,%eax,8) - fmul %st, %st(3) - fxch %st(3) - fstpt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%ebx) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - je ..B1.20 -..B1.16: - fldt .L_2il0floatpacket.1@GOTOFF(%esi) - lea -1(%eax), %edi - shll $4, %ecx - fstpt (%esp) - fld %st(0) - movl %edi, 48(%esp) - movl %eax, %edi - negl %edi - fadd %st(2), %st - fxch %st(2) - fsubrp %st, %st(1) - fld %st(2) - addl $16383, %edi - fldl 2056+__libm_expl_table_256@GOTOFF(%esi,%ecx) - subl %eax, %edi - fldl 2048+__libm_expl_table_256@GOTOFF(%esi,%ecx) - negl %ecx - fstpt 16(%esp) - fldt 16(%esp) - andl $32767, %edi - movzwl 8+.L_2il0floatpacket.1@GOTOFF(%esi), %edx - fadd %st(1), %st - fmulp %st, %st(4) - fld %st(4) - fmul %st(1), %st - andl $-32768, %edx - faddp %st, %st(4) - fldl 2056+__libm_expl_table_256@GOTOFF(%esi,%ecx) - orl %edi, %edx - fmul %st, %st(2) - fldl 2048+__libm_expl_table_256@GOTOFF(%esi,%ecx) - fld %st(0) - movw %dx, 8(%esp) - fadd %st(2), %st - fmulp %st, %st(5) - movzbl 17(%ebp), %eax - fxch %st(3) - fsubrp %st, %st(4) - fxch %st(3) - fstpt 32(%esp) - fld %st(4) - fxch %st(2) - fmul %st, %st(5) - andl $128, %eax - fldt 16(%esp) - fmul %st, %st(3) - fld %st(0) - shrl $7, %eax - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fsub %st(5), %st - fsubr %st, %st(4) - fxch %st(5) - fsubrp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fld %st(0) - fldt 32(%esp) - faddp %st, %st(3) - fldt (%esp) - fmul %st, %st(5) - fxch %st(1) - fadd %st(5), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fmulp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldl ones@GOTOFF(%esi,%eax,8) - fmul %st, %st(1) - fxch %st(1) - fstpt (%ebx) - fmulp %st, %st(1) - fstpt 12(%ebx) - fildl 48(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - cmpl $32767, %eax - je ..B1.23 -..B1.18: - fldt _infs@GOTOFF(%esi) - fstpt (%ebx) - fldt (%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - fstpt 12(%ebx) -..B1.19: - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.20: - movl 12(%ebp), %edx - cmpl $-782985146, %edx - ja ..B1.14 -..B1.21: - jne ..B1.16 -..B1.22: - cmpl $1501741449, 8(%ebp) - ja ..B1.14 - jmp ..B1.16 -..B1.23: - fldt 8(%ebp) - fmul %st(0), %st - fstpt (%ebx) - fldt (%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - fstpt 12(%ebx) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __libm_coshl_k80,@function - .size __libm_coshl_k80,.-__libm_coshl_k80 - .data -# -- End __libm_coshl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 2 -_Q3: - .word 21845 - .word 213 - .word 0 - .word 32768 - .word 16382 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 62430 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 22894 - .word 21845 - .word 43733 - .word 43690 - .word 16378 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 65531 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 7054 - .word 43693 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 25016 - .word 58228 - .word 24755 - .word 46603 - .word 16373 - .word 0 - .word 57397 - .word 35800 - .word 53031 - .word 53262 - .word 16367 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 18360 - .word 43637 - .word 28980 - .word 40373 - .word 49076 - .word 0 - .word 16302 - .word 43691 - .word 43690 - .word 43690 - .word 16362 - .word 0 - .word 46125 - .word 2912 - .word 24758 - .word 46603 - .word 16373 - .word 0 - .word 29965 - .word 3335 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 54950 - .word 46751 - .word 32187 - .word 37874 - .word 16361 - .word 0 - .word 30733 - .word 25775 - .word 51110 - .word 36726 - .word 16354 - .word 0 - .word 49850 - .word 450 - .word 9929 - .word 51659 - .word 16346 - .word 0 - .word 2776 - .word 45191 - .word 37201 - .word 55334 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16378 - .word 0 - .type _Q,@object - .size _Q,120 - .align 2 -_KLN2: - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 16391 - .word 0 - .type _KLN2,@object - .size _KLN2,12 - .align 2 -_LN2K: - .word 0 - .word 0 - .word 6134 - .word 45426 - .word 16374 - .word 0 - .word 55756 - .word 58609 - .word 48341 - .word 59623 - .word 16343 - .word 0 - .type _LN2K,@object - .size _LN2K,24 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _P,@object - .size _P,60 - .align 2 -_infs: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .type _infs,@object - .size _infs,12 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_cosl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_cosl_k80.S deleted file mode 100644 index f711b5787d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_cosl_k80.S +++ /dev/null @@ -1,703 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_cosl_k80.c" - .text -..TXTST0: -# -- Begin __libm_cosl_k80 - .text - .align 16,0x90 - .hidden __libm_cosl_k80 - .globl __libm_cosl_k80 -__libm_cosl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %ebx - subl $184, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 144(%esp) - movzwl 16(%ebp), %eax - andl $32767, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $16378, %eax - movl 20(%ebp), %esi - jge ..B1.18 -..B1.2: - cmpl $16372, %eax - jge ..B1.16 -..B1.3: - cmpl $16364, %eax - jge ..B1.14 -..B1.4: - cmpl $16308, %eax - jge ..B1.12 -..B1.5: - testl %eax, %eax - jne ..B1.8 -..B1.6: - cmpl $0, 12(%ebp) - jne ..B1.8 -..B1.7: - cmpl $0, 8(%ebp) - je ..B1.9 -..B1.8: - fldl _ones@GOTOFF(%ebx) - fldt _small_value_80@GOTOFF(%ebx) - fsubr %st(1), %st - fstpt (%esi) - fldl _zeros@GOTOFF(%ebx) - fstpt 12(%esi) - jmp ..B1.10 -..B1.9: - fldl _ones@GOTOFF(%ebx) - fstpt (%esi) - fldt (%esi) - fldl _zeros@GOTOFF(%ebx) - fstpt 12(%esi) -..B1.10: - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.28 -..B1.11: - addl $184, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.12: - fldl _ones@GOTOFF(%ebx) - fstpt (%esi) - fldt (%esi) - fldt 8(%ebp) - fldt _CP3@GOTOFF(%ebx) - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 12(%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.28 -..B1.13: - addl $184, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - fldt 8(%ebp) - fmul %st(0), %st - fldl _ones@GOTOFF(%ebx) - fstpt (%esi) - fldt (%esi) - fldt 12+_CP2@GOTOFF(%ebx) - fmul %st(2), %st - fldt _CP2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 12(%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.28 -..B1.15: - addl $184, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - fldt 8(%ebp) - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fldl _ones@GOTOFF(%ebx) - fstpt (%esi) - fldt (%esi) - fldt 36+_CP1@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_CP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_CP1@GOTOFF(%ebx) - fmulp %st, %st(3) - fldt _CP1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 12(%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.28 -..B1.17: - addl $184, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - cmpl $16382, %eax - jge ..B1.20 -..B1.19: - fldt 8(%ebp) - fldl _TWO_52H@GOTOFF(%ebx) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fxch %st(1) - fmull _ones@GOTOFF(%ebx,%eax,8) - xorl %eax, %eax - fmul %st, %st(1) - xorl %edx, %edx - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fxch %st(1) - fstpt 112(%esp) - fldt 112(%esp) - fstpt 8(%ebp) - jmp ..B1.23 -..B1.20: - je ..B1.33 -..B1.21: - fldt 8(%ebp) - lea 128(%esp), %edx - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fmull _ones@GOTOFF(%ebx,%eax,8) - fstpt (%esp) - fldt (%esp) - movl $0, 12(%esp) - fstpt 8(%ebp) - movl %edx, 16(%esp) - call __libm_reduce_pi04l -..B1.38: - movl %eax, %edx -..B1.22: - fldl 128(%esp) - lea 3(%edx), %eax - fldl _TWO_52H@GOTOFF(%ebx) - fmul %st(1), %st - fld %st(0) - shrl $2, %eax - fadd %st(2), %st - andl $1, %eax - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddl 136(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpt 112(%esp) -..B1.23: - fldt 112(%esp) - fld %st(2) - fmul %st(2), %st - fld %st(2) - fmulp %st, %st(2) - incl %edx - faddp %st, %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fld %st(2) - fmul %st(3), %st - testb $2, %dl - fld %st(0) - fadd %st(2), %st - fstpt 48(%esp) - fldt 48(%esp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 80(%esp) - fldt 80(%esp) - fld %st(1) - fmul %st(2), %st - fld %st(0) - faddp %st, %st(2) - fldl _TWO_53H@GOTOFF(%ebx) - fstpt 64(%esp) - fldl _ones@GOTOFF(%ebx,%eax,8) - je ..B1.25 -..B1.24: - fldt 84+_SP@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - fstpt 32(%esp) - fldt 60+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_SP@GOTOFF(%ebx) - fldt 96+_SP@GOTOFF(%ebx) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt _SP@GOTOFF(%ebx) - faddp %st, %st(3) - fldt 48(%esp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 80(%esp) - fldt 96(%esp) - fldt 120+_SP@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fldt 108+_SP@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fadd %st, %st(2) - fld %st(3) - fldt 64(%esp) - fmul %st(4), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fmul %st(3), %st - fxch %st(2) - fsub %st(3), %st - faddp %st, %st(1) - fxch %st(2) - fmul %st(4), %st - fldt 112(%esp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt (%esi) - fmulp %st, %st(1) - fstpt 12(%esi) - fldl _ones@GOTOFF(%ebx) - jmp ..B1.26 -..B1.25: - fstp %st(4) - fstp %st(4) - fldt 84+_CP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 60+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_CP@GOTOFF(%ebx) - fldt 96+_CP@GOTOFF(%ebx) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _CP@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 48(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 80(%esp) - fldt 96(%esp) - fldt 120+_CP@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(5) - fldt 108+_CP@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fld %st(4) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fadd %st, %st(1) - fldt 64(%esp) - fmul %st(2), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fldl _ones@GOTOFF(%ebx) - fadd %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fxch %st(1) - fmul %st(2), %st - fstpt (%esi) - fmulp %st, %st(1) - fstpt 12(%esi) -..B1.26: - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.28 -..B1.27: - addl $184, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.28: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.33: - movl 12(%ebp), %eax - cmpl $-921707870, %eax - jb ..B1.19 -..B1.34: - jne ..B1.21 -..B1.35: - cmpl $560513589, 8(%ebp) - jbe ..B1.19 - jmp ..B1.21 - .align 16,0x90 - .type __libm_cosl_k80,@function - .size __libm_cosl_k80,.-__libm_cosl_k80 - .data -# -- End __libm_cosl_k80 - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_CP3: - .word 0 - .word 65450 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .type _CP3,@object - .size _CP3,12 - .align 2 -_CP2: - .word 63855 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 18238 - .word 17476 - .word 43656 - .word 43690 - .word 16378 - .word 0 - .type _CP2,@object - .size _CP2,24 - .align 2 -_CP1: - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 47533 - .word 43689 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 14131 - .word 49466 - .word 24756 - .word 46603 - .word 49141 - .word 0 - .word 37142 - .word 18013 - .word 35855 - .word 53259 - .word 16367 - .word 0 - .type _CP1,@object - .size _CP1,48 - .align 2 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .type _SP,@object - .size _SP,132 - .align 2 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .type _CP,@object - .size _CP,132 - .data - .hidden __libm_reduce_pi04l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_exp_k32.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_exp_k32.S deleted file mode 100644 index e659995caa..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_exp_k32.S +++ /dev/null @@ -1,237 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_exp_k32.c" - .text -..TXTST0: -# -- Begin __libm_exp_k32 - .text - .align 16,0x90 - .hidden __libm_exp_k32 - .globl __libm_exp_k32 -__libm_exp_k32: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %edi - pushl %ebx - subl $24, %esp - movl 12(%ebp), %eax - movl %eax, %edx - andl $2147483647, %edx - shrl $31, %eax - cmpl $1012924416, %edx - jb ..B1.3 -..B1.2: - fldl 8(%ebp) - xorl %edx, %edx - call ..L2 -..L2: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi - fld1 - fldl _TWO_52H@GOTOFF(%edi) - fldl .L_2il0floatpacket.0@GOTOFF(%edi) - fmul %st(3), %st - movl %edx, 16(%esp) - fadd %st(1), %st - fstpl (%esp) - fldl (%esp) - movl (%esp), %ecx - movl %ecx, %ebx - shll $25, %ebx - fsubp %st, %st(1) - fldl .L_2il0floatpacket.1@GOTOFF(%edi) - fmul %st(1), %st - sarl $25, %ebx - fsubrp %st, %st(3) - fld %st(2) - subl %ebx, %ecx - fxch %st(3) - fstl 8(%ebp) - fldl .L_2il0floatpacket.2@GOTOFF(%edi) - fmulp %st, %st(2) - shll $4, %ebx - fxch %st(1) - fsubr %st, %st(3) - fld %st(3) - fxch %st(2) - fsub %st(4), %st - shrl $7, %ecx - fsubp %st, %st(1) - addl SC2_BIAS@GOTOFF(%edi,%eax,4), %ecx - fadd %st, %st(1) - fld %st(1) - fmul %st(2), %st - fxch %st(3) - fadd %st(4), %st - fstpl 8(%esp) - fldl .L_2il0floatpacket.3@GOTOFF(%edi) - fldl .L_2il0floatpacket.6@GOTOFF(%edi) - movl %edx, 8(%esp) - fmul %st(4), %st - fldl 8(%esp) - shll $20, %ecx - fadd %st, %st(2) - movl %ecx, 20(%esp) - fxch %st(2) - fsubrp %st, %st(6) - fxch %st(5) - faddp %st, %st(2) - fldl .L_2il0floatpacket.4@GOTOFF(%edi) - fmul %st(4), %st - fxch %st(5) - faddl .L_2il0floatpacket.7@GOTOFF(%edi) - fmulp %st, %st(3) - fxch %st(4) - faddl .L_2il0floatpacket.5@GOTOFF(%edi) - fmul %st(3), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldl .L_2il0floatpacket.8@GOTOFF(%edi) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldl 1032+__libm_exp_table_128@GOTOFF(%edi,%ebx) - fld %st(0) - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(3) - fmulp %st, %st(1) - fxch %st(2) - fmull 1024+__libm_exp_table_128@GOTOFF(%edi,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - fmull 16(%esp) - fmull _SC2@GOTOFF(%edi,%eax,8) - addl $24, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.3: - fld1 - faddl 8(%ebp) -..B1.4: - addl $24, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __libm_exp_k32,@function - .size __libm_exp_k32,.-__libm_exp_k32 - .data -# -- End __libm_exp_k32 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -SC2_BIAS: - .long 511 - .long 1535 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_SC2: - .long 0 - .long 1609564160 - .long 0 - .long 535822336 - .type _SC2,@object - .size _SC2,16 - .data - .hidden __libm_exp_table_128 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_expl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_expl_k80.S deleted file mode 100644 index c519786475..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_expl_k80.S +++ /dev/null @@ -1,386 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_expl_k80.c" - .text -..TXTST0: -# -- Begin __libm_expl_k80 - .text - .align 16,0x90 - .hidden __libm_expl_k80 - .globl __libm_expl_k80 -__libm_expl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %edi - pushl %ebx - subl $40, %esp - movl 12(%ebp), %ebx - movl 8(%ebp), %ecx - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - fldt (%ebx) - movzbl 9(%ebx), %eax - movzwl 8(%ebx), %edi - andl $128, %eax - andl $32767, %edi - shrl $7, %eax - fstpt 24(%esp) - fldt 24(%esp) - cmpl $32767, %edi - fldt 12(%ebx) - je ..B1.11 -..B1.2: - cmpl $16358, %edi - jge ..B1.7 -..B1.3: - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - cmpl $16183, %edi - jge ..B1.5 -..B1.4: - fstp %st(2) - fstp %st(0) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fstpt 12(%ecx) - fldt 12(%ecx) - fxch %st(1) - fstpt (%ecx) - addl $40, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.5: - fldt 12+_P1@GOTOFF(%edx) - fmul %st(3), %st - fldt _P1@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(3), %st - fmul %st(3), %st - faddp %st, %st(3) - fld %st(0) - fadd %st(3), %st - fstpt (%ecx) - fldt (%ecx) - fsubrp %st, %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%ecx) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) -..B1.6: - addl $40, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.7: - cmpl $16405, %edi - jge ..B1.9 -..B1.8: - fldt _KLN2@GOTOFF(%edx) - fmulp %st, %st(2) - fldt _TWO_63H@GOTOFF(%edx) - fadd %st, %st(2) - fxch %st(2) - fstpt (%esp) - fldt (%esp) - movl (%esp), %eax - fsubp %st, %st(2) - fldt 24(%esp) - fldt _LN2K@GOTOFF(%edx) - fmul %st(3), %st - fstpt (%esp) - fxch %st(2) - fchs - fldt (%esp) - movsbl %al, %ebx - fsubrp %st, %st(3) - fldt 12+_LN2K@GOTOFF(%edx) - subl %ebx, %eax - fmulp %st, %st(1) - fstpt (%esp) - fldt (%esp) - shll $4, %ebx - fadd %st(2), %st - fld %st(0) - sarl $8, %eax - fsub %st(3), %st - fld %st(1) - movl %eax, 16(%esp) - fsub %st(1), %st - fsubrp %st, %st(4) - fldt (%esp) - fsubp %st, %st(1) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fld %st(2) - fsub %st(2), %st - fchs - fld %st(0) - fsubr %st(3), %st - fsubrp %st, %st(4) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt 48+_P@GOTOFF(%edx) - fmul %st(1), %st - fildl 16(%esp) - fldt 24+_P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt _P@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(3), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%ebx) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%ebx) - fld %st(0) - fmul %st(3), %st - fxch %st(3) - fadd %st(5), %st - fmul %st(2), %st - faddp %st, %st(3) - fmul %st, %st(4) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(2) - fadd %st(1), %st - fstpt (%ecx) - fldt (%ecx) - fsubrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 12(%ecx) - addl $40, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - fstp %st(1) - fstp %st(0) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - lea (,%eax,8), %ebx - fstpt 12(%ecx) - lea (%ebx,%eax,4), %eax - fldt _inf_zeros@GOTOFF(%edx,%eax) - fstpt (%ecx) - fldt (%ecx) -..B1.10: - addl $40, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - fstp %st(0) - cmpl $-2147483648, 28(%esp) - jne ..B1.15 -..B1.12: - cmpl $0, 24(%esp) - jne ..B1.15 -..B1.13: - fstp %st(0) - lea (,%eax,8), %ebx - lea (%ebx,%eax,4), %eax - fldt _inf_zeros@GOTOFF(%edx,%eax) -..B1.15: - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fstpt 12(%ecx) - fstpt (%ecx) - fldt (%ecx) - addl $40, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __libm_expl_k80,@function - .size __libm_expl_k80,.-__libm_expl_k80 - .data -# -- End __libm_expl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 2 -_P1: - .word 43691 - .word 10 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 30584 - .word 43703 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _P1,@object - .size _P1,24 - .align 2 -_KLN2: - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 16391 - .word 0 - .type _KLN2,@object - .size _KLN2,12 - .align 2 -_TWO_63H: - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .type _TWO_63H,@object - .size _TWO_63H,12 - .align 2 -_LN2K: - .word 0 - .word 0 - .word 6134 - .word 45426 - .word 16374 - .word 0 - .word 55756 - .word 58609 - .word 48341 - .word 59623 - .word 16343 - .word 0 - .type _LN2K,@object - .size _LN2K,24 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _P,@object - .size _P,60 - .align 2 -_inf_zeros: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _inf_zeros,@object - .size _inf_zeros,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_hypot2l_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_hypot2l_k80.S deleted file mode 100644 index 7238ad258a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_hypot2l_k80.S +++ /dev/null @@ -1,497 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_hypot2l_k80.c" - .text -..TXTST0: -# -- Begin __libm_hypot2l_k80 - .text - .align 16,0x90 - .hidden __libm_hypot2l_k80 - .globl __libm_hypot2l_k80 -__libm_hypot2l_k80: -# parameter 1: 64 + %esp -# parameter 2: 68 + %esp -# parameter 3: 80 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - subl $48, %esp - movzwl 76(%esp), %eax - testl $32767, %eax - movl 64(%esp), %ecx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jne ..B1.8 -..B1.2: - cmpl $0, 72(%esp) - jne ..B1.8 -..B1.3: - cmpl $0, 68(%esp) - jne ..B1.8 -..B1.4: - movzwl 88(%esp), %eax - testl $32767, %eax - jne ..B1.8 -..B1.5: - cmpl $0, 84(%esp) - jne ..B1.8 -..B1.6: - cmpl $0, 80(%esp) - jne ..B1.8 -..B1.7: - fldt 68(%esp) - fstpt (%ecx) - fldt 80(%esp) - fstpt 12(%ecx) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - addl $48, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.8: - fldt 68(%esp) - fabs - fstpt (%esp) - fldt (%esp) - fldt 80(%esp) - fabs - fstpt 12(%esp) - fldt 12(%esp) - movzwl 8(%esp), %edx - movzwl 20(%esp), %eax - andl $32767, %edx - andl $32767, %eax - cmpl %eax, %edx - jg ..B1.13 -..B1.9: - jne ..B1.14 -..B1.10: - movl 4(%esp), %esi - movl 16(%esp), %edi - cmpl %edi, %esi - ja ..B1.65 -..B1.11: - jne ..B1.64 -..B1.12: - movl (%esp), %esi - cmpl 12(%esp), %esi - jbe ..B1.64 -..B1.65: - cmpl %eax, %edx -..B1.13: - fxch %st(1) - fstpt 24(%esp) - fldt 24(%esp) - fld %st(0) - fxch %st(2) - fxch %st(1) - fxch %st(2) - jl ..B1.20 - jmp ..B1.16 -..B1.14: - fstpt 24(%esp) - fldt 24(%esp) - fld %st(0) -..B1.15: - jl ..B1.20 -..B1.16: - jne ..B1.21 -..B1.17: - movl 4(%esp), %eax - movl 16(%esp), %edx - cmpl %edx, %eax - jb ..B1.20 -..B1.18: - jne ..B1.21 -..B1.19: - movl (%esp), %eax - cmpl 12(%esp), %eax - jae ..B1.21 -..B1.20: - fstp %st(1) - fxch %st(1) - fstpt 12(%esp) - fldt 12(%esp) - jmp ..B1.22 -..B1.21: - fstp %st(2) - fstpt 12(%esp) - fldt 12(%esp) -..B1.22: - movswl 20(%esp), %eax - testl %eax, %eax - je ..B1.24 -..B1.23: - addl $-16383, %eax - jmp ..B1.29 -..B1.24: - movzwl 20(%esp), %eax - testl $32767, %eax - jne ..B1.28 -..B1.25: - cmpl $0, 16(%esp) - jne ..B1.28 -..B1.26: - cmpl $0, 12(%esp) - jne ..B1.28 -..B1.27: - movl $-16526, %eax - jmp ..B1.29 -..B1.28: - fldt 72+_CONSTANTS@GOTOFF(%ebx) - fmul %st(1), %st - fldt 84+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%esp) - movswl 8(%esp), %eax - addl $-32828, %eax -..B1.29: - movswl 32(%esp), %edx - testl %edx, %edx - je ..B1.31 -..B1.30: - addl $-16383, %edx - jmp ..B1.32 -..B1.31: - fldt 72+_CONSTANTS@GOTOFF(%ebx) - fmul %st(2), %st - fldt 84+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%esp) - movswl 8(%esp), %edx - addl $-32828, %edx -..B1.32: - addl $-67, %edx - cmpl %edx, %eax - jg ..B1.34 -..B1.33: - fstp %st(0) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) -..B1.34: - movzwl 32(%esp), %eax - andl $32767, %eax - cmpl $24709, %eax - jg ..B1.39 -..B1.35: - jne ..B1.40 -..B1.36: - movl 28(%esp), %edx - cmpl 4+_CONSTANTS@GOTOFF(%ebx), %edx - ja ..B1.39 -..B1.37: - jne ..B1.40 -..B1.38: - movl 24(%esp), %edx - cmpl _CONSTANTS@GOTOFF(%ebx), %edx - jb ..B1.40 -..B1.39: - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fmul %st, %st(2) - fxch %st(2) - fstpt 24(%esp) - fldt 24(%esp) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - jmp ..B1.61 -..B1.40: - cmpl $24573, %eax - jg ..B1.45 -..B1.41: - jne ..B1.46 -..B1.42: - movl 28(%esp), %edx - cmpl 16+_CONSTANTS@GOTOFF(%ebx), %edx - ja ..B1.45 -..B1.43: - jne ..B1.46 -..B1.44: - movl 24(%esp), %edx - cmpl 12+_CONSTANTS@GOTOFF(%ebx), %edx - jb ..B1.46 -..B1.45: - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - fstpt 24(%esp) - fldt 24(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fldt .L_2il0floatpacket.4@GOTOFF(%ebx) - jmp ..B1.61 -..B1.46: - cmpl $8127, %eax - jl ..B1.51 -..B1.47: - jne ..B1.52 -..B1.48: - movl 28(%esp), %edx - cmpl 28+_CONSTANTS@GOTOFF(%ebx), %edx - jb ..B1.51 -..B1.49: - jne ..B1.52 -..B1.50: - movl 24(%esp), %edx - cmpl 24+_CONSTANTS@GOTOFF(%ebx), %edx - ja ..B1.52 -..B1.51: - fldt 48+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fmul %st, %st(2) - fxch %st(2) - fstpt 24(%esp) - fldt 24(%esp) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(2) - fxch %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fldt .L_2il0floatpacket.5@GOTOFF(%ebx) - jmp ..B1.61 -..B1.52: - cmpl $8323, %eax - jl ..B1.57 -..B1.53: - jne ..B1.60 -..B1.54: - movl 28(%esp), %eax - cmpl 40+_CONSTANTS@GOTOFF(%ebx), %eax - jb ..B1.57 -..B1.55: - jne ..B1.60 -..B1.56: - movl 24(%esp), %eax - cmpl 36+_CONSTANTS@GOTOFF(%ebx), %eax - ja ..B1.60 -..B1.57: - fldt 48+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - fstpt 24(%esp) - fldt 24(%esp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - jmp ..B1.61 -..B1.60: - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) -..B1.61: - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fld %st(3) - fmul %st(1), %st - fld %st(4) - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fld %st(4) - fxch %st(2) - fsubr %st, %st(6) - fxch %st(3) - fmul %st(5), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(5) - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(4) - fmul %st(7), %st - fxch %st(4) - fmulp %st, %st(1) - fmul %st(5), %st - fld %st(1) - fadd %st(4), %st - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - fxch %st(6) - fmul %st(0), %st - faddp %st, %st(3) - fld %st(0) - fadd %st(2), %st - fld %st(0) - fadd %st(7), %st - fstpt (%ecx) - fldt (%ecx) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(4) - fmul %st(0), %st - fxch %st(2) - fsubp %st, %st(4) - fxch %st(3) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 12(%ecx) - addl $48, %esp - popl %ebx - popl %edi - popl %esi - ret -..B1.64: - cmpl %eax, %edx - jmp ..B1.14 - .align 16,0x90 - .type __libm_hypot2l_k80,@function - .size __libm_hypot2l_k80,.-__libm_hypot2l_k80 - .data -# -- End __libm_hypot2l_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0e,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0d,0x40,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0e,0xc0,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0d,0xc0,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,12 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24709 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 24573 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 8127 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8323 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24576 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8190 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16445 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,96 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_log1pl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_log1pl_k80.S deleted file mode 100644 index 1025023f13..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_log1pl_k80.S +++ /dev/null @@ -1,1912 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_log1pl_k80.c" - .text -..TXTST0: -# -- Begin __libm_log1p_k80 - .text - .align 16,0x90 - .globl __libm_log1p_k80 -__libm_log1p_k80: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - movl 12(%ebp), %esi - movl %gs:20, %eax - xorl %esp, %eax - movzwl 8(%esi), %ecx - andl $32767, %ecx - movl %eax, 116(%esp) - movl 24(%esi), %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl 8(%ebp), %edi - lea (%eax,%ecx), %edx - cmpl $16511, %edx - jge ..B1.9 -..B1.2: - cmpl $16255, %edx - jle ..B1.8 -..B1.3: - addl $-8383, %ecx - cmpl $16000, %ecx - jbe ..B1.6 -..B1.4: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B1.5: - movl 24(%esi), %eax -..B1.6: - fldt (%esi) - addl $16383, %eax - fldt 12(%esi) - andl $32767, %eax - andb $127, 41(%esp) - lea 68(%esp), %edx - movzwl -28(%edx), %ecx - andl $-32768, %ecx - orl %eax, %ecx - lea 92(%esp), %eax - movw %cx, -52(%eax) - movl $-2147483648, -56(%eax) - movl $0, -60(%eax) - fldt -60(%eax) - fmul %st, %st(2) - fxch %st(2) - fstpt (%edx) - fmulp %st, %st(1) - fstpt -12(%eax) - call __libm_log1pl_k80. -..B1.7: - fldt 92(%esp) - fmul %st(1), %st - movl $0, 24(%edi) - fstpt (%edi) - fldt 104(%esp) - fmulp %st, %st(1) - fstpt 12(%edi) - jmp ..B1.19 -..B1.8: - movl (%esi), %eax - movl %eax, (%edi) - movl 4(%esi), %edx - movl %edx, 4(%edi) - movl 8(%esi), %ecx - movl %ecx, 8(%edi) - movl 12(%esi), %eax - movl %eax, 12(%edi) - movl 16(%esi), %edx - movl %edx, 16(%edi) - movl 20(%esi), %ecx - movl %ecx, 20(%edi) - movl 24(%esi), %esi - movl %esi, 24(%edi) - jmp ..B1.19 -..B1.9: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B1.10: - fildl 24(%esi) - fstpt 32(%esp) - lea 92(%esp), %eax - fldt (%esi) - fstpt (%esp) - fldt (%esp) - fstpt -24(%eax) - fldt 12(%esi) - fstpt 12(%esp) - fldt 12(%esp) - fstpt -12(%eax) - movl %eax, 24(%esp) - call __libm_logl_k80 -..B1.11: - fldt 92(%esp) - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt 104(%esp) - fmulp %st, %st(2) - movzwl 100(%esp), %edx - andl $32767, %edx - fxch %st(1) - fstpt 104(%esp) - fldt 104(%esp) - fldt 216+_CONSTANTS@GOTOFF(%ebx) - fldt 228+_CONSTANTS@GOTOFF(%ebx) - fldt 32(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 44(%esp) - fldt 44(%esp) - fld %st(0) - movzwl 52(%esp), %eax - fadd %st(5), %st - fxch %st(3) - fmulp %st, %st(2) - andl $32767, %eax - fxch %st(1) - fstpt 56(%esp) - fldt 56(%esp) - cmpl %edx, %eax - movl $0, 24(%edi) - jg ..B1.16 -..B1.12: - jne ..B1.17 -..B1.13: - movl 48(%esp), %eax - movl 96(%esp), %edx - cmpl %edx, %eax - ja ..B1.16 -..B1.14: - jne ..B1.17 -..B1.15: - movl 44(%esp), %eax - cmpl 92(%esp), %eax - jbe ..B1.17 -..B1.16: - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.18 -..B1.17: - fxch %st(2) - fsubr %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) -..B1.18: - fld %st(1) - fadd %st(1), %st - fstpt (%edi) - fldt (%edi) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%edi) -..B1.19: - movl 116(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.21 -..B1.20: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.21: - call __stack_chk_fail@PLT - .align 16,0x90 - .type __libm_log1p_k80,@function - .size __libm_log1p_k80,.-__libm_log1p_k80 - .data -# -- End __libm_log1p_k80 - .text -# -- Begin __libm_log1pl_k80 - .text - .align 16,0x90 - .hidden __libm_log1pl_k80 - .globl __libm_log1pl_k80 -__libm_log1pl_k80: -# parameter 1: %eax -# parameter 2: %edx -..B2.1: -..L3: - - movl 4(%esp), %eax - movl 8(%esp), %edx - .hidden __libm_log1pl_k80. - .globl __libm_log1pl_k80. -__libm_log1pl_k80.: - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $404, %esp - movl %eax, %ecx - fldt (%edx) - fld %st(0) - fldt 12(%edx) - movl %gs:20, %eax - fadd %st, %st(1) - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - fxch %st(1) - fsub %st, %st(2) - xorl %esp, %eax - fxch %st(2) - fsubrp %st, %st(1) - fldt 48+_CONSTANTS@GOTOFF(%ebx) - movl %eax, 388(%esp) - fstpt 12(%ecx) - fldt 12(%ecx) - fxch %st(2) - fstpt (%esp) - fldt (%esp) - movzbl 9(%esp), %eax - andl $128, %eax - shrl $7, %eax - movzwl 8(%esp), %esi - movl %eax, 16(%esp) - andl $32767, %esi - shll $15, %eax - movl 4(%esp), %edi - orl %esi, %eax - movl %edi, 12(%esp) - shll $16, %eax - shrl $16, %edi - orl %edi, %eax - cmpl $32767, %esi - je ..B2.116 -..B2.2: - cmpl $-1073774592, %eax - jae ..B2.101 -..B2.3: - fstp %st(1) - fxch %st(1) - fstpt (%ecx) - fldt (%ecx) -..B2.4: - cmpl $16375, %esi - jge ..B2.52 -..B2.5: - fstp %st(0) - cmpl $16363, %esi - jge ..B2.30 -..B2.6: - fstp %st(0) - cmpl $16298, %esi - jge ..B2.8 -..B2.7: - fldt (%edx) - fstpt (%ecx) - fldt 12(%edx) - fstpt 12(%ecx) - fldt _CONSTANTS@GOTOFF(%ebx) - jmp ..B2.104 -..B2.8: - fldt (%edx) - fld %st(0) - fld %st(1) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(2) - fld %st(1) - fld %st(3) - fsub %st(3), %st - fmul %st, %st(1) - fxch %st(1) - fadd %st(0), %st - fld %st(0) - fld %st(4) - fmul %st(5), %st - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(2) - fld %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(5) - fxch %st(5) - fstpt 16(%esp) - fldt 16(%esp) - fxch %st(3) - fstpt 32(%esp) - fldt 32(%esp) - fldt 12(%edx) - fmulp %st, %st(6) - fxch %st(5) - fadd %st(0), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fmul %st, %st(4) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt 96+_CONSTANTS@GOTOFF(%ebx) - fld %st(0) - fmul %st(2), %st - fstpt 48(%esp) - fldt 48(%esp) - fxch %st(1) - fmul %st(3), %st - fstpt (%esp) - fldt (%esp) - fstpt 304(%esp) - fld %st(1) - fsub %st(5), %st - faddp %st, %st(5) - fld %st(1) - fsub %st(5), %st - fxch %st(1) - fstpt 292(%esp) - fxch %st(6) - fmulp %st, %st(2) - fld %st(2) - fmul %st(4), %st - fxch %st(3) - fmul %st(6), %st - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(4) - fld %st(3) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fldt 12(%edx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt 72+_CONSTANTS@GOTOFF(%ebx) - fld %st(0) - fld %st(1) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fld %st(0) - fmul %st(4), %st - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(1) - fsub %st(2), %st - fxch %st(1) - fmul %st(6), %st - fsubr %st, %st(4) - faddp %st, %st(4) - fxch %st(3) - fstpt 64(%esp) - fldt 64(%esp) - fld %st(5) - fsub %st(1), %st - fld %st(2) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(2) - fmul %st(4), %st - fldt 84+_CONSTANTS@GOTOFF(%ebx) - fmul %st(6), %st - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 316(%esp) - fldt 316(%esp) - fsubr %st, %st(1) - movzwl 324(%esp), %eax - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 80(%esp) - fldt 80(%esp) - andl $32767, %eax - fstpt 328(%esp) - fldt 16(%esp) - fld %st(0) - fxch %st(1) - fmul %st(3), %st - fldt 64(%esp) - fmul %st, %st(2) - fldt 32(%esp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fld %st(1) - fldt (%edx) - fmul %st, %st(5) - fldt 12(%edx) - fmulp %st, %st(7) - fxch %st(6) - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fldt 120+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(4) - fstpt 340(%esp) - fldt 340(%esp) - fadd %st, %st(1) - fxch %st(4) - fmulp %st, %st(3) - movzwl 348(%esp), %esi - andl $32767, %esi - fxch %st(2) - fstpt 352(%esp) - fldt 352(%esp) - cmpl %esi, %eax - fldt 48(%esp) - fldt 80(%esp) - jg ..B2.13 -..B2.9: - jne ..B2.14 -..B2.10: - movl 320(%esp), %eax - movl 344(%esp), %esi - cmpl %esi, %eax - ja ..B2.13 -..B2.11: - jne ..B2.14 -..B2.12: - movl 316(%esp), %eax - cmpl 340(%esp), %eax - jbe ..B2.14 -..B2.13: - fxch %st(3) - fsub %st(4), %st - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - jmp ..B2.15 -..B2.14: - fxch %st(4) - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) -..B2.15: - fld %st(2) - movzwl 300(%esp), %eax - fadd %st(1), %st - fstpt 364(%esp) - fldt 364(%esp) - andl $32767, %eax - movzwl 372(%esp), %esi - fld %st(2) - andl $32767, %esi - fadd %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - cmpl %esi, %eax - fxch %st(2) - faddp %st, %st(4) - fxch %st(3) - fstpt 376(%esp) - fldt 376(%esp) - jg ..B2.20 -..B2.16: - jne ..B2.21 -..B2.17: - movl 296(%esp), %eax - movl 368(%esp), %esi - cmpl %esi, %eax - ja ..B2.20 -..B2.18: - jne ..B2.21 -..B2.19: - movl 292(%esp), %eax - cmpl 364(%esp), %eax - jbe ..B2.21 -..B2.20: - fldt (%esp) - fxch %st(3) - fsub %st(4), %st - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.22 -..B2.21: - fldt (%esp) - fxch %st(2) - fsub %st(4), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) -..B2.22: - fld %st(0) - movzwl 8(%edx), %eax - fadd %st(2), %st - fstpt 268(%esp) - fldt 268(%esp) - andl $32767, %eax - movzwl 276(%esp), %esi - fsubr %st, %st(2) - andl $32767, %esi - fxch %st(2) - faddp %st, %st(1) - fstpt 280(%esp) - fldt 280(%esp) - cmpl %esi, %eax - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 12(%ecx) - fldt 12(%ecx) - jg ..B2.27 -..B2.23: - jne ..B2.28 -..B2.24: - movl 272(%esp), %eax - cmpl 4(%edx), %eax - jb ..B2.27 -..B2.25: - jne ..B2.28 -..B2.26: - movl (%edx), %eax - cmpl 268(%esp), %eax - jbe ..B2.28 -..B2.27: - fldt (%edx) - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 12(%edx) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - jmp ..B2.29 -..B2.28: - fldt (%edx) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 12(%edx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - fldt 16(%esp) -..B2.29: - fld %st(1) - fadd %st(1), %st - fstpt (%ecx) - fldt (%ecx) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%ecx) - fldt _CONSTANTS@GOTOFF(%ebx) - jmp ..B2.104 -..B2.30: - fldt (%edx) - fld %st(0) - fld %st(1) - fld %st(2) - fxch %st(4) - fstpt 48(%esp) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(2) - fld %st(1) - fld %st(2) - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(5) - fxch %st(1) - fmul %st(5), %st - fadd %st(0), %st - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fld %st(5) - fmul %st(6), %st - faddp %st, %st(4) - fld %st(4) - fxch %st(2) - fstpt 64(%esp) - fldt 64(%esp) - fldt 12(%edx) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fmul %st, %st(3) - fld %st(0) - fsub %st(4), %st - faddp %st, %st(4) - fld %st(2) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fxch %st(4) - fstpt 16(%esp) - fldt 16(%esp) - fld %st(1) - fsub %st(4), %st - fmul %st, %st(3) - fxch %st(4) - fmul %st(7), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(5), %st - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(4) - fld %st(4) - fmulp %st, %st(3) - fstpt 80(%esp) - fldt 80(%esp) - fldt 12(%edx) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fmul %st, %st(3) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmul %st, %st(3) - fld %st(1) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fstpt 96(%esp) - fldt 96(%esp) - fld %st(1) - fsub %st(1), %st - fldt 64(%esp) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st(2), %st - fxch %st(3) - fmul %st(7), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fldt 12(%edx) - fmul %st(3), %st - faddp %st, %st(5) - faddp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fstpt 32(%esp) - fldt 32(%esp) - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fstpt 112(%esp) - fldt 112(%esp) - faddp %st, %st(3) - fldt 48(%esp) - fmulp %st, %st(3) - fxch %st(2) - fstpt (%esp) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fldt 72+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(1) - fld %st(0) - fsub %st(2), %st - faddp %st, %st(2) - fld %st(1) - fld %st(1) - fsub %st(3), %st - fxch %st(3) - fmul %st(6), %st - fxch %st(2) - fmulp %st, %st(4) - fxch %st(2) - fmul %st, %st(5) - fldt 96(%esp) - fmul %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(4) - faddp %st, %st(1) - fldt 16(%esp) - fldt 84+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fstpt 316(%esp) - fldt 316(%esp) - fsubr %st, %st(3) - movzwl 324(%esp), %eax - fxch %st(3) - faddp %st, %st(1) - andl $32767, %eax - fstpt 328(%esp) - fldt 328(%esp) - fldt 96+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 304(%esp) - fldt 80(%esp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 292(%esp) - fldt 292(%esp) - fldt 120+_CONSTANTS@GOTOFF(%ebx) - fldt 32(%esp) - fmul %st(1), %st - fstpt 340(%esp) - fldt 340(%esp) - movzwl 348(%esp), %esi - andl $32767, %esi - fstpt 32(%esp) - fldt 32(%esp) - cmpl %esi, %eax - fldt 112(%esp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 352(%esp) - fldt 352(%esp) - fldt 204+_CONSTANTS@GOTOFF(%ebx) - fldt 192+_CONSTANTS@GOTOFF(%ebx) - fldt 48(%esp) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 180+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 168+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 156+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 144+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt 132+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(1) - fld %st(5) - faddp %st, %st(3) - fldt (%esp) - fmulp %st, %st(1) - fstpt (%esp) - fldt (%edx) - jg ..B2.35 -..B2.31: - jne ..B2.36 -..B2.32: - movl 320(%esp), %eax - movl 344(%esp), %esi - cmpl %esi, %eax - ja ..B2.35 -..B2.33: - jne ..B2.36 -..B2.34: - movl 316(%esp), %eax - cmpl 340(%esp), %eax - jbe ..B2.36 -..B2.35: - fldt 32(%esp) - fxch %st(3) - fsubr %st, %st(6) - fxch %st(3) - faddp %st, %st(6) - fxch %st(1) - faddp %st, %st(5) - fxch %st(3) - faddp %st, %st(4) - jmp ..B2.37 -..B2.36: - fldt 32(%esp) - fsub %st(3), %st - faddp %st, %st(6) - fxch %st(4) - faddp %st, %st(5) - faddp %st, %st(4) -..B2.37: - fld %st(3) - movzwl 300(%esp), %eax - fadd %st(1), %st - fstpt 364(%esp) - fldt 364(%esp) - andl $32767, %eax - movzwl 372(%esp), %esi - fsubr %st, %st(1) - andl $32767, %esi - fxch %st(1) - faddp %st, %st(4) - fxch %st(3) - fstpt 376(%esp) - fldt 376(%esp) - fld %st(1) - cmpl %esi, %eax - fadd %st(4), %st - jg ..B2.42 -..B2.38: - jne ..B2.43 -..B2.39: - movl 296(%esp), %eax - movl 368(%esp), %esi - cmpl %esi, %eax - ja ..B2.42 -..B2.40: - jne ..B2.43 -..B2.41: - movl 292(%esp), %eax - cmpl 364(%esp), %eax - jbe ..B2.43 -..B2.42: - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 16(%esp) - faddp %st, %st(1) - fxch %st(2) - jmp ..B2.44 -..B2.43: - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fldt 16(%esp) - faddp %st, %st(4) - faddp %st, %st(3) -..B2.44: - fld %st(2) - movzwl 8(%edx), %eax - fadd %st(1), %st - fstpt 268(%esp) - fldt 268(%esp) - andl $32767, %eax - movzwl 276(%esp), %esi - fsubr %st, %st(1) - andl $32767, %esi - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - fstpt 280(%esp) - fldt 280(%esp) - cmpl %esi, %eax - fxch %st(1) - fadd %st(2), %st - fstpt 12(%ecx) - fldt 12(%ecx) - jg ..B2.49 -..B2.45: - jne ..B2.50 -..B2.46: - movl 272(%esp), %eax - cmpl 4(%edx), %eax - jb ..B2.49 -..B2.47: - jne ..B2.50 -..B2.48: - movl (%edx), %eax - cmpl 268(%esp), %eax - jbe ..B2.50 -..B2.49: - fldt (%edx) - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 12(%edx) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - jmp ..B2.51 -..B2.50: - fldt (%edx) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 12(%edx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - fldt 16(%esp) -..B2.51: - fld %st(1) - fadd %st(1), %st - fstpt (%ecx) - fldt (%ecx) - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt (%esp) - faddp %st, %st(1) - fstpt 12(%ecx) - fldt _CONSTANTS@GOTOFF(%ebx) - jmp ..B2.104 -..B2.52: - fstp %st(1) - fldt (%edx) - movzwl 8(%edx), %esi - fld %st(0) - fldt _CONSTANTS@GOTOFF(%ebx) - andl $32767, %esi - movzwl 8+_CONSTANTS@GOTOFF(%ebx), %eax - cmpl $16383, %esi - movl %eax, 12(%esp) - fadd %st, %st(1) - jg ..B2.57 -..B2.53: - jne ..B2.58 -..B2.54: - movl 4(%edx), %eax - cmpl 4+_CONSTANTS@GOTOFF(%ebx), %eax - ja ..B2.57 -..B2.55: - jne ..B2.58 -..B2.56: - movl (%edx), %eax - cmpl _CONSTANTS@GOTOFF(%ebx), %eax - jbe ..B2.58 -..B2.57: - fldt 12(%edx) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - fadd %st, %st(3) - fxch %st(3) - fadd %st(4), %st - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.59 -..B2.58: - fldt 12(%edx) - fld %st(1) - fsub %st(3), %st - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - fadd %st(3), %st -..B2.59: - fld %st(0) - fadd %st(2), %st - fstpt 128(%esp) - fldt 128(%esp) - fsubr %st, %st(2) - movzwl 136(%esp), %edx - fxch %st(2) - faddp %st, %st(1) - movl 132(%esp), %eax - andl $32767, %edx - shrl $23, %eax - movzbl %al, %eax - movl %edx, 16(%esp) - fstpt 140(%esp) - fldt 140(%esp) - lea -16383(%edx), %edx - cmpl $16383, %edx - flds __libm_rcp_table_256@GOTOFF(%ebx,%eax,4) - jge ..B2.61 -..B2.60: - movl %edx, %esi - negl %esi - addl $16383, %esi - movl 12(%esp), %edi - andl $32767, %esi - andl $-32768, %edi - fxch %st(3) - fstpt (%esp) - fldt (%esp) - orl %esi, %edi - movw %di, 8(%esp) - fldt (%esp) - fxch %st(1) - fxch %st(4) - fxch %st(1) - jmp ..B2.62 -..B2.61: - fldt 240+_CONSTANTS@GOTOFF(%ebx) -..B2.62: - movzwl 148(%esp), %esi - andl $32767, %esi - addl $128, %esi - fmul %st, %st(3) - cmpl 16(%esp), %esi - jle ..B2.64 -..B2.63: - fmulp %st, %st(2) - fxch %st(1) - jmp ..B2.65 -..B2.64: - fstp %st(0) - fstp %st(1) - fld %st(3) -..B2.65: - fldt 36+_CONSTANTS@GOTOFF(%ebx) - movl %edx, 112(%esp) - fxch %st(4) - fstpt 96(%esp) - shll $4, %eax - fstpt 16(%esp) - fld %st(1) - fildl 112(%esp) - fldt 24+_CONSTANTS@GOTOFF(%ebx) - fmul %st(1), %st - fxch %st(5) - fmulp %st, %st(1) - fld %st(3) - fxch %st(5) - faddl __libm_logl_table_256@GOTOFF(%eax,%ebx) - fstpt 48(%esp) - fldt 48(%esp) - fstpt (%esp) - fld %st(3) - fxch %st(4) - fmul %st(6), %st - fxch %st(1) - faddl 8+__libm_logl_table_256@GOTOFF(%ebx,%eax) - fstpt 32(%esp) - fld %st(2) - fldt 60+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - fsubr %st, %st(5) - faddp %st, %st(5) - fxch %st(4) - fsubr %st, %st(5) - fxch %st(2) - fmul %st, %st(4) - fstpt 64(%esp) - fld %st(2) - fsub %st(4), %st - faddp %st, %st(4) - fld %st(2) - fsub %st(4), %st - fld %st(2) - fmul %st(5), %st - fxch %st(5) - fmul %st(6), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(5), %st - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fldt 16(%esp) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 128(%esp) - fldt 128(%esp) - fsubr %st, %st(1) - movzwl 136(%esp), %eax - fxch %st(1) - faddp %st, %st(2) - andl $32767, %eax - fxch %st(1) - fstpt 140(%esp) - fldt 140(%esp) - cmpl $16383, %eax - fldt 96(%esp) - fld %st(0) - fsubr %st(3), %st - fstpt 80(%esp) - jg ..B2.70 -..B2.66: - jne ..B2.71 -..B2.67: - movl 132(%esp), %eax - cmpl 4+_CONSTANTS@GOTOFF(%ebx), %eax - ja ..B2.70 -..B2.68: - jne ..B2.71 -..B2.69: - movl 128(%esp), %eax - cmpl _CONSTANTS@GOTOFF(%ebx), %eax - jbe ..B2.71 -..B2.70: - fldt 80(%esp) - fsubrp %st, %st(3) - fsubr %st, %st(2) - fxch %st(3) - fsubrp %st, %st(2) - faddp %st, %st(1) - jmp ..B2.72 -..B2.71: - fldt 80(%esp) - fadd %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) -..B2.72: - fldt 80(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 160(%esp) - fldt 160(%esp) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 176(%esp) - fxch %st(2) - fstpt 96(%esp) - fld %st(0) - fxch %st(2) - fstpt 80(%esp) - fldt 80(%esp) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fldt 64(%esp) - fld %st(0) - fmul %st(2), %st - fsubr %st, %st(4) - faddp %st, %st(4) - fld %st(3) - fld %st(2) - fsub %st(5), %st - fmul %st, %st(1) - fxch %st(1) - fadd %st(0), %st - fld %st(0) - fld %st(6) - fmul %st(7), %st - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(2) - fld %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(5) - fmul %st(5), %st - fadd %st(0), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fmul %st, %st(4) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 128(%esp) - fldt 128(%esp) - fld %st(1) - fsub %st(4), %st - faddp %st, %st(4) - fxch %st(1) - fstpt 208(%esp) - fldt 208(%esp) - fld %st(6) - fmul %st(4), %st - fxch %st(1) - fsub %st(4), %st - fxch %st(3) - fmul %st, %st(4) - fxch %st(7) - fstpt 192(%esp) - fldt 192(%esp) - fmul %st(3), %st - faddp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fxch %st(2) - fmul %st(6), %st - faddp %st, %st(2) - fld %st(3) - fmulp %st, %st(1) - fld %st(4) - fldt 208(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fstpt 224(%esp) - fldt 224(%esp) - fldt 64(%esp) - fldt 192(%esp) - fxch %st(1) - fmul %st(2), %st - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(2) - fstpt 240(%esp) - fldt 240(%esp) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fmul %st(7), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fld %st(2) - fmulp %st, %st(4) - fldt 224(%esp) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fstpt 144(%esp) - fldt 144(%esp) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fstpt 256(%esp) - fldt 256(%esp) - faddp %st, %st(2) - fldt 176(%esp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 112(%esp) - fldt 64(%esp) - fldt 240(%esp) - fldt 72+_CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fld %st(2) - fmul %st(2), %st - fld %st(1) - fsub %st(4), %st - fmul %st, %st(3) - fxch %st(4) - fmul %st(7), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(3) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(2) - fxch %st(4) - fmulp %st, %st(2) - fldt 84+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 316(%esp) - fldt 316(%esp) - fsubr %st, %st(2) - movzwl 324(%esp), %eax - fxch %st(2) - faddp %st, %st(1) - andl $32767, %eax - fstpt 328(%esp) - fldt 328(%esp) - fldt 96+_CONSTANTS@GOTOFF(%ebx) - fldt 120+_CONSTANTS@GOTOFF(%ebx) - fldt 208(%esp) - fmul %st(2), %st - fstpt 292(%esp) - fldt 292(%esp) - fldt 128(%esp) - fmulp %st, %st(3) - fxch %st(2) - fstpt 128(%esp) - fldt 128(%esp) - fstpt 304(%esp) - fldt 144(%esp) - fmul %st(1), %st - fstpt 340(%esp) - fldt 340(%esp) - movzwl 348(%esp), %edx - andl $32767, %edx - fstpt 144(%esp) - fldt 144(%esp) - cmpl %edx, %eax - fldt 256(%esp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 352(%esp) - fldt 352(%esp) - fldt 204+_CONSTANTS@GOTOFF(%ebx) - fldt 192+_CONSTANTS@GOTOFF(%ebx) - fldt 176(%esp) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 180+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 168+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 156+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 144+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt 132+_CONSTANTS@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 112(%esp) - fmulp %st, %st(1) - fstpt 112(%esp) - fld %st(4) - faddp %st, %st(2) - fldt 96(%esp) - fldt 160(%esp) - jg ..B2.77 -..B2.73: - jne ..B2.78 -..B2.74: - movl 320(%esp), %eax - movl 344(%esp), %edx - cmpl %edx, %eax - ja ..B2.77 -..B2.75: - jne ..B2.78 -..B2.76: - movl 316(%esp), %eax - cmpl 340(%esp), %eax - jbe ..B2.78 -..B2.77: - fldt 144(%esp) - fxch %st(4) - fsubr %st, %st(7) - fxch %st(4) - faddp %st, %st(7) - fxch %st(2) - faddp %st, %st(6) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fxch %st(4) - jmp ..B2.79 -..B2.78: - fldt 144(%esp) - fsub %st(4), %st - faddp %st, %st(7) - fxch %st(5) - faddp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) -..B2.79: - fld %st(0) - movzwl 300(%esp), %eax - fadd %st(2), %st - fstpt 364(%esp) - fldt 364(%esp) - andl $32767, %eax - movzwl 372(%esp), %edx - fld %st(3) - andl $32767, %edx - fadd %st(1), %st - fxch %st(1) - fsubr %st, %st(3) - cmpl %edx, %eax - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 376(%esp) - fldt 376(%esp) - jg ..B2.84 -..B2.80: - jne ..B2.85 -..B2.81: - movl 296(%esp), %eax - movl 368(%esp), %edx - cmpl %edx, %eax - ja ..B2.84 -..B2.82: - jne ..B2.85 -..B2.83: - movl 292(%esp), %eax - cmpl 364(%esp), %eax - jbe ..B2.85 -..B2.84: - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 128(%esp) - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.86 -..B2.85: - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fldt 128(%esp) - faddp %st, %st(2) - faddp %st, %st(1) -..B2.86: - fld %st(0) - movzwl 24(%esp), %eax - fadd %st(2), %st - fstpt 268(%esp) - fldt 268(%esp) - andl $32767, %eax - movzwl 276(%esp), %edx - fld %st(3) - andl $32767, %edx - fadd %st(1), %st - fxch %st(1) - fsubr %st, %st(3) - cmpl %edx, %eax - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 280(%esp) - fldt 280(%esp) - jg ..B2.91 -..B2.87: - jne ..B2.92 -..B2.88: - movl 20(%esp), %eax - movl 272(%esp), %edx - cmpl %edx, %eax - ja ..B2.91 -..B2.89: - jne ..B2.92 -..B2.90: - movl 16(%esp), %eax - cmpl 268(%esp), %eax - jbe ..B2.92 -..B2.91: - fldt 80(%esp) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.93 -..B2.92: - fldt 80(%esp) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) -..B2.93: - fldt 112(%esp) - fld %st(1) - movzwl 8(%esp), %edx - fadd %st(3), %st - fstpt 16(%esp) - fldt 16(%esp) - andl $32767, %edx - movzwl 24(%esp), %eax - fsubr %st, %st(3) - andl $32767, %eax - fxch %st(2) - faddp %st, %st(3) - cmpl %edx, %eax - faddp %st, %st(2) - fldt 48(%esp) - fadd %st(1), %st - jg ..B2.98 -..B2.94: - jne ..B2.99 -..B2.95: - movl 20(%esp), %eax - movl 4(%esp), %edx - cmpl %edx, %eax - ja ..B2.98 -..B2.96: - jne ..B2.99 -..B2.97: - movl 16(%esp), %eax - cmpl (%esp), %eax - jbe ..B2.99 -..B2.98: - fldt 48(%esp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 32(%esp) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - jmp ..B2.100 -..B2.99: - fldt 48(%esp) - fsub %st(1), %st - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%esp) - faddp %st, %st(1) -..B2.100: - fld %st(0) - fadd %st(2), %st - fstpt (%ecx) - fldt (%ecx) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%ecx) - jmp ..B2.104 -..B2.101: - cmpl $1, 16(%esp) - je ..B2.108 -..B2.123: - fstp %st(1) -..B2.102: - fldt 12+_CONSTANTS@GOTOFF(%ebx) - fxch %st(1) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.103 - je ..B2.107 -..B2.103: - fstp %st(0) - fldt 252+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%ecx) - fldt _CONSTANTS@GOTOFF(%ebx) -..B2.104: - movl 388(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.106 -..B2.105: - addl $404, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.106: - fstp %st(0) - call __stack_chk_fail@PLT -..B2.107: - fdivp %st, %st(1) - fstpt (%ecx) - fldt _CONSTANTS@GOTOFF(%ebx) - jmp ..B2.104 -..B2.108: - cmpl $16383, %esi - jne ..B2.123 -..B2.109: - cmpl $-2147483648, 12(%esp) - jne ..B2.123 -..B2.110: - cmpl $0, (%esp) - jne ..B2.123 -..B2.111: - fxch %st(1) - fstpt (%esp) - movzbl 9(%esp), %eax - testl $128, %eax - jne ..B2.102 -..B2.112: - cmpl $0, 4(%esp) - jne ..B2.115 -..B2.114: - cmpl $0, (%esp) - je ..B2.102 -..B2.115: - fxch %st(1) - fstpt (%ecx) - fldt (%ecx) - jmp ..B2.4 -..B2.116: - fstp %st(1) - cmpl $0, 16(%esp) - je ..B2.120 -..B2.117: - cmpl $-2147483648, 12(%esp) - jne ..B2.120 -..B2.118: - cmpl $0, (%esp) - jne ..B2.120 -..B2.119: - fstp %st(0) - fldt 252+_CONSTANTS@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt (%ecx) - fldt _CONSTANTS@GOTOFF(%ebx) - jmp ..B2.104 -..B2.120: - fstp %st(1) - fldt _CONSTANTS@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - fstpt (%ecx) - jmp ..B2.104 - .align 16,0x90 - .type __libm_log1pl_k80,@function - .size __libm_log1pl_k80,.-__libm_log1pl_k80 - .data -# -- End __libm_log1pl_k80 - .section .rodata, "a" - .align 16 - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 53711 - .word 6135 - .word 45426 - .word 16382 - .word 0 - .word 2022 - .word 26416 - .word 37831 - .word 62295 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .word 32768 - .word 16415 - .word 0 - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16317 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49149 - .word 0 - .word 52429 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 37449 - .word 18724 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49148 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 16379 - .word 0 - .word 52429 - .word 52428 - .word 52428 - .word 52428 - .word 49147 - .word 0 - .word 11916 - .word 59578 - .word 35746 - .word 47662 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 6136 - .word 45426 - .word 16382 - .word 0 - .word 12704 - .word 55409 - .word 6480 - .word 47298 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16384 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,252 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logl_table_256 - .hidden __libm_logl_k80 - .hidden __libm_normalizel_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_log_k32.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_log_k32.S deleted file mode 100644 index ed0867162c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_log_k32.S +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_log_k32.c" - .text -..TXTST0: -# -- Begin __libm_log_k32 - .text - .align 16,0x90 - .hidden __libm_log_k32 - .globl __libm_log_k32 -__libm_log_k32: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp - movl 12(%ebp), %edx - movl %edx, %eax - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - andl $2146435072, %eax - negl %eax - addl $2145386496, %eax - fldl .L_2il0floatpacket.0@GOTOFF(%ecx) - movl %eax, 12(%esp) - lea -1072676864(%edx), %eax - movl $0, 8(%esp) - cmpl $24576, %eax - jae ..B1.3 -..B1.2: - fldl 8(%ebp) - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstl 8(%ebp) - fldl 32+_Q@GOTOFF(%ecx) - fmul %st(2), %st - fldl 24+_Q@GOTOFF(%ecx) - fmul %st(3), %st - fxch %st(1) - faddl 16+_Q@GOTOFF(%ecx) - fmul %st(3), %st - fxch %st(1) - faddl 8+_Q@GOTOFF(%ecx) - fmul %st(2), %st - faddp %st, %st(1) - faddl _Q@GOTOFF(%ecx) - fmulp %st, %st(2) - faddp %st, %st(1) - movl %ebp, %esp - popl %ebp - ret -..B1.3: - fldl 8(%ebp) - movl %edx, %eax - fmull 8(%esp) - shrl $12, %edx - movzbl %dl, %edx - shrl $20, %eax - addl $-1023, %eax - movl %eax, (%esp) - fmuls __libm_rcp_table_256@GOTOFF(%ecx,%edx,4) - faddp %st, %st(1) - fstl 8(%ebp) - fldl 8+_P@GOTOFF(%ecx) - fmul %st(1), %st - fildl (%esp) - fxch %st(1) - faddl _P@GOTOFF(%ecx) - fmul %st(2), %st - fmul %st(2), %st - faddp %st, %st(2) - fmull _LN2@GOTOFF(%ecx) - faddl __libm_logf_table_256@GOTOFF(%ecx,%edx,8) - faddp %st, %st(1) -..B1.4: - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __libm_log_k32,@function - .size __libm_log_k32,.-__libm_log_k32 - .data -# -- End __libm_log_k32 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 4 -_Q: - .long 4294868184 - .long 3219128319 - .long 1443356411 - .long 1070945621 - .long 823147527 - .long 3218079745 - .long 748089218 - .long 1070176642 - .long 1053536005 - .long 3217353219 - .type _Q,@object - .size _Q,40 - .align 4 -_P: - .long 3879088107 - .long 3219128321 - .long 1754324240 - .long 1070945626 - .type _P,@object - .size _P,16 - .align 4 -_LN2: - .long 4277811695 - .long 1072049730 - .type _LN2,@object - .size _LN2,8 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logf_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_logl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_logl.S deleted file mode 100644 index 32f2852a38..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_logl.S +++ /dev/null @@ -1,737 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_logl.c" - .text -..TXTST0: -# -- Begin __libm_logl - .text - .align 16,0x90 - .globl __libm_logl -__libm_logl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzbl 17(%ebp), %edi - andl $128, %edi - shrl $7, %edi - movzwl 16(%ebp), %edx - movl %edx, %eax - movl %edi, %ebx - andl $32767, %eax - shll $15, %ebx - movl 12(%ebp), %esi - orl %eax, %ebx - movl %esi, %ecx - shll $16, %ebx - shrl $16, %ecx - orl %ecx, %ebx - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $2147450880, %ebx - jae ..B1.32 -..B1.4: - lea -1073674240(%ebx), %edi - cmpl $36864, %edi - ja ..B1.21 -..B1.5: - addl $-1073676287, %ebx - cmpl $32769, %ebx - ja ..B1.14 -..B1.6: - cmpl $16383, %eax - je ..B1.42 -..B1.7: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.41 -..B1.8: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - movl $1, %eax -..B1.11: - fldt 8(%ebp) - testl %eax, %eax - fldt 36+_Q1@GOTOFF(%ecx) - fldt 12+_Q1@GOTOFF(%ecx) - fldt 24+_Q1@GOTOFF(%ecx) - fldt _Q1@GOTOFF(%ecx) - fxch %st(4) - faddl 8+_ones@GOTOFF(%ecx) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fadd %st(1), %st - fstpt (%esp) - fstpt 8(%ebp) - je ..B1.13 -..B1.12: - fldcw 14(%esp) -..B1.13: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.15: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.16: - fldcw 12(%esp) -..B1.17: - movl $1, %eax -..B1.18: - fldt 8(%ebp) - testl %eax, %eax - fldl _TWO_52H@GOTOFF(%ecx) - fldt 156+_Q2@GOTOFF(%ecx) - fldt 132+_Q2@GOTOFF(%ecx) - fxch %st(3) - faddl 8+_ones@GOTOFF(%ecx) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fld %st(1) - fsub %st(4), %st - fstpt 16(%esp) - fldt 16(%esp) - fmul %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(0) - fld %st(4) - fmul %st(5), %st - fadd %st, %st(1) - fxch %st(1) - fmul %st, %st(4) - fxch %st(6) - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 108+_Q2@GOTOFF(%ecx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - fldt 84+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 60+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 36+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 12+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 144+_Q2@GOTOFF(%ecx) - fmul %st(6), %st - fldt 120+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(6), %st - fldt 96+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(6), %st - fldt 72+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(6), %st - fldt 48+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(6), %st - fldt 24+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(6) - fldt _Q2@GOTOFF(%ecx) - faddp %st, %st(6) - fxch %st(2) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fldt 180+_Q2@GOTOFF(%ecx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(3) - fmulp %st, %st(1) - fld %st(1) - fldt 168+_Q2@GOTOFF(%ecx) - fld %st(0) - fmul %st(4), %st - faddp %st, %st(3) - fldt 16(%esp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(5) - fxch %st(1) - fmul %st(4), %st - fxch %st(2) - fadd %st, %st(4) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.20 -..B1.19: - fldcw 14(%esp) -..B1.20: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.21: - movzwl 14(%esp), %esi - movl %esi, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.49 -..B1.22: - orl $-64768, %esi - movw %si, 12(%esp) -..B1.23: - fldcw 12(%esp) -..B1.24: - movzwl 16(%ebp), %edx - movl %edx, %eax - movl $1, %esi - andl $32767, %eax -..B1.25: - testl %eax, %eax - jne ..B1.28 -..B1.26: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%ecx) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _zeros@GOTOFF(%ecx) - fxch %st(1) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B1.27 - je ..B1.46 -..B1.27: - fstp %st(0) - movzwl 16(%ebp), %edx - movl %edx, %eax - movl $-16458, %ebx - andl $32767, %eax - jmp ..B1.29 -..B1.28: - movl $-16383, %ebx -..B1.29: - fldl _TWO_32H@GOTOFF(%ecx) - andl $-32768, %edx - fldt 60+_P@GOTOFF(%ecx) - orl $-49153, %edx - fldt 36+_P@GOTOFF(%ecx) - addl %eax, %ebx - movw %dx, 16(%ebp) - fldt 8(%ebp) - fld %st(0) - movl 12(%ebp), %eax - fadd %st(4), %st - shrl $23, %eax - fsubp %st, %st(4) - movzbl %al, %eax - fsub %st(3), %st - flds __libm_rcp_table_256@GOTOFF(%ecx,%eax,4) - fmul %st, %st(4) - fmulp %st, %st(1) - fxch %st(3) - faddl 8+_ones@GOTOFF(%ecx) - fld %st(0) - movl %ebx, 16(%esp) - fadd %st(4), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - shll $4, %eax - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - testl %esi, %esi - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fildl 16(%esp) - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fxch %st(1) - fmulp %st, %st(4) - fldt 48+_P@GOTOFF(%ecx) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt _P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st(1), %st - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl 8+__libm_logl_table_256@GOTOFF(%ecx,%eax) - faddp %st, %st(3) - faddl __libm_logl_table_256@GOTOFF(%eax,%ecx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.31 -..B1.30: - fldcw 14(%esp) -..B1.31: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.58 -..B1.33: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.34: - fldcw 12(%esp) -..B1.35: - movzbl 17(%ebp), %edi - movl $1, %edx - andl $128, %edi - shrl $7, %edi -..B1.36: - testl %edi, %edi - jne ..B1.50 -..B1.37: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ecx) - fstpt (%esp) -..B1.38: - testl %edx, %edx - je ..B1.40 -..B1.39: - fldcw 14(%esp) -..B1.40: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - xorl %eax, %eax - jmp ..B1.11 -..B1.42: - cmpl $-2147483648, %esi - jne ..B1.7 -..B1.43: - cmpl $0, 8(%ebp) - jne ..B1.7 -..B1.44: - fldl _zeros@GOTOFF(%ecx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - xorl %eax, %eax - jmp ..B1.18 -..B1.46: - fldl 8+_ones@GOTOFF(%ecx) - testl %esi, %esi - fdivp %st, %st(1) - fstpl (%esp) - je ..B1.48 -..B1.47: - fldcw 14(%esp) -..B1.48: - fldl (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.49: - xorl %esi, %esi - jmp ..B1.25 -..B1.50: - movzwl 16(%ebp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.53 -..B1.51: - cmpl $-2147483648, 12(%ebp) - jne ..B1.37 -..B1.52: - cmpl $0, 8(%ebp) - jne ..B1.37 - jmp ..B1.57 -..B1.53: - testl %eax, %eax - jne ..B1.57 -..B1.54: - cmpl $0, 12(%ebp) - jne ..B1.57 -..B1.55: - cmpl $0, 8(%ebp) - jne ..B1.57 -..B1.56: - fldl 8+_ones@GOTOFF(%ecx) - fdivl _zeros@GOTOFF(%ecx) - fstpt (%esp) - jmp ..B1.38 -..B1.57: - fldl _infs@GOTOFF(%ecx) - fmull _zeros@GOTOFF(%ecx) - fstpt (%esp) - jmp ..B1.38 -..B1.58: - xorl %edx, %edx - jmp ..B1.36 - .align 16,0x90 - .type __libm_logl,@function - .size __libm_logl,.-__libm_logl - .data -# -- End __libm_logl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_Q1: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 5458 - .word 43692 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 44682 - .word 49156 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 63914 - .word 24446 - .word 52434 - .word 52426 - .word 16380 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q2: - .word 58950 - .word 11767 - .word 59949 - .word 40744 - .word 49076 - .word 0 - .word 44486 - .word 43690 - .word 43690 - .word 43690 - .word 16369 - .word 0 - .word 65514 - .word 65535 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 49718 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 36693 - .word 43691 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 41156 - .word 18852 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 14101 - .word 65290 - .word 65535 - .word 65535 - .word 49147 - .word 0 - .word 21744 - .word 48151 - .word 14557 - .word 58254 - .word 16379 - .word 0 - .word 57454 - .word 983 - .word 52353 - .word 52428 - .word 49147 - .word 0 - .word 54021 - .word 59409 - .word 39452 - .word 47662 - .word 16379 - .word 0 - .word 35608 - .word 4659 - .word 11214 - .word 43692 - .word 49147 - .word 0 - .word 35524 - .word 31332 - .word 8749 - .word 40326 - .word 16379 - .word 0 - .word 54832 - .word 20873 - .word 17674 - .word 36915 - .word 49147 - .word 0 - .word 48567 - .word 9481 - .word 46911 - .word 55870 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16381 - .word 0 - .type _Q2,@object - .size _Q2,192 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .type _P,@object - .size _P,72 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_logl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_logl_k80.S deleted file mode 100644 index f7dd736fcb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_logl_k80.S +++ /dev/null @@ -1,1277 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_logl_k80.c" - .text -..TXTST0: -# -- Begin __libm_logl_k80 - .text - .align 16,0x90 - .hidden __libm_logl_k80 - .globl __libm_logl_k80 -__libm_logl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -# parameter 3: 32 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp - fldt 8(%ebp) - movzbl 17(%ebp), %esi - andl $128, %esi - shrl $7, %esi - movzwl 16(%ebp), %ebx - movl %esi, %eax - movl %ebx, 12(%esp) - andl $32767, %ebx - shll $15, %eax - movl 12(%ebp), %edx - orl %ebx, %eax - movl %edx, %edi - shll $16, %eax - shrl $16, %edi - orl %edi, %eax - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $2147450880, %eax - fstpt 24(%esp) - fldt 24(%esp) - fldt 20(%ebp) - jae ..B1.14 -..B1.2: - lea -1073674240(%eax), %esi - cmpl $36864, %esi - ja ..B1.7 -..B1.3: - addl $-1073676287, %eax - cmpl $32769, %eax - ja ..B1.6 -..B1.4: - fldl _ones@GOTOFF(%ecx) - fucom %st(2) - fnstsw %ax - sahf - jp ..B1.5 - je ..B1.23 -..B1.5: - fldt 36+_Q1@GOTOFF(%ecx) - fld %st(3) - movl 32(%ebp), %eax - fsub %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubrp %st, %st(5) - faddp %st, %st(4) - fld %st(2) - fadd %st(4), %st - fld %st(0) - fxch %st(1) - fsub %st, %st(5) - fxch %st(5) - fsubrp %st, %st(4) - fadd %st(3), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(1) - fstpt 24(%esp) - fldt 24(%esp) - fldt 12+_Q1@GOTOFF(%ecx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 24+_Q1@GOTOFF(%ecx) - fmul %st(1), %st - fldt _Q1@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(3) - fadd %st(1), %st - fstpt (%eax) - fldt (%eax) - fsubrp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 12(%eax) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.6: - fldl 8+_ones@GOTOFF(%ecx) - fld %st(2) - movl 32(%ebp), %eax - fadd %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fadd %st, %st(1) - fld %st(1) - fld %st(2) - fxch %st(3) - fstpt 24(%esp) - fldt 24(%esp) - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fldl _TWO_52H@GOTOFF(%ecx) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fld %st(1) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(4) - fxch %st(5) - faddp %st, %st(4) - fxch %st(3) - fstpt (%esp) - fldt (%esp) - fmul %st, %st(3) - fmul %st(2), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fldt 156+_Q2@GOTOFF(%ecx) - fmul %st(1), %st - fldt 132+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 108+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 144+_Q2@GOTOFF(%ecx) - fmul %st(2), %st - fldt 120+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _Q2@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 180+_Q2@GOTOFF(%ecx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(2) - fld %st(2) - fldt 168+_Q2@GOTOFF(%ecx) - fld %st(0) - fmul %st(5), %st - faddp %st, %st(4) - fldt (%esp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fmul %st(1), %st - faddp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt (%eax) - fldt (%eax) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%eax) - fldl _ones@GOTOFF(%ecx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.7: - fldl _zeros@GOTOFF(%ecx) - testl %ebx, %ebx - jne ..B1.10 -..B1.8: - fldl _TWO_75@GOTOFF(%ecx) - fmul %st, %st(3) - fxch %st(3) - fucom %st(1) - fnstsw %ax - fxch %st(3) - fmulp %st, %st(2) - sahf - jp ..B1.9 - je ..B1.27 -..B1.9: - fxch %st(2) - fstpt 24(%esp) - movl $-16458, %esi - movzwl 32(%esp), %ebx - movl 28(%esp), %edx - movl %ebx, 12(%esp) - andl $32767, %ebx - jmp ..B1.11 -..B1.10: - fstp %st(2) - movl $-16383, %esi -..B1.11: - addl %ebx, %esi - fucom %st(1) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - jp ..B1.12 - je ..B1.13 -..B1.12: - fstpt (%esp) - movzwl 8(%esp), %eax - movl %eax, %edi - subl %ebx, %eax - andl $-32768, %edi - addl $16383, %eax - andl $32767, %eax - orl %eax, %edi - movw %di, 8(%esp) - fldt (%esp) -..B1.13: - fldl _TWO_32H@GOTOFF(%ecx) - fldl 8+_ones@GOTOFF(%ecx) - fldt 60+_P@GOTOFF(%ecx) - movl 12(%esp), %eax - andl $-32768, %eax - orl $-49153, %eax - movw %ax, 32(%esp) - fldt 24(%esp) - fld %st(0) - shrl $23, %edx - fadd %st(4), %st - movzbl %dl, %edx - fsubp %st, %st(4) - movl %esi, 16(%esp) - fsub %st(3), %st - flds __libm_rcp_table_256@GOTOFF(%ecx,%edx,4) - fmul %st, %st(4) - fmul %st, %st(1) - fmulp %st, %st(5) - fxch %st(4) - fstpt (%esp) - fldt (%esp) - fld %st(2) - shll $4, %edx - fadd %st(4), %st - movl 32(%ebp), %ebx - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fld %st(3) - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fadd %st, %st(3) - fld %st(3) - fmul %st(4), %st - fmul %st, %st(2) - fxch %st(4) - fstpt 24(%esp) - fldt 24(%esp) - fildl 16(%esp) - fldt 36+_P@GOTOFF(%ecx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fmulp %st, %st(1) - fldt 48+_P@GOTOFF(%ecx) - fmul %st(5), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt _P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - faddp %st, %st(3) - fldt .L_2il0floatpacket.2@GOTOFF(%ecx) - fmul %st(1), %st - fldt .L_2il0floatpacket.3@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl 8+__libm_logl_table_256@GOTOFF(%ecx,%edx) - faddp %st, %st(3) - faddl __libm_logl_table_256@GOTOFF(%edx,%ecx) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt (%ebx) - fldt (%ebx) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 12(%ebx) - fldl _ones@GOTOFF(%ecx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - fstp %st(0) - testl %esi, %esi - jne ..B1.16 -..B1.15: - fldl _ones@GOTOFF(%ecx) - fmul %st, %st(1) - fldl _zeros@GOTOFF(%ecx) - fxch %st(2) - fxch %st(1) - jmp ..B1.22 -..B1.16: - cmpl $32767, %ebx - je ..B1.25 -..B1.17: - fstp %st(0) - testl %ebx, %ebx - jne ..B1.21 -..B1.18: - testl %edx, %edx - jne ..B1.21 -..B1.19: - cmpl $0, 24(%esp) - jne ..B1.21 -..B1.20: - fldl _zeros@GOTOFF(%ecx) - fldl 8+_ones@GOTOFF(%ecx) - fdiv %st(1), %st - fldl _ones@GOTOFF(%ecx) - jmp ..B1.22 -..B1.21: - fldl _zeros@GOTOFF(%ecx) - fldl _infs@GOTOFF(%ecx) - fmul %st(1), %st - fldl _ones@GOTOFF(%ecx) -..B1.22: - movl 32(%ebp), %eax - fxch %st(1) - fstpt (%eax) - fxch %st(1) - fstpt 12(%eax) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - fldl _zeros@GOTOFF(%ecx) - fucom %st(2) - fnstsw %ax - sahf - jp ..B1.30 - je ..B1.24 -..B1.30: - fstp %st(0) - jmp ..B1.5 -..B1.24: - fstp %st(1) - fstp %st(2) - fstp %st(0) - movl 32(%ebp), %eax - fld %st(0) - fxch %st(1) - fstpt (%eax) - fldt (%eax) - fstpt 12(%eax) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - cmpl $-2147483648, %edx - jne ..B1.15 -..B1.26: - cmpl $0, 24(%esp) - jne ..B1.15 - jmp ..B1.31 -..B1.27: - fstp %st(2) - fstp %st(0) - fldl 8+_ones@GOTOFF(%ecx) - fdiv %st(1), %st - movl 32(%ebp), %eax - fstpt (%eax) - fstpt 12(%eax) - fldl _ones@GOTOFF(%ecx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - fstp %st(0) - jmp ..B1.21 - .align 16,0x90 - .type __libm_logl_k80,@function - .size __libm_logl_k80,.-__libm_logl_k80 - .data -# -- End __libm_logl_k80 - .text -# -- Begin __libm_log_k80 - .text - .align 16,0x90 - .hidden __libm_log_k80 - .globl __libm_log_k80 -__libm_log_k80: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $100, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 84(%esp) - addl $4, %esp - movl 12(%ebp), %ebx - pushl %ebx - call __libm_normalizel_k80 -..B2.2: - fldt (%ebx) - fldt 12(%ebx) - movl 24(%ebx), %eax - cmpl $-1, %eax - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - je ..B2.41 -..B2.3: - movl %eax, 48(%esp) - fildl 48(%esp) -..B2.4: - fxch %st(2) - fstpt 32(%esp) - fldt 32(%esp) - movzbl 41(%esp), %esi - andl $128, %esi - shrl $7, %esi - movzwl 40(%esp), %edx - movl %esi, %eax - movl %edx, 28(%esp) - andl $32767, %edx - shll $15, %eax - movl 36(%esp), %ecx - orl %edx, %eax - movl %ecx, %edi - shll $16, %eax - shrl $16, %edi - orl %edi, %eax - cmpl $2147450880, %eax - jae ..B2.17 -..B2.5: - lea -1073674240(%eax), %esi - cmpl $36864, %esi - ja ..B2.10 -..B2.6: - fldl _ones@GOTOFF(%ebx) - addl $-1073676287, %eax - cmpl $32769, %eax - ja ..B2.9 -..B2.7: - fucom %st(1) - fnstsw %ax - sahf - jp ..B2.8 - je ..B2.35 -..B2.8: - fldt 12+_Q1@GOTOFF(%ebx) - fld %st(2) - fsub %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - fld %st(3) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(4) - fld %st(2) - fadd %st(4), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(3) - fmul %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 24+_Q1@GOTOFF(%ebx) - fmul %st(1), %st - fldt _Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(3) - jmp ..B2.26 -..B2.9: - fldl 8+_ones@GOTOFF(%ebx) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(3) - fstpt 32(%esp) - fld %st(0) - fadd %st(2), %st - fld %st(0) - fld %st(1) - fxch %st(5) - fstpt 16(%esp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fldl _TWO_52H@GOTOFF(%ebx) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fld %st(1) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fxch %st(4) - fstpt 48(%esp) - fldt 48(%esp) - fmul %st, %st(4) - fmul %st(3), %st - faddp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fldt 156+_Q2@GOTOFF(%ebx) - fmul %st(1), %st - fldt 132+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 108+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 144+_Q2@GOTOFF(%ebx) - fmul %st(2), %st - fldt 120+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _Q2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 180+_Q2@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fmulp %st, %st(3) - fld %st(0) - fldt 168+_Q2@GOTOFF(%ebx) - fld %st(0) - fmul %st(3), %st - faddp %st, %st(5) - fldt 48(%esp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - fmul %st(3), %st - fxch %st(3) - fadd %st(4), %st - fmul %st(1), %st - faddp %st, %st(3) - faddp %st, %st(2) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%esp) - fldt 16(%esp) - fxch %st(3) - fxch %st(1) - jmp ..B2.26 -..B2.10: - fldl _zeros@GOTOFF(%ebx) - testl %edx, %edx - jne ..B2.13 -..B2.11: - fldl _TWO_75@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - fucom %st(1) - fnstsw %ax - fxch %st(2) - fmulp %st, %st(3) - sahf - jp ..B2.12 - je ..B2.37 -..B2.12: - fxch %st(1) - fstpt 32(%esp) - movl $-16458, %esi - movzwl 40(%esp), %edx - movl 36(%esp), %ecx - movl %edx, 28(%esp) - andl $32767, %edx - jmp ..B2.14 -..B2.13: - fstp %st(1) - movl $-16383, %esi -..B2.14: - addl %edx, %esi - fucomp %st(1) - fnstsw %ax - sahf - jp ..B2.15 - je ..B2.16 -..B2.15: - fstpt 16(%esp) - movzwl 24(%esp), %eax - movl %eax, %edi - subl %edx, %eax - andl $-32768, %edi - addl $16383, %eax - andl $32767, %eax - orl %eax, %edi - movw %di, 24(%esp) - fldt 16(%esp) -..B2.16: - fldl _TWO_32H@GOTOFF(%ebx) - fldt 36+_P@GOTOFF(%ebx) - movl 28(%esp), %eax - andl $-32768, %eax - orl $-49153, %eax - movw %ax, 40(%esp) - fldt 32(%esp) - fld %st(0) - shrl $23, %ecx - fadd %st(3), %st - movzbl %cl, %ecx - fsubp %st, %st(3) - movl %esi, 48(%esp) - fsub %st(2), %st - fildl 48(%esp) - flds __libm_rcp_table_256@GOTOFF(%ebx,%ecx,4) - fmul %st, %st(4) - fmul %st, %st(2) - fmulp %st, %st(5) - shll $4, %ecx - fxch %st(1) - faddp %st, %st(4) - fldl 8+_ones@GOTOFF(%ebx) - fld %st(0) - fadd %st(4), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(5) - faddp %st, %st(2) - fxch %st(5) - faddp %st, %st(1) - fadd %st, %st(4) - fld %st(4) - fmul %st(5), %st - fldt 60+_P@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(4) - fmul %st, %st(3) - fldt 12+_P@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fxch %st(5) - fmulp %st, %st(3) - fldt 48+_P@GOTOFF(%ebx) - fmul %st(5), %st - fldt 24+_P@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(5), %st - fldt _P@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fmul %st(1), %st - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fmulp %st, %st(2) - faddl 8+__libm_logl_table_256@GOTOFF(%ebx,%ecx) - faddp %st, %st(3) - fldl _ones@GOTOFF(%ebx) - fxch %st(1) - faddl __libm_logl_table_256@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - jmp ..B2.26 -..B2.17: - fstp %st(1) - testl %esi, %esi - jne ..B2.19 -..B2.18: - fldl _ones@GOTOFF(%ebx) - fmul %st, %st(1) - fldl _zeros@GOTOFF(%ebx) - fxch %st(2) - fxch %st(1) - jmp ..B2.26 -..B2.19: - cmpl $32767, %edx - je ..B2.39 -..B2.20: - fstp %st(0) - testl %edx, %edx - jne ..B2.24 -..B2.21: - testl %ecx, %ecx - jne ..B2.24 -..B2.22: - cmpl $0, 32(%esp) - jne ..B2.24 -..B2.23: - fldl _zeros@GOTOFF(%ebx) - fldl 8+_ones@GOTOFF(%ebx) - fdiv %st(1), %st - fldl _ones@GOTOFF(%ebx) - jmp ..B2.26 -..B2.24: - fldl _zeros@GOTOFF(%ebx) - fldl _infs@GOTOFF(%ebx) - fmul %st(1), %st - fldl _ones@GOTOFF(%ebx) -..B2.26: - fldt 12+_LN2_K80@GOTOFF(%ebx) - lea 72(%esp), %edx - fmul %st(4), %st - movl 8(%ebp), %eax - fstpt -44(%edx) - fldt -44(%edx) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fstpt -12(%edx) - fldt -12(%edx) - fxch %st(3) - fmulp %st, %st(2) - movzwl -4(%edx), %esi - andl $32767, %esi - fxch %st(1) - fstpt (%edx) - fldt (%edx) - fldt _LN2_K80@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - fstpt -56(%edx) - fldt -56(%edx) - fld %st(2) - movzwl -48(%edx), %ecx - fadd %st(1), %st - andl $32767, %ecx - movl $0, 24(%eax) - cmpl %esi, %ecx - jg ..B2.31 -..B2.27: - jne ..B2.32 -..B2.28: - movl 20(%esp), %edx - movl 64(%esp), %ecx - cmpl %ecx, %edx - ja ..B2.31 -..B2.29: - jne ..B2.32 -..B2.30: - movl 16(%esp), %edx - cmpl 60(%esp), %edx - jbe ..B2.32 -..B2.31: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - jmp ..B2.33 -..B2.32: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) -..B2.33: - fld %st(0) - fadd %st(2), %st - fstpt (%eax) - fldt (%eax) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 12(%eax) - movl 84(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.38 -..B2.34: - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.35: - fldl _zeros@GOTOFF(%ebx) - fucom %st(3) - fnstsw %ax - sahf - jp ..B2.44 - je ..B2.36 -..B2.44: - fstp %st(0) - jmp ..B2.8 -..B2.36: - fstp %st(2) - fstp %st(2) - fstp %st(1) - fld %st(0) - fld %st(1) - fxch %st(1) - fxch %st(2) - fxch %st(1) - jmp ..B2.26 -..B2.37: - fstp %st(1) - fstp %st(1) - fldl 8+_ones@GOTOFF(%ebx) - fdiv %st(1), %st - fldl _ones@GOTOFF(%ebx) - jmp ..B2.26 -..B2.38: - call __stack_chk_fail@PLT -..B2.39: - cmpl $-2147483648, %ecx - jne ..B2.18 -..B2.40: - cmpl $0, 32(%esp) - jne ..B2.18 - jmp ..B2.45 -..B2.41: - fldl _zeros@GOTOFF(%ebx) - fldt halfs@GOTOFF(%ebx) - fmul %st, %st(3) - fmulp %st, %st(2) - jmp ..B2.4 -..B2.45: - fstp %st(0) - jmp ..B2.24 - .align 16,0x90 - .type __libm_log_k80,@function - .size __libm_log_k80,.-__libm_log_k80 - .data -# -- End __libm_log_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -halfs: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0xbf,0x00,0x00 - .type halfs,@object - .size halfs,24 - .align 2 -_Q1: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 5458 - .word 43692 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 44682 - .word 49156 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 63914 - .word 24446 - .word 52434 - .word 52426 - .word 16380 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q2: - .word 58950 - .word 11767 - .word 59949 - .word 40744 - .word 49076 - .word 0 - .word 44486 - .word 43690 - .word 43690 - .word 43690 - .word 16369 - .word 0 - .word 65514 - .word 65535 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 49718 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 36693 - .word 43691 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 41156 - .word 18852 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 14101 - .word 65290 - .word 65535 - .word 65535 - .word 49147 - .word 0 - .word 21744 - .word 48151 - .word 14557 - .word 58254 - .word 16379 - .word 0 - .word 57454 - .word 983 - .word 52353 - .word 52428 - .word 49147 - .word 0 - .word 54021 - .word 59409 - .word 39452 - .word 47662 - .word 16379 - .word 0 - .word 35608 - .word 4659 - .word 11214 - .word 43692 - .word 49147 - .word 0 - .word 35524 - .word 31332 - .word 8749 - .word 40326 - .word 16379 - .word 0 - .word 54832 - .word 20873 - .word 17674 - .word 36915 - .word 49147 - .word 0 - .word 48567 - .word 9481 - .word 46911 - .word 55870 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16381 - .word 0 - .type _Q2,@object - .size _Q2,192 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .type _P,@object - .size _P,72 - .align 2 -_LN2_K80: - .word 0 - .word 0 - .word 6136 - .word 45426 - .word 16382 - .word 0 - .word 12704 - .word 55409 - .word 6480 - .word 47298 - .word 49116 - .word 0 - .type _LN2_K80,@object - .size _LN2_K80,24 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logl_table_256 - .hidden __libm_normalizel_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_normalizel_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_normalizel_k80.S deleted file mode 100644 index 66068b39a5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_normalizel_k80.S +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_normalizel_k80.c" - .text -..TXTST0: -# -- Begin __libm_normalizel_k80 - .text - .align 16,0x90 - .hidden __libm_normalizel_k80 - .globl __libm_normalizel_k80 -__libm_normalizel_k80: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - pushl %ebp - movl 16(%esp), %ecx - cmpl $0, 4(%ecx) - jne ..B1.3 -..B1.2: - cmpl $0, (%ecx) - je ..B1.14 -..B1.3: - movzwl 8(%ecx), %ebx - movl %ebx, %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.14 -..B1.4: - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - testl %eax, %eax - jle ..B1.16 -..B1.5: - andl $-32768, %ebx - addl $-16383, %eax - orl $-49153, %ebx -..B1.6: - movw %bx, 8(%ecx) - cmpl $0, 16(%ecx) - jne ..B1.8 -..B1.7: - cmpl $0, 12(%ecx) - je ..B1.13 -..B1.8: - movzwl 20(%ecx), %ebp - movl %ebp, %edi - andl $32767, %edi - jle ..B1.15 -..B1.9: - andl $-32768, %ebp - addl $-16383, %edi - orl $-49153, %ebp -..B1.10: - lea -256(%eax), %ebx - cmpl %ebx, %edi - jle ..B1.12 -..B1.11: - subl %eax, %edi - andl $-32768, %ebp - addl $16383, %edi - andl $32767, %edi - orl %edi, %ebp - movw %bp, 20(%ecx) - jmp ..B1.13 -..B1.12: - fldt _CONSTANTS@GOTOFF(%edx) - fstpt 12(%ecx) -..B1.13: - addl %eax, 24(%ecx) -..B1.14: - popl %ebp - popl %ebx - popl %edi - ret -..B1.15: - fldt 12(%ecx) - fldt 12+_CONSTANTS@GOTOFF(%edx) - fmulp %st, %st(1) - fstpt 12(%ecx) - movzwl 20(%ecx), %ebp - movl %ebp, %edi - andl $32767, %edi - andl $-32768, %ebp - addl $-16639, %edi - orl $-49153, %ebp - jmp ..B1.10 -..B1.16: - fldt (%ecx) - fldt 12+_CONSTANTS@GOTOFF(%edx) - fmulp %st, %st(1) - fstpt (%ecx) - movzwl 8(%ecx), %ebx - movl %ebx, %eax - andl $32767, %eax - andl $-32768, %ebx - addl $-16639, %eax - orl $-49153, %ebx - jmp ..B1.6 - .align 16,0x90 - .type __libm_normalizel_k80,@function - .size __libm_normalizel_k80,.-__libm_normalizel_k80 - .data -# -- End __libm_normalizel_k80 - .section .rodata, "a" - .align 16 - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_recacoshl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_recacoshl_k80.S deleted file mode 100644 index 529a516ef0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_recacoshl_k80.S +++ /dev/null @@ -1,1806 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_recacoshl_k80.c" - .text -..TXTST0: -# -- Begin __libm_recacoshl_k80 - .text - .align 16,0x90 - .hidden __libm_recacoshl_k80 - .globl __libm_recacoshl_k80 -__libm_recacoshl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -# parameter 4: 20 + %ebp -# parameter 5: 24 + %ebp -# parameter 6: 28 + %ebp -# parameter 7: 32 + %ebp -# parameter 8: 36 + %ebp -# parameter 9: 40 + %ebp -# parameter 10: 44 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $436, %esp - movl 8(%ebp), %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - movl %eax, 76(%esp) - movzwl 8(%ecx), %eax - andl $32767, %eax - movl %gs:20, %edx - xorl %esp, %edx - movl %edx, 428(%esp) - cmpl $16383, %eax - movl 24(%ebp), %ebx - movl 40(%ebp), %esi - jl ..B1.33 -..B1.2: - movzwl 8(%esi), %ecx - movl %ecx, %edi - andl $32767, %edi - cmpl $8383, %edi - jl ..B1.6 -..B1.3: - cmpl $24383, %edi - jg ..B1.6 -..B1.4: - movzwl 8(%ebx), %edx - movl %edx, 44(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.6 -..B1.5: - cmpl $24383, %edx - jle ..B1.9 -..B1.6: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B1.7: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B1.8: - movzwl 8(%esi), %ecx - movl %ecx, %edi - movzwl 8(%ebx), %edx - andl $32767, %edi - movl %edx, 44(%esp) - andl $32767, %edx -..B1.9: - movl 24(%ebx), %eax - movl 24(%esi), %esi - movl %eax, 52(%esp) - movl %esi, 48(%esp) - lea -134(%eax,%edx), %eax - addl %edi, %esi - movl %esi, 36(%esp) - cmpl %esi, %eax - movl 40(%ebp), %esi - jge ..B1.26 -..B1.10: - movl 4(%esi), %eax - movl %eax, 32(%esp) - movl 52(%esp), %eax - lea 134(%eax,%edx), %eax - cmpl 36(%esp), %eax - jle ..B1.27 -..B1.11: - cmpl $0, 32(%esp) - jne ..B1.13 -..B1.12: - cmpl $0, (%esi) - je ..B1.28 -..B1.13: - cmpl $0, 4(%ebx) - jne ..B1.15 -..B1.14: - cmpl $0, (%ebx) - je ..B1.27 -..B1.15: - movl 52(%esp), %eax - cmpl 48(%esp), %eax - je ..B1.17 -..B1.16: - fldt (%esi) - fldt 12(%esi) - movl 48(%esp), %ecx - movl %eax, %edx - subl %edx, %ecx - andb $127, 41(%esp) - addl $16383, %ecx - movzwl 40(%esp), %eax - andl $32767, %ecx - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 24(%esi) - fxch %st(2) - fstpt (%esi) - fldt (%esi) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%esi) - fldt 12(%esi) - movl 24(%ebx), %edi - movzwl 8(%ebx), %eax - movl %edi, 52(%esp) - movzwl 8(%esi), %ecx - movl %eax, 44(%esp) - jmp ..B1.18 -..B1.17: - fldt (%esi) - fldt 12(%esi) -..B1.18: - fldt (%ebx) - andl $32767, %ecx - movl 44(%esp), %edx - fld %st(2) - andl $32767, %edx - fadd %st(1), %st - movl 52(%esp), %eax - cmpl %edx, %ecx - movl %eax, 116(%esp) - jg ..B1.23 -..B1.19: - jne ..B1.24 -..B1.20: - movl 4(%esi), %eax - cmpl 4(%ebx), %eax - ja ..B1.23 -..B1.21: - jne ..B1.24 -..B1.22: - movl (%esi), %eax - cmpl (%ebx), %eax - jbe ..B1.24 -..B1.23: - fldt 12(%ebx) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%esp) - fldt 32(%esp) - jmp ..B1.25 -..B1.24: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 12(%ebx) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) -..B1.25: - fld %st(0) - fadd %st(2), %st - fstpt 92(%esp) - fldt 92(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 104(%esp) - jmp ..B1.32 -..B1.26: - movl 4(%esi), %eax - movl %eax, 32(%esp) -..B1.27: - cmpl $0, 32(%esp) - jne ..B1.29 -..B1.225: - cmpl $0, (%esi) -..B1.28: - je ..B1.30 -..B1.29: - movl 52(%esp), %eax - lea -16517(%eax,%edx), %ecx - movl 48(%esp), %edx - lea -16383(%edx,%edi), %edi - cmpl %edi, %ecx - jl ..B1.31 -..B1.30: - movl (%ebx), %eax - movl %eax, 92(%esp) - movl 4(%ebx), %edx - movl 8(%ebx), %ecx - movl 12(%ebx), %esi - movl 16(%ebx), %edi - movl 20(%ebx), %eax - movl 24(%ebx), %ebx - movl %edx, 96(%esp) - movl %ecx, 100(%esp) - movl %esi, 104(%esp) - movl %edi, 108(%esp) - movl %eax, 112(%esp) - movl %ebx, 116(%esp) - jmp ..B1.32 -..B1.31: - movl (%esi), %eax - movl %eax, 92(%esp) - movl 4(%esi), %edx - movl 8(%esi), %ecx - movl 12(%esi), %ebx - movl 16(%esi), %edi - movl 20(%esi), %eax - movl 24(%esi), %esi - movl %edx, 96(%esp) - movl %ecx, 100(%esp) - movl %ebx, 104(%esp) - movl %edi, 108(%esp) - movl %eax, 112(%esp) - movl %esi, 116(%esp) -..B1.32: - movl 76(%esp), %eax - movl $0, 144(%esp) - fldt .L_2il0floatpacket.10@GOTOFF(%eax) - fstpt 120(%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%eax) - fstpt 132(%esp) - fldt 132(%esp) - jmp ..B1.63 -..B1.33: - movl 32(%ebp), %eax - movl 4(%eax), %ecx - movl 8(%eax), %edi - movl %ecx, 96(%esp) - movl 16(%eax), %ecx - movl %edi, 100(%esp) - movl 20(%eax), %edi - movl %ecx, 108(%esp) - movl (%eax), %edx - movzwl 8(%esi), %ecx - movl %edi, 112(%esp) - movl %ecx, %edi - movl %edx, 92(%esp) - andl $32767, %edi - movl 12(%eax), %edx - cmpl $8383, %edi - movl 24(%eax), %eax - movl %edx, 104(%esp) - movl %eax, 116(%esp) - jl ..B1.37 -..B1.34: - cmpl $24383, %edi - jg ..B1.37 -..B1.35: - movzwl 8(%ebx), %edx - movl %edx, 44(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.37 -..B1.36: - cmpl $24383, %edx - jle ..B1.40 -..B1.37: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B1.38: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B1.39: - movzwl 8(%esi), %ecx - movl %ecx, %edi - movzwl 8(%ebx), %edx - andl $32767, %edi - movl %edx, 44(%esp) - andl $32767, %edx -..B1.40: - movl 24(%ebx), %eax - movl 24(%esi), %esi - movl %eax, 52(%esp) - movl %esi, 48(%esp) - lea -134(%eax,%edx), %eax - addl %edi, %esi - movl %esi, 36(%esp) - cmpl %esi, %eax - movl 40(%ebp), %esi - jge ..B1.57 -..B1.41: - movl 4(%esi), %eax - movl %eax, 32(%esp) - movl 52(%esp), %eax - lea 134(%eax,%edx), %eax - cmpl 36(%esp), %eax - jle ..B1.58 -..B1.42: - cmpl $0, 32(%esp) - jne ..B1.44 -..B1.43: - cmpl $0, (%esi) - je ..B1.59 -..B1.44: - cmpl $0, 4(%ebx) - jne ..B1.46 -..B1.45: - cmpl $0, (%ebx) - je ..B1.58 -..B1.46: - movl 52(%esp), %eax - cmpl 48(%esp), %eax - je ..B1.48 -..B1.47: - fldt (%esi) - fldt 12(%esi) - movl 48(%esp), %ecx - movl %eax, %edx - subl %edx, %ecx - andb $127, 41(%esp) - addl $16383, %ecx - movzwl 40(%esp), %eax - andl $32767, %ecx - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 24(%esi) - fxch %st(2) - fstpt (%esi) - fldt (%esi) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%esi) - fldt 12(%esi) - movl 24(%ebx), %edi - movzwl 8(%ebx), %eax - movl %edi, 52(%esp) - movzwl 8(%esi), %ecx - movl %eax, 44(%esp) - jmp ..B1.49 -..B1.48: - fldt (%esi) - fldt 12(%esi) -..B1.49: - fldt (%ebx) - andl $32767, %ecx - movl 44(%esp), %edx - fld %st(2) - andl $32767, %edx - fsub %st(1), %st - movl 52(%esp), %eax - cmpl %edx, %ecx - movl %eax, 144(%esp) - jg ..B1.54 -..B1.50: - jne ..B1.55 -..B1.51: - movl 4(%esi), %eax - cmpl 4(%ebx), %eax - ja ..B1.54 -..B1.52: - jne ..B1.55 -..B1.53: - movl (%esi), %eax - cmpl (%ebx), %eax - jbe ..B1.55 -..B1.54: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 12(%ebx) - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 32(%esp) - fldt 32(%esp) - jmp ..B1.56 -..B1.55: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 12(%ebx) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) -..B1.56: - fld %st(1) - movl 76(%esp), %eax - fadd %st(1), %st - fstpt 120(%esp) - fldt 120(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 132(%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%eax) - jmp ..B1.63 -..B1.57: - movl 4(%esi), %eax - movl %eax, 32(%esp) -..B1.58: - cmpl $0, 32(%esp) - jne ..B1.60 -..B1.224: - cmpl $0, (%esi) -..B1.59: - je ..B1.61 -..B1.60: - movl 52(%esp), %eax - lea -16517(%eax,%edx), %ecx - movl 48(%esp), %edx - lea -16383(%edx,%edi), %edi - cmpl %edi, %ecx - jl ..B1.62 -..B1.61: - fldt (%ebx) - movl 76(%esp), %edx - fchs - movl 52(%esp), %eax - movl %eax, 144(%esp) - fstpt 120(%esp) - fldt 12(%ebx) - fchs - fstpt 132(%esp) - fldt .L_2il0floatpacket.9@GOTOFF(%edx) - jmp ..B1.63 -..B1.62: - movl (%esi), %eax - movl %eax, 120(%esp) - movl 20(%esi), %eax - movl %eax, 140(%esp) - movl 76(%esp), %eax - movl 4(%esi), %edx - movl 8(%esi), %ecx - fldt .L_2il0floatpacket.9@GOTOFF(%eax) - movl 12(%esi), %ebx - movl 16(%esi), %edi - movl 24(%esi), %esi - movl %edx, 124(%esp) - movl %ecx, 128(%esp) - movl %ebx, 132(%esp) - movl %edi, 136(%esp) - movl %esi, 144(%esp) -..B1.63: - movl 44(%ebp), %edx - movl 76(%esp), %eax - movl $0, 172(%esp) - movzwl 8(%edx), %ecx - movl %ecx, %ebx - fldt .L_2il0floatpacket.11@GOTOFF(%eax) - andl $32767, %ebx - fstpt 148(%esp) - cmpl $8383, %ebx - fstpt 160(%esp) - jl ..B1.67 -..B1.64: - cmpl $24383, %ebx - jg ..B1.67 -..B1.65: - movzwl 156(%esp), %edx - movl %edx, 48(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.67 -..B1.66: - cmpl $24383, %edx - jle ..B1.70 -..B1.67: - addl $4, %esp - pushl 44(%ebp) - call __libm_normalizel_k80 -..B1.68: - addl $4, %esp - lea 144(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.69: - movl 44(%ebp), %ecx - movzwl 156(%esp), %edx - movl %edx, 48(%esp) - andl $32767, %edx - movzwl 8(%ecx), %ecx - movl %ecx, %ebx - andl $32767, %ebx -..B1.70: - movl 44(%ebp), %esi - movl 172(%esp), %eax - movl 24(%esi), %edi - movl %edi, 56(%esp) - lea (%ebx,%edi), %esi - movl %esi, 52(%esp) - lea -134(%eax,%edx), %edi - cmpl %edi, %esi - jle ..B1.87 -..B1.71: - movl 44(%ebp), %esi - movl 4(%esi), %edi - lea 134(%eax,%edx), %esi - movl %edi, 44(%esp) - cmpl 52(%esp), %esi - jle ..B1.88 -..B1.72: - cmpl $0, 44(%esp) - jne ..B1.74 -..B1.73: - movl 44(%ebp), %esi - cmpl $0, (%esi) - je ..B1.89 -..B1.74: - cmpl $0, 152(%esp) - jne ..B1.76 -..B1.75: - cmpl $0, 148(%esp) - je ..B1.88 -..B1.76: - cmpl 56(%esp), %eax - je ..B1.78 -..B1.77: - movl 56(%esp), %edx - subl %eax, %edx - andb $127, 41(%esp) - addl $16383, %edx - movl 44(%ebp), %ebx - andl $32767, %edx - movzwl 40(%esp), %ecx - andl $-32768, %ecx - fldt (%ebx) - orl %edx, %ecx - fldt 12(%ebx) - movw %cx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %eax, 24(%ebx) - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%ebx) - fldt 12(%ebx) - movzwl 8(%ebx), %ecx - jmp ..B1.79 -..B1.78: - movl 44(%ebp), %edx - fldt (%edx) - fldt 12(%edx) -..B1.79: - fldt 148(%esp) - andl $32767, %ecx - movl %eax, 200(%esp) - fld %st(2) - movl 48(%esp), %eax - fadd %st(1), %st - andl $32767, %eax - cmpl %eax, %ecx - jg ..B1.84 -..B1.80: - movl 48(%esp), %eax - andl $32767, %eax - cmpl %eax, %ecx - jne ..B1.85 -..B1.81: - movl 44(%ebp), %eax - movl 4(%eax), %edx - cmpl 152(%esp), %edx - ja ..B1.84 -..B1.82: - jne ..B1.85 -..B1.83: - movl 44(%ebp), %eax - movl (%eax), %edx - cmpl 148(%esp), %edx - jbe ..B1.85 -..B1.84: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 160(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.86 -..B1.85: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 160(%esp) - faddp %st, %st(1) -..B1.86: - fld %st(0) - fadd %st(2), %st - fstpt 176(%esp) - fldt 176(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 188(%esp) - jmp ..B1.93 -..B1.87: - movl 44(%ebp), %ecx - movl 4(%ecx), %esi - movl %esi, 44(%esp) -..B1.88: - cmpl $0, 44(%esp) - jne ..B1.90 -..B1.226: - movl 44(%ebp), %ecx - cmpl $0, (%ecx) -..B1.89: - je ..B1.91 -..B1.90: - lea -16517(%eax,%edx), %ecx - movl 56(%esp), %edx - lea -16383(%edx,%ebx), %ebx - cmpl %ebx, %ecx - jl ..B1.92 -..B1.91: - movl 148(%esp), %edx - movl %edx, 176(%esp) - movl 152(%esp), %ecx - movl 156(%esp), %ebx - movl 160(%esp), %esi - movl 164(%esp), %edi - movl 168(%esp), %edx - movl %ecx, 180(%esp) - movl %ebx, 184(%esp) - movl %esi, 188(%esp) - movl %edi, 192(%esp) - movl %edx, 196(%esp) - movl %eax, 200(%esp) - jmp ..B1.93 -..B1.92: - movl 44(%ebp), %eax - movl (%eax), %edx - movl %edx, 176(%esp) - movl 4(%eax), %ecx - movl 8(%eax), %ebx - movl 12(%eax), %esi - movl 16(%eax), %edi - movl 20(%eax), %edx - movl 24(%eax), %eax - movl %ecx, 180(%esp) - movl %ebx, 184(%esp) - movl %esi, 188(%esp) - movl %edi, 192(%esp) - movl %edx, 196(%esp) - movl %eax, 200(%esp) -..B1.93: - movzwl 184(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.97 -..B1.94: - cmpl $24383, %eax - jg ..B1.97 -..B1.95: - movzwl 100(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.97 -..B1.96: - cmpl $24383, %eax - jle ..B1.99 -..B1.97: - addl $4, %esp - lea 172(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.98: - addl $4, %esp - lea 88(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.99: - fldt 176(%esp) - movl 76(%esp), %edx - fld %st(0) - fld %st(1) - fldt 92(%esp) - fld %st(0) - fldt .L_2il0floatpacket.12@GOTOFF(%edx) - fld %st(0) - fmul %st(6), %st - movl 36(%ebp), %esi - fsubr %st, %st(5) - movzwl 8(%esi), %edi - movl %edi, %ecx - movl 200(%esp), %eax - andl $32767, %ecx - addl 116(%esp), %eax - faddp %st, %st(5) - fld %st(4) - fld %st(3) - fxch %st(2) - fstpt 48(%esp) - fldt 48(%esp) - cmpl $8383, %ecx - fmul %st(4), %st - movl 28(%ebp), %ebx - fsubr %st, %st(3) - movl %eax, 228(%esp) - faddp %st, %st(3) - fmul %st(2), %st - fxch %st(4) - fsub %st(5), %st - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 104(%esp) - fmulp %st, %st(4) - fldt 188(%esp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 204(%esp) - fldt 204(%esp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 216(%esp) - fstpt 64(%esp) - jl ..B1.103 -..B1.100: - cmpl $24383, %ecx - jg ..B1.103 -..B1.101: - movzwl 8(%ebx), %edx - movl %edx, 60(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.103 -..B1.102: - cmpl $24383, %edx - jle ..B1.106 -..B1.103: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B1.104: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B1.105: - movzwl 8(%esi), %edi - movl %edi, %ecx - movzwl 8(%ebx), %edx - andl $32767, %ecx - movl %edx, 60(%esp) - andl $32767, %edx -..B1.106: - movl 24(%ebx), %eax - movl 24(%esi), %esi - movl %eax, 88(%esp) - movl %esi, 84(%esp) - lea -134(%eax,%edx), %eax - addl %ecx, %esi - movl %esi, 80(%esp) - cmpl %eax, %esi - movl 36(%ebp), %esi - jle ..B1.123 -..B1.107: - movl 4(%esi), %eax - movl %eax, 44(%esp) - movl 88(%esp), %eax - lea 134(%eax,%edx), %eax - cmpl 80(%esp), %eax - jle ..B1.124 -..B1.108: - cmpl $0, 44(%esp) - jne ..B1.110 -..B1.109: - cmpl $0, (%esi) - je ..B1.125 -..B1.110: - cmpl $0, 4(%ebx) - jne ..B1.112 -..B1.111: - cmpl $0, (%ebx) - je ..B1.124 -..B1.112: - movl 88(%esp), %eax - cmpl 84(%esp), %eax - je ..B1.114 -..B1.113: - fldt 64(%esp) - movl 84(%esp), %edi - movl %eax, %edx - subl %edx, %edi - fstpt 32(%esp) - addl $16383, %edi - fldt (%esi) - andl $32767, %edi - fldt 12(%esi) - andb $127, 41(%esp) - movzwl 40(%esp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 24(%esi) - fxch %st(2) - fstpt (%esi) - fldt (%esi) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%esi) - fldt 12(%esi) - movl 24(%ebx), %ecx - movzwl 8(%ebx), %eax - movl %ecx, 88(%esp) - movzwl 8(%esi), %edi - movl %eax, 60(%esp) - jmp ..B1.115 -..B1.114: - fldt (%esi) - fldt 12(%esi) -..B1.115: - fldt (%ebx) - andl $32767, %edi - movl 60(%esp), %edx - fld %st(2) - andl $32767, %edx - fadd %st(1), %st - movl 88(%esp), %eax - cmpl %edx, %edi - movl %eax, 256(%esp) - jg ..B1.120 -..B1.116: - jne ..B1.121 -..B1.117: - movl 4(%esi), %eax - cmpl 4(%ebx), %eax - ja ..B1.120 -..B1.118: - jne ..B1.121 -..B1.119: - movl (%esi), %eax - cmpl (%ebx), %eax - jbe ..B1.121 -..B1.120: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 12(%ebx) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.122 -..B1.121: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 12(%ebx) - faddp %st, %st(1) -..B1.122: - fld %st(0) - fadd %st(2), %st - fstpt 232(%esp) - fldt 232(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 244(%esp) - jmp ..B1.129 -..B1.123: - movl 4(%esi), %eax - movl %eax, 44(%esp) -..B1.124: - cmpl $0, 44(%esp) - jne ..B1.126 -..B1.227: - cmpl $0, (%esi) -..B1.125: - je ..B1.127 -..B1.126: - movl 88(%esp), %eax - lea -16517(%eax,%edx), %edi - movl 84(%esp), %edx - lea -16383(%edx,%ecx), %ecx - cmpl %ecx, %edi - jl ..B1.128 -..B1.127: - movl (%ebx), %eax - movl %eax, 232(%esp) - movl 4(%ebx), %edx - movl 8(%ebx), %ecx - movl 12(%ebx), %esi - movl 16(%ebx), %edi - movl 20(%ebx), %eax - movl 24(%ebx), %ebx - movl %edx, 236(%esp) - movl %ecx, 240(%esp) - movl %esi, 244(%esp) - movl %edi, 248(%esp) - movl %eax, 252(%esp) - movl %ebx, 256(%esp) - jmp ..B1.129 -..B1.128: - movl (%esi), %eax - movl %eax, 232(%esp) - movl 4(%esi), %edx - movl 8(%esi), %ecx - movl 12(%esi), %ebx - movl 16(%esi), %edi - movl 20(%esi), %eax - movl 24(%esi), %esi - movl %edx, 236(%esp) - movl %ecx, 240(%esp) - movl %ebx, 244(%esp) - movl %edi, 248(%esp) - movl %eax, 252(%esp) - movl %esi, 256(%esp) -..B1.129: - movzwl 240(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.133 -..B1.130: - cmpl $24383, %eax - jg ..B1.133 -..B1.131: - movzwl 128(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.133 -..B1.132: - cmpl $24383, %eax - jle ..B1.135 -..B1.133: - addl $4, %esp - lea 228(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.134: - addl $4, %esp - lea 116(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.135: - fldt 232(%esp) - fld %st(0) - fld %st(1) - fldt 48(%esp) - fld %st(0) - fmul %st(4), %st - movl 256(%esp), %edx - fsubr %st, %st(3) - movzwl 212(%esp), %eax - faddp %st, %st(3) - fld %st(2) - andl $32767, %eax - addl 144(%esp), %edx - fxch %st(2) - fsub %st(3), %st - fldt 120(%esp) - cmpl $8383, %eax - fmul %st, %st(2) - fld %st(0) - movl %edx, 284(%esp) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 132(%esp) - fmulp %st, %st(4) - fldt 244(%esp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 260(%esp) - fldt 260(%esp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 272(%esp) - fldt 272(%esp) - jl ..B1.139 -..B1.136: - cmpl $24383, %eax - jg ..B1.139 -..B1.137: - movzwl 268(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.139 -..B1.138: - cmpl $24383, %eax - jle ..B1.142 -..B1.139: - fstp %st(1) - fstp %st(0) - addl $4, %esp - lea 200(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.140: - addl $4, %esp - lea 256(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.141: - fldt 260(%esp) - fldt 272(%esp) - movl 284(%esp), %edx -..B1.142: - fldt 204(%esp) - fld %st(2) - fdivr %st(1), %st - fmul %st, %st(2) - fld %st(3) - fxch %st(4) - fstpt 80(%esp) - fldt 80(%esp) - fldt 48(%esp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - movl 228(%esp), %eax - fsubr %st(4), %st - subl %edx, %eax - faddp %st, %st(1) - fld %st(0) - decl %eax - movl %eax, 312(%esp) - fsubr %st(4), %st - fxch %st(2) - fmul %st(3), %st - fsubr %st, %st(7) - faddp %st, %st(7) - fxch %st(2) - fsub %st(6), %st - fld %st(2) - fmul %st(7), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(1) - fmul %st, %st(3) - fxch %st(7) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(6) - faddp %st, %st(5) - fsubrp %st, %st(2) - fxch %st(3) - fsubrp %st, %st(1) - fldt 216(%esp) - faddp %st, %st(1) - fsubp %st, %st(1) - fldt 80(%esp) - fdivrp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 288(%esp) - fldt 288(%esp) - fsubrp %st, %st(2) - movzwl 296(%esp), %esi - movl %esi, %ebx - andl $32767, %ebx - fadd %st, %st(1) - fxch %st(1) - fstpt 300(%esp) - cmpl $8383, %ebx - fstpt 64(%esp) - jl ..B1.146 -..B1.143: - cmpl $24383, %ebx - jg ..B1.146 -..B1.144: - movzwl 156(%esp), %ecx - movl %ecx, 60(%esp) - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B1.146 -..B1.145: - cmpl $24383, %ecx - jle ..B1.149 -..B1.146: - addl $4, %esp - lea 284(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.147: - addl $4, %esp - lea 144(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.148: - movzwl 296(%esp), %esi - movl %esi, %ebx - movzwl 156(%esp), %ecx - andl $32767, %ebx - movl 312(%esp), %eax - movl %ecx, 60(%esp) - andl $32767, %ecx -..B1.149: - movl 172(%esp), %edi - lea (%eax,%ebx), %edx - movl %edi, 84(%esp) - movl %edx, 80(%esp) - lea -134(%edi,%ecx), %edi - cmpl %edi, %edx - jle ..B1.166 -..B1.150: - movl 84(%esp), %edi - movl 292(%esp), %edx - movl %edx, 44(%esp) - lea 134(%edi,%ecx), %edx - cmpl 80(%esp), %edx - jle ..B1.167 -..B1.151: - cmpl $0, 44(%esp) - jne ..B1.153 -..B1.152: - cmpl $0, 288(%esp) - je ..B1.168 -..B1.153: - cmpl $0, 152(%esp) - jne ..B1.155 -..B1.154: - cmpl $0, 148(%esp) - je ..B1.167 -..B1.155: - cmpl 84(%esp), %eax - je ..B1.157 -..B1.156: - fldt 64(%esp) - movl %edi, %ecx - subl %ecx, %eax - fstpt 32(%esp) - addl $16383, %eax - fldt 288(%esp) - andl $32767, %eax - fldt 300(%esp) - andb $127, 41(%esp) - movzwl 40(%esp), %edx - andl $-32768, %edx - orl %eax, %edx - movl %ecx, %eax - movw %dx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 288(%esp) - fldt 288(%esp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 296(%esp), %esi - movl %esi, %ebx - andl $32767, %ebx - movl %ecx, 312(%esp) - movl %ebx, %ecx - fstpt 300(%esp) - fldt 300(%esp) - jmp ..B1.158 -..B1.157: - fldt 288(%esp) - movl %esi, %ecx - fldt 300(%esp) - andl $32767, %ecx -..B1.158: - fldt 148(%esp) - fld %st(2) - movl 60(%esp), %edi - fadd %st(1), %st - andl $32767, %edi - movl 84(%esp), %edx - cmpl %edi, %ecx - movl %edx, 340(%esp) - jg ..B1.163 -..B1.159: - movl 60(%esp), %edx - andl $32767, %esi - andl $32767, %edx - cmpl %edx, %esi - jne ..B1.164 -..B1.160: - movl 292(%esp), %edx - cmpl 152(%esp), %edx - ja ..B1.163 -..B1.161: - jne ..B1.164 -..B1.162: - movl 288(%esp), %edx - cmpl 148(%esp), %edx - jbe ..B1.164 -..B1.163: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 160(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.165 -..B1.164: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 160(%esp) - faddp %st, %st(1) -..B1.165: - fld %st(0) - fadd %st(2), %st - fstpt 316(%esp) - fldt 316(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 328(%esp) - jmp ..B1.172 -..B1.166: - movl 292(%esp), %edx - movl %edx, 44(%esp) -..B1.167: - cmpl $0, 44(%esp) - jne ..B1.169 -..B1.229: - cmpl $0, 288(%esp) -..B1.168: - je ..B1.170 -..B1.169: - movl 84(%esp), %edx - lea -16383(%eax,%ebx), %esi - lea -16517(%edx,%ecx), %ecx - cmpl %esi, %ecx - jl ..B1.171 -..B1.170: - movl 148(%esp), %edx - movl 152(%esp), %ecx - movl 156(%esp), %esi - movl %edx, 316(%esp) - movl %ecx, 320(%esp) - movl %esi, 324(%esp) - movl 160(%esp), %edi - movl 164(%esp), %edx - movl 168(%esp), %ecx - movl 84(%esp), %esi - movl %edi, 328(%esp) - movl %edx, 332(%esp) - movl %ecx, 336(%esp) - movl %esi, 340(%esp) - jmp ..B1.172 -..B1.171: - movl 288(%esp), %edx - movl 44(%esp), %ecx - movl 296(%esp), %esi - movl %edx, 316(%esp) - movl %ecx, 320(%esp) - movl %esi, 324(%esp) - movl 300(%esp), %edi - movl 304(%esp), %edx - movl 308(%esp), %ecx - movl 312(%esp), %esi - movl %edi, 328(%esp) - movl %edx, 332(%esp) - movl %ecx, 336(%esp) - movl %esi, 340(%esp) -..B1.172: - cmpl $8383, %ebx - jl ..B1.176 -..B1.173: - cmpl $24383, %ebx - jg ..B1.176 -..B1.174: - movzwl 324(%esp), %edx - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.176 -..B1.175: - cmpl $24383, %edx - jle ..B1.179 -..B1.176: - addl $4, %esp - lea 284(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.177: - addl $4, %esp - lea 312(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.178: - movl 312(%esp), %eax -..B1.179: - fldt 288(%esp) - fld %st(0) - fld %st(1) - fldt 48(%esp) - fld %st(0) - fmul %st(4), %st - addl 340(%esp), %eax - fsubr %st, %st(3) - movl %eax, 368(%esp) - faddp %st, %st(3) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fldt 316(%esp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 328(%esp) - fmulp %st, %st(4) - fldt 300(%esp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 344(%esp) - fldt 344(%esp) - fsubr %st, %st(1) - movzwl 352(%esp), %edx - fxch %st(1) - faddp %st, %st(2) - andl $32767, %edx - fxch %st(1) - fstpt 356(%esp) - fldt 356(%esp) - cmpl $383, %edx - fxch %st(1) - fstpt 64(%esp) - jl ..B1.181 -..B1.180: - cmpl $32383, %edx - jle ..B1.183 -..B1.181: - fstp %st(0) - addl $4, %esp - lea 340(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.182: - fldt 344(%esp) - fstpt 64(%esp) - fldt 356(%esp) - movl 368(%esp), %eax -..B1.183: - testb $1, %al - jne ..B1.220 -..B1.184: - movl 76(%esp), %edx - fldt .L_2il0floatpacket.13@GOTOFF(%edx) -..B1.185: - fldt 64(%esp) - fld %st(0) - fsqrt - fldt 48(%esp) - fmul %st(1), %st - fld %st(0) - movzwl 296(%esp), %ebx - movl %ebx, %esi - andl $32767, %esi - fsubr %st(2), %st - sarl $1, %eax - faddp %st, %st(1) - fld %st(0) - cmpl $8383, %esi - movl %eax, 396(%esp) - fsubr %st(2), %st - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fmulp %st, %st(1) - fdiv %st(1), %st - fld %st(0) - fadd %st(2), %st - fstpt 372(%esp) - fldt 372(%esp) - fsubrp %st, %st(2) - fadd %st, %st(1) - fxch %st(1) - fstpt 384(%esp) - fstpt 64(%esp) - jl ..B1.189 -..B1.186: - cmpl $24383, %esi - jg ..B1.189 -..B1.187: - movzwl 380(%esp), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B1.189 -..B1.188: - cmpl $24383, %ecx - jle ..B1.192 -..B1.189: - addl $4, %esp - lea 284(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.190: - addl $4, %esp - lea 368(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.191: - movzwl 296(%esp), %ebx - movl %ebx, %esi - movzwl 380(%esp), %ecx - andl $32767, %esi - movl 396(%esp), %eax - movl %ecx, 44(%esp) - andl $32767, %ecx -..B1.192: - movl 312(%esp), %edx - movl %edx, 52(%esp) - lea (%esi,%edx), %edi - movl %edi, 48(%esp) - lea -134(%eax,%ecx), %edx - cmpl %edx, %edi - jle ..B1.209 -..B1.193: - movl 292(%esp), %edx - lea 134(%eax,%ecx), %edi - cmpl 48(%esp), %edi - jle ..B1.210 -..B1.194: - testl %edx, %edx - jne ..B1.196 -..B1.195: - cmpl $0, 288(%esp) - je ..B1.211 -..B1.196: - cmpl $0, 376(%esp) - jne ..B1.198 -..B1.197: - cmpl $0, 372(%esp) - je ..B1.210 -..B1.198: - cmpl 52(%esp), %eax - je ..B1.200 -..B1.199: - fldt 64(%esp) - movl 52(%esp), %edx - fstpt 32(%esp) - subl %eax, %edx - fldt 288(%esp) - addl $16383, %edx - fldt 300(%esp) - andl $32767, %edx - andb $127, 41(%esp) - movzwl 40(%esp), %ecx - andl $-32768, %ecx - orl %edx, %ecx - movw %cx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 288(%esp) - fldt 288(%esp) - fxch %st(2) - fmulp %st, %st(1) - movl %eax, 312(%esp) - fstpt 300(%esp) - fldt 300(%esp) - movzwl 296(%esp), %ebx - jmp ..B1.201 -..B1.200: - fldt 288(%esp) - fldt 300(%esp) -..B1.201: - fldt 372(%esp) - fld %st(2) - movl %eax, 424(%esp) - movl %ebx, %eax - movl 44(%esp), %edx - andl $32767, %eax - andl $32767, %edx - fadd %st(1), %st - cmpl %edx, %eax - jg ..B1.206 -..B1.202: - movl 44(%esp), %eax - andl $32767, %ebx - andl $32767, %eax - cmpl %eax, %ebx - jne ..B1.207 -..B1.203: - movl 292(%esp), %eax - cmpl 376(%esp), %eax - ja ..B1.206 -..B1.204: - jne ..B1.207 -..B1.205: - movl 288(%esp), %eax - cmpl 372(%esp), %eax - jbe ..B1.207 -..B1.206: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 384(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - jmp ..B1.208 -..B1.207: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 384(%esp) - faddp %st, %st(1) - fstpt 32(%esp) - fldt 32(%esp) -..B1.208: - fld %st(0) - fadd %st(2), %st - fstpt 400(%esp) - fldt 400(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 412(%esp) - jmp ..B1.215 -..B1.209: - movl 292(%esp), %edx -..B1.210: - testl %edx, %edx - jne ..B1.212 -..B1.228: - cmpl $0, 288(%esp) -..B1.211: - je ..B1.213 -..B1.212: - lea -16517(%eax,%ecx), %ecx - movl 52(%esp), %eax - lea -16383(%eax,%esi), %ebx - cmpl %ebx, %ecx - jl ..B1.214 -..B1.213: - movl 372(%esp), %eax - movl %eax, 400(%esp) - movl 376(%esp), %edx - movl 380(%esp), %ecx - movl 384(%esp), %ebx - movl 388(%esp), %esi - movl 392(%esp), %edi - movl 396(%esp), %eax - movl %edx, 404(%esp) - movl %ecx, 408(%esp) - movl %ebx, 412(%esp) - movl %esi, 416(%esp) - movl %edi, 420(%esp) - movl %eax, 424(%esp) - jmp ..B1.215 -..B1.214: - movl %edx, 404(%esp) - movl 288(%esp), %eax - movl 296(%esp), %edx - movl 300(%esp), %ecx - movl 304(%esp), %ebx - movl 308(%esp), %esi - movl 52(%esp), %edi - movl %eax, 400(%esp) - movl %edx, 408(%esp) - movl %ecx, 412(%esp) - movl %ebx, 416(%esp) - movl %esi, 420(%esp) - movl %edi, 424(%esp) -..B1.215: - addl $8, %esp - lea 392(%esp), %eax - lea 24(%esp), %edx - pushl %eax - pushl %edx - call __libm_log1p_k80 -..B1.216: - fldt 32(%esp) - movl 56(%esp), %eax - fstpt (%esp) - fldt 44(%esp) - fstpt 12(%esp) - movl %eax, 24(%esp) - call __libm_scalbl_k80 -..B1.217: - movl 428(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.219 -..B1.218: - addl $436, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.219: - fstp %st(0) - movl 76(%esp), %ebx - call __stack_chk_fail@PLT -..B1.220: - fldt 64(%esp) - incl %eax - movl 76(%esp), %edx - movl %eax, 368(%esp) - fldt .L_2il0floatpacket.13@GOTOFF(%edx) - fmul %st, %st(1) - fxch %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fstpt 356(%esp) - fldt 356(%esp) - fxch %st(1) - fstpt 344(%esp) - fxch %st(1) - jmp ..B1.185 - .align 16,0x90 - .type __libm_recacoshl_k80,@function - .size __libm_recacoshl_k80,.-__libm_recacoshl_k80 - .data -# -- End __libm_recacoshl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.12: - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0x40,0x00,0x00 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,12 - .data - .hidden __libm_log1p_k80 - .hidden __libm_normalizel_k80 - .hidden __libm_scalbl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_recacosl_recasinl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_recacosl_recasinl_k80.S deleted file mode 100644 index d833921901..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_recacosl_recasinl_k80.S +++ /dev/null @@ -1,6111 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_recacosl_recasinl_k80.c" - .text -..TXTST0: -# -- Begin __libm_carctrigprepare_k80 - .text - .align 16,0x90 - .hidden __libm_carctrigprepare_k80 - .globl __libm_carctrigprepare_k80 -__libm_carctrigprepare_k80: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -# parameter 4: 20 + %ebp -# parameter 5: 24 + %ebp -# parameter 6: 28 + %ebp -# parameter 7: 32 + %ebp -# parameter 8: 36 + %ebp -# parameter 9: 40 + %ebp -# parameter 10: 44 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $212, %esp - xorl %ecx, %ecx - movl 8(%ebp), %esi - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - movl 16(%ebp), %ebx - movl %edx, 60(%esp) - fldt _CONSTANTS@GOTOFF(%edx) - fldt 24+_CONSTANTS@GOTOFF(%edx) - movl (%esi), %edi - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 200(%esp) - movl %edi, (%ebx) - movl 4(%esi), %eax - movl %eax, 4(%ebx) - movl 8(%esi), %edx - movl %edx, 8(%ebx) - shrl $8, %edx - movl %ecx, 112(%esp) - fstpt 16(%esp) - fldt 16(%esp) - fxch %st(1) - fstpt 88(%esp) - fstpt 100(%esp) - fldt 100(%esp) - addl $4, %esp - movzbl %dl, %edx - pushl %ebx - andl $127, %edx - movl %ecx, 24(%ebx) - movb %dl, 9(%ebx) - fstpt 12(%ebx) - call __libm_normalizel_k80 -..B1.2: - movl 12(%ebp), %edx - addl $4, %esp - movl 20(%ebp), %esi - pushl %esi - fldt 16(%esp) - movl (%edx), %edi - movl %edi, (%esi) - movl 4(%edx), %eax - movl %eax, 4(%esi) - movl 8(%edx), %ecx - movl %ecx, 8(%esi) - shrl $8, %ecx - movzbl %cl, %ecx - andl $127, %ecx - movl $0, 24(%esi) - movb %cl, 9(%esi) - fstpt 12(%esi) - call __libm_normalizel_k80 -..B1.3: - fldt (%esi) - movl 60(%esp), %edx - fld %st(0) - fld %st(1) - fld %st(2) - fldt 12(%esi) - fmulp %st, %st(4) - movl 32(%ebp), %ecx - fxch %st(3) - fadd %st(0), %st - fldt 36+_CONSTANTS@GOTOFF(%edx) - fmul %st, %st(3) - movl 24(%esi), %eax - fxch %st(2) - fsub %st(3), %st - addl %eax, %eax - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(4) - fmul %st(4), %st - movl %eax, 24(%ecx) - fadd %st(0), %st - fxch %st(4) - fmul %st(0), %st - fxch %st(2) - fstpt 32(%esp) - fld %st(3) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt (%ecx) - fldt (%ecx) - fsubrp %st, %st(1) - movzwl 8(%ebx), %eax - fadd %st(1), %st - movl %eax, 68(%esp) - andl $32767, %eax - fstpt 12(%ecx) - cmpl $8383, %eax - fstpt 48(%esp) - jl ..B1.7 -..B1.4: - cmpl $24383, %eax - jg ..B1.7 -..B1.5: - movzwl 96(%esp), %edx - movl %edx, 44(%esp) - andl $32767, %edx - movl %edx, 28(%esp) - cmpl $8383, %edx - jl ..B1.7 -..B1.6: - cmpl $24383, 28(%esp) - jle ..B1.10 -..B1.7: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B1.8: - addl $4, %esp - lea 84(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.9: - movzwl 96(%esp), %edx - movzwl 8(%ebx), %eax - movl %edx, 44(%esp) - andl $32767, %edx - movl %eax, 68(%esp) - andl $32767, %eax - movl %edx, 28(%esp) -..B1.10: - movl 24(%ebx), %ecx - movl 112(%esp), %esi - movl %ecx, 64(%esp) - lea (%eax,%ecx), %edi - movl %edi, 20(%esp) - lea (%edx,%esi), %ecx - lea -134(%esi,%edx), %edx - cmpl %edi, %edx - jge ..B1.27 -..B1.11: - movl 4(%ebx), %edi - movl %edi, 16(%esp) - movl 28(%esp), %edi - lea 134(%esi,%edi), %edi - cmpl 20(%esp), %edi - jle ..B1.28 -..B1.12: - cmpl $0, 16(%esp) - jne ..B1.14 -..B1.13: - cmpl $0, (%ebx) - je ..B1.29 -..B1.14: - cmpl $0, 92(%esp) - jne ..B1.16 -..B1.15: - cmpl $0, 88(%esp) - je ..B1.28 -..B1.16: - cmpl 64(%esp), %esi - je ..B1.18 -..B1.17: - fldt 48(%esp) - movl 64(%esp), %eax - fstpt 16(%esp) - subl %esi, %eax - fldt (%ebx) - addl $16383, %eax - fldt 12(%ebx) - andl $32767, %eax - andb $127, 25(%esp) - movzwl 24(%esp), %edi - andl $-32768, %edi - orl %eax, %edi - movw %di, 24(%esp) - movl $-2147483648, 20(%esp) - movl $0, 16(%esp) - fldt 16(%esp) - fmul %st, %st(2) - movl %esi, 24(%ebx) - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%ebx) - movzwl 8(%ebx), %eax - fstpt 48(%esp) - movl %eax, 68(%esp) - jmp ..B1.19 -..B1.18: - fldt (%ebx) - fstpt 48(%esp) -..B1.19: - fldt 88(%esp) - fldt 48(%esp) - movl 28(%ebp), %eax - movl 68(%esp), %edi - fadd %st(1), %st - movl %esi, 24(%eax) - andl $32767, %edi - fstpt 12(%eax) - fldt 12(%eax) - movl 44(%esp), %eax - andl $32767, %eax - movl %edi, 68(%esp) - cmpl %eax, %edi - jg ..B1.24 -..B1.20: - movl 44(%esp), %eax - andl $32767, %eax - cmpl 68(%esp), %eax - jne ..B1.25 -..B1.21: - movl 4(%ebx), %eax - cmpl 92(%esp), %eax - ja ..B1.24 -..B1.22: - jne ..B1.25 -..B1.23: - movl (%ebx), %eax - cmpl 88(%esp), %eax - jbe ..B1.25 -..B1.24: - fldt 48(%esp) - fsub %st(1), %st - faddp %st, %st(2) - fldt 100(%esp) - faddp %st, %st(2) - fldt 12(%ebx) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - jmp ..B1.26 -..B1.25: - fldt 48(%esp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 100(%esp) - fldt 12(%ebx) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) -..B1.26: - fldt 48(%esp) - fld %st(0) - movl 28(%ebp), %eax - fadd %st(2), %st - fstpt (%eax) - fldt (%eax) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%eax) - jmp ..B1.33 -..B1.27: - movl 4(%ebx), %edi - movl %edi, 16(%esp) -..B1.28: - cmpl $0, 16(%esp) - jne ..B1.30 -..B1.210: - cmpl $0, (%ebx) -..B1.29: - je ..B1.31 -..B1.30: - movl 28(%esp), %edi - lea -16517(%esi,%edi), %ebx - movl 64(%esp), %edi - lea -16383(%edi,%eax), %eax - cmpl %eax, %ebx - movl 16(%ebp), %ebx - jl ..B1.32 -..B1.31: - movl 28(%ebp), %eax - movl 88(%esp), %edi - movl %edi, (%eax) - movl 92(%esp), %edi - movl %edi, 4(%eax) - movl 96(%esp), %edi - movl %edi, 8(%eax) - movl 100(%esp), %edi - movl %edi, 12(%eax) - movl 104(%esp), %edi - movl %edi, 16(%eax) - movl 108(%esp), %edi - movl %edi, 20(%eax) - movl %esi, 24(%eax) - jmp ..B1.33 -..B1.32: - movl 28(%ebp), %eax - movl (%ebx), %edi - movl %edi, (%eax) - movl 4(%ebx), %edi - movl %edi, 4(%eax) - movl 8(%ebx), %edi - movl %edi, 8(%eax) - movl 12(%ebx), %edi - movl %edi, 12(%eax) - movl 16(%ebx), %edi - movl %edi, 16(%eax) - movl 20(%ebx), %edi - movl %edi, 20(%eax) - movl 24(%ebx), %edi - movl %edi, 24(%eax) -..B1.33: - movzwl 8(%ebx), %eax - movl %eax, 64(%esp) - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.37 -..B1.34: - cmpl $24383, %eax - jg ..B1.37 -..B1.35: - cmpl $8383, 28(%esp) - jl ..B1.37 -..B1.36: - cmpl $24383, 28(%esp) - jle ..B1.40 -..B1.37: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B1.38: - addl $4, %esp - lea 84(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.39: - movzwl 96(%esp), %edx - movl %edx, 44(%esp) - andl $32767, %edx - movl 112(%esp), %esi - movzwl 8(%ebx), %eax - movl %eax, 64(%esp) - andl $32767, %eax - lea (%esi,%edx), %ecx - lea -134(%esi,%edx), %edx -..B1.40: - movl 24(%ebx), %edi - movl %edi, 72(%esp) - addl %eax, %edi - movl %edi, 68(%esp) - cmpl %edi, %edx - jge ..B1.57 -..B1.41: - movl 4(%ebx), %edx - lea 134(%ecx), %edi - movl %edx, 28(%esp) - cmpl 68(%esp), %edi - jle ..B1.58 -..B1.42: - cmpl $0, 28(%esp) - jne ..B1.44 -..B1.43: - cmpl $0, (%ebx) - je ..B1.59 -..B1.44: - cmpl $0, 92(%esp) - jne ..B1.46 -..B1.45: - cmpl $0, 88(%esp) - je ..B1.58 -..B1.46: - cmpl 72(%esp), %esi - je ..B1.48 -..B1.47: - fldt 48(%esp) - movl 72(%esp), %eax - fstpt 16(%esp) - subl %esi, %eax - fldt (%ebx) - addl $16383, %eax - fldt 12(%ebx) - andl $32767, %eax - andb $127, 25(%esp) - movzwl 24(%esp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 24(%esp) - movl $-2147483648, 20(%esp) - movl $0, 16(%esp) - fldt 16(%esp) - fmul %st, %st(2) - movl %esi, 24(%ebx) - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%ebx) - movzwl 8(%ebx), %ecx - movl %ecx, 64(%esp) - jmp ..B1.49 -..B1.48: - fldt (%ebx) -..B1.49: - fldt 88(%esp) - fld %st(1) - movl 28(%ebp), %eax - fadd %st(1), %st - movl 64(%esp), %edx - movl 44(%esp), %ecx - andl $32767, %edx - andl $32767, %ecx - movl %esi, 24(%eax) - cmpl %ecx, %edx - fstpt 12(%eax) - fldt 12(%eax) - movl %edx, 64(%esp) - jg ..B1.54 -..B1.50: - movl 44(%esp), %eax - andl $32767, %eax - cmpl 64(%esp), %eax - jne ..B1.55 -..B1.51: - movl 4(%ebx), %eax - cmpl 92(%esp), %eax - ja ..B1.54 -..B1.52: - jne ..B1.55 -..B1.53: - movl (%ebx), %eax - cmpl 88(%esp), %eax - jbe ..B1.55 -..B1.54: - fldt 100(%esp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 12(%ebx) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.56 -..B1.55: - fldt 12(%ebx) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 100(%esp) - faddp %st, %st(1) -..B1.56: - fld %st(0) - movl 28(%ebp), %eax - fadd %st(2), %st - fstpt (%eax) - fldt (%eax) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%eax) - jmp ..B1.63 -..B1.57: - movl 4(%ebx), %edx - movl %edx, 28(%esp) -..B1.58: - cmpl $0, 28(%esp) - jne ..B1.60 -..B1.209: - cmpl $0, (%ebx) -..B1.59: - je ..B1.61 -..B1.60: - movl 72(%esp), %edx - addl $-16517, %ecx - lea -16383(%edx,%eax), %eax - cmpl %eax, %ecx - jl ..B1.62 -..B1.61: - movl 28(%ebp), %eax - movl 88(%esp), %edx - movl 92(%esp), %ecx - movl 96(%esp), %edi - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl %edi, 8(%eax) - movl 100(%esp), %edx - movl 104(%esp), %ecx - movl 108(%esp), %edi - movl %edx, 12(%eax) - movl %ecx, 16(%eax) - movl %edi, 20(%eax) - movl %esi, 24(%eax) - jmp ..B1.63 -..B1.62: - movl 28(%ebp), %eax - movl (%ebx), %edx - movl %edx, (%eax) - movl 4(%ebx), %ecx - movl %ecx, 4(%eax) - movl 8(%ebx), %esi - movl %esi, 8(%eax) - movl 12(%ebx), %edi - movl %edi, 12(%eax) - movl 16(%ebx), %edx - movl %edx, 16(%eax) - movl 20(%ebx), %ecx - movl %ecx, 20(%eax) - movl 24(%ebx), %esi - movl %esi, 24(%eax) -..B1.63: - movl 28(%ebp), %eax - movzwl 8(%eax), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.65 -..B1.64: - cmpl $24383, %eax - jle ..B1.67 -..B1.65: - addl $4, %esp - pushl 28(%ebp) - call __libm_normalizel_k80 -..B1.66: - addl $4, %esp - pushl 28(%ebp) - call __libm_normalizel_k80 -..B1.67: - fldt 32(%esp) - movl 28(%ebp), %eax - fldt (%eax) - fmul %st, %st(1) - fld %st(0) - movl 24(%eax), %edi - fsub %st(2), %st - addl %edi, %edi - faddp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fld %st(1) - fsub %st(3), %st - fmul %st, %st(3) - movl %edi, 140(%esp) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsub %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(1) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(3) - fldt 12(%eax) - fmulp %st, %st(2) - fxch %st(1) - fadd %st(0), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 116(%esp) - fldt 116(%esp) - fsubrp %st, %st(1) - movzwl 124(%esp), %ecx - movl %ecx, %esi - andl $32767, %esi - fadd %st(1), %st - fstpt 128(%esp) - cmpl $8383, %esi - fstpt 48(%esp) - jl ..B1.71 -..B1.68: - cmpl $24383, %esi - jg ..B1.71 -..B1.69: - movl 32(%ebp), %eax - movzwl 8(%eax), %edx - movl %edx, 44(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.71 -..B1.70: - cmpl $24383, %edx - jle ..B1.74 -..B1.71: - addl $4, %esp - lea 112(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.72: - addl $4, %esp - pushl 32(%ebp) - call __libm_normalizel_k80 -..B1.73: - movl 32(%ebp), %eax - movzwl 124(%esp), %ecx - movl %ecx, %esi - movl 140(%esp), %edi - andl $32767, %esi - movzwl 8(%eax), %edx - movl %edx, 44(%esp) - andl $32767, %edx -..B1.74: - movl 32(%ebp), %ebx - lea (%edi,%esi), %eax - movl %eax, 64(%esp) - movl 24(%ebx), %ebx - movl %ebx, 68(%esp) - lea -134(%ebx,%edx), %ebx - cmpl %ebx, %eax - movl 16(%ebp), %ebx - jle ..B1.91 -..B1.75: - movl 120(%esp), %eax - movl %eax, 28(%esp) - movl 68(%esp), %eax - lea 134(%eax,%edx), %eax - cmpl 64(%esp), %eax - jle ..B1.92 -..B1.76: - cmpl $0, 28(%esp) - jne ..B1.78 -..B1.77: - cmpl $0, 116(%esp) - je ..B1.93 -..B1.78: - movl 32(%ebp), %eax - cmpl $0, 4(%eax) - jne ..B1.80 -..B1.79: - movl 32(%ebp), %eax - cmpl $0, (%eax) - je ..B1.92 -..B1.80: - cmpl 68(%esp), %edi - je ..B1.82 -..B1.81: - fldt 48(%esp) - movl 68(%esp), %edx - subl %edx, %edi - fstpt 16(%esp) - addl $16383, %edi - fldt 116(%esp) - andl $32767, %edi - fldt 128(%esp) - andb $127, 25(%esp) - movzwl 24(%esp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 24(%esp) - movl $-2147483648, 20(%esp) - movl $0, 16(%esp) - fldt 16(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 116(%esp) - fldt 116(%esp) - fxch %st(2) - fmulp %st, %st(1) - movl %edx, 140(%esp) - fstpt 128(%esp) - fldt 128(%esp) - movzwl 124(%esp), %ecx - jmp ..B1.83 -..B1.82: - fldt 116(%esp) - fldt 128(%esp) -..B1.83: - movl 32(%ebp), %edx - movl %ecx, %esi - movl 44(%esp), %edi - andl $32767, %esi - andl $32767, %edi - fld %st(1) - fldt (%edx) - cmpl %edi, %esi - movl 68(%esp), %eax - fadd %st, %st(1) - movl %eax, 168(%esp) - movl %edi, 44(%esp) - jg ..B1.88 -..B1.84: - andl $32767, %ecx - cmpl 44(%esp), %ecx - jne ..B1.89 -..B1.85: - movl 32(%ebp), %eax - movl 4(%eax), %edx - cmpl 120(%esp), %edx - jb ..B1.88 -..B1.86: - jne ..B1.89 -..B1.87: - movl 32(%ebp), %edx - movl 116(%esp), %eax - cmpl (%edx), %eax - jbe ..B1.89 -..B1.88: - movl 32(%ebp), %eax - fxch %st(1) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 12(%eax) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - jmp ..B1.90 -..B1.89: - movl 32(%ebp), %eax - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 12(%eax) - faddp %st, %st(2) -..B1.90: - fld %st(1) - fadd %st(1), %st - fstpt 144(%esp) - fldt 144(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 156(%esp) - jmp ..B1.97 -..B1.91: - movl 120(%esp), %eax - movl %eax, 28(%esp) -..B1.92: - cmpl $0, 28(%esp) - jne ..B1.94 -..B1.212: - cmpl $0, 116(%esp) -..B1.93: - je ..B1.95 -..B1.94: - movl 68(%esp), %eax - lea -16383(%edi,%esi), %ecx - lea -16517(%eax,%edx), %edx - cmpl %ecx, %edx - jl ..B1.96 -..B1.95: - movl 32(%ebp), %eax - movl (%eax), %edx - movl 4(%eax), %ecx - movl %edx, 144(%esp) - movl %ecx, 148(%esp) - movl 8(%eax), %esi - movl 12(%eax), %edi - movl 16(%eax), %edx - movl 20(%eax), %ecx - movl 24(%eax), %eax - movl %esi, 152(%esp) - movl %edi, 156(%esp) - movl %edx, 160(%esp) - movl %ecx, 164(%esp) - movl %eax, 168(%esp) - jmp ..B1.97 -..B1.96: - movl 116(%esp), %eax - movl 28(%esp), %edx - movl %eax, 144(%esp) - movl %edx, 148(%esp) - movl 124(%esp), %ecx - movl 128(%esp), %esi - movl 132(%esp), %edi - movl 136(%esp), %eax - movl 140(%esp), %edx - movl %ecx, 152(%esp) - movl %esi, 156(%esp) - movl %edi, 160(%esp) - movl %eax, 164(%esp) - movl %edx, 168(%esp) -..B1.97: - movzwl 152(%esp), %eax - andl $32767, %eax - cmpl $383, %eax - jl ..B1.99 -..B1.98: - cmpl $32383, %eax - jle ..B1.100 -..B1.99: - addl $4, %esp - lea 140(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.100: - movl 168(%esp), %edx - testb $1, %dl - jne ..B1.205 -..B1.101: - fldt 144(%esp) - movl 60(%esp), %eax - fstpt 64(%esp) - fldt 156(%esp) - fldt 48+_CONSTANTS@GOTOFF(%eax) - fstpt 48(%esp) -..B1.102: - fldt 64(%esp) - fld %st(0) - fsqrt - fldt 32(%esp) - movl 36(%ebp), %eax - fmul %st(1), %st - fld %st(0) - sarl $1, %edx - fsubr %st(2), %st - movl %edx, 24(%eax) - faddp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 48(%esp) - fmulp %st, %st(1) - fdiv %st(1), %st - fld %st(0) - fadd %st(2), %st - fstpt (%eax) - fldt (%eax) - fsubrp %st, %st(2) - movzwl 8(%ebx), %ecx - movl %ecx, %esi - andl $32767, %esi - fadd %st, %st(1) - fxch %st(1) - fstpt 12(%eax) - cmpl $8383, %esi - fstpt 64(%esp) - jl ..B1.106 -..B1.103: - cmpl $24383, %esi - jg ..B1.106 -..B1.104: - movzwl 96(%esp), %edx - movl %edx, 44(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.106 -..B1.105: - cmpl $24383, %edx - jle ..B1.109 -..B1.106: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B1.107: - addl $4, %esp - lea 84(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.108: - movzwl 8(%ebx), %ecx - movl %ecx, %esi - movzwl 96(%esp), %edx - andl $32767, %esi - movl %edx, 44(%esp) - andl $32767, %edx -..B1.109: - movl 24(%ebx), %edi - movl %edi, 80(%esp) - lea (%esi,%edi), %eax - movl 112(%esp), %edi - movl %edi, 84(%esp) - movl %eax, 76(%esp) - lea -134(%edi,%edx), %edi - cmpl %edi, %eax - jle ..B1.126 -..B1.110: - movl 84(%esp), %edi - movl 4(%ebx), %eax - movl %eax, 28(%esp) - lea 134(%edi,%edx), %eax - cmpl 76(%esp), %eax - jle ..B1.127 -..B1.111: - cmpl $0, 28(%esp) - jne ..B1.113 -..B1.112: - cmpl $0, (%ebx) - je ..B1.128 -..B1.113: - cmpl $0, 92(%esp) - jne ..B1.115 -..B1.114: - cmpl $0, 88(%esp) - je ..B1.127 -..B1.115: - movl %edi, %eax - cmpl 80(%esp), %eax - je ..B1.117 -..B1.116: - fldt 64(%esp) - movl 80(%esp), %eax - movl %edi, %ecx - subl %ecx, %eax - fstpt 16(%esp) - addl $16383, %eax - fldt (%ebx) - andl $32767, %eax - fldt 12(%ebx) - andb $127, 25(%esp) - movzwl 24(%esp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 24(%esp) - movl $-2147483648, 20(%esp) - movl $0, 16(%esp) - fldt 16(%esp) - fmul %st, %st(2) - movl %ecx, 24(%ebx) - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%ebx) - movzwl 8(%ebx), %ecx - jmp ..B1.118 -..B1.117: - fldt (%ebx) -..B1.118: - fldt 88(%esp) - fld %st(1) - movl 24(%ebp), %edx - andl $32767, %ecx - movl 44(%esp), %esi - fsub %st(1), %st - andl $32767, %esi - movl %edi, %eax - cmpl %esi, %ecx - movl %eax, 24(%edx) - fstpt 12(%edx) - fldt 12(%edx) - jg ..B1.123 -..B1.119: - movl 44(%esp), %eax - andl $32767, %eax - cmpl %eax, %ecx - jne ..B1.124 -..B1.120: - movl 4(%ebx), %eax - cmpl 92(%esp), %eax - ja ..B1.123 -..B1.121: - jne ..B1.124 -..B1.122: - movl (%ebx), %eax - cmpl 88(%esp), %eax - jbe ..B1.124 -..B1.123: - fldt 12(%ebx) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fldt 100(%esp) - fsubrp %st, %st(3) - faddp %st, %st(2) - jmp ..B1.125 -..B1.124: - fldt 100(%esp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fldt 12(%ebx) - faddp %st, %st(3) - fsubrp %st, %st(2) -..B1.125: - fld %st(1) - movl 24(%ebp), %eax - fadd %st(1), %st - fstpt (%eax) - fldt (%eax) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 12(%eax) - jmp ..B1.132 -..B1.126: - movl 4(%ebx), %eax - movl %eax, 28(%esp) -..B1.127: - cmpl $0, 28(%esp) - jne ..B1.129 -..B1.208: - cmpl $0, (%ebx) -..B1.128: - je ..B1.130 -..B1.129: - movl 84(%esp), %eax - lea -16517(%eax,%edx), %ecx - movl 80(%esp), %edx - lea -16383(%edx,%esi), %esi - cmpl %esi, %ecx - jl ..B1.131 -..B1.130: - fldt 88(%esp) - movl 24(%ebp), %edx - fchs - movl 84(%esp), %eax - movl %eax, 24(%edx) - fstpt (%edx) - fldt 100(%esp) - fchs - fstpt 12(%edx) - jmp ..B1.132 -..B1.131: - movl 24(%ebp), %eax - movl (%ebx), %edx - movl %edx, (%eax) - movl 4(%ebx), %ecx - movl %ecx, 4(%eax) - movl 8(%ebx), %esi - movl %esi, 8(%eax) - movl 12(%ebx), %edi - movl %edi, 12(%eax) - movl 16(%ebx), %edx - movl %edx, 16(%eax) - movl 20(%ebx), %ecx - movl %ecx, 20(%eax) - movl 24(%ebx), %ebx - movl %ebx, 24(%eax) -..B1.132: - movl 24(%ebp), %eax - movzwl 8(%eax), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.134 -..B1.133: - cmpl $24383, %eax - jle ..B1.136 -..B1.134: - addl $4, %esp - pushl 24(%ebp) - call __libm_normalizel_k80 -..B1.135: - addl $4, %esp - pushl 24(%ebp) - call __libm_normalizel_k80 -..B1.136: - fldt 32(%esp) - movl 24(%ebp), %eax - fldt (%eax) - fmul %st, %st(1) - fld %st(0) - movl 24(%eax), %esi - fsub %st(2), %st - addl %esi, %esi - faddp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fld %st(1) - fsub %st(3), %st - fmul %st, %st(3) - movl %esi, 140(%esp) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsub %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(1) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(3) - fldt 12(%eax) - fmulp %st, %st(2) - fxch %st(1) - fadd %st(0), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 116(%esp) - fldt 116(%esp) - fsubrp %st, %st(1) - movzwl 124(%esp), %ecx - movl %ecx, %ebx - andl $32767, %ebx - fadd %st(1), %st - fstpt 128(%esp) - cmpl $8383, %ebx - fstpt 64(%esp) - jl ..B1.140 -..B1.137: - cmpl $24383, %ebx - jg ..B1.140 -..B1.138: - movl 32(%ebp), %eax - movzwl 8(%eax), %edx - movl %edx, 44(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.140 -..B1.139: - cmpl $24383, %edx - jle ..B1.143 -..B1.140: - addl $4, %esp - lea 112(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.141: - addl $4, %esp - pushl 32(%ebp) - call __libm_normalizel_k80 -..B1.142: - movl 32(%ebp), %eax - movzwl 124(%esp), %ecx - movl %ecx, %ebx - movl 140(%esp), %esi - andl $32767, %ebx - movzwl 8(%eax), %edx - movl %edx, 44(%esp) - andl $32767, %edx -..B1.143: - movl 32(%ebp), %edi - lea (%esi,%ebx), %eax - movl %eax, 76(%esp) - movl 24(%edi), %edi - movl %edi, 80(%esp) - lea -134(%edi,%edx), %edi - cmpl %edi, %eax - jle ..B1.160 -..B1.144: - movl 80(%esp), %edi - movl 120(%esp), %eax - movl %eax, 28(%esp) - lea 134(%edi,%edx), %eax - cmpl 76(%esp), %eax - jle ..B1.161 -..B1.145: - cmpl $0, 28(%esp) - jne ..B1.147 -..B1.146: - cmpl $0, 116(%esp) - je ..B1.162 -..B1.147: - movl 32(%ebp), %eax - cmpl $0, 4(%eax) - jne ..B1.149 -..B1.148: - movl 32(%ebp), %eax - cmpl $0, (%eax) - je ..B1.161 -..B1.149: - cmpl 80(%esp), %esi - je ..B1.151 -..B1.150: - fldt 64(%esp) - movl %edi, %edx - subl %edx, %esi - fstpt 16(%esp) - addl $16383, %esi - fldt 116(%esp) - andl $32767, %esi - fldt 128(%esp) - andb $127, 25(%esp) - movzwl 24(%esp), %eax - andl $-32768, %eax - orl %esi, %eax - movw %ax, 24(%esp) - movl $-2147483648, 20(%esp) - movl $0, 16(%esp) - fldt 16(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 116(%esp) - fldt 116(%esp) - fxch %st(2) - fmulp %st, %st(1) - movl %edx, 140(%esp) - fstpt 128(%esp) - fldt 128(%esp) - movzwl 124(%esp), %ecx - jmp ..B1.152 -..B1.151: - fldt 116(%esp) - fldt 128(%esp) -..B1.152: - movl 32(%ebp), %edx - movl %ecx, %ebx - movl 44(%esp), %esi - andl $32767, %ebx - andl $32767, %esi - fld %st(1) - fldt (%edx) - cmpl %esi, %ebx - movl %edi, %eax - fadd %st, %st(1) - movl %eax, 196(%esp) - movl %esi, 44(%esp) - jg ..B1.157 -..B1.153: - andl $32767, %ecx - cmpl 44(%esp), %ecx - jne ..B1.158 -..B1.154: - movl 32(%ebp), %eax - movl 4(%eax), %edx - cmpl 120(%esp), %edx - jb ..B1.157 -..B1.155: - jne ..B1.158 -..B1.156: - movl 32(%ebp), %edx - movl 116(%esp), %eax - cmpl (%edx), %eax - jbe ..B1.158 -..B1.157: - movl 32(%ebp), %eax - fxch %st(1) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 12(%eax) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - jmp ..B1.159 -..B1.158: - movl 32(%ebp), %eax - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 12(%eax) - faddp %st, %st(2) -..B1.159: - fld %st(1) - fadd %st(1), %st - fstpt 172(%esp) - fldt 172(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 184(%esp) - jmp ..B1.166 -..B1.160: - movl 120(%esp), %eax - movl %eax, 28(%esp) -..B1.161: - cmpl $0, 28(%esp) - jne ..B1.163 -..B1.211: - cmpl $0, 116(%esp) -..B1.162: - je ..B1.164 -..B1.163: - movl 80(%esp), %eax - lea -16383(%esi,%ebx), %ecx - lea -16517(%eax,%edx), %edx - cmpl %ecx, %edx - jl ..B1.165 -..B1.164: - movl 32(%ebp), %eax - movl (%eax), %edx - movl %edx, 172(%esp) - movl 4(%eax), %ecx - movl 8(%eax), %ebx - movl 12(%eax), %esi - movl 16(%eax), %edi - movl 20(%eax), %edx - movl 24(%eax), %eax - movl %ecx, 176(%esp) - movl %ebx, 180(%esp) - movl %esi, 184(%esp) - movl %edi, 188(%esp) - movl %edx, 192(%esp) - movl %eax, 196(%esp) - jmp ..B1.166 -..B1.165: - movl 116(%esp), %eax - movl %eax, 172(%esp) - movl 28(%esp), %edx - movl 124(%esp), %ecx - movl 128(%esp), %ebx - movl 132(%esp), %esi - movl 136(%esp), %edi - movl 140(%esp), %eax - movl %edx, 176(%esp) - movl %ecx, 180(%esp) - movl %ebx, 184(%esp) - movl %esi, 188(%esp) - movl %edi, 192(%esp) - movl %eax, 196(%esp) -..B1.166: - movzwl 180(%esp), %eax - andl $32767, %eax - cmpl $383, %eax - jl ..B1.168 -..B1.167: - cmpl $32383, %eax - jle ..B1.169 -..B1.168: - addl $4, %esp - lea 168(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B1.169: - movl 196(%esp), %ecx - testb $1, %cl - jne ..B1.204 -..B1.170: - fldt 172(%esp) - fstpt 64(%esp) - fldt 184(%esp) -..B1.171: - fldt 64(%esp) - fld %st(0) - fsqrt - fldt 32(%esp) - fmul %st(1), %st - fld %st(0) - movl 40(%ebp), %ebx - fsubr %st(2), %st - movl 36(%ebp), %eax - faddp %st, %st(1) - fld %st(0) - sarl $1, %ecx - fsubr %st(2), %st - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - movl %ecx, 24(%ebx) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 48(%esp) - fmulp %st, %st(1) - fdiv %st(1), %st - fld %st(0) - fadd %st(2), %st - fstpt (%ebx) - fldt (%ebx) - fsubrp %st, %st(2) - movzwl 8(%eax), %edx - fadd %st, %st(1) - movl %edx, 44(%esp) - andl $32767, %edx - fxch %st(1) - fstpt 12(%ebx) - cmpl $8383, %edx - fstpt 64(%esp) - jl ..B1.175 -..B1.172: - cmpl $24383, %edx - jg ..B1.175 -..B1.173: - movzwl 8(%ebx), %eax - movl %eax, 32(%esp) - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.175 -..B1.174: - cmpl $24383, %eax - jle ..B1.178 -..B1.175: - addl $4, %esp - pushl 36(%ebp) - call __libm_normalizel_k80 -..B1.176: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B1.177: - movl 36(%ebp), %edx - movzwl 8(%ebx), %eax - movl 24(%ebx), %ecx - movzwl 8(%edx), %edx - movl %edx, 44(%esp) - andl $32767, %edx - movl %eax, 32(%esp) - andl $32767, %eax -..B1.178: - movl 36(%ebp), %esi - movl 24(%esi), %edi - movl %edi, 40(%esp) - lea (%edx,%edi), %esi - movl %esi, 36(%esp) - lea -134(%ecx,%eax), %edi - cmpl %edi, %esi - jle ..B1.195 -..B1.179: - movl 36(%ebp), %esi - movl 4(%esi), %edi - lea 134(%ecx,%eax), %esi - movl %edi, 28(%esp) - cmpl 36(%esp), %esi - jle ..B1.196 -..B1.180: - cmpl $0, 28(%esp) - jne ..B1.182 -..B1.181: - movl 36(%ebp), %esi - cmpl $0, (%esi) - je ..B1.197 -..B1.182: - cmpl $0, 4(%ebx) - jne ..B1.184 -..B1.183: - cmpl $0, (%ebx) - je ..B1.196 -..B1.184: - cmpl 40(%esp), %ecx - je ..B1.186 -..B1.185: - fldt 64(%esp) - movl 40(%esp), %eax - fstpt 16(%esp) - subl %ecx, %eax - andb $127, 25(%esp) - addl $16383, %eax - movl 36(%ebp), %esi - andl $32767, %eax - movzwl 24(%esp), %edx - andl $-32768, %edx - fldt (%esi) - orl %eax, %edx - fldt 12(%esi) - movw %dx, 24(%esp) - movl $-2147483648, 20(%esp) - movl $0, 16(%esp) - fldt 16(%esp) - fmul %st, %st(2) - movl %ecx, 24(%esi) - fxch %st(2) - fstpt (%esi) - fldt (%esi) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%esi) - movzwl 8(%esi), %edi - movzwl 8(%ebx), %eax - movl 24(%ebx), %ecx - movl %edi, 44(%esp) - movl %eax, 32(%esp) - jmp ..B1.187 -..B1.186: - movl 36(%ebp), %eax - fldt (%eax) -..B1.187: - fldt (%ebx) - fld %st(1) - movl 44(%ebp), %eax - fadd %st(1), %st - movl %ecx, 24(%eax) - movl 44(%esp), %edx - movl 32(%esp), %ecx - andl $32767, %edx - andl $32767, %ecx - fstpt 12(%eax) - fldt 12(%eax) - cmpl %ecx, %edx - jg ..B1.192 -..B1.188: - jne ..B1.193 -..B1.189: - movl 36(%ebp), %eax - movl 4(%eax), %edx - cmpl 4(%ebx), %edx - ja ..B1.192 -..B1.190: - jne ..B1.193 -..B1.191: - movl 36(%ebp), %eax - movl (%eax), %edx - cmpl (%ebx), %edx - jbe ..B1.193 -..B1.192: - fldt 12(%ebx) - fxch %st(1) - fsubr %st, %st(3) - movl 36(%ebp), %eax - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 12(%eax) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - jmp ..B1.194 -..B1.193: - movl 36(%ebp), %eax - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fldt 12(%eax) - faddp %st, %st(1) - fldt 12(%ebx) - faddp %st, %st(1) - fstpt 16(%esp) - fldt 16(%esp) -..B1.194: - fld %st(0) - movl 44(%ebp), %eax - fadd %st(2), %st - fstpt (%eax) - fldt (%eax) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%eax) - jmp ..B1.201 -..B1.195: - movl 36(%ebp), %esi - movl 4(%esi), %edi - movl %edi, 28(%esp) -..B1.196: - cmpl $0, 28(%esp) - jne ..B1.198 -..B1.213: - movl 36(%ebp), %esi - cmpl $0, (%esi) -..B1.197: - je ..B1.199 -..B1.198: - lea -16517(%ecx,%eax), %ecx - movl 40(%esp), %eax - lea -16383(%eax,%edx), %edx - cmpl %edx, %ecx - jl ..B1.200 -..B1.199: - movl 44(%ebp), %eax - movl (%ebx), %edx - movl %edx, (%eax) - movl 4(%ebx), %ecx - movl %ecx, 4(%eax) - movl 8(%ebx), %esi - movl %esi, 8(%eax) - movl 12(%ebx), %edi - movl %edi, 12(%eax) - movl 16(%ebx), %edx - movl %edx, 16(%eax) - movl 20(%ebx), %ecx - movl %ecx, 20(%eax) - movl 24(%ebx), %ebx - movl %ebx, 24(%eax) - jmp ..B1.201 -..B1.200: - movl 36(%ebp), %eax - movl 44(%ebp), %edx - movl (%eax), %ecx - movl %ecx, (%edx) - movl 4(%eax), %ebx - movl %ebx, 4(%edx) - movl 8(%eax), %esi - movl %esi, 8(%edx) - movl 12(%eax), %edi - movl %edi, 12(%edx) - movl 16(%eax), %ecx - movl %ecx, 16(%edx) - movl 20(%eax), %ebx - movl %ebx, 20(%edx) - movl 24(%eax), %eax - movl %eax, 24(%edx) -..B1.201: - movl 200(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.203 -..B1.202: - addl $212, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.203: - movl 60(%esp), %ebx - call __stack_chk_fail@PLT -..B1.204: - fldt 172(%esp) - incl %ecx - fldt 48(%esp) - fmul %st, %st(1) - fxch %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fstpt 172(%esp) - fldt 184(%esp) - fmulp %st, %st(1) - movl %ecx, 196(%esp) - fstpt 184(%esp) - fldt 184(%esp) - jmp ..B1.171 -..B1.205: - fldt 144(%esp) - incl %edx - movl 60(%esp), %eax - movl %edx, 168(%esp) - fldt 48+_CONSTANTS@GOTOFF(%eax) - fmul %st, %st(1) - fxch %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fstpt 144(%esp) - fstpt 48(%esp) - fldt 48(%esp) - fldt 156(%esp) - fmulp %st, %st(1) - fstpt 156(%esp) - fldt 156(%esp) - jmp ..B1.102 - .align 16,0x90 - .type __libm_carctrigprepare_k80,@function - .size __libm_carctrigprepare_k80,.-__libm_carctrigprepare_k80 - .data -# -- End __libm_carctrigprepare_k80 - .text -# -- Begin __libm_recacosl_k80 - .text - .align 16,0x90 - .hidden __libm_recacosl_k80 - .globl __libm_recacosl_k80 -__libm_recacosl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -# parameter 4: 20 + %ebp -# parameter 5: 24 + %ebp -# parameter 6: 28 + %ebp -# parameter 7: 32 + %ebp -# parameter 8: 36 + %ebp -# parameter 9: 40 + %ebp -# parameter 10: 44 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $500, %esp - movl 16(%ebp), %esi - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 488(%esp) - movzwl 8(%esi), %eax - andl $32767, %eax - movl 44(%ebp), %edi - cmpl $8383, %eax - jl ..B2.5 -..B2.2: - cmpl $24383, %eax - jg ..B2.5 -..B2.3: - movzwl 8(%edi), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.5 -..B2.4: - cmpl $24383, %eax - jle ..B2.7 -..B2.5: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B2.6: - addl $4, %esp - pushl %edi - call __libm_normalizel_k80 -..B2.7: - fldt (%esi) - fld %st(0) - fldt (%edi) - fdivr %st, %st(1) - fld %st(0) - call ..L4 -..L4: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%eax), %eax - fld %st(1) - movl 24(%esi), %ebx - subl 24(%edi), %ebx - fldt 36+_CONSTANTS@GOTOFF(%eax) - fld %st(0) - fmul %st(5), %st - lea 1(%ebx), %edx - fld %st(0) - movl %eax, 92(%esp) - fsubr %st(6), %st - movl %edx, 484(%esp) - faddp %st, %st(1) - fld %st(0) - fsubr %st(6), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(3) - fsub %st(4), %st - faddp %st, %st(4) - fld %st(4) - fsub %st(4), %st - fxch %st(3) - fstpt 80(%esp) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fsubrp %st, %st(3) - fldt 12(%esi) - faddp %st, %st(3) - fldt 12(%edi) - fmul %st(2), %st - fsubrp %st, %st(3) - fdivrp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 460(%esp) - fldt 460(%esp) - fsubrp %st, %st(1) - movzwl 468(%esp), %ecx - fadd %st(1), %st - andl $32767, %ecx - fstpt 472(%esp) - fstpt 48(%esp) - lea 1(%ecx,%ebx), %eax - cmpl $16382, %eax - jl ..B2.200 -..B2.8: - movl 8(%ebp), %eax - movl 40(%ebp), %ebx - movzwl 8(%eax), %edx - andl $32767, %edx - cmpl $16383, %edx - jl ..B2.39 -..B2.9: - movl 32(%ebp), %eax - movl (%eax), %edx - movl %edx, 264(%esp) - movl 8(%eax), %edx - movl 4(%eax), %ecx - movl %edx, 272(%esp) - movl 16(%eax), %edx - movl %ecx, 268(%esp) - movl 12(%eax), %ecx - movl %edx, 280(%esp) - movzwl 8(%ebx), %edx - movl %ecx, 276(%esp) - movl 20(%eax), %ecx - movl %edx, 68(%esp) - andl $32767, %edx - movl 24(%eax), %eax - cmpl $8383, %edx - movl %ecx, 284(%esp) - movl %eax, 288(%esp) - jl ..B2.13 -..B2.10: - cmpl $24383, %edx - jg ..B2.13 -..B2.11: - movl 24(%ebp), %eax - movzwl 8(%eax), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - movl %ecx, 40(%esp) - cmpl $8383, %ecx - jl ..B2.13 -..B2.12: - cmpl $24383, 40(%esp) - jle ..B2.16 -..B2.13: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B2.14: - addl $4, %esp - pushl 24(%ebp) - call __libm_normalizel_k80 -..B2.15: - movl 24(%ebp), %eax - movzwl 8(%ebx), %edx - movl %edx, 68(%esp) - andl $32767, %edx - movzwl 8(%eax), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - movl %ecx, 40(%esp) -..B2.16: - movl 24(%ebp), %ecx - movl 24(%ecx), %eax - movl 40(%esp), %ecx - movl %eax, 64(%esp) - lea -134(%eax,%ecx), %eax - movl 24(%ebx), %ecx - movl %ecx, 60(%esp) - addl %edx, %ecx - movl %ecx, 36(%esp) - cmpl %ecx, %eax - jge ..B2.33 -..B2.17: - movl 4(%ebx), %eax - movl %eax, 32(%esp) - movl 64(%esp), %ecx - movl 40(%esp), %eax - lea 134(%ecx,%eax), %ecx - cmpl 36(%esp), %ecx - jle ..B2.34 -..B2.18: - cmpl $0, 32(%esp) - jne ..B2.20 -..B2.19: - cmpl $0, (%ebx) - je ..B2.35 -..B2.20: - movl 24(%ebp), %eax - cmpl $0, 4(%eax) - jne ..B2.22 -..B2.21: - movl 24(%ebp), %eax - cmpl $0, (%eax) - je ..B2.34 -..B2.22: - movl 64(%esp), %eax - cmpl 60(%esp), %eax - je ..B2.24 -..B2.23: - fldt 48(%esp) - movl 60(%esp), %eax - movl 64(%esp), %ecx - subl %ecx, %eax - fstpt 32(%esp) - addl $16383, %eax - fldt (%ebx) - andl $32767, %eax - fldt 12(%ebx) - andb $127, 41(%esp) - movzwl 40(%esp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %ecx, 24(%ebx) - movl 24(%ebp), %ecx - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fstpt 48(%esp) - fmulp %st, %st(1) - movl 24(%ecx), %eax - fstpt 12(%ebx) - fldt 12(%ebx) - movl %eax, 64(%esp) - movzwl 8(%ebx), %edx - movzwl 8(%ecx), %eax - movl %edx, 68(%esp) - movl %eax, 44(%esp) - jmp ..B2.25 -..B2.24: - fldt (%ebx) - fstpt 48(%esp) - fldt 12(%ebx) -..B2.25: - fldt 48(%esp) - movl 24(%ebp), %edx - movl 64(%esp), %eax - movl %eax, 316(%esp) - fldt (%edx) - movl 68(%esp), %ecx - fadd %st, %st(1) - movl 44(%esp), %eax - andl $32767, %ecx - andl $32767, %eax - cmpl %eax, %ecx - jg ..B2.30 -..B2.26: - jne ..B2.31 -..B2.27: - movl 24(%ebp), %edx - movl 4(%ebx), %eax - cmpl 4(%edx), %eax - ja ..B2.30 -..B2.28: - jne ..B2.31 -..B2.29: - movl 24(%ebp), %edx - movl (%ebx), %eax - cmpl (%edx), %eax - jbe ..B2.31 -..B2.30: - fldt 48(%esp) - movl 24(%ebp), %eax - fsub %st(2), %st - faddp %st, %st(1) - fldt 12(%eax) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - jmp ..B2.32 -..B2.31: - fldt 48(%esp) - fxch %st(1) - fsub %st(2), %st - movl 24(%ebp), %eax - faddp %st, %st(1) - faddp %st, %st(2) - fldt 12(%eax) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) -..B2.32: - fldt 48(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 292(%esp) - fldt 292(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 304(%esp) - jmp ..B2.69 -..B2.33: - movl 4(%ebx), %eax - movl %eax, 32(%esp) -..B2.34: - cmpl $0, 32(%esp) - jne ..B2.36 -..B2.241: - cmpl $0, (%ebx) -..B2.35: - je ..B2.37 -..B2.36: - movl 64(%esp), %ecx - movl 40(%esp), %eax - lea -16517(%ecx,%eax), %eax - movl 60(%esp), %ecx - lea -16383(%ecx,%edx), %edx - cmpl %edx, %eax - jl ..B2.38 -..B2.37: - movl 24(%ebp), %eax - movl (%eax), %edx - movl 4(%eax), %ecx - movl 8(%eax), %ebx - movl %edx, 292(%esp) - movl %ecx, 296(%esp) - movl %ebx, 300(%esp) - movl 12(%eax), %edx - movl 16(%eax), %ecx - movl 20(%eax), %ebx - movl 24(%eax), %eax - movl %edx, 304(%esp) - movl %ecx, 308(%esp) - movl %ebx, 312(%esp) - movl %eax, 316(%esp) - jmp ..B2.69 -..B2.38: - movl (%ebx), %eax - movl 4(%ebx), %edx - movl 8(%ebx), %ecx - movl %eax, 292(%esp) - movl %edx, 296(%esp) - movl %ecx, 300(%esp) - movl 12(%ebx), %eax - movl 16(%ebx), %edx - movl 20(%ebx), %ecx - movl 24(%ebx), %ebx - movl %eax, 304(%esp) - movl %edx, 308(%esp) - movl %ecx, 312(%esp) - movl %ebx, 316(%esp) - jmp ..B2.69 -..B2.39: - movl 92(%esp), %eax - movzwl 8(%ebx), %edx - movl %edx, 68(%esp) - andl $32767, %edx - fldt _CONSTANTS@GOTOFF(%eax) - cmpl $8383, %edx - movl $0, 316(%esp) - fstpt 292(%esp) - fldt 24+_CONSTANTS@GOTOFF(%eax) - fstpt 304(%esp) - jl ..B2.43 -..B2.40: - cmpl $24383, %edx - jg ..B2.43 -..B2.41: - movl 24(%ebp), %eax - movzwl 8(%eax), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - movl %ecx, 40(%esp) - cmpl $8383, %ecx - jl ..B2.43 -..B2.42: - cmpl $24383, 40(%esp) - jle ..B2.46 -..B2.43: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B2.44: - addl $4, %esp - pushl 24(%ebp) - call __libm_normalizel_k80 -..B2.45: - movl 24(%ebp), %eax - movzwl 8(%ebx), %edx - movl %edx, 68(%esp) - andl $32767, %edx - movzwl 8(%eax), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - movl %ecx, 40(%esp) -..B2.46: - movl 24(%ebp), %ecx - movl 24(%ecx), %eax - movl 40(%esp), %ecx - movl %eax, 64(%esp) - lea -134(%eax,%ecx), %eax - movl 24(%ebx), %ecx - movl %ecx, 60(%esp) - addl %edx, %ecx - movl %ecx, 36(%esp) - cmpl %ecx, %eax - jge ..B2.63 -..B2.47: - movl 4(%ebx), %eax - movl %eax, 32(%esp) - movl 64(%esp), %ecx - movl 40(%esp), %eax - lea 134(%ecx,%eax), %ecx - cmpl 36(%esp), %ecx - jle ..B2.64 -..B2.48: - cmpl $0, 32(%esp) - jne ..B2.50 -..B2.49: - cmpl $0, (%ebx) - je ..B2.65 -..B2.50: - movl 24(%ebp), %eax - cmpl $0, 4(%eax) - jne ..B2.52 -..B2.51: - movl 24(%ebp), %eax - cmpl $0, (%eax) - je ..B2.64 -..B2.52: - movl 64(%esp), %eax - cmpl 60(%esp), %eax - je ..B2.54 -..B2.53: - fldt 48(%esp) - movl 60(%esp), %eax - movl 64(%esp), %ecx - subl %ecx, %eax - fstpt 32(%esp) - addl $16383, %eax - fldt (%ebx) - andl $32767, %eax - fldt 12(%ebx) - andb $127, 41(%esp) - movzwl 40(%esp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %ecx, 24(%ebx) - movl 24(%ebp), %ecx - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - movl 24(%ecx), %eax - fstpt 12(%ebx) - fldt 12(%ebx) - movl %eax, 64(%esp) - movzwl 8(%ebx), %edx - movzwl 8(%ecx), %eax - fstpt 48(%esp) - movl %edx, 68(%esp) - movl %eax, 44(%esp) - jmp ..B2.55 -..B2.54: - fldt (%ebx) - fldt 12(%ebx) - fstpt 48(%esp) -..B2.55: - movl 24(%ebp), %edx - fld %st(0) - movl 64(%esp), %eax - movl %eax, 288(%esp) - fldt (%edx) - movl 68(%esp), %ecx - fsubr %st, %st(1) - movl 44(%esp), %eax - andl $32767, %ecx - andl $32767, %eax - cmpl %eax, %ecx - jg ..B2.60 -..B2.56: - jne ..B2.61 -..B2.57: - movl 24(%ebp), %edx - movl 4(%ebx), %eax - cmpl 4(%edx), %eax - ja ..B2.60 -..B2.58: - jne ..B2.61 -..B2.59: - movl 24(%ebp), %edx - movl (%ebx), %eax - cmpl (%edx), %eax - jbe ..B2.61 -..B2.60: - fldt 48(%esp) - fxch %st(2) - fsubr %st, %st(3) - movl 24(%ebp), %eax - fxch %st(1) - fsubrp %st, %st(3) - fldt 12(%eax) - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 48(%esp) - jmp ..B2.62 -..B2.61: - movl 24(%ebp), %eax - fadd %st(1), %st - fsubrp %st, %st(2) - fldt 48(%esp) - faddp %st, %st(2) - fldt 12(%eax) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) -..B2.62: - fldt 48(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 264(%esp) - fldt 264(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 276(%esp) - jmp ..B2.69 -..B2.63: - movl 4(%ebx), %eax - movl %eax, 32(%esp) -..B2.64: - cmpl $0, 32(%esp) - jne ..B2.66 -..B2.240: - cmpl $0, (%ebx) -..B2.65: - je ..B2.67 -..B2.66: - movl 64(%esp), %eax - movl 40(%esp), %ecx - movl 60(%esp), %ebx - lea -16517(%eax,%ecx), %eax - lea -16383(%ebx,%edx), %edx - movl 40(%ebp), %ebx - cmpl %edx, %eax - jl ..B2.68 -..B2.67: - movl 24(%ebp), %edx - movl 64(%esp), %eax - movl %eax, 288(%esp) - fldt (%edx) - fchs - fstpt 264(%esp) - fldt 12(%edx) - fchs - fstpt 276(%esp) - jmp ..B2.69 -..B2.68: - movl (%ebx), %eax - movl 4(%ebx), %edx - movl 8(%ebx), %ecx - movl %eax, 264(%esp) - movl %edx, 268(%esp) - movl %ecx, 272(%esp) - movl 12(%ebx), %eax - movl 16(%ebx), %edx - movl 20(%ebx), %ecx - movl 24(%ebx), %ebx - movl %eax, 276(%esp) - movl %edx, 280(%esp) - movl %ecx, 284(%esp) - movl %ebx, 288(%esp) -..B2.69: - movzwl 8(%esi), %eax - movl %eax, 68(%esp) - andl $32767, %eax - movl 24(%esi), %ecx - incl %ecx - movl %ecx, 24(%esi) - cmpl $8383, %eax - movl %eax, 76(%esp) - jl ..B2.73 -..B2.70: - cmpl $24383, 76(%esp) - jg ..B2.73 -..B2.71: - movzwl 8(%edi), %edx - movl %edx, %eax - andl $32767, %eax - movl %eax, 72(%esp) - cmpl $8383, %eax - jl ..B2.73 -..B2.72: - cmpl $24383, 72(%esp) - jle ..B2.76 -..B2.73: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B2.74: - addl $4, %esp - pushl %edi - call __libm_normalizel_k80 -..B2.75: - movzwl 8(%esi), %edx - movl %edx, 68(%esp) - andl $32767, %edx - movl %edx, 76(%esp) - movzwl 8(%edi), %edx - movl %edx, %eax - andl $32767, %eax - movl %eax, 72(%esp) - movl 24(%esi), %ecx -..B2.76: - movl 76(%esp), %ebx - movl 24(%edi), %edi - movl %edi, 64(%esp) - lea (%ecx,%ebx), %eax - movl 72(%esp), %ebx - movl %eax, 60(%esp) - lea -134(%edi,%ebx), %edi - cmpl %edi, %eax - movl 44(%ebp), %edi - jle ..B2.93 -..B2.77: - movl 4(%esi), %eax - movl %eax, 44(%esp) - movl 64(%esp), %ebx - movl 72(%esp), %eax - lea 134(%ebx,%eax), %ebx - cmpl 60(%esp), %ebx - jle ..B2.94 -..B2.78: - cmpl $0, 44(%esp) - jne ..B2.80 -..B2.79: - cmpl $0, (%esi) - je ..B2.95 -..B2.80: - cmpl $0, 4(%edi) - jne ..B2.82 -..B2.81: - cmpl $0, (%edi) - je ..B2.94 -..B2.82: - cmpl 64(%esp), %ecx - je ..B2.84 -..B2.83: - fldt 48(%esp) - movl 64(%esp), %edx - subl %edx, %ecx - fstpt 32(%esp) - addl $16383, %ecx - fldt (%esi) - andl $32767, %ecx - fldt 12(%esi) - andb $127, 41(%esp) - movzwl 40(%esp), %eax - andl $-32768, %eax - orl %ecx, %eax - movl %edx, %ecx - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 24(%esi) - fxch %st(2) - fstpt (%esi) - fldt (%esi) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%esi) - fldt 12(%esi) - movl 24(%edi), %ebx - movzwl 8(%esi), %eax - movl %ebx, 64(%esp) - movl %eax, 68(%esp) - movzwl 8(%edi), %edx - jmp ..B2.85 -..B2.84: - fldt (%esi) - fldt 12(%esi) -..B2.85: - fldt (%edi) - fld %st(2) - movl 64(%esp), %eax - fadd %st(1), %st - movl %eax, 344(%esp) - movl %edx, %eax - movl 68(%esp), %ebx - andl $32767, %eax - andl $32767, %ebx - cmpl %eax, %ebx - jg ..B2.90 -..B2.86: - jne ..B2.91 -..B2.87: - movl 4(%esi), %eax - cmpl 4(%edi), %eax - ja ..B2.90 -..B2.88: - jne ..B2.91 -..B2.89: - movl (%esi), %eax - cmpl (%edi), %eax - jbe ..B2.91 -..B2.90: - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 12(%edi) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - jmp ..B2.92 -..B2.91: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 12(%edi) - faddp %st, %st(2) -..B2.92: - fld %st(1) - fadd %st(1), %st - fstpt 320(%esp) - fldt 320(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 332(%esp) - jmp ..B2.99 -..B2.93: - movl 4(%esi), %eax - movl %eax, 44(%esp) -..B2.94: - cmpl $0, 44(%esp) - jne ..B2.96 -..B2.242: - cmpl $0, (%esi) -..B2.95: - je ..B2.97 -..B2.96: - movl 64(%esp), %ebx - movl 72(%esp), %eax - lea -16517(%ebx,%eax), %eax - movl 76(%esp), %ebx - lea -16383(%ecx,%ebx), %ebx - cmpl %ebx, %eax - jl ..B2.98 -..B2.97: - movl (%edi), %eax - movl %eax, 320(%esp) - movl 4(%edi), %ebx - movl 8(%edi), %eax - movl %ebx, 324(%esp) - movl %eax, 328(%esp) - movl 12(%edi), %ebx - movl 16(%edi), %eax - movl %ebx, 332(%esp) - movl %eax, 336(%esp) - movl 20(%edi), %ebx - movl 24(%edi), %eax - movl %ebx, 340(%esp) - movl %eax, 344(%esp) - jmp ..B2.99 -..B2.98: - movl (%esi), %eax - movl %eax, 320(%esp) - movl 4(%esi), %ebx - movl 8(%esi), %eax - movl %ebx, 324(%esp) - movl %eax, 328(%esp) - movl 12(%esi), %ebx - movl 16(%esi), %eax - movl %ebx, 332(%esp) - movl %eax, 336(%esp) - movl 20(%esi), %ebx - movl 24(%esi), %eax - movl %ebx, 340(%esp) - movl %eax, 344(%esp) -..B2.99: - movzwl 328(%esp), %eax - decl %ecx - andl $32767, %eax - movl %ecx, 24(%esi) - cmpl $8383, %eax - jl ..B2.103 -..B2.100: - cmpl $24383, %eax - jg ..B2.103 -..B2.101: - movzwl 272(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.103 -..B2.102: - cmpl $24383, %eax - jle ..B2.105 -..B2.103: - addl $4, %esp - lea 316(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.104: - addl $4, %esp - lea 260(%esp), %eax - pushl %eax - call __libm_normalizel_k80 - movzwl 8(%edi), %edx -..B2.105: - fldt 320(%esp) - andl $32767, %edx - fld %st(0) - fld %st(1) - fldt 80(%esp) - fld %st(0) - fmul %st(4), %st - movl 344(%esp), %eax - fsubr %st, %st(3) - addl 288(%esp), %eax - faddp %st, %st(3) - fld %st(2) - cmpl $8383, %edx - movl %eax, 372(%esp) - fxch %st(2) - fsub %st(3), %st - fldt 264(%esp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 276(%esp) - fmulp %st, %st(4) - fldt 332(%esp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 348(%esp) - fldt 348(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 360(%esp) - jl ..B2.109 -..B2.106: - cmpl $24383, %edx - jg ..B2.109 -..B2.107: - movzwl 300(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.109 -..B2.108: - cmpl $24383, %eax - jle ..B2.111 -..B2.109: - addl $4, %esp - pushl %edi - call __libm_normalizel_k80 -..B2.110: - addl $4, %esp - lea 288(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.111: - fldt (%edi) - fld %st(0) - fld %st(1) - fldt 80(%esp) - fld %st(0) - fmul %st(4), %st - movl 36(%ebp), %ebx - fsubr %st, %st(3) - movl 316(%esp), %eax - faddp %st, %st(3) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fldt 292(%esp) - fmul %st, %st(2) - fld %st(0) - addl 24(%edi), %eax - fsub %st(3), %st - movl 28(%ebp), %esi - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - movl %eax, 400(%esp) - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 304(%esp) - fmulp %st, %st(4) - fldt 12(%edi) - fmulp %st, %st(1) - movzwl 8(%ebx), %edi - movl %edi, %ecx - andl $32767, %ecx - faddp %st, %st(3) - cmpl $8383, %ecx - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 376(%esp) - fldt 376(%esp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 388(%esp) - fstpt 48(%esp) - jl ..B2.115 -..B2.112: - cmpl $24383, %ecx - jg ..B2.115 -..B2.113: - movzwl 8(%esi), %edx - movl %edx, 60(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B2.115 -..B2.114: - cmpl $24383, %edx - jle ..B2.118 -..B2.115: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B2.116: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B2.117: - movzwl 8(%ebx), %edi - movl %edi, %ecx - movzwl 8(%esi), %edx - andl $32767, %ecx - movl %edx, 60(%esp) - andl $32767, %edx -..B2.118: - movl 24(%esi), %eax - movl 24(%ebx), %ebx - movl %eax, 72(%esp) - movl %ebx, 68(%esp) - lea -134(%eax,%edx), %eax - addl %ecx, %ebx - movl %ebx, 64(%esp) - cmpl %eax, %ebx - movl 36(%ebp), %ebx - jle ..B2.135 -..B2.119: - movl 4(%ebx), %eax - movl %eax, 44(%esp) - movl 72(%esp), %eax - lea 134(%eax,%edx), %eax - cmpl 64(%esp), %eax - jle ..B2.136 -..B2.120: - cmpl $0, 44(%esp) - jne ..B2.122 -..B2.121: - cmpl $0, (%ebx) - je ..B2.137 -..B2.122: - cmpl $0, 4(%esi) - jne ..B2.124 -..B2.123: - cmpl $0, (%esi) - je ..B2.136 -..B2.124: - movl 72(%esp), %eax - cmpl 68(%esp), %eax - je ..B2.126 -..B2.125: - fldt 48(%esp) - movl 68(%esp), %edi - movl %eax, %edx - subl %edx, %edi - fstpt 32(%esp) - addl $16383, %edi - fldt (%ebx) - andl $32767, %edi - fldt 12(%ebx) - andb $127, 41(%esp) - movzwl 40(%esp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 24(%ebx) - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%ebx) - fldt 12(%ebx) - movl 24(%esi), %ecx - movzwl 8(%esi), %eax - movl %ecx, 72(%esp) - movzwl 8(%ebx), %edi - movl %eax, 60(%esp) - jmp ..B2.127 -..B2.126: - fldt (%ebx) - fldt 12(%ebx) -..B2.127: - fldt (%esi) - andl $32767, %edi - movl 60(%esp), %edx - fld %st(2) - andl $32767, %edx - fadd %st(1), %st - movl 72(%esp), %eax - cmpl %edx, %edi - movl %eax, 428(%esp) - jg ..B2.132 -..B2.128: - jne ..B2.133 -..B2.129: - movl 4(%ebx), %eax - cmpl 4(%esi), %eax - ja ..B2.132 -..B2.130: - jne ..B2.133 -..B2.131: - movl (%ebx), %eax - cmpl (%esi), %eax - jbe ..B2.133 -..B2.132: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 12(%esi) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.134 -..B2.133: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 12(%esi) - faddp %st, %st(1) -..B2.134: - fld %st(0) - fadd %st(2), %st - fstpt 404(%esp) - fldt 404(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 416(%esp) - jmp ..B2.141 -..B2.135: - movl 4(%ebx), %eax - movl %eax, 44(%esp) -..B2.136: - cmpl $0, 44(%esp) - jne ..B2.138 -..B2.243: - cmpl $0, (%ebx) -..B2.137: - je ..B2.139 -..B2.138: - movl 72(%esp), %eax - lea -16517(%eax,%edx), %edi - movl 68(%esp), %edx - lea -16383(%edx,%ecx), %ecx - cmpl %ecx, %edi - jl ..B2.140 -..B2.139: - movl (%esi), %eax - movl %eax, 404(%esp) - movl 4(%esi), %edx - movl 8(%esi), %ecx - movl 12(%esi), %ebx - movl 16(%esi), %edi - movl 20(%esi), %eax - movl 24(%esi), %esi - movl %edx, 408(%esp) - movl %ecx, 412(%esp) - movl %ebx, 416(%esp) - movl %edi, 420(%esp) - movl %eax, 424(%esp) - movl %esi, 428(%esp) - jmp ..B2.141 -..B2.140: - movl (%ebx), %eax - movl %eax, 404(%esp) - movl 4(%ebx), %edx - movl 8(%ebx), %ecx - movl 12(%ebx), %esi - movl 16(%ebx), %edi - movl 20(%ebx), %eax - movl 24(%ebx), %ebx - movl %edx, 408(%esp) - movl %ecx, 412(%esp) - movl %esi, 416(%esp) - movl %edi, 420(%esp) - movl %eax, 424(%esp) - movl %ebx, 428(%esp) -..B2.141: - movzwl 384(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.145 -..B2.142: - cmpl $24383, %eax - jg ..B2.145 -..B2.143: - movzwl 412(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.145 -..B2.144: - cmpl $24383, %eax - jle ..B2.147 -..B2.145: - addl $4, %esp - lea 372(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.146: - addl $4, %esp - lea 400(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.147: - fldt 376(%esp) - fld %st(0) - fld %st(1) - fldt 80(%esp) - fld %st(0) - fmul %st(4), %st - movl 400(%esp), %edx - fsubr %st, %st(3) - movzwl 356(%esp), %eax - faddp %st, %st(3) - fld %st(2) - andl $32767, %eax - addl 428(%esp), %edx - fxch %st(2) - fsub %st(3), %st - fldt 404(%esp) - cmpl $8383, %eax - fmul %st, %st(2) - fld %st(0) - movl %edx, 456(%esp) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 416(%esp) - fmulp %st, %st(4) - fldt 388(%esp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 432(%esp) - fldt 432(%esp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 444(%esp) - fldt 444(%esp) - jl ..B2.151 -..B2.148: - cmpl $24383, %eax - jg ..B2.151 -..B2.149: - movzwl 440(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.151 -..B2.150: - cmpl $24383, %eax - jle ..B2.154 -..B2.151: - fstp %st(1) - fstp %st(0) - addl $4, %esp - lea 344(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.152: - addl $4, %esp - lea 428(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.153: - fldt 432(%esp) - fldt 444(%esp) - movl 456(%esp), %edx -..B2.154: - fldt 348(%esp) - fld %st(2) - fdivr %st(1), %st - fmul %st, %st(2) - fld %st(3) - fxch %st(4) - fstpt 64(%esp) - fldt 64(%esp) - fldt 80(%esp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - movl 372(%esp), %eax - fsubr %st(4), %st - subl %edx, %eax - faddp %st, %st(1) - fld %st(0) - movl 8(%ebp), %edx - fsubr %st(4), %st - fxch %st(2) - fmul %st(3), %st - movzbl 9(%edx), %ecx - testl $128, %ecx - fsubr %st, %st(7) - faddp %st, %st(7) - fxch %st(2) - fsub %st(6), %st - fld %st(2) - fmul %st(7), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(1) - fmul %st, %st(3) - fxch %st(7) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) - fxch %st(4) - fsubrp %st, %st(2) - fxch %st(3) - fsubrp %st, %st(1) - fldt 360(%esp) - faddp %st, %st(1) - fsubp %st, %st(1) - fldt 64(%esp) - fdivrp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fadd %st, %st(2) - fstpt 48(%esp) - jne ..B2.163 -..B2.155: - fstpt 32(%esp) - fldt 32(%esp) - decl %eax - movzwl 40(%esp), %edx - andl $32767, %edx - movl %eax, 56(%esp) - cmpl $383, %edx - fxch %st(1) - fstpt 44(%esp) - fldt 44(%esp) - jl ..B2.157 -..B2.156: - cmpl $32383, %edx - jle ..B2.159 -..B2.157: - fstp %st(0) - fstp %st(0) - addl $4, %esp - lea 28(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.158: - fldt 32(%esp) - fldt 44(%esp) - movl 56(%esp), %eax -..B2.159: - testb $1, %al - jne ..B2.234 -..B2.160: - movl 92(%esp), %edx - fldt 48+_CONSTANTS@GOTOFF(%edx) -..B2.161: - fldt 80(%esp) - fld %st(3) - fsqrt - lea 236(%esp), %edx - fmul %st, %st(1) - fld %st(1) - sarl $1, %eax - fsubr %st(1), %st - movl %eax, 24(%edx) - lea 208(%esp), %eax - faddp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(2) - fsubrp %st, %st(5) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(2) - fdivr %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 28(%eax) - fldt 28(%eax) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 40(%eax) - call asinpoly -..B2.162: - fldt 208(%esp) - fldt 220(%esp) - movl 232(%esp), %eax - incl %eax - movl %eax, 232(%esp) - jmp ..B2.231 -..B2.163: - fstpt 124(%esp) - fldt 124(%esp) - decl %eax - movzwl 132(%esp), %edx - andl $32767, %edx - movl %eax, 148(%esp) - cmpl $383, %edx - fxch %st(1) - fstpt 136(%esp) - fldt 136(%esp) - jl ..B2.165 -..B2.164: - cmpl $32383, %edx - jle ..B2.167 -..B2.165: - fstp %st(0) - fstp %st(0) - addl $4, %esp - lea 120(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.166: - fldt 124(%esp) - fldt 136(%esp) - movl 148(%esp), %eax -..B2.167: - testb $1, %al - jne ..B2.235 -..B2.168: - movl 92(%esp), %edx - fldt 48+_CONSTANTS@GOTOFF(%edx) -..B2.169: - fldt 80(%esp) - fld %st(3) - fsqrt - lea 152(%esp), %edx - fmul %st, %st(1) - fld %st(1) - sarl $1, %eax - fsubr %st(1), %st - movl %eax, 24(%edx) - lea 96(%esp), %eax - faddp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(2) - fsubrp %st, %st(5) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(2) - fdivr %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 56(%eax) - fldt 56(%eax) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 68(%eax) - call asinpoly -..B2.170: - movl 92(%esp), %edx - movl $1, %esi - movl 120(%esp), %eax - incl %eax - fldt 60+_CONSTANTS@GOTOFF(%edx) - movzwl 68+_CONSTANTS@GOTOFF(%edx), %edi - andl $32767, %edi - movl %eax, 120(%esp) - cmpl $8383, %edi - movl %esi, 204(%esp) - fstpt 180(%esp) - fldt 72+_CONSTANTS@GOTOFF(%edx) - fstpt 192(%esp) - jl ..B2.174 -..B2.171: - cmpl $24383, %edi - jg ..B2.174 -..B2.172: - movzwl 104(%esp), %ebx - andl $32767, %ebx - cmpl $8383, %ebx - jl ..B2.174 -..B2.173: - cmpl $24383, %ebx - jle ..B2.177 -..B2.174: - addl $4, %esp - lea 176(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.175: - addl $4, %esp - lea 92(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.176: - movzwl 188(%esp), %edi - movzwl 104(%esp), %ebx - andl $32767, %edi - movl 120(%esp), %eax - andl $32767, %ebx - movl 204(%esp), %esi -..B2.177: - lea (%esi,%edi), %edx - movl %edx, 44(%esp) - lea -134(%eax,%ebx), %ecx - cmpl %ecx, %edx - jle ..B2.194 -..B2.178: - movl 184(%esp), %ecx - lea 134(%eax,%ebx), %edx - cmpl 44(%esp), %edx - jle ..B2.195 -..B2.179: - testl %ecx, %ecx - jne ..B2.181 -..B2.180: - cmpl $0, 180(%esp) - je ..B2.196 -..B2.181: - movl 100(%esp), %edx - testl %edx, %edx - jne ..B2.183 -..B2.182: - cmpl $0, 96(%esp) - je ..B2.195 -..B2.183: - cmpl %eax, %esi - je ..B2.185 -..B2.184: - fldt 48(%esp) - subl %eax, %esi - fstpt 32(%esp) - addl $16383, %esi - fldt 180(%esp) - andl $32767, %esi - fldt 192(%esp) - andb $127, 41(%esp) - movzwl 40(%esp), %ecx - andl $-32768, %ecx - orl %esi, %ecx - movw %cx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 180(%esp) - fldt 180(%esp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 188(%esp), %edi - movl %eax, 204(%esp) - andl $32767, %edi - fstpt 192(%esp) - fldt 192(%esp) - jmp ..B2.186 -..B2.185: - fldt 180(%esp) - fldt 192(%esp) -..B2.186: - fldt 96(%esp) - fld %st(2) - movl %eax, 232(%esp) - cmpl %ebx, %edi - fsub %st(1), %st - jg ..B2.191 -..B2.187: - jne ..B2.192 -..B2.188: - movl 184(%esp), %ecx - cmpl %edx, %ecx - ja ..B2.191 -..B2.189: - jne ..B2.192 -..B2.190: - movl 180(%esp), %edx - cmpl 96(%esp), %edx - jbe ..B2.192 -..B2.191: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 108(%esp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - jmp ..B2.193 -..B2.192: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 108(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) -..B2.193: - fld %st(0) - fadd %st(2), %st - fstpt 208(%esp) - fldt 208(%esp) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 220(%esp) - fldt 220(%esp) - jmp ..B2.231 -..B2.194: - movl 184(%esp), %ecx -..B2.195: - testl %ecx, %ecx - jne ..B2.197 -..B2.244: - cmpl $0, 180(%esp) -..B2.196: - je ..B2.198 -..B2.197: - lea -16517(%eax,%ebx), %edx - lea -16383(%esi,%edi), %ebx - cmpl %ebx, %edx - jl ..B2.199 -..B2.198: - fldt 96(%esp) - fchs - movl %eax, 232(%esp) - fstpt 208(%esp) - fldt 208(%esp) - fldt 108(%esp) - fchs - fstpt 220(%esp) - fldt 220(%esp) - jmp ..B2.231 -..B2.199: - movl 180(%esp), %eax - movl %ecx, 212(%esp) - movl 188(%esp), %edx - movl 192(%esp), %ecx - movl 196(%esp), %ebx - movl 200(%esp), %esi - movl %eax, 208(%esp) - movl %edx, 216(%esp) - fldt 208(%esp) - movl 204(%esp), %eax - movl %ecx, 220(%esp) - movl %ebx, 224(%esp) - movl %esi, 228(%esp) - fldt 220(%esp) - movl %eax, 232(%esp) - jmp ..B2.231 -..B2.200: - movl 92(%esp), %eax - lea 460(%esp), %edx - movl $0, 84(%esp) - fldt 60+_CONSTANTS@GOTOFF(%eax) - fstpt 60(%esp) - fldt 72+_CONSTANTS@GOTOFF(%eax) - lea 96(%esp), %eax - fstpt -24(%eax) - call asinpoly -..B2.201: - fldt 96(%esp) - fldt 108(%esp) - movl 8(%ebp), %eax - movl 92(%esp), %esi - movzwl 68(%esp), %edi - movzbl 9(%eax), %ecx - andl $32767, %edi - andl $128, %ecx - shrl $7, %ecx - cmpl $8383, %edi - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %ebx - fldt _CONSTANTS@GOTOFF(%ebx,%esi) - fmul %st, %st(2) - fxch %st(2) - fstpt 96(%esp) - fmulp %st, %st(1) - fstpt 108(%esp) - jl ..B2.205 -..B2.202: - cmpl $24383, %edi - jg ..B2.205 -..B2.203: - movzwl 104(%esp), %esi - andl $32767, %esi - cmpl $8383, %esi - jl ..B2.205 -..B2.204: - cmpl $24383, %esi - jle ..B2.208 -..B2.205: - addl $4, %esp - lea 56(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.206: - addl $4, %esp - lea 92(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B2.207: - movzwl 104(%esp), %esi - movzwl 68(%esp), %edi - andl $32767, %esi - andl $32767, %edi -..B2.208: - movl 120(%esp), %eax - movl 84(%esp), %ebx - lea -134(%eax,%esi), %ecx - lea (%edi,%ebx), %edx - movl %edx, 32(%esp) - cmpl %ecx, %edx - jle ..B2.225 -..B2.209: - movl 64(%esp), %ecx - lea 134(%eax,%esi), %edx - cmpl 32(%esp), %edx - jle ..B2.226 -..B2.210: - testl %ecx, %ecx - jne ..B2.212 -..B2.211: - cmpl $0, 60(%esp) - je ..B2.227 -..B2.212: - movl 100(%esp), %edx - testl %edx, %edx - jne ..B2.214 -..B2.213: - cmpl $0, 96(%esp) - je ..B2.226 -..B2.214: - cmpl %eax, %ebx - je ..B2.216 -..B2.215: - fldt 48(%esp) - subl %eax, %ebx - fstpt 32(%esp) - addl $16383, %ebx - fldt 60(%esp) - andl $32767, %ebx - fldt 72(%esp) - andb $127, 41(%esp) - movzwl 40(%esp), %ecx - andl $-32768, %ecx - orl %ebx, %ecx - movw %cx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 60(%esp) - fldt 60(%esp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 68(%esp), %edi - movl %eax, 84(%esp) - andl $32767, %edi - fstpt 72(%esp) - fldt 72(%esp) - jmp ..B2.217 -..B2.216: - fldt 60(%esp) - fldt 72(%esp) -..B2.217: - fldt 96(%esp) - fld %st(2) - movl %eax, 232(%esp) - cmpl %esi, %edi - fsub %st(1), %st - jg ..B2.222 -..B2.218: - jne ..B2.223 -..B2.219: - movl 64(%esp), %ecx - cmpl %edx, %ecx - ja ..B2.222 -..B2.220: - jne ..B2.223 -..B2.221: - movl 60(%esp), %edx - cmpl 96(%esp), %edx - jbe ..B2.223 -..B2.222: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 108(%esp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - jmp ..B2.224 -..B2.223: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 108(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) -..B2.224: - fld %st(0) - fadd %st(2), %st - fstpt 208(%esp) - fldt 208(%esp) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 220(%esp) - fldt 220(%esp) - jmp ..B2.231 -..B2.225: - movl 64(%esp), %ecx -..B2.226: - testl %ecx, %ecx - jne ..B2.228 -..B2.245: - cmpl $0, 60(%esp) -..B2.227: - je ..B2.198 -..B2.228: - lea -16517(%eax,%esi), %edx - lea -16383(%ebx,%edi), %esi - cmpl %esi, %edx - jge ..B2.198 -..B2.230: - movl %ecx, 212(%esp) - movl 60(%esp), %eax - movl 68(%esp), %edx - movl 72(%esp), %ecx - movl 76(%esp), %esi - movl 80(%esp), %edi - movl %eax, 208(%esp) - movl %ebx, %eax - movl %edx, 216(%esp) - fldt 208(%esp) - movl %ecx, 220(%esp) - movl %esi, 224(%esp) - movl %edi, 228(%esp) - fldt 220(%esp) - movl %eax, 232(%esp) -..B2.231: - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl %eax, 24(%esp) - call __libm_scalbl_k80 -..B2.232: - movl 488(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B2.236 -..B2.233: - addl $500, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.234: - movl 92(%esp), %edx - incl %eax - movl %eax, 56(%esp) - fldt 48+_CONSTANTS@GOTOFF(%edx) - fmul %st, %st(2) - fxch %st(2) - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(1) - fmul %st(2), %st - fstpt 44(%esp) - fldt 44(%esp) - fxch %st(1) - fxch %st(2) - jmp ..B2.161 -..B2.235: - movl 92(%esp), %edx - incl %eax - movl %eax, 148(%esp) - fldt 48+_CONSTANTS@GOTOFF(%edx) - fmul %st, %st(2) - fxch %st(2) - fstpt 124(%esp) - fldt 124(%esp) - fxch %st(1) - fmul %st(2), %st - fstpt 136(%esp) - fldt 136(%esp) - fxch %st(1) - fxch %st(2) - jmp ..B2.169 -..B2.236: - fstp %st(0) - movl 92(%esp), %ebx - call __stack_chk_fail@PLT - .align 16,0x90 - .type __libm_recacosl_k80,@function - .size __libm_recacosl_k80,.-__libm_recacosl_k80 - .data -# -- End __libm_recacosl_k80 - .text -# -- Begin asinpoly - .text - .align 16,0x90 -asinpoly: -# parameter 1: %eax -# parameter 2: %edx -..B3.1: -..L5: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $164, %esp - movl %edx, %esi - call ..L6 -..L6: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L6](%ecx), %ecx - movl %eax, %ebx - movl 24(%esi), %edx - fldt _CONSTANTS@GOTOFF(%ecx) - movzwl 8+_CONSTANTS@GOTOFF(%ecx), %eax - andl $-32768, %eax - lea 16383(%edx), %edi - andl $32767, %edi - orl %edi, %eax - movzwl 8(%esi), %edi - andl $32767, %edi - addl %edi, %edx - fstpt 136(%esp) - cmpl $16343, %edx - jl ..B3.38 -..B3.2: - fldt (%esi) - fldt 12(%esi) - fldt 264+_CONSTANTS@GOTOFF(%ecx) - fldt 240+_CONSTANTS@GOTOFF(%ecx) - fldt 216+_CONSTANTS@GOTOFF(%ecx) - movw %ax, 144(%esp) - fldt 136(%esp) - fmul %st, %st(5) - fld %st(5) - fmul %st(6), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fmulp %st, %st(6) - fxch %st(5) - fstpt 40(%esp) - fldt 40(%esp) - fxch %st(6) - fstpt 104(%esp) - fldt 104(%esp) - fstpt (%esp) - fldt (%esp) - fldt 288+_CONSTANTS@GOTOFF(%ecx) - fmul %st(2), %st - faddp %st, %st(5) - fxch %st(1) - fmul %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 192+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 168+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 144+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 276+_CONSTANTS@GOTOFF(%ecx) - fmul %st(1), %st - fldt 252+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 228+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 204+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 180+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 156+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 132+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fld %st(1) - fldt 36+_CONSTANTS@GOTOFF(%ecx) - fstpt 72(%esp) - fldt 72(%esp) - fmul %st(3), %st - movzwl 20(%esp), %eax - fsubr %st, %st(1) - andl $32767, %eax - faddp %st, %st(1) - fld %st(0) - cmpl $16377, %eax - fsubr %st(3), %st - fstpt 56(%esp) - fldt 56(%esp) - fld %st(1) - fmul %st(2), %st - fxch %st(5) - fmulp %st, %st(4) - fxch %st(3) - fadd %st(0), %st - fxch %st(1) - fstpt 24(%esp) - fldt 24(%esp) - fmul %st(3), %st - fadd %st(0), %st - fld %st(0) - fadd %st(5), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(6) - fxch %st(2) - faddp %st, %st(6) - fxch %st(4) - fmul %st(0), %st - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 88(%esp) - fldt 88(%esp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 120(%esp) - fldt 120+_CONSTANTS@GOTOFF(%ecx) - fld %st(0) - fadd %st(2), %st - jg ..B3.7 -..B3.3: - jne ..B3.8 -..B3.4: - movl 16(%esp), %eax - cmpl 124+_CONSTANTS@GOTOFF(%ecx), %eax - ja ..B3.7 -..B3.5: - jne ..B3.8 -..B3.6: - movl 12(%esp), %eax - cmpl 120+_CONSTANTS@GOTOFF(%ecx), %eax - jbe ..B3.8 -..B3.7: - fldt 336+_CONSTANTS@GOTOFF(%ecx) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 24+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - jmp ..B3.9 -..B3.8: - fldt 24+_CONSTANTS@GOTOFF(%ecx) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 336+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(1) -..B3.9: - fldt 88(%esp) - fld %st(0) - fld %st(2) - fadd %st(4), %st - fld %st(0) - fld %st(1) - fxch %st(2) - fsubr %st, %st(6) - fxch %st(5) - faddp %st, %st(6) - fxch %st(3) - fmul %st, %st(5) - fldt 72(%esp) - fld %st(0) - fmul %st(6), %st - fsubr %st, %st(5) - faddp %st, %st(5) - fxch %st(2) - fsub %st(4), %st - fld %st(1) - fmulp %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(2) - fstpt 136(%esp) - fldt 136(%esp) - fsubr %st, %st(2) - fxch %st(2) - fstpt 152(%esp) - fldt 152(%esp) - fld %st(3) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(4) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fldt 120(%esp) - fmulp %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fldt 152(%esp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubr %st, %st(2) - movzwl 20(%esp), %eax - fxch %st(1) - faddp %st, %st(2) - fldt 108+_CONSTANTS@GOTOFF(%ecx) - andl $32767, %eax - fld %st(0) - cmpl $16378, %eax - fadd %st(2), %st - jg ..B3.14 -..B3.10: - jne ..B3.15 -..B3.11: - movl 16(%esp), %eax - cmpl 112+_CONSTANTS@GOTOFF(%ecx), %eax - ja ..B3.14 -..B3.12: - jne ..B3.15 -..B3.13: - movl 12(%esp), %eax - cmpl 108+_CONSTANTS@GOTOFF(%ecx), %eax - jbe ..B3.15 -..B3.14: - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 324+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - jmp ..B3.16 -..B3.15: - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldt 324+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(2) -..B3.16: - fldt 136(%esp) - fld %st(0) - fld %st(3) - fadd %st(3), %st - fld %st(0) - fld %st(1) - fxch %st(2) - fsubr %st, %st(5) - fxch %st(6) - faddp %st, %st(5) - fldt 72(%esp) - fmul %st(6), %st - fsubr %st, %st(1) - faddp %st, %st(1) - fmul %st, %st(2) - fsubr %st, %st(1) - fxch %st(1) - fmul %st, %st(3) - fldt 152(%esp) - fmul %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt 120(%esp) - fmulp %st, %st(5) - fldt 88(%esp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubr %st, %st(1) - movzwl 20(%esp), %eax - fxch %st(2) - faddp %st, %st(1) - fldt 96+_CONSTANTS@GOTOFF(%ecx) - andl $32767, %eax - fld %st(0) - cmpl $16379, %eax - fadd %st(3), %st - jg ..B3.21 -..B3.17: - jne ..B3.22 -..B3.18: - movl 16(%esp), %eax - cmpl 100+_CONSTANTS@GOTOFF(%ecx), %eax - ja ..B3.21 -..B3.19: - jne ..B3.22 -..B3.20: - movl 12(%esp), %eax - cmpl 96+_CONSTANTS@GOTOFF(%ecx), %eax - jbe ..B3.22 -..B3.21: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 312+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - jmp ..B3.23 -..B3.22: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 312+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(1) -..B3.23: - fldt 136(%esp) - fld %st(0) - fld %st(2) - fadd %st(4), %st - fld %st(0) - fld %st(1) - fxch %st(2) - fsubr %st, %st(6) - fxch %st(5) - faddp %st, %st(6) - fldt 72(%esp) - fmul %st(5), %st - fsubr %st, %st(1) - faddp %st, %st(1) - fmul %st, %st(2) - fsubr %st, %st(1) - fxch %st(1) - fmul %st, %st(3) - fldt 152(%esp) - fmul %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 120(%esp) - fmulp %st, %st(3) - fldt 88(%esp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubr %st, %st(2) - movzwl 20(%esp), %eax - fxch %st(1) - faddp %st, %st(2) - fldt 84+_CONSTANTS@GOTOFF(%ecx) - andl $32767, %eax - fld %st(0) - cmpl $16380, %eax - fadd %st(2), %st - jg ..B3.28 -..B3.24: - jne ..B3.29 -..B3.25: - movl 16(%esp), %eax - cmpl 88+_CONSTANTS@GOTOFF(%ecx), %eax - ja ..B3.28 -..B3.26: - jne ..B3.29 -..B3.27: - movl 12(%esp), %eax - cmpl 84+_CONSTANTS@GOTOFF(%ecx), %eax - jbe ..B3.29 -..B3.28: - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 300+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - jmp ..B3.30 -..B3.29: - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldt 300+_CONSTANTS@GOTOFF(%ecx) - faddp %st, %st(2) -..B3.30: - fldt 72(%esp) - fld %st(2) - movzwl 8(%esp), %edx - fadd %st(2), %st - fmul %st, %st(1) - fld %st(0) - andl $32767, %edx - fsub %st(2), %st - faddp %st, %st(2) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(2) - fsub %st(1), %st - fldt 136(%esp) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st(2), %st - fldt 152(%esp) - fmul %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(1) - fldt 120(%esp) - fmulp %st, %st(5) - fldt 88(%esp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(2) - fldt 72(%esp) - fmul %st(4), %st - fsubr %st, %st(1) - faddp %st, %st(1) - fsubr %st, %st(1) - fldt 24(%esp) - fld %st(0) - fmul %st(2), %st - fxch %st(1) - fmul %st(3), %st - fldt 56(%esp) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(0) - fldt 40(%esp) - fmulp %st, %st(5) - fldt 104(%esp) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(5) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fadd %st(3), %st - fstpt 12(%esp) - fldt 12(%esp) - fsubr %st, %st(1) - movzwl 20(%esp), %eax - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fadd %st(2), %st - andl $32767, %eax - cmpl %edx, %eax - jg ..B3.35 -..B3.31: - jne ..B3.36 -..B3.32: - movl 16(%esp), %eax - movl 4(%esp), %edx - cmpl %edx, %eax - ja ..B3.35 -..B3.33: - jne ..B3.36 -..B3.34: - movl 12(%esp), %eax - cmpl (%esp), %eax - jbe ..B3.36 -..B3.35: - fldt 104(%esp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 40(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - jmp ..B3.37 -..B3.36: - fldt 104(%esp) - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 40(%esp) - faddp %st, %st(2) -..B3.37: - fld %st(1) - movl $0, 24(%ebx) - fadd %st(1), %st - fstpt (%ebx) - fldt (%ebx) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 12(%ebx) - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B3.38: - movl (%esi), %eax - movl 4(%esi), %edx - movl %eax, (%ebx) - movl %edx, 4(%ebx) - movl 8(%esi), %ecx - movl 12(%esi), %edi - movl 16(%esi), %eax - movl 20(%esi), %edx - movl 24(%esi), %esi - movl %ecx, 8(%ebx) - movl %edi, 12(%ebx) - movl %eax, 16(%ebx) - movl %edx, 20(%ebx) - movl %esi, 24(%ebx) -..B3.39: - addl $164, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type asinpoly,@function - .size asinpoly,.-asinpoly - .data -# -- End asinpoly - .text -# -- Begin __libm_recasinl_k80 - .text - .align 16,0x90 - .hidden __libm_recasinl_k80 - .globl __libm_recasinl_k80 -__libm_recasinl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -# parameter 4: 20 + %ebp -# parameter 5: 24 + %ebp -# parameter 6: 28 + %ebp -# parameter 7: 32 + %ebp -# parameter 8: 36 + %ebp -# parameter 9: 40 + %ebp -# parameter 10: 44 + %ebp -..B4.1: -..L7: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $436, %esp - movl 16(%ebp), %esi - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 432(%esp) - movzwl 8(%esi), %eax - andl $32767, %eax - movl 44(%ebp), %edi - cmpl $8383, %eax - jl ..B4.5 -..B4.2: - cmpl $24383, %eax - jg ..B4.5 -..B4.3: - movzwl 8(%edi), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.5 -..B4.4: - cmpl $24383, %eax - jle ..B4.7 -..B4.5: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B4.6: - addl $4, %esp - pushl %edi - call __libm_normalizel_k80 -..B4.7: - fldt (%esi) - fld %st(0) - fldt (%edi) - fdivr %st, %st(1) - fld %st(0) - call ..L8 -..L8: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L8](%eax), %eax - fld %st(1) - movl 24(%esi), %ebx - subl 24(%edi), %ebx - fldt 36+_CONSTANTS@GOTOFF(%eax) - fld %st(0) - fmul %st(5), %st - lea 1(%ebx), %edx - fld %st(0) - movl %eax, 92(%esp) - fsubr %st(6), %st - movl %edx, 428(%esp) - faddp %st, %st(1) - fld %st(0) - fsubr %st(6), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(3) - fsub %st(4), %st - faddp %st, %st(4) - fld %st(4) - fsub %st(4), %st - fxch %st(3) - fstpt 80(%esp) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fsubrp %st, %st(3) - fldt 12(%esi) - faddp %st, %st(3) - fldt 12(%edi) - fmul %st(2), %st - fsubrp %st, %st(3) - fdivrp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 404(%esp) - fldt 404(%esp) - fsubrp %st, %st(1) - movzwl 412(%esp), %ecx - fadd %st(1), %st - andl $32767, %ecx - fstpt 416(%esp) - fstpt 48(%esp) - lea 1(%ecx,%ebx), %eax - cmpl $16382, %eax - jl ..B4.191 -..B4.8: - movl 8(%ebp), %eax - movl 40(%ebp), %ebx - movzwl 8(%eax), %edx - andl $32767, %edx - cmpl $16383, %edx - jl ..B4.39 -..B4.9: - movl 32(%ebp), %eax - movl (%eax), %edx - movl %edx, 96(%esp) - movl 8(%eax), %edx - movl 4(%eax), %ecx - movl %edx, 104(%esp) - movl 16(%eax), %edx - movl %ecx, 100(%esp) - movl 12(%eax), %ecx - movl %edx, 112(%esp) - movzwl 8(%ebx), %edx - movl %ecx, 108(%esp) - movl 20(%eax), %ecx - movl %edx, 68(%esp) - andl $32767, %edx - movl 24(%eax), %eax - cmpl $8383, %edx - movl %ecx, 116(%esp) - movl %eax, 120(%esp) - jl ..B4.13 -..B4.10: - cmpl $24383, %edx - jg ..B4.13 -..B4.11: - movl 24(%ebp), %eax - movzwl 8(%eax), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - movl %ecx, 40(%esp) - cmpl $8383, %ecx - jl ..B4.13 -..B4.12: - cmpl $24383, 40(%esp) - jle ..B4.16 -..B4.13: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B4.14: - addl $4, %esp - pushl 24(%ebp) - call __libm_normalizel_k80 -..B4.15: - movl 24(%ebp), %eax - movzwl 8(%ebx), %edx - movl %edx, 68(%esp) - andl $32767, %edx - movzwl 8(%eax), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - movl %ecx, 40(%esp) -..B4.16: - movl 24(%ebp), %ecx - movl 24(%ecx), %eax - movl 40(%esp), %ecx - movl %eax, 64(%esp) - lea -134(%eax,%ecx), %eax - movl 24(%ebx), %ecx - movl %ecx, 60(%esp) - addl %edx, %ecx - movl %ecx, 36(%esp) - cmpl %ecx, %eax - jge ..B4.33 -..B4.17: - movl 4(%ebx), %eax - movl %eax, 32(%esp) - movl 64(%esp), %ecx - movl 40(%esp), %eax - lea 134(%ecx,%eax), %ecx - cmpl 36(%esp), %ecx - jle ..B4.34 -..B4.18: - cmpl $0, 32(%esp) - jne ..B4.20 -..B4.19: - cmpl $0, (%ebx) - je ..B4.35 -..B4.20: - movl 24(%ebp), %eax - cmpl $0, 4(%eax) - jne ..B4.22 -..B4.21: - movl 24(%ebp), %eax - cmpl $0, (%eax) - je ..B4.34 -..B4.22: - movl 64(%esp), %eax - cmpl 60(%esp), %eax - je ..B4.24 -..B4.23: - fldt 48(%esp) - movl 60(%esp), %eax - movl 64(%esp), %ecx - subl %ecx, %eax - fstpt 32(%esp) - addl $16383, %eax - fldt (%ebx) - andl $32767, %eax - fldt 12(%ebx) - andb $127, 41(%esp) - movzwl 40(%esp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %ecx, 24(%ebx) - movl 24(%ebp), %ecx - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fstpt 48(%esp) - fmulp %st, %st(1) - movl 24(%ecx), %eax - fstpt 12(%ebx) - fldt 12(%ebx) - movl %eax, 64(%esp) - movzwl 8(%ebx), %edx - movzwl 8(%ecx), %eax - movl %edx, 68(%esp) - movl %eax, 44(%esp) - jmp ..B4.25 -..B4.24: - fldt (%ebx) - fstpt 48(%esp) - fldt 12(%ebx) -..B4.25: - fldt 48(%esp) - movl 24(%ebp), %edx - movl 64(%esp), %eax - movl %eax, 148(%esp) - fldt (%edx) - movl 68(%esp), %ecx - fadd %st, %st(1) - movl 44(%esp), %eax - andl $32767, %ecx - andl $32767, %eax - cmpl %eax, %ecx - jg ..B4.30 -..B4.26: - jne ..B4.31 -..B4.27: - movl 24(%ebp), %edx - movl 4(%ebx), %eax - cmpl 4(%edx), %eax - ja ..B4.30 -..B4.28: - jne ..B4.31 -..B4.29: - movl 24(%ebp), %edx - movl (%ebx), %eax - cmpl (%edx), %eax - jbe ..B4.31 -..B4.30: - fldt 48(%esp) - movl 24(%ebp), %eax - fsub %st(2), %st - faddp %st, %st(1) - fldt 12(%eax) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - jmp ..B4.32 -..B4.31: - fldt 48(%esp) - fxch %st(1) - fsub %st(2), %st - movl 24(%ebp), %eax - faddp %st, %st(1) - faddp %st, %st(2) - fldt 12(%eax) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) -..B4.32: - fldt 48(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 124(%esp) - fldt 124(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 136(%esp) - jmp ..B4.69 -..B4.33: - movl 4(%ebx), %eax - movl %eax, 32(%esp) -..B4.34: - cmpl $0, 32(%esp) - jne ..B4.36 -..B4.202: - cmpl $0, (%ebx) -..B4.35: - je ..B4.37 -..B4.36: - movl 64(%esp), %ecx - movl 40(%esp), %eax - lea -16517(%ecx,%eax), %eax - movl 60(%esp), %ecx - lea -16383(%ecx,%edx), %edx - cmpl %edx, %eax - jl ..B4.38 -..B4.37: - movl 24(%ebp), %eax - movl (%eax), %edx - movl 4(%eax), %ecx - movl 8(%eax), %ebx - movl %edx, 124(%esp) - movl %ecx, 128(%esp) - movl %ebx, 132(%esp) - movl 12(%eax), %edx - movl 16(%eax), %ecx - movl 20(%eax), %ebx - movl 24(%eax), %eax - movl %edx, 136(%esp) - movl %ecx, 140(%esp) - movl %ebx, 144(%esp) - movl %eax, 148(%esp) - jmp ..B4.69 -..B4.38: - movl (%ebx), %eax - movl 4(%ebx), %edx - movl 8(%ebx), %ecx - movl %eax, 124(%esp) - movl %edx, 128(%esp) - movl %ecx, 132(%esp) - movl 12(%ebx), %eax - movl 16(%ebx), %edx - movl 20(%ebx), %ecx - movl 24(%ebx), %ebx - movl %eax, 136(%esp) - movl %edx, 140(%esp) - movl %ecx, 144(%esp) - movl %ebx, 148(%esp) - jmp ..B4.69 -..B4.39: - movl 92(%esp), %eax - movzwl 8(%ebx), %edx - movl %edx, 68(%esp) - andl $32767, %edx - fldt _CONSTANTS@GOTOFF(%eax) - cmpl $8383, %edx - movl $0, 148(%esp) - fstpt 124(%esp) - fldt 24+_CONSTANTS@GOTOFF(%eax) - fstpt 136(%esp) - jl ..B4.43 -..B4.40: - cmpl $24383, %edx - jg ..B4.43 -..B4.41: - movl 24(%ebp), %eax - movzwl 8(%eax), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - movl %ecx, 40(%esp) - cmpl $8383, %ecx - jl ..B4.43 -..B4.42: - cmpl $24383, 40(%esp) - jle ..B4.46 -..B4.43: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B4.44: - addl $4, %esp - pushl 24(%ebp) - call __libm_normalizel_k80 -..B4.45: - movl 24(%ebp), %eax - movzwl 8(%ebx), %edx - movl %edx, 68(%esp) - andl $32767, %edx - movzwl 8(%eax), %ecx - movl %ecx, 44(%esp) - andl $32767, %ecx - movl %ecx, 40(%esp) -..B4.46: - movl 24(%ebp), %ecx - movl 24(%ecx), %eax - movl 40(%esp), %ecx - movl %eax, 64(%esp) - lea -134(%eax,%ecx), %eax - movl 24(%ebx), %ecx - movl %ecx, 60(%esp) - addl %edx, %ecx - movl %ecx, 36(%esp) - cmpl %ecx, %eax - jge ..B4.63 -..B4.47: - movl 4(%ebx), %eax - movl %eax, 32(%esp) - movl 64(%esp), %ecx - movl 40(%esp), %eax - lea 134(%ecx,%eax), %ecx - cmpl 36(%esp), %ecx - jle ..B4.64 -..B4.48: - cmpl $0, 32(%esp) - jne ..B4.50 -..B4.49: - cmpl $0, (%ebx) - je ..B4.65 -..B4.50: - movl 24(%ebp), %eax - cmpl $0, 4(%eax) - jne ..B4.52 -..B4.51: - movl 24(%ebp), %eax - cmpl $0, (%eax) - je ..B4.64 -..B4.52: - movl 64(%esp), %eax - cmpl 60(%esp), %eax - je ..B4.54 -..B4.53: - fldt 48(%esp) - movl 60(%esp), %eax - movl 64(%esp), %ecx - subl %ecx, %eax - fstpt 32(%esp) - addl $16383, %eax - fldt (%ebx) - andl $32767, %eax - fldt 12(%ebx) - andb $127, 41(%esp) - movzwl 40(%esp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %ecx, 24(%ebx) - movl 24(%ebp), %ecx - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - movl 24(%ecx), %eax - fstpt 12(%ebx) - fldt 12(%ebx) - movl %eax, 64(%esp) - movzwl 8(%ebx), %edx - movzwl 8(%ecx), %eax - fstpt 48(%esp) - movl %edx, 68(%esp) - movl %eax, 44(%esp) - jmp ..B4.55 -..B4.54: - fldt (%ebx) - fldt 12(%ebx) - fstpt 48(%esp) -..B4.55: - movl 24(%ebp), %edx - fld %st(0) - movl 64(%esp), %eax - movl %eax, 120(%esp) - fldt (%edx) - movl 68(%esp), %ecx - fsubr %st, %st(1) - movl 44(%esp), %eax - andl $32767, %ecx - andl $32767, %eax - cmpl %eax, %ecx - jg ..B4.60 -..B4.56: - jne ..B4.61 -..B4.57: - movl 24(%ebp), %edx - movl 4(%ebx), %eax - cmpl 4(%edx), %eax - ja ..B4.60 -..B4.58: - jne ..B4.61 -..B4.59: - movl 24(%ebp), %edx - movl (%ebx), %eax - cmpl (%edx), %eax - jbe ..B4.61 -..B4.60: - fldt 48(%esp) - fxch %st(2) - fsubr %st, %st(3) - movl 24(%ebp), %eax - fxch %st(1) - fsubrp %st, %st(3) - fldt 12(%eax) - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 48(%esp) - jmp ..B4.62 -..B4.61: - movl 24(%ebp), %eax - fadd %st(1), %st - fsubrp %st, %st(2) - fldt 48(%esp) - faddp %st, %st(2) - fldt 12(%eax) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) -..B4.62: - fldt 48(%esp) - fld %st(0) - fadd %st(2), %st - fstpt 96(%esp) - fldt 96(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 108(%esp) - jmp ..B4.69 -..B4.63: - movl 4(%ebx), %eax - movl %eax, 32(%esp) -..B4.64: - cmpl $0, 32(%esp) - jne ..B4.66 -..B4.201: - cmpl $0, (%ebx) -..B4.65: - je ..B4.67 -..B4.66: - movl 64(%esp), %eax - movl 40(%esp), %ecx - movl 60(%esp), %ebx - lea -16517(%eax,%ecx), %eax - lea -16383(%ebx,%edx), %edx - movl 40(%ebp), %ebx - cmpl %edx, %eax - jl ..B4.68 -..B4.67: - movl 24(%ebp), %edx - movl 64(%esp), %eax - movl %eax, 120(%esp) - fldt (%edx) - fchs - fstpt 96(%esp) - fldt 12(%edx) - fchs - fstpt 108(%esp) - jmp ..B4.69 -..B4.68: - movl (%ebx), %eax - movl 4(%ebx), %edx - movl 8(%ebx), %ecx - movl %eax, 96(%esp) - movl %edx, 100(%esp) - movl %ecx, 104(%esp) - movl 12(%ebx), %eax - movl 16(%ebx), %edx - movl 20(%ebx), %ecx - movl 24(%ebx), %ebx - movl %eax, 108(%esp) - movl %edx, 112(%esp) - movl %ecx, 116(%esp) - movl %ebx, 120(%esp) -..B4.69: - movzwl 8(%esi), %eax - movl %eax, 68(%esp) - andl $32767, %eax - movl 24(%esi), %ecx - incl %ecx - movl %ecx, 24(%esi) - cmpl $8383, %eax - movl %eax, 76(%esp) - jl ..B4.73 -..B4.70: - cmpl $24383, 76(%esp) - jg ..B4.73 -..B4.71: - movzwl 8(%edi), %edx - movl %edx, %eax - andl $32767, %eax - movl %eax, 72(%esp) - cmpl $8383, %eax - jl ..B4.73 -..B4.72: - cmpl $24383, 72(%esp) - jle ..B4.76 -..B4.73: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B4.74: - addl $4, %esp - pushl %edi - call __libm_normalizel_k80 -..B4.75: - movzwl 8(%esi), %edx - movl %edx, 68(%esp) - andl $32767, %edx - movl %edx, 76(%esp) - movzwl 8(%edi), %edx - movl %edx, %eax - andl $32767, %eax - movl %eax, 72(%esp) - movl 24(%esi), %ecx -..B4.76: - movl 76(%esp), %ebx - movl 24(%edi), %edi - movl %edi, 64(%esp) - lea (%ecx,%ebx), %eax - movl 72(%esp), %ebx - movl %eax, 60(%esp) - lea -134(%edi,%ebx), %edi - cmpl %edi, %eax - movl 44(%ebp), %edi - jle ..B4.93 -..B4.77: - movl 4(%esi), %eax - movl %eax, 44(%esp) - movl 64(%esp), %ebx - movl 72(%esp), %eax - lea 134(%ebx,%eax), %ebx - cmpl 60(%esp), %ebx - jle ..B4.94 -..B4.78: - cmpl $0, 44(%esp) - jne ..B4.80 -..B4.79: - cmpl $0, (%esi) - je ..B4.95 -..B4.80: - cmpl $0, 4(%edi) - jne ..B4.82 -..B4.81: - cmpl $0, (%edi) - je ..B4.94 -..B4.82: - cmpl 64(%esp), %ecx - je ..B4.84 -..B4.83: - fldt 48(%esp) - movl 64(%esp), %edx - subl %edx, %ecx - fstpt 32(%esp) - addl $16383, %ecx - fldt (%esi) - andl $32767, %ecx - fldt 12(%esi) - andb $127, 41(%esp) - movzwl 40(%esp), %eax - andl $-32768, %eax - orl %ecx, %eax - movl %edx, %ecx - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 24(%esi) - fxch %st(2) - fstpt (%esi) - fldt (%esi) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%esi) - fldt 12(%esi) - movl 24(%edi), %ebx - movzwl 8(%esi), %eax - movl %ebx, 64(%esp) - movl %eax, 68(%esp) - movzwl 8(%edi), %edx - jmp ..B4.85 -..B4.84: - fldt (%esi) - fldt 12(%esi) -..B4.85: - fldt (%edi) - fld %st(2) - movl 64(%esp), %eax - fadd %st(1), %st - movl %eax, 176(%esp) - movl %edx, %eax - movl 68(%esp), %ebx - andl $32767, %eax - andl $32767, %ebx - cmpl %eax, %ebx - jg ..B4.90 -..B4.86: - jne ..B4.91 -..B4.87: - movl 4(%esi), %eax - cmpl 4(%edi), %eax - ja ..B4.90 -..B4.88: - jne ..B4.91 -..B4.89: - movl (%esi), %eax - cmpl (%edi), %eax - jbe ..B4.91 -..B4.90: - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 12(%edi) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - jmp ..B4.92 -..B4.91: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 12(%edi) - faddp %st, %st(2) -..B4.92: - fld %st(1) - fadd %st(1), %st - fstpt 152(%esp) - fldt 152(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 164(%esp) - jmp ..B4.99 -..B4.93: - movl 4(%esi), %eax - movl %eax, 44(%esp) -..B4.94: - cmpl $0, 44(%esp) - jne ..B4.96 -..B4.203: - cmpl $0, (%esi) -..B4.95: - je ..B4.97 -..B4.96: - movl 64(%esp), %ebx - movl 72(%esp), %eax - lea -16517(%ebx,%eax), %eax - movl 76(%esp), %ebx - lea -16383(%ecx,%ebx), %ebx - cmpl %ebx, %eax - jl ..B4.98 -..B4.97: - movl (%edi), %eax - movl %eax, 152(%esp) - movl 4(%edi), %ebx - movl 8(%edi), %eax - movl %ebx, 156(%esp) - movl %eax, 160(%esp) - movl 12(%edi), %ebx - movl 16(%edi), %eax - movl %ebx, 164(%esp) - movl %eax, 168(%esp) - movl 20(%edi), %ebx - movl 24(%edi), %eax - movl %ebx, 172(%esp) - movl %eax, 176(%esp) - jmp ..B4.99 -..B4.98: - movl (%esi), %eax - movl %eax, 152(%esp) - movl 4(%esi), %ebx - movl 8(%esi), %eax - movl %ebx, 156(%esp) - movl %eax, 160(%esp) - movl 12(%esi), %ebx - movl 16(%esi), %eax - movl %ebx, 164(%esp) - movl %eax, 168(%esp) - movl 20(%esi), %ebx - movl 24(%esi), %eax - movl %ebx, 172(%esp) - movl %eax, 176(%esp) -..B4.99: - movzwl 160(%esp), %eax - decl %ecx - andl $32767, %eax - movl %ecx, 24(%esi) - cmpl $8383, %eax - jl ..B4.103 -..B4.100: - cmpl $24383, %eax - jg ..B4.103 -..B4.101: - movzwl 104(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.103 -..B4.102: - cmpl $24383, %eax - jle ..B4.105 -..B4.103: - addl $4, %esp - lea 148(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.104: - addl $4, %esp - lea 92(%esp), %eax - pushl %eax - call __libm_normalizel_k80 - movzwl 8(%edi), %edx -..B4.105: - fldt 152(%esp) - andl $32767, %edx - fld %st(0) - fld %st(1) - fldt 80(%esp) - fld %st(0) - fmul %st(4), %st - movl 176(%esp), %eax - fsubr %st, %st(3) - addl 120(%esp), %eax - faddp %st, %st(3) - fld %st(2) - cmpl $8383, %edx - movl %eax, 204(%esp) - fxch %st(2) - fsub %st(3), %st - fldt 96(%esp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 108(%esp) - fmulp %st, %st(4) - fldt 164(%esp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 180(%esp) - fldt 180(%esp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 192(%esp) - jl ..B4.109 -..B4.106: - cmpl $24383, %edx - jg ..B4.109 -..B4.107: - movzwl 132(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.109 -..B4.108: - cmpl $24383, %eax - jle ..B4.111 -..B4.109: - addl $4, %esp - pushl %edi - call __libm_normalizel_k80 -..B4.110: - addl $4, %esp - lea 120(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.111: - fldt (%edi) - fld %st(0) - fld %st(1) - fldt 80(%esp) - fld %st(0) - fmul %st(4), %st - movl 36(%ebp), %ebx - fsubr %st, %st(3) - movl 148(%esp), %eax - faddp %st, %st(3) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fldt 124(%esp) - fmul %st, %st(2) - fld %st(0) - addl 24(%edi), %eax - fsub %st(3), %st - movl 28(%ebp), %esi - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - movl %eax, 232(%esp) - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 136(%esp) - fmulp %st, %st(4) - fldt 12(%edi) - fmulp %st, %st(1) - movzwl 8(%ebx), %edi - movl %edi, %ecx - andl $32767, %ecx - faddp %st, %st(3) - cmpl $8383, %ecx - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 208(%esp) - fldt 208(%esp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 220(%esp) - fstpt 48(%esp) - jl ..B4.115 -..B4.112: - cmpl $24383, %ecx - jg ..B4.115 -..B4.113: - movzwl 8(%esi), %edx - movl %edx, 60(%esp) - andl $32767, %edx - cmpl $8383, %edx - jl ..B4.115 -..B4.114: - cmpl $24383, %edx - jle ..B4.118 -..B4.115: - addl $4, %esp - pushl %ebx - call __libm_normalizel_k80 -..B4.116: - addl $4, %esp - pushl %esi - call __libm_normalizel_k80 -..B4.117: - movzwl 8(%ebx), %edi - movl %edi, %ecx - movzwl 8(%esi), %edx - andl $32767, %ecx - movl %edx, 60(%esp) - andl $32767, %edx -..B4.118: - movl 24(%esi), %eax - movl 24(%ebx), %ebx - movl %eax, 72(%esp) - movl %ebx, 68(%esp) - lea -134(%eax,%edx), %eax - addl %ecx, %ebx - movl %ebx, 64(%esp) - cmpl %eax, %ebx - movl 36(%ebp), %ebx - jle ..B4.135 -..B4.119: - movl 4(%ebx), %eax - movl %eax, 44(%esp) - movl 72(%esp), %eax - lea 134(%eax,%edx), %eax - cmpl 64(%esp), %eax - jle ..B4.136 -..B4.120: - cmpl $0, 44(%esp) - jne ..B4.122 -..B4.121: - cmpl $0, (%ebx) - je ..B4.137 -..B4.122: - cmpl $0, 4(%esi) - jne ..B4.124 -..B4.123: - cmpl $0, (%esi) - je ..B4.136 -..B4.124: - movl 72(%esp), %eax - cmpl 68(%esp), %eax - je ..B4.126 -..B4.125: - fldt 48(%esp) - movl 68(%esp), %edi - movl %eax, %edx - subl %edx, %edi - fstpt 32(%esp) - addl $16383, %edi - fldt (%ebx) - andl $32767, %edi - fldt 12(%ebx) - andb $127, 41(%esp) - movzwl 40(%esp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - movl %edx, 24(%ebx) - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 12(%ebx) - fldt 12(%ebx) - movl 24(%esi), %ecx - movzwl 8(%esi), %eax - movl %ecx, 72(%esp) - movzwl 8(%ebx), %edi - movl %eax, 60(%esp) - jmp ..B4.127 -..B4.126: - fldt (%ebx) - fldt 12(%ebx) -..B4.127: - fldt (%esi) - andl $32767, %edi - movl 60(%esp), %edx - fld %st(2) - andl $32767, %edx - fadd %st(1), %st - movl 72(%esp), %eax - cmpl %edx, %edi - movl %eax, 260(%esp) - jg ..B4.132 -..B4.128: - jne ..B4.133 -..B4.129: - movl 4(%ebx), %eax - cmpl 4(%esi), %eax - ja ..B4.132 -..B4.130: - jne ..B4.133 -..B4.131: - movl (%ebx), %eax - cmpl (%esi), %eax - jbe ..B4.133 -..B4.132: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 12(%esi) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B4.134 -..B4.133: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 12(%esi) - faddp %st, %st(1) -..B4.134: - fld %st(0) - fadd %st(2), %st - fstpt 236(%esp) - fldt 236(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 248(%esp) - jmp ..B4.141 -..B4.135: - movl 4(%ebx), %eax - movl %eax, 44(%esp) -..B4.136: - cmpl $0, 44(%esp) - jne ..B4.138 -..B4.204: - cmpl $0, (%ebx) -..B4.137: - je ..B4.139 -..B4.138: - movl 72(%esp), %eax - lea -16517(%eax,%edx), %edi - movl 68(%esp), %edx - lea -16383(%edx,%ecx), %ecx - cmpl %ecx, %edi - jl ..B4.140 -..B4.139: - movl (%esi), %eax - movl %eax, 236(%esp) - movl 4(%esi), %edx - movl 8(%esi), %ecx - movl 12(%esi), %ebx - movl 16(%esi), %edi - movl 20(%esi), %eax - movl 24(%esi), %esi - movl %edx, 240(%esp) - movl %ecx, 244(%esp) - movl %ebx, 248(%esp) - movl %edi, 252(%esp) - movl %eax, 256(%esp) - movl %esi, 260(%esp) - jmp ..B4.141 -..B4.140: - movl (%ebx), %eax - movl %eax, 236(%esp) - movl 4(%ebx), %edx - movl 8(%ebx), %ecx - movl 12(%ebx), %esi - movl 16(%ebx), %edi - movl 20(%ebx), %eax - movl 24(%ebx), %ebx - movl %edx, 240(%esp) - movl %ecx, 244(%esp) - movl %esi, 248(%esp) - movl %edi, 252(%esp) - movl %eax, 256(%esp) - movl %ebx, 260(%esp) -..B4.141: - movzwl 216(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.145 -..B4.142: - cmpl $24383, %eax - jg ..B4.145 -..B4.143: - movzwl 244(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.145 -..B4.144: - cmpl $24383, %eax - jle ..B4.147 -..B4.145: - addl $4, %esp - lea 204(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.146: - addl $4, %esp - lea 232(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.147: - fldt 208(%esp) - fld %st(0) - fld %st(1) - fldt 80(%esp) - fld %st(0) - fmul %st(4), %st - movl 232(%esp), %edx - fsubr %st, %st(3) - movzwl 188(%esp), %eax - faddp %st, %st(3) - fld %st(2) - andl $32767, %eax - addl 260(%esp), %edx - fxch %st(2) - fsub %st(3), %st - fldt 236(%esp) - cmpl $8383, %eax - fmul %st, %st(2) - fld %st(0) - movl %edx, 288(%esp) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 248(%esp) - fmulp %st, %st(4) - fldt 220(%esp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 264(%esp) - fldt 264(%esp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 276(%esp) - fldt 276(%esp) - jl ..B4.151 -..B4.148: - cmpl $24383, %eax - jg ..B4.151 -..B4.149: - movzwl 272(%esp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.151 -..B4.150: - cmpl $24383, %eax - jle ..B4.154 -..B4.151: - fstp %st(1) - fstp %st(0) - addl $4, %esp - lea 176(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.152: - addl $4, %esp - lea 260(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.153: - fldt 264(%esp) - fldt 276(%esp) - movl 288(%esp), %edx -..B4.154: - fldt 180(%esp) - fld %st(2) - fdivr %st(1), %st - fmul %st, %st(2) - fld %st(3) - fxch %st(4) - fstpt 64(%esp) - fldt 64(%esp) - fldt 80(%esp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - movl 204(%esp), %ecx - fsubr %st(4), %st - subl %edx, %ecx - faddp %st, %st(1) - fld %st(0) - decl %ecx - movl %ecx, 316(%esp) - fsubr %st(4), %st - fxch %st(2) - fmul %st(3), %st - fsubr %st, %st(7) - faddp %st, %st(7) - fxch %st(2) - fsub %st(6), %st - fld %st(2) - fmul %st(7), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(1) - fmul %st, %st(3) - fxch %st(7) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) - fxch %st(4) - fsubrp %st, %st(2) - fxch %st(3) - fsubrp %st, %st(1) - fldt 192(%esp) - faddp %st, %st(1) - fsubp %st, %st(1) - fldt 64(%esp) - fdivrp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 292(%esp) - fldt 292(%esp) - fsubr %st, %st(2) - movzwl 300(%esp), %eax - fxch %st(1) - fadd %st, %st(2) - andl $32767, %eax - fxch %st(2) - fstpt 304(%esp) - fldt 304(%esp) - cmpl $383, %eax - fxch %st(2) - fstpt 48(%esp) - fxch %st(1) - jl ..B4.156 -..B4.155: - cmpl $32383, %eax - jle ..B4.158 -..B4.156: - fstp %st(0) - fstp %st(0) - addl $4, %esp - lea 288(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.157: - fldt 292(%esp) - fldt 304(%esp) - movl 316(%esp), %ecx -..B4.158: - testb $1, %cl - jne ..B4.196 -..B4.159: - movl 92(%esp), %eax - fldt 48+_CONSTANTS@GOTOFF(%eax) -..B4.160: - fldt 80(%esp) - fld %st(3) - fsqrt - lea 320(%esp), %eax - fmul %st, %st(1) - lea 348(%esp), %edx - fld %st(1) - sarl $1, %ecx - fsubr %st(1), %st - movl %ecx, 52(%eax) - faddp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(2) - fsubrp %st, %st(5) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(2) - fdivr %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 28(%eax) - fldt 28(%eax) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 40(%eax) - call asinpoly -..B4.161: - movl 92(%esp), %eax - xorl %ebx, %ebx - movl 344(%esp), %esi - incl %esi - fldt 60+_CONSTANTS@GOTOFF(%eax) - movzwl 68+_CONSTANTS@GOTOFF(%eax), %edi - andl $32767, %edi - movl %esi, 344(%esp) - cmpl $8383, %edi - movl %ebx, 400(%esp) - fstpt 376(%esp) - fldt 72+_CONSTANTS@GOTOFF(%eax) - fstpt 388(%esp) - jl ..B4.165 -..B4.162: - cmpl $24383, %edi - jg ..B4.165 -..B4.163: - movzwl 328(%esp), %ecx - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B4.165 -..B4.164: - cmpl $24383, %ecx - jle ..B4.168 -..B4.165: - addl $4, %esp - lea 372(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.166: - addl $4, %esp - lea 316(%esp), %eax - pushl %eax - call __libm_normalizel_k80 -..B4.167: - movzwl 384(%esp), %edi - movzwl 328(%esp), %ecx - andl $32767, %edi - movl 344(%esp), %esi - andl $32767, %ecx - movl 400(%esp), %ebx -..B4.168: - lea (%ebx,%edi), %eax - movl %eax, 44(%esp) - lea -134(%esi,%ecx), %edx - cmpl %edx, %eax - jle ..B4.185 -..B4.169: - movl 380(%esp), %edx - lea 134(%esi,%ecx), %eax - cmpl 44(%esp), %eax - jle ..B4.186 -..B4.170: - testl %edx, %edx - jne ..B4.172 -..B4.171: - cmpl $0, 376(%esp) - je ..B4.187 -..B4.172: - movl 324(%esp), %eax - testl %eax, %eax - jne ..B4.174 -..B4.173: - cmpl $0, 320(%esp) - je ..B4.186 -..B4.174: - cmpl %esi, %ebx - je ..B4.176 -..B4.175: - fldt 48(%esp) - subl %esi, %ebx - fstpt 32(%esp) - addl $16383, %ebx - fldt 376(%esp) - andl $32767, %ebx - fldt 388(%esp) - andb $127, 41(%esp) - movzwl 40(%esp), %edx - andl $-32768, %edx - orl %ebx, %edx - movw %dx, 40(%esp) - movl $-2147483648, 36(%esp) - movl $0, 32(%esp) - fldt 32(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 376(%esp) - fldt 376(%esp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 384(%esp), %edi - movl %esi, 400(%esp) - andl $32767, %edi - fstpt 388(%esp) - fldt 388(%esp) - jmp ..B4.177 -..B4.176: - fldt 376(%esp) - fldt 388(%esp) -..B4.177: - fldt 320(%esp) - fld %st(2) - movl %esi, 68(%esp) - cmpl %ecx, %edi - fsub %st(1), %st - jg ..B4.182 -..B4.178: - jne ..B4.183 -..B4.179: - movl 380(%esp), %edx - cmpl %eax, %edx - ja ..B4.182 -..B4.180: - jne ..B4.183 -..B4.181: - movl 376(%esp), %eax - cmpl 320(%esp), %eax - jbe ..B4.183 -..B4.182: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 332(%esp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - jmp ..B4.184 -..B4.183: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 332(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) -..B4.184: - fld %st(0) - fadd %st(2), %st - fstpt 44(%esp) - fldt 44(%esp) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 56(%esp) - fldt 56(%esp) - jmp ..B4.193 -..B4.185: - movl 380(%esp), %edx -..B4.186: - testl %edx, %edx - jne ..B4.188 -..B4.205: - cmpl $0, 376(%esp) -..B4.187: - je ..B4.189 -..B4.188: - lea -16517(%esi,%ecx), %eax - lea -16383(%ebx,%edi), %ecx - cmpl %ecx, %eax - jl ..B4.190 -..B4.189: - fldt 320(%esp) - fchs - movl %esi, 68(%esp) - fstpt 44(%esp) - fldt 44(%esp) - fldt 332(%esp) - fchs - fstpt 56(%esp) - fldt 56(%esp) - jmp ..B4.193 -..B4.190: - movl %edx, 48(%esp) - movl 396(%esp), %esi - movl 376(%esp), %eax - movl 384(%esp), %edx - movl 388(%esp), %ecx - movl 392(%esp), %ebx - movl %esi, 64(%esp) - movl %eax, 44(%esp) - movl %edx, 52(%esp) - fldt 44(%esp) - movl 400(%esp), %esi - movl %ecx, 56(%esp) - movl %ebx, 60(%esp) - fldt 56(%esp) - movl %esi, 68(%esp) - jmp ..B4.193 -..B4.191: - lea 44(%esp), %eax - lea 404(%esp), %edx - call asinpoly -..B4.192: - fldt 44(%esp) - fldt 56(%esp) - movl 68(%esp), %esi -..B4.193: - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl %esi, 24(%esp) - call __libm_scalbl_k80 -..B4.194: - movl 8(%ebp), %eax - movl 92(%esp), %ebx - movl 432(%esp), %edi - movzbl 9(%eax), %ecx - xorl %esp, %edi - andl $128, %ecx - shrl $7, %ecx - cmpl %gs:20, %edi - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %esi - fldt _CONSTANTS@GOTOFF(%ebx,%esi) - fmulp %st, %st(1) - jne ..B4.197 -..B4.195: - addl $436, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B4.196: - movl 92(%esp), %eax - incl %ecx - movl %ecx, 316(%esp) - fldt 48+_CONSTANTS@GOTOFF(%eax) - fmul %st, %st(2) - fxch %st(2) - fstpt 292(%esp) - fldt 292(%esp) - fxch %st(1) - fmul %st(2), %st - fstpt 304(%esp) - fldt 304(%esp) - fxch %st(1) - fxch %st(2) - jmp ..B4.160 -..B4.197: - fstp %st(0) - call __stack_chk_fail@PLT - .align 16,0x90 - .type __libm_recasinl_k80,@function - .size __libm_recasinl_k80,.-__libm_recasinl_k80 - .data -# -- End __libm_recasinl_k80 - .section .rodata, "a" - .align 16 - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .word 32768 - .word 16415 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 39322 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 28087 - .word 46811 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 36409 - .word 63715 - .word 16377 - .word 0 - .word 62186 - .word 9163 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 11943 - .word 18321 - .word 25215 - .word 36391 - .word 16377 - .word 0 - .word 12527 - .word 63486 - .word 51909 - .word 58572 - .word 16376 - .word 0 - .word 16437 - .word 53165 - .word 60799 - .word 48451 - .word 16376 - .word 0 - .word 39560 - .word 816 - .word 43435 - .word 40940 - .word 16376 - .word 0 - .word 47763 - .word 38463 - .word 31161 - .word 35220 - .word 16376 - .word 0 - .word 61035 - .word 37666 - .word 58653 - .word 60832 - .word 16375 - .word 0 - .word 4110 - .word 2419 - .word 35453 - .word 57515 - .word 16375 - .word 0 - .word 3126 - .word 47859 - .word 6163 - .word 61068 - .word 16374 - .word 0 - .word 56145 - .word 58008 - .word 18829 - .word 55579 - .word 16376 - .word 0 - .word 17944 - .word 24712 - .word 25688 - .word 38195 - .word 49145 - .word 0 - .word 27414 - .word 34244 - .word 64801 - .word 51841 - .word 16378 - .word 0 - .word 63442 - .word 25896 - .word 35822 - .word 55851 - .word 49146 - .word 0 - .word 37640 - .word 1996 - .word 32075 - .word 42748 - .word 16378 - .word 0 - .word 39460 - .word 64770 - .word 43690 - .word 43690 - .word 49115 - .word 0 - .word 48327 - .word 21484 - .word 52058 - .word 52428 - .word 49114 - .word 0 - .word 52692 - .word 45548 - .word 47571 - .word 37453 - .word 49112 - .word 0 - .word 9214 - .word 45875 - .word 56244 - .word 56360 - .word 49110 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,348 - .data - .hidden __libm_normalizel_k80 - .hidden __libm_scalbl_k80 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_reduce_pi04d.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_reduce_pi04d.S deleted file mode 100644 index c84df0c92d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_reduce_pi04d.S +++ /dev/null @@ -1,365 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_reduce_pi04d.c" - .text -..TXTST0: -# -- Begin __libm_reduce_pi04d - .text - .align 16,0x90 - .hidden __libm_reduce_pi04d - .globl __libm_reduce_pi04d -__libm_reduce_pi04d: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -# parameter 3: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp - movl 16(%ebp), %eax - movl 20(%ebp), %ebx - movl %eax, 8(%esp) -..B1.2: - fnstcw 26(%esp) -..B1.3: - movzwl 26(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.19 -..B1.4: - orl $-64768, %ecx - movw %cx, 24(%esp) -..B1.5: - fldcw 24(%esp) -..B1.6: - movl $1, 12(%esp) -..B1.7: - movzwl 14(%ebp), %edi - movl %edi, %ecx - andl $32752, %ecx - andl $-32753, %edi - shrl $4, %ecx - movl $1374389535, %eax - lea -200(%ecx), %esi - andl $2047, %esi - shll $4, %esi - orl %esi, %edi - lea -1052(%ecx), %esi - imull %esi - sarl $3, %edx - sarl $31, %esi - subl %esi, %edx - movw %di, 14(%ebp) - fldl 8(%ebp) - imull $-25, %edx, %edi - andl $-134217728, 8(%ebp) - lea -1052(%edi,%ecx), %ecx - fldl 8(%ebp) - cmpl $17, %ecx - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - fsubr %st, %st(1) - movl %ecx, 20(%esp) - jl ..B1.9 -..B1.8: - fldl _DP@GOTOFF(%ecx,%edx,8) - fmul %st(2), %st - fldl 8+_DP@GOTOFF(%ecx,%edx,8) - incl %edx - fmul %st(2), %st - faddp %st, %st(1) - fstl (%esp) - andl $-1048576, (%esp) - fsubl (%esp) - jmp ..B1.10 -..B1.9: - fldz -..B1.10: - fld %st(1) - fld %st(2) - fldl 8+_DP@GOTOFF(%ecx,%edx,8) - fmul %st, %st(2) - fmul %st(5), %st - fldl _DP@GOTOFF(%ecx,%edx,8) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fldl 16+_DP@GOTOFF(%ecx,%edx,8) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fadd %st(2), %st - fstpl (%esp) - movzwl 6(%esp), %ecx - andl $32752, %ecx - shrl $4, %ecx - negl %ecx - addl $1075, %ecx - movl 4(%esp), %esi - cmpl $31, %ecx - movl (%esp), %edi - jbe ..B1.12 -..B1.11: - movl %esi, %edi - movl %edi, %esi - sarl $31, %esi - sarl %cl, %edi - jmp ..B1.13 -..B1.12: - shrdl %cl, %esi, %edi - sarl %cl, %esi -..B1.13: - movl %edi, (%esp) - cmpl $31, %ecx - movl %esi, 4(%esp) - jbe ..B1.15 -..B1.14: - movl %edi, %esi - movl $0, 16(%esp) - shll %cl, %esi - jmp ..B1.16 -..B1.15: - movl %edi, %eax - shll %cl, %eax - shldl %cl, %edi, %esi - movl %eax, 16(%esp) -..B1.16: - movl 16(%esp), %ecx - addl %edi, %ebx - movl %ecx, (%esp) - fld %st(3) - movl %esi, 4(%esp) - movl %ebx, %esi - andl $1, %esi - movl 20(%esp), %edi - fxch %st(1) - fmul %st(5), %st - fxch %st(3) - fsubl (%esp) - fldl 24+_DP@GOTOFF(%edi,%edx,8) - fldl 32+_DP@GOTOFF(%edi,%edx,8) - cmpl $0, 12(%esp) - fxch %st(2) - faddl zero_none@GOTOFF(%edi,%esi,8) - faddp %st, %st(4) - fld %st(5) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fld %st(4) - fmul %st(1), %st - fxch %st(4) - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(2) - fmul %st(4), %st - fldl 40+_DP@GOTOFF(%edi,%edx,8) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(2) - fxch %st(2) - fmul %st(4), %st - fxch %st(3) - fmull 56+_DP@GOTOFF(%edi,%edx,8) - fldl 48+_DP@GOTOFF(%edi,%edx,8) - fmul %st, %st(3) - movl 8(%esp), %edx - fxch %st(3) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fmull .L_2il0floatpacket.0@GOTOFF(%edi) - fstpl (%edx) - je ..B1.18 -..B1.17: - fldcw 26(%esp) -..B1.18: - movl %ebx, %eax - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - movl $0, 12(%esp) - jmp ..B1.7 - .align 16,0x90 - .type __libm_reduce_pi04d,@function - .size __libm_reduce_pi04d,.-__libm_reduce_pi04d - .data -# -- End __libm_reduce_pi04d - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x54442d18,0x3fe921fb - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -zero_none: - .long 0x00000000,0x00000000 - .long 0x00000000,0xbff00000 - .type zero_none,@object - .size zero_none,16 - .align 4 -_DP: - .long 0 - .long 0 - .long 1610612736 - .long 1282694960 - .long 0 - .long 1256952721 - .long 536870912 - .long 1229269500 - .long 3221225472 - .long 1202544455 - .long 0 - .long 1176818551 - .long 2147483648 - .long 1148939346 - .long 536870912 - .long 1124701124 - .long 3758096384 - .long 1099498527 - .long 3758096384 - .long 1071929578 - .long 1342177280 - .long 1046982385 - .long 805306368 - .long 1020320658 - .long 2147483648 - .long 993817732 - .long 0 - .long 968598976 - .long 2684354560 - .long 942220475 - .long 2415919104 - .long 915426956 - .long 0 - .long 885849629 - .long 536870912 - .long 863855510 - .long 1610612736 - .long 836031391 - .long 4026531840 - .long 810828058 - .long 1073741824 - .long 784674491 - .long 1610612736 - .long 757207974 - .long 3489660928 - .long 732020890 - .long 0 - .long 703061904 - .long 1610612736 - .long 679713053 - .long 2147483648 - .long 652001705 - .long 1073741824 - .long 626850382 - .long 2147483648 - .long 597786158 - .long 805306368 - .long 575535400 - .long 536870912 - .long 548814833 - .long 268435456 - .long 523239288 - .long 3758096384 - .long 495550718 - .long 2952790016 - .long 469954840 - .long 1073741824 - .long 442925723 - .long 1073741824 - .long 416247094 - .long 3758096384 - .long 392128403 - .long 2147483648 - .long 364254062 - .long 3221225472 - .long 339643518 - .long 2684354560 - .long 313162111 - .long 805306368 - .long 286354345 - .long 2952790016 - .long 260811902 - .long 1610612736 - .long 234667567 - .long 3758096384 - .long 207520668 - .long 1073741824 - .long 182175017 - .long 4026531840 - .long 155380331 - .long 805306368 - .long 129417058 - .long 536870912 - .long 103691636 - .long 0 - .long 73760972 - .long 3221225472 - .long 48348958 - .type _DP,@object - .size _DP,392 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_reduce_pi04l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_reduce_pi04l.S deleted file mode 100644 index e61e1f36b6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_reduce_pi04l.S +++ /dev/null @@ -1,3729 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_reduce_pi04l.c" - .text -..TXTST0: -# -- Begin __libm_reduce_pi04l - .text - .align 16,0x90 - .hidden __libm_reduce_pi04l - .globl __libm_reduce_pi04l -__libm_reduce_pi04l: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -# parameter 3: 24 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $20, %esp - movzwl 16(%ebp), %ebx - andl $32767, %ebx - movl 20(%ebp), %eax - cmpl $16413, %ebx - movl 24(%ebp), %esi - call ..L2 -..L2: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi - movl %eax, 4(%esp) - jge ..B1.8 -..B1.2: - fldt 8(%ebp) - fldl __4onpi_d@GOTOFF(%edi) - fmul %st(1), %st - fstpt 8(%esp) - movzwl 16(%esp), %ecx - negl %ecx - addl $30, %ecx - movl 12(%esp), %eax - shrl %cl, %eax - cmpl $0, 4(%esp) - jne ..B1.4 -..B1.3: - lea 1(%eax), %ecx - andl $-2, %ecx - jmp ..B1.5 -..B1.4: - movl %eax, %ecx - addl 4(%esp), %eax - movl %eax, %edx - andl $1, %edx - addl %edx, %ecx -..B1.5: - fldl _TWO_32H@GOTOFF(%edi) - cmpl $16400, %ebx - movl %ecx, (%esp) - fildl (%esp) - jge ..B1.7 -..B1.6: - fldl _pi04_3d@GOTOFF(%edi) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_pi04_3d@GOTOFF(%edi) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_pi04_3d@GOTOFF(%edi) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.15 -..B1.7: - fldl _pi04_5d@GOTOFF(%edi) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_pi04_5d@GOTOFF(%edi) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_pi04_5d@GOTOFF(%edi) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl 24+_pi04_5d@GOTOFF(%edi) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl 32+_pi04_5d@GOTOFF(%edi) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.15 -..B1.8: - fldt 8(%ebp) - lea -16417(%ebx), %ecx - fmull _SCALE@GOTOFF(%edi) - movl $-2078209981, %eax - imull %ecx - sarl $31, %ecx - lea -16417(%edx,%ebx), %eax - sarl $4, %eax - subl %ecx, %eax - movl %eax, %ecx - shll $5, %ecx - negl %ecx - addl %eax, %ecx - fstpt 8(%ebp) - fldt 8(%ebp) - movl $0, 8(%ebp) - fldt 8(%ebp) - lea -16417(%ecx,%ebx), %ebx - cmpl $17, %ebx - fsubr %st, %st(1) - jl ..B1.10 -..B1.9: - lea (,%eax,8), %edx - lea (%edx,%eax,4), %ecx - incl %eax - fldt __4onpi_31l@GOTOFF(%ecx,%edi) - fmul %st(2), %st - fldt 12+__4onpi_31l@GOTOFF(%edi,%ecx) - fmul %st(2), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 8(%esp) - andl $-16777216, 8(%esp) - fldt 8(%esp) - fsubrp %st, %st(1) - jmp ..B1.11 -..B1.10: - fldl _zeros@GOTOFF(%edi) - fld %st(0) -..B1.11: - fld %st(0) - lea (,%eax,8), %edx - fld %st(3) - lea (%edx,%eax,4), %eax - fldt __4onpi_31l@GOTOFF(%eax,%edi) - fmul %st(6), %st - movl %eax, (%esp) - fadd %st, %st(2) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt 12+__4onpi_31l@GOTOFF(%eax,%edi) - fmul %st, %st(2) - fld %st(2) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fadd %st(3), %st - fxch %st(2) - fmul %st(5), %st - fadd %st, %st(2) - fld %st(4) - fldt 24+__4onpi_31l@GOTOFF(%eax,%edi) - fmul %st, %st(1) - fxch %st(1) - fadd %st, %st(4) - fxch %st(4) - fstpt 8(%esp) - movzwl 16(%esp), %ebx - andl $32767, %ebx - cmpl $16415, %ebx - jge ..B1.13 -..B1.12: - negl %ebx - addl $30, %ebx - movl %ebx, %ecx - movl 12(%esp), %eax - shrl %cl, %eax - shll %cl, %eax - movl %eax, 12(%esp) - movl $0, 8(%esp) - shrl %cl, %eax - jmp ..B1.14 -..B1.13: - negl %ebx - addl $30, %ebx - movl %ebx, %ecx - movl 8(%esp), %edx - shrl %cl, %edx - shll %cl, %edx - negl %ecx - movl 12(%esp), %eax - shll %cl, %eax - movl %ebx, %ecx - movl %edx, 8(%esp) - shrl %cl, %edx - orl %edx, %eax -..B1.14: - fldt 8(%esp) - addl 4(%esp), %eax - fsubrp %st, %st(3) - fmul %st(6), %st - fld %st(4) - movl %eax, %edx - andl $1, %edx - fadd %st(3), %st - movl (%esp), %ecx - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fld %st(1) - fxch %st(3) - faddl zero_none@GOTOFF(%edi,%edx,8) - fadd %st, %st(3) - fsub %st(3), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(4) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(2) - fldt 36+__4onpi_31l@GOTOFF(%ecx,%edi) - fmul %st, %st(1) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmul %st(4), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(2) - fldt 48+__4onpi_31l@GOTOFF(%ecx,%edi) - fmul %st, %st(1) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(3) - fxch %st(2) - fmul %st(5), %st - fldt 60+__4onpi_31l@GOTOFF(%ecx,%edi) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fld %st(3) - fxch %st(2) - fmul %st(5), %st - fldt 72+__4onpi_31l@GOTOFF(%ecx,%edi) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(4) - fldt 84+__4onpi_31l@GOTOFF(%edi,%ecx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fldl _TWO_32H@GOTOFF(%edi) - fmul %st(1), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldl _pi04_2d@GOTOFF(%edi) - fld %st(0) - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - fmull 8+_pi04_2d@GOTOFF(%edi) - faddp %st, %st(1) -..B1.15: - fldl _TWO_12H@GOTOFF(%edi) - fld %st(2) - fadd %st(2), %st - fmul %st, %st(1) - fstpt 8(%esp) - fldt 8(%esp) - fadd %st(1), %st - fsubp %st, %st(1) - fstl (%esi) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpl 8(%esi) - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __libm_reduce_pi04l,@function - .size __libm_reduce_pi04l,.-__libm_reduce_pi04l - .data -# -- End __libm_reduce_pi04l - .section .rodata, "a" - .align 8 - .align 8 -zero_none: - .long 0x00000000,0x00000000 - .long 0x00000000,0xbff00000 - .type zero_none,@object - .size zero_none,16 - .align 4 -__4onpi_d: - .long 1841940611 - .long 1072979760 - .type __4onpi_d,@object - .size __4onpi_d,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_pi04_3d: - .long 1413754112 - .long 1072243195 - .long 2563527040 - .long 1021855384 - .long 3417685868 - .long 3118450936 - .type _pi04_3d,@object - .size _pi04_3d,24 - .align 4 -_pi04_5d: - .long 1413480448 - .long 1072243195 - .long 442499072 - .long 1036039265 - .long 771751936 - .long 999496074 - .long 622854144 - .long 963347354 - .long 1396597664 - .long 922906692 - .type _pi04_5d,@object - .size _pi04_5d,40 - .align 4 -_SCALE: - .long 0 - .long 845152256 - .type _SCALE,@object - .size _SCALE,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_pi04_2d: - .long 1413480448 - .long 1072243195 - .long 442655537 - .long 1036039265 - .type _pi04_2d,@object - .size _pi04_2d,16 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 2 -__4onpi_31l: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33646 - .word 41721 - .word 16600 - .word 0 - .word 0 - .word 0 - .word 10832 - .word 40072 - .word 16567 - .word 0 - .word 0 - .word 0 - .word 44008 - .word 65043 - .word 16537 - .word 0 - .word 0 - .word 0 - .word 28384 - .word 64154 - .word 16505 - .word 0 - .word 0 - .word 0 - .word 38272 - .word 56162 - .word 16472 - .word 0 - .word 0 - .word 0 - .word 7298 - .word 51682 - .word 16445 - .word 0 - .word 0 - .word 0 - .word 45504 - .word 65320 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 61204 - .word 44922 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 18652 - .word 50030 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 14144 - .word 59657 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 37450 - .word 47105 - .word 16290 - .word 0 - .word 0 - .word 0 - .word 14898 - .word 56641 - .word 16259 - .word 0 - .word 0 - .word 0 - .word 34680 - .word 34623 - .word 16226 - .word 0 - .word 0 - .word 0 - .word 4760 - .word 45515 - .word 16196 - .word 0 - .word 0 - .word 0 - .word 41480 - .word 40187 - .word 16166 - .word 0 - .word 0 - .word 0 - .word 47852 - .word 55252 - .word 16134 - .word 0 - .word 0 - .word 0 - .word 54072 - .word 35081 - .word 16103 - .word 0 - .word 0 - .word 0 - .word 26808 - .word 57421 - .word 16071 - .word 0 - .word 0 - .word 0 - .word 20068 - .word 57232 - .word 16042 - .word 0 - .word 0 - .word 0 - .word 49576 - .word 60188 - .word 16009 - .word 0 - .word 0 - .word 0 - .word 10016 - .word 52861 - .word 15978 - .word 0 - .word 0 - .word 0 - .word 30648 - .word 35825 - .word 15947 - .word 0 - .word 0 - .word 0 - .word 60542 - .word 58528 - .word 15918 - .word 0 - .word 0 - .word 0 - .word 65468 - .word 61743 - .word 15887 - .word 0 - .word 0 - .word 0 - .word 64960 - .word 45825 - .word 15851 - .word 0 - .word 0 - .word 0 - .word 50604 - .word 38792 - .word 15825 - .word 0 - .word 0 - .word 0 - .word 18394 - .word 33435 - .word 15794 - .word 0 - .word 0 - .word 0 - .word 55780 - .word 42703 - .word 15763 - .word 0 - .word 0 - .word 0 - .word 14056 - .word 63841 - .word 15731 - .word 0 - .word 0 - .word 0 - .word 63080 - .word 62563 - .word 15700 - .word 0 - .word 0 - .word 0 - .word 20840 - .word 62207 - .word 15669 - .word 0 - .word 0 - .word 0 - .word 30094 - .word 59983 - .word 15639 - .word 0 - .word 0 - .word 0 - .word 61818 - .word 60389 - .word 15608 - .word 0 - .word 0 - .word 0 - .word 40186 - .word 40579 - .word 15577 - .word 0 - .word 0 - .word 0 - .word 42170 - .word 58004 - .word 15546 - .word 0 - .word 0 - .word 0 - .word 55276 - .word 39678 - .word 15514 - .word 0 - .word 0 - .word 0 - .word 44672 - .word 36806 - .word 15481 - .word 0 - .word 0 - .word 0 - .word 13060 - .word 34144 - .word 15452 - .word 0 - .word 0 - .word 0 - .word 28016 - .word 57231 - .word 15419 - .word 0 - .word 0 - .word 0 - .word 16112 - .word 44995 - .word 15390 - .word 0 - .word 0 - .word 0 - .word 53464 - .word 33387 - .word 15358 - .word 0 - .word 0 - .word 0 - .word 7296 - .word 60751 - .word 15325 - .word 0 - .word 0 - .word 0 - .word 29452 - .word 45231 - .word 15297 - .word 0 - .word 0 - .word 0 - .word 26208 - .word 49689 - .word 15266 - .word 0 - .word 0 - .word 0 - .word 37900 - .word 44002 - .word 15235 - .word 0 - .word 0 - .word 0 - .word 57340 - .word 33800 - .word 15204 - .word 0 - .word 0 - .word 0 - .word 27544 - .word 50178 - .word 15173 - .word 0 - .word 0 - .word 0 - .word 6168 - .word 40132 - .word 15142 - .word 0 - .word 0 - .word 0 - .word 21392 - .word 43702 - .word 15109 - .word 0 - .word 0 - .word 0 - .word 45168 - .word 54372 - .word 15081 - .word 0 - .word 0 - .word 0 - .word 8986 - .word 40688 - .word 15050 - .word 0 - .word 0 - .word 0 - .word 1648 - .word 53745 - .word 15018 - .word 0 - .word 0 - .word 0 - .word 30520 - .word 55795 - .word 14986 - .word 0 - .word 0 - .word 0 - .word 43060 - .word 32914 - .word 14956 - .word 0 - .word 0 - .word 0 - .word 46172 - .word 52771 - .word 14925 - .word 0 - .word 0 - .word 0 - .word 14056 - .word 45285 - .word 14893 - .word 0 - .word 0 - .word 0 - .word 53590 - .word 44868 - .word 14864 - .word 0 - .word 0 - .word 0 - .word 40786 - .word 35970 - .word 14833 - .word 0 - .word 0 - .word 0 - .word 33436 - .word 65411 - .word 14801 - .word 0 - .word 0 - .word 0 - .word 32006 - .word 61382 - .word 14771 - .word 0 - .word 0 - .word 0 - .word 37856 - .word 45239 - .word 14738 - .word 0 - .word 0 - .word 0 - .word 60894 - .word 49555 - .word 14709 - .word 0 - .word 0 - .word 0 - .word 48064 - .word 53065 - .word 14674 - .word 0 - .word 0 - .word 0 - .word 48624 - .word 54844 - .word 14647 - .word 0 - .word 0 - .word 0 - .word 7988 - .word 40762 - .word 14616 - .word 0 - .word 0 - .word 0 - .word 16270 - .word 58745 - .word 14585 - .word 0 - .word 0 - .word 0 - .word 37064 - .word 50168 - .word 14553 - .word 0 - .word 0 - .word 0 - .word 18624 - .word 63736 - .word 14519 - .word 0 - .word 0 - .word 0 - .word 60758 - .word 44966 - .word 14492 - .word 0 - .word 0 - .word 0 - .word 33304 - .word 47465 - .word 14461 - .word 0 - .word 0 - .word 0 - .word 6226 - .word 60503 - .word 14430 - .word 0 - .word 0 - .word 0 - .word 26380 - .word 54900 - .word 14398 - .word 0 - .word 0 - .word 0 - .word 44352 - .word 49860 - .word 14368 - .word 0 - .word 0 - .word 0 - .word 11904 - .word 42646 - .word 14337 - .word 0 - .word 0 - .word 0 - .word 55296 - .word 50279 - .word 14300 - .word 0 - .word 0 - .word 0 - .word 15474 - .word 50606 - .word 14275 - .word 0 - .word 0 - .word 0 - .word 45062 - .word 44137 - .word 14244 - .word 0 - .word 0 - .word 0 - .word 13472 - .word 36063 - .word 14210 - .word 0 - .word 0 - .word 0 - .word 40658 - .word 53854 - .word 14182 - .word 0 - .word 0 - .word 0 - .word 28652 - .word 43690 - .word 14151 - .word 0 - .word 0 - .word 0 - .word 24640 - .word 64348 - .word 14118 - .word 0 - .word 0 - .word 0 - .word 30284 - .word 41980 - .word 14088 - .word 0 - .word 0 - .word 0 - .word 45652 - .word 38222 - .word 14057 - .word 0 - .word 0 - .word 0 - .word 15900 - .word 62940 - .word 14026 - .word 0 - .word 0 - .word 0 - .word 31494 - .word 50741 - .word 13996 - .word 0 - .word 0 - .word 0 - .word 43194 - .word 55096 - .word 13965 - .word 0 - .word 0 - .word 0 - .word 1740 - .word 45646 - .word 13933 - .word 0 - .word 0 - .word 0 - .word 28936 - .word 44150 - .word 13903 - .word 0 - .word 0 - .word 0 - .word 8996 - .word 42955 - .word 13872 - .word 0 - .word 0 - .word 0 - .word 44096 - .word 61205 - .word 13839 - .word 0 - .word 0 - .word 0 - .word 44614 - .word 54550 - .word 13810 - .word 0 - .word 0 - .word 0 - .word 24926 - .word 57347 - .word 13779 - .word 0 - .word 0 - .word 0 - .word 3312 - .word 61415 - .word 13745 - .word 0 - .word 0 - .word 0 - .word 64336 - .word 63884 - .word 13717 - .word 0 - .word 0 - .word 0 - .word 2748 - .word 62259 - .word 13685 - .word 0 - .word 0 - .word 0 - .word 56672 - .word 51775 - .word 13653 - .word 0 - .word 0 - .word 0 - .word 32438 - .word 55423 - .word 13624 - .word 0 - .word 0 - .word 0 - .word 17652 - .word 45713 - .word 13593 - .word 0 - .word 0 - .word 0 - .word 65408 - .word 51586 - .word 13558 - .word 0 - .word 0 - .word 0 - .word 40416 - .word 55736 - .word 13531 - .word 0 - .word 0 - .word 0 - .word 52546 - .word 37734 - .word 13500 - .word 0 - .word 0 - .word 0 - .word 48880 - .word 64238 - .word 13469 - .word 0 - .word 0 - .word 0 - .word 56004 - .word 46833 - .word 13437 - .word 0 - .word 0 - .word 0 - .word 61760 - .word 38110 - .word 13405 - .word 0 - .word 0 - .word 0 - .word 41496 - .word 35659 - .word 13374 - .word 0 - .word 0 - .word 0 - .word 25472 - .word 41269 - .word 13342 - .word 0 - .word 0 - .word 0 - .word 45444 - .word 36018 - .word 13314 - .word 0 - .word 0 - .word 0 - .word 6510 - .word 56417 - .word 13283 - .word 0 - .word 0 - .word 0 - .word 3072 - .word 56837 - .word 13252 - .word 0 - .word 0 - .word 0 - .word 61338 - .word 48440 - .word 13221 - .word 0 - .word 0 - .word 0 - .word 49568 - .word 57088 - .word 13189 - .word 0 - .word 0 - .word 0 - .word 4240 - .word 39283 - .word 13157 - .word 0 - .word 0 - .word 0 - .word 18562 - .word 33537 - .word 13128 - .word 0 - .word 0 - .word 0 - .word 31422 - .word 44487 - .word 13097 - .word 0 - .word 0 - .word 0 - .word 31930 - .word 60459 - .word 13066 - .word 0 - .word 0 - .word 0 - .word 42272 - .word 36641 - .word 13033 - .word 0 - .word 0 - .word 0 - .word 28940 - .word 36150 - .word 13004 - .word 0 - .word 0 - .word 0 - .word 21010 - .word 50925 - .word 12973 - .word 0 - .word 0 - .word 0 - .word 29448 - .word 64886 - .word 12941 - .word 0 - .word 0 - .word 0 - .word 20500 - .word 54600 - .word 12911 - .word 0 - .word 0 - .word 0 - .word 54258 - .word 46233 - .word 12880 - .word 0 - .word 0 - .word 0 - .word 32628 - .word 42502 - .word 12848 - .word 0 - .word 0 - .word 0 - .word 61608 - .word 55072 - .word 12818 - .word 0 - .word 0 - .word 0 - .word 6236 - .word 57871 - .word 12786 - .word 0 - .word 0 - .word 0 - .word 42408 - .word 34616 - .word 12756 - .word 0 - .word 0 - .word 0 - .word 56692 - .word 51963 - .word 12724 - .word 0 - .word 0 - .word 0 - .word 39094 - .word 48526 - .word 12694 - .word 0 - .word 0 - .word 0 - .word 59870 - .word 38783 - .word 12663 - .word 0 - .word 0 - .word 0 - .word 26560 - .word 33165 - .word 12632 - .word 0 - .word 0 - .word 0 - .word 58666 - .word 37666 - .word 12601 - .word 0 - .word 0 - .word 0 - .word 58728 - .word 39788 - .word 12569 - .word 0 - .word 0 - .word 0 - .word 9048 - .word 43530 - .word 12538 - .word 0 - .word 0 - .word 0 - .word 58496 - .word 57659 - .word 12505 - .word 0 - .word 0 - .word 0 - .word 12324 - .word 37025 - .word 12477 - .word 0 - .word 0 - .word 0 - .word 38432 - .word 55856 - .word 12445 - .word 0 - .word 0 - .word 0 - .word 35210 - .word 45960 - .word 12415 - .word 0 - .word 0 - .word 0 - .word 45644 - .word 51345 - .word 12384 - .word 0 - .word 0 - .word 0 - .word 32854 - .word 63883 - .word 12353 - .word 0 - .word 0 - .word 0 - .word 29348 - .word 41450 - .word 12321 - .word 0 - .word 0 - .word 0 - .word 27384 - .word 38024 - .word 12289 - .word 0 - .word 0 - .word 0 - .word 57356 - .word 57291 - .word 12260 - .word 0 - .word 0 - .word 0 - .word 61164 - .word 51521 - .word 12228 - .word 0 - .word 0 - .word 0 - .word 21472 - .word 59151 - .word 12196 - .word 0 - .word 0 - .word 0 - .word 36704 - .word 39943 - .word 12165 - .word 0 - .word 0 - .word 0 - .word 45864 - .word 50151 - .word 12136 - .word 0 - .word 0 - .word 0 - .word 37892 - .word 63687 - .word 12104 - .word 0 - .word 0 - .word 0 - .word 14560 - .word 51615 - .word 12073 - .word 0 - .word 0 - .word 0 - .word 38776 - .word 55684 - .word 12041 - .word 0 - .word 0 - .word 0 - .word 59136 - .word 53570 - .word 12010 - .word 0 - .word 0 - .word 0 - .word 55556 - .word 37955 - .word 11981 - .word 0 - .word 0 - .word 0 - .word 54458 - .word 44670 - .word 11950 - .word 0 - .word 0 - .word 0 - .word 36446 - .word 34084 - .word 11919 - .word 0 - .word 0 - .word 0 - .word 46416 - .word 51693 - .word 11886 - .word 0 - .word 0 - .word 0 - .word 21432 - .word 34376 - .word 11857 - .word 0 - .word 0 - .word 0 - .word 56036 - .word 34809 - .word 11826 - .word 0 - .word 0 - .word 0 - .word 10562 - .word 55654 - .word 11795 - .word 0 - .word 0 - .word 0 - .word 20264 - .word 53052 - .word 11763 - .word 0 - .word 0 - .word 0 - .word 64064 - .word 50415 - .word 11729 - .word 0 - .word 0 - .word 0 - .word 17444 - .word 48295 - .word 11701 - .word 0 - .word 0 - .word 0 - .word 11874 - .word 52677 - .word 11671 - .word 0 - .word 0 - .word 0 - .word 60808 - .word 39275 - .word 11640 - .word 0 - .word 0 - .word 0 - .word 31792 - .word 55677 - .word 11606 - .word 0 - .word 0 - .word 0 - .word 60710 - .word 49006 - .word 11578 - .word 0 - .word 0 - .word 0 - .word 10520 - .word 37403 - .word 11546 - .word 0 - .word 0 - .word 0 - .word 20004 - .word 59470 - .word 11515 - .word 0 - .word 0 - .word 0 - .word 28096 - .word 37612 - .word 11485 - .word 0 - .word 0 - .word 0 - .word 20268 - .word 44280 - .word 11453 - .word 0 - .word 0 - .word 0 - .word 50740 - .word 61588 - .word 11422 - .word 0 - .word 0 - .word 0 - .word 56432 - .word 58835 - .word 11390 - .word 0 - .word 0 - .word 0 - .word 8576 - .word 42496 - .word 11355 - .word 0 - .word 0 - .word 0 - .word 33920 - .word 54912 - .word 11324 - .word 0 - .word 0 - .word 0 - .word 35620 - .word 54843 - .word 11298 - .word 0 - .word 0 - .word 0 - .word 736 - .word 43591 - .word 11264 - .word 0 - .word 0 - .word 0 - .word 39632 - .word 61060 - .word 11235 - .word 0 - .word 0 - .word 0 - .word 63452 - .word 63129 - .word 11206 - .word 0 - .word 0 - .word 0 - .word 56798 - .word 58512 - .word 11175 - .word 0 - .word 0 - .word 0 - .word 13472 - .word 46333 - .word 11141 - .word 0 - .word 0 - .word 0 - .word 37300 - .word 36598 - .word 11112 - .word 0 - .word 0 - .word 0 - .word 41952 - .word 41639 - .word 11079 - .word 0 - .word 0 - .word 0 - .word 52452 - .word 33459 - .word 11050 - .word 0 - .word 0 - .word 0 - .word 58558 - .word 33287 - .word 11020 - .word 0 - .word 0 - .word 0 - .word 7570 - .word 43843 - .word 10989 - .word 0 - .word 0 - .word 0 - .word 59416 - .word 63990 - .word 10957 - .word 0 - .word 0 - .word 0 - .word 65298 - .word 47744 - .word 10927 - .word 0 - .word 0 - .word 0 - .word 21076 - .word 34089 - .word 10896 - .word 0 - .word 0 - .word 0 - .word 7048 - .word 57394 - .word 10865 - .word 0 - .word 0 - .word 0 - .word 12872 - .word 55405 - .word 10832 - .word 0 - .word 0 - .word 0 - .word 12608 - .word 51669 - .word 10798 - .word 0 - .word 0 - .word 0 - .word 5350 - .word 48455 - .word 10772 - .word 0 - .word 0 - .word 0 - .word 23568 - .word 58692 - .word 10740 - .word 0 - .word 0 - .word 0 - .word 40784 - .word 37046 - .word 10708 - .word 0 - .word 0 - .word 0 - .word 38992 - .word 43861 - .word 10678 - .word 0 - .word 0 - .word 0 - .word 10064 - .word 40199 - .word 10648 - .word 0 - .word 0 - .word 0 - .word 26368 - .word 35771 - .word 10611 - .word 0 - .word 0 - .word 0 - .word 23994 - .word 60721 - .word 10586 - .word 0 - .word 0 - .word 0 - .word 25052 - .word 34302 - .word 10554 - .word 0 - .word 0 - .word 0 - .word 39842 - .word 54964 - .word 10524 - .word 0 - .word 0 - .word 0 - .word 11568 - .word 58277 - .word 10491 - .word 0 - .word 0 - .word 0 - .word 26160 - .word 46438 - .word 10461 - .word 0 - .word 0 - .word 0 - .word 23252 - .word 43049 - .word 10431 - .word 0 - .word 0 - .word 0 - .word 35288 - .word 58000 - .word 10400 - .word 0 - .word 0 - .word 0 - .word 14614 - .word 50216 - .word 10369 - .word 0 - .word 0 - .word 0 - .word 1168 - .word 48804 - .word 10336 - .word 0 - .word 0 - .word 0 - .word 60934 - .word 33006 - .word 10307 - .word 0 - .word 0 - .word 0 - .word 64512 - .word 62247 - .word 10272 - .word 0 - .word 0 - .word 0 - .word 59968 - .word 43121 - .word 10240 - .word 0 - .word 0 - .word 0 - .word 25560 - .word 39974 - .word 10212 - .word 0 - .word 0 - .word 0 - .word 1978 - .word 49353 - .word 10183 - .word 0 - .word 0 - .word 0 - .word 16290 - .word 38807 - .word 10152 - .word 0 - .word 0 - .word 0 - .word 8646 - .word 65226 - .word 10121 - .word 0 - .word 0 - .word 0 - .word 56896 - .word 34317 - .word 10088 - .word 0 - .word 0 - .word 0 - .word 40136 - .word 39118 - .word 10057 - .word 0 - .word 0 - .word 0 - .word 14200 - .word 41756 - .word 10026 - .word 0 - .word 0 - .word 0 - .word 59256 - .word 63202 - .word 9995 - .word 0 - .word 0 - .word 0 - .word 22968 - .word 63553 - .word 9965 - .word 0 - .word 0 - .word 0 - .word 736 - .word 44292 - .word 9933 - .word 0 - .word 0 - .word 0 - .word 23186 - .word 37760 - .word 9904 - .word 0 - .word 0 - .word 0 - .word 51008 - .word 34950 - .word 9869 - .word 0 - .word 0 - .word 0 - .word 1664 - .word 64248 - .word 9836 - .word 0 - .word 0 - .word 0 - .word 64352 - .word 35199 - .word 9811 - .word 0 - .word 0 - .word 0 - .word 34656 - .word 63747 - .word 9780 - .word 0 - .word 0 - .word 0 - .word 44330 - .word 49864 - .word 9749 - .word 0 - .word 0 - .word 0 - .word 11654 - .word 35567 - .word 9718 - .word 0 - .word 0 - .word 0 - .word 7924 - .word 58919 - .word 9686 - .word 0 - .word 0 - .word 0 - .word 2532 - .word 32800 - .word 9655 - .word 0 - .word 0 - .word 0 - .word 30024 - .word 53799 - .word 9624 - .word 0 - .word 0 - .word 0 - .word 30172 - .word 64347 - .word 9593 - .word 0 - .word 0 - .word 0 - .word 60036 - .word 51382 - .word 9562 - .word 0 - .word 0 - .word 0 - .word 58576 - .word 33093 - .word 9531 - .word 0 - .word 0 - .word 0 - .word 13888 - .word 38760 - .word 9500 - .word 0 - .word 0 - .word 0 - .word 9322 - .word 52460 - .word 9470 - .word 0 - .word 0 - .word 0 - .word 20944 - .word 41077 - .word 9437 - .word 0 - .word 0 - .word 0 - .word 17976 - .word 41861 - .word 9407 - .word 0 - .word 0 - .word 0 - .word 55176 - .word 55158 - .word 9377 - .word 0 - .word 0 - .word 0 - .word 4976 - .word 35223 - .word 9346 - .word 0 - .word 0 - .word 0 - .word 7816 - .word 39783 - .word 9314 - .word 0 - .word 0 - .word 0 - .word 27656 - .word 55669 - .word 9284 - .word 0 - .word 0 - .word 0 - .word 64944 - .word 53184 - .word 9250 - .word 0 - .word 0 - .word 0 - .word 12544 - .word 49190 - .word 9222 - .word 0 - .word 0 - .word 0 - .word 50612 - .word 44644 - .word 9190 - .word 0 - .word 0 - .word 0 - .word 8832 - .word 63111 - .word 9155 - .word 0 - .word 0 - .word 0 - .word 11744 - .word 36870 - .word 9129 - .word 0 - .word 0 - .word 0 - .word 9404 - .word 63025 - .word 9098 - .word 0 - .word 0 - .word 0 - .word 47316 - .word 43381 - .word 9067 - .word 0 - .word 0 - .word 0 - .word 55716 - .word 47433 - .word 9035 - .word 0 - .word 0 - .word 0 - .word 46414 - .word 48441 - .word 9005 - .word 0 - .word 0 - .word 0 - .word 19116 - .word 39506 - .word 8974 - .word 0 - .word 0 - .word 0 - .word 48060 - .word 53381 - .word 8943 - .word 0 - .word 0 - .word 0 - .word 57112 - .word 50739 - .word 8911 - .word 0 - .word 0 - .word 0 - .word 5840 - .word 60581 - .word 8879 - .word 0 - .word 0 - .word 0 - .word 62112 - .word 57199 - .word 8846 - .word 0 - .word 0 - .word 0 - .word 35908 - .word 59499 - .word 8818 - .word 0 - .word 0 - .word 0 - .word 13760 - .word 48116 - .word 8787 - .word 0 - .word 0 - .word 0 - .word 3136 - .word 56059 - .word 8752 - .word 0 - .word 0 - .word 0 - .word 37596 - .word 39221 - .word 8726 - .word 0 - .word 0 - .word 0 - .word 3232 - .word 48550 - .word 8691 - .word 0 - .word 0 - .word 0 - .word 22872 - .word 42749 - .word 8662 - .word 0 - .word 0 - .word 0 - .word 41948 - .word 40319 - .word 8633 - .word 0 - .word 0 - .word 0 - .word 31196 - .word 64693 - .word 8601 - .word 0 - .word 0 - .word 0 - .word 62052 - .word 52923 - .word 8571 - .word 0 - .word 0 - .word 0 - .word 2750 - .word 33544 - .word 8540 - .word 0 - .word 0 - .word 0 - .word 12462 - .word 46179 - .word 8509 - .word 0 - .word 0 - .word 0 - .word 25128 - .word 45120 - .word 8476 - .word 0 - .word 0 - .word 0 - .word 51634 - .word 62523 - .word 8447 - .word 0 - .word 0 - .word 0 - .word 15758 - .word 42163 - .word 8416 - .word 0 - .word 0 - .word 0 - .word 34022 - .word 36267 - .word 8385 - .word 0 - .word 0 - .word 0 - .word 41252 - .word 39796 - .word 8353 - .word 0 - .word 0 - .word 0 - .word 49782 - .word 54423 - .word 8323 - .word 0 - .word 0 - .word 0 - .word 25428 - .word 42086 - .word 8291 - .word 0 - .word 0 - .word 0 - .word 34388 - .word 44810 - .word 8260 - .word 0 - .word 0 - .word 0 - .word 7456 - .word 64092 - .word 8228 - .word 0 - .word 0 - .word 0 - .word 48336 - .word 62448 - .word 8196 - .word 0 - .word 0 - .word 0 - .word 60912 - .word 61622 - .word 8167 - .word 0 - .word 0 - .word 0 - .word 17852 - .word 37250 - .word 8137 - .word 0 - .word 0 - .word 0 - .word 57940 - .word 56453 - .word 8106 - .word 0 - .word 0 - .word 0 - .word 47256 - .word 59825 - .word 8074 - .word 0 - .word 0 - .word 0 - .word 3774 - .word 59120 - .word 8044 - .word 0 - .word 0 - .word 0 - .word 43448 - .word 62852 - .word 8012 - .word 0 - .word 0 - .word 0 - .word 4840 - .word 57195 - .word 7982 - .word 0 - .word 0 - .word 0 - .word 40862 - .word 52565 - .word 7951 - .word 0 - .word 0 - .word 0 - .word 1440 - .word 60474 - .word 7919 - .word 0 - .word 0 - .word 0 - .word 55520 - .word 38648 - .word 7889 - .word 0 - .word 0 - .word 0 - .word 15316 - .word 52422 - .word 7857 - .word 0 - .word 0 - .word 0 - .word 18704 - .word 47227 - .word 7827 - .word 0 - .word 0 - .word 0 - .word 48892 - .word 54283 - .word 7795 - .word 0 - .word 0 - .word 0 - .word 12670 - .word 41990 - .word 7765 - .word 0 - .word 0 - .word 0 - .word 27570 - .word 49842 - .word 7734 - .word 0 - .word 0 - .word 0 - .word 47230 - .word 47992 - .word 7703 - .word 0 - .word 0 - .word 0 - .word 41020 - .word 56253 - .word 7671 - .word 0 - .word 0 - .word 0 - .word 23404 - .word 58312 - .word 7641 - .word 0 - .word 0 - .word 0 - .word 35176 - .word 51854 - .word 7610 - .word 0 - .word 0 - .word 0 - .word 49188 - .word 59051 - .word 7578 - .word 0 - .word 0 - .word 0 - .word 16656 - .word 54507 - .word 7546 - .word 0 - .word 0 - .word 0 - .word 41320 - .word 48565 - .word 7517 - .word 0 - .word 0 - .word 0 - .word 302 - .word 42490 - .word 7486 - .word 0 - .word 0 - .word 0 - .word 26680 - .word 39967 - .word 7454 - .word 0 - .word 0 - .word 0 - .word 41304 - .word 43638 - .word 7424 - .word 0 - .word 0 - .word 0 - .word 2314 - .word 48533 - .word 7393 - .word 0 - .word 0 - .word 0 - .word 63294 - .word 35693 - .word 7362 - .word 0 - .word 0 - .word 0 - .word 24538 - .word 48319 - .word 7331 - .word 0 - .word 0 - .word 0 - .word 56296 - .word 47263 - .word 7300 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 38599 - .word 7268 - .word 0 - .word 0 - .word 0 - .word 6594 - .word 62116 - .word 7238 - .word 0 - .word 0 - .word 0 - .word 47104 - .word 63573 - .word 7198 - .word 0 - .word 0 - .word 0 - .word 34812 - .word 34303 - .word 7176 - .word 0 - .word 0 - .word 0 - .word 5144 - .word 33695 - .word 7145 - .word 0 - .word 0 - .word 0 - .word 24966 - .word 55768 - .word 7114 - .word 0 - .word 0 - .word 0 - .word 62720 - .word 43946 - .word 7078 - .word 0 - .word 0 - .word 0 - .word 31542 - .word 56062 - .word 7052 - .word 0 - .word 0 - .word 0 - .word 62356 - .word 59096 - .word 7020 - .word 0 - .word 0 - .word 0 - .word 28412 - .word 40533 - .word 6990 - .word 0 - .word 0 - .word 0 - .word 24080 - .word 50467 - .word 6958 - .word 0 - .word 0 - .word 0 - .word 33296 - .word 46841 - .word 6925 - .word 0 - .word 0 - .word 0 - .word 39600 - .word 38627 - .word 6897 - .word 0 - .word 0 - .word 0 - .word 14436 - .word 37607 - .word 6865 - .word 0 - .word 0 - .word 0 - .word 39032 - .word 56421 - .word 6833 - .word 0 - .word 0 - .word 0 - .word 64032 - .word 54987 - .word 6804 - .word 0 - .word 0 - .word 0 - .word 27648 - .word 42212 - .word 6768 - .word 0 - .word 0 - .word 0 - .word 43840 - .word 46107 - .word 6739 - .word 0 - .word 0 - .word 0 - .word 17316 - .word 36574 - .word 6711 - .word 0 - .word 0 - .word 0 - .word 8928 - .word 37652 - .word 6677 - .word 0 - .word 0 - .word 0 - .word 24944 - .word 47433 - .word 6648 - .word 0 - .word 0 - .word 0 - .word 27392 - .word 57430 - .word 6616 - .word 0 - .word 0 - .word 0 - .word 39848 - .word 43340 - .word 6585 - .word 0 - .word 0 - .word 0 - .word 64160 - .word 43542 - .word 6555 - .word 0 - .word 0 - .word 0 - .word 35226 - .word 63015 - .word 6525 - .word 0 - .word 0 - .word 0 - .word 40736 - .word 64368 - .word 6493 - .word 0 - .word 0 - .word 0 - .word 42168 - .word 49526 - .word 6462 - .word 0 - .word 0 - .word 0 - .word 45596 - .word 34243 - .word 6432 - .word 0 - .word 0 - .word 0 - .word 20690 - .word 39705 - .word 6401 - .word 0 - .word 0 - .word 0 - .word 54448 - .word 46856 - .word 6368 - .word 0 - .word 0 - .word 0 - .word 64392 - .word 62736 - .word 6337 - .word 0 - .word 0 - .word 0 - .word 12780 - .word 56461 - .word 6307 - .word 0 - .word 0 - .word 0 - .word 15360 - .word 49145 - .word 6277 - .word 0 - .word 0 - .word 0 - .word 20512 - .word 49931 - .word 6242 - .word 0 - .word 0 - .word 0 - .word 54512 - .word 55820 - .word 6212 - .word 0 - .word 0 - .word 0 - .word 8402 - .word 39333 - .word 6184 - .word 0 - .word 0 - .word 0 - .word 34094 - .word 53593 - .word 6153 - .word 0 - .word 0 - .word 0 - .word 31960 - .word 38817 - .word 6121 - .word 0 - .word 0 - .word 0 - .word 16954 - .word 39291 - .word 6091 - .word 0 - .word 0 - .word 0 - .word 49600 - .word 48765 - .word 6056 - .word 0 - .word 0 - .word 0 - .word 59580 - .word 56541 - .word 6029 - .word 0 - .word 0 - .word 0 - .word 35624 - .word 44550 - .word 5998 - .word 0 - .word 0 - .word 0 - .word 4142 - .word 47316 - .word 5967 - .word 0 - .word 0 - .word 0 - .word 43520 - .word 43612 - .word 5935 - .word 0 - .word 0 - .word 0 - .word 20976 - .word 40896 - .word 5902 - .word 0 - .word 0 - .word 0 - .word 63576 - .word 57729 - .word 5874 - .word 0 - .word 0 - .word 0 - .word 37288 - .word 33122 - .word 5843 - .word 0 - .word 0 - .word 0 - .word 24384 - .word 52079 - .word 5809 - .word 0 - .word 0 - .word 0 - .word 47952 - .word 58719 - .word 5779 - .word 0 - .word 0 - .word 0 - .word 44242 - .word 55445 - .word 5750 - .word 0 - .word 0 - .word 0 - .word 61232 - .word 38847 - .word 5716 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 46039 - .word 5683 - .word 0 - .word 0 - .word 0 - .word 13396 - .word 42933 - .word 5657 - .word 0 - .word 0 - .word 0 - .word 27392 - .word 43305 - .word 5622 - .word 0 - .word 0 - .word 0 - .word 40708 - .word 35319 - .word 5595 - .word 0 - .word 0 - .word 0 - .word 44408 - .word 55685 - .word 5564 - .word 0 - .word 0 - .word 0 - .word 42090 - .word 44607 - .word 5533 - .word 0 - .word 0 - .word 0 - .word 25504 - .word 53466 - .word 5500 - .word 0 - .word 0 - .word 0 - .word 24208 - .word 33149 - .word 5470 - .word 0 - .word 0 - .word 0 - .word 5268 - .word 45375 - .word 5440 - .word 0 - .word 0 - .word 0 - .word 144 - .word 40000 - .word 5409 - .word 0 - .word 0 - .word 0 - .word 56688 - .word 52358 - .word 5376 - .word 0 - .word 0 - .word 0 - .word 25848 - .word 56175 - .word 5345 - .word 0 - .word 0 - .word 0 - .word 57900 - .word 44055 - .word 5315 - .word 0 - .word 0 - .word 0 - .word 24800 - .word 43437 - .word 5283 - .word 0 - .word 0 - .word 0 - .word 17984 - .word 54872 - .word 5249 - .word 0 - .word 0 - .word 0 - .word 25744 - .word 41345 - .word 5223 - .word 0 - .word 0 - .word 0 - .word 7668 - .word 43682 - .word 5191 - .word 0 - .word 0 - .word 0 - .word 47434 - .word 36705 - .word 5161 - .word 0 - .word 0 - .word 0 - .word 20888 - .word 40323 - .word 5129 - .word 0 - .word 0 - .word 0 - .word 3962 - .word 43032 - .word 5099 - .word 0 - .word 0 - .word 0 - .word 50270 - .word 49260 - .word 5068 - .word 0 - .word 0 - .word 0 - .word 20160 - .word 64041 - .word 5032 - .word 0 - .word 0 - .word 0 - .word 25624 - .word 36013 - .word 5004 - .word 0 - .word 0 - .word 0 - .word 48328 - .word 59345 - .word 4975 - .word 0 - .word 0 - .word 0 - .word 51508 - .word 63920 - .word 4943 - .word 0 - .word 0 - .word 0 - .word 27872 - .word 39135 - .word 4913 - .word 0 - .word 0 - .word 0 - .word 13590 - .word 58857 - .word 4882 - .word 0 - .word 0 - .word 0 - .word 50880 - .word 61323 - .word 4847 - .word 0 - .word 0 - .word 0 - .word 44802 - .word 37181 - .word 4820 - .word 0 - .word 0 - .word 0 - .word 53808 - .word 57813 - .word 4789 - .word 0 - .word 0 - .word 0 - .word 64424 - .word 49714 - .word 4757 - .word 0 - .word 0 - .word 0 - .word 31652 - .word 44011 - .word 4727 - .word 0 - .word 0 - .word 0 - .word 28252 - .word 50834 - .word 4696 - .word 0 - .word 0 - .word 0 - .word 30370 - .word 38742 - .word 4665 - .word 0 - .word 0 - .word 0 - .word 57728 - .word 58403 - .word 4628 - .word 0 - .word 0 - .word 0 - .word 35900 - .word 37112 - .word 4603 - .word 0 - .word 0 - .word 0 - .word 40764 - .word 40914 - .word 4572 - .word 0 - .word 0 - .word 0 - .word 21472 - .word 46910 - .word 4541 - .word 0 - .word 0 - .word 0 - .word 17854 - .word 35030 - .word 4510 - .word 0 - .word 0 - .word 0 - .word 4378 - .word 35776 - .word 4479 - .word 0 - .word 0 - .word 0 - .word 57962 - .word 55295 - .word 4448 - .word 0 - .word 0 - .word 0 - .word 64352 - .word 56717 - .word 4415 - .word 0 - .word 0 - .word 0 - .word 37744 - .word 49416 - .word 4384 - .word 0 - .word 0 - .word 0 - .word 38484 - .word 35759 - .word 4355 - .word 0 - .word 0 - .word 0 - .word 55020 - .word 54969 - .word 4324 - .word 0 - .word 0 - .word 0 - .word 9188 - .word 55223 - .word 4292 - .word 0 - .word 0 - .word 0 - .word 6822 - .word 43079 - .word 4262 - .word 0 - .word 0 - .word 0 - .word 48870 - .word 40943 - .word 4231 - .word 0 - .word 0 - .word 0 - .word 9936 - .word 42731 - .word 4198 - .word 0 - .word 0 - .word 0 - .word 23430 - .word 43136 - .word 4169 - .word 0 - .word 0 - .word 0 - .word 4700 - .word 55665 - .word 4137 - .word 0 - .word 0 - .word 0 - .word 8056 - .word 40216 - .word 4106 - .word 0 - .word 0 - .word 0 - .word 3716 - .word 45403 - .word 4075 - .word 0 - .word 0 - .word 0 - .word 53440 - .word 49488 - .word 4044 - .word 0 - .word 0 - .word 0 - .word 41776 - .word 50188 - .word 4013 - .word 0 - .word 0 - .word 0 - .word 20994 - .word 64556 - .word 3983 - .word 0 - .word 0 - .word 0 - .word 16252 - .word 60661 - .word 3951 - .word 0 - .word 0 - .word 0 - .word 61252 - .word 65021 - .word 3920 - .word 0 - .word 0 - .word 0 - .word 16236 - .word 43803 - .word 3889 - .word 0 - .word 0 - .word 0 - .word 63064 - .word 35308 - .word 3857 - .word 0 - .word 0 - .word 0 - .word 49096 - .word 39848 - .word 3828 - .word 0 - .word 0 - .word 0 - .word 15680 - .word 48673 - .word 3797 - .word 0 - .word 0 - .word 0 - .word 48068 - .word 50957 - .word 3766 - .word 0 - .word 0 - .word 0 - .word 20824 - .word 56086 - .word 3734 - .word 0 - .word 0 - .word 0 - .word 46504 - .word 43224 - .word 3704 - .word 0 - .word 0 - .word 0 - .word 52428 - .word 46094 - .word 3672 - .word 0 - .word 0 - .word 0 - .word 17548 - .word 52066 - .word 3642 - .word 0 - .word 0 - .word 0 - .word 61738 - .word 35565 - .word 3611 - .word 0 - .word 0 - .word 0 - .word 31184 - .word 50588 - .word 3579 - .word 0 - .word 0 - .word 0 - .word 1716 - .word 52681 - .word 3549 - .word 0 - .word 0 - .word 0 - .word 44656 - .word 43385 - .word 3518 - .word 0 - .word 0 - .word 0 - .word 12668 - .word 43259 - .word 3486 - .word 0 - .word 0 - .word 0 - .word 24544 - .word 35408 - .word 3453 - .word 0 - .word 0 - .word 0 - .word 28854 - .word 65018 - .word 3425 - .word 0 - .word 0 - .word 0 - .word 5696 - .word 40391 - .word 3393 - .word 0 - .word 0 - .word 0 - .word 39580 - .word 56400 - .word 3363 - .word 0 - .word 0 - .word 0 - .word 20428 - .word 39579 - .word 3332 - .word 0 - .word 0 - .word 0 - .word 32328 - .word 36727 - .word 3301 - .word 0 - .word 0 - .word 0 - .word 34020 - .word 54457 - .word 3270 - .word 0 - .word 0 - .word 0 - .word 34016 - .word 48400 - .word 3238 - .word 0 - .word 0 - .word 0 - .word 6922 - .word 51417 - .word 3208 - .word 0 - .word 0 - .word 0 - .word 27208 - .word 64641 - .word 3176 - .word 0 - .word 0 - .word 0 - .word 1802 - .word 48886 - .word 3146 - .word 0 - .word 0 - .word 0 - .word 35440 - .word 61590 - .word 3115 - .word 0 - .word 0 - .word 0 - .word 60610 - .word 51604 - .word 3084 - .word 0 - .word 0 - .word 0 - .word 5440 - .word 38199 - .word 3050 - .word 0 - .word 0 - .word 0 - .word 6914 - .word 43867 - .word 3022 - .word 0 - .word 0 - .word 0 - .word 24000 - .word 45256 - .word 2989 - .word 0 - .word 0 - .word 0 - .word 51496 - .word 57396 - .word 2959 - .word 0 - .word 0 - .word 0 - .word 11538 - .word 46256 - .word 2929 - .word 0 - .word 0 - .word 0 - .word 36802 - .word 48020 - .word 2898 - .word 0 - .word 0 - .word 0 - .word 57910 - .word 57903 - .word 2867 - .word 0 - .word 0 - .word 0 - .word 47484 - .word 48798 - .word 2835 - .word 0 - .word 0 - .word 0 - .word 57766 - .word 57709 - .word 2805 - .word 0 - .word 0 - .word 0 - .word 54064 - .word 47856 - .word 2774 - .word 0 - .word 0 - .word 0 - .word 49340 - .word 48080 - .word 2743 - .word 0 - .word 0 - .word 0 - .word 36454 - .word 56731 - .word 2712 - .word 0 - .word 0 - .word 0 - .word 51548 - .word 63385 - .word 2681 - .word 0 - .word 0 - .word 0 - .word 56000 - .word 48716 - .word 2645 - .word 0 - .word 0 - .word 0 - .word 44992 - .word 50040 - .word 2615 - .word 0 - .word 0 - .word 0 - .word 43136 - .word 58177 - .word 2585 - .word 0 - .word 0 - .word 0 - .word 49730 - .word 33270 - .word 2557 - .word 0 - .word 0 - .word 0 - .word 29808 - .word 51063 - .word 2526 - .word 0 - .word 0 - .word 0 - .word 25276 - .word 46724 - .word 2494 - .word 0 - .word 0 - .word 0 - .word 17324 - .word 35928 - .word 2463 - .word 0 - .word 0 - .word 0 - .word 52284 - .word 63916 - .word 2433 - .word 0 - .word 0 - .word 0 - .word 5414 - .word 46704 - .word 2402 - .word 0 - .word 0 - .word 0 - .word 51710 - .word 57168 - .word 2371 - .word 0 - .word 0 - .word 0 - .word 27366 - .word 49253 - .word 2340 - .word 0 - .word 0 - .word 0 - .word 45332 - .word 53033 - .word 2309 - .word 0 - .word 0 - .word 0 - .word 54152 - .word 37418 - .word 2276 - .word 0 - .word 0 - .word 0 - .word 53076 - .word 47398 - .word 2247 - .word 0 - .word 0 - .word 0 - .word 14374 - .word 59477 - .word 2216 - .word 0 - .word 0 - .word 0 - .word 59336 - .word 33435 - .word 2184 - .word 0 - .word 0 - .word 0 - .word 21612 - .word 43267 - .word 2154 - .word 0 - .word 0 - .word 0 - .word 34664 - .word 39372 - .word 2121 - .word 0 - .word 0 - .word 0 - .word 172 - .word 62761 - .word 2091 - .word 0 - .word 0 - .word 0 - .word 9816 - .word 40715 - .word 2060 - .word 0 - .word 0 - .word 0 - .word 65116 - .word 40481 - .word 2030 - .word 0 - .word 0 - .word 0 - .word 28066 - .word 39184 - .word 1999 - .word 0 - .word 0 - .word 0 - .word 37408 - .word 63923 - .word 1968 - .word 0 - .word 0 - .word 0 - .word 15760 - .word 42305 - .word 1937 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 59340 - .word 1905 - .word 0 - .word 0 - .word 0 - .word 43258 - .word 59402 - .word 1875 - .word 0 - .word 0 - .word 0 - .word 19988 - .word 50087 - .word 1844 - .word 0 - .word 0 - .word 0 - .word 63456 - .word 47833 - .word 1810 - .word 0 - .word 0 - .word 0 - .word 65184 - .word 61426 - .word 1781 - .word 0 - .word 0 - .word 0 - .word 52982 - .word 48456 - .word 1751 - .word 0 - .word 0 - .word 0 - .word 30020 - .word 62809 - .word 1719 - .word 0 - .word 0 - .word 0 - .word 9096 - .word 63061 - .word 1688 - .word 0 - .word 0 - .word 0 - .word 59648 - .word 44374 - .word 1654 - .word 0 - .word 0 - .word 0 - .word 11456 - .word 33847 - .word 1625 - .word 0 - .word 0 - .word 0 - .word 12392 - .word 50500 - .word 1595 - .word 0 - .word 0 - .word 0 - .word 56432 - .word 59196 - .word 1563 - .word 0 - .word 0 - .word 0 - .word 61008 - .word 40265 - .word 1532 - .word 0 - .word 0 - .word 0 - .word 37842 - .word 33270 - .word 1503 - .word 0 - .word 0 - .word 0 - .word 37916 - .word 44543 - .word 1471 - .word 0 - .word 0 - .word 0 - .word 11490 - .word 36421 - .word 1441 - .word 0 - .word 0 - .word 0 - .word 19040 - .word 38397 - .word 1409 - .word 0 - .word 0 - .word 0 - .word 31224 - .word 47162 - .word 1379 - .word 0 - .word 0 - .word 0 - .word 52056 - .word 41461 - .word 1347 - .word 0 - .word 0 - .word 0 - .word 10810 - .word 56374 - .word 1317 - .word 0 - .word 0 - .word 0 - .word 5358 - .word 35086 - .word 1286 - .word 0 - .word 0 - .word 0 - .word 36640 - .word 50226 - .word 1251 - .word 0 - .word 0 - .word 0 - .word 33856 - .word 45597 - .word 1222 - .word 0 - .word 0 - .word 0 - .word 21552 - .word 63128 - .word 1191 - .word 0 - .word 0 - .word 0 - .word 1198 - .word 35616 - .word 1162 - .word 0 - .word 0 - .word 0 - .word 1232 - .word 59506 - .word 1131 - .word 0 - .word 0 - .word 0 - .word 51086 - .word 34963 - .word 1100 - .word 0 - .word 0 - .word 0 - .word 3960 - .word 39061 - .word 1067 - .word 0 - .word 0 - .word 0 - .word 4564 - .word 57134 - .word 1037 - .word 0 - .word 0 - .word 0 - .word 59468 - .word 35285 - .word 1007 - .word 0 - .word 0 - .word 0 - .word 63422 - .word 35431 - .word 976 - .word 0 - .word 0 - .word 0 - .word 38352 - .word 51462 - .word 945 - .word 0 - .word 0 - .word 0 - .word 25806 - .word 55660 - .word 914 - .word 0 - .word 0 - .word 0 - .word 38842 - .word 41327 - .word 883 - .word 0 - .word 0 - .word 0 - .word 17980 - .word 50458 - .word 852 - .word 0 - .word 0 - .word 0 - .word 61194 - .word 59710 - .word 821 - .word 0 - .word 0 - .word 0 - .word 21098 - .word 42086 - .word 790 - .word 0 - .word 0 - .word 0 - .word 16704 - .word 43341 - .word 757 - .word 0 - .word 0 - .word 0 - .word 46316 - .word 52840 - .word 728 - .word 0 - .word 0 - .word 0 - .word 20386 - .word 33936 - .word 697 - .word 0 - .word 0 - .word 0 - .word 20064 - .word 51864 - .word 664 - .word 0 - .word 0 - .word 0 - .word 2268 - .word 57500 - .word 634 - .word 0 - .word 0 - .word 0 - .word 11152 - .word 51171 - .word 604 - .word 0 - .word 0 - .word 0 - .word 23164 - .word 63727 - .word 572 - .word 0 - .word 0 - .word 0 - .word 20514 - .word 40280 - .word 542 - .word 0 - .word 0 - .word 0 - .word 21818 - .word 57922 - .word 511 - .word 0 - .word 0 - .word 0 - .word 32366 - .word 46413 - .word 480 - .word 0 - .word 0 - .word 0 - .word 53972 - .word 43148 - .word 449 - .word 0 - .word 0 - .word 0 - .word 30134 - .word 65133 - .word 418 - .word 0 - .word 0 - .word 0 - .word 15282 - .word 61516 - .word 387 - .word 0 - .word 0 - .word 0 - .word 49872 - .word 49222 - .word 355 - .word 0 - .word 0 - .word 0 - .word 9484 - .word 63958 - .word 325 - .word 0 - .word 0 - .word 0 - .word 47028 - .word 35341 - .word 294 - .word 0 - .word 0 - .word 0 - .word 6770 - .word 58613 - .word 263 - .word 0 - .word 0 - .word 0 - .word 33372 - .word 43448 - .word 232 - .word 0 - .word 0 - .word 0 - .word 27792 - .word 51629 - .word 198 - .word 0 - .word 0 - .word 0 - .word 19712 - .word 53691 - .word 170 - .word 0 - .word 0 - .word 0 - .word 42144 - .word 60929 - .word 135 - .word 0 - .word 0 - .word 0 - .word 35240 - .word 48799 - .word 107 - .word 0 - .word 0 - .word 0 - .word 910 - .word 51212 - .word 77 - .word 0 - .word 0 - .word 0 - .word 65062 - .word 33668 - .word 46 - .word 0 - .word 0 - .word 0 - .word 52624 - .word 51799 - .word 14 - .word 0 - .type __4onpi_31l,@object - .size __4onpi_31l,6444 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_scalbl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_scalbl_k80.S deleted file mode 100644 index 72e69a7f51..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_scalbl_k80.S +++ /dev/null @@ -1,264 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_scalbl_k80.c" - .text -..TXTST0: -# -- Begin __libm_scalbl_k80 - .text - .align 16,0x90 - .hidden __libm_scalbl_k80 - .globl __libm_scalbl_k80 -__libm_scalbl_k80: -# parameter 1: 48 + %esp -# parameter 2: 60 + %esp -# parameter 3: 72 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %ebx - subl $36, %esp - fldt 60(%esp) - fldt 48(%esp) - fld %st(0) - movl 72(%esp), %ebx - fadd %st(2), %st - cmpl $0, 52(%esp) - jne ..B1.4 -..B1.2: - cmpl $0, 48(%esp) - jne ..B1.4 -..B1.3: - fstp %st(2) - fstp %st(1) - fstpt 24(%esp) - fldt 24(%esp) - addl $36, %esp - popl %ebx - popl %esi - ret -..B1.4: - movzwl 56(%esp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.3 -..B1.5: - fstpt 24(%esp) - fldt 24(%esp) - movzwl 32(%esp), %esi - movl %esi, %edx - andl $32767, %edx - lea -1(%ebx,%edx), %ecx - cmpl $32765, %ecx - lea (%ebx,%edx), %eax - ja ..B1.7 -..B1.6: - fstp %st(1) - fstp %st(1) - fstp %st(0) - andl $-32768, %esi - andl $32767, %eax - orl %eax, %esi - movw %si, 32(%esp) - fldt 24(%esp) - addl $36, %esp - popl %ebx - popl %esi - ret -..B1.7: - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $32766, %eax - jle ..B1.9 -..B1.8: - fstp %st(2) - fstp %st(1) - fldt _CONSTANTS@GOTOFF(%ecx) - fmul %st(0), %st - fmulp %st, %st(1) - fstpt 24(%esp) - fldt 24(%esp) - addl $36, %esp - popl %ebx - popl %esi - ret -..B1.9: - cmpl $-63, %eax - fldt 12+_CONSTANTS@GOTOFF(%ecx) - jge ..B1.11 -..B1.10: - fstp %st(3) - fstp %st(0) - fxch %st(1) - fmul %st(0), %st - fmulp %st, %st(1) - fstpt 24(%esp) - fldt 24(%esp) - addl $36, %esp - popl %ebx - popl %esi - ret -..B1.11: - cmpl $-19, %eax - jge ..B1.13 -..B1.12: - fstp %st(2) - fstp %st(2) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - movzwl 8+.L_2il0floatpacket.0@GOTOFF(%ecx), %eax - andl $-32768, %eax - fstpt (%esp) - fmul %st(0), %st - faddp %st, %st(1) - fstpt 24(%esp) - movzwl 32(%esp), %edx - lea 256(%ebx,%edx), %ebx - andl $-32768, %edx - andl $32767, %ebx - orl $-49409, %edx - orl %ebx, %eax - movw %ax, 8(%esp) - fldt (%esp) - movw %dx, 32(%esp) - fldt 24(%esp) - fmulp %st, %st(1) - fstpt 24(%esp) - fldt 24(%esp) - addl $36, %esp - popl %ebx - popl %esi - ret -..B1.13: - fstp %st(1) - fldt 24+_CONSTANTS@GOTOFF(%ecx) - fxch %st(1) - fmul %st(0), %st - movzwl 8+.L_2il0floatpacket.0@GOTOFF(%ecx), %eax - faddp %st, %st(2) - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - andl $-32768, %eax - fmul %st(2), %st - fld %st(0) - fsub %st(3), %st - fsubrp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fsubrp %st, %st(2) - movzwl 20(%esp), %edx - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - lea -16383(%edx), %esi - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - negl %esi - addl $16383, %esi - lea -32512(%ebx,%edx), %ecx - andl $32767, %esi - andl $32767, %ecx - fstpt (%esp) - orl %esi, %eax - movw %ax, 8(%esp) - movl %edx, %esi - fldt (%esp) - andl $-32768, %esi - fmulp %st, %st(1) - andl $-32768, %eax - orl $-49409, %esi - orl %ecx, %eax - movw %si, 20(%esp) - fldt 12(%esp) - movw %ax, 8(%esp) - fldt (%esp) - fmul %st, %st(1) - fxch %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 24(%esp) - fldt 24(%esp) -..B1.14: - addl $36, %esp - popl %ebx - popl %esi - ret - .align 16,0x90 - .type __libm_scalbl_k80,@function - .size __libm_scalbl_k80,.-__libm_scalbl_k80 - .data -# -- End __libm_scalbl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16127 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,36 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sincos_huge.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sincos_huge.S deleted file mode 100644 index b25c4d96b5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sincos_huge.S +++ /dev/null @@ -1,708 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sincos_huge.c" - .text -..TXTST0: -# -- Begin __libm_sincos_huge - .text - .align 16,0x90 - .hidden __libm_sincos_huge - .globl __libm_sincos_huge -__libm_sincos_huge: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -# parameter 3: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp - movl 16(%ebp), %eax - movl 20(%ebp), %edx - movl %eax, 16(%esp) - movl %edx, 20(%esp) - movl %gs:20, %ecx - xorl %esp, %ecx - movl %ecx, 40(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - fldl 8(%ebp) - movl 12(%ebp), %edi - movl %edi, %eax - andl $2147483647, %eax - fabs - shrl $31, %edi - movl %eax, 24(%esp) - cmpl $1104150528, %eax - fstl 8(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jae ..B1.14 -..B1.4: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - fldl _Pi4Inv@GOTOFF(%ebx) - fmul %st(1), %st - fstpl (%esp) - je ..B1.52 -..B1.5: - fstp %st(0) - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.6: - fldcw 12(%esp) -..B1.7: - fldl 8(%ebp) - movl $1, %esi -..B1.8: - movl (%esp), %eax - movl 4(%esp), %edx - movl %edx, %ecx - movl %eax, 8(%esp) - movl %edx, %eax - andl $1048575, %eax - shrl $20, %ecx - orl $1048576, %eax - cmpl $1094713344, %edx - jae ..B1.10 -..B1.9: - negl %ecx - addl $19, %ecx - shrl %cl, %eax - jmp ..B1.11 -..B1.10: - movl %ecx, %edx - lea 13(%edx), %ecx - negl %edx - addl $19, %edx - shll %cl, %eax - movl %edx, %ecx - movl 8(%esp), %edx - shrl %cl, %edx - orl %edx, %eax -..B1.11: - lea 1(%eax), %edx - movl %edx, %ecx - andl $-2, %ecx - movl %ecx, (%esp) - fildl (%esp) - cmpl $1094713344, 24(%esp) - jae ..B1.13 -..B1.12: - fldl _Pi4x3@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(2) - fldl 8+_Pi4x3@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(2) - fldl 16+_Pi4x3@GOTOFF(%ebx) - fmulp %st, %st(1) - faddp %st, %st(1) - jmp ..B1.20 -..B1.13: - fldl _Pi4x4@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(2) - fldl 8+_Pi4x4@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(2) - fldl 16+_Pi4x4@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(2) - fldl 24+_Pi4x4@GOTOFF(%ebx) - fmulp %st, %st(1) - faddp %st, %st(1) - jmp ..B1.20 -..B1.14: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.60 -..B1.15: - fstp %st(0) - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.16: - fldcw 12(%esp) -..B1.17: - fldl 8(%ebp) - movl $1, %esi -..B1.18: - addl $-32, %esp - lea 56(%esp), %eax - fstpt (%esp) - movl $0, 12(%esp) - movl %eax, 16(%esp) - call __libm_reduce_pi04l -..B1.63: - addl $32, %esp -..B1.19: - fldl 24(%esp) - lea 1(%eax), %edx - faddl 32(%esp) -..B1.20: - movl %edx, %ecx - addl $3, %eax - shrl $2, %ecx - andl $1, %ecx - shrl $2, %eax - xorl %ecx, %edi - movl 20(%esp), %ecx - andl $1, %eax - andl $3, %ecx - cmpl $3, %ecx - jne ..B1.30 -..B1.21: - fldt 84+_SP@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - testb $2, %dl - fmul %st, %st(1) - fldt 72+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 60+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 48+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 36+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 24+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 12+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt _SP@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 84+_CP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 72+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt _CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldl _ones@GOTOFF(%ebx,%edi,8) - fldl _ones@GOTOFF(%ebx,%eax,8) - je ..B1.26 -..B1.22: - fmulp %st, %st(4) - testl %esi, %esi - fxch %st(2) - fmul %st(3), %st - movl 16(%esp), %eax - faddp %st, %st(3) - fxch %st(2) - fstpl (%eax) - fmul %st, %st(1) - faddp %st, %st(1) - fstpl 8(%eax) - je ..B1.24 -..B1.23: - fldcw 14(%esp) -..B1.24: - movl 40(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.53 -..B1.25: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - fxch %st(1) - fmulp %st, %st(4) - testl %esi, %esi - fxch %st(2) - fmul %st(3), %st - movl 16(%esp), %eax - faddp %st, %st(3) - fxch %st(2) - fstpl 8(%eax) - fmul %st, %st(1) - faddp %st, %st(1) - fstpl (%eax) - je ..B1.28 -..B1.27: - fldcw 14(%esp) -..B1.28: - movl 40(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.53 -..B1.29: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.30: - testb $2, 20(%esp) - je ..B1.40 -..B1.31: - fld %st(0) - testb $2, %dl - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - je ..B1.36 -..B1.32: - fstp %st(2) - fldt 84+_CP@GOTOFF(%ebx) - testl %esi, %esi - fmul %st(2), %st - fldt 72+_CP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 60+_CP@GOTOFF(%ebx) - movl 16(%esp), %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 36+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 24+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 12+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt _CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl _ones@GOTOFF(%ebx,%edi,8) - fmul %st, %st(1) - faddp %st, %st(1) - fstpl 8(%eax) - je ..B1.34 -..B1.33: - fldcw 14(%esp) -..B1.34: - movl 40(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.53 -..B1.35: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.36: - fldt 84+_SP@GOTOFF(%ebx) - testl %esi, %esi - fmul %st(1), %st - fxch %st(3) - fmull _ones@GOTOFF(%ebx,%edi,8) - fldt 72+_SP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 60+_SP@GOTOFF(%ebx) - movl 16(%esp), %eax - faddp %st, %st(5) - fxch %st(2) - fmul %st, %st(4) - fldt 48+_SP@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 36+_SP@GOTOFF(%ebx) - faddp %st, %st(5) - fmul %st, %st(4) - fldt 24+_SP@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 12+_SP@GOTOFF(%ebx) - faddp %st, %st(5) - fmulp %st, %st(4) - fldt _SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st, %st(1) - faddp %st, %st(1) - fstpl 8(%eax) - je ..B1.38 -..B1.37: - fldcw 14(%esp) -..B1.38: - movl 40(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.53 -..B1.39: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.40: - testb $1, 20(%esp) - je ..B1.50 -..B1.41: - fld %st(0) - testb $2, %dl - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - je ..B1.46 -..B1.42: - fldt 84+_SP@GOTOFF(%ebx) - testl %esi, %esi - fmul %st(1), %st - fxch %st(3) - fmull _ones@GOTOFF(%ebx,%eax,8) - fldt 72+_SP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 60+_SP@GOTOFF(%ebx) - movl 16(%esp), %eax - faddp %st, %st(5) - fxch %st(2) - fmul %st, %st(4) - fldt 48+_SP@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 36+_SP@GOTOFF(%ebx) - faddp %st, %st(5) - fmul %st, %st(4) - fldt 24+_SP@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 12+_SP@GOTOFF(%ebx) - faddp %st, %st(5) - fmulp %st, %st(4) - fldt _SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st, %st(1) - faddp %st, %st(1) - fstpl (%eax) - je ..B1.44 -..B1.43: - fldcw 14(%esp) -..B1.44: - movl 40(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.53 -..B1.45: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - fstp %st(2) - fldt 84+_CP@GOTOFF(%ebx) - testl %esi, %esi - fmul %st(2), %st - fldt 72+_CP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 60+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 36+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 24+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 12+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt _CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl _ones@GOTOFF(%ebx,%eax,8) - fmul %st, %st(1) - movl 16(%esp), %eax - faddp %st, %st(1) - fstpl (%eax) - je ..B1.48 -..B1.47: - fldcw 14(%esp) -..B1.48: - movl 40(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.53 -..B1.49: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.50: - fstp %st(0) - movl 40(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.53 -..B1.51: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.52: - xorl %esi, %esi - jmp ..B1.8 -..B1.53: - call __stack_chk_fail@PLT -..B1.60: - xorl %esi, %esi - jmp ..B1.18 - .align 16,0x90 - .type __libm_sincos_huge,@function - .size __libm_sincos_huge,.-__libm_sincos_huge - .data -# -- End __libm_sincos_huge - .section .rodata, "a" - .align 16 - .align 16 -_Pi4Inv: - .long 1841940611 - .long 1072979760 - .type _Pi4Inv,@object - .size _Pi4Inv,8 - .space 8, 0x00 # pad - .align 16 -_Pi4x3: - .long 1413754880 - .long 3219726843 - .long 993632256 - .long 1027030475 - .long 3773204808 - .long 3129236486 - .type _Pi4x3,@object - .size _Pi4x3,24 - .space 8, 0x00 # pad - .align 16 -_Pi4x4: - .long 1413480448 - .long 3219726843 - .long 442499072 - .long 3183522913 - .long 771751936 - .long 3146979722 - .long 622873025 - .long 3110831002 - .type _Pi4x4,@object - .size _Pi4x4,32 - .align 16 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 34951 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 50471 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 17910 - .word 46614 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 33371 - .word 14743 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 48947 - .word 35764 - .word 12250 - .word 45202 - .word 16350 - .word 0 - .word 17574 - .word 60698 - .word 10735 - .word 55102 - .word 49110 - .word 0 - .word 34320 - .word 12415 - .word 25249 - .word 51489 - .word 16334 - .word 0 - .type _SP,@object - .size _SP,96 - .align 16 -_CP: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 39983 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 61476 - .word 3244 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 1022 - .word 16229 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 55373 - .word 44526 - .word 50840 - .word 36726 - .word 16354 - .word 0 - .word 55994 - .word 65145 - .word 59958 - .word 51657 - .word 49114 - .word 0 - .word 15046 - .word 2976 - .word 1998 - .word 54661 - .word 16338 - .word 0 - .type _CP,@object - .size _CP,96 - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .hidden __libm_reduce_pi04l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sincos_k32.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sincos_k32.S deleted file mode 100644 index 25e11ef7ed..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sincos_k32.S +++ /dev/null @@ -1,337 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sincos_k32.c" - .text -..TXTST0: -# -- Begin __libm_sincos_k32 - .text - .align 16,0x90 - .hidden __libm_sincos_k32 - .globl __libm_sincos_k32 -__libm_sincos_k32: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -# parameter 3: 20 + %ebp -# parameter 4: 24 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp - fldl 8(%ebp) - movl 12(%ebp), %edi - movl %edi, %edx - call ..L2 -..L2: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi - andl $2147483647, %edx - fabs - shrl $31, %edi - movl 24(%ebp), %ecx - movl 16(%ebp), %eax - movl 20(%ebp), %ebx - imull iones@GOTOFF(%esi,%edi,4), %ecx - movl %eax, 36(%esp) - cmpl $1103101952, %edx - jae ..B1.9 -..B1.2: - cmpl $1073283072, %edx - ja ..B1.6 -..B1.3: - incl %ecx - movl %ecx, %edx - andl $2, %edx - je ..B1.5 -..B1.4: - fsubl .L_2il0floatpacket.0@GOTOFF(%esi) - fstl 8(%ebp) - jmp ..B1.11 -..B1.5: - fstl 8(%ebp) - jmp ..B1.11 -..B1.6: - fldl _INV_PI04@GOTOFF(%esi) - fmul %st(1), %st - movl %edi, 32(%esp) - fxch %st(1) - fstl 8(%ebp) - fldl _TWO_52H@GOTOFF(%esi) - fadd %st(2), %st - fstpl 16(%esp) - fildl 16(%esp) - movl 16(%esp), %edi - fcomp %st(2) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - movl $1, %eax - ja ..L3 - movl $0, %eax -..L3: - subl %eax, %edi - addl %edi, %ecx - movl %ecx, %eax - andl $1, %eax - addl %eax, %edi - addl %eax, %ecx - movl %edi, 24(%esp) - cmpl $1090519040, %edx - fildl 24(%esp) - movl 32(%esp), %edi - jae ..B1.8 -..B1.7: - fldl _DP2@GOTOFF(%esi) - movl %ecx, %edx - fmul %st(1), %st - andl $2, %edx - fsubrp %st, %st(2) - fldl 8+_DP2@GOTOFF(%esi) - fmul %st(1), %st - fsubrp %st, %st(2) - fldl 16+_DP2@GOTOFF(%esi) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstl 8(%ebp) - jmp ..B1.11 -..B1.8: - fstp %st(1) - fldl _DP3@GOTOFF(%esi) - movl %ecx, %edx - fmul %st(1), %st - andl $2, %edx - fldl 8+_DP3@GOTOFF(%esi) - fmul %st(2), %st - fxch %st(1) - fsubrl 8(%ebp) - fsubp %st, %st(1) - fldl 16+_DP3@GOTOFF(%esi) - fmul %st(2), %st - fsubrp %st, %st(1) - fldl 24+_DP3@GOTOFF(%esi) - fmulp %st, %st(2) - fsubp %st, %st(1) - fstl 8(%ebp) - jmp ..B1.11 -..B1.9: - fstl (%esp) - lea 8(%ebp), %eax - movl %eax, 8(%esp) - fstpl (%eax) - movl %ecx, 12(%esp) - call __libm_reduce_pi04d -..B1.17: - movl %eax, %ecx -..B1.10: - fldl 8(%ebp) - incl %ecx - movl %ecx, %edx - andl $2, %edx -..B1.11: - fldl 24+_CP@GOTOFF(%esi) - fld %st(1) - fmul %st(2), %st - lea 2(%ecx), %eax - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fld1 - fxch %st(3) - faddl 8+_CP@GOTOFF(%esi) - fmul %st(1), %st - shrl $2, %ecx - faddp %st, %st(3) - fldl 32+_CP@GOTOFF(%esi) - andl $1, %ecx - fmul %st(1), %st - xorl %ecx, %edi - fldl 24+_SP@GOTOFF(%esi) - fmul %st(2), %st - fxch %st(1) - faddl 16+_CP@GOTOFF(%esi) - fmul %st(2), %st - fxch %st(1) - faddl 8+_SP@GOTOFF(%esi) - fmul %st(2), %st - fmul %st(5), %st - shrl $2, %eax - fadd %st(5), %st - fxch %st(1) - faddl _CP@GOTOFF(%esi) - fmul %st(3), %st - andl $1, %eax - testl %edx, %edx - faddp %st, %st(4) - fldl 32+_SP@GOTOFF(%esi) - fmul %st(2), %st - faddl 16+_SP@GOTOFF(%esi) - fmulp %st, %st(2) - fxch %st(1) - faddl _SP@GOTOFF(%esi) - fmulp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fldl ones@GOTOFF(%esi,%edi,8) - je ..B1.13 -..B1.12: - fxch %st(2) - fmull ones@GOTOFF(%esi,%eax,8) - fxch %st(2) - fmulp %st, %st(1) - movl 36(%esp), %edx - fstpl (%edx) - fstpl (%ebx) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - fxch %st(1) - fmull ones@GOTOFF(%esi,%eax,8) - fxch %st(2) - fmulp %st, %st(1) - movl 36(%esp), %edx - fstpl (%edx) - fstpl (%ebx) -..B1.14: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __libm_sincos_k32,@function - .size __libm_sincos_k32,.-__libm_sincos_k32 - .data -# -- End __libm_sincos_k32 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x54442d18,0x3fe921fb - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 4 -_INV_PI04: - .long 1841940611 - .long 1072979760 - .type _INV_PI04,@object - .size _INV_PI04,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_DP2: - .long 1413742592 - .long 1072243195 - .long 1279262720 - .long 1031179299 - .long 1880851354 - .long 996723793 - .type _DP2,@object - .size _DP2,24 - .align 4 -_DP3: - .long 1073741824 - .long 1072243195 - .long 0 - .long 1046758445 - .long 2147483648 - .long 1021855384 - .long 1880851354 - .long 996723793 - .type _DP3,@object - .size _DP3,32 - .align 4 -_CP: - .long 4294960802 - .long 3219128319 - .long 1427442001 - .long 1067799893 - .long 2926645240 - .long 3210133867 - .long 2571283200 - .long 1056571689 - .long 2069816734 - .long 3197257552 - .type _CP,@object - .size _CP,40 - .align 4 -_SP: - .long 1431654765 - .long 3217380693 - .long 285032968 - .long 1065423121 - .long 3653044354 - .long 3207201183 - .long 2777006020 - .long 1053236634 - .long 43514947 - .long 3193610888 - .type _SP,@object - .size _SP,40 - .data - .hidden __libm_reduce_pi04d - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sinhl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sinhl_k80.S deleted file mode 100644 index b429851799..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sinhl_k80.S +++ /dev/null @@ -1,723 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sinhl_k80.c" - .text -..TXTST0: -# -- Begin __libm_sinhl_k80 - .text - .align 16,0x90 - .hidden __libm_sinhl_k80 - .globl __libm_sinhl_k80 -__libm_sinhl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp - movzwl 16(%ebp), %eax - andl $32767, %eax - movl 20(%ebp), %ebx - cmpl $16405, %eax - call ..L2 -..L2: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi - jge ..B1.17 -..B1.2: - cmpl $16382, %eax - jge ..B1.13 -..B1.3: - fldt 8(%ebp) - cmpl $16378, %eax - jge ..B1.11 -..B1.4: - cmpl $16373, %eax - jge ..B1.10 -..B1.5: - cmpl $16366, %eax - jge ..B1.9 -..B1.6: - fstpt (%ebx) - fldt (%ebx) - cmpl $16308, %eax - jge ..B1.8 -..B1.7: - fstp %st(0) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - fstpt 12(%ebx) - fldt 12(%ebx) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.8: - fldt _Q3@GOTOFF(%esi) - fmul %st(1), %st - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 12(%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - fldt 12+_Q2@GOTOFF(%esi) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fxch %st(2) - fstpt (%ebx) - fldt (%ebx) - fldt _Q2@GOTOFF(%esi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fmulp %st, %st(1) - fstpt 12(%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.10: - fldt 36+_Q1@GOTOFF(%esi) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(3) - fstpt (%ebx) - fldt (%ebx) - fldt 12+_Q1@GOTOFF(%esi) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 24+_Q1@GOTOFF(%esi) - fmulp %st, %st(4) - fldt _Q1@GOTOFF(%esi) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 12(%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - fldl _TWO_48H@GOTOFF(%esi) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fld %st(3) - fadd %st(3), %st - fstpt 72(%esp) - fxch %st(3) - fstpt (%esp) - fldt (%esp) - fldt 72(%esp) - fsubp %st, %st(3) - fld %st(2) - fld %st(1) - fsub %st(4), %st - fmul %st, %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fxch %st(3) - fstpt 16(%esp) - fldt 16(%esp) - fmul %st(0), %st - fldt 84+_Q@GOTOFF(%esi) - fmul %st(5), %st - fldt 60+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(5), %st - fldt 36+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(5), %st - fldt 12+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(5), %st - fldt 72+_Q@GOTOFF(%esi) - fmul %st(6), %st - fldt 48+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(6), %st - fldt 24+_Q@GOTOFF(%esi) - faddp %st, %st(1) - fmulp %st, %st(6) - fldt _Q@GOTOFF(%esi) - faddp %st, %st(6) - fxch %st(3) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(2) - fld %st(0) - fldt 96+_Q@GOTOFF(%esi) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(2) - fmul %st(3), %st - fldt (%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 16(%esp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fstpt (%ebx) - fldt (%ebx) - fsubrp %st, %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 12(%ebx) - fldt .L_2il0floatpacket.0@GOTOFF(%esi) -..B1.12: - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - fldt 8(%ebp) - fldl _TWO_63H@GOTOFF(%esi) - fldt _KLN2@GOTOFF(%esi) - fldt _LN2K@GOTOFF(%esi) - fldl _TWO_32@GOTOFF(%esi) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl ones@GOTOFF(%esi,%eax,8) - fmul %st, %st(5) - fxch %st(3) - fmul %st(5), %st - fadd %st(4), %st - fstpt 72(%esp) - fxch %st(4) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 72(%esp) - movl 72(%esp), %eax - fsubp %st, %st(4) - fxch %st(1) - fmul %st(3), %st - movsbl %al, %ecx - fsubrp %st, %st(1) - fld %st(0) - subl %ecx, %eax - fldt 12+_LN2K@GOTOFF(%esi) - fmulp %st, %st(4) - movzwl 16(%ebp), %edx - fsub %st(3), %st - fldl _TWO_32P@GOTOFF(%esi) - andl $32767, %edx - fmul %st(1), %st - fxch %st(5) - fmulp %st, %st(1) - sarl $8, %eax - fsubrp %st, %st(4) - fld %st(3) - cmpl $16387, %edx - fxch %st(1) - fsub %st(4), %st - fsubp %st, %st(3) - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%esi) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(1), %st - fldt _P@GOTOFF(%esi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%esi) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%esi) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - jle ..B1.15 -..B1.14: - shll $4, %ecx - decl %eax - movl %eax, 64(%esp) - faddp %st, %st(2) - fildl 64(%esp) - fldl 2056+__libm_expl_table_256@GOTOFF(%esi,%ecx) - fldl 2048+__libm_expl_table_256@GOTOFF(%esi,%ecx) - fld %st(0) - fmul %st(5), %st - fxch %st(5) - fadd %st(6), %st - fmul %st(2), %st - faddp %st, %st(5) - fmul %st, %st(5) - fld %st(0) - fadd %st(6), %st - fsubr %st, %st(1) - fxch %st(6) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - fstpt (%ebx) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 12(%ebx) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - je ..B1.20 -..B1.16: - fldt .L_2il0floatpacket.1@GOTOFF(%esi) - lea -1(%eax), %edi - shll $4, %ecx - fstpt (%esp) - fld %st(0) - movl %edi, 64(%esp) - movl %eax, %edi - negl %edi - fadd %st(3), %st - fxch %st(3) - fsubrp %st, %st(1) - fxch %st(1) - fstpt 16(%esp) - fld %st(2) - fldl 2056+__libm_expl_table_256@GOTOFF(%esi,%ecx) - addl $16383, %edi - fldl 2048+__libm_expl_table_256@GOTOFF(%esi,%ecx) - negl %ecx - fstpt 32(%esp) - fldt 32(%esp) - subl %eax, %edi - movzwl 8+.L_2il0floatpacket.1@GOTOFF(%esi), %edx - andl $32767, %edi - andl $-32768, %edx - fadd %st(1), %st - fmulp %st, %st(4) - fld %st(4) - fmul %st(1), %st - orl %edi, %edx - faddp %st, %st(4) - fldl 2056+__libm_expl_table_256@GOTOFF(%esi,%ecx) - fldl 2048+__libm_expl_table_256@GOTOFF(%esi,%ecx) - fld %st(0) - movw %dx, 8(%esp) - fadd %st(2), %st - fmulp %st, %st(5) - fld %st(6) - fmul %st(2), %st - fsubrp %st, %st(5) - fxch %st(4) - fstpt 48(%esp) - fxch %st(3) - fmul %st, %st(5) - fldt 32(%esp) - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fsub %st(5), %st - fsubr %st, %st(4) - fxch %st(5) - fsubrp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fld %st(0) - fldt 48(%esp) - faddp %st, %st(3) - fldt (%esp) - fmul %st, %st(5) - fxch %st(1) - fsub %st(5), %st - fsubr %st, %st(2) - fxch %st(5) - fsubrp %st, %st(2) - fmulp %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt 16(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt (%ebx) - fmulp %st, %st(1) - fstpt 12(%ebx) - fildl 64(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - cmpl $32767, %eax - je ..B1.23 -..B1.18: - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - lea (,%edx,8), %eax - fstpt 12(%ebx) - lea (%eax,%edx,4), %edx - fldt _infs@GOTOFF(%esi,%edx) - fstpt (%ebx) - fldt _infs@GOTOFF(%esi) -..B1.19: - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.20: - movl 12(%ebp), %edx - cmpl $-782985146, %edx - ja ..B1.14 -..B1.21: - jne ..B1.16 -..B1.22: - cmpl $1501741449, 8(%ebp) - ja ..B1.14 - jmp ..B1.16 -..B1.23: - fldt 8(%ebp) - fstpt (%ebx) - fldt (%ebx) - fmul %st(0), %st - fldt .L_2il0floatpacket.0@GOTOFF(%esi) - fstpt 12(%ebx) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __libm_sinhl_k80,@function - .size __libm_sinhl_k80,.-__libm_sinhl_k80 - .data -# -- End __libm_sinhl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 2 -_Q3: - .word 21845 - .word 44373 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 29491 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 1838 - .word 3745 - .word 35050 - .word 34952 - .word 16376 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 56472 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 6470 - .word 8609 - .word 207 - .word 53261 - .word 16370 - .word 0 - .word 51515 - .word 9159 - .word 10794 - .word 47344 - .word 16364 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 43620 - .word 43690 - .word 43690 - .word 43690 - .word 16364 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 52382 - .word 3328 - .word 208 - .word 53261 - .word 16370 - .word 0 - .word 44665 - .word 46658 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 15678 - .word 35942 - .word 11071 - .word 55090 - .word 16357 - .word 0 - .word 10412 - .word 23121 - .word 12507 - .word 45202 - .word 16350 - .word 0 - .word 37213 - .word 41879 - .word 65084 - .word 55102 - .word 16342 - .word 0 - .word 1721 - .word 42148 - .word 19309 - .word 52099 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16380 - .word 0 - .type _Q,@object - .size _Q,108 - .align 2 -_KLN2: - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 16391 - .word 0 - .type _KLN2,@object - .size _KLN2,12 - .align 2 -_LN2K: - .word 0 - .word 0 - .word 6134 - .word 45426 - .word 16374 - .word 0 - .word 55756 - .word 58609 - .word 48341 - .word 59623 - .word 16343 - .word 0 - .type _LN2K,@object - .size _LN2K,24 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _P,@object - .size _P,60 - .align 2 -_infs: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 65535 - .word 0 - .type _infs,@object - .size _infs,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sinl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sinl_k80.S deleted file mode 100644 index a1a3c58489..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_sinl_k80.S +++ /dev/null @@ -1,676 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sinl_k80.c" - .text -..TXTST0: -# -- Begin __libm_sinl_k80 - .text - .align 16,0x90 - .hidden __libm_sinl_k80 - .globl __libm_sinl_k80 -__libm_sinl_k80: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 144(%esp) - movzwl 16(%ebp), %eax - andl $32767, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $16378, %eax - movl 20(%ebp), %edi - jge ..B1.13 -..B1.2: - fldt 8(%ebp) - cmpl $16372, %eax - jge ..B1.11 -..B1.3: - cmpl $16364, %eax - jge ..B1.9 -..B1.4: - fstpt (%edi) - fldt (%edi) - cmpl $16308, %eax - jge ..B1.6 -..B1.5: - fstp %st(0) - fldl _zeros@GOTOFF(%ebx) - fstpt 12(%edi) - fldl _ones@GOTOFF(%ebx) - jmp ..B1.7 -..B1.6: - fldt _SP3@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 12(%edi) - fldl _ones@GOTOFF(%ebx) -..B1.7: - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.23 -..B1.8: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - fldt 12+_SP2@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fxch %st(2) - fstpt (%edi) - fldt (%edi) - fldt _SP2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fmulp %st, %st(1) - fstpt 12(%edi) - fldl _ones@GOTOFF(%ebx) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.23 -..B1.10: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - fldt 36+_SP1@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(3) - fstpt (%edi) - fldt (%edi) - fldt 12+_SP1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 24+_SP1@GOTOFF(%ebx) - fmulp %st, %st(4) - fldt _SP1@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 12(%edi) - fldl _ones@GOTOFF(%ebx) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.23 -..B1.12: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - cmpl $16382, %eax - jge ..B1.15 -..B1.14: - fldt 8(%ebp) - xorl %edx, %edx - fldl _TWO_52H@GOTOFF(%ebx) - movzbl 17(%ebp), %esi - andl $128, %esi - shrl $7, %esi - fxch %st(1) - fmull _ones@GOTOFF(%ebx,%esi,8) - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt 32(%esp) - fstpt 112(%esp) - fldt 112(%esp) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 32(%esp) - fsubp %st, %st(2) - fld %st(1) - fsubrp %st, %st(1) - jmp ..B1.18 -..B1.15: - je ..B1.27 -..B1.16: - fldt 8(%ebp) - lea 128(%esp), %eax - movzbl 17(%ebp), %esi - andl $128, %esi - shrl $7, %esi - fmull _ones@GOTOFF(%ebx,%esi,8) - fstpt (%esp) - fldt (%esp) - movl $0, 12(%esp) - fstpt 8(%ebp) - movl %eax, 16(%esp) - call __libm_reduce_pi04l -..B1.32: - movl %eax, %edx -..B1.17: - fldl 128(%esp) - lea 1(%edx), %eax - fldl _TWO_52H@GOTOFF(%ebx) - fmul %st(1), %st - fld %st(0) - shrl $2, %eax - fadd %st(2), %st - fstpt 32(%esp) - xorl %eax, %esi - fldt 32(%esp) - andl $1, %esi - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddl 136(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpt 112(%esp) -..B1.18: - fldt 112(%esp) - fld %st(2) - fmul %st(2), %st - fld %st(2) - fmulp %st, %st(2) - incl %edx - faddp %st, %st(1) - fstpt 48(%esp) - fldt 48(%esp) - fld %st(2) - fmul %st(3), %st - testb $2, %dl - fld %st(0) - fadd %st(2), %st - fstpt 80(%esp) - fldt 80(%esp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fmul %st(0), %st - fld %st(0) - faddp %st, %st(2) - fldl _TWO_53H@GOTOFF(%ebx) - je ..B1.20 -..B1.19: - fstp %st(3) - fstp %st(3) - fldt 84+_CP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 60+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_CP@GOTOFF(%ebx) - fldt 96+_CP@GOTOFF(%ebx) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _CP@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 80(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 64(%esp) - fldt 48(%esp) - fldt 96(%esp) - fldt 120+_CP@GOTOFF(%ebx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(5) - fldt 108+_CP@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fld %st(4) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fadd %st(1), %st - fmul %st, %st(2) - fadd %st(2), %st - fstpt 32(%esp) - fldt 32(%esp) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldl _ones@GOTOFF(%ebx) - fld %st(0) - fxch %st(1) - fadd %st, %st(2) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fldl _ones@GOTOFF(%ebx,%esi,8) - fmul %st, %st(1) - fxch %st(1) - fstpt (%edi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 12(%edi) - jmp ..B1.21 -..B1.20: - fldt 84+_SP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 60+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 12+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_SP@GOTOFF(%ebx) - fldt 96+_SP@GOTOFF(%ebx) - fmul %st(5), %st - faddp %st, %st(1) - fmul %st(4), %st - fldt 48+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 24+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(4) - fldt _SP@GOTOFF(%ebx) - faddp %st, %st(4) - fldt 80(%esp) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt 64(%esp) - fldt 48(%esp) - fldt 120+_SP@GOTOFF(%ebx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(3) - fldt 108+_SP@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fldt 96(%esp) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fmul %st, %st(1) - fadd %st(1), %st - fstpt 32(%esp) - fldt 32(%esp) - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fmul %st(4), %st - fldt 112(%esp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldl _ones@GOTOFF(%ebx,%esi,8) - fmul %st, %st(2) - fxch %st(2) - fstpt (%edi) - fmulp %st, %st(1) - fstpt 12(%edi) - fldl _ones@GOTOFF(%ebx) -..B1.21: - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.23 -..B1.22: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.27: - movl 12(%ebp), %eax - cmpl $-921707870, %eax - jb ..B1.14 -..B1.28: - jne ..B1.16 -..B1.29: - cmpl $560513589, 8(%ebp) - jbe ..B1.14 - jmp ..B1.16 - .align 16,0x90 - .type __libm_sinl_k80,@function - .size __libm_sinl_k80,.-__libm_sinl_k80 - .data -# -- End __libm_sinl_k80 - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 2 -_SP3: - .word 17476 - .word 43656 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .type _SP3,@object - .size _SP3,12 - .align 2 -_SP2: - .word 43210 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 1587 - .word 57422 - .word 34932 - .word 34952 - .word 16376 - .word 0 - .type _SP2,@object - .size _SP2,24 - .align 2 -_SP1: - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 12518 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 43088 - .word 7396 - .word 207 - .word 53261 - .word 49138 - .word 0 - .word 55827 - .word 48618 - .word 3602 - .word 47342 - .word 16364 - .word 0 - .type _SP1,@object - .size _SP1,48 - .align 2 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .type _CP,@object - .size _CP,132 - .align 2 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .type _SP,@object - .size _SP,132 - .data - .hidden __libm_reduce_pi04l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_strtoull.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_strtoull.S deleted file mode 100644 index 2656daf3b5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_strtoull.S +++ /dev/null @@ -1,1128 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_strtoull.c" - .text -..TXTST0: -# -- Begin __libm_conv_strtoull - .text - .align 16,0x90 - .hidden __libm_conv_strtoull - .globl __libm_conv_strtoull -__libm_conv_strtoull: -# parameter 1: 64 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $44, %esp - movl 64(%esp), %eax - testl %eax, %eax - je ..B1.21 -..B1.2: - movsbl (%eax), %ebx - testl %ebx, %ebx - je ..B1.21 -..B1.3: - xorl %edx, %edx - movl %eax, %ecx -..B1.4: - incl %ecx - incl %edx - cmpb $0, (%ecx) - jne ..B1.4 -..B1.5: - testl %edx, %edx - je ..B1.21 -..B1.6: - lea -48(%ebx), %ebp - cmpl $9, %ebp - ja ..B1.21 -..B1.8: - cmpl $48, %ebx - je ..B1.25 -..B1.9: - cmpl $1, %edx - jle ..B1.14 -..B1.10: - movl $1, %ebx -..B1.11: - movsbl (%ebx,%eax), %ebp - addl $-48, %ebp - cmpl $9, %ebp - ja ..B1.21 -..B1.12: - incl %ebx - cmpl %edx, %ebx - jl ..B1.11 -..B1.14: - cmpl $64, %edx - movl %edx, %ebx - jb ..L2 - movl $64, %ebx -..L2: - testl %edx, %edx - jle ..B1.21 -..B1.15: - movl %ebx, %edx - xorl %ebp, %ebp - shrl $1, %edx - xorl %esi, %esi - call ..L3 -..L3: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L3](%edi), %edi - testl %edx, %edx - jbe ..B1.23 -..B1.16: - movl %ecx, (%esp) - xorl %eax, %eax - movl %edx, 12(%esp) - movl %ebx, 8(%esp) - movl %ecx, 4(%esp) - movl (%esp), %edx -..B1.17: - movzbl -1(%edx), %ebx - addl $-48, %ebx - movsbl %bl, %ecx - lea (%eax,%eax,4), %ebx - shll $5, %ebx - incl %eax - lea _C_MUL_10_POW_I@GOTOFF(%edi,%ecx,8), %ecx - addl (%ecx,%ebx), %ebp - adcl 4(%ecx,%ebx), %esi - movzbl -2(%edx), %ecx - addl $-2, %edx - addl $-48, %ecx - movsbl %cl, %ecx - lea _C_MUL_10_POW_I@GOTOFF(%edi,%ecx,8), %ecx - addl 80(%ecx,%ebx), %ebp - adcl 84(%ecx,%ebx), %esi - cmpl 12(%esp), %eax - jb ..B1.17 -..B1.18: - movl 8(%esp), %ebx - lea 1(%eax,%eax), %eax - movl 4(%esp), %ecx -..B1.19: - lea -1(%eax), %edx - cmpl %edx, %ebx - jbe ..B1.22 -..B1.20: - subl %eax, %ecx - lea (%eax,%eax,4), %ebx - shll $4, %ebx - movzbl (%ecx), %ecx - addl $-48, %ecx - movsbl %cl, %ecx - lea (%ebx,%ecx,8), %ecx - addl -80+_C_MUL_10_POW_I@GOTOFF(%edi,%ecx), %ebp - adcl -76+_C_MUL_10_POW_I@GOTOFF(%edi,%ecx), %esi - jmp ..B1.22 -..B1.21: - xorl %ebp, %ebp - xorl %esi, %esi -..B1.22: - movl %ebp, %eax - movl %esi, %edx - addl $44, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.23: - movl $1, %eax - jmp ..B1.19 -..B1.25: - cmpl $3, %edx - jl ..B1.27 -..B1.26: - movsbl 1(%eax), %ebx - andl $-33, %ebx - cmpl $88, %ebx - je ..B1.51 - jmp ..B1.28 -..B1.27: - cmpl $1, %edx - jle ..B1.32 -..B1.28: - movl $1, %ebx -..B1.29: - movsbl (%ebx,%eax), %ebp - addl $-48, %ebp - cmpl $7, %ebp - ja ..B1.21 -..B1.30: - incl %ebx - cmpl %edx, %ebx - jl ..B1.29 -..B1.32: - decl %edx - cmpl $22, %edx - movl %edx, %edi - jb ..L4 - movl $22, %edi -..L4: - testl %edx, %edx - jle ..B1.21 -..B1.33: - movl %edi, %eax - xorl %ebp, %ebp - shrl $1, %eax - xorl %esi, %esi - testl %eax, %eax - jbe ..B1.49 -..B1.34: - movl %ecx, %ebx - movl %ebp, 16(%esp) - movl %eax, 8(%esp) - movl %edi, (%esp) - movl %ecx, 4(%esp) -..B1.35: - movl 16(%esp), %edi - movzbl -1(%ebx), %ecx - addl $-48, %ecx - movsbl %cl, %eax - lea (%edi,%edi,2), %ecx - movl %ecx, 12(%esp) - addl %ecx, %ecx - cmpl $31, %ecx - cltd - jbe ..B1.37 -..B1.36: - movl %eax, %edx - xorl %edi, %edi - shll %cl, %edx - jmp ..B1.38 -..B1.37: - movl %eax, %edi - shldl %cl, %edi, %edx - shll %cl, %edi -..B1.38: - addl %edi, %ebp - movl 12(%esp), %edi - movzbl -2(%ebx), %ecx - adcl %edx, %esi - addl $-48, %ecx - movsbl %cl, %eax - lea 3(%edi,%edi), %ecx - cltd - cmpl $31, %ecx - jbe ..B1.40 -..B1.39: - movl %eax, %edx - xorl %edi, %edi - shll %cl, %edx - jmp ..B1.41 -..B1.40: - movl %eax, %edi - shldl %cl, %eax, %edx - shll %cl, %edi -..B1.41: - addl %edi, %ebp - movl 16(%esp), %ecx - adcl %edx, %esi - incl %ecx - addl $-2, %ebx - movl %ecx, 16(%esp) - cmpl 8(%esp), %ecx - jb ..B1.35 -..B1.42: - movl %ecx, %edx - lea 1(%edx,%edx), %ebx - movl (%esp), %edi - movl 4(%esp), %ecx -..B1.43: - lea -1(%ebx), %eax - cmpl %eax, %edi - jbe ..B1.22 -..B1.44: - subl %ebx, %ecx - movzbl (%ecx), %ecx - addl $-48, %ecx - movsbl %cl, %eax - lea -3(%ebx,%ebx,2), %ecx - cltd - cmpl $31, %ecx - jbe ..B1.46 -..B1.45: - movl %eax, %edx - xorl %ebx, %ebx - shll %cl, %edx -..B1.47: - addl %ebx, %ebp - adcl %edx, %esi - jmp ..B1.22 -..B1.46: - movl %eax, %ebx - shldl %cl, %eax, %edx - shll %cl, %ebx - jmp ..B1.47 -..B1.49: - movl $1, %ebx - jmp ..B1.43 -..B1.51: - addl $-2, %edx - xorl %ebx, %ebx -..B1.52: - movsbl 2(%ebx,%eax), %esi - lea -48(%esi), %ebp - cmpl $9, %ebp - jbe ..B1.55 -..B1.53: - lea -97(%esi), %ebp - cmpl $5, %ebp - jbe ..B1.55 -..B1.54: - addl $-65, %esi - cmpl $5, %esi - ja ..B1.21 -..B1.55: - incl %ebx - cmpl %edx, %ebx - jb ..B1.52 -..B1.56: - cmpl $16, %edx - movl %edx, %eax - jb ..L5 - movl $16, %eax -..L5: - testl %edx, %edx - jle ..B1.21 -..B1.57: - movl %eax, %edx - xorl %ebp, %ebp - shrl $1, %edx - xorl %esi, %esi - testl %edx, %edx - jbe ..B1.89 -..B1.58: - movl %ecx, %edi - xorl %ebx, %ebx - movl %edi, 32(%esp) - movl %edx, 28(%esp) - movl %eax, (%esp) - movl %ecx, 4(%esp) -..B1.59: - movl 32(%esp), %edi - movsbl -1(%edi), %ecx - movl %ecx, 20(%esp) - lea -48(%ecx), %ecx - movl %ecx, 8(%esp) - cmpl $9, %ecx - ja ..B1.61 -..B1.60: - movsbl 8(%esp), %eax - jmp ..B1.64 -..B1.61: - movl 20(%esp), %ecx - lea -97(%ecx), %edi - cmpl $5, %edi - ja ..B1.63 -..B1.62: - addl $-87, %ecx - movsbl %cl, %eax - jmp ..B1.64 -..B1.63: - addl $-55, %ecx - movsbl %cl, %eax -..B1.64: - cltd - lea (,%ebx,8), %ecx - cmpl $31, %ecx - jbe ..B1.66 -..B1.65: - movl %eax, %edx - movl $0, 16(%esp) - shll %cl, %edx - jmp ..B1.67 -..B1.66: - shldl %cl, %eax, %edx - shll %cl, %eax - movl %eax, 16(%esp) -..B1.67: - movl 32(%esp), %edi - addl 16(%esp), %ebp - movsbl -2(%edi), %ecx - adcl %edx, %esi - movl %ecx, 24(%esp) - lea -48(%ecx), %ecx - movl %ecx, 12(%esp) - cmpl $9, %ecx - ja ..B1.69 -..B1.68: - movsbl 12(%esp), %eax - jmp ..B1.72 -..B1.69: - movl 24(%esp), %ecx - lea -97(%ecx), %edi - cmpl $5, %edi - ja ..B1.71 -..B1.70: - addl $-87, %ecx - movsbl %cl, %eax - jmp ..B1.72 -..B1.71: - addl $-55, %ecx - movsbl %cl, %eax -..B1.72: - cltd - lea 4(,%ebx,8), %ecx - cmpl $31, %ecx - jbe ..B1.74 -..B1.73: - movl %eax, %edx - xorl %edi, %edi - shll %cl, %edx - jmp ..B1.75 -..B1.74: - movl %eax, %edi - shldl %cl, %eax, %edx - shll %cl, %edi -..B1.75: - addl %edi, %ebp - adcl %edx, %esi - incl %ebx - addl $-2, 32(%esp) - cmpl 28(%esp), %ebx - jb ..B1.59 -..B1.76: - movl (%esp), %eax - lea 1(%ebx,%ebx), %edi - movl 4(%esp), %ecx -..B1.77: - lea -1(%edi), %ebx - cmpl %ebx, %eax - jbe ..B1.22 -..B1.78: - subl %edi, %ecx - movsbl (%ecx), %ebx - lea -48(%ebx), %ecx - cmpl $9, %ecx - ja ..B1.80 -..B1.79: - movsbl %cl, %eax - jmp ..B1.83 -..B1.80: - lea -97(%ebx), %ecx - cmpl $5, %ecx - ja ..B1.82 -..B1.81: - addl $-87, %ebx - movsbl %bl, %eax - jmp ..B1.83 -..B1.82: - addl $-55, %ebx - movsbl %bl, %eax -..B1.83: - cltd - lea -4(,%edi,4), %ecx - cmpl $31, %ecx - jbe ..B1.85 -..B1.84: - movl %eax, %edx - xorl %ebx, %ebx - shll %cl, %edx -..B1.86: - addl %ebx, %ebp - adcl %edx, %esi - jmp ..B1.22 -..B1.85: - movl %eax, %ebx - shldl %cl, %eax, %edx - shll %cl, %ebx - jmp ..B1.86 -..B1.89: - movl $1, %edi - jmp ..B1.77 - .align 16,0x90 - .type __libm_conv_strtoull,@function - .size __libm_conv_strtoull,.-__libm_conv_strtoull - .data -# -- End __libm_conv_strtoull - .section .rodata, "a" - .align 8 - .align 8 -_C_MUL_10_POW_I: - .long 0x00000000,0x00000000 - .long 0x00000001,0x00000000 - .long 0x00000002,0x00000000 - .long 0x00000003,0x00000000 - .long 0x00000004,0x00000000 - .long 0x00000005,0x00000000 - .long 0x00000006,0x00000000 - .long 0x00000007,0x00000000 - .long 0x00000008,0x00000000 - .long 0x00000009,0x00000000 - .long 0x00000000,0x00000000 - .long 0x0000000a,0x00000000 - .long 0x00000014,0x00000000 - .long 0x0000001e,0x00000000 - .long 0x00000028,0x00000000 - .long 0x00000032,0x00000000 - .long 0x0000003c,0x00000000 - .long 0x00000046,0x00000000 - .long 0x00000050,0x00000000 - .long 0x0000005a,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000064,0x00000000 - .long 0x000000c8,0x00000000 - .long 0x0000012c,0x00000000 - .long 0x00000190,0x00000000 - .long 0x000001f4,0x00000000 - .long 0x00000258,0x00000000 - .long 0x000002bc,0x00000000 - .long 0x00000320,0x00000000 - .long 0x00000384,0x00000000 - .long 0x00000000,0x00000000 - .long 0x000003e8,0x00000000 - .long 0x000007d0,0x00000000 - .long 0x00000bb8,0x00000000 - .long 0x00000fa0,0x00000000 - .long 0x00001388,0x00000000 - .long 0x00001770,0x00000000 - .long 0x00001b58,0x00000000 - .long 0x00001f40,0x00000000 - .long 0x00002328,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00002710,0x00000000 - .long 0x00004e20,0x00000000 - .long 0x00007530,0x00000000 - .long 0x00009c40,0x00000000 - .long 0x0000c350,0x00000000 - .long 0x0000ea60,0x00000000 - .long 0x00011170,0x00000000 - .long 0x00013880,0x00000000 - .long 0x00015f90,0x00000000 - .long 0x00000000,0x00000000 - .long 0x000186a0,0x00000000 - .long 0x00030d40,0x00000000 - .long 0x000493e0,0x00000000 - .long 0x00061a80,0x00000000 - .long 0x0007a120,0x00000000 - .long 0x000927c0,0x00000000 - .long 0x000aae60,0x00000000 - .long 0x000c3500,0x00000000 - .long 0x000dbba0,0x00000000 - .long 0x00000000,0x00000000 - .long 0x000f4240,0x00000000 - .long 0x001e8480,0x00000000 - .long 0x002dc6c0,0x00000000 - .long 0x003d0900,0x00000000 - .long 0x004c4b40,0x00000000 - .long 0x005b8d80,0x00000000 - .long 0x006acfc0,0x00000000 - .long 0x007a1200,0x00000000 - .long 0x00895440,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00989680,0x00000000 - .long 0x01312d00,0x00000000 - .long 0x01c9c380,0x00000000 - .long 0x02625a00,0x00000000 - .long 0x02faf080,0x00000000 - .long 0x03938700,0x00000000 - .long 0x042c1d80,0x00000000 - .long 0x04c4b400,0x00000000 - .long 0x055d4a80,0x00000000 - .long 0x00000000,0x00000000 - .long 0x05f5e100,0x00000000 - .long 0x0bebc200,0x00000000 - .long 0x11e1a300,0x00000000 - .long 0x17d78400,0x00000000 - .long 0x1dcd6500,0x00000000 - .long 0x23c34600,0x00000000 - .long 0x29b92700,0x00000000 - .long 0x2faf0800,0x00000000 - .long 0x35a4e900,0x00000000 - .long 0x00000000,0x00000000 - .long 0x3b9aca00,0x00000000 - .long 0x77359400,0x00000000 - .long 0xb2d05e00,0x00000000 - .long 0xee6b2800,0x00000000 - .long 0x2a05f200,0x00000001 - .long 0x65a0bc00,0x00000001 - .long 0xa13b8600,0x00000001 - .long 0xdcd65000,0x00000001 - .long 0x18711a00,0x00000002 - .long 0x00000000,0x00000000 - .long 0x540be400,0x00000002 - .long 0xa817c800,0x00000004 - .long 0xfc23ac00,0x00000006 - .long 0x502f9000,0x00000009 - .long 0xa43b7400,0x0000000b - .long 0xf8475800,0x0000000d - .long 0x4c533c00,0x00000010 - .long 0xa05f2000,0x00000012 - .long 0xf46b0400,0x00000014 - .long 0x00000000,0x00000000 - .long 0x4876e800,0x00000017 - .long 0x90edd000,0x0000002e - .long 0xd964b800,0x00000045 - .long 0x21dba000,0x0000005d - .long 0x6a528800,0x00000074 - .long 0xb2c97000,0x0000008b - .long 0xfb405800,0x000000a2 - .long 0x43b74000,0x000000ba - .long 0x8c2e2800,0x000000d1 - .long 0x00000000,0x00000000 - .long 0xd4a51000,0x000000e8 - .long 0xa94a2000,0x000001d1 - .long 0x7def3000,0x000002ba - .long 0x52944000,0x000003a3 - .long 0x27395000,0x0000048c - .long 0xfbde6000,0x00000574 - .long 0xd0837000,0x0000065d - .long 0xa5288000,0x00000746 - .long 0x79cd9000,0x0000082f - .long 0x00000000,0x00000000 - .long 0x4e72a000,0x00000918 - .long 0x9ce54000,0x00001230 - .long 0xeb57e000,0x00001b48 - .long 0x39ca8000,0x00002461 - .long 0x883d2000,0x00002d79 - .long 0xd6afc000,0x00003691 - .long 0x25226000,0x00003faa - .long 0x73950000,0x000048c2 - .long 0xc207a000,0x000051da - .long 0x00000000,0x00000000 - .long 0x107a4000,0x00005af3 - .long 0x20f48000,0x0000b5e6 - .long 0x316ec000,0x000110d9 - .long 0x41e90000,0x00016bcc - .long 0x52634000,0x0001c6bf - .long 0x62dd8000,0x000221b2 - .long 0x7357c000,0x00027ca5 - .long 0x83d20000,0x0002d798 - .long 0x944c4000,0x0003328b - .long 0x00000000,0x00000000 - .long 0xa4c68000,0x00038d7e - .long 0x498d0000,0x00071afd - .long 0xee538000,0x000aa87b - .long 0x931a0000,0x000e35fa - .long 0x37e08000,0x0011c379 - .long 0xdca70000,0x001550f7 - .long 0x816d8000,0x0018de76 - .long 0x26340000,0x001c6bf5 - .long 0xcafa8000,0x001ff973 - .long 0x00000000,0x00000000 - .long 0x6fc10000,0x002386f2 - .long 0xdf820000,0x00470de4 - .long 0x4f430000,0x006a94d7 - .long 0xbf040000,0x008e1bc9 - .long 0x2ec50000,0x00b1a2bc - .long 0x9e860000,0x00d529ae - .long 0x0e470000,0x00f8b0a1 - .long 0x7e080000,0x011c3793 - .long 0xedc90000,0x013fbe85 - .long 0x00000000,0x00000000 - .long 0x5d8a0000,0x01634578 - .long 0xbb140000,0x02c68af0 - .long 0x189e0000,0x0429d069 - .long 0x76280000,0x058d15e1 - .long 0xd3b20000,0x06f05b59 - .long 0x313c0000,0x0853a0d2 - .long 0x8ec60000,0x09b6e64a - .long 0xec500000,0x0b1a2bc2 - .long 0x49da0000,0x0c7d713b - .long 0x00000000,0x00000000 - .long 0xa7640000,0x0de0b6b3 - .long 0x4ec80000,0x1bc16d67 - .long 0xf62c0000,0x29a2241a - .long 0x9d900000,0x3782dace - .long 0x44f40000,0x45639182 - .long 0xec580000,0x53444835 - .long 0x93bc0000,0x6124fee9 - .long 0x3b200000,0x6f05b59d - .long 0xe2840000,0x7ce66c50 - .long 0x00000000,0x00000000 - .long 0x89e80000,0x8ac72304 - .long 0x13d00000,0x158e4609 - .long 0x9db80000,0xa055690d - .long 0x27a00000,0x2b1c8c12 - .long 0xb1880000,0xb5e3af16 - .long 0x3b700000,0x40aad21b - .long 0xc5580000,0xcb71f51f - .long 0x4f400000,0x56391824 - .long 0xd9280000,0xe1003b28 - .long 0x00000000,0x00000000 - .long 0x63100000,0x6bc75e2d - .long 0xc6200000,0xd78ebc5a - .long 0x29300000,0x43561a88 - .long 0x8c400000,0xaf1d78b5 - .long 0xef500000,0x1ae4d6e2 - .long 0x52600000,0x86ac3510 - .long 0xb5700000,0xf273933d - .long 0x18800000,0x5e3af16b - .long 0x7b900000,0xca024f98 - .long 0x00000000,0x00000000 - .long 0xdea00000,0x35c9adc5 - .long 0xbd400000,0x6b935b8b - .long 0x9be00000,0xa15d0951 - .long 0x7a800000,0xd726b717 - .long 0x59200000,0x0cf064dd - .long 0x37c00000,0x42ba12a3 - .long 0x16600000,0x7883c069 - .long 0xf5000000,0xae4d6e2e - .long 0xd3a00000,0xe4171bf4 - .long 0x00000000,0x00000000 - .long 0xb2400000,0x19e0c9ba - .long 0x64800000,0x33c19375 - .long 0x16c00000,0x4da25d30 - .long 0xc9000000,0x678326ea - .long 0x7b400000,0x8163f0a5 - .long 0x2d800000,0x9b44ba60 - .long 0xdfc00000,0xb525841a - .long 0x92000000,0xcf064dd5 - .long 0x44400000,0xe8e71790 - .long 0x00000000,0x00000000 - .long 0xf6800000,0x02c7e14a - .long 0xed000000,0x058fc295 - .long 0xe3800000,0x0857a3e0 - .long 0xda000000,0x0b1f852b - .long 0xd0800000,0x0de76676 - .long 0xc7000000,0x10af47c1 - .long 0xbd800000,0x1377290c - .long 0xb4000000,0x163f0a57 - .long 0xaa800000,0x1906eba2 - .long 0x00000000,0x00000000 - .long 0xa1000000,0x1bcecced - .long 0x42000000,0x379d99db - .long 0xe3000000,0x536c66c8 - .long 0x84000000,0x6f3b33b6 - .long 0x25000000,0x8b0a00a4 - .long 0xc6000000,0xa6d8cd91 - .long 0x67000000,0xc2a79a7f - .long 0x08000000,0xde76676d - .long 0xa9000000,0xfa45345a - .long 0x00000000,0x00000000 - .long 0x4a000000,0x16140148 - .long 0x94000000,0x2c280290 - .long 0xde000000,0x423c03d8 - .long 0x28000000,0x58500521 - .long 0x72000000,0x6e640669 - .long 0xbc000000,0x847807b1 - .long 0x06000000,0x9a8c08fa - .long 0x50000000,0xb0a00a42 - .long 0x9a000000,0xc6b40b8a - .long 0x00000000,0x00000000 - .long 0xe4000000,0xdcc80cd2 - .long 0xc8000000,0xb99019a5 - .long 0xac000000,0x96582678 - .long 0x90000000,0x7320334b - .long 0x74000000,0x4fe8401e - .long 0x58000000,0x2cb04cf1 - .long 0x3c000000,0x097859c4 - .long 0x20000000,0xe6406697 - .long 0x04000000,0xc308736a - .long 0x00000000,0x00000000 - .long 0xe8000000,0x9fd0803c - .long 0xd0000000,0x3fa10079 - .long 0xb8000000,0xdf7180b6 - .long 0xa0000000,0x7f4200f3 - .long 0x88000000,0x1f128130 - .long 0x70000000,0xbee3016d - .long 0x58000000,0x5eb381aa - .long 0x40000000,0xfe8401e7 - .long 0x28000000,0x9e548224 - .long 0x00000000,0x00000000 - .long 0x10000000,0x3e250261 - .long 0x20000000,0x7c4a04c2 - .long 0x30000000,0xba6f0723 - .long 0x40000000,0xf8940984 - .long 0x50000000,0x36b90be5 - .long 0x60000000,0x74de0e46 - .long 0x70000000,0xb30310a7 - .long 0x80000000,0xf1281308 - .long 0x90000000,0x2f4d1569 - .long 0x00000000,0x00000000 - .long 0xa0000000,0x6d7217ca - .long 0x40000000,0xdae42f95 - .long 0xe0000000,0x4856475f - .long 0x80000000,0xb5c85f2a - .long 0x20000000,0x233a76f5 - .long 0xc0000000,0x90ac8ebf - .long 0x60000000,0xfe1ea68a - .long 0x00000000,0x6b90be55 - .long 0xa0000000,0xd902d61f - .long 0x00000000,0x00000000 - .long 0x40000000,0x4674edea - .long 0x80000000,0x8ce9dbd4 - .long 0xc0000000,0xd35ec9be - .long 0x00000000,0x19d3b7a9 - .long 0x40000000,0x6048a593 - .long 0x80000000,0xa6bd937d - .long 0xc0000000,0xed328167 - .long 0x00000000,0x33a76f52 - .long 0x40000000,0x7a1c5d3c - .long 0x00000000,0x00000000 - .long 0x80000000,0xc0914b26 - .long 0x00000000,0x8122964d - .long 0x80000000,0x41b3e173 - .long 0x00000000,0x02452c9a - .long 0x80000000,0xc2d677c0 - .long 0x00000000,0x8367c2e7 - .long 0x80000000,0x43f90e0d - .long 0x00000000,0x048a5934 - .long 0x80000000,0xc51ba45a - .long 0x00000000,0x00000000 - .long 0x00000000,0x85acef81 - .long 0x00000000,0x0b59df02 - .long 0x00000000,0x9106ce83 - .long 0x00000000,0x16b3be04 - .long 0x00000000,0x9c60ad85 - .long 0x00000000,0x220d9d06 - .long 0x00000000,0xa7ba8c87 - .long 0x00000000,0x2d677c08 - .long 0x00000000,0xb3146b89 - .long 0x00000000,0x00000000 - .long 0x00000000,0x38c15b0a - .long 0x00000000,0x7182b614 - .long 0x00000000,0xaa44111e - .long 0x00000000,0xe3056c28 - .long 0x00000000,0x1bc6c732 - .long 0x00000000,0x5488223c - .long 0x00000000,0x8d497d46 - .long 0x00000000,0xc60ad850 - .long 0x00000000,0xfecc335a - .long 0x00000000,0x00000000 - .long 0x00000000,0x378d8e64 - .long 0x00000000,0x6f1b1cc8 - .long 0x00000000,0xa6a8ab2c - .long 0x00000000,0xde363990 - .long 0x00000000,0x15c3c7f4 - .long 0x00000000,0x4d515658 - .long 0x00000000,0x84dee4bc - .long 0x00000000,0xbc6c7320 - .long 0x00000000,0xf3fa0184 - .long 0x00000000,0x00000000 - .long 0x00000000,0x2b878fe8 - .long 0x00000000,0x570f1fd0 - .long 0x00000000,0x8296afb8 - .long 0x00000000,0xae1e3fa0 - .long 0x00000000,0xd9a5cf88 - .long 0x00000000,0x052d5f70 - .long 0x00000000,0x30b4ef58 - .long 0x00000000,0x5c3c7f40 - .long 0x00000000,0x87c40f28 - .long 0x00000000,0x00000000 - .long 0x00000000,0xb34b9f10 - .long 0x00000000,0x66973e20 - .long 0x00000000,0x19e2dd30 - .long 0x00000000,0xcd2e7c40 - .long 0x00000000,0x807a1b50 - .long 0x00000000,0x33c5ba60 - .long 0x00000000,0xe7115970 - .long 0x00000000,0x9a5cf880 - .long 0x00000000,0x4da89790 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00f436a0 - .long 0x00000000,0x01e86d40 - .long 0x00000000,0x02dca3e0 - .long 0x00000000,0x03d0da80 - .long 0x00000000,0x04c51120 - .long 0x00000000,0x05b947c0 - .long 0x00000000,0x06ad7e60 - .long 0x00000000,0x07a1b500 - .long 0x00000000,0x0895eba0 - .long 0x00000000,0x00000000 - .long 0x00000000,0x098a2240 - .long 0x00000000,0x13144480 - .long 0x00000000,0x1c9e66c0 - .long 0x00000000,0x26288900 - .long 0x00000000,0x2fb2ab40 - .long 0x00000000,0x393ccd80 - .long 0x00000000,0x42c6efc0 - .long 0x00000000,0x4c511200 - .long 0x00000000,0x55db3440 - .long 0x00000000,0x00000000 - .long 0x00000000,0x5f655680 - .long 0x00000000,0xbecaad00 - .long 0x00000000,0x1e300380 - .long 0x00000000,0x7d955a00 - .long 0x00000000,0xdcfab080 - .long 0x00000000,0x3c600700 - .long 0x00000000,0x9bc55d80 - .long 0x00000000,0xfb2ab400 - .long 0x00000000,0x5a900a80 - .long 0x00000000,0x00000000 - .long 0x00000000,0xb9f56100 - .long 0x00000000,0x73eac200 - .long 0x00000000,0x2de02300 - .long 0x00000000,0xe7d58400 - .long 0x00000000,0xa1cae500 - .long 0x00000000,0x5bc04600 - .long 0x00000000,0x15b5a700 - .long 0x00000000,0xcfab0800 - .long 0x00000000,0x89a06900 - .long 0x00000000,0x00000000 - .long 0x00000000,0x4395ca00 - .long 0x00000000,0x872b9400 - .long 0x00000000,0xcac15e00 - .long 0x00000000,0x0e572800 - .long 0x00000000,0x51ecf200 - .long 0x00000000,0x9582bc00 - .long 0x00000000,0xd9188600 - .long 0x00000000,0x1cae5000 - .long 0x00000000,0x60441a00 - .long 0x00000000,0x00000000 - .long 0x00000000,0xa3d9e400 - .long 0x00000000,0x47b3c800 - .long 0x00000000,0xeb8dac00 - .long 0x00000000,0x8f679000 - .long 0x00000000,0x33417400 - .long 0x00000000,0xd71b5800 - .long 0x00000000,0x7af53c00 - .long 0x00000000,0x1ecf2000 - .long 0x00000000,0xc2a90400 - .long 0x00000000,0x00000000 - .long 0x00000000,0x6682e800 - .long 0x00000000,0xcd05d000 - .long 0x00000000,0x3388b800 - .long 0x00000000,0x9a0ba000 - .long 0x00000000,0x008e8800 - .long 0x00000000,0x67117000 - .long 0x00000000,0xcd945800 - .long 0x00000000,0x34174000 - .long 0x00000000,0x9a9a2800 - .long 0x00000000,0x00000000 - .long 0x00000000,0x011d1000 - .long 0x00000000,0x023a2000 - .long 0x00000000,0x03573000 - .long 0x00000000,0x04744000 - .long 0x00000000,0x05915000 - .long 0x00000000,0x06ae6000 - .long 0x00000000,0x07cb7000 - .long 0x00000000,0x08e88000 - .long 0x00000000,0x0a059000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x0b22a000 - .long 0x00000000,0x16454000 - .long 0x00000000,0x2167e000 - .long 0x00000000,0x2c8a8000 - .long 0x00000000,0x37ad2000 - .long 0x00000000,0x42cfc000 - .long 0x00000000,0x4df26000 - .long 0x00000000,0x59150000 - .long 0x00000000,0x6437a000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x6f5a4000 - .long 0x00000000,0xdeb48000 - .long 0x00000000,0x4e0ec000 - .long 0x00000000,0xbd690000 - .long 0x00000000,0x2cc34000 - .long 0x00000000,0x9c1d8000 - .long 0x00000000,0x0b77c000 - .long 0x00000000,0x7ad20000 - .long 0x00000000,0xea2c4000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x59868000 - .long 0x00000000,0xb30d0000 - .long 0x00000000,0x0c938000 - .long 0x00000000,0x661a0000 - .long 0x00000000,0xbfa08000 - .long 0x00000000,0x19270000 - .long 0x00000000,0x72ad8000 - .long 0x00000000,0xcc340000 - .long 0x00000000,0x25ba8000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x7f410000 - .long 0x00000000,0xfe820000 - .long 0x00000000,0x7dc30000 - .long 0x00000000,0xfd040000 - .long 0x00000000,0x7c450000 - .long 0x00000000,0xfb860000 - .long 0x00000000,0x7ac70000 - .long 0x00000000,0xfa080000 - .long 0x00000000,0x79490000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xf88a0000 - .long 0x00000000,0xf1140000 - .long 0x00000000,0xe99e0000 - .long 0x00000000,0xe2280000 - .long 0x00000000,0xdab20000 - .long 0x00000000,0xd33c0000 - .long 0x00000000,0xcbc60000 - .long 0x00000000,0xc4500000 - .long 0x00000000,0xbcda0000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xb5640000 - .long 0x00000000,0x6ac80000 - .long 0x00000000,0x202c0000 - .long 0x00000000,0xd5900000 - .long 0x00000000,0x8af40000 - .long 0x00000000,0x40580000 - .long 0x00000000,0xf5bc0000 - .long 0x00000000,0xab200000 - .long 0x00000000,0x60840000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x15e80000 - .long 0x00000000,0x2bd00000 - .long 0x00000000,0x41b80000 - .long 0x00000000,0x57a00000 - .long 0x00000000,0x6d880000 - .long 0x00000000,0x83700000 - .long 0x00000000,0x99580000 - .long 0x00000000,0xaf400000 - .long 0x00000000,0xc5280000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xdb100000 - .long 0x00000000,0xb6200000 - .long 0x00000000,0x91300000 - .long 0x00000000,0x6c400000 - .long 0x00000000,0x47500000 - .long 0x00000000,0x22600000 - .long 0x00000000,0xfd700000 - .long 0x00000000,0xd8800000 - .long 0x00000000,0xb3900000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x8ea00000 - .long 0x00000000,0x1d400000 - .long 0x00000000,0xabe00000 - .long 0x00000000,0x3a800000 - .long 0x00000000,0xc9200000 - .long 0x00000000,0x57c00000 - .long 0x00000000,0xe6600000 - .long 0x00000000,0x75000000 - .long 0x00000000,0x03a00000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x92400000 - .long 0x00000000,0x24800000 - .long 0x00000000,0xb6c00000 - .long 0x00000000,0x49000000 - .long 0x00000000,0xdb400000 - .long 0x00000000,0x6d800000 - .long 0x00000000,0xffc00000 - .long 0x00000000,0x92000000 - .long 0x00000000,0x24400000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xb6800000 - .long 0x00000000,0x6d000000 - .long 0x00000000,0x23800000 - .long 0x00000000,0xda000000 - .long 0x00000000,0x90800000 - .long 0x00000000,0x47000000 - .long 0x00000000,0xfd800000 - .long 0x00000000,0xb4000000 - .long 0x00000000,0x6a800000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x21000000 - .long 0x00000000,0x42000000 - .long 0x00000000,0x63000000 - .long 0x00000000,0x84000000 - .long 0x00000000,0xa5000000 - .long 0x00000000,0xc6000000 - .long 0x00000000,0xe7000000 - .long 0x00000000,0x08000000 - .long 0x00000000,0x29000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x4a000000 - .long 0x00000000,0x94000000 - .long 0x00000000,0xde000000 - .long 0x00000000,0x28000000 - .long 0x00000000,0x72000000 - .long 0x00000000,0xbc000000 - .long 0x00000000,0x06000000 - .long 0x00000000,0x50000000 - .long 0x00000000,0x9a000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xe4000000 - .long 0x00000000,0xc8000000 - .long 0x00000000,0xac000000 - .long 0x00000000,0x90000000 - .long 0x00000000,0x74000000 - .long 0x00000000,0x58000000 - .long 0x00000000,0x3c000000 - .long 0x00000000,0x20000000 - .long 0x00000000,0x04000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xe8000000 - .long 0x00000000,0xd0000000 - .long 0x00000000,0xb8000000 - .long 0x00000000,0xa0000000 - .long 0x00000000,0x88000000 - .long 0x00000000,0x70000000 - .long 0x00000000,0x58000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x28000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x10000000 - .long 0x00000000,0x20000000 - .long 0x00000000,0x30000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x50000000 - .long 0x00000000,0x60000000 - .long 0x00000000,0x70000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x90000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xa0000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0xe0000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x20000000 - .long 0x00000000,0xc0000000 - .long 0x00000000,0x60000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xa0000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0xc0000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0xc0000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .type _C_MUL_10_POW_I,@object - .size _C_MUL_10_POW_I,5120 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_tancot_huge.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_tancot_huge.S deleted file mode 100644 index f1b018ed73..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/libm_tancot_huge.S +++ /dev/null @@ -1,800 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_tancot_huge.c" - .text -..TXTST0: -# -- Begin __libm_tancot_huge - .text - .align 16,0x90 - .hidden __libm_tancot_huge - .globl __libm_tancot_huge -__libm_tancot_huge: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -# parameter 3: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - movl 16(%ebp), %eax - movl 20(%ebp), %edx - movl %eax, 28(%esp) - movl %edx, 32(%esp) - movl %gs:20, %ecx - xorl %esp, %ecx - movl %ecx, 64(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - movl 12(%ebp), %edx - movl %edx, %eax - andl $2147483647, %eax - shrl $31, %edx - movl %edx, 44(%esp) - cmpl $1104150528, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jae ..B1.14 -..B1.4: - fldl 8(%ebp) - fabs - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - fstpt 16(%esp) - fldt 16(%esp) - cmpl $768, %edx - fstl 8(%ebp) - fldl _Pi4Inv@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpl (%esp) - je ..B1.46 -..B1.5: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.6: - fldcw 12(%esp) -..B1.7: - fldl 8(%ebp) - movl $1, %esi - fstpt 16(%esp) -..B1.8: - movl (%esp), %edx - movl 4(%esp), %ecx - movl %ecx, %edi - movl %edx, 8(%esp) - movl %ecx, %edx - andl $1048575, %edx - shrl $20, %edi - orl $1048576, %edx - cmpl $1094713344, %ecx - jae ..B1.10 -..B1.9: - movl %edi, %ecx - negl %ecx - addl $19, %ecx - shrl %cl, %edx - jmp ..B1.11 -..B1.10: - lea 13(%edi), %ecx - negl %edi - addl $19, %edi - shll %cl, %edx - movl %edi, %ecx - movl 8(%esp), %edi - shrl %cl, %edi - orl %edi, %edx -..B1.11: - lea 1(%edx), %ecx - andl $-2, %ecx - movl %ecx, (%esp) - cmpl $1094713344, %eax - fildl (%esp) - jae ..B1.13 -..B1.12: - fldl _Pi4x3@GOTOFF(%ebx) - fmul %st(1), %st - fldl 8+_Pi4x3@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(2) - fmull 16+_Pi4x3@GOTOFF(%ebx) - fldt 16(%esp) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B1.20 -..B1.13: - fldl _Pi4x4@GOTOFF(%ebx) - fmul %st(1), %st - fldl 8+_Pi4x4@GOTOFF(%ebx) - fmul %st(2), %st - fldl 16+_Pi4x4@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(3) - fmull 24+_Pi4x4@GOTOFF(%ebx) - fldt 16(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B1.20 -..B1.14: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.51 -..B1.15: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.16: - fldcw 12(%esp) -..B1.17: - movl $1, %esi -..B1.18: - fldl 8(%ebp) - addl $-32, %esp - fabs - lea 80(%esp), %eax - fstpt (%esp) - movl $0, 12(%esp) - movl %eax, 16(%esp) - call __libm_reduce_pi04l -..B1.54: - movl %eax, %edx - addl $32, %esp -..B1.19: - fldl 48(%esp) - faddl 56(%esp) - fstpt 16(%esp) -..B1.20: - movl 32(%esp), %eax - andl $3, %eax - cmpl $3, %eax - jne ..B1.28 -..B1.21: - fldl _ones@GOTOFF(%ebx) - incl %edx - fldt 16(%esp) - testb $2, %dl - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fdivr %st, %st(3) - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fldt 36+_TP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_TP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_TP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt _TP@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 36+_TQ@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_TQ@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_TQ@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _TQ@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt 32(%esp) - fldt 132+_GP@GOTOFF(%ebx) - fmul %st(4), %st - fldt 120+_GP@GOTOFF(%ebx) - fmul %st(5), %st - fldt 108+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 96+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 84+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 72+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 60+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 48+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 36+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 24+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fldt 12+_GP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt _GP@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%esp) - je ..B1.23 -..B1.22: - fldt (%esp) - fxch %st(1) - fdivrp %st, %st(3) - fmulp %st, %st(2) - fldt 16(%esp) - movl 44(%esp), %eax - xorl $1, %eax - fmul %st, %st(2) - fldl _ones@GOTOFF(%ebx,%eax,8) - fmul %st, %st(2) - fmul %st, %st(4) - fmul %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - faddp %st, %st(1) - fstpt 32(%esp) - jmp ..B1.24 -..B1.23: - fdivrp %st, %st(2) - fldt (%esp) - fmulp %st, %st(2) - fldt 16(%esp) - fmul %st, %st(2) - movl 44(%esp), %eax - fldl _ones@GOTOFF(%ebx,%eax,8) - fmul %st, %st(3) - fmul %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - fstpt 32(%esp) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) -..B1.24: - testl %esi, %esi - je ..B1.26 -..B1.25: - fldcw 14(%esp) -..B1.26: - fldt 32(%esp) - fldt (%esp) - movl 28(%esp), %eax - fstpl 8(%eax) - fstpl (%eax) - movl 64(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.47 -..B1.27: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.28: - testb $2, 32(%esp) - je ..B1.36 -..B1.29: - fldt 16(%esp) - incl %edx - testb $2, %dl - fmul %st(0), %st - je ..B1.31 -..B1.30: - fldl _ones@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fldt 16(%esp) - fdivr %st, %st(2) - fldt 132+_GP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 120+_GP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 108+_GP@GOTOFF(%ebx) - movl 44(%esp), %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - xorl $1, %eax - fldt 96+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 72+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 36+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 24+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt 12+_GP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(4) - fldt _GP@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fldl _ones@GOTOFF(%ebx,%eax,8) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B1.32 -..B1.31: - fldt 36+_TP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_TP@GOTOFF(%ebx) - movl 44(%esp), %eax - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_TQ@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_TQ@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12+_TQ@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _TQ@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 12+_TP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt _TP@GOTOFF(%ebx) - faddp %st, %st(1) - fdivp %st, %st(1) - fmulp %st, %st(1) - fldl _ones@GOTOFF(%ebx,%eax,8) - fldt 16(%esp) - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) -..B1.32: - testl %esi, %esi - je ..B1.34 -..B1.33: - fldcw 14(%esp) -..B1.34: - fldt 16(%esp) - movl 28(%esp), %eax - fstpl (%eax) - movl 64(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.47 -..B1.35: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.36: - testb $1, 32(%esp) - je ..B1.44 -..B1.37: - fldt 16(%esp) - incl %edx - testb $2, %dl - fmul %st(0), %st - fstpt (%esp) - je ..B1.39 -..B1.38: - fldt 36+_TP@GOTOFF(%ebx) - fldt 24+_TP@GOTOFF(%ebx) - fldt 12+_TP@GOTOFF(%ebx) - fldt _TP@GOTOFF(%ebx) - fldt 36+_TQ@GOTOFF(%ebx) - fldt 24+_TQ@GOTOFF(%ebx) - fldt 12+_TQ@GOTOFF(%ebx) - fldt (%esp) - fmul %st, %st(7) - movl 44(%esp), %eax - fxch %st(6) - faddp %st, %st(7) - fxch %st(5) - fmul %st, %st(6) - xorl $1, %eax - fxch %st(4) - faddp %st, %st(6) - fxch %st(3) - fmul %st, %st(5) - fxch %st(2) - faddp %st, %st(5) - fmul %st(1), %st - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmul %st(1), %st - fldt _TQ@GOTOFF(%ebx) - faddp %st, %st(1) - fdivrp %st, %st(2) - fmulp %st, %st(1) - fldl _ones@GOTOFF(%ebx,%eax,8) - fldt 16(%esp) - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.40 -..B1.39: - fldl _ones@GOTOFF(%ebx) - fldt 16(%esp) - fdivr %st, %st(1) - fldt (%esp) - fld %st(0) - fmul %st(1), %st - fldt 132+_GP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 120+_GP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 108+_GP@GOTOFF(%ebx) - movl 44(%esp), %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_GP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 12+_GP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt _GP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldl _ones@GOTOFF(%ebx,%eax,8) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) -..B1.40: - testl %esi, %esi - je ..B1.42 -..B1.41: - fldcw 14(%esp) -..B1.42: - fldt (%esp) - movl 28(%esp), %eax - fstpl 8(%eax) - movl 64(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.47 -..B1.43: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.44: - movl 64(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.47 -..B1.45: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - xorl %esi, %esi - jmp ..B1.8 -..B1.47: - call __stack_chk_fail@PLT -..B1.51: - xorl %esi, %esi - jmp ..B1.18 - .align 16,0x90 - .type __libm_tancot_huge,@function - .size __libm_tancot_huge,.-__libm_tancot_huge - .data -# -- End __libm_tancot_huge - .section .rodata, "a" - .align 16 - .align 16 -_Pi4Inv: - .long 1841940611 - .long 1072979760 - .type _Pi4Inv,@object - .size _Pi4Inv,8 - .space 8, 0x00 # pad - .align 16 -_Pi4x3: - .long 1413754880 - .long 3219726843 - .long 993632256 - .long 1027030475 - .long 3773204808 - .long 3129236486 - .type _Pi4x3,@object - .size _Pi4x3,24 - .space 8, 0x00 # pad - .align 16 -_Pi4x4: - .long 1413480448 - .long 3219726843 - .long 442499072 - .long 3183522913 - .long 771751936 - .long 3146979722 - .long 622873025 - .long 3110831002 - .type _Pi4x4,@object - .size _Pi4x4,32 - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_TP: - .word 19670 - .word 44908 - .word 50960 - .word 50786 - .word 49149 - .word 0 - .word 19206 - .word 45228 - .word 54194 - .word 52268 - .word 16377 - .word 0 - .word 227 - .word 51280 - .word 43560 - .word 38195 - .word 49139 - .word 0 - .word 12272 - .word 18029 - .word 6715 - .word 45670 - .word 16357 - .word 0 - .type _TP,@object - .size _TP,48 - .align 16 -_TQ: - .word 14748 - .word 33681 - .word 5452 - .word 38090 - .word 49151 - .word 0 - .word 46755 - .word 50026 - .word 17634 - .word 35372 - .word 16382 - .word 0 - .word 46863 - .word 53352 - .word 42702 - .word 59869 - .word 49145 - .word 0 - .word 33295 - .word 20942 - .word 32118 - .word 39935 - .word 16371 - .word 0 - .type _TQ,@object - .size _TQ,48 - .align 16 -_GP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 46639 - .word 2912 - .word 24758 - .word 46603 - .word 49145 - .word 0 - .word 57255 - .word 2218 - .word 21984 - .word 35507 - .word 49142 - .word 0 - .word 34208 - .word 43033 - .word 48281 - .word 56811 - .word 49138 - .word 0 - .word 28773 - .word 27191 - .word 31071 - .word 45908 - .word 49135 - .word 0 - .word 43257 - .word 33777 - .word 11976 - .word 37184 - .word 49132 - .word 0 - .word 62410 - .word 35990 - .word 36363 - .word 60269 - .word 49128 - .word 0 - .word 13659 - .word 55568 - .word 26569 - .word 48851 - .word 49125 - .word 0 - .word 10347 - .word 46238 - .word 47188 - .word 39576 - .word 49122 - .word 0 - .word 2161 - .word 6703 - .word 25719 - .word 64708 - .word 49118 - .word 0 - .word 42329 - .word 7593 - .word 44754 - .word 47734 - .word 49115 - .word 0 - .word 163 - .word 32746 - .word 39875 - .word 61957 - .word 49112 - .word 0 - .type _GP,@object - .size _GP,144 - .data - .hidden __libm_reduce_pi04l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrint.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrint.S deleted file mode 100644 index 07c6aac047..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrint.S +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llrint.c" - .text -..TXTST0: -# -- Begin llrint - .text - .align 16,0x90 - .globl llrint -llrint: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp - movl 12(%ebp), %ebx - movl %ebx, %edi - andl $2147483647, %edi - cmpl $1137704960, %edi - jae ..B1.4 -..B1.2: - fldl 8(%ebp) - fistpll 16(%esp) -..B1.3: - movl 16(%esp), %eax - movl 20(%esp), %edx - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.4: - cmpl $1139802112, %edi - jae ..B1.7 -..B1.5: - movl %edi, %edx - andl $1048575, %edi - shrl $20, %edx - orl $1048576, %edi - movl 8(%ebp), %esi - xorl %eax, %eax - shrl $31, %ebx - movl %ebx, (%esp) - addl $-1, %ebx - lea 13(%edx), %ecx - movl %ecx, 4(%esp) - adcl $2147483647, %eax - negl %edx - addl $19, %edx - shll %cl, %edi - movl %edx, %ecx - movl %esi, %edx - shrl %cl, %edx - movl 4(%esp), %ecx - orl %edx, %edi - shll %cl, %esi - movl %edi, %ecx - movl %esi, %edx - subl %ebx, %edx - movl (%esp), %ebx - sbbl %eax, %ecx - jb ..B1.6 -..B1.10: - orl %ecx, %edx - jne ..B1.7 -..B1.6: - xorl %eax, %eax - xorl %edx, %edx - subl %esi, %eax - sbbl %edi, %edx - testl %ebx, %ebx - jne ..L2 - movl %esi, %eax -..L2: - jne ..L3 - movl %edi, %edx -..L3: - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.7: - call ..L4 -..L4: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%eax), %eax - movl $-2147483648, %edx - movl $0, 16(%esp) - movl $-2147483648, 20(%esp) - fldl _infs@GOTOFF(%eax) - fmull _zeros@GOTOFF(%eax) - xorl %eax, %eax - fstpl 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type llrint,@function - .size llrint,.-llrint - .data -# -- End llrint - .section .rodata, "a" - .align 4 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrintf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrintf.S deleted file mode 100644 index f3e668b7e8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrintf.S +++ /dev/null @@ -1,143 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llrintf.c" - .text -..TXTST0: -# -- Begin llrintf - .text - .align 16,0x90 - .globl llrintf -llrintf: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - pushl %ebx - pushl %ebp - subl $20, %esp - movl 32(%esp), %ebp - movl %ebp, %ebx - andl $2147483647, %ebx - cmpl $1585446912, %ebx - jae ..B1.4 -..B1.2: - flds 32(%esp) - fistpll 8(%esp) -..B1.3: - movl 8(%esp), %eax - movl 12(%esp), %edx - addl $20, %esp - popl %ebp - popl %ebx - ret -..B1.4: - cmpl $1602224128, %ebx - jae ..B1.7 -..B1.5: - shrl $31, %ebp - movl %ebx, %ecx - shrl $23, %ecx - andl $8388607, %ebx - movl %ebp, %eax - orl $8388608, %ebx - xorl %edx, %edx - addl $-1, %eax - adcl $2147483647, %edx - addl $10, %ecx - shll %cl, %ebx - xorl %ecx, %ecx - subl %eax, %ecx - movl %ebx, %eax - sbbl %edx, %eax - jb ..B1.6 -..B1.10: - orl %eax, %ecx - jne ..B1.7 -..B1.6: - movl %ebx, %edx - xorl %eax, %eax - negl %edx - testl %ebp, %ebp - jne ..L2 - movl %ebx, %edx -..L2: - addl $20, %esp - popl %ebp - popl %ebx - ret -..B1.7: - call ..L3 -..L3: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L3](%eax), %eax - movl $-2147483648, %edx - movl $0, 8(%esp) - movl $-2147483648, 12(%esp) - fldl _infs@GOTOFF(%eax) - fmull _zeros@GOTOFF(%eax) - xorl %eax, %eax - fstpl (%esp) - addl $20, %esp - popl %ebp - popl %ebx - ret - .align 16,0x90 - .type llrintf,@function - .size llrintf,.-llrintf - .data -# -- End llrintf - .section .rodata, "a" - .align 4 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrintl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrintl.S deleted file mode 100644 index c61248bbf7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llrintl.S +++ /dev/null @@ -1,339 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llrintl.c" - .text -..TXTST0: -# -- Begin llrintl - .text - .align 16,0x90 - .globl llrintl -llrintl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp - movzbl 17(%ebp), %eax - movzwl 16(%ebp), %edx - andl $128, %eax - andl $32767, %edx - shrl $7, %eax - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $16445, %edx - jge ..B1.8 -..B1.2: - testl %edx, %edx - jne ..B1.6 -..B1.3: - cmpl $0, 12(%ebp) - jne ..B1.5 -..B1.4: - cmpl $0, 8(%ebp) - je ..B1.6 -..B1.5: - fldl _smallest_value_64@GOTOFF(%ecx) - fstpl 24(%esp) -..B1.6: - fldt 8(%ebp) - fistpll 40(%esp) -..B1.7: - movl 40(%esp), %eax - movl 44(%esp), %edx - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.8: - cmpl $16447, %edx - jge ..B1.35 -..B1.9: - movl %eax, %ebx - xorl %esi, %esi - addl $-1, %ebx - movl %ebx, 36(%esp) - adcl $2147483647, %esi - movl %esi, 32(%esp) - cmpl $16446, %edx - jge ..B1.21 -..B1.10: - fnstcw 20(%esp) -..B1.11: - movl 8(%ebp), %ebx - movzwl 20(%esp), %esi - movl %ebx, 12(%esp) - andl $1, %ebx - movl %ebx, 8(%esp) - andl $3072, %esi - jne ..B1.13 -..B1.12: - movl 12(%esp), %esi - movl %eax, (%esp) - movl %esi, %eax - movl 12(%ebp), %edi - movl %edi, %ebx - shll $31, %edi - andl $3, %esi - shrl $1, %eax - orl %eax, %edi - cmpl $3, %esi - movl $0, %eax - sete %al - shrl $1, %ebx - addl %eax, %edi - movl (%esp), %eax - adcl $0, %ebx - jmp ..B1.22 -..B1.13: - cmpl $2048, %esi - jne ..B1.15 -..B1.14: - xorl %ebx, %ebx - testl %eax, %eax - setne %bl - movl %ebx, (%esp) - jmp ..B1.16 -..B1.15: - movl $0, (%esp) - cmpl $1024, %esi - je ..B1.17 -..B1.16: - movl $0, 4(%esp) - jmp ..B1.18 -..B1.17: - xorl %ebx, %ebx - testl %eax, %eax - sete %bl - movl %ebx, 4(%esp) -..B1.18: - cmpl $3072, %esi - movl $0, %ebx - sete %bl - orl (%esp), %ebx - movl 12(%ebp), %edi - orl 4(%esp), %ebx - je ..B1.20 -..B1.19: - movl 12(%esp), %esi - movl %edi, %ebx - shll $31, %edi - shrl $1, %esi - shrl $1, %ebx - orl %esi, %edi - jmp ..B1.22 -..B1.20: - movl 12(%esp), %esi - movl %edi, %ebx - movl %eax, (%esp) - movl %esi, %eax - shll $31, %edi - andl $1, %esi - shrl $1, %eax - orl %eax, %edi - shrl $1, %ebx - addl %esi, %edi - movl (%esp), %eax - adcl $0, %ebx - jmp ..B1.22 -..B1.21: - movl 12(%ebp), %ebx - movl 8(%ebp), %edi - movl $0, 8(%esp) -..B1.22: - testl %eax, %eax - je ..B1.24 -..B1.23: - xorl %eax, %eax - xorl %esi, %esi - subl %edi, %eax - movl %eax, (%esp) - sbbl %ebx, %esi - movl %esi, 12(%esp) - movl %esi, 4(%esp) - jmp ..B1.25 -..B1.24: - movl %ebx, 12(%esp) - movl %edi, %eax - movl %edi, (%esp) - movl %ebx, 4(%esp) -..B1.25: - movl %eax, %esi - subl %edi, %esi - movl 12(%esp), %esi - sbbl %ebx, %esi - jb ..B1.27 -..B1.26: - movl $1, %esi - jmp ..B1.28 -..B1.27: - xorl %esi, %esi -..B1.28: - subl 36(%esp), %edi - sbbl 32(%esp), %ebx - jb ..B1.29 -..B1.46: - orl %ebx, %edi - jne ..B1.30 -..B1.29: - movl $1, %ebx - jmp ..B1.31 -..B1.30: - xorl %ebx, %ebx -..B1.31: - testl %ebx, %esi - je ..B1.35 -..B1.32: - cmpl $0, 8(%esp) - je ..B1.34 -..B1.33: - fldl _ones@GOTOFF(%ecx) - movl (%esp), %eax - movl 4(%esp), %edx - movl %eax, 40(%esp) - movl %edx, 44(%esp) - movl %edx, 12(%esp) - faddl _small_value_64@GOTOFF(%ecx) - fstpl 24(%esp) -..B1.34: - movl 12(%esp), %edx - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.35: - fldl _infs@GOTOFF(%ecx) - cmpl $32767, %edx - fmull _zeros@GOTOFF(%ecx) - fstpl 24(%esp) - movl $0, 40(%esp) - movl $-2147483648, 44(%esp) - jne ..B1.38 -..B1.36: - cmpl $-2147483648, 12(%ebp) - jne ..B1.43 -..B1.37: - cmpl $0, 8(%ebp) - jne ..B1.43 -..B1.38: - fnstcw 18(%esp) -..B1.39: - movzwl 18(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.43 -..B1.40: - orl $-64768, %edx - movw %dx, 16(%esp) -..B1.41: - fldcw 16(%esp) -..B1.42: - fldcw 18(%esp) -..B1.43: - movl 40(%esp), %eax - movl 44(%esp), %edx - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type llrintl,@function - .size llrintl,.-llrintl - .data -# -- End llrintl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llround_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llround_wmt.S deleted file mode 100644 index a4f36ea8bf..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llround_wmt.S +++ /dev/null @@ -1,239 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llround_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin llround - .text - .align 16,0x90 - .globl llround -llround: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movsd %xmm0, 16(%esp) - pextrw $3, %xmm0, %eax - movl $32767, %edx - andl %eax, %edx - cmpl $17200, %edx - jge .L_2TAG_PACKET_0.0.3 - cmpl $16368, %edx - jl .L_2TAG_PACKET_1.0.3 - movapd %xmm0, %xmm5 - movapd 112(%ebx), %xmm4 - pxor %xmm6, %xmm6 - pand %xmm0, %xmm4 - movapd %xmm0, %xmm1 - psrlq $52, %xmm0 - cmpltsd %xmm6, %xmm5 - pand 64(%ebx), %xmm0 - movss 80(%ebx), %xmm2 - movss 96(%ebx), %xmm3 - pcmpeqd %xmm6, %xmm6 - psubd %xmm0, %xmm2 - psubd %xmm0, %xmm3 - psrlq %xmm3, %xmm1 - por 128(%ebx), %xmm4 - pand 144(%ebx), %xmm1 - psrlq %xmm2, %xmm4 - pxor %xmm5, %xmm6 - paddq %xmm1, %xmm4 - pand %xmm4, %xmm5 - pand %xmm4, %xmm6 - psubq %xmm5, %xmm6 - movd %xmm6, %eax - psrlq $32, %xmm6 - movd %xmm6, %edx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - comisd 16(%ebx), %xmm0 - jc .L_2TAG_PACKET_3.0.3 - comisd (%ebx), %xmm0 - jnc .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_4.0.3: - fldl 16(%esp) - subl $8, %esp - fistpll (%esp) - popl %eax - popl %edx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - subl $16352, %edx - xorl $32768, %eax - movl $1, %ecx - shrl $31, %edx - shrl $15, %eax - xorl %edx, %ecx - orl %eax, %edx - andl %ecx, %eax - shll $31, %ecx - addl %edx, %eax - movl 20(%esp), %edx - subl $1, %eax - andl %ecx, %edx - sarl $31, %edx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - jp .L_2TAG_PACKET_5.0.3 - pcmpeqd %xmm1, %xmm1 - pslld $23, %xmm1 - subss %xmm1, %xmm1 - movl $0, (%esp) - movl $-2147483648, 4(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $194, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - movl (%esp), %eax - movl 4(%esp), %edx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_5.0.3: - movl $-2147483648, %edx - movl $0, %eax -.L_2TAG_PACKET_2.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type llround,@function - .size llround,.-llround - .data -# -- End llround - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1138753536 - .long 0 - .long 1138753536 - .long 0 - .long 3286237184 - .long 0 - .long 3286237184 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 2047 - .long 0 - .long 2047 - .long 0 - .long 1075 - .long 1075 - .long 1075 - .long 1075 - .long 1074 - .long 1074 - .long 1074 - .long 1074 - .long 4294967295 - .long 1048575 - .long 0 - .long 0 - .long 0 - .long 1048576 - .long 0 - .long 0 - .long 1 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,160 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llroundf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llroundf_wmt.S deleted file mode 100644 index a32aa8225e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llroundf_wmt.S +++ /dev/null @@ -1,195 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llroundf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin llroundf - .text - .align 16,0x90 - .globl llroundf -llroundf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movss 128(%esp), %xmm0 - movss %xmm0, 16(%esp) - movl 16(%esp), %eax - movl $2147483647, %edx - andl %eax, %edx - cmpl $1258291200, %edx - jge .L_2TAG_PACKET_0.0.3 - cmpl $1065353216, %edx - jl .L_2TAG_PACKET_1.0.3 - shrl $23, %edx - movl $149, %ecx - subl %edx, %ecx - movl $8388607, %edx - andl %eax, %edx - shrl %cl, %eax - orl $8388608, %edx - andl $1, %eax - shrl %cl, %edx - movl $-2147483648, %ecx - shrl $1, %edx - xorl 16(%esp), %ecx - addl %edx, %eax - movl 16(%esp), %edx - sarl $31, %ecx - sarl $31, %edx - andl %eax, %edx - andl %ecx, %eax - subl %edx, %eax - movl 16(%esp), %edx - sarl $31, %edx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - cmpl $-553648128, %eax - ja .L_2TAG_PACKET_3.0.3 - cmpl $1593835520, %eax - jge .L_2TAG_PACKET_3.0.3 - flds 16(%esp) - subl $8, %esp - fistpll (%esp) - popl %eax - popl %edx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - ucomiss %xmm0, %xmm0 - subl $1056964608, %edx - xorl $-2147483648, %eax - movl $1, %ecx - shrl $31, %edx - shrl $31, %eax - xorl %edx, %ecx - orl %eax, %edx - andl %ecx, %eax - addl %edx, %eax - movl $-1, %edx - addl %eax, %edx - subl $1, %eax - sarl $31, %edx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - comiss %xmm0, %xmm0 - jp .L_2TAG_PACKET_4.0.3 - pcmpeqd %xmm1, %xmm1 - pslld $23, %xmm1 - subss %xmm1, %xmm1 - movl $-2147483648, (%esp) - movl $0, 4(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $194, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - movl (%esp), %eax - movl 4(%esp), %edx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - movl $-2147483648, %eax -.L_2TAG_PACKET_2.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type llroundf,@function - .size llroundf,.-llroundf - .data -# -- End llroundf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .type static_const_table,@object - .size static_const_table,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llroundl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llroundl.S deleted file mode 100644 index a414b2823b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/llroundl.S +++ /dev/null @@ -1,383 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llroundl.c" - .text -..TXTST0: -# -- Begin llroundl - .text - .align 16,0x90 - .globl llroundl -llroundl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp - movzbl 17(%ebp), %ebx - movzwl 16(%ebp), %eax - andl $128, %ebx - andl $32767, %eax - shrl $7, %ebx - call ..L2 -..L2: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi - cmpl $16445, %eax - jge ..B1.17 -..B1.2: - cmpl $16415, %eax - jge ..B1.16 -..B1.3: - cmpl $16414, %eax - jge ..B1.15 -..B1.4: - cmpl $16413, %eax - jge ..B1.14 -..B1.5: - cmpl $16383, %eax - jge ..B1.13 -..B1.6: - cmpl $16382, %eax - jge ..B1.12 -..B1.7: - testl %eax, %eax - jne ..B1.11 -..B1.8: - cmpl $0, 12(%ebp) - jne ..B1.10 -..B1.9: - cmpl $0, 8(%ebp) - je ..B1.11 -..B1.10: - fldl _smallest_value_64@GOTOFF(%edi) - fstpl 8(%esp) -..B1.11: - xorl %eax, %eax - xorl %edx, %edx - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.12: - movl iones@GOTOFF(%edi,%ebx,4), %eax - cltd - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - negl %eax - movl 12(%ebp), %esi - movl %esi, %edi - lea 30(%eax), %ecx - addl $29, %eax - shrl %cl, %edi - movl %eax, %ecx - shrl %cl, %esi - andl $1, %esi - addl %esi, %edi - movl %edi, %eax - negl %eax - testl %ebx, %ebx - jne ..L3 - movl %edi, %eax -..L3: - cltd - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - negl %eax - addl $30, %eax - movl 12(%ebp), %edx - movl %edx, %esi - movl %eax, %ecx - andl $1, %esi - shrl %cl, %edx - xorl %eax, %eax - addl %edx, %esi - xorl %edx, %edx - subl %esi, %eax - sbbl $0, %edx - testl %ebx, %ebx - jne ..L4 - movl %esi, %eax -..L4: - jne ..L5 - movl $0, %edx -..L5: - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - movl 8(%ebp), %ecx - xorl %esi, %esi - shrl $31, %ecx - xorl %eax, %eax - addl 12(%ebp), %ecx - adcl $0, %esi - xorl %edx, %edx - subl %ecx, %eax - sbbl %esi, %edx - testl %ebx, %ebx - jne ..L6 - movl %ecx, %eax -..L6: - jne ..L7 - movl %esi, %edx -..L7: - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - movl %eax, %esi - addl $2, %eax - negl %esi - movl 12(%ebp), %edi - movl %esi, (%esp) - lea 30(%esi), %edx - movl %edi, %esi - movl %edx, %ecx - shrl %cl, %esi - movl %eax, %ecx - shll %cl, %edi - movl %edx, %ecx - movl 8(%ebp), %edx - movl %edx, %eax - shrl %cl, %eax - movl (%esp), %ecx - orl %eax, %edi - addl $29, %ecx - xorl %eax, %eax - shrl %cl, %edx - andl $1, %edx - addl %edx, %edi - adcl $0, %esi - xorl %edx, %edx - subl %edi, %eax - sbbl %esi, %edx - testl %ebx, %ebx - jne ..L8 - movl %edi, %eax -..L8: - jne ..L9 - movl %esi, %edx -..L9: - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - cmpl $16447, %eax - jge ..B1.29 -..B1.18: - movl %ebx, %edx - xorl %esi, %esi - addl $-1, %edx - movl %edx, 20(%esp) - adcl $2147483647, %esi - movl %esi, 16(%esp) - cmpl $16446, %eax - movl 12(%ebp), %edx - movl 8(%ebp), %esi - jge ..B1.21 -..B1.19: - movl %ebx, (%esp) - movl %esi, %ebx - shrl $1, %ebx - movl %edx, %ecx - shll $31, %edx - andl $1, %esi - orl %ebx, %edx - shrl $1, %ecx - addl %edx, %esi - movl %ecx, %edx - movl (%esp), %ebx - adcl $0, %edx -..B1.21: - xorl %ecx, %ecx - subl %esi, %ecx - movl %eax, 28(%esp) - movl $0, %eax - sbbl %edx, %eax - testl %ebx, %ebx - jne ..L10 - movl %esi, %ecx -..L10: - jne ..L11 - movl %edx, %eax -..L11: - movl %ecx, 24(%esp) - subl %esi, %ecx - movl %eax, (%esp) - sbbl %edx, %eax - movl 28(%esp), %eax - jb ..B1.23 -..B1.22: - movl $1, %ebx - jmp ..B1.24 -..B1.23: - xorl %ebx, %ebx -..B1.24: - subl 20(%esp), %esi - sbbl 16(%esp), %edx - jb ..B1.25 -..B1.40: - orl %edx, %esi - jne ..B1.26 -..B1.25: - movl $1, %edx - jmp ..B1.27 -..B1.26: - xorl %edx, %edx -..B1.27: - testl %edx, %ebx - je ..B1.29 -..B1.28: - movl 24(%esp), %eax - movl (%esp), %edx - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.29: - fldl _infs@GOTOFF(%edi) - cmpl $32767, %eax - fmull _zeros@GOTOFF(%edi) - fstpl 8(%esp) - jne ..B1.32 -..B1.30: - cmpl $-2147483648, 12(%ebp) - jne ..B1.37 -..B1.31: - cmpl $0, 8(%ebp) - jne ..B1.37 -..B1.32: - fnstcw 6(%esp) -..B1.33: - movzwl 6(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.37 -..B1.34: - orl $-64768, %edx - movw %dx, 4(%esp) -..B1.35: - fldcw 4(%esp) -..B1.36: - fldcw 6(%esp) -..B1.37: - xorl %eax, %eax - movl $-2147483648, %edx - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type llroundl,@function - .size llroundl,.-llroundl - .data -# -- End llroundl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10_wmt.S deleted file mode 100644 index 741ba00edf..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10_wmt.S +++ /dev/null @@ -1,815 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log10_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin log10 - .text - .align 16,0x90 - .globl log10 -log10: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movl $1054736384, %ecx - movd %ecx, %xmm7 - xorpd %xmm3, %xmm3 - movl $30704, %edx - pinsrw $3, %edx, %xmm3 - movsd 112(%esp), %xmm0 - movapd %xmm0, %xmm1 - movl $32768, %edx - movd %edx, %xmm4 - movapd 2128(%ebx), %xmm5 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $16352, %ecx - psllq $5, %xmm0 - movsd 2144(%ebx), %xmm2 - psrlq $34, %xmm0 - rcpss %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $78, %xmm5, %xmm6 - psrlq $12, %xmm1 - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - mulss %xmm7, %xmm0 - orpd %xmm3, %xmm1 - andpd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - subsd %xmm5, %xmm1 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm6, %xmm0 - andl $32752, %eax - subl %ecx, %eax - cvtsi2sdl %eax, %xmm7 - mulpd %xmm0, %xmm5 - mulsd %xmm0, %xmm1 - movsd 2064(%ebx), %xmm6 - movapd 2080(%ebx), %xmm3 - subsd %xmm2, %xmm5 - andl $16711680, %edx - shrl $12, %edx - movapd -1504(%ebx,%edx), %xmm0 - movapd 2096(%ebx), %xmm4 - addsd %xmm5, %xmm1 - movapd 2112(%ebx), %xmm2 - mulsd %xmm7, %xmm6 - pshufd $68, %xmm1, %xmm5 - mulsd 2072(%ebx), %xmm7 - mulsd %xmm1, %xmm3 - addsd %xmm6, %xmm0 - mulpd %xmm5, %xmm4 - movsd 2152(%ebx), %xmm6 - mulpd %xmm5, %xmm5 - addpd %xmm2, %xmm4 - mulpd %xmm5, %xmm3 - pshufd $228, %xmm0, %xmm2 - addsd %xmm1, %xmm0 - mulsd %xmm1, %xmm4 - subsd %xmm0, %xmm2 - mulsd %xmm1, %xmm6 - addsd %xmm2, %xmm1 - pshufd $238, %xmm0, %xmm2 - mulsd %xmm5, %xmm5 - addsd %xmm2, %xmm7 - addsd %xmm6, %xmm1 - addpd %xmm3, %xmm4 - addsd %xmm7, %xmm1 - mulpd %xmm5, %xmm4 - addsd %xmm4, %xmm1 - pshufd $238, %xmm4, %xmm5 - addsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - movsd 112(%esp), %xmm0 - movapd %xmm0, %xmm1 - addl $16, %eax - cmpl $32768, %eax - jae .L_2TAG_PACKET_3.0.3 - cmpl $16, %eax - jb .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_5.0.3: - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - ja .L_2TAG_PACKET_5.0.3 - cmpl $0, %edx - ja .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_3.0.3: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - addl %ecx, %ecx - cmpl $-2097152, %ecx - jae .L_2TAG_PACKET_6.0.3 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_7.0.3: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %eax - pinsrw $3, %eax, %xmm1 - movl $9, %edx - mulsd %xmm1, %xmm0 -.L_2TAG_PACKET_9.0.3: - movsd %xmm0, (%esp) - movsd 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_10.0.3 -.L_2TAG_PACKET_8.0.3: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $49136, %eax - pinsrw $3, %eax, %xmm0 - divsd %xmm1, %xmm0 - movl $8, %edx - jmp .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_4.0.3: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_8.0.3 - xorpd %xmm1, %xmm1 - movl $18416, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movapd %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $18416, %ecx - psllq $5, %xmm0 - movsd 2144(%ebx), %xmm2 - psrlq $34, %xmm0 - rcpss %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $78, %xmm5, %xmm6 - psrlq $12, %xmm1 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_10.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type log10,@function - .size log10,.-log10 - .data -# -- End log10 - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1352628224 - .long 1070810131 - .long 521319256 - .long 1025503025 - .long 2150839296 - .long 1070801944 - .long 3329350096 - .long 3170190015 - .long 1360613376 - .long 1070793794 - .long 2024059075 - .long 1024991594 - .long 1875350528 - .long 1070785680 - .long 2163882141 - .long 3163564137 - .long 2312126464 - .long 1070777602 - .long 1975711076 - .long 1023674196 - .long 1306336256 - .long 1070769560 - .long 3524899523 - .long 3170508164 - .long 1806334976 - .long 1070761553 - .long 4254777025 - .long 1025238739 - .long 2483193856 - .long 1070753581 - .long 3800671317 - .long 3172916830 - .long 2025350144 - .long 1070745644 - .long 1731514745 - .long 1025501083 - .long 3433285632 - .long 1070737741 - .long 2551857336 - .long 3169662186 - .long 1134317568 - .long 1070729873 - .long 3426297655 - .long 3172637891 - .long 2457152512 - .long 1070722038 - .long 63549415 - .long 1025415416 - .long 1861803008 - .long 1070714237 - .long 1910171636 - .long 1023977580 - .long 2414140416 - .long 1070706469 - .long 4002514337 - .long 3170841618 - .long 2900726784 - .long 1070698734 - .long 3268064083 - .long 1022459609 - .long 2123517952 - .long 1070691032 - .long 1767031218 - .long 1022448156 - .long 3194569728 - .long 1070683362 - .long 3402332618 - .long 3171671160 - .long 650882048 - .long 1070675725 - .long 4146023905 - .long 3171023038 - .long 1928988672 - .long 1070668119 - .long 1438617867 - .long 1016360491 - .long 1594908672 - .long 1070660545 - .long 971389377 - .long 1024763979 - .long 2818746368 - .long 1070653002 - .long 3555925341 - .long 3172434821 - .long 194584576 - .long 1070645491 - .long 943919215 - .long 3172950063 - .long 1215096832 - .long 1070638010 - .long 2283358588 - .long 1022335098 - .long 501519360 - .long 1070630560 - .long 480904295 - .long 1024437959 - .long 1278266368 - .long 1070623140 - .long 2755806066 - .long 3172342012 - .long 2487812096 - .long 1070615750 - .long 2489653202 - .long 3172481099 - .long 3085451264 - .long 1070608390 - .long 3759184951 - .long 3172574892 - .long 2039090176 - .long 1070601060 - .long 1361176676 - .long 3172355319 - .long 953057280 - .long 1070591423 - .long 1176587546 - .long 3166422018 - .long 3370524672 - .long 1070576879 - .long 3669570051 - .long 1025376630 - .long 749742080 - .long 1070562394 - .long 707700964 - .long 3170814058 - .long 4008353792 - .long 1070547965 - .long 3247327652 - .long 1022431400 - .long 2612455424 - .long 1070533594 - .long 2453457344 - .long 3172322969 - .long 3230920704 - .long 1070519279 - .long 1296781801 - .long 1025115335 - .long 3965253632 - .long 1070505020 - .long 373075289 - .long 1017938528 - .long 2593157120 - .long 1070476669 - .long 1068054086 - .long 1021616576 - .long 925962240 - .long 1070448537 - .long 850121213 - .long 1023928989 - .long 1732556800 - .long 1070420620 - .long 1305206740 - .long 3172665570 - .long 3815630848 - .long 1070392915 - .long 192642943 - .long 3172699907 - .long 2001758208 - .long 1070365420 - .long 2820786683 - .long 1024704867 - .long 16746496 - .long 1070338131 - .long 1399573110 - .long 3171372773 - .long 1886492672 - .long 1070311044 - .long 3621428075 - .long 3172974358 - .long 3338196992 - .long 1070284157 - .long 3793882035 - .long 1025124701 - .long 381769728 - .long 1070257468 - .long 3877933342 - .long 3170195490 - .long 2186491904 - .long 1070230972 - .long 1838687089 - .long 1017927292 - .long 1008330752 - .long 1070204668 - .long 2228321664 - .long 1025352196 - .long 2247065600 - .long 1070178552 - .long 1413900906 - .long 3170902532 - .long 2964070400 - .long 1070152622 - .long 3590454629 - .long 1025016844 - .long 465154048 - .long 1070126876 - .long 2079688550 - .long 3172268183 - .long 883615744 - .long 1070101310 - .long 989244452 - .long 3171900485 - .long 1993768960 - .long 1070075922 - .long 1124327841 - .long 3172964992 - .long 1794471936 - .long 1070050710 - .long 1140575046 - .long 1022673726 - .long 2797932544 - .long 1070025671 - .long 1894836933 - .long 3172544059 - .long 3433797632 - .long 1070000803 - .long 3221831166 - .long 3171921685 - .long 2338371584 - .long 1069976104 - .long 3732461053 - .long 3164513518 - .long 2644013056 - .long 1069951571 - .long 2519460462 - .long 3172548740 - .long 3383814144 - .long 1069927202 - .long 2290997657 - .long 1025499649 - .long 3781380096 - .long 1069902995 - .long 380479405 - .long 1025184136 - .long 3245785088 - .long 1069878948 - .long 1096398261 - .long 3169885192 - .long 1366712320 - .long 1069855059 - .long 2218343715 - .long 3170281628 - .long 2204717056 - .long 1069831325 - .long 2668334011 - .long 1025264524 - .long 1401772032 - .long 1069807745 - .long 4103993159 - .long 1022925721 - .long 3356721152 - .long 1069784316 - .long 3573790772 - .long 3172186527 - .long 4041148416 - .long 1069761037 - .long 4027691910 - .long 3171276990 - .long 3880151040 - .long 1069737906 - .long 4087118786 - .long 3172710734 - .long 3453364224 - .long 1069714921 - .long 99014299 - .long 3172003077 - .long 3491092480 - .long 1069692080 - .long 3801836701 - .long 3172989287 - .long 575580160 - .long 1069669382 - .long 1920406012 - .long 3170874125 - .long 22282240 - .long 1069646824 - .long 964193370 - .long 1019363159 - .long 2991429632 - .long 1069624404 - .long 3372589890 - .long 1023425053 - .long 2189645824 - .long 1069602122 - .long 2610503872 - .long 1023652442 - .long 3341467648 - .long 1069579975 - .long 1190292004 - .long 1022425665 - .long 3711293440 - .long 1069557962 - .long 1104795356 - .long 1023625829 - .long 1380401152 - .long 1069524644 - .long 1156998217 - .long 1025100499 - .long 765710336 - .long 1069481144 - .long 1736649113 - .long 1024999439 - .long 849412096 - .long 1069437902 - .long 2618178330 - .long 3170853629 - .long 1433104384 - .long 1069394915 - .long 43477267 - .long 3170378811 - .long 2548596736 - .long 1069352180 - .long 3967367063 - .long 1025246584 - .long 157577216 - .long 1069309695 - .long 100402533 - .long 3172825502 - .long 3326238720 - .long 1069267455 - .long 1176892909 - .long 1025464099 - .long 4155494400 - .long 1069225459 - .long 3713707617 - .long 3172630046 - .long 3545804800 - .long 1069183704 - .long 857007315 - .long 1024965777 - .long 2602520576 - .long 1069142187 - .long 2588758347 - .long 1022463131 - .long 2631196672 - .long 1069100905 - .long 2118424235 - .long 1022490989 - .long 838135808 - .long 1069059856 - .long 4117002727 - .long 1024874520 - .long 3210903552 - .long 1069019036 - .long 650070125 - .long 3172012966 - .long 3039211520 - .long 1068978444 - .long 438055812 - .long 1017743757 - .long 2385633280 - .long 1068938077 - .long 3011990369 - .long 3171312044 - .long 3491618816 - .long 1068897932 - .long 712813818 - .long 3172720400 - .long 183644160 - .long 1068858008 - .long 4287006742 - .long 1022379728 - .long 3639214080 - .long 1068818300 - .long 353762279 - .long 3172980009 - .long 3728416768 - .long 1068778808 - .long 1851367730 - .long 1025486574 - .long 3370094592 - .long 1068739529 - .long 4046594913 - .long 3172567047 - .long 1348407296 - .long 1068700461 - .long 143189675 - .long 1025397632 - .long 899403776 - .long 1068661601 - .long 3753687842 - .long 3170772772 - .long 1117708288 - .long 1068622947 - .long 1857340812 - .long 3170782678 - .long 1248276480 - .long 1068584497 - .long 1289858203 - .long 1025222289 - .long 683237376 - .long 1068546249 - .long 2356679608 - .long 3171629170 - .long 3253764096 - .long 1068508200 - .long 3267136556 - .long 1018554987 - .long 94478336 - .long 1068441756 - .long 1927868814 - .long 3169378180 - .long 3233144832 - .long 1068366445 - .long 2682188854 - .long 1023964004 - .long 2940297216 - .long 1068291522 - .long 275301289 - .long 1023944679 - .long 3677708288 - .long 1068216982 - .long 302658771 - .long 1024465567 - .long 1576968192 - .long 1068142822 - .long 3672035940 - .long 3172254610 - .long 1614069760 - .long 1068069037 - .long 480052905 - .long 3172692062 - .long 424435712 - .long 1067995624 - .long 2207869657 - .long 3170965436 - .long 3477782528 - .long 1067922578 - .long 2980661858 - .long 3164990018 - .long 3598401536 - .long 1067849897 - .long 1974393034 - .long 3171357083 - .long 2435235840 - .long 1067777577 - .long 1385289011 - .long 1024615823 - .long 1867333632 - .long 1067705614 - .long 3442236633 - .long 1025334384 - .long 3999301632 - .long 1067634004 - .long 3506472073 - .long 1025132546 - .long 2566971392 - .long 1067562745 - .long 1425757592 - .long 3172358463 - .long 112943104 - .long 1067491833 - .long 1693407156 - .long 3172426603 - .long 3079929856 - .long 1067392159 - .long 3999942455 - .long 1018549369 - .long 2443837440 - .long 1067251701 - .long 974534460 - .long 1023963412 - .long 359366656 - .long 1067111917 - .long 2204915018 - .long 1013514416 - .long 3564519424 - .long 1066972799 - .long 3977441659 - .long 3170879860 - .long 2011086848 - .long 1066834343 - .long 590145514 - .long 1025390011 - .long 3216982016 - .long 1066696541 - .long 3629120110 - .long 1024330313 - .long 2194128896 - .long 1066559388 - .long 2367098512 - .long 3172260338 - .long 2916220928 - .long 1066422877 - .long 2262431886 - .long 1021229446 - .long 2263941120 - .long 1066172214 - .long 3118507287 - .long 1021484970 - .long 3076292608 - .long 1065901726 - .long 1411737803 - .long 3172957147 - .long 1186136064 - .long 1065632488 - .long 3109349337 - .long 1025397383 - .long 3085303808 - .long 1065364487 - .long 584715031 - .long 3172596519 - .long 1821048832 - .long 1064842211 - .long 2182246895 - .long 3172536214 - .long 697368576 - .long 1064311094 - .long 3157561765 - .long 3172716357 - .long 894042112 - .long 1063260131 - .long 3237958154 - .long 3172587292 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1352628224 - .long 1066615827 - .long 521319256 - .long 1021308721 - .long 3248877870 - .long 1077250164 - .long 1691676429 - .long 3221787401 - .long 945132465 - .long 3223701783 - .long 3700831335 - .long 1073506818 - .long 2141010593 - .long 1075227551 - .long 3698831637 - .long 3220339442 - .long 4160749568 - .long 4294967295 - .long 0 - .long 4294959104 - .long 0 - .long 1071366144 - .long 3207479560 - .long 1062894188 - .type static_const_table,@object - .size static_const_table,2160 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10f_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10f_wmt.S deleted file mode 100644 index 083ec694e1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10f_wmt.S +++ /dev/null @@ -1,745 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log10f_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin log10f - .text - .align 16,0x90 - .globl log10f -log10f: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl $16384, %ecx - movd %ecx, %xmm4 - movl $-32768, %eax - movd %eax, %xmm2 - xorpd %xmm3, %xmm3 - movl $16368, %edx - pinsrw $3, %edx, %xmm3 - xorpd %xmm5, %xmm5 -.L_2TAG_PACKET_0.0.3: - movd %xmm0, %edx - rcpss %xmm0, %xmm1 - movsd 2080(%ebx), %xmm7 - pshuflw $68, %xmm0, %xmm0 - paddd %xmm4, %xmm1 - subl $8388608, %edx - cmpl $2113929216, %edx - jae .L_2TAG_PACKET_1.0.3 - andps %xmm1, %xmm2 - cvtps2pd %xmm0, %xmm0 - cvtps2pd %xmm2, %xmm1 - movd %xmm2, %eax - andl $-8388608, %edx - subl $1056964608, %edx - cvtsi2sdl %edx, %xmm6 - mulsd %xmm1, %xmm0 - subl $1056964608, %edx - addl %edx, %eax - shrl $12, %eax - movsd (%ebx,%eax), %xmm4 - subsd %xmm3, %xmm0 - movsd 2088(%ebx), %xmm2 - movsd 2096(%ebx), %xmm1 - mulsd %xmm0, %xmm7 - addsd %xmm0, %xmm5 - mulsd %xmm0, %xmm0 - movsd 2104(%ebx), %xmm3 - mulsd %xmm2, %xmm6 - addsd %xmm7, %xmm1 - mulsd %xmm3, %xmm5 - addsd %xmm4, %xmm6 - mulsd %xmm1, %xmm0 - mulsd %xmm3, %xmm0 - addsd %xmm6, %xmm5 - addsd %xmm0, %xmm5 - cvtpd2ps %xmm5, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - addl $8388608, %edx - js .L_2TAG_PACKET_3.0.3 - cmpl $8388608, %edx - jb .L_2TAG_PACKET_4.0.3 - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_5.0.3 - movl $528482304, %eax - movd %eax, %xmm6 - movsd 2064(%ebx), %xmm5 - mulss %xmm6, %xmm0 - jmp .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_5.0.3: - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $-2147483648, %edx - je .L_2TAG_PACKET_6.0.3 - addl %edx, %edx - cmpl $-16777216, %edx - ja .L_2TAG_PACKET_5.0.3 - xorps %xmm0, %xmm0 - divss %xmm0, %xmm0 - movl $11, %edx -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_4.0.3: - cmpl $0, %edx - je .L_2TAG_PACKET_6.0.3 - movl $1602224128, %eax - movd %eax, %xmm7 - mulss %xmm7, %xmm0 - movsd 2072(%ebx), %xmm5 - jmp .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_6.0.3: - movl $-1082130432, %eax - movd %eax, %xmm0 - xorps %xmm1, %xmm1 - divss %xmm1, %xmm0 - movl $10, %edx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_2.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type log10f,@function - .size log10f,.-log10f - .data -# -- End log10f - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1352628734 - .long 1070810131 - .long 2987063119 - .long 1070803029 - .long 2814064164 - .long 1070795955 - .long 4212141943 - .long 1070788908 - .long 1980466875 - .long 1070781889 - .long 3813543508 - .long 1070774896 - .long 236279882 - .long 1070767931 - .long 3258536649 - .long 1070760991 - .long 3425300546 - .long 1070754078 - .long 4176272103 - .long 1070747191 - .long 370881335 - .long 1070740331 - .long 4057946465 - .long 1070733495 - .long 1525858624 - .long 1070726686 - .long 547082415 - .long 1070719902 - .long 313247743 - .long 1070713143 - .long 24949840 - .long 1070706409 - .long 3186584478 - .long 1070699699 - .long 426349118 - .long 1070693015 - .long 3855853989 - .long 1070686354 - .long 4120324153 - .long 1070679718 - .long 463247870 - .long 1070673107 - .long 726256111 - .long 1070666519 - .long 4169135061 - .long 1070659954 - .long 1469709924 - .long 1070653414 - .long 493534586 - .long 1070646897 - .long 523975765 - .long 1070640403 - .long 852037507 - .long 1070633932 - .long 776253054 - .long 1070627484 - .long 3897545900 - .long 1070621058 - .long 939256246 - .long 1070614656 - .long 4106776832 - .long 1070608275 - .long 4137779223 - .long 1070601917 - .long 733771778 - .long 1070595068 - .long 1451145848 - .long 1070582440 - .long 534475932 - .long 1070569856 - .long 988918143 - .long 1070557315 - .long 1537935568 - .long 1070544817 - .long 918084032 - .long 1070532362 - .long 2173800955 - .long 1070519949 - .long 4067295355 - .long 1070507578 - .long 1078375409 - .long 1070495250 - .long 584148105 - .long 1070482963 - .long 1384016078 - .long 1070470717 - .long 2289448314 - .long 1070458512 - .long 2123818995 - .long 1070446348 - .long 4017216324 - .long 1070434224 - .long 2521384792 - .long 1070422141 - .long 789441093 - .long 1070410098 - .long 1985788785 - .long 1070398094 - .long 696035438 - .long 1070386130 - .long 106715969 - .long 1070374205 - .long 3415214590 - .long 1070362318 - .long 944721792 - .long 1070350471 - .long 208866570 - .long 1070338662 - .long 141776059 - .long 1070326891 - .long 3982843004 - .long 1070315157 - .long 2096724351 - .long 1070303462 - .long 2037982183 - .long 1070291804 - .long 2781151897 - .long 1070280183 - .long 3310550777 - .long 1070268599 - .long 2620153983 - .long 1070257052 - .long 4008439778 - .long 1070245541 - .long 2193367512 - .long 1070234067 - .long 492128552 - .long 1070222629 - .long 2231095287 - .long 1070211226 - .long 2155771957 - .long 1070199859 - .long 3610551033 - .long 1070188527 - .long 1358732975 - .long 1070177231 - .long 3057253384 - .long 1070165969 - .long 3486771566 - .long 1070154742 - .long 1731433722 - .long 1070143550 - .long 1178768569 - .long 1070132392 - .long 929649969 - .long 1070121268 - .long 93163010 - .long 1070110178 - .long 2081471614 - .long 1070099121 - .long 1724818481 - .long 1070088098 - .long 2451297579 - .long 1070077108 - .long 3401857016 - .long 1070066151 - .long 3725172527 - .long 1070055227 - .long 2577555067 - .long 1070044336 - .long 3417827070 - .long 1070033477 - .long 1122330889 - .long 1070022651 - .long 3459676923 - .long 1070011856 - .long 1025885499 - .long 1070001094 - .long 1604039477 - .long 1069990363 - .long 99428678 - .long 1069979664 - .long 14303095 - .long 1069968996 - .long 562888951 - .long 1069958359 - .long 966275143 - .long 1069947753 - .long 452333559 - .long 1069937178 - .long 2550607841 - .long 1069926633 - .long 2207334103 - .long 1069916119 - .long 2965233831 - .long 1069905635 - .long 4078536805 - .long 1069895181 - .long 512906990 - .long 1069884758 - .long 125238661 - .long 1069874364 - .long 2188747907 - .long 1069863999 - .long 1687868933 - .long 1069853664 - .long 2203085958 - .long 1069843358 - .long 3025962321 - .long 1069833081 - .long 3454039745 - .long 1069822833 - .long 2790771261 - .long 1069812614 - .long 345455060 - .long 1069802424 - .long 4023103876 - .long 1069792261 - .long 259609597 - .long 1069782128 - .long 1266320102 - .long 1069772022 - .long 2080303760 - .long 1069761944 - .long 2039124234 - .long 1069751894 - .long 485812347 - .long 1069741872 - .long 1063773386 - .long 1069731877 - .long 3126793337 - .long 1069721909 - .long 1738980508 - .long 1069711969 - .long 559609852 - .long 1069702056 - .long 3253131575 - .long 1069692169 - .long 604213228 - .long 1069682310 - .long 582455508 - .long 1069672477 - .long 2572533957 - .long 1069662670 - .long 1669112468 - .long 1069652890 - .long 1561692097 - .long 1069643136 - .long 1649656812 - .long 1069633408 - .long 1337189125 - .long 1069623706 - .long 33219107 - .long 1069614030 - .long 1446341380 - .long 1069604379 - .long 699863590 - .long 1069594754 - .long 1511626603 - .long 1069585154 - .long 3309054272 - .long 1069575579 - .long 1229105731 - .long 1069566030 - .long 3298097489 - .long 1069556505 - .long 733771778 - .long 1069546492 - .long 941119219 - .long 1069527542 - .long 1822213925 - .long 1069508641 - .long 2284546201 - .long 1069489789 - .long 1244064507 - .long 1069470986 - .long 1920055672 - .long 1069452231 - .long 3245124337 - .long 1069433524 - .long 4160075380 - .long 1069414865 - .long 3613830132 - .long 1069396254 - .long 563343667 - .long 1069377691 - .long 2563457724 - .long 1069359174 - .long 4291983602 - .long 1069340704 - .long 434524432 - .long 1069322282 - .long 2864265762 - .long 1069303905 - .long 1987192266 - .long 1069285575 - .long 1101749477 - .long 1069267291 - .long 3513866209 - .long 1069249052 - .long 3946945232 - .long 1069230859 - .long 1426691339 - .long 1069212712 - .long 3576005763 - .long 1069194609 - .long 845110406 - .long 1069176552 - .long 871215109 - .long 1069158539 - .long 2708643652 - .long 1069140570 - .long 1123731696 - .long 1069122646 - .long 3774627455 - .long 1069104765 - .long 1146452958 - .long 1069086929 - .long 910975575 - .long 1069069136 - .long 2156738207 - .long 1069051386 - .long 3978928660 - .long 1069033679 - .long 1184347907 - .long 1069016016 - .long 1471215619 - .long 1068998395 - .long 3954270793 - .long 1068980816 - .long 3459676923 - .long 1068963280 - .long 3409862493 - .long 1068945786 - .long 2938558446 - .long 1068928334 - .long 1185705548 - .long 1068910924 - .long 1592362480 - .long 1068893555 - .long 3310712728 - .long 1068876227 - .long 1204006778 - .long 1068858941 - .long 3026374165 - .long 1068841695 - .long 3652963247 - .long 1068824490 - .long 2259754590 - .long 1068807326 - .long 2323505846 - .long 1068790202 - .long 3031762664 - .long 1068773118 - .long 3577772136 - .long 1068756074 - .long 3160429577 - .long 1068739070 - .long 984225922 - .long 1068722106 - .long 554163028 - .long 1068705181 - .long 1085767694 - .long 1068688295 - .long 1800008162 - .long 1068671448 - .long 1923243906 - .long 1068654640 - .long 687176001 - .long 1068637871 - .long 1623765358 - .long 1068621140 - .long 3975249632 - .long 1068604447 - .long 2694095274 - .long 1068587793 - .long 1327852021 - .long 1068571177 - .long 3429171449 - .long 1068554598 - .long 3965826047 - .long 1068538057 - .long 2205565303 - .long 1068521554 - .long 1716070423 - .long 1068505088 - .long 3549949915 - .long 1068478374 - .long 3329575661 - .long 1068445590 - .long 1345699131 - .long 1068412880 - .long 477545290 - .long 1068380243 - .long 3613830132 - .long 1068347678 - .long 767774141 - .long 1068315187 - .long 3436756955 - .long 1068282767 - .long 1652561627 - .long 1068250420 - .long 2635998437 - .long 1068218144 - .long 732052851 - .long 1068185940 - .long 3179609247 - .long 1068153806 - .long 46600657 - .long 1068121744 - .long 2884636118 - .long 1068089751 - .long 1779250255 - .long 1068057829 - .long 4004532339 - .long 1068025976 - .long 3958279445 - .long 1067994193 - .long 341790679 - .long 1067962480 - .long 454760347 - .long 1067930835 - .long 3015335440 - .long 1067899258 - .long 2455010382 - .long 1067867750 - .long 1803457173 - .long 1067836310 - .long 4098519806 - .long 1067804937 - .long 3796209455 - .long 1067773632 - .long 3950504195 - .long 1067742394 - .long 3328378381 - .long 1067711223 - .long 704701956 - .long 1067680119 - .long 3452107772 - .long 1067649080 - .long 1771121268 - .long 1067618108 - .long 3049832979 - .long 1067587201 - .long 1799062323 - .long 1067556360 - .long 1127129613 - .long 1067525584 - .long 4149857684 - .long 1067494872 - .long 1105606892 - .long 1067464226 - .long 3134934760 - .long 1067416919 - .long 166917834 - .long 1067355883 - .long 3892547049 - .long 1067294973 - .long 3436756955 - .long 1067234191 - .long 823651223 - .long 1067173536 - .long 2386449519 - .long 1067113006 - .long 1587501031 - .long 1067052602 - .long 493004867 - .long 1066992323 - .long 1182960573 - .long 1066932168 - .long 1456087142 - .long 1066872137 - .long 3419645072 - .long 1066812229 - .long 604423097 - .long 1066752445 - .long 3734431729 - .long 1066692782 - .long 2072088478 - .long 1066633242 - .long 2072815517 - .long 1066573823 - .long 1615129006 - .long 1066514525 - .long 2885435162 - .long 1066455347 - .long 3281014557 - .long 1066390787 - .long 184567846 - .long 1066272911 - .long 930630719 - .long 1066155272 - .long 1403389293 - .long 1066037870 - .long 1806815988 - .long 1065920704 - .long 2369503088 - .long 1065803773 - .long 3344465584 - .long 1065687076 - .long 713978687 - .long 1065570613 - .long 3369253777 - .long 1065454381 - .long 1795984717 - .long 1065323547 - .long 182837330 - .long 1065092008 - .long 2643543972 - .long 1064860927 - .long 1379209260 - .long 1064630304 - .long 1522032624 - .long 1064400136 - .long 3615182786 - .long 1064036203 - .long 2033862474 - .long 1063577678 - .long 494771387 - .long 1062984042 - .long 1170198564 - .long 1061933680 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 4277811695 - .long 1078341186 - .long 4277811695 - .long 3225824834 - .long 1431655765 - .long 1070945621 - .long 1352628734 - .long 1046692883 - .long 1107282704 - .long 3219128321 - .long 354870542 - .long 1071369083 - .type static_const_table,@object - .size static_const_table,2112 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10l.S deleted file mode 100644 index 806e9dc4df..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10l.S +++ /dev/null @@ -1,921 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log10l.c" - .text -..TXTST0: -# -- Begin log10l - .text - .align 16,0x90 - .globl log10l -log10l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzbl 17(%ebp), %edi - andl $128, %edi - shrl $7, %edi - movzwl 16(%ebp), %esi - movl %esi, %ebx - movl %edi, %edx - andl $32767, %ebx - shll $15, %edx - movl 12(%ebp), %eax - orl %ebx, %edx - movl %eax, %ecx - shll $16, %edx - shrl $16, %ecx - orl %ecx, %edx - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $2147450880, %edx - jae ..B1.30 -..B1.4: - addl $-1073676224, %edx - cmpl $32863, %edx - ja ..B1.13 -..B1.5: - cmpl $16383, %ebx - je ..B1.40 -..B1.6: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.39 -..B1.7: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.8: - fldcw 12(%esp) -..B1.9: - movl $1, %eax -..B1.10: - fldt 8(%ebp) - testl %eax, %eax - fldl _TWO_32H@GOTOFF(%ecx) - fldt 84+_P@GOTOFF(%ecx) - fldt 60+_P@GOTOFF(%ecx) - fldt 36+_P@GOTOFF(%ecx) - fxch %st(4) - faddl 8+_ones@GOTOFF(%ecx) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fld %st(1) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(1) - fsub %st(3), %st - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 72+_P@GOTOFF(%ecx) - fmul %st(5), %st - fldt 48+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt _P@GOTOFF(%ecx) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt 96+_P@GOTOFF(%ecx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.12 -..B1.11: - fldcw 14(%esp) -..B1.12: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - cmpl $16383, %ebx - jl ..B1.19 -..B1.14: - cmpl $16471, %ebx - jge ..B1.19 -..B1.15: - movl %eax, (%esp) - lea -16383(%ebx), %edi - movl $1431655766, %eax - imull %edi - sarl $31, %edi - subl %edi, %edx - lea (%edx,%edx,2), %edx - movzwl 8+_exact_values@GOTOFF(%ecx,%edx,8), %eax - andl $32767, %eax - cmpl %eax, %ebx - movl (%esp), %eax - jne ..B1.19 -..B1.16: - cmpl 4+_exact_values@GOTOFF(%ecx,%edx,8), %eax - jne ..B1.19 -..B1.17: - movl 8(%ebp), %eax - cmpl _exact_values@GOTOFF(%ecx,%edx,8), %eax - jne ..B1.19 -..B1.18: - fldt 12+_exact_values@GOTOFF(%ecx,%edx,8) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.46 -..B1.20: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.21: - fldcw 12(%esp) -..B1.22: - movzwl 16(%ebp), %esi - movl %esi, %ebx - movl $1, %edx - andl $32767, %ebx -..B1.23: - testl %ebx, %ebx - jne ..B1.26 -..B1.24: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%ecx) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _zeros@GOTOFF(%ecx) - fxch %st(1) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B1.25 - je ..B1.43 -..B1.25: - fstp %st(0) - movzwl 16(%ebp), %esi - movl %esi, %ebx - movl $-16458, %eax - andl $32767, %ebx - jmp ..B1.27 -..B1.26: - movl $-16383, %eax -..B1.27: - fldl _TWO_32H@GOTOFF(%ecx) - andl $-32768, %esi - fldt 84+_P@GOTOFF(%ecx) - orl $-49153, %esi - fldt 60+_P@GOTOFF(%ecx) - addl %eax, %ebx - movw %si, 16(%ebp) - fldt 8(%ebp) - fld %st(0) - movl 12(%ebp), %eax - fadd %st(4), %st - shrl $23, %eax - fsubp %st, %st(4) - movzbl %al, %eax - fsub %st(3), %st - flds __libm_rcp_table_256@GOTOFF(%ecx,%eax,4) - fmul %st, %st(4) - fmulp %st, %st(1) - fxch %st(3) - faddl 8+_ones@GOTOFF(%ecx) - fld %st(0) - movl %ebx, 16(%esp) - fadd %st(4), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - shll $4, %eax - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - testl %edx, %edx - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 36+_P@GOTOFF(%ecx) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 72+_P@GOTOFF(%ecx) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt _P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 96+_P@GOTOFF(%ecx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(2) - fildl 16(%esp) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st(1), %st - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl 8+__libm_log10l_table_256@GOTOFF(%ecx,%eax) - faddp %st, %st(2) - faddl __libm_log10l_table_256@GOTOFF(%eax,%ecx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.29 -..B1.28: - fldcw 14(%esp) -..B1.29: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.30: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.55 -..B1.31: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.32: - fldcw 12(%esp) -..B1.33: - movzbl 17(%ebp), %edi - movl $1, %edx - andl $128, %edi - shrl $7, %edi -..B1.34: - testl %edi, %edi - jne ..B1.47 -..B1.35: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ecx) - fstpt (%esp) -..B1.36: - testl %edx, %edx - je ..B1.38 -..B1.37: - fldcw 14(%esp) -..B1.38: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - xorl %eax, %eax - jmp ..B1.10 -..B1.40: - cmpl $-2147483648, %eax - jne ..B1.6 -..B1.41: - cmpl $0, 8(%ebp) - jne ..B1.6 -..B1.42: - fldl _zeros@GOTOFF(%ecx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.43: - fldl 8+_ones@GOTOFF(%ecx) - testl %edx, %edx - fdivp %st, %st(1) - fstpl (%esp) - je ..B1.45 -..B1.44: - fldcw 14(%esp) -..B1.45: - fldl (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - xorl %edx, %edx - jmp ..B1.23 -..B1.47: - movzwl 16(%ebp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.50 -..B1.48: - cmpl $-2147483648, 12(%ebp) - jne ..B1.35 -..B1.49: - cmpl $0, 8(%ebp) - jne ..B1.35 - jmp ..B1.54 -..B1.50: - testl %eax, %eax - jne ..B1.54 -..B1.51: - cmpl $0, 12(%ebp) - jne ..B1.54 -..B1.52: - cmpl $0, 8(%ebp) - jne ..B1.54 -..B1.53: - fldl 8+_ones@GOTOFF(%ecx) - fdivl _zeros@GOTOFF(%ecx) - fstpt (%esp) - jmp ..B1.36 -..B1.54: - fldl _infs@GOTOFF(%ecx) - fmull _zeros@GOTOFF(%ecx) - fstpt (%esp) - jmp ..B1.36 -..B1.55: - xorl %edx, %edx - jmp ..B1.34 - .align 16,0x90 - .type log10l,@function - .size log10l,.-log10l - .data -# -- End log10l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xc8,0xd4,0x0e,0xee,0x0c,0x01,0x86,0xd8,0xbf,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x85,0x9a,0x20,0x9a,0xfd,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_P: - .word 23339 - .word 38197 - .word 10353 - .word 43319 - .word 16357 - .word 0 - .word 29077 - .word 14120 - .word 55465 - .word 56923 - .word 49148 - .word 0 - .word 63176 - .word 31258 - .word 15131 - .word 37949 - .word 16380 - .word 0 - .word 29577 - .word 14120 - .word 55465 - .word 56923 - .word 49147 - .word 0 - .word 61319 - .word 34328 - .word 5050 - .word 45539 - .word 16379 - .word 0 - .word 52415 - .word 26390 - .word 15131 - .word 37949 - .word 49147 - .word 0 - .word 16765 - .word 7621 - .word 20590 - .word 65056 - .word 16378 - .word 0 - .word 14162 - .word 11829 - .word 26041 - .word 56924 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 55296 - .word 56923 - .word 16381 - .word 0 - .type _P,@object - .size _P,108 - .align 2 -_exact_values: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64000 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40000 - .word 16396 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50000 - .word 16399 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62500 - .word 16402 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39062 - .word 16406 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57344 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 8192 - .word 48828 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 10240 - .word 61035 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 63744 - .word 38146 - .word 16416 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 46912 - .word 47683 - .word 16419 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45056 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 42256 - .word 59604 - .word 16422 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 59178 - .word 37252 - .word 16426 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53248 - .word 16386 - .word 0 - .word 0 - .word 32768 - .word 8436 - .word 46566 - .word 16429 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57344 - .word 16386 - .word 0 - .word 0 - .word 40960 - .word 43313 - .word 58207 - .word 16432 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 16386 - .word 0 - .word 0 - .word 1024 - .word 51647 - .word 36379 - .word 16436 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16387 - .word 0 - .word 0 - .word 50432 - .word 48174 - .word 45474 - .word 16439 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16387 - .word 0 - .word 0 - .word 30272 - .word 27450 - .word 56843 - .word 16442 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 35304 - .word 8964 - .word 35527 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38912 - .word 16387 - .word 0 - .word 0 - .word 44130 - .word 60357 - .word 44408 - .word 16449 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16387 - .word 0 - .word 32768 - .word 6010 - .word 9911 - .word 55511 - .word 16452 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16387 - .word 0 - .word 36864 - .word 28332 - .word 30770 - .word 34694 - .word 16456 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45056 - .word 16387 - .word 0 - .word 46080 - .word 2647 - .word 5695 - .word 43368 - .word 16459 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47104 - .word 16387 - .word 0 - .word 41216 - .word 52461 - .word 7118 - .word 54210 - .word 16462 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16387 - .word 0 - .word 33952 - .word 16404 - .word 20833 - .word 33881 - .word 16466 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 16387 - .word 0 - .word 42440 - .word 36889 - .word 42425 - .word 42351 - .word 16469 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53248 - .word 16387 - .word 0 - .word 3898 - .word 62496 - .word 36647 - .word 52939 - .word 16472 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55296 - .word 16387 - .word 0 - .type _exact_values,@object - .size _exact_values,720 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_log10l_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10l_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10l_table.S deleted file mode 100644 index 61b661e651..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log10l_table.S +++ /dev/null @@ -1,560 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log10l_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_log10l_table_256 - .globl __libm_log10l_table_256 -__libm_log10l_table_256: - .long 0x45bfc000,0x3f4bd270 - .long 0xeb5a6902,0x3cc024b0 - .long 0x793a4000,0x3f64e84e - .long 0xbdc59429,0x3ccd29dc - .long 0x5ab86000,0x3f717508 - .long 0xf6df9894,0xbc6f70c9 - .long 0x9d914000,0x3f787cff - .long 0xeb029384,0x3cde94f0 - .long 0x72b8c000,0x3f7ea9d3 - .long 0x75a2920a,0xbd001bfa - .long 0x95daa000,0x3f82df9d - .long 0x77634a76,0xbcf3c705 - .long 0x72d64000,0x3f866df1 - .long 0x93609ef4,0xbcf1a833 - .long 0xef5ec000,0x3f898d79 - .long 0x7a519e99,0x3d16f7e1 - .long 0xf3f94000,0x3f8d22ad - .long 0xa10c1504,0x3d079c92 - .long 0x1d30c000,0x3f902423 - .long 0x2dcf9263,0x3cecc021 - .long 0x98898000,0x3f91f23a - .long 0x21ad4280,0xbce5b1e0 - .long 0x7b818000,0x3f93881a - .long 0x9c5111b1,0x3d0f3cbd - .long 0x1e75a000,0x3f951f6e - .long 0xaf539251,0xbcdcad0e - .long 0xe7adc000,0x3f96f2bc - .long 0x7385f0a6,0x3cf6d084 - .long 0x2cdf4000,0x3f988d36 - .long 0x41385083,0xbd04c3af - .long 0xaf014000,0x3f9a292b - .long 0x3724b270,0xbd2b3f0c - .long 0x3117c000,0x3f9bc6a0 - .long 0x667331b5,0x3d25cb86 - .long 0x7de3c000,0x3f9d6596 - .long 0x31612f8e,0xbd14f74b - .long 0x67fc4000,0x3f9f0611 - .long 0x143b6bad,0xbd0c30f3 - .long 0xe4f78000,0x3fa05409 - .long 0x5b985713,0x3ce9bb8e - .long 0x432ea000,0x3fa125d0 - .long 0x68a0dc47,0x3cf06e09 - .long 0x440d2000,0x3fa1f85d - .long 0x507c1dd7,0x3d133627 - .long 0x57496000,0x3fa2ad75 - .long 0x7f319445,0x3ce7c850 - .long 0x2a00e000,0x3fa38177 - .long 0x9d2bb1a5,0x3d080fdc - .long 0xe165a000,0x3fa45643 - .long 0xf742c845,0x3d0c2a9f - .long 0x03446000,0x3fa52bdd - .long 0x5036c404,0x3d25b862 - .long 0x6b7ec000,0x3fa5e396 - .long 0x23196824,0xbd36b572 - .long 0x47c5c000,0x3fa6baaf - .long 0x6d3e4a28,0xbd1b7614 - .long 0xe8c4c000,0x3fa773b3 - .long 0xf794b354,0x3d39e3f5 - .long 0xebee8000,0x3fa84c51 - .long 0x2cb6638b,0x3d1a2aaa - .long 0x786fc000,0x3fa906a6 - .long 0xdfffb059,0x3cecab9f - .long 0xabf00000,0x3fa9c197 - .long 0x3d6e4566,0x3d1badcf - .long 0x71218000,0x3faa9c78 - .long 0xcb03a47d,0x3d21f757 - .long 0x9c8d4000,0x3fab58c0 - .long 0x3b0fe4fe,0x3d31be11 - .long 0xbcdd4000,0x3fac15a8 - .long 0xb6d13ff4,0x3d3dbf2d - .long 0xe2c28000,0x3facd331 - .long 0x77fafd44,0x3d267bed - .long 0xd766c000,0x3fadb11e - .long 0x23c3e44c,0xbd240bcd - .long 0x9346c000,0x3fae7008 - .long 0xd4c5edca,0xbd2619d1 - .long 0xc6754000,0x3faf2f96 - .long 0xb182cded,0x3d15dbd8 - .long 0x8d450000,0x3fafefca - .long 0xcc1beb8a,0x3d2fd5cf - .long 0x83764000,0x3fb05852 - .long 0x779b9fcf,0x3cf77c3e - .long 0xaac7c000,0x3fb0b913 - .long 0xbc7f44a6,0x3d33a6ff - .long 0x4f258000,0x3fb11a29 - .long 0xb8d25b3a,0xbd360a72 - .long 0xa2698000,0x3fb16b51 - .long 0x7904e2d7,0xbd376f39 - .long 0xadacc000,0x3fb1cd03 - .long 0x084a2298,0x3d217bee - .long 0xdd776000,0x3fb22f0b - .long 0xa204f9bf,0xbd3a0ad1 - .long 0xca38e000,0x3fb2916a - .long 0xffeb8381,0xbd2c3074 - .long 0x0df76000,0x3fb2f421 - .long 0x0d443b33,0x3d18f3ef - .long 0xc3c48000,0x3fb346a6 - .long 0x15025ea7,0x3d306599 - .long 0xbc606000,0x3fb3a9fe - .long 0xa7db519f,0xbd27eca8 - .long 0x10a3c000,0x3fb3fd0c - .long 0xb6f7db46,0xbd35abc5 - .long 0xd3540000,0x3fb46107 - .long 0x813a4964,0x3d25039a - .long 0xd1696000,0x3fb4c55d - .long 0x64286476,0x3d1ff9d8 - .long 0x330c0000,0x3fb51940 - .long 0x2c505825,0x3ca5ed92 - .long 0x0ee70000,0x3fb56d62 - .long 0x06e88a06,0x3d315e58 - .long 0xcf260000,0x3fb5d2ab - .long 0xd90fb16b,0x3d378d89 - .long 0xa5dec000,0x3fb6275a - .long 0x405920cd,0xbcdfa0db - .long 0xaf26c000,0x3fb68d4e - .long 0x1d3da9e2,0x3d37ee53 - .long 0x5c54c000,0x3fb6e28c - .long 0x9d9b5afe,0xbd3d72f7 - .long 0x9665c000,0x3fb7380b - .long 0xb00e89cf,0xbd20707b - .long 0xc2790000,0x3fb78dcc - .long 0x9a7343d9,0xbd37a4ff - .long 0x2cf28000,0x3fb7f50c - .long 0xfacefdb0,0xbd45431c - .long 0xd5eb0000,0x3fb84b5f - .long 0x2b4f09ce,0xbd302851 - .long 0xbab2c000,0x3fb8a1f6 - .long 0x11e41a3e,0xbd2bb389 - .long 0x44558000,0x3fb8f8d1 - .long 0xbf96339c,0xbd1083fd - .long 0xdcd64000,0x3fb94fef - .long 0xe07d5241,0xbd4136f4 - .long 0xef314000,0x3fb9a752 - .long 0xa5e3191a,0x3d40a49e - .long 0xe7614000,0x3fb9fefa - .long 0xa1f54e0a,0xbd40902f - .long 0x325f4000,0x3fba56e8 - .long 0xec5e03cc,0x3d3c86ee - .long 0x3e298000,0x3fbaaf1b - .long 0xcb09696b,0xbd1130fe - .long 0x79c34000,0x3fbb0794 - .long 0x628b8546,0x3d495642 - .long 0x553b0000,0x3fbb6054 - .long 0xa20d3394,0x3d32f77b - .long 0x41ab8000,0x3fbbb95b - .long 0x61433066,0xbd418d39 - .long 0xb1400000,0x3fbc12a9 - .long 0xd5882f66,0xbd3f86c6 - .long 0x17380000,0x3fbc6c40 - .long 0x219900ae,0x3d45f518 - .long 0xba424000,0x3fbcb41f - .long 0x6665a718,0x3d443661 - .long 0xce734000,0x3fbd0e38 - .long 0xd0afc15d,0xbd1b04a7 - .long 0x21940000,0x3fbd689b - .long 0x80039681,0xbd2d9a08 - .long 0x2b1d0000,0x3fbdc347 - .long 0xd102c576,0x3d442ff9 - .long 0x300d8000,0x3fbe0c06 - .long 0xe391d6b6,0xbd46ba4d - .long 0x190e4000,0x3fbe6738 - .long 0x23d01c6b,0xbd1ad0ad - .long 0x0d208000,0x3fbec2b5 - .long 0xb6656ff4,0x3d2b355d - .long 0x2b938000,0x3fbf0c1c - .long 0x4980111b,0xbd37d822 - .long 0x6c9cc000,0x3fbf6821 - .long 0xd0891bcc,0x3d1c9a3b - .long 0x38184000,0x3fbfb1f6 - .long 0x16ca77f0,0x3d36f3d3 - .long 0xaf4ce000,0x3fc00742 - .long 0xee8b5696,0x3d27e0ee - .long 0x90650000,0x3fc02c64 - .long 0xe445f2fd,0x3d42d27a - .long 0xe63e2000,0x3fc05af1 - .long 0xa16f7336,0xbd4c4b92 - .long 0xea724000,0x3fc0804b - .long 0xb736f965,0xbd255d7c - .long 0xd6712000,0x3fc0af1f - .long 0x009609f5,0xbd35b214 - .long 0xa8806000,0x3fc0d4b2 - .long 0xc4dfdce2,0xbd2800b0 - .long 0xf136a000,0x3fc0fa5e - .long 0x2043a891,0x3ceb0a92 - .long 0x4fb3e000,0x3fc1299a - .long 0x26f70b35,0x3d182c63 - .long 0x6253c000,0x3fc14f80 - .long 0x44ac2d9f,0x3d1f65c1 - .long 0x5d158000,0x3fc17580 - .long 0x33b79054,0x3d2f04d6 - .long 0x637cc000,0x3fc19b9a - .long 0xe16cee25,0xbd4d6b79 - .long 0xc26ee000,0x3fc1cb5f - .long 0x6b51c369,0xbd0e934a - .long 0xe65f2000,0x3fc1f1b4 - .long 0x70fcf287,0x3d264160 - .long 0x8b5dc000,0x3fc21824 - .long 0xa3811df5,0x3d1f2866 - .long 0xd62ae000,0x3fc23eae - .long 0x75f6e51d,0xbd1c4ef6 - .long 0xebd34000,0x3fc26553 - .long 0xcd48326e,0xbd308652 - .long 0xf1b12000,0x3fc28c13 - .long 0xdfe3a7af,0xbd2c0024 - .long 0x14382000,0x3fc2bcaa - .long 0x21480e44,0xbd38f4c6 - .long 0x40b78000,0x3fc2e3a7 - .long 0x60689912,0x3cbd2885 - .long 0xd8f34000,0x3fc30abf - .long 0x508d5aa5,0xbd3893a6 - .long 0x03984000,0x3fc331f4 - .long 0xe9a3a8db,0x3d409691 - .long 0xe7a60000,0x3fc35943 - .long 0x43d5764a,0x3d2a3e8e - .long 0xac6e8000,0x3fc380af - .long 0x4d90e64e,0xbd1fc4d9 - .long 0x7997c000,0x3fc3a837 - .long 0xab2a4593,0xbd286816 - .long 0x771ca000,0x3fc3cfdb - .long 0x16e57a0f,0xbd2493c7 - .long 0x0d39a000,0x3fc3eda9 - .long 0x2ae78433,0x3d277ad1 - .long 0xc0950000,0x3fc4157e - .long 0xa37f5324,0x3d27333a - .long 0x13fb2000,0x3fc43d71 - .long 0xb82461da,0xbd4b3f09 - .long 0x30ad2000,0x3fc46580 - .long 0x72bdc442,0xbd198b79 - .long 0x40464000,0x3fc48dac - .long 0xc1788616,0xbd2c28bc - .long 0x6cbbc000,0x3fc4b5f5 - .long 0xef1ba41e,0xbd2e5a23 - .long 0xe05e6000,0x3fc4de5b - .long 0x8b90e0a0,0x3d4582b8 - .long 0x07770000,0x3fc4fcbc - .long 0x794dd932,0xbd13d6f8 - .long 0x1e926000,0x3fc52556 - .long 0x9b81384c,0xbd322350 - .long 0xf3198000,0x3fc54e0d - .long 0x2cd70aca,0x3d30ca92 - .long 0x7112c000,0x3fc56cab - .long 0x2a6e4407,0xbd10ed4c - .long 0xba734000,0x3fc59597 - .long 0x187e8930,0x3d4b1553 - .long 0x3a508000,0x3fc5bea2 - .long 0x1e386e4d,0xbd402641 - .long 0x08de4000,0x3fc5dd7e - .long 0x0b3f247b,0xbd2f4535 - .long 0xd3f90000,0x3fc606bd - .long 0x7c6ff8cd,0x3d51aaa0 - .long 0x518a4000,0x3fc6301c - .long 0x4d6761d0,0x3d401ece - .long 0x70618000,0x3fc64f37 - .long 0xa791b8a6,0x3d322b46 - .long 0x14c20000,0x3fc678cc - .long 0x7917b19f,0xbd4d287f - .long 0x05ed4000,0x3fc69810 - .long 0xcb5870e8,0xbd46b8cb - .long 0x5f9bc000,0x3fc6c1db - .long 0x986fe812,0xbd3994b8 - .long 0x8ecd0000,0x3fc6e148 - .long 0x4fa56719,0x3d54407b - .long 0x2e7e4000,0x3fc70b4b - .long 0xc215a307,0x3d0b8ea3 - .long 0x09144000,0x3fc72ae2 - .long 0x8e443b8a,0x3d55fc4a - .long 0x81bd8000,0x3fc7551c - .long 0xaffc42e9,0x3d3b9ef2 - .long 0x76cc4000,0x3fc774dd - .long 0x8d3f5094,0x3d1ded36 - .long 0x5db00000,0x3fc79f50 - .long 0xdd7a0df9,0x3d3d105d - .long 0xde098000,0x3fc7bf3b - .long 0xf47b93c9,0x3d4f301f - .long 0xcac44000,0x3fc7e9e7 - .long 0x64ca2675,0xbd300eff - .long 0x49030000,0x3fc809fe - .long 0xa2382d7a,0xbd57f954 - .long 0x57998000,0x3fc82a27 - .long 0xa5427ebe,0xbd51a131 - .long 0xc6260000,0x3fc85525 - .long 0x18660d2c,0xbd4f67be - .long 0x79834000,0x3fc8757a - .long 0xe73d6696,0xbd53bc75 - .long 0x058d8000,0x3fc895e2 - .long 0x37dbd0a7,0x3d3c0532 - .long 0x37698000,0x3fc8c134 - .long 0x6534d35a,0xbd55670a - .long 0x12ef0000,0x3fc8e1c8 - .long 0x21fe7581,0x3d595f21 - .long 0x11218000,0x3fc9026f - .long 0xaefa5f2f,0x3d47e805 - .long 0x48888000,0x3fc92329 - .long 0xfa5a2c46,0x3d301501 - .long 0x4b834000,0x3fc94eea - .long 0x142e461b,0xbd361a29 - .long 0xb63a0000,0x3fc96fd1 - .long 0xe74e02a0,0xbd1fb7d8 - .long 0xa6620000,0x3fc990cc - .long 0x8c78b1e9,0x3d54d5fa - .long 0x33334000,0x3fc9b1db - .long 0xf104deb4,0x3d3085fd - .long 0x740e4000,0x3fc9d2fd - .long 0x4be3a88f,0x3d530348 - .long 0xeedc8000,0x3fc9ff49 - .long 0xe2bda395,0x3d5aa98b - .long 0x84fc0000,0x3fca209a - .long 0xb83b532a,0xbd580433 - .long 0x1e440000,0x3fca41ff - .long 0xada9a5e4,0xbd3fa98d - .long 0xd2cec000,0x3fca6377 - .long 0xe131e3b9,0xbd564407 - .long 0xbae0c000,0x3fca8504 - .long 0x018eb699,0x3d49f5f5 - .long 0xeeec0000,0x3fcaa6a5 - .long 0x1db03170,0xbd401d1e - .long 0x878d8000,0x3fcac85b - .long 0x09bf0cc9,0xbd2e1c0b - .long 0x9d900000,0x3fcaea25 - .long 0x1d013253,0xbd27d321 - .long 0x49eb4000,0x3fcb0c04 - .long 0x85567deb,0x3d36d506 - .long 0xa5c50000,0x3fcb2df7 - .long 0xe6dd603b,0x3d14c9cc - .long 0xca710000,0x3fcb4fff - .long 0x81ec1ae1,0xbd4b2ea2 - .long 0xd1714000,0x3fcb721c - .long 0xf660b9da,0x3d47e295 - .long 0xd4780000,0x3fcb944e - .long 0xa337b6c0,0xbd558993 - .long 0xed658000,0x3fcbb695 - .long 0x5395b891,0xbd51c199 - .long 0x364ac000,0x3fcbd8f2 - .long 0xa0feae19,0x3d560784 - .long 0xc96a0000,0x3fcbfb63 - .long 0xd6eafbe6,0xbd36014a - .long 0xc134c000,0x3fcc1dea - .long 0x84f72786,0x3d44e96e - .long 0x384f4000,0x3fcc4087 - .long 0x3f7c716e,0x3d3f006e - .long 0x498f0000,0x3fcc6339 - .long 0x93e69cea,0x3d33c317 - .long 0x0ffc0000,0x3fcc8601 - .long 0x7e3ccfb7,0x3d2dae5f - .long 0x065c4000,0x3fcc9d3d - .long 0xa7bafd57,0x3d4b4180 - .long 0x375b8000,0x3fccc029 - .long 0xfa45fc85,0x3d503cf7 - .long 0x6697c000,0x3fcce32b - .long 0xcc5fc3d0,0xbd5a2df8 - .long 0xafd54000,0x3fcd0643 - .long 0xf7c24bc7,0xbd55fdc6 - .long 0x2f0e0000,0x3fcd2972 - .long 0xc812d894,0xbd45bacd - .long 0x00710000,0x3fcd4cb7 - .long 0x2cb52790,0xbd0bc64a - .long 0xab3f8000,0x3fcd6446 - .long 0x8139913c,0x3d392b7b - .long 0xef71c000,0x3fcd87b0 - .long 0x822c4d80,0x3d4b449e - .long 0xd1fe8000,0x3fcdab31 - .long 0x4f09d1d4,0x3d49a698 - .long 0x6fdc8000,0x3fcdcec9 - .long 0x4231d353,0x3d311dde - .long 0x88764000,0x3fcde690 - .long 0x8e8f9b14,0xbd350c11 - .long 0x4a25c000,0x3fce0a4e - .long 0x1868dfd1,0x3d0ffb66 - .long 0x15754000,0x3fce2e23 - .long 0x6ad712e4,0x3d4e32b0 - .long 0x22d18000,0x3fce4613 - .long 0x75f8b410,0xbd4b758b - .long 0x95c78000,0x3fce6a0e - .long 0x94c67dc7,0xbd2e13dc - .long 0x6243c000,0x3fce8e21 - .long 0xf23f1279,0x3d4d600d - .long 0xf26e0000,0x3fcea63a - .long 0x668806d4,0x3cef1bb1 - .long 0xed160000,0x3fceca74 - .long 0xfe665305,0xbd4f489c - .long 0x92ccc000,0x3fceeec6 - .long 0x1d627f70,0x3d4259f1 - .long 0x36b8c000,0x3fcf070a - .long 0x714687e0,0x3d49c0c3 - .long 0x93e34000,0x3fcf2b83 - .long 0x5715356c,0x3d345a59 - .long 0xef53c000,0x3fcf5014 - .long 0xb6f783a8,0xbd5ad2b5 - .long 0x3af18000,0x3fcf6883 - .long 0x4bcc6e04,0x3d58bfdb - .long 0xd9f3c000,0x3fcf8d3c - .long 0xf63ab05d,0x3d58276d - .long 0x1add8000,0x3fcfa5c6 - .long 0x9beccf8d,0x3d43e926 - .long 0x567e8000,0x3fcfcaa8 - .long 0x362fdd81,0x3d5d3cfe - .long 0xc8744000,0x3fcfe34c - .long 0xc008381c,0xbd113e5f - .long 0xfd74e000,0x3fd0042b - .long 0x617c00f4,0x3d551936 - .long 0xf6a18000,0x3fd016bd - .long 0x52b01c58,0x3cd77bf6 - .long 0x2f906000,0x3fd02326 - .long 0x9269b5c5,0x3d53227c - .long 0xed8d4000,0x3fd035cc - .long 0x46d0dd58,0xbd4abd7e - .long 0x0e86a000,0x3fd04243 - .long 0x07af3e66,0xbcb117c1 - .long 0xc842c000,0x3fd04ebe - .long 0xa51b431d,0xbd4a401d - .long 0xe84fc000,0x3fd06182 - .long 0x4e2f0b29,0x3d54abd9 - .long 0xb609c000,0x3fd06e0c - .long 0xcd12a34d,0x3d538308 - .long 0x0bec8000,0x3fd080e6 - .long 0x7faf9c27,0x3d4e24d8 - .long 0x0d896000,0x3fd08d7e - .long 0xf5dd9bd9,0xbd58cad1 - .long 0xc96a2000,0x3fd0a06c - .long 0xb30ebd03,0x3cf56aec - .long 0x1f3b2000,0x3fd0ad13 - .long 0xf6264d3a,0x3d5c5508 - .long 0x71e78000,0x3fd0c017 - .long 0x801d3fff,0xbd440944 - .long 0x3cad8000,0x3fd0cccc - .long 0x8fd76450,0xbd50b4df - .long 0xd91a4000,0x3fd0d986 - .long 0xeca91a49,0xbd46ae31 - .long 0xb8860000,0x3fd0eca9 - .long 0x0cf1281c,0x3d5a2d53 - .long 0xf87fe000,0x3fd0f972 - .long 0x0e3b7b78,0x3d53d583 - .long 0x1cf0e000,0x3fd10642 - .long 0x36cc41d7,0x3d37dcbc - .long 0xebe28000,0x3fd11983 - .long 0x56ee7372,0x3d453935 - .long 0xe35b8000,0x3fd12661 - .long 0xf97392ab,0xbd3e990a - .long 0xd277a000,0x3fd13345 - .long 0xd681ef76,0xbd2625f2 - .long 0xf5974000,0x3fd146a6 - .long 0x4e1038a4,0xbd57c5c5 - .long 0xe81ea000,0x3fd15399 - .long 0xd5972106,0x3d407ab6 - .long 0xe5d3a000,0x3fd16092 - .long 0x74a3a2b7,0x3d434c04 - .long 0xc3b7a000,0x3fd17413 - .long 0xadcb10c6,0x3d46bb42 - .long 0xf629e000,0x3fd1811b - .long 0xc5305a70,0xbd420a8b - .long 0x47b46000,0x3fd18e2a - .long 0x61f0b069,0x3d3a17c8 - .long 0xbe1a4000,0x3fd19b3e - .long 0x9d0c4bc2,0x3d306106 - .long 0x017cc000,0x3fd1aee9 - .long 0xf7f8b601,0xbd475f35 - .long 0xed714000,0x3fd1bc0c - .long 0x4ef21e21,0xbd463c17 - .long 0x12abc000,0x3fd1c937 - .long 0x61c2e7a5,0x3d3ffdc5 - .long 0x77148000,0x3fd1d667 - .long 0xa4cb0170,0xbd260af0 - .long 0xd1286000,0x3fd1ea3b - .long 0xc64da380,0x3d4c38dc - .long 0xed934000,0x3fd1f77b - .long 0x11c5ddf7,0xbd53b3e4 - .long 0x5e1b0000,0x3fd204c2 - .long 0x7b28110e,0x3d28fa35 - .long 0x28ce8000,0x3fd2120f - .long 0x0bc856ad,0xbd564e99 - .long 0x53c4a000,0x3fd21f62 - .long 0xe0bb0bd9,0xbd52ff6c - .long 0xe51d6000,0x3fd22cbb - .long 0x9c33f19c,0x3d0531fc - .long 0x4c976000,0x3fd240ce - .long 0x4672ee85,0xbd4777b4 - .long 0xf8ece000,0x3fd24e37 - .long 0x8e29bedb,0xbd3461fa - .long 0x215b0000,0x3fd25ba8 - .long 0x2d8bf07a,0xbd4007bf - .long 0xcc2a0000,0x3fd2691e - .long 0xd592a8b0,0xbd4f7b1a - .long 0xffab4000,0x3fd2769b - .long 0x75f34cfe,0xbd520002 - .long 0xc2394000,0x3fd2841f - .long 0xf75ce6c1,0x3d52c96f - .long 0x1a384000,0x3fd291aa - .long 0x73fd8960,0x3d42f012 - .long 0x0e154000,0x3fd29f3b - .long 0xa111a5a3,0x3d584ad4 - .long 0xee47a000,0x3fd2b3a0 - .long 0x875f458c,0xbd2044f7 - .long 0x842c0000,0x3fd2c142 - .long 0xb02650df,0x3d43cbc1 - .long 0xccb7c000,0x3fd2ceea - .long 0xb6dc5d61,0xbd249ad3 - .long 0xce830000,0x3fd2dc99 - .long 0xfe13a4e3,0xbd0beb52 - .long 0x902fc000,0x3fd2ea4f - .long 0x4d1def58,0x3d57d999 - .long 0x186a2000,0x3fd2f80c - .long 0xb0baac1f,0x3d37f290 - .long 0x6de7c000,0x3fd305cf - .long 0x4343671c,0xbd4e1284 - .long 0x97684000,0x3fd31399 - .long 0x31df7b15,0xbd28c485 - .long 0x9bb5a000,0x3fd3216a - .long 0xc8a62d99,0xbd1838f8 - .long 0x81a3c000,0x3fd32f42 - .long 0x7ce7627b,0x3d4dfd72 - .long 0x50110000,0x3fd33d21 - .long 0x0c6b638c,0x3d023363 - .type __libm_log10l_table_256,@object - .size __libm_log10l_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1p_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1p_wmt.S deleted file mode 100644 index 1afd321182..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1p_wmt.S +++ /dev/null @@ -1,847 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log1p_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin log1p - .text - .align 16,0x90 - .globl log1p -log1p: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - xorpd %xmm3, %xmm3 - movl $32768, %ecx - movd %ecx, %xmm4 - movsd 2128(%ebx), %xmm5 - pshufd $68, %xmm0, %xmm7 - movapd %xmm2, %xmm6 - pextrw $3, %xmm0, %ecx - addsd %xmm2, %xmm0 - movapd %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - subsd %xmm0, %xmm6 - orpd %xmm2, %xmm0 - psllq $5, %xmm0 - psrlq $34, %xmm0 - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.3 - addsd %xmm6, %xmm7 - rcpss %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $228, %xmm5, %xmm6 - psrlq $12, %xmm1 - andl $32752, %ecx - cmpl $16256, %ecx - jb .L_2TAG_PACKET_1.0.3 - andl $32752, %eax - movl $32720, %ecx - subl %eax, %ecx - pinsrw $3, %ecx, %xmm3 -.L_2TAG_PACKET_2.0.3: - mulsd %xmm3, %xmm7 - paddd %xmm4, %xmm0 - xorpd %xmm4, %xmm4 - movl $14336, %ecx - pinsrw $3, %ecx, %xmm4 - orpd %xmm2, %xmm1 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm1, %xmm5 - andpd %xmm6, %xmm0 - subsd %xmm5, %xmm1 - paddd %xmm4, %xmm0 - mulsd %xmm0, %xmm5 - movl $16352, %ecx - subl %ecx, %eax - cvtsi2sdl %eax, %xmm4 - mulsd %xmm0, %xmm7 - mulsd %xmm0, %xmm1 - movsd 2064(%ebx), %xmm6 - movapd 2080(%ebx), %xmm3 - subsd %xmm2, %xmm5 - andl $16711680, %edx - shrl $12, %edx - movapd (%ebx,%edx), %xmm0 - movapd 2096(%ebx), %xmm2 - addsd %xmm5, %xmm1 - movapd %xmm1, %xmm5 - addsd %xmm7, %xmm1 - subsd %xmm1, %xmm5 - addsd %xmm5, %xmm7 - mulsd %xmm4, %xmm6 - mulsd 2072(%ebx), %xmm4 - mulsd %xmm1, %xmm3 - pshufd $68, %xmm1, %xmm5 - addsd %xmm6, %xmm0 - mulpd %xmm5, %xmm2 - mulpd %xmm5, %xmm5 - pshufd $228, %xmm0, %xmm6 - addsd %xmm1, %xmm0 - addpd 2112(%ebx), %xmm2 - mulpd %xmm5, %xmm3 - subsd %xmm0, %xmm6 - mulsd %xmm1, %xmm2 - addsd %xmm7, %xmm4 - mulsd %xmm1, %xmm7 - addsd %xmm6, %xmm1 - pshufd $238, %xmm0, %xmm6 - mulsd %xmm5, %xmm5 - addsd %xmm6, %xmm4 - subsd %xmm7, %xmm1 - addpd %xmm3, %xmm2 - addsd %xmm4, %xmm1 - mulpd %xmm5, %xmm2 - addsd %xmm2, %xmm1 - pshufd $238, %xmm2, %xmm5 - addsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_0.0.3: - movsd 112(%esp), %xmm0 - movapd %xmm0, %xmm1 - addl $16, %eax - cmpl $32768, %eax - jae .L_2TAG_PACKET_4.0.3 - cmpl $0, %eax - je .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_6.0.3: - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_7.0.3: - ja .L_2TAG_PACKET_6.0.3 - cmpl $0, %edx - ja .L_2TAG_PACKET_6.0.3 - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_4.0.3: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - addl %ecx, %ecx - cmpl $-2097152, %ecx - jae .L_2TAG_PACKET_7.0.3 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_8.0.3: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %eax - pinsrw $3, %eax, %xmm1 - movl $141, %edx - mulsd %xmm1, %xmm0 -.L_2TAG_PACKET_9.0.3: - movsd %xmm0, (%esp) - movsd 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_10.0.3 -.L_2TAG_PACKET_5.0.3: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $49136, %eax - pinsrw $3, %eax, %xmm0 - divsd %xmm1, %xmm0 - movl $140, %edx - jmp .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_1.0.3: - movsd 112(%esp), %xmm0 - cmpl $15504, %ecx - jb .L_2TAG_PACKET_11.0.3 - movapd 2144(%ebx), %xmm1 - pshufd $68, %xmm0, %xmm0 - movapd 2160(%ebx), %xmm2 - pshufd $68, %xmm0, %xmm4 - movapd 2176(%ebx), %xmm3 - mulpd %xmm0, %xmm1 - xorpd %xmm6, %xmm6 - mulpd %xmm4, %xmm4 - addpd %xmm2, %xmm1 - pshufd $68, %xmm4, %xmm5 - mulpd %xmm0, %xmm4 - movl $49120, %eax - pinsrw $3, %eax, %xmm6 - mulpd %xmm0, %xmm1 - mulsd %xmm4, %xmm4 - addpd %xmm3, %xmm1 - mulsd %xmm6, %xmm5 - mulpd %xmm4, %xmm1 - pshufd $238, %xmm1, %xmm7 - addsd %xmm7, %xmm1 - addsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_11.0.3: - cmpl $16, %ecx - jb .L_2TAG_PACKET_12.0.3 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_12.0.3: - movapd %xmm0, %xmm1 - mulsd %xmm1, %xmm1 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_3.0.3: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_10.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type log1p,@function - .size log1p,.-log1p - .data -# -- End log1p - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4277811200 - .long 1072049730 - .long 2479318832 - .long 1026487127 - .long 2854492160 - .long 1072033410 - .long 215631550 - .long 1025638968 - .long 1547061248 - .long 1072017216 - .long 2886781435 - .long 1026423395 - .long 649825280 - .long 1072001146 - .long 4281533405 - .long 1024038923 - .long 646346752 - .long 1071985198 - .long 1562735921 - .long 1023790276 - .long 2203734016 - .long 1071969370 - .long 1838397691 - .long 3173936209 - .long 1872169984 - .long 1071953661 - .long 3981202460 - .long 1022325013 - .long 669557760 - .long 1071938069 - .long 4182597802 - .long 3173174122 - .long 4076413952 - .long 1071922591 - .long 1209029111 - .long 3170736207 - .long 556125184 - .long 1071907228 - .long 821086028 - .long 3173437049 - .long 204914688 - .long 1071891976 - .long 2097025986 - .long 3171071798 - .long 387545088 - .long 1071876834 - .long 3142936996 - .long 3173092218 - .long 2912783360 - .long 1071861800 - .long 2502420140 - .long 1024505919 - .long 1144260608 - .long 1071846874 - .long 3315658140 - .long 3173469843 - .long 1471209472 - .long 1071832053 - .long 129621009 - .long 3172443877 - .long 1829683200 - .long 1071817336 - .long 3885467693 - .long 1025535275 - .long 288676864 - .long 1071802722 - .long 86139472 - .long 3171639793 - .long 3636378624 - .long 1071788208 - .long 1850238587 - .long 1024654342 - .long 1606817792 - .long 1071773795 - .long 3388899795 - .long 3173675586 - .long 1236164608 - .long 1071759480 - .long 3983599207 - .long 1020046558 - .long 1089616896 - .long 1071745262 - .long 4171974224 - .long 1024773198 - .long 4143093760 - .long 1071731139 - .long 2727587401 - .long 3173965207 - .long 600267776 - .long 1071717112 - .long 3147685042 - .long 3173353031 - .long 2249313280 - .long 1071703177 - .long 125835074 - .long 1025255832 - .long 3805303808 - .long 1071689334 - .long 2289991207 - .long 1025460331 - .long 87278592 - .long 1071675583 - .long 1106114045 - .long 1025933602 - .long 3195405312 - .long 1071661920 - .long 3885316576 - .long 3171206239 - .long 3853649920 - .long 1071648346 - .long 2977069852 - .long 3171236771 - .long 2944026624 - .long 1071625048 - .long 1008093493 - .long 1023444474 - .long 3993180160 - .long 1071598247 - .long 1862355595 - .long 1024642533 - .long 1454641152 - .long 1071571617 - .long 1514603089 - .long 1026500596 - .long 3286085632 - .long 1071545154 - .long 1400028424 - .long 3173279056 - .long 438773760 - .long 1071518858 - .long 120727864 - .long 3172148914 - .long 1212979200 - .long 1071492725 - .long 1625055594 - .long 3172901933 - .long 1189017600 - .long 1071466754 - .long 3920062376 - .long 1025727407 - .long 403064832 - .long 1071440943 - .long 1053271728 - .long 3171391427 - .long 3343210496 - .long 1071415289 - .long 3243395502 - .long 3173627613 - .long 1765777408 - .long 1071389792 - .long 2145968512 - .long 1026354304 - .long 461430784 - .long 1071364449 - .long 4094322285 - .long 1026021467 - .long 71706624 - .long 1071339258 - .long 763632021 - .long 1024496933 - .long 1380503552 - .long 1071314217 - .long 1383547992 - .long 3173088453 - .long 1015732224 - .long 1071289325 - .long 3198646877 - .long 1025390322 - .long 35977216 - .long 1071264580 - .long 2141026805 - .long 1025754693 - .long 3927306240 - .long 1071239979 - .long 282116272 - .long 3173394334 - .long 1125341184 - .long 1071215523 - .long 2768427504 - .long 3172279059 - .long 1666971648 - .long 1071191208 - .long 786837629 - .long 3172427445 - .long 2827694080 - .long 1071167033 - .long 3857122416 - .long 3173014241 - .long 2003683328 - .long 1071142997 - .long 859010954 - .long 1026545007 - .long 1004017664 - .long 1071119098 - .long 3356644970 - .long 3173458064 - .long 1753020416 - .long 1071095334 - .long 788338552 - .long 1026157693 - .long 1992718336 - .long 1071071704 - .long 1239179443 - .long 1026394889 - .long 3870234624 - .long 1071048206 - .long 2082614663 - .long 1024926053 - .long 1050437632 - .long 1071024840 - .long 660007840 - .long 1025548499 - .long 188395520 - .long 1071001603 - .long 3878792704 - .long 3173889571 - .long 3747176448 - .long 1070978493 - .long 144991708 - .long 3171552042 - .long 1405669376 - .long 1070955511 - .long 3999088879 - .long 1025486317 - .long 121151488 - .long 1070932654 - .long 2170865497 - .long 1026473584 - .long 2652319744 - .long 1070909920 - .long 453695652 - .long 3173916809 - .long 3262236672 - .long 1070887309 - .long 157800053 - .long 3173984206 - .long 601221120 - .long 1070864820 - .long 3968917661 - .long 1023992886 - .long 1999843328 - .long 1070842450 - .long 3053895004 - .long 1024998228 - .long 1992167424 - .long 1070820199 - .long 2968614856 - .long 1024552653 - .long 3788726272 - .long 1070798065 - .long 3542170808 - .long 3173573242 - .long 2094829568 - .long 1070776048 - .long 1246758132 - .long 1026202874 - .long 288675840 - .long 1070754146 - .long 3747328950 - .long 1026331585 - .long 1829681152 - .long 1070732357 - .long 3125197546 - .long 1024100318 - .long 1666869248 - .long 1070710681 - .long 1363656119 - .long 1026336493 - .long 3417110528 - .long 1070689116 - .long 4154791553 - .long 1026267853 - .long 2183653376 - .long 1070667662 - .long 1671819292 - .long 3173785870 - .long 1734434816 - .long 1070646317 - .long 373091049 - .long 1025972363 - .long 1615681536 - .long 1070625080 - .long 384650897 - .long 1022926043 - .long 1445382144 - .long 1070603950 - .long 344320330 - .long 3172397196 - .long 1823715328 - .long 1070569756 - .long 3389841200 - .long 1025231852 - .long 3839688704 - .long 1070527917 - .long 1706790417 - .long 3167363349 - .long 4293332992 - .long 1070486286 - .long 1614935088 - .long 1019351591 - .long 2966720512 - .long 1070444861 - .long 4145393717 - .long 3173711658 - .long 4066729984 - .long 1070403639 - .long 1974925028 - .long 3171437182 - .long 3337621504 - .long 1070362619 - .long 3314953170 - .long 3169971314 - .long 943448064 - .long 1070321799 - .long 1498682038 - .long 3173862340 - .long 1465634816 - .long 1070281176 - .long 1319952810 - .long 3171693965 - .long 1015734272 - .long 1070240749 - .long 1347821929 - .long 3173544515 - .long 118001664 - .long 1070200516 - .long 1751482746 - .long 1026134093 - .long 3707174912 - .long 1070160474 - .long 1486946159 - .long 1023930920 - .long 3946381312 - .long 1070120623 - .long 2867408081 - .long 3171368276 - .long 1699848192 - .long 1070080961 - .long 2590187139 - .long 1025379803 - .long 2235846656 - .long 1070041485 - .long 1888568069 - .long 3172754960 - .long 2339729408 - .long 1070002194 - .long 3852214753 - .long 3173323149 - .long 3196850176 - .long 1069963086 - .long 742141560 - .long 1025101707 - .long 1800683520 - .long 1069924160 - .long 3949500444 - .long 3172102179 - .long 3835801600 - .long 1069885413 - .long 3848895943 - .long 1025913832 - .long 2201202688 - .long 1069846845 - .long 1425913464 - .long 1025868665 - .long 2778279936 - .long 1069808453 - .long 2120889677 - .long 3173831128 - .long 2954203136 - .long 1069770236 - .long 592147081 - .long 1019621288 - .long 210141184 - .long 1069732193 - .long 3414275233 - .long 1023647084 - .long 709476352 - .long 1069694321 - .long 2413027164 - .long 1024462115 - .long 2116284416 - .long 1069656619 - .long 1144559924 - .long 1026336654 - .long 2183651328 - .long 1069619086 - .long 3459057650 - .long 1025634168 - .long 3047047168 - .long 1069581720 - .long 1879674924 - .long 3173508573 - .long 970711040 - .long 1069541521 - .long 1335954173 - .long 3173332182 - .long 2198478848 - .long 1069467449 - .long 2951103968 - .long 3173892200 - .long 1669611520 - .long 1069393703 - .long 531044147 - .long 1025149248 - .long 29114368 - .long 1069320280 - .long 3327831251 - .long 1025918673 - .long 2376949760 - .long 1069247176 - .long 737634533 - .long 3172176000 - .long 1085390848 - .long 1069174390 - .long 3108243400 - .long 3171828406 - .long 1566130176 - .long 1069101918 - .long 985483226 - .long 1025708380 - .long 792780800 - .long 1069029758 - .long 4184866295 - .long 1024426204 - .long 183156736 - .long 1068957907 - .long 2845699378 - .long 1022107277 - .long 1301782528 - .long 1068886362 - .long 1012735262 - .long 3173804294 - .long 1562411008 - .long 1068815121 - .long 2197086703 - .long 3170187813 - .long 2815549440 - .long 1068744181 - .long 2782613207 - .long 1026345054 - .long 2756124672 - .long 1068673540 - .long 2929486205 - .long 3173037800 - .long 3511050240 - .long 1068603195 - .long 1443733147 - .long 3173331549 - .long 3047047168 - .long 1068533144 - .long 1879674924 - .long 3172459997 - .long 3221667840 - .long 1068427825 - .long 1338588027 - .long 3171815742 - .long 3453861888 - .long 1068288883 - .long 1205348359 - .long 3172624626 - .long 3506110464 - .long 1068150514 - .long 893105198 - .long 1025571866 - .long 346013696 - .long 1068012714 - .long 3495569021 - .long 3172563349 - .long 4074029056 - .long 1067875476 - .long 3961106338 - .long 3171065595 - .long 3559784448 - .long 1067738798 - .long 1975385384 - .long 3173783155 - .long 797769728 - .long 1067602675 - .long 3760305787 - .long 1026047642 - .long 2313633792 - .long 1067467101 - .long 1559353171 - .long 1023480256 - .long 3960766464 - .long 1067213778 - .long 1067365107 - .long 1025865926 - .long 684261376 - .long 1066944805 - .long 844762164 - .long 3173687482 - .long 630718464 - .long 1066676905 - .long 2458269694 - .long 1024033081 - .long 1486061568 - .long 1066410070 - .long 115537874 - .long 3173243995 - .long 2743664640 - .long 1065886792 - .long 3665098304 - .long 3173471607 - .long 1971912704 - .long 1065357333 - .long 2577214440 - .long 3171993451 - .long 1498939392 - .long 1064306693 - .long 3409036923 - .long 1025599151 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 4277811200 - .long 1067855426 - .long 2479318832 - .long 1022292823 - .long 2454267026 - .long 1069697316 - .long 0 - .long 3218079744 - .long 1030730101 - .long 3217380702 - .long 1431655765 - .long 1070945621 - .long 2576980378 - .long 1070176665 - .long 0 - .long 3219128320 - .long 0 - .long 4294959104 - .long 0 - .long 4294959104 - .long 0 - .long 3217031168 - .long 2576980378 - .long 1070176665 - .long 2454267026 - .long 1069697316 - .long 0 - .long 3218079744 - .long 1431655765 - .long 3217380693 - .long 1431655765 - .long 1070945621 - .type static_const_table,@object - .size static_const_table,2192 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1pf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1pf_wmt.S deleted file mode 100644 index d1ebeb33bf..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1pf_wmt.S +++ /dev/null @@ -1,751 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log1pf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin log1pf - .text - .align 16,0x90 - .globl log1pf -log1pf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl $1065353216, %edx - movd %edx, %xmm1 - movl $16384, %ecx - movd %ecx, %xmm4 - movl $-32768, %eax - movd %eax, %xmm2 - xorpd %xmm3, %xmm3 - movl $16368, %edx - pinsrw $3, %edx, %xmm3 - xorpd %xmm5, %xmm5 - addss %xmm0, %xmm1 -.L_2TAG_PACKET_0.0.3: - movd %xmm0, %ecx - movd %xmm1, %edx - rcpss %xmm1, %xmm1 - movsd 2080(%ebx), %xmm7 - pshuflw $68, %xmm0, %xmm0 - paddd %xmm4, %xmm1 - andl $2147483647, %ecx - cmpl $864026624, %ecx - jb .L_2TAG_PACKET_1.0.3 - subl $8388608, %edx - cmpl $2113929216, %edx - jae .L_2TAG_PACKET_2.0.3 - andps %xmm1, %xmm2 - cvtps2pd %xmm0, %xmm0 - cvtps2pd %xmm2, %xmm1 - movd %xmm2, %eax - andl $-8388608, %edx - subl $1056964608, %edx - cvtsi2sdl %edx, %xmm6 - mulsd %xmm1, %xmm0 - subsd %xmm3, %xmm1 - subl $1056964608, %edx - addl %edx, %eax - shrl $12, %eax - movsd (%ebx,%eax), %xmm4 - addsd %xmm1, %xmm0 - movsd 2088(%ebx), %xmm2 - movsd 2096(%ebx), %xmm1 - mulsd %xmm0, %xmm7 - addsd %xmm0, %xmm5 - mulsd %xmm0, %xmm0 - mulsd %xmm2, %xmm6 - addsd %xmm7, %xmm1 - addsd %xmm4, %xmm5 - mulsd %xmm1, %xmm0 - addsd %xmm6, %xmm5 - addsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_2.0.3: - addl $8388608, %edx - js .L_2TAG_PACKET_4.0.3 - cmpl $0, %edx - je .L_2TAG_PACKET_5.0.3 - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_6.0.3 - movl $528482304, %eax - movd %eax, %xmm6 - movsd 2064(%ebx), %xmm5 - mulss %xmm6, %xmm0 - movss %xmm0, %xmm1 - jmp .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_6.0.3: - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_4.0.3: - cmpl $-2147483648, %edx - je .L_2TAG_PACKET_5.0.3 - addl %edx, %edx - cmpl $-16777216, %edx - ja .L_2TAG_PACKET_6.0.3 - xorps %xmm0, %xmm0 - divss %xmm0, %xmm0 - movl $143, %edx -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_1.0.3: - cmpl $8388608, %ecx - jb .L_2TAG_PACKET_9.0.3 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_9.0.3: - movss %xmm0, %xmm1 - mulss %xmm1, %xmm1 - jmp .L_2TAG_PACKET_3.0.3 -.L_2TAG_PACKET_5.0.3: - movl $-1082130432, %eax - movd %eax, %xmm0 - xorps %xmm1, %xmm1 - divss %xmm1, %xmm0 - movl $142, %edx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_3.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type log1pf,@function - .size log1pf,.-log1pf - .data -# -- End log1pf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4277811695 - .long 1072049730 - .long 4099377379 - .long 1072041554 - .long 2854492448 - .long 1072033410 - .long 3783013829 - .long 1072025297 - .long 1547061728 - .long 1072017216 - .long 3705668804 - .long 1072009165 - .long 649825382 - .long 1072001146 - .long 4257004898 - .long 1071993156 - .long 646346839 - .long 1071985198 - .long 1718090839 - .long 1071977269 - .long 2203733529 - .long 1071969370 - .long 1140698018 - .long 1071961501 - .long 1872170015 - .long 1071953661 - .long 3457002416 - .long 1071945850 - .long 669557459 - .long 1071938069 - .long 1179420986 - .long 1071930316 - .long 4076413893 - .long 1071922591 - .long 4165410145 - .long 1071914895 - .long 556124819 - .long 1071907228 - .long 957937516 - .long 1071899588 - .long 204914613 - .long 1071891976 - .long 1730507025 - .long 1071884391 - .long 387544807 - .long 1071876834 - .long 3922939863 - .long 1071869303 - .long 2912783494 - .long 1071861800 - .long 826988438 - .long 1071854324 - .long 1144260235 - .long 1071846874 - .long 3057005434 - .long 1071839450 - .long 1471209283 - .long 1071832053 - .long 4186184763 - .long 1071824681 - .long 1829683463 - .long 1071817336 - .long 2217517956 - .long 1071810016 - .long 288676754 - .long 1071802722 - .long 3875016090 - .long 1071795452 - .long 3636378776 - .long 1071788208 - .long 3125257108 - .long 1071780989 - .long 1606817369 - .long 1071773795 - .long 2648729924 - .long 1071766625 - .long 1236164615 - .long 1071759480 - .long 951558972 - .long 1071752359 - .long 1089617062 - .long 1071745262 - .long 952179194 - .long 1071738189 - .long 4143093266 - .long 1071731139 - .long 1388251237 - .long 1071724114 - .long 600267432 - .long 1071717112 - .long 1108583542 - .long 1071710133 - .long 2249313505 - .long 1071703177 - .long 3365155278 - .long 1071696244 - .long 3805304058 - .long 1071689334 - .long 2925366939 - .long 1071682447 - .long 87278952 - .long 1071675583 - .long 3249155078 - .long 1071668740 - .long 3195405229 - .long 1071661920 - .long 3601425396 - .long 1071655122 - .long 3853649835 - .long 1071648346 - .long 2393914686 - .long 1071638513 - .long 2944026756 - .long 1071625048 - .long 3870651933 - .long 1071611626 - .long 3993180461 - .long 1071598247 - .long 2142264402 - .long 1071584911 - .long 1454642149 - .long 1071571617 - .long 783063308 - .long 1071558365 - .long 3286084979 - .long 1071545154 - .long 3543033726 - .long 1071531985 - .long 438773454 - .long 1071518858 - .long 1458540784 - .long 1071505771 - .long 1212978710 - .long 1071492725 - .long 2912845216 - .long 1071479719 - .long 1189018219 - .long 1071466754 - .long 3567208110 - .long 1071453828 - .long 403064643 - .long 1071440943 - .long 3536762435 - .long 1071428096 - .long 3343209673 - .long 1071415289 - .long 3091669954 - .long 1071402521 - .long 1765778334 - .long 1071389792 - .long 2653362897 - .long 1071377101 - .long 461431547 - .long 1071364449 - .long 2790898835 - .long 1071351834 - .long 71706889 - .long 1071339258 - .long 4217424686 - .long 1071326718 - .long 1380502992 - .long 1071314217 - .long 3491778671 - .long 1071301752 - .long 1015732707 - .long 1071289325 - .long 1605095660 - .long 1071276934 - .long 35977849 - .long 1071264580 - .long 3977575844 - .long 1071252261 - .long 3927305531 - .long 1071239979 - .long 3275478714 - .long 1071227733 - .long 1125340846 - .long 1071215523 - .long 882913881 - .long 1071203348 - .long 1666971274 - .long 1071191208 - .long 2603916163 - .long 1071179103 - .long 2827693557 - .long 1071167033 - .long 1479703759 - .long 1071154998 - .long 2003684347 - .long 1071142997 - .long 3555691467 - .long 1071131030 - .long 1004016924 - .long 1071119098 - .long 2108975630 - .long 1071107199 - .long 1753021246 - .long 1071095334 - .long 3415503221 - .long 1071083502 - .long 1992719281 - .long 1071071704 - .long 977707388 - .long 1071059939 - .long 3870234994 - .long 1071048206 - .long 1291822077 - .long 1071036507 - .long 1050438164 - .long 1071024840 - .long 2370625547 - .long 1071013205 - .long 188394569 - .long 1071001603 - .long 2331021804 - .long 1070990032 - .long 3747176240 - .long 1070978493 - .long 3686719393 - .long 1070966986 - .long 1405669883 - .long 1070955511 - .long 461103529 - .long 1070944067 - .long 121152472 - .long 1070932654 - .long 3954874384 - .long 1070921271 - .long 2652318780 - .long 1070909920 - .long 4089234463 - .long 1070898599 - .long 3262235675 - .long 1070887309 - .long 3763576649 - .long 1070876049 - .long 601221319 - .long 1070864820 - .long 1673619518 - .long 1070853620 - .long 1999843716 - .long 1070842450 - .long 899399508 - .long 1070831310 - .long 1992167703 - .long 1070820199 - .long 313445281 - .long 1070809118 - .long 3788725476 - .long 1070798065 - .long 3168871046 - .long 1070787042 - .long 2094830420 - .long 1070776048 - .long 4212681596 - .long 1070765082 - .long 288676754 - .long 1070754146 - .long 2568927817 - .long 1070743237 - .long 1829681364 - .long 1070732357 - .long 1737005556 - .long 1070721505 - .long 1666870165 - .long 1070710681 - .long 1000063738 - .long 1070699885 - .long 3417111411 - .long 1070689116 - .long 4013324163 - .long 1070678375 - .long 2183652476 - .long 1070667662 - .long 1622638721 - .long 1070656976 - .long 1734435555 - .long 1070646317 - .long 1927726804 - .long 1070635685 - .long 1615681634 - .long 1070625080 - .long 215909304 - .long 1070614502 - .long 1445381777 - .long 1070603950 - .long 870975437 - .long 1070590754 - .long 1823716217 - .long 1070569756 - .long 323875369 - .long 1070548811 - .long 3839688678 - .long 1070527917 - .long 2667883253 - .long 1070507076 - .long 4293333010 - .long 1070486286 - .long 3324205749 - .long 1070465548 - .long 2966718784 - .long 1070444861 - .long 2140157205 - .long 1070424225 - .long 4066729595 - .long 1070403639 - .long 3386588242 - .long 1070383104 - .long 3337621361 - .long 1070362619 - .long 2870475188 - .long 1070342184 - .long 943446189 - .long 1070321799 - .long 817374162 - .long 1070301463 - .long 1465634365 - .long 1070281176 - .long 1869032404 - .long 1070260938 - .long 1015732707 - .long 1070240749 - .long 2196155141 - .long 1070220608 - .long 118003300 - .long 1070200516 - .long 2381031992 - .long 1070180471 - .long 3707175295 - .long 1070160474 - .long 3120348377 - .long 1070140525 - .long 3946380940 - .long 1070120623 - .long 928049556 - .long 1070100769 - .long 1699849154 - .long 1070080961 - .long 1018125008 - .long 1070061200 - .long 2235845747 - .long 1070041485 - .long 122671437 - .long 1070021817 - .long 2339728060 - .long 1070002194 - .long 3669742467 - .long 1069982617 - .long 3196851002 - .long 1069963086 - .long 11572342 - .long 1069943601 - .long 1800682930 - .long 1069924160 - .long 3372322013 - .long 1069904764 - .long 3835803021 - .long 1069885413 - .long 2306589128 - .long 1069866107 - .long 2201204065 - .long 1069846845 - .long 2647241692 - .long 1069827627 - .long 2778278092 - .long 1069808453 - .long 1733817001 - .long 1069789323 - .long 2954203158 - .long 1069770236 - .long 1295667077 - .long 1069751193 - .long 210141498 - .long 1069732193 - .long 3155274661 - .long 1069713235 - .long 709476866 - .long 1069694321 - .long 636640577 - .long 1069675449 - .long 2116286250 - .long 1069656619 - .long 38479793 - .long 1069637832 - .long 2183652476 - .long 1069619086 - .long 3452748429 - .long 1069600382 - .long 3047045639 - .long 1069581720 - .long 173141005 - .long 1069563100 - .long 970708326 - .long 1069541521 - .long 2106590683 - .long 1069504444 - .long 2198475040 - .long 1069467449 - .long 3996141691 - .long 1069430535 - .long 1669613218 - .long 1069393703 - .long 2283901796 - .long 1069356951 - .long 29117219 - .long 1069320280 - .long 1990183441 - .long 1069283688 - .long 2376948508 - .long 1069247176 - .long 3998935692 - .long 1069210743 - .long 1085389880 - .long 1069174390 - .long 760030536 - .long 1069138115 - .long 1566132617 - .long 1069101918 - .long 2056379433 - .long 1069065799 - .long 792781808 - .long 1069029758 - .long 641565395 - .long 1068993794 - .long 183156961 - .long 1068957907 - .long 2302040698 - .long 1068922096 - .long 1301778891 - .long 1068886362 - .long 84804484 - .long 1068850704 - .long 1562410668 - .long 1068815121 - .long 64741293 - .long 1068779614 - .long 2815553124 - .long 1068744181 - .long 4162338635 - .long 1068708823 - .long 2756122533 - .long 1068673540 - .long 1551389854 - .long 1068638331 - .long 3511047527 - .long 1068603195 - .long 3016419377 - .long 1068568133 - .long 3047045639 - .long 1068533144 - .long 296456961 - .long 1068497513 - .long 3221665916 - .long 1068427825 - .long 3697798734 - .long 1068358282 - .long 3453858508 - .long 1068288883 - .long 4234736672 - .long 1068219627 - .long 3506114812 - .long 1068150514 - .long 3044269692 - .long 1068081543 - .long 346010435 - .long 1068012714 - .long 1513453498 - .long 1067944025 - .long 4074027864 - .long 1067875476 - .long 1275317999 - .long 1067807068 - .long 3559777258 - .long 1067738798 - .long 4204867691 - .long 1067670667 - .long 797775935 - .long 1067602675 - .long 3825228429 - .long 1067534819 - .long 2313634884 - .long 1067467101 - .long 672386641 - .long 1067348671 - .long 3960777458 - .long 1067213778 - .long 1220920383 - .long 1067079157 - .long 684247743 - .long 1066944805 - .long 2020150230 - .long 1066810721 - .long 630721729 - .long 1066676905 - .long 535440936 - .long 1066543355 - .long 1486051399 - .long 1066410070 - .long 2227658502 - .long 1066152307 - .long 2743640746 - .long 1065886792 - .long 4184355568 - .long 1065621801 - .long 1971904113 - .long 1065357333 - .long 341338964 - .long 1064833554 - .long 1498975029 - .long 1064306693 - .long 1440057502 - .long 1063257089 - .long 0 - .long 0 - .long 0 - .long 0 - .long 4277811695 - .long 1078341186 - .long 4277811695 - .long 3225824834 - .long 1431655765 - .long 1070945621 - .long 4277811695 - .long 1047932482 - .long 1107282704 - .long 3219128321 - .long 4277811695 - .long 1047932482 - .type static_const_table,@object - .size static_const_table,2112 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1pl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1pl.S deleted file mode 100644 index 16d16a844d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log1pl.S +++ /dev/null @@ -1,949 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log1pl.c" - .text -..TXTST0: -# -- Begin log1pl - .text - .align 16,0x90 - .globl log1pl -log1pl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %edi - pushl %ebx - subl $56, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - movl %eax, %edx - movzwl 16(%ebp), %edi - shll $15, %edx - andl $32767, %edi - orl %edi, %edx - shll $16, %edx - movzwl 14(%ebp), %ecx - orl %ecx, %edx - movzwl 14(%esp), %ebx - cmpl $32767, %edi - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - je ..B1.78 -..B1.4: - cmpl $-1073774592, %edx - jae ..B1.57 -..B1.5: - cmpl $16379, %edi - jge ..B1.47 -..B1.6: - cmpl $16369, %edi - jge ..B1.40 -..B1.7: - cmpl $16358, %edi - jge ..B1.33 -..B1.8: - cmpl $16345, %edi - jge ..B1.26 -..B1.9: - cmpl $16308, %edi - jge ..B1.19 -..B1.10: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.71 -..B1.11: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.12: - fldcw 12(%esp) -..B1.13: - movzwl 16(%ebp), %edi - movl $1, %edx - andl $32767, %edi -..B1.14: - testl %edi, %edi - jle ..B1.67 -..B1.15: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ecx) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fmul %st(1), %st - fxch %st(1) - fmull _ones@GOTOFF(%ecx,%eax,8) - fsubrp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ecx) - fstpt 16(%esp) -..B1.16: - testl %edx, %edx - je ..B1.18 -..B1.17: - fldcw 14(%esp) -..B1.18: - fldt 16(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.72 -..B1.20: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.21: - fldcw 12(%esp) -..B1.22: - movl $1, %eax -..B1.23: - fldt 8(%ebp) - testl %eax, %eax - fldt _Q3@GOTOFF(%ecx) - fmul %st(1), %st - fmul %st(1), %st - fadd %st(1), %st - fstpt 16(%esp) - fldl _TWO_75@GOTOFF(%ecx) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%esp) - je ..B1.25 -..B1.24: - fldcw 14(%esp) -..B1.25: - fldt 16(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.73 -..B1.27: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.28: - fldcw 12(%esp) -..B1.29: - movl $1, %eax -..B1.30: - fldt 8(%ebp) - testl %eax, %eax - fldt 12+_Q2@GOTOFF(%ecx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.32 -..B1.31: - fldcw 14(%esp) -..B1.32: - fldt 16(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.33: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.74 -..B1.34: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.35: - fldcw 12(%esp) -..B1.36: - movl $1, %eax -..B1.37: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%ecx) - fmul %st(1), %st - fldt 12+_Q1@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%ecx) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.39 -..B1.38: - fldcw 14(%esp) -..B1.39: - fldt 16(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.40: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.75 -..B1.41: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.42: - fldcw 12(%esp) -..B1.43: - movl $1, %eax -..B1.44: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fld %st(1) - fld %st(2) - fldl _TWO_52H@GOTOFF(%ecx) - fmul %st(4), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fmul %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fxch %st(3) - fstpt 32(%esp) - fldt 32(%esp) - fmul %st(0), %st - fadd %st, %st(3) - fldt 156+_Q@GOTOFF(%ecx) - fmul %st(4), %st - fldt 132+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 108+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 84+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 60+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 36+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 12+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 144+_Q@GOTOFF(%ecx) - fmul %st(5), %st - fldt 120+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 96+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 72+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 48+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 24+_Q@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(5) - fld %st(2) - fldt _Q@GOTOFF(%ecx) - faddp %st, %st(6) - fxch %st(5) - fmul %st(6), %st - faddp %st, %st(1) - fldt 180+_Q@GOTOFF(%ecx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(3) - fmulp %st, %st(1) - fldt 168+_Q@GOTOFF(%ecx) - fld %st(0) - fmul %st(3), %st - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(5) - fldt 32(%esp) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fmul %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.46 -..B1.45: - fldcw 14(%esp) -..B1.46: - fldt 16(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.47: - movl %ebx, %edi - andl $768, %edi - cmpl $768, %edi - je ..B1.76 -..B1.48: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.49: - fldcw 12(%esp) -..B1.50: - movzbl 17(%ebp), %eax - movl $1, %ebx - andl $128, %eax - shrl $7, %eax -..B1.51: - cmpl ranges@GOTOFF(%ecx,%eax,4), %edx - jae ..B1.53 -..B1.52: - fldt 8(%ebp) - xorl %edx, %edx - movzwl 16(%ebp), %edi - fld %st(0) - fldl _ones@GOTOFF(%ecx) - andl $32767, %edi - addl $-16415, %edi - fstpt 16(%esp) - setl %dl - fldl _shifters@GOTOFF(%ecx,%edx,8) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - faddl zero_one@GOTOFF(%ecx,%edx,8) - xorl $1, %edx - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(1) - faddl zero_one@GOTOFF(%ecx,%edx,8) - movzwl 24(%esp), %edx - fadd %st, %st(1) - fxch %st(1) - fstpt 8(%ebp) - andl $-32768, %edx - movzwl 16(%ebp), %eax - andl $32767, %eax - movl %eax, %edi - addl $-16383, %eax - negl %edi - addl $-2, %edi - andl $32767, %edi - orl %edi, %edx - movl 12(%ebp), %edi - shrl $23, %edi - andl $255, %edi - movw %dx, 24(%esp) - fldt 16(%esp) - fmuls __libm_rcp_table_256@GOTOFF(%ecx,%edi,4) - jmp ..B1.54 -..B1.53: - fldt 8(%ebp) - fldl _TWO_32H@GOTOFF(%ecx) - fxch %st(1) - faddl zero_one@GOTOFF(%ecx,%eax,8) - fstpt 8(%ebp) - movzwl 16(%ebp), %edx - movl %edx, %eax - andl $-32768, %edx - andl $32767, %eax - orl $-49153, %edx - addl $-16383, %eax - movw %dx, 16(%ebp) - fldt 8(%ebp) - fld %st(0) - movl 12(%ebp), %edi - fadd %st(2), %st - shrl $23, %edi - fsubp %st, %st(2) - andl $255, %edi - fsub %st(1), %st - fxch %st(1) - fstpt 32(%esp) - flds __libm_rcp_table_256@GOTOFF(%ecx,%edi,4) -..B1.54: - fldt 32(%esp) - fmul %st(1), %st - fxch %st(2) - fmulp %st, %st(1) - fxch %st(1) - faddl 8+_ones@GOTOFF(%ecx) - fld %st(0) - movl %eax, 16(%esp) - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fildl 16(%esp) - fldt 60+_P@GOTOFF(%ecx) - fmul %st(3), %st - fldt 36+_P@GOTOFF(%ecx) - shll $4, %edi - faddp %st, %st(1) - fmul %st(3), %st - testl %ebx, %ebx - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fmulp %st, %st(2) - fldt 48+_P@GOTOFF(%ecx) - fmul %st(3), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(3), %st - fldt _P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.0@GOTOFF(%ecx) - fmul %st(1), %st - fldt .L_2il0floatpacket.1@GOTOFF(%ecx) - fmulp %st, %st(2) - faddl 8+__libm_logl_table_256@GOTOFF(%ecx,%edi) - faddp %st, %st(3) - faddl __libm_logl_table_256@GOTOFF(%edi,%ecx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%esp) - je ..B1.56 -..B1.55: - fldcw 14(%esp) -..B1.56: - fldt 32(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.57: - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.77 -..B1.58: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.59: - fldcw 12(%esp) -..B1.60: - movl $1, %edx -..B1.61: - fldl 8+_ones@GOTOFF(%ecx) - fstpt 16(%esp) - fldt 16(%esp) - fldl _zeros@GOTOFF(%ecx) - fldt 8(%ebp) - fucomp %st(2) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - jp ..B1.62 - je ..B1.63 -..B1.62: - fldl _infs@GOTOFF(%ecx) - fmulp %st, %st(1) - fstpt 16(%esp) - jmp ..B1.64 -..B1.63: - fldt 16(%esp) - fdivp %st, %st(1) - fstpt 16(%esp) -..B1.64: - testl %edx, %edx - je ..B1.66 -..B1.65: - fldcw 14(%esp) -..B1.66: - fldt 16(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.67: - cmpl $0, 12(%ebp) - jne ..B1.69 -..B1.68: - cmpl $0, 8(%ebp) - je ..B1.70 -..B1.69: - fldt _small_value_80@GOTOFF(%ecx) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fmul %st(0), %st - fstpt (%esp) - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ecx) - fmul %st(1), %st - fxch %st(1) - fmull _ones@GOTOFF(%ecx,%eax,8) - fsubrp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ecx) - fstpt 16(%esp) - jmp ..B1.16 -..B1.70: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.16 -..B1.71: - xorl %edx, %edx - jmp ..B1.14 -..B1.72: - xorl %eax, %eax - jmp ..B1.23 -..B1.73: - xorl %eax, %eax - jmp ..B1.30 -..B1.74: - xorl %eax, %eax - jmp ..B1.37 -..B1.75: - xorl %eax, %eax - jmp ..B1.44 -..B1.76: - xorl %ebx, %ebx - jmp ..B1.51 -..B1.77: - xorl %edx, %edx - jmp ..B1.61 -..B1.78: - movl %ebx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.90 -..B1.79: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.80: - fldcw 12(%esp) -..B1.81: - movzbl 17(%ebp), %eax - movl $1, %edx - andl $128, %eax - shrl $7, %eax -..B1.82: - testl %eax, %eax - je ..B1.85 -..B1.83: - cmpl $-2147483648, 12(%ebp) - jne ..B1.85 -..B1.84: - cmpl $0, 8(%ebp) - je ..B1.89 -..B1.85: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ecx) - fstpt 16(%esp) -..B1.86: - testl %edx, %edx - je ..B1.88 -..B1.87: - fldcw 14(%esp) -..B1.88: - fldt 16(%esp) - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret -..B1.89: - fldl _infs@GOTOFF(%ecx) - fmull _zeros@GOTOFF(%ecx) - fstpt 16(%esp) - jmp ..B1.86 -..B1.90: - xorl %edx, %edx - jmp ..B1.82 - .align 16,0x90 - .type log1pl,@function - .size log1pl,.-log1pl - .data -# -- End log1pl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 8 -zero_one: - .long 0x00000000,0x00000000 - .long 0x00000000,0x3ff00000 - .type zero_one,@object - .size zero_one,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -ranges: - .long 1078558720 - .long 3221127168 - .type ranges,@object - .size ranges,8 - .align 4 -_shifters: - .long 0 - .long 1098383360 - .long 0 - .long 1123549184 - .type _shifters,@object - .size _shifters,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_Q3: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 4096 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 53521 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 65509 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 43631 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 43680 - .word 43690 - .word 6 - .word 32768 - .word 49149 - .word 0 - .word 60885 - .word 52536 - .word 52444 - .word 52428 - .word 16380 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 14363 - .word 62279 - .word 27629 - .word 62293 - .word 49080 - .word 0 - .word 44555 - .word 43690 - .word 43690 - .word 43690 - .word 16369 - .word 0 - .word 64968 - .word 65535 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 50395 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 39590 - .word 43714 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 15749 - .word 18782 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 61040 - .word 7204 - .word 65535 - .word 65535 - .word 49147 - .word 0 - .word 10454 - .word 61175 - .word 14561 - .word 58254 - .word 16379 - .word 0 - .word 57771 - .word 22430 - .word 52985 - .word 52428 - .word 49147 - .word 0 - .word 7036 - .word 15828 - .word 36565 - .word 47662 - .word 16379 - .word 0 - .word 17194 - .word 46991 - .word 54030 - .word 43687 - .word 49147 - .word 0 - .word 63541 - .word 11931 - .word 21910 - .word 40326 - .word 16379 - .word 0 - .word 36457 - .word 1697 - .word 61895 - .word 37932 - .word 49147 - .word 0 - .word 65454 - .word 16107 - .word 6024 - .word 35469 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16381 - .word 0 - .type _Q,@object - .size _Q,192 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .type _P,@object - .size _P,72 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2_wmt.S deleted file mode 100644 index 4033738373..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2_wmt.S +++ /dev/null @@ -1,808 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log2_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin log2 - .text - .align 16,0x90 - .globl log2 -log2: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movl $1069088768, %ecx - movd %ecx, %xmm7 - xorpd %xmm3, %xmm3 - movl $30704, %edx - pinsrw $3, %edx, %xmm3 - movsd 112(%esp), %xmm0 - movapd %xmm0, %xmm1 - movl $32768, %edx - movd %edx, %xmm4 - movapd 2112(%ebx), %xmm5 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $16352, %ecx - psllq $5, %xmm0 - movsd 2128(%ebx), %xmm2 - psrlq $34, %xmm0 - rcpss %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $78, %xmm5, %xmm6 - psrlq $12, %xmm1 - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - mulss %xmm7, %xmm0 - orpd %xmm3, %xmm1 - andpd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - subsd %xmm5, %xmm1 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm6, %xmm0 - andl $32752, %eax - subl %ecx, %eax - sarl $4, %eax - cvtsi2sdl %eax, %xmm7 - mulpd %xmm0, %xmm5 - mulsd %xmm0, %xmm1 - movapd 2064(%ebx), %xmm3 - subsd %xmm2, %xmm5 - andl $16711680, %edx - shrl $12, %edx - movapd -912(%ebx,%edx), %xmm0 - movapd 2080(%ebx), %xmm4 - addsd %xmm5, %xmm1 - movapd 2096(%ebx), %xmm2 - movsd 2136(%ebx), %xmm6 - pshufd $68, %xmm1, %xmm5 - mulsd %xmm1, %xmm3 - addsd %xmm7, %xmm0 - mulpd %xmm5, %xmm4 - mulpd %xmm5, %xmm5 - addpd %xmm2, %xmm4 - mulpd %xmm5, %xmm3 - pshufd $228, %xmm0, %xmm7 - addsd %xmm1, %xmm0 - mulsd %xmm1, %xmm4 - subsd %xmm0, %xmm7 - mulsd %xmm1, %xmm6 - addsd %xmm7, %xmm1 - pshufd $238, %xmm0, %xmm2 - mulsd %xmm5, %xmm5 - addsd %xmm6, %xmm1 - addpd %xmm3, %xmm4 - addsd %xmm2, %xmm1 - mulpd %xmm5, %xmm4 - addsd %xmm4, %xmm1 - pshufd $238, %xmm4, %xmm5 - addsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - movsd 112(%esp), %xmm0 - movapd %xmm0, %xmm1 - addl $16, %eax - cmpl $32768, %eax - jae .L_2TAG_PACKET_3.0.3 - cmpl $16, %eax - jb .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_5.0.3: - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - ja .L_2TAG_PACKET_5.0.3 - cmpl $0, %edx - ja .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_3.0.3: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - addl %ecx, %ecx - cmpl $-2097152, %ecx - jae .L_2TAG_PACKET_6.0.3 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_7.0.3: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %eax - pinsrw $3, %eax, %xmm1 - movl $171, %edx - mulsd %xmm1, %xmm0 -.L_2TAG_PACKET_9.0.3: - movsd %xmm0, (%esp) - movsd 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_10.0.3 -.L_2TAG_PACKET_8.0.3: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $49136, %eax - pinsrw $3, %eax, %xmm0 - divsd %xmm1, %xmm0 - movl $170, %edx - jmp .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_4.0.3: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_8.0.3 - xorpd %xmm1, %xmm1 - movl $18416, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movapd %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $18416, %ecx - psllq $5, %xmm0 - movsd 2128(%ebx), %xmm2 - psrlq $34, %xmm0 - rcpss %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $78, %xmm5, %xmm6 - psrlq $12, %xmm1 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_10.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type log2,@function - .size log2,.-log2 - .data -# -- End log2 - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 3065110528 - .long 1072676937 - .long 969155058 - .long 1027421928 - .long 3789631488 - .long 1072660714 - .long 1061361078 - .long 1026032326 - .long 2461925376 - .long 1072644578 - .long 1624763829 - .long 3175910818 - .long 3729080320 - .long 1072628527 - .long 1845599454 - .long 1028591843 - .long 3710689280 - .long 1072612561 - .long 3776236642 - .long 1025648432 - .long 2882404352 - .long 1072596679 - .long 3683226528 - .long 3174591570 - .long 1779716096 - .long 1072580880 - .long 1916484889 - .long 3173934989 - .long 996708352 - .long 1072565163 - .long 716999656 - .long 3175673444 - .long 1184837632 - .long 1072549527 - .long 1973599317 - .long 3174949482 - .long 3051761664 - .long 1072533971 - .long 1437348984 - .long 1028530411 - .long 3065225216 - .long 1072518495 - .long 1219343899 - .long 1028525753 - .long 2041864192 - .long 1072503098 - .long 388496599 - .long 3175919551 - .long 851140608 - .long 1072487779 - .long 2822909360 - .long 3173772990 - .long 414302208 - .long 1072472537 - .long 1306322068 - .long 1026235748 - .long 1703325696 - .long 1072457371 - .long 1651655805 - .long 3174368281 - .long 1444937728 - .long 1072442281 - .long 1145646243 - .long 3175573309 - .long 709566464 - .long 1072427266 - .long 3608295147 - .long 3168585112 - .long 615415808 - .long 1072412325 - .long 2957847316 - .long 1027961637 - .long 2327523328 - .long 1072397457 - .long 3266875511 - .long 3175163169 - .long 2761863168 - .long 1072382662 - .long 3329930550 - .long 1027790656 - .long 3174416384 - .long 1072367939 - .long 3349298596 - .long 3172501429 - .long 570335232 - .long 1072353288 - .long 905028281 - .long 3175970581 - .long 588005376 - .long 1072338707 - .long 40558280 - .long 1022275054 - .long 318357504 - .long 1072324196 - .long 3000963593 - .long 3175644723 - .long 1188933632 - .long 1072309754 - .long 1152643439 - .long 3171407768 - .long 373186560 - .long 1072295381 - .long 3440409283 - .long 3174861647 - .long 3674587136 - .long 1072281075 - .long 1985407462 - .long 1026124611 - .long 4051050496 - .long 1072266837 - .long 2734481544 - .long 1026856954 - .long 3089022976 - .long 1072252666 - .long 3365453112 - .long 1028135364 - .long 2412838912 - .long 1072238561 - .long 1203709499 - .long 3175656792 - .long 3683999744 - .long 1072224521 - .long 4237943120 - .long 3176014210 - .long 10571776 - .long 1072210547 - .long 1358548904 - .long 3174161579 - .long 1716314112 - .long 1072196636 - .long 1192519078 - .long 3175777045 - .long 1980272640 - .long 1072182789 - .long 1567013979 - .long 3174472130 - .long 2605957120 - .long 1072169005 - .long 1671600287 - .long 1028158963 - .long 1135812608 - .long 1072155284 - .long 1547709291 - .long 3174179085 - .long 3735490560 - .long 1072141624 - .long 2225392115 - .long 1027056729 - .long 3718443008 - .long 1072128026 - .long 3797315894 - .long 3175978381 - .long 3020144640 - .long 1072114489 - .long 569231379 - .long 3176080301 - .long 3607605248 - .long 1072101012 - .long 2931542967 - .long 1028585043 - .long 3183849472 - .long 1072087595 - .long 1779595699 - .long 1025078612 - .long 3777277952 - .long 1072074237 - .long 3836888569 - .long 3176101128 - .long 3151212544 - .long 1072060938 - .long 4204238866 - .long 1027628024 - .long 3393323008 - .long 1072047697 - .long 3590952967 - .long 1024914744 - .long 2325151744 - .long 1072034514 - .long 2081953065 - .long 1024436445 - .long 2091569152 - .long 1072021388 - .long 1869579321 - .long 3176039801 - .long 570331136 - .long 1072008319 - .long 1169272038 - .long 1028145343 - .long 4256530432 - .long 1071995305 - .long 3897289024 - .long 3171837174 - .long 2492289024 - .long 1071982348 - .long 3892405903 - .long 3175484647 - .long 1826058240 - .long 1071969446 - .long 4079999923 - .long 3175326622 - .long 242364416 - .long 1071956599 - .long 850820968 - .long 3175983841 - .long 46260224 - .long 1071943806 - .long 2164938638 - .long 1028426857 - .long 3567947776 - .long 1071931066 - .long 2011723452 - .long 1028083988 - .long 277430272 - .long 1071918381 - .long 2531435800 - .long 3169601318 - .long 1143848960 - .long 1071905748 - .long 294923185 - .long 1023738369 - .long 4275343360 - .long 1071893167 - .long 2459435756 - .long 1028412742 - .long 3508592640 - .long 1071880639 - .long 503755275 - .long 3173140530 - .long 1293312000 - .long 1071868163 - .long 3333822795 - .long 1026993594 - .long 101961728 - .long 1071855738 - .long 2904005851 - .long 1027338469 - .long 2429362176 - .long 1071843363 - .long 1235892196 - .long 3175679811 - .long 2202386432 - .long 1071831039 - .long 2295142960 - .long 1028565357 - .long 1959501824 - .long 1071818765 - .long 254808788 - .long 1028157588 - .long 4260454400 - .long 1071806540 - .long 1281464327 - .long 3173548784 - .long 3096002560 - .long 1071794365 - .long 2126040068 - .long 3168834094 - .long 1067458560 - .long 1071782239 - .long 957416402 - .long 3171516564 - .long 796413952 - .long 1071770161 - .long 3663270514 - .long 1026937343 - .long 629456896 - .long 1071758131 - .long 2081311685 - .long 1026861414 - .long 3227787264 - .long 1071746148 - .long 325239760 - .long 3175812466 - .long 2681995264 - .long 1071734213 - .long 692600417 - .long 1028316258 - .long 1691656192 - .long 1071722325 - .long 2854288619 - .long 3174069820 - .long 2975059968 - .long 1071710483 - .long 2357806657 - .long 3175896595 - .long 1853362176 - .long 1071686938 - .long 182026883 - .long 3174676055 - .long 4247105536 - .long 1071663574 - .long 1264810745 - .long 1026738550 - .long 671424512 - .long 1071636109 - .long 321222784 - .long 1028039985 - .long 4092968960 - .long 1071590092 - .long 3658154599 - .long 3175856095 - .long 193347584 - .long 1071544424 - .long 723354347 - .long 3173824323 - .long 985587712 - .long 1071499097 - .long 2344377442 - .long 1027857554 - .long 1801297920 - .long 1071454107 - .long 2398211919 - .long 3175430015 - .long 2750758912 - .long 1071409449 - .long 223148174 - .long 1028267694 - .long 118882304 - .long 1071365119 - .long 1958423088 - .long 1026816298 - .long 3531350016 - .long 1071321110 - .long 875023512 - .long 1027316085 - .long 1581752320 - .long 1071277420 - .long 345754833 - .long 1027657950 - .long 473587712 - .long 1071234043 - .long 3024467474 - .long 3175496105 - .long 2533163008 - .long 1071190974 - .long 3279280870 - .long 3173991880 - .long 1902854144 - .long 1071148210 - .long 3170372974 - .long 3174359141 - .long 1709547520 - .long 1071105746 - .long 3312617382 - .long 3175326532 - .long 1168744448 - .long 1071063578 - .long 2799128425 - .long 1027228825 - .long 4163903488 - .long 1071021701 - .long 1285964057 - .long 3176060221 - .long 2056257536 - .long 1070980113 - .long 2706516695 - .long 1028650734 - .long 3739770880 - .long 1070938808 - .long 246392277 - .long 3174722093 - .long 1271734272 - .long 1070897784 - .long 3679462403 - .long 3174159366 - .long 4223328256 - .long 1070857035 - .long 2433294629 - .long 1027980203 - .long 1015963648 - .long 1070816560 - .long 4253198713 - .long 1026847814 - .long 1862295552 - .long 1070776353 - .long 1509191037 - .long 3173682029 - .long 103178240 - .long 1070736412 - .long 3582688163 - .long 3173089500 - .long 2264358912 - .long 1070696732 - .long 1779381280 - .long 1025292403 - .long 2278850560 - .long 1070657311 - .long 3240888728 - .long 1027177644 - .long 2954207232 - .long 1070618145 - .long 3564986365 - .long 1024870970 - .long 1865613312 - .long 1070562367 - .long 3892585078 - .long 1027946215 - .long 3434348544 - .long 1070485036 - .long 3011363162 - .long 3175199985 - .long 671449088 - .long 1070408197 - .long 1145012811 - .long 1026506981 - .long 1327038464 - .long 1070331842 - .long 227553652 - .long 1028331265 - .long 766836736 - .long 1070255966 - .long 518075456 - .long 3175312400 - .long 3434479616 - .long 1070180562 - .long 1452680450 - .long 3174267422 - .long 1364688896 - .long 1070105626 - .long 2571031723 - .long 3174222501 - .long 4236263424 - .long 1070031150 - .long 3514507731 - .long 3175326685 - .long 706019328 - .long 1069957131 - .long 2980398698 - .long 1026808442 - .long 1347502080 - .long 1069883561 - .long 1818423398 - .long 3175271900 - .long 4280483840 - .long 1069810435 - .long 3925170731 - .long 3175415416 - .long 3750608896 - .long 1069737749 - .long 710015584 - .long 3170118559 - .long 3004235776 - .long 1069665497 - .long 3823542833 - .long 3174354681 - .long 1393737728 - .long 1069593674 - .long 4238122296 - .long 1028475778 - .long 1621164032 - .long 1069497029 - .long 2232087921 - .long 3175937870 - .long 2762080256 - .long 1069355067 - .long 3580752115 - .long 3175802838 - .long 2914779136 - .long 1069213933 - .long 1251526596 - .long 1028548772 - .long 3808428032 - .long 1069073617 - .long 1491573749 - .long 1025131695 - .long 3589865472 - .long 1068934110 - .long 2320751647 - .long 3175285520 - .long 1102381056 - .long 1068795403 - .long 2369472545 - .long 3174735692 - .long 164790272 - .long 1068657486 - .long 3958705468 - .long 1027545055 - .long 966098944 - .long 1068520350 - .long 91754714 - .long 3174161762 - .long 100794368 - .long 1068269030 - .long 3205869737 - .long 3173509296 - .long 2079653888 - .long 1067997831 - .long 930310477 - .long 1028614386 - .long 3471048704 - .long 1067728143 - .long 1091811766 - .long 1028000848 - .long 1092419584 - .long 1067459950 - .long 629649056 - .long 3175844743 - .long 3079012352 - .long 1066936100 - .long 3939938999 - .long 3172112142 - .long 3666608128 - .long 1066405591 - .long 4185504407 - .long 3175959388 - .long 526647296 - .long 1065354156 - .long 1469727419 - .long 3173760470 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1367832035 - .long 1066403058 - .long 2677381210 - .long 3216320731 - .long 3610762001 - .long 3214607116 - .long 1215221452 - .long 1069835102 - .long 2894285243 - .long 1067936923 - .long 3011779882 - .long 3218479542 - .long 4160749568 - .long 4294967295 - .long 0 - .long 4294959104 - .long 0 - .long 1073160192 - .long 370913857 - .long 3210587105 - .type static_const_table,@object - .size static_const_table,2144 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2f_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2f_wmt.S deleted file mode 100644 index 6d3fbbcf6b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2f_wmt.S +++ /dev/null @@ -1,745 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log2f_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin log2f - .text - .align 16,0x90 - .globl log2f -log2f: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl $16384, %ecx - movd %ecx, %xmm4 - movl $-32768, %eax - movd %eax, %xmm2 - xorpd %xmm3, %xmm3 - movl $16368, %edx - pinsrw $3, %edx, %xmm3 - xorpd %xmm5, %xmm5 -.L_2TAG_PACKET_0.0.3: - movd %xmm0, %edx - rcpss %xmm0, %xmm1 - movsd 2080(%ebx), %xmm7 - pshuflw $68, %xmm0, %xmm0 - paddd %xmm4, %xmm1 - subl $8388608, %edx - cmpl $2113929216, %edx - jae .L_2TAG_PACKET_1.0.3 - andps %xmm1, %xmm2 - cvtps2pd %xmm0, %xmm0 - cvtps2pd %xmm2, %xmm1 - movd %xmm2, %eax - andl $-8388608, %edx - subl $1056964608, %edx - movl %edx, %ecx - sarl $23, %edx - cvtsi2sdl %edx, %xmm6 - mulsd %xmm1, %xmm0 - subl $1056964608, %ecx - addl %ecx, %eax - shrl $12, %eax - movsd (%ebx,%eax), %xmm4 - subsd %xmm3, %xmm0 - movsd 2088(%ebx), %xmm2 - movsd 2096(%ebx), %xmm1 - mulsd %xmm0, %xmm7 - addsd %xmm0, %xmm5 - mulsd %xmm0, %xmm0 - addsd %xmm4, %xmm6 - addsd %xmm7, %xmm1 - mulsd %xmm2, %xmm5 - mulsd %xmm1, %xmm0 - mulsd %xmm2, %xmm0 - addsd %xmm6, %xmm5 - addsd %xmm0, %xmm5 - cvtpd2ps %xmm5, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - addl $8388608, %edx - js .L_2TAG_PACKET_3.0.3 - cmpl $8388608, %edx - jb .L_2TAG_PACKET_4.0.3 - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_5.0.3 - movl $528482304, %eax - movd %eax, %xmm6 - movsd 2064(%ebx), %xmm5 - mulss %xmm6, %xmm0 - jmp .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_5.0.3: - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $-2147483648, %edx - je .L_2TAG_PACKET_6.0.3 - addl %edx, %edx - cmpl $-16777216, %edx - ja .L_2TAG_PACKET_5.0.3 - xorps %xmm0, %xmm0 - divss %xmm0, %xmm0 - movl $173, %edx -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_4.0.3: - cmpl $0, %edx - je .L_2TAG_PACKET_6.0.3 - movl $1602224128, %eax - movd %eax, %xmm7 - mulss %xmm7, %xmm0 - movsd 2072(%ebx), %xmm5 - jmp .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_6.0.3: - movl $-1082130432, %eax - movd %eax, %xmm0 - xorps %xmm1, %xmm1 - divss %xmm1, %xmm0 - movl $172, %edx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_2.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type log2f,@function - .size log2f,.-log2f - .data -# -- End log2f - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 1998916263 - .long 1072681452 - .long 3173270495 - .long 1072669702 - .long 2000860199 - .long 1072657998 - .long 1272047984 - .long 1072646339 - .long 3794524037 - .long 1072634724 - .long 3803106495 - .long 1072623154 - .long 4139350621 - .long 1072611628 - .long 3366391848 - .long 1072600146 - .long 63662823 - .long 1072588708 - .long 1416582474 - .long 1072577312 - .long 1741478598 - .long 1072565959 - .long 3960187916 - .long 1072554648 - .long 2419954872 - .long 1072543380 - .long 73073096 - .long 1072532154 - .long 4181694601 - .long 1072520968 - .long 547806622 - .long 1072509825 - .long 757656496 - .long 1072498722 - .long 3526834581 - .long 1072487659 - .long 3290001261 - .long 1072476637 - .long 3085585033 - .long 1072465655 - .long 1670680485 - .long 1072454713 - .long 2110786378 - .long 1072443810 - .long 3189678060 - .long 1072432946 - .long 3704185224 - .long 1072422121 - .long 2464005749 - .long 1072411335 - .long 2586490145 - .long 1072400587 - .long 2906527345 - .long 1072389877 - .long 2271335546 - .long 1072379205 - .long 3835256167 - .long 1072368570 - .long 2174681645 - .long 1072357973 - .long 467757278 - .long 1072347413 - .long 1904282206 - .long 1072336889 - .long 1095613242 - .long 1072326402 - .long 1254375265 - .long 1072315951 - .long 1309403273 - .long 1072305536 - .long 200556308 - .long 1072295157 - .long 1173533989 - .long 1072284813 - .long 3189793736 - .long 1072274504 - .long 926405093 - .long 1072264231 - .long 1955775707 - .long 1072253992 - .long 975706757 - .long 1072243788 - .long 1284091012 - .long 1072233618 - .long 1893874830 - .long 1072223482 - .long 1827891621 - .long 1072213380 - .long 118730237 - .long 1072203312 - .long 103572845 - .long 1072193277 - .long 834133047 - .long 1072183275 - .long 1371497981 - .long 1072173306 - .long 786005198 - .long 1072163370 - .long 2452088827 - .long 1072153466 - .long 1163258553 - .long 1072143595 - .long 311851589 - .long 1072133756 - .long 3298982784 - .long 1072123948 - .long 649529288 - .long 1072114173 - .long 76790007 - .long 1072104429 - .long 712572003 - .long 1072094716 - .long 1697017023 - .long 1072085034 - .long 2178495145 - .long 1072075383 - .long 1313500133 - .long 1072065763 - .long 2561513738 - .long 1072056173 - .long 800002435 - .long 1072046614 - .long 3799154139 - .long 1072037084 - .long 2157008926 - .long 1072027585 - .long 3659100731 - .long 1072018115 - .long 3213591115 - .long 1072008675 - .long 31044775 - .long 1071999265 - .long 1919304603 - .long 1071989883 - .long 3808564412 - .long 1071980530 - .long 636181417 - .long 1071971207 - .long 231490093 - .long 1071961912 - .long 1840879012 - .long 1071952645 - .long 422672785 - .long 1071943407 - .long 3826917183 - .long 1071934196 - .long 2730525283 - .long 1071925014 - .long 701967006 - .long 1071915860 - .long 1316286934 - .long 1071906733 - .long 3860057913 - .long 1071897633 - .long 3331303149 - .long 1071888561 - .long 3324321351 - .long 1071879516 - .long 3144709244 - .long 1071870498 - .long 2104254386 - .long 1071861507 - .long 3815829096 - .long 1071852542 - .long 3308416273 - .long 1071843604 - .long 4206907352 - .long 1071834692 - .long 1552162950 - .long 1071825807 - .long 3275780188 - .long 1071816947 - .long 135253478 - .long 1071808114 - .long 73645744 - .long 1071799306 - .long 2449718467 - .long 1071790523 - .long 2332833768 - .long 1071781766 - .long 3387792013 - .long 1071773034 - .long 694899285 - .long 1071764328 - .long 2224741414 - .long 1071755646 - .long 3068318658 - .long 1071746989 - .long 2616854210 - .long 1071738357 - .long 266767097 - .long 1071729750 - .long 4009547812 - .long 1071721166 - .long 366929114 - .long 1071712608 - .long 1635468980 - .long 1071704073 - .long 2936821143 - .long 1071695562 - .long 3692515865 - .long 1071687075 - .long 3328937712 - .long 1071678612 - .long 1277271392 - .long 1071670173 - .long 1268415641 - .long 1071661757 - .long 2742995963 - .long 1071653364 - .long 851312691 - .long 1071644995 - .long 2971350593 - .long 1071628625 - .long 3905998082 - .long 1071611978 - .long 3424346780 - .long 1071595377 - .long 453058438 - .long 1071578822 - .long 2517515273 - .long 1071562311 - .long 4266887860 - .long 1071545845 - .long 358942687 - .long 1071529425 - .long 2639818283 - .long 1071513048 - .long 1489227762 - .long 1071496716 - .long 180106617 - .long 1071480428 - .long 1993621493 - .long 1071464183 - .long 1629147435 - .long 1071447982 - .long 2384050109 - .long 1071431824 - .long 3268698085 - .long 1071415709 - .long 3301345460 - .long 1071399637 - .long 1508048308 - .long 1071383608 - .long 1217549516 - .long 1071367621 - .long 1471262833 - .long 1071351676 - .long 1318159864 - .long 1071335773 - .long 4109658129 - .long 1071319911 - .long 319673664 - .long 1071304092 - .long 1904282206 - .long 1071288313 - .long 3646937343 - .long 1071272575 - .long 338264500 - .long 1071256879 - .long 3955855899 - .long 1071241222 - .long 714524339 - .long 1071225607 - .long 2605838414 - .long 1071210031 - .long 153410875 - .long 1071194496 - .long 1067533806 - .long 1071179000 - .long 180337971 - .long 1071163544 - .long 920560604 - .long 1071148127 - .long 2428575699 - .long 1071132749 - .long 3851294344 - .long 1071117410 - .long 47131309 - .long 1071102111 - .long 3060776247 - .long 1071086849 - .long 3468423567 - .long 1071071626 - .long 442479858 - .long 1071056442 - .long 1751501034 - .long 1071041295 - .long 2285293781 - .long 1071026186 - .long 1234723448 - .long 1071011115 - .long 2091653508 - .long 1070996081 - .long 4058951182 - .long 1070981084 - .long 2050428397 - .long 1070966125 - .long 3870652645 - .long 1070951202 - .long 150118312 - .long 1070936317 - .long 2999895448 - .long 1070921467 - .long 3061900616 - .long 1070906654 - .long 3868579735 - .long 1070891877 - .long 368016775 - .long 1070877137 - .long 398716067 - .long 1070862432 - .long 3214712303 - .long 1070847762 - .long 3780484976 - .long 1070833128 - .long 1360840737 - .long 1070818530 - .long 3815829096 - .long 1070803966 - .long 1830887666 - .long 1070789438 - .long 3276530156 - .long 1070774944 - .long 3143525540 - .long 1070760485 - .long 722718060 - .long 1070746061 - .long 3899945937 - .long 1070731670 - .long 3386189576 - .long 1070717314 - .long 2782295200 - .long 1070702992 - .long 1399058777 - .long 1070688704 - .long 2847114277 - .long 1070674449 - .long 2151986001 - .long 1070660228 - .long 2933912513 - .long 1070646040 - .long 227932728 - .long 1070631886 - .long 1958678199 - .long 1070617764 - .long 3170525653 - .long 1070603675 - .long 2119878685 - .long 1070583143 - .long 2835758645 - .long 1070555096 - .long 2899780145 - .long 1070527114 - .long 1026954088 - .long 1070499197 - .long 236130878 - .long 1070471344 - .long 3554951635 - .long 1070443554 - .long 1134865757 - .long 1070415829 - .long 315822346 - .long 1070388167 - .long 4151355006 - .long 1070360567 - .long 2818569420 - .long 1070333031 - .long 3682837470 - .long 1070305557 - .long 1232950086 - .long 1070278146 - .long 2850845811 - .long 1070250796 - .long 3041732649 - .long 1070223508 - .long 613883718 - .long 1070196282 - .long 2973531841 - .long 1070169116 - .long 354993871 - .long 1070142012 - .long 180337971 - .long 1070114968 - .long 1289509543 - .long 1070087984 - .long 2530196301 - .long 1070061060 - .long 2757759525 - .long 1070034196 - .long 835166085 - .long 1070007392 - .long 4222855792 - .long 1069980646 - .long 3208871137 - .long 1069953960 - .long 973562605 - .long 1069927333 - .long 704621746 - .long 1069900764 - .long 1302049555 - .long 1069874253 - .long 1673060149 - .long 1069847800 - .long 732017834 - .long 1069821405 - .long 1695342161 - .long 1069795067 - .long 3491511767 - .long 1069768786 - .long 761003473 - .long 1069742563 - .long 1036101224 - .long 1069716396 - .long 3266000023 - .long 1069690285 - .long 2111714268 - .long 1069664231 - .long 830921328 - .long 1069638233 - .long 2687969258 - .long 1069612290 - .long 2363885129 - .long 1069586403 - .long 3136187749 - .long 1069560571 - .long 3692892517 - .long 1069522069 - .long 3570253499 - .long 1069470625 - .long 3908238678 - .long 1069419290 - .long 2723302721 - .long 1069368064 - .long 2339434949 - .long 1069316946 - .long 798118803 - .long 1069265936 - .long 448161615 - .long 1069215033 - .long 3650623571 - .long 1069164236 - .long 4188780490 - .long 1069113546 - .long 152924137 - .long 1069062963 - .long 2530196301 - .long 1069012484 - .long 844750970 - .long 1068962111 - .long 1812361559 - .long 1068911842 - .long 3570519722 - .long 1068861677 - .long 4268273545 - .long 1068811616 - .long 2066132126 - .long 1068761659 - .long 3725905754 - .long 1068711804 - .long 3135775963 - .long 1068662052 - .long 2785039517 - .long 1068612402 - .long 879114973 - .long 1068562854 - .long 4224353950 - .long 1068513406 - .long 621328030 - .long 1068429177 - .long 522185727 - .long 1068330685 - .long 354069551 - .long 1068232393 - .long 930992923 - .long 1068134300 - .long 3088087314 - .long 1068036405 - .long 3386464469 - .long 1067938708 - .long 2702982241 - .long 1067841208 - .long 1935110224 - .long 1067743904 - .long 2000764363 - .long 1067646795 - .long 3838143225 - .long 1067549880 - .long 4110598596 - .long 1067453159 - .long 3297851897 - .long 1067262895 - .long 3492345695 - .long 1067070223 - .long 2250192214 - .long 1066877934 - .long 1645815860 - .long 1066686026 - .long 3792308805 - .long 1066494497 - .long 207414749 - .long 1066204903 - .long 2718921511 - .long 1065823355 - .long 2393819184 - .long 1065442558 - .long 3228205918 - .long 1064771801 - .long 2754502619 - .long 1063721742 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 4277811695 - .long 1078341186 - .long 4277811695 - .long 3225824834 - .long 1431655765 - .long 1070945621 - .long 1697350398 - .long 1073157447 - .long 1107282704 - .long 3219128321 - .long 354870542 - .long 1071369083 - .type static_const_table,@object - .size static_const_table,2112 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2l.S deleted file mode 100644 index 978a410236..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2l.S +++ /dev/null @@ -1,532 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log2l.c" - .text -..TXTST0: -# -- Begin log2l - .text - .align 16,0x90 - .globl log2l -log2l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzbl 17(%ebp), %edi - andl $128, %edi - shrl $7, %edi - movzwl 16(%ebp), %edx - movl %edx, %eax - movl %edi, %ebx - andl $32767, %eax - shll $15, %ebx - movl 12(%ebp), %esi - orl %eax, %ebx - movl %esi, %ecx - shll $16, %ebx - shrl $16, %ecx - orl %ecx, %ebx - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - cmpl $2147450880, %ebx - jae ..B1.29 -..B1.4: - addl $-1073676224, %ebx - cmpl $32863, %ebx - ja ..B1.13 -..B1.5: - cmpl $16383, %eax - je ..B1.39 -..B1.6: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.7: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.8: - fldcw 12(%esp) -..B1.9: - movl $1, %eax -..B1.10: - fldt 8(%ebp) - testl %eax, %eax - fldl _TWO_32H@GOTOFF(%ecx) - fldt 84+_P@GOTOFF(%ecx) - fldt 60+_P@GOTOFF(%ecx) - fldt 36+_P@GOTOFF(%ecx) - fxch %st(4) - faddl 8+_ones@GOTOFF(%ecx) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fld %st(1) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(1) - fsub %st(3), %st - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 72+_P@GOTOFF(%ecx) - fmul %st(5), %st - fldt 48+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(5), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt _P@GOTOFF(%ecx) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt 96+_P@GOTOFF(%ecx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.12 -..B1.11: - fldcw 14(%esp) -..B1.12: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - movzwl 14(%esp), %esi - movl %esi, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.45 -..B1.14: - orl $-64768, %esi - movw %si, 12(%esp) -..B1.15: - fldcw 12(%esp) -..B1.16: - movzwl 16(%ebp), %edx - movl %edx, %eax - movl $1, %esi - andl $32767, %eax -..B1.17: - testl %eax, %eax - jne ..B1.20 -..B1.18: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%ecx) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _zeros@GOTOFF(%ecx) - fxch %st(1) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B1.19 - je ..B1.42 -..B1.19: - fstp %st(0) - movzwl 16(%ebp), %edx - movl %edx, %eax - movl $-16458, %ebx - andl $32767, %eax - jmp ..B1.21 -..B1.20: - movl $-16383, %ebx -..B1.21: - movl 12(%ebp), %edi - cmpl $-2147483648, %edi - jne ..B1.26 -..B1.22: - cmpl $0, 8(%ebp) - jne ..B1.26 -..B1.23: - addl %eax, %ebx - movl %ebx, 16(%esp) - testl %esi, %esi - fildl 16(%esp) - fstpt (%esp) - je ..B1.25 -..B1.24: - fldcw 14(%esp) -..B1.25: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - fldl _TWO_32H@GOTOFF(%ecx) - andl $-32768, %edx - fldt 84+_P@GOTOFF(%ecx) - orl $-49153, %edx - fldt 60+_P@GOTOFF(%ecx) - addl %eax, %ebx - movw %dx, 16(%ebp) - fldt 8(%ebp) - fld %st(0) - shrl $23, %edi - fadd %st(4), %st - andl $255, %edi - fsubp %st, %st(4) - movl %ebx, 16(%esp) - fsub %st(3), %st - flds __libm_rcp_table_256@GOTOFF(%ecx,%edi,4) - fmul %st, %st(4) - fmulp %st, %st(1) - fxch %st(3) - faddl 8+_ones@GOTOFF(%ecx) - fld %st(0) - shll $4, %edi - fadd %st(4), %st - fld %st(0) - testl %esi, %esi - fmul %st(1), %st - fmul %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 36+_P@GOTOFF(%ecx) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fldt 12+_P@GOTOFF(%ecx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 72+_P@GOTOFF(%ecx) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt _P@GOTOFF(%ecx) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 96+_P@GOTOFF(%ecx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(2) - fildl 16(%esp) - fxch %st(1) - faddl 8+__libm_log2l_table_256@GOTOFF(%ecx,%edi) - fxch %st(1) - faddl __libm_log2l_table_256@GOTOFF(%edi,%ecx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.28 -..B1.27: - fldcw 14(%esp) -..B1.28: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.29: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.54 -..B1.30: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.31: - fldcw 12(%esp) -..B1.32: - movzbl 17(%ebp), %edi - movl $1, %edx - andl $128, %edi - shrl $7, %edi -..B1.33: - testl %edi, %edi - jne ..B1.46 -..B1.34: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ecx) - fstpt (%esp) -..B1.35: - testl %edx, %edx - je ..B1.37 -..B1.36: - fldcw 14(%esp) -..B1.37: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.38: - xorl %eax, %eax - jmp ..B1.10 -..B1.39: - cmpl $-2147483648, %esi - jne ..B1.6 -..B1.40: - cmpl $0, 8(%ebp) - jne ..B1.6 -..B1.41: - fldl _zeros@GOTOFF(%ecx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.42: - fldl 8+_ones@GOTOFF(%ecx) - testl %esi, %esi - fdivp %st, %st(1) - fstpl (%esp) - je ..B1.44 -..B1.43: - fldcw 14(%esp) -..B1.44: - fldl (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - xorl %esi, %esi - jmp ..B1.17 -..B1.46: - movzwl 16(%ebp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.49 -..B1.47: - cmpl $-2147483648, 12(%ebp) - jne ..B1.34 -..B1.48: - cmpl $0, 8(%ebp) - jne ..B1.34 - jmp ..B1.53 -..B1.49: - testl %eax, %eax - jne ..B1.53 -..B1.50: - cmpl $0, 12(%ebp) - jne ..B1.53 -..B1.51: - cmpl $0, 8(%ebp) - jne ..B1.53 -..B1.52: - fldl 8+_ones@GOTOFF(%ecx) - fdivl _zeros@GOTOFF(%ecx) - fstpt (%esp) - jmp ..B1.35 -..B1.53: - fldl _infs@GOTOFF(%ecx) - fmull _zeros@GOTOFF(%ecx) - fstpt (%esp) - jmp ..B1.35 -..B1.54: - xorl %edx, %edx - jmp ..B1.33 - .align 16,0x90 - .type log2l,@function - .size log2l,.-log2l - .data -# -- End log2l - .section .rodata, "a" - .align 4 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_P: - .word 17354 - .word 24031 - .word 3064 - .word 38062 - .word 16360 - .word 0 - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 49150 - .word 0 - .word 60493 - .word 53279 - .word 20193 - .word 63032 - .word 16381 - .word 0 - .word 62043 - .word 23575 - .word 15145 - .word 47274 - .word 49149 - .word 0 - .word 33329 - .word 29325 - .word 25223 - .word 37819 - .word 16381 - .word 0 - .word 5068 - .word 45194 - .word 20193 - .word 63032 - .word 49148 - .word 0 - .word 43239 - .word 63403 - .word 6517 - .word 54028 - .word 16380 - .word 0 - .word 25259 - .word 45714 - .word 45135 - .word 47274 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 14848 - .word 47274 - .word 16383 - .word 0 - .type _P,@object - .size _P,108 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_log2l_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2l_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2l_table.S deleted file mode 100644 index ccfd504219..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log2l_table.S +++ /dev/null @@ -1,560 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log2l_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_log2l_table_256 - .globl __libm_log2l_table_256 -__libm_log2l_table_256: - .long 0xa42e4000,0x3f671b0e - .long 0x1dbbd1a5,0x3cefda26 - .long 0x8eaec000,0x3f815cfe - .long 0xac00d0eb,0x3cf06028 - .long 0x0c5d0000,0x3f8cfee7 - .long 0x6dfa58c3,0xbd0a2394 - .long 0x62192000,0x3f94564a - .long 0x88333d4e,0x3d0068bc - .long 0xace34000,0x3f997723 - .long 0xac9ac44a,0x3d1765d0 - .long 0xc69b8000,0x3f9f5923 - .long 0xcfb08e1d,0xbd25afb7 - .long 0xa085c000,0x3fa2a094 - .long 0xa481e15f,0x3d2692b8 - .long 0x1776a000,0x3fa53894 - .long 0x36a2459e,0x3d201dc0 - .long 0x9b914000,0x3fa8324c - .long 0x2b15e585,0x3d178efe - .long 0xce080000,0x3faacf54 - .long 0x8e2d6a53,0xbd340b58 - .long 0x58dac000,0x3fadced9 - .long 0xd3ddb87a,0x3d2c119c - .long 0xfbca8000,0x3fb0387e - .long 0x16f872eb,0x3d1a7682 - .long 0x06748000,0x3fb18ac6 - .long 0xdff59ce4,0xbd18ff0d - .long 0x3e136000,0x3fb30edd - .long 0x15f8f5c1,0xbd29e679 - .long 0x59364000,0x3fb463c1 - .long 0x07b8e917,0x3d193671 - .long 0x3c3f8000,0x3fb5b9e1 - .long 0x4ce80f25,0x3d410e4a - .long 0x3259c000,0x3fb7113f - .long 0x637425fc,0x3d403cdb - .long 0x8d1b0000,0x3fb869dd - .long 0x3dfca47b,0x3d401a71 - .long 0xa49d0000,0x3fb9c3be - .long 0x8c6c8e73,0x3d4909ed - .long 0xd7960000,0x3fbb1ee4 - .long 0xf4540d3e,0x3d370159 - .long 0x8b70c000,0x3fbc7b52 - .long 0x0d939dcf,0x3d48e27d - .long 0x2c678000,0x3fbdd90a - .long 0x04d3d5b4,0xbd312b9c - .long 0x976c4000,0x3fbf05d4 - .long 0xcd9838ba,0xbd3fd7bc - .long 0xbaee8000,0x3fc032fb - .long 0x7d1edf2f,0xbd429af3 - .long 0xa9f32000,0x3fc0e3b5 - .long 0xeeb39e80,0x3d3094fb - .long 0x5c7d2000,0x3fc19519 - .long 0xa7453897,0xbd3b4aad - .long 0xc2ab2000,0x3fc22dad - .long 0xd23af327,0x3d4496d2 - .long 0x231e0000,0x3fc2e050 - .long 0xa377c7ec,0xbd350520 - .long 0x9c2b2000,0x3fc379f7 - .long 0xa3793dbe,0x3d256aea - .long 0x2ba1c000,0x3fc42ddd - .long 0xac74b87f,0xbd36ad5b - .long 0x9e680000,0x3fc4c89b - .long 0x02de76ad,0x3d2fd2e8 - .long 0x29ffc000,0x3fc563dc - .long 0x78df21ad,0xbd434df3 - .long 0x5f5d8000,0x3fc619a2 - .long 0xaf108e66,0xbd29cc54 - .long 0xbf368000,0x3fc6b5ff - .long 0x175a06f6,0xbd337788 - .long 0xf6610000,0x3fc752e1 - .long 0x902c7d37,0xbd2ca90f - .long 0xe7540000,0x3fc7f049 - .long 0xec326af7,0xbd483153 - .long 0x0abfc000,0x3fc8a898 - .long 0xab240e90,0xbd166ccc - .long 0xcca64000,0x3fc94724 - .long 0x82d7bfe5,0x3d47be4d - .long 0x24970000,0x3fc9e63a - .long 0xca6bec19,0x3d4f45ea - .long 0xfeb20000,0x3fca85d8 - .long 0xd08dc20f,0x3d17b6aa - .long 0x497d8000,0x3fcb2602 - .long 0x90cb67ba,0xbd565d39 - .long 0xf5ee4000,0x3fcbc6b6 - .long 0xcabaa043,0xbd51b254 - .long 0xf770c000,0x3fcc67f7 - .long 0xab00c050,0xbd49821f - .long 0xb2234000,0x3fcceec4 - .long 0xdad67ab8,0x3d3f73bc - .long 0x7ad10000,0x3fcd9109 - .long 0x370c6558,0x3d5cc12e - .long 0x57f3c000,0x3fce33dd - .long 0x4a928ccd,0x3d433481 - .long 0x46bc8000,0x3fced741 - .long 0x984a7cdc,0xbd23bfd7 - .long 0x46ff0000,0x3fcf7b36 - .long 0x48e15c73,0xbd32f9b5 - .long 0xa943e000,0x3fd00223 - .long 0x00388584,0xbd2f3862 - .long 0x74bf0000,0x3fd054a4 - .long 0xf7113597,0x3d4d6efe - .long 0x9b926000,0x3fd0999d - .long 0xa7e48c00,0xbd397bf5 - .long 0x6d3b4000,0x3fd0eca6 - .long 0xcb31a070,0xbd5a7f50 - .long 0x2e85c000,0x3fd13ffa - .long 0xc54ae907,0xbd471577 - .long 0x44fa0000,0x3fd185a4 - .long 0x6fa317ed,0x3d44f66d - .long 0x12f28000,0x3fd1cb83 - .long 0xce4e50d0,0xbd1010cf - .long 0x441ce000,0x3fd21fa1 - .long 0xf89df349,0x3d379e4a - .long 0x26e60000,0x3fd265f5 - .long 0x84a6a593,0x3d2e59ad - .long 0xc34be000,0x3fd2baa0 - .long 0xcd51a1bf,0x3d1ebefe - .long 0x45de2000,0x3fd3016b - .long 0xec0723df,0x3d1ce045 - .long 0x38aa2000,0x3fd3486c - .long 0xaa5dfd69,0x3d434f09 - .long 0xefaa8000,0x3fd38fa3 - .long 0x91962d0f,0x3d2313fc - .long 0xc0816000,0x3fd3e562 - .long 0xfa64765f,0x3d440340 - .long 0x1f53c000,0x3fd42d14 - .long 0x167aead5,0xbd4374da - .long 0x543f2000,0x3fd474fd - .long 0x400ce06e,0x3d216293 - .long 0xb6810000,0x3fd4bd1e - .long 0x8d05e4fa,0xbd5ab857 - .long 0x9e236000,0x3fd50578 - .long 0xbbaffd12,0xbd542eea - .long 0x64004000,0x3fd54e0b - .long 0x92de8d74,0xbd323e74 - .long 0x61c40000,0x3fd596d7 - .long 0xb5eabc35,0xbd6f07ff - .long 0xf1eec000,0x3fd5dfdc - .long 0xd2926f16,0xbd51f1bb - .long 0x6fd94000,0x3fd6291c - .long 0xdc0e627c,0xbd4ac899 - .long 0x37b58000,0x3fd67296 - .long 0xd82f9efc,0x3d541782 - .long 0xa6930000,0x3fd6bc4a - .long 0x46b4eaee,0xbd5f036d - .long 0x1a5fc000,0x3fd7063a - .long 0x0e43a37f,0xbd461b8d - .long 0xf1ed0000,0x3fd75064 - .long 0xec06848a,0x3d3c558f - .long 0x8cf10000,0x3fd79acb - .long 0x9ea019ad,0x3d2c7d46 - .long 0x1e438000,0x3fd7d67c - .long 0x2119c4e9,0x3d672dc9 - .long 0x4068c000,0x3fd8214f - .long 0x8322d649,0xbd505944 - .long 0x36dec000,0x3fd86c5f - .long 0x982b6522,0xbd5c2445 - .long 0x64dd8000,0x3fd8b7ac - .long 0x3c24b943,0xbcf8cd4c - .long 0x7a0c8000,0x3fd8f416 - .long 0x1882631a,0xbd506e0d - .long 0xd5e1c000,0x3fd93fd2 - .long 0x37daf317,0xbd0c6d2c - .long 0x84298000,0x3fd98bcd - .long 0x1c4482c6,0xbd56ba65 - .long 0x33e70000,0x3fd9c8c3 - .long 0x2b947c14,0xbd565ac6 - .long 0x14298000,0x3fda152f - .long 0x0e65d2ce,0x3d1b3d7b - .long 0xd95fc000,0x3fda527f - .long 0xad63ae87,0x3d58ff36 - .long 0x3edec000,0x3fda9f5e - .long 0x112e6c5e,0xbd38668d - .long 0x2b574000,0x3fdadd0b - .long 0x1a609aaa,0x3d55a69a - .long 0x6f520000,0x3fdb2a5d - .long 0xfdf426cf,0xbcff5369 - .long 0x99b00000,0x3fdb6867 - .long 0x84b3fb1a,0x3d47c5c7 - .long 0x1b888000,0x3fdbb62f - .long 0xef0b8928,0xbd29427b - .long 0x9f664000,0x3fdbf497 - .long 0x3da6863a,0x3d63342a - .long 0x6e83c000,0x3fdc332a - .long 0xb6303c0d,0xbd6315fe - .long 0xc2d44000,0x3fdc819d - .long 0x95d8ac46,0x3d5fe438 - .long 0x8e19c000,0x3fdcc090 - .long 0x870d5301,0xbd4085c5 - .long 0x611b0000,0x3fdcffae - .long 0xb8e97d14,0xbd676a4e - .long 0x76d44000,0x3fdd3ef7 - .long 0x378ff59d,0xbcc81e2b - .long 0x02710000,0x3fdd8e50 - .long 0x99a48379,0x3d128679 - .long 0x486cc000,0x3fddcdfb - .long 0x57e20e48,0xbd397d70 - .long 0x94244000,0x3fde0dd2 - .long 0x4e05d479,0x3d5fe3e2 - .long 0x22a28000,0x3fde4dd6 - .long 0x3522eadc,0x3d407f39 - .long 0x31710000,0x3fde8e06 - .long 0xd1f94399,0x3d54efc5 - .long 0xfe9ac000,0x3fdece62 - .long 0x793f3b67,0xbd63755a - .long 0x4a154000,0x3fdf1f16 - .long 0x1e0f6657,0xbd3d990d - .long 0xa9064000,0x3fdf5fd8 - .long 0x0109b0f1,0xbd1cb6f7 - .long 0x937e8000,0x3fdfa0c8 - .long 0xcacac36e,0xbd2515e1 - .long 0x49bb8000,0x3fdfe1e6 - .long 0x293a746b,0xbd5cca93 - .long 0x06416000,0x3fe01199 - .long 0xd8721fec,0xbd594c3a - .long 0x0e91e000,0x3fe03256 - .long 0x3e307cbb,0x3d467783 - .long 0x5ebce000,0x3fe0532a - .long 0xa9a9f37a,0xbd576c46 - .long 0x17f60000,0x3fe07416 - .long 0xbbaf9ab0,0xbd3ebdb1 - .long 0x53f38000,0x3fe08cd6 - .long 0x7d0732d6,0x3d5072ba - .long 0x55c12000,0x3fe0adeb - .long 0x502d528c,0xbd5f89ea - .long 0x1d5d2000,0x3fe0cf18 - .long 0x656576a5,0xbd317e70 - .long 0xcd0ac000,0x3fe0f05c - .long 0xc4d028f0,0x3d5dae75 - .long 0x87578000,0x3fe111b9 - .long 0xfb8eb2af,0x3d51553a - .long 0x6f1bc000,0x3fe1332e - .long 0x1e351573,0x3d5ee62e - .long 0xa77c2000,0x3fe154bb - .long 0x96dcbe61,0x3d1109e5 - .long 0x9bfa2000,0x3fe16df5 - .long 0x0adf6a55,0xbd693ea9 - .long 0xb6e2c000,0x3fe18fad - .long 0x517ae88c,0x3d63c19b - .long 0x849ae000,0x3fe1b17e - .long 0xff1e8ea2,0xbd3ecf4d - .long 0x6a0de000,0x3fe1caeb - .long 0x854dfeca,0x3d5027e9 - .long 0xc8310000,0x3fe1ece7 - .long 0x7a9fc25e,0xbd6136da - .long 0x3dae0000,0x3fe20efd - .long 0xa02e61be,0x3d2df373 - .long 0xe375e000,0x3fe2289d - .long 0xc27a8169,0xbd4bfa6f - .long 0x9b6a8000,0x3fe24adf - .long 0x14538362,0xbd601f94 - .long 0xd1aea000,0x3fe26d3a - .long 0xb5d13c0f,0x3d6cfc3a - .long 0x0c276000,0x3fe28710 - .long 0xcec1b4ea,0x3d61f3e3 - .long 0x3b3c0000,0x3fe2a998 - .long 0xcb3fff52,0x3d6b2840 - .long 0x5c842000,0x3fe2c38f - .long 0xdfa568f7,0x3d10bad7 - .long 0xfac06000,0x3fe2e644 - .long 0xbe206bcc,0xbd60284e - .long 0x5c482000,0x3fe3005e - .long 0x50757c6c,0x3d4411d0 - .long 0xe1d88000,0x3fe32341 - .long 0x4bed16a8,0x3d5370c2 - .long 0xde748000,0x3fe33d7d - .long 0x4a603b86,0xbd57fbb4 - .long 0xc5650000,0x3fe3608f - .long 0x14f8ca8f,0x3d3a63aa - .long 0xb9548000,0x3fe37aee - .long 0xc4484d2e,0xbd52b278 - .long 0x7d9a8000,0x3fe39e2f - .long 0xf9f603ee,0xbd627a85 - .long 0xc68fa000,0x3fe3b8b1 - .long 0x9336b66e,0x3d4bb4b6 - .long 0xe613e000,0x3fe3dc21 - .long 0xe04a7773,0xbd60c6e3 - .long 0xe33ba000,0x3fe3f6c7 - .long 0xfc271317,0x3d325d25 - .long 0x4b1fe000,0x3fe4117d - .long 0xf19c5879,0xbd47fe42 - .long 0xefeec000,0x3fe43531 - .long 0x74b82e7e,0xbd52f11d - .long 0x969d0000,0x3fe4500b - .long 0xbb075298,0x3d65b869 - .long 0xe41a2000,0x3fe46af4 - .long 0x4d994a2a,0xbd182943 - .long 0x19316000,0x3fe48eef - .long 0x3956fa5e,0x3d6990d4 - .long 0x333d4000,0x3fe4a9fd - .long 0xe1bd6277,0x3d67e24a - .long 0x318c0000,0x3fe4c51b - .long 0x2a8a4d7a,0xbd5f91de - .long 0x26d38000,0x3fe4e049 - .long 0xdd409e96,0xbd320665 - .long 0x63f64000,0x3fe5049f - .long 0x7b11231a,0x3d5b76a8 - .long 0xe3022000,0x3fe51ff2 - .long 0xa00b120a,0xbd56879f - .long 0x98572000,0x3fe53b56 - .long 0xfa5c51d1,0x3d673642 - .long 0x973dc000,0x3fe556ca - .long 0x459db47f,0xbd53cd8a - .long 0xf3200000,0x3fe5724e - .long 0x9385d649,0x3d591597 - .long 0x03a5c000,0x3fe59719 - .long 0x449e2590,0xbd31bb71 - .long 0xda198000,0x3fe5b2c3 - .long 0x492bf6ff,0xbd5b8afe - .long 0x4f3e4000,0x3fe5ce7f - .long 0x4f9a9e0c,0x3d76ae3f - .long 0x77184000,0x3fe5ea4b - .long 0x06727b86,0x3d65cd66 - .long 0x65cf0000,0x3fe60628 - .long 0x2f6664db,0x3d5e3c54 - .long 0x2faf4000,0x3fe62216 - .long 0x60c37437,0xbd773ea5 - .long 0xe929c000,0x3fe63e14 - .long 0xcd9d28e6,0x3d346549 - .long 0xa6d5c000,0x3fe65a24 - .long 0xc074b84d,0x3d5de792 - .long 0x7d6f8000,0x3fe67645 - .long 0x3180227e,0x3d45bfa4 - .long 0x81d94000,0x3fe69277 - .long 0x137a3d8c,0xbd5aaf6f - .long 0xc91b8000,0x3fe6aeba - .long 0x459f4910,0xbd2c3a4f - .long 0x6865c000,0x3fe6cb0f - .long 0xdb502403,0x3d51d406 - .long 0x750e8000,0x3fe6e775 - .long 0x54ae8096,0x3d57aac5 - .long 0x0493c000,0x3fe703ed - .long 0xd0d1a7f0,0xbd4c2657 - .long 0x2c9b0000,0x3fe72076 - .long 0xf1ec6bfa,0x3d6cb070 - .long 0x02f2c000,0x3fe73d11 - .long 0x28f88499,0x3d130454 - .long 0x9d914000,0x3fe759bd - .long 0x84b0b58b,0x3d5ed855 - .long 0x12968000,0x3fe7767c - .long 0x12e0b4f3,0xbd46eb96 - .long 0x784b4000,0x3fe7934c - .long 0x9cb23d17,0x3d6f0113 - .long 0xe522c000,0x3fe7b02e - .long 0xa5258bb7,0x3d77f7ed - .long 0x92280000,0x3fe7c37a - .long 0x818d34cf,0xbd6804b7 - .long 0x3d39c000,0x3fe7e07b - .long 0xf457de07,0x3d650290 - .long 0x2c1b4000,0x3fe7fd8e - .long 0xb343a140,0x3d2a15a5 - .long 0x75dc0000,0x3fe81ab3 - .long 0x2ec63274,0x3d584b7a - .long 0x31b7c000,0x3fe837eb - .long 0x22b56634,0x3d6c362e - .long 0x7716c000,0x3fe85535 - .long 0xa24036e1,0xbd7707b5 - .long 0xa808c000,0x3fe868c6 - .long 0xdc0e40d3,0xbd5bd2ae - .long 0x0713c000,0x3fe88630 - .long 0x6f909cf3,0xbd6203b8 - .long 0x2ee78000,0x3fe8a3ac - .long 0xbd315db9,0xbd5c935d - .long 0x3791c000,0x3fe8c13b - .long 0x11e2bd73,0x3d5dffed - .long 0x70e24000,0x3fe8d4fa - .long 0x8994b162,0xbd3b912d - .long 0x2639c000,0x3fe8f2a9 - .long 0x1cc06b22,0xbd677406 - .long 0xfd704000,0x3fe9106a - .long 0x6f31880a,0xbd1b76a4 - .long 0x3a284000,0x3fe9244c - .long 0x7db199c6,0xbd72bd2d - .long 0x2b878000,0x3fe9422e - .long 0x1eceebf4,0x3d607320 - .long 0x81210000,0x3fe96023 - .long 0x2956f019,0x3d6518a1 - .long 0x3737c000,0x3fe97427 - .long 0x71deb637,0x3d61e54d - .long 0x16b18000,0x3fe9923d - .long 0xebd2e82c,0x3d5028ed - .long 0x9e1bc000,0x3fe9b066 - .long 0xc89c6f2d,0xbd210f7a - .long 0x45f2c000,0x3fe9c48d - .long 0xe6a10cca,0xbd55b5da - .long 0xc93fc000,0x3fe9e2d7 - .long 0x6045b96c,0xbd74e31c - .long 0x39988000,0x3fea0136 - .long 0xd9459b34,0x3d3d25cf - .long 0x4e0bc000,0x3fea1580 - .long 0xd0364be2,0x3d744421 - .long 0x2ea54000,0x3fea3400 - .long 0x3388b97b,0x3d5c79a4 - .long 0xa67f8000,0x3fea4860 - .long 0xa2e241fc,0xbd5eddce - .long 0x414dc000,0x3fea6702 - .long 0xcc538261,0xbd43167c - .long 0x4e2e0000,0x3fea7b79 - .long 0xf16ff990,0xbd43cf0f - .long 0xee1c0000,0x3fea9a3c - .long 0xe3084679,0x3cf6c31d - .long 0x1be18000,0x3feab915 - .long 0x2c022617,0xbd672292 - .long 0xb33ac000,0x3feacdb0 - .long 0xb1410c94,0xbd4b23e5 - .long 0x60094000,0x3feaecab - .long 0x0ae3394c,0x3d50556b - .long 0x107c4000,0x3feb015e - .long 0xed2b2eb2,0xbd5d0db1 - .long 0x0cb28000,0x3feb161a - .long 0xd90df0b9,0x3d5353b3 - .long 0x8761c000,0x3feb3545 - .long 0x2b834fe3,0x3d647978 - .long 0xe5b20000,0x3feb4a18 - .long 0x2a855a1a,0x3d402327 - .long 0x9b240000,0x3feb6967 - .long 0x3726f484,0xbd7b3b86 - .long 0x90874000,0x3feb7e52 - .long 0x09b9625e,0x3d2d2152 - .long 0xd0b8c000,0x3feb9dc4 - .long 0x29c44115,0xbd46be4a - .long 0x92ddc000,0x3febb2c7 - .long 0xd690403e,0xbd28b7fc - .long 0xaeddc000,0x3febd25d - .long 0xb0f92e32,0x3d46a10e - .long 0x742ac000,0x3febe778 - .long 0x7ecf463f,0xbd6ad6fb - .long 0xe3b98000,0x3febfc9c - .long 0x1185e784,0xbd42cbe5 - .long 0xbdb50000,0x3fec1c65 - .long 0x6951096d,0x3d3e742a - .long 0x7dd04000,0x3fec31a2 - .long 0xcbdb5d9e,0xbd7a5b21 - .long 0x076cc000,0x3fec46e9 - .long 0x86f88587,0xbd3ddb78 - .long 0x43730000,0x3fec66e5 - .long 0xbaa5a734,0x3d523bf0 - .long 0x6c790000,0x3fec7c44 - .long 0xf67dd7ae,0xbd7c7a0d - .long 0x7ed84000,0x3fec91ad - .long 0x6188e18f,0x3d722f0b - .long 0xc4194000,0x3fecb1dd - .long 0x4bba7e1c,0x3d77b6c1 - .long 0xc6410000,0x3fecc75f - .long 0xb0c280a9,0x3d64f1b9 - .long 0xd2374000,0x3fecdceb - .long 0x391924a7,0xbd49ad57 - .long 0xcb184000,0x3fecfd50 - .long 0x6ab58d83,0xbd6078ca - .long 0x18c18000,0x3fed12f6 - .long 0xeb119dc6,0xbd6fe599 - .long 0x914e4000,0x3fed28a5 - .long 0x26c0de13,0xbd6fb0e6 - .long 0x3e504000,0x3fed3e5f - .long 0x9ace87f7,0xbd506b11 - .long 0xf93fc000,0x3fed5f08 - .long 0x4f2d37b7,0xbd73bb6d - .long 0x539dc000,0x3fed74dc - .long 0xb806844c,0x3d727a5f - .long 0x045b0000,0x3fed8aba - .long 0xf65ddbc9,0x3d2c7a4f - .long 0x15464000,0x3feda0a2 - .long 0x0af75927,0x3d74c8da - .long 0xb896c000,0x3fedc191 - .long 0x5363737e,0xbd6cdb50 - .long 0xe53dc000,0x3fedd793 - .long 0xa1dc7b13,0xbd76ffa3 - .long 0x94d7c000,0x3fededa0 - .long 0x1919aabd,0x3d6747e2 - .long 0xd174c000,0x3fee03b7 - .long 0x2f683f98,0xbd514fc4 - .long 0xa531c000,0x3fee19d9 - .long 0x3a87769f,0x3d7728dc - .long 0x1a3c0000,0x3fee3006 - .long 0x768a06ef,0xbd7a0e7d - .long 0xce9f8000,0x3fee515c - .long 0x518e12cc,0xbd65f71b - .long 0x03cb4000,0x3fee67a4 - .long 0xfaf8e258,0x3d75735c - .long 0xfe538000,0x3fee7df5 - .long 0xf6a2b592,0x3d55669d - .long 0xc8a70000,0x3fee9452 - .long 0xec9f90f7,0x3d60278c - .long 0x6d444000,0x3feeaaba - .long 0x2268e3e2,0x3d799543 - .long 0xf6b98000,0x3feec12c - .long 0x09d2dc10,0xbd468988 - .long 0x6fa38000,0x3feed7aa - .long 0x51433cdb,0xbd7387ac - .long 0xe2aec000,0x3feeee32 - .long 0x4fd75f61,0x3d597da2 - .long 0x3bbf4000,0x3fef1014 - .long 0x68ea48c7,0x3d71983c - .long 0x4f39c000,0x3fef26b8 - .long 0x4efa434d,0xbd72177b - .long 0x82ae0000,0x3fef3d67 - .long 0xf9197819,0x3d6fbc2b - .long 0xe1110000,0x3fef5421 - .long 0xa92b420d,0x3d69402d - .long 0x75670000,0x3fef6ae7 - .long 0x00c52b20,0xbd67cf2e - .long 0x4ac44000,0x3fef81b8 - .long 0x10fed627,0x3d2f2407 - .long 0x6c4e4000,0x3fef9894 - .long 0xd2088b22,0x3d61d346 - .long 0xe53ac000,0x3fefaf7b - .long 0xf5920222,0x3d69b7dc - .long 0xc0d04000,0x3fefc66e - .long 0xdbf33c61,0x3d6314d8 - .long 0x0a660000,0x3fefdd6d - .long 0x088b0624,0x3d603dc6 - .long 0xcd644000,0x3feff476 - .long 0xf02b035e,0x3d6e05d5 - .type __libm_log2l_table_256,@object - .size __libm_log2l_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log_table.S deleted file mode 100644 index 8f16b4ac78..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log_table.S +++ /dev/null @@ -1,560 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_log_table_256 - .globl __libm_log_table_256 -__libm_log_table_256: - .long 0x2779c19c,0x3e057562 - .long 0x00000000,0x3f600401 - .long 0x540e0a5d,0x3df4586b - .long 0x00000000,0x3f781212 - .long 0x5df1d574,0x3e3f2d06 - .long 0x00000000,0x3f841929 - .long 0xe0cc0310,0x3e3098eb - .long 0x00000000,0x3f8c3173 - .long 0x861d36aa,0x3e1ac733 - .long 0x00000000,0x3f91a6b9 - .long 0x0e5dc270,0x3e3766b0 - .long 0x00000000,0x3f95ba9a - .long 0xcf80538b,0x3dfd0c97 - .long 0x00000000,0x3f99d2a8 - .long 0x01095e5d,0x3e22cbcc - .long 0x00000000,0x3f9d6b27 - .long 0x5531753a,0x3e5433bf - .long 0x00000000,0x3fa0c58f - .long 0x86a4cae2,0x3e4e32f3 - .long 0x00000000,0x3fa2954c - .long 0x2b382296,0x3e36d4b6 - .long 0x00000000,0x3fa4a94d - .long 0x6b08209f,0x3e5e5a97 - .long 0x00000000,0x3fa67c94 - .long 0x0d02a20b,0x3e56c61e - .long 0x00000000,0x3fa85188 - .long 0xe988d46e,0x3e57ce75 - .long 0x00000000,0x3faa6b8a - .long 0x78fa4c28,0x3e0bdcaa - .long 0x00000000,0x3fac441e - .long 0x069e5bd9,0x3e23606d - .long 0x00000000,0x3fae1e67 - .long 0x008c9838,0x3e21ab93 - .long 0x00000000,0x3faffa69 - .long 0xc0123f2a,0x3e638bb4 - .long 0x00000000,0x3fb0ec13 - .long 0x42c9365e,0x3e590f46 - .long 0x00000000,0x3fb1dbd2 - .long 0xe38bd0cb,0x3e609fcb - .long 0x00000000,0x3fb2cc72 - .long 0xcc85ea5e,0x3e64fa3d - .long 0x00000000,0x3fb3bdf5 - .long 0xb814e378,0x3e5ea804 - .long 0x00000000,0x3fb4b05d - .long 0xc07f6cbe,0x3e5f3ad5 - .long 0x00000000,0x3fb580db - .long 0x4f332994,0x3e6126cb - .long 0x00000000,0x3fb674f0 - .long 0x46bb18e7,0x3e4635ab - .long 0x00000000,0x3fb769ef - .long 0x23f3f334,0x3e43a835 - .long 0x00000000,0x3fb85fd9 - .long 0x622b8758,0x3e575652 - .long 0x00000000,0x3fb9335e - .long 0xfa6531cd,0x3e406472 - .long 0x00000000,0x3fba2b02 - .long 0xd57cb81c,0x3e658350 - .long 0x00000000,0x3fbb0004 - .long 0x843191b0,0x3e5da7f2 - .long 0x00000000,0x3fbbf968 - .long 0x750465fd,0x3e67fdc2 - .long 0x00000000,0x3fbccfed - .long 0xa89401fa,0x3e58e111 - .long 0x00000000,0x3fbda727 - .long 0xde61a8fd,0x3e5ff843 - .long 0x00000000,0x3fbea325 - .long 0xbcbe8b53,0x3e6fdb7f - .long 0x00000000,0x3fbf7be9 - .long 0x7ce635d5,0x3e64bfc9 - .long 0x00000000,0x3fc02ab3 - .long 0x133742da,0x3e65e748 - .long 0x00000000,0x3fc097ce - .long 0x8f7bc671,0x3e7044fc - .long 0x00000000,0x3fc1178e - .long 0xcce888b8,0x3e6f6fb3 - .long 0x00000000,0x3fc18574 - .long 0xa08b164f,0x3e52f92e - .long 0x00000000,0x3fc1f3b9 - .long 0x56b4e87b,0x3e4e6ddf - .long 0x00000000,0x3fc2625d - .long 0x73ad9970,0x3e390d02 - .long 0x00000000,0x3fc2d161 - .long 0x85c23082,0x3e72e822 - .long 0x00000000,0x3fc340c5 - .long 0xaa42e1ae,0x3e69d5fc - .long 0x00000000,0x3fc3b08b - .long 0x06ed14f1,0x3e306f00 - .long 0x00000000,0x3fc40dfb - .long 0xef836a49,0x3e7d194b - .long 0x00000000,0x3fc47e74 - .long 0xbc83d21d,0x3e7ec8cd - .long 0x00000000,0x3fc4ef51 - .long 0xa2c28034,0x3e7c0574 - .long 0x00000000,0x3fc56092 - .long 0x3530a5ba,0x3e65f35d - .long 0x00000000,0x3fc5d238 - .long 0xbb20ab0e,0x3e5b99ae - .long 0x00000000,0x3fc6313a - .long 0x706cb199,0x3e7b577a - .long 0x00000000,0x3fc6a399 - .long 0x8350bc53,0x3e7ba79c - .long 0x00000000,0x3fc70337 - .long 0x274badf2,0x3e428f61 - .long 0x00000000,0x3fc77654 - .long 0x16849fa4,0x3e550581 - .long 0x00000000,0x3fc7e9d8 - .long 0x4baffaa4,0x3e6d67d4 - .long 0x00000000,0x3fc84a6b - .long 0x61fae141,0x3e7abeb4 - .long 0x00000000,0x3fc8ab47 - .long 0x0369cf31,0x3e7212cb - .long 0x00000000,0x3fc91fe4 - .long 0x9d5bb3d2,0x3e60046a - .long 0x00000000,0x3fc98163 - .long 0x904d6866,0x3e2c2259 - .long 0x00000000,0x3fc9f6c4 - .long 0xa19f5411,0x3e549a47 - .long 0x00000000,0x3fca58e7 - .long 0x759a5351,0x3e7862d2 - .long 0x00000000,0x3fcabb55 - .long 0xf400c4b3,0x3e62467b - .long 0x00000000,0x3fcb1e10 - .long 0xf9503717,0x3e727c6c - .long 0x00000000,0x3fcb94ee - .long 0xabdf1b3f,0x3e780cea - .long 0x00000000,0x3fcbf851 - .long 0xe97aab9f,0x3e652fc8 - .long 0x00000000,0x3fcc5c02 - .long 0x8a4a9e8b,0x3e793b67 - .long 0x00000000,0x3fccc000 - .long 0xce7d8064,0x3e73390a - .long 0x00000000,0x3fcd244d - .long 0x2835ff73,0x3e5fd97a - .long 0x00000000,0x3fcd88e9 - .long 0x804954d6,0x3e5bf577 - .long 0x00000000,0x3fcdedd4 - .long 0x024244ec,0x3e7ffce2 - .long 0x00000000,0x3fce530e - .long 0x7137ba40,0x3e4648b9 - .long 0x00000000,0x3fceb89a - .long 0x7bcea6d1,0x3e7f5bf3 - .long 0x00000000,0x3fcf1e75 - .long 0x1abc74cf,0x3e5756be - .long 0x00000000,0x3fcf84a3 - .long 0xe6831bc0,0x3e59f503 - .long 0x00000000,0x3fcfeb22 - .long 0x83851858,0x3e88e06b - .long 0x00000000,0x3fd028f9 - .long 0x6b43c71e,0x3e8c1b2c - .long 0x00000000,0x3fd05c8b - .long 0xf2ea89fa,0x3e81f15c - .long 0x00000000,0x3fd085eb - .long 0x2224e892,0x3e8c65a3 - .long 0x00000000,0x3fd0b9c8 - .long 0x20336a5b,0x3e782de0 - .long 0x00000000,0x3fd0edd0 - .long 0x8fdd9770,0x3e733c01 - .long 0x00000000,0x3fd12202 - .long 0x9a817c85,0x3e824f5d - .long 0x00000000,0x3fd14be2 - .long 0x5be801bd,0x3e81de31 - .long 0x00000000,0x3fd18061 - .long 0xc766b993,0x3e87c5f8 - .long 0x00000000,0x3fd1b50b - .long 0x85a1f823,0x3e88f9e4 - .long 0x00000000,0x3fd1df4c - .long 0x350fbd75,0x3e7b43ae - .long 0x00000000,0x3fd21445 - .long 0x4920ddbb,0x3e8323d7 - .long 0x00000000,0x3fd23ec5 - .long 0x5f6600ba,0x3e83f0e1 - .long 0x00000000,0x3fd2740d - .long 0x4073b3be,0x3e8579bf - .long 0x00000000,0x3fd29ecd - .long 0x72f2232b,0x3e256e67 - .long 0x00000000,0x3fd2d466 - .long 0x3a896d5f,0x3e8609d5 - .long 0x00000000,0x3fd2ff66 - .long 0x8ddf913a,0x3e72cd56 - .long 0x00000000,0x3fd33550 - .long 0xd7253e69,0x3e77b113 - .long 0x00000000,0x3fd36092 - .long 0xce9e941f,0x3e88666f - .long 0x00000000,0x3fd38bf1 - .long 0x60ed52d8,0x3e7dcccc - .long 0x00000000,0x3fd3c252 - .long 0x0f983d68,0x3e78f05a - .long 0x00000000,0x3fd3edf4 - .long 0x6390dbb2,0x3e61eaf4 - .long 0x00000000,0x3fd419b4 - .long 0xe916a76d,0x3e8c0a73 - .long 0x00000000,0x3fd44591 - .long 0x2b59a2e0,0x3e7d6dbc - .long 0x00000000,0x3fd47c91 - .long 0xc24fc7a2,0x3e70554a - .long 0x00000000,0x3fd4a8b3 - .long 0x33faf275,0x3e821120 - .long 0x00000000,0x3fd4d4f3 - .long 0x2cfac6d3,0x3e81b43f - .long 0x00000000,0x3fd50152 - .long 0x3d98a28d,0x3e78d1f5 - .long 0x00000000,0x3fd52dd0 - .long 0x44e3b5b4,0x3e6e3dc5 - .long 0x00000000,0x3fd55a6d - .long 0x2c814b0b,0x3e658895 - .long 0x00000000,0x3fd5925d - .long 0x6c7ee0a5,0x3e7ad50f - .long 0x00000000,0x3fd5bf40 - .long 0xd6e34245,0x3e6eae1a - .long 0x00000000,0x3fd5ec43 - .long 0x83dd4a7f,0x3e89b605 - .long 0x00000000,0x3fd61965 - .long 0xa87b925b,0x3e724d6c - .long 0x00000000,0x3fd646a8 - .long 0xd28ed1d3,0x3e8ba63b - .long 0x00000000,0x3fd6740a - .long 0x18a4a613,0x3e86e94b - .long 0x00000000,0x3fd6a18d - .long 0xb0b244a7,0x3e3619c3 - .long 0x00000000,0x3fd6cf31 - .long 0x173b6f5e,0x3e8d0a5e - .long 0x00000000,0x3fd6f180 - .long 0x3be91c4c,0x3e7c6e25 - .long 0x00000000,0x3fd71f5d - .long 0xab8359ed,0x3e8dfacd - .long 0x00000000,0x3fd74d5a - .long 0x6fb93ec4,0x3e82457a - .long 0x00000000,0x3fd77b79 - .long 0x3c4bbc8b,0x3e8113e3 - .long 0x00000000,0x3fd7a9b9 - .long 0x31fa7741,0x3e2bf5b5 - .long 0x00000000,0x3fd7d81b - .long 0x186f4789,0x3e69c139 - .long 0x00000000,0x3fd8069e - .long 0x7956aae8,0x3e8a7df1 - .long 0x00000000,0x3fd82996 - .long 0xfeab799a,0x3e7ddb72 - .long 0x00000000,0x3fd85855 - .long 0x33b8ef04,0x3e760c9f - .long 0x00000000,0x3fd88736 - .long 0x19dccb10,0x3e82e757 - .long 0x00000000,0x3fd8aa75 - .long 0x9c910289,0x3e8b9104 - .long 0x00000000,0x3fd8d992 - .long 0xa230be1d,0x3e8d4fb2 - .long 0x00000000,0x3fd908d2 - .long 0xcac1703a,0x3e8cf381 - .long 0x00000000,0x3fd92c59 - .long 0xb4a553e7,0x3e743b8f - .long 0x00000000,0x3fd95bd7 - .long 0x5b5274b7,0x3e51a3ee - .long 0x00000000,0x3fd98b78 - .long 0x0d70a52d,0x3e8e67a8 - .long 0x00000000,0x3fd9af47 - .long 0x4f0d2c7f,0x3e483229 - .long 0x00000000,0x3fd9df27 - .long 0xb48f7d3d,0x3e8da29f - .long 0x00000000,0x3fda0325 - .long 0xc6457f9d,0x3e2127d3 - .long 0x00000000,0x3fda3344 - .long 0xe0b95e88,0x3e77a030 - .long 0x00000000,0x3fda5772 - .long 0x991f7846,0x3e565dd1 - .long 0x00000000,0x3fda87d0 - .long 0x256f237b,0x3e7b00fe - .long 0x00000000,0x3fdaac2e - .long 0xa0437713,0x3e7bf7da - .long 0x00000000,0x3fdadccc - .long 0xc8192dd8,0x3e6f58f3 - .long 0x00000000,0x3fdb015b - .long 0xa41f8565,0x3e6d31ac - .long 0x00000000,0x3fdb323a - .long 0x25494b61,0x3e3118a4 - .long 0x00000000,0x3fdb56fa - .long 0x92694e9d,0x3e84cb37 - .long 0x00000000,0x3fdb881a - .long 0x2c99792a,0x3e8de7b6 - .long 0x00000000,0x3fdbad0b - .long 0x85ec7449,0x3e82ef03 - .long 0x00000000,0x3fdbd212 - .long 0x0c4250d7,0x3e6b7844 - .long 0x00000000,0x3fdc0392 - .long 0xfce511d5,0x3e5e4d32 - .long 0x00000000,0x3fdc28cb - .long 0x78348ca5,0x3e8708e4 - .long 0x00000000,0x3fdc4e19 - .long 0x992488fb,0x3e88e8aa - .long 0x00000000,0x3fdc7ff9 - .long 0xc144344b,0x3e793a76 - .long 0x00000000,0x3fdca57b - .long 0x5f7d6efe,0x3e44b9d7 - .long 0x00000000,0x3fdccb13 - .long 0x4de9f3e0,0x3e8a31e6 - .long 0x00000000,0x3fdcf0c0 - .long 0x80488966,0x3e7d6d68 - .long 0x00000000,0x3fdd2320 - .long 0x9add7f4d,0x3e71b7be - .long 0x00000000,0x3fdd4902 - .long 0xb9ac5131,0x3e8231a4 - .long 0x00000000,0x3fdd6efa - .long 0x4bdc3bac,0x3e7c1eb9 - .long 0x00000000,0x3fdd9509 - .long 0xaa85604a,0x3e8fd258 - .long 0x00000000,0x3fddbb2e - .long 0x57753a10,0x3e6a22f2 - .long 0x00000000,0x3fddee2f - .long 0xcd94df8d,0x3e5a2726 - .long 0x00000000,0x3fde148a - .long 0x7ff6aa8c,0x3e4493fe - .long 0x00000000,0x3fde3afc - .long 0xb6cae4c0,0x3e6036a8 - .long 0x00000000,0x3fde6185 - .long 0x546c92af,0x3e7e208f - .long 0x00000000,0x3fde8825 - .long 0x8619d6bd,0x3e67564c - .long 0x00000000,0x3fdeaedd - .long 0xf8b97910,0x3e77d0da - .long 0x00000000,0x3fded5ac - .long 0x5c542068,0x3e6368b5 - .long 0x00000000,0x3fdefc93 - .long 0xbff8880b,0x3e8442ae - .long 0x00000000,0x3fdf2391 - .long 0x259bcade,0x3e8dc063 - .long 0x00000000,0x3fdf4aa7 - .long 0xd802b8c4,0x3e63e185 - .long 0x00000000,0x3fdf71d6 - .long 0xde5f6650,0x3e7b2cec - .long 0x00000000,0x3fdf991c - .long 0x21ff49a1,0x3e8b4d35 - .long 0x00000000,0x3fdfc07a - .long 0xa7c2b8c5,0x3e81d607 - .long 0x00000000,0x3fdfe7f1 - .long 0x0b9d6ee5,0x3e84f140 - .long 0x00000000,0x3fe007c0 - .long 0xd0756a93,0x3e70cc52 - .long 0x00000000,0x3fe01b94 - .long 0x3aad0772,0x3e800319 - .long 0x00000000,0x3fe02f74 - .long 0x759dd00c,0x3e97cec0 - .long 0x00000000,0x3fe04360 - .long 0xc67418f8,0x3e9588ff - .long 0x00000000,0x3fe05759 - .long 0x51e8da67,0x3e6911cf - .long 0x00000000,0x3fe06b5f - .long 0xa048907b,0x3e44cf15 - .long 0x00000000,0x3fe078bf - .long 0xc39803ff,0x3e8a1f9e - .long 0x00000000,0x3fe08cd9 - .long 0x06525ba1,0x3e8d33e4 - .long 0x00000000,0x3fe0a100 - .long 0x3b46098d,0x3e7d11a2 - .long 0x00000000,0x3fe0b534 - .long 0x39b814fa,0x3e991286 - .long 0x00000000,0x3fe0c974 - .long 0x432f7532,0x3e782dcc - .long 0x00000000,0x3fe0ddc2 - .long 0x4618affd,0x3e82ebf2 - .long 0x00000000,0x3fe0eb52 - .long 0x1d77bbef,0x3e8084e9 - .long 0x00000000,0x3fe0ffb5 - .long 0xcfaf1c2c,0x3e7ed4be - .long 0x00000000,0x3fe11425 - .long 0xbfce7a70,0x3e83c766 - .long 0x00000000,0x3fe128a2 - .long 0x1930b4c4,0x3e84afc2 - .long 0x00000000,0x3fe13652 - .long 0x4b441313,0x3e862d2a - .long 0x00000000,0x3fe14ae5 - .long 0xcb6b7c9c,0x3e94338e - .long 0x00000000,0x3fe15f85 - .long 0xfd3aea12,0x3e7c608c - .long 0x00000000,0x3fe16d4d - .long 0x266a0b45,0x3e9841ba - .long 0x00000000,0x3fe18203 - .long 0xe75899eb,0x3e978963 - .long 0x00000000,0x3fe196c7 - .long 0x9e2b1260,0x3e7c5bd1 - .long 0x00000000,0x3fe1a4a7 - .long 0xa79bc2a5,0x3e98192c - .long 0x00000000,0x3fe1b981 - .long 0x0d5eb986,0x3e9d1762 - .long 0x00000000,0x3fe1ce69 - .long 0x28836a17,0x3e93bc0d - .long 0x00000000,0x3fe1dc61 - .long 0xb47416ca,0x3e9455a1 - .long 0x00000000,0x3fe1f160 - .long 0xdf997414,0x3e8dd01c - .long 0x00000000,0x3fe2066d - .long 0x72755e61,0x3e9748f4 - .long 0x00000000,0x3fe2147d - .long 0x586cc870,0x3e978bd7 - .long 0x00000000,0x3fe229a1 - .long 0x05ced5b8,0x3e90834a - .long 0x00000000,0x3fe237c1 - .long 0xb34d2934,0x3e9cdf01 - .long 0x00000000,0x3fe24cfc - .long 0xd891ba01,0x3e857355 - .long 0x00000000,0x3fe25b2c - .long 0x103a61e4,0x3e8357df - .long 0x00000000,0x3fe2707f - .long 0x7071361a,0x3e908594 - .long 0x00000000,0x3fe285e0 - .long 0xdcc2f0a7,0x3e81c22d - .long 0x00000000,0x3fe29429 - .long 0xc30f37c8,0x3e89c2bf - .long 0x00000000,0x3fe2a9a2 - .long 0x604c3ff4,0x3e76468e - .long 0x00000000,0x3fe2b7fb - .long 0x7d42bf88,0x3e88e57d - .long 0x00000000,0x3fe2c65a - .long 0xd0b235f1,0x3e85ec37 - .long 0x00000000,0x3fe2dbf5 - .long 0xca965170,0x3e987f2e - .long 0x00000000,0x3fe2ea64 - .long 0xb996d64e,0x3e71b426 - .long 0x00000000,0x3fe30018 - .long 0xb998ef97,0x3e9d3516 - .long 0x00000000,0x3fe30e97 - .long 0x9d3de3b9,0x3e9d7ba6 - .long 0x00000000,0x3fe32463 - .long 0xcad27856,0x3e78a56b - .long 0x00000000,0x3fe332f4 - .long 0x9f9e227c,0x3e5ce8c9 - .long 0x00000000,0x3fe348d9 - .long 0xadb2d775,0x3e9f1887 - .long 0x00000000,0x3fe35779 - .long 0x53263e64,0x3e92c34d - .long 0x00000000,0x3fe36621 - .long 0xcd4571cb,0x3e93e786 - .long 0x00000000,0x3fe37c29 - .long 0xe748544b,0x3e671976 - .long 0x00000000,0x3fe38ae2 - .long 0xf9cce311,0x3e85e980 - .long 0x00000000,0x3fe399a1 - .long 0x3a222092,0x3e9fcef7 - .long 0x00000000,0x3fe3afcc - .long 0xed5008bd,0x3e840d4c - .long 0x00000000,0x3fe3be9d - .long 0x1452e9ec,0x3e901695 - .long 0x00000000,0x3fe3cd74 - .long 0xb62b2ce8,0x3e7c8c7b - .long 0x00000000,0x3fe3e3c4 - .long 0xd8d571ad,0x3e964fda - .long 0x00000000,0x3fe3f2ac - .long 0x498c3678,0x3e7092e5 - .long 0x00000000,0x3fe4019c - .long 0xc8960bd4,0x3e884e25 - .long 0x00000000,0x3fe41810 - .long 0x5157ce35,0x3e84637d - .long 0x00000000,0x3fe42711 - .long 0xafcc2a6b,0x3e8384ad - .long 0x00000000,0x3fe43619 - .long 0x9a4ffe6d,0x3e875a3a - .long 0x00000000,0x3fe44528 - .long 0x4e8516c0,0x3e819322 - .long 0x00000000,0x3fe45bcc - .long 0xfe3457c8,0x3e70f88b - .long 0x00000000,0x3fe46aed - .long 0x69a4a836,0x3e73f451 - .long 0x00000000,0x3fe47a15 - .long 0x32f98351,0x3e87bfff - .long 0x00000000,0x3fe48944 - .long 0x06a8d925,0x3e9796d3 - .long 0x00000000,0x3fe4a018 - .long 0xaef076e2,0x3e593acb - .long 0x00000000,0x3fe4af5a - .long 0xd0e13620,0x3e94b7b7 - .long 0x00000000,0x3fe4bea2 - .long 0x88cfb12e,0x3e91e215 - .long 0x00000000,0x3fe4cdf2 - .long 0x0b0cb912,0x3e99f328 - .long 0x00000000,0x3fe4dd49 - .long 0xa0e67b10,0x3e8b9929 - .long 0x00000000,0x3fe4eca8 - .long 0xb401f873,0x3e7e6c75 - .long 0x00000000,0x3fe503c4 - .long 0x15ce5326,0x3e8999ff - .long 0x00000000,0x3fe51335 - .long 0x5f3840b2,0x3e4ce28f - .long 0x00000000,0x3fe522ae - .long 0x2b9988ba,0x3e73433c - .long 0x00000000,0x3fe5322e - .long 0x0122cc5c,0x3e9972f3 - .long 0x00000000,0x3fe541b5 - .long 0xac4eb353,0x3e9fb797 - .long 0x00000000,0x3fe55144 - .long 0x78d26225,0x3e988a2a - .long 0x00000000,0x3fe560db - .long 0x333017fe,0x3e735dc6 - .long 0x00000000,0x3fe5707a - .long 0xff9e8c9a,0x3e5dab71 - .long 0x00000000,0x3fe587f6 - .long 0xe623c257,0x3e92ef91 - .long 0x00000000,0x3fe597a7 - .long 0x715f0d98,0x3e9ac697 - .long 0x00000000,0x3fe5a760 - .long 0x21dc5b09,0x3e9a52be - .long 0x00000000,0x3fe5b721 - .long 0xdf20565e,0x3e928863 - .long 0x00000000,0x3fe5c6ea - .long 0x7afa1d46,0x3e717543 - .long 0x00000000,0x3fe5d6bb - .long 0x71f3b726,0x3e90c8ba - .long 0x00000000,0x3fe5e693 - .long 0xda3470be,0x3e98c345 - .long 0x00000000,0x3fe5f673 - .long 0x24c45894,0x3e9d470b - .long 0x00000000,0x3fe6065b - .long 0x0d6b6214,0x3e9f4f98 - .long 0x00000000,0x3fe6164b - .long 0xe85e3147,0x3e9fd9f2 - .long 0x00000000,0x3fe62643 - .type __libm_log_table_256,@object - .size __libm_log_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log_wmt.S deleted file mode 100644 index b43eb8a34a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/log_wmt.S +++ /dev/null @@ -1,800 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin log - .text - .align 16,0x90 - .globl log -log: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - xorpd %xmm3, %xmm3 - movl $30704, %edx - pinsrw $3, %edx, %xmm3 - movsd 112(%esp), %xmm0 - movapd %xmm0, %xmm1 - movl $32768, %ecx - movd %ecx, %xmm4 - movsd 2128(%ebx), %xmm5 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - psllq $5, %xmm0 - movl $16352, %ecx - psrlq $34, %xmm0 - rcpss %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $228, %xmm5, %xmm6 - psrlq $12, %xmm1 - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - paddd %xmm4, %xmm0 - orpd %xmm3, %xmm1 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm1, %xmm5 - andpd %xmm6, %xmm0 - subsd %xmm5, %xmm1 - mulpd %xmm0, %xmm5 - andl $32752, %eax - subl %ecx, %eax - cvtsi2sdl %eax, %xmm7 - mulsd %xmm0, %xmm1 - movsd 2064(%ebx), %xmm6 - movapd 2080(%ebx), %xmm3 - subsd %xmm2, %xmm5 - andl $16711680, %edx - shrl $12, %edx - movapd (%ebx,%edx), %xmm0 - movapd 2096(%ebx), %xmm4 - addsd %xmm5, %xmm1 - movapd 2112(%ebx), %xmm2 - mulsd %xmm7, %xmm6 - pshufd $68, %xmm1, %xmm5 - mulsd 2072(%ebx), %xmm7 - mulsd %xmm1, %xmm3 - addsd %xmm6, %xmm0 - mulpd %xmm5, %xmm4 - mulpd %xmm5, %xmm5 - pshufd $228, %xmm0, %xmm6 - addsd %xmm1, %xmm0 - addpd %xmm2, %xmm4 - mulpd %xmm5, %xmm3 - subsd %xmm0, %xmm6 - mulsd %xmm1, %xmm4 - pshufd $238, %xmm0, %xmm2 - addsd %xmm6, %xmm1 - mulsd %xmm5, %xmm5 - addsd %xmm2, %xmm7 - addpd %xmm3, %xmm4 - addsd %xmm7, %xmm1 - mulpd %xmm5, %xmm4 - addsd %xmm4, %xmm1 - pshufd $238, %xmm4, %xmm5 - addsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - movsd 112(%esp), %xmm0 - movapd %xmm0, %xmm1 - addl $16, %eax - cmpl $32768, %eax - jae .L_2TAG_PACKET_3.0.3 - cmpl $16, %eax - jb .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_5.0.3: - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - ja .L_2TAG_PACKET_5.0.3 - cmpl $0, %edx - ja .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_3.0.3: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - addl %ecx, %ecx - cmpl $-2097152, %ecx - jae .L_2TAG_PACKET_6.0.3 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_7.0.3: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %eax - pinsrw $3, %eax, %xmm1 - movl $3, %edx - mulsd %xmm1, %xmm0 -.L_2TAG_PACKET_9.0.3: - movsd %xmm0, (%esp) - movsd 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_10.0.3 -.L_2TAG_PACKET_8.0.3: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $49136, %eax - pinsrw $3, %eax, %xmm0 - divsd %xmm1, %xmm0 - movl $2, %edx - jmp .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_4.0.3: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_8.0.3 - xorpd %xmm1, %xmm1 - movl $18416, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - movapd %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - psllq $5, %xmm0 - movl $18416, %ecx - psrlq $34, %xmm0 - rcpss %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $228, %xmm5, %xmm6 - psrlq $12, %xmm1 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_10.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type log,@function - .size log,.-log - .data -# -- End log - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4277811200 - .long 1072049730 - .long 2479318832 - .long 1026487127 - .long 2854492160 - .long 1072033410 - .long 215631550 - .long 1025638968 - .long 1547061248 - .long 1072017216 - .long 2886781435 - .long 1026423395 - .long 649825280 - .long 1072001146 - .long 4281533405 - .long 1024038923 - .long 646346752 - .long 1071985198 - .long 1562735921 - .long 1023790276 - .long 2203734016 - .long 1071969370 - .long 1838397691 - .long 3173936209 - .long 1872169984 - .long 1071953661 - .long 3981202460 - .long 1022325013 - .long 669557760 - .long 1071938069 - .long 4182597802 - .long 3173174122 - .long 4076413952 - .long 1071922591 - .long 1209029111 - .long 3170736207 - .long 556125184 - .long 1071907228 - .long 821086028 - .long 3173437049 - .long 204914688 - .long 1071891976 - .long 2097025986 - .long 3171071798 - .long 387545088 - .long 1071876834 - .long 3142936996 - .long 3173092218 - .long 2912783360 - .long 1071861800 - .long 2502420140 - .long 1024505919 - .long 1144260608 - .long 1071846874 - .long 3315658140 - .long 3173469843 - .long 1471209472 - .long 1071832053 - .long 129621009 - .long 3172443877 - .long 1829683200 - .long 1071817336 - .long 3885467693 - .long 1025535275 - .long 288676864 - .long 1071802722 - .long 86139472 - .long 3171639793 - .long 3636378624 - .long 1071788208 - .long 1850238587 - .long 1024654342 - .long 1606817792 - .long 1071773795 - .long 3388899795 - .long 3173675586 - .long 1236164608 - .long 1071759480 - .long 3983599207 - .long 1020046558 - .long 1089616896 - .long 1071745262 - .long 4171974224 - .long 1024773198 - .long 4143093760 - .long 1071731139 - .long 2727587401 - .long 3173965207 - .long 600267776 - .long 1071717112 - .long 3147685042 - .long 3173353031 - .long 2249313280 - .long 1071703177 - .long 125835074 - .long 1025255832 - .long 3805303808 - .long 1071689334 - .long 2289991207 - .long 1025460331 - .long 87278592 - .long 1071675583 - .long 1106114045 - .long 1025933602 - .long 3195405312 - .long 1071661920 - .long 3885316576 - .long 3171206239 - .long 3853649920 - .long 1071648346 - .long 2977069852 - .long 3171236771 - .long 2944026624 - .long 1071625048 - .long 1008093493 - .long 1023444474 - .long 3993180160 - .long 1071598247 - .long 1862355595 - .long 1024642533 - .long 1454641152 - .long 1071571617 - .long 1514603089 - .long 1026500596 - .long 3286085632 - .long 1071545154 - .long 1400028424 - .long 3173279056 - .long 438773760 - .long 1071518858 - .long 120727864 - .long 3172148914 - .long 1212979200 - .long 1071492725 - .long 1625055594 - .long 3172901933 - .long 1189017600 - .long 1071466754 - .long 3920062376 - .long 1025727407 - .long 403064832 - .long 1071440943 - .long 1053271728 - .long 3171391427 - .long 3343210496 - .long 1071415289 - .long 3243395502 - .long 3173627613 - .long 1765777408 - .long 1071389792 - .long 2145968512 - .long 1026354304 - .long 461430784 - .long 1071364449 - .long 4094322285 - .long 1026021467 - .long 71706624 - .long 1071339258 - .long 763632021 - .long 1024496933 - .long 1380503552 - .long 1071314217 - .long 1383547992 - .long 3173088453 - .long 1015732224 - .long 1071289325 - .long 3198646877 - .long 1025390322 - .long 35977216 - .long 1071264580 - .long 2141026805 - .long 1025754693 - .long 3927306240 - .long 1071239979 - .long 282116272 - .long 3173394334 - .long 1125341184 - .long 1071215523 - .long 2768427504 - .long 3172279059 - .long 1666971648 - .long 1071191208 - .long 786837629 - .long 3172427445 - .long 2827694080 - .long 1071167033 - .long 3857122416 - .long 3173014241 - .long 2003683328 - .long 1071142997 - .long 859010954 - .long 1026545007 - .long 1004017664 - .long 1071119098 - .long 3356644970 - .long 3173458064 - .long 1753020416 - .long 1071095334 - .long 788338552 - .long 1026157693 - .long 1992718336 - .long 1071071704 - .long 1239179443 - .long 1026394889 - .long 3870234624 - .long 1071048206 - .long 2082614663 - .long 1024926053 - .long 1050437632 - .long 1071024840 - .long 660007840 - .long 1025548499 - .long 188395520 - .long 1071001603 - .long 3878792704 - .long 3173889571 - .long 3747176448 - .long 1070978493 - .long 144991708 - .long 3171552042 - .long 1405669376 - .long 1070955511 - .long 3999088879 - .long 1025486317 - .long 121151488 - .long 1070932654 - .long 2170865497 - .long 1026473584 - .long 2652319744 - .long 1070909920 - .long 453695652 - .long 3173916809 - .long 3262236672 - .long 1070887309 - .long 157800053 - .long 3173984206 - .long 601221120 - .long 1070864820 - .long 3968917661 - .long 1023992886 - .long 1999843328 - .long 1070842450 - .long 3053895004 - .long 1024998228 - .long 1992167424 - .long 1070820199 - .long 2968614856 - .long 1024552653 - .long 3788726272 - .long 1070798065 - .long 3542170808 - .long 3173573242 - .long 2094829568 - .long 1070776048 - .long 1246758132 - .long 1026202874 - .long 288675840 - .long 1070754146 - .long 3747328950 - .long 1026331585 - .long 1829681152 - .long 1070732357 - .long 3125197546 - .long 1024100318 - .long 1666869248 - .long 1070710681 - .long 1363656119 - .long 1026336493 - .long 3417110528 - .long 1070689116 - .long 4154791553 - .long 1026267853 - .long 2183653376 - .long 1070667662 - .long 1671819292 - .long 3173785870 - .long 1734434816 - .long 1070646317 - .long 373091049 - .long 1025972363 - .long 1615681536 - .long 1070625080 - .long 384650897 - .long 1022926043 - .long 1445382144 - .long 1070603950 - .long 344320330 - .long 3172397196 - .long 1823715328 - .long 1070569756 - .long 3389841200 - .long 1025231852 - .long 3839688704 - .long 1070527917 - .long 1706790417 - .long 3167363349 - .long 4293332992 - .long 1070486286 - .long 1614935088 - .long 1019351591 - .long 2966720512 - .long 1070444861 - .long 4145393717 - .long 3173711658 - .long 4066729984 - .long 1070403639 - .long 1974925028 - .long 3171437182 - .long 3337621504 - .long 1070362619 - .long 3314953170 - .long 3169971314 - .long 943448064 - .long 1070321799 - .long 1498682038 - .long 3173862340 - .long 1465634816 - .long 1070281176 - .long 1319952810 - .long 3171693965 - .long 1015734272 - .long 1070240749 - .long 1347821929 - .long 3173544515 - .long 118001664 - .long 1070200516 - .long 1751482746 - .long 1026134093 - .long 3707174912 - .long 1070160474 - .long 1486946159 - .long 1023930920 - .long 3946381312 - .long 1070120623 - .long 2867408081 - .long 3171368276 - .long 1699848192 - .long 1070080961 - .long 2590187139 - .long 1025379803 - .long 2235846656 - .long 1070041485 - .long 1888568069 - .long 3172754960 - .long 2339729408 - .long 1070002194 - .long 3852214753 - .long 3173323149 - .long 3196850176 - .long 1069963086 - .long 742141560 - .long 1025101707 - .long 1800683520 - .long 1069924160 - .long 3949500444 - .long 3172102179 - .long 3835801600 - .long 1069885413 - .long 3848895943 - .long 1025913832 - .long 2201202688 - .long 1069846845 - .long 1425913464 - .long 1025868665 - .long 2778279936 - .long 1069808453 - .long 2120889677 - .long 3173831128 - .long 2954203136 - .long 1069770236 - .long 592147081 - .long 1019621288 - .long 210141184 - .long 1069732193 - .long 3414275233 - .long 1023647084 - .long 709476352 - .long 1069694321 - .long 2413027164 - .long 1024462115 - .long 2116284416 - .long 1069656619 - .long 1144559924 - .long 1026336654 - .long 2183651328 - .long 1069619086 - .long 3459057650 - .long 1025634168 - .long 3047047168 - .long 1069581720 - .long 1879674924 - .long 3173508573 - .long 970711040 - .long 1069541521 - .long 1335954173 - .long 3173332182 - .long 2198478848 - .long 1069467449 - .long 2951103968 - .long 3173892200 - .long 1669611520 - .long 1069393703 - .long 531044147 - .long 1025149248 - .long 29114368 - .long 1069320280 - .long 3327831251 - .long 1025918673 - .long 2376949760 - .long 1069247176 - .long 737634533 - .long 3172176000 - .long 1085390848 - .long 1069174390 - .long 3108243400 - .long 3171828406 - .long 1566130176 - .long 1069101918 - .long 985483226 - .long 1025708380 - .long 792780800 - .long 1069029758 - .long 4184866295 - .long 1024426204 - .long 183156736 - .long 1068957907 - .long 2845699378 - .long 1022107277 - .long 1301782528 - .long 1068886362 - .long 1012735262 - .long 3173804294 - .long 1562411008 - .long 1068815121 - .long 2197086703 - .long 3170187813 - .long 2815549440 - .long 1068744181 - .long 2782613207 - .long 1026345054 - .long 2756124672 - .long 1068673540 - .long 2929486205 - .long 3173037800 - .long 3511050240 - .long 1068603195 - .long 1443733147 - .long 3173331549 - .long 3047047168 - .long 1068533144 - .long 1879674924 - .long 3172459997 - .long 3221667840 - .long 1068427825 - .long 1338588027 - .long 3171815742 - .long 3453861888 - .long 1068288883 - .long 1205348359 - .long 3172624626 - .long 3506110464 - .long 1068150514 - .long 893105198 - .long 1025571866 - .long 346013696 - .long 1068012714 - .long 3495569021 - .long 3172563349 - .long 4074029056 - .long 1067875476 - .long 3961106338 - .long 3171065595 - .long 3559784448 - .long 1067738798 - .long 1975385384 - .long 3173783155 - .long 797769728 - .long 1067602675 - .long 3760305787 - .long 1026047642 - .long 2313633792 - .long 1067467101 - .long 1559353171 - .long 1023480256 - .long 3960766464 - .long 1067213778 - .long 1067365107 - .long 1025865926 - .long 684261376 - .long 1066944805 - .long 844762164 - .long 3173687482 - .long 630718464 - .long 1066676905 - .long 2458269694 - .long 1024033081 - .long 1486061568 - .long 1066410070 - .long 115537874 - .long 3173243995 - .long 2743664640 - .long 1065886792 - .long 3665098304 - .long 3173471607 - .long 1971912704 - .long 1065357333 - .long 2577214440 - .long 3171993451 - .long 1498939392 - .long 1064306693 - .long 3409036923 - .long 1025599151 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 4277811200 - .long 1067855426 - .long 2479318832 - .long 1022292823 - .long 2454267026 - .long 1069697316 - .long 0 - .long 3218079744 - .long 1030730101 - .long 3217380702 - .long 1431655765 - .long 1070945621 - .long 2576980378 - .long 1070176665 - .long 0 - .long 3219128320 - .long 0 - .long 4294959104 - .long 0 - .long 4294959104 - .type static_const_table,@object - .size static_const_table,2144 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logb_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logb_wmt.S deleted file mode 100644 index f5d36ff39e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logb_wmt.S +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logb_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin logb - .text - .align 16,0x90 - .globl logb -logb: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movq %xmm0, 8(%esp) - psrlq $52, %xmm0 - movd %xmm0, %eax - andl $2047, %eax - subl $1, %eax - cmpl $2046, %eax - jae .L_2TAG_PACKET_0.0.3 - subl $1022, %eax - movl %eax, (%esp) - fildl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - movq 8(%esp), %xmm0 - movq 16(%ebx), %xmm1 - pxor %xmm2, %xmm2 - testl %eax, %eax - jg .L_2TAG_PACKET_2.0.3 - comisd %xmm2, %xmm0 - mulsd %xmm1, %xmm0 - je .L_2TAG_PACKET_3.0.3 - psrlq $52, %xmm0 - movd %xmm0, %eax - andl $2047, %eax - subl $1078, %eax - movl %eax, (%esp) - fildl (%esp) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - psrlq $60, %xmm0 - fldl 8(%esp) - movd %xmm0, %eax - andl $8, %eax - fmull (%ebx,%eax) - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - movq 8(%ebx), %xmm0 - divsd %xmm2, %xmm0 - movq %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $151, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) -.L_2TAG_PACKET_1.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type logb,@function - .size logb,.-logb - .data -# -- End logb - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .long 0 - .long 1130364928 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,32 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logbf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logbf.S deleted file mode 100644 index 69539c7124..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logbf.S +++ /dev/null @@ -1,122 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logbf.c" - .text -..TXTST0: -# -- Begin logbf - .text - .align 16,0x90 - .globl logbf -logbf: -# parameter 1: 16 + %esp -..B1.1: -..L1: - - subl $12, %esp - movl 16(%esp), %eax - movl %eax, %edx - andl $2147483647, %edx - addl $-8388608, %edx - cmpl $2130706432, %edx - jb ..B1.7 -..B1.2: - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - testl %edx, %edx - jge ..B1.6 -..B1.3: - cmpl $-8388608, %edx - je ..B1.8 -..B1.4: - flds 16(%esp) - fmuls .L_2il0floatpacket.1@GOTOFF(%ecx) - fstps 16(%esp) - movl 16(%esp), %eax - andl $2147483647, %eax - shrl $23, %eax - addl $-152, %eax - movl %eax, (%esp) - fildl (%esp) -..B1.5: - addl $12, %esp - ret -..B1.6: - flds 16(%esp) - shrl $31, %eax - fmuls _ones@GOTOFF(%ecx,%eax,4) - addl $12, %esp - ret -..B1.7: - shrl $23, %edx - addl $-126, %edx - movl %edx, (%esp) - fildl (%esp) - addl $12, %esp - ret -..B1.8: - fldz - fdivrs .L_2il0floatpacket.0@GOTOFF(%ecx) - addl $12, %esp - ret - .align 16,0x90 - .type logbf,@function - .size logbf,.-logbf - .data -# -- End logbf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4c000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logbl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logbl.S deleted file mode 100644 index f7fe85e705..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logbl.S +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logbl.c" - .text -..TXTST0: -# -- Begin logbl - .text - .align 16,0x90 - .globl logbl -logbl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp -..B1.2: - fnstcw 22(%esp) -..B1.3: - movzwl 22(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.18 -..B1.4: - orl $-64768, %edx - movw %dx, 20(%esp) -..B1.5: - fldcw 20(%esp) -..B1.6: - movl $1, %edx -..B1.7: - movzwl 16(%ebp), %ecx - andl $32767, %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - cmpl $32767, %ecx - je ..B1.17 -..B1.8: - testl %ecx, %ecx - jne ..B1.12 -..B1.9: - cmpl $0, 12(%ebp) - jne ..B1.11 -..B1.10: - cmpl $0, 8(%ebp) - je ..B1.16 -..B1.11: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%eax) - fstpt 8(%ebp) - movzwl 16(%ebp), %eax - andl $32767, %eax - addl $-16458, %eax - movl %eax, (%esp) - fildl (%esp) - fstpt 8(%esp) - jmp ..B1.13 -..B1.12: - addl $-16383, %ecx - movl %ecx, (%esp) - fildl (%esp) - fstpt 8(%esp) -..B1.13: - testl %edx, %edx - je ..B1.15 -..B1.14: - fldcw 22(%esp) -..B1.15: - fldt 8(%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.16: - fldl 8+_ones@GOTOFF(%eax) - fdivl _zeros@GOTOFF(%eax) - fstpt 8(%esp) - jmp ..B1.13 -..B1.17: - fldt 8(%ebp) - movzbl 17(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - fmull _ones@GOTOFF(%eax,%ecx,8) - fstpt 8(%esp) - jmp ..B1.13 -..B1.18: - xorl %edx, %edx - jmp ..B1.7 - .align 16,0x90 - .type logbl,@function - .size logbl,.-logbl - .data -# -- End logbl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logf_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logf_table.S deleted file mode 100644 index 5cf1f0703d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logf_table.S +++ /dev/null @@ -1,304 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logf_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_logf_table_256 - .globl __libm_logf_table_256 -__libm_logf_table_256: - .long 0x55d5889e,0x3f600401 - .long 0x14586b54,0x3f781212 - .long 0xf96832f0,0x3f841929 - .long 0x84c75f07,0x3f8c3173 - .long 0x1ac73386,0x3f91a6b9 - .long 0x5d9ac03a,0x3f95ba9a - .long 0x074325f4,0x3f99d2a8 - .long 0x25979802,0x3f9d6b27 - .long 0xa19dfaa9,0x3fa0c58f - .long 0x78cbce1b,0x3fa2954c - .long 0x2da96c57,0x3fa4a94d - .long 0xf2d4bb58,0x3fa67c94 - .long 0xb630f068,0x3fa85188 - .long 0xbe73af4c,0x3faa6b8a - .long 0x06f72a9e,0x3fac441e - .long 0x13606d07,0x3fae1e67 - .long 0x11ab9301,0x3faffa69 - .long 0x9c5da601,0x3fb0ec13 - .long 0x643d190b,0x3fb1dbd2 - .long 0x84fe5f1c,0x3fb2cc72 - .long 0xa7d1ee64,0x3fb3bdf5 - .long 0x7aa012e0,0x3fb4b05d - .long 0x7ceb5702,0x3fb580db - .long 0x89365a7a,0x3fb674f0 - .long 0x2c6b568d,0x3fb769ef - .long 0x27506a48,0x3fb85fd9 - .long 0x5d594989,0x3fb9335e - .long 0x20c8e5f5,0x3fba2b02 - .long 0xac1a86ac,0x3fbb0004 - .long 0x769fca11,0x3fbbf968 - .long 0xbfee13a8,0x3fbccfed - .long 0x638446a2,0x3fbda727 - .long 0x7fe10f7a,0x3fbea325 - .long 0xfedbfde6,0x3fbf7be9 - .long 0x52ff25f4,0x3fc02ab3 - .long 0x579d204d,0x3fc097ce - .long 0x8227e47c,0x3fc1178e - .long 0x7dbecf34,0x3fc18574 - .long 0x25f25d41,0x3fc1f3b9 - .long 0x1e6ddf57,0x3fc2625d - .long 0x0c86813a,0x3fc2d161 - .long 0x9741142e,0x3fc340c5 - .long 0x6757f2a9,0x3fc3b08b - .long 0x08378004,0x3fc40dfb - .long 0xe8ca5f7c,0x3fc47e74 - .long 0xf6466de4,0x3fc4ef51 - .long 0xe02ba516,0x3fc56092 - .long 0x57cd74d5,0x3fc5d238 - .long 0x37335d76,0x3fc6313a - .long 0xdabbd383,0x3fc6a399 - .long 0xdd3ce41a,0x3fc70337 - .long 0x128f6127,0x3fc77654 - .long 0x2a0b022d,0x3fc7e9d8 - .long 0x759f512f,0x3fc84a6b - .long 0xd5f5a310,0x3fc8ab47 - .long 0x9096581b,0x3fc91fe4 - .long 0x4011aa76,0x3fc98163 - .long 0x07089664,0x3fc9f6c4 - .long 0x29348f43,0x3fca58e7 - .long 0xc31693ad,0x3fcabb55 - .long 0x4919efd0,0x3fcb1e10 - .long 0x93e367cb,0x3fcb94ee - .long 0xc067555f,0x3fcbf851 - .long 0x54bf23a6,0x3fcc5c02 - .long 0xc9db3c52,0x3fccc000 - .long 0x99c85674,0x3fcd244d - .long 0x3fb2f450,0x3fcd88e9 - .long 0x37eaef01,0x3fcdedd4 - .long 0xffe71012,0x3fce530e - .long 0x1648b971,0x3fceb89a - .long 0xfadf9bde,0x3fcf1e75 - .long 0x2ead7c36,0x3fcf84a3 - .long 0x33ea07cd,0x3fcfeb22 - .long 0xc7035c1c,0x3fd028f9 - .long 0xe0d9635a,0x3fd05c8b - .long 0x8f8ae797,0x3fd085eb - .long 0xe32d1911,0x3fd0b9c8 - .long 0x60b78081,0x3fd0edd0 - .long 0x4cf0063f,0x3fd12202 - .long 0x927aecd4,0x3fd14be2 - .long 0x8ef18adf,0x3fd18061 - .long 0xbe2fc63b,0x3fd1b50b - .long 0xc7cf242d,0x3fd1df4c - .long 0x6d0eb8d4,0x3fd21445 - .long 0x991eba49,0x3fd23ec5 - .long 0x9f870afb,0x3fd2740d - .long 0xabcdfa04,0x3fd29ecd - .long 0x02adccee,0x3fd2d466 - .long 0xb04ea9d4,0x3fd2ff66 - .long 0x4b355a38,0x3fd33550 - .long 0x5ec44f5d,0x3fd36092 - .long 0xc3337e75,0x3fd38bf1 - .long 0x77333184,0x3fd3c252 - .long 0x63c1683e,0x3fd3edf4 - .long 0x23d5e8c7,0x3fd419b4 - .long 0xe0539f49,0x3fd44591 - .long 0x75b6f0ad,0x3fd47c91 - .long 0x41552b09,0x3fd4a8b3 - .long 0x908901a0,0x3fd4d4f3 - .long 0x8da1f968,0x3fd50152 - .long 0x6347d4f6,0x3fd52dd0 - .long 0x3c7b8a8a,0x3fd55a6d - .long 0x2b112a59,0x3fd5925d - .long 0x6b543db2,0x3fd5bf40 - .long 0x3d5c35ae,0x3fd5ec43 - .long 0xcdb02c1f,0x3fd61965 - .long 0x4935b2a2,0x3fd646a8 - .long 0xdd31de95,0x3fd6740a - .long 0xb74a58c5,0x3fd6a18d - .long 0x058670ec,0x3fd6cf31 - .long 0xe852f0ba,0x3fd6f180 - .long 0x71b894f0,0x3fd71f5d - .long 0xefd66d5c,0x3fd74d5a - .long 0x922bd37e,0x3fd77b79 - .long 0x889f19e2,0x3fd7a9b9 - .long 0x037eb6a6,0x3fd7d81b - .long 0x33827231,0x3fd8069e - .long 0xd3ef8bcb,0x3fd82996 - .long 0x776dcbfb,0x3fd85855 - .long 0x58327ccf,0x3fd88736 - .long 0x973ab8cf,0x3fd8aa75 - .long 0xdc8824e5,0x3fd8d992 - .long 0xea7d9512,0x3fd908d2 - .long 0xe79c0e56,0x3fd92c59 - .long 0x50ee3ed3,0x3fd95bd7 - .long 0x11a3ee5b,0x3fd98b78 - .long 0xf33d406c,0x3fd9af47 - .long 0x0c1914a8,0x3fd9df27 - .long 0xed14fda5,0x3fda0325 - .long 0x0224fa79,0x3fda3344 - .long 0x5e80c383,0x3fda5772 - .long 0x165dd199,0x3fda87d0 - .long 0x6c03f896,0x3fdaac2e - .long 0x6fdf6a81,0x3fdadccc - .long 0x3eb1e790,0x3fdb015b - .long 0x3a635948,0x3fdb323a - .long 0x04462909,0x3fdb56fa - .long 0xa659bc93,0x3fdb881a - .long 0xef3db165,0x3fdbad0b - .long 0x97781c2f,0x3fdbd212 - .long 0x36f08819,0x3fdc0392 - .long 0x1e4d32fd,0x3fdc28cb - .long 0xb84723c2,0x3fdc4e19 - .long 0xc74554c9,0x3fdc7ff9 - .long 0x64e9db05,0x3fdca57b - .long 0x0a5cebb0,0x3fdccb13 - .long 0xd18f326f,0x3fdcf0c0 - .long 0x75b5a201,0x3fdd2320 - .long 0x46defa6b,0x3fdd4902 - .long 0x918d25cd,0x3fdd6efa - .long 0x707ae52f,0x3fdd9509 - .long 0xfe92c554,0x3fddbb2e - .long 0x3445e4af,0x3fddee2f - .long 0x1a2726ce,0x3fde148a - .long 0x0a49ff40,0x3fde3afc - .long 0x206d516e,0x3fde6185 - .long 0x78823d52,0x3fde8825 - .long 0x2eac990c,0x3fdeaedd - .long 0x5f436be3,0x3fded5ac - .long 0x26d16ab9,0x3fdefc93 - .long 0xa2157600,0x3fdf2391 - .long 0xee03192d,0x3fdf4aa7 - .long 0x27c30bb0,0x3fdf71d6 - .long 0x6cb3b379,0x3fdf991c - .long 0xda69a910,0x3fdfc07a - .long 0x8eb03d3e,0x3fdfe7f1 - .long 0x53c5002e,0x3fe007c0 - .long 0x2198a5a1,0x3fe01b94 - .long 0x400c64eb,0x3fe02f74 - .long 0xbe7603ad,0x3fe04360 - .long 0xac47fe34,0x3fe05759 - .long 0x1911cf52,0x3fe06b5f - .long 0x0533c568,0x3fe078bf - .long 0x687e7b0e,0x3fe08cd9 - .long 0x74cf9019,0x3fe0a100 - .long 0x3a234477,0x3fe0b534 - .long 0xc89431ce,0x3fe0c974 - .long 0x305b9886,0x3fe0ddc2 - .long 0x4bafc918,0x3fe0eb52 - .long 0x4213a476,0x3fe0ffb5 - .long 0x3da97d9f,0x3fe11425 - .long 0x4f1d9aff,0x3fe128a2 - .long 0x52bf0865,0x3fe13652 - .long 0x58b4a92d,0x3fe14ae5 - .long 0xa19c765b,0x3fe15f85 - .long 0x38c119fa,0x3fe16d4d - .long 0xc20dd133,0x3fe18203 - .long 0xbc4b1f3b,0x3fe196c7 - .long 0x38b7a33c,0x3fe1a4a7 - .long 0xc0c9653d,0x3fe1b981 - .long 0xe8bb106b,0x3fe1ce69 - .long 0x9de06944,0x3fe1dc61 - .long 0xa2ad0da4,0x3fe1f160 - .long 0x7740737e,0x3fe2066d - .long 0xba47a394,0x3fe2147d - .long 0xbc5ebac3,0x3fe229a1 - .long 0x841a502e,0x3fe237c1 - .long 0xe6f80d9a,0x3fe24cfc - .long 0x55cd5762,0x3fe25b2c - .long 0x4d5f7c41,0x3fe2707f - .long 0x842ca384,0x3fe285e0 - .long 0x4708b773,0x3fe29429 - .long 0x670aff0c,0x3fe2a9a2 - .long 0x2c8d1cc1,0x3fe2b7fb - .long 0x6395f5f5,0x3fe2c65a - .long 0x57b0df43,0x3fe2dbf5 - .long 0xc3f97655,0x3fe2ea64 - .long 0x23684d73,0x3fe30018 - .long 0xe9a8b5cd,0x3fe30e97 - .long 0xebdd34ea,0x3fe32463 - .long 0x314ad796,0x3fe332f4 - .long 0x0e7464d0,0x3fe348d9 - .long 0xf8c43d6e,0x3fe35779 - .long 0x961a6a99,0x3fe36621 - .long 0x9f3c366a,0x3fe37c29 - .long 0x171976e7,0x3fe38ae2 - .long 0x57a603e7,0x3fe399a1 - .long 0xfe77b9d1,0x3fe3afcc - .long 0x503533b5,0x3fe3be9d - .long 0x80b4a8a3,0x3fe3cd74 - .long 0x3918f76c,0x3fe3e3c4 - .long 0xb27ed6c7,0x3fe3f2ac - .long 0x2125ca93,0x3fe4019c - .long 0x61389722,0x3fe41810 - .long 0x518df545,0x3fe42711 - .long 0x4e12b6bf,0x3fe43619 - .long 0x5d68ea69,0x3fe44528 - .long 0x464c893a,0x3fe45bcc - .long 0x21f117fc,0x3fe46aed - .long 0x27e8a2d3,0x3fe47a15 - .long 0x5efffccc,0x3fe48944 - .long 0xbcb69835,0x3fe4a018 - .long 0x0c9d65d7,0x3fe4af5a - .long 0xa5bdbe87,0x3fe4bea2 - .long 0x8f10ac47,0x3fe4cdf2 - .long 0xcf994058,0x3fe4dd49 - .long 0x6e64a684,0x3fe4eca8 - .long 0x3cd8eb68,0x3fe503c4 - .long 0x6667fc57,0x3fe51335 - .long 0x0738a3d8,0x3fe522ae - .long 0x26867857,0x3fe5322e - .long 0xcb979809,0x3fe541b5 - .long 0xfdbcbd62,0x3fe55144 - .long 0xc45153c7,0x3fe560db - .long 0x26bb8c66,0x3fe5707a - .long 0x0ed5b900,0x3fe587f6 - .long 0x977c8f31,0x3fe597a7 - .long 0xd634bb8b,0x3fe5a760 - .long 0xd295f10f,0x3fe5b721 - .long 0x94431ef9,0x3fe5c6ea - .long 0x22ea86f6,0x3fe5d6bb - .long 0x8645d390,0x3fe5e693 - .long 0xc61a2ed2,0x3fe5f673 - .long 0xea385926,0x3fe6065b - .long 0xfa7cc06b,0x3fe6164b - .long 0xfecf9743,0x3fe62643 - .type __libm_logf_table_256,@object - .size __libm_logf_table_256,2048 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logf_wmt.S deleted file mode 100644 index 4a00864c73..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logf_wmt.S +++ /dev/null @@ -1,742 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin logf - .text - .align 16,0x90 - .globl logf -logf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl $16384, %ecx - movd %ecx, %xmm4 - movl $-32768, %eax - movd %eax, %xmm2 - xorpd %xmm3, %xmm3 - movl $16368, %edx - pinsrw $3, %edx, %xmm3 - xorpd %xmm5, %xmm5 -.L_2TAG_PACKET_0.0.3: - movd %xmm0, %edx - rcpss %xmm0, %xmm1 - movsd 2080(%ebx), %xmm7 - pshuflw $68, %xmm0, %xmm0 - paddd %xmm4, %xmm1 - subl $8388608, %edx - cmpl $2113929216, %edx - jae .L_2TAG_PACKET_1.0.3 - andps %xmm1, %xmm2 - cvtps2pd %xmm0, %xmm0 - cvtps2pd %xmm2, %xmm1 - movd %xmm2, %eax - andl $-8388608, %edx - subl $1056964608, %edx - cvtsi2sdl %edx, %xmm6 - mulsd %xmm1, %xmm0 - subl $1056964608, %edx - addl %edx, %eax - shrl $12, %eax - movsd (%ebx,%eax), %xmm4 - subsd %xmm3, %xmm0 - movsd 2088(%ebx), %xmm2 - movsd 2096(%ebx), %xmm1 - mulsd %xmm0, %xmm7 - addsd %xmm0, %xmm5 - mulsd %xmm0, %xmm0 - mulsd %xmm2, %xmm6 - addsd %xmm7, %xmm1 - addsd %xmm4, %xmm5 - mulsd %xmm1, %xmm0 - addsd %xmm6, %xmm5 - addsd %xmm0, %xmm5 - cvtpd2ps %xmm5, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - addl $8388608, %edx - js .L_2TAG_PACKET_3.0.3 - cmpl $8388608, %edx - jb .L_2TAG_PACKET_4.0.3 - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_5.0.3 - movl $528482304, %eax - movd %eax, %xmm6 - movsd 2064(%ebx), %xmm5 - mulss %xmm6, %xmm0 - jmp .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_5.0.3: - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $-2147483648, %edx - je .L_2TAG_PACKET_6.0.3 - addl %edx, %edx - cmpl $-16777216, %edx - ja .L_2TAG_PACKET_5.0.3 - xorps %xmm0, %xmm0 - divss %xmm0, %xmm0 - movl $5, %edx -.L_2TAG_PACKET_7.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_4.0.3: - cmpl $0, %edx - je .L_2TAG_PACKET_6.0.3 - movl $1602224128, %eax - movd %eax, %xmm7 - mulss %xmm7, %xmm0 - movsd 2072(%ebx), %xmm5 - jmp .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_6.0.3: - movl $-1082130432, %eax - movd %eax, %xmm0 - xorps %xmm1, %xmm1 - divss %xmm1, %xmm0 - movl $4, %edx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_2.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type logf,@function - .size logf,.-logf - .data -# -- End logf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4277811695 - .long 1072049730 - .long 4099377379 - .long 1072041554 - .long 2854492448 - .long 1072033410 - .long 3783013829 - .long 1072025297 - .long 1547061728 - .long 1072017216 - .long 3705668804 - .long 1072009165 - .long 649825382 - .long 1072001146 - .long 4257004898 - .long 1071993156 - .long 646346839 - .long 1071985198 - .long 1718090839 - .long 1071977269 - .long 2203733529 - .long 1071969370 - .long 1140698018 - .long 1071961501 - .long 1872170015 - .long 1071953661 - .long 3457002416 - .long 1071945850 - .long 669557459 - .long 1071938069 - .long 1179420986 - .long 1071930316 - .long 4076413893 - .long 1071922591 - .long 4165410145 - .long 1071914895 - .long 556124819 - .long 1071907228 - .long 957937516 - .long 1071899588 - .long 204914613 - .long 1071891976 - .long 1730507025 - .long 1071884391 - .long 387544807 - .long 1071876834 - .long 3922939863 - .long 1071869303 - .long 2912783494 - .long 1071861800 - .long 826988438 - .long 1071854324 - .long 1144260235 - .long 1071846874 - .long 3057005434 - .long 1071839450 - .long 1471209283 - .long 1071832053 - .long 4186184763 - .long 1071824681 - .long 1829683463 - .long 1071817336 - .long 2217517956 - .long 1071810016 - .long 288676754 - .long 1071802722 - .long 3875016090 - .long 1071795452 - .long 3636378776 - .long 1071788208 - .long 3125257108 - .long 1071780989 - .long 1606817369 - .long 1071773795 - .long 2648729924 - .long 1071766625 - .long 1236164615 - .long 1071759480 - .long 951558972 - .long 1071752359 - .long 1089617062 - .long 1071745262 - .long 952179194 - .long 1071738189 - .long 4143093266 - .long 1071731139 - .long 1388251237 - .long 1071724114 - .long 600267432 - .long 1071717112 - .long 1108583542 - .long 1071710133 - .long 2249313505 - .long 1071703177 - .long 3365155278 - .long 1071696244 - .long 3805304058 - .long 1071689334 - .long 2925366939 - .long 1071682447 - .long 87278952 - .long 1071675583 - .long 3249155078 - .long 1071668740 - .long 3195405229 - .long 1071661920 - .long 3601425396 - .long 1071655122 - .long 3853649835 - .long 1071648346 - .long 2393914686 - .long 1071638513 - .long 2944026756 - .long 1071625048 - .long 3870651933 - .long 1071611626 - .long 3993180461 - .long 1071598247 - .long 2142264402 - .long 1071584911 - .long 1454642149 - .long 1071571617 - .long 783063308 - .long 1071558365 - .long 3286084979 - .long 1071545154 - .long 3543033726 - .long 1071531985 - .long 438773454 - .long 1071518858 - .long 1458540784 - .long 1071505771 - .long 1212978710 - .long 1071492725 - .long 2912845216 - .long 1071479719 - .long 1189018219 - .long 1071466754 - .long 3567208110 - .long 1071453828 - .long 403064643 - .long 1071440943 - .long 3536762435 - .long 1071428096 - .long 3343209673 - .long 1071415289 - .long 3091669954 - .long 1071402521 - .long 1765778334 - .long 1071389792 - .long 2653362897 - .long 1071377101 - .long 461431547 - .long 1071364449 - .long 2790898835 - .long 1071351834 - .long 71706889 - .long 1071339258 - .long 4217424686 - .long 1071326718 - .long 1380502992 - .long 1071314217 - .long 3491778671 - .long 1071301752 - .long 1015732707 - .long 1071289325 - .long 1605095660 - .long 1071276934 - .long 35977849 - .long 1071264580 - .long 3977575844 - .long 1071252261 - .long 3927305531 - .long 1071239979 - .long 3275478714 - .long 1071227733 - .long 1125340846 - .long 1071215523 - .long 882913881 - .long 1071203348 - .long 1666971274 - .long 1071191208 - .long 2603916163 - .long 1071179103 - .long 2827693557 - .long 1071167033 - .long 1479703759 - .long 1071154998 - .long 2003684347 - .long 1071142997 - .long 3555691467 - .long 1071131030 - .long 1004016924 - .long 1071119098 - .long 2108975630 - .long 1071107199 - .long 1753021246 - .long 1071095334 - .long 3415503221 - .long 1071083502 - .long 1992719281 - .long 1071071704 - .long 977707388 - .long 1071059939 - .long 3870234994 - .long 1071048206 - .long 1291822077 - .long 1071036507 - .long 1050438164 - .long 1071024840 - .long 2370625547 - .long 1071013205 - .long 188394569 - .long 1071001603 - .long 2331021804 - .long 1070990032 - .long 3747176240 - .long 1070978493 - .long 3686719393 - .long 1070966986 - .long 1405669883 - .long 1070955511 - .long 461103529 - .long 1070944067 - .long 121152472 - .long 1070932654 - .long 3954874384 - .long 1070921271 - .long 2652318780 - .long 1070909920 - .long 4089234463 - .long 1070898599 - .long 3262235675 - .long 1070887309 - .long 3763576649 - .long 1070876049 - .long 601221319 - .long 1070864820 - .long 1673619518 - .long 1070853620 - .long 1999843716 - .long 1070842450 - .long 899399508 - .long 1070831310 - .long 1992167703 - .long 1070820199 - .long 313445281 - .long 1070809118 - .long 3788725476 - .long 1070798065 - .long 3168871046 - .long 1070787042 - .long 2094830420 - .long 1070776048 - .long 4212681596 - .long 1070765082 - .long 288676754 - .long 1070754146 - .long 2568927817 - .long 1070743237 - .long 1829681364 - .long 1070732357 - .long 1737005556 - .long 1070721505 - .long 1666870165 - .long 1070710681 - .long 1000063738 - .long 1070699885 - .long 3417111411 - .long 1070689116 - .long 4013324163 - .long 1070678375 - .long 2183652476 - .long 1070667662 - .long 1622638721 - .long 1070656976 - .long 1734435555 - .long 1070646317 - .long 1927726804 - .long 1070635685 - .long 1615681634 - .long 1070625080 - .long 215909304 - .long 1070614502 - .long 1445381777 - .long 1070603950 - .long 870975437 - .long 1070590754 - .long 1823716217 - .long 1070569756 - .long 323875369 - .long 1070548811 - .long 3839688678 - .long 1070527917 - .long 2667883253 - .long 1070507076 - .long 4293333010 - .long 1070486286 - .long 3324205749 - .long 1070465548 - .long 2966718784 - .long 1070444861 - .long 2140157205 - .long 1070424225 - .long 4066729595 - .long 1070403639 - .long 3386588242 - .long 1070383104 - .long 3337621361 - .long 1070362619 - .long 2870475188 - .long 1070342184 - .long 943446189 - .long 1070321799 - .long 817374162 - .long 1070301463 - .long 1465634365 - .long 1070281176 - .long 1869032404 - .long 1070260938 - .long 1015732707 - .long 1070240749 - .long 2196155141 - .long 1070220608 - .long 118003300 - .long 1070200516 - .long 2381031992 - .long 1070180471 - .long 3707175295 - .long 1070160474 - .long 3120348377 - .long 1070140525 - .long 3946380940 - .long 1070120623 - .long 928049556 - .long 1070100769 - .long 1699849154 - .long 1070080961 - .long 1018125008 - .long 1070061200 - .long 2235845747 - .long 1070041485 - .long 122671437 - .long 1070021817 - .long 2339728060 - .long 1070002194 - .long 3669742467 - .long 1069982617 - .long 3196851002 - .long 1069963086 - .long 11572342 - .long 1069943601 - .long 1800682930 - .long 1069924160 - .long 3372322013 - .long 1069904764 - .long 3835803021 - .long 1069885413 - .long 2306589128 - .long 1069866107 - .long 2201204065 - .long 1069846845 - .long 2647241692 - .long 1069827627 - .long 2778278092 - .long 1069808453 - .long 1733817001 - .long 1069789323 - .long 2954203158 - .long 1069770236 - .long 1295667077 - .long 1069751193 - .long 210141498 - .long 1069732193 - .long 3155274661 - .long 1069713235 - .long 709476866 - .long 1069694321 - .long 636640577 - .long 1069675449 - .long 2116286250 - .long 1069656619 - .long 38479793 - .long 1069637832 - .long 2183652476 - .long 1069619086 - .long 3452748429 - .long 1069600382 - .long 3047045639 - .long 1069581720 - .long 173141005 - .long 1069563100 - .long 970708326 - .long 1069541521 - .long 2106590683 - .long 1069504444 - .long 2198475040 - .long 1069467449 - .long 3996141691 - .long 1069430535 - .long 1669613218 - .long 1069393703 - .long 2283901796 - .long 1069356951 - .long 29117219 - .long 1069320280 - .long 1990183441 - .long 1069283688 - .long 2376948508 - .long 1069247176 - .long 3998935692 - .long 1069210743 - .long 1085389880 - .long 1069174390 - .long 760030536 - .long 1069138115 - .long 1566132617 - .long 1069101918 - .long 2056379433 - .long 1069065799 - .long 792781808 - .long 1069029758 - .long 641565395 - .long 1068993794 - .long 183156961 - .long 1068957907 - .long 2302040698 - .long 1068922096 - .long 1301778891 - .long 1068886362 - .long 84804484 - .long 1068850704 - .long 1562410668 - .long 1068815121 - .long 64741293 - .long 1068779614 - .long 2815553124 - .long 1068744181 - .long 4162338635 - .long 1068708823 - .long 2756122533 - .long 1068673540 - .long 1551389854 - .long 1068638331 - .long 3511047527 - .long 1068603195 - .long 3016419377 - .long 1068568133 - .long 3047045639 - .long 1068533144 - .long 296456961 - .long 1068497513 - .long 3221665916 - .long 1068427825 - .long 3697798734 - .long 1068358282 - .long 3453858508 - .long 1068288883 - .long 4234736672 - .long 1068219627 - .long 3506114812 - .long 1068150514 - .long 3044269692 - .long 1068081543 - .long 346010435 - .long 1068012714 - .long 1513453498 - .long 1067944025 - .long 4074027864 - .long 1067875476 - .long 1275317999 - .long 1067807068 - .long 3559777258 - .long 1067738798 - .long 4204867691 - .long 1067670667 - .long 797775935 - .long 1067602675 - .long 3825228429 - .long 1067534819 - .long 2313634884 - .long 1067467101 - .long 672386641 - .long 1067348671 - .long 3960777458 - .long 1067213778 - .long 1220920383 - .long 1067079157 - .long 684247743 - .long 1066944805 - .long 2020150230 - .long 1066810721 - .long 630721729 - .long 1066676905 - .long 535440936 - .long 1066543355 - .long 1486051399 - .long 1066410070 - .long 2227658502 - .long 1066152307 - .long 2743640746 - .long 1065886792 - .long 4184355568 - .long 1065621801 - .long 1971904113 - .long 1065357333 - .long 341338964 - .long 1064833554 - .long 1498975029 - .long 1064306693 - .long 1440057502 - .long 1063257089 - .long 0 - .long 0 - .long 0 - .long 0 - .long 4277811695 - .long 1078341186 - .long 4277811695 - .long 3225824834 - .long 1431655765 - .long 1070945621 - .long 4277811695 - .long 1047932482 - .long 1107282704 - .long 3219128321 - .long 4277811695 - .long 1047932482 - .type static_const_table,@object - .size static_const_table,2112 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logl.S deleted file mode 100644 index f22a73fb41..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logl.S +++ /dev/null @@ -1,70 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logl.c" - .text -..TXTST0: -# -- Begin logl - .text - .align 16,0x90 - .hidden logl - .globl logl -logl: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $24, %esp - fldt 32(%esp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fstpt (%esp) - call __libm_logl@PLT -..B1.2: - addl $24, %esp - popl %ebx - ret - .align 16,0x90 - .type logl,@function - .size logl,.-logl - .data -# -- End logl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logl_table.S deleted file mode 100644 index 8bff76cadb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/logl_table.S +++ /dev/null @@ -1,560 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logl_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_logl_table_256 - .globl __libm_logl_table_256 -__libm_logl_table_256: - .long 0x55d5a000,0x3f600401 - .long 0xf98e1114,0xbce76218 - .long 0x14588000,0x3f781212 - .long 0xf5a30364,0xbcf4abf1 - .long 0xf9684000,0x3f841929 - .long 0xa8bfb25e,0xbcfa20e2 - .long 0x84c74000,0x3f8c3173 - .long 0x18823013,0x3d0f0660 - .long 0x1ac72000,0x3f91a6b9 - .long 0x36a9c5bb,0x3d13861d - .long 0x5d9ac000,0x3f95ba9a - .long 0xe08d78ac,0x3cacbb84 - .long 0x07434000,0x3f99d2a8 - .long 0xeb1d2ef8,0xbd1a0c1f - .long 0x2597c000,0x3f9d6b27 - .long 0xa1a37071,0xbd23fef6 - .long 0xa19e0000,0x3fa0c58f - .long 0x58b17913,0xbd0559d1 - .long 0x78cbc000,0x3fa2954c - .long 0x570c1572,0x3d1c3526 - .long 0x2da98000,0x3fa4a94d - .long 0xbad48944,0xbd23a98f - .long 0xf2d4c000,0x3fa67c94 - .long 0xec19afa2,0xbd029efb - .long 0xb6310000,0x3fa85188 - .long 0xdf4d03fb,0xbd1f2fd5 - .long 0xbe73c000,0x3faa6b8a - .long 0x5c8ed1b8,0xbd20b3b9 - .long 0x06f74000,0x3fac441e - .long 0x6cf5e5d5,0xbd2561c1 - .long 0x13608000,0x3fae1e67 - .long 0xa4275f13,0xbd22f961 - .long 0x11ab8000,0x3faffa69 - .long 0x98381a8f,0x3d23008c - .long 0x9c5da000,0x3fb0ec13 - .long 0xe54ebd73,0x3d180247 - .long 0x643d2000,0x3fb1dbd2 - .long 0x9a20edb0,0xbd1bd36c - .long 0x84fe6000,0x3fb2cc72 - .long 0x34cd5d84,0xbcec742f - .long 0xa7d1e000,0x3fb3bdf5 - .long 0xa5db4ed7,0x3d2cc85e - .long 0x7aa00000,0x3fb4b05d - .long 0x8ddf26e3,0x3d32e053 - .long 0x7ceb8000,0x3fb580db - .long 0x26833e56,0xbd447f01 - .long 0x89364000,0x3fb674f0 - .long 0x4c9d3302,0x3d3a7999 - .long 0x2c6b8000,0x3fb769ef - .long 0xe71892b5,0xbd44b944 - .long 0x27508000,0x3fb85fd9 - .long 0x19970c1c,0xbd35b818 - .long 0x5d594000,0x3fb9335e - .long 0x3abd47da,0x3d23115c - .long 0x20c90000,0x3fba2b02 - .long 0x9c652090,0xbd3a0b35 - .long 0xac1a8000,0x3fbb0004 - .long 0x037f2b35,0x3d1aaf97 - .long 0x769fc000,0x3fbbf968 - .long 0x8d824283,0x3d24218c - .long 0xbfee0000,0x3fbccfed - .long 0x2fe71256,0x3d33a823 - .long 0x63844000,0x3fbda727 - .long 0x1fa71733,0x3d1a8940 - .long 0x7fe10000,0x3fbea325 - .long 0x47e4627a,0x3d2ef30d - .long 0xfedc0000,0x3fbf7be9 - .long 0x2b2b3bc6,0xbd00d05d - .long 0x52ff2000,0x3fc02ab3 - .long 0x5d569b2b,0x3d27ce63 - .long 0x579d2000,0x3fc097ce - .long 0xda652881,0x3ce33742 - .long 0x82280000,0x3fc1178e - .long 0xcc74be04,0xbd4b8421 - .long 0x7dbec000,0x3fc18574 - .long 0x45bd9b49,0x3d3e6744 - .long 0x25f26000,0x3fc1f3b9 - .long 0x9b083633,0xbd15f74e - .long 0x1e6de000,0x3fc2625d - .long 0xf09e3d82,0xbcf52962 - .long 0x0c868000,0x3fc2d161 - .long 0xcb81b4a1,0x3d039d6c - .long 0x97412000,0x3fc340c5 - .long 0xf7d9d386,0xbd37a3dc - .long 0x67580000,0x3fc3b08b - .long 0xf29320fb,0xbd3aade8 - .long 0x08378000,0x3fc40dfb - .long 0xc4f7b685,0x3c9bb453 - .long 0xe8ca6000,0x3fc47e74 - .long 0xb7020316,0xbcf07c95 - .long 0xf6466000,0x3fc4ef51 - .long 0x21c8cd53,0x3d3bc83d - .long 0xe02bc000,0x3fc56092 - .long 0xfe5d989a,0xbd4ae9eb - .long 0x57cd4000,0x3fc5d238 - .long 0x4b74dcf5,0x3d5a6a61 - .long 0x37334000,0x3fc6313a - .long 0x561bc2b2,0x3d4d7641 - .long 0xdabc0000,0x3fc6a399 - .long 0x399a856a,0xbd563e4d - .long 0xdd3d0000,0x3fc70337 - .long 0x1d685519,0xbd4be57a - .long 0x128f8000,0x3fc77654 - .long 0x520d9718,0xbd4ed8b4 - .long 0x2a0b4000,0x3fc7e9d8 - .long 0x605bf1b1,0xbd5ee97b - .long 0x759f8000,0x3fc84a6b - .long 0x0ab7e182,0xbd5768a0 - .long 0xd5f5c000,0x3fc8ab47 - .long 0xf5f4572e,0xbd4cf028 - .long 0x90964000,0x3fc91fe4 - .long 0x79850e19,0x3d481b4e - .long 0x4011c000,0x3fc98163 - .long 0x30b7dd0f,0xbd458a91 - .long 0x07088000,0x3fc9f6c4 - .long 0x5a19605e,0x3d466413 - .long 0x29348000,0x3fca58e7 - .long 0x504551b1,0x3d3e867d - .long 0xc3168000,0x3fcabb55 - .long 0x9a875994,0x3d43acd2 - .long 0x491a0000,0x3fcb1e10 - .long 0xed340663,0xbd402ffc - .long 0x93e38000,0x3fcb94ee - .long 0x47492dd7,0xbd48357e - .long 0xc0674000,0x3fcbf851 - .long 0xd9fbd5aa,0x3d455ef8 - .long 0x54bf4000,0x3fcc5c02 - .long 0x5184bd39,0xbd4c5a15 - .long 0xc9db4000,0x3fccc000 - .long 0x5d57aff9,0xbd1d6d58 - .long 0x99c84000,0x3fcd244d - .long 0x032241dc,0x3d4673ec - .long 0x3fb30000,0x3fcd88e9 - .long 0x0234bf51,0xbd375f28 - .long 0x37eb0000,0x3fcdedd4 - .long 0x565353b4,0xbd40ff6d - .long 0xffe70000,0x3fce530e - .long 0x276041f4,0x3d401212 - .long 0x1648c000,0x3fceb89a - .long 0x16fee901,0xbd2a3b21 - .long 0xfadfc000,0x3fcf1e75 - .long 0x64bb07ee,0xbd5210c5 - .long 0x2ead8000,0x3fcf84a3 - .long 0xb3098725,0xbd1e5438 - .long 0x33ea0000,0x3fcfeb22 - .long 0xde00938b,0x3d2f3418 - .long 0xc7036000,0x3fd028f9 - .long 0xe9f33100,0xbd2f1eb9 - .long 0xe0d96000,0x3fd05c8b - .long 0xc77ccb58,0x3d2ad0f1 - .long 0x8f8ae000,0x3fd085eb - .long 0x3f45fe7b,0x3d3e5d51 - .long 0xe32d2000,0x3fd0b9c8 - .long 0xedbee0d8,0xbd3bbb62 - .long 0x60b78000,0x3fd0edd0 - .long 0x2d8435f5,0x3d0019b5 - .long 0x4cf02000,0x3fd12202 - .long 0xa2415097,0xbd59c089 - .long 0x927ae000,0x3fd14be2 - .long 0xc85685e2,0x3d49a817 - .long 0x8ef18000,0x3fd18061 - .long 0x1bc9638d,0x3d45be80 - .long 0xbe2fc000,0x3fd1b50b - .long 0x3263201f,0x3d38ecd7 - .long 0xc7cf2000,0x3fd1df4c - .long 0x0455f7e4,0x3d30b43f - .long 0x6d0ea000,0x3fd21445 - .long 0xf5d235d7,0x3d58d43e - .long 0x991ec000,0x3fd23ec5 - .long 0x48a2e522,0xbd36dbe4 - .long 0x9f872000,0x3fd2740d - .long 0xfa32bfeb,0xbd5504cf - .long 0xabce0000,0x3fd29ecd - .long 0x8847bb7a,0xbd37f189 - .long 0x02ade000,0x3fd2d466 - .long 0xbb9aa833,0xbd5311a1 - .long 0xb04ea000,0x3fd2ff66 - .long 0xd5f0c8e9,0x3d43a896 - .long 0x4b356000,0x3fd33550 - .long 0xec6206db,0xbd372206 - .long 0x5ec44000,0x3fd36092 - .long 0xf344bbd1,0x3d4eb929 - .long 0xc3336000,0x3fd38bf1 - .long 0xa0f4a8b7,0x3d5e74f4 - .long 0x77332000,0x3fd3c252 - .long 0x4b606bd6,0x3d5183b5 - .long 0x63c16000,0x3fd3edf4 - .long 0xeb4069e1,0x3d407cc1 - .long 0x23d5e000,0x3fd419b4 - .long 0x6ec90e0a,0x3d418e43 - .long 0xe053a000,0x3fd44591 - .long 0x92923d88,0xbd06e958 - .long 0x75b6e000,0x3fd47c91 - .long 0x8b804f1b,0x3d50ad66 - .long 0x41554000,0x3fd4a8b3 - .long 0xe1791b98,0xbd54f6c0 - .long 0x90890000,0x3fd4d4f3 - .long 0x3a9f1441,0x3d19fd79 - .long 0x8da1e000,0x3fd50152 - .long 0x3694fa6b,0x3d5967d6 - .long 0x6347e000,0x3fd52dd0 - .long 0xeb98a049,0xbd46133a - .long 0x3c7b8000,0x3fd55a6d - .long 0xd6cf85a4,0x3d45138e - .long 0x2b110000,0x3fd5925d - .long 0x4b0b521a,0x3d652c81 - .long 0x6b544000,0x3fd5bf40 - .long 0xeb68981c,0xbd227023 - .long 0x3d5c4000,0x3fd5ec43 - .long 0xf6eb1741,0xbd44a472 - .long 0xcdb04000,0x3fd61965 - .long 0xac078912,0xbd53e115 - .long 0x4935c000,0x3fd646a8 - .long 0x6d25a6ca,0xbd4abc23 - .long 0xdd320000,0x3fd6740a - .long 0xb8b270ac,0xbd60b5c4 - .long 0xb74a8000,0x3fd6a18d - .long 0x67b50a45,0xbd639d6d - .long 0x05868000,0x3fd6cf31 - .long 0xddac7ab9,0xbd4e27a6 - .long 0xe8530000,0x3fd6f180 - .long 0x0a20af33,0xbd4e8c49 - .long 0x71b88000,0x3fd71f5d - .long 0x712fcc92,0x3d54efa4 - .long 0xefd68000,0x3fd74d5a - .long 0x30990150,0xbd52a3e5 - .long 0x922bc000,0x3fd77b79 - .long 0xf6201124,0x3d537dc9 - .long 0x889f4000,0x3fd7a9b9 - .long 0x0dd20a44,0xbd630ed1 - .long 0x037ec000,0x3fd7d81b - .long 0x622fc2c1,0xbd42b381 - .long 0x33828000,0x3fd8069e - .long 0xe1da7992,0xbd4b9e42 - .long 0xd3ef8000,0x3fd82996 - .long 0xae7d64a2,0x3d47956a - .long 0x776e0000,0x3fd85855 - .long 0x0cccc887,0xbd6a02a9 - .long 0x58328000,0x3fd88736 - .long 0x1f7fc497,0xbd2988e2 - .long 0x973ac000,0x3fd8aa75 - .long 0x9e0af65a,0xbd3cc466 - .long 0xdc884000,0x3fd8d992 - .long 0xebb56b23,0xbd5b1b77 - .long 0xea7d8000,0x3fd908d2 - .long 0xf0e513c0,0x3d551185 - .long 0xe79c0000,0x3fd92c59 - .long 0x039fe987,0x3d4cac17 - .long 0x50ee4000,0x3fd95bd7 - .long 0x0649244f,0xbd12d6ab - .long 0x11a3c000,0x3fd98b78 - .long 0x3a5b6609,0x3d672da9 - .long 0xf33d4000,0x3fd9af47 - .long 0x59d98c86,0x3cfae14a - .long 0x0c190000,0x3fd9df27 - .long 0x963f4336,0x3d54a786 - .long 0xed150000,0x3fda0325 - .long 0xb0d5e095,0xbd22dc20 - .long 0x02250000,0x3fda3344 - .long 0x40314305,0xbd361cdd - .long 0x5e80c000,0x3fda5772 - .long 0xd1062b1b,0x3d2c172b - .long 0x165dc000,0x3fda87d0 - .long 0x7845f58e,0x3d51991f - .long 0x6c040000,0x3fdaac2e - .long 0xc856ee3b,0xbd3da90d - .long 0x6fdf8000,0x3fdadccc - .long 0x23b48979,0xbd557ef2 - .long 0x3eb20000,0x3fdb015b - .long 0xa4504de4,0xbd586fcd - .long 0x3a638000,0x3fdb323a - .long 0x7a9aa342,0xbd635be0 - .long 0x04464000,0x3fdb56fa - .long 0xad27be67,0xbd56f6ad - .long 0xa659c000,0x3fdb881a - .long 0x58ba5c9c,0xbd2b65ac - .long 0xef3d8000,0x3fdbad0b - .long 0xe4a81b98,0x3d68b265 - .long 0x97780000,0x3fdbd212 - .long 0xa247841c,0x3d5c2f63 - .long 0x36f08000,0x3fdc0392 - .long 0x435af523,0x3d403109 - .long 0x1e4d4000,0x3fdc28cb - .long 0xdc568214,0xbd4a0635 - .long 0xb8474000,0x3fdc4e19 - .long 0x9ad9f32c,0xbd5c3e5b - .long 0xc7454000,0x3fdc7ff9 - .long 0x47d5b6ca,0x3d54c924 - .long 0x64e9c000,0x3fdca57b - .long 0xd12a2803,0x3d5b0510 - .long 0x0a5d0000,0x3fdccb13 - .long 0x48811a12,0xbd545041 - .long 0xd18f4000,0x3fdcf0c0 - .long 0xc2008d44,0xbd4b2160 - .long 0x75b58000,0x3fdd2320 - .long 0x12cccc3a,0x3d610091 - .long 0x46df0000,0x3fdd4902 - .long 0x0b2c4c2c,0xbd365228 - .long 0x918d4000,0x3fdd6efa - .long 0x7676c78e,0xbd5a329d - .long 0x707ac000,0x3fdd9509 - .long 0x77579caf,0x3d6297b8 - .long 0xfe92c000,0x3fddbb2e - .long 0x0943c435,0x3d3550ac - .long 0x3445c000,0x3fddee2f - .long 0x3a0f9d04,0x3d625775 - .long 0x1a274000,0x3fde148a - .long 0x20732293,0xbd59326b - .long 0x0a4a0000,0x3fde3afc - .long 0x573921f0,0xbd080095 - .long 0x206d4000,0x3fde6185 - .long 0xc9807dcf,0x3d516d95 - .long 0x78824000,0x3fde8825 - .long 0xaa15d3d9,0xbd25726d - .long 0x2eac8000,0x3fdeaedd - .long 0xad7934b2,0x3d590c33 - .long 0x5f438000,0x3fded5ac - .long 0x1bc1c15c,0xbd541d1a - .long 0x26d14000,0x3fdefc93 - .long 0x206858e7,0x3d655c54 - .long 0xa2154000,0x3fdf2391 - .long 0x202b7ba5,0x3d6affe2 - .long 0xee030000,0x3fdf4aa7 - .long 0x56f014a9,0x3d592cde - .long 0x27c30000,0x3fdf71d6 - .long 0xe30f87ad,0x3d47600a - .long 0x6cb38000,0x3fdf991c - .long 0xcca0cdf3,0x3d69bcbe - .long 0xda698000,0x3fdfc07a - .long 0x2683bdae,0x3d6487fd - .long 0x8eb04000,0x3fdfe7f1 - .long 0xceb37e7a,0xbd260f51 - .long 0x53c50000,0x3fe007c0 - .long 0xc9c065f1,0x3cf73add - .long 0x2198a000,0x3fe01b94 - .long 0x5498efb5,0x3d4683ab - .long 0x400c8000,0x3fe02f74 - .long 0xe23775e2,0xbd6b154b - .long 0xbe760000,0x3fe04360 - .long 0x030d58c4,0x3d3d6774 - .long 0xac480000,0x3fe05759 - .long 0x83c1e850,0xbd2cc5f3 - .long 0x1911e000,0x3fe06b5f - .long 0x2598b50b,0xbd60ae17 - .long 0x0533c000,0x3fe078bf - .long 0x907b7d7f,0x3d45a048 - .long 0x687e8000,0x3fe08cd9 - .long 0xc00a19af,0xbd43c67f - .long 0x74cfa000,0x3fe0a100 - .long 0x22f73f90,0xbd5fcd6d - .long 0x3a234000,0x3fe0b534 - .long 0x4c68a7e5,0x3d41da30 - .long 0xc8942000,0x3fe0c974 - .long 0xa7cdcbb8,0x3d61cdc0 - .long 0x305ba000,0x3fe0ddc2 - .long 0x566f7df8,0xbd4de684 - .long 0x4bafc000,0x3fe0eb52 - .long 0x7feb3411,0x3d5230c5 - .long 0x4213a000,0x3fe0ffb5 - .long 0xbeeae6be,0x3d41d77b - .long 0x3da98000,0x3fe11425 - .long 0x3d4743ea,0xbd33050e - .long 0x4f1da000,0x3fe128a2 - .long 0x5906450d,0xbd440318 - .long 0x52bf0000,0x3fe13652 - .long 0xa621d4be,0x3d50c985 - .long 0x58b4a000,0x3fe14ae5 - .long 0x9895512f,0x3d525a20 - .long 0xa19c6000,0x3fe15f85 - .long 0xe4dca81e,0x3d665b5b - .long 0x38c12000,0x3fe16d4d - .long 0xaf71a89e,0xbd481628 - .long 0xc20de000,0x3fe18203 - .long 0x4bb7b8b9,0xbd5d995f - .long 0xbc4b2000,0x3fe196c7 - .long 0x14cec2c3,0xbd18a766 - .long 0x38b7a000,0x3fe1a4a7 - .long 0x26042793,0x3d39e2b1 - .long 0xc0c96000,0x3fe1b981 - .long 0x549461ed,0x3d44f378 - .long 0xe8bb0000,0x3fe1ce69 - .long 0xcc3339e5,0x3d606af5 - .long 0x9de06000,0x3fe1dc61 - .long 0xa1767071,0x3d528836 - .long 0xa2ad0000,0x3fe1f160 - .long 0x6c9de298,0x3d5b4741 - .long 0x77406000,0x3fe2066d - .long 0xd051f38d,0x3d637e65 - .long 0xba47c000,0x3fe2147d - .long 0x0cf5c8e9,0xbd6c6c55 - .long 0xbc5ec000,0x3fe229a1 - .long 0xf20d6e42,0xbd44f266 - .long 0x841a6000,0x3fe237c1 - .long 0xa47dba85,0xbd5fa312 - .long 0xe6f82000,0x3fe24cfc - .long 0xb65cb7bb,0xbd626596 - .long 0x55cd6000,0x3fe25b2c - .long 0x2ff856c0,0xbd513b72 - .long 0x4d5f8000,0x3fe2707f - .long 0xc37d4cdf,0xbd3df8b3 - .long 0x842ca000,0x3fe285e0 - .long 0x866d5f22,0x3d3c1c4d - .long 0x4708c000,0x3fe29429 - .long 0x7aca88eb,0xbd5119e8 - .long 0x670b0000,0x3fe2a9a2 - .long 0x1c2e5d10,0xbd1e7864 - .long 0x2c8d2000,0x3fe2b7fb - .long 0x00c270dd,0xbd39fb3c - .long 0x63960000,0x3fe2c65a - .long 0x03be9586,0xbd5415ea - .long 0x57b0e000,0x3fe2dbf5 - .long 0x07b9dc11,0xbd17a6e5 - .long 0xc3f96000,0x3fe2ea64 - .long 0x8b7d46fa,0x3d6654b2 - .long 0x23686000,0x3fe30018 - .long 0x5363d25e,0xbd628cd2 - .long 0xe9a8c000,0x3fe30e97 - .long 0x06943683,0xbd546671 - .long 0xebdd4000,0x3fe32463 - .long 0xc46cb528,0xbd562c21 - .long 0x314ae000,0x3fe332f4 - .long 0x1ea74541,0xbd50d4b6 - .long 0x0e746000,0x3fe348d9 - .long 0x44f828b5,0x3d433f3c - .long 0xf8c44000,0x3fe35779 - .long 0x22a46dd6,0xbd34934a - .long 0x961a8000,0x3fe36621 - .long 0x0cdd9d24,0xbd6566ce - .long 0x9f3c2000,0x3fe37c29 - .long 0x8e5820fe,0x3d666a2b - .long 0x17198000,0x3fe38ae2 - .long 0x576aad35,0xbd52316f - .long 0x57a60000,0x3fe399a1 - .long 0x62286d89,0x3d3f399c - .long 0xfe77c000,0x3fe3afcc - .long 0xedc1a56f,0xbd48bbbb - .long 0x50352000,0x3fe3be9d - .long 0x22f47589,0x3d63b540 - .long 0x80b4a000,0x3fe3cd74 - .long 0x9ebf0b71,0x3d51452e - .long 0x39190000,0x3fe3e3c4 - .long 0x4c617cda,0xbd512753 - .long 0xb27ec000,0x3fe3f2ac - .long 0x8d68a543,0x3d66c6ab - .long 0x2125c000,0x3fe4019c - .long 0xd9e1e717,0x3d552630 - .long 0x6138a000,0x3fe41810 - .long 0xa1618e8d,0xbd51bb4f - .long 0x518de000,0x3fe42711 - .long 0x38d47013,0x3d65455f - .long 0x4e12c000,0x3fe43619 - .long 0xaca69593,0xbd52819e - .long 0x5d68e000,0x3fe44528 - .long 0xf367503a,0x3d54d27f - .long 0x464ca000,0x3fe45bcc - .long 0xa4ffdcb2,0xbd66c5eb - .long 0x21f12000,0x3fe46aed - .long 0xa0df038b,0xbd50072e - .long 0x27e8a000,0x3fe47a15 - .long 0x83594fab,0x3d369a4a - .long 0x5f000000,0x3fe48944 - .long 0x95dc2343,0xbd39a0cf - .long 0xbcb6a000,0x3fe4a018 - .long 0xdb5ebf58,0xbd4f2ae4 - .long 0x0c9d6000,0x3fe4af5a - .long 0xedc4bac0,0x3d475de0 - .long 0xa5bdc000,0x3fe4bea2 - .long 0xefe50211,0xbd278f64 - .long 0x8f10c000,0x3fe4cdf2 - .long 0x7690ed86,0xbd63b982 - .long 0xcf994000,0x3fe4dd49 - .long 0x24d59d34,0x3d061972 - .long 0x6e64a000,0x3fe4eca8 - .long 0xb1079278,0x3d4a0e67 - .long 0x3cd90000,0x3fe503c4 - .long 0x0f1a734d,0xbd6497fc - .long 0x6667e000,0x3fe51335 - .long 0x4c9987aa,0x3d6c5739 - .long 0x0738a000,0x3fe522ae - .long 0x8164c759,0x3d3ebe70 - .long 0x26868000,0x3fe5322e - .long 0xba2da8ad,0xbd4ea333 - .long 0xcb978000,0x3fe541b5 - .long 0x62e3a6b9,0x3d680916 - .long 0xfdbcc000,0x3fe55144 - .long 0x2b35ba3e,0xbd34ec53 - .long 0xc4518000,0x3fe560db - .long 0x776b86a6,0xbd761cb6 - .long 0x26bb8000,0x3fe5707a - .long 0x5ff9981f,0x3d58ccc0 - .long 0x0ed5c000,0x3fe587f6 - .long 0xe6cce4c9,0xbd4c00c2 - .long 0x977cc000,0x3fe597a7 - .long 0xf6a33533,0xbd786770 - .long 0xd6348000,0x3fe5a760 - .long 0x365e53d9,0x3d7dc57c - .long 0xd2960000,0x3fe5b721 - .long 0x4f6ab8cd,0xbd5de23a - .long 0x94434000,0x3fe5c6ea - .long 0xa68978ec,0xbd70837e - .long 0x22ea8000,0x3fe5d6bb - .long 0xea2eecbe,0x3d4bd7d0 - .long 0x86460000,0x3fe5e693 - .long 0x23677de5,0xbd763831 - .long 0xc61a4000,0x3fe5f673 - .long 0x7a110a0e,0xbd612e5c - .long 0xea384000,0x3fe6065b - .long 0xc49e2cb9,0x3d692622 - .long 0xfa7cc000,0x3fe6164b - .long 0x27c383a0,0x3d0ad6c4 - .long 0xfecfc000,0x3fe62643 - .long 0x3ae25ed1,0xbd745e87 - .type __libm_logl_table_256,@object - .size __libm_logl_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrint_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrint_wmt.S deleted file mode 100644 index 5be751fc71..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrint_wmt.S +++ /dev/null @@ -1,188 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lrint_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin lrint - .text - .align 16,0x90 - .globl lrint -lrint: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movsd %xmm0, 16(%esp) - pextrw $3, %xmm0, %ecx - andl $32767, %ecx - cmpl $16863, %ecx - jge .L_2TAG_PACKET_0.0.3 -.L_2TAG_PACKET_1.0.3: - cvtsd2si %xmm0, %eax - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - comisd (%ebx), %xmm0 - jp .L_2TAG_PACKET_3.0.3 - ja .L_2TAG_PACKET_4.0.3 - ucomisd 16(%ebx), %xmm0 - jb .L_2TAG_PACKET_5.0.3 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_5.0.3: - ucomisd 32(%ebx), %xmm0 - ja .L_2TAG_PACKET_6.0.3 - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_4.0.3: - ucomisd 48(%ebx), %xmm0 - jb .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_7.0.3: - movl $-2147483648, %eax - movss 64(%ebx), %xmm1 - subss %xmm1, %xmm1 - movl %eax, 8(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 40(%esp), %eax - movl %eax, 8(%esp) - movl $184, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - movl 8(%esp), %eax - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - movl $-2147483648, %eax - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - stmxcsr (%esp) - movl (%esp), %eax - andl $-2, %eax - movl %eax, (%esp) - ldmxcsr (%esp) - cvtsd2si %xmm0, %eax - stmxcsr (%esp) - movl (%esp), %edx - testl $1, %edx - jne .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_2.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type lrint,@function - .size lrint,.-lrint - .data -# -- End lrint - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4290772992 - .long 1105199103 - .long 4290772992 - .long 1105199103 - .long 0 - .long 3252682752 - .long 0 - .long 3252682752 - .long 2097152 - .long 3252682752 - .long 2097152 - .long 3252682752 - .long 0 - .long 1105199104 - .long 0 - .long 1105199104 - .long 2139095040 - .long 2139095040 - .long 2139095040 - .long 2139095040 - .type static_const_table,@object - .size static_const_table,80 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrintf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrintf_wmt.S deleted file mode 100644 index 9a3925257b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrintf_wmt.S +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lrintf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin lrintf - .text - .align 16,0x90 - .globl lrintf -lrintf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movss 128(%esp), %xmm0 - movss %xmm0, 16(%esp) - pextrw $1, %xmm0, %ecx - andl $32640, %ecx - cmpl $20224, %ecx - jge .L_2TAG_PACKET_0.0.3 - cvtss2si %xmm0, %eax - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - comiss (%ebx), %xmm0 - jp .L_2TAG_PACKET_2.0.3 - je .L_2TAG_PACKET_3.0.3 - movl $-2147483648, %eax - movss 16(%ebx), %xmm1 - subss %xmm1, %xmm1 - movl %eax, 8(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 40(%esp), %eax - movl %eax, 8(%esp) - movl $185, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - movl 8(%esp), %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: -.L_2TAG_PACKET_3.0.3: - movl $-2147483648, %eax -.L_2TAG_PACKET_1.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type lrintf,@function - .size lrintf,.-lrintf - .data -# -- End lrintf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 3472883712 - .long 3472883712 - .long 3472883712 - .long 3472883712 - .long 2139095040 - .long 2139095040 - .long 2139095040 - .long 2139095040 - .type static_const_table,@object - .size static_const_table,32 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrintl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrintl.S deleted file mode 100644 index 139d84c86c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lrintl.S +++ /dev/null @@ -1,292 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lrintl.c" - .text -..TXTST0: -# -- Begin lrintl - .text - .align 16,0x90 - .globl lrintl -lrintl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp - movzbl 17(%ebp), %edi - movzwl 16(%ebp), %ebx - andl $128, %edi - andl $32767, %ebx - shrl $7, %edi - call ..L2 -..L2: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi - cmpl $16413, %ebx - jge ..B1.8 -..B1.2: - testl %ebx, %ebx - jne ..B1.6 -..B1.3: - cmpl $0, 12(%ebp) - jne ..B1.5 -..B1.4: - cmpl $0, 8(%ebp) - je ..B1.6 -..B1.5: - fldl _smallest_value_64@GOTOFF(%esi) - fstpl 16(%esp) -..B1.6: - fldt 8(%ebp) - fistpl 36(%esp) -..B1.7: - movl 36(%esp), %eax - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.8: - cmpl $16415, %ebx - jge ..B1.28 -..B1.9: - lea 2147483647(%edi), %eax - movl %eax, 12(%esp) -..B1.10: - fnstcw 32(%esp) -..B1.11: - movzwl 32(%esp), %eax - andl $3072, %eax - movl %eax, 28(%esp) - cmpl $16414, %ebx - movl 8(%ebp), %eax - movl 12(%ebp), %edx - movl %eax, 24(%esp) - jge ..B1.14 -..B1.12: - cmpl $0, 24(%esp) - movl %edx, %ecx - movl $0, %eax - setne %al - shll $31, %ecx - orl %ecx, %eax - movl %eax, 24(%esp) -..B1.14: - movl %ebx, %ecx - negl %ecx - addl $30, %ecx - shrl %cl, %edx - cmpl $0, 28(%esp) - jne ..B1.16 -..B1.15: - testl $2147483647, %eax - movl %edi, (%esp) - movl %eax, %edi - movl $0, %eax - movl %eax, %ecx - setne %cl - shrl $31, %edi - orl %edx, %ecx - andl %ecx, %edi - xorl %ecx, %ecx - addl %edi, %edx - movl (%esp), %edi - adcl $0, %ecx - jmp ..B1.24 -..B1.16: - cmpl $2048, 28(%esp) - jne ..B1.18 -..B1.17: - testl %edi, %edi - movl $0, %eax - setne %al - movl %eax, (%esp) - jmp ..B1.19 -..B1.18: - movl $0, (%esp) - cmpl $1024, 28(%esp) - je ..B1.20 -..B1.19: - movl $0, 4(%esp) - jmp ..B1.21 -..B1.20: - testl %edi, %edi - movl $0, %eax - sete %al - movl %eax, 4(%esp) -..B1.21: - cmpl $3072, 28(%esp) - movl $0, %eax - sete %al - xorl %ecx, %ecx - orl (%esp), %eax - orl 4(%esp), %eax - jne ..B1.24 -..B1.23: - cmpl $0, 24(%esp) - movl $0, %eax - setne %al - addl %eax, %edx - adcl $0, %ecx -..B1.24: - movl %edx, %eax - subl 12(%esp), %eax - movl %eax, (%esp) - movl $0, %eax - sbbl %eax, %ecx - jb ..B1.25 -..B1.39: - movl (%esp), %eax - orl %ecx, %eax - jne ..B1.28 -..B1.25: - cmpl $0, 24(%esp) - je ..B1.27 -..B1.26: - fldl _ones@GOTOFF(%esi) - movl %edx, 36(%esp) - faddl _small_value_64@GOTOFF(%esi) - fstpl 16(%esp) -..B1.27: - movl %edx, %eax - negl %eax - testl %edi, %edi - jne ..L3 - movl %edx, %eax -..L3: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.28: - fldl _infs@GOTOFF(%esi) - cmpl $32767, %ebx - fmull _zeros@GOTOFF(%esi) - fstpl 16(%esp) - movl $-2147483648, 36(%esp) - jne ..B1.31 -..B1.29: - cmpl $-2147483648, 12(%ebp) - jne ..B1.36 -..B1.30: - cmpl $0, 8(%ebp) - jne ..B1.36 -..B1.31: - fnstcw 10(%esp) -..B1.32: - movzwl 10(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.33: - orl $-64768, %edx - movw %dx, 8(%esp) -..B1.34: - fldcw 8(%esp) -..B1.35: - fldcw 10(%esp) -..B1.36: - movl 36(%esp), %eax - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type lrintl,@function - .size lrintl,.-lrintl - .data -# -- End lrintl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lround_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lround_wmt.S deleted file mode 100644 index 1b3502a60d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lround_wmt.S +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lround_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin lround - .text - .align 16,0x90 - .globl lround -lround: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movq %xmm0, 16(%esp) - movq 16(%ebx), %xmm4 - movq 64(%ebx), %xmm5 - movq 96(%ebx), %xmm3 - movq (%ebx), %xmm1 - movdqa %xmm4, %xmm2 - pandn %xmm0, %xmm4 - pand %xmm0, %xmm2 - por %xmm5, %xmm2 - pextrw $3, %xmm0, %eax - andl $32752, %eax - subl $16368, %eax - cmpl $480, %eax - jae .L_2TAG_PACKET_0.0.3 - psrlq $52, %xmm4 - psubq %xmm4, %xmm3 - psllq %xmm3, %xmm1 - addsd %xmm2, %xmm0 - pand %xmm1, %xmm0 - cvttsd2si %xmm0, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - js .L_2TAG_PACKET_2.0.3 - movdqa %xmm2, %xmm6 - movq 80(%ebx), %xmm7 - psrlq $63, %xmm6 - paddq %xmm6, %xmm7 - cmpl $512, %eax - jge .L_2TAG_PACKET_3.0.3 - movq 48(%ebx), %xmm2 - addsd %xmm4, %xmm5 - psrlq $52, %xmm4 - psubq %xmm4, %xmm3 - movd %xmm6, %edx - psllq %xmm3, %xmm1 - pand %xmm1, %xmm5 - addsd %xmm2, %xmm5 - por %xmm7, %xmm2 - movd %xmm5, %eax - psubd %xmm5, %xmm2 - pmovmskb %xmm2, %ecx - andl $136, %ecx - jne .L_2TAG_PACKET_3.0.3 - testl %edx, %edx - je .L_2TAG_PACKET_4.0.3 - negl %eax -.L_2TAG_PACKET_4.0.3: - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - addl $16, %eax - js .L_2TAG_PACKET_5.0.3 - addsd %xmm2, %xmm2 - cvttsd2si %xmm2, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_5.0.3: - xorl %eax, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - movq 32(%ebx), %xmm1 - movl $-2147483648, %eax - pxor %xmm2, %xmm2 - movd %eax, %xmm7 - mulsd %xmm2, %xmm1 - ucomisd %xmm0, %xmm0 - jc .L_2TAG_PACKET_6.0.3 - movq %xmm7, 8(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 40(%esp), %eax - movl %eax, 8(%esp) - movl $190, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - movl 8(%esp), %eax -.L_2TAG_PACKET_6.0.3: -.L_2TAG_PACKET_1.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type lround,@function - .size lround,.-lround - .data -# -- End lround - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 2147483647 - .long 0 - .long 2147483647 - .long 0 - .long 1075 - .long 0 - .long 1075 - .long 0 - .type static_const_table,@object - .size static_const_table,112 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lroundf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lroundf_wmt.S deleted file mode 100644 index d8a462096b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lroundf_wmt.S +++ /dev/null @@ -1,228 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lroundf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin lroundf - .text - .align 16,0x90 - .globl lroundf -lroundf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movss 128(%esp), %xmm0 - movss %xmm0, 16(%esp) - movd 16(%ebx), %xmm4 - movd 64(%ebx), %xmm5 - movd 112(%ebx), %xmm3 - movd (%ebx), %xmm1 - movdqa %xmm4, %xmm2 - pandn %xmm0, %xmm4 - pand %xmm0, %xmm2 - por %xmm5, %xmm2 - pextrw $1, %xmm0, %eax - andl $32640, %eax - subl $16256, %eax - cmpl $2944, %eax - jae .L_2TAG_PACKET_0.0.3 - psrld $23, %xmm4 - psubd %xmm4, %xmm3 - pslld %xmm3, %xmm1 - addss %xmm2, %xmm0 - pand %xmm1, %xmm0 - cvttss2si %xmm0, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_0.0.3: - js .L_2TAG_PACKET_2.0.3 - cmpl $3840, %eax - jae .L_2TAG_PACKET_3.0.3 - cvttss2si %xmm0, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - movdqa %xmm2, %xmm6 - movd 32(%ebx), %xmm7 - psrld $31, %xmm6 - paddd %xmm6, %xmm7 - cmpl $4096, %eax - jge .L_2TAG_PACKET_4.0.3 - movd 96(%ebx), %xmm5 - movd 80(%ebx), %xmm2 - psrld $23, %xmm4 - pand %xmm0, %xmm5 - psubd %xmm3, %xmm4 - por %xmm2, %xmm5 - movd %xmm6, %edx - psllq %xmm4, %xmm5 - movd %xmm5, %eax - psubd %xmm5, %xmm7 - pmovmskb %xmm7, %ecx - andl $136, %ecx - jne .L_2TAG_PACKET_4.0.3 - testl %edx, %edx - je .L_2TAG_PACKET_5.0.3 - negl %eax -.L_2TAG_PACKET_5.0.3: - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - addl $128, %eax - js .L_2TAG_PACKET_6.0.3 - addss %xmm2, %xmm2 - cvttss2si %xmm2, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_6.0.3: - xorl %eax, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_4.0.3: - movd 48(%ebx), %xmm1 - movl $-2147483648, %eax - pxor %xmm2, %xmm2 - movd %eax, %xmm7 - mulss %xmm2, %xmm1 - ucomiss %xmm0, %xmm0 - jc .L_2TAG_PACKET_7.0.3 - movq %xmm7, 8(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 128(%esp), %eax - movl %eax, 4(%esp) - lea 40(%esp), %eax - movl %eax, 8(%esp) - movl $191, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - movl 8(%esp), %eax -.L_2TAG_PACKET_7.0.3: -.L_2TAG_PACKET_1.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type lroundf,@function - .size lroundf,.-lroundf - .data -# -- End lroundf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 2147483648 - .long 2147483648 - .long 2147483648 - .long 2147483648 - .long 2147483647 - .long 2147483647 - .long 2147483647 - .long 2147483647 - .long 2139095040 - .long 2139095040 - .long 2139095040 - .long 2139095040 - .long 1056964608 - .long 1056964608 - .long 1056964608 - .long 1056964608 - .long 8388608 - .long 8388608 - .long 8388608 - .long 8388608 - .long 8388607 - .long 8388607 - .long 8388607 - .long 8388607 - .long 150 - .long 150 - .long 150 - .long 150 - .type static_const_table,@object - .size static_const_table,128 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lroundl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lroundl.S deleted file mode 100644 index df2caf23a8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/lroundl.S +++ /dev/null @@ -1,253 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lroundl.c" - .text -..TXTST0: -# -- Begin lroundl - .text - .align 16,0x90 - .globl lroundl -lroundl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $20, %esp - movzbl 17(%ebp), %edi - movzwl 16(%ebp), %esi - andl $128, %edi - andl $32767, %esi - shrl $7, %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $16413, %esi - jge ..B1.11 -..B1.2: - cmpl $16383, %esi - jge ..B1.10 -..B1.3: - cmpl $16382, %esi - jge ..B1.9 -..B1.4: - testl %esi, %esi - jne ..B1.8 -..B1.5: - cmpl $0, 12(%ebp) - jne ..B1.7 -..B1.6: - cmpl $0, 8(%ebp) - je ..B1.8 -..B1.7: - fldl _smallest_value_64@GOTOFF(%ebx) - fstpl 8(%esp) -..B1.8: - xorl %eax, %eax - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.9: - movl iones@GOTOFF(%ebx,%edi,4), %eax - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.10: - negl %esi - movl 12(%ebp), %eax - movl %eax, %edx - lea 30(%esi), %ecx - addl $29, %esi - shrl %cl, %edx - movl %esi, %ecx - shrl %cl, %eax - andl $1, %eax - addl %eax, %edx - movl %edx, %eax - negl %eax - testl %edi, %edi - jne ..L3 - movl %edx, %eax -..L3: - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - cmpl $16415, %esi - jge ..B1.17 -..B1.12: - movl %esi, %ecx - lea 2147483647(%edi), %edx - negl %ecx - movl %edx, 4(%esp) - addl $30, %ecx - movl 12(%ebp), %edx - movl %edx, %eax - shrl %cl, %eax - cmpl $16414, %esi - jge ..B1.14 -..B1.13: - andl $1, %edx - addl %eax, %edx - movl $0, %eax - adcl $0, %eax - jmp ..B1.15 -..B1.14: - movl 8(%ebp), %edx - shrl $31, %edx - addl %eax, %edx - movl $0, %eax - adcl $0, %eax -..B1.15: - movl %edx, %ecx - subl 4(%esp), %ecx - movl %ecx, 16(%esp) - movl $0, %ecx - sbbl %ecx, %eax - jb ..B1.16 -..B1.28: - movl 16(%esp), %ecx - orl %eax, %ecx - jne ..B1.17 -..B1.16: - movl %edx, %eax - negl %eax - testl %edi, %edi - jne ..L4 - movl %edx, %eax -..L4: - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - fldl _infs@GOTOFF(%ebx) - cmpl $32767, %esi - fmull _zeros@GOTOFF(%ebx) - fstpl 8(%esp) - jne ..B1.20 -..B1.18: - cmpl $-2147483648, 12(%ebp) - jne ..B1.25 -..B1.19: - cmpl $0, 8(%ebp) - jne ..B1.25 -..B1.20: - fnstcw 2(%esp) -..B1.21: - movzwl 2(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.25 -..B1.22: - orl $-64768, %edx - movw %dx, (%esp) -..B1.23: - fldcw (%esp) -..B1.24: - fldcw 2(%esp) -..B1.25: - movl $-2147483648, %eax - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type lroundl,@function - .size lroundl,.-lroundl - .data -# -- End lroundl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modf_wmt.S deleted file mode 100644 index ca77aede89..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modf_wmt.S +++ /dev/null @@ -1,150 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "modf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin modf - .text - .align 16,0x90 - .globl modf -modf: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movsd %xmm0, 16(%esp) - movapd %xmm0, %xmm1 - movq (%ebx), %xmm2 - movq 32(%ebx), %xmm5 - movl 136(%esp), %ecx - movdqa %xmm1, %xmm0 - psrlq $52, %xmm1 - pand %xmm0, %xmm5 - movq 16(%ebx), %xmm3 - movd %xmm1, %eax - andl $2047, %eax - subl $1023, %eax - js .L_2TAG_PACKET_0.0.2 - cmpl $52, %eax - jae .L_2TAG_PACKET_1.0.2 - pand %xmm3, %xmm1 - movdqa %xmm0, %xmm4 - psubd %xmm1, %xmm2 - psrlq %xmm2, %xmm4 - psllq %xmm2, %xmm4 - movq %xmm4, (%ecx) - subsd %xmm4, %xmm0 - por %xmm5, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_0.0.2: - movq %xmm5, (%ecx) - fldl 16(%esp) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_1.0.2: - ucomisd %xmm0, %xmm0 - jp .L_2TAG_PACKET_3.0.2 - movq %xmm0, (%ecx) - movq %xmm5, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_3.0.2: - mulsd %xmm0, %xmm0 - movq %xmm0, (%ecx) - movq %xmm0, (%esp) - fldl (%esp) -.L_2TAG_PACKET_2.0.2: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type modf,@function - .size modf,.-modf - .data -# -- End modf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1075 - .long 0 - .long 1075 - .long 0 - .long 2047 - .long 0 - .long 2047 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .type static_const_table,@object - .size static_const_table,48 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modff.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modff.S deleted file mode 100644 index 6cef6fb071..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modff.S +++ /dev/null @@ -1,132 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "modff.c" - .text -..TXTST0: -# -- Begin modff - .text - .align 16,0x90 - .globl modff -modff: -# parameter 1: 12 + %esp -# parameter 2: 16 + %esp -..B1.1: -..L1: - - pushl %ebx - pushl %ebp - movl 12(%esp), %eax - movl %eax, %ecx - andl $2147483647, %ecx - movl 16(%esp), %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea -1065353216(%ecx), %ebp - cmpl $192937984, %ebp - jae ..B1.6 -..B1.2: - shrl $23, %ecx - movl $-1, %ebp - negl %ecx - addl $22, %ecx - shll %cl, %ebp - movl %ebp, %ecx - andl %eax, %ebp - notl %ecx - movl %ebp, (%edx) - testl %ecx, %eax - je ..B1.4 -..B1.3: - flds 12(%esp) - fsubs (%edx) - popl %ebp - popl %ebx - ret -..B1.4: - shrl $31, %eax - flds _zeros@GOTOFF(%ebx,%eax,4) -..B1.5: - popl %ebp - popl %ebx - ret -..B1.6: - movl %eax, %ebp - shrl $31, %ebp - cmpl $2139095040, %ecx - ja ..B1.11 -..B1.7: - cmpl $1065353216, %ecx - jbe ..B1.9 -..B1.8: - flds _zeros@GOTOFF(%ebx,%ebp,4) - movl %eax, (%edx) - popl %ebp - popl %ebx - ret -..B1.9: - flds 12(%esp) - movl _zeros@GOTOFF(%ebx,%ebp,4), %eax - movl %eax, (%edx) -..B1.10: - popl %ebp - popl %ebx - ret -..B1.11: - flds 12(%esp) - fadd %st(0), %st - fsts (%edx) - popl %ebp - popl %ebx - ret - .align 16,0x90 - .type modff,@function - .size modff,.-modff - .data -# -- End modff - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modfl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modfl.S deleted file mode 100644 index fff4efcbc1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/modfl.S +++ /dev/null @@ -1,263 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "modfl.c" - .text -..TXTST0: -# -- Begin modfl - .text - .align 16,0x90 - .globl modfl -modfl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %ebx - subl $24, %esp - movl 20(%ebp), %edx -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %ecx - andl $32767, %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - cmpl $16446, %ecx - jge ..B1.21 -..B1.4: - cmpl $16383, %ecx - jl ..B1.16 -..B1.5: - fldt 8(%ebp) - cmpl $16415, %ecx - fstpt (%esp) - jge ..B1.7 -..B1.6: - negl %ecx - movl $-1, %ebx - addl $30, %ecx - shll %cl, %ebx - movl %ebx, %ecx - notl %ecx - movl 12(%ebp), %esi - andl %esi, %ecx - andl %ebx, %esi - xorl %ebx, %ebx - orl 8(%ebp), %ecx - movl %esi, 12(%ebp) - jmp ..B1.8 -..B1.7: - negl %ecx - movl $-1, %ebx - addl $30, %ecx - shll %cl, %ebx - movl %ebx, %ecx - notl %ecx - movl 8(%ebp), %esi - andl %esi, %ecx - andl %esi, %ebx -..B1.8: - movl %ebx, 8(%ebp) - testl %ecx, %ecx - je ..B1.14 -..B1.9: - movzwl 14(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.23 -..B1.10: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.11: - fldcw 12(%esp) -..B1.12: - fldt 8(%ebp) - fstpt (%edx) - fldt (%edx) - fldt (%esp) - fsubp %st, %st(1) - fstpt (%esp) -..B1.13: - fldcw 14(%esp) - jmp ..B1.15 -..B1.14: - fldt 8(%ebp) - fstpt (%edx) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl _zeros@GOTOFF(%eax,%edx,8) - fstpt (%esp) -..B1.15: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - testl %ecx, %ecx - jne ..B1.20 -..B1.17: - cmpl $0, 12(%ebp) - jne ..B1.19 -..B1.18: - cmpl $0, 8(%ebp) - je ..B1.20 -..B1.19: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl 16(%esp) -..B1.20: - movzbl 17(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - fldl _zeros@GOTOFF(%eax,%ecx,8) - fstpt (%edx) - fldt 8(%ebp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.21: - cmpl $32767, %ecx - je ..B1.24 -..B1.22: - fldt 8(%ebp) - fstpt (%edx) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl _zeros@GOTOFF(%eax,%edx,8) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - fldt 8(%ebp) - fstpt (%edx) - fldt (%edx) - fldt (%esp) - fsubp %st, %st(1) - fstpt (%esp) - jmp ..B1.15 -..B1.24: - cmpl $-2147483648, 12(%ebp) - jne ..B1.26 -..B1.25: - cmpl $0, 8(%ebp) - je ..B1.22 -..B1.26: - movzwl 14(%esp), %ebx - movl %ebx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.32 -..B1.27: - orl $-64768, %ebx - movw %bx, 12(%esp) -..B1.28: - fldcw 12(%esp) -..B1.29: - fldt 8(%ebp) - fmull _ones@GOTOFF(%eax) - fstpt (%esp) - fldt (%esp) - fstpt (%edx) -..B1.30: - fldcw 14(%esp) -..B1.31: - fldt (%esp) - addl $24, %esp - popl %ebx - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - fldt 8(%ebp) - fmull _ones@GOTOFF(%eax) - fstpt (%esp) - fldt (%esp) - fstpt (%edx) - jmp ..B1.31 - .align 16,0x90 - .type modfl,@function - .size modfl,.-modfl - .data -# -- End modfl - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nan.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nan.S deleted file mode 100644 index a112ca9b8a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nan.S +++ /dev/null @@ -1,120 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nan.c" - .text -..TXTST0: -# -- Begin nanf - .text - .align 16,0x90 - .globl nanf -nanf: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - subl $24, %esp - pushl 28(%esp) - call __libm_conv_strtoull -..B1.2: - andl $4194303, %eax - orl $2143289344, %eax - movl %eax, 16(%esp) - flds 16(%esp) - addl $28, %esp - ret - .align 16,0x90 - .type nanf,@function - .size nanf,.-nanf - .data -# -- End nanf - .text -# -- Begin nan - .text - .align 16,0x90 - .globl nan -nan: -# parameter 1: 32 + %esp -..B2.1: -..L2: - - subl $24, %esp - pushl 28(%esp) - call __libm_conv_strtoull -..B2.2: - andl $524287, %edx - orl $2146959360, %edx - movl %eax, 16(%esp) - movl %edx, 20(%esp) - fldl 16(%esp) - addl $28, %esp - ret - .align 16,0x90 - .type nan,@function - .size nan,.-nan - .data -# -- End nan - .text -# -- Begin nanl - .text - .align 16,0x90 - .globl nanl -nanl: -# parameter 1: 32 + %esp -..B3.1: -..L3: - - subl $24, %esp - pushl 28(%esp) - call __libm_conv_strtoull -..B3.2: - movl %eax, 16(%esp) - orl $-1073741824, %edx - movl $32767, %eax - movl %edx, 20(%esp) - movw %ax, 24(%esp) - fldt 16(%esp) - addl $28, %esp - ret - .align 16,0x90 - .type nanl,@function - .size nanl,.-nanl - .data -# -- End nanl - .data - .hidden __libm_conv_strtoull - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyint_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyint_wmt.S deleted file mode 100644 index 19391794e1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyint_wmt.S +++ /dev/null @@ -1,295 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nearbyint_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin nearbyint - .text - .align 16,0x90 - .globl nearbyint -nearbyint: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - pextrw $3, %xmm0, %ecx - movl $32752, %eax - andl %ecx, %eax - cmpl $17200, %eax - jge .L_2TAG_PACKET_0.0.2 - fnstcw 8(%esp) - subl $16368, %eax - jl .L_2TAG_PACKET_1.0.2 - movzwl 8(%esp), %edx - andl $3072, %edx - jne .L_2TAG_PACKET_2.0.2 - movq (%ebx), %xmm1 - movq 16(%ebx), %xmm2 - pand %xmm0, %xmm1 - movq 32(%ebx), %xmm4 - movq 32(%ebx), %xmm3 - psubq 48(%ebx), %xmm1 - pand %xmm0, %xmm2 - psrlq $52, %xmm1 - movapd %xmm0, %xmm5 - psllq %xmm1, %xmm0 - por 48(%ebx), %xmm2 - pand %xmm0, %xmm4 - pand 64(%ebx), %xmm0 - psrlq %xmm1, %xmm3 - por 80(%ebx), %xmm0 - por 48(%ebx), %xmm4 - pandn %xmm5, %xmm3 - cmpeqsd 96(%ebx), %xmm0 - cmpnlesd 96(%ebx), %xmm4 - por %xmm4, %xmm0 - pand %xmm2, %xmm0 - addsd %xmm3, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_2.0.2: - cmpl $3072, %edx - je .L_2TAG_PACKET_4.0.2 - testl $1024, %edx - je .L_2TAG_PACKET_5.0.2 - movq (%ebx), %xmm1 - pand %xmm0, %xmm1 - xorpd %xmm2, %xmm2 - movq 32(%ebx), %xmm3 - psubq 48(%ebx), %xmm1 - movapd %xmm0, %xmm5 - xorpd %xmm4, %xmm4 - psrlq $52, %xmm1 - cmpnlesd %xmm0, %xmm2 - psllq %xmm1, %xmm0 - pand 32(%ebx), %xmm0 - pcmpeqd %xmm4, %xmm0 - psrlq %xmm1, %xmm3 - pshufd $1, %xmm0, %xmm4 - pandn %xmm5, %xmm3 - pand %xmm4, %xmm0 - pandn %xmm2, %xmm0 - pand 48(%ebx), %xmm0 - subsd %xmm0, %xmm3 - movq %xmm3, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_5.0.2: - movq (%ebx), %xmm1 - pand %xmm0, %xmm1 - xorpd %xmm2, %xmm2 - movq 32(%ebx), %xmm3 - psubq 48(%ebx), %xmm1 - movapd %xmm0, %xmm5 - xorpd %xmm4, %xmm4 - psrlq $52, %xmm1 - cmplesd %xmm0, %xmm2 - psllq %xmm1, %xmm0 - pand 32(%ebx), %xmm0 - pcmpeqd %xmm4, %xmm0 - psrlq %xmm1, %xmm3 - pshufd $1, %xmm0, %xmm4 - pandn %xmm5, %xmm3 - pand %xmm4, %xmm0 - pandn %xmm2, %xmm0 - pand 48(%ebx), %xmm0 - addsd %xmm3, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_4.0.2: - movq (%ebx), %xmm1 - pand %xmm0, %xmm1 - movq 32(%ebx), %xmm3 - psubq 48(%ebx), %xmm1 - psrlq $52, %xmm1 - psrlq %xmm1, %xmm3 - pandn %xmm0, %xmm3 - movq %xmm3, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_1.0.2: - movzwl 8(%esp), %edx - andl $3072, %edx - jne .L_2TAG_PACKET_6.0.2 - andpd 112(%ebx), %xmm0 - addl $16, %eax - shrl $14, %ecx - shrl $31, %eax - ucomisd 128(%ebx), %xmm0 - je .L_2TAG_PACKET_7.0.2 - andl $2, %ecx - orl %ecx, %eax - flds 144(%ebx,%eax,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_7.0.2: - shrl $15, %ecx - flds 160(%ebx,%ecx,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_6.0.2: - cmpl $3072, %edx - je .L_2TAG_PACKET_8.0.2 - testl $1024, %edx - je .L_2TAG_PACKET_9.0.2 - pxor %xmm1, %xmm1 - cmpnlesd %xmm0, %xmm1 - movd %xmm1, %eax - shrl $15, %ecx - subl %eax, %ecx - flds 176(%ebx,%ecx,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_9.0.2: - pxor %xmm1, %xmm1 - cmpnltsd %xmm0, %xmm1 - movd %xmm1, %eax - shrl $15, %ecx - subl %ecx, %eax - flds 200(%ebx,%eax,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_8.0.2: - shrl $15, %ecx - flds 208(%ebx,%ecx,4) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - movq %xmm0, (%esp) - fldl (%esp) - fldz - faddp -.L_2TAG_PACKET_3.0.2: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type nearbyint,@function - .size nearbyint,.-nearbyint - .data -# -- End nearbyint - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .long 4294967295 - .long 2097151 - .long 4294967295 - .long 2097151 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 0 - .long 1073217536 - .long 0 - .long 1073217536 - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .long 1065353216 - .long 0 - .long 3212836864 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 3212836864 - .long 0 - .long 2147483648 - .long 0 - .long 1065353216 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,224 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyintf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyintf_gen.S deleted file mode 100644 index f36b9a94f0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyintf_gen.S +++ /dev/null @@ -1,375 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nearbyintf_gen.c" - .text -..TXTST0: -# -- Begin nearbyintf - .text - .align 16,0x90 - .globl nearbyintf -nearbyintf: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - pushl %ebp - subl $16, %esp -..B1.2: - fnstcw 4(%esp) -..B1.3: - movzwl 34(%esp), %eax - andl $32640, %eax - shrl $7, %eax - cmpl $150, %eax - jge ..B1.40 -..B1.4: - movzwl 4(%esp), %ebx - andl $3072, %ebx - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - cmpl $1024, %ebx - je ..B1.31 -..B1.5: - cmpl $2048, %ebx - jne ..B1.15 -..B1.6: - cmpl $127, %eax - jl ..B1.11 -..B1.7: - negl %eax - movl $8388607, %edx - addl $22, %eax - movl 32(%esp), %ebx - movl %ebx, %ebp - movl %eax, %ecx - andl $8388607, %ebp - shll %cl, %edx - andl $-8388608, %ebx - andl %ebp, %edx - orl %edx, %ebx - movl %ebx, %eax - andl $8388607, %eax - movl %ebx, 32(%esp) - testl $-2147483648, %ebx - jne ..B1.10 -..B1.8: - cmpl %ebp, %eax - je ..B1.10 -..B1.9: - fld1 - fadds 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.10: - flds 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.11: - testl %eax, %eax - jne ..B1.14 -..B1.12: - testl $8388607, 32(%esp) - jne ..B1.14 -..B1.13: - flds 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.14: - movzbl 35(%esp), %ecx - andl $128, %ecx - shrl $7, %ecx - movl 32(%esp), %eax - movl %eax, (%esp) - flds _pone_nzero@GOTOFF(%edx,%ecx,4) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.15: - cmpl $3072, %ebx - jne ..B1.20 -..B1.16: - cmpl $127, %eax - jl ..B1.18 -..B1.17: - negl %eax - movl $8388607, %edx - addl $22, %eax - movl %eax, %ecx - shll %cl, %edx - movl 32(%esp), %ebx - movl %ebx, %ebp - andl %edx, %ebx - andl $-8388608, %ebp - andl $8388607, %ebx - orl %ebx, %ebp - movl %ebp, 32(%esp) - flds 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.18: - movzbl 35(%esp), %ecx - andl $128, %ecx - shrl $7, %ecx - movl 32(%esp), %eax - movl %eax, (%esp) - flds _zeros@GOTOFF(%edx,%ecx,4) -..B1.19: - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.20: - cmpl $127, %eax - jl ..B1.27 -..B1.21: - movl 32(%esp), %edi - movl %edi, %ebp - andl $8388607, %ebp - lea 10(%eax), %ecx - negl %eax - movl %ebp, %ebx - addl $22, %eax - andl $-8388608, %edi - shll %cl, %ebx - movl %eax, %ecx - movl $8388607, %eax - shll %cl, %eax - andl %eax, %ebp - orl %ebp, %edi - movl %edi, 32(%esp) - testl %ebx, %ebx - jge ..B1.26 -..B1.22: - cmpl $-2147483648, %ebx - jne ..B1.25 -..B1.23: - movzwl 34(%esp), %ecx - movl $1, %eax - shrl $7, %ecx - negl %ecx - addl $22, %ecx - shll %cl, %eax - testl %eax, 32(%esp) - je ..B1.26 -..B1.24: - flds 32(%esp) - movzbl 35(%esp), %eax - andl $128, %eax - shrl $7, %eax - fadds _ones@GOTOFF(%edx,%eax,4) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.25: - flds 32(%esp) - movzbl 35(%esp), %eax - andl $128, %eax - shrl $7, %eax - fadds _ones@GOTOFF(%edx,%eax,4) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.26: - flds 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.27: - cmpl $126, %eax - jle ..B1.29 -..B1.28: - movzbl 35(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _ones@GOTOFF(%edx,%eax,4) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.29: - je ..B1.41 -..B1.30: - movzbl 35(%esp), %ecx - andl $128, %ecx - shrl $7, %ecx - movl 32(%esp), %eax - movl %eax, (%esp) - flds _zeros@GOTOFF(%edx,%ecx,4) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.31: - cmpl $127, %eax - jl ..B1.36 -..B1.32: - negl %eax - movl $8388607, %edi - addl $22, %eax - movl 32(%esp), %ebx - movl %ebx, %ebp - movl %eax, %ecx - andl $8388607, %ebp - shll %cl, %edi - andl $-8388608, %ebx - andl %ebp, %edi - orl %edi, %ebx - movl %ebx, %eax - andl $8388607, %eax - movl %ebx, 32(%esp) - testl $-2147483648, %ebx - je ..B1.35 -..B1.33: - cmpl %ebp, %eax - je ..B1.35 -..B1.34: - flds 32(%esp) - fadds .L_2il0floatpacket.0@GOTOFF(%edx) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.35: - flds 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.36: - testl %eax, %eax - jne ..B1.39 -..B1.37: - testl $8388607, 32(%esp) - jne ..B1.39 -..B1.38: - flds 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.39: - movzbl 35(%esp), %ecx - andl $128, %ecx - shrl $7, %ecx - movl 32(%esp), %eax - movl %eax, (%esp) - flds _pzero_none@GOTOFF(%edx,%ecx,4) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.40: - flds 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.41: - testl $8388607, 32(%esp) - jg ..B1.28 - jmp ..B1.30 - .align 16,0x90 - .type nearbyintf,@function - .size nearbyintf,.-nearbyintf - .data -# -- End nearbyintf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -_pone_nzero: - .long 1065353216 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 4 -_pzero_none: - .long 0 - .long 3212836864 - .type _pzero_none,@object - .size _pzero_none,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyintl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyintl.S deleted file mode 100644 index d1e1813adf..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nearbyintl.S +++ /dev/null @@ -1,663 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nearbyintl.c" - .text -..TXTST0: -# -- Begin nearbyintl - .text - .align 16,0x90 - .globl nearbyintl -nearbyintl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %ebx - andl $32767, %ebx - movzwl 14(%esp), %edx - cmpl $16446, %ebx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - jge ..B1.97 -..B1.4: - movl %edx, %esi - andl $3072, %esi - cmpl $1024, %esi - je ..B1.78 -..B1.5: - cmpl $2048, %esi - jne ..B1.25 -..B1.6: - cmpl $16383, %ebx - jl ..B1.19 -..B1.7: - cmpl $16415, %ebx - jl ..B1.9 -..B1.8: - negl %ebx - movl $-1, %esi - addl $30, %ebx - movl %ebx, %ecx - shll %cl, %esi - movl 8(%ebp), %edi - andl %edi, %esi - movl %esi, 8(%ebp) - xorl %edi, %esi - jmp ..B1.10 -..B1.9: - negl %ebx - movl $-1, %esi - addl $30, %ebx - movl %ebx, %ecx - shll %cl, %esi - movl 12(%ebp), %edi - andl %edi, %esi - movl %esi, 12(%ebp) - xorl %edi, %esi - orl 8(%ebp), %esi - movl $0, 8(%ebp) -..B1.10: - movzbl 17(%ebp), %ecx - testl $128, %ecx - jne ..B1.18 -..B1.11: - testl %esi, %esi - je ..B1.18 -..B1.12: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.103 -..B1.13: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.14: - fldcw 12(%esp) -..B1.15: - fldt 8(%ebp) - faddl _ones@GOTOFF(%eax) - fstpt (%esp) -..B1.16: - fldcw 14(%esp) -..B1.17: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - fldt 8(%ebp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - testl %ebx, %ebx - jne ..B1.24 -..B1.20: - cmpl $0, 12(%ebp) - jne ..B1.23 -..B1.21: - cmpl $0, 8(%ebp) - jne ..B1.23 -..B1.22: - fldt 8(%ebp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl 16(%esp) -..B1.24: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl _pone_nzero@GOTOFF(%eax,%edx,8) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - cmpl $3072, %esi - jne ..B1.36 -..B1.26: - cmpl $16383, %ebx - jl ..B1.31 -..B1.27: - cmpl $16415, %ebx - jl ..B1.29 -..B1.28: - negl %ebx - movl $-1, %eax - addl $30, %ebx - movl %ebx, %ecx - shll %cl, %eax - andl 8(%ebp), %eax - jmp ..B1.30 -..B1.29: - negl %ebx - movl $-1, %eax - addl $30, %ebx - movl %ebx, %ecx - shll %cl, %eax - andl %eax, 12(%ebp) - xorl %eax, %eax -..B1.30: - movl %eax, 8(%ebp) - fldt 8(%ebp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - testl %ebx, %ebx - jne ..B1.35 -..B1.32: - cmpl $0, 12(%ebp) - jne ..B1.34 -..B1.33: - cmpl $0, 8(%ebp) - je ..B1.35 -..B1.34: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl 16(%esp) -..B1.35: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl _zeros@GOTOFF(%eax,%edx,8) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.36: - cmpl $16383, %ebx - jl ..B1.70 -..B1.37: - movl 8(%ebp), %edi - cmpl $16414, %ebx - jl ..B1.39 -..B1.38: - movl %edi, %esi - lea 2(%ebx), %ecx - shll %cl, %esi - movl %esi, 4(%esp) - movl $0, (%esp) - jmp ..B1.40 -..B1.39: - movl 12(%ebp), %esi - lea 2(%ebx), %ecx - shll %cl, %esi - movl %esi, 4(%esp) - movl %edi, (%esp) -..B1.40: - cmpl $16415, %ebx - jl ..B1.42 -..B1.41: - movl %ebx, %ecx - movl $-1, %esi - negl %ecx - addl $30, %ecx - shll %cl, %esi - andl %esi, %edi - movl %edi, 8(%ebp) - jmp ..B1.43 -..B1.42: - movl %ebx, %ecx - movl $-1, %esi - negl %ecx - xorl %edi, %edi - addl $30, %ecx - shll %cl, %esi - movl %edi, 8(%ebp) - andl %esi, 12(%ebp) -..B1.43: - cmpl $0, 4(%esp) - jge ..B1.69 -..B1.44: - movl 4(%esp), %esi - andl $2147483647, %esi - orl (%esp), %esi - je ..B1.52 -..B1.45: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.104 -..B1.46: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.47: - fldcw 12(%esp) -..B1.48: - movl $1, %ecx -..B1.49: - fldt 8(%ebp) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - testl %ecx, %ecx - faddl _ones@GOTOFF(%eax,%edx,8) - fstpt (%esp) - je ..B1.51 -..B1.50: - fldcw 14(%esp) -..B1.51: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.52: - cmpl $16415, %ebx - jl ..B1.61 -..B1.53: - negl %ebx - movl $1, %esi - addl $30, %ebx - movl %ebx, %ecx - shll %cl, %esi - testl %esi, %edi - je ..B1.69 -..B1.54: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.105 -..B1.55: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.56: - fldcw 12(%esp) -..B1.57: - movl $1, %ecx -..B1.58: - fldt 8(%ebp) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - testl %ecx, %ecx - faddl _ones@GOTOFF(%eax,%edx,8) - fstpt (%esp) - je ..B1.60 -..B1.59: - fldcw 14(%esp) -..B1.60: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.61: - negl %ebx - movl $1, %esi - addl $30, %ebx - movl %ebx, %ecx - shll %cl, %esi - testl %esi, 12(%ebp) - je ..B1.69 -..B1.62: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.106 -..B1.63: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.64: - fldcw 12(%esp) -..B1.65: - movl $1, %ecx -..B1.66: - fldt 8(%ebp) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - testl %ecx, %ecx - faddl _ones@GOTOFF(%eax,%edx,8) - fstpt (%esp) - je ..B1.68 -..B1.67: - fldcw 14(%esp) -..B1.68: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.69: - fldt 8(%ebp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.70: - cmpl $16382, %ebx - jle ..B1.72 -..B1.71: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl _ones@GOTOFF(%eax,%edx,8) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.72: - je ..B1.107 -..B1.73: - testl %ebx, %ebx - jne ..B1.77 -..B1.74: - cmpl $0, 12(%ebp) - jne ..B1.76 -..B1.75: - cmpl $0, 8(%ebp) - je ..B1.77 -..B1.76: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl 16(%esp) -..B1.77: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl _zeros@GOTOFF(%eax,%edx,8) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.78: - cmpl $16383, %ebx - jl ..B1.91 -..B1.79: - cmpl $16415, %ebx - jl ..B1.81 -..B1.80: - negl %ebx - movl $-1, %edi - addl $30, %ebx - movl %ebx, %ecx - shll %cl, %edi - movl 8(%ebp), %esi - andl %esi, %edi - movl %edi, 8(%ebp) - xorl %edi, %esi - jmp ..B1.82 -..B1.81: - negl %ebx - movl $-1, %edi - addl $30, %ebx - movl %ebx, %ecx - shll %cl, %edi - movl 12(%ebp), %esi - andl %esi, %edi - xorl %edi, %esi - orl 8(%ebp), %esi - movl %edi, 12(%ebp) - movl $0, 8(%ebp) -..B1.82: - movzbl 17(%ebp), %ecx - testl $128, %ecx - je ..B1.90 -..B1.83: - testl %esi, %esi - je ..B1.90 -..B1.84: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.110 -..B1.85: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.86: - fldcw 12(%esp) -..B1.87: - fldt 8(%ebp) - faddl 8+_ones@GOTOFF(%eax) - fstpt (%esp) -..B1.88: - fldcw 14(%esp) -..B1.89: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.90: - fldt 8(%ebp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.91: - testl %ebx, %ebx - jne ..B1.96 -..B1.92: - cmpl $0, 12(%ebp) - jne ..B1.95 -..B1.93: - cmpl $0, 8(%ebp) - jne ..B1.95 -..B1.94: - fldt 8(%ebp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.95: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl 16(%esp) -..B1.96: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl _pzero_none@GOTOFF(%eax,%edx,8) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.97: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.111 -..B1.98: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.99: - fldcw 12(%esp) -..B1.100: - fldt 8(%ebp) - fmull _ones@GOTOFF(%eax) - fstpt (%esp) -..B1.101: - fldcw 14(%esp) -..B1.102: - fldt (%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.103: - fldt 8(%ebp) - faddl _ones@GOTOFF(%eax) - fstpt (%esp) - jmp ..B1.17 -..B1.104: - xorl %ecx, %ecx - jmp ..B1.49 -..B1.105: - xorl %ecx, %ecx - jmp ..B1.58 -..B1.106: - xorl %ecx, %ecx - jmp ..B1.66 -..B1.107: - movl 12(%ebp), %edx - cmpl $-2147483648, %edx - ja ..B1.71 -..B1.108: - jne ..B1.77 -..B1.109: - cmpl $0, 8(%ebp) - ja ..B1.71 - jmp ..B1.77 -..B1.110: - fldt 8(%ebp) - faddl 8+_ones@GOTOFF(%eax) - fstpt (%esp) - jmp ..B1.89 -..B1.111: - fldt 8(%ebp) - fmull _ones@GOTOFF(%eax) - fstpt (%esp) - jmp ..B1.102 - .align 16,0x90 - .type nearbyintl,@function - .size nearbyintl,.-nearbyintl - .data -# -- End nearbyintl - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_pone_nzero: - .long 0 - .long 1072693248 - .long 0 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_pzero_none: - .long 0 - .long 0 - .long 0 - .long 3220176896 - .type _pzero_none,@object - .size _pzero_none,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafter_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafter_wmt.S deleted file mode 100644 index ecc9282675..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafter_wmt.S +++ /dev/null @@ -1,210 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nextafter_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin nextafter - .text - .align 16,0x90 - .globl nextafter -nextafter: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd 120(%esp), %xmm1 - ucomisd %xmm1, %xmm0 - jp .L_2TAG_PACKET_0.0.3 - je .L_2TAG_PACKET_1.0.3 - cmpltsd %xmm0, %xmm1 - comisd (%ebx), %xmm0 - je .L_2TAG_PACKET_2.0.3 - xorpd %xmm0, %xmm1 - paddq 48(%ebx), %xmm0 - psrlq $63, %xmm1 - psllq $1, %xmm1 - psubq %xmm1, %xmm0 - pextrw $3, %xmm0, %eax - andl $32767, %eax - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_3.0.3 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_0.0.3: - movsd %xmm1, (%esp) - fldl (%esp) - movsd %xmm0, (%esp) - faddl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_1.0.3: - movsd %xmm1, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_2.0.3: - movsd 16(%ebx), %xmm0 - andpd 32(%ebx), %xmm1 - orpd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_3.0.3: - testl %eax, %eax - jns .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_5.0.3: - movsd 80(%ebx), %xmm1 - mulsd %xmm1, %xmm1 - movsd %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 120(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $268, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_6.0.3: - movsd 64(%ebx), %xmm1 - mulsd %xmm1, %xmm1 - movsd %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 120(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $154, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_4.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type nextafter,@function - .size nextafter,.-nextafter - .data -# -- End nextafter - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 1 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 1 - .long 0 - .long 0 - .long 2121269248 - .long 1 - .long 0 - .long 0 - .long 24117248 - .long 1 - .long 0 - .type static_const_table,@object - .size static_const_table,96 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafterf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafterf_wmt.S deleted file mode 100644 index bdcd59ba9d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafterf_wmt.S +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nextafterf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin nextafterf - .text - .align 16,0x90 - .globl nextafterf -nextafterf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 36(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movss 116(%esp), %xmm1 - ucomiss %xmm1, %xmm0 - movl 112(%esp), %eax - jp .L_2TAG_PACKET_0.0.3 - movl $2147483647, %edx - je .L_2TAG_PACKET_1.0.3 - andl %eax, %edx - movl 116(%esp), %ecx - movl 112(%esp), %eax - je .L_2TAG_PACKET_2.0.3 - movl 116(%esp), %edx - subl %eax, %ecx - xorl %edx, %eax - orl %eax, %ecx - movl 112(%esp), %eax - sarl $31, %ecx - orl $1, %ecx - movl $2147483647, %edx - addl %ecx, %eax - andl %eax, %edx - subl $8388608, %edx - cmpl $2130706432, %edx - movl %eax, (%esp) - flds (%esp) - jae .L_2TAG_PACKET_3.0.3 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_0.0.3: - movss %xmm1, (%esp) - flds (%esp) - movss %xmm0, (%esp) - fadds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_1.0.3: - movss %xmm1, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_2.0.3: - movl $1, %eax - andl $-2147483648, %ecx - orl %ecx, %eax - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_3.0.3: - fstp %st(0) - testl %edx, %edx - jns .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_5.0.3: - movss (%ebx), %xmm1 - mulss %xmm1, %xmm1 - movl %eax, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 116(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $269, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_6.0.3: - movss 16(%ebx), %xmm1 - mulss %xmm1, %xmm1 - movl %eax, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 116(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl $155, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) -.L_2TAG_PACKET_4.0.3: - movl 36(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type nextafterf,@function - .size nextafterf,.-nextafterf - .data -# -- End nextafterf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 226492416 - .long 226492416 - .long 0 - .long 0 - .long 1904214016 - .long 1904214016 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,32 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafterl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafterl.S deleted file mode 100644 index f2a732a4da..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nextafterl.S +++ /dev/null @@ -1,371 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nextafterl.c" - .text -..TXTST0: -# -- Begin nextafterl - .text - .align 16,0x90 - .globl nextafterl -nextafterl: -# parameter 1: 48 + %esp -# parameter 2: 60 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - subl $36, %esp -..B1.2: - fnstcw 26(%esp) -..B1.3: - movzwl 56(%esp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.54 -..B1.4: - movzwl 68(%esp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.45 -..B1.5: - fldt 48(%esp) - fldt 60(%esp) - fucom %st(1) - fnstsw %ax - sahf - jp ..B1.6 - je ..B1.56 -..B1.6: - fstp %st(0) - call ..L2 -..L2: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi - testl %ecx, %ecx - jne ..B1.9 -..B1.7: - cmpl $0, 52(%esp) - jne ..B1.9 -..B1.8: - cmpl $0, 48(%esp) - je ..B1.44 -..B1.9: - movzbl 69(%esp), %eax - movzbl 57(%esp), %edi - andl $128, %eax - andl $128, %edi - shrl $7, %eax - shrl $7, %edi - fstpt 12(%esp) - cmpl %edi, %eax - jne ..B1.15 -..B1.10: - cmpl %edx, %ecx - jg ..B1.15 -..B1.11: - jne ..B1.29 -..B1.12: - movl 52(%esp), %eax - movl 64(%esp), %edx - cmpl %edx, %eax - ja ..B1.15 -..B1.13: - jne ..B1.29 -..B1.14: - movl 48(%esp), %eax - cmpl 60(%esp), %eax - jbe ..B1.29 -..B1.15: - movzwl 20(%esp), %ecx - movl %ecx, %edx - movl 12(%esp), %eax - andl $32767, %edx - decl %eax - movl %eax, 12(%esp) - cmpl $-1, %eax - jne ..B1.34 -..B1.16: - movl 16(%esp), %eax - decl %eax - testl %edx, %edx - je ..B1.22 -..B1.17: - cmpl $2147483647, %eax - jne ..B1.21 -..B1.18: - decl %edx - andl $-32768, %ecx - andl $32767, %edx - orl %edx, %ecx - movw %cx, 20(%esp) - testl %edx, %edx - je ..B1.20 -..B1.19: - movl %ecx, %edx - orl $-2147483648, %eax - movl %eax, 16(%esp) - andl $32767, %edx - jmp ..B1.34 -..B1.20: - movl %ecx, %edx - movl %eax, 16(%esp) - andl $32767, %edx - jmp ..B1.34 -..B1.21: - movl %eax, 16(%esp) - jmp ..B1.35 -..B1.22: - movl %eax, 16(%esp) -..B1.23: - movzwl 26(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.24: - orl $-64768, %edx - movw %dx, 24(%esp) -..B1.25: - fldcw 24(%esp) -..B1.26: - fldt _small_value_80@GOTOFF(%esi) - fmul %st(0), %st - fstpt (%esp) -..B1.27: - fldcw 26(%esp) -..B1.28: - fldt 12(%esp) - addl $36, %esp - popl %edi - popl %esi - ret -..B1.29: - movzwl 20(%esp), %eax - movl %eax, %edx - movl 12(%esp), %ecx - andl $32767, %edx - incl %ecx - movl %ecx, 12(%esp) - jne ..B1.33 -..B1.30: - movl $-2147483648, %ecx - testl %edx, %edx - movl 16(%esp), %edi - je ..L3 - movl $0, %ecx -..L3: - incl %edi - cmpl %ecx, %edi - jne ..B1.32 -..B1.31: - incl %edx - andl $-32768, %eax - andl $32767, %edx - orl $-2147483648, %edi - orl %edx, %eax - movl %eax, %edx - movl %edi, 16(%esp) - andl $32767, %edx - movw %ax, 20(%esp) - jmp ..B1.33 -..B1.32: - movl %edi, 16(%esp) -..B1.33: - cmpl $32767, %edx - je ..B1.37 -..B1.34: - testl %edx, %edx - je ..B1.23 -..B1.35: - fldt 12(%esp) - addl $36, %esp - popl %edi - popl %esi - ret -..B1.36: - fldt _small_value_80@GOTOFF(%esi) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.28 -..B1.37: - movzwl 26(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.43 -..B1.38: - orl $-64768, %edx - movw %dx, 24(%esp) -..B1.39: - fldcw 24(%esp) -..B1.40: - fldt _large_value_80@GOTOFF(%esi) - fmul %st(0), %st - fstpt (%esp) -..B1.41: - fldcw 26(%esp) -..B1.42: - fldt 12(%esp) - addl $36, %esp - popl %edi - popl %esi - ret -..B1.43: - fldt _large_value_80@GOTOFF(%esi) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.42 -..B1.44: - fstp %st(0) - movzbl 69(%esp), %edx - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _smallest_value_80@GOTOFF(%esi,%ecx) - movzwl 8+_smallest_value_80@GOTOFF(%esi,%ecx), %edx - fstpt 12(%esp) - andl $32767, %edx - jmp ..B1.34 -..B1.45: - cmpl $-2147483648, 64(%esp) - jne ..B1.47 -..B1.46: - cmpl $0, 60(%esp) - je ..B1.5 -..B1.47: - movzwl 26(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.53 -..B1.48: - orl $-64768, %edx - movw %dx, 24(%esp) -..B1.49: - fldcw 24(%esp) -..B1.50: - fldt 48(%esp) - fldt 60(%esp) - fmulp %st, %st(1) - fstpt 12(%esp) -..B1.51: - fldcw 26(%esp) -..B1.52: - fldt 12(%esp) - addl $36, %esp - popl %edi - popl %esi - ret -..B1.53: - fldt 48(%esp) - fldt 60(%esp) - fmulp %st, %st(1) - fstpt 12(%esp) - jmp ..B1.52 -..B1.54: - cmpl $-2147483648, 52(%esp) - jne ..B1.47 -..B1.55: - cmpl $0, 48(%esp) - jne ..B1.47 - jmp ..B1.4 -..B1.56: - fstp %st(1) - addl $36, %esp - popl %edi - popl %esi - ret - .align 16,0x90 - .type nextafterl,@function - .size nextafterl,.-nextafterl - .data -# -- End nextafterl - .section .rodata, "a" - .align 4 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_smallest_value_80: - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .type _smallest_value_80,@object - .size _smallest_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttoward_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttoward_wmt.S deleted file mode 100644 index 028c7517c2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttoward_wmt.S +++ /dev/null @@ -1,246 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nexttoward_wmt.c" - .text -..TXTST0: -# -- Begin nexttoward - .text - .align 16,0x90 - .globl nexttoward -nexttoward: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $20, %esp - movzwl 14(%ebp), %eax - andl $32752, %eax - cmpl $32752, %eax - je ..B1.23 -..B1.2: - movzwl 24(%ebp), %ebx - andl $32767, %ebx - cmpl $32767, %ebx - je ..B1.20 -..B1.3: - fldl 8(%ebp) - fldt 16(%ebp) - fucom %st(1) - fnstsw %ax - sahf - jp ..B1.4 - je ..B1.25 -..B1.4: - fstp %st(0) - movl 12(%ebp), %ecx - movl %ecx, %eax - andl $2147483647, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - orl 8(%ebp), %eax - je ..B1.19 -..B1.5: - fstpt 8(%esp) - movzbl 17(%esp), %edi - movzbl 25(%ebp), %esi - andl $128, %edi - andl $128, %esi - shrl $7, %edi - shrl $7, %esi - movl 8(%ebp), %eax - cmpl %edi, %esi - jne ..B1.11 -..B1.6: - movzwl 16(%esp), %esi - andl $32767, %esi - cmpl %ebx, %esi - jg ..B1.11 -..B1.7: - jne ..B1.12 -..B1.8: - movl 12(%esp), %ebx - movl 20(%ebp), %esi - cmpl %esi, %ebx - ja ..B1.11 -..B1.9: - jne ..B1.12 -..B1.10: - movl 8(%esp), %ebx - cmpl 16(%ebp), %ebx - jbe ..B1.12 -..B1.11: - addl $-1, %eax - movl %eax, 8(%esp) - adcl $-1, %ecx - movl %ecx, 12(%esp) - jmp ..B1.13 -..B1.12: - addl $1, %eax - movl %eax, 8(%esp) - adcl $0, %ecx - movl %ecx, 12(%esp) -..B1.13: - movl 12(%esp), %ecx - andl $2147483647, %ecx - lea -1048576(%ecx), %eax - cmpl $2145386496, %eax - jb ..B1.18 -..B1.14: - cmpl $1048576, %ecx - jae ..B1.16 -..B1.15: - fldl _small_value_64@GOTOFF(%edx) - fmul %st(0), %st - fstpl (%esp) - fldl 8(%esp) - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - fldl _large_value_64@GOTOFF(%edx) - fmul %st(0), %st - fstpl (%esp) - fldl 8(%esp) -..B1.17: - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - fldl 8(%esp) - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - fstp %st(0) - movzbl 25(%ebp), %eax - fldl _small_value_64@GOTOFF(%edx) - andl $128, %eax - shrl $7, %eax - fmul %st(0), %st - movl _smallest_value_64@GOTOFF(%edx,%eax,8), %ecx - movl 4+_smallest_value_64@GOTOFF(%edx,%eax,8), %ebx - movl %ecx, 8(%esp) - movl %ebx, 12(%esp) - fstpl (%esp) - jmp ..B1.18 -..B1.20: - cmpl $-2147483648, 20(%ebp) - jne ..B1.22 -..B1.21: - cmpl $0, 16(%ebp) - je ..B1.3 -..B1.22: - fldt 16(%ebp) - fmull 8(%ebp) - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - testl $1048575, 12(%ebp) - jne ..B1.22 -..B1.24: - cmpl $0, 8(%ebp) - jne ..B1.22 - jmp ..B1.2 -..B1.25: - fstp %st(1) - addl $20, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type nexttoward,@function - .size nexttoward,.-nexttoward - .data -# -- End nexttoward - .section .rodata, "a" - .align 4 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttowardf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttowardf_wmt.S deleted file mode 100644 index 43ae5c9911..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttowardf_wmt.S +++ /dev/null @@ -1,212 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nexttowardf_wmt.c" - .text -..TXTST0: -# -- Begin nexttowardf - .text - .align 16,0x90 - .globl nexttowardf -nexttowardf: -# parameter 1: 32 + %esp -# parameter 2: 36 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - subl $20, %esp - movzwl 34(%esp), %eax - andl $32640, %eax - cmpl $32640, %eax - je ..B1.23 -..B1.2: - movzwl 44(%esp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.20 -..B1.3: - flds 32(%esp) - fldt 36(%esp) - fucom %st(1) - fnstsw %ax - sahf - jp ..B1.4 - je ..B1.24 -..B1.4: - fstp %st(0) - movl 32(%esp), %eax - testl $2147483647, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - je ..B1.19 -..B1.5: - fstpt (%esp) - movzbl 9(%esp), %edi - movzbl 45(%esp), %ebx - andl $128, %edi - andl $128, %ebx - shrl $7, %edi - shrl $7, %ebx - cmpl %edi, %ebx - jne ..B1.11 -..B1.6: - movzwl 8(%esp), %ebx - andl $32767, %ebx - cmpl %ecx, %ebx - jg ..B1.11 -..B1.7: - jne ..B1.12 -..B1.8: - movl 4(%esp), %ecx - movl 40(%esp), %ebx - cmpl %ebx, %ecx - ja ..B1.11 -..B1.9: - jne ..B1.12 -..B1.10: - movl (%esp), %ecx - cmpl 36(%esp), %ecx - jbe ..B1.12 -..B1.11: - decl %eax - movl %eax, (%esp) - jmp ..B1.13 -..B1.12: - incl %eax - movl %eax, (%esp) -..B1.13: - andl $2147483647, %eax - lea -8388608(%eax), %ecx - cmpl $2130706432, %ecx - jb ..B1.18 -..B1.14: - cmpl $8388608, %eax - jae ..B1.16 -..B1.15: - flds .L_2il0floatpacket.0@GOTOFF(%edx) - fsts 12(%esp) - flds 12(%esp) - fmulp %st, %st(1) - fstps 12(%esp) - flds (%esp) - addl $20, %esp - popl %ebx - popl %edi - ret -..B1.16: - flds .L_2il0floatpacket.1@GOTOFF(%edx) - fsts 12(%esp) - flds 12(%esp) - fmulp %st, %st(1) - fstps 12(%esp) - flds (%esp) -..B1.17: - addl $20, %esp - popl %ebx - popl %edi - ret -..B1.18: - flds (%esp) - addl $20, %esp - popl %ebx - popl %edi - ret -..B1.19: - fstp %st(0) - movzbl 45(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds .L_2il0floatpacket.0@GOTOFF(%edx) - fsts 12(%esp) - flds 12(%esp) - fmulp %st, %st(1) - movl _smallest_value_32@GOTOFF(%edx,%eax,4), %ecx - movl %ecx, (%esp) - fstps 12(%esp) - jmp ..B1.18 -..B1.20: - cmpl $-2147483648, 40(%esp) - jne ..B1.22 -..B1.21: - cmpl $0, 36(%esp) - je ..B1.3 -..B1.22: - fldt 36(%esp) - fmuls 32(%esp) - addl $20, %esp - popl %ebx - popl %edi - ret -..B1.23: - testl $8388607, 32(%esp) - jne ..B1.22 - jmp ..B1.2 -..B1.24: - fstp %st(1) - addl $20, %esp - popl %ebx - popl %edi - ret - .align 16,0x90 - .type nexttowardf,@function - .size nexttowardf,.-nexttowardf - .data -# -- End nexttowardf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x0d800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_smallest_value_32: - .long 1 - .long 2147483649 - .type _smallest_value_32,@object - .size _smallest_value_32,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttowardl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttowardl.S deleted file mode 100644 index f59a42795b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/nexttowardl.S +++ /dev/null @@ -1,371 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nexttowardl.c" - .text -..TXTST0: -# -- Begin nexttowardl - .text - .align 16,0x90 - .globl nexttowardl -nexttowardl: -# parameter 1: 48 + %esp -# parameter 2: 60 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - subl $36, %esp -..B1.2: - fnstcw 26(%esp) -..B1.3: - movzwl 56(%esp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.54 -..B1.4: - movzwl 68(%esp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.45 -..B1.5: - fldt 48(%esp) - fldt 60(%esp) - fucom %st(1) - fnstsw %ax - sahf - jp ..B1.6 - je ..B1.56 -..B1.6: - fstp %st(0) - call ..L2 -..L2: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi - testl %ecx, %ecx - jne ..B1.9 -..B1.7: - cmpl $0, 52(%esp) - jne ..B1.9 -..B1.8: - cmpl $0, 48(%esp) - je ..B1.44 -..B1.9: - movzbl 69(%esp), %eax - movzbl 57(%esp), %edi - andl $128, %eax - andl $128, %edi - shrl $7, %eax - shrl $7, %edi - fstpt 12(%esp) - cmpl %edi, %eax - jne ..B1.15 -..B1.10: - cmpl %edx, %ecx - jg ..B1.15 -..B1.11: - jne ..B1.29 -..B1.12: - movl 52(%esp), %eax - movl 64(%esp), %edx - cmpl %edx, %eax - ja ..B1.15 -..B1.13: - jne ..B1.29 -..B1.14: - movl 48(%esp), %eax - cmpl 60(%esp), %eax - jbe ..B1.29 -..B1.15: - movzwl 20(%esp), %ecx - movl %ecx, %edx - movl 12(%esp), %eax - andl $32767, %edx - decl %eax - movl %eax, 12(%esp) - cmpl $-1, %eax - jne ..B1.34 -..B1.16: - movl 16(%esp), %eax - decl %eax - testl %edx, %edx - je ..B1.22 -..B1.17: - cmpl $2147483647, %eax - jne ..B1.21 -..B1.18: - decl %edx - andl $-32768, %ecx - andl $32767, %edx - orl %edx, %ecx - movw %cx, 20(%esp) - testl %edx, %edx - je ..B1.20 -..B1.19: - movl %ecx, %edx - orl $-2147483648, %eax - movl %eax, 16(%esp) - andl $32767, %edx - jmp ..B1.34 -..B1.20: - movl %ecx, %edx - movl %eax, 16(%esp) - andl $32767, %edx - jmp ..B1.34 -..B1.21: - movl %eax, 16(%esp) - jmp ..B1.35 -..B1.22: - movl %eax, 16(%esp) -..B1.23: - movzwl 26(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.24: - orl $-64768, %edx - movw %dx, 24(%esp) -..B1.25: - fldcw 24(%esp) -..B1.26: - fldt _small_value_80@GOTOFF(%esi) - fmul %st(0), %st - fstpt (%esp) -..B1.27: - fldcw 26(%esp) -..B1.28: - fldt 12(%esp) - addl $36, %esp - popl %edi - popl %esi - ret -..B1.29: - movzwl 20(%esp), %eax - movl %eax, %edx - movl 12(%esp), %ecx - andl $32767, %edx - incl %ecx - movl %ecx, 12(%esp) - jne ..B1.33 -..B1.30: - movl $-2147483648, %ecx - testl %edx, %edx - movl 16(%esp), %edi - je ..L3 - movl $0, %ecx -..L3: - incl %edi - cmpl %ecx, %edi - jne ..B1.32 -..B1.31: - incl %edx - andl $-32768, %eax - andl $32767, %edx - orl $-2147483648, %edi - orl %edx, %eax - movl %eax, %edx - movl %edi, 16(%esp) - andl $32767, %edx - movw %ax, 20(%esp) - jmp ..B1.33 -..B1.32: - movl %edi, 16(%esp) -..B1.33: - cmpl $32767, %edx - je ..B1.37 -..B1.34: - testl %edx, %edx - je ..B1.23 -..B1.35: - fldt 12(%esp) - addl $36, %esp - popl %edi - popl %esi - ret -..B1.36: - fldt _small_value_80@GOTOFF(%esi) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.28 -..B1.37: - movzwl 26(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.43 -..B1.38: - orl $-64768, %edx - movw %dx, 24(%esp) -..B1.39: - fldcw 24(%esp) -..B1.40: - fldt _large_value_80@GOTOFF(%esi) - fmul %st(0), %st - fstpt (%esp) -..B1.41: - fldcw 26(%esp) -..B1.42: - fldt 12(%esp) - addl $36, %esp - popl %edi - popl %esi - ret -..B1.43: - fldt _large_value_80@GOTOFF(%esi) - fmul %st(0), %st - fstpt (%esp) - jmp ..B1.42 -..B1.44: - fstp %st(0) - movzbl 69(%esp), %edx - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _smallest_value_80@GOTOFF(%esi,%ecx) - movzwl 8+_smallest_value_80@GOTOFF(%esi,%ecx), %edx - fstpt 12(%esp) - andl $32767, %edx - jmp ..B1.34 -..B1.45: - cmpl $-2147483648, 64(%esp) - jne ..B1.47 -..B1.46: - cmpl $0, 60(%esp) - je ..B1.5 -..B1.47: - movzwl 26(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.53 -..B1.48: - orl $-64768, %edx - movw %dx, 24(%esp) -..B1.49: - fldcw 24(%esp) -..B1.50: - fldt 48(%esp) - fldt 60(%esp) - fmulp %st, %st(1) - fstpt 12(%esp) -..B1.51: - fldcw 26(%esp) -..B1.52: - fldt 12(%esp) - addl $36, %esp - popl %edi - popl %esi - ret -..B1.53: - fldt 48(%esp) - fldt 60(%esp) - fmulp %st, %st(1) - fstpt 12(%esp) - jmp ..B1.52 -..B1.54: - cmpl $-2147483648, 52(%esp) - jne ..B1.47 -..B1.55: - cmpl $0, 48(%esp) - jne ..B1.47 - jmp ..B1.4 -..B1.56: - fstp %st(1) - addl $36, %esp - popl %edi - popl %esi - ret - .align 16,0x90 - .type nexttowardl,@function - .size nexttowardl,.-nexttowardl - .data -# -- End nexttowardl - .section .rodata, "a" - .align 4 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_smallest_value_80: - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .type _smallest_value_80,@object - .size _smallest_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/pow_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/pow_wmt.S deleted file mode 100644 index 3f6206c1ae..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/pow_wmt.S +++ /dev/null @@ -1,4274 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "pow_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin pow - .text - .align 16,0x90 - .globl pow -pow: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movsd 136(%esp), %xmm1 - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movl $1069088768, %ecx - movd %ecx, %xmm7 - movsd %xmm1, 16(%esp) - xorpd %xmm1, %xmm1 - movl $30704, %edx - pinsrw $3, %edx, %xmm1 - movsd %xmm0, 8(%esp) - movapd %xmm0, %xmm3 - movl $8192, %edx - movd %edx, %xmm4 - movapd 8240(%ebx), %xmm6 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - psllq $5, %xmm0 - movsd 8256(%ebx), %xmm2 - psrlq $34, %xmm0 - movl %eax, %edx - andl $32752, %edx - subl $16368, %edx - movl %edx, %ecx - sarl $31, %edx - addl %edx, %ecx - xorl %edx, %ecx - rcpss %xmm0, %xmm0 - psllq $12, %xmm3 - addl $16, %ecx - bsr %ecx, %ecx - psrlq $12, %xmm3 - movl %esi, 24(%esp) - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.3 - movl $0, %esi -.L_2TAG_PACKET_1.0.3: - mulss %xmm7, %xmm0 - movl $-1, %edx - subl $4, %ecx - shll %cl, %edx - movd %edx, %xmm5 - orpd %xmm1, %xmm3 - subl $16351, %eax - cmpl $1, %eax - jbe .L_2TAG_PACKET_2.0.3 - paddd %xmm4, %xmm0 - psllq $32, %xmm5 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm3, %xmm5 -.L_2TAG_PACKET_3.0.3: - andpd %xmm6, %xmm0 - subsd %xmm5, %xmm3 - subl $1, %eax - sarl $4, %eax - cvtsi2sdl %eax, %xmm7 - mulpd %xmm0, %xmm5 -.L_2TAG_PACKET_4.0.3: - mulsd %xmm0, %xmm3 - movapd 8272(%ebx), %xmm1 - subsd %xmm2, %xmm5 - movapd 8288(%ebx), %xmm4 - movl %eax, %ecx - sarl $31, %eax - addl %eax, %ecx - xorl %ecx, %eax - addl $1, %eax - bsr %eax, %eax - unpcklpd %xmm3, %xmm5 - movapd 8304(%ebx), %xmm6 - addsd %xmm5, %xmm3 - andl $16760832, %edx - shrl $10, %edx - addpd -3616(%ebx,%edx), %xmm5 - movapd 8320(%ebx), %xmm0 - pshufd $68, %xmm3, %xmm2 - mulsd %xmm3, %xmm3 - mulpd %xmm2, %xmm1 - mulpd %xmm2, %xmm4 - addsd %xmm7, %xmm5 - mulsd %xmm3, %xmm2 - addpd %xmm1, %xmm6 - mulsd %xmm3, %xmm3 - addpd %xmm4, %xmm0 - movsd 16(%esp), %xmm1 - movzwl 22(%esp), %ecx - pshufd $238, %xmm5, %xmm7 - movsd 8368(%ebx), %xmm4 - mulpd %xmm2, %xmm6 - pshufd $68, %xmm3, %xmm3 - mulpd %xmm2, %xmm0 - shll $4, %eax - subl $15872, %eax - andl $32752, %ecx - addl %ecx, %eax - mulpd %xmm6, %xmm3 - cmpl $624, %eax - jae .L_2TAG_PACKET_5.0.3 - xorpd %xmm6, %xmm6 - movl $17080, %edx - pinsrw $3, %edx, %xmm6 - movapd %xmm1, %xmm2 - andpd %xmm1, %xmm4 - subsd %xmm4, %xmm1 - mulsd %xmm5, %xmm4 - addsd %xmm7, %xmm0 - mulsd %xmm5, %xmm1 - movapd %xmm6, %xmm7 - addsd %xmm4, %xmm6 - addpd %xmm0, %xmm3 - movd %xmm6, %edx - subsd %xmm7, %xmm6 - pshufd $238, %xmm3, %xmm0 - subsd %xmm6, %xmm4 - addsd %xmm3, %xmm0 - movl %edx, %ecx - andl $255, %edx - addl %edx, %edx - movapd 8384(%ebx,%edx,8), %xmm5 - addsd %xmm1, %xmm4 - mulsd %xmm0, %xmm2 - movapd 12480(%ebx), %xmm7 - movapd 12496(%ebx), %xmm3 - shll $12, %ecx - xorl %esi, %ecx - andl $-1048576, %ecx - movd %ecx, %xmm6 - addsd %xmm4, %xmm2 - movsd 12512(%ebx), %xmm1 - pshufd $68, %xmm2, %xmm0 - pshufd $68, %xmm2, %xmm4 - mulpd %xmm0, %xmm0 - movl 24(%esp), %esi - mulpd %xmm4, %xmm7 - pshufd $17, %xmm6, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm0, %xmm0 - paddd %xmm6, %xmm5 - addpd %xmm7, %xmm3 - mulsd %xmm5, %xmm1 - pshufd $238, %xmm5, %xmm6 - mulpd %xmm3, %xmm0 - addsd %xmm6, %xmm1 - pshufd $238, %xmm0, %xmm3 - mulsd %xmm5, %xmm0 - mulsd %xmm5, %xmm3 - addsd %xmm1, %xmm0 - addsd %xmm3, %xmm0 - addsd %xmm5, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_7.0.3: - movsd 128(%esp), %xmm0 - movsd 136(%esp), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_0.0.3: - addl $16, %eax - movl $32752, %edx - andl %eax, %edx - cmpl $32752, %edx - je .L_2TAG_PACKET_8.0.3 - testl $32768, %eax - jne .L_2TAG_PACKET_9.0.3 -.L_2TAG_PACKET_10.0.3: - movl 16(%esp), %ecx - xorl %edx, %edx - testl %ecx, %ecx - movl $1, %ecx - cmovne %ecx, %edx - orl 20(%esp), %edx - cmpl $1072693248, %edx - je .L_2TAG_PACKET_7.0.3 - movsd 8(%esp), %xmm0 - movsd 8(%esp), %xmm3 - movd %xmm3, %edx - psrlq $32, %xmm3 - movd %xmm3, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_11.0.3 - xorpd %xmm3, %xmm3 - movl $18416, %eax - pinsrw $3, %eax, %xmm3 - mulsd %xmm3, %xmm0 - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movapd %xmm0, %xmm3 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $18416, %ecx - psllq $5, %xmm0 - movsd 8256(%ebx), %xmm2 - psrlq $34, %xmm0 - rcpss %xmm0, %xmm0 - psllq $12, %xmm3 - movapd 8240(%ebx), %xmm6 - psrlq $12, %xmm3 - mulss %xmm7, %xmm0 - movl $-1024, %edx - movd %edx, %xmm5 - orpd %xmm1, %xmm3 - paddd %xmm4, %xmm0 - psllq $32, %xmm5 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm3, %xmm5 - movl $0, %esi - andpd %xmm6, %xmm0 - subsd %xmm5, %xmm3 - andl $32752, %eax - subl $18416, %eax - sarl $4, %eax - cvtsi2sdl %eax, %xmm7 - mulpd %xmm0, %xmm5 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_12.0.3: - movl 16(%esp), %ecx - xorl %edx, %edx - testl %ecx, %ecx - movl $1, %ecx - cmovne %ecx, %edx - orl 20(%esp), %edx - cmpl $1072693248, %edx - je .L_2TAG_PACKET_7.0.3 - movsd 8(%esp), %xmm0 - movsd 8(%esp), %xmm3 - movd %xmm3, %edx - psrlq $32, %xmm3 - movd %xmm3, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_11.0.3 - xorpd %xmm3, %xmm3 - movl $18416, %eax - pinsrw $3, %eax, %xmm3 - mulsd %xmm3, %xmm0 - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movapd %xmm0, %xmm3 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $18416, %ecx - psllq $5, %xmm0 - movsd 8256(%ebx), %xmm2 - psrlq $34, %xmm0 - rcpss %xmm0, %xmm0 - psllq $12, %xmm3 - movapd 8240(%ebx), %xmm6 - psrlq $12, %xmm3 - mulss %xmm7, %xmm0 - movl $-1024, %edx - movd %edx, %xmm5 - orpd %xmm1, %xmm3 - paddd %xmm4, %xmm0 - psllq $32, %xmm5 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm3, %xmm5 - movl $-2147483648, %esi - andpd %xmm6, %xmm0 - subsd %xmm5, %xmm3 - andl $32752, %eax - subl $18416, %eax - sarl $4, %eax - cvtsi2sdl %eax, %xmm7 - mulpd %xmm0, %xmm5 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_5.0.3: - cmpl $0, %eax - jl .L_2TAG_PACKET_13.0.3 - cmpl $752, %eax - jae .L_2TAG_PACKET_14.0.3 -.L_2TAG_PACKET_15.0.3: - addsd %xmm7, %xmm0 - movsd 12544(%ebx), %xmm2 - addpd %xmm0, %xmm3 - xorpd %xmm6, %xmm6 - movl $17080, %eax - pinsrw $3, %eax, %xmm6 - pshufd $238, %xmm3, %xmm0 - addsd %xmm3, %xmm0 - movapd %xmm5, %xmm3 - addsd %xmm0, %xmm5 - movapd %xmm2, %xmm4 - subsd %xmm5, %xmm3 - movapd %xmm5, %xmm7 - andpd %xmm2, %xmm5 - movapd %xmm1, %xmm2 - andpd %xmm1, %xmm4 - subsd %xmm5, %xmm7 - addsd %xmm3, %xmm0 - subsd %xmm4, %xmm1 - mulsd %xmm5, %xmm4 - addsd %xmm7, %xmm0 - mulsd %xmm0, %xmm2 - movapd %xmm6, %xmm7 - mulsd %xmm5, %xmm1 - addsd %xmm4, %xmm6 - movd %xmm6, %eax - subsd %xmm7, %xmm6 - addsd %xmm1, %xmm2 - movapd 12480(%ebx), %xmm7 - movapd 12496(%ebx), %xmm3 - subsd %xmm6, %xmm4 - pextrw $3, %xmm6, %edx - movl %eax, %ecx - andl $255, %eax - addl %eax, %eax - movapd 8384(%ebx,%eax,8), %xmm5 - addsd %xmm4, %xmm2 - sarl $8, %ecx - movl %ecx, %eax - sarl $1, %ecx - subl %ecx, %eax - shll $20, %ecx - xorl %esi, %ecx - movd %ecx, %xmm6 - movsd 12512(%ebx), %xmm1 - andl $32767, %edx - cmpl $16529, %edx - ja .L_2TAG_PACKET_14.0.3 - pshufd $68, %xmm2, %xmm0 - pshufd $68, %xmm2, %xmm4 - mulpd %xmm0, %xmm0 - mulpd %xmm4, %xmm7 - pshufd $17, %xmm6, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm0, %xmm0 - paddd %xmm6, %xmm5 - addpd %xmm7, %xmm3 - mulsd %xmm5, %xmm1 - pshufd $238, %xmm5, %xmm6 - mulpd %xmm3, %xmm0 - addsd %xmm6, %xmm1 - pshufd $238, %xmm0, %xmm3 - mulsd %xmm5, %xmm0 - mulsd %xmm5, %xmm3 - shll $4, %eax - xorpd %xmm4, %xmm4 - addl $16368, %eax - pinsrw $3, %eax, %xmm4 - addsd %xmm1, %xmm0 - movl 24(%esp), %esi - addsd %xmm3, %xmm0 - movapd %xmm0, %xmm1 - addsd %xmm5, %xmm0 - mulsd %xmm4, %xmm0 - pextrw $3, %xmm0, %eax - andl $32752, %eax - je .L_2TAG_PACKET_16.0.3 - cmpl $32752, %eax - je .L_2TAG_PACKET_17.0.3 -.L_2TAG_PACKET_18.0.3: - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_8.0.3: - movsd 16(%esp), %xmm1 - movsd 8(%esp), %xmm0 - movapd %xmm0, %xmm2 - movd %xmm2, %eax - psrlq $20, %xmm2 - movd %xmm2, %edx - orl %edx, %eax - je .L_2TAG_PACKET_19.0.3 - addsd %xmm0, %xmm0 - movd %xmm1, %eax - psrlq $32, %xmm1 - movd %xmm1, %edx - movl %edx, %ecx - addl %edx, %edx - orl %edx, %eax - je .L_2TAG_PACKET_20.0.3 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_20.0.3: - xorpd %xmm0, %xmm0 - movl $16368, %eax - pinsrw $3, %eax, %xmm0 - movl $29, %edx - jmp .L_2TAG_PACKET_21.0.3 -.L_2TAG_PACKET_22.0.3: - movsd 16(%esp), %xmm0 - addpd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_19.0.3: - movd %xmm1, %eax - movapd %xmm1, %xmm2 - psrlq $32, %xmm1 - movd %xmm1, %edx - movl %edx, %ecx - addl %edx, %edx - orl %edx, %eax - je .L_2TAG_PACKET_23.0.3 - pextrw $3, %xmm2, %eax - andl $32752, %eax - cmpl $32752, %eax - jne .L_2TAG_PACKET_24.0.3 - movd %xmm2, %eax - psrlq $20, %xmm2 - movd %xmm2, %edx - orl %edx, %eax - jne .L_2TAG_PACKET_22.0.3 -.L_2TAG_PACKET_24.0.3: - pextrw $3, %xmm0, %eax - testl $32768, %eax - jne .L_2TAG_PACKET_25.0.3 - testl $-2147483648, %ecx - jne .L_2TAG_PACKET_26.0.3 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_27.0.3: - movsd 16(%esp), %xmm1 - movd %xmm1, %eax - testl $1, %eax - jne .L_2TAG_PACKET_28.0.3 - testl $2, %eax - jne .L_2TAG_PACKET_29.0.3 - jmp .L_2TAG_PACKET_28.0.3 -.L_2TAG_PACKET_25.0.3: - shrl $20, %ecx - andl $2047, %ecx - cmpl $1075, %ecx - ja .L_2TAG_PACKET_28.0.3 - je .L_2TAG_PACKET_30.0.3 - cmpl $1074, %ecx - ja .L_2TAG_PACKET_27.0.3 - cmpl $1023, %ecx - jb .L_2TAG_PACKET_28.0.3 - movsd 16(%esp), %xmm1 - movl $17208, %eax - xorpd %xmm3, %xmm3 - pinsrw $3, %eax, %xmm3 - movapd %xmm3, %xmm4 - addsd %xmm1, %xmm3 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm1 - pextrw $3, %xmm1, %eax - andl $32752, %eax - jne .L_2TAG_PACKET_28.0.3 - movd %xmm3, %eax - andl $1, %eax - je .L_2TAG_PACKET_28.0.3 -.L_2TAG_PACKET_29.0.3: - movsd 16(%esp), %xmm1 - pextrw $3, %xmm1, %eax - andl $32768, %eax - je .L_2TAG_PACKET_18.0.3 - xorpd %xmm0, %xmm0 - movl $32768, %eax - pinsrw $3, %eax, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_28.0.3: - movsd 16(%esp), %xmm1 - pextrw $3, %xmm1, %eax - andl $32768, %eax - jne .L_2TAG_PACKET_26.0.3 -.L_2TAG_PACKET_31.0.3: - xorpd %xmm0, %xmm0 - movl $32752, %eax - pinsrw $3, %eax, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_30.0.3: - movsd 16(%esp), %xmm1 - movd %xmm1, %eax - andl $1, %eax - je .L_2TAG_PACKET_28.0.3 - jmp .L_2TAG_PACKET_29.0.3 -.L_2TAG_PACKET_32.0.3: - movd %xmm1, %eax - psrlq $20, %xmm1 - movd %xmm1, %edx - orl %edx, %eax - je .L_2TAG_PACKET_33.0.3 - movsd 16(%esp), %xmm0 - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_33.0.3: - movsd 8(%esp), %xmm0 - pextrw $3, %xmm0, %eax - cmpl $49136, %eax - jne .L_2TAG_PACKET_34.0.3 - movd %xmm0, %ecx - psrlq $20, %xmm0 - movd %xmm0, %edx - orl %edx, %ecx - jne .L_2TAG_PACKET_34.0.3 - xorpd %xmm0, %xmm0 - movl $16368, %eax - pinsrw $3, %eax, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_34.0.3: - movsd 16(%esp), %xmm1 - andl $32752, %eax - subl $16368, %eax - pextrw $3, %xmm1, %edx - xorpd %xmm0, %xmm0 - xorl %edx, %eax - andl $32768, %eax - jne .L_2TAG_PACKET_18.0.3 - movl $32752, %ecx - pinsrw $3, %ecx, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_35.0.3: - movd %xmm1, %eax - cmpl $17184, %edx - ja .L_2TAG_PACKET_36.0.3 - testl $1, %eax - jne .L_2TAG_PACKET_37.0.3 - testl $2, %eax - je .L_2TAG_PACKET_38.0.3 - jmp .L_2TAG_PACKET_39.0.3 -.L_2TAG_PACKET_36.0.3: - testl $1, %eax - je .L_2TAG_PACKET_38.0.3 - jmp .L_2TAG_PACKET_39.0.3 -.L_2TAG_PACKET_9.0.3: - movsd 8(%esp), %xmm2 - movd %xmm2, %eax - psrlq $31, %xmm2 - movd %xmm2, %ecx - orl %ecx, %eax - je .L_2TAG_PACKET_11.0.3 - movsd 16(%esp), %xmm1 - pextrw $3, %xmm1, %edx - movd %xmm1, %eax - movapd %xmm1, %xmm2 - psrlq $32, %xmm2 - movd %xmm2, %ecx - addl %ecx, %ecx - orl %eax, %ecx - je .L_2TAG_PACKET_40.0.3 - andl $32752, %edx - cmpl $32752, %edx - je .L_2TAG_PACKET_32.0.3 - cmpl $17200, %edx - ja .L_2TAG_PACKET_38.0.3 - cmpl $17184, %edx - jae .L_2TAG_PACKET_35.0.3 - cmpl $16368, %edx - jb .L_2TAG_PACKET_37.0.3 - movl $17208, %eax - xorpd %xmm2, %xmm2 - pinsrw $3, %eax, %xmm2 - movapd %xmm2, %xmm4 - addsd %xmm1, %xmm2 - subsd %xmm2, %xmm4 - addsd %xmm4, %xmm1 - pextrw $3, %xmm1, %eax - andl $32767, %eax - jne .L_2TAG_PACKET_37.0.3 - movd %xmm2, %eax - andl $1, %eax - je .L_2TAG_PACKET_38.0.3 -.L_2TAG_PACKET_39.0.3: - xorpd %xmm1, %xmm1 - movl $30704, %edx - pinsrw $3, %edx, %xmm1 - movsd 8256(%ebx), %xmm2 - movsd 8(%esp), %xmm4 - pextrw $3, %xmm4, %eax - movl $8192, %edx - movd %edx, %xmm4 - andl $32767, %eax - subl $16, %eax - jl .L_2TAG_PACKET_12.0.3 - movl %eax, %edx - andl $32752, %edx - subl $16368, %edx - movl %edx, %ecx - sarl $31, %edx - addl %edx, %ecx - xorl %edx, %ecx - addl $16, %ecx - bsr %ecx, %ecx - movl $-2147483648, %esi - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_37.0.3: - xorpd %xmm1, %xmm1 - movl $32752, %eax - pinsrw $3, %eax, %xmm1 - xorpd %xmm0, %xmm0 - mulsd %xmm1, %xmm0 - movl $28, %edx - jmp .L_2TAG_PACKET_21.0.3 -.L_2TAG_PACKET_38.0.3: - xorpd %xmm1, %xmm1 - movl $30704, %edx - pinsrw $3, %edx, %xmm1 - movsd 8256(%ebx), %xmm2 - movsd 8(%esp), %xmm4 - pextrw $3, %xmm4, %eax - movl $8192, %edx - movd %edx, %xmm4 - andl $32767, %eax - subl $16, %eax - jl .L_2TAG_PACKET_10.0.3 - movl %eax, %edx - andl $32752, %edx - subl $16368, %edx - movl %edx, %ecx - sarl $31, %edx - addl %edx, %ecx - xorl %edx, %ecx - addl $16, %ecx - bsr %ecx, %ecx - movl $0, %esi - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_23.0.3: - xorpd %xmm0, %xmm0 - movl $16368, %eax - pinsrw $3, %eax, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_26.0.3: - xorpd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_13.0.3: - addl $384, %eax - cmpl $0, %eax - jl .L_2TAG_PACKET_41.0.3 - mulsd %xmm1, %xmm5 - addsd %xmm7, %xmm0 - shrl $31, %esi - addpd %xmm0, %xmm3 - pshufd $238, %xmm3, %xmm0 - addsd %xmm0, %xmm3 - movsd 12528(%ebx,%esi,8), %xmm4 - mulsd %xmm3, %xmm1 - xorpd %xmm0, %xmm0 - movl $16368, %eax - shll $15, %esi - orl %esi, %eax - pinsrw $3, %eax, %xmm0 - addsd %xmm1, %xmm5 - movl 24(%esp), %esi - mulsd %xmm4, %xmm5 - addsd %xmm5, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_41.0.3: - movl 24(%esp), %esi - xorpd %xmm0, %xmm0 - movl $16368, %eax - pinsrw $3, %eax, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_40.0.3: - xorpd %xmm0, %xmm0 - movl $16368, %eax - pinsrw $3, %eax, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_42.0.3: - xorpd %xmm0, %xmm0 - movl $16368, %eax - pinsrw $3, %eax, %xmm0 - movl $26, %edx - jmp .L_2TAG_PACKET_21.0.3 -.L_2TAG_PACKET_11.0.3: - movsd 16(%esp), %xmm1 - movapd %xmm1, %xmm2 - pextrw $3, %xmm1, %eax - andl $32752, %eax - cmpl $32752, %eax - jne .L_2TAG_PACKET_43.0.3 - movd %xmm2, %eax - psrlq $20, %xmm2 - movd %xmm2, %edx - orl %edx, %eax - jne .L_2TAG_PACKET_22.0.3 -.L_2TAG_PACKET_43.0.3: - movd %xmm1, %eax - psrlq $32, %xmm1 - movd %xmm1, %edx - movl %edx, %ecx - addl %edx, %edx - orl %edx, %eax - je .L_2TAG_PACKET_42.0.3 - shrl $21, %edx - cmpl $1075, %edx - ja .L_2TAG_PACKET_44.0.3 - je .L_2TAG_PACKET_45.0.3 - cmpl $1023, %edx - jb .L_2TAG_PACKET_44.0.3 - movsd 16(%esp), %xmm1 - movl $17208, %eax - xorpd %xmm3, %xmm3 - pinsrw $3, %eax, %xmm3 - movapd %xmm3, %xmm4 - addsd %xmm1, %xmm3 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm1 - pextrw $3, %xmm1, %eax - andl $32752, %eax - jne .L_2TAG_PACKET_44.0.3 - movd %xmm3, %eax - andl $1, %eax - je .L_2TAG_PACKET_44.0.3 -.L_2TAG_PACKET_46.0.3: - movsd 8(%esp), %xmm0 - testl $-2147483648, %ecx - jne .L_2TAG_PACKET_47.0.3 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_45.0.3: - movsd 16(%esp), %xmm1 - movd %xmm1, %eax - testl $1, %eax - jne .L_2TAG_PACKET_46.0.3 -.L_2TAG_PACKET_44.0.3: - testl $-2147483648, %ecx - je .L_2TAG_PACKET_26.0.3 - xorpd %xmm0, %xmm0 -.L_2TAG_PACKET_47.0.3: - movl $16368, %eax - xorpd %xmm1, %xmm1 - pinsrw $3, %eax, %xmm1 - divsd %xmm0, %xmm1 - movapd %xmm1, %xmm0 - movl $27, %edx - jmp .L_2TAG_PACKET_21.0.3 -.L_2TAG_PACKET_14.0.3: - movsd 8(%esp), %xmm2 - movsd 16(%esp), %xmm6 - pextrw $3, %xmm2, %eax - pextrw $3, %xmm6, %edx - movl $32752, %ecx - andl %edx, %ecx - cmpl $32752, %ecx - je .L_2TAG_PACKET_48.0.3 - andl $32752, %eax - subl $16368, %eax - xorl %eax, %edx - testl $32768, %edx - jne .L_2TAG_PACKET_49.0.3 -.L_2TAG_PACKET_50.0.3: - movl $32736, %eax - pinsrw $3, %eax, %xmm0 - shrl $16, %esi - orl %esi, %eax - pinsrw $3, %eax, %xmm1 - movl 24(%esp), %esi - mulsd %xmm1, %xmm0 -.L_2TAG_PACKET_17.0.3: - movl $24, %edx -.L_2TAG_PACKET_21.0.3: - movsd %xmm0, (%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 136(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_49.0.3: - movl $16, %eax - pinsrw $3, %eax, %xmm0 - mulsd %xmm0, %xmm0 - testl $-2147483648, %esi - je .L_2TAG_PACKET_51.0.3 - movsd 12560(%ebx), %xmm2 - xorpd %xmm2, %xmm0 -.L_2TAG_PACKET_51.0.3: - movl 24(%esp), %esi - movl $25, %edx - jmp .L_2TAG_PACKET_21.0.3 -.L_2TAG_PACKET_16.0.3: - pextrw $3, %xmm5, %ecx - pextrw $3, %xmm4, %edx - movl $-1, %eax - andl $32752, %ecx - subl $16368, %ecx - andl $32752, %edx - addl %ecx, %edx - movl $-31, %ecx - sarl $4, %edx - subl %edx, %ecx - jle .L_2TAG_PACKET_52.0.3 - cmpl $20, %ecx - ja .L_2TAG_PACKET_53.0.3 - shll %cl, %eax -.L_2TAG_PACKET_52.0.3: - movd %eax, %xmm0 - psllq $32, %xmm0 - andpd %xmm5, %xmm0 - subsd %xmm0, %xmm5 - addsd %xmm1, %xmm5 - mulsd %xmm4, %xmm0 - mulsd %xmm4, %xmm5 - addsd %xmm5, %xmm0 -.L_2TAG_PACKET_53.0.3: - movl $25, %edx - jmp .L_2TAG_PACKET_21.0.3 -.L_2TAG_PACKET_2.0.3: - movzwl 22(%esp), %ecx - movl $-2147483648, %edx - movd %edx, %xmm1 - xorpd %xmm7, %xmm7 - paddd %xmm4, %xmm0 - psllq $32, %xmm5 - movd %xmm0, %edx - psllq $29, %xmm0 - paddq %xmm3, %xmm1 - andpd %xmm1, %xmm5 - andl $32752, %ecx - cmpl $16560, %ecx - jb .L_2TAG_PACKET_3.0.3 - andpd %xmm6, %xmm0 - subsd %xmm5, %xmm3 - addl $16351, %eax - shrl $4, %eax - subl $1022, %eax - cvtsi2sdl %eax, %xmm7 - mulpd %xmm0, %xmm5 - movsd (%ebx), %xmm4 - mulsd %xmm0, %xmm3 - movsd (%ebx), %xmm6 - subsd %xmm2, %xmm5 - movsd 8(%ebx), %xmm1 - pshufd $68, %xmm3, %xmm2 - unpcklpd %xmm3, %xmm5 - addsd %xmm5, %xmm3 - movsd 8(%ebx), %xmm0 - andl $16760832, %edx - shrl $10, %edx - addpd -3616(%ebx,%edx), %xmm7 - mulsd %xmm5, %xmm4 - mulsd %xmm5, %xmm0 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - movapd %xmm5, %xmm2 - mulsd %xmm5, %xmm4 - addsd %xmm0, %xmm5 - movapd %xmm7, %xmm0 - addsd %xmm3, %xmm2 - addsd %xmm5, %xmm7 - mulsd %xmm2, %xmm6 - subsd %xmm7, %xmm0 - movapd %xmm7, %xmm2 - addsd %xmm4, %xmm7 - addsd %xmm5, %xmm0 - subsd %xmm7, %xmm2 - addsd %xmm2, %xmm4 - pshufd $238, %xmm5, %xmm2 - movapd %xmm7, %xmm5 - addsd %xmm2, %xmm7 - addsd %xmm0, %xmm4 - movapd 8272(%ebx), %xmm0 - subsd %xmm7, %xmm5 - addsd %xmm4, %xmm6 - movapd %xmm7, %xmm4 - addsd %xmm2, %xmm5 - addsd %xmm1, %xmm7 - movapd 8336(%ebx), %xmm2 - subsd %xmm7, %xmm4 - addsd %xmm5, %xmm6 - addsd %xmm1, %xmm4 - pshufd $238, %xmm7, %xmm5 - movapd %xmm7, %xmm1 - addsd %xmm5, %xmm7 - subsd %xmm7, %xmm1 - addsd %xmm5, %xmm1 - movapd 8352(%ebx), %xmm5 - pshufd $68, %xmm3, %xmm3 - addsd %xmm4, %xmm6 - addsd %xmm1, %xmm6 - movapd 8304(%ebx), %xmm1 - mulpd %xmm3, %xmm0 - mulpd %xmm3, %xmm2 - pshufd $68, %xmm3, %xmm4 - mulpd %xmm3, %xmm3 - addpd %xmm1, %xmm0 - addpd %xmm2, %xmm5 - mulsd %xmm3, %xmm4 - movsd 16(%ebx), %xmm2 - mulpd %xmm3, %xmm3 - movsd 16(%esp), %xmm1 - movzwl 22(%esp), %ecx - mulpd %xmm4, %xmm0 - pextrw $3, %xmm7, %eax - mulpd %xmm4, %xmm5 - mulpd %xmm3, %xmm0 - movsd 8376(%ebx), %xmm4 - andpd %xmm7, %xmm2 - addsd %xmm6, %xmm5 - subsd %xmm2, %xmm7 - addpd %xmm0, %xmm5 - andl $32752, %eax - subl $16368, %eax - andl $32752, %ecx - cmpl $32752, %ecx - je .L_2TAG_PACKET_48.0.3 - addl %eax, %ecx - cmpl $16576, %ecx - jae .L_2TAG_PACKET_54.0.3 - pshufd $238, %xmm5, %xmm0 - andpd %xmm1, %xmm4 - movapd %xmm1, %xmm3 - addsd %xmm0, %xmm5 - subsd %xmm4, %xmm1 - xorpd %xmm6, %xmm6 - movl $17080, %edx - pinsrw $3, %edx, %xmm6 - addsd %xmm5, %xmm7 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm1 - movapd %xmm6, %xmm5 - mulsd %xmm7, %xmm3 - addsd %xmm4, %xmm6 - addsd %xmm3, %xmm1 - movapd 12480(%ebx), %xmm7 - movd %xmm6, %edx - subsd %xmm5, %xmm6 - movapd 12496(%ebx), %xmm3 - movsd 12512(%ebx), %xmm2 - subsd %xmm6, %xmm4 - movl %edx, %ecx - andl $255, %edx - addl %edx, %edx - movapd 8384(%ebx,%edx,8), %xmm5 - addsd %xmm1, %xmm4 - pextrw $3, %xmm6, %edx - shrl $8, %ecx - movl %ecx, %eax - shrl $1, %ecx - subl %ecx, %eax - shll $20, %ecx - movd %ecx, %xmm6 - pshufd $68, %xmm4, %xmm0 - pshufd $68, %xmm4, %xmm1 - mulpd %xmm0, %xmm0 - mulpd %xmm1, %xmm7 - pshufd $17, %xmm6, %xmm6 - mulsd %xmm4, %xmm2 - andl $32767, %edx - cmpl $16529, %edx - ja .L_2TAG_PACKET_14.0.3 - mulsd %xmm0, %xmm0 - paddd %xmm6, %xmm5 - addpd %xmm7, %xmm3 - mulsd %xmm5, %xmm2 - pshufd $238, %xmm5, %xmm6 - mulpd %xmm3, %xmm0 - addsd %xmm6, %xmm2 - pshufd $238, %xmm0, %xmm3 - addl $1023, %eax - shll $20, %eax - orl %esi, %eax - movd %eax, %xmm4 - mulsd %xmm5, %xmm0 - mulsd %xmm5, %xmm3 - addsd %xmm2, %xmm0 - psllq $32, %xmm4 - addsd %xmm3, %xmm0 - movapd %xmm0, %xmm1 - addsd %xmm5, %xmm0 - movl 24(%esp), %esi - mulsd %xmm4, %xmm0 - pextrw $3, %xmm0, %eax - andl $32752, %eax - je .L_2TAG_PACKET_16.0.3 - cmpl $32752, %eax - je .L_2TAG_PACKET_17.0.3 -.L_2TAG_PACKET_55.0.3: - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_6.0.3 -.L_2TAG_PACKET_48.0.3: - movl 24(%esp), %esi -.L_2TAG_PACKET_56.0.3: - movsd 8(%esp), %xmm0 - movsd 16(%esp), %xmm1 - addsd %xmm1, %xmm1 - xorpd %xmm2, %xmm2 - movl $49136, %eax - pinsrw $3, %eax, %xmm2 - addsd %xmm0, %xmm2 - pextrw $3, %xmm2, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_18.0.3 - movd %xmm1, %edx - movapd %xmm1, %xmm3 - psrlq $20, %xmm3 - movd %xmm3, %ecx - orl %edx, %ecx - je .L_2TAG_PACKET_57.0.3 - addsd %xmm1, %xmm1 - movapd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_57.0.3: - pextrw $3, %xmm0, %eax - andl $32752, %eax - pextrw $3, %xmm1, %edx - xorpd %xmm0, %xmm0 - subl $16368, %eax - xorl %edx, %eax - testl $32768, %eax - jne .L_2TAG_PACKET_18.0.3 - movl $32752, %edx - pinsrw $3, %edx, %xmm0 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_54.0.3: - pextrw $3, %xmm1, %eax - pextrw $3, %xmm2, %ecx - xorl %ecx, %eax - testl $32768, %eax - je .L_2TAG_PACKET_50.0.3 - jmp .L_2TAG_PACKET_49.0.3 -.L_2TAG_PACKET_6.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type pow,@function - .size pow,.-pow - .data -# -- End pow - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 3218479616 - .long 0 - .long 3210587105 - .long 4160749568 - .long 4294967295 - .long 0 - .long 4294965248 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 536870912 - .long 1072689162 - .long 2523013013 - .long 1046157398 - .long 3758096384 - .long 1072685081 - .long 3851513758 - .long 3190968952 - .long 0 - .long 1072681007 - .long 2241466466 - .long 1046044599 - .long 3221225472 - .long 1072676937 - .long 2990928271 - .long 3193084984 - .long 3758096384 - .long 1072672873 - .long 2905112743 - .long 3192918576 - .long 1610612736 - .long 1072668815 - .long 3370591264 - .long 1046051793 - .long 2147483648 - .long 1072664762 - .long 3272361216 - .long 3193793653 - .long 3758096384 - .long 1072660714 - .long 46546755 - .long 1043206936 - .long 3221225472 - .long 1072656672 - .long 3017067724 - .long 3192177962 - .long 0 - .long 1072652636 - .long 3688436631 - .long 3192814956 - .long 2684354560 - .long 1072648604 - .long 1707461992 - .long 3193056712 - .long 2684354560 - .long 1072644578 - .long 1188114540 - .long 3193603086 - .long 3758096384 - .long 1072640557 - .long 3533180564 - .long 1045459375 - .long 2684354560 - .long 1072636542 - .long 2000337630 - .long 3193475557 - .long 2684354560 - .long 1072632532 - .long 3698062443 - .long 3193752766 - .long 3758096384 - .long 1072628527 - .long 3161606138 - .long 3190532995 - .long 2147483648 - .long 1072624528 - .long 3165265478 - .long 3193158459 - .long 1610612736 - .long 1072620534 - .long 1600940077 - .long 3193226777 - .long 2147483648 - .long 1072616545 - .long 1363272552 - .long 3192614278 - .long 3758096384 - .long 1072612561 - .long 3966209910 - .long 3191249654 - .long 2147483648 - .long 1072608583 - .long 1093672789 - .long 3190637330 - .long 1610612736 - .long 1072604610 - .long 1735239357 - .long 3192753616 - .long 1610612736 - .long 1072600642 - .long 1470665156 - .long 1045559697 - .long 2684354560 - .long 1072596679 - .long 3840624926 - .long 1045928953 - .long 536870912 - .long 1072592722 - .long 4259072556 - .long 3191035622 - .long 3221225472 - .long 1072588769 - .long 3613088753 - .long 3192165681 - .long 2147483648 - .long 1072584822 - .long 3175234446 - .long 1039486948 - .long 1610612736 - .long 1072580880 - .long 856576441 - .long 1045702812 - .long 2147483648 - .long 1072576943 - .long 2253498719 - .long 3193285334 - .long 2684354560 - .long 1072573011 - .long 1587070728 - .long 3190801577 - .long 3758096384 - .long 1072569084 - .long 159986317 - .long 1042519436 - .long 1073741824 - .long 1072565163 - .long 3999541949 - .long 3192020440 - .long 2684354560 - .long 1072561246 - .long 3281310262 - .long 1045586786 - .long 536870912 - .long 1072557335 - .long 3775179406 - .long 1045226055 - .long 3221225472 - .long 1072553428 - .long 643472356 - .long 3193681786 - .long 1073741824 - .long 1072549527 - .long 248169775 - .long 1045068977 - .long 3758096384 - .long 1072545630 - .long 307016632 - .long 1042640932 - .long 2147483648 - .long 1072541739 - .long 3872718526 - .long 3189781486 - .long 536870912 - .long 1072537853 - .long 969711630 - .long 3191724732 - .long 3221225472 - .long 1072533971 - .long 4018820394 - .long 3193189264 - .long 1073741824 - .long 1072530095 - .long 3102233092 - .long 1045510224 - .long 3758096384 - .long 1072526223 - .long 1029307912 - .long 3193812776 - .long 1073741824 - .long 1072522357 - .long 984083153 - .long 1045987403 - .long 3221225472 - .long 1072518495 - .long 4171455401 - .long 3193084080 - .long 0 - .long 1072514639 - .long 2592660757 - .long 1046121691 - .long 1073741824 - .long 1072510787 - .long 2964365712 - .long 1046054453 - .long 2147483648 - .long 1072506940 - .long 3792777877 - .long 3193704729 - .long 2147483648 - .long 1072503098 - .long 2948536104 - .long 3192467100 - .long 1610612736 - .long 1072499261 - .long 3836005619 - .long 1041873166 - .long 536870912 - .long 1072495429 - .long 3124543160 - .long 1044409168 - .long 3221225472 - .long 1072491601 - .long 286227933 - .long 1041065990 - .long 1073741824 - .long 1072487779 - .long 2111296776 - .long 3193604419 - .long 2147483648 - .long 1072483961 - .long 2606822001 - .long 3192940394 - .long 2147483648 - .long 1072480148 - .long 194696800 - .long 1046026063 - .long 1610612736 - .long 1072476340 - .long 8535452 - .long 1046200178 - .long 536870912 - .long 1072472537 - .long 950463625 - .long 3192731897 - .long 2147483648 - .long 1072468738 - .long 973831566 - .long 1045683197 - .long 3221225472 - .long 1072464944 - .long 3330435892 - .long 3190277577 - .long 3221225472 - .long 1072461155 - .long 208692097 - .long 3193517651 - .long 1610612736 - .long 1072457371 - .long 2113097415 - .long 1044781749 - .long 3758096384 - .long 1072453591 - .long 1088808936 - .long 3193716142 - .long 0 - .long 1072449817 - .long 1443002127 - .long 3193250205 - .long 3221225472 - .long 1072446046 - .long 3967357419 - .long 1046109477 - .long 1610612736 - .long 1072442281 - .long 3013517861 - .long 3193159691 - .long 2147483648 - .long 1072438520 - .long 2524586286 - .long 1046121951 - .long 1610612736 - .long 1072434764 - .long 1476892861 - .long 1046434731 - .long 0 - .long 1072431013 - .long 3089640950 - .long 3192305780 - .long 536870912 - .long 1072427266 - .long 3812255529 - .long 1045730879 - .long 0 - .long 1072423524 - .long 995354762 - .long 3191528673 - .long 1610612736 - .long 1072419786 - .long 3260567684 - .long 1046273695 - .long 2147483648 - .long 1072416053 - .long 2738210286 - .long 3191471516 - .long 536870912 - .long 1072412325 - .long 1931849805 - .long 1044560405 - .long 1610612736 - .long 1072408601 - .long 358896655 - .long 1044029237 - .long 1073741824 - .long 1072404882 - .long 2214589842 - .long 3193202126 - .long 2684354560 - .long 1072401167 - .long 3118097363 - .long 3192592906 - .long 2147483648 - .long 1072397457 - .long 1835998884 - .long 1045788247 - .long 0 - .long 1072393752 - .long 1585488319 - .long 1045289910 - .long 0 - .long 1072390051 - .long 480160949 - .long 1046030455 - .long 2684354560 - .long 1072386354 - .long 1832959667 - .long 3193013644 - .long 2684354560 - .long 1072382662 - .long 3611346555 - .long 1044544210 - .long 1073741824 - .long 1072378975 - .long 2749418734 - .long 3193712580 - .long 1073741824 - .long 1072375292 - .long 2390043472 - .long 3191710658 - .long 3221225472 - .long 1072371613 - .long 2828199902 - .long 1042265217 - .long 3221225472 - .long 1072367939 - .long 569209321 - .long 3191230982 - .long 536870912 - .long 1072364270 - .long 236159139 - .long 1046240123 - .long 536870912 - .long 1072360605 - .long 1010656270 - .long 3193813968 - .long 1610612736 - .long 1072356944 - .long 2409080597 - .long 1044025029 - .long 536870912 - .long 1072353288 - .long 598419513 - .long 1043327370 - .long 1073741824 - .long 1072349636 - .long 4105950479 - .long 1045747958 - .long 3758096384 - .long 1072345988 - .long 343243853 - .long 3192420172 - .long 3221225472 - .long 1072342345 - .long 2088439530 - .long 1046172091 - .long 536870912 - .long 1072338707 - .long 4117721107 - .long 1043882496 - .long 3758096384 - .long 1072335072 - .long 3192032958 - .long 3192998645 - .long 3758096384 - .long 1072331442 - .long 2366522518 - .long 1045401957 - .long 1610612736 - .long 1072327817 - .long 3685533141 - .long 3193701947 - .long 536870912 - .long 1072324196 - .long 1058658672 - .long 3193572492 - .long 536870912 - .long 1072320579 - .long 166346347 - .long 1045456348 - .long 2147483648 - .long 1072316966 - .long 2027889772 - .long 1046349302 - .long 1073741824 - .long 1072313358 - .long 1079497888 - .long 1044585259 - .long 1073741824 - .long 1072309754 - .long 2189851573 - .long 1045132990 - .long 2684354560 - .long 1072306154 - .long 2486629386 - .long 3193613625 - .long 536870912 - .long 1072302559 - .long 1263686579 - .long 1044789259 - .long 0 - .long 1072298968 - .long 2412061798 - .long 3191369627 - .long 536870912 - .long 1072295381 - .long 584315716 - .long 3193144135 - .long 1610612736 - .long 1072291798 - .long 449000738 - .long 1046330451 - .long 0 - .long 1072288220 - .long 3938320157 - .long 1044446220 - .long 3758096384 - .long 1072284645 - .long 2949844595 - .long 3193462371 - .long 3758096384 - .long 1072281075 - .long 2771329642 - .long 3192121593 - .long 536870912 - .long 1072277510 - .long 3971508621 - .long 3193002806 - .long 2147483648 - .long 1072273948 - .long 4071942301 - .long 1044952619 - .long 536870912 - .long 1072270391 - .long 2090502395 - .long 1044660556 - .long 0 - .long 1072266838 - .long 3657520961 - .long 3193770938 - .long 3758096384 - .long 1072263288 - .long 1608175110 - .long 1045543239 - .long 0 - .long 1072259744 - .long 2506924180 - .long 1045530501 - .long 1073741824 - .long 1072256203 - .long 18238493 - .long 1046305623 - .long 3221225472 - .long 1072252666 - .long 3862640487 - .long 3192882407 - .long 1073741824 - .long 1072249134 - .long 3850158761 - .long 1043656099 - .long 3758096384 - .long 1072245605 - .long 2356524356 - .long 1045915296 - .long 3221225472 - .long 1072242081 - .long 936497287 - .long 3193842353 - .long 2147483648 - .long 1072238561 - .long 2840845344 - .long 1046454771 - .long 2147483648 - .long 1072235045 - .long 3688100713 - .long 1044895451 - .long 2684354560 - .long 1072231533 - .long 479979913 - .long 3193842442 - .long 2684354560 - .long 1072228025 - .long 1016321898 - .long 1046251032 - .long 3758096384 - .long 1072224521 - .long 562232474 - .long 3191974558 - .long 536870912 - .long 1072221022 - .long 3870512029 - .long 3193113881 - .long 1610612736 - .long 1072217526 - .long 1239780547 - .long 3191583604 - .long 2684354560 - .long 1072214034 - .long 2815421327 - .long 1045873682 - .long 0 - .long 1072210547 - .long 2371009561 - .long 1041508792 - .long 1610612736 - .long 1072207063 - .long 1304636524 - .long 3192414284 - .long 3221225472 - .long 1072203583 - .long 210144854 - .long 3193327333 - .long 0 - .long 1072200108 - .long 1454303272 - .long 1046360024 - .long 1610612736 - .long 1072196636 - .long 2095757548 - .long 1044984677 - .long 3221225472 - .long 1072193168 - .long 2027215580 - .long 3192880933 - .long 0 - .long 1072189705 - .long 214794880 - .long 1043457954 - .long 1073741824 - .long 1072186245 - .long 884624917 - .long 1043497079 - .long 2147483648 - .long 1072182789 - .long 2792396634 - .long 3193171685 - .long 2684354560 - .long 1072179337 - .long 4128995250 - .long 3192103434 - .long 2684354560 - .long 1072175889 - .long 333866043 - .long 1046372325 - .long 3221225472 - .long 1072172445 - .long 2194445544 - .long 3193958905 - .long 2684354560 - .long 1072169005 - .long 2316082269 - .long 3192041703 - .long 1610612736 - .long 1072165569 - .long 581005057 - .long 1046322848 - .long 536870912 - .long 1072162137 - .long 3280786513 - .long 1045457251 - .long 3221225472 - .long 1072158708 - .long 2567093361 - .long 1044710359 - .long 1073741824 - .long 1072155284 - .long 3740443584 - .long 1044224237 - .long 2684354560 - .long 1072151863 - .long 3981028272 - .long 1042596351 - .long 3758096384 - .long 1072148446 - .long 3820011120 - .long 3191915623 - .long 0 - .long 1072145034 - .long 2946439484 - .long 3193831276 - .long 3758096384 - .long 1072141624 - .long 3075274422 - .long 3190132432 - .long 2684354560 - .long 1072138219 - .long 496052167 - .long 1043619760 - .long 1073741824 - .long 1072134818 - .long 271106589 - .long 3192265149 - .long 2684354560 - .long 1072131420 - .long 2091955684 - .long 1044443554 - .long 3758096384 - .long 1072128026 - .long 723240109 - .long 3191007419 - .long 3758096384 - .long 1072124636 - .long 1748629070 - .long 1044510075 - .long 3221225472 - .long 1072121250 - .long 3289522046 - .long 3193095178 - .long 1610612736 - .long 1072117868 - .long 3599052146 - .long 3193720427 - .long 3221225472 - .long 1072114489 - .long 2446758135 - .long 3193436303 - .long 3758096384 - .long 1072111114 - .long 1652171097 - .long 3192137173 - .long 3221225472 - .long 1072107743 - .long 1353007155 - .long 1044523902 - .long 1610612736 - .long 1072104376 - .long 990601105 - .long 1046296663 - .long 3758096384 - .long 1072101012 - .long 2228627618 - .long 3193041040 - .long 0 - .long 1072097653 - .long 812484756 - .long 3191950723 - .long 3758096384 - .long 1072094296 - .long 817833130 - .long 3192279242 - .long 2147483648 - .long 1072090944 - .long 3563228521 - .long 3193810951 - .long 3221225472 - .long 1072087595 - .long 2729108859 - .long 3190936185 - .long 3221225472 - .long 1072084250 - .long 2249121662 - .long 3190639690 - .long 2147483648 - .long 1072080909 - .long 4082471745 - .long 3193929368 - .long 3758096384 - .long 1072077571 - .long 2827323806 - .long 3193708561 - .long 3758096384 - .long 1072074237 - .long 735866167 - .long 1042434690 - .long 2684354560 - .long 1072070907 - .long 3240808889 - .long 3191918422 - .long 0 - .long 1072067581 - .long 466482777 - .long 3186962221 - .long 0 - .long 1072064258 - .long 1576076296 - .long 1045849056 - .long 3221225472 - .long 1072060938 - .long 2751923560 - .long 3191910703 - .long 0 - .long 1072057623 - .long 1908755527 - .long 1046437515 - .long 0 - .long 1072054311 - .long 3175841411 - .long 1044572886 - .long 2684354560 - .long 1072051002 - .long 1633258450 - .long 3192670420 - .long 3221225472 - .long 1072047697 - .long 1867746657 - .long 1045726209 - .long 2684354560 - .long 1072044396 - .long 338968864 - .long 3193084662 - .long 0 - .long 1072041099 - .long 1501742471 - .long 3191742031 - .long 0 - .long 1072037805 - .long 4266775786 - .long 3192686970 - .long 2147483648 - .long 1072034514 - .long 4249283553 - .long 1045769728 - .long 2684354560 - .long 1072031227 - .long 2758366873 - .long 1046402161 - .long 1610612736 - .long 1072027944 - .long 2161186990 - .long 1044736865 - .long 2684354560 - .long 1072024664 - .long 810300171 - .long 1045748777 - .long 2147483648 - .long 1072021388 - .long 183688927 - .long 3191515581 - .long 3758096384 - .long 1072018115 - .long 368874072 - .long 3192363575 - .long 3221225472 - .long 1072014846 - .long 2459092970 - .long 1041794640 - .long 536870912 - .long 1072011581 - .long 867488640 - .long 1046310291 - .long 536870912 - .long 1072008319 - .long 50140871 - .long 1043327329 - .long 2684354560 - .long 1072005060 - .long 1241902518 - .long 3192739252 - .long 2684354560 - .long 1072001805 - .long 1027881659 - .long 3193858388 - .long 0 - .long 1071998554 - .long 38457322 - .long 1045489179 - .long 0 - .long 1071995306 - .long 3432963337 - .long 3190969347 - .long 1610612736 - .long 1071992061 - .long 534931792 - .long 1046302734 - .long 1610612736 - .long 1071988820 - .long 1817895268 - .long 3192551860 - .long 3221225472 - .long 1071985582 - .long 357237383 - .long 3191870833 - .long 2684354560 - .long 1071982348 - .long 108262401 - .long 3193365867 - .long 3758096384 - .long 1071979117 - .long 1964729244 - .long 1042502249 - .long 2684354560 - .long 1071975890 - .long 2088446957 - .long 1038010503 - .long 3221225472 - .long 1071972666 - .long 2947239447 - .long 1046377845 - .long 1610612736 - .long 1071969446 - .long 774932072 - .long 1046064854 - .long 2147483648 - .long 1071966229 - .long 4080937590 - .long 3193041284 - .long 3758096384 - .long 1071963015 - .long 2208251454 - .long 1045945089 - .long 3221225472 - .long 1071959805 - .long 2850924475 - .long 1045650959 - .long 0 - .long 1071956599 - .long 714040997 - .long 1046275153 - .long 3221225472 - .long 1071953395 - .long 85533782 - .long 3192816920 - .long 3221225472 - .long 1071950195 - .long 1252511005 - .long 1044805706 - .long 1073741824 - .long 1071946999 - .long 2384659038 - .long 3193391602 - .long 0 - .long 1071943806 - .long 416481813 - .long 1043730233 - .long 536870912 - .long 1071940616 - .long 1675424499 - .long 1046348030 - .long 3221225472 - .long 1071937429 - .long 1175989513 - .long 3193009113 - .long 2684354560 - .long 1071934246 - .long 2400084650 - .long 3192451713 - .long 3758096384 - .long 1071931066 - .long 1467335692 - .long 3193350868 - .long 1610612736 - .long 1071927890 - .long 266493801 - .long 1044954481 - .long 1073741824 - .long 1071924717 - .long 3919093445 - .long 1046023575 - .long 2147483648 - .long 1071921547 - .long 3017408483 - .long 1044880828 - .long 536870912 - .long 1071918381 - .long 948849966 - .long 3193892224 - .long 3758096384 - .long 1071915217 - .long 1870232600 - .long 1045777228 - .long 536870912 - .long 1071912058 - .long 822381492 - .long 3193639186 - .long 2147483648 - .long 1071908901 - .long 788243705 - .long 1044966343 - .long 1073741824 - .long 1071905748 - .long 1344278809 - .long 1044428545 - .long 1073741824 - .long 1071902598 - .long 172864300 - .long 1045765608 - .long 2684354560 - .long 1071899451 - .long 211555467 - .long 3192963574 - .long 536870912 - .long 1071896308 - .long 3373438023 - .long 1045643168 - .long 0 - .long 1071893168 - .long 2867180960 - .long 3189945998 - .long 536870912 - .long 1071890031 - .long 36724362 - .long 3193240584 - .long 1610612736 - .long 1071886897 - .long 2140176984 - .long 1045945349 - .long 0 - .long 1071883767 - .long 436842360 - .long 1040712587 - .long 3758096384 - .long 1071880639 - .long 1225147329 - .long 3193814594 - .long 3758096384 - .long 1071877515 - .long 1586157348 - .long 3191614322 - .long 536870912 - .long 1071874395 - .long 3329332918 - .long 1041699791 - .long 2684354560 - .long 1071871277 - .long 1635968041 - .long 3191783756 - .long 1073741824 - .long 1071868163 - .long 2876158382 - .long 1046097093 - .long 1073741824 - .long 1071865052 - .long 4267556964 - .long 3193723000 - .long 1073741824 - .long 1071861944 - .long 195475940 - .long 1045520795 - .long 2147483648 - .long 1071858839 - .long 2239193514 - .long 1046478675 - .long 0 - .long 1071855738 - .long 4168275596 - .long 1044926285 - .long 2684354560 - .long 1071852639 - .long 142514114 - .long 1045595182 - .long 2147483648 - .long 1071849544 - .long 1943457984 - .long 3192930015 - .long 2147483648 - .long 1071846452 - .long 202659489 - .long 3193926317 - .long 2684354560 - .long 1071843363 - .long 2208408789 - .long 3193857484 - .long 3758096384 - .long 1071840277 - .long 2237297552 - .long 3192939576 - .long 1073741824 - .long 1071837195 - .long 2726920839 - .long 1044193954 - .long 3758096384 - .long 1071834115 - .long 2337732207 - .long 3193611773 - .long 2147483648 - .long 1071831039 - .long 1390088602 - .long 1044000317 - .long 1610612736 - .long 1071827966 - .long 3806188736 - .long 3193463913 - .long 1073741824 - .long 1071824896 - .long 1795276560 - .long 1043671965 - .long 1073741824 - .long 1071821829 - .long 2960792799 - .long 1046240474 - .long 2147483648 - .long 1071818765 - .long 3350591592 - .long 3193333939 - .long 3221225472 - .long 1071815704 - .long 408870754 - .long 3193322854 - .long 0 - .long 1071812647 - .long 4146717132 - .long 1046063520 - .long 2147483648 - .long 1071809592 - .long 1681114919 - .long 3192114313 - .long 0 - .long 1071806541 - .long 1098393137 - .long 3190846732 - .long 2684354560 - .long 1071803492 - .long 2437484983 - .long 3193448718 - .long 1073741824 - .long 1071800447 - .long 1036809185 - .long 3192023501 - .long 0 - .long 1071797405 - .long 659668848 - .long 3193596312 - .long 3221225472 - .long 1071794365 - .long 1112062459 - .long 3192773376 - .long 2147483648 - .long 1071791329 - .long 4082956335 - .long 1045830513 - .long 1610612736 - .long 1071788296 - .long 2387089965 - .long 1045532601 - .long 1610612736 - .long 1071785266 - .long 1522101980 - .long 3193941957 - .long 1073741824 - .long 1071782239 - .long 2157197585 - .long 3188193305 - .long 1073741824 - .long 1071779215 - .long 946810220 - .long 3193223819 - .long 1073741824 - .long 1071776194 - .long 4069942444 - .long 3193878549 - .long 536870912 - .long 1071773176 - .long 1693463440 - .long 1046360588 - .long 536870912 - .long 1071770161 - .long 1954543254 - .long 1046409381 - .long 1073741824 - .long 1071767149 - .long 1050471249 - .long 3193933095 - .long 536870912 - .long 1071764140 - .long 1256240478 - .long 1046456865 - .long 536870912 - .long 1071761134 - .long 676764254 - .long 1046055503 - .long 536870912 - .long 1071758131 - .long 1421032967 - .long 1044779786 - .long 536870912 - .long 1071755131 - .long 38735992 - .long 3192766355 - .long 0 - .long 1071752134 - .long 2960669690 - .long 1044484680 - .long 3758096384 - .long 1071749139 - .long 788707382 - .long 1045299895 - .long 3221225472 - .long 1071746148 - .long 685689300 - .long 1040778831 - .long 2147483648 - .long 1071743160 - .long 1170994182 - .long 1046159174 - .long 1073741824 - .long 1071740175 - .long 64591436 - .long 1046153849 - .long 0 - .long 1071737193 - .long 2338031659 - .long 3189997702 - .long 2684354560 - .long 1071734213 - .long 1941624568 - .long 3186752676 - .long 536870912 - .long 1071731237 - .long 1401255580 - .long 1046383990 - .long 2684354560 - .long 1071728263 - .long 376888427 - .long 1045896456 - .long 536870912 - .long 1071725293 - .long 2831424639 - .long 3193539109 - .long 1610612736 - .long 1071722325 - .long 3303123696 - .long 1044599415 - .long 2684354560 - .long 1071719360 - .long 1077295329 - .long 3189877372 - .long 3221225472 - .long 1071716398 - .long 1434061099 - .long 3184529771 - .long 3221225472 - .long 1071713439 - .long 2104991590 - .long 1045062074 - .long 3221225472 - .long 1071710483 - .long 722060869 - .long 3193788526 - .long 536870912 - .long 1071704580 - .long 3928796486 - .long 1046129020 - .long 536870912 - .long 1071698688 - .long 588844628 - .long 1045492135 - .long 2684354560 - .long 1071692807 - .long 326739366 - .long 3193004445 - .long 1610612736 - .long 1071686938 - .long 2456436042 - .long 1046278169 - .long 2684354560 - .long 1071681080 - .long 2831303512 - .long 1043670046 - .long 536870912 - .long 1071675234 - .long 607223418 - .long 1045507322 - .long 0 - .long 1071669399 - .long 4254921332 - .long 3193290483 - .long 0 - .long 1071663575 - .long 914994333 - .long 3191263853 - .long 1073741824 - .long 1071657762 - .long 4147050180 - .long 3193228552 - .long 2684354560 - .long 1071651960 - .long 594554157 - .long 3193503935 - .long 0 - .long 1071646170 - .long 1062846796 - .long 1045944331 - .long 1073741824 - .long 1071636109 - .long 2909238893 - .long 3193436884 - .long 1073741824 - .long 1071624572 - .long 1682918119 - .long 1042211899 - .long 1073741824 - .long 1071613057 - .long 2419209426 - .long 1045437062 - .long 1073741824 - .long 1071601564 - .long 2951341321 - .long 3190193214 - .long 0 - .long 1071590093 - .long 3084900875 - .long 3192394907 - .long 1073741824 - .long 1071578643 - .long 999567454 - .long 1046433447 - .long 2147483648 - .long 1071567215 - .long 1570101857 - .long 3193291160 - .long 0 - .long 1071555809 - .long 1080647881 - .long 3185154585 - .long 0 - .long 1071544424 - .long 3526309177 - .long 1044843640 - .long 2147483648 - .long 1071533060 - .long 2213463349 - .long 3191738930 - .long 1073741824 - .long 1071521718 - .long 1039925195 - .long 3192618353 - .long 1073741824 - .long 1071510397 - .long 2115757280 - .long 3193671567 - .long 1073741824 - .long 1071499097 - .long 1188751495 - .long 3191145560 - .long 2147483648 - .long 1071487818 - .long 3983461449 - .long 3193897029 - .long 2147483648 - .long 1071476560 - .long 782141500 - .long 1042879962 - .long 2147483648 - .long 1071465323 - .long 4038904626 - .long 1045063881 - .long 2147483648 - .long 1071454107 - .long 2613036921 - .long 3193217642 - .long 0 - .long 1071442912 - .long 2095723435 - .long 1044629175 - .long 1073741824 - .long 1071431737 - .long 3879795974 - .long 1045767874 - .long 1073741824 - .long 1071420583 - .long 2662198042 - .long 3191434637 - .long 3221225472 - .long 1071409449 - .long 4037605722 - .long 3193703090 - .long 2147483648 - .long 1071398336 - .long 1860331835 - .long 1040814822 - .long 3221225472 - .long 1071387243 - .long 1522972033 - .long 3190305974 - .long 1073741824 - .long 1071376171 - .long 2361534207 - .long 1043699366 - .long 0 - .long 1071365119 - .long 4180309179 - .long 1044142099 - .long 0 - .long 1071354087 - .long 1201038528 - .long 3192968772 - .long 0 - .long 1071343075 - .long 1342478171 - .long 3193251215 - .long 0 - .long 1071332083 - .long 3836883348 - .long 3193472007 - .long 3221225472 - .long 1071321110 - .long 3864874250 - .long 1045593126 - .long 2147483648 - .long 1071310158 - .long 2169494998 - .long 1046045346 - .long 1073741824 - .long 1071299226 - .long 3785165075 - .long 3193319246 - .long 2147483648 - .long 1071288313 - .long 1137692678 - .long 3192716779 - .long 1073741824 - .long 1071277420 - .long 1752107598 - .long 1046366120 - .long 3221225472 - .long 1071266546 - .long 1912656912 - .long 1046352281 - .long 3221225472 - .long 1071255692 - .long 2882676334 - .long 1046406353 - .long 1073741824 - .long 1071244858 - .long 963612460 - .long 1045282811 - .long 0 - .long 1071234043 - .long 3811255773 - .long 1046231636 - .long 1073741824 - .long 1071223247 - .long 1126055989 - .long 3192224037 - .long 2147483648 - .long 1071212470 - .long 2079145427 - .long 1044432413 - .long 0 - .long 1071201713 - .long 3611595621 - .long 1043358745 - .long 2147483648 - .long 1071190974 - .long 390522769 - .long 1045888252 - .long 1073741824 - .long 1071180255 - .long 4087939723 - .long 3192930745 - .long 3221225472 - .long 1071169554 - .long 1451494480 - .long 3190219274 - .long 1073741824 - .long 1071158873 - .long 427176194 - .long 3193042022 - .long 2147483648 - .long 1071148210 - .long 1882381948 - .long 3192727946 - .long 2147483648 - .long 1071137566 - .long 3736313771 - .long 3192087019 - .long 1073741824 - .long 1071126941 - .long 1560398816 - .long 3193185715 - .long 2147483648 - .long 1071116334 - .long 1021942441 - .long 1041526696 - .long 2147483648 - .long 1071105746 - .long 3517080249 - .long 3193576041 - .long 3221225472 - .long 1071095176 - .long 2248589878 - .long 1044527624 - .long 2147483648 - .long 1071084625 - .long 2412896695 - .long 1046112867 - .long 3221225472 - .long 1071074092 - .long 3834725738 - .long 1044562378 - .long 1073741824 - .long 1071063578 - .long 1150920407 - .long 1043768986 - .long 0 - .long 1071053082 - .long 1379393428 - .long 3188690690 - .long 0 - .long 1071042604 - .long 3058183278 - .long 3193617655 - .long 0 - .long 1071032144 - .long 421133665 - .long 3193417186 - .long 0 - .long 1071021702 - .long 2860161357 - .long 3191816125 - .long 0 - .long 1071011278 - .long 1742405964 - .long 1043580240 - .long 0 - .long 1071000872 - .long 2821215927 - .long 3188984273 - .long 3221225472 - .long 1070990483 - .long 510275597 - .long 1045813401 - .long 2147483648 - .long 1070980113 - .long 304266588 - .long 3191193536 - .long 3221225472 - .long 1070969760 - .long 1854784211 - .long 1046302073 - .long 0 - .long 1070959426 - .long 3773082854 - .long 3193008899 - .long 2147483648 - .long 1070949108 - .long 3003572392 - .long 1046404879 - .long 3221225472 - .long 1070938808 - .long 1702149204 - .long 1046407257 - .long 2147483648 - .long 1070928526 - .long 3935314439 - .long 1046438280 - .long 3221225472 - .long 1070918261 - .long 2677087609 - .long 1045501749 - .long 2147483648 - .long 1070908014 - .long 4190598039 - .long 3193640515 - .long 1073741824 - .long 1070897784 - .long 368874072 - .long 1044879927 - .long 2147483648 - .long 1070887571 - .long 3584052697 - .long 3192024662 - .long 3221225472 - .long 1070877375 - .long 3762307829 - .long 1045886918 - .long 1073741824 - .long 1070867197 - .long 495710920 - .long 1046317072 - .long 0 - .long 1070857036 - .long 2292768238 - .long 3190887508 - .long 3221225472 - .long 1070846891 - .long 1044078151 - .long 3193772914 - .long 1073741824 - .long 1070836764 - .long 3266010457 - .long 1043443755 - .long 3221225472 - .long 1070826653 - .long 3571665822 - .long 1045547823 - .long 1073741824 - .long 1070816560 - .long 393348347 - .long 3190525143 - .long 2147483648 - .long 1070806483 - .long 4241722498 - .long 3192084193 - .long 2147483648 - .long 1070796423 - .long 1693797068 - .long 3192807972 - .long 0 - .long 1070786380 - .long 2860086745 - .long 1046331646 - .long 2147483648 - .long 1070776353 - .long 1366141759 - .long 3192979363 - .long 1073741824 - .long 1070766343 - .long 737899283 - .long 1045853346 - .long 3221225472 - .long 1070756349 - .long 88734873 - .long 1043881257 - .long 3221225472 - .long 1070746372 - .long 1438003315 - .long 3192917101 - .long 0 - .long 1070736412 - .long 1066505530 - .long 1043896695 - .long 3221225472 - .long 1070726467 - .long 2706653041 - .long 3191113643 - .long 3221225472 - .long 1070716539 - .long 1321764476 - .long 1039573724 - .long 0 - .long 1070706628 - .long 1126753211 - .long 1044502976 - .long 2147483648 - .long 1070696732 - .long 773642884 - .long 1044110727 - .long 1073741824 - .long 1070686853 - .long 1263743406 - .long 3193115278 - .long 0 - .long 1070676990 - .long 3115237732 - .long 3193089176 - .long 3221225472 - .long 1070667142 - .long 3642626838 - .long 3191146032 - .long 2147483648 - .long 1070657311 - .long 2091696428 - .long 1044337177 - .long 1073741824 - .long 1070647496 - .long 3168958391 - .long 1044197568 - .long 0 - .long 1070637697 - .long 711148669 - .long 3193181047 - .long 2147483648 - .long 1070627913 - .long 4207182773 - .long 3193402092 - .long 3221225472 - .long 1070618145 - .long 918070640 - .long 3192902845 - .long 3221225472 - .long 1070608393 - .long 3135571447 - .long 3192193928 - .long 2147483648 - .long 1070598657 - .long 1043705517 - .long 3193188604 - .long 2147483648 - .long 1070581777 - .long 1886680492 - .long 1043890286 - .long 2147483648 - .long 1070562367 - .long 3373799420 - .long 3191917802 - .long 2147483648 - .long 1070542988 - .long 2919618025 - .long 3192461752 - .long 2147483648 - .long 1070523640 - .long 2926365158 - .long 3193113492 - .long 0 - .long 1070504323 - .long 519978638 - .long 1045918846 - .long 0 - .long 1070485037 - .long 3665353151 - .long 3193546248 - .long 0 - .long 1070465781 - .long 2327718958 - .long 1045050797 - .long 0 - .long 1070446556 - .long 345326861 - .long 3188224716 - .long 2147483648 - .long 1070427361 - .long 2263747488 - .long 3192871328 - .long 0 - .long 1070408197 - .long 3894192264 - .long 1045693123 - .long 0 - .long 1070389063 - .long 994321593 - .long 1046347203 - .long 2147483648 - .long 1070369959 - .long 3540366700 - .long 1042296230 - .long 0 - .long 1070350886 - .long 966420752 - .long 3192400412 - .long 2147483648 - .long 1070331842 - .long 1954511160 - .long 3193467762 - .long 2147483648 - .long 1070312828 - .long 1875003040 - .long 1045485629 - .long 0 - .long 1070293845 - .long 4003372005 - .long 3193714109 - .long 2147483648 - .long 1070274890 - .long 2216083644 - .long 1045720399 - .long 0 - .long 1070255966 - .long 1240985743 - .long 1045879414 - .long 0 - .long 1070237071 - .long 1573064162 - .long 1046427916 - .long 0 - .long 1070218206 - .long 2500166582 - .long 3193848169 - .long 2147483648 - .long 1070199369 - .long 862131539 - .long 1045606065 - .long 0 - .long 1070180563 - .long 3733427622 - .long 3193545988 - .long 0 - .long 1070161785 - .long 124515358 - .long 1045504766 - .long 2147483648 - .long 1070143036 - .long 689228007 - .long 1044238436 - .long 0 - .long 1070124317 - .long 976284835 - .long 3189879978 - .long 2147483648 - .long 1070105626 - .long 2997446224 - .long 3193394244 - .long 2147483648 - .long 1070086964 - .long 594985163 - .long 3190453447 - .long 2147483648 - .long 1070068331 - .long 3634411091 - .long 3193012662 - .long 0 - .long 1070049727 - .long 841316482 - .long 3192551604 - .long 0 - .long 1070031151 - .long 518949849 - .long 3189505693 - .long 2147483648 - .long 1070012603 - .long 207633604 - .long 1043791305 - .long 2147483648 - .long 1069994084 - .long 925415631 - .long 3189658670 - .long 2147483648 - .long 1069975593 - .long 3348775015 - .long 1046231055 - .long 0 - .long 1069957131 - .long 4137593961 - .long 1045760644 - .long 2147483648 - .long 1069938696 - .long 3081207972 - .long 1046319652 - .long 2147483648 - .long 1069920290 - .long 2912811806 - .long 3193250863 - .long 0 - .long 1069901912 - .long 1704663230 - .long 3192651171 - .long 2147483648 - .long 1069883561 - .long 1726887473 - .long 3193427817 - .long 2147483648 - .long 1069865238 - .long 516302873 - .long 1042556919 - .long 2147483648 - .long 1069846943 - .long 3737277289 - .long 3192083505 - .long 0 - .long 1069828676 - .long 2829909067 - .long 3191628520 - .long 0 - .long 1069810436 - .long 3474800299 - .long 3187384991 - .long 2147483648 - .long 1069792223 - .long 2041291754 - .long 3186735048 - .long 2147483648 - .long 1069774038 - .long 3100739290 - .long 3192991951 - .long 2147483648 - .long 1069755880 - .long 2641686866 - .long 1042449846 - .long 0 - .long 1069737750 - .long 1353612457 - .long 3192928544 - .long 2147483648 - .long 1069719646 - .long 1823398190 - .long 3193125156 - .long 0 - .long 1069701570 - .long 2629108558 - .long 3192983089 - .long 2147483648 - .long 1069683520 - .long 314889080 - .long 3193178947 - .long 2147483648 - .long 1069665497 - .long 3426846470 - .long 1046055034 - .long 0 - .long 1069647502 - .long 2451521798 - .long 3193081447 - .long 2147483648 - .long 1069629532 - .long 963200030 - .long 1046315089 - .long 0 - .long 1069611590 - .long 3644976987 - .long 1046450297 - .long 2147483648 - .long 1069593674 - .long 1514045874 - .long 3193337489 - .long 0 - .long 1069575785 - .long 2640752615 - .long 3192734715 - .long 0 - .long 1069557922 - .long 177381730 - .long 3193107348 - .long 0 - .long 1069532650 - .long 546871269 - .long 1045601847 - .long 0 - .long 1069497029 - .long 2220408187 - .long 1045964849 - .long 0 - .long 1069461461 - .long 3101209784 - .long 3192417098 - .long 0 - .long 1069425944 - .long 3768825782 - .long 1046196178 - .long 0 - .long 1069390480 - .long 737308942 - .long 1043872555 - .long 0 - .long 1069355068 - .long 1944808119 - .long 3193362317 - .long 0 - .long 1069319707 - .long 852406261 - .long 3191004250 - .long 0 - .long 1069284398 - .long 3202370743 - .long 3192549796 - .long 0 - .long 1069249140 - .long 900633975 - .long 1043862575 - .long 0 - .long 1069213934 - .long 3417168564 - .long 3193213168 - .long 0 - .long 1069178778 - .long 2513309972 - .long 1046051953 - .long 0 - .long 1069143674 - .long 1836846968 - .long 1044036653 - .long 0 - .long 1069108621 - .long 675391362 - .long 3193334972 - .long 0 - .long 1069073618 - .long 1859398086 - .long 3191668729 - .long 0 - .long 1069038666 - .long 3835994043 - .long 3193252196 - .long 0 - .long 1069003764 - .long 563337246 - .long 3192060530 - .long 0 - .long 1068968912 - .long 3715154210 - .long 1045592716 - .long 0 - .long 1068934111 - .long 51415636 - .long 3192193939 - .long 0 - .long 1068899359 - .long 822049108 - .long 1045846080 - .long 0 - .long 1068864658 - .long 3739043340 - .long 3193184949 - .long 0 - .long 1068830006 - .long 2500828997 - .long 3193115638 - .long 0 - .long 1068795403 - .long 1479335089 - .long 1045458233 - .long 0 - .long 1068760850 - .long 1914098598 - .long 1045079833 - .long 0 - .long 1068726346 - .long 1470374909 - .long 1046125471 - .long 0 - .long 1068691892 - .long 2048101185 - .long 3192960024 - .long 0 - .long 1068657486 - .long 801101802 - .long 1042523454 - .long 0 - .long 1068623129 - .long 412171467 - .long 1044799425 - .long 0 - .long 1068588821 - .long 2124566049 - .long 1040459843 - .long 0 - .long 1068554561 - .long 2087558263 - .long 1046083102 - .long 0 - .long 1068520350 - .long 290389316 - .long 1045220023 - .long 0 - .long 1068473430 - .long 393737815 - .long 1045770085 - .long 0 - .long 1068405202 - .long 3273111658 - .long 3193594336 - .long 0 - .long 1068337068 - .long 3076935419 - .long 3191993934 - .long 0 - .long 1068269030 - .long 1564279721 - .long 1040713632 - .long 0 - .long 1068201088 - .long 1950103787 - .long 3191285473 - .long 0 - .long 1068133240 - .long 111301617 - .long 1046140470 - .long 0 - .long 1068065488 - .long 2740933659 - .long 1046091898 - .long 0 - .long 1067997832 - .long 1267131462 - .long 3192947024 - .long 0 - .long 1067930268 - .long 629787343 - .long 1045599114 - .long 0 - .long 1067862800 - .long 2943029746 - .long 3191100621 - .long 0 - .long 1067795426 - .long 2538631151 - .long 3193953989 - .long 0 - .long 1067728144 - .long 3881795033 - .long 3191377363 - .long 0 - .long 1067660956 - .long 2752747058 - .long 3186250103 - .long 0 - .long 1067593862 - .long 892170014 - .long 3193330390 - .long 0 - .long 1067526860 - .long 2000985783 - .long 3192968647 - .long 0 - .long 1067459950 - .long 1954077304 - .long 1044399908 - .long 0 - .long 1067335900 - .long 4120702847 - .long 3193150730 - .long 0 - .long 1067202448 - .long 353489980 - .long 1045676744 - .long 0 - .long 1067069184 - .long 2609643324 - .long 3192108001 - .long 0 - .long 1066936100 - .long 2904433317 - .long 1044836541 - .long 0 - .long 1066803200 - .long 319656790 - .long 1044863904 - .long 0 - .long 1066670484 - .long 2407987331 - .long 3192995083 - .long 0 - .long 1066537948 - .long 2437746120 - .long 3193127733 - .long 0 - .long 1066405592 - .long 762570215 - .long 3189946997 - .long 0 - .long 1066145040 - .long 3317159694 - .long 1046060125 - .long 0 - .long 1065881056 - .long 2317845886 - .long 3191679176 - .long 0 - .long 1065617424 - .long 3665195816 - .long 1045633853 - .long 0 - .long 1065354160 - .long 2008730355 - .long 3193898211 - .long 0 - .long 1064829264 - .long 3746236192 - .long 1046121471 - .long 0 - .long 1064303680 - .long 885296753 - .long 3191852441 - .long 0 - .long 1063253696 - .long 449976495 - .long 3192682663 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 4294965248 - .long 0 - .long 4294965248 - .long 0 - .long 1073160192 - .long 370913857 - .long 3210587105 - .long 1841914130 - .long 3213059448 - .long 3995341938 - .long 3214607105 - .long 2677381210 - .long 3216320731 - .long 3011779882 - .long 3218479542 - .long 1367832035 - .long 1066403058 - .long 2894285243 - .long 1067936923 - .long 1215221452 - .long 1069835102 - .long 370913857 - .long 3210587105 - .long 2677381210 - .long 3216320731 - .long 4172642429 - .long 1056068382 - .long 1215221451 - .long 1069835102 - .long 1092638156 - .long 3184925618 - .long 0 - .long 4294967288 - .long 0 - .long 4294967295 - .long 0 - .long 1072693248 - .long 0 - .long 997195776 - .long 4200250559 - .long 1072696090 - .long 2808127345 - .long 3162830514 - .long 2851812149 - .long 1072698941 - .long 2595802551 - .long 1016815913 - .long 339411585 - .long 1072701800 - .long 264588982 - .long 3162685233 - .long 1048019041 - .long 1072704666 - .long 1398474845 - .long 3161559171 - .long 772914124 - .long 1072707540 - .long 4004372762 - .long 1013278737 - .long 3899555717 - .long 1072710421 - .long 427280750 - .long 3163595548 - .long 1928746161 - .long 1072713311 - .long 983617676 - .long 1015333753 - .long 3541402996 - .long 1072716208 - .long 2759177317 - .long 1015903202 - .long 238821257 - .long 1072719114 - .long 1469694871 - .long 3163933563 - .long 702412510 - .long 1072722027 - .long 3803266087 - .long 3163328991 - .long 728934454 - .long 1072724948 - .long 1413842688 - .long 1015227188 - .long 410360776 - .long 1072727877 - .long 1269990655 - .long 1013024446 - .long 4133881824 - .long 1072730813 - .long 2148155345 - .long 3163979875 - .long 3402036099 - .long 1072733758 - .long 405889334 - .long 1016154232 - .long 2602514713 - .long 1072736711 - .long 2268929336 - .long 1015402860 - .long 1828292879 - .long 1072739672 - .long 1255956747 - .long 1016636974 - .long 1172597893 - .long 1072742641 - .long 114433263 - .long 1016396169 - .long 728909815 - .long 1072745618 - .long 383930225 - .long 1016078044 - .long 590962156 - .long 1072748603 - .long 3829346666 - .long 3164324173 - .long 852742562 - .long 1072751596 - .long 667253586 - .long 1010842135 - .long 1608493509 - .long 1072754597 - .long 3159622171 - .long 3163856313 - .long 2952712987 - .long 1072757606 - .long 3293494651 - .long 3161168877 - .long 685187902 - .long 1072760624 - .long 378731989 - .long 1015891691 - .long 3490863953 - .long 1072763649 - .long 960797498 - .long 3163997456 - .long 2875075254 - .long 1072766683 - .long 4144233330 - .long 3164382292 - .long 3228316108 - .long 1072769725 - .long 3010241991 - .long 3159471380 - .long 351405227 - .long 1072772776 - .long 3125337328 - .long 3160871055 - .long 2930322912 - .long 1072775834 - .long 2599499422 - .long 3163762623 - .long 2471440686 - .long 1072778901 - .long 968836267 - .long 3163263464 - .long 3366293073 - .long 1072781976 - .long 3119426314 - .long 1015169130 - .long 1416741826 - .long 1072785060 - .long 2196380210 - .long 1012462139 - .long 1014845819 - .long 1072788152 - .long 3117910646 - .long 3162607681 - .long 2257959872 - .long 1072791252 - .long 3802946148 - .long 1014013503 - .long 948735466 - .long 1072794361 - .long 3516338028 - .long 3163623459 - .long 1480023343 - .long 1072797478 - .long 2247196168 - .long 1016376029 - .long 3949972341 - .long 1072800603 - .long 2068408548 - .long 1015962444 - .long 4162030108 - .long 1072803737 - .long 2763428480 - .long 1016577925 - .long 2214878420 - .long 1072806880 - .long 892270087 - .long 3164164998 - .long 2502433899 - .long 1072810031 - .long 2148595913 - .long 1016072567 - .long 828946858 - .long 1072813191 - .long 10642492 - .long 1016988014 - .long 1588871207 - .long 1072816359 - .long 143439582 - .long 3164011992 - .long 586995997 - .long 1072819536 - .long 41662348 - .long 3163676568 - .long 2218315341 - .long 1072822721 - .long 2694295388 - .long 3164337444 - .long 2288159958 - .long 1072825915 - .long 2169144469 - .long 1015924597 - .long 897099801 - .long 1072829118 - .long 754756297 - .long 1016289581 - .long 2440944790 - .long 1072832329 - .long 2492769774 - .long 1015196030 - .long 2725843665 - .long 1072835549 - .long 1433917087 - .long 1015887099 - .long 1853186616 - .long 1072838778 - .long 3066496371 - .long 1016705150 - .long 4219606026 - .long 1072842015 - .long 2434574742 - .long 1015730124 - .long 1337108031 - .long 1072845262 - .long 3203724452 - .long 1015726421 - .long 1897844341 - .long 1072848517 - .long 1254300460 - .long 1016324514 - .long 1709341917 - .long 1072851781 - .long 2571168217 - .long 1015201075 - .long 874372905 - .long 1072855054 - .long 100263788 - .long 1016989308 - .long 3790955393 - .long 1072858335 - .long 2352942462 - .long 3164228666 - .long 1972484976 - .long 1072861626 - .long 675290301 - .long 3162688626 - .long 4112506593 - .long 1072864925 - .long 2947355221 - .long 1015419624 - .long 1724976915 - .long 1072868234 - .long 420909223 - .long 3164165955 - .long 3504003472 - .long 1072871551 - .long 3594001060 - .long 3158379228 - .long 964107055 - .long 1072874878 - .long 2800439588 - .long 3163881797 - .long 2799960843 - .long 1072878213 - .long 1423655381 - .long 1016070727 - .long 526652809 - .long 1072881558 - .long 4223459736 - .long 1016927951 - .long 2839424854 - .long 1072884911 - .long 1171596163 - .long 1014090255 - .long 1253935211 - .long 1072888274 - .long 1395382931 - .long 3160751189 - .long 171030293 - .long 1072891646 - .long 3526460132 - .long 1015477354 - .long 3991843581 - .long 1072895026 - .long 4092853457 - .long 1015634339 - .long 4232894513 - .long 1072898416 - .long 2383938684 - .long 1015717095 - .long 1000925746 - .long 1072901816 - .long 1018491672 - .long 3164358120 - .long 2992903935 - .long 1072905224 - .long 2218154406 - .long 1016276769 - .long 1726216749 - .long 1072908642 - .long 2466808228 - .long 3162724981 - .long 1603444721 - .long 1072912069 - .long 1548633640 - .long 3163249902 - .long 2732492859 - .long 1072915505 - .long 2691479646 - .long 3163304260 - .long 926591435 - .long 1072918951 - .long 3208833762 - .long 3163962090 - .long 589198666 - .long 1072922406 - .long 2664346172 - .long 3164206538 - .long 1829099622 - .long 1072925870 - .long 1016661181 - .long 3164509581 - .long 460407023 - .long 1072929344 - .long 4237175092 - .long 3164187045 - .long 887463927 - .long 1072932827 - .long 3596744163 - .long 3161842742 - .long 3219942644 - .long 1072936319 - .long 3798990616 - .long 1016417382 - .long 3272845541 - .long 1072939821 - .long 928852419 - .long 3164536824 - .long 1156440435 - .long 1072943333 - .long 2351451249 - .long 1015015632 - .long 1276261410 - .long 1072946854 - .long 300981948 - .long 1015732745 - .long 3743175029 - .long 1072950384 - .long 2072812490 - .long 3163223651 - .long 78413852 - .long 1072953925 - .long 4183226867 - .long 3164065827 - .long 3278348324 - .long 1072957474 - .long 3069497416 - .long 1015799288 - .long 569847338 - .long 1072961034 - .long 472945272 - .long 3160339305 - .long 654919306 - .long 1072964603 - .long 3232961757 - .long 3164096045 - .long 3645941911 - .long 1072968181 - .long 3814685081 - .long 3162621917 - .long 1065662932 - .long 1072971770 - .long 2533670915 - .long 1015578814 - .long 1617004845 - .long 1072975368 - .long 82804944 - .long 1011391354 - .long 1118294578 - .long 1072978976 - .long 2197495694 - .long 3160957977 - .long 3978100823 - .long 1072982593 - .long 3513027190 - .long 1016894539 - .long 1720398391 - .long 1072986221 - .long 3980678963 - .long 3164348656 - .long 3049340112 - .long 1072989858 - .long 3062915824 - .long 1014219171 - .long 3784486610 - .long 1072993505 - .long 1581883040 - .long 3162747529 - .long 4040676318 - .long 1072997162 - .long 4090609238 - .long 1016712034 - .long 3933059031 - .long 1073000829 - .long 2133366768 - .long 3162580408 - .long 3577096743 - .long 1073004506 - .long 2951496418 - .long 1014842263 - .long 3088564500 - .long 1073008193 - .long 1762311517 - .long 1016094249 - .long 2583551245 - .long 1073011890 - .long 3161094195 - .long 1016655067 - .long 2178460671 - .long 1073015597 - .long 777878098 - .long 3163891069 - .long 1990012071 - .long 1073019314 - .long 3529070563 - .long 3163861769 - .long 2135241198 - .long 1073023041 - .long 1236747871 - .long 1014637723 - .long 2731501122 - .long 1073026778 - .long 1774031855 - .long 3163518597 - .long 3896463087 - .long 1073030525 - .long 1139797873 - .long 3162282381 - .long 1453150082 - .long 1073034283 - .long 498154669 - .long 3162536638 - .long 4109806887 - .long 1073038050 - .long 422403966 - .long 1015517805 - .long 3395129871 - .long 1073041828 - .long 4025345435 - .long 3163383964 - .long 3723038930 - .long 1073045616 - .long 378465264 - .long 3163618158 - .long 917841882 - .long 1073049415 - .long 18715565 - .long 1016707884 - .long 3689071823 - .long 1073053223 - .long 2321004996 - .long 3163601292 - .long 3566716925 - .long 1073057042 - .long 1536826856 - .long 1015191009 - .long 671025100 - .long 1073060872 - .long 3832014351 - .long 3164070606 - .long 3712504873 - .long 1073064711 - .long 88491949 - .long 1016476236 - .long 4222122499 - .long 1073068561 - .long 1277378074 - .long 3164305313 - .long 2321106615 - .long 1073072422 - .long 2171176610 - .long 1010584347 - .long 2425981843 - .long 1073076293 - .long 2830390851 - .long 3164395175 - .long 363667784 - .long 1073080175 - .long 813753950 - .long 1016833785 - .long 551349105 - .long 1073084067 - .long 3821916050 - .long 3163155165 - .long 3111574537 - .long 1073087969 - .long 2606161479 - .long 3163808322 - .long 3872257780 - .long 1073091882 - .long 1253592103 - .long 1017006910 - .long 2956612997 - .long 1073095806 - .long 2118169751 - .long 3163784129 - .long 488188413 - .long 1073099741 - .long 3199821029 - .long 1016612624 - .long 885834528 - .long 1073103686 - .long 1973258547 - .long 3163310140 - .long 4273770423 - .long 1073107641 - .long 3383180809 - .long 3164267477 - .long 2186617381 - .long 1073111608 - .long 2270764084 - .long 3164321289 - .long 3339203574 - .long 1073115585 - .long 1483497780 - .long 3163457330 - .long 3561793907 - .long 1073119573 - .long 1157054053 - .long 1012938926 - .long 2979960120 - .long 1073123572 - .long 2599109725 - .long 1015547069 - .long 1719614413 - .long 1073127582 - .long 330458198 - .long 3164331316 - .long 4201977662 - .long 1073131602 - .long 748330254 - .long 1014642933 - .long 1963711167 - .long 1073135634 - .long 1744767757 - .long 3161622870 - .long 3721688645 - .long 1073139676 - .long 3069276937 - .long 1016887977 - .long 1013258799 - .long 1073143730 - .long 1748797611 - .long 3161177658 - .long 2555984613 - .long 1073147794 - .long 2652555442 - .long 3163601268 - .long 4182873220 - .long 1073151869 - .long 629542646 - .long 3163044879 - .long 1727278727 - .long 1073155956 - .long 3562710623 - .long 1012520516 - .long 3907805044 - .long 1073160053 - .long 2257091225 - .long 3162598983 - .long 2263535754 - .long 1073164162 - .long 752233586 - .long 3163687584 - .long 1218806132 - .long 1073168282 - .long 1818613052 - .long 3163597017 - .long 903334909 - .long 1073172413 - .long 1636462108 - .long 1016088573 - .long 1447192521 - .long 1073176555 - .long 1462857171 - .long 3163563097 - .long 2980802057 - .long 1073180708 - .long 378619896 - .long 1016821879 - .long 1339972927 - .long 1073184873 - .long 167908909 - .long 1016620728 - .long 950803702 - .long 1073189049 - .long 1655364926 - .long 1016285608 - .long 1944781191 - .long 1073193236 - .long 3993278767 - .long 3162772855 - .long 158781403 - .long 1073197435 - .long 2221464712 - .long 3164335029 - .long 19972402 - .long 1073201645 - .long 3507899862 - .long 1017057868 - .long 1660913392 - .long 1073205866 - .long 4218599604 - .long 1016184283 - .long 919555682 - .long 1073210099 - .long 3121969534 - .long 1013996802 - .long 2224145553 - .long 1073214343 - .long 3482522030 - .long 3162537745 - .long 1413356050 - .long 1073218599 - .long 1651349291 - .long 3163716742 - .long 2916157145 - .long 1073222866 - .long 219487565 - .long 1016357943 - .long 2571947539 - .long 1073227145 - .long 3558159064 - .long 3164425245 - .long 515457527 - .long 1073231436 - .long 836709333 - .long 1016699802 - .long 1176749997 - .long 1073235738 - .long 2738998779 - .long 3163084420 - .long 396319521 - .long 1073240052 - .long 4172420816 - .long 3160123208 - .long 2604962541 - .long 1073244377 - .long 2614425274 - .long 3164587768 - .long 3643909174 - .long 1073248714 - .long 3537586109 - .long 1015403223 - .long 3649726105 - .long 1073253063 - .long 4085036346 - .long 1016698050 - .long 2759350287 - .long 1073257424 - .long 1148526634 - .long 1016943509 - .long 1110089947 - .long 1073261797 - .long 1451641639 - .long 1016523249 - .long 3134592888 - .long 1073266181 - .long 4232266862 - .long 1017039710 - .long 380978316 - .long 1073270578 - .long 854188970 - .long 3161511262 - .long 1577608921 - .long 1073274986 - .long 1875489510 - .long 3164016970 - .long 2568320822 - .long 1073279406 - .long 2732824428 - .long 1015401491 - .long 3492293770 - .long 1073283838 - .long 2248032210 - .long 1016435402 - .long 194117574 - .long 1073288283 - .long 777528612 - .long 3164460665 - .long 1403662306 - .long 1073292739 - .long 2788809599 - .long 3162719583 - .long 2966275557 - .long 1073297207 - .long 2176155324 - .long 3160891335 - .long 727685349 - .long 1073301688 - .long 2038246809 - .long 3163407318 - .long 3418903055 - .long 1073306180 - .long 2527457337 - .long 3161869180 - .long 2591453363 - .long 1073310685 - .long 2132396182 - .long 3160122774 - .long 2682146384 - .long 1073315202 - .long 2082178513 - .long 3164411995 - .long 3833209506 - .long 1073319731 - .long 2722920684 - .long 1014803418 - .long 1892288442 - .long 1073324273 - .long 2446255666 - .long 3163648957 - .long 1297350157 - .long 1073328827 - .long 1308022040 - .long 3164461134 - .long 2191782032 - .long 1073333393 - .long 2960257726 - .long 1014791238 - .long 424392917 - .long 1073337972 - .long 2749202995 - .long 3163887294 - .long 434316067 - .long 1073342563 - .long 2028358766 - .long 1014506698 - .long 2366108318 - .long 1073347166 - .long 2867985102 - .long 3162810830 - .long 2069751141 - .long 1073351782 - .long 1562170675 - .long 3163773257 - .long 3985553595 - .long 1073356410 - .long 4002146062 - .long 1016882712 - .long 3964284211 - .long 1073361051 - .long 2111583915 - .long 1016475740 - .long 2152073944 - .long 1073365705 - .long 1486860576 - .long 3164252032 - .long 2990417245 - .long 1073370371 - .long 3683467745 - .long 3164417902 - .long 2331271250 - .long 1073375050 - .long 812057446 - .long 1013256022 - .long 321958744 - .long 1073379742 - .long 3401933767 - .long 1016843134 - .long 1405169241 - .long 1073384446 - .long 2998539689 - .long 3163879527 - .long 1434058175 - .long 1073389163 - .long 251133233 - .long 1016134345 - .long 557149882 - .long 1073393893 - .long 3672720709 - .long 1015585841 - .long 3218338682 - .long 1073398635 - .long 3404164304 - .long 3163525684 - .long 977020788 - .long 1073403391 - .long 3065100517 - .long 1016590139 - .long 2572866477 - .long 1073408159 - .long 878562433 - .long 1016570317 - .long 3861050111 - .long 1073412940 - .long 254893773 - .long 3163861756 - .long 697153126 - .long 1073417735 - .long 1283515429 - .long 3164331765 - .long 1822067026 - .long 1073422542 - .long 1241994956 - .long 1016388866 - .long 3092190715 - .long 1073427362 - .long 814012168 - .long 3160571998 - .long 364333489 - .long 1073432196 - .long 3923737744 - .long 3162469949 - .long 2380618042 - .long 1073437042 - .long 3149557219 - .long 3164369375 - .long 703710506 - .long 1073441902 - .long 1384660846 - .long 1016244467 - .long 4076559943 - .long 1073446774 - .long 2119478331 - .long 3161806927 - .long 4062661092 - .long 1073451660 - .long 1422616006 - .long 3164303894 - .long 815859274 - .long 1073456560 - .long 240396590 - .long 3164536019 - .long 3080351519 - .long 1073461472 - .long 3379126789 - .long 3158266577 - .long 2420883922 - .long 1073466398 - .long 2049810052 - .long 1015168464 - .long 3287523847 - .long 1073471337 - .long 1625971539 - .long 3158058531 - .long 1540824585 - .long 1073476290 - .long 1064017011 - .long 3164536266 - .long 1631695677 - .long 1073481256 - .long 2717633076 - .long 3163392602 - .long 3716502172 - .long 1073486235 - .long 2303740125 - .long 1015091301 - .long 3657065772 - .long 1073491228 - .long 399025623 - .long 3164005654 - .long 1610600570 - .long 1073496235 - .long 3766732298 - .long 1016808759 - .long 2029714210 - .long 1073501255 - .long 613660079 - .long 1016147719 - .long 777507147 - .long 1073506289 - .long 4282924205 - .long 1016236109 - .long 2307442995 - .long 1073511336 - .long 3190117721 - .long 3163453115 - .long 2483480501 - .long 1073516397 - .long 1216371780 - .long 1014082748 - .long 1464976603 - .long 1073521472 - .long 3507292405 - .long 3163026110 - .long 3706687593 - .long 1073526560 - .long 3521726939 - .long 1014301643 - .long 778901109 - .long 1073531663 - .long 2248183954 - .long 3162317327 - .long 1432208378 - .long 1073536779 - .long 1401068914 - .long 3163412539 - .long 1532734324 - .long 1073541909 - .long 3094216535 - .long 3164211433 - .long 1242007932 - .long 1073547053 - .long 1132034716 - .long 3164388407 - .long 721996136 - .long 1073552211 - .long 563754734 - .long 1016419894 - .long 135105010 - .long 1073557383 - .long 1906148728 - .long 3164424315 - .long 3939148246 - .long 1073562568 - .long 3210352148 - .long 1016322899 - .long 3707479175 - .long 1073567768 - .long 3613079303 - .long 1015213314 - .long 3898795731 - .long 1073572982 - .long 1249994144 - .long 1012918394 - .long 382305176 - .long 1073578211 - .long 2347622376 - .long 3163627201 - .long 1912561781 - .long 1073583453 - .long 3147495102 - .long 1016726829 - .long 64696965 - .long 1073588710 - .long 1768797490 - .long 1016865536 - .long 3594158869 - .long 1073593980 - .long 2456521700 - .long 3164305137 - .long 4076975200 - .long 1073599265 - .long 2029000899 - .long 1016257111 - .long 1679558232 - .long 1073604565 - .long 2390342287 - .long 3164382546 - .long 863738719 - .long 1073609879 - .long 1326992220 - .long 3163661773 - .long 1796832535 - .long 1073615207 - .long 3176955716 - .long 3161634089 - .long 351641897 - .long 1073620550 - .long 2172261526 - .long 3164059175 - .long 991358482 - .long 1073625907 - .long 838715019 - .long 3164206244 - .long 3884662774 - .long 1073631278 - .long 2158611599 - .long 1015258761 - .long 610758006 - .long 1073636665 - .long 1965209397 - .long 3162914808 - .long 4224142467 - .long 1073642065 - .long 3389820386 - .long 1016255778 - .long 2009970496 - .long 1073647481 - .long 2159039665 - .long 3163621524 - .long 2728693978 - .long 1073652911 - .long 396109971 - .long 3164511267 - .long 2256325230 - .long 1073658356 - .long 580117746 - .long 1016365871 - .long 764307441 - .long 1073663816 - .long 3021057420 - .long 3164378099 - .long 2719515920 - .long 1073669290 - .long 2760332941 - .long 1016186509 - .long 3999357479 - .long 1073674779 - .long 2258941616 - .long 1016973300 - .long 481706282 - .long 1073680284 - .long 1696079173 - .long 3163759104 - .long 929806999 - .long 1073685803 - .long 3205336643 - .long 1016308133 - .long 1222472308 - .long 1073691337 - .long 1054357470 - .long 3162069594 - .long 1533953344 - .long 1073696886 - .long 769171851 - .long 1016714209 - .long 2038973688 - .long 1073702450 - .long 892941374 - .long 1017095035 - .long 2912730644 - .long 1073708029 - .long 3490067722 - .long 3164453650 - .long 35929225 - .long 1073713624 - .long 2809788041 - .long 3160485544 - .long 2174652632 - .long 1073719233 - .long 4087714590 - .long 1015498835 - .long 915592468 - .long 1073724858 - .long 352947894 - .long 3162072947 - .long 730821105 - .long 1073730498 - .long 2523232743 - .long 1013115764 - .long 1797923801 - .long 1073736153 - .long 1950547427 - .long 1014277635 - .long 3884607281 - .long 1062590591 - .long 3607404736 - .long 1068264200 - .long 1874480759 - .long 1065595563 - .long 4286760335 - .long 1070514109 - .long 4277811695 - .long 1072049730 - .long 0 - .long 0 - .long 4277811695 - .long 1072049730 - .long 4277811695 - .long 3219533378 - .long 4160749568 - .long 4294967295 - .long 4160749568 - .long 4294967295 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,12576 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/powf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/powf_wmt.S deleted file mode 100644 index fa55a81bba..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/powf_wmt.S +++ /dev/null @@ -1,986 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "powf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin powf - .text - .align 16,0x90 - .globl powf -powf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 48(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movss 116(%esp), %xmm1 - movl 112(%esp), %eax - movaps %xmm1, %xmm5 - movss %xmm1, 8(%esp) - movsd 1424(%ebx), %xmm1 - movsd 1440(%ebx), %xmm7 - movss %xmm0, 4(%esp) - psllq $29, %xmm0 - movapd 1312(%ebx), %xmm6 - cvtss2sd %xmm5, %xmm5 - movsd 528(%ebx), %xmm2 - orpd %xmm0, %xmm1 - movl $2130706431, %ecx - movl %eax, %edx - subl $8388608, %edx - cmpl %edx, %ecx - jb .L_2TAG_PACKET_0.0.3 - movl $0, %ecx - shrl $16, %eax -.L_2TAG_PACKET_1.0.3: -.L_2TAG_PACKET_2.0.3: - movl $127, %edx - andl %eax, %edx - addl $1, %edx - andl $254, %edx - movsd 528(%ebx,%edx,4), %xmm3 - movsd (%ebx,%edx,4), %xmm0 - addl $65, %eax - sarl $7, %eax - subl $127, %eax - cvtsi2sdl %eax, %xmm4 - andpd %xmm3, %xmm7 - subsd %xmm7, %xmm3 - mulsd %xmm1, %xmm7 - mulsd %xmm3, %xmm1 - movl %eax, %edx - sarl $31, %eax - addl %eax, %edx - xorl %edx, %eax - subsd %xmm2, %xmm7 - movapd 1328(%ebx), %xmm2 - addsd %xmm7, %xmm1 - movsd 1472(%ebx), %xmm3 - pshufd $68, %xmm1, %xmm7 - addsd %xmm1, %xmm0 - bsr %eax, %eax - mulpd %xmm7, %xmm6 - movzwl 10(%esp), %edx - mulpd %xmm7, %xmm7 - addsd %xmm4, %xmm0 - addpd %xmm2, %xmm6 - andl $32752, %edx - shrl $7, %edx - subl $97, %eax - addl %edx, %eax - cmpl $35, %eax - jae .L_2TAG_PACKET_3.0.3 - mulsd %xmm5, %xmm0 - mulsd %xmm7, %xmm7 - movapd %xmm0, %xmm4 - addsd %xmm3, %xmm0 - mulpd %xmm7, %xmm6 - movd %xmm0, %eax - subsd %xmm3, %xmm0 - pshufd $238, %xmm6, %xmm7 - subsd %xmm0, %xmm4 - addsd %xmm7, %xmm6 - movapd 1344(%ebx), %xmm7 - mulsd %xmm6, %xmm5 - movapd 1360(%ebx), %xmm2 - xorpd %xmm6, %xmm6 - addsd %xmm5, %xmm4 - pshufd $68, %xmm4, %xmm1 - movl %eax, %edx - sarl $1, %edx - andl $31, %eax - movsd 1056(%ebx,%eax,8), %xmm3 - orl $16368, %ecx - andl $-16, %edx - addl %edx, %ecx - pinsrw $3, %ecx, %xmm6 - mulpd %xmm1, %xmm7 - mulsd %xmm1, %xmm1 - mulsd %xmm3, %xmm4 - addpd %xmm7, %xmm2 - mulsd %xmm6, %xmm3 - mulsd %xmm6, %xmm4 - mulsd %xmm2, %xmm1 - pshufd $238, %xmm2, %xmm0 - addsd %xmm1, %xmm0 - mulsd %xmm4, %xmm0 - addsd %xmm0, %xmm3 - cvtpd2ps %xmm3, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_5.0.3: - movss 112(%esp), %xmm0 - movss 116(%esp), %xmm1 - mulss %xmm1, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_0.0.3: - cmpl $1065353216, 8(%esp) - je .L_2TAG_PACKET_5.0.3 - movsd 1392(%ebx), %xmm3 - movd %xmm5, %edx - movapd %xmm5, %xmm0 - movapd %xmm5, %xmm7 - andpd %xmm3, %xmm0 - psrlq $32, %xmm0 - movd %xmm0, %ecx - cmpl $2146435072, %ecx - jae .L_2TAG_PACKET_6.0.3 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_7.0.3 - movl 4(%esp), %edx - cmpl $2139095039, %edx - jbe .L_2TAG_PACKET_8.0.3 - psllq $52, %xmm3 - orpd %xmm3, %xmm7 - movl $1011, %ecx - movd %ecx, %xmm3 - psrlq $20, %xmm0 - psubd %xmm3, %xmm0 - pxor %xmm3, %xmm3 - pmaxsw %xmm3, %xmm0 - psllq %xmm0, %xmm7 - pcmpeqd %xmm3, %xmm7 - pmovmskb %xmm7, %ecx - andl $255, %ecx - andl $2147483647, %edx - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_9.0.3 - cmpl $255, %ecx - jne .L_2TAG_PACKET_10.0.3 - movsd 1392(%ebx), %xmm3 - movapd %xmm5, %xmm0 - movapd %xmm5, %xmm7 - andpd %xmm3, %xmm0 - movl $1012, %ecx - movd %ecx, %xmm3 - andpd 1392(%ebx), %xmm0 - psrlq $52, %xmm0 - psubd %xmm3, %xmm0 - movsd 1488(%ebx), %xmm3 - psllq %xmm0, %xmm7 - pcmpeqd %xmm3, %xmm7 - pmovmskb %xmm7, %ecx - andl $255, %ecx - addl $32513, %ecx - andl $32768, %ecx - movsd 1440(%ebx), %xmm7 - cmpl $8388608, %edx - jb .L_2TAG_PACKET_11.0.3 - movl 4(%esp), %eax - shrl $16, %eax - andl $32767, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_6.0.3: - movss 4(%esp), %xmm0 - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - ja .L_2TAG_PACKET_12.0.3 - jmp .L_2TAG_PACKET_13.0.3 -.L_2TAG_PACKET_12.0.3: - movss 4(%esp), %xmm0 - addss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_8.0.3: - movl $0, %ecx -.L_2TAG_PACKET_11.0.3: - xorpd %xmm0, %xmm0 - movl $24448, %edx - pinsrw $1, %edx, %xmm0 - movss 4(%esp), %xmm4 - movsd 1424(%ebx), %xmm1 - mulss %xmm0, %xmm4 - movd %xmm4, %edx - andl $2147483647, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_14.0.3 - pextrw $1, %xmm4, %eax - movaps %xmm4, %xmm0 - andps 1376(%ebx), %xmm4 - psllq $29, %xmm0 - orpd %xmm0, %xmm1 - andl $32767, %eax - subl $8192, %eax - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_15.0.3: - movl 8(%esp), %edx - andl $-2147483648, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_16.0.3 - movss 1536(%ebx), %xmm0 - xorps %xmm4, %xmm4 - divss %xmm4, %xmm0 - movl $33, %edx - jmp .L_2TAG_PACKET_17.0.3 -.L_2TAG_PACKET_14.0.3: - movl 8(%esp), %edx - andl $-2147483648, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_18.0.3 - shll $16, %ecx - movl 4(%esp), %edx - andl %ecx, %edx - orl $2139095040, %edx - movd %edx, %xmm0 - movss 1536(%ebx), %xmm1 - divss %xmm4, %xmm1 - movl $33, %edx - jmp .L_2TAG_PACKET_17.0.3 -.L_2TAG_PACKET_18.0.3: - shll $16, %ecx - movd %xmm4, %edx - andl %ecx, %edx - cmpl $0, %edx - jne .L_2TAG_PACKET_19.0.3 - fldz - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_9.0.3: - movl 4(%esp), %edx - cmpl $2139095040, %edx - je .L_2TAG_PACKET_20.0.3 - andl $2147483647, %edx - cmpl $2139095040, %edx - ja .L_2TAG_PACKET_12.0.3 - cmpl $255, %ecx - jne .L_2TAG_PACKET_21.0.3 - movapd %xmm5, %xmm1 - movapd %xmm5, %xmm2 - movl $1012, %ecx - movd %ecx, %xmm3 - andpd 1392(%ebx), %xmm1 - psrlq $52, %xmm1 - psubd %xmm3, %xmm1 - pxor %xmm3, %xmm3 - psllq %xmm1, %xmm2 - pcmpeqd %xmm3, %xmm2 - pmovmskb %xmm2, %eax - andl $255, %eax - cmpl $255, %eax - je .L_2TAG_PACKET_21.0.3 - pextrw $3, %xmm5, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_22.0.3 -.L_2TAG_PACKET_19.0.3: - flds 1552(%ebx) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_22.0.3: - flds 1520(%ebx) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_21.0.3: - pextrw $3, %xmm5, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_23.0.3 - fldz - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_20.0.3: - pextrw $3, %xmm5, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_23.0.3 - fldz - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_10.0.3: - cmpl $0, %edx - je .L_2TAG_PACKET_15.0.3 - movss 1568(%ebx), %xmm0 - mulss %xmm0, %xmm0 - movl $34, %edx - jmp .L_2TAG_PACKET_17.0.3 -.L_2TAG_PACKET_13.0.3: - movss 4(%esp), %xmm4 - movss 8(%esp), %xmm5 - movl 8(%esp), %eax - movl %eax, %ecx - andl $2147483647, %eax - cmpl $2139095040, %eax - ja .L_2TAG_PACKET_24.0.3 - andl $-2147483648, %ecx - movd %xmm4, %edx - movl $2147483647, %eax - andl %edx, %eax - je .L_2TAG_PACKET_14.0.3 - xorl $-1082130432, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_25.0.3 - cmpl $0, %ecx - je .L_2TAG_PACKET_26.0.3 - movd %xmm4, %eax - andl $2147483647, %eax - cmpl $1065353216, %eax - jae .L_2TAG_PACKET_16.0.3 - jmp .L_2TAG_PACKET_23.0.3 -.L_2TAG_PACKET_16.0.3: - fldz - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_25.0.3: - movss 116(%esp), %xmm1 - xorps %xmm0, %xmm0 - addss %xmm1, %xmm0 - fld1 - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_26.0.3: - pextrw $1, %xmm4, %eax - andl $32640, %eax - cmpl $16256, %eax - jae .L_2TAG_PACKET_23.0.3 - fldz - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_23.0.3: - flds 1504(%ebx) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_24.0.3: - movss 8(%esp), %xmm5 - addss %xmm5, %xmm5 - movss %xmm5, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_7.0.3: - movss 4(%esp), %xmm4 - movss 8(%esp), %xmm5 - movd %xmm4, %eax - movss 1536(%ebx), %xmm0 - movl $32, %edx - cmpl $0, %eax - je .L_2TAG_PACKET_17.0.3 - movd %xmm4, %eax - xorps %xmm2, %xmm2 - addss %xmm2, %xmm4 - movl $35, %edx - andl $2147483647, %eax - cmpl $2139095040, %eax - ja .L_2TAG_PACKET_17.0.3 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_27.0.3: - mulsd %xmm7, %xmm7 - mulpd %xmm7, %xmm6 - pshufd $238, %xmm6, %xmm7 - addsd %xmm7, %xmm0 - mulsd %xmm5, %xmm0 - movapd 1344(%ebx), %xmm7 - mulsd %xmm6, %xmm5 - movapd %xmm0, %xmm4 - addsd %xmm3, %xmm0 - movd %xmm0, %eax - subsd %xmm3, %xmm0 - subsd %xmm0, %xmm4 - movapd 1360(%ebx), %xmm2 - xorpd %xmm6, %xmm6 - addsd %xmm5, %xmm4 - pshufd $68, %xmm4, %xmm1 - movl %eax, %edx - sarl $1, %edx - andl $31, %eax - movsd 1056(%ebx,%eax,8), %xmm3 - orl $16368, %ecx - andl $-16, %edx - addl %edx, %ecx - pinsrw $3, %ecx, %xmm6 - mulpd %xmm1, %xmm7 - mulsd %xmm1, %xmm1 - mulsd %xmm3, %xmm4 - addpd %xmm7, %xmm2 - mulsd %xmm6, %xmm3 - mulsd %xmm6, %xmm4 - mulsd %xmm2, %xmm1 - pshufd $238, %xmm2, %xmm0 - addsd %xmm1, %xmm0 - mulsd %xmm4, %xmm0 - addsd %xmm3, %xmm0 - cvtpd2ps %xmm0, %xmm0 - pextrw $1, %xmm0, %eax - andl $32767, %eax - movl $30, %edx - cmpl $32640, %eax - jae .L_2TAG_PACKET_17.0.3 - movl $31, %edx - cmpl $16, %eax - jb .L_2TAG_PACKET_17.0.3 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_28.0.3: - movl $30, %edx - orl $32639, %ecx - xorpd %xmm0, %xmm0 - pinsrw $1, %ecx, %xmm0 - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_17.0.3 -.L_2TAG_PACKET_29.0.3: - movl $31, %edx - movl $8388608, %eax - movd %eax, %xmm1 - mulss %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - pinsrw $1, %ecx, %xmm0 -.L_2TAG_PACKET_17.0.3: - movss %xmm0, (%esp) - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 116(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_3.0.3: - movl 4(%esp), %edx - cmpl $1065353216, %edx - je .L_2TAG_PACKET_25.0.3 - movl 8(%esp), %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_13.0.3 - cmpl $0, %edx - je .L_2TAG_PACKET_7.0.3 - cmpl $0, %eax - jl .L_2TAG_PACKET_30.0.3 - cmpl $38, %eax - jb .L_2TAG_PACKET_27.0.3 - movl 4(%esp), %edx - andl $2139095040, %edx - subl $1056964608, %edx - cmpl $8388608, %edx - jbe .L_2TAG_PACKET_31.0.3 -.L_2TAG_PACKET_32.0.3: - movl 4(%esp), %eax - movl 8(%esp), %edx - andl $2139095040, %eax - subl $1065353216, %eax - xorl %edx, %eax - andl $-2147483648, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_28.0.3 - jmp .L_2TAG_PACKET_29.0.3 -.L_2TAG_PACKET_31.0.3: - movss 4(%esp), %xmm4 - movl $1065353216, %eax - movd %eax, %xmm2 - pslld $1, %xmm4 - psrld $1, %xmm4 - subss %xmm4, %xmm2 - movd %xmm2, %edx - andl $2139095040, %edx - je .L_2TAG_PACKET_30.0.3 - movapd %xmm5, %xmm4 - mulsd %xmm0, %xmm4 - pextrw $3, %xmm4, %eax - andl $32752, %eax - cmpl $16496, %eax - jb .L_2TAG_PACKET_27.0.3 - jmp .L_2TAG_PACKET_32.0.3 -.L_2TAG_PACKET_30.0.3: - shll $16, %ecx - orl $1065353216, %ecx - movd %ecx, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_4.0.3: - movl 48(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type powf,@function - .size powf,.-powf - .data -# -- End powf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 2244132864 - .long 1066854294 - .long 1972305920 - .long 1067891411 - .long 2678235136 - .long 1068559160 - .long 4207480832 - .long 1068917750 - .long 1085124608 - .long 1069271106 - .long 2363127808 - .long 1069583448 - .long 3799560192 - .long 1069755113 - .long 972806144 - .long 1069924378 - .long 3492741120 - .long 1070091307 - .long 766832640 - .long 1070255966 - .long 1278367744 - .long 1070418414 - .long 3103942656 - .long 1070578710 - .long 3671264256 - .long 1070666503 - .long 2869823488 - .long 1070744583 - .long 3466906624 - .long 1070821668 - .long 1271733248 - .long 1070897784 - .long 972806144 - .long 1070972954 - .long 3449621504 - .long 1071047201 - .long 1662393344 - .long 1071120549 - .long 2300516352 - .long 1071193018 - .long 176119808 - .long 1071264630 - .long 4147676160 - .long 1071335403 - .long 2905168896 - .long 1071405359 - .long 3761433600 - .long 1071474515 - .long 2716292096 - .long 1071542890 - .long 1758136320 - .long 1071610501 - .long 2341968384 - .long 1071661018 - .long 14039552 - .long 1071694085 - .long 4204914176 - .long 1071726793 - .long 513134592 - .long 1071759153 - .long 3559335936 - .long 1071791169 - .long 1904282624 - .long 3218771961 - .long 714524672 - .long 3218709255 - .long 180337664 - .long 3218647192 - .long 47131648 - .long 3218585759 - .long 1751500800 - .long 3218524943 - .long 4058951680 - .long 3218464732 - .long 2999895040 - .long 3218405115 - .long 398715904 - .long 3218346080 - .long 3815829504 - .long 3218287614 - .long 722717696 - .long 3218229709 - .long 1399058432 - .long 3218172352 - .long 227933184 - .long 3218115534 - .long 2835759104 - .long 3218038744 - .long 3554951168 - .long 3217927202 - .long 2818570240 - .long 3217816679 - .long 3041732608 - .long 3217707156 - .long 180338688 - .long 3217598616 - .long 835166208 - .long 3217491040 - .long 704622592 - .long 3217384412 - .long 1695342592 - .long 3217278715 - .long 3266000896 - .long 3217173933 - .long 2363885568 - .long 3217070051 - .long 3908239360 - .long 3216902938 - .long 448159744 - .long 3216698681 - .long 2530197504 - .long 3216496132 - .long 4268273664 - .long 3216295264 - .long 2785038336 - .long 3216096050 - .long 522182656 - .long 3215814333 - .long 3386466304 - .long 3215422356 - .long 3838140416 - .long 3215033528 - .long 2250194944 - .long 3214361582 - .long 2718924800 - .long 3213307003 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1697350398 - .long 1073157447 - .long 3983912013 - .long 1073134173 - .long 3077571303 - .long 1073111605 - .long 787997771 - .long 1073089711 - .long 2608086797 - .long 1073068460 - .long 4250927815 - .long 1073047825 - .long 4006130247 - .long 1073027780 - .long 2255915958 - .long 1073008300 - .long 1031537321 - .long 1072989361 - .long 3606154084 - .long 1072970940 - .long 1235818328 - .long 1072953018 - .long 2880061438 - .long 1072935573 - .long 525144062 - .long 1072918588 - .long 3251485016 - .long 1072902043 - .long 2604098795 - .long 1072885923 - .long 2408035495 - .long 1072870211 - .long 1357880318 - .long 1072854892 - .long 1394140652 - .long 1072839951 - .long 3210356685 - .long 1072825374 - .long 1774519652 - .long 1072811149 - .long 3338441873 - .long 1072797262 - .long 3804456356 - .long 1072783702 - .long 1462910403 - .long 1072770458 - .long 1149890700 - .long 1072757518 - .long 1234436653 - .long 1072744872 - .long 2089211650 - .long 1072732510 - .long 1684223316 - .long 1072720423 - .long 4072784951 - .long 1072708601 - .long 2114454037 - .long 1072697037 - .long 2012861074 - .long 1072678195 - .long 2037138800 - .long 1072656045 - .long 3417210877 - .long 1072634361 - .long 3694789629 - .long 1072613129 - .long 2992528814 - .long 1072592335 - .long 3882342941 - .long 1072571965 - .long 2671772639 - .long 1072552007 - .long 2172608510 - .long 1072532448 - .long 3001586108 - .long 1072513276 - .long 3477449063 - .long 1072494480 - .long 3818975826 - .long 1072476049 - .long 1758664544 - .long 1072457973 - .long 1046539701 - .long 1072440241 - .long 2778964739 - .long 1072422843 - .long 1026978211 - .long 1072405771 - .long 4238694625 - .long 1072389014 - .long 811117725 - .long 1072372566 - .long 1975098645 - .long 1072356416 - .long 3079413536 - .long 1072340557 - .long 712695513 - .long 1072324982 - .long 1238508315 - .long 1072309682 - .long 3563503614 - .long 1072294650 - .long 3383126459 - .long 1072279880 - .long 1724836050 - .long 1072265365 - .long 608820196 - .long 1072251098 - .long 3005930546 - .long 1072237072 - .long 4207804139 - .long 1072223282 - .long 378851326 - .long 1072209723 - .long 1405092650 - .long 1072196387 - .long 795096448 - .long 1072183270 - .long 1417164049 - .long 1072170366 - .long 2583387630 - .long 1072157670 - .long 20099889 - .long 1072145178 - .long 3019600065 - .long 1072132883 - .long 53601996 - .long 1072120783 - .long 1697350398 - .long 1072108871 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 3541402996 - .long 1072716208 - .long 1828292879 - .long 1072739672 - .long 3490863953 - .long 1072763649 - .long 1014845819 - .long 1072788152 - .long 828946858 - .long 1072813191 - .long 1853186616 - .long 1072838778 - .long 4112506593 - .long 1072864925 - .long 171030293 - .long 1072891646 - .long 926591435 - .long 1072918951 - .long 1276261410 - .long 1072946854 - .long 1617004845 - .long 1072975368 - .long 3577096743 - .long 1073004506 - .long 1453150082 - .long 1073034283 - .long 3712504873 - .long 1073064711 - .long 2956612997 - .long 1073095806 - .long 1719614413 - .long 1073127582 - .long 3907805044 - .long 1073160053 - .long 1944781191 - .long 1073193236 - .long 2571947539 - .long 1073227145 - .long 1110089947 - .long 1073261797 - .long 2966275557 - .long 1073297207 - .long 2191782032 - .long 1073333393 - .long 2990417245 - .long 1073370371 - .long 2572866477 - .long 1073408159 - .long 4076559943 - .long 1073446774 - .long 3716502172 - .long 1073486235 - .long 3706687593 - .long 1073526560 - .long 3707479175 - .long 1073567768 - .long 863738719 - .long 1073609879 - .long 2728693978 - .long 1073652911 - .long 1533953344 - .long 1073696886 - .long 531389993 - .long 1067950900 - .long 4289495988 - .long 1069842387 - .long 2705553552 - .long 3216330822 - .long 4277811695 - .long 3218484802 - .long 1874480759 - .long 1065595563 - .long 4286760334 - .long 1070514109 - .long 3607404735 - .long 1068264200 - .long 4277811695 - .long 1072049730 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 1048575 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 4227858432 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 1077936128 - .long 0 - .long 0 - .long 0 - .long 1122500608 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 2139095040 - .long 0 - .long 0 - .long 0 - .long 4286578688 - .long 0 - .long 0 - .long 0 - .long 1065353216 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 2139095041 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,1584 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/powl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/powl.S deleted file mode 100644 index ff72d76753..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/powl.S +++ /dev/null @@ -1,2423 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "powl.c" - .text -..TXTST0: -# -- Begin powl - .text - .align 16,0x90 - .globl powl -powl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $148, %esp -..B1.2: - fnstcw 70(%esp) -..B1.3: - movzbl 17(%ebp), %ecx - shrl $7, %ecx - movzwl 16(%ebp), %eax - shll $15, %ecx - andl $32767, %eax - orl %eax, %ecx - movl 12(%ebp), %ebx - shll $16, %ecx - shrl $16, %ebx - movl %eax, 44(%esp) - orl %ebx, %ecx - movzbl 29(%ebp), %eax - movl %ecx, %edi - shrl $7, %eax - movl %ecx, %edx - movzwl 28(%ebp), %esi - andl $2147483647, %edx - shll $15, %eax - andl $32767, %esi - movl 24(%ebp), %ebx - orl %esi, %eax - shrl $31, %edi - cmpl $1073709056, %edx - movl %edi, 28(%esp) - movl %ebx, %edi - movl %edx, 12(%esp) - movl $0, %edx - movl %esi, 48(%esp) - setb %dl - shll $16, %eax - shrl $16, %edi - orl %edi, %eax - movl %eax, %esi - andl $2147483647, %eax - shrl $31, %esi - xorl %esi, %edx - movl %edx, 124(%esp) - movl %eax, %edx - movl 8(%ebp), %edi - orl %ebx, %edx - movl %edi, 32(%esp) - movl 20(%ebp), %edi - orl %edi, %edx - movl %esi, 56(%esp) - movl %edx, 40(%esp) - movl %ebx, 60(%esp) - movl %edi, 36(%esp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl 12(%ebp), %edx - movl 12(%esp), %esi - je ..B1.5 -..B1.4: - addl $-1073709056, %ecx - lea -2147483648(%edx), %edi - orl %edi, %ecx - movl %edi, 24(%esp) - orl 32(%esp), %ecx - jne ..B1.10 -..B1.5: - cmpl $2147450880, %eax - jae ..B1.8 -..B1.6: - cmpl $2147450880, %esi - jb ..B1.9 -..B1.7: - addl $-2147483648, %edx - orl 32(%esp), %edx - je ..B1.9 -..B1.8: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt 136(%esp) -..B1.9: - fldl _ones@GOTOFF(%ebx) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.10: - lea -1073709056(%eax), %ecx - movl %ecx, 20(%esp) - cmpl $4194304, %ecx - jae ..B1.17 -..B1.11: - movl %eax, %ecx - shrl $16, %ecx - movl %ecx, 52(%esp) - cmpl $1075806208, %eax - ja ..B1.13 -..B1.12: - movl %ebx, 12(%esp) - movl %ecx, %ebx - movl %ebx, %ecx - negl %ecx - addl $30, %ecx - movl 60(%esp), %edi - shrl %cl, %edi - lea 2(%ebx), %ecx - movl %edi, 16(%esp) - movl 60(%esp), %edi - shll %cl, %edi - movl 36(%esp), %ebx - orl %ebx, %edi - cmpl $1075740672, %eax - jbe ..L3 - movl %ebx, %edi -..L3: - movl 12(%esp), %ebx - movl %edi, 40(%esp) - jmp ..B1.14 -..B1.13: - movl %ebx, 12(%esp) - movl %ecx, %ebx - movl %ebx, %ecx - negl %ecx - addl $30, %ecx - movl 36(%esp), %edi - shrl %cl, %edi - lea 2(%ebx), %ecx - movl 36(%esp), %ebx - shll %cl, %ebx - cmpl $1077837824, %eax - movl %edi, 16(%esp) - jb ..L4 - movl $0, %ebx -..L4: - movl %ebx, 40(%esp) - movl 12(%esp), %ebx -..B1.14: - testb $1, 16(%esp) - je ..B1.16 -..B1.15: - movl 28(%esp), %ecx - movl %ecx, 108(%esp) - movl $1, 12(%esp) - jmp ..B1.18 -..B1.16: - xorl %ecx, %ecx - movl %ecx, 12(%esp) - movl %ecx, 108(%esp) - jmp ..B1.18 -..B1.17: - cmpl $1073709056, %eax - movl 40(%esp), %edi - jb ..L5 - movl $0, %edi -..L5: - xorl %ecx, %ecx - movl %ecx, 12(%esp) - movl %ecx, 108(%esp) - movl %edi, 40(%esp) -..B1.18: - cmpl $32767, 44(%esp) - je ..B1.189 -..B1.19: - cmpl $32767, 48(%esp) - je ..B1.156 -..B1.20: - movl %edx, %ecx - andl $2147483647, %ecx - orl 32(%esp), %ecx - jne ..B1.26 -..B1.21: - movl %edx, %ecx - orl %esi, %ecx - jne ..B1.26 -..B1.22: - xorl %edx, %edx - cmpl $0, 40(%esp) - sete %dl - andl %edx, 108(%esp) - cmpl $0, 56(%esp) - jne ..B1.193 -..B1.23: - cmpl $65536, %eax - jae ..B1.25 -..B1.24: - fldl _smallest_value_64@GOTOFF(%ebx) - fstpl 128(%esp) -..B1.25: - movl 108(%esp), %eax - fldl _zeros@GOTOFF(%ebx,%eax,8) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - cmpl $0, 28(%esp) - je ..B1.31 -..B1.27: - cmpl $1077837824, %eax - jae ..B1.29 -..B1.28: - cmpl $0, 40(%esp) - jne ..B1.192 -..B1.29: - lea -1073709056(%esi), %ecx - orl 24(%esp), %ecx - orl 32(%esp), %ecx - jne ..B1.31 -..B1.30: - movl 12(%esp), %eax - fldl _ones@GOTOFF(%ebx,%eax,8) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - lea -65536(%esi), %edi - lea -65536(%eax), %ecx - orl %ecx, %edi - testl $-2147483648, %edi - je ..B1.33 -..B1.32: - fldl _smallest_value_64@GOTOFF(%ebx) - fstpl 128(%esp) -..B1.33: - movl 60(%esp), %ecx - andl $2147483647, %ecx - orl 36(%esp), %ecx - jne ..B1.61 -..B1.34: - cmpl $1073709056, %eax - jne ..B1.43 -..B1.35: - cmpl $0, 56(%esp) - je ..B1.42 -..B1.36: - movzwl 70(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.141 -..B1.37: - orl $-64768, %edx - movw %dx, 68(%esp) -..B1.38: - fldcw 68(%esp) -..B1.39: - fldt 8(%ebp) - fdivrl _ones@GOTOFF(%ebx) - fstpt 24(%esp) -..B1.40: - fldcw 70(%esp) -..B1.41: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.42: - fldt 8(%ebp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.43: - cmpl $1073643520, %eax - jne ..B1.61 -..B1.44: - movzwl 70(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.142 -..B1.45: - orl $-64768, %edx - movw %dx, 68(%esp) -..B1.46: - fldcw 68(%esp) -..B1.47: - movl $1, %esi -..B1.48: - cmpl $0, 56(%esp) - je ..B1.56 -..B1.49: - fldl _ones@GOTOFF(%ebx) - movzbl 17(%ebp), %edi - fld %st(0) - shrl $7, %edi - movzwl 16(%ebp), %eax - shll $15, %edi - andl $32767, %eax - orl %eax, %edi - shll $16, %edi - movzwl 14(%ebp), %edx - orl %edx, %edi - lea -536838144(%edi), %ecx - cmpl $1073741824, %ecx - jbe ..B1.53 -..B1.50: - fstp %st(0) - cmpl $536838144, %edi - jae ..B1.52 -..B1.51: - fldt 8(%ebp) - fldt _invsqrtl_scales@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 12+_invsqrtl_scales@GOTOFF(%ebx) - fldt 8(%ebp) - fxch %st(2) - fxch %st(1) - fxch %st(2) - jmp ..B1.54 -..B1.52: - fldt 8(%ebp) - fldt 24+_invsqrtl_scales@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 36+_invsqrtl_scales@GOTOFF(%ebx) - fldt 8(%ebp) - fxch %st(2) - fxch %st(1) - fxch %st(2) - jmp ..B1.54 -..B1.53: - fldt 8(%ebp) - fld %st(0) -..B1.54: - fldl _TWO_43H@GOTOFF(%ebx) - fld %st(2) - fmul %st(1), %st - fxch %st(3) - fdivr %st, %st(5) - fxch %st(5) - fstpt 12(%esp) - fxch %st(2) - fadd %st, %st(4) - fxch %st(4) - fstpt (%esp) - fldt (%esp) - addl $-16, %esp - fsubp %st, %st(4) - fsub %st(3), %st - lea 28(%esp), %eax - movl %eax, (%esp) - fstpt 28(%eax) - fstpt 12(%eax) - fxch %st(1) - fstpt 44(%eax) - fstpt 60(%eax) - call __sqrtl -..B1.196: - fldt 88(%esp) - fldt 72(%esp) - fldt 56(%esp) - fldt 40(%esp) - addl $16, %esp -..B1.55: - fmul %st(4), %st - fld %st(4) - fadd %st(1), %st - fstpt (%esp) - fld %st(4) - fxch %st(2) - fmul %st(5), %st - fxch %st(5) - fstpt 12(%esp) - fldt 12(%esp) - fldt (%esp) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fld %st(3) - fmul %st(3), %st - faddp %st, %st(6) - fxch %st(1) - fmul %st, %st(5) - fld %st(2) - fxch %st(2) - fmul %st, %st(4) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(6) - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - faddl 8+_ones@GOTOFF(%ebx) - faddp %st, %st(5) - fmulp %st, %st(4) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fmulp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 24(%esp) - jmp ..B1.58 -..B1.56: - addl $-16, %esp - lea 8(%ebp), %eax - movl %eax, (%esp) - call __sqrtl -..B1.197: - addl $16, %esp -..B1.57: - fstpt 24(%esp) -..B1.58: - testl %esi, %esi - je ..B1.60 -..B1.59: - fldcw 70(%esp) -..B1.60: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.61: - movzwl 70(%esp), %edi - movl %edi, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.155 -..B1.62: - orl $-64768, %edi - movw %di, 68(%esp) -..B1.63: - fldcw 68(%esp) -..B1.64: - movl $1, 36(%esp) -..B1.65: - fldt 8(%ebp) - movl 28(%esp), %ecx - cmpl $0, 40(%esp) - fmull _ones@GOTOFF(%ebx,%ecx,8) - fstpt 8(%ebp) - fldt 8(%ebp) - jne ..B1.92 -..B1.66: - cmpl $1048576, 20(%esp) - jae ..B1.92 -..B1.67: - movl %eax, %ecx - shrl $16, %ecx - negl %ecx - addl $30, %ecx - movl 60(%esp), %edi - shrl %cl, %edi - cmpl $46, %edi - movl %edi, 60(%esp) - lea -2(%edi), %ecx - movl 32(%esp), %edi - jb ..L6 - movl $46, %ecx -..L6: - andl 4+_exact_masks@GOTOFF(%ebx,%ecx,8), %edx - andl _exact_masks@GOTOFF(%ebx,%ecx,8), %edi - movl %ecx, 52(%esp) - orl %edi, %edx - jne ..B1.92 -..B1.68: - movl 108(%esp), %eax - cmpl $65535, %esi - fldl _ones@GOTOFF(%ebx,%eax,8) - ja ..B1.70 -..B1.69: - fldl _TWO_75@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 40(%esp) - movzwl 48(%esp), %ecx - movl %ecx, %edx - andl $32767, %edx - addl $-16458, %edx - jmp ..B1.71 -..B1.70: - movzwl 16(%ebp), %edx - fxch %st(1) - fstpt 40(%esp) - andl $32767, %edx - movzwl 48(%esp), %ecx - addl $-16383, %edx -..B1.71: - movl 56(%esp), %eax - andl $-32768, %ecx - orl $-49153, %ecx - movw %cx, 48(%esp) - movl iones@GOTOFF(%ebx,%eax,4), %eax - imull 60(%esp), %eax - imull %edx, %eax - lea 16445(%eax), %ecx - cmpl $32829, %ecx - lea 16383(%eax), %edx - jb ..B1.78 -..B1.72: - movl 108(%esp), %ecx - cmpl $-63, %edx - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %eax - jg ..B1.74 -..B1.73: - fldt _small_value_80@GOTOFF(%eax,%ebx) - fldt _small_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) - jmp ..B1.75 -..B1.74: - fldt _large_value_80@GOTOFF(%eax,%ebx) - fldt _large_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) -..B1.75: - fstpt 24(%esp) - cmpl $0, 36(%esp) - je ..B1.200 -..B1.76: - fstpt 12(%esp) -..B1.198: - fldcw 70(%esp) - jmp ..B1.77 -..B1.200: - fstp %st(0) -..B1.77: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.78: - fstpt 12(%esp) - testl %edx, %edx - jg ..B1.80 -..B1.79: - addl $16458, %eax - movzwl 20(%esp), %edx - andl $32767, %eax - andl $-32768, %edx - orl %eax, %edx - movw %dx, 20(%esp) - fldt 12(%esp) - fmull 8+_TWO_75@GOTOFF(%ebx) - fstpt 12(%esp) - jmp ..B1.81 -..B1.80: - movzwl 20(%esp), %eax - andl $32767, %edx - andl $-32768, %eax - orl %edx, %eax - movw %ax, 20(%esp) -..B1.81: - cmpl $-2147483648, 44(%esp) - jne ..B1.87 -..B1.82: - cmpl $0, 40(%esp) - jne ..B1.87 -..B1.83: - fldt 12(%esp) - fstpt 24(%esp) -..B1.84: - cmpl $0, 36(%esp) - je ..B1.86 -..B1.85: - fldcw 70(%esp) -..B1.86: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.87: - fldt 40(%esp) - fstpt 24(%esp) - fldt 24(%esp) - fstpt 96(%esp) - fldt 96(%esp) - fldl _ones@GOTOFF(%ebx) - movl $0, 24(%esp) - fstpt 72(%esp) - fldt 72(%esp) - fldt 24(%esp) - movl 60(%esp), %eax - fsubr %st, %st(2) - fldt 72(%esp) - fldl _zeros@GOTOFF(%ebx) - jmp ..B1.88 -..B1.91: - fld %st(2) - fadd %st(5), %st - fld %st(3) - fmul %st(6), %st - fxch %st(4) - fmul %st(0), %st - fstpt 24(%esp) - fldt 24(%esp) - fxch %st(1) - fmulp %st, %st(6) - movl $0, 24(%esp) - fxch %st(5) - faddp %st, %st(3) - fxch %st(4) - fstpt 96(%esp) - fldt 96(%esp) - fldt 24(%esp) - fsubr %st, %st(1) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(3) - fxch %st(2) - fxch %st(4) -..B1.88: - testb $1, %al - je ..B1.90 -..B1.89: - fld %st(4) - fadd %st(3), %st - fmulp %st, %st(1) - fld %st(4) - fmul %st(2), %st - faddp %st, %st(1) - fxch %st(1) - fmul %st(2), %st - fstpt 72(%esp) - fldt 72(%esp) - fstpt 96(%esp) - fldt 96(%esp) - movl $0, 72(%esp) - fldt 72(%esp) - fsubr %st, %st(1) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) - fxch %st(1) -..B1.90: - shrl $1, %eax - testl %eax, %eax - je ..B1.143 - jmp ..B1.91 -..B1.92: - lea -1073676224(%esi), %edx - cmpl $32864, %edx - jae ..B1.94 -..B1.93: - fldl 8+_ones@GOTOFF(%ebx) - movl $1, %ecx - faddp %st, %st(1) - fld %st(0) - fld %st(1) - fxch %st(2) - fstpt 40(%esp) - fldt 40(%esp) - fldl _TWO_32H@GOTOFF(%ebx) - fstpt 112(%esp) - fldt 112(%esp) - fmul %st(1), %st - fadd %st, %st(2) - fxch %st(2) - fstpt 84(%esp) - fldt 84(%esp) - fsubp %st, %st(2) - fxch %st(1) - fstpt 24(%esp) - fldt 24(%esp) - fsubr %st, %st(2) - fxch %st(1) - fxch %st(2) - fxch %st(1) - jmp ..B1.98 -..B1.94: - cmpl $65535, %esi - ja ..B1.96 -..B1.95: - fmull _TWO_75@GOTOFF(%ebx) - fstpt 40(%esp) - movzwl 48(%esp), %ecx - movl %ecx, %edx - andl $32767, %edx - addl $-16458, %edx - movl %edx, 52(%esp) - jmp ..B1.97 -..B1.96: - movzwl 16(%ebp), %edx - andl $32767, %edx - fstpt 40(%esp) - addl $-16383, %edx - movl %edx, 52(%esp) - movzwl 48(%esp), %ecx -..B1.97: - fldl _TWO_32H@GOTOFF(%ebx) - andl $-32768, %ecx - orl $-49153, %ecx - movw %cx, 48(%esp) - xorl %ecx, %ecx - movl 44(%esp), %edx - shrl $23, %edx - movzbl %dl, %edx - fstpt 112(%esp) - fldt 112(%esp) - fldt 40(%esp) - fld %st(0) - fmul %st(2), %st - fld %st(1) - fadd %st(1), %st - fstpt 84(%esp) - fldt 84(%esp) - fsubp %st, %st(1) - fsubr %st, %st(1) - flds __libm_rcp_table_256@GOTOFF(%ebx,%edx,4) - fmul %st, %st(1) - fstpt 56(%esp) - fldt 56(%esp) - fmulp %st, %st(2) - faddl 8+_ones@GOTOFF(%ebx) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fstpt 84(%esp) - fstpt 40(%esp) - fldt 40(%esp) - fldt 84(%esp) - fsubp %st, %st(4) - fxch %st(3) - fstpt 24(%esp) - fldt 24(%esp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) -..B1.98: - fldt 112(%esp) - testl %ecx, %ecx - fld %st(0) - fxch %st(2) - fadd %st, %st(4) - fxch %st(3) - fmul %st, %st(4) - fxch %st(3) - fmul %st(0), %st - fld %st(0) - fadd %st(5), %st - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fstpt 84(%esp) - fldt 84(%esp) - fsubp %st, %st(4) - fxch %st(1) - fsub %st(3), %st - faddp %st, %st(5) - fldt 96+_LP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 84+_LP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 72+_LP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_LP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_LP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_LP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_LP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_LP@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 40(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(0) - fmul %st(3), %st - fld %st(1) - fadd %st(1), %st - fstpt 84(%esp) - fldt 84(%esp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(7), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - fmul %st(3), %st - fldt _LP@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(4) - fstpt 96(%esp) - fldt 96(%esp) - fadd %st(1), %st - fstpt 72(%esp) - fldt 72(%esp) - fxch %st(4) - fmulp %st, %st(6) - fxch %st(1) - faddp %st, %st(5) - fldt 96(%esp) - fsub %st(3), %st - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(1) - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 24(%esp) - fstpt 96(%esp) - fldt 96(%esp) - fadd %st(1), %st - fstpt 24(%esp) - fldt 24(%esp) - fldt 96(%esp) - fsub %st(1), %st - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) - je ..B1.100 -..B1.99: - fstpt 40(%esp) - fldt 40(%esp) - jmp ..B1.101 -..B1.100: - fstp %st(0) - fldt 12+_LLN2@GOTOFF(%ebx) - movl %edx, %ecx - fldt _LLN2@GOTOFF(%ebx) - shll $4, %ecx - fldl 8+__libm_logl_table_256@GOTOFF(%ecx,%ebx) - fldl __libm_logl_table_256@GOTOFF(%ecx,%ebx) - fxch %st(1) - fadds _LT2@GOTOFF(%ebx,%edx,4) - movl 52(%esp), %edx - movl %edx, 16(%esp) - fildl 16(%esp) - fmul %st, %st(3) - fxch %st(3) - fstpt 96(%esp) - fldt 96(%esp) - fadd %st(2), %st - fxch %st(3) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt 96(%esp) - fsub %st(2), %st - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(1) - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fldt 24(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpt 40(%esp) - fldt 40(%esp) - fldt 96(%esp) - fsub %st(1), %st - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) -..B1.101: - fld %st(0) - fadd %st(2), %st - fstpt 56(%esp) - fldt 56(%esp) - movzwl 64(%esp), %ecx - shll $16, %ecx - movzwl 62(%esp), %edx - orl %edx, %ecx - andl $2147483647, %ecx - lea (%eax,%ecx), %edx - lea -1610514432(%ecx,%eax), %eax - cmpl $538050560, %eax - jbe ..B1.113 -..B1.102: - cmpl $-2146402304, %edx - jbe ..B1.109 -..B1.103: - fstp %st(0) - fstp %st(2) - fstp %st(0) - fstp %st(0) - movl 108(%esp), %edx - cmpl $0, 124(%esp) - lea (,%edx,8), %eax - lea (%eax,%edx,4), %eax - je ..B1.105 -..B1.104: - fldt _small_value_80@GOTOFF(%eax,%ebx) - fldt _small_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) - jmp ..B1.106 -..B1.105: - fldt _large_value_80@GOTOFF(%eax,%ebx) - fldt _large_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) -..B1.106: - fstpt 24(%esp) - cmpl $0, 36(%esp) - je ..B1.108 -..B1.107: - fldcw 70(%esp) -..B1.108: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.109: - cmpl $1610514432, %edx - jae ..B1.113 -..B1.110: - fstp %st(0) - fstp %st(2) - fstp %st(0) - fstp %st(0) - movl 108(%esp), %ecx - movl 124(%esp), %eax - xorl %ecx, %eax - cmpl $0, 36(%esp) - lea (,%eax,8), %esi - lea (%esi,%eax,4), %edx - fldt _small_value_80@GOTOFF(%ebx,%edx) - faddl _ones@GOTOFF(%ebx,%ecx,8) - fstpt 24(%esp) - je ..B1.112 -..B1.111: - fldcw 70(%esp) -..B1.112: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.113: - fldt 56(%esp) - fxch %st(1) - fmulp %st, %st(4) - movl 108(%esp), %eax - fadd %st(3), %st - fxch %st(1) - fstpt 96(%esp) - fstpt 84(%esp) - fldt 84(%esp) - fsubp %st, %st(2) - fxch %st(1) - fstpt 40(%esp) - fldt 40(%esp) - fldt 96(%esp) - fsub %st(1), %st - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) - fldt 112(%esp) - fldt 20(%ebp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 84(%esp) - fld %st(0) - fxch %st(1) - fmulp %st, %st(4) - fldt 84(%esp) - fsubp %st, %st(2) - fsub %st(1), %st - fmul %st(2), %st - faddp %st, %st(3) - fld %st(2) - fxch %st(1) - fmulp %st, %st(2) - fadd %st(1), %st - fstpt 56(%esp) - fldt 56(%esp) - fldl _ones@GOTOFF(%ebx,%eax,8) - movzwl 64(%esp), %eax - shll $16, %eax - movzwl 62(%esp), %edx - orl %edx, %eax - andl $2147483647, %eax - cmpl $1072398336, %eax - jae ..B1.120 -..B1.114: - cmpl $1069318144, %eax - jae ..B1.116 -..B1.115: - fstp %st(3) - fmul %st(2), %st - fadd %st(2), %st - fxch %st(2) - jmp ..B1.117 -..B1.116: - fldt 12+_EP1@GOTOFF(%ebx) - fmul %st(2), %st - fldt _EP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - fadd %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fld %st(0) - faddp %st, %st(3) -..B1.117: - fxch %st(2) - fstpt 24(%esp) - cmpl $0, 36(%esp) - je ..B1.201 -..B1.118: - fstpt 40(%esp) - fstpt 12(%esp) -..B1.199: - fldcw 70(%esp) - jmp ..B1.119 -..B1.201: - fstp %st(0) - fstp %st(0) -..B1.119: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.120: - fldl _TWO_63H@GOTOFF(%ebx) - fxch %st(1) - fstpt 12(%esp) - fxch %st(2) - fstpt 40(%esp) - fldt 40(%esp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - movl 124(%esp), %eax - fadd %st(2), %st - fstpt 84(%esp) - fldt 84(%esp) - movl 84(%esp), %ecx - fsubp %st, %st(2) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fldt 96(%esp) - fldt 112(%esp) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fmulp %st, %st(3) - movsbl %cl, %edx - fxch %st(2) - fsubrp %st, %st(3) - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 96(%esp) - fldt 96(%esp) - movl %ecx, 24(%esp) - subl %edx, %ecx - sarl $8, %ecx - fsubr %st(2), %st - movl ESC2_BIAS@GOTOFF(%ebx,%eax,4), %esi - fadd %st(1), %st - fstpt 84(%esp) - lea -1(%esi,%ecx), %edi - fldt 84(%esp) - lea (%esi,%ecx), %eax - cmpl $32766, %edi - fsubp %st, %st(1) - fsubr %st, %st(1) - fldt 96(%esp) - fsubrp %st, %st(2) - jb ..B1.127 -..B1.121: - fstp %st(1) - fstp %st(0) - fstp %st(0) - movl 108(%esp), %ecx - cmpl $1, %eax - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - jg ..B1.123 -..B1.122: - fldt _small_value_80@GOTOFF(%edx,%ebx) - fldt _small_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) - jmp ..B1.124 -..B1.123: - fldt _large_value_80@GOTOFF(%edx,%ebx) - fldt _large_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) -..B1.124: - fstpt 24(%esp) - cmpl $0, 36(%esp) - je ..B1.126 -..B1.125: - fldcw 70(%esp) -..B1.126: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.127: - fldt 48+_EP@GOTOFF(%ebx) - andl $32767, %eax - fstpt 96(%esp) - fld %st(0) - shll $4, %edx - fxch %st(2) - faddp %st, %st(3) - movzwl 20(%esp), %esi - fxch %st(1) - fadd %st(2), %st - fld %st(0) - andl $-32768, %esi - fmul %st(1), %st - orl %eax, %esi - fldt 96(%esp) - fmul %st(1), %st - fstpt 96(%esp) - fldt 36+_EP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_EP@GOTOFF(%ebx) - fldt 12+_EP@GOTOFF(%ebx) - movl 24(%esp), %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - addl $4196735, %eax - fmulp %st, %st(3) - cmpl $3070, %eax - fldt 96(%esp) - movw %si, 20(%esp) - faddp %st, %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fmul %st(1), %st - fstpt 96(%esp) - fldt 96(%esp) - fldt _EP@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fmulp %st, %st(1) - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(1) - faddp %st, %st(2) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%ebx) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%ebx) - fld %st(0) - fmul %st(4), %st - fxch %st(3) - fadd %st, %st(4) - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fmul %st, %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fadd %st(1), %st - fldt 96(%esp) - fsub %st(1), %st - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - ja ..B1.130 -..B1.128: - fldt 56(%esp) - fldt _Eexpbut@GOTOFF(%ebx) - fcompp - fnstsw %ax - sahf - jbe ..B1.130 -..B1.129: - fldl _TWO_12H@GOTOFF(%ebx) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fadd %st(2), %st - fmul %st, %st(1) - movl 124(%esp), %eax - fadd %st(1), %st - fstpt 84(%esp) - lea (,%eax,8), %esi - fldt 84(%esp) - lea (%esi,%eax,4), %edx - fsubp %st, %st(1) - fldt 96(%esp) - fsub %st(1), %st - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(2) - fldt 12(%esp) - fmul %st, %st(1) - fmulp %st, %st(2) - fldt _ESC2@GOTOFF(%edx,%ebx) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 24(%esp) - jmp ..B1.131 -..B1.130: - movl 124(%esp), %eax - lea (,%eax,8), %esi - lea (%esi,%eax,4), %edx - fldt _ESC2@GOTOFF(%edx,%ebx) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 12(%esp) - fmulp %st, %st(1) - fstpt 24(%esp) -..B1.131: - movzwl 32(%esp), %eax - shll $16, %eax - movzwl 30(%esp), %edx - orl %edx, %eax - andl $2147483647, %eax - lea -98304(%eax), %ecx - cmpl $2147319808, %ecx - jb ..B1.138 -..B1.132: - movl 108(%esp), %ecx - cmpl $65535, %eax - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - ja ..B1.134 -..B1.133: - fldt _small_value_80@GOTOFF(%edx,%ebx) - fldt _small_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 136(%esp) - jmp ..B1.135 -..B1.134: - fldt _large_value_80@GOTOFF(%edx,%ebx) - fldt _large_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 24(%esp) -..B1.135: - cmpl $0, 36(%esp) - je ..B1.137 -..B1.136: - fldcw 70(%esp) -..B1.137: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.138: - cmpl $0, 36(%esp) - je ..B1.140 -..B1.139: - fldcw 70(%esp) -..B1.140: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.141: - fldt 8(%ebp) - fdivrl _ones@GOTOFF(%ebx) - fstpt 24(%esp) - jmp ..B1.41 -..B1.142: - xorl %esi, %esi - jmp ..B1.48 -..B1.143: - fstp %st(2) - fstp %st(3) - cmpl $0, 56(%esp) - jne ..B1.145 -..B1.144: - fstp %st(1) - fxch %st(1) - fstpt 40(%esp) - fldt 40(%esp) - fxch %st(1) - jmp ..B1.146 -..B1.145: - fld %st(2) - fadd %st(1), %st - fdivr %st, %st(2) - fxch %st(2) - fstpt 40(%esp) - fldt 40(%esp) - movl $0, 40(%esp) - fstpt 56(%esp) - fldt 56(%esp) - fldt 40(%esp) - fld %st(0) - fsubr %st(2), %st - fmul %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddl 8+_ones@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fsubrp %st, %st(1) -..B1.146: - fldt 12(%esp) - fld %st(2) - fmul %st(1), %st - fld %st(2) - fmul %st(2), %st - faddp %st, %st(1) - fstpt 24(%esp) - movzwl 32(%esp), %eax - shll $16, %eax - movzwl 30(%esp), %edx - orl %edx, %eax - andl $2147483647, %eax - cmpl $65535, %eax - ja ..B1.148 -..B1.147: - fldt 40(%esp) - fmul %st(1), %st - fstpt 40(%esp) - fldt 40(%esp) - fxch %st(3) - fstpt 96(%esp) - fld %st(0) - fdivr %st(3), %st - fldt 96(%esp) - fsub %st(1), %st - fstpt 96(%esp) - fldt 96(%esp) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st, %st(3) - fxch %st(3) - fstpt 24(%esp) - movzwl 32(%esp), %eax - shll $16, %eax - movzwl 30(%esp), %edx - orl %edx, %eax - andl $2147483647, %eax - fxch %st(2) - fxch %st(1) -..B1.148: - fstp %st(1) - fstp %st(1) - fstp %st(0) - lea -98304(%eax), %edx - cmpl $2147319808, %edx - jb ..B1.84 -..B1.149: - movl 108(%esp), %ecx - cmpl $65535, %eax - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %edx - ja ..B1.151 -..B1.150: - fldt _small_value_80@GOTOFF(%edx,%ebx) - fldt _small_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 136(%esp) - jmp ..B1.152 -..B1.151: - fldt _large_value_80@GOTOFF(%edx,%ebx) - fldt _large_value_80@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 24(%esp) -..B1.152: - cmpl $0, 36(%esp) - je ..B1.154 -..B1.153: - fldcw 70(%esp) -..B1.154: - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.155: - movl $0, 36(%esp) - jmp ..B1.65 -..B1.156: - cmpl $-2147483648, 60(%esp) - jne ..B1.158 -..B1.157: - cmpl $0, 36(%esp) - je ..B1.159 -..B1.158: - fldt 8(%ebp) - fldt 20(%ebp) - fmulp %st, %st(1) - fstpt 136(%esp) - fldt 136(%esp) - fstpt 24(%esp) - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.159: - cmpl $32767, 44(%esp) - je ..B1.181 -..B1.160: - cmpl $32767, 48(%esp) - jne ..B1.20 -..B1.161: - cmpl $-2147483648, 60(%esp) - jne ..B1.20 -..B1.162: - cmpl $0, 36(%esp) - jne ..B1.20 -..B1.163: - cmpl $1073709056, %esi - jae ..B1.174 -..B1.164: - movl 32(%esp), %eax - orl %esi, %eax - jne ..B1.168 -..B1.165: - fldl _zeros@GOTOFF(%ebx) - cmpl $0, 56(%esp) - jne ..B1.180 -..B1.167: - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.168: - cmpl $65536, %esi - jae ..B1.170 -..B1.169: - fldl _smallest_value_64@GOTOFF(%ebx) - fstpl 128(%esp) -..B1.170: - cmpl $0, 56(%esp) - je ..B1.172 -..B1.171: - fldl _infs@GOTOFF(%ebx) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.172: - fldl _zeros@GOTOFF(%ebx) -..B1.173: - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.174: - addl $-1073709056, %esi - orl 24(%esp), %esi - orl 32(%esp), %esi - je ..B1.179 -..B1.175: - cmpl $0, 56(%esp) - je ..B1.177 -..B1.176: - fldl _zeros@GOTOFF(%ebx) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.177: - fldl _infs@GOTOFF(%ebx) -..B1.178: - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.179: - movl 12(%esp), %eax - fldl _ones@GOTOFF(%ebx,%eax,8) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.180: - fldl _ones@GOTOFF(%ebx) - fdivp %st, %st(1) - fstpt 24(%esp) - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.181: - cmpl $-2147483648, %edx - jne ..B1.160 -..B1.182: - cmpl $0, 32(%esp) - jne ..B1.160 -..B1.183: - cmpl $65536, %eax - jae ..B1.185 -..B1.184: - fldl _smallest_value_64@GOTOFF(%ebx) - fstpl 128(%esp) -..B1.185: - cmpl $0, 40(%esp) - movl %ecx, %eax - je ..L7 - movl $0, %eax -..L7: - movl %eax, 108(%esp) - cmpl $0, 56(%esp) - je ..B1.187 -..B1.186: - fldl _zeros@GOTOFF(%ebx,%eax,8) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.187: - fldl _infs@GOTOFF(%ebx,%eax,8) -..B1.188: - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.189: - cmpl $-2147483648, %edx - jne ..B1.158 -..B1.190: - cmpl $0, 32(%esp) - jne ..B1.158 -..B1.191: - cmpl $32767, 48(%esp) - je ..B1.156 - jmp ..B1.159 -..B1.192: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - fstpt 24(%esp) - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.193: - movl 108(%esp), %eax - fldl _ones@GOTOFF(%ebx,%eax,8) - fdivl _zeros@GOTOFF(%ebx) - fstpt 24(%esp) - fldt 24(%esp) - addl $148, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type powl,@function - .size powl,.-powl - .data -# -- End powl - .text -# -- Begin __sqrtl - .text - .align 16,0x90 -__sqrtl: -# parameter 1: 4 + %esp -..B2.1: -..L8: - -..B2.2: - movl 4(%esp), %ecx - fldt (%ecx) - fsqrt - ret -..B2.3: - .align 16,0x90 - .type __sqrtl,@function - .size __sqrtl,.-__sqrtl - .data -# -- End __sqrtl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0xbf,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_43H: - .long 0 - .long 1118306304 - .type _TWO_43H,@object - .size _TWO_43H,8 - .align 4 -_exact_masks: - .long 131071 - .long 0 - .long 4294967295 - .long 1 - .long 4294967295 - .long 511 - .long 4294967295 - .long 16383 - .long 4294967295 - .long 131071 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 2097151 - .long 4294967295 - .long 8388607 - .long 4294967295 - .long 16777215 - .long 4294967295 - .long 33554431 - .long 4294967295 - .long 33554431 - .long 4294967295 - .long 67108863 - .long 4294967295 - .long 134217727 - .long 4294967295 - .long 134217727 - .long 4294967295 - .long 134217727 - .long 4294967295 - .long 268435455 - .long 4294967295 - .long 268435455 - .long 4294967295 - .long 268435455 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .type _exact_masks,@object - .size _exact_masks,376 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_LT2: - .long 180342526 - .long 2357584585 - .long 2340989257 - .long 193458247 - .long 2370723239 - .long 2317577053 - .long 2382055315 - .long 232148275 - .long 200972627 - .long 2376530255 - .long 2376860906 - .long 222325808 - .long 228268523 - .long 229816737 - .long 2387925496 - .long 239088248 - .long 235445027 - .long 219576635 - .long 2365457762 - .long 200344795 - .long 2377779510 - .long 2396359259 - .long 256760275 - .long 2390604874 - .long 2403557039 - .long 2397936349 - .long 2387307486 - .long 2389941185 - .long 2375749593 - .long 224865835 - .long 2394232861 - .long 180745560 - .long 231885773 - .long 2352962188 - .long 2306055684 - .long 206875141 - .long 258325764 - .long 2386208973 - .long 231066739 - .long 195513036 - .long 2360327132 - .long 2396045581 - .long 236564318 - .long 2282584976 - .long 2351736009 - .long 236364231 - .long 2384427773 - .long 267355851 - .long 255771104 - .long 265321597 - .long 2384375360 - .long 2399209743 - .long 186438128 - .long 2407131686 - .long 2382793784 - .long 2395218767 - .long 229223248 - .long 256892528 - .long 2394735602 - .long 2385223602 - .long 2372921302 - .long 2398642377 - .long 2399679754 - .long 255686225 - .long 220689523 - .long 2385772978 - .long 209771590 - .long 2396079173 - .long 247531082 - .long 236085121 - .long 264660069 - .long 2357821390 - .long 236486650 - .long 2368138461 - .long 239690108 - .long 2396070228 - .long 196955922 - .long 217533735 - .long 255641653 - .long 249646543 - .long 253232621 - .long 246212714 - .long 2396427575 - .long 261629730 - .long 2364672847 - .long 2403865410 - .long 251273869 - .long 261125380 - .long 2388321036 - .long 2375891827 - .long 2381014317 - .long 2414822930 - .long 2406245053 - .long 2406988902 - .long 2395399973 - .long 213294711 - .long 2401319324 - .long 265450299 - .long 231845893 - .long 260578794 - .long 258934474 - .long 2368795786 - .long 2422506717 - .long 218205033 - .long 258708287 - .long 257044854 - .long 2396281866 - .long 2415975150 - .long 257697283 - .long 2393801226 - .long 2388654986 - .long 262910764 - .long 235638432 - .long 268054962 - .long 271083258 - .long 256780444 - .long 256064350 - .long 252979189 - .long 2420460964 - .long 233178508 - .long 251655134 - .long 2404577473 - .long 2408876374 - .long 2401072099 - .long 228623072 - .long 2421706621 - .long 2353033467 - .long 2411792212 - .long 2345330012 - .long 2397189005 - .long 243110369 - .long 2408213151 - .long 219253901 - .long 246695172 - .long 259288551 - .long 254210780 - .long 261865355 - .long 230359170 - .long 263524551 - .long 2405618542 - .long 2399869921 - .long 233826616 - .long 2362750769 - .long 257576291 - .long 251808114 - .long 2403390977 - .long 253249058 - .long 261065811 - .long 215406974 - .long 2407628993 - .long 258391343 - .long 2394470699 - .long 258495470 - .long 2415771687 - .long 224670583 - .long 263047889 - .long 2389031226 - .long 259453051 - .long 266564569 - .long 2422023012 - .long 264051375 - .long 2409075373 - .long 252244729 - .long 220302768 - .long 254847756 - .long 243124762 - .long 2363519942 - .long 2393496158 - .long 2402135082 - .long 2365706590 - .long 237902971 - .long 262295026 - .long 252689257 - .long 236678680 - .long 255167613 - .long 2406879752 - .long 274254693 - .long 259983961 - .long 245852525 - .long 256459527 - .long 220533989 - .long 245387845 - .long 243835221 - .long 2377853444 - .long 274540751 - .long 229741069 - .long 263626566 - .long 220608387 - .long 226161046 - .long 247301717 - .long 268433686 - .long 222008210 - .long 2414961139 - .long 276137642 - .long 2412197898 - .long 258445918 - .long 2412645341 - .long 260857859 - .long 263113037 - .long 2386484264 - .long 2390742630 - .long 259665290 - .long 2363417497 - .long 2384122046 - .long 263493300 - .long 219472625 - .long 2420433676 - .long 274201285 - .long 2404911312 - .long 257926520 - .long 260332203 - .long 256695016 - .long 218494534 - .long 2420150889 - .long 2414586287 - .long 267006159 - .long 231320206 - .long 2382797064 - .long 2414903062 - .long 263514471 - .long 2406010284 - .long 2410428205 - .long 2414319991 - .long 249083715 - .long 2381171937 - .long 236369629 - .long 2409614279 - .long 2424220710 - .long 2378379154 - .long 218677462 - .long 2382987336 - .long 2377870458 - .long 258155310 - .long 2368239928 - .long 2414896572 - .long 193310867 - .long 256673115 - .long 2406448055 - .long 271719709 - .long 248566852 - .long 229016248 - .long 272541555 - .long 2382115967 - .long 2375311600 - .long 2393766434 - .long 257187362 - .long 277931545 - .long 281038165 - .long 2373962226 - .long 261638946 - .long 255465134 - .long 273460929 - .long 275851296 - .long 2417166241 - .long 2361106656 - .long 278653754 - .type _LT2,@object - .size _LT2,1024 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -ESC2_BIAS: - .long 4095 - .long 28671 - .type ESC2_BIAS,@object - .size ESC2_BIAS,8 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_invsqrtl_scales: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 20479 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 12287 - .word 0 - .type _invsqrtl_scales,@object - .size _invsqrtl_scales,48 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_LP: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49149 - .word 0 - .word 52785 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 44453 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 25655 - .word 14678 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 38741 - .word 53722 - .word 65535 - .word 65535 - .word 49147 - .word 0 - .word 45676 - .word 59527 - .word 48579 - .word 58254 - .word 16379 - .word 0 - .word 41682 - .word 64796 - .word 25002 - .word 52429 - .word 49147 - .word 0 - .type _LP,@object - .size _LP,108 - .align 2 -_LLN2: - .word 0 - .word 53711 - .word 6135 - .word 45426 - .word 16382 - .word 0 - .word 2022 - .word 26416 - .word 37831 - .word 62295 - .word 16333 - .word 0 - .type _LLN2,@object - .size _LLN2,24 - .align 2 -_EP1: - .word 43691 - .word 10 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 30584 - .word 43703 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _EP1,@object - .size _EP1,24 - .align 2 -_EP: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _EP,@object - .size _EP,60 - .align 2 -_Eexpbut: - .word 60207 - .word 4624 - .word 35943 - .word 45420 - .word 49164 - .word 0 - .type _Eexpbut,@object - .size _Eexpbut,12 - .align 2 -_ESC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 28671 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 4095 - .word 0 - .type _ESC2,@object - .size _ESC2,24 - .data - .hidden __libm_rcp_table_256 - .hidden __libm_logl_table_256 - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/q2l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/q2l.S deleted file mode 100644 index a9c7852f18..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/q2l.S +++ /dev/null @@ -1,353 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "q2l.c" - .text -..TXTST0: -# -- Begin __qtol - .text - .align 16,0x90 - .globl __qtol -__qtol: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp - movl 8(%ebp), %eax - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - movl 12(%eax), %edx - movl 8(%eax), %esi - movl %ecx, 16(%esp) - movl (%eax), %ecx - movl 4(%eax), %ebx - movl %edx, %eax - movl %edx, 12(%esp) - movzwl %dx, %edi - movl %esi, %edx - shrl $17, %edx - shll $15, %edi - orl %edi, %edx - movl %ebx, %edi - shll $15, %esi - shrl $17, %edi - orl %edi, %esi - movl %ecx, %edi - shrl $16, %eax - shrl $17, %edi - shll $15, %ebx - movl %eax, 24(%esp) - andl $32767, %eax - shll $15, %ecx - orl %ebx, %edi - movl %edi, 28(%esp) - cmpl $32767, %eax - jne ..B1.7 -..B1.2: - movl %edi, %eax - orl %esi, %ecx - orl %edx, %eax - orl %eax, %ecx - je ..B1.6 -..B1.3: - movl %edx, %eax - xorl %ecx, %ecx - andl $1073741824, %eax - orl %eax, %ecx - jne ..B1.5 -..B1.4: - movl 16(%esp), %eax - movl p_zero@GOTOFF(%eax), %ecx - fldl (%ecx) - fdiv %st(0), %st - fstpl (%esp) -..B1.5: - orl $-1073741824, %edx -..B1.6: - movl 24(%esp), %eax - orl $-2147483648, %edx - movl %eax, 16(%esp) - movl %esi, 8(%esp) - movl %edx, 12(%esp) - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.7: - testl %eax, %eax - je ..B1.9 -..B1.8: - orl $-2147483648, %edx - jmp ..B1.11 -..B1.9: - movl %esi, %edi - movl %edx, %ebx - orl 28(%esp), %ebx - orl %ecx, %edi - orl %ebx, %edi - je ..B1.22 -..B1.10: - movl 16(%esp), %edi - movl p_tiny@GOTOFF(%edi), %ebx - fldl (%ebx) - movl p_one@GOTOFF(%edi), %ebx - fmull (%ebx) - fstpl (%esp) -..B1.11: - movl %ecx, %ebx - orl 28(%esp), %ebx - je ..B1.21 -..B1.12: - fnstcw 20(%esp) -..B1.13: - movl 20(%esp), %ebx - andl $3072, %ebx - movl %ebx, 8(%esp) - jne ..B1.15 -..B1.14: - xorl %ebx, %ebx - movl 28(%esp), %edi - subl %ebx, %edi - jl ..B1.23 - jmp ..B1.18 -..B1.15: - testl $-2147483648, 12(%esp) - je ..B1.17 -..B1.16: - cmpl $1024, 8(%esp) - je ..B1.23 - jmp ..B1.18 -..B1.17: - cmpl $2048, 8(%esp) - je ..B1.23 -..B1.18: - testl %eax, %eax - jne ..B1.20 -..B1.19: - movl 16(%esp), %eax - movl p_norm@GOTOFF(%eax), %ecx - fldl (%ecx) - fmul %st(0), %st - fstpl (%esp) - jmp ..B1.21 -..B1.20: - movl 16(%esp), %eax - movl p_one@GOTOFF(%eax), %ecx - movl p_norm@GOTOFF(%eax), %ebx - fldl (%ecx) - faddl (%ebx) - fstpl (%esp) -..B1.21: - movl 24(%esp), %eax - movl %eax, 16(%esp) - movl %esi, 8(%esp) - movl %edx, 12(%esp) - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.22: - movl 24(%esp), %eax - xorl %edx, %edx - movl %eax, 16(%esp) - movl %edx, 8(%esp) - movl %edx, 12(%esp) - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - addl $1, %esi - adcl $0, %edx - testl %eax, %eax - je ..B1.32 -..B1.24: - movl %esi, %eax - orl %edx, %eax - jne ..B1.28 -..B1.25: - movl 24(%esp), %eax - xorl %esi, %esi - incl %eax - movl $-2147483648, %edx - movl %eax, 24(%esp) - andl $32767, %eax -..B1.26: - cmpl $32767, %eax - jne ..B1.18 -..B1.27: - movl 16(%esp), %eax - movl p_huge@GOTOFF(%eax), %ecx - fldl (%ecx) - fmul %st(0), %st - fstpl (%esp) - jmp ..B1.21 -..B1.28: - movl $-2147483648, %eax - movl 28(%esp), %ebx - subl %eax, %ebx - orl %ebx, %ecx - jne ..B1.30 -..B1.29: - movl $1, %eax - jmp ..B1.31 -..B1.30: - xorl %eax, %eax -..B1.31: - xorl %ecx, %ecx - cmpl $0, 8(%esp) - sete %cl - andl %ecx, %eax - notl %eax - andl %eax, %esi - movl 16(%esp), %eax - movl p_one@GOTOFF(%eax), %ebx - movl p_norm@GOTOFF(%eax), %eax - fldl (%ebx) - faddl (%eax) - fstpl (%esp) - jmp ..B1.21 -..B1.32: - movl $-2147483648, %eax - movl 28(%esp), %ebx - subl %eax, %ebx - orl %ebx, %ecx - jne ..B1.34 -..B1.33: - movl $1, %ecx - jmp ..B1.35 -..B1.34: - xorl %ecx, %ecx -..B1.35: - xorl %edi, %edi - xorl %eax, %eax - cmpl $0, 8(%esp) - sete %al - andl %eax, %ecx - notl %ecx - andl %ecx, %esi - movl %edx, %ecx - subl %edi, %ecx - jge ..B1.19 -..B1.36: - movl 24(%esp), %eax - incl %eax - movl %eax, 24(%esp) - andl $32767, %eax - jmp ..B1.26 - .align 16,0x90 - .type __qtol,@function - .size __qtol,.-__qtol - .data -# -- End __qtol - .data - .align 4 - .align 4 -p_zero: - .long d_zero - .type p_zero,@object - .size p_zero,4 - .align 4 -p_tiny: - .long d_tiny - .type p_tiny,@object - .size p_tiny,4 - .align 4 -p_one: - .long d_one - .type p_one,@object - .size p_one,4 - .align 4 -p_norm: - .long d_norm - .type p_norm,@object - .size p_norm,4 - .align 4 -p_huge: - .long d_huge - .type p_huge,@object - .size p_huge,4 - .section .rodata, "a" - .align 8 - .align 8 -d_zero: - .long 0x00000000,0x00000000 - .type d_zero,@object - .size d_zero,8 - .align 8 -d_tiny: - .long 0x00000001,0x00000000 - .type d_tiny,@object - .size d_tiny,8 - .align 8 -d_one: - .long 0x00000000,0x3ff00000 - .type d_one,@object - .size d_one,8 - .align 8 -d_norm: - .long 0x00000000,0x00100000 - .type d_norm,@object - .size d_norm,8 - .align 8 -d_huge: - .long 0xffffffff,0x7fefffff - .type d_huge,@object - .size d_huge,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rcp_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rcp_table.S deleted file mode 100644 index 1877177d5a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rcp_table.S +++ /dev/null @@ -1,822 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "rcp_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_rcp_table_256 - .globl __libm_rcp_table_256 -__libm_rcp_table_256: - .long 0x3f7f8000 - .long 0x3f7e8000 - .long 0x3f7d8000 - .long 0x3f7c8000 - .long 0x3f7ba000 - .long 0x3f7aa000 - .long 0x3f79a000 - .long 0x3f78c000 - .long 0x3f77c000 - .long 0x3f76e000 - .long 0x3f75e000 - .long 0x3f750000 - .long 0x3f742000 - .long 0x3f732000 - .long 0x3f724000 - .long 0x3f716000 - .long 0x3f708000 - .long 0x3f6fa000 - .long 0x3f6ec000 - .long 0x3f6de000 - .long 0x3f6d0000 - .long 0x3f6c2000 - .long 0x3f6b6000 - .long 0x3f6a8000 - .long 0x3f69a000 - .long 0x3f68c000 - .long 0x3f680000 - .long 0x3f672000 - .long 0x3f666000 - .long 0x3f658000 - .long 0x3f64c000 - .long 0x3f640000 - .long 0x3f632000 - .long 0x3f626000 - .long 0x3f61a000 - .long 0x3f60e000 - .long 0x3f600000 - .long 0x3f5f4000 - .long 0x3f5e8000 - .long 0x3f5dc000 - .long 0x3f5d0000 - .long 0x3f5c4000 - .long 0x3f5b8000 - .long 0x3f5ae000 - .long 0x3f5a2000 - .long 0x3f596000 - .long 0x3f58a000 - .long 0x3f57e000 - .long 0x3f574000 - .long 0x3f568000 - .long 0x3f55e000 - .long 0x3f552000 - .long 0x3f546000 - .long 0x3f53c000 - .long 0x3f532000 - .long 0x3f526000 - .long 0x3f51c000 - .long 0x3f510000 - .long 0x3f506000 - .long 0x3f4fc000 - .long 0x3f4f2000 - .long 0x3f4e6000 - .long 0x3f4dc000 - .long 0x3f4d2000 - .long 0x3f4c8000 - .long 0x3f4be000 - .long 0x3f4b4000 - .long 0x3f4aa000 - .long 0x3f4a0000 - .long 0x3f496000 - .long 0x3f48c000 - .long 0x3f482000 - .long 0x3f478000 - .long 0x3f46e000 - .long 0x3f464000 - .long 0x3f45c000 - .long 0x3f452000 - .long 0x3f448000 - .long 0x3f43e000 - .long 0x3f436000 - .long 0x3f42c000 - .long 0x3f422000 - .long 0x3f41a000 - .long 0x3f410000 - .long 0x3f408000 - .long 0x3f3fe000 - .long 0x3f3f6000 - .long 0x3f3ec000 - .long 0x3f3e4000 - .long 0x3f3da000 - .long 0x3f3d2000 - .long 0x3f3ca000 - .long 0x3f3c0000 - .long 0x3f3b8000 - .long 0x3f3b0000 - .long 0x3f3a8000 - .long 0x3f39e000 - .long 0x3f396000 - .long 0x3f38e000 - .long 0x3f386000 - .long 0x3f37e000 - .long 0x3f376000 - .long 0x3f36c000 - .long 0x3f364000 - .long 0x3f35c000 - .long 0x3f354000 - .long 0x3f34c000 - .long 0x3f344000 - .long 0x3f33c000 - .long 0x3f334000 - .long 0x3f32e000 - .long 0x3f326000 - .long 0x3f31e000 - .long 0x3f316000 - .long 0x3f30e000 - .long 0x3f306000 - .long 0x3f2fe000 - .long 0x3f2f8000 - .long 0x3f2f0000 - .long 0x3f2e8000 - .long 0x3f2e2000 - .long 0x3f2da000 - .long 0x3f2d2000 - .long 0x3f2cc000 - .long 0x3f2c4000 - .long 0x3f2bc000 - .long 0x3f2b6000 - .long 0x3f2ae000 - .long 0x3f2a8000 - .long 0x3f2a0000 - .long 0x3f29a000 - .long 0x3f292000 - .long 0x3f28c000 - .long 0x3f284000 - .long 0x3f27e000 - .long 0x3f276000 - .long 0x3f270000 - .long 0x3f268000 - .long 0x3f262000 - .long 0x3f25c000 - .long 0x3f254000 - .long 0x3f24e000 - .long 0x3f248000 - .long 0x3f240000 - .long 0x3f23a000 - .long 0x3f234000 - .long 0x3f22e000 - .long 0x3f226000 - .long 0x3f220000 - .long 0x3f21a000 - .long 0x3f214000 - .long 0x3f20e000 - .long 0x3f206000 - .long 0x3f200000 - .long 0x3f1fa000 - .long 0x3f1f4000 - .long 0x3f1ee000 - .long 0x3f1e8000 - .long 0x3f1e2000 - .long 0x3f1dc000 - .long 0x3f1d6000 - .long 0x3f1d0000 - .long 0x3f1ca000 - .long 0x3f1c4000 - .long 0x3f1be000 - .long 0x3f1b8000 - .long 0x3f1b2000 - .long 0x3f1ac000 - .long 0x3f1a6000 - .long 0x3f1a0000 - .long 0x3f19a000 - .long 0x3f194000 - .long 0x3f190000 - .long 0x3f18a000 - .long 0x3f184000 - .long 0x3f17e000 - .long 0x3f178000 - .long 0x3f172000 - .long 0x3f16e000 - .long 0x3f168000 - .long 0x3f162000 - .long 0x3f15c000 - .long 0x3f158000 - .long 0x3f152000 - .long 0x3f14c000 - .long 0x3f148000 - .long 0x3f142000 - .long 0x3f13c000 - .long 0x3f138000 - .long 0x3f132000 - .long 0x3f12c000 - .long 0x3f128000 - .long 0x3f122000 - .long 0x3f11c000 - .long 0x3f118000 - .long 0x3f112000 - .long 0x3f10e000 - .long 0x3f108000 - .long 0x3f104000 - .long 0x3f0fe000 - .long 0x3f0f8000 - .long 0x3f0f4000 - .long 0x3f0ee000 - .long 0x3f0ea000 - .long 0x3f0e6000 - .long 0x3f0e0000 - .long 0x3f0dc000 - .long 0x3f0d6000 - .long 0x3f0d2000 - .long 0x3f0cc000 - .long 0x3f0c8000 - .long 0x3f0c2000 - .long 0x3f0be000 - .long 0x3f0ba000 - .long 0x3f0b4000 - .long 0x3f0b0000 - .long 0x3f0ac000 - .long 0x3f0a6000 - .long 0x3f0a2000 - .long 0x3f09e000 - .long 0x3f098000 - .long 0x3f094000 - .long 0x3f090000 - .long 0x3f08a000 - .long 0x3f086000 - .long 0x3f082000 - .long 0x3f07e000 - .long 0x3f078000 - .long 0x3f074000 - .long 0x3f070000 - .long 0x3f06c000 - .long 0x3f066000 - .long 0x3f062000 - .long 0x3f05e000 - .long 0x3f05a000 - .long 0x3f056000 - .long 0x3f052000 - .long 0x3f04c000 - .long 0x3f048000 - .long 0x3f044000 - .long 0x3f040000 - .long 0x3f03c000 - .long 0x3f038000 - .long 0x3f034000 - .long 0x3f030000 - .long 0x3f02a000 - .long 0x3f026000 - .long 0x3f022000 - .long 0x3f01e000 - .long 0x3f01a000 - .long 0x3f016000 - .long 0x3f012000 - .long 0x3f00e000 - .long 0x3f00a000 - .long 0x3f006000 - .long 0x3f002000 - .type __libm_rcp_table_256,@object - .size __libm_rcp_table_256,1024 - .align 16 - .hidden __libm_double_rcp_table_256 - .globl __libm_double_rcp_table_256 -__libm_double_rcp_table_256: - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .type __libm_double_rcp_table_256,@object - .size __libm_double_rcp_table_256,2048 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainder.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainder.S deleted file mode 100644 index 2e9c586a07..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainder.S +++ /dev/null @@ -1,199 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remainder.c" - .text -..TXTST0: -# -- Begin remainder - .text - .align 16,0x90 - .globl remainder -remainder: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp - movzwl 22(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - testl %ecx, %ecx - jne ..B1.4 -..B1.2: - testl $1048575, 20(%ebp) - jne ..B1.4 -..B1.3: - cmpl $0, 16(%ebp) - je ..B1.9 -..B1.4: - movzwl 14(%ebp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - je ..B1.28 -..B1.5: - cmpl $2047, %ecx - je ..B1.14 -..B1.7: - fldl 16(%ebp) - fldl 8(%ebp) -.L_2TAG_PACKET_0.0.2: - fprem1 - fstsw %ax - sahf - jp .L_2TAG_PACKET_0.0.2 - fstp %st(1) - fstpl (%esp) -..B1.8: - fldl (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.9: - movzwl 14(%ebp), %edx - andl $32752, %edx - cmpl $32752, %edx - je ..B1.11 -..B1.10: - fldl _infs@GOTOFF(%eax) - fmull _zeros@GOTOFF(%eax) - fstl (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.11: - testl $1048575, 12(%ebp) - jne ..B1.13 -..B1.12: - cmpl $0, 8(%ebp) - je ..B1.10 -..B1.13: - fldl 8(%ebp) - faddl 16(%ebp) - fstl (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.14: - testl $1048575, 20(%ebp) - jne ..B1.19 -..B1.15: - cmpl $0, 16(%ebp) - jne ..B1.19 -..B1.16: - cmpl $2047, %edx - je ..B1.25 -..B1.17: - cmpl $2047, %ecx - je ..B1.20 - jmp ..B1.7 -..B1.19: - fldl 8(%ebp) - faddl 16(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.20: - testl $1048575, 20(%ebp) - jne ..B1.7 -..B1.21: - cmpl $0, 16(%ebp) - jne ..B1.7 -..B1.22: - fldl 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.25: - testl $1048575, 12(%ebp) - jne ..B1.17 -..B1.26: - cmpl $0, 8(%ebp) - jne ..B1.17 -..B1.27: - fldl _infs@GOTOFF(%eax) - fmull _zeros@GOTOFF(%eax) - movl %ebp, %esp - popl %ebp - ret -..B1.28: - testl $1048575, 12(%ebp) - jne ..B1.19 -..B1.29: - cmpl $0, 8(%ebp) - jne ..B1.19 -..B1.30: - cmpl $2047, %ecx - je ..B1.14 - jmp ..B1.16 - .align 16,0x90 - .type remainder,@function - .size remainder,.-remainder - .data -# -- End remainder - .section .rodata, "a" - .align 4 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End - - .globl drem - .equ drem, remainder - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainderf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainderf.S deleted file mode 100644 index c526c49495..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainderf.S +++ /dev/null @@ -1,161 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remainderf.c" - .text -..TXTST0: -# -- Begin remainderf - .text - .align 16,0x90 - .globl remainderf -remainderf: -# parameter 1: 16 + %esp -# parameter 2: 20 + %esp -..B1.1: -..L1: - - subl $12, %esp - movzwl 22(%esp), %ecx - andl $32640, %ecx - shrl $7, %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - testl %ecx, %ecx - jne ..B1.3 -..B1.2: - testl $8388607, 20(%esp) - je ..B1.8 -..B1.3: - movzwl 18(%esp), %edx - andl $32640, %edx - shrl $7, %edx - cmpl $255, %edx - je ..B1.22 -..B1.4: - cmpl $255, %ecx - je ..B1.12 -..B1.6: - flds 20(%esp) - flds 16(%esp) -.L_2TAG_PACKET_0.0.2: - fprem1 - fstsw %ax - sahf - jp .L_2TAG_PACKET_0.0.2 - fstp %st(1) - fstps (%esp) -..B1.7: - flds (%esp) - addl $12, %esp - ret -..B1.8: - movzwl 18(%esp), %edx - andl $32640, %edx - cmpl $32640, %edx - jne ..B1.11 -..B1.9: - testl $8388607, 16(%esp) - je ..B1.11 -..B1.10: - flds 16(%esp) - fadds 20(%esp) - fsts (%esp) - addl $12, %esp - ret -..B1.11: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%eax) - fsts (%esp) - addl $12, %esp - ret -..B1.12: - testl $8388607, 20(%esp) - jne ..B1.16 -..B1.13: - cmpl $255, %edx - je ..B1.20 -..B1.14: - cmpl $255, %ecx - je ..B1.17 - jmp ..B1.6 -..B1.16: - flds 16(%esp) - fadds 20(%esp) - addl $12, %esp - ret -..B1.17: - testl $8388607, 20(%esp) - jne ..B1.6 -..B1.18: - flds 16(%esp) - addl $12, %esp - ret -..B1.20: - testl $8388607, 16(%esp) - jne ..B1.14 -..B1.21: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%eax) - addl $12, %esp - ret -..B1.22: - testl $8388607, 16(%esp) - jne ..B1.16 -..B1.23: - cmpl $255, %ecx - je ..B1.12 - jmp ..B1.13 - .align 16,0x90 - .type remainderf,@function - .size remainderf,.-remainderf - .data -# -- End remainderf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x7f800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .data - .section .note.GNU-stack, "" -# End - - .globl dremf - .equ dremf, remainderf - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainderl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainderl.S deleted file mode 100644 index 168204a7b5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remainderl.S +++ /dev/null @@ -1,340 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remainderl.c" - .text -..TXTST0: -# -- Begin remainderl - .text - .align 16,0x90 - .globl remainderl -remainderl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - subl $28, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 28(%ebp), %edx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - andl $32767, %edx - jne ..B1.6 -..B1.4: - cmpl $0, 24(%ebp) - jne ..B1.6 -..B1.5: - cmpl $0, 20(%ebp) - je ..B1.45 -..B1.6: - movzwl 16(%ebp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.42 -..B1.7: - cmpl $32767, %edx - je ..B1.17 -..B1.8: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.16 -..B1.9: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.10: - fldcw 12(%esp) -..B1.11: - movl $1, %esi -..B1.12: - addl $-16, %esp - lea 8(%ebp), %eax - movl %eax, (%esp) - call __remainderl -..B1.60: - fstpt 16(%esp) - addl $16, %esp -..B1.13: - testl %esi, %esi - je ..B1.15 -..B1.14: - fldcw 14(%esp) -..B1.15: - fldt (%esp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - xorl %esi, %esi - jmp ..B1.12 -..B1.17: - cmpl $-2147483648, 24(%ebp) - jne ..B1.19 -..B1.18: - cmpl $0, 20(%ebp) - je ..B1.25 -..B1.19: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.31 -..B1.20: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.21: - fldcw 12(%esp) -..B1.22: - fldt 8(%ebp) - fldt 20(%ebp) - faddp %st, %st(1) - fstpt (%esp) -..B1.23: - fldcw 14(%esp) -..B1.24: - fldt (%esp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - cmpl $32767, %ecx - je ..B1.32 -..B1.26: - testl %ecx, %ecx - jne ..B1.30 -..B1.27: - cmpl $0, 12(%ebp) - jne ..B1.29 -..B1.28: - cmpl $0, 8(%ebp) - je ..B1.30 -..B1.29: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl 16(%esp) -..B1.30: - fldt 8(%ebp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - fldt 8(%ebp) - fldt 20(%ebp) - faddp %st, %st(1) - fstpt (%esp) - jmp ..B1.24 -..B1.32: - cmpl $-2147483648, 12(%ebp) - jne ..B1.30 -..B1.33: - cmpl $0, 8(%ebp) - jne ..B1.30 -..B1.34: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.41 -..B1.35: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.36: - fldcw 12(%esp) -..B1.37: - movl $1, %edx -..B1.38: - fldl _infs@GOTOFF(%eax) - testl %edx, %edx - fmull _zeros@GOTOFF(%eax) - fstpl (%esp) - je ..B1.40 -..B1.39: - fldcw 14(%esp) -..B1.40: - fldl (%esp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - xorl %edx, %edx - jmp ..B1.38 -..B1.42: - cmpl $-2147483648, 12(%ebp) - jne ..B1.19 -..B1.43: - cmpl $0, 8(%ebp) - jne ..B1.19 -..B1.44: - cmpl $32767, %edx - je ..B1.17 - jmp ..B1.25 -..B1.45: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.57 -..B1.46: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.47: - fldcw 12(%esp) -..B1.48: - movl $1, %ecx -..B1.49: - movzwl 16(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.54 -..B1.50: - fldl _infs@GOTOFF(%eax) - fmull _zeros@GOTOFF(%eax) - fstpt (%esp) -..B1.51: - testl %ecx, %ecx - je ..B1.53 -..B1.52: - fldcw 14(%esp) -..B1.53: - fldt (%esp) - addl $28, %esp - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.54: - cmpl $-2147483648, 12(%ebp) - jne ..B1.56 -..B1.55: - cmpl $0, 8(%ebp) - je ..B1.50 -..B1.56: - fldt 8(%ebp) - fmull _ones@GOTOFF(%eax) - fstpt (%esp) - jmp ..B1.51 -..B1.57: - xorl %ecx, %ecx - jmp ..B1.49 - .align 16,0x90 - .type remainderl,@function - .size remainderl,.-remainderl - .data -# -- End remainderl - .text -# -- Begin __remainderl - .text - .align 16,0x90 -__remainderl: -# parameter 1: 4 + %esp -..B2.1: -..L3: - -..B2.2: - movl 4(%esp), %ecx - fldt 12(%ecx) - fldt (%ecx) -.L_2TAG_PACKET_0.0.2: - fprem1 - fstsw %ax - sahf - jp .L_2TAG_PACKET_0.0.2 - fstp %st(1) - ret -..B2.3: - .align 16,0x90 - .type __remainderl,@function - .size __remainderl,.-__remainderl - .data -# -- End __remainderl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -# End - - .globl dreml - .equ dreml, remainderl - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquo.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquo.S deleted file mode 100644 index d154009af2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquo.S +++ /dev/null @@ -1,573 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remquo.c" - .text -..TXTST0: -# -- Begin remquo - .text - .align 16,0x90 - .globl remquo -remquo: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -# parameter 3: 24 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp - movl 24(%ebp), %ecx - movl %ecx, 56(%esp) - movl 12(%ebp), %ecx - movl %ecx, %edx - movl 20(%ebp), %esi - movl %esi, %eax - andl $-2147483648, %edx - andl $-2147483648, %eax - cmpl %edx, %eax - movl $-1, %eax - movl %edx, 48(%esp) - jne ..L2 - movl $1, %eax -..L2: - andl $2147483647, %ecx - andl $2147483647, %esi - movl %ecx, %edi - movl %esi, %ebx - andl $2146435072, %edi - andl $2146435072, %ebx - movl %eax, 52(%esp) - shrl $20, %edi - movl 8(%ebp), %eax - movl 16(%ebp), %edx - shrl $20, %ebx - movl %eax, 8(%esp) - cmpl $2047, %edi - movl %ecx, 12(%esp) - movl %edx, 68(%esp) - movl %edx, 40(%esp) - movl %esi, 44(%esp) - movl %edi, 60(%esp) - movl %ebx, 64(%esp) - je ..B1.5 -..B1.2: - cmpl $2047, 64(%esp) - je ..B1.5 -..B1.3: - movl %eax, %edx - orl %ecx, %edx - je ..B1.5 -..B1.4: - movl 68(%esp), %edx - orl %esi, %edx - jne ..B1.6 -..B1.5: - movl $1, %edi - jmp ..B1.7 -..B1.6: - xorl %edi, %edi -..B1.7: - fldl 8(%esp) - movl %ecx, %ebx - fldl 40(%esp) - movl %esi, %edx - andl $1048575, %ebx - andl $1048575, %edx - movl %edx, 16(%esp) - testl %edi, %edi - je ..B1.16 -..B1.8: - fstp %st(1) - fstp %st(0) - movl 56(%esp), %edx - movl %ecx, %ebx - movl $0, (%edx) - movl $2146435072, %edx - subl %edx, %ebx - jb ..B1.9 -..B1.86: - orl %eax, %ebx - jne ..B1.10 -..B1.9: - movl %esi, %ebx - subl %edx, %ebx - jb ..B1.11 -..B1.87: - orl 68(%esp), %ebx - je ..B1.11 -..B1.10: - fldl 8(%ebp) - faddl 16(%ebp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.11: - movl 68(%esp), %ebx - orl %esi, %ebx - je ..B1.13 -..B1.12: - subl %edx, %ecx - orl %ecx, %eax - jne ..B1.14 -..B1.13: - fldz - fdiv %st(0), %st - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.14: - fldl 8(%ebp) -..B1.15: - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.16: - movl 68(%esp), %edx - movl %edx, 32(%esp) - movl 60(%esp), %edx - subl 64(%esp), %edx - movl 16(%esp), %edi - cmpl $31, %edx - movl %edi, 36(%esp) - fxch %st(1) - fstpl 24(%esp) - jle ..B1.21 -..B1.17: - cmpl $2016, 64(%esp) - jge ..B1.21 -..B1.18: - movl %eax, 8(%esp) - call ..L3 -..L3: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L3](%eax), %eax - fstl 16(%esp) - movl %ebx, 12(%esp) - fldl .L_2il0floatpacket.0@GOTOFF(%eax) - fmulp %st, %st(1) - fstpl (%esp) -..B1.19: - fldl (%esp) - fldl 24(%esp) -.L_2TAG_PACKET_0.0.2: - fprem - fstsw %ax - sahf - jp .L_2TAG_PACKET_0.0.2 - fstp %st(1) - fstpl 24(%esp) -..B1.20: - fldl 16(%esp) - movl 28(%esp), %ecx - movl %ecx, %ebx - andl $2146435072, %ebx - shrl $20, %ebx - movl 40(%esp), %edx - movl %ebx, 60(%esp) - movl %ecx, %ebx - movl 24(%esp), %eax - andl $1048575, %ebx - movl 44(%esp), %esi - movl %edx, 68(%esp) -..B1.21: - movl %eax, %edi - movl %ecx, %edx - subl 68(%esp), %edi - sbbl %esi, %edx - movl %edx, 16(%esp) - jb ..B1.22 -..B1.88: - orl 16(%esp), %edi - jne ..B1.34 -..B1.22: - subl 68(%esp), %eax - subl %esi, %ecx - orl %ecx, %eax - je ..B1.33 -..B1.23: - fldl 24(%esp) - cmpl $2046, 60(%esp) - je ..B1.29 -..B1.24: - fld %st(0) - fadd %st(1), %st - fcomp %st(2) - fnstsw %ax - sahf - ja ..B1.29 - jp ..B1.29 -..B1.25: - fstp %st(1) - movl 56(%esp), %eax - cmpl $0, 48(%esp) - movl $0, (%eax) - je ..B1.28 -..B1.26: - fchs -..B1.28: - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.29: - movl 56(%esp), %edx - movl 52(%esp), %eax - movl %eax, (%edx) -..B1.30: - cmpl $0, 48(%esp) - fsubp %st, %st(1) - je ..B1.32 -..B1.31: - fchs -..B1.32: - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.33: - fstp %st(0) - fldz - fmull 8(%ebp) - movl 56(%esp), %edx - movl 52(%esp), %eax - movl %eax, (%edx) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.34: - cmpl $0, 60(%esp) - jne ..B1.43 -..B1.35: - movl %eax, %edx - orl %ebx, %edx - je ..B1.43 -..B1.36: - movl %eax, 8(%esp) - testl %ebx, %ebx - movl %ebx, 12(%esp) - je ..B1.38 -..B1.37: - bsr %ebx, %edx - negl %edx - addl $20, %edx - movl %edx, 60(%esp) - jmp ..B1.39 -..B1.38: - bsr 8(%esp), %edx - negl %edx - addl $52, %edx - movl %edx, 60(%esp) -..B1.39: - cmpl $31, 60(%esp) - jbe ..B1.41 -..B1.40: - movl %eax, %ebx - xorl %esi, %esi - movl %edx, %ecx - shll %cl, %ebx -..B1.42: - movl %edx, %eax - negl %eax - incl %eax - movl %eax, 60(%esp) - jmp ..B1.44 -..B1.41: - movl %eax, %esi - movl %edx, %ecx - shldl %cl, %eax, %ebx - shll %cl, %esi - jmp ..B1.42 -..B1.43: - movl %eax, %esi - orl $1048576, %ebx -..B1.44: - movl 36(%esp), %edx - movl 32(%esp), %eax - movl %edx, 20(%esp) - cmpl $0, 64(%esp) - jne ..B1.53 -..B1.45: - movl %eax, %edx - orl 20(%esp), %edx - je ..B1.53 -..B1.46: - cmpl $0, 20(%esp) - je ..B1.48 -..B1.47: - bsr 20(%esp), %edx - negl %edx - addl $20, %edx - movl %edx, 64(%esp) - jmp ..B1.49 -..B1.48: - bsr 32(%esp), %edx - negl %edx - addl $52, %edx - movl %edx, 64(%esp) -..B1.49: - cmpl $31, 64(%esp) - jbe ..B1.51 -..B1.50: - movl %edx, %ecx - shll %cl, %eax - movl $0, 16(%esp) - movl %eax, 20(%esp) -..B1.52: - movl %ecx, %eax - negl %eax - incl %eax - movl %eax, 64(%esp) - jmp ..B1.54 -..B1.51: - movl %edx, %ecx - movl 20(%esp), %edx - shldl %cl, %eax, %edx - shll %cl, %eax - movl %edx, 20(%esp) - movl %eax, 16(%esp) - jmp ..B1.52 -..B1.53: - movl %eax, 16(%esp) - orl $1048576, 20(%esp) -..B1.54: - movl 60(%esp), %eax - xorl %edx, %edx - subl 64(%esp), %eax - xorl %ecx, %ecx - movl %eax, 60(%esp) - cmpl $-1, %eax - je ..B1.60 -..B1.56: - movl %edx, %edi - addl %ecx, %ecx - shrl $31, %edi - addl %edx, %edx - orl %edi, %ecx - movl %esi, %edi - subl 16(%esp), %edi - movl %ebx, %edi - sbbl 20(%esp), %edi - jb ..B1.58 -..B1.57: - subl 16(%esp), %esi - sbbl 20(%esp), %ebx - addl $1, %edx - adcl $0, %ecx -..B1.58: - movl %esi, %edi - addl %ebx, %ebx - shrl $31, %edi - decl %eax - addl %esi, %esi - orl %edi, %ebx - cmpl $-1, %eax - jne ..B1.56 -..B1.60: - movl %esi, %eax - orl %ebx, %eax - je ..B1.83 -..B1.61: - movl %ebx, %eax - shll $31, %eax - shrl $1, %esi - shrl $1, %ebx - orl %esi, %eax - testl %ebx, %ebx - movl %eax, 8(%esp) - movl %ebx, 12(%esp) - je ..B1.63 -..B1.62: - bsr %ebx, %ecx - negl %ecx - addl $20, %ecx - jmp ..B1.64 -..B1.63: - bsr 8(%esp), %ecx - negl %ecx - addl $52, %ecx -..B1.64: - cmpl $31, %ecx - jbe ..B1.66 -..B1.65: - movl %eax, %ebx - xorl %eax, %eax - shll %cl, %ebx - jmp ..B1.67 -..B1.66: - shldl %cl, %eax, %ebx - shll %cl, %eax -..B1.67: - movl 64(%esp), %esi - subl %ecx, %esi - movl %esi, 64(%esp) - testl %esi, %esi - jle ..B1.69 -..B1.68: - movl %ebx, %esi - andl $1048575, %esi - jmp ..B1.73 -..B1.69: - movl %esi, %ecx - negl %ecx - incl %ecx - movl %ecx, 64(%esp) - cmpl $31, %ecx - jbe ..B1.71 -..B1.70: - movl %ebx, %eax - xorl %esi, %esi - shrl %cl, %eax - jmp ..B1.72 -..B1.71: - movl %ebx, %esi - shrdl %cl, %ebx, %eax - shrl %cl, %esi -..B1.72: - movl $0, 64(%esp) -..B1.73: - movl 64(%esp), %ecx - shll $20, %ecx - orl %ecx, %esi - movl %eax, 8(%esp) - movl %esi, 12(%esp) - fldl 8(%esp) - fld %st(0) - fadd %st(1), %st - fcom %st(2) - fnstsw %ax - sahf - jb ..B1.89 -..B1.74: - fucomp %st(2) - fnstsw %ax - sahf - jp ..B1.75 - je ..B1.81 -..B1.75: - incl %edx - fsubp %st, %st(1) - jmp ..B1.76 -..B1.89: - fstp %st(2) - fstp %st(1) -..B1.76: - andl $2147483647, %edx - movl 52(%esp), %eax - imull %edx, %eax - movl 56(%esp), %edx - cmpl $0, 48(%esp) - movl %eax, (%edx) - je ..B1.78 -..B1.77: - fchs -..B1.78: - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.81: - fstp %st(1) - movl %edx, %ecx - xorl %eax, %eax - andl $1, %ecx - orl %eax, %ecx - je ..B1.76 -..B1.82: - fchs - incl %edx - jmp ..B1.76 -..B1.83: - fstp %st(0) - fldz - andl $2147483647, %edx - fmull 8(%ebp) - movl 52(%esp), %eax - imull %edx, %eax - movl 56(%esp), %edx - movl %eax, (%edx) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type remquo,@function - .size remquo,.-remquo - .data -# -- End remquo - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xc1e00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquof.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquof.S deleted file mode 100644 index 44803efcac..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquof.S +++ /dev/null @@ -1,75 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remquof.c" - .text -..TXTST0: -# -- Begin remquof - .text - .align 16,0x90 - .globl remquof -remquof: -# parameter 1: 48 + %esp -# parameter 2: 52 + %esp -# parameter 3: 56 + %esp -..B1.1: -..L1: - - pushl %ebx - subl $40, %esp - flds 48(%esp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl 56(%esp), %eax - fstpl (%esp) - flds 52(%esp) - fstpl 8(%esp) - movl %eax, 16(%esp) - call remquo@PLT -..B1.2: - addl $40, %esp - popl %ebx - ret - .align 16,0x90 - .type remquof,@function - .size remquof,.-remquof - .data -# -- End remquof - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquol.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquol.S deleted file mode 100644 index 1421eee78c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/remquol.S +++ /dev/null @@ -1,900 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remquol.c" - .text -..TXTST0: -# -- Begin remquol - .text - .align 16,0x90 - .globl remquol -remquol: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -# parameter 3: 32 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp - movl 32(%ebp), %esi -..B1.2: - fnstcw 30(%esp) -..B1.3: - movzwl 28(%ebp), %eax - movl $0, (%esi) - andl $32767, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jne ..B1.6 -..B1.4: - cmpl $0, 24(%ebp) - jne ..B1.6 -..B1.5: - cmpl $0, 20(%ebp) - je ..B1.54 -..B1.6: - movzwl 16(%ebp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.51 -..B1.7: - cmpl $32767, %eax - je ..B1.26 -..B1.8: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - movl %eax, (%esp) - movzwl 30(%esp), %eax - movl %eax, %ecx - movzbl 29(%ebp), %edx - andl $3840, %ecx - andl $128, %edx - shrl $7, %edx - movl %edx, 4(%esp) - cmpl $768, %ecx - je ..B1.25 -..B1.9: - andl $-3841, %eax - orl $-64768, %eax - movw %ax, 28(%esp) -..B1.10: - fldcw 28(%esp) -..B1.11: - movl $1, %edi -..B1.12: - fldt 8(%ebp) - addl $-32, %esp - fstpt (%esp) - fldt 20(%ebp) - fstpt 12(%esp) - movl %esi, 24(%esp) - call __libm_remquol -..B1.69: - addl $32, %esp -..B1.13: - fstpt 16(%esp) - testl %edi, %edi - je ..B1.15 -..B1.14: - fldcw 30(%esp) -..B1.15: - movl (%esi), %edx - testl %edx, %edx - je ..B1.19 -..B1.16: - movl 4(%esp), %eax - imull iones@GOTOFF(%ebx,%eax,4), %edx - cmpl (%esp), %eax - je ..B1.18 -..B1.17: - orl $-2147483648, %edx - movl %edx, (%esi) - jmp ..B1.19 -..B1.18: - andl $2147483647, %edx - movl %edx, (%esi) -..B1.19: - movzwl 24(%esp), %eax - testl $32767, %eax - jne ..B1.24 -..B1.20: - cmpl $0, 20(%esp) - jne ..B1.23 -..B1.21: - cmpl $0, 16(%esp) - jne ..B1.23 -..B1.22: - movl (%esp), %eax - fldl _zeros@GOTOFF(%ebx,%eax,8) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.23: - fldl _small_value_64@GOTOFF(%ebx) - fmul %st(0), %st - fstpl 8(%esp) - fldt 16(%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.24: - fldt 16(%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - xorl %edi, %edi - jmp ..B1.12 -..B1.26: - cmpl $-2147483648, 24(%ebp) - jne ..B1.28 -..B1.27: - cmpl $0, 20(%ebp) - je ..B1.34 -..B1.28: - movzwl 30(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.40 -..B1.29: - orl $-64768, %edx - movw %dx, 28(%esp) -..B1.30: - fldcw 28(%esp) -..B1.31: - fldt 8(%ebp) - fldt 20(%ebp) - faddp %st, %st(1) - fstpt 16(%esp) -..B1.32: - fldcw 30(%esp) -..B1.33: - fldt 16(%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.34: - cmpl $32767, %edx - je ..B1.41 -..B1.35: - testl %edx, %edx - jne ..B1.39 -..B1.36: - cmpl $0, 12(%ebp) - jne ..B1.38 -..B1.37: - cmpl $0, 8(%ebp) - je ..B1.39 -..B1.38: - fldl _smallest_value_64@GOTOFF(%ebx) - fstpl 8(%esp) -..B1.39: - fldt 8(%ebp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.40: - fldt 8(%ebp) - fldt 20(%ebp) - faddp %st, %st(1) - fstpt 16(%esp) - jmp ..B1.33 -..B1.41: - cmpl $-2147483648, 12(%ebp) - jne ..B1.39 -..B1.42: - cmpl $0, 8(%ebp) - jne ..B1.39 -..B1.43: - movzwl 30(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.50 -..B1.44: - orl $-64768, %edx - movw %dx, 28(%esp) -..B1.45: - fldcw 28(%esp) -..B1.46: - movl $1, %eax -..B1.47: - fldl _infs@GOTOFF(%ebx) - testl %eax, %eax - fmull _zeros@GOTOFF(%ebx) - fstpl (%esp) - fldl (%esp) - fstpt 16(%esp) - je ..B1.49 -..B1.48: - fldcw 30(%esp) -..B1.49: - fldt 16(%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.50: - xorl %eax, %eax - jmp ..B1.47 -..B1.51: - cmpl $-2147483648, 12(%ebp) - jne ..B1.28 -..B1.52: - cmpl $0, 8(%ebp) - jne ..B1.28 -..B1.53: - cmpl $32767, %eax - je ..B1.26 - jmp ..B1.34 -..B1.54: - movzwl 30(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.66 -..B1.55: - orl $-64768, %edx - movw %dx, 28(%esp) -..B1.56: - fldcw 28(%esp) -..B1.57: - movl $1, %edx -..B1.58: - movzwl 16(%ebp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.63 -..B1.59: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - fstpl (%esp) - fldl (%esp) - fstpt 16(%esp) -..B1.60: - testl %edx, %edx - je ..B1.62 -..B1.61: - fldcw 30(%esp) -..B1.62: - fldt 16(%esp) - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.63: - cmpl $-2147483648, 12(%ebp) - jne ..B1.65 -..B1.64: - cmpl $0, 8(%ebp) - je ..B1.59 -..B1.65: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ebx) - fstpt 16(%esp) - jmp ..B1.60 -..B1.66: - xorl %edx, %edx - jmp ..B1.58 - .align 16,0x90 - .type remquol,@function - .size remquol,.-remquol - .data -# -- End remquol - .text -# -- Begin __libm_remquol - .text - .align 16,0x90 -__libm_remquol: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -# parameter 3: 32 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - fldt 8(%ebp) - call ..L4 -..L4: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%esi), %esi - fstpt 156(%esp) - fldt 156(%esp) - andb $127, 29(%ebp) - fldt 20(%ebp) - movzwl 16(%ebp), %eax - andl $32767, %eax - movzwl 28(%ebp), %edi - andl $32767, %edi - fstpt 168(%esp) - fldt 168(%esp) - cmpl $32703, %eax - fldl _ones@GOTOFF(%esi) - movl 32(%ebp), %ebx - movl $0, 168(%esp) - jl ..B2.5 -..B2.2: - fstp %st(0) - cmpl $32703, %edi - jl ..B2.9 -..B2.3: - fldl 8+_scales@GOTOFF(%esi) - fmul %st, %st(2) - fxch %st(2) - fstpt (%esp) - fmulp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - fstpt 20(%ebp) - movl %ebx, 24(%esp) - call __libm_remquol -..B2.4: - fmull _scales@GOTOFF(%esi) - fstpt 156(%esp) - fldt 156(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.5: - cmpl $64, %edi - jge ..B2.12 -..B2.6: - fstp %st(0) - fldl _scales@GOTOFF(%esi) - fmul %st, %st(1) - fxch %st(1) - fstpt 20(%ebp) - fldt 20(%ebp) - fxch %st(1) - fstpt 32(%esp) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl %ebx, 24(%esp) - call __libm_remquol -..B2.7: - fldt 32(%esp) - fmulp %st, %st(1) - fstpt (%esp) - fldt 20(%ebp) - fstpt 12(%esp) - movl %ebx, 24(%esp) - call __libm_remquol -..B2.8: - fmull 8+_scales@GOTOFF(%esi) - fstpt 156(%esp) - fldt 156(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.9: - fldl 8+_scales@GOTOFF(%esi) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fstpt 12(%esp) - movl %ebx, 24(%esp) - call __libm_remquol -..B2.10: - fldl _scales@GOTOFF(%esi) - fmulp %st, %st(1) - fstpt (%esp) - fldt 20(%ebp) - fstpt 12(%esp) - movl %ebx, 24(%esp) - call __libm_remquol -..B2.11: - fstpt 156(%esp) - fldt 156(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.12: - lea 1(%eax), %edx - cmpl %edx, %edi - jg ..B2.34 -..B2.13: - lea -32(%eax), %edx - cmpl %edx, %edi - jle ..B2.22 -..B2.14: - fstp %st(0) - fldt 168(%esp) - fld %st(2) - fdiv %st(2), %st - fld %st(2) - fsub %st(2), %st - fldl _TWO_63H@GOTOFF(%esi) - fld %st(0) - fadd %st(3), %st - fstpt 32(%esp) - fldt 32(%esp) - fsubp %st, %st(1) - fld %st(0) - movl 32(%esp), %edx - fsubr %st(3), %st - fabs - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - fsubrp %st, %st(6) - fxch %st(1) - fmul %st(3), %st - fsubrp %st, %st(5) - fldl _halfs@GOTOFF(%esi) - fucom %st(1) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - jp ..B2.15 - je ..B2.16 -..B2.15: - fstp %st(2) - fstp %st(0) - fstp %st(0) - fstp %st(0) - movl %edx, (%ebx) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.16: - fmul %st(3), %st - fld %st(4) - fabs - fcompp - fnstsw %ax - sahf - jp ..B2.17 - jbe ..B2.21 -..B2.17: - fcompp - fnstsw %ax - sahf - ja ..B2.19 - jp ..B2.19 -..B2.18: - decl %edx - faddp %st, %st(1) - movl %edx, (%ebx) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.19: - incl %edx - fsubrp %st, %st(1) - movl %edx, (%ebx) -..B2.20: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.21: - fstp %st(1) - fstp %st(0) - fstp %st(0) - movl %edx, (%ebx) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.22: - fldt 168(%esp) - subl %edi, %eax - fstpt 56(%esp) - fldt 56(%esp) - fld %st(1) - fdiv %st(3), %st - fld %st(3) - fsubp %st, %st(2) - addl $-31, %eax - movl %eax, 80(%esp) - jle ..B2.35 -..B2.23: - fstpt 96(%esp) - fldt 96(%esp) - movzwl 104(%esp), %edx - fstpt 44(%esp) - fldt 44(%esp) - movl %edx, 144(%esp) - movl 48(%esp), %edx - movzwl 52(%esp), %ecx - fxch %st(2) - fstpt 108(%esp) - movl %edx, 136(%esp) - movzwl 176(%esp), %edx - fstpt 84(%esp) - fldt 84(%esp) - movl %ecx, 140(%esp) - movzwl 116(%esp), %ecx - movl %edx, 128(%esp) - movzwl 92(%esp), %edx - fstpt 32(%esp) - fldt 32(%esp) - fldl _TWO_63H@GOTOFF(%esi) - movl %ecx, 132(%esp) - movl 172(%esp), %ecx - movl %edx, 68(%esp) - movl 36(%esp), %edx - movl %ecx, 124(%esp) - movzwl 40(%esp), %ecx - andl $32767, %ecx - movl %ecx, 148(%esp) - movl %esi, 76(%esp) - movl %edx, 120(%esp) - xorl %edx, %edx - movl %edi, 152(%esp) - movl %ebx, 72(%esp) - movl 68(%esp), %esi - movl %eax, %ecx -..B2.24: - movl 140(%esp), %ebx - andl $-32768, %esi - subl %eax, %ebx - subl %eax, %ecx - movl 144(%esp), %edi - andl $32767, %ebx - andl $-32768, %edi - orl %ebx, %edi - movl 136(%esp), %ebx - movw %di, 104(%esp) - movl %ebx, 100(%esp) - fldt 96(%esp) - movl 128(%esp), %ebx - fmul %st(5), %st - movl %edi, 144(%esp) - addl %eax, %ebx - movl 132(%esp), %edi - andl $32767, %ebx - andl $-32768, %edi - fadd %st(1), %st - orl %ebx, %edi - movl %edi, 132(%esp) - xorl %ebx, %ebx - movw %di, 116(%esp) - movl 124(%esp), %edi - movl %edi, 112(%esp) - movl 148(%esp), %edi - testl %edi, %edi - fstpt 32(%esp) - fldt 32(%esp) - fsub %st(1), %st - fldt 108(%esp) - setne %bl - imull %eax, %ebx - fmul %st(1), %st - addl %edi, %ebx - fsubrp %st, %st(6) - andl $32767, %ebx - orl %ebx, %esi - movl 120(%esp), %ebx - movw %si, 92(%esp) - movl %ebx, 88(%esp) - fldt 84(%esp) - fmulp %st, %st(1) - shll %cl, %edx - cmpl $32, %ecx - movl %eax, %ecx - fsubrp %st, %st(5) - jb ..L5 - movl $0, %edx -..L5: - fxch %st(4) - fstpt 156(%esp) - fldt 156(%esp) - movzwl 164(%esp), %edi - andl $32767, %edi - subl 152(%esp), %edi - movl %edi, %eax - addl 32(%esp), %edx - addl $-31, %eax - fxch %st(4) - jg ..B2.24 -..B2.25: - movl %ecx, 80(%esp) - movl 72(%esp), %ebx - movl 76(%esp), %esi -..B2.26: - fldt 56(%esp) - fld %st(1) - fxch %st(4) - fmul %st(6), %st - movl 80(%esp), %ecx - fadd %st, %st(4) - fxch %st(4) - fstpt 32(%esp) - fldt 32(%esp) - fld %st(3) - shll %cl, %edx - cmpl $32, %ecx - fxch %st(1) - fsub %st(3), %st - jb ..L6 - movl $0, %edx -..L6: - fmul %st, %st(2) - addl 32(%esp), %edx - fxch %st(2) - fsubrp %st, %st(7) - fmul %st(1), %st - fsubrp %st, %st(6) - fld %st(5) - fabs - fldl _halfs@GOTOFF(%esi) - fmul %st(6), %st - fcom %st(1) - fnstsw %ax - sahf - ja ..B2.33 -..B2.27: - fcompp - fnstsw %ax - sahf - jae ..B2.32 - jp ..B2.32 -..B2.28: - fstp %st(1) - fstp %st(1) - movl %edx, (%ebx) - fcompp - fnstsw %ax - sahf - ja ..B2.30 - jp ..B2.30 -..B2.29: - fsubrp %st, %st(1) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.30: - faddp %st, %st(1) -..B2.31: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.32: - fstp %st(0) - fstp %st(2) - fldt 56(%esp) - fxch %st(3) - fdivr %st(4), %st - fadd %st(2), %st - fstpt 32(%esp) - fldt 32(%esp) - fsubp %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - addl 32(%esp), %edx - fxch %st(2) - fsubrp %st, %st(3) - fmulp %st, %st(1) - movl %edx, (%ebx) - fsubrp %st, %st(1) - fstpt 156(%esp) - fldt 156(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.33: - fstp %st(2) - fstp %st(2) - fstp %st(2) - fstp %st(2) - fstp %st(2) - fstp %st(0) - fstp %st(0) - movl %edx, (%ebx) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.34: - fstp %st(0) - fstp %st(0) - movl $0, (%ebx) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.35: - fstp %st(2) - fldl _TWO_63H@GOTOFF(%esi) - xorl %edx, %edx - jmp ..B2.26 - .align 16,0x90 - .type __libm_remquol,@function - .size __libm_remquol,.-__libm_remquol - .data -# -- End __libm_remquol - .section .rodata, "a" - .align 4 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_scales: - .long 0 - .long 1341128704 - .long 0 - .long 804257792 - .type _scales,@object - .size _scales,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_halfs: - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .type _halfs,@object - .size _halfs,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rint_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rint_gen.S deleted file mode 100644 index 2106963d3e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rint_gen.S +++ /dev/null @@ -1,61 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "rint_gen.c" - .text -..TXTST0: -# -- Begin rint - .text - .align 16,0x90 - .globl rint -rint: -# parameter 1: 4 + %esp -..B1.1: -..L1: - -..B1.2: - fldl 4(%esp) - frndint - ret -..B1.3: - .align 16,0x90 - .type rint,@function - .size rint,.-rint - .data -# -- End rint - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rintf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rintf_gen.S deleted file mode 100644 index 831ed856b1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rintf_gen.S +++ /dev/null @@ -1,61 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "rintf_gen.c" - .text -..TXTST0: -# -- Begin rintf - .text - .align 16,0x90 - .globl rintf -rintf: -# parameter 1: 4 + %esp -..B1.1: -..L1: - -..B1.2: - flds 4(%esp) - frndint - ret -..B1.3: - .align 16,0x90 - .type rintf,@function - .size rintf,.-rintf - .data -# -- End rintf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rintl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rintl.S deleted file mode 100644 index 2849fd3483..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/rintl.S +++ /dev/null @@ -1,160 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "rintl.c" - .text -..TXTST0: -# -- Begin rintl - .text - .align 16,0x90 - .globl rintl -rintl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzbl 17(%ebp), %edx - movzwl 16(%ebp), %ecx - andl $128, %edx - andl $32767, %ecx - shrl $7, %edx - movzwl 14(%esp), %eax - cmpl $16446, %ecx - jge ..B1.13 -..B1.4: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.20 -..B1.5: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.6: - fldcw 12(%esp) -..B1.7: - movl $1, %eax -..B1.8: - fldt 8(%ebp) - testl %eax, %eax - call ..L2 -..L2: - popl %ecx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ecx), %ecx - fldl _TWO_63@GOTOFF(%ecx,%edx,8) - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 8(%ebp) - je ..B1.10 -..B1.9: - fldcw 14(%esp) -..B1.10: - fldt 8(%ebp) - fldl _zeros@GOTOFF(%ecx) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B1.12 - je ..B1.19 -..B1.12: - movl %ebp, %esp - popl %ebp - ret -..B1.13: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.21 -..B1.14: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.15: - fldcw 12(%esp) -..B1.16: - fldt 8(%ebp) - fstpt (%esp) -..B1.17: - fldcw 14(%esp) -..B1.18: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.19: - fstp %st(0) - fldl _zeros@GOTOFF(%ecx,%edx,8) - movl %ebp, %esp - popl %ebp - ret -..B1.20: - xorl %eax, %eax - jmp ..B1.8 -..B1.21: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.18 - .align 16,0x90 - .type rintl,@function - .size rintl,.-rintl - .data -# -- End rintl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_63: - .long 0 - .long 1138753536 - .long 0 - .long 3286237184 - .type _TWO_63,@object - .size _TWO_63,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/round_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/round_wmt.S deleted file mode 100644 index 756ba57df5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/round_wmt.S +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "round_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin round - .text - .align 16,0x90 - .globl round -round: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - pextrw $3, %xmm0, %ecx - movl $32752, %eax - andl %ecx, %eax - cmpl $16352, %eax - jl .L_2TAG_PACKET_0.0.2 - cmpl $17200, %eax - jge .L_2TAG_PACKET_1.0.2 - movq 16(%ebx), %xmm1 - andpd %xmm0, %xmm1 - orpd (%ebx), %xmm1 - addsd %xmm1, %xmm0 - movq 24(%ebx), %xmm1 - movq 32(%ebx), %xmm2 - andpd %xmm0, %xmm1 - psubd %xmm1, %xmm2 - psrlq $52, %xmm2 - psrlq %xmm2, %xmm0 - psllq %xmm2, %xmm0 - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_0.0.2: - addsd %xmm0, %xmm0 - testl $32768, %ecx - jne .L_2TAG_PACKET_3.0.2 - fldz - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_3.0.2: - fldl 40(%ebx) - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_1.0.2: - cmpl $32752, %eax - je .L_2TAG_PACKET_5.0.2 - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_5.0.2: - fldl 112(%esp) - fldz - faddp - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_2.0.2: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_4.0.2: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type round,@function - .size round,.-round - .data -# -- End round - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 0 - .long 2147483648 - .long 0 - .long 2146435072 - .long 0 - .long 1127219200 - .long 0 - .long 2147483648 - .type static_const_table,@object - .size static_const_table,48 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/roundf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/roundf_wmt.S deleted file mode 100644 index 99c7f46f0c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/roundf_wmt.S +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "roundf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin roundf - .text - .align 16,0x90 - .globl roundf -roundf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %eax - testl %eax, %eax - jl .L_2TAG_PACKET_0.0.2 - cmpl $1056964608, %eax - jl .L_2TAG_PACKET_1.0.2 - cmpl $1258291200, %eax - jge .L_2TAG_PACKET_2.0.2 - cmpl $1065353216, %eax - je .L_2TAG_PACKET_2.0.2 - addss (%ebx), %xmm0 - cvttss2si %xmm0, %eax - movl %eax, 24(%esp) - fildl 24(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_1.0.2: - fldz - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_4.0.2: - flds 4(%ebx) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_0.0.2: - andl $2147483647, %eax - cmpl $1056964608, %eax - jl .L_2TAG_PACKET_4.0.2 - cmpl $1258291200, %eax - jge .L_2TAG_PACKET_2.0.2 - cmpl $1065353216, %eax - je .L_2TAG_PACKET_2.0.2 - subss (%ebx), %xmm0 - cvttss2si %xmm0, %eax - movl %eax, 24(%esp) - fildl 24(%esp) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_2.0.2: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_3.0.2: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type roundf,@function - .size roundf,.-roundf - .data -# -- End roundf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1056964608 - .long 2147483648 - .type static_const_table,@object - .size static_const_table,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/roundl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/roundl.S deleted file mode 100644 index ae7e25123d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/roundl.S +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "roundl.c" - .text -..TXTST0: -# -- Begin roundl - .text - .align 16,0x90 - .globl roundl -roundl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - subl $24, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - call ..L2 -..L2: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi - cmpl $16446, %eax - jge ..B1.25 -..B1.4: - cmpl $16383, %eax - jl ..B1.19 -..B1.5: - cmpl $16414, %eax - jge ..B1.7 -..B1.6: - movl 12(%ebp), %edi - lea 2(%eax), %ecx - negl %eax - movl %edi, %edx - addl $30, %eax - shll %cl, %edx - movl %eax, %ecx - shrl %cl, %edi - shll %cl, %edi - movl %edi, 12(%ebp) - movl $0, 8(%ebp) - jmp ..B1.10 -..B1.7: - jle ..B1.9 -..B1.8: - movl 8(%ebp), %edi - lea 2(%eax), %ecx - negl %eax - movl %edi, %edx - addl $30, %eax - shll %cl, %edx - movl %eax, %ecx - shrl %cl, %edi - shll %cl, %edi - movl %edi, 8(%ebp) - jmp ..B1.10 -..B1.9: - movl 8(%ebp), %edx - movl $0, 8(%ebp) -..B1.10: - testl %edx, %edx - jge ..B1.18 -..B1.11: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.31 -..B1.12: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.13: - fldcw 12(%esp) -..B1.14: - movl $1, %edx -..B1.15: - fldt 8(%ebp) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - testl %edx, %edx - faddl _ones@GOTOFF(%esi,%eax,8) - fstpt (%esp) - je ..B1.17 -..B1.16: - fldcw 14(%esp) -..B1.17: - fldt (%esp) - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - fldt 8(%ebp) - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - cmpl $16382, %eax - je ..B1.33 -..B1.20: - testl %eax, %eax - jne ..B1.24 -..B1.21: - cmpl $0, 12(%ebp) - jne ..B1.23 -..B1.22: - cmpl $0, 8(%ebp) - je ..B1.24 -..B1.23: - fldl _smallest_value_64@GOTOFF(%esi) - fstpl 16(%esp) -..B1.24: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl _zeros@GOTOFF(%esi,%eax,8) - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.32 -..B1.26: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.27: - fldcw 12(%esp) -..B1.28: - fldt 8(%ebp) - fmull _ones@GOTOFF(%esi) - fstpt (%esp) -..B1.29: - fldcw 14(%esp) -..B1.30: - fldt (%esp) - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.31: - xorl %edx, %edx - jmp ..B1.15 -..B1.32: - fldt 8(%ebp) - fmull _ones@GOTOFF(%esi) - fstpt (%esp) - jmp ..B1.30 -..B1.33: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl _ones@GOTOFF(%esi,%eax,8) - addl $24, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type roundl,@function - .size roundl,.-roundl - .data -# -- End roundl - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalb_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalb_wmt.S deleted file mode 100644 index b4ee579932..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalb_wmt.S +++ /dev/null @@ -1,328 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalb_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin scalb - .text - .align 16,0x90 - .globl scalb -scalb: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movsd 136(%esp), %xmm1 - movq %xmm0, (%esp) - movq %xmm1, 8(%esp) - pextrw $3, %xmm0, %eax - pextrw $3, %xmm1, %edx - andl $32752, %eax - andl $32752, %edx - subl $16, %eax - subl $16368, %edx - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.3 - cmpl $256, %edx - jae .L_2TAG_PACKET_0.0.3 - movq 144(%ebx), %xmm7 -.L_2TAG_PACKET_1.0.3: - movdqa %xmm1, %xmm2 - addsd %xmm7, %xmm2 - movd %xmm2, %ecx - shll $4, %ecx - addl %ecx, %eax - movdqa %xmm2, %xmm3 - subsd %xmm7, %xmm3 - comisd %xmm1, %xmm3 - jne .L_2TAG_PACKET_2.0.3 - cmpl $32736, %eax - jae .L_2TAG_PACKET_3.0.3 - psllq $52, %xmm2 - paddq %xmm2, %xmm0 -.L_2TAG_PACKET_4.0.3: - movq %xmm0, 16(%esp) - fldl 16(%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_6.0.3: - fldl (%esp) - faddl 8(%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_2.0.3: - fldl 48(%ebx) - fmull (%ebx) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_7.0.3: - pextrw $3, %xmm1, %ecx - comisd %xmm7, %xmm0 - je .L_2TAG_PACKET_8.0.3 - cmpl $32736, %eax - je .L_2TAG_PACKET_9.0.3 - pextrw $3, %xmm0, %eax - shrl $12, %eax - andl $8, %eax - testl $32768, %ecx - je .L_2TAG_PACKET_10.0.3 - fldl 48(%ebx,%eax) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_9.0.3: - xorl $32768, %ecx -.L_2TAG_PACKET_8.0.3: - testl $32768, %ecx - je .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_11.0.3: - fldl (%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_12.0.3: - movq 80(%ebx), %xmm7 - movq 96(%ebx), %xmm6 - pandn %xmm1, %xmm7 - comisd %xmm6, %xmm7 - jc .L_2TAG_PACKET_2.0.3 - pextrw $3, %xmm0, %eax - shrl $12, %eax - andl $8, %eax -.L_2TAG_PACKET_10.0.3: - fldl (%ebx,%eax) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_0.0.3: - movl %edx, %ecx - pxor %xmm7, %xmm7 - shrl $4, %ecx - ucomisd %xmm1, %xmm0 - jp .L_2TAG_PACKET_6.0.3 - addl $12, %ecx - cmpl $16384, %edx - je .L_2TAG_PACKET_7.0.3 - movdqa %xmm1, %xmm2 - comisd %xmm7, %xmm1 - je .L_2TAG_PACKET_11.0.3 - movd %ecx, %xmm3 - cmpl $32736, %eax - je .L_2TAG_PACKET_12.0.3 - psllq %xmm3, %xmm2 - testl %edx, %edx - jl .L_2TAG_PACKET_2.0.3 - pcmpeqd %xmm7, %xmm2 - cmpl $832, %edx - jae .L_2TAG_PACKET_13.0.3 - pmovmskb %xmm2, %ecx - cmpl $65535, %ecx - jne .L_2TAG_PACKET_2.0.3 - comisd %xmm7, %xmm0 - je .L_2TAG_PACKET_11.0.3 - cmpl $256, %edx - jae .L_2TAG_PACKET_14.0.3 - mulsd 112(%ebx), %xmm0 - movq 160(%ebx), %xmm7 - pextrw $3, %xmm0, %eax - andl $32752, %eax - subl $16, %eax - jmp .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_3.0.3: - jge .L_2TAG_PACKET_15.0.3 - sarl $4, %eax - cmpl $-53, %eax - jl .L_2TAG_PACKET_16.0.3 - movd 176(%ebx), %xmm3 - movq 128(%ebx), %xmm4 - pxor %xmm7, %xmm7 - pshufd $236, %xmm2, %xmm2 - paddd %xmm3, %xmm2 - psllq $52, %xmm2 - paddq %xmm2, %xmm0 - mulsd %xmm4, %xmm0 - comisd %xmm7, %xmm0 - jne .L_2TAG_PACKET_4.0.3 - movl $53, %ecx - jmp .L_2TAG_PACKET_17.0.3 -.L_2TAG_PACKET_13.0.3: - comisd %xmm7, %xmm0 - je .L_2TAG_PACKET_11.0.3 -.L_2TAG_PACKET_14.0.3: - pextrw $3, %xmm1, %edx - testl $32768, %edx - jne .L_2TAG_PACKET_16.0.3 -.L_2TAG_PACKET_15.0.3: - lea 16(%ebx), %edx - movl $53, %ecx - pxor %xmm1, %xmm1 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_16.0.3: - lea 32(%ebx), %edx - movl $54, %ecx - movq 64(%ebx), %xmm1 - jmp .L_2TAG_PACKET_18.0.3 -.L_2TAG_PACKET_18.0.3: - pxor %xmm7, %xmm7 - pextrw $3, %xmm0, %eax - shrl $12, %eax - andl $8, %eax - addl %edx, %eax - movq (%edx), %xmm0 - mulsd (%eax), %xmm0 - pand %xmm0, %xmm1 - comisd %xmm7, %xmm1 - jne .L_2TAG_PACKET_4.0.3 -.L_2TAG_PACKET_17.0.3: - movq %xmm0, 16(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 136(%esp), %eax - movl %eax, 4(%esp) - lea 48(%esp), %eax - movl %eax, 8(%esp) - movl %ecx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl 16(%esp) -.L_2TAG_PACKET_5.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type scalb,@function - .size scalb,.-scalb - .data -# -- End scalb - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 1 - .long 1048576 - .long 1 - .long 1048576 - .long 0 - .long 1130364928 - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .long 0 - .long 1015021568 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 4294967241 - .long 1127743487 - .long 4294967241 - .long 1127743487 - .long 55 - .long 55 - .long 55 - .long 55 - .type static_const_table,@object - .size static_const_table,192 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbf.S deleted file mode 100644 index d6d68d7ec3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbf.S +++ /dev/null @@ -1,410 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbf.c" - .text -..TXTST0: -# -- Begin scalbf - .text - .align 16,0x90 - .globl scalbf -scalbf: -# parameter 1: 32 + %esp -# parameter 2: 36 + %esp -..B1.1: -..L1: - - pushl %esi - pushl %edi - pushl %ebx - pushl %ebp - subl $12, %esp - movzwl 34(%esp), %ebx - movl %ebx, %edx - andl $32640, %edx - movzwl 38(%esp), %edi - andl $32640, %edi - shrl $7, %edx - shrl $7, %edi - call ..L2 -..L2: - popl %ebp - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebp), %ebp - cmpl $255, %edx - je ..B1.48 -..B1.2: - cmpl $255, %edi - je ..B1.31 -..B1.3: - cmpl $127, %edi - jl ..B1.16 -..B1.4: - cmpl $150, %edi - jge ..B1.7 -..B1.5: - movl 36(%esp), %esi - movl %edi, %ecx - andl $8388607, %esi - negl %ecx - movl %esi, %eax - addl $22, %ecx - orl $8388608, %eax - addl $10, %edi - shrl %cl, %eax - movl %edi, %ecx - shll %cl, %esi - testl %esi, %esi - je ..B1.8 -..B1.6: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%ebp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.7: - movl $65536, %eax -..B1.8: - testl %edx, %edx - jne ..B1.11 -..B1.9: - testl $8388607, 32(%esp) - je ..B1.15 -..B1.10: - flds 32(%esp) - fmuls .L_2il0floatpacket.1@GOTOFF(%ebp) - fstps 32(%esp) - movzwl 34(%esp), %ebx - movl %ebx, %edx - andl $32640, %edx - shrl $7, %edx - addl $-25, %edx -..B1.11: - cmpl $65536, %eax - movzbl 39(%esp), %esi - jle ..L3 - movl $65536, %eax -..L3: - movl %eax, %ecx - negl %ecx - testl $128, %esi - jne ..L4 - movl %eax, %ecx -..L4: - lea (%edx,%ecx), %eax - testl %eax, %eax - jle ..B1.26 -..B1.12: - cmpl $255, %eax - jge ..B1.25 -..B1.13: - movzbl %al, %eax - andl $-32641, %ebx - shll $7, %eax - orl %eax, %ebx - movw %bx, 34(%esp) - flds 32(%esp) -..B1.14: - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.15: - flds 32(%esp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.16: - testl %edi, %edi - jne ..B1.19 -..B1.17: - testl $8388607, 36(%esp) - jne ..B1.19 -..B1.18: - flds 32(%esp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.19: - cmpl $255, %edx - jne ..B1.24 -..B1.20: - testl %edi, %edi - jg ..B1.22 -..B1.21: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%ebp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.22: - cmpl $1, %edi - je ..B1.30 -..B1.23: - movzbl 35(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _infs@GOTOFF(%ebp,%eax,4) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.24: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%ebp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.25: - movzbl 35(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _large_value_32@GOTOFF(%ebp,%eax,4) - fmuls .L_2il0floatpacket.2@GOTOFF(%ebp) - fsts (%esp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.26: - cmpl $-23, %eax - jge ..B1.28 -..B1.27: - movzbl 35(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _small_value_32@GOTOFF(%ebp,%eax,4) - fmuls .L_2il0floatpacket.3@GOTOFF(%ebp) - jmp ..B1.29 -..B1.28: - movl 32(%esp), %eax - lea 25(%edx,%ecx), %edx - movl %eax, (%esp) - shrl $16, %eax - movzbl %dl, %edx - andl $-32641, %eax - shll $7, %edx - orl %edx, %eax - movw %ax, 2(%esp) - flds (%esp) - fmuls .L_2il0floatpacket.4@GOTOFF(%ebp) -..B1.29: - fsts (%esp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.30: - testl $8388607, 36(%esp) - jle ..B1.21 - jmp ..B1.23 -..B1.31: - testl $8388607, 36(%esp) - jne ..B1.43 -..B1.32: - testl %edx, %edx - jne ..B1.38 -..B1.33: - testl $8388607, 32(%esp) - jne ..B1.39 -..B1.34: - movzbl 39(%esp), %eax - testl $128, %eax - je ..B1.36 -..B1.35: - flds 32(%esp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.36: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%ebp) -..B1.37: - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.38: - cmpl $255, %edx - je ..B1.44 -..B1.39: - movzbl 35(%esp), %edx - andl $128, %edx - movzbl 39(%esp), %eax - shrl $7, %edx - testl $128, %eax - je ..B1.41 -..B1.40: - flds _zeros@GOTOFF(%ebp,%edx,4) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.41: - flds _infs@GOTOFF(%ebp,%edx,4) -..B1.42: - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.43: - flds 32(%esp) - fadds 36(%esp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.44: - movzbl 39(%esp), %eax - testl $128, %eax - jne ..B1.46 -..B1.45: - flds 32(%esp) - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.46: - fldz - fmuls .L_2il0floatpacket.0@GOTOFF(%ebp) -..B1.47: - addl $12, %esp - popl %ebp - popl %ebx - popl %edi - popl %esi - ret -..B1.48: - testl $8388607, 32(%esp) - jne ..B1.43 -..B1.49: - cmpl $255, %edi - je ..B1.31 - jmp ..B1.16 - .align 16,0x90 - .type scalbf,@function - .size scalbf,.-scalbf - .data -# -- End scalbf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x7f800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4c000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x71800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x0d800000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -.L_2il0floatpacket.4: - .long 0x33000000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,4 - .align 4 -_infs: - .long 2139095040 - .long 4286578688 - .type _infs,@object - .size _infs,8 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbl.S deleted file mode 100644 index 5779076e12..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbl.S +++ /dev/null @@ -1,641 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbl.c" - .text -..TXTST0: -# -- Begin scalbl - .text - .align 16,0x90 - .globl scalbl -scalbl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp -..B1.2: - fnstcw 22(%esp) -..B1.3: - movzwl 16(%ebp), %edi - andl $32767, %edi - movzwl 28(%ebp), %ecx - andl $32767, %ecx - call ..L2 -..L2: - popl %esi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%esi), %esi - cmpl $32767, %edi - je ..B1.107 -..B1.4: - cmpl $32767, %ecx - je ..B1.74 -..B1.5: - cmpl $16383, %ecx - jl ..B1.33 -..B1.6: - movzwl 22(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.57 -..B1.7: - orl $-64768, %edx - movw %dx, 20(%esp) -..B1.8: - fldcw 20(%esp) -..B1.9: - movl $1, %ebx -..B1.10: - cmpl $16414, %ecx - jge ..B1.15 -..B1.11: - fldt 20(%ebp) - fldl _TWO_63H@GOTOFF(%esi) - fadd %st(1), %st - fstpt 8(%esp) - fildl 8(%esp) - movl 8(%esp), %edx - fucompp - fnstsw %ax - sahf - jp ..B1.12 - je ..B1.20 -..B1.12: - fldl _infs@GOTOFF(%esi) - testl %ebx, %ebx - fmull _zeros@GOTOFF(%esi) - fstpt 8(%esp) - je ..B1.14 -..B1.13: - fldcw 22(%esp) -..B1.14: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - movzbl 29(%ebp), %eax - andl $128, %eax - shrl $7, %eax - cmpl $16446, %ecx - movl large_integers@GOTOFF(%esi,%eax,4), %edx - jge ..B1.20 -..B1.16: - addl $2, %ecx - movl 20(%ebp), %eax - shll %cl, %eax - testl %eax, %eax - je ..B1.20 -..B1.17: - fldl _infs@GOTOFF(%esi) - testl %ebx, %ebx - fmull _zeros@GOTOFF(%esi) - fstpt 8(%esp) - je ..B1.19 -..B1.18: - fldcw 22(%esp) -..B1.19: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.20: - testl %edi, %edi - jne ..B1.27 -..B1.21: - cmpl $0, 12(%ebp) - jne ..B1.26 -..B1.22: - cmpl $0, 8(%ebp) - jne ..B1.26 -..B1.23: - testl %ebx, %ebx - je ..B1.25 -..B1.24: - fldcw 22(%esp) -..B1.25: - fldt 8(%ebp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%esi) - fstpt 8(%ebp) - movzwl 16(%ebp), %edi - andl $32767, %edi - addl $-75, %edi -..B1.27: - cmpl $65536, %edx - jle ..L3 - movl $65536, %edx -..L3: - cmpl $-65536, %edx - jge ..L4 - movl $-65536, %edx -..L4: - lea (%edi,%edx), %ecx - testl %ecx, %ecx - jle ..B1.51 -..B1.28: - cmpl $32767, %ecx - jge ..B1.50 -..B1.29: - movzwl 16(%ebp), %eax - andl $32767, %ecx - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 16(%ebp) - fldt 8(%ebp) -..B1.30: - fstpt 8(%esp) - testl %ebx, %ebx - je ..B1.32 -..B1.31: - fldcw 22(%esp) -..B1.32: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.33: - testl %ecx, %ecx - jne ..B1.42 -..B1.34: - cmpl $0, 24(%ebp) - jne ..B1.42 -..B1.35: - cmpl $0, 20(%ebp) - jne ..B1.42 -..B1.36: - movzwl 22(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.58 -..B1.37: - orl $-64768, %edx - movw %dx, 20(%esp) -..B1.38: - fldcw 20(%esp) -..B1.39: - fldt 8(%ebp) - fmull _ones@GOTOFF(%esi) - fstpt 8(%esp) -..B1.40: - fldcw 22(%esp) -..B1.41: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.42: - cmpl $32767, %edi - je ..B1.60 -..B1.43: - movzwl 22(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.59 -..B1.44: - orl $-64768, %edx - movw %dx, 20(%esp) -..B1.45: - fldcw 20(%esp) -..B1.46: - movl $1, %eax -..B1.47: - fldl _infs@GOTOFF(%esi) - testl %eax, %eax - fmull _zeros@GOTOFF(%esi) - fstpt 8(%esp) - je ..B1.49 -..B1.48: - fldcw 22(%esp) -..B1.49: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.50: - fldt _large_value_80@GOTOFF(%esi) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _large_value_80@GOTOFF(%esi,%ecx) - fmulp %st, %st(1) - jmp ..B1.30 -..B1.51: - cmpl $-63, %ecx - jge ..B1.53 -..B1.52: - fldt _small_value_80@GOTOFF(%esi) - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _small_value_80@GOTOFF(%esi,%ecx) - fmulp %st, %st(1) - jmp ..B1.54 -..B1.53: - fldt 8(%ebp) - lea 75(%edi,%edx), %edx - movzwl 16(%ebp), %eax - andl $32767, %edx - andl $-32768, %eax - fstpt 8(%esp) - orl %edx, %eax - movw %ax, 16(%esp) - fldt 8(%esp) - fmull 8+_TWO_75@GOTOFF(%esi) -..B1.54: - fstpt 8(%esp) - testl %ebx, %ebx - je ..B1.56 -..B1.55: - fldcw 22(%esp) -..B1.56: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.57: - xorl %ebx, %ebx - jmp ..B1.10 -..B1.58: - fldt 8(%ebp) - fmull _ones@GOTOFF(%esi) - fstpt 8(%esp) - jmp ..B1.41 -..B1.59: - xorl %eax, %eax - jmp ..B1.47 -..B1.60: - testl %ecx, %ecx - jg ..B1.68 -..B1.61: - movzwl 22(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.70 -..B1.62: - orl $-64768, %edx - movw %dx, 20(%esp) -..B1.63: - fldcw 20(%esp) -..B1.64: - movl $1, %eax -..B1.65: - fldl _infs@GOTOFF(%esi) - testl %eax, %eax - fmull _zeros@GOTOFF(%esi) - fstpt 8(%esp) - je ..B1.67 -..B1.66: - fldcw 22(%esp) -..B1.67: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.68: - cmpl $1, %ecx - je ..B1.71 -..B1.69: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl _infs@GOTOFF(%esi,%eax,8) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.70: - xorl %eax, %eax - jmp ..B1.65 -..B1.71: - movl 24(%ebp), %eax - cmpl $-2147483648, %eax - jb ..B1.61 -..B1.72: - jne ..B1.69 -..B1.73: - cmpl $0, 20(%ebp) - jbe ..B1.61 - jmp ..B1.69 -..B1.74: - cmpl $-2147483648, 24(%ebp) - jne ..B1.76 -..B1.75: - cmpl $0, 20(%ebp) - je ..B1.82 -..B1.76: - movzwl 22(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.102 -..B1.77: - orl $-64768, %edx - movw %dx, 20(%esp) -..B1.78: - fldcw 20(%esp) -..B1.79: - fldt 8(%ebp) - fldt 20(%ebp) - faddp %st, %st(1) - fstpt 8(%esp) -..B1.80: - fldcw 22(%esp) -..B1.81: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.82: - movzwl 22(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.106 -..B1.83: - orl $-64768, %edx - movw %dx, 20(%esp) -..B1.84: - fldcw 20(%esp) -..B1.85: - movl $1, %eax -..B1.86: - testl %edi, %edi - jne ..B1.94 -..B1.87: - cmpl $0, 12(%ebp) - jne ..B1.89 -..B1.88: - cmpl $0, 8(%ebp) - je ..B1.90 -..B1.112: - cmpl $0, 12(%ebp) -..B1.89: - fldl _smallest_value_64@GOTOFF(%esi) - fstpl (%esp) - jne ..B1.95 -..B1.113: - cmpl $0, 8(%ebp) -..B1.90: - jne ..B1.95 -..B1.91: - movzbl 29(%ebp), %edx - testl $128, %edx - je ..B1.93 -..B1.92: - fldt 8(%ebp) - fstpt 8(%esp) - jmp ..B1.99 -..B1.93: - fldl _infs@GOTOFF(%esi) - fmull _zeros@GOTOFF(%esi) - fstpt 8(%esp) - jmp ..B1.99 -..B1.94: - cmpl $32767, %edi - je ..B1.103 -..B1.95: - movzbl 17(%ebp), %ecx - andl $128, %ecx - movzbl 29(%ebp), %edx - shrl $7, %ecx - testl $128, %edx - je ..B1.97 -..B1.96: - fldl _zeros@GOTOFF(%esi,%ecx,8) - jmp ..B1.98 -..B1.97: - fldl _infs@GOTOFF(%esi,%ecx,8) -..B1.98: - fstpt 8(%esp) -..B1.99: - testl %eax, %eax - je ..B1.101 -..B1.100: - fldcw 22(%esp) -..B1.101: - fldt 8(%esp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.102: - fldt 8(%ebp) - fldt 20(%ebp) - faddp %st, %st(1) - fstpt 8(%esp) - jmp ..B1.81 -..B1.103: - movzbl 29(%ebp), %edx - testl $128, %edx - jne ..B1.105 -..B1.104: - fldt 8(%ebp) - fstpt 8(%esp) - jmp ..B1.99 -..B1.105: - fldl _infs@GOTOFF(%esi) - fmull _zeros@GOTOFF(%esi) - fstpt 8(%esp) - jmp ..B1.99 -..B1.106: - xorl %eax, %eax - jmp ..B1.86 -..B1.107: - cmpl $-2147483648, 12(%ebp) - jne ..B1.76 -..B1.108: - cmpl $0, 8(%ebp) - jne ..B1.76 -..B1.109: - cmpl $32767, %ecx - je ..B1.74 - jmp ..B1.33 - .align 16,0x90 - .type scalbl,@function - .size scalbl,.-scalbl - .data -# -- End scalbl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -large_integers: - .long 65536 - .long -65536 - .type large_integers,@object - .size large_integers,8 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbln_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbln_wmt.S deleted file mode 100644 index 3b57a2cbd9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbln_wmt.S +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbln_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin scalbln - .text - .align 16,0x90 - .globl scalbln -scalbln: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movq %xmm0, (%esp) - movq 64(%ebx), %xmm4 - movl 136(%esp), %ecx - movl %ecx, 8(%esp) - movl $65536, %eax - movl $-65536, %edx - cmpl %eax, %ecx - cmovg %eax, %ecx - cmpl %edx, %ecx - cmovl %edx, %ecx - andpd %xmm0, %xmm4 - xorpd %xmm4, %xmm0 - ucomisd 128(%ebx), %xmm0 - jp .L_2TAG_PACKET_0.0.3 - je .L_2TAG_PACKET_0.0.3 - comisd 80(%ebx), %xmm0 - jc .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - movapd %xmm0, %xmm2 - movapd (%ebx), %xmm3 - psrlq $52, %xmm2 - movd %ecx, %xmm1 - andpd %xmm3, %xmm2 - paddq %xmm1, %xmm2 - movd %xmm2, %eax - movapd 16(%ebx), %xmm3 - testl %eax, %eax - jle .L_2TAG_PACKET_3.0.3 - cmpl $2047, %eax - jge .L_2TAG_PACKET_4.0.3 - andpd %xmm3, %xmm0 - psllq $52, %xmm2 - xorpd %xmm4, %xmm0 - orpd %xmm2, %xmm0 - movq %xmm0, 16(%esp) - fldl 16(%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_0.0.3: - fldl (%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_1.0.3: - comisd 144(%ebx), %xmm0 - je .L_2TAG_PACKET_0.0.3 - mulsd 96(%ebx), %xmm0 - subl $55, %ecx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $-52, %eax - jl .L_2TAG_PACKET_6.0.3 - xorpd %xmm5, %xmm5 - andpd %xmm3, %xmm0 - shufpd $1, %xmm3, %xmm3 - paddq %xmm3, %xmm2 - xorpd %xmm4, %xmm0 - psllq $52, %xmm2 - orpd %xmm2, %xmm0 - mulsd 112(%ebx), %xmm0 - comisd %xmm5, %xmm0 - je .L_2TAG_PACKET_6.0.3 - movq %xmm0, 16(%esp) - fldl 16(%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_4.0.3: - lea 32(%ebx), %edx - movl $203, %ecx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_6.0.3: - lea 48(%ebx), %edx - movl $204, %ecx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_7.0.3: - pextrw $3, %xmm4, %eax - shrl $12, %eax - addl %edx, %eax - movq (%edx), %xmm0 - mulsd (%eax), %xmm0 - movq %xmm0, 16(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 136(%esp), %eax - movl %eax, 4(%esp) - lea 48(%esp), %eax - movl %eax, 8(%esp) - movl %ecx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl 16(%esp) -.L_2TAG_PACKET_5.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type scalbln,@function - .size scalbln,.-scalbln - .data -# -- End scalbln - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 2047 - .long 0 - .long 4294967241 - .long 4294967295 - .long 4294967295 - .long 2148532223 - .long 55 - .long 0 - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 1048576 - .long 0 - .long 1048576 - .long 0 - .long 1130364928 - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .long 0 - .long 1015021568 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,160 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalblnf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalblnf.S deleted file mode 100644 index f26c38a751..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalblnf.S +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalblnf.c" - .text -..TXTST0: -# -- Begin scalblnf - .text - .align 16,0x90 - .globl scalblnf -scalblnf: -# parameter 1: 16 + %esp -# parameter 2: 20 + %esp -..B1.1: -..L1: - - pushl %ebx - pushl %ebp - pushl %esi - movzwl 18(%esp), %eax - movl %eax, %ecx - andl $32640, %ecx - shrl $7, %ecx - movl 20(%esp), %edx - cmpl $255, %ecx - je ..B1.15 -..B1.2: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - testl %ecx, %ecx - jne ..B1.5 -..B1.3: - testl $8388607, 16(%esp) - je ..B1.9 -..B1.4: - flds 16(%esp) - fmuls .L_2il0floatpacket.0@GOTOFF(%ebx) - fstps 16(%esp) - movzwl 18(%esp), %eax - movl %eax, %ecx - andl $32640, %ecx - shrl $7, %ecx - addl $-25, %ecx -..B1.5: - cmpl $65536, %edx - jle ..L3 - movl $65536, %edx -..L3: - cmpl $-65536, %edx - jg ..L4 - movl $-65536, %edx -..L4: - lea (%ecx,%edx), %ebp - testl %ebp, %ebp - jle ..B1.11 -..B1.6: - cmpl $255, %ebp - jge ..B1.10 -..B1.7: - andl $255, %ebp - andl $-32641, %eax - shll $7, %ebp - orl %ebp, %eax - movw %ax, 18(%esp) - flds 16(%esp) -..B1.8: - popl %ecx - popl %ebp - popl %ebx - ret -..B1.9: - flds 16(%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.10: - movzbl 19(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _large_value_32@GOTOFF(%ebx,%eax,4) - fmuls .L_2il0floatpacket.1@GOTOFF(%ebx) - fsts (%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.11: - cmpl $-23, %ebp - jl ..B1.14 -..B1.12: - movl 16(%esp), %eax - lea 25(%ecx,%edx), %edx - movl %eax, (%esp) - shrl $16, %eax - movzbl %dl, %edx - andl $-32641, %eax - shll $7, %edx - orl %edx, %eax - movw %ax, 2(%esp) - flds (%esp) - fmuls .L_2il0floatpacket.3@GOTOFF(%ebx) - fsts (%esp) -..B1.13: - popl %ecx - popl %ebp - popl %ebx - ret -..B1.14: - movzbl 19(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _small_value_32@GOTOFF(%ebx,%eax,4) - fmuls .L_2il0floatpacket.2@GOTOFF(%ebx) - fsts (%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.15: - flds 16(%esp) - popl %ecx - popl %ebp - popl %ebx - ret - .align 16,0x90 - .type scalblnf,@function - .size scalblnf,.-scalblnf - .data -# -- End scalblnf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x0d800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x33000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalblnl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalblnl.S deleted file mode 100644 index 41ae09f3a3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalblnl.S +++ /dev/null @@ -1,337 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalblnl.c" - .text -..TXTST0: -# -- Begin scalblnl - .text - .align 16,0x90 - .globl scalblnl -scalblnl: -# parameter 1: 32 + %esp -# parameter 2: 44 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - pushl %ebp - subl $16, %esp - movl 44(%esp), %ebx -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 40(%esp), %eax - movl %eax, %ecx - andl $32767, %ecx - call ..L2 -..L2: - popl %ebp - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebp), %ebp - cmpl $32767, %ecx - je ..B1.43 -..B1.4: - testl %ecx, %ecx - jne ..B1.14 -..B1.5: - cmpl $0, 36(%esp) - jne ..B1.8 -..B1.6: - cmpl $0, 32(%esp) - jne ..B1.8 -..B1.7: - fldt 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.8: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.42 -..B1.9: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.10: - fldcw 12(%esp) -..B1.11: - fldt 32(%esp) - fmull _TWO_75@GOTOFF(%ebp) - fstpt 32(%esp) -..B1.12: - fldcw 14(%esp) -..B1.13: - movzwl 40(%esp), %eax - movl %eax, %ecx - andl $32767, %ecx - addl $-75, %ecx -..B1.14: - cmpl $65536, %ebx - jle ..L3 - movl $65536, %ebx -..L3: - cmpl $-65536, %ebx - jg ..L4 - movl $-65536, %ebx -..L4: - lea (%ecx,%ebx), %edi - testl %edi, %edi - jle ..B1.25 -..B1.15: - cmpl $32767, %edi - jge ..B1.17 -..B1.16: - andl $-32768, %eax - andl $32767, %edi - orl %edi, %eax - movw %ax, 40(%esp) - fldt 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.17: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.24 -..B1.18: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.19: - fldcw 12(%esp) -..B1.20: - movl $1, %ebx -..B1.21: - fldt _large_value_80@GOTOFF(%ebp) - movzbl 41(%esp), %edx - andl $128, %edx - shrl $7, %edx - testl %ebx, %ebx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _large_value_80@GOTOFF(%ebp,%ecx) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.23 -..B1.22: - fldcw 14(%esp) -..B1.23: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.24: - xorl %ebx, %ebx - jmp ..B1.21 -..B1.25: - movzwl 14(%esp), %edx - cmpl $-63, %edi - jl ..B1.34 -..B1.26: - movl %edx, %edi - andl $768, %edi - cmpl $768, %edi - je ..B1.33 -..B1.27: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.28: - fldcw 12(%esp) -..B1.29: - movzwl 40(%esp), %eax - movl $1, %edi -..B1.30: - fldt 32(%esp) - lea 75(%ecx,%ebx), %edx - andl $-32768, %eax - andl $32767, %edx - fstpt (%esp) - orl %edx, %eax - movw %ax, 8(%esp) - testl %edi, %edi - fldt (%esp) - fmull 8+_TWO_75@GOTOFF(%ebp) - fstpt (%esp) - je ..B1.32 -..B1.31: - fldcw 14(%esp) -..B1.32: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.33: - xorl %edi, %edi - jmp ..B1.30 -..B1.34: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.41 -..B1.35: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.36: - fldcw 12(%esp) -..B1.37: - movl $1, %ebx -..B1.38: - fldt _small_value_80@GOTOFF(%ebp) - movzbl 41(%esp), %edx - andl $128, %edx - shrl $7, %edx - testl %ebx, %ebx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _small_value_80@GOTOFF(%ebp,%ecx) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.40 -..B1.39: - fldcw 14(%esp) -..B1.40: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.41: - xorl %ebx, %ebx - jmp ..B1.38 -..B1.42: - fldt 32(%esp) - fmull _TWO_75@GOTOFF(%ebp) - fstpt 32(%esp) - jmp ..B1.13 -..B1.43: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.49 -..B1.44: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.45: - fldcw 12(%esp) -..B1.46: - fldt 32(%esp) - fmull _ones@GOTOFF(%ebp) - fstpt (%esp) -..B1.47: - fldcw 14(%esp) -..B1.48: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.49: - fldt 32(%esp) - fmull _ones@GOTOFF(%ebp) - fstpt (%esp) - jmp ..B1.48 - .align 16,0x90 - .type scalblnl,@function - .size scalblnl,.-scalblnl - .data -# -- End scalblnl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbn_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbn_wmt.S deleted file mode 100644 index 4e5635c2f4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbn_wmt.S +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbn_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin scalbn - .text - .align 16,0x90 - .globl scalbn -scalbn: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movq %xmm0, (%esp) - movq 64(%ebx), %xmm4 - movl 136(%esp), %ecx - movl %ecx, 8(%esp) - movl $65536, %eax - movl $-65536, %edx - cmpl %eax, %ecx - cmovg %eax, %ecx - cmpl %edx, %ecx - cmovl %edx, %ecx - andpd %xmm0, %xmm4 - xorpd %xmm4, %xmm0 - ucomisd 128(%ebx), %xmm0 - jp .L_2TAG_PACKET_0.0.3 - je .L_2TAG_PACKET_0.0.3 - comisd 80(%ebx), %xmm0 - jc .L_2TAG_PACKET_1.0.3 -.L_2TAG_PACKET_2.0.3: - movapd %xmm0, %xmm2 - movapd (%ebx), %xmm3 - psrlq $52, %xmm2 - movd %ecx, %xmm1 - andpd %xmm3, %xmm2 - paddq %xmm1, %xmm2 - movd %xmm2, %eax - movapd 16(%ebx), %xmm3 - testl %eax, %eax - jle .L_2TAG_PACKET_3.0.3 - cmpl $2047, %eax - jge .L_2TAG_PACKET_4.0.3 - andpd %xmm3, %xmm0 - psllq $52, %xmm2 - xorpd %xmm4, %xmm0 - orpd %xmm2, %xmm0 - movq %xmm0, 16(%esp) - fldl 16(%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_0.0.3: - fldl (%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_1.0.3: - comisd 144(%ebx), %xmm0 - je .L_2TAG_PACKET_0.0.3 - mulsd 96(%ebx), %xmm0 - subl $55, %ecx - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $-52, %eax - jl .L_2TAG_PACKET_6.0.3 - xorpd %xmm5, %xmm5 - andpd %xmm3, %xmm0 - shufpd $1, %xmm3, %xmm3 - paddq %xmm3, %xmm2 - xorpd %xmm4, %xmm0 - psllq $52, %xmm2 - orpd %xmm2, %xmm0 - mulsd 112(%ebx), %xmm0 - comisd %xmm5, %xmm0 - je .L_2TAG_PACKET_6.0.3 - movq %xmm0, 16(%esp) - fldl 16(%esp) - jmp .L_2TAG_PACKET_5.0.3 -.L_2TAG_PACKET_4.0.3: - lea 32(%ebx), %edx - movl $176, %ecx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_6.0.3: - lea 48(%ebx), %edx - movl $177, %ecx - jmp .L_2TAG_PACKET_7.0.3 -.L_2TAG_PACKET_7.0.3: - pextrw $3, %xmm4, %eax - shrl $12, %eax - addl %edx, %eax - movq (%edx), %xmm0 - mulsd (%eax), %xmm0 - movq %xmm0, 16(%esp) - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 136(%esp), %eax - movl %eax, 4(%esp) - lea 48(%esp), %eax - movl %eax, 8(%esp) - movl %ecx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl 16(%esp) -.L_2TAG_PACKET_5.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type scalbn,@function - .size scalbn,.-scalbn - .data -# -- End scalbn - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 2047 - .long 0 - .long 4294967241 - .long 4294967295 - .long 4294967295 - .long 2148532223 - .long 55 - .long 0 - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 1048576 - .long 0 - .long 1048576 - .long 0 - .long 1130364928 - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .long 0 - .long 1015021568 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,160 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbnf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbnf.S deleted file mode 100644 index 2ff48cc797..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbnf.S +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbnf.c" - .text -..TXTST0: -# -- Begin scalbnf - .text - .align 16,0x90 - .globl scalbnf -scalbnf: -# parameter 1: 16 + %esp -# parameter 2: 20 + %esp -..B1.1: -..L1: - - pushl %ebx - pushl %ebp - pushl %esi - movzwl 18(%esp), %eax - movl %eax, %ecx - andl $32640, %ecx - shrl $7, %ecx - movl 20(%esp), %edx - cmpl $255, %ecx - je ..B1.15 -..B1.2: - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - testl %ecx, %ecx - jne ..B1.5 -..B1.3: - testl $8388607, 16(%esp) - je ..B1.9 -..B1.4: - flds 16(%esp) - fmuls .L_2il0floatpacket.0@GOTOFF(%ebx) - fstps 16(%esp) - movzwl 18(%esp), %eax - movl %eax, %ecx - andl $32640, %ecx - shrl $7, %ecx - addl $-25, %ecx -..B1.5: - cmpl $65536, %edx - jle ..L3 - movl $65536, %edx -..L3: - cmpl $-65536, %edx - jg ..L4 - movl $-65536, %edx -..L4: - lea (%ecx,%edx), %ebp - testl %ebp, %ebp - jle ..B1.11 -..B1.6: - cmpl $255, %ebp - jge ..B1.10 -..B1.7: - andl $255, %ebp - andl $-32641, %eax - shll $7, %ebp - orl %ebp, %eax - movw %ax, 18(%esp) - flds 16(%esp) -..B1.8: - popl %ecx - popl %ebp - popl %ebx - ret -..B1.9: - flds 16(%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.10: - movzbl 19(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _large_value_32@GOTOFF(%ebx,%eax,4) - fmuls .L_2il0floatpacket.1@GOTOFF(%ebx) - fsts (%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.11: - cmpl $-23, %ebp - jl ..B1.14 -..B1.12: - movl 16(%esp), %eax - lea 25(%ecx,%edx), %edx - movl %eax, (%esp) - shrl $16, %eax - movzbl %dl, %edx - andl $-32641, %eax - shll $7, %edx - orl %edx, %eax - movw %ax, 2(%esp) - flds (%esp) - fmuls .L_2il0floatpacket.3@GOTOFF(%ebx) - fsts (%esp) -..B1.13: - popl %ecx - popl %ebp - popl %ebx - ret -..B1.14: - movzbl 19(%esp), %eax - andl $128, %eax - shrl $7, %eax - flds _small_value_32@GOTOFF(%ebx,%eax,4) - fmuls .L_2il0floatpacket.2@GOTOFF(%ebx) - fsts (%esp) - popl %ecx - popl %ebp - popl %ebx - ret -..B1.15: - flds 16(%esp) - popl %ecx - popl %ebp - popl %ebx - ret - .align 16,0x90 - .type scalbnf,@function - .size scalbnf,.-scalbnf - .data -# -- End scalbnf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x0d800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x33000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbnl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbnl.S deleted file mode 100644 index 2c7b59580b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/scalbnl.S +++ /dev/null @@ -1,337 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbnl.c" - .text -..TXTST0: -# -- Begin scalbnl - .text - .align 16,0x90 - .globl scalbnl -scalbnl: -# parameter 1: 32 + %esp -# parameter 2: 44 + %esp -..B1.1: -..L1: - - pushl %edi - pushl %ebx - pushl %ebp - subl $16, %esp - movl 44(%esp), %ebx -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 40(%esp), %eax - movl %eax, %ecx - andl $32767, %ecx - call ..L2 -..L2: - popl %ebp - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebp), %ebp - cmpl $32767, %ecx - je ..B1.43 -..B1.4: - testl %ecx, %ecx - jne ..B1.14 -..B1.5: - cmpl $0, 36(%esp) - jne ..B1.8 -..B1.6: - cmpl $0, 32(%esp) - jne ..B1.8 -..B1.7: - fldt 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.8: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.42 -..B1.9: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.10: - fldcw 12(%esp) -..B1.11: - fldt 32(%esp) - fmull _TWO_75@GOTOFF(%ebp) - fstpt 32(%esp) -..B1.12: - fldcw 14(%esp) -..B1.13: - movzwl 40(%esp), %eax - movl %eax, %ecx - andl $32767, %ecx - addl $-75, %ecx -..B1.14: - cmpl $65536, %ebx - jle ..L3 - movl $65536, %ebx -..L3: - cmpl $-65536, %ebx - jg ..L4 - movl $-65536, %ebx -..L4: - lea (%ecx,%ebx), %edi - testl %edi, %edi - jle ..B1.25 -..B1.15: - cmpl $32767, %edi - jge ..B1.17 -..B1.16: - andl $-32768, %eax - andl $32767, %edi - orl %edi, %eax - movw %ax, 40(%esp) - fldt 32(%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.17: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.24 -..B1.18: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.19: - fldcw 12(%esp) -..B1.20: - movl $1, %ebx -..B1.21: - fldt _large_value_80@GOTOFF(%ebp) - movzbl 41(%esp), %edx - andl $128, %edx - shrl $7, %edx - testl %ebx, %ebx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _large_value_80@GOTOFF(%ebp,%ecx) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.23 -..B1.22: - fldcw 14(%esp) -..B1.23: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.24: - xorl %ebx, %ebx - jmp ..B1.21 -..B1.25: - movzwl 14(%esp), %edx - cmpl $-63, %edi - jl ..B1.34 -..B1.26: - movl %edx, %edi - andl $768, %edi - cmpl $768, %edi - je ..B1.33 -..B1.27: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.28: - fldcw 12(%esp) -..B1.29: - movzwl 40(%esp), %eax - movl $1, %edi -..B1.30: - fldt 32(%esp) - lea 75(%ecx,%ebx), %edx - andl $-32768, %eax - andl $32767, %edx - fstpt (%esp) - orl %edx, %eax - movw %ax, 8(%esp) - testl %edi, %edi - fldt (%esp) - fmull 8+_TWO_75@GOTOFF(%ebp) - fstpt (%esp) - je ..B1.32 -..B1.31: - fldcw 14(%esp) -..B1.32: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.33: - xorl %edi, %edi - jmp ..B1.30 -..B1.34: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.41 -..B1.35: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.36: - fldcw 12(%esp) -..B1.37: - movl $1, %ebx -..B1.38: - fldt _small_value_80@GOTOFF(%ebp) - movzbl 41(%esp), %edx - andl $128, %edx - shrl $7, %edx - testl %ebx, %ebx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _small_value_80@GOTOFF(%ebp,%ecx) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.40 -..B1.39: - fldcw 14(%esp) -..B1.40: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.41: - xorl %ebx, %ebx - jmp ..B1.38 -..B1.42: - fldt 32(%esp) - fmull _TWO_75@GOTOFF(%ebp) - fstpt 32(%esp) - jmp ..B1.13 -..B1.43: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.49 -..B1.44: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.45: - fldcw 12(%esp) -..B1.46: - fldt 32(%esp) - fmull _ones@GOTOFF(%ebp) - fstpt (%esp) -..B1.47: - fldcw 14(%esp) -..B1.48: - fldt (%esp) - addl $16, %esp - popl %ebp - popl %ebx - popl %edi - ret -..B1.49: - fldt 32(%esp) - fmull _ones@GOTOFF(%ebp) - fstpt (%esp) - jmp ..B1.48 - .align 16,0x90 - .type scalbnl,@function - .size scalbnl,.-scalbnl - .data -# -- End scalbnl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/signbit.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/signbit.S deleted file mode 100644 index 4e446703ff..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/signbit.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "signbit.c" - .text -..TXTST0: -# -- Begin __signbitd - .text - .align 16,0x90 - .globl __signbitd -__signbitd: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - movl 8(%esp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .type __signbitd,@function - .size __signbitd,.-__signbitd - .data -# -- End __signbitd - .text -# -- Begin signbitd - .text - .align 16,0x90 - .globl signbitd -signbitd: -# parameter 1: 4 + %esp -..B2.1: -..L2: - - movl 8(%esp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .type signbitd,@function - .size signbitd,.-signbitd - .data -# -- End signbitd - .text -# -- Begin __signbit - .text - .align 16,0x90 - .globl __signbit -__signbit: -# parameter 1: 4 + %esp -..B3.1: -..L3: - - movl 8(%esp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .type __signbit,@function - .size __signbit,.-__signbit - .data -# -- End __signbit - .text -# -- Begin signbit - .text - .align 16,0x90 - .globl signbit -signbit: -# parameter 1: 4 + %esp -..B4.1: -..L4: - - movl 8(%esp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .type signbit,@function - .size signbit,.-signbit - .data -# -- End signbit - .text -# -- Begin __signbitf - .text - .align 16,0x90 - .globl __signbitf -__signbitf: -# parameter 1: 4 + %esp -..B5.1: -..L5: - - movl 4(%esp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .type __signbitf,@function - .size __signbitf,.-__signbitf - .data -# -- End __signbitf - .text -# -- Begin signbitf - .text - .align 16,0x90 - .globl signbitf -signbitf: -# parameter 1: 4 + %esp -..B6.1: -..L6: - - movl 4(%esp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .type signbitf,@function - .size signbitf,.-signbitf - .data -# -- End signbitf - .text -# -- Begin __signbitl - .text - .align 16,0x90 - .globl __signbitl -__signbitl: -# parameter 1: 4 + %esp -..B7.1: -..L7: - - movzbl 13(%esp), %eax - shrl $7, %eax - movzwl 12(%esp), %edx - shll $15, %eax - andl $32767, %edx - orl %edx, %eax - shll $16, %eax - movzwl 10(%esp), %ecx - orl %ecx, %eax - shrl $31, %eax - ret - .align 16,0x90 - .type __signbitl,@function - .size __signbitl,.-__signbitl - .data -# -- End __signbitl - .text -# -- Begin signbitl - .text - .align 16,0x90 - .globl signbitl -signbitl: -# parameter 1: 4 + %esp -..B8.1: -..L8: - - movzbl 13(%esp), %eax - shrl $7, %eax - movzwl 12(%esp), %edx - shll $15, %eax - andl $32767, %edx - orl %edx, %eax - shll $16, %eax - movzwl 10(%esp), %ecx - orl %ecx, %eax - shrl $31, %eax - ret - .align 16,0x90 - .type signbitl,@function - .size signbitl,.-signbitl - .data -# -- End signbitl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significand_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significand_wmt.S deleted file mode 100644 index 483a3e8850..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significand_wmt.S +++ /dev/null @@ -1,136 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "significand_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin significand - .text - .align 16,0x90 - .globl significand -significand: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - pextrw $3, %xmm0, %eax - movq (%ebx), %xmm1 - andl $32767, %eax - movq 16(%ebx), %xmm2 - subl $16, %eax - js .L_2TAG_PACKET_0.0.2 - cmpl $32736, %eax - jae .L_2TAG_PACKET_1.0.2 - pand %xmm1, %xmm0 - por %xmm2, %xmm0 - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_0.0.2: - pxor %xmm3, %xmm3 - movq 32(%ebx), %xmm4 - comisd %xmm3, %xmm0 - je .L_2TAG_PACKET_3.0.2 - mulsd %xmm4, %xmm0 - pand %xmm1, %xmm0 - por %xmm2, %xmm0 -.L_2TAG_PACKET_3.0.2: - movq %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_1.0.2: - fld1 - movsd %xmm0, (%esp) - fmull (%esp) -.L_2TAG_PACKET_2.0.2: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type significand,@function - .size significand,.-significand - .data -# -- End significand - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 4294967295 - .long 2148532223 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 1130364928 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,48 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significandf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significandf.S deleted file mode 100644 index a91b5d2329..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significandf.S +++ /dev/null @@ -1,97 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "significandf.c" - .text -..TXTST0: -# -- Begin significandf - .text - .align 16,0x90 - .globl significandf -significandf: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - movl 4(%esp), %ecx - movl %ecx, %edx - andl $2147483647, %edx - lea -8388608(%edx), %eax - cmpl $2130706432, %eax - jb ..B1.6 -..B1.2: - decl %edx - cmpl $2139095039, %edx - jae ..B1.4 -..B1.3: - flds 4(%esp) - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - fmuls .L_2il0floatpacket.0@GOTOFF(%eax) - fstps 4(%esp) - movl 4(%esp), %edx - andl $-2139095041, %edx - orl $1065353216, %edx - movl %edx, 4(%esp) - flds 4(%esp) - ret -..B1.4: - flds 4(%esp) -..B1.5: - ret -..B1.6: - andl $-2139095041, %ecx - orl $1065353216, %ecx - movl %ecx, 4(%esp) - flds 4(%esp) - ret - .align 16,0x90 - .type significandf,@function - .size significandf,.-significandf - .data -# -- End significandf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significandl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significandl.S deleted file mode 100644 index b14ab825d5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/significandl.S +++ /dev/null @@ -1,160 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "significandl.c" - .text -..TXTST0: -# -- Begin significandl - .text - .align 16,0x90 - .globl significandl -significandl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %edx - movl %edx, %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.16 -..B1.4: - testl %eax, %eax - jne ..B1.14 -..B1.5: - cmpl $0, 12(%ebp) - jne ..B1.8 -..B1.6: - cmpl $0, 8(%ebp) - jne ..B1.8 -..B1.7: - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.8: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - je ..B1.15 -..B1.9: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.10: - fldcw 12(%esp) -..B1.11: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%eax) - fstpt 8(%ebp) -..B1.12: - fldcw 14(%esp) -..B1.13: - movzwl 16(%ebp), %eax - andl $-32768, %eax - orl $-49153, %eax - movw %ax, 16(%ebp) - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.14: - andl $-32768, %edx - orl $-49153, %edx - movw %dx, 16(%ebp) - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.15: - fldt 8(%ebp) - fmull _TWO_75@GOTOFF(%eax) - fstpt 8(%ebp) - jmp ..B1.13 -..B1.16: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.22 -..B1.17: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.18: - fldcw 12(%esp) -..B1.19: - fldt 8(%ebp) - fstpt (%esp) -..B1.20: - fldcw 14(%esp) -..B1.21: - fldt (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.22: - fldt 8(%ebp) - fstpt (%esp) - jmp ..B1.21 - .align 16,0x90 - .type significandl,@function - .size significandl,.-significandl - .data -# -- End significandl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sin_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sin_wmt.S deleted file mode 100644 index 5b38a2f2de..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sin_wmt.S +++ /dev/null @@ -1,779 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sin_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin sin - .text - .align 16,0x90 - .globl sin -sin: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 56(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - pextrw $3, %xmm0, %eax - andl $32767, %eax - subl $12336, %eax - cmpl $4293, %eax - ja .L_2TAG_PACKET_0.0.2 - movsd 2160(%ebx), %xmm1 - mulsd %xmm0, %xmm1 - movsd 2272(%ebx), %xmm5 - movapd 2256(%ebx), %xmm4 - andpd %xmm0, %xmm4 - orps %xmm4, %xmm5 - movsd 2128(%ebx), %xmm3 - movapd 2112(%ebx), %xmm2 - addpd %xmm5, %xmm1 - cvttsd2si %xmm1, %edx - cvtsi2sdl %edx, %xmm1 - mulsd %xmm1, %xmm3 - unpcklpd %xmm1, %xmm1 - addl $1865216, %edx - movapd %xmm0, %xmm4 - andl $63, %edx - movapd 2096(%ebx), %xmm5 - lea (%ebx), %eax - shll $5, %edx - addl %edx, %eax - mulpd %xmm1, %xmm2 - subsd %xmm3, %xmm0 - mulsd 2144(%ebx), %xmm1 - subsd %xmm3, %xmm4 - movsd 8(%eax), %xmm7 - unpcklpd %xmm0, %xmm0 - movapd %xmm4, %xmm3 - subsd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - movapd 2064(%ebx), %xmm6 - mulsd %xmm4, %xmm7 - subsd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subsd %xmm2, %xmm3 - movapd (%eax), %xmm2 - subsd %xmm3, %xmm1 - movsd 24(%eax), %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm7 - mulsd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulsd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm0 - addpd 2080(%ebx), %xmm5 - mulsd (%eax), %xmm4 - addpd 2048(%ebx), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, %xmm0 - addsd 8(%eax), %xmm3 - mulpd %xmm7, %xmm1 - movapd %xmm4, %xmm7 - addsd %xmm3, %xmm4 - addpd %xmm5, %xmm6 - movsd 8(%eax), %xmm5 - subsd %xmm3, %xmm5 - subsd %xmm4, %xmm3 - addsd 16(%eax), %xmm1 - mulpd %xmm2, %xmm6 - addsd %xmm0, %xmm5 - addsd %xmm7, %xmm3 - addsd %xmm5, %xmm1 - addsd %xmm3, %xmm1 - addsd %xmm6, %xmm1 - unpckhpd %xmm6, %xmm6 - addsd %xmm6, %xmm1 - addsd %xmm1, %xmm4 - movsd %xmm4, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_0.0.2: - jg .L_2TAG_PACKET_2.0.2 - shrl $4, %eax - cmpl $268434685, %eax - jne .L_2TAG_PACKET_3.0.2 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_3.0.2: - movsd 2192(%ebx), %xmm3 - mulsd %xmm0, %xmm3 - subsd %xmm0, %xmm3 - mulsd 2208(%ebx), %xmm3 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - movl 132(%esp), %eax - andl $2146435072, %eax - cmpl $2146435072, %eax - je .L_2TAG_PACKET_4.0.2 - subl $32, %esp - movsd %xmm0, (%esp) - lea 40(%esp), %eax - movl %eax, 8(%esp) - movl $2, %eax - movl %eax, 12(%esp) - call __libm_sincos_huge - addl $32, %esp - fldl 16(%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_4.0.2: - fldl 128(%esp) - fmull 2240(%ebx) -.L_2TAG_PACKET_1.0.2: - movl 56(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type sin,@function - .size sin,.-sin - .data -# -- End sin - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 1072693248 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1071644672 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 1071644672 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1070596096 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 1070596096 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1069547520 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 3217031168 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 3218079744 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 3218079744 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 3219128320 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 3220176896 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3219128320 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 3219128320 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3218079744 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 3218079744 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 1069547520 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 1070596096 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 1070596096 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 1071644672 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 1072693248 - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .long 2773927732 - .long 1053236707 - .long 436314138 - .long 1056571808 - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .long 1413480448 - .long 1069097467 - .long 0 - .long 0 - .long 771977331 - .long 996350346 - .long 0 - .long 0 - .long 1841940611 - .long 1076125488 - .long 0 - .long 0 - .long 0 - .long 1127743488 - .long 0 - .long 0 - .long 0 - .long 1130364928 - .long 0 - .long 0 - .long 0 - .long 1015021568 - .long 0 - .long 0 - .long 4294967295 - .long 1072693247 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .type static_const_table,@object - .size static_const_table,2288 - .data - .hidden __libm_sincos_huge - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincos_pi4l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincos_pi4l.S deleted file mode 100644 index f3074c36da..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincos_pi4l.S +++ /dev/null @@ -1,3894 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincos_pi4l.c" - .text -..TXTST0: -# -- Begin __libm_sincos_pi4l - .text - .align 16,0x90 - .hidden __libm_sincos_pi4l - .globl __libm_sincos_pi4l -__libm_sincos_pi4l: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -# parameter 3: 24 + %ebp -# parameter 4: 28 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $52, %esp - fldt 8(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %gs:20, %edx - xorl %esp, %edx - fldt _pzerol_value@GOTOFF(%ebx) - movl %edx, 36(%esp) - fcom %st(1) - fnstsw %ax - movl 28(%ebp), %ecx - sahf - jbe ..B1.3 -..B1.2: - negl %ecx - movl $-1, %esi - fxch %st(1) - fchs - fxch %st(1) - jmp ..B1.4 -..B1.3: - movl $1, %esi -..B1.4: - fldt _pion4@GOTOFF(%ebx) - fcom %st(2) - fnstsw %ax - sahf - jbe ..B1.8 -..B1.5: - fstp %st(1) - testb $1, %cl - je ..B1.7 -..B1.6: - fsubrp %st, %st(1) - jmp ..B1.27 -..B1.7: - fstp %st(0) - jmp ..B1.27 -..B1.8: - fldt _cody_thres_val@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - fldz - sahf - jbe ..B1.10 -..B1.9: - fstp %st(2) - fstp %st(0) - fstp %st(0) - fldt __4onpi@GOTOFF(%ebx) - fmul %st(1), %st - fnstcw (%esp) - movzwl (%esp), %eax - orl $3072, %eax - movl %eax, 8(%esp) - fldcw 8(%esp) - fistpl 16(%esp) - fldcw (%esp) - fldt _PI04@GOTOFF(%ebx) - fldt 12+_PI04@GOTOFF(%ebx) - fldt 24+_PI04@GOTOFF(%ebx) - movl 16(%esp), %eax - addl %eax, %ecx - testb $1, %cl - lea 1(%eax), %edx - jne ..L3 - movl %eax, %edx -..L3: - movl %edx, 24(%esp) - fildl 24(%esp) - fmul %st, %st(3) - fxch %st(3) - fsubrp %st, %st(4) - fxch %st(1) - fmul %st(2), %st - fsubrp %st, %st(3) - fmulp %st, %st(1) - fsubrp %st, %st(1) - jmp ..B1.27 -..B1.10: - fxch %st(3) - fstpt 16(%esp) - movzwl 24(%esp), %eax - movl %ecx, 12(%esp) - movl %eax, %ecx - andl $32767, %ecx - andl $-32768, %eax - lea -62(%ecx), %edx - andl $32767, %edx - lea -16417(%ecx), %edi - orl %edx, %eax - movw %ax, 24(%esp) - movl $-2078209981, %eax - fldt 16(%esp) - imull %edi - sarl $31, %edi - lea -16417(%edx,%ecx), %edx - sarl $4, %edx - subl %edi, %edx - movl %edx, %edi - shll $5, %edi - negl %edi - addl %edx, %edi - fstpt (%esp) - fldt (%esp) - movl $0, (%esp) - fldt (%esp) - lea -16417(%edi,%ecx), %ecx - cmpl $23, %ecx - fsubr %st, %st(1) - movl 12(%esp), %ecx - jl ..B1.12 -..B1.11: - fxch %st(4) - fstpt (%esp) - lea (,%edx,8), %eax - lea (%eax,%edx,4), %edi - incl %edx - fldt _4OPI@GOTOFF(%edi,%ebx) - fmul %st(1), %st - fldt 12+_4OPI@GOTOFF(%edi,%ebx) - fmul %st(5), %st - faddp %st, %st(1) - fstpt 12(%esp) - fldt 12(%esp) - andl $-16777216, 12(%esp) - fldt 12(%esp) - fsubrp %st, %st(1) - jmp ..B1.13 -..B1.12: - fstp %st(4) - fld %st(2) -..B1.13: - fld %st(4) - lea (,%edx,8), %edi - lea (%edi,%edx,4), %eax - fldt 12+_4OPI@GOTOFF(%eax,%ebx) - fmul %st, %st(1) - fmul %st(3), %st - fldt _4OPI@GOTOFF(%eax,%ebx) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fldt 24+_4OPI@GOTOFF(%eax,%ebx) - fmul %st(7), %st - faddp %st, %st(2) - fxch %st(1) - fstpt 24(%esp) - fldt 24(%esp) - fadd %st, %st(1) - fstpt 12(%esp) - fldt _ADDING@GOTOFF(%ebx) - fld %st(0) - fadd %st(2), %st - fstpt (%esp) - fldt (%esp) - fsubp %st, %st(1) - movl (%esp), %edi - fcom %st(1) - fnstsw %ax - fxch %st(1) - fstp %st(0) - fldt 24(%esp) - sahf - jbe ..B1.15 -..B1.14: - fldt _nonel_value@GOTOFF(%ebx) - decl %edi - faddp %st, %st(2) -..B1.15: - addl %edi, %ecx - fxch %st(1) - fsubrp %st, %st(2) - testb $1, %cl - je ..B1.18 -..B1.16: - fstp %st(4) - fldt _nonel_value@GOTOFF(%ebx) - fxch %st(4) -..B1.18: - lea 2(%edx), %edi - movl %edi, %eax - fxch %st(1) - faddp %st, %st(4) - negl %eax - faddp %st, %st(3) - addl $532, %eax - cmpl $5, %eax - jbe ..L4 - movl $5, %eax -..L4: - movl %eax, 8(%esp) - cmpl $532, %edi - jge ..B1.25 -..B1.19: - shrl $1, %eax - movl %eax, 12(%esp) - testl %eax, %eax - jbe ..B1.33 -..B1.20: - movl %esi, (%esp) - lea 16(,%edx,8), %eax - movl %ebx, 4(%esp) - lea 8(%eax,%edx,4), %eax - movl 12(%esp), %esi - xorl %edi, %edi - lea _4OPI@GOTOFF(%ebx,%eax), %eax -..B1.21: - jmp ..L5 -..L6: - faddp %st, %st(3) -..L5: - fld %st(3) - lea (%edi,%edi,2), %ebx - fldt 12(%eax,%ebx,8) - incl %edi - fmul %st, %st(1) - cmpl %esi, %edi - fmul %st(2), %st - fldt (%eax,%ebx,8) - fmul %st(3), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(4) - fldt 24(%eax,%ebx,8) - fmul %st(5), %st - faddp %st, %st(1) - jb ..L6 - faddp %st, %st(3) -..B1.22: - movl (%esp), %esi - lea 1(%edi,%edi), %edi - movl 4(%esp), %ebx -..B1.23: - lea -1(%edi), %eax - cmpl 8(%esp), %eax - jae ..B1.25 -..B1.24: - lea 1(%edi,%edx), %edx - lea (,%edx,8), %eax - lea (%eax,%edx,4), %edi - fldt _4OPI@GOTOFF(%ebx,%edi) - fmulp %st, %st(1) - fldt 12+_4OPI@GOTOFF(%ebx,%edi) - fmulp %st, %st(4) - fadd %st(3), %st - fadd %st, %st(2) -..B1.25: - fstp %st(3) - fstp %st(2) - fmulp %st, %st(1) -..B1.27: - testb $1, %cl - lea 1(%ecx), %edi - fld %st(0) - jne ..L7 - movl %ecx, %edi -..L7: - andl $7, %edi - movl 24(%ebp), %edx - fmul %st(1), %st - imull ssign@GOTOFF(%ebx,%edi,4), %esi - movl csign@GOTOFF(%ebx,%edi,4), %eax - andl $3, %edi - decl %edi - movl %esi, 24(%esp) - cmpl $1, %edi - fildl 24(%esp) - ja ..B1.29 -..B1.28: - fldt _PC@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PC@GOTOFF(%ebx) - movl 20(%ebp), %ecx - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PC@GOTOFF(%ebx) - movl %eax, 24(%esp) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _ponel_value@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%ecx) - fldt _PS@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fildl 24(%esp) - fmulp %st, %st(1) - fstpt (%edx) - jmp ..B1.30 -..B1.29: - fldt _PS@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PS@GOTOFF(%ebx) - movl 20(%ebp), %ecx - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PS@GOTOFF(%ebx) - movl %eax, 24(%esp) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fildl 24(%esp) - fldt 60+_PS@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 72+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_PS@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fmul %st(4), %st - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(1) - fstpt (%ecx) - fldt _PC@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84+_PC@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt _ponel_value@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%edx) -..B1.30: - movl 36(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.32 -..B1.31: - addl $52, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - call __stack_chk_fail@PLT -..B1.33: - movl $1, %edi - jmp ..B1.23 - .align 16,0x90 - .type __libm_sincos_pi4l,@function - .size __libm_sincos_pi4l,.-__libm_sincos_pi4l - .data -# -- End __libm_sincos_pi4l - .section .rodata, "a" - .align 4 - .align 4 -ssign: - .long 1 - .long 1 - .long 1 - .long 1 - .long -1 - .long -1 - .long -1 - .long -1 - .type ssign,@object - .size ssign,32 - .align 4 -csign: - .long 1 - .long 1 - .long -1 - .long -1 - .long -1 - .long -1 - .long 1 - .long 1 - .type csign,@object - .size csign,32 - .align 2 -_pzerol_value: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _pzerol_value,@object - .size _pzerol_value,12 - .align 2 -_pion4: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16382 - .word 0 - .type _pion4,@object - .size _pion4,12 - .align 2 -_cody_thres_val: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16413 - .word 0 - .type _cody_thres_val,@object - .size _cody_thres_val,12 - .align 2 -__4onpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16383 - .word 0 - .type __4onpi,@object - .size __4onpi,12 - .align 2 -_PI04: - .word 0 - .word 0 - .word 55936 - .word 51471 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 41728 - .word 34949 - .word 16356 - .word 0 - .word 14087 - .word 41696 - .word 12696 - .word 36145 - .word 16328 - .word 0 - .type _PI04,@object - .size _PI04,36 - .align 2 -_4OPI: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33646 - .word 41721 - .word 16445 - .word 0 - .word 0 - .word 0 - .word 10832 - .word 40072 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 44008 - .word 65043 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 28384 - .word 64154 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 38272 - .word 56162 - .word 16317 - .word 0 - .word 0 - .word 0 - .word 7298 - .word 51682 - .word 16290 - .word 0 - .word 0 - .word 0 - .word 45504 - .word 65320 - .word 16254 - .word 0 - .word 0 - .word 0 - .word 61204 - .word 44922 - .word 16227 - .word 0 - .word 0 - .word 0 - .word 18652 - .word 50030 - .word 16196 - .word 0 - .word 0 - .word 0 - .word 14144 - .word 59657 - .word 16163 - .word 0 - .word 0 - .word 0 - .word 37450 - .word 47105 - .word 16135 - .word 0 - .word 0 - .word 0 - .word 14898 - .word 56641 - .word 16104 - .word 0 - .word 0 - .word 0 - .word 34680 - .word 34623 - .word 16071 - .word 0 - .word 0 - .word 0 - .word 4760 - .word 45515 - .word 16041 - .word 0 - .word 0 - .word 0 - .word 41480 - .word 40187 - .word 16011 - .word 0 - .word 0 - .word 0 - .word 47852 - .word 55252 - .word 15979 - .word 0 - .word 0 - .word 0 - .word 54072 - .word 35081 - .word 15948 - .word 0 - .word 0 - .word 0 - .word 26808 - .word 57421 - .word 15916 - .word 0 - .word 0 - .word 0 - .word 20068 - .word 57232 - .word 15887 - .word 0 - .word 0 - .word 0 - .word 49576 - .word 60188 - .word 15854 - .word 0 - .word 0 - .word 0 - .word 10016 - .word 52861 - .word 15823 - .word 0 - .word 0 - .word 0 - .word 30648 - .word 35825 - .word 15792 - .word 0 - .word 0 - .word 0 - .word 60542 - .word 58528 - .word 15763 - .word 0 - .word 0 - .word 0 - .word 65468 - .word 61743 - .word 15732 - .word 0 - .word 0 - .word 0 - .word 64960 - .word 45825 - .word 15696 - .word 0 - .word 0 - .word 0 - .word 50604 - .word 38792 - .word 15670 - .word 0 - .word 0 - .word 0 - .word 18394 - .word 33435 - .word 15639 - .word 0 - .word 0 - .word 0 - .word 55780 - .word 42703 - .word 15608 - .word 0 - .word 0 - .word 0 - .word 14056 - .word 63841 - .word 15576 - .word 0 - .word 0 - .word 0 - .word 63080 - .word 62563 - .word 15545 - .word 0 - .word 0 - .word 0 - .word 20840 - .word 62207 - .word 15514 - .word 0 - .word 0 - .word 0 - .word 30094 - .word 59983 - .word 15484 - .word 0 - .word 0 - .word 0 - .word 61818 - .word 60389 - .word 15453 - .word 0 - .word 0 - .word 0 - .word 40186 - .word 40579 - .word 15422 - .word 0 - .word 0 - .word 0 - .word 42170 - .word 58004 - .word 15391 - .word 0 - .word 0 - .word 0 - .word 55276 - .word 39678 - .word 15359 - .word 0 - .word 0 - .word 0 - .word 44672 - .word 36806 - .word 15326 - .word 0 - .word 0 - .word 0 - .word 13060 - .word 34144 - .word 15297 - .word 0 - .word 0 - .word 0 - .word 28016 - .word 57231 - .word 15264 - .word 0 - .word 0 - .word 0 - .word 16112 - .word 44995 - .word 15235 - .word 0 - .word 0 - .word 0 - .word 53464 - .word 33387 - .word 15203 - .word 0 - .word 0 - .word 0 - .word 7296 - .word 60751 - .word 15170 - .word 0 - .word 0 - .word 0 - .word 29452 - .word 45231 - .word 15142 - .word 0 - .word 0 - .word 0 - .word 26208 - .word 49689 - .word 15111 - .word 0 - .word 0 - .word 0 - .word 37900 - .word 44002 - .word 15080 - .word 0 - .word 0 - .word 0 - .word 57340 - .word 33800 - .word 15049 - .word 0 - .word 0 - .word 0 - .word 27544 - .word 50178 - .word 15018 - .word 0 - .word 0 - .word 0 - .word 6168 - .word 40132 - .word 14987 - .word 0 - .word 0 - .word 0 - .word 21392 - .word 43702 - .word 14954 - .word 0 - .word 0 - .word 0 - .word 45168 - .word 54372 - .word 14926 - .word 0 - .word 0 - .word 0 - .word 8986 - .word 40688 - .word 14895 - .word 0 - .word 0 - .word 0 - .word 1648 - .word 53745 - .word 14863 - .word 0 - .word 0 - .word 0 - .word 30520 - .word 55795 - .word 14831 - .word 0 - .word 0 - .word 0 - .word 43060 - .word 32914 - .word 14801 - .word 0 - .word 0 - .word 0 - .word 46172 - .word 52771 - .word 14770 - .word 0 - .word 0 - .word 0 - .word 14056 - .word 45285 - .word 14738 - .word 0 - .word 0 - .word 0 - .word 53590 - .word 44868 - .word 14709 - .word 0 - .word 0 - .word 0 - .word 40786 - .word 35970 - .word 14678 - .word 0 - .word 0 - .word 0 - .word 33436 - .word 65411 - .word 14646 - .word 0 - .word 0 - .word 0 - .word 32006 - .word 61382 - .word 14616 - .word 0 - .word 0 - .word 0 - .word 37856 - .word 45239 - .word 14583 - .word 0 - .word 0 - .word 0 - .word 60894 - .word 49555 - .word 14554 - .word 0 - .word 0 - .word 0 - .word 48064 - .word 53065 - .word 14519 - .word 0 - .word 0 - .word 0 - .word 48624 - .word 54844 - .word 14492 - .word 0 - .word 0 - .word 0 - .word 7988 - .word 40762 - .word 14461 - .word 0 - .word 0 - .word 0 - .word 16270 - .word 58745 - .word 14430 - .word 0 - .word 0 - .word 0 - .word 37064 - .word 50168 - .word 14398 - .word 0 - .word 0 - .word 0 - .word 18624 - .word 63736 - .word 14364 - .word 0 - .word 0 - .word 0 - .word 60758 - .word 44966 - .word 14337 - .word 0 - .word 0 - .word 0 - .word 33304 - .word 47465 - .word 14306 - .word 0 - .word 0 - .word 0 - .word 6226 - .word 60503 - .word 14275 - .word 0 - .word 0 - .word 0 - .word 26380 - .word 54900 - .word 14243 - .word 0 - .word 0 - .word 0 - .word 44352 - .word 49860 - .word 14213 - .word 0 - .word 0 - .word 0 - .word 11904 - .word 42646 - .word 14182 - .word 0 - .word 0 - .word 0 - .word 55296 - .word 50279 - .word 14145 - .word 0 - .word 0 - .word 0 - .word 15474 - .word 50606 - .word 14120 - .word 0 - .word 0 - .word 0 - .word 45062 - .word 44137 - .word 14089 - .word 0 - .word 0 - .word 0 - .word 13472 - .word 36063 - .word 14055 - .word 0 - .word 0 - .word 0 - .word 40658 - .word 53854 - .word 14027 - .word 0 - .word 0 - .word 0 - .word 28652 - .word 43690 - .word 13996 - .word 0 - .word 0 - .word 0 - .word 24640 - .word 64348 - .word 13963 - .word 0 - .word 0 - .word 0 - .word 30284 - .word 41980 - .word 13933 - .word 0 - .word 0 - .word 0 - .word 45652 - .word 38222 - .word 13902 - .word 0 - .word 0 - .word 0 - .word 15900 - .word 62940 - .word 13871 - .word 0 - .word 0 - .word 0 - .word 31494 - .word 50741 - .word 13841 - .word 0 - .word 0 - .word 0 - .word 43194 - .word 55096 - .word 13810 - .word 0 - .word 0 - .word 0 - .word 1740 - .word 45646 - .word 13778 - .word 0 - .word 0 - .word 0 - .word 28936 - .word 44150 - .word 13748 - .word 0 - .word 0 - .word 0 - .word 8996 - .word 42955 - .word 13717 - .word 0 - .word 0 - .word 0 - .word 44096 - .word 61205 - .word 13684 - .word 0 - .word 0 - .word 0 - .word 44614 - .word 54550 - .word 13655 - .word 0 - .word 0 - .word 0 - .word 24926 - .word 57347 - .word 13624 - .word 0 - .word 0 - .word 0 - .word 3312 - .word 61415 - .word 13590 - .word 0 - .word 0 - .word 0 - .word 64336 - .word 63884 - .word 13562 - .word 0 - .word 0 - .word 0 - .word 2748 - .word 62259 - .word 13530 - .word 0 - .word 0 - .word 0 - .word 56672 - .word 51775 - .word 13498 - .word 0 - .word 0 - .word 0 - .word 32438 - .word 55423 - .word 13469 - .word 0 - .word 0 - .word 0 - .word 17652 - .word 45713 - .word 13438 - .word 0 - .word 0 - .word 0 - .word 65408 - .word 51586 - .word 13403 - .word 0 - .word 0 - .word 0 - .word 40416 - .word 55736 - .word 13376 - .word 0 - .word 0 - .word 0 - .word 52546 - .word 37734 - .word 13345 - .word 0 - .word 0 - .word 0 - .word 48880 - .word 64238 - .word 13314 - .word 0 - .word 0 - .word 0 - .word 56004 - .word 46833 - .word 13282 - .word 0 - .word 0 - .word 0 - .word 61760 - .word 38110 - .word 13250 - .word 0 - .word 0 - .word 0 - .word 41496 - .word 35659 - .word 13219 - .word 0 - .word 0 - .word 0 - .word 25472 - .word 41269 - .word 13187 - .word 0 - .word 0 - .word 0 - .word 45444 - .word 36018 - .word 13159 - .word 0 - .word 0 - .word 0 - .word 6510 - .word 56417 - .word 13128 - .word 0 - .word 0 - .word 0 - .word 3072 - .word 56837 - .word 13097 - .word 0 - .word 0 - .word 0 - .word 61338 - .word 48440 - .word 13066 - .word 0 - .word 0 - .word 0 - .word 49568 - .word 57088 - .word 13034 - .word 0 - .word 0 - .word 0 - .word 4240 - .word 39283 - .word 13002 - .word 0 - .word 0 - .word 0 - .word 18562 - .word 33537 - .word 12973 - .word 0 - .word 0 - .word 0 - .word 31422 - .word 44487 - .word 12942 - .word 0 - .word 0 - .word 0 - .word 31930 - .word 60459 - .word 12911 - .word 0 - .word 0 - .word 0 - .word 42272 - .word 36641 - .word 12878 - .word 0 - .word 0 - .word 0 - .word 28940 - .word 36150 - .word 12849 - .word 0 - .word 0 - .word 0 - .word 21010 - .word 50925 - .word 12818 - .word 0 - .word 0 - .word 0 - .word 29448 - .word 64886 - .word 12786 - .word 0 - .word 0 - .word 0 - .word 20500 - .word 54600 - .word 12756 - .word 0 - .word 0 - .word 0 - .word 54258 - .word 46233 - .word 12725 - .word 0 - .word 0 - .word 0 - .word 32628 - .word 42502 - .word 12693 - .word 0 - .word 0 - .word 0 - .word 61608 - .word 55072 - .word 12663 - .word 0 - .word 0 - .word 0 - .word 6236 - .word 57871 - .word 12631 - .word 0 - .word 0 - .word 0 - .word 42408 - .word 34616 - .word 12601 - .word 0 - .word 0 - .word 0 - .word 56692 - .word 51963 - .word 12569 - .word 0 - .word 0 - .word 0 - .word 39094 - .word 48526 - .word 12539 - .word 0 - .word 0 - .word 0 - .word 59870 - .word 38783 - .word 12508 - .word 0 - .word 0 - .word 0 - .word 26560 - .word 33165 - .word 12477 - .word 0 - .word 0 - .word 0 - .word 58666 - .word 37666 - .word 12446 - .word 0 - .word 0 - .word 0 - .word 58728 - .word 39788 - .word 12414 - .word 0 - .word 0 - .word 0 - .word 9048 - .word 43530 - .word 12383 - .word 0 - .word 0 - .word 0 - .word 58496 - .word 57659 - .word 12350 - .word 0 - .word 0 - .word 0 - .word 12324 - .word 37025 - .word 12322 - .word 0 - .word 0 - .word 0 - .word 38432 - .word 55856 - .word 12290 - .word 0 - .word 0 - .word 0 - .word 35210 - .word 45960 - .word 12260 - .word 0 - .word 0 - .word 0 - .word 45644 - .word 51345 - .word 12229 - .word 0 - .word 0 - .word 0 - .word 32854 - .word 63883 - .word 12198 - .word 0 - .word 0 - .word 0 - .word 29348 - .word 41450 - .word 12166 - .word 0 - .word 0 - .word 0 - .word 27384 - .word 38024 - .word 12134 - .word 0 - .word 0 - .word 0 - .word 57356 - .word 57291 - .word 12105 - .word 0 - .word 0 - .word 0 - .word 61164 - .word 51521 - .word 12073 - .word 0 - .word 0 - .word 0 - .word 21472 - .word 59151 - .word 12041 - .word 0 - .word 0 - .word 0 - .word 36704 - .word 39943 - .word 12010 - .word 0 - .word 0 - .word 0 - .word 45864 - .word 50151 - .word 11981 - .word 0 - .word 0 - .word 0 - .word 37892 - .word 63687 - .word 11949 - .word 0 - .word 0 - .word 0 - .word 14560 - .word 51615 - .word 11918 - .word 0 - .word 0 - .word 0 - .word 38776 - .word 55684 - .word 11886 - .word 0 - .word 0 - .word 0 - .word 59136 - .word 53570 - .word 11855 - .word 0 - .word 0 - .word 0 - .word 55556 - .word 37955 - .word 11826 - .word 0 - .word 0 - .word 0 - .word 54458 - .word 44670 - .word 11795 - .word 0 - .word 0 - .word 0 - .word 36446 - .word 34084 - .word 11764 - .word 0 - .word 0 - .word 0 - .word 46416 - .word 51693 - .word 11731 - .word 0 - .word 0 - .word 0 - .word 21432 - .word 34376 - .word 11702 - .word 0 - .word 0 - .word 0 - .word 56036 - .word 34809 - .word 11671 - .word 0 - .word 0 - .word 0 - .word 10562 - .word 55654 - .word 11640 - .word 0 - .word 0 - .word 0 - .word 20264 - .word 53052 - .word 11608 - .word 0 - .word 0 - .word 0 - .word 64064 - .word 50415 - .word 11574 - .word 0 - .word 0 - .word 0 - .word 17444 - .word 48295 - .word 11546 - .word 0 - .word 0 - .word 0 - .word 11874 - .word 52677 - .word 11516 - .word 0 - .word 0 - .word 0 - .word 60808 - .word 39275 - .word 11485 - .word 0 - .word 0 - .word 0 - .word 31792 - .word 55677 - .word 11451 - .word 0 - .word 0 - .word 0 - .word 60710 - .word 49006 - .word 11423 - .word 0 - .word 0 - .word 0 - .word 10520 - .word 37403 - .word 11391 - .word 0 - .word 0 - .word 0 - .word 20004 - .word 59470 - .word 11360 - .word 0 - .word 0 - .word 0 - .word 28096 - .word 37612 - .word 11330 - .word 0 - .word 0 - .word 0 - .word 20268 - .word 44280 - .word 11298 - .word 0 - .word 0 - .word 0 - .word 50740 - .word 61588 - .word 11267 - .word 0 - .word 0 - .word 0 - .word 56432 - .word 58835 - .word 11235 - .word 0 - .word 0 - .word 0 - .word 8576 - .word 42496 - .word 11200 - .word 0 - .word 0 - .word 0 - .word 33920 - .word 54912 - .word 11169 - .word 0 - .word 0 - .word 0 - .word 35620 - .word 54843 - .word 11143 - .word 0 - .word 0 - .word 0 - .word 736 - .word 43591 - .word 11109 - .word 0 - .word 0 - .word 0 - .word 39632 - .word 61060 - .word 11080 - .word 0 - .word 0 - .word 0 - .word 63452 - .word 63129 - .word 11051 - .word 0 - .word 0 - .word 0 - .word 56798 - .word 58512 - .word 11020 - .word 0 - .word 0 - .word 0 - .word 13472 - .word 46333 - .word 10986 - .word 0 - .word 0 - .word 0 - .word 37300 - .word 36598 - .word 10957 - .word 0 - .word 0 - .word 0 - .word 41952 - .word 41639 - .word 10924 - .word 0 - .word 0 - .word 0 - .word 52452 - .word 33459 - .word 10895 - .word 0 - .word 0 - .word 0 - .word 58558 - .word 33287 - .word 10865 - .word 0 - .word 0 - .word 0 - .word 7570 - .word 43843 - .word 10834 - .word 0 - .word 0 - .word 0 - .word 59416 - .word 63990 - .word 10802 - .word 0 - .word 0 - .word 0 - .word 65298 - .word 47744 - .word 10772 - .word 0 - .word 0 - .word 0 - .word 21076 - .word 34089 - .word 10741 - .word 0 - .word 0 - .word 0 - .word 7048 - .word 57394 - .word 10710 - .word 0 - .word 0 - .word 0 - .word 12872 - .word 55405 - .word 10677 - .word 0 - .word 0 - .word 0 - .word 12608 - .word 51669 - .word 10643 - .word 0 - .word 0 - .word 0 - .word 5350 - .word 48455 - .word 10617 - .word 0 - .word 0 - .word 0 - .word 23568 - .word 58692 - .word 10585 - .word 0 - .word 0 - .word 0 - .word 40784 - .word 37046 - .word 10553 - .word 0 - .word 0 - .word 0 - .word 38992 - .word 43861 - .word 10523 - .word 0 - .word 0 - .word 0 - .word 10064 - .word 40199 - .word 10493 - .word 0 - .word 0 - .word 0 - .word 26368 - .word 35771 - .word 10456 - .word 0 - .word 0 - .word 0 - .word 23994 - .word 60721 - .word 10431 - .word 0 - .word 0 - .word 0 - .word 25052 - .word 34302 - .word 10399 - .word 0 - .word 0 - .word 0 - .word 39842 - .word 54964 - .word 10369 - .word 0 - .word 0 - .word 0 - .word 11568 - .word 58277 - .word 10336 - .word 0 - .word 0 - .word 0 - .word 26160 - .word 46438 - .word 10306 - .word 0 - .word 0 - .word 0 - .word 23252 - .word 43049 - .word 10276 - .word 0 - .word 0 - .word 0 - .word 35288 - .word 58000 - .word 10245 - .word 0 - .word 0 - .word 0 - .word 14614 - .word 50216 - .word 10214 - .word 0 - .word 0 - .word 0 - .word 1168 - .word 48804 - .word 10181 - .word 0 - .word 0 - .word 0 - .word 60934 - .word 33006 - .word 10152 - .word 0 - .word 0 - .word 0 - .word 64512 - .word 62247 - .word 10117 - .word 0 - .word 0 - .word 0 - .word 59968 - .word 43121 - .word 10085 - .word 0 - .word 0 - .word 0 - .word 25560 - .word 39974 - .word 10057 - .word 0 - .word 0 - .word 0 - .word 1978 - .word 49353 - .word 10028 - .word 0 - .word 0 - .word 0 - .word 16290 - .word 38807 - .word 9997 - .word 0 - .word 0 - .word 0 - .word 8646 - .word 65226 - .word 9966 - .word 0 - .word 0 - .word 0 - .word 56896 - .word 34317 - .word 9933 - .word 0 - .word 0 - .word 0 - .word 40136 - .word 39118 - .word 9902 - .word 0 - .word 0 - .word 0 - .word 14200 - .word 41756 - .word 9871 - .word 0 - .word 0 - .word 0 - .word 59256 - .word 63202 - .word 9840 - .word 0 - .word 0 - .word 0 - .word 22968 - .word 63553 - .word 9810 - .word 0 - .word 0 - .word 0 - .word 736 - .word 44292 - .word 9778 - .word 0 - .word 0 - .word 0 - .word 23186 - .word 37760 - .word 9749 - .word 0 - .word 0 - .word 0 - .word 51008 - .word 34950 - .word 9714 - .word 0 - .word 0 - .word 0 - .word 1664 - .word 64248 - .word 9681 - .word 0 - .word 0 - .word 0 - .word 64352 - .word 35199 - .word 9656 - .word 0 - .word 0 - .word 0 - .word 34656 - .word 63747 - .word 9625 - .word 0 - .word 0 - .word 0 - .word 44330 - .word 49864 - .word 9594 - .word 0 - .word 0 - .word 0 - .word 11654 - .word 35567 - .word 9563 - .word 0 - .word 0 - .word 0 - .word 7924 - .word 58919 - .word 9531 - .word 0 - .word 0 - .word 0 - .word 2532 - .word 32800 - .word 9500 - .word 0 - .word 0 - .word 0 - .word 30024 - .word 53799 - .word 9469 - .word 0 - .word 0 - .word 0 - .word 30172 - .word 64347 - .word 9438 - .word 0 - .word 0 - .word 0 - .word 60036 - .word 51382 - .word 9407 - .word 0 - .word 0 - .word 0 - .word 58576 - .word 33093 - .word 9376 - .word 0 - .word 0 - .word 0 - .word 13888 - .word 38760 - .word 9345 - .word 0 - .word 0 - .word 0 - .word 9322 - .word 52460 - .word 9315 - .word 0 - .word 0 - .word 0 - .word 20944 - .word 41077 - .word 9282 - .word 0 - .word 0 - .word 0 - .word 17976 - .word 41861 - .word 9252 - .word 0 - .word 0 - .word 0 - .word 55176 - .word 55158 - .word 9222 - .word 0 - .word 0 - .word 0 - .word 4976 - .word 35223 - .word 9191 - .word 0 - .word 0 - .word 0 - .word 7816 - .word 39783 - .word 9159 - .word 0 - .word 0 - .word 0 - .word 27656 - .word 55669 - .word 9129 - .word 0 - .word 0 - .word 0 - .word 64944 - .word 53184 - .word 9095 - .word 0 - .word 0 - .word 0 - .word 12544 - .word 49190 - .word 9067 - .word 0 - .word 0 - .word 0 - .word 50612 - .word 44644 - .word 9035 - .word 0 - .word 0 - .word 0 - .word 8832 - .word 63111 - .word 9000 - .word 0 - .word 0 - .word 0 - .word 11744 - .word 36870 - .word 8974 - .word 0 - .word 0 - .word 0 - .word 9404 - .word 63025 - .word 8943 - .word 0 - .word 0 - .word 0 - .word 47316 - .word 43381 - .word 8912 - .word 0 - .word 0 - .word 0 - .word 55716 - .word 47433 - .word 8880 - .word 0 - .word 0 - .word 0 - .word 46414 - .word 48441 - .word 8850 - .word 0 - .word 0 - .word 0 - .word 19116 - .word 39506 - .word 8819 - .word 0 - .word 0 - .word 0 - .word 48060 - .word 53381 - .word 8788 - .word 0 - .word 0 - .word 0 - .word 57112 - .word 50739 - .word 8756 - .word 0 - .word 0 - .word 0 - .word 5840 - .word 60581 - .word 8724 - .word 0 - .word 0 - .word 0 - .word 62112 - .word 57199 - .word 8691 - .word 0 - .word 0 - .word 0 - .word 35908 - .word 59499 - .word 8663 - .word 0 - .word 0 - .word 0 - .word 13760 - .word 48116 - .word 8632 - .word 0 - .word 0 - .word 0 - .word 3136 - .word 56059 - .word 8597 - .word 0 - .word 0 - .word 0 - .word 37596 - .word 39221 - .word 8571 - .word 0 - .word 0 - .word 0 - .word 3232 - .word 48550 - .word 8536 - .word 0 - .word 0 - .word 0 - .word 22872 - .word 42749 - .word 8507 - .word 0 - .word 0 - .word 0 - .word 41948 - .word 40319 - .word 8478 - .word 0 - .word 0 - .word 0 - .word 31196 - .word 64693 - .word 8446 - .word 0 - .word 0 - .word 0 - .word 62052 - .word 52923 - .word 8416 - .word 0 - .word 0 - .word 0 - .word 2750 - .word 33544 - .word 8385 - .word 0 - .word 0 - .word 0 - .word 12462 - .word 46179 - .word 8354 - .word 0 - .word 0 - .word 0 - .word 25128 - .word 45120 - .word 8321 - .word 0 - .word 0 - .word 0 - .word 51634 - .word 62523 - .word 8292 - .word 0 - .word 0 - .word 0 - .word 15758 - .word 42163 - .word 8261 - .word 0 - .word 0 - .word 0 - .word 34022 - .word 36267 - .word 8230 - .word 0 - .word 0 - .word 0 - .word 41252 - .word 39796 - .word 8198 - .word 0 - .word 0 - .word 0 - .word 49782 - .word 54423 - .word 8168 - .word 0 - .word 0 - .word 0 - .word 25428 - .word 42086 - .word 8136 - .word 0 - .word 0 - .word 0 - .word 34388 - .word 44810 - .word 8105 - .word 0 - .word 0 - .word 0 - .word 7456 - .word 64092 - .word 8073 - .word 0 - .word 0 - .word 0 - .word 48336 - .word 62448 - .word 8041 - .word 0 - .word 0 - .word 0 - .word 60912 - .word 61622 - .word 8012 - .word 0 - .word 0 - .word 0 - .word 17852 - .word 37250 - .word 7982 - .word 0 - .word 0 - .word 0 - .word 57940 - .word 56453 - .word 7951 - .word 0 - .word 0 - .word 0 - .word 47256 - .word 59825 - .word 7919 - .word 0 - .word 0 - .word 0 - .word 3774 - .word 59120 - .word 7889 - .word 0 - .word 0 - .word 0 - .word 43448 - .word 62852 - .word 7857 - .word 0 - .word 0 - .word 0 - .word 4840 - .word 57195 - .word 7827 - .word 0 - .word 0 - .word 0 - .word 40862 - .word 52565 - .word 7796 - .word 0 - .word 0 - .word 0 - .word 1440 - .word 60474 - .word 7764 - .word 0 - .word 0 - .word 0 - .word 55520 - .word 38648 - .word 7734 - .word 0 - .word 0 - .word 0 - .word 15316 - .word 52422 - .word 7702 - .word 0 - .word 0 - .word 0 - .word 18704 - .word 47227 - .word 7672 - .word 0 - .word 0 - .word 0 - .word 48892 - .word 54283 - .word 7640 - .word 0 - .word 0 - .word 0 - .word 12670 - .word 41990 - .word 7610 - .word 0 - .word 0 - .word 0 - .word 27570 - .word 49842 - .word 7579 - .word 0 - .word 0 - .word 0 - .word 47230 - .word 47992 - .word 7548 - .word 0 - .word 0 - .word 0 - .word 41020 - .word 56253 - .word 7516 - .word 0 - .word 0 - .word 0 - .word 23404 - .word 58312 - .word 7486 - .word 0 - .word 0 - .word 0 - .word 35176 - .word 51854 - .word 7455 - .word 0 - .word 0 - .word 0 - .word 49188 - .word 59051 - .word 7423 - .word 0 - .word 0 - .word 0 - .word 16656 - .word 54507 - .word 7391 - .word 0 - .word 0 - .word 0 - .word 41320 - .word 48565 - .word 7362 - .word 0 - .word 0 - .word 0 - .word 302 - .word 42490 - .word 7331 - .word 0 - .word 0 - .word 0 - .word 26680 - .word 39967 - .word 7299 - .word 0 - .word 0 - .word 0 - .word 41304 - .word 43638 - .word 7269 - .word 0 - .word 0 - .word 0 - .word 2314 - .word 48533 - .word 7238 - .word 0 - .word 0 - .word 0 - .word 63294 - .word 35693 - .word 7207 - .word 0 - .word 0 - .word 0 - .word 24538 - .word 48319 - .word 7176 - .word 0 - .word 0 - .word 0 - .word 56296 - .word 47263 - .word 7145 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 38599 - .word 7113 - .word 0 - .word 0 - .word 0 - .word 6594 - .word 62116 - .word 7083 - .word 0 - .word 0 - .word 0 - .word 47104 - .word 63573 - .word 7043 - .word 0 - .word 0 - .word 0 - .word 34812 - .word 34303 - .word 7021 - .word 0 - .word 0 - .word 0 - .word 5144 - .word 33695 - .word 6990 - .word 0 - .word 0 - .word 0 - .word 24966 - .word 55768 - .word 6959 - .word 0 - .word 0 - .word 0 - .word 62720 - .word 43946 - .word 6923 - .word 0 - .word 0 - .word 0 - .word 31542 - .word 56062 - .word 6897 - .word 0 - .word 0 - .word 0 - .word 62356 - .word 59096 - .word 6865 - .word 0 - .word 0 - .word 0 - .word 28412 - .word 40533 - .word 6835 - .word 0 - .word 0 - .word 0 - .word 24080 - .word 50467 - .word 6803 - .word 0 - .word 0 - .word 0 - .word 33296 - .word 46841 - .word 6770 - .word 0 - .word 0 - .word 0 - .word 39600 - .word 38627 - .word 6742 - .word 0 - .word 0 - .word 0 - .word 14436 - .word 37607 - .word 6710 - .word 0 - .word 0 - .word 0 - .word 39032 - .word 56421 - .word 6678 - .word 0 - .word 0 - .word 0 - .word 64032 - .word 54987 - .word 6649 - .word 0 - .word 0 - .word 0 - .word 27648 - .word 42212 - .word 6613 - .word 0 - .word 0 - .word 0 - .word 43840 - .word 46107 - .word 6584 - .word 0 - .word 0 - .word 0 - .word 17316 - .word 36574 - .word 6556 - .word 0 - .word 0 - .word 0 - .word 8928 - .word 37652 - .word 6522 - .word 0 - .word 0 - .word 0 - .word 24944 - .word 47433 - .word 6493 - .word 0 - .word 0 - .word 0 - .word 27392 - .word 57430 - .word 6461 - .word 0 - .word 0 - .word 0 - .word 39848 - .word 43340 - .word 6430 - .word 0 - .word 0 - .word 0 - .word 64160 - .word 43542 - .word 6400 - .word 0 - .word 0 - .word 0 - .word 35226 - .word 63015 - .word 6370 - .word 0 - .word 0 - .word 0 - .word 40736 - .word 64368 - .word 6338 - .word 0 - .word 0 - .word 0 - .word 42168 - .word 49526 - .word 6307 - .word 0 - .word 0 - .word 0 - .word 45596 - .word 34243 - .word 6277 - .word 0 - .word 0 - .word 0 - .word 20690 - .word 39705 - .word 6246 - .word 0 - .word 0 - .word 0 - .word 54448 - .word 46856 - .word 6213 - .word 0 - .word 0 - .word 0 - .word 64392 - .word 62736 - .word 6182 - .word 0 - .word 0 - .word 0 - .word 12780 - .word 56461 - .word 6152 - .word 0 - .word 0 - .word 0 - .word 15360 - .word 49145 - .word 6122 - .word 0 - .word 0 - .word 0 - .word 20512 - .word 49931 - .word 6087 - .word 0 - .word 0 - .word 0 - .word 54512 - .word 55820 - .word 6057 - .word 0 - .word 0 - .word 0 - .word 8402 - .word 39333 - .word 6029 - .word 0 - .word 0 - .word 0 - .word 34094 - .word 53593 - .word 5998 - .word 0 - .word 0 - .word 0 - .word 31960 - .word 38817 - .word 5966 - .word 0 - .word 0 - .word 0 - .word 16954 - .word 39291 - .word 5936 - .word 0 - .word 0 - .word 0 - .word 49600 - .word 48765 - .word 5901 - .word 0 - .word 0 - .word 0 - .word 59580 - .word 56541 - .word 5874 - .word 0 - .word 0 - .word 0 - .word 35624 - .word 44550 - .word 5843 - .word 0 - .word 0 - .word 0 - .word 4142 - .word 47316 - .word 5812 - .word 0 - .word 0 - .word 0 - .word 43520 - .word 43612 - .word 5780 - .word 0 - .word 0 - .word 0 - .word 20976 - .word 40896 - .word 5747 - .word 0 - .word 0 - .word 0 - .word 63576 - .word 57729 - .word 5719 - .word 0 - .word 0 - .word 0 - .word 37288 - .word 33122 - .word 5688 - .word 0 - .word 0 - .word 0 - .word 24384 - .word 52079 - .word 5654 - .word 0 - .word 0 - .word 0 - .word 47952 - .word 58719 - .word 5624 - .word 0 - .word 0 - .word 0 - .word 44242 - .word 55445 - .word 5595 - .word 0 - .word 0 - .word 0 - .word 61232 - .word 38847 - .word 5561 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 46039 - .word 5528 - .word 0 - .word 0 - .word 0 - .word 13396 - .word 42933 - .word 5502 - .word 0 - .word 0 - .word 0 - .word 27392 - .word 43305 - .word 5467 - .word 0 - .word 0 - .word 0 - .word 40708 - .word 35319 - .word 5440 - .word 0 - .word 0 - .word 0 - .word 44408 - .word 55685 - .word 5409 - .word 0 - .word 0 - .word 0 - .word 42090 - .word 44607 - .word 5378 - .word 0 - .word 0 - .word 0 - .word 25504 - .word 53466 - .word 5345 - .word 0 - .word 0 - .word 0 - .word 24208 - .word 33149 - .word 5315 - .word 0 - .word 0 - .word 0 - .word 5268 - .word 45375 - .word 5285 - .word 0 - .word 0 - .word 0 - .word 144 - .word 40000 - .word 5254 - .word 0 - .word 0 - .word 0 - .word 56688 - .word 52358 - .word 5221 - .word 0 - .word 0 - .word 0 - .word 25848 - .word 56175 - .word 5190 - .word 0 - .word 0 - .word 0 - .word 57900 - .word 44055 - .word 5160 - .word 0 - .word 0 - .word 0 - .word 24800 - .word 43437 - .word 5128 - .word 0 - .word 0 - .word 0 - .word 17984 - .word 54872 - .word 5094 - .word 0 - .word 0 - .word 0 - .word 25744 - .word 41345 - .word 5068 - .word 0 - .word 0 - .word 0 - .word 7668 - .word 43682 - .word 5036 - .word 0 - .word 0 - .word 0 - .word 47434 - .word 36705 - .word 5006 - .word 0 - .word 0 - .word 0 - .word 20888 - .word 40323 - .word 4974 - .word 0 - .word 0 - .word 0 - .word 3962 - .word 43032 - .word 4944 - .word 0 - .word 0 - .word 0 - .word 50270 - .word 49260 - .word 4913 - .word 0 - .word 0 - .word 0 - .word 20160 - .word 64041 - .word 4877 - .word 0 - .word 0 - .word 0 - .word 25624 - .word 36013 - .word 4849 - .word 0 - .word 0 - .word 0 - .word 48328 - .word 59345 - .word 4820 - .word 0 - .word 0 - .word 0 - .word 51508 - .word 63920 - .word 4788 - .word 0 - .word 0 - .word 0 - .word 27872 - .word 39135 - .word 4758 - .word 0 - .word 0 - .word 0 - .word 13590 - .word 58857 - .word 4727 - .word 0 - .word 0 - .word 0 - .word 50880 - .word 61323 - .word 4692 - .word 0 - .word 0 - .word 0 - .word 44802 - .word 37181 - .word 4665 - .word 0 - .word 0 - .word 0 - .word 53808 - .word 57813 - .word 4634 - .word 0 - .word 0 - .word 0 - .word 64424 - .word 49714 - .word 4602 - .word 0 - .word 0 - .word 0 - .word 31652 - .word 44011 - .word 4572 - .word 0 - .word 0 - .word 0 - .word 28252 - .word 50834 - .word 4541 - .word 0 - .word 0 - .word 0 - .word 30370 - .word 38742 - .word 4510 - .word 0 - .word 0 - .word 0 - .word 57728 - .word 58403 - .word 4473 - .word 0 - .word 0 - .word 0 - .word 35900 - .word 37112 - .word 4448 - .word 0 - .word 0 - .word 0 - .word 40764 - .word 40914 - .word 4417 - .word 0 - .word 0 - .word 0 - .word 21472 - .word 46910 - .word 4386 - .word 0 - .word 0 - .word 0 - .word 17854 - .word 35030 - .word 4355 - .word 0 - .word 0 - .word 0 - .word 4378 - .word 35776 - .word 4324 - .word 0 - .word 0 - .word 0 - .word 57962 - .word 55295 - .word 4293 - .word 0 - .word 0 - .word 0 - .word 64352 - .word 56717 - .word 4260 - .word 0 - .word 0 - .word 0 - .word 37744 - .word 49416 - .word 4229 - .word 0 - .word 0 - .word 0 - .word 38484 - .word 35759 - .word 4200 - .word 0 - .word 0 - .word 0 - .word 55020 - .word 54969 - .word 4169 - .word 0 - .word 0 - .word 0 - .word 9188 - .word 55223 - .word 4137 - .word 0 - .word 0 - .word 0 - .word 6822 - .word 43079 - .word 4107 - .word 0 - .word 0 - .word 0 - .word 48870 - .word 40943 - .word 4076 - .word 0 - .word 0 - .word 0 - .word 9936 - .word 42731 - .word 4043 - .word 0 - .word 0 - .word 0 - .word 23430 - .word 43136 - .word 4014 - .word 0 - .word 0 - .word 0 - .word 4700 - .word 55665 - .word 3982 - .word 0 - .word 0 - .word 0 - .word 8056 - .word 40216 - .word 3951 - .word 0 - .word 0 - .word 0 - .word 3716 - .word 45403 - .word 3920 - .word 0 - .word 0 - .word 0 - .word 53440 - .word 49488 - .word 3889 - .word 0 - .word 0 - .word 0 - .word 41776 - .word 50188 - .word 3858 - .word 0 - .word 0 - .word 0 - .word 20994 - .word 64556 - .word 3828 - .word 0 - .word 0 - .word 0 - .word 16252 - .word 60661 - .word 3796 - .word 0 - .word 0 - .word 0 - .word 61252 - .word 65021 - .word 3765 - .word 0 - .word 0 - .word 0 - .word 16236 - .word 43803 - .word 3734 - .word 0 - .word 0 - .word 0 - .word 63064 - .word 35308 - .word 3702 - .word 0 - .word 0 - .word 0 - .word 49096 - .word 39848 - .word 3673 - .word 0 - .word 0 - .word 0 - .word 15680 - .word 48673 - .word 3642 - .word 0 - .word 0 - .word 0 - .word 48068 - .word 50957 - .word 3611 - .word 0 - .word 0 - .word 0 - .word 20824 - .word 56086 - .word 3579 - .word 0 - .word 0 - .word 0 - .word 46504 - .word 43224 - .word 3549 - .word 0 - .word 0 - .word 0 - .word 52428 - .word 46094 - .word 3517 - .word 0 - .word 0 - .word 0 - .word 17548 - .word 52066 - .word 3487 - .word 0 - .word 0 - .word 0 - .word 61738 - .word 35565 - .word 3456 - .word 0 - .word 0 - .word 0 - .word 31184 - .word 50588 - .word 3424 - .word 0 - .word 0 - .word 0 - .word 1716 - .word 52681 - .word 3394 - .word 0 - .word 0 - .word 0 - .word 44656 - .word 43385 - .word 3363 - .word 0 - .word 0 - .word 0 - .word 12668 - .word 43259 - .word 3331 - .word 0 - .word 0 - .word 0 - .word 24544 - .word 35408 - .word 3298 - .word 0 - .word 0 - .word 0 - .word 28854 - .word 65018 - .word 3270 - .word 0 - .word 0 - .word 0 - .word 5696 - .word 40391 - .word 3238 - .word 0 - .word 0 - .word 0 - .word 39580 - .word 56400 - .word 3208 - .word 0 - .word 0 - .word 0 - .word 20428 - .word 39579 - .word 3177 - .word 0 - .word 0 - .word 0 - .word 32328 - .word 36727 - .word 3146 - .word 0 - .word 0 - .word 0 - .word 34020 - .word 54457 - .word 3115 - .word 0 - .word 0 - .word 0 - .word 34016 - .word 48400 - .word 3083 - .word 0 - .word 0 - .word 0 - .word 6922 - .word 51417 - .word 3053 - .word 0 - .word 0 - .word 0 - .word 27208 - .word 64641 - .word 3021 - .word 0 - .word 0 - .word 0 - .word 1802 - .word 48886 - .word 2991 - .word 0 - .word 0 - .word 0 - .word 35440 - .word 61590 - .word 2960 - .word 0 - .word 0 - .word 0 - .word 60610 - .word 51604 - .word 2929 - .word 0 - .word 0 - .word 0 - .word 5440 - .word 38199 - .word 2895 - .word 0 - .word 0 - .word 0 - .word 6914 - .word 43867 - .word 2867 - .word 0 - .word 0 - .word 0 - .word 24000 - .word 45256 - .word 2834 - .word 0 - .word 0 - .word 0 - .word 51496 - .word 57396 - .word 2804 - .word 0 - .word 0 - .word 0 - .word 11538 - .word 46256 - .word 2774 - .word 0 - .word 0 - .word 0 - .word 36802 - .word 48020 - .word 2743 - .word 0 - .word 0 - .word 0 - .word 57910 - .word 57903 - .word 2712 - .word 0 - .word 0 - .word 0 - .word 47484 - .word 48798 - .word 2680 - .word 0 - .word 0 - .word 0 - .word 57766 - .word 57709 - .word 2650 - .word 0 - .word 0 - .word 0 - .word 54064 - .word 47856 - .word 2619 - .word 0 - .word 0 - .word 0 - .word 49340 - .word 48080 - .word 2588 - .word 0 - .word 0 - .word 0 - .word 36454 - .word 56731 - .word 2557 - .word 0 - .word 0 - .word 0 - .word 51548 - .word 63385 - .word 2526 - .word 0 - .word 0 - .word 0 - .word 56000 - .word 48716 - .word 2490 - .word 0 - .word 0 - .word 0 - .word 44992 - .word 50040 - .word 2460 - .word 0 - .word 0 - .word 0 - .word 43136 - .word 58177 - .word 2430 - .word 0 - .word 0 - .word 0 - .word 49730 - .word 33270 - .word 2402 - .word 0 - .word 0 - .word 0 - .word 29808 - .word 51063 - .word 2371 - .word 0 - .word 0 - .word 0 - .word 25276 - .word 46724 - .word 2339 - .word 0 - .word 0 - .word 0 - .word 17324 - .word 35928 - .word 2308 - .word 0 - .word 0 - .word 0 - .word 52284 - .word 63916 - .word 2278 - .word 0 - .word 0 - .word 0 - .word 5414 - .word 46704 - .word 2247 - .word 0 - .word 0 - .word 0 - .word 51710 - .word 57168 - .word 2216 - .word 0 - .word 0 - .word 0 - .word 27366 - .word 49253 - .word 2185 - .word 0 - .word 0 - .word 0 - .word 45332 - .word 53033 - .word 2154 - .word 0 - .word 0 - .word 0 - .word 54152 - .word 37418 - .word 2121 - .word 0 - .word 0 - .word 0 - .word 53076 - .word 47398 - .word 2092 - .word 0 - .word 0 - .word 0 - .word 14374 - .word 59477 - .word 2061 - .word 0 - .word 0 - .word 0 - .word 59336 - .word 33435 - .word 2029 - .word 0 - .word 0 - .word 0 - .word 21612 - .word 43267 - .word 1999 - .word 0 - .word 0 - .word 0 - .word 34664 - .word 39372 - .word 1966 - .word 0 - .word 0 - .word 0 - .word 172 - .word 62761 - .word 1936 - .word 0 - .word 0 - .word 0 - .word 9816 - .word 40715 - .word 1905 - .word 0 - .word 0 - .word 0 - .word 65116 - .word 40481 - .word 1875 - .word 0 - .word 0 - .word 0 - .word 28066 - .word 39184 - .word 1844 - .word 0 - .word 0 - .word 0 - .word 37408 - .word 63923 - .word 1813 - .word 0 - .word 0 - .word 0 - .word 15760 - .word 42305 - .word 1782 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 59340 - .word 1750 - .word 0 - .word 0 - .word 0 - .word 43258 - .word 59402 - .word 1720 - .word 0 - .word 0 - .word 0 - .word 19988 - .word 50087 - .word 1689 - .word 0 - .word 0 - .word 0 - .word 63456 - .word 47833 - .word 1655 - .word 0 - .word 0 - .word 0 - .word 65184 - .word 61426 - .word 1626 - .word 0 - .word 0 - .word 0 - .word 52982 - .word 48456 - .word 1596 - .word 0 - .word 0 - .word 0 - .word 30020 - .word 62809 - .word 1564 - .word 0 - .word 0 - .word 0 - .word 9096 - .word 63061 - .word 1533 - .word 0 - .word 0 - .word 0 - .word 59648 - .word 44374 - .word 1499 - .word 0 - .word 0 - .word 0 - .word 11456 - .word 33847 - .word 1470 - .word 0 - .word 0 - .word 0 - .word 12392 - .word 50500 - .word 1440 - .word 0 - .word 0 - .word 0 - .word 56432 - .word 59196 - .word 1408 - .word 0 - .word 0 - .word 0 - .word 61008 - .word 40265 - .word 1377 - .word 0 - .word 0 - .word 0 - .word 37842 - .word 33270 - .word 1348 - .word 0 - .word 0 - .word 0 - .word 37916 - .word 44543 - .word 1316 - .word 0 - .word 0 - .word 0 - .word 11490 - .word 36421 - .word 1286 - .word 0 - .word 0 - .word 0 - .word 19040 - .word 38397 - .word 1254 - .word 0 - .word 0 - .word 0 - .word 31224 - .word 47162 - .word 1224 - .word 0 - .word 0 - .word 0 - .word 52056 - .word 41461 - .word 1192 - .word 0 - .word 0 - .word 0 - .word 10810 - .word 56374 - .word 1162 - .word 0 - .word 0 - .word 0 - .word 5358 - .word 35086 - .word 1131 - .word 0 - .word 0 - .word 0 - .word 36640 - .word 50226 - .word 1096 - .word 0 - .word 0 - .word 0 - .word 33856 - .word 45597 - .word 1067 - .word 0 - .word 0 - .word 0 - .word 21552 - .word 63128 - .word 1036 - .word 0 - .word 0 - .word 0 - .word 1198 - .word 35616 - .word 1007 - .word 0 - .word 0 - .word 0 - .word 1232 - .word 59506 - .word 976 - .word 0 - .word 0 - .word 0 - .word 51086 - .word 34963 - .word 945 - .word 0 - .word 0 - .word 0 - .word 3960 - .word 39061 - .word 912 - .word 0 - .word 0 - .word 0 - .word 4564 - .word 57134 - .word 882 - .word 0 - .word 0 - .word 0 - .word 59468 - .word 35285 - .word 852 - .word 0 - .word 0 - .word 0 - .word 63422 - .word 35431 - .word 821 - .word 0 - .word 0 - .word 0 - .word 38352 - .word 51462 - .word 790 - .word 0 - .word 0 - .word 0 - .word 25806 - .word 55660 - .word 759 - .word 0 - .word 0 - .word 0 - .word 38842 - .word 41327 - .word 728 - .word 0 - .word 0 - .word 0 - .word 17980 - .word 50458 - .word 697 - .word 0 - .word 0 - .word 0 - .word 61194 - .word 59710 - .word 666 - .word 0 - .word 0 - .word 0 - .word 21098 - .word 42086 - .word 635 - .word 0 - .word 0 - .word 0 - .word 16704 - .word 43341 - .word 602 - .word 0 - .word 0 - .word 0 - .word 46316 - .word 52840 - .word 573 - .word 0 - .word 0 - .word 0 - .word 20386 - .word 33936 - .word 542 - .word 0 - .word 0 - .word 0 - .word 20064 - .word 51864 - .word 509 - .word 0 - .word 0 - .word 0 - .word 2268 - .word 57500 - .word 479 - .word 0 - .word 0 - .word 0 - .word 11152 - .word 51171 - .word 449 - .word 0 - .word 0 - .word 0 - .word 23164 - .word 63727 - .word 417 - .word 0 - .word 0 - .word 0 - .word 20514 - .word 40280 - .word 387 - .word 0 - .word 0 - .word 0 - .word 21818 - .word 57922 - .word 356 - .word 0 - .word 0 - .word 0 - .word 32366 - .word 46413 - .word 325 - .word 0 - .word 0 - .word 0 - .word 53972 - .word 43148 - .word 294 - .word 0 - .word 0 - .word 0 - .word 30134 - .word 65133 - .word 263 - .word 0 - .word 0 - .word 0 - .word 15282 - .word 61516 - .word 232 - .word 0 - .word 0 - .word 0 - .word 49872 - .word 49222 - .word 200 - .word 0 - .word 0 - .word 0 - .word 9484 - .word 63958 - .word 170 - .word 0 - .word 0 - .word 0 - .word 47028 - .word 35341 - .word 139 - .word 0 - .word 0 - .word 0 - .word 6770 - .word 58613 - .word 108 - .word 0 - .word 0 - .word 0 - .word 33372 - .word 43448 - .word 77 - .word 0 - .word 0 - .word 0 - .word 27792 - .word 51629 - .word 43 - .word 0 - .word 0 - .word 0 - .word 19712 - .word 53691 - .word 15 - .word 0 - .type _4OPI,@object - .size _4OPI,6384 - .align 2 -_ADDING: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16446 - .word 0 - .type _ADDING,@object - .size _ADDING,12 - .align 2 -_nonel_value: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .type _nonel_value,@object - .size _nonel_value,12 - .align 2 -_PC: - .word 23996 - .word 61276 - .word 60076 - .word 54715 - .word 16338 - .word 0 - .word 29541 - .word 45883 - .word 23690 - .word 51658 - .word 49114 - .word 0 - .word 41007 - .word 30189 - .word 50933 - .word 36726 - .word 16354 - .word 0 - .word 11013 - .word 35124 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 13032 - .word 3304 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 45630 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .type _PC,@object - .size _PC,96 - .align 2 -_ponel_value: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _ponel_value,@object - .size _ponel_value,12 - .align 2 -_PS: - .word 25 - .word 22807 - .word 53737 - .word 51452 - .word 16334 - .word 0 - .word 54536 - .word 42444 - .word 58524 - .word 55101 - .word 49110 - .word 0 - .word 63911 - .word 27722 - .word 12213 - .word 45202 - .word 16350 - .word 0 - .word 3718 - .word 18986 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 10480 - .word 46680 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 12958 - .word 3329 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 35030 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .type _PS,@object - .size _PS,96 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincos_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincos_wmt.S deleted file mode 100644 index 6807fe1cfa..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincos_wmt.S +++ /dev/null @@ -1,1343 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincos_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin sincos - .text - .align 16,0x90 - .globl sincos -sincos: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -# parameter 3: 20 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $168, %esp - movl %ebx, 112(%esp) - call static_func - movl %eax, %ebx - movsd 176(%esp), %xmm0 - movl 184(%esp), %eax - movl %eax, 32(%esp) - movl 188(%esp), %eax - movl %eax, 36(%esp) - stmxcsr 64(%esp) - movl 64(%esp), %edx - andl $-24577, %edx - cmpl %edx, 64(%esp) - jne .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - pextrw $3, %xmm0, %eax - andl $32767, %eax - subl $12336, %eax - cmpl $4293, %eax - ja .L_2TAG_PACKET_2.0.2 - unpcklpd %xmm0, %xmm0 - movapd 4160(%ebx), %xmm1 - mulpd %xmm0, %xmm1 - movapd 4176(%ebx), %xmm2 - cvtsd2si %xmm1, %edx - addpd %xmm2, %xmm1 - movapd 4192(%ebx), %xmm3 - subpd %xmm2, %xmm1 - movapd 4208(%ebx), %xmm2 - mulpd %xmm1, %xmm3 - addl $1865216, %edx - movapd %xmm0, %xmm4 - andl $63, %edx - movapd 4144(%ebx), %xmm5 - lea (%ebx), %eax - shll $6, %edx - addl %edx, %eax - mulpd %xmm1, %xmm2 - subpd %xmm3, %xmm0 - mulpd 4224(%ebx), %xmm1 - subpd %xmm3, %xmm4 - movapd 16(%eax), %xmm7 - movapd %xmm4, %xmm3 - subpd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - movapd 4112(%ebx), %xmm6 - mulpd %xmm4, %xmm7 - subpd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subpd %xmm2, %xmm3 - movapd (%eax), %xmm2 - subpd %xmm3, %xmm1 - movapd 48(%eax), %xmm3 - addpd %xmm3, %xmm2 - subpd %xmm2, %xmm7 - mulpd %xmm7, %xmm1 - movapd 16(%eax), %xmm7 - mulpd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulpd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm7 - mulpd %xmm0, %xmm0 - addpd 4128(%ebx), %xmm5 - mulpd (%eax), %xmm4 - addpd 4096(%ebx), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, %xmm0 - addpd 16(%eax), %xmm3 - addpd %xmm5, %xmm6 - movapd %xmm6, %xmm5 - unpckhpd %xmm6, %xmm6 - unpcklpd %xmm5, %xmm5 - mulpd %xmm7, %xmm6 - mulpd %xmm5, %xmm2 - movapd %xmm4, %xmm7 - addpd %xmm3, %xmm4 - movapd 16(%eax), %xmm5 - subpd %xmm3, %xmm5 - subpd %xmm4, %xmm3 - addpd 32(%eax), %xmm1 - addpd %xmm0, %xmm5 - addpd %xmm7, %xmm3 - addpd %xmm5, %xmm1 - addpd %xmm3, %xmm1 - addpd %xmm2, %xmm1 - addpd %xmm6, %xmm1 - movl 64(%esp), %edx - andl $-24577, %edx - cmpl 64(%esp), %edx - je .L_2TAG_PACKET_3.0.2 - stmxcsr 72(%esp) - movl 64(%esp), %edx - andl $24576, %edx - orl %edx, 72(%esp) - ldmxcsr 72(%esp) -.L_2TAG_PACKET_3.0.2: - addpd %xmm4, %xmm1 - movapd %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - movl 32(%esp), %eax - movsd %xmm0, (%eax) - movl 36(%esp), %eax - movsd %xmm1, (%eax) - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_2.0.2: - jg .L_2TAG_PACKET_5.0.2 - movapd %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orl $32768, %eax - pinsrw $3, %eax, %xmm1 - movl 64(%esp), %edx - andl $-24577, %edx - cmpl 64(%esp), %edx - je .L_2TAG_PACKET_6.0.2 - stmxcsr 72(%esp) - movl 64(%esp), %edx - andl $24576, %edx - orl %edx, 72(%esp) - ldmxcsr 72(%esp) -.L_2TAG_PACKET_6.0.2: - addsd 4288(%ebx), %xmm1 - cmpl $32784, %eax - jge .L_2TAG_PACKET_7.0.2 - mulsd 4272(%ebx), %xmm0 - movl 32(%esp), %eax - movsd %xmm0, (%eax) - movl 36(%esp), %eax - movsd %xmm1, (%eax) - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_7.0.2: - movsd 4240(%ebx), %xmm3 - mulsd %xmm0, %xmm3 - subsd %xmm0, %xmm3 - movsd 4256(%ebx), %xmm0 - mulsd %xmm3, %xmm0 - movl 32(%esp), %eax - movsd %xmm0, (%eax) - movl 36(%esp), %eax - movsd %xmm1, (%eax) - jmp .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_0.0.2: - movl 64(%esp), %edx - andl $-24577, %edx - movl %edx, 72(%esp) - ldmxcsr 72(%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_5.0.2: - subl $32, %esp - movsd %xmm0, (%esp) - lea 80(%esp), %eax - movl %eax, 8(%esp) - movl $3, %eax - movl %eax, 12(%esp) - call __libm_sincos_huge - addl $32, %esp - movq 56(%esp), %xmm0 - movq 48(%esp), %xmm1 - movl 32(%esp), %eax - movl 36(%esp), %edx - movq %xmm0, (%eax) - movq %xmm1, (%edx) -.L_2TAG_PACKET_8.0.2: - movl 64(%esp), %edx - andl $-24577, %edx - cmpl 64(%esp), %edx - je .L_2TAG_PACKET_4.0.2 - stmxcsr 72(%esp) - movl 64(%esp), %edx - andl $24576, %edx - orl %edx, 72(%esp) - ldmxcsr 72(%esp) -.L_2TAG_PACKET_4.0.2: - movl 112(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type sincos,@function - .size sincos,.-sincos - .data -# -- End sincos - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 3217031168 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 3220176896 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 1069547520 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 1071644672 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 1072693248 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 1069547520 - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .long 2773927732 - .long 1053236707 - .long 436314138 - .long 1056571808 - .long 1841940611 - .long 1076125488 - .long 1841940611 - .long 1076125488 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 1413480448 - .long 1069097467 - .long 1413480448 - .long 1069097467 - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .long 771977331 - .long 996350346 - .long 771977331 - .long 996350346 - .long 0 - .long 1130364928 - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .long 0 - .long 1015021568 - .long 4294967295 - .long 1072693247 - .long 4294967295 - .long 1072693247 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .type static_const_table,@object - .size static_const_table,4304 - .data - .hidden __libm_sincos_huge - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosdl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosdl_table.S deleted file mode 100644 index c9ef20a3e4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosdl_table.S +++ /dev/null @@ -1,768 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincosdl_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .hidden __libm_sindl_cosdl_table - .globl __libm_sindl_cosdl_table -__libm_sindl_cosdl_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 730455326 - .long 1066524427 - .long 1746175880 - .long 1010139981 - .long 2549460874 - .long 1072692928 - .long 4286585365 - .long 3162605893 - .long 3388464167 - .long 1067572824 - .long 3405773388 - .long 1011262106 - .long 2025784679 - .long 1072691970 - .long 3458349249 - .long 3162669794 - .long 1223674126 - .long 1068157895 - .long 1350368814 - .long 3158420169 - .long 3977438749 - .long 1072690373 - .long 2138672104 - .long 1015504988 - .long 1835684136 - .long 1068620687 - .long 3698316769 - .long 3158223757 - .long 1903230966 - .long 1072688139 - .long 1549185311 - .long 1015860439 - .long 3099754755 - .long 1068912598 - .long 85775068 - .long 3160181596 - .long 3021477282 - .long 1072685267 - .long 1009168830 - .long 3161309439 - .long 2604423020 - .long 1069204064 - .long 2303648607 - .long 1009017464 - .long 2499307462 - .long 1072681759 - .long 1081812731 - .long 1015750919 - .long 1280271059 - .long 1069494996 - .long 1784430238 - .long 1012342196 - .long 631389835 - .long 1072677616 - .long 319889322 - .long 1015931913 - .long 2525863449 - .long 1069666412 - .long 3319430370 - .long 1012720668 - .long 2838533242 - .long 1072672838 - .long 3931096191 - .long 3163228296 - .long 1739084661 - .long 1069811211 - .long 266127812 - .long 1005440081 - .long 2486166620 - .long 1072667428 - .long 1862034983 - .long 3163124964 - .long 2114679690 - .long 1069955610 - .long 1043937223 - .long 3160884320 - .long 2357271575 - .long 1072661387 - .long 1809738197 - .long 1015448300 - .long 3715523151 - .long 1070099565 - .long 3282620278 - .long 1013092107 - .long 1765324482 - .long 1072654717 - .long 2731192352 - .long 3162086677 - .long 2890029302 - .long 1070243033 - .long 2223107338 - .long 3159965253 - .long 846856320 - .long 1072647420 - .long 116450415 - .long 3163379753 - .long 919455349 - .long 1070385970 - .long 2064618035 - .long 3159935516 - .long 558794511 - .long 1072639498 - .long 1424282741 - .long 3161718678 - .long 4075075869 - .long 1070528331 - .long 3748620424 - .long 3160490968 - .long 2675554853 - .long 1072630953 - .long 3840651826 - .long 3156703495 - .long 3247638160 - .long 1070633085 - .long 3696489768 - .long 1014652612 - .long 1195949845 - .long 1072621789 - .long 1259393923 - .long 3162332067 - .long 3711077929 - .long 1070703626 - .long 3146917124 - .long 1014611084 - .long 3814620032 - .long 1072612007 - .long 3070837564 - .long 3162674392 - .long 3481523655 - .long 1070773815 - .long 2713761655 - .long 1014001377 - .long 1853610783 - .long 1072601612 - .long 3649998803 - .long 1015704482 - .long 925886800 - .long 1070843631 - .long 436010265 - .long 3162460259 - .long 323245311 - .long 1072590606 - .long 3093873492 - .long 1015519453 - .long 3489713627 - .long 1070913051 - .long 528334979 - .long 1014764117 - .long 738112715 - .long 1072578992 - .long 334349375 - .long 3162809522 - .long 1955204085 - .long 1070982056 - .long 1689242582 - .long 1014445850 - .long 1112681756 - .long 1072566774 - .long 1734695380 - .long 3163113281 - .long 533648188 - .long 1071050624 - .long 3960375553 - .long 1012377538 - .long 251639813 - .long 1072553956 - .long 3380683078 - .long 1012638586 - .long 4008023681 - .long 1071118733 - .long 570275026 - .long 1014484594 - .long 2039991128 - .long 1072540541 - .long 1062999797 - .long 3162182390 - .long 580452267 - .long 1071186365 - .long 3449718872 - .long 3161633148 - .long 2553046639 - .long 1072526534 - .long 2419472295 - .long 3163244343 - .long 554048209 - .long 1071253497 - .long 2399772791 - .long 3156410517 - .long 2935979925 - .long 1072511939 - .long 1428602113 - .long 1015064920 - .long 2000132179 - .long 1071320109 - .long 2171125689 - .long 3159852223 - .long 808310631 - .long 1072496761 - .long 4227501583 - .long 1014931887 - .long 3669886408 - .long 1071386181 - .long 3536165134 - .long 1013933230 - .long 3142990026 - .long 1072481003 - .long 4101727212 - .long 3163150444 - .long 725933569 - .long 1071451694 - .long 522349177 - .long 3161311953 - .long 490548333 - .long 1072464672 - .long 2395907389 - .long 3162833649 - .long 1948536952 - .long 1071516626 - .long 320619183 - .long 1014863857 - .long 1332553480 - .long 1072447771 - .long 3321840403 - .long 3163208850 - .long 3991904492 - .long 1071580958 - .long 2374541978 - .long 1014892768 - .long 2010331591 - .long 1072430306 - .long 1428309641 - .long 3163418034 - .long 0 - .long 1071644672 - .long 0 - .long 0 - .long 3898100906 - .long 1072412282 - .long 3501572579 - .long 1015868565 - .long 553508627 - .long 1071676209 - .long 3116078237 - .long 1016033865 - .long 511109854 - .long 1072393706 - .long 3227708102 - .long 3163199948 - .long 1051516202 - .long 1071707417 - .long 2823792103 - .long 1015984420 - .long 3268258117 - .long 1072374581 - .long 893580578 - .long 1013933326 - .long 3614471965 - .long 1071738286 - .long 2346555295 - .long 3158494963 - .long 2829987804 - .long 1072354915 - .long 4086147764 - .long 3161968777 - .long 2215771410 - .long 1071768808 - .long 2812627676 - .long 1015346091 - .long 3450400421 - .long 1072334713 - .long 2241324349 - .long 3163087632 - .long 4168894840 - .long 1071798972 - .long 555969416 - .long 1015775320 - .long 1494583111 - .long 1072313982 - .long 92043893 - .long 3160700658 - .long 74799710 - .long 1071828771 - .long 2770520589 - .long 3160558553 - .long 2610427048 - .long 1072292727 - .long 436010265 - .long 3162460259 - .long 2488647350 - .long 1071858193 - .long 3884027735 - .long 1013773085 - .long 245529108 - .long 1072270956 - .long 3304882442 - .long 1014213155 - .long 2982005049 - .long 1071887231 - .long 3980032926 - .long 3161177863 - .long 1408525265 - .long 1072248674 - .long 1201054953 - .long 1015994881 - .long 2219342526 - .long 1071915876 - .long 3430823751 - .long 3163318748 - .long 890610472 - .long 1072225889 - .long 1982309908 - .long 3162056199 - .long 1379669533 - .long 1071944119 - .long 3329850390 - .long 3162839200 - .long 2731495481 - .long 1072202607 - .long 1347545148 - .long 1014567853 - .long 2167951316 - .long 1071971951 - .long 2070879930 - .long 1013227818 - .long 3030457399 - .long 1072178836 - .long 162525240 - .long 3161624810 - .long 2531396568 - .long 1071999364 - .long 4091857862 - .long 3162202094 - .long 2821963458 - .long 1072154583 - .long 1545337900 - .long 3160735078 - .long 965516331 - .long 1072026350 - .long 156922899 - .long 1014731144 - .long 3771230594 - .long 1072129855 - .long 3521184819 - .long 1014696396 - .long 820015888 - .long 1072052900 - .long 2191736501 - .long 1015202773 - .long 3869592889 - .long 1072104660 - .long 2133682458 - .long 3163440098 - .long 1719614413 - .long 1072079006 - .long 330458198 - .long 3163282740 - .long 1719614413 - .long 1072079006 - .long 330458198 - .long 3163282740 - .long 3869592889 - .long 1072104660 - .long 2133682458 - .long 3163440098 - .long 820015888 - .long 1072052900 - .long 2191736501 - .long 1015202773 - .long 3771230594 - .long 1072129855 - .long 3521184819 - .long 1014696396 - .long 965516331 - .long 1072026350 - .long 156922899 - .long 1014731144 - .long 2821963458 - .long 1072154583 - .long 1545337900 - .long 3160735078 - .long 2531396568 - .long 1071999364 - .long 4091857862 - .long 3162202094 - .long 3030457399 - .long 1072178836 - .long 162525240 - .long 3161624810 - .long 2167951316 - .long 1071971951 - .long 2070879930 - .long 1013227818 - .long 2731495481 - .long 1072202607 - .long 1347545148 - .long 1014567853 - .long 1379669533 - .long 1071944119 - .long 3329850390 - .long 3162839200 - .long 890610472 - .long 1072225889 - .long 1982309908 - .long 3162056199 - .long 2219342526 - .long 1071915876 - .long 3430823751 - .long 3163318748 - .long 1408525265 - .long 1072248674 - .long 1201054953 - .long 1015994881 - .long 2982005049 - .long 1071887231 - .long 3980032926 - .long 3161177863 - .long 245529108 - .long 1072270956 - .long 3304882442 - .long 1014213155 - .long 2488647350 - .long 1071858193 - .long 3884027735 - .long 1013773085 - .long 2610427048 - .long 1072292727 - .long 436010265 - .long 3162460259 - .long 74799710 - .long 1071828771 - .long 2770520589 - .long 3160558553 - .long 1494583111 - .long 1072313982 - .long 92043893 - .long 3160700658 - .long 4168894840 - .long 1071798972 - .long 555969416 - .long 1015775320 - .long 3450400421 - .long 1072334713 - .long 2241324349 - .long 3163087632 - .long 2215771410 - .long 1071768808 - .long 2812627676 - .long 1015346091 - .long 2829987804 - .long 1072354915 - .long 4086147764 - .long 3161968777 - .long 3614471965 - .long 1071738286 - .long 2346555295 - .long 3158494963 - .long 3268258117 - .long 1072374581 - .long 893580578 - .long 1013933326 - .long 1051516202 - .long 1071707417 - .long 2823792103 - .long 1015984420 - .long 511109854 - .long 1072393706 - .long 3227708102 - .long 3163199948 - .long 553508627 - .long 1071676209 - .long 3116078237 - .long 1016033865 - .long 3898100906 - .long 1072412282 - .long 3501572579 - .long 1015868565 - .long 0 - .long 1071644672 - .long 0 - .long 0 - .long 2010331591 - .long 1072430306 - .long 1428309641 - .long 3163418034 - .long 3991904492 - .long 1071580958 - .long 2374541978 - .long 1014892768 - .long 1332553480 - .long 1072447771 - .long 3321840403 - .long 3163208850 - .long 1948536952 - .long 1071516626 - .long 320619183 - .long 1014863857 - .long 490548333 - .long 1072464672 - .long 2395907389 - .long 3162833649 - .long 725933569 - .long 1071451694 - .long 522349177 - .long 3161311953 - .long 3142990026 - .long 1072481003 - .long 4101727212 - .long 3163150444 - .long 3669886408 - .long 1071386181 - .long 3536165134 - .long 1013933230 - .long 808310631 - .long 1072496761 - .long 4227501583 - .long 1014931887 - .long 2000132179 - .long 1071320109 - .long 2171125689 - .long 3159852223 - .long 2935979925 - .long 1072511939 - .long 1428602113 - .long 1015064920 - .long 554048209 - .long 1071253497 - .long 2399772791 - .long 3156410517 - .long 2553046639 - .long 1072526534 - .long 2419472295 - .long 3163244343 - .long 580452267 - .long 1071186365 - .long 3449718872 - .long 3161633148 - .long 2039991128 - .long 1072540541 - .long 1062999797 - .long 3162182390 - .long 4008023681 - .long 1071118733 - .long 570275026 - .long 1014484594 - .long 251639813 - .long 1072553956 - .long 3380683078 - .long 1012638586 - .long 533648188 - .long 1071050624 - .long 3960375553 - .long 1012377538 - .long 1112681756 - .long 1072566774 - .long 1734695380 - .long 3163113281 - .long 1955204085 - .long 1070982056 - .long 1689242582 - .long 1014445850 - .long 738112715 - .long 1072578992 - .long 334349375 - .long 3162809522 - .long 3489713627 - .long 1070913051 - .long 528334979 - .long 1014764117 - .long 323245311 - .long 1072590606 - .long 3093873492 - .long 1015519453 - .long 925886800 - .long 1070843631 - .long 436010265 - .long 3162460259 - .long 1853610783 - .long 1072601612 - .long 3649998803 - .long 1015704482 - .long 3481523655 - .long 1070773815 - .long 2713761655 - .long 1014001377 - .long 3814620032 - .long 1072612007 - .long 3070837564 - .long 3162674392 - .long 3711077929 - .long 1070703626 - .long 3146917124 - .long 1014611084 - .long 1195949845 - .long 1072621789 - .long 1259393923 - .long 3162332067 - .long 3247638160 - .long 1070633085 - .long 3696489768 - .long 1014652612 - .long 2675554853 - .long 1072630953 - .long 3840651826 - .long 3156703495 - .long 4075075869 - .long 1070528331 - .long 3748620424 - .long 3160490968 - .long 558794511 - .long 1072639498 - .long 1424282741 - .long 3161718678 - .long 919455349 - .long 1070385970 - .long 2064618035 - .long 3159935516 - .long 846856320 - .long 1072647420 - .long 116450415 - .long 3163379753 - .long 2890029302 - .long 1070243033 - .long 2223107338 - .long 3159965253 - .long 1765324482 - .long 1072654717 - .long 2731192352 - .long 3162086677 - .long 3715523151 - .long 1070099565 - .long 3282620278 - .long 1013092107 - .long 2357271575 - .long 1072661387 - .long 1809738197 - .long 1015448300 - .long 2114679690 - .long 1069955610 - .long 1043937223 - .long 3160884320 - .long 2486166620 - .long 1072667428 - .long 1862034983 - .long 3163124964 - .long 1739084661 - .long 1069811211 - .long 266127812 - .long 1005440081 - .long 2838533242 - .long 1072672838 - .long 3931096191 - .long 3163228296 - .long 2525863449 - .long 1069666412 - .long 3319430370 - .long 1012720668 - .long 631389835 - .long 1072677616 - .long 319889322 - .long 1015931913 - .long 1280271059 - .long 1069494996 - .long 1784430238 - .long 1012342196 - .long 2499307462 - .long 1072681759 - .long 1081812731 - .long 1015750919 - .long 2604423020 - .long 1069204064 - .long 2303648607 - .long 1009017464 - .long 3021477282 - .long 1072685267 - .long 1009168830 - .long 3161309439 - .long 3099754755 - .long 1068912598 - .long 85775068 - .long 3160181596 - .long 1903230966 - .long 1072688139 - .long 1549185311 - .long 1015860439 - .long 1835684136 - .long 1068620687 - .long 3698316769 - .long 3158223757 - .long 3977438749 - .long 1072690373 - .long 2138672104 - .long 1015504988 - .long 1223674126 - .long 1068157895 - .long 1350368814 - .long 3158420169 - .long 2025784679 - .long 1072691970 - .long 3458349249 - .long 3162669794 - .long 3388464167 - .long 1067572824 - .long 3405773388 - .long 1011262106 - .long 2549460874 - .long 1072692928 - .long 4286585365 - .long 3162605893 - .long 730455326 - .long 1066524427 - .long 1746175880 - .long 1010139981 - .type __libm_sindl_cosdl_table,@object - .size __libm_sindl_cosdl_table,2880 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosf_wmt.S deleted file mode 100644 index e9e8131d55..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosf_wmt.S +++ /dev/null @@ -1,576 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincosf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin sincosf - .text - .align 16,0x90 - .globl sincosf -sincosf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -# parameter 3: 16 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $136, %esp - movl %ebx, 80(%esp) - call static_func - movl %eax, %ebx - movss 144(%esp), %xmm0 - movl 144(%esp), %ecx - movl 148(%esp), %eax - movl %eax, 32(%esp) - movl 152(%esp), %eax - movl %eax, 36(%esp) - movaps %xmm0, %xmm1 - cvtps2pd %xmm1, %xmm1 - movsd 1360(%ebx), %xmm2 - movl $2147483647, %eax - movl $1241513983, %edx - andl %ecx, %eax - subl %eax, %edx - subl $964689920, %eax - orl %eax, %edx - jl .L_2TAG_PACKET_0.0.2 - movsd 1376(%ebx), %xmm4 - mulsd %xmm1, %xmm2 - movsd 1392(%ebx), %xmm3 - movapd %xmm2, %xmm5 - addsd %xmm4, %xmm2 - movd %xmm2, %ecx - subsd %xmm4, %xmm2 - mulsd %xmm3, %xmm1 -.L_2TAG_PACKET_1.0.2: - movl $256, %eax - movapd 1040(%ebx), %xmm4 - subsd %xmm2, %xmm5 - addl %ecx, %ecx - movl %ecx, %edx - shll $24, %ecx - sarl $31, %ecx - andl %edx, %eax - addl %ecx, %edx - xorl %ecx, %edx - addsd %xmm5, %xmm1 - movsd 1440(%ebx), %xmm6 - andl $254, %edx - movapd (%ebx,%edx,8), %xmm3 - pshufd $68, %xmm1, %xmm2 - shrl $4, %eax - movapd 1072(%ebx,%eax), %xmm7 - movapd 1056(%ebx), %xmm5 - mulpd %xmm2, %xmm2 - mulsd %xmm6, %xmm1 - andl $1, %ecx - movd %ecx, %xmm0 - psllq $63, %xmm0 - xorpd %xmm0, %xmm3 - xorpd %xmm7, %xmm3 - mulpd %xmm4, %xmm2 - pshufd $78, %xmm3, %xmm6 - mulsd %xmm1, %xmm3 - addpd %xmm2, %xmm5 - mulsd %xmm1, %xmm6 - mulpd %xmm5, %xmm3 - mulpd %xmm5, %xmm6 - pshufd $238, %xmm3, %xmm0 - pshufd $238, %xmm6, %xmm1 - addsd %xmm3, %xmm0 - subsd %xmm6, %xmm1 - cvtpd2ps %xmm0, %xmm0 - cvtpd2ps %xmm1, %xmm1 - movl 32(%esp), %eax - movss %xmm0, (%eax) - movl 36(%esp), %edx - movss %xmm1, (%edx) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_0.0.2: - andl $2147483647, %ecx - cmpl $1040187392, %ecx - ja .L_2TAG_PACKET_3.0.2 - cvtss2sd %xmm0, %xmm0 - mulsd 1344(%ebx), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movl 32(%esp), %eax - movss %xmm0, (%eax) - movl 36(%esp), %edx - movl $1065353216, %ecx - movl %ecx, (%edx) - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_3.0.2: - movd %xmm0, %eax - andl $2139095040, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_4.0.2 - shrl $23, %ecx - subl $142, %ecx - andl $65528, %ecx - movsd 1104(%ebx,%ecx,2), %xmm3 - movsd 1112(%ebx,%ecx,2), %xmm5 - movsd 1424(%ebx), %xmm2 - xorpd %xmm4, %xmm4 - movl $17208, %eax - pinsrw $3, %eax, %xmm4 - andpd %xmm3, %xmm2 - psllq $40, %xmm3 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm1 - movapd %xmm2, %xmm0 - addsd %xmm3, %xmm2 - movapd %xmm2, %xmm5 - subsd %xmm2, %xmm0 - addsd %xmm4, %xmm2 - addsd %xmm0, %xmm3 - movd %xmm2, %ecx - subsd %xmm4, %xmm2 - addsd %xmm3, %xmm1 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_4.0.2: - subss %xmm0, %xmm0 - movl 32(%esp), %eax - movss %xmm0, (%eax) - movl 36(%esp), %edx - movss %xmm0, (%edx) -.L_2TAG_PACKET_2.0.2: - movl 80(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type sincosf,@function - .size sincosf,.-sincosf - .data -# -- End sincosf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 1619315981 - .long 1072692616 - .long 4154680958 - .long 1067000149 - .long 3816385918 - .long 1072690721 - .long 4044216340 - .long 1068048229 - .long 2902558778 - .long 1072687565 - .long 2462980598 - .long 1068684576 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 1069094822 - .long 1893834707 - .long 1072677476 - .long 1453945614 - .long 1069504078 - .long 2131272983 - .long 1072670549 - .long 1854824762 - .long 1069729808 - .long 4201728937 - .long 1072662372 - .long 1149976518 - .long 1069933076 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 1070135480 - .long 2892293513 - .long 1072642291 - .long 1786662755 - .long 1070336898 - .long 4220661975 - .long 1072630398 - .long 2065784603 - .long 1070537209 - .long 3882371427 - .long 1072617280 - .long 1655830135 - .long 1070666194 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 1070765062 - .long 3964199186 - .long 1072587400 - .long 2484561409 - .long 1070863196 - .long 83265253 - .long 1072570657 - .long 1974149085 - .long 1070960538 - .long 3066872380 - .long 1072552723 - .long 821708191 - .long 1071057029 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 1071152610 - .long 3511535930 - .long 1072513332 - .long 1135144330 - .long 1071247225 - .long 4097623923 - .long 1072491898 - .long 165764288 - .long 1071340816 - .long 557060597 - .long 1072469323 - .long 2570175582 - .long 1071433326 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 1071524701 - .long 2892993834 - .long 1072420800 - .long 3690502842 - .long 1071614884 - .long 1159294526 - .long 1072394883 - .long 2569207790 - .long 1071674247 - .long 1477771776 - .long 1072367882 - .long 1411074851 - .long 1071718067 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 1071761211 - .long 2688952194 - .long 1072310695 - .long 1289556703 - .long 1071803653 - .long 1207142209 - .long 1072280544 - .long 4242632757 - .long 1071845367 - .long 1234330619 - .long 1072249378 - .long 689983673 - .long 1071886330 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 1071926515 - .long 201299822 - .long 1072184078 - .long 3152274921 - .long 1071965898 - .long 577417135 - .long 1072149983 - .long 881650848 - .long 1072004457 - .long 938475414 - .long 1072114952 - .long 1427975391 - .long 1072042167 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 1072079006 - .long 1427975391 - .long 1072042167 - .long 938475414 - .long 1072114952 - .long 881650848 - .long 1072004457 - .long 577417135 - .long 1072149983 - .long 3152274921 - .long 1071965898 - .long 201299822 - .long 1072184078 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 1072217216 - .long 689983673 - .long 1071886330 - .long 1234330619 - .long 1072249378 - .long 4242632757 - .long 1071845367 - .long 1207142209 - .long 1072280544 - .long 1289556703 - .long 1071803653 - .long 2688952194 - .long 1072310695 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 1072339814 - .long 1411074851 - .long 1071718067 - .long 1477771776 - .long 1072367882 - .long 2569207790 - .long 1071674247 - .long 1159294526 - .long 1072394883 - .long 3690502842 - .long 1071614884 - .long 2892993834 - .long 1072420800 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 1072445618 - .long 2570175582 - .long 1071433326 - .long 557060597 - .long 1072469323 - .long 165764288 - .long 1071340816 - .long 4097623923 - .long 1072491898 - .long 1135144330 - .long 1071247225 - .long 3511535930 - .long 1072513332 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 1072533611 - .long 821708191 - .long 1071057029 - .long 3066872380 - .long 1072552723 - .long 1974149085 - .long 1070960538 - .long 83265253 - .long 1072570657 - .long 2484561409 - .long 1070863196 - .long 3964199186 - .long 1072587400 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 1072602945 - .long 1655830135 - .long 1070666194 - .long 3882371427 - .long 1072617280 - .long 2065784603 - .long 1070537209 - .long 4220661975 - .long 1072630398 - .long 1786662755 - .long 1070336898 - .long 2892293513 - .long 1072642291 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 1072652951 - .long 1149976518 - .long 1069933076 - .long 4201728937 - .long 1072662372 - .long 1854824762 - .long 1069729808 - .long 2131272983 - .long 1072670549 - .long 1453945614 - .long 1069504078 - .long 1893834707 - .long 1072677476 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 1072683149 - .long 2462980598 - .long 1068684576 - .long 2902558778 - .long 1072687565 - .long 4044216340 - .long 1068048229 - .long 3816385918 - .long 1072690721 - .long 4154680958 - .long 1067000149 - .long 1619315981 - .long 1072692616 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 1649608659 - .long 3206173094 - .long 3384690142 - .long 3207839036 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1916669064 - .long 1072155675 - .long 660066805 - .long 1024797180 - .long 3829231700 - .long 1062745828 - .long 2884172442 - .long 1017445907 - .long 540874025 - .long 1055617650 - .long 4198409884 - .long 1011844330 - .long 2839315448 - .long 1046639136 - .long 4204424928 - .long 1000582120 - .long 1329339431 - .long 1038229673 - .long 1295478839 - .long 993391741 - .long 658191860 - .long 1024797180 - .long 3691886121 - .long 979325773 - .long 1966800710 - .long 1020436418 - .long 1882642597 - .long 977095991 - .long 2100977488 - .long 1012908661 - .long 1840335565 - .long 967470816 - .long 4198093645 - .long 1000582120 - .long 3307942521 - .long 957055414 - .long 2839123165 - .long 996851343 - .long 1387472776 - .long 952638316 - .long 2788761024 - .long 988712873 - .long 3005712498 - .long 944467026 - .long 3694676832 - .long 979325773 - .long 1326507024 - .long 934847846 - .long 221775557 - .long 970149340 - .long 1133527550 - .long 924162364 - .long 4286578688 - .long 1072693247 - .long 4286578688 - .long 1072693247 - .long 1845493760 - .long 1078222640 - .long 1845493760 - .long 1078222640 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 2908765579 - .long 3193641918 - .long 2908765579 - .long 3193641918 - .long 2308576600 - .long 1086551075 - .long 1646446368 - .long 1084878895 - .long 4278190080 - .long 4294967295 - .long 0 - .long 0 - .long 1413754136 - .long 1067000315 - .long 1413754136 - .long 1067000315 - .type static_const_table,@object - .size static_const_table,1456 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosl.S deleted file mode 100644 index e5c71ee7ee..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sincosl.S +++ /dev/null @@ -1,1173 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincosl.c" - .text -..TXTST0: -# -- Begin sincosl - .text - .align 16,0x90 - .globl sincosl -sincosl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -# parameter 3: 24 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 144(%esp) - movl 20(%ebp), %edi - movl 24(%ebp), %esi -..B1.2: - fnstcw 62(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - movzwl 62(%esp), %edx - cmpl $16378, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jge ..B1.41 -..B1.4: - cmpl $16372, %eax - jge ..B1.33 -..B1.5: - cmpl $16364, %eax - jge ..B1.25 -..B1.6: - cmpl $16308, %eax - jge ..B1.17 -..B1.7: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.75 -..B1.8: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.9: - fldcw 60(%esp) -..B1.10: - movzwl 16(%ebp), %eax - movl $1, %edx - andl $32767, %eax -..B1.11: - testl %eax, %eax - jle ..B1.71 -..B1.12: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ebx) - fmul %st(1), %st - fsubp %st, %st(1) - fldt _small_value_80@GOTOFF(%ebx) - fsubrl _ones@GOTOFF(%ebx) - fstpt 32(%esp) - fmull 8+_TWO_75@GOTOFF(%ebx) - fstpt 16(%esp) -..B1.13: - testl %edx, %edx - je ..B1.15 -..B1.14: - fldcw 62(%esp) -..B1.15: - fldt 16(%esp) - fstpt (%edi) - fldt 32(%esp) - fstpt (%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.16: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.77 -..B1.18: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.19: - fldcw 60(%esp) -..B1.20: - movl $1, %eax -..B1.21: - fldt 8(%ebp) - testl %eax, %eax - fldt _SP3@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - fadd %st(1), %st - fstpt 16(%esp) - fldt _CP3@GOTOFF(%ebx) - fmul %st(1), %st - fmulp %st, %st(1) - faddl _ones@GOTOFF(%ebx) - fstpt 32(%esp) - je ..B1.23 -..B1.22: - fldcw 62(%esp) -..B1.23: - fldt 16(%esp) - fstpt (%edi) - fldt 32(%esp) - fstpt (%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.24: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.79 -..B1.26: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.27: - fldcw 60(%esp) -..B1.28: - movl $1, %eax -..B1.29: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_SP2@GOTOFF(%ebx) - fmul %st(1), %st - fldt _SP2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fmul %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt 12+_CP2@GOTOFF(%ebx) - fmul %st(1), %st - fldt _CP2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddl _ones@GOTOFF(%ebx) - fstpt 32(%esp) - je ..B1.31 -..B1.30: - fldcw 62(%esp) -..B1.31: - fldt 16(%esp) - fstpt (%edi) - fldt 32(%esp) - fstpt (%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.32: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.33: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.81 -..B1.34: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.35: - fldcw 60(%esp) -..B1.36: - movl $1, %eax -..B1.37: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 36+_SP1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_SP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_SP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt _SP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fmul %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 36+_CP1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_CP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_CP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt _CP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddl _ones@GOTOFF(%ebx) - fstpt 16(%esp) - je ..B1.39 -..B1.38: - fldcw 62(%esp) -..B1.39: - fldt 32(%esp) - fstpt (%edi) - fldt 16(%esp) - fstpt (%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.40: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.84 -..B1.42: - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.43: - fldcw 60(%esp) -..B1.44: - movzwl 16(%ebp), %eax - movl $1, 28(%esp) - andl $32767, %eax -..B1.45: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - movl %edx, 44(%esp) - cmpl $16413, %eax - jge ..B1.52 -..B1.46: - fldt 8(%ebp) - fldl _Pi4Inv@GOTOFF(%ebx) - fxch %st(1) - fmull _ones@GOTOFF(%ebx,%edx,8) - fmul %st, %st(1) - fxch %st(1) - fstpt 32(%esp) - movzwl 40(%esp), %ecx - andl $32767, %ecx - cmpl $16383, %ecx - jge ..B1.48 -..B1.47: - fldl _TWO_52H@GOTOFF(%ebx) - xorl %edx, %edx - fmul %st(1), %st - fstpt 16(%esp) - fldt 16(%esp) - fld %st(1) - movl $1, 12(%esp) - fadd %st(1), %st - fsubp %st, %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fld %st(1) - fsubp %st, %st(1) - fxch %st(1) - jmp ..B1.63 -..B1.48: - fldl _TWO_32H@GOTOFF(%ebx) - negl %ecx - addl $30, %ecx - movl 36(%esp), %edx - shrl %cl, %edx - lea 1(%edx), %ecx - movl %ecx, 12(%esp) - andl $-2, %ecx - movl %ecx, 16(%esp) - cmpl $16400, %eax - fildl 16(%esp) - jge ..B1.50 -..B1.49: - fldl _Pi04x3@GOTOFF(%ebx) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_Pi04x3@GOTOFF(%ebx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fmull 16+_Pi04x3@GOTOFF(%ebx) - fld %st(0) - fsubr %st(2), %st - fstpt 16(%esp) - fldt 16(%esp) - fsubrp %st, %st(2) - fsubrp %st, %st(1) - faddp %st, %st(1) - jmp ..B1.51 -..B1.50: - fldl _Pi04x5@GOTOFF(%ebx) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_Pi04x5@GOTOFF(%ebx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_Pi04x5@GOTOFF(%ebx) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl 24+_Pi04x5@GOTOFF(%ebx) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - fmull 32+_Pi04x5@GOTOFF(%ebx) - fld %st(0) - fsubr %st(2), %st - fstpt 16(%esp) - fldt 16(%esp) - fsubrp %st, %st(2) - fsubrp %st, %st(1) - faddp %st, %st(1) -..B1.51: - fldl _TWO_52H@GOTOFF(%ebx) - addl $3, %edx - fldt 16(%esp) - fmul %st, %st(1) - fld %st(1) - movl 12(%esp), %eax - fadd %st(1), %st - shrl $2, %eax - fsubp %st, %st(2) - movl 44(%esp), %ecx - fsub %st(1), %st - xorl %eax, %ecx - fadd %st, %st(2) - shrl $2, %edx - fld %st(1) - andl $1, %ecx - movl %ecx, 44(%esp) - andl $1, %edx - fadd %st(3), %st - fxch %st(2) - fstpt 64(%esp) - fstpt 16(%esp) - jmp ..B1.63 -..B1.52: - cmpl $32767, %eax - jne ..B1.61 -..B1.53: - cmpl $-2147483648, 12(%ebp) - jne ..B1.56 -..B1.54: - cmpl $0, 8(%ebp) - jne ..B1.56 -..B1.55: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - fstpt 16(%esp) - jmp ..B1.57 -..B1.56: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ebx) - fstpt 16(%esp) -..B1.57: - cmpl $0, 28(%esp) - je ..B1.59 -..B1.58: - fldcw 62(%esp) -..B1.59: - fldt 16(%esp) - fstpt (%edi) - fldt (%edi) - fstpt (%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.60: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.61: - fldt 8(%ebp) - addl $-32, %esp - movl %edx, %eax - lea 160(%esp), %edx - fmull _ones@GOTOFF(%ebx,%eax,8) - fstpt (%esp) - movl $0, 12(%esp) - movl %edx, 16(%esp) - call __libm_reduce_pi04l -..B1.87: - movl %eax, %edx - addl $32, %esp -..B1.62: - fldl 128(%esp) - lea 1(%edx), %eax - fldl _TWO_52H@GOTOFF(%ebx) - addl $3, %edx - fmul %st(1), %st - fld %st(0) - movl %eax, 12(%esp) - fadd %st(2), %st - shrl $2, %eax - fsubp %st, %st(1) - movl 44(%esp), %ecx - fsubr %st, %st(1) - xorl %eax, %ecx - shrl $2, %edx - andl $1, %ecx - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - andl $1, %edx - fxch %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fldl 136(%esp) - movl %ecx, 44(%esp) - faddp %st, %st(2) - fadd %st(1), %st -..B1.63: - fldt 64(%esp) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st(0), %st - fld %st(0) - fld %st(1) - fxch %st(5) - fstpt 80(%esp) - fldt 80(%esp) - fmul %st(4), %st - movl 44(%esp), %eax - faddp %st, %st(3) - fld %st(2) - fld %st(2) - fmul %st(3), %st - fxch %st(2) - fadd %st(4), %st - fmul %st, %st(1) - fxch %st(4) - fmul %st, %st(6) - testb $2, 12(%esp) - fxch %st(1) - faddp %st, %st(6) - fxch %st(4) - fstpt 96(%esp) - fldt 96+_SP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 84+_SP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_CP@GOTOFF(%ebx) - fmul %st(4), %st - fldt 84+_CP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 72+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 72+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 60+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 60+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 48+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 48+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 36+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 36+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 24+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 24+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 12+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 12+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt _SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt _CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fld %st(5) - fldt 120+_SP@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmul %st(2), %st - fldt 120+_CP@GOTOFF(%ebx) - fmul %st, %st(7) - fxch %st(7) - faddp %st, %st(5) - fxch %st(6) - fstpt 112(%esp) - fld %st(4) - fldt 108+_SP@GOTOFF(%ebx) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 108+_SP@GOTOFF(%ebx) - fmul %st(3), %st - faddp %st, %st(6) - fld %st(5) - fadd %st(1), %st - fldt 108+_CP@GOTOFF(%ebx) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(5) - fxch %st(5) - fmulp %st, %st(3) - fldt 112(%esp) - fmulp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fldl _TWO_53H@GOTOFF(%ebx) - fld %st(0) - fmul %st(6), %st - fadd %st, %st(6) - fsubrp %st, %st(6) - fxch %st(5) - fsubr %st, %st(6) - fxch %st(6) - faddp %st, %st(3) - fmul %st, %st(4) - fadd %st(4), %st - fsubp %st, %st(4) - fld %st(3) - fxch %st(1) - fsub %st(4), %st - faddp %st, %st(3) - fldt 80(%esp) - fmul %st(5), %st - fldt 96(%esp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 64(%esp) - fmul %st, %st(5) - fld %st(0) - fadd %st(6), %st - fstpt 48(%esp) - fldt 48(%esp) - fsubrp %st, %st(1) - faddp %st, %st(5) - fldl _ones@GOTOFF(%ebx) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 80(%esp) - faddp %st, %st(1) - faddp %st, %st(3) - fldl _ones@GOTOFF(%ebx,%eax,8) - fldl _ones@GOTOFF(%ebx,%edx,8) - je ..B1.65 -..B1.64: - fxch %st(1) - fmul %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st, %st(2) - fldt 48(%esp) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%esp) - fstpt 64(%esp) - jmp ..B1.66 -..B1.65: - fldt 48(%esp) - fmul %st(2), %st - fxch %st(2) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fxch %st(2) - fmul %st(3), %st - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fstpt 64(%esp) - fstpt 48(%esp) -..B1.66: - cmpl $0, 28(%esp) - je ..B1.68 -..B1.67: - fldt 16(%esp) - fstpt 32(%esp) -..B1.88: - fldcw 62(%esp) -..B1.68: - fldt 64(%esp) - fstpt (%edi) - fldt 48(%esp) - fstpt (%esi) - movl 144(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.69: - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.70: - call __stack_chk_fail@PLT -..B1.71: - cmpl $0, 12(%ebp) - jne ..B1.73 -..B1.72: - cmpl $0, 8(%ebp) - je ..B1.74 -..B1.73: - fldt _small_value_80@GOTOFF(%ebx) - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ebx) - fmul %st(1), %st - movzbl 17(%ebp), %ecx - fsubp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ebx) - andl $128, %ecx - shrl $7, %ecx - fstpt 16(%esp) - fldl _ones@GOTOFF(%ebx) - fsub %st(1), %st - fstpt 32(%esp) - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %eax - fldt _small_value_80@GOTOFF(%ebx,%eax) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.13 -..B1.74: - fldt 8(%ebp) - fstpt 16(%esp) - fldl _ones@GOTOFF(%ebx) - fstpt 32(%esp) - jmp ..B1.13 -..B1.75: - xorl %edx, %edx - jmp ..B1.11 -..B1.77: - xorl %eax, %eax - jmp ..B1.21 -..B1.79: - xorl %eax, %eax - jmp ..B1.29 -..B1.81: - xorl %eax, %eax - jmp ..B1.37 -..B1.84: - movl $0, 28(%esp) - jmp ..B1.45 - .align 16,0x90 - .type sincosl,@function - .size sincosl,.-sincosl - .data -# -- End sincosl - .section .rodata, "a" - .align 16 - .align 16 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 16 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .space 8, 0x00 # pad - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_SP3: - .word 17476 - .word 43656 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .type _SP3,@object - .size _SP3,12 - .space 4, 0x00 # pad - .align 16 -_CP3: - .word 0 - .word 65450 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .type _CP3,@object - .size _CP3,12 - .space 4, 0x00 # pad - .align 16 -_SP2: - .word 43210 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 1587 - .word 57422 - .word 34932 - .word 34952 - .word 16376 - .word 0 - .type _SP2,@object - .size _SP2,24 - .space 8, 0x00 # pad - .align 16 -_CP2: - .word 63855 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 18238 - .word 17476 - .word 43656 - .word 43690 - .word 16378 - .word 0 - .type _CP2,@object - .size _CP2,24 - .space 8, 0x00 # pad - .align 16 -_SP1: - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 12518 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 43088 - .word 7396 - .word 207 - .word 53261 - .word 49138 - .word 0 - .word 55827 - .word 48618 - .word 3602 - .word 47342 - .word 16364 - .word 0 - .type _SP1,@object - .size _SP1,48 - .align 16 -_CP1: - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 47533 - .word 43689 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 14131 - .word 49466 - .word 24756 - .word 46603 - .word 49141 - .word 0 - .word 37142 - .word 18013 - .word 35855 - .word 53259 - .word 16367 - .word 0 - .type _CP1,@object - .size _CP1,48 - .align 16 -_Pi4Inv: - .long 1841940611 - .long 1072979760 - .type _Pi4Inv,@object - .size _Pi4Inv,8 - .space 8, 0x00 # pad - .align 16 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .space 8, 0x00 # pad - .align 16 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .space 8, 0x00 # pad - .align 16 -_Pi04x3: - .long 1413754112 - .long 1072243195 - .long 2563527040 - .long 1021855384 - .long 3417685868 - .long 3118450936 - .type _Pi04x3,@object - .size _Pi04x3,24 - .space 8, 0x00 # pad - .align 16 -_Pi04x5: - .long 1413480448 - .long 1072243195 - .long 442499072 - .long 1036039265 - .long 771751936 - .long 999496074 - .long 622854144 - .long 963347354 - .long 1396597664 - .long 922906692 - .type _Pi04x5,@object - .size _Pi04x5,40 - .space 8, 0x00 # pad - .align 16 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 16 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 16 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .type _SP,@object - .size _SP,132 - .space 12, 0x00 # pad - .align 16 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .type _CP,@object - .size _CP,132 - .space 12, 0x00 # pad - .align 16 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .data - .hidden __libm_reduce_pi04l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sindl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sindl.S deleted file mode 100644 index 2da756f394..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sindl.S +++ /dev/null @@ -1,871 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sindl.c" - .text -..TXTST0: -# -- Begin sindl - .text - .align 16,0x90 - .globl sindl -sindl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp -..B1.2: - fnstcw 30(%esp) -..B1.3: - movzwl 30(%esp), %edx - movl %edx, %eax - andl $3840, %eax - cmpl $768, %eax - je ..B1.53 -..B1.4: - andl $-3841, %edx - orl $-64768, %edx - movw %dx, 28(%esp) -..B1.5: - fldcw 28(%esp) -..B1.6: - movl $1, %edi -..B1.7: - movzbl 17(%ebp), %esi - movzwl 16(%ebp), %ecx - andl $128, %esi - andl $32767, %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - shrl $7, %esi - movl %eax, 12(%esp) - cmpl $16446, %ecx - jge ..B1.26 -..B1.8: - cmpl $16318, %ecx - jge ..B1.19 -..B1.9: - fldt 8(%ebp) - movl %eax, %edx - fstpt 16(%esp) - fldt 16(%esp) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fucompp - fnstsw %ax - sahf - jp ..B1.10 - je ..B1.43 -..B1.10: - testl %ecx, %ecx - jle ..B1.16 -..B1.11: - cmpl $6, %ecx - jge ..B1.15 -..B1.12: - fldt 16(%esp) - testl %edi, %edi - movl %edx, %eax - fabs - fldt _TWO5600@GOTOFF(%eax) - fmulp %st, %st(1) - fld %st(0) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_53H@GOTOFF(%eax) - fmul %st(1), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fldl 8+_sindl_mp_poly_coeff@GOTOFF(%eax) - fmulp %st, %st(2) - fldl _sindl_mp_poly_coeff@GOTOFF(%eax) - fmul %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(2) - flds ones@GOTOFF(%eax,%esi,4) - fmul %st, %st(2) - fld %st(2) - fxch %st(2) - fmulp %st, %st(1) - fadd %st, %st(1) - fld %st(1) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt fBreaker@GOTOFF(%eax) - fmul %st(1), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fsub %st(1), %st - faddp %st, %st(2) - fldt 12+_TWO5600@GOTOFF(%eax) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt (%esp) - fldt _Underflow@GOTOFF(%eax) - fldt .L_2il0floatpacket.5@GOTOFF(%eax) - fmulp %st, %st(1) - fstpt 60(%esp) - je ..B1.14 -..B1.13: - fldcw 30(%esp) -..B1.14: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.15: - je ..B1.40 -..B1.16: - fldt 16(%esp) - testl %edi, %edi - movl %edx, %eax - fabs - fldt _TWO5600@GOTOFF(%eax) - fmulp %st, %st(1) - fld %st(0) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_53H@GOTOFF(%eax) - fmul %st(1), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fldl 8+_sindl_mp_poly_coeff@GOTOFF(%eax) - fmulp %st, %st(2) - fldl _sindl_mp_poly_coeff@GOTOFF(%eax) - fmul %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(2) - flds ones@GOTOFF(%eax,%esi,4) - fmul %st, %st(2) - fld %st(2) - fxch %st(2) - fmulp %st, %st(1) - fadd %st, %st(1) - fld %st(1) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt fBreaker@GOTOFF(%eax) - fmul %st(1), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fsub %st(1), %st - faddp %st, %st(2) - faddp %st, %st(1) - fldt 12+_TWO5600@GOTOFF(%eax) - fmulp %st, %st(1) - fstpt (%esp) - je ..B1.18 -..B1.17: - fldcw 30(%esp) -..B1.18: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - fldt 8(%ebp) - movl %eax, %ebx - fabs - fstpt 8(%ebp) - fldt 8(%ebp) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fldt _Rcp90@GOTOFF(%ebx) - fmul %st(2), %st - fadd %st(1), %st - fstpt 60(%esp) - fldt 60(%esp) - movl 60(%esp), %edx - movl %edx, %ecx - andl $2, %ecx - fsubp %st, %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fmulp %st, %st(1) - shrl $1, %ecx - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - xorl %ecx, %esi - fucomp %st(1) - fnstsw %ax - sahf - jp ..B1.20 - je ..B1.46 -..B1.20: - movl %ebx, %eax - fld %st(0) - fld %st(1) - fld %st(2) - fld %st(3) - testb $1, %dl - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - fmul %st(5), %st - fsub %st, %st(4) - fsubp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fld %st(0) - fxch %st(4) - fsub %st(5), %st - fmul %st, %st(5) - fmul %st(6), %st - faddp %st, %st(5) - fldl _TWO_53H@GOTOFF(%eax) - fmul %st, %st(3) - fld %st(0) - fmul %st(2), %st - fadd %st, %st(5) - fsubrp %st, %st(5) - fxch %st(1) - fsub %st(4), %st - faddp %st, %st(5) - fld %st(5) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(1) - fsub %st(2), %st - fstpt 48(%esp) - fld %st(4) - fmul %st(5), %st - fld %st(0) - fmul %st(1), %st - flds ones@GOTOFF(%eax,%esi,4) - fstps 12(%esp) - je ..B1.22 -..B1.21: - fstp %st(6) - fstp %st(2) - fld %st(2) - fmul %st(3), %st - fmul %st, %st(1) - fld %st(2) - fmul %st(5), %st - fxch %st(4) - fstpt (%esp) - fldt (%esp) - fld %st(3) - fmul %st(7), %st - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(5) - fld %st(1) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fstpt 16(%esp) - fldt 16(%esp) - fsubrp %st, %st(1) - faddp %st, %st(3) - fldt 84+_cosdl_poly_coeff@GOTOFF(%eax) - fmul %st(5), %st - fldt 60+_cosdl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(5), %st - fldt 36+_cosdl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_cosdl_poly_coeff@GOTOFF(%eax) - fmul %st(6), %st - fldt 48+_cosdl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(6), %st - fldt 24+_cosdl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fldl 24+_cosdl_mp_poly_coeff@GOTOFF(%eax) - fmulp %st, %st(5) - faddp %st, %st(4) - fldl 8+_cosdl_mp_poly_coeff@GOTOFF(%eax) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl 16+_cosdl_mp_poly_coeff@GOTOFF(%eax) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldl _cosdl_mp_poly_coeff@GOTOFF(%eax) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldt (%esp) - fmulp %st, %st(2) - fld %st(1) - fldt 16(%esp) - fmulp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - flds 12(%esp) - fld %st(0) - fldt .L_2il0floatpacket.4@GOTOFF(%eax) - fld %st(0) - fadd %st(4), %st - fmul %st, %st(2) - fsubrp %st, %st(1) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%esp) - jmp ..B1.23 -..B1.22: - fld %st(6) - fmul %st(2), %st - fstpt 16(%esp) - fld %st(4) - fmul %st(4), %st - fmul %st, %st(3) - fxch %st(6) - fmul %st(7), %st - fxch %st(4) - fstpt (%esp) - fldt 48(%esp) - fmul %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fld %st(5) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fldt 96+_sindl_poly_coeff@GOTOFF(%eax) - fmul %st(2), %st - fldt 72+_sindl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_sindl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_sindl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 84+_sindl_poly_coeff@GOTOFF(%eax) - fmul %st(2), %st - fldt 60+_sindl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_sindl_poly_coeff@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 16(%esp) - fmul %st, %st(1) - fldl 24+_sindl_mp_poly_coeff@GOTOFF(%eax) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl 8+_sindl_mp_poly_coeff@GOTOFF(%eax) - fmulp %st, %st(5) - faddp %st, %st(4) - fldl 16+_sindl_mp_poly_coeff@GOTOFF(%eax) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fldl _sindl_mp_poly_coeff@GOTOFF(%eax) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldt (%esp) - fmulp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - flds 12(%esp) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%esp) -..B1.23: - testl %edi, %edi - je ..B1.25 -..B1.24: - fldcw 30(%esp) -..B1.25: - fldt 32(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.26: - cmpl $32767, %ecx - je ..B1.52 -..B1.27: - lea -16446(%ecx), %eax - movl %eax, (%esp) - cmpl $14, %eax - jle ..B1.29 -..B1.28: - addl $-16449, %ecx - movl $715827883, %eax - imull %ecx - movl %ecx, %ebx - sarl $1, %edx - sarl $31, %ebx - subl %ebx, %edx - lea (,%edx,8), %ebx - lea (%ebx,%edx,4), %eax - subl %eax, %ecx - lea 3(%ecx), %ecx - movl %ecx, (%esp) -..B1.29: - movl 12(%ebp), %ecx - movl %ecx, %ebx - shll $8, %ebx - movl $381774871, %eax - movl %ebx, %edx - andl $-16777216, %ecx - shrl $3, %edx - mull %edx - shrl $2, %edx - imull $-360, %edx, %eax - movl %ecx, %edx - shrl $19, %ecx - addl %eax, %ebx - movl $381774871, %eax - shrl $16, %edx - movl %edx, 4(%esp) - mull %ecx - shrl $2, %edx - imull $-360, %edx, %ecx - movl 4(%esp), %eax - addl %ecx, %eax - movl 8(%ebp), %ecx - movl %ecx, %edx - shrl $3, %edx - addl %eax, %ebx - movl $381774871, %eax - mull %edx - shrl $2, %edx - imull $-360, %edx, %eax - addl %eax, %ecx - movl $-1240768329, %eax - addl %ecx, %ebx - movl (%esp), %ecx - shll %cl, %ebx - imull %ebx - addl %ebx, %edx - movl %ebx, %ecx - sarl $8, %edx - sarl $31, %ecx - subl %ecx, %edx - imull $-360, %edx, %eax - addl %eax, %ebx - cmpl $180, %ebx - jl ..B1.31 -..B1.30: - addl $-180, %ebx - movl $2, %eax - jmp ..B1.32 -..B1.31: - xorl %eax, %eax -..B1.32: - cmpl $90, %ebx - jl ..B1.34 -..B1.33: - incl %eax - addl $-90, %ebx -..B1.34: - movl %eax, %edx - movl %eax, %ecx - andl $2, %edx - shrl $1, %edx - xorl %edx, %esi - orl %ebx, %ecx - je ..B1.36 -..B1.35: - andl $1, %eax - shll $4, %eax - shll $5, %ebx - addl %ebx, %eax - movl 12(%esp), %edx - fldl __libm_sindl_cosdl_table@GOTOFF(%eax,%edx) - faddl 8+__libm_sindl_cosdl_table@GOTOFF(%edx,%eax) - fmuls ones@GOTOFF(%edx,%esi,4) - fstpt (%esp) - jmp ..B1.37 -..B1.36: - movl 12(%esp), %eax - fldt .L_2il0floatpacket.0@GOTOFF(%eax) - fstpt (%esp) -..B1.37: - testl %edi, %edi - je ..B1.39 -..B1.38: - fldcw 30(%esp) -..B1.39: - fldt (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.40: - movl 12(%ebp), %eax - cmpl $-449912621, %eax - jb ..B1.12 -..B1.41: - jne ..B1.16 -..B1.42: - cmpl $504348098, 8(%ebp) - jbe ..B1.12 - jmp ..B1.16 -..B1.43: - testl %edi, %edi - je ..B1.45 -..B1.44: - fldcw 30(%esp) -..B1.45: - fldt 16(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - fstp %st(0) - testb $1, %dl - je ..B1.48 -..B1.47: - movl %ebx, %eax - flds ones@GOTOFF(%eax,%esi,4) - fstps (%esp) - jmp ..B1.49 -..B1.48: - fldz - fstps (%esp) -..B1.49: - testl %edi, %edi - je ..B1.51 -..B1.50: - fldcw 30(%esp) -..B1.51: - flds (%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.52: - fldt 8(%ebp) - fldt .L_2il0floatpacket.0@GOTOFF(%eax) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.37 -..B1.53: - xorl %edi, %edi - jmp ..B1.7 - .align 16,0x90 - .type sindl,@function - .size sindl,.-sindl - .data -# -- End sindl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3e,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0x05,0x40,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .space 4, 0x00 # pad - .align 16 -_sindl_mp_poly_coeff: - .long 2723323193 - .long 1066524486 - .long 2863989530 - .long 1008058840 - .long 227815288 - .long 3199056770 - .long 3752327299 - .long 3142458725 - .type _sindl_mp_poly_coeff,@object - .size _sindl_mp_poly_coeff,32 - .align 16 -_Underflow: - .word 1 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _Underflow,@object - .size _Underflow,12 - .space 4, 0x00 # pad - .align 16 -_cosdl_poly_coeff: - .word 52350 - .word 41213 - .word 3800 - .word 40885 - .word 49138 - .word 0 - .word 28613 - .word 7908 - .word 35668 - .word 34008 - .word 16355 - .word 0 - .word 19927 - .word 58728 - .word 49885 - .word 45261 - .word 49106 - .word 0 - .word 32884 - .word 22035 - .word 23267 - .word 64541 - .word 16320 - .word 0 - .word 36401 - .word 51897 - .word 8309 - .word 57265 - .word 49070 - .word 0 - .word 34286 - .word 2728 - .word 41564 - .word 34642 - .word 16284 - .word 0 - .word 63248 - .word 18030 - .word 35596 - .word 60796 - .word 49032 - .word 0 - .word 52149 - .word 21294 - .word 63985 - .word 40123 - .word 16245 - .word 0 - .type _cosdl_poly_coeff,@object - .size _cosdl_poly_coeff,96 - .align 16 -_cosdl_mp_poly_coeff: - .long 3675529145 - .long 3206805153 - .long 2134983071 - .long 3151100167 - .long 1787026573 - .long 1043372817 - .long 205083639 - .long 988746860 - .type _cosdl_mp_poly_coeff,@object - .size _cosdl_mp_poly_coeff,32 - .align 16 -_sindl_poly_coeff: - .word 51374 - .word 38121 - .word 13586 - .word 36602 - .word 16377 - .word 0 - .word 50116 - .word 41339 - .word 4204 - .word 60892 - .word 49130 - .word 0 - .word 33704 - .word 2155 - .word 42839 - .word 60780 - .word 16346 - .word 0 - .word 21250 - .word 19076 - .word 27901 - .word 57780 - .word 49097 - .word 0 - .word 9076 - .word 49244 - .word 613 - .word 64083 - .word 16311 - .word 0 - .word 40572 - .word 30418 - .word 36251 - .word 46520 - .word 49061 - .word 0 - .word 3227 - .word 25505 - .word 5540 - .word 47626 - .word 16274 - .word 0 - .word 60933 - .word 3300 - .word 57416 - .word 36218 - .word 49023 - .word 0 - .word 45811 - .word 42646 - .word 37125 - .word 42185 - .word 16235 - .word 0 - .type _sindl_poly_coeff,@object - .size _sindl_poly_coeff,108 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -fBreaker: - .byte 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x80,0x13,0x40,0x00,0x00 - .type fBreaker,@object - .size fBreaker,12 - .align 2 -_TWO5600: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 21983 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 10783 - .word 0 - .type _TWO5600,@object - .size _TWO5600,24 - .align 2 -_Rcp90: - .word 46603 - .word 2912 - .word 24758 - .word 46603 - .word 16376 - .word 0 - .type _Rcp90,@object - .size _Rcp90,12 - .data - .hidden __libm_sindl_cosdl_table - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinf_wmt.S deleted file mode 100644 index ddf67be8a9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinf_wmt.S +++ /dev/null @@ -1,585 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin sinf - .text - .align 16,0x90 - .globl sinf -sinf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 36(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movl 112(%esp), %ecx - subl $16, %esp - stmxcsr 4(%esp) - movl 4(%esp), %eax - andl $-24577, %eax - cmpl %eax, 4(%esp) - jne .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - movapd %xmm0, %xmm1 - cvtps2pd %xmm1, %xmm1 - movsd 1296(%ebx), %xmm2 - movl $2147483647, %eax - movl $1241513983, %edx - andl %ecx, %eax - subl %eax, %edx - subl $964689920, %eax - orl %eax, %edx - jl .L_2TAG_PACKET_2.0.2 - movsd 1312(%ebx), %xmm4 - mulsd %xmm1, %xmm2 - movsd 1328(%ebx), %xmm3 - movapd %xmm2, %xmm5 - addsd %xmm4, %xmm2 - movd %xmm2, %ecx - subsd %xmm4, %xmm2 - mulsd %xmm3, %xmm1 -.L_2TAG_PACKET_3.0.2: - movl $384, %eax - movsd 1344(%ebx), %xmm4 - subsd %xmm2, %xmm5 - addl %ecx, %ecx - movl %ecx, %edx - shll $24, %ecx - sarl $31, %ecx - andl %edx, %eax - addl %ecx, %edx - xorl %ecx, %edx - addsd %xmm5, %xmm1 - andl $254, %edx - movsd (%ebx,%edx,8), %xmm3 - movsd 1352(%ebx), %xmm0 - pshufd $68, %xmm1, %xmm2 - mulsd %xmm1, %xmm1 - movsd 8(%ebx,%edx,8), %xmm5 - movl %eax, %ecx - addl $128, %ecx - andl $256, %ecx - shll $23, %ecx - mulsd %xmm2, %xmm3 - movd %ecx, %xmm2 - subsd %xmm1, %xmm0 - andl $256, %eax - shll $23, %eax - subsd %xmm1, %xmm4 - psllq $32, %xmm2 - movd %eax, %xmm1 - xorpd %xmm2, %xmm4 - mulsd %xmm5, %xmm0 - mulsd %xmm4, %xmm3 - psllq $32, %xmm1 - xorpd %xmm1, %xmm0 - addsd %xmm3, %xmm0 - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_4.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_4.0.2: - cvtpd2ps %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_2.0.2: - andl $2147483647, %ecx - cmpl $1040187392, %ecx - ja .L_2TAG_PACKET_6.0.2 - cvtss2sd %xmm0, %xmm0 - mulsd 1280(%ebx), %xmm0 - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_7.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_7.0.2: - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_0.0.2: - movl 4(%esp), %eax - andl $-24577, %eax - movl %eax, 8(%esp) - ldmxcsr 8(%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_6.0.2: - movd %xmm0, %eax - andl $2139095040, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_8.0.2 - shrl $23, %ecx - subl $142, %ecx - andl $65528, %ecx - movsd 1040(%ebx,%ecx,2), %xmm3 - movsd 1048(%ebx,%ecx,2), %xmm5 - movsd 1360(%ebx), %xmm2 - xorpd %xmm4, %xmm4 - movl $17208, %eax - pinsrw $3, %eax, %xmm4 - andpd %xmm3, %xmm2 - psllq $40, %xmm3 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm1 - movapd %xmm2, %xmm0 - addsd %xmm3, %xmm2 - movapd %xmm2, %xmm5 - subsd %xmm2, %xmm0 - addsd %xmm4, %xmm2 - addsd %xmm0, %xmm3 - movd %xmm2, %ecx - subsd %xmm4, %xmm2 - addsd %xmm3, %xmm1 - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_8.0.2: - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_9.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_9.0.2: - subss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) -.L_2TAG_PACKET_5.0.2: - addl $16, %esp - movl 36(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type sinf,@function - .size sinf,.-sinf - .data -# -- End sinf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 3861233235 - .long 1053076412 - .long 0 - .long 0 - .long 3836476539 - .long 1053076004 - .long 1466910230 - .long 1054802127 - .long 522802171 - .long 1053074781 - .long 1693671239 - .long 1055850091 - .long 1381230637 - .long 1053072742 - .long 3419039295 - .long 1056390099 - .long 3096463640 - .long 1053069889 - .long 3054827835 - .long 1056896220 - .long 163641427 - .long 1053066225 - .long 3381119115 - .long 1057182863 - .long 2063766514 - .long 1053061750 - .long 544295963 - .long 1057434550 - .long 3193221610 - .long 1053056468 - .long 3297207428 - .long 1057685321 - .long 36665700 - .long 1053050383 - .long 2811721921 - .long 1057935027 - .long 4043704933 - .long 1053043496 - .long 2950925715 - .long 1058098350 - .long 2964703016 - .long 1053035814 - .long 2674059679 - .long 1058221912 - .long 3789723003 - .long 1053027340 - .long 879820317 - .long 1058344717 - .long 2671784286 - .long 1053018080 - .long 1979618421 - .long 1058466690 - .long 2093526290 - .long 1053008039 - .long 3945677176 - .long 1058587758 - .long 2262842797 - .long 1052997223 - .long 2796081240 - .long 1058707849 - .long 1097233945 - .long 1052985639 - .long 1373383079 - .long 1058826890 - .long 2796885356 - .long 1052973293 - .long 941816458 - .long 1058944809 - .long 646746141 - .long 1052960194 - .long 1372808103 - .long 1059061535 - .long 2767093429 - .long 1052946348 - .long 664370609 - .long 1059119379 - .long 2028347177 - .long 1052931765 - .long 1369913724 - .long 1059176444 - .long 1799297257 - .long 1052916453 - .long 3344537919 - .long 1059232808 - .long 3039475318 - .long 1052900421 - .long 2500108843 - .long 1059288438 - .long 4275292648 - .long 1052883679 - .long 944109265 - .long 1059343300 - .long 1575056534 - .long 1052866238 - .long 2771364651 - .long 1059397360 - .long 1407782048 - .long 1052848107 - .long 1264637048 - .long 1059450587 - .long 3436142021 - .long 1052829297 - .long 453708735 - .long 1059502948 - .long 488211833 - .long 1052809821 - .long 2313428161 - .long 1059554411 - .long 2993330 - .long 1052789689 - .long 2550341159 - .long 1059604946 - .long 755484892 - .long 1052767523 - .long 3567792879 - .long 1059654522 - .long 3348027550 - .long 1052724710 - .long 1659779181 - .long 1059703110 - .long 2580634211 - .long 1052680662 - .long 4268074870 - .long 1059750679 - .long 742418353 - .long 1052635405 - .long 4288148241 - .long 1059797202 - .long 3250975870 - .long 1052588965 - .long 1618129506 - .long 1059842651 - .long 1401987205 - .long 1052541372 - .long 3231311734 - .long 1059886997 - .long 2361617751 - .long 1052492653 - .long 1772140623 - .long 1059930215 - .long 3322544997 - .long 1052442838 - .long 1395127179 - .long 1059972278 - .long 17970311 - .long 1052391958 - .long 652328457 - .long 1060013161 - .long 3823857331 - .long 1052340041 - .long 1148832537 - .long 1060052839 - .long 3024934267 - .long 1052287121 - .long 3311502568 - .long 1060091288 - .long 1388494065 - .long 1052233229 - .long 1077921708 - .long 1060119411 - .long 902054988 - .long 1052178397 - .long 115411415 - .long 1060137373 - .long 1689375324 - .long 1052122658 - .long 3838419993 - .long 1060154686 - .long 1925003623 - .long 1052066046 - .long 1813501338 - .long 1060171342 - .long 2042383238 - .long 1052008595 - .long 2490283769 - .long 1060187329 - .long 350661592 - .long 1051950340 - .long 3162654741 - .long 1060202638 - .long 1535093810 - .long 1051891315 - .long 2878576948 - .long 1060217260 - .long 3681356269 - .long 1051831556 - .long 2463945945 - .long 1060231186 - .long 2478530408 - .long 1051771100 - .long 250409509 - .long 1060244408 - .long 3726787968 - .long 1051698237 - .long 687004205 - .long 1060256917 - .long 2082609563 - .long 1051574753 - .long 1475857720 - .long 1060268706 - .long 1666812989 - .long 1051450094 - .long 2181617495 - .long 1060279768 - .long 2865853451 - .long 1051324335 - .long 4249822861 - .long 1060290096 - .long 321119318 - .long 1051197553 - .long 2434209605 - .long 1060299685 - .long 4207787592 - .long 1051069822 - .long 1992674941 - .long 1060308528 - .long 1382541649 - .long 1050941222 - .long 1522351063 - .long 1060316620 - .long 2429158325 - .long 1050811828 - .long 1563320407 - .long 1060323956 - .long 2803392399 - .long 1050681719 - .long 316258674 - .long 1060330532 - .long 3917367244 - .long 1050428795 - .long 2243801771 - .long 1060336343 - .long 1991825541 - .long 1050166188 - .long 900924147 - .long 1060341387 - .long 624330694 - .long 1049902623 - .long 418831766 - .long 1060345660 - .long 3087185898 - .long 1049638258 - .long 2627920248 - .long 1060349159 - .long 3670374716 - .long 1049121932 - .long 2769466396 - .long 1060351883 - .long 3431923622 - .long 1048590963 - .long 2385983684 - .long 1060353830 - .long 918535681 - .long 1047542708 - .long 735532773 - .long 1060354999 - .long 0 - .long 0 - .long 3384690142 - .long 1060355388 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1916669064 - .long 1072155675 - .long 660066805 - .long 1024797180 - .long 3829231700 - .long 1062745828 - .long 2884172442 - .long 1017445907 - .long 540874025 - .long 1055617650 - .long 4198409884 - .long 1011844330 - .long 2839315448 - .long 1046639136 - .long 4204424928 - .long 1000582120 - .long 1329339431 - .long 1038229673 - .long 1295478839 - .long 993391741 - .long 658191860 - .long 1024797180 - .long 3691886121 - .long 979325773 - .long 1966800710 - .long 1020436418 - .long 1882642597 - .long 977095991 - .long 2100977488 - .long 1012908661 - .long 1840335565 - .long 967470816 - .long 4198093645 - .long 1000582120 - .long 3307942521 - .long 957055414 - .long 2839123165 - .long 996851343 - .long 1387472776 - .long 952638316 - .long 2788761024 - .long 988712873 - .long 3005712498 - .long 944467026 - .long 3694676832 - .long 979325773 - .long 1326507024 - .long 934847846 - .long 221775557 - .long 970149340 - .long 1133527550 - .long 924162364 - .long 4286578688 - .long 1072693247 - .long 0 - .long 0 - .long 1845493760 - .long 1078222640 - .long 0 - .long 0 - .long 0 - .long 1127743488 - .long 0 - .long 0 - .long 2908765579 - .long 3193641918 - .long 0 - .long 0 - .long 2308576600 - .long 1086551075 - .long 1646446368 - .long 1084878895 - .long 4278190080 - .long 4294967295 - .long 0 - .long 0 - .type static_const_table,@object - .size static_const_table,1376 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinh_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinh_wmt.S deleted file mode 100644 index 9dbe63d099..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinh_wmt.S +++ /dev/null @@ -1,1404 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinh_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin sinh - .text - .align 16,0x90 - .globl sinh -sinh: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd 4272(%ebx), %xmm3 - xorpd %xmm4, %xmm4 - movsd 4192(%ebx), %xmm1 - movsd 4200(%ebx), %xmm2 - movl $32768, %eax - pinsrw $3, %eax, %xmm4 - movsd 4096(%ebx), %xmm6 - pextrw $3, %xmm0, %ecx - andpd %xmm0, %xmm3 - andnpd %xmm0, %xmm4 - pshufd $68, %xmm4, %xmm5 - movl $32768, %edx - andl %ecx, %edx - andl $32767, %ecx - subl $16343, %ecx - cmpl $177, %ecx - jae .L_2TAG_PACKET_0.0.3 - subsd %xmm3, %xmm4 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm2 - cvtsd2si %xmm3, %eax - shll $3, %edx - orl %edx, %eax - movapd %xmm3, %xmm7 - addsd %xmm6, %xmm3 - mulsd %xmm4, %xmm1 - xorpd %xmm5, %xmm5 - subsd %xmm6, %xmm3 - movapd 4112(%ebx), %xmm4 - addsd %xmm1, %xmm2 - movapd 4128(%ebx), %xmm6 - subsd %xmm3, %xmm7 - movl $32704, %edx - pinsrw $3, %edx, %xmm5 - movapd 4144(%ebx), %xmm1 - addsd %xmm7, %xmm2 - movl $127, %edx - andl %eax, %edx - addl %edx, %edx - shrl $3, %eax - andl $65520, %eax - addl $16352, %eax - xorpd %xmm0, %xmm0 - cmpl $161, %ecx - jae .L_2TAG_PACKET_1.0.3 - pshufd $68, %xmm5, %xmm5 - pinsrw $3, %eax, %xmm0 - pshufd $68, %xmm0, %xmm0 - psubw %xmm0, %xmm5 - mulpd (%ebx,%edx,8), %xmm0 - mulpd 2048(%ebx,%edx,8), %xmm5 - pshufd $68, %xmm2, %xmm3 - movapd 4160(%ebx), %xmm7 - pshufd $68, %xmm2, %xmm2 - mulpd %xmm3, %xmm3 - mulpd %xmm2, %xmm4 - mulpd %xmm2, %xmm6 - mulpd 4176(%ebx), %xmm2 - mulpd %xmm3, %xmm1 - mulpd %xmm3, %xmm7 - mulpd %xmm3, %xmm4 - mulpd %xmm3, %xmm1 - addpd %xmm7, %xmm6 - movapd %xmm0, %xmm7 - addpd %xmm1, %xmm4 - shufpd $0, %xmm5, %xmm7 - subpd %xmm5, %xmm0 - mulpd %xmm7, %xmm2 - addpd %xmm6, %xmm4 - subsd %xmm0, %xmm7 - mulpd %xmm2, %xmm4 - pshufd $238, %xmm0, %xmm6 - subsd %xmm5, %xmm7 - addpd %xmm2, %xmm4 - addsd %xmm6, %xmm7 - pshufd $238, %xmm4, %xmm2 - addsd %xmm7, %xmm2 - addsd %xmm4, %xmm2 - addsd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - subl $16352, %eax - movl %eax, %ecx - andl $32752, %eax - shrl $1, %eax - andl $65520, %eax - subl %eax, %ecx - addl $16352, %eax - pinsrw $3, %eax, %xmm0 - pshufd $68, %xmm0, %xmm0 - mulpd (%ebx,%edx,8), %xmm0 - pshufd $68, %xmm2, %xmm3 - movsd 4160(%ebx), %xmm7 - mulsd %xmm3, %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm6 - mulsd 4176(%ebx), %xmm2 - mulsd %xmm3, %xmm1 - mulsd %xmm3, %xmm7 - mulsd %xmm3, %xmm4 - addl $16368, %ecx - pinsrw $3, %ecx, %xmm5 - mulsd %xmm3, %xmm1 - addsd %xmm7, %xmm6 - addsd %xmm1, %xmm4 - mulsd %xmm0, %xmm2 - addsd %xmm6, %xmm4 - mulsd %xmm2, %xmm4 - pshufd $238, %xmm0, %xmm6 - addsd %xmm6, %xmm4 - addsd %xmm4, %xmm2 - addsd %xmm2, %xmm0 - mulsd %xmm5, %xmm0 - pextrw $3, %xmm0, %eax - andl $32752, %eax - movl $127, %edx - cmpl $32752, %eax - je .L_2TAG_PACKET_3.0.3 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - addl $16343, %ecx - cmpl $16343, %ecx - ja .L_2TAG_PACKET_4.0.3 - cmpl $15856, %ecx - jb .L_2TAG_PACKET_5.0.3 - movapd 4208(%ebx), %xmm1 - pshufd $68, %xmm0, %xmm6 - mulpd %xmm5, %xmm5 - movapd 4224(%ebx), %xmm2 - pshufd $68, %xmm0, %xmm7 - movapd 4240(%ebx), %xmm3 - pshufd $68, %xmm0, %xmm4 - andpd 4256(%ebx), %xmm6 - mulpd %xmm5, %xmm1 - mulsd %xmm5, %xmm2 - subpd %xmm6, %xmm4 - mulpd %xmm5, %xmm7 - addpd %xmm3, %xmm1 - pshufd $68, %xmm6, %xmm3 - mulpd %xmm5, %xmm5 - mulsd %xmm7, %xmm2 - mulpd %xmm7, %xmm1 - pshufd $68, %xmm0, %xmm7 - mulsd %xmm6, %xmm6 - addsd %xmm7, %xmm7 - mulsd %xmm4, %xmm4 - mulpd %xmm5, %xmm1 - addsd %xmm0, %xmm7 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm7 - pshufd $238, %xmm1, %xmm3 - mulsd %xmm5, %xmm1 - pshufd $238, %xmm4, %xmm5 - addsd %xmm2, %xmm3 - pshufd $238, %xmm2, %xmm2 - addsd %xmm4, %xmm7 - movapd %xmm0, %xmm4 - mulsd %xmm2, %xmm6 - mulsd %xmm5, %xmm7 - addsd %xmm6, %xmm0 - mulsd %xmm2, %xmm7 - subsd %xmm0, %xmm4 - addsd %xmm7, %xmm1 - addsd %xmm4, %xmm6 - addsd %xmm3, %xmm1 - addsd %xmm6, %xmm1 - addsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_5.0.3: - cmpl $16, %ecx - jae .L_2TAG_PACKET_6.0.3 - movapd %xmm0, %xmm1 - mulsd %xmm1, %xmm1 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - xorpd %xmm2, %xmm2 - movl $17392, %ecx - pinsrw $3, %ecx, %xmm2 - xorpd %xmm3, %xmm3 - movl $15344, %edx - pinsrw $3, %edx, %xmm3 - mulsd %xmm0, %xmm2 - addsd %xmm2, %xmm0 - mulsd %xmm3, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - cmpl $32752, %ecx - jae .L_2TAG_PACKET_7.0.3 - xorpd %xmm0, %xmm0 - movl $32736, %eax - pinsrw $3, %eax, %xmm0 - orl %edx, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - movl $127, %edx -.L_2TAG_PACKET_3.0.3: - movsd %xmm0, (%esp) - movsd 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - fldl (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_7.0.3: - xorpd %xmm1, %xmm1 - movl $32768, %eax - pinsrw $3, %eax, %xmm1 - andnpd %xmm0, %xmm1 - mulsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_2.0.3: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type sinh,@function - .size sinh,.-sinh - .data -# -- End sinh - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 2851812149 - .long 1072698941 - .long 2595802551 - .long 1016815913 - .long 1048019041 - .long 1072704666 - .long 1398474845 - .long 3161559171 - .long 3899555717 - .long 1072710421 - .long 427280750 - .long 3163595548 - .long 3541402996 - .long 1072716208 - .long 2759177317 - .long 1015903202 - .long 702412510 - .long 1072722027 - .long 3803266087 - .long 3163328991 - .long 410360776 - .long 1072727877 - .long 1269990655 - .long 1013024446 - .long 3402036099 - .long 1072733758 - .long 405889334 - .long 1016154232 - .long 1828292879 - .long 1072739672 - .long 1255956747 - .long 1016636974 - .long 728909815 - .long 1072745618 - .long 383930225 - .long 1016078044 - .long 852742562 - .long 1072751596 - .long 667253586 - .long 1010842135 - .long 2952712987 - .long 1072757606 - .long 3293494651 - .long 3161168877 - .long 3490863953 - .long 1072763649 - .long 960797498 - .long 3163997456 - .long 3228316108 - .long 1072769725 - .long 3010241991 - .long 3159471380 - .long 2930322912 - .long 1072775834 - .long 2599499422 - .long 3163762623 - .long 3366293073 - .long 1072781976 - .long 3119426314 - .long 1015169130 - .long 1014845819 - .long 1072788152 - .long 3117910646 - .long 3162607681 - .long 948735466 - .long 1072794361 - .long 3516338028 - .long 3163623459 - .long 3949972341 - .long 1072800603 - .long 2068408548 - .long 1015962444 - .long 2214878420 - .long 1072806880 - .long 892270087 - .long 3164164998 - .long 828946858 - .long 1072813191 - .long 10642492 - .long 1016988014 - .long 586995997 - .long 1072819536 - .long 41662348 - .long 3163676568 - .long 2288159958 - .long 1072825915 - .long 2169144469 - .long 1015924597 - .long 2440944790 - .long 1072832329 - .long 2492769774 - .long 1015196030 - .long 1853186616 - .long 1072838778 - .long 3066496371 - .long 1016705150 - .long 1337108031 - .long 1072845262 - .long 3203724452 - .long 1015726421 - .long 1709341917 - .long 1072851781 - .long 2571168217 - .long 1015201075 - .long 3790955393 - .long 1072858335 - .long 2352942462 - .long 3164228666 - .long 4112506593 - .long 1072864925 - .long 2947355221 - .long 1015419624 - .long 3504003472 - .long 1072871551 - .long 3594001060 - .long 3158379228 - .long 2799960843 - .long 1072878213 - .long 1423655381 - .long 1016070727 - .long 2839424854 - .long 1072884911 - .long 1171596163 - .long 1014090255 - .long 171030293 - .long 1072891646 - .long 3526460132 - .long 1015477354 - .long 4232894513 - .long 1072898416 - .long 2383938684 - .long 1015717095 - .long 2992903935 - .long 1072905224 - .long 2218154406 - .long 1016276769 - .long 1603444721 - .long 1072912069 - .long 1548633640 - .long 3163249902 - .long 926591435 - .long 1072918951 - .long 3208833762 - .long 3163962090 - .long 1829099622 - .long 1072925870 - .long 1016661181 - .long 3164509581 - .long 887463927 - .long 1072932827 - .long 3596744163 - .long 3161842742 - .long 3272845541 - .long 1072939821 - .long 928852419 - .long 3164536824 - .long 1276261410 - .long 1072946854 - .long 300981948 - .long 1015732745 - .long 78413852 - .long 1072953925 - .long 4183226867 - .long 3164065827 - .long 569847338 - .long 1072961034 - .long 472945272 - .long 3160339305 - .long 3645941911 - .long 1072968181 - .long 3814685081 - .long 3162621917 - .long 1617004845 - .long 1072975368 - .long 82804944 - .long 1011391354 - .long 3978100823 - .long 1072982593 - .long 3513027190 - .long 1016894539 - .long 3049340112 - .long 1072989858 - .long 3062915824 - .long 1014219171 - .long 4040676318 - .long 1072997162 - .long 4090609238 - .long 1016712034 - .long 3577096743 - .long 1073004506 - .long 2951496418 - .long 1014842263 - .long 2583551245 - .long 1073011890 - .long 3161094195 - .long 1016655067 - .long 1990012071 - .long 1073019314 - .long 3529070563 - .long 3163861769 - .long 2731501122 - .long 1073026778 - .long 1774031855 - .long 3163518597 - .long 1453150082 - .long 1073034283 - .long 498154669 - .long 3162536638 - .long 3395129871 - .long 1073041828 - .long 4025345435 - .long 3163383964 - .long 917841882 - .long 1073049415 - .long 18715565 - .long 1016707884 - .long 3566716925 - .long 1073057042 - .long 1536826856 - .long 1015191009 - .long 3712504873 - .long 1073064711 - .long 88491949 - .long 1016476236 - .long 2321106615 - .long 1073072422 - .long 2171176610 - .long 1010584347 - .long 363667784 - .long 1073080175 - .long 813753950 - .long 1016833785 - .long 3111574537 - .long 1073087969 - .long 2606161479 - .long 3163808322 - .long 2956612997 - .long 1073095806 - .long 2118169751 - .long 3163784129 - .long 885834528 - .long 1073103686 - .long 1973258547 - .long 3163310140 - .long 2186617381 - .long 1073111608 - .long 2270764084 - .long 3164321289 - .long 3561793907 - .long 1073119573 - .long 1157054053 - .long 1012938926 - .long 1719614413 - .long 1073127582 - .long 330458198 - .long 3164331316 - .long 1963711167 - .long 1073135634 - .long 1744767757 - .long 3161622870 - .long 1013258799 - .long 1073143730 - .long 1748797611 - .long 3161177658 - .long 4182873220 - .long 1073151869 - .long 629542646 - .long 3163044879 - .long 3907805044 - .long 1073160053 - .long 2257091225 - .long 3162598983 - .long 1218806132 - .long 1073168282 - .long 1818613052 - .long 3163597017 - .long 1447192521 - .long 1073176555 - .long 1462857171 - .long 3163563097 - .long 1339972927 - .long 1073184873 - .long 167908909 - .long 1016620728 - .long 1944781191 - .long 1073193236 - .long 3993278767 - .long 3162772855 - .long 19972402 - .long 1073201645 - .long 3507899862 - .long 1017057868 - .long 919555682 - .long 1073210099 - .long 3121969534 - .long 1013996802 - .long 1413356050 - .long 1073218599 - .long 1651349291 - .long 3163716742 - .long 2571947539 - .long 1073227145 - .long 3558159064 - .long 3164425245 - .long 1176749997 - .long 1073235738 - .long 2738998779 - .long 3163084420 - .long 2604962541 - .long 1073244377 - .long 2614425274 - .long 3164587768 - .long 3649726105 - .long 1073253063 - .long 4085036346 - .long 1016698050 - .long 1110089947 - .long 1073261797 - .long 1451641639 - .long 1016523249 - .long 380978316 - .long 1073270578 - .long 854188970 - .long 3161511262 - .long 2568320822 - .long 1073279406 - .long 2732824428 - .long 1015401491 - .long 194117574 - .long 1073288283 - .long 777528612 - .long 3164460665 - .long 2966275557 - .long 1073297207 - .long 2176155324 - .long 3160891335 - .long 3418903055 - .long 1073306180 - .long 2527457337 - .long 3161869180 - .long 2682146384 - .long 1073315202 - .long 2082178513 - .long 3164411995 - .long 1892288442 - .long 1073324273 - .long 2446255666 - .long 3163648957 - .long 2191782032 - .long 1073333393 - .long 2960257726 - .long 1014791238 - .long 434316067 - .long 1073342563 - .long 2028358766 - .long 1014506698 - .long 2069751141 - .long 1073351782 - .long 1562170675 - .long 3163773257 - .long 3964284211 - .long 1073361051 - .long 2111583915 - .long 1016475740 - .long 2990417245 - .long 1073370371 - .long 3683467745 - .long 3164417902 - .long 321958744 - .long 1073379742 - .long 3401933767 - .long 1016843134 - .long 1434058175 - .long 1073389163 - .long 251133233 - .long 1016134345 - .long 3218338682 - .long 1073398635 - .long 3404164304 - .long 3163525684 - .long 2572866477 - .long 1073408159 - .long 878562433 - .long 1016570317 - .long 697153126 - .long 1073417735 - .long 1283515429 - .long 3164331765 - .long 3092190715 - .long 1073427362 - .long 814012168 - .long 3160571998 - .long 2380618042 - .long 1073437042 - .long 3149557219 - .long 3164369375 - .long 4076559943 - .long 1073446774 - .long 2119478331 - .long 3161806927 - .long 815859274 - .long 1073456560 - .long 240396590 - .long 3164536019 - .long 2420883922 - .long 1073466398 - .long 2049810052 - .long 1015168464 - .long 1540824585 - .long 1073476290 - .long 1064017011 - .long 3164536266 - .long 3716502172 - .long 1073486235 - .long 2303740125 - .long 1015091301 - .long 1610600570 - .long 1073496235 - .long 3766732298 - .long 1016808759 - .long 777507147 - .long 1073506289 - .long 4282924205 - .long 1016236109 - .long 2483480501 - .long 1073516397 - .long 1216371780 - .long 1014082748 - .long 3706687593 - .long 1073526560 - .long 3521726940 - .long 1014301643 - .long 1432208378 - .long 1073536779 - .long 1401068914 - .long 3163412539 - .long 1242007932 - .long 1073547053 - .long 1132034716 - .long 3164388407 - .long 135105010 - .long 1073557383 - .long 1906148728 - .long 3164424315 - .long 3707479175 - .long 1073567768 - .long 3613079303 - .long 1015213314 - .long 382305176 - .long 1073578211 - .long 2347622376 - .long 3163627201 - .long 64696965 - .long 1073588710 - .long 1768797490 - .long 1016865536 - .long 4076975200 - .long 1073599265 - .long 2029000899 - .long 1016257111 - .long 863738719 - .long 1073609879 - .long 1326992220 - .long 3163661773 - .long 351641897 - .long 1073620550 - .long 2172261526 - .long 3164059175 - .long 3884662774 - .long 1073631278 - .long 2158611599 - .long 1015258761 - .long 4224142467 - .long 1073642065 - .long 3389820386 - .long 1016255778 - .long 2728693978 - .long 1073652911 - .long 396109971 - .long 3164511267 - .long 764307441 - .long 1073663816 - .long 3021057420 - .long 3164378099 - .long 3999357479 - .long 1073674779 - .long 2258941616 - .long 1016973300 - .long 929806999 - .long 1073685803 - .long 3205336643 - .long 1016308133 - .long 1533953344 - .long 1073696886 - .long 769171851 - .long 1016714209 - .long 2912730644 - .long 1073708029 - .long 3490067722 - .long 3164453650 - .long 2174652632 - .long 1073719233 - .long 4087714590 - .long 1015498835 - .long 730821105 - .long 1073730498 - .long 2523232743 - .long 1013115764 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 730821105 - .long 1072681922 - .long 2523232743 - .long 1012067188 - .long 2174652632 - .long 1072670657 - .long 4087714590 - .long 1014450259 - .long 2912730644 - .long 1072659453 - .long 3490067722 - .long 3163405074 - .long 1533953344 - .long 1072648310 - .long 769171851 - .long 1015665633 - .long 929806999 - .long 1072637227 - .long 3205336643 - .long 1015259557 - .long 3999357479 - .long 1072626203 - .long 2258941616 - .long 1015924724 - .long 764307441 - .long 1072615240 - .long 3021057420 - .long 3163329523 - .long 2728693978 - .long 1072604335 - .long 396109971 - .long 3163462691 - .long 4224142467 - .long 1072593489 - .long 3389820386 - .long 1015207202 - .long 3884662774 - .long 1072582702 - .long 2158611599 - .long 1014210185 - .long 351641897 - .long 1072571974 - .long 2172261526 - .long 3163010599 - .long 863738719 - .long 1072561303 - .long 1326992220 - .long 3162613197 - .long 4076975200 - .long 1072550689 - .long 2029000899 - .long 1015208535 - .long 64696965 - .long 1072540134 - .long 1768797490 - .long 1015816960 - .long 382305176 - .long 1072529635 - .long 2347622376 - .long 3162578625 - .long 3707479175 - .long 1072519192 - .long 3613079303 - .long 1014164738 - .long 135105010 - .long 1072508807 - .long 1906148728 - .long 3163375739 - .long 1242007932 - .long 1072498477 - .long 1132034716 - .long 3163339831 - .long 1432208378 - .long 1072488203 - .long 1401068914 - .long 3162363963 - .long 3706687593 - .long 1072477984 - .long 3521726940 - .long 1013253067 - .long 2483480501 - .long 1072467821 - .long 1216371780 - .long 1013034172 - .long 777507147 - .long 1072457713 - .long 4282924205 - .long 1015187533 - .long 1610600570 - .long 1072447659 - .long 3766732298 - .long 1015760183 - .long 3716502172 - .long 1072437659 - .long 2303740125 - .long 1014042725 - .long 1540824585 - .long 1072427714 - .long 1064017011 - .long 3163487690 - .long 2420883922 - .long 1072417822 - .long 2049810052 - .long 1014119888 - .long 815859274 - .long 1072407984 - .long 240396590 - .long 3163487443 - .long 4076559943 - .long 1072398198 - .long 2119478331 - .long 3160758351 - .long 2380618042 - .long 1072388466 - .long 3149557219 - .long 3163320799 - .long 3092190715 - .long 1072378786 - .long 814012168 - .long 3159523422 - .long 697153126 - .long 1072369159 - .long 1283515429 - .long 3163283189 - .long 2572866477 - .long 1072359583 - .long 878562433 - .long 1015521741 - .long 3218338682 - .long 1072350059 - .long 3404164304 - .long 3162477108 - .long 1434058175 - .long 1072340587 - .long 251133233 - .long 1015085769 - .long 321958744 - .long 1072331166 - .long 3401933767 - .long 1015794558 - .long 2990417245 - .long 1072321795 - .long 3683467745 - .long 3163369326 - .long 3964284211 - .long 1072312475 - .long 2111583915 - .long 1015427164 - .long 2069751141 - .long 1072303206 - .long 1562170675 - .long 3162724681 - .long 434316067 - .long 1072293987 - .long 2028358766 - .long 1013458122 - .long 2191782032 - .long 1072284817 - .long 2960257726 - .long 1013742662 - .long 1892288442 - .long 1072275697 - .long 2446255666 - .long 3162600381 - .long 2682146384 - .long 1072266626 - .long 2082178513 - .long 3163363419 - .long 3418903055 - .long 1072257604 - .long 2527457337 - .long 3160820604 - .long 2966275557 - .long 1072248631 - .long 2176155324 - .long 3159842759 - .long 194117574 - .long 1072239707 - .long 777528612 - .long 3163412089 - .long 2568320822 - .long 1072230830 - .long 2732824428 - .long 1014352915 - .long 380978316 - .long 1072222002 - .long 854188970 - .long 3160462686 - .long 1110089947 - .long 1072213221 - .long 1451641639 - .long 1015474673 - .long 3649726105 - .long 1072204487 - .long 4085036346 - .long 1015649474 - .long 2604962541 - .long 1072195801 - .long 2614425274 - .long 3163539192 - .long 1176749997 - .long 1072187162 - .long 2738998779 - .long 3162035844 - .long 2571947539 - .long 1072178569 - .long 3558159064 - .long 3163376669 - .long 1413356050 - .long 1072170023 - .long 1651349291 - .long 3162668166 - .long 919555682 - .long 1072161523 - .long 3121969534 - .long 1012948226 - .long 19972402 - .long 1072153069 - .long 3507899862 - .long 1016009292 - .long 1944781191 - .long 1072144660 - .long 3993278767 - .long 3161724279 - .long 1339972927 - .long 1072136297 - .long 167908909 - .long 1015572152 - .long 1447192521 - .long 1072127979 - .long 1462857171 - .long 3162514521 - .long 1218806132 - .long 1072119706 - .long 1818613052 - .long 3162548441 - .long 3907805044 - .long 1072111477 - .long 2257091225 - .long 3161550407 - .long 4182873220 - .long 1072103293 - .long 629542646 - .long 3161996303 - .long 1013258799 - .long 1072095154 - .long 1748797611 - .long 3160129082 - .long 1963711167 - .long 1072087058 - .long 1744767757 - .long 3160574294 - .long 1719614413 - .long 1072079006 - .long 330458198 - .long 3163282740 - .long 3561793907 - .long 1072070997 - .long 1157054053 - .long 1011890350 - .long 2186617381 - .long 1072063032 - .long 2270764084 - .long 3163272713 - .long 885834528 - .long 1072055110 - .long 1973258547 - .long 3162261564 - .long 2956612997 - .long 1072047230 - .long 2118169751 - .long 3162735553 - .long 3111574537 - .long 1072039393 - .long 2606161479 - .long 3162759746 - .long 363667784 - .long 1072031599 - .long 813753950 - .long 1015785209 - .long 2321106615 - .long 1072023846 - .long 2171176610 - .long 1009535771 - .long 3712504873 - .long 1072016135 - .long 88491949 - .long 1015427660 - .long 3566716925 - .long 1072008466 - .long 1536826856 - .long 1014142433 - .long 917841882 - .long 1072000839 - .long 18715565 - .long 1015659308 - .long 3395129871 - .long 1071993252 - .long 4025345435 - .long 3162335388 - .long 1453150082 - .long 1071985707 - .long 498154669 - .long 3161488062 - .long 2731501122 - .long 1071978202 - .long 1774031855 - .long 3162470021 - .long 1990012071 - .long 1071970738 - .long 3529070563 - .long 3162813193 - .long 2583551245 - .long 1071963314 - .long 3161094195 - .long 1015606491 - .long 3577096743 - .long 1071955930 - .long 2951496418 - .long 1013793687 - .long 4040676318 - .long 1071948586 - .long 4090609238 - .long 1015663458 - .long 3049340112 - .long 1071941282 - .long 3062915824 - .long 1013170595 - .long 3978100823 - .long 1071934017 - .long 3513027190 - .long 1015845963 - .long 1617004845 - .long 1071926792 - .long 82804944 - .long 1010342778 - .long 3645941911 - .long 1071919605 - .long 3814685081 - .long 3161573341 - .long 569847338 - .long 1071912458 - .long 472945272 - .long 3159290729 - .long 78413852 - .long 1071905349 - .long 4183226867 - .long 3163017251 - .long 1276261410 - .long 1071898278 - .long 300981948 - .long 1014684169 - .long 3272845541 - .long 1071891245 - .long 928852419 - .long 3163488248 - .long 887463927 - .long 1071884251 - .long 3596744163 - .long 3160794166 - .long 1829099622 - .long 1071877294 - .long 1016661181 - .long 3163461005 - .long 926591435 - .long 1071870375 - .long 3208833762 - .long 3162913514 - .long 1603444721 - .long 1071863493 - .long 1548633640 - .long 3162201326 - .long 2992903935 - .long 1071856648 - .long 2218154406 - .long 1015228193 - .long 4232894513 - .long 1071849840 - .long 2383938684 - .long 1014668519 - .long 171030293 - .long 1071843070 - .long 3526460132 - .long 1014428778 - .long 2839424854 - .long 1071836335 - .long 1171596163 - .long 1013041679 - .long 2799960843 - .long 1071829637 - .long 1423655381 - .long 1015022151 - .long 3504003472 - .long 1071822975 - .long 3594001060 - .long 3157330652 - .long 4112506593 - .long 1071816349 - .long 2947355221 - .long 1014371048 - .long 3790955393 - .long 1071809759 - .long 2352942462 - .long 3163180090 - .long 1709341917 - .long 1071803205 - .long 2571168217 - .long 1014152499 - .long 1337108031 - .long 1071796686 - .long 3203724452 - .long 1014677845 - .long 1853186616 - .long 1071790202 - .long 3066496371 - .long 1015656574 - .long 2440944790 - .long 1071783753 - .long 2492769774 - .long 1014147454 - .long 2288159958 - .long 1071777339 - .long 2169144469 - .long 1014876021 - .long 586995997 - .long 1071770960 - .long 41662348 - .long 3162627992 - .long 828946858 - .long 1071764615 - .long 10642492 - .long 1015939438 - .long 2214878420 - .long 1071758304 - .long 892270087 - .long 3163116422 - .long 3949972341 - .long 1071752027 - .long 2068408548 - .long 1014913868 - .long 948735466 - .long 1071745785 - .long 3516338028 - .long 3162574883 - .long 1014845819 - .long 1071739576 - .long 3117910646 - .long 3161559105 - .long 3366293073 - .long 1071733400 - .long 3119426314 - .long 1014120554 - .long 2930322912 - .long 1071727258 - .long 2599499422 - .long 3162714047 - .long 3228316108 - .long 1071721149 - .long 3010241991 - .long 3158422804 - .long 3490863953 - .long 1071715073 - .long 960797498 - .long 3162948880 - .long 2952712987 - .long 1071709030 - .long 3293494651 - .long 3160120301 - .long 852742562 - .long 1071703020 - .long 667253586 - .long 1009793559 - .long 728909815 - .long 1071697042 - .long 383930225 - .long 1015029468 - .long 1828292879 - .long 1071691096 - .long 1255956747 - .long 1015588398 - .long 3402036099 - .long 1071685182 - .long 405889334 - .long 1015105656 - .long 410360776 - .long 1071679301 - .long 1269990655 - .long 1011975870 - .long 702412510 - .long 1071673451 - .long 3803266087 - .long 3162280415 - .long 3541402996 - .long 1071667632 - .long 2759177317 - .long 1014854626 - .long 3899555717 - .long 1071661845 - .long 427280750 - .long 3162546972 - .long 1048019041 - .long 1071656090 - .long 1398474845 - .long 3160510595 - .long 2851812149 - .long 1071650365 - .long 2595802551 - .long 1015767337 - .long 0 - .long 1127743488 - .long 0 - .long 3275227136 - .long 3607404736 - .long 1044146952 - .long 3607404736 - .long 3191630600 - .long 4277811695 - .long 1063661122 - .long 4277811695 - .long 3211144770 - .long 2140175755 - .long 1033864261 - .long 2140175755 - .long 1033864261 - .long 4289495988 - .long 1054113747 - .long 4289495988 - .long 1054113747 - .long 4277811695 - .long 1064709698 - .long 4277811695 - .long 1064709698 - .long 1610612736 - .long 1080497479 - .long 4166901572 - .long 1053077003 - .long 329805064 - .long 1038488134 - .long 2773927730 - .long 1053236707 - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1069897045 - .long 1744127201 - .long 1046144581 - .long 436314137 - .long 1059717536 - .long 0 - .long 4294967280 - .long 0 - .long 4294967280 - .long 4160749568 - .long 2147483647 - .type static_const_table,@object - .size static_const_table,4280 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhcosh_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhcosh_wmt.S deleted file mode 100644 index fd0ad63143..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhcosh_wmt.S +++ /dev/null @@ -1,1518 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinhcosh_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin sinhcosh - .text - .align 16,0x90 - .globl sinhcosh -sinhcosh: -# parameter 1: 8 + %ebp -# parameter 2: 16 + %ebp -# parameter 3: 20 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 64(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - movl 136(%esp), %eax - movl %eax, 24(%esp) - movl 140(%esp), %eax - movl %eax, 28(%esp) - movsd %xmm0, 16(%esp) - movsd 4320(%ebx), %xmm3 - xorpd %xmm4, %xmm4 - movsd 4192(%ebx), %xmm1 - movsd 4200(%ebx), %xmm2 - movl $32768, %eax - pinsrw $3, %eax, %xmm4 - movsd 4096(%ebx), %xmm6 - pextrw $3, %xmm0, %ecx - andpd %xmm0, %xmm3 - andnpd %xmm0, %xmm4 - pshufd $68, %xmm4, %xmm5 - movl $32768, %edx - andl %ecx, %edx - andl $32767, %ecx - subl $16343, %ecx - cmpl $177, %ecx - jae .L_2TAG_PACKET_0.0.3 - subsd %xmm3, %xmm4 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm2 - cvtsd2si %xmm3, %eax - shll $3, %edx - orl %edx, %eax - movapd %xmm3, %xmm7 - addsd %xmm6, %xmm3 - mulsd %xmm4, %xmm1 - xorpd %xmm5, %xmm5 - subsd %xmm6, %xmm3 - movapd 4112(%ebx), %xmm4 - addsd %xmm1, %xmm2 - movapd 4128(%ebx), %xmm6 - subsd %xmm3, %xmm7 - movl $32704, %edx - pinsrw $3, %edx, %xmm5 - movapd 4144(%ebx), %xmm1 - addsd %xmm7, %xmm2 - movl $127, %edx - andl %eax, %edx - addl %edx, %edx - shrl $3, %eax - andl $65520, %eax - addl $16352, %eax - xorpd %xmm0, %xmm0 - cmpl $161, %ecx - jae .L_2TAG_PACKET_1.0.3 - pshufd $68, %xmm5, %xmm5 - pinsrw $3, %eax, %xmm0 - pshufd $68, %xmm0, %xmm0 - psubw %xmm0, %xmm5 - mulpd (%ebx,%edx,8), %xmm0 - mulpd 2048(%ebx,%edx,8), %xmm5 - pshufd $68, %xmm2, %xmm3 - movapd 4160(%ebx), %xmm7 - pshufd $68, %xmm2, %xmm2 - mulpd %xmm3, %xmm3 - mulpd %xmm2, %xmm4 - mulpd %xmm2, %xmm6 - mulpd 4176(%ebx), %xmm2 - mulpd %xmm3, %xmm1 - mulpd %xmm3, %xmm7 - mulpd %xmm3, %xmm4 - mulpd %xmm3, %xmm1 - addpd %xmm7, %xmm6 - movapd %xmm0, %xmm7 - addpd %xmm1, %xmm4 - shufpd $0, %xmm5, %xmm7 - mulpd %xmm7, %xmm2 - shufpd $3, %xmm5, %xmm0 - addpd %xmm6, %xmm4 - mulpd %xmm2, %xmm4 - addpd %xmm0, %xmm4 - movapd %xmm7, %xmm1 - addpd %xmm2, %xmm4 - addpd %xmm4, %xmm1 - subpd %xmm1, %xmm7 - movapd %xmm1, %xmm0 - movapd %xmm1, %xmm5 - movapd %xmm1, %xmm6 - addpd %xmm7, %xmm4 - pshufd $238, %xmm1, %xmm2 - movapd %xmm4, %xmm3 - pshufd $238, %xmm4, %xmm7 - addsd %xmm2, %xmm1 - subsd %xmm2, %xmm0 - addsd %xmm7, %xmm4 - subsd %xmm7, %xmm3 - subsd %xmm1, %xmm5 - movsd 4352(%ebx), %xmm7 - subsd %xmm0, %xmm6 - addsd %xmm2, %xmm5 - subsd %xmm2, %xmm6 - addsd %xmm5, %xmm4 - addsd %xmm6, %xmm3 - addsd %xmm4, %xmm1 - addsd %xmm3, %xmm0 - andpd %xmm7, %xmm1 - movl 24(%esp), %eax - movsd %xmm0, (%eax) - movl 28(%esp), %ecx - movsd %xmm1, (%ecx) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - subl $16352, %eax - movl %eax, %ecx - andl $32752, %eax - shrl $1, %eax - andl $65520, %eax - subl %eax, %ecx - addl $16352, %eax - pinsrw $3, %eax, %xmm0 - pshufd $68, %xmm0, %xmm0 - mulpd (%ebx,%edx,8), %xmm0 - pshufd $68, %xmm2, %xmm3 - movsd 4160(%ebx), %xmm7 - mulsd %xmm3, %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm6 - mulsd 4176(%ebx), %xmm2 - mulsd %xmm3, %xmm1 - mulsd %xmm3, %xmm7 - mulsd %xmm3, %xmm4 - addl $16368, %ecx - pinsrw $3, %ecx, %xmm5 - mulsd %xmm3, %xmm1 - addsd %xmm7, %xmm6 - addsd %xmm1, %xmm4 - mulsd %xmm0, %xmm2 - addsd %xmm6, %xmm4 - mulsd %xmm2, %xmm4 - pshufd $238, %xmm0, %xmm6 - addsd %xmm6, %xmm4 - movsd 4352(%ebx), %xmm1 - addsd %xmm4, %xmm2 - addsd %xmm2, %xmm0 - mulsd %xmm5, %xmm0 - pextrw $3, %xmm0, %eax - andpd %xmm0, %xmm1 - andl $32752, %eax - movl $229, %edx - cmpl $32752, %eax - je .L_2TAG_PACKET_3.0.3 - movl 24(%esp), %eax - movsd %xmm0, (%eax) - movl 28(%esp), %eax - movsd %xmm1, (%eax) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - addl $16343, %ecx - cmpl $16343, %ecx - ja .L_2TAG_PACKET_4.0.3 - cmpl $15856, %ecx - jb .L_2TAG_PACKET_5.0.3 - movapd 4208(%ebx), %xmm1 - pshufd $68, %xmm0, %xmm6 - mulpd %xmm5, %xmm5 - movapd 4224(%ebx), %xmm2 - pshufd $68, %xmm0, %xmm7 - movapd 4240(%ebx), %xmm3 - pshufd $68, %xmm0, %xmm4 - andpd 4304(%ebx), %xmm6 - mulpd %xmm5, %xmm1 - mulsd %xmm5, %xmm2 - subpd %xmm6, %xmm4 - mulpd %xmm5, %xmm7 - addpd %xmm3, %xmm1 - pshufd $68, %xmm6, %xmm3 - mulpd %xmm5, %xmm5 - mulsd %xmm7, %xmm2 - mulpd %xmm7, %xmm1 - pshufd $68, %xmm0, %xmm7 - mulsd %xmm6, %xmm6 - addsd %xmm7, %xmm7 - mulsd %xmm4, %xmm4 - mulpd %xmm5, %xmm1 - addsd %xmm0, %xmm7 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm7 - pshufd $238, %xmm1, %xmm3 - mulsd %xmm5, %xmm1 - pshufd $238, %xmm4, %xmm5 - addsd %xmm2, %xmm3 - pshufd $238, %xmm2, %xmm2 - addsd %xmm4, %xmm7 - movapd %xmm0, %xmm4 - mulsd %xmm2, %xmm6 - mulsd %xmm5, %xmm7 - addsd %xmm6, %xmm0 - mulsd %xmm2, %xmm7 - subsd %xmm0, %xmm4 - addsd %xmm7, %xmm1 - addsd %xmm4, %xmm6 - addsd %xmm3, %xmm1 - addsd %xmm6, %xmm1 - addsd %xmm1, %xmm0 - movl 24(%esp), %eax - movsd %xmm0, (%eax) - movsd 16(%esp), %xmm5 - pshufd $68, %xmm5, %xmm5 - movapd 4256(%ebx), %xmm1 - mulpd %xmm5, %xmm5 - movapd 4272(%ebx), %xmm2 - xorpd %xmm3, %xmm3 - movsd 4288(%ebx), %xmm7 - movapd %xmm5, %xmm0 - mulpd %xmm5, %xmm1 - movsd 4336(%ebx), %xmm6 - mulpd %xmm5, %xmm5 - movl $16352, %eax - pinsrw $3, %eax, %xmm3 - addpd %xmm2, %xmm1 - mulsd %xmm5, %xmm7 - mulpd %xmm5, %xmm1 - mulsd %xmm5, %xmm7 - pshufd $238, %xmm1, %xmm2 - mulsd %xmm5, %xmm1 - mulsd %xmm5, %xmm7 - mulsd %xmm3, %xmm0 - addsd %xmm2, %xmm1 - addsd %xmm7, %xmm1 - addsd %xmm0, %xmm1 - addsd %xmm6, %xmm1 - movl 28(%esp), %ecx - movsd %xmm1, (%ecx) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_5.0.3: - movsd 4336(%ebx), %xmm1 - cmpl $16, %ecx - jae .L_2TAG_PACKET_6.0.3 - movapd %xmm0, %xmm2 - mulsd %xmm2, %xmm2 - movl 24(%esp), %eax - movsd %xmm0, (%eax) - movl 28(%esp), %ecx - movsd %xmm1, (%ecx) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_6.0.3: - xorpd %xmm2, %xmm2 - movl $17392, %ecx - pinsrw $3, %ecx, %xmm2 - xorpd %xmm3, %xmm3 - movl $15344, %edx - pinsrw $3, %edx, %xmm3 - mulsd %xmm0, %xmm2 - addsd %xmm2, %xmm0 - mulsd %xmm3, %xmm0 - movl 24(%esp), %eax - movsd %xmm0, (%eax) - movl 28(%esp), %ecx - movsd %xmm1, (%ecx) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - cmpl $32752, %ecx - jae .L_2TAG_PACKET_7.0.3 - movsd 4352(%ebx), %xmm3 - xorpd %xmm0, %xmm0 - movl $32736, %eax - pinsrw $3, %eax, %xmm0 - orl %edx, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - movapd %xmm0, %xmm1 - andpd %xmm3, %xmm1 - movl $229, %edx -.L_2TAG_PACKET_3.0.3: - movsd %xmm0, (%esp) - movsd %xmm1, 8(%esp) - movsd 16(%esp), %xmm0 - subl $32, %esp - lea 128(%esp), %eax - movl %eax, (%esp) - lea 136(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - movsd (%esp), %xmm0 - movsd 8(%esp), %xmm1 - movl 24(%esp), %eax - movsd %xmm0, (%eax) - movl 28(%esp), %ecx - movsd %xmm1, (%ecx) - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_7.0.3: - xorpd %xmm1, %xmm1 - movl $32768, %eax - pinsrw $3, %eax, %xmm2 - andnpd %xmm0, %xmm2 - mulsd %xmm2, %xmm0 - movapd %xmm0, %xmm1 - movd %xmm0, %edx - movapd %xmm0, %xmm3 - cmpl $0, %edx - jne .L_2TAG_PACKET_8.0.3 - psrlq $20, %xmm3 - movd %xmm3, %ecx - cmpl $0, %ecx - jne .L_2TAG_PACKET_8.0.3 - movapd %xmm2, %xmm1 -.L_2TAG_PACKET_8.0.3: - movl 24(%esp), %eax - movsd %xmm0, (%eax) - movl 28(%esp), %ecx - movsd %xmm1, (%ecx) -.L_2TAG_PACKET_2.0.3: - movl 64(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type sinhcosh,@function - .size sinhcosh,.-sinhcosh - .data -# -- End sinhcosh - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 2851812149 - .long 1072698941 - .long 2595802551 - .long 1016815913 - .long 1048019041 - .long 1072704666 - .long 1398474845 - .long 3161559171 - .long 3899555717 - .long 1072710421 - .long 427280750 - .long 3163595548 - .long 3541402996 - .long 1072716208 - .long 2759177317 - .long 1015903202 - .long 702412510 - .long 1072722027 - .long 3803266087 - .long 3163328991 - .long 410360776 - .long 1072727877 - .long 1269990655 - .long 1013024446 - .long 3402036099 - .long 1072733758 - .long 405889334 - .long 1016154232 - .long 1828292879 - .long 1072739672 - .long 1255956747 - .long 1016636974 - .long 728909815 - .long 1072745618 - .long 383930225 - .long 1016078044 - .long 852742562 - .long 1072751596 - .long 667253586 - .long 1010842135 - .long 2952712987 - .long 1072757606 - .long 3293494651 - .long 3161168877 - .long 3490863953 - .long 1072763649 - .long 960797498 - .long 3163997456 - .long 3228316108 - .long 1072769725 - .long 3010241991 - .long 3159471380 - .long 2930322912 - .long 1072775834 - .long 2599499422 - .long 3163762623 - .long 3366293073 - .long 1072781976 - .long 3119426314 - .long 1015169130 - .long 1014845819 - .long 1072788152 - .long 3117910646 - .long 3162607681 - .long 948735466 - .long 1072794361 - .long 3516338028 - .long 3163623459 - .long 3949972341 - .long 1072800603 - .long 2068408548 - .long 1015962444 - .long 2214878420 - .long 1072806880 - .long 892270087 - .long 3164164998 - .long 828946858 - .long 1072813191 - .long 10642492 - .long 1016988014 - .long 586995997 - .long 1072819536 - .long 41662348 - .long 3163676568 - .long 2288159958 - .long 1072825915 - .long 2169144469 - .long 1015924597 - .long 2440944790 - .long 1072832329 - .long 2492769774 - .long 1015196030 - .long 1853186616 - .long 1072838778 - .long 3066496371 - .long 1016705150 - .long 1337108031 - .long 1072845262 - .long 3203724452 - .long 1015726421 - .long 1709341917 - .long 1072851781 - .long 2571168217 - .long 1015201075 - .long 3790955393 - .long 1072858335 - .long 2352942462 - .long 3164228666 - .long 4112506593 - .long 1072864925 - .long 2947355221 - .long 1015419624 - .long 3504003472 - .long 1072871551 - .long 3594001060 - .long 3158379228 - .long 2799960843 - .long 1072878213 - .long 1423655381 - .long 1016070727 - .long 2839424854 - .long 1072884911 - .long 1171596163 - .long 1014090255 - .long 171030293 - .long 1072891646 - .long 3526460132 - .long 1015477354 - .long 4232894513 - .long 1072898416 - .long 2383938684 - .long 1015717095 - .long 2992903935 - .long 1072905224 - .long 2218154406 - .long 1016276769 - .long 1603444721 - .long 1072912069 - .long 1548633640 - .long 3163249902 - .long 926591435 - .long 1072918951 - .long 3208833762 - .long 3163962090 - .long 1829099622 - .long 1072925870 - .long 1016661181 - .long 3164509581 - .long 887463927 - .long 1072932827 - .long 3596744163 - .long 3161842742 - .long 3272845541 - .long 1072939821 - .long 928852419 - .long 3164536824 - .long 1276261410 - .long 1072946854 - .long 300981948 - .long 1015732745 - .long 78413852 - .long 1072953925 - .long 4183226867 - .long 3164065827 - .long 569847338 - .long 1072961034 - .long 472945272 - .long 3160339305 - .long 3645941911 - .long 1072968181 - .long 3814685081 - .long 3162621917 - .long 1617004845 - .long 1072975368 - .long 82804944 - .long 1011391354 - .long 3978100823 - .long 1072982593 - .long 3513027190 - .long 1016894539 - .long 3049340112 - .long 1072989858 - .long 3062915824 - .long 1014219171 - .long 4040676318 - .long 1072997162 - .long 4090609238 - .long 1016712034 - .long 3577096743 - .long 1073004506 - .long 2951496418 - .long 1014842263 - .long 2583551245 - .long 1073011890 - .long 3161094195 - .long 1016655067 - .long 1990012071 - .long 1073019314 - .long 3529070563 - .long 3163861769 - .long 2731501122 - .long 1073026778 - .long 1774031855 - .long 3163518597 - .long 1453150082 - .long 1073034283 - .long 498154669 - .long 3162536638 - .long 3395129871 - .long 1073041828 - .long 4025345435 - .long 3163383964 - .long 917841882 - .long 1073049415 - .long 18715565 - .long 1016707884 - .long 3566716925 - .long 1073057042 - .long 1536826856 - .long 1015191009 - .long 3712504873 - .long 1073064711 - .long 88491949 - .long 1016476236 - .long 2321106615 - .long 1073072422 - .long 2171176610 - .long 1010584347 - .long 363667784 - .long 1073080175 - .long 813753950 - .long 1016833785 - .long 3111574537 - .long 1073087969 - .long 2606161479 - .long 3163808322 - .long 2956612997 - .long 1073095806 - .long 2118169751 - .long 3163784129 - .long 885834528 - .long 1073103686 - .long 1973258547 - .long 3163310140 - .long 2186617381 - .long 1073111608 - .long 2270764084 - .long 3164321289 - .long 3561793907 - .long 1073119573 - .long 1157054053 - .long 1012938926 - .long 1719614413 - .long 1073127582 - .long 330458198 - .long 3164331316 - .long 1963711167 - .long 1073135634 - .long 1744767757 - .long 3161622870 - .long 1013258799 - .long 1073143730 - .long 1748797611 - .long 3161177658 - .long 4182873220 - .long 1073151869 - .long 629542646 - .long 3163044879 - .long 3907805044 - .long 1073160053 - .long 2257091225 - .long 3162598983 - .long 1218806132 - .long 1073168282 - .long 1818613052 - .long 3163597017 - .long 1447192521 - .long 1073176555 - .long 1462857171 - .long 3163563097 - .long 1339972927 - .long 1073184873 - .long 167908909 - .long 1016620728 - .long 1944781191 - .long 1073193236 - .long 3993278767 - .long 3162772855 - .long 19972402 - .long 1073201645 - .long 3507899862 - .long 1017057868 - .long 919555682 - .long 1073210099 - .long 3121969534 - .long 1013996802 - .long 1413356050 - .long 1073218599 - .long 1651349291 - .long 3163716742 - .long 2571947539 - .long 1073227145 - .long 3558159064 - .long 3164425245 - .long 1176749997 - .long 1073235738 - .long 2738998779 - .long 3163084420 - .long 2604962541 - .long 1073244377 - .long 2614425274 - .long 3164587768 - .long 3649726105 - .long 1073253063 - .long 4085036346 - .long 1016698050 - .long 1110089947 - .long 1073261797 - .long 1451641639 - .long 1016523249 - .long 380978316 - .long 1073270578 - .long 854188970 - .long 3161511262 - .long 2568320822 - .long 1073279406 - .long 2732824428 - .long 1015401491 - .long 194117574 - .long 1073288283 - .long 777528612 - .long 3164460665 - .long 2966275557 - .long 1073297207 - .long 2176155324 - .long 3160891335 - .long 3418903055 - .long 1073306180 - .long 2527457337 - .long 3161869180 - .long 2682146384 - .long 1073315202 - .long 2082178513 - .long 3164411995 - .long 1892288442 - .long 1073324273 - .long 2446255666 - .long 3163648957 - .long 2191782032 - .long 1073333393 - .long 2960257726 - .long 1014791238 - .long 434316067 - .long 1073342563 - .long 2028358766 - .long 1014506698 - .long 2069751141 - .long 1073351782 - .long 1562170675 - .long 3163773257 - .long 3964284211 - .long 1073361051 - .long 2111583915 - .long 1016475740 - .long 2990417245 - .long 1073370371 - .long 3683467745 - .long 3164417902 - .long 321958744 - .long 1073379742 - .long 3401933767 - .long 1016843134 - .long 1434058175 - .long 1073389163 - .long 251133233 - .long 1016134345 - .long 3218338682 - .long 1073398635 - .long 3404164304 - .long 3163525684 - .long 2572866477 - .long 1073408159 - .long 878562433 - .long 1016570317 - .long 697153126 - .long 1073417735 - .long 1283515429 - .long 3164331765 - .long 3092190715 - .long 1073427362 - .long 814012168 - .long 3160571998 - .long 2380618042 - .long 1073437042 - .long 3149557219 - .long 3164369375 - .long 4076559943 - .long 1073446774 - .long 2119478331 - .long 3161806927 - .long 815859274 - .long 1073456560 - .long 240396590 - .long 3164536019 - .long 2420883922 - .long 1073466398 - .long 2049810052 - .long 1015168464 - .long 1540824585 - .long 1073476290 - .long 1064017011 - .long 3164536266 - .long 3716502172 - .long 1073486235 - .long 2303740125 - .long 1015091301 - .long 1610600570 - .long 1073496235 - .long 3766732298 - .long 1016808759 - .long 777507147 - .long 1073506289 - .long 4282924205 - .long 1016236109 - .long 2483480501 - .long 1073516397 - .long 1216371780 - .long 1014082748 - .long 3706687593 - .long 1073526560 - .long 3521726940 - .long 1014301643 - .long 1432208378 - .long 1073536779 - .long 1401068914 - .long 3163412539 - .long 1242007932 - .long 1073547053 - .long 1132034716 - .long 3164388407 - .long 135105010 - .long 1073557383 - .long 1906148728 - .long 3164424315 - .long 3707479175 - .long 1073567768 - .long 3613079303 - .long 1015213314 - .long 382305176 - .long 1073578211 - .long 2347622376 - .long 3163627201 - .long 64696965 - .long 1073588710 - .long 1768797490 - .long 1016865536 - .long 4076975200 - .long 1073599265 - .long 2029000899 - .long 1016257111 - .long 863738719 - .long 1073609879 - .long 1326992220 - .long 3163661773 - .long 351641897 - .long 1073620550 - .long 2172261526 - .long 3164059175 - .long 3884662774 - .long 1073631278 - .long 2158611599 - .long 1015258761 - .long 4224142467 - .long 1073642065 - .long 3389820386 - .long 1016255778 - .long 2728693978 - .long 1073652911 - .long 396109971 - .long 3164511267 - .long 764307441 - .long 1073663816 - .long 3021057420 - .long 3164378099 - .long 3999357479 - .long 1073674779 - .long 2258941616 - .long 1016973300 - .long 929806999 - .long 1073685803 - .long 3205336643 - .long 1016308133 - .long 1533953344 - .long 1073696886 - .long 769171851 - .long 1016714209 - .long 2912730644 - .long 1073708029 - .long 3490067722 - .long 3164453650 - .long 2174652632 - .long 1073719233 - .long 4087714590 - .long 1015498835 - .long 730821105 - .long 1073730498 - .long 2523232743 - .long 1013115764 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 730821105 - .long 1072681922 - .long 2523232743 - .long 1012067188 - .long 2174652632 - .long 1072670657 - .long 4087714590 - .long 1014450259 - .long 2912730644 - .long 1072659453 - .long 3490067722 - .long 3163405074 - .long 1533953344 - .long 1072648310 - .long 769171851 - .long 1015665633 - .long 929806999 - .long 1072637227 - .long 3205336643 - .long 1015259557 - .long 3999357479 - .long 1072626203 - .long 2258941616 - .long 1015924724 - .long 764307441 - .long 1072615240 - .long 3021057420 - .long 3163329523 - .long 2728693978 - .long 1072604335 - .long 396109971 - .long 3163462691 - .long 4224142467 - .long 1072593489 - .long 3389820386 - .long 1015207202 - .long 3884662774 - .long 1072582702 - .long 2158611599 - .long 1014210185 - .long 351641897 - .long 1072571974 - .long 2172261526 - .long 3163010599 - .long 863738719 - .long 1072561303 - .long 1326992220 - .long 3162613197 - .long 4076975200 - .long 1072550689 - .long 2029000899 - .long 1015208535 - .long 64696965 - .long 1072540134 - .long 1768797490 - .long 1015816960 - .long 382305176 - .long 1072529635 - .long 2347622376 - .long 3162578625 - .long 3707479175 - .long 1072519192 - .long 3613079303 - .long 1014164738 - .long 135105010 - .long 1072508807 - .long 1906148728 - .long 3163375739 - .long 1242007932 - .long 1072498477 - .long 1132034716 - .long 3163339831 - .long 1432208378 - .long 1072488203 - .long 1401068914 - .long 3162363963 - .long 3706687593 - .long 1072477984 - .long 3521726940 - .long 1013253067 - .long 2483480501 - .long 1072467821 - .long 1216371780 - .long 1013034172 - .long 777507147 - .long 1072457713 - .long 4282924205 - .long 1015187533 - .long 1610600570 - .long 1072447659 - .long 3766732298 - .long 1015760183 - .long 3716502172 - .long 1072437659 - .long 2303740125 - .long 1014042725 - .long 1540824585 - .long 1072427714 - .long 1064017011 - .long 3163487690 - .long 2420883922 - .long 1072417822 - .long 2049810052 - .long 1014119888 - .long 815859274 - .long 1072407984 - .long 240396590 - .long 3163487443 - .long 4076559943 - .long 1072398198 - .long 2119478331 - .long 3160758351 - .long 2380618042 - .long 1072388466 - .long 3149557219 - .long 3163320799 - .long 3092190715 - .long 1072378786 - .long 814012168 - .long 3159523422 - .long 697153126 - .long 1072369159 - .long 1283515429 - .long 3163283189 - .long 2572866477 - .long 1072359583 - .long 878562433 - .long 1015521741 - .long 3218338682 - .long 1072350059 - .long 3404164304 - .long 3162477108 - .long 1434058175 - .long 1072340587 - .long 251133233 - .long 1015085769 - .long 321958744 - .long 1072331166 - .long 3401933767 - .long 1015794558 - .long 2990417245 - .long 1072321795 - .long 3683467745 - .long 3163369326 - .long 3964284211 - .long 1072312475 - .long 2111583915 - .long 1015427164 - .long 2069751141 - .long 1072303206 - .long 1562170675 - .long 3162724681 - .long 434316067 - .long 1072293987 - .long 2028358766 - .long 1013458122 - .long 2191782032 - .long 1072284817 - .long 2960257726 - .long 1013742662 - .long 1892288442 - .long 1072275697 - .long 2446255666 - .long 3162600381 - .long 2682146384 - .long 1072266626 - .long 2082178513 - .long 3163363419 - .long 3418903055 - .long 1072257604 - .long 2527457337 - .long 3160820604 - .long 2966275557 - .long 1072248631 - .long 2176155324 - .long 3159842759 - .long 194117574 - .long 1072239707 - .long 777528612 - .long 3163412089 - .long 2568320822 - .long 1072230830 - .long 2732824428 - .long 1014352915 - .long 380978316 - .long 1072222002 - .long 854188970 - .long 3160462686 - .long 1110089947 - .long 1072213221 - .long 1451641639 - .long 1015474673 - .long 3649726105 - .long 1072204487 - .long 4085036346 - .long 1015649474 - .long 2604962541 - .long 1072195801 - .long 2614425274 - .long 3163539192 - .long 1176749997 - .long 1072187162 - .long 2738998779 - .long 3162035844 - .long 2571947539 - .long 1072178569 - .long 3558159064 - .long 3163376669 - .long 1413356050 - .long 1072170023 - .long 1651349291 - .long 3162668166 - .long 919555682 - .long 1072161523 - .long 3121969534 - .long 1012948226 - .long 19972402 - .long 1072153069 - .long 3507899862 - .long 1016009292 - .long 1944781191 - .long 1072144660 - .long 3993278767 - .long 3161724279 - .long 1339972927 - .long 1072136297 - .long 167908909 - .long 1015572152 - .long 1447192521 - .long 1072127979 - .long 1462857171 - .long 3162514521 - .long 1218806132 - .long 1072119706 - .long 1818613052 - .long 3162548441 - .long 3907805044 - .long 1072111477 - .long 2257091225 - .long 3161550407 - .long 4182873220 - .long 1072103293 - .long 629542646 - .long 3161996303 - .long 1013258799 - .long 1072095154 - .long 1748797611 - .long 3160129082 - .long 1963711167 - .long 1072087058 - .long 1744767757 - .long 3160574294 - .long 1719614413 - .long 1072079006 - .long 330458198 - .long 3163282740 - .long 3561793907 - .long 1072070997 - .long 1157054053 - .long 1011890350 - .long 2186617381 - .long 1072063032 - .long 2270764084 - .long 3163272713 - .long 885834528 - .long 1072055110 - .long 1973258547 - .long 3162261564 - .long 2956612997 - .long 1072047230 - .long 2118169751 - .long 3162735553 - .long 3111574537 - .long 1072039393 - .long 2606161479 - .long 3162759746 - .long 363667784 - .long 1072031599 - .long 813753950 - .long 1015785209 - .long 2321106615 - .long 1072023846 - .long 2171176610 - .long 1009535771 - .long 3712504873 - .long 1072016135 - .long 88491949 - .long 1015427660 - .long 3566716925 - .long 1072008466 - .long 1536826856 - .long 1014142433 - .long 917841882 - .long 1072000839 - .long 18715565 - .long 1015659308 - .long 3395129871 - .long 1071993252 - .long 4025345435 - .long 3162335388 - .long 1453150082 - .long 1071985707 - .long 498154669 - .long 3161488062 - .long 2731501122 - .long 1071978202 - .long 1774031855 - .long 3162470021 - .long 1990012071 - .long 1071970738 - .long 3529070563 - .long 3162813193 - .long 2583551245 - .long 1071963314 - .long 3161094195 - .long 1015606491 - .long 3577096743 - .long 1071955930 - .long 2951496418 - .long 1013793687 - .long 4040676318 - .long 1071948586 - .long 4090609238 - .long 1015663458 - .long 3049340112 - .long 1071941282 - .long 3062915824 - .long 1013170595 - .long 3978100823 - .long 1071934017 - .long 3513027190 - .long 1015845963 - .long 1617004845 - .long 1071926792 - .long 82804944 - .long 1010342778 - .long 3645941911 - .long 1071919605 - .long 3814685081 - .long 3161573341 - .long 569847338 - .long 1071912458 - .long 472945272 - .long 3159290729 - .long 78413852 - .long 1071905349 - .long 4183226867 - .long 3163017251 - .long 1276261410 - .long 1071898278 - .long 300981948 - .long 1014684169 - .long 3272845541 - .long 1071891245 - .long 928852419 - .long 3163488248 - .long 887463927 - .long 1071884251 - .long 3596744163 - .long 3160794166 - .long 1829099622 - .long 1071877294 - .long 1016661181 - .long 3163461005 - .long 926591435 - .long 1071870375 - .long 3208833762 - .long 3162913514 - .long 1603444721 - .long 1071863493 - .long 1548633640 - .long 3162201326 - .long 2992903935 - .long 1071856648 - .long 2218154406 - .long 1015228193 - .long 4232894513 - .long 1071849840 - .long 2383938684 - .long 1014668519 - .long 171030293 - .long 1071843070 - .long 3526460132 - .long 1014428778 - .long 2839424854 - .long 1071836335 - .long 1171596163 - .long 1013041679 - .long 2799960843 - .long 1071829637 - .long 1423655381 - .long 1015022151 - .long 3504003472 - .long 1071822975 - .long 3594001060 - .long 3157330652 - .long 4112506593 - .long 1071816349 - .long 2947355221 - .long 1014371048 - .long 3790955393 - .long 1071809759 - .long 2352942462 - .long 3163180090 - .long 1709341917 - .long 1071803205 - .long 2571168217 - .long 1014152499 - .long 1337108031 - .long 1071796686 - .long 3203724452 - .long 1014677845 - .long 1853186616 - .long 1071790202 - .long 3066496371 - .long 1015656574 - .long 2440944790 - .long 1071783753 - .long 2492769774 - .long 1014147454 - .long 2288159958 - .long 1071777339 - .long 2169144469 - .long 1014876021 - .long 586995997 - .long 1071770960 - .long 41662348 - .long 3162627992 - .long 828946858 - .long 1071764615 - .long 10642492 - .long 1015939438 - .long 2214878420 - .long 1071758304 - .long 892270087 - .long 3163116422 - .long 3949972341 - .long 1071752027 - .long 2068408548 - .long 1014913868 - .long 948735466 - .long 1071745785 - .long 3516338028 - .long 3162574883 - .long 1014845819 - .long 1071739576 - .long 3117910646 - .long 3161559105 - .long 3366293073 - .long 1071733400 - .long 3119426314 - .long 1014120554 - .long 2930322912 - .long 1071727258 - .long 2599499422 - .long 3162714047 - .long 3228316108 - .long 1071721149 - .long 3010241991 - .long 3158422804 - .long 3490863953 - .long 1071715073 - .long 960797498 - .long 3162948880 - .long 2952712987 - .long 1071709030 - .long 3293494651 - .long 3160120301 - .long 852742562 - .long 1071703020 - .long 667253586 - .long 1009793559 - .long 728909815 - .long 1071697042 - .long 383930225 - .long 1015029468 - .long 1828292879 - .long 1071691096 - .long 1255956747 - .long 1015588398 - .long 3402036099 - .long 1071685182 - .long 405889334 - .long 1015105656 - .long 410360776 - .long 1071679301 - .long 1269990655 - .long 1011975870 - .long 702412510 - .long 1071673451 - .long 3803266087 - .long 3162280415 - .long 3541402996 - .long 1071667632 - .long 2759177317 - .long 1014854626 - .long 3899555717 - .long 1071661845 - .long 427280750 - .long 3162546972 - .long 1048019041 - .long 1071656090 - .long 1398474845 - .long 3160510595 - .long 2851812149 - .long 1071650365 - .long 2595802551 - .long 1015767337 - .long 0 - .long 1127743488 - .long 0 - .long 3275227136 - .long 3607404736 - .long 1044146952 - .long 3607404736 - .long 3191630600 - .long 4277811695 - .long 1063661122 - .long 4277811695 - .long 3211144770 - .long 2140175755 - .long 1033864261 - .long 2140175755 - .long 1033864261 - .long 4289495988 - .long 1054113747 - .long 4289495988 - .long 1054113747 - .long 4277811695 - .long 1064709698 - .long 4277811695 - .long 3212193346 - .long 1610612736 - .long 1080497479 - .long 4166901572 - .long 1053077003 - .long 329805064 - .long 1038488134 - .long 2773927730 - .long 1053236707 - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1069897045 - .long 1744127201 - .long 1046144581 - .long 436314137 - .long 1059717536 - .long 3078135644 - .long 1049787983 - .long 381774870 - .long 1062650220 - .long 436314137 - .long 1056571808 - .long 1431655765 - .long 1067799893 - .long 1835802424 - .long 1042411711 - .long 1431655765 - .long 1067799893 - .long 0 - .long 4294967280 - .long 0 - .long 4294967280 - .long 4160749568 - .long 2147483647 - .long 4160749568 - .long 2147483647 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .type static_const_table,@object - .size static_const_table,4368 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhcoshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhcoshl.S deleted file mode 100644 index 3bfad5c3f1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhcoshl.S +++ /dev/null @@ -1,1273 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinhcoshl.c" - .text -..TXTST0: -# -- Begin sinhcoshl - .text - .align 16,0x90 - .globl sinhcoshl -sinhcoshl: -# parameter 1: 8 + %ebp -# parameter 2: 20 + %ebp -# parameter 3: 24 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $100, %esp - movl 20(%ebp), %esi - movl 24(%ebp), %ebx -..B1.2: - fnstcw 62(%esp) -..B1.3: - movzwl 16(%ebp), %edx - andl $32767, %edx - movl 12(%ebp), %edi - movl %edx, %eax - movl %edi, (%esp) - shll $16, %eax - shrl $16, %edi - movzbl 17(%ebp), %ecx - orl %edi, %eax - andl $128, %ecx - shrl $7, %ecx - cmpl $1073992020, %eax - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - jae ..B1.53 -..B1.4: - movzwl 62(%esp), %edi - cmpl $16382, %edx - movl %edi, (%esp) - jge ..B1.46 -..B1.5: - cmpl $16378, %edx - jge ..B1.39 -..B1.6: - cmpl $16372, %edx - jge ..B1.32 -..B1.7: - cmpl $16365, %edx - jge ..B1.25 -..B1.8: - cmpl $16308, %edx - jge ..B1.18 -..B1.9: - andl $768, %edi - cmpl $768, %edi - je ..B1.76 -..B1.10: - movl (%esp), %edx - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.11: - fldcw 60(%esp) -..B1.12: - movzbl 17(%ebp), %ecx - movl $1, %edi - andl $128, %ecx - movzwl 16(%ebp), %edx - shrl $7, %ecx - andl $32767, %edx -..B1.13: - testl %edx, %edx - jle ..B1.72 -..B1.14: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%eax) - fmul %st(1), %st - fadd %st(1), %st - fmull 8+_TWO_75@GOTOFF(%eax) - fstpt (%esp) -..B1.15: - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - testl %edi, %edi - fxch %st(1) - fmull ones@GOTOFF(%eax,%ecx,8) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.17 -..B1.16: - fldcw 62(%esp) -..B1.17: - fldt (%esp) - fstpt (%esi) - fldt 16(%esp) - fstpt (%ebx) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - movl %edi, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.77 -..B1.19: - movl %edi, %edx - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.20: - fldcw 60(%esp) -..B1.21: - movl $1, %edx -..B1.22: - fldt 8(%ebp) - testl %edx, %edx - fld %st(0) - fmul %st(1), %st - fldt _PS3@GOTOFF(%eax) - fmul %st(1), %st - fmul %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fldt _PC3@GOTOFF(%eax) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.24 -..B1.23: - fldcw 62(%esp) -..B1.24: - fldt (%esp) - fstpt (%esi) - fldt 16(%esp) - fstpt (%ebx) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %edi, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.78 -..B1.26: - movl %edi, %edx - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.27: - fldcw 60(%esp) -..B1.28: - movl $1, %edx -..B1.29: - fldt 8(%ebp) - testl %edx, %edx - fld %st(0) - fmul %st(1), %st - fldt 12+_PS2@GOTOFF(%eax) - fmul %st(1), %st - fldt _PS2@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fmul %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fldt 12+_PC2@GOTOFF(%eax) - fmul %st(1), %st - fldt _PC2@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.31 -..B1.30: - fldcw 62(%esp) -..B1.31: - fldt (%esp) - fstpt (%esi) - fldt 16(%esp) - fstpt (%ebx) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - movl %edi, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.79 -..B1.33: - movl %edi, %edx - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.34: - fldcw 60(%esp) -..B1.35: - movl $1, %edx -..B1.36: - fldt 8(%ebp) - testl %edx, %edx - fld %st(0) - fmul %st(1), %st - fldt 36+_PS1@GOTOFF(%eax) - fmul %st(1), %st - fldt 24+_PS1@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_PS1@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt _PS1@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fmul %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - fldt 36+_PC1@GOTOFF(%eax) - fmul %st(1), %st - fldt 24+_PC1@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_PC1@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt _PC1@GOTOFF(%eax) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - faddp %st, %st(1) - fstpt (%esp) - je ..B1.38 -..B1.37: - fldcw 62(%esp) -..B1.38: - fldt 16(%esp) - fstpt (%esi) - fldt (%esp) - fstpt (%ebx) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - movl %edi, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.80 -..B1.40: - movl %edi, %edx - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.41: - fldcw 60(%esp) -..B1.42: - movl $1, %edx -..B1.43: - fldl _TWO_48H@GOTOFF(%eax) - testl %edx, %edx - fld %st(0) - fldt 8(%ebp) - fld %st(0) - fmul %st(1), %st - fstpt 48(%esp) - fldt 48(%esp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 32(%esp) - fldt 32(%esp) - fld %st(2) - fsub %st(1), %st - fldt 84+_PS@GOTOFF(%eax) - fmul %st(3), %st - fldt 72+_PS@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(3), %st - fldt 60+_PS@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_PS@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PS@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_PS@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(3), %st - fldt 12+_PS@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_PC@GOTOFF(%eax) - fmul %st(4), %st - fldt 72+_PC@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(4), %st - fldt 60+_PC@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(4), %st - fldt 48+_PC@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(4), %st - fldt 36+_PC@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(4), %st - fldt 24+_PC@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(4), %st - fldt 12+_PC@GOTOFF(%eax) - faddp %st, %st(1) - fmul %st(4), %st - fstpt 64(%esp) - fld %st(4) - fmul %st(2), %st - fldt _PS@GOTOFF(%eax) - faddp %st, %st(2) - fxch %st(4) - fmulp %st, %st(1) - fld %st(2) - fmul %st(2), %st - faddp %st, %st(4) - fld %st(2) - fmul %st(3), %st - fldt 96+_PS@GOTOFF(%eax) - fld %st(0) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(6) - fld %st(2) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(6) - fxch %st(5) - faddp %st, %st(2) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%esp) - fldt 108+_PC@GOTOFF(%eax) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st(4), %st - fldt 64(%esp) - faddp %st, %st(2) - fld %st(3) - fmul %st(1), %st - fxch %st(1) - fmul %st(5), %st - fldt 48(%esp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%esp) - fld %st(0) - fldt 96+_PC@GOTOFF(%eax) - fmul %st, %st(6) - fxch %st(3) - faddp %st, %st(6) - fxch %st(2) - fmulp %st, %st(6) - fldt 80(%esp) - fadd %st, %st(2) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fld %st(2) - fadd %st(1), %st - fldl _TWO_48H@GOTOFF(%eax) - fadd %st, %st(1) - fsubr %st(1), %st - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - je ..B1.90 -..B1.44: - fstpt 80(%esp) -..B1.89: - fldcw 62(%esp) - jmp ..B1.45 -..B1.90: - fstp %st(0) -..B1.45: - fldt (%esp) - fstpt (%esi) - fldt 16(%esp) - fstpt (%ebx) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - movl %edi, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.81 -..B1.47: - movl %edi, %edx - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.48: - fldcw 60(%esp) -..B1.49: - movzbl 17(%ebp), %ecx - movl $1, %edi - andl $128, %ecx - shrl $7, %ecx -..B1.50: - fldl ones@GOTOFF(%eax,%ecx,8) - fstpt 32(%esp) - fldt 32(%esp) - fldt 8(%ebp) - fmulp %st, %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_63H@GOTOFF(%eax) - fldt .L_2il0floatpacket.0@GOTOFF(%eax) - fmul %st(2), %st - movl %ebx, 44(%esp) - fadd %st(1), %st - fstpt 80(%esp) - fldt 80(%esp) - fsubp %st, %st(1) - fldt .L_2il0floatpacket.1@GOTOFF(%eax) - fmul %st(1), %st - movl 80(%esp), %edx - fsubrp %st, %st(2) - fld %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%eax) - fmulp %st, %st(2) - movsbl %dl, %ebx - fsub %st(1), %st - fldl _TWO_32P@GOTOFF(%eax) - subl %ebx, %edx - fmul %st(1), %st - fxch %st(1) - fmull _TWO_32@GOTOFF(%eax) - shll $4, %ebx - fsubrp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - shrl $8, %edx - fxch %st(2) - fsubrp %st, %st(3) - movl %edx, %ecx - negl %edx - shll $23, %ecx - fadd %st(2), %st - fld %st(0) - addl $1056964608, %ecx - fmul %st(1), %st - fldt 48+_PE@GOTOFF(%eax) - fmul %st(1), %st - fldt 36+_PE@GOTOFF(%eax) - fmul %st(2), %st - fldt 24+_PE@GOTOFF(%eax) - shll $23, %edx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - addl $1056964608, %edx - fldt 12+_PE@GOTOFF(%eax) - movl %ecx, 12(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - movl %edx, 28(%esp) - fxch %st(2) - faddp %st, %st(4) - fld %st(3) - fldt _PE@GOTOFF(%eax) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - fadd %st, %st(1) - fsubp %st, %st(3) - fldl 2056+__libm_expl_table_256@GOTOFF(%eax,%ebx) - fldl 2048+__libm_expl_table_256@GOTOFF(%eax,%ebx) - negl %ebx - fstpt 48(%esp) - fldt 48(%esp) - testl %edi, %edi - fadd %st(1), %st - fmulp %st, %st(2) - fld %st(0) - fmul %st(3), %st - faddp %st, %st(2) - fldl 2056+__libm_expl_table_256@GOTOFF(%eax,%ebx) - fld %st(0) - fmul %st(4), %st - fldl 2048+__libm_expl_table_256@GOTOFF(%eax,%ebx) - fld %st(0) - movl 44(%esp), %ebx - fadd %st(3), %st - fmulp %st, %st(7) - fxch %st(1) - fsubrp %st, %st(6) - fxch %st(5) - fstpt 64(%esp) - fldt 48(%esp) - fld %st(0) - fmul %st(5), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - fmul %st(4), %st - fld %st(4) - fsub %st(1), %st - fsubr %st, %st(5) - fxch %st(1) - fsubrp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fldt 64(%esp) - faddp %st, %st(3) - flds 12(%esp) - fmul %st, %st(2) - fld %st(2) - fxch %st(2) - fmulp %st, %st(1) - flds 28(%esp) - fmul %st, %st(5) - fld %st(5) - fadd %st(4), %st - fxch %st(5) - fmulp %st, %st(1) - fxch %st(2) - fsub %st(5), %st - fld %st(0) - fsubr %st(4), %st - fsub %st(6), %st - fld %st(2) - fsub %st(4), %st - faddp %st, %st(1) - fxch %st(4) - fsub %st(5), %st - faddp %st, %st(6) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fldt 32(%esp) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.52 -..B1.51: - fldcw 62(%esp) -..B1.52: - fldt 16(%esp) - fstpt (%esi) - fldt (%esp) - fstpt (%ebx) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.53: - cmpl $16396, %edx - jge ..B1.61 -..B1.54: - movzwl 62(%esp), %edi - movl %edi, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.82 -..B1.55: - orl $-64768, %edi - movw %di, 60(%esp) -..B1.56: - fldcw 60(%esp) -..B1.57: - movzbl 17(%ebp), %ecx - movl $1, %edi - andl $128, %ecx - shrl $7, %ecx -..B1.58: - fldl ones@GOTOFF(%eax,%ecx,8) - fstpt 48(%esp) - fldt 48(%esp) - fldt 8(%ebp) - fmulp %st, %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt .L_2il0floatpacket.3@GOTOFF(%eax) - fstpt (%esp) - fldl _TWO_63H@GOTOFF(%eax) - fldt .L_2il0floatpacket.0@GOTOFF(%eax) - fmul %st(2), %st - movl %ebx, 44(%esp) - fadd %st(1), %st - fstpt 80(%esp) - fldt 80(%esp) - fsubp %st, %st(1) - fldt .L_2il0floatpacket.1@GOTOFF(%eax) - fmul %st(1), %st - movl 80(%esp), %edx - fsubrp %st, %st(2) - fld %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%eax) - fmulp %st, %st(2) - movsbl %dl, %ebx - fsub %st(1), %st - fldl _TWO_32@GOTOFF(%eax) - subl %ebx, %edx - fldl _TWO_32P@GOTOFF(%eax) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - shll $4, %ebx - fxch %st(2) - fsubrp %st, %st(1) - shrl $8, %edx - fsubr %st, %st(3) - addl $16350, %edx - fxch %st(2) - fsubrp %st, %st(3) - fld %st(1) - andl $32767, %edx - movzwl 8+.L_2il0floatpacket.3@GOTOFF(%eax), %ecx - fadd %st(3), %st - fld %st(0) - andl $-32768, %ecx - fmul %st(1), %st - orl %edx, %ecx - fldt 48+_PE@GOTOFF(%eax) - testl %edi, %edi - fmul %st(1), %st - fldt 36+_PE@GOTOFF(%eax) - fmul %st(2), %st - fldt 24+_PE@GOTOFF(%eax) - movw %cx, 8(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_PE@GOTOFF(%eax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(5) - fldt _PE@GOTOFF(%eax) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl 2048+__libm_expl_table_256@GOTOFF(%eax,%ebx) - fld %st(0) - fmul %st(4), %st - fxch %st(3) - fadd %st, %st(4) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(4) - fmull 2056+__libm_expl_table_256@GOTOFF(%eax,%ebx) - faddp %st, %st(3) - fldt (%esp) - fmul %st, %st(4) - fxch %st(2) - fmul %st, %st(4) - fxch %st(1) - faddl 2056+__libm_expl_table_256@GOTOFF(%eax,%ebx) - movl 44(%esp), %ebx - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - fldt 48(%esp) - fld %st(0) - fmul %st(3), %st - fxch %st(2) - fadd %st, %st(3) - fxch %st(3) - fstpt 16(%esp) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 32(%esp) - je ..B1.60 -..B1.59: - fldcw 62(%esp) -..B1.60: - fldt 32(%esp) - fstpt (%esi) - fldt 16(%esp) - fstpt (%ebx) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.61: - je ..B1.84 -..B1.62: - movzwl 62(%esp), %edi - movl %edi, (%esp) - andl $768, %edi - cmpl $768, %edi - je ..B1.83 -..B1.63: - movl (%esp), %edx - orl $-64768, %edx - movw %dx, 60(%esp) -..B1.64: - fldcw 60(%esp) -..B1.65: - movzbl 17(%ebp), %ecx - movl $1, %edi - andl $128, %ecx - movzwl 16(%ebp), %edx - shrl $7, %ecx - andl $32767, %edx -..B1.66: - cmpl $32767, %edx - jne ..B1.68 -..B1.67: - fldt 8(%ebp) - fstpt 16(%esp) - fldt 16(%esp) - fldl ones@GOTOFF(%eax,%ecx,8) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.69 -..B1.68: - fldt _large_value_80@GOTOFF(%eax) - lea (,%ecx,8), %edx - lea (%edx,%ecx,4), %ecx - fldt _large_value_80@GOTOFF(%eax,%ecx) - fmul %st(1), %st - fstpt 16(%esp) - fmul %st(0), %st - fstpt (%esp) -..B1.69: - testl %edi, %edi - je ..B1.71 -..B1.70: - fldcw 62(%esp) -..B1.71: - fldt 16(%esp) - fstpt (%esi) - fldt (%esp) - fstpt (%ebx) - addl $100, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.72: - cmpl $0, 12(%ebp) - jne ..B1.74 -..B1.73: - cmpl $0, 8(%ebp) - je ..B1.75 -..B1.74: - fldt _small_value_80@GOTOFF(%eax) - lea (,%ecx,8), %edx - fldt 8(%ebp) - lea (%edx,%ecx,4), %edx - fldt _small_value_80@GOTOFF(%eax,%edx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%esp) - fldt 80(%esp) - fadd %st(1), %st - fstpt (%esp) - jmp ..B1.15 -..B1.75: - fldt 8(%ebp) - fstpt (%esp) - fldt (%esp) - jmp ..B1.15 -..B1.76: - xorl %edi, %edi - jmp ..B1.13 -..B1.77: - xorl %edx, %edx - jmp ..B1.22 -..B1.78: - xorl %edx, %edx - jmp ..B1.29 -..B1.79: - xorl %edx, %edx - jmp ..B1.36 -..B1.80: - xorl %edx, %edx - jmp ..B1.43 -..B1.81: - xorl %edi, %edi - jmp ..B1.50 -..B1.82: - xorl %edi, %edi - jmp ..B1.58 -..B1.83: - xorl %edi, %edi - jmp ..B1.66 -..B1.84: - cmpl $-1317741120, (%esp) - jb ..B1.54 -..B1.85: - jne ..B1.62 -..B1.86: - cmpl $833536233, 8(%ebp) - jbe ..B1.54 - jmp ..B1.62 - .align 16,0x90 - .type sinhcoshl,@function - .size sinhcoshl,.-sinhcoshl - .data -# -- End sinhcoshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 2 -_PS3: - .word 21845 - .word 44373 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _PS3,@object - .size _PS3,12 - .align 2 -_PC3: - .word 21845 - .word 213 - .word 0 - .word 32768 - .word 16382 - .word 0 - .type _PC3,@object - .size _PC3,12 - .align 2 -_PS2: - .word 29491 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 1838 - .word 3745 - .word 35050 - .word 34952 - .word 16376 - .word 0 - .type _PS2,@object - .size _PS2,24 - .align 2 -_PC2: - .word 62430 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 22894 - .word 21845 - .word 43733 - .word 43690 - .word 16378 - .word 0 - .type _PC2,@object - .size _PC2,24 - .align 2 -_PS1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 56472 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 6470 - .word 8609 - .word 207 - .word 53261 - .word 16370 - .word 0 - .word 51515 - .word 9159 - .word 10794 - .word 47344 - .word 16364 - .word 0 - .type _PS1,@object - .size _PS1,48 - .align 2 -_PC1: - .word 65531 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 7054 - .word 43693 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 25016 - .word 58228 - .word 24755 - .word 46603 - .word 16373 - .word 0 - .word 57397 - .word 35800 - .word 53031 - .word 53262 - .word 16367 - .word 0 - .type _PC1,@object - .size _PC1,48 - .align 2 -_PS: - .word 43620 - .word 43690 - .word 43690 - .word 43690 - .word 16364 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 52382 - .word 3328 - .word 208 - .word 53261 - .word 16370 - .word 0 - .word 44665 - .word 46658 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 15678 - .word 35942 - .word 11071 - .word 55090 - .word 16357 - .word 0 - .word 10412 - .word 23121 - .word 12507 - .word 45202 - .word 16350 - .word 0 - .word 37213 - .word 41879 - .word 65084 - .word 55102 - .word 16342 - .word 0 - .word 1721 - .word 42148 - .word 19309 - .word 52099 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16380 - .word 0 - .type _PS,@object - .size _PS,108 - .align 2 -_PC: - .word 18360 - .word 43637 - .word 28980 - .word 40373 - .word 49076 - .word 0 - .word 16302 - .word 43691 - .word 43690 - .word 43690 - .word 16362 - .word 0 - .word 46125 - .word 2912 - .word 24758 - .word 46603 - .word 16373 - .word 0 - .word 29965 - .word 3335 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 54950 - .word 46751 - .word 32187 - .word 37874 - .word 16361 - .word 0 - .word 30733 - .word 25775 - .word 51110 - .word 36726 - .word 16354 - .word 0 - .word 49850 - .word 450 - .word 9929 - .word 51659 - .word 16346 - .word 0 - .word 2776 - .word 45191 - .word 37201 - .word 55334 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16378 - .word 0 - .type _PC,@object - .size _PC,120 - .align 2 -_PE: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _PE,@object - .size _PE,60 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhf_wmt.S deleted file mode 100644 index e415ba11e6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhf_wmt.S +++ /dev/null @@ -1,422 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinhf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin sinhf - .text - .align 16,0x90 - .globl sinhf -sinhf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - movsd 608(%ebx), %xmm3 - movsd 576(%ebx), %xmm6 - movd %xmm0, %ecx - movl $-2147483648, %edx - psllq $33, %xmm0 - psrlq $4, %xmm0 - movapd 512(%ebx), %xmm4 - andl %ecx, %edx - andl $2147418112, %ecx - subl $1052246016, %ecx - cmpl $67633152, %ecx - jae .L_2TAG_PACKET_0.0.3 - mulsd %xmm0, %xmm3 - movapd %xmm3, %xmm2 - addsd %xmm6, %xmm3 - xorpd %xmm0, %xmm0 - movd %xmm3, %eax - subsd %xmm6, %xmm3 - movapd 528(%ebx), %xmm1 - xorpd %xmm5, %xmm5 - subsd %xmm3, %xmm2 - shrl $16, %edx - orl $16352, %edx - cmpl $59244544, %ecx - jae .L_2TAG_PACKET_1.0.3 - movl $31, %ecx - andl %eax, %ecx - shrl $1, %eax - addl %ecx, %ecx - andl $65520, %eax - addl %edx, %eax - pinsrw $3, %eax, %xmm0 - movl $32704, %edx - subl %eax, %edx - movapd 544(%ebx), %xmm3 - movapd (%ebx,%ecx,8), %xmm7 - pinsrw $3, %edx, %xmm5 - pshufd $68, %xmm2, %xmm2 - shufpd $0, %xmm5, %xmm0 - movapd 560(%ebx), %xmm6 - mulpd %xmm2, %xmm4 - mulpd %xmm2, %xmm1 - mulpd %xmm2, %xmm3 - mulpd %xmm7, %xmm0 - mulpd %xmm2, %xmm4 - addpd %xmm1, %xmm6 - mulpd %xmm0, %xmm3 - addpd %xmm6, %xmm4 - mulpd %xmm3, %xmm4 - addpd %xmm4, %xmm0 - pshufd $78, %xmm0, %xmm4 - subpd %xmm4, %xmm0 - cvtsd2ss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_0.0.3: - addl $1052246016, %ecx - cmpl $1052246016, %ecx - ja .L_2TAG_PACKET_3.0.3 - cmpl $956301312, %ecx - jae .L_2TAG_PACKET_4.0.3 - cmpl $8388608, %ecx - jae .L_2TAG_PACKET_5.0.3 - movss 112(%esp), %xmm0 - mulss %xmm0, %xmm0 -.L_2TAG_PACKET_5.0.3: - movss 112(%esp), %xmm0 - movl $1283457024, %eax - movd %eax, %xmm1 - movl $847249408, %ecx - movd %ecx, %xmm2 - mulss %xmm0, %xmm1 - addss %xmm1, %xmm0 - mulss %xmm2, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_1.0.3: - movl $31, %ecx - andl %eax, %ecx - shrl $1, %eax - addl %ecx, %ecx - andl $65520, %eax - addl %edx, %eax - pinsrw $3, %eax, %xmm0 - movsd 544(%ebx), %xmm3 - pshufd $68, %xmm2, %xmm2 - mulsd (%ebx,%ecx,8), %xmm0 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm1, %xmm4 - mulsd %xmm2, %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm3, %xmm4 - mulsd %xmm0, %xmm4 - addsd %xmm4, %xmm0 - cvtsd2ss %xmm0, %xmm0 - pextrw $1, %xmm0, %eax - andl $32640, %eax - movl $128, %edx - cmpl $32640, %eax - je .L_2TAG_PACKET_6.0.3 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_4.0.3: - psrlq $29, %xmm0 - movss 592(%ebx), %xmm7 - movss %xmm0, %xmm5 - mulss %xmm0, %xmm0 - movss 596(%ebx), %xmm2 - movss %xmm0, %xmm1 - mulss %xmm0, %xmm7 - movl $1042983595, %eax - movd %eax, %xmm3 - mulss %xmm0, %xmm0 - addss %xmm2, %xmm7 - movd %edx, %xmm4 - mulss %xmm3, %xmm1 - mulss %xmm7, %xmm0 - addss %xmm1, %xmm0 - orps %xmm4, %xmm5 - mulss %xmm5, %xmm0 - addss %xmm5, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_3.0.3: - cmpl $2139095040, %ecx - jae .L_2TAG_PACKET_7.0.3 - movl $2130706432, %eax - movd %eax, %xmm0 - orl %edx, %eax - movd %eax, %xmm1 - mulss %xmm1, %xmm0 - movl $128, %edx -.L_2TAG_PACKET_6.0.3: - movss %xmm0, (%esp) - movss 112(%esp), %xmm0 - subl $32, %esp - lea 112(%esp), %eax - movl %eax, (%esp) - lea 112(%esp), %eax - movl %eax, 4(%esp) - lea 32(%esp), %eax - movl %eax, 8(%esp) - movl %edx, %eax - movl %eax, 12(%esp) - call __libm_error_support - addl $32, %esp - flds (%esp) - jmp .L_2TAG_PACKET_8.0.3 -.L_2TAG_PACKET_7.0.3: - movss 112(%esp), %xmm0 - movss %xmm0, %xmm1 - pslld $1, %xmm0 - psrld $1, %xmm0 - mulss %xmm1, %xmm0 - jmp .L_2TAG_PACKET_2.0.3 -.L_2TAG_PACKET_2.0.3: - movss %xmm0, 24(%esp) - flds 24(%esp) -.L_2TAG_PACKET_8.0.3: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type sinhf,@function - .size sinhf,.-sinhf - .data -# -- End sinhf - .text -# -- Begin __libm_error_support - .text - .align 16,0x90 -__libm_error_support: -# parameter 1: 4 + %esp -# parameter 2: 8 + %esp -# parameter 3: 12 + %esp -# parameter 4: 16 + %esp -..B3.1: -..L4: - - ret - .align 16,0x90 - .type __libm_error_support,@function - .size __libm_error_support,.-__libm_error_support - .data -# -- End __libm_error_support - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 3541402996 - .long 1072716208 - .long 1533953344 - .long 1072648310 - .long 1828292879 - .long 1072739672 - .long 2728693978 - .long 1072604335 - .long 3490863953 - .long 1072763649 - .long 863738719 - .long 1072561303 - .long 1014845819 - .long 1072788152 - .long 3707479175 - .long 1072519192 - .long 828946858 - .long 1072813191 - .long 3706687593 - .long 1072477984 - .long 1853186616 - .long 1072838778 - .long 3716502172 - .long 1072437659 - .long 4112506593 - .long 1072864925 - .long 4076559943 - .long 1072398198 - .long 171030293 - .long 1072891646 - .long 2572866477 - .long 1072359583 - .long 926591435 - .long 1072918951 - .long 2990417245 - .long 1072321795 - .long 1276261410 - .long 1072946854 - .long 2191782032 - .long 1072284817 - .long 1617004845 - .long 1072975368 - .long 2966275557 - .long 1072248631 - .long 3577096743 - .long 1073004506 - .long 1110089947 - .long 1072213221 - .long 1453150082 - .long 1073034283 - .long 2571947539 - .long 1072178569 - .long 3712504873 - .long 1073064711 - .long 1944781191 - .long 1072144660 - .long 2956612997 - .long 1073095806 - .long 3907805044 - .long 1072111477 - .long 1719614413 - .long 1073127582 - .long 1719614413 - .long 1072079006 - .long 3907805044 - .long 1073160053 - .long 2956612997 - .long 1072047230 - .long 1944781191 - .long 1073193236 - .long 3712504873 - .long 1072016135 - .long 2571947539 - .long 1073227145 - .long 1453150082 - .long 1071985707 - .long 1110089947 - .long 1073261797 - .long 3577096743 - .long 1071955930 - .long 2966275557 - .long 1073297207 - .long 1617004845 - .long 1071926792 - .long 2191782032 - .long 1073333393 - .long 1276261410 - .long 1071898278 - .long 2990417245 - .long 1073370371 - .long 926591435 - .long 1071870375 - .long 2572866477 - .long 1073408159 - .long 171030293 - .long 1071843070 - .long 4076559943 - .long 1073446774 - .long 4112506593 - .long 1071816349 - .long 3716502172 - .long 1073486235 - .long 1853186616 - .long 1071790202 - .long 3706687593 - .long 1073526560 - .long 828946858 - .long 1071764615 - .long 3707479175 - .long 1073567768 - .long 1014845819 - .long 1071739576 - .long 863738719 - .long 1073609879 - .long 3490863953 - .long 1071715073 - .long 2728693978 - .long 1073652911 - .long 1828292879 - .long 1071691096 - .long 1533953344 - .long 1073696886 - .long 3541402996 - .long 1071667632 - .long 4289495988 - .long 1058308051 - .long 4289495988 - .long 1058308051 - .long 4277811695 - .long 1065758274 - .long 4277811695 - .long 3213241922 - .long 4277811695 - .long 1066806850 - .long 4277811695 - .long 3214290498 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 1127743488 - .long 0 - .long 3275227136 - .long 961547521 - .long 1007192201 - .long 1042983595 - .long 0 - .long 1697350398 - .long 2017924423 - .type static_const_table,@object - .size static_const_table,616 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhl.S deleted file mode 100644 index 7726807ca0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinhl.S +++ /dev/null @@ -1,1005 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinhl.c" - .text -..TXTST0: -# -- Begin sinhl - .text - .align 16,0x90 - .globl sinhl -sinhl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $84, %esp -..B1.2: - fnstcw 46(%esp) -..B1.3: - movzwl 16(%ebp), %ecx - andl $32767, %ecx - movl 12(%ebp), %esi - movl %ecx, %edx - movl %esi, %eax - shll $16, %edx - shrl $16, %eax - movzbl 17(%ebp), %ebx - orl %eax, %edx - andl $128, %ebx - shrl $7, %ebx - cmpl $1073992020, %edx - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - jae ..B1.53 -..B1.4: - movzwl 46(%esp), %eax - cmpl $16382, %ecx - jge ..B1.46 -..B1.5: - cmpl $16378, %ecx - jge ..B1.39 -..B1.6: - cmpl $16373, %ecx - jge ..B1.32 -..B1.7: - cmpl $16366, %ecx - jge ..B1.25 -..B1.8: - cmpl $16308, %ecx - jge ..B1.18 -..B1.9: - movl %eax, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.76 -..B1.10: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.11: - fldcw 44(%esp) -..B1.12: - movzwl 16(%ebp), %ecx - movl $1, %esi - andl $32767, %ecx -..B1.13: - testl %ecx, %ecx - jle ..B1.72 -..B1.14: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%edx) - fmul %st(1), %st - faddp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%edx) - fstpt 16(%esp) -..B1.15: - testl %esi, %esi - je ..B1.17 -..B1.16: - fldcw 46(%esp) -..B1.17: - fldt 16(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.77 -..B1.19: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.20: - fldcw 44(%esp) -..B1.21: - movl $1, %eax -..B1.22: - fldt 8(%ebp) - testl %eax, %eax - fldt _Q3@GOTOFF(%edx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.24 -..B1.23: - fldcw 46(%esp) -..B1.24: - fldt 16(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.78 -..B1.26: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.27: - fldcw 44(%esp) -..B1.28: - movl $1, %eax -..B1.29: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_Q2@GOTOFF(%edx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.31 -..B1.30: - fldcw 46(%esp) -..B1.31: - fldt 16(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.79 -..B1.33: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.34: - fldcw 44(%esp) -..B1.35: - movl $1, %eax -..B1.36: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%edx) - fmul %st(1), %st - fldt 12+_Q1@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%edx) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.38 -..B1.37: - fldcw 46(%esp) -..B1.38: - fldt 16(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.80 -..B1.40: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.41: - fldcw 44(%esp) -..B1.42: - movzbl 17(%ebp), %ebx - movl $1, %eax - andl $128, %ebx - shrl $7, %ebx -..B1.43: - fldl ones@GOTOFF(%edx,%ebx,8) - testl %eax, %eax - fstl 48(%esp) - fldt 8(%ebp) - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_48H@GOTOFF(%edx) - fld %st(0) - fadd %st(2), %st - fstpt 32(%esp) - fldt 32(%esp) - fsubp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fldt 84+_Q@GOTOFF(%edx) - fmul %st(5), %st - fldt 72+_Q@GOTOFF(%edx) - fmul %st(6), %st - fldt 60+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(6), %st - fldt 48+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(6), %st - fldt 36+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(6), %st - fldt 24+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(6), %st - fldt 12+_Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(6) - fld %st(2) - fmul %st(3), %st - fldt _Q@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fld %st(1) - fmul %st(1), %st - fld %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fldt 96+_Q@GOTOFF(%edx) - fmul %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(5) - fxch %st(4) - fmulp %st, %st(2) - fld %st(3) - fmul %st(3), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldl 48(%esp) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.45 -..B1.44: - fldt 32(%esp) - fstpt 60(%esp) -..B1.89: - fldcw 46(%esp) -..B1.45: - fldt 16(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.81 -..B1.47: - orl $-64768, %eax - movw %ax, 44(%esp) -..B1.48: - fldcw 44(%esp) -..B1.49: - movzbl 17(%ebp), %ebx - movl $1, %edi - andl $128, %ebx - shrl $7, %ebx -..B1.50: - fldt 8(%ebp) - fmull ones@GOTOFF(%edx,%ebx,8) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_63H@GOTOFF(%edx) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(2), %st - fadd %st(1), %st - fstpt 60(%esp) - fldt 60(%esp) - fsubp %st, %st(1) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmul %st(1), %st - movl 60(%esp), %eax - fsubrp %st, %st(2) - fld %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fmulp %st, %st(2) - movsbl %al, %esi - fsub %st(1), %st - fldl _TWO_32P@GOTOFF(%edx) - subl %esi, %eax - fmul %st(1), %st - fxch %st(1) - fmull _TWO_32@GOTOFF(%edx) - shll $4, %esi - fsubrp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - shrl $8, %eax - fxch %st(2) - fsubrp %st, %st(3) - movl %eax, %ecx - negl %eax - shll $23, %ecx - fadd %st(2), %st - fld %st(0) - addl $1056964608, %ecx - fmul %st(1), %st - fldt 48+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - shll $23, %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - addl $1056964608, %eax - fldt 12+_P@GOTOFF(%edx) - movl %ecx, 12(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - movl %eax, 28(%esp) - fxch %st(2) - faddp %st, %st(4) - fldt _P@GOTOFF(%edx) - faddp %st, %st(2) - fmulp %st, %st(1) - fld %st(2) - fadd %st(1), %st - fxch %st(3) - fsubrp %st, %st(1) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%esi) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%esi) - negl %esi - fstpt 32(%esp) - fldt 32(%esp) - testl %edi, %edi - fadd %st(1), %st - fmulp %st, %st(4) - fld %st(0) - fmul %st(3), %st - faddp %st, %st(4) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%esi) - fld %st(0) - fmul %st(4), %st - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%esi) - fld %st(0) - fadd %st(3), %st - fmulp %st, %st(5) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(3) - fstpt 48(%esp) - fldt 32(%esp) - fld %st(0) - fmul %st(5), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(5) - faddp %st, %st(2) - fxch %st(2) - fmul %st, %st(3) - fld %st(0) - fsub %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - fsubrp %st, %st(1) - faddp %st, %st(2) - fldt 48(%esp) - faddp %st, %st(2) - flds 12(%esp) - fmull ones@GOTOFF(%edx,%ebx,8) - fmul %st, %st(4) - fld %st(4) - fxch %st(1) - fmul %st, %st(2) - flds 28(%esp) - fmull ones@GOTOFF(%edx,%ebx,8) - fmul %st, %st(5) - fxch %st(2) - fsub %st(5), %st - fsubr %st, %st(6) - fxch %st(5) - fsubrp %st, %st(6) - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - je ..B1.91 -..B1.51: - fstps 28(%esp) - fstps 12(%esp) -..B1.90: - fldcw 46(%esp) - jmp ..B1.52 -..B1.91: - fstp %st(0) - fstp %st(0) -..B1.52: - fldt 16(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.53: - cmpl $16396, %ecx - jge ..B1.61 -..B1.54: - movzwl 46(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.82 -..B1.55: - orl $-64768, %ecx - movw %cx, 44(%esp) -..B1.56: - fldcw 44(%esp) -..B1.57: - movzbl 17(%ebp), %ebx - movl $1, %esi - andl $128, %ebx - shrl $7, %ebx -..B1.58: - fldl ones@GOTOFF(%edx,%ebx,8) - fstpt 16(%esp) - fldt 16(%esp) - fldt 8(%ebp) - fmulp %st, %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldl _TWO_63H@GOTOFF(%edx) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fmul %st(2), %st - movzwl 24(%esp), %ecx - fadd %st(1), %st - fstpt 60(%esp) - fldt 60(%esp) - andl $-32768, %ecx - movl 60(%esp), %eax - fsubp %st, %st(1) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fmul %st(1), %st - movsbl %al, %ebx - fsubrp %st, %st(2) - fld %st(1) - subl %ebx, %eax - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fmulp %st, %st(2) - shll $4, %ebx - fsub %st(1), %st - fldl _TWO_32@GOTOFF(%edx) - fldl _TWO_32P@GOTOFF(%edx) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - shrl $8, %eax - fxch %st(2) - fsubrp %st, %st(1) - fld %st(0) - addl $16350, %eax - andl $32767, %eax - fxch %st(1) - fsubr %st, %st(4) - orl %eax, %ecx - fxch %st(3) - fsubrp %st, %st(4) - movw %cx, 24(%esp) - testl %esi, %esi - fadd %st(3), %st - fld %st(0) - fmul %st(1), %st - fldt 48+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(5) - fldt _P@GOTOFF(%edx) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%ebx) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%ebx) - fld %st(0) - fmul %st(5), %st - fxch %st(4) - fadd %st, %st(5) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fldt 16(%esp) - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 32(%esp) - je ..B1.60 -..B1.59: - fldcw 46(%esp) -..B1.60: - fldt 32(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.61: - je ..B1.84 -..B1.62: - movzwl 46(%esp), %ebx - movl %ebx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.83 -..B1.63: - orl $-64768, %ebx - movw %bx, 44(%esp) -..B1.64: - fldcw 44(%esp) -..B1.65: - movzwl 16(%ebp), %ecx - movl $1, %esi - andl $32767, %ecx -..B1.66: - cmpl $32767, %ecx - jne ..B1.68 -..B1.67: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.69 -..B1.68: - fldt _large_value_80@GOTOFF(%edx) - movzbl 17(%ebp), %ecx - andl $128, %ecx - shrl $7, %ecx - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %ebx - fldt _large_value_80@GOTOFF(%edx,%ebx) - fmulp %st, %st(1) - fstpt 16(%esp) -..B1.69: - testl %esi, %esi - je ..B1.71 -..B1.70: - fldcw 46(%esp) -..B1.71: - fldt 16(%esp) - addl $84, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.72: - cmpl $0, 12(%ebp) - jne ..B1.74 -..B1.73: - cmpl $0, 8(%ebp) - je ..B1.75 -..B1.74: - fldt _small_value_80@GOTOFF(%edx) - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%edx) - fmul %st(1), %st - movzbl 17(%ebp), %ecx - faddp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%edx) - andl $128, %ecx - shrl $7, %ecx - fstpt 16(%esp) - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %ebx - fldt _small_value_80@GOTOFF(%edx,%ebx) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.15 -..B1.75: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.15 -..B1.76: - xorl %esi, %esi - jmp ..B1.13 -..B1.77: - xorl %eax, %eax - jmp ..B1.22 -..B1.78: - xorl %eax, %eax - jmp ..B1.29 -..B1.79: - xorl %eax, %eax - jmp ..B1.36 -..B1.80: - xorl %eax, %eax - jmp ..B1.43 -..B1.81: - xorl %edi, %edi - jmp ..B1.50 -..B1.82: - xorl %esi, %esi - jmp ..B1.58 -..B1.83: - xorl %esi, %esi - jmp ..B1.66 -..B1.84: - cmpl $-1317741120, %esi - jb ..B1.54 -..B1.85: - jne ..B1.62 -..B1.86: - cmpl $833536233, 8(%ebp) - jbe ..B1.54 - jmp ..B1.62 - .align 16,0x90 - .type sinhl,@function - .size sinhl,.-sinhl - .data -# -- End sinhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 2 -_Q3: - .word 21845 - .word 44373 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 29491 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 1838 - .word 3745 - .word 35050 - .word 34952 - .word 16376 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 56472 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 6470 - .word 8609 - .word 207 - .word 53261 - .word 16370 - .word 0 - .word 51515 - .word 9159 - .word 10794 - .word 47344 - .word 16364 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 43620 - .word 43690 - .word 43690 - .word 43690 - .word 16364 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 52382 - .word 3328 - .word 208 - .word 53261 - .word 16370 - .word 0 - .word 44665 - .word 46658 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 15678 - .word 35942 - .word 11071 - .word 55090 - .word 16357 - .word 0 - .word 10412 - .word 23121 - .word 12507 - .word 45202 - .word 16350 - .word 0 - .word 37213 - .word 41879 - .word 65084 - .word 55102 - .word 16342 - .word 0 - .word 1721 - .word 42148 - .word 19309 - .word 52099 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16380 - .word 0 - .type _Q,@object - .size _Q,108 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _P,@object - .size _P,60 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinl.S deleted file mode 100644 index 62c48998f9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sinl.S +++ /dev/null @@ -1,1038 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinl.c" - .text -..TXTST0: -# -- Begin sinl - .text - .align 16,0x90 - .globl sinl -sinl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $180, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 152(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - movzwl 14(%esp), %edx - cmpl $16378, %eax - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jge ..B1.41 -..B1.4: - cmpl $16372, %eax - jge ..B1.33 -..B1.5: - cmpl $16364, %eax - jge ..B1.25 -..B1.6: - cmpl $16308, %eax - jge ..B1.17 -..B1.7: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.75 -..B1.8: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - movzwl 16(%ebp), %eax - movl $1, %esi - andl $32767, %eax -..B1.11: - testl %eax, %eax - jle ..B1.71 -..B1.12: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ebx) - fmul %st(1), %st - fsubp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ebx) - fstpt 16(%esp) -..B1.13: - testl %esi, %esi - je ..B1.15 -..B1.14: - fldcw 14(%esp) -..B1.15: - movl 152(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.16: - fldt 16(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.77 -..B1.18: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.19: - fldcw 12(%esp) -..B1.20: - movl $1, %eax -..B1.21: - fldt 8(%ebp) - testl %eax, %eax - fldt _SP3@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.23 -..B1.22: - fldcw 14(%esp) -..B1.23: - movl 152(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.24: - fldt 16(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.79 -..B1.26: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.27: - fldcw 12(%esp) -..B1.28: - movl $1, %eax -..B1.29: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_SP2@GOTOFF(%ebx) - fmul %st(1), %st - fldt _SP2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.31 -..B1.30: - fldcw 14(%esp) -..B1.31: - movl 152(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.32: - fldt 16(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.33: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.81 -..B1.34: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.35: - fldcw 12(%esp) -..B1.36: - movl $1, %eax -..B1.37: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_SP1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_SP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_SP1@GOTOFF(%ebx) - fmulp %st, %st(2) - fldt _SP1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.39 -..B1.38: - fldcw 14(%esp) -..B1.39: - movl 152(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.40: - fldt 16(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - movl %edx, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.84 -..B1.42: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.43: - fldcw 12(%esp) -..B1.44: - movzwl 16(%ebp), %eax - movl $1, %edi - andl $32767, %eax -..B1.45: - movzbl 17(%ebp), %esi - andl $128, %esi - shrl $7, %esi - cmpl $16413, %eax - jge ..B1.52 -..B1.46: - fldt 8(%ebp) - fldl _Pi4Inv@GOTOFF(%ebx) - fxch %st(1) - fmull _ones@GOTOFF(%ebx,%esi,8) - fmul %st, %st(1) - fxch %st(1) - fstpt 24(%esp) - movzwl 32(%esp), %ecx - andl $32767, %ecx - cmpl $16383, %ecx - jge ..B1.48 -..B1.47: - fldl _TWO_52H@GOTOFF(%ebx) - movl $1, %edx - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(1) - fsub %st(1), %st - fxch %st(2) - fxch %st(1) - fxch %st(2) - jmp ..B1.63 -..B1.48: - fldl _TWO_32H@GOTOFF(%ebx) - negl %ecx - addl $30, %ecx - movl 28(%esp), %edx - shrl %cl, %edx - incl %edx - movl %edx, %ecx - andl $-2, %ecx - movl %ecx, 16(%esp) - cmpl $16400, %eax - fildl 16(%esp) - jge ..B1.50 -..B1.49: - fldl _Pi04x3@GOTOFF(%ebx) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_Pi04x3@GOTOFF(%ebx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_Pi04x3@GOTOFF(%ebx) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - jmp ..B1.51 -..B1.50: - fldl _Pi04x5@GOTOFF(%ebx) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_Pi04x5@GOTOFF(%ebx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_Pi04x5@GOTOFF(%ebx) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl 24+_Pi04x5@GOTOFF(%ebx) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl 32+_Pi04x5@GOTOFF(%ebx) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) -..B1.51: - fldl _TWO_52H@GOTOFF(%ebx) - movl %edx, %eax - fmul %st(1), %st - fld %st(1) - shrl $2, %eax - fadd %st(1), %st - xorl %eax, %esi - fsubp %st, %st(1) - andl $1, %esi - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fxch %st(1) - fxch %st(2) - jmp ..B1.63 -..B1.52: - cmpl $32767, %eax - jne ..B1.61 -..B1.53: - cmpl $-2147483648, 12(%ebp) - jne ..B1.56 -..B1.54: - cmpl $0, 8(%ebp) - jne ..B1.56 -..B1.55: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - fstpt 16(%esp) - jmp ..B1.57 -..B1.56: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ebx) - fstpt 16(%esp) -..B1.57: - testl %edi, %edi - je ..B1.59 -..B1.58: - fldcw 14(%esp) -..B1.59: - movl 152(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.60: - fldt 16(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.61: - fldt 8(%ebp) - addl $-32, %esp - fmull _ones@GOTOFF(%ebx,%esi,8) - lea 168(%esp), %eax - fstpt (%esp) - movl $0, 12(%esp) - movl %eax, 16(%esp) - call __libm_reduce_pi04l -..B1.87: - movl %eax, %edx - addl $32, %esp -..B1.62: - fldl 136(%esp) - incl %edx - fldl _TWO_52H@GOTOFF(%ebx) - movl %edx, %eax - fmul %st(1), %st - fld %st(0) - shrl $2, %eax - fadd %st(2), %st - xorl %eax, %esi - fsubp %st, %st(1) - fld %st(0) - andl $1, %esi - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddl 144(%esp) - fadd %st, %st(1) -..B1.63: - fld %st(2) - testb $2, %dl - fmul %st(1), %st - fld %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fstpt 56(%esp) - fldt 56(%esp) - fld %st(3) - fmul %st(4), %st - fld %st(0) - fadd %st(2), %st - fstpt 72(%esp) - fldt 72(%esp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 88(%esp) - fldt 88(%esp) - fxch %st(1) - fstpt 104(%esp) - fldt 104(%esp) - fmul %st(0), %st - fld %st(0) - faddp %st, %st(2) - fldl _TWO_53H@GOTOFF(%ebx) - fstpt 40(%esp) - fldl _ones@GOTOFF(%ebx,%esi,8) - fstpl 16(%esp) - je ..B1.65 -..B1.64: - fstp %st(2) - fstp %st(2) - fstp %st(2) - fldt 96+_CP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 84+_CP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 72+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_CP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt _CP@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 72(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 88(%esp) - fldt 56(%esp) - fldt 104(%esp) - fldt 40(%esp) - fldt 120+_CP@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fmulp %st, %st(5) - fldt 108+_CP@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(5) - fld %st(4) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fadd %st(2), %st - fmul %st, %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldl _ones@GOTOFF(%ebx) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(2) - fxch %st(1) - fadd %st, %st(2) - fldl 16(%esp) - fmul %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 120(%esp) - jmp ..B1.66 -..B1.65: - fldt 96+_SP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 84+_SP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 72+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 36+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 24+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 12+_SP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt _SP@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 72(%esp) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 88(%esp) - fldt 120+_SP@GOTOFF(%ebx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - fldt 108+_SP@GOTOFF(%ebx) - fldt 56(%esp) - fmul %st(1), %st - faddp %st, %st(3) - fldt 104(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fld %st(3) - fldt 40(%esp) - fmul %st(2), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fldl 16(%esp) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 120(%esp) -..B1.66: - testl %edi, %edi - je ..B1.89 -..B1.67: - fstpt 24(%esp) -..B1.88: - fldcw 14(%esp) - jmp ..B1.68 -..B1.89: - fstp %st(0) -..B1.68: - movl 152(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.70 -..B1.69: - fldt 120(%esp) - addl $180, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.70: - call __stack_chk_fail@PLT -..B1.71: - cmpl $0, 12(%ebp) - jne ..B1.73 -..B1.72: - cmpl $0, 8(%ebp) - je ..B1.74 -..B1.73: - fldt _small_value_80@GOTOFF(%ebx) - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ebx) - fmul %st(1), %st - movzbl 17(%ebp), %edx - fsubp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ebx) - andl $128, %edx - shrl $7, %edx - fstpt 16(%esp) - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _small_value_80@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.13 -..B1.74: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.13 -..B1.75: - xorl %esi, %esi - jmp ..B1.11 -..B1.77: - xorl %eax, %eax - jmp ..B1.21 -..B1.79: - xorl %eax, %eax - jmp ..B1.29 -..B1.81: - xorl %eax, %eax - jmp ..B1.37 -..B1.84: - xorl %edi, %edi - jmp ..B1.45 - .align 16,0x90 - .type sinl,@function - .size sinl,.-sinl - .data -# -- End sinl - .section .rodata, "a" - .align 16 - .align 16 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 16 -_SP3: - .word 17476 - .word 43656 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .type _SP3,@object - .size _SP3,12 - .space 4, 0x00 # pad - .align 16 -_SP2: - .word 43210 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 1587 - .word 57422 - .word 34932 - .word 34952 - .word 16376 - .word 0 - .type _SP2,@object - .size _SP2,24 - .space 8, 0x00 # pad - .align 16 -_SP1: - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 12518 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 43088 - .word 7396 - .word 207 - .word 53261 - .word 49138 - .word 0 - .word 55827 - .word 48618 - .word 3602 - .word 47342 - .word 16364 - .word 0 - .type _SP1,@object - .size _SP1,48 - .align 16 -_Pi4Inv: - .long 1841940611 - .long 1072979760 - .type _Pi4Inv,@object - .size _Pi4Inv,8 - .space 8, 0x00 # pad - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .space 8, 0x00 # pad - .align 16 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .space 8, 0x00 # pad - .align 16 -_Pi04x3: - .long 1413754112 - .long 1072243195 - .long 2563527040 - .long 1021855384 - .long 3417685868 - .long 3118450936 - .type _Pi04x3,@object - .size _Pi04x3,24 - .space 8, 0x00 # pad - .align 16 -_Pi04x5: - .long 1413480448 - .long 1072243195 - .long 442499072 - .long 1036039265 - .long 771751936 - .long 999496074 - .long 622854144 - .long 963347354 - .long 1396597664 - .long 922906692 - .type _Pi04x5,@object - .size _Pi04x5,40 - .space 8, 0x00 # pad - .align 16 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 16 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 16 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .space 8, 0x00 # pad - .align 16 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .type _CP,@object - .size _CP,132 - .space 12, 0x00 # pad - .align 16 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .type _SP,@object - .size _SP,132 - .space 12, 0x00 # pad - .align 16 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_reduce_pi04l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrt_tab_t.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrt_tab_t.S deleted file mode 100644 index 7fb5162aff..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrt_tab_t.S +++ /dev/null @@ -1,816 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sqrt_tab_t.c" - .section .rodata, "a" - .align 32 - .align 32 - .hidden __sqrt_t_table - .globl __sqrt_t_table -__sqrt_t_table: - .long 0x400672f9 - .long 0xc060f4f5 - .long 0xba659415,0x40052c06 - .long 0x4003de5a - .long 0xc05e5b2f - .long 0xfe66c797,0x4005170e - .long 0x40015b59 - .long 0xc05bce24 - .long 0x13b32f30,0x40050255 - .long 0x3ffdd2b8 - .long 0xc0594d7e - .long 0xdae79d26,0x4004edd7 - .long 0x3ff90fa1 - .long 0xc056d8e8 - .long 0x13220f7f,0x4004d996 - .long 0x3ff46c51 - .long 0xc0547012 - .long 0xb3fa6a49,0x4004c58e - .long 0x3fefe7bb - .long 0xc05212ae - .long 0xa20bcbc6,0x4004b1c0 - .long 0x3feb80db - .long 0xc04fc070 - .long 0xc76937e4,0x40049e2a - .long 0x3fe736b7 - .long 0xc04d790f - .long 0x1f93d776,0x40048acc - .long 0x3fe30860 - .long 0xc04b3c44 - .long 0xa15ae4b0,0x400477a3 - .long 0x3fdef4f0 - .long 0xc04909cc - .long 0x697f4726,0x400464b0 - .long 0x3fdafb8a - .long 0xc046e163 - .long 0x6403b289,0x400451f1 - .long 0x3fd71b59 - .long 0xc044c2ca - .long 0xb7aecc11,0x40043f65 - .long 0x3fd35392 - .long 0xc042adc3 - .long 0x76dd1156,0x40042d0c - .long 0x3fcfa371 - .long 0xc040a213 - .long 0xd01983f9,0x40041ae4 - .long 0x3fcc0a37 - .long 0xc03e9f7d - .long 0xbecf4a2b,0x400408ed - .long 0x3fc88730 - .long 0xc03ca5ca - .long 0x7b0eeed7,0x4003f726 - .long 0x3fc519ad - .long 0xc03ab4c5 - .long 0x50846ea3,0x4003e58e - .long 0x3fc1c105 - .long 0xc038cc36 - .long 0x3decb5a1,0x4003d424 - .long 0x3fbe7c97 - .long 0xc036ebed - .long 0xb2048812,0x4003c2e7 - .long 0x3fbb4bc6 - .long 0xc03513b5 - .long 0xb29c9700,0x4003b1d7 - .long 0x3fb82dfc - .long 0xc0334360 - .long 0xa89c0a0a,0x4003a0f3 - .long 0x3fb522a8 - .long 0xc0317abe - .long 0xc440fe15,0x4003903a - .long 0x3fb2293e - .long 0xc02fb9a2 - .long 0x596206ff,0x40037fac - .long 0x3faf4138 - .long 0xc02dffe0 - .long 0xb44972f3,0x40036f47 - .long 0x3fac6a14 - .long 0xc02c4d4c - .long 0x1107001d,0x40035f0c - .long 0x3fa9a354 - .long 0xc02aa1be - .long 0xe7c62025,0x40034ef8 - .long 0x3fa6ec80 - .long 0xc028fd0d - .long 0x815ec2da,0x40033f0d - .long 0x3fa44523 - .long 0xc0275f11 - .long 0x2e0b0c0e,0x40032f49 - .long 0x3fa1accc - .long 0xc025c7a5 - .long 0x66b9f8b6,0x40031fab - .long 0x3f9f230f - .long 0xc02436a3 - .long 0x788665c8,0x40031033 - .long 0x3f9ca783 - .long 0xc022abe8 - .long 0xded1e594,0x400300e0 - .long 0x3f9a39c2 - .long 0xc0212751 - .long 0x0842a075,0x4002f1b3 - .long 0x3f97d96b - .long 0xc01fa8bb - .long 0x494fbc25,0x4002e2a9 - .long 0x3f95861f - .long 0xc01e3006 - .long 0x2b018f07,0x4002d3c3 - .long 0x3f933f82 - .long 0xc01cbd11 - .long 0x142c8510,0x4002c500 - .long 0x3f91053c - .long 0xc01b4fbd - .long 0x7f1daa26,0x4002b65f - .long 0x3f8ed6f7 - .long 0xc019e7eb - .long 0xdda5e7e2,0x4002a7e0 - .long 0x3f8cb461 - .long 0xc018857f - .long 0xc9948908,0x40029983 - .long 0x3f8a9d2a - .long 0xc017285b - .long 0xaa59eeeb,0x40028b47 - .long 0x3f889104 - .long 0xc015d062 - .long 0xf2821162,0x40027d2b - .long 0x3f868fa5 - .long 0xc0147d7c - .long 0x669445ed,0x40026f30 - .long 0x3f8498c3 - .long 0xc0132f8a - .long 0x3b85fad8,0x40026154 - .long 0x3f82ac1a - .long 0xc011e676 - .long 0x3e988364,0x40025397 - .long 0x3f80c964 - .long 0xc010a224 - .long 0xcf7601fc,0x400245f8 - .long 0x3f7de0c1 - .long 0xc00f627e - .long 0xaab7acb5,0x40023878 - .long 0x3f7a419f - .long 0xc00e276a - .long 0x36aab17c,0x40022b16 - .long 0x3f76b4e6 - .long 0xc00cf0d1 - .long 0x0f2aa54c,0x40021dd1 - .long 0x3f733a1e - .long 0xc00bbe9d - .long 0xdacdcc1a,0x400210a8 - .long 0x3f6fd0d4 - .long 0xc00a90b8 - .long 0x30e54b08,0x4002039d - .long 0x3f6c7897 - .long 0xc009670b - .long 0x8e05e1b3,0x4001f6ad - .long 0x3f6930fa - .long 0xc0084182 - .long 0xa51b1d74,0x4001e9d9 - .long 0x3f65f994 - .long 0xc0072009 - .long 0x1cf6297b,0x4001dd21 - .long 0x3f62d1fe - .long 0xc006028b - .long 0x8103f9e2,0x4001d083 - .long 0x3f5fb9d5 - .long 0xc004e8f5 - .long 0x7cc51dba,0x4001c400 - .long 0x3f5cb0b7 - .long 0xc003d333 - .long 0xa3e7f161,0x4001b797 - .long 0x3f59b649 - .long 0xc002c134 - .long 0xb4f86544,0x4001ab48 - .long 0x3f56ca2e - .long 0xc001b2e5 - .long 0x4bc09f7e,0x40019f13 - .long 0x3f53ec0f - .long 0xc000a834 - .long 0x04a8d6a9,0x400192f7 - .long 0x3f511b96 - .long 0xbfff4221 - .long 0x9d5a7e63,0x400186f3 - .long 0x3f4e5870 - .long 0xbffd3ad2 - .long 0xb211c804,0x40017b08 - .long 0x3f4ba24c - .long 0xbffb3a5b - .long 0xfc173425,0x40016f35 - .long 0x3f48f8dc - .long 0xbff9409b - .long 0x1e599490,0x4001637b - .long 0x3f465bd5 - .long 0xbff74d73 - .long 0xc880b659,0x400157d7 - .long 0x3f43caeb - .long 0xbff560c5 - .long 0xbd156bcf,0x40014c4b - .long 0x3f4145d7 - .long 0xbff37a71 - .long 0x9283ab1d,0x400140d6 - .long 0x3f3ecc53 - .long 0xbff19a5c - .long 0x19073c6b,0x40013578 - .long 0x3f3c5e1c - .long 0xbfefc069 - .long 0xfd4a0663,0x40012a2f - .long 0x3f39faef - .long 0xbfedec7b - .long 0xede7b908,0x40011efd - .long 0x3f37a28c - .long 0xbfec1e78 - .long 0xb252b4d7,0x400113e1 - .long 0x3f3554b6 - .long 0xbfea5645 - .long 0xf9904832,0x400108da - .long 0x3f33112e - .long 0xbfe893c7 - .long 0x7e150822,0x4000fde9 - .long 0x3f30d7ba - .long 0xbfe6d6e5 - .long 0xfd1a5086,0x4000f30c - .long 0x3f2ea821 - .long 0xbfe51f87 - .long 0x3d632fc4,0x4000e845 - .long 0x3f2c822c - .long 0xbfe36d94 - .long 0xf11c7d33,0x4000dd91 - .long 0x3f2a65a2 - .long 0xbfe1c0f3 - .long 0xd61ea754,0x4000d2f2 - .long 0x3f285250 - .long 0xbfe0198f - .long 0xc0d51627,0x4000c867 - .long 0x3f264803 - .long 0xbfde7750 - .long 0x61244ec6,0x4000bdf0 - .long 0x3f244687 - .long 0xbfdcda1f - .long 0x7a6b2e99,0x4000b38c - .long 0x3f224dad - .long 0xbfdb41e7 - .long 0xd19f4764,0x4000a93b - .long 0x3f205d44 - .long 0xbfd9ae92 - .long 0x2ad2e77d,0x40009efe - .long 0x3f1e751f - .long 0xbfd8200d - .long 0x5dbcaf97,0x400094d3 - .long 0x3f1c9510 - .long 0xbfd69641 - .long 0x14b04d5e,0x40008abb - .long 0x3f1abcec - .long 0xbfd5111c - .long 0x2cda2e67,0x400080b5 - .long 0x3f18ec88 - .long 0xbfd3908a - .long 0x6ab42acc,0x400076c1 - .long 0x3f1723ba - .long 0xbfd21477 - .long 0x8e9d45e3,0x40006cdf - .long 0x3f156259 - .long 0xbfd09cd0 - .long 0x62171386,0x4000630f - .long 0x3f13a83e - .long 0xbfcf2984 - .long 0xbfb6fb6a,0x40005950 - .long 0x3f11f542 - .long 0xbfcdba80 - .long 0x68a7e5f7,0x40004fa3 - .long 0x3f104940 - .long 0xbfcc4fb3 - .long 0x2ef38d27,0x40004607 - .long 0x3f0ea414 - .long 0xbfcae90c - .long 0xe03435f5,0x40003c7b - .long 0x3f0d0598 - .long 0xbfc98678 - .long 0x3b99fee4,0x40003301 - .long 0x3f0b6dab - .long 0xbfc827e9 - .long 0x28d4ef26,0x40002997 - .long 0x3f09dc2b - .long 0xbfc6cd4e - .long 0x6d906b03,0x4000203d - .long 0x3f0850f6 - .long 0xbfc57696 - .long 0xd0880103,0x400016f3 - .long 0x3f06cbec - .long 0xbfc423b3 - .long 0x37509185,0x40000dba - .long 0x3f054cee - .long 0xbfc2d495 - .long 0x66ce8c53,0x40000490 - .long 0x3f03d3dc - .long 0xbfc1892d - .long 0x72279bc0,0x3ffff6ec - .long 0x3f026099 - .long 0xbfc0416c - .long 0xeda5cd81,0x3fffe4d6 - .long 0x3f00f308 - .long 0xbfbefd45 - .long 0x0c012834,0x3fffd2e0 - .long 0x3eff1616 - .long 0xbfbdbca8 - .long 0x52f75b3b,0x3fffc107 - .long 0x3efc510e - .long 0xbfbc7f88 - .long 0x799a7f94,0x3fffaf4c - .long 0x3ef996c2 - .long 0xbfbb45d9 - .long 0x55edcc30,0x3fff9daf - .long 0x3ef6e6fb - .long 0xbfba0f8b - .long 0x537eb099,0x3fff8c2f - .long 0x3ef44186 - .long 0xbfb8dc92 - .long 0x38cd722f,0x3fff7acc - .long 0x3ef1a631 - .long 0xbfb7ace2 - .long 0xc800858f,0x3fff6985 - .long 0x3eef14c9 - .long 0xbfb6806e - .long 0xaed5086e,0x3fff585b - .long 0x3eec8d1e - .long 0xbfb55729 - .long 0x88bfcc7e,0x3fff474d - .long 0x3eea0f02 - .long 0xbfb43109 - .long 0x3db0d3c5,0x3fff365b - .long 0x3ee79a45 - .long 0xbfb30e00 - .long 0x4f3507e4,0x3fff2584 - .long 0x3ee52ebb - .long 0xbfb1ee03 - .long 0x7dab64e4,0x3fff14c8 - .long 0x3ee2cc37 - .long 0xbfb0d107 - .long 0x9247f5f1,0x3fff0427 - .long 0x3ee0728f - .long 0xbfafb700 - .long 0x252987ab,0x3ffef3a1 - .long 0x3ede2198 - .long 0xbfae9fe4 - .long 0x12fb7286,0x3ffee335 - .long 0x3edbd929 - .long 0xbfad8ba8 - .long 0x0e1fbfd6,0x3ffed2e3 - .long 0x3ed9991a - .long 0xbfac7a41 - .long 0xc33c7a14,0x3ffec2aa - .long 0x3ed76144 - .long 0xbfab6ba5 - .long 0xf7968902,0x3ffeb28b - .long 0x3ed53180 - .long 0xbfaa5fca - .long 0x72271f31,0x3ffea286 - .long 0x3ed309a8 - .long 0xbfa956a6 - .long 0xf446dfa2,0x3ffe9299 - .long 0x3ed0e998 - .long 0xbfa8502f - .long 0x31fc7113,0x3ffe82c6 - .long 0x3eced12c - .long 0xbfa74c5a - .long 0xc17a77a1,0x3ffe730a - .long 0x3eccc040 - .long 0xbfa64b20 - .long 0xb683d568,0x3ffe6367 - .long 0x3ecab6b3 - .long 0xbfa54c76 - .long 0x93851ebf,0x3ffe53dc - .long 0x3ec8b462 - .long 0xbfa45054 - .long 0x48e8d2d8,0x3ffe4469 - .long 0x3ec6b92d - .long 0xbfa356b0 - .long 0x72ed724b,0x3ffe350d - .long 0x3ec4c4f3 - .long 0xbfa25f82 - .long 0xf5acec61,0x3ffe25c8 - .long 0x3ec2d795 - .long 0xbfa16ac0 - .long 0x67c5c2c3,0x3ffe169b - .long 0x3ec0f0f5 - .long 0xbfa07864 - .long 0xd8265439,0x3ffe0784 - .long 0x3fbe23c8 - .long 0xc01f118b - .long 0x1ec5a532,0x3ffdf113 - .long 0x3fba7d85 - .long 0xc01d3ac5 - .long 0x0000d4c8,0x3ffdd36c - .long 0x3fb6f02d - .long 0xc01b6d00 - .long 0x57cb9031,0x3ffdb61c - .long 0x3fb37ae5 - .long 0xc019a7fe - .long 0x72ed1c77,0x3ffd9922 - .long 0x3fb01cdd - .long 0xc017eb83 - .long 0x95b0b15c,0x3ffd7c7c - .long 0x3facd54f - .long 0xc0163758 - .long 0x6603fec1,0x3ffd6029 - .long 0x3fa9a37b - .long 0xc0148b45 - .long 0x469777ae,0x3ffd4427 - .long 0x3fa686a9 - .long 0xc012e714 - .long 0xa71adcce,0x3ffd2874 - .long 0x3fa37e28 - .long 0xc0114a91 - .long 0x0c38599d,0x3ffd0d10 - .long 0x3fa08950 - .long 0xc00fb58a - .long 0xfc8f14cb,0x3ffcf1f7 - .long 0x3f9da77d - .long 0xc00e27d0 - .long 0x5027d5b6,0x3ffcd72b - .long 0x3f9ad814 - .long 0xc00ca133 - .long 0x77f69e05,0x3ffcbca8 - .long 0x3f981a7f - .long 0xc00b2187 - .long 0x4e14c785,0x3ffca26e - .long 0x3f956e2d - .long 0xc009a89f - .long 0x67cdb787,0x3ffc887b - .long 0x3f92d292 - .long 0xc0083650 - .long 0x7d1a45e5,0x3ffc6ece - .long 0x3f90472b - .long 0xc006ca73 - .long 0x887296e4,0x3ffc5566 - .long 0x3f8dcb76 - .long 0xc00564de - .long 0x1b6717e3,0x3ffc3c42 - .long 0x3f8b5ef7 - .long 0xc004056b - .long 0x264323b8,0x3ffc2360 - .long 0x3f890138 - .long 0xc002abf5 - .long 0x8c0c1853,0x3ffc0abf - .long 0x3f86b1c6 - .long 0xc0015858 - .long 0x4069b804,0x3ffbf25f - .long 0x3f847032 - .long 0xc0000a6f - .long 0xf2c0f56b,0x3ffbda3d - .long 0x3f823c13 - .long 0xbffd8435 - .long 0xe82b41be,0x3ffbc25a - .long 0x3f801501 - .long 0xbffafe6e - .long 0xd0c8f1c2,0x3ffbaab4 - .long 0x3f7bf536 - .long 0xbff8834b - .long 0xc1a3163f,0x3ffb934a - .long 0x3f77d900 - .long 0xbff6128d - .long 0xc6e21d7e,0x3ffb7c1b - .long 0x3f73d4ab - .long 0xbff3abf8 - .long 0xe60015a5,0x3ffb6526 - .long 0x3f6fe784 - .long 0xbff14f50 - .long 0x21cbd876,0x3ffb4e6b - .long 0x3f6c10e1 - .long 0xbfeefc5d - .long 0x9ee07b4c,0x3ffb37e7 - .long 0x3f68501d - .long 0xbfecb2e7 - .long 0x6d2d48b6,0x3ffb219b - .long 0x3f64a499 - .long 0xbfea72b8 - .long 0xa81c9b61,0x3ffb0b85 - .long 0x3f610dbb - .long 0xbfe83b9d - .long 0x902fdc83,0x3ffaf5a5 - .long 0x3f5d8aee - .long 0xbfe60d61 - .long 0x27f22c44,0x3ffadffa - .long 0x3f5a1ba3 - .long 0xbfe3e7d3 - .long 0xa3884d02,0x3ffaca82 - .long 0x3f56bf51 - .long 0xbfe1cac5 - .long 0x554d369e,0x3ffab53e - .long 0x3f537570 - .long 0xbfdfb606 - .long 0x5450035a,0x3ffaa02c - .long 0x3f503d7f - .long 0xbfdda969 - .long 0xe28ff013,0x3ffa8b4b - .long 0x3f4d1702 - .long 0xbfdba4c2 - .long 0x3ccf3bef,0x3ffa769c - .long 0x3f4a017f - .long 0xbfd9a7e6 - .long 0xadd0d7d8,0x3ffa621c - .long 0x3f46fc82 - .long 0xbfd7b2ab - .long 0x73a23063,0x3ffa4dcc - .long 0x3f440799 - .long 0xbfd5c4e8 - .long 0xd9b8e6fd,0x3ffa39aa - .long 0x3f412258 - .long 0xbfd3de77 - .long 0x47a99575,0x3ffa25b7 - .long 0x3f3e4c53 - .long 0xbfd1ff2e - .long 0xd6d4c329,0x3ffa11f0 - .long 0x3f3b8525 - .long 0xbfd026eb - .long 0x1e725d64,0x3ff9fe57 - .long 0x3f38cc6a - .long 0xbfce5587 - .long 0x4a856a92,0x3ff9eae9 - .long 0x3f3621c3 - .long 0xbfcc8ae0 - .long 0xd3534a3f,0x3ff9d7a6 - .long 0x3f3384d1 - .long 0xbfcac6d1 - .long 0xf6170fe5,0x3ff9c48e - .long 0x3f30f53c - .long 0xbfc9093b - .long 0x43d296cd,0x3ff9b1a1 - .long 0x3f2e72ac - .long 0xbfc751fb - .long 0xfbbf8768,0x3ff99edc - .long 0x3f2bfccb - .long 0xbfc5a0f2 - .long 0xaa7c60ad,0x3ff98c41 - .long 0x3f299349 - .long 0xbfc3f600 - .long 0x9e5e0c30,0x3ff979ce - .long 0x3f2735d5 - .long 0xbfc25106 - .long 0x47a967c7,0x3ff96783 - .long 0x3f24e423 - .long 0xbfc0b1e7 - .long 0x213a91b3,0x3ff9555f - .long 0x3f229de8 - .long 0xbfbf1887 - .long 0xb92f1e71,0x3ff94361 - .long 0x3f2062db - .long 0xbfbd84c7 - .long 0x4e9fbb55,0x3ff9318a - .long 0x3f1e32b7 - .long 0xbfbbf68e - .long 0x8c3e135d,0x3ff91fd8 - .long 0x3f1c0d36 - .long 0xbfba6dc0 - .long 0xe5486399,0x3ff90e4b - .long 0x3f19f217 - .long 0xbfb8ea42 - .long 0xbecd10bc,0x3ff8fce3 - .long 0x3f17e11a - .long 0xbfb76bfc - .long 0xbe525978,0x3ff8eb9f - .long 0x3f15d9ff - .long 0xbfb5f2d3 - .long 0x48293568,0x3ff8da7f - .long 0x3f13dc8c - .long 0xbfb47eb1 - .long 0x05d5e650,0x3ff8c982 - .long 0x3f11e884 - .long 0xbfb30f7c - .long 0x60ba5dac,0x3ff8b8a7 - .long 0x3f0ffdb0 - .long 0xbfb1a51e - .long 0xefd22e82,0x3ff8a7ee - .long 0x3f0e1bd7 - .long 0xbfb03f80 - .long 0x47805b92,0x3ff89758 - .long 0x3f0c42c3 - .long 0xbfaede8a - .long 0xcd57cc04,0x3ff886e2 - .long 0x3f0a7241 - .long 0xbfad8229 - .long 0x46b3d0d8,0x3ff8768e - .long 0x3f08aa1e - .long 0xbfac2a48 - .long 0x4cc7ad59,0x3ff8665a - .long 0x3f06ea27 - .long 0xbfaad6cf - .long 0x3347fcf1,0x3ff85646 - .long 0x3f05322e - .long 0xbfa987ad - .long 0xcc7c68cf,0x3ff84651 - .long 0x3f038204 - .long 0xbfa83ccd - .long 0x95d48bda,0x3ff8367c - .long 0x3f01d97a - .long 0xbfa6f61c - .long 0x40b0d774,0x3ff826c6 - .long 0x3f003866 - .long 0xbfa5b387 - .long 0x521e69ab,0x3ff8172e - .long 0x3efd3d38 - .long 0xbfa474fb - .long 0x64a31380,0x3ff807b4 - .long 0x3efa17e4 - .long 0xbfa33a67 - .long 0x344463f5,0x3ff7f858 - .long 0x3ef70080 - .long 0xbfa203b9 - .long 0x536e309d,0x3ff7e919 - .long 0x3ef3f6bd - .long 0xbfa0d0df - .long 0x51d9db7f,0x3ff7d9f7 - .long 0x3ef0fa4e - .long 0xbf9fa1ca - .long 0x03bdd024,0x3ff7caf2 - .long 0x3eee0ae8 - .long 0xbf9e7667 - .long 0xd06a95a6,0x3ff7bc08 - .long 0x3eeb2842 - .long 0xbf9d4ea8 - .long 0x96a621bf,0x3ff7ad3b - .long 0x3ee85215 - .long 0xbf9c2a7d - .long 0xfac56bba,0x3ff79e89 - .long 0x3ee5881d - .long 0xbf9b09d5 - .long 0x79c2bb58,0x3ff78ff3 - .long 0x3ee2ca16 - .long 0xbf99eca3 - .long 0xfa3e419f,0x3ff78177 - .long 0x3ee017bf - .long 0xbf98d2d7 - .long 0x07c1acb7,0x3ff77317 - .long 0x3edd70d7 - .long 0xbf97bc62 - .long 0x49bbc9e6,0x3ff764d0 - .long 0x3edad522 - .long 0xbf96a937 - .long 0x8367baca,0x3ff756a3 - .long 0x3ed84462 - .long 0xbf959948 - .long 0x6acc6906,0x3ff74890 - .long 0x3ed5be5d - .long 0xbf948c88 - .long 0xbcc0ac8a,0x3ff73a96 - .long 0x3ed342d8 - .long 0xbf9382e7 - .long 0xed77fbb2,0x3ff72cb5 - .long 0x3ed0d19d - .long 0xbf927c5c - .long 0x1262b283,0x3ff71eee - .long 0x3ece6a74 - .long 0xbf9178d7 - .long 0x928b4839,0x3ff7113e - .long 0x3ecc0d29 - .long 0xbf90784d - .long 0x46765494,0x3ff703a7 - .long 0x3ec9b988 - .long 0xbf8f7ab1 - .long 0xd271890f,0x3ff6f627 - .long 0x3ec76f5d - .long 0xbf8e7ff8 - .long 0x1330f37e,0x3ff6e8c0 - .long 0x3ec52e79 - .long 0xbf8d8817 - .long 0xca5f6659,0x3ff6db6f - .long 0x3ec2f6aa - .long 0xbf8c9300 - .long 0x7a3c2c24,0x3ff6ce36 - .long 0x3ec0c7c2 - .long 0xbf8ba0aa - .long 0x18d80162,0x3ff6c114 - .long 0x3ebea193 - .long 0xbf8ab109 - .long 0x4b1eb26b,0x3ff6b408 - .long 0x3ebc83f0 - .long 0xbf89c412 - .long 0xcd29fcba,0x3ff6a712 - .long 0x3eba6eaf - .long 0xbf88d9bb - .long 0x664b0f09,0x3ff69a33 - .long 0x3eb861a4 - .long 0xbf87f1f9 - .long 0xcfa00fd5,0x3ff68d69 - .long 0x3eb65ca6 - .long 0xbf870cc3 - .long 0xe9d2a6b3,0x3ff680b5 - .long 0x3eb45f8c - .long 0xbf862a0e - .long 0x5e7a0e0b,0x3ff67417 - .long 0x3eb26a30 - .long 0xbf8549d1 - .long 0xfe6852bf,0x3ff6678d - .long 0x3eb07c6a - .long 0xbf846c01 - .long 0x6f577b40,0x3ff65b19 - .long 0x3eae9616 - .long 0xbf839096 - .long 0x94beacb4,0x3ff64eb9 - .long 0x3eacb70d - .long 0xbf82b786 - .long 0x2d87a5b4,0x3ff6426e - .long 0x3eaadf2d - .long 0xbf81e0c9 - .long 0x133eca3a,0x3ff63637 - .long 0x3ea90e52 - .long 0xbf810c55 - .long 0xf3b8ca64,0x3ff62a13 - .long 0x3ea74459 - .long 0xbf803a22 - .long 0xb1e928a1,0x3ff61e04 - .long 0x3ea58123 - .long 0xbf7ed44e - .long 0xf9c12cea,0x3ff61208 - .long 0x3ea3c48d - .long 0xbf7d38b8 - .long 0xb0f105b4,0x3ff60620 - .long 0x3ea20e79 - .long 0xbf7ba172 - .long 0x9c747236,0x3ff5fa4b - .long 0x3ea05ec6 - .long 0xbf7a0e6a - .long 0x79454bb5,0x3ff5ee89 - .long 0x3e9eb556 - .long 0xbf787f92 - .long 0x2c804088,0x3ff5e2da - .long 0x3e9d120c - .long 0xbf76f4d9 - .long 0x686ac26d,0x3ff5d73d - .long 0x3e9b74ca - .long 0xbf756e31 - .long 0x1493b001,0x3ff5cbb3 - .long 0x3e99dd75 - .long 0xbf73eb8c - .long 0x048406f4,0x3ff5c03b - .long 0x3e984bef - .long 0xbf726cd9 - .long 0xf4dbeebe,0x3ff5b4d4 - .long 0x3e96c01f - .long 0xbf70f20b - .long 0xbbe3f38a,0x3ff5a980 - .long 0x3e9539e9 - .long 0xbf6f7b14 - .long 0x37ac4b0e,0x3ff59e3e - .long 0x3e93b933 - .long 0xbf6e07e5 - .long 0x294f0c16,0x3ff5930d - .long 0x3e923de4 - .long 0xbf6c9870 - .long 0x5aaed17d,0x3ff587ed - .long 0x3e90c7e3 - .long 0xbf6b2caa - .long 0xc550e64d,0x3ff57cde - .long 0x3e8f5718 - .long 0xbf69c484 - .long 0x1e1a64d6,0x3ff571e1 - .long 0x3e8deb6b - .long 0xbf685ff2 - .long 0x4990847b,0x3ff566f4 - .long 0x3e8c84c4 - .long 0xbf66fee6 - .long 0x0dee1cfa,0x3ff55c18 - .long 0x3e8b230e - .long 0xbf65a155 - .long 0x4a4098f7,0x3ff5514c - .long 0x3e89c631 - .long 0xbf644732 - .long 0xd65fdb98,0x3ff54690 - .long 0x3e886e18 - .long 0xbf62f072 - .long 0x9358f9fc,0x3ff53be5 - .type __sqrt_t_table,@object - .size __sqrt_t_table,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrt_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrt_wmt.S deleted file mode 100644 index 7667579e79..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrt_wmt.S +++ /dev/null @@ -1,135 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sqrt_wmt.c" - .text -..TXTST0: -# -- Begin sqrt - .text - .align 16,0x90 - .globl sqrt -sqrt: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp - fldl 8(%ebp) - movl %gs:20, %edx - xorl %esp, %edx - movl 12(%ebp), %ecx - cmpl $2146435072, %ecx - movl %edx, 16(%esp) - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - fstl (%esp) - ja ..B1.5 -..B1.2: - fstpl 8(%esp) - movsd 8(%esp), %xmm0 - sqrtsd %xmm0, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - movl 16(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.4 -..B1.3: - movl %ebp, %esp - popl %ebp - ret -..B1.4: - fstp %st(0) - movl %eax, %ebx - call __stack_chk_fail@PLT -..B1.5: - cmpl $0, (%esp) - movl $0, %edx - setne %dl - orl %edx, %ecx - movl %ecx, %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - ja ..B1.12 -..B1.6: - cmpl $-2147483648, %ecx - je ..B1.8 -..B1.7: - fstp %st(0) - movsd _ConstantTable@GOTOFF(%eax), %xmm0 - mulsd 16+_ConstantTable@GOTOFF(%eax), %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) -..B1.8: - movl 16(%esp), %edx - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.4 - jmp ..B1.3 -..B1.12: - movl 16(%esp), %edx - fadd %st(0), %st - xorl %esp, %edx - cmpl %gs:20, %edx - jne ..B1.4 - jmp ..B1.3 - .align 16,0x90 - .type sqrt,@function - .size sqrt,.-sqrt - .data -# -- End sqrt - .section .rodata, "a" - .align 16 - .align 16 -_ConstantTable: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _ConstantTable,@object - .size _ConstantTable,32 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrtf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrtf_wmt.S deleted file mode 100644 index 1e9785cc4a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrtf_wmt.S +++ /dev/null @@ -1,114 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sqrtf_wmt.c" - .text -..TXTST0: -# -- Begin sqrtf - .text - .align 16,0x90 - .globl sqrtf -sqrtf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $16, %esp - flds 8(%ebp) - movl 8(%ebp), %edx - cmpl $2139095040, %edx - ja ..B1.3 -..B1.2: - fstps 8(%esp) - movss 8(%esp), %xmm0 - sqrtss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.3: - movl %edx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.8 -..B1.4: - cmpl $-2147483648, %edx - je ..B1.6 -..B1.5: - fstp %st(0) - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - movss _ConstantTable@GOTOFF(%eax), %xmm0 - mulss 16+_ConstantTable@GOTOFF(%eax), %xmm0 - movss %xmm0, (%esp) - flds (%esp) -..B1.6: - movl %ebp, %esp - popl %ebp - ret -..B1.8: - fadd %st(0), %st - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type sqrtf,@function - .size sqrtf,.-sqrtf - .data -# -- End sqrtf - .section .rodata, "a" - .align 16 - .align 16 -_ConstantTable: - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 2139095040 - .long 4286578688 - .long 0 - .long 0 - .type _ConstantTable,@object - .size _ConstantTable,32 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrtl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrtl.S deleted file mode 100644 index d0db6b5d4b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/sqrtl.S +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sqrtl.c" - .text -..TXTST0: -# -- Begin sqrtl - .text - .align 16,0x90 - .globl sqrtl -sqrtl: -# parameter 1: 32 + %esp -..B1.1: -..L1: - - subl $28, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 40(%esp), %ecx - andl $32767, %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - cmpl $32767, %ecx - je ..B1.26 -..B1.4: - movzbl 41(%esp), %edx - testl $128, %edx - jne ..B1.14 -..B1.5: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.13 -..B1.6: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.7: - fldcw 12(%esp) -..B1.8: - movl $1, %eax -..B1.9: - fldt 32(%esp) - fsqrt - fstpt (%esp) -..B1.10: - testl %eax, %eax - je ..B1.12 -..B1.11: - fldcw 14(%esp) -..B1.12: - fldt (%esp) - addl $28, %esp - ret -..B1.13: - xorl %eax, %eax - jmp ..B1.9 -..B1.14: - testl %ecx, %ecx - jne ..B1.18 -..B1.15: - cmpl $0, 36(%esp) - jne ..B1.18 -..B1.16: - cmpl $0, 32(%esp) - jne ..B1.18 -..B1.17: - fldt 32(%esp) - addl $28, %esp - ret -..B1.18: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.25 -..B1.19: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.20: - fldcw 12(%esp) -..B1.21: - movl $1, %edx -..B1.22: - fldl _infs@GOTOFF(%eax) - testl %edx, %edx - fmull _zeros@GOTOFF(%eax) - fstpt (%esp) - je ..B1.24 -..B1.23: - fldcw 14(%esp) -..B1.24: - fldt (%esp) - addl $28, %esp - ret -..B1.25: - xorl %edx, %edx - jmp ..B1.22 -..B1.26: - cmpl $-2147483648, 36(%esp) - jne ..B1.28 -..B1.27: - cmpl $0, 32(%esp) - je ..B1.4 -..B1.28: - movzwl 14(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.34 -..B1.29: - orl $-64768, %ecx - movw %cx, 12(%esp) -..B1.30: - fldcw 12(%esp) -..B1.31: - fldt 32(%esp) - fmull _ones@GOTOFF(%eax) - fstpt (%esp) -..B1.32: - fldcw 14(%esp) -..B1.33: - fldt (%esp) - addl $28, %esp - ret -..B1.34: - fldt 32(%esp) - fmull _ones@GOTOFF(%eax) - fstpt (%esp) - jmp ..B1.33 - .align 16,0x90 - .type sqrtl,@function - .size sqrtl,.-sqrtl - .data -# -- End sqrtl - .section .rodata, "a" - .align 4 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tan_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tan_wmt.S deleted file mode 100644 index 747378fdf9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tan_wmt.S +++ /dev/null @@ -1,1713 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tan_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin tan - .text - .align 16,0x90 - .globl tan -tan: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 56(%esp) - call static_func - movl %eax, %ebx - movsd 128(%esp), %xmm0 - pextrw $3, %xmm0, %eax - andl $32767, %eax - subl $14368, %eax - cmpl $2216, %eax - ja .L_2TAG_PACKET_0.0.2 - movapd 5840(%ebx), %xmm5 - movapd 5856(%ebx), %xmm6 - unpcklpd %xmm0, %xmm0 - movapd 5712(%ebx), %xmm4 - andpd %xmm0, %xmm4 - movapd 5632(%ebx), %xmm1 - mulpd %xmm0, %xmm1 - orpd %xmm4, %xmm5 - addpd %xmm5, %xmm1 - movapd %xmm1, %xmm7 - unpckhpd %xmm7, %xmm7 - cvttsd2si %xmm7, %edx - cvttpd2dq %xmm1, %xmm1 - cvtdq2pd %xmm1, %xmm1 - mulpd %xmm6, %xmm1 - movapd 5664(%ebx), %xmm3 - movsd 5728(%ebx), %xmm5 - addl $469248, %edx - movapd 5680(%ebx), %xmm4 - mulpd %xmm1, %xmm3 - andl $31, %edx - mulsd %xmm1, %xmm5 - movl %edx, %ecx - mulpd %xmm1, %xmm4 - shll $1, %ecx - subpd %xmm3, %xmm0 - mulpd 5696(%ebx), %xmm1 - addl %ecx, %edx - shll $2, %ecx - addl %ecx, %edx - addsd %xmm0, %xmm5 - movapd %xmm0, %xmm2 - subpd %xmm4, %xmm0 - movsd 5744(%ebx), %xmm6 - shll $4, %edx - lea (%ebx), %eax - andpd 5776(%ebx), %xmm5 - movapd %xmm0, %xmm3 - addl %edx, %eax - subpd %xmm0, %xmm2 - unpckhpd %xmm0, %xmm0 - divsd %xmm5, %xmm6 - subpd %xmm4, %xmm2 - movapd 16(%eax), %xmm7 - subsd %xmm5, %xmm3 - mulpd %xmm0, %xmm7 - subpd %xmm1, %xmm2 - movapd 48(%eax), %xmm1 - mulpd %xmm0, %xmm1 - movapd 96(%eax), %xmm4 - mulpd %xmm0, %xmm4 - addsd %xmm3, %xmm2 - movapd %xmm0, %xmm3 - mulpd %xmm0, %xmm0 - addpd (%eax), %xmm7 - addpd 32(%eax), %xmm1 - mulpd %xmm0, %xmm1 - addpd 80(%eax), %xmm4 - addpd %xmm1, %xmm7 - movapd 112(%eax), %xmm1 - mulpd %xmm0, %xmm1 - mulpd %xmm0, %xmm0 - addpd %xmm1, %xmm4 - movapd 64(%eax), %xmm1 - mulpd %xmm0, %xmm1 - addpd %xmm1, %xmm7 - movapd %xmm3, %xmm1 - mulpd %xmm0, %xmm3 - mulsd %xmm0, %xmm0 - mulpd 144(%eax), %xmm1 - mulpd %xmm3, %xmm4 - movapd %xmm1, %xmm3 - addpd %xmm4, %xmm7 - movapd %xmm1, %xmm4 - mulsd %xmm7, %xmm0 - unpckhpd %xmm7, %xmm7 - addsd %xmm7, %xmm0 - unpckhpd %xmm1, %xmm1 - addsd %xmm1, %xmm3 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm1 - movapd %xmm2, %xmm4 - movsd 144(%eax), %xmm7 - unpckhpd %xmm2, %xmm2 - addsd 152(%eax), %xmm7 - mulsd %xmm2, %xmm7 - addsd 136(%eax), %xmm7 - addsd %xmm1, %xmm7 - addsd %xmm7, %xmm0 - movsd 5744(%ebx), %xmm7 - mulsd %xmm6, %xmm4 - movsd 168(%eax), %xmm2 - andpd %xmm6, %xmm2 - mulsd %xmm2, %xmm5 - mulsd 160(%eax), %xmm6 - subsd %xmm5, %xmm7 - subsd 128(%eax), %xmm2 - subsd %xmm4, %xmm7 - mulsd %xmm6, %xmm7 - movapd %xmm3, %xmm4 - subsd %xmm2, %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm4 - addsd %xmm4, %xmm0 - subsd %xmm7, %xmm0 - addsd %xmm3, %xmm0 - movsd %xmm0, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_0.0.2: - jg .L_2TAG_PACKET_2.0.2 - shrl $4, %eax - cmpl $268434558, %eax - jne .L_2TAG_PACKET_3.0.2 - movapd %xmm0, %xmm3 - mulsd 5808(%ebx), %xmm3 -.L_2TAG_PACKET_3.0.2: - movsd 5792(%ebx), %xmm3 - mulsd %xmm0, %xmm3 - addsd %xmm0, %xmm3 - mulsd 5808(%ebx), %xmm3 - movsd %xmm3, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - movq 5712(%ebx), %xmm7 - andpd %xmm0, %xmm7 - xorpd %xmm0, %xmm7 - ucomisd 5760(%ebx), %xmm7 - je .L_2TAG_PACKET_4.0.2 - subl $32, %esp - movsd %xmm0, (%esp) - lea 40(%esp), %eax - movl %eax, 8(%esp) - movl $2, %eax - movl %eax, 12(%esp) - call __libm_tancot_huge - addl $32, %esp - fldl 8(%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_4.0.2: - movq %xmm0, (%esp) - fldl (%esp) - fsubl (%esp) -.L_2TAG_PACKET_1.0.2: - movl 56(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type tan,@function - .size tan,.-tan - .data -# -- End tan - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 2284589306 - .long 1066820852 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1441186365 - .long 1065494243 - .long 1431655765 - .long 1070945621 - .long 0 - .long 0 - .long 0 - .long 0 - .long 236289504 - .long 1064135997 - .long 286331153 - .long 1069617425 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1160476131 - .long 1062722102 - .long 463583772 - .long 1068212666 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1313038235 - .long 1066745731 - .long 0 - .long 0 - .long 1013878342 - .long 1067152618 - .long 0 - .long 0 - .long 3663426833 - .long 1065725283 - .long 3693284251 - .long 1069118808 - .long 650852232 - .long 1065882376 - .long 1996245381 - .long 1071000265 - .long 2008746170 - .long 1064664197 - .long 3055842593 - .long 1068578846 - .long 1495406348 - .long 1064652437 - .long 2269530157 - .long 1069711235 - .long 285563696 - .long 1063576465 - .long 1046897440 - .long 1067705865 - .long 233429731 - .long 1063453151 - .long 522045958 - .long 1068476590 - .long 2354785698 - .long 1069102779 - .long 1317599141 - .long 1012432133 - .long 0 - .long 1072693248 - .long 2828230105 - .long 1065606626 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1512545955 - .long 1068119047 - .long 0 - .long 0 - .long 1127048698 - .long 1067909459 - .long 0 - .long 0 - .long 2300200450 - .long 1067254767 - .long 3593250296 - .long 1070233561 - .long 3009365544 - .long 1066902117 - .long 1127373050 - .long 1071173457 - .long 3046103305 - .long 1066371299 - .long 24583402 - .long 1069723988 - .long 4082511758 - .long 1065914199 - .long 3223889699 - .long 1070020367 - .long 548927984 - .long 1065415756 - .long 558065897 - .long 1068949418 - .long 680073315 - .long 1064940726 - .long 388873200 - .long 1068944270 - .long 3763679576 - .long 1070167541 - .long 1497360404 - .long 1009710547 - .long 0 - .long 1072693248 - .long 64931152 - .long 1067729411 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2467582782 - .long 1069256389 - .long 0 - .long 0 - .long 162150096 - .long 1068946420 - .long 0 - .long 0 - .long 3702794237 - .long 1068579152 - .long 3631919291 - .long 1070936926 - .long 3456821413 - .long 1068217218 - .long 2031366438 - .long 1071495745 - .long 1596664020 - .long 1067799281 - .long 1509038701 - .long 1070601643 - .long 583171477 - .long 1067510148 - .long 3785344682 - .long 1070618476 - .long 2402036048 - .long 1067075736 - .long 3233018412 - .long 1069913186 - .long 411280568 - .long 1066710556 - .long 1065584192 - .long 1069747896 - .long 895247324 - .long 1070819848 - .long 500078909 - .long 3161288781 - .long 0 - .long 1072693248 - .long 729983843 - .long 1068994194 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1458794562 - .long 1070398550 - .long 0 - .long 0 - .long 2857777489 - .long 1070137637 - .long 0 - .long 0 - .long 1024359517 - .long 1069876531 - .long 2616040238 - .long 1071582937 - .long 1609024636 - .long 1069675088 - .long 2529240549 - .long 1071836633 - .long 1510128600 - .long 1069440113 - .long 2251697184 - .long 1071253687 - .long 1262761453 - .long 1069142850 - .long 1263091857 - .long 1071190461 - .long 3043383486 - .long 1068885191 - .long 2476932470 - .long 1070842002 - .long 3659995028 - .long 1068669200 - .long 855891755 - .long 1070696894 - .long 2583490354 - .long 1071284857 - .long 3062633575 - .long 1014008623 - .long 0 - .long 1072693248 - .long 2550940471 - .long 1069938201 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3422807297 - .long 1071640847 - .long 0 - .long 0 - .long 1151658053 - .long 1071494715 - .long 0 - .long 0 - .long 929607071 - .long 1071346340 - .long 1037049034 - .long 1072037305 - .long 2786928657 - .long 1071215282 - .long 1447406859 - .long 1072265209 - .long 3490952107 - .long 1071090851 - .long 3205232916 - .long 1071968658 - .long 1297344304 - .long 1070977120 - .long 1066110976 - .long 1071946035 - .long 3803721480 - .long 1070871082 - .long 1496754229 - .long 1071807201 - .long 2982550683 - .long 1070773243 - .long 4014441989 - .long 1071736222 - .long 419968236 - .long 1071717047 - .long 3451266538 - .long 3163444811 - .long 0 - .long 1072693248 - .long 2960267235 - .long 1070745841 - .long 0 - .long 0 - .long 0 - .long 0 - .long 724322768 - .long 1072881308 - .long 0 - .long 0 - .long 643153048 - .long 1072905816 - .long 0 - .long 0 - .long 4285079458 - .long 1072928558 - .long 3912524733 - .long 1072622983 - .long 118362272 - .long 1072952754 - .long 4107767972 - .long 1072827408 - .long 2689502883 - .long 1072976922 - .long 946523347 - .long 1072772766 - .long 573204189 - .long 1073001761 - .long 581531518 - .long 1072826391 - .long 1386236526 - .long 1073026959 - .long 3718905905 - .long 1072832823 - .long 1145558140 - .long 1073052673 - .long 513572637 - .long 1072861969 - .long 716700048 - .long 1071997368 - .long 547126769 - .long 1015523525 - .long 0 - .long 1072693248 - .long 1097907398 - .long 1071420120 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3349892442 - .long 1074290212 - .long 0 - .long 0 - .long 3913197405 - .long 1074501181 - .long 0 - .long 0 - .long 2494034522 - .long 1074739170 - .long 1264738763 - .long 1073084804 - .long 1520293906 - .long 1074899632 - .long 1958936600 - .long 1073411493 - .long 2133649635 - .long 1075052171 - .long 4270740730 - .long 1073574708 - .long 1728930189 - .long 1075224844 - .long 1303998552 - .long 1073799186 - .long 618611933 - .long 1075420255 - .long 1769828046 - .long 1073938542 - .long 2200537986 - .long 1075641421 - .long 433361110 - .long 1074105369 - .long 719595600 - .long 1072317184 - .long 294527206 - .long 3162140088 - .long 0 - .long 1073741824 - .long 3811788216 - .long 3218400550 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1704352102 - .long 1075943001 - .long 0 - .long 0 - .long 2284589306 - .long 1076258036 - .long 0 - .long 0 - .long 2211264291 - .long 1076659010 - .long 0 - .long 1073741824 - .long 1441186365 - .long 1077028579 - .long 1431655765 - .long 1074091349 - .long 876943673 - .long 1077353622 - .long 2863311531 - .long 1074440874 - .long 236289504 - .long 1077767485 - .long 286331153 - .long 1074860305 - .long 2805473311 - .long 1078115278 - .long 95443718 - .long 1075163227 - .long 1160476131 - .long 1078450742 - .long 463583772 - .long 1075552698 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 1073741824 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1330165971 - .long 3207850745 - .long 0 - .long 0 - .long 217536623 - .long 1059109098 - .long 0 - .long 0 - .long 3492120849 - .long 3205151475 - .long 602185705 - .long 3215678092 - .long 760422958 - .long 1056312597 - .long 555127889 - .long 1067545266 - .long 3139784124 - .long 3202470837 - .long 3690544014 - .long 3213150171 - .long 95707915 - .long 1053635428 - .long 4003114407 - .long 1064581412 - .long 2034926231 - .long 3199711161 - .long 3759536023 - .long 3210559989 - .long 3826928214 - .long 1050893819 - .long 3837960785 - .long 1061790379 - .long 1526325248 - .long 3217967566 - .long 2356426521 - .long 1025423456 - .long 0 - .long 0 - .long 457728975 - .long 1071088276 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1398462608 - .long 3207303968 - .long 0 - .long 0 - .long 26205983 - .long 1058461213 - .long 0 - .long 0 - .long 56226238 - .long 3204528612 - .long 2754706541 - .long 3215359511 - .long 2187799823 - .long 1055634437 - .long 790323742 - .long 1067402587 - .long 1372385848 - .long 3201651479 - .long 4097292716 - .long 3212856302 - .long 3348210357 - .long 1052830099 - .long 2442796466 - .long 1064337602 - .long 862608142 - .long 3198830754 - .long 170296152 - .long 3210060867 - .long 3755571428 - .long 1049933343 - .long 3614866008 - .long 1061361670 - .long 719978496 - .long 3217669096 - .long 1998842465 - .long 3174703977 - .long 0 - .long 0 - .long 3749156607 - .long 1071048258 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 3120498638 - .long 3206749304 - .long 0 - .long 0 - .long 2773578114 - .long 1058009312 - .long 0 - .long 0 - .long 2030783676 - .long 3203817873 - .long 2223654598 - .long 3215071936 - .long 2976134650 - .long 1054987244 - .long 706390066 - .long 1067217386 - .long 4258437615 - .long 3200900378 - .long 1066252975 - .long 3212391267 - .long 815777514 - .long 1051989462 - .long 3202745457 - .long 1064010682 - .long 2493556375 - .long 3198004753 - .long 1046243251 - .long 3209678971 - .long 2593078846 - .long 1049017717 - .long 2763962276 - .long 1060970161 - .long 701480960 - .long 3217377742 - .long 3205862232 - .long 3174660915 - .long 0 - .long 0 - .long 2267016812 - .long 1071015664 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 2107155798 - .long 3206166872 - .long 0 - .long 0 - .long 2642992129 - .long 1057424578 - .long 0 - .long 0 - .long 1936992811 - .long 3203204426 - .long 1485063559 - .long 3214682643 - .long 1432914553 - .long 1054319398 - .long 3996381654 - .long 1067075828 - .long 2833029256 - .long 3200223545 - .long 2866066872 - .long 3211982662 - .long 2432888737 - .long 1051234178 - .long 3669764559 - .long 1063748136 - .long 2458496952 - .long 3197170774 - .long 1948234989 - .long 3209098147 - .long 2843698787 - .long 1048163519 - .long 3398041407 - .long 1060559728 - .long 2829230080 - .long 3217092115 - .long 1034046433 - .long 3174271903 - .long 0 - .long 0 - .long 298675305 - .long 1070989821 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 437603223 - .long 3205589761 - .long 0 - .long 0 - .long 759330352 - .long 1057048511 - .long 0 - .long 0 - .long 3107463368 - .long 3202507988 - .long 3144465176 - .long 3214191500 - .long 2290961810 - .long 1053841035 - .long 1618153340 - .long 1066971547 - .long 3836869393 - .long 3199400272 - .long 584032116 - .long 3211469261 - .long 1245704358 - .long 1050626462 - .long 4247487438 - .long 1063561943 - .long 1669034927 - .long 3196274812 - .long 3844233498 - .long 3208626322 - .long 2706958524 - .long 1047411374 - .long 3857199098 - .long 1060281647 - .long 3593904128 - .long 3216590719 - .long 3267547836 - .long 3172163321 - .long 0 - .long 0 - .long 4076712227 - .long 1070970214 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 3290090340 - .long 3204793485 - .long 0 - .long 0 - .long 3685760367 - .long 1056668370 - .long 0 - .long 0 - .long 2655163949 - .long 3201674917 - .long 628750575 - .long 3213566872 - .long 680140505 - .long 1053299777 - .long 2954464709 - .long 1066900026 - .long 803201619 - .long 3198516435 - .long 1466315631 - .long 3210837162 - .long 1611220163 - .long 1049972438 - .long 2766187256 - .long 1063437894 - .long 1804579484 - .long 3195331491 - .long 3695969289 - .long 3207854418 - .long 2617238373 - .long 1046675948 - .long 3095830084 - .long 1060095334 - .long 3789570048 - .long 3216034914 - .long 23826559 - .long 3172048060 - .long 0 - .long 0 - .long 3870939386 - .long 1070956467 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1571758758 - .long 3203672535 - .long 0 - .long 0 - .long 113026373 - .long 1056416381 - .long 0 - .long 0 - .long 1913766298 - .long 3200523326 - .long 2507068734 - .long 3212502004 - .long 4000648818 - .long 1053003803 - .long 2446607349 - .long 1066858259 - .long 912662124 - .long 3197333001 - .long 1349489537 - .long 3209765608 - .long 3412972607 - .long 1049641401 - .long 1721283327 - .long 1063366855 - .long 1466691883 - .long 3194116746 - .long 3852528092 - .long 3206760861 - .long 285443293 - .long 1046158380 - .long 1758739894 - .long 1059895449 - .long 1858781184 - .long 3214984212 - .long 3447575948 - .long 1024675855 - .long 0 - .long 0 - .long 2242038011 - .long 1070948320 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 0 - .long 0 - .long 0 - .long 0 - .long 737611454 - .long 1056336527 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3594790527 - .long 1052911621 - .long 381774871 - .long 1066844524 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3303051618 - .long 1049456050 - .long 3154187623 - .long 1063343722 - .long 0 - .long 0 - .long 0 - .long 0 - .long 528061788 - .long 1045944910 - .long 2469719819 - .long 1059831159 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1431655765 - .long 1070945621 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1571758758 - .long 1056188887 - .long 0 - .long 0 - .long 113026373 - .long 1056416381 - .long 0 - .long 0 - .long 1913766298 - .long 1053039678 - .long 2507068734 - .long 1065018356 - .long 4000648818 - .long 1053003803 - .long 2446607349 - .long 1066858259 - .long 912662124 - .long 1049849353 - .long 1349489537 - .long 1062281960 - .long 3412972607 - .long 1049641401 - .long 1721283327 - .long 1063366855 - .long 1466691883 - .long 1046633098 - .long 3852528092 - .long 1059277213 - .long 285443293 - .long 1046158380 - .long 1758739894 - .long 1059895449 - .long 1858781184 - .long 1067500564 - .long 3447575948 - .long 3172159503 - .long 0 - .long 0 - .long 2242038011 - .long 1070948320 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 3290090340 - .long 1057309837 - .long 0 - .long 0 - .long 3685760367 - .long 1056668370 - .long 0 - .long 0 - .long 2655163949 - .long 1054191269 - .long 628750575 - .long 1066083224 - .long 680140505 - .long 1053299777 - .long 2954464709 - .long 1066900026 - .long 803201619 - .long 1051032787 - .long 1466315631 - .long 1063353514 - .long 1611220163 - .long 1049972438 - .long 2766187256 - .long 1063437894 - .long 1804579484 - .long 1047847843 - .long 3695969289 - .long 1060370770 - .long 2617238373 - .long 1046675948 - .long 3095830084 - .long 1060095334 - .long 3789570048 - .long 1068551266 - .long 23826559 - .long 1024564412 - .long 0 - .long 0 - .long 3870939386 - .long 1070956467 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 437603223 - .long 1058106113 - .long 0 - .long 0 - .long 759330352 - .long 1057048511 - .long 0 - .long 0 - .long 3107463368 - .long 1055024340 - .long 3144465176 - .long 1066707852 - .long 2290961810 - .long 1053841035 - .long 1618153340 - .long 1066971547 - .long 3836869393 - .long 1051916624 - .long 584032116 - .long 1063985613 - .long 1245704358 - .long 1050626462 - .long 4247487438 - .long 1063561943 - .long 1669034927 - .long 1048791164 - .long 3844233498 - .long 1061142674 - .long 2706958524 - .long 1047411374 - .long 3857199098 - .long 1060281647 - .long 3593904128 - .long 1069107071 - .long 3267547836 - .long 1024679673 - .long 0 - .long 0 - .long 4076712227 - .long 1070970214 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 2107155798 - .long 1058683224 - .long 0 - .long 0 - .long 2642992129 - .long 1057424578 - .long 0 - .long 0 - .long 1936992811 - .long 1055720778 - .long 1485063559 - .long 1067198995 - .long 1432914553 - .long 1054319398 - .long 3996381654 - .long 1067075828 - .long 2833029256 - .long 1052739897 - .long 2866066872 - .long 1064499014 - .long 2432888737 - .long 1051234178 - .long 3669764559 - .long 1063748136 - .long 2458496952 - .long 1049687126 - .long 1948234989 - .long 1061614499 - .long 2843698787 - .long 1048163519 - .long 3398041407 - .long 1060559728 - .long 2829230080 - .long 1069608467 - .long 1034046433 - .long 1026788255 - .long 0 - .long 0 - .long 298675305 - .long 1070989821 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 3120498638 - .long 1059265656 - .long 0 - .long 0 - .long 2773578114 - .long 1058009312 - .long 0 - .long 0 - .long 2030783676 - .long 1056334225 - .long 2223654598 - .long 1067588288 - .long 2976134650 - .long 1054987244 - .long 706390066 - .long 1067217386 - .long 4258437615 - .long 1053416730 - .long 1066252975 - .long 1064907619 - .long 815777514 - .long 1051989462 - .long 3202745457 - .long 1064010682 - .long 2493556375 - .long 1050521105 - .long 1046243251 - .long 1062195323 - .long 2593078846 - .long 1049017717 - .long 2763962276 - .long 1060970161 - .long 701480960 - .long 1069894094 - .long 3205862232 - .long 1027177267 - .long 0 - .long 0 - .long 2267016812 - .long 1071015664 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1398462608 - .long 1059820320 - .long 0 - .long 0 - .long 26205983 - .long 1058461213 - .long 0 - .long 0 - .long 56226238 - .long 1057044964 - .long 2754706541 - .long 1067875863 - .long 2187799823 - .long 1055634437 - .long 790323742 - .long 1067402587 - .long 1372385848 - .long 1054167831 - .long 4097292716 - .long 1065372654 - .long 3348210357 - .long 1052830099 - .long 2442796466 - .long 1064337602 - .long 862608142 - .long 1051347106 - .long 170296152 - .long 1062577219 - .long 3755571428 - .long 1049933343 - .long 3614866008 - .long 1061361670 - .long 719978496 - .long 1070185448 - .long 1998842465 - .long 1027220329 - .long 0 - .long 0 - .long 3749156607 - .long 1071048258 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1330165971 - .long 1060367097 - .long 0 - .long 0 - .long 217536623 - .long 1059109098 - .long 0 - .long 0 - .long 3492120849 - .long 1057667827 - .long 602185705 - .long 1068194444 - .long 760422958 - .long 1056312597 - .long 555127889 - .long 1067545266 - .long 3139784124 - .long 1054987189 - .long 3690544014 - .long 1065666523 - .long 95707915 - .long 1053635428 - .long 4003114407 - .long 1064581412 - .long 2034926231 - .long 1052227513 - .long 3759536023 - .long 1063076341 - .long 3826928214 - .long 1050893819 - .long 3837960785 - .long 1061790379 - .long 1526325248 - .long 1070483918 - .long 2356426521 - .long 3172907104 - .long 0 - .long 0 - .long 457728975 - .long 1071088276 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1704352102 - .long 3223426649 - .long 0 - .long 0 - .long 2284589306 - .long 1076258036 - .long 0 - .long 0 - .long 2211264291 - .long 3224142658 - .long 0 - .long 3221225472 - .long 1441186365 - .long 1077028579 - .long 1431655765 - .long 1074091349 - .long 876943673 - .long 3224837270 - .long 2863311531 - .long 3221924522 - .long 236289504 - .long 1077767485 - .long 286331153 - .long 1074860305 - .long 2805473311 - .long 3225598926 - .long 95443718 - .long 3222646875 - .long 1160476131 - .long 1078450742 - .long 463583772 - .long 1075552698 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 1073741824 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3349892442 - .long 3221773860 - .long 0 - .long 0 - .long 3913197405 - .long 1074501181 - .long 0 - .long 0 - .long 2494034522 - .long 3222222818 - .long 1264738763 - .long 3220568452 - .long 1520293906 - .long 1074899632 - .long 1958936600 - .long 1073411493 - .long 2133649635 - .long 3222535819 - .long 4270740730 - .long 3221058356 - .long 1728930189 - .long 1075224844 - .long 1303998552 - .long 1073799186 - .long 618611933 - .long 3222903903 - .long 1769828046 - .long 3221422190 - .long 2200537986 - .long 1075641421 - .long 433361110 - .long 1074105369 - .long 719595600 - .long 3219800832 - .long 294527206 - .long 1014656440 - .long 0 - .long 1073741824 - .long 3811788216 - .long 3218400550 - .long 0 - .long 0 - .long 0 - .long 0 - .long 724322768 - .long 3220364956 - .long 0 - .long 0 - .long 643153048 - .long 1072905816 - .long 0 - .long 0 - .long 4285079458 - .long 3220412206 - .long 3912524733 - .long 3220106631 - .long 118362272 - .long 1072952754 - .long 4107767972 - .long 1072827408 - .long 2689502883 - .long 3220460570 - .long 946523347 - .long 3220256414 - .long 573204189 - .long 1073001761 - .long 581531518 - .long 1072826391 - .long 1386236526 - .long 3220510607 - .long 3718905905 - .long 3220316471 - .long 1145558140 - .long 1073052673 - .long 513572637 - .long 1072861969 - .long 716700048 - .long 3219481016 - .long 547126769 - .long 3163007173 - .long 0 - .long 1072693248 - .long 1097907398 - .long 1071420120 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3422807297 - .long 3219124495 - .long 0 - .long 0 - .long 1151658053 - .long 1071494715 - .long 0 - .long 0 - .long 929607071 - .long 3218829988 - .long 1037049034 - .long 3219520953 - .long 2786928657 - .long 1071215282 - .long 1447406859 - .long 1072265209 - .long 3490952107 - .long 3218574499 - .long 3205232916 - .long 3219452306 - .long 1297344304 - .long 1070977120 - .long 1066110976 - .long 1071946035 - .long 3803721480 - .long 3218354730 - .long 1496754229 - .long 3219290849 - .long 2982550683 - .long 1070773243 - .long 4014441989 - .long 1071736222 - .long 419968236 - .long 3219200695 - .long 3451266538 - .long 1015961163 - .long 0 - .long 1072693248 - .long 2960267235 - .long 1070745841 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1458794562 - .long 3217882198 - .long 0 - .long 0 - .long 2857777489 - .long 1070137637 - .long 0 - .long 0 - .long 1024359517 - .long 3217360179 - .long 2616040238 - .long 3219066585 - .long 1609024636 - .long 1069675088 - .long 2529240549 - .long 1071836633 - .long 1510128600 - .long 3216923761 - .long 2251697184 - .long 3218737335 - .long 1262761453 - .long 1069142850 - .long 1263091857 - .long 1071190461 - .long 3043383486 - .long 3216368839 - .long 2476932470 - .long 3218325650 - .long 3659995028 - .long 1068669200 - .long 855891755 - .long 1070696894 - .long 2583490354 - .long 3218768505 - .long 3062633575 - .long 3161492271 - .long 0 - .long 1072693248 - .long 2550940471 - .long 1069938201 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2467582782 - .long 3216740037 - .long 0 - .long 0 - .long 162150096 - .long 1068946420 - .long 0 - .long 0 - .long 3702794237 - .long 3216062800 - .long 3631919291 - .long 3218420574 - .long 3456821413 - .long 1068217218 - .long 2031366438 - .long 1071495745 - .long 1596664020 - .long 3215282929 - .long 1509038701 - .long 3218085291 - .long 583171477 - .long 1067510148 - .long 3785344682 - .long 1070618476 - .long 2402036048 - .long 3214559384 - .long 3233018412 - .long 3217396834 - .long 411280568 - .long 1066710556 - .long 1065584192 - .long 1069747896 - .long 895247324 - .long 3218303496 - .long 500078909 - .long 1013805133 - .long 0 - .long 1072693248 - .long 729983843 - .long 1068994194 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1512545955 - .long 3215602695 - .long 0 - .long 0 - .long 1127048698 - .long 1067909459 - .long 0 - .long 0 - .long 2300200450 - .long 3214738415 - .long 3593250296 - .long 3217717209 - .long 3009365544 - .long 1066902117 - .long 1127373050 - .long 1071173457 - .long 3046103305 - .long 3213854947 - .long 24583402 - .long 3217207636 - .long 4082511758 - .long 1065914199 - .long 3223889699 - .long 1070020367 - .long 548927984 - .long 3212899404 - .long 558065897 - .long 3216433066 - .long 680073315 - .long 1064940726 - .long 388873200 - .long 1068944270 - .long 3763679576 - .long 3217651189 - .long 1497360404 - .long 3157194195 - .long 0 - .long 1072693248 - .long 64931152 - .long 1067729411 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1313038235 - .long 3214229379 - .long 0 - .long 0 - .long 1013878342 - .long 1067152618 - .long 0 - .long 0 - .long 3663426833 - .long 3213208931 - .long 3693284251 - .long 3216602456 - .long 650852232 - .long 1065882376 - .long 1996245381 - .long 1071000265 - .long 2008746170 - .long 3212147845 - .long 3055842593 - .long 3216062494 - .long 1495406348 - .long 1064652437 - .long 2269530157 - .long 1069711235 - .long 285563696 - .long 3211060113 - .long 1046897440 - .long 3215189513 - .long 233429731 - .long 1063453151 - .long 522045958 - .long 1068476590 - .long 2354785698 - .long 3216586427 - .long 1317599141 - .long 3159915781 - .long 0 - .long 1072693248 - .long 2828230105 - .long 1065606626 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1841940611 - .long 1071931184 - .long 1841940611 - .long 1076125488 - .long 0 - .long 1131937792 - .long 0 - .long 1127743488 - .long 1413758976 - .long 1069097467 - .long 1413742592 - .long 1069097467 - .long 1734819840 - .long 3174229945 - .long 1280049152 - .long 1028033571 - .long 923219018 - .long 984130272 - .long 57701189 - .long 988383790 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 1734816687 - .long 1026746297 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 4294705152 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 1130364928 - .long 0 - .long 0 - .long 0 - .long 1015021568 - .long 0 - .long 0 - .long 0 - .long 1017118720 - .long 0 - .long 0 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 0 - .long 1076887552 - .long 0 - .long 1072693248 - .type static_const_table,@object - .size static_const_table,5872 - .data - .hidden __libm_tancot_huge - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanf_wmt.S deleted file mode 100644 index 58ae7e0bf7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanf_wmt.S +++ /dev/null @@ -1,1045 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin tanf - .text - .align 16,0x90 - .globl tanf -tanf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $120, %esp - movl %ebx, 56(%esp) - call static_func - movl %eax, %ebx - movss 128(%esp), %xmm0 - subl $16, %esp - stmxcsr 4(%esp) - movl 4(%esp), %eax - andl $-24577, %eax - cmpl %eax, 4(%esp) - jne .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - pextrw $1, %xmm0, %eax - andl $32767, %eax - subl $128, %eax - cmpl $18175, %eax - ja .L_2TAG_PACKET_2.0.2 - movsd 2656(%ebx), %xmm1 - mulss %xmm0, %xmm1 - movapd 2544(%ebx), %xmm7 - cvtss2si %xmm1, %edx - andpd %xmm0, %xmm7 - cvtss2sd %xmm0, %xmm0 -.L_2TAG_PACKET_3.0.2: - movsd 2672(%ebx), %xmm4 - addss %xmm1, %xmm4 - addss 2704(%ebx), %xmm1 - subss 2672(%ebx), %xmm4 - subss 2704(%ebx), %xmm1 - movapd %xmm7, %xmm5 - psllq $32, %xmm7 - psllq $29, %xmm5 - xorpd %xmm5, %xmm7 - addl $1865216, %edx - andl $31, %edx - movsd 2608(%ebx), %xmm5 - xorpd %xmm7, %xmm5 - movsd 2576(%ebx), %xmm2 - xorpd %xmm7, %xmm2 - movsd 2592(%ebx), %xmm6 - xorpd %xmm7, %xmm6 - movsd 2560(%ebx), %xmm3 - xorpd %xmm7, %xmm3 - lea (%ebx), %eax - shll $3, %edx - addl %edx, %eax - shll $3, %edx - addl %edx, %eax - psllq $29, %xmm4 - psllq $29, %xmm1 - mulsd %xmm4, %xmm5 - mulsd %xmm1, %xmm2 - mulsd %xmm4, %xmm6 - mulsd %xmm1, %xmm3 - addsd %xmm0, %xmm5 - addsd %xmm0, %xmm2 - addsd %xmm6, %xmm5 - addsd %xmm3, %xmm2 - movsd 2624(%ebx), %xmm7 - divsd %xmm5, %xmm7 - mulsd 64(%eax), %xmm7 - movsd 56(%eax), %xmm3 - mulsd %xmm2, %xmm3 - movsd 24(%eax), %xmm4 - mulsd %xmm2, %xmm4 - movsd 40(%eax), %xmm5 - mulsd %xmm2, %xmm5 - movsd 8(%eax), %xmm6 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm2 - addsd 48(%eax), %xmm3 - addsd 16(%eax), %xmm4 - addsd 32(%eax), %xmm5 - addsd (%eax), %xmm6 - mulsd %xmm2, %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm2 - addsd %xmm5, %xmm3 - addsd %xmm6, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm4, %xmm3 - subsd %xmm7, %xmm3 - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_4.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_4.0.2: - movsd %xmm3, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_2.0.2: - jg .L_2TAG_PACKET_6.0.2 - cvtss2sd %xmm0, %xmm0 - mulsd 2640(%ebx), %xmm0 - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_7.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_7.0.2: - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, (%esp) - flds (%esp) - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_0.0.2: - movl 4(%esp), %eax - andl $-24577, %eax - movl %eax, 8(%esp) - ldmxcsr 8(%esp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_6.0.2: - movd %xmm0, %eax - andl $2139095040, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_8.0.2 - pshuflw $68, %xmm0, %xmm1 - movd %xmm0, %ecx - cvtps2pd %xmm1, %xmm1 - andl $2147483647, %ecx - subl $964689920, %ecx - shrl $23, %ecx - subl $27, %ecx - andl $65528, %ecx - movsd 2304(%ebx,%ecx,2), %xmm3 - movsd 2312(%ebx,%ecx,2), %xmm5 - movsd 2736(%ebx), %xmm2 - xorpd %xmm4, %xmm4 - movl $17352, %edx - pinsrw $3, %edx, %xmm4 - andpd %xmm3, %xmm2 - psllq $40, %xmm3 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm1 - movapd %xmm2, %xmm0 - addsd %xmm3, %xmm2 - movapd %xmm2, %xmm5 - subsd %xmm2, %xmm0 - addsd %xmm4, %xmm2 - addsd %xmm3, %xmm0 - movsd 2720(%ebx), %xmm6 - subsd %xmm4, %xmm2 - addsd %xmm1, %xmm0 - subsd %xmm2, %xmm5 - movsd %xmm5, %xmm1 - andpd 2768(%ebx), %xmm5 - subsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - movsd %xmm5, %xmm6 - mulsd 2752(%ebx), %xmm5 - mulsd 2760(%ebx), %xmm6 - mulsd 2720(%ebx), %xmm0 - addsd %xmm6, %xmm0 - movsd %xmm5, 8(%esp) - movsd %xmm0, 16(%esp) - cvtpd2ps %xmm5, %xmm2 - movss 2656(%ebx), %xmm1 - mulss %xmm2, %xmm1 - movaps 2544(%ebx), %xmm7 - cvtss2si %xmm1, %edx - andps %xmm2, %xmm7 - movsd 2672(%ebx), %xmm4 - addss %xmm1, %xmm4 - addss 2704(%ebx), %xmm1 - subss 2672(%ebx), %xmm4 - subss 2704(%ebx), %xmm1 - movapd %xmm7, %xmm5 - psllq $32, %xmm7 - psllq $29, %xmm5 - xorpd %xmm5, %xmm7 - addl $1865216, %edx - andl $31, %edx - movsd 2608(%ebx), %xmm5 - xorpd %xmm7, %xmm5 - movsd 2576(%ebx), %xmm2 - xorpd %xmm7, %xmm2 - movsd 2592(%ebx), %xmm6 - xorpd %xmm7, %xmm6 - movsd 2560(%ebx), %xmm3 - xorpd %xmm7, %xmm3 - lea (%ebx), %eax - shll $3, %edx - addl %edx, %eax - shll $3, %edx - addl %edx, %eax - psllq $29, %xmm4 - psllq $29, %xmm1 - mulsd %xmm4, %xmm5 - mulsd %xmm1, %xmm2 - mulsd %xmm4, %xmm6 - mulsd %xmm1, %xmm3 - addsd 8(%esp), %xmm5 - addsd 16(%esp), %xmm5 - addsd 8(%esp), %xmm2 - addsd 16(%esp), %xmm2 - addsd %xmm6, %xmm5 - addsd %xmm3, %xmm2 - movsd 2624(%ebx), %xmm7 - divsd %xmm5, %xmm7 - mulsd 64(%eax), %xmm7 - movsd 56(%eax), %xmm3 - mulsd %xmm2, %xmm3 - movsd 24(%eax), %xmm4 - mulsd %xmm2, %xmm4 - movsd 40(%eax), %xmm5 - mulsd %xmm2, %xmm5 - movsd 8(%eax), %xmm6 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm2 - addsd 48(%eax), %xmm3 - addsd 16(%eax), %xmm4 - addsd 32(%eax), %xmm5 - addsd (%eax), %xmm6 - mulsd %xmm2, %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm2 - addsd %xmm5, %xmm3 - addsd %xmm6, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm4, %xmm3 - subsd %xmm7, %xmm3 - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_9.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_9.0.2: - movsd %xmm3, (%esp) - fldl (%esp) - jmp .L_2TAG_PACKET_5.0.2 -.L_2TAG_PACKET_8.0.2: - movl 4(%esp), %eax - andl $-24577, %eax - cmpl 4(%esp), %eax - je .L_2TAG_PACKET_10.0.2 - stmxcsr 8(%esp) - movl 4(%esp), %eax - andl $24576, %eax - orl %eax, 8(%esp) - ldmxcsr 8(%esp) -.L_2TAG_PACKET_10.0.2: - movss %xmm0, (%esp) - flds (%esp) - fsubs (%esp) -.L_2TAG_PACKET_5.0.2: - addl $16, %esp - movl 56(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type tanf,@function - .size tanf,.-tanf - .data -# -- End tanf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 1431655765 - .long 1070945621 - .long 0 - .long 0 - .long 286331153 - .long 1069617425 - .long 0 - .long 0 - .long 463583772 - .long 1068212666 - .long 0 - .long 0 - .long 2354785698 - .long 1069102779 - .long 3310429884 - .long 1072703419 - .long 3693284251 - .long 1069118808 - .long 1996245381 - .long 1071000265 - .long 3055842593 - .long 1068578846 - .long 2269530157 - .long 1069711235 - .long 1046897440 - .long 1067705865 - .long 522045958 - .long 1068476590 - .long 0 - .long 0 - .long 3763679576 - .long 1070167541 - .long 404682282 - .long 1072734736 - .long 3593250296 - .long 1070233561 - .long 1127373050 - .long 1071173457 - .long 24583402 - .long 1069723988 - .long 3223889699 - .long 1070020367 - .long 558065897 - .long 1068949418 - .long 388873200 - .long 1068944270 - .long 0 - .long 0 - .long 895247324 - .long 1070819848 - .long 582494902 - .long 1072789737 - .long 3631919291 - .long 1070936926 - .long 2031366438 - .long 1071495745 - .long 1509038701 - .long 1070601643 - .long 3785344682 - .long 1070618476 - .long 3233018412 - .long 1069913186 - .long 1065584192 - .long 1069747896 - .long 0 - .long 0 - .long 2583490354 - .long 1071284857 - .long 855738471 - .long 1072873155 - .long 2616040238 - .long 1071582937 - .long 2529240549 - .long 1071836633 - .long 2251697184 - .long 1071253687 - .long 1263091857 - .long 1071190461 - .long 2476932470 - .long 1070842002 - .long 855891755 - .long 1070696894 - .long 0 - .long 0 - .long 419968236 - .long 1071717047 - .long 1813808633 - .long 1072992828 - .long 1037049034 - .long 1072037305 - .long 1447406859 - .long 1072265209 - .long 3205232916 - .long 1071968658 - .long 1066110976 - .long 1071946035 - .long 1496754229 - .long 1071807201 - .long 4014441989 - .long 1071736222 - .long 0 - .long 0 - .long 716700048 - .long 1071997368 - .long 274476850 - .long 1073161398 - .long 3912524733 - .long 1072622983 - .long 4107767972 - .long 1072827408 - .long 946523347 - .long 1072772766 - .long 581531518 - .long 1072826391 - .long 3718905905 - .long 1072832823 - .long 513572637 - .long 1072861969 - .long 0 - .long 0 - .long 719595600 - .long 1072317184 - .long 1194536594 - .long 1073399478 - .long 1264738763 - .long 1073084804 - .long 1958936600 - .long 1073411493 - .long 4270740730 - .long 1073574708 - .long 1303998552 - .long 1073799186 - .long 1769828046 - .long 1073938542 - .long 433361110 - .long 1074105369 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 1073741824 - .long 0 - .long 1073741824 - .long 1431655765 - .long 1074091349 - .long 2863311531 - .long 1074440874 - .long 286331153 - .long 1074860305 - .long 95443718 - .long 1075163227 - .long 463583772 - .long 1075552698 - .long 0 - .long 0 - .long 1526324265 - .long 3217967566 - .long 457728975 - .long 1071088276 - .long 602185705 - .long 3215678092 - .long 555127889 - .long 1067545266 - .long 3690544014 - .long 3213150171 - .long 4003114407 - .long 1064581412 - .long 3759536023 - .long 3210559989 - .long 3837960785 - .long 1061790379 - .long 0 - .long 1072693248 - .long 719981842 - .long 3217669096 - .long 3749156607 - .long 1071048258 - .long 2754706541 - .long 3215359511 - .long 790323742 - .long 1067402587 - .long 4097292716 - .long 3212856302 - .long 2442796466 - .long 1064337602 - .long 170296152 - .long 3210060867 - .long 3614866008 - .long 1061361670 - .long 0 - .long 1072693248 - .long 701484222 - .long 3217377742 - .long 2267016812 - .long 1071015664 - .long 2223654598 - .long 3215071936 - .long 706390066 - .long 1067217386 - .long 1066252975 - .long 3212391267 - .long 3202745457 - .long 1064010682 - .long 1046243251 - .long 3209678971 - .long 2763962276 - .long 1060970161 - .long 0 - .long 1072693248 - .long 2829232582 - .long 3217092115 - .long 298675305 - .long 1070989821 - .long 1485063559 - .long 3214682643 - .long 3996381654 - .long 1067075828 - .long 2866066872 - .long 3211982662 - .long 3669764559 - .long 1063748136 - .long 1948234989 - .long 3209098147 - .long 3398041407 - .long 1060559728 - .long 0 - .long 1072693248 - .long 3593905368 - .long 3216590719 - .long 4076712227 - .long 1070970214 - .long 3144465176 - .long 3214191500 - .long 1618153340 - .long 1066971547 - .long 584032116 - .long 3211469261 - .long 4247487438 - .long 1063561943 - .long 3844233498 - .long 3208626322 - .long 3857199098 - .long 1060281647 - .long 0 - .long 1072693248 - .long 3789571175 - .long 3216034914 - .long 3870939386 - .long 1070956467 - .long 628750575 - .long 3213566872 - .long 2954464709 - .long 1066900026 - .long 1466315631 - .long 3210837162 - .long 2766187256 - .long 1063437894 - .long 3695969289 - .long 3207854418 - .long 3095830084 - .long 1060095334 - .long 0 - .long 1072693248 - .long 1858778712 - .long 3214984212 - .long 2242038011 - .long 1070948320 - .long 2507068734 - .long 3212502004 - .long 2446607349 - .long 1066858259 - .long 1349489537 - .long 3209765608 - .long 1721283327 - .long 1063366855 - .long 3852528092 - .long 3206760861 - .long 1758739894 - .long 1059895449 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 1431655765 - .long 1070945621 - .long 0 - .long 0 - .long 381774871 - .long 1066844524 - .long 0 - .long 0 - .long 3154187623 - .long 1063343722 - .long 0 - .long 0 - .long 2469719819 - .long 1059831159 - .long 0 - .long 1072693248 - .long 1858778712 - .long 1067500564 - .long 2242038011 - .long 1070948320 - .long 2507068734 - .long 1065018356 - .long 2446607349 - .long 1066858259 - .long 1349489537 - .long 1062281960 - .long 1721283327 - .long 1063366855 - .long 3852528092 - .long 1059277213 - .long 1758739894 - .long 1059895449 - .long 0 - .long 1072693248 - .long 3789571175 - .long 1068551266 - .long 3870939386 - .long 1070956467 - .long 628750575 - .long 1066083224 - .long 2954464709 - .long 1066900026 - .long 1466315631 - .long 1063353514 - .long 2766187256 - .long 1063437894 - .long 3695969289 - .long 1060370770 - .long 3095830084 - .long 1060095334 - .long 0 - .long 1072693248 - .long 3593905368 - .long 1069107071 - .long 4076712227 - .long 1070970214 - .long 3144465176 - .long 1066707852 - .long 1618153340 - .long 1066971547 - .long 584032116 - .long 1063985613 - .long 4247487438 - .long 1063561943 - .long 3844233498 - .long 1061142674 - .long 3857199098 - .long 1060281647 - .long 0 - .long 1072693248 - .long 2829232582 - .long 1069608467 - .long 298675305 - .long 1070989821 - .long 1485063559 - .long 1067198995 - .long 3996381654 - .long 1067075828 - .long 2866066872 - .long 1064499014 - .long 3669764559 - .long 1063748136 - .long 1948234989 - .long 1061614499 - .long 3398041407 - .long 1060559728 - .long 0 - .long 1072693248 - .long 701484222 - .long 1069894094 - .long 2267016812 - .long 1071015664 - .long 2223654598 - .long 1067588288 - .long 706390066 - .long 1067217386 - .long 1066252975 - .long 1064907619 - .long 3202745457 - .long 1064010682 - .long 1046243251 - .long 1062195323 - .long 2763962276 - .long 1060970161 - .long 0 - .long 1072693248 - .long 719981842 - .long 1070185448 - .long 3749156607 - .long 1071048258 - .long 2754706541 - .long 1067875863 - .long 790323742 - .long 1067402587 - .long 4097292716 - .long 1065372654 - .long 2442796466 - .long 1064337602 - .long 170296152 - .long 1062577219 - .long 3614866008 - .long 1061361670 - .long 0 - .long 1072693248 - .long 1526324265 - .long 1070483918 - .long 457728975 - .long 1071088276 - .long 602185705 - .long 1068194444 - .long 555127889 - .long 1067545266 - .long 3690544014 - .long 1065666523 - .long 4003114407 - .long 1064581412 - .long 3759536023 - .long 1063076341 - .long 3837960785 - .long 1061790379 - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .long 0 - .long 1073741824 - .long 0 - .long 3221225472 - .long 1431655765 - .long 1074091349 - .long 2863311531 - .long 3221924522 - .long 286331153 - .long 1074860305 - .long 95443718 - .long 3222646875 - .long 463583772 - .long 1075552698 - .long 0 - .long 0 - .long 719595600 - .long 3219800832 - .long 1194536594 - .long 1073399478 - .long 1264738763 - .long 3220568452 - .long 1958936600 - .long 1073411493 - .long 4270740730 - .long 3221058356 - .long 1303998552 - .long 1073799186 - .long 1769828046 - .long 3221422190 - .long 433361110 - .long 1074105369 - .long 0 - .long 0 - .long 716700048 - .long 3219481016 - .long 274476850 - .long 1073161398 - .long 3912524733 - .long 3220106631 - .long 4107767972 - .long 1072827408 - .long 946523347 - .long 3220256414 - .long 581531518 - .long 1072826391 - .long 3718905905 - .long 3220316471 - .long 513572637 - .long 1072861969 - .long 0 - .long 0 - .long 419968236 - .long 3219200695 - .long 1813808633 - .long 1072992828 - .long 1037049034 - .long 3219520953 - .long 1447406859 - .long 1072265209 - .long 3205232916 - .long 3219452306 - .long 1066110976 - .long 1071946035 - .long 1496754229 - .long 3219290849 - .long 4014441989 - .long 1071736222 - .long 0 - .long 0 - .long 2583490354 - .long 3218768505 - .long 855738471 - .long 1072873155 - .long 2616040238 - .long 3219066585 - .long 2529240549 - .long 1071836633 - .long 2251697184 - .long 3218737335 - .long 1263091857 - .long 1071190461 - .long 2476932470 - .long 3218325650 - .long 855891755 - .long 1070696894 - .long 0 - .long 0 - .long 895247324 - .long 3218303496 - .long 582494902 - .long 1072789737 - .long 3631919291 - .long 3218420574 - .long 2031366438 - .long 1071495745 - .long 1509038701 - .long 3218085291 - .long 3785344682 - .long 1070618476 - .long 3233018412 - .long 3217396834 - .long 1065584192 - .long 1069747896 - .long 0 - .long 0 - .long 3763679576 - .long 3217651189 - .long 404682282 - .long 1072734736 - .long 3593250296 - .long 3217717209 - .long 1127373050 - .long 1071173457 - .long 24583402 - .long 3217207636 - .long 3223889699 - .long 1070020367 - .long 558065897 - .long 3216433066 - .long 388873200 - .long 1068944270 - .long 0 - .long 0 - .long 2354785698 - .long 3216586427 - .long 3310429884 - .long 1072703419 - .long 3693284251 - .long 3216602456 - .long 1996245381 - .long 1071000265 - .long 3055842593 - .long 3216062494 - .long 2269530157 - .long 1069711235 - .long 1046897440 - .long 3215189513 - .long 522045958 - .long 1068476590 - .long 0 - .long 0 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1916669064 - .long 1072155675 - .long 660066805 - .long 1024797180 - .long 3829231700 - .long 1062745828 - .long 2884172442 - .long 1017445907 - .long 540874025 - .long 1055617650 - .long 4198409884 - .long 1011844330 - .long 2839315448 - .long 1046639136 - .long 4204424928 - .long 1000582120 - .long 1329339431 - .long 1038229673 - .long 1295478839 - .long 993391741 - .long 658191860 - .long 1024797180 - .long 3691886121 - .long 979325773 - .long 1966800710 - .long 1020436418 - .long 1882642597 - .long 977095991 - .long 2100977488 - .long 1012908661 - .long 1840335565 - .long 967470816 - .long 4198093645 - .long 1000582120 - .long 3307942521 - .long 957055414 - .long 2839123165 - .long 996851343 - .long 1387472776 - .long 952638316 - .long 2788761024 - .long 988712873 - .long 3005712498 - .long 944467026 - .long 3694676832 - .long 979325773 - .long 1326507024 - .long 934847846 - .long 221775557 - .long 970149340 - .long 1133527550 - .long 924162364 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 3409656221 - .long 1972279101 - .long 0 - .long 0 - .long 1414004736 - .long 4156105211 - .long 0 - .long 0 - .long 1280075305 - .long 4115041315 - .long 0 - .long 0 - .long 1413742592 - .long 4156105211 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 4194304 - .long 1072693248 - .long 0 - .long 0 - .long 1092811139 - .long 0 - .long 0 - .long 0 - .long 1296039936 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 1262485504 - .long 0 - .long 0 - .long 0 - .long 1413754136 - .long 1067000315 - .long 0 - .long 0 - .long 4278190080 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 1067000315 - .long 1175561766 - .long 1043665163 - .long 4290772992 - .long 4294967295 - .long 4290772992 - .long 4294967295 - .type static_const_table,@object - .size static_const_table,2784 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanh_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanh_wmt.S deleted file mode 100644 index a232a7d3a0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanh_wmt.S +++ /dev/null @@ -1,1329 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanh_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin tanh - .text - .align 16,0x90 - .globl tanh -tanh: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movsd 4256(%ebx), %xmm3 - xorpd %xmm4, %xmm4 - movsd 4112(%ebx), %xmm1 - movsd 4120(%ebx), %xmm2 - movl $32768, %eax - pinsrw $3, %eax, %xmm4 - movsd 4096(%ebx), %xmm6 - pextrw $3, %xmm0, %ecx - andpd %xmm0, %xmm3 - andnpd %xmm0, %xmm4 - pshufd $68, %xmm4, %xmm5 - movl $32768, %edx - andl %ecx, %edx - andl $32767, %ecx - subl $16304, %ecx - cmpl $144, %ecx - jae .L_2TAG_PACKET_0.0.2 - subsd %xmm3, %xmm4 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm2 - cvtsd2si %xmm3, %eax - movapd %xmm3, %xmm7 - addsd %xmm6, %xmm3 - mulsd %xmm4, %xmm1 - movsd 4264(%ebx), %xmm4 - subsd %xmm6, %xmm3 - xorpd %xmm0, %xmm0 - addsd %xmm1, %xmm2 - subsd %xmm3, %xmm7 - movapd 4128(%ebx), %xmm6 - addsd %xmm7, %xmm2 - movl $255, %ecx - andl %eax, %ecx - addl %ecx, %ecx - movapd (%ebx,%ecx,8), %xmm5 - shrl $4, %eax - andl $65520, %eax - subl $16368, %eax - negl %eax - pinsrw $3, %eax, %xmm0 - movapd 4144(%ebx), %xmm1 - pshufd $68, %xmm0, %xmm0 - mulpd %xmm5, %xmm0 - movsd 4160(%ebx), %xmm7 - pshufd $68, %xmm2, %xmm2 - movapd %xmm4, %xmm5 - addsd %xmm0, %xmm4 - mulpd %xmm2, %xmm6 - mulsd %xmm2, %xmm7 - mulpd %xmm2, %xmm2 - addpd %xmm6, %xmm1 - mulsd %xmm2, %xmm2 - movsd 4264(%ebx), %xmm3 - mulpd %xmm2, %xmm1 - pshufd $78, %xmm1, %xmm6 - addsd %xmm6, %xmm1 - movapd %xmm1, %xmm6 - addsd %xmm7, %xmm1 - mulsd %xmm0, %xmm1 - addsd %xmm4, %xmm1 - andpd 4224(%ebx), %xmm4 - divsd %xmm1, %xmm5 - subsd %xmm4, %xmm3 - pshufd $238, %xmm0, %xmm1 - addsd %xmm0, %xmm3 - movapd %xmm4, %xmm2 - addsd %xmm1, %xmm3 - mulsd %xmm7, %xmm1 - mulsd %xmm0, %xmm7 - addsd %xmm1, %xmm3 - addsd %xmm7, %xmm4 - movsd 4240(%ebx), %xmm1 - mulsd %xmm0, %xmm6 - andpd 4224(%ebx), %xmm4 - addsd %xmm6, %xmm3 - movapd %xmm4, %xmm6 - subsd %xmm4, %xmm2 - addsd %xmm7, %xmm2 - movsd 4264(%ebx), %xmm7 - andpd %xmm1, %xmm5 - addsd %xmm2, %xmm3 - mulsd %xmm5, %xmm4 - xorpd %xmm2, %xmm2 - mulsd %xmm5, %xmm3 - subsd 4272(%ebx), %xmm6 - subsd %xmm7, %xmm4 - xorl $32768, %edx - pinsrw $3, %edx, %xmm2 - addsd %xmm3, %xmm4 - mulsd %xmm5, %xmm6 - movapd %xmm3, %xmm1 - mulsd %xmm4, %xmm3 - movapd %xmm6, %xmm0 - mulsd %xmm4, %xmm6 - subsd %xmm3, %xmm1 - subsd %xmm6, %xmm1 - addsd %xmm1, %xmm0 - xorpd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_0.0.2: - addl $960, %ecx - cmpl $1104, %ecx - jae .L_2TAG_PACKET_2.0.2 - movapd 4176(%ebx), %xmm2 - pshufd $68, %xmm0, %xmm1 - movapd 4192(%ebx), %xmm3 - mulpd %xmm1, %xmm1 - movapd 4208(%ebx), %xmm4 - mulpd %xmm1, %xmm2 - pshufd $68, %xmm1, %xmm5 - addpd %xmm3, %xmm2 - mulsd %xmm5, %xmm5 - mulpd %xmm1, %xmm2 - mulsd %xmm5, %xmm5 - addpd %xmm4, %xmm2 - mulpd %xmm5, %xmm2 - pshufd $238, %xmm2, %xmm5 - addsd %xmm5, %xmm2 - mulsd %xmm0, %xmm2 - addsd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - addl $15344, %ecx - cmpl $16448, %ecx - jae .L_2TAG_PACKET_3.0.2 - cmpl $16, %ecx - jb .L_2TAG_PACKET_4.0.2 - xorpd %xmm2, %xmm2 - movl $17392, %eax - pinsrw $3, %eax, %xmm2 - mulsd %xmm0, %xmm2 - addsd %xmm0, %xmm2 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_4.0.2: - movapd %xmm0, %xmm2 - mulsd %xmm2, %xmm2 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_3.0.2: - cmpl $32752, %ecx - jae .L_2TAG_PACKET_5.0.2 - xorpd %xmm2, %xmm2 - movl $15344, %ecx - pinsrw $3, %ecx, %xmm2 - movapd %xmm2, %xmm3 - mulsd %xmm2, %xmm2 - addsd %xmm3, %xmm2 -.L_2TAG_PACKET_6.0.2: - xorpd %xmm0, %xmm0 - orl $16368, %edx - pinsrw $3, %edx, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_5.0.2: - movapd %xmm0, %xmm2 - movd %xmm0, %eax - psrlq $20, %xmm2 - movd %xmm2, %ecx - orl %eax, %ecx - cmpl $0, %ecx - je .L_2TAG_PACKET_6.0.2 - addsd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_1.0.2: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_7.0.2: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type tanh,@function - .size tanh,.-tanh - .data -# -- End tanh - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 1797923801 - .long 1072687577 - .long 1950547427 - .long 1013229059 - .long 730821105 - .long 1072681922 - .long 2523232743 - .long 1012067188 - .long 915592468 - .long 1072676282 - .long 352947894 - .long 3161024371 - .long 2174652632 - .long 1072670657 - .long 4087714590 - .long 1014450259 - .long 35929225 - .long 1072665048 - .long 2809788041 - .long 3159436968 - .long 2912730644 - .long 1072659453 - .long 3490067722 - .long 3163405074 - .long 2038973688 - .long 1072653874 - .long 892941374 - .long 1016046459 - .long 1533953344 - .long 1072648310 - .long 769171851 - .long 1015665633 - .long 1222472308 - .long 1072642761 - .long 1054357470 - .long 3161021018 - .long 929806999 - .long 1072637227 - .long 3205336643 - .long 1015259557 - .long 481706282 - .long 1072631708 - .long 1696079173 - .long 3162710528 - .long 3999357479 - .long 1072626203 - .long 2258941616 - .long 1015924724 - .long 2719515920 - .long 1072620714 - .long 2760332941 - .long 1015137933 - .long 764307441 - .long 1072615240 - .long 3021057420 - .long 3163329523 - .long 2256325230 - .long 1072609780 - .long 580117746 - .long 1015317295 - .long 2728693978 - .long 1072604335 - .long 396109971 - .long 3163462691 - .long 2009970496 - .long 1072598905 - .long 2159039665 - .long 3162572948 - .long 4224142467 - .long 1072593489 - .long 3389820386 - .long 1015207202 - .long 610758006 - .long 1072588089 - .long 1965209397 - .long 3161866232 - .long 3884662774 - .long 1072582702 - .long 2158611599 - .long 1014210185 - .long 991358482 - .long 1072577331 - .long 838715019 - .long 3163157668 - .long 351641897 - .long 1072571974 - .long 2172261526 - .long 3163010599 - .long 1796832535 - .long 1072566631 - .long 3176955716 - .long 3160585513 - .long 863738719 - .long 1072561303 - .long 1326992220 - .long 3162613197 - .long 1679558232 - .long 1072555989 - .long 2390342287 - .long 3163333970 - .long 4076975200 - .long 1072550689 - .long 2029000899 - .long 1015208535 - .long 3594158869 - .long 1072545404 - .long 2456521700 - .long 3163256561 - .long 64696965 - .long 1072540134 - .long 1768797490 - .long 1015816960 - .long 1912561781 - .long 1072534877 - .long 3147495102 - .long 1015678253 - .long 382305176 - .long 1072529635 - .long 2347622376 - .long 3162578625 - .long 3898795731 - .long 1072524406 - .long 1249994144 - .long 1011869818 - .long 3707479175 - .long 1072519192 - .long 3613079303 - .long 1014164738 - .long 3939148246 - .long 1072513992 - .long 3210352148 - .long 1015274323 - .long 135105010 - .long 1072508807 - .long 1906148728 - .long 3163375739 - .long 721996136 - .long 1072503635 - .long 563754734 - .long 1015371318 - .long 1242007932 - .long 1072498477 - .long 1132034716 - .long 3163339831 - .long 1532734324 - .long 1072493333 - .long 3094216535 - .long 3163162857 - .long 1432208378 - .long 1072488203 - .long 1401068914 - .long 3162363963 - .long 778901109 - .long 1072483087 - .long 2248183955 - .long 3161268751 - .long 3706687593 - .long 1072477984 - .long 3521726940 - .long 1013253067 - .long 1464976603 - .long 1072472896 - .long 3507292405 - .long 3161977534 - .long 2483480501 - .long 1072467821 - .long 1216371780 - .long 1013034172 - .long 2307442995 - .long 1072462760 - .long 3190117721 - .long 3162404539 - .long 777507147 - .long 1072457713 - .long 4282924205 - .long 1015187533 - .long 2029714210 - .long 1072452679 - .long 613660079 - .long 1015099143 - .long 1610600570 - .long 1072447659 - .long 3766732298 - .long 1015760183 - .long 3657065772 - .long 1072442652 - .long 399025623 - .long 3162957078 - .long 3716502172 - .long 1072437659 - .long 2303740125 - .long 1014042725 - .long 1631695677 - .long 1072432680 - .long 2717633076 - .long 3162344026 - .long 1540824585 - .long 1072427714 - .long 1064017011 - .long 3163487690 - .long 3287523847 - .long 1072422761 - .long 1625971539 - .long 3157009955 - .long 2420883922 - .long 1072417822 - .long 2049810052 - .long 1014119888 - .long 3080351519 - .long 1072412896 - .long 3379126788 - .long 3157218001 - .long 815859274 - .long 1072407984 - .long 240396590 - .long 3163487443 - .long 4062661092 - .long 1072403084 - .long 1422616006 - .long 3163255318 - .long 4076559943 - .long 1072398198 - .long 2119478331 - .long 3160758351 - .long 703710506 - .long 1072393326 - .long 1384660846 - .long 1015195891 - .long 2380618042 - .long 1072388466 - .long 3149557219 - .long 3163320799 - .long 364333489 - .long 1072383620 - .long 3923737744 - .long 3161421373 - .long 3092190715 - .long 1072378786 - .long 814012168 - .long 3159523422 - .long 1822067026 - .long 1072373966 - .long 1241994956 - .long 1015340290 - .long 697153126 - .long 1072369159 - .long 1283515429 - .long 3163283189 - .long 3861050111 - .long 1072364364 - .long 254893773 - .long 3162813180 - .long 2572866477 - .long 1072359583 - .long 878562433 - .long 1015521741 - .long 977020788 - .long 1072354815 - .long 3065100517 - .long 1015541563 - .long 3218338682 - .long 1072350059 - .long 3404164304 - .long 3162477108 - .long 557149882 - .long 1072345317 - .long 3672720709 - .long 1014537265 - .long 1434058175 - .long 1072340587 - .long 251133233 - .long 1015085769 - .long 1405169241 - .long 1072335870 - .long 2998539689 - .long 3162830951 - .long 321958744 - .long 1072331166 - .long 3401933767 - .long 1015794558 - .long 2331271250 - .long 1072326474 - .long 812057446 - .long 1012207446 - .long 2990417245 - .long 1072321795 - .long 3683467745 - .long 3163369326 - .long 2152073944 - .long 1072317129 - .long 1486860576 - .long 3163203456 - .long 3964284211 - .long 1072312475 - .long 2111583915 - .long 1015427164 - .long 3985553595 - .long 1072307834 - .long 4002146062 - .long 1015834136 - .long 2069751141 - .long 1072303206 - .long 1562170675 - .long 3162724681 - .long 2366108318 - .long 1072298590 - .long 2867985102 - .long 3161762254 - .long 434316067 - .long 1072293987 - .long 2028358766 - .long 1013458122 - .long 424392917 - .long 1072289396 - .long 2749202995 - .long 3162838718 - .long 2191782032 - .long 1072284817 - .long 2960257726 - .long 1013742662 - .long 1297350157 - .long 1072280251 - .long 1308022040 - .long 3163412558 - .long 1892288442 - .long 1072275697 - .long 2446255666 - .long 3162600381 - .long 3833209506 - .long 1072271155 - .long 2722920684 - .long 1013754842 - .long 2682146384 - .long 1072266626 - .long 2082178513 - .long 3163363419 - .long 2591453363 - .long 1072262109 - .long 2132396182 - .long 3159074198 - .long 3418903055 - .long 1072257604 - .long 2527457337 - .long 3160820604 - .long 727685349 - .long 1072253112 - .long 2038246809 - .long 3162358742 - .long 2966275557 - .long 1072248631 - .long 2176155324 - .long 3159842759 - .long 1403662306 - .long 1072244163 - .long 2788809599 - .long 3161671007 - .long 194117574 - .long 1072239707 - .long 777528612 - .long 3163412089 - .long 3492293770 - .long 1072235262 - .long 2248032210 - .long 1015386826 - .long 2568320822 - .long 1072230830 - .long 2732824428 - .long 1014352915 - .long 1577608921 - .long 1072226410 - .long 1875489510 - .long 3162968394 - .long 380978316 - .long 1072222002 - .long 854188970 - .long 3160462686 - .long 3134592888 - .long 1072217605 - .long 4232266862 - .long 1015991134 - .long 1110089947 - .long 1072213221 - .long 1451641639 - .long 1015474673 - .long 2759350287 - .long 1072208848 - .long 1148526634 - .long 1015894933 - .long 3649726105 - .long 1072204487 - .long 4085036346 - .long 1015649474 - .long 3643909174 - .long 1072200138 - .long 3537586109 - .long 1014354647 - .long 2604962541 - .long 1072195801 - .long 2614425274 - .long 3163539192 - .long 396319521 - .long 1072191476 - .long 4172420816 - .long 3159074632 - .long 1176749997 - .long 1072187162 - .long 2738998779 - .long 3162035844 - .long 515457527 - .long 1072182860 - .long 836709333 - .long 1015651226 - .long 2571947539 - .long 1072178569 - .long 3558159064 - .long 3163376669 - .long 2916157145 - .long 1072174290 - .long 219487565 - .long 1015309367 - .long 1413356050 - .long 1072170023 - .long 1651349291 - .long 3162668166 - .long 2224145553 - .long 1072165767 - .long 3482522030 - .long 3161489169 - .long 919555682 - .long 1072161523 - .long 3121969534 - .long 1012948226 - .long 1660913392 - .long 1072157290 - .long 4218599604 - .long 1015135707 - .long 19972402 - .long 1072153069 - .long 3507899862 - .long 1016009292 - .long 158781403 - .long 1072148859 - .long 2221464712 - .long 3163286453 - .long 1944781191 - .long 1072144660 - .long 3993278767 - .long 3161724279 - .long 950803702 - .long 1072140473 - .long 1655364926 - .long 1015237032 - .long 1339972927 - .long 1072136297 - .long 167908909 - .long 1015572152 - .long 2980802057 - .long 1072132132 - .long 378619896 - .long 1015773303 - .long 1447192521 - .long 1072127979 - .long 1462857171 - .long 3162514521 - .long 903334909 - .long 1072123837 - .long 1636462108 - .long 1015039997 - .long 1218806132 - .long 1072119706 - .long 1818613052 - .long 3162548441 - .long 2263535754 - .long 1072115586 - .long 752233586 - .long 3162639008 - .long 3907805044 - .long 1072111477 - .long 2257091225 - .long 3161550407 - .long 1727278727 - .long 1072107380 - .long 3562710623 - .long 1011471940 - .long 4182873220 - .long 1072103293 - .long 629542646 - .long 3161996303 - .long 2555984613 - .long 1072099218 - .long 2652555442 - .long 3162552692 - .long 1013258799 - .long 1072095154 - .long 1748797611 - .long 3160129082 - .long 3721688645 - .long 1072091100 - .long 3069276937 - .long 1015839401 - .long 1963711167 - .long 1072087058 - .long 1744767757 - .long 3160574294 - .long 4201977662 - .long 1072083026 - .long 748330254 - .long 1013594357 - .long 1719614413 - .long 1072079006 - .long 330458198 - .long 3163282740 - .long 2979960120 - .long 1072074996 - .long 2599109725 - .long 1014498493 - .long 3561793907 - .long 1072070997 - .long 1157054053 - .long 1011890350 - .long 3339203574 - .long 1072067009 - .long 1483497780 - .long 3162408754 - .long 2186617381 - .long 1072063032 - .long 2270764084 - .long 3163272713 - .long 4273770423 - .long 1072059065 - .long 3383180809 - .long 3163218901 - .long 885834528 - .long 1072055110 - .long 1973258547 - .long 3162261564 - .long 488188413 - .long 1072051165 - .long 3199821029 - .long 1015564048 - .long 2956612997 - .long 1072047230 - .long 2118169751 - .long 3162735553 - .long 3872257780 - .long 1072043306 - .long 1253592103 - .long 1015958334 - .long 3111574537 - .long 1072039393 - .long 2606161479 - .long 3162759746 - .long 551349105 - .long 1072035491 - .long 3821916050 - .long 3162106589 - .long 363667784 - .long 1072031599 - .long 813753950 - .long 1015785209 - .long 2425981843 - .long 1072027717 - .long 2830390851 - .long 3163346599 - .long 2321106615 - .long 1072023846 - .long 2171176610 - .long 1009535771 - .long 4222122499 - .long 1072019985 - .long 1277378074 - .long 3163256737 - .long 3712504873 - .long 1072016135 - .long 88491949 - .long 1015427660 - .long 671025100 - .long 1072012296 - .long 3832014351 - .long 3163022030 - .long 3566716925 - .long 1072008466 - .long 1536826856 - .long 1014142433 - .long 3689071823 - .long 1072004647 - .long 2321004996 - .long 3162552716 - .long 917841882 - .long 1072000839 - .long 18715565 - .long 1015659308 - .long 3723038930 - .long 1071997040 - .long 378465264 - .long 3162569582 - .long 3395129871 - .long 1071993252 - .long 4025345435 - .long 3162335388 - .long 4109806887 - .long 1071989474 - .long 422403966 - .long 1014469229 - .long 1453150082 - .long 1071985707 - .long 498154669 - .long 3161488062 - .long 3896463087 - .long 1071981949 - .long 1139797873 - .long 3161233805 - .long 2731501122 - .long 1071978202 - .long 1774031855 - .long 3162470021 - .long 2135241198 - .long 1071974465 - .long 1236747871 - .long 1013589147 - .long 1990012071 - .long 1071970738 - .long 3529070563 - .long 3162813193 - .long 2178460671 - .long 1071967021 - .long 777878098 - .long 3162842493 - .long 2583551245 - .long 1071963314 - .long 3161094195 - .long 1015606491 - .long 3088564500 - .long 1071959617 - .long 1762311517 - .long 1015045673 - .long 3577096743 - .long 1071955930 - .long 2951496418 - .long 1013793687 - .long 3933059031 - .long 1071952253 - .long 2133366768 - .long 3161531832 - .long 4040676318 - .long 1071948586 - .long 4090609238 - .long 1015663458 - .long 3784486610 - .long 1071944929 - .long 1581883040 - .long 3161698953 - .long 3049340112 - .long 1071941282 - .long 3062915824 - .long 1013170595 - .long 1720398391 - .long 1071937645 - .long 3980678963 - .long 3163300080 - .long 3978100823 - .long 1071934017 - .long 3513027190 - .long 1015845963 - .long 1118294578 - .long 1071930400 - .long 2197495694 - .long 3159909401 - .long 1617004845 - .long 1071926792 - .long 82804944 - .long 1010342778 - .long 1065662932 - .long 1071923194 - .long 2533670915 - .long 1014530238 - .long 3645941911 - .long 1071919605 - .long 3814685081 - .long 3161573341 - .long 654919306 - .long 1071916027 - .long 3232961757 - .long 3163047469 - .long 569847338 - .long 1071912458 - .long 472945272 - .long 3159290729 - .long 3278348324 - .long 1071908898 - .long 3069497416 - .long 1014750712 - .long 78413852 - .long 1071905349 - .long 4183226867 - .long 3163017251 - .long 3743175029 - .long 1071901808 - .long 2072812490 - .long 3162175075 - .long 1276261410 - .long 1071898278 - .long 300981948 - .long 1014684169 - .long 1156440435 - .long 1071894757 - .long 2351451249 - .long 1013967056 - .long 3272845541 - .long 1071891245 - .long 928852419 - .long 3163488248 - .long 3219942644 - .long 1071887743 - .long 3798990616 - .long 1015368806 - .long 887463927 - .long 1071884251 - .long 3596744163 - .long 3160794166 - .long 460407023 - .long 1071880768 - .long 4237175092 - .long 3163138469 - .long 1829099622 - .long 1071877294 - .long 1016661181 - .long 3163461005 - .long 589198666 - .long 1071873830 - .long 2664346172 - .long 3163157962 - .long 926591435 - .long 1071870375 - .long 3208833762 - .long 3162913514 - .long 2732492859 - .long 1071866929 - .long 2691479646 - .long 3162255684 - .long 1603444721 - .long 1071863493 - .long 1548633640 - .long 3162201326 - .long 1726216749 - .long 1071860066 - .long 2466808228 - .long 3161676405 - .long 2992903935 - .long 1071856648 - .long 2218154406 - .long 1015228193 - .long 1000925746 - .long 1071853240 - .long 1018491672 - .long 3163309544 - .long 4232894513 - .long 1071849840 - .long 2383938684 - .long 1014668519 - .long 3991843581 - .long 1071846450 - .long 4092853457 - .long 1014585763 - .long 171030293 - .long 1071843070 - .long 3526460132 - .long 1014428778 - .long 1253935211 - .long 1071839698 - .long 1395382931 - .long 3159702613 - .long 2839424854 - .long 1071836335 - .long 1171596163 - .long 1013041679 - .long 526652809 - .long 1071832982 - .long 4223459736 - .long 1015879375 - .long 2799960843 - .long 1071829637 - .long 1423655381 - .long 1015022151 - .long 964107055 - .long 1071826302 - .long 2800439588 - .long 3162833221 - .long 3504003472 - .long 1071822975 - .long 3594001060 - .long 3157330652 - .long 1724976915 - .long 1071819658 - .long 420909223 - .long 3163117379 - .long 4112506593 - .long 1071816349 - .long 2947355221 - .long 1014371048 - .long 1972484976 - .long 1071813050 - .long 675290301 - .long 3161640050 - .long 3790955393 - .long 1071809759 - .long 2352942462 - .long 3163180090 - .long 874372905 - .long 1071806478 - .long 100263788 - .long 1015940732 - .long 1709341917 - .long 1071803205 - .long 2571168217 - .long 1014152499 - .long 1897844341 - .long 1071799941 - .long 1254300460 - .long 1015275938 - .long 1337108031 - .long 1071796686 - .long 3203724452 - .long 1014677845 - .long 4219606026 - .long 1071793439 - .long 2434574742 - .long 1014681548 - .long 1853186616 - .long 1071790202 - .long 3066496371 - .long 1015656574 - .long 2725843665 - .long 1071786973 - .long 1433917087 - .long 1014838523 - .long 2440944790 - .long 1071783753 - .long 2492769774 - .long 1014147454 - .long 897099801 - .long 1071780542 - .long 754756297 - .long 1015241005 - .long 2288159958 - .long 1071777339 - .long 2169144469 - .long 1014876021 - .long 2218315341 - .long 1071774145 - .long 2694295388 - .long 3163288868 - .long 586995997 - .long 1071770960 - .long 41662348 - .long 3162627992 - .long 1588871207 - .long 1071767783 - .long 143439582 - .long 3162963416 - .long 828946858 - .long 1071764615 - .long 10642492 - .long 1015939438 - .long 2502433899 - .long 1071761455 - .long 2148595913 - .long 1015023991 - .long 2214878420 - .long 1071758304 - .long 892270087 - .long 3163116422 - .long 4162030108 - .long 1071755161 - .long 2763428480 - .long 1015529349 - .long 3949972341 - .long 1071752027 - .long 2068408548 - .long 1014913868 - .long 1480023343 - .long 1071748902 - .long 2247196168 - .long 1015327453 - .long 948735466 - .long 1071745785 - .long 3516338028 - .long 3162574883 - .long 2257959872 - .long 1071742676 - .long 3802946148 - .long 1012964927 - .long 1014845819 - .long 1071739576 - .long 3117910646 - .long 3161559105 - .long 1416741826 - .long 1071736484 - .long 2196380210 - .long 1011413563 - .long 3366293073 - .long 1071733400 - .long 3119426314 - .long 1014120554 - .long 2471440686 - .long 1071730325 - .long 968836267 - .long 3162214888 - .long 2930322912 - .long 1071727258 - .long 2599499422 - .long 3162714047 - .long 351405227 - .long 1071724200 - .long 3125337328 - .long 3159822479 - .long 3228316108 - .long 1071721149 - .long 3010241991 - .long 3158422804 - .long 2875075254 - .long 1071718107 - .long 4144233330 - .long 3163333716 - .long 3490863953 - .long 1071715073 - .long 960797498 - .long 3162948880 - .long 685187902 - .long 1071712048 - .long 378731989 - .long 1014843115 - .long 2952712987 - .long 1071709030 - .long 3293494651 - .long 3160120301 - .long 1608493509 - .long 1071706021 - .long 3159622171 - .long 3162807737 - .long 852742562 - .long 1071703020 - .long 667253586 - .long 1009793559 - .long 590962156 - .long 1071700027 - .long 3829346666 - .long 3163275597 - .long 728909815 - .long 1071697042 - .long 383930225 - .long 1015029468 - .long 1172597893 - .long 1071694065 - .long 114433263 - .long 1015347593 - .long 1828292879 - .long 1071691096 - .long 1255956747 - .long 1015588398 - .long 2602514713 - .long 1071688135 - .long 2268929336 - .long 1014354284 - .long 3402036099 - .long 1071685182 - .long 405889334 - .long 1015105656 - .long 4133881824 - .long 1071682237 - .long 2148155345 - .long 3162931299 - .long 410360776 - .long 1071679301 - .long 1269990655 - .long 1011975870 - .long 728934454 - .long 1071676372 - .long 1413842688 - .long 1014178612 - .long 702412510 - .long 1071673451 - .long 3803266087 - .long 3162280415 - .long 238821257 - .long 1071670538 - .long 1469694871 - .long 3162884987 - .long 3541402996 - .long 1071667632 - .long 2759177317 - .long 1014854626 - .long 1928746161 - .long 1071664735 - .long 983617676 - .long 1014285177 - .long 3899555717 - .long 1071661845 - .long 427280750 - .long 3162546972 - .long 772914124 - .long 1071658964 - .long 4004372762 - .long 1012230161 - .long 1048019041 - .long 1071656090 - .long 1398474845 - .long 3160510595 - .long 339411585 - .long 1071653224 - .long 264588982 - .long 3161636657 - .long 2851812149 - .long 1071650365 - .long 2595802551 - .long 1015767337 - .long 4200250559 - .long 1071647514 - .long 2808127345 - .long 3161781938 - .long 0 - .long 1127743488 - .long 0 - .long 3275227136 - .long 1610612736 - .long 1082594631 - .long 4166901572 - .long 1055174155 - .long 3884607281 - .long 3168131199 - .long 3607404735 - .long 3190582024 - .long 1874480759 - .long 1032041131 - .long 4286760334 - .long 1053736893 - .long 4277811695 - .long 3211144770 - .long 0 - .long 0 - .long 236289503 - .long 1064135997 - .long 463583772 - .long 3215696314 - .long 1441186365 - .long 3212977891 - .long 286331153 - .long 1069617425 - .long 2284589306 - .long 1066820852 - .long 1431655765 - .long 3218429269 - .long 0 - .long 4294967280 - .long 0 - .long 4294967280 - .long 4294705152 - .long 4294967295 - .long 4294705152 - .long 4294967295 - .long 4160749568 - .long 2147483647 - .long 0 - .long 1072693248 - .long 0 - .long 1073741824 - .type static_const_table,@object - .size static_const_table,4280 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanhf_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanhf_wmt.S deleted file mode 100644 index b26daf3fdd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanhf_wmt.S +++ /dev/null @@ -1,291 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanhf_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin tanhf - .text - .align 16,0x90 - .globl tanhf -tanhf: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movss 112(%esp), %xmm0 - xorpd %xmm1, %xmm1 - movsd 304(%ebx), %xmm3 - movl $14336, %eax - pinsrw $3, %eax, %xmm1 - movsd 288(%ebx), %xmm6 - pextrw $1, %xmm0, %ecx - psllq $33, %xmm0 - psrlq $4, %xmm0 - paddw %xmm0, %xmm1 - movapd 256(%ebx), %xmm4 - movl $32768, %edx - andl %ecx, %edx - andl $32767, %ecx - subl $15744, %ecx - cmpl $1056, %ecx - jae .L_2TAG_PACKET_0.0.2 - mulsd %xmm1, %xmm3 - cvtsd2si %xmm3, %eax - movapd %xmm3, %xmm2 - addsd %xmm6, %xmm3 - xorpd %xmm0, %xmm0 - subsd %xmm6, %xmm3 - movapd 272(%ebx), %xmm1 - subsd %xmm3, %xmm2 - movl $31, %ecx - andl %eax, %ecx - movsd (%ebx,%ecx,8), %xmm5 - shrl $1, %eax - andl $65520, %eax - subl $16368, %eax - negl %eax - pshufd $68, %xmm2, %xmm2 - pinsrw $3, %eax, %xmm0 - mulpd %xmm2, %xmm4 - mulpd %xmm2, %xmm1 - movsd 312(%ebx), %xmm7 - xorpd %xmm3, %xmm3 - mulpd %xmm2, %xmm4 - mulpd %xmm2, %xmm2 - mulsd %xmm5, %xmm0 - addpd %xmm4, %xmm1 - pinsrw $3, %edx, %xmm3 - mulsd %xmm2, %xmm1 - movapd %xmm7, %xmm6 - pshufd $238, %xmm1, %xmm2 - addsd %xmm0, %xmm7 - addsd %xmm2, %xmm1 - subsd %xmm0, %xmm6 - mulsd %xmm1, %xmm0 - addsd %xmm0, %xmm7 - subsd %xmm0, %xmm6 - xorpd %xmm3, %xmm7 - divsd %xmm7, %xmm6 - cvtsd2ss %xmm6, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_0.0.2: - addl $1152, %ecx - cmpl $1152, %ecx - jae .L_2TAG_PACKET_2.0.2 - movl $-1117975087, %eax - movd %eax, %xmm1 - movss 112(%esp), %xmm0 - movl $-1096111445, %ecx - movd %ecx, %xmm3 - movl $1040746633, %edx - movd %edx, %xmm2 - pshufd $68, %xmm0, %xmm4 - mulss %xmm0, %xmm0 - mulss %xmm0, %xmm1 - mulss %xmm0, %xmm3 - mulss %xmm0, %xmm0 - addss %xmm2, %xmm1 - mulss %xmm1, %xmm0 - addss %xmm3, %xmm0 - mulss %xmm4, %xmm0 - addss %xmm4, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - addl $14592, %ecx - cmpl $15744, %ecx - jae .L_2TAG_PACKET_3.0.2 - movss 112(%esp), %xmm0 - cmpl $128, %ecx - jb .L_2TAG_PACKET_4.0.2 - movl $1333788672, %eax - movd %eax, %xmm2 - mulss %xmm0, %xmm2 - addss %xmm0, %xmm2 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_4.0.2: - movss %xmm0, %xmm2 - mulss %xmm2, %xmm2 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_3.0.2: - cmpl $32640, %ecx - jae .L_2TAG_PACKET_5.0.2 - movl $796917760, %eax - movd %eax, %xmm2 - movss %xmm2, %xmm3 - mulss %xmm2, %xmm2 - addss %xmm3, %xmm2 -.L_2TAG_PACKET_6.0.2: - xorps %xmm0, %xmm0 - orl $16256, %edx - pinsrw $1, %edx, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_5.0.2: - movl 112(%esp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_6.0.2 - movss 112(%esp), %xmm0 - addss %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_1.0.2: - movss %xmm0, 24(%esp) - flds 24(%esp) - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type tanhf,@function - .size tanhf,.-tanhf - .data -# -- End tanhf - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 0 - .long 1072693248 - .long 1533953344 - .long 1072648310 - .long 2728693978 - .long 1072604335 - .long 863738719 - .long 1072561303 - .long 3707479175 - .long 1072519192 - .long 3706687593 - .long 1072477984 - .long 3716502172 - .long 1072437659 - .long 4076559943 - .long 1072398198 - .long 2572866477 - .long 1072359583 - .long 2990417245 - .long 1072321795 - .long 2191782032 - .long 1072284817 - .long 2966275557 - .long 1072248631 - .long 1110089947 - .long 1072213221 - .long 2571947539 - .long 1072178569 - .long 1944781191 - .long 1072144660 - .long 3907805044 - .long 1072111477 - .long 1719614413 - .long 1072079006 - .long 2956612997 - .long 1072047230 - .long 3712504873 - .long 1072016135 - .long 1453150082 - .long 1071985707 - .long 3577096743 - .long 1071955930 - .long 1617004845 - .long 1071926792 - .long 1276261410 - .long 1071898278 - .long 926591435 - .long 1071870375 - .long 171030293 - .long 1071843070 - .long 4112506593 - .long 1071816349 - .long 1853186616 - .long 1071790202 - .long 828946858 - .long 1071764615 - .long 1014845819 - .long 1071739576 - .long 3490863953 - .long 1071715073 - .long 1828292879 - .long 1071691096 - .long 3541402996 - .long 1071667632 - .long 1874480759 - .long 1044624043 - .long 4286760334 - .long 1060028349 - .long 3607404735 - .long 3200019208 - .long 4277811695 - .long 3214290498 - .long 0 - .long 1127743488 - .long 0 - .long 3275227136 - .long 1697350398 - .long 1079448903 - .long 0 - .long 1072693248 - .type static_const_table,@object - .size static_const_table,320 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanhl.S deleted file mode 100644 index 71411db054..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanhl.S +++ /dev/null @@ -1,992 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanhl.c" - .text -..TXTST0: -# -- Begin tanhl - .text - .align 16,0x90 - .globl tanhl -tanhl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $68, %esp -..B1.2: - fnstcw 54(%esp) -..B1.3: - movzwl 16(%ebp), %eax - andl $32767, %eax - movzwl 54(%esp), %ecx - cmpl $16388, %eax - call ..L2 -..L2: - popl %edx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edx), %edx - jge ..B1.56 -..B1.4: - cmpl $16382, %eax - jge ..B1.46 -..B1.5: - cmpl $16376, %eax - jge ..B1.39 -..B1.6: - cmpl $16371, %eax - jge ..B1.32 -..B1.7: - cmpl $16365, %eax - jge ..B1.25 -..B1.8: - cmpl $16308, %eax - jge ..B1.18 -..B1.9: - movl %ecx, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.69 -..B1.10: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.11: - fldcw 52(%esp) -..B1.12: - movzwl 16(%ebp), %eax - movl $1, %esi - andl $32767, %eax -..B1.13: - testl %eax, %eax - jle ..B1.65 -..B1.14: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%edx) - fmul %st(1), %st - fsubp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%edx) - fstpt 16(%esp) -..B1.15: - testl %esi, %esi - je ..B1.17 -..B1.16: - fldcw 54(%esp) -..B1.17: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.70 -..B1.19: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.20: - fldcw 52(%esp) -..B1.21: - movl $1, %eax -..B1.22: - fldt 8(%ebp) - testl %eax, %eax - fldt _Q3@GOTOFF(%edx) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.24 -..B1.23: - fldcw 54(%esp) -..B1.24: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.71 -..B1.26: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.27: - fldcw 52(%esp) -..B1.28: - movl $1, %eax -..B1.29: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_Q2@GOTOFF(%edx) - fmul %st(1), %st - fldt _Q2@GOTOFF(%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.31 -..B1.30: - fldcw 54(%esp) -..B1.31: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.32: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.72 -..B1.33: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.34: - fldcw 52(%esp) -..B1.35: - movl $1, %eax -..B1.36: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_Q1@GOTOFF(%edx) - fmul %st(1), %st - fldt 12+_Q1@GOTOFF(%edx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_Q1@GOTOFF(%edx) - fmulp %st, %st(2) - fldt _Q1@GOTOFF(%edx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.38 -..B1.37: - fldcw 54(%esp) -..B1.38: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.39: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.73 -..B1.40: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.41: - fldcw 52(%esp) -..B1.42: - movl $1, %ecx -..B1.43: - fldt 8(%ebp) - fldl _TWO_52H@GOTOFF(%edx) - fldt 180+_Q@GOTOFF(%edx) - fldt 168+_Q@GOTOFF(%edx) - fldt 156+_Q@GOTOFF(%edx) - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - testl %ecx, %ecx - fxch %st(4) - fmull ones@GOTOFF(%edx,%eax,8) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - fxch %st(6) - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fxch %st(2) - fmul %st(5), %st - fxch %st(1) - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(5) - fld %st(4) - fsubr %st(1), %st - fxch %st(5) - fstpt 16(%esp) - fldt 16(%esp) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 144+_Q@GOTOFF(%edx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(6), %st - fldt 132+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 120+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 108+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 96+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 84+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 72+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 60+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 48+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 36+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 24+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 12+_Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(6) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fmul %st(0), %st - fldt _Q@GOTOFF(%edx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - faddp %st, %st(6) - fld %st(4) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fld %st(2) - fmul %st(3), %st - fldt 204+_Q@GOTOFF(%edx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(7) - fmulp %st, %st(1) - fldt 192+_Q@GOTOFF(%edx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(4) - fld %st(2) - fldl _TWO_48H@GOTOFF(%edx) - fld %st(0) - fadd %st(3), %st - fsub %st, %st(1) - fxch %st(1) - fmul %st, %st(2) - fsubr %st, %st(3) - fxch %st(6) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldt 16(%esp) - fmul %st, %st(3) - faddp %st, %st(3) - fxch %st(1) - fmull ones@GOTOFF(%edx,%eax,8) - fxch %st(2) - fmull ones@GOTOFF(%edx,%eax,8) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - je ..B1.83 -..B1.44: - fstpt 28(%esp) -..B1.82: - fldcw 54(%esp) - jmp ..B1.45 -..B1.83: - fstp %st(0) -..B1.45: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.46: - movl %ecx, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.74 -..B1.47: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.48: - fldcw 52(%esp) -..B1.49: - movzwl 16(%ebp), %eax - movl $1, %ebx -..B1.50: - fldt 8(%ebp) - fldl _TWO_63H@GOTOFF(%edx) - fldt .L_2il0floatpacket.0@GOTOFF(%edx) - fldt .L_2il0floatpacket.1@GOTOFF(%edx) - fldl _TWO_32@GOTOFF(%edx) - movzbl 17(%ebp), %esi - andl $128, %esi - shrl $7, %esi - fstl 56(%esp) - shll $16, %eax - fldl twos@GOTOFF(%edx,%esi,8) - fmul %st, %st(5) - fxch %st(3) - fmul %st(5), %st - fadd %st(4), %st - fstpt 28(%esp) - fldt 28(%esp) - fsubp %st, %st(4) - fxch %st(1) - fmul %st(3), %st - movl 28(%esp), %ecx - fsubrp %st, %st(4) - fld %st(3) - fldt .L_2il0floatpacket.2@GOTOFF(%edx) - fmulp %st, %st(4) - movsbl %cl, %edi - fsub %st(3), %st - fldl _TWO_32P@GOTOFF(%edx) - subl %edi, %ecx - fmul %st(1), %st - fxch %st(2) - fmulp %st, %st(1) - shll $4, %edi - fsubrp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - shrl $8, %ecx - fxch %st(3) - fsubrp %st, %st(4) - shll $23, %ecx - fadd %st(3), %st - fld %st(0) - addl $1065353216, %ecx - fmul %st(1), %st - fldt 48+_P@GOTOFF(%edx) - fmul %st(1), %st - fldt 36+_P@GOTOFF(%edx) - fmul %st(2), %st - fldt 24+_P@GOTOFF(%edx) - movl %ecx, 12(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 12+_P@GOTOFF(%edx) - movzwl 14(%ebp), %ecx - orl %ecx, %eax - andl $2147483647, %eax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - cmpl $1073845862, %eax - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(5) - fldt _P@GOTOFF(%edx) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl 2056+__libm_expl_table_256@GOTOFF(%edx,%edi) - fldl 2048+__libm_expl_table_256@GOTOFF(%edx,%edi) - fld %st(0) - fmul %st(5), %st - fxch %st(4) - fadd %st, %st(5) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fxch %st(3) - fstpt 16(%esp) - fmul %st(2), %st - flds 12(%esp) - fldt .L_2il0floatpacket.3@GOTOFF(%edx) - jae ..B1.52 -..B1.51: - fldl 56(%esp) - fld %st(5) - fadd %st(4), %st - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fmul %st, %st(1) - fxch %st(1) - fadd %st(3), %st - fld %st(0) - fldt 16(%esp) - faddp %st, %st(6) - fxch %st(5) - fmulp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fdivr %st(4), %st - fmul %st, %st(2) - fldl _TWO_32H@GOTOFF(%edx) - fld %st(0) - fadd %st(2), %st - fstpt 28(%esp) - fldt 28(%esp) - fsubp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fmul %st, %st(7) - fxch %st(4) - faddp %st, %st(7) - fmul %st, %st(2) - fxch %st(5) - fsubrp %st, %st(2) - fxch %st(5) - faddp %st, %st(1) - fmulp %st, %st(4) - fsubp %st, %st(3) - fmul %st, %st(1) - fmulp %st, %st(2) - fsubrl ones@GOTOFF(%edx,%esi,8) - fsubp %st, %st(1) - fstpt 40(%esp) - jmp ..B1.53 -..B1.52: - fldt 16(%esp) - faddp %st, %st(6) - fxch %st(2) - faddp %st, %st(5) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fdivrp %st, %st(1) - fsubrl ones@GOTOFF(%edx,%esi,8) - fstpt 40(%esp) -..B1.53: - testl %ebx, %ebx - je ..B1.55 -..B1.54: - fldcw 54(%esp) -..B1.55: - fldt 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.56: - movl %ecx, %ebx - andl $768, %ebx - cmpl $768, %ebx - je ..B1.79 -..B1.57: - orl $-64768, %ecx - movw %cx, 52(%esp) -..B1.58: - fldcw 52(%esp) -..B1.59: - movzwl 16(%ebp), %eax - movl $1, %ecx - andl $32767, %eax -..B1.60: - cmpl $32767, %eax - je ..B1.75 -..B1.61: - movzbl 17(%ebp), %esi - andl $128, %esi - shrl $7, %esi - lea (,%esi,8), %eax - lea (%eax,%esi,4), %ebx - fldt _small_value_80@GOTOFF(%edx,%ebx) - fsubrl ones@GOTOFF(%edx,%esi,8) - fstpt 16(%esp) -..B1.62: - testl %ecx, %ecx - je ..B1.64 -..B1.63: - fldcw 54(%esp) -..B1.64: - fldt 16(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.65: - cmpl $0, 12(%ebp) - jne ..B1.67 -..B1.66: - cmpl $0, 8(%ebp) - je ..B1.68 -..B1.67: - fldt _small_value_80@GOTOFF(%edx) - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%edx) - fmul %st(1), %st - movzbl 17(%ebp), %ecx - fsubp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%edx) - andl $128, %ecx - shrl $7, %ecx - fstpt 16(%esp) - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %ebx - fldt _small_value_80@GOTOFF(%edx,%ebx) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.15 -..B1.68: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.15 -..B1.69: - xorl %esi, %esi - jmp ..B1.13 -..B1.70: - xorl %eax, %eax - jmp ..B1.22 -..B1.71: - xorl %eax, %eax - jmp ..B1.29 -..B1.72: - xorl %eax, %eax - jmp ..B1.36 -..B1.73: - xorl %ecx, %ecx - jmp ..B1.43 -..B1.74: - xorl %ebx, %ebx - jmp ..B1.50 -..B1.75: - cmpl $-2147483648, 12(%ebp) - jne ..B1.78 -..B1.76: - cmpl $0, 8(%ebp) - jne ..B1.78 -..B1.77: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl ones@GOTOFF(%edx,%eax,8) - fstpt 16(%esp) - jmp ..B1.62 -..B1.78: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.62 -..B1.79: - xorl %ecx, %ecx - jmp ..B1.60 - .align 16,0x90 - .type tanhl,@function - .size tanhl,.-tanhl - .data -# -- End tanhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -twos: - .long 0x00000000,0x40000000 - .long 0x00000000,0xc0000000 - .type twos,@object - .size twos,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_Q3: - .word 21845 - .word 42325 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .type _Q3,@object - .size _Q3,12 - .align 2 -_Q2: - .word 36147 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 55638 - .word 59918 - .word 34848 - .word 34952 - .word 16380 - .word 0 - .type _Q2,@object - .size _Q2,24 - .align 2 -_Q1: - .word 43688 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 48627 - .word 34947 - .word 34952 - .word 34952 - .word 16380 - .word 0 - .word 23872 - .word 38674 - .word 53460 - .word 56589 - .word 49146 - .word 0 - .word 33152 - .word 13396 - .word 6324 - .word 45860 - .word 16377 - .word 0 - .type _Q1,@object - .size _Q1,48 - .align 2 -_Q: - .word 43505 - .word 43690 - .word 43690 - .word 43690 - .word 49137 - .word 0 - .word 51768 - .word 34951 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 53715 - .word 3536 - .word 53469 - .word 56589 - .word 49146 - .word 0 - .word 37274 - .word 24708 - .word 42049 - .word 45863 - .word 16377 - .word 0 - .word 51222 - .word 13677 - .word 6831 - .word 37175 - .word 49144 - .word 0 - .word 45961 - .word 31945 - .word 59504 - .word 60265 - .word 16374 - .word 0 - .word 5972 - .word 17449 - .word 45604 - .word 48849 - .word 49141 - .word 0 - .word 32816 - .word 2946 - .word 4564 - .word 39596 - .word 16372 - .word 0 - .word 14786 - .word 2112 - .word 44465 - .word 64190 - .word 49138 - .word 0 - .word 3031 - .word 16844 - .word 22916 - .word 52030 - .word 16369 - .word 0 - .word 47485 - .word 32270 - .word 51436 - .word 42167 - .word 49136 - .word 0 - .word 3071 - .word 14344 - .word 30185 - .word 34131 - .word 16367 - .word 0 - .word 24996 - .word 54454 - .word 53234 - .word 54781 - .word 49133 - .word 0 - .word 39193 - .word 24581 - .word 37984 - .word 42131 - .word 16364 - .word 0 - .word 5913 - .word 28127 - .word 47865 - .word 55395 - .word 49130 - .word 0 - .word 25952 - .word 54950 - .word 21582 - .word 44803 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34944 - .word 16380 - .word 0 - .type _Q,@object - .size _Q,216 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .type _P,@object - .size _P,60 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .data - .hidden __libm_expl_table_256 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanl.S deleted file mode 100644 index f26955b9ac..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tanl.S +++ /dev/null @@ -1,1683 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanl.c" - .text -..TXTST0: -# -- Begin tanl - .text - .align 16,0x90 - .globl tanl -tanl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 88(%esp) -..B1.2: - fnstcw 14(%esp) -..B1.3: - movzwl 16(%ebp), %edi - andl $32767, %edi - movzwl 14(%esp), %eax - cmpl $16373, %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - jge ..B1.41 -..B1.4: - cmpl $16371, %edi - jge ..B1.33 -..B1.5: - cmpl $16364, %edi - jge ..B1.25 -..B1.6: - cmpl $16308, %edi - jge ..B1.17 -..B1.7: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.87 -..B1.8: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.9: - fldcw 12(%esp) -..B1.10: - movzwl 16(%ebp), %edi - movl $1, %esi - andl $32767, %edi -..B1.11: - testl %edi, %edi - jle ..B1.83 -..B1.12: - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ebx) - fstpt 16(%esp) -..B1.13: - testl %esi, %esi - je ..B1.15 -..B1.14: - fldcw 14(%esp) -..B1.15: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.16: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.17: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.89 -..B1.18: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.19: - fldcw 12(%esp) -..B1.20: - movl $1, %eax -..B1.21: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt _P3@GOTOFF(%ebx) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.23 -..B1.22: - fldcw 14(%esp) -..B1.23: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.24: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.25: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.91 -..B1.26: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.27: - fldcw 12(%esp) -..B1.28: - movl $1, %eax -..B1.29: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fldt 12+_P2@GOTOFF(%ebx) - fmul %st(1), %st - fldt _P2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.31 -..B1.30: - fldcw 14(%esp) -..B1.31: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.32: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.33: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.93 -..B1.34: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.35: - fldcw 12(%esp) -..B1.36: - movl $1, %eax -..B1.37: - fldt 8(%ebp) - testl %eax, %eax - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt 36+_P1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_P1@GOTOFF(%ebx) - fmulp %st, %st(2) - fldt _P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.39 -..B1.38: - fldcw 14(%esp) -..B1.39: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.40: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.99 -..B1.42: - orl $-64768, %eax - movw %ax, 12(%esp) -..B1.43: - fldcw 12(%esp) -..B1.44: - movzwl 16(%ebp), %edi - movl $1, %esi - andl $32767, %edi -..B1.45: - movzbl 17(%ebp), %eax - andl $128, %eax - shrl $7, %eax - cmpl $16413, %edi - jge ..B1.52 -..B1.46: - fldt 8(%ebp) - fldl _Pi4Inv@GOTOFF(%ebx) - fldl _ones@GOTOFF(%ebx,%eax,8) - fld %st(0) - fmul %st(3), %st - fmul %st, %st(2) - fxch %st(2) - fstpt 60(%esp) - movzwl 68(%esp), %ecx - andl $32767, %ecx - cmpl $16383, %ecx - jge ..B1.48 -..B1.47: - fstp %st(0) - fstp %st(0) - fldl _TWO_48H@GOTOFF(%ebx) - fld %st(1) - fmul %st(1), %st - fld %st(2) - movl $1, %edx - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(2) - fsub %st(1), %st - fldt _KPi04@GOTOFF(%ebx) - fmul %st(4), %st - fstpt 60(%esp) - fxch %st(3) - jmp ..B1.63 -..B1.48: - fstp %st(2) - fldl _TWO_32H@GOTOFF(%ebx) - negl %ecx - addl $30, %ecx - movl 64(%esp), %edx - shrl %cl, %edx - incl %edx - movl %edx, %eax - andl $-2, %eax - movl %eax, 16(%esp) - cmpl $16400, %edi - fildl 16(%esp) - jge ..B1.50 -..B1.49: - fldl _Pi04x3@GOTOFF(%ebx) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_Pi04x3@GOTOFF(%ebx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_Pi04x3@GOTOFF(%ebx) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - jmp ..B1.51 -..B1.50: - fldl _Pi04x5@GOTOFF(%ebx) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl 8+_Pi04x5@GOTOFF(%ebx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl 16+_Pi04x5@GOTOFF(%ebx) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fldl 24+_Pi04x5@GOTOFF(%ebx) - fmul %st(2), %st - fld %st(0) - fsubr %st(4), %st - fsubr %st, %st(4) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fldl 32+_Pi04x5@GOTOFF(%ebx) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) -..B1.51: - fldl _TWO_48H@GOTOFF(%ebx) - fld %st(1) - fmul %st(1), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fxch %st(3) - fmulp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fstpt 8(%ebp) - fldt 8(%ebp) - fldt _KPi04@GOTOFF(%ebx) - fmul %st(1), %st - fstpt 60(%esp) - jmp ..B1.63 -..B1.52: - cmpl $32767, %edi - jne ..B1.61 -..B1.53: - cmpl $-2147483648, 12(%ebp) - jne ..B1.56 -..B1.54: - cmpl $0, 8(%ebp) - jne ..B1.56 -..B1.55: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - fstpt 16(%esp) - jmp ..B1.57 -..B1.56: - fldt 8(%ebp) - fmull _ones@GOTOFF(%ebx) - fstpt 16(%esp) -..B1.57: - testl %esi, %esi - je ..B1.59 -..B1.58: - fldcw 14(%esp) -..B1.59: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.60: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.61: - fldl _ones@GOTOFF(%ebx,%eax,8) - fstl 16(%esp) - addl $-32, %esp - fldt 8(%ebp) - lea 104(%esp), %eax - fmulp %st, %st(1) - fstpt (%esp) - movl $0, 12(%esp) - movl %eax, 16(%esp) - call __libm_reduce_pi04l -..B1.102: - movl %eax, %edx - addl $32, %esp -..B1.62: - fldl 72(%esp) - incl %edx - fld %st(0) - fldl 16(%esp) - fldl _TWO_48H@GOTOFF(%ebx) - fmul %st, %st(2) - fld %st(2) - fadd %st(4), %st - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - fmul %st(1), %st - fld %st(0) - fxch %st(4) - faddl 80(%esp) - fmulp %st, %st(2) - fxch %st(1) - fadd %st, %st(3) - fxch %st(3) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt _KPi04@GOTOFF(%ebx) - fmul %st(1), %st - fstpt 60(%esp) -..B1.63: - movzwl 68(%esp), %ecx - andl $32767, %ecx - cmpl $16383, %ecx - jge ..B1.73 -..B1.64: - testb $2, %dl - je ..B1.69 -..B1.65: - fldl 8+_ones@GOTOFF(%ebx) - testl %esi, %esi - fdiv %st(1), %st - fmul %st, %st(3) - fld %st(2) - fmul %st(5), %st - fxch %st(5) - fstpt 32(%esp) - fldt 32(%esp) - fmul %st(2), %st - faddp %st, %st(5) - fxch %st(2) - fstpt 48(%esp) - fldt 48(%esp) - fmul %st(0), %st - faddp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fldt 60+_PG@GOTOFF(%ebx) - fmul %st(1), %st - fldt 48+_PG@GOTOFF(%ebx) - fmul %st(2), %st - fldt 36+_PG@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_PG@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fld %st(3) - fadd %st(5), %st - fsub %st(5), %st - fldt 12+_PG@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(6) - fldt _PG@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fld %st(3) - fsub %st(2), %st - fxch %st(6) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 48(%esp) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fmul %st(2), %st - fldt 32(%esp) - fmul %st(5), %st - faddp %st, %st(2) - faddl _ones@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - je ..B1.107 -..B1.66: - fstpt 60(%esp) -..B1.103: - fldcw 14(%esp) - jmp ..B1.67 -..B1.107: - fstp %st(0) -..B1.67: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.68: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.69: - fldt 60+_PT@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - testl %esi, %esi - fxch %st(3) - fstpt 48(%esp) - fld %st(2) - fmul %st(3), %st - fmul %st, %st(1) - fldt 48+_PT@GOTOFF(%ebx) - fmul %st(1), %st - fldt 36+_PT@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 24+_PT@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 12+_PT@GOTOFF(%ebx) - faddp %st, %st(3) - fmulp %st, %st(2) - fldt _PT@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fsub %st(2), %st - fmulp %st, %st(1) - fld %st(2) - fmul %st(2), %st - faddp %st, %st(1) - faddp %st, %st(2) - fldt 48(%esp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 16(%esp) - je ..B1.108 -..B1.70: - fstpt 60(%esp) -..B1.104: - fldcw 14(%esp) - jmp ..B1.71 -..B1.108: - fstp %st(0) -..B1.71: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.72: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.73: - fstp %st(0) - fldl .L_2il0floatpacket.0@GOTOFF(%ebx) - negl %ecx - fldl .L_2il0floatpacket.1@GOTOFF(%ebx) - addl $30, %ecx - movl 64(%esp), %eax - shrl %cl, %eax - movl %eax, %ecx - movzbl 17(%ebp), %edi - negl %ecx - testl $128, %edi - jne ..L3 - movl %eax, %ecx -..L3: - movl %ecx, 16(%esp) - testb $2, %dl - fildl 16(%esp) - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fld %st(2) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fsubrp %st, %st(4) - fadd %st(3), %st - je ..B1.78 -..B1.74: - fld %st(1) - fmul %st(4), %st - fld %st(4) - fmul %st(2), %st - shll $4, %ecx - faddp %st, %st(1) - fld %st(2) - testl %esi, %esi - fmul %st(3), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fxch %st(4) - fstpt 32(%esp) - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fldt 60+_PT@GOTOFF(%ebx) - fmul %st(4), %st - fldt 48+_PT@GOTOFF(%ebx) - fmul %st(5), %st - fldt 36+_PT@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 24+_PT@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt 12+_PT@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(1) - fmul %st, %st(4) - fldt _PT@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fldl 272+_TG@GOTOFF(%ecx,%ebx) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(3), %st - fld %st(0) - fxch %st(5) - faddl 280+_TT@GOTOFF(%ecx,%ebx) - fxch %st(3) - fmull 280+_TG@GOTOFF(%ecx,%ebx) - faddp %st, %st(2) - fxch %st(1) - fadd %st, %st(4) - fldt 32(%esp) - fadd %st, %st(5) - fsubr %st, %st(5) - fxch %st(2) - fsub %st(5), %st - fstpt 48(%esp) - fldt 48(%esp) - faddp %st, %st(1) - fxch %st(3) - faddl 272+_TT@GOTOFF(%ecx,%ebx) - fld %st(0) - fadd %st(3), %st - fdivrl _ones@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(0) - fsub %st(3), %st - fld %st(0) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(2) - fxch %st(2) - fmul %st(3), %st - fld %st(3) - fmul %st(6), %st - fxch %st(6) - fadd %st(7), %st - fxch %st(7) - fmulp %st, %st(4) - faddl 8+_ones@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fsubp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - faddl 272+_GG@GOTOFF(%ecx,%ebx) - fxch %st(1) - faddl 280+_GG@GOTOFF(%ecx,%ebx) - faddp %st, %st(1) - fstpt 16(%esp) - fldt 48(%esp) - je ..B1.109 -..B1.75: - fstpt 60(%esp) -..B1.105: - fldcw 14(%esp) - jmp ..B1.76 -..B1.109: - fstp %st(0) -..B1.76: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.77: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.78: - fldt 48+_PT@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(4) - fstpt 48(%esp) - fldt 60+_PT@GOTOFF(%ebx) - fmul %st(4), %st - fldt 36+_PT@GOTOFF(%ebx) - shll $4, %ecx - faddp %st, %st(1) - fmul %st(4), %st - testl %esi, %esi - fldt 24+_PT@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt 12+_PT@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(4) - fldt _PT@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fmul %st(3), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fld %st(3) - fmul %st(1), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldt 48(%esp) - fmul %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fstpt 8(%ebp) - fldt 8(%ebp) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(1), %st - fldl 272+_TG@GOTOFF(%ecx,%ebx) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st(5), %st - fxch %st(3) - faddl 280+_GG@GOTOFF(%ecx,%ebx) - fxch %st(5) - faddl 272+_GG@GOTOFF(%ecx,%ebx) - fxch %st(2) - fmull 280+_TG@GOTOFF(%ecx,%ebx) - faddp %st, %st(1) - fld %st(1) - fadd %st(5), %st - fdivrl 8+_ones@GOTOFF(%ebx) - fmul %st, %st(4) - fld %st(0) - fadd %st(5), %st - fsubp %st, %st(5) - fld %st(0) - fsub %st(5), %st - fld %st(0) - fmul %st(4), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(7) - faddp %st, %st(2) - fxch %st(3) - fmul %st(5), %st - fld %st(5) - fmul %st(3), %st - fxch %st(3) - fadd %st(5), %st - fxch %st(5) - fmulp %st, %st(6) - faddl _ones@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(0) - fldl 272+_TT@GOTOFF(%ecx,%ebx) - fadd %st, %st(1) - fsubr %st(1), %st - fsubr %st(2), %st - fxch %st(3) - faddl 280+_TT@GOTOFF(%ecx,%ebx) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%esp) - je ..B1.110 -..B1.79: - fstpt 60(%esp) -..B1.106: - fldcw 14(%esp) - jmp ..B1.80 -..B1.110: - fstp %st(0) -..B1.80: - movl 88(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.82 -..B1.81: - fldt 16(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.82: - call __stack_chk_fail@PLT -..B1.83: - cmpl $0, 12(%ebp) - jne ..B1.85 -..B1.84: - cmpl $0, 8(%ebp) - je ..B1.86 -..B1.85: - fldt _small_value_80@GOTOFF(%ebx) - fldt 8(%ebp) - fldl _TWO_75@GOTOFF(%ebx) - fmul %st(1), %st - movzbl 17(%ebp), %edx - faddp %st, %st(1) - fmull 8+_TWO_75@GOTOFF(%ebx) - andl $128, %edx - shrl $7, %edx - fstpt 16(%esp) - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _small_value_80@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt (%esp) - jmp ..B1.13 -..B1.86: - fldt 8(%ebp) - fstpt 16(%esp) - jmp ..B1.13 -..B1.87: - xorl %esi, %esi - jmp ..B1.11 -..B1.89: - xorl %eax, %eax - jmp ..B1.21 -..B1.91: - xorl %eax, %eax - jmp ..B1.29 -..B1.93: - xorl %eax, %eax - jmp ..B1.37 -..B1.99: - xorl %esi, %esi - jmp ..B1.45 - .align 16,0x90 - .type tanl,@function - .size tanl,.-tanl - .data -# -- End tanl - .section .rodata, "a" - .align 16 - .align 16 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 16 -_P3: - .word 13380 - .word 43827 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .type _P3,@object - .size _P3,12 - .space 4, 0x00 # pad - .align 16 -_P2: - .word 42806 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 23834 - .word 52331 - .word 35007 - .word 34952 - .word 16380 - .word 0 - .type _P2,@object - .size _P2,24 - .space 8, 0x00 # pad - .align 16 -_P1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16380 - .word 0 - .word 31445 - .word 3491 - .word 53469 - .word 56589 - .word 16378 - .word 0 - .word 16733 - .word 58542 - .word 44372 - .word 45863 - .word 16377 - .word 0 - .type _P1,@object - .size _P1,48 - .align 16 -_Pi4Inv: - .long 1841940611 - .long 1072979760 - .type _Pi4Inv,@object - .size _Pi4Inv,8 - .space 8, 0x00 # pad - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .space 8, 0x00 # pad - .align 16 -_KPi04: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16387 - .word 0 - .type _KPi04,@object - .size _KPi04,12 - .space 4, 0x00 # pad - .align 16 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .space 8, 0x00 # pad - .align 16 -_Pi04x3: - .long 1413754112 - .long 1072243195 - .long 2563527040 - .long 1021855384 - .long 3417685868 - .long 3118450936 - .type _Pi04x3,@object - .size _Pi04x3,24 - .space 8, 0x00 # pad - .align 16 -_Pi04x5: - .long 1413480448 - .long 1072243195 - .long 442499072 - .long 1036039265 - .long 771751936 - .long 999496074 - .long 622854144 - .long 963347354 - .long 1396597664 - .long 922906692 - .type _Pi04x5,@object - .size _Pi04x5,40 - .space 8, 0x00 # pad - .align 16 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 16 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 16 -_PG: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 46604 - .word 2912 - .word 24758 - .word 46603 - .word 16377 - .word 0 - .word 64867 - .word 2218 - .word 21984 - .word 35507 - .word 16374 - .word 0 - .word 37428 - .word 49066 - .word 48281 - .word 56811 - .word 16370 - .word 0 - .word 28819 - .word 40692 - .word 30466 - .word 45908 - .word 16367 - .word 0 - .word 58229 - .word 57025 - .word 27882 - .word 37211 - .word 16364 - .word 0 - .type _PG,@object - .size _PG,72 - .space 8, 0x00 # pad - .align 16 -_PT: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 35260 - .word 34952 - .word 34952 - .word 34952 - .word 16380 - .word 0 - .word 59431 - .word 3445 - .word 53469 - .word 56589 - .word 16378 - .word 0 - .word 60805 - .word 19035 - .word 42054 - .word 45863 - .word 16377 - .word 0 - .word 32963 - .word 17667 - .word 64505 - .word 37174 - .word 16376 - .word 0 - .word 33271 - .word 14204 - .word 52730 - .word 60442 - .word 16374 - .word 0 - .type _PT,@object - .size _PT,72 - .space 8, 0x00 # pad - .align 16 -_TG: - .long 2684354560 - .long 3221230545 - .long 1980244105 - .long 1046278452 - .long 0 - .long 3221225472 - .long 0 - .long 0 - .long 2684354560 - .long 3221230545 - .long 1980244105 - .long 1046278452 - .long 3758096384 - .long 3221246014 - .long 1513286675 - .long 1048381067 - .long 0 - .long 3221272655 - .long 4057975187 - .long 3193921290 - .long 2147483648 - .long 3221311866 - .long 2902494488 - .long 1046516509 - .long 3221225472 - .long 3221365863 - .long 1948335328 - .long 3196126810 - .long 2684354560 - .long 3221438007 - .long 3744091947 - .long 3192783219 - .long 2684354560 - .long 3221533379 - .long 3860423252 - .long 1047335024 - .long 2147483648 - .long 3221659806 - .long 862942416 - .long 1049198788 - .long 0 - .long 3221829776 - .long 543592927 - .long 3195468420 - .long 0 - .long 3222064283 - .long 2814267453 - .long 1048596082 - .long 536870912 - .long 3222337673 - .long 2980891112 - .long 3196362141 - .long 2684354560 - .long 3222595502 - .long 141458722 - .long 1049458206 - .long 3221225472 - .long 3223031588 - .long 2120823910 - .long 1049591613 - .long 3221225472 - .long 3223617753 - .long 663882580 - .long 3198186420 - .long 2147483648 - .long 3224659859 - .long 3051968734 - .long 3194791707 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1077176211 - .long 3051968734 - .long 1047308059 - .long 3221225472 - .long 1076134105 - .long 663882580 - .long 1050702772 - .long 3221225472 - .long 1075547940 - .long 2120823910 - .long 3197075261 - .long 2684354560 - .long 1075111854 - .long 141458722 - .long 3196941854 - .long 536870912 - .long 1074854025 - .long 2980891112 - .long 1048878493 - .long 0 - .long 1074580635 - .long 2814267453 - .long 3196079730 - .long 0 - .long 1074346128 - .long 543592927 - .long 1047984772 - .long 2147483648 - .long 1074176158 - .long 862942416 - .long 3196682436 - .long 2684354560 - .long 1074049731 - .long 3860423252 - .long 3194818672 - .long 2684354560 - .long 1073954359 - .long 3744091947 - .long 1045299571 - .long 3221225472 - .long 1073882215 - .long 1948335328 - .long 1048643162 - .long 2147483648 - .long 1073828218 - .long 2902494488 - .long 3194000157 - .long 0 - .long 1073789007 - .long 4057975187 - .long 1046437642 - .long 3758096384 - .long 1073762366 - .long 1513286675 - .long 3195864715 - .long 2684354560 - .long 1073746897 - .long 1980244105 - .long 3193762100 - .long 0 - .long 1073741824 - .long 0 - .long 0 - .long 2684354560 - .long 1073746897 - .long 1980244105 - .long 3193762100 - .type _TG,@object - .size _TG,560 - .align 16 -_TT: - .long 1610612736 - .long 3220285245 - .long 1765132704 - .long 1046851815 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 3221225472 - .long 3219980491 - .long 3100042604 - .long 3192709428 - .long 1073741824 - .long 3219800832 - .long 2956254064 - .long 1046813655 - .long 0 - .long 3219635098 - .long 829070670 - .long 1046664815 - .long 0 - .long 3219481016 - .long 3358544266 - .long 3195362300 - .long 2147483648 - .long 3219336728 - .long 4185368031 - .long 3193047295 - .long 536870912 - .long 3219200695 - .long 1373988029 - .long 1045159724 - .long 0 - .long 3219014926 - .long 4104169752 - .long 3192540796 - .long 2147483648 - .long 3218768505 - .long 843197631 - .long 3193568495 - .long 0 - .long 3218531914 - .long 1839318447 - .long 1044402419 - .long 1073741824 - .long 3218303496 - .long 1215676724 - .long 1044727608 - .long 1610612736 - .long 3218081786 - .long 2922073518 - .long 3193275942 - .long 0 - .long 3217651190 - .long 2818065035 - .long 1045408462 - .long 2147483648 - .long 3217226924 - .long 2142552361 - .long 1043903475 - .long 2147483648 - .long 3216586427 - .long 1153689642 - .long 3190339163 - .long 2147483648 - .long 3215533863 - .long 3288774277 - .long 3189012002 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1068050215 - .long 3288774277 - .long 1041528354 - .long 2147483648 - .long 1069102779 - .long 1153689642 - .long 1042855515 - .long 2147483648 - .long 1069743276 - .long 2142552361 - .long 3191387123 - .long 0 - .long 1070167542 - .long 2818065035 - .long 3192892110 - .long 1610612736 - .long 1070598138 - .long 2922073518 - .long 1045792294 - .long 1073741824 - .long 1070819848 - .long 1215676724 - .long 3192211256 - .long 0 - .long 1071048266 - .long 1839318447 - .long 3191886067 - .long 2147483648 - .long 1071284857 - .long 843197631 - .long 1046084847 - .long 0 - .long 1071531278 - .long 4104169752 - .long 1045057148 - .long 536870912 - .long 1071717047 - .long 1373988029 - .long 3192643372 - .long 2147483648 - .long 1071853080 - .long 4185368031 - .long 1045563647 - .long 0 - .long 1071997368 - .long 3358544266 - .long 1047878652 - .long 0 - .long 1072151450 - .long 829070670 - .long 3194148463 - .long 1073741824 - .long 1072317184 - .long 2956254064 - .long 3194297303 - .long 3221225472 - .long 1072496843 - .long 3100042604 - .long 1045225780 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 1610612736 - .long 1072801597 - .long 1765132704 - .long 3194335463 - .type _TT,@object - .size _TT,560 - .align 16 -_GG: - .long 3221225472 - .long 1072496843 - .long 3100042604 - .long 1045225780 - .long 0 - .long 1072693248 - .long 2680413623 - .long 2803148914 - .long 1610612736 - .long 1072801597 - .long 1765132704 - .long 3194335463 - .long 2147483648 - .long 1072922365 - .long 4224648010 - .long 1047203520 - .long 0 - .long 1073058513 - .long 1429029132 - .long 1047610106 - .long 0 - .long 1073213977 - .long 2662307862 - .long 3195905419 - .long 2147483648 - .long 1073394115 - .long 2332932060 - .long 3196140229 - .long 3221225472 - .long 1073606419 - .long 4089189126 - .long 3194062807 - .long 3758096384 - .long 1073801761 - .long 295749197 - .long 3195130376 - .long 1073741824 - .long 1073958991 - .long 862942416 - .long 3195633860 - .long 0 - .long 1074158535 - .long 1551453531 - .long 3197746903 - .long 0 - .long 1074421594 - .long 590804010 - .long 3196516863 - .long 0 - .long 1074786323 - .long 1872593098 - .long 1046983523 - .long 3758096384 - .long 1075059710 - .long 2286165020 - .long 1046614587 - .long 2147483648 - .long 1075509055 - .long 2023416727 - .long 3198791271 - .long 1610612736 - .long 1076121196 - .long 3469402705 - .long 3196752904 - .long 0 - .long 1077172992 - .long 2869016295 - .long 3199393764 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3224656640 - .long 2869016295 - .long 1051910116 - .long 1610612736 - .long 3223604844 - .long 3469402705 - .long 1049269256 - .long 2147483648 - .long 3222992703 - .long 2023416727 - .long 1051307623 - .long 3758096384 - .long 3222543358 - .long 2286165020 - .long 3194098235 - .long 0 - .long 3222269971 - .long 1872593098 - .long 3194467171 - .long 0 - .long 3221905242 - .long 590804010 - .long 1049033215 - .long 0 - .long 3221642183 - .long 1551453531 - .long 1050263255 - .long 1073741824 - .long 3221442639 - .long 862942416 - .long 1048150212 - .long 3758096384 - .long 3221285409 - .long 295749197 - .long 1047646728 - .long 3221225472 - .long 3221090067 - .long 4089189126 - .long 1046579159 - .long 2147483648 - .long 3220877763 - .long 2332932060 - .long 1048656581 - .long 0 - .long 3220697625 - .long 2662307862 - .long 1048421771 - .long 0 - .long 3220542161 - .long 1429029132 - .long 3195093754 - .long 2147483648 - .long 3220406013 - .long 4224648010 - .long 3194687168 - .long 1610612736 - .long 3220285245 - .long 1765132704 - .long 1046851815 - .long 0 - .long 3220176896 - .long 2680413623 - .long 655665266 - .long 3221225472 - .long 3219980491 - .long 3100042604 - .long 3192709428 - .type _GG,@object - .size _GG,560 - .align 16 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 8 -.L_2il0floatpacket.0: - .long 0x54400000,0x3fa921fb - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x1a626331,0x3d80b461 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .data - .hidden __libm_reduce_pi04l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgamma.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgamma.S deleted file mode 100644 index eab73c8522..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgamma.S +++ /dev/null @@ -1,3035 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tgamma.c" - .text -..TXTST0: -# -- Begin tgamma - .text - .align 16,0x90 - .globl tgamma -tgamma: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $68, %esp - fldl 8(%ebp) - call ..L2 -..L2: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi - fstpl 16(%esp) - fldl _zeros@GOTOFF(%edi) - fstpl 40(%esp) -..B1.2: - fnstcw 54(%esp) -..B1.3: - movzwl 54(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.125 -..B1.4: - orl $-64768, %edx - movw %dx, 52(%esp) -..B1.5: - fldcw 52(%esp) -..B1.6: - movl $1, %ebx -..B1.7: - call fegetround -..B1.128: - movl %eax, 48(%esp) -..B1.8: - cmpl $0, 48(%esp) - jne ..B1.10 -..B1.9: - xorl %ecx, %ecx - jmp ..B1.12 -..B1.10: - addl $-16, %esp - movl $0, (%esp) - call fesetround -..B1.129: - addl $16, %esp -..B1.11: - movl $1, %ecx -..B1.12: - movzwl 14(%ebp), %eax - andl $32752, %eax - shrl $4, %eax - movl 12(%ebp), %esi - shrl $31, %esi - movl %eax, 4(%esp) - cmpl $2047, %eax - je ..B1.114 -..B1.13: - fldl 8(%ebp) - fldl _zeros@GOTOFF(%edi) - movl 16(%esp), %eax - movl %eax, (%esp) - fucom %st(1) - fnstsw %ax - movl 20(%esp), %edx - andl $2147483647, %edx - movl %edx, 20(%esp) - sahf - jp ..B1.14 - je ..B1.109 -..B1.14: - cmpl $262144, %edx - jl ..B1.104 -..B1.15: - je ..B1.103 -..B1.16: - testl %esi, %esi - je ..B1.145 -..B1.17: - cmpl $1075, 4(%esp) - jge ..B1.93 -..B1.18: - fldl 16(%esp) - fld %st(0) - fldl _TWO_52H@GOTOFF(%edi) - fadd %st, %st(1) - fxch %st(1) - fstpl 32(%esp) - fldl 32(%esp) - movl 32(%esp), %edx - fsubp %st, %st(1) - movl %edx, (%esp) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B1.20 -..B1.19: - incl (%esp) - fsubl _ones@GOTOFF(%edi) -..B1.20: - fucompp - fnstsw %ax - sahf - jp ..B1.21 - je ..B1.88 -..B1.21: - fstp %st(0) - fldl .L_2il0floatpacket.0@GOTOFF(%edi) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.27 -..B1.22: - fstp %st(0) - testl %ecx, %ecx - je ..B1.24 -..B1.23: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.130: - addl $16, %esp -..B1.24: - movl (%esp), %eax - notl %eax - andl $1, %eax - testl %ebx, %ebx - fldl _small_value_64@GOTOFF(%edi,%eax,8) - fmull _small_value_64@GOTOFF(%edi) - fstpl 40(%esp) - je ..B1.26 -..B1.25: - fldcw 54(%esp) -..B1.26: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.145: - fstp %st(0) -..B1.27: - fcompl _overflow_boundary@GOTOFF(%edi) - fnstsw %ax - sahf - jae ..B1.98 -..B1.28: - testl %esi, %esi - je ..B1.30 -..B1.29: - fldl 16(%esp) - fld %st(0) - fldl _TWO_52H@GOTOFF(%edi) - fadd %st, %st(1) - fxch %st(1) - fstpl 32(%esp) - fldl 32(%esp) - fsub %st(1), %st - fsubr %st(2), %st - fstpl 24(%esp) - fldt 108+_tgamma_sin_table@GOTOFF(%edi) - fldt 96+_tgamma_sin_table@GOTOFF(%edi) - fldt 84+_tgamma_sin_table@GOTOFF(%edi) - fldt 72+_tgamma_sin_table@GOTOFF(%edi) - andl $2147483647, 28(%esp) - fldl 24(%esp) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 60+_tgamma_sin_table@GOTOFF(%edi) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 48+_tgamma_sin_table@GOTOFF(%edi) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 36+_tgamma_sin_table@GOTOFF(%edi) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 24+_tgamma_sin_table@GOTOFF(%edi) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 12+_tgamma_sin_table@GOTOFF(%edi) - faddp %st, %st(3) - fmul %st, %st(2) - fmul %st(1), %st - fldt _tgamma_sin_table@GOTOFF(%edi) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - jmp ..B1.31 -..B1.30: - fldl 16(%esp) - fldz - fldl _TWO_52H@GOTOFF(%edi) -..B1.31: - fldl _ones@GOTOFF(%edi) - fxch %st(1) - fadd %st(3), %st - fstpl 32(%esp) - fldl 32(%esp) - movl 32(%esp), %edx - fsubl _TWO_52H@GOTOFF(%edi) - fcom %st(3) - fnstsw %ax - sahf - jbe ..B1.33 -..B1.32: - decl %edx - fsub %st(1), %st -..B1.33: - lea 1(%edx), %eax - andl $1, %eax - movl %eax, 12(%esp) - fxch %st(3) - fcoml .L_2il0floatpacket.1@GOTOFF(%edi) - fnstsw %ax - sahf - jb ..B1.56 -..B1.34: - movl %esi, 4(%esp) - movl %edx, %esi - andl $15, %esi - movl %edx, %eax - andl $-16, %eax - cmpl $16, %edx - movl %ebx, 8(%esp) - movl %eax, %edx - fsub %st, %st(3) - fld %st(3) - lea -2(%esi), %ebx - jl ..L3 - movl %esi, %ebx -..L3: - sarl $2, %edx - movl %eax, %esi - sarl $3, %esi - addl %eax, %edx - sarl $4, %eax - addl %eax, %esi - addl %esi, %edx - fmul %st(4), %st - testl %ebx, %ebx - movl %ebx, (%esp) - lea (,%edx,8), %eax - movl 8(%esp), %ebx - lea (%eax,%edx,4), %edx - fldt 264+_tgamma_A_table@GOTOFF(%edi,%edx) - fldt _tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(6), %st - movl 4(%esp), %esi - fadd %st(2), %st - fldt 132+_tgamma_A_table@GOTOFF(%edi,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 144+_tgamma_A_table@GOTOFF(%edi,%edx) - fldt 12+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(7), %st - fadd %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 24+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(6), %st - fadd %st(2), %st - fldt 156+_tgamma_A_table@GOTOFF(%edi,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 168+_tgamma_A_table@GOTOFF(%edi,%edx) - fldt 36+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(7), %st - fadd %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 48+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(6), %st - fadd %st(2), %st - fldt 180+_tgamma_A_table@GOTOFF(%edi,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 192+_tgamma_A_table@GOTOFF(%edi,%edx) - fldt 60+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(7), %st - fadd %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 72+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(6), %st - fadd %st(2), %st - fldt 204+_tgamma_A_table@GOTOFF(%edi,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 216+_tgamma_A_table@GOTOFF(%edi,%edx) - fldt 84+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(7), %st - fadd %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 96+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(6), %st - fadd %st(2), %st - fldt 228+_tgamma_A_table@GOTOFF(%edi,%edx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 240+_tgamma_A_table@GOTOFF(%edi,%edx) - fldt 108+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(7), %st - fadd %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 120+_tgamma_A_table@GOTOFF(%edi,%edx) - fmul %st(6), %st - faddp %st, %st(2) - fldt 252+_tgamma_A_table@GOTOFF(%edi,%edx) - faddp %st, %st(2) - fmulp %st, %st(1) - fld %st(2) - je ..B1.39 -..B1.35: - jle ..B1.39 -..B1.36: - movl (%esp), %edx - movl $1, %eax -..B1.37: - movl %eax, (%esp) - incl %eax - fildl (%esp) - cmpl %edx, %eax - fsubr %st(3), %st - fmulp %st, %st(1) - jle ..B1.37 -..B1.39: - testl %esi, %esi - je ..B1.50 -..B1.40: - fxch %st(4) - fmulp %st, %st(2) - fmulp %st, %st(1) - fmulp %st, %st(2) - fdivp %st, %st(1) - fldl .L_2il0floatpacket.2@GOTOFF(%edi) - fcompl 8(%ebp) - fnstsw %ax - sahf - fxch %st(1) - jbe ..B1.48 -..B1.41: - cmpl $0, 12(%esp) - je ..B1.43 -..B1.42: - fxch %st(1) - fchs - fxch %st(1) -..B1.43: - testl %ecx, %ecx - je ..B1.46 -..B1.44: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpl 32(%esp) - fstpt 16(%esp) - call fesetround -..B1.131: - fldt 16(%esp) - fldl 32(%esp) - addl $16, %esp -..B1.45: - xorl %ecx, %ecx -..B1.46: - fldt _tgamma_A176_inv@GOTOFF(%edi) - fmulp %st, %st(2) - cmpl $0, 12(%esp) - je ..B1.48 -..B1.47: - fxch %st(1) - fchs - fxch %st(1) -..B1.48: - movl 12(%esp), %eax - fxch %st(1) - fstpl 40(%esp) - shll $31, %eax - xorl %eax, 44(%esp) - testl %ecx, %ecx - je ..B1.53 -..B1.49: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpl 32(%esp) - call fesetround -..B1.132: - fldl 32(%esp) - addl $16, %esp - jmp ..B1.53 -..B1.50: - fstp %st(3) - fstp %st(3) - fstp %st(0) - fmulp %st, %st(1) - testl %ecx, %ecx - je ..B1.52 -..B1.51: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpl 32(%esp) - call fesetround -..B1.133: - fldl 32(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.52: - fstpl 40(%esp) -..B1.53: - testl %ebx, %ebx - je ..B1.146 -..B1.54: - fstpl 24(%esp) -..B1.134: - fldcw 54(%esp) - jmp ..B1.55 -..B1.146: - fstp %st(0) -..B1.55: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.56: - fstp %st(3) - fcom %st(2) - fnstsw %ax - sahf - jbe ..B1.58 -..B1.57: - fld %st(2) - fadd %st(1), %st - jmp ..B1.59 -..B1.58: - fld %st(2) -..B1.59: - fldt .L_2il0floatpacket.3@GOTOFF(%edi) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.61 - jp ..B1.61 -..B1.60: - fsub %st(1), %st - fstpl 24(%esp) - lea _tgamma_A150_table@GOTOFF(%edi), %eax - jmp ..B1.66 -..B1.61: - fldt .L_2il0floatpacket.4@GOTOFF(%edi) - fcom %st(1) - fnstsw %ax - sahf - ja ..B1.63 - jp ..B1.63 -..B1.62: - fstp %st(0) - fldt _local_minimum_l@GOTOFF(%edi) - lea _tgamma_A125_table@GOTOFF(%edi), %eax - fsubrp %st, %st(1) - fstpl 24(%esp) - jmp ..B1.66 -..B1.63: - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.65 -..B1.64: - fsub %st(1), %st - fstpl 24(%esp) - lea _tgamma_A100_table@GOTOFF(%edi), %eax - jmp ..B1.66 -..B1.65: - fstp %st(0) -..B1.66: - fldt (%eax) - cmpl $0, 4(%esp) - je ..B1.69 -..B1.67: - fldl 24(%esp) - fldt 180(%eax) - fmul %st(1), %st - fldt 168(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 156(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 144(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 132(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 120(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 108(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 96(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24(%eax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12(%eax) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) -..B1.69: - fxch %st(1) - fcom %st(3) - fnstsw %ax - sahf - jbe ..B1.78 -..B1.70: - testl %esi, %esi - je ..B1.74 -..B1.71: - fstp %st(3) - fmulp %st, %st(1) - testl %ecx, %ecx - fdivrp %st, %st(1) - fchs - je ..B1.73 -..B1.72: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B1.135: - fldt 16(%esp) - addl $16, %esp -..B1.73: - movl 12(%esp), %eax - fchs - fstpl 40(%esp) - shll $31, %eax - xorl %eax, 44(%esp) - jmp ..B1.85 -..B1.74: - fstp %st(0) - fstp %st(1) - testl %ecx, %ecx - fxch %st(1) - je ..B1.77 -..B1.75: - fstp %st(0) - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B1.136: - fldt 16(%esp) - addl $16, %esp -..B1.76: - fldl 16(%esp) -..B1.77: - fdivrp %st, %st(1) - fstpl 40(%esp) - jmp ..B1.85 -..B1.78: - testl %esi, %esi - je ..B1.82 -..B1.79: - fxch %st(3) - fmulp %st, %st(2) - testl %ecx, %ecx - fmulp %st, %st(1) - fdivrp %st, %st(1) - je ..B1.81 -..B1.80: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B1.137: - fldt 16(%esp) - addl $16, %esp -..B1.81: - fstpl 40(%esp) - jmp ..B1.85 -..B1.82: - fstp %st(0) - fstp %st(1) - fstp %st(1) - testl %ecx, %ecx - je ..B1.84 -..B1.83: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - call fesetround -..B1.138: - fldt 16(%esp) - addl $16, %esp -..B1.84: - fstpl 40(%esp) -..B1.85: - testl %ebx, %ebx - je ..B1.87 -..B1.86: - fldcw 54(%esp) -..B1.87: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.88: - fstp %st(1) - testl %ecx, %ecx - je ..B1.90 -..B1.89: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpl 16(%esp) - call fesetround -..B1.139: - fldl 16(%esp) - addl $16, %esp -..B1.90: - fdiv %st(0), %st - testl %ebx, %ebx - fstpl 40(%esp) - je ..B1.92 -..B1.91: - fldcw 54(%esp) -..B1.92: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.93: - fstp %st(1) - testl %ecx, %ecx - je ..B1.95 -..B1.94: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpl 16(%esp) - call fesetround -..B1.140: - fldl 16(%esp) - addl $16, %esp -..B1.95: - fdiv %st(0), %st - testl %ebx, %ebx - fstpl 40(%esp) - je ..B1.97 -..B1.96: - fldcw 54(%esp) -..B1.97: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.98: - testl %ecx, %ecx - je ..B1.100 -..B1.99: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.141: - addl $16, %esp -..B1.100: - fldl _large_value_64@GOTOFF(%edi) - testl %ebx, %ebx - fmul %st(0), %st - fstpl 40(%esp) - je ..B1.102 -..B1.101: - fldcw 54(%esp) -..B1.102: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.103: - cmpl $0, (%esp) - jne ..B1.16 -..B1.104: - fstp %st(0) - fstp %st(0) - testl %ecx, %ecx - je ..B1.106 -..B1.105: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.142: - addl $16, %esp -..B1.106: - fldl _large_value_64@GOTOFF(%edi,%esi,8) - testl %ebx, %ebx - fmull _large_value_64@GOTOFF(%edi) - fstpl 40(%esp) - je ..B1.108 -..B1.107: - fldcw 54(%esp) -..B1.108: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.109: - fstp %st(1) - testl %ecx, %ecx - je ..B1.111 -..B1.110: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - fstpl 16(%esp) - call fesetround -..B1.143: - fldl 16(%esp) - addl $16, %esp -..B1.111: - fldl _ones@GOTOFF(%edi,%esi,8) - testl %ebx, %ebx - fdivp %st, %st(1) - fstpl 40(%esp) - je ..B1.113 -..B1.112: - fldcw 54(%esp) -..B1.113: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.114: - testl %ecx, %ecx - je ..B1.116 -..B1.115: - addl $-16, %esp - movl 64(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.144: - addl $16, %esp -..B1.116: - testl %esi, %esi - je ..B1.119 -..B1.117: - testl $1048575, 12(%ebp) - jne ..B1.119 -..B1.118: - cmpl $0, 8(%ebp) - je ..B1.122 -..B1.119: - fldl 8(%ebp) - testl %ebx, %ebx - fmull _ones@GOTOFF(%edi) - fstpl 40(%esp) - je ..B1.121 -..B1.120: - fldcw 54(%esp) -..B1.121: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.122: - fldl 8+_zeros@GOTOFF(%edi) - testl %ebx, %ebx - fdivl _zeros@GOTOFF(%edi) - fstpl 40(%esp) - je ..B1.124 -..B1.123: - fldcw 54(%esp) -..B1.124: - fldl 40(%esp) - addl $68, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.125: - xorl %ebx, %ebx - jmp ..B1.7 - .align 16,0x90 - .type tgamma,@function - .size tgamma,.-tgamma - .data -# -- End tgamma - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xc0672000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0xc0660000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_overflow_boundary: - .long 3848402504 - .long 1080390650 - .type _overflow_boundary,@object - .size _overflow_boundary,8 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 2 -_tgamma_sin_table: - .word 39192 - .word 38974 - .word 13074 - .word 53901 - .word 49151 - .word 0 - .word 25233 - .word 24099 - .word 23041 - .word 53198 - .word 16382 - .word 0 - .word 14010 - .word 1755 - .word 29241 - .word 50004 - .word 49148 - .word 0 - .word 12661 - .word 39557 - .word 743 - .word 54836 - .word 16377 - .word 0 - .word 23329 - .word 12349 - .word 46418 - .word 39360 - .word 49142 - .word 0 - .word 43549 - .word 22984 - .word 36093 - .word 39843 - .word 16370 - .word 0 - .word 50635 - .word 59140 - .word 19560 - .word 59922 - .word 49133 - .word 0 - .word 39826 - .word 40176 - .word 51583 - .word 34788 - .word 16361 - .word 0 - .word 63061 - .word 25910 - .word 60600 - .word 64252 - .word 49123 - .word 0 - .word 21154 - .word 4399 - .word 17218 - .word 48316 - .word 16350 - .word 0 - .type _tgamma_sin_table,@object - .size _tgamma_sin_table,120 - .align 2 -_tgamma_A_table: - .word 44002 - .word 44608 - .word 34249 - .word 61198 - .word 16384 - .word 0 - .word 28120 - .word 46089 - .word 18909 - .word 51744 - .word 16384 - .word 0 - .word 6796 - .word 56365 - .word 948 - .word 39330 - .word 16384 - .word 0 - .word 21872 - .word 3113 - .word 40348 - .word 48989 - .word 16383 - .word 0 - .word 15275 - .word 60291 - .word 893 - .word 59613 - .word 16381 - .word 0 - .word 41018 - .word 41834 - .word 14754 - .word 46766 - .word 49150 - .word 0 - .word 10107 - .word 10320 - .word 24796 - .word 32841 - .word 49152 - .word 0 - .word 40832 - .word 16832 - .word 38712 - .word 55795 - .word 49152 - .word 0 - .word 8761 - .word 28554 - .word 35431 - .word 39961 - .word 49153 - .word 0 - .word 12838 - .word 702 - .word 32174 - .word 51595 - .word 49153 - .word 0 - .word 442 - .word 50835 - .word 62234 - .word 59850 - .word 49153 - .word 0 - .word 53618 - .word 2208 - .word 54662 - .word 64445 - .word 16384 - .word 0 - .word 33537 - .word 7687 - .word 12653 - .word 64976 - .word 16384 - .word 0 - .word 5604 - .word 18060 - .word 46944 - .word 34352 - .word 16385 - .word 0 - .word 5422 - .word 18393 - .word 57870 - .word 37869 - .word 16385 - .word 0 - .word 27417 - .word 51069 - .word 14904 - .word 43119 - .word 16385 - .word 0 - .word 16515 - .word 36952 - .word 46206 - .word 50255 - .word 16385 - .word 0 - .word 22913 - .word 57796 - .word 61047 - .word 59491 - .word 16385 - .word 0 - .word 55054 - .word 14521 - .word 23522 - .word 35521 - .word 16386 - .word 0 - .word 3828 - .word 37429 - .word 19301 - .word 42457 - .word 16386 - .word 0 - .word 18611 - .word 8353 - .word 56126 - .word 50041 - .word 16386 - .word 0 - .word 63177 - .word 14708 - .word 18871 - .word 56010 - .word 16386 - .word 0 - .word 51349 - .word 6910 - .word 18794 - .word 33038 - .word 16353 - .word 0 - .word 59411 - .word 13918 - .word 30079 - .word 63615 - .word 16384 - .word 0 - .word 40356 - .word 37493 - .word 20410 - .word 60584 - .word 16384 - .word 0 - .word 59667 - .word 1960 - .word 42334 - .word 54496 - .word 16384 - .word 0 - .word 24443 - .word 19594 - .word 17897 - .word 45291 - .word 16384 - .word 0 - .word 24957 - .word 63432 - .word 54964 - .word 32848 - .word 16384 - .word 0 - .word 7770 - .word 43625 - .word 45329 - .word 33905 - .word 16383 - .word 0 - .word 34249 - .word 63845 - .word 17962 - .word 44463 - .word 49148 - .word 0 - .word 49963 - .word 34728 - .word 51109 - .word 54055 - .word 49151 - .word 0 - .word 57585 - .word 19701 - .word 6443 - .word 57077 - .word 49152 - .word 0 - .word 61186 - .word 8282 - .word 25787 - .word 47837 - .word 49153 - .word 0 - .word 26720 - .word 42621 - .word 41546 - .word 37680 - .word 49154 - .word 0 - .word 18366 - .word 28044 - .word 60147 - .word 62846 - .word 16384 - .word 0 - .word 6968 - .word 10789 - .word 37601 - .word 32880 - .word 16385 - .word 0 - .word 60700 - .word 57063 - .word 36736 - .word 35909 - .word 16385 - .word 0 - .word 61862 - .word 56439 - .word 50993 - .word 40752 - .word 16385 - .word 0 - .word 41843 - .word 39363 - .word 59360 - .word 47812 - .word 16385 - .word 0 - .word 63511 - .word 43763 - .word 855 - .word 57724 - .word 16385 - .word 0 - .word 64510 - .word 20731 - .word 32839 - .word 35752 - .word 16386 - .word 0 - .word 60398 - .word 46667 - .word 43836 - .word 45454 - .word 16386 - .word 0 - .word 49807 - .word 23281 - .word 46849 - .word 59658 - .word 16386 - .word 0 - .word 37270 - .word 40485 - .word 38862 - .word 41131 - .word 16387 - .word 0 - .word 55072 - .word 194 - .word 57504 - .word 62944 - .word 16387 - .word 0 - .word 6484 - .word 60537 - .word 3975 - .word 55679 - .word 16389 - .word 0 - .word 11759 - .word 24340 - .word 39489 - .word 49925 - .word 16384 - .word 0 - .word 22650 - .word 18020 - .word 56002 - .word 47553 - .word 16384 - .word 0 - .word 65458 - .word 2450 - .word 7569 - .word 42768 - .word 16384 - .word 0 - .word 2740 - .word 58538 - .word 8888 - .word 35477 - .word 16384 - .word 0 - .word 24012 - .word 19369 - .word 10014 - .word 51050 - .word 16383 - .word 0 - .word 32754 - .word 14555 - .word 56874 - .word 50646 - .word 16382 - .word 0 - .word 6322 - .word 39288 - .word 8326 - .word 56228 - .word 49148 - .word 0 - .word 51606 - .word 9409 - .word 56084 - .word 47341 - .word 49151 - .word 0 - .word 19293 - .word 17746 - .word 29435 - .word 49011 - .word 49152 - .word 0 - .word 22538 - .word 37169 - .word 56949 - .word 41021 - .word 49153 - .word 0 - .word 65507 - .word 8897 - .word 64576 - .word 64934 - .word 49153 - .word 0 - .word 21309 - .word 38834 - .word 44023 - .word 38745 - .word 16384 - .word 0 - .word 52933 - .word 53016 - .word 24774 - .word 40865 - .word 16384 - .word 0 - .word 4045 - .word 21262 - .word 61923 - .word 45295 - .word 16384 - .word 0 - .word 26065 - .word 18177 - .word 3420 - .word 52438 - .word 16384 - .word 0 - .word 45505 - .word 1968 - .word 16227 - .word 62949 - .word 16384 - .word 0 - .word 1037 - .word 13974 - .word 10559 - .word 38924 - .word 16385 - .word 0 - .word 39502 - .word 38026 - .word 65467 - .word 49371 - .word 16385 - .word 0 - .word 34978 - .word 59813 - .word 17957 - .word 64181 - .word 16385 - .word 0 - .word 4031 - .word 54789 - .word 33142 - .word 42976 - .word 16386 - .word 0 - .word 2719 - .word 21031 - .word 60489 - .word 60330 - .word 16386 - .word 0 - .word 20734 - .word 53765 - .word 40154 - .word 46919 - .word 16387 - .word 0 - .word 63028 - .word 7231 - .word 17811 - .word 43725 - .word 16468 - .word 0 - .word 32606 - .word 48355 - .word 22399 - .word 43710 - .word 16384 - .word 0 - .word 29042 - .word 46559 - .word 51950 - .word 41588 - .word 16384 - .word 0 - .word 47396 - .word 18113 - .word 2918 - .word 37305 - .word 16384 - .word 0 - .word 22233 - .word 40098 - .word 6225 - .word 61543 - .word 16383 - .word 0 - .word 611 - .word 49379 - .word 57729 - .word 43678 - .word 16383 - .word 0 - .word 10450 - .word 9675 - .word 56147 - .word 41083 - .word 16382 - .word 0 - .word 37401 - .word 8271 - .word 47219 - .word 34504 - .word 49149 - .word 0 - .word 34774 - .word 15943 - .word 11357 - .word 45081 - .word 49151 - .word 0 - .word 6639 - .word 15692 - .word 42534 - .word 45536 - .word 49152 - .word 0 - .word 51630 - .word 6378 - .word 12961 - .word 37818 - .word 49153 - .word 0 - .word 59527 - .word 55742 - .word 41884 - .word 59714 - .word 49153 - .word 0 - .word 15629 - .word 31501 - .word 45205 - .word 59448 - .word 16383 - .word 0 - .word 53044 - .word 1871 - .word 3840 - .word 62990 - .word 16383 - .word 0 - .word 49829 - .word 44544 - .word 39222 - .word 35206 - .word 16384 - .word 0 - .word 8319 - .word 42513 - .word 20106 - .word 41214 - .word 16384 - .word 0 - .word 56062 - .word 65309 - .word 8860 - .word 50097 - .word 16384 - .word 0 - .word 39637 - .word 65 - .word 3840 - .word 62744 - .word 16384 - .word 0 - .word 8819 - .word 49083 - .word 32007 - .word 40272 - .word 16385 - .word 0 - .word 33763 - .word 5027 - .word 16250 - .word 52917 - .word 16385 - .word 0 - .word 4751 - .word 2633 - .word 61342 - .word 35759 - .word 16386 - .word 0 - .word 8844 - .word 54174 - .word 63762 - .word 50574 - .word 16386 - .word 0 - .word 8334 - .word 8890 - .word 4484 - .word 39560 - .word 16387 - .word 0 - .word 4811 - .word 30700 - .word 3620 - .word 48492 - .word 16556 - .word 0 - .word 24963 - .word 23772 - .word 56823 - .word 39936 - .word 16384 - .word 0 - .word 33598 - .word 3946 - .word 44700 - .word 37958 - .word 16384 - .word 0 - .word 46964 - .word 13072 - .word 50440 - .word 33963 - .word 16384 - .word 0 - .word 60803 - .word 30641 - .word 14857 - .word 55738 - .word 16383 - .word 0 - .word 54016 - .word 37905 - .word 6345 - .word 39067 - .word 16383 - .word 0 - .word 52847 - .word 8984 - .word 26176 - .word 34926 - .word 16382 - .word 0 - .word 36664 - .word 26865 - .word 35876 - .word 39170 - .word 49149 - .word 0 - .word 52449 - .word 52544 - .word 53629 - .word 43890 - .word 49151 - .word 0 - .word 12025 - .word 58412 - .word 44187 - .word 43481 - .word 49152 - .word 0 - .word 31442 - .word 43543 - .word 55683 - .word 35857 - .word 49153 - .word 0 - .word 3846 - .word 7199 - .word 40600 - .word 56439 - .word 49153 - .word 0 - .word 59606 - .word 22885 - .word 19144 - .word 49661 - .word 16383 - .word 0 - .word 40642 - .word 40248 - .word 11664 - .word 52797 - .word 16383 - .word 0 - .word 62936 - .word 44294 - .word 39296 - .word 59383 - .word 16383 - .word 0 - .word 2909 - .word 51304 - .word 40819 - .word 35037 - .word 16384 - .word 0 - .word 28573 - .word 45780 - .word 52012 - .word 42966 - .word 16384 - .word 0 - .word 18650 - .word 49015 - .word 44104 - .word 54288 - .word 16384 - .word 0 - .word 55601 - .word 45035 - .word 39824 - .word 35129 - .word 16385 - .word 0 - .word 34144 - .word 30699 - .word 57231 - .word 46486 - .word 16385 - .word 0 - .word 46246 - .word 1151 - .word 17498 - .word 63193 - .word 16385 - .word 0 - .word 4951 - .word 25890 - .word 61661 - .word 44882 - .word 16386 - .word 0 - .word 6537 - .word 64648 - .word 46171 - .word 35209 - .word 16387 - .word 0 - .word 3418 - .word 59105 - .word 44678 - .word 47100 - .word 16651 - .word 0 - .word 12496 - .word 39220 - .word 65358 - .word 37319 - .word 16384 - .word 0 - .word 42985 - .word 15941 - .word 31416 - .word 35438 - .word 16384 - .word 0 - .word 48809 - .word 58407 - .word 25474 - .word 63277 - .word 16383 - .word 0 - .word 16086 - .word 46002 - .word 58617 - .word 51682 - .word 16383 - .word 0 - .word 55157 - .word 44549 - .word 61270 - .word 35823 - .word 16383 - .word 0 - .word 21856 - .word 27160 - .word 26283 - .word 61078 - .word 16381 - .word 0 - .word 57421 - .word 61358 - .word 44892 - .word 42671 - .word 49149 - .word 0 - .word 51328 - .word 61945 - .word 60158 - .word 43127 - .word 49151 - .word 0 - .word 51733 - .word 1166 - .word 54323 - .word 42075 - .word 49152 - .word 0 - .word 52270 - .word 46964 - .word 5686 - .word 34493 - .word 49153 - .word 0 - .word 2083 - .word 1761 - .word 7136 - .word 54130 - .word 49153 - .word 0 - .word 16904 - .word 37253 - .word 64186 - .word 43390 - .word 16383 - .word 0 - .word 30519 - .word 46073 - .word 2795 - .word 46255 - .word 16383 - .word 0 - .word 6923 - .word 13957 - .word 9241 - .word 52280 - .word 16383 - .word 0 - .word 60036 - .word 4102 - .word 42534 - .word 62082 - .word 16383 - .word 0 - .word 23471 - .word 7124 - .word 59867 - .word 38328 - .word 16384 - .word 0 - .word 43652 - .word 58293 - .word 38720 - .word 48757 - .word 16384 - .word 0 - .word 30217 - .word 2002 - .word 31515 - .word 63491 - .word 16384 - .word 0 - .word 32079 - .word 61591 - .word 63175 - .word 42230 - .word 16385 - .word 0 - .word 708 - .word 13247 - .word 38402 - .word 57649 - .word 16385 - .word 0 - .word 48098 - .word 14626 - .word 62525 - .word 41069 - .word 16386 - .word 0 - .word 41824 - .word 29269 - .word 27314 - .word 64550 - .word 16386 - .word 0 - .word 61231 - .word 60847 - .word 45074 - .word 55796 - .word 16751 - .word 0 - .word 41222 - .word 6965 - .word 41751 - .word 35359 - .word 16384 - .word 0 - .word 3873 - .word 17289 - .word 23432 - .word 33549 - .word 16384 - .word 0 - .word 31267 - .word 5735 - .word 3862 - .word 59787 - .word 16383 - .word 0 - .word 54508 - .word 24423 - .word 13439 - .word 48632 - .word 16383 - .word 0 - .word 1373 - .word 13548 - .word 5598 - .word 33375 - .word 16383 - .word 0 - .word 51134 - .word 47274 - .word 24966 - .word 54404 - .word 16381 - .word 0 - .word 6577 - .word 45385 - .word 2362 - .word 45409 - .word 49149 - .word 0 - .word 3828 - .word 42112 - .word 22766 - .word 42583 - .word 49151 - .word 0 - .word 12956 - .word 14074 - .word 46709 - .word 41030 - .word 49152 - .word 0 - .word 36968 - .word 52126 - .word 60443 - .word 33467 - .word 49153 - .word 0 - .word 6923 - .word 15273 - .word 58034 - .word 52381 - .word 49153 - .word 0 - .word 32660 - .word 35575 - .word 5652 - .word 38971 - .word 16383 - .word 0 - .word 58845 - .word 37118 - .word 55534 - .word 41636 - .word 16383 - .word 0 - .word 18460 - .word 14335 - .word 18170 - .word 47252 - .word 16383 - .word 0 - .word 64257 - .word 33925 - .word 29284 - .word 56405 - .word 16383 - .word 0 - .word 4762 - .word 47478 - .word 23933 - .word 35021 - .word 16384 - .word 0 - .word 60070 - .word 43233 - .word 33997 - .word 44796 - .word 16384 - .word 0 - .word 15498 - .word 56159 - .word 37136 - .word 58624 - .word 16384 - .word 0 - .word 45618 - .word 14567 - .word 62599 - .word 39157 - .word 16385 - .word 0 - .word 56427 - .word 8703 - .word 58958 - .word 53630 - .word 16385 - .word 0 - .word 17868 - .word 58209 - .word 63399 - .word 38294 - .word 16386 - .word 0 - .word 23727 - .word 3602 - .word 56293 - .word 60260 - .word 16386 - .word 0 - .word 11566 - .word 31203 - .word 21261 - .word 41104 - .word 16856 - .word 0 - .word 50659 - .word 54826 - .word 2447 - .word 33815 - .word 16384 - .word 0 - .word 40123 - .word 27511 - .word 38472 - .word 64120 - .word 16383 - .word 0 - .word 60369 - .word 44894 - .word 35604 - .word 57033 - .word 16383 - .word 0 - .word 46499 - .word 27632 - .word 5436 - .word 46222 - .word 16383 - .word 0 - .word 30082 - .word 48277 - .word 45112 - .word 62871 - .word 16382 - .word 0 - .word 22164 - .word 19009 - .word 61576 - .word 49094 - .word 16381 - .word 0 - .word 46565 - .word 37565 - .word 23059 - .word 47623 - .word 49149 - .word 0 - .word 32180 - .word 46156 - .word 40449 - .word 42167 - .word 49151 - .word 0 - .word 43791 - .word 4543 - .word 64119 - .word 40210 - .word 49152 - .word 0 - .word 35508 - .word 36368 - .word 50300 - .word 65316 - .word 49152 - .word 0 - .word 24682 - .word 25954 - .word 24264 - .word 50994 - .word 49153 - .word 0 - .word 2360 - .word 57697 - .word 56537 - .word 35655 - .word 16383 - .word 0 - .word 35000 - .word 46863 - .word 45329 - .word 38168 - .word 16383 - .word 0 - .word 34434 - .word 1782 - .word 6514 - .word 43468 - .word 16383 - .word 0 - .word 42662 - .word 49367 - .word 10572 - .word 52120 - .word 16383 - .word 0 - .word 20865 - .word 43286 - .word 18750 - .word 65033 - .word 16383 - .word 0 - .word 9813 - .word 41323 - .word 59938 - .word 41786 - .word 16384 - .word 0 - .word 37980 - .word 55255 - .word 47419 - .word 54914 - .word 16384 - .word 0 - .word 3267 - .word 59107 - .word 21702 - .word 36808 - .word 16385 - .word 0 - .word 56442 - .word 35583 - .word 19842 - .word 50549 - .word 16385 - .word 0 - .word 14786 - .word 14705 - .word 8555 - .word 36161 - .word 16386 - .word 0 - .word 5861 - .word 33921 - .word 55110 - .word 56952 - .word 16386 - .word 0 - .word 12507 - .word 56326 - .word 38818 - .word 47266 - .word 16964 - .word 0 - .word 3472 - .word 16935 - .word 53300 - .word 65107 - .word 16383 - .word 0 - .word 37860 - .word 60441 - .word 22458 - .word 61688 - .word 16383 - .word 0 - .word 12243 - .word 56252 - .word 28016 - .word 54783 - .word 16383 - .word 0 - .word 4212 - .word 39051 - .word 42484 - .word 44250 - .word 16383 - .word 0 - .word 23380 - .word 35543 - .word 1695 - .word 59694 - .word 16382 - .word 0 - .word 16948 - .word 23513 - .word 25700 - .word 44731 - .word 16381 - .word 0 - .word 46140 - .word 40761 - .word 17956 - .word 49463 - .word 49149 - .word 0 - .word 31263 - .word 46633 - .word 29941 - .word 41835 - .word 49151 - .word 0 - .word 63205 - .word 61824 - .word 34317 - .word 39543 - .word 49152 - .word 0 - .word 2572 - .word 33857 - .word 17789 - .word 63992 - .word 49152 - .word 0 - .word 34199 - .word 18923 - .word 17606 - .word 49855 - .word 49153 - .word 0 - .word 56334 - .word 35260 - .word 24180 - .word 33058 - .word 16383 - .word 0 - .word 60689 - .word 52750 - .word 35337 - .word 35448 - .word 16383 - .word 0 - .word 55452 - .word 53681 - .word 28550 - .word 40494 - .word 16383 - .word 0 - .word 52405 - .word 7414 - .word 26290 - .word 48744 - .word 16383 - .word 0 - .word 27310 - .word 49480 - .word 17006 - .word 61076 - .word 16383 - .word 0 - .word 58002 - .word 7573 - .word 241 - .word 39403 - .word 16384 - .word 0 - .word 30618 - .word 4587 - .word 23737 - .word 51968 - .word 16384 - .word 0 - .word 41850 - .word 57331 - .word 43567 - .word 34937 - .word 16385 - .word 0 - .word 44076 - .word 54284 - .word 21386 - .word 48090 - .word 16385 - .word 0 - .word 47582 - .word 54033 - .word 55369 - .word 34454 - .word 16386 - .word 0 - .word 6559 - .word 5249 - .word 7172 - .word 54302 - .word 16386 - .word 0 - .word 25070 - .word 13550 - .word 42045 - .word 60321 - .word 17075 - .word 0 - .word 25751 - .word 29482 - .word 15881 - .word 62993 - .word 16383 - .word 0 - .word 20424 - .word 12720 - .word 54361 - .word 59648 - .word 16383 - .word 0 - .word 47709 - .word 29790 - .word 54671 - .word 52895 - .word 16383 - .word 0 - .word 19590 - .word 27782 - .word 43363 - .word 42595 - .word 16383 - .word 0 - .word 58921 - .word 35180 - .word 21269 - .word 57023 - .word 16382 - .word 0 - .word 30519 - .word 24253 - .word 59969 - .word 41055 - .word 16381 - .word 0 - .word 16433 - .word 48540 - .word 61714 - .word 51024 - .word 49149 - .word 0 - .word 28524 - .word 50460 - .word 14901 - .word 41561 - .word 49151 - .word 0 - .word 3212 - .word 32692 - .word 57818 - .word 38984 - .word 49152 - .word 0 - .word 39499 - .word 42357 - .word 61063 - .word 62879 - .word 49152 - .word 0 - .word 23069 - .word 2532 - .word 8249 - .word 48896 - .word 49153 - .word 0 - .word 10213 - .word 8193 - .word 57687 - .word 61912 - .word 16382 - .word 0 - .word 54407 - .word 51976 - .word 21399 - .word 33245 - .word 16383 - .word 0 - .word 30319 - .word 6795 - .word 56359 - .word 38081 - .word 16383 - .word 0 - .word 56783 - .word 23918 - .word 44955 - .word 45999 - .word 16383 - .word 0 - .word 48670 - .word 51841 - .word 19543 - .word 57851 - .word 16383 - .word 0 - .word 40765 - .word 30890 - .word 33317 - .word 37455 - .word 16384 - .word 0 - .word 26976 - .word 54195 - .word 64249 - .word 49555 - .word 16384 - .word 0 - .word 53450 - .word 46734 - .word 58278 - .word 33402 - .word 16385 - .word 0 - .word 16139 - .word 61138 - .word 10791 - .word 46069 - .word 16385 - .word 0 - .word 19833 - .word 46025 - .word 1951 - .word 33050 - .word 16386 - .word 0 - .word 63698 - .word 28854 - .word 16724 - .word 52116 - .word 16386 - .word 0 - .word 51628 - .word 52030 - .word 9741 - .word 32928 - .word 17190 - .word 0 - .word 12285 - .word 10951 - .word 58642 - .word 61183 - .word 16383 - .word 0 - .word 21683 - .word 21165 - .word 28859 - .word 57903 - .word 16383 - .word 0 - .word 16106 - .word 65177 - .word 61473 - .word 51279 - .word 16383 - .word 0 - .word 10066 - .word 60251 - .word 8712 - .word 41178 - .word 16383 - .word 0 - .word 11765 - .word 63661 - .word 54012 - .word 54733 - .word 16382 - .word 0 - .word 6745 - .word 52609 - .word 60525 - .word 37899 - .word 16381 - .word 0 - .word 48001 - .word 64846 - .word 20212 - .word 52373 - .word 49149 - .word 0 - .word 17748 - .word 43200 - .word 11817 - .word 41329 - .word 49151 - .word 0 - .word 21018 - .word 45635 - .word 21983 - .word 38507 - .word 49152 - .word 0 - .word 3148 - .word 52957 - .word 41657 - .word 61926 - .word 49152 - .word 0 - .word 4827 - .word 784 - .word 31692 - .word 48072 - .word 49153 - .word 0 - .word 34179 - .word 53889 - .word 29926 - .word 58425 - .word 16382 - .word 0 - .word 50615 - .word 27492 - .word 10833 - .word 62832 - .word 16382 - .word 0 - .word 38001 - .word 13025 - .word 51995 - .word 36075 - .word 16383 - .word 0 - .word 57519 - .word 47991 - .word 3845 - .word 43713 - .word 16383 - .word 0 - .word 52312 - .word 45573 - .word 61386 - .word 55158 - .word 16383 - .word 0 - .word 13085 - .word 59531 - .word 16529 - .word 35826 - .word 16384 - .word 0 - .word 20993 - .word 34790 - .word 57361 - .word 47533 - .word 16384 - .word 0 - .word 9726 - .word 28278 - .word 20623 - .word 64228 - .word 16384 - .word 0 - .word 29543 - .word 44397 - .word 26216 - .word 44369 - .word 16385 - .word 0 - .word 63031 - .word 4436 - .word 65303 - .word 63733 - .word 16385 - .word 0 - .word 3202 - .word 26777 - .word 12818 - .word 50273 - .word 16386 - .word 0 - .word 59134 - .word 17584 - .word 37875 - .word 50102 - .word 17306 - .word 0 - .word 7773 - .word 6529 - .word 24897 - .word 59610 - .word 16383 - .word 0 - .word 9176 - .word 34994 - .word 24066 - .word 56385 - .word 16383 - .word 0 - .word 38670 - .word 17644 - .word 9278 - .word 49874 - .word 16383 - .word 0 - .word 31722 - .word 46384 - .word 26212 - .word 39944 - .word 16383 - .word 0 - .word 4438 - .word 35654 - .word 55200 - .word 52739 - .word 16382 - .word 0 - .word 27356 - .word 43702 - .word 58298 - .word 35147 - .word 16381 - .word 0 - .word 11597 - .word 6768 - .word 60887 - .word 53553 - .word 49149 - .word 0 - .word 2200 - .word 56289 - .word 1997 - .word 41129 - .word 49151 - .word 0 - .word 51208 - .word 51045 - .word 15577 - .word 38092 - .word 49152 - .word 0 - .word 64525 - .word 30741 - .word 24355 - .word 61096 - .word 49152 - .word 0 - .word 16273 - .word 9188 - .word 1200 - .word 47354 - .word 49153 - .word 0 - .word 32505 - .word 64701 - .word 51161 - .word 55474 - .word 16382 - .word 0 - .word 58255 - .word 43751 - .word 28307 - .word 59734 - .word 16382 - .word 0 - .word 597 - .word 44015 - .word 59274 - .word 34374 - .word 16383 - .word 0 - .word 17221 - .word 11824 - .word 60854 - .word 41770 - .word 16383 - .word 0 - .word 32240 - .word 33006 - .word 58370 - .word 52867 - .word 16383 - .word 0 - .word 22765 - .word 17058 - .word 17899 - .word 34437 - .word 16384 - .word 0 - .word 3694 - .word 59578 - .word 1196 - .word 45807 - .word 16384 - .word 0 - .word 37424 - .word 8934 - .word 53804 - .word 62023 - .word 16384 - .word 0 - .word 6800 - .word 58264 - .word 43923 - .word 42913 - .word 16385 - .word 0 - .word 27007 - .word 15916 - .word 20851 - .word 61705 - .word 16385 - .word 0 - .word 33570 - .word 44306 - .word 22975 - .word 48691 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _tgamma_A_table,@object - .size _tgamma_A_table,3312 - .align 2 -_tgamma_A176_inv: - .word 38655 - .word 8470 - .word 22633 - .word 47709 - .word 15340 - .word 0 - .type _tgamma_A176_inv,@object - .size _tgamma_A176_inv,12 - .align 2 -_tgamma_A150_table: - .word 61060 - .word 8155 - .word 61816 - .word 65535 - .word 16382 - .word 0 - .word 47752 - .word 30749 - .word 4057 - .word 37827 - .word 49150 - .word 0 - .word 24760 - .word 16820 - .word 52631 - .word 64803 - .word 16382 - .word 0 - .word 36324 - .word 24890 - .word 11532 - .word 59368 - .word 49150 - .word 0 - .word 63381 - .word 49585 - .word 20519 - .word 63827 - .word 16382 - .word 0 - .word 54086 - .word 22318 - .word 4776 - .word 62483 - .word 49150 - .word 0 - .word 24236 - .word 16506 - .word 21666 - .word 59746 - .word 16382 - .word 0 - .word 44402 - .word 44414 - .word 37650 - .word 53079 - .word 49150 - .word 0 - .word 34766 - .word 8695 - .word 24359 - .word 42592 - .word 16382 - .word 0 - .word 30542 - .word 64415 - .word 14059 - .word 59378 - .word 49149 - .word 0 - .word 36037 - .word 62568 - .word 21045 - .word 34628 - .word 16381 - .word 0 - .word 39650 - .word 28877 - .word 62299 - .word 64900 - .word 49147 - .word 0 - .word 43413 - .word 4175 - .word 59877 - .word 46549 - .word 16378 - .word 0 - .word 13603 - .word 64648 - .word 43425 - .word 47701 - .word 49144 - .word 0 - .word 48047 - .word 22044 - .word 23868 - .word 61943 - .word 16373 - .word 0 - .word 17548 - .word 29243 - .word 63955 - .word 38195 - .word 49138 - .word 0 - .type _tgamma_A150_table,@object - .size _tgamma_A150_table,192 - .align 2 -_local_minimum_l: - .word 64512 - .word 46577 - .word 49946 - .word 47894 - .word 16383 - .word 0 - .type _local_minimum_l,@object - .size _local_minimum_l,12 - .align 2 -_tgamma_A125_table: - .word 29804 - .word 14935 - .word 58389 - .word 58038 - .word 16382 - .word 0 - .word 54039 - .word 49353 - .word 64455 - .word 62712 - .word 16326 - .word 0 - .word 7246 - .word 48092 - .word 40889 - .word 56162 - .word 16381 - .word 0 - .word 5238 - .word 25576 - .word 20384 - .word 34263 - .word 49148 - .word 0 - .word 38009 - .word 2645 - .word 35759 - .word 42176 - .word 16380 - .word 0 - .word 32410 - .word 34387 - .word 48471 - .word 48379 - .word 49147 - .word 0 - .word 9060 - .word 33571 - .word 56968 - .word 36683 - .word 16379 - .word 0 - .word 26873 - .word 9749 - .word 59107 - .word 49208 - .word 49146 - .word 0 - .word 61297 - .word 63742 - .word 25286 - .word 34210 - .word 16378 - .word 0 - .word 6011 - .word 50033 - .word 7349 - .word 46841 - .word 49145 - .word 0 - .word 30597 - .word 45929 - .word 271 - .word 64276 - .word 16376 - .word 0 - .word 60120 - .word 8046 - .word 54753 - .word 44175 - .word 49144 - .word 0 - .word 32461 - .word 45691 - .word 56111 - .word 58214 - .word 16375 - .word 0 - .word 38908 - .word 23877 - .word 33636 - .word 50495 - .word 49143 - .word 0 - .word 35983 - .word 59115 - .word 59685 - .word 60013 - .word 16371 - .word 0 - .word 38519 - .word 97 - .word 2340 - .word 53304 - .word 49143 - .word 0 - .type _tgamma_A125_table,@object - .size _tgamma_A125_table,192 - .align 2 -_tgamma_A100_table: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 50486 - .word 32176 - .word 26595 - .word 37828 - .word 49150 - .word 0 - .word 33232 - .word 55464 - .word 50705 - .word 64818 - .word 16382 - .word 0 - .word 56000 - .word 37024 - .word 35961 - .word 59472 - .word 49150 - .word 0 - .word 6308 - .word 2395 - .word 34858 - .word 64338 - .word 16382 - .word 0 - .word 22779 - .word 60710 - .word 1868 - .word 64356 - .word 49150 - .word 0 - .word 33054 - .word 60854 - .word 741 - .word 65087 - .word 16382 - .word 0 - .word 46387 - .word 11445 - .word 51950 - .word 65273 - .word 49150 - .word 0 - .word 6735 - .word 17127 - .word 21437 - .word 65409 - .word 16382 - .word 0 - .word 40596 - .word 22792 - .word 61241 - .word 65445 - .word 49150 - .word 0 - .word 7521 - .word 26365 - .word 15230 - .word 65303 - .word 16382 - .word 0 - .word 33891 - .word 37638 - .word 54039 - .word 64371 - .word 49150 - .word 0 - .word 37411 - .word 53884 - .word 56799 - .word 60663 - .word 16382 - .word 0 - .word 30408 - .word 30767 - .word 55068 - .word 50398 - .word 49150 - .word 0 - .word 49794 - .word 38369 - .word 16703 - .word 62901 - .word 16381 - .word 0 - .word 52540 - .word 1662 - .word 21259 - .word 41989 - .word 49148 - .word 0 - .type _tgamma_A100_table,@object - .size _tgamma_A100_table,192 - .data - .hidden fesetround - .hidden fegetround - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgammaf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgammaf.S deleted file mode 100644 index e057b83ee4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgammaf.S +++ /dev/null @@ -1,1018 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tgammaf.c" - .text -..TXTST0: -# -- Begin tgammaf - .text - .align 16,0x90 - .globl tgammaf -tgammaf: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $36, %esp - movl 8(%ebp), %edi - call fegetround -..B1.96: - movl %eax, 32(%esp) -..B1.2: - cmpl $0, 32(%esp) - jne ..B1.4 -..B1.3: - xorl %ecx, %ecx - jmp ..B1.6 -..B1.4: - addl $4, %esp - pushl $0 - call fesetround -..B1.5: - movl $1, %ecx -..B1.6: - movzwl 10(%ebp), %edx - andl $32640, %edx - shrl $7, %edx - movl 8(%ebp), %esi - shrl $31, %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $255, %edx - je ..B1.88 -..B1.7: - flds 8(%ebp) - fldz - andl $2147483647, %edi - fucom %st(1) - fnstsw %ax - movl %edi, 20(%esp) - sahf - jp ..B1.8 - je ..B1.85 -..B1.8: - cmpl $2097152, %edi - jle ..B1.82 -..B1.9: - testl %esi, %esi - je ..B1.18 -..B1.10: - cmpl $150, %edx - jge ..B1.76 -..B1.11: - flds .L_2il0floatpacket.2@GOTOFF(%ebx) - flds 20(%esp) - fld %st(0) - fadd %st(2), %st - fstps 24(%esp) - flds 24(%esp) - movl 24(%esp), %edi - fsubp %st, %st(2) - movl %edi, 16(%esp) - fcom %st(1) - fnstsw %ax - sahf - jae ..B1.13 - jp ..B1.13 -..B1.12: - fld1 - incl 16(%esp) - fsubrp %st, %st(2) -..B1.13: - fucompp - fnstsw %ax - sahf - jp ..B1.14 - je ..B1.73 -..B1.14: - flds .L_2il0floatpacket.3@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B1.18 -..B1.15: - fstp %st(0) - fstp %st(0) - testl %ecx, %ecx - je ..B1.17 -..B1.16: - addl $4, %esp - pushl 28(%esp) - call fesetround -..B1.17: - movl 16(%esp), %eax - notl %eax - andl $1, %eax - flds _small_value_32@GOTOFF(%ebx,%eax,4) - fmuls .L_2il0floatpacket.5@GOTOFF(%ebx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - fxch %st(1) - fcompl _overflow_boundary@GOTOFF(%ebx) - fnstsw %ax - sahf - jae ..B1.79 -..B1.19: - flds .L_2il0floatpacket.2@GOTOFF(%ebx) - testl %esi, %esi - je ..B1.21 -..B1.20: - fstp %st(1) - flds 20(%esp) - fld %st(1) - fadd %st(1), %st - fstps 24(%esp) - flds 24(%esp) - fsub %st(2), %st - fsubr %st(1), %st - fabs - fld %st(0) - fmul %st(1), %st - fldl 8+_tgamma_sin_table@GOTOFF(%ebx) - fmul %st(1), %st - fldl 24+_tgamma_sin_table@GOTOFF(%ebx) - fadd %st(2), %st - fmul %st(2), %st - fxch %st(1) - faddl _tgamma_sin_table@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 16+_tgamma_sin_table@GOTOFF(%ebx) - fmulp %st, %st(1) - fldl 40+_tgamma_sin_table@GOTOFF(%ebx) - fadd %st(2), %st - fmul %st(2), %st - fldl 56+_tgamma_sin_table@GOTOFF(%ebx) - fadd %st(3), %st - fmulp %st, %st(3) - faddl 32+_tgamma_sin_table@GOTOFF(%ebx) - fmulp %st, %st(1) - fxch %st(1) - faddl 48+_tgamma_sin_table@GOTOFF(%ebx) - fmulp %st, %st(1) - fmul %st(1), %st - fadd %st(1), %st - fxch %st(3) - fxch %st(2) - fxch %st(1) - jmp ..B1.22 -..B1.21: - flds 20(%esp) - fld %st(2) -..B1.22: - fld %st(1) - fxch %st(2) - fadd %st(3), %st - fstps 24(%esp) - flds 24(%esp) - movl 24(%esp), %edi - fsubp %st, %st(3) - andl $1048575, %edi - fxch %st(2) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B1.97 -..B1.23: - fld1 - decl %edi - fsubr %st, %st(1) -..B1.24: - lea 1(%edi), %eax - andl $1, %eax - movl %eax, 28(%esp) - fxch %st(2) - fcoms .L_2il0floatpacket.4@GOTOFF(%ebx) - fnstsw %ax - sahf - jb ..B1.41 -..B1.25: - fstp %st(3) - movl %edi, %eax - fsubr %st(2), %st - movl %esi, 16(%esp) - andl $-8, %eax - movl %edi, %esi - fld %st(0) - andl $7, %esi - cmpl $8, %edi - movl %eax, %edi - fmul %st(1), %st - lea -2(%esi), %edx - jl ..L3 - movl %esi, %edx -..L3: - sarl $1, %edi - addl %eax, %edi - sarl $3, %eax - addl %eax, %edi - movl 16(%esp), %esi - testl %edx, %edx - fldl _tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmul %st(2), %st - fadd %st(1), %st - fldl 8+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmul %st(3), %st - fadd %st(2), %st - fldl 16+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmul %st(4), %st - fadd %st(3), %st - fxch %st(2) - faddl 48+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fxch %st(1) - faddl 56+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fxch %st(2) - faddl 64+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fxch %st(1) - fmull 96+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmulp %st, %st(2) - fmulp %st, %st(1) - fldl 32+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmul %st(3), %st - fadd %st(2), %st - fldl 24+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmul %st(4), %st - fadd %st(3), %st - fxch %st(1) - faddl 80+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fxch %st(1) - faddl 72+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmulp %st, %st(2) - fmulp %st, %st(1) - fldl 40+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddl 88+_tgamma_A_table@GOTOFF(%ebx,%edi,8) - fmulp %st, %st(1) - je ..B1.30 -..B1.26: - fld %st(1) - jle ..B1.31 -..B1.27: - movl $1, %eax -..B1.28: - movl %eax, 16(%esp) - incl %eax - fildl 16(%esp) - cmpl %edx, %eax - fsubr %st(4), %st - fmulp %st, %st(1) - jle ..B1.28 - jmp ..B1.31 -..B1.30: - fld %st(1) -..B1.31: - testl %esi, %esi - je ..B1.38 -..B1.32: - fxch %st(4) - fmulp %st, %st(3) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fdivrp %st, %st(1) - flds .L_2il0floatpacket.7@GOTOFF(%ebx) - fcomps 8(%ebp) - fnstsw %ax - sahf - jbe ..B1.34 -..B1.33: - fldt _tgamma_A40_inv@GOTOFF(%ebx) - fmulp %st, %st(1) -..B1.34: - testl %ecx, %ecx - je ..B1.36 -..B1.35: - addl $4, %esp - pushl 28(%esp) - fstpl 16(%esp) - call fesetround -..B1.103: - fldl 16(%esp) -..B1.36: - cmpl $0, 28(%esp) - je ..B1.40 -..B1.37: - fchs - jmp ..B1.40 -..B1.38: - fstp %st(4) - fstp %st(2) - fstp %st(0) - testl %ecx, %ecx - fmulp %st, %st(1) - je ..B1.40 -..B1.39: - addl $4, %esp - pushl 28(%esp) - fstpl 16(%esp) - call fesetround -..B1.102: - fldl 16(%esp) -..B1.40: - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.41: - fstp %st(1) - fcom %st(1) - fnstsw %ax - sahf - jae ..B1.43 - jp ..B1.43 -..B1.42: - fld %st(0) - fadd %st(2), %st - jmp ..B1.44 -..B1.43: - fld %st(0) -..B1.44: - fcoml .L_2il0floatpacket.6@GOTOFF(%ebx) - fnstsw %ax - sahf - jb ..B1.46 -..B1.45: - fstp %st(3) - lea _tgamma_A175_table@GOTOFF(%ebx), %eax - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - jmp ..B1.53 -..B1.46: - fcoml .L_2il0floatpacket.8@GOTOFF(%ebx) - fnstsw %ax - sahf - jb ..B1.48 -..B1.47: - fstp %st(3) - lea _tgamma_A150_table@GOTOFF(%ebx), %eax - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - jmp ..B1.53 -..B1.48: - fldl .L_2il0floatpacket.9@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - ja ..B1.50 - jp ..B1.50 -..B1.49: - fstp %st(0) - fstp %st(3) - fld %st(1) - lea _tgamma_A125_table@GOTOFF(%ebx), %eax - faddl _local_minimum@GOTOFF(%ebx) - fsubrp %st, %st(3) - jmp ..B1.53 -..B1.50: - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.52 -..B1.51: - fstp %st(3) - lea _tgamma_A100_table@GOTOFF(%ebx), %eax - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - jmp ..B1.53 -..B1.52: - fstp %st(0) -..B1.53: - fldl (%eax) - testl %edx, %edx - je ..B1.55 -..B1.54: - fldl 56(%eax) - fmul %st(4), %st - faddl 48(%eax) - fmul %st(4), %st - faddl 40(%eax) - fmul %st(4), %st - faddl 32(%eax) - fmul %st(4), %st - faddl 24(%eax) - fmul %st(4), %st - faddl 16(%eax) - fmul %st(4), %st - faddl 8(%eax) - fmulp %st, %st(4) - faddp %st, %st(3) - jmp ..B1.56 -..B1.55: - fstp %st(3) -..B1.56: - fcom %st(1) - fnstsw %ax - sahf - jae ..B1.65 - jp ..B1.65 -..B1.57: - testl %esi, %esi - je ..B1.62 -..B1.58: - fstp %st(0) - fxch %st(1) - fmulp %st, %st(2) - fdivp %st, %st(1) - testl %ecx, %ecx - je ..B1.60 -..B1.59: - addl $4, %esp - pushl 28(%esp) - fstpl 16(%esp) - call fesetround -..B1.101: - fldl 16(%esp) -..B1.60: - cmpl $0, 28(%esp) - je ..B1.72 -..B1.61: - fchs - jmp ..B1.72 -..B1.62: - fstp %st(3) - fstp %st(0) - fdivp %st, %st(1) - testl %ecx, %ecx - jne ..B1.70 - jmp ..B1.72 -..B1.65: - testl %esi, %esi - je ..B1.69 -..B1.66: - fmulp %st, %st(3) - testl %ecx, %ecx - fxch %st(1) - fmulp %st, %st(2) - fdivp %st, %st(1) - jne ..B1.70 - jmp ..B1.72 -..B1.69: - fstp %st(3) - fstp %st(2) - fstp %st(1) - testl %ecx, %ecx - je ..B1.72 -..B1.70: - addl $4, %esp - pushl 28(%esp) - fstpl 16(%esp) - call fesetround -..B1.98: - fldl 16(%esp) -..B1.72: - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.73: - fstp %st(1) - testl %ecx, %ecx - je ..B1.75 -..B1.74: - addl $4, %esp - pushl 28(%esp) - fstpl 16(%esp) - call fesetround -..B1.106: - fldl 16(%esp) -..B1.75: - fdiv %st(0), %st - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.76: - fstp %st(1) - testl %ecx, %ecx - je ..B1.78 -..B1.77: - addl $4, %esp - pushl 28(%esp) - fstpl 16(%esp) - call fesetround -..B1.105: - fldl 16(%esp) -..B1.78: - fdiv %st(0), %st - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.79: - fstp %st(0) - testl %ecx, %ecx - je ..B1.81 -..B1.80: - addl $4, %esp - pushl 28(%esp) - call fesetround -..B1.81: - flds .L_2il0floatpacket.0@GOTOFF(%ebx) - fmul %st(0), %st - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.82: - fstp %st(0) - fstp %st(0) - testl %ecx, %ecx - je ..B1.84 -..B1.83: - addl $4, %esp - pushl 28(%esp) - call fesetround -..B1.84: - flds _large_value_32@GOTOFF(%ebx,%esi,4) - fmuls .L_2il0floatpacket.0@GOTOFF(%ebx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.85: - fstp %st(1) - testl %ecx, %ecx - je ..B1.87 -..B1.86: - addl $4, %esp - pushl 28(%esp) - fstpl 16(%esp) - call fesetround -..B1.104: - fldl 16(%esp) -..B1.87: - fdivrs _ones@GOTOFF(%ebx,%esi,4) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.88: - testl %ecx, %ecx - je ..B1.90 -..B1.89: - addl $4, %esp - pushl 28(%esp) - call fesetround -..B1.90: - testl %esi, %esi - je ..B1.92 -..B1.91: - testl $8388607, 8(%ebp) - je ..B1.93 -..B1.92: - flds 8(%ebp) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.93: - fldz - fdivrs .L_2il0floatpacket.1@GOTOFF(%ebx) - addl $36, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.97: - fld1 - jmp ..B1.24 - .align 16,0x90 - .type tgammaf,@function - .size tgammaf,.-tgammaf - .data -# -- End tgammaf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.6: - .long 0x00000000,0x3ffc0000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x3ff80000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x3ff40000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x71800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x80000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x4b400000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0xc22c0000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -.L_2il0floatpacket.4: - .long 0x40000000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,4 - .align 4 -.L_2il0floatpacket.5: - .long 0x0d800000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,4 - .align 4 -.L_2il0floatpacket.7: - .long 0xc2200000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -_overflow_boundary: - .long 0 - .long 1078035746 - .type _overflow_boundary,@object - .size _overflow_boundary,8 - .align 4 -_tgamma_sin_table: - .long 1980114658 - .long 3200337074 - .long 804494867 - .long 1049689241 - .long 2884431818 - .long 1079329239 - .long 930502348 - .long 3223780109 - .long 1245824743 - .long 1080878479 - .long 2510431012 - .long 1073721695 - .long 1661126174 - .long 1078219640 - .long 1205599443 - .long 3223573914 - .type _tgamma_sin_table,@object - .size _tgamma_sin_table,64 - .align 4 -_tgamma_A_table: - .long 3121394612 - .long 1074393041 - .long 2029996066 - .long 1073722195 - .long 4137005464 - .long 1071238760 - .long 3372276227 - .long 3220751114 - .long 68401302 - .long 3222286887 - .long 1275947047 - .long 3223263002 - .long 4031994882 - .long 1074665426 - .long 1089993416 - .long 1074817170 - .long 427005612 - .long 1075089294 - .long 1508975772 - .long 1075601433 - .long 2111623053 - .long 1076192020 - .long 75538972 - .long 1077100653 - .long 2171869559 - .long 1055005400 - .long 2919987515 - .long 1074143787 - .long 860307162 - .long 1073890599 - .long 2407232453 - .long 1073038722 - .long 1468490975 - .long 3216757264 - .long 846192051 - .long 3221294835 - .long 402234383 - .long 3222573752 - .long 2566208764 - .long 1073763360 - .long 162360449 - .long 1073949715 - .long 1512348533 - .long 1074371728 - .long 2920174397 - .long 1074968946 - .long 3785085665 - .long 1075671857 - .long 1922428759 - .long 1076496000 - .long 2446382284 - .long 1072101083 - .long 42366358 - .long 1073746704 - .long 3587290866 - .long 1073390434 - .long 1169958761 - .long 1072607731 - .long 3891474799 - .long 3217275878 - .long 1452792685 - .long 3221010072 - .long 1006385979 - .long 3222363118 - .long 3663632771 - .long 1072778759 - .long 3212960448 - .long 1073036150 - .long 2202365811 - .long 1073636095 - .long 2023822532 - .long 1074258740 - .long 40477660 - .long 1075053854 - .long 658935515 - .long 1076010306 - .long 932572503 - .long 1105834679 - .long 1233355998 - .long 1073412029 - .long 3033646034 - .long 1073097432 - .long 3149182759 - .long 1072206908 - .long 1726027606 - .long 3217766868 - .long 3439348786 - .long 3220880557 - .long 2080997065 - .long 3222253033 - .long 843307201 - .long 1072200111 - .long 3138702878 - .long 1072613342 - .long 3610734718 - .long 1073142430 - .long 2651617324 - .long 1073914526 - .long 2611481547 - .long 1074796471 - .long 3284459136 - .long 1075745821 - .long 1365755587 - .long 1144167771 - .long 2699624028 - .long 1073212595 - .long 2232824171 - .long 1072922970 - .long 3659224963 - .long 1071959670 - .long 3026238542 - .long 3218100813 - .long 4240441539 - .long 3220810712 - .long 1772362075 - .long 3222132889 - .long 3742687744 - .long 1071863890 - .long 56227394 - .long 1072220001 - .long 969667939 - .long 1072882737 - .long 880059910 - .long 1073714908 - .long 247554419 - .long 1074515829 - .long 48918556 - .long 1075495246 - .long 2601377264 - .long 1185936586 - .long 3625529495 - .long 1073077476 - .long 3298250746 - .long 1072804056 - .long 2971501690 - .long 1071788510 - .long 2950162741 - .long 3218231788 - .long 26528490 - .long 3220765509 - .long 3761284804 - .long 3222050392 - .long 3800626879 - .long 1071658634 - .long 1108715276 - .long 1071977390 - .long 286829382 - .long 1072720005 - .long 3141975933 - .long 1073477575 - .long 4145290123 - .long 1074329952 - .long 2167683451 - .long 1075329952 - .long 0 - .long 1072693248 - .type _tgamma_A_table,@object - .size _tgamma_A_table,624 - .align 4 -_tgamma_A175_table: - .long 1682645026 - .long 1072688670 - .long 3753006229 - .long 3219243438 - .long 177700005 - .long 1072453288 - .long 3289039035 - .long 3219374666 - .long 2492560830 - .long 1071326765 - .long 123078934 - .long 3217486055 - .long 3499570675 - .long 1068068407 - .long 1362583934 - .long 3212265128 - .type _tgamma_A175_table,@object - .size _tgamma_A175_table,64 - .align 4 -_tgamma_A150_table: - .long 988281800 - .long 1072692321 - .long 502740408 - .long 3219277207 - .long 2058512241 - .long 1072588117 - .long 2109547492 - .long 3219675970 - .long 3371209031 - .long 1071892748 - .long 3191518250 - .long 3218447665 - .long 3816909947 - .long 1069498883 - .long 1366906983 - .long 3214177035 - .type _tgamma_A150_table,@object - .size _tgamma_A150_table,64 - .align 4 -_tgamma_A125_table: - .long 2191760034 - .long 1072453340 - .long 2642694891 - .long 3186525859 - .long 1706815263 - .long 1071344724 - .long 1896485049 - .long 3217079006 - .long 441733475 - .long 1069848224 - .long 978611902 - .long 3216500728 - .long 351495825 - .long 1068442485 - .long 1680249708 - .long 3216253219 - .type _tgamma_A125_table,@object - .size _tgamma_A125_table,64 - .align 4 -_local_minimum: - .long 2371549438 - .long 1071483745 - .type _local_minimum,@object - .size _local_minimum,8 - .align 4 -_tgamma_A100_table: - .long 4293468318 - .long 1072693247 - .long 3444857508 - .long 3219290252 - .long 3510931740 - .long 1072670280 - .long 3644082616 - .long 3219982336 - .long 2685454907 - .long 1072646231 - .long 4151446349 - .long 3220059936 - .long 4004008463 - .long 1072263166 - .long 1217534056 - .long 3218706582 - .type _tgamma_A100_table,@object - .size _tgamma_A100_table,64 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 2 -_tgamma_A40_inv: - .word 64725 - .word 58913 - .word 22381 - .word 51879 - .word 16232 - .word 0 - .type _tgamma_A40_inv,@object - .size _tgamma_A40_inv,12 - .data - .hidden fesetround - .hidden fegetround - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgammal.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgammal.S deleted file mode 100644 index 11cb8a5ab1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/tgammal.S +++ /dev/null @@ -1,3738 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tgammal.c" - .text -..TXTST0: -# -- Begin tgammal - .text - .align 16,0x90 - .globl tgammal -tgammal: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $308, %esp - fldt 8(%ebp) - movl %gs:20, %eax - xorl %esp, %eax - movl %eax, 248(%esp) - fstpt 212(%esp) -..B1.2: - fnstcw 150(%esp) -..B1.3: - movzwl 150(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.195 -..B1.4: - orl $-64768, %edx - movw %dx, 148(%esp) -..B1.5: - fldcw 148(%esp) -..B1.6: - movl $1, %esi -..B1.7: - call fegetround -..B1.198: - movl %eax, 116(%esp) -..B1.8: - cmpl $0, 116(%esp) - jne ..B1.10 -..B1.9: - xorl %edi, %edi - jmp ..B1.12 -..B1.10: - addl $-16, %esp - movl $0, (%esp) - call fesetround -..B1.199: - addl $16, %esp -..B1.11: - movl $1, %edi -..B1.12: - movl 16(%ebp), %eax - movzwl 16(%ebp), %ecx - shrl $15, %eax - andl $32767, %ecx - andl $1, %eax - movl %eax, 132(%esp) - cmpl $32767, %ecx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - je ..B1.180 -..B1.13: - fldt 8(%ebp) - andl $32767, 220(%esp) - fldl _zeros@GOTOFF(%ebx) - fucom %st(1) - fnstsw %ax - sahf - jp ..B1.14 - je ..B1.173 -..B1.14: - cmpl $0, 132(%esp) - je ..B1.27 -..B1.15: - cmpl $16446, %ecx - jge ..B1.143 -..B1.16: - fldt 212(%esp) - fld %st(0) - fldl _TWO_63H@GOTOFF(%ebx) - fadd %st, %st(1) - fxch %st(1) - fstpt 92(%esp) - fldt 92(%esp) - fsubp %st, %st(1) - movl 92(%esp), %edx - fcom %st(1) - fnstsw %ax - movl %edx, 36(%esp) - sahf - jbe ..B1.18 -..B1.17: - incl 36(%esp) - fsubl _ones@GOTOFF(%ebx) -..B1.18: - fucompp - fnstsw %ax - sahf - jp ..B1.19 - je ..B1.136 -..B1.19: - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B1.27 -..B1.20: - fstp %st(0) - fstp %st(0) - testl %edi, %edi - je ..B1.22 -..B1.21: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.200: - addl $16, %esp -..B1.22: - fldt _small_value_80@GOTOFF(%ebx) - movl 36(%esp), %edx - notl %edx - andl $1, %edx - testl %esi, %esi - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fldt _small_value_80@GOTOFF(%ebx,%ecx) - fmulp %st, %st(1) - fstpt 64(%esp) - je ..B1.24 -..B1.23: - fldcw 150(%esp) -..B1.24: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 -..B1.25: - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.27: - fldt _POS_OVERFLOW@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - fxch %st(1) - fstp %st(0) - sahf - jp ..B1.28 - jb ..B1.166 -..B1.28: - testl %ecx, %ecx - je ..B1.156 -..B1.29: - fldt 212(%esp) - fld %st(1) - fxch %st(1) - fstpt 152(%esp) - fldt 152(%esp) - fstpt 168(%esp) - fldt 168(%esp) - fxch %st(2) - fstpt 136(%esp) - fldt 136(%esp) - cmpl $0, 132(%esp) - je ..B1.33 -..B1.30: - fldl _TWO_63H@GOTOFF(%ebx) - cmpl $16299, %ecx - jle ..B1.32 -..B1.31: - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fxch %st(3) - fstpt 24(%esp) - fld %st(3) - fadd %st(1), %st - fsub %st(1), %st - fsubr %st(4), %st - fstpt 52(%esp) - andl $32767, 60(%esp) - fstpt 40(%esp) - fstpt 80(%esp) - fxch %st(1) - fstpt 64(%esp) - fldt 64(%esp) - fldt 52(%esp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - fchs - fsubrp %st, %st(3) - fld %st(2) - fld %st(1) - fsub %st(4), %st - fmul %st, %st(1) - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(4) - fmul %st(5), %st - fxch %st(3) - fstpt (%esp) - fld %st(2) - fldl _TWO_53H@GOTOFF(%ebx) - fld %st(0) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fld %st(4) - fmul %st(1), %st - fld %st(5) - fadd %st(1), %st - fsubp %st, %st(1) - fstpt 152(%esp) - fldt 152(%esp) - fsubrp %st, %st(5) - fxch %st(4) - fstpt 136(%esp) - fldt 72+_tgammal_S@GOTOFF(%ebx) - fmul %st(1), %st - fldt 60+_tgammal_S@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_tgammal_S@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 36+_tgammal_S@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 24+_tgammal_S@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 12+_tgammal_S@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt _tgammal_S@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldl _tgammal_S2@GOTOFF(%ebx) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - faddl 8+_tgammal_S2@GOTOFF(%ebx) - fld %st(0) - fmul %st(4), %st - faddp %st, %st(3) - fmul %st(4), %st - faddp %st, %st(2) - fldl 8+_tgammal_S1@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldl _tgammal_S1@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(4) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fmul %st(3), %st - fld %st(2) - fmul %st(5), %st - fxch %st(4) - fmulp %st, %st(3) - faddp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(2) - fldl _ones@GOTOFF(%ebx) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fmul %st(7), %st - fmul %st, %st(6) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fxch %st(4) - faddp %st, %st(1) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fmul %st, %st(4) - fldt (%esp) - fld %st(0) - fmulp %st, %st(2) - fmulp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(3) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(1) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(3) - fld %st(2) - fxch %st(2) - fstpt 184(%esp) - fldt 184(%esp) - fxch %st(3) - fstpt 200(%esp) - fldt 200(%esp) - fldt 152(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpt 104(%esp) - fmulp %st, %st(1) - fldt 136(%esp) - fmul %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 120(%esp) - fldt 80(%esp) - fldt 24(%esp) - fldt 40(%esp) - fldt 64(%esp) - fxch %st(3) - fxch %st(1) - jmp ..B1.34 -..B1.32: - fldt 168(%esp) - fstpt 184(%esp) - fxch %st(1) - fstpt 104(%esp) - fldt 104(%esp) - fxch %st(2) - fstpt 200(%esp) - fld %st(1) - fxch %st(2) - fstpt 120(%esp) - fldt 120(%esp) - fxch %st(1) - jmp ..B1.34 -..B1.33: - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - fstpt 120(%esp) - fldt 120(%esp) - fstpt 104(%esp) - fldt 104(%esp) - fstpt 200(%esp) - fldt 200(%esp) - fstpt 184(%esp) - fldl _TWO_63H@GOTOFF(%ebx) -..B1.34: - fldt .L_2il0floatpacket.3@GOTOFF(%ebx) - fcomp %st(4) - fnstsw %ax - sahf - jp ..B1.35 - jbe ..B1.96 -..B1.35: - fld %st(3) - fadd %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fsubp %st, %st(1) - movl 92(%esp), %edx - fcom %st(3) - fnstsw %ax - sahf - jbe ..B1.37 -..B1.36: - decl %edx - fsubl _ones@GOTOFF(%ebx) -..B1.37: - cmpl $2, %edx - lea 1(%edx), %eax - movl %eax, 76(%esp) - jl ..B1.42 -..B1.38: - testb $1, %dl - je ..B1.40 -..B1.39: - fldl _ones@GOTOFF(%ebx) - lea -1(%edx), %eax - movl %eax, (%esp) - fsubr %st, %st(4) - fxch %st(4) - fstpt 168(%esp) - fsubp %st, %st(3) - jmp ..B1.41 -..B1.40: - fstp %st(3) - movl %edx, (%esp) -..B1.41: - fldt .L_2il0floatpacket.4@GOTOFF(%ebx) - movl (%esp), %eax - faddp %st, %st(3) - fldt 168(%esp) - addl $-2, %eax - sarl $1, %eax - movl %edi, 40(%esp) - fsubp %st, %st(3) - imull $180, %eax, %edi - lea (%eax,%eax,2), %eax - shll $5, %eax - lea _tgammal_T2@GOTOFF(%ebx,%edi), %edi - movl %edi, 36(%esp) - movl 40(%esp), %edi - lea _tgammal_A2@GOTOFF(%ebx,%eax), %eax - jmp ..B1.56 -..B1.42: - fstp %st(0) - fldt .L_2il0floatpacket.5@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B1.44 -..B1.43: - movl $3, (%esp) - jmp ..B1.55 -..B1.44: - fldt .L_2il0floatpacket.7@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B1.46 -..B1.45: - movl $0, (%esp) - jmp ..B1.55 -..B1.46: - fldt .L_2il0floatpacket.8@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B1.48 -..B1.47: - fldt .L_2il0floatpacket.4@GOTOFF(%ebx) - movl $1, (%esp) - fsubrp %st, %st(3) - jmp ..B1.55 -..B1.48: - fldt .L_2il0floatpacket.9@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B1.50 -..B1.49: - movl $2, (%esp) - fxch %st(2) - fsubrl _ones@GOTOFF(%ebx) - fxch %st(2) - jmp ..B1.55 -..B1.50: - fldt .L_2il0floatpacket.10@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B1.52 -..B1.51: - movl $0, (%esp) - fxch %st(2) - fsubl _ones@GOTOFF(%ebx) - fxch %st(2) - jmp ..B1.55 -..B1.52: - fldt .L_2il0floatpacket.11@GOTOFF(%ebx) - fcomp %st(3) - fnstsw %ax - sahf - jbe ..B1.54 -..B1.53: - fldt .L_2il0floatpacket.12@GOTOFF(%ebx) - movl $1, (%esp) - fsubrp %st, %st(3) - jmp ..B1.55 -..B1.54: - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - movl $2, (%esp) - fsubp %st, %st(3) -..B1.55: - movl (%esp), %eax - fldz - movl %edi, 40(%esp) - imull $180, %eax, %edi - fstpt 168(%esp) - lea (%eax,%eax,2), %eax - shll $5, %eax - lea _tgammal_T1@GOTOFF(%ebx,%edi), %edi - movl %edi, 36(%esp) - movl 40(%esp), %edi - lea _tgammal_A1@GOTOFF(%ebx,%eax), %eax -..B1.56: - cmpl $16299, %ecx - jle ..B1.62 -..B1.57: - fstp %st(1) - movl %edi, 40(%esp) - testb $1, %dl - movl 36(%esp), %edi - fstpt 80(%esp) - fldt 168(%edi) - fmul %st(1), %st - fldt 156(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 144(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 132(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 120(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 108(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 96(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 84(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 72(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 60(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48(%edi) - faddp %st, %st(1) - fmul %st(1), %st - fld %st(1) - fldt 36(%edi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24(%edi) - faddp %st, %st(1) - fmul %st(2), %st - fldt 12(%edi) - faddp %st, %st(1) - fmul %st(2), %st - fld %st(2) - fldt (%edi) - movl 40(%esp), %edi - faddp %st, %st(2) - fld %st(3) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fmul %st, %st(4) - fxch %st(2) - fadd %st(4), %st - fsubp %st, %st(4) - fsub %st(3), %st - fld %st(0) - fld %st(2) - fmul %st(4), %st - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fsubr %st, %st(5) - fxch %st(2) - fmul %st(5), %st - fxch %st(5) - fmul %st(6), %st - faddp %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(4) - fxch %st(2) - fstpt (%esp) - fldt (%esp) - fldl 88(%eax) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - fld %st(4) - fadd %st(4), %st - fsubr %st, %st(4) - fxch %st(5) - faddp %st, %st(4) - faddp %st, %st(3) - fldl 80(%eax) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(4), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fld %st(1) - fmul %st(5), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fld %st(1) - fmul %st(4), %st - fld %st(3) - fmul %st(6), %st - fxch %st(5) - fmul %st(6), %st - faddp %st, %st(1) - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldl 72(%eax) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(5), %st - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - faddp %st, %st(4) - fldl 64(%eax) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(4) - fld %st(3) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fld %st(1) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(5) - faddp %st, %st(3) - fld %st(3) - fmul %st(3), %st - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fldl 56(%eax) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(4), %st - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - fldl 48(%eax) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fld %st(0) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(3) - fmul %st(2), %st - fld %st(3) - fmul %st(6), %st - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(1) - fxch %st(3) - fmul %st(4), %st - faddp %st, %st(3) - fldl 40(%eax) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fldl 32(%eax) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fld %st(1) - fmul %st(4), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fld %st(4) - fmul %st(4), %st - fxch %st(4) - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(3) - fldl 24(%eax) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fldl 16(%eax) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fmul %st, %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsub %st, %st(1) - fld %st(1) - fmul %st(6), %st - fxch %st(2) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(3) - fmul %st, %st(5) - fld %st(4) - fmulp %st, %st(1) - faddp %st, %st(5) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl 8(%eax) - fld %st(0) - fadd %st(4), %st - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(4) - fxch %st(1) - fadd %st, %st(4) - fsubrp %st, %st(2) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fldl (%eax) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt 80(%esp) - je ..B1.60 -..B1.58: - cmpl $1, %edx - jle ..B1.60 -..B1.59: - fstp %st(0) - fstp %st(0) - fldt (%esp) - fld %st(1) - fmul %st(1), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fld %st(1) - fldt 168(%esp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fstpt 92(%esp) - fldt 92(%esp) - fsubp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(3) - fld %st(4) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - jmp ..B1.64 -..B1.60: - fxch %st(1) - fstpt 92(%esp) - fxch %st(1) - jmp ..B1.63 -..B1.62: - fldl _ones@GOTOFF(%ebx) -..B1.63: - testl %edx, %edx - jle ..B1.77 -..B1.225: - fstp %st(1) -..B1.64: - cmpl $0, 132(%esp) - jne ..B1.71 -..B1.65: - testl %edi, %edi - je ..B1.67 -..B1.66: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 40(%esp) - fstpt 80(%esp) - call fesetround -..B1.201: - fldt 80(%esp) - fldt 40(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.67: - testl %esi, %esi - faddp %st, %st(1) - fstpt 64(%esp) - je ..B1.226 -..B1.68: - fstpt 52(%esp) -..B1.202: - fldcw 150(%esp) - jmp ..B1.69 -..B1.226: - fstp %st(0) -..B1.69: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 -..B1.70: - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.71: - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fld %st(1) - fldt 104(%esp) - testl %edi, %edi - fld %st(0) - fmul %st(3), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fldt 120(%esp) - faddp %st, %st(2) - fld %st(4) - fmul %st(4), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fmul %st(1), %st - fxch %st(3) - fsubr %st, %st(5) - fxch %st(5) - faddp %st, %st(6) - fld %st(5) - fmul %st(2), %st - fxch %st(1) - fmulp %st, %st(6) - faddp %st, %st(5) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fld %st(1) - fld %st(3) - fxch %st(2) - fdivrl _ones@GOTOFF(%ebx) - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(2) - fsub %st(1), %st - fld %st(3) - fmul %st(5), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(5) - faddp %st, %st(4) - fld %st(1) - fmul %st(4), %st - fld %st(1) - fmul %st(6), %st - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(1) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(2) - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - fld %st(0) - fsub %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - fsubp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fstpt 224(%esp) - fldt 224(%esp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(4) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(4) - fld %st(5) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fxch %st(3) - fstpt 236(%esp) - fxch %st(2) - fxch %st(1) - je ..B1.73 -..B1.72: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 40(%esp) - fstpt 56(%esp) - fstpt 80(%esp) - call fesetround -..B1.203: - fldt 80(%esp) - fldt 56(%esp) - fldt 40(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.73: - movl 76(%esp), %eax - faddp %st, %st(1) - andl $1, %eax - fstpt 64(%esp) - shll $15, %eax - xorl %eax, 72(%esp) - testl %esi, %esi - je ..B1.227 -..B1.74: - fxch %st(1) - fstpt 52(%esp) - fstpt 92(%esp) -..B1.204: - fldcw 150(%esp) - jmp ..B1.75 -..B1.227: - fstp %st(0) - fstp %st(0) -..B1.75: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 -..B1.76: - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.77: - fldl _ones@GOTOFF(%ebx) - cmpl $0, 132(%esp) - jne ..B1.87 -..B1.78: - fldt 152(%esp) - cmpl $100, %ecx - fldt 136(%esp) - faddp %st, %st(1) - jge ..B1.80 -..B1.79: - fstp %st(4) - fdivp %st, %st(3) - fmulp %st, %st(2) - fxch %st(2) - jmp ..B1.81 -..B1.80: - fstp %st(3) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fld %st(0) - fxch %st(4) - fdivrp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(4) - fsub %st(3), %st - fxch %st(5) - fstpt 64(%esp) - fxch %st(3) - fstpt 24(%esp) - fldt 152(%esp) - fld %st(0) - fmul %st(4), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fld %st(5) - fldt 136(%esp) - faddp %st, %st(3) - fmul %st(2), %st - fld %st(4) - fmul %st(2), %st - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(1) - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(1) - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - fld %st(0) - fsub %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - fsubrp %st, %st(1) - fsubp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(5) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 224(%esp) - fldt 224(%esp) - fld %st(4) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(4) - fld %st(6) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(3) - fld %st(1) - fmul %st(4), %st - fxch %st(1) - fmul %st, %st(4) - fld %st(2) - fadd %st(2), %st - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(5) - fstpt 236(%esp) - fld %st(0) - fadd %st(4), %st - fstpt 92(%esp) - fldt 92(%esp) - fsubp %st, %st(4) - fsub %st(3), %st - faddp %st, %st(2) - fldt 24(%esp) - faddp %st, %st(1) - fld %st(0) - fmul %st(2), %st - fld %st(4) - fmul %st(4), %st - fxch %st(3) - fmulp %st, %st(5) - faddp %st, %st(4) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 64(%esp) -..B1.81: - testl %edi, %edi - fxch %st(1) - je ..B1.83 -..B1.82: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 80(%esp) - fstpt 96(%esp) - call fesetround -..B1.205: - fldt 96(%esp) - fldt 80(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.83: - testl %esi, %esi - faddp %st, %st(2) - fxch %st(1) - fstpt 64(%esp) - je ..B1.228 -..B1.84: - fstpt 52(%esp) -..B1.206: - fldcw 150(%esp) - jmp ..B1.85 -..B1.228: - fstp %st(0) -..B1.85: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 -..B1.86: - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.87: - cmpl $100, %ecx - jge ..B1.89 -..B1.88: - fldt 184(%esp) - fmulp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fdivrp %st, %st(2) - fxch %st(2) - jmp ..B1.90 -..B1.89: - fstp %st(2) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fld %st(1) - fxch %st(5) - fstpt 64(%esp) - fld %st(1) - fmul %st(1), %st - fadd %st, %st(5) - fsubrp %st, %st(5) - fxch %st(1) - fsub %st(4), %st - faddp %st, %st(3) - fldt 184(%esp) - fld %st(0) - fmul %st(2), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fld %st(5) - fmul %st(1), %st - fxch %st(1) - fmul %st(5), %st - fldt 200(%esp) - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(6) - fmulp %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - faddp %st, %st(3) - fld %st(2) - fadd %st(4), %st - fdivrp %st, %st(2) - fld %st(0) - fmul %st(2), %st - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(1) - fld %st(0) - fsubrp %st, %st(3) - fld %st(1) - fmul %st(5), %st - fld %st(5) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fld %st(2) - fmul %st(4), %st - fld %st(1) - fmul %st(6), %st - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(1) - fxch %st(3) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(3) - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - fld %st(0) - fsub %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(4) - fsubrp %st, %st(1) - fadd %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fxch %st(1) - fsub %st(3), %st - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fld %st(5) - fxch %st(2) - fsubrp %st, %st(1) - fmul %st, %st(5) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmul %st(2), %st - fld %st(3) - fmul %st(2), %st - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(4) - fxch %st(2) - fstpt 236(%esp) - fxch %st(1) - fstpt 224(%esp) - fldt 64(%esp) -..B1.90: - testl %edi, %edi - fxch %st(1) - je ..B1.92 -..B1.91: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 80(%esp) - fstpt 96(%esp) - call fesetround -..B1.207: - fldt 96(%esp) - fldt 80(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.92: - movl 76(%esp), %eax - faddp %st, %st(2) - andl $1, %eax - fxch %st(1) - fstpt 64(%esp) - shll $15, %eax - xorl %eax, 72(%esp) - testl %esi, %esi - je ..B1.229 -..B1.93: - fstpt 52(%esp) -..B1.208: - fldcw 150(%esp) - jmp ..B1.94 -..B1.229: - fstp %st(0) -..B1.94: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 -..B1.95: - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.96: - fstp %st(2) - fldl _ones@GOTOFF(%ebx) - fstl 56(%esp) - fld %st(3) - fdivrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt (%esp) - addl $-32, %esp - lea 208(%esp), %eax - fxch %st(3) - fstpt (%esp) - fstpt 12(%esp) - movl %eax, 24(%esp) - fxch %st(1) - fstpt 56(%esp) - fstpt 72(%esp) - call __libm_logl_k80 -..B1.209: - fstp %st(0) - fldt 72(%esp) - fldt 56(%esp) - addl $32, %esp -..B1.97: - fldl 56+_tgammal_B@GOTOFF(%ebx) - fxch %st(2) - fstpt 40(%esp) - fldt (%esp) - fmul %st, %st(2) - fldt _tgammal_B0@GOTOFF(%ebx) - fldt .L_2il0floatpacket.4@GOTOFF(%ebx) - cmpl $0, 132(%esp) - fxch %st(4) - faddl 48+_tgammal_B@GOTOFF(%ebx) - fmul %st(2), %st - faddl 40+_tgammal_B@GOTOFF(%ebx) - fmul %st(2), %st - faddl 32+_tgammal_B@GOTOFF(%ebx) - fmul %st(2), %st - faddl 24+_tgammal_B@GOTOFF(%ebx) - fmul %st(2), %st - faddl 16+_tgammal_B@GOTOFF(%ebx) - fmul %st(2), %st - faddl 8+_tgammal_B@GOTOFF(%ebx) - fmul %st(2), %st - faddl _tgammal_B@GOTOFF(%ebx) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 212(%esp) - fsub %st, %st(2) - fld %st(2) - fxch %st(1) - fchs - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fld %st(0) - fmul %st(5), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fldt 176(%esp) - fld %st(0) - fmulp %st, %st(4) - fld %st(0) - fadd %st(4), %st - fstpt 24(%esp) - fldt 24(%esp) - fsubp %st, %st(4) - fxch %st(3) - fstpt 176(%esp) - fldt 176(%esp) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(4) - fldt 188(%esp) - faddp %st, %st(5) - fxch %st(2) - fmul %st(4), %st - fld %st(6) - fmul %st(5), %st - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fld %st(0) - fadd %st(6), %st - fsub %st, %st(6) - fxch %st(6) - fchs - fadd %st(1), %st - fxch %st(4) - fstpt 188(%esp) - fsubrp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(2) - fadd %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fadd %st, %st(1) - fxch %st(1) - fsub %st, %st(4) - fxch %st(4) - fchs - fadd %st(1), %st - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldl 8+_tgammal_C@GOTOFF(%ebx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldl _tgammal_C@GOTOFF(%ebx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.2@GOTOFF(%ebx) - fldt 40(%esp) - jne ..B1.109 -..B1.98: - fstp %st(1) - fxch %st(1) - fstpt 236(%esp) - lea 224(%esp), %edx - addl $-16, %esp - fxch %st(1) - fstpt (%edx) - lea 168(%esp), %eax - movl %eax, (%esp) - movl %edx, 4(%esp) - fstpt -112(%eax) - call __libm_expl_k80 -..B1.210: - fldt 56(%esp) - addl $16, %esp -..B1.99: - testl %edi, %edi - fxch %st(1) - je ..B1.102 -..B1.100: - fstpt (%esp) - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 56(%esp) - call fesetround -..B1.211: - fldt 56(%esp) - addl $16, %esp -..B1.101: - fldt (%esp) -..B1.102: - fldt 152(%esp) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%esp) - fldt 164(%esp) - movl (%esp), %edx - cmpl $16383, %edx - faddp %st, %st(1) - fldl 56(%esp) - fstpt (%esp) - jg ..B1.104 -..B1.103: - addl $16383, %edx - movzwl 8(%esp), %eax - andl $32767, %edx - andl $-32768, %eax - orl %edx, %eax - movw %ax, 8(%esp) - fldt (%esp) - fmulp %st, %st(1) - jmp ..B1.105 -..B1.104: - fldt _TWO_POW_16383@GOTOFF(%ebx) - andl $32767, %edx - fmulp %st, %st(1) - movzwl 8(%esp), %eax - andl $-32768, %eax - orl %edx, %eax - movw %ax, 8(%esp) - fldt (%esp) - fmulp %st, %st(1) -..B1.105: - fstpt 64(%esp) - testl %esi, %esi - je ..B1.107 -..B1.106: - fldt 24(%esp) - fstpt 92(%esp) -..B1.212: - fldcw 150(%esp) -..B1.107: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 -..B1.108: - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.109: - fxch %st(2) - fchs - lea 224(%esp), %edx - incl 36(%esp) - fstpt 12(%edx) - addl $-16, %esp - fxch %st(2) - fchs - lea 168(%esp), %eax - fstpt (%edx) - movl %eax, (%esp) - movl %edx, 4(%esp) - fxch %st(1) - fstpt 16(%esp) - fstpt -112(%eax) - call __libm_expl_k80 -..B1.213: - fldt 56(%esp) - fxch %st(1) - fstpt 40(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.110: - fldt 104(%esp) - fld %st(0) - fld %st(2) - fld %st(2) - fldt 120(%esp) - fadd %st, %st(3) - fxch %st(3) - fdivrl 56(%esp) - fmul %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(3) - fsub %st(2), %st - fld %st(4) - fmul %st(6), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fld %st(3) - fmul %st(1), %st - fld %st(3) - fmul %st(3), %st - fxch %st(3) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(1) - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt .L_2il0floatpacket.6@GOTOFF(%ebx) - fld %st(0) - fsub %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - fsubrp %st, %st(1) - fsubp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(4) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fstpt 224(%esp) - fldt 224(%esp) - fld %st(4) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(4) - fld %st(3) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fstpt 236(%esp) - fld %st(2) - fxch %st(1) - fmul %st, %st(3) - fldt 152(%esp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fstpt 152(%esp) - fldt 152(%esp) - fld %st(1) - fadd %st(5), %st - fsub %st, %st(5) - fxch %st(2) - fsub %st(5), %st - faddp %st, %st(4) - fld %st(3) - fxch %st(1) - fsubr %st, %st(3) - fmul %st, %st(4) - fldt 164(%esp) - faddp %st, %st(4) - fxch %st(1) - fmul %st(3), %st - fld %st(5) - fmulp %st, %st(2) - fxch %st(3) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fstpt 64(%esp) - fldt 64(%esp) - movzwl 72(%esp), %ecx - andl $32767, %ecx - fxch %st(4) - fstpt 164(%esp) - fldt 24(%esp) - faddp %st, %st(5) - fxch %st(4) - fstpt (%esp) - movl (%esp), %edx - lea (%edx,%ecx), %eax - lea -1(%edx,%ecx), %ecx - cmpl $32765, %ecx - ja ..B1.116 -..B1.111: - fstp %st(1) - fstp %st(0) - fldl 56(%esp) - lea 16382(%edx), %eax - fstpt (%esp) - cmpl $32765, %eax - ja ..B1.113 -..B1.112: - addl $16383, %edx - movzwl 8(%esp), %eax - andl $32767, %edx - andl $-32768, %eax - orl %edx, %eax - movw %ax, 8(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.129 -..B1.113: - cmpl $16383, %edx - jle ..B1.115 -..B1.114: - fldt _TWO_POW_16383@GOTOFF(%ebx) - andl $32767, %edx - fmulp %st, %st(1) - movzwl 8(%esp), %eax - andl $-32768, %eax - orl %edx, %eax - movw %ax, 8(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.129 -..B1.115: - fldt _TWO_POW_M16382@GOTOFF(%ebx) - addl $32765, %edx - fmulp %st, %st(1) - andl $32767, %edx - movzwl 8(%esp), %eax - andl $-32768, %eax - orl %edx, %eax - movw %ax, 8(%esp) - fldt (%esp) - fmulp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.129 -..B1.116: - fstp %st(2) - cmpl $32766, %eax - jle ..B1.118 -..B1.117: - fstp %st(0) - fstp %st(0) - fldt _TWO_POW_16383@GOTOFF(%ebx) - fmul %st(0), %st - fstpt 64(%esp) - jmp ..B1.129 -..B1.118: - cmpl $-65, %eax - jg ..B1.120 -..B1.119: - fstp %st(0) - fstp %st(0) - fldt _TWO_POW_M16382@GOTOFF(%ebx) - fmul %st(0), %st - fstpt 64(%esp) - jmp ..B1.129 -..B1.120: - fldl 56(%esp) - cmpl $-16382, %edx - fstpt (%esp) - jl ..B1.125 -..B1.121: - fstp %st(2) - fldl _TWO_53H@GOTOFF(%ebx) - addl $16383, %edx - fmul %st(2), %st - fld %st(2) - movzwl 8(%esp), %eax - andl $32767, %edx - andl $-32768, %eax - fsubr %st(1), %st - orl %edx, %eax - fsubr %st, %st(1) - movw %ax, 8(%esp) - testl %edi, %edi - fxch %st(1) - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(2) - fldt (%esp) - fmul %st, %st(3) - fxch %st(3) - fstpt 24(%esp) - fxch %st(2) - fmulp %st, %st(1) - je ..B1.124 -..B1.122: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 56(%esp) - call fesetround -..B1.214: - fldt 56(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.123: - xorl %edi, %edi -..B1.124: - fldt 24(%esp) - faddp %st, %st(1) - fstpt 64(%esp) - jmp ..B1.129 -..B1.125: - fldl _TWO_32HP@GOTOFF(%ebx) - negl %edx - fldt _TWO_POW_M16000@GOTOFF(%ebx) - addl $-15999, %edx - fmul %st, %st(2) - andl $32767, %edx - fld %st(2) - fxch %st(1) - fmulp %st, %st(4) - movzwl 8(%esp), %eax - fadd %st(3), %st - fldt _small_value_80@GOTOFF(%ebx) - andl $-32768, %eax - orl %edx, %eax - movw %ax, 8(%esp) - testl %edi, %edi - fmul %st(0), %st - fstpt 12(%esp) - fldt (%esp) - fadd %st, %st(1) - fxch %st(1) - fmul %st, %st(2) - fmull _TWO_32H@GOTOFF(%ebx) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 24(%esp) - fldt 24(%esp) - fsubp %st, %st(1) - fsubrp %st, %st(1) - faddp %st, %st(1) - je ..B1.128 -..B1.126: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 16(%esp) - fstpt 56(%esp) - call fesetround -..B1.215: - fldt 56(%esp) - fldt 16(%esp) - addl $16, %esp -..B1.127: - xorl %edi, %edi -..B1.128: - fldt 24(%esp) - faddp %st, %st(1) - fstpt 64(%esp) - movzwl 72(%esp), %eax - andl $-32768, %eax - andl $2147483647, 68(%esp) - movw %ax, 72(%esp) -..B1.129: - movl 36(%esp), %eax - andl $1, %eax - shll $15, %eax - xorl %eax, 72(%esp) - testl %edi, %edi - je ..B1.131 -..B1.130: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 56(%esp) - call fesetround -..B1.216: - fldt 56(%esp) - addl $16, %esp -..B1.131: - testl %esi, %esi - je ..B1.230 -..B1.132: - fstpt 92(%esp) -..B1.217: - fldcw 150(%esp) - jmp ..B1.133 -..B1.230: - fstp %st(0) -..B1.133: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 -..B1.134: - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.135: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.136: - fstp %st(1) - testl %edi, %edi - je ..B1.138 -..B1.137: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 96(%esp) - call fesetround -..B1.218: - fldt 96(%esp) - addl $16, %esp -..B1.138: - fdiv %st(0), %st - testl %esi, %esi - fstpt 64(%esp) - je ..B1.140 -..B1.139: - fldcw 150(%esp) -..B1.140: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 - jmp ..B1.25 -..B1.143: - fstp %st(1) - testl %edi, %edi - je ..B1.145 -..B1.144: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 96(%esp) - call fesetround -..B1.219: - fldt 96(%esp) - addl $16, %esp -..B1.145: - fdiv %st(0), %st - testl %esi, %esi - fstpt 64(%esp) - je ..B1.147 -..B1.146: - fldcw 150(%esp) -..B1.147: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 - jmp ..B1.25 -..B1.156: - movl 12(%ebp), %eax - cmpl $536870912, %eax - jb ..B1.159 -..B1.157: - jne ..B1.29 -..B1.158: - cmpl $0, 8(%ebp) - jne ..B1.29 -..B1.159: - fstp %st(0) - testl %edi, %edi - je ..B1.161 -..B1.160: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.220: - addl $16, %esp -..B1.161: - fldt _large_value_80@GOTOFF(%ebx) - movl 132(%esp), %ecx - lea (,%ecx,8), %eax - lea (%eax,%ecx,4), %edx - shll $15, %ecx - fldt _large_value_80@GOTOFF(%ebx,%edx) - fmulp %st, %st(1) - fstpt 64(%esp) - orl %ecx, 72(%esp) - testl %esi, %esi - je ..B1.163 -..B1.162: - fldcw 150(%esp) -..B1.163: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 - jmp ..B1.25 -..B1.166: - fstp %st(0) - testl %edi, %edi - je ..B1.168 -..B1.167: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.221: - addl $16, %esp -..B1.168: - fldt _large_value_80@GOTOFF(%ebx) - testl %esi, %esi - fmul %st(0), %st - fstpt 64(%esp) - je ..B1.170 -..B1.169: - fldcw 150(%esp) -..B1.170: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 - jmp ..B1.25 -..B1.173: - fstp %st(1) - testl %edi, %edi - je ..B1.175 -..B1.174: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - fstpt 96(%esp) - call fesetround -..B1.222: - fldt 96(%esp) - addl $16, %esp -..B1.175: - movl 132(%esp), %eax - testl %esi, %esi - fldl _ones@GOTOFF(%ebx,%eax,8) - fdivp %st, %st(1) - fstpt 64(%esp) - je ..B1.177 -..B1.176: - fldcw 150(%esp) -..B1.177: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 - jmp ..B1.25 -..B1.180: - cmpl $0, 132(%esp) - je ..B1.183 -..B1.181: - cmpl $-2147483648, 12(%ebp) - jne ..B1.183 -..B1.182: - cmpl $0, 8(%ebp) - je ..B1.189 -..B1.183: - fldt 8(%ebp) - testl %esi, %esi - fmull _ones@GOTOFF(%ebx) - fstpt 64(%esp) - je ..B1.185 -..B1.184: - fldcw 150(%esp) -..B1.185: - testl %edi, %edi - je ..B1.187 -..B1.186: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.223: - addl $16, %esp -..B1.187: - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 -..B1.188: - addl $308, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.189: - testl %edi, %edi - je ..B1.191 -..B1.190: - addl $-16, %esp - movl 132(%esp), %eax - movl %eax, (%esp) - call fesetround -..B1.224: - addl $16, %esp -..B1.191: - fldl 8+_zeros@GOTOFF(%ebx) - fdivl _zeros@GOTOFF(%ebx) - fstpt 64(%esp) - fldt 64(%esp) - movl 248(%esp), %eax - xorl %esp, %eax - cmpl %gs:20, %eax - jne ..B1.135 - jmp ..B1.25 -..B1.195: - xorl %esi, %esi - jmp ..B1.7 - .align 16,0x90 - .type tgammal,@function - .size tgammal,.-tgammal - .data -# -- End tgammal - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xdc,0x09,0xc0,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x02,0x40,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfc,0x3f,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xfe,0x3f,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.12: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0x00 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,12 - .space 4, 0x00 # pad - .align 16 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_tgammal_S2: - .long 1076610156 - .long 1072298443 - .long 2174450924 - .long 1012377779 - .type _tgammal_S2,@object - .size _tgammal_S2,16 - .align 4 -_tgammal_S1: - .long 1649608659 - .long 3220853158 - .long 544854255 - .long 3162597952 - .type _tgammal_S1,@object - .size _tgammal_S1,16 - .align 4 -_tgammal_A2: - .long 1833415567 - .long 1073038586 - .long 2552883231 - .long 1018148522 - .long 1595568275 - .long 1072556376 - .long 458238143 - .long 1015211580 - .long 3568820252 - .long 1071968804 - .long 1244365593 - .long 1010337025 - .long 799339768 - .long 1070612333 - .long 3666663601 - .long 1014637144 - .long 2303274075 - .long 1069290379 - .long 1349342802 - .long 1013375288 - .long 3297989586 - .long 1067256475 - .long 254004781 - .long 1007721194 - .long 3884346469 - .long 1076314993 - .long 442477728 - .long 1020223370 - .long 318512670 - .long 1076897708 - .long 471158811 - .long 1020359281 - .long 2510778168 - .long 1076450444 - .long 1901825555 - .long 1020381374 - .long 1635478559 - .long 1075598710 - .long 824259222 - .long 1018719588 - .long 1081324001 - .long 1074338163 - .long 3447625061 - .long 1017363587 - .long 3947156014 - .long 1072861090 - .long 1379190805 - .long 1015115048 - .long 420607958 - .long 1081212458 - .long 3477976495 - .long 1025491940 - .long 3806068795 - .long 1082138936 - .long 4217379562 - .long 1025598832 - .long 3604563515 - .long 1082026571 - .long 2373575058 - .long 1026208390 - .long 2007420787 - .long 1081336307 - .long 1677630540 - .long 1025930127 - .long 1505609351 - .long 1080304853 - .long 3680187356 - .long 1024342399 - .long 1798798240 - .long 1079036631 - .long 724429118 - .long 1022004699 - .long 573661072 - .long 1087072564 - .long 1175535566 - .long 1031320119 - .long 3742832273 - .long 1088193077 - .long 2163102943 - .long 1030481607 - .long 1347160184 - .long 1088323961 - .long 872134502 - .long 1032553403 - .long 3527047012 - .long 1087786342 - .long 974187100 - .long 1028831099 - .long 1718309677 - .long 1086914107 - .long 744179587 - .long 1031128181 - .long 2775103229 - .long 1085724862 - .long 1153587355 - .long 1029745229 - .long 1670522313 - .long 1093749470 - .long 3603089619 - .long 1038783597 - .long 2795800948 - .long 1094969738 - .long 1113103030 - .long 1039749901 - .long 3483985892 - .long 1095195750 - .long 707212107 - .long 1037942235 - .long 3634938287 - .long 1094882573 - .long 3822913920 - .long 1039689416 - .long 1233016495 - .long 1094091821 - .long 3838048750 - .long 1037461559 - .long 817468048 - .long 1093018536 - .long 360059332 - .long 1037856380 - .long 3404619429 - .long 1101025312 - .long 2324006265 - .long 1046266629 - .long 1757595371 - .long 1102333247 - .long 3317464771 - .long 1041601336 - .long 2951620935 - .long 1102677785 - .long 2114793479 - .long 1046829217 - .long 1356962213 - .long 1102426961 - .long 3236647680 - .long 1046257529 - .long 378361594 - .long 1101790815 - .long 2326245451 - .long 1045004339 - .long 704627613 - .long 1100821691 - .long 771850637 - .long 1043974839 - .type _tgammal_A2,@object - .size _tgammal_A2,576 - .align 4 -_tgammal_A1: - .long 4294967295 - .long 1072693247 - .long 4294254158 - .long 1017118719 - .long 4235179544 - .long 3219290252 - .long 1647137719 - .long 3164508998 - .long 3258652024 - .long 1072670296 - .long 2787078119 - .long 1015928435 - .long 2402437986 - .long 3219982865 - .long 3119239167 - .long 3164440263 - .long 89167536 - .long 1072654929 - .long 3734368228 - .long 1015667286 - .long 3963139337 - .long 3220139136 - .long 2050876349 - .long 3162686202 - .long 2444554090 - .long 1072454648 - .long 2100370444 - .long 1016394631 - .long 2397397425 - .long 1067486888 - .long 3603318790 - .long 1011860326 - .long 3126988118 - .long 1071287373 - .long 3410508918 - .long 1015153675 - .long 480439205 - .long 3216734124 - .long 3426889025 - .long 3160197739 - .long 927904425 - .long 1069712317 - .long 1130465219 - .long 1014845612 - .long 4266680347 - .long 3216234636 - .long 1626218864 - .long 3161277677 - .long 0 - .long 1072693248 - .long 1528870101 - .long 964807786 - .long 119575502 - .long 3218804454 - .long 1881625935 - .long 3159804816 - .long 2341912255 - .long 1071274903 - .long 3500227044 - .long 1010193322 - .long 2554745004 - .long 3216302649 - .long 3304224511 - .long 3156439793 - .long 2968672914 - .long 1068696059 - .long 4206584367 - .long 1012030447 - .long 1090398824 - .long 1060208439 - .long 842313838 - .long 1004803849 - .long 4294967295 - .long 1072693247 - .long 4294967295 - .long 1017118719 - .long 4235179544 - .long 3219290252 - .long 4177388891 - .long 3164508998 - .long 3258652024 - .long 1072670296 - .long 1161858311 - .long 1015929131 - .long 2402437986 - .long 3219982865 - .long 3056812941 - .long 3164521903 - .long 89167541 - .long 1072654929 - .long 2427235615 - .long 1014999039 - .long 3963139706 - .long 3220139136 - .long 3024603167 - .long 3163626566 - .type _tgammal_A1,@object - .size _tgammal_A1,384 - .align 4 -_tgammal_B: - .long 381774871 - .long 3211182444 - .long 436314138 - .long 1061814688 - .long 327235604 - .long 3208872248 - .long 723058467 - .long 1061917982 - .long 3650698365 - .long 3210701488 - .long 440509466 - .long 1064976804 - .long 3406779288 - .long 3214819974 - .long 941491840 - .long 1070005910 - .type _tgammal_B,@object - .size _tgammal_B,64 - .align 4 -_tgammal_C: - .long 3362045620 - .long 1072523249 - .long 4064281872 - .long 1016386130 - .type _tgammal_C,@object - .size _tgammal_C,16 - .align 4 -_TWO_32HP: - .long 1048576 - .long 1106771968 - .type _TWO_32HP,@object - .size _TWO_32HP,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .type _small_value_80,@object - .size _small_value_80,24 - .align 2 -_POS_OVERFLOW: - .word 11809 - .word 27445 - .word 35846 - .word 56177 - .word 16393 - .word 0 - .type _POS_OVERFLOW,@object - .size _POS_OVERFLOW,12 - .align 2 -_tgammal_S: - .word 24210 - .word 1753 - .word 29241 - .word 50004 - .word 49148 - .word 0 - .word 51350 - .word 39166 - .word 743 - .word 54836 - .word 16377 - .word 0 - .word 3640 - .word 30975 - .word 46417 - .word 39360 - .word 49142 - .word 0 - .word 53672 - .word 10841 - .word 35989 - .word 39843 - .word 16370 - .word 0 - .word 36569 - .word 52859 - .word 829 - .word 59922 - .word 49133 - .word 0 - .word 48029 - .word 59092 - .word 17416 - .word 34773 - .word 16361 - .word 0 - .word 51219 - .word 52454 - .word 61951 - .word 62382 - .word 49123 - .word 0 - .type _tgammal_S,@object - .size _tgammal_S,84 - .align 2 -_tgammal_T2: - .word 46722 - .word 54455 - .word 58933 - .word 43588 - .word 16376 - .word 0 - .word 11656 - .word 9670 - .word 26887 - .word 53935 - .word 16373 - .word 0 - .word 37336 - .word 10857 - .word 59094 - .word 50631 - .word 16372 - .word 0 - .word 42778 - .word 63737 - .word 45056 - .word 33859 - .word 16365 - .word 0 - .word 26755 - .word 45167 - .word 18275 - .word 32926 - .word 16369 - .word 0 - .word 44721 - .word 19678 - .word 48085 - .word 54982 - .word 49134 - .word 0 - .word 51053 - .word 39319 - .word 36729 - .word 62310 - .word 16365 - .word 0 - .word 45874 - .word 5043 - .word 3955 - .word 43983 - .word 49132 - .word 0 - .word 10698 - .word 13153 - .word 62730 - .word 37178 - .word 16363 - .word 0 - .word 47802 - .word 34638 - .word 48577 - .word 58524 - .word 49129 - .word 0 - .word 5552 - .word 49084 - .word 18209 - .word 47263 - .word 16360 - .word 0 - .word 27946 - .word 40146 - .word 45659 - .word 36839 - .word 49127 - .word 0 - .word 43027 - .word 63179 - .word 35272 - .word 58163 - .word 16357 - .word 0 - .word 51497 - .word 52569 - .word 40730 - .word 59709 - .word 49124 - .word 0 - .word 50075 - .word 12939 - .word 25687 - .word 50566 - .word 16355 - .word 0 - .word 50229 - .word 1163 - .word 49491 - .word 48597 - .word 16381 - .word 0 - .word 65107 - .word 33673 - .word 57229 - .word 54934 - .word 16379 - .word 0 - .word 40234 - .word 4993 - .word 58268 - .word 55864 - .word 16377 - .word 0 - .word 37170 - .word 65173 - .word 7022 - .word 51747 - .word 16375 - .word 0 - .word 26509 - .word 26471 - .word 6311 - .word 44116 - .word 16373 - .word 0 - .word 19430 - .word 24800 - .word 9769 - .word 34884 - .word 16371 - .word 0 - .word 11267 - .word 5159 - .word 36913 - .word 51530 - .word 16368 - .word 0 - .word 64725 - .word 57237 - .word 10436 - .word 35732 - .word 16366 - .word 0 - .word 9979 - .word 17874 - .word 14609 - .word 46771 - .word 16363 - .word 0 - .word 48661 - .word 14142 - .word 37902 - .word 57970 - .word 16360 - .word 0 - .word 44331 - .word 229 - .word 33140 - .word 34177 - .word 16358 - .word 0 - .word 18505 - .word 49699 - .word 39129 - .word 38384 - .word 16355 - .word 0 - .word 55009 - .word 45387 - .word 16863 - .word 41316 - .word 16352 - .word 0 - .word 32472 - .word 62749 - .word 3488 - .word 43302 - .word 16349 - .word 0 - .word 38507 - .word 49300 - .word 64329 - .word 42149 - .word 16346 - .word 0 - .word 54685 - .word 59022 - .word 19355 - .word 48977 - .word 16387 - .word 0 - .word 11322 - .word 9818 - .word 14110 - .word 61121 - .word 16385 - .word 0 - .word 35672 - .word 18289 - .word 56841 - .word 34043 - .word 16384 - .word 0 - .word 40623 - .word 27826 - .word 27872 - .word 34330 - .word 16382 - .word 0 - .word 23588 - .word 8736 - .word 44949 - .word 63368 - .word 16379 - .word 0 - .word 65458 - .word 32180 - .word 45318 - .word 53999 - .word 16377 - .word 0 - .word 7083 - .word 36157 - .word 35044 - .word 42795 - .word 16375 - .word 0 - .word 41937 - .word 53706 - .word 63704 - .word 63466 - .word 16372 - .word 0 - .word 56782 - .word 14002 - .word 58756 - .word 44258 - .word 16370 - .word 0 - .word 50000 - .word 929 - .word 21531 - .word 58307 - .word 16367 - .word 0 - .word 29164 - .word 41738 - .word 63210 - .word 36416 - .word 16365 - .word 0 - .word 22318 - .word 7527 - .word 19550 - .word 43267 - .word 16362 - .word 0 - .word 36459 - .word 32677 - .word 20918 - .word 49089 - .word 16359 - .word 0 - .word 54142 - .word 37469 - .word 39035 - .word 54353 - .word 16356 - .word 0 - .word 43987 - .word 37066 - .word 46591 - .word 55009 - .word 16353 - .word 0 - .word 23593 - .word 355 - .word 54000 - .word 36277 - .word 16394 - .word 0 - .word 38981 - .word 26613 - .word 65277 - .word 49004 - .word 16392 - .word 0 - .word 37709 - .word 48898 - .word 35761 - .word 58794 - .word 16390 - .word 0 - .word 20062 - .word 54760 - .word 43546 - .word 63578 - .word 16388 - .word 0 - .word 4376 - .word 65424 - .word 42405 - .word 62684 - .word 16386 - .word 0 - .word 53174 - .word 32360 - .word 45557 - .word 56872 - .word 16384 - .word 0 - .word 50961 - .word 21643 - .word 2055 - .word 47845 - .word 16382 - .word 0 - .word 44504 - .word 53228 - .word 208 - .word 37559 - .word 16380 - .word 0 - .word 22458 - .word 24129 - .word 6745 - .word 55322 - .word 16377 - .word 0 - .word 45571 - .word 12909 - .word 9586 - .word 38400 - .word 16375 - .word 0 - .word 63967 - .word 2945 - .word 37284 - .word 50443 - .word 16372 - .word 0 - .word 40100 - .word 52281 - .word 37909 - .word 62907 - .word 16369 - .word 0 - .word 14124 - .word 37910 - .word 18802 - .word 37402 - .word 16367 - .word 0 - .word 28370 - .word 35717 - .word 42940 - .word 43396 - .word 16364 - .word 0 - .word 57898 - .word 23307 - .word 6391 - .word 45620 - .word 16361 - .word 0 - .word 46932 - .word 12112 - .word 28768 - .word 37645 - .word 16401 - .word 0 - .word 4289 - .word 37433 - .word 59606 - .word 54245 - .word 16399 - .word 0 - .word 64482 - .word 38480 - .word 36982 - .word 34595 - .word 16398 - .word 0 - .word 60245 - .word 51970 - .word 24673 - .word 39653 - .word 16396 - .word 0 - .word 5116 - .word 50868 - .word 49618 - .word 41328 - .word 16394 - .word 0 - .word 41766 - .word 46400 - .word 3930 - .word 39543 - .word 16392 - .word 0 - .word 10780 - .word 29057 - .word 64174 - .word 35004 - .word 16390 - .word 0 - .word 53671 - .word 48824 - .word 23962 - .word 57716 - .word 16387 - .word 0 - .word 53678 - .word 31584 - .word 52783 - .word 44557 - .word 16385 - .word 0 - .word 6190 - .word 44351 - .word 42084 - .word 64733 - .word 16382 - .word 0 - .word 38744 - .word 53501 - .word 23462 - .word 44426 - .word 16380 - .word 0 - .word 5624 - .word 56691 - .word 10270 - .word 57805 - .word 16377 - .word 0 - .word 37833 - .word 48670 - .word 48257 - .word 35818 - .word 16375 - .word 0 - .word 2793 - .word 44149 - .word 23652 - .word 43316 - .word 16372 - .word 0 - .word 36532 - .word 60099 - .word 3358 - .word 47101 - .word 16369 - .word 0 - .word 26210 - .word 6795 - .word 18267 - .word 52540 - .word 16408 - .word 0 - .word 4852 - .word 29729 - .word 14912 - .word 39944 - .word 16407 - .word 0 - .word 5407 - .word 41984 - .word 60375 - .word 53635 - .word 16405 - .word 0 - .word 50093 - .word 12566 - .word 13387 - .word 64582 - .word 16403 - .word 0 - .word 49147 - .word 13632 - .word 405 - .word 35287 - .word 16402 - .word 0 - .word 19308 - .word 51191 - .word 49444 - .word 35336 - .word 16400 - .word 0 - .word 42358 - .word 64331 - .word 14656 - .word 65374 - .word 16397 - .word 0 - .word 20975 - .word 39047 - .word 28983 - .word 56232 - .word 16395 - .word 0 - .word 29936 - .word 14466 - .word 41903 - .word 45232 - .word 16393 - .word 0 - .word 29960 - .word 52783 - .word 56228 - .word 34190 - .word 16391 - .word 0 - .word 35121 - .word 10599 - .word 28021 - .word 48776 - .word 16388 - .word 0 - .word 24922 - .word 26565 - .word 63850 - .word 32942 - .word 16386 - .word 0 - .word 35914 - .word 31178 - .word 25984 - .word 42348 - .word 16383 - .word 0 - .word 32787 - .word 34531 - .word 38943 - .word 53136 - .word 16380 - .word 0 - .word 12957 - .word 55078 - .word 57592 - .word 59546 - .word 16377 - .word 0 - .type _tgammal_T2,@object - .size _tgammal_T2,1080 - .align 2 -_tgammal_T1: - .word 33333 - .word 22332 - .word 1335 - .word 65087 - .word 16382 - .word 0 - .word 47908 - .word 35098 - .word 63659 - .word 65273 - .word 49150 - .word 0 - .word 46380 - .word 12569 - .word 56008 - .word 65411 - .word 16382 - .word 0 - .word 48850 - .word 62280 - .word 7688 - .word 65472 - .word 49150 - .word 0 - .word 39250 - .word 51171 - .word 14264 - .word 65504 - .word 16382 - .word 0 - .word 1152 - .word 29364 - .word 36762 - .word 65519 - .word 49150 - .word 0 - .word 3017 - .word 25231 - .word 24799 - .word 65523 - .word 16382 - .word 0 - .word 25322 - .word 65334 - .word 59366 - .word 65496 - .word 49150 - .word 0 - .word 56776 - .word 58800 - .word 13007 - .word 65323 - .word 16382 - .word 0 - .word 19307 - .word 43631 - .word 60167 - .word 64530 - .word 49150 - .word 0 - .word 36275 - .word 49480 - .word 28369 - .word 61762 - .word 16382 - .word 0 - .word 21913 - .word 46254 - .word 26555 - .word 54444 - .word 49150 - .word 0 - .word 35908 - .word 6208 - .word 45367 - .word 40294 - .word 16382 - .word 0 - .word 27036 - .word 5944 - .word 26542 - .word 42848 - .word 49149 - .word 0 - .word 29582 - .word 26316 - .word 64938 - .word 47331 - .word 16379 - .word 0 - .word 2023 - .word 42870 - .word 23457 - .word 61457 - .word 16378 - .word 0 - .word 65015 - .word 19522 - .word 60134 - .word 39847 - .word 49146 - .word 0 - .word 37347 - .word 35810 - .word 25431 - .word 54185 - .word 16377 - .word 0 - .word 59586 - .word 38885 - .word 5307 - .word 36118 - .word 49145 - .word 0 - .word 55581 - .word 26604 - .word 61099 - .word 48328 - .word 16376 - .word 0 - .word 26530 - .word 8530 - .word 11497 - .word 64510 - .word 49143 - .word 0 - .word 5884 - .word 49309 - .word 23213 - .word 43047 - .word 16375 - .word 0 - .word 39008 - .word 7698 - .word 42498 - .word 57424 - .word 49142 - .word 0 - .word 52706 - .word 42552 - .word 1743 - .word 38295 - .word 16374 - .word 0 - .word 36375 - .word 51085 - .word 41378 - .word 51088 - .word 49141 - .word 0 - .word 45665 - .word 51480 - .word 46902 - .word 34067 - .word 16373 - .word 0 - .word 45474 - .word 25613 - .word 9050 - .word 44941 - .word 49140 - .word 0 - .word 10137 - .word 18971 - .word 38654 - .word 59779 - .word 16371 - .word 0 - .word 53562 - .word 56969 - .word 3619 - .word 46768 - .word 49139 - .word 0 - .word 12931 - .word 40754 - .word 53864 - .word 63282 - .word 16370 - .word 0 - .word 16582 - .word 62753 - .word 30052 - .word 46783 - .word 16376 - .word 0 - .word 41763 - .word 18743 - .word 29826 - .word 47859 - .word 16374 - .word 0 - .word 61445 - .word 12179 - .word 9444 - .word 35298 - .word 16374 - .word 0 - .word 19195 - .word 47291 - .word 36415 - .word 61711 - .word 16372 - .word 0 - .word 13845 - .word 40089 - .word 27018 - .word 32909 - .word 16372 - .word 0 - .word 12017 - .word 58217 - .word 13416 - .word 64677 - .word 16370 - .word 0 - .word 35895 - .word 43222 - .word 31657 - .word 65323 - .word 16369 - .word 0 - .word 20613 - .word 26232 - .word 50069 - .word 65270 - .word 16368 - .word 0 - .word 35252 - .word 65344 - .word 3340 - .word 65456 - .word 16367 - .word 0 - .word 10600 - .word 13283 - .word 40541 - .word 64928 - .word 16366 - .word 0 - .word 11880 - .word 32674 - .word 50280 - .word 34435 - .word 16366 - .word 0 - .word 63446 - .word 286 - .word 54268 - .word 48349 - .word 16364 - .word 0 - .word 8548 - .word 23982 - .word 1825 - .word 63713 - .word 16364 - .word 0 - .word 34666 - .word 29375 - .word 64038 - .word 41244 - .word 49131 - .word 0 - .word 59811 - .word 4152 - .word 44775 - .word 65267 - .word 16363 - .word 0 - .word 18717 - .word 22920 - .word 1335 - .word 65087 - .word 16382 - .word 0 - .word 45811 - .word 56269 - .word 63659 - .word 65273 - .word 49150 - .word 0 - .word 65298 - .word 48931 - .word 56016 - .word 65411 - .word 16382 - .word 0 - .word 32491 - .word 12018 - .word 7860 - .word 65472 - .word 49150 - .word 0 - .word 14368 - .word 44485 - .word 16906 - .word 65504 - .word 16382 - .word 0 - .word 41970 - .word 59715 - .word 3074 - .word 65520 - .word 49150 - .word 0 - .word 4801 - .word 21592 - .word 65211 - .word 65527 - .word 16382 - .word 0 - .word 62592 - .word 41973 - .word 39337 - .word 65531 - .word 49150 - .word 0 - .word 13381 - .word 40677 - .word 15011 - .word 65529 - .word 16382 - .word 0 - .word 46580 - .word 36519 - .word 54875 - .word 65490 - .word 49150 - .word 0 - .word 37477 - .word 29387 - .word 41414 - .word 65216 - .word 16382 - .word 0 - .word 16797 - .word 56146 - .word 15453 - .word 63766 - .word 49150 - .word 0 - .word 40859 - .word 15091 - .word 60713 - .word 58161 - .word 16382 - .word 0 - .word 1004 - .word 12255 - .word 49061 - .word 43226 - .word 49150 - .word 0 - .word 52096 - .word 41479 - .word 59455 - .word 37399 - .word 16381 - .word 0 - .type _tgammal_T1,@object - .size _tgammal_T1,720 - .align 2 -_tgammal_B0: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16379 - .word 0 - .type _tgammal_B0,@object - .size _tgammal_B0,12 - .align 2 -_TWO_POW_16383: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .type _TWO_POW_16383,@object - .size _TWO_POW_16383,12 - .align 2 -_TWO_POW_M16382: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .type _TWO_POW_M16382,@object - .size _TWO_POW_M16382,12 - .align 2 -_TWO_POW_M16000: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 383 - .word 0 - .type _TWO_POW_M16000,@object - .size _TWO_POW_M16000,12 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .type _large_value_80,@object - .size _large_value_80,24 - .data - .hidden __libm_expl_k80 - .hidden __libm_logl_k80 - .hidden fesetround - .hidden fegetround - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/trig_pi_bits.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/trig_pi_bits.S deleted file mode 100644 index 380eaacb6c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/trig_pi_bits.S +++ /dev/null @@ -1,311 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "trig_pi_bits.c" - .section .rodata, "a" - .align 32 - .align 32 - .hidden __four_over_pi - .globl __four_over_pi -__four_over_pi: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0xdb939105,0x0028be60 - .long 0xf47d4d37,0x4a7f09d5 - .long 0x664f10e4,0x7036d8a5 - .long 0xeaf7aef1,0x107f9458 - .long 0x8e909374,0x586dc91b - .long 0xba827464,0xb801924b - .long 0xc72c4a69,0x873f877a - .long 0x7d4baed1,0xcfba208d - .long 0x09ad17df,0x213a671c - .long 0x8e60d4ce,0x904e6475 - .long 0xe2ef7e4a,0x7d272117 - .long 0xfff78166,0x0ec7fe25 - .long 0x62d6829b,0x03fbcbc4 - .long 0xb3c9f2c2,0x47db4d9f - .long 0xd9a797fa,0x6dd3d18f - .long 0xb1faf97c,0x8b5d49ee - .long 0x7de294a4,0x5ecf41ce - .long 0xec47e357,0xba9afed7 - .long 0x11bf1eda,0x421580cc - .long 0x0826bd0d,0xeafc33ef - .long 0x5857b986,0x876a78e4 - .long 0x57c5281a,0xc2196661 - .long 0x20135cc9,0x10237ff6 - .long 0x55b29cea,0xcc418185 - .long 0xf0231ad1,0x3258389e - .long 0xf3773a02,0xf10670d9 - .long 0x1da2e587,0x4aa0d671 - .long 0x3455c641,0x29b76bd1 - .long 0xc14fdf8c,0x4fa97fc1 - .long 0x93e60c9f,0xfa0cb0b7 - .long 0xbbdac797,0x6ef0cf49 - .long 0xcd72bc9f,0xbe27ce87 - .long 0x641f1f09,0xc761fc48 - .long 0x5dcb4c10,0x1abe9bb5 - .long 0x2d674670,0xcec57185 - .long 0x534b1740,0xf0b12b50 - .long 0x8b5c78e6,0x03119f61 - .long 0x8cdf34ad,0xb1a6c018 - .long 0x554dfd8f,0x25e9ed35 - .long 0xff1d934a,0xb5c60428 - .long 0xdc3e1f18,0xa7592af5 - .long 0xc545d592,0xd5ec1eb9 - .long 0xce2129f2,0x7036758e - .long 0xb588d516,0xc8c91de2 - .long 0xc2bc77f3,0xae47c006 - .long 0xda879998,0x867fcc67 - .long 0xeb361fdf,0x55e651fe - .long 0x7a0c982f,0xadd948a2 - .long 0xc24d9b35,0xf9b3713b - .long 0x85b78ed6,0x0fd775f7 - .long 0x08b4ba21,0x24a6f78a - .long 0x8cb2b185,0x8a135638 - .long 0x78143005,0xb8c232df - .long 0xf8060d04,0xe9c77cd6 - .long 0xc05220d6,0xcb9884a0 - .long 0x2b7cba47,0xe3bd5fec - .long 0xd9c43637,0x90d29234 - .long 0xb3985aa9,0x6a9097eb - .long 0x74fca981,0x0a02ad26 - .long 0xf0a8e20f,0x9fddd720 - .long 0x96a32bef,0x185e1ce2 - .long 0x8b72effd,0x75dbd8e9 - .long 0xf0499172,0x3be06359 - .long 0xb4aa0a23,0x954db672 - .long 0x44850981,0x58709df2 - .long 0x16711131,0x26d184b1 - .long 0x7cc5c02b,0x72246c93 - .long 0x4a44357f,0x50f53952 - .long 0x2507bbb3,0x7f2f8033 - .long 0xe03c7b30,0x9c3d4f84 - .long 0x31e50164,0xf9ecca3e - .long 0xc24bbcd1,0xcf9c706c - .long 0x1ec82ae7,0x42e704a2 - .long 0x91cbcc9e,0xed4bb0a4 - .long 0x29dc87f9,0xdb554324 - .long 0x52859e78,0xdae5b2cc - .long 0xfd25e53a,0x9e506277 - .long 0xcc665afb,0x2139b8a5 - .long 0xc3bf6eed,0x620d97d7 - .long 0x19d09c9c,0x26921b29 - .long 0x0567c279,0x4c97636e - .long 0x4e5d3dc7,0x6f094c63 - .long 0x035a0212,0x014c0043 - .long 0x2a91c0b9,0xd63b8b24 - .long 0x699f7ddc,0xdd0935af - .long 0xa7e9a523,0x921bbbc5 - .long 0x54f47c82,0xbda46d14 - .long 0x1f92fd5a,0xb3cce608 - .long 0xb740d750,0x18ec97cf - .long 0x54957019,0x1fe2614a - .long 0x4c920c9d,0x0dc4361b - .long 0x539b9511,0x5316f51c - .long 0x7d4ab559,0x704242da - .long 0xd4011776,0x852741c9 - .long 0xba85fe61,0xceed315d - .long 0x89c74a5a,0xdf5ad26e - .long 0x95052b5a,0x65ab3331 - .long 0x62141c8b,0xb8a42276 - .long 0x01dddc0c,0x2fa90125 - .long 0x2a1c7a92,0x3cc9ff00 - .long 0x1920f765,0x70998f78 - .long 0x6510e321,0xe5cfe8ff - .long 0x674e64a3,0x8377904c - .long 0xc5cef7c2,0x1c3779ed - .long 0x201724e0,0x0acdc568 - .long 0x363a03eb,0x16a48444 - .long 0xf6c3e40e,0xe01b12ff - .long 0x6958aef2,0x1d861645 - .long 0xef500401,0xd86e6271 - .long 0x527dadba,0x3cb489dd - .long 0x85028bc9,0xeec8b6ea - .long 0x0ccec246,0xa25da0d9 - .long 0x9470a8c7,0xa503aa8e - .long 0x89971370,0x6bbb6bc4 - .long 0x65d5b020,0x9b671e8b - .long 0x0263100a,0xcfc0fdbc - .long 0xed0e4548,0xe64c5b41 - .long 0x3124bd52,0x0316f0f6 - .long 0x93b34de9,0xeb71a972 - .long 0x24aada10,0xcdaa79a5 - .long 0x7be31d94,0xb77798c6 - .long 0xff2ae86b,0xa2da0df6 - .long 0x6b8036be,0x8c4577e8 - .long 0x2dc17b4c,0xc3199359 - .long 0x95cebfd1,0x194a6fd5 - .long 0xef9d77e4,0xee7e5abc - .long 0xfda31985,0xca0c202a - .long 0xbe877936,0x72c10188 - .long 0xc6d5c273,0x692ccf63 - .long 0xa92f84ed,0x4dba5093 - .long 0xbc2a1953,0x48ccc6aa - .long 0xcfc2f35e,0xe9707483 - .long 0xc122dedc,0x16ddbe48 - .long 0xb1b89b9b,0x85e254e9 - .long 0x12a6edf6,0xc03afbd6 - .long 0xb3f3dd87,0xb12e99aa - .long 0x6c706663,0x40b44b7c - .long 0x9221a817,0x1deb70f6 - .long 0x8bfc2b26,0x7dfd2031 - .long 0x0fdb77b4,0xbb376f17 - .long 0xb6ca8e89,0x07f1e42d - .long 0x24d4eb41,0x68e6abc0 - .long 0x4a5fa012,0x15edad0b - .long 0xaa9da856,0xe9c1f683 - .long 0x8b6df73f,0x5eca8485 - .long 0xe27f6fa2,0x797ebfb6 - .long 0x2a419c20,0x5b1db93f - .long 0x7fe1ff41,0x0f855ba1 - .long 0xd861860a,0xcf8a0cd9 - .long 0xf9ecdb9b,0xbaaf536b - .long 0x56efcc52,0x63ce59e5 - .long 0xcc10cb71,0x35e105b7 - .long 0x9c326e32,0xcd584973 - .long 0xe8802939,0xcc3f5b2f - .long 0x5691dbc8,0x1b016837 - .long 0x172e5258,0x748498a1 - .long 0xc054a64d,0x5c38159a - .long 0x47b13c4c,0xd5542df5 - .long 0x0c176a4b,0xd7db84f9 - .long 0x4d8ca869,0xa170ec87 - .long 0x7a887dc5,0x2dc2352c - .long 0xffc9e000,0xb91a63dd - .long 0x683353e6,0xc30b5023 - .long 0xacc2974b,0x694834e8 - .long 0xf684742f,0xd0be6d32 - .long 0xef45eae0,0x9f7076e6 - .long 0x8205d54b,0x68b2971a - .long 0x051fe181,0x954009fc - .long 0x235065b7,0xf85902c5 - .long 0x76ad895a,0xafa1cabf - .long 0xbcc167af,0xcd225eff - .long 0x2a0a9296,0xee53da9a - .long 0x0b6616b5,0xb113ef3e - .long 0x5343698e,0xe571fd23 - .long 0x2c4fc525,0x8817d5e9 - .long 0x3321b75c,0x4e200048 - .long 0x582fc459,0x6db7b27d - .long 0x6b2c2334,0x535ac1c0 - .long 0x5443bec7,0x302c9215 - .long 0xc1a8cd50,0xb0dca54e - .long 0xb311783e,0x301ef701 - .long 0xb5907cfa,0x8a53b232 - .long 0x1926cc6f,0x37991f36 - .long 0x35161df1,0xb670e5e9 - .long 0xbc0f0eae,0x78da44f6 - .long 0xdd557d6f,0x91861197 - .long 0x974bab3b,0x74b1a49b - .long 0x8721f118,0x5103908f - .long 0xf5b9f29f,0x7a7f4a7c - .long 0xf1780223,0x088d645b - .long 0x9bb1bf6c,0x75fff89a - .long 0x175f2cab,0x304224dd - .long 0x5edc8f9a,0x5ae75bb3 - .long 0xfdf7dcca,0x8471aa73 - .long 0x402dc36c,0x6eb26d54 - .long 0x181f7962,0xb8892e9d - .long 0x43430620,0xb61d0b05 - .long 0x8a405d9e,0x65199f85 - .long 0x7bd1558d,0xa7efbf7f - .long 0x7b2e6ea2,0x9fb644f6 - .long 0xea0c70db,0xff25f109 - .long 0x15aa362d,0xbc4db165 - .long 0x33cb6244,0x6a2d03b3 - .long 0x558b38f3,0x8d15dbe2 - .long 0xaa979ae7,0xa66e4835 - .long 0xc45282ff,0x0a8fb317 - .long 0x4ee38b21,0x7efd385b - .long 0x6a6d3f34,0xb8a1353a - .long 0x4b984e4b,0x7bbbf24d - .long 0x3646c2bf,0xd1084e32 - .long 0xf6070be1,0x205a92be - .long 0x53b30895,0x2d14e326 - .long 0xb1b02586,0x37154ab5 - .long 0x99255a58,0x42ee1c06 - .long 0x8fc3c45f,0x1689bb94 - .long 0x72ff0b6f,0xc46d7d3d - .long 0x33177a18,0x0d3baf0d - .long 0x99fbcce4,0x17b766e3 - .long 0xd6186f15,0xae05f266 - .long 0x440fb612,0xf871a0d4 - .long 0x0b68462b,0x1c777747 - .long 0xfcd6661e,0xd18b0875 - .long 0xbea193ff,0xb6701527 - .long 0x794d88a2,0x0195ab9e - .long 0x24d9eaba,0x48ab4e37 - .long 0xa6f9f2a9,0x154e09a0 - .long 0xe643b5ea,0x03546c4c - .long 0x2c9969e2,0x52015a7c - .long 0x0db47e6c,0x1fe5d322 - .long 0x9ec873e6,0xe48852a0 - .long 0x51f70e9d,0x3727d015 - .long 0xf7e77f97,0x3850bad9 - .long 0xdedeab2e,0xf517a919 - .long 0xe20ad56e,0xa8bd9548 - .long 0x618a8860,0x90421b96 - .long 0xe27527b9,0xd1ce79b8 - .long 0x55bff283,0x503ed27a - .long 0x4afea531,0xc7229671 - .long 0x43eb96b6,0x7074f3f1 - .long 0x90e14ee1,0xe1b151d8 - .long 0x21d8441e,0x88651e4b - .long 0x2004afd0,0xd30a868b - .long 0x4f1e3931,0xe409a222 - .long 0x708eb13a,0x2a1ef6f9 - .long 0xfdefe483,0xbd09a299 - .long 0x64cf42df,0x4ae8d96c - .long 0x18f749f7,0x2f771469 - .long 0x26a54a6a,0x785a4665 - .long 0x3b424827,0x0a339a2d - .long 0x98e09c08,0xd132a613 - .long 0x43e3bd69,0xdf1f8cae - .long 0x3c484aa7,0xf9d58502 - .long 0xd446696a,0x6d535f9b - .long 0xe0987765,0xfe6d75b7 - .long 0xceb12868,0x808d85a7 - .long 0x9ea34e6a,0xa0db7b5c - .long 0x9ad6c9d1,0x6e20970c - .long 0xc034957d,0xbb4d001d - .long 0x601c7838,0x3f135640 - .long 0x7cd92a3c,0x4fe26ca5 - .long 0x3f133aac,0x6ba9d2ce - .type __four_over_pi,@object - .size __four_over_pi,2104 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/trunc_wmt.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/trunc_wmt.S deleted file mode 100644 index b239f42b52..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/trunc_wmt.S +++ /dev/null @@ -1,130 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "trunc_wmt.c" - .text -..TXTST0: -# -- Begin static_func - .text - .align 16,0x90 -static_func: -..B1.1: -..L1: - - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - lea static_const_table@GOTOFF(%eax), %eax - ret - .align 16,0x90 - .type static_func,@function - .size static_func,.-static_func - .data -# -- End static_func - .text -# -- Begin trunc - .text - .align 16,0x90 - .globl trunc -trunc: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - -..B2.2: - pushl %ebp - movl %esp, %ebp - subl $104, %esp - movl %ebx, 40(%esp) - call static_func - movl %eax, %ebx - movsd 112(%esp), %xmm0 - movq (%ebx), %xmm2 - movdqa %xmm0, %xmm1 - psrlq $52, %xmm1 - movq 8(%ebx), %xmm3 - movd %xmm1, %eax - andl $2047, %eax - subl $1023, %eax - js .L_2TAG_PACKET_0.0.2 - cmpl $52, %eax - jae .L_2TAG_PACKET_1.0.2 - pand %xmm3, %xmm1 - psubd %xmm1, %xmm2 - psrlq %xmm2, %xmm0 - psllq %xmm2, %xmm0 - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_0.0.2: - movsd 112(%esp), %xmm0 - movq 16(%ebx), %xmm1 - pand %xmm1, %xmm0 - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_1.0.2: - fldl 112(%esp) - fld1 - fxch %st(1) - fmulp %st, %st(1) - jmp .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_2.0.2: - movsd %xmm0, 24(%esp) - fldl 24(%esp) -.L_2TAG_PACKET_3.0.2: - movl 40(%esp), %ebx - movl %ebp, %esp - popl %ebp - ret -..B2.3: - .align 16,0x90 - .type trunc,@function - .size trunc,.-trunc - .data -# -- End trunc - .section .rodata, "a" - .align 16 - .align 16 -static_const_table: - .long 1075 - .long 0 - .long 2047 - .long 0 - .long 0 - .long 2147483648 - .type static_const_table,@object - .size static_const_table,24 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/truncf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/truncf.S deleted file mode 100644 index 69e5b3da83..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/truncf.S +++ /dev/null @@ -1,84 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "truncf.c" - .text -..TXTST0: -# -- Begin truncf - .text - .align 16,0x90 - .globl truncf -truncf: -# parameter 1: 4 + %esp -..B1.1: -..L1: - - movl 4(%esp), %eax - movl %eax, %ecx - andl $2147483647, %ecx - addl $-1065353216, %ecx - cmpl $192937984, %ecx - jb ..B1.5 -..B1.2: - testl %ecx, %ecx - jl ..B1.6 -..B1.3: - flds 4(%esp) -..B1.4: - ret -..B1.5: - shrl $23, %ecx - movl $-1, %edx - negl %ecx - addl $23, %ecx - shll %cl, %edx - andl %edx, %eax - movl %eax, 4(%esp) - flds 4(%esp) - ret -..B1.6: - andl $-2147483648, %eax - movl %eax, 4(%esp) - flds 4(%esp) - ret - .align 16,0x90 - .type truncf,@function - .size truncf,.-truncf - .data -# -- End truncf - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/truncl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/truncl.S deleted file mode 100644 index 54f1c680ca..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/truncl.S +++ /dev/null @@ -1,171 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "truncl.c" - .text -..TXTST0: -# -- Begin truncl - .text - .align 16,0x90 - .globl truncl -truncl: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-16, %esp - subl $32, %esp -..B1.2: - fnstcw 22(%esp) -..B1.3: - movzwl 16(%ebp), %ecx - andl $32767, %ecx - call ..L2 -..L2: - popl %eax - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%eax), %eax - cmpl $16446, %ecx - jge ..B1.14 -..B1.4: - cmpl $16383, %ecx - jl ..B1.9 -..B1.5: - cmpl $16415, %ecx - jge ..B1.7 -..B1.6: - negl %ecx - addl $30, %ecx - movl 12(%ebp), %eax - shrl %cl, %eax - shll %cl, %eax - movl %eax, 12(%ebp) - xorl %eax, %eax - jmp ..B1.8 -..B1.7: - negl %ecx - addl $30, %ecx - movl 8(%ebp), %eax - shrl %cl, %eax - shll %cl, %eax -..B1.8: - movl %eax, 8(%ebp) - fldt 8(%ebp) - movl %ebp, %esp - popl %ebp - ret -..B1.9: - testl %ecx, %ecx - jne ..B1.13 -..B1.10: - cmpl $0, 12(%ebp) - jne ..B1.12 -..B1.11: - cmpl $0, 8(%ebp) - je ..B1.13 -..B1.12: - fldl _smallest_value_64@GOTOFF(%eax) - fstpl (%esp) -..B1.13: - movzbl 17(%ebp), %edx - andl $128, %edx - shrl $7, %edx - fldl _zeros@GOTOFF(%eax,%edx,8) - movl %ebp, %esp - popl %ebp - ret -..B1.14: - movzwl 22(%esp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.20 -..B1.15: - orl $-64768, %ecx - movw %cx, 20(%esp) -..B1.16: - fldcw 20(%esp) -..B1.17: - fldt 8(%ebp) - fmull _ones@GOTOFF(%eax) - fstpt 8(%esp) -..B1.18: - fldcw 22(%esp) -..B1.19: - fldt 8(%esp) - movl %ebp, %esp - popl %ebp - ret -..B1.20: - fldt 8(%ebp) - fmull _ones@GOTOFF(%eax) - fstpt 8(%esp) - jmp ..B1.19 - .align 16,0x90 - .type truncl,@function - .size truncl,.-truncl - .data -# -- End truncl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0.S deleted file mode 100644 index 168c36b27d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0.S +++ /dev/null @@ -1,3324 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y0.c" - .text -..TXTST0: -# -- Begin y0 - .text - .align 16,0x90 - .globl y0 -y0: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - subl $56, %esp -..B1.2: - fnstcw 14(%esp) -..B1.3: - movl 12(%ebp), %edx - movl %edx, %esi - andl $2147483647, %esi - call ..L2 -..L2: - popl %edi - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%edi), %edi - cmpl $2146435072, %esi - jge ..B1.13 -..B1.4: - xorl %eax, %eax - movl 8(%ebp), %ecx - subl %eax, %edx - jl ..B1.20 -..B1.26: - orl %ecx, %edx - je ..B1.20 -..B1.5: - movzwl 14(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.19 -..B1.6: - orl $-64768, %edx - movw %dx, 12(%esp) -..B1.7: - fldcw 12(%esp) -..B1.8: - movl $1, %esi -..B1.9: - fldl 8(%ebp) - addl $-16, %esp - fstpt (%esp) - call __y0l. -..B1.27: - fstpt 16(%esp) - addl $16, %esp -..B1.10: - testl %esi, %esi - je ..B1.12 -..B1.11: - fldcw 14(%esp) -..B1.12: - fldt (%esp) - addl $56, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.13: - andl $-2146435073, %esi - orl 8(%ebp), %esi - jne ..B1.18 -..B1.14: - fldl _zeros@GOTOFF(%edi) - testl $-2147483648, %edx - je ..B1.17 -..B1.16: - fldl _infs@GOTOFF(%edi) - fmulp %st, %st(1) -..B1.17: - addl $56, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.18: - fldl 8(%ebp) - addl $56, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.19: - xorl %esi, %esi - jmp ..B1.9 -..B1.20: - fldl _zeros@GOTOFF(%edi) - orl %ecx, %esi - je ..B1.22 -..B1.21: - fldl _infs@GOTOFF(%edi) - fmulp %st, %st(1) - addl $56, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.22: - fldl 8+_ones@GOTOFF(%edi) - fdivp %st, %st(1) -..B1.23: - addl $56, %esp - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type y0,@function - .size y0,.-y0 - .data -# -- End y0 - .text -# -- Begin __y0l - .text - .align 16,0x90 - .hidden __y0l - .globl __y0l -__y0l: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - - .hidden __y0l. - .globl __y0l. -__y0l.: - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $120, %esp - fldt 8(%ebp) - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - fldt 132+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jb ..B2.22 -..B2.2: - fldt _val_0_6L@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B2.20 -..B2.3: - fldt _val_1_2L@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.5 -..B2.4: - fstp %st(0) - fldt _Z@GOTOFF(%ebx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt _P11@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P11@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt _Q11@GOTOFF(%ebx) - fmul %st(4), %st - fldt 12+_Q11@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 72+_P11@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 84+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 96+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 108+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 24+_Q11@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt 120+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 132+_P11@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 144+_P11@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 156+_P11@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 36+_Q11@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 168+_P11@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fxch %st(1) - fdivrl _ones@GOTOFF(%ebx) - fldt 180+_P11@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - fldt 192+_P11@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt 204+_P11@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B2.27 -..B2.5: - fldt _S@GOTOFF(%ebx) - fcomp %st(2) - fnstsw %ax - sahf - jbe ..B2.7 -..B2.6: - fldt _P12@GOTOFF(%ebx) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fstpt 92(%esp) - fldt 92(%esp) - fldt 12+_P12@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 36+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 48+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 60+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 72+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 84+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 96+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 108+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 120+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 132+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 144+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 156+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 168+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 180+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 192+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 204+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 216+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 228+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 240+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 252+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 264+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 276+_P12@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 288+_P12@GOTOFF(%ebx) - faddp %st, %st(3) - fmulp %st, %st(2) - fldt 300+_P12@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 312+_P12@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.7: - fstp %st(0) - fldt _val_3_0L@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.9 -..B2.8: - fldt 24+_P20@GOTOFF(%ebx) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt _P20@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(2) - fmul %st, %st(1) - fldt 12+_P20@GOTOFF(%ebx) - fmul %st(1), %st - fldt 36+_P20@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48+_P20@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 60+_P20@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 72+_P20@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 84+_P20@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 96+_P20@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 108+_P20@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 120+_P20@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 132+_P20@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 144+_P20@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 156+_P20@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 168+_P20@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 180+_P20@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt 192+_P20@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 204+_P20@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.9: - fstp %st(0) - fldt _val_3_875L@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B2.11 -..B2.10: - fldt _P21@GOTOFF(%ebx) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fstpt 92(%esp) - fldt 92(%esp) - fldt 12+_P21@GOTOFF(%ebx) - fmul %st(1), %st - fldt 24+_P21@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt 36+_P21@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 48+_P21@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 60+_P21@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 72+_P21@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 84+_P21@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 96+_P21@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 108+_P21@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 120+_P21@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 132+_P21@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 144+_P21@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 156+_P21@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt 168+_P21@GOTOFF(%ebx) - faddp %st, %st(3) - fmulp %st, %st(2) - fldt 180+_P21@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 192+_P21@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.11: - fstp %st(0) - fldt 12+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jb ..B2.13 -..B2.12: - fldt 12+_Z@GOTOFF(%ebx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt _P22@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P22@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 132+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 156+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 168+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 180+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 192+_P22@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 204+_P22@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 216+_P22@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.13: - fldt 24+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B2.15 -..B2.14: - fldt 24+_Z@GOTOFF(%ebx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt _P3@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P3@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 132+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 156+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 168+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 180+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 192+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 204+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 216+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 228+_P3@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 240+_P3@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 252+_P3@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.15: - movl $3, %edx -..B2.16: - lea (,%edx,8), %ecx - lea (%ecx,%edx,4), %ecx - fldt _S@GOTOFF(%ebx,%ecx) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B2.19 - jp ..B2.19 -..B2.17: - incl %edx - cmpl $11, %edx - jl ..B2.16 -..B2.18: - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx -..B2.19: - fldt _Z@GOTOFF(%ecx,%ebx) - movl %edx, %eax - fsubrp %st, %st(1) - shll $4, %eax - fld %st(0) - subl %edx, %eax - shll $4, %eax - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt -720+_P@GOTOFF(%eax,%ebx) - fmul %st(1), %st - fldt -708+_P@GOTOFF(%eax,%ebx) - fmul %st(2), %st - fldt -696+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -684+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -672+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -660+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -648+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -636+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -624+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -612+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -600+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -588+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -576+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -564+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -552+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -540+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -528+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -516+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt -504+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt -492+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.20: - fldt _P0@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fxch %st(2) - fld %st(2) - fmul %st(3), %st - fmul %st, %st(2) - fstpt 64(%esp) - fldt 64(%esp) - fxch %st(3) - fstpt 92(%esp) - fldt 92(%esp) - fxch %st(1) - fstpt (%esp) - fldt 12+_P0@GOTOFF(%ebx) - fmul %st(3), %st - fldt 24+_P0@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 36+_P0@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 48+_P0@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 60+_P0@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - fldt 72+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt 84+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 32(%esp) - call __j0l@PLT -..B2.31: - fldt 8(%ebp) - fxch %st(1) - fstpt 48(%esp) - fldt 32(%esp) -..B2.21: - fxch %st(1) - fstpt (%esp) - fstpt 32(%esp) - call logl@PLT -..B2.32: - fldt 32(%esp) - fldt 48(%esp) - fldt _tonpi@GOTOFF(%ebx) - fmulp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - jmp ..B2.27 -..B2.22: - fldl _ones@GOTOFF(%ebx) - lea 92(%esp), %eax - fdiv %st(1), %st - lea 64(%esp), %edx - fxch %st(1) - fxch %st(1) - fstpt -60(%eax) - fldt -60(%eax) - fxch %st(1) - fstpt (%esp) - fldt _val_36_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt (%eax) - fldt (%eax) - movl %eax, 12(%esp) - movl %edx, 16(%esp) - movl $-1, 20(%esp) - fxch %st(1) - fstpt -28(%eax) - fldt -28(%eax) - fldt _PP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _QP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 60+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 96+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt 108+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt -44(%eax) - fldt 108+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt -12(%eax) - call __libm_sincos_pi4l -..B2.23: - fldt 8(%ebp) - fldt 80(%esp) - fldt 48(%esp) - fldt 92(%esp) - fmulp %st, %st(1) - fldt 64(%esp) - fmulp %st, %st(2) - fadd %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt _val_0_03L@GOTOFF(%ebx) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B2.25 - jp ..B2.25 -..B2.24: - fstp %st(1) - fldt _tonpi@GOTOFF(%ebx) - fldt 32(%esp) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - jmp ..B2.27 -..B2.25: - fstp %st(0) - lea 32(%esp), %edi - movl %edi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B2.34: - addl $-32, %esp - movl (%edi), %ecx - lea 80(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%edi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%edi), %ecx - movl 12(%edi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __y0q@PLT -..B2.33: - addl $28, %esp -..B2.26: - movl 48(%esp), %eax - movl %eax, (%edi) - movl 52(%esp), %edx - movl 56(%esp), %ecx - movl 60(%esp), %eax - addl $4, %esp - pushl %edi - movl %edx, 4(%edi) - movl %ecx, 8(%edi) - movl %eax, 12(%edi) - call __qtol@PLT -..B2.27: - addl $120, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __y0l,@function - .size __y0l,.-__y0l - .data -# -- End __y0l - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_S: - .word 5921 - .word 65426 - .word 63142 - .word 35997 - .word 16384 - .word 0 - .word 29632 - .word 15745 - .word 62068 - .word 44479 - .word 16385 - .word 0 - .word 41288 - .word 2893 - .word 15731 - .word 35209 - .word 16386 - .word 0 - .word 12322 - .word 41360 - .word 35270 - .word 48124 - .word 16386 - .word 0 - .word 21828 - .word 62500 - .word 60486 - .word 61019 - .word 16386 - .word 0 - .word 54460 - .word 63729 - .word 58186 - .word 36952 - .word 16387 - .word 0 - .word 27250 - .word 3142 - .word 10825 - .word 43393 - .word 16387 - .word 0 - .word 20649 - .word 49414 - .word 53633 - .word 49831 - .word 16387 - .word 0 - .word 59160 - .word 26587 - .word 26484 - .word 56269 - .word 16387 - .word 0 - .word 57283 - .word 10561 - .word 16432 - .word 62706 - .word 16387 - .word 0 - .word 44243 - .word 51162 - .word 18495 - .word 34571 - .word 16388 - .word 0 - .word 63781 - .word 54231 - .word 15770 - .word 37789 - .word 16388 - .word 0 - .type _S,@object - .size _S,144 - .align 2 -_val_0_6L: - .word 39322 - .word 39321 - .word 39321 - .word 39321 - .word 16382 - .word 0 - .type _val_0_6L,@object - .size _val_0_6L,12 - .align 2 -_val_1_2L: - .word 39322 - .word 39321 - .word 39321 - .word 39321 - .word 16383 - .word 0 - .type _val_1_2L,@object - .size _val_1_2L,12 - .align 2 -_Z: - .word 20971 - .word 41151 - .word 30150 - .word 58561 - .word 16382 - .word 0 - .word 56848 - .word 49844 - .word 39532 - .word 64842 - .word 16384 - .word 0 - .word 5940 - .word 14600 - .word 60967 - .word 58048 - .word 16385 - .word 0 - .word 48233 - .word 9194 - .word 47533 - .word 41870 - .word 16386 - .word 0 - .word 19716 - .word 3898 - .word 3621 - .word 54727 - .word 16386 - .word 0 - .word 41547 - .word 400 - .word 58272 - .word 33793 - .word 16387 - .word 0 - .word 46312 - .word 65374 - .word 26362 - .word 40225 - .word 16387 - .word 0 - .word 15253 - .word 48480 - .word 38891 - .word 46657 - .word 16387 - .word 0 - .word 12158 - .word 16394 - .word 14239 - .word 53090 - .word 16387 - .word 0 - .word 31253 - .word 2914 - .word 8779 - .word 59523 - .word 16387 - .word 0 - .word 29606 - .word 9567 - .word 8455 - .word 32978 - .word 16388 - .word 0 - .word 51148 - .word 41491 - .word 50276 - .word 36194 - .word 16388 - .word 0 - .type _Z,@object - .size _Z,144 - .align 2 -_P11: - .word 21672 - .word 14168 - .word 38767 - .word 33539 - .word 49130 - .word 0 - .word 41169 - .word 50619 - .word 21849 - .word 37014 - .word 16364 - .word 0 - .word 55003 - .word 42793 - .word 44721 - .word 50737 - .word 49133 - .word 0 - .word 1169 - .word 13656 - .word 30890 - .word 57268 - .word 16366 - .word 0 - .word 2761 - .word 22275 - .word 55697 - .word 58639 - .word 49135 - .word 0 - .word 63624 - .word 9235 - .word 64995 - .word 56818 - .word 16368 - .word 0 - .word 62376 - .word 14952 - .word 24232 - .word 50456 - .word 49137 - .word 0 - .word 35764 - .word 14862 - .word 11423 - .word 44812 - .word 16370 - .word 0 - .word 799 - .word 749 - .word 44421 - .word 44099 - .word 49140 - .word 0 - .word 57800 - .word 45157 - .word 3532 - .word 40524 - .word 16373 - .word 0 - .word 54824 - .word 35595 - .word 46140 - .word 46550 - .word 16376 - .word 0 - .word 57927 - .word 14014 - .word 38764 - .word 61194 - .word 49142 - .word 0 - .word 31025 - .word 58986 - .word 13056 - .word 57752 - .word 49148 - .word 0 - .word 25304 - .word 41780 - .word 21387 - .word 41754 - .word 49148 - .word 0 - .word 38881 - .word 54183 - .word 37931 - .word 34827 - .word 16383 - .word 0 - .word 19650 - .word 12565 - .word 569 - .word 58514 - .word 16383 - .word 0 - .word 23916 - .word 27820 - .word 49726 - .word 50434 - .word 16382 - .word 0 - .word 37686 - .word 17141 - .word 5720 - .word 38948 - .word 16317 - .word 0 - .type _P11,@object - .size _P11,216 - .align 2 -_Q11: - .word 14194 - .word 21345 - .word 52686 - .word 49437 - .word 16382 - .word 0 - .word 16969 - .word 59638 - .word 1826 - .word 39310 - .word 16384 - .word 0 - .word 28926 - .word 48282 - .word 1364 - .word 41291 - .word 16384 - .word 0 - .word 13574 - .word 15497 - .word 63728 - .word 57349 - .word 16382 - .word 0 - .type _Q11,@object - .size _Q11,48 - .align 2 -_P12: - .word 59330 - .word 22263 - .word 34178 - .word 51006 - .word 49126 - .word 0 - .word 16861 - .word 21193 - .word 35273 - .word 46715 - .word 16362 - .word 0 - .word 2103 - .word 12628 - .word 1838 - .word 41114 - .word 49133 - .word 0 - .word 46148 - .word 53581 - .word 46203 - .word 46468 - .word 16367 - .word 0 - .word 19710 - .word 1268 - .word 64842 - .word 38086 - .word 49137 - .word 0 - .word 10276 - .word 59226 - .word 39596 - .word 48586 - .word 16370 - .word 0 - .word 31029 - .word 64049 - .word 23137 - .word 50693 - .word 49139 - .word 0 - .word 22014 - .word 1854 - .word 56980 - .word 45052 - .word 16372 - .word 0 - .word 12740 - .word 38047 - .word 44756 - .word 35383 - .word 49141 - .word 0 - .word 9689 - .word 42893 - .word 35756 - .word 50848 - .word 16373 - .word 0 - .word 16570 - .word 20820 - .word 51546 - .word 34499 - .word 49142 - .word 0 - .word 49962 - .word 36228 - .word 57995 - .word 45370 - .word 16374 - .word 0 - .word 32489 - .word 35981 - .word 43312 - .word 58898 - .word 49142 - .word 0 - .word 10311 - .word 12657 - .word 16405 - .word 38148 - .word 16375 - .word 0 - .word 32504 - .word 29604 - .word 49577 - .word 49580 - .word 49143 - .word 0 - .word 65322 - .word 54336 - .word 27403 - .word 64825 - .word 16375 - .word 0 - .word 33227 - .word 51353 - .word 11288 - .word 42704 - .word 49144 - .word 0 - .word 30209 - .word 39595 - .word 16790 - .word 56786 - .word 16376 - .word 0 - .word 17645 - .word 4926 - .word 40100 - .word 38165 - .word 49145 - .word 0 - .word 6983 - .word 2488 - .word 5292 - .word 51990 - .word 16377 - .word 0 - .word 4652 - .word 21592 - .word 9570 - .word 36478 - .word 49146 - .word 0 - .word 53361 - .word 14763 - .word 26464 - .word 52381 - .word 16378 - .word 0 - .word 50485 - .word 35307 - .word 30503 - .word 59794 - .word 49146 - .word 0 - .word 18614 - .word 21402 - .word 49824 - .word 37715 - .word 16379 - .word 0 - .word 55547 - .word 61092 - .word 564 - .word 48870 - .word 49149 - .word 0 - .word 9082 - .word 24716 - .word 52021 - .word 40706 - .word 16382 - .word 0 - .word 17305 - .word 30912 - .word 47308 - .word 59790 - .word 16380 - .word 0 - .type _P12,@object - .size _P12,324 - .align 2 -_val_3_0L: - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .type _val_3_0L,@object - .size _val_3_0L,12 - .align 2 -_P20: - .word 37654 - .word 4018 - .word 25149 - .word 64448 - .word 16354 - .word 0 - .word 19189 - .word 12397 - .word 54733 - .word 33028 - .word 16357 - .word 0 - .word 22349 - .word 41220 - .word 13172 - .word 45200 - .word 16358 - .word 0 - .word 43891 - .word 61784 - .word 34756 - .word 53833 - .word 16358 - .word 0 - .word 23592 - .word 62506 - .word 40671 - .word 50152 - .word 16359 - .word 0 - .word 27771 - .word 49376 - .word 49653 - .word 53593 - .word 49126 - .word 0 - .word 29892 - .word 65375 - .word 48818 - .word 47355 - .word 16361 - .word 0 - .word 33664 - .word 20071 - .word 46988 - .word 35237 - .word 49131 - .word 0 - .word 40179 - .word 47562 - .word 27113 - .word 46088 - .word 16364 - .word 0 - .word 39977 - .word 33568 - .word 2856 - .word 39237 - .word 49134 - .word 0 - .word 22462 - .word 11227 - .word 63692 - .word 48552 - .word 16369 - .word 0 - .word 9895 - .word 49985 - .word 29445 - .word 35598 - .word 49139 - .word 0 - .word 41034 - .word 13031 - .word 20740 - .word 35245 - .word 49142 - .word 0 - .word 32927 - .word 48253 - .word 43 - .word 37376 - .word 16375 - .word 0 - .word 5109 - .word 58801 - .word 31733 - .word 33042 - .word 16379 - .word 0 - .word 34717 - .word 51477 - .word 15888 - .word 35209 - .word 49148 - .word 0 - .word 4166 - .word 43043 - .word 47592 - .word 42555 - .word 49149 - .word 0 - .word 20077 - .word 289 - .word 31753 - .word 49394 - .word 16381 - .word 0 - .type _P20,@object - .size _P20,216 - .align 2 -_val_3_875L: - .word 0 - .word 0 - .word 0 - .word 63488 - .word 16384 - .word 0 - .type _val_3_875L,@object - .size _val_3_875L,12 - .align 2 -_P21: - .word 27895 - .word 14185 - .word 11256 - .word 61473 - .word 49117 - .word 0 - .word 55110 - .word 27090 - .word 21413 - .word 51858 - .word 49119 - .word 0 - .word 47481 - .word 51958 - .word 45685 - .word 44708 - .word 49121 - .word 0 - .word 53606 - .word 43192 - .word 10601 - .word 36675 - .word 49120 - .word 0 - .word 9703 - .word 39697 - .word 3773 - .word 54687 - .word 49123 - .word 0 - .word 39016 - .word 46259 - .word 57439 - .word 47927 - .word 16357 - .word 0 - .word 18601 - .word 64800 - .word 43294 - .word 45654 - .word 49126 - .word 0 - .word 11755 - .word 20846 - .word 12691 - .word 36847 - .word 49129 - .word 0 - .word 34925 - .word 21969 - .word 12496 - .word 40232 - .word 49133 - .word 0 - .word 33074 - .word 22131 - .word 45345 - .word 58077 - .word 16368 - .word 0 - .word 28402 - .word 30562 - .word 17788 - .word 44258 - .word 16370 - .word 0 - .word 64431 - .word 22682 - .word 21098 - .word 38133 - .word 49142 - .word 0 - .word 38064 - .word 47115 - .word 9737 - .word 49752 - .word 49143 - .word 0 - .word 32940 - .word 23551 - .word 17164 - .word 63584 - .word 16378 - .word 0 - .word 20289 - .word 55054 - .word 36724 - .word 37823 - .word 16378 - .word 0 - .word 46434 - .word 29308 - .word 2375 - .word 53705 - .word 49149 - .word 0 - .word 16931 - .word 9593 - .word 51956 - .word 35227 - .word 16378 - .word 0 - .type _P21,@object - .size _P21,204 - .align 2 -_P22: - .word 40244 - .word 7737 - .word 8636 - .word 43048 - .word 49106 - .word 0 - .word 47822 - .word 28463 - .word 39991 - .word 46660 - .word 16342 - .word 0 - .word 52293 - .word 15799 - .word 45377 - .word 51162 - .word 49113 - .word 0 - .word 37860 - .word 10494 - .word 27911 - .word 39108 - .word 16348 - .word 0 - .word 1970 - .word 24596 - .word 57275 - .word 48105 - .word 49118 - .word 0 - .word 64547 - .word 28877 - .word 41771 - .word 52711 - .word 16352 - .word 0 - .word 63459 - .word 4647 - .word 40018 - .word 64048 - .word 49122 - .word 0 - .word 38817 - .word 50313 - .word 34514 - .word 41599 - .word 16357 - .word 0 - .word 6873 - .word 59727 - .word 11575 - .word 48044 - .word 49125 - .word 0 - .word 29515 - .word 62000 - .word 64058 - .word 40336 - .word 49129 - .word 0 - .word 47818 - .word 19180 - .word 47066 - .word 42033 - .word 49133 - .word 0 - .word 35527 - .word 6093 - .word 4081 - .word 54678 - .word 16368 - .word 0 - .word 16787 - .word 50723 - .word 15144 - .word 52417 - .word 16370 - .word 0 - .word 27442 - .word 31785 - .word 24103 - .word 36633 - .word 49142 - .word 0 - .word 6233 - .word 52232 - .word 32482 - .word 57483 - .word 49143 - .word 0 - .word 59606 - .word 43125 - .word 44255 - .word 61366 - .word 16378 - .word 0 - .word 29998 - .word 6975 - .word 18760 - .word 53326 - .word 16378 - .word 0 - .word 24786 - .word 2384 - .word 4789 - .word 52762 - .word 49149 - .word 0 - .word 34816 - .word 30902 - .word 22802 - .word 44066 - .word 49086 - .word 0 - .type _P22,@object - .size _P22,228 - .align 2 -_P3: - .word 38373 - .word 25081 - .word 52784 - .word 41269 - .word 16319 - .word 0 - .word 2433 - .word 58494 - .word 34093 - .word 49310 - .word 49089 - .word 0 - .word 20384 - .word 14386 - .word 32743 - .word 56565 - .word 16322 - .word 0 - .word 12279 - .word 3882 - .word 34299 - .word 37877 - .word 49096 - .word 0 - .word 57529 - .word 46240 - .word 60154 - .word 40126 - .word 16332 - .word 0 - .word 46223 - .word 16522 - .word 54101 - .word 39334 - .word 16335 - .word 0 - .word 17152 - .word 52627 - .word 55415 - .word 33597 - .word 49108 - .word 0 - .word 46957 - .word 15713 - .word 64890 - .word 47269 - .word 49111 - .word 0 - .word 63416 - .word 7921 - .word 11783 - .word 63655 - .word 16347 - .word 0 - .word 22182 - .word 52374 - .word 10257 - .word 64822 - .word 16350 - .word 0 - .word 20533 - .word 18718 - .word 7837 - .word 41493 - .word 49123 - .word 0 - .word 34870 - .word 43221 - .word 2667 - .word 34068 - .word 49126 - .word 0 - .word 62446 - .word 64657 - .word 15033 - .word 39509 - .word 16362 - .word 0 - .word 31017 - .word 38768 - .word 5018 - .word 46409 - .word 16364 - .word 0 - .word 37858 - .word 10529 - .word 62079 - .word 49339 - .word 49136 - .word 0 - .word 60794 - .word 51427 - .word 47345 - .word 37742 - .word 49138 - .word 0 - .word 8999 - .word 61205 - .word 62511 - .word 36506 - .word 16374 - .word 0 - .word 22683 - .word 43326 - .word 42314 - .word 55672 - .word 16374 - .word 0 - .word 37536 - .word 24482 - .word 58150 - .word 50356 - .word 49146 - .word 0 - .word 47735 - .word 57962 - .word 45199 - .word 44407 - .word 49145 - .word 0 - .word 54502 - .word 19410 - .word 25859 - .word 39334 - .word 16381 - .word 0 - .word 1861 - .word 57822 - .word 27975 - .word 42824 - .word 49086 - .word 0 - .type _P3,@object - .size _P3,264 - .align 2 -_P: - .word 6710 - .word 46975 - .word 45541 - .word 45018 - .word 16323 - .word 0 - .word 47994 - .word 32334 - .word 52627 - .word 65214 - .word 16326 - .word 0 - .word 25829 - .word 961 - .word 45314 - .word 63623 - .word 49099 - .word 0 - .word 56740 - .word 896 - .word 13408 - .word 40400 - .word 49103 - .word 0 - .word 60385 - .word 50719 - .word 53670 - .word 35961 - .word 16340 - .word 0 - .word 18363 - .word 40724 - .word 30788 - .word 37641 - .word 16343 - .word 0 - .word 54199 - .word 26560 - .word 1100 - .word 63052 - .word 49115 - .word 0 - .word 31112 - .word 47384 - .word 24910 - .word 52460 - .word 49118 - .word 0 - .word 62051 - .word 62630 - .word 7457 - .word 41285 - .word 16355 - .word 0 - .word 41021 - .word 16553 - .word 53133 - .word 51701 - .word 16357 - .word 0 - .word 43336 - .word 19494 - .word 20322 - .word 38261 - .word 49130 - .word 0 - .word 44128 - .word 40851 - .word 40287 - .word 33282 - .word 49132 - .word 0 - .word 15978 - .word 61692 - .word 60093 - .word 46462 - .word 16368 - .word 0 - .word 34924 - .word 34591 - .word 27618 - .word 49090 - .word 16369 - .word 0 - .word 22325 - .word 56457 - .word 51367 - .word 65297 - .word 49141 - .word 0 - .word 21258 - .word 62600 - .word 63264 - .word 33170 - .word 49142 - .word 0 - .word 31459 - .word 43701 - .word 15672 - .word 42803 - .word 16378 - .word 0 - .word 10392 - .word 64190 - .word 8847 - .word 51227 - .word 16376 - .word 0 - .word 34244 - .word 38351 - .word 44643 - .word 65457 - .word 49148 - .word 0 - .word 24705 - .word 53181 - .word 1549 - .word 55232 - .word 16319 - .word 0 - .word 24274 - .word 2157 - .word 59872 - .word 44641 - .word 49091 - .word 0 - .word 44404 - .word 52032 - .word 31206 - .word 56185 - .word 49094 - .word 0 - .word 42376 - .word 53700 - .word 44782 - .word 63474 - .word 16331 - .word 0 - .word 55880 - .word 43379 - .word 3093 - .word 34064 - .word 16335 - .word 0 - .word 62288 - .word 61979 - .word 24976 - .word 35576 - .word 49108 - .word 0 - .word 30673 - .word 34148 - .word 2010 - .word 61956 - .word 49110 - .word 0 - .word 45192 - .word 28065 - .word 60055 - .word 61722 - .word 16347 - .word 0 - .word 24582 - .word 59932 - .word 774 - .word 41831 - .word 16350 - .word 0 - .word 39741 - .word 15639 - .word 29541 - .word 39821 - .word 49123 - .word 0 - .word 32965 - .word 53765 - .word 3652 - .word 39681 - .word 49125 - .word 0 - .word 55274 - .word 5931 - .word 14729 - .word 36200 - .word 16362 - .word 0 - .word 4659 - .word 41741 - .word 5124 - .word 48783 - .word 16363 - .word 0 - .word 61896 - .word 13936 - .word 31722 - .word 42885 - .word 49136 - .word 0 - .word 29587 - .word 13947 - .word 35938 - .word 34351 - .word 49137 - .word 0 - .word 30548 - .word 42185 - .word 15217 - .word 58709 - .word 16373 - .word 0 - .word 32944 - .word 45803 - .word 62008 - .word 44929 - .word 16373 - .word 0 - .word 15543 - .word 17819 - .word 22981 - .word 37733 - .word 49146 - .word 0 - .word 40787 - .word 12944 - .word 27687 - .word 34273 - .word 49144 - .word 0 - .word 14474 - .word 51712 - .word 20794 - .word 57241 - .word 16380 - .word 0 - .word 31505 - .word 44115 - .word 25843 - .word 56405 - .word 49084 - .word 0 - .word 29537 - .word 33343 - .word 23367 - .word 43948 - .word 16323 - .word 0 - .word 15837 - .word 34931 - .word 8097 - .word 48214 - .word 16326 - .word 0 - .word 1126 - .word 23018 - .word 59367 - .word 62418 - .word 49099 - .word 0 - .word 50591 - .word 16203 - .word 45917 - .word 57446 - .word 49102 - .word 0 - .word 6095 - .word 44294 - .word 16725 - .word 34699 - .word 16340 - .word 0 - .word 2346 - .word 25530 - .word 14073 - .word 51139 - .word 16342 - .word 0 - .word 48724 - .word 10078 - .word 7882 - .word 59578 - .word 49115 - .word 0 - .word 3077 - .word 7734 - .word 24746 - .word 33688 - .word 49118 - .word 0 - .word 52085 - .word 9505 - .word 49832 - .word 37954 - .word 16355 - .word 0 - .word 41663 - .word 47247 - .word 238 - .word 62191 - .word 16356 - .word 0 - .word 48361 - .word 39255 - .word 14492 - .word 33999 - .word 49130 - .word 0 - .word 35816 - .word 34414 - .word 54424 - .word 37185 - .word 49131 - .word 0 - .word 20077 - .word 189 - .word 48758 - .word 39656 - .word 16368 - .word 0 - .word 35728 - .word 48114 - .word 41225 - .word 51144 - .word 16368 - .word 0 - .word 10943 - .word 64308 - .word 2314 - .word 53541 - .word 49141 - .word 0 - .word 32154 - .word 56468 - .word 40039 - .word 32925 - .word 49141 - .word 0 - .word 4941 - .word 52917 - .word 35073 - .word 34082 - .word 16378 - .word 0 - .word 61194 - .word 15048 - .word 42139 - .word 49938 - .word 16375 - .word 0 - .word 19128 - .word 18289 - .word 6860 - .word 51502 - .word 49148 - .word 0 - .word 49300 - .word 58708 - .word 59005 - .word 55071 - .word 16319 - .word 0 - .word 26502 - .word 47642 - .word 36933 - .word 42964 - .word 49091 - .word 0 - .word 30051 - .word 60756 - .word 30625 - .word 41460 - .word 49094 - .word 0 - .word 61015 - .word 15762 - .word 48007 - .word 60846 - .word 16331 - .word 0 - .word 21975 - .word 20753 - .word 22643 - .word 48677 - .word 16334 - .word 0 - .word 54246 - .word 4624 - .word 38600 - .word 33572 - .word 49108 - .word 0 - .word 59379 - .word 53723 - .word 32353 - .word 42607 - .word 49110 - .word 0 - .word 40791 - .word 16038 - .word 57576 - .word 57139 - .word 16347 - .word 0 - .word 25939 - .word 3603 - .word 54023 - .word 55128 - .word 16349 - .word 0 - .word 7176 - .word 58381 - .word 25669 - .word 36047 - .word 49123 - .word 0 - .word 23057 - .word 6107 - .word 22526 - .word 49962 - .word 49124 - .word 0 - .word 19351 - .word 39386 - .word 35003 - .word 63923 - .word 16361 - .word 0 - .word 45293 - .word 12882 - .word 9948 - .word 58748 - .word 16362 - .word 0 - .word 20001 - .word 20829 - .word 53529 - .word 36918 - .word 49136 - .word 0 - .word 21919 - .word 49831 - .word 37577 - .word 39856 - .word 49136 - .word 0 - .word 47026 - .word 46471 - .word 55318 - .word 49443 - .word 16373 - .word 0 - .word 61519 - .word 51459 - .word 6950 - .word 50870 - .word 16372 - .word 0 - .word 1555 - .word 2971 - .word 23597 - .word 62610 - .word 49145 - .word 0 - .word 45926 - .word 36681 - .word 39043 - .word 38451 - .word 49143 - .word 0 - .word 64160 - .word 21923 - .word 31542 - .word 47202 - .word 16380 - .word 0 - .word 36569 - .word 36429 - .word 41036 - .word 40257 - .word 49085 - .word 0 - .word 63272 - .word 57206 - .word 4215 - .word 41813 - .word 16323 - .word 0 - .word 38880 - .word 42175 - .word 14999 - .word 35837 - .word 16326 - .word 0 - .word 42787 - .word 9806 - .word 63168 - .word 59020 - .word 49099 - .word 0 - .word 31095 - .word 14929 - .word 48209 - .word 41580 - .word 49102 - .word 0 - .word 36413 - .word 27679 - .word 45695 - .word 64718 - .word 16339 - .word 0 - .word 24761 - .word 31380 - .word 27544 - .word 35930 - .word 16342 - .word 0 - .word 11221 - .word 62995 - .word 50975 - .word 54692 - .word 49115 - .word 0 - .word 29668 - .word 1933 - .word 17144 - .word 45888 - .word 49117 - .word 0 - .word 30810 - .word 24149 - .word 32113 - .word 34254 - .word 16355 - .word 0 - .word 34856 - .word 24408 - .word 21475 - .word 41075 - .word 16356 - .word 0 - .word 33943 - .word 23810 - .word 62559 - .word 60314 - .word 49129 - .word 0 - .word 3305 - .word 24934 - .word 37437 - .word 47776 - .word 49130 - .word 0 - .word 54895 - .word 55211 - .word 32000 - .word 34613 - .word 16368 - .word 0 - .word 35009 - .word 47065 - .word 21660 - .word 64281 - .word 16367 - .word 0 - .word 9852 - .word 9156 - .word 55656 - .word 46121 - .word 49141 - .word 0 - .word 36442 - .word 41210 - .word 20060 - .word 40802 - .word 49140 - .word 0 - .word 21758 - .word 47322 - .word 2788 - .word 58210 - .word 16377 - .word 0 - .word 52348 - .word 9004 - .word 18276 - .word 61559 - .word 16374 - .word 0 - .word 54786 - .word 7147 - .word 27070 - .word 43826 - .word 49148 - .word 0 - .word 34268 - .word 15768 - .word 2480 - .word 60089 - .word 49085 - .word 0 - .word 1157 - .word 52048 - .word 20458 - .word 40588 - .word 49091 - .word 0 - .word 51540 - .word 48806 - .word 47292 - .word 62380 - .word 49093 - .word 0 - .word 19999 - .word 57758 - .word 46120 - .word 57112 - .word 16331 - .word 0 - .word 21459 - .word 54484 - .word 23863 - .word 35854 - .word 16334 - .word 0 - .word 28754 - .word 5362 - .word 55327 - .word 62303 - .word 49107 - .word 0 - .word 45243 - .word 6687 - .word 17114 - .word 61365 - .word 49109 - .word 0 - .word 32048 - .word 1009 - .word 39781 - .word 52368 - .word 16347 - .word 0 - .word 64584 - .word 3308 - .word 26412 - .word 38818 - .word 16349 - .word 0 - .word 23088 - .word 38547 - .word 22659 - .word 65247 - .word 49122 - .word 0 - .word 14061 - .word 22418 - .word 61292 - .word 34447 - .word 49124 - .word 0 - .word 57848 - .word 26921 - .word 61797 - .word 57155 - .word 16361 - .word 0 - .word 1597 - .word 31414 - .word 38572 - .word 39774 - .word 16362 - .word 0 - .word 30034 - .word 27108 - .word 16687 - .word 65316 - .word 49135 - .word 0 - .word 32265 - .word 44536 - .word 9779 - .word 53216 - .word 49135 - .word 0 - .word 550 - .word 16407 - .word 19715 - .word 43369 - .word 16373 - .word 0 - .word 7132 - .word 1973 - .word 39654 - .word 33659 - .word 16372 - .word 0 - .word 19090 - .word 42384 - .word 19608 - .word 54616 - .word 49145 - .word 0 - .word 29916 - .word 8899 - .word 53582 - .word 50715 - .word 49142 - .word 0 - .word 63987 - .word 34002 - .word 32751 - .word 41084 - .word 16380 - .word 0 - .word 31930 - .word 50610 - .word 35321 - .word 40669 - .word 49085 - .word 0 - .word 64556 - .word 32042 - .word 47688 - .word 39353 - .word 16323 - .word 0 - .word 22761 - .word 33268 - .word 25802 - .word 54704 - .word 16325 - .word 0 - .word 48596 - .word 35082 - .word 36228 - .word 55222 - .word 49099 - .word 0 - .word 62834 - .word 26257 - .word 62649 - .word 62428 - .word 49101 - .word 0 - .word 22216 - .word 57771 - .word 11637 - .word 59993 - .word 16339 - .word 0 - .word 32841 - .word 24077 - .word 25618 - .word 53031 - .word 16341 - .word 0 - .word 7134 - .word 15474 - .word 25724 - .word 50216 - .word 49115 - .word 0 - .word 679 - .word 61058 - .word 8963 - .word 33314 - .word 49117 - .word 0 - .word 30607 - .word 23707 - .word 50236 - .word 62315 - .word 16354 - .word 0 - .word 57112 - .word 44811 - .word 22996 - .word 58760 - .word 16355 - .word 0 - .word 7925 - .word 14145 - .word 19419 - .word 54389 - .word 49129 - .word 0 - .word 15063 - .word 11101 - .word 53306 - .word 33747 - .word 49130 - .word 0 - .word 17212 - .word 63840 - .word 49608 - .word 61962 - .word 16367 - .word 0 - .word 64221 - .word 2367 - .word 56115 - .word 44976 - .word 16367 - .word 0 - .word 25958 - .word 42476 - .word 21228 - .word 41045 - .word 49141 - .word 0 - .word 39160 - .word 29939 - .word 20970 - .word 56757 - .word 49139 - .word 0 - .word 34212 - .word 35958 - .word 8729 - .word 51611 - .word 16377 - .word 0 - .word 47817 - .word 56326 - .word 46415 - .word 42719 - .word 16374 - .word 0 - .word 14697 - .word 51278 - .word 14116 - .word 38800 - .word 49148 - .word 0 - .word 42056 - .word 1202 - .word 6817 - .word 52251 - .word 16319 - .word 0 - .word 9811 - .word 3897 - .word 54180 - .word 38147 - .word 49091 - .word 0 - .word 22279 - .word 36400 - .word 23268 - .word 48339 - .word 49093 - .word 0 - .word 3604 - .word 63501 - .word 23839 - .word 53404 - .word 16331 - .word 0 - .word 1179 - .word 37183 - .word 50892 - .word 54850 - .word 16333 - .word 0 - .word 59751 - .word 27404 - .word 14795 - .word 57826 - .word 49107 - .word 0 - .word 14718 - .word 11779 - .word 34360 - .word 46330 - .word 49109 - .word 0 - .word 59705 - .word 41619 - .word 32041 - .word 48245 - .word 16347 - .word 0 - .word 23030 - .word 54615 - .word 27535 - .word 57905 - .word 16348 - .word 0 - .word 39169 - .word 62610 - .word 58529 - .word 59687 - .word 49122 - .word 0 - .word 51398 - .word 44311 - .word 12717 - .word 50833 - .word 49123 - .word 0 - .word 27431 - .word 2954 - .word 22657 - .word 51954 - .word 16361 - .word 0 - .word 58296 - .word 29685 - .word 27243 - .word 58169 - .word 16361 - .word 0 - .word 51216 - .word 48206 - .word 42318 - .word 59054 - .word 49135 - .word 0 - .word 56132 - .word 37000 - .word 55250 - .word 38652 - .word 49135 - .word 0 - .word 33362 - .word 39562 - .word 49329 - .word 39051 - .word 16373 - .word 0 - .word 45334 - .word 5673 - .word 58520 - .word 48690 - .word 16371 - .word 0 - .word 35653 - .word 20625 - .word 33642 - .word 49050 - .word 49145 - .word 0 - .word 58051 - .word 8993 - .word 6809 - .word 36624 - .word 49142 - .word 0 - .word 52356 - .word 59873 - .word 62958 - .word 36858 - .word 16380 - .word 0 - .word 32142 - .word 25405 - .word 33867 - .word 33307 - .word 16319 - .word 0 - .word 49519 - .word 13151 - .word 56037 - .word 36991 - .word 16323 - .word 0 - .word 44868 - .word 63207 - .word 24006 - .word 43028 - .word 16325 - .word 0 - .word 8083 - .word 45145 - .word 39702 - .word 51683 - .word 49099 - .word 0 - .word 45111 - .word 52725 - .word 38011 - .word 48603 - .word 49101 - .word 0 - .word 60521 - .word 20244 - .word 23464 - .word 55814 - .word 16339 - .word 0 - .word 20556 - .word 16261 - .word 38082 - .word 40872 - .word 16341 - .word 0 - .word 25337 - .word 58099 - .word 56911 - .word 46447 - .word 49115 - .word 0 - .word 37285 - .word 19168 - .word 56812 - .word 50878 - .word 49116 - .word 0 - .word 15949 - .word 20065 - .word 40118 - .word 57328 - .word 16354 - .word 0 - .word 40507 - .word 40248 - .word 14830 - .word 44509 - .word 16355 - .word 0 - .word 5104 - .word 24529 - .word 29756 - .word 49797 - .word 49129 - .word 0 - .word 46472 - .word 25780 - .word 5432 - .word 50788 - .word 49129 - .word 0 - .word 15446 - .word 10547 - .word 15373 - .word 56506 - .word 16367 - .word 0 - .word 3213 - .word 104 - .word 59551 - .word 33676 - .word 16367 - .word 0 - .word 34009 - .word 54843 - .word 32265 - .word 37318 - .word 49141 - .word 0 - .word 45472 - .word 58672 - .word 64591 - .word 42366 - .word 49139 - .word 0 - .word 32200 - .word 21528 - .word 8481 - .word 46835 - .word 16377 - .word 0 - .word 49716 - .word 3176 - .word 29068 - .word 63703 - .word 16373 - .word 0 - .word 39156 - .word 24341 - .word 43754 - .word 35182 - .word 49148 - .word 0 - .word 61730 - .word 30329 - .word 55010 - .word 38388 - .word 16320 - .word 0 - .type _P,@object - .size _P,2160 - .align 2 -_P0: - .word 46060 - .word 21479 - .word 19707 - .word 37102 - .word 16345 - .word 0 - .word 35676 - .word 11242 - .word 15120 - .word 54134 - .word 49120 - .word 0 - .word 34641 - .word 49003 - .word 21090 - .word 56946 - .word 16359 - .word 0 - .word 36501 - .word 52298 - .word 48288 - .word 40780 - .word 49134 - .word 0 - .word 2947 - .word 56486 - .word 859 - .word 36145 - .word 16372 - .word 0 - .word 6106 - .word 41115 - .word 36319 - .word 33709 - .word 49145 - .word 0 - .word 13230 - .word 6676 - .word 23048 - .word 46558 - .word 16380 - .word 0 - .word 62532 - .word 24192 - .word 46286 - .word 38694 - .word 49147 - .word 0 - .type _P0,@object - .size _P0,96 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .type _tonpi,@object - .size _tonpi,12 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,12 - .align 2 -_PP: - .word 3555 - .word 4199 - .word 61716 - .word 36505 - .word 49086 - .word 0 - .word 21640 - .word 56203 - .word 47336 - .word 57608 - .word 16322 - .word 0 - .word 3059 - .word 27554 - .word 42044 - .word 45622 - .word 49095 - .word 0 - .word 55815 - .word 35656 - .word 54748 - .word 47307 - .word 16332 - .word 0 - .word 42025 - .word 6728 - .word 28939 - .word 34692 - .word 49106 - .word 0 - .word 58943 - .word 11189 - .word 14960 - .word 38786 - .word 16344 - .word 0 - .word 43526 - .word 20005 - .word 29826 - .word 37014 - .word 49119 - .word 0 - .word 58976 - .word 17109 - .word 36079 - .word 36708 - .word 16359 - .word 0 - .word 58243 - .word 36408 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _PP,@object - .size _PP,120 - .align 2 -_QP: - .word 30466 - .word 14887 - .word 33885 - .word 35327 - .word 16316 - .word 0 - .word 41139 - .word 65374 - .word 59488 - .word 50915 - .word 49088 - .word 0 - .word 35675 - .word 30946 - .word 22284 - .word 35505 - .word 16325 - .word 0 - .word 65216 - .word 29458 - .word 42913 - .word 63176 - .word 49097 - .word 0 - .word 5130 - .word 24339 - .word 48915 - .word 38634 - .word 16335 - .word 0 - .word 30040 - .word 27658 - .word 23448 - .word 34596 - .word 49109 - .word 0 - .word 37816 - .word 17431 - .word 24401 - .word 49646 - .word 16347 - .word 0 - .word 4377 - .word 35057 - .word 45578 - .word 33037 - .word 49123 - .word 0 - .word 19863 - .word 65266 - .word 6202 - .word 53939 - .word 16363 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 49142 - .word 0 - .type _QP,@object - .size _QP,120 - .align 2 -_val_0_03L: - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .type _val_0_03L,@object - .size _val_0_03L,12 - .data - .hidden __libm_sincos_pi4l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0f.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0f.S deleted file mode 100644 index 0a7690f452..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0f.S +++ /dev/null @@ -1,805 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y0f.c" - .text -..TXTST0: -# -- Begin y0f - .text - .align 16,0x90 - .globl y0f -y0f: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %ebx - subl $124, %esp - movl 8(%ebp), %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea -1(%edx), %eax - cmpl $2139095039, %eax - jae ..B1.21 -..B1.2: - cmpl $1099978979, %edx - jae ..B1.19 -..B1.3: - cmpl $1094450314, %edx - jae ..B1.15 -..B1.4: - cmpl $1085128690, %edx - jae ..B1.11 -..B1.5: - cmpl $1074568695, %edx - jae ..B1.10 -..B1.6: - cmpl $1058642330, %edx - jae ..B1.9 -..B1.7: - flds 8(%ebp) - fstl (%esp) - fstpl 32(%esp) - call __libm_log_k32 -..B1.31: - fldl 32(%esp) -..B1.8: - fldl _tonpi@GOTOFF(%ebx) - fmulp %st, %st(2) - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fldl 32+_Q1@GOTOFF(%ebx) - fmul %st(1), %st - fldl 24+_Q1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 16+_Q1@GOTOFF(%ebx) - fmul %st(2), %st - fxch %st(1) - faddl 8+_Q1@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl _Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fldl 24+_Q2@GOTOFF(%ebx) - fmul %st(2), %st - fldl 16+_Q2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 8+_Q2@GOTOFF(%ebx) - fmulp %st, %st(3) - faddl _Q2@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.9: - flds 8(%ebp) - fldl 160+_P1@GOTOFF(%ebx) - fldl 144+_P1@GOTOFF(%ebx) - fldl 152+_P1@GOTOFF(%ebx) - fldl 136+_P1@GOTOFF(%ebx) - fxch %st(4) - fsubl 168+_P1@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 128+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 112+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 96+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 80+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 64+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 48+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 32+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 16+_P1@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(4) - fxch %st(2) - faddl 120+_P1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(5) - faddl 104+_P1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(5) - faddl 88+_P1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(5) - faddl 72+_P1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(5) - faddl 56+_P1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(3) - faddl _P1@GOTOFF(%ebx) - fxch %st(5) - faddl 40+_P1@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(2) - faddl 24+_P1@GOTOFF(%ebx) - fmulp %st, %st(1) - fmul %st(1), %st - fxch %st(2) - faddl 8+_P1@GOTOFF(%ebx) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.10: - flds 8(%ebp) - fldl 136+_P2@GOTOFF(%ebx) - fldl 120+_P2@GOTOFF(%ebx) - fldl 128+_P2@GOTOFF(%ebx) - fldl 112+_P2@GOTOFF(%ebx) - fxch %st(4) - fsubl 144+_P2@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 104+_P2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 88+_P2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 72+_P2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 56+_P2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 40+_P2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 24+_P2@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(2), %st - fxch %st(4) - faddl 8+_P2@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - faddl 96+_P2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 80+_P2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 64+_P2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 48+_P2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 32+_P2@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(3) - faddl 16+_P2@GOTOFF(%ebx) - fmulp %st, %st(1) - fxch %st(1) - faddl _P2@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.11: - cmpl $1091143997, %edx - jae ..B1.13 -..B1.12: - lea _P3@GOTOFF(%ebx), %eax - jmp ..B1.14 -..B1.13: - lea _P4@GOTOFF(%ebx), %eax -..B1.14: - flds 8(%ebp) - fldl 104(%eax) - fldl 88(%eax) - fldl 96(%eax) - fldl 80(%eax) - fxch %st(4) - fsubl 112(%eax) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 72(%eax) - fmul %st(5), %st - fxch %st(4) - faddl 56(%eax) - fmul %st(5), %st - fxch %st(4) - faddl 40(%eax) - fmul %st(5), %st - fxch %st(4) - faddl 24(%eax) - fmul %st(1), %st - fmul %st(2), %st - fxch %st(4) - faddl 8(%eax) - fmulp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - faddl 64(%eax) - fmul %st(3), %st - fxch %st(4) - faddl 48(%eax) - fmul %st(3), %st - fxch %st(4) - faddl 32(%eax) - fmulp %st, %st(3) - fxch %st(3) - faddl 16(%eax) - fmulp %st, %st(1) - fxch %st(1) - faddl (%eax) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.15: - cmpl $1097751532, %edx - jae ..B1.17 -..B1.16: - lea _P5@GOTOFF(%ebx), %eax - jmp ..B1.18 -..B1.17: - lea _P6@GOTOFF(%ebx), %eax -..B1.18: - flds 8(%ebp) - fldl 80(%eax) - fldl 96(%eax) - fldl 88(%eax) - fldl 72(%eax) - fxch %st(4) - fsubl 104(%eax) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(3) - fmul %st, %st(4) - fmul %st, %st(6) - fxch %st(5) - faddl 48(%eax) - fmul %st(5), %st - fxch %st(4) - faddl 64(%eax) - fmul %st(5), %st - fxch %st(4) - faddl 16(%eax) - fmul %st(1), %st - fxch %st(4) - faddl 32(%eax) - fmul %st(5), %st - fxch %st(4) - faddl (%eax) - faddp %st, %st(4) - fxch %st(2) - faddl 56(%eax) - fmul %st(4), %st - fxch %st(5) - faddl 40(%eax) - fmulp %st, %st(4) - fxch %st(4) - faddl 24(%eax) - fmulp %st, %st(1) - fmul %st(3), %st - fxch %st(2) - faddl 8(%eax) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.19: - flds 8(%ebp) - lea 32(%esp), %eax - fld1 - fdiv %st(1), %st - lea 40(%esp), %edx - fstl 16(%eax) - fldl _val_16_0@GOTOFF(%ebx) - fmulp %st, %st(1) - fstl 24(%eax) - fmul %st(0), %st - fstl 32(%eax) - fmul %st(0), %st - fxch %st(1) - fstpl (%esp) - movl %eax, 8(%esp) - movl %edx, 12(%esp) - movl $-1, 16(%esp) - fstpl 40(%eax) - call __libm_sincos_k32 -..B1.20: - fldl 72(%esp) - fldl 64(%esp) - fldl _tonpi@GOTOFF(%ebx) - fmull 48(%esp) - fsqrt - fldl 40+_PP@GOTOFF(%ebx) - fmul %st(3), %st - fldl 32+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 24+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 16+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 8+_PP@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl _PP@GOTOFF(%ebx) - faddp %st, %st(1) - fldl 40+_QP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - fmull 32(%esp) - fxch %st(1) - faddl 24+_QP@GOTOFF(%ebx) - fmul %st(4), %st - fldl 32+_QP@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(1) - faddl 8+_QP@GOTOFF(%ebx) - fmulp %st, %st(4) - faddl 16+_QP@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - faddl _QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmull 56(%esp) - fmull 40(%esp) - faddp %st, %st(2) - fmulp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.21: - movl %edx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.27 -..B1.22: - testl %eax, %eax - je ..B1.28 -..B1.23: - fldz - testl $-2147483648, %edx - je ..B1.26 -..B1.25: - flds .L_2il0floatpacket.1@GOTOFF(%ebx) - fmulp %st, %st(1) -..B1.26: - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.27: - flds 8(%ebp) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.28: - fldz - fdivrs .L_2il0floatpacket.0@GOTOFF(%ebx) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type y0f,@function - .size y0f,.-y0f - .data -# -- End y0f - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x7f800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_Q1: - .long 2580172613 - .long 3216172246 - .long 1084453148 - .long 1069988811 - .long 2056290550 - .long 3213915569 - .long 1236657422 - .long 1061266913 - .long 2321867150 - .long 3202594720 - .type _Q1,@object - .size _Q1,40 - .align 4 -_Q2: - .long 4294648676 - .long 3218079743 - .long 3841535415 - .long 1066401791 - .long 664070481 - .long 3208409496 - .long 1981210199 - .long 1054621065 - .type _Q2,@object - .size _Q2,32 - .align 4 -_P1: - .long 4195291908 - .long 3162175307 - .long 406986291 - .long 1072440375 - .long 2776221165 - .long 3219095096 - .long 1133938471 - .long 1070349075 - .long 2954828429 - .long 3217879437 - .long 2763399148 - .long 1070335612 - .long 808830809 - .long 3217701246 - .long 1570268664 - .long 1070154462 - .long 3296077481 - .long 3217609508 - .long 420330990 - .long 1070118798 - .long 773510171 - .long 3217614074 - .long 4056659129 - .long 1070174592 - .long 3219431954 - .long 3217750970 - .long 3785879815 - .long 1070358232 - .long 574751405 - .long 3217779900 - .long 4260549547 - .long 1069957964 - .long 2938320462 - .long 3216782740 - .long 3378329138 - .long 1068120728 - .long 1915664650 - .long 3213929269 - .long 3426344990 - .long 1063895342 - .long 349103460 - .long 3207738231 - .long 3100907498 - .long 1072470062 - .type _P1,@object - .size _P1,176 - .align 4 -_P2: - .long 1454683265 - .long 3163093641 - .long 1453379447 - .long 3218719554 - .long 687601567 - .long 1068108233 - .long 2612704149 - .long 1068365525 - .long 3658933664 - .long 3212579183 - .long 2932711330 - .long 3210863403 - .long 1642366143 - .long 1059690534 - .long 3271323791 - .long 1057665714 - .long 1907282597 - .long 3201598976 - .long 379771377 - .long 3197347542 - .long 4245487245 - .long 3193415108 - .long 3608497393 - .long 1045674492 - .long 2931231697 - .long 3190739602 - .long 990015633 - .long 1041359383 - .long 1316300206 - .long 3186258158 - .long 3640313785 - .long 3183477336 - .long 2399178872 - .long 3182342144 - .long 1279629276 - .long 1034489495 - .long 1301829276 - .long 1074768211 - .type _P2,@object - .size _P2,152 - .align 4 -_P3: - .long 2564005090 - .long 1014927793 - .long 2691273771 - .long 1070806220 - .long 300870104 - .long 3214257910 - .long 1691761700 - .long 3215496860 - .long 2795355208 - .long 1063989012 - .long 2286168356 - .long 1063375710 - .long 3010782666 - .long 3206704598 - .long 629642940 - .long 3204978559 - .long 4085313989 - .long 1053206786 - .long 1695842824 - .long 1050888907 - .long 399213285 - .long 3194002865 - .long 3012936744 - .long 3191097259 - .long 3874678520 - .long 1039019405 - .long 2821019721 - .long 1035940102 - .long 3303481603 - .long 1075599389 - .type _P3,@object - .size _P3,120 - .align 4 -_P4: - .long 3357785889 - .long 3165432791 - .long 3430075659 - .long 3218077237 - .long 1374220014 - .long 1065943908 - .long 2803440381 - .long 1067771495 - .long 3788987270 - .long 3210752606 - .long 378839180 - .long 3210732089 - .long 3385429871 - .long 1058535500 - .long 2609792408 - .long 1057402845 - .long 2316098656 - .long 3200270393 - .long 2785606124 - .long 3198332594 - .long 1489685130 - .long 1046034133 - .long 973177683 - .long 1043605688 - .long 113866720 - .long 3186126026 - .long 1355313597 - .long 3183357512 - .long 899972440 - .long 1076130263 - .type _P4,@object - .size _P4,120 - .align 4 -_P5: - .long 1219042543 - .long 1017436670 - .long 659497129 - .long 1070330666 - .long 2213395954 - .long 3212885037 - .long 920472610 - .long 3215092907 - .long 483400048 - .long 1062596670 - .long 3012498212 - .long 1063037606 - .long 1375970636 - .long 3205547500 - .long 3836089736 - .long 3204771982 - .long 199192965 - .long 1052233910 - .long 194857414 - .long 1050781561 - .long 2407988550 - .long 3193126966 - .long 3806101946 - .long 3190982557 - .long 3164279536 - .long 1038193510 - .long 3298944842 - .long 1076541665 - .type _P5,@object - .size _P5,112 - .align 4 -_P6: - .long 4139807906 - .long 1017960487 - .long 1501500641 - .long 3217630659 - .long 2447579003 - .long 1064854100 - .long 511348540 - .long 1067492433 - .long 1810619958 - .long 3209696179 - .long 1806624601 - .long 3210355872 - .long 4035698547 - .long 1057552651 - .long 467530437 - .long 1057185016 - .long 2985801821 - .long 3199346510 - .long 2460583618 - .long 3198194818 - .long 4117830692 - .long 1045310355 - .long 1133672721 - .long 1043441078 - .long 2717688296 - .long 3185336108 - .long 1946169876 - .long 1076920380 - .type _P6,@object - .size _P6,112 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_PP: - .long 4294966288 - .long 1072693247 - .long 4269912424 - .long 3207725055 - .long 1780799603 - .long 1052554744 - .long 2285933488 - .long 3194113879 - .long 3892950982 - .long 1041746526 - .long 150212775 - .long 3184818833 - .type _PP,@object - .size _PP,48 - .align 4 -_QP: - .long 4294921804 - .long 3212836863 - .long 4153409851 - .long 1056096255 - .long 2226361937 - .long 3196916170 - .long 3849695089 - .long 1044094312 - .long 663042994 - .long 3187124278 - .long 3336948587 - .long 1035486718 - .type _QP,@object - .size _QP,48 - .data - .hidden __libm_sincos_k32 - .hidden __libm_log_k32 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0l.S deleted file mode 100644 index 7e1c5ca464..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y0l.S +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y0l.c" - .text -..TXTST0: -# -- Begin y0l - .text - .align 16,0x90 - .globl y0l -y0l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $56, %esp - fldt 8(%ebp) - lea 16(%esp), %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %edi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.6: - addl $-32, %esp - movl (%edi), %ecx - lea 64(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%edi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%edi), %ecx - movl 12(%edi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __y0q@PLT -..B1.5: - addl $28, %esp -..B1.2: - movl 32(%esp), %eax - movl %eax, (%edi) - movl 36(%esp), %edx - movl 40(%esp), %ecx - movl 44(%esp), %eax - addl $4, %esp - pushl %edi - movl %edx, 4(%edi) - movl %ecx, 8(%edi) - movl %eax, 12(%edi) - call __qtol@PLT -..B1.7: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type y0l,@function - .size y0l,.-y0l - .data -# -- End y0l - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1.S deleted file mode 100644 index 2db65d362f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1.S +++ /dev/null @@ -1,3196 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y1.c" - .text -..TXTST0: -# -- Begin __y1l - .text - .align 16,0x90 - .hidden __y1l - .globl __y1l -__y1l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $120, %esp - fldt 8(%ebp) - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - fldt 132+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jb ..B1.14 -..B1.2: - fldt _val_1_77L@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.12 -..B1.3: - fldt _S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.5 -..B1.4: - fldt _Z@GOTOFF(%ebx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt _P1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt _Q1@GOTOFF(%ebx) - fmul %st(4), %st - fldt 12+_Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 48+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 60+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 24+_Q1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt 72+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 36+_Q1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 96+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 108+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_Q1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt 120+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 132+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 60+_Q1@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 144+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fxch %st(1) - fdivrl _ones@GOTOFF(%ebx) - fldt 156+_P1@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - fldt 168+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt 180+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B1.19 -..B1.5: - fldt 12+_S@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.7 -..B1.6: - fldt 12+_Z@GOTOFF(%ebx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt _P2@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P2@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt _Q2@GOTOFF(%ebx) - fmul %st(4), %st - fldt 12+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 48+_P2@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 60+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 24+_Q2@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt 72+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_P2@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 36+_Q2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 96+_P2@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 108+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_Q2@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt 120+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 132+_P2@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt 60+_Q2@GOTOFF(%ebx) - faddp %st, %st(2) - fldt 144+_P2@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fxch %st(1) - fdivrl _ones@GOTOFF(%ebx) - fldt 156+_P2@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - fldt 168+_P2@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt 180+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B1.19 -..B1.7: - movl $2, %edx -..B1.8: - lea (,%edx,8), %ecx - lea (%ecx,%edx,4), %ecx - fldt _S@GOTOFF(%ebx,%ecx) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.11 - jp ..B1.11 -..B1.9: - incl %edx - cmpl $11, %edx - jl ..B1.8 -..B1.10: - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx -..B1.11: - fldt _Z@GOTOFF(%ecx,%ebx) - movl %edx, %eax - fsubrp %st, %st(1) - shll $4, %eax - fld %st(0) - subl %edx, %eax - shll $4, %eax - fmul %st(1), %st - fstpt 92(%esp) - fldt 92(%esp) - fldt -480+_P@GOTOFF(%eax,%ebx) - fmul %st(1), %st - fldt -468+_P@GOTOFF(%eax,%ebx) - fmul %st(2), %st - fldt -456+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -444+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -432+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -420+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -408+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -396+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -384+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -372+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -360+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -348+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -336+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -324+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -312+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -300+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -288+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -276+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt -264+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt -252+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B1.19 -..B1.12: - fldt _P0@GOTOFF(%ebx) - fld %st(1) - fmul %st(2), %st - fxch %st(2) - fld %st(2) - fmul %st(3), %st - fmul %st, %st(2) - fstpt 64(%esp) - fldt 64(%esp) - fxch %st(3) - fstpt 92(%esp) - fldt 92(%esp) - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fldt 12+_P0@GOTOFF(%ebx) - fmul %st(4), %st - fldt 24+_P0@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fldt 36+_P0@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fldt 48+_P0@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fldt 60+_P0@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fldt 72+_P0@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fldt 84+_P0@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(4) - fldt 96+_P0@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - fldt 108+_P0@GOTOFF(%ebx) - faddp %st, %st(3) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 32(%esp) - call __j1l@PLT -..B1.23: - fldt 8(%ebp) - fldt 32(%esp) -..B1.13: - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fstp %st(0) - fxch %st(1) - fstpt 48(%esp) - fstpt 32(%esp) - call logl@PLT -..B1.24: - fldt 8(%ebp) - fldt 32(%esp) - fldt 48(%esp) - fmulp %st, %st(3) - fldt _tonpi@GOTOFF(%ebx) - fldt _val_N1_0L@GOTOFF(%ebx) - fdivp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - jmp ..B1.19 -..B1.14: - fldl _ones@GOTOFF(%ebx) - lea 92(%esp), %eax - fdiv %st(1), %st - lea 64(%esp), %edx - fxch %st(1) - fxch %st(1) - fstpt -60(%eax) - fldt -60(%eax) - fxch %st(1) - fstpt (%esp) - fldt _val_36_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt -28(%eax) - fldt -28(%eax) - movl %eax, 12(%esp) - movl %edx, 16(%esp) - movl $-3, 20(%esp) - fxch %st(1) - fstpt (%eax) - fldt (%eax) - fldt _PP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _QP@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 60+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 96+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt 108+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt -44(%eax) - fldt 108+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt -12(%eax) - call __libm_sincos_pi4l -..B1.15: - fldt 8(%ebp) - fldt 80(%esp) - fldt 48(%esp) - fldt 92(%esp) - fmulp %st, %st(1) - fldt 64(%esp) - fmulp %st, %st(2) - fadd %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt _val_0_03L@GOTOFF(%ebx) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B1.17 - jp ..B1.17 -..B1.16: - fstp %st(1) - fldt _tonpi@GOTOFF(%ebx) - fldt 32(%esp) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - jmp ..B1.19 -..B1.17: - fstp %st(0) - lea 32(%esp), %edi - movl %edi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.26: - addl $-32, %esp - movl (%edi), %ecx - lea 80(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%edi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%edi), %ecx - movl 12(%edi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __y1q@PLT -..B1.25: - addl $28, %esp -..B1.18: - movl 48(%esp), %eax - movl %eax, (%edi) - movl 52(%esp), %edx - movl 56(%esp), %ecx - movl 60(%esp), %eax - addl $4, %esp - pushl %edi - movl %edx, 4(%edi) - movl %ecx, 8(%edi) - movl %eax, 12(%edi) - call __qtol@PLT -..B1.19: - addl $120, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type __y1l,@function - .size __y1l,.-__y1l - .data -# -- End __y1l - .text -# -- Begin y1 - .text - .align 16,0x90 - .globl y1 -y1: -# parameter 1: 8 + %ebp -..B2.1: -..L3: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $116, %esp -..B2.2: - fnstcw 46(%esp) -..B2.3: - movl 12(%ebp), %edx - movl %edx, %esi - andl $2147483647, %esi - call ..L4 -..L4: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L4](%ebx), %ebx - cmpl $2146435072, %esi - jge ..B2.30 -..B2.4: - xorl %eax, %eax - movl 8(%ebp), %ecx - subl %eax, %edx - jl ..B2.37 -..B2.44: - orl %ecx, %edx - je ..B2.37 -..B2.5: - movzwl 46(%esp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.36 -..B2.6: - orl $-64768, %edx - movw %dx, 44(%esp) -..B2.7: - fldcw 44(%esp) -..B2.8: - movl $1, %edi -..B2.9: - fldl 8(%ebp) - fstpt 72(%esp) - fldt 72(%esp) - fldt 132+_S@GOTOFF(%ebx) - fcompp - fnstsw %ax - sahf - jb ..B2.22 -..B2.10: - fldt _val_1_77L@GOTOFF(%ebx) - fldt 72(%esp) - fcompp - fnstsw %ax - sahf - jp ..B2.11 - jb ..B2.20 -..B2.11: - fldt _S@GOTOFF(%ebx) - fldt 72(%esp) - fcompp - fnstsw %ax - sahf - jae ..B2.13 - jp ..B2.13 -..B2.12: - fldt _Z@GOTOFF(%ebx) - fldt 72(%esp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 60(%esp) - fldt 60(%esp) - fldt _P1@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P1@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 132+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 156+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 168+_P1@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 180+_P1@GOTOFF(%ebx) - faddp %st, %st(2) - fldt _Q1@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 60+_Q1@GOTOFF(%ebx) - faddp %st, %st(1) - fdivrl _ones@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 72(%esp) - jmp ..B2.27 -..B2.13: - fldt 12+_S@GOTOFF(%ebx) - fldt 72(%esp) - fcompp - fnstsw %ax - sahf - jae ..B2.15 - jp ..B2.15 -..B2.14: - fldt 12+_Z@GOTOFF(%ebx) - fldt 72(%esp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 60(%esp) - fldt 60(%esp) - fldt _P2@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_P2@GOTOFF(%ebx) - fmul %st(2), %st - fldt 24+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 72+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 108+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 120+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 132+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 156+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 168+_P2@GOTOFF(%ebx) - faddp %st, %st(1) - fldt 180+_P2@GOTOFF(%ebx) - faddp %st, %st(2) - fldt _Q2@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 60+_Q2@GOTOFF(%ebx) - faddp %st, %st(1) - fdivrl _ones@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 72(%esp) - jmp ..B2.27 -..B2.15: - fldt 72(%esp) - movl $2, %edx -..B2.16: - lea (,%edx,8), %ecx - lea (%ecx,%edx,4), %ecx - fldt _S@GOTOFF(%ebx,%ecx) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B2.35 - jp ..B2.35 -..B2.17: - incl %edx - cmpl $11, %edx - jl ..B2.16 -..B2.18: - lea (,%edx,8), %eax - lea (%eax,%edx,4), %ecx - fstp %st(0) -..B2.19: - fldt _Z@GOTOFF(%ecx,%ebx) - movl %edx, %eax - fldt 72(%esp) - shll $4, %eax - fsubp %st, %st(1) - subl %edx, %eax - fld %st(0) - shll $4, %eax - fmul %st(1), %st - fstpt 60(%esp) - fldt 60(%esp) - fldt -480+_P@GOTOFF(%eax,%ebx) - fmul %st(1), %st - fldt -468+_P@GOTOFF(%eax,%ebx) - fmul %st(2), %st - fldt -456+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -444+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -432+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -420+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -408+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -396+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -384+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -372+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -360+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -348+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -336+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -324+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -312+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -300+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -288+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -276+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt -264+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt -252+_P@GOTOFF(%eax,%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 72(%esp) - jmp ..B2.27 -..B2.20: - fldt 72(%esp) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(1) - fstpt 60(%esp) - fldt 60(%esp) - fldt _P0@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_P0@GOTOFF(%ebx) - fmul %st(3), %st - fldt 24+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 36+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 72+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt 96+_P0@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 108+_P0@GOTOFF(%ebx) - faddp %st, %st(2) - faddp %st, %st(1) - fmul %st(1), %st - fstpt (%esp) - addl $-16, %esp - fstpt (%esp) - call __j1l@PLT -..B2.45: - fstpt 32(%esp) -..B2.21: - fldt 88(%esp) - fstpt (%esp) - call logl@PLT -..B2.46: - fldt _tonpi@GOTOFF(%ebx) - addl $16, %esp - fldt 16(%esp) - fmulp %st, %st(2) - fldt 72(%esp) - fldt (%esp) - fldt _val_N1_0L@GOTOFF(%ebx) - fdivp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 72(%esp) - jmp ..B2.27 -..B2.22: - fldl _ones@GOTOFF(%ebx) - fldt 72(%esp) - fdivr %st, %st(1) - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fldt _val_36_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 32(%esp) - fldt 32(%esp) - fxch %st(1) - fstpt 60(%esp) - fldt 60(%esp) - addl $-32, %esp - lea 92(%esp), %eax - lea 64(%esp), %edx - fxch %st(2) - fstpt (%esp) - fldt _PP@GOTOFF(%ebx) - fmul %st(1), %st - fldt 12+_PP@GOTOFF(%ebx) - movl %eax, 12(%esp) - faddp %st, %st(1) - fmul %st(1), %st - fldt _QP@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_QP@GOTOFF(%ebx) - movl %edx, 16(%esp) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PP@GOTOFF(%ebx) - movl $-3, 20(%esp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 24+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 36+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 36+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 60+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 60+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 72+_PP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 84+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 84+_QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 108+_PP@GOTOFF(%ebx) - faddp %st, %st(1) - fstpt -44(%eax) - fldt 108+_QP@GOTOFF(%ebx) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -12(%eax) - call __libm_sincos_pi4l -..B2.47: - fldt 80(%esp) - fldt 48(%esp) - addl $32, %esp -..B2.23: - fldt 60(%esp) - fmulp %st, %st(1) - fldt 32(%esp) - fmulp %st, %st(2) - fadd %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt _val_0_03L@GOTOFF(%ebx) - fmulp %st, %st(1) - fcompp - fnstsw %ax - sahf - jae ..B2.25 - jp ..B2.25 -..B2.24: - fldt _tonpi@GOTOFF(%ebx) - fldt (%esp) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - fstpt 72(%esp) - jmp ..B2.27 -..B2.25: - fstp %st(0) - addl $-16, %esp - lea 16(%esp), %esi - movl %esi, (%esp) - fldt 72(%esi) - fstpt 4(%esp) - call __ltoq@PLT -..B2.49: - addl $-16, %esp - movl (%esi), %ecx - lea 48(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%esi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%esi), %ecx - movl 12(%esi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __y1q@PLT -..B2.48: - addl $28, %esp -..B2.26: - movl 16(%esp), %eax - movl %eax, (%esi) - movl 20(%esp), %edx - movl 24(%esp), %ecx - movl 28(%esp), %eax - addl $-16, %esp - movl %edx, 4(%esi) - movl %ecx, 8(%esi) - movl %eax, 12(%esi) - movl %esi, (%esp) - call __qtol@PLT -..B2.50: - fstpt 88(%esp) - addl $16, %esp -..B2.27: - testl %edi, %edi - je ..B2.29 -..B2.28: - fldcw 46(%esp) -..B2.29: - fldt 72(%esp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.30: - andl $-2146435073, %esi - orl 8(%ebp), %esi - jne ..B2.34 -..B2.31: - testl $-2147483648, %edx - jne ..B2.41 -..B2.32: - shrl $31, %edx - fldl _zeros@GOTOFF(%ebx,%edx,8) -..B2.33: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.34: - fldl 8(%ebp) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.35: - fstp %st(0) - jmp ..B2.19 -..B2.36: - xorl %edi, %edi - jmp ..B2.9 -..B2.37: - fldl _zeros@GOTOFF(%ebx) - orl %ecx, %esi - je ..B2.39 -..B2.38: - fldl _infs@GOTOFF(%ebx) - fmulp %st, %st(1) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.39: - fldl 8+_ones@GOTOFF(%ebx) - fdivp %st, %st(1) -..B2.40: - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B2.41: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - addl $116, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type y1,@function - .size y1,.-y1 - .data -# -- End y1 - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_S: - .word 56848 - .word 49844 - .word 39532 - .word 64842 - .word 16384 - .word 0 - .word 5940 - .word 14600 - .word 60967 - .word 58048 - .word 16385 - .word 0 - .word 48233 - .word 9194 - .word 47533 - .word 41870 - .word 16386 - .word 0 - .word 19716 - .word 3898 - .word 3621 - .word 54727 - .word 16386 - .word 0 - .word 41547 - .word 400 - .word 58272 - .word 33793 - .word 16387 - .word 0 - .word 46312 - .word 65374 - .word 26362 - .word 40225 - .word 16387 - .word 0 - .word 15253 - .word 48480 - .word 38891 - .word 46657 - .word 16387 - .word 0 - .word 12158 - .word 16394 - .word 14239 - .word 53090 - .word 16387 - .word 0 - .word 31253 - .word 2914 - .word 8779 - .word 59523 - .word 16387 - .word 0 - .word 29606 - .word 9567 - .word 8455 - .word 32978 - .word 16388 - .word 0 - .word 51148 - .word 41491 - .word 50276 - .word 36194 - .word 16388 - .word 0 - .word 1224 - .word 58769 - .word 30330 - .word 39411 - .word 16388 - .word 0 - .type _S,@object - .size _S,144 - .align 2 -_val_1_77L: - .word 36700 - .word 62914 - .word 23592 - .word 57999 - .word 16383 - .word 0 - .type _val_1_77L,@object - .size _val_1_77L,12 - .align 2 -_Z: - .word 5921 - .word 65426 - .word 63142 - .word 35997 - .word 16384 - .word 0 - .word 29632 - .word 15745 - .word 62068 - .word 44479 - .word 16385 - .word 0 - .word 41288 - .word 2893 - .word 15731 - .word 35209 - .word 16386 - .word 0 - .word 12322 - .word 41360 - .word 35270 - .word 48124 - .word 16386 - .word 0 - .word 21828 - .word 62500 - .word 60486 - .word 61019 - .word 16386 - .word 0 - .word 54460 - .word 63729 - .word 58186 - .word 36952 - .word 16387 - .word 0 - .word 27250 - .word 3142 - .word 10825 - .word 43393 - .word 16387 - .word 0 - .word 20649 - .word 49414 - .word 53633 - .word 49831 - .word 16387 - .word 0 - .word 59160 - .word 26587 - .word 26484 - .word 56269 - .word 16387 - .word 0 - .word 57283 - .word 10561 - .word 16432 - .word 62706 - .word 16387 - .word 0 - .word 44243 - .word 51162 - .word 18495 - .word 34571 - .word 16388 - .word 0 - .word 63781 - .word 54231 - .word 15770 - .word 37789 - .word 16388 - .word 0 - .type _Z,@object - .size _Z,144 - .align 2 -_P1: - .word 21770 - .word 62666 - .word 46899 - .word 35378 - .word 16344 - .word 0 - .word 28454 - .word 23396 - .word 41885 - .word 48017 - .word 49112 - .word 0 - .word 61344 - .word 9332 - .word 29378 - .word 47284 - .word 49120 - .word 0 - .word 60127 - .word 25512 - .word 35054 - .word 43181 - .word 16353 - .word 0 - .word 25808 - .word 25324 - .word 9989 - .word 53047 - .word 16359 - .word 0 - .word 46582 - .word 21062 - .word 5476 - .word 44690 - .word 49126 - .word 0 - .word 61332 - .word 1419 - .word 18476 - .word 34785 - .word 49134 - .word 0 - .word 51513 - .word 63307 - .word 40855 - .word 38307 - .word 49134 - .word 0 - .word 22560 - .word 55588 - .word 5655 - .word 48627 - .word 16371 - .word 0 - .word 56966 - .word 1018 - .word 54245 - .word 62436 - .word 16372 - .word 0 - .word 17453 - .word 15035 - .word 65421 - .word 57312 - .word 49143 - .word 0 - .word 53367 - .word 52143 - .word 3664 - .word 58921 - .word 49145 - .word 0 - .word 16321 - .word 41163 - .word 52734 - .word 35978 - .word 16377 - .word 0 - .word 15288 - .word 52738 - .word 13594 - .word 53174 - .word 16380 - .word 0 - .word 42685 - .word 25071 - .word 48779 - .word 62301 - .word 16380 - .word 0 - .word 7354 - .word 8216 - .word 60720 - .word 54923 - .word 49085 - .word 0 - .type _P1,@object - .size _P1,192 - .align 2 -_Q1: - .word 64227 - .word 6706 - .word 76 - .word 58690 - .word 16369 - .word 0 - .word 8371 - .word 16695 - .word 56692 - .word 45251 - .word 16372 - .word 0 - .word 9179 - .word 20845 - .word 29706 - .word 43997 - .word 16377 - .word 0 - .word 44943 - .word 15045 - .word 18794 - .word 45614 - .word 16380 - .word 0 - .word 10671 - .word 41768 - .word 56247 - .word 64663 - .word 16381 - .word 0 - .word 25530 - .word 4231 - .word 4140 - .word 59815 - .word 16381 - .word 0 - .type _Q1,@object - .size _Q1,72 - .align 2 -_P2: - .word 42420 - .word 39002 - .word 59647 - .word 60050 - .word 16339 - .word 0 - .word 9209 - .word 30875 - .word 32003 - .word 38109 - .word 49111 - .word 0 - .word 63337 - .word 29381 - .word 46828 - .word 35859 - .word 49116 - .word 0 - .word 25340 - .word 63034 - .word 61574 - .word 39960 - .word 16351 - .word 0 - .word 21587 - .word 1531 - .word 17186 - .word 56230 - .word 16355 - .word 0 - .word 35654 - .word 56865 - .word 61897 - .word 49746 - .word 49126 - .word 0 - .word 6701 - .word 41291 - .word 18798 - .word 55141 - .word 49130 - .word 0 - .word 35596 - .word 2936 - .word 34861 - .word 35797 - .word 16365 - .word 0 - .word 59382 - .word 44988 - .word 46794 - .word 33373 - .word 16369 - .word 0 - .word 39208 - .word 51898 - .word 38063 - .word 56363 - .word 49138 - .word 0 - .word 34426 - .word 35681 - .word 546 - .word 45071 - .word 49142 - .word 0 - .word 27055 - .word 35919 - .word 19182 - .word 39238 - .word 16375 - .word 0 - .word 11379 - .word 16934 - .word 10723 - .word 57120 - .word 16378 - .word 0 - .word 30778 - .word 48366 - .word 51582 - .word 60462 - .word 49145 - .word 0 - .word 38504 - .word 65531 - .word 34807 - .word 43722 - .word 49149 - .word 0 - .word 52867 - .word 16075 - .word 29885 - .word 33161 - .word 49086 - .word 0 - .type _P2,@object - .size _P2,192 - .align 2 -_Q2: - .word 24596 - .word 8363 - .word 28671 - .word 51312 - .word 16360 - .word 0 - .word 22889 - .word 23763 - .word 37225 - .word 46345 - .word 16361 - .word 0 - .word 24119 - .word 47441 - .word 54379 - .word 48688 - .word 16372 - .word 0 - .word 1240 - .word 59184 - .word 48701 - .word 46748 - .word 16374 - .word 0 - .word 22888 - .word 65215 - .word 58633 - .word 45869 - .word 16380 - .word 0 - .word 31023 - .word 50278 - .word 49158 - .word 64237 - .word 16382 - .word 0 - .type _Q2,@object - .size _Q2,72 - .align 2 -_P: - .word 61722 - .word 43505 - .word 23994 - .word 37346 - .word 49091 - .word 0 - .word 30291 - .word 24028 - .word 22863 - .word 34750 - .word 49095 - .word 0 - .word 1126 - .word 901 - .word 35659 - .word 64778 - .word 16331 - .word 0 - .word 24961 - .word 30514 - .word 59096 - .word 39096 - .word 16335 - .word 0 - .word 35564 - .word 61687 - .word 10716 - .word 35707 - .word 49108 - .word 0 - .word 46848 - .word 13986 - .word 10777 - .word 37699 - .word 49111 - .word 0 - .word 25983 - .word 4211 - .word 22533 - .word 63008 - .word 16347 - .word 0 - .word 41622 - .word 55080 - .word 16927 - .word 53017 - .word 16350 - .word 0 - .word 59504 - .word 42891 - .word 54413 - .word 41203 - .word 49123 - .word 0 - .word 12571 - .word 13616 - .word 30559 - .word 53698 - .word 49125 - .word 0 - .word 24504 - .word 22188 - .word 22875 - .word 38390 - .word 16362 - .word 0 - .word 45455 - .word 51567 - .word 14687 - .word 35767 - .word 16364 - .word 0 - .word 2489 - .word 10124 - .word 54664 - .word 47037 - .word 49136 - .word 0 - .word 18722 - .word 39166 - .word 48910 - .word 55942 - .word 49137 - .word 0 - .word 52167 - .word 5 - .word 15467 - .word 33747 - .word 16374 - .word 0 - .word 64650 - .word 13451 - .word 38167 - .word 40566 - .word 16374 - .word 0 - .word 40279 - .word 20454 - .word 61426 - .word 45514 - .word 49146 - .word 0 - .word 34995 - .word 30989 - .word 51614 - .word 33113 - .word 49145 - .word 0 - .word 57629 - .word 30042 - .word 51710 - .word 35580 - .word 16381 - .word 0 - .word 22801 - .word 35092 - .word 8589 - .word 55177 - .word 16319 - .word 0 - .word 18213 - .word 9889 - .word 16490 - .word 42684 - .word 16323 - .word 0 - .word 35117 - .word 3709 - .word 30056 - .word 56315 - .word 16326 - .word 0 - .word 23979 - .word 26668 - .word 51699 - .word 63315 - .word 49099 - .word 0 - .word 37328 - .word 63574 - .word 8303 - .word 34466 - .word 49103 - .word 0 - .word 46391 - .word 17329 - .word 18036 - .word 35570 - .word 16340 - .word 0 - .word 30054 - .word 21312 - .word 25061 - .word 63482 - .word 16342 - .word 0 - .word 2570 - .word 34880 - .word 30954 - .word 61846 - .word 49115 - .word 0 - .word 48934 - .word 61799 - .word 17650 - .word 43599 - .word 49118 - .word 0 - .word 9996 - .word 54252 - .word 12364 - .word 40067 - .word 16355 - .word 0 - .word 26028 - .word 41231 - .word 49512 - .word 42301 - .word 16357 - .word 0 - .word 36582 - .word 15370 - .word 8472 - .word 36675 - .word 49130 - .word 0 - .word 63654 - .word 5080 - .word 49106 - .word 53579 - .word 49131 - .word 0 - .word 31057 - .word 54537 - .word 2640 - .word 43916 - .word 16368 - .word 0 - .word 21142 - .word 46896 - .word 24614 - .word 39087 - .word 16369 - .word 0 - .word 3964 - .word 40668 - .word 52365 - .word 60967 - .word 49141 - .word 0 - .word 39332 - .word 9457 - .word 22878 - .word 52919 - .word 49141 - .word 0 - .word 54210 - .word 18213 - .word 48816 - .word 39742 - .word 16378 - .word 0 - .word 59971 - .word 56061 - .word 65402 - .word 41492 - .word 16376 - .word 0 - .word 50867 - .word 29775 - .word 29962 - .word 60938 - .word 49148 - .word 0 - .word 39008 - .word 10804 - .word 60432 - .word 53771 - .word 49083 - .word 0 - .word 8797 - .word 29964 - .word 61128 - .word 42619 - .word 49091 - .word 0 - .word 49667 - .word 64253 - .word 56687 - .word 49119 - .word 49094 - .word 0 - .word 12708 - .word 20574 - .word 59517 - .word 62457 - .word 16331 - .word 0 - .word 61123 - .word 30114 - .word 53775 - .word 59072 - .word 16334 - .word 0 - .word 12480 - .word 24376 - .word 40478 - .word 34829 - .word 49108 - .word 0 - .word 31610 - .word 2541 - .word 29797 - .word 53230 - .word 49110 - .word 0 - .word 57351 - .word 51530 - .word 20151 - .word 60005 - .word 16347 - .word 0 - .word 27929 - .word 50140 - .word 46261 - .word 35597 - .word 16350 - .word 0 - .word 13266 - .word 42539 - .word 17988 - .word 38413 - .word 49123 - .word 0 - .word 60482 - .word 30188 - .word 54757 - .word 33461 - .word 49125 - .word 0 - .word 28412 - .word 55589 - .word 45206 - .word 34637 - .word 16362 - .word 0 - .word 32067 - .word 62816 - .word 60815 - .word 40858 - .word 16363 - .word 0 - .word 5401 - .word 9100 - .word 50782 - .word 40732 - .word 49136 - .word 0 - .word 54621 - .word 58390 - .word 59249 - .word 57428 - .word 49136 - .word 0 - .word 35825 - .word 1375 - .word 322 - .word 55483 - .word 16373 - .word 0 - .word 16432 - .word 16110 - .word 8852 - .word 37720 - .word 16373 - .word 0 - .word 5000 - .word 34131 - .word 51425 - .word 35608 - .word 49146 - .word 0 - .word 53929 - .word 6276 - .word 23388 - .word 58152 - .word 49143 - .word 0 - .word 51579 - .word 17004 - .word 5616 - .word 54145 - .word 16380 - .word 0 - .word 7103 - .word 16103 - .word 63732 - .word 61608 - .word 16316 - .word 0 - .word 53540 - .word 14563 - .word 28490 - .word 42103 - .word 16323 - .word 0 - .word 50538 - .word 7801 - .word 54621 - .word 42667 - .word 16326 - .word 0 - .word 21289 - .word 53272 - .word 50234 - .word 61084 - .word 49099 - .word 0 - .word 53615 - .word 53374 - .word 57363 - .word 50528 - .word 49102 - .word 0 - .word 54514 - .word 9539 - .word 36475 - .word 33817 - .word 16340 - .word 0 - .word 31658 - .word 4746 - .word 1163 - .word 44700 - .word 16342 - .word 0 - .word 52867 - .word 45166 - .word 52684 - .word 57761 - .word 49115 - .word 0 - .word 48341 - .word 5188 - .word 19803 - .word 58551 - .word 49117 - .word 0 - .word 18455 - .word 50865 - .word 10646 - .word 36603 - .word 16355 - .word 0 - .word 16819 - .word 38651 - .word 15489 - .word 53797 - .word 16356 - .word 0 - .word 57587 - .word 29612 - .word 6330 - .word 65256 - .word 49129 - .word 0 - .word 60926 - .word 53369 - .word 5356 - .word 64182 - .word 49130 - .word 0 - .word 26295 - .word 42515 - .word 37715 - .word 37910 - .word 16368 - .word 0 - .word 26848 - .word 34589 - .word 11687 - .word 44170 - .word 16368 - .word 0 - .word 52547 - .word 41404 - .word 29188 - .word 51071 - .word 49141 - .word 0 - .word 59720 - .word 37814 - .word 50864 - .word 57112 - .word 49140 - .word 0 - .word 63754 - .word 1059 - .word 28610 - .word 65011 - .word 16377 - .word 0 - .word 48135 - .word 53252 - .word 54091 - .word 43638 - .word 16375 - .word 0 - .word 14971 - .word 8471 - .word 3609 - .word 49212 - .word 49148 - .word 0 - .word 4052 - .word 57147 - .word 31484 - .word 54446 - .word 16318 - .word 0 - .word 11824 - .word 2112 - .word 5588 - .word 41288 - .word 49091 - .word 0 - .word 30937 - .word 56824 - .word 10791 - .word 37103 - .word 49094 - .word 0 - .word 13479 - .word 25038 - .word 44704 - .word 59408 - .word 16331 - .word 0 - .word 6837 - .word 41457 - .word 42451 - .word 43375 - .word 16334 - .word 0 - .word 53800 - .word 46435 - .word 51001 - .word 65352 - .word 49107 - .word 0 - .word 15811 - .word 55852 - .word 5902 - .word 37814 - .word 49110 - .word 0 - .word 19663 - .word 64639 - .word 1883 - .word 55408 - .word 16347 - .word 0 - .word 5332 - .word 44968 - .word 15414 - .word 48765 - .word 16349 - .word 0 - .word 24635 - .word 46043 - .word 59114 - .word 34832 - .word 49123 - .word 0 - .word 15088 - .word 55241 - .word 15044 - .word 44102 - .word 49124 - .word 0 - .word 6405 - .word 38383 - .word 37570 - .word 61587 - .word 16361 - .word 0 - .word 22931 - .word 45450 - .word 10147 - .word 51835 - .word 16362 - .word 0 - .word 64299 - .word 50831 - .word 27180 - .word 35495 - .word 49136 - .word 0 - .word 23200 - .word 7806 - .word 1364 - .word 35222 - .word 49136 - .word 0 - .word 45807 - .word 4679 - .word 55327 - .word 47491 - .word 16373 - .word 0 - .word 30764 - .word 65323 - .word 55387 - .word 45120 - .word 16372 - .word 0 - .word 15039 - .word 21256 - .word 11217 - .word 60156 - .word 49145 - .word 0 - .word 57173 - .word 14361 - .word 2624 - .word 34299 - .word 49143 - .word 0 - .word 56410 - .word 62508 - .word 42699 - .word 45420 - .word 16380 - .word 0 - .word 50446 - .word 42024 - .word 63781 - .word 38435 - .word 49087 - .word 0 - .word 10333 - .word 60348 - .word 17128 - .word 40300 - .word 16323 - .word 0 - .word 43838 - .word 25371 - .word 62467 - .word 64794 - .word 16325 - .word 0 - .word 26845 - .word 6377 - .word 43437 - .word 57595 - .word 49099 - .word 0 - .word 7442 - .word 5283 - .word 26036 - .word 37481 - .word 49102 - .word 0 - .word 15454 - .word 29184 - .word 54291 - .word 63010 - .word 16339 - .word 0 - .word 5297 - .word 38874 - .word 4456 - .word 64615 - .word 16341 - .word 0 - .word 12966 - .word 61910 - .word 53167 - .word 53110 - .word 49115 - .word 0 - .word 20395 - .word 4102 - .word 12283 - .word 41188 - .word 49117 - .word 0 - .word 19094 - .word 29300 - .word 12828 - .word 33187 - .word 16355 - .word 0 - .word 28120 - .word 22694 - .word 2680 - .word 36839 - .word 16356 - .word 0 - .word 25698 - .word 43431 - .word 60429 - .word 58329 - .word 49129 - .word 0 - .word 59006 - .word 57475 - .word 62067 - .word 42866 - .word 49130 - .word 0 - .word 60088 - .word 17714 - .word 44332 - .word 33435 - .word 16368 - .word 0 - .word 3844 - .word 12917 - .word 11965 - .word 57777 - .word 16367 - .word 0 - .word 17310 - .word 43236 - .word 29566 - .word 44535 - .word 49141 - .word 0 - .word 38891 - .word 11594 - .word 35001 - .word 36788 - .word 49140 - .word 0 - .word 62784 - .word 19866 - .word 27725 - .word 56232 - .word 16377 - .word 0 - .word 26552 - .word 62874 - .word 50518 - .word 55747 - .word 16374 - .word 0 - .word 41449 - .word 54733 - .word 7288 - .word 42389 - .word 49148 - .word 0 - .word 25436 - .word 16965 - .word 21076 - .word 40960 - .word 16320 - .word 0 - .word 39083 - .word 3258 - .word 61438 - .word 39229 - .word 49091 - .word 0 - .word 62602 - .word 12963 - .word 51303 - .word 56904 - .word 49093 - .word 0 - .word 41532 - .word 46799 - .word 27449 - .word 55757 - .word 16331 - .word 0 - .word 25508 - .word 35836 - .word 14539 - .word 65290 - .word 16333 - .word 0 - .word 34796 - .word 56106 - .word 58112 - .word 60724 - .word 49107 - .word 0 - .word 52331 - .word 50671 - .word 56071 - .word 55789 - .word 49109 - .word 0 - .word 50430 - .word 49256 - .word 15625 - .word 50948 - .word 16347 - .word 0 - .word 15753 - .word 56169 - .word 3376 - .word 35261 - .word 16349 - .word 0 - .word 47489 - .word 43658 - .word 29070 - .word 63380 - .word 49122 - .word 0 - .word 14447 - .word 45157 - .word 5 - .word 62576 - .word 49123 - .word 0 - .word 14392 - .word 17120 - .word 59854 - .word 55457 - .word 16361 - .word 0 - .word 2389 - .word 54610 - .word 7938 - .word 36154 - .word 16362 - .word 0 - .word 24225 - .word 54966 - .word 22944 - .word 63335 - .word 49135 - .word 0 - .word 6246 - .word 36346 - .word 2616 - .word 48455 - .word 49135 - .word 0 - .word 61678 - .word 13662 - .word 7713 - .word 42050 - .word 16373 - .word 0 - .word 4329 - .word 54820 - .word 31411 - .word 61458 - .word 16371 - .word 0 - .word 48026 - .word 57812 - .word 53661 - .word 52979 - .word 49145 - .word 0 - .word 47545 - .word 24071 - .word 10224 - .word 46463 - .word 49142 - .word 0 - .word 51405 - .word 19517 - .word 26454 - .word 39893 - .word 16380 - .word 0 - .word 2714 - .word 52847 - .word 64285 - .word 36922 - .word 49088 - .word 0 - .word 51895 - .word 36793 - .word 33802 - .word 38136 - .word 16323 - .word 0 - .word 2488 - .word 31490 - .word 30800 - .word 50300 - .word 16325 - .word 0 - .word 13623 - .word 29920 - .word 59063 - .word 53960 - .word 49099 - .word 0 - .word 4071 - .word 44015 - .word 56417 - .word 57333 - .word 49101 - .word 0 - .word 57861 - .word 52773 - .word 20389 - .word 58553 - .word 16339 - .word 0 - .word 64934 - .word 37948 - .word 51829 - .word 48662 - .word 16341 - .word 0 - .word 56954 - .word 19807 - .word 167 - .word 48948 - .word 49115 - .word 0 - .word 28104 - .word 12997 - .word 51038 - .word 61119 - .word 49116 - .word 0 - .word 3409 - .word 4305 - .word 3650 - .word 60679 - .word 16354 - .word 0 - .word 43193 - .word 24597 - .word 44129 - .word 53916 - .word 16355 - .word 0 - .word 17521 - .word 14667 - .word 10096 - .word 52923 - .word 49129 - .word 0 - .word 55445 - .word 18677 - .word 32228 - .word 61988 - .word 49129 - .word 0 - .word 19057 - .word 4855 - .word 59096 - .word 60271 - .word 16367 - .word 0 - .word 13479 - .word 55645 - .word 42570 - .word 41372 - .word 16367 - .word 0 - .word 1282 - .word 28535 - .word 31957 - .word 39927 - .word 49141 - .word 0 - .word 572 - .word 61602 - .word 36341 - .word 52326 - .word 49139 - .word 0 - .word 28923 - .word 3577 - .word 27552 - .word 50228 - .word 16377 - .word 0 - .word 55167 - .word 15365 - .word 46318 - .word 39497 - .word 16374 - .word 0 - .word 19602 - .word 36437 - .word 16591 - .word 37792 - .word 49148 - .word 0 - .word 46605 - .word 39778 - .word 56315 - .word 52295 - .word 16316 - .word 0 - .word 30298 - .word 45364 - .word 48554 - .word 37056 - .word 49091 - .word 0 - .word 36916 - .word 47157 - .word 55353 - .word 44757 - .word 49093 - .word 0 - .word 36754 - .word 52515 - .word 12207 - .word 52242 - .word 16331 - .word 0 - .word 22625 - .word 1809 - .word 14640 - .word 50749 - .word 16333 - .word 0 - .word 16563 - .word 52625 - .word 13365 - .word 56520 - .word 49107 - .word 0 - .word 27329 - .word 9102 - .word 21835 - .word 42848 - .word 49109 - .word 0 - .word 25313 - .word 26147 - .word 37973 - .word 47112 - .word 16347 - .word 0 - .word 62093 - .word 47762 - .word 2878 - .word 53553 - .word 16348 - .word 0 - .word 45304 - .word 46632 - .word 22697 - .word 58245 - .word 49122 - .word 0 - .word 52304 - .word 22429 - .word 48300 - .word 47033 - .word 49123 - .word 0 - .word 1240 - .word 8778 - .word 3434 - .word 50676 - .word 16361 - .word 0 - .word 64382 - .word 35832 - .word 24068 - .word 53872 - .word 16361 - .word 0 - .word 9372 - .word 49794 - .word 11542 - .word 57592 - .word 49135 - .word 0 - .word 29118 - .word 43193 - .word 8003 - .word 35849 - .word 49135 - .word 0 - .word 3582 - .word 16932 - .word 42429 - .word 38089 - .word 16373 - .word 0 - .word 26846 - .word 61869 - .word 11277 - .word 45246 - .word 16371 - .word 0 - .word 12490 - .word 64508 - .word 30037 - .word 47862 - .word 49145 - .word 0 - .word 36625 - .word 65383 - .word 13633 - .word 34114 - .word 49142 - .word 0 - .word 6011 - .word 54183 - .word 37651 - .word 35991 - .word 16380 - .word 0 - .word 43024 - .word 51442 - .word 35220 - .word 35244 - .word 16321 - .word 0 - .word 2338 - .word 9974 - .word 58099 - .word 36011 - .word 16323 - .word 0 - .word 54231 - .word 56678 - .word 56840 - .word 40082 - .word 16325 - .word 0 - .word 47406 - .word 57592 - .word 65286 - .word 50617 - .word 49099 - .word 0 - .word 15992 - .word 46142 - .word 20381 - .word 45257 - .word 49101 - .word 0 - .word 17722 - .word 6937 - .word 55940 - .word 54630 - .word 16339 - .word 0 - .word 44953 - .word 7303 - .word 1203 - .word 38053 - .word 16341 - .word 0 - .word 9155 - .word 41724 - .word 2745 - .word 45433 - .word 49115 - .word 0 - .word 23208 - .word 13836 - .word 51920 - .word 47377 - .word 49116 - .word 0 - .word 46053 - .word 58453 - .word 7516 - .word 56049 - .word 16354 - .word 0 - .word 51100 - .word 31216 - .word 1872 - .word 41469 - .word 16355 - .word 0 - .word 24653 - .word 32384 - .word 37643 - .word 48672 - .word 49129 - .word 0 - .word 61101 - .word 35176 - .word 37213 - .word 47362 - .word 49129 - .word 0 - .word 62301 - .word 22066 - .word 41591 - .word 55226 - .word 16367 - .word 0 - .word 37791 - .word 15476 - .word 41140 - .word 62892 - .word 16366 - .word 0 - .word 18919 - .word 33505 - .word 35758 - .word 36479 - .word 49141 - .word 0 - .word 58610 - .word 16753 - .word 52674 - .word 39626 - .word 49139 - .word 0 - .word 19653 - .word 21667 - .word 11428 - .word 45800 - .word 16377 - .word 0 - .word 51212 - .word 10491 - .word 15737 - .word 59703 - .word 16373 - .word 0 - .word 54759 - .word 31668 - .word 63308 - .word 34425 - .word 49148 - .word 0 - .word 62523 - .word 11996 - .word 50486 - .word 33912 - .word 49089 - .word 0 - .type _P,@object - .size _P,2400 - .align 2 -_P0: - .word 10891 - .word 2847 - .word 4043 - .word 50135 - .word 16324 - .word 0 - .word 8878 - .word 10523 - .word 36094 - .word 35357 - .word 49101 - .word 0 - .word 12191 - .word 2098 - .word 38631 - .word 38182 - .word 16341 - .word 0 - .word 58416 - .word 39431 - .word 6152 - .word 63591 - .word 49116 - .word 0 - .word 18600 - .word 1852 - .word 53867 - .word 39282 - .word 16356 - .word 0 - .word 37377 - .word 45824 - .word 1379 - .word 34108 - .word 49131 - .word 0 - .word 58815 - .word 28468 - .word 57342 - .word 38462 - .word 16369 - .word 0 - .word 35703 - .word 42482 - .word 52164 - .word 49581 - .word 49142 - .word 0 - .word 14326 - .word 44453 - .word 47843 - .word 56988 - .word 16378 - .word 0 - .word 21045 - .word 58852 - .word 12449 - .word 51395 - .word 49148 - .word 0 - .type _P0,@object - .size _P0,120 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .type _tonpi,@object - .size _tonpi,12 - .align 2 -_val_N1_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .type _val_N1_0L,@object - .size _val_N1_0L,12 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,12 - .align 2 -_PP: - .word 52008 - .word 23245 - .word 2457 - .word 38658 - .word 16318 - .word 0 - .word 61876 - .word 57278 - .word 25234 - .word 61346 - .word 49090 - .word 0 - .word 33834 - .word 23040 - .word 39409 - .word 49003 - .word 16327 - .word 0 - .word 54525 - .word 6554 - .word 40935 - .word 51421 - .word 49100 - .word 0 - .word 9848 - .word 9769 - .word 18248 - .word 38344 - .word 16338 - .word 0 - .word 45790 - .word 60252 - .word 47538 - .word 43957 - .word 49112 - .word 0 - .word 27022 - .word 41654 - .word 23333 - .word 43744 - .word 16351 - .word 0 - .word 12816 - .word 40723 - .word 46387 - .word 47196 - .word 49127 - .word 0 - .word 4849 - .word 19418 - .word 12136 - .word 48545 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _PP,@object - .size _PP,120 - .align 2 -_QP: - .word 65402 - .word 6822 - .word 45128 - .word 37300 - .word 49084 - .word 0 - .word 41532 - .word 52948 - .word 50360 - .word 54021 - .word 16320 - .word 0 - .word 21320 - .word 30785 - .word 26870 - .word 37955 - .word 49093 - .word 0 - .word 55382 - .word 38611 - .word 29746 - .word 34115 - .word 16330 - .word 0 - .word 37194 - .word 6554 - .word 16235 - .word 42314 - .word 49103 - .word 0 - .word 17886 - .word 15840 - .word 33918 - .word 38666 - .word 16341 - .word 0 - .word 62905 - .word 55876 - .word 18072 - .word 57284 - .word 49115 - .word 0 - .word 28423 - .word 64693 - .word 26579 - .word 40379 - .word 16355 - .word 0 - .word 40135 - .word 58793 - .word 24002 - .word 37757 - .word 49132 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16376 - .word 0 - .type _QP,@object - .size _QP,120 - .align 2 -_val_0_03L: - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .type _val_0_03L,@object - .size _val_0_03L,12 - .data - .hidden __libm_sincos_pi4l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1f.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1f.S deleted file mode 100644 index cd84d78990..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1f.S +++ /dev/null @@ -1,880 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y1f.c" - .text -..TXTST0: -# -- Begin y1f - .text - .align 16,0x90 - .globl y1f -y1f: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %ebx - subl $124, %esp - movl 8(%ebp), %edx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea -1(%edx), %eax - cmpl $2139095039, %eax - jae ..B1.19 -..B1.2: - cmpl $1100816743, %edx - jae ..B1.17 -..B1.3: - cmpl $1099170276, %edx - jae ..B1.16 -..B1.4: - cmpl $1096140558, %edx - jae ..B1.15 -..B1.5: - cmpl $1092849338, %edx - jae ..B1.14 -..B1.6: - cmpl $1088602350, %edx - jae ..B1.13 -..B1.7: - cmpl $1081952922, %edx - jae ..B1.12 -..B1.8: - cmpl $1071812444, %edx - jae ..B1.11 -..B1.9: - flds 8(%ebp) - fstl (%esp) - fstps 32(%esp) - call __libm_log_k32 -..B1.29: - flds 32(%esp) -..B1.10: - fldl _tonpi@GOTOFF(%ebx) - fmul %st, %st(2) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fdiv %st(3), %st - fldl 40+_Q1@GOTOFF(%ebx) - fmul %st(3), %st - fldl 32+_Q1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 24+_Q1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 16+_Q1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 8+_Q1@GOTOFF(%ebx) - fmul %st(3), %st - fmul %st(5), %st - fxch %st(1) - faddl _Q1@GOTOFF(%ebx) - fmul %st(5), %st - faddp %st, %st(1) - fldl 40+_Q2@GOTOFF(%ebx) - fmul %st(4), %st - fldl 32+_Q2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(1) - faddl 24+_Q2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(1) - faddl 16+_Q2@GOTOFF(%ebx) - fmulp %st, %st(5) - faddl 8+_Q2@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fxch %st(3) - faddl _Q2@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(1) - fsubrp %st, %st(2) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.11: - flds 8(%ebp) - fldl 120+_P1@GOTOFF(%ebx) - fldl 104+_P1@GOTOFF(%ebx) - fldl 112+_P1@GOTOFF(%ebx) - fldl 96+_P1@GOTOFF(%ebx) - fxch %st(4) - fsubl 128+_P1@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 88+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 72+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 56+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 40+_P1@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 24+_P1@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(2), %st - fxch %st(4) - faddl 8+_P1@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(4) - faddl 64+_P1@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 80+_P1@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 32+_P1@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 48+_P1@GOTOFF(%ebx) - fmulp %st, %st(3) - faddl _P1@GOTOFF(%ebx) - fxch %st(2) - faddl 16+_P1@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.12: - flds 8(%ebp) - fldl 104+_P2@GOTOFF(%ebx) - fldl 88+_P2@GOTOFF(%ebx) - fldl 96+_P2@GOTOFF(%ebx) - fldl 80+_P2@GOTOFF(%ebx) - fxch %st(4) - fsubl 112+_P2@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 72+_P2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 56+_P2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 40+_P2@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 24+_P2@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(2), %st - fxch %st(4) - faddl 8+_P2@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - faddl 64+_P2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 48+_P2@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 32+_P2@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(3) - faddl 16+_P2@GOTOFF(%ebx) - fmulp %st, %st(1) - fxch %st(1) - faddl _P2@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.13: - flds 8(%ebp) - fldl 96+_P3@GOTOFF(%ebx) - fldl 80+_P3@GOTOFF(%ebx) - fldl 88+_P3@GOTOFF(%ebx) - fldl 72+_P3@GOTOFF(%ebx) - fxch %st(4) - fsubl 104+_P3@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 64+_P3@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 48+_P3@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 32+_P3@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 16+_P3@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(4) - fxch %st(2) - faddl 56+_P3@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(3) - faddl _P3@GOTOFF(%ebx) - fxch %st(5) - faddl 40+_P3@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(2) - faddl 24+_P3@GOTOFF(%ebx) - fmulp %st, %st(1) - fmul %st(1), %st - fxch %st(2) - faddl 8+_P3@GOTOFF(%ebx) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.14: - flds 8(%ebp) - fldl 104+_P4@GOTOFF(%ebx) - fldl 88+_P4@GOTOFF(%ebx) - fldl 96+_P4@GOTOFF(%ebx) - fldl 80+_P4@GOTOFF(%ebx) - fxch %st(4) - fsubl 112+_P4@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 72+_P4@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 56+_P4@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 40+_P4@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 24+_P4@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(2), %st - fxch %st(4) - faddl 8+_P4@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - faddl 64+_P4@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 48+_P4@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 32+_P4@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(3) - faddl 16+_P4@GOTOFF(%ebx) - fmulp %st, %st(1) - fxch %st(1) - faddl _P4@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.15: - flds 8(%ebp) - fldl 96+_P5@GOTOFF(%ebx) - fldl 80+_P5@GOTOFF(%ebx) - fldl 88+_P5@GOTOFF(%ebx) - fldl 72+_P5@GOTOFF(%ebx) - fxch %st(4) - fsubl 104+_P5@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 64+_P5@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 48+_P5@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 32+_P5@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 16+_P5@GOTOFF(%ebx) - fmul %st(1), %st - faddp %st, %st(4) - fxch %st(2) - faddl 56+_P5@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(3) - faddl _P5@GOTOFF(%ebx) - fxch %st(5) - faddl 40+_P5@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(2) - faddl 24+_P5@GOTOFF(%ebx) - fmulp %st, %st(1) - fmul %st(1), %st - fxch %st(2) - faddl 8+_P5@GOTOFF(%ebx) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.16: - flds 8(%ebp) - fldl 104+_P6@GOTOFF(%ebx) - fldl 88+_P6@GOTOFF(%ebx) - fldl 96+_P6@GOTOFF(%ebx) - fldl 80+_P6@GOTOFF(%ebx) - fxch %st(4) - fsubl 112+_P6@GOTOFF(%ebx) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fmul %st, %st(4) - fmul %st, %st(3) - fmul %st, %st(6) - fxch %st(5) - faddl 72+_P6@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 56+_P6@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 40+_P6@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(4) - faddl 24+_P6@GOTOFF(%ebx) - fmul %st(1), %st - fmul %st(2), %st - fxch %st(4) - faddl 8+_P6@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - faddl 64+_P6@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 48+_P6@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(4) - faddl 32+_P6@GOTOFF(%ebx) - fmulp %st, %st(3) - fxch %st(3) - faddl 16+_P6@GOTOFF(%ebx) - fmulp %st, %st(1) - fxch %st(1) - faddl _P6@GOTOFF(%ebx) - faddp %st, %st(1) - faddp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.17: - flds 8(%ebp) - lea 32(%esp), %eax - fld1 - fdiv %st(1), %st - lea 40(%esp), %edx - fstl 16(%eax) - fldl _val_16_0@GOTOFF(%ebx) - fmulp %st, %st(1) - fstl 24(%eax) - fmul %st(0), %st - fstl 32(%eax) - fmul %st(0), %st - fxch %st(1) - fstpl (%esp) - movl %eax, 8(%esp) - movl %edx, 12(%esp) - movl $-3, 16(%esp) - fstpl 40(%eax) - call __libm_sincos_k32 -..B1.18: - fldl 72(%esp) - fldl 64(%esp) - fldl _tonpi@GOTOFF(%ebx) - fmull 48(%esp) - fsqrt - fldl 40+_PP@GOTOFF(%ebx) - fmul %st(3), %st - fldl 32+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 24+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 16+_PP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - faddl 8+_PP@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl _PP@GOTOFF(%ebx) - faddp %st, %st(1) - fldl 40+_QP@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(1) - fmull 32(%esp) - fxch %st(1) - faddl 24+_QP@GOTOFF(%ebx) - fmul %st(4), %st - fldl 32+_QP@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(1) - faddl 8+_QP@GOTOFF(%ebx) - fmulp %st, %st(4) - faddl 16+_QP@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - faddl _QP@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmull 56(%esp) - fmull 40(%esp) - faddp %st, %st(2) - fmulp %st, %st(1) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.19: - movl %edx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.25 -..B1.20: - testl %eax, %eax - je ..B1.26 -..B1.21: - fldz - testl $-2147483648, %edx - je ..B1.24 -..B1.23: - flds .L_2il0floatpacket.1@GOTOFF(%ebx) - fmulp %st, %st(1) -..B1.24: - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.25: - flds 8(%ebp) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret -..B1.26: - fldz - fdivrs .L_2il0floatpacket.0@GOTOFF(%ebx) - addl $124, %esp - popl %ebx - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type y1f,@function - .size y1f,.-y1f - .data -# -- End y1f - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x7f800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_Q1: - .long 330682653 - .long 3217627238 - .long 1311559603 - .long 1068225431 - .long 1711886415 - .long 3211277751 - .long 3301707240 - .long 1058195349 - .long 1381458166 - .long 3199245881 - .long 361785213 - .long 1044511851 - .type _Q1,@object - .size _Q1,48 - .align 4 -_Q2: - .long 4294700894 - .long 1071644671 - .long 4245872852 - .long 3215982591 - .long 2793978972 - .long 1063605588 - .long 1731774639 - .long 3205263755 - .long 824990963 - .long 1051113520 - .long 1573521749 - .long 3191272273 - .type _Q2,@object - .size _Q2,48 - .align 4 -_P1: - .long 3588334709 - .long 1014823416 - .long 1143617537 - .long 1071688264 - .long 543393268 - .long 3216922360 - .long 1079832790 - .long 3214987951 - .long 1415988155 - .long 3212027618 - .long 2493495630 - .long 1065248537 - .long 1666720954 - .long 3211084359 - .long 543676354 - .long 1062304274 - .long 4191589146 - .long 3208689738 - .long 2170605073 - .long 1060053158 - .long 3542706363 - .long 3206309752 - .long 3704389215 - .long 1057513307 - .long 2063423420 - .long 3203511534 - .long 3202091398 - .long 1054023270 - .long 2674374220 - .long 3198818668 - .long 2780141937 - .long 1047561374 - .long 3571446339 - .long 1073845182 - .type _P1,@object - .size _P1,136 - .align 4 -_P2: - .long 2989758108 - .long 1017408064 - .long 1458640109 - .long 3218458565 - .long 2240523794 - .long 1067453343 - .long 773815536 - .long 1068111321 - .long 2743923681 - .long 3211856434 - .long 3232814431 - .long 3210853997 - .long 2451601872 - .long 1059272649 - .long 1805313442 - .long 1057512342 - .long 1838988672 - .long 3200779931 - .long 3139341808 - .long 3198309937 - .long 844655003 - .long 1046186753 - .long 3216852589 - .long 1043859826 - .long 2659303056 - .long 3187506951 - .long 2880143704 - .long 1034033463 - .long 1317515310 - .long 1075165182 - .type _P2,@object - .size _P2,120 - .align 4 -_P3: - .long 280256326 - .long 3163962304 - .long 1070207352 - .long 1070686105 - .long 878012560 - .long 3213896505 - .long 4238571140 - .long 3215341917 - .long 3113338666 - .long 1063505618 - .long 910161668 - .long 1063287399 - .long 1478416875 - .long 3206238429 - .long 3015160168 - .long 3204904859 - .long 3974776004 - .long 1052866426 - .long 579855125 - .long 1050851686 - .long 261378128 - .long 3193590641 - .long 798233178 - .long 3191027115 - .long 1498363474 - .long 1038832298 - .long 2925619636 - .long 1075917095 - .type _P3,@object - .size _P3,112 - .align 4 -_P4: - .long 738390343 - .long 1012897491 - .long 2706267969 - .long 3217932622 - .long 4014538048 - .long 1065632415 - .long 3590329970 - .long 1067673559 - .long 671215353 - .long 3210335979 - .long 2374781669 - .long 3210593529 - .long 1890699418 - .long 1058215403 - .long 1890155166 - .long 1057321344 - .long 1713507622 - .long 3199871308 - .long 2862637523 - .long 3198281783 - .long 1122846306 - .long 1045733660 - .long 622299794 - .long 1043564297 - .long 2771483851 - .long 3185854918 - .long 1632198108 - .long 3183235242 - .long 953430534 - .long 1076330385 - .type _P4,@object - .size _P4,120 - .align 4 -_P5: - .long 342107947 - .long 1017254688 - .long 3187585117 - .long 1070231586 - .long 1823227594 - .long 3212600587 - .long 444207028 - .long 3215024921 - .long 1802122913 - .long 1062365956 - .long 1966738039 - .long 1062934367 - .long 3649894624 - .long 3205237410 - .long 1726294277 - .long 3204703097 - .long 1880085380 - .long 1051980794 - .long 1949762981 - .long 1050731607 - .long 2695921962 - .long 3192939649 - .long 1096030507 - .long 3190939319 - .long 3356663664 - .long 1038219909 - .long 2296284299 - .long 1076743037 - .type _P5,@object - .size _P5,112 - .align 4 -_P6: - .long 1104511903 - .long 3165887820 - .long 3273918356 - .long 3217557377 - .long 1767833442 - .long 1064652506 - .long 4164235278 - .long 1067433581 - .long 3499046825 - .long 3209421592 - .long 1038038689 - .long 3210276846 - .long 3702826228 - .long 1057329476 - .long 3651609877 - .long 1057129169 - .long 1779967631 - .long 3199161987 - .long 3308825176 - .long 3198147781 - .long 897891533 - .long 1045052198 - .long 2444111938 - .long 1043454098 - .long 144575532 - .long 3185257015 - .long 1701846534 - .long 3183129264 - .long 1767841339 - .long 1077021468 - .type _P6,@object - .size _P6,120 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_PP: - .long 551 - .long 1072693248 - .long 4267608614 - .long 1061027839 - .long 3690881252 - .long 3200414971 - .long 3933039373 - .long 1046848465 - .long 3246008603 - .long 3189439465 - .long 1689113401 - .long 1037483563 - .type _PP,@object - .size _PP,48 - .align 4 -_QP: - .long 4294954956 - .long 1066926079 - .long 4141388976 - .long 3204071423 - .long 1500123100 - .long 1049740228 - .long 3264213437 - .long 3191856517 - .long 1489731078 - .long 1039824630 - .long 1807021260 - .long 3183130166 - .type _QP,@object - .size _QP,48 - .data - .hidden __libm_sincos_k32 - .hidden __libm_log_k32 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1l.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1l.S deleted file mode 100644 index 74cf8a4144..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/y1l.S +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y1l.c" - .text -..TXTST0: -# -- Begin y1l - .text - .align 16,0x90 - .globl y1l -y1l: -# parameter 1: 8 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $56, %esp - fldt 8(%ebp) - lea 16(%esp), %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %edi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.6: - addl $-32, %esp - movl (%edi), %ecx - lea 64(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl 4(%edi), %edx - movl %ecx, (%eax) - movl %edx, 4(%eax) - movl 8(%edi), %ecx - movl 12(%edi), %edx - movl %ecx, 8(%eax) - movl %edx, 12(%eax) - call __y1q@PLT -..B1.5: - addl $28, %esp -..B1.2: - movl 32(%esp), %eax - movl %eax, (%edi) - movl 36(%esp), %edx - movl 40(%esp), %ecx - movl 44(%esp), %eax - addl $4, %esp - pushl %edi - movl %edx, 4(%edi) - movl %ecx, 8(%edi) - movl %eax, 12(%edi) - call __qtol@PLT -..B1.7: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type y1l,@function - .size y1l,.-y1l - .data -# -- End y1l - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/yn.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/yn.S deleted file mode 100644 index c5c9742f6e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/yn.S +++ /dev/null @@ -1,1341 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "yn.c" - .text -..TXTST0: -# -- Begin yn - .text - .align 16,0x90 - .globl yn -yn: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - movl 8(%ebp), %edx -..B1.2: - fnstcw 70(%esp) -..B1.3: - movzwl 18(%ebp), %ecx - andl $32752, %ecx - shrl $4, %ecx - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - cmpl $2047, %ecx - je ..B1.69 -..B1.4: - fldl 12(%ebp) - fldl _zeros@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jb ..B1.8 -..B1.5: - fxch %st(1) - fucomp %st(1) - fnstsw %ax - sahf - jp ..B1.6 - je ..B1.44 -..B1.6: - fldl _infs@GOTOFF(%ebx) - fmulp %st, %st(1) -..B1.7: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.8: - fstp %st(0) - testl %edx, %edx - je ..B1.43 -..B1.9: - jl ..B1.11 -..B1.10: - movl $1, %edi - jmp ..B1.12 -..B1.11: - negl %edx - movl %edx, %eax - notl %eax - andl $1, %eax - lea -1(%eax,%eax), %edi -..B1.12: - cmpl $1, %edx - je ..B1.58 -..B1.13: - movl %edx, %eax - sarl $5, %eax - cmpl $160, %eax - jg ..B1.15 -..B1.14: - fldl XINF@GOTOFF(%ebx,%eax,8) - jmp ..B1.16 -..B1.15: - lea -640(,%eax,4), %eax - lea (,%eax,8), %ecx - subl %eax, %ecx - movl %ecx, (%esp) - fildl (%esp) - faddl .L_2il0floatpacket.0@GOTOFF(%ebx) -..B1.16: - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.42 -..B1.17: - movzwl 70(%esp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.57 -..B1.18: - fstp %st(0) - orl $-64768, %ecx - movw %cx, 68(%esp) -..B1.19: - fldcw 68(%esp) -..B1.20: - fldl 12(%ebp) - movl $1, %esi -..B1.21: - fldt _val_20_0L@GOTOFF(%ebx) - fldt _val_1000_0L@GOTOFF(%ebx) - movl %edx, (%esp) - fildl (%esp) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fcomp %st(2) - fnstsw %ax - sahf - ja ..B1.46 -..B1.22: - fldt _val_4_0L@GOTOFF(%ebx) - movl $-1, %eax - fstpt 144(%esp) - fldt 144(%esp) - fld %st(1) - fmulp %st, %st(1) - xorl %ecx, %ecx - fmulp %st, %st(1) - movl %ebx, 28(%esp) - fstpt 192(%esp) - fldt 192(%esp) - fxch %st(1) - fstl 104(%esp) - fldt _val_8_0L@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpt 176(%esp) - fldt 176(%esp) - fldt _val_p1_0L@GOTOFF(%ebx) - fstpt (%esp) - fldt (%esp) - fstpt 112(%esp) - fldt _val_n1_0L@GOTOFF(%ebx) - faddp %st, %st(2) - fdivrp %st, %st(1) - fstpt 72(%esp) - fldt 72(%esp) - fldt _val_2_0L@GOTOFF(%ebx) - fstpt 48(%esp) - fldt 48(%esp) - fstpt 160(%esp) - fldt _val_3_0L@GOTOFF(%ebx) - fstpt 32(%esp) - fldt 32(%esp) - fstpt 128(%esp) - fldt _val_5_0L@GOTOFF(%ebx) - fstpt 16(%esp) - fldt _val_0_0L@GOTOFF(%ebx) - movl %eax, %ebx - fstpt 88(%esp) - fldt 16(%esp) - fldt 128(%esp) - fldt 32(%esp) - fldt 48(%esp) - fldt (%esp) -..B1.23: - fldt 192(%esp) - fld %st(4) - fmul %st(5), %st - testl %ebx, %ebx - fsubr %st(1), %st - fxch %st(5) - fstpt 128(%esp) - fxch %st(2) - fstpt 48(%esp) - fldt 48(%esp) - fxch %st(1) - fstpt 16(%esp) - fldt 16(%esp) - fstpt 32(%esp) - fldt 32(%esp) - fldt 176(%esp) - fmul %st, %st(2) - fxch %st(2) - fdivrp %st, %st(5) - fxch %st(6) - fmulp %st, %st(4) - fld %st(4) - fmul %st(5), %st - fsubrp %st, %st(2) - fmul %st(2), %st - fdivrp %st, %st(1) - fmul %st(2), %st - fldt 128(%esp) - fldt 48(%esp) - jle ..B1.25 -..B1.24: - fldt 72(%esp) - fadd %st(3), %st - fstpt 72(%esp) - fxch %st(4) - faddp %st, %st(6) - jmp ..B1.26 -..B1.25: - fldt 72(%esp) - fsub %st(3), %st - fstpt 72(%esp) - fxch %st(4) - fsubrp %st, %st(6) -..B1.26: - fldt 160(%esp) - fadd %st, %st(4) - faddp %st, %st(3) - fld %st(1) - fdiv %st(6), %st - fldt 144(%esp) - fadd %st, %st(2) - faddp %st, %st(6) - fldt 88(%esp) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.29 -..B1.27: - fchs -..B1.29: - fldt 112(%esp) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.31 -..B1.30: - fstpt 112(%esp) - movl $1, %ecx - jmp ..B1.32 -..B1.31: - fstp %st(0) - testl %ecx, %ecx - jne ..B1.45 -..B1.32: - fldt 16(%esp) - negl %ebx - fucomp %st(6) - fnstsw %ax - sahf - fxch %st(3) - fxch %st(1) - fxch %st(5) - jne ..B1.23 - jp ..B1.23 -..B1.33: - fstp %st(2) - fstp %st(3) - fstp %st(2) - fstp %st(0) - fldt 32(%esp) - movl 28(%esp), %ebx - fstpt 12(%esp) - fstpt (%esp) - fstpt 56(%esp) - fldl 104(%esp) -..B1.34: - addl $-32, %esp - addl %edx, %edx - negl %edx - lea 44(%esp), %eax - decl %edx - lea 88(%esp), %ecx - fstpt (%esp) - fldt (%esp) - movl %eax, 12(%esp) - movl %ecx, 16(%esp) - movl %edx, 20(%esp) - fstpl 92(%eax) - call __libm_sincos_pi4l -..B1.78: - fldl 136(%esp) - addl $32, %esp -..B1.35: - fldt _tonpi@GOTOFF(%ebx) - fdivp %st, %st(1) - fsqrt - fldt 12(%esp) - fldt (%esp) - fmulp %st, %st(1) - fldt 56(%esp) - fldt 72(%esp) - fmulp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 12(%esp) -..B1.36: - testl %esi, %esi - je ..B1.38 -..B1.37: - fldcw 70(%esp) -..B1.38: - fldt 12(%esp) - testl %edi, %edi - jge ..B1.41 -..B1.40: - fchs -..B1.41: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.42: - fstp %st(0) - movzbl 19(%ebp), %eax - andl $128, %eax - shrl $7, %eax - fldl _large_value_64@GOTOFF(%ebx,%eax,8) - fmull _large_value_64@GOTOFF(%ebx) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.43: - addl $-16, %esp - fstpl (%esp) - call y0@PLT -..B1.79: - addl $260, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.44: - fldl 8+_ones@GOTOFF(%ebx) - fdivp %st, %st(1) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.45: - fstp %st(2) - fstp %st(3) - fstp %st(1) - fstp %st(0) - fldt 32(%esp) - movl 28(%esp), %ebx - fstpt 12(%esp) - fxch %st(1) - fstpt (%esp) - fstpt 56(%esp) - fldl 104(%esp) - jmp ..B1.34 -..B1.46: - fstp %st(0) - fldt _val_36_0L@GOTOFF(%ebx) - fcom %st(1) - fnstsw %ax - sahf - jbe ..B1.50 -..B1.47: - fstp %st(0) - addl $-16, %esp - fstpt (%esp) - fldt (%esp) - fstpl 120(%esp) - movl %edx, 52(%esp) - call __y0l@PLT -..B1.80: - fldl 120(%esp) - movl 52(%esp), %edx - addl $16, %esp -..B1.48: - fxch %st(1) - fstpt 56(%esp) - addl $-16, %esp - fstpt (%esp) - fldt (%esp) - fstpl 120(%esp) - movl %edx, 52(%esp) - call __y1l@PLT -..B1.81: - fldl 120(%esp) - movl 52(%esp), %edx - addl $16, %esp -..B1.49: - fxch %st(1) - jmp ..B1.52 -..B1.50: - fldl _ones@GOTOFF(%ebx) - fdiv %st(2), %st - fmul %st, %st(1) - fld %st(1) - fmul %st(2), %st - fstpt 12(%esp) - fldt 12(%esp) - fxch %st(1) - fstpt 24(%esp) - fxch %st(1) - fstpt (%esp) - fldt (%esp) - fldt _PP0@GOTOFF(%ebx) - fmul %st(2), %st - fldt 12+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(2), %st - fldt _PP1@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 24+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 36+_PP0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 48+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 60+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 48+_PP1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 60+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 72+_PP0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 84+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 96+_PP0@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 84+_PP1@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt 96+_PP1@GOTOFF(%ebx) - faddp %st, %st(1) - fmul %st(3), %st - fldt 108+_PP0@GOTOFF(%ebx) - faddp %st, %st(2) - fxch %st(1) - fstpt 40(%esp) - addl $-32, %esp - lea 32(%esp), %eax - lea 44(%esp), %ecx - fxch %st(3) - fstpt (%esp) - fldt (%esp) - fldt 108+_PP1@GOTOFF(%ebx) - movl %eax, 12(%esp) - faddp %st, %st(4) - fldt _QP0@GOTOFF(%ebx) - fmul %st(3), %st - fldt 12+_QP0@GOTOFF(%ebx) - movl %ecx, 16(%esp) - faddp %st, %st(1) - fmul %st(3), %st - fldt _QP1@GOTOFF(%ebx) - fmul %st(4), %st - fldt 12+_QP1@GOTOFF(%ebx) - movl $-1, 20(%esp) - faddp %st, %st(1) - fmul %st(4), %st - fxch %st(5) - fstpt 88(%eax) - fxch %st(1) - fstpl 104(%eax) - fldt 24+_QP0@GOTOFF(%ebx) - movl %edx, 36(%eax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 24+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fldt 36+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 48+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 60+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 72+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 84+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fmul %st, %st(3) - fldt 96+_QP1@GOTOFF(%ebx) - faddp %st, %st(4) - fldt 36+_QP0@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 48+_QP0@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 60+_QP0@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 72+_QP0@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 84+_QP0@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt 96+_QP0@GOTOFF(%ebx) - faddp %st, %st(3) - fmul %st, %st(2) - fmulp %st, %st(3) - fldt 108+_QP0@GOTOFF(%ebx) - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fstpt 56(%eax) - fldt 108+_QP1@GOTOFF(%ebx) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 72(%eax) - call __libm_sincos_pi4l -..B1.82: - fldl 136(%esp) - fldt 120(%esp) - fldt 104(%esp) - fldt 88(%esp) - movl 68(%esp), %edx - addl $32, %esp -..B1.51: - fldt _tonpi@GOTOFF(%ebx) - fldt 24(%esp) - fmulp %st, %st(1) - fsqrt - fldt (%esp) - fldt 12(%esp) - fmul %st, %st(3) - fmulp %st, %st(5) - fldt 40(%esp) - fmul %st(1), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fstpt 56(%esp) - fmulp %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fmulp %st, %st(1) -..B1.52: - fldt _val_2_0L@GOTOFF(%ebx) - cmpl $1, %edx - fld %st(0) - jle ..B1.56 -..B1.53: - fldt 56(%esp) - decl %edx - xorl %eax, %eax -..B1.54: - fld %st(1) - incl %eax - fdiv %st(5), %st - cmpl %edx, %eax - fmul %st(4), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(2) - fsubp %st, %st(1) - fld %st(3) - jae ..B1.55 -..B1.84: - fstp %st(4) - fxch %st(3) - jmp ..B1.54 -..B1.55: - fstp %st(5) - fstp %st(4) - fstp %st(0) - fstp %st(0) - fxch %st(1) - fstpt 12(%esp) - fstpt 56(%esp) - jmp ..B1.36 -..B1.56: - fstp %st(3) - fstp %st(2) - fstp %st(1) - fstpt 12(%esp) - jmp ..B1.36 -..B1.57: - xorl %esi, %esi - jmp ..B1.21 -..B1.58: - testl %ecx, %ecx - jne ..B1.65 -..B1.59: - testl $1048575, 16(%ebp) - jne ..B1.65 -..B1.60: - cmpl $1, 12(%ebp) - jne ..B1.65 -..B1.61: - fstp %st(0) - fldl _large_value_64@GOTOFF(%ebx) - testl %edi, %edi - jl ..B1.63 -..B1.62: - fldl 8+_large_value_64@GOTOFF(%ebx) - fmulp %st, %st(1) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.63: - fld %st(0) - fmulp %st, %st(1) -..B1.64: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.65: - addl $-16, %esp - fstpl (%esp) - call y1@PLT -..B1.83: - addl $16, %esp - testl %edi, %edi - jge ..B1.68 -..B1.67: - fchs -..B1.68: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.69: - testl $1048575, 16(%ebp) - jne ..B1.74 -..B1.70: - cmpl $0, 12(%ebp) - jne ..B1.74 -..B1.71: - movzbl 19(%ebp), %eax - testl $128, %eax - jne ..B1.75 -..B1.72: - movl %edx, %eax - shrl $31, %eax - andl %edx, %eax - fldl _zeros@GOTOFF(%ebx,%eax,8) -..B1.73: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.74: - fldl 12(%ebp) - fmull _ones@GOTOFF(%ebx) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.75: - fldl _infs@GOTOFF(%ebx) - fmull _zeros@GOTOFF(%ebx) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type yn,@function - .size yn,.-yn - .data -# -- End yn - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x40adc000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -XINF: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x33333333,0x3fd33333 - .long 0xcccccccd,0x3ff4cccc - .long 0x33333333,0x400b3333 - .long 0x33333333,0x401b3333 - .long 0x33333333,0x40273333 - .long 0xcccccccd,0x4031cccc - .long 0x66666666,0x40396666 - .long 0x9999999a,0x40411999 - .long 0x9999999a,0x40461999 - .long 0x66666666,0x404ba666 - .long 0x9999999a,0x4050d999 - .long 0x00000000,0x40542000 - .long 0x33333333,0x40579333 - .long 0x9999999a,0x405b3999 - .long 0x00000000,0x405f0000 - .long 0x00000000,0x40618000 - .long 0x00000000,0x40638000 - .long 0x00000000,0x4065a000 - .long 0x00000000,0x4067e000 - .long 0x00000000,0x406a2000 - .long 0x00000000,0x406c8000 - .long 0x00000000,0x406ee000 - .long 0x00000000,0x4070a000 - .long 0x00000000,0x4071e000 - .long 0x00000000,0x40732000 - .long 0x00000000,0x40746000 - .long 0x00000000,0x4075b000 - .long 0x00000000,0x40770000 - .long 0x00000000,0x40785000 - .long 0x00000000,0x4079a000 - .long 0x00000000,0x407b0000 - .long 0x00000000,0x407c6000 - .long 0x00000000,0x407dc000 - .long 0x00000000,0x407f3000 - .long 0x00000000,0x40804800 - .long 0x00000000,0x40810000 - .long 0x00000000,0x4081b800 - .long 0x00000000,0x40827000 - .long 0x00000000,0x40832800 - .long 0x00000000,0x4083e000 - .long 0x00000000,0x4084a000 - .long 0x00000000,0x40856000 - .long 0x00000000,0x40861800 - .long 0x00000000,0x4086d800 - .long 0x00000000,0x4087a000 - .long 0x00000000,0x40886000 - .long 0x00000000,0x40892000 - .long 0x00000000,0x4089e800 - .long 0x00000000,0x408aa800 - .long 0x00000000,0x408b7000 - .long 0x00000000,0x408c3000 - .long 0x00000000,0x408cf800 - .long 0x00000000,0x408dc000 - .long 0x00000000,0x408e8800 - .long 0x00000000,0x408f5800 - .long 0x00000000,0x40901000 - .long 0x00000000,0x40907400 - .long 0x00000000,0x4090d800 - .long 0x00000000,0x40914000 - .long 0x00000000,0x4091a800 - .long 0x00000000,0x40920c00 - .long 0x00000000,0x40927400 - .long 0x00000000,0x4092dc00 - .long 0x00000000,0x40934400 - .long 0x00000000,0x4093a800 - .long 0x00000000,0x40941000 - .long 0x00000000,0x40947800 - .long 0x00000000,0x4094e400 - .long 0x00000000,0x40954c00 - .long 0x00000000,0x4095b400 - .long 0x00000000,0x40961c00 - .long 0x00000000,0x40968800 - .long 0x00000000,0x4096f000 - .long 0x00000000,0x40975c00 - .long 0x00000000,0x4097c400 - .long 0x00000000,0x40983000 - .long 0x00000000,0x40989800 - .long 0x00000000,0x40990400 - .long 0x00000000,0x40997000 - .long 0x00000000,0x4099d800 - .long 0x00000000,0x409a4400 - .long 0x00000000,0x409ab000 - .long 0x00000000,0x409b1c00 - .long 0x00000000,0x409b8800 - .long 0x00000000,0x409bf400 - .long 0x00000000,0x409c6000 - .long 0x00000000,0x409ccc00 - .long 0x00000000,0x409d3800 - .long 0x00000000,0x409da400 - .long 0x00000000,0x409e1000 - .long 0x00000000,0x409e8000 - .long 0x00000000,0x409eec00 - .long 0x00000000,0x409f5800 - .long 0x00000000,0x409fc800 - .long 0x00000000,0x40a01a00 - .long 0x00000000,0x40a05000 - .long 0x00000000,0x40a08800 - .long 0x00000000,0x40a0be00 - .long 0x00000000,0x40a0f600 - .long 0x00000000,0x40a12c00 - .long 0x00000000,0x40a16400 - .long 0x00000000,0x40a19a00 - .long 0x00000000,0x40a1d200 - .long 0x00000000,0x40a20a00 - .long 0x00000000,0x40a24000 - .long 0x00000000,0x40a27800 - .long 0x00000000,0x40a2b000 - .long 0x00000000,0x40a2e800 - .long 0x00000000,0x40a31e00 - .long 0x00000000,0x40a35600 - .long 0x00000000,0x40a38e00 - .long 0x00000000,0x40a3c600 - .long 0x00000000,0x40a3fe00 - .long 0x00000000,0x40a43600 - .long 0x00000000,0x40a46e00 - .long 0x00000000,0x40a4a600 - .long 0x00000000,0x40a4de00 - .long 0x00000000,0x40a51600 - .long 0x00000000,0x40a54e00 - .long 0x00000000,0x40a58600 - .long 0x00000000,0x40a5be00 - .long 0x00000000,0x40a5f600 - .long 0x00000000,0x40a62e00 - .long 0x00000000,0x40a66600 - .long 0x00000000,0x40a6a000 - .long 0x00000000,0x40a6d800 - .long 0x00000000,0x40a71000 - .long 0x00000000,0x40a74800 - .long 0x00000000,0x40a78200 - .long 0x00000000,0x40a7ba00 - .long 0x00000000,0x40a7f200 - .long 0x00000000,0x40a82c00 - .long 0x00000000,0x40a86400 - .long 0x00000000,0x40a89c00 - .long 0x00000000,0x40a8d600 - .long 0x00000000,0x40a90e00 - .long 0x00000000,0x40a94600 - .long 0x00000000,0x40a98000 - .long 0x00000000,0x40a9b800 - .long 0x00000000,0x40a9f200 - .long 0x00000000,0x40aa2a00 - .long 0x00000000,0x40aa6400 - .long 0x00000000,0x40aa9c00 - .long 0x00000000,0x40aad600 - .long 0x00000000,0x40ab1000 - .long 0x00000000,0x40ab4800 - .long 0x00000000,0x40ab8200 - .long 0x00000000,0x40abba00 - .long 0x00000000,0x40abf400 - .long 0x00000000,0x40ac2e00 - .long 0x00000000,0x40ac6600 - .long 0x00000000,0x40aca000 - .long 0x00000000,0x40acda00 - .long 0x00000000,0x40ad1200 - .long 0x00000000,0x40ad4c00 - .long 0x00000000,0x40ad8600 - .long 0x00000000,0x40adc000 - .type XINF,@object - .size XINF,1288 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_val_20_0L: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16387 - .word 0 - .type _val_20_0L,@object - .size _val_20_0L,12 - .align 2 -_val_1000_0L: - .word 0 - .word 0 - .word 0 - .word 64000 - .word 16392 - .word 0 - .type _val_1000_0L,@object - .size _val_1000_0L,12 - .align 2 -_val_4_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16385 - .word 0 - .type _val_4_0L,@object - .size _val_4_0L,12 - .align 2 -_val_8_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16386 - .word 0 - .type _val_8_0L,@object - .size _val_8_0L,12 - .align 2 -_val_p1_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _val_p1_0L,@object - .size _val_p1_0L,12 - .align 2 -_val_n1_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .type _val_n1_0L,@object - .size _val_n1_0L,12 - .align 2 -_val_2_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .type _val_2_0L,@object - .size _val_2_0L,12 - .align 2 -_val_3_0L: - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .type _val_3_0L,@object - .size _val_3_0L,12 - .align 2 -_val_5_0L: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16385 - .word 0 - .type _val_5_0L,@object - .size _val_5_0L,12 - .align 2 -_val_0_0L: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _val_0_0L,@object - .size _val_0_0L,12 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .type _tonpi,@object - .size _tonpi,12 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,12 - .align 2 -_PP0: - .word 3555 - .word 4199 - .word 61716 - .word 36505 - .word 49086 - .word 0 - .word 21640 - .word 56203 - .word 47336 - .word 57608 - .word 16322 - .word 0 - .word 3059 - .word 27554 - .word 42044 - .word 45622 - .word 49095 - .word 0 - .word 55815 - .word 35656 - .word 54748 - .word 47307 - .word 16332 - .word 0 - .word 42025 - .word 6728 - .word 28939 - .word 34692 - .word 49106 - .word 0 - .word 58943 - .word 11189 - .word 14960 - .word 38786 - .word 16344 - .word 0 - .word 43526 - .word 20005 - .word 29826 - .word 37014 - .word 49119 - .word 0 - .word 58976 - .word 17109 - .word 36079 - .word 36708 - .word 16359 - .word 0 - .word 58243 - .word 36408 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _PP0,@object - .size _PP0,120 - .align 2 -_PP1: - .word 52008 - .word 23245 - .word 2457 - .word 38658 - .word 16318 - .word 0 - .word 61876 - .word 57278 - .word 25234 - .word 61346 - .word 49090 - .word 0 - .word 33834 - .word 23040 - .word 39409 - .word 49003 - .word 16327 - .word 0 - .word 54525 - .word 6554 - .word 40935 - .word 51421 - .word 49100 - .word 0 - .word 9848 - .word 9769 - .word 18248 - .word 38344 - .word 16338 - .word 0 - .word 45790 - .word 60252 - .word 47538 - .word 43957 - .word 49112 - .word 0 - .word 27022 - .word 41654 - .word 23333 - .word 43744 - .word 16351 - .word 0 - .word 12816 - .word 40723 - .word 46387 - .word 47196 - .word 49127 - .word 0 - .word 4849 - .word 19418 - .word 12136 - .word 48545 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .type _PP1,@object - .size _PP1,120 - .align 2 -_QP0: - .word 30466 - .word 14887 - .word 33885 - .word 35327 - .word 16316 - .word 0 - .word 41139 - .word 65374 - .word 59488 - .word 50915 - .word 49088 - .word 0 - .word 35675 - .word 30946 - .word 22284 - .word 35505 - .word 16325 - .word 0 - .word 65216 - .word 29458 - .word 42913 - .word 63176 - .word 49097 - .word 0 - .word 5130 - .word 24339 - .word 48915 - .word 38634 - .word 16335 - .word 0 - .word 30040 - .word 27658 - .word 23448 - .word 34596 - .word 49109 - .word 0 - .word 37816 - .word 17431 - .word 24401 - .word 49646 - .word 16347 - .word 0 - .word 4377 - .word 35057 - .word 45578 - .word 33037 - .word 49123 - .word 0 - .word 19863 - .word 65266 - .word 6202 - .word 53939 - .word 16363 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 49142 - .word 0 - .type _QP0,@object - .size _QP0,120 - .align 2 -_QP1: - .word 65402 - .word 6822 - .word 45128 - .word 37300 - .word 49084 - .word 0 - .word 41532 - .word 52948 - .word 50360 - .word 54021 - .word 16320 - .word 0 - .word 21320 - .word 30785 - .word 26870 - .word 37955 - .word 49093 - .word 0 - .word 55382 - .word 38611 - .word 29746 - .word 34115 - .word 16330 - .word 0 - .word 37194 - .word 6554 - .word 16235 - .word 42314 - .word 49103 - .word 0 - .word 17886 - .word 15840 - .word 33918 - .word 38666 - .word 16341 - .word 0 - .word 62905 - .word 55876 - .word 18072 - .word 57284 - .word 49115 - .word 0 - .word 28423 - .word 64693 - .word 26579 - .word 40379 - .word 16355 - .word 0 - .word 40135 - .word 58793 - .word 24002 - .word 37757 - .word 49132 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16376 - .word 0 - .type _QP1,@object - .size _QP1,120 - .data - .hidden __libm_sincos_pi4l - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ynf.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ynf.S deleted file mode 100644 index 1aae4059b3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ynf.S +++ /dev/null @@ -1,1442 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ynf.c" - .text -..TXTST0: -# -- Begin ynf - .text - .align 16,0x90 - .globl ynf -ynf: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %esi - pushl %edi - pushl %ebx - subl $244, %esp - fldz - movl 12(%ebp), %ecx - movl 8(%ebp), %esi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - lea -1(%ecx), %edx - cmpl $2139095039, %edx - jae ..B1.51 -..B1.2: - testl %esi, %esi - je ..B1.66 -..B1.3: - movl %ecx, %edi - movl %esi, %eax - xorl %esi, %edi - cltd - shrl $31, %edi - andl %esi, %edi - xorl %edx, %esi - subl %edx, %esi - cmpl $1, %esi - je ..B1.61 -..B1.4: - movl %esi, %eax - sarl $3, %eax - cmpl $320, %eax - jg ..B1.6 -..B1.5: - flds function_zeros@GOTOFF(%ebx,%eax,4) - jmp ..B1.7 -..B1.6: - fldt .L_2il0floatpacket.0@GOTOFF(%ebx) - lea -320(%eax), %edx - lea -2560(,%eax,8), %eax - subl %edx, %eax - movl %eax, 192(%esp) - fildl 192(%esp) - fstps 192(%esp) - flds 192(%esp) - faddp %st, %st(1) - fstps 192(%esp) - flds 192(%esp) -..B1.7: - flds 12(%ebp) - fxch %st(1) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.50 -..B1.8: - cmpl $6, %esi - jge ..B1.23 -..B1.9: - fldl _val_0_6@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jb ..B1.24 -..B1.10: - fldl _val_2_0@GOTOFF(%ebx) - fld %st(1) - fdiv %st(1), %st - testl %esi, %esi - fstpl 200(%esp) - fdiv %st(1), %st - fldl 200(%esp) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - flds _ones@GOTOFF(%ebx) - fstpt 32(%esp) - fldt 32(%esp) - fld %st(0) - fxch %st(1) - fstpt 96(%esp) - fldt 96(%esp) - fld %st(0) - flds _zeros@GOTOFF(%ebx) - jle ..B1.57 -..B1.11: - fstp %st(7) - fxch %st(4) - fstpt 112(%esp) - xorl %edx, %edx - fxch %st(2) - fstpt 48(%esp) - fxch %st(3) - fstps 44(%esp) - fldt 96(%esp) - fldt 32(%esp) -..B1.12: - fldt 112(%esp) - incl %edx - fmulp %st, %st(5) - cmpl %esi, %edx - fxch %st(4) - fstpl 200(%esp) - fld %st(3) - fxch %st(3) - fmul %st, %st(4) - fldl 200(%esp) - fldt 48(%esp) - fmulp %st, %st(3) - fxch %st(2) - fstpl 200(%esp) - fld %st(2) - fdiv %st(1), %st - faddp %st, %st(6) - fadd %st(2), %st - fldl 200(%esp) - fxch %st(5) - fstpl 200(%esp) - fldl 200(%esp) - fxch %st(6) - fstpl 200(%esp) - fldl 200(%esp) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - jae ..B1.13 -..B1.77: - fstp %st(4) - fxch %st(5) - fxch %st(4) - fxch %st(1) - fxch %st(4) - jmp ..B1.12 -..B1.13: - fstp %st(0) - flds 44(%esp) - fxch %st(5) - fstpt 96(%esp) - fxch %st(5) - fstpt 32(%esp) - fldt 112(%esp) - fxch %st(3) - fxch %st(5) - fxch %st(2) -..B1.14: - fldl _TWO_19H@GOTOFF(%ebx) - fld %st(3) - fxch %st(5) - fmul %st(0), %st - xorl %ecx, %ecx - fchs - movl %esi, %edx - fstpl 200(%esp) - fxch %st(1) - fstl 168(%esp) - fxch %st(3) - fstl 184(%esp) - fxch %st(2) - fstpt 48(%esp) - fxch %st(4) - fstps 44(%esp) - fldl 200(%esp) -..B1.15: - incl %ecx - incl %edx - movl %ecx, %eax - imull %edx, %eax - movl %eax, 192(%esp) - lea (%esi,%ecx,2), %eax - fildl 192(%esp) - fstps 192(%esp) - flds 192(%esp) - fdivrs _ones@GOTOFF(%ebx) - movl %eax, 192(%esp) - fstpl 200(%esp) - fldl 200(%esp) - fildl 192(%esp) - fstpl 200(%esp) - fldl 200(%esp) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(4) - fstpl 200(%esp) - fldl 200(%esp) - fldl 168(%esp) - fmul %st(2), %st - fmulp %st, %st(5) - fxch %st(4) - fstpl 200(%esp) - fldl 200(%esp) - fstl 168(%esp) - fadd %st, %st(3) - fxch %st(3) - fstpl 200(%esp) - fxch %st(2) - fmul %st(3), %st - fldl 200(%esp) - fxch %st(1) - faddl 184(%esp) - fstpl 200(%esp) - fldl 200(%esp) - fld %st(0) - fmul %st(6), %st - fstpl 200(%esp) - fstl 184(%esp) - fldl 200(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpl 176(%esp) - fldl 176(%esp) - fsubp %st, %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fucom %st(2) - fnstsw %ax - fxch %st(2) - fstp %st(0) - sahf - fxch %st(2) - jne ..B1.15 - jp ..B1.15 -..B1.16: - fstp %st(1) - fstp %st(3) - fstp %st(1) - fldt 48(%esp) - flds 44(%esp) - fldt 32(%esp) - fdivrp %st, %st(2) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fmul %st, %st(2) - fxch %st(2) - fstpl 200(%esp) - fxch %st(1) - fstpl 168(%esp) - fldl 200(%esp) - fldl _eulon2@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpl (%esp) - fxch %st(1) - fstpt 112(%esp) - fstpt 64(%esp) - fstpt 80(%esp) - call __libm_log_k32 -..B1.72: - fldt 80(%esp) - fldt 64(%esp) - fldt 112(%esp) -..B1.17: - fldl _oonpi@GOTOFF(%ebx) - fxch %st(1) - fchs - fldl _tonpi@GOTOFF(%ebx) - cmpl $1, %esi - fmulp %st, %st(3) - fxch %st(4) - fmulp %st, %st(2) - fldl 184(%esp) - fmul %st(1), %st - fmull 168(%esp) - fsubrp %st, %st(2) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - jle ..B1.78 -..B1.18: - movl $1, %ecx - lea -1(%esi), %edx - fld %st(2) - .align 16,0x90 -..B1.19: - movl %ecx, %ebx - incl %ecx - imull %edx, %ebx - decl %edx - fmul %st(4), %st - movl %ebx, 192(%esp) - cmpl %esi, %ecx - fildl 192(%esp) - fstpl 200(%esp) - fldl 200(%esp) - fdivrp %st, %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fadd %st, %st(3) - fxch %st(3) - fstpl 200(%esp) - fldl 200(%esp) - fxch %st(3) - jl ..B1.19 -..B1.20: - fstp %st(0) - fstp %st(3) -..B1.21: - fldt 96(%esp) - fxch %st(2) - fmulp %st, %st(1) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpl 200(%esp) - fldl 200(%esp) - jmp ..B1.46 -..B1.23: - cmpl $80, %esi - jge ..B1.35 -..B1.24: - fxch %st(1) - fstpl 184(%esp) -..B1.25: - fldl _val_18_0@GOTOFF(%ebx) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.29 -..B1.26: - fstl (%esp) - fstps 44(%esp) - call y0@PLT -..B1.73: - flds 44(%esp) -..B1.27: - fstl (%esp) - fxch %st(1) - fstpl 168(%esp) - fstps 44(%esp) - call y1@PLT -..B1.74: - flds 44(%esp) -..B1.28: - fxch %st(1) - jmp ..B1.31 -..B1.29: - flds _ones@GOTOFF(%ebx) - lea 96(%esp), %edx - fdiv %st(1), %st - lea 104(%esp), %ecx - fstpl 104(%edx) - fldl 104(%edx) - fstpt -64(%edx) - fldt -64(%edx) - fldl _val_16_0@GOTOFF(%ebx) - fmulp %st, %st(1) - fstpl 104(%edx) - fldl 104(%edx) - fld %st(0) - fmul %st(1), %st - fstpl 104(%edx) - fldl 104(%edx) - fld %st(0) - fmul %st(1), %st - fstpl 104(%edx) - fldl 104(%edx) - fxch %st(3) - fstl (%esp) - movl %edx, 8(%esp) - movl %ecx, 12(%esp) - movl $-1, 16(%esp) - fxch %st(1) - fstpt -48(%edx) - fxch %st(2) - fstpt -32(%edx) - fstpt -16(%edx) - fstps -52(%edx) - call __libm_sincos_k32 -..B1.30: - flds 44(%esp) - fldt 80(%esp) - fldt 64(%esp) - fldt 48(%esp) - fldl 40+_PP0@GOTOFF(%ebx) - fmul %st(2), %st - fldl 32+_PP0@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 24+_PP0@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 16+_PP0@GOTOFF(%ebx) - fmul %st(3), %st - fxch %st(1) - faddl 8+_PP0@GOTOFF(%ebx) - fmul %st(2), %st - fstpl 200(%esp) - fldl 200(%esp) - fldl 32+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl _PP0@GOTOFF(%ebx) - fstpl 200(%esp) - fldl 200(%esp) - faddp %st, %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fldl 40+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl 16+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl 24+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fxch %st(2) - faddl _PP1@GOTOFF(%ebx) - fldl 32+_QP0@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(3) - faddl 8+_PP1@GOTOFF(%ebx) - fmul %st(4), %st - fstpl 200(%esp) - fldl 200(%esp) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - faddp %st, %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fldl 40+_QP0@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(3) - faddl 16+_QP0@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(3) - faddl 24+_QP0@GOTOFF(%ebx) - fmul %st(5), %st - fxch %st(3) - faddl _QP0@GOTOFF(%ebx) - fmul %st(6), %st - fxch %st(3) - faddl 8+_QP0@GOTOFF(%ebx) - fmul %st(4), %st - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - fstpl 200(%esp) - fldl 200(%esp) - fldl 40+_QP1@GOTOFF(%ebx) - fmul %st(5), %st - faddl 24+_QP1@GOTOFF(%ebx) - fmul %st(5), %st - faddl 8+_QP1@GOTOFF(%ebx) - fmulp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fldl 32+_QP1@GOTOFF(%ebx) - fmul %st(5), %st - faddl 16+_QP1@GOTOFF(%ebx) - fmulp %st, %st(5) - fldl _tonpi@GOTOFF(%ebx) - fxch %st(5) - faddl _QP1@GOTOFF(%ebx) - fmulp %st, %st(6) - faddp %st, %st(5) - fxch %st(4) - fstpl 200(%esp) - fldl 200(%esp) - fldt 32(%esp) - fmulp %st, %st(4) - fxch %st(3) - fstpl 200(%esp) - fldl 200(%esp) - fsqrt - fstpl 200(%esp) - fldl 200(%esp) - fldl 96(%esp) - fmul %st, %st(5) - fmulp %st, %st(4) - fldl 104(%esp) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fmul %st, %st(4) - fxch %st(4) - fstpl 168(%esp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fmulp %st, %st(1) - fstpl 200(%esp) - fldl 200(%esp) -..B1.31: - fldl _val_2_0@GOTOFF(%ebx) - cmpl $1, %esi - fdivp %st, %st(2) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - jle ..B1.79 -..B1.32: - fldl 168(%esp) - movl $1, %edx -..B1.33: - movl %edx, 192(%esp) - incl %edx - fildl 192(%esp) - fstpl 200(%esp) - fld %st(2) - fldl 200(%esp) - cmpl %esi, %edx - fmul %st(3), %st - fmulp %st, %st(4) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(2) - fstpl 200(%esp) - fldl 200(%esp) - fxch %st(2) - jl ..B1.33 -..B1.34: - fstp %st(0) - fstp %st(0) - jmp ..B1.46 -..B1.35: - lea 5000(%esi,%esi,4), %edx - movl %edx, 192(%esp) - fildl 192(%esp) - fstpl 200(%esp) - fldl 200(%esp) - fcomp %st(1) - fnstsw %ax - sahf - ja ..B1.24 -..B1.36: - fstp %st(1) - fldl _val_4_0@GOTOFF(%ebx) - movl $-1, %ecx - movl %esi, 192(%esp) - xorl %edx, %edx - fstl 160(%esp) - fxch %st(1) - fsts 44(%esp) - fildl 192(%esp) - fstpl 200(%esp) - fldl 200(%esp) - fld %st(0) - fmulp %st, %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fstpt 128(%esp) - fldt 128(%esp) - fldl _val_8_0@GOTOFF(%ebx) - fmulp %st, %st(2) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fstpt 112(%esp) - fldt 112(%esp) - flds _ones@GOTOFF(%ebx) - fstl 152(%esp) - fstpt 80(%esp) - fldt 80(%esp) - flds 4+_ones@GOTOFF(%ebx) - faddp %st, %st(3) - fxch %st(1) - fdivrp %st, %st(2) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fstpt 64(%esp) - fldt 64(%esp) - fstpl 168(%esp) - fldl _val_2_0@GOTOFF(%ebx) - fstl 144(%esp) - fldl _val_3_0@GOTOFF(%ebx) - fstpt 48(%esp) - fldt 48(%esp) - fldl _val_5_0@GOTOFF(%ebx) - fstpt 32(%esp) - fld %st(2) - fdiv %st(3), %st - fstpl 200(%esp) - fldl 200(%esp) - fstpt 96(%esp) - fldt 80(%esp) - fldt 32(%esp) - fldt 48(%esp) -..B1.37: - fldt 112(%esp) - fld %st(5) - fmul %st(1), %st - testl %ecx, %ecx - fxch %st(1) - fmul %st(5), %st - fxch %st(7) - fstpl 184(%esp) - fld %st(1) - fmul %st(2), %st - fxch %st(4) - fstpt 80(%esp) - fldt 128(%esp) - fsub %st, %st(4) - fxch %st(1) - fdivrp %st, %st(4) - fld %st(2) - fmul %st(3), %st - fsubrp %st, %st(1) - fdivp %st, %st(6) - fxch %st(2) - fmull 168(%esp) - fstpl 200(%esp) - fldl 200(%esp) - fxch %st(5) - fstpl 200(%esp) - fldl 200(%esp) - fmul %st(5), %st - fstpl 200(%esp) - fldl 200(%esp) - fldt 80(%esp) - jle ..B1.59 -..B1.38: - faddp %st, %st(6) - fxch %st(5) - fstpl 200(%esp) - fldl 200(%esp) - fldt 64(%esp) - fadd %st(6), %st - fstpl 200(%esp) - fldl 200(%esp) - fstpt 64(%esp) -..B1.39: - fldl 144(%esp) - fadd %st, %st(5) - fxch %st(5) - fstpl 200(%esp) - fxch %st(4) - faddp %st, %st(3) - fxch %st(4) - fstl 168(%esp) - fldl 200(%esp) - fxch %st(3) - fstpl 200(%esp) - fldl 200(%esp) - fldl 160(%esp) - fadd %st, %st(3) - fxch %st(3) - fstpl 200(%esp) - fxch %st(2) - faddp %st, %st(5) - fldl 200(%esp) - fxch %st(5) - fstpl 200(%esp) - fldl 200(%esp) - fldt 96(%esp) - fmulp %st, %st(2) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fabs - fldl 152(%esp) - fcomp %st(1) - fnstsw %ax - sahf - jbe ..B1.41 -..B1.40: - fstpl 152(%esp) - movl $1, %edx - jmp ..B1.42 -..B1.41: - fstp %st(0) - testl %edx, %edx - jne ..B1.58 -..B1.42: - fldl _TWO_19H@GOTOFF(%ebx) - negl %ecx - fmul %st(4), %st - fstpl 200(%esp) - fld %st(3) - fldl 200(%esp) - fadd %st, %st(1) - fxch %st(1) - fstpl 176(%esp) - fldl 176(%esp) - fsubp %st, %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fldl 184(%esp) - fucomp %st(1) - fnstsw %ax - sahf - fxch %st(5) - fxch %st(2) - fxch %st(3) - fxch %st(4) - fxch %st(2) - jne ..B1.37 - jp ..B1.37 -..B1.43: - fstp %st(5) - fstp %st(4) - fstp %st(3) - fstp %st(0) - fstp %st(0) - fstpt 80(%esp) - flds 44(%esp) -..B1.44: - addl %esi, %esi - lea 184(%esp), %edx - negl %esi - lea 168(%esp), %ecx - fstl (%esp) - decl %esi - movl %edx, 8(%esp) - movl %ecx, 12(%esp) - movl %esi, 16(%esp) - fstps -124(%ecx) - call __libm_sincos_k32 -..B1.45: - flds 44(%esp) - fldt 80(%esp) - fmull 184(%esp) - fldt 64(%esp) - fmull 168(%esp) - faddp %st, %st(1) - fldl _tonpi@GOTOFF(%ebx) - fdivp %st, %st(2) - fxch %st(1) - fstpl 200(%esp) - fldl 200(%esp) - fsqrt - fstpl 200(%esp) - fldl 200(%esp) - fmulp %st, %st(1) - fstpl 200(%esp) - fldl 200(%esp) -..B1.46: - testl %edi, %edi - je ..B1.49 -..B1.47: - fchs -..B1.49: - fstps 192(%esp) - flds 192(%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.50: - fstp %st(1) - fstp %st(0) - fldt .L_2il0floatpacket.1@GOTOFF(%ebx) - shrl $31, %ecx - fmuls _large_value_32@GOTOFF(%ebx,%ecx,4) - fstps 192(%esp) - flds 192(%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.51: - fstp %st(0) - movl %ecx, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - ja ..B1.56 -..B1.52: - testl %edx, %edx - je ..B1.69 -..B1.53: - testl $-2147483648, %ecx - jne ..B1.68 -..B1.54: - movl %esi, %edx - shrl $31, %edx - andl %esi, %edx - flds _zeros@GOTOFF(%ebx,%edx,4) -..B1.55: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.56: - flds 12(%ebp) - fmuls _ones@GOTOFF(%ebx) - fstps 192(%esp) - flds 192(%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.57: - fstp %st(1) - fstp %st(3) - jmp ..B1.14 -..B1.58: - fstp %st(4) - fstp %st(3) - fstp %st(2) - fstp %st(1) - fstpt 80(%esp) - flds 44(%esp) - jmp ..B1.44 -..B1.59: - fsubp %st, %st(6) - fxch %st(5) - fstpl 200(%esp) - fldl 200(%esp) - fldt 64(%esp) - fsub %st(6), %st - fstpl 200(%esp) - fldl 200(%esp) - fstpt 64(%esp) - jmp ..B1.39 -..B1.61: - fstpl 184(%esp) - addl $4, %esp - pushl 12(%ebp) - call y1f@PLT -..B1.62: - testl %edi, %edi - je ..B1.65 -..B1.63: - fchs -..B1.65: - fstps 192(%esp) - flds 192(%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.66: - fstpl 184(%esp) - addl $4, %esp - pushl 12(%ebp) - call y0f@PLT -..B1.67: - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.68: - flds _zeros@GOTOFF(%ebx) - fmuls _infs@GOTOFF(%ebx) - fstps 192(%esp) - flds 192(%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.69: - flds 4+_ones@GOTOFF(%ebx) - fdivs _zeros@GOTOFF(%ebx) - fstps 192(%esp) - flds 192(%esp) - addl $244, %esp - popl %ebx - popl %edi - popl %esi - movl %ebp, %esp - popl %ebp - ret -..B1.78: - fstp %st(3) - jmp ..B1.21 -..B1.79: - fstp %st(0) - jmp ..B1.46 - .align 16,0x90 - .type ynf,@function - .size ynf,.-ynf - .data -# -- End ynf - .data - .align 4 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .align 4 -_infs: - .long 2139095040 - .long 4286578688 - .type _infs,@object - .size _infs,8 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x8e,0x0a,0x40,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,12 - .space 4, 0x00 # pad - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x63,0x40,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,12 - .align 4 -function_zeros: - .long 0x00000000 - .long 0x00000000 - .long 0x00000000 - .long 0x3ecccccd - .long 0x3fa66666 - .long 0x40400000 - .long 0x40a9999a - .long 0x4101999a - .long 0x41366666 - .long 0x4171999a - .long 0x4198cccd - .long 0x41ba6666 - .long 0x41df3333 - .long 0x42026666 - .long 0x42160000 - .long 0x422a0000 - .long 0x423f3333 - .long 0x42546666 - .long 0x426a0000 - .long 0x42803333 - .long 0x428b999a - .long 0x42970000 - .long 0x42a2999a - .long 0x42ae6666 - .long 0x42ba6666 - .long 0x42c66666 - .long 0x42d2999a - .long 0x42decccd - .long 0x42eb3333 - .long 0x42f7999a - .long 0x4302199a - .long 0x43086666 - .long 0x430ecccd - .long 0x43153333 - .long 0x431b999a - .long 0x4322199a - .long 0x4328999a - .long 0x432f199a - .long 0x4335b333 - .long 0x433c3333 - .long 0x4342e666 - .long 0x43498000 - .long 0x43503333 - .long 0x4356e666 - .long 0x435d999a - .long 0x43644ccd - .long 0x436b0000 - .long 0x4371cccd - .long 0x4378999a - .long 0x437f6666 - .long 0x4383199a - .long 0x43868ccd - .long 0x4389f333 - .long 0x438d6666 - .long 0x4390d99a - .long 0x43944ccd - .long 0x4397c000 - .long 0x439b3333 - .long 0x439eb333 - .long 0x43a23333 - .long 0x43a5a666 - .long 0x43a92666 - .long 0x43aca666 - .long 0x43b02666 - .long 0x43b3a666 - .long 0x43b73333 - .long 0x43bab333 - .long 0x43be4000 - .long 0x43c1c000 - .long 0x43c54ccd - .long 0x43c8d99a - .long 0x43cc6666 - .long 0x43cff333 - .long 0x43d38000 - .long 0x43d70ccd - .long 0x43da999a - .long 0x43de2666 - .long 0x43e1c000 - .long 0x43e54ccd - .long 0x43e8e666 - .long 0x43ec8000 - .long 0x43f00ccd - .long 0x43f3a666 - .long 0x43f74000 - .long 0x43fad99a - .long 0x43fe7333 - .long 0x44010666 - .long 0x4402d333 - .long 0x4404a000 - .long 0x44067333 - .long 0x44084000 - .long 0x440a0ccd - .long 0x440be000 - .long 0x440daccd - .long 0x440f8000 - .long 0x44114ccd - .long 0x44132000 - .long 0x4414f333 - .long 0x4416c666 - .long 0x4418999a - .long 0x441a6666 - .long 0x441c399a - .long 0x441e0ccd - .long 0x441fe000 - .long 0x4421b333 - .long 0x44238ccd - .long 0x44256000 - .long 0x44273333 - .long 0x44290666 - .long 0x442ae000 - .long 0x442cb333 - .long 0x442e8666 - .long 0x44306000 - .long 0x44323333 - .long 0x44340ccd - .long 0x4435e000 - .long 0x4437b99a - .long 0x44398ccd - .long 0x443b6666 - .long 0x443d4000 - .long 0x443f199a - .long 0x4440eccd - .long 0x4442c666 - .long 0x4444a000 - .long 0x4446799a - .long 0x44485333 - .long 0x444a2ccd - .long 0x444c0666 - .long 0x444de000 - .long 0x444fb99a - .long 0x44519333 - .long 0x44536ccd - .long 0x44554666 - .long 0x44572000 - .long 0x44590000 - .long 0x445ad99a - .long 0x445cb333 - .long 0x445e9333 - .long 0x44606ccd - .long 0x44624666 - .long 0x44642666 - .long 0x44660000 - .long 0x4467d99a - .long 0x4469b99a - .long 0x446b9333 - .long 0x446d7333 - .long 0x446f5333 - .long 0x44712ccd - .long 0x44730ccd - .long 0x4474e666 - .long 0x4476c666 - .long 0x4478a666 - .long 0x447a8000 - .long 0x447c6000 - .long 0x447e4000 - .long 0x44801000 - .long 0x4480fccd - .long 0x4481eccd - .long 0x4482dccd - .long 0x4483cccd - .long 0x4484bccd - .long 0x4485accd - .long 0x44869ccd - .long 0x44878ccd - .long 0x44887ccd - .long 0x44896ccd - .long 0x448a5ccd - .long 0x448b4ccd - .long 0x448c3ccd - .long 0x448d2ccd - .long 0x448e1ccd - .long 0x448f0ccd - .long 0x448ffccd - .long 0x4490eccd - .long 0x4491e000 - .long 0x4492d000 - .long 0x4493c000 - .long 0x4494b000 - .long 0x4495a333 - .long 0x44969333 - .long 0x44978333 - .long 0x44987333 - .long 0x44996666 - .long 0x449a5666 - .long 0x449b499a - .long 0x449c399a - .long 0x449d299a - .long 0x449e1ccd - .long 0x449f0ccd - .long 0x44a00000 - .long 0x44a0f000 - .long 0x44a1e333 - .long 0x44a2d333 - .long 0x44a3c666 - .long 0x44a4b666 - .long 0x44a5a99a - .long 0x44a6999a - .long 0x44a78ccd - .long 0x44a87ccd - .long 0x44a97000 - .long 0x44aa6333 - .long 0x44ab5333 - .long 0x44ac4666 - .long 0x44ad399a - .long 0x44ae299a - .long 0x44af1ccd - .long 0x44b01000 - .long 0x44b10333 - .long 0x44b1f333 - .long 0x44b2e666 - .long 0x44b3d99a - .long 0x44b4cccd - .long 0x44b5bccd - .long 0x44b6b000 - .long 0x44b7a333 - .long 0x44b89666 - .long 0x44b9899a - .long 0x44ba7ccd - .long 0x44bb6ccd - .long 0x44bc6000 - .long 0x44bd5333 - .long 0x44be4666 - .long 0x44bf399a - .long 0x44c02ccd - .long 0x44c12000 - .long 0x44c21333 - .long 0x44c30666 - .long 0x44c3f99a - .long 0x44c4eccd - .long 0x44c5e000 - .long 0x44c6d333 - .long 0x44c7c666 - .long 0x44c8b99a - .long 0x44c9accd - .long 0x44caa000 - .long 0x44cb9333 - .long 0x44cc899a - .long 0x44cd7ccd - .long 0x44ce7000 - .long 0x44cf6333 - .long 0x44d05666 - .long 0x44d1499a - .long 0x44d23ccd - .long 0x44d33333 - .long 0x44d42666 - .long 0x44d5199a - .long 0x44d60ccd - .long 0x44d70000 - .long 0x44d7f666 - .long 0x44d8e99a - .long 0x44d9dccd - .long 0x44dad000 - .long 0x44dbc666 - .long 0x44dcb99a - .long 0x44ddaccd - .long 0x44dea333 - .long 0x44df9666 - .long 0x44e0899a - .long 0x44e18000 - .long 0x44e27333 - .long 0x44e36666 - .long 0x44e45ccd - .long 0x44e55000 - .long 0x44e64333 - .long 0x44e7399a - .long 0x44e82ccd - .long 0x44e92333 - .long 0x44ea1666 - .long 0x44eb099a - .long 0x44ec0000 - .long 0x44ecf333 - .long 0x44ede99a - .long 0x44eedccd - .long 0x44efd333 - .long 0x44f0c666 - .long 0x44f1bccd - .long 0x44f2b000 - .long 0x44f3a666 - .long 0x44f4999a - .long 0x44f59000 - .long 0x44f68333 - .long 0x44f7799a - .long 0x44f86ccd - .long 0x44f96333 - .long 0x44fa599a - .long 0x44fb4ccd - .long 0x44fc4333 - .long 0x44fd3666 - .long 0x44fe2ccd - .long 0x44ff2000 - .long 0x45000b33 - .long 0x45008666 - .long 0x45010000 - .long 0x45017000 - .long 0x4501f000 - .long 0x45027000 - .long 0x4502e000 - .long 0x45036000 - .long 0x4503e000 - .long 0x45045000 - .long 0x4504d000 - .long 0x45055000 - .long 0x4505c000 - .long 0x45064000 - .long 0x4506c000 - .long 0x45073000 - .long 0x4507b000 - .long 0x45083000 - .long 0x4508a000 - .long 0x45092000 - .long 0x4509a000 - .long 0x450a1000 - .long 0x450a9000 - .long 0x450b1000 - .long 0x450b8000 - .long 0x450c0000 - .long 0x450c8000 - .long 0x450cf000 - .long 0x450d7000 - .long 0x450df000 - .long 0x450e6000 - .type function_zeros,@object - .size function_zeros,1284 - .align 4 -_val_0_6: - .long 858993459 - .long 1071854387 - .type _val_0_6,@object - .size _val_0_6,8 - .align 4 -_val_2_0: - .long 0 - .long 1073741824 - .type _val_2_0,@object - .size _val_2_0,8 - .align 4 -_TWO_19H: - .long 0 - .long 1093140480 - .type _TWO_19H,@object - .size _TWO_19H,8 - .align 4 -_eulon2: - .long 3400611180 - .long 1072463685 - .type _eulon2,@object - .size _eulon2,8 - .align 4 -_oonpi: - .long 1841940611 - .long 1070882608 - .type _oonpi,@object - .size _oonpi,8 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_val_18_0: - .long 0 - .long 1077018624 - .type _val_18_0,@object - .size _val_18_0,8 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_PP0: - .long 4294966288 - .long 1072693247 - .long 4269912424 - .long 3207725055 - .long 1780799603 - .long 1052554744 - .long 2285933488 - .long 3194113879 - .long 3892950982 - .long 1041746526 - .long 150212775 - .long 3184818833 - .type _PP0,@object - .size _PP0,48 - .align 4 -_PP1: - .long 551 - .long 1072693248 - .long 4267608614 - .long 1061027839 - .long 3690881252 - .long 3200414971 - .long 3933039373 - .long 1046848465 - .long 3246008603 - .long 3189439465 - .long 1689113401 - .long 1037483563 - .type _PP1,@object - .size _PP1,48 - .align 4 -_QP0: - .long 4294921804 - .long 3212836863 - .long 4153409851 - .long 1056096255 - .long 2226361937 - .long 3196916170 - .long 3849695089 - .long 1044094312 - .long 663042994 - .long 3187124278 - .long 3336948587 - .long 1035486718 - .type _QP0,@object - .size _QP0,48 - .align 4 -_QP1: - .long 4294954956 - .long 1066926079 - .long 4141388976 - .long 3204071423 - .long 1500123100 - .long 1049740228 - .long 3264213437 - .long 3191856517 - .long 1489731078 - .long 1039824630 - .long 1807021260 - .long 3183130166 - .type _QP1,@object - .size _QP1,48 - .align 4 -_val_4_0: - .long 0 - .long 1074790400 - .type _val_4_0,@object - .size _val_4_0,8 - .align 4 -_val_8_0: - .long 0 - .long 1075838976 - .type _val_8_0,@object - .size _val_8_0,8 - .align 4 -_val_3_0: - .long 0 - .long 1074266112 - .type _val_3_0,@object - .size _val_3_0,8 - .align 4 -_val_5_0: - .long 0 - .long 1075052544 - .type _val_5_0,@object - .size _val_5_0,8 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .data - .hidden __libm_sincos_k32 - .hidden __libm_log_k32 - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ynl.S b/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ynl.S deleted file mode 100644 index db3a032599..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/ia32/ynl.S +++ /dev/null @@ -1,109 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ynl.c" - .text -..TXTST0: -# -- Begin ynl - .text - .align 16,0x90 - .globl ynl -ynl: -# parameter 1: 8 + %ebp -# parameter 2: 12 + %ebp -..B1.1: -..L1: - - pushl %ebp - movl %esp, %ebp - andl $-64, %esp - pushl %edi - pushl %ebx - subl $56, %esp - fldt 12(%ebp) - lea 16(%esp), %edi - call ..L2 -..L2: - popl %ebx - lea _GLOBAL_OFFSET_TABLE_+[. - ..L2](%ebx), %ebx - movl %edi, (%esp) - fstpt 4(%esp) - call __ltoq@PLT -..B1.6: - addl $-32, %esp - movl 8(%ebp), %ecx - lea 64(%esp), %edx - movl %edx, (%esp) - lea 16(%esp), %eax - movl %ecx, 4(%esp) - movl (%edi), %edx - movl 4(%edi), %ecx - movl %edx, (%eax) - movl %ecx, 4(%eax) - movl 8(%edi), %edx - movl 12(%edi), %ecx - movl %edx, 8(%eax) - movl %ecx, 12(%eax) - call __ynq@PLT -..B1.5: - addl $28, %esp -..B1.2: - movl 32(%esp), %eax - movl %eax, (%edi) - movl 36(%esp), %edx - movl 40(%esp), %ecx - movl 44(%esp), %eax - addl $4, %esp - pushl %edi - movl %edx, 4(%edi) - movl %ecx, 8(%edi) - movl %eax, 12(%edi) - call __qtol@PLT -..B1.7: - addl $56, %esp - popl %ebx - popl %edi - movl %ebp, %esp - popl %ebp - ret - .align 16,0x90 - .type ynl,@function - .size ynl,.-ynl - .data -# -- End ynl - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acos.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acos.S deleted file mode 100644 index 9f611cbebd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acos.S +++ /dev/null @@ -1,1912 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acos.c" - .text -..TXTST0: -# -- Begin acos - .text - .align 16,0x90 - .globl acos -acos: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_acos.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) -..B1.2: - movsd ABSVALMASK(%rip), %xmm4 - movsd ONEMASK(%rip), %xmm3 - xorpd %xmm5, %xmm5 - movsd TMASK(%rip), %xmm2 - movq %xmm0, %xmm1 - psrlq $44, %xmm0 - movd %xmm0, %edx - movq %xmm1, %xmm7 - movl $8192, %ecx - pinsrw $2, %ecx, %xmm5 - movq %xmm1, %xmm0 - movl $524287, %eax - andl %edx, %eax - subl $260864, %eax - cmpl $955, %eax - jae .L_2TAG_PACKET_0.0.2 - mulsd %xmm1, %xmm1 - andl $65535, %edx - subsd %xmm1, %xmm3 - sqrtsd %xmm3, %xmm3 - andpd %xmm7, %xmm2 - andl $-4, %edx - subl $64256, %edx - lea T_table(%rip), %r8 - movsd (%r8,%rdx,2), %xmm1 - orpd %xmm5, %xmm2 - lea Tbl_addr(%rip), %r8 - movapd (%r8,%rdx,4), %xmm4 - movq %xmm7, %xmm6 - addsd %xmm2, %xmm7 - subsd %xmm2, %xmm0 - mulsd %xmm0, %xmm7 - mulsd %xmm1, %xmm6 - mulsd %xmm2, %xmm3 - movq %xmm6, %xmm1 - addsd %xmm3, %xmm6 - divsd %xmm6, %xmm7 - movsd 24+cv(%rip), %xmm0 - movsd 8+cv(%rip), %xmm5 - subsd %xmm3, %xmm1 - psrlq $63, %xmm2 - movq %xmm1, %xmm3 - psllq $63, %xmm2 - mulsd %xmm1, %xmm1 - pshufd $68, %xmm2, %xmm2 - movsd 16+cv(%rip), %xmm6 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm0 - xorpd %xmm2, %xmm4 - mulsd %xmm3, %xmm5 - subpd PI_BY_2(%rip), %xmm4 - mulsd %xmm1, %xmm3 - addsd %xmm6, %xmm0 - mulsd %xmm3, %xmm0 - subsd %xmm4, %xmm5 - pshufd $238, %xmm4, %xmm4 - addsd %xmm5, %xmm0 - subsd %xmm7, %xmm0 - subsd %xmm4, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - subl $955, %eax - cmpl $65, %eax - jae .L_2TAG_PACKET_1.0.2 - psrlq $38, %xmm7 - psllq $38, %xmm7 - pmovmskb %xmm0, %eax - andnpd %xmm0, %xmm4 - subsd %xmm7, %xmm1 - movq %xmm7, %xmm6 - mulsd %xmm7, %xmm7 - addsd %xmm6, %xmm0 - orpd %xmm4, %xmm5 - subsd %xmm7, %xmm3 - mulsd %xmm1, %xmm0 - movq %xmm3, %xmm4 - subsd %xmm0, %xmm3 - sqrtsd %xmm3, %xmm3 - andl $128, %eax - shrl $7, %eax - negl %eax - movq %xmm3, %xmm7 - andpd %xmm3, %xmm2 - psllq $2, %xmm3 - pextrw $3, %xmm3, %edx - orpd %xmm5, %xmm2 - movd %eax, %xmm3 - pshufd $0, %xmm3, %xmm3 - subl $65216, %edx - addl %edx, %edx - lea T_table(%rip), %r8 - mulsd (%r8,%rdx,4), %xmm7 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - subsd %xmm7, %xmm6 - andpd NEG_PI(%rip), %xmm3 - addsd %xmm1, %xmm6 - subsd %xmm2, %xmm4 - addsd %xmm7, %xmm7 - movsd 8+cv(%rip), %xmm5 - subsd %xmm0, %xmm4 - addsd %xmm6, %xmm7 - movsd 24+cv(%rip), %xmm0 - divsd %xmm7, %xmm4 - movsd 16+cv(%rip), %xmm2 - lea Tbl_addr(%rip), %r8 - addpd (%r8,%rdx,8), %xmm3 - movq %xmm6, %xmm1 - mulsd %xmm6, %xmm6 - mulsd %xmm6, %xmm0 - mulsd %xmm6, %xmm1 - mulsd %xmm1, %xmm5 - mulsd %xmm6, %xmm1 - addsd %xmm2, %xmm0 - pxor %xmm6, %xmm6 - mulsd %xmm1, %xmm0 - addsd %xmm3, %xmm5 - addsd %xmm5, %xmm0 - andl $32768, %eax - pinsrw $3, %eax, %xmm6 - movq %xmm4, %xmm5 - pshufd $238, %xmm3, %xmm3 - addsd %xmm3, %xmm4 - subsd %xmm4, %xmm3 - addsd %xmm3, %xmm5 - addsd %xmm5, %xmm0 - addsd %xmm4, %xmm0 - xorpd %xmm6, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_1.0.2: - addl $15291, %eax - cmpl $14336, %eax - jae .L_2TAG_PACKET_2.0.2 - unpcklpd %xmm0, %xmm0 - movapd cv2(%rip), %xmm6 - unpcklpd %xmm0, %xmm1 - movapd 16+cv2(%rip), %xmm2 - movapd 32+cv2(%rip), %xmm4 - mulpd %xmm0, %xmm0 - movapd PI_BY_2(%rip), %xmm5 - mulpd %xmm0, %xmm1 - mulpd %xmm0, %xmm6 - mulpd %xmm0, %xmm0 - movq %xmm1, %xmm3 - mulsd %xmm1, %xmm1 - addpd %xmm2, %xmm6 - mulpd %xmm0, %xmm4 - mulsd %xmm3, %xmm1 - addpd %xmm4, %xmm6 - pshufd $238, %xmm5, %xmm0 - mulpd %xmm6, %xmm1 - pshufd $238, %xmm5, %xmm6 - subsd %xmm7, %xmm0 - pshufd $238, %xmm1, %xmm2 - subsd %xmm1, %xmm5 - subsd %xmm0, %xmm6 - subsd %xmm2, %xmm5 - subsd %xmm6, %xmm7 - subsd %xmm7, %xmm5 - addsd %xmm5, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_2.0.2: - subl $15356, %eax - cmpl $4, %eax - jae .L_2TAG_PACKET_3.0.2 - xorpd %xmm6, %xmm6 - andpd ABSVALMASK(%rip), %xmm7 - movsd ONE_BY_2(%rip), %xmm4 - movapd cv2(%rip), %xmm1 - mulsd %xmm4, %xmm7 - movapd 16+cv2(%rip), %xmm2 - subsd %xmm7, %xmm4 - movapd 32+cv2(%rip), %xmm3 - pshufd $68, %xmm4, %xmm7 - sqrtsd %xmm4, %xmm4 - mulpd %xmm7, %xmm1 - pshufd $68, %xmm7, %xmm5 - pextrw $3, %xmm0, %eax - mulpd %xmm7, %xmm7 - addpd %xmm1, %xmm2 - movsd HALFMASK(%rip), %xmm1 - mulpd %xmm7, %xmm3 - cmpsd $1, %xmm6, %xmm0 - mulsd %xmm5, %xmm7 - addpd %xmm3, %xmm2 - pshufd $68, %xmm0, %xmm0 - mulsd %xmm7, %xmm2 - andpd NEG_PI(%rip), %xmm0 - mulpd %xmm5, %xmm2 - andpd %xmm4, %xmm1 - pshufd $68, %xmm4, %xmm3 - subsd %xmm1, %xmm4 - addsd %xmm3, %xmm3 - mulsd %xmm1, %xmm1 - subsd %xmm4, %xmm3 - subsd %xmm1, %xmm5 - mulsd %xmm3, %xmm4 - pshufd $238, %xmm3, %xmm3 - subsd %xmm4, %xmm5 - divsd %xmm3, %xmm5 - addpd %xmm3, %xmm3 - mulpd %xmm3, %xmm2 - pshufd $238, %xmm2, %xmm4 - addsd %xmm0, %xmm2 - andl $32768, %eax - pinsrw $3, %eax, %xmm6 - pshufd $238, %xmm0, %xmm0 - addsd %xmm4, %xmm2 - addsd %xmm5, %xmm2 - addsd %xmm3, %xmm2 - addsd %xmm2, %xmm0 - xorpd %xmm6, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_3.0.2: - addl $261884, %eax - cmpl $261888, %eax - jb .L_2TAG_PACKET_4.0.2 - movd %xmm7, %ecx - psrlq $32, %xmm7 - movd %xmm7, %edx - andl $2147483647, %edx - movl $1072693248, %eax - subl %edx, %eax - orl %ecx, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_5.0.2 - movsd (%rsp), %xmm2 - movd %xmm2, %edx - psrlq $32, %xmm2 - movd %xmm2, %ecx - andl $2147483647, %ecx - subl $1, %edx - sbbl $2146435072, %ecx - cmpl $0, %ecx - jge .L_2TAG_PACKET_6.0.2 - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %edx - pinsrw $3, %edx, %xmm1 - mulsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_7.0.2 -.L_2TAG_PACKET_5.0.2: - pextrw $1, %xmm7, %edx - shrl $15, %edx - negl %edx - movd %edx, %xmm7 - pshufd $0, %xmm7, %xmm7 - movsd PI(%rip), %xmm2 - movsd 8+PI(%rip), %xmm0 - andpd %xmm7, %xmm2 - andpd %xmm7, %xmm0 - addsd %xmm2, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_4.0.2: - movsd PI_BY_2(%rip), %xmm2 - movsd 8+PI_BY_2(%rip), %xmm0 - addsd %xmm2, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_6.0.2: - xorpd %xmm6, %xmm6 - addsd %xmm6, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_7.0.2: - movq %xmm0, 8(%rsp) -..B1.3: - movq 8(%rsp), %xmm0 -.L_2TAG_PACKET_8.0.2: -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type acos,@function - .size acos,.-acos - .data -# -- End acos - .section .rodata, "a" - .align 16 - .align 16 -ABSVALMASK: - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .type ABSVALMASK,@object - .size ABSVALMASK,16 - .align 16 -T_table: - .long 2642784509 - .long 1072689083 - .long 1514442531 - .long 1072688953 - .long 333108933 - .long 1072688821 - .long 3392112024 - .long 1072688686 - .long 2099852862 - .long 1072688550 - .long 749609004 - .long 1072688412 - .long 3634632596 - .long 1072688271 - .long 2163248461 - .long 1072688129 - .long 628657846 - .long 1072687985 - .long 3324036511 - .long 1072687838 - .long 1657632815 - .long 1072687690 - .long 4217538760 - .long 1072687539 - .long 2411951597 - .long 1072687387 - .long 533944872 - .long 1072687233 - .long 2876566508 - .long 1072687076 - .long 847936891 - .long 1072686918 - .long 3036019913 - .long 1072686757 - .long 848884575 - .long 1072686595 - .long 2874443326 - .long 1072686430 - .long 520713666 - .long 1072686264 - .long 2375556481 - .long 1072686095 - .long 4141904948 - .long 1072685924 - .long 1522666382 - .long 1072685752 - .long 3105624104 - .long 1072685577 - .long 298666327 - .long 1072685401 - .long 1689524500 - .long 1072685222 - .long 2981002200 - .long 1072685041 - .long 4170844284 - .long 1072684858 - .long 961802263 - .long 1072684674 - .long 1941503454 - .long 1072684487 - .long 2812647170 - .long 1072684298 - .long 3572873869 - .long 1072684107 - .long 4219797823 - .long 1072683914 - .long 456039788 - .long 1072683720 - .long 869096151 - .long 1072683523 - .long 1161535119 - .long 1072683324 - .long 1330865866 - .long 1072683123 - .long 1374571204 - .long 1072682920 - .long 1290107538 - .long 1072682715 - .long 1074904836 - .long 1072682508 - .long 726366587 - .long 1072682299 - .long 241869763 - .long 1072682088 - .long 3913732079 - .long 1072681874 - .long 3149342765 - .long 1072681659 - .long 2240966306 - .long 1072681442 - .long 1185873216 - .long 1072681223 - .long 4276274591 - .long 1072681001 - .long 2919452883 - .long 1072680778 - .long 1407565635 - .long 1072680553 - .long 4032743551 - .long 1072680325 - .long 2202188565 - .long 1072680096 - .long 207977577 - .long 1072679865 - .long 2342160518 - .long 1072679631 - .long 11858423 - .long 1072679396 - .long 1804034453 - .long 1072679158 - .long 3420722787 - .long 1072678918 - .long 563930456 - .long 1072678677 - .long 1820539192 - .long 1072678433 - .long 2892501606 - .long 1072678187 - .long 3776710320 - .long 1072677939 - .long 175063337 - .long 1072677690 - .long 674333171 - .long 1072677438 - .long 976363026 - .long 1072677184 - .long 1077935934 - .long 1072676928 - .long 1921075490 - .long 1072676540 - .long 881493302 - .long 1072676016 - .long 3275752439 - .long 1072675483 - .long 486855588 - .long 1072674943 - .long 1077229111 - .long 1072674394 - .long 723950308 - .long 1072673837 - .long 3693582199 - .long 1072673271 - .long 1367335316 - .long 1072672698 - .long 2305837020 - .long 1072672116 - .long 2184358641 - .long 1072671526 - .long 972682840 - .long 1072670928 - .long 2935101762 - .long 1072670321 - .long 3745513263 - .long 1072669706 - .long 3372320886 - .long 1072669083 - .long 1783464620 - .long 1072668452 - .long 3241386215 - .long 1072667812 - .long 3418125284 - .long 1072667164 - .long 2280219148 - .long 1072666508 - .long 4088700758 - .long 1072665843 - .long 219227400 - .long 1072665171 - .long 3521816918 - .long 1072664489 - .long 1076205279 - .long 1072663800 - .long 1436484616 - .long 1072663102 - .long 271362610 - .long 1072662396 - .long 1838996688 - .long 1072661681 - .long 1807122518 - .long 1072660958 - .long 137953542 - .long 1072660227 - .long 1088178584 - .long 1072659487 - .long 324057537 - .long 1072658739 - .long 2101288076 - .long 1072657982 - .long 2085133974 - .long 1072657217 - .long 235324451 - .long 1072656444 - .long 806051592 - .long 1072655662 - .long 3756033140 - .long 1072654871 - .long 453542543 - .long 1072654073 - .long 3741177327 - .long 1072653265 - .long 691216109 - .long 1072652450 - .long 4145223372 - .long 1072651625 - .long 1174439091 - .long 1072650793 - .long 324416139 - .long 1072649952 - .long 1550246310 - .long 1072649102 - .long 511524674 - .long 1072648244 - .long 1457248482 - .long 1072647377 - .long 45944955 - .long 1072646502 - .long 525537397 - .long 1072645618 - .long 2848440188 - .long 1072644725 - .long 2671555633 - .long 1072643824 - .long 4241172637 - .long 1072642914 - .long 3213094278 - .long 1072641996 - .long 3832503688 - .long 1072641069 - .long 1754091534 - .long 1072640134 - .long 1221921804 - .long 1072639190 - .long 2184526489 - .long 1072638237 - .long 294902089 - .long 1072637276 - .long 4090375270 - .long 1072636305 - .long 632860906 - .long 1072635327 - .long 2753498702 - .long 1072634339 - .long 1808009252 - .long 1072633343 - .long 2036428672 - .long 1072632338 - .long 3383235626 - .long 1072631324 - .long 1497347484 - .long 1072630302 - .long 617018317 - .long 1072629271 - .long 684933058 - .long 1072628231 - .long 1643170798 - .long 1072627182 - .long 3011066360 - .long 1072625592 - .long 957158713 - .long 1072623442 - .long 1390907941 - .long 1072621256 - .long 3819155270 - .long 1072619034 - .long 3443571196 - .long 1072616777 - .long 4045412458 - .long 1072614484 - .long 805503923 - .long 1072612156 - .long 1778922015 - .long 1072609791 - .long 2125033665 - .long 1072607390 - .long 1287203863 - .long 1072604953 - .long 2992629568 - .long 1072602479 - .long 2367267127 - .long 1072599969 - .long 3115526047 - .long 1072597422 - .long 340219539 - .long 1072594839 - .long 2017215719 - .long 1072592218 - .long 3225443424 - .long 1072589560 - .long 3326565673 - .long 1072586865 - .long 1669811211 - .long 1072584133 - .long 1886735022 - .long 1072581363 - .long 3301071171 - .long 1072578555 - .long 928514283 - .long 1072575710 - .long 2656364059 - .long 1072572826 - .long 3473490507 - .long 1072569904 - .long 2649965606 - .long 1072566944 - .long 3736819052 - .long 1072563945 - .long 1680885175 - .long 1072560908 - .long 4413771 - .long 1072557832 - .long 2214869753 - .long 1072554716 - .long 3214725184 - .long 1072551561 - .long 2186079903 - .long 1072548367 - .long 2590372131 - .long 1072545133 - .long 3578146079 - .long 1072541859 - .long 4283712755 - .long 1072538545 - .long 3824834510 - .long 1072535191 - .long 1302400298 - .long 1072531797 - .long 95058636 - .long 1072528362 - .long 3563906063 - .long 1072524885 - .long 2167230730 - .long 1072521368 - .long 3524918334 - .long 1072517809 - .long 2353304918 - .long 1072514209 - .long 1939625839 - .long 1072510567 - .long 1256714581 - .long 1072506883 - .long 3552525848 - .long 1072503156 - .long 3464809522 - .long 1072499387 - .long 4200542593 - .long 1072495575 - .long 355609124 - .long 1072491721 - .long 3684139099 - .long 1072487822 - .long 148355918 - .long 1072483881 - .long 1457689242 - .long 1072479895 - .long 2118591596 - .long 1072475865 - .long 908848089 - .long 1072471791 - .long 877032689 - .long 1072467672 - .long 752012304 - .long 1072463508 - .long 3532301749 - .long 1072459298 - .long 3600563221 - .long 1072455043 - .long 3902857084 - .long 1072450742 - .long 3063101036 - .long 1072446395 - .long 3972344374 - .long 1072442001 - .long 903183549 - .long 1072437561 - .long 983892938 - .long 1072433073 - .long 2722858568 - .long 1072428537 - .long 302790515 - .long 1072423954 - .long 759811057 - .long 1072419322 - .long 2507809922 - .long 1072414641 - .long 2388408813 - .long 1072407528 - .long 2084492942 - .long 1072397870 - .long 2435703301 - .long 1072388010 - .long 1935433360 - .long 1072377945 - .long 2742047290 - .long 1072367671 - .long 2053284205 - .long 1072357185 - .long 657783367 - .long 1072346483 - .long 2893664841 - .long 1072335560 - .long 3718906405 - .long 1072324413 - .long 1547896303 - .long 1072313038 - .long 2494058440 - .long 1072301429 - .long 3133238742 - .long 1072289582 - .long 3327000086 - .long 1072277492 - .long 1860667274 - .long 1072265154 - .long 665340747 - .long 1072252562 - .long 443347841 - .long 1072239710 - .long 581282618 - .long 1072226592 - .long 3349780465 - .long 1072213201 - .long 914217606 - .long 1072199532 - .long 989797661 - .long 1072185576 - .long 945436416 - .long 1072171326 - .long 549291300 - .long 1072156774 - .long 1814636389 - .long 1072141911 - .long 239092858 - .long 1072126729 - .long 1794680724 - .long 1072111217 - .long 1241534678 - .long 1072095366 - .long 3366566214 - .long 1072079164 - .long 1244090828 - .long 1072062601 - .long 1708448120 - .long 1072045663 - .long 3544260650 - .long 1072028337 - .long 1402741403 - .long 1072010610 - .long 2551936888 - .long 1071992465 - .long 617669739 - .long 1071973887 - .long 794002186 - .long 1071954857 - .long 2021237693 - .long 1071935356 - .long 540450384 - .long 1071915364 - .long 1920555537 - .long 1071894857 - .long 2879585206 - .long 1071873811 - .long 3000237455 - .long 1071852199 - .long 3352974346 - .long 1071829991 - .long 569629937 - .long 1071807155 - .long 2077237208 - .long 1071783653 - .long 2284891805 - .long 1071759446 - .long 1226651784 - .long 1071734489 - .long 1102047405 - .long 1071708731 - .long 2009896384 - .long 1071682115 - .long 927419082 - .long 1071654577 - .long 85010366 - .long 1071607413 - .long 696431025 - .long 1071548180 - .long 2611410541 - .long 1071486585 - .long 2612593658 - .long 1071422396 - .long 3548155306 - .long 1071355336 - .long 3887997484 - .long 1071285073 - .long 244854763 - .long 1071211202 - .long 4214445648 - .long 1071133216 - .long 2303966727 - .long 1071050478 - .long 3991040013 - .long 1070962152 - .long 3126952278 - .long 1070867118 - .long 1817448378 - .long 1070763804 - .long 1793814864 - .long 1070649884 - .long 3507224072 - .long 1070447193 - .long 4027609105 - .long 1070148772 - .long 577507993 - .long 1069779414 - .long 2310232419 - .long 1068931829 - .type T_table,@object - .size T_table,2048 - .align 16 -Tbl_addr: - .long 3822952792 - .long 1021639372 - .long 182792448 - .long 1068507836 - .long 2264213271 - .long 1019558908 - .long 649052928 - .long 1068524253 - .long 1797139609 - .long 1022295143 - .long 1243095296 - .long 1068540671 - .long 1415938756 - .long 1021439537 - .long 2033294592 - .long 1068557090 - .long 2356809978 - .long 1021777916 - .long 3088063744 - .long 1068573510 - .long 2669055318 - .long 1022124482 - .long 180888576 - .long 1068589932 - .long 3566445325 - .long 1021358712 - .long 1970196992 - .long 1068606354 - .long 896980323 - .long 1021319659 - .long 4229555456 - .long 1068622777 - .long 436049712 - .long 1021319758 - .long 2732572160 - .long 1068639202 - .long 583123209 - .long 1020797960 - .long 1842831872 - .long 1068655628 - .long 1370449804 - .long 1021429270 - .long 1628994560 - .long 1068672055 - .long 2411391464 - .long 1021057980 - .long 2159763712 - .long 1068688483 - .long 1208692749 - .long 1021943903 - .long 3503886336 - .long 1068704912 - .long 538793309 - .long 1019744063 - .long 1435187200 - .long 1068721343 - .long 4085087612 - .long 1020608419 - .long 317469952 - .long 1068737775 - .long 144386942 - .long 1021440732 - .long 219617280 - .long 1068754208 - .long 2940088361 - .long 1019981122 - .long 1210558208 - .long 1068770642 - .long 2176850347 - .long 1018373705 - .long 3359268352 - .long 1068787077 - .long 2395611454 - .long 1021889042 - .long 2439803648 - .long 1068803514 - .long 1650705253 - .long 1020227966 - .long 2816203520 - .long 1068819952 - .long 3702166386 - .long 1019379914 - .long 262620672 - .long 1068836392 - .long 1855649370 - .long 1020453124 - .long 3438159616 - .long 1068852832 - .long 923063860 - .long 1019273834 - .long 3822105856 - .long 1068869274 - .long 4289947947 - .long 1019434249 - .long 1483729920 - .long 1068885718 - .long 787455814 - .long 1020738379 - .long 787321088 - .long 1068902163 - .long 3321653337 - .long 1021842569 - .long 1802253312 - .long 1068918609 - .long 2653633526 - .long 1021821525 - .long 302985984 - .long 1068935057 - .long 161272028 - .long 1021655149 - .long 653966080 - .long 1068951506 - .long 2566098667 - .long 1020066219 - .long 2924727296 - .long 1068967956 - .long 3646493722 - .long 1014292285 - .long 2889890304 - .long 1068984408 - .long 1081009196 - .long 1022189620 - .long 619098112 - .long 1069000862 - .long 4011643355 - .long 1021773297 - .long 477017600 - .long 1069017317 - .long 4030305534 - .long 1021292252 - .long 2533403904 - .long 1069033773 - .long 2645187591 - .long 1019527099 - .long 2563102208 - .long 1069050231 - .long 3857293792 - .long 1022311697 - .long 635982336 - .long 1069066691 - .long 3625936637 - .long 1017511744 - .long 1116940800 - .long 1069083152 - .long 3653872993 - .long 1022016631 - .long 4075964160 - .long 1069099614 - .long 2468900271 - .long 1021769532 - .long 993165568 - .long 1069116079 - .long 1358104224 - .long 1021199776 - .long 528586752 - .long 1069132545 - .long 2200950332 - .long 1022024872 - .long 2752395776 - .long 1069149012 - .long 3197072454 - .long 1017751319 - .long 3439855616 - .long 1069165481 - .long 1651081806 - .long 1020809338 - .long 2661257728 - .long 1069181952 - .long 539032752 - .long 1021728805 - .long 486957312 - .long 1069198425 - .long 3136045149 - .long 1016888671 - .long 1282340352 - .long 1069214899 - .long 2593963259 - .long 1018956103 - .long 822921728 - .long 1069231375 - .long 2146032737 - .long 1022306465 - .long 3474216192 - .long 1069247852 - .long 3976811625 - .long 1021350207 - .long 716902656 - .long 1069264332 - .long 718267222 - .long 1018624727 - .long 1211594496 - .long 1069280813 - .long 1485641389 - .long 1018447451 - .long 734070272 - .long 1069297296 - .long 354455128 - .long 1021341291 - .long 3650110720 - .long 1069313780 - .long 682185947 - .long 1021651853 - .long 1440663040 - .long 1069330267 - .long 3558574550 - .long 1021615110 - .long 2766612224 - .long 1069346755 - .long 874607978 - .long 1017746872 - .long 3404011008 - .long 1069363245 - .long 4154988502 - .long 1021439906 - .long 3423949056 - .long 1069379737 - .long 2263202309 - .long 1021479615 - .long 2897587712 - .long 1069396231 - .long 2562065031 - .long 1022090363 - .long 1896159232 - .long 1069412727 - .long 3836237663 - .long 1019867288 - .long 490968576 - .long 1069429225 - .long 3322056743 - .long 1006752762 - .long 3048360192 - .long 1069445724 - .long 1152314833 - .long 1013122252 - .long 1049850624 - .long 1069462226 - .long 3601590727 - .long 1022214610 - .long 3156899584 - .long 1069478729 - .long 1855169970 - .long 1019487271 - .long 851173376 - .long 1069495235 - .long 312649594 - .long 1020868604 - .long 2794281728 - .long 1069511742 - .long 1093490181 - .long 1020777577 - .long 468042496 - .long 1069528252 - .long 1152540679 - .long 1021403732 - .long 2534219264 - .long 1069544763 - .long 2292126035 - .long 1021872430 - .long 1376146432 - .long 1069558527 - .long 3293753641 - .long 1020500454 - .long 4175442432 - .long 1069575044 - .long 3626347564 - .long 1021610969 - .long 3523113472 - .long 1069591566 - .long 339956500 - .long 1021119039 - .long 4003350528 - .long 1069608092 - .long 3429333082 - .long 1022813542 - .long 1611067392 - .long 1069624623 - .long 2298017544 - .long 1021977587 - .long 931782144 - .long 1069641158 - .long 2164684743 - .long 1021250988 - .long 2256725504 - .long 1069657697 - .long 1138762335 - .long 1021443776 - .long 1582853120 - .long 1069674241 - .long 1084010382 - .long 1022994693 - .long 3497758720 - .long 1069690789 - .long 406366244 - .long 1022713586 - .long 3999816960 - .long 1069707342 - .long 1488723042 - .long 1023381290 - .long 3383096064 - .long 1069723900 - .long 2541558953 - .long 1019137887 - .long 1942403584 - .long 1069740463 - .long 1879620343 - .long 1022653642 - .long 4268263680 - .long 1069757030 - .long 3039077047 - .long 1022252545 - .long 2067062272 - .long 1069773603 - .long 4190670677 - .long 1020725863 - .long 4225828096 - .long 1069790180 - .long 1998567321 - .long 1022014385 - .long 2452507136 - .long 1069806763 - .long 1511628873 - .long 1021900300 - .long 1340746240 - .long 1069823351 - .long 788367341 - .long 1022726208 - .long 1190035456 - .long 1069839944 - .long 3856337230 - .long 1021834118 - .long 2300688384 - .long 1069856542 - .long 3211396579 - .long 1022621365 - .long 678886400 - .long 1069873146 - .long 4001011887 - .long 1022042646 - .long 921594112 - .long 1069889755 - .long 557811968 - .long 1023065533 - .long 3331668992 - .long 1069906369 - .long 1877060679 - .long 1022419742 - .long 3917875200 - .long 1069922989 - .long 1181055171 - .long 1022752712 - .long 2984829696 - .long 1069939615 - .long 4294526932 - .long 1021499988 - .long 838049024 - .long 1069956247 - .long 3658081878 - .long 1022957952 - .long 2078928384 - .long 1069972884 - .long 820353701 - .long 1019391107 - .long 2719854336 - .long 1069989527 - .long 1644022489 - .long 1023378240 - .long 3069117696 - .long 1070006176 - .long 2771393702 - .long 1019319954 - .long 3435962368 - .long 1070022831 - .long 3876394145 - .long 1023024433 - .long 4130595328 - .long 1070039492 - .long 1630447748 - .long 1021465882 - .long 1169236224 - .long 1070056160 - .long 2828355997 - .long 1020458120 - .long 3453997312 - .long 1070072833 - .long 164091641 - .long 1020388279 - .long 2708127744 - .long 1070089513 - .long 3036550223 - .long 1023328684 - .long 3540797696 - .long 1070106199 - .long 3710949463 - .long 1022568805 - .long 1972276736 - .long 1070122892 - .long 3885277950 - .long 1019761674 - .long 2613815552 - .long 1070139591 - .long 2764165077 - .long 1022921023 - .long 1487791616 - .long 1070156297 - .long 1330644769 - .long 1023162679 - .long 3207593472 - .long 1070173009 - .long 3911007221 - .long 1022993496 - .long 3797764608 - .long 1070189728 - .long 979712598 - .long 1022554580 - .long 3578920448 - .long 1070206454 - .long 2825738223 - .long 1020223708 - .long 2872795648 - .long 1070223187 - .long 392451124 - .long 1022666279 - .long 2002258432 - .long 1070239927 - .long 3730407632 - .long 1023148291 - .long 1291326464 - .long 1070256674 - .long 3723802980 - .long 1022514089 - .long 1065180928 - .long 1070273428 - .long 2635617463 - .long 1022654470 - .long 1650181632 - .long 1070290189 - .long 2061982883 - .long 1022853411 - .long 3373882880 - .long 1070306957 - .long 319732785 - .long 1022017175 - .long 2270081280 - .long 1070323733 - .long 2237757411 - .long 1023064087 - .long 2963732736 - .long 1070340516 - .long 468839165 - .long 1023293774 - .long 1491099904 - .long 1070357307 - .long 1502657946 - .long 1021533479 - .long 2479636480 - .long 1070374105 - .long 482913562 - .long 1021986286 - .long 1968133632 - .long 1070390911 - .long 3281474337 - .long 1022646400 - .long 291639040 - .long 1070407725 - .long 2453320259 - .long 1022812423 - .long 2081472512 - .long 1070424546 - .long 2939989570 - .long 1023091888 - .long 3380340480 - .long 1070441375 - .long 2850707499 - .long 1021921109 - .long 232287488 - .long 1070458213 - .long 3674625342 - .long 1020725130 - .long 1567614208 - .long 1070475058 - .long 9347334 - .long 1022024009 - .long 3433091072 - .long 1070491911 - .long 282524999 - .long 1021433523 - .long 1876877312 - .long 1070508773 - .long 3470449440 - .long 1019309721 - .long 1538472192 - .long 1070525643 - .long 2089486825 - .long 1019698916 - .long 2763830784 - .long 1070542521 - .long 443498115 - .long 1020505194 - .long 1605381632 - .long 1070559408 - .long 3018871601 - .long 1022869913 - .long 2706946048 - .long 1070576303 - .long 3936260892 - .long 1023175875 - .long 2123887360 - .long 1070593207 - .long 2994220655 - .long 1022825948 - .long 104015104 - .long 1070603108 - .long 335054493 - .long 1023441853 - .long 2904568832 - .long 1070615800 - .long 1451215633 - .long 1023853857 - .long 3456197120 - .long 1070632739 - .long 436334733 - .long 1024026432 - .long 252452352 - .long 1070649697 - .long 34596167 - .long 1024031396 - .long 3328018432 - .long 1070666672 - .long 2644547073 - .long 1024296758 - .long 1255829248 - .long 1070683667 - .long 552832586 - .long 1023763122 - .long 4097058560 - .long 1070700680 - .long 1955640623 - .long 1021394654 - .long 451770112 - .long 1070717714 - .long 3428903777 - .long 1022941142 - .long 408920832 - .long 1070734767 - .long 165503263 - .long 1023894958 - .long 1186960640 - .long 1070751840 - .long 435826450 - .long 1024026134 - .long 19078656 - .long 1070768934 - .long 1834169749 - .long 1022899284 - .long 2743490304 - .long 1070786048 - .long 494581074 - .long 1018818479 - .long 2328961024 - .long 1070803184 - .long 2987908834 - .long 1022581110 - .long 350011392 - .long 1070820342 - .long 240771184 - .long 1024143083 - .long 2692326912 - .long 1070837521 - .long 666056837 - .long 1022394776 - .long 2373274368 - .long 1070854723 - .long 2484337770 - .long 1024228156 - .long 1017131520 - .long 1070871948 - .long 3285648279 - .long 1024025789 - .long 265558272 - .long 1070889196 - .long 392241896 - .long 1024252809 - .long 1778008064 - .long 1070906467 - .long 1536107943 - .long 1023949300 - .long 2937184768 - .long 1070923762 - .long 3541062251 - .long 1019448646 - .long 1144442880 - .long 1070941082 - .long 3691683781 - .long 1022123948 - .long 2410165504 - .long 1070958426 - .long 1804181960 - .long 1023945221 - .long 4174350848 - .long 1070975795 - .long 2016094861 - .long 1021716585 - .long 3897012480 - .long 1070993190 - .long 175294410 - .long 1023703404 - .long 3353623040 - .long 1071010611 - .long 167973242 - .long 1023240839 - .long 45671168 - .long 1071028059 - .long 2166856113 - .long 1021565413 - .long 86063872 - .long 1071045533 - .long 2676254727 - .long 1023985299 - .long 1019772672 - .long 1071063034 - .long 989043593 - .long 1021549587 - .long 414297344 - .long 1071080563 - .long 3960972046 - .long 1024307251 - .long 155173120 - .long 1071098120 - .long 1830919291 - .long 1021592251 - .long 2151562240 - .long 1071115705 - .long 405408666 - .long 1023423128 - .long 4041854720 - .long 1071133319 - .long 2043497827 - .long 1024411503 - .long 3489224192 - .long 1071150963 - .long 3072215864 - .long 1022698635 - .long 2477196288 - .long 1071168637 - .long 1812195139 - .long 1022689192 - .long 3015298816 - .long 1071186341 - .long 764841969 - .long 1021027331 - .long 2844731136 - .long 1071204076 - .long 2878117321 - .long 1019116513 - .long 4028950528 - .long 1071221842 - .long 698911452 - .long 1023265602 - .long 69441536 - .long 1071239641 - .long 3253467847 - .long 1020795075 - .long 1676209920 - .long 1071257471 - .long 4272431167 - .long 1022873982 - .long 2408752384 - .long 1071275334 - .long 648519100 - .long 1024385717 - .long 151623680 - .long 1071293231 - .long 345257017 - .long 1019561408 - .long 1410154240 - .long 1071311161 - .long 197863993 - .long 1023224207 - .long 4131351552 - .long 1071329125 - .long 2620801789 - .long 1024411169 - .long 1999664384 - .long 1071347125 - .long 3952692616 - .long 1024168086 - .long 1617668864 - .long 1071365160 - .long 3019889809 - .long 1021907692 - .long 1032074240 - .long 1071383231 - .long 59469899 - .long 1023656194 - .long 2619492096 - .long 1071401338 - .long 1417526820 - .long 1021457783 - .long 202429440 - .long 1071419483 - .long 2927667935 - .long 1019175447 - .long 525044224 - .long 1071437665 - .long 38166811 - .long 1023981879 - .long 1779258880 - .long 1071455885 - .long 481252500 - .long 1023310234 - .long 2195673600 - .long 1071474144 - .long 3962395981 - .long 1021339088 - .long 44573696 - .long 1071492443 - .long 3936281395 - .long 1023014829 - .long 2226905344 - .long 1071510781 - .long 1515320476 - .long 1024320623 - .long 2800512512 - .long 1071529160 - .long 1225403697 - .long 1021081846 - .long 161113600 - .long 1071547581 - .long 3064809733 - .long 1024173917 - .long 1338410240 - .long 1071566043 - .long 2027604973 - .long 1024362526 - .long 522433280 - .long 1071584548 - .long 2055171723 - .long 1023858825 - .long 539595776 - .long 1071603096 - .long 3868820135 - .long 1022936424 - .long 4264017664 - .long 1071621687 - .long 3228065145 - .long 1023479578 - .long 1733924096 - .long 1071640324 - .long 3511934475 - .long 1022496355 - .long 108880384 - .long 1071651839 - .long 615880967 - .long 1023519706 - .long 3517856512 - .long 1071661202 - .long 3113108559 - .long 1025190289 - .long 4043153152 - .long 1071670589 - .long 1571836218 - .long 1023106116 - .long 3251299072 - .long 1071680000 - .long 3444076102 - .long 1022187841 - .long 2736921600 - .long 1071689435 - .long 272771483 - .long 1025095280 - .long 3897698560 - .long 1071703633 - .long 2075390188 - .long 1022489022 - .long 3209485056 - .long 1071722652 - .long 1438094065 - .long 1021844944 - .long 3781432064 - .long 1071741774 - .long 1675017145 - .long 1024143828 - .long 2684184064 - .long 1071761003 - .long 2259963753 - .long 1024731393 - .long 1840489728 - .long 1071780342 - .long 3372883597 - .long 1023431408 - .long 3764087808 - .long 1071799794 - .long 3307523102 - .long 1024485788 - .long 3006232320 - .long 1071819364 - .long 3088971966 - .long 1025213251 - .long 3374881280 - .long 1071839055 - .long 834437749 - .long 1025236452 - .long 797284864 - .long 1071858872 - .long 3122663941 - .long 1025320473 - .long 545765120 - .long 1071878818 - .long 826539625 - .long 1022450955 - .long 107562240 - .long 1071898898 - .long 339584600 - .long 1022481255 - .long 2123649024 - .long 1071919116 - .long 3912959833 - .long 1024321009 - .long 1562385664 - .long 1071939478 - .long 2846067230 - .long 1023343981 - .long 2963085824 - .long 1071959988 - .long 954548627 - .long 1021475211 - .long 3325550592 - .long 1071980652 - .long 3459651155 - .long 1025305573 - .long 775752448 - .long 1072001476 - .long 3582746667 - .long 1023859460 - .long 3238590720 - .long 1072022464 - .long 634636162 - .long 1024472353 - .long 2758801920 - .long 1072043624 - .long 3078216319 - .long 1025304516 - .long 1370319104 - .long 1072064962 - .long 2570569078 - .long 1025099442 - .long 2615805184 - .long 1072086484 - .long 3729933412 - .long 1024605112 - .long 3077336576 - .long 1072108198 - .long 1948916066 - .long 1024781603 - .long 1099528192 - .long 1072130112 - .long 3139143157 - .long 1023729360 - .long 1231903232 - .long 1072152233 - .long 1349513477 - .long 1024737515 - .long 1507504128 - .long 1072174570 - .long 3484516322 - .long 1024000959 - .long 2214659840 - .long 1072197132 - .long 2563820917 - .long 1025225535 - .long 1804739840 - .long 1072219929 - .long 760038746 - .long 1024482855 - .long 1413746688 - .long 1072242971 - .long 3401734714 - .long 1025129838 - .long 821409536 - .long 1072266269 - .long 3729772551 - .long 1025484796 - .long 3031825664 - .long 1072289834 - .long 122256749 - .long 1024752594 - .long 1710784256 - .long 1072313680 - .long 1518205483 - .long 1024724809 - .long 3025265152 - .long 1072337819 - .long 409951989 - .long 1022835555 - .long 287769088 - .long 1072362267 - .long 800355594 - .long 1022484850 - .long 198179840 - .long 1072387038 - .long 3502926213 - .long 1024209373 - .long 1909130496 - .long 1072412149 - .long 3064694319 - .long 1025380823 - .long 1941732096 - .long 1072437619 - .long 4112930390 - .long 1024294679 - .long 3492010496 - .long 1072463467 - .long 2684918107 - .long 1023220233 - .long 81959680 - .long 1072489716 - .long 220021366 - .long 1020635131 - .long 2297837056 - .long 1072516387 - .long 4027683826 - .long 1021041185 - .long 270404096 - .long 1072543508 - .long 2012766065 - .long 1021780753 - .long 3667376896 - .long 1072571105 - .long 2727981522 - .long 1023009874 - .long 330400256 - .long 1072599212 - .long 2940017003 - .long 1025393439 - .long 1119293952 - .long 1072627861 - .long 1608550416 - .long 1022675612 - .long 3536155904 - .long 1072657091 - .long 349665778 - .long 1025156751 - .long 3078046720 - .long 1072686946 - .long 2016159996 - .long 1022193169 - .long 455228416 - .long 1072705361 - .long 1908539328 - .long 1026126332 - .long 1871505664 - .long 1072720988 - .long 2784700894 - .long 1025922277 - .long 1630994432 - .long 1072737010 - .long 361107678 - .long 1022887244 - .long 2084558336 - .long 1072753462 - .type Tbl_addr,@object - .size Tbl_addr,3840 - .space 768, 0x00 # pad - .align 16 -cv: - .long 0 - .long 0 - .long 1431655765 - .long 3217380693 - .long 858993459 - .long 3216192307 - .long 3067833783 - .long 3215383405 - .type cv,@object - .size cv,32 - .align 16 -PI_BY_2: - .long 856972295 - .long 1016178214 - .long 1413754136 - .long 1073291771 - .type PI_BY_2,@object - .size PI_BY_2,16 - .align 16 -NEG_PI: - .long 856972295 - .long 3164710438 - .long 1413754136 - .long 3221823995 - .type NEG_PI,@object - .size NEG_PI,16 - .align 16 -cv2: - .long 780903145 - .long 1066854586 - .long 858993459 - .long 1068708659 - .long 3340530119 - .long 1067392113 - .long 1431655765 - .long 1069897045 - .long 1321528399 - .long 1066517740 - .long 3067833783 - .long 1067899757 - .long 2021159460 - .long 1065855096 - .long 2576980378 - .long 1066178969 - .type cv2,@object - .size cv2,64 - .align 16 -HALFMASK: - .long 4160749568 - .long 4294967295 - .long 4160749568 - .long 4294967295 - .type HALFMASK,@object - .size HALFMASK,16 - .align 16 -PI: - .long 856972295 - .long 1017226790 - .long 1413754136 - .long 1074340347 - .type PI,@object - .size PI,16 - .align 4 -ONEMASK: - .long 0 - .long 1072693248 - .type ONEMASK,@object - .size ONEMASK,8 - .align 4 -TMASK: - .long 0 - .long 4294950912 - .type TMASK,@object - .size TMASK,8 - .align 4 -ONE_BY_2: - .long 0 - .long 1071644672 - .type ONE_BY_2,@object - .size ONE_BY_2,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosf_gen.S deleted file mode 100644 index 9a81f29fb2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosf_gen.S +++ /dev/null @@ -1,291 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acosf_gen.c" - .text -..TXTST0: -# -- Begin acosf - .text - .align 16,0x90 - .globl acosf -acosf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_acosf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - movl %edx, %eax - andl $2147483647, %eax - cmpl $1065353216, %eax - jae ..B1.10 -..B1.2: - cmpl $1056964608, %eax - jae ..B1.6 -..B1.3: - cmpl $838860800, %eax - jae ..B1.5 -..B1.4: - cvtss2sd %xmm0, %xmm0 - movsd .L_2il0floatpacket.8(%rip), %xmm1 - subsd %xmm0, %xmm1 - cvtsd2ss %xmm1, %xmm1 - movaps %xmm1, %xmm0 - ret -..B1.5: - pxor %xmm5, %xmm5 - cvtss2sd -8(%rsp), %xmm5 - movaps %xmm5, %xmm1 - mulsd %xmm5, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.0(%rip), %xmm4 - movsd .L_2il0floatpacket.4(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.1(%rip), %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.2(%rip), %xmm4 - addsd .L_2il0floatpacket.6(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.3(%rip), %xmm4 - addsd .L_2il0floatpacket.7(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - movsd .L_2il0floatpacket.8(%rip), %xmm3 - addsd %xmm2, %xmm4 - subsd %xmm5, %xmm3 - mulsd %xmm4, %xmm5 - subsd %xmm5, %xmm3 - jmp ..B1.9 -..B1.6: - pxor %xmm3, %xmm3 - testl $-2147483648, %edx - cvtss2sd -8(%rsp), %xmm3 - movsd .L_2il0floatpacket.1(%rip), %xmm6 - movsd .L_2il0floatpacket.2(%rip), %xmm9 - movsd .L_2il0floatpacket.3(%rip), %xmm10 - movsd .L_2il0floatpacket.5(%rip), %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm1 - movsd .L_2il0floatpacket.7(%rip), %xmm2 - je ..B1.8 -..B1.7: - movsd .L_2il0floatpacket.13(%rip), %xmm5 - pxor %xmm8, %xmm8 - movsd .L_2il0floatpacket.0(%rip), %xmm7 - addsd %xmm3, %xmm5 - mulsd .L_2il0floatpacket.9(%rip), %xmm5 - movaps %xmm5, %xmm4 - mulsd %xmm5, %xmm4 - sqrtsd %xmm5, %xmm8 - mulsd %xmm4, %xmm7 - mulsd .L_2il0floatpacket.10(%rip), %xmm8 - addsd %xmm6, %xmm7 - movsd .L_2il0floatpacket.4(%rip), %xmm6 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm7 - addsd %xmm0, %xmm6 - addsd %xmm9, %xmm7 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm7 - addsd %xmm1, %xmm6 - addsd %xmm10, %xmm7 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm7 - addsd %xmm2, %xmm6 - mulsd %xmm5, %xmm6 - movsd .L_2il0floatpacket.11(%rip), %xmm3 - addsd %xmm6, %xmm7 - subsd %xmm8, %xmm3 - mulsd %xmm7, %xmm8 - subsd %xmm8, %xmm3 - jmp ..B1.9 -..B1.8: - movsd .L_2il0floatpacket.13(%rip), %xmm5 - movsd .L_2il0floatpacket.0(%rip), %xmm7 - subsd %xmm3, %xmm5 - mulsd .L_2il0floatpacket.9(%rip), %xmm5 - pxor %xmm3, %xmm3 - movaps %xmm5, %xmm4 - mulsd %xmm5, %xmm4 - sqrtsd %xmm5, %xmm3 - mulsd %xmm4, %xmm7 - mulsd .L_2il0floatpacket.10(%rip), %xmm3 - addsd %xmm6, %xmm7 - movsd .L_2il0floatpacket.4(%rip), %xmm6 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm7 - addsd %xmm0, %xmm6 - addsd %xmm9, %xmm7 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm7 - addsd %xmm1, %xmm6 - addsd %xmm10, %xmm7 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm7 - addsd %xmm2, %xmm6 - mulsd %xmm5, %xmm6 - addsd %xmm6, %xmm7 - mulsd %xmm3, %xmm7 - addsd %xmm7, %xmm3 -..B1.9: - cvtsd2ss %xmm3, %xmm3 - movaps %xmm3, %xmm0 - ret -..B1.10: - cmpl $2139095040, %eax - ja ..B1.16 -..B1.11: - cmpl $1065353216, %eax - jne ..B1.17 -..B1.12: - testl $-2147483648, %edx - je ..B1.14 -..B1.13: - lea _small_value_64(%rip), %rax - movsd .L_2il0floatpacket.11(%rip), %xmm0 - addsd (%rax), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.14: - pxor %xmm0, %xmm0 -..B1.15: - ret -..B1.16: - movss -8(%rsp), %xmm0 - ret -..B1.17: - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.12(%rip), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type acosf,@function - .size acosf,.-acosf - .data -# -- End acosf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0xa6220783,0x3f9e3be5 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0xb5dc5888,0x3f93d64d - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x5290ac8c,0x3f9f20d0 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x4fa3bc7b,0x3fb33333 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xa9336e0b,0x3f758206 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0xecc3fecb,0x3f96a6f2 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x9e7be0cc,0x3fa6db5b - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x554dfea4,0x3fc55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x54442d18,0x3ff921fb - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x54442d18,0x400921fb - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 4 -.L_2il0floatpacket.12: - .long 0x7f800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosh_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosh_gen.S deleted file mode 100644 index d7ac4c73a2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosh_gen.S +++ /dev/null @@ -1,384 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acosh_gen.c" - .text -..TXTST0: -# -- Begin acosh - .text - .align 16,0x90 - .globl acosh -acosh: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_acosh.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - lea -1072693248(%rax), %edx - cmpl $1073741824, %edx - jae ..B1.14 -..B1.2: - cmpl $6144, %edx - jae ..B1.6 -..B1.3: - movl -8(%rsp), %eax - orl %eax, %edx - jne ..B1.5 -..B1.4: - lea _zeros(%rip), %rax - movsd (%rax), %xmm0 - ret -..B1.5: - lea 8+_ones(%rip), %rax - pxor %xmm3, %xmm3 - movsd -8(%rsp), %xmm5 - xorl %r9d, %r9d - movsd .L_2il0floatpacket.0(%rip), %xmm4 - lea 32+_PA(%rip), %rdx - lea 16+_PA(%rip), %rcx - lea 24+_PA(%rip), %rdi - lea _PA(%rip), %rsi - addsd (%rax), %xmm5 - mulsd %xmm5, %xmm4 - movaps %xmm5, %xmm6 - mulsd %xmm5, %xmm6 - sqrtsd %xmm4, %xmm3 - movsd %xmm3, -16(%rsp) - movaps %xmm3, %xmm0 - movl %r9d, -16(%rsp) - lea 8+_PA(%rip), %r8 - movsd -16(%rsp), %xmm11 - movaps %xmm11, %xmm1 - movaps %xmm11, %xmm2 - movsd (%rdx), %xmm8 - subsd %xmm11, %xmm0 - mulsd %xmm11, %xmm1 - mulsd %xmm6, %xmm8 - mulsd %xmm0, %xmm2 - subsd %xmm1, %xmm4 - addsd (%rcx), %xmm8 - subsd %xmm2, %xmm4 - mulsd %xmm6, %xmm8 - divsd %xmm3, %xmm4 - movsd (%rdi), %xmm7 - addsd %xmm4, %xmm0 - mulsd %xmm6, %xmm7 - addsd (%rsi), %xmm8 - mulsd .L_2il0floatpacket.1(%rip), %xmm0 - addsd (%r8), %xmm7 - mulsd %xmm5, %xmm8 - mulsd %xmm6, %xmm7 - addsd %xmm7, %xmm8 - movsd %xmm8, -24(%rsp) - movaps %xmm8, %xmm9 - movl %r9d, -24(%rsp) - movsd -24(%rsp), %xmm10 - mulsd %xmm0, %xmm8 - subsd %xmm10, %xmm9 - mulsd %xmm11, %xmm10 - mulsd %xmm11, %xmm9 - movsd %xmm10, -24(%rsp) - addsd %xmm8, %xmm9 - addsd %xmm9, %xmm0 - addsd %xmm10, %xmm0 - addsd %xmm11, %xmm0 - ret -..B1.6: - cmpl $29360128, %edx - jae ..B1.11 -..B1.7: - movsd -8(%rsp), %xmm7 - cmpl $2293760, %edx - jae ..B1.9 -..B1.8: - xorl %edx, %edx - movaps %xmm7, %xmm1 - movl %edx, -8(%rsp) - lea 8+_ones(%rip), %rax - movsd -8(%rsp), %xmm8 - movaps %xmm8, %xmm4 - subsd %xmm8, %xmm1 - mulsd %xmm8, %xmm4 - addsd %xmm8, %xmm7 - mulsd %xmm1, %xmm7 - addsd (%rax), %xmm4 - movaps %xmm4, %xmm0 - addsd %xmm7, %xmm0 - sqrtsd %xmm0, %xmm0 - movsd %xmm0, -16(%rsp) - movl %edx, -16(%rsp) - movsd -16(%rsp), %xmm6 - movaps %xmm6, %xmm2 - movaps %xmm6, %xmm3 - mulsd %xmm6, %xmm2 - subsd %xmm6, %xmm0 - addsd %xmm6, %xmm8 - mulsd %xmm0, %xmm3 - subsd %xmm2, %xmm4 - movaps %xmm6, %xmm5 - subsd %xmm3, %xmm4 - addsd %xmm0, %xmm5 - addsd %xmm4, %xmm7 - divsd %xmm5, %xmm7 - addsd %xmm7, %xmm0 - mulsd .L_2il0floatpacket.1(%rip), %xmm0 - addsd %xmm0, %xmm1 - jmp ..B1.10 -..B1.9: - movaps %xmm7, %xmm0 - lea 8+_ones(%rip), %rax - movsd .L_2il0floatpacket.0(%rip), %xmm2 - mulsd %xmm7, %xmm0 - movsd (%rax), %xmm1 - addsd %xmm1, %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm7, %xmm0 - mulsd %xmm2, %xmm7 - divsd %xmm0, %xmm1 - movsd %xmm7, -8(%rsp) - movl $0, -8(%rsp) - movsd -8(%rsp), %xmm8 - subsd %xmm8, %xmm7 - addsd %xmm7, %xmm1 -..B1.10: - movaps %xmm1, %xmm0 - movq $0x3ff0000000000000, %rax - addsd %xmm8, %xmm0 - movsd %xmm0, -8(%rsp) - movl $0, -8(%rsp) - movsd -8(%rsp), %xmm7 - movzwl -2(%rsp), %ecx - subsd %xmm7, %xmm8 - andl $32752, %ecx - addsd %xmm8, %xmm1 - shrl $4, %ecx - addl $-1023, %ecx - movslq %ecx, %rdx - negq %rdx - shlq $52, %rdx - addq %rax, %rdx - movq %rdx, -24(%rsp) - movsd -24(%rsp), %xmm2 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm7 - movaps %xmm1, %xmm3 - addsd %xmm7, %xmm3 - movsd %xmm3, -16(%rsp) - movl -12(%rsp), %esi - shrl $12, %esi - movzbl %sil, %edx - jmp ..B1.12 -..B1.11: - movzwl -2(%rsp), %eax - movl %eax, %ecx - andl $-32753, %eax - andl $32752, %ecx - orl $-49168, %eax - movw %ax, -2(%rsp) - movsd -8(%rsp), %xmm1 - movl $0, -8(%rsp) - movl -4(%rsp), %edx - movsd -8(%rsp), %xmm7 - shrl $4, %ecx - subsd %xmm7, %xmm1 - shrl $12, %edx - addl $-1022, %ecx - movzbl %dl, %edx -..B1.12: - movq __libm_rcp_table_256@GOTPCREL(%rip), %rsi - pxor %xmm0, %xmm0 - lea _ones(%rip), %rdi - lea 32+_PL(%rip), %r8 - lea 24+_PL(%rip), %r11 - lea 16+_PL(%rip), %r9 - lea _PL(%rip), %r10 - pxor %xmm6, %xmm6 - movq __libm_log_table_256@GOTPCREL(%rip), %rax - movsd (%r8), %xmm5 - movsd (%r11), %xmm4 - cvtss2sd (%rsi,%rdx,4), %xmm0 - cvtsi2sd %ecx, %xmm6 - mulsd %xmm0, %xmm7 - mulsd %xmm0, %xmm1 - subsd (%rdi), %xmm7 - movaps %xmm7, %xmm3 - lea _LN2(%rip), %rcx - lea 8+_PL(%rip), %rsi - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm4 - addsd (%r9), %xmm5 - addsd (%rsi), %xmm4 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm4 - addsd (%r10), %xmm5 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm5 - movsd (%rcx), %xmm0 - addsd %xmm4, %xmm5 - mulsd %xmm6, %xmm0 - addsd %xmm5, %xmm1 - shlq $4, %rdx - lea 8+_LN2(%rip), %rcx - movsd %xmm3, -16(%rsp) - addsd (%rax,%rdx), %xmm0 - addsd %xmm1, %xmm0 - movsd (%rcx), %xmm1 - mulsd %xmm1, %xmm6 - addsd 8(%rax,%rdx), %xmm6 - movsd %xmm6, -24(%rsp) - addsd %xmm6, %xmm7 - movsd %xmm7, -8(%rsp) - addsd %xmm7, %xmm0 -..B1.13: - ret -..B1.14: - movl %eax, %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - jbe ..B1.16 -..B1.15: - movsd -8(%rsp), %xmm0 - addsd %xmm0, %xmm0 - ret -..B1.16: - cmpl $2146435072, %eax - jne ..B1.18 -..B1.17: - cmpl $0, -8(%rsp) - je ..B1.15 -..B1.18: - cmpl $2146435072, %edx - jne ..B1.20 -..B1.19: - cmpl $0, -8(%rsp) - jne ..B1.15 -..B1.20: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type acosh,@function - .size acosh,.-acosh - .data -# -- End acosh - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_PA: - .long 1431655760 - .long 3216332117 - .long 858954823 - .long 1066611507 - .long 2956777430 - .long 3212237677 - .long 4158004615 - .long 1063197775 - .long 2173429939 - .long 3209085130 - .type _PA,@object - .size _PA,40 - .align 4 -_PL: - .long 0 - .long 3219128320 - .long 1431621855 - .long 1070945621 - .long 4294842013 - .long 3218079743 - .long 1289448124 - .long 1070176674 - .long 2077359316 - .long 3217380703 - .type _PL,@object - .size _PL,40 - .align 4 -_LN2: - .long 897137782 - .long 1038760431 - .long 4276092928 - .long 1072049730 - .type _LN2,@object - .size _LN2,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acoshf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acoshf_gen.S deleted file mode 100644 index c7ac5ad419..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acoshf_gen.S +++ /dev/null @@ -1,248 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acoshf_gen.c" - .text -..TXTST0: -# -- Begin acoshf - .text - .align 16,0x90 - .globl acoshf -acoshf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_acoshf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -16(%rsp) - lea -1065353216(%rdx), %eax - cmpl $1073741824, %eax - jae ..B1.11 -..B1.2: - cmpl $4194304, %eax - jae ..B1.6 -..B1.3: - testl %eax, %eax - jne ..B1.5 -..B1.4: - pxor %xmm0, %xmm0 - ret -..B1.5: - pxor %xmm3, %xmm3 - cvtss2sd -16(%rsp), %xmm3 - movsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd %xmm3, -24(%rsp) - addsd %xmm0, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - movsd .L_2il0floatpacket.2(%rip), %xmm5 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.3(%rip), %xmm5 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.4(%rip), %xmm5 - addsd .L_2il0floatpacket.8(%rip), %xmm4 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm5 - addsd .L_2il0floatpacket.9(%rip), %xmm4 - mulsd %xmm2, %xmm5 - mulsd %xmm3, %xmm4 - movsd .L_2il0floatpacket.1(%rip), %xmm1 - addsd %xmm4, %xmm5 - mulsd %xmm3, %xmm1 - sqrtsd %xmm1, %xmm1 - mulsd %xmm1, %xmm5 - addsd %xmm1, %xmm5 - jmp ..B1.10 -..B1.6: - pxor %xmm1, %xmm1 - cmpl $134217728, %eax - cvtss2sd -16(%rsp), %xmm1 - jae ..B1.8 -..B1.7: - movaps %xmm1, %xmm0 - movl $-1023, %edi - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.0(%rip), %xmm2 - addsd %xmm2, %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm0, %xmm1 - movsd %xmm1, -24(%rsp) - jmp ..B1.9 -..B1.8: - movsd %xmm1, -24(%rsp) - movl $-1022, %edi - movsd .L_2il0floatpacket.0(%rip), %xmm2 -..B1.9: - movzwl -18(%rsp), %edx - movl %edx, %eax - andl $-32753, %edx - pxor %xmm0, %xmm0 - orl $-49168, %edx - andl $32752, %eax - movw %dx, -18(%rsp) - pxor %xmm1, %xmm1 - movq __libm_rcp_table_256@GOTPCREL(%rip), %rsi - movl -20(%rsp), %ecx - andl $1048575, %ecx - shrl $12, %ecx - cvtss2sd (%rsi,%rcx,4), %xmm0 - mulsd -24(%rsp), %xmm0 - movsd .L_2il0floatpacket.11(%rip), %xmm5 - addsd %xmm2, %xmm0 - mulsd %xmm0, %xmm5 - shrl $4, %eax - addsd .L_2il0floatpacket.12(%rip), %xmm5 - addl %eax, %edi - cvtsi2sd %edi, %xmm1 - mulsd %xmm0, %xmm5 - mulsd .L_2il0floatpacket.13(%rip), %xmm1 - mulsd %xmm0, %xmm5 - movq __libm_logf_table_256@GOTPCREL(%rip), %r8 - addsd %xmm0, %xmm5 - addsd (%r8,%rcx,8), %xmm1 - movsd %xmm0, -24(%rsp) - addsd %xmm1, %xmm5 -..B1.10: - cvtsd2ss %xmm5, %xmm5 - movaps %xmm5, %xmm0 - ret -..B1.11: - movl %edx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.14 -..B1.12: - cmpl $2139095040, %edx - je ..B1.14 -..B1.13: - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.10(%rip), %xmm0 - ret -..B1.14: - movss -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type acoshf,@function - .size acoshf,.-acoshf - .data -# -- End acoshf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0xd28ee596,0x3ef3cb17 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x9b9f611c,0x3f31287a - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xac0cf195,0x3f5f1aa4 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x1236cb49,0x3f933333 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xd27f5e7d,0xbf174400 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x4197b1a0,0xbf46d307 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0xdacdeace,0xbf76db62 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x552ea1bd,0xbfb55555 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x6890dd10,0x3fd5555a - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0xe7362feb,0xbfe00001 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0xfefa39ef,0x3fe62e42 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 4 -.L_2il0floatpacket.10: - .long 0x7f800000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acoshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acoshl.S deleted file mode 100644 index 7d9a3aab0b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acoshl.S +++ /dev/null @@ -1,947 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acoshl.c" - .text -..TXTST0: -# -- Begin acoshl - .text - .align 16,0x90 - .globl acoshl -acoshl: -# parameter 1: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_acoshl.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - xorb %cl, %cl -..B1.2: - fnstcw 50(%rsp) -..B1.3: - movzwl 72(%rsp), %edi - movl %edi, %edx - movzbl 73(%rsp), %esi - andl $32767, %edx - shrl $7, %esi - shll $15, %esi - orl %edx, %esi - shll $16, %esi - movzwl 70(%rsp), %eax - orl %eax, %esi - addl $-1073709056, %esi - cmpl $1073741824, %esi - jae ..B1.40 -..B1.4: - cmpl $8192, %esi - jae ..B1.21 -..B1.5: - cmpl $64, %esi - jae ..B1.14 -..B1.6: - cmpl $16383, %edx - je ..B1.38 -..B1.7: - movzwl 50(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.11 -..B1.8: - orl $-64768, %edx - movw %dx, 48(%rsp) -..B1.9: - fldcw 48(%rsp) -..B1.10: - movb $1, %cl -..B1.11: - fldt 64(%rsp) - lea 8+_ones(%rip), %rax - lea _TWO_52H(%rip), %rdx - lea 80+_Q1(%rip), %rsi - lea 48+_Q1(%rip), %rdi - lea 16+_Q1(%rip), %r8 - lea 64+_Q1(%rip), %r9 - lea 32+_Q1(%rip), %r10 - lea _Q1(%rip), %r11 - testb %cl, %cl - fldl (%rdx) - fld %st(0) - fxch %st(2) - faddl (%rax) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(0) - fmul %st(1), %st - fld %st(1) - fsub %st(4), %st - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rsi) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%r11) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - fmul %st, %st(2) - fld %st(2) - fxch %st(1) - fmulp %st, %st(5) - fadd %st(4), %st - fsqrt - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(4) - fld %st(3) - fsubr %st(1), %st - fld %st(4) - fmul %st(5), %st - fsubrp %st, %st(6) - fld %st(4) - fmul %st(1), %st - fsubrp %st, %st(6) - fxch %st(3) - faddp %st, %st(5) - fdivrp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(2) - fadd %st(1), %st - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.13 -..B1.12: - fldcw 50(%rsp) -..B1.13: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.14: - movzwl 50(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.18 -..B1.15: - orl $-64768, %edx - movw %dx, 48(%rsp) -..B1.16: - fldcw 48(%rsp) -..B1.17: - movb $1, %cl -..B1.18: - fldt 64(%rsp) - lea 8+_ones(%rip), %rax - lea _TWO_52H(%rip), %rdx - lea 208+_Q(%rip), %rsi - lea 176+_Q(%rip), %rdi - lea 144+_Q(%rip), %r8 - lea 112+_Q(%rip), %r9 - lea 80+_Q(%rip), %r10 - lea 48+_Q(%rip), %r11 - testb %cl, %cl - fldl (%rdx) - lea 192+_Q(%rip), %rdx - fstpt 16(%rsp) - fldt 16(%rsp) - fldt (%rdi) - lea 128+_Q(%rip), %rdi - fldt (%r8) - lea 96+_Q(%rip), %r8 - fxch %st(3) - faddl (%rax) - lea 16+_Q(%rip), %rax - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fld %st(1) - fsub %st(4), %st - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fxch %st(5) - fstpt 32(%rsp) - fldt 32(%rsp) - fmul %st(0), %st - fadd %st, %st(5) - fxch %st(3) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rsi) - lea 160+_Q(%rip), %rsi - fmul %st(6), %st - faddp %st, %st(5) - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(6) - fxch %st(4) - fmul %st, %st(5) - fldt (%r9) - lea 64+_Q(%rip), %r9 - faddp %st, %st(6) - fmul %st, %st(5) - fldt (%r10) - lea 32+_Q(%rip), %r10 - faddp %st, %st(6) - fmul %st, %st(5) - fldt (%r11) - lea _Q(%rip), %r11 - faddp %st, %st(6) - fmul %st, %st(5) - fldt (%rax) - lea 240+_Q(%rip), %rax - faddp %st, %st(6) - fmul %st, %st(5) - fldt (%rdx) - lea 224+_Q(%rip), %rdx - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(4) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fmulp %st, %st(1) - fldt (%rdx) - fld %st(0) - fmul %st(3), %st - faddp %st, %st(4) - fldt 32(%rsp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%rsp) - fld %st(0) - fadd %st(3), %st - fsub %st(1), %st - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fldt .L_2il0floatpacket.0(%rip) - fmul %st, %st(4) - fld %st(4) - fxch %st(1) - fmulp %st, %st(3) - fadd %st(2), %st - fsqrt - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fsubrp %st, %st(3) - fld %st(1) - fsubr %st(1), %st - fld %st(2) - fmul %st(1), %st - fsubrp %st, %st(4) - fxch %st(5) - faddp %st, %st(3) - fdivrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fld %st(0) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(4) - fadd %st(3), %st - fmulp %st, %st(4) - fld %st(1) - fmul %st(3), %st - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fmul %st(2), %st - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.20 -..B1.19: - fldcw 50(%rsp) -..B1.20: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.21: - movzwl 50(%rsp), %esi - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.25 -..B1.22: - orl $-64768, %esi - movw %si, 48(%rsp) -..B1.23: - fldcw 48(%rsp) -..B1.24: - movzwl 72(%rsp), %edi - movl %edi, %edx - movb $1, %cl - andl $32767, %edx -..B1.25: - cmpl $16417, %edx - jge ..B1.34 -..B1.26: - fldt 64(%rsp) - cmpl $16388, %edx - jge ..B1.28 -..B1.27: - lea _TWO_52H(%rip), %rax - fld %st(0) - fld %st(1) - lea 8+_ones(%rip), %r8 - lea _ones(%rip), %rdx - fldl (%rax) - fld %st(0) - fxch %st(1) - fadd %st, %st(3) - fsubr %st, %st(3) - fld %st(3) - fxch %st(3) - fsub %st(4), %st - fmul %st, %st(3) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(3) - fld %st(3) - fmul %st(4), %st - faddl (%r8) - fld %st(0) - fadd %st(4), %st - fsqrt - fadd %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fsubrp %st, %st(1) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fdivrp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl (%rdx) - jmp ..B1.33 -..B1.28: - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_32H(%rip), %rax - fmul %st(1), %st - lea _ones(%rip), %rsi - fld %st(0) - lea 8+_ones(%rip), %r8 - fldl (%rax) - cmpl $16394, %edx - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubr %st(1), %st - fldl (%rsi) - fldl (%r8) - jge ..B1.30 -..B1.29: - fstp %st(3) - fld %st(3) - fadd %st(3), %st - fld %st(4) - fadd %st(2), %st - fmulp %st, %st(1) - fsqrt - faddp %st, %st(4) - fxch %st(3) - fdivrp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - jmp ..B1.33 -..B1.30: - fstp %st(4) - cmpl $16401, %edx - jge ..B1.32 -..B1.31: - fld %st(3) - fdiv %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fdivrp %st, %st(3) - faddp %st, %st(2) - jmp ..B1.33 -..B1.32: - fxch %st(2) - fdivrp %st, %st(3) - faddp %st, %st(2) -..B1.33: - fldt 16(%rsp) - fld %st(0) - fadd %st(3), %st - fstpt 64(%rsp) - movzwl 72(%rsp), %edx - andl $32767, %edx - movl %edx, %eax - addl $-16383, %edx - negl %eax - fxch %st(1) - fstpt (%rsp) - addl $-2, %eax - movzwl 8(%rsp), %esi - andl $32767, %eax - andl $-32768, %esi - orl %eax, %esi - movw %si, 8(%rsp) - fldt (%rsp) - fmul %st, %st(1) - fxch %st(1) - fstpt 16(%rsp) - fmulp %st, %st(1) - jmp ..B1.35 -..B1.34: - lea _TWO_52H(%rip), %rax - andl $-32768, %edi - orl $-49153, %edi - addl $-16382, %edx - movw %di, 72(%rsp) - lea 8+_ones(%rip), %r8 - fldt 64(%rsp) - fld %st(0) - fldl (%rax) - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(1) -..B1.35: - fldt 16(%rsp) - lea 16+_P(%rip), %r9 - movl 68(%rsp), %esi - lea 64+_P(%rip), %r10 - shrl $23, %esi - lea 32+_P(%rip), %r11 - movzbl %sil, %eax - fldt (%r9) - movq __libm_rcp_table_256@GOTPCREL(%rip), %rdi - movl %edx, 32(%rsp) - lea 80+_P(%rip), %rdx - fildl 32(%rsp) - flds (%rdi,%rax,4) - fmul %st, %st(3) - fmulp %st, %st(4) - fxch %st(2) - faddl (%r8) - fld %st(0) - lea 48+_P(%rip), %r8 - shlq $4, %rax - fadd %st(4), %st - fld %st(0) - testb %cl, %cl - fmul %st(1), %st - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea _P(%rip), %rdx - fmul %st(2), %st - fldt (%r8) - movq __libm_logl_table_256@GOTPCREL(%rip), %rsi - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - fmulp %st, %st(3) - fldt (%r10) - fmul %st(1), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.2(%rip) - fmul %st(2), %st - fldt .L_2il0floatpacket.3(%rip) - fmulp %st, %st(3) - faddl 8(%rsi,%rax) - faddp %st, %st(3) - fxch %st(1) - faddl (%rax,%rsi) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.37 -..B1.36: - fldcw 50(%rsp) -..B1.37: - fldt 16(%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.38: - movq $0x8000000000000000, %rax - cmpq 64(%rsp), %rax - jne ..B1.7 -..B1.39: - lea _zeros(%rip), %rax - fldl (%rax) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.40: - movzwl 50(%rsp), %esi - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.44 -..B1.41: - orl $-64768, %esi - movw %si, 48(%rsp) -..B1.42: - fldcw 48(%rsp) -..B1.43: - movzwl 72(%rsp), %edx - movb $1, %cl - andl $32767, %edx -..B1.44: - cmpl $32767, %edx - jne ..B1.47 -..B1.45: - movq $0x8000000000000000, %rax - cmpq 64(%rsp), %rax - je ..B1.51 -..B1.46: - fldt 64(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) - jmp ..B1.48 -..B1.47: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fstpt (%rsp) -..B1.48: - testb %cl, %cl - je ..B1.50 -..B1.49: - fldcw 50(%rsp) -..B1.50: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.51: - testb $-128, 73(%rsp) - je ..B1.46 - jmp ..B1.47 - .align 16,0x90 - .cfi_endproc - .type acoshl,@function - .size acoshl,.-acoshl - .data -# -- End acoshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_Q1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 37372 - .word 39321 - .word 39321 - .word 39321 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 18586 - .word 55971 - .word 28086 - .word 46811 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 15813 - .word 59837 - .word 36396 - .word 63715 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 53727 - .word 45078 - .word 40330 - .word 46917 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 48396 - .word 8155 - .word 33124 - .word 36271 - .word 16371 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,96 - .align 2 -_Q: - .word 48098 - .word 43690 - .word 43690 - .word 43690 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 20923 - .word 52462 - .word 52428 - .word 52428 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 38527 - .word 56172 - .word 28086 - .word 46811 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 47050 - .word 58060 - .word 36408 - .word 63715 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 28121 - .word 12720 - .word 53620 - .word 46917 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 5738 - .word 23392 - .word 25199 - .word 36391 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 9822 - .word 24561 - .word 52037 - .word 58572 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 32045 - .word 31633 - .word 41878 - .word 48451 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 16262 - .word 24754 - .word 13643 - .word 40941 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 36557 - .word 45689 - .word 21168 - .word 35169 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 29793 - .word 40103 - .word 23573 - .word 60969 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 51189 - .word 17117 - .word 14297 - .word 51855 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 6461 - .word 12463 - .word 55551 - .word 38957 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 34939 - .word 19802 - .word 20012 - .word 37205 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43696 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39328 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,256 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,96 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosl.S deleted file mode 100644 index 417a3ff052..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/acosl.S +++ /dev/null @@ -1,1366 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "acosl.c" - .text -..TXTST0: -# -- Begin acosl - .text - .align 16,0x90 - .globl acosl -acosl: -# parameter 1: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_acosl.1: -..L2: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %cl, %cl -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movb 105(%rsp), %dl - movzwl 104(%rsp), %edi - andb $-128, %dl - andl $32767, %edi - shrb $7, %dl - movzwl 82(%rsp), %eax - cmpl $16383, %edi - jge ..B1.60 -..B1.4: - cmpl $16382, %edi - jge ..B1.47 -..B1.5: - cmpl $16376, %edi - jge ..B1.37 -..B1.6: - cmpl $16371, %edi - jge ..B1.30 -..B1.7: - cmpl $16365, %edi - jge ..B1.23 -..B1.8: - cmpl $16308, %edi - jge ..B1.16 -..B1.9: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.13 -..B1.10: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.11: - fldcw 80(%rsp) -..B1.12: - movb $1, %cl -..B1.13: - fldt 96(%rsp) - lea 16+_pi_02(%rip), %rax - lea _pi_02(%rip), %rdx - testb %cl, %cl - fldt (%rax) - fsubp %st, %st(1) - fldt (%rdx) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.15 -..B1.14: - fldcw 82(%rsp) -..B1.15: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.16: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.20 -..B1.17: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.18: - fldcw 80(%rsp) -..B1.19: - movb $1, %cl -..B1.20: - fldt 96(%rsp) - lea _P4(%rip), %rax - lea 16+_pi_02(%rip), %rdx - lea _pi_02(%rip), %rsi - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fldt (%rdx) - fsubp %st, %st(1) - fldt (%rsi) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.22 -..B1.21: - fldcw 82(%rsp) -..B1.22: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.23: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.27 -..B1.24: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.25: - fldcw 80(%rsp) -..B1.26: - movb $1, %cl -..B1.27: - fldt 96(%rsp) - lea 16+_P3(%rip), %rax - fld %st(0) - lea _P3(%rip), %rdx - fmul %st(1), %st - lea 16+_pi_02(%rip), %rsi - fldt (%rax) - lea _pi_02(%rip), %rdi - fmul %st(1), %st - testb %cl, %cl - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fldt (%rsi) - fsubp %st, %st(1) - fldt (%rdi) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.29 -..B1.28: - fldcw 82(%rsp) -..B1.29: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.30: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.34 -..B1.31: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.32: - fldcw 80(%rsp) -..B1.33: - movb $1, %cl -..B1.34: - fldt 96(%rsp) - lea _TWO_32H(%rip), %rax - fld %st(0) - lea 48+_P2(%rip), %rdx - fmul %st(1), %st - lea 16+_P2(%rip), %rsi - fld %st(0) - lea 32+_P2(%rip), %rdi - fmul %st(1), %st - fld %st(2) - lea _P2(%rip), %r8 - fld %st(3) - fldl (%rax) - lea 16+_pi_02(%rip), %r9 - fmul %st(5), %st - lea _pi_02(%rip), %r10 - testb %cl, %cl - fadd %st, %st(2) - fsubrp %st, %st(2) - fsub %st(1), %st - fldt (%rdx) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - fmulp %st, %st(4) - fldt (%r8) - faddp %st, %st(4) - fxch %st(4) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt (%r9) - fsubp %st, %st(1) - fldt (%r10) - fsubp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.36 -..B1.35: - fldcw 82(%rsp) -..B1.36: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.37: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.41 -..B1.38: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.39: - fldcw 80(%rsp) -..B1.40: - movzwl 104(%rsp), %edi - movb $1, %cl - andl $32767, %edi -..B1.41: - fldt 96(%rsp) - lea _TWO_52H(%rip), %rax - fld %st(0) - cmpl $16381, %edi - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fldl (%rax) - fmul %st, %st(2) - fstpt 32(%rsp) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(1) - fld %st(1) - fsub %st(3), %st - fmul %st, %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fld %st(3) - fmul %st(4), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fld %st(2) - fmul %st(2), %st - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fld %st(1) - fmul %st(2), %st - fadd %st, %st(1) - fxch %st(3) - fstpt 16(%rsp) - jge ..B1.43 -..B1.42: - fstp %st(2) - lea 176+_P1(%rip), %rax - lea 144+_P1(%rip), %rdx - lea 112+_P1(%rip), %rsi - lea 80+_P1(%rip), %rdi - lea 160+_P1(%rip), %r10 - lea 48+_P1(%rip), %r8 - lea 128+_P1(%rip), %r11 - lea 16+_P1(%rip), %r9 - fldt (%rax) - lea 96+_P1(%rip), %rax - fmul %st(2), %st - fldt (%rdx) - lea 64+_P1(%rip), %rdx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 32+_P1(%rip), %rsi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - lea _P1(%rip), %rdi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - lea 192+_P1(%rip), %r8 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%rdi) - faddp %st, %st(3) - fldt 64(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 16(%rsp) - fldt (%r8) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - fxch %st(1) - jmp ..B1.44 -..B1.43: - lea 272+_P(%rip), %rax - lea 240+_P(%rip), %rdx - lea 208+_P(%rip), %rsi - lea 176+_P(%rip), %rdi - lea 144+_P(%rip), %r8 - lea 112+_P(%rip), %r9 - lea 80+_P(%rip), %r10 - lea 48+_P(%rip), %r11 - fldt (%rax) - lea 16+_P(%rip), %rax - fmul %st(1), %st - fldt (%rdx) - lea 256+_P(%rip), %rdx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - lea 224+_P(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - lea 192+_P(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - lea 160+_P(%rip), %r8 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - lea 128+_P(%rip), %r9 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - lea 96+_P(%rip), %r10 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - lea 64+_P(%rip), %r11 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - lea 32+_P(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdx) - lea _P(%rip), %rdx - fmul %st(2), %st - fldt (%rsi) - lea 304+_P(%rip), %rsi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 288+_P(%rip), %rdi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rdx) - faddp %st, %st(2) - fldt 64(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 48(%rsp) - fldt 16(%rsp) - fldt (%rsi) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(4) - fldt (%rdi) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fld %st(3) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 32(%rsp) - fmul %st(3), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) -..B1.44: - fldt (%rsp) - lea _pi_02(%rip), %rax - fmulp %st, %st(1) - fld %st(2) - fmul %st(2), %st - lea 16+_pi_02(%rip), %rdx - testb %cl, %cl - faddp %st, %st(1) - faddp %st, %st(2) - fmul %st(2), %st - faddp %st, %st(2) - fldt (%rax) - fld %st(0) - fsubr %st(3), %st - fchs - fsub %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fldt (%rdx) - fsubp %st, %st(2) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.46 -..B1.45: - fldcw 82(%rsp) -..B1.46: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.47: - movl %eax, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.51 -..B1.48: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.49: - fldcw 80(%rsp) -..B1.50: - movb $1, %cl -..B1.51: - fldt 96(%rsp) - lea _ones(%rip), %rsi - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_32H(%rip), %rdi - movzbl %dl, %eax - lea _TWO_52H(%rip), %r8 - fldl (%rdi) - fxch %st(2) - fmull (%rsi,%rax,8) - fldl (%r8) - fstpt 16(%rsp) - fldt 16(%rsp) - fxch %st(1) - fsubrl (%rsi) - fmul %st(2), %st - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fsubp %st, %st(4) - fld %st(3) - fxch %st(1) - fsub %st(4), %st - fadd %st, %st(1) - fxch %st(1) - fsqrt - fmul %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fsubr %st, %st(5) - fld %st(3) - fxch %st(2) - fsub %st(4), %st - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(6) - fxch %st(2) - faddp %st, %st(5) - fld %st(2) - fadd %st(1), %st - fdivrp %st, %st(5) - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fld %st(0) - fmul %st(3), %st - fld %st(2) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(0) - fadd %st(5), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fld %st(1) - fmul %st(6), %st - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(1) - fstpt (%rsp) - fld %st(4) - fmul %st(5), %st - fadd %st, %st(1) - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - fstpt 96(%rsp) - fldt 96(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fcomip %st(1), %st - fstp %st(0) - jbe ..B1.53 -..B1.52: - fstp %st(1) - lea 176+_P1(%rip), %rax - lea 144+_P1(%rip), %rsi - lea 112+_P1(%rip), %rdi - lea 80+_P1(%rip), %r8 - lea 160+_P1(%rip), %r11 - lea 48+_P1(%rip), %r9 - lea 16+_P1(%rip), %r10 - fldt (%rax) - lea 128+_P1(%rip), %rax - fmul %st(1), %st - fldt (%rsi) - lea 96+_P1(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - lea 64+_P1(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - lea 32+_P1(%rip), %r8 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - lea _P1(%rip), %r9 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - lea 192+_P1(%rip), %r10 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r9) - faddp %st, %st(2) - fldt 48(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt (%rsp) - fldt (%r10) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(4) - fxch %st(3) - jmp ..B1.54 -..B1.53: - lea 272+_P(%rip), %rax - lea 240+_P(%rip), %rsi - lea 208+_P(%rip), %rdi - lea 176+_P(%rip), %r8 - lea 144+_P(%rip), %r9 - lea 112+_P(%rip), %r10 - lea 80+_P(%rip), %r11 - fldt (%rax) - lea 48+_P(%rip), %rax - fmul %st(1), %st - fldt (%rsi) - lea 16+_P(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - lea 256+_P(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - lea 224+_P(%rip), %r8 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - lea 192+_P(%rip), %r9 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - lea 160+_P(%rip), %r10 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - lea 128+_P(%rip), %r11 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - lea 96+_P(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - lea 64+_P(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - lea 32+_P(%rip), %rdi - fmul %st(2), %st - fldt (%r8) - lea _P(%rip), %r8 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - lea 304+_P(%rip), %r9 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - lea 288+_P(%rip), %r10 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r8) - faddp %st, %st(2) - fldt 48(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 32(%rsp) - fldt (%rsp) - fldt (%r9) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(3) - fldt (%r10) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fld %st(0) - fldt 16(%rsp) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(4) -..B1.54: - fldt 64(%rsp) - testb %dl, %dl - fmulp %st, %st(4) - fld %st(2) - fmul %st(1), %st - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - je ..B1.56 -..B1.55: - fstp %st(3) - fstp %st(0) - fldt .L_2il0floatpacket.2(%rip) - lea _pi_00(%rip), %rax - lea 16+_pi_00(%rip), %rdx - fmul %st, %st(2) - fmulp %st, %st(1) - fldt (%rax) - fld %st(0) - fadd %st(3), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fldt (%rdx) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - jmp ..B1.57 -..B1.56: - fldt .L_2il0floatpacket.3(%rip) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.57: - testb %cl, %cl - je ..B1.59 -..B1.58: - fldcw 82(%rsp) -..B1.59: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.60: - movl %eax, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.64 -..B1.61: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.62: - fldcw 80(%rsp) -..B1.63: - movzwl 104(%rsp), %edi - movb $1, %cl - andl $32767, %edi -..B1.64: - cmpl $32767, %edi - jne ..B1.68 -..B1.65: - cmpl $-2147483648, 100(%rsp) - jne ..B1.67 -..B1.66: - cmpl $0, 96(%rsp) - je ..B1.74 -..B1.67: - fldt 96(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) - jmp ..B1.75 -..B1.68: - cmpl $16383, %edi - jne ..B1.74 -..B1.69: - cmpl $-2147483648, 100(%rsp) - jne ..B1.74 -..B1.70: - cmpl $0, 96(%rsp) - jne ..B1.74 -..B1.71: - testb %dl, %dl - je ..B1.73 -..B1.72: - lea _pi_0l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rax) - fldt (%rdx) - fsubrp %st, %st(1) - fstpt 8(%rsp) - jmp ..B1.75 -..B1.73: - lea _zeros(%rip), %rax - fldl (%rax) - fstpt 8(%rsp) - jmp ..B1.75 -..B1.74: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 8(%rsp) -..B1.75: - testb %cl, %cl - je ..B1.77 -..B1.76: - fldcw 82(%rsp) -..B1.77: - fldt 8(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type acosl,@function - .size acosl,.-acosl - .data -# -- End acosl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_pi_02: - .word 0 - .word 0 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 35374 - .word 4889 - .word 2259 - .word 34211 - .word 16349 - .word 0 - .word 0 - .word 0 - .type _pi_02,@object - .size _pi_02,32 - .align 2 -_P4: - .word 43691 - .word 44938 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P4,@object - .size _P4,16 - .align 2 -_P3: - .word 36763 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 40704 - .word 58046 - .word 39460 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _P3,@object - .size _P3,32 - .align 2 -_P2: - .word 43688 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 20771 - .word 39331 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 23807 - .word 53798 - .word 28073 - .word 46811 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 35198 - .word 7516 - .word 54204 - .word 63722 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _P2,@object - .size _P2,64 - .align 2 -_P1: - .word 43589 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 39364 - .word 39321 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 17602 - .word 56173 - .word 28086 - .word 46811 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 47501 - .word 58414 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 27078 - .word 6583 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 39781 - .word 21053 - .word 25224 - .word 36391 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 46568 - .word 6235 - .word 50749 - .word 58572 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 41318 - .word 51558 - .word 37628 - .word 48452 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 55026 - .word 7893 - .word 43866 - .word 40925 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 43387 - .word 19951 - .word 2911 - .word 35445 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 32572 - .word 59281 - .word 11243 - .word 56666 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 49800 - .word 50337 - .word 42707 - .word 39184 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,208 - .align 2 -_P: - .word 42691 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 4317 - .word 52400 - .word 52428 - .word 52428 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 26206 - .word 56172 - .word 28086 - .word 46811 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 36130 - .word 58514 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 21592 - .word 8113 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 3093 - .word 49950 - .word 25215 - .word 36391 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 21499 - .word 24428 - .word 51889 - .word 58572 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 54828 - .word 41264 - .word 61120 - .word 48451 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 10243 - .word 1489 - .word 39717 - .word 40940 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 51433 - .word 46039 - .word 63564 - .word 35220 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 60402 - .word 39286 - .word 25675 - .word 60826 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 34219 - .word 36833 - .word 44839 - .word 57547 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 13013 - .word 26091 - .word 19721 - .word 60832 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 22353 - .word 41544 - .word 55443 - .word 55735 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 14948 - .word 7038 - .word 38091 - .word 38339 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 61727 - .word 61480 - .word 15906 - .word 51927 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 13386 - .word 23084 - .word 64443 - .word 55906 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 17499 - .word 23573 - .word 43947 - .word 42761 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39328 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,320 - .align 2 -_pi_00: - .word 0 - .word 0 - .word 55970 - .word 51471 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 35374 - .word 4889 - .word 2259 - .word 34211 - .word 16350 - .word 0 - .word 0 - .word 0 - .type _pi_00,@object - .size _pi_00,32 - .align 2 -_pi_0l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49152 - .word 0 - .word 0 - .word 0 - .type _pi_0l,@object - .size _pi_0l,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asin.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asin.S deleted file mode 100644 index 1de85746a3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asin.S +++ /dev/null @@ -1,1998 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asin.c" - .text -..TXTST0: -# -- Begin asin - .text - .align 16,0x90 - .globl asin -asin: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_asin.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) -..B1.2: - stmxcsr 16(%rsp) - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - jne .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - movsd ABSVALMASK(%rip), %xmm4 - movsd ONEMASK(%rip), %xmm3 - xorpd %xmm5, %xmm5 - movsd TMASK(%rip), %xmm2 - movl $8192, %ecx - pinsrw $2, %ecx, %xmm5 - movq %xmm0, %xmm1 - psrlq $44, %xmm0 - movd %xmm0, %edx - movq %xmm1, %xmm7 - movl $8192, %ecx - pinsrw $2, %ecx, %xmm5 - movq %xmm1, %xmm0 - movl $524287, %eax - andl %edx, %eax - subl $260864, %eax - cmpl $955, %eax - jae .L_2TAG_PACKET_2.0.2 - mulsd %xmm1, %xmm1 - andl $65535, %edx - subsd %xmm1, %xmm3 - sqrtsd %xmm3, %xmm3 - andpd %xmm7, %xmm2 - andl $-4, %edx - subl $64256, %edx - lea T_table(%rip), %r8 - movsd (%r8,%rdx,2), %xmm1 - orpd %xmm5, %xmm2 - lea Tbl_addr(%rip), %r8 - movapd (%r8,%rdx,4), %xmm4 - movq %xmm7, %xmm6 - addsd %xmm2, %xmm7 - subsd %xmm2, %xmm0 - mulsd %xmm7, %xmm0 - mulsd %xmm1, %xmm6 - mulsd %xmm2, %xmm3 - movq %xmm6, %xmm1 - addsd %xmm3, %xmm6 - divsd %xmm6, %xmm0 - movsd 16+cv(%rip), %xmm7 - movsd cv(%rip), %xmm5 - subsd %xmm3, %xmm1 - andpd SIGNMASK(%rip), %xmm2 - movq %xmm1, %xmm3 - mulsd %xmm1, %xmm1 - movsd 8+cv(%rip), %xmm6 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm7 - mulsd %xmm3, %xmm5 - xorpd %xmm2, %xmm4 - mulsd %xmm1, %xmm3 - addsd %xmm7, %xmm6 - mulsd %xmm3, %xmm6 - addsd %xmm4, %xmm5 - pshufd $238, %xmm4, %xmm4 - addsd %xmm5, %xmm6 - orpd %xmm2, %xmm4 - addsd %xmm6, %xmm0 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - je .L_2TAG_PACKET_3.0.2 - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) -.L_2TAG_PACKET_3.0.2: - addsd %xmm4, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_2.0.2: - subl $955, %eax - cmpl $67, %eax - jae .L_2TAG_PACKET_4.0.2 - mulsd %xmm1, %xmm1 - subsd %xmm1, %xmm3 - sqrtsd %xmm3, %xmm3 - movl %edx, %eax - andpd ABSVALMASK(%rip), %xmm0 - andpd HALFMASK2(%rip), %xmm7 - movq %xmm0, %xmm1 - movsd ONEMASK(%rip), %xmm4 - movq %xmm7, %xmm6 - subsd %xmm7, %xmm1 - mulsd %xmm7, %xmm7 - addsd %xmm6, %xmm0 - subsd %xmm7, %xmm4 - mulsd %xmm1, %xmm0 - movq %xmm3, %xmm7 - andpd %xmm3, %xmm2 - psllq $2, %xmm3 - pextrw $3, %xmm3, %edx - orpd %xmm5, %xmm2 - subl $65216, %edx - addl %edx, %edx - lea T_table(%rip), %r8 - mulsd (%r8,%rdx,4), %xmm7 - mulsd %xmm2, %xmm6 - movapd PI_BY_2(%rip), %xmm3 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - subsd %xmm7, %xmm6 - addsd %xmm1, %xmm6 - subsd %xmm2, %xmm4 - addsd %xmm7, %xmm7 - movsd cv(%rip), %xmm5 - subsd %xmm0, %xmm4 - addsd %xmm6, %xmm7 - movsd 16+cv(%rip), %xmm0 - divsd %xmm7, %xmm4 - movsd 8+cv(%rip), %xmm2 - lea Tbl_addr(%rip), %r8 - subpd (%r8,%rdx,8), %xmm3 - movq %xmm6, %xmm1 - mulsd %xmm6, %xmm6 - andl $524288, %eax - shrl $4, %eax - mulsd %xmm6, %xmm0 - mulsd %xmm6, %xmm1 - mulsd %xmm1, %xmm5 - mulsd %xmm6, %xmm1 - addsd %xmm2, %xmm0 - pxor %xmm6, %xmm6 - mulsd %xmm1, %xmm0 - addsd %xmm3, %xmm5 - pinsrw $3, %eax, %xmm6 - addsd %xmm5, %xmm0 - movq %xmm4, %xmm5 - pshufd $238, %xmm3, %xmm3 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm3 - subsd %xmm3, %xmm5 - subsd %xmm5, %xmm0 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - je .L_2TAG_PACKET_5.0.2 - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) -.L_2TAG_PACKET_5.0.2: - xorpd %xmm6, %xmm0 - xorpd %xmm6, %xmm4 - subsd %xmm4, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_4.0.2: - addl $15291, %eax - cmpl $14336, %eax - jae .L_2TAG_PACKET_6.0.2 - unpcklpd %xmm7, %xmm7 - movapd cv2(%rip), %xmm1 - movapd %xmm7, %xmm6 - movapd 16+cv2(%rip), %xmm2 - movapd 32+cv2(%rip), %xmm4 - mulpd %xmm7, %xmm7 - mulpd %xmm7, %xmm6 - mulpd %xmm7, %xmm1 - mulpd %xmm7, %xmm7 - movq %xmm6, %xmm3 - mulsd %xmm6, %xmm6 - addpd %xmm2, %xmm1 - mulpd %xmm7, %xmm4 - mulsd %xmm3, %xmm6 - addpd %xmm4, %xmm1 - mulpd %xmm6, %xmm1 - pshufd $238, %xmm1, %xmm2 - addsd %xmm2, %xmm1 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - je .L_2TAG_PACKET_7.0.2 - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) -.L_2TAG_PACKET_7.0.2: - addsd %xmm1, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_6.0.2: - subl $15358, %eax - cmpl $2, %eax - jae .L_2TAG_PACKET_8.0.2 - mulsd %xmm1, %xmm1 - subsd %xmm1, %xmm3 - sqrtsd %xmm3, %xmm3 - movl %edx, %eax - andpd HALFMASK(%rip), %xmm7 - pshufd $68, %xmm3, %xmm5 - andpd HALFMASK(%rip), %xmm3 - movq %xmm7, %xmm1 - movsd ONEMASK(%rip), %xmm4 - movq %xmm7, %xmm6 - subsd %xmm7, %xmm0 - mulsd %xmm7, %xmm7 - addsd %xmm1, %xmm1 - mulsd %xmm0, %xmm1 - subsd %xmm7, %xmm4 - movq %xmm3, %xmm6 - mulsd %xmm3, %xmm3 - mulsd %xmm0, %xmm0 - subsd %xmm1, %xmm4 - subsd %xmm5, %xmm6 - addsd %xmm5, %xmm5 - subsd %xmm3, %xmm4 - movapd cv2(%rip), %xmm2 - pshufd $238, %xmm5, %xmm3 - subsd %xmm0, %xmm4 - addsd %xmm6, %xmm5 - pshufd $238, %xmm3, %xmm7 - addsd %xmm3, %xmm3 - mulsd %xmm6, %xmm5 - addsd %xmm5, %xmm4 - pshufd $238, %xmm7, %xmm6 - divsd %xmm3, %xmm4 - movapd 48+cv2(%rip), %xmm1 - movapd 16+cv2(%rip), %xmm5 - movapd 32+cv2(%rip), %xmm0 - mulpd %xmm7, %xmm7 - movq %xmm6, %xmm3 - mulpd %xmm7, %xmm2 - mulpd %xmm7, %xmm6 - shrl $4, %eax - andl $32768, %eax - mulsd %xmm7, %xmm1 - mulpd %xmm7, %xmm7 - addpd %xmm2, %xmm5 - movapd %xmm6, %xmm2 - mulsd %xmm6, %xmm6 - mulpd %xmm0, %xmm7 - movapd PI_BY_2(%rip), %xmm0 - mulsd %xmm6, %xmm2 - addpd %xmm5, %xmm7 - pshufd $238, %xmm1, %xmm5 - mulsd %xmm2, %xmm6 - mulpd %xmm2, %xmm7 - addsd %xmm5, %xmm1 - xorpd %xmm5, %xmm5 - pshufd $238, %xmm7, %xmm2 - mulsd %xmm6, %xmm1 - pshufd $238, %xmm0, %xmm6 - addsd %xmm2, %xmm7 - movq %xmm3, %xmm2 - pinsrw $3, %eax, %xmm5 - subsd %xmm6, %xmm3 - addsd %xmm1, %xmm0 - addsd %xmm3, %xmm6 - addsd %xmm4, %xmm7 - subsd %xmm6, %xmm2 - subsd %xmm7, %xmm0 - subsd %xmm2, %xmm0 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - je .L_2TAG_PACKET_9.0.2 - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) -.L_2TAG_PACKET_9.0.2: - xorpd %xmm5, %xmm0 - xorpd %xmm5, %xmm3 - subsd %xmm3, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_8.0.2: - addl $261886, %eax - cmpl $261888, %eax - jb .L_2TAG_PACKET_10.0.2 - movd %xmm0, %ecx - psrlq $32, %xmm0 - movd %xmm0, %edx - andl $2147483647, %edx - movl $1072693248, %eax - subl %edx, %eax - orl %ecx, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_11.0.2 - movsd (%rsp), %xmm2 - movd %xmm2, %edx - psrlq $32, %xmm2 - movd %xmm2, %ecx - andl $2147483647, %ecx - subl $1, %edx - sbbl $2146435072, %ecx - cmpl $0, %ecx - jge .L_2TAG_PACKET_10.0.2 - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %edx - pinsrw $3, %edx, %xmm1 - mulsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_12.0.2 -.L_2TAG_PACKET_11.0.2: - movsd ABSVALMASK(%rip), %xmm1 - movsd PI_BY_2(%rip), %xmm2 - movsd 8+PI_BY_2(%rip), %xmm0 - addsd %xmm2, %xmm0 - andnpd %xmm7, %xmm1 - orpd %xmm1, %xmm0 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - je .L_2TAG_PACKET_13.0.2 - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) -.L_2TAG_PACKET_13.0.2: - jmp ..B1.5 -.L_2TAG_PACKET_10.0.2: - movsd (%rsp), %xmm0 - xorpd %xmm6, %xmm6 - movq %xmm0, %xmm7 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - je .L_2TAG_PACKET_14.0.2 - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) -.L_2TAG_PACKET_14.0.2: - pextrw $3, %xmm0, %edx - andl $32752, %edx - subl $16, %edx - cmpl $32736, %edx - jb .L_2TAG_PACKET_15.0.2 - addsd %xmm0, %xmm6 - orpd %xmm6, %xmm0 - mulsd %xmm0, %xmm7 -.L_2TAG_PACKET_15.0.2: - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - movl %eax, 20(%rsp) - ldmxcsr 20(%rsp) - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_12.0.2: - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - je .L_2TAG_PACKET_16.0.2 - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) -.L_2TAG_PACKET_16.0.2: - movq %xmm0, 8(%rsp) -..B1.3: - movq 8(%rsp), %xmm0 -.L_2TAG_PACKET_17.0.2: -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type asin,@function - .size asin,.-asin - .data -# -- End asin - .section .rodata, "a" - .align 16 - .align 16 -ABSVALMASK: - .long 4294967295 - .long 2147483647 - .long 0 - .long 0 - .type ABSVALMASK,@object - .size ABSVALMASK,16 - .align 16 -T_table: - .long 2642784509 - .long 1072689083 - .long 1514442531 - .long 1072688953 - .long 333108933 - .long 1072688821 - .long 3392112024 - .long 1072688686 - .long 2099852862 - .long 1072688550 - .long 749609004 - .long 1072688412 - .long 3634632596 - .long 1072688271 - .long 2163248461 - .long 1072688129 - .long 628657846 - .long 1072687985 - .long 3324036511 - .long 1072687838 - .long 1657632815 - .long 1072687690 - .long 4217538760 - .long 1072687539 - .long 2411951597 - .long 1072687387 - .long 533944872 - .long 1072687233 - .long 2876566508 - .long 1072687076 - .long 847936891 - .long 1072686918 - .long 3036019913 - .long 1072686757 - .long 848884575 - .long 1072686595 - .long 2874443326 - .long 1072686430 - .long 520713666 - .long 1072686264 - .long 2375556481 - .long 1072686095 - .long 4141904948 - .long 1072685924 - .long 1522666382 - .long 1072685752 - .long 3105624104 - .long 1072685577 - .long 298666327 - .long 1072685401 - .long 1689524500 - .long 1072685222 - .long 2981002200 - .long 1072685041 - .long 4170844284 - .long 1072684858 - .long 961802263 - .long 1072684674 - .long 1941503454 - .long 1072684487 - .long 2812647170 - .long 1072684298 - .long 3572873869 - .long 1072684107 - .long 4219797823 - .long 1072683914 - .long 456039788 - .long 1072683720 - .long 869096151 - .long 1072683523 - .long 1161535119 - .long 1072683324 - .long 1330865866 - .long 1072683123 - .long 1374571204 - .long 1072682920 - .long 1290107538 - .long 1072682715 - .long 1074904836 - .long 1072682508 - .long 726366587 - .long 1072682299 - .long 241869763 - .long 1072682088 - .long 3913732079 - .long 1072681874 - .long 3149342765 - .long 1072681659 - .long 2240966306 - .long 1072681442 - .long 1185873216 - .long 1072681223 - .long 4276274591 - .long 1072681001 - .long 2919452883 - .long 1072680778 - .long 1407565635 - .long 1072680553 - .long 4032743551 - .long 1072680325 - .long 2202188565 - .long 1072680096 - .long 207977577 - .long 1072679865 - .long 2342160518 - .long 1072679631 - .long 11858423 - .long 1072679396 - .long 1804034453 - .long 1072679158 - .long 3420722787 - .long 1072678918 - .long 563930456 - .long 1072678677 - .long 1820539192 - .long 1072678433 - .long 2892501606 - .long 1072678187 - .long 3776710320 - .long 1072677939 - .long 175063337 - .long 1072677690 - .long 674333171 - .long 1072677438 - .long 976363026 - .long 1072677184 - .long 1077935934 - .long 1072676928 - .long 1921075490 - .long 1072676540 - .long 881493302 - .long 1072676016 - .long 3275752439 - .long 1072675483 - .long 486855588 - .long 1072674943 - .long 1077229111 - .long 1072674394 - .long 723950308 - .long 1072673837 - .long 3693582199 - .long 1072673271 - .long 1367335316 - .long 1072672698 - .long 2305837020 - .long 1072672116 - .long 2184358641 - .long 1072671526 - .long 972682840 - .long 1072670928 - .long 2935101762 - .long 1072670321 - .long 3745513263 - .long 1072669706 - .long 3372320886 - .long 1072669083 - .long 1783464620 - .long 1072668452 - .long 3241386215 - .long 1072667812 - .long 3418125284 - .long 1072667164 - .long 2280219148 - .long 1072666508 - .long 4088700758 - .long 1072665843 - .long 219227400 - .long 1072665171 - .long 3521816918 - .long 1072664489 - .long 1076205279 - .long 1072663800 - .long 1436484616 - .long 1072663102 - .long 271362610 - .long 1072662396 - .long 1838996688 - .long 1072661681 - .long 1807122518 - .long 1072660958 - .long 137953542 - .long 1072660227 - .long 1088178584 - .long 1072659487 - .long 324057537 - .long 1072658739 - .long 2101288076 - .long 1072657982 - .long 2085133974 - .long 1072657217 - .long 235324451 - .long 1072656444 - .long 806051592 - .long 1072655662 - .long 3756033140 - .long 1072654871 - .long 453542543 - .long 1072654073 - .long 3741177327 - .long 1072653265 - .long 691216109 - .long 1072652450 - .long 4145223372 - .long 1072651625 - .long 1174439091 - .long 1072650793 - .long 324416139 - .long 1072649952 - .long 1550246310 - .long 1072649102 - .long 511524674 - .long 1072648244 - .long 1457248482 - .long 1072647377 - .long 45944955 - .long 1072646502 - .long 525537397 - .long 1072645618 - .long 2848440188 - .long 1072644725 - .long 2671555633 - .long 1072643824 - .long 4241172637 - .long 1072642914 - .long 3213094278 - .long 1072641996 - .long 3832503688 - .long 1072641069 - .long 1754091534 - .long 1072640134 - .long 1221921804 - .long 1072639190 - .long 2184526489 - .long 1072638237 - .long 294902089 - .long 1072637276 - .long 4090375270 - .long 1072636305 - .long 632860906 - .long 1072635327 - .long 2753498702 - .long 1072634339 - .long 1808009252 - .long 1072633343 - .long 2036428672 - .long 1072632338 - .long 3383235626 - .long 1072631324 - .long 1497347484 - .long 1072630302 - .long 617018317 - .long 1072629271 - .long 684933058 - .long 1072628231 - .long 1643170798 - .long 1072627182 - .long 3011066360 - .long 1072625592 - .long 957158713 - .long 1072623442 - .long 1390907941 - .long 1072621256 - .long 3819155270 - .long 1072619034 - .long 3443571196 - .long 1072616777 - .long 4045412458 - .long 1072614484 - .long 805503923 - .long 1072612156 - .long 1778922015 - .long 1072609791 - .long 2125033665 - .long 1072607390 - .long 1287203863 - .long 1072604953 - .long 2992629568 - .long 1072602479 - .long 2367267127 - .long 1072599969 - .long 3115526047 - .long 1072597422 - .long 340219539 - .long 1072594839 - .long 2017215719 - .long 1072592218 - .long 3225443424 - .long 1072589560 - .long 3326565673 - .long 1072586865 - .long 1669811211 - .long 1072584133 - .long 1886735022 - .long 1072581363 - .long 3301071171 - .long 1072578555 - .long 928514283 - .long 1072575710 - .long 2656364059 - .long 1072572826 - .long 3473490507 - .long 1072569904 - .long 2649965606 - .long 1072566944 - .long 3736819052 - .long 1072563945 - .long 1680885175 - .long 1072560908 - .long 4413771 - .long 1072557832 - .long 2214869753 - .long 1072554716 - .long 3214725184 - .long 1072551561 - .long 2186079903 - .long 1072548367 - .long 2590372131 - .long 1072545133 - .long 3578146079 - .long 1072541859 - .long 4283712755 - .long 1072538545 - .long 3824834510 - .long 1072535191 - .long 1302400298 - .long 1072531797 - .long 95058636 - .long 1072528362 - .long 3563906063 - .long 1072524885 - .long 2167230730 - .long 1072521368 - .long 3524918334 - .long 1072517809 - .long 2353304918 - .long 1072514209 - .long 1939625839 - .long 1072510567 - .long 1256714581 - .long 1072506883 - .long 3552525848 - .long 1072503156 - .long 3464809522 - .long 1072499387 - .long 4200542593 - .long 1072495575 - .long 355609124 - .long 1072491721 - .long 3684139099 - .long 1072487822 - .long 148355918 - .long 1072483881 - .long 1457689242 - .long 1072479895 - .long 2118591596 - .long 1072475865 - .long 908848089 - .long 1072471791 - .long 877032689 - .long 1072467672 - .long 752012304 - .long 1072463508 - .long 3532301749 - .long 1072459298 - .long 3600563221 - .long 1072455043 - .long 3902857084 - .long 1072450742 - .long 3063101036 - .long 1072446395 - .long 3972344374 - .long 1072442001 - .long 903183549 - .long 1072437561 - .long 983892938 - .long 1072433073 - .long 2722858568 - .long 1072428537 - .long 302790515 - .long 1072423954 - .long 759811057 - .long 1072419322 - .long 2507809922 - .long 1072414641 - .long 2388408813 - .long 1072407528 - .long 2084492942 - .long 1072397870 - .long 2435703301 - .long 1072388010 - .long 1935433360 - .long 1072377945 - .long 2742047290 - .long 1072367671 - .long 2053284205 - .long 1072357185 - .long 657783367 - .long 1072346483 - .long 2893664841 - .long 1072335560 - .long 3718906405 - .long 1072324413 - .long 1547896303 - .long 1072313038 - .long 2494058440 - .long 1072301429 - .long 3133238742 - .long 1072289582 - .long 3327000086 - .long 1072277492 - .long 1860667274 - .long 1072265154 - .long 665340747 - .long 1072252562 - .long 443347841 - .long 1072239710 - .long 581282618 - .long 1072226592 - .long 3349780465 - .long 1072213201 - .long 914217606 - .long 1072199532 - .long 989797661 - .long 1072185576 - .long 945436416 - .long 1072171326 - .long 549291300 - .long 1072156774 - .long 1814636389 - .long 1072141911 - .long 239092858 - .long 1072126729 - .long 1794680724 - .long 1072111217 - .long 1241534678 - .long 1072095366 - .long 3366566214 - .long 1072079164 - .long 1244090828 - .long 1072062601 - .long 1708448120 - .long 1072045663 - .long 3544260650 - .long 1072028337 - .long 1402741403 - .long 1072010610 - .long 2551936888 - .long 1071992465 - .long 617669739 - .long 1071973887 - .long 794002186 - .long 1071954857 - .long 2021237693 - .long 1071935356 - .long 540450384 - .long 1071915364 - .long 1920555537 - .long 1071894857 - .long 2879585206 - .long 1071873811 - .long 3000237455 - .long 1071852199 - .long 3352974346 - .long 1071829991 - .long 569629937 - .long 1071807155 - .long 2077237208 - .long 1071783653 - .long 2284891805 - .long 1071759446 - .long 1226651784 - .long 1071734489 - .long 1102047405 - .long 1071708731 - .long 2009896384 - .long 1071682115 - .long 927419082 - .long 1071654577 - .long 85010366 - .long 1071607413 - .long 696431025 - .long 1071548180 - .long 2611410541 - .long 1071486585 - .long 2612593658 - .long 1071422396 - .long 3548155306 - .long 1071355336 - .long 3887997484 - .long 1071285073 - .long 244854763 - .long 1071211202 - .long 4214445648 - .long 1071133216 - .long 2303966727 - .long 1071050478 - .long 3991040013 - .long 1070962152 - .long 3126952278 - .long 1070867118 - .long 1817448378 - .long 1070763804 - .long 1793814864 - .long 1070649884 - .long 3507224072 - .long 1070447193 - .long 4027609105 - .long 1070148772 - .long 577507993 - .long 1069779414 - .long 2310232419 - .long 1068931829 - .type T_table,@object - .size T_table,2048 - .align 16 -Tbl_addr: - .long 3822952792 - .long 1021639372 - .long 182792448 - .long 1068507836 - .long 2264213271 - .long 1019558908 - .long 649052928 - .long 1068524253 - .long 1797139609 - .long 1022295143 - .long 1243095296 - .long 1068540671 - .long 1415938756 - .long 1021439537 - .long 2033294592 - .long 1068557090 - .long 2356809978 - .long 1021777916 - .long 3088063744 - .long 1068573510 - .long 2669055318 - .long 1022124482 - .long 180888576 - .long 1068589932 - .long 3566445325 - .long 1021358712 - .long 1970196992 - .long 1068606354 - .long 896980323 - .long 1021319659 - .long 4229555456 - .long 1068622777 - .long 436049712 - .long 1021319758 - .long 2732572160 - .long 1068639202 - .long 583123209 - .long 1020797960 - .long 1842831872 - .long 1068655628 - .long 1370449804 - .long 1021429270 - .long 1628994560 - .long 1068672055 - .long 2411391464 - .long 1021057980 - .long 2159763712 - .long 1068688483 - .long 1208692749 - .long 1021943903 - .long 3503886336 - .long 1068704912 - .long 538793309 - .long 1019744063 - .long 1435187200 - .long 1068721343 - .long 4085087612 - .long 1020608419 - .long 317469952 - .long 1068737775 - .long 144386942 - .long 1021440732 - .long 219617280 - .long 1068754208 - .long 2940088361 - .long 1019981122 - .long 1210558208 - .long 1068770642 - .long 2176850347 - .long 1018373705 - .long 3359268352 - .long 1068787077 - .long 2395611454 - .long 1021889042 - .long 2439803648 - .long 1068803514 - .long 1650705253 - .long 1020227966 - .long 2816203520 - .long 1068819952 - .long 3702166386 - .long 1019379914 - .long 262620672 - .long 1068836392 - .long 1855649370 - .long 1020453124 - .long 3438159616 - .long 1068852832 - .long 923063860 - .long 1019273834 - .long 3822105856 - .long 1068869274 - .long 4289947947 - .long 1019434249 - .long 1483729920 - .long 1068885718 - .long 787455814 - .long 1020738379 - .long 787321088 - .long 1068902163 - .long 3321653337 - .long 1021842569 - .long 1802253312 - .long 1068918609 - .long 2653633526 - .long 1021821525 - .long 302985984 - .long 1068935057 - .long 161272028 - .long 1021655149 - .long 653966080 - .long 1068951506 - .long 2566098667 - .long 1020066219 - .long 2924727296 - .long 1068967956 - .long 3646493722 - .long 1014292285 - .long 2889890304 - .long 1068984408 - .long 1081009196 - .long 1022189620 - .long 619098112 - .long 1069000862 - .long 4011643355 - .long 1021773297 - .long 477017600 - .long 1069017317 - .long 4030305534 - .long 1021292252 - .long 2533403904 - .long 1069033773 - .long 2645187591 - .long 1019527099 - .long 2563102208 - .long 1069050231 - .long 3857293792 - .long 1022311697 - .long 635982336 - .long 1069066691 - .long 3625936637 - .long 1017511744 - .long 1116940800 - .long 1069083152 - .long 3653872993 - .long 1022016631 - .long 4075964160 - .long 1069099614 - .long 2468900271 - .long 1021769532 - .long 993165568 - .long 1069116079 - .long 1358104224 - .long 1021199776 - .long 528586752 - .long 1069132545 - .long 2200950332 - .long 1022024872 - .long 2752395776 - .long 1069149012 - .long 3197072454 - .long 1017751319 - .long 3439855616 - .long 1069165481 - .long 1651081806 - .long 1020809338 - .long 2661257728 - .long 1069181952 - .long 539032752 - .long 1021728805 - .long 486957312 - .long 1069198425 - .long 3136045149 - .long 1016888671 - .long 1282340352 - .long 1069214899 - .long 2593963259 - .long 1018956103 - .long 822921728 - .long 1069231375 - .long 2146032737 - .long 1022306465 - .long 3474216192 - .long 1069247852 - .long 3976811625 - .long 1021350207 - .long 716902656 - .long 1069264332 - .long 718267222 - .long 1018624727 - .long 1211594496 - .long 1069280813 - .long 1485641389 - .long 1018447451 - .long 734070272 - .long 1069297296 - .long 354455128 - .long 1021341291 - .long 3650110720 - .long 1069313780 - .long 682185947 - .long 1021651853 - .long 1440663040 - .long 1069330267 - .long 3558574550 - .long 1021615110 - .long 2766612224 - .long 1069346755 - .long 874607978 - .long 1017746872 - .long 3404011008 - .long 1069363245 - .long 4154988502 - .long 1021439906 - .long 3423949056 - .long 1069379737 - .long 2263202309 - .long 1021479615 - .long 2897587712 - .long 1069396231 - .long 2562065031 - .long 1022090363 - .long 1896159232 - .long 1069412727 - .long 3836237663 - .long 1019867288 - .long 490968576 - .long 1069429225 - .long 3322056743 - .long 1006752762 - .long 3048360192 - .long 1069445724 - .long 1152314833 - .long 1013122252 - .long 1049850624 - .long 1069462226 - .long 3601590727 - .long 1022214610 - .long 3156899584 - .long 1069478729 - .long 1855169970 - .long 1019487271 - .long 851173376 - .long 1069495235 - .long 312649594 - .long 1020868604 - .long 2794281728 - .long 1069511742 - .long 1093490181 - .long 1020777577 - .long 468042496 - .long 1069528252 - .long 1152540679 - .long 1021403732 - .long 2534219264 - .long 1069544763 - .long 2292126035 - .long 1021872430 - .long 1376146432 - .long 1069558527 - .long 3293753641 - .long 1020500454 - .long 4175442432 - .long 1069575044 - .long 3626347564 - .long 1021610969 - .long 3523113472 - .long 1069591566 - .long 339956500 - .long 1021119039 - .long 4003350528 - .long 1069608092 - .long 3429333082 - .long 1022813542 - .long 1611067392 - .long 1069624623 - .long 2298017544 - .long 1021977587 - .long 931782144 - .long 1069641158 - .long 2164684743 - .long 1021250988 - .long 2256725504 - .long 1069657697 - .long 1138762335 - .long 1021443776 - .long 1582853120 - .long 1069674241 - .long 1084010382 - .long 1022994693 - .long 3497758720 - .long 1069690789 - .long 406366244 - .long 1022713586 - .long 3999816960 - .long 1069707342 - .long 1488723042 - .long 1023381290 - .long 3383096064 - .long 1069723900 - .long 2541558953 - .long 1019137887 - .long 1942403584 - .long 1069740463 - .long 1879620343 - .long 1022653642 - .long 4268263680 - .long 1069757030 - .long 3039077047 - .long 1022252545 - .long 2067062272 - .long 1069773603 - .long 4190670677 - .long 1020725863 - .long 4225828096 - .long 1069790180 - .long 1998567321 - .long 1022014385 - .long 2452507136 - .long 1069806763 - .long 1511628873 - .long 1021900300 - .long 1340746240 - .long 1069823351 - .long 788367341 - .long 1022726208 - .long 1190035456 - .long 1069839944 - .long 3856337230 - .long 1021834118 - .long 2300688384 - .long 1069856542 - .long 3211396579 - .long 1022621365 - .long 678886400 - .long 1069873146 - .long 4001011887 - .long 1022042646 - .long 921594112 - .long 1069889755 - .long 557811968 - .long 1023065533 - .long 3331668992 - .long 1069906369 - .long 1877060679 - .long 1022419742 - .long 3917875200 - .long 1069922989 - .long 1181055171 - .long 1022752712 - .long 2984829696 - .long 1069939615 - .long 4294526932 - .long 1021499988 - .long 838049024 - .long 1069956247 - .long 3658081878 - .long 1022957952 - .long 2078928384 - .long 1069972884 - .long 820353701 - .long 1019391107 - .long 2719854336 - .long 1069989527 - .long 1644022489 - .long 1023378240 - .long 3069117696 - .long 1070006176 - .long 2771393702 - .long 1019319954 - .long 3435962368 - .long 1070022831 - .long 3876394145 - .long 1023024433 - .long 4130595328 - .long 1070039492 - .long 1630447748 - .long 1021465882 - .long 1169236224 - .long 1070056160 - .long 2828355997 - .long 1020458120 - .long 3453997312 - .long 1070072833 - .long 164091641 - .long 1020388279 - .long 2708127744 - .long 1070089513 - .long 3036550223 - .long 1023328684 - .long 3540797696 - .long 1070106199 - .long 3710949463 - .long 1022568805 - .long 1972276736 - .long 1070122892 - .long 3885277950 - .long 1019761674 - .long 2613815552 - .long 1070139591 - .long 2764165077 - .long 1022921023 - .long 1487791616 - .long 1070156297 - .long 1330644769 - .long 1023162679 - .long 3207593472 - .long 1070173009 - .long 3911007221 - .long 1022993496 - .long 3797764608 - .long 1070189728 - .long 979712598 - .long 1022554580 - .long 3578920448 - .long 1070206454 - .long 2825738223 - .long 1020223708 - .long 2872795648 - .long 1070223187 - .long 392451124 - .long 1022666279 - .long 2002258432 - .long 1070239927 - .long 3730407632 - .long 1023148291 - .long 1291326464 - .long 1070256674 - .long 3723802980 - .long 1022514089 - .long 1065180928 - .long 1070273428 - .long 2635617463 - .long 1022654470 - .long 1650181632 - .long 1070290189 - .long 2061982883 - .long 1022853411 - .long 3373882880 - .long 1070306957 - .long 319732785 - .long 1022017175 - .long 2270081280 - .long 1070323733 - .long 2237757411 - .long 1023064087 - .long 2963732736 - .long 1070340516 - .long 468839165 - .long 1023293774 - .long 1491099904 - .long 1070357307 - .long 1502657946 - .long 1021533479 - .long 2479636480 - .long 1070374105 - .long 482913562 - .long 1021986286 - .long 1968133632 - .long 1070390911 - .long 3281474337 - .long 1022646400 - .long 291639040 - .long 1070407725 - .long 2453320259 - .long 1022812423 - .long 2081472512 - .long 1070424546 - .long 2939989570 - .long 1023091888 - .long 3380340480 - .long 1070441375 - .long 2850707499 - .long 1021921109 - .long 232287488 - .long 1070458213 - .long 3674625342 - .long 1020725130 - .long 1567614208 - .long 1070475058 - .long 9347334 - .long 1022024009 - .long 3433091072 - .long 1070491911 - .long 282524999 - .long 1021433523 - .long 1876877312 - .long 1070508773 - .long 3470449440 - .long 1019309721 - .long 1538472192 - .long 1070525643 - .long 2089486825 - .long 1019698916 - .long 2763830784 - .long 1070542521 - .long 443498115 - .long 1020505194 - .long 1605381632 - .long 1070559408 - .long 3018871601 - .long 1022869913 - .long 2706946048 - .long 1070576303 - .long 3936260892 - .long 1023175875 - .long 2123887360 - .long 1070593207 - .long 2994220655 - .long 1022825948 - .long 104015104 - .long 1070603108 - .long 335054493 - .long 1023441853 - .long 2904568832 - .long 1070615800 - .long 1451215633 - .long 1023853857 - .long 3456197120 - .long 1070632739 - .long 436334733 - .long 1024026432 - .long 252452352 - .long 1070649697 - .long 34596167 - .long 1024031396 - .long 3328018432 - .long 1070666672 - .long 2644547073 - .long 1024296758 - .long 1255829248 - .long 1070683667 - .long 552832586 - .long 1023763122 - .long 4097058560 - .long 1070700680 - .long 1955640623 - .long 1021394654 - .long 451770112 - .long 1070717714 - .long 3428903777 - .long 1022941142 - .long 408920832 - .long 1070734767 - .long 165503263 - .long 1023894958 - .long 1186960640 - .long 1070751840 - .long 435826450 - .long 1024026134 - .long 19078656 - .long 1070768934 - .long 1834169749 - .long 1022899284 - .long 2743490304 - .long 1070786048 - .long 494581074 - .long 1018818479 - .long 2328961024 - .long 1070803184 - .long 2987908834 - .long 1022581110 - .long 350011392 - .long 1070820342 - .long 240771184 - .long 1024143083 - .long 2692326912 - .long 1070837521 - .long 666056837 - .long 1022394776 - .long 2373274368 - .long 1070854723 - .long 2484337770 - .long 1024228156 - .long 1017131520 - .long 1070871948 - .long 3285648279 - .long 1024025789 - .long 265558272 - .long 1070889196 - .long 392241896 - .long 1024252809 - .long 1778008064 - .long 1070906467 - .long 1536107943 - .long 1023949300 - .long 2937184768 - .long 1070923762 - .long 3541062251 - .long 1019448646 - .long 1144442880 - .long 1070941082 - .long 3691683781 - .long 1022123948 - .long 2410165504 - .long 1070958426 - .long 1804181960 - .long 1023945221 - .long 4174350848 - .long 1070975795 - .long 2016094861 - .long 1021716585 - .long 3897012480 - .long 1070993190 - .long 175294410 - .long 1023703404 - .long 3353623040 - .long 1071010611 - .long 167973242 - .long 1023240839 - .long 45671168 - .long 1071028059 - .long 2166856113 - .long 1021565413 - .long 86063872 - .long 1071045533 - .long 2676254727 - .long 1023985299 - .long 1019772672 - .long 1071063034 - .long 989043593 - .long 1021549587 - .long 414297344 - .long 1071080563 - .long 3960972046 - .long 1024307251 - .long 155173120 - .long 1071098120 - .long 1830919291 - .long 1021592251 - .long 2151562240 - .long 1071115705 - .long 405408666 - .long 1023423128 - .long 4041854720 - .long 1071133319 - .long 2043497827 - .long 1024411503 - .long 3489224192 - .long 1071150963 - .long 3072215864 - .long 1022698635 - .long 2477196288 - .long 1071168637 - .long 1812195139 - .long 1022689192 - .long 3015298816 - .long 1071186341 - .long 764841969 - .long 1021027331 - .long 2844731136 - .long 1071204076 - .long 2878117321 - .long 1019116513 - .long 4028950528 - .long 1071221842 - .long 698911452 - .long 1023265602 - .long 69441536 - .long 1071239641 - .long 3253467847 - .long 1020795075 - .long 1676209920 - .long 1071257471 - .long 4272431167 - .long 1022873982 - .long 2408752384 - .long 1071275334 - .long 648519100 - .long 1024385717 - .long 151623680 - .long 1071293231 - .long 345257017 - .long 1019561408 - .long 1410154240 - .long 1071311161 - .long 197863993 - .long 1023224207 - .long 4131351552 - .long 1071329125 - .long 2620801789 - .long 1024411169 - .long 1999664384 - .long 1071347125 - .long 3952692616 - .long 1024168086 - .long 1617668864 - .long 1071365160 - .long 3019889809 - .long 1021907692 - .long 1032074240 - .long 1071383231 - .long 59469899 - .long 1023656194 - .long 2619492096 - .long 1071401338 - .long 1417526820 - .long 1021457783 - .long 202429440 - .long 1071419483 - .long 2927667935 - .long 1019175447 - .long 525044224 - .long 1071437665 - .long 38166811 - .long 1023981879 - .long 1779258880 - .long 1071455885 - .long 481252500 - .long 1023310234 - .long 2195673600 - .long 1071474144 - .long 3962395981 - .long 1021339088 - .long 44573696 - .long 1071492443 - .long 3936281395 - .long 1023014829 - .long 2226905344 - .long 1071510781 - .long 1515320476 - .long 1024320623 - .long 2800512512 - .long 1071529160 - .long 1225403697 - .long 1021081846 - .long 161113600 - .long 1071547581 - .long 3064809733 - .long 1024173917 - .long 1338410240 - .long 1071566043 - .long 2027604973 - .long 1024362526 - .long 522433280 - .long 1071584548 - .long 2055171723 - .long 1023858825 - .long 539595776 - .long 1071603096 - .long 3868820135 - .long 1022936424 - .long 4264017664 - .long 1071621687 - .long 3228065145 - .long 1023479578 - .long 1733924096 - .long 1071640324 - .long 3511934475 - .long 1022496355 - .long 108880384 - .long 1071651839 - .long 615880967 - .long 1023519706 - .long 3517856512 - .long 1071661202 - .long 3113108559 - .long 1025190289 - .long 4043153152 - .long 1071670589 - .long 1571836218 - .long 1023106116 - .long 3251299072 - .long 1071680000 - .long 3444076102 - .long 1022187841 - .long 2736921600 - .long 1071689435 - .long 272771483 - .long 1025095280 - .long 3897698560 - .long 1071703633 - .long 2075390188 - .long 1022489022 - .long 3209485056 - .long 1071722652 - .long 1438094065 - .long 1021844944 - .long 3781432064 - .long 1071741774 - .long 1675017145 - .long 1024143828 - .long 2684184064 - .long 1071761003 - .long 2259963753 - .long 1024731393 - .long 1840489728 - .long 1071780342 - .long 3372883597 - .long 1023431408 - .long 3764087808 - .long 1071799794 - .long 3307523102 - .long 1024485788 - .long 3006232320 - .long 1071819364 - .long 3088971966 - .long 1025213251 - .long 3374881280 - .long 1071839055 - .long 834437749 - .long 1025236452 - .long 797284864 - .long 1071858872 - .long 3122663941 - .long 1025320473 - .long 545765120 - .long 1071878818 - .long 826539625 - .long 1022450955 - .long 107562240 - .long 1071898898 - .long 339584600 - .long 1022481255 - .long 2123649024 - .long 1071919116 - .long 3912959833 - .long 1024321009 - .long 1562385664 - .long 1071939478 - .long 2846067230 - .long 1023343981 - .long 2963085824 - .long 1071959988 - .long 954548627 - .long 1021475211 - .long 3325550592 - .long 1071980652 - .long 3459651155 - .long 1025305573 - .long 775752448 - .long 1072001476 - .long 3582746667 - .long 1023859460 - .long 3238590720 - .long 1072022464 - .long 634636162 - .long 1024472353 - .long 2758801920 - .long 1072043624 - .long 3078216319 - .long 1025304516 - .long 1370319104 - .long 1072064962 - .long 2570569078 - .long 1025099442 - .long 2615805184 - .long 1072086484 - .long 3729933412 - .long 1024605112 - .long 3077336576 - .long 1072108198 - .long 1948916066 - .long 1024781603 - .long 1099528192 - .long 1072130112 - .long 3139143157 - .long 1023729360 - .long 1231903232 - .long 1072152233 - .long 1349513477 - .long 1024737515 - .long 1507504128 - .long 1072174570 - .long 3484516322 - .long 1024000959 - .long 2214659840 - .long 1072197132 - .long 2563820917 - .long 1025225535 - .long 1804739840 - .long 1072219929 - .long 760038746 - .long 1024482855 - .long 1413746688 - .long 1072242971 - .long 3401734714 - .long 1025129838 - .long 821409536 - .long 1072266269 - .long 3729772551 - .long 1025484796 - .long 3031825664 - .long 1072289834 - .long 122256749 - .long 1024752594 - .long 1710784256 - .long 1072313680 - .long 1518205483 - .long 1024724809 - .long 3025265152 - .long 1072337819 - .long 409951989 - .long 1022835555 - .long 287769088 - .long 1072362267 - .long 800355594 - .long 1022484850 - .long 198179840 - .long 1072387038 - .long 3502926213 - .long 1024209373 - .long 1909130496 - .long 1072412149 - .long 3064694319 - .long 1025380823 - .long 1941732096 - .long 1072437619 - .long 4112930390 - .long 1024294679 - .long 3492010496 - .long 1072463467 - .long 2684918107 - .long 1023220233 - .long 81959680 - .long 1072489716 - .long 220021366 - .long 1020635131 - .long 2297837056 - .long 1072516387 - .long 4027683826 - .long 1021041185 - .long 270404096 - .long 1072543508 - .long 2012766065 - .long 1021780753 - .long 3667376896 - .long 1072571105 - .long 2727981522 - .long 1023009874 - .long 330400256 - .long 1072599212 - .long 2940017003 - .long 1025393439 - .long 1119293952 - .long 1072627861 - .long 1608550416 - .long 1022675612 - .long 3536155904 - .long 1072657091 - .long 349665778 - .long 1025156751 - .long 3078046720 - .long 1072686946 - .long 2016159996 - .long 1022193169 - .long 455228416 - .long 1072705361 - .long 1908539328 - .long 1026126332 - .long 1871505664 - .long 1072720988 - .long 2784700894 - .long 1025922277 - .long 1630994432 - .long 1072737010 - .long 361107678 - .long 1022887244 - .long 2084558336 - .long 1072753462 - .type Tbl_addr,@object - .size Tbl_addr,3840 - .space 768, 0x00 # pad - .align 16 -SIGNMASK: - .long 0 - .long 2147483648 - .long 0 - .long 0 - .type SIGNMASK,@object - .size SIGNMASK,16 - .align 16 -HALFMASK2: - .long 0 - .long 2147483584 - .long 0 - .long 0 - .type HALFMASK2,@object - .size HALFMASK2,16 - .align 16 -PI_BY_2: - .long 856972295 - .long 1016178214 - .long 1413754136 - .long 1073291771 - .type PI_BY_2,@object - .size PI_BY_2,16 - .align 16 -cv2: - .long 780903145 - .long 1066854586 - .long 858993459 - .long 1068708659 - .long 3340530119 - .long 1067392113 - .long 1431655765 - .long 1069897045 - .long 1321528399 - .long 1066517740 - .long 3067833783 - .long 1067899757 - .long 2021159460 - .long 1065855096 - .long 2576980378 - .long 1066178969 - .type cv2,@object - .size cv2,64 - .align 16 -HALFMASK: - .long 4160749568 - .long 4294967295 - .long 4160749568 - .long 4294967295 - .type HALFMASK,@object - .size HALFMASK,16 - .align 4 -ONEMASK: - .long 0 - .long 1072693248 - .type ONEMASK,@object - .size ONEMASK,8 - .align 4 -TMASK: - .long 0 - .long 4294950912 - .type TMASK,@object - .size TMASK,8 - .align 4 -cv: - .long 1431655765 - .long 1069897045 - .long 858993459 - .long 1068708659 - .long 3067833783 - .long 1067899757 - .type cv,@object - .size cv,24 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinf_gen.S deleted file mode 100644 index 3773399cbc..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinf_gen.S +++ /dev/null @@ -1,394 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinf_gen.c" - .text -..TXTST0: -# -- Begin asinf - .text - .align 16,0x90 - .globl asinf -asinf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_asinf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -16(%rsp) - movl %edx, %eax - andl $2147483647, %eax - cmpl $1065353216, %eax - jae ..B1.14 -..B1.2: - pxor %xmm5, %xmm5 - cmpl $1056964608, %eax - cvtss2sd %xmm0, %xmm5 - jae ..B1.11 -..B1.3: - cmpl $947912704, %eax - jae ..B1.10 -..B1.4: - shrl $31, %edx - cmpl $8388608, %eax - jb ..B1.6 -..B1.5: - movl %edx, %edx - lea _small_value_32(%rip), %rax - movss (%rax,%rdx,4), %xmm1 - mulss .L_2il0floatpacket.26(%rip), %xmm1 - addss %xmm1, %xmm0 - ret -..B1.6: - testl %eax, %eax - je ..B1.9 -..B1.7: - lea _small_value_32(%rip), %rax - pxor %xmm2, %xmm2 - pxor %xmm1, %xmm1 - cvtss2sd -16(%rsp), %xmm2 - movss (%rax,%rdx,4), %xmm0 - mulss .L_2il0floatpacket.26(%rip), %xmm0 - cvtss2sd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm1 - addsd %xmm2, %xmm0 - movss %xmm1, -24(%rsp) - cvtsd2ss %xmm0, %xmm0 -..B1.9: - ret -..B1.10: - movaps %xmm5, %xmm1 - mulsd %xmm5, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.0(%rip), %xmm3 - movsd .L_2il0floatpacket.4(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.1(%rip), %xmm3 - addsd .L_2il0floatpacket.5(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.2(%rip), %xmm3 - addsd .L_2il0floatpacket.6(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.3(%rip), %xmm3 - addsd .L_2il0floatpacket.7(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm1, %xmm2 - pxor %xmm0, %xmm0 - addsd %xmm2, %xmm3 - mulsd %xmm5, %xmm3 - addsd %xmm3, %xmm5 - cvtsd2ss %xmm5, %xmm0 - ret -..B1.11: - cmpl $1061997772, %eax - jb ..B1.13 -..B1.12: - andps .L_2il0floatpacket.28(%rip), %xmm5 - pxor %xmm4, %xmm4 - movsd .L_2il0floatpacket.27(%rip), %xmm1 - testl %edx, %edx - movsd .L_2il0floatpacket.0(%rip), %xmm3 - subsd %xmm5, %xmm1 - mulsd .L_2il0floatpacket.22(%rip), %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - sqrtsd %xmm1, %xmm4 - mulsd %xmm0, %xmm3 - movsd .L_2il0floatpacket.4(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.1(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.5(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.2(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.6(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.3(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.7(%rip), %xmm2 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm3 - mulsd %xmm4, %xmm3 - addsd %xmm3, %xmm4 - mulsd .L_2il0floatpacket.24(%rip), %xmm4 - addsd .L_2il0floatpacket.23(%rip), %xmm4 - movaps %xmm4, %xmm0 - xorps .L_2il0floatpacket.29(%rip), %xmm0 - jl ..L3 - movaps %xmm4, %xmm0 -..L3: - cvtsd2ss %xmm0, %xmm0 - ret -..B1.13: - movaps %xmm5, %xmm1 - mulsd %xmm5, %xmm1 - movsd .L_2il0floatpacket.9(%rip), %xmm4 - movsd .L_2il0floatpacket.15(%rip), %xmm3 - addsd .L_2il0floatpacket.8(%rip), %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.10(%rip), %xmm4 - addsd .L_2il0floatpacket.16(%rip), %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.11(%rip), %xmm4 - addsd .L_2il0floatpacket.17(%rip), %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.12(%rip), %xmm4 - addsd .L_2il0floatpacket.18(%rip), %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.13(%rip), %xmm4 - addsd .L_2il0floatpacket.19(%rip), %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.14(%rip), %xmm4 - addsd .L_2il0floatpacket.20(%rip), %xmm3 - mulsd %xmm1, %xmm4 - addsd %xmm3, %xmm4 - addsd .L_2il0floatpacket.21(%rip), %xmm4 - mulsd %xmm5, %xmm4 - addsd %xmm4, %xmm5 - cvtsd2ss %xmm5, %xmm5 - movaps %xmm5, %xmm0 - ret -..B1.14: - cmpl $2139095040, %eax - ja ..B1.18 -..B1.15: - cmpl $1065353216, %eax - jne ..B1.19 -..B1.16: - lea pi_2f(%rip), %rax - lea _small_value_32(%rip), %rcx - shrl $31, %edx - movss (%rax,%rdx,4), %xmm0 - subss (%rcx,%rdx,4), %xmm0 -..B1.17: - ret -..B1.18: - movss -16(%rsp), %xmm0 - ret -..B1.19: - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.25(%rip), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type asinf,@function - .size asinf,.-asinf - .data -# -- End asinf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.28: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.28,@object - .size .L_2il0floatpacket.28,16 - .align 16 -.L_2il0floatpacket.29: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.29,@object - .size .L_2il0floatpacket.29,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x32950b15,0x3fa10044 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x0f078e5a,0x3f9547bd - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x282596ea,0x3f9f2932 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x3b07aed0,0x3fb33334 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x15b528b3,0x3f5b565b - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x1acf0c57,0x3f965bd0 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x8a6efcbd,0x3fa6db1b - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x541021e2,0x3fc55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0xbfd00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x7c6f097b,0x4014f3d9 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x617c2eba,0x4018ed42 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0xb9e8c253,0x3fea66bf - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x7e9f31d2,0x3fb9a89d - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x74fb38bf,0x3fb8e90d - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0xe950ab19,0x3fcb8550 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 8 -.L_2il0floatpacket.15: - .long 0x8c8953a2,0xc0202794 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,8 - .align 8 -.L_2il0floatpacket.16: - .long 0x94b6927c,0xc0047249 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,8 - .align 8 -.L_2il0floatpacket.17: - .long 0x3a6dbb00,0xbfa654a1 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,8 - .align 8 -.L_2il0floatpacket.18: - .long 0x020f8f24,0x3fb60e1d - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,8 - .align 8 -.L_2il0floatpacket.19: - .long 0x726ca18f,0x3fbff1ac - .type .L_2il0floatpacket.19,@object - .size .L_2il0floatpacket.19,8 - .align 8 -.L_2il0floatpacket.20: - .long 0xc94e1724,0x3f352382 - .type .L_2il0floatpacket.20,@object - .size .L_2il0floatpacket.20,8 - .align 8 -.L_2il0floatpacket.21: - .long 0x00000000,0x3fa80000 - .type .L_2il0floatpacket.21,@object - .size .L_2il0floatpacket.21,8 - .align 8 -.L_2il0floatpacket.22: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.22,@object - .size .L_2il0floatpacket.22,8 - .align 8 -.L_2il0floatpacket.23: - .long 0x54442d18,0x3ff921fb - .type .L_2il0floatpacket.23,@object - .size .L_2il0floatpacket.23,8 - .align 8 -.L_2il0floatpacket.24: - .long 0x00000000,0xc0000000 - .type .L_2il0floatpacket.24,@object - .size .L_2il0floatpacket.24,8 - .align 8 -.L_2il0floatpacket.27: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.27,@object - .size .L_2il0floatpacket.27,8 - .align 4 -.L_2il0floatpacket.25: - .long 0x7f800000 - .type .L_2il0floatpacket.25,@object - .size .L_2il0floatpacket.25,4 - .align 4 -.L_2il0floatpacket.26: - .long 0x0d800000 - .type .L_2il0floatpacket.26,@object - .size .L_2il0floatpacket.26,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -pi_2f: - .long 0x3fc90fdb - .long 0xbfc90fdb - .type pi_2f,@object - .size pi_2f,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinh_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinh_gen.S deleted file mode 100644 index 7356a28bb8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinh_gen.S +++ /dev/null @@ -1,382 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinh_gen.c" - .text -..TXTST0: -# -- Begin asinh - .text - .align 16,0x90 - .globl asinh -asinh: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_asinh.1: -..L2: - - movsd %xmm0, -16(%rsp) - movl -12(%rsp), %esi - movl %esi, %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - jae ..B1.18 -..B1.2: - cmpl $1102053376, %edx - jae ..B1.16 -..B1.3: - cmpl $1074987008, %edx - jae ..B1.14 -..B1.4: - cmpl $1068498944, %edx - jae ..B1.13 -..B1.5: - cmpl $1012924416, %edx - jae ..B1.12 -..B1.6: - shrl $31, %esi - cmpl $1048576, %edx - jb ..B1.8 -..B1.7: - lea _SCALE(%rip), %rax - lea _MINNORM(%rip), %rdx - movl %esi, %esi - lea 8+_SCALE(%rip), %rcx - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - subsd (%rdx,%rsi,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.8: - movl -16(%rsp), %eax - orl %eax, %edx - je ..B1.10 -..B1.9: - lea _small_value_64(%rip), %rax - movsd -16(%rsp), %xmm0 - movsd (%rax,%rsi,8), %xmm1 - mulsd (%rax), %xmm1 - movsd %xmm1, -40(%rsp) - subsd %xmm1, %xmm0 - ret -..B1.10: - movsd -16(%rsp), %xmm0 -..B1.11: - ret -..B1.12: - movsd -16(%rsp), %xmm0 - lea 32+_PA(%rip), %rax - movaps %xmm0, %xmm4 - lea 24+_PA(%rip), %rcx - mulsd %xmm0, %xmm4 - lea 16+_PA(%rip), %rdx - movaps %xmm4, %xmm1 - lea 8+_PA(%rip), %rsi - mulsd %xmm4, %xmm1 - lea _PA(%rip), %rdi - movsd (%rax), %xmm3 - movsd (%rcx), %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm2 - addsd (%rdx), %xmm3 - addsd (%rsi), %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm4, %xmm2 - mulsd %xmm0, %xmm4 - addsd %xmm2, %xmm3 - addsd (%rdi), %xmm3 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm0 - ret -..B1.13: - movsd -16(%rsp), %xmm5 - xorl %eax, %eax - andps .L_2il0floatpacket.2(%rip), %xmm5 - movsd %xmm5, -16(%rsp) - movaps %xmm5, %xmm1 - movl %eax, -16(%rsp) - movsd -16(%rsp), %xmm9 - movaps %xmm9, %xmm7 - subsd %xmm9, %xmm1 - mulsd %xmm9, %xmm7 - addsd %xmm9, %xmm5 - movsd .L_2il0floatpacket.3(%rip), %xmm0 - mulsd %xmm1, %xmm5 - addsd %xmm0, %xmm7 - movaps %xmm7, %xmm2 - addsd %xmm5, %xmm2 - sqrtsd %xmm2, %xmm2 - movsd %xmm2, -24(%rsp) - movl %eax, -24(%rsp) - movsd -24(%rsp), %xmm8 - movaps %xmm8, %xmm3 - movaps %xmm8, %xmm4 - mulsd %xmm8, %xmm3 - subsd %xmm8, %xmm2 - addsd %xmm8, %xmm9 - mulsd %xmm2, %xmm4 - subsd %xmm3, %xmm7 - movaps %xmm8, %xmm6 - subsd %xmm4, %xmm7 - addsd %xmm2, %xmm6 - addsd %xmm5, %xmm7 - divsd %xmm6, %xmm7 - addsd %xmm7, %xmm2 - mulsd .L_2il0floatpacket.1(%rip), %xmm2 - addsd %xmm2, %xmm1 - jmp ..B1.15 -..B1.14: - movsd -16(%rsp), %xmm1 - andps .L_2il0floatpacket.2(%rip), %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - movsd .L_2il0floatpacket.3(%rip), %xmm0 - movaps %xmm0, %xmm4 - addsd %xmm0, %xmm2 - sqrtsd %xmm2, %xmm2 - movsd .L_2il0floatpacket.0(%rip), %xmm3 - addsd %xmm1, %xmm2 - mulsd %xmm3, %xmm1 - divsd %xmm2, %xmm4 - movsd %xmm1, -16(%rsp) - movl $0, -16(%rsp) - movsd -16(%rsp), %xmm9 - subsd %xmm9, %xmm1 - addsd %xmm4, %xmm1 -..B1.15: - movaps %xmm1, %xmm2 - movq $0x3ff0000000000000, %rax - addsd %xmm9, %xmm2 - movsd %xmm2, -16(%rsp) - movl $0, -16(%rsp) - movsd -16(%rsp), %xmm8 - movzwl -10(%rsp), %ecx - subsd %xmm8, %xmm9 - andl $32752, %ecx - addsd %xmm9, %xmm1 - shrl $4, %ecx - addl $-1023, %ecx - movslq %ecx, %rdx - negq %rdx - shlq $52, %rdx - addq %rax, %rdx - movq %rdx, -32(%rsp) - movsd -32(%rsp), %xmm3 - mulsd %xmm3, %xmm1 - mulsd %xmm3, %xmm8 - movaps %xmm1, %xmm4 - addsd %xmm8, %xmm4 - movsd %xmm4, -24(%rsp) - movl -20(%rsp), %edi - shrl $12, %edi - movzbl %dil, %edx - jmp ..B1.17 -..B1.16: - movsd -16(%rsp), %xmm0 - andps .L_2il0floatpacket.2(%rip), %xmm0 - movsd %xmm0, -16(%rsp) - movzwl -10(%rsp), %eax - movl %eax, %ecx - andl $-32753, %eax - andl $32752, %ecx - orl $-49168, %eax - movw %ax, -10(%rsp) - movsd -16(%rsp), %xmm1 - movl $0, -16(%rsp) - movl -12(%rsp), %edx - movsd -16(%rsp), %xmm8 - shrl $4, %ecx - subsd %xmm8, %xmm1 - shrl $12, %edx - addl $-1022, %ecx - movzbl %dl, %edx - movsd .L_2il0floatpacket.3(%rip), %xmm0 -..B1.17: - movq __libm_rcp_table_256@GOTPCREL(%rip), %rdi - pxor %xmm2, %xmm2 - lea 32+_PL(%rip), %r8 - lea 16+_PL(%rip), %r9 - lea 24+_PL(%rip), %r11 - lea _PL(%rip), %r10 - cvtss2sd (%rdi,%rdx,4), %xmm2 - mulsd %xmm2, %xmm8 - lea 8+_PL(%rip), %rdi - mulsd %xmm2, %xmm1 - subsd %xmm0, %xmm8 - movaps %xmm8, %xmm3 - movsd (%r8), %xmm5 - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm0 - mulsd %xmm3, %xmm0 - mulsd %xmm0, %xmm5 - movsd (%r11), %xmm4 - mulsd %xmm0, %xmm4 - addsd (%r9), %xmm5 - mulsd %xmm0, %xmm5 - addsd (%rdi), %xmm4 - mulsd %xmm0, %xmm4 - addsd (%r10), %xmm5 - mulsd %xmm0, %xmm5 - pxor %xmm0, %xmm0 - cvtsi2sd %ecx, %xmm0 - mulsd %xmm3, %xmm4 - lea _LN2(%rip), %rcx - addsd %xmm4, %xmm5 - movsd (%rcx), %xmm6 - lea 8+_LN2(%rip), %rcx - mulsd %xmm0, %xmm6 - addsd %xmm5, %xmm1 - movsd (%rcx), %xmm7 - mulsd %xmm7, %xmm0 - shlq $4, %rdx - movq __libm_log_table_256@GOTPCREL(%rip), %rax - shrl $31, %esi - addsd (%rax,%rdx), %xmm6 - addsd 8(%rax,%rdx), %xmm0 - addsd %xmm6, %xmm1 - addsd %xmm8, %xmm0 - lea ones(%rip), %rdx - movsd %xmm0, -16(%rsp) - movsd (%rdx,%rsi,8), %xmm8 - mulsd %xmm8, %xmm0 - mulsd %xmm8, %xmm1 - movsd %xmm8, -24(%rsp) - addsd %xmm1, %xmm0 - ret -..B1.18: - movsd -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type asinh,@function - .size asinh,.-asinh - .data -# -- End asinh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.2: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -_SCALE: - .long 0 - .long 1177550848 - .long 0 - .long 967835648 - .type _SCALE,@object - .size _SCALE,16 - .align 16 -_MINNORM: - .long 0 - .long 1048576 - .long 0 - .long 2148532224 - .type _MINNORM,@object - .size _MINNORM,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_PA: - .long 1431655746 - .long 3217380693 - .long 858875226 - .long 1068708659 - .long 2809361764 - .long 3215383405 - .long 1241898124 - .long 1067392054 - .long 966918340 - .long 3214324669 - .type _PA,@object - .size _PA,40 - .align 4 -_PL: - .long 0 - .long 3219128320 - .long 1431621855 - .long 1070945621 - .long 4294842013 - .long 3218079743 - .long 1289448124 - .long 1070176674 - .long 2077359316 - .long 3217380703 - .type _PL,@object - .size _PL,40 - .align 4 -_LN2: - .long 897137782 - .long 1038760431 - .long 4276092928 - .long 1072049730 - .type _LN2,@object - .size _LN2,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinhf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinhf_gen.S deleted file mode 100644 index 9f16b5ca90..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinhf_gen.S +++ /dev/null @@ -1,295 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinhf_gen.c" - .text -..TXTST0: -# -- Begin asinhf - .text - .align 16,0x90 - .globl asinhf -asinhf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_asinhf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - movl %edx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - jge ..B1.15 -..B1.2: - cmpl $1056964608, %eax - jge ..B1.11 -..B1.3: - cmpl $838860800, %eax - jge ..B1.10 -..B1.4: - shrl $31, %edx - cmpl $8388608, %eax - jl ..B1.6 -..B1.5: - movss .L_2il0floatpacket.8(%rip), %xmm1 - lea _MINNORM(%rip), %rax - mulss %xmm1, %xmm0 - movl %edx, %edx - subss (%rax,%rdx,4), %xmm0 - mulss .L_2il0floatpacket.9(%rip), %xmm0 - ret -..B1.6: - testl %eax, %eax - je ..B1.8 -..B1.7: - lea _small_value_32(%rip), %rax - pxor %xmm2, %xmm2 - pxor %xmm1, %xmm1 - cvtss2sd -8(%rsp), %xmm2 - movss (%rax,%rdx,4), %xmm0 - mulss .L_2il0floatpacket.9(%rip), %xmm0 - cvtss2sd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm1 - subsd %xmm0, %xmm2 - pxor %xmm0, %xmm0 - movss %xmm1, -24(%rsp) - cvtsd2ss %xmm2, %xmm0 - ret -..B1.8: - movss -8(%rsp), %xmm0 -..B1.9: - ret -..B1.10: - pxor %xmm3, %xmm3 - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.0(%rip), %xmm4 - movsd .L_2il0floatpacket.4(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.1(%rip), %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.2(%rip), %xmm4 - addsd .L_2il0floatpacket.6(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.3(%rip), %xmm4 - addsd .L_2il0floatpacket.7(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - movsd %xmm3, -16(%rsp) - addsd %xmm2, %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm3, %xmm4 - cvtsd2ss %xmm4, %xmm4 - movaps %xmm4, %xmm0 - ret -..B1.11: - pxor %xmm1, %xmm1 - cmpl $1199570944, %eax - cvtss2sd -8(%rsp), %xmm1 - andps .L_2il0floatpacket.15(%rip), %xmm1 - jge ..B1.13 -..B1.12: - movaps %xmm1, %xmm0 - movl $-1023, %r8d - mulsd %xmm1, %xmm0 - addsd .L_2il0floatpacket.14(%rip), %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm0, %xmm1 - movsd %xmm1, -16(%rsp) - jmp ..B1.14 -..B1.13: - movsd %xmm1, -16(%rsp) - movl $-1022, %r8d -..B1.14: - movzwl -10(%rsp), %ecx - movl %ecx, %eax - andl $-32753, %ecx - pxor %xmm0, %xmm0 - orl $-49168, %ecx - andl $32752, %eax - movw %cx, -10(%rsp) - pxor %xmm1, %xmm1 - movq __libm_rcp_table_256@GOTPCREL(%rip), %rdi - movl -12(%rsp), %esi - andl $1048575, %esi - shrl $12, %esi - cvtss2sd (%rdi,%rsi,4), %xmm0 - mulsd -16(%rsp), %xmm0 - movsd .L_2il0floatpacket.11(%rip), %xmm2 - shrl $4, %eax - addsd .L_2il0floatpacket.10(%rip), %xmm0 - mulsd %xmm0, %xmm2 - addl %eax, %r8d - cvtsi2sd %r8d, %xmm1 - addsd .L_2il0floatpacket.12(%rip), %xmm2 - mulsd .L_2il0floatpacket.13(%rip), %xmm1 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm2 - testl $-2147483648, %edx - movq __libm_logf_table_256@GOTPCREL(%rip), %r9 - addsd %xmm0, %xmm2 - addsd (%r9,%rsi,8), %xmm1 - addsd %xmm1, %xmm2 - movaps %xmm2, %xmm0 - xorps .L_2il0floatpacket.16(%rip), %xmm0 - jne ..L3 - movaps %xmm2, %xmm0 -..L3: - cvtsd2ss %xmm0, %xmm0 - ret -..B1.15: - movss -8(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type asinhf,@function - .size asinhf,.-asinhf - .data -# -- End asinhf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.15: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 16 -.L_2il0floatpacket.16: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,16 - .align 8 -.L_2il0floatpacket.0: - .long 0xd28ee596,0x3f73cb17 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x9b9f611c,0x3f91287a - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0xac0cf195,0x3f9f1aa4 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x1236cb49,0x3fb33333 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xd27f5e7d,0xbf874400 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x4197b1a0,0xbf96d307 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xdacdeace,0xbfa6db62 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x552ea1bd,0xbfc55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x6890dd10,0x3fd5555a - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0xe7362feb,0xbfe00001 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0xfefa39ef,0x3fe62e42 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 4 -.L_2il0floatpacket.8: - .long 0x71800000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,4 - .align 4 -.L_2il0floatpacket.9: - .long 0x0d800000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,4 - .align 4 -_MINNORM: - .long 8388608 - .long 2155872256 - .type _MINNORM,@object - .size _MINNORM,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinhl.S deleted file mode 100644 index b1c8f734b1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinhl.S +++ /dev/null @@ -1,1088 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinhl.c" - .text -..TXTST0: -# -- Begin asinhl - .text - .align 16,0x90 - .globl asinhl -asinhl: -# parameter 1: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_asinhl.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - xorb %cl, %cl -..B1.2: - fnstcw 50(%rsp) -..B1.3: - movzwl 72(%rsp), %esi - andl $32767, %esi - movzwl 50(%rsp), %eax - cmpl $32767, %esi - je ..B1.67 -..B1.4: - cmpl $16382, %esi - jge ..B1.46 -..B1.5: - cmpl $16376, %esi - jge ..B1.39 -..B1.6: - cmpl $16371, %esi - jge ..B1.32 -..B1.7: - cmpl $16365, %esi - jge ..B1.25 -..B1.8: - cmpl $16308, %esi - jge ..B1.18 -..B1.9: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.13 -..B1.10: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.11: - fldcw 48(%rsp) -..B1.12: - movzwl 72(%rsp), %esi - movb $1, %cl - andl $32767, %esi -..B1.13: - testl %esi, %esi - jle ..B1.63 -..B1.14: - fldt 64(%rsp) - lea _TWO_75(%rip), %rax - lea 8+_TWO_75(%rip), %rdx - fldl (%rax) - fmul %st(1), %st - fsubp %st, %st(1) - fmull (%rdx) - fstpt (%rsp) -..B1.15: - testb %cl, %cl - je ..B1.17 -..B1.16: - fldcw 50(%rsp) -..B1.17: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.18: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.22 -..B1.19: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.20: - fldcw 48(%rsp) -..B1.21: - movb $1, %cl -..B1.22: - fldt 64(%rsp) - lea _Q3(%rip), %rax - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.24 -..B1.23: - fldcw 50(%rsp) -..B1.24: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.25: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.29 -..B1.26: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.27: - fldcw 48(%rsp) -..B1.28: - movb $1, %cl -..B1.29: - fldt 64(%rsp) - lea 16+_Q2(%rip), %rax - fld %st(0) - lea _Q2(%rip), %rdx - fmul %st(1), %st - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.31 -..B1.30: - fldcw 50(%rsp) -..B1.31: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.32: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.36 -..B1.33: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.34: - fldcw 48(%rsp) -..B1.35: - movb $1, %cl -..B1.36: - fldt 64(%rsp) - lea 48+_Q1(%rip), %rax - fld %st(0) - lea 32+_Q1(%rip), %rsi - fmul %st(1), %st - lea 16+_Q1(%rip), %rdx - fld %st(0) - lea _Q1(%rip), %rdi - fmul %st(1), %st - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.38 -..B1.37: - fldcw 50(%rsp) -..B1.38: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.39: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.43 -..B1.40: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.41: - fldcw 48(%rsp) -..B1.42: - movb $1, %cl -..B1.43: - fldt 64(%rsp) - lea _TWO_53H(%rip), %rax - fld %st(0) - fld %st(1) - lea 304+_Q(%rip), %rdx - lea 272+_Q(%rip), %rsi - lea 240+_Q(%rip), %rdi - lea 208+_Q(%rip), %r8 - fldl (%rax) - lea 176+_Q(%rip), %r9 - fmul %st(3), %st - lea 144+_Q(%rip), %r10 - lea 112+_Q(%rip), %r11 - lea 80+_Q(%rip), %rax - testb %cl, %cl - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - fmul %st(0), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fadd %st, %st(2) - fld %st(2) - fmul %st(2), %st - fxch %st(4) - fstpt 16(%rsp) - fld %st(1) - fmul %st(1), %st - faddp %st, %st(4) - fld %st(3) - fxch %st(1) - fmul %st(0), %st - fadd %st, %st(1) - fldt (%rdx) - fmul %st(2), %st - lea 48+_Q(%rip), %rdx - fldt (%rsi) - lea 16+_Q(%rip), %rsi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 288+_Q(%rip), %rdi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - lea 256+_Q(%rip), %r8 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - lea 224+_Q(%rip), %r9 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - lea 192+_Q(%rip), %r10 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r11) - lea 160+_Q(%rip), %r11 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_Q(%rip), %rax - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 96+_Q(%rip), %rdx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 64+_Q(%rip), %rsi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 32+_Q(%rip), %rdi - fmul %st(3), %st - fldt (%r8) - lea _Q(%rip), %r8 - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r9) - lea 336+_Q(%rip), %r9 - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r10) - lea 320+_Q(%rip), %r10 - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r11) - lea _TWO_48H(%rip), %r11 - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%r8) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldt (%r9) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fmulp %st, %st(3) - fldt (%r10) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt 32(%rsp) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 16(%rsp) - fld %st(0) - fldl (%r11) - fld %st(0) - fadd %st(5), %st - fsubp %st, %st(1) - fmul %st, %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fldt 64(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt (%rsp) - fmul %st, %st(2) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.45 -..B1.44: - fldcw 50(%rsp) -..B1.45: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.46: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.50 -..B1.47: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.48: - fldcw 48(%rsp) -..B1.49: - movb $1, %cl -..B1.50: - fldt 64(%rsp) - lea ones(%rip), %rdx - movb 73(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %esi - fldl (%rdx,%rsi,8) - fmul %st, %st(1) - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - movzwl 72(%rsp), %eax - movl %eax, %edx - andl $32767, %edx - cmpl $16421, %edx - jge ..B1.59 -..B1.51: - cmpl $16388, %edx - jge ..B1.53 -..B1.52: - lea _TWO_52H(%rip), %rax - fld %st(0) - fld %st(1) - fldl (%rax) - fld %st(0) - fxch %st(1) - fadd %st, %st(3) - fsubr %st, %st(3) - fld %st(3) - fld %st(4) - fmul %st(5), %st - fxch %st(4) - fsub %st(5), %st - fmul %st, %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - faddp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fsqrt - fadd %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fsubrp %st, %st(4) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fdivrp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - fxch %st(1) - jmp ..B1.58 -..B1.53: - fldt .L_2il0floatpacket.2(%rip) - lea _TWO_32H(%rip), %rax - fmul %st(1), %st - cmpl $16394, %edx - fld %st(0) - fldl (%rax) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubr %st(1), %st - fldt .L_2il0floatpacket.0(%rip) - jge ..B1.55 -..B1.54: - fstp %st(2) - fld %st(2) - fmul %st(3), %st - fadd %st(2), %st - fsqrt - faddp %st, %st(3) - fxch %st(1) - fdiv %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - jmp ..B1.58 -..B1.55: - fstp %st(3) - cmpl $16401, %edx - jge ..B1.57 -..B1.56: - fld %st(2) - fdiv %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fdivr %st(2), %st - faddp %st, %st(1) - jmp ..B1.58 -..B1.57: - fxch %st(1) - fdivr %st(2), %st - faddp %st, %st(1) -..B1.58: - fldt 16(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 64(%rsp) - movzwl 72(%rsp), %edx - andl $32767, %edx - movl %edx, %eax - addl $-16383, %edx - negl %eax - fxch %st(2) - fstpt (%rsp) - addl $-2, %eax - movzwl 8(%rsp), %esi - andl $32767, %eax - andl $-32768, %esi - orl %eax, %esi - movw %si, 8(%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 16(%rsp) - fmulp %st, %st(1) - jmp ..B1.60 -..B1.59: - fstp %st(0) - andl $-32768, %eax - addl $-16382, %edx - orl $-49153, %eax - movw %ax, 72(%rsp) - lea _TWO_52H(%rip), %rax - fldt 64(%rsp) - fld %st(0) - fldl (%rax) - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(1) -..B1.60: - fldt 16(%rsp) - lea 48+_P(%rip), %r8 - fldt .L_2il0floatpacket.3(%rip) - lea 16+_P(%rip), %r9 - movl 68(%rsp), %esi - lea 64+_P(%rip), %r10 - shrl $23, %esi - lea 32+_P(%rip), %r11 - fldt (%r8) - movzbl %sil, %eax - movq __libm_rcp_table_256@GOTPCREL(%rip), %rdi - movl %edx, (%rsp) - lea 80+_P(%rip), %rdx - movq __libm_logl_table_256@GOTPCREL(%rip), %rsi - flds (%rdi,%rax,4) - fmul %st, %st(3) - shlq $4, %rax - fxch %st(2) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(1) - fld %st(1) - testb %cl, %cl - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fildl (%rsp) - fldt (%rdx) - lea _P(%rip), %rdx - fmul %st(3), %st - faddp %st, %st(6) - fxch %st(2) - fmul %st, %st(5) - fldt (%r9) - faddp %st, %st(6) - fmul %st, %st(5) - fxch %st(1) - fmulp %st, %st(5) - fldt (%r10) - fmul %st(1), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fldt .L_2il0floatpacket.4(%rip) - fmul %st(3), %st - fldt .L_2il0floatpacket.5(%rip) - fmulp %st, %st(4) - faddl 8(%rsi,%rax) - faddp %st, %st(1) - fxch %st(2) - faddl (%rax,%rsi) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%rsp) - je ..B1.62 -..B1.61: - fldcw 50(%rsp) -..B1.62: - fldt 16(%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.63: - cmpl $0, 68(%rsp) - jne ..B1.65 -..B1.64: - cmpl $0, 64(%rsp) - je ..B1.66 -..B1.65: - fldt 64(%rsp) - lea _small_value_80(%rip), %rsi - movb 73(%rsp), %al - andb $-128, %al - shrb $7, %al - fldt (%rsi) - movzbl %al, %edx - shlq $4, %rdx - fldt (%rsi,%rdx) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.66: - fldt 64(%rsp) - fstpt (%rsp) - jmp ..B1.15 -..B1.67: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.73 -..B1.68: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.69: - fldcw 48(%rsp) -..B1.70: - fldt 64(%rsp) - fstpt (%rsp) -..B1.71: - fldcw 50(%rsp) -..B1.72: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.73: - fldt 64(%rsp) - fstpt (%rsp) - jmp ..B1.72 - .align 16,0x90 - .cfi_endproc - .type asinhl,@function - .size asinhl,.-asinhl - .data -# -- End asinhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_Q3: - .word 6991 - .word 42216 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 33268 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 9764 - .word 39322 - .word 39161 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 43682 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 14144 - .word 39303 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 10686 - .word 40209 - .word 28068 - .word 46811 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 6376 - .word 25459 - .word 13370 - .word 63707 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 42228 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 4505 - .word 52442 - .word 52428 - .word 52428 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 31967 - .word 56173 - .word 28086 - .word 46811 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 26124 - .word 58234 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 22137 - .word 23222 - .word 53620 - .word 46917 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 45395 - .word 61656 - .word 25205 - .word 36391 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 28077 - .word 15147 - .word 52421 - .word 58572 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 19650 - .word 2873 - .word 50009 - .word 48451 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 47538 - .word 64725 - .word 9133 - .word 40943 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 42460 - .word 64288 - .word 29314 - .word 35191 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 54924 - .word 18085 - .word 19628 - .word 61339 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 8359 - .word 63244 - .word 48955 - .word 54066 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 13301 - .word 22367 - .word 28967 - .word 48066 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 47487 - .word 41074 - .word 54143 - .word 42870 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 18176 - .word 28317 - .word 25378 - .word 37849 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 2947 - .word 59345 - .word 39582 - .word 64148 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 7071 - .word 46945 - .word 60101 - .word 49232 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 33184 - .word 23492 - .word 18153 - .word 62298 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 44779 - .word 60944 - .word 30881 - .word 55868 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 22870 - .word 51718 - .word 28591 - .word 51709 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39328 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,352 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,96 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinl.S deleted file mode 100644 index 36b558921e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/asinl.S +++ /dev/null @@ -1,1320 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "asinl.c" - .text -..TXTST0: -# -- Begin asinl - .text - .align 16,0x90 - .globl asinl -asinl: -# parameter 1: 112 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_asinl.1: -..L2: - - subq $104, %rsp - .cfi_def_cfa_offset 112 - xorb %dl, %dl -..B1.2: - fnstcw 90(%rsp) -..B1.3: - movb 121(%rsp), %dil - movzwl 120(%rsp), %esi - andb $-128, %dil - andl $32767, %esi - shrb $7, %dil - movzwl 90(%rsp), %eax - cmpl $16383, %esi - jge ..B1.59 -..B1.4: - cmpl $16382, %esi - jge ..B1.49 -..B1.5: - cmpl $16376, %esi - jge ..B1.39 -..B1.6: - cmpl $16371, %esi - jge ..B1.32 -..B1.7: - cmpl $16365, %esi - jge ..B1.25 -..B1.8: - cmpl $16308, %esi - jge ..B1.18 -..B1.9: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.13 -..B1.10: - orl $-64768, %eax - movw %ax, 88(%rsp) -..B1.11: - fldcw 88(%rsp) -..B1.12: - movzwl 120(%rsp), %esi - movb $1, %dl - andl $32767, %esi -..B1.13: - testl %esi, %esi - jle ..B1.75 -..B1.14: - fldt 112(%rsp) - lea _TWO_75(%rip), %rax - lea 8+_TWO_75(%rip), %rcx - fldl (%rax) - fmul %st(1), %st - faddp %st, %st(1) - fmull (%rcx) - fstpt (%rsp) -..B1.15: - testb %dl, %dl - je ..B1.17 -..B1.16: - fldcw 90(%rsp) -..B1.17: - fldt (%rsp) - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B1.18: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.22 -..B1.19: - orl $-64768, %eax - movw %ax, 88(%rsp) -..B1.20: - fldcw 88(%rsp) -..B1.21: - movb $1, %dl -..B1.22: - fldt 112(%rsp) - lea _P4(%rip), %rax - testb %dl, %dl - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.24 -..B1.23: - fldcw 90(%rsp) -..B1.24: - fldt (%rsp) - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B1.25: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.29 -..B1.26: - orl $-64768, %eax - movw %ax, 88(%rsp) -..B1.27: - fldcw 88(%rsp) -..B1.28: - movb $1, %dl -..B1.29: - fldt 112(%rsp) - lea 16+_P3(%rip), %rax - fld %st(0) - lea _P3(%rip), %rcx - fmul %st(1), %st - testb %dl, %dl - fldt (%rax) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.31 -..B1.30: - fldcw 90(%rsp) -..B1.31: - fldt (%rsp) - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B1.32: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.36 -..B1.33: - orl $-64768, %eax - movw %ax, 88(%rsp) -..B1.34: - fldcw 88(%rsp) -..B1.35: - movb $1, %dl -..B1.36: - fldt 112(%rsp) - lea 48+_P2(%rip), %rax - fld %st(0) - lea 32+_P2(%rip), %rsi - fmul %st(1), %st - lea 16+_P2(%rip), %rcx - fld %st(0) - lea _P2(%rip), %rdi - fmul %st(1), %st - testb %dl, %dl - fldt (%rax) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.38 -..B1.37: - fldcw 90(%rsp) -..B1.38: - fldt (%rsp) - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B1.39: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.43 -..B1.40: - orl $-64768, %eax - movw %ax, 88(%rsp) -..B1.41: - fldcw 88(%rsp) -..B1.42: - movzwl 120(%rsp), %esi - movb $1, %dl - andl $32767, %esi -..B1.43: - fldt 112(%rsp) - lea _TWO_52H(%rip), %rax - fld %st(0) - cmpl $16381, %esi - fldl (%rax) - fmul %st, %st(1) - fld %st(1) - fadd %st(3), %st - fsubp %st, %st(2) - fld %st(1) - fxch %st(1) - fstpt 16(%rsp) - fld %st(1) - fsubr %st(3), %st - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fld %st(0) - fadd %st(3), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fld %st(1) - fmul %st(4), %st - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - fstpt 32(%rsp) - fldt 32(%rsp) - fld %st(2) - fmul %st(3), %st - fld %st(0) - faddp %st, %st(2) - jge ..B1.45 -..B1.44: - fstp %st(0) - lea 176+_P1(%rip), %rax - lea 144+_P1(%rip), %rcx - lea 112+_P1(%rip), %rsi - lea 80+_P1(%rip), %rdi - lea 160+_P1(%rip), %r10 - lea 48+_P1(%rip), %r8 - lea 128+_P1(%rip), %r11 - lea 16+_P1(%rip), %r9 - fldt (%rax) - lea 96+_P1(%rip), %rax - fmul %st(1), %st - fldt (%rcx) - lea 64+_P1(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - lea 32+_P1(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - lea _P1(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - lea 192+_P1(%rip), %r8 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fldt 48(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt (%rsp) - fldt (%r8) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - jmp ..B1.46 -..B1.45: - lea 272+_P(%rip), %rax - lea 240+_P(%rip), %rcx - lea 208+_P(%rip), %rsi - lea 176+_P(%rip), %rdi - lea 144+_P(%rip), %r8 - lea 112+_P(%rip), %r9 - lea 80+_P(%rip), %r10 - lea 48+_P(%rip), %r11 - fldt (%rax) - lea 16+_P(%rip), %rax - fmul %st(2), %st - fldt (%rcx) - lea 256+_P(%rip), %rcx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 224+_P(%rip), %rsi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 192+_P(%rip), %rdi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - lea 160+_P(%rip), %r8 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - lea 128+_P(%rip), %r9 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - lea 96+_P(%rip), %r10 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r11) - lea 64+_P(%rip), %r11 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - lea 32+_P(%rip), %rax - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - lea _P(%rip), %rcx - fmul %st(3), %st - fldt (%rsi) - lea 304+_P(%rip), %rsi - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - lea 288+_P(%rip), %rdi - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%rcx) - faddp %st, %st(3) - fldt 48(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 32(%rsp) - fldt (%rsp) - fldt (%rsi) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rdi) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(2) - fld %st(1) - fxch %st(5) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt 16(%rsp) - fmul %st(1), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fsub %st(3), %st - faddp %st, %st(1) -..B1.46: - fldt 64(%rsp) - fld %st(2) - fmul %st(4), %st - testb %dl, %dl - fxch %st(5) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 64(%rsp) - je ..B1.48 -..B1.47: - fldcw 90(%rsp) -..B1.48: - fldt 64(%rsp) - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B1.49: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.53 -..B1.50: - orl $-64768, %eax - movw %ax, 88(%rsp) -..B1.51: - fldcw 88(%rsp) -..B1.52: - movb $1, %dl -..B1.53: - fldt 112(%rsp) - lea _ones(%rip), %rcx - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_32H(%rip), %rsi - movzbl %dil, %eax - lea _TWO_52H(%rip), %rdi - fldl (%rsi) - fldl (%rcx,%rax,8) - fmul %st, %st(3) - fstpl 80(%rsp) - fxch %st(2) - fsubrl (%rcx) - fmul %st(1), %st - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fxch %st(1) - fsub %st(3), %st - fadd %st, %st(1) - fxch %st(1) - fsqrt - fldl (%rdi) - fstpt 32(%rsp) - fldt 32(%rsp) - fmul %st(1), %st - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fsubr %st, %st(5) - fld %st(1) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fsubrp %st, %st(6) - fxch %st(3) - faddp %st, %st(5) - fld %st(0) - fadd %st(2), %st - fdivrp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fmulp %st, %st(2) - fld %st(1) - fld %st(3) - fadd %st(3), %st - fmul %st, %st(1) - fld %st(4) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fld %st(2) - fadd %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fld %st(2) - fmul %st(3), %st - fld %st(0) - faddp %st, %st(2) - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - fstpt 112(%rsp) - fldt 112(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fcomip %st(1), %st - fstp %st(0) - jbe ..B1.55 -..B1.54: - fstp %st(1) - lea 176+_P1(%rip), %rax - lea 144+_P1(%rip), %rcx - lea 112+_P1(%rip), %rsi - lea 80+_P1(%rip), %rdi - lea 160+_P1(%rip), %r10 - lea 48+_P1(%rip), %r8 - lea 128+_P1(%rip), %r11 - lea 16+_P1(%rip), %r9 - fldt (%rax) - lea 96+_P1(%rip), %rax - fmul %st(1), %st - fldt (%rcx) - lea 64+_P1(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - lea 32+_P1(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - lea _P1(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - lea 192+_P1(%rip), %r8 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fldt 64(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 16(%rsp) - fldt (%r8) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(2) - fxch %st(1) - jmp ..B1.56 -..B1.55: - lea 272+_P(%rip), %rax - lea 240+_P(%rip), %rcx - lea 208+_P(%rip), %rsi - lea 176+_P(%rip), %rdi - lea 144+_P(%rip), %r8 - lea 112+_P(%rip), %r9 - lea 80+_P(%rip), %r10 - lea 48+_P(%rip), %r11 - fldt (%rax) - lea 16+_P(%rip), %rax - fmul %st(1), %st - fldt (%rcx) - lea 256+_P(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - lea 224+_P(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - lea 192+_P(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - lea 160+_P(%rip), %r8 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - lea 128+_P(%rip), %r9 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - lea 96+_P(%rip), %r10 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - lea 64+_P(%rip), %r11 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - lea 32+_P(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea _P(%rip), %rcx - fmul %st(2), %st - fldt (%rsi) - lea 304+_P(%rip), %rsi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 288+_P(%rip), %rdi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rcx) - faddp %st, %st(2) - fldt 64(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 48(%rsp) - fldt 16(%rsp) - fldt (%rsi) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(3) - fldt (%rdi) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fldt 32(%rsp) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) -..B1.56: - fldt (%rsp) - lea _pi_02(%rip), %rax - fmulp %st, %st(2) - fld %st(2) - fmul %st(1), %st - lea 16+_pi_02(%rip), %rcx - testb %dl, %dl - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st(2), %st - faddp %st, %st(2) - fldt .L_2il0floatpacket.2(%rip) - fmul %st, %st(1) - fmulp %st, %st(2) - fldt (%rax) - fld %st(0) - fadd %st(3), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fldt (%rcx) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fmull 80(%rsp) - fstpt 16(%rsp) - je ..B1.58 -..B1.57: - fldcw 90(%rsp) -..B1.58: - fldt 16(%rsp) - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B1.59: - movl %eax, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.63 -..B1.60: - orl $-64768, %eax - movw %ax, 88(%rsp) -..B1.61: - fldcw 88(%rsp) -..B1.62: - movzwl 120(%rsp), %esi - movb $1, %dl - andl $32767, %esi -..B1.63: - cmpl $32767, %esi - jne ..B1.67 -..B1.64: - cmpl $-2147483648, 116(%rsp) - jne ..B1.66 -..B1.65: - cmpl $0, 112(%rsp) - je ..B1.71 -..B1.66: - fldt 112(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) - jmp ..B1.72 -..B1.67: - cmpl $16383, %esi - jne ..B1.71 -..B1.68: - cmpl $-2147483648, 116(%rsp) - jne ..B1.71 -..B1.69: - cmpl $0, 112(%rsp) - jne ..B1.71 -..B1.70: - movzbl %dil, %ecx - lea _pi_2l(%rip), %rax - shlq $4, %rcx - lea _small_value_80(%rip), %rsi - fldt (%rcx,%rax) - fldt (%rcx,%rsi) - faddp %st, %st(1) - fstpt 8(%rsp) - jmp ..B1.72 -..B1.71: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 8(%rsp) -..B1.72: - testb %dl, %dl - je ..B1.74 -..B1.73: - fldcw 90(%rsp) -..B1.74: - fldt 8(%rsp) - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B1.75: - cmpl $0, 116(%rsp) - jne ..B1.77 -..B1.76: - cmpl $0, 112(%rsp) - je ..B1.78 -..B1.77: - fldt 112(%rsp) - lea _small_value_80(%rip), %rcx - movzbl %dil, %eax - shlq $4, %rax - fldt (%rcx) - fldt (%rcx,%rax) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.78: - fldt 112(%rsp) - fstpt (%rsp) - jmp ..B1.15 - .align 16,0x90 - .cfi_endproc - .type asinl,@function - .size asinl,.-asinl - .data -# -- End asinl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_P4: - .word 43691 - .word 44938 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P4,@object - .size _P4,16 - .align 2 -_P3: - .word 36763 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 40704 - .word 58046 - .word 39460 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _P3,@object - .size _P3,32 - .align 2 -_P2: - .word 43688 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 20771 - .word 39331 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 23807 - .word 53798 - .word 28073 - .word 46811 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 35198 - .word 7516 - .word 54204 - .word 63722 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _P2,@object - .size _P2,64 - .align 2 -_P1: - .word 43589 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 39364 - .word 39321 - .word 39321 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 17602 - .word 56173 - .word 28086 - .word 46811 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 47501 - .word 58414 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 27078 - .word 6583 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 39781 - .word 21053 - .word 25224 - .word 36391 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 46568 - .word 6235 - .word 50749 - .word 58572 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 41318 - .word 51558 - .word 37628 - .word 48452 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 55026 - .word 7893 - .word 43866 - .word 40925 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 43387 - .word 19951 - .word 2911 - .word 35445 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 32572 - .word 59281 - .word 11243 - .word 56666 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 49800 - .word 50337 - .word 42707 - .word 39184 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,208 - .align 2 -_P: - .word 42691 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 4317 - .word 52400 - .word 52428 - .word 52428 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 26206 - .word 56172 - .word 28086 - .word 46811 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 36130 - .word 58514 - .word 36408 - .word 63715 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 21592 - .word 8113 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 3093 - .word 49950 - .word 25215 - .word 36391 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 21499 - .word 24428 - .word 51889 - .word 58572 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 54828 - .word 41264 - .word 61120 - .word 48451 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 10243 - .word 1489 - .word 39717 - .word 40940 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 51433 - .word 46039 - .word 63564 - .word 35220 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 60402 - .word 39286 - .word 25675 - .word 60826 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 34219 - .word 36833 - .word 44839 - .word 57547 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 13013 - .word 26091 - .word 19721 - .word 60832 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 22353 - .word 41544 - .word 55443 - .word 55735 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 14948 - .word 7038 - .word 38091 - .word 38339 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 61727 - .word 61480 - .word 15906 - .word 51927 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 13386 - .word 23084 - .word 64443 - .word 55906 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 17499 - .word 23573 - .word 43947 - .word 42761 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39328 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,320 - .align 2 -_pi_02: - .word 0 - .word 0 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 35374 - .word 4889 - .word 2259 - .word 34211 - .word 16349 - .word 0 - .word 0 - .word 0 - .type _pi_02,@object - .size _pi_02,32 - .align 2 -_pi_2l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49151 - .word 0 - .word 0 - .word 0 - .type _pi_2l,@object - .size _pi_2l,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2.S deleted file mode 100644 index 023bababa2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2.S +++ /dev/null @@ -1,1197 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan2.c" - .text -..TXTST0: -# -- Begin atan2 - .text - .align 16,0x90 - .globl atan2 -atan2: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_atan2.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) - movsd %xmm1, 8(%rsp) -..B1.2: - pextrw $3, %xmm0, %eax - andl $32752, %eax - subl $14448, %eax - cmpl $3840, %eax - ja .L_2TAG_PACKET_0.0.2 - pextrw $3, %xmm1, %eax - andl $32752, %eax - subl $14448, %eax - cmpl $3840, %eax - ja .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - unpcklpd %xmm1, %xmm0 - xorpd %xmm5, %xmm5 - xorpd %xmm3, %xmm3 - movl $2048, %eax - pinsrw $3, %eax, %xmm5 - paddw %xmm1, %xmm5 - psrlq $29, %xmm5 - rcpss %xmm5, %xmm3 - xorpd %xmm4, %xmm4 - movl $14336, %ecx - pinsrw $3, %ecx, %xmm4 - psllq $29, %xmm3 - paddw %xmm4, %xmm3 - mulsd %xmm0, %xmm3 - xorpd %xmm2, %xmm2 - xorpd %xmm6, %xmm6 - xorpd %xmm7, %xmm7 - movl $32768, %eax - pinsrw $2, %eax, %xmm6 - movl $32767, %ecx - pinsrw $3, %ecx, %xmm7 - paddd %xmm6, %xmm3 - andpd %xmm7, %xmm3 - movq %xmm3, %xmm5 - pextrw $3, %xmm3, %eax - movl $16448, %ecx - pinsrw $3, %ecx, %xmm2 - minsd %xmm2, %xmm3 - movmskpd %xmm0, %edx - psllq $1, %xmm0 - psrlq $1, %xmm0 - cmpsd $2, %xmm2, %xmm5 - psllq $1, %xmm1 - psrlq $1, %xmm1 - movq %xmm1, %xmm6 - movq %xmm1, %xmm7 - movq %xmm0, %xmm2 - movl $0, %ecx - pinsrw $0, %ecx, %xmm6 - subsd %xmm6, %xmm7 - movq %xmm0, %xmm4 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm4 - mulsd %xmm3, %xmm7 - andpd %xmm5, %xmm0 - subsd %xmm6, %xmm0 - andpd %xmm5, %xmm1 - addsd %xmm1, %xmm4 - subsd %xmm7, %xmm0 - andl $32752, %eax - subl $16286, %eax - cmpl $1121, %eax - ja .L_2TAG_PACKET_3.0.2 - divsd %xmm4, %xmm0 - pextrw $3, %xmm3, %ecx - movsd a2(%rip), %xmm2 - movsd b2(%rip), %xmm3 - pextrw $0, %xmm5, %eax - addl %edx, %edx - lea P_TBL(%rip), %r8 - movapd (%r8,%rdx,8), %xmm6 - lea SGN_TBL(%rip), %r8 - movapd (%r8,%rdx,8), %xmm1 - subl $16286, %ecx - notl %eax - andl $1, %eax - addl %eax, %ecx - addl %ecx, %ecx - lea ATAN_TBL(%rip), %r8 - movapd (%r8,%rcx,8), %xmm5 - xorpd %xmm1, %xmm5 - addpd %xmm6, %xmm5 - movq %xmm5, %xmm6 - unpckhpd %xmm5, %xmm5 - xorpd %xmm0, %xmm1 - movq %xmm1, %xmm4 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm2 - addsd %xmm0, %xmm3 - addsd %xmm6, %xmm1 - subsd %xmm1, %xmm6 - addsd %xmm4, %xmm6 - addsd 8+a2(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm4, %xmm0 - addsd %xmm5, %xmm6 - mulsd %xmm2, %xmm0 - addsd 8+b2(%rip), %xmm3 - mulsd %xmm3, %xmm0 - addsd %xmm6, %xmm0 - addsd %xmm1, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_3.0.2: - addl $942, %eax - cmpl $942, %eax - ja .L_2TAG_PACKET_4.0.2 - xorpd %xmm4, %xmm4 - movl $16368, %ecx - pinsrw $3, %ecx, %xmm4 - divsd %xmm1, %xmm4 - addl %edx, %edx - lea SGN_TBL(%rip), %r8 - movapd (%r8,%rdx,8), %xmm6 - unpcklpd %xmm3, %xmm3 - xorpd %xmm6, %xmm0 - xorpd %xmm6, %xmm2 - xorpd %xmm6, %xmm3 - lea P_TBL2(%rip), %r8 - movapd (%r8,%rdx,8), %xmm7 - movsd a2(%rip), %xmm1 - movsd b2(%rip), %xmm5 - lea SELECT_B(%rip), %r8 - andpd (%r8,%rdx,8), %xmm3 - mulsd %xmm4, %xmm2 - mulsd %xmm4, %xmm0 - movq %xmm2, %xmm6 - mulsd %xmm2, %xmm2 - mulsd %xmm2, %xmm1 - addsd %xmm2, %xmm5 - mulsd %xmm2, %xmm6 - addsd 8+a2(%rip), %xmm1 - mulsd %xmm2, %xmm5 - addsd %xmm0, %xmm7 - addpd %xmm3, %xmm7 - mulsd %xmm6, %xmm1 - addsd 8+b2(%rip), %xmm5 - mulsd %xmm1, %xmm5 - addsd %xmm7, %xmm5 - pshufd $238, %xmm7, %xmm0 - addsd %xmm5, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_4.0.2: - movsd 8(%rsp), %xmm1 - movsd (%rsp), %xmm0 - pextrw $3, %xmm1, %eax - andl $32752, %eax - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl %eax, %ecx - jg .L_2TAG_PACKET_5.0.2 - pextrw $3, %xmm1, %ecx - cmpl $32767, %ecx - jg .L_2TAG_PACKET_6.0.2 - divsd %xmm1, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_6.0.2: - andpd SGNMASK(%rip), %xmm0 - movsd pi_table(%rip), %xmm2 - xorpd %xmm2, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_5.0.2: - andpd SGNMASK(%rip), %xmm0 - movsd pi2_table(%rip), %xmm2 - xorpd %xmm2, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: -.L_2TAG_PACKET_1.0.2: - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - pextrw $3, %xmm1, %eax - andl $32752, %eax - cmpl $32752, %ecx - je .L_2TAG_PACKET_7.0.2 - cmpl $32752, %eax - je .L_2TAG_PACKET_8.0.2 - movsd POW55(%rip), %xmm3 - movl $1024, %edx - movsd INVEXPMASK(%rip), %xmm4 - xorpd %xmm6, %xmm6 - movsd EXPMASK(%rip), %xmm7 - cmpl $0, %ecx - je .L_2TAG_PACKET_9.0.2 -.L_2TAG_PACKET_10.0.2: - cmpl $0, %eax - je .L_2TAG_PACKET_11.0.2 -.L_2TAG_PACKET_12.0.2: - addl %ecx, %edx - subl %eax, %edx - cmpl $2048, %edx - ja .L_2TAG_PACKET_4.0.2 - addl $15344, %edx - pinsrw $3, %edx, %xmm6 - andpd %xmm4, %xmm0 - andpd %xmm4, %xmm1 - orpd %xmm6, %xmm0 - orpd %xmm7, %xmm1 - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_9.0.2: - subl $880, %edx - mulsd %xmm3, %xmm0 - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl $0, %ecx - je .L_2TAG_PACKET_13.0.2 - jmp .L_2TAG_PACKET_10.0.2 -.L_2TAG_PACKET_11.0.2: - addl $880, %edx - mulsd %xmm3, %xmm1 - pextrw $3, %xmm1, %eax - andl $32752, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_14.0.2 - jmp .L_2TAG_PACKET_12.0.2 -.L_2TAG_PACKET_7.0.2: - movd %xmm0, %edx - movq %xmm0, %xmm2 - psrlq $32, %xmm2 - movd %xmm2, %ecx - andl $1048575, %ecx - orl %edx, %ecx - cmpl $0, %ecx - jne .L_2TAG_PACKET_15.0.2 - psrlq $63, %xmm0 - psllq $63, %xmm0 - cmpl $32752, %eax - jae .L_2TAG_PACKET_16.0.2 - movapd pi2_table(%rip), %xmm5 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - orpd %xmm5, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_15.0.2: - addsd %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_16.0.2: - movd %xmm1, %eax - movq %xmm1, %xmm2 - psrlq $32, %xmm2 - movd %xmm2, %ecx - movl $-2147483648, %edx - andl %ecx, %edx - andl $1048575, %ecx - orl %eax, %ecx - cmpl $0, %ecx - jne .L_2TAG_PACKET_17.0.2 - cmpl $0, %edx - jne .L_2TAG_PACKET_18.0.2 - movapd pi4_table(%rip), %xmm5 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - orpd %xmm5, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_17.0.2: - movq %xmm1, %xmm0 - addsd %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_18.0.2: - movapd pi4_table(%rip), %xmm5 - movapd pi2_table(%rip), %xmm6 - addpd %xmm6, %xmm5 - pshufd $238, %xmm5, %xmm6 - addpd %xmm6, %xmm5 - orpd %xmm5, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_8.0.2: - movd %xmm1, %eax - movq %xmm1, %xmm2 - psrlq $32, %xmm2 - movd %xmm2, %ecx - movl $-2147483648, %edx - andl %ecx, %edx - andl $1048575, %ecx - orl %eax, %ecx - cmpl $0, %ecx - jne .L_2TAG_PACKET_17.0.2 - psrlq $63, %xmm0 - psllq $63, %xmm0 - cmpl $0, %edx - jne .L_2TAG_PACKET_19.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_19.0.2: - movapd pi_table(%rip), %xmm5 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - orpd %xmm5, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_13.0.2: - pextrw $3, %xmm1, %edx - andl $32768, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_20.0.2 - movapd pi_table(%rip), %xmm5 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - comisd %xmm0, %xmm1 - orpd %xmm5, %xmm0 - je .L_2TAG_PACKET_21.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_20.0.2: - comisd %xmm0, %xmm1 - je .L_2TAG_PACKET_21.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_14.0.2: - movapd pi2_table(%rip), %xmm5 - psrlq $63, %xmm0 - psllq $63, %xmm0 - pshufd $238, %xmm5, %xmm4 - addsd %xmm4, %xmm5 - orpd %xmm5, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_21.0.2: - movq %xmm0, 16(%rsp) -..B1.3: - movq 16(%rsp), %xmm0 -.L_2TAG_PACKET_22.0.2: -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type atan2,@function - .size atan2,.-atan2 - .data -# -- End atan2 - .section .rodata, "a" - .align 16 - .align 16 -a2: - .long 2006262985 - .long 1069310863 - .long 2358449471 - .long 3217342131 - .type a2,@object - .size a2,16 - .align 16 -b2: - .long 3845454352 - .long 1069952297 - .long 2829679149 - .long 1073771565 - .type b2,@object - .size b2,16 - .align 16 -P_TBL: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1413754136 - .long 1074340347 - .long 856972295 - .long 1017226790 - .long 1413754136 - .long 3221823995 - .long 856972295 - .long 3164710438 - .type P_TBL,@object - .size P_TBL,64 - .align 16 -SGN_TBL: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 0 - .type SGN_TBL,@object - .size SGN_TBL,64 - .align 16 -ATAN_TBL: - .long 3390881280 - .long 1067318733 - .long 1411116779 - .long 1018950063 - .long 2985987840 - .long 1067384211 - .long 2088903695 - .long 1018086027 - .long 3148445184 - .long 1067449685 - .long 2044163806 - .long 1017271335 - .long 3667629184 - .long 1067515494 - .long 2353092775 - .long 1019967309 - .long 1546568832 - .long 1067580954 - .long 611991315 - .long 1017602584 - .long 3815996800 - .long 1067646404 - .long 466038598 - .long 1019686426 - .long 4050241920 - .long 1067711845 - .long 3265026328 - .long 1019626952 - .long 120454912 - .long 1067777277 - .long 1542207696 - .long 1020155608 - .long 2784639744 - .long 1067842697 - .long 3883834623 - .long 1018602870 - .long 1328010624 - .long 1067908107 - .long 1791097456 - .long 1019053126 - .long 2217794048 - .long 1067973505 - .long 551619938 - .long 1018494194 - .long 3333520000 - .long 1068038891 - .long 2390331823 - .long 1019033022 - .long 2557052032 - .long 1068104265 - .long 2423976108 - .long 1019728674 - .long 2067649536 - .long 1068169626 - .long 3757397745 - .long 1018672362 - .long 4047094784 - .long 1068234973 - .long 481613184 - .long 1019275104 - .long 2089853184 - .long 1068300307 - .long 1733914374 - .long 1020124677 - .long 2678003840 - .long 1068365626 - .long 1373600282 - .long 1013935474 - .long 3706496128 - .long 1068430930 - .long 1000610902 - .long 1019673285 - .long 3073179008 - .long 1068496219 - .long 1497143008 - .long 1019900342 - .long 2803716736 - .long 1068562846 - .long 1476677416 - .long 1019444094 - .long 3204984128 - .long 1068628077 - .long 1192335905 - .long 1018748628 - .long 831146624 - .long 1068693273 - .long 2733586224 - .long 1018823295 - .long 243029376 - .long 1068758431 - .long 950106081 - .long 1019046675 - .long 1735561920 - .long 1068823549 - .long 3546440856 - .long 1020104712 - .long 1339217792 - .long 1068888626 - .long 3028812387 - .long 1019818321 - .long 3706342144 - .long 1068953659 - .long 3814564029 - .long 1017763871 - .long 637726976 - .long 1069018648 - .long 3584007699 - .long 1017976868 - .long 1148779264 - .long 1069083589 - .long 2282532133 - .long 1019483954 - .long 1406131392 - .long 1069148481 - .long 1547359113 - .long 1019786342 - .long 1908875904 - .long 1069213322 - .long 1315508410 - .long 1020009473 - .long 3194947520 - .long 1069278110 - .long 3845393201 - .long 1015803761 - .long 1547487744 - .long 1069342844 - .long 3863107865 - .long 1019810104 - .long 1881061952 - .long 1069407521 - .long 4288343548 - .long 1019687581 - .long 563086336 - .long 1069472140 - .long 2582230241 - .long 1020099350 - .long 2594975552 - .long 1069536698 - .long 2306443764 - .long 1019667244 - .long 3438545024 - .long 1069606573 - .long 957455549 - .long 1015587735 - .long 4211357472 - .long 1069670906 - .long 2611778754 - .long 1017877214 - .long 3002835424 - .long 1069735101 - .long 235580458 - .long 1020211685 - .long 3905315424 - .long 1069799150 - .long 3630647617 - .long 1018736849 - .long 2849656576 - .long 1069863047 - .long 2412165062 - .long 1019693004 - .long 507429472 - .long 1069926785 - .long 1397750723 - .long 1018412717 - .long 2307470272 - .long 1069990356 - .long 1796470904 - .long 1019796181 - .long 1271814912 - .long 1070053755 - .long 189761565 - .long 1016149115 - .long 3800538144 - .long 1070116974 - .long 2524871582 - .long 1018263353 - .long 3916203552 - .long 1070180008 - .long 127848658 - .long 1017672664 - .long 457192032 - .long 1070242851 - .long 4020400938 - .long 1019823010 - .long 1385324704 - .long 1070305495 - .long 564511179 - .long 1016079094 - .long 2322869856 - .long 1070367935 - .long 2347103319 - .long 1018927760 - .long 3743438624 - .long 1070430165 - .long 877973862 - .long 1019638162 - .long 2392255552 - .long 1070492180 - .long 2432782267 - .long 1018872629 - .long 4180443328 - .long 1070553973 - .long 3102990015 - .long 1020093101 - .long 2547540832 - .long 1070636485 - .long 3877738253 - .long 1017300424 - .long 2735468912 - .long 1070697461 - .long 2446470256 - .long 1019235378 - .long 542633792 - .long 1070757943 - .long 583606328 - .long 1018624131 - .long 923265984 - .long 1070817911 - .long 1793926708 - .long 1019714161 - .long 918728448 - .long 1070877348 - .long 3726463586 - .long 1019433296 - .long 2572275008 - .long 1070936237 - .long 1845354238 - .long 1019459238 - .long 50974688 - .long 1070994564 - .long 983808064 - .long 1016685418 - .long 1105518320 - .long 1071052313 - .long 2357496692 - .long 1015139882 - .long 1264825328 - .long 1071109472 - .long 2244129354 - .long 1019046344 - .long 961157920 - .long 1071166029 - .long 3124185339 - .long 1018541776 - .long 1162701584 - .long 1071221973 - .long 1279780948 - .long 1019268918 - .long 3284935664 - .long 1071277294 - .long 2670033472 - .long 1019833744 - .long 497441888 - .long 1071331985 - .long 1032737410 - .long 1019795212 - .long 3377383904 - .long 1071386036 - .long 2356897182 - .long 1020205553 - .long 1126962000 - .long 1071439443 - .long 3723724586 - .long 1015212418 - .long 90291008 - .long 1071492199 - .long 4178672431 - .long 1020186971 - .long 190059536 - .long 1071595741 - .long 1763589807 - .long 1019162163 - .long 2497392840 - .long 1071670654 - .long 3036997041 - .long 1020204325 - .long 2616971944 - .long 1071719773 - .long 300151069 - .long 1017041957 - .long 2883518128 - .long 1071767563 - .long 2203981414 - .long 1019190108 - .long 1496354352 - .long 1071814030 - .long 332287966 - .long 1016846435 - .long 483276728 - .long 1071859184 - .long 653845024 - .long 1018830914 - .long 3097401072 - .long 1071903039 - .long 1514746408 - .long 1019278972 - .long 2737217248 - .long 1071945615 - .long 1358845067 - .long 1017268275 - .long 2072577560 - .long 1071986933 - .long 3041024735 - .long 1019929672 - .long 2266405656 - .long 1072027017 - .long 1271261130 - .long 1012925070 - .long 958652544 - .long 1072065894 - .long 2158017058 - .long 1019955372 - .long 3312993840 - .long 1072103591 - .long 765809169 - .long 1019114443 - .long 3177001304 - .long 1072140139 - .long 144180084 - .long 1019822186 - .long 3071642184 - .long 1072175568 - .long 4004602424 - .long 1019420740 - .long 4283953648 - .long 1072209909 - .long 1511950430 - .long 1020176966 - .long 1413754136 - .long 1072243195 - .long 856972295 - .long 1015129638 - .long 4073202944 - .long 1072306725 - .long 4068194804 - .long 1019714860 - .long 946117760 - .long 1072366415 - .long 694980733 - .long 1020150135 - .long 3980632032 - .long 1072422512 - .long 1313251280 - .long 1019948709 - .long 1468297112 - .long 1072475260 - .long 330111143 - .long 1019809198 - .long 3478063816 - .long 1072524887 - .long 2930067044 - .long 1017784081 - .long 1153979856 - .long 1072571613 - .long 2225786102 - .long 1017634481 - .long 2089828808 - .long 1072615641 - .long 474621367 - .long 1017043414 - .long 3531732632 - .long 1072657163 - .long 2276396220 - .long 1018757240 - .long 775214612 - .long 1072694803 - .long 3209744818 - .long 1019963015 - .long 662307284 - .long 1072713319 - .long 1381696763 - .long 1019763781 - .long 1192776652 - .long 1072730830 - .long 3017932994 - .long 1015179769 - .long 744202396 - .long 1072747407 - .long 2073854034 - .long 1019512292 - .long 8337908 - .long 1072763115 - .long 16004448 - .long 1019599514 - .long 3589868768 - .long 1072778013 - .long 1374369804 - .long 1018019237 - .long 121647320 - .long 1072792159 - .long 128481634 - .long 1018115438 - .long 2464923204 - .long 1072805601 - .long 1787331214 - .long 1016798022 - .long 4093304372 - .long 1072830562 - .long 3306868969 - .long 1019384078 - .long 1436891684 - .long 1072853231 - .long 676347266 - .long 1017302183 - .long 1104571840 - .long 1072873890 - .long 2870400285 - .long 1019938149 - .long 2037009832 - .long 1072892781 - .long 2956702105 - .long 1016472908 - .long 3139037960 - .long 1072910111 - .long 916057147 - .long 1018364335 - .long 1826698064 - .long 1072926058 - .long 2171961098 - .long 1019669816 - .long 1353941060 - .long 1072940774 - .long 1722928782 - .long 1019926215 - .long 1803191644 - .long 1072954391 - .long 1547878639 - .long 1020259262 - .long 1092591296 - .long 1072967024 - .long 3070107923 - .long 1018320401 - .long 2205372832 - .long 1072978772 - .long 787328196 - .long 1014621351 - .long 1291577100 - .long 1072989723 - .long 2964757301 - .long 1020242528 - .long 4234512804 - .long 1072999952 - .long 3136030038 - .long 1017522144 - .long 3248069132 - .long 1073009528 - .long 1506192355 - .long 1018050472 - .long 3932628500 - .long 1073018509 - .long 1045823554 - .long 1019946655 - .long 4195697848 - .long 1073026948 - .long 233443322 - .long 1018917447 - .long 2501811452 - .long 1073034892 - .long 901427976 - .long 1017333852 - .long 866379428 - .long 1073049455 - .long 2437443742 - .long 1019678792 - .long 1376865888 - .long 1073062480 - .long 3365790232 - .long 1014547152 - .long 3290094268 - .long 1073074195 - .long 3898947415 - .long 1018683566 - .long 354764884 - .long 1073084787 - .long 3854322404 - .long 1019662058 - .long 3332975496 - .long 1073094406 - .long 3171701655 - .long 1017830922 - .long 1141460088 - .long 1073103181 - .long 3946082701 - .long 1020032019 - .long 745761284 - .long 1073111216 - .long 1347210591 - .long 1019106121 - .long 1673304508 - .long 1073118600 - .long 1760606642 - .long 1017324577 - .long 983388240 - .long 1073125409 - .long 3740651204 - .long 1019514104 - .long 3895509100 - .long 1073131706 - .long 2409629983 - .long 1020069322 - .long 2128523668 - .long 1073137548 - .long 3045605368 - .long 1018579174 - .long 2075485692 - .long 1073142981 - .long 3720571789 - .long 1017557436 - .long 121855976 - .long 1073148047 - .long 2391744767 - .long 1020160645 - .long 4181733780 - .long 1073152780 - .long 995028816 - .long 1019681295 - .long 2887813280 - .long 1073157214 - .long 218733247 - .long 1020003509 - .long 2862180896 - .long 1073161375 - .long 2043806490 - .long 1018602288 - .long 3909375184 - .long 1073168973 - .long 1559903412 - .long 1020103444 - .long 3533966292 - .long 1073175738 - .long 734884149 - .long 1018462962 - .long 3815044608 - .long 1073181799 - .long 3630523428 - .long 1017250093 - .long 739639376 - .long 1073187261 - .long 4167476661 - .long 1020008277 - .long 1068309648 - .long 1073192207 - .long 2110061437 - .long 1019295858 - .long 2350566352 - .long 1073196707 - .long 582596516 - .long 1018568821 - .long 2529520024 - .long 1073200819 - .long 745552787 - .long 1019053165 - .long 1841667508 - .long 1073204591 - .long 3982568700 - .long 1016503327 - .long 2242261080 - .long 1073208063 - .long 3433582258 - .long 1016196763 - .long 715134328 - .long 1073211270 - .long 355901358 - .long 1020087916 - .long 2700735876 - .long 1073214240 - .long 3640957736 - .long 1019780205 - .long 141607580 - .long 1073217000 - .long 2488245051 - .long 1020262395 - .long 287934404 - .long 1073219570 - .long 2392691085 - .long 1019883292 - .long 2363373988 - .long 1073221969 - .long 4194561737 - .long 1019237447 - .long 3829340424 - .long 1073224214 - .long 429455526 - .long 1019490975 - .long 1988805928 - .long 1073226320 - .long 3029848706 - .long 1018104889 - .long 1647572320 - .long 1073230161 - .long 10289938 - .long 1017394880 - .long 3988000624 - .long 1073233576 - .long 1957559169 - .long 1019434816 - .long 4263843944 - .long 1073236633 - .long 204710264 - .long 1019908761 - .long 663197724 - .long 1073239386 - .long 1921757578 - .long 1019778948 - .long 3560800700 - .long 1073241876 - .long 3994348896 - .long 1019230192 - .long 2441785656 - .long 1073244141 - .long 871468611 - .long 1014800505 - .long 3277400272 - .long 1073246209 - .long 4092218139 - .long 1020040842 - .long 3951990120 - .long 1073248105 - .long 4276546478 - .long 1019763677 - .long 2737338540 - .long 1073249850 - .long 252776012 - .long 1018794951 - .long 1511361316 - .long 1073251461 - .long 3119653999 - .long 1018514803 - .long 3969162516 - .long 1073252952 - .long 1037069016 - .long 1016792900 - .long 413985240 - .long 1073254338 - .long 4110171432 - .long 1020001345 - .long 3681283576 - .long 1073255627 - .long 1463092818 - .long 1020260354 - .long 3146455488 - .long 1073256831 - .long 1031209123 - .long 1016554799 - .long 95214512 - .long 1073257958 - .long 1373808632 - .long 1019493031 - .long 4250240828 - .long 1073259013 - .long 3891047882 - .long 1020108730 - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .type ATAN_TBL,@object - .size ATAN_TBL,2624 - .align 16 -P_TBL2: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 856972295 - .long 1017226790 - .long 1413754136 - .long 1074340347 - .long 856972295 - .long 3164710438 - .long 1413754136 - .long 3221823995 - .type P_TBL2,@object - .size P_TBL2,64 - .align 16 -SELECT_B: - .long 0 - .long 0 - .long 4294967295 - .long 4294967295 - .long 0 - .long 0 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 0 - .long 0 - .long 4294967295 - .long 4294967295 - .long 0 - .long 0 - .type SELECT_B,@object - .size SELECT_B,64 - .align 16 -SGNMASK: - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .type SGNMASK,@object - .size SGNMASK,16 - .align 16 -pi_table: - .long 1413754136 - .long 1074340347 - .long 856972295 - .long 1017226790 - .type pi_table,@object - .size pi_table,16 - .align 16 -pi2_table: - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .type pi2_table,@object - .size pi2_table,16 - .align 16 -pi4_table: - .long 1413754136 - .long 1072243195 - .long 856972295 - .long 1015129638 - .type pi4_table,@object - .size pi4_table,16 - .align 4 -POW55: - .long 0 - .long 1130364928 - .type POW55,@object - .size POW55,8 - .align 4 -INVEXPMASK: - .long 4294967295 - .long 2148532223 - .type INVEXPMASK,@object - .size INVEXPMASK,8 - .align 4 -EXPMASK: - .long 0 - .long 1072693248 - .type EXPMASK,@object - .size EXPMASK,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2dl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2dl.S deleted file mode 100644 index 84cc078f5d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2dl.S +++ /dev/null @@ -1,1433 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan2dl.c" - .text -..TXTST0: -# -- Begin atand2l - .text - .align 16,0x90 - .globl atand2l -atand2l: -# parameter 1: 8 + %rsp -# parameter 2: 24 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_atand2l.1: -..L2: - - fldt 8(%rsp) - fldt 24(%rsp) - fstpt 24(%rsp) - fstpt 8(%rsp) - jmp atan2dl@PLT - .align 16,0x90 - .cfi_endproc - .type atand2l,@function - .size atand2l,.-atand2l - .data -# -- End atand2l - .text -# -- Begin atan2dl - .text - .align 16,0x90 - .globl atan2dl -atan2dl: -# parameter 1: 96 + %rsp -# parameter 2: 112 + %rsp -..B2.1: - .cfi_startproc -..___tag_value_atan2dl.4: -..L5: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %dl, %dl -..B2.2: - fnstcw 74(%rsp) -..B2.3: - movzbl 105(%rsp), %r8d - andl $128, %r8d - movzbl 121(%rsp), %eax - movzwl 104(%rsp), %esi - andl $128, %eax - andl $32767, %esi - shrl $7, %r8d - movzwl 120(%rsp), %edi - movl %r8d, %r9d - shrl $7, %eax - andl $32767, %edi - cmpl $32767, %esi - je ..B2.105 -..B2.4: - cmpl $32767, %edi - je ..B2.88 -..B2.5: - testl %esi, %esi - jne ..B2.7 -..B2.6: - cmpq $0, 96(%rsp) - je ..B2.11 -..B2.7: - testl %edi, %edi - jne ..B2.23 -..B2.8: - cmpq $0, 112(%rsp) - jne ..B2.23 -..B2.9: - testl %esi, %esi - jne ..B2.22 -..B2.10: - cmpq $0, 96(%rsp) - jne ..B2.18 -..B2.11: - testl %edi, %edi - jne ..B2.14 -..B2.12: - cmpq $0, 112(%rsp) - je ..B2.83 -..B2.13: - lea _smallest_value_64(%rip), %rdx - movq (%rdx), %rcx - movq %rcx, 48(%rsp) -..B2.14: - testl %eax, %eax - je ..B2.16 -..B2.15: - lea c180(%rip), %rax - fldl (%rax,%r9,8) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.16: - lea _zeros(%rip), %rax - fldl (%rax,%r9,8) -..B2.17: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.18: - testl %edi, %edi - jne ..B2.23 -..B2.19: - cmpq $0, 112(%rsp) - jne ..B2.23 -..B2.20: - testl %esi, %esi - jne ..B2.22 -..B2.21: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 48(%rsp) -..B2.22: - lea c90(%rip), %rax - fldl (%rax,%r9,8) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.23: - cmpl %esi, %edi - jne ..B2.29 -..B2.24: - movl 116(%rsp), %ecx - cmpl 100(%rsp), %ecx - jne ..B2.29 -..B2.25: - movl 112(%rsp), %ecx - cmpl 96(%rsp), %ecx - jne ..B2.29 -..B2.26: - orl %esi, %edi - jne ..B2.28 -..B2.27: - lea _smallest_value_64(%rip), %rdx - movq (%rdx), %rcx - movq %rcx, 48(%rsp) -..B2.28: - movl %eax, %eax - lea exact(%rip), %rdx - lea (%r9,%rax,2), %rcx - fldl (%rdx,%rcx,8) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.29: - movzwl 74(%rsp), %r10d - movl %r10d, %ecx - andl $3840, %ecx - cmpl $768, %ecx - je ..B2.33 -..B2.30: - andl $-3841, %r10d - orl $-64768, %r10d - movw %r10w, 72(%rsp) -..B2.31: - fldcw 72(%rsp) -..B2.32: - movb $1, %dl -..B2.33: - cmpl $8191, %edi - jg ..B2.37 -..B2.34: - cmpl $8191, %esi - jg ..B2.36 -..B2.35: - fldt 112(%rsp) - lea _TWO_8192(%rip), %rcx - fldt 96(%rsp) - fldt (%rcx) - fmul %st, %st(2) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - movzwl 120(%rsp), %edi - movzwl 104(%rsp), %esi - andl $32767, %edi - andl $32767, %esi - jmp ..B2.38 -..B2.36: - fldt 112(%rsp) - fldt 96(%rsp) - jmp ..B2.41 -..B2.37: - fldt 112(%rsp) - fldt 96(%rsp) -..B2.38: - cmpl $24575, %edi - jl ..B2.41 -..B2.39: - cmpl $24575, %esi - jl ..B2.41 -..B2.40: - lea 16+_TWO_8192(%rip), %rcx - fldt (%rcx) - fmul %st, %st(2) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - movzwl 120(%rsp), %edi - movzwl 104(%rsp), %esi - andl $32767, %edi - andl $32767, %esi -..B2.41: - lea _ones(%rip), %rcx - fldl (%rcx,%rax,8) - fmulp %st, %st(2) - fld %st(0) - fldl (%rcx,%r9,8) - fmul %st, %st(1) - fxch %st(3) - fcomi %st(1), %st - jbe ..B2.69 -..B2.42: - lea 12(%rsi), %r10d - cmpl %r10d, %edi - jle ..B2.65 -..B2.43: - lea 75(%rsi), %r10d - cmpl %r10d, %edi - jle ..B2.62 -..B2.44: - fstp %st(0) - fstp %st(0) - fstp %st(1) - testl %eax, %eax - je ..B2.46 -..B2.45: - fstp %st(0) - movq %r9, %rcx - lea _small_value_80(%rip), %rax - shlq $4, %rcx - lea c180(%rip), %rsi - fldt (%rax,%rcx) - fsubrl (%rsi,%r9,8) - fstpt 56(%rsp) - jmp ..B2.80 -..B2.46: - testl %esi, %esi - jle ..B2.87 -..B2.47: - fstp %st(0) - xorl %esi, %esi -..B2.48: - shll $15, %eax - orl $-49153, %eax - movw %ax, 120(%rsp) - lea _TWO_32H(%rip), %rax - fldt 112(%rsp) - fld %st(0) - fld %st(1) - fld %st(2) - fxch %st(3) - fstpt 32(%rsp) - fldt 32(%rsp) - fldl (%rax) - fmul %st, %st(3) - shll $15, %r8d - fxch %st(2) - fsubr %st(3), %st - movzwl 104(%rsp), %r9d - orl $-49153, %r8d - movw %r8w, 104(%rsp) - lea 8+_C180byPi(%rip), %r8 - andl $32767, %r9d - fsubrp %st, %st(3) - subl %r9d, %edi - fxch %st(2) - fsubr %st, %st(3) - fld %st(1) - cmpl $16382, %edi - fldl (%rcx) - lea _C180byPi(%rip), %rcx - fld %st(0) - fdivp %st, %st(5) - fxch %st(1) - fmul %st(4), %st - fld %st(0) - fsub %st(5), %st - fsubrp %st, %st(1) - fld %st(0) - fsubr %st(5), %st - fld %st(3) - fmul %st(1), %st - fxch %st(6) - fmul %st, %st(7) - fxch %st(7) - faddp %st, %st(6) - fxch %st(1) - fmul %st, %st(3) - fxch %st(2) - fsub %st, %st(3) - fxch %st(5) - fsubrp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fldl (%rcx) - fmul %st, %st(1) - fmulp %st, %st(2) - fldl (%r8) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fldt 96(%rsp) - fld %st(0) - fmul %st(3), %st - fld %st(1) - fsubr %st(1), %st - fsubrp %st, %st(1) - fxch %st(3) - fmul %st(5), %st - fld %st(0) - fsub %st(6), %st - fsubrp %st, %st(1) - fsubr %st, %st(5) - fxch %st(2) - faddp %st, %st(5) - fmul %st, %st(4) - fld %st(0) - fsub %st(3), %st - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(5) - faddp %st, %st(3) - fldt .L_2il0floatpacket.2(%rip) - fmul %st(5), %st - fsubr %st, %st(1) - fxch %st(1) - fchs - fsubrp %st, %st(1) - fstpt 56(%rsp) - fldt 56(%rsp) - fsubrp %st, %st(4) - fxch %st(3) - fstpt 16(%rsp) - fldt 16(%rsp) - faddp %st, %st(1) - jl ..B2.52 -..B2.49: - fldt 56(%rsp) - lea _small(%rip), %rax - addl $-16318, %edi - cmpl $16382, %edi - fldt (%rax) - fmul %st, %st(1) - fxch %st(1) - fstpt 56(%rsp) - fmul %st, %st(1) - jl ..B2.51 -..B2.50: - fldt 56(%rsp) - addl $-16318, %edi - fmul %st(1), %st - fstpt 56(%rsp) - fldt 56(%rsp) - fstpt (%rsp) - fmulp %st, %st(1) - jmp ..B2.53 -..B2.51: - fstp %st(0) - fldt 56(%rsp) - fstpt (%rsp) - jmp ..B2.53 -..B2.52: - fldt 56(%rsp) - fstpt (%rsp) -..B2.53: - movl %edi, %eax - negl %eax - addl $16383, %eax - fxch %st(1) - fstpt 16(%rsp) - testl %esi, %esi - movw %ax, 24(%rsp) - je ..B2.55 -..B2.54: - fldt 16(%rsp) - lea 8+_two64(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) - fldt 16(%rsp) - jmp ..B2.56 -..B2.55: - fldt 16(%rsp) -..B2.56: - movzwl 8(%rsp), %eax - andl $32767, %eax - subl %esi, %eax - subl %edi, %eax - cmpl $-9, %eax - jl ..B2.59 -..B2.57: - testl %eax, %eax - jg ..B2.59 -..B2.58: - fldt 56(%rsp) - fmul %st(1), %st - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 56(%rsp) - jmp ..B2.60 -..B2.59: - fldt 56(%rsp) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 56(%rsp) -..B2.60: - fldt 56(%rsp) - lea _zeros(%rip), %rax - fldl (%rax) - fxch %st(1) - fucomip %st(1), %st - jp ..B2.113 - je ..B2.61 -..B2.113: - fstp %st(0) - fstp %st(0) - jmp ..B2.80 -..B2.61: - fldt 32(%rsp) - fdivrp %st, %st(2) - fmulp %st, %st(1) - fstpt 56(%rsp) - jmp ..B2.80 -..B2.62: - fstp %st(2) - testl %eax, %eax - je ..B2.64 -..B2.63: - fdivp %st, %st(1) - lea _TWO_32H(%rip), %rax - lea _C180byPi(%rip), %rcx - lea 8+_C180byPi(%rip), %rsi - lea 48+_P(%rip), %rdi - lea 16+_P(%rip), %r8 - lea 32+_P(%rip), %r9 - lea _P(%rip), %r10 - movq __libm_atandl_table_128@GOTPCREL(%rip), %r11 - fstpt 112(%rsp) - fldt 112(%rsp) - fldl (%rax) - fmul %st(1), %st - fld %st(0) - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fld %st(2) - fmul %st(3), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl (%rcx) - fmul %st, %st(4) - fmulp %st, %st(3) - fldl (%rsi) - fmul %st(5), %st - faddp %st, %st(3) - fldt (%rdi) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - fmulp %st, %st(3) - fldt (%r10) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fsubrl 8200(%r11) - faddl 8192(%r11) - fmulp %st, %st(1) - fstpt 56(%rsp) - jmp ..B2.80 -..B2.64: - fld %st(0) - lea 48+_P(%rip), %rax - lea 16+_P(%rip), %rsi - lea 32+_P(%rip), %rdi - lea _P(%rip), %r8 - lea _TWO_32H(%rip), %r9 - lea _C180byPi(%rip), %r10 - lea 8+_C180byPi(%rip), %r11 - fdiv %st(2), %st - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fxch %st(5) - fstpl 32(%rsp) - fldt (%rax) - fmul %st(5), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rdi) - fmulp %st, %st(6) - fldt (%r8) - faddp %st, %st(6) - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fmulp %st, %st(3) - fxch %st(2) - fstpt (%rsp) - fld %st(0) - fld %st(2) - fld %st(2) - fld %st(4) - fldl (%r9) - fmul %st, %st(4) - fxch %st(2) - fadd %st(4), %st - fsubp %st, %st(4) - fxch %st(3) - fsubr %st, %st(4) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(4) - fsub %st(3), %st - fld %st(2) - fxch %st(6) - fmull (%r11) - fldl (%r10) - fmul %st, %st(5) - fxch %st(5) - fmul %st, %st(7) - fxch %st(5) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(4) - fadd %st(2), %st - fld %st(4) - fadd %st(7), %st - fsubp %st, %st(7) - fxch %st(4) - fsub %st(6), %st - faddp %st, %st(1) - fxch %st(3) - fdivrl (%rcx) - fmul %st, %st(2) - lea 8+_ones(%rip), %rcx - fld %st(2) - fadd %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(3) - fld %st(2) - fsubr %st(1), %st - fld %st(2) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(2) - fxch %st(2) - fmul %st(3), %st - fldt (%rsp) - fxch %st(1) - faddl (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(4) - fsubrp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fxch %st(3) - fadd %st(5), %st - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmull 32(%rsp) - fstpt 56(%rsp) - jmp ..B2.80 -..B2.65: - fstp %st(2) - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %rsi - fmul %st(1), %st - lea _TWO_48H(%rip), %rdi - fdiv %st(2), %st - fld %st(1) - fxch %st(4) - fstpl 32(%rsp) - fld %st(2) - fldl (%rsi) - lea _C180byPi(%rip), %r8 - lea 8+_C180byPi(%rip), %r9 - lea 48+_P(%rip), %r10 - lea 16+_P(%rip), %r11 - fadd %st, %st(2) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(2) - fld %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(3) - fld %st(3) - fldl (%rdi) - lea _P(%rip), %rdi - fmul %st, %st(7) - movl 16(%rsp), %esi - fxch %st(1) - fadd %st(7), %st - addl %esi, %esi - fsubp %st, %st(7) - testl %eax, %eax - fxch %st(4) - fsub %st(6), %st - fld %st(0) - fmul %st(4), %st - fxch %st(3) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(5) - fxch %st(2) - fadd %st(5), %st - fld %st(6) - fmul %st(4), %st - fadd %st(3), %st - fxch %st(4) - fmul %st, %st(6) - fxch %st(6) - fsubrp %st, %st(2) - fld %st(3) - fadd %st(1), %st - fxch %st(3) - fmulp %st, %st(6) - fxch %st(5) - fsubrp %st, %st(6) - fld %st(2) - fxch %st(2) - fdivrl (%rcx) - fmul %st, %st(4) - lea 8+_ones(%rip), %rcx - fld %st(4) - fadd %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(5) - fld %st(4) - fsubr %st(1), %st - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(3) - fxch %st(3) - fmul %st(4), %st - faddl (%rcx) - lea 32+_P(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fxch %st(3) - fsubrp %st, %st(1) - fld %st(1) - fmul %st(3), %st - fxch %st(3) - fadd %st(4), %st - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fld %st(2) - fxch %st(4) - fmulp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fadd %st(2), %st - fmul %st, %st(4) - fld %st(3) - fmul %st(3), %st - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fxch %st(4) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl (%r8) - fmul %st, %st(3) - fmulp %st, %st(4) - fldl (%r9) - fmul %st(5), %st - faddp %st, %st(4) - fldt (%r10) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - fmulp %st, %st(3) - fldt (%rdi) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldl 32(%rsp) - je ..B2.67 -..B2.66: - negl %esi - fld %st(2) - movslq %esi, %rsi - movq __libm_atandl_table_128@GOTPCREL(%rip), %rax - fldl 8192(%rax,%rsi,8) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fldl 8200(%rax,%rsi,8) - fsubp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 56(%rsp) - jmp ..B2.68 -..B2.67: - movslq %esi, %rsi - fld %st(2) - movq __libm_atandl_table_128@GOTPCREL(%rip), %rax - fldl (%rax,%rsi,8) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(4) - fxch %st(2) - faddl 8(%rax,%rsi,8) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 56(%rsp) -..B2.68: - fldt 56(%rsp) - fmulp %st, %st(1) - fstpt 56(%rsp) - jmp ..B2.80 -..B2.69: - fstp %st(2) - lea 12(%rdi), %r8d - cmpl %r8d, %esi - jle ..B2.76 -..B2.70: - addl $75, %edi - cmpl %edi, %esi - jle ..B2.72 -..B2.71: - fstp %st(1) - fstp %st(0) - fstp %st(0) - movq %r9, %rcx - lea _small_value_80(%rip), %rax - shlq $4, %rcx - lea c90(%rip), %rsi - fldt (%rax,%rcx) - fsubrl (%rsi,%r9,8) - fstpt 56(%rsp) - jmp ..B2.80 -..B2.72: - fdivrp %st, %st(1) - lea _TWO_32H(%rip), %rcx - lea _C180byPi(%rip), %rsi - lea 8+_C180byPi(%rip), %rdi - lea 48+_P(%rip), %r8 - lea 16+_P(%rip), %r9 - lea 32+_P(%rip), %r10 - lea _P(%rip), %r11 - fstpt 112(%rsp) - fldt 112(%rsp) - testl %eax, %eax - fldl (%rcx) - fmul %st(1), %st - fld %st(0) - movq __libm_atandl_table_128@GOTPCREL(%rip), %rcx - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fld %st(2) - fmul %st(3), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl (%rsi) - fmul %st, %st(4) - fmulp %st, %st(3) - fldl (%rdi) - fmul %st(5), %st - faddp %st, %st(3) - fldt (%r8) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - fmulp %st, %st(3) - fldt (%r11) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldl 4096(%rcx) - fstpt 56(%rsp) - fldl 4104(%rcx) - je ..B2.74 -..B2.73: - fldt 56(%rsp) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 56(%rsp) - jmp ..B2.75 -..B2.74: - fldt 56(%rsp) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 56(%rsp) -..B2.75: - fldt 56(%rsp) - fmulp %st, %st(1) - fstpt 56(%rsp) - jmp ..B2.80 -..B2.76: - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %rsi - fmul %st(2), %st - lea _TWO_48H(%rip), %rdi - fdiv %st(1), %st - fld %st(2) - fxch %st(4) - fstpl 32(%rsp) - fld %st(1) - fldl (%rsi) - lea _C180byPi(%rip), %r8 - lea 8+_C180byPi(%rip), %r9 - lea 48+_P(%rip), %r10 - lea 16+_P(%rip), %r11 - fadd %st, %st(2) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(2) - fld %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(3) - fld %st(3) - fldl (%rdi) - lea _P(%rip), %rdi - fmul %st, %st(7) - movl 16(%rsp), %esi - fxch %st(2) - fadd %st(7), %st - addl %esi, %esi - fsubp %st, %st(7) - fld %st(6) - testl %eax, %eax - fmul %st(4), %st - fxch %st(6) - fsub %st(7), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(1) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fld %st(1) - fmul %st(4), %st - fadd %st(5), %st - fxch %st(4) - fmul %st, %st(5) - fxch %st(5) - fsubrp %st, %st(2) - fmul %st, %st(4) - fxch %st(4) - fsubrp %st, %st(6) - fxch %st(3) - faddp %st, %st(4) - fld %st(3) - fadd %st(2), %st - fld %st(4) - fxch %st(1) - fdivrl (%rcx) - lea 8+_ones(%rip), %rcx - fmul %st, %st(2) - fld %st(2) - fadd %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(3) - fld %st(2) - fsubr %st(1), %st - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddl (%rcx) - lea 32+_P(%rip), %rcx - faddp %st, %st(1) - fmulp %st, %st(2) - fsubp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fxch %st(2) - fadd %st(4), %st - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fld %st(1) - fxch %st(4) - fmulp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fadd %st(3), %st - fmul %st, %st(4) - fld %st(2) - fmul %st(4), %st - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fxch %st(4) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl (%r8) - fmul %st, %st(4) - fmulp %st, %st(3) - fldl (%r9) - fmul %st(5), %st - faddp %st, %st(3) - fldt (%r10) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - fmulp %st, %st(3) - fldt (%rdi) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fldl 32(%rsp) - je ..B2.78 -..B2.77: - movslq %esi, %rsi - fld %st(1) - movq __libm_atandl_table_128@GOTPCREL(%rip), %rax - fldl 4096(%rax,%rsi,8) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(3) - faddl 4104(%rax,%rsi,8) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 56(%rsp) - jmp ..B2.79 -..B2.78: - negl %esi - fld %st(1) - movslq %esi, %rsi - movq __libm_atandl_table_128@GOTPCREL(%rip), %rax - fldl 4096(%rax,%rsi,8) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(3) - fldl 4104(%rax,%rsi,8) - fsubp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 56(%rsp) -..B2.79: - fldt 56(%rsp) - fmulp %st, %st(1) - fstpt 56(%rsp) -..B2.80: - testb %dl, %dl - je ..B2.82 -..B2.81: - fldcw 74(%rsp) -..B2.82: - fldt 56(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.83: - testl %eax, %eax - je ..B2.85 -..B2.84: - lea c180(%rip), %rax - fldl (%rax,%r9,8) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.85: - lea _zeros(%rip), %rax - fldl (%rax,%r9,8) -..B2.86: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.87: - lea _two64(%rip), %rsi - fldl (%rsi) - movl $64, %esi - fmulp %st, %st(1) - fstpt 96(%rsp) - jmp ..B2.48 -..B2.88: - movq $0x8000000000000000, %rdx - cmpq 112(%rsp), %rdx - je ..B2.90 -..B2.89: - fldt 112(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.90: - testl %esi, %esi - jne ..B2.96 -..B2.91: - cmpl $0, 100(%rsp) - jne ..B2.93 -..B2.92: - cmpl $0, 96(%rsp) - je ..B2.97 -..B2.93: - lea _smallest_value_64(%rip), %rdx - movq (%rdx), %rcx - movq %rcx, 48(%rsp) -..B2.94: - cmpl $32767, %edi - je ..B2.96 -..B2.95: - lea c90(%rip), %rax - fldl (%rax,%r9,8) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.96: - cmpl $32767, %esi - je ..B2.101 -..B2.97: - testl %eax, %eax - je ..B2.99 -..B2.98: - lea c180(%rip), %rax - fldl (%rax,%r9,8) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.99: - lea _zeros(%rip), %rax - fldl (%rax,%r9,8) -..B2.100: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.101: - testl %eax, %eax - je ..B2.103 -..B2.102: - lea c135(%rip), %rax - fldl (%rax,%r9,8) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.103: - lea c45(%rip), %rax - fldl (%rax,%r9,8) -..B2.104: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.105: - movq $0x8000000000000000, %rdx - cmpq 96(%rsp), %rdx - jne ..B2.89 -..B2.106: - cmpl $32767, %edi - je ..B2.88 -..B2.107: - testl %edi, %edi - jne ..B2.94 -..B2.108: - cmpl $0, 116(%rsp) - jne ..B2.93 -..B2.109: - cmpl $0, 112(%rsp) - jne ..B2.93 - jmp ..B2.95 - .align 16,0x90 - .cfi_endproc - .type atan2dl,@function - .size atan2dl,.-atan2dl - .data -# -- End atan2dl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x80,0x13,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 16 -_TWO_8192: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .type _TWO_8192,@object - .size _TWO_8192,32 - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 16 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .space 8, 0x00 # pad - .align 16 -_C180byPi: - .long 442499072 - .long 1078765020 - .long 3272251219 - .long 1042157501 - .type _C180byPi,@object - .size _C180byPi,16 - .align 16 -_small: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 65 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32769 - .word 0 - .word 0 - .word 0 - .type _small,@object - .size _small,32 - .align 16 -_two64: - .long 0 - .long 1139802112 - .long 0 - .long 1005584384 - .type _two64,@object - .size _two64,16 - .align 16 -_P: - .word 54228 - .word 26975 - .word 60215 - .word 39113 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 30637 - .word 6142 - .word 46044 - .word 46936 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 47408 - .word 26349 - .word 14153 - .word 33526 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 53934 - .word 32714 - .word 35699 - .word 52145 - .word 16385 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,64 - .align 16 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .space 8, 0x00 # pad - .align 16 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 8 -c180: - .long 0x00000000,0x40668000 - .long 0x00000000,0xc0668000 - .type c180,@object - .size c180,16 - .align 8 -c90: - .long 0x00000000,0x40568000 - .long 0x00000000,0xc0568000 - .type c90,@object - .size c90,16 - .align 8 -exact: - .long 0x00000000,0x40468000 - .long 0x00000000,0xc0468000 - .long 0x00000000,0x4060e000 - .long 0x00000000,0xc060e000 - .type exact,@object - .size exact,32 - .align 8 -c135: - .long 0x00000000,0x4060e000 - .long 0x00000000,0xc060e000 - .type c135,@object - .size c135,16 - .align 8 -c45: - .long 0x00000000,0x40468000 - .long 0x00000000,0xc0468000 - .type c45,@object - .size c45,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2f_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2f_gen.S deleted file mode 100644 index 72d4155595..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2f_gen.S +++ /dev/null @@ -1,556 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan2f_gen.c" - .text -..TXTST0: -# -- Begin atan2f - .text - .align 16,0x90 - .globl atan2f -atan2f: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_atan2f.1: -..L2: - - movd %xmm0, %esi - movd %xmm1, %ecx - movss %xmm0, -16(%rsp) - movss %xmm1, -8(%rsp) - movl %esi, %edi - movl %esi, %eax - movl %ecx, %edx - movl %ecx, %r8d - andl $2147483647, %edi - andl $2147483647, %r8d - shrl $31, %eax - shrl $31, %edx - movl %ecx, -24(%rsp) - cmpl $2139095040, %edi - movl %esi, -24(%rsp) - jl ..B1.3 -..B1.2: - jg ..B1.16 -..B1.52: - cmpl $2139095040, %r8d - jg ..B1.16 - jmp ..B1.5 -..B1.3: - cmpl $2139095040, %r8d - jl ..B1.17 -..B1.4: - jg ..B1.16 -..B1.5: - jl ..B1.15 -..B1.6: - movl %eax, %eax - cmpl $2139095040, %edi - jge ..B1.11 -..B1.7: - testl %edx, %edx - je ..B1.9 -..B1.8: - lea pi(%rip), %rdx - lea _small_value_64(%rip), %rcx - movsd (%rdx,%rax,8), %xmm0 - addsd (%rcx,%rax,8), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.9: - lea _zeros(%rip), %rdx - movss (%rdx,%rax,4), %xmm0 -..B1.10: - ret -..B1.11: - lea _small_value_64(%rip), %rcx - testl %edx, %edx - movsd (%rcx,%rax,8), %xmm1 - je ..B1.13 -..B1.12: - lea pi34(%rip), %rdx - movsd (%rdx,%rax,8), %xmm0 - addsd %xmm1, %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.13: - lea pi4(%rip), %rdx - movsd (%rdx,%rax,8), %xmm0 - addsd %xmm1, %xmm0 - cvtsd2ss %xmm0, %xmm0 -..B1.14: - ret -..B1.15: - movl %eax, %eax - lea pi2(%rip), %rdx - lea _small_value_64(%rip), %rcx - movsd (%rdx,%rax,8), %xmm0 - addsd (%rcx,%rax,8), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.16: - movss -8(%rsp), %xmm0 - mulss -16(%rsp), %xmm0 - ret -..B1.17: - testl %r8d, %edi - jne ..B1.25 -..B1.18: - testl %edi, %edi - jne ..B1.24 -..B1.19: - movl %eax, %eax - testl %r8d, %r8d - je ..B1.45 -..B1.20: - testl %edx, %edx - je ..B1.22 -..B1.21: - lea pi(%rip), %rdx - lea _small_value_64(%rip), %rcx - movsd (%rdx,%rax,8), %xmm0 - addsd (%rcx,%rax,8), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.22: - lea _zeros(%rip), %rdx - movss (%rdx,%rax,4), %xmm0 -..B1.23: - ret -..B1.24: - testl %r8d, %r8d - je ..B1.49 -..B1.25: - pxor %xmm0, %xmm0 - pxor %xmm5, %xmm5 - cvtss2sd -16(%rsp), %xmm0 - cvtss2sd -8(%rsp), %xmm5 - movsd %xmm0, -40(%rsp) - movsd %xmm5, -32(%rsp) - movl -36(%rsp), %edi - movl -28(%rsp), %esi - andl $2147483647, %edi - andl $2147483647, %esi - cmpl %esi, %edi - jl ..B1.32 -..B1.26: - lea 1048576(%rsi), %ecx - cmpl %ecx, %edi - jle ..B1.31 -..B1.27: - movl %eax, %eax - lea pi2(%rip), %rdx - addl $33554432, %esi - cmpl %esi, %edi - movsd (%rdx,%rax,8), %xmm4 - jle ..B1.29 -..B1.28: - divsd %xmm0, %xmm5 - subsd %xmm5, %xmm4 - cvtsd2ss %xmm4, %xmm4 - jmp ..B1.30 -..B1.29: - divsd %xmm0, %xmm5 - movaps %xmm5, %xmm1 - subsd %xmm5, %xmm4 - mulsd %xmm5, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm3 - movsd .L_2il0floatpacket.10(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.7(%rip), %xmm3 - addsd .L_2il0floatpacket.11(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.8(%rip), %xmm3 - addsd .L_2il0floatpacket.12(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.9(%rip), %xmm3 - addsd .L_2il0floatpacket.13(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm3 - mulsd %xmm3, %xmm5 - subsd %xmm5, %xmm4 - cvtsd2ss %xmm4, %xmm4 -..B1.30: - movaps %xmm4, %xmm0 - ret -..B1.31: - movl %eax, %eax - lea _ones(%rip), %rcx - movl %edx, %edx - pxor %xmm1, %xmm1 - pxor %xmm2, %xmm2 - lea pi4n(%rip), %rsi - movsd .L_2il0floatpacket.3(%rip), %xmm4 - cmpl %eax, %edx - cvtss2sd (%rcx,%rax,4), %xmm1 - cvtss2sd (%rcx,%rdx,4), %xmm2 - mulsd %xmm1, %xmm0 - mulsd %xmm2, %xmm5 - movaps %xmm0, %xmm6 - addsd %xmm5, %xmm0 - subsd %xmm5, %xmm6 - divsd %xmm0, %xmm6 - movaps %xmm6, %xmm0 - mulsd %xmm6, %xmm0 - movaps %xmm0, %xmm3 - mulsd %xmm0, %xmm3 - movsd .L_2il0floatpacket.0(%rip), %xmm5 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm4 - addsd .L_2il0floatpacket.1(%rip), %xmm5 - addsd .L_2il0floatpacket.4(%rip), %xmm4 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm4 - addsd .L_2il0floatpacket.2(%rip), %xmm5 - addsd .L_2il0floatpacket.5(%rip), %xmm4 - mulsd %xmm0, %xmm5 - addsd %xmm4, %xmm5 - mulsd %xmm5, %xmm6 - addsd (%rsi,%rdx,8), %xmm6 - movaps %xmm6, %xmm0 - xorps .L_2il0floatpacket.15(%rip), %xmm0 - jne ..L3 - movaps %xmm6, %xmm0 -..L3: - cvtsd2ss %xmm0, %xmm0 - ret -..B1.32: - lea 1048576(%rdi), %ecx - cmpl %ecx, %esi - jle ..B1.44 -..B1.33: - addl $33554432, %edi - cmpl %edi, %esi - jle ..B1.40 -..B1.34: - testl %edx, %edx - jne ..B1.39 -..B1.35: - divsd %xmm5, %xmm0 - lea _minnormf(%rip), %rax - movaps %xmm0, %xmm2 - andps .L_2il0floatpacket.16(%rip), %xmm2 - movsd (%rax), %xmm1 - comisd %xmm2, %xmm1 - jbe ..B1.37 -..B1.36: - movss .L_2il0floatpacket.14(%rip), %xmm1 - mulss %xmm1, %xmm1 - movss %xmm1, -24(%rsp) - jmp ..B1.38 -..B1.37: - movl $1065353216, -24(%rsp) -..B1.38: - cvtsd2ss %xmm0, %xmm0 - ret -..B1.39: - divsd %xmm5, %xmm0 - movl %eax, %eax - lea pi(%rip), %rdx - addsd (%rdx,%rax,8), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.40: - divsd %xmm5, %xmm0 - movaps %xmm0, %xmm2 - testl %edx, %edx - mulsd %xmm0, %xmm2 - movaps %xmm2, %xmm1 - mulsd %xmm2, %xmm1 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - movsd .L_2il0floatpacket.10(%rip), %xmm3 - mulsd %xmm1, %xmm4 - mulsd %xmm1, %xmm3 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - addsd .L_2il0floatpacket.11(%rip), %xmm3 - mulsd %xmm1, %xmm4 - mulsd %xmm1, %xmm3 - addsd .L_2il0floatpacket.8(%rip), %xmm4 - addsd .L_2il0floatpacket.12(%rip), %xmm3 - mulsd %xmm1, %xmm4 - mulsd %xmm1, %xmm3 - addsd .L_2il0floatpacket.9(%rip), %xmm4 - addsd .L_2il0floatpacket.13(%rip), %xmm3 - mulsd %xmm1, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm3, %xmm4 - mulsd %xmm0, %xmm4 - addsd %xmm4, %xmm0 - je ..B1.42 -..B1.41: - movl %eax, %eax - lea pi(%rip), %rdx - movsd (%rdx,%rax,8), %xmm1 - addsd %xmm1, %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.42: - cvtsd2ss %xmm0, %xmm0 -..B1.43: - ret -..B1.44: - movl %eax, %eax - lea _ones(%rip), %rcx - pxor %xmm1, %xmm1 - pxor %xmm2, %xmm2 - lea pi4n(%rip), %rsi - movsd .L_2il0floatpacket.0(%rip), %xmm4 - cmpl %eax, %edx - cvtss2sd (%rcx,%rax,4), %xmm1 - cvtss2sd (%rcx,%rdx,4), %xmm2 - mulsd %xmm1, %xmm0 - mulsd %xmm2, %xmm5 - movaps %xmm0, %xmm6 - addsd %xmm5, %xmm0 - subsd %xmm5, %xmm6 - xorps .L_2il0floatpacket.15(%rip), %xmm6 - divsd %xmm0, %xmm6 - movaps %xmm6, %xmm0 - mulsd %xmm6, %xmm0 - movaps %xmm0, %xmm5 - mulsd %xmm0, %xmm5 - mulsd %xmm5, %xmm4 - movsd .L_2il0floatpacket.3(%rip), %xmm3 - mulsd %xmm5, %xmm3 - addsd .L_2il0floatpacket.1(%rip), %xmm4 - mulsd %xmm5, %xmm4 - addsd .L_2il0floatpacket.4(%rip), %xmm3 - mulsd %xmm5, %xmm3 - addsd .L_2il0floatpacket.2(%rip), %xmm4 - mulsd %xmm0, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm3 - movsd (%rsi,%rdx,8), %xmm7 - addsd %xmm3, %xmm4 - mulsd %xmm4, %xmm6 - subsd %xmm6, %xmm7 - movaps %xmm7, %xmm0 - xorps .L_2il0floatpacket.15(%rip), %xmm0 - jne ..L4 - movaps %xmm7, %xmm0 -..L4: - cvtsd2ss %xmm0, %xmm0 - ret -..B1.45: - testl %edx, %edx - je ..B1.47 -..B1.46: - lea pi(%rip), %rdx - lea _small_value_64(%rip), %rcx - movsd (%rdx,%rax,8), %xmm0 - addsd (%rcx,%rax,8), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.47: - lea _zeros(%rip), %rdx - movss (%rdx,%rax,4), %xmm0 -..B1.48: - ret -..B1.49: - lea pi2(%rip), %rdx - lea _small_value_64(%rip), %rcx - movsd (%rdx,%rax,8), %xmm0 - addsd (%rcx,%rax,8), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type atan2f,@function - .size atan2f,.-atan2f - .data -# -- End atan2f - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.15: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 16 -.L_2il0floatpacket.16: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,16 - .align 8 -.L_2il0floatpacket.0: - .long 0xd9d9aa33,0xbfb1c1c0 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x04ba093e,0xbfc24485 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x312dd43c,0xbfd55555 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x947e6edc,0x3fbbcbeb - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x700fa0b3,0x3fc9997b - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0xfff8f7db,0x3fefffff - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xa1fbc9d9,0x3f9a8eb6 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x713e98d0,0x3fb32474 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0xa367efd7,0x3fbc70d3 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x8eac5238,0x3fc99999 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x95b6793b,0xbfac6c73 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x306ebb4b,0xbfb73640 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0xe2eb2ece,0xbfc24920 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x5552abff,0xbfd55555 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -pi: - .long 0x54442d18,0x400921fb - .long 0x54442d18,0xc00921fb - .type pi,@object - .size pi,16 - .align 8 -pi34: - .long 0x7f3321d2,0x4002d97c - .long 0x7f3321d2,0xc002d97c - .type pi34,@object - .size pi34,16 - .align 8 -pi4: - .long 0x54442d18,0x3fe921fb - .long 0x54442d18,0xbfe921fb - .type pi4,@object - .size pi4,16 - .align 8 -pi2: - .long 0x54442d18,0x3ff921fb - .long 0x54442d18,0xbff921fb - .type pi2,@object - .size pi2,16 - .align 8 -pi4n: - .long 0x54442d18,0x3fe921fb - .long 0x7f3321d2,0xc002d97c - .type pi4n,@object - .size pi4n,16 - .align 4 -.L_2il0floatpacket.14: - .long 0x0d800000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,4 - .align 4 -.L_2il0floatpacket.17: - .long 0x3f800000 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,4 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 4 -_minnormf: - .long 0 - .long 940572672 - .type _minnormf,@object - .size _minnormf,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2l.S deleted file mode 100644 index f49cbdbfec..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan2l.S +++ /dev/null @@ -1,1202 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan2l.c" - .text -..TXTST0: -# -- Begin atan2l - .text - .align 16,0x90 - .globl atan2l -atan2l: -# parameter 1: 80 + %rsp -# parameter 2: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_atan2l.1: -..L2: - - subq $72, %rsp - .cfi_def_cfa_offset 80 - xorb %r8b, %r8b -..B1.2: - fnstcw 66(%rsp) -..B1.3: - movb 89(%rsp), %al - andb $-128, %al - shrb $7, %al - movb 105(%rsp), %dil - movzbl %al, %esi - andb $-128, %dil - movzwl 88(%rsp), %eax - andl $32767, %eax - movzwl 104(%rsp), %ecx - shrb $7, %dil - andl $32767, %ecx - cmpl $32767, %eax - je ..B1.80 -..B1.4: - cmpl $32767, %ecx - je ..B1.80 -..B1.5: - testl %eax, %eax - jne ..B1.7 -..B1.6: - cmpq $0, 80(%rsp) - je ..B1.9 -..B1.7: - testl %ecx, %ecx - jne ..B1.26 -..B1.8: - cmpq $0, 96(%rsp) - jne ..B1.26 -..B1.9: - movzwl 66(%rsp), %r9d - movl %r9d, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.13 -..B1.10: - orl $-64768, %r9d - movw %r9w, 64(%rsp) -..B1.11: - fldcw 64(%rsp) -..B1.12: - movb $1, %r8b -..B1.13: - testl %eax, %eax - jne ..B1.22 -..B1.14: - cmpq $0, 80(%rsp) - jne ..B1.21 -..B1.15: - testl %ecx, %ecx - jne ..B1.18 -..B1.16: - cmpq $0, 96(%rsp) - je ..B1.77 -..B1.17: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 56(%rsp) -..B1.18: - testb %dil, %dil - je ..B1.20 -..B1.19: - shlq $4, %rsi - lea _pi_00l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.23 -..B1.20: - lea _zeros(%rip), %rax - fldl (%rax,%rsi,8) - fstpt (%rsp) - jmp ..B1.23 -..B1.21: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 56(%rsp) -..B1.22: - shlq $4, %rsi - lea _pi_02l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) -..B1.23: - testb %r8b, %r8b - je ..B1.25 -..B1.24: - fldcw 66(%rsp) -..B1.25: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.26: - movzwl 66(%rsp), %r9d - movl %r9d, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.30 -..B1.27: - orl $-64768, %r9d - movw %r9w, 64(%rsp) -..B1.28: - fldcw 64(%rsp) -..B1.29: - movb $1, %r8b -..B1.30: - cmpl $8191, %ecx - jg ..B1.34 -..B1.31: - cmpl $8191, %eax - jg ..B1.33 -..B1.32: - fldt 96(%rsp) - lea _TWO_8192(%rip), %rax - fldt 80(%rsp) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - movzwl 104(%rsp), %ecx - movzwl 88(%rsp), %eax - andl $32767, %ecx - fstpt (%rsp) - andl $32767, %eax - jmp ..B1.35 -..B1.33: - fldt 96(%rsp) - fldt 80(%rsp) - fstpt (%rsp) - jmp ..B1.38 -..B1.34: - fldt 96(%rsp) - fldt 80(%rsp) - fstpt (%rsp) -..B1.35: - cmpl $24575, %ecx - jl ..B1.38 -..B1.36: - cmpl $24575, %eax - jl ..B1.38 -..B1.37: - fldt (%rsp) - lea 16+_TWO_8192(%rip), %rax - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - movzwl 104(%rsp), %ecx - movzwl 88(%rsp), %eax - andl $32767, %ecx - fstpt (%rsp) - andl $32767, %eax -..B1.38: - fldt (%rsp) - lea _ones(%rip), %rdx - movzbl %dil, %r9d - fldl (%rdx,%rsi,8) - fmul %st, %st(1) - fldl (%rdx,%r9,8) - fmul %st(3), %st - fcomi %st(2), %st - jbe ..B1.60 -..B1.39: - lea 12(%rax), %r9d - cmpl %r9d, %ecx - jle ..B1.54 -..B1.40: - addl $75, %eax - cmpl %eax, %ecx - jle ..B1.47 -..B1.41: - fstp %st(2) - fstp %st(1) - fstp %st(0) - testb %dil, %dil - je ..B1.43 -..B1.42: - fstp %st(0) - shlq $4, %rsi - lea _pi_00l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.44 -..B1.43: - fldt (%rsp) - fdivp %st, %st(1) - fstpt (%rsp) -..B1.44: - testb %r8b, %r8b - je ..B1.46 -..B1.45: - fldcw 66(%rsp) -..B1.46: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.47: - fstp %st(3) - testb %dil, %dil - je ..B1.51 -..B1.48: - fxch %st(2) - fdivrp %st, %st(1) - lea 48+_P(%rip), %rax - fld %st(0) - lea 32+_P(%rip), %rcx - fmul %st(1), %st - lea 16+_P(%rip), %rdx - fld %st(0) - lea _P(%rip), %rsi - fmul %st(1), %st - testb %r8b, %r8b - movq __libm_atanl_table_128@GOTPCREL(%rip), %rdi - fxch %st(2) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt (%rax) - fmul %st(3), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - fmulp %st, %st(4) - fldt (%rsi) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fmul %st, %st(1) - faddp %st, %st(1) - fsubrl 8200(%rdi) - faddl 8192(%rdi) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.50 -..B1.49: - fldcw 66(%rsp) -..B1.50: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.51: - fld %st(1) - lea 48+_P(%rip), %rax - fdiv %st(3), %st - lea 16+_P(%rip), %rcx - fld %st(0) - lea 32+_P(%rip), %rsi - fmul %st(1), %st - lea _P(%rip), %rdi - fxch %st(2) - fstpl 48(%rsp) - fld %st(1) - fmul %st(2), %st - lea _TWO_32H(%rip), %r9 - fldt (%rax) - testb %r8b, %r8b - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmulp %st, %st(2) - fld %st(4) - fldt (%rdi) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 32(%rsp) - fld %st(2) - fld %st(3) - fld %st(3) - fldl (%r9) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(5) - fld %st(5) - fadd %st(1), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(3) - fadd %st(4), %st - fsubp %st, %st(4) - fxch %st(3) - fsubr %st, %st(4) - fld %st(3) - fxch %st(2) - fdivrl (%rdx) - fmul %st, %st(3) - lea 8+_ones(%rip), %rdx - fld %st(3) - fadd %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(4) - fld %st(3) - fsubr %st(1), %st - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(7) - fxch %st(7) - faddp %st, %st(3) - fxch %st(3) - fmul %st, %st(4) - fld %st(5) - fmul %st(1), %st - fxch %st(2) - fadd %st, %st(6) - fmulp %st, %st(1) - fxch %st(4) - faddl (%rdx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(4) - fsubrp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 32(%rsp) - faddp %st, %st(2) - faddp %st, %st(1) - fmull 48(%rsp) - fstpt (%rsp) - je ..B1.53 -..B1.52: - fldt 16(%rsp) - fstpt 32(%rsp) -..B1.110: - fldcw 66(%rsp) -..B1.53: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.54: - fstp %st(3) - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %rax - fmul %st(2), %st - lea _TWO_48H(%rip), %rcx - fdiv %st(3), %st - fld %st(2) - fxch %st(2) - fstpl 48(%rsp) - fld %st(2) - fld %st(4) - fld %st(5) - fldl (%rax) - lea 48+_P(%rip), %rsi - lea 16+_P(%rip), %r9 - lea 32+_P(%rip), %r10 - lea _P(%rip), %r11 - fadd %st, %st(4) - fxch %st(4) - fstpt 32(%rsp) - fldt 32(%rsp) - fsubp %st, %st(4) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(4) - fldl (%rcx) - fmul %st, %st(3) - movslq 32(%rsp), %rax - fxch %st(3) - fadd %st, %st(5) - shlq $4, %rax - fsubrp %st, %st(5) - fld %st(4) - testb %dil, %dil - fmul %st(4), %st - fxch %st(5) - fsubr %st, %st(6) - fxch %st(2) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(6) - fld %st(5) - fmul %st(4), %st - fadd %st(7), %st - fxch %st(4) - fmul %st, %st(7) - fxch %st(7) - fsubrp %st, %st(6) - fmul %st, %st(6) - fxch %st(6) - fsubrp %st, %st(1) - fxch %st(5) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fdivrl (%rdx) - lea 8+_ones(%rip), %rdx - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt (%rsp) - fldt (%rsp) - fsubp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fld %st(4) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fxch %st(2) - fmul %st, %st(4) - fld %st(0) - fmul %st(6), %st - fxch %st(6) - fadd %st(7), %st - fxch %st(7) - fmulp %st, %st(1) - fxch %st(4) - faddl (%rdx) - faddp %st, %st(1) - fmulp %st, %st(2) - fsubp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 96(%rsp) - fldt 96(%rsp) - fld %st(1) - fmul %st(3), %st - fld %st(2) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(3) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt (%rsi) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - fmulp %st, %st(3) - fldt (%r11) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl 48(%rsp) - je ..B1.56 -..B1.55: - negq %rax - fld %st(2) - movq __libm_atanl_table_128@GOTPCREL(%rip), %rdx - fldl 8192(%rdx,%rax) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fldl 8200(%rdx,%rax) - fsubp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.57 -..B1.56: - movq __libm_atanl_table_128@GOTPCREL(%rip), %rdx - fld %st(2) - fldl (%rax,%rdx) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(4) - fxch %st(2) - faddl 8(%rax,%rdx) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%rsp) -..B1.57: - testb %r8b, %r8b - je ..B1.59 -..B1.58: - fldt (%rsp) - fstpt 32(%rsp) -..B1.111: - fldcw 66(%rsp) -..B1.59: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.60: - fstp %st(3) - lea 12(%rcx), %r9d - cmpl %r9d, %eax - jle ..B1.71 -..B1.61: - addl $75, %ecx - cmpl %ecx, %eax - jle ..B1.65 -..B1.62: - fstp %st(1) - fstp %st(1) - fstp %st(0) - shlq $4, %rsi - lea _pi_02l(%rip), %rax - lea _small_value_80(%rip), %rdx - testb %r8b, %r8b - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) - je ..B1.64 -..B1.63: - fldcw 66(%rsp) -..B1.64: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.65: - fxch %st(1) - fdivrp %st, %st(2) - lea 48+_P(%rip), %rax - fld %st(1) - lea 32+_P(%rip), %rcx - fmul %st(2), %st - lea 16+_P(%rip), %rdx - fld %st(0) - lea _P(%rip), %rsi - fmul %st(1), %st - testb %dil, %dil - movq __libm_atanl_table_128@GOTPCREL(%rip), %r9 - fxch %st(3) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt (%rax) - fmul %st(4), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rcx) - fmulp %st, %st(5) - fldt (%rsi) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fmul %st, %st(2) - faddp %st, %st(2) - fldl 4096(%r9) - fstpt (%rsp) - fldl 4104(%r9) - je ..B1.67 -..B1.66: - faddp %st, %st(2) - fldt (%rsp) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.68 -..B1.67: - fsubp %st, %st(2) - fldt (%rsp) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.68: - testb %r8b, %r8b - je ..B1.70 -..B1.69: - fldcw 66(%rsp) -..B1.70: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.71: - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %rax - fmul %st(3), %st - lea _TWO_48H(%rip), %rcx - fdiv %st(2), %st - fld %st(3) - fxch %st(2) - fstpl 48(%rsp) - fld %st(2) - fld %st(3) - lea 48+_P(%rip), %rsi - fldl (%rax) - lea 16+_P(%rip), %r9 - lea 32+_P(%rip), %r10 - lea _P(%rip), %r11 - fadd %st, %st(3) - fxch %st(3) - fstpt 32(%rsp) - fldt 32(%rsp) - fsubp %st, %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(3) - fld %st(5) - fldl (%rcx) - fmul %st, %st(5) - movslq 32(%rsp), %rax - fxch %st(1) - fadd %st(5), %st - shlq $4, %rax - fsubp %st, %st(5) - testb %dil, %dil - fxch %st(4) - fsubr %st, %st(6) - fld %st(6) - fmul %st(4), %st - fxch %st(3) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(5) - fxch %st(2) - fadd %st(5), %st - fld %st(1) - fmul %st(4), %st - fadd %st(3), %st - fxch %st(4) - fmul %st, %st(6) - fxch %st(6) - fsubrp %st, %st(7) - fxch %st(2) - fmulp %st, %st(5) - fsubp %st, %st(4) - fld %st(1) - fadd %st(1), %st - fdivrl (%rdx) - lea 8+_ones(%rip), %rdx - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fstpt (%rsp) - fldt (%rsp) - fsubp %st, %st(4) - fld %st(3) - fsubr %st(1), %st - fld %st(3) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - fmul %st(4), %st - fld %st(4) - fmul %st(7), %st - fxch %st(6) - fadd %st, %st(7) - fmulp %st, %st(5) - faddl (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 96(%rsp) - fldt 96(%rsp) - fld %st(1) - fmul %st(3), %st - fld %st(2) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(3) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt (%rsi) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - fmulp %st, %st(3) - fldt (%r11) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl 48(%rsp) - je ..B1.73 -..B1.72: - movq __libm_atanl_table_128@GOTPCREL(%rip), %rdx - fld %st(2) - fldl 4096(%rdx,%rax) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(4) - fxch %st(2) - faddl 4104(%rdx,%rax) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.74 -..B1.73: - negq %rax - fld %st(2) - movq __libm_atanl_table_128@GOTPCREL(%rip), %rdx - fldl 4096(%rdx,%rax) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fldl 4104(%rdx,%rax) - fsubp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - fstpt 16(%rsp) -..B1.74: - testb %r8b, %r8b - je ..B1.76 -..B1.75: - fldt (%rsp) - fstpt 32(%rsp) -..B1.112: - fldcw 66(%rsp) -..B1.76: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.77: - testb %dil, %dil - je ..B1.79 -..B1.78: - shlq $4, %rsi - lea _pi_00l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.23 -..B1.79: - lea _zeros(%rip), %rax - fldl (%rax,%rsi,8) - fstpt (%rsp) - jmp ..B1.23 -..B1.80: - movzwl 66(%rsp), %r9d - movl %r9d, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.84 -..B1.81: - orl $-64768, %r9d - movw %r9w, 64(%rsp) -..B1.82: - fldcw 64(%rsp) -..B1.83: - movb $1, %r8b -..B1.84: - cmpl $32767, %eax - je ..B1.107 -..B1.85: - cmpl $32767, %ecx - je ..B1.105 -..B1.86: - testl %eax, %eax - jne ..B1.89 -..B1.87: - cmpl $0, 84(%rsp) - jne ..B1.92 -..B1.88: - cmpl $0, 80(%rsp) - jne ..B1.92 -..B1.89: - testl %ecx, %ecx - jne ..B1.93 -..B1.90: - cmpl $0, 100(%rsp) - jne ..B1.92 -..B1.91: - cmpl $0, 96(%rsp) - je ..B1.94 -..B1.92: - lea _smallest_value_64(%rip), %rdx - movq (%rdx), %r9 - movq %r9, 56(%rsp) -..B1.93: - cmpl $32767, %ecx - je ..B1.98 -..B1.94: - shlq $4, %rsi - lea _pi_02l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) -..B1.95: - testb %r8b, %r8b - je ..B1.97 -..B1.96: - fldcw 66(%rsp) -..B1.97: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.98: - cmpl $32767, %eax - je ..B1.102 -..B1.99: - testb %dil, %dil - je ..B1.101 -..B1.100: - shlq $4, %rsi - lea _pi_00l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.95 -..B1.101: - lea _zeros(%rip), %rax - fldl (%rax,%rsi,8) - fstpt (%rsp) - jmp ..B1.95 -..B1.102: - shlq $4, %rsi - testb %dil, %dil - je ..B1.104 -..B1.103: - lea _pi_34l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.95 -..B1.104: - lea _pi_04l(%rip), %rax - lea _small_value_80(%rip), %rdx - fldt (%rsi,%rax) - fldt (%rsi,%rdx) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.95 -..B1.105: - movq $0x8000000000000000, %rdx - cmpq 96(%rsp), %rdx - je ..B1.86 -..B1.106: - fldt 96(%rsp) - fldt 80(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.95 -..B1.107: - movq $0x8000000000000000, %rdx - cmpq 80(%rsp), %rdx - jne ..B1.106 - jmp ..B1.85 - .align 16,0x90 - .cfi_endproc - .type atan2l,@function - .size atan2l,.-atan2l - .data -# -- End atan2l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 2 -_pi_00l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49152 - .word 0 - .word 0 - .word 0 - .type _pi_00l,@object - .size _pi_00l,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_pi_02l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49151 - .word 0 - .word 0 - .word 0 - .type _pi_02l,@object - .size _pi_02l,32 - .align 2 -_TWO_8192: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .type _TWO_8192,@object - .size _TWO_8192,32 - .align 2 -_P: - .word 43664 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 43235 - .word 52379 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59507 - .word 38278 - .word 9340 - .word 37449 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 9132 - .word 55602 - .word 8665 - .word 58245 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,64 - .align 2 -_pi_34l: - .word 37288 - .word 39182 - .word 58361 - .word 38603 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 37288 - .word 39182 - .word 58361 - .word 38603 - .word 49152 - .word 0 - .word 0 - .word 0 - .type _pi_34l,@object - .size _pi_34l,32 - .align 2 -_pi_04l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49150 - .word 0 - .word 0 - .word 0 - .type _pi_04l,@object - .size _pi_04l,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan_gen.S deleted file mode 100644 index 9e80c811c4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atan_gen.S +++ /dev/null @@ -1,887 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atan_gen.c" - .text -..TXTST0: -# -- Begin atan - .text - .align 16,0x90 - .globl atan -atan: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_atan.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - movsd %xmm0, (%rsp) -..B1.2: - movlpd BMASK1(%rip), %xmm3 - xorpd %xmm2, %xmm2 - movlpd BMASK2(%rip), %xmm6 - movlpd SGNMASK(%rip), %xmm7 - pextrw $3, %xmm0, %edx - movl %edx, %eax - andl $32767, %edx - movl $16448, %ecx - pinsrw $3, %ecx, %xmm2 - andpd %xmm7, %xmm0 - xorpd %xmm7, %xmm7 - movq %xmm0, %xmm1 - andpd %xmm0, %xmm3 - pinsrw $3, %ecx, %xmm7 - orpd %xmm6, %xmm3 - movlpd ONEMASK(%rip), %xmm5 - subl $16288, %edx - cmpl $1119, %edx - ja .L_2TAG_PACKET_0.0.1 - cmpsd $6, %xmm0, %xmm2 - minsd %xmm7, %xmm3 - andpd %xmm2, %xmm5 - andpd %xmm2, %xmm0 - mulsd %xmm3, %xmm1 - subsd %xmm3, %xmm0 - addsd %xmm5, %xmm1 - divsd %xmm1, %xmm0 - pextrw $3, %xmm3, %edx - subl $16287, %edx - movlpd a2(%rip), %xmm2 - movlpd b2(%rip), %xmm4 - andl $32768, %eax - pinsrw $3, %eax, %xmm7 - addl %edx, %edx - lea atan_tbl(%rip), %r8 - movlpd (%r8,%rdx,8), %xmm6 - addl $1, %edx - movlpd (%r8,%rdx,8), %xmm5 - xorpd %xmm7, %xmm5 - xorpd %xmm7, %xmm6 - movq %xmm0, %xmm1 - xorpd %xmm7, %xmm1 - movq %xmm1, %xmm3 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm2 - addsd %xmm0, %xmm4 - addsd %xmm6, %xmm1 - subsd %xmm1, %xmm6 - addsd %xmm3, %xmm6 - addsd 8+a2(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm3, %xmm0 - addsd %xmm5, %xmm6 - mulsd %xmm2, %xmm0 - addsd 8+b2(%rip), %xmm4 - mulsd %xmm4, %xmm0 - addsd %xmm6, %xmm0 - addsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_0.0.1: - addl $944, %edx - cmpl $2063, %edx - ja .L_2TAG_PACKET_2.0.1 - movlpd a2(%rip), %xmm4 - movlpd b2(%rip), %xmm7 - movlpd (%rsp), %xmm0 - mulsd %xmm1, %xmm1 - movlpd 8+a2(%rip), %xmm2 - movlpd 8+b2(%rip), %xmm5 - mulsd %xmm1, %xmm4 - addsd %xmm1, %xmm7 - movq %xmm1, %xmm6 - mulsd %xmm0, %xmm1 - addsd %xmm4, %xmm2 - mulsd %xmm6, %xmm7 - mulsd %xmm1, %xmm2 - addsd %xmm5, %xmm7 - mulsd %xmm7, %xmm2 - addsd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_2.0.1: - addl $15344, %edx - cmpl $17392, %edx - jae .L_2TAG_PACKET_3.0.1 - movlpd (%rsp), %xmm0 - movlpd (%rsp), %xmm1 - cmpl $16, %edx - jae .L_2TAG_PACKET_1.0.1 - mulsd %xmm0, %xmm1 - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_3.0.1: - movlpd (%rsp), %xmm4 - movlpd SGNMASK(%rip), %xmm0 - movlpd pi_table(%rip), %xmm2 - movlpd 8+pi_table(%rip), %xmm3 - movd %xmm1, %eax - psrlq $32, %xmm1 - movd %xmm1, %edx - cmpl $2146435072, %edx - jae .L_2TAG_PACKET_4.0.1 -.L_2TAG_PACKET_5.0.1: - andnpd %xmm4, %xmm0 - orpd %xmm0, %xmm2 - orpd %xmm3, %xmm0 - addsd %xmm2, %xmm0 - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_4.0.1: - subl $2146435072, %edx - orl %edx, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_5.0.1 - movq %xmm4, %xmm0 - addsd %xmm0, %xmm0 -.L_2TAG_PACKET_1.0.1: -..B1.3: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type atan,@function - .size atan,.-atan - .data -# -- End atan - .section .rodata, "a" - .align 4 - .align 4 -BMASK1: - .long 0 - .long 4294901760 - .type BMASK1,@object - .size BMASK1,8 - .align 4 -BMASK2: - .long 0 - .long 32768 - .type BMASK2,@object - .size BMASK2,8 - .align 4 -SGNMASK: - .long 4294967295 - .long 2147483647 - .type SGNMASK,@object - .size SGNMASK,8 - .align 4 -ONEMASK: - .long 0 - .long 1072693248 - .type ONEMASK,@object - .size ONEMASK,8 - .align 4 -a2: - .long 2006262985 - .long 1069310863 - .long 2358449471 - .long 3217342131 - .type a2,@object - .size a2,16 - .align 4 -b2: - .long 3845454352 - .long 1069952297 - .long 2829679149 - .long 1073771565 - .type b2,@object - .size b2,16 - .align 4 -atan_tbl: - .long 0 - .long 0 - .long 0 - .long 0 - .long 3819695742 - .long 1067482761 - .long 2398680355 - .long 3155462074 - .long 2998791009 - .long 1067548225 - .long 3868465248 - .long 3157182472 - .long 3339424991 - .long 1067613680 - .long 3296670360 - .long 1010752543 - .long 2710002256 - .long 1067679126 - .long 3403896007 - .long 1010910768 - .long 3275701428 - .long 1067744562 - .long 119959933 - .long 1011482843 - .long 2908636881 - .long 1067809988 - .long 2464489612 - .long 1011545526 - .long 3777889398 - .long 1067875403 - .long 3262682165 - .long 1009703919 - .long 3759667419 - .long 1067940807 - .long 1838130851 - .long 3157373556 - .long 732369940 - .long 1068006200 - .long 1203428313 - .long 1010055371 - .long 1166616461 - .long 1068071580 - .long 2901274051 - .long 3158549977 - .long 2945472892 - .long 1068136947 - .long 3726120658 - .long 1009762715 - .long 3954480976 - .long 1068202301 - .long 1289173457 - .long 1009429861 - .long 2081752829 - .long 1068267642 - .long 1836909874 - .long 1006212095 - .long 3807999788 - .long 1068332968 - .long 2172459940 - .long 3156162078 - .long 2731789884 - .long 1068398280 - .long 3450718392 - .long 3159216547 - .long 1044477961 - .long 1068463577 - .long 2230553229 - .long 1011424339 - .long 1486930287 - .long 1068530218 - .long 2861547474 - .long 1012041376 - .long 2293016881 - .long 1068595466 - .long 136843272 - .long 1012684797 - .long 201518157 - .long 1068660680 - .long 63231984 - .long 1012427198 - .long 4054234584 - .long 1068725856 - .long 3927006960 - .long 1011878955 - .long 1246477213 - .long 1068790995 - .long 1494265652 - .long 3155219350 - .long 678186699 - .long 1068856093 - .long 1264361424 - .long 3159256693 - .long 2690594995 - .long 1068921148 - .long 3906996379 - .long 1009288267 - .long 3362611517 - .long 1068986159 - .long 1650970041 - .long 3158331771 - .long 3102162111 - .long 1069051124 - .long 365917035 - .long 3160264153 - .long 2352611067 - .long 1069116041 - .long 4008970190 - .long 3159478182 - .long 1594134794 - .long 1069180908 - .long 466690178 - .long 1012526501 - .long 1345079306 - .long 1069245723 - .long 2268273568 - .long 3160164092 - .long 2163300970 - .long 1069310484 - .long 2750834800 - .long 3158113482 - .long 352522716 - .long 1069375190 - .long 1750411372 - .long 1011790845 - .long 848541647 - .long 1069439838 - .long 2164207573 - .long 1011698350 - .long 40647312 - .long 1069504427 - .long 2949165434 - .long 3159107267 - .long 2216766270 - .long 1069574357 - .long 2197920765 - .long 3161055954 - .long 1090914384 - .long 1069638757 - .long 2330454674 - .long 1013365998 - .long 387601244 - .long 1069703022 - .long 3185681168 - .long 1013434071 - .long 3991640484 - .long 1069767144 - .long 1313211590 - .long 3161087959 - .long 3322489502 - .long 1069831118 - .long 3013977995 - .long 1013053011 - .long 3121698570 - .long 1069894936 - .long 4069015667 - .long 1013023362 - .long 4289964660 - .long 1069958591 - .long 1736191156 - .long 3158266731 - .long 3903312386 - .long 1070022077 - .long 1833592413 - .long 3159731471 - .long 3818449864 - .long 1070085387 - .long 851036429 - .long 3159730451 - .long 2097480306 - .long 1070148515 - .long 3506390884 - .long 3160462302 - .long 1611694502 - .long 1070211454 - .long 2785735540 - .long 3160465144 - .long 1464694796 - .long 1070274198 - .long 4229277299 - .long 3159907000 - .long 1299612775 - .long 1070336741 - .long 4116653788 - .long 3160427739 - .long 1310544789 - .long 1070399077 - .long 1064430331 - .long 1013218202 - .long 2253168030 - .long 1070461200 - .long 1405044609 - .long 3157623179 - .long 1159567373 - .long 1070523105 - .long 2353445521 - .long 3159992176 - .long 1359373750 - .long 1070605818 - .long 1748171336 - .long 3161879263 - .long 908341706 - .long 1070667034 - .long 3372710815 - .long 3161775245 - .long 1743027350 - .long 1070727765 - .long 687089934 - .long 3160507171 - .long 2055355646 - .long 1070787992 - .long 2392855242 - .long 1013682469 - .long 690426164 - .long 1070847697 - .long 1103926666 - .long 1014052810 - .long 1483247847 - .long 1070906862 - .long 2082645847 - .long 3161345479 - .long 392040270 - .long 1070965472 - .long 2407720023 - .long 1014053754 - .long 2673846014 - .long 1071023511 - .long 1293605532 - .long 3158464385 - .long 1384215810 - .long 1071080967 - .long 2446095872 - .long 3159216407 - .long 3101660631 - .long 1071137826 - .long 698040758 - .long 1014855328 - .long 2094057058 - .long 1071194078 - .long 2282048339 - .long 1014040385 - .long 1712750594 - .long 1071249712 - .long 1204372378 - .long 3162276464 - .long 1411515787 - .long 1071304719 - .long 949080808 - .long 1015006403 - .long 931538085 - .long 1071359091 - .long 3027127039 - .long 1014307233 - .long 179139065 - .long 1071412821 - .long 4285547492 - .long 3161934731 - .long 3387721259 - .long 1071465902 - .long 373225773 - .long 1013486625 - .long 2132236852 - .long 1071544299 - .long 3250533429 - .long 1014031677 - .long 1942070284 - .long 1071645596 - .long 1237964179 - .long 3163239113 - .long 1532707802 - .long 1071695380 - .long 330645583 - .long 1012495610 - .long 2294184979 - .long 1071743834 - .long 3959472897 - .long 1015833116 - .long 3805060714 - .long 1071790961 - .long 2671256142 - .long 1013727772 - .long 2215037898 - .long 1071836770 - .long 2683359117 - .long 1015831902 - .long 483661594 - .long 1071881273 - .long 836288326 - .long 3162648643 - .long 1534679894 - .long 1071924486 - .long 373258696 - .long 3162470096 - .long 1538714628 - .long 1071966430 - .long 3199433068 - .long 1015325501 - .long 527642555 - .long 1072007128 - .long 3636832592 - .long 3161843145 - .long 291339150 - .long 1072046605 - .long 890169537 - .long 3160586117 - .long 2450210201 - .long 1072084888 - .long 1636353294 - .long 3163193400 - .long 2411367951 - .long 1072122007 - .long 374899873 - .long 1011331750 - .long 681549971 - .long 1072157992 - .long 506411689 - .long 1015373954 - .long 1466745541 - .long 1072192873 - .long 2143860931 - .long 1013364334 - .long 2845622366 - .long 1072226682 - .long 2869178209 - .long 3162423682 - .long 2838871438 - .long 1072275456 - .long 3742223599 - .long 1014338577 - .long 4200275274 - .long 1072337034 - .long 1566539915 - .long 3161839550 - .long 3034733530 - .long 1072394897 - .long 652621408 - .long 3162261964 - .long 3207412993 - .long 1072449290 - .long 3206124665 - .long 1014408733 - .long 624461478 - .long 1072500450 - .long 932437485 - .long 1015204343 - .long 767665908 - .long 1072548600 - .long 1037911952 - .long 3163527627 - .long 1110773639 - .long 1072593952 - .long 2371517912 - .long 3160465741 - .long 1940828530 - .long 1072636704 - .long 2731408428 - .long 3162895795 - .long 1911329388 - .long 1072677041 - .long 1773089615 - .long 3159569267 - .long 1764715788 - .long 1072704191 - .long 691346949 - .long 3164069946 - .long 3332979233 - .long 1072722195 - .long 3550733983 - .long 1014770628 - .long 1321870254 - .long 1072739231 - .long 1415315820 - .long 1016224052 - .long 3657429030 - .long 1072755365 - .long 3910539033 - .long 1015966402 - .long 4197624557 - .long 1072770661 - .long 2333399254 - .long 3164546480 - .long 1512059493 - .long 1072785177 - .long 2701510318 - .long 1016178092 - .long 453379037 - .long 1072798965 - .long 4046344253 - .long 3162814364 - .long 1942345162 - .long 1072818388 - .long 621134147 - .long 1016335195 - .long 4210176273 - .long 1072842164 - .long 2701013387 - .long 3164326619 - .long 4185644010 - .long 1072863795 - .long 4163699341 - .long 1016203112 - .long 679688788 - .long 1072883543 - .long 4147276762 - .long 1014066750 - .long 29432865 - .long 1072901630 - .long 970415797 - .long 1016902063 - .long 4070721092 - .long 1072918247 - .long 2539004411 - .long 3163736096 - .long 2252468843 - .long 1072933561 - .long 3424082887 - .long 3163407177 - .long 2929724825 - .long 1072947712 - .long 3661482235 - .long 3163846989 - .long 1377513368 - .long 1072960824 - .long 3987926680 - .long 1013647908 - .long 1031632908 - .long 1072973003 - .long 3672217151 - .long 1016614619 - .long 2516508130 - .long 1072984342 - .long 545855020 - .long 3162728930 - .long 3792452178 - .long 1072994923 - .long 3420119467 - .long 1016471430 - .long 3147791459 - .long 1073004818 - .long 1342204979 - .long 1013937254 - .long 999189752 - .long 1073014090 - .long 1006335472 - .long 3162850919 - .long 711011011 - .long 1073022794 - .long 4633488 - .long 3162966895 - .long 15640363 - .long 1073030980 - .long 1686389560 - .long 3164376226 - .long 1218463589 - .long 1073042382 - .long 1526837110 - .long 3163533985 - .long 2538470555 - .long 1073056144 - .long 2273304406 - .long 3163784996 - .long 1229720947 - .long 1073068489 - .long 2971628206 - .long 3162356540 - .long 3115427016 - .long 1073079621 - .long 4215132957 - .long 3164282762 - .long 4030612557 - .long 1073089709 - .long 1913251691 - .long 3163671292 - .long 2728521257 - .long 1073098892 - .long 2861089500 - .long 1015454459 - .long 1118696283 - .long 1073107285 - .long 1628948053 - .long 1016179658 - .long 2682711255 - .long 1073114984 - .long 2906306266 - .long 1014142643 - .long 2073898081 - .long 1073122072 - .long 1322740454 - .long 3164497217 - .long 1403700297 - .long 1073128618 - .long 416137895 - .long 3162781466 - .long 2502685617 - .long 1073134681 - .long 3242008732 - .long 1014593495 - .long 1531926851 - .long 1073140313 - .long 1362708094 - .long 1016517604 - .long 3572814411 - .long 1073145557 - .long 3709790527 - .long 1012646874 - .long 1695536111 - .long 1073150453 - .long 3980346340 - .long 1016705136 - .long 2363057203 - .long 1073155033 - .long 2551194792 - .long 1012569695 - .long 2873365682 - .long 1073159327 - .long 3181154748 - .long 1017041450 - .long 1053384691 - .long 1073165288 - .long 3074536879 - .long 1016965660 - .long 3270542712 - .long 1073172451 - .long 2535319415 - .long 3163051778 - .long 1353631484 - .long 1073178850 - .long 1173833755 - .long 1015534537 - .long 3511218460 - .long 1073184599 - .long 1243608109 - .long 3161592122 - .long 4121259284 - .long 1073189793 - .long 398584912 - .long 3163829923 - .long 1193862106 - .long 1073194509 - .long 1873745539 - .long 3163802819 - .long 3861949790 - .long 1073198808 - .long 3841261147 - .long 1015587248 - .long 1486904578 - .long 1073202745 - .long 1634726776 - .long 3163847886 - .long 2879153715 - .long 1073206362 - .long 200456242 - .long 3164138657 - .long 385353253 - .long 1073209698 - .long 1186355517 - .long 1014887155 - .long 1125865839 - .long 1073212783 - .long 203561262 - .long 3161244927 - .long 1221361475 - .long 1073215645 - .long 3382476563 - .long 1014936138 - .long 2077323573 - .long 1073218307 - .long 1005121005 - .long 3164430752 - .long 215611373 - .long 1073220790 - .long 353198764 - .long 3164485137 - .long 2347419265 - .long 1073223110 - .long 1103143360 - .long 1016542137 - .long 1379112765 - .long 1073225284 - .long 381583533 - .long 3162870833 - .long 3891198463 - .long 1073228298 - .long 1771275754 - .long 1014654681 - .long 3395914051 - .long 1073231917 - .long 2350900914 - .long 3164013978 - .long 2799919478 - .long 1073235146 - .long 2893950164 - .long 3163260901 - .long 1138673476 - .long 1073238045 - .long 2622204785 - .long 3164174388 - .long 3408855940 - .long 1073240661 - .long 2800881650 - .long 1016008624 - .long 2044858738 - .long 1073243035 - .long 604544785 - .long 1017022901 - .long 2578795176 - .long 1073245198 - .long 2557332925 - .long 1016135165 - .long 4196285314 - .long 1073247177 - .long 2032365307 - .long 1016194735 - .long 224877747 - .long 1073248996 - .long 497926916 - .long 1016947111 - .long 3271386490 - .long 1073250671 - .long 2689994846 - .long 1016631513 - .long 813635989 - .long 1073252221 - .long 747035277 - .long 3164530136 - .long 369829519 - .long 1073253658 - .long 2182033858 - .long 3163190340 - .long 1187679052 - .long 1073254994 - .long 673954443 - .long 1016149821 - .long 4232586098 - .long 1073256239 - .long 497775200 - .long 3162179015 - .long 426690558 - .long 1073257404 - .long 3063343247 - .long 1016865578 - .long 1624065902 - .long 1073258494 - .long 1354224996 - .long 3163503778 - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .type atan_tbl,@object - .size atan_tbl,2592 - .align 4 -pi_table: - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .type pi_table,@object - .size pi_table,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atandl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atandl_table.S deleted file mode 100644 index 534f96c90f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atandl_table.S +++ /dev/null @@ -1,2099 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atandl_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .globl __libm_atandl_table_128 -__libm_atandl_table_128: - .long 0 - .long 0 - .long 0 - .long 0 - .long 3896508416 - .long 1071424949 - .long 2497855885 - .long 1035107781 - .long 1447034880 - .long 1072473411 - .long 1733066939 - .long 3185173141 - .long 1421869056 - .long 1073052515 - .long 1368774744 - .long 1038726731 - .long 1314914304 - .long 1073521529 - .long 3636885973 - .long 3186244272 - .long 1199570944 - .long 1073866069 - .long 2275810035 - .long 3185989885 - .long 476053504 - .long 1074100319 - .long 3721769433 - .long 3184582046 - .long 3514826752 - .long 1074334397 - .long 1919096566 - .long 3184722268 - .long 845152256 - .long 1074568277 - .long 2005889037 - .long 1036405998 - .long 2545942528 - .long 1074796164 - .long 4215566178 - .long 1040782263 - .long 4057989120 - .long 1074912862 - .long 2215314489 - .long 1040552811 - .long 3430940672 - .long 1075029419 - .long 314220031 - .long 3187779646 - .long 1717567488 - .long 1075145821 - .long 2152308088 - .long 1040271717 - .long 455081984 - .long 1075262054 - .long 1186928436 - .long 1040902706 - .long 1694498816 - .long 1075378104 - .long 4227739998 - .long 1040491905 - .long 3747610624 - .long 1075493958 - .long 535382953 - .long 1040666985 - .long 1226833920 - .long 1075609604 - .long 1790336138 - .long 1040185867 - .long 2260729856 - .long 1075725027 - .long 3899937368 - .long 3188375434 - .long 3525312512 - .long 1075839595 - .long 4053544535 - .long 3185741100 - .long 3957325824 - .long 1075897065 - .long 4030890856 - .long 1040553080 - .long 3248488448 - .long 1075954405 - .long 1333464106 - .long 3189137055 - .long 452984832 - .long 1076011609 - .long 3448918206 - .long 3189528508 - .long 3615490048 - .long 1076068669 - .long 608092114 - .long 1041523725 - .long 4020240384 - .long 1076125581 - .long 1336102440 - .long 3188870826 - .long 1960837120 - .long 1076182339 - .long 2391933274 - .long 3189275321 - .long 2470445056 - .long 1076238936 - .long 4283795024 - .long 1041937846 - .long 2451570688 - .long 1076295367 - .long 4217000778 - .long 1039765656 - .long 3560964096 - .long 1076351626 - .long 3936906987 - .long 3182578922 - .long 3640655872 - .long 1076407708 - .long 1439536878 - .long 1040659594 - .long 1023410176 - .long 1076463608 - .long 2552585681 - .long 3189615238 - .long 3122659328 - .long 1076519319 - .long 31715936 - .long 1042073699 - .long 689963008 - .long 1076574838 - .long 3139108801 - .long 1040611849 - .long 2164260864 - .long 1076630158 - .long 1139819401 - .long 3187965768 - .long 3623878656 - .long 1076685275 - .long 3513262155 - .long 1039670426 - .long 1679818752 - .long 1076740185 - .long 728891110 - .long 1041952788 - .long 2069889024 - .long 1076794882 - .long 3614319306 - .long 1039599785 - .long 2480930816 - .long 1076849362 - .long 1879438446 - .long 3188546042 - .long 2720006144 - .long 1076895586 - .long 4246516390 - .long 1042916956 - .long 574619648 - .long 1076922603 - .long 3568262924 - .long 1040145602 - .long 3061841920 - .long 1076949504 - .long 290418758 - .long 3187677511 - .long 1539309568 - .long 1076976289 - .long 635731916 - .long 1042641148 - .long 532676608 - .long 1077002955 - .long 4225033962 - .long 3189573420 - .long 545259520 - .long 1077029500 - .long 2007583995 - .long 1042491810 - .long 2369781760 - .long 1077055922 - .long 2061076001 - .long 3190167169 - .long 2774532096 - .long 1077082220 - .long 2608380742 - .long 1042446121 - .long 3112173568 - .long 1077108392 - .long 2901961231 - .long 1042075808 - .long 715128832 - .long 1077134437 - .long 3828632392 - .long 3189418038 - .long 1782579200 - .long 1077160352 - .long 519110621 - .long 1041924126 - .long 4206886912 - .long 1077186136 - .long 2078221814 - .long 1039357043 - .long 1858076672 - .long 1077211789 - .long 2404314454 - .long 3190701797 - .long 1763704832 - .long 1077237308 - .long 1129624783 - .long 3189333294 - .long 2638217216 - .long 1077262692 - .long 1872508293 - .long 3187027668 - .long 3464495104 - .long 1077287940 - .long 2518581518 - .long 1039154339 - .long 3493855232 - .long 1077313051 - .long 2874645533 - .long 3188678970 - .long 2241855488 - .long 1077338024 - .long 182480744 - .long 3187988055 - .long 3783262208 - .long 1077362857 - .long 41710967 - .long 3189176765 - .long 3860856832 - .long 1077387550 - .long 3921914980 - .long 1040188295 - .long 2770337792 - .long 1077412102 - .long 2195237132 - .long 1043018421 - .long 1061158912 - .long 1077436512 - .long 1866130671 - .long 1042885968 - .long 3825205248 - .long 1077460778 - .long 2099274145 - .long 1043277518 - .long 3519021056 - .long 1077484901 - .long 2434136291 - .long 3190760305 - .long 1423966208 - .long 1077508880 - .long 786043090 - .long 3189674834 - .long 3361734656 - .long 1077532713 - .long 1735814367 - .long 1041228653 - .long 2501902336 - .long 1077556401 - .long 2532076405 - .long 1041674477 - .long 832569344 - .long 1077579943 - .long 1067893357 - .long 1041790735 - .long 568328192 - .long 1077603338 - .long 42353869 - .long 1040967961 - .long 4143972352 - .long 1077626585 - .long 3035382168 - .long 1043228732 - .long 1329594368 - .long 1077649686 - .long 2622169537 - .long 1042608561 - .long 3579838464 - .long 1077672638 - .long 3279279360 - .long 1039969098 - .long 1082130432 - .long 1077695443 - .long 152088799 - .long 1042154031 - .long 1409286144 - .long 1077718099 - .long 1577179566 - .long 1043010748 - .long 3743416320 - .long 1077740606 - .long 164745699 - .long 3187116092 - .long 3162505216 - .long 1077762965 - .long 3525309094 - .long 3189988831 - .long 3525312512 - .long 1077785175 - .long 790013831 - .long 3189219565 - .long 287309824 - .long 1077807237 - .long 3014793090 - .long 3190791112 - .long 1965031424 - .long 1077829149 - .long 2967000185 - .long 3189805146 - .long 73400320 - .long 1077850913 - .long 923692587 - .long 1033248306 - .long 3477078016 - .long 1077872527 - .long 797568562 - .long 1037083943 - .long 4024434688 - .long 1077893993 - .long 1829946853 - .long 1043203029 - .long 2319450112 - .long 1077915311 - .long 1559006781 - .long 3189221910 - .long 1704984576 - .long 1077936304 - .long 2364400925 - .long 3186972503 - .long 4104126464 - .long 1077946814 - .long 2278278095 - .long 3191749589 - .long 2438987776 - .long 1077957251 - .long 3465285131 - .long 1042435970 - .long 1606418432 - .long 1077967614 - .long 1692530062 - .long 1043648146 - .long 2273312768 - .long 1077977903 - .long 4155795398 - .long 1043918312 - .long 878706688 - .long 1077988119 - .long 1476207680 - .long 1043900034 - .long 2516582400 - .long 1077998261 - .long 2925970384 - .long 1039575776 - .long 3751804928 - .long 1078008330 - .long 2856171667 - .long 3191395954 - .long 1207959552 - .long 1078018327 - .long 2148760563 - .long 1039453383 - .long 161480704 - .long 1078028251 - .long 3632513556 - .long 3191302868 - .long 1642070016 - .long 1078038102 - .long 3240138768 - .long 1043718443 - .long 2447376384 - .long 1078047881 - .long 3100705142 - .long 3191740341 - .long 3709861888 - .long 1078057588 - .long 1674862667 - .long 1041748151 - .long 2325741568 - .long 1078067224 - .long 4255018693 - .long 1044226144 - .long 3827302400 - .long 1078076788 - .long 4142119676 - .long 3191232448 - .long 899678208 - .long 1078086282 - .long 700553623 - .long 1043581423 - .long 3462397952 - .long 1078095704 - .long 1067893357 - .long 3190322959 - .long 4286578688 - .long 1078105056 - .long 3385731218 - .long 1043691060 - .long 486539264 - .long 1078114339 - .long 2289432889 - .long 1035999008 - .long 2092957696 - .long 1078123551 - .long 653388941 - .long 3186809946 - .long 1996488704 - .long 1078132694 - .long 3139143286 - .long 3191209215 - .long 1709178880 - .long 1078141768 - .long 643854101 - .long 3190510369 - .long 2778726400 - .long 1078150773 - .long 2948057503 - .long 3191040876 - .long 2485125120 - .long 1078159710 - .long 172509481 - .long 1044304413 - .long 2438987776 - .long 1078168579 - .long 1352848207 - .long 1043175137 - .long 4271898624 - .long 1078177380 - .long 2864918449 - .long 1043427968 - .long 1054867456 - .long 1078186115 - .long 1735520057 - .long 1044098886 - .long 3063939072 - .long 1078194782 - .long 2894826982 - .long 1043616305 - .long 3418357760 - .long 1078203383 - .long 442938097 - .long 3191392387 - .long 3844079616 - .long 1078211918 - .long 4004776912 - .long 1043962348 - .long 1801453568 - .long 1078220388 - .long 2102624066 - .long 1044353828 - .long 3355443200 - .long 1078228792 - .long 1225643377 - .long 3190452555 - .long 1700790272 - .long 1078237132 - .long 2531804346 - .long 3191195152 - .long 2936012800 - .long 1078245407 - .long 928991542 - .long 1043548181 - .long 293601280 - .long 1078253619 - .long 3229203938 - .long 1042779359 - .long 4194304000 - .long 1078261766 - .long 1071139240 - .long 1044201053 - .long 3600809984 - .long 1078269851 - .long 3018208080 - .long 1043941200 - .long 371195904 - .long 1078277874 - .long 2039162957 - .long 3189903110 - .long 666894336 - .long 1078285834 - .long 1431034507 - .long 3190628953 - .long 2071986176 - .long 1078293732 - .long 3412027605 - .long 3191381190 - .long 2176843776 - .long 1078301569 - .long 183216755 - .long 3188772215 - .long 2877292544 - .long 1078309345 - .long 3207515339 - .long 3189828782 - .long 1778384896 - .long 1078317061 - .long 847503884 - .long 3191075565 - .long 784334848 - .long 1078324717 - .long 2952309205 - .long 1043794080 - .long 1809842176 - .long 1078332313 - .long 467544888 - .long 1042040199 - .long 2472542208 - .long 1078339850 - .long 3311174937 - .long 1039371295 - .long 396361728 - .long 1078347329 - .long 676857836 - .long 3191368341 - .long 1795162112 - .long 1078354749 - .long 2052116880 - .long 3191818486 - .long 0 - .long 1078362112 - .long 0 - .long 0 - .long 2499805184 - .long 1078369474 - .long 2052116880 - .long 1044334838 - .long 3898605568 - .long 1078376894 - .long 676857836 - .long 1043884693 - .long 1822425088 - .long 1078384373 - .long 3311174937 - .long 3186854943 - .long 2485125120 - .long 1078391910 - .long 467544888 - .long 3189523847 - .long 3510632448 - .long 1078399506 - .long 2952309205 - .long 3191277728 - .long 2516582400 - .long 1078407162 - .long 847503884 - .long 1043591917 - .long 1417674752 - .long 1078414878 - .long 3207515339 - .long 1042345134 - .long 2118123520 - .long 1078422654 - .long 183216755 - .long 1041288567 - .long 2222981120 - .long 1078430491 - .long 3412027605 - .long 1043897542 - .long 3628072960 - .long 1078438389 - .long 1431034507 - .long 1043145305 - .long 3923771392 - .long 1078446349 - .long 2039162957 - .long 1042419462 - .long 694157312 - .long 1078454372 - .long 3018208080 - .long 3191424848 - .long 100663296 - .long 1078462457 - .long 1071139240 - .long 3191684701 - .long 4001366016 - .long 1078470604 - .long 3229203938 - .long 3190263007 - .long 1358954496 - .long 1078478816 - .long 928991542 - .long 3191031829 - .long 2594177024 - .long 1078487091 - .long 2531804346 - .long 1043711504 - .long 939524096 - .long 1078495431 - .long 1225643377 - .long 1042968907 - .long 2493513728 - .long 1078503835 - .long 2102624066 - .long 3191837476 - .long 450887680 - .long 1078512305 - .long 4004776912 - .long 3191445996 - .long 876609536 - .long 1078520840 - .long 442938097 - .long 1043908739 - .long 1231028224 - .long 1078529441 - .long 2894826982 - .long 3191099953 - .long 3240099840 - .long 1078538108 - .long 1735520057 - .long 3191582534 - .long 23068672 - .long 1078546843 - .long 2864918449 - .long 3190911616 - .long 1855979520 - .long 1078555644 - .long 1352848207 - .long 3190658785 - .long 1809842176 - .long 1078564513 - .long 172509481 - .long 3191788061 - .long 1516240896 - .long 1078573450 - .long 2948057503 - .long 1043557228 - .long 2585788416 - .long 1078582455 - .long 643854101 - .long 1043026721 - .long 2298478592 - .long 1078591529 - .long 3139143286 - .long 1043725567 - .long 2202009600 - .long 1078600672 - .long 653388941 - .long 1039326298 - .long 3808428032 - .long 1078609884 - .long 2289432889 - .long 3183482656 - .long 8388608 - .long 1078619167 - .long 3385731218 - .long 3191174708 - .long 832569344 - .long 1078628519 - .long 1067893357 - .long 1042839311 - .long 3395289088 - .long 1078637941 - .long 700553623 - .long 3191065071 - .long 467664896 - .long 1078647435 - .long 4142119676 - .long 1043748800 - .long 1969225728 - .long 1078656999 - .long 4255018693 - .long 3191709792 - .long 585105408 - .long 1078666635 - .long 1674862667 - .long 3189231799 - .long 1847590912 - .long 1078676342 - .long 3100705142 - .long 1044256693 - .long 2652897280 - .long 1078686121 - .long 3240138768 - .long 3191202091 - .long 4133486592 - .long 1078695972 - .long 3632513556 - .long 1043819220 - .long 3087007744 - .long 1078705896 - .long 2148760563 - .long 3186937031 - .long 543162368 - .long 1078715893 - .long 2856171667 - .long 1043912306 - .long 1778384896 - .long 1078725962 - .long 2925970384 - .long 3187059424 - .long 3416260608 - .long 1078736104 - .long 1476207680 - .long 3191383682 - .long 2021654528 - .long 1078746320 - .long 4155795398 - .long 3191401960 - .long 2688548864 - .long 1078756609 - .long 1692530062 - .long 3191131794 - .long 1855979520 - .long 1078766972 - .long 3465285131 - .long 3189919618 - .long 190840832 - .long 1078777409 - .long 2278278095 - .long 1044265941 - .long 2589982720 - .long 1078787919 - .long 2364400925 - .long 1039488855 - .long 987758592 - .long 1078798504 - .long 1559006781 - .long 1041738262 - .long 134217728 - .long 1078809163 - .long 1232510221 - .long 1043398165 - .long 408944640 - .long 1078819896 - .long 797568562 - .long 3184567591 - .long 2109734912 - .long 1078830703 - .long 1936866404 - .long 1044380280 - .long 1166016512 - .long 1078841585 - .long 2811467203 - .long 3191322578 - .long 2004877312 - .long 1078852541 - .long 2787570751 - .long 3190829595 - .long 385875968 - .long 1078863572 - .long 3023722014 - .long 3191478212 - .long 566231040 - .long 1078874677 - .long 3525309094 - .long 1042505183 - .long 2424307712 - .long 1078885856 - .long 1063445218 - .long 3191768956 - .long 1442840576 - .long 1078897110 - .long 1577179566 - .long 3190494396 - .long 1606418432 - .long 1078908438 - .long 152088799 - .long 3189637679 - .long 2503999488 - .long 1078919840 - .long 1405657776 - .long 1044264267 - .long 3630170112 - .long 1078931316 - .long 2622169537 - .long 3190092209 - .long 75497472 - .long 1078942867 - .long 3035382168 - .long 3190712380 - .long 4009754624 - .long 1078954490 - .long 3752802150 - .long 1044153052 - .long 1730150400 - .long 1078966188 - .long 806768485 - .long 1043980860 - .long 895483904 - .long 1078977959 - .long 2588206371 - .long 1044009924 - .long 2380267520 - .long 1078987253 - .long 1393635940 - .long 1044120466 - .long 3938451456 - .long 1078993211 - .long 1171997210 - .long 1044632170 - .long 2342518784 - .long 1078999206 - .long 2612691399 - .long 3192403747 - .long 1191182336 - .long 1079005237 - .long 2099274145 - .long 3190761166 - .long 4028628992 - .long 1079011303 - .long 3828434628 - .long 1045017771 - .long 1455423488 - .long 1079017406 - .long 1622551107 - .long 3192310957 - .long 1182793728 - .long 1079023544 - .long 2124167878 - .long 3191930936 - .long 2275409920 - .long 1079029717 - .long 41710967 - .long 1041693117 - .long 3735027712 - .long 1079035925 - .long 514060819 - .long 3191694645 - .long 201326592 - .long 1079042169 - .long 1430947390 - .long 3192785388 - .long 3428843520 - .long 1079048446 - .long 2518581518 - .long 3186637987 - .long 3636461568 - .long 1079054758 - .long 1552096852 - .long 3192868489 - .long 3854565376 - .long 1079061104 - .long 1865077452 - .long 3191449780 - .long 2757754880 - .long 1079067484 - .long 2620146859 - .long 3192418374 - .long 3242196992 - .long 1079073897 - .long 1679886032 - .long 1045390684 - .long 3848273920 - .long 1079080343 - .long 1008852996 - .long 1045213180 - .long 3042967552 - .long 1079086822 - .long 1190325550 - .long 3191428594 - .long 3516923904 - .long 1079093333 - .long 2901961231 - .long 3189559456 - .long 3600809984 - .long 1079099876 - .long 843293277 - .long 1043776619 - .long 1556086784 - .long 1079106451 - .long 2705956472 - .long 3192552031 - .long 4158652416 - .long 1079113056 - .long 2007583995 - .long 3189975458 - .long 941621248 - .long 1079119693 - .long 1619354403 - .long 3192676122 - .long 2835349504 - .long 1079126359 - .long 4136034317 - .long 1045078976 - .long 3529506816 - .long 1079133055 - .long 290418758 - .long 1040193863 - .long 929038336 - .long 1079139781 - .long 3915023624 - .long 1045366041 - .long 1468006400 - .long 1079146535 - .long 1061629098 - .long 3192285591 - .long 2910846976 - .long 1079153317 - .long 1308671630 - .long 1043573567 - .long 2963275776 - .long 1079160127 - .long 1320907030 - .long 3192436805 - .long 3548381184 - .long 1079166964 - .long 182222777 - .long 3191258117 - .long 2231369728 - .long 1079173828 - .long 3513262155 - .long 3187154074 - .long 803209216 - .long 1079180718 - .long 1139819401 - .long 1040482120 - .long 987758592 - .long 1079187633 - .long 929259512 - .long 3191000897 - .long 146800640 - .long 1079194573 - .long 3229154456 - .long 3191288344 - .long 4167041024 - .long 1079201536 - .long 2552585681 - .long 1042131590 - .long 1692401664 - .long 1079208524 - .long 1439536878 - .long 3188143242 - .long 2776629248 - .long 1079215534 - .long 353720209 - .long 3191860659 - .long 230686720 - .long 1079222567 - .long 2411046197 - .long 3190921481 - .long 3986685952 - .long 1079229620 - .long 3756699850 - .long 3192084150 - .long 2438987776 - .long 1079236695 - .long 1671725142 - .long 1043734190 - .long 1107296256 - .long 1079243790 - .long 1240754629 - .long 1045055957 - .long 1157627904 - .long 1079250904 - .long 1534601222 - .long 1045263230 - .long 3701473280 - .long 1079258036 - .long 3448918206 - .long 1042044860 - .long 1203765248 - .long 1079265187 - .long 3924779397 - .long 1045089235 - .long 3263168512 - .long 1079272354 - .long 3287244582 - .long 1042979553 - .long 2243952640 - .long 1079279538 - .long 820395291 - .long 3190740781 - .long 3349151744 - .long 1079286737 - .long 1366866651 - .long 3192280071 - .long 3143630848 - .long 1079293951 - .long 2762624284 - .long 1045102639 - .long 2449473536 - .long 1079301179 - .long 1845586757 - .long 1044548329 - .long 2040528896 - .long 1079308420 - .long 3762298090 - .long 1045345703 - .long 2654994432 - .long 1079315673 - .long 3683913357 - .long 1045057884 - .long 698351616 - .long 1079322938 - .long 2953393071 - .long 3191482668 - .long 1128267776 - .long 1079330213 - .long 1034464320 - .long 3191720696 - .long 283115520 - .long 1079337498 - .long 1039826403 - .long 1041577546 - .long 3061841920 - .long 1079344791 - .long 19850279 - .long 1042922258 - .long 1449132032 - .long 1079352093 - .long 294154384 - .long 1045031347 - .long 293601280 - .long 1079359402 - .long 1192966610 - .long 3192379901 - .long 119537664 - .long 1079366717 - .long 152130161 - .long 3190257939 - .long 1438646272 - .long 1079374037 - .long 3963433176 - .long 1043378887 - .long 448790528 - .long 1079381362 - .long 2261136335 - .long 1044042197 - .long 1923088384 - .long 1079388690 - .long 3535382687 - .long 1045010726 - .long 2036334592 - .long 1079396021 - .long 3576784639 - .long 3192441914 - .long 1243611136 - .long 1079403354 - .long 3804918049 - .long 3191900478 - .long 0 - .long 1079410688 - .long 0 - .long 0 - .long 3051356160 - .long 1079418021 - .long 3804918049 - .long 1044416830 - .long 2258632704 - .long 1079425354 - .long 3576784639 - .long 1044958266 - .long 2371878912 - .long 1079432685 - .long 3535382687 - .long 3192494374 - .long 3846176768 - .long 1079440013 - .long 2261136335 - .long 3191525845 - .long 2856321024 - .long 1079447338 - .long 3963433176 - .long 3190862535 - .long 4175429632 - .long 1079454658 - .long 152130161 - .long 1042774291 - .long 4001366016 - .long 1079461973 - .long 1192966610 - .long 1044896253 - .long 2845835264 - .long 1079469282 - .long 294154384 - .long 3192514995 - .long 1233125376 - .long 1079476584 - .long 19850279 - .long 3190405906 - .long 4011851776 - .long 1079483877 - .long 1039826403 - .long 3189061194 - .long 3166699520 - .long 1079491162 - .long 1034464320 - .long 1044237048 - .long 3596615680 - .long 1079498437 - .long 2953393071 - .long 1043999020 - .long 1639972864 - .long 1079505702 - .long 3683913357 - .long 3192541532 - .long 2254438400 - .long 1079512955 - .long 3762298090 - .long 3192829351 - .long 1845493760 - .long 1079520196 - .long 1845586757 - .long 3192031977 - .long 1151336448 - .long 1079527424 - .long 2762624284 - .long 3192586287 - .long 945815552 - .long 1079534638 - .long 1366866651 - .long 1044796423 - .long 2051014656 - .long 1079541837 - .long 820395291 - .long 1043257133 - .long 1031798784 - .long 1079549021 - .long 3287244582 - .long 3190463201 - .long 3091202048 - .long 1079556188 - .long 3924779397 - .long 3192572883 - .long 593494016 - .long 1079563339 - .long 3448918206 - .long 3189528508 - .long 3137339392 - .long 1079570471 - .long 1534601222 - .long 3192746878 - .long 3187671040 - .long 1079577585 - .long 1240754629 - .long 3192539605 - .long 1855979520 - .long 1079584680 - .long 1671725142 - .long 3191217838 - .long 308281344 - .long 1079591755 - .long 3756699850 - .long 1044600502 - .long 4064280576 - .long 1079598808 - .long 2411046197 - .long 1043437833 - .long 1518338048 - .long 1079605841 - .long 353720209 - .long 1044377011 - .long 2602565632 - .long 1079612851 - .long 1439536878 - .long 1040659594 - .long 127926272 - .long 1079619839 - .long 2552585681 - .long 3189615238 - .long 4148166656 - .long 1079626802 - .long 3229154456 - .long 1043804696 - .long 3307208704 - .long 1079633742 - .long 929259512 - .long 1043517249 - .long 3491758080 - .long 1079640657 - .long 1139819401 - .long 3187965768 - .long 2063597568 - .long 1079647547 - .long 3513262155 - .long 1039670426 - .long 746586112 - .long 1079654411 - .long 182222777 - .long 1043774469 - .long 1331691520 - .long 1079661248 - .long 1320907030 - .long 1044953157 - .long 1384120320 - .long 1079668058 - .long 1308671630 - .long 3191057215 - .long 2826960896 - .long 1079674840 - .long 1061629098 - .long 1044801943 - .long 3365928960 - .long 1079681594 - .long 3915023624 - .long 3192849689 - .long 765460480 - .long 1079688320 - .long 290418758 - .long 3187677511 - .long 1459617792 - .long 1079695016 - .long 4136034317 - .long 3192562624 - .long 3353346048 - .long 1079701682 - .long 1619354403 - .long 1045192474 - .long 136314880 - .long 1079708319 - .long 2007583995 - .long 1042491810 - .long 2738880512 - .long 1079714924 - .long 2705956472 - .long 1045068383 - .long 694157312 - .long 1079721499 - .long 843293277 - .long 3191260267 - .long 778043392 - .long 1079728042 - .long 2901961231 - .long 1042075808 - .long 1251999744 - .long 1079734553 - .long 1190325550 - .long 1043944946 - .long 446693376 - .long 1079741032 - .long 1008852996 - .long 3192696828 - .long 1052770304 - .long 1079747478 - .long 1679886032 - .long 3192874332 - .long 1537212416 - .long 1079753891 - .long 2620146859 - .long 1044934726 - .long 440401920 - .long 1079760271 - .long 1865077452 - .long 1043966132 - .long 658505728 - .long 1079766617 - .long 1552096852 - .long 1045384841 - .long 866123776 - .long 1079772929 - .long 2518581518 - .long 1039154339 - .long 4093640704 - .long 1079779206 - .long 1430947390 - .long 1045301740 - .long 559939584 - .long 1079785450 - .long 514060819 - .long 1044210997 - .long 2019557376 - .long 1079791658 - .long 41710967 - .long 3189176765 - .long 3112173568 - .long 1079797831 - .long 2124167878 - .long 1044447288 - .long 2839543808 - .long 1079803969 - .long 1622551107 - .long 1044827309 - .long 266338304 - .long 1079810072 - .long 3828434628 - .long 3192501419 - .long 3103784960 - .long 1079816138 - .long 2099274145 - .long 1043277518 - .long 1952448512 - .long 1079822169 - .long 2612691399 - .long 1044920099 - .long 356515840 - .long 1079828164 - .long 1171997210 - .long 3192115818 - .long 1914699776 - .long 1079834122 - .long 1393635940 - .long 3191604114 - .long 1698693120 - .long 1079840044 - .long 3000864111 - .long 1044567581 - .long 3428843520 - .long 1079845929 - .long 3891583054 - .long 1044582113 - .long 2290089984 - .long 1079851778 - .long 3752802150 - .long 3191636700 - .long 2109734912 - .long 1079857590 - .long 3035382168 - .long 1043228732 - .long 2480930816 - .long 1079863365 - .long 2565683088 - .long 3192570771 - .long 3042967552 - .long 1079869103 - .long 1405657776 - .long 3191747915 - .long 3491758080 - .long 1079874804 - .long 152088799 - .long 1042154031 - .long 3573547008 - .long 1079880468 - .long 1577179566 - .long 1043010748 - .long 3082813440 - .long 1079886095 - .long 1063445218 - .long 1044285308 - .long 1864368128 - .long 1079891685 - .long 3525309094 - .long 3189988831 - .long 4102029312 - .long 1079897237 - .long 3023722014 - .long 1043994564 - .long 1145044992 - .long 1079902753 - .long 2787570751 - .long 1043345947 - .long 1564475392 - .long 1079908231 - .long 2811467203 - .long 1043838930 - .long 1092616192 - .long 1079913672 - .long 1936866404 - .long 3191863928 - .long 4091543552 - .long 1079919075 - .long 2980113444 - .long 3192905397 - .long 2080374784 - .long 1079924442 - .long 1232510221 - .long 3190881813 - .long 3800039424 - .long 1079929771 - .long 878865976 - .long 1045236413 - .long 851443712 - .long 1079935064 - .long 1134072023 - .long 1045386565 - .long 2051014656 - .long 1079940319 - .long 1008344600 - .long 1044439573 - .long 3368026112 - .long 1079945537 - .long 1281162365 - .long 3192613919 - .long 803209216 - .long 1079950719 - .long 1692530062 - .long 1043648146 - .long 3284140032 - .long 1079955863 - .long 4155795398 - .long 1043918312 - .long 2587885568 - .long 1079960971 - .long 3556863456 - .long 3192106174 - .long 3405774848 - .long 1079966042 - .long 2925970384 - .long 1039575776 - .long 1874853888 - .long 1079971077 - .long 2866881462 - .long 1044616390 - .long 2751463424 - .long 1079976075 - .long 2148760563 - .long 1039453383 - .long 2227175424 - .long 1079981037 - .long 2478710518 - .long 1044662933 - .long 822083584 - .long 1079985963 - .long 527414264 - .long 3192196970 - .long 3370123264 - .long 1079990852 - .long 597131077 - .long 1044444197 - .long 1855979520 - .long 1079995706 - .long 327513079 - .long 3192718825 - .long 1163919360 - .long 1080000524 - .long 2167457950 - .long 3191943119 - .long 1912602624 - .long 1080005306 - .long 2223907458 - .long 1044698143 - .long 450887680 - .long 1080010053 - .long 1797206836 - .long 3192265480 - .long 1730150400 - .long 1080014764 - .long 806768485 - .long 1045029436 - .long 2143289344 - .long 1080019440 - .long 3385731218 - .long 1043691060 - .long 2390753280 - .long 1080024081 - .long 2289432889 - .long 1035999008 - .long 3193962496 - .long 1080028687 - .long 653388941 - .long 3186809946 - .long 998244352 - .long 1080033259 - .long 3139143286 - .long 3191209215 - .long 427819008 - .long 1080035538 - .long 617352675 - .long 3193137764 - .long 1767899136 - .long 1080037789 - .long 2820938545 - .long 1044793929 - .long 2768240640 - .long 1080040023 - .long 1116869194 - .long 1045935239 - .long 3831496704 - .long 1080042240 - .long 2883013420 - .long 3192429127 - .long 1067450368 - .long 1080044441 - .long 716229612 - .long 1045716128 - .long 3485466624 - .long 1080046624 - .long 3427207267 - .long 3192006748 - .long 2912944128 - .long 1080048791 - .long 1797448570 - .long 1045763212 - .long 4074766336 - .long 1080050941 - .long 963007300 - .long 1046072799 - .long 3107979264 - .long 1080053075 - .long 1001194228 - .long 1045849723 - .long 450887680 - .long 1080055193 - .long 3243655263 - .long 3191879277 - .long 838860800 - .long 1080057294 - .long 1225643377 - .long 3190452555 - .long 425721856 - .long 1080059379 - .long 632951086 - .long 3193270660 - .long 3955228672 - .long 1080061447 - .long 928991542 - .long 1043548181 - .long 3294625792 - .long 1080063500 - .long 3229203938 - .long 1042779359 - .long 3196059648 - .long 1080065537 - .long 1071139240 - .long 1044201053 - .long 4120903680 - .long 1080067558 - .long 754552020 - .long 1045844436 - .long 2239758336 - .long 1080069564 - .long 1637692909 - .long 1045134398 - .long 2313158656 - .long 1080071554 - .long 3579217071 - .long 1046240180 - .long 517996544 - .long 1080073529 - .long 3412027605 - .long 3191381190 - .long 1616904192 - .long 1080075488 - .long 2404468057 - .long 1046410024 - .long 1793064960 - .long 1080077432 - .long 3207515339 - .long 3189828782 - .long 1518338048 - .long 1080079361 - .long 847503884 - .long 3191075565 - .long 1270874112 - .long 1080081275 - .long 3556889995 - .long 3193585111 - .long 1526726656 - .long 1080083174 - .long 478427801 - .long 3192682319 - .long 2766143488 - .long 1080085058 - .long 30743511 - .long 3192873887 - .long 1172307968 - .long 1080086928 - .long 1809054730 - .long 1044630197 - .long 1522532352 - .long 1080088783 - .long 2052116880 - .long 3191818486 - .long 0 - .long 1080090624 - .long 0 - .long 0 - .long 2772434944 - .long 1080092464 - .long 2052116880 - .long 1044334838 - .long 3122659328 - .long 1080094319 - .long 1809054730 - .long 3192113845 - .long 1528823808 - .long 1080096189 - .long 30743511 - .long 1045390239 - .long 2768240640 - .long 1080098073 - .long 478427801 - .long 1045198671 - .long 3024093184 - .long 1080099972 - .long 3556889995 - .long 1046101463 - .long 2776629248 - .long 1080101886 - .long 847503884 - .long 1043591917 - .long 2501902336 - .long 1080103815 - .long 3207515339 - .long 1042345134 - .long 2678063104 - .long 1080105759 - .long 2404468057 - .long 3193893672 - .long 3776970752 - .long 1080107718 - .long 3412027605 - .long 1043897542 - .long 1981808640 - .long 1080109693 - .long 3579217071 - .long 3193723828 - .long 2055208960 - .long 1080111683 - .long 1637692909 - .long 3192618046 - .long 174063616 - .long 1080113689 - .long 754552020 - .long 3193328084 - .long 1098907648 - .long 1080115710 - .long 1071139240 - .long 3191684701 - .long 1000341504 - .long 1080117747 - .long 3229203938 - .long 3190263007 - .long 339738624 - .long 1080119800 - .long 928991542 - .long 3191031829 - .long 3869245440 - .long 1080121868 - .long 632951086 - .long 1045787012 - .long 3456106496 - .long 1080123953 - .long 1225643377 - .long 1042968907 - .long 3844079616 - .long 1080126054 - .long 3243655263 - .long 1044395629 - .long 1186988032 - .long 1080128172 - .long 1001194228 - .long 3193333371 - .long 220200960 - .long 1080130306 - .long 963007300 - .long 3193556447 - .long 1382023168 - .long 1080132456 - .long 1797448570 - .long 3193246860 - .long 809500672 - .long 1080134623 - .long 3427207267 - .long 1044523100 - .long 3227516928 - .long 1080136806 - .long 716229612 - .long 3193199776 - .long 463470592 - .long 1080139007 - .long 2883013420 - .long 1044945479 - .long 1526726656 - .long 1080141224 - .long 1116869194 - .long 3193418887 - .long 2527068160 - .long 1080143458 - .long 2820938545 - .long 3192277577 - .long 3867148288 - .long 1080145709 - .long 617352675 - .long 1045654116 - .long 1648361472 - .long 1080147978 - .long 3139143286 - .long 1043725567 - .long 551550976 - .long 1080150264 - .long 2539927630 - .long 3193943182 - .long 952107008 - .long 1080152567 - .long 2289432889 - .long 3183482656 - .long 3223322624 - .long 1080154887 - .long 3385731218 - .long 3191174708 - .long 3428843520 - .long 1080157225 - .long 3891583054 - .long 1045630689 - .long 1923088384 - .long 1080159581 - .long 3396363878 - .long 3193238139 - .long 3338665984 - .long 1080161954 - .long 2223907458 - .long 3192181791 - .long 3714056192 - .long 1080164345 - .long 1063754673 - .long 3193399320 - .long 3368026112 - .long 1080166754 - .long 1983727109 - .long 3193011467 - .long 2608857088 - .long 1080169181 - .long 1848918109 - .long 1045923309 - .long 1736441856 - .long 1080171626 - .long 527414264 - .long 1044713322 - .long 1033895936 - .long 1080174089 - .long 2478710518 - .long 3192146581 - .long 771751936 - .long 1080176570 - .long 2148760563 - .long 3186937031 - .long 1210056704 - .long 1080179069 - .long 2866881462 - .long 3192100038 - .long 2592079872 - .long 1080181586 - .long 2925970384 - .long 3187059424 - .long 853540864 - .long 1080184122 - .long 3556863456 - .long 1044622526 - .long 505413632 - .long 1080186676 - .long 4155795398 - .long 3191401960 - .long 1744830464 - .long 1080189248 - .long 1724351133 - .long 1046137947 - .long 463470592 - .long 1080191839 - .long 1281162365 - .long 1045130271 - .long 1121976320 - .long 1080194448 - .long 1008344600 - .long 3191923221 - .long 3869245440 - .long 1080197075 - .long 1134072023 - .long 3192870213 - .long 247463936 - .long 1080199722 - .long 878865976 - .long 3192720061 - .long 3254779904 - .long 1080202386 - .long 1232510221 - .long 1043398165 - .long 102760448 - .long 1080205070 - .long 657426926 - .long 3192918181 - .long 3749707776 - .long 1080207771 - .long 3810750695 - .long 3193438561 - .long 1365245952 - .long 1080210492 - .long 2811467203 - .long 3191322578 - .long 1574961152 - .long 1080213231 - .long 2787570751 - .long 3190829595 - .long 96468992 - .long 1080215989 - .long 3023722014 - .long 3191478212 - .long 1216348160 - .long 1080218765 - .long 96207275 - .long 3193803844 - .long 606076928 - .long 1080221560 - .long 1063445218 - .long 3191768956 - .long 2508193792 - .long 1080224373 - .long 1577179566 - .long 3190494396 - .long 2548039680 - .long 1080227205 - .long 258929906 - .long 1046355933 - .long 627048448 - .long 1080230056 - .long 722327380 - .long 3193467565 - .long 908066816 - .long 1080232925 - .long 864642104 - .long 3193085494 - .long 3240099840 - .long 1080235812 - .long 3035382168 - .long 3190712380 - .long 3149922304 - .long 1080238718 - .long 3752802150 - .long 1044153052 - .long 432013312 - .long 1080241643 - .long 201692121 - .long 1045854351 - .long 3445620736 - .long 1080244585 - .long 3000864111 - .long 3192051229 - .long 3338665984 - .long 1080247546 - .long 1799074663 - .long 3193503515 - .long 4116709376 - .long 1080250525 - .long 1171997210 - .long 1044632170 - .long 1170210816 - .long 1080253523 - .long 841137948 - .long 1045685358 - .long 2743074816 - .long 1080256538 - .long 2099274145 - .long 3190761166 - .long 4162846720 - .long 1080259571 - .long 233266334 - .long 3193120170 - .long 727711744 - .long 1080262623 - .long 1622551107 - .long 3192310957 - .long 591396864 - .long 1080265692 - .long 2124167878 - .long 3191930936 - .long 3286237184 - .long 1080268778 - .long 802699433 - .long 3193868388 - .long 4013948928 - .long 1080271882 - .long 3092710267 - .long 1045997234 - .long 2248146944 - .long 1080275004 - .long 1430947390 - .long 3192785388 - .long 1713373184 - .long 1080278143 - .long 1906804220 - .long 1046462221 - .long 1818230784 - .long 1080281299 - .long 1552096852 - .long 3192868489 - .long 1927282688 - .long 1080284472 - .long 1865077452 - .long 3191449780 - .long 1377828864 - .long 1080287662 - .long 2984893867 - .long 1045678044 - .long 3768582144 - .long 1080290868 - .long 1679886032 - .long 1045390684 - .long 4072669184 - .long 1080294091 - .long 3790540798 - .long 3193022465 - .long 1520435200 - .long 1080297331 - .long 1849902261 - .long 1046063747 - .long 3904897024 - .long 1080300586 - .long 4113594719 - .long 1046360821 - .long 1801453568 - .long 1080303858 - .long 862918505 - .long 3193589477 - .long 2925527040 - .long 1080307145 - .long 2705956472 - .long 3192552031 - .long 2078277632 - .long 1080310448 - .long 2970277473 - .long 1046321867 - .long 2617245696 - .long 1080313766 - .long 3485290095 - .long 1045549170 - .long 3565158400 - .long 1080317099 - .long 4136034317 - .long 1045078976 - .long 3913285632 - .long 1080320447 - .long 3346367614 - .long 3193929525 - .long 2613051392 - .long 1080323810 - .long 189971836 - .long 3192946035 - .long 2881486848 - .long 1080327187 - .long 1061629098 - .long 3192285591 - .long 3602907136 - .long 1080330578 - .long 1308671630 - .long 1043573567 - .long 3628072960 - .long 1080333983 - .long 1487030133 - .long 1045668829 - .long 1774190592 - .long 1080337402 - .long 182222777 - .long 3191258117 - .long 1115684864 - .long 1080340834 - .long 3513262155 - .long 3187154074 - .long 402653184 - .long 1080344279 - .long 3185606116 - .long 3193920517 - .long 2640314368 - .long 1080347736 - .long 2988910594 - .long 1046170671 - .long 2220883968 - .long 1080351206 - .long 3229154456 - .long 3191288344 - .long 2084569088 - .long 1080354688 - .long 2524817955 - .long 3193840983 - .long 845152256 - .long 1080358182 - .long 2907804489 - .long 1046431323 - .long 1388314624 - .long 1080361687 - .long 353720209 - .long 3191860659 - .long 2262827008 - .long 1080365203 - .long 2411046197 - .long 3190921481 - .long 1992294400 - .long 1080368730 - .long 2416617371 - .long 1045845156 - .long 3368026112 - .long 1080372267 - .long 1729552362 - .long 3193600084 - .long 553648128 - .long 1080375815 - .long 1240754629 - .long 1045055957 - .long 578813952 - .long 1080379372 - .long 1534601222 - .long 1045263230 - .long 1851785216 - .long 1080382938 - .long 858184436 - .long 3193846404 - .long 2749366272 - .long 1080386513 - .long 3924779397 - .long 1045089235 - .long 1631584256 - .long 1080390097 - .long 3287244582 - .long 1042979553 - .long 1121976320 - .long 1080393689 - .long 820395291 - .long 3190740781 - .long 3821010944 - .long 1080397288 - .long 1464050323 - .long 1045747196 - .long 3720347648 - .long 1080400895 - .long 766171506 - .long 3193077736 - .long 3372220416 - .long 1080404509 - .long 1845586757 - .long 1044548329 - .long 1021313024 - .long 1080408130 - .long 266334603 - .long 3192956204 - .long 3474980864 - .long 1080411756 - .long 3683913357 - .long 1045057884 - .long 348127232 - .long 1080415389 - .long 3556619028 - .long 1046050228 - .long 2711617536 - .long 1080419026 - .long 1034464320 - .long 3191720696 - .long 142606336 - .long 1080422669 - .long 1545623586 - .long 3193875611 - .long 3678404608 - .long 1080426315 - .long 19850279 - .long 1042922258 - .long 2873098240 - .long 1080429966 - .long 2000406456 - .long 3193113382 - .long 146800640 - .long 1080433621 - .long 1192966610 - .long 3192379901 - .long 2206203904 - .long 1080437278 - .long 2665338290 - .long 1046286557 - .long 2866806784 - .long 1080440938 - .long 3963433176 - .long 1043378887 - .long 224395264 - .long 1080444601 - .long 2261136335 - .long 1044042197 - .long 962592768 - .long 1080448265 - .long 2527275953 - .long 3193123692 - .long 3164602368 - .long 1080451930 - .long 2506574977 - .long 1045666274 - .long 620756992 - .long 1080455597 - .long 2392508272 - .long 1045936992 - .long 0 - .long 1080459264 - .long 0 - .long 0 - .type __libm_atandl_table_128,@object - .size __libm_atandl_table_128,8208 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanf_gen.S deleted file mode 100644 index 2a715bf18b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanf_gen.S +++ /dev/null @@ -1,338 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanf_gen.c" - .text -..TXTST0: -# -- Begin atanf - .text - .align 16,0x90 - .globl atanf -atanf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_atanf.1: -..L2: - - pxor %xmm5, %xmm5 - movd %xmm0, %edx - cvtss2sd %xmm0, %xmm5 - movl %edx, %eax - andl $2147483647, %eax - cmpl $1300234240, %eax - jae ..B1.14 -..B1.2: - cmpl $1073741824, %eax - jae ..B1.13 -..B1.3: - cmpl $1056964608, %eax - jae ..B1.12 -..B1.4: - cmpl $964689920, %eax - jae ..B1.11 -..B1.5: - shrl $31, %edx - cmpl $8388608, %eax - jb ..B1.7 -..B1.6: - movl %edx, %edx - lea _small_value_32(%rip), %rax - movss (%rax,%rdx,4), %xmm1 - mulss .L_2il0floatpacket.17(%rip), %xmm1 - subss %xmm1, %xmm0 - ret -..B1.7: - testl %eax, %eax - je ..B1.10 -..B1.8: - lea _small_value_32(%rip), %rax - pxor %xmm1, %xmm1 - movss (%rax,%rdx,4), %xmm0 - mulss .L_2il0floatpacket.17(%rip), %xmm0 - cvtss2sd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm1 - subsd %xmm0, %xmm5 - pxor %xmm0, %xmm0 - movss %xmm1, -8(%rsp) - cvtsd2ss %xmm5, %xmm0 -..B1.10: - ret -..B1.11: - movaps %xmm5, %xmm1 - mulsd %xmm5, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.4(%rip), %xmm2 - mulsd %xmm0, %xmm2 - movsd .L_2il0floatpacket.0(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.5(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.1(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.6(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.2(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.7(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.3(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.8(%rip), %xmm2 - mulsd %xmm1, %xmm2 - pxor %xmm0, %xmm0 - addsd %xmm2, %xmm3 - mulsd %xmm5, %xmm3 - subsd %xmm3, %xmm5 - cvtsd2ss %xmm5, %xmm0 - ret -..B1.12: - andps .L_2il0floatpacket.19(%rip), %xmm5 - testl $-2147483648, %edx - movsd .L_2il0floatpacket.9(%rip), %xmm4 - movsd .L_2il0floatpacket.18(%rip), %xmm1 - addsd %xmm5, %xmm4 - addsd %xmm1, %xmm5 - divsd %xmm5, %xmm4 - movaps %xmm4, %xmm0 - mulsd %xmm4, %xmm0 - movaps %xmm0, %xmm2 - mulsd %xmm0, %xmm2 - movsd .L_2il0floatpacket.10(%rip), %xmm5 - mulsd %xmm2, %xmm5 - movsd .L_2il0floatpacket.13(%rip), %xmm3 - mulsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.11(%rip), %xmm5 - mulsd %xmm2, %xmm5 - addsd .L_2il0floatpacket.14(%rip), %xmm3 - mulsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.12(%rip), %xmm5 - mulsd %xmm0, %xmm5 - addsd .L_2il0floatpacket.15(%rip), %xmm3 - addsd %xmm3, %xmm5 - mulsd %xmm4, %xmm5 - addsd .L_2il0floatpacket.16(%rip), %xmm5 - movaps %xmm5, %xmm0 - xorps .L_2il0floatpacket.20(%rip), %xmm0 - jne ..L3 - movaps %xmm5, %xmm0 -..L3: - cvtsd2ss %xmm0, %xmm0 - ret -..B1.13: - movsd .L_2il0floatpacket.18(%rip), %xmm2 - lea pi_2d(%rip), %rax - divsd %xmm5, %xmm2 - movaps %xmm2, %xmm0 - mulsd %xmm2, %xmm0 - movaps %xmm0, %xmm5 - mulsd %xmm0, %xmm5 - movsd .L_2il0floatpacket.4(%rip), %xmm1 - mulsd %xmm5, %xmm1 - movsd .L_2il0floatpacket.0(%rip), %xmm3 - mulsd %xmm5, %xmm3 - addsd .L_2il0floatpacket.5(%rip), %xmm1 - mulsd %xmm5, %xmm1 - addsd .L_2il0floatpacket.1(%rip), %xmm3 - mulsd %xmm5, %xmm3 - addsd .L_2il0floatpacket.6(%rip), %xmm1 - mulsd %xmm5, %xmm1 - addsd .L_2il0floatpacket.2(%rip), %xmm3 - mulsd %xmm5, %xmm3 - addsd .L_2il0floatpacket.7(%rip), %xmm1 - mulsd %xmm5, %xmm1 - addsd .L_2il0floatpacket.3(%rip), %xmm3 - mulsd %xmm5, %xmm3 - addsd .L_2il0floatpacket.8(%rip), %xmm1 - mulsd %xmm0, %xmm1 - shrl $31, %edx - addsd %xmm1, %xmm3 - movsd (%rax,%rdx,8), %xmm0 - mulsd %xmm2, %xmm3 - subsd %xmm2, %xmm0 - addsd %xmm3, %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.14: - cmpl $2139095040, %eax - ja ..B1.17 -..B1.15: - lea pi_2f(%rip), %rax - lea _small_value_32(%rip), %rcx - shrl $31, %edx - movss (%rax,%rdx,4), %xmm0 - subss (%rcx,%rdx,4), %xmm0 -..B1.17: - ret - .align 16,0x90 - .cfi_endproc - .type atanf,@function - .size atanf,.-atanf - .data -# -- End atanf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.19: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.19,@object - .size .L_2il0floatpacket.19,16 - .align 16 -.L_2il0floatpacket.20: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.20,@object - .size .L_2il0floatpacket.20,16 - .align 8 -.L_2il0floatpacket.0: - .long 0xd091d944,0xbf9ca14d - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x12effb80,0xbfb28de9 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0xcda40e6e,0xbfbc6a7e - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x1185f36d,0xbfc99997 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x3cb73089,0x3f7fa335 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x44053df6,0x3faac31f - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x1cf194fa,0x3fb70b87 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0xb177868e,0x3fc248e0 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x509fdfb1,0x3fd55555 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0xd9d9aa33,0xbfb1c1c0 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x04ba093e,0xbfc24485 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x312dd43c,0xbfd55555 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x947e6edc,0x3fbbcbeb - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0x700fa0b3,0x3fc9997b - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 8 -.L_2il0floatpacket.15: - .long 0xfff8f7db,0x3fefffff - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,8 - .align 8 -.L_2il0floatpacket.16: - .long 0x54442d18,0x3fe921fb - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,8 - .align 8 -.L_2il0floatpacket.18: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,8 - .align 8 -pi_2d: - .long 0x54442d18,0x3ff921fb - .long 0x54442d18,0xbff921fb - .type pi_2d,@object - .size pi_2d,16 - .align 4 -.L_2il0floatpacket.17: - .long 0x0d800000 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -pi_2f: - .long 0x3fc90fdb - .long 0xbfc90fdb - .type pi_2f,@object - .size pi_2f,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanh_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanh_gen.S deleted file mode 100644 index e0be35a646..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanh_gen.S +++ /dev/null @@ -1,360 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanh_gen.c" - .text -..TXTST0: -# -- Begin atanh - .text - .align 16,0x90 - .globl atanh -atanh: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_atanh.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %esi - movl %esi, %edx - andl $2147483647, %edx - cmpl $1072693248, %edx - jae ..B1.12 -..B1.2: - cmpl $1068498944, %edx - jae ..B1.11 -..B1.3: - cmpl $1012924416, %edx - jae ..B1.10 -..B1.4: - shrl $31, %esi - cmpl $1048576, %edx - jb ..B1.6 -..B1.5: - lea _ones(%rip), %rax - movsd (%rax), %xmm1 - addsd %xmm0, %xmm1 - movsd %xmm1, -40(%rsp) - movsd -40(%rsp), %xmm2 - mulsd %xmm2, %xmm0 - ret -..B1.6: - movl -8(%rsp), %eax - orl %eax, %edx - je ..B1.8 -..B1.7: - lea _small_value_64(%rip), %rax - movsd -8(%rsp), %xmm0 - movsd (%rax,%rsi,8), %xmm1 - mulsd (%rax), %xmm1 - movsd %xmm1, -40(%rsp) - addsd %xmm1, %xmm0 - ret -..B1.8: - movsd -8(%rsp), %xmm0 -..B1.9: - ret -..B1.10: - movsd -8(%rsp), %xmm4 - lea 40+_PA(%rip), %rax - movaps %xmm4, %xmm3 - lea 32+_PA(%rip), %rsi - mulsd %xmm4, %xmm3 - lea 24+_PA(%rip), %rdx - movaps %xmm3, %xmm1 - lea 16+_PA(%rip), %rdi - mulsd %xmm3, %xmm1 - lea 8+_PA(%rip), %rcx - movsd (%rax), %xmm0 - lea _PA(%rip), %r8 - mulsd %xmm1, %xmm0 - movsd (%rsi), %xmm2 - mulsd %xmm1, %xmm2 - addsd (%rdx), %xmm0 - mulsd %xmm1, %xmm0 - addsd (%rdi), %xmm2 - mulsd %xmm1, %xmm2 - addsd (%rcx), %xmm0 - mulsd %xmm3, %xmm0 - addsd (%r8), %xmm2 - addsd %xmm2, %xmm0 - mulsd %xmm4, %xmm0 - mulsd %xmm3, %xmm0 - addsd %xmm4, %xmm0 - ret -..B1.11: - movsd -8(%rsp), %xmm9 - lea 8+_ones(%rip), %rdi - andps .L_2il0floatpacket.0(%rip), %xmm9 - lea _ones(%rip), %r8 - movsd %xmm9, -8(%rsp) - movq $0x3ff0000000000000, %r10 - andl $-268435456, -8(%rsp) - pxor %xmm15, %xmm15 - movsd -8(%rsp), %xmm12 - movsd (%rdi), %xmm0 - movaps %xmm12, %xmm6 - movaps %xmm0, %xmm8 - lea 32+_PL(%rip), %rdi - movsd (%r8), %xmm4 - lea 16+_PL(%rip), %r8 - movq __libm_rcp_table_256@GOTPCREL(%rip), %rax - addsd %xmm0, %xmm6 - subsd %xmm12, %xmm9 - addsd %xmm4, %xmm12 - movaps %xmm6, %xmm2 - movaps %xmm6, %xmm5 - movaps %xmm9, %xmm3 - movaps %xmm12, %xmm1 - shrl $31, %esi - addsd %xmm9, %xmm2 - divsd %xmm2, %xmm8 - movsd %xmm8, -32(%rsp) - pxor %xmm2, %xmm2 - andl $-268435456, -32(%rsp) - movsd -32(%rsp), %xmm10 - movaps %xmm10, %xmm7 - subsd %xmm10, %xmm8 - mulsd %xmm10, %xmm6 - mulsd %xmm10, %xmm12 - mulsd %xmm8, %xmm5 - addsd %xmm8, %xmm7 - addsd %xmm4, %xmm6 - mulsd %xmm7, %xmm3 - addsd %xmm3, %xmm5 - addsd %xmm5, %xmm6 - mulsd %xmm6, %xmm7 - addsd %xmm7, %xmm8 - mulsd %xmm8, %xmm1 - addsd %xmm10, %xmm8 - mulsd %xmm8, %xmm9 - addsd %xmm9, %xmm1 - movaps %xmm1, %xmm11 - addsd %xmm12, %xmm11 - movsd %xmm11, -8(%rsp) - movl $0, -8(%rsp) - movsd -8(%rsp), %xmm3 - movl -4(%rsp), %ecx - subsd %xmm3, %xmm12 - sarl $20, %ecx - addsd %xmm12, %xmm1 - addl $-1023, %ecx - movslq %ecx, %r9 - shlq $52, %r9 - subq %r9, %r10 - lea _PL(%rip), %r9 - movq %r10, -24(%rsp) - lea 24+_PL(%rip), %r10 - movsd -24(%rsp), %xmm13 - mulsd %xmm13, %xmm1 - cvtsi2sd %ecx, %xmm2 - mulsd %xmm13, %xmm3 - movaps %xmm1, %xmm14 - lea _LN2(%rip), %rcx - movsd (%r10), %xmm13 - addsd %xmm3, %xmm14 - movsd %xmm14, -16(%rsp) - movl -12(%rsp), %r11d - shrl $12, %r11d - movzbl %r11b, %edx - lea 8+_PL(%rip), %r11 - movsd (%rdi), %xmm14 - cvtss2sd (%rax,%rdx,4), %xmm15 - mulsd %xmm15, %xmm3 - mulsd %xmm15, %xmm1 - addsd %xmm0, %xmm3 - movaps %xmm3, %xmm12 - shlq $4, %rdx - addsd %xmm1, %xmm12 - movaps %xmm12, %xmm0 - mulsd %xmm12, %xmm0 - mulsd %xmm0, %xmm14 - mulsd %xmm0, %xmm13 - addsd (%r8), %xmm14 - addsd (%r11), %xmm13 - mulsd %xmm0, %xmm14 - mulsd %xmm0, %xmm13 - addsd (%r9), %xmm14 - mulsd %xmm12, %xmm13 - mulsd %xmm0, %xmm14 - movsd (%rcx), %xmm0 - lea halfs(%rip), %rcx - mulsd %xmm2, %xmm0 - addsd %xmm13, %xmm14 - movq __libm_log_table_256@GOTPCREL(%rip), %rax - addsd %xmm14, %xmm1 - addsd (%rax,%rdx), %xmm0 - movsd (%rcx,%rsi,8), %xmm4 - lea 8+_LN2(%rip), %rcx - movsd %xmm4, -16(%rsp) - addsd %xmm1, %xmm0 - movsd (%rcx), %xmm1 - mulsd %xmm1, %xmm2 - addsd 8(%rax,%rdx), %xmm2 - movsd %xmm2, -32(%rsp) - addsd %xmm2, %xmm3 - movsd %xmm3, -8(%rsp) - addsd %xmm3, %xmm0 - mulsd %xmm4, %xmm0 - ret -..B1.12: - jne ..B1.15 -..B1.13: - cmpl $0, -8(%rsp) - je ..B1.19 -..B1.14: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - ret -..B1.15: - cmpl $2146435072, %edx - jb ..B1.14 -..B1.16: - jne ..B1.18 -..B1.17: - cmpl $0, -8(%rsp) - je ..B1.14 -..B1.18: - lea _ones(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - ret -..B1.19: - lea _ones(%rip), %rax - lea _zeros(%rip), %rdx - shrl $31, %esi - movsd (%rax,%rsi,8), %xmm0 - divsd (%rdx), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type atanh,@function - .size atanh,.-atanh - .data -# -- End atanh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 8 -halfs: - .long 0x00000000,0x3fe00000 - .long 0x00000000,0xbfe00000 - .type halfs,@object - .size halfs,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_PA: - .long 1431655765 - .long 1070945621 - .long 2576980801 - .long 1070176665 - .long 2453616913 - .long 1069697316 - .long 1427436931 - .long 1069314503 - .long 2129349532 - .long 1068975486 - .long 1629438381 - .long 1068756329 - .type _PA,@object - .size _PA,48 - .align 4 -_PL: - .long 0 - .long 3219128320 - .long 1431621855 - .long 1070945621 - .long 4294842013 - .long 3218079743 - .long 1289448124 - .long 1070176674 - .long 2077359316 - .long 3217380703 - .type _PL,@object - .size _PL,40 - .align 4 -_LN2: - .long 897137782 - .long 1038760431 - .long 4276092928 - .long 1072049730 - .type _LN2,@object - .size _LN2,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanhf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanhf_gen.S deleted file mode 100644 index 1ea90340e4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanhf_gen.S +++ /dev/null @@ -1,324 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanhf_gen.c" - .text -..TXTST0: -# -- Begin atanhf - .text - .align 16,0x90 - .globl atanhf -atanhf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_atanhf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -16(%rsp) - movl %edx, %eax - andl $2147483647, %eax - cmpl $1065353216, %eax - jae ..B1.12 -..B1.2: - cmpl $1056964608, %eax - jae ..B1.11 -..B1.3: - cmpl $838860800, %eax - jae ..B1.10 -..B1.4: - shrl $31, %edx - cmpl $8388608, %eax - jb ..B1.6 -..B1.5: - movss .L_2il0floatpacket.15(%rip), %xmm1 - addss %xmm0, %xmm1 - mulss %xmm1, %xmm0 - ret -..B1.6: - testl %eax, %eax - je ..B1.8 -..B1.7: - lea _small_value_32(%rip), %rax - pxor %xmm2, %xmm2 - pxor %xmm1, %xmm1 - cvtss2sd -16(%rsp), %xmm2 - movss (%rax,%rdx,4), %xmm0 - mulss .L_2il0floatpacket.14(%rip), %xmm0 - cvtss2sd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm1 - addsd %xmm0, %xmm2 - pxor %xmm0, %xmm0 - movss %xmm1, -40(%rsp) - cvtsd2ss %xmm2, %xmm0 - ret -..B1.8: - movss -16(%rsp), %xmm0 -..B1.9: - ret -..B1.10: - pxor %xmm3, %xmm3 - cvtss2sd -16(%rsp), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.5(%rip), %xmm4 - movsd .L_2il0floatpacket.9(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.6(%rip), %xmm4 - addsd .L_2il0floatpacket.10(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - addsd .L_2il0floatpacket.11(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.8(%rip), %xmm4 - addsd .L_2il0floatpacket.12(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm3, %xmm4 - cvtsd2ss %xmm4, %xmm4 - movaps %xmm4, %xmm0 - ret -..B1.11: - pxor %xmm1, %xmm1 - pxor %xmm4, %xmm4 - cvtss2sd -16(%rsp), %xmm1 - movsd .L_2il0floatpacket.16(%rip), %xmm2 - pxor %xmm6, %xmm6 - movaps %xmm2, %xmm0 - pxor %xmm8, %xmm8 - movq __libm_rcp_table_256@GOTPCREL(%rip), %r9 - addsd %xmm1, %xmm0 - subsd %xmm1, %xmm2 - movsd %xmm0, -32(%rsp) - movsd %xmm2, -24(%rsp) - movzwl -26(%rsp), %ecx - movl %ecx, %eax - movzwl -18(%rsp), %esi - movl %esi, %edx - andl $-32753, %ecx - andl $-32753, %esi - orl $-49168, %ecx - orl $-49168, %esi - movw %cx, -26(%rsp) - andl $32752, %eax - movw %si, -18(%rsp) - andl $32752, %edx - movl -28(%rsp), %edi - movl -20(%rsp), %r8d - andl $1048575, %edi - andl $1048575, %r8d - shrl $12, %edi - shrl $12, %r8d - cvtss2sd (%r9,%rdi,4), %xmm4 - cvtss2sd (%r9,%r8,4), %xmm6 - mulsd -32(%rsp), %xmm4 - mulsd -24(%rsp), %xmm6 - movsd .L_2il0floatpacket.0(%rip), %xmm3 - movsd .L_2il0floatpacket.1(%rip), %xmm7 - addsd %xmm3, %xmm4 - addsd %xmm3, %xmm6 - movaps %xmm7, %xmm0 - mulsd %xmm4, %xmm0 - mulsd %xmm6, %xmm7 - movsd .L_2il0floatpacket.2(%rip), %xmm5 - shrl $4, %eax - addsd %xmm5, %xmm0 - addsd %xmm5, %xmm7 - mulsd %xmm4, %xmm0 - mulsd %xmm6, %xmm7 - mulsd %xmm4, %xmm0 - mulsd %xmm6, %xmm7 - addsd %xmm4, %xmm0 - addsd %xmm6, %xmm7 - shrl $4, %edx - addl $-1023, %eax - addl $-1023, %edx - subsd %xmm7, %xmm0 - subl %edx, %eax - cvtsi2sd %eax, %xmm8 - movq __libm_logf_table_256@GOTPCREL(%rip), %r10 - mulsd .L_2il0floatpacket.3(%rip), %xmm8 - movsd (%r10,%rdi,8), %xmm9 - movsd %xmm4, -32(%rsp) - movsd %xmm6, -24(%rsp) - subsd (%r10,%r8,8), %xmm9 - addsd %xmm8, %xmm9 - addsd %xmm9, %xmm0 - mulsd .L_2il0floatpacket.4(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.12: - cmpl $2139095040, %eax - ja ..B1.17 -..B1.13: - cmpl $1065353216, %eax - jne ..B1.15 -..B1.14: - lea _ones(%rip), %rax - shrl $31, %edx - pxor %xmm1, %xmm1 - movss (%rax,%rdx,4), %xmm0 - divss %xmm1, %xmm0 - ret -..B1.15: - movss .L_2il0floatpacket.13(%rip), %xmm1 - pxor %xmm0, %xmm0 - mulss %xmm1, %xmm0 -..B1.16: - ret -..B1.17: - movss -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type atanhf,@function - .size atanhf,.-atanhf - .data -# -- End atanhf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x6890dd10,0x3fd5555a - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0xe7362feb,0xbfe00001 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0xfefa39ef,0x3fe62e42 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x1c66784b,0x3fc717fd - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xdc2b5888,0x3fb8b0df - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x5a00faf0,0x3fbc8408 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x9016c8e5,0x3fc9999c - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x10091234,0xbf68c8ed - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x64e392ec,0x3fb67c91 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0xb0fd5c67,0x3fc248ae - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x51abeffb,0x3fd55555 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.16: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,8 - .align 4 -.L_2il0floatpacket.13: - .long 0x7f800000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,4 - .align 4 -.L_2il0floatpacket.14: - .long 0x0d800000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,4 - .align 4 -.L_2il0floatpacket.15: - .long 0x3f800000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanhl.S deleted file mode 100644 index c8b2dea87b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanhl.S +++ /dev/null @@ -1,966 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanhl.c" - .text -..TXTST0: -# -- Begin atanhl - .text - .align 16,0x90 - .globl atanhl -atanhl: -# parameter 1: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_atanhl.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - xorb %cl, %cl -..B1.2: - fnstcw 50(%rsp) -..B1.3: - movzwl 72(%rsp), %esi - andl $32767, %esi - movzwl 50(%rsp), %eax - cmpl $16383, %esi - jge ..B1.53 -..B1.4: - cmpl $16381, %esi - jge ..B1.46 -..B1.5: - cmpl $16376, %esi - jge ..B1.39 -..B1.6: - cmpl $16371, %esi - jge ..B1.32 -..B1.7: - cmpl $16365, %esi - jge ..B1.25 -..B1.8: - cmpl $16308, %esi - jge ..B1.18 -..B1.9: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.13 -..B1.10: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.11: - fldcw 48(%rsp) -..B1.12: - movzwl 72(%rsp), %esi - movb $1, %cl - andl $32767, %esi -..B1.13: - testl %esi, %esi - jle ..B1.64 -..B1.14: - fldt 64(%rsp) - lea _TWO_75(%rip), %rax - lea 8+_TWO_75(%rip), %rdx - fldl (%rax) - fmul %st(1), %st - faddp %st, %st(1) - fmull (%rdx) - fstpt (%rsp) -..B1.15: - testb %cl, %cl - je ..B1.17 -..B1.16: - fldcw 50(%rsp) -..B1.17: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.18: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.22 -..B1.19: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.20: - fldcw 48(%rsp) -..B1.21: - movb $1, %cl -..B1.22: - fldt 64(%rsp) - lea _Q3(%rip), %rax - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.24 -..B1.23: - fldcw 50(%rsp) -..B1.24: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.25: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.29 -..B1.26: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.27: - fldcw 48(%rsp) -..B1.28: - movb $1, %cl -..B1.29: - fldt 64(%rsp) - lea 16+_Q2(%rip), %rax - fld %st(0) - lea _Q2(%rip), %rdx - fmul %st(1), %st - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.31 -..B1.30: - fldcw 50(%rsp) -..B1.31: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.32: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.36 -..B1.33: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.34: - fldcw 48(%rsp) -..B1.35: - movb $1, %cl -..B1.36: - fldt 64(%rsp) - lea 48+_Q1(%rip), %rax - fld %st(0) - lea 32+_Q1(%rip), %rsi - fmul %st(1), %st - lea 16+_Q1(%rip), %rdx - fld %st(0) - lea _Q1(%rip), %rdi - fmul %st(1), %st - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.38 -..B1.37: - fldcw 50(%rsp) -..B1.38: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.39: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.43 -..B1.40: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.41: - fldcw 48(%rsp) -..B1.42: - movb $1, %cl -..B1.43: - fldt 64(%rsp) - lea _TWO_52H(%rip), %rax - lea 176+_Q(%rip), %rdx - lea 144+_Q(%rip), %rsi - lea 112+_Q(%rip), %rdi - lea 80+_Q(%rip), %r8 - lea 48+_Q(%rip), %r9 - lea 160+_Q(%rip), %r11 - fldl (%rax) - lea 16+_Q(%rip), %r10 - fmul %st(1), %st - lea 128+_Q(%rip), %rax - fld %st(0) - testb %cl, %cl - fadd %st(2), %st - fsubp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fld %st(1) - fmul %st(1), %st - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fmul %st(0), %st - fld %st(0) - fadd %st(3), %st - fmul %st, %st(2) - fld %st(1) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - fmul %st(0), %st - fld %st(0) - fadd %st(3), %st - fldt (%rdx) - fmul %st(1), %st - lea 96+_Q(%rip), %rdx - fldt (%rsi) - lea 64+_Q(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - lea 32+_Q(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - lea _Q(%rip), %r8 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - lea 208+_Q(%rip), %r9 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - lea 192+_Q(%rip), %r10 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - lea _TWO_48H(%rip), %r11 - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r8) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt (%r9) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(2) - fldt (%r10) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 32(%rsp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fldt 16(%rsp) - fld %st(0) - fldl (%r11) - fadd %st, %st(3) - fsubrp %st, %st(3) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fldt 64(%rsp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(2) - fldt (%rsp) - fmul %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.45 -..B1.44: - fldcw 50(%rsp) -..B1.45: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.46: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.50 -..B1.47: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.48: - fldcw 48(%rsp) -..B1.49: - movb $1, %cl -..B1.50: - fldt 64(%rsp) - lea _ones(%rip), %rdi - movb 73(%rsp), %sil - lea _TWO_48H(%rip), %r8 - andb $-128, %sil - shrb $7, %sil - fldl (%rdi) - fld %st(0) - fld %st(1) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fldl (%r8) - movzbl %sil, %edx - lea 48+_P(%rip), %r8 - movzwl 24(%rsp), %r10d - andl $-32768, %r10d - fxch %st(4) - fmull (%rdi,%rdx,8) - lea 80+_P(%rip), %rdi - fsubr %st, %st(2) - fld %st(2) - fmul %st(5), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fsubr %st(2), %st - fsub %st(1), %st - fld %st(3) - fadd %st(1), %st - fxch %st(2) - fadd %st, %st(5) - fld %st(5) - fmul %st(7), %st - fadd %st, %st(6) - fsubrp %st, %st(6) - fxch %st(5) - fstpt (%rsp) - fldt (%rsp) - fsubr %st(3), %st - faddp %st, %st(5) - fld %st(1) - fdivr %st(3), %st - fmul %st, %st(6) - fld %st(0) - fadd %st(7), %st - fsubp %st, %st(7) - fxch %st(1) - fmul %st(6), %st - fld %st(1) - fsub %st(7), %st - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(4) - fmul %st(6), %st - fsubrp %st, %st(3) - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fldt (%rsp) - fadd %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 64(%rsp) - fldt (%rdi) - lea 32+_P(%rip), %rdi - fldt (%r8) - lea _P(%rip), %r8 - movzwl 72(%rsp), %esi - andl $32767, %esi - movl %esi, %r9d - addl $-16383, %esi - negl %r9d - addl $-2, %r9d - andl $32767, %r9d - orl %r9d, %r10d - movw %r10w, 24(%rsp) - lea 8+_ones(%rip), %r10 - fldt 16(%rsp) - movl 68(%rsp), %r11d - shrl $23, %r11d - fmul %st, %st(3) - fmulp %st, %st(4) - movzbl %r11b, %eax - lea 16+_P(%rip), %r11 - movq __libm_rcp_table_256@GOTPCREL(%rip), %r9 - movl %esi, 32(%rsp) - lea 64+_P(%rip), %rsi - fildl 32(%rsp) - fxch %st(3) - fmuls (%r9,%rax,4) - fxch %st(4) - fmuls (%r9,%rax,4) - fxch %st(4) - faddl (%r10) - fld %st(0) - shlq $4, %rax - fadd %st(5), %st - fld %st(0) - testb %cl, %cl - fmul %st(1), %st - fmul %st, %st(4) - movq __libm_logl_table_256@GOTPCREL(%rip), %r9 - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%r11) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - fldt (%rsi) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.0(%rip) - fmul %st(2), %st - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(3) - faddl 8(%r9,%rax) - faddp %st, %st(3) - fxch %st(1) - faddl (%rax,%r9) - lea halfs(%rip), %rax - faddp %st, %st(1) - faddp %st, %st(1) - fmull (%rax,%rdx,8) - fstpt (%rsp) - je ..B1.52 -..B1.51: - fldcw 50(%rsp) -..B1.52: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.53: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.57 -..B1.54: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.55: - fldcw 48(%rsp) -..B1.56: - movzwl 72(%rsp), %esi - movb $1, %cl - andl $32767, %esi -..B1.57: - cmpl $32767, %esi - jl ..B1.68 -..B1.58: - cmpl $-2147483648, 68(%rsp) - jne ..B1.60 -..B1.59: - cmpl $0, 64(%rsp) - je ..B1.68 -..B1.60: - fldt 64(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.61: - testb %cl, %cl - je ..B1.63 -..B1.62: - fldcw 50(%rsp) -..B1.63: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.64: - cmpl $0, 68(%rsp) - jne ..B1.66 -..B1.65: - cmpl $0, 64(%rsp) - je ..B1.67 -..B1.66: - fldt 64(%rsp) - lea _small_value_80(%rip), %rsi - movb 73(%rsp), %al - andb $-128, %al - shrb $7, %al - fldt (%rsi) - movzbl %al, %edx - shlq $4, %rdx - fldt (%rsi,%rdx) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.67: - fldt 64(%rsp) - fstpt (%rsp) - jmp ..B1.15 -..B1.68: - cmpl $16383, %esi - jne ..B1.72 -..B1.69: - cmpl $-2147483648, 68(%rsp) - jne ..B1.72 -..B1.70: - cmpl $0, 64(%rsp) - jne ..B1.72 -..B1.71: - movb 73(%rsp), %al - lea _ones(%rip), %rdx - andb $-128, %al - lea _zeros(%rip), %rdi - shrb $7, %al - movzbl %al, %esi - movsd (%rdx,%rsi,8), %xmm0 - divsd (%rdi), %xmm0 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fstpt (%rsp) - jmp ..B1.61 -..B1.72: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fstpt (%rsp) - jmp ..B1.61 - .align 16,0x90 - .cfi_endproc - .type atanhl,@function - .size atanhl,.-atanhl - .data -# -- End atanhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -halfs: - .long 0x00000000,0x3fe00000 - .long 0x00000000,0xbfe00000 - .type halfs,@object - .size halfs,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_Q3: - .word 43691 - .word 45330 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 33124 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 58478 - .word 29023 - .word 52648 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 43686 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 5258 - .word 52447 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 10439 - .word 34405 - .word 9349 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 25253 - .word 49895 - .word 32943 - .word 58261 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 43101 - .word 43690 - .word 43690 - .word 43690 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 4657 - .word 52441 - .word 52428 - .word 52428 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 42633 - .word 18723 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 11223 - .word 36719 - .word 14563 - .word 58254 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 64465 - .word 27664 - .word 35746 - .word 47662 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 6969 - .word 8211 - .word 55486 - .word 40329 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 15522 - .word 40807 - .word 33480 - .word 34952 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 44124 - .word 7207 - .word 21918 - .word 61682 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 13236 - .word 62073 - .word 35694 - .word 55158 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 859 - .word 55468 - .word 55479 - .word 50356 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 19186 - .word 33607 - .word 822 - .word 41715 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 51623 - .word 9477 - .word 49456 - .word 61855 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52416 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,224 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,96 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanl.S deleted file mode 100644 index 8ea00fdc5a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanl.S +++ /dev/null @@ -1,745 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanl.c" - .text -..TXTST0: -# -- Begin atanl - .text - .align 16,0x90 - .globl atanl -atanl: -# parameter 1: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_atanl.1: -..L2: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %cl, %cl -..B1.2: - fnstcw 74(%rsp) -..B1.3: - movzbl 105(%rsp), %edx - movzwl 104(%rsp), %edi - andl $128, %edx - andl $32767, %edi - shrl $7, %edx - movzwl 74(%rsp), %eax - cmpl $16394, %edi - jge ..B1.48 -..B1.4: - cmpl $16376, %edi - jge ..B1.38 -..B1.5: - cmpl $16371, %edi - jge ..B1.31 -..B1.6: - cmpl $16365, %edi - jge ..B1.24 -..B1.7: - cmpl $16308, %edi - jge ..B1.17 -..B1.8: - movl %eax, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.12 -..B1.9: - orl $-64768, %eax - movw %ax, 72(%rsp) -..B1.10: - fldcw 72(%rsp) -..B1.11: - movzwl 104(%rsp), %edi - movb $1, %cl - andl $32767, %edi -..B1.12: - testl %edi, %edi - jle ..B1.64 -..B1.13: - fldt 96(%rsp) - lea _TWO_75(%rip), %rax - lea 8+_TWO_75(%rip), %rdx - fldl (%rax) - fmul %st(1), %st - fsubp %st, %st(1) - fmull (%rdx) - fstpt (%rsp) -..B1.14: - testb %cl, %cl - je ..B1.16 -..B1.15: - fldcw 74(%rsp) -..B1.16: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.17: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.21 -..B1.18: - orl $-64768, %eax - movw %ax, 72(%rsp) -..B1.19: - fldcw 72(%rsp) -..B1.20: - movb $1, %cl -..B1.21: - fldt 96(%rsp) - lea _P2(%rip), %rax - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.23 -..B1.22: - fldcw 74(%rsp) -..B1.23: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.24: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.28 -..B1.25: - orl $-64768, %eax - movw %ax, 72(%rsp) -..B1.26: - fldcw 72(%rsp) -..B1.27: - movb $1, %cl -..B1.28: - fldt 96(%rsp) - lea 16+_P1(%rip), %rax - fld %st(0) - lea _P1(%rip), %rdx - fmul %st(1), %st - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.30 -..B1.29: - fldcw 74(%rsp) -..B1.30: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.31: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.35 -..B1.32: - orl $-64768, %eax - movw %ax, 72(%rsp) -..B1.33: - fldcw 72(%rsp) -..B1.34: - movb $1, %cl -..B1.35: - fldt 96(%rsp) - lea 48+_P(%rip), %rax - fld %st(0) - lea 32+_P(%rip), %rsi - fmul %st(1), %st - lea 16+_P(%rip), %rdx - fld %st(0) - lea _P(%rip), %rdi - fmul %st(1), %st - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.37 -..B1.36: - fldcw 74(%rsp) -..B1.37: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.38: - movl %eax, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.42 -..B1.39: - orl $-64768, %eax - movw %ax, 72(%rsp) -..B1.40: - fldcw 72(%rsp) -..B1.41: - movb $1, %cl -..B1.42: - fldt 96(%rsp) - lea ones(%rip), %rax - movl %edx, %edx - lea _TWO_63H(%rip), %rsi - fldl (%rax,%rdx,8) - fmul %st, %st(1) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - movzwl 104(%rsp), %edi - andl $32767, %edi - fxch %st(1) - fstpl 64(%rsp) - cmpl $16383, %edi - fldl (%rsi) - jge ..B1.44 -..B1.43: - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_48H(%rip), %rax - fmul %st(2), %st - fadd %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fld %st(2) - fld %st(3) - fld %st(4) - movl 16(%rsp), %edx - fxch %st(4) - fsubrp %st, %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - fldl (%rax) - fmul %st, %st(2) - fxch %st(2) - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(2) - fmul %st, %st(4) - fld %st(1) - fmul %st(4), %st - fxch %st(1) - fmulp %st, %st(3) - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.2(%rip) - fadd %st, %st(3) - fldt .L_2il0floatpacket.3(%rip) - fstpt (%rsp) - jmp ..B1.45 -..B1.44: - fldt .L_2il0floatpacket.2(%rip) - fld %st(2) - fdivrp %st, %st(1) - lea _TWO_48H(%rip), %rax - fld %st(2) - fldt .L_2il0floatpacket.0(%rip) - fmulp %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(2) - fld %st(2) - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(3) - fldl (%rax) - fmul %st, %st(2) - movl 16(%rsp), %edx - fxch %st(1) - fadd %st(2), %st - negl %edx - fsubp %st, %st(2) - fld %st(1) - addl $256, %edx - fmul %st(3), %st - fld %st(2) - fadd %st(4), %st - fxch %st(3) - fsubr %st, %st(5) - fld %st(5) - fmul %st(5), %st - fldt .L_2il0floatpacket.3(%rip) - fstpt (%rsp) - fldt (%rsp) - faddp %st, %st(3) - fld %st(3) - fmul %st(5), %st - fadd %st, %st(5) - fsubrp %st, %st(5) - fxch %st(1) - fsubr %st(4), %st - fsubrp %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fldt .L_2il0floatpacket.2(%rip) -..B1.45: - fld %st(3) - lea 48+_P(%rip), %rax - lea 32+_P(%rip), %rdi - lea 16+_P(%rip), %rsi - lea _P(%rip), %r8 - lea _TWO_32H(%rip), %r9 - movslq %edx, %rdx - fadd %st(6), %st - fdivrp %st, %st(1) - fmul %st, %st(2) - fld %st(2) - shlq $4, %rdx - fadd %st(1), %st - movq __libm_atanl_table_128@GOTPCREL(%rip), %r10 - testb %cl, %cl - fsubp %st, %st(3) - fld %st(2) - fsubr %st(1), %st - fld %st(4) - fmul %st(4), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(1) - fmul %st, %st(5) - fxch %st(7) - faddp %st, %st(5) - fxch %st(3) - fstpt 48(%rsp) - fldt (%rsp) - faddp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - fmul %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fldt 48(%rsp) - fmulp %st, %st(2) - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fstpt 96(%rsp) - fldt 96(%rsp) - fldt (%rax) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - fmulp %st, %st(4) - fldt (%r8) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(2) - fldl (%r10,%rdx) - fld %st(0) - fadd %st(2), %st - fldl (%r9) - fmul %st(1), %st - fadd %st, %st(1) - fsubr %st(1), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - faddl 8(%r10,%rdx) - faddp %st, %st(1) - faddp %st, %st(1) - fmull 64(%rsp) - fstpt 32(%rsp) - je ..B1.74 -..B1.46: - fstpt 16(%rsp) -..B1.73: - fldcw 74(%rsp) - jmp ..B1.47 -..B1.74: - fstp %st(0) -..B1.47: - fldt 32(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.48: - movl %eax, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.52 -..B1.49: - orl $-64768, %eax - movw %ax, 72(%rsp) -..B1.50: - fldcw 72(%rsp) -..B1.51: - movzwl 104(%rsp), %edi - movb $1, %cl - andl $32767, %edi -..B1.52: - cmpl $32767, %edi - je ..B1.68 -..B1.53: - cmpl $16448, %edi - jge ..B1.60 -..B1.54: - fldt 96(%rsp) - xorl %esi, %esi - testl %edx, %edx - lea ones(%rip), %rdi - sete %sil - fdivrl (%rdi,%rsi,8) - fstpt 96(%rsp) - fldt 96(%rsp) - movzwl 104(%rsp), %eax - andl $32767, %eax - fstpt (%rsp) - cmpl $16398, %eax - jge ..B1.56 -..B1.55: - fldt (%rsp) - lea 16+_P1(%rip), %rax - fld %st(0) - lea _P1(%rip), %rsi - fmul %st(1), %st - fldt (%rax) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - jmp ..B1.59 -..B1.56: - cmpl $16408, %eax - jge ..B1.59 -..B1.57: - fldt (%rsp) - lea _P2(%rip), %rax - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) -..B1.59: - fldt .L_2il0floatpacket.4(%rip) - fldt (%rsp) - movl %edx, %edx - faddp %st, %st(1) - fldt .L_2il0floatpacket.5(%rip) - faddp %st, %st(1) - fmull (%rdi,%rdx,8) - fstpt (%rsp) - jmp ..B1.61 -..B1.60: - movl %edx, %edx - lea _pi_2l(%rip), %rax - shlq $4, %rdx - lea _small_value_80(%rip), %rsi - fldt (%rdx,%rax) - fldt (%rdx,%rsi) - fsubrp %st, %st(1) - fstpt (%rsp) -..B1.61: - testb %cl, %cl - je ..B1.63 -..B1.62: - fldcw 74(%rsp) -..B1.63: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.64: - cmpl $0, 100(%rsp) - jne ..B1.66 -..B1.65: - cmpl $0, 96(%rsp) - je ..B1.67 -..B1.66: - fldt 96(%rsp) - lea _small_value_80(%rip), %rax - shlq $4, %rdx - fldt (%rax) - fldt (%rax,%rdx) - fmulp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.14 -..B1.67: - fldt 96(%rsp) - fstpt (%rsp) - jmp ..B1.14 -..B1.68: - cmpl $-2147483648, 100(%rsp) - jne ..B1.70 -..B1.69: - cmpl $0, 96(%rsp) - je ..B1.53 -..B1.70: - fldt 96(%rsp) - fstpt (%rsp) - jmp ..B1.61 - .align 16,0x90 - .cfi_endproc - .type atanl,@function - .size atanl,.-atanl - .data -# -- End atanl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x88,0x19,0x13,0xd3,0x08,0xa3,0x85,0xdd,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0xa2,0xda,0x0f,0xc9,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_P2: - .word 43691 - .word 41642 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 0 - .word 0 - .type _P2,@object - .size _P2,16 - .align 2 -_P1: - .word 23723 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 22830 - .word 33705 - .word 52154 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,32 - .align 2 -_P: - .word 43664 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 43235 - .word 52379 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59507 - .word 38278 - .word 9340 - .word 37449 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 9132 - .word 55602 - .word 8665 - .word 58245 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,64 - .align 2 -_pi_2l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49151 - .word 0 - .word 0 - .word 0 - .type _pi_2l,@object - .size _pi_2l,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanl_table.S deleted file mode 100644 index 5127afbea7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/atanl_table.S +++ /dev/null @@ -1,1073 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "atanl_table.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __libm_atanl_table_128 -__libm_atanl_table_128: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x55c00000,0x3f7fffd5 - .long 0x4bfcee57,0xbd5115a3 - .long 0x5bc00000,0x3f8fff55 - .long 0x220c39d5,0xbd623595 - .long 0x18800000,0x3f97fee0 - .long 0x286313f8,0xbdaad1e5 - .long 0xbb800000,0x3f9ffd55 - .long 0x542779d7,0x3da4bb12 - .long 0xf1600000,0x3fa3fd65 - .long 0x2e4614e3,0x3d9393b2 - .long 0x84400000,0x3fa7fb81 - .long 0x0c377c7c,0xbd9e4bac - .long 0xf1400000,0x3fabf8dd - .long 0x89fe34b3,0xbd88eef1 - .long 0xb7400000,0x3faff55b - .long 0x39269b0e,0xbda30216 - .long 0xbf000000,0x3fb1f86d - .long 0xbda88e23,0x3da05ab1 - .long 0x0e800000,0x3fb3f59f - .long 0xa7663af4,0xbd8d5314 - .long 0x4fc00000,0x3fb5f232 - .long 0x62a36910,0x3db2d7b2 - .long 0x26000000,0x3fb7ee18 - .long 0x6093567e,0x3d878874 - .long 0x53c00000,0x3fb9e941 - .long 0xd19970eb,0x3dafb9e2 - .long 0xbe400000,0x3fbbe39e - .long 0xbef71e53,0x3dc783e1 - .long 0x70400000,0x3fbddd21 - .long 0xcd620065,0xbdc0a2c8 - .long 0x9ac00000,0x3fbfd5ba - .long 0x39a6ed0d,0xbdb3d092 - .long 0xcce00000,0x3fc0e6ad - .long 0x8a397391,0x3dc40881 - .long 0xfb000000,0x3fc1e1fa - .long 0x92de9bad,0x3da0dc9b - .long 0xb3000000,0x3fc2dcbd - .long 0x386bc7d5,0xbda17803 - .long 0xe8c00000,0x3fc3d6ee - .long 0x61a3b0cf,0x3da989b1 - .long 0xa9c00000,0x3fc4d087 - .long 0x47cc8fc7,0x3dca4f17 - .long 0x1e400000,0x3fc5c981 - .long 0x0a956580,0xbd83d962 - .long 0x89800000,0x3fc6c1d4 - .long 0xb5aad628,0x3db267b1 - .long 0x4c000000,0x3fc7b97b - .long 0xecb84f4b,0xbdd8d27e - .long 0xe2800000,0x3fc8b06e - .long 0xee732cfd,0x3dae70a2 - .long 0xe9400000,0x3fc9a6a8 - .long 0x0e7b00f4,0x3dd64313 - .long 0x1b400000,0x3fca9c23 - .long 0xd177d13a,0x3d593ca1 - .long 0x52c00000,0x3fcb90d7 - .long 0xfdd09de6,0xbdd6cfae - .long 0x8a800000,0x3fcc84bf - .long 0x656f741a,0xbdb7a324 - .long 0xdf400000,0x3fcd77d5 - .long 0x8e6dcbab,0xbdcfa8c9 - .long 0x8e800000,0x3fce6a14 - .long 0x619ac881,0x3dc6ec4d - .long 0xf9400000,0x3fcf5b75 - .long 0x9d52470c,0xbdc37f22 - .long 0x51200000,0x3fd025fa - .long 0x59cb7da1,0xbdd99a4a - .long 0x97c00000,0x3fd09dc5 - .long 0x58b91ce4,0x3dd86362 - .long 0x36200000,0x3fd1151a - .long 0xb2372370,0x3db0c726 - .long 0xa3200000,0x3fd18bf5 - .long 0xd9e6b717,0xbdd40e87 - .long 0x67e00000,0x3fd20255 - .long 0x73e6e6b8,0x3db1f257 - .long 0x20400000,0x3fd27837 - .long 0xbe20c8b2,0x3dd7ef45 - .long 0x7a800000,0x3fd2ed98 - .long 0xb91258ea,0x3da1e7f1 - .long 0x37000000,0x3fd36277 - .long 0x34e2d5da,0x3dbfaf2f - .long 0x29400000,0x3fd3d6d1 - .long 0xbb20d6f9,0xbdd8eecb - .long 0x36c00000,0x3fd44aa4 - .long 0x45437875,0x3da5784d - .long 0x58600000,0x3fd4bdee - .long 0x86c8e20f,0x3dc121cd - .long 0x99400000,0x3fd530ad - .long 0xdb5336ff,0x3dd1cd49 - .long 0x17400000,0x3fd5a2e0 - .long 0x44edea3e,0x3dde0f4e - .long 0x03000000,0x3fd61484 - .long 0x2c6d4754,0x3dc39fc3 - .long 0x9f400000,0x3fd68597 - .long 0xf6d43f59,0x3ddfa6fd - .long 0x41c00000,0x3fd6f619 - .long 0x4738aa32,0x3de26f78 - .long 0x52800000,0x3fd76607 - .long 0x11774372,0x3d97501f - .long 0x4b400000,0x3fd7d560 - .long 0xad3910b8,0x3de1d9fb - .long 0xb9000000,0x3fd84422 - .long 0x4512bfad,0xbde03514 - .long 0x39400000,0x3fd8b24d - .long 0xdb685d1c,0x3dc4364a - .long 0x7cc00000,0x3fd91fde - .long 0x441d0620,0x3dd0c662 - .long 0x45400000,0x3fd98cd5 - .long 0xcf364c48,0x3dcad630 - .long 0x66000000,0x3fd9f930 - .long 0x8df63ee1,0x3dd68001 - .long 0xc3c00000,0x3fda64ee - .long 0x6d909f25,0x3dc847f9 - .long 0x54400000,0x3fdad00f - .long 0x80ecf31e,0xbdddfa74 - .long 0x1dc00000,0x3fdb3a91 - .long 0x9479e139,0xbdd9a393 - .long 0x37800000,0x3fdba473 - .long 0x519a1b47,0x3db89295 - .long 0xc9400000,0x3fdc0db4 - .long 0x19f18c7b,0x3dcd93df - .long 0x0ac00000,0x3fdc7655 - .long 0x5d2e2ffe,0xbdd28e07 - .long 0x43000000,0x3fdcde53 - .long 0x4ba60b78,0x3de609a8 - .long 0xca000000,0x3fdd45ae - .long 0xced7bdd4,0xbdd379d4 - .long 0x05800000,0x3fddac67 - .long 0x97520377,0xbdde44b0 - .long 0x6b000000,0x3fde127b - .long 0xb53d9e72,0x3dbd12bf - .long 0x7f400000,0x3fde77eb - .long 0xde35847d,0xbde452e5 - .long 0xd4400000,0x3fdedcb6 - .long 0xf25d8cc2,0xbd7ef2c7 - .long 0x0b800000,0x3fdf40dd - .long 0x1a3992dc,0xbde5f5f4 - .long 0xd3400000,0x3fdfa45d - .long 0xb94ac7b8,0xbdeeb6d3 - .long 0x73e00000,0x3fe0039c - .long 0x6ccb2527,0xbdee5bf4 - .long 0x09400000,0x3fe034b7 - .long 0xce0c98e5,0xbdeafb77 - .long 0x94e00000,0x3fe0657e - .long 0xeada4afb,0xbdc33cc0 - .long 0x08600000,0x3fe095f3 - .long 0xdbc9bebd,0x3daa58fd - .long 0x5b600000,0x3fe0c614 - .long 0xcd160bd9,0xbdc2f097 - .long 0x8b600000,0x3fe0f5e2 - .long 0x004c46c6,0x3dcf8a54 - .long 0x9be00000,0x3fe1255d - .long 0xf6a1288f,0x3debd2a8 - .long 0x96400000,0x3fe15485 - .long 0xa5d3e2a4,0xbdd1372c - .long 0x88c00000,0x3fe1835a - .long 0xe778c500,0xbda83ec8 - .long 0x87800000,0x3fe1b1dc - .long 0xede17375,0x3de04284 - .long 0xabe00000,0x3fe1e00b - .long 0xc946f944,0xbda014c0 - .long 0x13e00000,0x3fe20de8 - .long 0x43714561,0x3dd04763 - .long 0xe2c00000,0x3fe23b71 - .long 0x3884393e,0x3dd93cd4 - .long 0x40800000,0x3fe268a9 - .long 0xf1765bb0,0xbde69259 - .long 0x59400000,0x3fe2958e - .long 0x4279cec3,0xbddee39e - .long 0x5e000000,0x3fe2c221 - .long 0xd68fde4c,0x3db2232f - .long 0x84000000,0x3fe2ee62 - .long 0xc5d5e9ff,0x3dcb2f29 - .long 0x04a00000,0x3fe31a52 - .long 0xafcd51e1,0xbde78b41 - .long 0x1ce00000,0x3fe345f0 - .long 0xbbf7bb21,0xbde1c844 - .long 0x0e000000,0x3fe3713d - .long 0x14f789e0,0xbdd275f8 - .long 0x1ce00000,0x3fe39c39 - .long 0x9182198f,0xbdd7d1cc - .long 0x91c00000,0x3fe3c6e4 - .long 0x1ebaf6b0,0x3dce3712 - .long 0xb8a00000,0x3fe3f13f - .long 0x260e96db,0xbda690bc - .long 0xe0800000,0x3fe41b4a - .long 0xec29f5ad,0xbde015be - .long 0x5b800000,0x3fe44506 - .long 0xfbb680b2,0xbdca92a8 - .long 0x7f000000,0x3fe46e72 - .long 0x39b9b1b8,0xbdab8ea1 - .long 0xa3200000,0x3fe4978f - .long 0x920cd440,0x3dca7b84 - .long 0x22e00000,0x3fe4c05e - .long 0x02b07c28,0xbda6b1b7 - .long 0x5ba00000,0x3fe4e8de - .long 0x528cf6fb,0x3de6ec04 - .long 0xadc00000,0x3fe51110 - .long 0x91ee6b42,0x3dc7b604 - .long 0x7b800000,0x3fe538f5 - .long 0x72245aa1,0x3dd20c3d - .long 0x29c00000,0x3fe5608d - .long 0x9939cf0e,0x3dcc30d1 - .long 0x1f800000,0x3fe587d8 - .long 0x57972763,0xbdd9a08a - .long 0xc5800000,0x3fe5aed6 - .long 0x5cc4bdc5,0x3de09517 - .long 0x87000000,0x3fe5d589 - .long 0x10028e4c,0x3de69b18 - .long 0xd0c00000,0x3fe5fbf0 - .long 0xf2598180,0x3de5cc49 - .long 0x11400000,0x3fe6220d - .long 0xed487acb,0x3ded7b8d - .long 0xb8c00000,0x3fe647de - .long 0xf84d7eff,0x3df105c7 - .long 0x39400000,0x3fe66d66 - .long 0x2dd4dfd8,0xbdec1f79 - .long 0x05400000,0x3fe692a4 - .long 0x7652e56a,0x3de6fb6a - .long 0x92000000,0x3fe6b798 - .long 0x2bfe3cf4,0x3dd67b31 - .long 0x55000000,0x3fe6dc44 - .long 0xf203bce5,0x3de553ae - .long 0xc5800000,0x3fe700a7 - .long 0xc61a692d,0xbdcee730 - .long 0x5b400000,0x3fe724c3 - .long 0x1948b32e,0x3ddf5cf6 - .long 0x8f800000,0x3fe74897 - .long 0x82f654c3,0x3dfd4707 - .long 0xdcc00000,0x3fe76c24 - .long 0x1952551b,0x3dcb1b01 - .long 0xbd400000,0x3fe78f6b - .long 0x501a8226,0x3ded315e - .long 0xad400000,0x3fe7b26c - .long 0x73a037cc,0xbde1af02 - .long 0x28c00000,0x3fe7d528 - .long 0x553efbc4,0xbdf02fb6 - .long 0xacc00000,0x3fe7f79e - .long 0x02a357f1,0xbdca1d9e - .long 0xb7400000,0x3fe819d0 - .long 0x9bf7622a,0xbdf53ad9 - .long 0xc6000000,0x3fe83bbe - .long 0xf677c77e,0xbdf908ee - .long 0x57800000,0x3fe85d69 - .long 0xe9499180,0xbde33d3a - .long 0xeb000000,0x3fe87ed0 - .long 0xef50a527,0xbdf1d2ea - .long 0xff800000,0x3fe89ff5 - .long 0x2ab734bc,0xbdf40704 - .long 0x14400000,0x3fe8c0d9 - .long 0x6fa901db,0x3decf49d - .long 0xa9800000,0x3fe8e17a - .long 0xc27cfaaa,0x3decc05d - .long 0x3ec00000,0x3fe901db - .long 0xad0ccbcb,0x3df778c3 - .long 0x54400000,0x3fe921fb - .long 0x1a626331,0x3dc0b461 - .long 0x69800000,0x3fe9421b - .long 0x33179a03,0x3de968a9 - .long 0xff000000,0x3fe9627b - .long 0x354bc911,0xbde4662d - .long 0x94400000,0x3fe9831d - .long 0xe277d043,0xbde49a6c - .long 0xa9000000,0x3fe9a400 - .long 0x714fcd89,0x3df8341c - .long 0xbdc00000,0x3fe9c525 - .long 0x942d841a,0xbde3fff9 - .long 0x51000000,0x3fe9e68d - .long 0x767ac319,0x3deb976b - .long 0xe2c00000,0x3fea0837 - .long 0x177cfdb1,0xbdc64fc6 - .long 0xf1800000,0x3fea2a25 - .long 0x75c01427,0xbdda6038 - .long 0xfbc00000,0x3fea4c57 - .long 0x1bb40f2a,0x3dddc330 - .long 0x80000000,0x3fea6ece - .long 0xc850d6e0,0xbde74662 - .long 0xfb400000,0x3fea9189 - .long 0x00d16965,0x3dea0933 - .long 0xeb000000,0x3feab48a - .long 0x1e8b57b9,0x3df59469 - .long 0xcbc00000,0x3fead7d1 - .long 0x6dc9c51f,0x3da93704 - .long 0x18c00000,0x3feafb5f - .long 0x0e891026,0x3ddb9843 - .long 0x4d400000,0x3feb1f33 - .long 0xfdcc9ff9,0xbdcd5129 - .long 0xe3400000,0x3feb434e - .long 0xa0a41a0e,0xbdf7f601 - .long 0x53800000,0x3feb67b2 - .long 0xc9a51699,0xbdd9f2fc - .long 0x16800000,0x3feb8c5e - .long 0x466f670a,0xbdb71b40 - .long 0xa3400000,0x3febb152 - .long 0xd24367a3,0xbddd4273 - .long 0x6f800000,0x3febd690 - .long 0x44f9ee90,0xbdeb8656 - .long 0xef800000,0x3febfc17 - .long 0x4e4b19cd,0x3df32750 - .long 0x97400000,0x3fec21e9 - .long 0x60174932,0xbde5215d - .long 0xd7c00000,0x3fec4805 - .long 0xca509fcf,0xbddae432 - .long 0x21800000,0x3fec6e6d - .long 0x05a2b966,0xbddc81cf - .long 0xe2c00000,0x3fec951f - .long 0x983639ea,0x3dfbe28c - .long 0x89000000,0x3fecbc1e - .long 0xb8fcc54a,0x3de52a75 - .long 0x7ec00000,0x3fece369 - .long 0x6e2bdd53,0x3da4dfc2 - .long 0x2d000000,0x3fed0b01 - .long 0x7c1f76fe,0xbd957dc5 - .long 0xfac00000,0x3fed32e5 - .long 0x45acb642,0x3db3657b - .long 0x4cc00000,0x3fed5b18 - .long 0x3aa43a9e,0x3de16e2c - .long 0x85c00000,0x3fed8398 - .long 0x02a3c6a5,0xbde63ab4 - .long 0x05800000,0x3fedac67 - .long 0x97520377,0xbdee44b0 - .long 0x29800000,0x3fedd584 - .long 0x41999968,0x3dd42635 - .long 0x4d000000,0x3fedfef0 - .long 0x983da38a,0x3dddfdb5 - .long 0xc8400000,0x3fee28ab - .long 0x43526c5d,0xbdf3c808 - .long 0xf0000000,0x3fee52b6 - .long 0xb06de4fa,0xbde63cc3 - .long 0x16c00000,0x3fee7d12 - .long 0xb04e7d93,0x3d998d80 - .long 0x8b800000,0x3feea7bd - .long 0x6af91f30,0x3dfa218b - .long 0x9a800000,0x3feed2b9 - .long 0x97acf689,0x3de1952c - .long 0x8bc00000,0x3feefe06 - .long 0xdb5c4d1a,0xbdc7762a - .long 0xa4000000,0x3fef29a4 - .long 0x017c85fc,0xbd6a8dc3 - .long 0x24800000,0x3fef5594 - .long 0xbbbb718e,0x3da8e661 - .long 0x4a800000,0x3fef81d5 - .long 0x497cd73d,0x3dc8572a - .long 0x4f400000,0x3fefae68 - .long 0xae6e18fa,0x3de7cbff - .long 0x68000000,0x3fefdb4d - .long 0x7ea78d48,0x3deeec8a - .long 0x62e00000,0x3ff00442 - .long 0x3c43ac1a,0xbdc110e6 - .long 0x4a400000,0x3ff01b07 - .long 0x75bc4774,0x3df01b3f - .long 0x7e400000,0x3ff031f5 - .long 0x4ce2d096,0x3df4adbe - .long 0x10800000,0x3ff0490d - .long 0x82c10772,0xbdcfa151 - .long 0x0fe00000,0x3ff0604e - .long 0x37517bd1,0x3dd3bc3a - .long 0x89200000,0x3ff077b8 - .long 0xe01b22eb,0x3de0f5c6 - .long 0x86600000,0x3ff08f4c - .long 0x34b7fb7b,0xbdf9bc3c - .long 0x0e800000,0x3ff0a70a - .long 0xc68f0ff4,0x3df03bcd - .long 0x26800000,0x3ff0bef1 - .long 0x403b5a47,0x3df68b2b - .long 0xd0000000,0x3ff0d701 - .long 0x57ba4ad6,0x3df35a50 - .long 0x09e00000,0x3ff0ef3c - .long 0x38183ba9,0xbde2d69f - .long 0xcfc00000,0x3ff1079f - .long 0xa4c23582,0xbdecaa57 - .long 0x1a600000,0x3ff1202d - .long 0xe7f15aff,0x3dcad893 - .long 0xdf800000,0x3ff138e3 - .long 0x19efe544,0x3dcc4411 - .long 0x11600000,0x3ff151c4 - .long 0xa76ac475,0x3dee5024 - .long 0x9f200000,0x3ff16acd - .long 0x0e8af659,0x3df44c0b - .long 0x74800000,0x3ff18400 - .long 0xa4ca4f57,0xbdba974c - .long 0x79800000,0x3ff19d5c - .long 0x5a25f72a,0x3dc2df62 - .long 0x92e00000,0x3ff1b6e1 - .long 0xd8da3354,0x3de77c88 - .long 0xa1c00000,0x3ff1d08f - .long 0xf49d1082,0x3de2171a - .long 0x83800000,0x3ff1ea66 - .long 0x7ce9b3be,0xbddb5eef - .long 0x11800000,0x3ff20466 - .long 0x1de424cc,0x3df8d09a - .long 0x22000000,0x3ff21e8e - .long 0x394b3186,0xbdef0ac7 - .long 0x86600000,0x3ff238de - .long 0x8bf7b8bf,0x3dc51f77 - .long 0x0cc00000,0x3ff25357 - .long 0x2bb7111b,0x3dfa95fd - .long 0x7f400000,0x3ff26df7 - .long 0x64b0a9b1,0xbdd1512a - .long 0xa3400000,0x3ff288bf - .long 0x18e684e8,0x3df12419 - .long 0x3ac00000,0x3ff2a3af - .long 0xce4f6ebe,0xbdb72e81 - .long 0x03000000,0x3ff2bec6 - .long 0xa69c6179,0xbdee5b5b - .long 0xb5000000,0x3ff2da03 - .long 0x6b22ae89,0x3deff6ff - .long 0x06000000,0x3ff2f568 - .long 0x29a8e5ae,0xbdecb362 - .long 0xa6000000,0x3ff310f2 - .long 0xd243f145,0x3de88f44 - .long 0x41600000,0x3ff32ca3 - .long 0xdff820e0,0x3de68034 - .long 0x7fa00000,0x3ff34879 - .long 0x5295ddf4,0x3dce7ebe - .long 0x03c00000,0x3ff36475 - .long 0x45f88767,0x3de5eab8 - .long 0x6c600000,0x3ff38095 - .long 0x91c711ec,0x3de886b1 - .long 0x53800000,0x3ff39cda - .long 0x10aefe1c,0x3dbb91fe - .long 0x4e800000,0x3ff3b943 - .long 0x4aa2e1c3,0xbdf356bb - .long 0xee000000,0x3ff3d5cf - .long 0x303c34f3,0xbdf0463a - .long 0xbe200000,0x3ff3f27f - .long 0x2b7ef915,0x3de411bd - .long 0x46a00000,0x3ff40f52 - .long 0x472305ef,0xbde8fd54 - .long 0x09e00000,0x3ff42c47 - .long 0x3560ce8b,0x3dfa68cb - .long 0x86a00000,0x3ff4495d - .long 0xacb59491,0xbdfdcdda - .long 0x35a00000,0x3ff46695 - .long 0xc6803028,0x3dcceec5 - .long 0x8c200000,0x3ff483ed - .long 0xae20cd3f,0x3dec628d - .long 0xfa600000,0x3ff4a165 - .long 0x30a5d59f,0xbdf4f20d - .long 0xeb800000,0x3ff4befd - .long 0xd1246921,0x3db30ba3 - .long 0xc6c00000,0x3ff4dcb4 - .long 0x922b65ab,0xbdd37d68 - .long 0xee400000,0x3ff4fa89 - .long 0x60d4a327,0x3dec287f - .long 0xc0000000,0x3ff5187c - .long 0xe85bc1a4,0x3dc49d56 - .long 0x95200000,0x3ff5368c - .long 0x5bd1e523,0xbdb63036 - .long 0xc2600000,0x3ff554b8 - .long 0x9a653fbc,0x3df14f8e - .long 0x98800000,0x3ff57300 - .long 0x8799adbe,0xbdffddce - .long 0x62c00000,0x3ff59163 - .long 0x4677c807,0x3e0ad3a5 - .long 0x6a000000,0x3ff5afe0 - .long 0xf3e67f75,0xbdec3df7 - .long 0xf0c00000,0x3ff5ce76 - .long 0x1e243ad8,0x3dfc26c9 - .long 0x37000000,0x3ff5ed26 - .long 0x82f9d88f,0x3df69c53 - .long 0x78000000,0x3ff60bed - .long 0xa1b60137,0xbde98cd9 - .long 0xeac00000,0x3ff62acb - .long 0x038d593e,0x3de4c370 - .long 0xc3400000,0x3ff649c0 - .long 0x6a610a4b,0xbe067cb1 - .long 0x30800000,0x3ff668cb - .long 0xaa91e345,0xbdcd59a7 - .long 0x5f000000,0x3ff687ea - .long 0xbb3e0da7,0x3de1c66a - .long 0x77400000,0x3ff6a71d - .long 0x447484ba,0xbdf49f35 - .long 0x9e000000,0x3ff6c663 - .long 0x9fa408f5,0xbdfb4727 - .long 0xf5000000,0x3ff6e5bb - .long 0x95fe5c11,0xbdfc59cc - .long 0x9a800000,0x3ff70525 - .long 0x0aa8b52d,0x3e02d604 - .long 0xaac00000,0x3ff7249f - .long 0x4ae67c31,0xbe034aef - .long 0x3d400000,0x3ff74429 - .long 0x0226c6c8,0x3dc20b8b - .long 0x68800000,0x3ff763c1 - .long 0xf8a3257f,0xbe0161b1 - .long 0x3f000000,0x3ff78367 - .long 0xc02f3514,0x3ddcbd24 - .long 0xd2000000,0x3ff7a319 - .long 0xa2288de1,0xbdfc01f8 - .long 0x2f400000,0x3ff7c2d8 - .long 0x81b988ed,0x3ddbfe74 - .long 0x63800000,0x3ff7e2a1 - .long 0xc80c4d5f,0xbe01cc20 - .long 0x78400000,0x3ff80274 - .long 0xb8ab545b,0x3df3aa42 - .long 0x76800000,0x3ff82250 - .long 0xf0c39b49,0x3de58a51 - .long 0x64c00000,0x3ff84234 - .long 0x594dab29,0xbdd68427 - .long 0x48000000,0x3ff8621f - .long 0x7b64bb5f,0x3e015323 - .long 0x24c00000,0x3ff88210 - .long 0x0881fe1d,0xbddc84da - .long 0xfd400000,0x3ff8a205 - .long 0xb3f75cfe,0x3df5873f - .long 0xd4000000,0x3ff8c1ff - .long 0x90244e94,0xbdfcfc58 - .long 0xa9800000,0x3ff8e1fc - .long 0x22533dd2,0x3de96c66 - .long 0x7ec00000,0x3ff901fb - .long 0xd7b5cc04,0x3e0738ae - .long 0x54400000,0x3ff921fb - .long 0x1a626331,0x3dd0b461 - .long 0x29800000,0x3ff941fb - .long 0xddc59991,0x3df9e8d2 - .long 0xff000000,0x3ff961f9 - .long 0x0fe1b542,0xbdd1700a - .long 0xd4c00000,0x3ff981f6 - .long 0xe2aa7fd3,0xbdfaa976 - .long 0xab400000,0x3ff9a1f0 - .long 0x4d8c56ca,0xbdea5a1e - .long 0x83c00000,0x3ff9c1e6 - .long 0x1ea36240,0x3deef6ce - .long 0x60800000,0x3ff9e1d7 - .long 0x69984526,0xbdfa4c16 - .long 0x43c00000,0x3ffa01c2 - .long 0xc70938c6,0x3debf674 - .long 0x32000000,0x3ffa21a6 - .long 0x5984e061,0xbdc357c3 - .long 0x30400000,0x3ffa4182 - .long 0x56f44585,0xbde6a024 - .long 0x45000000,0x3ffa6155 - .long 0x0ea4e62b,0x3e05f939 - .long 0x79400000,0x3ffa811e - .long 0xcc2cf5d5,0x3db5a936 - .long 0xd6c00000,0x3ffaa0dc - .long 0xd0a64087,0xbdfba3d6 - .long 0x69800000,0x3ffac08f - .long 0xd256453b,0x3db2ae75 - .long 0x40000000,0x3ffae035 - .long 0x3f3bbe4b,0x3e058eca - .long 0x6b400000,0x3ffaffcd - .long 0xb3b162ff,0x3dd862fc - .long 0xfe000000,0x3ffb1f56 - .long 0xdd01d604,0xbdf10ff0 - .long 0x0e000000,0x3ffb3ed1 - .long 0x882038c2,0xbdfd51d7 - .long 0xb3c00000,0x3ffb5e3a - .long 0xdcd07256,0xbdfb4c02 - .long 0x0ac00000,0x3ffb7d93 - .long 0xd32ac572,0xbdfc5ea7 - .long 0x31400000,0x3ffb9cd9 - .long 0xd1a5b653,0x3dfcf965 - .long 0x49800000,0x3ffbbc0c - .long 0x0dbaa75b,0xbda1209a - .long 0x78000000,0x3ffbdb2b - .long 0x0506dc03,0x3de80acb - .long 0xe5800000,0x3ffbfa35 - .long 0x3c1973a2,0xbde558d9 - .long 0xbdc00000,0x3ffc192a - .long 0xa4abd834,0xbdc03c3b - .long 0x30c00000,0x3ffc3809 - .long 0x50f9e6e6,0xbe056fb1 - .long 0x71800000,0x3ffc56d0 - .long 0xeb914ded,0xbdec8445 - .long 0xb7c00000,0x3ffc757f - .long 0x90f3093f,0xbdf3cc98 - .long 0x3e800000,0x3ffc9416 - .long 0x87247153,0x3df6792c - .long 0x45800000,0x3ffcb293 - .long 0x0041a18b,0x3df2b2e6 - .long 0x10000000,0x3ffcd0f6 - .long 0x8a656fab,0x3e041bff - .long 0xe6000000,0x3ffcef3d - .long 0xf2cbf1dc,0x3df70aa1 - .long 0x13400000,0x3ffd0d6a - .long 0xf97727f5,0x3e04de99 - .long 0xe8800000,0x3ffd2b79 - .long 0xc096e590,0x3dd71a16 - .long 0xba400000,0x3ffd496c - .long 0x8ce47feb,0xbdd6e83c - .long 0xe2000000,0x3ffd6741 - .long 0xa721fa7e,0xbe09633a - .long 0xbd000000,0x3ffd84f8 - .long 0x407bac1a,0x3ddca5d9 - .long 0xae400000,0x3ffda290 - .long 0x1147c641,0xbdc59e12 - .long 0x1c400000,0x3ffdc009 - .long 0xb620caf9,0x3dfa28e9 - .long 0x73000000,0x3ffddd61 - .long 0x2b9ed46c,0xbdfb43a8 - .long 0x22400000,0x3ffdfa99 - .long 0x630c9ceb,0xbe0cebfa - .long 0x9e800000,0x3ffe17af - .long 0xafa0c61c,0x3debe2ca - .long 0x61c00000,0x3ffe34a4 - .long 0x58615a48,0x3e0a6c6d - .long 0xea400000,0x3ffe5176 - .long 0xf771b50e,0x3dfe5151 - .long 0xba800000,0x3ffe6e26 - .long 0xbd6d668c,0x3df8a06a - .long 0x5a000000,0x3ffe8ab3 - .long 0xd7d4135c,0x3dfbb0eb - .long 0x55000000,0x3ffea71c - .long 0xb09906dc,0x3dda8442 - .long 0x3c000000,0x3ffec361 - .long 0xc44da8a3,0x3dfc16d7 - .long 0xa4c00000,0x3ffedf81 - .long 0xae5890d5,0xbdc4d95c - .long 0x29000000,0x3ffefb7d - .long 0x3d218a26,0xbdfb75a7 - .long 0x67400000,0x3fff1753 - .long 0xf1656f6c,0xbe0172f4 - .long 0x02800000,0x3fff3304 - .long 0xdf863851,0xbdcf6b8e - .long 0xa2800000,0x3fff4e8e - .long 0xa205a470,0x3df6b3e1 - .long 0xf3800000,0x3fff69f2 - .long 0xa18096af,0xbdde853c - .long 0xa5800000,0x3fff8530 - .long 0x607f6255,0x3df787de - .long 0x6dc00000,0x3fffa047 - .long 0x542c5109,0x3de39a31 - .long 0x05400000,0x3fffbb37 - .long 0x176aa69e,0xbde193d1 - .long 0x29400000,0x3fffd5ff - .long 0x4cbab80a,0x3de95cf6 - .long 0x9bc00000,0x3ffff09f - .long 0x9e85df82,0xbdf23bcc - .long 0x11200000,0x4000058c - .long 0x644dc57f,0xbdfa49be - .long 0x43400000,0x400012b4 - .long 0x29d6ca5c,0x3df7df94 - .long 0x4b800000,0x40001fc8 - .long 0x90b2f333,0xbdf07669 - .long 0x12800000,0x40002cc8 - .long 0xd8d73d10,0x3dee63d8 - .long 0x83600000,0x400039b3 - .long 0xa3aad512,0xbda62b9d - .long 0x8ac00000,0x4000468a - .long 0x20c417ef,0x3dfc9bec - .long 0x17800000,0x4000534d - .long 0x07b1cace,0x3dd7f911 - .long 0x1a000000,0x40005ffb - .long 0xaefbad1c,0x3de4074a - .long 0x84a00000,0x40006c94 - .long 0x7ea63b40,0x3df40e25 - .long 0x4b800000,0x40007919 - .long 0x397bcf5e,0x3df9321e - .long 0x64800000,0x40008589 - .long 0xa7ccd3c1,0x3dd346b9 - .long 0xc7200000,0x400091e4 - .long 0xefccf9c7,0xbdfb00e1 - .long 0x6c800000,0x40009e2b - .long 0xd036d9d3,0xbe04a851 - .long 0x4f600000,0x4000aa5d - .long 0xad856126,0xbdec74ff - .long 0x6c400000,0x4000b67a - .long 0x9512327c,0xbde6003f - .long 0xc1000000,0x4000c282 - .long 0x6614515e,0xbdec61f5 - .long 0x4d000000,0x4000ce76 - .long 0xe577796c,0xbddf8674 - .long 0x11200000,0x4000da55 - .long 0x0f49689f,0x3dc0b366 - .long 0x0fa00000,0x4000e61f - .long 0x1d23a023,0x3dffdf4d - .long 0x4c600000,0x4000f1d4 - .long 0x00a32d5c,0xbdfc94de - .long 0xcc000000,0x4000fd74 - .long 0x7b12a50e,0x3de89cb5 - .long 0x95200000,0x40010900 - .long 0x7f633dfc,0xbde8a71b - .long 0xaf200000,0x40011477 - .long 0xa22c576e,0xbddf043b - .long 0x22e00000,0x40011fda - .long 0xab4658e4,0xbdf583b2 - .long 0xfa400000,0x40012b27 - .long 0xc88a542e,0xbddc7052 - .long 0x40600000,0x40013661 - .long 0xb5fa251c,0x3dfc7430 - .long 0x01a00000,0x40014186 - .long 0x10065ac4,0x3dd53d2d - .long 0x4b200000,0x40014c96 - .long 0xfd4d5831,0x3dde4bf5 - .long 0x2b400000,0x40015792 - .long 0xdd63dfb7,0x3de0ceee - .long 0xb1400000,0x40016279 - .long 0xf44e5d9e,0x3e05a47a - .long 0xeda00000,0x40016d4c - .long 0xa9526aef,0xbd9c196f - .long 0xf1600000,0x4001780b - .long 0xddc7ed97,0xbdf1c75a - .long 0xce800000,0x400182b6 - .long 0x4537fbd1,0x3e03f9fd - .long 0x98600000,0x40018d4d - .long 0xcd4bedf5,0xbe0643b6 - .long 0x62400000,0x400197d0 - .long 0x7be31051,0xbdceee39 - .long 0x41000000,0x4001a23f - .long 0xe43916c2,0x3dab5864 - .long 0x49e00000,0x4001ac9a - .long 0xe65659f4,0x3dca8519 - .long 0x92e00000,0x4001b6e1 - .long 0xd8da3354,0x3df77c88 - .long 0x32e00000,0x4001c115 - .long 0xe2f9d62a,0xbde910ea - .long 0x41200000,0x4001cb35 - .long 0xc81075db,0xbe002e72 - .long 0xd5a00000,0x4001d541 - .long 0x272999cb,0xbdf8dc27 - .long 0x09000000,0x4001df3b - .long 0x46435ee9,0x3de1604f - .long 0xf4a00000,0x4001e920 - .long 0x86402d52,0xbdf84ccd - .long 0xb2000000,0x4001f2f3 - .long 0x7a698864,0xbdc1d852 - .long 0x5b800000,0x4001fcb3 - .long 0xe9f5ef5e,0x3de8ef47 - .long 0x0be00000,0x40020660 - .long 0x9d33bfe4,0x3deef548 - .long 0xde400000,0x40020ff9 - .long 0x9fe2acc6,0x3e07899e - .long 0xee800000,0x40021980 - .long 0x8586539c,0xbdea2a41 - .long 0x58600000,0x400222f5 - .long 0x8233d068,0xbde59a3f - .long 0x38600000,0x40022c57 - .long 0xafae28e0,0x3df61d5b - .long 0xab600000,0x400235a6 - .long 0xc0e105c1,0x3e07d566 - .long 0xcea00000,0x40023ee3 - .long 0x23305012,0x3de397c9 - .long 0xbf600000,0x4002480e - .long 0x7f34ee7e,0x3dedaddf - .long 0x9b800000,0x40025127 - .long 0x7552e9aa,0x3d940c8b - .long 0x80e00000,0x40025a2e - .long 0xe67562cc,0x3e06022a - .long 0x8e200000,0x40026323 - .long 0x36711271,0xbdfe8be0 - .long 0xe1400000,0x40026c06 - .long 0x34e171b8,0x3e03c83c - .long 0x99800000,0x400274d8 - .long 0x22b44c41,0xbdea7471 - .long 0xd5600000,0x40027d98 - .long 0x0cc87ce6,0x3dfb5597 - .long 0xb4400000,0x40028647 - .long 0xf1599d09,0x3df3fd61 - .long 0x55400000,0x40028ee5 - .long 0x432216e7,0x3e0074b2 - .long 0xd7e00000,0x40029771 - .long 0x55426d45,0x3dede47d - .long 0x5b800000,0x40029fed - .long 0xa81068a7,0x3e059214 - .long 0x00000000,0x4002a858 - .long 0xb830bfcf,0xbdd5c614 - .long 0xe4c00000,0x4002b0b1 - .long 0xaba3f9d3,0x3e092d16 - .long 0x2a000000,0x4002b8fb - .long 0xc83d37e0,0xbdefb3d7 - .long 0xef200000,0x4002c133 - .long 0x7f368cdd,0x3e0953b3 - .long 0x54800000,0x4002c95c - .long 0x27d71621,0x3df28d47 - .long 0x79e00000,0x4002d174 - .long 0x316a6da4,0xbdd16890 - .long 0x7f400000,0x4002d97c - .long 0x961b1ace,0xbdf9bc5b - .long 0x84800000,0x4002e184 - .long 0xe02465ce,0x3df0e16c - .long 0xa9e00000,0x4002e99c - .long 0x50352ef1,0xbdd817f9 - .long 0x0f400000,0x4002f1c5 - .long 0x1551a7ab,0xbe03100f - .long 0xd4800000,0x4002f9fd - .long 0xa40bccd6,0xbe01cf65 - .long 0x19800000,0x40030247 - .long 0x7c81d6bf,0x3dfa2d1b - .long 0xfe600000,0x40030aa0 - .long 0x01d5fa59,0x3df1f8ce - .long 0xa2c00000,0x4003130b - .long 0xc1d47c8b,0x3e00b18f - .long 0x26800000,0x40031b87 - .long 0xb6bb61ec,0xbdc357ae - .long 0xa9200000,0x40032413 - .long 0xb27a6369,0xbdf4621b - .long 0x4a200000,0x40032cb1 - .long 0x763f4a8f,0xbdddd864 - .long 0x29000000,0x40033560 - .long 0x71fd6503,0xbded9c9c - .long 0x64e00000,0x40033e20 - .long 0x6523f086,0x3df9c181 - .long 0x1d200000,0x400346f2 - .long 0x95f9190b,0xbdfb092f - .long 0x70600000,0x40034fd5 - .long 0xf5c5232a,0xbdf4ecd6 - .long 0x7d800000,0x400358ca - .long 0xf920fb33,0xbdff7d0c - .long 0x62e00000,0x400361d1 - .long 0x4be8fd7d,0x3de86e2d - .long 0x3f000000,0x40036aea - .long 0x5e8566d0,0xbdc27d37 - .long 0x2fc00000,0x40037415 - .long 0x118d12de,0x3dc5db22 - .long 0x53000000,0x40037d52 - .long 0x56fc208e,0xbe0191c2 - .long 0xc5e00000,0x400386a1 - .long 0x920dd0c2,0x3e0b34f6 - .long 0xa6200000,0x40039003 - .long 0xb58e26b3,0xbe0455cb - .long 0x10000000,0x40039978 - .long 0x34b985e6,0xbe0331cb - .long 0x20200000,0x4003a2ff - .long 0x35fdc794,0xbe0145fa - .long 0xf2800000,0x4003ac98 - .long 0xd680ac6a,0xbdc79adb - .long 0xa2e00000,0x4003b645 - .long 0x9da56c1b,0x3d6f49bd - .long 0x4c600000,0x4003c005 - .long 0x462df6e3,0x3ded84a6 - .long 0x09e00000,0x4003c9d8 - .long 0xa5f60849,0xbdfb2be9 - .long 0xf5600000,0x4003d3bd - .long 0x8540d783,0x3dceb909 - .long 0x28c00000,0x4003ddb7 - .long 0xfd79b218,0x3e02b1b7 - .long 0xbd400000,0x4003e7c3 - .long 0x31f55b0e,0x3e067217 - .long 0xcb800000,0x4003f1e3 - .long 0x4546b57a,0x3df90fbe - .long 0x6b600000,0x4003fc17 - .long 0xfd77cb88,0x3e0a855f - .long 0xb4800000,0x4004065e - .long 0x2dfdfe4d,0x3de26d4b - .long 0xbd600000,0x400410b9 - .long 0x5950035e,0x3de7590b - .long 0x9c200000,0x40041b28 - .long 0x03462c6f,0x3df06510 - .long 0x66200000,0x400425ab - .long 0x467966c2,0xbddbc526 - .long 0x2fe00000,0x40043042 - .long 0xb6a62d3d,0xbdfb6cb1 - .long 0x0d200000,0x40043aed - .long 0x27372402,0xbe00d8ae - .long 0x10c00000,0x400445ac - .long 0x24de2821,0x3de9ef5d - .long 0x4d200000,0x4004507f - .long 0x14d2f0d7,0xbdfec1ad - .long 0xd3200000,0x40045b66 - .long 0x945f6a25,0x3dd07f45 - .long 0xb3400000,0x40046662 - .long 0x51d9d163,0x3dd3d12d - .long 0xfcc00000,0x40047172 - .long 0x3f20ced0,0x3ddcdff6 - .long 0xbe000000,0x40047c97 - .long 0xc460b56d,0xbdefd9cf - .long 0x04200000,0x400487d1 - .long 0x85ec5f71,0x3df3a35d - .long 0xdba00000,0x4004931e - .long 0x80efdcb7,0xbdfdf504 - .long 0x4f400000,0x40049e81 - .long 0xbc54e040,0x3df44857 - .long 0x69400000,0x4004a9f8 - .long 0x937b6963,0x3df8dad6 - .long 0x32600000,0x4004b584 - .long 0x203bef0d,0x3d8c770b - .long 0xb2000000,0x4004c124 - .long 0x6a367be0,0x3e048e13 - .long 0xeec00000,0x4004ccd9 - .long 0x4959d5be,0xbdf35804 - .long 0xed400000,0x4004d8a3 - .long 0x23c13aa2,0x3de4e1b8 - .long 0xb1600000,0x4004e482 - .long 0x0d27a8c0,0x3df468e6 - .long 0x3d600000,0x4004f076 - .long 0x86d3f314,0x3dfab843 - .long 0x92200000,0x4004fc7e - .long 0x9e52e3a3,0x3df78768 - .long 0xaf200000,0x4005089b - .long 0xaab9c284,0xbe029f1b - .long 0x92000000,0x400514cd - .long 0x179103ea,0xbde45027 - .long 0x37400000,0x40052114 - .long 0x61cb6216,0x3e03c415 - .long 0x99e00000,0x40052d6f - .long 0xa75a55d3,0x3dded669 - .long 0xb2e00000,0x400539df - .long 0xcb6409f3,0xbde955aa - .long 0x79c00000,0x40054664 - .long 0xab71c36a,0xbdde1b72 - .long 0xe4600000,0x400552fd - .long 0xe25f9eb7,0x3dc41d1b - .long 0xe6c00000,0x40055fab - .long 0x247755ec,0x3e11a241 - .long 0x73800000,0x40056c6e - .long 0x5982d93b,0x3e07f5ae - .long 0x7b000000,0x40057945 - .long 0x81ce421b,0x3dea714b - .long 0xec000000,0x40058630 - .long 0xe6287509,0xbe10aaa8 - .long 0xb3000000,0x40059330 - .long 0xcdc1a134,0xbe018126 - .long 0xbb000000,0x4005a044 - .long 0x54f98005,0x3e0a53da - .long 0xed800000,0x4005ad6c - .long 0x31fa1c07,0xbe164bbe - .long 0x30800000,0x4005baa9 - .long 0x724fa9e7,0x3dfec315 - .long 0x69c00000,0x4005c7f9 - .long 0x49c8cff7,0xbd839929 - .long 0x7c000000,0x4005d55d - .long 0xa8203893,0xbe1aabb3 - .long 0x47800000,0x4005e2d5 - .long 0x4d9d0f03,0x3dc5d181 - .long 0xab800000,0x4005f060 - .long 0x39a53408,0x3e0a7fb5 - .long 0x84c00000,0x4005fdff - .long 0x01eb07f8,0xbe05ebb4 - .long 0xad400000,0x40060bb1 - .long 0x338ef683,0xbe128b26 - .long 0xfd400000,0x40061976 - .long 0xa822b748,0xbe07c5a2 - .long 0x4ac00000,0x4006274f - .long 0x5b4a549e,0x3e07b699 - .long 0x6a000000,0x4006353a - .long 0xef14ab75,0xbdf8030f - .long 0x2c000000,0x40064338 - .long 0xd329b8ff,0x3dee44e8 - .long 0x60800000,0x40065148 - .long 0xbc20f78f,0xbe13e3e3 - .long 0xd3c00000,0x40065f6a - .long 0x09e8e22c,0x3e11798e - .long 0x51400000,0x40066d9f - .long 0x7dfadb85,0x3e086b2e - .long 0xa1000000,0x40067be5 - .long 0x0b2e31ec,0x3e09f36f - .long 0x89400000,0x40068a3d - .long 0x23a7eaa9,0xbdf1ca09 - .long 0xcd800000,0x400698a6 - .long 0xee7c7516,0xbe0428c8 - .long 0x2f000000,0x4006a721 - .long 0xbdfcb3ab,0x3e0f4af1 - .long 0x6d400000,0x4006b5ac - .long 0x6678c10f,0x3e1197cf - .long 0x45000000,0x4006c448 - .long 0x0097612f,0xbdf8350f - .long 0x70400000,0x4006d2f4 - .long 0xc4ae0128,0xbdeb4341 - .long 0xa7400000,0x4006e1b0 - .long 0x2be5865a,0x3dee7616 - .long 0xa0000000,0x4006f07c - .long 0xbe2a9051,0xbe0d5116 - .long 0x0d800000,0x4006ff58 - .long 0xbe4813cb,0xbda6483b - .long 0xa1400000,0x40070e42 - .long 0xf702ea60,0x3df24157 - .long 0x0a000000,0x40071d3c - .long 0xc8e90440,0x3e11b030 - .long 0xf4800000,0x40072c43 - .long 0x3836de9f,0x3e18b285 - .long 0x0b400000,0x40073b5a - .long 0x707eec44,0x3e0abe53 - .long 0xf6400000,0x40074a7d - .long 0xdf7f7587,0x3e0227a4 - .long 0x5b800000,0x400759af - .long 0x69c4146d,0x3e0cea31 - .long 0xdf000000,0x400768ed - .long 0x2652ac89,0x3e0b070e - .long 0x22800000,0x40077839 - .long 0xb25e69d2,0x3e0029f0 - .long 0xc5800000,0x40078790 - .long 0xf2649c57,0x3e16b25a - .long 0x66400000,0x400796f4 - .long 0x229099f4,0xbe122655 - .long 0x9f800000,0x4007a663 - .long 0x90be8ad7,0x3ded1da0 - .long 0x0b800000,0x4007b5de - .long 0x5c75a10e,0x3e15cced - .long 0x42400000,0x4007c563 - .long 0xd4519719,0x3e102078 - .long 0xd9800000,0x4007d4f2 - .long 0x690de7e8,0x3e134413 - .long 0x65c00000,0x4007e48c - .long 0xfddbebee,0xbdf0721c - .long 0x79000000,0x4007f42f - .long 0x537a47ec,0x3e0472f8 - .long 0xa4800000,0x400803db - .long 0xd84d1e5e,0x3e03e9a5 - .long 0x77800000,0x40081390 - .long 0xa415fcda,0xbdf626df - .long 0x7f800000,0x4008234d - .long 0x279a2fcb,0xbe013463 - .long 0x48c00000,0x40083312 - .long 0x9b75c695,0x3dd9ba26 - .long 0x5e400000,0x400842de - .long 0x2aa926e7,0x3e00b4da - .long 0x49c00000,0x400852b1 - .long 0x44adccf7,0xbe0a51cf - .long 0x93400000,0x4008628a - .long 0x16e3fd45,0xbe15f538 - .long 0xc1c00000,0x40087269 - .long 0xce0df60f,0x3de6596a - .long 0x5c000000,0x4008824e - .long 0x5260007c,0xbe17daca - .long 0xe6400000,0x40089237 - .long 0xff43ed28,0x3df7d75a - .long 0xe5800000,0x4008a225 - .long 0x6082ccc7,0xbe0886df - .long 0xdc800000,0x4008b217 - .long 0xfbad1fdf,0xbdb73f18 - .long 0x4e400000,0x4008c20d - .long 0xc29df075,0xbdf92ca0 - .long 0xbc800000,0x4008d205 - .long 0xdc3f35d7,0xbdc7a0f1 - .long 0xa8c00000,0x4008e200 - .long 0xfa8ff5ca,0x3df9b457 - .long 0x94400000,0x4008f1fd - .long 0x1262ed72,0xbe1633d0 - .long 0xff000000,0x400901fb - .long 0x541ee425,0xbe078e5a - .long 0x69800000,0x400911fb - .long 0xfb02186a,0x3e094f3a - .long 0x54400000,0x400921fb - .long 0x1a626331,0x3de0b461 - .type __libm_atanl_table_128,@object - .size __libm_atanl_table_128,8208 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabs.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabs.S deleted file mode 100644 index 4b3e945ec7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabs.S +++ /dev/null @@ -1,73 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cabs.c" - .text -..TXTST0: -# -- Begin cabs - .text - .align 16,0x90 - .globl cabs -cabs: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cabs.1: -..L2: - - movaps %xmm0, %xmm2 - pushq %rsi - .cfi_def_cfa_offset 16 - movaps %xmm1, %xmm0 - movaps %xmm2, %xmm1 - call hypot@PLT -..B1.4: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cabs,@function - .size cabs,.-cabs - .data -# -- End cabs - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabsf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabsf.S deleted file mode 100644 index c6252af3d6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabsf.S +++ /dev/null @@ -1,76 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cabsf.c" - .text -..TXTST0: -# -- Begin cabsf - .text - .align 16,0x90 - .globl cabsf -cabsf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cabsf.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - pxor %xmm1, %xmm1 - movsd %xmm0, (%rsp) - pxor %xmm0, %xmm0 - cvtss2sd 4(%rsp), %xmm0 - cvtss2sd (%rsp), %xmm1 - call hypot@PLT -..B1.4: - cvtsd2ss %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cabsf,@function - .size cabsf,.-cabsf - .data -# -- End cabsf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabsl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabsl.S deleted file mode 100644 index e1c51f4639..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cabsl.S +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cabsl.c" - .text -..TXTST0: -# -- Begin cabsl - .text - .align 16,0x90 - .globl cabsl -cabsl: -# parameter 1: 16 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cabsl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - fldt 64(%rsp) - fstpt (%rsp) - fldt 48(%rsp) - fstpt 16(%rsp) - call hypotl@PLT -..B1.4: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cabsl,@function - .size cabsl,.-cabsl - .data -# -- End cabsl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacos.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacos.S deleted file mode 100644 index 8f29e29b03..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacos.S +++ /dev/null @@ -1,743 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacos.c" - .text -..TXTST0: -# -- Begin cacosf - .text - .align 16,0x90 - .globl cacosf -cacosf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cacosf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - cvtps2pd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 -..___tag_value_cacosf.4: - call cacos@PLT -..___tag_value_cacosf.5: -..B1.10: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - movsd %xmm0, 4(%rsp) - movzwl 6(%rsp), %eax - testl $32640, %eax - jne ..B1.4 -..B1.3: - testl $8388607, 4(%rsp) - jne ..B1.6 -..B1.4: - movzwl 10(%rsp), %eax - testl $32640, %eax - jne ..B1.7 -..B1.5: - testl $8388607, 8(%rsp) - je ..B1.7 -..B1.6: - movss .L_2il0floatpacket.12(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, (%rsp) - movsd 4(%rsp), %xmm0 -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cacosf,@function - .size cacosf,.-cacosf - .data -# -- End cacosf - .text -# -- Begin cacos - .text - .align 16,0x90 - .globl cacos -cacos: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_cacos.8: -..L9: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - xorb %r12b, %r12b - subq $152, %rsp - .cfi_def_cfa_offset 176 - movsd %xmm0, 32(%rsp) - movsd %xmm1, 40(%rsp) -..B2.2: - fnstcw 138(%rsp) -..B2.3: - movzwl 38(%rsp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - jge ..B2.36 -..B2.4: - testl %edx, %edx - jle ..B2.57 -..B2.5: - movzwl 46(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2047, %eax - jge ..B2.36 -..B2.6: - testl %eax, %eax - jle ..B2.55 -..B2.7: - movzwl 138(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.11 -..B2.8: - orl $-64768, %edx - movw %dx, 136(%rsp) -..B2.9: - fldcw 136(%rsp) -..B2.10: - movb $1, %r12b -..B2.11: - fldt .L_2il0floatpacket.14(%rip) - lea BcrossA(%rip), %rax - movsd 32(%rsp), %xmm0 - fld %st(0) - fldt .L_2il0floatpacket.15(%rip) - movsd %xmm0, 120(%rsp) - fldt (%rax) - andps .L_2il0floatpacket.18(%rip), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - movsd 40(%rsp), %xmm1 - fadd %st, %st(3) - movsd %xmm1, 128(%rsp) - andps .L_2il0floatpacket.18(%rip), %xmm1 - movsd %xmm1, (%rsp) - fxch %st(3) - fstpt 104(%rsp) - fldt 104(%rsp) - fxch %st(3) - fsubr %st, %st(4) - fxch %st(4) - fstpt 88(%rsp) - fldt 88(%rsp) - fxch %st(3) - fmul %st(0), %st - fxch %st(3) - fmul %st(0), %st - fldl (%rsp) - fld %st(0) - fmul %st(1), %st - fadd %st, %st(5) - fxch %st(5) - fsqrt - fld %st(0) - fxch %st(3) - fadd %st(6), %st - fsqrt - fstpt 72(%rsp) - fldt 72(%rsp) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(2) - fld %st(5) - fdiv %st(2), %st - fxch %st(3) - fcomip %st(3), %st - jbe ..B2.13 -..B2.12: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fxch %st(1) - fstpt (%rsp) - fxch %st(3) - fstpl 80(%rsp) - fstpt 16(%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - call acosl@PLT -..B2.78: - fldt 48(%rsp) - fldt 32(%rsp) - fldt 16(%rsp) - fldl 80(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - jmp ..B2.16 -..B2.13: - fstp %st(2) - fldt .L_2il0floatpacket.14(%rip) - fcomip %st(5), %st - jb ..B2.15 -..B2.14: - fstp %st(1) - fldt .L_2il0floatpacket.15(%rip) - addq $-32, %rsp - .cfi_def_cfa_offset 208 - fld %st(2) - fld %st(2) - fadd %st(6), %st - fmulp %st, %st(2) - fldt 136(%rsp) - faddp %st, %st(1) - fdivr %st(4), %st - fldt 104(%rsp) - fldt 120(%rsp) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fsqrt - fstpt (%rsp) - fxch %st(3) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpl 96(%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - fstpt 64(%rsp) - call atan2l@PLT - jmp ..B2.80 - .cfi_def_cfa_offset 176 -..B2.15: - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 208 - fld %st(2) - fadd %st(5), %st - fldt 136(%rsp) - faddp %st, %st(2) - fdiv %st, %st(1) - fldt 104(%rsp) - fldt 120(%rsp) - fsubrp %st, %st(1) - fdivrp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.15(%rip) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - fstpt (%rsp) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpl 96(%rsp) - fstpt 48(%rsp) - fstpt 64(%rsp) - fldt 32(%rsp) - fstpt 32(%rsp) - call atan2l@PLT -..B2.80: - fldt 64(%rsp) - fldt 48(%rsp) - fldt 32(%rsp) - fldl 96(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 176 -..B2.16: - lea AcrossA(%rip), %rax - fldt (%rax) - fcomip %st(4), %st - jb ..B2.21 -..B2.17: - fldt 104(%rsp) - faddp %st, %st(2) - fldt .L_2il0floatpacket.14(%rip) - fcomip %st(1), %st - fstp %st(0) - jbe ..B2.19 -..B2.18: - fldt 72(%rsp) - fxch %st(1) - fdivr %st(2), %st - fldt 88(%rsp) - faddp %st, %st(2) - fxch %st(1) - fdivrp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.15(%rip) - fmulp %st, %st(1) - jmp ..B2.20 -..B2.19: - fldt 88(%rsp) - fxch %st(1) - fdivrp %st, %st(2) - fldt 72(%rsp) - fsubp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.15(%rip) - fmulp %st, %st(1) -..B2.20: - fldt .L_2il0floatpacket.14(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call log1pl@PLT - jmp ..B2.82 - .cfi_def_cfa_offset 176 -..B2.21: - fstp %st(1) - fstp %st(1) - fstp %st(0) - fldt .L_2il0floatpacket.14(%rip) - fld %st(1) - fmul %st(2), %st - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fsubp %st, %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call logl@PLT -..B2.82: - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 -..B2.22: - lea ZEROA(%rip), %rax - movsd (%rax), %xmm1 - comisd 120(%rsp), %xmm1 - jbe ..B2.24 -..B2.23: - fldt .L_2il0floatpacket.16(%rip) - lea PIBY2HIA(%rip), %rax - lea PIBY2LOA(%rip), %rdx - fldl (%rax) - faddl (%rdx) - fmulp %st, %st(1) - fsubp %st, %st(1) -..B2.24: - movsd 128(%rsp), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B2.26 -..B2.25: - fldt .L_2il0floatpacket.17(%rip) - fmulp %st, %st(2) -..B2.26: - fstpl 16(%rsp) - movzwl 22(%rsp), %eax - testl $32752, %eax - fstpl 24(%rsp) - jne ..B2.29 -..B2.27: - testl $1048575, 20(%rsp) - jne ..B2.32 -..B2.28: - cmpl $0, 16(%rsp) - jne ..B2.32 -..B2.29: - movzwl 30(%rsp), %eax - testl $32752, %eax - jne ..B2.33 -..B2.30: - testl $1048575, 28(%rsp) - jne ..B2.32 -..B2.31: - cmpl $0, 24(%rsp) - je ..B2.33 -..B2.32: - lea _LDB_MIN_NORMAL(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 48(%rsp) -..B2.33: - testb %r12b, %r12b - je ..B2.35 -..B2.34: - fldcw 138(%rsp) -..B2.35: - movsd 16(%rsp), %xmm0 - movsd 24(%rsp), %xmm1 - addq $152, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B2.36: - testl %edx, %edx - jne ..B2.40 -..B2.37: - testl $1048575, 36(%rsp) - jne ..B2.40 -..B2.38: - cmpl $0, 32(%rsp) - jne ..B2.40 -..B2.39: - movsd 40(%rsp), %xmm0 - movq $0x3ff921fb54442d18, %rax - movq %rax, 16(%rsp) - call asinh@PLT -..B2.83: - xorps .L_2il0floatpacket.19(%rip), %xmm0 - movsd %xmm0, 24(%rsp) - movsd 16(%rsp), %xmm0 - movhpd 24(%rsp), %xmm0 - jmp ..B2.54 -..B2.40: - movzwl 46(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2047, %eax - je ..B2.72 -..B2.89: - cmpl $2047, %edx -..B2.41: - je ..B2.62 -..B2.42: - cmpl $2047, %eax - je ..B2.59 -..B2.43: - testl %eax, %eax - jne ..B2.50 -..B2.44: - testl $1048575, 44(%rsp) - jne ..B2.50 -..B2.45: - cmpl $0, 40(%rsp) - jne ..B2.50 -..B2.46: - movsd 32(%rsp), %xmm0 - cmpl $1023, %edx - jl ..B2.48 -..B2.47: - movb 39(%rsp), %r12b - andb $-128, %r12b - shrb $7, %r12b - movzbl %r12b, %eax - lea ones(%rip), %r12 - movsd (%r12,%rax,8), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm1, (%rsp) - call acosh@PLT -..B2.85: - movsd %xmm0, 8(%rsp) - movsd (%rsp), %xmm0 - call acos@PLT -..B2.84: - movsd %xmm0, 16(%rsp) - jmp ..B2.49 -..B2.48: - pxor %xmm1, %xmm1 - movsd %xmm1, 8(%rsp) - call acos@PLT -..B2.86: - movsd %xmm0, 16(%rsp) - lea ones(%rip), %r12 -..B2.49: - movb 47(%rsp), %al - andb $-128, %al - shrb $7, %al - movsd 8(%rsp), %xmm0 - xorb $1, %al - movzbl %al, %edx - mulsd (%r12,%rdx,8), %xmm0 - movsd %xmm0, 24(%rsp) - movsd 16(%rsp), %xmm0 - movhpd 24(%rsp), %xmm0 - jmp ..B2.54 -..B2.50: - movsd 40(%rsp), %xmm0 - cmpl $2047, %eax - movsd 32(%rsp), %xmm1 - je ..B2.52 -..B2.51: - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - jmp ..B2.53 -..B2.52: - movaps %xmm0, %xmm2 - mulsd %xmm0, %xmm2 -..B2.53: - movb 47(%rsp), %r13b - andb $-128, %r13b - shrb $7, %r13b - movb %r13b, %r12b - xorb $1, %r12b - movzbl %r12b, %eax - lea ones(%rip), %r12 - mulsd (%r12,%rax,8), %xmm2 - movsd %xmm2, 24(%rsp) - call atan2@PLT -..B2.87: - movzbl %r13b, %eax - mulsd (%r12,%rax,8), %xmm0 - movsd %xmm0, 16(%rsp) - movhpd 24(%rsp), %xmm0 -..B2.54: - movaps %xmm0, %xmm1 - unpckhpd %xmm0, %xmm1 - addq $152, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B2.55: - testl $1048575, 44(%rsp) - jne ..B2.7 -..B2.56: - cmpl $0, 40(%rsp) - jne ..B2.7 - jmp ..B2.36 -..B2.57: - testl $1048575, 36(%rsp) - jne ..B2.5 -..B2.58: - cmpl $0, 32(%rsp) - jne ..B2.5 - jmp ..B2.36 -..B2.59: - testl $1048575, 44(%rsp) - jne ..B2.61 -..B2.60: - cmpl $0, 40(%rsp) - je ..B2.50 -..B2.61: - movsd 32(%rsp), %xmm1 - movsd 40(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - unpcklpd %xmm1, %xmm0 - movsd %xmm0, 16(%rsp) - movhpd %xmm0, 24(%rsp) - jmp ..B2.54 -..B2.62: - testl $1048575, 36(%rsp) - jne ..B2.64 -..B2.63: - cmpl $0, 32(%rsp) - je ..B2.66 -..B2.64: - cmpl $2047, %eax - jge ..B2.66 -..B2.65: - movsd 32(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm0 - movsd %xmm0, 16(%rsp) - movhpd %xmm0, 24(%rsp) - jmp ..B2.54 -..B2.66: - testl $1048575, 36(%rsp) - jne ..B2.68 -..B2.67: - cmpl $0, 32(%rsp) - je ..B2.42 -..B2.68: - cmpl $2047, %eax - jne ..B2.43 -..B2.69: - testl $1048575, 44(%rsp) - jne ..B2.71 -..B2.70: - cmpl $0, 40(%rsp) - je ..B2.59 -..B2.71: - movsd 32(%rsp), %xmm0 - movsd 40(%rsp), %xmm1 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - unpcklpd %xmm1, %xmm0 - movsd %xmm0, 16(%rsp) - movhpd %xmm0, 24(%rsp) - jmp ..B2.54 -..B2.72: - testl $1048575, 44(%rsp) - jne ..B2.74 -..B2.73: - cmpl $0, 40(%rsp) - je ..B2.88 -..B2.74: - cmpl $2047, %edx - jge ..B2.41 -..B2.75: - movsd 40(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm0 - movsd %xmm0, 16(%rsp) - movhpd %xmm0, 24(%rsp) - jmp ..B2.54 -..B2.88: - cmpl $2047, %edx - je ..B2.62 - jmp ..B2.42 - .align 16,0x90 - .cfi_endproc - .type cacos,@function - .size cacos,.-cacos - .data -# -- End cacos - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.14: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,16 - .align 16 -.L_2il0floatpacket.15: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 16 -.L_2il0floatpacket.16: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,16 - .align 16 -.L_2il0floatpacket.17: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,16 - .align 16 -.L_2il0floatpacket.18: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,16 - .align 16 -.L_2il0floatpacket.19: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.19,@object - .size .L_2il0floatpacket.19,16 - .align 16 -BcrossA: - .long 3621516424 - .long 2756080513 - .long 16382 - .long 0 - .type BcrossA,@object - .size BcrossA,16 - .align 16 -AcrossA: - .long 0 - .long 3221225472 - .long 16383 - .long 0 - .type AcrossA,@object - .size AcrossA,16 - .align 16 -ZEROA: - .long 0 - .long 0 - .type ZEROA,@object - .size ZEROA,8 - .space 8, 0x00 # pad - .align 16 -PIBY2HIA: - .long 1413754136 - .long 1073291771 - .type PIBY2HIA,@object - .size PIBY2HIA,8 - .space 8, 0x00 # pad - .align 16 -PIBY2LOA: - .long 856972295 - .long 1016178214 - .type PIBY2LOA,@object - .size PIBY2LOA,8 - .space 8, 0x00 # pad - .align 16 -_LDB_MIN_NORMAL: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _LDB_MIN_NORMAL,@object - .size _LDB_MIN_NORMAL,16 - .align 8 -.L_2il0floatpacket.13: - .long 0x54442d18,0x3ff921fb - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -.L_2il0floatpacket.12: - .long 0x00800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacosh.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacosh.S deleted file mode 100644 index d3232ca863..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacosh.S +++ /dev/null @@ -1,739 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacosh.c" - .text -..TXTST0: -# -- Begin cacoshf - .text - .align 16,0x90 - .globl cacoshf -cacoshf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cacoshf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - cvtps2pd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 -..___tag_value_cacoshf.4: - call cacosh@PLT -..___tag_value_cacoshf.5: -..B1.10: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - movsd %xmm0, 4(%rsp) - movzwl 6(%rsp), %eax - testl $32640, %eax - jne ..B1.4 -..B1.3: - testl $8388607, 4(%rsp) - jne ..B1.6 -..B1.4: - movzwl 10(%rsp), %eax - testl $32640, %eax - jne ..B1.7 -..B1.5: - testl $8388607, 8(%rsp) - je ..B1.7 -..B1.6: - movss .L_2il0floatpacket.12(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, (%rsp) - movsd 4(%rsp), %xmm0 -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cacoshf,@function - .size cacoshf,.-cacoshf - .data -# -- End cacoshf - .text -# -- Begin cacosh - .text - .align 16,0x90 - .globl cacosh -cacosh: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_cacosh.8: -..L9: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - xorb %r13b, %r13b - subq $160, %rsp - .cfi_def_cfa_offset 176 - movsd %xmm0, 136(%rsp) - movsd %xmm1, 144(%rsp) -..B2.2: - fnstcw 154(%rsp) -..B2.3: - movzwl 142(%rsp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - jge ..B2.36 -..B2.4: - testl %edx, %edx - jle ..B2.62 -..B2.5: - movzwl 150(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2047, %eax - jge ..B2.37 -..B2.6: - testl %eax, %eax - jle ..B2.60 -..B2.7: - movzwl 154(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.11 -..B2.8: - orl $-64768, %edx - movw %dx, 152(%rsp) -..B2.9: - fldcw 152(%rsp) -..B2.10: - movb $1, %r13b -..B2.11: - fldt .L_2il0floatpacket.13(%rip) - lea BcrossA(%rip), %rax - movsd 136(%rsp), %xmm0 - fld %st(0) - fldt .L_2il0floatpacket.14(%rip) - movsd %xmm0, 128(%rsp) - fldt (%rax) - andps .L_2il0floatpacket.17(%rip), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - movsd 144(%rsp), %xmm1 - fadd %st, %st(3) - movsd %xmm1, 120(%rsp) - andps .L_2il0floatpacket.17(%rip), %xmm1 - movsd %xmm1, (%rsp) - fxch %st(3) - fstpt 104(%rsp) - fldt 104(%rsp) - fxch %st(3) - fsubr %st, %st(4) - fxch %st(4) - fstpt 88(%rsp) - fldt 88(%rsp) - fxch %st(3) - fmul %st(0), %st - fxch %st(3) - fmul %st(0), %st - fldl (%rsp) - fld %st(0) - fmul %st(1), %st - fadd %st, %st(5) - fxch %st(5) - fsqrt - fld %st(0) - fxch %st(3) - fadd %st(6), %st - fsqrt - fstpt 72(%rsp) - fldt 72(%rsp) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(2) - fld %st(5) - fdiv %st(2), %st - fxch %st(3) - fcomip %st(3), %st - jbe ..B2.13 -..B2.12: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fxch %st(1) - fstpt (%rsp) - fxch %st(3) - fstpl 80(%rsp) - fstpt 16(%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - call acosl@PLT -..B2.84: - fldt 48(%rsp) - fldt 32(%rsp) - fldt 16(%rsp) - fldl 80(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - jmp ..B2.16 -..B2.13: - fstp %st(2) - fldt .L_2il0floatpacket.13(%rip) - fcomip %st(5), %st - jb ..B2.15 -..B2.14: - fstp %st(1) - fldt .L_2il0floatpacket.14(%rip) - addq $-32, %rsp - .cfi_def_cfa_offset 208 - fld %st(2) - fld %st(2) - fadd %st(6), %st - fmulp %st, %st(2) - fldt 136(%rsp) - faddp %st, %st(1) - fdivr %st(4), %st - fldt 104(%rsp) - fldt 120(%rsp) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fsqrt - fstpt (%rsp) - fxch %st(3) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpl 96(%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - fstpt 64(%rsp) - call atan2l@PLT - jmp ..B2.86 - .cfi_def_cfa_offset 176 -..B2.15: - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 208 - fld %st(2) - fadd %st(5), %st - fldt 136(%rsp) - faddp %st, %st(2) - fdiv %st, %st(1) - fldt 104(%rsp) - fldt 120(%rsp) - fsubrp %st, %st(1) - fdivrp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.14(%rip) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - fstpt (%rsp) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpl 96(%rsp) - fstpt 48(%rsp) - fstpt 64(%rsp) - fldt 32(%rsp) - fstpt 32(%rsp) - call atan2l@PLT -..B2.86: - fldt 64(%rsp) - fldt 48(%rsp) - fldt 32(%rsp) - fldl 96(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 176 -..B2.16: - lea AcrossA(%rip), %rax - fldt (%rax) - fcomip %st(4), %st - jb ..B2.21 -..B2.17: - fldt 104(%rsp) - faddp %st, %st(2) - fldt .L_2il0floatpacket.13(%rip) - fcomip %st(1), %st - fstp %st(0) - jbe ..B2.19 -..B2.18: - fldt 72(%rsp) - fxch %st(1) - fdivr %st(2), %st - fldt 88(%rsp) - faddp %st, %st(2) - fxch %st(1) - fdivrp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.14(%rip) - fmulp %st, %st(1) - jmp ..B2.20 -..B2.19: - fldt 88(%rsp) - fxch %st(1) - fdivrp %st, %st(2) - fldt 72(%rsp) - fsubp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.14(%rip) - fmulp %st, %st(1) -..B2.20: - fldt .L_2il0floatpacket.13(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call log1pl@PLT - jmp ..B2.88 - .cfi_def_cfa_offset 176 -..B2.21: - fstp %st(1) - fstp %st(1) - fstp %st(0) - fldt .L_2il0floatpacket.13(%rip) - fld %st(1) - fmul %st(2), %st - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fsubp %st, %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call logl@PLT -..B2.88: - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 -..B2.22: - lea ZEROA(%rip), %rax - movsd (%rax), %xmm0 - comisd 128(%rsp), %xmm0 - jbe ..B2.24 -..B2.23: - fldt .L_2il0floatpacket.15(%rip) - lea PIBY2HIA(%rip), %rax - lea PIBY2LOA(%rip), %rdx - fldl (%rax) - faddl (%rdx) - fmulp %st, %st(1) - fsubp %st, %st(1) -..B2.24: - comisd 120(%rsp), %xmm0 - jbe ..B2.26 -..B2.25: - fldt .L_2il0floatpacket.16(%rip) - fmulp %st, %st(1) -..B2.26: - movb 151(%rsp), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - fxch %st(1) - fstpl (%rsp) - movsd (%rsp), %xmm0 - fstpl (%rsp) - movsd (%rsp), %xmm1 - andps .L_2il0floatpacket.17(%rip), %xmm1 - andps .L_2il0floatpacket.17(%rip), %xmm0 - movsd %xmm0, 16(%rsp) - movzbl %al, %ecx - movzwl 22(%rsp), %esi - testl $32752, %esi - mulsd (%rdx,%rcx,8), %xmm1 - movsd %xmm1, 24(%rsp) - jne ..B2.29 -..B2.27: - testl $1048575, 20(%rsp) - jne ..B2.32 -..B2.28: - cmpl $0, 16(%rsp) - jne ..B2.32 -..B2.29: - movzwl 30(%rsp), %eax - testl $32752, %eax - jne ..B2.33 -..B2.30: - testl $1048575, 28(%rsp) - jne ..B2.32 -..B2.31: - cmpl $0, 24(%rsp) - je ..B2.33 -..B2.32: - lea _LDB_MIN_NORMAL(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 48(%rsp) -..B2.33: - testb %r13b, %r13b - je ..B2.35 -..B2.34: - fldcw 154(%rsp) -..B2.35: - movsd 16(%rsp), %xmm0 - movsd 24(%rsp), %xmm1 - addq $160, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 13, -16 -..B2.36: - movzwl 150(%rsp), %eax - andl $32752, %eax - shrl $4, %eax -..B2.37: - testl %eax, %eax - jne ..B2.47 -..B2.38: - testl $1048575, 148(%rsp) - jne ..B2.47 -..B2.39: - cmpl $0, 144(%rsp) - jne ..B2.47 -..B2.40: - cmpl $2047, %edx - jl ..B2.43 -..B2.41: - testl $1048575, 140(%rsp) - jne ..B2.47 -..B2.42: - cmpl $0, 136(%rsp) - jne ..B2.47 -..B2.43: - cmpl $1023, %edx - jl ..B2.45 -..B2.44: - movb 143(%rsp), %r13b - andb $-128, %r13b - shrb $7, %r13b - movsd 136(%rsp), %xmm0 - movzbl %r13b, %eax - lea ones(%rip), %r13 - movsd (%r13,%rax,8), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm1, (%rsp) - call acosh@PLT -..B2.90: - movsd %xmm0, 16(%rsp) - movsd (%rsp), %xmm0 - call acos@PLT -..B2.89: - lea 24(%rsp), %rcx - jmp ..B2.46 -..B2.45: - movsd 136(%rsp), %xmm0 - movq $0, 16(%rsp) - call acos@PLT -..B2.91: - lea ones(%rip), %r13 - lea 24(%rsp), %rcx -..B2.46: - movb 151(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - mulsd (%r13,%rdx,8), %xmm0 - movsd %xmm0, (%rcx) - movsd 16(%rsp), %xmm0 - movhpd 24(%rsp), %xmm0 - jmp ..B2.59 -..B2.47: - testl %edx, %edx - jne ..B2.54 -..B2.48: - testl $1048575, 140(%rsp) - jne ..B2.55 -..B2.49: - cmpl $0, 136(%rsp) - jne ..B2.55 -..B2.50: - cmpl $2047, %eax - jl ..B2.53 -..B2.51: - testl $1048575, 148(%rsp) - jne ..B2.55 -..B2.52: - cmpl $0, 144(%rsp) - jne ..B2.55 -..B2.53: - movb 151(%rsp), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movsd 144(%rsp), %xmm1 - movsd %xmm1, (%rsp) - movzbl %al, %ecx - movsd (%rdx,%rcx,8), %xmm0 - mulsd %xmm1, %xmm0 - call asinh@PLT -..B2.93: - movsd %xmm0, 16(%rsp) - movsd 136(%rsp), %xmm1 - movsd (%rsp), %xmm0 - call atan2@PLT - jmp ..B2.94 -..B2.54: - cmpl $2047, %edx - je ..B2.72 -..B2.55: - cmpl $2047, %eax - je ..B2.68 -..B2.96: - cmpl $2047, %edx -..B2.56: - je ..B2.65 -..B2.57: - movsd 144(%rsp), %xmm0 - movaps %xmm0, %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm1, 16(%rsp) - movsd 136(%rsp), %xmm1 -..B2.58: - call atan2@PLT -..B2.94: - movsd %xmm0, 24(%rsp) - movsd 16(%rsp), %xmm0 - movhpd 24(%rsp), %xmm0 -..B2.59: - movaps %xmm0, %xmm1 - unpckhpd %xmm0, %xmm1 - addq $160, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 13, -16 -..B2.60: - testl $1048575, 148(%rsp) - jne ..B2.7 -..B2.61: - cmpl $0, 144(%rsp) - jne ..B2.7 - jmp ..B2.37 -..B2.62: - testl $1048575, 140(%rsp) - jne ..B2.5 -..B2.63: - cmpl $0, 136(%rsp) - jne ..B2.5 - jmp ..B2.36 -..B2.65: - testl $1048575, 140(%rsp) - jne ..B2.57 -..B2.66: - cmpl $0, 136(%rsp) - jne ..B2.57 -..B2.67: - movsd 136(%rsp), %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, 16(%rsp) - movsd 144(%rsp), %xmm0 - jmp ..B2.58 -..B2.68: - testl $1048575, 148(%rsp) - jne ..B2.70 -..B2.69: - cmpl $0, 144(%rsp) - je ..B2.95 -..B2.70: - cmpl $2047, %edx - jge ..B2.56 -..B2.71: - movsd 144(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm0 - movsd %xmm0, 16(%rsp) - movhpd %xmm0, 24(%rsp) - jmp ..B2.59 -..B2.72: - testl $1048575, 140(%rsp) - jne ..B2.74 -..B2.73: - cmpl $0, 136(%rsp) - je ..B2.75 -..B2.74: - cmpl $2047, %eax - je ..B2.79 -..B2.75: - testl $1048575, 140(%rsp) - jne ..B2.77 -..B2.76: - cmpl $0, 136(%rsp) - je ..B2.55 -..B2.77: - cmpl $2047, %eax - jge ..B2.55 -..B2.78: - movsd 136(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm0 - movsd %xmm0, 16(%rsp) - movhpd %xmm0, 24(%rsp) - jmp ..B2.59 -..B2.79: - testl $1048575, 148(%rsp) - jne ..B2.81 -..B2.80: - cmpl $0, 144(%rsp) - je ..B2.75 -..B2.81: - movsd 144(%rsp), %xmm1 - movsd 136(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - unpcklpd %xmm1, %xmm0 - movsd %xmm0, 16(%rsp) - movhpd %xmm0, 24(%rsp) - jmp ..B2.59 -..B2.95: - cmpl $2047, %edx - je ..B2.65 - jmp ..B2.57 - .align 16,0x90 - .cfi_endproc - .type cacosh,@function - .size cacosh,.-cacosh - .data -# -- End cacosh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,16 - .align 16 -.L_2il0floatpacket.14: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,16 - .align 16 -.L_2il0floatpacket.15: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 16 -.L_2il0floatpacket.16: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,16 - .align 16 -.L_2il0floatpacket.17: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,16 - .align 16 -BcrossA: - .long 3621516424 - .long 2756080513 - .long 16382 - .long 0 - .type BcrossA,@object - .size BcrossA,16 - .align 16 -AcrossA: - .long 0 - .long 3221225472 - .long 16383 - .long 0 - .type AcrossA,@object - .size AcrossA,16 - .align 16 -ZEROA: - .long 0 - .long 0 - .type ZEROA,@object - .size ZEROA,8 - .space 8, 0x00 # pad - .align 16 -PIBY2HIA: - .long 1413754136 - .long 1073291771 - .type PIBY2HIA,@object - .size PIBY2HIA,8 - .space 8, 0x00 # pad - .align 16 -PIBY2LOA: - .long 856972295 - .long 1016178214 - .type PIBY2LOA,@object - .size PIBY2LOA,8 - .space 8, 0x00 # pad - .align 16 -_LDB_MIN_NORMAL: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _LDB_MIN_NORMAL,@object - .size _LDB_MIN_NORMAL,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -.L_2il0floatpacket.12: - .long 0x00800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacoshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacoshl.S deleted file mode 100644 index 4a014c1174..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacoshl.S +++ /dev/null @@ -1,483 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacoshl.c" - .text -..TXTST0: -# -- Begin cacoshl - .text - .align 16,0x90 - .globl cacoshl -cacoshl: -# parameter 1: 512 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cacoshl.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $464, %rsp - .cfi_def_cfa_offset 512 - xorb %bpl, %bpl - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 448(%rsp) - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.5: - fldcw 16(%rsp) -..B1.6: - movb $1, %bpl -..B1.7: - movzwl 520(%rsp), %esi - andl $32767, %esi - cmpl $32767, %esi - jge ..B1.15 -..B1.8: - testl %esi, %esi - jle ..B1.39 -..B1.9: - movzwl 536(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jge ..B1.15 -..B1.10: - testl %eax, %eax - jle ..B1.37 -..B1.11: - lea 32(%rsp), %rbx - lea 80(%rsp), %r12 - lea 176(%rsp), %r15 - lea 128(%rsp), %r14 - pushq %rbx - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r14 - .cfi_def_cfa_offset 536 - pushq %r15 - .cfi_def_cfa_offset 544 - lea 544(%rsp), %rdi - lea 560(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_cacoshl.18: - call __libm_carctrigprepare_k80@PLT -..___tag_value_cacoshl.19: -..B1.61: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.12: - pushq %rbx - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r14 - .cfi_def_cfa_offset 536 - pushq %r15 - .cfi_def_cfa_offset 544 - lea 544(%rsp), %rdi - lea 560(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_cacoshl.25: - call __libm_recacoshl_k80@PLT -..___tag_value_cacoshl.26: -..B1.62: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.13: - fstpt 416(%rsp) - pushq %rbx - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r14 - .cfi_def_cfa_offset 536 - pushq %r15 - .cfi_def_cfa_offset 544 - lea 544(%rsp), %rdi - lea 560(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_cacoshl.32: - call __libm_recacosl_k80@PLT -..___tag_value_cacoshl.33: -..B1.63: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.14: - movb 537(%rsp), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - fmulp %st, %st(1) - fstpt 432(%rsp) - jmp ..B1.32 -..B1.15: - movq 528(%rsp), %rdx - testq %rdx, %rdx - jne ..B1.22 -..B1.16: - cmpl $32767, %esi - jge ..B1.21 -..B1.17: - cmpl $16383, %esi - jl ..B1.19 -..B1.18: - fldt 512(%rsp) - movb 521(%rsp), %bl - andb $-128, %bl - shrb $7, %bl - movzbl %bl, %eax - lea ones(%rip), %rbx - fldl (%rbx,%rax,8) - fstl (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fmulp %st, %st(1) - fstpt (%rsp) - call acoshl@PLT -..B1.65: - addq $16, %rsp - .cfi_def_cfa_offset 512 - fstpt 416(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fldl 16(%rsp) - fstpt (%rsp) - call acosl@PLT -..B1.64: - addq $16, %rsp - .cfi_def_cfa_offset 512 - lea 432(%rsp), %rcx - jmp ..B1.20 -..B1.19: - fldt .L_2il0floatpacket.8(%rip) - fstpt 416(%rsp) - fldt 512(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fstpt (%rsp) - call acosl@PLT -..B1.66: - addq $16, %rsp - .cfi_def_cfa_offset 512 - lea ones(%rip), %rbx - lea 432(%rsp), %rcx -..B1.20: - movb 537(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - fldl (%rbx,%rdx,8) - fmulp %st, %st(1) - fstpt (%rcx) - jmp ..B1.32 -..B1.21: - movq $0x8000000000000000, %rax - movq 512(%rsp), %rbx - cmpq %rax, %rbx - je ..B1.17 - jmp ..B1.23 -..B1.22: - movq 512(%rsp), %rbx -..B1.23: - movzwl 536(%rsp), %ecx - andl $32767, %ecx - testq %rbx, %rbx - jne ..B1.27 -..B1.24: - cmpl $32767, %ecx - jge ..B1.26 -..B1.25: - fldt 528(%rsp) - lea ones(%rip), %rdx - fstpt (%rsp) - fldt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 528 - movb 553(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - fmulp %st, %st(1) - fstpt (%rsp) - call asinhl@PLT -..B1.68: - addq $16, %rsp - .cfi_def_cfa_offset 512 - fstpt 416(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 544 - fldt 32(%rsp) - fstpt (%rsp) - fldt 544(%rsp) - fstpt 16(%rsp) - call atan2l@PLT - jmp ..B1.69 - .cfi_def_cfa_offset 512 -..B1.26: - movq $0x8000000000000000, %rax - cmpq %rax, %rdx - je ..B1.25 -..B1.27: - cmpl $32767, %esi - je ..B1.49 -..B1.73: - cmpl $32767, %ecx -..B1.28: - je ..B1.45 -..B1.71: - cmpl $32767, %esi -..B1.29: - je ..B1.43 -..B1.30: - fldt 528(%rsp) - fld %st(0) - fmul %st(1), %st - fstpt 416(%rsp) - fldt 512(%rsp) - fxch %st(1) -..B1.31: - addq $-32, %rsp - .cfi_def_cfa_offset 544 - fstpt (%rsp) - fstpt 16(%rsp) - call atan2l@PLT -..B1.69: - addq $32, %rsp - .cfi_def_cfa_offset 512 - fstpt 432(%rsp) -..B1.32: - testb %bpl, %bpl - je ..B1.34 -..B1.33: - fldcw 18(%rsp) -..B1.34: - movq 448(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.42 -..B1.35: - fldt 416(%rsp) - fldt 432(%rsp) - movq 448(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.41 -..B1.36: - addq $464, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 512 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.37: - cmpl $0, 532(%rsp) - jne ..B1.11 -..B1.38: - cmpl $0, 528(%rsp) - jne ..B1.11 - jmp ..B1.15 -..B1.39: - cmpl $0, 516(%rsp) - jne ..B1.9 -..B1.40: - cmpl $0, 512(%rsp) - jne ..B1.9 - jmp ..B1.15 -..B1.41: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.42: - call __stack_chk_fail@PLT -..B1.43: - movq $0x8000000000000000, %rax - cmpq %rax, %rbx - jne ..B1.30 -..B1.44: - fldt 512(%rsp) - fld %st(0) - fmul %st(1), %st - fstpt 416(%rsp) - fldt 528(%rsp) - jmp ..B1.31 -..B1.45: - cmpl $-2147483648, 532(%rsp) - jne ..B1.47 -..B1.46: - cmpl $0, 528(%rsp) - je ..B1.70 -..B1.47: - cmpl $32767, %esi - jge ..B1.29 -..B1.48: - fldt 528(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) - jmp ..B1.32 -..B1.49: - cmpl $-2147483648, 516(%rsp) - jne ..B1.51 -..B1.50: - cmpl $0, 512(%rsp) - je ..B1.52 -..B1.51: - cmpl $32767, %ecx - je ..B1.56 -..B1.52: - cmpl $-2147483648, 516(%rsp) - jne ..B1.54 -..B1.53: - cmpl $0, 512(%rsp) - je ..B1.72 -..B1.54: - cmpl $32767, %ecx - jge ..B1.28 -..B1.55: - fldt 512(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) - jmp ..B1.32 -..B1.56: - cmpl $-2147483648, 532(%rsp) - jne ..B1.58 -..B1.57: - cmpl $0, 528(%rsp) - je ..B1.52 -..B1.58: - fldt 512(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 528(%rsp) - fmul %st(0), %st - fstpt 432(%rsp) - jmp ..B1.32 -..B1.70: - cmpl $32767, %esi - je ..B1.43 - jmp ..B1.30 -..B1.72: - cmpl $32767, %ecx - je ..B1.45 - jmp ..B1.71 - .align 16,0x90 - .cfi_endproc - .type cacoshl,@function - .size cacoshl,.-cacoshl - .data -# -- End cacoshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacosl.S deleted file mode 100644 index 529708962c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cacosl.S +++ /dev/null @@ -1,476 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cacosl.c" - .text -..TXTST0: -# -- Begin cacosl - .text - .align 16,0x90 - .globl cacosl -cacosl: -# parameter 1: 512 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cacosl.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $464, %rsp - .cfi_def_cfa_offset 512 - xorb %bl, %bl - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 448(%rsp) - fstpt 8(%rsp) - fldt 8(%rsp) - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.5: - fldcw 24(%rsp) -..B1.6: - movb $1, %bl -..B1.7: - movzwl 520(%rsp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.15 -..B1.8: - testl %edx, %edx - jle ..B1.36 -..B1.9: - movzwl 536(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jge ..B1.15 -..B1.10: - testl %eax, %eax - jle ..B1.34 -..B1.11: - lea 32(%rsp), %rbp - lea 80(%rsp), %r12 - lea 176(%rsp), %r14 - lea 128(%rsp), %r13 - pushq %rbp - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r13 - .cfi_def_cfa_offset 536 - pushq %r14 - .cfi_def_cfa_offset 544 - lea 544(%rsp), %rdi - lea 560(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_cacosl.18: - call __libm_carctrigprepare_k80@PLT -..___tag_value_cacosl.19: -..B1.59: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.12: - pushq %rbp - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r13 - .cfi_def_cfa_offset 536 - pushq %r14 - .cfi_def_cfa_offset 544 - lea 544(%rsp), %rdi - lea 560(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_cacosl.25: - call __libm_recacosl_k80@PLT -..___tag_value_cacosl.26: -..B1.60: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.13: - fstpt 416(%rsp) - pushq %rbp - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r13 - .cfi_def_cfa_offset 536 - pushq %r14 - .cfi_def_cfa_offset 544 - lea 544(%rsp), %rdi - lea 560(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_cacosl.32: - call __libm_recacoshl_k80@PLT -..___tag_value_cacosl.33: -..B1.61: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.14: - movb 537(%rsp), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - xorb $1, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - fmulp %st, %st(1) - fstpt 432(%rsp) - jmp ..B1.29 -..B1.15: - cmpq $0, 512(%rsp) - jne ..B1.17 -..B1.16: - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fldt 24(%rsp) - fstpt (%rsp) - call acosl@PLT -..B1.63: - addq $16, %rsp - .cfi_def_cfa_offset 512 - fstpt 416(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fldt 544(%rsp) - fstpt (%rsp) - call asinhl@PLT -..B1.62: - fldt .L_2il0floatpacket.9(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 512 - fmulp %st, %st(1) - fstpt 432(%rsp) - jmp ..B1.29 -..B1.17: - movzwl 536(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.53 -..B1.69: - cmpl $32767, %edx -..B1.18: - je ..B1.43 -..B1.19: - cmpl $32767, %eax - je ..B1.40 -..B1.20: - cmpq $0, 528(%rsp) - jne ..B1.25 -..B1.21: - fldt 512(%rsp) - cmpl $16383, %edx - jl ..B1.23 -..B1.22: - movb 521(%rsp), %al - lea ones(%rip), %rbp - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - fldl (%rbp,%rdx,8) - fstl (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fmulp %st, %st(1) - fstpt (%rsp) - call acoshl@PLT -..B1.65: - fstpt 24(%rsp) - fldl 16(%rsp) - fstpt (%rsp) - call acosl@PLT -..B1.64: - addq $16, %rsp - .cfi_def_cfa_offset 512 - fstpt 416(%rsp) - jmp ..B1.24 -..B1.23: - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fstpt (%rsp) - call acosl@PLT -..B1.66: - addq $16, %rsp - .cfi_def_cfa_offset 512 - lea ones(%rip), %rbp - fstpt 416(%rsp) -..B1.24: - fldt 8(%rsp) - movb 537(%rsp), %al - andb $-128, %al - shrb $7, %al - xorb $1, %al - movzbl %al, %edx - fmull (%rbp,%rdx,8) - fstpt 432(%rsp) - jmp ..B1.29 -..B1.25: - fldt 528(%rsp) - cmpl $32767, %eax - fldt 512(%rsp) - je ..B1.27 -..B1.26: - fld %st(0) - fmul %st(1), %st - jmp ..B1.28 -..B1.27: - fld %st(1) - fmul %st(2), %st -..B1.28: - movb 537(%rsp), %bpl - lea ones(%rip), %r12 - andb $-128, %bpl - shrb $7, %bpl - movb %bpl, %al - xorb $1, %al - movzbl %al, %edx - fldl (%r12,%rdx,8) - fmulp %st, %st(1) - fstpt 432(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 544 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2l@PLT -..B1.67: - movzbl %bpl, %eax - addq $32, %rsp - .cfi_def_cfa_offset 512 - fmull (%r12,%rax,8) - fstpt 416(%rsp) -..B1.29: - testb %bl, %bl - je ..B1.31 -..B1.30: - fldcw 26(%rsp) -..B1.31: - movq 448(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.39 -..B1.32: - fldt 416(%rsp) - fldt 432(%rsp) - movq 448(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 -..B1.33: - addq $464, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 512 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.34: - cmpl $0, 532(%rsp) - jne ..B1.11 -..B1.35: - cmpl $0, 528(%rsp) - jne ..B1.11 - jmp ..B1.15 -..B1.36: - cmpl $0, 516(%rsp) - jne ..B1.9 -..B1.37: - cmpl $0, 512(%rsp) - jne ..B1.9 - jmp ..B1.15 -..B1.38: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.39: - call __stack_chk_fail@PLT -..B1.40: - cmpl $-2147483648, 532(%rsp) - jne ..B1.42 -..B1.41: - cmpl $0, 528(%rsp) - je ..B1.20 -..B1.42: - fldt 528(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 512(%rsp) - fmul %st(0), %st - fstpt 432(%rsp) - jmp ..B1.29 -..B1.43: - cmpl $-2147483648, 516(%rsp) - jne ..B1.45 -..B1.44: - cmpl $0, 512(%rsp) - je ..B1.47 -..B1.45: - cmpl $32767, %eax - jge ..B1.47 -..B1.46: - fldt 512(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) - jmp ..B1.29 -..B1.47: - cmpl $-2147483648, 516(%rsp) - jne ..B1.49 -..B1.48: - cmpl $0, 512(%rsp) - je ..B1.19 -..B1.49: - cmpl $32767, %eax - jne ..B1.20 -..B1.50: - cmpl $-2147483648, 532(%rsp) - jne ..B1.52 -..B1.51: - cmpl $0, 528(%rsp) - je ..B1.40 -..B1.52: - fldt 512(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 528(%rsp) - fmul %st(0), %st - fstpt 432(%rsp) - jmp ..B1.29 -..B1.53: - cmpl $-2147483648, 532(%rsp) - jne ..B1.55 -..B1.54: - cmpl $0, 528(%rsp) - je ..B1.68 -..B1.55: - cmpl $32767, %edx - jge ..B1.18 -..B1.56: - fldt 528(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) - jmp ..B1.29 -..B1.68: - cmpl $32767, %edx - je ..B1.43 - jmp ..B1.19 - .align 16,0x90 - .cfi_endproc - .type cacosl,@function - .size cacosl,.-cacosl - .data -# -- End cacosl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/carg.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/carg.S deleted file mode 100644 index 457e309c1f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/carg.S +++ /dev/null @@ -1,73 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "carg.c" - .text -..TXTST0: -# -- Begin carg - .text - .align 16,0x90 - .globl carg -carg: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_carg.1: -..L2: - - movaps %xmm0, %xmm2 - pushq %rsi - .cfi_def_cfa_offset 16 - movaps %xmm1, %xmm0 - movaps %xmm2, %xmm1 - call atan2@PLT -..B1.4: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type carg,@function - .size carg,.-carg - .data -# -- End carg - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cargf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cargf.S deleted file mode 100644 index 4ed957a6eb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cargf.S +++ /dev/null @@ -1,76 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cargf.c" - .text -..TXTST0: -# -- Begin cargf - .text - .align 16,0x90 - .globl cargf -cargf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cargf.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - pxor %xmm1, %xmm1 - movsd %xmm0, (%rsp) - pxor %xmm0, %xmm0 - cvtss2sd 4(%rsp), %xmm0 - cvtss2sd (%rsp), %xmm1 - call atan2@PLT -..B1.4: - cvtsd2ss %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cargf,@function - .size cargf,.-cargf - .data -# -- End cargf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cargl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cargl.S deleted file mode 100644 index 8292dc4946..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cargl.S +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cargl.c" - .text -..TXTST0: -# -- Begin cargl - .text - .align 16,0x90 - .globl cargl -cargl: -# parameter 1: 16 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cargl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - fldt 64(%rsp) - fstpt (%rsp) - fldt 48(%rsp) - fstpt 16(%rsp) - call atan2l@PLT -..B1.4: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cargl,@function - .size cargl,.-cargl - .data -# -- End cargl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casin.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casin.S deleted file mode 100644 index bdd370cc0a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casin.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casin.c" - .text -..TXTST0: -# -- Begin casin - .text - .align 16,0x90 - .globl casin -casin: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_casin.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movsd %xmm1, 24(%rsp) - movzwl 30(%rsp), %eax - andl $32752, %eax - movsd %xmm0, 16(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.5 -..B1.3: - testl $1048575, 28(%rsp) - jne ..B1.7 -..B1.4: - cmpl $0, 24(%rsp) - jne ..B1.7 -..B1.5: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.6: - movb 31(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm1 - movhpd 8(%rsp), %xmm1 -..B1.7: - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - call casinh@PLT -..B1.16: - movsd %xmm0, 16(%rsp) - movzwl 22(%rsp), %eax - andl $32752, %eax - movsd %xmm1, 24(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.11 -..B1.9: - testl $1048575, 20(%rsp) - jne ..B1.13 -..B1.10: - cmpl $0, 16(%rsp) - jne ..B1.13 -..B1.11: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.12: - movb 23(%rsp), %al - notb %al - movb 15(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movsd (%rsp), %xmm1 - movb %dl, 15(%rsp) - movhpd 8(%rsp), %xmm1 -..B1.13: - movaps %xmm1, %xmm2 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm2 - movaps %xmm2, %xmm1 - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type casin,@function - .size casin,.-casin - .data -# -- End casin - .text -# -- Begin casinf - .text - .align 16,0x90 - .globl casinf -casinf: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_casinf.6: -..L7: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) - movzwl 14(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.4 -..B2.3: - testl $8388607, 12(%rsp) - jne ..B2.6 -..B2.4: - movsd %xmm0, (%rsp) -..B2.5: - movb 15(%rsp), %al - notb %al - movb 3(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 3(%rsp) - movsd (%rsp), %xmm0 -..B2.6: - call casinhf@PLT -..B2.14: - movsd %xmm0, 8(%rsp) - movzwl 10(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.9 -..B2.8: - testl $8388607, 8(%rsp) - jne ..B2.11 -..B2.9: - movsd %xmm0, (%rsp) -..B2.10: - movb 11(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm0 -..B2.11: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type casinf,@function - .size casinf,.-casinf - .data -# -- End casinf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinh.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinh.S deleted file mode 100644 index 1f39178807..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinh.S +++ /dev/null @@ -1,699 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casinh.c" - .text -..TXTST0: -# -- Begin casinhf - .text - .align 16,0x90 - .globl casinhf -casinhf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_casinhf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - cvtps2pd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 -..___tag_value_casinhf.4: - call casinh@PLT -..___tag_value_casinhf.5: -..B1.10: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - movsd %xmm0, 4(%rsp) - movzwl 6(%rsp), %eax - testl $32640, %eax - jne ..B1.4 -..B1.3: - testl $8388607, 4(%rsp) - jne ..B1.6 -..B1.4: - movzwl 10(%rsp), %eax - testl $32640, %eax - jne ..B1.7 -..B1.5: - testl $8388607, 8(%rsp) - je ..B1.7 -..B1.6: - movss .L_2il0floatpacket.12(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, (%rsp) - movsd 4(%rsp), %xmm0 -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type casinhf,@function - .size casinhf,.-casinhf - .data -# -- End casinhf - .text -# -- Begin casinh - .text - .align 16,0x90 - .globl casinh -casinh: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_casinh.8: -..L9: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - xorb %r14b, %r14b - subq $176, %rsp - .cfi_def_cfa_offset 192 - movsd %xmm0, 16(%rsp) - movsd %xmm1, 24(%rsp) -..B2.2: - fnstcw 162(%rsp) -..B2.3: - movzwl 22(%rsp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - jge ..B2.38 -..B2.4: - testl %edx, %edx - jle ..B2.61 -..B2.5: - movzwl 30(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2047, %eax - jge ..B2.39 -..B2.6: - testl %eax, %eax - jle ..B2.59 -..B2.7: - movzwl 162(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.11 -..B2.8: - orl $-64768, %edx - movw %dx, 160(%rsp) -..B2.9: - fldcw 160(%rsp) -..B2.10: - movb $1, %r14b -..B2.11: - fldt .L_2il0floatpacket.13(%rip) - lea BcrossA(%rip), %rax - movsd 24(%rsp), %xmm0 - fld %st(0) - fldt .L_2il0floatpacket.14(%rip) - movsd %xmm0, 136(%rsp) - fldt (%rax) - andps .L_2il0floatpacket.15(%rip), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - movsd 16(%rsp), %xmm1 - fadd %st, %st(4) - movsd %xmm1, 128(%rsp) - xorps .L_2il0floatpacket.16(%rip), %xmm1 - andps .L_2il0floatpacket.15(%rip), %xmm1 - movsd %xmm1, (%rsp) - fxch %st(4) - fstpt 72(%rsp) - fldt 72(%rsp) - fxch %st(3) - fsubr %st(4), %st - fstpt 104(%rsp) - fldt 104(%rsp) - fxch %st(3) - fmul %st(0), %st - fxch %st(3) - fmul %st(0), %st - fldl (%rsp) - fld %st(0) - fmul %st(1), %st - fadd %st, %st(5) - fxch %st(5) - fsqrt - fld %st(0) - fxch %st(3) - fadd %st(6), %st - fsqrt - fstpt 88(%rsp) - fldt 88(%rsp) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(2) - fld %st(5) - fdiv %st(2), %st - fxch %st(3) - fcomip %st(3), %st - jb ..B2.13 -..B2.12: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 208 - fxch %st(1) - fstpt (%rsp) - fxch %st(3) - fstpl 136(%rsp) - fstpt 16(%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - call asinl@PLT - jmp ..B2.85 - .cfi_def_cfa_offset 192 -..B2.13: - fstp %st(2) - fldt .L_2il0floatpacket.13(%rip) - fcomip %st(5), %st - jb ..B2.15 -..B2.14: - fstp %st(1) - addq $-16, %rsp - .cfi_def_cfa_offset 208 - fld %st(0) - lea halfs(%rip), %rax - fadd %st(4), %st - fmull (%rax) - fldt 88(%rsp) - fldt 104(%rsp) - fxch %st(1) - fadd %st(4), %st - fdivr %st(5), %st - fldt 120(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fsqrt - fld1 - fdivp %st, %st(1) - fmul %st(4), %st - fstpt (%rsp) - fxch %st(3) - fstpl 136(%rsp) - fstpt 16(%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - call atanl@PLT - jmp ..B2.85 - .cfi_def_cfa_offset 192 -..B2.15: - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 208 - fld %st(2) - fadd %st(5), %st - fldt 88(%rsp) - faddp %st, %st(2) - fdiv %st, %st(1) - fldt 120(%rsp) - fldt 104(%rsp) - faddp %st, %st(1) - fdivrp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.14(%rip) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - fdivr %st(3), %st - fstpt (%rsp) - fxch %st(2) - fstpl 136(%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - fldt 16(%rsp) - fstpt 16(%rsp) - call atanl@PLT -..B2.85: - fldt 48(%rsp) - fxch %st(1) - fchs - fldt 32(%rsp) - fldt 16(%rsp) - fldl 136(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 192 - fxch %st(3) - fstpl 64(%rsp) -..B2.16: - lea AcrossA(%rip), %rax - fldt (%rax) - fcomip %st(4), %st - jb ..B2.21 -..B2.17: - fldt 72(%rsp) - faddp %st, %st(1) - fldt .L_2il0floatpacket.13(%rip) - fcomip %st(3), %st - fxch %st(2) - fstp %st(0) - jbe ..B2.19 -..B2.18: - fldt 88(%rsp) - fxch %st(1) - fdiv %st, %st(2) - fldt 104(%rsp) - fsubrp %st, %st(2) - fdivp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.14(%rip) - fmulp %st, %st(1) - jmp ..B2.20 -..B2.19: - fldt 88(%rsp) - fxch %st(2) - fdivrp %st, %st(1) - fldt 104(%rsp) - faddp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.14(%rip) - fmulp %st, %st(1) -..B2.20: - fldt .L_2il0floatpacket.13(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 208 - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%rsp) - call log1pl@PLT - jmp ..B2.87 - .cfi_def_cfa_offset 192 -..B2.21: - fstp %st(0) - fstp %st(0) - fstp %st(0) - fldt .L_2il0floatpacket.13(%rip) - fld %st(1) - fmul %st(2), %st - addq $-16, %rsp - .cfi_def_cfa_offset 208 - fsubp %st, %st(1) - fsqrt - faddp %st, %st(1) - fstpt (%rsp) - call logl@PLT -..B2.87: - addq $16, %rsp - .cfi_def_cfa_offset 192 - fstpl (%rsp) - movsd (%rsp), %xmm2 -..B2.22: - lea ZEROA(%rip), %rax - movsd 136(%rsp), %xmm0 - movsd (%rax), %xmm1 - comisd %xmm1, %xmm0 - jbe ..B2.24 -..B2.23: - movsd 64(%rsp), %xmm0 - xorps .L_2il0floatpacket.16(%rip), %xmm0 - movsd %xmm0, 152(%rsp) - jmp ..B2.25 -..B2.24: - movsd 64(%rsp), %xmm0 - movsd %xmm0, 152(%rsp) -..B2.25: - comisd 128(%rsp), %xmm1 - jbe ..B2.27 -..B2.26: - xorps .L_2il0floatpacket.16(%rip), %xmm2 - movsd %xmm2, 144(%rsp) - jmp ..B2.28 -..B2.27: - movsd %xmm2, 144(%rsp) -..B2.28: - movzwl 150(%rsp), %eax - testl $32752, %eax - jne ..B2.31 -..B2.29: - testl $1048575, 148(%rsp) - jne ..B2.34 -..B2.30: - cmpl $0, 144(%rsp) - jne ..B2.34 -..B2.31: - movzwl 158(%rsp), %eax - testl $32752, %eax - jne ..B2.35 -..B2.32: - testl $1048575, 156(%rsp) - jne ..B2.34 -..B2.33: - cmpl $0, 152(%rsp) - je ..B2.35 -..B2.34: - lea _LDB_MIN_NORMAL(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 48(%rsp) -..B2.35: - testb %r14b, %r14b - je ..B2.37 -..B2.36: - fldcw 162(%rsp) -..B2.37: - movsd 144(%rsp), %xmm0 - movsd 152(%rsp), %xmm1 - addq $176, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 14, -16 -..B2.38: - movzwl 30(%rsp), %eax - andl $32752, %eax - shrl $4, %eax -..B2.39: - testl %eax, %eax - jne ..B2.43 -..B2.40: - testl $1048575, 28(%rsp) - jne ..B2.43 -..B2.41: - cmpl $0, 24(%rsp) - jne ..B2.43 -..B2.42: - movsd 16(%rsp), %xmm0 - call asinh@PLT -..B2.88: - movhpd 24(%rsp), %xmm0 - movsd %xmm0, 144(%rsp) - movhpd %xmm0, 152(%rsp) - jmp ..B2.58 -..B2.43: - testl %edx, %edx - jne ..B2.53 -..B2.44: - testl $1048575, 20(%rsp) - jne ..B2.54 -..B2.45: - cmpl $0, 16(%rsp) - jne ..B2.54 -..B2.46: - cmpl $2047, %eax - jl ..B2.49 -..B2.47: - testl $1048575, 28(%rsp) - jne ..B2.54 -..B2.48: - cmpl $0, 24(%rsp) - jne ..B2.54 -..B2.49: - movsd 24(%rsp), %xmm0 - cmpl $1023, %eax - jl ..B2.51 -..B2.50: - movb 31(%rsp), %r14b - andb $-128, %r14b - shrb $7, %r14b - movzbl %r14b, %eax - lea ones(%rip), %r14 - movsd (%r14,%rax,8), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm1, (%rsp) - call acosh@PLT -..B2.90: - movsd %xmm0, 8(%rsp) - movsd (%rsp), %xmm0 - call asin@PLT - jmp ..B2.52 -..B2.51: - pxor %xmm1, %xmm1 - movsd %xmm1, 8(%rsp) - call asin@PLT -..B2.91: - lea ones(%rip), %r14 -..B2.52: - movb 23(%rsp), %al - andb $-128, %al - shrb $7, %al - movsd %xmm0, 152(%rsp) - movsd 8(%rsp), %xmm0 - movzbl %al, %edx - mulsd (%r14,%rdx,8), %xmm0 - movsd %xmm0, 144(%rsp) - movhpd 152(%rsp), %xmm0 - jmp ..B2.58 -..B2.53: - cmpl $2047, %edx - je ..B2.71 -..B2.54: - cmpl $2047, %eax - je ..B2.67 -..B2.94: - cmpl $2047, %edx -..B2.55: - je ..B2.64 -..B2.56: - movsd 24(%rsp), %xmm0 - movaps %xmm0, %xmm3 - movsd 16(%rsp), %xmm2 - mulsd %xmm0, %xmm3 -..B2.57: - movb 23(%rsp), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movsd (%rdx,%rcx,8), %xmm1 - mulsd %xmm1, %xmm3 - mulsd %xmm2, %xmm1 - movsd %xmm3, 144(%rsp) - call atan2@PLT -..B2.92: - movsd %xmm0, 152(%rsp) - movsd 144(%rsp), %xmm0 - movhpd 152(%rsp), %xmm0 -..B2.58: - movaps %xmm0, %xmm1 - unpckhpd %xmm0, %xmm1 - addq $176, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 14, -16 -..B2.59: - testl $1048575, 28(%rsp) - jne ..B2.7 -..B2.60: - cmpl $0, 24(%rsp) - jne ..B2.7 - jmp ..B2.39 -..B2.61: - testl $1048575, 20(%rsp) - jne ..B2.5 -..B2.62: - cmpl $0, 16(%rsp) - jne ..B2.5 - jmp ..B2.38 -..B2.64: - testl $1048575, 20(%rsp) - jne ..B2.56 -..B2.65: - cmpl $0, 16(%rsp) - jne ..B2.56 -..B2.66: - movsd 16(%rsp), %xmm2 - movaps %xmm2, %xmm3 - movsd 24(%rsp), %xmm0 - mulsd %xmm2, %xmm3 - jmp ..B2.57 -..B2.67: - testl $1048575, 28(%rsp) - jne ..B2.69 -..B2.68: - cmpl $0, 24(%rsp) - je ..B2.93 -..B2.69: - cmpl $2047, %edx - jge ..B2.55 -..B2.70: - movsd 24(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm0 - movsd %xmm0, 144(%rsp) - movhpd %xmm0, 152(%rsp) - jmp ..B2.58 -..B2.71: - testl $1048575, 20(%rsp) - jne ..B2.73 -..B2.72: - cmpl $0, 16(%rsp) - je ..B2.74 -..B2.73: - cmpl $2047, %eax - je ..B2.78 -..B2.74: - testl $1048575, 20(%rsp) - jne ..B2.76 -..B2.75: - cmpl $0, 16(%rsp) - je ..B2.54 -..B2.76: - cmpl $2047, %eax - jge ..B2.54 -..B2.77: - movsd 16(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - unpcklpd %xmm0, %xmm0 - movsd %xmm0, 144(%rsp) - movhpd %xmm0, 152(%rsp) - jmp ..B2.58 -..B2.78: - testl $1048575, 28(%rsp) - jne ..B2.80 -..B2.79: - cmpl $0, 24(%rsp) - je ..B2.74 -..B2.80: - movsd 24(%rsp), %xmm1 - movsd 16(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - unpcklpd %xmm1, %xmm0 - movsd %xmm0, 144(%rsp) - movhpd %xmm0, 152(%rsp) - jmp ..B2.58 -..B2.93: - cmpl $2047, %edx - je ..B2.64 - jmp ..B2.56 - .align 16,0x90 - .cfi_endproc - .type casinh,@function - .size casinh,.-casinh - .data -# -- End casinh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,16 - .align 16 -.L_2il0floatpacket.14: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,16 - .align 16 -.L_2il0floatpacket.15: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 16 -.L_2il0floatpacket.16: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,16 - .align 16 -BcrossA: - .long 1717986918 - .long 3865470566 - .long 16382 - .long 0 - .type BcrossA,@object - .size BcrossA,16 - .align 16 -AcrossA: - .long 0 - .long 3221225472 - .long 16383 - .long 0 - .type AcrossA,@object - .size AcrossA,16 - .align 16 -ZEROA: - .long 0 - .long 0 - .type ZEROA,@object - .size ZEROA,8 - .space 8, 0x00 # pad - .align 16 -_LDB_MIN_NORMAL: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _LDB_MIN_NORMAL,@object - .size _LDB_MIN_NORMAL,16 - .align 8 -halfs: - .long 0x00000000,0x3fe00000 - .long 0x00000000,0xbfe00000 - .type halfs,@object - .size halfs,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -.L_2il0floatpacket.12: - .long 0x00800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinhl.S deleted file mode 100644 index 62d9e31076..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinhl.S +++ /dev/null @@ -1,463 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casinhl.c" - .text -..TXTST0: -# -- Begin casinhl - .text - .align 16,0x90 - .globl casinhl -casinhl: -# parameter 1: 512 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_casinhl.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $464, %rsp - .cfi_def_cfa_offset 512 - xorb %r15b, %r15b - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 448(%rsp) - fstpt 8(%rsp) - fldt 8(%rsp) - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.5: - fldcw 24(%rsp) -..B1.6: - movb $1, %r15b -..B1.7: - movzwl 520(%rsp), %esi - andl $32767, %esi - cmpl $32767, %esi - jge ..B1.15 -..B1.8: - testl %esi, %esi - jle ..B1.36 -..B1.9: - movzwl 536(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jge ..B1.15 -..B1.10: - testl %eax, %eax - jle ..B1.34 -..B1.11: - lea 32(%rsp), %rbp - lea 80(%rsp), %r12 - lea 176(%rsp), %r14 - lea 128(%rsp), %r13 - pushq %rbp - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r13 - .cfi_def_cfa_offset 536 - pushq %r14 - .cfi_def_cfa_offset 544 - lea 560(%rsp), %rdi - lea 544(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_casinhl.18: - call __libm_carctrigprepare_k80@PLT -..___tag_value_casinhl.19: -..B1.58: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.12: - pushq %rbp - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r13 - .cfi_def_cfa_offset 536 - pushq %r14 - .cfi_def_cfa_offset 544 - lea 560(%rsp), %rdi - lea 544(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_casinhl.25: - call __libm_recacoshl_k80@PLT -..___tag_value_casinhl.26: -..B1.59: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.13: - movb 521(%rsp), %al - lea ones(%rip), %r10 - andb $-128, %al - shrb $7, %al - movzbl %al, %r11d - fldl (%r10,%r11,8) - fmulp %st, %st(1) - fstpt 416(%rsp) - pushq %rbp - .cfi_def_cfa_offset 520 - pushq %r12 - .cfi_def_cfa_offset 528 - pushq %r13 - .cfi_def_cfa_offset 536 - pushq %r14 - .cfi_def_cfa_offset 544 - lea 560(%rsp), %rdi - lea 544(%rsp), %rsi - lea 400(%rsp), %rdx - lea 352(%rsp), %rcx - lea 304(%rsp), %r8 - lea 256(%rsp), %r9 -..___tag_value_casinhl.32: - call __libm_recasinl_k80@PLT -..___tag_value_casinhl.33: -..B1.60: - addq $32, %rsp - .cfi_def_cfa_offset 512 -..B1.14: - fstpt 432(%rsp) - jmp ..B1.29 -..B1.15: - movq 528(%rsp), %rax - testq %rax, %rax - jne ..B1.17 -..B1.16: - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fldt 528(%rsp) - fstpt (%rsp) - call asinhl@PLT -..B1.61: - addq $16, %rsp - .cfi_def_cfa_offset 512 - fldt 528(%rsp) - fstpt 432(%rsp) - fstpt 416(%rsp) - jmp ..B1.29 -..B1.17: - movzwl 536(%rsp), %ecx - movq 512(%rsp), %rbp - andl $32767, %ecx - testq %rbp, %rbp - jne ..B1.24 -..B1.18: - cmpl $32767, %ecx - jge ..B1.23 -..B1.19: - fldt 528(%rsp) - cmpl $16383, %ecx - jl ..B1.21 -..B1.20: - movb 537(%rsp), %al - lea ones(%rip), %rbp - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - fldl (%rbp,%rdx,8) - fstl (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fmulp %st, %st(1) - fstpt (%rsp) - call acoshl@PLT -..B1.63: - fstpt 24(%rsp) - fldl 16(%rsp) - fstpt (%rsp) - call asinl@PLT -..B1.62: - addq $16, %rsp - .cfi_def_cfa_offset 512 - fstpt 432(%rsp) - jmp ..B1.22 -..B1.21: - addq $-16, %rsp - .cfi_def_cfa_offset 528 - fstpt (%rsp) - call asinl@PLT -..B1.64: - addq $16, %rsp - .cfi_def_cfa_offset 512 - lea ones(%rip), %rbp - fstpt 432(%rsp) -..B1.22: - fldt 8(%rsp) - movb 521(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - fmull (%rbp,%rdx,8) - fstpt 416(%rsp) - jmp ..B1.29 -..B1.23: - movq $0x8000000000000000, %rdx - cmpq %rdx, %rax - je ..B1.19 -..B1.24: - cmpl $32767, %esi - je ..B1.46 -..B1.69: - cmpl $32767, %ecx -..B1.25: - je ..B1.42 -..B1.67: - cmpl $32767, %esi -..B1.26: - je ..B1.40 -..B1.27: - fldt 528(%rsp) - fld %st(0) - fmul %st(1), %st - fldt 512(%rsp) - fxch %st(2) -..B1.28: - movb 521(%rsp), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - fmul %st, %st(2) - fxch %st(2) - fstpt 416(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 544 - fxch %st(2) - fmulp %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2l@PLT -..B1.65: - addq $32, %rsp - .cfi_def_cfa_offset 512 - fstpt 432(%rsp) -..B1.29: - testb %r15b, %r15b - je ..B1.31 -..B1.30: - fldcw 26(%rsp) -..B1.31: - movq 448(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.39 -..B1.32: - fldt 416(%rsp) - fldt 432(%rsp) - movq 448(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 -..B1.33: - addq $464, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 512 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.34: - cmpl $0, 532(%rsp) - jne ..B1.11 -..B1.35: - cmpl $0, 528(%rsp) - jne ..B1.11 - jmp ..B1.15 -..B1.36: - cmpl $0, 516(%rsp) - jne ..B1.9 -..B1.37: - cmpl $0, 512(%rsp) - jne ..B1.9 - jmp ..B1.15 -..B1.38: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.39: - call __stack_chk_fail@PLT -..B1.40: - movq $0x8000000000000000, %rax - cmpq %rax, %rbp - jne ..B1.27 -..B1.41: - fldt 512(%rsp) - fld %st(0) - fmul %st(1), %st - fldt 528(%rsp) - jmp ..B1.28 -..B1.42: - cmpl $-2147483648, 532(%rsp) - jne ..B1.44 -..B1.43: - cmpl $0, 528(%rsp) - je ..B1.66 -..B1.44: - cmpl $32767, %esi - jge ..B1.26 -..B1.45: - fldt 528(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) - jmp ..B1.29 -..B1.46: - cmpl $-2147483648, 516(%rsp) - jne ..B1.48 -..B1.47: - cmpl $0, 512(%rsp) - je ..B1.49 -..B1.48: - cmpl $32767, %ecx - je ..B1.53 -..B1.49: - cmpl $-2147483648, 516(%rsp) - jne ..B1.51 -..B1.50: - cmpl $0, 512(%rsp) - je ..B1.68 -..B1.51: - cmpl $32767, %ecx - jge ..B1.25 -..B1.52: - fldt 512(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fstpt 432(%rsp) - jmp ..B1.29 -..B1.53: - cmpl $-2147483648, 532(%rsp) - jne ..B1.55 -..B1.54: - cmpl $0, 528(%rsp) - je ..B1.49 -..B1.55: - fldt 512(%rsp) - fmul %st(0), %st - fstpt 416(%rsp) - fldt 528(%rsp) - fmul %st(0), %st - fstpt 432(%rsp) - jmp ..B1.29 -..B1.66: - cmpl $32767, %esi - je ..B1.40 - jmp ..B1.27 -..B1.68: - cmpl $32767, %ecx - je ..B1.42 - jmp ..B1.67 - .align 16,0x90 - .cfi_endproc - .type casinhl,@function - .size casinhl,.-casinhl - .data -# -- End casinhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinl.S deleted file mode 100644 index 1e144dea73..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/casinl.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "casinl.c" - .text -..TXTST0: -# -- Begin casinl - .text - .align 16,0x90 - .globl casinl -casinl: -# parameter 1: 144 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_casinl.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - subq $128, %rsp - .cfi_def_cfa_offset 144 - xorb %r13b, %r13b - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 112(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 96(%rsp) -..B1.2: - fnstcw 2(%rsp) -..B1.3: - movzwl 2(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, (%rsp) -..B1.5: - fldcw (%rsp) -..B1.6: - movb $1, %r13b -..B1.7: - fldt 160(%rsp) - movzwl 168(%rsp), %eax - andl $32767, %eax - fstpt 80(%rsp) - cmpl $32767, %eax - fldt 144(%rsp) - fstpt 96(%rsp) - jl ..B1.9 -..B1.8: - movq $0x8000000000000000, %rax - cmpq 160(%rsp), %rax - jne ..B1.10 -..B1.9: - movb 169(%rsp), %al - notb %al - movb 89(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 89(%rsp) -..B1.10: - addq $-32, %rsp - .cfi_def_cfa_offset 176 - movq %rsp, %rdi - movq 112(%rsp), %rax - movq 120(%rsp), %rdx - movq 128(%rsp), %rcx - movq 136(%rsp), %rsi - movq %rax, (%rdi) - movq %rdx, 8(%rdi) - movq %rcx, 16(%rdi) - movq %rsi, 24(%rdi) - call casinhl@PLT -..B1.22: - fxch %st(1) - addq $32, %rsp - .cfi_def_cfa_offset 144 - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 24(%rsp), %eax - andl $32767, %eax - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - cmpl $32767, %eax - fstpt 48(%rsp) - fstpt 64(%rsp) - jl ..B1.12 -..B1.11: - movq $0x8000000000000000, %rax - cmpq 16(%rsp), %rax - jne ..B1.13 -..B1.12: - movb 25(%rsp), %al - notb %al - movb 73(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 73(%rsp) -..B1.13: - testb %r13b, %r13b - je ..B1.15 -..B1.14: - fldcw 2(%rsp) -..B1.15: - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.19 -..B1.16: - fldt 48(%rsp) - fldt 64(%rsp) - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.18 -..B1.17: - addq $128, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 144 - .cfi_offset 13, -16 -..B1.18: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.19: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type casinl,@function - .size casinl,.-casinl - .data -# -- End casinl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catan.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catan.S deleted file mode 100644 index dcb5372f0f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catan.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catan.c" - .text -..TXTST0: -# -- Begin catan - .text - .align 16,0x90 - .globl catan -catan: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_catan.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movsd %xmm1, 24(%rsp) - movzwl 30(%rsp), %eax - andl $32752, %eax - movsd %xmm0, 16(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.5 -..B1.3: - testl $1048575, 28(%rsp) - jne ..B1.7 -..B1.4: - cmpl $0, 24(%rsp) - jne ..B1.7 -..B1.5: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.6: - movb 31(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm1 - movhpd 8(%rsp), %xmm1 -..B1.7: - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - call catanh@PLT -..B1.16: - movsd %xmm0, 16(%rsp) - movzwl 22(%rsp), %eax - andl $32752, %eax - movsd %xmm1, 24(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.11 -..B1.9: - testl $1048575, 20(%rsp) - jne ..B1.13 -..B1.10: - cmpl $0, 16(%rsp) - jne ..B1.13 -..B1.11: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.12: - movb 23(%rsp), %al - notb %al - movb 15(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movsd (%rsp), %xmm1 - movb %dl, 15(%rsp) - movhpd 8(%rsp), %xmm1 -..B1.13: - movaps %xmm1, %xmm2 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm2 - movaps %xmm2, %xmm1 - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type catan,@function - .size catan,.-catan - .data -# -- End catan - .text -# -- Begin catanf - .text - .align 16,0x90 - .globl catanf -catanf: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_catanf.6: -..L7: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) - movzwl 14(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.4 -..B2.3: - testl $8388607, 12(%rsp) - jne ..B2.6 -..B2.4: - movsd %xmm0, (%rsp) -..B2.5: - movb 15(%rsp), %al - notb %al - movb 3(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 3(%rsp) - movsd (%rsp), %xmm0 -..B2.6: - call catanhf@PLT -..B2.14: - movsd %xmm0, 8(%rsp) - movzwl 10(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.9 -..B2.8: - testl $8388607, 8(%rsp) - jne ..B2.11 -..B2.9: - movsd %xmm0, (%rsp) -..B2.10: - movb 11(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm0 -..B2.11: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type catanf,@function - .size catanf,.-catanf - .data -# -- End catanf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanh.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanh.S deleted file mode 100644 index 5bf3d15489..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanh.S +++ /dev/null @@ -1,713 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catanh.c" - .text -..TXTST0: -# -- Begin catanhf - .text - .align 16,0x90 - .globl catanhf -catanhf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_catanhf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - cvtps2pd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 -..___tag_value_catanhf.4: - call catanh@PLT -..___tag_value_catanhf.5: -..B1.10: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - movsd %xmm0, 4(%rsp) - movzwl 6(%rsp), %eax - testl $32640, %eax - jne ..B1.4 -..B1.3: - testl $8388607, 4(%rsp) - jne ..B1.6 -..B1.4: - movzwl 10(%rsp), %eax - testl $32640, %eax - jne ..B1.7 -..B1.5: - testl $8388607, 8(%rsp) - je ..B1.7 -..B1.6: - movss .L_2il0floatpacket.12(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, (%rsp) - movsd 4(%rsp), %xmm0 -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type catanhf,@function - .size catanhf,.-catanhf - .data -# -- End catanhf - .text -# -- Begin catanh - .text - .align 16,0x90 - .globl catanh -catanh: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_catanh.8: -..L9: - - pushq %r15 - .cfi_def_cfa_offset 16 - .cfi_offset 15, -16 - pushq %rbx - .cfi_def_cfa_offset 24 - .cfi_offset 3, -24 - xorb %r15b, %r15b - subq $200, %rsp - .cfi_def_cfa_offset 224 - movsd %xmm0, (%rsp) - movsd %xmm1, 8(%rsp) -..B2.2: - fnstcw 186(%rsp) -..B2.3: - movzwl 6(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2047, %eax - jge ..B2.26 -..B2.4: - testl %eax, %eax - jle ..B2.54 -..B2.5: - movzwl 14(%rsp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $2047, %edx - jge ..B2.27 -..B2.6: - testl %edx, %edx - jle ..B2.52 -..B2.7: - movzwl 186(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.11 -..B2.8: - orl $-64768, %edx - movw %dx, 184(%rsp) -..B2.9: - fldcw 184(%rsp) -..B2.10: - movb $1, %r15b -..B2.11: - fldl (%rsp) - fstl 160(%rsp) - fmul %st(0), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fldl 8(%rsp) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt .L_2il0floatpacket.13(%rip) - fldt pc_thresh(%rip) - fxch %st(4) - fsubrp %st, %st(1) - fsubp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fabs - fcomip %st(2), %st - fxch %st(1) - fstp %st(0) - jae ..B2.13 - jp ..B2.13 -..B2.12: - fldt .L_2il0floatpacket.13(%rip) - faddl 160(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 256 - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fxch %st(1) - fstpt 16(%rsp) - fstpt 32(%rsp) - call atan2l@PLT -..B2.79: - fldt 32(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 224 - fchs - fxch %st(1) - fstpt 112(%rsp) - fldt .L_2il0floatpacket.13(%rip) - fsubl 160(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 256 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 48(%rsp) - call atan2l@PLT -..B2.78: - fldt 48(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 224 - fldt .L_2il0floatpacket.14(%rip) - fxch %st(2) - fstpt 128(%rsp) - fldt 112(%rsp) - fldt 128(%rsp) - fsubrp %st, %st(1) - fmul %st(2), %st - fstpl 176(%rsp) - jmp ..B2.14 -..B2.13: - fldt 96(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 256 - fldt .L_2il0floatpacket.15(%rip) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2l@PLT -..B2.80: - fldt .L_2il0floatpacket.14(%rip) - addq $32, %rsp - .cfi_def_cfa_offset 224 - fldt .L_2il0floatpacket.13(%rip) - fld %st(0) - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - fstpl 176(%rsp) - fldl 160(%rsp) - fadd %st, %st(2) - fxch %st(2) - fstpt 80(%rsp) - fsubp %st, %st(1) -..B2.14: - fldt 80(%rsp) - lea ones(%rip), %rdx - fstpt 112(%rsp) - fchs - fldt 112(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fldt 64(%rsp) - fadd %st, %st(1) - fxch %st(1) - fstpt 144(%rsp) - fxch %st(1) - fstpt 128(%rsp) - fldt 128(%rsp) - fldt 128(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 96(%rsp) - fldt 144(%rsp) - fldt 96(%rsp) - fdivrp %st, %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fldt .L_2il0floatpacket.13(%rip) - fldt pc_thresh(%rip) - movb 121(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fxch %st(2) - fmull (%rdx,%rcx,8) - fstpt 112(%rsp) - fldt 112(%rsp) - fsubp %st, %st(1) - fabs - fcomip %st(1), %st - fstp %st(0) - jbe ..B2.16 -..B2.15: - fstp %st(0) - fldt 112(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 240 - fstpt (%rsp) - call logl@PLT -..B2.81: - fldt .L_2il0floatpacket.16(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 224 - fmulp %st, %st(1) - fstpl 168(%rsp) - jmp ..B2.17 -..B2.16: - fldt 48(%rsp) - fldt 64(%rsp) - faddp %st, %st(1) - fldt .L_2il0floatpacket.13(%rip) - faddp %st, %st(1) - fstpt 96(%rsp) - fldt .L_2il0floatpacket.15(%rip) - fmull 160(%rsp) - fstpt 144(%rsp) - fldt 144(%rsp) - fldt 96(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 240 - fdivrp %st, %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atanhl@PLT -..B2.82: - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 224 - fmulp %st, %st(1) - fstpl 168(%rsp) -..B2.17: - movzwl 174(%rsp), %eax - testl $32752, %eax - jne ..B2.20 -..B2.18: - testl $1048575, 172(%rsp) - jne ..B2.23 -..B2.19: - cmpl $0, 168(%rsp) - jne ..B2.23 -..B2.20: - movzwl 182(%rsp), %eax - testl $32752, %eax - jne ..B2.24 -..B2.21: - testl $1048575, 180(%rsp) - jne ..B2.23 -..B2.22: - cmpl $0, 176(%rsp) - je ..B2.24 -..B2.23: - lea _LDB_MIN_NORMAL(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 32(%rsp) -..B2.24: - testb %r15b, %r15b - je ..B2.51 -..B2.25: - fldcw 186(%rsp) - jmp ..B2.51 -..B2.26: - movzwl 14(%rsp), %edx - andl $32752, %edx - shrl $4, %edx -..B2.27: - cmpl $2047, %eax - je ..B2.68 -..B2.28: - cmpl $2047, %edx - je ..B2.61 -..B2.29: - cmpl $2047, %edx - jge ..B2.50 -..B2.30: - testl %eax, %eax - jle ..B2.59 -..B2.31: - cmpl $1023, %eax - jge ..B2.33 -..B2.32: - movsd (%rsp), %xmm0 - call atanh@PLT -..B2.83: - movb 15(%rsp), %dl - lea zeros(%rip), %rax - andb $-128, %dl - lea ones(%rip), %rcx - movsd %xmm0, 168(%rsp) - shrb $7, %dl - movsd (%rax), %xmm1 - movzbl %dl, %ebx - mulsd (%rcx,%rbx,8), %xmm1 - movsd %xmm1, 176(%rsp) - jmp ..B2.51 -..B2.33: - je ..B2.57 -..B2.34: - cmpl $2047, %eax - jge ..B2.49 -..B2.35: - movzwl 186(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.39 -..B2.36: - orl $-64768, %edx - movw %dx, 184(%rsp) -..B2.37: - fldcw 184(%rsp) -..B2.38: - movb $1, %r15b -..B2.39: - fldl (%rsp) - fld %st(0) - fmul %st(1), %st - fldl 8(%rsp) - fmul %st(0), %st - fldt .L_2il0floatpacket.13(%rip) - fld %st(0) - fadd %st(4), %st - fstpt 112(%rsp) - fld %st(0) - fsub %st(4), %st - fchs - fldt 112(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fadd %st(3), %st - fstpt 144(%rsp) - fstpt 128(%rsp) - fldt 128(%rsp) - fldt 128(%rsp) - fmulp %st, %st(1) - fadd %st(2), %st - fstpt 96(%rsp) - fldt 144(%rsp) - fldt 96(%rsp) - fdivrp %st, %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fldt pc_thresh(%rip) - movb 121(%rsp), %bl - andb $-128, %bl - shrb $7, %bl - movzbl %bl, %eax - lea ones(%rip), %rbx - fxch %st(1) - fmull (%rbx,%rax,8) - fstpt 112(%rsp) - fldt 112(%rsp) - fsub %st(2), %st - fabs - fcomip %st(1), %st - fstp %st(0) - jbe ..B2.41 -..B2.40: - fstp %st(0) - fstp %st(0) - fstp %st(0) - fstp %st(0) - fldt 112(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 240 - fstpt (%rsp) - call logl@PLT -..B2.84: - fldt .L_2il0floatpacket.16(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 224 - fmulp %st, %st(1) - fstpl 168(%rsp) - jmp ..B2.42 -..B2.41: - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 96(%rsp) - fldt .L_2il0floatpacket.15(%rip) - fmulp %st, %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - fldt 96(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 240 - fdivrp %st, %st(1) - fstpt (%rsp) - call atanhl@PLT -..B2.85: - fldt .L_2il0floatpacket.14(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 224 - fmulp %st, %st(1) - fstpl 168(%rsp) -..B2.42: - movzwl 174(%rsp), %eax - testl $32752, %eax - jne ..B2.46 -..B2.43: - testl $1048575, 172(%rsp) - jne ..B2.45 -..B2.44: - cmpl $0, 168(%rsp) - je ..B2.46 -..B2.45: - lea _LDB_MIN_NORMAL(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 32(%rsp) -..B2.46: - testb %r15b, %r15b - je ..B2.48 -..B2.47: - fldcw 186(%rsp) -..B2.48: - movb 15(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rbx,%rdx,8), %xmm0 - call asin@PLT - jmp ..B2.88 -..B2.49: - movb 7(%rsp), %al - lea ones(%rip), %rbx - andb $-128, %al - shrb $7, %al - pxor %xmm0, %xmm0 - movb 15(%rsp), %cl - andb $-128, %cl - shrb $7, %cl - movzbl %al, %edx - movzbl %cl, %esi - mulsd (%rbx,%rdx,8), %xmm0 - movsd %xmm0, 168(%rsp) - movsd (%rbx,%rsi,8), %xmm0 - call asin@PLT - jmp ..B2.88 -..B2.50: - movb 7(%rsp), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - pxor %xmm0, %xmm0 - movzbl %al, %ecx - mulsd (%rdx,%rcx,8), %xmm0 - movsd %xmm0, 168(%rsp) - movsd 8(%rsp), %xmm0 - call atan@PLT -..B2.88: - movsd %xmm0, 176(%rsp) -..B2.51: - movsd 168(%rsp), %xmm0 - movsd 176(%rsp), %xmm1 - addq $200, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 224 - .cfi_offset 3, -24 - .cfi_offset 15, -16 -..B2.52: - testl $1048575, 12(%rsp) - jne ..B2.7 -..B2.53: - cmpl $0, 8(%rsp) - jne ..B2.7 - jmp ..B2.27 -..B2.54: - testl $1048575, 4(%rsp) - jne ..B2.5 -..B2.55: - cmpl $0, (%rsp) - jne ..B2.5 - jmp ..B2.26 -..B2.57: - testl $1048575, 4(%rsp) - jne ..B2.34 -..B2.58: - cmpl $0, (%rsp) - je ..B2.32 - jmp ..B2.34 -..B2.59: - testl $1048575, 4(%rsp) - jne ..B2.31 -..B2.60: - cmpl $0, (%rsp) - jne ..B2.31 - jmp ..B2.50 -..B2.61: - testl $1048575, 12(%rsp) - jne ..B2.63 -..B2.62: - cmpl $0, 8(%rsp) - je ..B2.29 -..B2.63: - cmpl $2047, %eax - jge ..B2.29 -..B2.64: - testl %eax, %eax - jle ..B2.66 -..B2.65: - movsd 8(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 168(%rsp) - movsd %xmm0, 176(%rsp) - jmp ..B2.51 -..B2.66: - testl $1048575, 4(%rsp) - jne ..B2.65 -..B2.67: - cmpl $0, (%rsp) - jne ..B2.65 - jmp ..B2.29 -..B2.68: - testl $1048575, 4(%rsp) - jne ..B2.70 -..B2.69: - cmpl $0, (%rsp) - je ..B2.28 -..B2.70: - cmpl $2047, %edx - jge ..B2.72 -..B2.71: - movsd (%rsp), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 168(%rsp) - movsd %xmm0, 176(%rsp) - jmp ..B2.51 -..B2.72: - testl $1048575, 12(%rsp) - jne ..B2.75 -..B2.73: - cmpl $0, 8(%rsp) - jne ..B2.75 -..B2.74: - movsd (%rsp), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, (%rsp) - movsd 8(%rsp), %xmm0 - movq $0, 168(%rsp) - call atan@PLT - jmp ..B2.88 -..B2.75: - movsd 8(%rsp), %xmm1 - movsd (%rsp), %xmm0 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - movsd %xmm0, 168(%rsp) - movsd %xmm1, 176(%rsp) - jmp ..B2.51 - .align 16,0x90 - .cfi_endproc - .type catanh,@function - .size catanh,.-catanh - .data -# -- End catanh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,16 - .align 16 -.L_2il0floatpacket.14: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,16 - .align 16 -.L_2il0floatpacket.15: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 16 -.L_2il0floatpacket.16: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,16 - .align 16 -pc_thresh: - .byte 0x00,0xc0,0xf5,0x28,0x5c,0x8f,0xc2,0xf5,0xf9,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type pc_thresh,@object - .size pc_thresh,16 - .align 16 -_LDB_MIN_NORMAL: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _LDB_MIN_NORMAL,@object - .size _LDB_MIN_NORMAL,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -zeros: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .type zeros,@object - .size zeros,16 - .align 4 -.L_2il0floatpacket.12: - .long 0x00800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanhl.S deleted file mode 100644 index b30a49259c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanhl.S +++ /dev/null @@ -1,2753 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catanhl.c" - .text -..TXTST0: -# -- Begin catanhl - .text - .align 16,0x90 - .globl catanhl -catanhl: -# parameter 1: 80 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_catanhl.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - .cfi_offset 6, -16 - subq $64, %rsp - .cfi_def_cfa_offset 80 - xorb %bpl, %bpl - fldt .L_2il0floatpacket.17(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 48(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 32(%rsp) -..B1.2: - fnstcw 2(%rsp) -..B1.3: - movzwl 2(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, (%rsp) -..B1.5: - fldcw (%rsp) -..B1.6: - movb $1, %bpl -..B1.7: - movzwl 88(%rsp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.14 -..B1.8: - testl %edx, %edx - jle ..B1.35 -..B1.9: - movzwl 104(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jge ..B1.15 -..B1.10: - testl %eax, %eax - jle ..B1.33 -..B1.11: - addq $-32, %rsp - .cfi_def_cfa_offset 112 - fldt 112(%rsp) - fstpt (%rsp) - fldt 128(%rsp) - fstpt 16(%rsp) -..___tag_value_catanhl.7: - call recatanhl -..___tag_value_catanhl.8: -..B1.56: - addq $32, %rsp - .cfi_def_cfa_offset 80 -..B1.12: - fstpt 16(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 112 - fldt 112(%rsp) - fstpt (%rsp) - fldt 128(%rsp) - fstpt 16(%rsp) -..___tag_value_catanhl.11: - call imcatanhl -..___tag_value_catanhl.12: -..B1.57: - addq $32, %rsp - .cfi_def_cfa_offset 80 -..B1.13: - fstpt 32(%rsp) - jmp ..B1.28 -..B1.14: - movzwl 104(%rsp), %eax - andl $32767, %eax -..B1.15: - cmpl $32767, %edx - je ..B1.47 -..B1.16: - cmpl $32767, %eax - je ..B1.41 -..B1.17: - cmpl $32767, %eax - jge ..B1.27 -..B1.18: - cmpl $0, 84(%rsp) - jne ..B1.20 -..B1.19: - cmpl $0, 80(%rsp) - je ..B1.27 -..B1.20: - cmpl $16383, %edx - jge ..B1.22 -..B1.21: - addq $-16, %rsp - .cfi_def_cfa_offset 96 - fldt 96(%rsp) - fstpt (%rsp) - call atanhl@PLT -..B1.58: - addq $16, %rsp - .cfi_def_cfa_offset 80 - lea 64+_CONSTANTS(%rip), %rax - movb 105(%rsp), %dl - lea _CONSTANTS(%rip), %rcx - andb $-128, %dl - fstpt 16(%rsp) - fldt (%rax) - shrb $7, %dl - movzbl %dl, %esi - shlq $4, %rsi - fldt (%rcx,%rsi) - fmulp %st, %st(1) - fstpt 32(%rsp) - jmp ..B1.28 -..B1.22: - je ..B1.38 -..B1.23: - cmpl $32767, %edx - jl ..B1.25 -..B1.24: - movb 89(%rsp), %dl - lea 64+_CONSTANTS(%rip), %rax - andb $-128, %dl - lea _CONSTANTS(%rip), %rdi - shrb $7, %dl - fldt (%rax) - movzbl %dl, %ecx - shlq $4, %rcx - fldt (%rdi,%rcx) - fmulp %st, %st(1) - fstpt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 96 - movb 121(%rsp), %sil - andb $-128, %sil - shrb $7, %sil - movzbl %sil, %r8d - shlq $4, %r8 - fldt (%rdi,%r8) - fstpt (%rsp) - call asinl@PLT - jmp ..B1.62 - .cfi_def_cfa_offset 80 -..B1.25: - addq $-32, %rsp - .cfi_def_cfa_offset 112 - fldt 112(%rsp) - fstpt (%rsp) - fldt 128(%rsp) - fstpt 16(%rsp) -..___tag_value_catanhl.19: - call recatanhl -..___tag_value_catanhl.20: -..B1.60: - addq $32, %rsp - .cfi_def_cfa_offset 80 -..B1.26: - fstpt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 96 - movb 121(%rsp), %al - lea _CONSTANTS(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - shlq $4, %rcx - fldt (%rdx,%rcx) - fstpt (%rsp) - call asinl@PLT - jmp ..B1.62 - .cfi_def_cfa_offset 80 -..B1.27: - movb 89(%rsp), %dl - lea 64+_CONSTANTS(%rip), %rax - andb $-128, %dl - lea _CONSTANTS(%rip), %rcx - shrb $7, %dl - fldt (%rax) - movzbl %dl, %esi - shlq $4, %rsi - fldt (%rcx,%rsi) - fmulp %st, %st(1) - fstpt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 96 - fldt 112(%rsp) - fstpt (%rsp) - call atanl@PLT -..B1.62: - addq $16, %rsp - .cfi_def_cfa_offset 80 - fstpt 32(%rsp) -..B1.28: - testb %bpl, %bpl - je ..B1.30 -..B1.29: - fldcw 2(%rsp) -..B1.30: - movq 48(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.40 -..B1.31: - fldt 16(%rsp) - fldt 32(%rsp) - movq 48(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.39 -..B1.32: - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 80 - .cfi_offset 6, -16 -..B1.33: - cmpl $0, 100(%rsp) - jne ..B1.11 -..B1.34: - cmpl $0, 96(%rsp) - jne ..B1.11 - jmp ..B1.15 -..B1.35: - cmpl $0, 84(%rsp) - jne ..B1.9 -..B1.36: - cmpl $0, 80(%rsp) - jne ..B1.9 - jmp ..B1.14 -..B1.38: - movq $0x8000000000000000, %rax - cmpq 80(%rsp), %rax - je ..B1.21 - jmp ..B1.23 -..B1.39: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.40: - call __stack_chk_fail@PLT -..B1.41: - cmpl $-2147483648, 100(%rsp) - jne ..B1.43 -..B1.42: - cmpl $0, 96(%rsp) - je ..B1.17 -..B1.43: - cmpl $32767, %edx - jge ..B1.17 -..B1.44: - cmpl $0, 84(%rsp) - jne ..B1.46 -..B1.45: - cmpl $0, 80(%rsp) - je ..B1.17 -..B1.46: - fldt 96(%rsp) - fmul %st(0), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 32(%rsp) - jmp ..B1.28 -..B1.47: - cmpl $-2147483648, 84(%rsp) - jne ..B1.49 -..B1.48: - cmpl $0, 80(%rsp) - je ..B1.16 -..B1.49: - cmpl $32767, %eax - jge ..B1.51 -..B1.50: - fldt 80(%rsp) - fmul %st(0), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 32(%rsp) - jmp ..B1.28 -..B1.51: - fldt 80(%rsp) - movq $0x8000000000000000, %rax - cmpq 96(%rsp), %rax - je ..B1.53 -..B1.52: - fmul %st(0), %st - fstpt 16(%rsp) - fldt 96(%rsp) - fmul %st(0), %st - fstpt 32(%rsp) - jmp ..B1.28 -..B1.53: - fmul %st(0), %st - lea 64+_CONSTANTS(%rip), %rax - fstpt 80(%rsp) - fldt (%rax) - fstpt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 96 - fldt 112(%rsp) - fstpt (%rsp) - call atanl@PLT - jmp ..B1.62 - .align 16,0x90 - .cfi_endproc - .type catanhl,@function - .size catanhl,.-catanhl - .data -# -- End catanhl - .text -# -- Begin recatanhl - .text - .align 16,0x90 -recatanhl: -# parameter 1: 576 + %rsp -# parameter 2: 592 + %rsp -..B2.1: - .cfi_startproc -..___tag_value_recatanhl.33: -..L34: - - subq $568, %rsp - .cfi_def_cfa_offset 576 - lea 64+_CONSTANTS(%rip), %rdx - fldt 576(%rsp) - lea 128(%rsp), %rdi - movq %fs:40, %rax - xorq %rsp, %rax - fldt (%rdx) - movq %rax, 432(%rdi) - movl $0, 32(%rdi) - fstpt (%rsp) - fldt (%rsp) - fxch %st(1) - fstpt (%rdi) - fstpt 16(%rdi) -..___tag_value_recatanhl.36: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.37: -..B2.2: - fldt 592(%rsp) - lea 176(%rsp), %rdi - movl $0, 32(%rdi) - fstpt (%rdi) - fldt (%rsp) - fstpt 16(%rdi) -..___tag_value_recatanhl.38: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.39: -..B2.3: - fldt (%rsp) - lea _CONSTANTS(%rip), %rax - movzwl 136(%rsp), %edx - movl %edx, %esi - andl $32767, %esi - xorl %r9d, %r9d - movl $0, 256(%rsp) - cmpl $8383, %esi - fstpt 240(%rsp) - fldt (%rax) - fstpt 224(%rsp) - jl ..B2.7 -..B2.4: - cmpl $24383, %esi - jg ..B2.7 -..B2.5: - movzwl 232(%rsp), %r8d - movl %r8d, %ecx - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B2.7 -..B2.6: - cmpl $24383, %ecx - jle ..B2.10 -..B2.7: - lea 128(%rsp), %rdi -..___tag_value_recatanhl.40: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.41: -..B2.8: - lea 224(%rsp), %rdi -..___tag_value_recatanhl.42: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.43: -..B2.9: - movzwl 136(%rsp), %edx - movl %edx, %esi - movzwl 232(%rsp), %r8d - movl %r8d, %ecx - movl 256(%rsp), %r9d - andl $32767, %esi - andl $32767, %ecx -..B2.10: - movl 160(%rsp), %edi - lea -134(%r9,%rcx), %r10d - lea (%rsi,%rdi), %eax - cmpl %r10d, %eax - jle ..B2.27 -..B2.11: - movl 132(%rsp), %r11d - lea 134(%r9,%rcx), %r10d - cmpl %r10d, %eax - jge ..B2.28 -..B2.12: - testl %r11d, %r11d - jne ..B2.14 -..B2.13: - cmpl $0, 128(%rsp) - je ..B2.29 -..B2.14: - cmpl $0, 228(%rsp) - jne ..B2.16 -..B2.15: - cmpl $0, 224(%rsp) - je ..B2.28 -..B2.16: - cmpl %r9d, %edi - je ..B2.18 -..B2.17: - fldt 128(%rsp) - subl %r9d, %edi - fldt 144(%rsp) - addl $16383, %edi - andb $127, 9(%rsp) - andl $32767, %edi - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r9d, 160(%rsp) - fxch %st(2) - fstpt 128(%rsp) - fldt 128(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - movzwl 136(%rsp), %edx - jmp ..B2.19 -..B2.18: - fldt 128(%rsp) - fldt 144(%rsp) -..B2.19: - fldt 224(%rsp) - andl $32767, %edx - andl $32767, %r8d - fld %st(2) - movl %r9d, 304(%rsp) - cmpl %r8d, %edx - fadd %st(1), %st - jg ..B2.24 -..B2.20: - jne ..B2.25 -..B2.21: - movl 132(%rsp), %eax - movl 228(%rsp), %edx - cmpl %edx, %eax - ja ..B2.24 -..B2.22: - jne ..B2.25 -..B2.23: - movl 128(%rsp), %eax - cmpl 224(%rsp), %eax - jbe ..B2.25 -..B2.24: - fldt 240(%rsp) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - jmp ..B2.26 -..B2.25: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 240(%rsp) - faddp %st, %st(2) -..B2.26: - fld %st(1) - fadd %st(1), %st - fstpt 272(%rsp) - fldt 272(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 288(%rsp) - jmp ..B2.33 -..B2.27: - movl 132(%rsp), %r11d -..B2.28: - testl %r11d, %r11d - jne ..B2.30 -..B2.162: - cmpl $0, 128(%rsp) -..B2.29: - je ..B2.31 -..B2.30: - lea -16517(%r9,%rcx), %eax - lea -16383(%rdi,%rsi), %edx - cmpl %edx, %eax - jl ..B2.32 -..B2.31: - movaps 224(%rsp), %xmm0 - movaps 240(%rsp), %xmm1 - movaps 256(%rsp), %xmm2 - movaps %xmm0, 272(%rsp) - movaps %xmm1, 288(%rsp) - movaps %xmm2, 304(%rsp) - jmp ..B2.33 -..B2.32: - movaps 128(%rsp), %xmm0 - movaps 144(%rsp), %xmm1 - movaps 160(%rsp), %xmm2 - movaps %xmm0, 272(%rsp) - movaps %xmm1, 288(%rsp) - movaps %xmm2, 304(%rsp) -..B2.33: - movzwl 280(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.35 -..B2.34: - cmpl $24383, %eax - jle ..B2.37 -..B2.35: - lea 272(%rsp), %rdi -..___tag_value_recatanhl.44: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.45: -..B2.36: - lea 272(%rsp), %rdi -..___tag_value_recatanhl.46: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.47: -..B2.37: - fldt 272(%rsp) - lea 80+_CONSTANTS(%rip), %rdx - fld %st(0) - fld %st(1) - fld %st(2) - fldt 288(%rsp) - fmulp %st, %st(4) - movl 304(%rsp), %eax - fxch %st(3) - fadd %st(0), %st - fldt (%rdx) - addl %eax, %eax - fmul %st, %st(3) - movl %eax, 352(%rsp) - fxch %st(2) - fsub %st(3), %st - movzwl 184(%rsp), %eax - faddp %st, %st(3) - fld %st(2) - andl $32767, %eax - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(4) - fmul %st(4), %st - cmpl $8383, %eax - fadd %st(0), %st - fxch %st(2) - fstpt 16(%rsp) - fxch %st(3) - fmul %st(0), %st - fld %st(1) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 320(%rsp) - fldt 320(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 336(%rsp) - jl ..B2.39 -..B2.38: - cmpl $24383, %eax - jle ..B2.41 -..B2.39: - lea 176(%rsp), %rdi -..___tag_value_recatanhl.48: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.49: -..B2.40: - lea 176(%rsp), %rdi -..___tag_value_recatanhl.50: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.51: -..B2.41: - fldt 176(%rsp) - fld %st(0) - fld %st(1) - fldt 16(%rsp) - fldt 192(%rsp) - fmul %st(4), %st - movzwl 328(%rsp), %edx - movl %edx, %esi - andl $32767, %esi - fadd %st(0), %st - fxch %st(4) - fmulp %st, %st(1) - movl 208(%rsp), %r9d - fsubr %st, %st(2) - addl %r9d, %r9d - faddp %st, %st(2) - fld %st(1) - cmpl $8383, %esi - fmul %st(2), %st - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(2) - movl %r9d, 400(%rsp) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsub %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(1) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 368(%rsp) - fldt 368(%rsp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 384(%rsp) - fstpt 32(%rsp) - jl ..B2.45 -..B2.42: - cmpl $24383, %esi - jg ..B2.45 -..B2.43: - movzwl 376(%rsp), %r8d - movl %r8d, %ecx - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B2.45 -..B2.44: - cmpl $24383, %ecx - jle ..B2.48 -..B2.45: - lea 320(%rsp), %rdi -..___tag_value_recatanhl.52: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.53: -..B2.46: - lea 368(%rsp), %rdi -..___tag_value_recatanhl.54: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.55: -..B2.47: - movzwl 328(%rsp), %edx - movl %edx, %esi - movzwl 376(%rsp), %r8d - movl %r8d, %ecx - movl 400(%rsp), %r9d - andl $32767, %esi - andl $32767, %ecx -..B2.48: - movl 352(%rsp), %edi - lea -134(%r9,%rcx), %r10d - lea (%rsi,%rdi), %eax - cmpl %r10d, %eax - jle ..B2.65 -..B2.49: - movl 324(%rsp), %r11d - lea 134(%r9,%rcx), %r10d - cmpl %r10d, %eax - jge ..B2.66 -..B2.50: - testl %r11d, %r11d - jne ..B2.52 -..B2.51: - cmpl $0, 320(%rsp) - je ..B2.67 -..B2.52: - cmpl $0, 372(%rsp) - jne ..B2.54 -..B2.53: - cmpl $0, 368(%rsp) - je ..B2.66 -..B2.54: - cmpl %r9d, %edi - je ..B2.56 -..B2.55: - fldt 32(%rsp) - subl %r9d, %edi - fstpt (%rsp) - addl $16383, %edi - fldt 320(%rsp) - andl $32767, %edi - fldt 336(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r9d, 352(%rsp) - fxch %st(2) - fstpt 320(%rsp) - fldt 320(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 336(%rsp) - fldt 336(%rsp) - fxch %st(1) - fstpt 32(%rsp) - movzwl 328(%rsp), %edx - jmp ..B2.57 -..B2.56: - fldt 320(%rsp) - fstpt 32(%rsp) - fldt 336(%rsp) -..B2.57: - fldt 368(%rsp) - andl $32767, %edx - fldt 32(%rsp) - andl $32767, %r8d - movl %r9d, 448(%rsp) - cmpl %r8d, %edx - fadd %st(1), %st - jg ..B2.62 -..B2.58: - jne ..B2.63 -..B2.59: - movl 324(%rsp), %eax - movl 372(%rsp), %edx - cmpl %edx, %eax - ja ..B2.62 -..B2.60: - jne ..B2.63 -..B2.61: - movl 320(%rsp), %eax - cmpl 368(%rsp), %eax - jbe ..B2.63 -..B2.62: - fldt 32(%rsp) - fsub %st(1), %st - faddp %st, %st(2) - fldt 384(%rsp) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B2.64 -..B2.63: - fldt 32(%rsp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 384(%rsp) - faddp %st, %st(1) - fstpt 32(%rsp) -..B2.64: - fldt 32(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 432(%rsp) - jmp ..B2.71 -..B2.65: - movl 324(%rsp), %r11d -..B2.66: - testl %r11d, %r11d - jne ..B2.68 -..B2.164: - cmpl $0, 320(%rsp) -..B2.67: - je ..B2.69 -..B2.68: - lea -16517(%r9,%rcx), %eax - lea -16383(%rdi,%rsi), %edx - cmpl %edx, %eax - jl ..B2.70 -..B2.69: - movaps 368(%rsp), %xmm0 - movaps 384(%rsp), %xmm1 - movaps 400(%rsp), %xmm2 - movaps %xmm0, 416(%rsp) - movaps %xmm1, 432(%rsp) - movaps %xmm2, 448(%rsp) - jmp ..B2.71 -..B2.70: - movaps 320(%rsp), %xmm0 - movaps 336(%rsp), %xmm1 - movaps 352(%rsp), %xmm2 - movaps %xmm0, 416(%rsp) - movaps %xmm1, 432(%rsp) - movaps %xmm2, 448(%rsp) -..B2.71: - movzwl 136(%rsp), %edx - movl %edx, %esi - andl $32767, %esi - cmpl $8383, %esi - jl ..B2.75 -..B2.72: - cmpl $24383, %esi - jg ..B2.75 -..B2.73: - movzwl 232(%rsp), %r9d - movl %r9d, %ecx - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B2.75 -..B2.74: - cmpl $24383, %ecx - jle ..B2.78 -..B2.75: - lea 128(%rsp), %rdi -..___tag_value_recatanhl.56: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.57: -..B2.76: - lea 224(%rsp), %rdi -..___tag_value_recatanhl.58: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.59: -..B2.77: - movzwl 136(%rsp), %edx - movl %edx, %esi - movzwl 232(%rsp), %r9d - movl %r9d, %ecx - andl $32767, %esi - andl $32767, %ecx -..B2.78: - movl 160(%rsp), %edi - movl 256(%rsp), %r8d - lea (%rsi,%rdi), %eax - lea -134(%r8,%rcx), %r10d - cmpl %r10d, %eax - jle ..B2.95 -..B2.79: - movl 132(%rsp), %r11d - lea 134(%r8,%rcx), %r10d - cmpl %r10d, %eax - jge ..B2.96 -..B2.80: - testl %r11d, %r11d - jne ..B2.82 -..B2.81: - cmpl $0, 128(%rsp) - je ..B2.97 -..B2.82: - cmpl $0, 228(%rsp) - jne ..B2.84 -..B2.83: - cmpl $0, 224(%rsp) - je ..B2.96 -..B2.84: - cmpl %r8d, %edi - je ..B2.86 -..B2.85: - fldt 32(%rsp) - subl %r8d, %edi - fstpt (%rsp) - addl $16383, %edi - fldt 128(%rsp) - andl $32767, %edi - fldt 144(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r8d, 160(%rsp) - fxch %st(2) - fstpt 128(%rsp) - fldt 128(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - movzwl 136(%rsp), %edx - jmp ..B2.87 -..B2.86: - fldt 128(%rsp) - fldt 144(%rsp) -..B2.87: - fldt 224(%rsp) - andl $32767, %edx - andl $32767, %r9d - fld %st(2) - movl %r8d, 304(%rsp) - cmpl %r9d, %edx - fsub %st(1), %st - jg ..B2.92 -..B2.88: - jne ..B2.93 -..B2.89: - movl 132(%rsp), %eax - movl 228(%rsp), %edx - cmpl %edx, %eax - ja ..B2.92 -..B2.90: - jne ..B2.93 -..B2.91: - movl 128(%rsp), %eax - cmpl 224(%rsp), %eax - jbe ..B2.93 -..B2.92: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 240(%rsp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - jmp ..B2.94 -..B2.93: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 240(%rsp) - fsubrp %st, %st(2) -..B2.94: - fld %st(1) - fadd %st(1), %st - fstpt 272(%rsp) - fldt 272(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 288(%rsp) - jmp ..B2.101 -..B2.95: - movl 132(%rsp), %r11d -..B2.96: - testl %r11d, %r11d - jne ..B2.98 -..B2.161: - cmpl $0, 128(%rsp) -..B2.97: - je ..B2.99 -..B2.98: - lea -16517(%r8,%rcx), %eax - lea -16383(%rdi,%rsi), %edx - cmpl %edx, %eax - jl ..B2.100 -..B2.99: - fldt 224(%rsp) - fchs - movl %r8d, 304(%rsp) - fstpt 272(%rsp) - fldt 240(%rsp) - fchs - fstpt 288(%rsp) - jmp ..B2.101 -..B2.100: - movaps 128(%rsp), %xmm0 - movaps 144(%rsp), %xmm1 - movaps 160(%rsp), %xmm2 - movaps %xmm0, 272(%rsp) - movaps %xmm1, 288(%rsp) - movaps %xmm2, 304(%rsp) -..B2.101: - movzwl 280(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.103 -..B2.102: - cmpl $24383, %eax - jle ..B2.105 -..B2.103: - lea 272(%rsp), %rdi -..___tag_value_recatanhl.60: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.61: -..B2.104: - lea 272(%rsp), %rdi -..___tag_value_recatanhl.62: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.63: -..B2.105: - fldt 272(%rsp) - fld %st(0) - fld %st(1) - fldt 16(%rsp) - fldt 288(%rsp) - fxch %st(1) - fmul %st(4), %st - movl 304(%rsp), %edi - fsubr %st, %st(3) - addl %edi, %edi - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(2) - fsub %st(3), %st - fmul %st, %st(3) - movl %edi, 352(%rsp) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(1) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 320(%rsp) - fldt 320(%rsp) - fsubrp %st, %st(2) - movzwl 328(%rsp), %edx - movl %edx, %esi - andl $32767, %esi - fadd %st, %st(1) - fxch %st(1) - fstpt 336(%rsp) - cmpl $8383, %esi - fstpt 32(%rsp) - jl ..B2.109 -..B2.106: - cmpl $24383, %esi - jg ..B2.109 -..B2.107: - movzwl 376(%rsp), %r9d - movl %r9d, %ecx - andl $32767, %ecx - cmpl $8383, %ecx - jl ..B2.109 -..B2.108: - cmpl $24383, %ecx - jle ..B2.112 -..B2.109: - lea 320(%rsp), %rdi -..___tag_value_recatanhl.64: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.65: -..B2.110: - lea 368(%rsp), %rdi -..___tag_value_recatanhl.66: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.67: -..B2.111: - movzwl 328(%rsp), %edx - movl %edx, %esi - movzwl 376(%rsp), %r9d - movl %r9d, %ecx - movl 352(%rsp), %edi - andl $32767, %esi - andl $32767, %ecx -..B2.112: - movl 400(%rsp), %r8d - lea (%rdi,%rsi), %eax - lea -134(%r8,%rcx), %r10d - cmpl %r10d, %eax - jle ..B2.129 -..B2.113: - movl 324(%rsp), %r11d - lea 134(%r8,%rcx), %r10d - cmpl %r10d, %eax - jge ..B2.130 -..B2.114: - testl %r11d, %r11d - jne ..B2.116 -..B2.115: - cmpl $0, 320(%rsp) - je ..B2.131 -..B2.116: - cmpl $0, 372(%rsp) - jne ..B2.118 -..B2.117: - cmpl $0, 368(%rsp) - je ..B2.130 -..B2.118: - cmpl %r8d, %edi - je ..B2.120 -..B2.119: - fldt 32(%rsp) - subl %r8d, %edi - fstpt (%rsp) - addl $16383, %edi - fldt 320(%rsp) - andl $32767, %edi - fldt 336(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r8d, 352(%rsp) - fxch %st(2) - fstpt 320(%rsp) - fldt 320(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 336(%rsp) - fldt 336(%rsp) - movzwl 328(%rsp), %edx - jmp ..B2.121 -..B2.120: - fldt 320(%rsp) - fldt 336(%rsp) -..B2.121: - fldt 368(%rsp) - andl $32767, %edx - andl $32767, %r9d - fld %st(2) - movl %r8d, 496(%rsp) - cmpl %r9d, %edx - fadd %st(1), %st - jg ..B2.126 -..B2.122: - jne ..B2.127 -..B2.123: - movl 324(%rsp), %eax - movl 372(%rsp), %edx - cmpl %edx, %eax - ja ..B2.126 -..B2.124: - jne ..B2.127 -..B2.125: - movl 320(%rsp), %eax - cmpl 368(%rsp), %eax - jbe ..B2.127 -..B2.126: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 384(%rsp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.128 -..B2.127: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 384(%rsp) - faddp %st, %st(1) -..B2.128: - fld %st(0) - fadd %st(2), %st - fstpt 464(%rsp) - fldt 464(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 480(%rsp) - jmp ..B2.135 -..B2.129: - movl 324(%rsp), %r11d -..B2.130: - testl %r11d, %r11d - jne ..B2.132 -..B2.163: - cmpl $0, 320(%rsp) -..B2.131: - je ..B2.133 -..B2.132: - lea -16517(%r8,%rcx), %eax - lea -16383(%rdi,%rsi), %edx - cmpl %edx, %eax - jl ..B2.134 -..B2.133: - movaps 368(%rsp), %xmm0 - movaps 384(%rsp), %xmm1 - movaps 400(%rsp), %xmm2 - movaps %xmm0, 464(%rsp) - movaps %xmm1, 480(%rsp) - movaps %xmm2, 496(%rsp) - jmp ..B2.135 -..B2.134: - movaps 320(%rsp), %xmm0 - movaps 336(%rsp), %xmm1 - movaps 352(%rsp), %xmm2 - movl 352(%rsp), %r8d - movaps %xmm0, 464(%rsp) - movaps %xmm1, 480(%rsp) - movaps %xmm2, 496(%rsp) -..B2.135: - movzwl 424(%rsp), %ecx - movzwl 472(%rsp), %edi - andl $32767, %ecx - andl $32767, %edi - movl 448(%rsp), %esi - lea (%rsi,%rcx), %edx - lea (%r8,%rdi), %eax - subl %eax, %edx - cmpl $-1, %edx - jge ..B2.145 -..B2.136: - cmpl $8383, %ecx - jl ..B2.140 -..B2.137: - cmpl $24383, %ecx - jg ..B2.140 -..B2.138: - cmpl $8383, %edi - jl ..B2.140 -..B2.139: - cmpl $24383, %edi - jle ..B2.143 -..B2.140: - lea 416(%rsp), %rdi -..___tag_value_recatanhl.68: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.69: -..B2.141: - lea 464(%rsp), %rdi -..___tag_value_recatanhl.70: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.71: -..B2.142: - movl 448(%rsp), %esi - movl 496(%rsp), %r8d -..B2.143: - fldt 464(%rsp) - subl %r8d, %esi - fld %st(0) - fld %st(1) - fldt 416(%rsp) - lea 512(%rsp), %rdi - fld %st(0) - fdiv %st(4), %st - fldt 16(%rsp) - fld %st(0) - fmul %st(2), %st - fld %st(0) - movl %esi, 64(%rsp) - lea 32(%rsp), %rsi - fsubr %st(3), %st - faddp %st, %st(1) - fld %st(0) - fsubr %st(3), %st - fxch %st(2) - fmul %st(7), %st - fsubr %st, %st(6) - faddp %st, %st(6) - fxch %st(4) - fsub %st(5), %st - fld %st(4) - fmul %st(6), %st - fxch %st(2) - fmul %st, %st(6) - fxch %st(1) - fmul %st, %st(5) - fxch %st(6) - faddp %st, %st(5) - fld %st(4) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fsubp %st, %st(1) - fldt 400(%rsi) - faddp %st, %st(1) - fldt 448(%rsi) - fmul %st(2), %st - fsubrp %st, %st(1) - fdivp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt (%rsi) - fldt (%rsi) - fsubrp %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - faddp %st, %st(1) - fstpt 16(%rsi) -..___tag_value_recatanhl.72: - call __libm_log_k80@PLT -..___tag_value_recatanhl.73: - jmp ..B2.153 -..B2.145: - movzwl 136(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.149 -..B2.146: - cmpl $24383, %eax - jg ..B2.149 -..B2.147: - cmpl $8383, %edi - jl ..B2.149 -..B2.148: - cmpl $24383, %edi - jle ..B2.152 -..B2.149: - lea 128(%rsp), %rdi -..___tag_value_recatanhl.74: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.75: -..B2.150: - lea 464(%rsp), %rdi -..___tag_value_recatanhl.76: - call __libm_normalizel_k80@PLT -..___tag_value_recatanhl.77: -..B2.151: - movl 496(%rsp), %r8d -..B2.152: - fldt 128(%rsp) - lea 512(%rsp), %rdi - fld %st(0) - lea 80(%rsp), %rsi - fldt 384(%rsi) - fdivr %st, %st(1) - fld %st(0) - fld %st(1) - fldt -64(%rsi) - fld %st(0) - fmul %st(5), %st - fld %st(0) - movl 80(%rsi), %eax - fsubr %st(6), %st - subl %r8d, %eax - faddp %st, %st(1) - fld %st(0) - addl $2, %eax - movl %eax, 32(%rsi) - fsubr %st(6), %st - fxch %st(2) - fmul %st(5), %st - fsubr %st, %st(4) - faddp %st, %st(4) - fxch %st(2) - fsub %st(3), %st - fld %st(2) - fmul %st(4), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fsubrp %st, %st(3) - fldt 64(%rsi) - faddp %st, %st(3) - fldt 400(%rsi) - fmul %st(2), %st - fsubrp %st, %st(3) - fdivrp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt (%rsi) - fldt (%rsi) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 16(%rsi) - fstpt (%rsp) -..___tag_value_recatanhl.78: - call __libm_log1p_k80@PLT -..___tag_value_recatanhl.79: -..B2.153: - movl 544(%rsp), %edi - addl $-2, %edi - movl %edi, 544(%rsp) -..B2.154: - addq $-32, %rsp - .cfi_def_cfa_offset 608 - fldt 544(%rsp) - fstpt (%rsp) - fldt 560(%rsp) - fstpt 16(%rsp) -..___tag_value_recatanhl.81: - call __libm_scalbl_k80@PLT -..___tag_value_recatanhl.82: -..B2.160: - addq $32, %rsp - .cfi_def_cfa_offset 576 -..B2.155: - movq 560(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.157 -..B2.156: - addq $568, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 576 -..B2.157: - fstp %st(0) - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type recatanhl,@function - .size recatanhl,.-recatanhl - .data -# -- End recatanhl - .text -# -- Begin imcatanhl - .text - .align 16,0x90 -imcatanhl: -# parameter 1: 656 + %rsp -# parameter 2: 672 + %rsp -..B3.1: - .cfi_startproc -..___tag_value_imcatanhl.87: -..L88: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %rbx - .cfi_def_cfa_offset 24 - .cfi_offset 3, -24 - subq $632, %rsp - .cfi_def_cfa_offset 656 - lea _CONSTANTS(%rip), %rbx - fldt 656(%rsp) - lea 64+_CONSTANTS(%rip), %r9 - movb 665(%rsp), %sil - lea 288(%rsp), %rdi - andb $-128, %sil - shrb $7, %sil - fldt (%r9) - movb 681(%rsp), %dl - andb $-128, %dl - shrb $7, %dl - movzbl %sil, %r8d - shlq $4, %r8 - movzbl %dl, %ecx - shlq $4, %rcx - movq %fs:40, %rax - fldt (%rbx,%r8) - xorq %rsp, %rax - fmulp %st, %st(2) - fldt 32(%rbx,%rcx) - movq %rax, 336(%rdi) - fstpt 16(%rsp) - movl $0, 32(%rdi) - fxch %st(1) - fstpt (%rdi) - fstpt (%rsp) - fldt (%rsp) - fstpt 16(%rdi) -..___tag_value_imcatanhl.94: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.95: -..B3.2: - fldt 672(%rsp) - lea 336(%rsp), %rdi - fldt (%rsp) - movb 681(%rsp), %al - andb $-128, %al - shrb $7, %al - fstpt 16(%rdi) - movzbl %al, %edx - shlq $4, %rdx - movl $0, 32(%rdi) - fldt (%rbx,%rdx) - fmulp %st, %st(1) - fstpt (%rdi) -..___tag_value_imcatanhl.96: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.97: -..B3.3: - fldt (%rbx) - movzwl 296(%rsp), %eax - andl $32767, %eax - movl $0, 416(%rsp) - cmpl $8383, %eax - fstpt 384(%rsp) - fldt (%rsp) - fstpt 400(%rsp) - jl ..B3.5 -..B3.4: - cmpl $24383, %eax - jle ..B3.7 -..B3.5: - lea 288(%rsp), %rdi -..___tag_value_imcatanhl.98: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.99: -..B3.6: - lea 288(%rsp), %rdi -..___tag_value_imcatanhl.100: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.101: -..B3.7: - fldt 288(%rsp) - lea 80+_CONSTANTS(%rip), %rdx - fld %st(0) - fld %st(1) - fld %st(2) - fld %st(3) - movl 320(%rsp), %eax - fldt (%rdx) - addl %eax, %eax - fmul %st, %st(4) - movl %eax, 464(%rsp) - fxch %st(3) - fsubr %st(4), %st - fld %st(0) - fchs - movzwl 344(%rsp), %eax - fadd %st(5), %st - fld %st(0) - andl $32767, %eax - fxch %st(5) - fstpt (%rsp) - cmpl $8383, %eax - fxch %st(1) - fsubrp %st, %st(5) - fxch %st(3) - fmul %st(4), %st - fxch %st(2) - fsub %st(3), %st - fxch %st(1) - fsub %st(4), %st - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 304(%rsp) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 432(%rsp) - fldt 432(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 448(%rsp) - jl ..B3.9 -..B3.8: - cmpl $24383, %eax - jle ..B3.11 -..B3.9: - lea 336(%rsp), %rdi -..___tag_value_imcatanhl.102: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.103: -..B3.10: - lea 336(%rsp), %rdi -..___tag_value_imcatanhl.104: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.105: -..B3.11: - fldt 336(%rsp) - fld %st(0) - fld %st(1) - fldt (%rsp) - fmul %st(3), %st - movzwl 392(%rsp), %esi - movl %esi, %r10d - andl $32767, %r10d - fsubr %st, %st(2) - movl 368(%rsp), %eax - faddp %st, %st(2) - fld %st(1) - addl %eax, %eax - fmul %st(2), %st - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(2) - cmpl $8383, %r10d - movl %eax, 512(%rsp) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fldt 352(%rsp) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 480(%rsp) - fldt 480(%rsp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 496(%rsp) - fstpt 32(%rsp) - jl ..B3.15 -..B3.12: - cmpl $24383, %r10d - jg ..B3.15 -..B3.13: - movzwl 440(%rsp), %edi - movl %edi, %r9d - andl $32767, %r9d - cmpl $8383, %r9d - jl ..B3.15 -..B3.14: - cmpl $24383, %r9d - jle ..B3.18 -..B3.15: - lea 384(%rsp), %rdi -..___tag_value_imcatanhl.106: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.107: -..B3.16: - lea 432(%rsp), %rdi -..___tag_value_imcatanhl.108: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.109: -..B3.17: - movzwl 392(%rsp), %esi - movl %esi, %r10d - movzwl 440(%rsp), %edi - movl %edi, %r9d - andl $32767, %r10d - andl $32767, %r9d -..B3.18: - movl 416(%rsp), %eax - movl 464(%rsp), %edx - lea (%r10,%rax), %ebx - lea -134(%rdx,%r9), %ecx - cmpl %ecx, %ebx - jle ..B3.35 -..B3.19: - movl 388(%rsp), %r8d - lea 134(%rdx,%r9), %ecx - cmpl %ecx, %ebx - jge ..B3.36 -..B3.20: - testl %r8d, %r8d - jne ..B3.22 -..B3.21: - cmpl $0, 384(%rsp) - je ..B3.37 -..B3.22: - cmpl $0, 436(%rsp) - jne ..B3.24 -..B3.23: - cmpl $0, 432(%rsp) - je ..B3.36 -..B3.24: - cmpl %edx, %eax - je ..B3.26 -..B3.25: - fldt 32(%rsp) - subl %edx, %eax - fstpt (%rsp) - addl $16383, %eax - fldt 384(%rsp) - andl $32767, %eax - fldt 400(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %ecx - andl $-32768, %ecx - orl %eax, %ecx - movw %cx, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 416(%rsp) - fxch %st(2) - fstpt 384(%rsp) - fldt 384(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 400(%rsp) - fldt 400(%rsp) - fxch %st(1) - fstpt 32(%rsp) - movzwl 392(%rsp), %esi - jmp ..B3.27 -..B3.26: - fldt 384(%rsp) - fstpt 32(%rsp) - fldt 400(%rsp) -..B3.27: - fldt 432(%rsp) - andl $32767, %esi - fldt 32(%rsp) - andl $32767, %edi - movl %edx, 560(%rsp) - cmpl %edi, %esi - fsub %st(1), %st - jg ..B3.32 -..B3.28: - jne ..B3.33 -..B3.29: - movl 388(%rsp), %eax - movl 436(%rsp), %edx - cmpl %edx, %eax - ja ..B3.32 -..B3.30: - jne ..B3.33 -..B3.31: - movl 384(%rsp), %eax - cmpl 432(%rsp), %eax - jbe ..B3.33 -..B3.32: - fldt 32(%rsp) - fsub %st(1), %st - fsubp %st, %st(2) - fldt 448(%rsp) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B3.34 -..B3.33: - fldt 32(%rsp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - fldt 448(%rsp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) -..B3.34: - fldt 32(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 528(%rsp) - fldt 528(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 544(%rsp) - jmp ..B3.41 -..B3.35: - movl 388(%rsp), %r8d -..B3.36: - testl %r8d, %r8d - jne ..B3.38 -..B3.179: - cmpl $0, 384(%rsp) -..B3.37: - je ..B3.39 -..B3.38: - lea -16517(%rdx,%r9), %ecx - lea -16383(%rax,%r10), %eax - cmpl %eax, %ecx - jl ..B3.40 -..B3.39: - fldt 432(%rsp) - fchs - movl %edx, 560(%rsp) - fstpt 528(%rsp) - fldt 448(%rsp) - fchs - fstpt 544(%rsp) - jmp ..B3.41 -..B3.40: - movaps 384(%rsp), %xmm0 - movaps 400(%rsp), %xmm1 - movaps 416(%rsp), %xmm2 - movaps %xmm0, 528(%rsp) - movaps %xmm1, 544(%rsp) - movaps %xmm2, 560(%rsp) -..B3.41: - movzwl 536(%rsp), %esi - movl %esi, %r10d - andl $32767, %r10d - cmpl $8383, %r10d - jl ..B3.45 -..B3.42: - cmpl $24383, %r10d - jg ..B3.45 -..B3.43: - movzwl 488(%rsp), %edi - movl %edi, %r9d - andl $32767, %r9d - cmpl $8383, %r9d - jl ..B3.45 -..B3.44: - cmpl $24383, %r9d - jle ..B3.48 -..B3.45: - lea 528(%rsp), %rdi -..___tag_value_imcatanhl.110: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.111: -..B3.46: - lea 480(%rsp), %rdi -..___tag_value_imcatanhl.112: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.113: -..B3.47: - movzwl 536(%rsp), %esi - movl %esi, %r10d - movzwl 488(%rsp), %edi - movl %edi, %r9d - andl $32767, %r10d - andl $32767, %r9d -..B3.48: - movl 512(%rsp), %edx - movl 560(%rsp), %eax - lea -134(%rdx,%r9), %ecx - lea (%r10,%rax), %ebx - cmpl %ecx, %ebx - jle ..B3.65 -..B3.49: - movl 532(%rsp), %r8d - lea 134(%rdx,%r9), %ecx - cmpl %ecx, %ebx - jge ..B3.66 -..B3.50: - testl %r8d, %r8d - jne ..B3.52 -..B3.51: - cmpl $0, 528(%rsp) - je ..B3.67 -..B3.52: - cmpl $0, 484(%rsp) - jne ..B3.54 -..B3.53: - cmpl $0, 480(%rsp) - je ..B3.66 -..B3.54: - cmpl %edx, %eax - je ..B3.56 -..B3.55: - fldt 32(%rsp) - subl %edx, %eax - fstpt (%rsp) - addl $16383, %eax - fldt 528(%rsp) - andl $32767, %eax - fldt 544(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %ecx - andl $-32768, %ecx - orl %eax, %ecx - movw %cx, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 560(%rsp) - fxch %st(2) - fstpt 528(%rsp) - fldt 528(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 544(%rsp) - fldt 544(%rsp) - fstpt 32(%rsp) - movzwl 536(%rsp), %esi - jmp ..B3.57 -..B3.56: - fldt 528(%rsp) - fldt 544(%rsp) - fstpt 32(%rsp) -..B3.57: - fldt 480(%rsp) - andl $32767, %esi - andl $32767, %edi - fld %st(1) - movl %edx, 608(%rsp) - cmpl %edi, %esi - fsub %st(1), %st - jg ..B3.62 -..B3.58: - jne ..B3.63 -..B3.59: - movl 532(%rsp), %eax - movl 484(%rsp), %ecx - cmpl %ecx, %eax - ja ..B3.62 -..B3.60: - jne ..B3.63 -..B3.61: - movl 528(%rsp), %eax - cmpl 480(%rsp), %eax - jbe ..B3.63 -..B3.62: - fldt 32(%rsp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fldt 496(%rsp) - fsubrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) - jmp ..B3.64 -..B3.63: - fldt 496(%rsp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fldt 32(%rsp) - faddp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) -..B3.64: - fldt 32(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 576(%rsp) - fldt 576(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 592(%rsp) - jmp ..B3.71 -..B3.65: - movl 532(%rsp), %r8d -..B3.66: - testl %r8d, %r8d - jne ..B3.68 -..B3.180: - cmpl $0, 528(%rsp) -..B3.67: - je ..B3.69 -..B3.68: - lea -16517(%rdx,%r9), %ecx - lea -16383(%rax,%r10), %ebx - cmpl %ebx, %ecx - jl ..B3.70 -..B3.69: - fldt 480(%rsp) - fchs - movl %edx, 608(%rsp) - fstpt 576(%rsp) - fldt 496(%rsp) - fchs - fstpt 592(%rsp) - jmp ..B3.71 -..B3.70: - movaps 528(%rsp), %xmm0 - movl %eax, %edx - movaps 544(%rsp), %xmm1 - movaps 560(%rsp), %xmm2 - movaps %xmm0, 576(%rsp) - movaps %xmm1, 592(%rsp) - movaps %xmm2, 608(%rsp) -..B3.71: - movzwl 584(%rsp), %eax - andl $32767, %eax - lea -16383(%rdx,%rax), %edx - cmpl $-6, %edx - jge ..B3.164 -..B3.72: - movzwl 392(%rsp), %eax - movl %eax, %edx - andl $32767, %edx - cmpl $8383, %edx - jl ..B3.76 -..B3.73: - cmpl $24383, %edx - jg ..B3.76 -..B3.74: - movzwl 296(%rsp), %ecx - movl %ecx, %r9d - andl $32767, %r9d - cmpl $8383, %r9d - jl ..B3.76 -..B3.75: - cmpl $24383, %r9d - jle ..B3.79 -..B3.76: - lea 384(%rsp), %rdi -..___tag_value_imcatanhl.114: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.115: -..B3.77: - lea 288(%rsp), %rdi -..___tag_value_imcatanhl.116: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.117: -..B3.78: - movzwl 296(%rsp), %ecx - movl %ecx, %r9d - movzwl 392(%rsp), %eax - movl %eax, %edx - andl $32767, %r9d - andl $32767, %edx -..B3.79: - movl 320(%rsp), %r8d - movl 416(%rsp), %edi - lea -134(%r8,%r9), %ebx - lea (%rdx,%rdi), %r10d - cmpl %r10d, %ebx - lea (%r9,%r8), %esi - jge ..B3.96 -..B3.80: - movl 388(%rsp), %r13d - lea 134(%r8,%r9), %r11d - cmpl %r11d, %r10d - jge ..B3.97 -..B3.81: - testl %r13d, %r13d - jne ..B3.83 -..B3.82: - cmpl $0, 384(%rsp) - je ..B3.98 -..B3.83: - cmpl $0, 292(%rsp) - jne ..B3.85 -..B3.84: - cmpl $0, 288(%rsp) - je ..B3.97 -..B3.85: - cmpl %r8d, %edi - je ..B3.87 -..B3.86: - fldt 32(%rsp) - subl %r8d, %edi - fstpt (%rsp) - addl $16383, %edi - fldt 384(%rsp) - andl $32767, %edi - fldt 400(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edi, %eax - movl %r8d, %edi - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 384(%rsp) - fldt 384(%rsp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 392(%rsp), %eax - movl %eax, %edx - andl $32767, %edx - movl %r8d, 416(%rsp) - movl %edx, %r10d - fstpt 400(%rsp) - fldt 400(%rsp) - jmp ..B3.88 -..B3.87: - fldt 384(%rsp) - movl %eax, %r10d - fldt 400(%rsp) - andl $32767, %r10d -..B3.88: - fldt 288(%rsp) - movl %ecx, %r11d - andl $32767, %r11d - fld %st(2) - movl %r8d, 80(%rsp) - cmpl %r11d, %r10d - fadd %st(1), %st - jg ..B3.93 -..B3.89: - jne ..B3.94 -..B3.90: - movl 388(%rsp), %r10d - movl 292(%rsp), %r11d - cmpl %r11d, %r10d - ja ..B3.93 -..B3.91: - jne ..B3.94 -..B3.92: - movl 384(%rsp), %r10d - cmpl 288(%rsp), %r10d - jbe ..B3.94 -..B3.93: - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 304(%rsp) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B3.95 -..B3.94: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 304(%rsp) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) -..B3.95: - fldt 32(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 64(%rsp) - jmp ..B3.102 -..B3.96: - movl 388(%rsp), %r13d -..B3.97: - testl %r13d, %r13d - jne ..B3.99 -..B3.178: - cmpl $0, 384(%rsp) -..B3.98: - je ..B3.100 -..B3.99: - lea -16517(%r8,%r9), %r10d - lea -16383(%rdi,%rdx), %r11d - cmpl %r11d, %r10d - jl ..B3.101 -..B3.100: - movaps 288(%rsp), %xmm0 - movaps 304(%rsp), %xmm1 - movaps 320(%rsp), %xmm2 - movaps %xmm0, 48(%rsp) - movaps %xmm1, 64(%rsp) - movaps %xmm2, 80(%rsp) - jmp ..B3.102 -..B3.101: - movaps 384(%rsp), %xmm0 - movaps 400(%rsp), %xmm1 - movaps 416(%rsp), %xmm2 - movaps %xmm0, 48(%rsp) - movaps %xmm1, 64(%rsp) - movaps %xmm2, 80(%rsp) -..B3.102: - cmpl $8383, %edx - jl ..B3.106 -..B3.103: - cmpl $24383, %edx - jg ..B3.106 -..B3.104: - cmpl $8383, %r9d - jl ..B3.106 -..B3.105: - cmpl $24383, %r9d - jle ..B3.109 -..B3.106: - lea 384(%rsp), %rdi -..___tag_value_imcatanhl.118: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.119: -..B3.107: - lea 288(%rsp), %rdi -..___tag_value_imcatanhl.120: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.121: -..B3.108: - movzwl 296(%rsp), %ecx - movl %ecx, %eax - andl $32767, %eax - movl 320(%rsp), %r8d - movl 416(%rsp), %edi - lea (%r8,%rax), %esi - lea -134(%r8,%rax), %ebx - movzwl 392(%rsp), %eax - movl %eax, %edx - andl $32767, %edx -..B3.109: - lea (%rdi,%rdx), %r9d - cmpl %r9d, %ebx - jge ..B3.126 -..B3.110: - movl 388(%rsp), %r10d - lea 134(%rsi), %ebx - cmpl %ebx, %r9d - jge ..B3.127 -..B3.111: - testl %r10d, %r10d - jne ..B3.113 -..B3.112: - cmpl $0, 384(%rsp) - je ..B3.128 -..B3.113: - cmpl $0, 292(%rsp) - jne ..B3.115 -..B3.114: - cmpl $0, 288(%rsp) - je ..B3.127 -..B3.115: - cmpl %r8d, %edi - je ..B3.117 -..B3.116: - fldt 32(%rsp) - subl %r8d, %edi - fstpt (%rsp) - addl $16383, %edi - fldt 384(%rsp) - andl $32767, %edi - fldt 400(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edi, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r8d, 416(%rsp) - fxch %st(2) - fstpt 384(%rsp) - fldt 384(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 400(%rsp) - fldt 400(%rsp) - fxch %st(1) - fstpt 32(%rsp) - movzwl 392(%rsp), %eax - jmp ..B3.118 -..B3.117: - fldt 384(%rsp) - fstpt 32(%rsp) - fldt 400(%rsp) -..B3.118: - fldt 288(%rsp) - andl $32767, %eax - fldt 32(%rsp) - andl $32767, %ecx - movl %r8d, 128(%rsp) - cmpl %ecx, %eax - fsub %st(1), %st - jg ..B3.123 -..B3.119: - jne ..B3.124 -..B3.120: - movl 388(%rsp), %eax - movl 292(%rsp), %edx - cmpl %edx, %eax - ja ..B3.123 -..B3.121: - jne ..B3.124 -..B3.122: - movl 384(%rsp), %eax - cmpl 288(%rsp), %eax - jbe ..B3.124 -..B3.123: - fldt 32(%rsp) - fsub %st(1), %st - fsubp %st, %st(2) - fldt 304(%rsp) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B3.125 -..B3.124: - fldt 32(%rsp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - fldt 304(%rsp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) -..B3.125: - fldt 32(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 96(%rsp) - fldt 96(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 112(%rsp) - jmp ..B3.132 -..B3.126: - movl 388(%rsp), %r10d -..B3.127: - testl %r10d, %r10d - jne ..B3.129 -..B3.177: - cmpl $0, 384(%rsp) -..B3.128: - je ..B3.130 -..B3.129: - addl $-16517, %esi - lea -16383(%rdi,%rdx), %eax - cmpl %eax, %esi - jl ..B3.131 -..B3.130: - fldt 288(%rsp) - fchs - movl %r8d, 128(%rsp) - fstpt 96(%rsp) - fldt 304(%rsp) - fchs - fstpt 112(%rsp) - jmp ..B3.132 -..B3.131: - movaps 384(%rsp), %xmm0 - movaps 400(%rsp), %xmm1 - movaps 416(%rsp), %xmm2 - movaps %xmm0, 96(%rsp) - movaps %xmm1, 112(%rsp) - movaps %xmm2, 128(%rsp) -..B3.132: - lea 144(%rsp), %rdi - lea 336(%rsp), %rsi - lea 48(%rsp), %rdx -..___tag_value_imcatanhl.122: - call __libm_atan2l_k80@PLT -..___tag_value_imcatanhl.123: -..B3.133: - lea 192(%rsp), %rdi - lea 336(%rsp), %rsi - lea 96(%rsp), %rdx -..___tag_value_imcatanhl.124: - call __libm_atan2l_k80@PLT -..___tag_value_imcatanhl.125: -..B3.134: - movzwl 152(%rsp), %ebx - movl %ebx, %r10d - andl $32767, %r10d - cmpl $8383, %r10d - jl ..B3.138 -..B3.135: - cmpl $24383, %r10d - jg ..B3.138 -..B3.136: - movzwl 200(%rsp), %esi - movl %esi, %r9d - andl $32767, %r9d - cmpl $8383, %r9d - jl ..B3.138 -..B3.137: - cmpl $24383, %r9d - jle ..B3.141 -..B3.138: - lea 144(%rsp), %rdi -..___tag_value_imcatanhl.126: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.127: -..B3.139: - lea 192(%rsp), %rdi -..___tag_value_imcatanhl.128: - call __libm_normalizel_k80@PLT -..___tag_value_imcatanhl.129: -..B3.140: - movzwl 152(%rsp), %ebx - movl %ebx, %r10d - movzwl 200(%rsp), %esi - movl %esi, %r9d - andl $32767, %r10d - andl $32767, %r9d -..B3.141: - movl 224(%rsp), %edi - movl 176(%rsp), %eax - lea -134(%rdi,%r9), %edx - lea (%r10,%rax), %ecx - cmpl %edx, %ecx - jle ..B3.158 -..B3.142: - movl 148(%rsp), %r8d - lea 134(%rdi,%r9), %edx - cmpl %edx, %ecx - jge ..B3.159 -..B3.143: - testl %r8d, %r8d - jne ..B3.145 -..B3.144: - cmpl $0, 144(%rsp) - je ..B3.160 -..B3.145: - cmpl $0, 196(%rsp) - jne ..B3.147 -..B3.146: - cmpl $0, 192(%rsp) - je ..B3.159 -..B3.147: - cmpl %edi, %eax - je ..B3.149 -..B3.148: - fldt 32(%rsp) - subl %edi, %eax - fstpt (%rsp) - addl $16383, %eax - fldt 144(%rsp) - andl $32767, %eax - fldt 160(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edi, 176(%rsp) - fxch %st(2) - fstpt 144(%rsp) - fldt 144(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 160(%rsp) - fldt 160(%rsp) - movzwl 152(%rsp), %ebx - jmp ..B3.150 -..B3.149: - fldt 144(%rsp) - fldt 160(%rsp) -..B3.150: - fldt 192(%rsp) - andl $32767, %ebx - andl $32767, %esi - fld %st(2) - movl %edi, 272(%rsp) - cmpl %esi, %ebx - fadd %st(1), %st - jg ..B3.155 -..B3.151: - jne ..B3.156 -..B3.152: - movl 148(%rsp), %eax - movl 196(%rsp), %edx - cmpl %edx, %eax - ja ..B3.155 -..B3.153: - jne ..B3.156 -..B3.154: - movl 144(%rsp), %eax - cmpl 192(%rsp), %eax - jbe ..B3.156 -..B3.155: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 208(%rsp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - jmp ..B3.157 -..B3.156: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 208(%rsp) - faddp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) -..B3.157: - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - jmp ..B3.167 -..B3.158: - movl 148(%rsp), %r8d -..B3.159: - testl %r8d, %r8d - jne ..B3.161 -..B3.181: - cmpl $0, 144(%rsp) -..B3.160: - je ..B3.162 -..B3.161: - lea -16517(%rdi,%r9), %edx - lea -16383(%rax,%r10), %ecx - cmpl %ecx, %edx - jl ..B3.163 -..B3.162: - fldt 192(%rsp) - fldt 208(%rsp) - movaps 192(%rsp), %xmm0 - movaps 208(%rsp), %xmm1 - movaps 224(%rsp), %xmm2 - movaps %xmm0, 240(%rsp) - movaps %xmm1, 256(%rsp) - movaps %xmm2, 272(%rsp) - jmp ..B3.167 -..B3.163: - fldt 144(%rsp) - movl %eax, %edi - fldt 160(%rsp) - movaps 144(%rsp), %xmm0 - movaps 160(%rsp), %xmm1 - movaps 176(%rsp), %xmm2 - movaps %xmm0, 240(%rsp) - movaps %xmm1, 256(%rsp) - movaps %xmm2, 272(%rsp) - jmp ..B3.167 -..B3.164: - je ..B3.171 -..B3.165: - incl 368(%rsp) - lea 240(%rsp), %rdi - lea 336(%rsp), %rsi - lea 576(%rsp), %rdx -..___tag_value_imcatanhl.130: - call __libm_atan2l_k80@PLT -..___tag_value_imcatanhl.131: -..B3.166: - fldt 240(%rsp) - fldt 256(%rsp) - movl 272(%rsp), %edi -..B3.167: - fldt 16(%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 240(%rsp) - fldt 240(%rsp) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 256(%rsp) - fldt 256(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 688 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_imcatanhl.133: - call __libm_scalbl_k80@PLT -..___tag_value_imcatanhl.134: -..B3.176: - addq $32, %rsp - .cfi_def_cfa_offset 656 -..B3.168: - movq 624(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B3.170 -..B3.169: - addq $632, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 656 - .cfi_offset 3, -24 - .cfi_offset 13, -16 -..B3.170: - fstp %st(0) - call __stack_chk_fail@PLT -..B3.171: - lea 96+_CONSTANTS(%rip), %rdx - movl 532(%rsp), %eax - cmpl 4(%rdx), %eax - jb ..B3.72 -..B3.172: - jne ..B3.165 -..B3.173: - movl 528(%rsp), %eax - cmpl (%rdx), %eax - jb ..B3.72 - jmp ..B3.165 - .align 16,0x90 - .cfi_endproc - .type imcatanhl,@function - .size imcatanhl,.-imcatanhl - .data -# -- End imcatanhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.17: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,16 - .align 16 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .word 32768 - .word 16415 - .word 0 - .word 0 - .word 0 - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,112 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanl.S deleted file mode 100644 index aa1e9a3b48..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/catanl.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "catanl.c" - .text -..TXTST0: -# -- Begin catanl - .text - .align 16,0x90 - .globl catanl -catanl: -# parameter 1: 144 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_catanl.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - subq $128, %rsp - .cfi_def_cfa_offset 144 - xorb %r13b, %r13b - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 112(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 96(%rsp) -..B1.2: - fnstcw 2(%rsp) -..B1.3: - movzwl 2(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, (%rsp) -..B1.5: - fldcw (%rsp) -..B1.6: - movb $1, %r13b -..B1.7: - fldt 160(%rsp) - movzwl 168(%rsp), %eax - andl $32767, %eax - fstpt 80(%rsp) - cmpl $32767, %eax - fldt 144(%rsp) - fstpt 96(%rsp) - jl ..B1.9 -..B1.8: - movq $0x8000000000000000, %rax - cmpq 160(%rsp), %rax - jne ..B1.10 -..B1.9: - movb 169(%rsp), %al - notb %al - movb 89(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 89(%rsp) -..B1.10: - addq $-32, %rsp - .cfi_def_cfa_offset 176 - movq %rsp, %rdi - movq 112(%rsp), %rax - movq 120(%rsp), %rdx - movq 128(%rsp), %rcx - movq 136(%rsp), %rsi - movq %rax, (%rdi) - movq %rdx, 8(%rdi) - movq %rcx, 16(%rdi) - movq %rsi, 24(%rdi) - call catanhl@PLT -..B1.22: - fxch %st(1) - addq $32, %rsp - .cfi_def_cfa_offset 144 - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 24(%rsp), %eax - andl $32767, %eax - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - cmpl $32767, %eax - fstpt 48(%rsp) - fstpt 64(%rsp) - jl ..B1.12 -..B1.11: - movq $0x8000000000000000, %rax - cmpq 16(%rsp), %rax - jne ..B1.13 -..B1.12: - movb 25(%rsp), %al - notb %al - movb 73(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 73(%rsp) -..B1.13: - testb %r13b, %r13b - je ..B1.15 -..B1.14: - fldcw 2(%rsp) -..B1.15: - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.19 -..B1.16: - fldt 48(%rsp) - fldt 64(%rsp) - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.18 -..B1.17: - addq $128, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 144 - .cfi_offset 13, -16 -..B1.18: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.19: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type catanl,@function - .size catanl,.-catanl - .data -# -- End catanl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrt_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrt_gen.S deleted file mode 100644 index d562bb378f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrt_gen.S +++ /dev/null @@ -1,737 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cbrt_gen.c" - .text -..TXTST0: -# -- Begin cbrt - .text - .align 16,0x90 - .globl cbrt -cbrt: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cbrt.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) -..B1.2: - movq %xmm0, %xmm7 - movl $524032, %edx - movsd EXP_MSK3(%rip), %xmm5 - movsd EXP_MSK2(%rip), %xmm3 - psrlq $44, %xmm7 - pextrw $0, %xmm7, %ecx - movd %xmm7, %eax - movsd EXP_MASK(%rip), %xmm1 - movsd SIG_MASK(%rip), %xmm2 - andl $248, %ecx - lea rcp_table(%rip), %r8 - movsd (%rcx,%r8), %xmm4 - movq %rax, %r9 - andl %eax, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_0.0.1 - cmpl $524032, %edx - je .L_2TAG_PACKET_1.0.1 - shrl $8, %edx - shrq $8, %r9 - andpd %xmm0, %xmm2 - andpd %xmm5, %xmm0 - orpd %xmm2, %xmm3 - orpd %xmm0, %xmm1 - movapd coeff_table(%rip), %xmm5 - movl $5462, %eax - movapd 16+coeff_table(%rip), %xmm6 - mull %edx - movq %r9, %rdx - andq $2047, %r9 - shrl $14, %eax - andl $2048, %edx - subq %rax, %r9 - subq %rax, %r9 - subq %rax, %r9 - shlq $8, %r9 - addl $682, %eax - orl %edx, %eax - movd %eax, %xmm7 - addq %r9, %rcx - psllq $52, %xmm7 -.L_2TAG_PACKET_2.0.1: - movapd 32+coeff_table(%rip), %xmm2 - movapd 48+coeff_table(%rip), %xmm0 - subsd %xmm3, %xmm1 - movq %xmm7, %xmm3 - lea cbrt_table(%rip), %r8 - mulsd (%rcx,%r8), %xmm7 - mulsd %xmm4, %xmm1 - lea D_table(%rip), %r8 - mulsd (%rcx,%r8), %xmm3 - movapd %xmm1, %xmm4 - unpcklpd %xmm1, %xmm1 - mulpd %xmm1, %xmm5 - mulpd %xmm1, %xmm6 - mulpd %xmm1, %xmm1 - addpd %xmm5, %xmm2 - addpd %xmm6, %xmm0 - mulpd %xmm1, %xmm2 - mulpd %xmm1, %xmm1 - mulsd %xmm7, %xmm4 - addpd %xmm2, %xmm0 - mulsd %xmm0, %xmm1 - unpckhpd %xmm0, %xmm0 - addsd %xmm1, %xmm0 - mulsd %xmm4, %xmm0 - addsd %xmm3, %xmm0 - addsd %xmm7, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_0.0.1: - mulsd SCALE63(%rip), %xmm0 - movq %xmm0, %xmm7 - movl $524032, %edx - psrlq $44, %xmm7 - pextrw $0, %xmm7, %ecx - movd %xmm7, %eax - andl $248, %ecx - lea rcp_table(%rip), %r8 - movsd (%rcx,%r8), %xmm4 - movq %rax, %r9 - andl %eax, %edx - shrl $8, %edx - shrq $8, %r9 - cmpl $0, %edx - je .L_2TAG_PACKET_3.0.1 - andpd %xmm0, %xmm2 - andpd %xmm5, %xmm0 - orpd %xmm2, %xmm3 - orpd %xmm0, %xmm1 - movapd coeff_table(%rip), %xmm5 - movl $5462, %eax - movapd 16+coeff_table(%rip), %xmm6 - mull %edx - movq %r9, %rdx - andq $2047, %r9 - shrl $14, %eax - andl $2048, %edx - subq %rax, %r9 - subq %rax, %r9 - subq %rax, %r9 - shlq $8, %r9 - addl $661, %eax - orl %edx, %eax - movd %eax, %xmm7 - addq %r9, %rcx - psllq $52, %xmm7 - jmp .L_2TAG_PACKET_2.0.1 -.L_2TAG_PACKET_3.0.1: - cmpq $0, %r9 - jne .L_2TAG_PACKET_4.0.1 - xorpd %xmm0, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_4.0.1: - movsd ZERON(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_1.0.1: - movl 4(%rsp), %eax - movl (%rsp), %edx - movl %eax, %ecx - andl $2147483647, %ecx - cmpl $2146435072, %ecx - ja .L_2TAG_PACKET_5.0.1 - cmpl $0, %edx - jne .L_2TAG_PACKET_5.0.1 - cmpl $2146435072, %eax - jne .L_2TAG_PACKET_6.0.1 - movsd INF(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_6.0.1: - movsd NEG_INF(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_5.0.1: - movsd (%rsp), %xmm0 - addsd %xmm0, %xmm0 - movq %xmm0, 8(%rsp) -.L_2TAG_PACKET_7.0.1: -..B1.4: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cbrt,@function - .size cbrt,.-cbrt - .data -# -- End cbrt - .section .rodata, "a" - .align 16 - .align 16 -coeff_table: - .long 1553778919 - .long 3213899486 - .long 3534952507 - .long 3215266280 - .long 1646371399 - .long 3214412045 - .long 477218588 - .long 3216798151 - .long 3582521621 - .long 1066628362 - .long 1007461464 - .long 1068473053 - .long 889629714 - .long 1067378449 - .long 1431655765 - .long 1070945621 - .type coeff_table,@object - .size coeff_table,64 - .align 4 -EXP_MSK3: - .long 4294967295 - .long 1048575 - .type EXP_MSK3,@object - .size EXP_MSK3,8 - .align 4 -EXP_MSK2: - .long 0 - .long 3220193280 - .type EXP_MSK2,@object - .size EXP_MSK2,8 - .align 4 -EXP_MASK: - .long 0 - .long 3220176896 - .type EXP_MASK,@object - .size EXP_MASK,8 - .align 4 -SIG_MASK: - .long 0 - .long 1032192 - .type SIG_MASK,@object - .size SIG_MASK,8 - .align 4 -rcp_table: - .long 528611360 - .long 3220144632 - .long 2884679527 - .long 3220082993 - .long 1991868891 - .long 3220024928 - .long 2298714891 - .long 3219970134 - .long 58835168 - .long 3219918343 - .long 3035110223 - .long 3219869313 - .long 1617585086 - .long 3219822831 - .long 2500867033 - .long 3219778702 - .long 4241943008 - .long 3219736752 - .long 258732970 - .long 3219696825 - .long 404232216 - .long 3219658776 - .long 2172167368 - .long 3219622476 - .long 1544257904 - .long 3219587808 - .long 377579543 - .long 3219554664 - .long 1616385542 - .long 3219522945 - .long 813783277 - .long 3219492562 - .long 3940743189 - .long 3219463431 - .long 2689777499 - .long 3219435478 - .long 1700977147 - .long 3219408632 - .long 3169102082 - .long 3219382828 - .long 327235604 - .long 3219358008 - .long 1244336319 - .long 3219334115 - .long 1300311200 - .long 3219311099 - .long 3095471925 - .long 3219288912 - .long 2166487928 - .long 3219267511 - .long 2913108253 - .long 3219246854 - .long 293672978 - .long 3219226904 - .long 288737297 - .long 3219207624 - .long 1810275472 - .long 3219188981 - .long 174592167 - .long 3219170945 - .long 3539053052 - .long 3219153485 - .long 2164392968 - .long 3219136576 - .type rcp_table,@object - .size rcp_table,256 - .align 4 -cbrt_table: - .long 572345495 - .long 1072698681 - .long 1998204467 - .long 1072709382 - .long 3861501553 - .long 1072719872 - .long 2268192434 - .long 1072730162 - .long 2981979308 - .long 1072740260 - .long 270859143 - .long 1072750176 - .long 2958651392 - .long 1072759916 - .long 313113243 - .long 1072769490 - .long 919449400 - .long 1072778903 - .long 2809328903 - .long 1072788162 - .long 2222981587 - .long 1072797274 - .long 2352530781 - .long 1072806244 - .long 594152517 - .long 1072815078 - .long 1555767199 - .long 1072823780 - .long 4282421314 - .long 1072832355 - .long 2355578597 - .long 1072840809 - .long 1162590619 - .long 1072849145 - .long 797864051 - .long 1072857367 - .long 431273680 - .long 1072865479 - .long 2669831148 - .long 1072873484 - .long 733477752 - .long 1072881387 - .long 4280220604 - .long 1072889189 - .long 801961634 - .long 1072896896 - .long 2915370760 - .long 1072904508 - .long 1159613482 - .long 1072912030 - .long 2689944798 - .long 1072919463 - .long 1248687822 - .long 1072926811 - .long 2967951030 - .long 1072934075 - .long 630170432 - .long 1072941259 - .long 3760898254 - .long 1072948363 - .long 0 - .long 1072955392 - .long 2370273294 - .long 1072962345 - .long 1261754802 - .long 1072972640 - .long 546334065 - .long 1072986123 - .long 1054893830 - .long 1072999340 - .long 1571187597 - .long 1073012304 - .long 1107975175 - .long 1073025027 - .long 3606909377 - .long 1073037519 - .long 1113616747 - .long 1073049792 - .long 4154744632 - .long 1073061853 - .long 3358931423 - .long 1073073713 - .long 4060702372 - .long 1073085379 - .long 747576176 - .long 1073096860 - .long 3023138255 - .long 1073108161 - .long 1419988548 - .long 1073119291 - .long 1914185305 - .long 1073130255 - .long 294389948 - .long 1073141060 - .long 3761802570 - .long 1073151710 - .long 978281566 - .long 1073162213 - .long 823148820 - .long 1073172572 - .long 2420954441 - .long 1073182792 - .long 3815449908 - .long 1073192878 - .long 2046058587 - .long 1073202835 - .long 1807524753 - .long 1073212666 - .long 2628681401 - .long 1073222375 - .long 3225667357 - .long 1073231966 - .long 1555307421 - .long 1073241443 - .long 3454043099 - .long 1073250808 - .long 1208137896 - .long 1073260066 - .long 3659916772 - .long 1073269218 - .long 1886261264 - .long 1073278269 - .long 3593647839 - .long 1073287220 - .long 3086012205 - .long 1073296075 - .long 2769796922 - .long 1073304836 - .long 888716057 - .long 1073317807 - .long 2201465623 - .long 1073334794 - .long 164369365 - .long 1073351447 - .long 3462666733 - .long 1073367780 - .long 2773905457 - .long 1073383810 - .long 1342879088 - .long 1073399550 - .long 2543933975 - .long 1073415012 - .long 1684477781 - .long 1073430209 - .long 3532178543 - .long 1073445151 - .long 1147747300 - .long 1073459850 - .long 1928031793 - .long 1073474314 - .long 2079717015 - .long 1073488553 - .long 4016765315 - .long 1073502575 - .long 3670431139 - .long 1073516389 - .long 3549227225 - .long 1073530002 - .long 11637607 - .long 1073543422 - .long 588220169 - .long 1073556654 - .long 2635407503 - .long 1073569705 - .long 2042029317 - .long 1073582582 - .long 1925128962 - .long 1073595290 - .long 4136375664 - .long 1073607834 - .long 759964600 - .long 1073620221 - .long 4257606771 - .long 1073632453 - .long 297278907 - .long 1073644538 - .long 3655053093 - .long 1073656477 - .long 2442253172 - .long 1073668277 - .long 1111876799 - .long 1073679941 - .long 3330973139 - .long 1073691472 - .long 3438879452 - .long 1073702875 - .long 3671565478 - .long 1073714153 - .long 1317849547 - .long 1073725310 - .long 1642364115 - .long 1073736348 - .type cbrt_table,@object - .size cbrt_table,768 - .align 4 -D_table: - .long 4050900474 - .long 1014427190 - .long 1157977860 - .long 1016444461 - .long 1374568199 - .long 1017271387 - .long 2809163288 - .long 1016882676 - .long 3742377377 - .long 1013168191 - .long 3101606597 - .long 1017541672 - .long 65224358 - .long 1017217597 - .long 2691591250 - .long 1017266643 - .long 4020758549 - .long 1017689313 - .long 1316310992 - .long 1018030788 - .long 1031537856 - .long 1014090882 - .long 3261395239 - .long 1016413641 - .long 886424999 - .long 1016313335 - .long 3114776834 - .long 1014195875 - .long 1681120620 - .long 1017825416 - .long 1329600273 - .long 1016625740 - .long 465474623 - .long 1017097119 - .long 4251633980 - .long 1017169077 - .long 1986990133 - .long 1017710645 - .long 752958613 - .long 1017159641 - .long 2216216792 - .long 1018020163 - .long 4282860129 - .long 1015924861 - .long 1557627859 - .long 1016039538 - .long 3889219754 - .long 1018086237 - .long 3684996408 - .long 1017353275 - .long 723532103 - .long 1017717141 - .long 2951149676 - .long 1012528470 - .long 831890937 - .long 1017830553 - .long 1031212645 - .long 1017387331 - .long 2741737450 - .long 1017604974 - .long 2863311531 - .long 1003776682 - .long 4276736099 - .long 1013153088 - .long 4111778382 - .long 1015673686 - .long 1728065769 - .long 1016413986 - .long 2708718031 - .long 1018078833 - .long 1069335005 - .long 1015291224 - .long 700037144 - .long 1016482032 - .long 2904566452 - .long 1017226861 - .long 4074156649 - .long 1017622651 - .long 25019565 - .long 1015245366 - .long 3601952608 - .long 1015771755 - .long 3267129373 - .long 1017904664 - .long 503203103 - .long 1014921629 - .long 2122011730 - .long 1018027866 - .long 3927295461 - .long 1014189456 - .long 2790625147 - .long 1016024251 - .long 1330460186 - .long 1016940346 - .long 4033568463 - .long 1015538390 - .long 3695818227 - .long 1017509621 - .long 257573361 - .long 1017208868 - .long 3227697852 - .long 1017337964 - .long 234118548 - .long 1017169577 - .long 4009025803 - .long 1017278524 - .long 1948343394 - .long 1017749310 - .long 678398162 - .long 1018144239 - .long 3083864863 - .long 1016669086 - .long 2415453452 - .long 1017890370 - .long 175467344 - .long 1017330033 - .long 3197359580 - .long 1010339928 - .long 2071276951 - .long 1015941358 - .long 268372543 - .long 1016737773 - .long 938132959 - .long 1017389108 - .long 1816750559 - .long 1017337448 - .long 4119203749 - .long 1017152174 - .long 2578653878 - .long 1013108497 - .long 2470331096 - .long 1014678606 - .long 123855735 - .long 1016553320 - .long 1265650889 - .long 1014782687 - .long 3414398172 - .long 1017182638 - .long 1040773369 - .long 1016158401 - .long 3483628886 - .long 1016886550 - .long 4140499405 - .long 1016191425 - .long 3893477850 - .long 1016964495 - .long 3935319771 - .long 1009634717 - .long 2978982660 - .long 1015027112 - .long 2452709923 - .long 1017990229 - .long 3190365712 - .long 1015835149 - .long 4237588139 - .long 1015832925 - .long 2610678389 - .long 1017962711 - .long 2127316774 - .long 1017405770 - .long 824267502 - .long 1017959463 - .long 2165924042 - .long 1017912225 - .long 2774007076 - .long 1013257418 - .long 4123916326 - .long 1017582284 - .long 1976417958 - .long 1016959909 - .long 4092806412 - .long 1017711279 - .long 119251817 - .long 1015363631 - .long 3475418768 - .long 1017675415 - .long 1972580503 - .long 1015470684 - .long 815541017 - .long 1017517969 - .long 2429917451 - .long 1017397776 - .long 4062888482 - .long 1016749897 - .long 68284153 - .long 1017925678 - .long 2207779246 - .long 1016320298 - .long 1183466520 - .long 1017408657 - .long 143326427 - .long 1017060403 - .type D_table,@object - .size D_table,768 - .align 4 -SCALE63: - .long 0 - .long 1138753536 - .type SCALE63,@object - .size SCALE63,8 - .align 4 -ZERON: - .long 0 - .long 2147483648 - .type ZERON,@object - .size ZERON,8 - .align 4 -INF: - .long 0 - .long 2146435072 - .type INF,@object - .size INF,8 - .align 4 -NEG_INF: - .long 0 - .long 4293918720 - .type NEG_INF,@object - .size NEG_INF,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtf_gen.S deleted file mode 100644 index 773a6cb2ea..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtf_gen.S +++ /dev/null @@ -1,494 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cbrtf_gen.c" - .text -..TXTST0: -# -- Begin cbrtf - .text - .align 16,0x90 - .globl cbrtf -cbrtf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cbrtf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movss %xmm0, 8(%rsp) -..B1.2: - movl $8388607, %edx - movd %edx, %xmm5 - movl $-1081999360, %eax - movd %eax, %xmm3 - movl $-1082130432, %eax - movd %eax, %xmm1 - movl $8257536, %edx - movd %edx, %xmm2 - pextrw $1, %xmm0, %ecx - movl %ecx, %eax - andl $124, %ecx - lea rcp_table(%rip), %r8 - movss (%rcx,%r8), %xmm4 - shrl $7, %eax - movl $255, %edx - andl %eax, %edx - movq %rax, %r9 - cmpl $0, %edx - je .L_2TAG_PACKET_0.0.1 - cmpl $255, %edx - je .L_2TAG_PACKET_1.0.1 - andps %xmm0, %xmm2 - andps %xmm5, %xmm0 - orps %xmm2, %xmm3 - orps %xmm0, %xmm1 - movss coeff_table(%rip), %xmm5 - movss 4+coeff_table(%rip), %xmm6 - movl %edx, %eax - addl %eax, %eax - addl %eax, %eax - addl %edx, %eax - movl %eax, %edx - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %edx - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %edx, %eax - movq %r9, %rdx - andq $255, %r9 - subq $1, %r9 - shrl $12, %eax - andl $256, %edx - subq %rax, %r9 - subq %rax, %r9 - subq %rax, %r9 - shlq $7, %r9 - addl $85, %eax - orl %edx, %eax - movd %eax, %xmm7 - addq %r9, %rcx - psllq $23, %xmm7 -.L_2TAG_PACKET_2.0.1: - movss 8+coeff_table(%rip), %xmm2 - movss 12+coeff_table(%rip), %xmm0 - subss %xmm3, %xmm1 - movaps %xmm7, %xmm3 - lea cbrtf_table(%rip), %r8 - mulss (%rcx,%r8), %xmm7 - mulss %xmm4, %xmm1 - lea D_table(%rip), %r8 - mulss (%rcx,%r8), %xmm3 - movss %xmm1, %xmm4 - mulss %xmm1, %xmm5 - mulss %xmm1, %xmm6 - mulss %xmm1, %xmm1 - addss %xmm5, %xmm2 - addss %xmm6, %xmm0 - mulss %xmm1, %xmm2 - mulss %xmm7, %xmm4 - addss %xmm2, %xmm0 - mulss %xmm4, %xmm0 - addss %xmm3, %xmm0 - addss %xmm7, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_0.0.1: - movq %xmm0, %xmm7 - movd %xmm0, %eax - movq %rax, %r9 - shll $9, %eax - movl $23, %ecx - shrq $23, %r9 -.L_2TAG_PACKET_3.0.1: - cmpl $-2147483648, %eax - jae .L_2TAG_PACKET_4.0.1 - shll $1, %eax - addl $1, %edx - loop .L_2TAG_PACKET_3.0.1 - cmpl $0, %eax - je .L_2TAG_PACKET_5.0.1 -.L_2TAG_PACKET_4.0.1: - movl %edx, %ecx - incl %ecx - movd %ecx, %xmm7 - orq %rdx, %r9 - psllq %xmm7, %xmm0 - shrl $24, %eax - andl $124, %eax - lea rcp_table(%rip), %r8 - movsd (%r8,%rax), %xmm4 - movl %eax, %ecx - andps %xmm0, %xmm2 - andps %xmm5, %xmm0 - orps %xmm2, %xmm3 - orps %xmm0, %xmm1 - movss coeff_table(%rip), %xmm5 - movl $1366, %eax - movss 4+coeff_table(%rip), %xmm6 - mull %edx - movq %r9, %rdx - andq $255, %r9 - addq $1, %r9 - shrl $12, %eax - andl $256, %edx - subq %rax, %r9 - subq %rax, %r9 - subq %rax, %r9 - cmpq $0, %r9 - je .L_2TAG_PACKET_6.0.1 - incl %eax - subq $3, %r9 - negq %r9 -.L_2TAG_PACKET_6.0.1: - shlq $7, %r9 - addq %r9, %rcx - movq $85, %r9 - subq %rax, %r9 - orq %r9, %rdx - movd %edx, %xmm7 - psllq $23, %xmm7 - jmp .L_2TAG_PACKET_2.0.1 -.L_2TAG_PACKET_5.0.1: - cmpq $0, %r9 - jne .L_2TAG_PACKET_7.0.1 - xorps %xmm0, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_7.0.1: - movss 4+ZERON(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_1.0.1: - movl 8(%rsp), %eax - movl %eax, %ecx - andl $2147483647, %ecx - cmpl $2139095040, %ecx - ja .L_2TAG_PACKET_8.0.1 - cmpl $2139095040, %eax - jne .L_2TAG_PACKET_9.0.1 - movss INFS(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_9.0.1: - movss NEG_INFS(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_8.0.1: - movss 8(%rsp), %xmm0 - addss %xmm0, %xmm0 - movss %xmm0, (%rsp) -.L_2TAG_PACKET_10.0.1: -..B1.4: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cbrtf,@function - .size cbrtf,.-cbrtf - .data -# -- End cbrtf - .section .rodata, "a" - .align 4 - .align 4 -rcp_table: - .long 3212578753 - .long 3212085645 - .long 3211621124 - .long 3211182772 - .long 3210768440 - .long 3210376206 - .long 3210004347 - .long 3209651317 - .long 3209315720 - .long 3208996296 - .long 3208691905 - .long 3208401508 - .long 3208124163 - .long 3207859009 - .long 3207605259 - .long 3207362194 - .long 3207129151 - .long 3206905525 - .long 3206690755 - .long 3206484326 - .long 3206285761 - .long 3206094618 - .long 3205910490 - .long 3205732998 - .long 3205561788 - .long 3205396533 - .long 3205236929 - .long 3205082689 - .long 3204933547 - .long 3204789256 - .long 3204649583 - .long 3204514308 - .type rcp_table,@object - .size rcp_table,128 - .align 4 -coeff_table: - .long 3173551943 - .long 3185806905 - .long 1031591658 - .long 1051372203 - .type coeff_table,@object - .size coeff_table,16 - .align 4 -cbrtf_table: - .long 1065396681 - .long 1065482291 - .long 1065566215 - .long 1065648532 - .long 1065729317 - .long 1065808640 - .long 1065886565 - .long 1065963152 - .long 1066038457 - .long 1066112533 - .long 1066185428 - .long 1066257188 - .long 1066327857 - .long 1066397474 - .long 1066466079 - .long 1066533708 - .long 1066600394 - .long 1066666169 - .long 1066731064 - .long 1066795108 - .long 1066858329 - .long 1066920751 - .long 1066982401 - .long 1067043301 - .long 1067103474 - .long 1067162941 - .long 1067221722 - .long 1067279837 - .long 1067337305 - .long 1067394143 - .long 1067450368 - .long 1067505996 - .long 1067588354 - .long 1067696217 - .long 1067801953 - .long 1067905666 - .long 1068007450 - .long 1068107390 - .long 1068205570 - .long 1068302063 - .long 1068396942 - .long 1068490271 - .long 1068582113 - .long 1068672525 - .long 1068761562 - .long 1068849275 - .long 1068935712 - .long 1069020919 - .long 1069104937 - .long 1069187809 - .long 1069269572 - .long 1069350263 - .long 1069429915 - .long 1069508563 - .long 1069586236 - .long 1069662966 - .long 1069738778 - .long 1069813702 - .long 1069887762 - .long 1069960982 - .long 1070033387 - .long 1070104998 - .long 1070175837 - .long 1070245925 - .long 1070349689 - .long 1070485588 - .long 1070618808 - .long 1070749478 - .long 1070877717 - .long 1071003634 - .long 1071127332 - .long 1071248907 - .long 1071368446 - .long 1071486034 - .long 1071601747 - .long 1071715659 - .long 1071827839 - .long 1071938350 - .long 1072047254 - .long 1072154608 - .long 1072260465 - .long 1072364876 - .long 1072467891 - .long 1072569555 - .long 1072669911 - .long 1072769001 - .long 1072866863 - .long 1072963536 - .long 1073059054 - .long 1073153452 - .long 1073246762 - .long 1073339014 - .long 1073430238 - .long 1073520462 - .long 1073609714 - .long 1073698019 - .type cbrtf_table,@object - .size cbrtf_table,384 - .align 4 -D_table: - .long 839340838 - .long 867750258 - .long 851786446 - .long 853949398 - .long 864938789 - .long 864102364 - .long 864209792 - .long 865422805 - .long 867593594 - .long 854482593 - .long 848298042 - .long 860064854 - .long 844792593 - .long 870701309 - .long 872023170 - .long 860255342 - .long 849966899 - .long 863561479 - .long 869115319 - .long 871961375 - .long 859537336 - .long 871954398 - .long 863817578 - .long 861687921 - .long 849594757 - .long 816486846 - .long 858183533 - .long 864500406 - .long 850523240 - .long 808125243 - .long 514020693 - .long 861173761 - .long 859000219 - .long 823158129 - .long 871826232 - .long 871183196 - .long 839030530 - .long 867690638 - .long 840440923 - .long 868033274 - .long 855856030 - .long 865094453 - .long 860418487 - .long 866225006 - .long 866458226 - .long 865124659 - .long 864837702 - .long 811742505 - .long 869432099 - .long 864584201 - .long 864183978 - .long 844810573 - .long 869245699 - .long 859556409 - .long 870675446 - .long 814190139 - .long 870686941 - .long 861800510 - .long 855649163 - .long 869347119 - .long 864252033 - .long 867276215 - .long 868189817 - .long 849541095 - .long 866633177 - .long 843967686 - .long 857522493 - .long 862339487 - .long 850054662 - .long 864048556 - .long 868027089 - .long 848093931 - .long 865355299 - .long 848111485 - .long 865557362 - .long 870297525 - .long 863416216 - .long 869675693 - .long 865888071 - .long 825332584 - .long 843309506 - .long 870885636 - .long 869119784 - .long 865466648 - .long 867459244 - .long 861192764 - .long 871247716 - .long 864927982 - .long 869195129 - .long 864849564 - .long 840005936 - .long 852579258 - .long 860852782 - .long 869711141 - .long 862506141 - .long 837959274 - .type D_table,@object - .size D_table,384 - .align 4 -ZERON: - .long 0 - .long 2147483648 - .type ZERON,@object - .size ZERON,8 - .align 4 -INFS: - .long 2139095040 - .type INFS,@object - .size INFS,4 - .align 4 -NEG_INFS: - .long 4286578688 - .type NEG_INFS,@object - .size NEG_INFS,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtl.S deleted file mode 100644 index 73ebac73a9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtl.S +++ /dev/null @@ -1,379 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cbrtl.c" - .text -..TXTST0: -# -- Begin cbrtl - .text - .align 16,0x90 - .globl cbrtl -cbrtl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cbrtl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %r8b, %r8b -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzwl 56(%rsp), %ecx - movl %ecx, %edi - andl $32767, %edi - movzwl 34(%rsp), %r9d - cmpl $32767, %edi - je ..B1.20 -..B1.4: - movb 57(%rsp), %al - movl %r9d, %edx - andb $-128, %al - andl $768, %edx - shrb $7, %al - xorl %esi, %esi - movzbl %al, %eax - cmpl $768, %edx - je ..B1.8 -..B1.5: - orl $-64768, %r9d - movw %r9w, 32(%rsp) -..B1.6: - fldcw 32(%rsp) -..B1.7: - movzwl 56(%rsp), %ecx - movl %ecx, %edi - movb $1, %r8b - andl $32767, %edi -..B1.8: - testl %edi, %edi - jne ..B1.14 -..B1.9: - cmpq $0, 48(%rsp) - jne ..B1.13 -..B1.10: - lea _zeros(%rip), %rdx - testb %r8b, %r8b - movsd (%rdx,%rax,8), %xmm0 - je ..B1.12 -..B1.11: - fldcw 34(%rsp) -..B1.12: - movsd %xmm0, (%rsp) - fldl (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.13: - fldt 48(%rsp) - movl $-25, %esi - lea _TWO_75(%rip), %rdx - fmull (%rdx) - fstpt 48(%rsp) - movzwl 56(%rsp), %ecx - movl %ecx, %edi - andl $32767, %edi -..B1.14: - fldt .L_2il0floatpacket.0(%rip) - lea ones(%rip), %r9 - andl $-32768, %ecx - orl $-49153, %ecx - movw %cx, 56(%rsp) - fldl (%r9,%rax,8) - lea 96+_P(%rip), %r9 - movl 52(%rsp), %ecx - shrl $23, %ecx - movzbl %cl, %eax - lea _TWO_32H(%rip), %rcx - movq __libm_rcp_table_256@GOTPCREL(%rip), %r11 - imull $21845, %edi, %edx - fstpt 16(%rsp) - fldt 16(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - flds (%r11,%rax,4) - addl $21845, %edx - fld %st(0) - lea 32+_P(%rip), %r11 - fldl (%rcx) - lea 80+_P(%rip), %rcx - fld %st(0) - shrl $16, %edx - fadd %st(4), %st - shlq $4, %rax - lea (%rdx,%rdx), %r10d - subl %r10d, %edi - lea 64+_P(%rip), %r10 - fsubp %st, %st(1) - fmul %st, %st(1) - lea 10922(%rsi,%rdx), %esi - fxch %st(1) - fsub %st(4), %st - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%r9) - lea 48+_P(%rip), %r9 - fmul %st(2), %st - fldt (%r10) - lea 16+_P(%rip), %r10 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r11) - lea _P(%rip), %r11 - faddp %st, %st(1) - fmul %st(2), %st - fmul %st(1), %st - fldt (%rcx) - fmul %st(3), %st - fldt (%r9) - movzwl 24(%rsp), %ecx - faddp %st, %st(1) - fmul %st(3), %st - andl $-32768, %ecx - fldt (%r10) - orl %esi, %ecx - movw %cx, 24(%rsp) - subl %edx, %edi - movq __libm_cbrtl_table_256@GOTPCREL(%rip), %rdx - faddp %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt (%r11) - fmulp %st, %st(1) - faddp %st, %st(1) - fadd %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fldl 8(%rdx,%rax) - fldl (%rdx,%rax) - fldt 16(%rsp) - jne ..B1.16 -..B1.15: - fldt (%rsp) - fmulp %st, %st(3) - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.17 -..B1.16: - fldt (%rsp) - lea SH(%rip), %rax - movslq %edi, %rdi - fxch %st(3) - fmull -8(%rax,%rdi,8) - fldl 24(%rax,%rdi,8) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(1) - fmull 8(%rax,%rdi,8) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.17: - testb %r8b, %r8b - je ..B1.19 -..B1.18: - fldcw 34(%rsp) -..B1.19: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.20: - movl %r9d, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.26 -..B1.21: - orl $-64768, %r9d - movw %r9w, 32(%rsp) -..B1.22: - fldcw 32(%rsp) -..B1.23: - fldt 48(%rsp) - fstpt (%rsp) -..B1.24: - fldcw 34(%rsp) -..B1.25: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.26: - fldt 48(%rsp) - fstpt (%rsp) - jmp ..B1.25 - .align 16,0x90 - .cfi_endproc - .type cbrtl,@function - .size cbrtl,.-cbrtl - .data -# -- End cbrtl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -SH: - .long 0xf98d728b,0x3ff428a2 - .long 0xa53d6e3d,0x3ff965fe - .long 0xf8000000,0x3ff428a2 - .long 0xa4000000,0x3ff965fe - .long 0xae223ddb,0x3e38d728 - .long 0xc82b059a,0x3e33d6e3 - .type SH,@object - .size SH,48 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_P: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 58320 - .word 36408 - .word 14563 - .word 58254 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 50474 - .word 25890 - .word 59872 - .word 64726 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 45217 - .word 37017 - .word 18069 - .word 43151 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 45059 - .word 7616 - .word 35240 - .word 63288 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 54522 - .word 17175 - .word 48475 - .word 49224 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 568 - .word 55426 - .word 44619 - .word 39848 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,112 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtl_table.S deleted file mode 100644 index a5fa423338..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cbrtl_table.S +++ /dev/null @@ -1,559 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cbrtl_table.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __libm_cbrtl_table_256 -__libm_cbrtl_table_256: - .long 0x8e000000,0x3ff002ab - .long 0x20d8688c,0x3e2230dd - .long 0x08000000,0x3ff00808 - .long 0xeff25f12,0x3e3610f3 - .long 0xba000000,0x3ff00d6b - .long 0x3efe3543,0xbe0b4bfa - .long 0xb2000000,0x3ff012d6 - .long 0x2c9e7759,0xbe32d173 - .long 0x4e000000,0x3ff0179a - .long 0x013f2daf,0x3e1eca95 - .long 0x1a000000,0x3ff01d13 - .long 0x1a1a641f,0xbe35afd8 - .long 0x5a000000,0x3ff02293 - .long 0xa40f870c,0x3e3acf85 - .long 0xc6000000,0x3ff02769 - .long 0x8b30b2ed,0xbe1bd4a4 - .long 0x3c000000,0x3ff02cf8 - .long 0xc2b35d57,0xbe10fe10 - .long 0x2e000000,0x3ff031db - .long 0x9aefd6bc,0x3e1dc088 - .long 0x1a000000,0x3ff03778 - .long 0x26cf8b86,0xbe3983d8 - .long 0xcc000000,0x3ff03c67 - .long 0xa0938ea4,0x3e33f7ce - .long 0x8a000000,0x3ff0415d - .long 0x1f4527e6,0x3e1271e1 - .long 0x1e000000,0x3ff04710 - .long 0xe014332a,0x3e2e39c2 - .long 0xf4000000,0x3ff04c12 - .long 0x4801f107,0x3e28aa39 - .long 0xfc000000,0x3ff0511b - .long 0x5e2d9f07,0x3dbd36bd - .long 0x42000000,0x3ff0562b - .long 0xc47ab24f,0x3df8a6e2 - .long 0xd4000000,0x3ff05b40 - .long 0x24da1d13,0x3e249ec6 - .long 0xc2000000,0x3ff0605c - .long 0x31b189b7,0xbe227295 - .long 0x16000000,0x3ff0657f - .long 0x7872e1cd,0x3e17f761 - .long 0xe2000000,0x3ff06aa7 - .long 0xc4a6c979,0xbe18ff8e - .long 0x32000000,0x3ff06fd7 - .long 0x37586fc9,0xbe22bc1f - .long 0x1e000000,0x3ff0744e - .long 0xda6466ae,0x3e213213 - .long 0xb0000000,0x3ff07989 - .long 0xd1b04779,0xbe181829 - .long 0xf0000000,0x3ff07ecb - .long 0x52cf55c8,0xbe2d5de3 - .long 0xea000000,0x3ff08414 - .long 0xa790ab31,0x3e3e5ef6 - .long 0x0a000000,0x3ff088a2 - .long 0x7bee6b1f,0xbe33c01d - .long 0xb2000000,0x3ff08df7 - .long 0xed26e53e,0x3e0b930b - .long 0xc4000000,0x3ff0928f - .long 0x35afee34,0xbe2f72c3 - .long 0x4e000000,0x3ff097f2 - .long 0x1166e9a4,0x3e256094 - .long 0x82000000,0x3ff09c95 - .long 0x5ae9d19c,0xbe01eed4 - .long 0xe8000000,0x3ff0a13d - .long 0x82f9b502,0x3e22e1bc - .long 0xac000000,0x3ff0a6b3 - .long 0xdecb71aa,0xbe13744b - .long 0x7c000000,0x3ff0ab67 - .long 0x79520489,0xbe34918f - .long 0x9e000000,0x3ff0b020 - .long 0xf330a139,0x3df882be - .long 0x20000000,0x3ff0b4df - .long 0xc3236255,0x3e1c8694 - .long 0xe6000000,0x3ff0ba6e - .long 0x119c7384,0xbdd954af - .long 0x30000000,0x3ff0bf39 - .long 0x17946a4f,0x3e17e600 - .long 0xfc000000,0x3ff0c408 - .long 0xa96efefe,0x3dfcfd4a - .long 0x54000000,0x3ff0c8de - .long 0xc29018c1,0x3e137bfa - .long 0x44000000,0x3ff0cdb9 - .long 0x6b55ea13,0x3e075409 - .long 0xd8000000,0x3ff0d299 - .long 0x17222364,0xbe2c80ba - .long 0x1a000000,0x3ff0d780 - .long 0xf030bcdb,0xbe36c2d9 - .long 0xae000000,0x3ff0db99 - .long 0x583eb4fd,0x3e23f39e - .long 0x7a000000,0x3ff0e08a - .long 0x1bc25b4a,0xbe2ee94c - .long 0x14000000,0x3ff0e581 - .long 0x2f4f4e2c,0xbe2785bf - .long 0x88000000,0x3ff0ea7d - .long 0xd8bcbdfc,0x3e3525a2 - .long 0xe6000000,0x3ff0ef7f - .long 0xed67b448,0x3e359433 - .long 0x16000000,0x3ff0f3b1 - .long 0xc931fbd5,0x3e2bf870 - .long 0x6a000000,0x3ff0f8be - .long 0xe78cbbad,0xbe32480c - .long 0xca000000,0x3ff0fcf8 - .long 0x795e6dd9,0x3e1f7d67 - .long 0x3a000000,0x3ff10211 - .long 0xfbf1714f,0x3e239cff - .long 0xce000000,0x3ff1072f - .long 0x55d6f69a,0xbe272643 - .long 0xac000000,0x3ff10b78 - .long 0xfdfa2d3b,0xbe286878 - .long 0xdc000000,0x3ff10fc5 - .long 0xd49627b5,0x3e1c95db - .long 0x0c000000,0x3ff114f5 - .long 0xf6a23fbe,0xbe2e06fe - .long 0xda000000,0x3ff1194b - .long 0x8f075abc,0x3e34ceb2 - .long 0xac000000,0x3ff11e86 - .long 0x90dc17c3,0x3e066bd5 - .long 0x40000000,0x3ff122e7 - .long 0xc04b5d49,0x3e359eb9 - .long 0x54000000,0x3ff1274c - .long 0xaf65cf99,0x3df316d4 - .long 0xec000000,0x3ff12bb5 - .long 0x7163f782,0x3e1b91b5 - .long 0x74000000,0x3ff13107 - .long 0xb1d8a38e,0xbe171e82 - .long 0x1c000000,0x3ff1357b - .long 0x142a679f,0xbe1645ad - .long 0x64000000,0x3ff139f3 - .long 0x03011ac3,0xbe119734 - .long 0x54000000,0x3ff13e70 - .long 0xceefd26a,0x3e12c753 - .long 0xf6000000,0x3ff142f1 - .long 0x1ae3077b,0xbdff336e - .long 0x50000000,0x3ff14778 - .long 0xa313efdd,0x3e3167c3 - .long 0x6e000000,0x3ff14c03 - .long 0xe0d315a6,0x3e23d347 - .long 0x56000000,0x3ff15093 - .long 0x8ec79515,0x3e34284e - .long 0x14000000,0x3ff15528 - .long 0x6ca0e852,0xbdfd2648 - .long 0xae000000,0x3ff159c1 - .long 0x33a7b5b1,0xbe21074d - .long 0x2c000000,0x3ff15e60 - .long 0x6aaf8c8a,0x3e311566 - .long 0x9c000000,0x3ff16303 - .long 0xdfa56cef,0xbe04190c - .long 0x02000000,0x3ff167ac - .long 0x96f8f747,0x3e30bf5f - .long 0x6c000000,0x3ff16c59 - .long 0x67e1e977,0x3dddd97d - .long 0xfc000000,0x3ff1701a - .long 0xf643cd8e,0xbe32877d - .long 0x80000000,0x3ff174d1 - .long 0x618d0ab4,0xbe318a71 - .long 0x1e000000,0x3ff1798d - .long 0xe66a5be3,0x3e373f3e - .long 0xe6000000,0x3ff17e4d - .long 0xca1da90a,0x3e0c534f - .long 0x0e000000,0x3ff1821f - .long 0xe06a8431,0xbe0ec5e5 - .long 0x32000000,0x3ff186e9 - .long 0xbb5373b7,0x3e06cc6a - .long 0x98000000,0x3ff18bb8 - .long 0x80c817c3,0x3e23ddc1 - .long 0x88000000,0x3ff18f95 - .long 0x70817aed,0xbe25cef4 - .long 0x7e000000,0x3ff1946e - .long 0x71612988,0x3e0b7bf2 - .long 0x22000000,0x3ff19853 - .long 0xdad7b32a,0xbe3008d5 - .long 0xc8000000,0x3ff19d35 - .long 0x558f59ee,0x3e3d2925 - .long 0x3c000000,0x3ff1a122 - .long 0x97916e24,0xbe112012 - .long 0xba000000,0x3ff1a60e - .long 0xf6235d3b,0xbe361be1 - .long 0x14000000,0x3ff1aa03 - .long 0xefaa3b2e,0x3e33a9bc - .long 0x8a000000,0x3ff1aef9 - .long 0x95d61bf1,0xbe3045d7 - .long 0xec000000,0x3ff1b2f5 - .long 0xe5b6bd1c,0x3e1a939c - .long 0xea000000,0x3ff1b6f5 - .long 0x00756ed3,0x3e118b3c - .long 0x02000000,0x3ff1bbfb - .long 0x34057364,0xbe20e5cf - .long 0x30000000,0x3ff1c003 - .long 0x701907b3,0xbe0e1837 - .long 0x0c000000,0x3ff1c40f - .long 0x7c6221b9,0xbe282207 - .long 0x9a000000,0x3ff1c81e - .long 0x71d8c073,0xbe09f360 - .long 0x4a000000,0x3ff1cd37 - .long 0x436616b2,0xbe3261a0 - .long 0x40000000,0x3ff1d14f - .long 0xc7c5e4df,0x3df7af5c - .long 0xfe000000,0x3ff1d56a - .long 0x5ae36062,0xbdfc61a1 - .long 0x88000000,0x3ff1d98a - .long 0xed667c98,0x3e167fd8 - .long 0xe6000000,0x3ff1ddad - .long 0xa010e825,0xbe16ada9 - .long 0x1c000000,0x3ff1e1d5 - .long 0x012f4beb,0xbdbb777c - .long 0x92000000,0x3ff1e70b - .long 0xe05d5c18,0x3e275a5a - .long 0x88000000,0x3ff1eb3b - .long 0x87963143,0x3e1f6ec9 - .long 0x6c000000,0x3ff1ef6f - .long 0xc77f5502,0xbdf400a5 - .long 0x44000000,0x3ff1f3a7 - .long 0x83209a84,0xbe2057a6 - .long 0x14000000,0x3ff1f7e3 - .long 0xcdb4bd2e,0x3e3b8696 - .long 0xea000000,0x3ff1fc22 - .long 0x7dac9b38,0xbe29872a - .long 0xc4000000,0x3ff20066 - .long 0x7e34701c,0x3e22a9a1 - .long 0xae000000,0x3ff204ae - .long 0xae177d59,0x3e2257cd - .long 0x4c000000,0x3ff207e7 - .long 0x6fe6d0dd,0xbe119fb7 - .long 0x60000000,0x3ff20c36 - .long 0x22ab7e20,0xbe18a6a1 - .long 0x94000000,0x3ff21089 - .long 0xca9c3288,0x3e2c8440 - .long 0xf2000000,0x3ff214e0 - .long 0x8575ebf1,0x3e200f9a - .long 0x80000000,0x3ff2193c - .long 0x219c164a,0xbe2140a7 - .long 0x44000000,0x3ff21d9c - .long 0x2238e180,0xbe326ebd - .long 0x44000000,0x3ff22200 - .long 0x0f5fa626,0xbe084ae9 - .long 0x10000000,0x3ff2254e - .long 0x20e924cc,0x3e34737d - .long 0x90000000,0x3ff229b9 - .long 0x7241c459,0xbe233bae - .long 0x60000000,0x3ff22e29 - .long 0xecaa31e6,0xbe2cc059 - .long 0x14000000,0x3ff23180 - .long 0x7a5a0dea,0x3e2bcde5 - .long 0x84000000,0x3ff235f7 - .long 0x52b90575,0x3e333da0 - .long 0x5a000000,0x3ff23a73 - .long 0x1b60c92e,0x3e3a7d2b - .long 0x24000000,0x3ff23dd3 - .long 0xb235ec84,0x3df512e9 - .long 0xc0000000,0x3ff24256 - .long 0x1f3855f6,0xbe1a9d64 - .long 0xd6000000,0x3ff246de - .long 0xfe758c34,0x3e12b491 - .long 0xde000000,0x3ff24a47 - .long 0x607a2edb,0xbe320de4 - .long 0xde000000,0x3ff24ed7 - .long 0xbc58ecd4,0x3dd8f375 - .long 0xde000000,0x3ff25246 - .long 0xda99c7ed,0xbe1ee42e - .long 0xe2000000,0x3ff256de - .long 0x88f4f655,0xbe220405 - .long 0xec000000,0x3ff25a53 - .long 0xc2b1fe7f,0x3e0eec7d - .long 0x0c000000,0x3ff25ef4 - .long 0xb6841168,0xbe1523a2 - .long 0x34000000,0x3ff2626f - .long 0x7056af50,0x3e200ef9 - .long 0x8a000000,0x3ff26717 - .long 0x8197860c,0xbe3643a3 - .long 0xe2000000,0x3ff26a98 - .long 0x52183874,0x3e204b1a - .long 0x84000000,0x3ff26f49 - .long 0x89899f96,0x3e2ce41f - .long 0x22000000,0x3ff272d1 - .long 0x2eba11d7,0x3e33edcf - .long 0x2e000000,0x3ff2778a - .long 0x9b69a0ac,0xbdd15cbf - .long 0x26000000,0x3ff27b18 - .long 0x4c9cfc18,0xbe384c83 - .long 0xd8000000,0x3ff27ea8 - .long 0x00ebd8b6,0x3e32abcc - .long 0x16000000,0x3ff2836e - .long 0xf0c27bf5,0xbe334f0d - .long 0x3e000000,0x3ff28705 - .long 0x2c84c19b,0x3e19ba08 - .long 0x34000000,0x3ff28a9f - .long 0x765ba98f,0xbe351348 - .long 0xd6000000,0x3ff28f70 - .long 0x0bb50259,0x3e25fd61 - .long 0x5c000000,0x3ff29311 - .long 0x1f0ba391,0x3e36468e - .long 0xbc000000,0x3ff296b4 - .long 0x5eb0d555,0xbe1b4b50 - .long 0xf4000000,0x3ff29a5a - .long 0x1684aafd,0x3e322e1b - .long 0x10000000,0x3ff29f3d - .long 0x7f3902f7,0xbe1143a0 - .long 0x04000000,0x3ff2a2ea - .long 0x9d87f711,0xbe296bf0 - .long 0xe0000000,0x3ff2a699 - .long 0xd317cd41,0xbe267680 - .long 0xa8000000,0x3ff2aa4c - .long 0x895632cb,0x3de71246 - .long 0x60000000,0x3ff2ae02 - .long 0x70ae3e69,0x3e383f37 - .long 0x48000000,0x3ff2b2f9 - .long 0x183dd905,0x3e019525 - .long 0xee000000,0x3ff2b6b5 - .long 0xb11ed34f,0xbde2956c - .long 0x92000000,0x3ff2ba75 - .long 0xebcee2d4,0x3e139d57 - .long 0x3a000000,0x3ff2be38 - .long 0x25efe1d2,0xbe24080b - .long 0xe8000000,0x3ff2c1fd - .long 0xca843d11,0xbe22f3d1 - .long 0xa0000000,0x3ff2c5c6 - .long 0x27157d0b,0x3e25d6d0 - .long 0x6a000000,0x3ff2c992 - .long 0x47c03cbd,0xbe1f901f - .long 0x46000000,0x3ff2cd61 - .long 0xc7d41505,0x3e0c9c6b - .long 0x3a000000,0x3ff2d133 - .long 0x4c9cbf49,0x3e335b1a - .long 0x4e000000,0x3ff2d508 - .long 0xf0d67754,0xbe31f5cc - .long 0x80000000,0x3ff2d8e0 - .long 0x08d6ec2a,0xbe14dddd - .long 0xd8000000,0x3ff2dcbb - .long 0xd1a31600,0x3df4f684 - .long 0x5a000000,0x3ff2e09a - .long 0xe7cb28ec,0x3e23d67d - .long 0x0c000000,0x3ff2e47c - .long 0x64fad19f,0xbe0416e4 - .long 0xf0000000,0x3ff2e860 - .long 0xc1845328,0x3e15f191 - .long 0x0e000000,0x3ff2ec49 - .long 0x0e8212a2,0xbe3407e4 - .long 0x66000000,0x3ff2f034 - .long 0xa6af14fb,0xbe119cdf - .long 0x00000000,0x3ff2f423 - .long 0xdd2ff4b2,0xbdd785b8 - .long 0xe0000000,0x3ff2f814 - .long 0x3c8bc168,0x3e0f9d26 - .long 0x0c000000,0x3ff2fc0a - .long 0x7f285f7f,0xbe25e721 - .long 0x54000000,0x3ff2feaf - .long 0xe4707431,0xbde3d3dc - .long 0x06000000,0x3ff302aa - .long 0x54e59df9,0x3e1b2c8a - .long 0x12000000,0x3ff306a8 - .long 0x5bf8bf35,0xbe35f560 - .long 0x78000000,0x3ff30aa9 - .long 0x1bf7ce44,0xbe201d62 - .long 0x40000000,0x3ff30eae - .long 0x268d3880,0xbda201ac - .long 0x6e000000,0x3ff312b6 - .long 0x78463451,0x3e323ba0 - .long 0x74000000,0x3ff31568 - .long 0x431ff6b5,0x3e27f197 - .long 0x5c000000,0x3ff31976 - .long 0x1d86063e,0xbe3cd285 - .long 0xb4000000,0x3ff31d87 - .long 0xde58cb2b,0xbe038490 - .long 0x86000000,0x3ff3219c - .long 0x0d0ecee4,0x3e2b6d7a - .long 0x04000000,0x3ff32457 - .long 0x67a045ac,0x3e081609 - .long 0xae000000,0x3ff32871 - .long 0x218aae81,0xbe2e422a - .long 0xde000000,0x3ff32c8f - .long 0x77d29102,0xbe27b381 - .long 0xa0000000,0x3ff32f50 - .long 0x1b3eff6b,0x3e21691f - .long 0xbe000000,0x3ff33374 - .long 0xd026a2c6,0x3e04f8ad - .long 0x72000000,0x3ff3379c - .long 0x4d48535f,0xbe22ae68 - .long 0x94000000,0x3ff33a63 - .long 0x1f2825ca,0x3df10fe6 - .long 0x4c000000,0x3ff33e91 - .long 0x0279faec,0x3e2a71d3 - .long 0xaa000000,0x3ff342c2 - .long 0x78d2f376,0xbe04bba3 - .long 0x46000000,0x3ff34590 - .long 0x998a41e9,0xbe03e672 - .long 0xc0000000,0x3ff349c7 - .long 0x36ef8407,0x3e3019b2 - .long 0xee000000,0x3ff34e02 - .long 0x645bac29,0x3e35fca4 - .long 0x20000000,0x3ff350d7 - .long 0x07bfe20f,0xbe25ac45 - .long 0x86000000,0x3ff35518 - .long 0x5aa1ebf5,0xbe2e6547 - .long 0xe0000000,0x3ff357f0 - .long 0xee89ceb5,0xbe287b40 - .long 0x8c000000,0x3ff35c38 - .long 0xa4e8d2ef,0x3e17e02f - .long 0x1c000000,0x3ff35f15 - .long 0xd982cb35,0xbe1b64a3 - .long 0x22000000,0x3ff36363 - .long 0x51a0e2b8,0xbe398839 - .long 0xfc000000,0x3ff367b4 - .long 0x5db6b242,0xbe243ecf - .long 0x5c000000,0x3ff36a98 - .long 0x04aa635d,0x3e2322a4 - .long 0xaa000000,0x3ff36ef0 - .long 0xdffe6c15,0xbe09399e - .long 0x5e000000,0x3ff371d8 - .long 0x25a11d1c,0xbe330e55 - .long 0xce000000,0x3ff374c1 - .long 0x3129afdf,0xbe268d7b - .long 0x3e000000,0x3ff37923 - .long 0xb97189dc,0xbe26657a - .long 0x10000000,0x3ff37c11 - .long 0xea29a16b,0xbe1fb083 - .long 0x1c000000,0x3ff38079 - .long 0x95fa7d47,0xbe340007 - .long 0x5a000000,0x3ff3836b - .long 0x5dc9ac54,0x3e10d40e - .long 0x12000000,0x3ff387da - .long 0x5012ad99,0x3e10b74e - .long 0xca000000,0x3ff38ad0 - .long 0xf7bd2128,0x3e2b0108 - .long 0x40000000,0x3ff38f46 - .long 0x9cc0ea9d,0x3e35e485 - .long 0x7e000000,0x3ff39241 - .long 0x770980a5,0x3e2ea300 - .long 0x90000000,0x3ff3953e - .long 0xd4c7a782,0xbe344ce9 - .long 0x96000000,0x3ff399bd - .long 0x940f9584,0xbe33e2fe - .long 0x3a000000,0x3ff39cbf - .long 0x24087e1a,0x3e2194f5 - .long 0xba000000,0x3ff39fc2 - .long 0x89c83cca,0xbe231d00 - .long 0x72000000,0x3ff3a44b - .long 0x3f2ced31,0x3e307ed8 - .long 0x98000000,0x3ff3a753 - .long 0x3dad14f7,0x3e34644c - .long 0xa0000000,0x3ff3aa5d - .long 0x44bf6650,0xbe198a0f - .long 0x32000000,0x3ff3aef0 - .long 0x83ce161a,0xbe13523e - .long 0xf2000000,0x3ff3b1fe - .long 0x3e4fb0ba,0xbe2b016e - .long 0x98000000,0x3ff3b50f - .long 0x5a266eb9,0xbe00c90d - .long 0x28000000,0x3ff3b9ac - .long 0x5d6435a9,0x3df6946b - .long 0x9a000000,0x3ff3bcc1 - .long 0xb51ea777,0x3deb71b8 - .long 0xfa000000,0x3ff3bfd8 - .long 0xddbd1e72,0x3e23310e - .long 0x4c000000,0x3ff3c2f2 - .long 0x3b61a362,0xbe036033 - .long 0xee000000,0x3ff3c79b - .long 0xfc551ad6,0xbe125411 - .long 0x22000000,0x3ff3caba - .long 0xf4f97f1b,0x3df6c6c6 - .long 0x4e000000,0x3ff3cdda - .long 0x34b9c5a5,0x3e265154 - .long 0x76000000,0x3ff3d0fc - .long 0x63686af4,0xbe11e3d1 - .long 0x6a000000,0x3ff3d5b3 - .long 0x41549461,0x3e22cde8 - .long 0x8e000000,0x3ff3d8da - .long 0x77ad6645,0xbe270a08 - .long 0xb2000000,0x3ff3dc03 - .long 0x15410840,0x3e008be3 - .long 0xdc000000,0x3ff3df2e - .long 0xcbeff11b,0xbe23e35d - .long 0x0c000000,0x3ff3e25c - .long 0x4f6d956b,0xbe26e298 - .long 0x44000000,0x3ff3e58b - .long 0xccfac644,0x3dfe9b4c - .long 0xee000000,0x3ff3ea55 - .long 0x67939d69,0x3e31da2e - .long 0x48000000,0x3ff3ed8a - .long 0x801a7764,0x3e1351ce - .long 0xb4000000,0x3ff3f0c0 - .long 0x501a20c7,0xbe3857a0 - .long 0x30000000,0x3ff3f3f9 - .long 0x57940f51,0xbdd234a1 - .long 0xc4000000,0x3ff3f733 - .long 0x3f2233b4,0xbe2ac2d6 - .long 0x6e000000,0x3ff3fa70 - .long 0xedca8a34,0x3e18e528 - .long 0x34000000,0x3ff3fdaf - .long 0x08b5b935,0x3de3efe5 - .long 0x16000000,0x3ff400f0 - .long 0x3ba01202,0x3e204ec9 - .long 0x64000000,0x3ff405d5 - .long 0x619a3fdd,0x3e3888e9 - .long 0x9c000000,0x3ff4091b - .long 0x5d7bbc67,0xbe35c660 - .long 0xf4000000,0x3ff40c63 - .long 0x371a5b37,0x3e312962 - .long 0x78000000,0x3ff40fae - .long 0xfd4427e8,0xbe266865 - .long 0x24000000,0x3ff412fb - .long 0xe4fe1e06,0xbe095508 - .long 0xfe000000,0x3ff41649 - .long 0x7f425eed,0xbe2d87f6 - .long 0x04000000,0x3ff4199b - .long 0xed161ccb,0x3e3a37a5 - .long 0x40000000,0x3ff41cee - .long 0xf32e9c13,0x3dd0ac84 - .long 0xb0000000,0x3ff42043 - .long 0x6f5637aa,0xbe33e54f - .long 0x56000000,0x3ff4239b - .long 0xb5063313,0xbe393f2e - .long 0x34000000,0x3ff426f5 - .long 0xbfa6486b,0xbe1a1603 - .type __libm_cbrtl_table_256,@object - .size __libm_cbrtl_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccos.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccos.S deleted file mode 100644 index ad95ef6f5c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccos.S +++ /dev/null @@ -1,147 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccos.c" - .text -..TXTST0: -# -- Begin ccos - .text - .align 16,0x90 - .globl ccos -ccos: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ccos.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movsd %xmm1, 24(%rsp) - movzwl 30(%rsp), %eax - andl $32752, %eax - movsd %xmm0, 16(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.5 -..B1.3: - testl $1048575, 28(%rsp) - jne ..B1.7 -..B1.4: - cmpl $0, 24(%rsp) - jne ..B1.7 -..B1.5: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.6: - movb 31(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm1 - movhpd 8(%rsp), %xmm1 -..B1.7: - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - call ccosh@PLT -..B1.10: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ccos,@function - .size ccos,.-ccos - .data -# -- End ccos - .text -# -- Begin ccosf - .text - .align 16,0x90 - .globl ccosf -ccosf: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_ccosf.6: -..L7: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) - movzwl 14(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.4 -..B2.3: - testl $8388607, 12(%rsp) - jne ..B2.6 -..B2.4: - movsd %xmm0, (%rsp) -..B2.5: - movb 15(%rsp), %al - notb %al - movb 3(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 3(%rsp) - movsd (%rsp), %xmm0 -..B2.6: - call ccoshf@PLT -..B2.9: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ccosf,@function - .size ccosf,.-ccosf - .data -# -- End ccosf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccosh.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccosh.S deleted file mode 100644 index 1cede1de9a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccosh.S +++ /dev/null @@ -1,566 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccosh.c" - .text -..TXTST0: -# -- Begin ccoshf - .text - .align 16,0x90 - .globl ccoshf -ccoshf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ccoshf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - cvtps2pd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 -..___tag_value_ccoshf.4: - call ccosh@PLT -..___tag_value_ccoshf.5: -..B1.10: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - movsd %xmm0, 4(%rsp) - movzwl 6(%rsp), %eax - testl $32640, %eax - jne ..B1.4 -..B1.3: - testl $8388607, 4(%rsp) - jne ..B1.6 -..B1.4: - movzwl 10(%rsp), %eax - testl $32640, %eax - jne ..B1.7 -..B1.5: - testl $8388607, 8(%rsp) - je ..B1.7 -..B1.6: - movl $8388608, (%rsp) - movss (%rsp), %xmm1 - movss (%rsp), %xmm0 - mulss %xmm0, %xmm1 - movsd 4(%rsp), %xmm0 - movss %xmm1, (%rsp) -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ccoshf,@function - .size ccoshf,.-ccoshf - .data -# -- End ccoshf - .text -# -- Begin ccosh - .text - .align 16,0x90 - .globl ccosh -ccosh: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_ccosh.8: -..L9: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %rbp - .cfi_def_cfa_offset 32 - .cfi_offset 6, -32 - movq %fs:40, %rax - subq $112, %rsp - .cfi_def_cfa_offset 144 - movsd %xmm0, 48(%rsp) - xorq %rsp, %rax - movzwl 54(%rsp), %r12d - andl $32752, %r12d - shrl $4, %r12d - movsd %xmm1, 56(%rsp) - cmpl $2047, %r12d - movq %rax, 96(%rsp) - jge ..B2.23 -..B2.2: - testl %r12d, %r12d - jle ..B2.46 -..B2.3: - movzwl 62(%rsp), %ebp - andl $32752, %ebp - shrl $4, %ebp - cmpl $2047, %ebp - jge ..B2.24 -..B2.4: - testl %ebp, %ebp - jle ..B2.44 -..B2.5: - cmpl $1034, %r12d - jl ..B2.11 -..B2.6: - lea _CONSTANTS(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 24(%rsp) - movsd 56(%rsp), %xmm0 - movsd %xmm0, 16(%rsp) - call __libm_sse2_sincos@PLT -..B2.59: - movaps %xmm0, %xmm2 - testl %ebp, %ebp - movsd 24(%rsp), %xmm0 - mulsd %xmm0, %xmm1 - mulsd 48(%rsp), %xmm0 - movsd %xmm0, 24(%rsp) - movsd %xmm1, (%rsp) - movsd %xmm0, 8(%rsp) - jle ..B2.8 -..B2.7: - mulsd %xmm2, %xmm0 - movsd %xmm0, 24(%rsp) - jmp ..B2.9 -..B2.8: - movsd 8(%rsp), %xmm0 - mulsd 16(%rsp), %xmm0 - movsd %xmm0, 24(%rsp) -..B2.9: - movsd %xmm0, 8(%rsp) - movq 96(%rsp), %rax - xorq %rsp, %rax - movsd (%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.43 -..B2.10: - movsd 24(%rsp), %xmm1 - addq $112, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 6, -32 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B2.11: - movsd 48(%rsp), %xmm0 - lea 64(%rsp), %rdi -..___tag_value_ccosh.28: - call __libm_cosh_k64@PLT -..___tag_value_ccosh.29: -..B2.60: - movl %eax, %r13d -..B2.12: - movsd 64(%rsp), %xmm0 - movsd 72(%rsp), %xmm4 - movaps %xmm0, %xmm5 - movsd .L_2il0floatpacket.13(%rip), %xmm3 - addsd %xmm4, %xmm5 - mulsd %xmm5, %xmm3 - movaps %xmm5, %xmm1 - subsd %xmm0, %xmm1 - movaps %xmm3, %xmm2 - subsd %xmm1, %xmm4 - subsd %xmm5, %xmm2 - movzwl 54(%rsp), %eax - subsd %xmm2, %xmm3 - andl $32752, %eax - subsd %xmm3, %xmm5 - movsd %xmm3, 64(%rsp) - cmpl $13168, %eax - addsd %xmm4, %xmm5 - movsd %xmm5, 72(%rsp) - jge ..B2.14 -..B2.13: - lea 16+_CONSTANTS(%rip), %r12 - lea 40(%rsp), %rdx - movsd 8(%rdx), %xmm0 - pxor %xmm5, %xmm5 - mulsd (%r12), %xmm0 - movsd %xmm0, -8(%rdx) - movzwl -2(%rdx), %eax - movl %eax, %r12d - andl $32752, %r12d - andl $-32753, %eax - shrl $4, %r12d - orl $-49168, %eax - movw %ax, -2(%rdx) - addl $-1279, %r12d - jmp ..B2.16 -..B2.14: - movsd 48(%rsp), %xmm0 - lea 32(%rsp), %rdi -..___tag_value_ccosh.30: - call __libm_sinh_k64@PLT -..___tag_value_ccosh.31: -..B2.61: - movl %eax, %r12d -..B2.15: - lea 40(%rsp), %rdx - movsd (%rdx), %xmm5 -..B2.16: - movsd 32(%rsp), %xmm0 - movaps %xmm5, %xmm4 - movsd .L_2il0floatpacket.13(%rip), %xmm3 - lea 16(%rsp), %rdi - addsd %xmm0, %xmm4 - mulsd %xmm4, %xmm3 - movaps %xmm4, %xmm1 - subsd %xmm0, %xmm1 - movaps %xmm3, %xmm2 - lea 80(%rsp), %rsi - movsd -24(%rsi), %xmm0 - subsd %xmm4, %xmm2 - subsd %xmm1, %xmm5 - subsd %xmm2, %xmm3 - movsd %xmm3, -48(%rsi) - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - movsd %xmm5, (%rdx) -..___tag_value_ccosh.32: - call __libm_sincos_k64@PLT -..___tag_value_ccosh.33: -..B2.17: - movsd 80(%rsp), %xmm0 - lea 8+_CONSTANTS(%rip), %rax - movsd 88(%rsp), %xmm4 - movaps %xmm0, %xmm3 - movsd .L_2il0floatpacket.13(%rip), %xmm6 - addsd %xmm4, %xmm3 - mulsd %xmm3, %xmm6 - movaps %xmm3, %xmm1 - subsd %xmm0, %xmm1 - movaps %xmm6, %xmm2 - subsd %xmm1, %xmm4 - subsd %xmm3, %xmm2 - movsd (%rax), %xmm5 - subsd %xmm2, %xmm6 - movzwl 62(%rsp), %edx - subsd %xmm6, %xmm3 - addsd %xmm5, %xmm6 - addsd %xmm3, %xmm4 - andl $32752, %edx - movsd %xmm4, 88(%rsp) - cmpl $13168, %edx - movsd %xmm6, 80(%rsp) - jl ..B2.19 -..B2.18: - xorl %ebp, %ebp - lea 24(%rsp), %rdx - movsd (%rdx), %xmm5 - jmp ..B2.20 -..B2.19: - lea 16+_CONSTANTS(%rip), %rbp - lea 24(%rsp), %rdx - movsd 32(%rdx), %xmm0 - pxor %xmm5, %xmm5 - mulsd (%rbp), %xmm0 - movsd %xmm0, -8(%rdx) - movzwl -2(%rdx), %eax - movl %eax, %ebp - andl $32752, %ebp - andl $-32753, %eax - shrl $4, %ebp - orl $-49168, %eax - movw %ax, -2(%rdx) - addl $-1279, %ebp -..B2.20: - movsd 16(%rsp), %xmm0 - movaps %xmm5, %xmm4 - movsd .L_2il0floatpacket.13(%rip), %xmm3 - lea 64(%rsp), %rsi - movl %r13d, %edi - lea (%rsp), %rcx - addsd %xmm0, %xmm4 - mulsd %xmm4, %xmm3 - movaps %xmm4, %xmm1 - subsd %xmm0, %xmm1 - movaps %xmm3, %xmm2 - subsd %xmm1, %xmm5 - subsd %xmm4, %xmm2 - subsd %xmm2, %xmm3 - movsd %xmm3, 16(%rcx) - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - movsd %xmm5, (%rdx) - lea 80(%rsp), %rdx -..___tag_value_ccosh.34: - call __libm_mul_k64@PLT -..___tag_value_ccosh.35: -..B2.21: - addl %r12d, %ebp - lea 32(%rsp), %rsi - movl %ebp, %edi - lea 16(%rsp), %rdx - lea 8(%rsp), %rcx -..___tag_value_ccosh.36: - call __libm_mul_k64@PLT -..___tag_value_ccosh.37: -..B2.22: - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 - jmp ..B2.41 -..B2.23: - movzwl 62(%rsp), %ebp - andl $32752, %ebp - shrl $4, %ebp -..B2.24: - testl %ebp, %ebp - jne ..B2.33 -..B2.25: - testl $1048575, 60(%rsp) - jne ..B2.33 -..B2.26: - cmpl $0, 56(%rsp) - jne ..B2.33 -..B2.27: - movsd 48(%rsp), %xmm0 - call cosh@PLT -..B2.62: - cmpl $2047, %r12d - movhpd 56(%rsp), %xmm0 - jl ..B2.31 -..B2.29: - testl $1048575, 52(%rsp) - jne ..B2.41 -..B2.30: - cmpl $0, 48(%rsp) - jne ..B2.41 -..B2.31: - movsd %xmm0, (%rsp) - movhpd %xmm0, 8(%rsp) -..B2.32: - movb 15(%rsp), %dl - movb %dl, %cl - movb 55(%rsp), %al - andb $127, %cl - shrb $7, %dl - shrb $7, %al - movsd (%rsp), %xmm0 - xorb %al, %dl - shlb $7, %dl - orb %dl, %cl - movb %cl, 15(%rsp) - movhpd 8(%rsp), %xmm0 - jmp ..B2.41 -..B2.33: - cmpl $2047, %ebp - jge ..B2.36 -..B2.34: - movsd 48(%rsp), %xmm0 - movsd %xmm0, 32(%rsp) - call cosh@PLT -..B2.64: - movsd %xmm0, 40(%rsp) - movsd 56(%rsp), %xmm0 - movsd %xmm0, 16(%rsp) - call __libm_sse2_sincos@PLT -..B2.63: - movsd %xmm0, 24(%rsp) - testl %ebp, %ebp - movsd 40(%rsp), %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, (%rsp) - jle ..B2.49 -..B2.35: - movsd 32(%rsp), %xmm0 - call sinh@PLT -..B2.65: - mulsd 24(%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 - jmp ..B2.41 -..B2.36: - cmpl $2047, %r12d - jge ..B2.38 -..B2.37: - movsd 56(%rsp), %xmm0 - call cos@PLT - jmp ..B2.67 -..B2.38: - movsd 48(%rsp), %xmm0 - call cosh@PLT -..B2.67: - movsd %xmm0, (%rsp) -..B2.39: - testl %r12d, %r12d - jle ..B2.51 -..B2.40: - movsd 56(%rsp), %xmm0 - call sin@PLT -..B2.68: - movsd %xmm0, 8(%rsp) - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 -..B2.41: - movq 96(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.43 -..B2.42: - movaps %xmm0, %xmm1 - unpckhpd %xmm0, %xmm1 - addq $112, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 6, -32 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B2.43: - call __stack_chk_fail@PLT -..B2.44: - testl $1048575, 60(%rsp) - jne ..B2.5 -..B2.45: - cmpl $0, 56(%rsp) - jne ..B2.5 - jmp ..B2.24 -..B2.46: - testl $1048575, 52(%rsp) - jne ..B2.3 -..B2.47: - cmpl $0, 48(%rsp) - jne ..B2.3 - jmp ..B2.23 -..B2.49: - movsd 32(%rsp), %xmm0 - call sinh@PLT -..B2.69: - mulsd 16(%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 - jmp ..B2.41 -..B2.51: - testl $1048575, 52(%rsp) - jne ..B2.40 -..B2.52: - cmpl $0, 48(%rsp) - jne ..B2.40 -..B2.53: - testl $1048575, 60(%rsp) - jne ..B2.56 -..B2.54: - cmpl $0, 56(%rsp) - jne ..B2.56 -..B2.55: - movb 55(%rsp), %dl - lea ones(%rip), %rcx - movb 63(%rsp), %al - andb $-128, %dl - andb $-128, %al - pxor %xmm0, %xmm0 - shrb $7, %dl - shrb $7, %al - xorb %al, %dl - movzbl %dl, %ebp - mulsd (%rcx,%rbp,8), %xmm0 - movsd %xmm0, 8(%rsp) - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 - jmp ..B2.41 -..B2.56: - movq $0, 8(%rsp) - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 - jmp ..B2.41 - .align 16,0x90 - .cfi_endproc - .type ccosh,@function - .size ccosh,.-ccosh - .data -# -- End ccosh - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.13: - .long 0x02000000,0x41a00000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -.L_2il0floatpacket.12: - .long 0x00800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .align 4 -_CONSTANTS: - .long 0 - .long 2145386496 - .long 0 - .long 1048576 - .long 0 - .long 1341128704 - .type _CONSTANTS,@object - .size _CONSTANTS,24 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccoshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccoshl.S deleted file mode 100644 index 811a47f254..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccoshl.S +++ /dev/null @@ -1,742 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccoshl.c" - .text -..TXTST0: -# -- Begin ccoshl - .text - .align 16,0x90 - .globl ccoshl -ccoshl: -# parameter 1: 336 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_ccoshl.1: -..L2: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - pushq %rbp - .cfi_def_cfa_offset 40 - .cfi_offset 6, -40 - subq $296, %rsp - .cfi_def_cfa_offset 336 - xorb %bl, %bl - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 288(%rsp) - fstpt 96(%rsp) - fldt 96(%rsp) - fstpt 256(%rsp) - fldt 256(%rsp) - fstpt 272(%rsp) -..B1.2: - fnstcw 114(%rsp) -..B1.3: - movzwl 114(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 112(%rsp) -..B1.5: - fldcw 112(%rsp) -..B1.6: - movb $1, %bl -..B1.7: - movzwl 344(%rsp), %ebp - andl $32767, %ebp - cmpl $32767, %ebp - jge ..B1.33 -..B1.8: - testl %ebp, %ebp - jle ..B1.57 -..B1.9: - movzwl 360(%rsp), %r14d - andl $32767, %r14d - cmpl $32767, %r14d - jge ..B1.33 -..B1.10: - testl %r14d, %r14d - jle ..B1.55 -..B1.11: - cmpl $16398, %ebp - jl ..B1.20 -..B1.12: - fldt 352(%rsp) - lea _CONSTANTS(%rip), %rax - fstpt (%rsp) - fldt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fstpt (%rsp) - fldt (%rax) - fmul %st(0), %st - fstpt 32(%rsp) - call cosl@PLT -..B1.65: - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 - fmul %st, %st(1) - testl %r14d, %r14d - fxch %st(1) - fstpt 256(%rsp) - fldt 336(%rsp) - fmulp %st, %st(1) - jle ..B1.14 -..B1.13: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 16(%rsp) - fstpt (%rsp) - fstpt 32(%rsp) - call sinl@PLT -..B1.66: - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 - fmulp %st, %st(1) - jmp ..B1.15 -..B1.14: - fldt (%rsp) - fmulp %st, %st(1) -..B1.15: - fstpt 272(%rsp) - testb %bl, %bl - je ..B1.17 -..B1.16: - fldcw 114(%rsp) -..B1.17: - movq 288(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.54 -..B1.18: - fldt 256(%rsp) - fldt 272(%rsp) - movq 288(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.53 -..B1.19: - addq $296, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.20: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 352(%rsp) - lea 176(%rsp), %rdi - fstpt (%rsp) -..___tag_value_ccoshl.31: - call __libm_coshl_k80@PLT -..___tag_value_ccoshl.32: -..B1.67: - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B1.21: - fldt 176(%rsp) - lea 48+_CONSTANTS(%rip), %r15 - fldt .L_2il0floatpacket.9(%rip) - movzwl 344(%rsp), %eax - andl $32767, %eax - fldt (%r15) - cmpl $16183, %eax - fadd %st, %st(3) - fxch %st(3) - fstpt (%rsp) - fldt 160(%rsp) - fld %st(0) - movl (%rsp), %r15d - fadd %st(3), %st - fmul %st, %st(2) - fld %st(0) - fsubr %st(3), %st - fsubrp %st, %st(3) - fxch %st(2) - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(1) - fsubr %st(2), %st - fsubrp %st, %st(3) - fsubrp %st, %st(1) - faddp %st, %st(1) - jge ..B1.23 -..B1.22: - fstp %st(1) - fldt 336(%rsp) - lea 32+_CONSTANTS(%rip), %r14 - fldt 96(%rsp) - lea 208(%rsp), %rdx - fstpt (%rdx) - fldt (%r14) - fmulp %st, %st(1) - fstpt -16(%rdx) - movzwl -8(%rdx), %eax - movl %eax, %r14d - andl $-32768, %eax - andl $32767, %r14d - orl $-49153, %eax - addl $-16639, %r14d - movw %ax, -8(%rdx) - jmp ..B1.25 -..B1.23: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 352(%rsp) - lea 208(%rsp), %rdi - fstpt (%rsp) - fxch %st(1) - fstpt 16(%rsp) - fstpt -128(%rdi) -..___tag_value_ccoshl.35: - call __libm_sinhl_k80@PLT -..___tag_value_ccoshl.36: -..B1.68: - fldt 80(%rsp) - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B1.24: - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - lea 208(%rsp), %rdx - movl (%rsp), %r14d -..B1.25: - fldt 192(%rsp) - fld %st(0) - fldt (%rdx) - fadd %st, %st(1) - fld %st(1) - fxch %st(2) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.9(%rip) - fmul %st(3), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt 368(%rsp) - fstpt (%rsp) - lea 240(%rsp), %rdi - fxch %st(1) - fstpt 80(%rsp) - fstpt 96(%rsp) -..___tag_value_ccoshl.39: - call __libm_cosl_k80@PLT -..___tag_value_ccoshl.40: -..B1.69: - fldt 96(%rsp) - fldt 80(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B1.26: - fldt 224(%rsp) - lea 16+_CONSTANTS(%rip), %rax - fld %st(0) - fldt 240(%rsp) - movzwl 360(%rsp), %edx - fadd %st, %st(1) - fld %st(1) - andl $32767, %edx - cmpl $16183, %edx - fxch %st(2) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.9(%rip) - fmul %st(3), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st(4), %st - fxch %st(1) - fmulp %st, %st(4) - fldt (%rax) - faddp %st, %st(1) - jge ..B1.28 -..B1.27: - fldt 352(%rsp) - lea 32+_CONSTANTS(%rip), %rbp - fldt 96(%rsp) - fstpt 144(%rsp) - fldt (%rbp) - fmulp %st, %st(1) - fstpt 128(%rsp) - movzwl 136(%rsp), %eax - movl %eax, %ebp - andl $-32768, %eax - andl $32767, %ebp - orl $-49153, %eax - addl $-16639, %ebp - movw %ax, 136(%rsp) - fldt 128(%rsp) - jmp ..B1.30 -..B1.28: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 368(%rsp) - lea 144(%rsp), %rdi - fstpt (%rsp) - fxch %st(3) - fstpt 16(%rsp) - fstpt -64(%rdi) - fxch %st(1) - fstpt -112(%rdi) - fstpt -48(%rdi) -..___tag_value_ccoshl.43: - call __libm_sinl_k80@PLT -..___tag_value_ccoshl.44: -..B1.70: - fldt 96(%rsp) - fldt 32(%rsp) - fldt 80(%rsp) - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B1.29: - fldt 128(%rsp) - xorl %ebp, %ebp - fmul %st(5), %st - fstpt 128(%rsp) - fldt 128(%rsp) - fldt 144(%rsp) - fmulp %st, %st(6) - fxch %st(5) - fstpt 96(%rsp) - fldt 96(%rsp) - fstpt 144(%rsp) - fxch %st(4) - fxch %st(1) - fxch %st(2) - fxch %st(1) -..B1.30: - fldt 96(%rsp) - fld %st(1) - movl %r15d, %edi - fadd %st(1), %st - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.9(%rip) - fmul %st(3), %st - fsub %st, %st(1) - fsubp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(5), %st - fldt 32(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - fld %st(0) - fmul %st(4), %st - fstpt (%rsp) - fmulp %st, %st(6) - faddp %st, %st(5) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - fstpt 16(%rsp) - fxch %st(1) - fstpt 48(%rsp) - fstpt 112(%rsp) -..___tag_value_ccoshl.47: - call __libm_scalbl_k80@PLT -..___tag_value_ccoshl.48: -..B1.71: - fldt 112(%rsp) - fldt 48(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B1.31: - fldt (%rsp) - fld %st(2) - fmul %st(2), %st - addl %ebp, %r14d - fxch %st(4) - fstpt 256(%rsp) - movl %r14d, %edi - fldt 48(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - fld %st(0) - fmul %st(2), %st - fstpt (%rsp) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsp) -..___tag_value_ccoshl.51: - call __libm_scalbl_k80@PLT -..___tag_value_ccoshl.52: -..B1.72: - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B1.32: - fstpt 272(%rsp) - jmp ..B1.48 -..B1.33: - movq 352(%rsp), %r14 - testq %r14, %r14 - jne ..B1.37 -..B1.34: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 352(%rsp) - fstpt (%rsp) - call coshl@PLT -..B1.73: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt 352(%rsp) - cmpl $32767, %ebp - fstpt 272(%rsp) - fstpt 256(%rsp) - jl ..B1.36 -..B1.35: - movq $0x8000000000000000, %rax - cmpq 336(%rsp), %rax - jne ..B1.48 -..B1.36: - movb 281(%rsp), %dl - movb %dl, %cl - movb 345(%rsp), %al - andb $127, %cl - shrb $7, %dl - shrb $7, %al - xorb %al, %dl - shlb $7, %dl - orb %dl, %cl - movb %cl, 281(%rsp) - jmp ..B1.48 -..B1.37: - movzwl 360(%rsp), %r15d - andl $32767, %r15d - cmpl $32767, %r15d - jge ..B1.40 -..B1.38: - fldt 336(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fstpt (%rsp) - call coshl@PLT -..B1.75: - fstpt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt 352(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fstpt (%rsp) - call cosl@PLT -..B1.74: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt (%rsp) - testl %r15d, %r15d - fmulp %st, %st(1) - fstpt 256(%rsp) - jle ..B1.59 -..B1.39: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 48(%rsp) - fstpt (%rsp) - call sinhl@PLT -..B1.77: - fstpt 16(%rsp) - fldt 32(%rsp) - fstpt (%rsp) - call sinl@PLT -..B1.76: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt (%rsp) - fmulp %st, %st(1) - fstpt 272(%rsp) - jmp ..B1.48 -..B1.40: - cmpl $32767, %ebp - jge ..B1.42 -..B1.41: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 368(%rsp) - fstpt (%rsp) - call cosl@PLT - jmp ..B1.79 - .cfi_def_cfa_offset 336 -..B1.42: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 352(%rsp) - fstpt (%rsp) - call coshl@PLT -..B1.79: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fstpt 256(%rsp) -..B1.43: - cmpl $0, 340(%rsp) - jne ..B1.45 -..B1.44: - cmpl $0, 336(%rsp) - je ..B1.46 -..B1.45: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 368(%rsp) - fstpt (%rsp) - call sinl@PLT -..B1.80: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fstpt 272(%rsp) - jmp ..B1.48 -..B1.46: - movq $0x8000000000000000, %rax - cmpq %rax, %r14 - je ..B1.62 -..B1.47: - fldt 96(%rsp) - fstpt 272(%rsp) -..B1.48: - testb %bl, %bl - je ..B1.50 -..B1.49: - fldcw 114(%rsp) -..B1.50: - movq 288(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.54 -..B1.51: - fldt 256(%rsp) - fldt 272(%rsp) - movq 288(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.53 -..B1.52: - addq $296, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.53: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.54: - call __stack_chk_fail@PLT -..B1.55: - cmpl $0, 356(%rsp) - jne ..B1.11 -..B1.56: - cmpl $0, 352(%rsp) - jne ..B1.11 - jmp ..B1.33 -..B1.57: - cmpl $0, 340(%rsp) - jne ..B1.9 -..B1.58: - cmpl $0, 336(%rsp) - jne ..B1.9 - jmp ..B1.33 -..B1.59: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 48(%rsp) - fstpt (%rsp) - call sinhl@PLT -..B1.81: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt 16(%rsp) - fmulp %st, %st(1) - fstpt 272(%rsp) - jmp ..B1.48 -..B1.62: - movb 345(%rsp), %dl - lea ones(%rip), %rcx - movb 361(%rsp), %al - andb $-128, %dl - andb $-128, %al - pxor %xmm0, %xmm0 - shrb $7, %dl - shrb $7, %al - xorb %al, %dl - movzbl %dl, %ebp - mulsd (%rcx,%rbp,8), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 272(%rsp) - jmp ..B1.48 - .align 16,0x90 - .cfi_endproc - .type ccoshl,@function - .size ccoshl,.-ccoshl - .data -# -- End ccoshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,64 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccosl.S deleted file mode 100644 index 7d2f5dc8c0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ccosl.S +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ccosl.c" - .text -..TXTST0: -# -- Begin ccosl - .text - .align 16,0x90 - .globl ccosl -ccosl: -# parameter 1: 112 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_ccosl.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - subq $96, %rsp - .cfi_def_cfa_offset 112 - xorb %bl, %bl - fldt .L_2il0floatpacket.5(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 80(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fstpt 64(%rsp) -..B1.2: - fnstcw 2(%rsp) -..B1.3: - movzwl 2(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, (%rsp) -..B1.5: - fldcw (%rsp) -..B1.6: - movb $1, %bl -..B1.7: - fldt 112(%rsp) - movzwl 136(%rsp), %eax - andl $32767, %eax - fstpt 64(%rsp) - cmpl $32767, %eax - fldt 128(%rsp) - fstpt 48(%rsp) - jl ..B1.9 -..B1.8: - movq $0x8000000000000000, %rax - cmpq 128(%rsp), %rax - jne ..B1.10 -..B1.9: - movb 137(%rsp), %al - notb %al - movb 57(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 57(%rsp) -..B1.10: - addq $-32, %rsp - .cfi_def_cfa_offset 144 - movq %rsp, %rdi - movq 80(%rsp), %rax - movq 88(%rsp), %rdx - movq 96(%rsp), %rcx - movq 104(%rsp), %rsi - movq %rax, (%rdi) - movq %rdx, 8(%rdi) - movq %rcx, 16(%rdi) - movq %rsi, 24(%rdi) - call ccoshl@PLT -..B1.19: - fxch %st(1) - addq $32, %rsp - .cfi_def_cfa_offset 112 - fxch %st(1) - fstpt 16(%rsp) - testb %bl, %bl - fstpt 32(%rsp) - je ..B1.12 -..B1.11: - fldcw 2(%rsp) -..B1.12: - movq 80(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.16 -..B1.13: - fldt 16(%rsp) - fldt 32(%rsp) - movq 80(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.15 -..B1.14: - addq $96, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 112 - .cfi_offset 3, -16 -..B1.15: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.16: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type ccosl,@function - .size ccosl,.-ccosl - .data -# -- End ccosl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceil_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceil_gen.S deleted file mode 100644 index 83fec73e5e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceil_gen.S +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ceil_gen.c" - .text -..TXTST0: -# -- Begin ceil - .text - .align 16,0x90 - .globl ceil -ceil: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ceil.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - movl %eax, %edi - andl $2147483647, %edi - lea -1072693248(%rdi), %edx - cmpl $54525952, %edx - jae ..B1.12 -..B1.2: - movl %edi, %ecx - shrl $20, %ecx - cmpl $22020096, %edx - jae ..B1.8 -..B1.3: - negl %ecx - movl $-1, %esi - addl $19, %ecx - shll %cl, %esi - movl %esi, %edx - andl %esi, %eax - notl %edx - andl %edx, %edi - orl -8(%rsp), %edi - movl $0, -8(%rsp) - testl $-2147483648, %eax - jne ..B1.6 -..B1.4: - testl %edi, %edi - je ..B1.6 -..B1.5: - subl %esi, %eax - movl %eax, -4(%rsp) - jmp ..B1.11 -..B1.6: - movl %eax, -4(%rsp) - jmp ..B1.11 -..B1.8: - negl %ecx - movl $-1, %esi - addl $19, %ecx - shll %cl, %esi - movl %esi, %ecx - notl %ecx - movl -8(%rsp), %edx - andl %edx, %ecx - andl %esi, %edx - movl %edx, -8(%rsp) - testl $-2147483648, %eax - jne ..B1.11 -..B1.9: - testl %ecx, %ecx - je ..B1.11 -..B1.10: - movl -4(%rsp), %eax - shlq $32, %rax - movslq %esi, %rsi - orq %rdx, %rax - subq %rsi, %rax - movq %rax, -8(%rsp) -..B1.11: - movsd -8(%rsp), %xmm0 - ret -..B1.12: - testl $-2147483648, %edx - je ..B1.17 -..B1.13: - movl -8(%rsp), %edx - orl %edx, %edi - jne ..B1.15 -..B1.14: - movsd -8(%rsp), %xmm0 - ret -..B1.15: - lea _pone_nzero(%rip), %rdx - shrl $31, %eax - movsd (%rdx,%rax,8), %xmm0 -..B1.16: - ret -..B1.17: - movsd -8(%rsp), %xmm0 - cmpl $1073741824, %edx - jb ..B1.20 -..B1.19: - lea _ones(%rip), %rax - mulsd (%rax), %xmm0 -..B1.20: - ret - .align 16,0x90 - .cfi_endproc - .type ceil,@function - .size ceil,.-ceil - .data -# -- End ceil - .section .rodata, "a" - .align 4 - .align 4 -_pone_nzero: - .long 0 - .long 1072693248 - .long 0 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceilf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceilf_gen.S deleted file mode 100644 index e513e9c8d8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceilf_gen.S +++ /dev/null @@ -1,141 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ceilf_gen.c" - .text -..TXTST0: -# -- Begin ceilf - .text - .align 16,0x90 - .globl ceilf -ceilf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ceilf.1: -..L2: - - movaps %xmm0, %xmm2 - movss %xmm2, -16(%rsp) - movzwl -14(%rsp), %eax - andl $32640, %eax - shrl $7, %eax - cmpl $149, %eax - jge ..B1.8 -..B1.2: - cmpl $127, %eax - jl ..B1.4 -..B1.3: - movss .L_2il0floatpacket.0(%rip), %xmm1 - movaps %xmm1, %xmm0 - addss %xmm2, %xmm0 - movss %xmm0, -24(%rsp) - movss -24(%rsp), %xmm3 - movss .L_2il0floatpacket.2(%rip), %xmm0 - subss %xmm1, %xmm3 - comiss %xmm3, %xmm2 - addss %xmm3, %xmm0 - ja ..L3 - movaps %xmm3, %xmm0 -..L3: - ret -..B1.4: - testl %eax, %eax - jne ..B1.7 -..B1.5: - testl $8388607, -16(%rsp) - jne ..B1.7 -..B1.6: - movss -16(%rsp), %xmm0 - ret -..B1.7: - movb -13(%rsp), %dl - lea _pone_nzero(%rip), %rcx - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %esi - movl -16(%rsp), %eax - movl %eax, -24(%rsp) - movss (%rcx,%rsi,4), %xmm0 - ret -..B1.8: - cmpl $150, %eax - jge ..B1.6 -..B1.9: - movss -16(%rsp), %xmm1 - movss .L_2il0floatpacket.1(%rip), %xmm0 - testb $1, -16(%rsp) - addss %xmm1, %xmm0 - jne ..L4 - movaps %xmm1, %xmm0 -..L4: - ret - .align 16,0x90 - .cfi_endproc - .type ceilf,@function - .size ceilf,.-ceilf - .data -# -- End ceilf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4b400000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x3f000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x3f800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -_pone_nzero: - .long 1065353216 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceill.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceill.S deleted file mode 100644 index 2de08c36ec..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ceill.S +++ /dev/null @@ -1,257 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ceill.c" - .text -..TXTST0: -# -- Begin ceill - .text - .align 16,0x90 - .globl ceill -ceill: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_ceill.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %cl, %cl -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 56(%rsp), %eax - andl $32767, %eax - cmpl $16445, %eax - jge ..B1.20 -..B1.4: - cmpl $16383, %eax - jl ..B1.15 -..B1.5: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.9 -..B1.6: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.7: - fldcw 24(%rsp) -..B1.8: - movb $1, %cl -..B1.9: - fldt 48(%rsp) - lea _TWO_63H(%rip), %rax - fld %st(0) - fldl (%rax) - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 8(%rsp) - fldt 8(%rsp) - fcomip %st(1), %st - fstp %st(0) - jae ..B1.12 - jp ..B1.12 -..B1.10: - fldt 8(%rsp) - lea _ones(%rip), %rax - faddl (%rax) - fstpt 8(%rsp) -..B1.12: - testb %cl, %cl - je ..B1.14 -..B1.13: - fldcw 26(%rsp) -..B1.14: - fldt 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.15: - testl %eax, %eax - jne ..B1.19 -..B1.16: - cmpq $0, 48(%rsp) - jne ..B1.18 -..B1.17: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.18: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, (%rsp) -..B1.19: - movb 57(%rsp), %al - lea _pone_nzero(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.20: - cmpl $16446, %eax - jge ..B1.29 -..B1.21: - testb $1, 48(%rsp) - je ..B1.28 -..B1.22: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.35 -..B1.23: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.24: - fldcw 24(%rsp) -..B1.25: - fldt 48(%rsp) - lea _halfs(%rip), %rax - faddl (%rax) - fstpt 8(%rsp) -..B1.26: - fldcw 26(%rsp) -..B1.27: - fldt 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.28: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.29: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.30: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.31: - fldcw 24(%rsp) -..B1.32: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) -..B1.33: - fldcw 26(%rsp) -..B1.34: - fldt 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.35: - fldt 48(%rsp) - lea _halfs(%rip), %rax - faddl (%rax) - fstpt 8(%rsp) - jmp ..B1.27 -..B1.36: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) - jmp ..B1.34 - .align 16,0x90 - .cfi_endproc - .type ceill,@function - .size ceill,.-ceill - .data -# -- End ceill - .section .rodata, "a" - .align 4 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_pone_nzero: - .long 0 - .long 1072693248 - .long 0 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,16 - .align 4 -_halfs: - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .type _halfs,@object - .size _halfs,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexp.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexp.S deleted file mode 100644 index 136caab307..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexp.S +++ /dev/null @@ -1,2052 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cexp.c" - .text -..TXTST0: -# -- Begin cexp - .text - .align 16,0x90 - .globl cexp -cexp: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cexp.1: -..L2: - -..B1.2: - movq %rsp, %rax - subq $280, %rsp - .cfi_def_cfa_offset 288 - movq %rax, 184(%rsp) - movq %xmm0, 160(%rsp) - movq %xmm1, 168(%rsp) - movq %rbx, 192(%rsp) - movq 160(%rsp), %xmm0 - movq 168(%rsp), %xmm5 - movdqa %xmm0, %xmm7 - lea cexp_table(%rip), %r8 - movdqa (%r8), %xmm1 - shufps $85, %xmm5, %xmm7 - movdqa 16(%r8), %xmm2 - pand %xmm1, %xmm7 - pcmpgtd %xmm7, %xmm2 - movmskps %xmm2, %edx - cmpl $5, %edx - unpcklpd %xmm0, %xmm0 - jne .L_2TAG_PACKET_0.0.1 -.L_2TAG_PACKET_1.0.1: - movapd 32(%r8), %xmm1 - movapd 48(%r8), %xmm6 - movapd 64(%r8), %xmm2 - movapd 80(%r8), %xmm3 - mulpd %xmm0, %xmm1 - unpcklpd %xmm5, %xmm5 - addpd %xmm6, %xmm1 - movapd 96(%r8), %xmm7 - movd %xmm1, %edx - subpd %xmm6, %xmm1 - movq $63, %rax - mulpd %xmm5, %xmm7 - mulpd %xmm1, %xmm2 - movapd 112(%r8), %xmm4 - andq %rdx, %rax - mulpd %xmm1, %xmm3 - movapd 128(%r8), %xmm1 - subpd %xmm2, %xmm0 - cvtsd2si %xmm7, %ecx - lea (,%rax,8), %rax - subpd %xmm3, %xmm0 - addpd %xmm6, %xmm7 - movapd 4512(%r8,%rax,2), %xmm2 - mulpd %xmm0, %xmm4 - addl $1865216, %ecx - movapd %xmm0, %xmm3 - subpd %xmm6, %xmm7 - mulpd %xmm0, %xmm0 - movapd 144(%r8), %xmm6 - andq $63, %rcx - addpd %xmm4, %xmm1 - mulsd %xmm0, %xmm0 - movapd 160(%r8), %xmm4 - addsd %xmm2, %xmm3 - lea (,%rcx,8), %rcx - unpckhpd %xmm2, %xmm2 - mulpd %xmm1, %xmm0 - movapd %xmm5, %xmm1 - lea 416(%r8,%rcx,8), %rcx - addsd %xmm0, %xmm3 - mulpd %xmm7, %xmm4 - unpckhpd %xmm0, %xmm0 - mulpd %xmm7, %xmm6 - subpd %xmm4, %xmm5 - mulpd 176(%r8), %xmm7 - subpd %xmm4, %xmm1 - addsd %xmm3, %xmm0 - movapd 192(%r8), %xmm3 - unpcklpd %xmm0, %xmm0 - movapd %xmm1, %xmm4 - subpd %xmm6, %xmm1 - mulpd %xmm2, %xmm0 - mulpd %xmm5, %xmm3 - movapd %xmm2, (%rsp) - movapd %xmm0, 16(%rsp) - movapd 16(%rcx), %xmm0 - subpd %xmm6, %xmm5 - movapd 208(%r8), %xmm2 - subpd %xmm1, %xmm4 - mulpd %xmm5, %xmm3 - mulpd %xmm5, %xmm5 - subpd %xmm6, %xmm4 - mulpd %xmm1, %xmm0 - movapd (%rcx), %xmm6 - subpd %xmm4, %xmm7 - movapd 48(%rcx), %xmm4 - addpd %xmm4, %xmm6 - subpd %xmm6, %xmm0 - mulpd %xmm0, %xmm7 - movapd 16(%rcx), %xmm0 - mulpd %xmm1, %xmm6 - mulpd %xmm5, %xmm2 - mulpd %xmm1, %xmm4 - mulpd %xmm5, %xmm6 - mulpd %xmm5, %xmm0 - mulpd %xmm5, %xmm5 - addpd 224(%r8), %xmm3 - mulpd (%rcx), %xmm1 - addpd 240(%r8), %xmm2 - mulpd %xmm5, %xmm3 - movapd %xmm4, %xmm5 - addpd 16(%rcx), %xmm4 - addpd %xmm3, %xmm2 - movsd %xmm2, %xmm3 - unpckhpd %xmm2, %xmm2 - andl $-64, %edx - unpcklpd %xmm3, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm3, %xmm6 - movapd %xmm1, %xmm0 - addpd %xmm4, %xmm1 - movapd 16(%rcx), %xmm3 - subpd %xmm4, %xmm3 - subpd %xmm1, %xmm4 - addpd 32(%rcx), %xmm7 - addpd %xmm5, %xmm3 - movapd (%rsp), %xmm5 - addpd %xmm0, %xmm4 - addpd %xmm3, %xmm7 - movapd 16(%rsp), %xmm3 - movd %edx, %xmm0 - addpd %xmm4, %xmm7 - movapd %xmm1, %xmm4 - addpd %xmm6, %xmm7 - movapd 256(%r8), %xmm6 - pshufd $17, %xmm0, %xmm0 - addpd %xmm2, %xmm7 -.L_2TAG_PACKET_2.0.1: - movapd %xmm5, %xmm2 - addpd %xmm3, %xmm5 - addpd %xmm7, %xmm1 - andpd %xmm6, %xmm5 - andpd %xmm1, %xmm6 - pand 272(%r8), %xmm1 - subpd %xmm5, %xmm2 - subpd %xmm6, %xmm4 - addpd %xmm3, %xmm2 - movdqa 288(%r8), %xmm3 - addpd %xmm7, %xmm4 - por 304(%r8), %xmm6 - psubd %xmm1, %xmm3 - movapd 320(%r8), %xmm7 - psrld $14, %xmm1 - mulpd %xmm3, %xmm4 - paddd %xmm1, %xmm0 - paddd %xmm0, %xmm7 - movapd %xmm2, %xmm1 - pcmpgtd 320(%r8), %xmm7 - mulpd %xmm4, %xmm2 - movmskps %xmm7, %eax - cmpl $10, %eax - jne .L_2TAG_PACKET_3.0.1 - mulpd %xmm5, %xmm4 - pslld $14, %xmm0 - mulpd %xmm6, %xmm1 - addpd %xmm4, %xmm2 - mulpd %xmm5, %xmm6 - addpd %xmm1, %xmm2 - addpd %xmm6, %xmm2 - mulpd %xmm2, %xmm0 - movq %xmm0, %xmm1 - pshufd $14, %xmm0, %xmm0 - movq 192(%rsp), %rbx - movq 184(%rsp), %rsp - ret -.L_2TAG_PACKET_3.0.1: - psrad $6, %xmm0 - psubd 336(%r8), %xmm0 - pshufd $245, %xmm0, %xmm2 - psrad $32, %xmm0 - pand 400(%r8), %xmm0 - pand 384(%r8), %xmm2 - por %xmm2, %xmm0 - movdqa %xmm0, 64(%rsp) - movq %xmm5, 112(%rsp) - movq %xmm1, 120(%rsp) - movhpd %xmm6, 128(%rsp) - movhpd %xmm4, 136(%rsp) - movq %xmm6, 144(%rsp) - movq %xmm4, 152(%rsp) - movq 72(%rsp), %rdi - lea 128(%rsp), %rsi - lea 112(%rsp), %rdx - lea 96(%rsp), %rcx - call __libm_mul_k64@PLT - movq 64(%rsp), %rdi - lea 144(%rsp), %rsi - lea 112(%rsp), %rdx - lea 104(%rsp), %rcx - call __libm_mul_k64@PLT - movq 96(%rsp), %xmm0 - movq 104(%rsp), %xmm1 - movq 192(%rsp), %rbx - movq 184(%rsp), %rsp - ret -.L_2TAG_PACKET_0.0.1: - pextrw $1, %xmm7, %eax - testl $3, %edx - jne .L_2TAG_PACKET_4.0.1 - movapd 352(%r8), %xmm1 - cmpl $32752, %eax - jae .L_2TAG_PACKET_5.0.1 - cmpltpd %xmm0, %xmm1 - movmskpd %xmm1, %edx - cmpl $1, %edx - jne .L_2TAG_PACKET_5.0.1 - jmp .L_2TAG_PACKET_6.0.1 -.L_2TAG_PACKET_4.0.1: - testl $2, %edx - je .L_2TAG_PACKET_6.0.1 - xorpd %xmm0, %xmm0 -.L_2TAG_PACKET_6.0.1: - movdqa %xmm5, %xmm1 - testl $12, %edx - psllq $1, %xmm1 - je .L_2TAG_PACKET_5.0.1 - pxor %xmm2, %xmm2 - pextrw $3, %xmm5, %ecx - testl $8, %edx - pcmpeqd %xmm2, %xmm1 - je .L_2TAG_PACKET_1.0.1 - movmskps %xmm1, %eax - xorl %edx, %edx - movapd 368(%r8), %xmm6 - andl $3, %eax - movapd 304(%r8), %xmm4 - andl $32752, %ecx - cmpl $864, %ecx - jl .L_2TAG_PACKET_5.0.1 - testl $32752, %ecx - jne .L_2TAG_PACKET_7.0.1 - cmpl $3, %eax - je .L_2TAG_PACKET_5.0.1 - andpd %xmm5, %xmm6 - orpd %xmm4, %xmm5 - orpd %xmm4, %xmm6 - movl $-65408, %edx - subsd %xmm6, %xmm5 -.L_2TAG_PACKET_7.0.1: - movsd %xmm5, %xmm4 - movapd 32(%r8), %xmm3 - movapd 48(%r8), %xmm6 - movapd 64(%r8), %xmm5 - movapd 80(%r8), %xmm1 - mulpd %xmm0, %xmm3 - addpd %xmm6, %xmm3 - movd %xmm3, %ecx - subpd %xmm6, %xmm3 - movq $63, %rax - mulpd %xmm3, %xmm5 - movd %edx, %xmm6 - movapd 112(%r8), %xmm7 - andq %rcx, %rax - mulpd %xmm3, %xmm1 - movapd 128(%r8), %xmm3 - subpd %xmm5, %xmm0 - lea (,%rax,8), %rax - subpd %xmm1, %xmm0 - movapd 4512(%r8,%rax,2), %xmm5 - mulpd %xmm0, %xmm7 - movapd %xmm0, %xmm1 - mulpd %xmm0, %xmm0 - andl $-64, %ecx - addpd %xmm7, %xmm3 - pshufd $243, %xmm6, %xmm6 - mulsd %xmm0, %xmm0 - addsd %xmm5, %xmm1 - unpckhpd %xmm5, %xmm5 - mulpd %xmm0, %xmm3 - xorpd %xmm7, %xmm7 - addsd %xmm3, %xmm1 - movd %ecx, %xmm0 - unpckhpd %xmm3, %xmm3 - addsd %xmm1, %xmm3 - pshufd $17, %xmm0, %xmm0 - unpcklpd %xmm3, %xmm3 - paddd %xmm6, %xmm0 - mulpd %xmm5, %xmm3 - movapd 256(%r8), %xmm6 - movapd %xmm4, %xmm1 - jmp .L_2TAG_PACKET_2.0.1 -.L_2TAG_PACKET_5.0.1: - movq 160(%rsp), %xmm0 - movq 168(%rsp), %xmm1 - call __libm_internal_cexp - movq 192(%rsp), %rbx - movq 184(%rsp), %rsp - ret - .cfi_def_cfa_offset 8 -..B1.3: - .align 16,0x90 - .cfi_endproc - .type cexp,@function - .size cexp,.-cexp - .data -# -- End cexp - .text -# -- Begin __libm_internal_cexp - .text - .align 16,0x90 -__libm_internal_cexp: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value___libm_internal_cexp.6: -..L7: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - pushq %rbp - .cfi_def_cfa_offset 24 - .cfi_offset 6, -24 - movq %fs:40, %rax - subq $120, %rsp - .cfi_def_cfa_offset 144 - movsd %xmm0, 40(%rsp) - xorq %rsp, %rax - movzwl 46(%rsp), %ebp - andl $32752, %ebp - shrl $4, %ebp - movsd %xmm1, 48(%rsp) - cmpl $2047, %ebp - movq %rax, 112(%rsp) - jge ..B2.13 -..B2.2: - testl %ebp, %ebp - jle ..B2.41 -..B2.3: - movzwl 54(%rsp), %ebx - andl $32752, %ebx - shrl $4, %ebx - cmpl $2047, %ebx - jge ..B2.14 -..B2.4: - testl %ebx, %ebx - jle ..B2.39 -..B2.5: - cmpl $1034, %ebp - jl ..B2.8 -..B2.6: - movb 47(%rsp), %al - lea _CONSTANTS(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movq (%rdx,%rcx,8), %rbx - movq %rbx, 56(%rsp) - movsd 56(%rsp), %xmm0 - movsd 56(%rsp), %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm1, 56(%rsp) - movsd 56(%rsp), %xmm2 - movsd 48(%rsp), %xmm0 - movsd %xmm2, (%rsp) - call cos@PLT -..B2.51: - movsd (%rsp), %xmm1 - mulsd %xmm0, %xmm1 - movzwl 54(%rsp), %eax - testl $32752, %eax - movsd %xmm1, 24(%rsp) - jle ..B2.38 -..B2.7: - movsd 56(%rsp), %xmm0 - movsd %xmm0, (%rsp) - movsd 48(%rsp), %xmm0 - call sin@PLT -..B2.52: - movsd (%rsp), %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm1, 32(%rsp) - jmp ..B2.29 -..B2.8: - movsd 40(%rsp), %xmm0 - lea 16(%rsp), %rdi - lea 64(%rsp), %rsi -..___tag_value___libm_internal_cexp.13: - call __libm_exp_k64@PLT -..___tag_value___libm_internal_cexp.14: -..B2.9: - movsd 48(%rsp), %xmm0 - lea 96(%rsp), %rdi - lea 80(%rsp), %rsi -..___tag_value___libm_internal_cexp.15: - call __libm_sincos_k64@PLT -..___tag_value___libm_internal_cexp.16: -..B2.10: - movl 16(%rsp), %edi - lea 64(%rsp), %rsi - lea 80(%rsp), %rdx - lea (%rsp), %rcx -..___tag_value___libm_internal_cexp.17: - call __libm_mul_k64@PLT -..___tag_value___libm_internal_cexp.18: -..B2.11: - movq (%rsp), %rax - lea 64(%rsp), %rsi - movl -48(%rsi), %edi - lea 96(%rsp), %rdx - movq %rax, -72(%rdx) - lea 8(%rsp), %rcx -..___tag_value___libm_internal_cexp.19: - call __libm_mul_k64@PLT -..___tag_value___libm_internal_cexp.20: -..B2.12: - movq 8(%rsp), %rax - movq %rax, 32(%rsp) - jmp ..B2.29 -..B2.13: - movzwl 54(%rsp), %ebx - andl $32752, %ebx - shrl $4, %ebx -..B2.14: - testl %ebx, %ebx - jne ..B2.18 -..B2.15: - testl $1048575, 52(%rsp) - jne ..B2.18 -..B2.16: - cmpl $0, 48(%rsp) - jne ..B2.18 -..B2.17: - movsd 40(%rsp), %xmm0 - call exp@PLT -..B2.53: - movq 48(%rsp), %rax - movsd %xmm0, 24(%rsp) - movq %rax, 32(%rsp) - jmp ..B2.29 -..B2.18: - cmpl $2047, %ebx - jge ..B2.21 -..B2.19: - movsd 40(%rsp), %xmm0 - call exp@PLT -..B2.55: - movsd %xmm0, 8(%rsp) - movsd 48(%rsp), %xmm0 - movsd %xmm0, (%rsp) - call __libm_sse2_sincos@PLT -..B2.54: - mulsd 8(%rsp), %xmm1 - movaps %xmm0, %xmm2 - movsd %xmm1, 24(%rsp) - testl %ebx, %ebx - jle ..B2.44 -..B2.20: - movsd 8(%rsp), %xmm0 - mulsd %xmm2, %xmm0 - movsd %xmm0, 32(%rsp) - jmp ..B2.29 -..B2.21: - cmpl $2047, %ebp - jge ..B2.23 -..B2.22: - movsd 48(%rsp), %xmm0 - call sin@PLT -..B2.56: - movsd %xmm0, 24(%rsp) - movsd %xmm0, 32(%rsp) - jmp ..B2.29 -..B2.23: - testl $1048575, 44(%rsp) - jne ..B2.25 -..B2.24: - cmpl $0, 40(%rsp) - je ..B2.26 -..B2.25: - movsd 40(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - movsd 48(%rsp), %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm0, 24(%rsp) - movsd %xmm1, 32(%rsp) - jmp ..B2.29 -..B2.26: - testb $-128, 47(%rsp) - je ..B2.28 -..B2.27: - movsd 48(%rsp), %xmm0 - lea zeros(%rip), %rax - mulsd %xmm0, %xmm0 - movq (%rax), %rdx - movsd %xmm0, 48(%rsp) - movq %rdx, 24(%rsp) - movq %rdx, 32(%rsp) - jmp ..B2.29 -..B2.28: - movsd 40(%rsp), %xmm0 - call exp@PLT -..B2.58: - movsd %xmm0, 24(%rsp) - movsd 48(%rsp), %xmm0 - call sin@PLT -..B2.57: - movsd %xmm0, 32(%rsp) -..B2.29: - movzwl 30(%rsp), %eax - testl $32752, %eax - jne ..B2.32 -..B2.30: - testl $1048575, 28(%rsp) - jne ..B2.35 -..B2.31: - cmpl $0, 24(%rsp) - jne ..B2.35 -..B2.32: - movzwl 38(%rsp), %eax - testl $32752, %eax - jne ..B2.36 -..B2.33: - testl $1048575, 36(%rsp) - jne ..B2.35 -..B2.34: - cmpl $0, 32(%rsp) - je ..B2.36 -..B2.35: - lea _DBL_MIN_NORMAL(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 56(%rsp) -..B2.36: - movq 112(%rsp), %rax - xorq %rsp, %rax - movsd 24(%rsp), %xmm0 - movsd 32(%rsp), %xmm1 - cmpq %fs:40, %rax - jne ..B2.48 -..B2.37: - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B2.38: - movsd 56(%rsp), %xmm0 - mulsd 48(%rsp), %xmm0 - movsd %xmm0, 32(%rsp) - jmp ..B2.29 -..B2.39: - testl $1048575, 52(%rsp) - jne ..B2.5 -..B2.40: - cmpl $0, 48(%rsp) - jne ..B2.5 - jmp ..B2.14 -..B2.41: - testl $1048575, 44(%rsp) - jne ..B2.3 -..B2.42: - cmpl $0, 40(%rsp) - jne ..B2.3 - jmp ..B2.13 -..B2.44: - testl %ebp, %ebp - jne ..B2.47 -..B2.45: - testl $1048575, 44(%rsp) - jne ..B2.47 -..B2.46: - cmpl $0, 40(%rsp) - je ..B2.20 -..B2.47: - movsd (%rsp), %xmm0 - mulsd 8(%rsp), %xmm0 - movsd %xmm0, 32(%rsp) - jmp ..B2.29 -..B2.48: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __libm_internal_cexp,@function - .size __libm_internal_cexp,.-__libm_internal_cexp - .data -# -- End __libm_internal_cexp - .section .rodata, "a" - .align 16 - .align 16 -cexp_table: - .long 2147483647 - .long 2147483647 - .long 2147483647 - .long 2147483647 - .long 1082607888 - .long 810549248 - .long 1089863680 - .long 808452095 - .long 1697350398 - .long 1079448903 - .long 1697350398 - .long 1079448903 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 4277796864 - .long 1065758274 - .long 4277796864 - .long 1065758274 - .long 3164486458 - .long 1025308570 - .long 3164486458 - .long 1025308570 - .long 1841940611 - .long 1076125488 - .long 1841940611 - .long 1076125488 - .long 2983266533 - .long 1065422964 - .long 1432790106 - .long 1069897045 - .long 653061504 - .long 1067799895 - .long 4294959483 - .long 1071644671 - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .long 1413480448 - .long 1069097467 - .long 1413480448 - .long 1069097467 - .long 771977331 - .long 996350346 - .long 771977331 - .long 996350346 - .long 2773927732 - .long 1053236707 - .long 436314138 - .long 1056571808 - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .long 4160749568 - .long 4294967295 - .long 4160749568 - .long 4294967295 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 0 - .long 2145386496 - .long 0 - .long 2145386496 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 2147352640 - .long 0 - .long 2147352640 - .long 0 - .long 1023 - .long 0 - .long 1023 - .long 3576508498 - .long 3230091536 - .long 565433817 - .long 1083619556 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 4294967295 - .long 0 - .long 4294967295 - .long 0 - .long 0 - .long 4294967295 - .long 0 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 3217031168 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 3220176896 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 1069547520 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 1071644672 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 1072693248 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 1069547520 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 235107661 - .long 1018002367 - .long 1048019040 - .long 1072704666 - .long 896005651 - .long 1015861842 - .long 3541402996 - .long 1072716208 - .long 1642514529 - .long 1012987726 - .long 410360776 - .long 1072727877 - .long 1568897900 - .long 1016568486 - .long 1828292879 - .long 1072739672 - .long 1882168529 - .long 1010744893 - .long 852742562 - .long 1072751596 - .long 509852888 - .long 1017336174 - .long 3490863952 - .long 1072763649 - .long 653277307 - .long 1017431380 - .long 2930322911 - .long 1072775834 - .long 1649557430 - .long 1017729363 - .long 1014845818 - .long 1072788152 - .long 1058231231 - .long 1015777676 - .long 3949972341 - .long 1072800603 - .long 1044000607 - .long 1016786167 - .long 828946858 - .long 1072813191 - .long 1151779725 - .long 1015705409 - .long 2288159958 - .long 1072825915 - .long 3819481236 - .long 1016499965 - .long 1853186616 - .long 1072838778 - .long 2552227826 - .long 1015039787 - .long 1709341917 - .long 1072851781 - .long 1829350193 - .long 1015216097 - .long 4112506593 - .long 1072864925 - .long 1913391795 - .long 1015756674 - .long 2799960843 - .long 1072878213 - .long 1303423926 - .long 1015238005 - .long 171030293 - .long 1072891646 - .long 1574172746 - .long 1016061241 - .long 2992903935 - .long 1072905224 - .long 3424156969 - .long 1017196428 - .long 926591434 - .long 1072918951 - .long 1938513547 - .long 1017631273 - .long 887463926 - .long 1072932827 - .long 2804567149 - .long 1015390024 - .long 1276261410 - .long 1072946854 - .long 631083525 - .long 1017690182 - .long 569847337 - .long 1072961034 - .long 1623370770 - .long 1011049453 - .long 1617004845 - .long 1072975368 - .long 3667985273 - .long 1013894369 - .long 3049340112 - .long 1072989858 - .long 3145379760 - .long 1014403278 - .long 3577096743 - .long 1073004506 - .long 2603100681 - .long 1017152460 - .long 1990012070 - .long 1073019314 - .long 3249202951 - .long 1017448880 - .long 1453150081 - .long 1073034283 - .long 419288974 - .long 1016280325 - .long 917841882 - .long 1073049415 - .long 3793507337 - .long 1016095713 - .long 3712504873 - .long 1073064711 - .long 728023093 - .long 1016345318 - .long 363667784 - .long 1073080175 - .long 2582678538 - .long 1017123460 - .long 2956612996 - .long 1073095806 - .long 7592966 - .long 1016721543 - .long 2186617380 - .long 1073111608 - .long 228611441 - .long 1016696141 - .long 1719614412 - .long 1073127582 - .long 2261665670 - .long 1017457593 - .long 1013258798 - .long 1073143730 - .long 544148907 - .long 1017323666 - .long 3907805043 - .long 1073160053 - .long 2383914918 - .long 1017143586 - .long 1447192520 - .long 1073176555 - .long 1176412038 - .long 1017267372 - .long 1944781190 - .long 1073193236 - .long 2882956373 - .long 1013312481 - .long 919555682 - .long 1073210099 - .long 3154077648 - .long 1016528543 - .long 2571947538 - .long 1073227145 - .long 348651999 - .long 1016405780 - .long 2604962540 - .long 1073244377 - .long 3253791412 - .long 1015920431 - .long 1110089947 - .long 1073261797 - .long 1509121860 - .long 1014756995 - .long 2568320822 - .long 1073279406 - .long 2617649212 - .long 1017340090 - .long 2966275556 - .long 1073297207 - .long 553214634 - .long 1016457425 - .long 2682146383 - .long 1073315202 - .long 730975783 - .long 1014083580 - .long 2191782032 - .long 1073333393 - .long 1486499517 - .long 1016818996 - .long 2069751140 - .long 1073351782 - .long 2595788928 - .long 1016407932 - .long 2990417244 - .long 1073370371 - .long 1853053619 - .long 1015310724 - .long 1434058175 - .long 1073389163 - .long 2462790535 - .long 1015814775 - .long 2572866477 - .long 1073408159 - .long 3693944214 - .long 1017259110 - .long 3092190714 - .long 1073427362 - .long 2979333550 - .long 1017188654 - .long 4076559942 - .long 1073446774 - .long 174054861 - .long 1014300631 - .long 2420883922 - .long 1073466398 - .long 816778419 - .long 1014197934 - .long 3716502172 - .long 1073486235 - .long 3507050924 - .long 1015341199 - .long 777507147 - .long 1073506289 - .long 1821514088 - .long 1013410604 - .long 3706687593 - .long 1073526560 - .long 920623539 - .long 1016295433 - .long 1242007931 - .long 1073547053 - .long 2789017511 - .long 1014276997 - .long 3707479175 - .long 1073567768 - .long 3586233004 - .long 1015962192 - .long 64696965 - .long 1073588710 - .long 474650514 - .long 1016642419 - .long 863738718 - .long 1073609879 - .long 1614448851 - .long 1014281732 - .long 3884662774 - .long 1073631278 - .long 2450082086 - .long 1016164135 - .long 2728693977 - .long 1073652911 - .long 1101668360 - .long 1015989180 - .long 3999357479 - .long 1073674779 - .long 835814894 - .long 1015702697 - .long 1533953344 - .long 1073696886 - .long 1301400989 - .long 1014466875 - .long 2174652632 - .long 1073719233 - .type cexp_table,@object - .size cexp_table,5536 - .align 16 -_CONSTANTS: - .long 0 - .long 2145386496 - .long 0 - .long 1048576 - .type _CONSTANTS,@object - .size _CONSTANTS,16 - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .align 8 -zeros: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .type zeros,@object - .size zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexpf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexpf.S deleted file mode 100644 index 91d33bc631..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexpf.S +++ /dev/null @@ -1,1892 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cexpf.c" - .text -..TXTST0: -# -- Begin cexpf - .text - .align 16,0x90 - .globl cexpf -cexpf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cexpf.1: -..L2: - -..B1.2: - movq %rsp, %rax - subq $216, %rsp - .cfi_def_cfa_offset 224 - movq %rax, 120(%rsp) - movss %xmm0, 96(%rsp) - pshufd $1, %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - movq %rbx, 128(%rsp) - cvtss2sd 104(%rsp), %xmm0 - cvtss2sd 96(%rsp), %xmm7 - lea cexpf_table(%rip), %r8 - movl 104(%rsp), %ecx - andl $2147483647, %ecx - subl $1, %ecx - cmpl $1202716671, %ecx - movl 96(%rsp), %eax - jae .L_2TAG_PACKET_0.0.1 - movq %xmm7, 72(%rsp) - mulsd 5136(%r8), %xmm7 - andl $2147483647, %eax - unpcklpd %xmm0, %xmm0 - movapd 5280(%r8), %xmm1 - cmpl $1132462080, %eax - addsd 5120(%r8), %xmm7 - jg .L_2TAG_PACKET_1.0.1 - mulpd %xmm0, %xmm1 - cvtsd2si %xmm1, %edx - addpd 5296(%r8), %xmm1 - movapd 5312(%r8), %xmm3 - subpd 5296(%r8), %xmm1 - movd %xmm7, %ecx - movq %xmm7, %xmm4 - movapd 5328(%r8), %xmm2 - andq $127, %rcx - movq (%r8,%rcx,8), %xmm5 - mulpd %xmm1, %xmm3 - addl $1865216, %edx - andq $63, %rdx - lea 1024(%r8), %rax - shlq $6, %rdx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - paddd 5200(%r8), %xmm4 - subpd %xmm3, %xmm0 - psllq $45, %xmm4 - mulpd 5344(%r8), %xmm1 - pand 5216(%r8), %xmm4 - movapd %xmm0, %xmm3 - subpd %xmm2, %xmm0 - movapd 5248(%r8), %xmm6 - orpd %xmm5, %xmm4 - movapd 16(%rax), %xmm5 - subpd %xmm0, %xmm3 - movapd %xmm0, 48(%rsp) - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subpd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subpd %xmm3, %xmm1 - movq %xmm4, 64(%rsp) - subsd 5120(%r8), %xmm7 - movapd 48(%rax), %xmm3 - addpd %xmm3, %xmm2 - subpd %xmm2, %xmm5 - mulpd %xmm5, %xmm1 - movapd 16(%rax), %xmm5 - mulpd 48(%rsp), %xmm2 - movq 72(%rsp), %xmm4 - mulsd 5152(%r8), %xmm7 - mulpd %xmm0, %xmm6 - mulpd 48(%rsp), %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm5 - subsd %xmm7, %xmm4 - movq 5168(%r8), %xmm7 - mulpd %xmm0, %xmm0 - movapd %xmm5, 16(%rsp) - movapd 5264(%r8), %xmm5 - mulsd %xmm4, %xmm7 - addpd 5232(%r8), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, 32(%rsp) - addpd 16(%rax), %xmm3 - addsd 5184(%r8), %xmm7 - addpd %xmm5, %xmm6 - movapd (%rax), %xmm0 - movsd %xmm6, %xmm5 - unpckhpd %xmm6, %xmm6 - unpcklpd %xmm5, %xmm5 - mulsd %xmm4, %xmm7 - mulpd 16(%rsp), %xmm6 - mulpd 48(%rsp), %xmm0 - mulpd %xmm5, %xmm2 - mulsd %xmm4, %xmm7 - movapd %xmm0, (%rsp) - addpd %xmm3, %xmm0 - movapd 16(%rax), %xmm5 - addsd %xmm4, %xmm7 - subpd %xmm3, %xmm5 - subpd %xmm0, %xmm3 - addpd 32(%rax), %xmm1 - mulsd 64(%rsp), %xmm7 - addpd 32(%rsp), %xmm5 - addpd (%rsp), %xmm3 - addpd %xmm5, %xmm1 - addpd %xmm3, %xmm1 - addsd 64(%rsp), %xmm7 - addpd %xmm2, %xmm1 - addpd %xmm6, %xmm1 - addpd %xmm0, %xmm1 - movsd %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - mulsd %xmm7, %xmm0 - mulsd %xmm7, %xmm1 - cvtsd2ss %xmm0, %xmm0 - cvtsd2ss %xmm1, %xmm1 - movd %xmm0, %edx - movd %xmm1, %eax - movd %xmm0, %ecx - andl $2139095040, %ecx - je .L_2TAG_PACKET_2.0.1 - movd %xmm1, %ecx - andl $2139095040, %ecx - je .L_2TAG_PACKET_2.0.1 - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_2.0.1: - movss _FLT_MIN_NORMAL(%rip), %xmm0 - mulss %xmm0, %xmm0 - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_0.0.1: - cmpl $-1, %ecx - je .L_2TAG_PACKET_3.0.1 - cmpl $2139095039, %ecx - jg .L_2TAG_PACKET_4.0.1 - je .L_2TAG_PACKET_5.0.1 - cvtss2sd 104(%rsp), %xmm0 - lea 80(%rsp), %rdi - lea 88(%rsp), %rsi - call sincos@PLT - cvtss2sd 96(%rsp), %xmm0 - call exp@PLT - movq %xmm0, %xmm1 - mulsd 88(%rsp), %xmm0 - mulsd 80(%rsp), %xmm1 - cvtsd2ss %xmm0, %xmm0 - cvtsd2ss %xmm1, %xmm1 - movd %xmm0, %eax - movd %xmm1, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_5.0.1: - movl $2147483647, %ecx - movss 104(%rsp), %xmm1 - movss 96(%rsp), %xmm0 - andl %eax, %ecx - cmpl $2139095040, %ecx - jg .L_2TAG_PACKET_6.0.1 - je .L_2TAG_PACKET_7.0.1 - subss %xmm1, %xmm1 - movd %xmm1, %edx - movl %edx, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_7.0.1: - cmpl $2139095040, %eax - je .L_2TAG_PACKET_8.0.1 - movl $0, %eax - movl $0, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_8.0.1: - subss %xmm1, %xmm1 - movl $2139095040, %eax - movd %xmm1, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_6.0.1: - mulss %xmm0, %xmm0 - movd %xmm0, %eax - movl %eax, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_4.0.1: - movl $2147483647, %ecx - movss 104(%rsp), %xmm1 - andl %eax, %ecx - movss 96(%rsp), %xmm0 - cmpl $2139095040, %ecx - mulss %xmm1, %xmm1 - jg .L_2TAG_PACKET_9.0.1 - je .L_2TAG_PACKET_10.0.1 - movd %xmm1, %eax - movl %eax, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_10.0.1: - cmpl $2139095040, %eax - je .L_2TAG_PACKET_11.0.1 - movl $0, %eax - movl $0, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_11.0.1: - movl $2139095040, %eax - movd %xmm1, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_9.0.1: - mulss %xmm0, %xmm0 - movd %xmm0, %eax - movd %xmm1, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_3.0.1: - movl $2147483647, %ecx - andl %eax, %ecx - je .L_2TAG_PACKET_12.0.1 - cmpl $2139095040, %ecx - jg .L_2TAG_PACKET_13.0.1 - je .L_2TAG_PACKET_14.0.1 - cmpl $1124073472, %ecx - jg .L_2TAG_PACKET_15.0.1 - movq %xmm7, %xmm0 - mulsd 5136(%r8), %xmm7 - addsd 5120(%r8), %xmm7 - movd %xmm7, %ecx - movq %xmm7, %xmm4 - andq $127, %rcx - movq (%r8,%rcx,8), %xmm5 - paddd 5200(%r8), %xmm4 - subsd 5120(%r8), %xmm7 - mulsd 5152(%r8), %xmm7 - subsd %xmm7, %xmm0 - movq 5168(%r8), %xmm7 - mulsd %xmm0, %xmm7 - addsd 5184(%r8), %xmm7 - psllq $45, %xmm4 - mulsd %xmm0, %xmm7 - pand 5216(%r8), %xmm4 - mulsd %xmm0, %xmm7 - orpd %xmm5, %xmm4 - addsd %xmm0, %xmm7 - mulsd %xmm4, %xmm7 - addsd %xmm4, %xmm7 - cvtsd2ss %xmm7, %xmm7 - movd %xmm7, %eax - movl 104(%rsp), %edx - andl $-2147483648, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_12.0.1: - movl 104(%rsp), %edx - movl $1065353216, %eax - andl $-2147483648, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_15.0.1: - movl $2139095039, %ecx - testl $-2147483648, %eax - movl $8388608, %eax - cmovz %ecx, %eax - movl 104(%rsp), %edx - andl $2147483647, %eax - andl $-2147483648, %edx - movd %eax, %xmm0 - mulss %xmm0, %xmm0 - movd %xmm0, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_14.0.1: - movl $2139095040, %ecx - andl $-2147483648, %eax - movl 104(%rsp), %edx - cmovz %ecx, %eax - andl $-2147483648, %edx - andl $2147483647, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_13.0.1: - movss 96(%rsp), %xmm0 - movl 104(%rsp), %edx - addss %xmm0, %xmm0 - movd %xmm0, %eax - andl $-2147483648, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_1.0.1: - cmpl $2139095040, %eax - movl 96(%rsp), %ecx - jg .L_2TAG_PACKET_16.0.1 - movl $8388608, %eax - movl $2139095039, %edx - testl $-2147483648, %ecx - cmovz %edx, %eax - movl $0, %edx - cmpl $-8388608, %ecx - cmove %edx, %eax - cmpl $2139095040, %ecx - cmove %ecx, %eax - movd %eax, %xmm7 - mulss %xmm7, %xmm7 - mulpd %xmm0, %xmm1 - cvtsd2si %xmm1, %edx - addpd 5296(%r8), %xmm1 - movapd 5312(%r8), %xmm3 - subpd 5296(%r8), %xmm1 - movapd 5328(%r8), %xmm2 - mulpd %xmm1, %xmm3 - addl $1865216, %edx - andq $63, %rdx - lea 1024(%r8), %rax - shlq $6, %rdx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - subpd %xmm3, %xmm0 - mulpd 5344(%r8), %xmm1 - movapd %xmm0, %xmm3 - subpd %xmm2, %xmm0 - movapd 5248(%r8), %xmm6 - movapd 16(%rax), %xmm5 - subpd %xmm0, %xmm3 - movapd %xmm0, 48(%rsp) - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subpd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subpd %xmm3, %xmm1 - movapd 48(%rax), %xmm3 - addpd %xmm3, %xmm2 - subpd %xmm2, %xmm5 - mulpd %xmm5, %xmm1 - movapd 16(%rax), %xmm5 - mulpd 48(%rsp), %xmm2 - mulpd %xmm0, %xmm6 - mulpd 48(%rsp), %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - movapd %xmm5, 16(%rsp) - movapd 5264(%r8), %xmm5 - addpd 5232(%r8), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, 32(%rsp) - addpd 16(%rax), %xmm3 - addpd %xmm5, %xmm6 - movapd (%rax), %xmm0 - movsd %xmm6, %xmm5 - unpckhpd %xmm6, %xmm6 - unpcklpd %xmm5, %xmm5 - mulpd 16(%rsp), %xmm6 - mulpd 48(%rsp), %xmm0 - mulpd %xmm5, %xmm2 - movapd %xmm0, (%rsp) - addpd %xmm3, %xmm0 - movapd 16(%rax), %xmm5 - subpd %xmm3, %xmm5 - subpd %xmm0, %xmm3 - addpd 32(%rax), %xmm1 - addpd 32(%rsp), %xmm5 - addpd (%rsp), %xmm3 - addpd %xmm5, %xmm1 - addpd %xmm3, %xmm1 - addpd %xmm2, %xmm1 - addpd %xmm6, %xmm1 - addpd %xmm0, %xmm1 - movsd %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - cvtsd2ss %xmm0, %xmm0 - cvtsd2ss %xmm1, %xmm1 - mulss %xmm7, %xmm0 - mulss %xmm7, %xmm1 - movd %xmm0, %edx - movd %xmm1, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret -.L_2TAG_PACKET_16.0.1: - movss 96(%rsp), %xmm0 - mulss %xmm0, %xmm0 - movd %xmm0, %eax - movl %eax, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 128(%rsp), %rbx - movq 120(%rsp), %rsp - ret - .cfi_def_cfa_offset 8 -..B1.3: - .align 16,0x90 - .cfi_endproc - .type cexpf,@function - .size cexpf,.-cexpf - .data -# -- End cexpf - .section .rodata, "a" - .align 16 - .align 16 -cexpf_table: - .long 0 - .long 0 - .long 2851812149 - .long 5693 - .long 1048019041 - .long 11418 - .long 3899555717 - .long 17173 - .long 3541402996 - .long 22960 - .long 702412510 - .long 28779 - .long 410360776 - .long 34629 - .long 3402036099 - .long 40510 - .long 1828292879 - .long 46424 - .long 728909815 - .long 52370 - .long 852742562 - .long 58348 - .long 2952712987 - .long 64358 - .long 3490863953 - .long 70401 - .long 3228316108 - .long 76477 - .long 2930322912 - .long 82586 - .long 3366293073 - .long 88728 - .long 1014845819 - .long 94904 - .long 948735466 - .long 101113 - .long 3949972341 - .long 107355 - .long 2214878420 - .long 113632 - .long 828946858 - .long 119943 - .long 586995997 - .long 126288 - .long 2288159958 - .long 132667 - .long 2440944790 - .long 139081 - .long 1853186616 - .long 145530 - .long 1337108031 - .long 152014 - .long 1709341917 - .long 158533 - .long 3790955393 - .long 165087 - .long 4112506593 - .long 171677 - .long 3504003472 - .long 178303 - .long 2799960843 - .long 184965 - .long 2839424854 - .long 191663 - .long 171030293 - .long 198398 - .long 4232894513 - .long 205168 - .long 2992903935 - .long 211976 - .long 1603444721 - .long 218821 - .long 926591435 - .long 225703 - .long 1829099622 - .long 232622 - .long 887463927 - .long 239579 - .long 3272845541 - .long 246573 - .long 1276261410 - .long 253606 - .long 78413852 - .long 260677 - .long 569847338 - .long 267786 - .long 3645941911 - .long 274933 - .long 1617004845 - .long 282120 - .long 3978100823 - .long 289345 - .long 3049340112 - .long 296610 - .long 4040676318 - .long 303914 - .long 3577096743 - .long 311258 - .long 2583551245 - .long 318642 - .long 1990012071 - .long 326066 - .long 2731501122 - .long 333530 - .long 1453150082 - .long 341035 - .long 3395129871 - .long 348580 - .long 917841882 - .long 356167 - .long 3566716925 - .long 363794 - .long 3712504873 - .long 371463 - .long 2321106615 - .long 379174 - .long 363667784 - .long 386927 - .long 3111574537 - .long 394721 - .long 2956612997 - .long 402558 - .long 885834528 - .long 410438 - .long 2186617381 - .long 418360 - .long 3561793907 - .long 426325 - .long 1719614413 - .long 434334 - .long 1963711167 - .long 442386 - .long 1013258799 - .long 450482 - .long 4182873220 - .long 458621 - .long 3907805044 - .long 466805 - .long 1218806132 - .long 475034 - .long 1447192521 - .long 483307 - .long 1339972927 - .long 491625 - .long 1944781191 - .long 499988 - .long 19972402 - .long 508397 - .long 919555682 - .long 516851 - .long 1413356050 - .long 525351 - .long 2571947539 - .long 533897 - .long 1176749997 - .long 542490 - .long 2604962541 - .long 551129 - .long 3649726105 - .long 559815 - .long 1110089947 - .long 568549 - .long 380978316 - .long 577330 - .long 2568320822 - .long 586158 - .long 194117574 - .long 595035 - .long 2966275557 - .long 603959 - .long 3418903055 - .long 612932 - .long 2682146384 - .long 621954 - .long 1892288442 - .long 631025 - .long 2191782032 - .long 640145 - .long 434316067 - .long 649315 - .long 2069751141 - .long 658534 - .long 3964284211 - .long 667803 - .long 2990417245 - .long 677123 - .long 321958744 - .long 686494 - .long 1434058175 - .long 695915 - .long 3218338682 - .long 705387 - .long 2572866477 - .long 714911 - .long 697153126 - .long 724487 - .long 3092190715 - .long 734114 - .long 2380618042 - .long 743794 - .long 4076559943 - .long 753526 - .long 815859274 - .long 763312 - .long 2420883922 - .long 773150 - .long 1540824585 - .long 783042 - .long 3716502172 - .long 792987 - .long 1610600570 - .long 802987 - .long 777507147 - .long 813041 - .long 2483480501 - .long 823149 - .long 3706687593 - .long 833312 - .long 1432208378 - .long 843531 - .long 1242007932 - .long 853805 - .long 135105010 - .long 864135 - .long 3707479175 - .long 874520 - .long 382305176 - .long 884963 - .long 64696965 - .long 895462 - .long 4076975200 - .long 906017 - .long 863738719 - .long 916631 - .long 351641897 - .long 927302 - .long 3884662774 - .long 938030 - .long 4224142467 - .long 948817 - .long 2728693978 - .long 959663 - .long 764307441 - .long 970568 - .long 3999357479 - .long 981531 - .long 929806999 - .long 992555 - .long 1533953344 - .long 1003638 - .long 2912730644 - .long 1014781 - .long 2174652632 - .long 1025985 - .long 730821105 - .long 1037250 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 3217031168 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 3220176896 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 1069547520 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 1071644672 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 1072693248 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 1069547520 - .long 0 - .long 1127743488 - .long 0 - .long 0 - .long 1697350398 - .long 1080497479 - .long 0 - .long 0 - .long 4277811695 - .long 1064709698 - .long 0 - .long 0 - .long 3082479990 - .long 1069897045 - .long 0 - .long 0 - .long 4294966960 - .long 1071644671 - .long 0 - .long 0 - .long 130944 - .long 0 - .long 130944 - .long 0 - .long 0 - .long 2146435072 - .long 0 - .long 2146435072 - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .long 1841940611 - .long 1076125488 - .long 1841940611 - .long 1076125488 - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .long 1413480448 - .long 1069097467 - .long 1413480448 - .long 1069097467 - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .long 771977331 - .long 996350346 - .long 771977331 - .long 996350346 - .type cexpf_table,@object - .size cexpf_table,5360 - .align 16 -_FLT_MIN_NORMAL: - .long 8388608 - .long 8388608 - .type _FLT_MIN_NORMAL,@object - .size _FLT_MIN_NORMAL,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexpl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexpl.S deleted file mode 100644 index c27329832d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cexpl.S +++ /dev/null @@ -1,649 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cexpl.c" - .text -..TXTST0: -# -- Begin cexpl - .text - .align 16,0x90 - .globl cexpl -cexpl: -# parameter 1: 320 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cexpl.1: -..L2: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - subq $288, %rsp - .cfi_def_cfa_offset 320 - xorb %r15b, %r15b - fldt .L_2il0floatpacket.7(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 272(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 240(%rsp) - fldt 240(%rsp) - fstpt 256(%rsp) -..B1.2: - fnstcw 98(%rsp) -..B1.3: - movzwl 98(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 96(%rsp) -..B1.5: - fldcw 96(%rsp) -..B1.6: - movb $1, %r15b -..B1.7: - movzwl 328(%rsp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.31 -..B1.8: - testl %edx, %edx - jle ..B1.54 -..B1.9: - movzwl 344(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jge ..B1.31 -..B1.10: - testl %eax, %eax - jle ..B1.52 -..B1.11: - fldt 320(%rsp) - lea 176(%rsp), %rdi - fstpt 32(%rdi) - lea 208(%rsp), %rsi - fldt -128(%rsi) - fstpt 16(%rsi) -..___tag_value_cexpl.10: - call __libm_expl_k80@PLT -..___tag_value_cexpl.11: -..B1.62: - fstpt 64(%rsp) -..B1.12: - movzwl 184(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.51 -..B1.13: - testl %eax, %eax - je ..B1.22 -..B1.14: - fldt 64(%rsp) - lea 48+_CONSTANTS(%rip), %rax - fldt 176(%rsp) - fldt 192(%rsp) - fldt .L_2il0floatpacket.8(%rip) - fldt (%rax) - faddp %st, %st(4) - fxch %st(3) - fstpt (%rsp) - fld %st(1) - movl (%rsp), %r14d - fadd %st(1), %st - fld %st(0) - fmulp %st, %st(4) - fld %st(3) - fsub %st(1), %st - fsubrp %st, %st(4) - fxch %st(3) - fstpt 32(%rsp) - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fxch %st(2) - fsubr %st(3), %st - fsubrp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt 352(%rsp) - fstpt (%rsp) - lea 160(%rsp), %rdi - fstpt -96(%rdi) -..___tag_value_cexpl.13: - call __libm_cosl_k80@PLT -..___tag_value_cexpl.14: -..B1.63: - fldt 64(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 320 -..B1.15: - fldt 144(%rsp) - lea 16+_CONSTANTS(%rip), %rax - fld %st(0) - fldt 160(%rsp) - movzwl 344(%rsp), %edx - fadd %st, %st(1) - andl $32767, %edx - fxch %st(1) - fsub %st, %st(2) - cmpl $16183, %edx - fxch %st(2) - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.8(%rip) - fldt (%rax) - fxch %st(1) - fmul %st(3), %st - fld %st(0) - fsub %st(4), %st - fsubrp %st, %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(3) - jge ..B1.17 -..B1.16: - fldt 336(%rsp) - lea 32+_CONSTANTS(%rip), %rbx - fldt 80(%rsp) - fstpt 128(%rsp) - fldt (%rbx) - fmulp %st, %st(1) - fstpt 112(%rsp) - movzwl 120(%rsp), %eax - movl %eax, %ebx - andl $-32768, %eax - andl $32767, %ebx - orl $-49153, %eax - addl $-16639, %ebx - movw %ax, 120(%rsp) - fldt 112(%rsp) - jmp ..B1.19 -..B1.17: - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fldt 352(%rsp) - lea 128(%rsp), %rdi - fstpt (%rsp) - fxch %st(2) - fstpt 16(%rsp) - fxch %st(1) - fstpt -96(%rdi) - fstpt -64(%rdi) -..___tag_value_cexpl.17: - call __libm_sinl_k80@PLT -..___tag_value_cexpl.18: -..B1.64: - fldt 64(%rsp) - fldt 32(%rsp) - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 320 -..B1.18: - fldt 112(%rsp) - xorl %ebx, %ebx - fmul %st(4), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fldt 128(%rsp) - fmulp %st, %st(5) - fxch %st(4) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 128(%rsp) - fxch %st(3) -..B1.19: - fldt 80(%rsp) - fld %st(1) - movl %r14d, %edi - fadd %st(1), %st - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fldt 32(%rsp) - fldt .L_2il0floatpacket.8(%rip) - addq $-32, %rsp - .cfi_def_cfa_offset 352 - fmul %st(3), %st - fld %st(0) - fsub %st(4), %st - fsubrp %st, %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(4) - fmul %st(6), %st - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fxch %st(3) - fmul %st, %st(5) - fxch %st(5) - fstpt (%rsp) - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - fstpt 80(%rsp) -..___tag_value_cexpl.21: - call __libm_scalbl_k80@PLT -..___tag_value_cexpl.22: -..B1.65: - fldt 80(%rsp) - fldt 48(%rsp) - fldt 32(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 320 -..B1.20: - fxch %st(3) - fstpt 240(%rsp) - fld %st(1) - fmul %st(3), %st - addl %ebx, %r14d - fxch %st(1) - fmul %st, %st(2) - fldt 32(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 352 - fld %st(0) - movl %r14d, %edi - fmulp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) -..___tag_value_cexpl.25: - call __libm_scalbl_k80@PLT -..___tag_value_cexpl.26: -..B1.66: - addq $32, %rsp - .cfi_def_cfa_offset 320 -..B1.21: - fstpt 256(%rsp) - jmp ..B1.44 -..B1.22: - lea 16+_CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 16(%rsp) -..B1.23: - fldt 16(%rsp) - fstpt 176(%rsp) - fldt 336(%rsp) - fstpt (%rsp) - fldt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fstpt (%rsp) - call cosl@PLT -..B1.67: - addq $16, %rsp - .cfi_def_cfa_offset 320 - fldt 16(%rsp) - fmulp %st, %st(1) - movzwl 344(%rsp), %eax - testl $32767, %eax - fstpt 240(%rsp) - jle ..B1.25 -..B1.24: - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fldt 16(%rsp) - fstpt (%rsp) - call sinl@PLT -..B1.68: - addq $16, %rsp - .cfi_def_cfa_offset 320 - fldt 16(%rsp) - fmulp %st, %st(1) - fstpt 256(%rsp) - jmp ..B1.26 -..B1.25: - fldt (%rsp) - fldt 16(%rsp) - fmulp %st, %st(1) - fstpt 256(%rsp) -..B1.26: - testb %r15b, %r15b - je ..B1.28 -..B1.27: - fldt 64(%rsp) - fstpt (%rsp) -..B1.69: - fldcw 98(%rsp) -..B1.28: - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.50 -..B1.29: - fldt 240(%rsp) - fldt 256(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.49 -..B1.30: - addq $288, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 320 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.31: - cmpq $0, 336(%rsp) - jne ..B1.33 -..B1.32: - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fldt 336(%rsp) - fstpt (%rsp) - call expl@PLT -..B1.70: - addq $16, %rsp - .cfi_def_cfa_offset 320 - fldt 336(%rsp) - fstpt 256(%rsp) - fstpt 240(%rsp) - jmp ..B1.44 -..B1.33: - movzwl 344(%rsp), %ebx - andl $32767, %ebx - cmpl $32767, %ebx - jge ..B1.36 -..B1.34: - fldt 320(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fstpt (%rsp) - call expl@PLT -..B1.72: - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 320 - fldt 336(%rsp) - fstpt (%rsp) - fldt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fstpt (%rsp) - call cosl@PLT -..B1.71: - addq $16, %rsp - .cfi_def_cfa_offset 320 - fldt 16(%rsp) - testl %ebx, %ebx - fmulp %st, %st(1) - fstpt 240(%rsp) - jle ..B1.56 -..B1.35: - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fldt 16(%rsp) - fstpt (%rsp) - call sinl@PLT -..B1.73: - addq $16, %rsp - .cfi_def_cfa_offset 320 - fldt 16(%rsp) - fmulp %st, %st(1) - fstpt 256(%rsp) - jmp ..B1.44 -..B1.36: - cmpl $32767, %edx - jge ..B1.38 -..B1.37: - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fldt 352(%rsp) - fstpt (%rsp) - call sinl@PLT -..B1.74: - addq $16, %rsp - .cfi_def_cfa_offset 320 - fstpt 240(%rsp) - fldt 240(%rsp) - fstpt 256(%rsp) - jmp ..B1.44 -..B1.38: - cmpl $-2147483648, 324(%rsp) - jne ..B1.40 -..B1.39: - cmpl $0, 320(%rsp) - je ..B1.41 -..B1.40: - fldt 320(%rsp) - fmul %st(0), %st - fstpt 240(%rsp) - fldt 240(%rsp) - fldt 336(%rsp) - fmulp %st, %st(1) - fstpt 256(%rsp) - jmp ..B1.44 -..B1.41: - testb $-128, 329(%rsp) - je ..B1.43 -..B1.42: - fldt 336(%rsp) - fmul %st(0), %st - fstpt 336(%rsp) - fldt 80(%rsp) - fstpt 240(%rsp) - fldt 240(%rsp) - fstpt 256(%rsp) - jmp ..B1.44 -..B1.43: - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fldt 336(%rsp) - fstpt (%rsp) - call expl@PLT -..B1.76: - addq $16, %rsp - .cfi_def_cfa_offset 320 - fstpt 240(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 336 - fldt 352(%rsp) - fstpt (%rsp) - call sinl@PLT -..B1.75: - addq $16, %rsp - .cfi_def_cfa_offset 320 - fstpt 256(%rsp) -..B1.44: - testb %r15b, %r15b - je ..B1.46 -..B1.45: - fldcw 98(%rsp) -..B1.46: - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.50 -..B1.47: - fldt 240(%rsp) - fldt 256(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.49 -..B1.48: - addq $288, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 320 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.49: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.50: - call __stack_chk_fail@PLT -..B1.51: - lea _CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 16(%rsp) - jmp ..B1.23 -..B1.52: - cmpl $0, 340(%rsp) - jne ..B1.11 -..B1.53: - cmpl $0, 336(%rsp) - jne ..B1.11 - jmp ..B1.31 -..B1.54: - cmpl $0, 324(%rsp) - jne ..B1.9 -..B1.55: - cmpl $0, 320(%rsp) - jne ..B1.9 - jmp ..B1.31 -..B1.56: - cmpq $0, 320(%rsp) - je ..B1.35 -..B1.57: - fldt (%rsp) - fldt 16(%rsp) - fmulp %st, %st(1) - fstpt 256(%rsp) - jmp ..B1.44 - .align 16,0x90 - .cfi_endproc - .type cexpl,@function - .size cexpl,.-cexpl - .data -# -- End cexpl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,64 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimag.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimag.S deleted file mode 100644 index ba2d45e4e8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimag.S +++ /dev/null @@ -1,65 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cimag.c" - .text -..TXTST0: -# -- Begin cimag - .text - .align 16,0x90 - .globl cimag -cimag: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cimag.1: -..L2: - - movaps %xmm1, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type cimag,@function - .size cimag,.-cimag - .data -# -- End cimag - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimagf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimagf.S deleted file mode 100644 index ea0a8cb710..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimagf.S +++ /dev/null @@ -1,66 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cimagf.c" - .text -..TXTST0: -# -- Begin cimagf - .text - .align 16,0x90 - .globl cimagf -cimagf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cimagf.1: -..L2: - - movsd %xmm0, -8(%rsp) - movss -4(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type cimagf,@function - .size cimagf,.-cimagf - .data -# -- End cimagf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimagl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimagl.S deleted file mode 100644 index 9a42707a5b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cimagl.S +++ /dev/null @@ -1,65 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cimagl.c" - .text -..TXTST0: -# -- Begin cimagl - .text - .align 16,0x90 - .globl cimagl -cimagl: -# parameter 1: 8 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cimagl.1: -..L2: - - fldt 24(%rsp) - ret - .align 16,0x90 - .cfi_endproc - .type cimagl,@function - .size cimagl,.-cimagl - .data -# -- End cimagl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog.S deleted file mode 100644 index 6d06c0a0c6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog.S +++ /dev/null @@ -1,615 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clog.c" - .text -..TXTST0: -# -- Begin clog - .text - .align 16,0x90 - .globl clog -clog: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_clog.1: -..L2: - - movq %fs:40, %rax - subq $120, %rsp - .cfi_def_cfa_offset 128 - movsd %xmm0, 40(%rsp) - xorq %rsp, %rax - movsd %xmm1, 48(%rsp) - movzwl 46(%rsp), %edx - andl $32752, %edx - movq %rax, 104(%rsp) - movzwl 54(%rsp), %eax - andl $32752, %eax - shrl $4, %edx - shrl $4, %eax - cmpl $2047, %edx - jge ..B1.26 -..B1.2: - cmpl $2047, %eax - jge ..B1.62 -..B1.3: - movsd 40(%rsp), %xmm14 - movaps %xmm14, %xmm7 - pxor %xmm2, %xmm2 - movsd 48(%rsp), %xmm1 - andps .L_2il0floatpacket.10(%rip), %xmm7 - movaps %xmm1, %xmm6 - andps .L_2il0floatpacket.10(%rip), %xmm6 - ucomisd %xmm2, %xmm7 - jp ..B1.4 - je ..B1.40 -..B1.4: - comisd %xmm7, %xmm6 - jbe ..B1.6 -..B1.5: - movaps %xmm7, %xmm2 - movsd %xmm7, 32(%rsp) - movaps %xmm6, %xmm7 - movsd %xmm6, (%rsp) - movaps %xmm2, %xmm6 - movsd %xmm2, 8(%rsp) - jmp ..B1.7 -..B1.6: - movsd %xmm6, 8(%rsp) - movsd %xmm7, (%rsp) -..B1.7: - lea 8+_CONSTANTS(%rip), %rax - comisd (%rax), %xmm7 - jb ..B1.19 -..B1.8: - lea 16+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm2 - comisd %xmm7, %xmm2 - jb ..B1.19 -..B1.9: - lea 40+_CONSTANTS(%rip), %rdx - lea _CONSTANTS(%rip), %rax - movaps %xmm7, %xmm5 - mulsd %xmm7, %xmm5 - comisd (%rdx), %xmm6 - movsd .L_2il0floatpacket.11(%rip), %xmm2 - movsd (%rax), %xmm4 - jbe ..B1.12 -..B1.10: - movaps %xmm6, %xmm3 - mulsd %xmm6, %xmm3 - addsd %xmm3, %xmm5 - subsd %xmm2, %xmm5 - andps .L_2il0floatpacket.10(%rip), %xmm5 - comisd %xmm5, %xmm4 - ja ..B1.13 - jmp ..B1.18 -..B1.12: - subsd %xmm2, %xmm5 - andps .L_2il0floatpacket.10(%rip), %xmm5 - comisd %xmm5, %xmm4 - jbe ..B1.18 -..B1.13: - movzwl 14(%rsp), %eax - andl $32752, %eax - cmpl $14608, %eax - jl ..B1.15 -..B1.14: - movsd .L_2il0floatpacket.8(%rip), %xmm13 - lea 56+_Q1(%rip), %rax - movsd .L_2il0floatpacket.8(%rip), %xmm10 - lea 48+_Q1(%rip), %rdx - movsd (%rsp), %xmm11 - lea 40+_Q1(%rip), %rcx - movsd .L_2il0floatpacket.9(%rip), %xmm4 - lea 32+_Q1(%rip), %rsi - movsd (%rax), %xmm6 - lea 24+_Q1(%rip), %rdi - lea 16+_Q1(%rip), %r8 - lea 8+_Q1(%rip), %r9 - lea _Q1(%rip), %r10 - mulsd %xmm7, %xmm13 - movaps %xmm13, %xmm15 - subsd %xmm7, %xmm15 - movsd %xmm15, 16(%rsp) - movsd 16(%rsp), %xmm12 - subsd %xmm12, %xmm13 - movsd 8(%rsp), %xmm12 - mulsd %xmm12, %xmm10 - subsd %xmm13, %xmm11 - movaps %xmm10, %xmm9 - movaps %xmm13, %xmm5 - mulsd %xmm13, %xmm5 - subsd %xmm12, %xmm9 - mulsd %xmm4, %xmm13 - movsd %xmm9, 16(%rsp) - movaps %xmm5, %xmm7 - movsd 16(%rsp), %xmm9 - mulsd %xmm11, %xmm13 - subsd %xmm9, %xmm10 - mulsd %xmm11, %xmm11 - subsd %xmm10, %xmm12 - movaps %xmm10, %xmm9 - mulsd %xmm10, %xmm9 - mulsd %xmm4, %xmm10 - addsd %xmm9, %xmm7 - mulsd %xmm12, %xmm10 - mulsd %xmm12, %xmm12 - movaps %xmm7, %xmm4 - subsd %xmm2, %xmm7 - subsd %xmm5, %xmm4 - movsd %xmm4, 16(%rsp) - movaps %xmm7, %xmm8 - movsd 16(%rsp), %xmm4 - subsd %xmm4, %xmm9 - addsd %xmm9, %xmm8 - movaps %xmm8, %xmm4 - movaps %xmm8, %xmm2 - movaps %xmm8, %xmm5 - subsd %xmm7, %xmm4 - addsd %xmm13, %xmm2 - movsd %xmm4, 16(%rsp) - movaps %xmm2, %xmm3 - movsd 16(%rsp), %xmm4 - movaps %xmm2, %xmm15 - subsd %xmm4, %xmm5 - addsd %xmm10, %xmm3 - subsd %xmm8, %xmm15 - movsd %xmm5, 24(%rsp) - subsd %xmm15, %xmm13 - movsd 16(%rsp), %xmm4 - subsd %xmm4, %xmm9 - movsd 24(%rsp), %xmm4 - subsd %xmm4, %xmm7 - movaps %xmm3, %xmm4 - addsd %xmm7, %xmm9 - addsd %xmm11, %xmm4 - movaps %xmm4, %xmm5 - addsd %xmm12, %xmm5 - mulsd %xmm5, %xmm6 - movaps %xmm5, %xmm7 - mulsd %xmm5, %xmm7 - addsd (%rdx), %xmm6 - mulsd %xmm5, %xmm6 - addsd (%rcx), %xmm6 - mulsd %xmm5, %xmm6 - addsd (%rsi), %xmm6 - mulsd %xmm5, %xmm6 - addsd (%rdi), %xmm6 - mulsd %xmm5, %xmm6 - addsd (%r8), %xmm6 - mulsd %xmm5, %xmm6 - addsd (%r9), %xmm6 - mulsd %xmm5, %xmm6 - addsd (%r10), %xmm6 - mulsd %xmm7, %xmm6 - movaps %xmm2, %xmm7 - subsd %xmm15, %xmm7 - movsd %xmm7, 16(%rsp) - movsd 16(%rsp), %xmm7 - subsd %xmm7, %xmm8 - movaps %xmm3, %xmm7 - addsd %xmm8, %xmm13 - movaps %xmm3, %xmm8 - subsd %xmm2, %xmm8 - addsd %xmm13, %xmm9 - subsd %xmm8, %xmm7 - subsd %xmm8, %xmm10 - movsd %xmm7, 16(%rsp) - movsd 16(%rsp), %xmm7 - subsd %xmm7, %xmm2 - movaps %xmm4, %xmm7 - subsd %xmm3, %xmm7 - addsd %xmm2, %xmm10 - subsd %xmm7, %xmm11 - addsd %xmm10, %xmm9 - movaps %xmm4, %xmm2 - subsd %xmm7, %xmm2 - movsd %xmm2, 16(%rsp) - movsd 16(%rsp), %xmm2 - subsd %xmm2, %xmm3 - movaps %xmm5, %xmm2 - addsd %xmm3, %xmm11 - movaps %xmm5, %xmm3 - subsd %xmm4, %xmm3 - addsd %xmm11, %xmm9 - subsd %xmm3, %xmm2 - subsd %xmm3, %xmm12 - movsd %xmm2, 16(%rsp) - movsd 16(%rsp), %xmm2 - subsd %xmm2, %xmm4 - addsd %xmm4, %xmm12 - addsd %xmm12, %xmm9 - addsd %xmm6, %xmm9 - addsd %xmm9, %xmm5 - mulsd .L_2il0floatpacket.7(%rip), %xmm5 - movsd %xmm5, 32(%rsp) - movsd %xmm5, 56(%rsp) - jmp ..B1.22 -..B1.15: - movzwl 6(%rsp), %eax - andl $32752, %eax - cmpl $16368, %eax - je ..B1.31 -..B1.16: - movsd %xmm5, 32(%rsp) -..B1.17: - movsd .L_2il0floatpacket.8(%rip), %xmm5 - lea 56+_Q1(%rip), %rax - movsd (%rsp), %xmm11 - lea 48+_Q1(%rip), %rdx - lea 40+_Q1(%rip), %rcx - lea 32+_Q1(%rip), %rsi - lea 24+_Q1(%rip), %rdi - lea 16+_Q1(%rip), %r8 - movsd (%rax), %xmm13 - lea 8+_Q1(%rip), %r9 - lea _Q1(%rip), %r10 - mulsd %xmm7, %xmm5 - movaps %xmm5, %xmm3 - subsd %xmm7, %xmm3 - movsd %xmm3, 16(%rsp) - movsd 16(%rsp), %xmm4 - subsd %xmm4, %xmm5 - movaps %xmm5, %xmm8 - subsd %xmm5, %xmm11 - mulsd %xmm5, %xmm8 - subsd %xmm2, %xmm8 - movsd .L_2il0floatpacket.9(%rip), %xmm2 - mulsd %xmm5, %xmm2 - mulsd %xmm11, %xmm2 - movaps %xmm8, %xmm15 - mulsd %xmm11, %xmm11 - movaps %xmm2, %xmm3 - addsd %xmm11, %xmm3 - movaps %xmm3, %xmm6 - addsd %xmm3, %xmm15 - subsd %xmm2, %xmm6 - mulsd %xmm15, %xmm13 - movaps %xmm15, %xmm9 - movaps %xmm15, %xmm12 - movsd %xmm6, 16(%rsp) - subsd %xmm8, %xmm9 - mulsd %xmm15, %xmm12 - addsd (%rdx), %xmm13 - mulsd %xmm15, %xmm13 - movsd 16(%rsp), %xmm7 - movsd %xmm9, 16(%rsp) - subsd %xmm7, %xmm11 - addsd (%rcx), %xmm13 - mulsd %xmm15, %xmm13 - movsd 16(%rsp), %xmm10 - addsd (%rsi), %xmm13 - subsd %xmm10, %xmm3 - mulsd %xmm15, %xmm13 - addsd %xmm11, %xmm3 - addsd (%rdi), %xmm13 - mulsd %xmm15, %xmm13 - addsd (%r8), %xmm13 - mulsd %xmm15, %xmm13 - addsd (%r9), %xmm13 - mulsd %xmm15, %xmm13 - addsd (%r10), %xmm13 - mulsd %xmm12, %xmm13 - addsd %xmm13, %xmm3 - addsd %xmm15, %xmm3 - mulsd .L_2il0floatpacket.7(%rip), %xmm3 - movsd %xmm3, 56(%rsp) - jmp ..B1.22 -..B1.18: - movsd %xmm5, 32(%rsp) -..B1.19: - movaps %xmm14, %xmm0 - lea 72(%rsp), %rdi -..___tag_value_clog.4: - call __libm_hypot2_k64@PLT -..___tag_value_clog.5: -..B1.20: - lea 24+_CONSTANTS(%rip), %rax - lea 32+_CONSTANTS(%rip), %rdx - lea 88(%rsp), %rdi - movsd (%rax), %xmm1 - mulsd %xmm0, %xmm1 - movsd (%rdx), %xmm2 - mulsd %xmm0, %xmm2 - movsd %xmm1, -80(%rdi) - movsd -16(%rdi), %xmm0 - movsd -8(%rdi), %xmm1 - movsd %xmm2, (%rsp) -..___tag_value_clog.6: - call __libm_log_k64@PLT -..___tag_value_clog.7: -..B1.21: - movsd .L_2il0floatpacket.7(%rip), %xmm0 - movsd 88(%rsp), %xmm5 - mulsd %xmm0, %xmm5 - movsd 8(%rsp), %xmm1 - movaps %xmm1, %xmm6 - movsd 96(%rsp), %xmm4 - addsd %xmm5, %xmm6 - mulsd %xmm0, %xmm4 - movaps %xmm6, %xmm2 - movsd 40(%rsp), %xmm14 - subsd %xmm1, %xmm2 - movsd %xmm2, 16(%rsp) - movsd 16(%rsp), %xmm3 - movsd 48(%rsp), %xmm1 - subsd %xmm3, %xmm5 - addsd %xmm4, %xmm5 - addsd (%rsp), %xmm5 - addsd %xmm5, %xmm6 - movsd %xmm6, 32(%rsp) - movsd %xmm6, 56(%rsp) -..B1.22: - movaps %xmm1, %xmm0 - movaps %xmm14, %xmm1 - call atan2@PLT -..B1.60: - movsd %xmm0, 64(%rsp) - movzwl 70(%rsp), %eax - testl $32752, %eax - jne ..B1.29 -..B1.23: - testl $1048575, 68(%rsp) - jne ..B1.25 -..B1.24: - cmpl $0, 64(%rsp) - je ..B1.29 -..B1.25: - lea 56+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 16(%rsp) - movsd 16(%rsp), %xmm1 - addsd 64(%rsp), %xmm1 - movsd %xmm1, 64(%rsp) - jmp ..B1.29 -..B1.26: - je ..B1.50 -..B1.27: - cmpl $2047, %eax - je ..B1.43 -..B1.28: - lea 48+_CONSTANTS(%rip), %rax - movsd 48(%rsp), %xmm0 - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm1 - movsd %xmm1, 56(%rsp) - movsd 40(%rsp), %xmm1 - call atan2@PLT -..B1.61: - movsd %xmm0, 64(%rsp) -..B1.29: - movq 104(%rsp), %rax - xorq %rsp, %rax - movsd 56(%rsp), %xmm0 - movsd 64(%rsp), %xmm1 - cmpq %fs:40, %rax - jne ..B1.42 -..B1.30: - addq $120, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 128 -..B1.31: - testl $1048575, 4(%rsp) - jne ..B1.16 -..B1.33: - cmpl $0, (%rsp) - jne ..B1.16 -..B1.35: - movsd .L_2il0floatpacket.7(%rip), %xmm2 - mulsd %xmm6, %xmm2 - mulsd %xmm2, %xmm6 - movsd %xmm6, 32(%rsp) - movzwl 38(%rsp), %eax - testl $32752, %eax - jne ..B1.39 -..B1.36: - testl $1048575, 36(%rsp) - jne ..B1.38 -..B1.37: - cmpl $0, 32(%rsp) - je ..B1.39 -..B1.38: - lea 56+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm2 - mulsd %xmm2, %xmm2 - movsd %xmm2, 16(%rsp) - movsd 16(%rsp), %xmm6 - addsd 32(%rsp), %xmm6 - movsd %xmm6, 32(%rsp) -..B1.39: - movsd %xmm6, 56(%rsp) - jmp ..B1.22 -..B1.40: - ucomisd %xmm2, %xmm6 - jne ..B1.4 - jp ..B1.4 -..B1.41: - movsd .L_2il0floatpacket.6(%rip), %xmm3 - divsd %xmm2, %xmm3 - movsd %xmm6, 8(%rsp) - movsd %xmm7, (%rsp) - movsd %xmm3, 56(%rsp) - jmp ..B1.22 -..B1.42: - call __stack_chk_fail@PLT -..B1.43: - testl $1048575, 52(%rsp) - jne ..B1.45 -..B1.44: - cmpl $0, 48(%rsp) - je ..B1.28 -..B1.45: - movsd 48(%rsp), %xmm0 - cmpl $2047, %edx - mulsd %xmm0, %xmm0 - movsd %xmm0, 64(%rsp) - je ..B1.47 -..B1.46: - movsd %xmm0, 56(%rsp) - jmp ..B1.29 -..B1.47: - testl $1048575, 44(%rsp) - jne ..B1.46 -..B1.48: - cmpl $0, 40(%rsp) - jne ..B1.46 -..B1.49: - movsd 40(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 56(%rsp) - jmp ..B1.29 -..B1.50: - testl $1048575, 44(%rsp) - jne ..B1.52 -..B1.51: - cmpl $0, 40(%rsp) - je ..B1.27 -..B1.52: - movsd 40(%rsp), %xmm1 - cmpl $2047, %eax - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, 64(%rsp) - je ..B1.54 -..B1.53: - movsd 48(%rsp), %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, 56(%rsp) - jmp ..B1.29 -..B1.54: - testl $1048575, 52(%rsp) - jne ..B1.53 -..B1.55: - cmpl $0, 48(%rsp) - jne ..B1.53 -..B1.56: - movsd 48(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 56(%rsp) - jmp ..B1.29 -..B1.62: - cmpl $2047, %edx - je ..B1.50 - jmp ..B1.27 - .align 16,0x90 - .cfi_endproc - .type clog,@function - .size clog,.-clog - .data -# -- End clog - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.10: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,16 - .align 16 -_CONSTANTS: - .long 0 - .long 1065353216 - .long 1818952144 - .long 1072073202 - .long 133565931 - .long 1072697336 - .long 4277796864 - .long 1071001154 - .long 3164486458 - .long 1030551450 - .long 0 - .long 592445440 - .long 0 - .long 2146435072 - .long 0 - .long 1048576 - .type _CONSTANTS,@object - .size _CONSTANTS,64 - .align 16 -_Q1: - .long 0 - .long 3219128320 - .long 1431655765 - .long 1070945621 - .long 193 - .long 3218079744 - .long 2576980913 - .long 1070176665 - .long 1408920289 - .long 3217380693 - .long 2428535925 - .long 1069697316 - .long 1830244366 - .long 3217031283 - .long 3038314627 - .long 1069314732 - .type _Q1,@object - .size _Q1,64 - .align 8 -.L_2il0floatpacket.6: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x02000000,0x41a00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog10.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog10.S deleted file mode 100644 index a8ed1a4402..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog10.S +++ /dev/null @@ -1,789 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clog10.c" - .text -..TXTST0: -# -- Begin clog10f - .text - .align 16,0x90 - .globl clog10f -clog10f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_clog10f.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - cvtps2pd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 -..___tag_value_clog10f.4: - call clog10@PLT -..___tag_value_clog10f.5: -..B1.5: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type clog10f,@function - .size clog10f,.-clog10f - .data -# -- End clog10f - .text -# -- Begin clog10 - .text - .align 16,0x90 - .globl clog10 -clog10: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_clog10.8: -..L9: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - movq %fs:40, %rax - subq $128, %rsp - .cfi_def_cfa_offset 160 - movsd %xmm0, 16(%rsp) - xorq %rsp, %rax - movsd %xmm1, 24(%rsp) - movzwl 22(%rsp), %edx - andl $32752, %edx - movq %rax, 112(%rsp) - movzwl 30(%rsp), %eax - andl $32752, %eax - shrl $4, %edx - shrl $4, %eax - cmpl $2047, %edx - jge ..B2.26 -..B2.2: - cmpl $2047, %eax - jge ..B2.62 -..B2.3: - testl %edx, %edx - jne ..B2.9 -..B2.4: - testl $1048575, 20(%rsp) - jne ..B2.9 -..B2.5: - cmpl $0, 16(%rsp) - jne ..B2.9 -..B2.6: - testl %eax, %eax - jne ..B2.9 -..B2.7: - testl $1048575, 28(%rsp) - jne ..B2.9 -..B2.8: - cmpl $0, 24(%rsp) - je ..B2.25 -..B2.9: - movsd 16(%rsp), %xmm0 - lea 24(%rsp), %r15 - movsd (%r15), %xmm1 - movaps %xmm0, %xmm12 - movaps %xmm1, %xmm11 - andps .L_2il0floatpacket.10(%rip), %xmm11 - andps .L_2il0floatpacket.10(%rip), %xmm12 - movaps %xmm11, %xmm6 - movaps %xmm12, %xmm7 - movaps %xmm6, %xmm2 - comisd %xmm12, %xmm11 - jbe ..B2.11 -..B2.10: - movaps %xmm7, %xmm6 - movaps %xmm2, %xmm12 - movaps %xmm11, %xmm7 - movaps %xmm6, %xmm11 -..B2.11: - lea 8+_CONSTANTS(%rip), %rax - comisd (%rax), %xmm12 - jb ..B2.22 -..B2.12: - lea 16+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm2 - comisd %xmm12, %xmm2 - jb ..B2.22 -..B2.13: - lea 24+_CONSTANTS(%rip), %rdx - lea _CONSTANTS(%rip), %rax - movaps %xmm12, %xmm5 - mulsd %xmm12, %xmm5 - comisd (%rdx), %xmm11 - movsd .L_2il0floatpacket.11(%rip), %xmm2 - movsd (%rax), %xmm4 - jbe ..B2.16 -..B2.14: - movaps %xmm11, %xmm3 - mulsd %xmm11, %xmm3 - addsd %xmm3, %xmm5 - subsd %xmm2, %xmm5 - andps .L_2il0floatpacket.10(%rip), %xmm5 - comisd %xmm5, %xmm4 - ja ..B2.17 - jmp ..B2.22 -..B2.16: - subsd %xmm2, %xmm5 - andps .L_2il0floatpacket.10(%rip), %xmm5 - comisd %xmm5, %xmm4 - jbe ..B2.22 -..B2.17: - movsd %xmm6, 8(%rsp) -..B2.18: - movzwl 14(%rsp), %edx - andl $32752, %edx - shrl $4, %edx - cmpl $913, %edx - jl ..B2.20 -..B2.19: - movsd .L_2il0floatpacket.7(%rip), %xmm9 - movaps %xmm12, %xmm10 - mulsd %xmm9, %xmm10 - movaps %xmm11, %xmm8 - mulsd %xmm9, %xmm8 - movaps %xmm10, %xmm13 - movaps %xmm8, %xmm14 - movsd .L_2il0floatpacket.9(%rip), %xmm15 - lea 32+_Q1(%rip), %rbx - lea 56+_Q1(%rip), %rax - subsd %xmm12, %xmm13 - subsd %xmm11, %xmm14 - subsd %xmm13, %xmm10 - subsd %xmm14, %xmm8 - subsd %xmm10, %xmm12 - subsd %xmm8, %xmm11 - movaps %xmm10, %xmm4 - movaps %xmm8, %xmm7 - mulsd %xmm10, %xmm4 - lea 48+_Q1(%rip), %rdx - mulsd %xmm8, %xmm7 - mulsd %xmm15, %xmm10 - mulsd %xmm15, %xmm8 - mulsd %xmm12, %xmm10 - mulsd %xmm11, %xmm8 - mulsd %xmm12, %xmm12 - mulsd %xmm11, %xmm11 - movaps %xmm4, %xmm1 - lea 88(%rsp), %r14 - lea 40+_Q1(%rip), %rcx - addsd %xmm7, %xmm1 - movaps %xmm1, %xmm5 - subsd %xmm2, %xmm1 - subsd %xmm4, %xmm5 - movaps %xmm1, %xmm6 - subsd %xmm5, %xmm7 - movsd (%rax), %xmm5 - addsd %xmm7, %xmm6 - movaps %xmm6, %xmm3 - movaps %xmm6, %xmm2 - lea 24+_Q1(%rip), %rsi - subsd %xmm1, %xmm3 - lea 16+_Q1(%rip), %rdi - subsd %xmm3, %xmm2 - subsd %xmm3, %xmm7 - subsd %xmm2, %xmm1 - lea 8+_Q1(%rip), %r8 - addsd %xmm1, %xmm7 - movaps %xmm6, %xmm1 - lea _Q1(%rip), %r9 - lea 48+_CONSTANTS(%rip), %r10 - addsd %xmm10, %xmm1 - movaps %xmm1, %xmm2 - movaps %xmm1, %xmm14 - lea 56+_CONSTANTS(%rip), %r11 - addsd %xmm8, %xmm2 - subsd %xmm6, %xmm14 - movaps %xmm2, %xmm3 - subsd %xmm14, %xmm10 - addsd %xmm12, %xmm3 - movaps %xmm3, %xmm4 - addsd %xmm11, %xmm4 - mulsd %xmm4, %xmm5 - movaps %xmm4, %xmm13 - mulsd %xmm4, %xmm13 - mulsd %xmm4, %xmm9 - addsd (%rdx), %xmm5 - mulsd %xmm4, %xmm5 - addsd (%rcx), %xmm5 - mulsd %xmm4, %xmm5 - addsd (%rbx), %xmm5 - mulsd %xmm4, %xmm5 - lea 104(%rsp), %rbx - addsd (%rsi), %xmm5 - mulsd %xmm4, %xmm5 - addsd (%rdi), %xmm5 - mulsd %xmm4, %xmm5 - addsd (%r8), %xmm5 - mulsd %xmm4, %xmm5 - addsd (%r9), %xmm5 - mulsd %xmm13, %xmm5 - movaps %xmm1, %xmm13 - subsd %xmm14, %xmm13 - subsd %xmm13, %xmm6 - addsd %xmm6, %xmm10 - movaps %xmm2, %xmm6 - subsd %xmm1, %xmm6 - addsd %xmm10, %xmm7 - subsd %xmm6, %xmm8 - movaps %xmm2, %xmm10 - subsd %xmm6, %xmm10 - subsd %xmm10, %xmm1 - addsd %xmm1, %xmm8 - movaps %xmm3, %xmm1 - addsd %xmm8, %xmm7 - movaps %xmm3, %xmm8 - subsd %xmm2, %xmm8 - subsd %xmm8, %xmm1 - subsd %xmm8, %xmm12 - subsd %xmm1, %xmm2 - movaps %xmm4, %xmm1 - addsd %xmm2, %xmm12 - addsd %xmm12, %xmm7 - movaps %xmm4, %xmm12 - subsd %xmm3, %xmm12 - subsd %xmm12, %xmm1 - subsd %xmm12, %xmm11 - subsd %xmm1, %xmm3 - movsd (%r10), %xmm1 - addsd %xmm3, %xmm11 - movaps %xmm1, %xmm3 - addsd %xmm11, %xmm7 - movaps %xmm9, %xmm11 - addsd %xmm7, %xmm5 - subsd %xmm4, %xmm11 - subsd %xmm11, %xmm9 - mulsd %xmm9, %xmm3 - subsd %xmm9, %xmm4 - addsd %xmm5, %xmm4 - movsd (%r11), %xmm5 - mulsd %xmm5, %xmm9 - movaps %xmm5, %xmm2 - mulsd %xmm4, %xmm2 - mulsd %xmm1, %xmm4 - addsd %xmm9, %xmm2 - pxor %xmm1, %xmm1 - addsd %xmm4, %xmm2 - addsd %xmm2, %xmm3 - mulsd .L_2il0floatpacket.6(%rip), %xmm3 - movsd %xmm3, -72(%rbx) - jmp ..B2.29 -..B2.20: - movsd %xmm7, (%rsp) - movzwl 6(%rsp), %eax - andl $32752, %eax - cmpl $16368, %eax - je ..B2.35 -..B2.21: - movsd .L_2il0floatpacket.7(%rip), %xmm8 - movaps %xmm12, %xmm3 - mulsd %xmm8, %xmm3 - lea 56+_Q1(%rip), %rax - movaps %xmm3, %xmm1 - lea 32+_Q1(%rip), %rbx - movsd (%rax), %xmm7 - lea 88(%rsp), %r14 - lea 48+_Q1(%rip), %rdx - subsd %xmm12, %xmm1 - lea 40+_Q1(%rip), %rcx - subsd %xmm1, %xmm3 - movaps %xmm3, %xmm5 - subsd %xmm3, %xmm12 - mulsd %xmm3, %xmm5 - lea 24+_Q1(%rip), %rsi - subsd %xmm2, %xmm5 - movsd .L_2il0floatpacket.9(%rip), %xmm2 - movaps %xmm5, %xmm14 - mulsd %xmm3, %xmm2 - lea 16+_Q1(%rip), %rdi - mulsd %xmm12, %xmm2 - lea 8+_Q1(%rip), %r8 - mulsd %xmm12, %xmm12 - movaps %xmm2, %xmm10 - lea _Q1(%rip), %r9 - lea 48+_CONSTANTS(%rip), %r10 - addsd %xmm12, %xmm10 - movaps %xmm10, %xmm4 - addsd %xmm10, %xmm14 - subsd %xmm2, %xmm4 - mulsd %xmm14, %xmm7 - subsd %xmm4, %xmm12 - mulsd %xmm14, %xmm8 - addsd (%rdx), %xmm7 - mulsd %xmm14, %xmm7 - movaps %xmm14, %xmm6 - subsd %xmm5, %xmm6 - addsd (%rcx), %xmm7 - subsd %xmm6, %xmm10 - mulsd %xmm14, %xmm7 - addsd %xmm12, %xmm10 - addsd (%rbx), %xmm7 - mulsd %xmm14, %xmm7 - movaps %xmm14, %xmm12 - mulsd %xmm14, %xmm12 - addsd (%rsi), %xmm7 - mulsd %xmm14, %xmm7 - movaps %xmm8, %xmm9 - subsd %xmm14, %xmm9 - addsd (%rdi), %xmm7 - subsd %xmm9, %xmm8 - mulsd %xmm14, %xmm7 - lea 56+_CONSTANTS(%rip), %r11 - addsd (%r8), %xmm7 - mulsd %xmm14, %xmm7 - subsd %xmm8, %xmm14 - movsd (%r10), %xmm13 - lea 104(%rsp), %rbx - movsd (%r11), %xmm11 - movaps %xmm13, %xmm1 - movaps %xmm11, %xmm15 - addsd (%r9), %xmm7 - mulsd %xmm8, %xmm1 - mulsd %xmm11, %xmm8 - mulsd %xmm12, %xmm7 - addsd %xmm7, %xmm10 - addsd %xmm10, %xmm14 - mulsd %xmm14, %xmm15 - mulsd %xmm13, %xmm14 - addsd %xmm8, %xmm15 - addsd %xmm14, %xmm15 - addsd %xmm15, %xmm1 - mulsd .L_2il0floatpacket.6(%rip), %xmm1 - movsd %xmm1, -72(%rbx) - pxor %xmm1, %xmm1 - jmp ..B2.29 -..B2.22: - lea 48(%rsp), %rdi -..___tag_value_clog10.17: - call __libm_hypot2_k64@PLT -..___tag_value_clog10.18: -..B2.23: - lea 72+_CONSTANTS(%rip), %rax - lea 80+_CONSTANTS(%rip), %rdx - mulsd .L_2il0floatpacket.6(%rip), %xmm0 - lea 64(%rsp), %rdi - movsd (%rax), %xmm1 - mulsd %xmm0, %xmm1 - movsd (%rdx), %xmm2 - mulsd %xmm0, %xmm2 - movsd %xmm1, -56(%rdi) - movsd -16(%rdi), %xmm0 - movsd -8(%rdi), %xmm1 - movsd %xmm2, (%rsp) -..___tag_value_clog10.19: - call __libm_log_k64@PLT -..___tag_value_clog10.20: -..B2.24: - movsd 64(%rsp), %xmm6 - lea 88(%rsp), %r14 - movsd .L_2il0floatpacket.6(%rip), %xmm0 - lea 104(%rsp), %rbx - mulsd %xmm0, %xmm6 - lea 48+_CONSTANTS(%rip), %rax - movsd .L_2il0floatpacket.7(%rip), %xmm4 - lea 56+_CONSTANTS(%rip), %rdx - movsd -32(%rbx), %xmm2 - movsd (%rax), %xmm5 - movsd -96(%rbx), %xmm9 - mulsd %xmm6, %xmm4 - movaps %xmm9, %xmm10 - mulsd %xmm0, %xmm2 - movaps %xmm4, %xmm1 - movsd (%rdx), %xmm3 - subsd %xmm6, %xmm1 - movaps %xmm3, %xmm8 - subsd %xmm1, %xmm4 - movaps %xmm4, %xmm7 - pxor %xmm1, %xmm1 - mulsd %xmm5, %xmm7 - subsd %xmm4, %xmm6 - mulsd %xmm3, %xmm4 - addsd %xmm2, %xmm6 - addsd %xmm7, %xmm10 - mulsd %xmm6, %xmm8 - subsd %xmm10, %xmm9 - mulsd %xmm5, %xmm6 - addsd %xmm4, %xmm8 - addsd %xmm7, %xmm9 - addsd %xmm6, %xmm8 - movsd -88(%rbx), %xmm0 - addsd %xmm8, %xmm9 - addsd (%rsp), %xmm9 - addsd %xmm9, %xmm10 - movsd %xmm10, -72(%rbx) - jmp ..B2.29 -..B2.25: - movsd .L_2il0floatpacket.8(%rip), %xmm0 - lea 24(%rsp), %r15 - pxor %xmm1, %xmm1 - lea 88(%rsp), %r14 - divsd %xmm1, %xmm0 - movsd %xmm0, -56(%r14) - lea 104(%rsp), %rbx - movsd -88(%rbx), %xmm0 - jmp ..B2.29 -..B2.26: - je ..B2.51 -..B2.27: - cmpl $2047, %eax - je ..B2.44 -..B2.28: - lea 32+_CONSTANTS(%rip), %rax - lea 24(%rsp), %r15 - pxor %xmm1, %xmm1 - lea 88(%rsp), %r14 - lea 104(%rsp), %rbx - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, -72(%rbx) - movsd -88(%rbx), %xmm0 -..B2.29: - movq (%r15), %rax - lea (%rsp), %rdi - movq %rax, 80(%rdi) - lea 80(%rsp), %rsi - movsd %xmm1, (%r14) - lea 96(%rsp), %rdx - movsd %xmm0, (%rdx) - movsd %xmm1, (%rbx) -..___tag_value_clog10.21: - call __libm_atan2_k64@PLT -..___tag_value_clog10.22: -..B2.61: - movl %eax, %edi -..B2.30: - movzwl 6(%rsp), %eax - andl $32752, %eax - cmpl $32752, %eax - jl ..B2.32 -..B2.31: - movq (%rsp), %rax - movq %rax, 40(%rsp) - jmp ..B2.33 -..B2.32: - movsd (%rsp), %xmm2 - lea 48+_CONSTANTS(%rip), %rax - movsd .L_2il0floatpacket.7(%rip), %xmm1 - lea 56+_CONSTANTS(%rip), %rcx - mulsd %xmm2, %xmm1 - movaps %xmm1, %xmm0 - movq (%rax), %rdx - subsd %xmm2, %xmm0 - movq (%rcx), %rsi - lea 40(%rsp), %rcx - movq %rdx, 56(%rcx) - lea 96(%rsp), %rdx - movq %rsi, (%rbx) - lea 80(%rsp), %rsi - subsd %xmm0, %xmm1 - movsd %xmm1, -16(%rdx) - subsd %xmm1, %xmm2 - addsd -88(%rdx), %xmm2 - movsd %xmm2, (%r14) -..___tag_value_clog10.23: - call __libm_mul_k64@PLT -..___tag_value_clog10.24: -..B2.33: - movq 112(%rsp), %rax - xorq %rsp, %rax - movsd 32(%rsp), %xmm0 - movsd 40(%rsp), %xmm1 - cmpq %fs:40, %rax - jne ..B2.43 -..B2.34: - addq $128, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B2.35: - testl $1048575, 4(%rsp) - jne ..B2.21 -..B2.36: - cmpl $0, (%rsp) - jne ..B2.21 -..B2.37: - testl %edx, %edx - jne ..B2.41 -..B2.38: - testl $1048575, 12(%rsp) - jne ..B2.41 -..B2.39: - cmpl $0, 8(%rsp) - jne ..B2.41 -..B2.40: - lea 88(%rsp), %r14 - pxor %xmm1, %xmm1 - lea 104(%rsp), %rbx - movsd %xmm1, -72(%rbx) - jmp ..B2.29 -..B2.41: - lea 64+_CONSTANTS(%rip), %r14 - lea 48+_CONSTANTS(%rip), %r8 - movsd .L_2il0floatpacket.7(%rip), %xmm5 - lea 56+_CONSTANTS(%rip), %r10 - movaps %xmm5, %xmm2 - lea 80(%rsp), %rsi - lea 96(%rsp), %rdx - mulsd (%r14), %xmm11 - lea 88(%rsp), %r14 - movsd %xmm11, -88(%rdx) - lea 32(%rsp), %rcx - movzwl -82(%rdx), %eax - movl %eax, %ebx - andl $-32753, %eax - andl $32752, %ebx - orl $-49168, %eax - movw %ax, -82(%rdx) - movsd -88(%rdx), %xmm1 - mulsd %xmm1, %xmm2 - movaps %xmm2, %xmm0 - shrl $4, %ebx - subsd %xmm1, %xmm0 - movq (%r8), %r9 - lea -2447(%rbx,%rbx), %edi - movq (%r10), %r11 - lea 104(%rsp), %rbx - movq %r9, (%rdx) - subsd %xmm0, %xmm2 - movaps %xmm2, %xmm6 - subsd %xmm2, %xmm1 - mulsd %xmm2, %xmm6 - mulsd %xmm1, %xmm2 - mulsd %xmm6, %xmm5 - mulsd .L_2il0floatpacket.9(%rip), %xmm2 - movaps %xmm5, %xmm3 - movaps %xmm1, %xmm4 - mulsd %xmm1, %xmm4 - subsd %xmm6, %xmm3 - movq %r11, (%rbx) - subsd %xmm3, %xmm5 - addsd %xmm2, %xmm4 - subsd %xmm5, %xmm6 - movsd %xmm5, -16(%rdx) - addsd %xmm4, %xmm6 - movsd %xmm6, (%r14) -..___tag_value_clog10.36: - call __libm_mul_k64@PLT -..___tag_value_clog10.37: -..B2.42: - movsd 16(%rsp), %xmm0 - pxor %xmm1, %xmm1 - jmp ..B2.29 -..B2.43: - call __stack_chk_fail@PLT -..B2.44: - testl $1048575, 28(%rsp) - jne ..B2.46 -..B2.45: - cmpl $0, 24(%rsp) - je ..B2.28 -..B2.46: - cmpl $2047, %edx - jne ..B2.57 -..B2.48: - testl $1048575, 20(%rsp) - jne ..B2.57 -..B2.49: - cmpl $0, 16(%rsp) - jne ..B2.57 -..B2.50: - movsd 16(%rsp), %xmm0 - lea 24(%rsp), %r15 - movaps %xmm0, %xmm1 - lea 88(%rsp), %r14 - mulsd %xmm0, %xmm1 - lea 104(%rsp), %rbx - movsd %xmm1, -72(%rbx) - pxor %xmm1, %xmm1 - jmp ..B2.29 -..B2.51: - testl $1048575, 20(%rsp) - jne ..B2.53 -..B2.52: - cmpl $0, 16(%rsp) - je ..B2.27 -..B2.53: - cmpl $2047, %eax - je ..B2.55 -..B2.54: - movsd 16(%rsp), %xmm0 - lea 24(%rsp), %r15 - movsd (%r15), %xmm1 - lea 88(%rsp), %r14 - mulsd %xmm0, %xmm1 - lea 104(%rsp), %rbx - movsd %xmm1, -72(%rbx) - pxor %xmm1, %xmm1 - jmp ..B2.29 -..B2.55: - testl $1048575, 28(%rsp) - jne ..B2.54 -..B2.56: - cmpl $0, 24(%rsp) - jne ..B2.54 -..B2.57: - lea 24(%rsp), %r15 - movsd (%r15), %xmm0 - lea 88(%rsp), %r14 - mulsd %xmm0, %xmm0 - pxor %xmm1, %xmm1 - movsd %xmm0, -56(%r14) - lea 104(%rsp), %rbx - movsd -88(%rbx), %xmm0 - jmp ..B2.29 -..B2.62: - cmpl $2047, %edx - je ..B2.51 - jmp ..B2.27 - .align 16,0x90 - .cfi_endproc - .type clog10,@function - .size clog10,.-clog10 - .data -# -- End clog10 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.10: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,16 - .align 16 -_CONSTANTS: - .long 0 - .long 1065353216 - .long 1818952144 - .long 1072073202 - .long 133565931 - .long 1072697336 - .long 0 - .long 592445440 - .long 0 - .long 2146435072 - .long 0 - .long 1048576 - .long 402653184 - .long 1071369083 - .long 2389363364 - .long 3190212823 - .long 0 - .long 1282408448 - .long 1342177280 - .long 1070810131 - .long 3730980389 - .long 1040445247 - .type _CONSTANTS,@object - .size _CONSTANTS,88 - .space 8, 0x00 # pad - .align 16 -_Q1: - .long 0 - .long 3219128320 - .long 1431655765 - .long 1070945621 - .long 193 - .long 3218079744 - .long 2576980913 - .long 1070176665 - .long 1408920289 - .long 3217380693 - .long 2428535925 - .long 1069697316 - .long 1830244366 - .long 3217031283 - .long 3038314627 - .long 1069314732 - .type _Q1,@object - .size _Q1,64 - .align 8 -.L_2il0floatpacket.6: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x02000000,0x41a00000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog10l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog10l.S deleted file mode 100644 index 0b9d3a6fe5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clog10l.S +++ /dev/null @@ -1,1000 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clog10l.c" - .text -..TXTST0: -# -- Begin clog10l - .text - .align 16,0x90 - .globl clog10l -clog10l: -# parameter 1: 352 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_clog10l.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - subq $312, %rsp - .cfi_def_cfa_offset 352 - xorb %r12b, %r12b - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 304(%rsp) - fstpt 272(%rsp) - fldt 272(%rsp) - fstpt 288(%rsp) -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movzwl 82(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.5: - fldcw 80(%rsp) -..B1.6: - movb $1, %r12b -..B1.7: - movzwl 360(%rsp), %edx - andl $32767, %edx - movzwl 376(%rsp), %eax - andl $32767, %eax - cmpl $32767, %edx - jge ..B1.46 -..B1.8: - cmpl $32767, %eax - jge ..B1.82 -..B1.9: - testl %edx, %edx - jne ..B1.15 -..B1.10: - cmpl $0, 356(%rsp) - jne ..B1.15 -..B1.11: - cmpl $0, 352(%rsp) - jne ..B1.15 -..B1.12: - testl %eax, %eax - jne ..B1.15 -..B1.13: - cmpl $0, 372(%rsp) - jne ..B1.15 -..B1.14: - cmpl $0, 368(%rsp) - je ..B1.45 -..B1.15: - fldt 352(%rsp) - lea 368(%rsp), %rbx - fld %st(0) - fabs - fstpt 16(%rsp) - fldt 16(%rsp) - fldt (%rbx) - fld %st(0) - fabs - fstpt (%rsp) - fldt (%rsp) - movzwl 24(%rsp), %eax - movzwl 8(%rsp), %edx - andl $32767, %eax - andl $32767, %edx - cmpl %edx, %eax - jl ..B1.20 -..B1.16: - jne ..B1.21 -..B1.17: - movl 20(%rsp), %edx - movl 4(%rsp), %ecx - cmpl %ecx, %edx - jb ..B1.20 -..B1.18: - jne ..B1.21 -..B1.19: - movl 16(%rsp), %edx - cmpl (%rsp), %edx - jae ..B1.21 -..B1.20: - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 24(%rsp), %eax - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - andl $32767, %eax -..B1.21: - cmpl $16382, %eax - jg ..B1.26 -..B1.22: - jne ..B1.42 -..B1.23: - lea 16+_CONSTANTS(%rip), %rcx - movl 20(%rsp), %edx - cmpl 4(%rcx), %edx - ja ..B1.26 -..B1.24: - jne ..B1.42 -..B1.25: - movl (%rcx), %edx - cmpl 16(%rsp), %edx - ja ..B1.42 -..B1.26: - cmpl $16383, %eax - jl ..B1.31 -..B1.27: - jne ..B1.42 -..B1.28: - lea 32+_CONSTANTS(%rip), %rcx - movl 20(%rsp), %edx - cmpl 4(%rcx), %edx - jb ..B1.31 -..B1.29: - jne ..B1.42 -..B1.30: - movl 16(%rsp), %edx - cmpl (%rcx), %edx - ja ..B1.42 -..B1.31: - movzwl 8(%rsp), %esi - andl $32767, %esi - cmpl $8256, %esi - jg ..B1.36 -..B1.32: - jne ..B1.37 -..B1.33: - lea 48+_CONSTANTS(%rip), %rcx - movl 4(%rsp), %edx - cmpl 4(%rcx), %edx - ja ..B1.36 -..B1.34: - jne ..B1.37 -..B1.35: - movl (%rsp), %edx - cmpl (%rcx), %edx - jbe ..B1.37 -..B1.36: - fld %st(2) - lea _CONSTANTS(%rip), %rdx - fmul %st(3), %st - fld %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fldt .L_2il0floatpacket.10(%rip) - fsubr %st, %st(1) - fxch %st(1) - fabs - fldt (%rdx) - fcomip %st(1), %st - fstp %st(0) - ja ..B1.38 - jmp ..B1.83 -..B1.37: - fldt .L_2il0floatpacket.10(%rip) - fld %st(3) - fmul %st(4), %st - lea _CONSTANTS(%rip), %rdx - fsub %st(1), %st - fabs - fldt (%rdx) - fcomip %st(1), %st - fstp %st(0) - jbe ..B1.83 -..B1.38: - fstp %st(2) - cmpl $16183, %esi - jl ..B1.40 -..B1.39: - fldt .L_2il0floatpacket.9(%rip) - fld %st(3) - fmul %st(1), %st - lea 16+_Q1(%rip), %rax - fxch %st(5) - fstpt (%rsp) - fld %st(3) - lea _Q1(%rip), %rdx - fsubr %st(5), %st - lea 96+_CONSTANTS(%rip), %r15 - fsubrp %st, %st(5) - fld %st(4) - lea 112+_CONSTANTS(%rip), %r13 - fmul %st(5), %st - fld %st(2) - fmulp %st, %st(2) - fxch %st(4) - fsub %st(5), %st - fld %st(2) - fsubr %st(2), %st - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.13(%rip) - fmul %st, %st(1) - fxch %st(1) - fmul %st(4), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(4) - fmul %st(0), %st - fstpt 48(%rsp) - fld %st(5) - fadd %st(3), %st - fsub %st, %st(6) - fxch %st(6) - fsubrp %st, %st(3) - fmulp %st, %st(6) - fmul %st, %st(5) - fxch %st(3) - fsubrp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fld %st(0) - fsub %st(5), %st - fsubr %st, %st(2) - fld %st(1) - fsubp %st, %st(1) - fsubrp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fadd %st(5), %st - fld %st(0) - faddp %st, %st(3) - fld %st(2) - fxch %st(4) - fmul %st(0), %st - fstpt 16(%rsp) - fldt 16(%rsp) - faddp %st, %st(4) - fxch %st(3) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - faddp %st, %st(1) - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fld %st(1) - fmul %st(2), %st - fmulp %st, %st(1) - fld %st(4) - fsub %st(6), %st - fsubr %st, %st(7) - fsubr %st(5), %st - fsubrp %st, %st(6) - fxch %st(5) - faddp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) - fld %st(1) - fsub %st(3), %st - fldt 32(%rsp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(3), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fld %st(3) - fldt 64(%rsp) - fld %st(0) - fsub %st(3), %st - fldt 16(%rsp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(2), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(4) - fsub %st(2), %st - fldt 48(%rsp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(6), %st - fsubrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt .L_2il0floatpacket.9(%rip) - fld %st(0) - fmul %st(4), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt (%r15) - fld %st(0) - fmul %st(3), %st - fldt (%r13) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt .L_2il0floatpacket.11(%rip) - fmulp %st, %st(2) - fxch %st(1) - fstpt 272(%rsp) - fldt (%rsp) - jmp ..B1.49 -..B1.40: - cmpl $16383, %eax - je ..B1.56 -..B1.41: - fstp %st(0) - fldt .L_2il0floatpacket.9(%rip) - fld %st(2) - fmul %st(1), %st - fld %st(3) - lea 16+_Q1(%rip), %rax - fsubr %st(1), %st - lea _Q1(%rip), %rdx - fsubrp %st, %st(1) - fld %st(0) - lea 96+_CONSTANTS(%rip), %r15 - lea 112+_CONSTANTS(%rip), %r13 - fmul %st(1), %st - fsubp %st, %st(3) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.13(%rip) - fmulp %st, %st(1) - fmul %st(3), %st - fld %st(0) - fld %st(3) - fxch %st(5) - fmul %st(0), %st - fadd %st, %st(1) - fxch %st(1) - fadd %st, %st(5) - fxch %st(4) - fsubr %st(5), %st - fxch %st(2) - fsubr %st(4), %st - fsubrp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - faddp %st, %st(2) - fld %st(2) - fmul %st(3), %st - fldt (%rax) - fmul %st(4), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(0) - fmul %st(3), %st - fld %st(3) - fsubr %st(1), %st - fsubrp %st, %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt (%r15) - fld %st(0) - fmul %st(3), %st - fldt (%r13) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt .L_2il0floatpacket.11(%rip) - fmulp %st, %st(2) - fxch %st(1) - fstpt 272(%rsp) - fxch %st(1) - jmp ..B1.49 -..B1.42: - fstp %st(0) - fstp %st(1) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - lea 64(%rsp), %rdi - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_clog10l.13: - call __libm_hypot2l_k80@PLT -..___tag_value_clog10l.14: -..B1.78: - addq $32, %rsp - .cfi_def_cfa_offset 352 -..B1.43: - fldt .L_2il0floatpacket.11(%rip) - lea 160+_CONSTANTS(%rip), %rax - lea 176+_CONSTANTS(%rip), %rdx - fmulp %st, %st(1) - fldt (%rax) - fmul %st(1), %st - fstpt 16(%rsp) - fldt (%rdx) - fmulp %st, %st(1) - fstpt (%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fldt 64(%rsp) - lea 128(%rsp), %rdi - fstpt (%rsp) - fldt -48(%rdi) - fstpt 16(%rsp) -..___tag_value_clog10l.17: - call __libm_logl_k80@PLT -..___tag_value_clog10l.18: -..B1.79: - addq $32, %rsp - .cfi_def_cfa_offset 352 -..B1.44: - fldt .L_2il0floatpacket.11(%rip) - lea 96+_CONSTANTS(%rip), %r15 - fldt 96(%rsp) - lea 112+_CONSTANTS(%rip), %r13 - fxch %st(2) - fmulp %st, %st(1) - fmul %st, %st(1) - fldt 112(%rsp) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.9(%rip) - fld %st(0) - fmul %st(3), %st - fld %st(0) - fsub %st(4), %st - fsubrp %st, %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt (%r15) - fld %st(0) - fmul %st(3), %st - fldt (%r13) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 16(%rsp) - fld %st(0) - fadd %st(4), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fldt (%rsp) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 272(%rsp) - fldt 352(%rsp) - jmp ..B1.49 -..B1.45: - fldt .L_2il0floatpacket.9(%rip) - lea 368(%rsp), %rbx - movsd .L_2il0floatpacket.12(%rip), %xmm1 - pxor %xmm0, %xmm0 - divsd %xmm0, %xmm1 - movsd %xmm1, (%rsp) - lea 96+_CONSTANTS(%rip), %r15 - fldl (%rsp) - lea 112+_CONSTANTS(%rip), %r13 - fstpt 272(%rsp) - fldt -16(%rbx) - jmp ..B1.49 -..B1.46: - je ..B1.70 -..B1.47: - cmpl $32767, %eax - je ..B1.64 -..B1.48: - fldt .L_2il0floatpacket.9(%rip) - lea 368(%rsp), %rbx - lea 64+_CONSTANTS(%rip), %rax - lea 96+_CONSTANTS(%rip), %r15 - lea 112+_CONSTANTS(%rip), %r13 - fldt (%rax) - fmul %st(0), %st - fstpt 272(%rsp) - fldt -16(%rbx) -..B1.49: - fldt .L_2il0floatpacket.8(%rip) - lea 224(%rsp), %rdi - xorl %eax, %eax - lea 176(%rsp), %rsi - movl %eax, -16(%rsi) - lea 128(%rsp), %rdx - fstpt 16(%rdx) - fldt 16(%rdx) - fxch %st(1) - fstpt (%rdx) - movl %eax, 80(%rdx) - fstpt 64(%rdx) - fstpt -112(%rdx) - fldt (%rbx) - fstpt 48(%rdx) -..___tag_value_clog10l.20: - call __libm_atan2l_k80@PLT -..___tag_value_clog10l.21: -..B1.50: - fldt 16(%rsp) - fldt 224(%rsp) - fmul %st, %st(1) - fld %st(0) - movl 256(%rsp), %edi - fsubr %st(2), %st - fsubrp %st, %st(2) - fsub %st(1), %st - fldt 240(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - faddp %st, %st(1) - fldt (%r15) - fld %st(0) - fmul %st(3), %st - fstpt (%rsp) - fldt (%r13) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsp) -..___tag_value_clog10l.23: - call __libm_scalbl_k80@PLT -..___tag_value_clog10l.24: -..B1.80: - addq $32, %rsp - .cfi_def_cfa_offset 352 -..B1.51: - fstpt 288(%rsp) - testb %r12b, %r12b - je ..B1.53 -..B1.52: - fldcw 82(%rsp) -..B1.53: - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.63 -..B1.54: - fldt 272(%rsp) - fldt 288(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.62 -..B1.55: - addq $312, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 352 - .cfi_offset 3, -40 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 15, -32 -..B1.56: - cmpl $-2147483648, 20(%rsp) - jne ..B1.41 -..B1.57: - cmpl $0, 16(%rsp) - jne ..B1.41 -..B1.58: - fstp %st(2) - fstp %st(0) - cmpq $0, (%rsp) - jne ..B1.60 -..B1.59: - fstp %st(0) - fldt .L_2il0floatpacket.8(%rip) - lea 96+_CONSTANTS(%rip), %r15 - fstpt 272(%rsp) - lea 112+_CONSTANTS(%rip), %r13 - fldt .L_2il0floatpacket.9(%rip) - fxch %st(1) - jmp ..B1.49 -..B1.60: - fstp %st(1) - fldt .L_2il0floatpacket.13(%rip) - lea 144+_CONSTANTS(%rip), %r13 - fldt (%r13) - lea 112+_CONSTANTS(%rip), %r13 - fmulp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt .L_2il0floatpacket.9(%rip) - movzwl 8(%rsp), %eax - movl %eax, %r15d - andl $-32768, %eax - fld %st(0) - orl $-49153, %eax - fld %st(1) - movw %ax, 8(%rsp) - andl $32767, %r15d - fldt (%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fmul %st, %st(2) - fld %st(0) - fsubr %st(3), %st - fsubrp %st, %st(3) - fld %st(2) - lea -33167(%r15,%r15), %edi - fmul %st(3), %st - lea 96+_CONSTANTS(%rip), %r15 - fmul %st, %st(2) - fld %st(2) - fsub %st(1), %st - fsubrp %st, %st(3) - fsub %st(2), %st - fxch %st(1) - fsub %st(3), %st - fmul %st, %st(3) - fxch %st(5) - fmulp %st, %st(3) - fld %st(4) - fmulp %st, %st(5) - fxch %st(2) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fldt (%r15) - fld %st(0) - fmul %st(4), %st - fstpt (%rsp) - fldt (%r13) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 48(%rsp) -..___tag_value_clog10l.41: - call __libm_scalbl_k80@PLT -..___tag_value_clog10l.42: -..B1.81: - fldt 48(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 352 -..B1.61: - fxch %st(1) - fstpt 272(%rsp) - fldt 352(%rsp) - jmp ..B1.49 -..B1.62: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.63: - call __stack_chk_fail@PLT -..B1.64: - cmpl $-2147483648, 372(%rsp) - jne ..B1.66 -..B1.65: - cmpl $0, 368(%rsp) - je ..B1.48 -..B1.66: - cmpl $32767, %edx - je ..B1.68 -..B1.67: - fldt .L_2il0floatpacket.9(%rip) - lea 368(%rsp), %rbx - fldt (%rbx) - lea 96+_CONSTANTS(%rip), %r15 - fmul %st(0), %st - lea 112+_CONSTANTS(%rip), %r13 - fstpt 272(%rsp) - fldt -16(%rbx) - jmp ..B1.49 -..B1.68: - movq $0x8000000000000000, %rax - cmpq 352(%rsp), %rax - jne ..B1.67 -..B1.69: - fldt 352(%rsp) - lea 368(%rsp), %rbx - fld %st(0) - lea 96+_CONSTANTS(%rip), %r15 - fmul %st(1), %st - lea 112+_CONSTANTS(%rip), %r13 - fstpt 272(%rsp) - fldt .L_2il0floatpacket.9(%rip) - fxch %st(1) - jmp ..B1.49 -..B1.70: - cmpl $-2147483648, 356(%rsp) - jne ..B1.72 -..B1.71: - cmpl $0, 352(%rsp) - je ..B1.47 -..B1.72: - cmpl $32767, %eax - je ..B1.74 -..B1.73: - fldt 352(%rsp) - lea 368(%rsp), %rbx - fldt (%rbx) - lea 96+_CONSTANTS(%rip), %r15 - fmul %st(1), %st - lea 112+_CONSTANTS(%rip), %r13 - fstpt 272(%rsp) - fldt .L_2il0floatpacket.9(%rip) - fxch %st(1) - jmp ..B1.49 -..B1.74: - movq $0x8000000000000000, %rax - cmpq 368(%rsp), %rax - jne ..B1.73 -..B1.75: - fldt .L_2il0floatpacket.9(%rip) - lea 368(%rsp), %rbx - fldt (%rbx) - lea 96+_CONSTANTS(%rip), %r15 - fmul %st(0), %st - lea 112+_CONSTANTS(%rip), %r13 - fstpt 272(%rsp) - fldt -16(%rbx) - jmp ..B1.49 -..B1.82: - cmpl $32767, %edx - je ..B1.70 - jmp ..B1.47 -..B1.83: - fstp %st(0) - jmp ..B1.42 - .align 16,0x90 - .cfi_endproc - .type clog10l,@function - .size clog10l,.-clog10l - .data -# -- End clog10l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,16 - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,16 - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,16 - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,16 - .align 8 -.L_2il0floatpacket.12: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 37342 - .word 47265 - .word 62214 - .word 46340 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 64512 - .word 65535 - .word 31 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8256 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55465 - .word 56923 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 43711 - .word 54638 - .word 50772 - .word 56481 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16583 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39557 - .word 39456 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 51839 - .word 3796 - .word 3310 - .word 34305 - .word 49112 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,192 - .align 2 -_Q1: - .word 3134 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 49331 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clogf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clogf.S deleted file mode 100644 index 70d2a0e0c4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clogf.S +++ /dev/null @@ -1,2614 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clogf.c" - .text -..TXTST0: -# -- Begin clogf - .text - .align 16,0x90 - .globl clogf -clogf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_clogf.1: -..L2: - -..B1.2: - movq %rsp, %rax - subq $168, %rsp - .cfi_def_cfa_offset 176 - movq %rax, 72(%rsp) - movss %xmm0, 48(%rsp) - pshufd $1, %xmm0, %xmm1 - movss %xmm1, 56(%rsp) - movq %rbx, 80(%rsp) - lea clogf_table(%rip), %r8 - movl 56(%rsp), %edx - movl 48(%rsp), %ecx - movl $-2147483648, %eax - andl %edx, %eax - andl $2139095040, %edx - subl $8388608, %edx - cvtss2sd 56(%rsp), %xmm0 - cvtss2sd 48(%rsp), %xmm1 - cmpl $2130706432, %edx - jae .L_2TAG_PACKET_0.0.1 - movl %ecx, %edx - andl $-2147483648, %ecx - andl $2139095040, %edx - subl $8388608, %edx - movsd %xmm0, 40(%rsp) - movsd %xmm1, 32(%rsp) - cmpl $2130706432, %edx - jae .L_2TAG_PACKET_1.0.1 - movapd %xmm0, %xmm3 - divsd %xmm1, %xmm0 - movsd 6656(%r8), %xmm2 - mulsd %xmm1, %xmm1 - mulsd %xmm3, %xmm3 - addsd %xmm3, %xmm1 - movsd %xmm1, 16(%rsp) - andpd %xmm1, %xmm2 - pextrw $3, %xmm1, %edx - subsd 6784(%r8), %xmm1 - andpd 6672(%r8), %xmm1 - cmpltsd 6576(%r8), %xmm1 - movmskpd %xmm1, %ebx - orpd 6784(%r8), %xmm2 - andpd 6672(%r8), %xmm0 - testl $1, %ebx - jne .L_2TAG_PACKET_2.0.1 -.L_2TAG_PACKET_3.0.1: - xorl %ecx, %eax - movl 20(%rsp), %ebx - sarl $4, %edx - andq $1044480, %rbx - movsd 6800(%r8), %xmm3 - xorpd %xmm4, %xmm4 - subl $1023, %edx - xorpd %xmm7, %xmm7 - sarl $31, %ecx - movl %edx, (%rsp) - movd %ecx, %xmm6 - pshufd $0, %xmm6, %xmm6 - andpd 6832(%r8), %xmm6 - andpd %xmm0, %xmm3 - pextrw $3, %xmm0, %edx - shrq $9, %rbx - movsd %xmm0, %xmm1 - subl $16288, %edx - cmpl $1119, %edx - ja .L_2TAG_PACKET_4.0.1 - movl $16464, %ecx - pinsrw $3, %ecx, %xmm4 - shrl $16, %eax - orpd 6816(%r8), %xmm3 - movsd %xmm4, %xmm7 - mulsd (%r8,%rbx), %xmm2 - cmpsd $6, %xmm3, %xmm4 - movsd 6784(%r8), %xmm5 - minsd %xmm7, %xmm3 - andpd %xmm4, %xmm0 - mulsd %xmm3, %xmm1 - andpd %xmm4, %xmm5 - subsd %xmm3, %xmm0 - subsd 6784(%r8), %xmm2 - addsd %xmm5, %xmm1 - movq 6704(%r8), %xmm5 - divsd %xmm1, %xmm0 - cvtsi2sd (%rsp), %xmm1 - movl $176, %ecx - cmpl $176, %edx - cmova %ecx, %edx - addl $1, %edx - andq $-1, %rdx - movsd 6944(%r8), %xmm4 - pinsrw $3, %eax, %xmm7 - addsd 5152(%r8,%rdx,8), %xmm6 - xorpd %xmm7, %xmm6 - mulsd %xmm2, %xmm5 - addsd 6696(%r8), %xmm5 - mulsd %xmm2, %xmm5 - addsd 6688(%r8), %xmm5 - mulsd %xmm2, %xmm5 - xorpd %xmm0, %xmm7 - mulsd 6664(%r8), %xmm1 - mulsd %xmm0, %xmm0 - mulsd %xmm7, %xmm4 - addsd %xmm6, %xmm7 - mulsd %xmm4, %xmm0 - addsd 2048(%r8,%rbx), %xmm1 - addsd %xmm7, %xmm0 - addsd %xmm1, %xmm5 - mulsd 6960(%r8), %xmm5 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm5, %xmm5 - movd %xmm0, %edx - movd %xmm5, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_4.0.1: - addl $944, %edx - cmpl $2063, %edx - ja .L_2TAG_PACKET_5.0.1 - movq 6848(%r8), %xmm3 - shrl $16, %eax - movsd 6856(%r8), %xmm4 - mulsd (%r8,%rbx), %xmm2 - pinsrw $3, %eax, %xmm7 - mulsd %xmm1, %xmm1 - subsd 6784(%r8), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm3 - movsd %xmm1, %xmm5 - mulsd %xmm1, %xmm1 - addsd %xmm6, %xmm0 - cvtsi2sd (%rsp), %xmm6 - mulsd %xmm5, %xmm4 - mulsd %xmm3, %xmm1 - movq 6704(%r8), %xmm3 - mulsd %xmm2, %xmm3 - addsd 6696(%r8), %xmm3 - mulsd %xmm2, %xmm3 - mulsd 6664(%r8), %xmm6 - addsd 6688(%r8), %xmm3 - addsd 2048(%r8,%rbx), %xmm6 - mulsd %xmm2, %xmm3 - addsd %xmm4, %xmm1 - addsd %xmm6, %xmm3 - addsd %xmm1, %xmm0 - xorpd %xmm7, %xmm0 - mulsd 6960(%r8), %xmm3 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm3, %xmm3 - movd %xmm0, %edx - movd %xmm3, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_5.0.1: - addl $15344, %edx - cmpl $17392, %edx - mulsd (%r8,%rbx), %xmm2 - subsd 6784(%r8), %xmm2 - jae .L_2TAG_PACKET_6.0.1 - shrl $16, %eax - pinsrw $3, %eax, %xmm7 - addsd %xmm6, %xmm0 - cvtsi2sd (%rsp), %xmm6 - movq 6704(%r8), %xmm3 - mulsd %xmm2, %xmm3 - pextrw $3, %xmm0, %edx - addsd 6696(%r8), %xmm3 - xorpd %xmm7, %xmm0 - andl $32752, %edx - mulsd %xmm2, %xmm3 - mulsd 6664(%r8), %xmm6 - addsd 6688(%r8), %xmm3 - movl $1065353217, %eax - movl $8388608, %ecx - addsd 2048(%r8,%rbx), %xmm6 - mulsd %xmm2, %xmm3 - cmpl $14352, %edx - cmovb %ecx, %eax - movd %eax, %xmm1 - addsd %xmm6, %xmm3 - mulss %xmm1, %xmm1 - mulsd 6960(%r8), %xmm3 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm3, %xmm3 - movd %xmm0, %edx - movd %xmm3, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_6.0.1: - movss 6912(%r8), %xmm4 - movss 6916(%r8), %xmm1 - cvtsi2sd (%rsp), %xmm6 - shrl $16, %eax - andl $32768, %ecx - movq 6704(%r8), %xmm3 - mulsd %xmm2, %xmm3 - addsd 6696(%r8), %xmm3 - xorl %ecx, %eax - mulsd %xmm2, %xmm3 - xorps %xmm0, %xmm0 - mulsd 6664(%r8), %xmm6 - addsd 6688(%r8), %xmm3 - pinsrw $1, %eax, %xmm0 - addsd 2048(%r8,%rbx), %xmm6 - mulsd %xmm2, %xmm3 - orps %xmm0, %xmm4 - addsd %xmm6, %xmm3 - orps %xmm1, %xmm0 - mulsd 6960(%r8), %xmm3 - cvtsd2ss %xmm3, %xmm3 - addss %xmm4, %xmm0 - movd %xmm0, %edx - movd %xmm3, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_2.0.1: - movsd 32(%rsp), %xmm5 - mulsd %xmm5, %xmm5 - movq 16(%rsp), %xmm1 - movq 16(%rsp), %xmm6 - movq 16(%rsp), %xmm2 - subsd %xmm5, %xmm1 - subsd %xmm1, %xmm6 - subsd %xmm1, %xmm3 - subsd %xmm6, %xmm5 - addsd %xmm3, %xmm5 - xorl %ecx, %eax - movsd 6800(%r8), %xmm3 - xorpd %xmm4, %xmm4 - xorpd %xmm7, %xmm7 - sarl $31, %ecx - movd %ecx, %xmm6 - pshufd $0, %xmm6, %xmm6 - andpd 6832(%r8), %xmm6 - subsd 6784(%r8), %xmm2 - andpd %xmm0, %xmm3 - pextrw $3, %xmm0, %edx - movsd %xmm0, %xmm1 - addsd %xmm5, %xmm2 - subl $16288, %edx - cmpl $1119, %edx - ja .L_2TAG_PACKET_7.0.1 - movl $16464, %ecx - pinsrw $3, %ecx, %xmm4 - shrl $16, %eax - orpd 6816(%r8), %xmm3 - movsd %xmm4, %xmm7 - cmpsd $6, %xmm3, %xmm4 - movsd 6784(%r8), %xmm5 - minsd %xmm7, %xmm3 - andpd %xmm4, %xmm0 - mulsd %xmm3, %xmm1 - andpd %xmm4, %xmm5 - subsd %xmm3, %xmm0 - movq 6752(%r8), %xmm3 - addsd %xmm5, %xmm1 - divsd %xmm1, %xmm0 - mulsd %xmm2, %xmm3 - movl $176, %ecx - cmpl $176, %edx - cmova %ecx, %edx - addl $1, %edx - andl $-1, %edx - movsd 6944(%r8), %xmm4 - addsd 6744(%r8), %xmm3 - pinsrw $3, %eax, %xmm7 - addsd 5152(%r8,%rdx,8), %xmm6 - mulsd %xmm2, %xmm3 - xorpd %xmm7, %xmm6 - addsd 6736(%r8), %xmm3 - xorpd %xmm0, %xmm7 - mulsd %xmm2, %xmm3 - mulsd %xmm0, %xmm0 - addsd 6728(%r8), %xmm3 - mulsd %xmm7, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm6, %xmm7 - addsd 6720(%r8), %xmm3 - mulsd %xmm4, %xmm0 - mulsd %xmm2, %xmm3 - addsd %xmm7, %xmm0 - cvtsd2ss %xmm3, %xmm3 - cvtpd2ps %xmm0, %xmm0 - movd %xmm3, %eax - movd %xmm0, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_7.0.1: - addl $944, %edx - cmpl $2063, %edx - ja .L_2TAG_PACKET_8.0.1 - movq 6848(%r8), %xmm3 - shrl $16, %eax - movsd 6856(%r8), %xmm4 - pinsrw $3, %eax, %xmm7 - mulsd %xmm1, %xmm1 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm3 - movsd %xmm1, %xmm5 - mulsd %xmm1, %xmm1 - addsd %xmm6, %xmm0 - movq 6752(%r8), %xmm6 - mulsd %xmm2, %xmm6 - addsd 6744(%r8), %xmm6 - mulsd %xmm5, %xmm4 - mulsd %xmm2, %xmm6 - addsd 6736(%r8), %xmm6 - mulsd %xmm3, %xmm1 - mulsd %xmm2, %xmm6 - addsd 6728(%r8), %xmm6 - addsd %xmm4, %xmm1 - mulsd %xmm2, %xmm6 - addsd %xmm1, %xmm0 - addsd 6720(%r8), %xmm6 - xorpd %xmm7, %xmm0 - mulsd %xmm2, %xmm6 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm6, %xmm6 - movd %xmm0, %edx - movd %xmm6, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_8.0.1: - addl $15344, %edx - cmpl $17392, %edx - jae .L_2TAG_PACKET_9.0.1 - movq 6752(%r8), %xmm3 - mulsd %xmm2, %xmm3 - shrl $16, %eax - addsd 6744(%r8), %xmm3 - pinsrw $3, %eax, %xmm7 - mulsd %xmm2, %xmm3 - addsd %xmm6, %xmm0 - addsd 6736(%r8), %xmm3 - pextrw $3, %xmm0, %edx - mulsd %xmm2, %xmm3 - xorpd %xmm7, %xmm0 - addsd 6728(%r8), %xmm3 - andl $32752, %edx - movl $1065353217, %eax - movl $8388608, %ecx - mulsd %xmm2, %xmm3 - cmpl $14352, %edx - cmovb %ecx, %eax - movd %eax, %xmm1 - addsd 6720(%r8), %xmm3 - mulss %xmm1, %xmm1 - mulsd %xmm2, %xmm3 - cvtpd2ps %xmm0, %xmm0 - cvtsd2ss %xmm3, %xmm3 - movd %xmm0, %edx - movd %xmm3, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_9.0.1: - movss 6912(%r8), %xmm4 - movq 6752(%r8), %xmm3 - mulsd %xmm2, %xmm3 - movss 6916(%r8), %xmm1 - addsd 6744(%r8), %xmm3 - shrl $16, %eax - mulsd %xmm2, %xmm3 - andl $32768, %ecx - addsd 6736(%r8), %xmm3 - xorl %ecx, %eax - mulsd %xmm2, %xmm3 - xorps %xmm0, %xmm0 - addsd 6728(%r8), %xmm3 - pinsrw $1, %eax, %xmm0 - mulsd %xmm2, %xmm3 - orps %xmm0, %xmm4 - addsd 6720(%r8), %xmm3 - orps %xmm1, %xmm0 - mulsd %xmm2, %xmm3 - addss %xmm4, %xmm0 - cvtsd2ss %xmm3, %xmm3 - movd %xmm0, %edx - movd %xmm3, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_0.0.1: - andl $-2147483648, %ecx -.L_2TAG_PACKET_1.0.1: - movsd %xmm0, 40(%rsp) - movsd %xmm1, 32(%rsp) - movl 56(%rsp), %edx - andl $2147483647, %edx - je .L_2TAG_PACKET_10.0.1 - andl $2139095040, %edx - jne .L_2TAG_PACKET_10.0.1 - movss 56(%rsp), %xmm0 - orps 6864(%r8), %xmm0 - cvtss2sd %xmm0, %xmm0 - movsd 6896(%r8), %xmm2 - andpd %xmm0, %xmm2 - orpd 6880(%r8), %xmm2 - subsd %xmm2, %xmm0 - movsd %xmm0, 40(%rsp) -.L_2TAG_PACKET_10.0.1: - movl 48(%rsp), %edx - andl $2147483647, %edx - je .L_2TAG_PACKET_11.0.1 - andl $2139095040, %edx - jne .L_2TAG_PACKET_11.0.1 - movss 48(%rsp), %xmm1 - orps 6864(%r8), %xmm1 - cvtss2sd %xmm1, %xmm1 - movsd 6896(%r8), %xmm2 - andpd %xmm1, %xmm2 - orpd 6880(%r8), %xmm2 - subsd %xmm2, %xmm1 - movsd %xmm1, 32(%rsp) -.L_2TAG_PACKET_11.0.1: - movsd 40(%rsp), %xmm0 - movsd 32(%rsp), %xmm1 - pextrw $3, %xmm0, %edx - andl $32752, %edx - subl $16, %edx - cmpl $32736, %edx - jae .L_2TAG_PACKET_12.0.1 - pextrw $3, %xmm1, %edx - andl $32752, %edx - subl $16, %edx - cmpl $32736, %edx - jae .L_2TAG_PACKET_13.0.1 - movq %xmm0, %xmm3 - divsd %xmm1, %xmm0 - movq 6656(%r8), %xmm2 - mulsd %xmm1, %xmm1 - mulsd %xmm3, %xmm3 - addsd %xmm3, %xmm1 - movq %xmm1, 16(%rsp) - pand %xmm1, %xmm2 - pextrw $3, %xmm1, %edx - subsd 6784(%r8), %xmm1 - pand 6672(%r8), %xmm1 - cmpltsd 6576(%r8), %xmm1 - movmskpd %xmm1, %ebx - por 6784(%r8), %xmm2 - testl $1, %ebx - psllq $1, %xmm0 - psrlq $1, %xmm0 - jne .L_2TAG_PACKET_2.0.1 - jmp .L_2TAG_PACKET_3.0.1 -.L_2TAG_PACKET_12.0.1: - addl $16, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_14.0.1 - movsd %xmm0, %xmm2 - psllq $12, %xmm2 - xorpd %xmm3, %xmm3 - pcmpeqd %xmm3, %xmm2 - psrlq $16, %xmm2 - movd %xmm2, %edx - cmpl $-1, %edx - je .L_2TAG_PACKET_15.0.1 - movss 56(%rsp), %xmm0 - movl 48(%rsp), %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - mulss %xmm0, %xmm0 - jg .L_2TAG_PACKET_16.0.1 - je .L_2TAG_PACKET_17.0.1 - movd %xmm0, %edx - movd %xmm0, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_17.0.1: - movd %xmm0, %edx - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_16.0.1: - movss 48(%rsp), %xmm1 - mulss %xmm0, %xmm0 - mulss %xmm1, %xmm1 - movd %xmm0, %edx - movd %xmm1, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_14.0.1: - pextrw $3, %xmm1, %edx - andl $32752, %edx - cmpl $32752, %edx - jne .L_2TAG_PACKET_18.0.1 - movsd %xmm1, %xmm2 - psllq $12, %xmm2 - xorpd %xmm3, %xmm3 - pcmpeqd %xmm3, %xmm2 - psrlq $16, %xmm2 - movd %xmm2, %edx - cmpl $-1, %edx - jne .L_2TAG_PACKET_19.0.1 -.L_2TAG_PACKET_18.0.1: - cmpl $0, %ecx - jne .L_2TAG_PACKET_20.0.1 - movl %eax, %edx - movl 48(%rsp), %eax - cmpl $0, %eax - je .L_2TAG_PACKET_21.0.1 - cmpl $2139095040, %eax - je .L_2TAG_PACKET_22.0.1 - movl 48(%rsp), %eax - movl %edx, 8(%rsp) - andl $2147483647, %eax - movl %eax, 4(%rsp) - jmp .L_2TAG_PACKET_23.0.1 -.L_2TAG_PACKET_20.0.1: - movss 6920(%r8), %xmm2 - movss 6924(%r8), %xmm3 - addss %xmm3, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl 48(%rsp), %eax - cmpl $-2147483648, %eax - je .L_2TAG_PACKET_21.0.1 - cmpl $-8388608, %eax - je .L_2TAG_PACKET_22.0.1 - movl 48(%rsp), %eax - movl %edx, 8(%rsp) - andl $2147483647, %eax - movl %eax, 4(%rsp) - jmp .L_2TAG_PACKET_23.0.1 -.L_2TAG_PACKET_21.0.1: - pxor %xmm1, %xmm1 - movss 6648(%r8), %xmm0 - divss %xmm1, %xmm0 - movl $-8388608, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_22.0.1: - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_15.0.1: - pextrw $3, %xmm1, %edx - andl $32752, %edx - cmpl $32752, %edx - je .L_2TAG_PACKET_24.0.1 - movss 6912(%r8), %xmm2 - movss 6916(%r8), %xmm3 - addss %xmm3, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_24.0.1: - movsd %xmm1, %xmm2 - psllq $12, %xmm2 - xorpd %xmm3, %xmm3 - pcmpeqd %xmm3, %xmm2 - psrlq $16, %xmm2 - movd %xmm2, %edx - cmpl $-1, %edx - jne .L_2TAG_PACKET_25.0.1 - cmpl $0, %ecx - je .L_2TAG_PACKET_26.0.1 - movss 6912(%r8), %xmm2 - movss 6916(%r8), %xmm3 - movss 6928(%r8), %xmm4 - movss 6932(%r8), %xmm5 - addss %xmm3, %xmm2 - addss %xmm5, %xmm4 - addss %xmm4, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_26.0.1: - movss 6928(%r8), %xmm4 - movss 6932(%r8), %xmm5 - addss %xmm5, %xmm4 - movd %xmm4, %edx - orl %eax, %edx - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_13.0.1: - addl $16, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_27.0.1 - movsd %xmm1, %xmm2 - psllq $12, %xmm2 - xorps %xmm3, %xmm3 - pcmpeqd %xmm3, %xmm2 - psrlq $16, %xmm2 - movd %xmm2, %edx - cmpl $-1, %edx - jne .L_2TAG_PACKET_19.0.1 - cmpl $0, %ecx - jne .L_2TAG_PACKET_28.0.1 - movl %eax, %edx - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_28.0.1: - movss 6920(%r8), %xmm2 - movss 6924(%r8), %xmm3 - addss %xmm3, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_27.0.1: - movss 6912(%r8), %xmm2 - movss 6916(%r8), %xmm3 - addss %xmm3, %xmm2 - movd %xmm2, %edx - orl %eax, %edx - movl 56(%rsp), %eax - movl %edx, 8(%rsp) - andl $2147483647, %eax - movl %eax, 4(%rsp) - jmp .L_2TAG_PACKET_23.0.1 -.L_2TAG_PACKET_19.0.1: - addsd %xmm1, %xmm1 - cvtpd2ps %xmm1, %xmm0 - movd %xmm0, %edx - movl %edx, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_25.0.1: - addsd %xmm1, %xmm1 - cvtpd2ps %xmm1, %xmm0 - movd %xmm0, %edx - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_23.0.1: - movss 4(%rsp), %xmm0 - movsd 6624(%r8), %xmm1 - movsd 6632(%r8), %xmm3 - pextrw $1, %xmm0, %eax - movaps %xmm0, %xmm4 - psllq $29, %xmm0 - andpd %xmm0, %xmm1 - orpd %xmm3, %xmm1 - movsd 6592(%r8), %xmm5 - movsd 6600(%r8), %xmm6 - movsd 6608(%r8), %xmm2 - movl %eax, %edx - movl $32639, %ecx - subl %edx, %ecx - subl $128, %edx - orl %ecx, %edx - cmpl $32768, %edx - jae .L_2TAG_PACKET_29.0.1 - movl $16191, %ecx -.L_2TAG_PACKET_30.0.1: - movd %ecx, %xmm0 - movsd 4624(%r8), %xmm3 - andl $127, %eax - addl $1, %eax - andq $254, %rax - addq %rax, %rax - addq %rax, %rax - movsd 4624(%r8,%rax), %xmm7 - psrlq $16, %xmm4 - psubd %xmm0, %xmm4 - psrad $7, %xmm4 - cvtdq2pd %xmm4, %xmm4 - movsd 4096(%r8,%rax), %xmm0 - mulsd %xmm7, %xmm1 - subsd %xmm3, %xmm1 - movsd %xmm1, %xmm7 - mulsd %xmm1, %xmm5 - movsd %xmm1, %xmm3 - mulsd %xmm1, %xmm1 - addsd %xmm6, %xmm5 - mulsd 6664(%r8), %xmm4 - mulsd %xmm1, %xmm7 - mulsd %xmm1, %xmm2 - addsd %xmm3, %xmm2 - mulsd %xmm5, %xmm7 - addsd %xmm4, %xmm0 - addsd %xmm7, %xmm2 - addsd %xmm2, %xmm0 - cvtpd2ps %xmm0, %xmm0 - movd %xmm0, %eax - movl 8(%rsp), %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 80(%rsp), %rbx - movq 72(%rsp), %rsp - ret -.L_2TAG_PACKET_29.0.1: - movl 4(%rsp), %edx - mulss 6640(%r8), %xmm4 - movsd 6624(%r8), %xmm1 - pextrw $1, %xmm4, %eax - cvtps2pd %xmm4, %xmm0 - andpd %xmm0, %xmm1 - orpd %xmm3, %xmm1 - movl $24383, %ecx - jmp .L_2TAG_PACKET_30.0.1 - .cfi_def_cfa_offset 8 -..B1.3: - .align 16,0x90 - .cfi_endproc - .type clogf,@function - .size clogf,.-clogf - .data -# -- End clogf - .section .rodata, "a" - .align 16 - .align 16 -clogf_table: - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .long 1440057502 - .long 1063257089 - .long 341338964 - .long 1064833554 - .long 4184355568 - .long 1065621801 - .long 2227658503 - .long 1066152307 - .long 449262470 - .long 1066510009 - .long 1570422842 - .long 1066777242 - .long 121841140 - .long 1067045544 - .long 630691842 - .long 1067281191 - .long 2711485097 - .long 1067500943 - .long 2026622491 - .long 1067619660 - .long 766078039 - .long 1067755853 - .long 4074027864 - .long 1067875476 - .long 3056660584 - .long 1067995528 - .long 3195252556 - .long 1068133258 - .long 116861598 - .long 1068254238 - .long 325086471 - .long 1068375655 - .long 296456961 - .long 1068497513 - .long 2623383041 - .long 1068559379 - .long 1681725707 - .long 1068620754 - .long 2231263004 - .long 1068682354 - .long 2815553124 - .long 1068744181 - .long 2057310944 - .long 1068806237 - .long 2095798018 - .long 1068859611 - .long 2302040698 - .long 1068922096 - .long 745232013 - .long 1068984815 - .long 659581512 - .long 1069047769 - .long 1566132617 - .long 1069101918 - .long 550036981 - .long 1069165314 - .long 2887419564 - .long 1069219844 - .long 1990183441 - .long 1069283688 - .long 3220050856 - .long 1069338605 - .long 1669613218 - .long 1069393703 - .long 2145455994 - .long 1069458213 - .long 4275830246 - .long 1069513705 - .long 1392453108 - .long 1069558451 - .long 1469915213 - .long 1069586382 - .long 2183652476 - .long 1069619086 - .long 2109656884 - .long 1069647220 - .long 636640577 - .long 1069675449 - .long 510517079 - .long 1069703773 - .long 210141498 - .long 1069732193 - .long 2537624622 - .long 1069760709 - .long 1733817001 - .long 1069789323 - .long 137854980 - .long 1069813243 - .long 3905576828 - .long 1069842036 - .long 4131810788 - .long 1069870929 - .long 3760956694 - .long 1069899922 - .long 1473082581 - .long 1069929016 - .long 926113142 - .long 1069953338 - .long 3669742467 - .long 1069982617 - .long 3711755290 - .long 1070007095 - .long 311386407 - .long 1070036564 - .long 705364525 - .long 1070066136 - .long 1973375279 - .long 1070090859 - .long 3589645072 - .long 1070115655 - .long 2425772059 - .long 1070145508 - .long 1074899574 - .long 1070170467 - .long 118003300 - .long 1070200516 - .long 691310403 - .long 1070225639 - .long 3273036717 - .long 1070250837 - .long 1226436560 - .long 1070276112 - .long 2481153995 - .long 1070306542 - .long 3227997535 - .long 1070331985 - .long 1421812646 - .long 1070357506 - .long 3386588242 - .long 1070383104 - .long 2580043380 - .long 1070408781 - .long 1068692560 - .long 1070434537 - .long 938143489 - .long 1070460372 - .long 4293333010 - .long 1070486286 - .long 373864817 - .long 1070512282 - .long 4208958430 - .long 1070538357 - .long 783121462 - .long 1070564515 - .long 870975437 - .long 1070590754 - .long 3338886172 - .long 1070606585 - .long 3772343130 - .long 1070619787 - .long 2408245143 - .long 1070630379 - .long 3811383569 - .long 1070643656 - .long 1622638721 - .long 1070656976 - .long 1290798655 - .long 1070670338 - .long 2457529556 - .long 1070681058 - .long 2398194399 - .long 1070694497 - .long 3190801979 - .long 1070707979 - .long 3352241197 - .long 1070718796 - .long 1829681364 - .long 1070732357 - .long 2568927817 - .long 1070743237 - .long 2676427515 - .long 1070756877 - .long 2882402820 - .long 1070767821 - .long 44944622 - .long 1070781542 - .long 2957945300 - .long 1070792550 - .long 1261787704 - .long 1070806352 - .long 1589923677 - .long 1070817426 - .long 3274931829 - .long 1070828529 - .long 1999843716 - .long 1070842450 - .long 1673619518 - .long 1070853620 - .long 601221319 - .long 1070864820 - .long 3763576649 - .long 1070876049 - .long 1974923437 - .long 1070890129 - .long 1096100617 - .long 1070901427 - .long 2424897952 - .long 1070912755 - .long 2376202600 - .long 1070924114 - .long 1665651958 - .long 1070935504 - .long 1014729354 - .long 1070946925 - .long 722545241 - .long 1070961245 - .long 1800682930 - .long 1070972736 - .long 1029453230 - .long 1070984259 - .long 3450874911 - .long 1070995813 - .long 1228255906 - .long 1071007400 - .long 3711032981 - .long 1071019018 - .long 3075102917 - .long 1071030669 - .long 92696812 - .long 1071042353 - .long 3897749690 - .long 1071051136 - .long 1907922160 - .long 1071062877 - .long 4023807324 - .long 1071074650 - .long 2452345726 - .long 1071086457 - .long 2292128226 - .long 1071098297 - .long 58635942 - .long 1071110171 - .long 864186929 - .long 1071122078 - .long 3555691467 - .long 1071131030 - .long 2003684347 - .long 1071142997 - .long 1479703759 - .long 1071154998 - .long 2537208015 - .long 1071164021 - .long 3699909861 - .long 1071176082 - .long 3934098706 - .long 1071188178 - .long 3885764182 - .long 1071197273 - .long 1357790931 - .long 1071209431 - .long 295956059 - .long 1071221624 - .long 4080877676 - .long 1071230791 - .long 202970280 - .long 1071243047 - .long 3977575845 - .long 1071252261 - .long 35977849 - .long 1071264580 - .long 1585496963 - .long 1071273842 - .long 375247257 - .long 1071286224 - .long 1812199574 - .long 1071295534 - .long 1876912769 - .long 1071307980 - .long 1051846544 - .long 1071317339 - .long 979589448 - .long 1071329850 - .long 71706889 - .long 1071339258 - .long 2790898835 - .long 1071351834 - .long 4013797733 - .long 1071361291 - .long 2541231151 - .long 1071370770 - .long 921733145 - .long 1071383442 - .long 508375805 - .long 1071392971 - .long 3091669954 - .long 1071402521 - .long 3343209673 - .long 1071415289 - .long 1693047557 - .long 1071424891 - .long 173861808 - .long 1071434515 - .long 3515822703 - .long 1071444160 - .long 1974837761 - .long 1071457056 - .long 1189018219 - .long 1071466754 - .long 2441946573 - .long 1071476474 - .long 1887102255 - .long 1071486217 - .long 4271031636 - .long 1071495982 - .long 876995759 - .long 1071509039 - .long 438773454 - .long 1071518858 - .long 172621632 - .long 1071528700 - .long 544035182 - .long 1071538565 - .long 2021801298 - .long 1071548453 - .long 783063308 - .long 1071558365 - .long 1598254051 - .long 1071568300 - .long 651258553 - .long 1071578259 - .long 2719315456 - .long 1071588241 - .long 3993180461 - .long 1071598247 - .long 667093936 - .long 1071608278 - .long 1823716217 - .long 1071618332 - .long 3664357648 - .long 1071628410 - .long 2393914686 - .long 1071638513 - .long 1405419566 - .long 1071646656 - .long 563652001 - .long 1071651732 - .long 1074554091 - .long 1071656820 - .long 3195405229 - .long 1071661920 - .long 2890399284 - .long 1071667033 - .long 420597586 - .long 1071672159 - .long 87278952 - .long 1071675583 - .long 1753119502 - .long 1071680729 - .long 1959759897 - .long 1071685888 - .long 975389815 - .long 1071691060 - .long 3365155278 - .long 1071696244 - .long 811309190 - .long 1071701442 - .long 1269811480 - .long 1071704914 - .long 1108583542 - .long 1071710133 - .long 1034517919 - .long 1071715365 - .long 1327340287 - .long 1071720610 - .long 1388251237 - .long 1071724114 - .long 1488234797 - .long 1071729381 - .long 2711385691 - .long 1071734661 - .long 952179194 - .long 1071738189 - .long 3255685427 - .long 1071743491 - .long 3159039803 - .long 1071748807 - .long 951558972 - .long 1071752359 - .long 3234424125 - .long 1071757697 - .long 3904573547 - .long 1071763049 - .long 2648729924 - .long 1071766625 - .long 2729250212 - .long 1071772000 - .long 2000712574 - .long 1071777389 - .long 3125257108 - .long 1071780989 - .long 3160324803 - .long 1071786401 - .long 2216316974 - .long 1071790017 - .long 3875016090 - .long 1071795452 - .long 1439520610 - .long 1071799084 - .long 1298103361 - .long 1071804543 - .long 2217517956 - .long 1071810016 - .long 1191753587 - .long 1071813673 - .long 1728773900 - .long 1071819170 - .long 747445441 - .long 1071822843 - .long 1670772213 - .long 1071826522 - .long 1471209283 - .long 1071832053 - .long 3287905877 - .long 1071835748 - .long 594038131 - .long 1071841304 - .long 3920147917 - .long 1071845015 - .long 3957142762 - .long 1071850595 - .long 826988438 - .long 1071854324 - .long 242509008 - .long 1071859929 - .long 4173610350 - .long 1071863673 - .long 2518313625 - .long 1071867425 - .long 2671523434 - .long 1071873065 - .long 387544807 - .long 1071876834 - .long 1470497767 - .long 1071880609 - .long 4269259217 - .long 1071886284 - .long 1345663925 - .long 1071890077 - .long 2159323299 - .long 1071893876 - .long 957937516 - .long 1071899588 - .long 2994656967 - .long 1071903404 - .long 556124819 - .long 1071907228 - .long 1631098658 - .long 1071912976 - .long 1368257861 - .long 1071916817 - .long 1309849279 - .long 1071920665 - .long 1567156841 - .long 1071924520 - .long 1179420986 - .long 1071930316 - .long 569448444 - .long 1071934189 - .long 669557459 - .long 1071938069 - .long 1593834700 - .long 1071941956 - .long 3166083125 - .long 1071947800 - .long 211641815 - .long 1071951706 - .long 2780675719 - .long 1071955618 - .long 2400234567 - .long 1071959538 - .long 3482927192 - .long 1071963465 - .long 1852089988 - .long 1071967400 - .long 1020849000 - .long 1071973316 - .long 1718090839 - .long 1071977269 - .long 121152472 - .long 1071981230 - .long 646346839 - .long 1071985198 - .long 3415709705 - .long 1071989173 - .long 4257004898 - .long 1071993156 - .long 3293664199 - .long 1071997147 - .long 649825382 - .long 1072001146 - .long 248887552 - .long 1072007158 - .long 2541522737 - .long 1072011175 - .long 3593780107 - .long 1072015200 - .long 3533041935 - .long 1072019233 - .long 2487426809 - .long 1072023274 - .long 585795318 - .long 1072027323 - .long 2252723088 - .long 1072031379 - .long 3323604690 - .long 1072035443 - .long 3929561382 - .long 1072039515 - .long 4202479723 - .long 1072043595 - .long 4275017539 - .long 1072047683 - .long 0 - .long 0 - .long 2969299638 - .long 1066385576 - .long 242759278 - .long 1067418267 - .long 4130528649 - .long 1067938904 - .long 3222363743 - .long 1068436016 - .long 2518406343 - .long 1068712407 - .long 2330290349 - .long 1068953810 - .long 977983493 - .long 1069191789 - .long 1848308976 - .long 1069426439 - .long 2094042057 - .long 1069602686 - .long 4162844547 - .long 1069716818 - .long 1825274911 - .long 1069829419 - .long 1890030541 - .long 1069940528 - .long 34658761 - .long 1070050185 - .long 2633258952 - .long 1070158426 - .long 1317059912 - .long 1070265289 - .long 3348798148 - .long 1070370807 - .long 1848308976 - .long 1070475015 - .long 1834892534 - .long 1070577944 - .long 3799224489 - .long 1070637860 - .long 2880153273 - .long 1070688092 - .long 4224678190 - .long 1070737729 - .long 3135315492 - .long 1070786786 - .long 1432962655 - .long 1070835276 - .long 3256639515 - .long 1070883211 - .long 2267936667 - .long 1070930605 - .long 3210218142 - .long 1070977469 - .long 513480033 - .long 1071023816 - .long 4139503392 - .long 1071069655 - .long 998420681 - .long 1071115000 - .long 2260812359 - .long 1071159859 - .long 471930696 - .long 1071204244 - .long 288677044 - .long 3218237794 - .long 1666870396 - .long 3218194329 - .long 2183652263 - .long 3218151310 - .long 1615681869 - .long 3218108728 - .long 1823715893 - .long 3218053404 - .long 4293333700 - .long 3217969934 - .long 4066729029 - .long 3217887287 - .long 943445964 - .long 3217805447 - .long 1015733272 - .long 3217724397 - .long 3707174790 - .long 3217644122 - .long 1699848676 - .long 3217564609 - .long 2339728692 - .long 3217485842 - .long 1800683248 - .long 3217407808 - .long 2201203741 - .long 3217330493 - .long 2954203727 - .long 3217253884 - .long 709476838 - .long 3217177969 - .long 2183652973 - .long 3217102734 - .long 970708496 - .long 3217025169 - .long 1669614391 - .long 3216877351 - .long 2376949106 - .long 3216730824 - .long 1566133827 - .long 3216585566 - .long 183157569 - .long 3216441555 - .long 1562411141 - .long 3216298769 - .long 2756121236 - .long 3216157188 - .long 3047046473 - .long 3216016792 - .long 3453858674 - .long 3215772531 - .long 346008798 - .long 3215496362 - .long 3559775130 - .long 3215222446 - .long 2313636156 - .long 3214950749 - .long 684243850 - .long 3214428453 - .long 1486053291 - .long 3213893718 - .long 1971906393 - .long 3212840981 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 528611360 - .long 1072660984 - .long 4034666248 - .long 1072629697 - .long 2884679527 - .long 1072599345 - .long 505290270 - .long 1072569886 - .long 1991868891 - .long 1072541280 - .long 490853405 - .long 1072513492 - .long 2298714891 - .long 1072486486 - .long 477218588 - .long 1072460231 - .long 58835168 - .long 1072434695 - .long 348240592 - .long 1072409849 - .long 3035110223 - .long 1072385665 - .long 3164712744 - .long 1072362118 - .long 1617585086 - .long 1072339183 - .long 440509466 - .long 1072316836 - .long 2500867033 - .long 1072295054 - .long 2576980378 - .long 1072273817 - .long 4241943008 - .long 1072253104 - .long 2409371898 - .long 1072232897 - .long 258732970 - .long 1072213177 - .long 409044504 - .long 1072193926 - .long 404232216 - .long 1072175128 - .long 1098712564 - .long 1072156767 - .long 2172167368 - .long 1072138828 - .long 1952257862 - .long 1072121297 - .long 1544257904 - .long 1072104160 - .long 381774871 - .long 1072087404 - .long 377579543 - .long 1072071016 - .long 1493901668 - .long 1072054984 - .long 1616385542 - .long 1072039297 - .long 731058263 - .long 1072023944 - .long 813783277 - .long 1072008914 - .long 1431655765 - .long 1071994197 - .long 3940743189 - .long 1071979783 - .long 2804876601 - .long 1071965664 - .long 2689777499 - .long 1071951830 - .long 1202590843 - .long 1071938273 - .long 1700977147 - .long 1071924984 - .long 336860180 - .long 1071911956 - .long 3169102082 - .long 1071899180 - .long 330382100 - .long 1071886651 - .long 327235604 - .long 1071874360 - .long 4213930177 - .long 1071862300 - .long 1244336319 - .long 1071850467 - .long 3181457256 - .long 1071838852 - .long 1300311200 - .long 1071827451 - .long 702812830 - .long 1071816257 - .long 3095471925 - .long 1071805264 - .long 2454267026 - .long 1071794468 - .long 2166487928 - .long 1071783863 - .long 2109808496 - .long 1071773444 - .long 2913108253 - .long 1071763206 - .long 1629125526 - .long 1071753145 - .long 293672978 - .long 1071743256 - .long 1601513229 - .long 1071733534 - .long 288737297 - .long 1071723976 - .long 286331153 - .long 1071714577 - .long 1810275472 - .long 1071705333 - .long 1337776699 - .long 1071696241 - .long 174592167 - .long 1071687297 - .long 138547332 - .long 1071678497 - .long 3539053052 - .long 1071669837 - .long 272696336 - .long 1071661316 - .long 2164392968 - .long 1071652928 - .long 0 - .long 1071644672 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3819695742 - .long 1067482761 - .long 2998791009 - .long 1067548225 - .long 3339424991 - .long 1067613680 - .long 2710002256 - .long 1067679126 - .long 3275701428 - .long 1067744562 - .long 2908636881 - .long 1067809988 - .long 3777889398 - .long 1067875403 - .long 3759667419 - .long 1067940807 - .long 732369940 - .long 1068006200 - .long 1166616461 - .long 1068071580 - .long 2945472892 - .long 1068136947 - .long 3954480976 - .long 1068202301 - .long 2081752829 - .long 1068267642 - .long 3807999788 - .long 1068332968 - .long 2731789884 - .long 1068398280 - .long 1044477961 - .long 1068463577 - .long 1486930287 - .long 1068530218 - .long 2293016881 - .long 1068595466 - .long 201518157 - .long 1068660680 - .long 4054234584 - .long 1068725856 - .long 1246477213 - .long 1068790995 - .long 678186699 - .long 1068856093 - .long 2690594995 - .long 1068921148 - .long 3362611517 - .long 1068986159 - .long 3102162111 - .long 1069051124 - .long 2352611067 - .long 1069116041 - .long 1594134794 - .long 1069180908 - .long 1345079306 - .long 1069245723 - .long 2163300970 - .long 1069310484 - .long 352522716 - .long 1069375190 - .long 848541647 - .long 1069439838 - .long 40647312 - .long 1069504427 - .long 2216766270 - .long 1069574357 - .long 1090914384 - .long 1069638757 - .long 387601244 - .long 1069703022 - .long 3991640484 - .long 1069767144 - .long 3322489502 - .long 1069831118 - .long 3121698570 - .long 1069894936 - .long 4289964660 - .long 1069958591 - .long 3903312386 - .long 1070022077 - .long 3818449864 - .long 1070085387 - .long 2097480306 - .long 1070148515 - .long 1611694502 - .long 1070211454 - .long 1464694796 - .long 1070274198 - .long 1299612775 - .long 1070336741 - .long 1310544789 - .long 1070399077 - .long 2253168030 - .long 1070461200 - .long 1159567373 - .long 1070523105 - .long 1359373750 - .long 1070605818 - .long 908341706 - .long 1070667034 - .long 1743027350 - .long 1070727765 - .long 2055355646 - .long 1070787992 - .long 690426164 - .long 1070847697 - .long 1483247847 - .long 1070906862 - .long 392040270 - .long 1070965472 - .long 2673846014 - .long 1071023511 - .long 1384215810 - .long 1071080967 - .long 3101660631 - .long 1071137826 - .long 2094057058 - .long 1071194078 - .long 1712750594 - .long 1071249712 - .long 1411515787 - .long 1071304719 - .long 931538085 - .long 1071359091 - .long 179139065 - .long 1071412821 - .long 3387721259 - .long 1071465902 - .long 2132236852 - .long 1071544299 - .long 1942070284 - .long 1071645596 - .long 1532707802 - .long 1071695380 - .long 2294184979 - .long 1071743834 - .long 3805060714 - .long 1071790961 - .long 2215037898 - .long 1071836770 - .long 483661594 - .long 1071881273 - .long 1534679894 - .long 1071924486 - .long 1538714628 - .long 1071966430 - .long 527642555 - .long 1072007128 - .long 291339150 - .long 1072046605 - .long 2450210201 - .long 1072084888 - .long 2411367951 - .long 1072122007 - .long 681549971 - .long 1072157992 - .long 1466745541 - .long 1072192873 - .long 2845622366 - .long 1072226682 - .long 2838871438 - .long 1072275456 - .long 4200275274 - .long 1072337034 - .long 3034733530 - .long 1072394897 - .long 3207412993 - .long 1072449290 - .long 624461478 - .long 1072500450 - .long 767665908 - .long 1072548600 - .long 1110773639 - .long 1072593952 - .long 1940828530 - .long 1072636704 - .long 1911329388 - .long 1072677041 - .long 1764715788 - .long 1072704191 - .long 3332979233 - .long 1072722195 - .long 1321870254 - .long 1072739231 - .long 3657429030 - .long 1072755365 - .long 4197624557 - .long 1072770661 - .long 1512059493 - .long 1072785177 - .long 453379037 - .long 1072798965 - .long 1942345162 - .long 1072818388 - .long 4210176273 - .long 1072842164 - .long 4185644010 - .long 1072863795 - .long 679688788 - .long 1072883543 - .long 29432865 - .long 1072901630 - .long 4070721092 - .long 1072918247 - .long 2252468843 - .long 1072933561 - .long 2929724825 - .long 1072947712 - .long 1377513368 - .long 1072960824 - .long 1031632908 - .long 1072973003 - .long 2516508130 - .long 1072984342 - .long 3792452178 - .long 1072994923 - .long 3147791459 - .long 1073004818 - .long 999189752 - .long 1073014090 - .long 711011011 - .long 1073022794 - .long 15640363 - .long 1073030980 - .long 1218463589 - .long 1073042382 - .long 2538470555 - .long 1073056144 - .long 1229720947 - .long 1073068489 - .long 3115427016 - .long 1073079621 - .long 4030612557 - .long 1073089709 - .long 2728521257 - .long 1073098892 - .long 1118696283 - .long 1073107285 - .long 2682711255 - .long 1073114984 - .long 2073898081 - .long 1073122072 - .long 1403700297 - .long 1073128618 - .long 2502685617 - .long 1073134681 - .long 1531926851 - .long 1073140313 - .long 3572814411 - .long 1073145557 - .long 1695536111 - .long 1073150453 - .long 2363057203 - .long 1073155033 - .long 2873365682 - .long 1073159327 - .long 1053384691 - .long 1073165288 - .long 3270542712 - .long 1073172451 - .long 1353631484 - .long 1073178850 - .long 3511218460 - .long 1073184599 - .long 4121259284 - .long 1073189793 - .long 1193862106 - .long 1073194509 - .long 3861949790 - .long 1073198808 - .long 1486904578 - .long 1073202745 - .long 2879153715 - .long 1073206362 - .long 385353253 - .long 1073209698 - .long 1125865839 - .long 1073212783 - .long 1221361475 - .long 1073215645 - .long 2077323573 - .long 1073218307 - .long 215611373 - .long 1073220790 - .long 2347419265 - .long 1073223110 - .long 1379112765 - .long 1073225284 - .long 3891198463 - .long 1073228298 - .long 3395914051 - .long 1073231917 - .long 2799919478 - .long 1073235146 - .long 1138673476 - .long 1073238045 - .long 3408855940 - .long 1073240661 - .long 2044858738 - .long 1073243035 - .long 2578795176 - .long 1073245198 - .long 4196285314 - .long 1073247177 - .long 224877747 - .long 1073248996 - .long 3271386490 - .long 1073250671 - .long 813635989 - .long 1073252221 - .long 369829519 - .long 1073253658 - .long 1187679052 - .long 1073254994 - .long 4232586098 - .long 1073256239 - .long 426690558 - .long 1073257404 - .long 1624065902 - .long 1073258494 - .long 84029729 - .long 1073260006 - .long 700437654 - .long 1073261820 - .long 1437260555 - .long 1073263438 - .long 2813372195 - .long 1073264890 - .long 1607849324 - .long 1073266201 - .long 1011572952 - .long 1073267390 - .long 2039290225 - .long 1073268473 - .long 2435855138 - .long 1073269464 - .long 3389310384 - .long 1073270374 - .long 2790682322 - .long 1073271213 - .long 960266323 - .long 1073271989 - .long 1766929455 - .long 1073272708 - .long 627058932 - .long 1073273377 - .long 2388650377 - .long 1073274000 - .long 422252385 - .long 1073274583 - .long 2848853896 - .long 1073275128 - .long 1413754136 - .long 1073291771 - .long 3951369912 - .long 1067366481 - .long 3951369912 - .long 3214850129 - .long 0 - .long 3218079744 - .long 1431655765 - .long 1070945621 - .long 0 - .long 3219128320 - .long 0 - .long 0 - .long 4294967295 - .long 1048575 - .long 0 - .long 1072693248 - .long 1602224128 - .long 1602224128 - .long 1065353216 - .long 1065353216 - .long 4294967295 - .long 1048575 - .long 4277811695 - .long 1072049730 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 0 - .long 1072693248 - .long 3879088107 - .long 3219128321 - .long 1754324240 - .long 1070945626 - .long 0 - .long 0 - .long 12982 - .long 1071644672 - .long 3503368358 - .long 3218079743 - .long 300625100 - .long 1069897045 - .long 3513684914 - .long 3217031970 - .long 1735899863 - .long 1069129695 - .long 0 - .long 0 - .long 2147483647 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 2147418112 - .long 0 - .long 2147418112 - .long 0 - .long 32768 - .long 0 - .long 32768 - .long 1413754136 - .long 3221823995 - .long 0 - .long 0 - .long 2576980378 - .long 1070176665 - .long 1431655765 - .long 3218429269 - .long 8388608 - .long 0 - .long 0 - .long 0 - .long 0 - .long 940572672 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 1070141402 - .long 866263400 - .long 1078530010 - .long 874652008 - .long 1061752794 - .long 857874792 - .long 0 - .long 0 - .long 1431655765 - .long 3218429269 - .long 0 - .long 0 - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .type clogf_table,@object - .size clogf_table,6976 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clogl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clogl.S deleted file mode 100644 index 8f4023dcf6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/clogl.S +++ /dev/null @@ -1,783 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "clogl.c" - .text -..TXTST0: -# -- Begin clogl - .text - .align 16,0x90 - .globl clogl -clogl: -# parameter 1: 192 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_clogl.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - subq $176, %rsp - .cfi_def_cfa_offset 192 - xorb %r13b, %r13b - fldt .L_2il0floatpacket.6(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 160(%rsp) - fstpt 128(%rsp) - fldt 128(%rsp) - fstpt 144(%rsp) -..B1.2: - fnstcw 114(%rsp) -..B1.3: - movzwl 114(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 112(%rsp) -..B1.5: - fldcw 112(%rsp) -..B1.6: - movb $1, %r13b -..B1.7: - movzwl 200(%rsp), %edx - andl $32767, %edx - movzwl 216(%rsp), %eax - andl $32767, %eax - cmpl $32767, %edx - jge ..B1.47 -..B1.8: - cmpl $32767, %eax - jge ..B1.88 -..B1.9: - testl %edx, %edx - jne ..B1.15 -..B1.10: - cmpl $0, 196(%rsp) - jne ..B1.15 -..B1.11: - cmpl $0, 192(%rsp) - jne ..B1.15 -..B1.12: - testl %eax, %eax - jne ..B1.15 -..B1.13: - cmpl $0, 212(%rsp) - jne ..B1.15 -..B1.14: - cmpl $0, 208(%rsp) - je ..B1.46 -..B1.15: - fldt 192(%rsp) - fld %st(0) - fabs - fstpt (%rsp) - fldt (%rsp) - fldt 208(%rsp) - fld %st(0) - fabs - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 8(%rsp), %eax - movzwl 24(%rsp), %edx - andl $32767, %eax - andl $32767, %edx - cmpl %edx, %eax - jl ..B1.20 -..B1.16: - jne ..B1.21 -..B1.17: - movl 4(%rsp), %edx - movl 20(%rsp), %ecx - cmpl %ecx, %edx - jb ..B1.20 -..B1.18: - jne ..B1.21 -..B1.19: - movl (%rsp), %edx - cmpl 16(%rsp), %edx - jae ..B1.21 -..B1.20: - fstpt (%rsp) - fldt (%rsp) - movzwl 8(%rsp), %eax - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - andl $32767, %eax -..B1.21: - cmpl $16382, %eax - jg ..B1.26 -..B1.22: - jne ..B1.43 -..B1.23: - lea 16+_CONSTANTS(%rip), %rcx - movl 4(%rsp), %edx - cmpl 4(%rcx), %edx - ja ..B1.26 -..B1.24: - jne ..B1.43 -..B1.25: - movl (%rcx), %edx - cmpl (%rsp), %edx - ja ..B1.43 -..B1.26: - cmpl $16383, %eax - jl ..B1.31 -..B1.27: - jne ..B1.43 -..B1.28: - lea 32+_CONSTANTS(%rip), %rcx - movl 4(%rsp), %edx - cmpl 4(%rcx), %edx - jb ..B1.31 -..B1.29: - jne ..B1.43 -..B1.30: - movl (%rsp), %edx - cmpl (%rcx), %edx - ja ..B1.43 -..B1.31: - movzwl 24(%rsp), %esi - andl $32767, %esi - cmpl $8256, %esi - jg ..B1.36 -..B1.32: - jne ..B1.37 -..B1.33: - lea 80+_CONSTANTS(%rip), %rcx - movl 20(%rsp), %edx - cmpl 4(%rcx), %edx - ja ..B1.36 -..B1.34: - jne ..B1.37 -..B1.35: - movl 16(%rsp), %edx - cmpl (%rcx), %edx - jbe ..B1.37 -..B1.36: - fld %st(2) - lea _CONSTANTS(%rip), %rdx - fmul %st(3), %st - fld %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fldt .L_2il0floatpacket.7(%rip) - fsubr %st, %st(1) - fxch %st(1) - fabs - fldt (%rdx) - fcomip %st(1), %st - ja ..B1.38 - jmp ..B1.89 -..B1.37: - fldt .L_2il0floatpacket.7(%rip) - fld %st(3) - fmul %st(4), %st - lea _CONSTANTS(%rip), %rdx - fsub %st(1), %st - fabs - fldt (%rdx) - fcomip %st(1), %st - jbe ..B1.89 -..B1.38: - cmpl $16183, %esi - jl ..B1.40 -..B1.39: - fstp %st(0) - fldt .L_2il0floatpacket.11(%rip) - fld %st(4) - fxch %st(6) - fstpt 16(%rsp) - lea 16+_Q1(%rip), %rax - fxch %st(3) - fstpt (%rsp) - lea _Q1(%rip), %rdx - fldt .L_2il0floatpacket.10(%rip) - fmul %st(4), %st - fsub %st, %st(5) - fsubp %st, %st(5) - fld %st(4) - fmul %st(5), %st - fld %st(2) - fxch %st(5) - fsub %st(6), %st - fxch %st(4) - fmul %st, %st(6) - fxch %st(4) - fmul %st, %st(6) - fmul %st(0), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fldt .L_2il0floatpacket.10(%rip) - fmul %st(4), %st - fsub %st, %st(6) - fsubp %st, %st(6) - fld %st(5) - fmul %st(6), %st - fxch %st(4) - fsub %st(6), %st - fxch %st(5) - fmulp %st, %st(6) - fxch %st(4) - fmul %st, %st(5) - fxch %st(5) - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(5) - fmul %st(0), %st - fstpt 64(%rsp) - fld %st(0) - fadd %st(3), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fsubp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fld %st(0) - fsub %st(2), %st - fsubr %st, %st(3) - fld %st(1) - fsubp %st, %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(5), %st - fld %st(0) - faddp %st, %st(5) - fld %st(4) - faddp %st, %st(4) - fxch %st(3) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt 64(%rsp) - faddp %st, %st(1) - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fld %st(1) - fmul %st(2), %st - fmulp %st, %st(1) - fld %st(4) - fsub %st(3), %st - fsubr %st, %st(7) - fsubr %st(5), %st - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(6) - fxch %st(5) - faddp %st, %st(2) - fld %st(3) - fsub %st(3), %st - fldt 48(%rsp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(5), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 80(%rsp) - fld %st(0) - fsub %st(4), %st - fldt 32(%rsp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(2), %st - fsubrp %st, %st(5) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fld %st(3) - fsub %st(3), %st - fldt 64(%rsp) - fsub %st(1), %st - fxch %st(1) - fsubr %st(5), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.9(%rip) - fmulp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fstpt 128(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 224 - fldt 32(%rsp) - fstpt (%rsp) - fldt 48(%rsp) - fstpt 16(%rsp) - call atan2l@PLT - jmp ..B1.86 - .cfi_def_cfa_offset 192 -..B1.40: - cmpl $16383, %eax - je ..B1.55 -..B1.41: - fstp %st(2) - fxch %st(1) - fstpt 96(%rsp) -..B1.42: - fldt .L_2il0floatpacket.10(%rip) - lea 16+_Q1(%rip), %rax - fmul %st(3), %st - fld %st(3) - lea _Q1(%rip), %rdx - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fsubp %st, %st(2) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.11(%rip) - fmulp %st, %st(1) - fmul %st(3), %st - fld %st(0) - fxch %st(4) - fmul %st(0), %st - fadd %st, %st(4) - fxch %st(1) - fsubr %st(4), %st - fsubrp %st, %st(1) - fld %st(1) - fadd %st(4), %st - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(4) - faddp %st, %st(3) - fld %st(0) - fmul %st(1), %st - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fldt .L_2il0floatpacket.9(%rip) - fmulp %st, %st(2) - fxch %st(1) - fstpt 128(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 224 - fstpt (%rsp) - fstpt 16(%rsp) - call atan2l@PLT - jmp ..B1.86 - .cfi_def_cfa_offset 192 -..B1.43: - fstp %st(2) - fstp %st(1) - addq $-32, %rsp - .cfi_def_cfa_offset 224 - lea 64(%rsp), %rdi - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_clogl.11: - call __libm_hypot2l_k80@PLT -..___tag_value_clogl.12: -..B1.82: - addq $32, %rsp - .cfi_def_cfa_offset 192 -..B1.44: - lea 48+_CONSTANTS(%rip), %rax - lea 64+_CONSTANTS(%rip), %rdx - fldt (%rax) - fmul %st(1), %st - fstpt 16(%rsp) - fldt (%rdx) - fmulp %st, %st(1) - fstpt (%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 224 - fldt 64(%rsp) - lea 96(%rsp), %rdi - fstpt (%rsp) - fldt -16(%rdi) - fstpt 16(%rsp) -..___tag_value_clogl.15: - call __libm_logl_k80@PLT -..___tag_value_clogl.16: -..B1.83: - addq $32, %rsp - .cfi_def_cfa_offset 192 -..B1.45: - fldt .L_2il0floatpacket.9(%rip) - fmulp %st, %st(1) - fldt 64(%rsp) - fmul %st(1), %st - fldt 80(%rsp) - fmulp %st, %st(2) - fldt 16(%rsp) - fld %st(0) - fadd %st(2), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt (%rsp) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fstpt 128(%rsp) - fldt 208(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 224 - fstpt (%rsp) - fldt 224(%rsp) - fstpt 16(%rsp) - call atan2l@PLT - jmp ..B1.86 - .cfi_def_cfa_offset 192 -..B1.46: - fldt 208(%rsp) - movsd .L_2il0floatpacket.8(%rip), %xmm1 - pxor %xmm0, %xmm0 - divsd %xmm0, %xmm1 - movsd %xmm1, (%rsp) - fldl (%rsp) - fstpt 128(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 224 - fstpt (%rsp) - fldt 224(%rsp) - fstpt 16(%rsp) - call atan2l@PLT - jmp ..B1.86 - .cfi_def_cfa_offset 192 -..B1.47: - je ..B1.72 -..B1.48: - cmpl $32767, %eax - je ..B1.66 -..B1.49: - fldt 208(%rsp) - lea 96+_CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 128(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 224 - fstpt (%rsp) - fldt 224(%rsp) - fstpt 16(%rsp) - call atan2l@PLT -..B1.86: - addq $32, %rsp - .cfi_def_cfa_offset 192 - fstpt 144(%rsp) -..B1.50: - testb %r13b, %r13b - je ..B1.52 -..B1.51: - fldcw 114(%rsp) -..B1.52: - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.65 -..B1.53: - fldt 128(%rsp) - fldt 144(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.64 -..B1.54: - addq $176, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 192 - .cfi_offset 13, -16 -..B1.55: - cmpl $-2147483648, 4(%rsp) - jne ..B1.41 -..B1.57: - cmpl $0, (%rsp) - jne ..B1.41 -..B1.59: - fstp %st(0) - fstp %st(0) - fstp %st(2) - fldt .L_2il0floatpacket.9(%rip) - fmul %st(2), %st - fmulp %st, %st(2) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - movzwl 104(%rsp), %eax - testl $32767, %eax - jne ..B1.63 -..B1.60: - cmpl $0, 100(%rsp) - jne ..B1.62 -..B1.61: - cmpl $0, 96(%rsp) - je ..B1.63 -..B1.62: - lea 112+_CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st(0), %st - faddp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) -..B1.63: - fstpt 128(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 224 - fstpt (%rsp) - fstpt 16(%rsp) - call atan2l@PLT - jmp ..B1.86 - .cfi_def_cfa_offset 192 -..B1.64: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.65: - call __stack_chk_fail@PLT -..B1.66: - cmpl $-2147483648, 212(%rsp) - jne ..B1.68 -..B1.67: - cmpl $0, 208(%rsp) - je ..B1.49 -..B1.68: - fldt 208(%rsp) - cmpl $32767, %edx - fmul %st(0), %st - fstpt 144(%rsp) - fldt 144(%rsp) - je ..B1.70 -..B1.69: - fstpt 128(%rsp) - jmp ..B1.50 -..B1.70: - movq $0x8000000000000000, %rax - cmpq 192(%rsp), %rax - jne ..B1.69 -..B1.71: - fstp %st(0) - fldt 192(%rsp) - fmul %st(0), %st - fstpt 128(%rsp) - jmp ..B1.50 -..B1.72: - cmpl $-2147483648, 196(%rsp) - jne ..B1.74 -..B1.73: - cmpl $0, 192(%rsp) - je ..B1.48 -..B1.74: - fldt 192(%rsp) - cmpl $32767, %eax - fld %st(0) - fmul %st(1), %st - fstpt 144(%rsp) - je ..B1.76 -..B1.75: - fldt 208(%rsp) - fmulp %st, %st(1) - fstpt 128(%rsp) - jmp ..B1.50 -..B1.76: - movq $0x8000000000000000, %rax - cmpq 208(%rsp), %rax - jne ..B1.75 -..B1.77: - fstp %st(0) - fldt 208(%rsp) - fmul %st(0), %st - fstpt 128(%rsp) - jmp ..B1.50 -..B1.88: - cmpl $32767, %edx - je ..B1.72 - jmp ..B1.48 -..B1.89: - fstp %st(0) - fstp %st(0) - jmp ..B1.43 - .align 16,0x90 - .cfi_endproc - .type clogl,@function - .size clogl,.-clogl - .data -# -- End clogl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,16 - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,16 - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,16 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 37342 - .word 47265 - .word 62214 - .word 46340 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 64512 - .word 65535 - .word 31 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53710 - .word 6135 - .word 45426 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 505 - .word 55756 - .word 58609 - .word 48341 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8256 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,128 - .align 2 -_Q1: - .word 3134 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 49331 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/complex_real.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/complex_real.S deleted file mode 100644 index b6eb61712d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/complex_real.S +++ /dev/null @@ -1,322 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "complex_real.c" - .text -..TXTST0: -# -- Begin __libm_internal_isinf - .text - .align 16,0x90 - .globl __libm_internal_isinf -__libm_internal_isinf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___libm_internal_isinf.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - jne ..B1.4 -..B1.2: - cmpl $0, -8(%rsp) - jne ..B1.4 -..B1.3: - movl $1, %eax - ret -..B1.4: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_isinf,@function - .size __libm_internal_isinf,.-__libm_internal_isinf - .data -# -- End __libm_internal_isinf - .text -# -- Begin __libm_internal_ispinf - .text - .align 16,0x90 - .globl __libm_internal_ispinf -__libm_internal_ispinf: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value___libm_internal_ispinf.4: -..L5: - - movsd %xmm0, -8(%rsp) - cmpl $2146435072, -4(%rsp) - jne ..B2.4 -..B2.2: - cmpl $0, -8(%rsp) - jne ..B2.4 -..B2.3: - movl $1, %eax - ret -..B2.4: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_ispinf,@function - .size __libm_internal_ispinf,.-__libm_internal_ispinf - .data -# -- End __libm_internal_ispinf - .text -# -- Begin __libm_internal_isninf - .text - .align 16,0x90 - .globl __libm_internal_isninf -__libm_internal_isninf: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value___libm_internal_isninf.7: -..L8: - - movsd %xmm0, -8(%rsp) - cmpl $-1048576, -4(%rsp) - jne ..B3.4 -..B3.2: - cmpl $0, -8(%rsp) - jne ..B3.4 -..B3.3: - movl $1, %eax - ret -..B3.4: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_isninf,@function - .size __libm_internal_isninf,.-__libm_internal_isninf - .data -# -- End __libm_internal_isninf - .text -# -- Begin __libm_internal_isnan - .text - .align 16,0x90 - .globl __libm_internal_isnan -__libm_internal_isnan: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value___libm_internal_isnan.10: -..L11: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - movl %edx, %eax - andl $2146435072, %eax - cmpl $2146435072, %eax - jne ..B4.5 -..B4.2: - testl $1048575, %edx - jne ..B4.4 -..B4.3: - cmpl $0, -8(%rsp) - je ..B4.5 -..B4.4: - movl $1, %eax - ret -..B4.5: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_isnan,@function - .size __libm_internal_isnan,.-__libm_internal_isnan - .data -# -- End __libm_internal_isnan - .text -# -- Begin __libm_internal_isposzero - .text - .align 16,0x90 - .globl __libm_internal_isposzero -__libm_internal_isposzero: -# parameter 1: %xmm0 -..B5.1: - .cfi_startproc -..___tag_value___libm_internal_isposzero.13: -..L14: - - movsd %xmm0, -8(%rsp) - cmpl $0, -4(%rsp) - jne ..B5.4 -..B5.2: - cmpl $0, -8(%rsp) - jne ..B5.4 -..B5.3: - movl $1, %eax - ret -..B5.4: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_isposzero,@function - .size __libm_internal_isposzero,.-__libm_internal_isposzero - .data -# -- End __libm_internal_isposzero - .text -# -- Begin __libm_internal_iszero - .text - .align 16,0x90 - .globl __libm_internal_iszero -__libm_internal_iszero: -# parameter 1: %xmm0 -..B6.1: - .cfi_startproc -..___tag_value___libm_internal_iszero.16: -..L17: - - movsd %xmm0, -8(%rsp) - testl $2147483647, -4(%rsp) - jne ..B6.4 -..B6.2: - cmpl $0, -8(%rsp) - jne ..B6.4 -..B6.3: - movl $1, %eax - ret -..B6.4: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_iszero,@function - .size __libm_internal_iszero,.-__libm_internal_iszero - .data -# -- End __libm_internal_iszero - .text -# -- Begin __libm_internal_isnegzero - .text - .align 16,0x90 - .globl __libm_internal_isnegzero -__libm_internal_isnegzero: -# parameter 1: %xmm0 -..B7.1: - .cfi_startproc -..___tag_value___libm_internal_isnegzero.19: -..L20: - - movsd %xmm0, -8(%rsp) - cmpl $-2147483648, -4(%rsp) - jne ..B7.4 -..B7.2: - cmpl $0, -8(%rsp) - jne ..B7.4 -..B7.3: - movl $1, %eax - ret -..B7.4: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_isnegzero,@function - .size __libm_internal_isnegzero,.-__libm_internal_isnegzero - .data -# -- End __libm_internal_isnegzero - .text -# -- Begin __libm_internal_isnzfinite - .text - .align 16,0x90 - .globl __libm_internal_isnzfinite -__libm_internal_isnzfinite: -# parameter 1: %xmm0 -..B8.1: - .cfi_startproc -..___tag_value___libm_internal_isnzfinite.22: -..L23: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - movl %edx, %eax - andl $2146435072, %eax - cmpl $2146435072, %eax - jae ..B8.4 -..B8.2: - andl $2147483647, %edx - orl -8(%rsp), %edx - je ..B8.4 -..B8.3: - movl $1, %eax - ret -..B8.4: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_isnzfinite,@function - .size __libm_internal_isnzfinite,.-__libm_internal_isnzfinite - .data -# -- End __libm_internal_isnzfinite - .text -# -- Begin __libm_internal_isfinite - .text - .align 16,0x90 - .globl __libm_internal_isfinite -__libm_internal_isfinite: -# parameter 1: %xmm0 -..B9.1: - .cfi_startproc -..___tag_value___libm_internal_isfinite.25: -..L26: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2146435072, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __libm_internal_isfinite,@function - .size __libm_internal_isfinite,.-__libm_internal_isfinite - .data -# -- End __libm_internal_isfinite - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conj.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conj.S deleted file mode 100644 index 91bc92551e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conj.S +++ /dev/null @@ -1,72 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "conj.c" - .text -..TXTST0: -# -- Begin conj - .text - .align 16,0x90 - .globl conj -conj: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_conj.1: -..L2: - - xorps .L_2il0floatpacket.0(%rip), %xmm1 - ret - .align 16,0x90 - .cfi_endproc - .type conj,@function - .size conj,.-conj - .data -# -- End conj - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conjf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conjf.S deleted file mode 100644 index eb0710b0fc..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conjf.S +++ /dev/null @@ -1,78 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "conjf.c" - .text -..TXTST0: -# -- Begin conjf - .text - .align 16,0x90 - .globl conjf -conjf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_conjf.1: -..L2: - - movsd %xmm0, -8(%rsp) - pxor %xmm2, %xmm2 - movss -4(%rsp), %xmm1 - xorps .L_2il0floatpacket.0(%rip), %xmm1 - movss -8(%rsp), %xmm0 - movss %xmm1, %xmm2 - unpcklps %xmm2, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type conjf,@function - .size conjf,.-conjf - .data -# -- End conjf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .long 0x80000000,0x00000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conjl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conjl.S deleted file mode 100644 index a5a6ee7cdc..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/conjl.S +++ /dev/null @@ -1,97 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "conjl.c" - .text -..TXTST0: -# -- Begin conjl - .text - .align 16,0x90 - .globl conjl -conjl: -# parameter 1: 16 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_conjl.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - fldt 16(%rsp) - fldt 32(%rsp) - movq %fs:40, %rax - fchs - xorq %rsp, %rax - movq %rax, (%rsp) - fxch %st(1) - movq (%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B1.4 -..B1.2: - movq (%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.4 -..B1.3: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 -..B1.4: - fstp %st(0) - fstp %st(0) - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type conjl,@function - .size conjl,.-conjl - .data -# -- End conjl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysign_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysign_gen.S deleted file mode 100644 index c3a9c73236..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysign_gen.S +++ /dev/null @@ -1,89 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "copysign_gen.c" - .text -..TXTST0: -# -- Begin copysign - .text - .align 16,0x90 - .globl copysign -copysign: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_copysign.1: -..L2: - - lea _ones(%rip), %rax - movsd %xmm1, -24(%rsp) - movl -20(%rsp), %edx - andl $-2147483648, %edx - mulsd (%rax), %xmm0 - movsd (%rax), %xmm2 - mulsd %xmm2, %xmm1 - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %ecx - andl $2147483647, %ecx - orl %edx, %ecx - movl %ecx, -4(%rsp) - movsd %xmm1, -16(%rsp) - movsd -8(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type copysign,@function - .size copysign,.-copysign - .data -# -- End copysign - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysignf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysignf_gen.S deleted file mode 100644 index 7626c5bb8e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysignf_gen.S +++ /dev/null @@ -1,73 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "copysignf_gen.c" - .text -..TXTST0: -# -- Begin copysignf - .text - .align 16,0x90 - .globl copysignf -copysignf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_copysignf.1: -..L2: - - movd %xmm1, %eax - movd %xmm0, %edx - movl %eax, -8(%rsp) - andl $2147483647, %edx - andl $-2147483648, %eax - orl %eax, %edx - movl %edx, -4(%rsp) - movss -4(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type copysignf,@function - .size copysignf,.-copysignf - .data -# -- End copysignf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysignl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysignl.S deleted file mode 100644 index 74375e80b6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/copysignl.S +++ /dev/null @@ -1,119 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "copysignl.c" - .text -..TXTST0: -# -- Begin copysignl - .text - .align 16,0x90 - .globl copysignl -copysignl: -# parameter 1: 64 + %rsp -# parameter 2: 80 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_copysignl.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - xorb %sil, %sil - fldt 64(%rsp) - fstpt (%rsp) -..B1.2: - fnstcw 50(%rsp) -..B1.3: - movzwl 50(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 48(%rsp) -..B1.5: - fldcw 48(%rsp) -..B1.6: - movb $1, %sil -..B1.7: - fldt 80(%rsp) - lea _ones(%rip), %rax - fldt (%rsp) - movb 89(%rsp), %dl - andb $-128, %dl - fldl (%rax) - fmul %st, %st(1) - fxch %st(1) - fstpt 32(%rsp) - fmulp %st, %st(1) - movb 41(%rsp), %cl - andb $127, %cl - orb %dl, %cl - fstpt 16(%rsp) - testb %sil, %sil - movb %cl, 41(%rsp) - je ..B1.9 -..B1.8: - fldcw 50(%rsp) -..B1.9: - fldt 32(%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type copysignl,@function - .size copysignl,.-copysignl - .data -# -- End copysignl - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cos_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cos_gen.S deleted file mode 100644 index 80d3955cf1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cos_gen.S +++ /dev/null @@ -1,1132 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cos_gen.c" - .text -..TXTST0: -# -- Begin cos - .text - .align 16,0x90 - .globl cos -cos: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cos.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - subq $16, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) -..B1.2: - pextrw $3, %xmm0, %eax - andw $32767, %ax - subw $12336, %ax - cmpw $4293, %ax - ja .L_2TAG_PACKET_0.0.1 - movsd PI32INV(%rip), %xmm1 - mulsd %xmm0, %xmm1 - movapd ONEHALF(%rip), %xmm5 - movsd SIGN_MASK(%rip), %xmm4 - andpd %xmm0, %xmm4 - orps %xmm4, %xmm5 - addpd %xmm5, %xmm1 - cvttsd2si %xmm1, %edx - cvtsi2sd %edx, %xmm1 - movapd P_2(%rip), %xmm2 - movsd P_1(%rip), %xmm3 - mulsd %xmm1, %xmm3 - unpcklpd %xmm1, %xmm1 - addq $1865232, %rdx - movsd %xmm0, %xmm4 - andq $63, %rdx - movapd SC_4(%rip), %xmm5 - lea Ctable(%rip), %rax - shlq $5, %rdx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - subsd %xmm3, %xmm0 - mulsd P_3(%rip), %xmm1 - subsd %xmm3, %xmm4 - movsd 8(%rax), %xmm7 - unpcklpd %xmm0, %xmm0 - movsd %xmm4, %xmm3 - subsd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - movapd SC_2(%rip), %xmm6 - mulsd %xmm4, %xmm7 - subsd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subsd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subsd %xmm3, %xmm1 - movsd 24(%rax), %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm7 - mulsd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulsd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm0 - addpd SC_3(%rip), %xmm5 - mulsd (%rax), %xmm4 - addpd SC_1(%rip), %xmm6 - mulpd %xmm0, %xmm5 - movsd %xmm3, %xmm0 - addsd 8(%rax), %xmm3 - mulpd %xmm7, %xmm1 - movsd %xmm4, %xmm7 - addsd %xmm3, %xmm4 - addpd %xmm5, %xmm6 - movsd 8(%rax), %xmm5 - subsd %xmm3, %xmm5 - subsd %xmm4, %xmm3 - addsd 16(%rax), %xmm1 - mulpd %xmm2, %xmm6 - addsd %xmm5, %xmm0 - addsd %xmm7, %xmm3 - addsd %xmm1, %xmm0 - addsd %xmm3, %xmm0 - addsd %xmm6, %xmm0 - unpckhpd %xmm6, %xmm6 - addsd %xmm6, %xmm0 - addsd %xmm4, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_0.0.1: - jg .L_2TAG_PACKET_1.0.1 - pextrw $3, %xmm0, %eax - andw $32767, %ax - pinsrw $3, %eax, %xmm0 - movsd ONE(%rip), %xmm1 - subsd %xmm0, %xmm1 - movsd %xmm1, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_1.0.1: - pextrw $3, %xmm0, %eax - andl $32752, %eax - cmpl $32752, %eax - je .L_2TAG_PACKET_2.0.1 - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - subl $16224, %ecx - shrl $7, %ecx - andl $65532, %ecx - lea PI_INV_TABLE(%rip), %r11 - addq %r11, %rcx - movd %xmm0, %rax - movl 20(%rcx), %r10d - movl 24(%rcx), %r8d - movl %eax, %edx - shrq $21, %rax - orl $-2147483648, %eax - shrl $11, %eax - movl %r10d, %r9d - imulq %rdx, %r10 - imulq %rax, %r9 - imulq %rax, %r8 - movl 16(%rcx), %esi - movl 12(%rcx), %edi - movl %r10d, %r11d - shrq $32, %r10 - addq %r10, %r9 - addq %r8, %r11 - movl %r11d, %r8d - shrq $32, %r11 - addq %r11, %r9 - movl %esi, %r10d - imulq %rdx, %rsi - imulq %rax, %r10 - movl %edi, %r11d - imulq %rdx, %rdi - movl %esi, %ebx - shrq $32, %rsi - addq %rbx, %r9 - movl %r9d, %ebx - shrq $32, %r9 - addq %rsi, %r10 - addq %r9, %r10 - shlq $32, %rbx - orq %rbx, %r8 - imulq %rax, %r11 - movl 8(%rcx), %r9d - movl 4(%rcx), %esi - movl %edi, %ebx - shrq $32, %rdi - addq %rbx, %r10 - movl %r10d, %ebx - shrq $32, %r10 - addq %rdi, %r11 - addq %r10, %r11 - movq %r9, %rdi - imulq %rdx, %r9 - imulq %rax, %rdi - movl %r9d, %r10d - shrq $32, %r9 - addq %r10, %r11 - movl %r11d, %r10d - shrq $32, %r11 - addq %r9, %rdi - addq %r11, %rdi - movq %rsi, %r9 - imulq %rdx, %rsi - imulq %rax, %r9 - shlq $32, %r10 - orq %rbx, %r10 - movl (%rcx), %eax - movl %esi, %r11d - shrq $32, %rsi - addq %r11, %rdi - movl %edi, %r11d - shrq $32, %rdi - addq %rsi, %r9 - addq %rdi, %r9 - imulq %rax, %rdx - pextrw $3, %xmm0, %ebx - lea PI_INV_TABLE(%rip), %rdi - subq %rdi, %rcx - addl %ecx, %ecx - addl %ecx, %ecx - addl %ecx, %ecx - addl $19, %ecx - movl $32768, %esi - andl %ebx, %esi - shrl $4, %ebx - andl $2047, %ebx - subl $1023, %ebx - subl %ebx, %ecx - addq %rdx, %r9 - movl %ecx, %edx - addl $32, %edx - cmpl $1, %ecx - jl .L_2TAG_PACKET_3.0.1 - negl %ecx - addl $29, %ecx - shll %cl, %r9d - movl %r9d, %edi - andl $536870911, %r9d - testl $268435456, %r9d - jne .L_2TAG_PACKET_4.0.1 - shrl %cl, %r9d - movl $0, %ebx - shlq $32, %r9 - orq %r11, %r9 -.L_2TAG_PACKET_5.0.1: -.L_2TAG_PACKET_6.0.1: - cmpq $0, %r9 - je .L_2TAG_PACKET_7.0.1 -.L_2TAG_PACKET_8.0.1: - bsr %r9, %r11 - movl $29, %ecx - subl %r11d, %ecx - jle .L_2TAG_PACKET_9.0.1 - shlq %cl, %r9 - movq %r10, %rax - shlq %cl, %r10 - addl %ecx, %edx - negl %ecx - addl $64, %ecx - shrq %cl, %rax - shrq %cl, %r8 - orq %rax, %r9 - orq %r8, %r10 -.L_2TAG_PACKET_10.0.1: - cvtsi2sdq %r9, %xmm0 - shrq $1, %r10 - cvtsi2sdq %r10, %xmm3 - xorpd %xmm4, %xmm4 - shll $4, %edx - negl %edx - addl $16368, %edx - orl %esi, %edx - xorl %ebx, %edx - pinsrw $3, %edx, %xmm4 - movsd PI_4(%rip), %xmm2 - movsd 8+PI_4(%rip), %xmm6 - xorpd %xmm5, %xmm5 - subl $1008, %edx - pinsrw $3, %edx, %xmm5 - mulsd %xmm4, %xmm0 - shll $16, %esi - sarl $31, %esi - mulsd %xmm5, %xmm3 - movsd %xmm0, %xmm1 - mulsd %xmm2, %xmm0 - shrl $29, %edi - addsd %xmm3, %xmm1 - mulsd %xmm2, %xmm3 - addl %esi, %edi - xorl %esi, %edi - mulsd %xmm1, %xmm6 - movl %edi, %eax - addsd %xmm3, %xmm6 - movsd %xmm0, %xmm2 - addsd %xmm6, %xmm0 - subsd %xmm0, %xmm2 - addsd %xmm2, %xmm6 -.L_2TAG_PACKET_11.0.1: - movsd PI32INV(%rip), %xmm1 - mulsd %xmm0, %xmm1 - movq ONEHALF(%rip), %xmm5 - movq SIGN_MASK(%rip), %xmm4 - andpd %xmm0, %xmm4 - orps %xmm4, %xmm5 - addpd %xmm5, %xmm1 - cvttsd2si %xmm1, %rdx - cvtsi2sdq %rdx, %xmm1 - movsd P_1(%rip), %xmm3 - movapd P_2(%rip), %xmm2 - mulsd %xmm1, %xmm3 - unpcklpd %xmm1, %xmm1 - shll $3, %eax - addl $1865232, %edx - movsd %xmm0, %xmm4 - addl %eax, %edx - andl $63, %edx - movapd SC_4(%rip), %xmm5 - lea Ctable(%rip), %rax - shll $5, %edx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - subsd %xmm3, %xmm0 - mulsd P_3(%rip), %xmm1 - subsd %xmm3, %xmm4 - movsd 8(%rax), %xmm7 - unpcklpd %xmm0, %xmm0 - movsd %xmm4, %xmm3 - subsd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - mulsd %xmm4, %xmm7 - subsd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subsd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subsd %xmm3, %xmm1 - movsd 24(%rax), %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm7 - subsd %xmm6, %xmm1 - movapd SC_2(%rip), %xmm6 - mulsd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulsd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm0 - addpd SC_3(%rip), %xmm5 - mulsd (%rax), %xmm4 - addpd SC_1(%rip), %xmm6 - mulpd %xmm0, %xmm5 - movsd %xmm3, %xmm0 - addsd 8(%rax), %xmm3 - mulpd %xmm7, %xmm1 - movsd %xmm4, %xmm7 - addsd %xmm3, %xmm4 - addpd %xmm5, %xmm6 - movsd 8(%rax), %xmm5 - subsd %xmm3, %xmm5 - subsd %xmm4, %xmm3 - addsd 16(%rax), %xmm1 - mulpd %xmm2, %xmm6 - addsd %xmm0, %xmm5 - addsd %xmm7, %xmm3 - addsd %xmm5, %xmm1 - addsd %xmm3, %xmm1 - addsd %xmm6, %xmm1 - unpckhpd %xmm6, %xmm6 - movsd %xmm4, %xmm0 - addsd %xmm6, %xmm1 - addsd %xmm1, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_7.0.1: - addl $64, %edx - movq %r10, %r9 - movq %r8, %r10 - movq $0, %r8 - cmpq $0, %r9 - jne .L_2TAG_PACKET_8.0.1 - addl $64, %edx - movq %r10, %r9 - movq %r8, %r10 - cmpq $0, %r9 - jne .L_2TAG_PACKET_8.0.1 - xorpd %xmm0, %xmm0 - xorpd %xmm6, %xmm6 - jmp .L_2TAG_PACKET_11.0.1 -.L_2TAG_PACKET_9.0.1: - je .L_2TAG_PACKET_10.0.1 - negl %ecx - shrq %cl, %r10 - movq %r9, %rax - shrq %cl, %r9 - subl %ecx, %edx - negl %ecx - addl $64, %ecx - shlq %cl, %rax - orq %rax, %r10 - jmp .L_2TAG_PACKET_10.0.1 -.L_2TAG_PACKET_3.0.1: - negl %ecx - shlq $32, %r9 - orq %r11, %r9 - shlq %cl, %r9 - movq %r9, %rdi - testl $-2147483648, %r9d - jne .L_2TAG_PACKET_12.0.1 - shrl %cl, %r9d - movl $0, %ebx - shrq $3, %rdi - jmp .L_2TAG_PACKET_6.0.1 -.L_2TAG_PACKET_4.0.1: - shrl %cl, %r9d - movl $536870912, %ebx - shrl %cl, %ebx - shlq $32, %r9 - orq %r11, %r9 - shlq $32, %rbx - addl $536870912, %edi - movq $0, %rcx - movq $0, %r11 - subq %r8, %rcx - sbbq %r10, %r11 - sbbq %r9, %rbx - movq %rcx, %r8 - movq %r11, %r10 - movq %rbx, %r9 - movl $32768, %ebx - jmp .L_2TAG_PACKET_5.0.1 -.L_2TAG_PACKET_12.0.1: - shrl %cl, %r9d - movq $0x100000000, %rbx - shrq %cl, %rbx - movq $0, %rcx - movq $0, %r11 - subq %r8, %rcx - sbbq %r10, %r11 - sbbq %r9, %rbx - movq %rcx, %r8 - movq %r11, %r10 - movq %rbx, %r9 - movl $32768, %ebx - shrq $3, %rdi - addl $536870912, %edi - jmp .L_2TAG_PACKET_6.0.1 -.L_2TAG_PACKET_2.0.1: - movsd 8(%rsp), %xmm0 - mulsd NEG_ZERO(%rip), %xmm0 - movsd %xmm0, (%rsp) -.L_2TAG_PACKET_13.0.1: -..B1.4: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cos,@function - .size cos,.-cos - .data -# -- End cos - .section .rodata, "a" - .align 16 - .align 16 -ONEHALF: - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .type ONEHALF,@object - .size ONEHALF,16 - .align 16 -P_2: - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .type P_2,@object - .size P_2,16 - .align 16 -SC_4: - .long 2773927732 - .long 1053236707 - .long 436314138 - .long 1056571808 - .type SC_4,@object - .size SC_4,16 - .align 16 -Ctable: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 1072693248 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1071644672 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 1071644672 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1070596096 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 1070596096 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1069547520 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 3217031168 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 3218079744 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 3218079744 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 3219128320 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 3220176896 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3219128320 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 3219128320 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3218079744 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 3218079744 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 1069547520 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 1070596096 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 1070596096 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 1071644672 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 1072693248 - .type Ctable,@object - .size Ctable,2048 - .align 16 -SC_2: - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .type SC_2,@object - .size SC_2,16 - .align 16 -SC_3: - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .type SC_3,@object - .size SC_3,16 - .align 16 -SC_1: - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .type SC_1,@object - .size SC_1,16 - .align 16 -PI_INV_TABLE: - .long 0 - .long 0 - .long 2734261102 - .long 1313084713 - .long 4230436817 - .long 4113882560 - .long 3680671129 - .long 1011060801 - .long 4266746795 - .long 3736847713 - .long 3072618042 - .long 1112396512 - .long 105459434 - .long 164729372 - .long 4263373596 - .long 2972297022 - .long 3900847605 - .long 784024708 - .long 3919343654 - .long 3026157121 - .long 965858873 - .long 2203269620 - .long 2625920907 - .long 3187222587 - .long 536385535 - .long 3724908559 - .long 4012839307 - .long 1510632735 - .long 1832287951 - .long 667617719 - .long 1330003814 - .long 2657085997 - .long 1965537991 - .long 3957715323 - .long 1023883767 - .long 2320667370 - .long 1811636145 - .long 529358088 - .long 1443049542 - .long 4235946923 - .long 4040145953 - .type PI_INV_TABLE,@object - .size PI_INV_TABLE,164 - .space 12, 0x00 # pad - .align 16 -PI_4: - .long 1073741824 - .long 1072243195 - .long 407279769 - .long 1046758445 - .type PI_4,@object - .size PI_4,16 - .align 8 -PI32INV: - .long 1841940611 - .long 1076125488 - .type PI32INV,@object - .size PI32INV,8 - .align 8 -SIGN_MASK: - .long 0 - .long 2147483648 - .type SIGN_MASK,@object - .size SIGN_MASK,8 - .align 8 -P_1: - .long 1413480448 - .long 1069097467 - .type P_1,@object - .size P_1,8 - .align 8 -P_3: - .long 771977331 - .long 996350346 - .type P_3,@object - .size P_3,8 - .align 8 -ONE: - .long 0 - .long 1072693248 - .type ONE,@object - .size ONE,8 - .align 8 -NEG_ZERO: - .long 0 - .long 2147483648 - .type NEG_ZERO,@object - .size NEG_ZERO,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosdl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosdl.S deleted file mode 100644 index 2c71db4d52..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosdl.S +++ /dev/null @@ -1,692 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cosdl.c" - .text -..TXTST0: -# -- Begin cosdl - .text - .align 16,0x90 - .globl cosdl -cosdl: -# parameter 1: 144 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cosdl.1: -..L2: - - subq $136, %rsp - .cfi_def_cfa_offset 144 - xorb %r8b, %r8b -..B1.2: - fnstcw 122(%rsp) -..B1.3: - movzwl 122(%rsp), %edx - movl %edx, %eax - andl $3840, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - andl $-3841, %edx - orl $-64768, %edx - movw %dx, 120(%rsp) -..B1.5: - fldcw 120(%rsp) -..B1.6: - movb $1, %r8b -..B1.7: - fldt 144(%rsp) - lea ones(%rip), %rdi - movzwl 152(%rsp), %eax - movl %eax, %esi - shrl $15, %eax - andl $32767, %esi - cmpl $32767, %esi - fmuls (%rdi,%rax,4) - fstpt 144(%rsp) - fldt 144(%rsp) - je ..B1.26 -..B1.8: - fldt .L_2il0floatpacket.0(%rip) - fucomip %st(1), %st - jp ..B1.9 - je ..B1.25 -..B1.9: - cmpl $10783, %esi - jge ..B1.11 -..B1.10: - fldt .L_2il0floatpacket.1(%rip) - fsubp %st, %st(1) - fstpt 104(%rsp) - jmp ..B1.21 -..B1.11: - cmpl $16446, %esi - jge ..B1.16 -..B1.12: - fldt .L_2il0floatpacket.2(%rip) - lea _Rcp90(%rip), %rax - fldt .L_2il0floatpacket.3(%rip) - fldt .L_2il0floatpacket.0(%rip) - fldt (%rax) - fmulp %st, %st(4) - fxch %st(2) - fadd %st, %st(3) - fxch %st(3) - fstpt 80(%rsp) - fldt 80(%rsp) - movl 80(%rsp), %ecx - fsubp %st, %st(3) - fmulp %st, %st(2) - incl %ecx - fldt 144(%rsp) - movl %ecx, %edx - andl $2, %edx - fsubp %st, %st(2) - shrl $1, %edx - movss (%rdi,%rdx,4), %xmm0 - fucomip %st(1), %st - jp ..B1.13 - je ..B1.24 -..B1.13: - fldt .L_2il0floatpacket.4(%rip) - lea _TWO_53H(%rip), %rax - fmul %st(1), %st - fld %st(1) - movss %xmm0, (%rsp) - testb $1, %cl - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fld %st(2) - fsub %st(2), %st - fmul %st, %st(2) - fld %st(3) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(3) - fld %st(1) - fld %st(4) - fldl (%rax) - fld %st(0) - fmul %st(5), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(5) - fxch %st(1) - fmul %st, %st(2) - fld %st(5) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(1) - fsub %st(2), %st - fstpt 64(%rsp) - fld %st(4) - fmul %st(5), %st - fld %st(0) - fmul %st(1), %st - flds (%rsp) - fstps 96(%rsp) - je ..B1.15 -..B1.14: - fstp %st(6) - fstp %st(2) - fld %st(2) - lea 112+_cosdl_poly_coeff(%rip), %rax - fmul %st(3), %st - lea 80+_cosdl_poly_coeff(%rip), %rdx - fmul %st, %st(1) - fld %st(2) - fmul %st(5), %st - fxch %st(4) - fstpt (%rsp) - fldt (%rsp) - fld %st(3) - lea 96+_cosdl_poly_coeff(%rip), %rsi - lea 48+_cosdl_poly_coeff(%rip), %rcx - lea 64+_cosdl_poly_coeff(%rip), %rdi - lea 32+_cosdl_poly_coeff(%rip), %r9 - lea 24+_cosdl_mp_poly_coeff(%rip), %r10 - lea 8+_cosdl_mp_poly_coeff(%rip), %r11 - fmul %st(7), %st - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(5) - fld %st(1) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(3) - fldt (%rax) - fmul %st(5), %st - fldt (%rdx) - lea 16+_cosdl_mp_poly_coeff(%rip), %rax - lea _cosdl_mp_poly_coeff(%rip), %rdx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - fmul %st(6), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r9) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fldl (%r10) - fmulp %st, %st(5) - faddp %st, %st(4) - fldl (%r11) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl (%rax) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldl (%rdx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldt (%rsp) - fmulp %st, %st(2) - fld %st(1) - fldt 16(%rsp) - fmulp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - flds 96(%rsp) - fld %st(0) - fldt .L_2il0floatpacket.1(%rip) - fadd %st(4), %st - fmul %st, %st(1) - fldt .L_2il0floatpacket.1(%rip) - fsubp %st, %st(1) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 104(%rsp) - jmp ..B1.21 -..B1.15: - fld %st(6) - lea 128+_sindl_poly_coeff(%rip), %rax - fmul %st(2), %st - lea 96+_sindl_poly_coeff(%rip), %rdx - fstpt 32(%rsp) - fld %st(4) - fmul %st(4), %st - lea 64+_sindl_poly_coeff(%rip), %rcx - fmul %st, %st(3) - lea 32+_sindl_poly_coeff(%rip), %rsi - fxch %st(6) - fmul %st(7), %st - fxch %st(2) - fstpt 16(%rsp) - lea 112+_sindl_poly_coeff(%rip), %rdi - fxch %st(3) - fstpt (%rsp) - lea 80+_sindl_poly_coeff(%rip), %r9 - fldt 64(%rsp) - lea 48+_sindl_poly_coeff(%rip), %r10 - lea 24+_sindl_mp_poly_coeff(%rip), %r11 - fmul %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fld %st(4) - fadd %st(2), %st - fsubp %st, %st(2) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fsubrp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - lea 8+_sindl_mp_poly_coeff(%rip), %rax - lea 16+_sindl_mp_poly_coeff(%rip), %rdx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea _sindl_mp_poly_coeff(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fldt 16(%rsp) - fmulp %st, %st(1) - fldt (%rdi) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 32(%rsp) - fmul %st, %st(1) - fldl (%r11) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl (%rax) - fmulp %st, %st(4) - faddp %st, %st(3) - fldl (%rdx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldl (%rcx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldt (%rsp) - fmulp %st, %st(2) - fld %st(1) - fldt 48(%rsp) - fmulp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - flds 96(%rsp) - fld %st(0) - fmulp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 104(%rsp) - jmp ..B1.21 -..B1.16: - fstp %st(0) - lea -16446(%rsi), %ecx - cmpl $14, %ecx - jle ..B1.18 -..B1.17: - addl $-16449, %esi - movl $715827883, %eax - imull %esi - movl %esi, %ecx - sarl $1, %edx - sarl $31, %ecx - subl %ecx, %edx - lea (,%rdx,8), %r9d - lea (%r9,%rdx,4), %r10d - subl %r10d, %esi - lea 3(%rsi), %ecx -..B1.18: - movl 148(%rsp), %r11d - movl %r11d, %esi - shll $8, %esi - movl $381774871, %eax - movl %esi, %r9d - andl $-16777216, %r11d - shrl $3, %r9d - movl %r11d, %r10d - mull %r9d - shrl $19, %r11d - shrl $2, %edx - imull $-360, %edx, %eax - addl %eax, %esi - movl $381774871, %eax - mull %r11d - shrl $16, %r10d - movl $381774871, %eax - shrl $2, %edx - imull $-360, %edx, %r11d - addl %r11d, %r10d - movl 144(%rsp), %r9d - addl %r10d, %esi - movl %r9d, %r10d - shrl $3, %r10d - mull %r10d - shrl $2, %edx - imull $-360, %edx, %eax - addl %eax, %r9d - movl $-1240768329, %eax - addl %r9d, %esi - shll %cl, %esi - imull %esi - movl %esi, %ecx - addl %esi, %edx - sarl $8, %edx - sarl $31, %ecx - subl %ecx, %edx - movl $1, %ecx - imull $-360, %edx, %eax - lea (%rsi,%rax), %edx - cmpl $179, %edx - lea -180(%rsi,%rax), %eax - movl $3, %esi - cmovg %eax, %edx - cmovg %esi, %ecx - cmpl $89, %edx - jle ..B1.20 -..B1.19: - incl %ecx - addl $-90, %edx -..B1.20: - movl %ecx, %eax - andl $2, %ecx - andl $1, %eax - addl %eax, %eax - movq __libm_sindl_cosdl_table@GOTPCREL(%rip), %rsi - shrl $1, %ecx - lea (%rax,%rdx,4), %edx - movslq %edx, %rdx - fldl (%rsi,%rdx,8) - faddl 8(%rsi,%rdx,8) - fmuls (%rdi,%rcx,4) - fstpt 104(%rsp) -..B1.21: - testb %r8b, %r8b - je ..B1.23 -..B1.22: - fldcw 122(%rsp) -..B1.23: - fldt 104(%rsp) - addq $136, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 -..B1.24: - fstp %st(0) - fldt .L_2il0floatpacket.0(%rip) - testb $1, %cl - movss %xmm0, (%rsp) - flds (%rsp) - fcmove %st(1), %st - fstp %st(1) - fstpt 104(%rsp) - jmp ..B1.21 -..B1.25: - fstp %st(0) - fldt .L_2il0floatpacket.1(%rip) - fstpt 104(%rsp) - jmp ..B1.21 -..B1.26: - fldt .L_2il0floatpacket.0(%rip) - fmulp %st, %st(1) - fstpt 104(%rsp) - jmp ..B1.21 - .align 16,0x90 - .cfi_endproc - .type cosdl,@function - .size cosdl,.-cosdl - .data -# -- End cosdl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3e,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0x05,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -_cosdl_poly_coeff: - .word 52350 - .word 41213 - .word 3800 - .word 40885 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 28613 - .word 7908 - .word 35668 - .word 34008 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 19927 - .word 58728 - .word 49885 - .word 45261 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 32884 - .word 22035 - .word 23267 - .word 64541 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 36401 - .word 51897 - .word 8309 - .word 57265 - .word 49070 - .word 0 - .word 0 - .word 0 - .word 34286 - .word 2728 - .word 41564 - .word 34642 - .word 16284 - .word 0 - .word 0 - .word 0 - .word 63248 - .word 18030 - .word 35596 - .word 60796 - .word 49032 - .word 0 - .word 0 - .word 0 - .word 52149 - .word 21294 - .word 63985 - .word 40123 - .word 16245 - .word 0 - .word 0 - .word 0 - .type _cosdl_poly_coeff,@object - .size _cosdl_poly_coeff,128 - .align 16 -_cosdl_mp_poly_coeff: - .long 3675529145 - .long 3206805153 - .long 2134983071 - .long 3151100167 - .long 1787026573 - .long 1043372817 - .long 205083639 - .long 988746860 - .type _cosdl_mp_poly_coeff,@object - .size _cosdl_mp_poly_coeff,32 - .align 16 -_sindl_poly_coeff: - .word 51374 - .word 38121 - .word 13586 - .word 36602 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 50116 - .word 41339 - .word 4204 - .word 60892 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 33704 - .word 2155 - .word 42839 - .word 60780 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 21250 - .word 19076 - .word 27901 - .word 57780 - .word 49097 - .word 0 - .word 0 - .word 0 - .word 9076 - .word 49244 - .word 613 - .word 64083 - .word 16311 - .word 0 - .word 0 - .word 0 - .word 40572 - .word 30418 - .word 36251 - .word 46520 - .word 49061 - .word 0 - .word 0 - .word 0 - .word 3227 - .word 25505 - .word 5540 - .word 47626 - .word 16274 - .word 0 - .word 0 - .word 0 - .word 60933 - .word 3300 - .word 57416 - .word 36218 - .word 49023 - .word 0 - .word 0 - .word 0 - .word 45811 - .word 42646 - .word 37125 - .word 42185 - .word 16235 - .word 0 - .word 0 - .word 0 - .type _sindl_poly_coeff,@object - .size _sindl_poly_coeff,144 - .align 16 -_sindl_mp_poly_coeff: - .long 2723323193 - .long 1066524486 - .long 2863989530 - .long 1008058840 - .long 227815288 - .long 3199056770 - .long 3752327299 - .long 3142458725 - .type _sindl_mp_poly_coeff,@object - .size _sindl_mp_poly_coeff,32 - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 2 -_Rcp90: - .word 46603 - .word 2912 - .word 24758 - .word 46603 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _Rcp90,@object - .size _Rcp90,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosf_gen.S deleted file mode 100644 index 5e2789015c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosf_gen.S +++ /dev/null @@ -1,543 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cosf_gen.c" - .text -..TXTST0: -# -- Begin cosf - .text - .align 16,0x90 - .globl cosf -cosf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cosf.1: -..L2: - -..B1.2: - subq $32, %rsp - .cfi_def_cfa_offset 40 - stmxcsr 8(%rsp) - cmpl $-24577, 8(%rsp) - jne .L_2TAG_PACKET_0.0.1 -.L_2TAG_PACKET_1.0.1: - pshuflw $68, %xmm0, %xmm1 - movd %xmm0, %ecx - cvtps2pd %xmm1, %xmm1 - movq $0x40445f306e000000, %rax - movd %rax, %xmm2 - movl $2147483647, %r10d - movl $1241513983, %r8d - andl %ecx, %r10d - subl %r10d, %r8d - subl $964689920, %r10d - orl %r10d, %r8d - jl .L_2TAG_PACKET_2.0.1 - movq $0x4338000000000000, %r11 - movd %r11, %xmm4 - mulsd %xmm1, %xmm2 - movq $0xbe5b1bbead603d8b, %rdx - movd %rdx, %xmm3 - movapd %xmm2, %xmm5 - addsd %xmm4, %xmm2 - movd %xmm2, %r9d - subsd %xmm4, %xmm2 - mulsd %xmm3, %xmm1 -.L_2TAG_PACKET_3.0.1: - lea Ctable(%rip), %r10 - movl $384, %eax - movq $0x40c37423899a1558, %rdx - movd %rdx, %xmm4 - subsd %xmm2, %xmm5 - addl %r9d, %r9d - movl %r9d, %r8d - sarb $7, %r9b - andl %r8d, %eax - addb %r9b, %r8b - xorb %r9b, %r8b - addsd %xmm5, %xmm1 - andl $254, %r8d - movsd (%r10,%r8,8), %xmm3 - movq $0x40a9f02f6222c720, %r11 - movd %r11, %xmm0 - movapd %xmm1, %xmm2 - unpcklpd %xmm1, %xmm2 - mulsd %xmm1, %xmm1 - movsd 8(%r10,%r8,8), %xmm5 - movl %eax, %r9d - andl $256, %r9d - shlq $55, %r9 - mulsd %xmm2, %xmm3 - movd %r9, %xmm2 - subsd %xmm1, %xmm0 - addl $128, %eax - andl $256, %eax - shlq $55, %rax - subsd %xmm1, %xmm4 - movd %rax, %xmm1 - xorpd %xmm2, %xmm4 - mulsd %xmm5, %xmm0 - mulsd %xmm4, %xmm3 - xorpd %xmm1, %xmm0 - addsd %xmm3, %xmm0 - movl 8(%rsp), %eax - andl $-24577, %eax - cmpl 8(%rsp), %eax - je .L_2TAG_PACKET_4.0.1 - stmxcsr 16(%rsp) - movl 8(%rsp), %eax - andl $24576, %eax - orl %eax, 16(%rsp) - ldmxcsr 16(%rsp) -.L_2TAG_PACKET_4.0.1: - cvtpd2ps %xmm0, %xmm0 - addq $32, %rsp - ret -.L_2TAG_PACKET_2.0.1: - andl $2147483647, %ecx - cmpl $1040187392, %ecx - ja .L_2TAG_PACKET_5.0.1 - movl $1065353216, %eax - movd %rax, %xmm0 - cmpl $0, %ecx - je .L_2TAG_PACKET_6.0.1 - movl $805306368, %eax - movd %rax, %xmm1 - subss %xmm1, %xmm0 -.L_2TAG_PACKET_6.0.1: - movl 8(%rsp), %eax - andl $-24577, %eax - cmpl 8(%rsp), %eax - jne .L_2TAG_PACKET_7.0.1 -.L_2TAG_PACKET_8.0.1: - addq $32, %rsp - ret -.L_2TAG_PACKET_5.0.1: - movd %xmm0, %eax - andl $2139095040, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_9.0.1 - shrl $23, %r10d - subl $27, %r10d - andl $65528, %r10d - lea Pitable(%rip), %rax - movsd (%rax,%r10,2), %xmm3 - movsd 8(%rax,%r10,2), %xmm5 - movq $0xffffffffff000000, %r9 - movd %r9, %xmm2 - movq $0x4338000000000000, %r11 - movd %r11, %xmm4 - andpd %xmm3, %xmm2 - psllq $40, %xmm3 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm1 - movapd %xmm2, %xmm0 - addsd %xmm3, %xmm2 - movapd %xmm2, %xmm5 - subsd %xmm2, %xmm0 - addsd %xmm4, %xmm2 - addsd %xmm0, %xmm3 - movd %xmm2, %r9d - subsd %xmm4, %xmm2 - addsd %xmm3, %xmm1 - jmp .L_2TAG_PACKET_3.0.1 -.L_2TAG_PACKET_9.0.1: - subss %xmm0, %xmm0 - movl 8(%rsp), %eax - andl $-24577, %eax - cmpl 8(%rsp), %eax - jne .L_2TAG_PACKET_7.0.1 - jmp .L_2TAG_PACKET_8.0.1 -.L_2TAG_PACKET_0.0.1: - movl 8(%rsp), %eax - andl $-24577, %eax - movl %eax, 16(%rsp) - ldmxcsr 16(%rsp) - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_7.0.1: - stmxcsr 16(%rsp) - movl 8(%rsp), %eax - andl $24576, %eax - orl %eax, 16(%rsp) - ldmxcsr 16(%rsp) - jmp .L_2TAG_PACKET_8.0.1 - .cfi_def_cfa_offset 8 -..B1.3: - .align 16,0x90 - .cfi_endproc - .type cosf,@function - .size cosf,.-cosf - .data -# -- End cosf - .section .rodata, "a" - .align 16 - .align 16 -Ctable: - .long 0 - .long 0 - .long 3384690142 - .long 1060355388 - .long 918535681 - .long 3195026356 - .long 735532773 - .long 1060354999 - .long 3431923622 - .long 3196074611 - .long 2385983684 - .long 1060353830 - .long 3670374716 - .long 3196605580 - .long 2769466396 - .long 1060351883 - .long 3087185898 - .long 3197121906 - .long 2627920248 - .long 1060349159 - .long 624330694 - .long 3197386271 - .long 418831766 - .long 1060345660 - .long 1991825541 - .long 3197649836 - .long 900924147 - .long 1060341387 - .long 3917367244 - .long 3197912443 - .long 2243801771 - .long 1060336343 - .long 2803392399 - .long 3198165367 - .long 316258674 - .long 1060330532 - .long 2429158325 - .long 3198295476 - .long 1563320407 - .long 1060323956 - .long 1382541649 - .long 3198424870 - .long 1522351063 - .long 1060316620 - .long 4207787592 - .long 3198553470 - .long 1992674941 - .long 1060308528 - .long 321119318 - .long 3198681201 - .long 2434209605 - .long 1060299685 - .long 2865853451 - .long 3198807983 - .long 4249822861 - .long 1060290096 - .long 1666812989 - .long 3198933742 - .long 2181617495 - .long 1060279768 - .long 2082609563 - .long 3199058401 - .long 1475857720 - .long 1060268706 - .long 3726787968 - .long 3199181885 - .long 687004205 - .long 1060256917 - .long 2478530408 - .long 3199254748 - .long 250409509 - .long 1060244408 - .long 3681356269 - .long 3199315204 - .long 2463945945 - .long 1060231186 - .long 1535093810 - .long 3199374963 - .long 2878576948 - .long 1060217260 - .long 350661592 - .long 3199433988 - .long 3162654741 - .long 1060202638 - .long 2042383238 - .long 3199492243 - .long 2490283769 - .long 1060187329 - .long 1925003623 - .long 3199549694 - .long 1813501338 - .long 1060171342 - .long 1689375324 - .long 3199606306 - .long 3838419993 - .long 1060154686 - .long 902054988 - .long 3199662045 - .long 115411415 - .long 1060137373 - .long 1388494065 - .long 3199716877 - .long 1077921708 - .long 1060119411 - .long 3024934267 - .long 3199770769 - .long 3311502568 - .long 1060091288 - .long 3823857331 - .long 3199823689 - .long 1148832537 - .long 1060052839 - .long 17970311 - .long 3199875606 - .long 652328457 - .long 1060013161 - .long 3322544997 - .long 3199926486 - .long 1395127179 - .long 1059972278 - .long 2361617751 - .long 3199976301 - .long 1772140623 - .long 1059930215 - .long 1401987205 - .long 3200025020 - .long 3231311734 - .long 1059886997 - .long 3250975870 - .long 3200072613 - .long 1618129506 - .long 1059842651 - .long 742418353 - .long 3200119053 - .long 4288148241 - .long 1059797202 - .long 2580634211 - .long 3200164310 - .long 4268074870 - .long 1059750679 - .long 3348027550 - .long 3200208358 - .long 1659779181 - .long 1059703110 - .long 755484892 - .long 3200251171 - .long 3567792879 - .long 1059654522 - .long 2993330 - .long 3200273337 - .long 2550341159 - .long 1059604946 - .long 488211833 - .long 3200293469 - .long 2313428161 - .long 1059554411 - .long 3436142021 - .long 3200312945 - .long 453708735 - .long 1059502948 - .long 1407782048 - .long 3200331755 - .long 1264637048 - .long 1059450587 - .long 1575056534 - .long 3200349886 - .long 2771364651 - .long 1059397360 - .long 4275292648 - .long 3200367327 - .long 944109265 - .long 1059343300 - .long 3039475318 - .long 3200384069 - .long 2500108843 - .long 1059288438 - .long 1799297257 - .long 3200400101 - .long 3344537919 - .long 1059232808 - .long 2028347177 - .long 3200415413 - .long 1369913724 - .long 1059176444 - .long 2767093429 - .long 3200429996 - .long 664370609 - .long 1059119379 - .long 646746141 - .long 3200443842 - .long 1372808103 - .long 1059061535 - .long 2796885356 - .long 3200456941 - .long 941816458 - .long 1058944809 - .long 1097233945 - .long 3200469287 - .long 1373383079 - .long 1058826890 - .long 2262842797 - .long 3200480871 - .long 2796081240 - .long 1058707849 - .long 2093526290 - .long 3200491687 - .long 3945677176 - .long 1058587758 - .long 2671784286 - .long 3200501728 - .long 1979618421 - .long 1058466690 - .long 3789723003 - .long 3200510988 - .long 879820317 - .long 1058344717 - .long 2964703016 - .long 3200519462 - .long 2674059679 - .long 1058221912 - .long 4043704933 - .long 3200527144 - .long 2950925715 - .long 1058098350 - .long 36665700 - .long 3200534031 - .long 2811721921 - .long 1057935027 - .long 3193221610 - .long 3200540116 - .long 3297207428 - .long 1057685321 - .long 2063766514 - .long 3200545398 - .long 544295963 - .long 1057434550 - .long 163641427 - .long 3200549873 - .long 3381119115 - .long 1057182863 - .long 3096463640 - .long 3200553537 - .long 3054827835 - .long 1056896220 - .long 1381230637 - .long 3200556390 - .long 3419039295 - .long 1056390099 - .long 522802171 - .long 3200558429 - .long 1693671239 - .long 1055850091 - .long 3836476539 - .long 3200559652 - .long 1466910230 - .long 1054802127 - .long 3861233235 - .long 3200560060 - .long 0 - .long 0 - .type Ctable,@object - .size Ctable,1040 - .align 16 -Pitable: - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1916669064 - .long 1072155675 - .long 660066805 - .long 1024797180 - .long 3829231700 - .long 1062745828 - .long 2884172442 - .long 1017445907 - .long 540874025 - .long 1055617650 - .long 4198409884 - .long 1011844330 - .long 2839315448 - .long 1046639136 - .long 4204424928 - .long 1000582120 - .long 1329339431 - .long 1038229673 - .long 1295478839 - .long 993391741 - .long 658191860 - .long 1024797180 - .long 3691886121 - .long 979325773 - .long 1966800710 - .long 1020436418 - .long 1882642597 - .long 977095991 - .long 2100977488 - .long 1012908661 - .long 1840335565 - .long 967470816 - .long 4198093645 - .long 1000582120 - .long 3307942521 - .long 957055414 - .long 2839123165 - .long 996851343 - .long 1387472776 - .long 952638316 - .long 2788761024 - .long 988712873 - .long 3005712498 - .long 944467026 - .long 3694676832 - .long 979325773 - .long 1326507024 - .long 934847846 - .long 221775557 - .long 970149340 - .long 1133527550 - .long 924162364 - .type Pitable,@object - .size Pitable,240 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosh_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosh_gen.S deleted file mode 100644 index f9fc5f4384..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosh_gen.S +++ /dev/null @@ -1,409 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cosh_gen.c" - .text -..TXTST0: -# -- Begin cosh - .text - .align 16,0x90 - .globl cosh -cosh: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cosh.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - andl $2147483647, %eax - cmpl $1077338037, %eax - jae ..B1.8 -..B1.2: - cmpl $1065646817, %eax - jae ..B1.7 -..B1.3: - movsd .L_2il0floatpacket.12(%rip), %xmm4 - cmpl $1012924416, %eax - jae ..B1.5 -..B1.4: - andps .L_2il0floatpacket.11(%rip), %xmm0 - addsd %xmm4, %xmm0 - movsd %xmm0, -24(%rsp) - ret -..B1.5: - movsd -8(%rsp), %xmm1 - mulsd %xmm1, %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - movsd .L_2il0floatpacket.9(%rip), %xmm0 - mulsd %xmm2, %xmm0 - movsd .L_2il0floatpacket.10(%rip), %xmm3 - mulsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.8(%rip), %xmm0 - mulsd %xmm1, %xmm0 - addsd %xmm3, %xmm0 - addsd %xmm4, %xmm0 -..B1.6: - ret -..B1.7: - movsd -8(%rsp), %xmm1 - lea _TWO_52(%rip), %rax - andps .L_2il0floatpacket.11(%rip), %xmm1 - lea _ptwo_32p1(%rip), %rcx - movsd .L_2il0floatpacket.0(%rip), %xmm2 - lea _ntwo_32p1(%rip), %rsi - mulsd %xmm1, %xmm2 - lea _two_32(%rip), %rdi - movsd .L_2il0floatpacket.1(%rip), %xmm3 - movsd %xmm1, -8(%rsp) - movsd .L_2il0floatpacket.2(%rip), %xmm4 - movsd (%rcx), %xmm6 - movsd (%rsi), %xmm7 - movsd .L_2il0floatpacket.4(%rip), %xmm13 - movsd .L_2il0floatpacket.6(%rip), %xmm14 - movsd .L_2il0floatpacket.3(%rip), %xmm8 - movsd .L_2il0floatpacket.3(%rip), %xmm9 - movq __libm_exp_table_128@GOTPCREL(%rip), %r10 - addsd (%rax), %xmm2 - movsd %xmm2, -24(%rsp) - movsd -24(%rsp), %xmm5 - movl -24(%rsp), %r9d - movl %r9d, %edx - shll $25, %edx - subsd (%rax), %xmm5 - mulsd %xmm5, %xmm3 - mulsd %xmm4, %xmm5 - subsd %xmm3, %xmm1 - movaps %xmm1, %xmm10 - sarl $25, %edx - subsd %xmm5, %xmm10 - movaps %xmm10, %xmm11 - movaps %xmm10, %xmm15 - movslq %edx, %rdx - subsd %xmm10, %xmm1 - addsd %xmm10, %xmm6 - subsd %xmm10, %xmm7 - subsd %xmm5, %xmm1 - movsd %xmm6, -40(%rsp) - subl %edx, %r9d - movsd %xmm7, -32(%rsp) - pxor %xmm5, %xmm5 - movsd -40(%rsp), %xmm2 - addsd %xmm1, %xmm11 - subsd (%rdi), %xmm2 - movaps %xmm11, %xmm12 - addsd %xmm2, %xmm8 - mulsd %xmm11, %xmm12 - subsd %xmm8, %xmm15 - mulsd %xmm12, %xmm13 - mulsd %xmm12, %xmm14 - addsd %xmm1, %xmm15 - addsd .L_2il0floatpacket.5(%rip), %xmm13 - addsd .L_2il0floatpacket.7(%rip), %xmm14 - mulsd %xmm12, %xmm13 - mulsd %xmm12, %xmm14 - mulsd %xmm11, %xmm13 - addsd .L_2il0floatpacket.8(%rip), %xmm14 - addsd %xmm13, %xmm15 - mulsd %xmm12, %xmm14 - movsd -32(%rsp), %xmm0 - addsd %xmm14, %xmm15 - addsd (%rdi), %xmm0 - shlq $4, %rdx - addsd %xmm0, %xmm9 - movsd 1032(%r10,%rdx), %xmm8 - addsd %xmm9, %xmm10 - movaps %xmm8, %xmm4 - addsd %xmm10, %xmm1 - mulsd %xmm15, %xmm4 - addsd %xmm2, %xmm15 - mulsd %xmm8, %xmm2 - mulsd 1024(%r10,%rdx), %xmm15 - xorps .L_2il0floatpacket.13(%rip), %xmm1 - negq %rdx - shrl $7, %r9d - subsd %xmm13, %xmm1 - addsd %xmm15, %xmm4 - addsd %xmm14, %xmm1 - movsd 1032(%r10,%rdx), %xmm15 - movaps %xmm15, %xmm3 - mulsd %xmm1, %xmm3 - addsd %xmm0, %xmm1 - mulsd %xmm15, %xmm0 - mulsd 1024(%r10,%rdx), %xmm1 - shll $23, %r9d - addsd %xmm1, %xmm3 - pxor %xmm1, %xmm1 - lea 1056964608(%r9), %r8d - negl %r9d - addl $1056964608, %r9d - movl %r9d, -12(%rsp) - movl %r8d, -16(%rsp) - cvtss2sd -12(%rsp), %xmm5 - cvtss2sd -16(%rsp), %xmm1 - mulsd %xmm5, %xmm3 - mulsd %xmm0, %xmm5 - mulsd %xmm1, %xmm4 - mulsd %xmm2, %xmm1 - addsd %xmm3, %xmm4 - movaps %xmm5, %xmm0 - addsd %xmm1, %xmm0 - subsd %xmm0, %xmm1 - addsd %xmm1, %xmm5 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm0 - ret -..B1.8: - cmpl $1082536910, %eax - jb ..B1.14 -..B1.9: - jne ..B1.11 -..B1.10: - cmpl $-1883637635, -8(%rsp) - jbe ..B1.14 -..B1.11: - cmpl $2146435072, %eax - jb ..B1.15 -..B1.12: - movsd -8(%rsp), %xmm0 - mulsd %xmm0, %xmm0 -..B1.13: - ret -..B1.14: - movsd -8(%rsp), %xmm12 - lea _TWO_52(%rip), %rax - andps .L_2il0floatpacket.11(%rip), %xmm12 - lea _ptwo_32p1(%rip), %rdx - movsd .L_2il0floatpacket.0(%rip), %xmm0 - lea _two_32(%rip), %rcx - mulsd %xmm12, %xmm0 - lea _TWO_512(%rip), %r9 - movsd .L_2il0floatpacket.1(%rip), %xmm1 - movsd %xmm12, -8(%rsp) - movsd .L_2il0floatpacket.2(%rip), %xmm2 - movsd .L_2il0floatpacket.6(%rip), %xmm11 - movsd .L_2il0floatpacket.4(%rip), %xmm8 - movsd (%rdx), %xmm4 - movsd .L_2il0floatpacket.3(%rip), %xmm5 - movsd .L_2il0floatpacket.8(%rip), %xmm10 - movq __libm_exp_table_128@GOTPCREL(%rip), %r8 - movl $0, -16(%rsp) - addsd (%rax), %xmm0 - movsd %xmm0, -24(%rsp) - movsd -24(%rsp), %xmm3 - movl -24(%rsp), %esi - movl %esi, %edi - shll $25, %edi - subsd (%rax), %xmm3 - mulsd %xmm3, %xmm1 - mulsd %xmm2, %xmm3 - subsd %xmm1, %xmm12 - movaps %xmm12, %xmm6 - sarl $25, %edi - subsd %xmm3, %xmm6 - movaps %xmm6, %xmm7 - subl %edi, %esi - movslq %edi, %rdi - subsd %xmm6, %xmm12 - addsd %xmm6, %xmm4 - subsd %xmm3, %xmm12 - movsd %xmm4, -24(%rsp) - addsd %xmm12, %xmm7 - movaps %xmm7, %xmm9 - mulsd %xmm7, %xmm9 - mulsd %xmm9, %xmm11 - mulsd %xmm9, %xmm8 - mulsd %xmm9, %xmm10 - addsd .L_2il0floatpacket.7(%rip), %xmm11 - addsd .L_2il0floatpacket.5(%rip), %xmm8 - mulsd %xmm9, %xmm11 - mulsd %xmm7, %xmm8 - movsd -24(%rsp), %xmm0 - addsd %xmm8, %xmm11 - subsd (%rcx), %xmm0 - mulsd %xmm9, %xmm11 - addsd %xmm0, %xmm5 - addsd %xmm10, %xmm11 - subsd %xmm5, %xmm6 - shlq $4, %rdi - addsd %xmm6, %xmm12 - movsd 1032(%r8,%rdi), %xmm13 - addsd %xmm11, %xmm12 - movaps %xmm13, %xmm14 - mulsd %xmm12, %xmm14 - addsd %xmm0, %xmm12 - mulsd %xmm13, %xmm0 - mulsd 1024(%r8,%rdi), %xmm12 - shrl $7, %esi - addsd %xmm12, %xmm14 - shll $20, %esi - addsd %xmm14, %xmm0 - addl $534773760, %esi - movl %esi, -12(%rsp) - mulsd -16(%rsp), %xmm0 - mulsd (%r9), %xmm0 - ret -..B1.15: - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type cosh,@function - .size cosh,.-cosh - .data -# -- End cosh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.11: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,16 - .align 16 -.L_2il0floatpacket.13: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x6a3d464e,0x3f56c171 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x5554a6cf,0x3fa55555 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 4 -_TWO_52: - .long 0 - .long 1127219200 - .type _TWO_52,@object - .size _TWO_52,8 - .align 4 -_ptwo_32p1: - .long 1048576 - .long 1106247680 - .type _ptwo_32p1,@object - .size _ptwo_32p1,8 - .align 4 -_ntwo_32p1: - .long 4292870144 - .long 3253731327 - .type _ntwo_32p1,@object - .size _ntwo_32p1,8 - .align 4 -_two_32: - .long 0 - .long 1106247680 - .type _two_32,@object - .size _two_32,8 - .align 4 -_TWO_512: - .long 0 - .long 1609564160 - .type _TWO_512,@object - .size _TWO_512,8 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/coshf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/coshf_gen.S deleted file mode 100644 index 3b0a1333f8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/coshf_gen.S +++ /dev/null @@ -1,323 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "coshf_gen.c" - .text -..TXTST0: -# -- Begin coshf - .text - .align 16,0x90 - .globl coshf -coshf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_coshf.1: -..L2: - - movd %xmm0, %eax - movss %xmm0, -8(%rsp) - andl $2147483647, %eax - cmpl $1107296256, %eax - jae ..B1.10 -..B1.2: - cmpl $1056964608, %eax - jae ..B1.9 -..B1.3: - cmpl $1031798784, %eax - jae ..B1.8 -..B1.4: - cmpl $838860800, %eax - jae ..B1.6 -..B1.5: - andps .L_2il0floatpacket.15(%rip), %xmm0 - addss .L_2il0floatpacket.16(%rip), %xmm0 - movss %xmm0, -16(%rsp) - ret -..B1.6: - pxor %xmm0, %xmm0 - cvtss2sd -8(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - movsd .L_2il0floatpacket.13(%rip), %xmm1 - mulsd %xmm0, %xmm1 - addsd .L_2il0floatpacket.14(%rip), %xmm1 - mulsd %xmm0, %xmm1 - pxor %xmm0, %xmm0 - addsd .L_2il0floatpacket.17(%rip), %xmm1 - cvtsd2ss %xmm1, %xmm0 -..B1.7: - ret -..B1.8: - pxor %xmm1, %xmm1 - cvtss2sd -8(%rsp), %xmm1 - mulsd %xmm1, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.8(%rip), %xmm3 - movsd .L_2il0floatpacket.10(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.9(%rip), %xmm3 - addsd .L_2il0floatpacket.11(%rip), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.17(%rip), %xmm3 - cvtsd2ss %xmm3, %xmm3 - movaps %xmm3, %xmm0 - ret -..B1.9: - pxor %xmm3, %xmm3 - pxor %xmm4, %xmm4 - cvtss2sd -8(%rsp), %xmm3 - andps .L_2il0floatpacket.18(%rip), %xmm3 - pxor %xmm6, %xmm6 - movsd .L_2il0floatpacket.0(%rip), %xmm0 - mulsd %xmm3, %xmm0 - movsd .L_2il0floatpacket.4(%rip), %xmm7 - movsd .L_2il0floatpacket.6(%rip), %xmm5 - movq __libm_expf_table_64@GOTPCREL(%rip), %rsi - addsd .L_2il0floatpacket.1(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm1 - movl -16(%rsp), %ecx - movl %ecx, %eax - shll $26, %eax - subss .L_2il0floatpacket.2(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - mulsd .L_2il0floatpacket.3(%rip), %xmm1 - sarl $26, %eax - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm7 - mulsd %xmm2, %xmm5 - addsd .L_2il0floatpacket.5(%rip), %xmm7 - addsd .L_2il0floatpacket.7(%rip), %xmm5 - mulsd %xmm2, %xmm7 - mulsd %xmm3, %xmm5 - addsd .L_2il0floatpacket.17(%rip), %xmm7 - movslq %eax, %rax - movaps %xmm7, %xmm0 - subl %eax, %ecx - addsd %xmm5, %xmm0 - subsd %xmm5, %xmm7 - shrl $6, %ecx - shlq $3, %rax - shll $23, %ecx - mulsd 256(%rsi,%rax), %xmm0 - negq %rax - mulsd 256(%rsi,%rax), %xmm7 - lea 1056964608(%rcx), %edx - negl %ecx - addl $1056964608, %ecx - movl %edx, -24(%rsp) - movl %ecx, -20(%rsp) - cvtss2sd -24(%rsp), %xmm4 - cvtss2sd -20(%rsp), %xmm6 - mulsd %xmm4, %xmm0 - mulsd %xmm6, %xmm7 - addsd %xmm7, %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.10: - cmpl $1119016188, %eax - jbe ..B1.14 -..B1.11: - cmpl $2139095040, %eax - jb ..B1.15 -..B1.12: - movss -8(%rsp), %xmm0 - mulss %xmm0, %xmm0 -..B1.13: - ret -..B1.14: - pxor %xmm3, %xmm3 - cvtss2sd -8(%rsp), %xmm3 - andps .L_2il0floatpacket.18(%rip), %xmm3 - movsd .L_2il0floatpacket.0(%rip), %xmm0 - mulsd %xmm3, %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - movq __libm_expf_table_64@GOTPCREL(%rip), %rcx - movl $0, -24(%rsp) - addsd .L_2il0floatpacket.1(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm1 - movsd .L_2il0floatpacket.4(%rip), %xmm0 - movl -16(%rsp), %eax - movl %eax, %edx - shll $26, %edx - subss .L_2il0floatpacket.2(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - mulsd .L_2il0floatpacket.3(%rip), %xmm1 - sarl $26, %edx - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - subl %edx, %eax - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm0 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm3, %xmm4 - movslq %edx, %rdx - addsd %xmm4, %xmm0 - shrl $6, %eax - addsd .L_2il0floatpacket.17(%rip), %xmm0 - mulsd 256(%rcx,%rdx,8), %xmm0 - shll $20, %eax - addl $1071644672, %eax - movl %eax, -20(%rsp) - mulsd -24(%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.15: - movss .L_2il0floatpacket.12(%rip), %xmm0 - mulss %xmm0, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type coshf,@function - .size coshf,.-coshf - .data -# -- End coshf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.15: - .long 0x7fffffff,0x00000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 16 -.L_2il0floatpacket.18: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40571547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x41680000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.3: - .long 0xfefa39ef,0xbf862e42 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xeb78fa85,0x3fa56420 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x008d6118,0x3fe00000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xda752d4f,0x3fc55550 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0xffffe7c6,0x3fefffff - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0xdcf5905b,0x3efa3001 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x72601504,0x3fa55555 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x7543543e,0x3f56c143 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0xffe2f097,0x3fdfffff - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x6e6d0908,0x3fa55666 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0xf3327c54,0x3fdfffff - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 8 -.L_2il0floatpacket.17: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,8 - .align 4 -.L_2il0floatpacket.2: - .long 0x4b400000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.12: - .long 0x71800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .align 4 -.L_2il0floatpacket.16: - .long 0x3f800000 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/coshl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/coshl.S deleted file mode 100644 index 7876f73447..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/coshl.S +++ /dev/null @@ -1,897 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "coshl.c" - .text -..TXTST0: -# -- Begin coshl - .text - .align 16,0x90 - .globl coshl -coshl: -# parameter 1: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_coshl.1: -..L2: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %cl, %cl -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movzwl 104(%rsp), %esi - andl $32767, %esi - cmpl $16396, %esi - jge ..B1.52 -..B1.4: - cmpl $16382, %esi - jge ..B1.39 -..B1.5: - movzwl 82(%rsp), %edx - cmpl $16378, %esi - jge ..B1.32 -..B1.6: - cmpl $16372, %esi - jge ..B1.25 -..B1.7: - cmpl $16365, %esi - jge ..B1.18 -..B1.8: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.12 -..B1.9: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.10: - fldcw 80(%rsp) -..B1.11: - movzwl 104(%rsp), %esi - movb $1, %cl - andl $32767, %esi -..B1.12: - fldt 96(%rsp) - cmpl $16308, %esi - fstpt (%rsp) - jge ..B1.14 -..B1.13: - fldt .L_2il0floatpacket.0(%rip) - fldt (%rsp) - faddp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.14: - fldt (%rsp) - lea _Q3(%rip), %rax - fldt .L_2il0floatpacket.0(%rip) - fldt (%rax) - fmul %st(2), %st - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) -..B1.15: - testb %cl, %cl - je ..B1.17 -..B1.16: - fldcw 82(%rsp) -..B1.17: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.18: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.22 -..B1.19: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.20: - fldcw 80(%rsp) -..B1.21: - movb $1, %cl -..B1.22: - fldt 96(%rsp) - lea 16+_Q2(%rip), %rax - fmul %st(0), %st - lea _Q2(%rip), %rdx - fldt (%rax) - testb %cl, %cl - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.24 -..B1.23: - fldcw 82(%rsp) -..B1.24: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.25: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.26: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.27: - fldcw 80(%rsp) -..B1.28: - movb $1, %cl -..B1.29: - fldt 96(%rsp) - lea 48+_Q1(%rip), %rax - fmul %st(0), %st - lea 32+_Q1(%rip), %rsi - fld %st(0) - lea 16+_Q1(%rip), %rdx - fmul %st(1), %st - lea _Q1(%rip), %rdi - fldt (%rax) - testb %cl, %cl - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.31 -..B1.30: - fldcw 82(%rsp) -..B1.31: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.32: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.33: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.34: - fldcw 80(%rsp) -..B1.35: - movb $1, %cl -..B1.36: - fldt 96(%rsp) - lea _TWO_48H(%rip), %rax - fld %st(0) - fld %st(1) - fld %st(2) - lea 96+_Q(%rip), %rdx - fmul %st(3), %st - lea 64+_Q(%rip), %rsi - fld %st(0) - lea 112+_Q(%rip), %r8 - fmul %st(1), %st - lea 32+_Q(%rip), %rdi - fldl (%rax) - lea 80+_Q(%rip), %r9 - lea 48+_Q(%rip), %r10 - lea 16+_Q(%rip), %r11 - lea 144+_Q(%rip), %rax - testb %cl, %cl - fadd %st, %st(4) - fsubr %st, %st(4) - fld %st(4) - fxch %st(4) - fsub %st(5), %st - fmul %st, %st(4) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(3) - fxch %st(3) - fmul %st(0), %st - fldt (%rdx) - lea 128+_Q(%rip), %rdx - fmul %st(4), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r8) - fmul %st(5), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt (%r11) - faddp %st, %st(5) - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fld %st(2) - fldt (%rax) - fld %st(0) - fmul %st(5), %st - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(5) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(4) - fmul %st, %st(1) - fldt (%rdx) - fmul %st, %st(1) - fld %st(1) - fadd %st(3), %st - fadd %st(6), %st - fsub %st, %st(6) - fxch %st(2) - fsub %st(6), %st - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - je ..B1.75 -..B1.37: - fstpt 16(%rsp) -..B1.73: - fldcw 82(%rsp) - jmp ..B1.38 -..B1.75: - fstp %st(0) -..B1.38: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.39: - movzwl 82(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.43 -..B1.40: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.41: - fldcw 80(%rsp) -..B1.42: - movb $1, %cl -..B1.43: - fldt 96(%rsp) - lea ones(%rip), %rax - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %rdi - movb 105(%rsp), %dl - lea _TWO_32(%rip), %r8 - andb $-128, %dl - lea _TWO_32P(%rip), %r9 - shrb $7, %dl - lea 64+_P(%rip), %r10 - fstpt 64(%rsp) - fldl (%rdi) - fldt .L_2il0floatpacket.1(%rip) - fldt .L_2il0floatpacket.2(%rip) - fldt .L_2il0floatpacket.3(%rip) - fldl (%r9) - movzbl %dl, %esi - lea 32+_P(%rip), %r11 - lea 48+_P(%rip), %rdi - fxch %st(5) - fmull (%rax,%rsi,8) - lea _P(%rip), %rsi - fmul %st, %st(3) - fxch %st(3) - fadd %st(4), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(4) - fxch %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fsubp %st, %st(1) - fld %st(0) - movl 16(%rsp), %edx - fsub %st(2), %st - fmul %st, %st(3) - fldl (%r8) - lea 16+_P(%rip), %r8 - fmul %st, %st(1) - movsbq %dl, %rax - fxch %st(1) - fsubrp %st, %st(4) - movzwl 104(%rsp), %r9d - subl %eax, %edx - andl $32767, %r9d - fxch %st(1) - fsub %st(3), %st - shrl $8, %edx - fsubp %st, %st(2) - fld %st(2) - cmpl $16387, %r9d - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fldt (%r10) - fmul %st(1), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - jle ..B1.47 -..B1.44: - addl $16350, %edx - faddp %st, %st(2) - movzwl 72(%rsp), %esi - andl $32767, %edx - andl $-32768, %esi - shlq $4, %rax - orl %edx, %esi - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - testb %cl, %cl - movw %si, 72(%rsp) - fldl 2056(%rdx,%rax) - fldl 2048(%rdx,%rax) - fld %st(0) - fmul %st(4), %st - fxch %st(4) - fadd %st(5), %st - fmul %st(2), %st - faddp %st, %st(4) - fmul %st, %st(4) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fldt 64(%rsp) - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.46 -..B1.45: - fldt .L_2il0floatpacket.0(%rip) - fstpt 48(%rsp) -..B1.74: - fldcw 82(%rsp) -..B1.46: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.47: - je ..B1.63 -..B1.48: - fstp %st(1) - fldt .L_2il0floatpacket.0(%rip) - fstpt 48(%rsp) -..B1.49: - movzwl 56(%rsp), %r8d - lea 16382(%rdx), %esi - negl %edx - andl $-32768, %r8d - addl $16382, %edx - fld %st(0) - andl $32767, %edx - andl $32767, %esi - shlq $4, %rax - orl %edx, %r8d - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - fadd %st(2), %st - fxch %st(2) - fsubrp %st, %st(1) - fld %st(2) - fldl 2056(%rdx,%rax) - fldl 2048(%rdx,%rax) - negq %rax - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 72(%rsp), %edi - fadd %st(1), %st - fmulp %st, %st(4) - fld %st(4) - fmul %st(1), %st - andl $-32768, %edi - faddp %st, %st(4) - fldl 2056(%rdx,%rax) - orl %esi, %edi - fldl 2048(%rdx,%rax) - testb %cl, %cl - fld %st(0) - movw %di, 72(%rsp) - fadd %st(2), %st - fmulp %st, %st(5) - fld %st(6) - fmul %st(2), %st - movw %r8w, 56(%rsp) - fsubrp %st, %st(5) - fxch %st(4) - fstpt 32(%rsp) - fxch %st(3) - fmul %st, %st(5) - fldt 16(%rsp) - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fsub %st(5), %st - fsubr %st, %st(4) - fxch %st(5) - fsubrp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 32(%rsp) - faddp %st, %st(2) - fldt 64(%rsp) - fmul %st, %st(1) - fmulp %st, %st(3) - fldt 48(%rsp) - fmul %st, %st(4) - fld %st(4) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.51 -..B1.50: - fldcw 82(%rsp) -..B1.51: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.52: - je ..B1.68 -..B1.53: - movzwl 82(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.57 -..B1.54: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.55: - fldcw 80(%rsp) -..B1.56: - movzwl 104(%rsp), %esi - movb $1, %cl - andl $32767, %esi -..B1.57: - cmpl $32767, %esi - jne ..B1.59 -..B1.58: - fldt 96(%rsp) - lea ones(%rip), %rdx - movb 105(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %esi - fmull (%rdx,%rsi,8) - fstpt (%rsp) - jmp ..B1.60 -..B1.59: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) -..B1.60: - testb %cl, %cl - je ..B1.62 -..B1.61: - fldcw 82(%rsp) -..B1.62: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.63: - movl 100(%rsp), %esi - cmpl $-782985146, %esi - ja ..B1.44 -..B1.64: - jne ..B1.67 -..B1.65: - cmpl $1501741449, 96(%rsp) - ja ..B1.44 -..B1.66: - fstp %st(1) - fldt .L_2il0floatpacket.0(%rip) - fstpt 48(%rsp) - jmp ..B1.49 -..B1.67: - fstp %st(1) - fldt .L_2il0floatpacket.0(%rip) - fstpt 48(%rsp) - jmp ..B1.49 -..B1.68: - movl 100(%rsp), %eax - cmpl $-1317741120, %eax - jb ..B1.4 -..B1.69: - jne ..B1.53 -..B1.70: - cmpl $833536233, 96(%rsp) - jbe ..B1.4 - jmp ..B1.53 - .align 16,0x90 - .cfi_endproc - .type coshl,@function - .size coshl,.-coshl - .data -# -- End coshl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 2 -_Q3: - .word 21845 - .word 213 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 62430 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 22894 - .word 21845 - .word 43733 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 65531 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 7054 - .word 43693 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 25016 - .word 58228 - .word 24755 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 57397 - .word 35800 - .word 53031 - .word 53262 - .word 16367 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 18360 - .word 43637 - .word 28980 - .word 40373 - .word 49076 - .word 0 - .word 0 - .word 0 - .word 16302 - .word 43691 - .word 43690 - .word 43690 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 46125 - .word 2912 - .word 24758 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 29965 - .word 3335 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 54950 - .word 46751 - .word 32187 - .word 37874 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 30733 - .word 25775 - .word 51110 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 49850 - .word 450 - .word 9929 - .word 51659 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 2776 - .word 45191 - .word 37201 - .word 55334 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,160 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,80 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosl.S deleted file mode 100644 index 98af90ff8f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cosl.S +++ /dev/null @@ -1,1008 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cosl.c" - .text -..TXTST0: -# -- Begin cosl - .text - .align 16,0x90 - .globl cosl -cosl: -# parameter 1: 176 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cosl.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - pushq %rbp - .cfi_def_cfa_offset 24 - .cfi_offset 6, -24 - subq $152, %rsp - .cfi_def_cfa_offset 176 - xorb %bpl, %bpl - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 136(%rsp) -..B1.2: - fnstcw 114(%rsp) -..B1.3: - movzwl 184(%rsp), %edx - andl $32767, %edx - movzwl 114(%rsp), %ecx - cmpl $32767, %edx - je ..B1.72 -..B1.4: - cmpl $16378, %edx - jge ..B1.48 -..B1.5: - cmpl $16372, %edx - jge ..B1.40 -..B1.6: - cmpl $16364, %edx - jge ..B1.32 -..B1.7: - cmpl $16308, %edx - jge ..B1.24 -..B1.8: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.12 -..B1.9: - orl $-64768, %ecx - movw %cx, 112(%rsp) -..B1.10: - fldcw 112(%rsp) -..B1.11: - movzwl 184(%rsp), %edx - movb $1, %bpl - andl $32767, %edx -..B1.12: - testl %edx, %edx - jne ..B1.18 -..B1.13: - cmpl $0, 180(%rsp) - jne ..B1.15 -..B1.14: - cmpl $0, 176(%rsp) - je ..B1.19 -..B1.88: - cmpl $0, 180(%rsp) -..B1.15: - jne ..B1.17 -..B1.16: - cmpl $0, 176(%rsp) - je ..B1.18 -..B1.17: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, (%rsp) -..B1.18: - lea _small_value_80(%rip), %rax - lea _ones(%rip), %rdx - fldt (%rax) - fsubrl (%rdx) - fstpt 8(%rsp) - jmp ..B1.20 -..B1.19: - lea _ones(%rip), %rax - fldl (%rax) - fstpt 8(%rsp) -..B1.20: - testb %bpl, %bpl - je ..B1.22 -..B1.21: - fldcw 114(%rsp) -..B1.22: - movq 136(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.64 -..B1.23: - fldt 8(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.24: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.28 -..B1.25: - orl $-64768, %ecx - movw %cx, 112(%rsp) -..B1.26: - fldcw 112(%rsp) -..B1.27: - movb $1, %bpl -..B1.28: - fldt 176(%rsp) - lea _CP3(%rip), %rax - lea _ones(%rip), %rdx - testb %bpl, %bpl - fldt (%rax) - fmul %st(1), %st - fmulp %st, %st(1) - faddl (%rdx) - fstpt 8(%rsp) - je ..B1.30 -..B1.29: - fldcw 114(%rsp) -..B1.30: - movq 136(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.64 -..B1.31: - fldt 8(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.32: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.33: - orl $-64768, %ecx - movw %cx, 112(%rsp) -..B1.34: - fldcw 112(%rsp) -..B1.35: - movb $1, %bpl -..B1.36: - fldt 176(%rsp) - lea 16+_CP2(%rip), %rax - fmul %st(0), %st - lea _CP2(%rip), %rdx - fldt (%rax) - lea _ones(%rip), %rcx - fmul %st(1), %st - testb %bpl, %bpl - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddl (%rcx) - fstpt 8(%rsp) - je ..B1.38 -..B1.37: - fldcw 114(%rsp) -..B1.38: - movq 136(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.64 -..B1.39: - fldt 8(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.40: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.44 -..B1.41: - orl $-64768, %ecx - movw %cx, 112(%rsp) -..B1.42: - fldcw 112(%rsp) -..B1.43: - movb $1, %bpl -..B1.44: - fldt 176(%rsp) - lea 48+_CP1(%rip), %rax - fmul %st(0), %st - lea 32+_CP1(%rip), %rcx - fld %st(0) - lea 16+_CP1(%rip), %rdx - fmul %st(1), %st - lea _CP1(%rip), %rbx - fldt (%rax) - lea _ones(%rip), %rsi - fmul %st(1), %st - testb %bpl, %bpl - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - fmulp %st, %st(2) - fldt (%rbx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddl (%rsi) - fstpt 8(%rsp) - je ..B1.46 -..B1.45: - fldcw 114(%rsp) -..B1.46: - movq 136(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.64 -..B1.47: - fldt 8(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.48: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.52 -..B1.49: - orl $-64768, %ecx - movw %cx, 112(%rsp) -..B1.50: - fldcw 112(%rsp) -..B1.51: - movzwl 184(%rsp), %edx - movb $1, %bpl - andl $32767, %edx -..B1.52: - cmpl $16382, %edx - jge ..B1.54 -..B1.53: - fldt 176(%rsp) - xorl %ecx, %ecx - movb 185(%rsp), %bl - xorl %esi, %esi - andb $-128, %bl - lea _TWO_52H(%rip), %rdx - shrb $7, %bl - fldl (%rdx) - movzbl %bl, %eax - lea _ones(%rip), %rbx - fxch %st(1) - fmull (%rbx,%rax,8) - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fxch %st(1) - fstpt 176(%rsp) - fldt 176(%rsp) - fxch %st(1) - fxch %st(2) - fxch %st(1) - jmp ..B1.57 -..B1.54: - je ..B1.69 -..B1.55: - fldt 176(%rsp) - xorl %edi, %edi - movb 185(%rsp), %bl - andb $-128, %bl - shrb $7, %bl - movzbl %bl, %eax - lea _ones(%rip), %rbx - fmull (%rbx,%rax,8) - fstpt 176(%rsp) - fldt 176(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - lea 136(%rsp), %rsi - fstpt (%rsp) -..___tag_value_cosl.41: - call __libm_reduce_pi04l@PLT -..___tag_value_cosl.42: -..B1.87: - movl %eax, %esi - addq $16, %rsp - .cfi_def_cfa_offset 176 -..B1.56: - fldl 120(%rsp) - lea 3(%rsi), %ecx - lea _TWO_52H(%rip), %rax - fld %st(0) - movsd 120(%rsp), %xmm0 - shrl $2, %ecx - andl $1, %ecx - mulsd (%rax), %xmm0 - movsd %xmm0, 24(%rsp) - fldl 24(%rsp) - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fldl 128(%rsp) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st -..B1.57: - fld %st(1) - lea _TWO_53H(%rip), %rax - fmul %st(3), %st - fld %st(3) - fmul %st(2), %st - incl %esi - faddp %st, %st(1) - fstpt 88(%rsp) - fldt 88(%rsp) - fld %st(2) - fmul %st(3), %st - testl $2, %esi - fld %st(0) - fadd %st(2), %st - fstpt 40(%rsp) - fldt 40(%rsp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 72(%rsp) - fldt 72(%rsp) - fld %st(1) - fmul %st(2), %st - fld %st(0) - faddp %st, %st(2) - fldl (%rax) - fstpt 56(%rsp) - fldl (%rbx,%rcx,8) - fstpl 104(%rsp) - je ..B1.59 -..B1.58: - lea 112+_SP(%rip), %rax - lea 80+_SP(%rip), %rdx - lea 48+_SP(%rip), %rcx - lea 128+_SP(%rip), %rsi - fxch %st(4) - fstpt 8(%rsp) - lea 16+_SP(%rip), %rbx - lea 96+_SP(%rip), %rdi - lea 64+_SP(%rip), %r8 - fldt (%rax) - lea 32+_SP(%rip), %r9 - lea _SP(%rip), %r10 - lea 160+_SP(%rip), %r11 - lea 144+_SP(%rip), %rax - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r10) - faddp %st, %st(2) - fldt 40(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 72(%rsp) - fldt 88(%rsp) - fldt (%r11) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(5) - fldt (%rax) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fld %st(4) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fadd %st, %st(1) - fld %st(4) - fldt 56(%rsp) - fmul %st(3), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldt 8(%rsp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldl 104(%rsp) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 24(%rsp) - jmp ..B1.60 -..B1.59: - fstp %st(3) - fstp %st(4) - fstp %st(2) - lea 112+_CP(%rip), %rax - lea 80+_CP(%rip), %rdx - lea 128+_CP(%rip), %rdi - lea 96+_CP(%rip), %r8 - lea 48+_CP(%rip), %rcx - lea 64+_CP(%rip), %r9 - lea 16+_CP(%rip), %rsi - lea 32+_CP(%rip), %r10 - fldt (%rax) - lea _CP(%rip), %r11 - lea 160+_CP(%rip), %rax - fmul %st(3), %st - fldt (%rdx) - lea 144+_CP(%rip), %rdx - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - fmul %st(4), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(4) - fldt (%r11) - faddp %st, %st(4) - fldt 40(%rsp) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt 72(%rsp) - fldt 88(%rsp) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rdx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(1) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fldt 56(%rsp) - fmul %st(1), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldl (%rbx) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldl 104(%rsp) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 24(%rsp) -..B1.60: - testb %bpl, %bpl - je ..B1.62 -..B1.61: - fldcw 114(%rsp) -..B1.62: - movq 136(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.64 -..B1.63: - fldt 24(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.64: - call __stack_chk_fail@PLT -..B1.69: - movl 180(%rsp), %eax - cmpl $-921707870, %eax - jb ..B1.53 -..B1.70: - jne ..B1.55 -..B1.71: - cmpl $560513589, 176(%rsp) - jbe ..B1.53 - jmp ..B1.55 -..B1.72: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.76 -..B1.73: - orl $-64768, %ecx - movw %cx, 112(%rsp) -..B1.74: - fldcw 112(%rsp) -..B1.75: - movb $1, %bpl -..B1.76: - cmpl $-2147483648, 180(%rsp) - jne ..B1.79 -..B1.77: - cmpl $0, 176(%rsp) - jne ..B1.79 -..B1.78: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 24(%rsp) - fldl 24(%rsp) - fstpt 8(%rsp) - jmp ..B1.80 -..B1.79: - fldt 176(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) -..B1.80: - testb %bpl, %bpl - je ..B1.82 -..B1.81: - fldcw 114(%rsp) -..B1.82: - movq 136(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.64 -..B1.83: - fldt 8(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cosl,@function - .size cosl,.-cosl - .data -# -- End cosl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_CP3: - .word 0 - .word 65450 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .type _CP3,@object - .size _CP3,16 - .align 2 -_CP2: - .word 63855 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 18238 - .word 17476 - .word 43656 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _CP2,@object - .size _CP2,32 - .align 2 -_CP1: - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 47533 - .word 43689 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 14131 - .word 49466 - .word 24756 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 37142 - .word 18013 - .word 35855 - .word 53259 - .word 16367 - .word 0 - .word 0 - .word 0 - .type _CP1,@object - .size _CP1,64 - .align 2 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _SP,@object - .size _SP,176 - .align 2 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 0 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 0 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _CP,@object - .size _CP,176 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cpow.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cpow.S deleted file mode 100644 index 80151b7eaa..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cpow.S +++ /dev/null @@ -1,931 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cpow.c" - .text -..TXTST0: -# -- Begin cpowf - .text - .align 16,0x90 - .globl cpowf -cpowf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_cpowf.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - movaps %xmm1, %xmm3 - cvtps2pd %xmm0, %xmm1 - cvtps2pd %xmm3, %xmm3 - movaps %xmm1, %xmm0 - movaps %xmm3, %xmm2 - unpckhpd %xmm1, %xmm1 - unpckhpd %xmm3, %xmm3 -..___tag_value_cpowf.4: - call cpow@PLT -..___tag_value_cpowf.5: -..B1.5: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type cpowf,@function - .size cpowf,.-cpowf - .data -# -- End cpowf - .text -# -- Begin cpow - .text - .align 16,0x90 - .globl cpow -cpow: -# parameter 1: %xmm0 -# parameter 2: %xmm2 -..B2.1: - .cfi_startproc -..___tag_value_cpow.8: -..L9: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - xorb %r14b, %r14b - subq $328, %rsp - .cfi_def_cfa_offset 352 - movsd %xmm1, 312(%rsp) - movsd %xmm0, 304(%rsp) - movsd %xmm2, 288(%rsp) - movsd %xmm3, 296(%rsp) -..B2.2: - fnstcw 10(%rsp) -..B2.3: - movzwl 10(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.7 -..B2.4: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B2.5: - fldcw 8(%rsp) -..B2.6: - movb $1, %r14b -..B2.7: - movsd 304(%rsp), %xmm0 -..___tag_value_cpow.15: - call __libm_internal_isnzfinite@PLT -..___tag_value_cpow.16: -..B2.8: - testl %eax, %eax - jne ..B2.29 -..B2.9: - lea ZEROA(%rip), %r13 - movsd 312(%rsp), %xmm3 - movsd (%r13), %xmm2 - ucomisd %xmm2, %xmm3 - jp ..B2.10 - je ..B2.25 -..B2.10: - movsd 288(%rsp), %xmm1 - ucomisd %xmm2, %xmm1 - jp ..B2.11 - je ..B2.23 -..B2.11: - ucomisd %xmm2, %xmm3 - jp ..B2.12 - je ..B2.18 -..B2.12: - movsd 296(%rsp), %xmm0 - ucomisd %xmm2, %xmm0 - jp ..B2.13 - je ..B2.17 -..B2.13: - fldl 304(%rsp) - fstpt 48(%rsp) - fldl 312(%rsp) - fstpt 64(%rsp) - fldt 48(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fldt 64(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fstpt (%rsp) - call logl@PLT -..B2.46: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 160(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2dl@PLT -..B2.45: - fldt .L_2il0floatpacket.2(%rip) - addq $32, %rsp - .cfi_def_cfa_offset 352 - fxch %st(1) - fstpt 80(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt (%rsp) - call expl@PLT -..B2.44: - addq $16, %rsp - .cfi_def_cfa_offset 352 - lea _LD_PI_DIV_180(%rip), %rax - fstpt 208(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(1) - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rsp) - call expl@PLT -..B2.43: - fldt .L_2il0floatpacket.2(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 352 - fxch %st(1) - fstpt 224(%rsp) - fldt 208(%rsp) - fldt 224(%rsp) - fdivrp %st, %st(1) - fstpt 96(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt (%rsp) - call cosl@PLT -..B2.42: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 176(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call cosdl@PLT -..B2.41: - fldt .L_2il0floatpacket.2(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 352 - fxch %st(1) - fstpt 112(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fxch %st(1) - fmull 312(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sinl@PLT -..B2.40: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 192(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sindl@PLT -..B2.39: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 128(%rsp) - fldt 176(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fldt 192(%rsp) - fldt 128(%rsp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpt 240(%rsp) - fldt 192(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fldt 128(%rsp) - fldt 176(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 256(%rsp) - fldt 240(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpl 272(%rsp) - fldt 256(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpl 280(%rsp) -..B2.14: - testb %r14b, %r14b - je ..B2.16 -..B2.15: - fldcw 10(%rsp) -..B2.16: - movsd 272(%rsp), %xmm0 - movsd 280(%rsp), %xmm1 - addq $328, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 352 - .cfi_offset 13, -16 - .cfi_offset 14, -24 -..B2.17: - fldl 304(%rsp) - fstpt 48(%rsp) - fldl 312(%rsp) - fstpt 64(%rsp) - fldt 48(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fldt 64(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - movsd .L_2il0floatpacket.1(%rip), %xmm0 - faddp %st, %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - mulsd 320(%rsp), %xmm0 - fstpt (%rsp) - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fstpt 16(%rsp) - call powl@PLT -..B2.50: - addq $32, %rsp - .cfi_def_cfa_offset 352 - fstpt 96(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2dl@PLT -..B2.49: - addq $32, %rsp - .cfi_def_cfa_offset 352 - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call cosdl@PLT -..B2.48: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 176(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sindl@PLT -..B2.47: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 192(%rsp) - fldt 96(%rsp) - fldt 176(%rsp) - fmulp %st, %st(1) - fstpl 272(%rsp) - fldt 96(%rsp) - fldt 192(%rsp) - fmulp %st, %st(1) - fstpl 280(%rsp) - jmp ..B2.14 -..B2.18: - movsd 304(%rsp), %xmm0 - comisd %xmm2, %xmm0 - jbe ..B2.20 -..B2.19: - addq $-32, %rsp - .cfi_def_cfa_offset 384 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fstpt (%rsp) - movsd %xmm1, 32(%rsp) - fldl 32(%rsp) - fstpt 16(%rsp) - call powl@PLT -..B2.54: - addq $32, %rsp - .cfi_def_cfa_offset 352 - fstpt 96(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 320(%rsp) - fstpt (%rsp) - call logl@PLT -..B2.53: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 32(%rsp) - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call cosl@PLT -..B2.52: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 176(%rsp) - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sinl@PLT -..B2.51: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 192(%rsp) - fldt 176(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpl 272(%rsp) - fldt 192(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpl 280(%rsp) - jmp ..B2.14 -..B2.20: - comisd %xmm0, %xmm2 - jbe ..B2.22 -..B2.21: - fldl 312(%rsp) - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fchs - fstpt 16(%rsp) - fstpt 64(%rsp) - fldt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fstpt (%rsp) - call logl@PLT -..B2.62: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 160(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2dl@PLT -..B2.61: - addq $32, %rsp - .cfi_def_cfa_offset 352 - fstpt 80(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call expl@PLT -..B2.60: - addq $16, %rsp - .cfi_def_cfa_offset 352 - lea _LD_PI_DIV_180(%rip), %rax - fstpt 208(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(1) - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rsp) - call expl@PLT -..B2.59: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 224(%rsp) - fldt 208(%rsp) - fldt 224(%rsp) - fdivrp %st, %st(1) - fstpt 96(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call cosl@PLT -..B2.58: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 176(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call cosdl@PLT -..B2.57: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 112(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sinl@PLT -..B2.56: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 192(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sindl@PLT -..B2.55: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 128(%rsp) - fldt 176(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fldt 192(%rsp) - fldt 128(%rsp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpt 240(%rsp) - fldt 192(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fldt 128(%rsp) - fldt 176(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 256(%rsp) - fldt 240(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpl 272(%rsp) - fldt 256(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpl 280(%rsp) - jmp ..B2.14 -..B2.22: - movq 304(%rsp), %rax - movq 312(%rsp), %rdx - movq %rax, 272(%rsp) - movq %rdx, 280(%rsp) - jmp ..B2.14 -..B2.23: - movsd 296(%rsp), %xmm0 - ucomisd %xmm2, %xmm0 - jne ..B2.11 - jp ..B2.11 -..B2.24: - fldl 304(%rsp) - fstpt 48(%rsp) - fldl 312(%rsp) - fstpt 64(%rsp) - fldt 48(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fldt 64(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fstpt (%rsp) - call logl@PLT -..B2.65: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 160(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2l@PLT -..B2.64: - addq $32, %rsp - .cfi_def_cfa_offset 352 - fstpt 80(%rsp) - fldt 160(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - faddp %st, %st(1) - fstpt (%rsp) - call sinl@PLT -..B2.63: - addq $16, %rsp - .cfi_def_cfa_offset 352 - movq $0x3ff0000000000000, %rax - fstpl (%rsp) - movsd (%rsp), %xmm1 - movsd (%r13), %xmm0 - movsd .L_2il0floatpacket.0(%rip), %xmm2 - andps %xmm2, %xmm1 - andnps %xmm0, %xmm2 - orps %xmm1, %xmm2 - movq %rax, 272(%rsp) - movsd %xmm2, 280(%rsp) - jmp ..B2.14 -..B2.25: - movsd 296(%rsp), %xmm0 - ucomisd %xmm2, %xmm0 - jne ..B2.10 - jp ..B2.10 -..B2.26: - movsd 304(%rsp), %xmm0 - comisd %xmm0, %xmm2 - jbe ..B2.28 -..B2.27: - fldl 312(%rsp) - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fchs - fstpt 16(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2dl@PLT -..B2.69: - addq $32, %rsp - .cfi_def_cfa_offset 352 - fstpt 80(%rsp) - fldt 16(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fstpt (%rsp) - fldl 320(%rsp) - fstpt 16(%rsp) - call powl@PLT -..B2.68: - addq $32, %rsp - .cfi_def_cfa_offset 352 - fstpt 96(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call cosdl@PLT -..B2.67: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 112(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sindl@PLT -..B2.66: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 128(%rsp) - fldt 96(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fstpl 272(%rsp) - fldt 96(%rsp) - fldt 128(%rsp) - fmulp %st, %st(1) - fstpl 280(%rsp) - jmp ..B2.14 -..B2.28: - movsd 288(%rsp), %xmm1 - movsd %xmm3, (%rsp) - call pow@PLT -..B2.70: - movsd (%rsp), %xmm3 - movsd %xmm0, 272(%rsp) - movsd %xmm3, 280(%rsp) - jmp ..B2.14 -..B2.29: - movsd 312(%rsp), %xmm0 -..___tag_value_cpow.87: - call __libm_internal_isnzfinite@PLT -..___tag_value_cpow.88: -..B2.30: - testl %eax, %eax - je ..B2.9 -..B2.31: - movsd 288(%rsp), %xmm0 -..___tag_value_cpow.89: - call __libm_internal_isnzfinite@PLT -..___tag_value_cpow.90: -..B2.32: - testl %eax, %eax - je ..B2.9 -..B2.33: - movsd 296(%rsp), %xmm0 -..___tag_value_cpow.91: - call __libm_internal_isnzfinite@PLT -..___tag_value_cpow.92: -..B2.34: - testl %eax, %eax - je ..B2.9 -..B2.35: - fldl 304(%rsp) - fstpt 48(%rsp) - fldl 312(%rsp) - fstpt 64(%rsp) - fldt 48(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fldt 64(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fstpt (%rsp) - call logl@PLT -..B2.81: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 160(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 384 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) - call atan2dl@PLT -..B2.80: - fldt .L_2il0floatpacket.2(%rip) - addq $32, %rsp - .cfi_def_cfa_offset 352 - fxch %st(1) - fstpt 80(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt (%rsp) - call expl@PLT -..B2.79: - addq $16, %rsp - .cfi_def_cfa_offset 352 - lea _LD_PI_DIV_180(%rip), %rax - fstpt 208(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(1) - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rsp) - call expl@PLT -..B2.78: - fldt .L_2il0floatpacket.2(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 352 - fxch %st(1) - fstpt 224(%rsp) - fldt 208(%rsp) - fldt 224(%rsp) - fdivrp %st, %st(1) - fstpt 96(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 312(%rsp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt (%rsp) - call cosl@PLT -..B2.77: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 176(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call cosdl@PLT -..B2.76: - fldt .L_2il0floatpacket.2(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 352 - fxch %st(1) - fstpt 112(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fxch %st(1) - fmull 312(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sinl@PLT -..B2.75: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 192(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 368 - fldl 304(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - call sindl@PLT -..B2.74: - addq $16, %rsp - .cfi_def_cfa_offset 352 - fstpt 128(%rsp) - fldt 176(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fldt 192(%rsp) - fldt 128(%rsp) - fmulp %st, %st(1) - fsubrp %st, %st(1) - fstpt 240(%rsp) - fldt 192(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fldt 128(%rsp) - fldt 176(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 256(%rsp) - fldt 240(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpl 272(%rsp) - fldt 256(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpl 280(%rsp) - jmp ..B2.14 - .align 16,0x90 - .cfi_endproc - .type cpow,@function - .size cpow,.-cpow - .data -# -- End cpow - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -ZEROA: - .long 0 - .long 0 - .type ZEROA,@object - .size ZEROA,8 - .space 8, 0x00 # pad - .align 16 -_LD_PI_DIV_180: - .word 51374 - .word 38121 - .word 13586 - .word 36602 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _LD_PI_DIV_180,@object - .size _LD_PI_DIV_180,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x80000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cpowl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cpowl.S deleted file mode 100644 index 875f0ba939..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cpowl.S +++ /dev/null @@ -1,137 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cpowl.c" - .text -..TXTST0: -# -- Begin cpowl - .text - .align 16,0x90 - .globl cpowl -cpowl: -# parameter 1: 48 + %rsp -# parameter 2: 80 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cpowl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 32(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 80 - movq %rsp, %r8 - movq 80(%rsp), %rdx - movq 88(%rsp), %rcx - movq 96(%rsp), %rsi - movq 104(%rsp), %rdi - movq %rdx, (%r8) - movq %rcx, 8(%r8) - movq %rsi, 16(%r8) - movq %rdi, 24(%r8) - call clogl@PLT -..B1.9: - fxch %st(1) - fxch %st(1) - addq $32, %rsp - .cfi_def_cfa_offset 48 - fldt 80(%rsp) - fld %st(0) - fmul %st(2), %st - fxch %st(1) - fmul %st(3), %st - fldt 96(%rsp) - fld %st(0) - fmulp %st, %st(5) - fxch %st(4) - fsubrp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 80 - movq %rsp, %rdi - movq 32(%rsp), %rax - movq 40(%rsp), %rdx - movq 48(%rsp), %rcx - movq 56(%rsp), %rsi - movq %rax, (%rdi) - movq %rdx, 8(%rdi) - movq %rcx, 16(%rdi) - movq %rsi, 24(%rdi) - call cexpl@PLT -..B1.8: - fxch %st(1) - addq $32, %rsp - .cfi_def_cfa_offset 48 - movq 32(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.4 -..B1.2: - movq 32(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.4 -..B1.3: - addq $40, %rsp - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 48 -..B1.4: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type cpowl,@function - .size cpowl,.-cpowl - .data -# -- End cpowl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cproj.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cproj.S deleted file mode 100644 index f2fe33a5fe..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cproj.S +++ /dev/null @@ -1,132 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cproj.c" - .text -..TXTST0: -# -- Begin cproj - .text - .align 16,0x90 - .globl cproj -cproj: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cproj.1: -..L2: - - movsd %xmm0, -24(%rsp) - movzwl -18(%rsp), %eax - andl $32752, %eax - movsd %xmm1, -16(%rsp) - cmpl $32752, %eax - je ..B1.10 -..B1.2: - movzwl -10(%rsp), %eax - andl $32752, %eax - cmpl $32752, %eax - jne ..B1.9 -..B1.3: - testl $1048575, -12(%rsp) - jne ..B1.9 -..B1.4: - cmpl $0, -16(%rsp) - jne ..B1.9 -..B1.5: - lea DBL_PINFA(%rip), %rax - testb $-128, -9(%rsp) - movq (%rax), %rdx - movq %rdx, -40(%rsp) - je ..B1.7 -..B1.6: - lea DBL_NZEROA(%rip), %rax - movq (%rax), %rdx - movq %rdx, -32(%rsp) - jmp ..B1.8 -..B1.7: - lea DBL_PZEROA(%rip), %rax - movq (%rax), %rdx - movq %rdx, -32(%rsp) -..B1.8: - movsd -40(%rsp), %xmm0 - movsd -32(%rsp), %xmm1 - ret -..B1.9: - movsd -24(%rsp), %xmm0 - movsd -16(%rsp), %xmm1 - ret -..B1.10: - testl $1048575, -20(%rsp) - jne ..B1.2 -..B1.11: - cmpl $0, -24(%rsp) - je ..B1.5 - jmp ..B1.2 - .align 16,0x90 - .cfi_endproc - .type cproj,@function - .size cproj,.-cproj - .data -# -- End cproj - .section .rodata, "a" - .align 16 - .align 16 -DBL_PINFA: - .long 0 - .long 2146435072 - .type DBL_PINFA,@object - .size DBL_PINFA,8 - .space 8, 0x00 # pad - .align 16 -DBL_NZEROA: - .long 0 - .long 2147483648 - .type DBL_NZEROA,@object - .size DBL_NZEROA,8 - .space 8, 0x00 # pad - .align 16 -DBL_PZEROA: - .long 0 - .long 0 - .type DBL_PZEROA,@object - .size DBL_PZEROA,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cprojf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cprojf.S deleted file mode 100644 index 734fbc8cce..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cprojf.S +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cprojf.c" - .text -..TXTST0: -# -- Begin cprojf - .text - .align 16,0x90 - .globl cprojf -cprojf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_cprojf.1: -..L2: - - movsd %xmm0, -16(%rsp) - movzwl -14(%rsp), %eax - andl $32640, %eax - cmpl $32640, %eax - je ..B1.9 -..B1.2: - movzwl -10(%rsp), %eax - andl $32640, %eax - cmpl $32640, %eax - jne ..B1.8 -..B1.3: - testl $8388607, -12(%rsp) - jne ..B1.8 -..B1.4: - movl $2139095040, -24(%rsp) - testb $-128, -9(%rsp) - je ..B1.6 -..B1.5: - movl $-2147483648, -20(%rsp) - jmp ..B1.7 -..B1.6: - movl $0, -20(%rsp) -..B1.7: - movsd -24(%rsp), %xmm0 - ret -..B1.8: - movsd -16(%rsp), %xmm0 - ret -..B1.9: - testl $8388607, -16(%rsp) - je ..B1.4 - jmp ..B1.2 - .align 16,0x90 - .cfi_endproc - .type cprojf,@function - .size cprojf,.-cprojf - .data -# -- End cprojf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.5: - .long 0x7f800000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,4 - .align 4 -.L_2il0floatpacket.6: - .long 0x80000000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cprojl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cprojl.S deleted file mode 100644 index a212664b1b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/cprojl.S +++ /dev/null @@ -1,152 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "cprojl.c" - .text -..TXTST0: -# -- Begin cprojl - .text - .align 16,0x90 - .globl cprojl -cprojl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_cprojl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movzwl 56(%rsp), %edx - andl $32767, %edx - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 32(%rsp) - cmpl $32767, %edx - je ..B1.12 -..B1.2: - movzwl 72(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.9 -..B1.3: - fldt 48(%rsp) - fstpt (%rsp) - fldt 64(%rsp) - fstpt 16(%rsp) -..B1.4: - movq 32(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.8 -..B1.5: - fldt (%rsp) - fldt 16(%rsp) - movq 32(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.7 -..B1.6: - addq $40, %rsp - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 48 -..B1.7: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.8: - call __stack_chk_fail@PLT -..B1.9: - movq $0x8000000000000000, %rax - cmpq 64(%rsp), %rax - jne ..B1.3 -..B1.10: - fldt .L_2il0floatpacket.7(%rip) - fstpt 16(%rsp) - fldt .L_2il0floatpacket.7(%rip) - fstpt (%rsp) -..B1.11: - fldt .L_2il0floatpacket.8(%rip) - movb 9+.L_2il0floatpacket.7(%rip), %cl - movb 73(%rsp), %dl - andb $127, %cl - andb $-128, %dl - movzwl 8+.L_2il0floatpacket.8(%rip), %eax - orb %dl, %cl - fstpt (%rsp) - orl $-32769, %eax - fldt .L_2il0floatpacket.7(%rip) - fstpt 16(%rsp) - movw %ax, 8(%rsp) - movb %cl, 25(%rsp) - jmp ..B1.4 -..B1.12: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.2 -..B1.13: - fldt .L_2il0floatpacket.7(%rip) - fstpt 16(%rsp) - fldt .L_2il0floatpacket.7(%rip) - fstpt (%rsp) - jmp ..B1.11 - .align 16,0x90 - .cfi_endproc - .type cprojl,@function - .size cprojl,.-cprojl - .data -# -- End cprojl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/creal.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/creal.S deleted file mode 100644 index fd45e1b9c9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/creal.S +++ /dev/null @@ -1,64 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "creal.c" - .text -..TXTST0: -# -- Begin creal - .text - .align 16,0x90 - .globl creal -creal: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_creal.1: -..L2: - - ret - .align 16,0x90 - .cfi_endproc - .type creal,@function - .size creal,.-creal - .data -# -- End creal - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/crealf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/crealf.S deleted file mode 100644 index 96dd08ff3f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/crealf.S +++ /dev/null @@ -1,66 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "crealf.c" - .text -..TXTST0: -# -- Begin crealf - .text - .align 16,0x90 - .globl crealf -crealf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_crealf.1: -..L2: - - movsd %xmm0, -8(%rsp) - movss -8(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type crealf,@function - .size crealf,.-crealf - .data -# -- End crealf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/creall.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/creall.S deleted file mode 100644 index 7ae974ad56..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/creall.S +++ /dev/null @@ -1,65 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "creall.c" - .text -..TXTST0: -# -- Begin creall - .text - .align 16,0x90 - .globl creall -creall: -# parameter 1: 8 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_creall.1: -..L2: - - fldt 8(%rsp) - ret - .align 16,0x90 - .cfi_endproc - .type creall,@function - .size creall,.-creall - .data -# -- End creall - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csin.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csin.S deleted file mode 100644 index 78cd00ed8d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csin.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csin.c" - .text -..TXTST0: -# -- Begin csin - .text - .align 16,0x90 - .globl csin -csin: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_csin.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movsd %xmm1, 24(%rsp) - movzwl 30(%rsp), %eax - andl $32752, %eax - movsd %xmm0, 16(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.5 -..B1.3: - testl $1048575, 28(%rsp) - jne ..B1.7 -..B1.4: - cmpl $0, 24(%rsp) - jne ..B1.7 -..B1.5: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.6: - movb 31(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm1 - movhpd 8(%rsp), %xmm1 -..B1.7: - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - call csinh@PLT -..B1.16: - movsd %xmm0, 16(%rsp) - movzwl 22(%rsp), %eax - andl $32752, %eax - movsd %xmm1, 24(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.11 -..B1.9: - testl $1048575, 20(%rsp) - jne ..B1.13 -..B1.10: - cmpl $0, 16(%rsp) - jne ..B1.13 -..B1.11: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.12: - movb 23(%rsp), %al - notb %al - movb 15(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movsd (%rsp), %xmm1 - movb %dl, 15(%rsp) - movhpd 8(%rsp), %xmm1 -..B1.13: - movaps %xmm1, %xmm2 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm2 - movaps %xmm2, %xmm1 - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type csin,@function - .size csin,.-csin - .data -# -- End csin - .text -# -- Begin csinf - .text - .align 16,0x90 - .globl csinf -csinf: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_csinf.6: -..L7: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) - movzwl 14(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.4 -..B2.3: - testl $8388607, 12(%rsp) - jne ..B2.6 -..B2.4: - movsd %xmm0, (%rsp) -..B2.5: - movb 15(%rsp), %al - notb %al - movb 3(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 3(%rsp) - movsd (%rsp), %xmm0 -..B2.6: - call csinhf@PLT -..B2.14: - movsd %xmm0, 8(%rsp) - movzwl 10(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.9 -..B2.8: - testl $8388607, 8(%rsp) - jne ..B2.11 -..B2.9: - movsd %xmm0, (%rsp) -..B2.10: - movb 11(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm0 -..B2.11: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type csinf,@function - .size csinf,.-csinf - .data -# -- End csinf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinh.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinh.S deleted file mode 100644 index 0c5a8e4b5a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinh.S +++ /dev/null @@ -1,522 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csinh.c" - .text -..TXTST0: -# -- Begin csinhf - .text - .align 16,0x90 - .globl csinhf -csinhf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_csinhf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - cvtps2pd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 -..___tag_value_csinhf.4: - call csinh@PLT -..___tag_value_csinhf.5: -..B1.10: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - movsd %xmm0, 4(%rsp) - movzwl 6(%rsp), %eax - testl $32640, %eax - jne ..B1.4 -..B1.3: - testl $8388607, 4(%rsp) - jne ..B1.6 -..B1.4: - movzwl 10(%rsp), %eax - testl $32640, %eax - jne ..B1.7 -..B1.5: - testl $8388607, 8(%rsp) - je ..B1.7 -..B1.6: - movl $8388608, (%rsp) - movss (%rsp), %xmm1 - movss (%rsp), %xmm0 - mulss %xmm0, %xmm1 - movsd 4(%rsp), %xmm0 - movss %xmm1, (%rsp) -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type csinhf,@function - .size csinhf,.-csinhf - .data -# -- End csinhf - .text -# -- Begin csinh - .text - .align 16,0x90 - .globl csinh -csinh: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_csinh.8: -..L9: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - movq %fs:40, %rax - subq $112, %rsp - .cfi_def_cfa_offset 144 - movsd %xmm0, 48(%rsp) - xorq %rsp, %rax - movzwl 54(%rsp), %r14d - andl $32752, %r14d - shrl $4, %r14d - movsd %xmm1, 56(%rsp) - cmpl $2047, %r14d - movq %rax, 96(%rsp) - jge ..B2.23 -..B2.2: - testl %r14d, %r14d - jle ..B2.42 -..B2.3: - movzwl 62(%rsp), %r13d - andl $32752, %r13d - shrl $4, %r13d - cmpl $2047, %r13d - jge ..B2.24 -..B2.4: - testl %r13d, %r13d - jle ..B2.40 -..B2.5: - cmpl $1034, %r14d - jl ..B2.11 -..B2.6: - lea _CONSTANTS(%rip), %rax - movsd 48(%rsp), %xmm1 - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm1 - movsd %xmm0, 32(%rsp) - movsd 56(%rsp), %xmm0 - movsd %xmm1, 24(%rsp) - movsd %xmm0, 16(%rsp) - call __libm_sse2_sincos@PLT -..B2.52: - movaps %xmm0, %xmm2 - testl %r13d, %r13d - movsd 24(%rsp), %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, (%rsp) - jle ..B2.8 -..B2.7: - movsd 32(%rsp), %xmm0 - mulsd %xmm2, %xmm0 - movsd %xmm0, 32(%rsp) - jmp ..B2.9 -..B2.8: - movsd 32(%rsp), %xmm0 - mulsd 16(%rsp), %xmm0 - movsd %xmm0, 32(%rsp) -..B2.9: - movsd %xmm0, 8(%rsp) - movq 96(%rsp), %rax - xorq %rsp, %rax - movsd (%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.39 -..B2.10: - movsd 32(%rsp), %xmm1 - addq $112, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B2.11: - movsd 48(%rsp), %xmm0 - lea 64(%rsp), %rdi -..___tag_value_csinh.28: - call __libm_cosh_k64@PLT -..___tag_value_csinh.29: -..B2.53: - movl %eax, %r15d -..B2.12: - movsd 64(%rsp), %xmm0 - movsd 72(%rsp), %xmm4 - movaps %xmm0, %xmm5 - movsd .L_2il0floatpacket.11(%rip), %xmm3 - addsd %xmm4, %xmm5 - mulsd %xmm5, %xmm3 - movaps %xmm5, %xmm1 - subsd %xmm0, %xmm1 - movaps %xmm3, %xmm2 - subsd %xmm1, %xmm4 - subsd %xmm5, %xmm2 - movzwl 54(%rsp), %eax - subsd %xmm2, %xmm3 - andl $32752, %eax - subsd %xmm3, %xmm5 - movsd %xmm3, 64(%rsp) - cmpl $13168, %eax - addsd %xmm4, %xmm5 - movsd %xmm5, 72(%rsp) - jge ..B2.14 -..B2.13: - lea 16+_CONSTANTS(%rip), %r14 - lea 40(%rsp), %rdx - movsd 8(%rdx), %xmm0 - pxor %xmm5, %xmm5 - mulsd (%r14), %xmm0 - movsd %xmm0, -8(%rdx) - movzwl -2(%rdx), %eax - movl %eax, %r14d - andl $32752, %r14d - andl $-32753, %eax - shrl $4, %r14d - orl $-49168, %eax - movw %ax, -2(%rdx) - addl $-1279, %r14d - jmp ..B2.16 -..B2.14: - movsd 48(%rsp), %xmm0 - lea 32(%rsp), %rdi -..___tag_value_csinh.30: - call __libm_sinh_k64@PLT -..___tag_value_csinh.31: -..B2.54: - movl %eax, %r14d -..B2.15: - lea 40(%rsp), %rdx - movsd (%rdx), %xmm5 -..B2.16: - movsd 32(%rsp), %xmm0 - movaps %xmm5, %xmm4 - movsd .L_2il0floatpacket.11(%rip), %xmm3 - lea 16(%rsp), %rdi - addsd %xmm0, %xmm4 - mulsd %xmm4, %xmm3 - movaps %xmm4, %xmm1 - subsd %xmm0, %xmm1 - movaps %xmm3, %xmm2 - lea 80(%rsp), %rsi - movsd -24(%rsi), %xmm0 - subsd %xmm4, %xmm2 - subsd %xmm1, %xmm5 - subsd %xmm2, %xmm3 - movsd %xmm3, -48(%rsi) - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - movsd %xmm5, (%rdx) -..___tag_value_csinh.32: - call __libm_sincos_k64@PLT -..___tag_value_csinh.33: -..B2.17: - movsd 80(%rsp), %xmm0 - lea 8+_CONSTANTS(%rip), %rax - movsd 88(%rsp), %xmm4 - movaps %xmm0, %xmm3 - movsd .L_2il0floatpacket.11(%rip), %xmm6 - addsd %xmm4, %xmm3 - mulsd %xmm3, %xmm6 - movaps %xmm3, %xmm1 - subsd %xmm0, %xmm1 - movaps %xmm6, %xmm2 - subsd %xmm1, %xmm4 - subsd %xmm3, %xmm2 - movsd (%rax), %xmm5 - subsd %xmm2, %xmm6 - movzwl 62(%rsp), %edx - subsd %xmm6, %xmm3 - addsd %xmm5, %xmm6 - addsd %xmm3, %xmm4 - andl $32752, %edx - movsd %xmm4, 88(%rsp) - cmpl $13168, %edx - movsd %xmm6, 80(%rsp) - jl ..B2.19 -..B2.18: - xorl %r13d, %r13d - lea 24(%rsp), %rdx - movsd (%rdx), %xmm5 - jmp ..B2.20 -..B2.19: - lea 16+_CONSTANTS(%rip), %r13 - lea 24(%rsp), %rdx - movsd 32(%rdx), %xmm0 - pxor %xmm5, %xmm5 - mulsd (%r13), %xmm0 - movsd %xmm0, -8(%rdx) - movzwl -2(%rdx), %eax - movl %eax, %r13d - andl $32752, %r13d - andl $-32753, %eax - shrl $4, %r13d - orl $-49168, %eax - movw %ax, -2(%rdx) - addl $-1279, %r13d -..B2.20: - movsd 16(%rsp), %xmm0 - movaps %xmm5, %xmm4 - movsd .L_2il0floatpacket.11(%rip), %xmm3 - lea 32(%rsp), %rsi - movl %r14d, %edi - lea (%rsp), %rcx - addsd %xmm0, %xmm4 - mulsd %xmm4, %xmm3 - movaps %xmm4, %xmm1 - subsd %xmm0, %xmm1 - movaps %xmm3, %xmm2 - subsd %xmm1, %xmm5 - subsd %xmm4, %xmm2 - subsd %xmm2, %xmm3 - movsd %xmm3, 16(%rcx) - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - movsd %xmm5, (%rdx) - lea 80(%rsp), %rdx -..___tag_value_csinh.34: - call __libm_mul_k64@PLT -..___tag_value_csinh.35: -..B2.21: - addl %r15d, %r13d - lea 64(%rsp), %rsi - movl %r13d, %edi - lea 16(%rsp), %rdx - lea 8(%rsp), %rcx -..___tag_value_csinh.36: - call __libm_mul_k64@PLT -..___tag_value_csinh.37: -..B2.22: - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 - jmp ..B2.37 -..B2.23: - movzwl 62(%rsp), %r13d - andl $32752, %r13d - shrl $4, %r13d -..B2.24: - testl %r13d, %r13d - jne ..B2.28 -..B2.25: - testl $1048575, 60(%rsp) - jne ..B2.28 -..B2.26: - cmpl $0, 56(%rsp) - jne ..B2.28 -..B2.27: - movsd 48(%rsp), %xmm0 - call sinh@PLT -..B2.55: - movhpd 56(%rsp), %xmm0 - movsd %xmm0, (%rsp) - movhpd %xmm0, 8(%rsp) - jmp ..B2.37 -..B2.28: - cmpl $2047, %r13d - jge ..B2.31 -..B2.29: - movsd 48(%rsp), %xmm0 - movsd %xmm0, 32(%rsp) - call sinh@PLT -..B2.57: - movsd %xmm0, 40(%rsp) - movsd 56(%rsp), %xmm0 - movsd %xmm0, 16(%rsp) - call __libm_sse2_sincos@PLT -..B2.56: - movsd %xmm0, 24(%rsp) - testl %r13d, %r13d - movsd 40(%rsp), %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, (%rsp) - jle ..B2.45 -..B2.30: - movsd 32(%rsp), %xmm0 - call cosh@PLT -..B2.58: - mulsd 24(%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 - jmp ..B2.37 -..B2.31: - movsd 56(%rsp), %xmm0 - call sin@PLT -..B2.59: - movsd %xmm0, 8(%rsp) - cmpl $2047, %r14d - je ..B2.35 -..B2.32: - testl %r14d, %r14d - jne ..B2.36 -..B2.33: - testl $1048575, 52(%rsp) - jne ..B2.36 -..B2.34: - cmpl $0, 48(%rsp) - jne ..B2.36 -..B2.35: - movsd 48(%rsp), %xmm0 - call sinh@PLT -..B2.60: - movsd %xmm0, (%rsp) - movhpd 8(%rsp), %xmm0 - jmp ..B2.37 -..B2.36: - movsd 48(%rsp), %xmm2 - mulsd %xmm0, %xmm2 - movaps %xmm2, %xmm0 - movhpd 8(%rsp), %xmm0 - movsd %xmm2, (%rsp) -..B2.37: - movq 96(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.39 -..B2.38: - movaps %xmm0, %xmm1 - unpckhpd %xmm0, %xmm1 - addq $112, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B2.39: - call __stack_chk_fail@PLT -..B2.40: - testl $1048575, 60(%rsp) - jne ..B2.5 -..B2.41: - cmpl $0, 56(%rsp) - jne ..B2.5 - jmp ..B2.24 -..B2.42: - testl $1048575, 52(%rsp) - jne ..B2.3 -..B2.43: - cmpl $0, 48(%rsp) - jne ..B2.3 - jmp ..B2.23 -..B2.45: - testl %r14d, %r14d - jne ..B2.48 -..B2.46: - testl $1048575, 52(%rsp) - jne ..B2.48 -..B2.47: - cmpl $0, 48(%rsp) - je ..B2.30 -..B2.48: - movsd 32(%rsp), %xmm0 - call cosh@PLT -..B2.61: - mulsd 16(%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - movsd (%rsp), %xmm0 - movhpd 8(%rsp), %xmm0 - jmp ..B2.37 - .align 16,0x90 - .cfi_endproc - .type csinh,@function - .size csinh,.-csinh - .data -# -- End csinh - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.11: - .long 0x02000000,0x41a00000 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 4 -.L_2il0floatpacket.10: - .long 0x00800000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,4 - .align 4 -_CONSTANTS: - .long 0 - .long 2145386496 - .long 0 - .long 1048576 - .long 0 - .long 1341128704 - .type _CONSTANTS,@object - .size _CONSTANTS,24 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinhl.S deleted file mode 100644 index 0dd65ade4a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinhl.S +++ /dev/null @@ -1,694 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csinhl.c" - .text -..TXTST0: -# -- Begin csinhl - .text - .align 16,0x90 - .globl csinhl -csinhl: -# parameter 1: 336 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_csinhl.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - subq $296, %rsp - .cfi_def_cfa_offset 336 - xorb %r15b, %r15b - fldt .L_2il0floatpacket.6(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 288(%rsp) - fstpt 96(%rsp) - fldt 96(%rsp) - fstpt 256(%rsp) - fldt 256(%rsp) - fstpt 272(%rsp) -..B1.2: - fnstcw 114(%rsp) -..B1.3: - movzwl 114(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 112(%rsp) -..B1.5: - fldcw 112(%rsp) -..B1.6: - movb $1, %r15b -..B1.7: - movzwl 344(%rsp), %r13d - andl $32767, %r13d - cmpl $32767, %r13d - jge ..B1.33 -..B1.8: - testl %r13d, %r13d - jle ..B1.51 -..B1.9: - movzwl 360(%rsp), %ebx - andl $32767, %ebx - cmpl $32767, %ebx - jge ..B1.33 -..B1.10: - testl %ebx, %ebx - jle ..B1.49 -..B1.11: - cmpl $16398, %r13d - jl ..B1.20 -..B1.12: - fldt 336(%rsp) - lea _CONSTANTS(%rip), %rax - fldt 352(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fldt (%rax) - fmul %st(0), %st - fmul %st, %st(2) - fxch %st(2) - fstpt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fstpt (%rsp) - fstpt 48(%rsp) - call cosl@PLT -..B1.59: - fldt 48(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt (%rsp) - testl %ebx, %ebx - fmulp %st, %st(2) - fxch %st(1) - fstpt 256(%rsp) - jle ..B1.14 -..B1.13: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 48(%rsp) - call sinl@PLT -..B1.60: - fldt 48(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 - fmulp %st, %st(1) - jmp ..B1.15 -..B1.14: - fldt 16(%rsp) - fmulp %st, %st(1) -..B1.15: - fstpt 272(%rsp) - testb %r15b, %r15b - je ..B1.17 -..B1.16: - fldcw 114(%rsp) -..B1.17: - movq 288(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.48 -..B1.18: - fldt 256(%rsp) - fldt 272(%rsp) - movq 288(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.47 -..B1.19: - addq $296, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -40 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.20: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 352(%rsp) - lea 176(%rsp), %rdi - fstpt (%rsp) -..___tag_value_csinhl.31: - call __libm_coshl_k80@PLT -..___tag_value_csinhl.32: -..B1.61: - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B1.21: - fldt 176(%rsp) - lea 48+_CONSTANTS(%rip), %r14 - fldt .L_2il0floatpacket.7(%rip) - movzwl 344(%rsp), %eax - andl $32767, %eax - fldt (%r14) - cmpl $16183, %eax - fadd %st, %st(3) - fxch %st(3) - fstpt (%rsp) - fldt 160(%rsp) - fld %st(0) - movl (%rsp), %r14d - fadd %st(3), %st - fmul %st, %st(2) - fld %st(0) - fsubr %st(3), %st - fsubrp %st, %st(3) - fxch %st(2) - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(1) - fsubr %st(2), %st - fsubrp %st, %st(3) - fsubrp %st, %st(1) - faddp %st, %st(1) - jge ..B1.23 -..B1.22: - fstp %st(1) - fldt 336(%rsp) - lea 32+_CONSTANTS(%rip), %r13 - fldt 96(%rsp) - lea 208(%rsp), %rdx - fstpt (%rdx) - fldt (%r13) - fmulp %st, %st(1) - fstpt -16(%rdx) - movzwl -8(%rdx), %eax - movl %eax, %r13d - andl $-32768, %eax - andl $32767, %r13d - orl $-49153, %eax - addl $-16639, %r13d - movw %ax, -8(%rdx) - jmp ..B1.25 -..B1.23: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 352(%rsp) - lea 208(%rsp), %rdi - fstpt (%rsp) - fxch %st(1) - fstpt 16(%rsp) - fstpt 64(%rsp) -..___tag_value_csinhl.35: - call __libm_sinhl_k80@PLT -..___tag_value_csinhl.36: -..B1.62: - fldt 64(%rsp) - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B1.24: - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - lea 208(%rsp), %rdx - movl (%rsp), %r13d -..B1.25: - fldt 192(%rsp) - fld %st(0) - fldt (%rdx) - fadd %st, %st(1) - fld %st(1) - fxch %st(2) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.7(%rip) - fmul %st(3), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt 368(%rsp) - fstpt (%rsp) - lea 240(%rsp), %rdi - fstpt 96(%rsp) - fstpt 64(%rsp) -..___tag_value_csinhl.39: - call __libm_cosl_k80@PLT -..___tag_value_csinhl.40: -..B1.63: - fldt 64(%rsp) - fldt 96(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B1.26: - fldt 224(%rsp) - lea 16+_CONSTANTS(%rip), %rax - fld %st(0) - fldt 240(%rsp) - movzwl 360(%rsp), %edx - fadd %st, %st(1) - fld %st(1) - andl $32767, %edx - cmpl $16183, %edx - fxch %st(2) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(1) - fldt .L_2il0floatpacket.7(%rip) - fmul %st(3), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmul %st(4), %st - fxch %st(1) - fmulp %st, %st(4) - fldt (%rax) - faddp %st, %st(1) - jge ..B1.28 -..B1.27: - fldt 352(%rsp) - lea 32+_CONSTANTS(%rip), %rbx - fldt 96(%rsp) - fstpt 144(%rsp) - fldt (%rbx) - fmulp %st, %st(1) - fstpt 128(%rsp) - movzwl 136(%rsp), %eax - movl %eax, %ebx - andl $-32768, %eax - andl $32767, %ebx - orl $-49153, %eax - addl $-16639, %ebx - movw %ax, 136(%rsp) - fldt 128(%rsp) - jmp ..B1.30 -..B1.28: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 368(%rsp) - lea 144(%rsp), %rdi - fstpt (%rsp) - fxch %st(3) - fstpt 16(%rsp) - fstpt -48(%rdi) - fxch %st(1) - fstpt -112(%rdi) - fstpt -80(%rdi) -..___tag_value_csinhl.43: - call __libm_sinl_k80@PLT -..___tag_value_csinhl.44: -..B1.64: - fldt 64(%rsp) - fldt 32(%rsp) - fldt 96(%rsp) - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B1.29: - fldt 128(%rsp) - xorl %ebx, %ebx - fmul %st(5), %st - fstpt 128(%rsp) - fldt 128(%rsp) - fldt 144(%rsp) - fmulp %st, %st(6) - fxch %st(5) - fstpt 96(%rsp) - fldt 96(%rsp) - fstpt 144(%rsp) - fxch %st(4) - fxch %st(2) - fxch %st(1) - fxch %st(2) -..B1.30: - fldt 96(%rsp) - fld %st(1) - movl %r13d, %edi - fadd %st(1), %st - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.7(%rip) - fmul %st(3), %st - fsub %st, %st(1) - fsubp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(5), %st - fldt 64(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - fld %st(0) - fmul %st(4), %st - fstpt (%rsp) - fmulp %st, %st(6) - faddp %st, %st(5) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - fstpt 16(%rsp) - fxch %st(1) - fstpt 48(%rsp) - fstpt 80(%rsp) -..___tag_value_csinhl.47: - call __libm_scalbl_k80@PLT -..___tag_value_csinhl.48: -..B1.65: - fldt 80(%rsp) - fldt 48(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B1.31: - fldt (%rsp) - fld %st(2) - fmul %st(2), %st - addl %ebx, %r14d - fxch %st(4) - fstpt 256(%rsp) - movl %r14d, %edi - fldt 32(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - fld %st(0) - fmul %st(2), %st - fstpt (%rsp) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsp) -..___tag_value_csinhl.51: - call __libm_scalbl_k80@PLT -..___tag_value_csinhl.52: -..B1.66: - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B1.32: - fstpt 272(%rsp) - jmp ..B1.42 -..B1.33: - cmpq $0, 352(%rsp) - jne ..B1.35 -..B1.34: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 352(%rsp) - fstpt (%rsp) - call sinhl@PLT -..B1.67: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt 352(%rsp) - fstpt 272(%rsp) - fstpt 256(%rsp) - jmp ..B1.42 -..B1.35: - movzwl 360(%rsp), %ebx - andl $32767, %ebx - cmpl $32767, %ebx - jge ..B1.38 -..B1.36: - fldt 336(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fstpt (%rsp) - call sinhl@PLT -..B1.69: - fstpt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt 352(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fstpt (%rsp) - call cosl@PLT -..B1.68: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt (%rsp) - testl %ebx, %ebx - fmulp %st, %st(1) - fstpt 256(%rsp) - jle ..B1.53 -..B1.37: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 48(%rsp) - fstpt (%rsp) - call coshl@PLT -..B1.71: - fstpt 16(%rsp) - fldt 32(%rsp) - fstpt (%rsp) - call sinl@PLT -..B1.70: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt (%rsp) - fmulp %st, %st(1) - fstpt 272(%rsp) - jmp ..B1.42 -..B1.38: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 368(%rsp) - fstpt (%rsp) - call sinl@PLT -..B1.72: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fstpt 272(%rsp) - fldt 272(%rsp) - cmpl $32767, %r13d - je ..B1.40 -..B1.39: - cmpq $0, 336(%rsp) - jne ..B1.41 -..B1.40: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 352(%rsp) - fstpt (%rsp) - call sinhl@PLT -..B1.73: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fstpt 256(%rsp) - jmp ..B1.42 -..B1.41: - fldt 336(%rsp) - fmulp %st, %st(1) - fstpt 256(%rsp) -..B1.42: - testb %r15b, %r15b - je ..B1.44 -..B1.43: - fldcw 114(%rsp) -..B1.44: - movq 288(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.48 -..B1.45: - fldt 256(%rsp) - fldt 272(%rsp) - movq 288(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.47 -..B1.46: - addq $296, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -40 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.47: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.48: - call __stack_chk_fail@PLT -..B1.49: - cmpl $0, 356(%rsp) - jne ..B1.11 -..B1.50: - cmpl $0, 352(%rsp) - jne ..B1.11 - jmp ..B1.33 -..B1.51: - cmpl $0, 340(%rsp) - jne ..B1.9 -..B1.52: - cmpl $0, 336(%rsp) - jne ..B1.9 - jmp ..B1.33 -..B1.53: - cmpq $0, 336(%rsp) - je ..B1.37 -..B1.54: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fldt 48(%rsp) - fstpt (%rsp) - call coshl@PLT -..B1.74: - addq $16, %rsp - .cfi_def_cfa_offset 336 - fldt 16(%rsp) - fmulp %st, %st(1) - fstpt 272(%rsp) - jmp ..B1.42 - .align 16,0x90 - .cfi_endproc - .type csinhl,@function - .size csinhl,.-csinhl - .data -# -- End csinhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,16 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,64 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinl.S deleted file mode 100644 index 0df60bdf60..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csinl.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csinl.c" - .text -..TXTST0: -# -- Begin csinl - .text - .align 16,0x90 - .globl csinl -csinl: -# parameter 1: 144 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_csinl.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - subq $128, %rsp - .cfi_def_cfa_offset 144 - xorb %r13b, %r13b - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 112(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 96(%rsp) -..B1.2: - fnstcw 2(%rsp) -..B1.3: - movzwl 2(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, (%rsp) -..B1.5: - fldcw (%rsp) -..B1.6: - movb $1, %r13b -..B1.7: - fldt 160(%rsp) - movzwl 168(%rsp), %eax - andl $32767, %eax - fstpt 80(%rsp) - cmpl $32767, %eax - fldt 144(%rsp) - fstpt 96(%rsp) - jl ..B1.9 -..B1.8: - movq $0x8000000000000000, %rax - cmpq 160(%rsp), %rax - jne ..B1.10 -..B1.9: - movb 169(%rsp), %al - notb %al - movb 89(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 89(%rsp) -..B1.10: - addq $-32, %rsp - .cfi_def_cfa_offset 176 - movq %rsp, %rdi - movq 112(%rsp), %rax - movq 120(%rsp), %rdx - movq 128(%rsp), %rcx - movq 136(%rsp), %rsi - movq %rax, (%rdi) - movq %rdx, 8(%rdi) - movq %rcx, 16(%rdi) - movq %rsi, 24(%rdi) - call csinhl@PLT -..B1.22: - fxch %st(1) - addq $32, %rsp - .cfi_def_cfa_offset 144 - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 24(%rsp), %eax - andl $32767, %eax - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - cmpl $32767, %eax - fstpt 48(%rsp) - fstpt 64(%rsp) - jl ..B1.12 -..B1.11: - movq $0x8000000000000000, %rax - cmpq 16(%rsp), %rax - jne ..B1.13 -..B1.12: - movb 25(%rsp), %al - notb %al - movb 73(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 73(%rsp) -..B1.13: - testb %r13b, %r13b - je ..B1.15 -..B1.14: - fldcw 2(%rsp) -..B1.15: - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.19 -..B1.16: - fldt 48(%rsp) - fldt 64(%rsp) - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.18 -..B1.17: - addq $128, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 144 - .cfi_offset 13, -16 -..B1.18: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.19: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type csinl,@function - .size csinl,.-csinl - .data -# -- End csinl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrt.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrt.S deleted file mode 100644 index f1a247a36f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrt.S +++ /dev/null @@ -1,696 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csqrt.c" - .text -..TXTST0: -# -- Begin csqrt - .text - .align 16,0x90 - .globl csqrt -csqrt: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_csqrt.1: -..L2: - -..B1.2: - movq %rsp, %rax - subq $152, %rsp - .cfi_def_cfa_offset 160 - movq %rax, 56(%rsp) - movq %xmm0, 32(%rsp) - movq %xmm1, 40(%rsp) - movq %rbx, 64(%rsp) - movq 32(%rsp), %xmm0 - movq 40(%rsp), %xmm1 - lea csqrt_table(%rip), %r8 - movq (%r8), %xmm2 - movq (%r8), %xmm3 - movq 144(%r8), %xmm7 - pand %xmm0, %xmm2 - pand %xmm1, %xmm3 - pand 16(%r8), %xmm0 - pand 16(%r8), %xmm1 - movq %xmm2, %xmm4 - movq %xmm3, %xmm5 - movl 36(%rsp), %eax - movl 44(%rsp), %ebx - andl $2147483647, %eax - andl $2147483647, %ebx - subl $591396864, %eax - movq %xmm0, 8(%rsp) - subl $591396864, %ebx - cmpl $1017118720, %eax - movq %xmm1, 16(%rsp) - jae .L_2TAG_PACKET_0.0.1 - cmpl $1017118720, %ebx - jae .L_2TAG_PACKET_0.0.1 - addl $591396864, %eax - addl $591396864, %ebx - movl %eax, %edx - subl %ebx, %edx - cmpl $60817408, %edx - jg .L_2TAG_PACKET_1.0.1 - cmpl $-60817408, %edx - jl .L_2TAG_PACKET_2.0.1 -.L_2TAG_PACKET_3.0.1: - subsd %xmm2, %xmm0 - subsd %xmm3, %xmm1 - mulsd %xmm2, %xmm2 - mulsd %xmm3, %xmm3 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm5 - movq %xmm2, %xmm6 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - movq %xmm7, 24(%rsp) - movq %xmm2, %xmm7 - addsd %xmm3, %xmm2 - addsd %xmm4, %xmm0 - subsd %xmm2, %xmm7 - addsd %xmm5, %xmm1 - movq %xmm2, (%rsp) - addsd %xmm7, %xmm2 - addsd %xmm7, %xmm3 - movq (%rsp), %xmm7 - addsd %xmm4, %xmm0 - subsd %xmm2, %xmm6 - addsd %xmm5, %xmm1 - movq (%rsp), %xmm5 - movq %xmm0, %xmm2 - movq %xmm0, %xmm4 - addsd %xmm3, %xmm6 - addsd %xmm1, %xmm0 - subsd %xmm0, %xmm2 - movq %xmm0, %xmm3 - addsd %xmm2, %xmm0 - addsd %xmm2, %xmm1 - pshufd $221, %xmm7, %xmm2 - subsd %xmm0, %xmm4 - movq 32(%r8), %xmm0 - addsd %xmm4, %xmm1 - pand %xmm7, %xmm0 - addsd %xmm3, %xmm7 - addsd %xmm6, %xmm1 - subsd %xmm7, %xmm5 - subsd %xmm0, %xmm7 - movq %xmm0, %xmm4 - addsd %xmm5, %xmm3 - movq %xmm0, %xmm5 - addsd %xmm7, %xmm1 - movq %xmm0, %xmm7 - psrlq $29, %xmm0 - addsd %xmm3, %xmm1 - pand 48(%r8), %xmm0 - movq 152(%r8), %xmm3 - pxor 64(%r8), %xmm0 - addsd %xmm1, %xmm4 - paddd 80(%r8), %xmm0 - psubd 96(%r8), %xmm2 - rsqrtss %xmm0, %xmm0 - pand 112(%r8), %xmm2 - psrld $3, %xmm0 - psrld $1, %xmm2 - paddd 128(%r8), %xmm0 - psubd %xmm2, %xmm0 - psllq $32, %xmm0 - movq %xmm0, %xmm2 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm7 - mulsd %xmm1, %xmm0 - subsd 144(%r8), %xmm7 - addsd %xmm0, %xmm7 - movq 160(%r8), %xmm0 - movq %xmm7, %xmm6 - mulsd %xmm7, %xmm7 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm0 - addsd 168(%r8), %xmm3 - addsd 176(%r8), %xmm0 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm0 - addsd 184(%r8), %xmm3 - mulsd %xmm6, %xmm3 - addsd %xmm0, %xmm3 - movq 8(%rsp), %xmm0 - mulsd %xmm2, %xmm3 - mulsd %xmm4, %xmm3 - movq 8(%rsp), %xmm4 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - movq %xmm5, %xmm2 - addsd 8(%rsp), %xmm5 - movq 32(%r8), %xmm7 - addsd %xmm3, %xmm1 - subsd %xmm5, %xmm4 - movq %xmm5, %xmm3 - addsd %xmm4, %xmm5 - addsd %xmm2, %xmm4 - subsd %xmm5, %xmm0 - addsd %xmm0, %xmm4 - movq 208(%r8), %xmm0 - addsd %xmm1, %xmm4 - movq %xmm3, %xmm1 - movq %xmm3, %xmm2 - addsd %xmm4, %xmm3 - subsd %xmm3, %xmm1 - mulsd %xmm3, %xmm0 - pand %xmm0, %xmm7 - addsd %xmm1, %xmm3 - addsd %xmm4, %xmm1 - movq %xmm7, %xmm4 - subsd %xmm2, %xmm3 - movq %xmm7, %xmm5 - pshufd $221, %xmm0, %xmm2 - subsd %xmm7, %xmm0 - subsd %xmm3, %xmm1 - mulsd 208(%r8), %xmm1 - addsd %xmm0, %xmm1 - movq %xmm7, %xmm0 - psrlq $29, %xmm7 - movq 152(%r8), %xmm3 - pand 48(%r8), %xmm7 - psubd 96(%r8), %xmm2 - pxor 64(%r8), %xmm7 - addsd %xmm1, %xmm4 - paddd 80(%r8), %xmm7 - rsqrtss %xmm7, %xmm7 - psrld $3, %xmm7 - pand 112(%r8), %xmm2 - psrld $1, %xmm2 - paddd 128(%r8), %xmm7 - psubd %xmm2, %xmm7 - psllq $32, %xmm7 - movq %xmm7, %xmm2 - mulsd %xmm7, %xmm7 - mulsd %xmm7, %xmm0 - mulsd %xmm1, %xmm7 - subsd 144(%r8), %xmm0 - addsd %xmm7, %xmm0 - movq 160(%r8), %xmm7 - movq %xmm0, %xmm6 - mulsd %xmm0, %xmm0 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm7 - addsd 168(%r8), %xmm3 - addsd 176(%r8), %xmm7 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm7 - addsd 184(%r8), %xmm3 - mulsd %xmm6, %xmm3 - movq 16(%rsp), %xmm6 - addsd %xmm7, %xmm3 - mulsd 208(%r8), %xmm6 - mulsd %xmm2, %xmm3 - mulsd %xmm3, %xmm4 - pxor %xmm7, %xmm7 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - cmpnlesd 32(%rsp), %xmm7 - addsd %xmm4, %xmm1 - movq 32(%r8), %xmm4 - pand %xmm6, %xmm4 - subsd %xmm4, %xmm6 - addsd %xmm5, %xmm1 - movq %xmm2, %xmm5 - mulsd %xmm4, %xmm2 - mulsd %xmm3, %xmm4 - movq %xmm1, %xmm0 - pand %xmm7, %xmm0 - mulsd %xmm6, %xmm3 - mulsd %xmm5, %xmm6 - movq 40(%rsp), %xmm5 - addsd %xmm4, %xmm3 - addsd %xmm3, %xmm6 - addsd %xmm6, %xmm2 - movq %xmm7, %xmm6 - pandn %xmm2, %xmm6 - pand %xmm7, %xmm2 - pandn %xmm1, %xmm7 - pand 192(%r8), %xmm5 - por %xmm0, %xmm6 - por %xmm7, %xmm2 - por %xmm5, %xmm6 - movq 24(%rsp), %xmm0 - movq 24(%rsp), %xmm1 - mulsd %xmm2, %xmm0 - mulsd %xmm6, %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_0.0.1: - addl $591396864, %eax - addl $591396864, %ebx - cmpl $2146435072, %eax - jge .L_2TAG_PACKET_4.0.1 - cmpl $2146435072, %ebx - jge .L_2TAG_PACKET_5.0.1 - movl 32(%rsp), %edx - orl %eax, %edx - movl 40(%rsp), %edx - je .L_2TAG_PACKET_6.0.1 - orl %ebx, %edx - je .L_2TAG_PACKET_7.0.1 - movl %eax, %edx - subl %ebx, %edx - cmpl $60817408, %edx - jg .L_2TAG_PACKET_1.0.1 - cmpl $-60817408, %edx - jl .L_2TAG_PACKET_2.0.1 - cmpl $1072693248, %eax - jl .L_2TAG_PACKET_8.0.1 - mulsd 216(%r8), %xmm0 - mulsd 216(%r8), %xmm1 - movq 224(%r8), %xmm7 - movq 32(%r8), %xmm2 - movq 32(%r8), %xmm3 - pand %xmm0, %xmm2 - pand %xmm1, %xmm3 - movq %xmm2, %xmm4 - movq %xmm3, %xmm5 - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - jmp .L_2TAG_PACKET_3.0.1 -.L_2TAG_PACKET_8.0.1: - mulsd 232(%r8), %xmm0 - mulsd 232(%r8), %xmm1 - movq 240(%r8), %xmm7 - movq 32(%r8), %xmm2 - movq 32(%r8), %xmm3 - pand %xmm0, %xmm2 - pand %xmm1, %xmm3 - movq %xmm2, %xmm4 - movq %xmm3, %xmm5 - movq %xmm0, 8(%rsp) - movq %xmm1, 16(%rsp) - jmp .L_2TAG_PACKET_3.0.1 -.L_2TAG_PACKET_2.0.1: -.L_2TAG_PACKET_6.0.1: - cmpl $2097152, %ebx - jl .L_2TAG_PACKET_9.0.1 - mulsd 208(%r8), %xmm1 - sqrtsd %xmm1, %xmm0 - movsd 40(%rsp), %xmm1 - pand 192(%r8), %xmm1 - por %xmm0, %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_9.0.1: - mulsd 248(%r8), %xmm1 - sqrtsd %xmm1, %xmm0 - movsd 40(%rsp), %xmm1 - pand 192(%r8), %xmm1 - mulsd 256(%r8), %xmm0 - por %xmm0, %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_7.0.1: - sqrtsd %xmm0, %xmm0 - movl 36(%rsp), %eax - cmpl $0, %eax - jl .L_2TAG_PACKET_10.0.1 - movsd 40(%rsp), %xmm1 - pand 192(%r8), %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_10.0.1: - movsd 40(%rsp), %xmm1 - pand 192(%r8), %xmm1 - por %xmm0, %xmm1 - pxor %xmm0, %xmm0 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_1.0.1: - cmpl $57671680, %ebx - movsd %xmm0, %xmm4 - subsd %xmm2, %xmm0 - movq %xmm2, %xmm5 - movq %xmm2, %xmm7 - pshufd $221, %xmm2, %xmm1 - jl .L_2TAG_PACKET_11.0.1 - mulsd 288(%r8), %xmm2 - mulsd 288(%r8), %xmm0 - mulsd 288(%r8), %xmm4 - movsd %xmm2, %xmm5 - movsd %xmm2, %xmm7 - pshufd $221, %xmm2, %xmm1 - shrl $21, %eax - shrl $20, %ebx - psrlq $29, %xmm2 - pand 48(%r8), %xmm2 - pxor 64(%r8), %xmm2 - paddd 80(%r8), %xmm2 - rsqrtss %xmm2, %xmm2 - subl $511, %eax - subl $1023, %ebx - psubd 96(%r8), %xmm1 - psrld $3, %xmm2 - pand 112(%r8), %xmm1 - psrld $1, %xmm1 - paddd 128(%r8), %xmm2 - psubd %xmm1, %xmm2 - subl %eax, %ebx - psllq $32, %xmm2 - movq %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - mulsd %xmm2, %xmm7 - mulsd %xmm0, %xmm2 - subsd 144(%r8), %xmm7 - cmpl $-1020, %ebx - addsd %xmm2, %xmm7 - movq %xmm7, %xmm6 - mulsd %xmm7, %xmm7 - movq 152(%r8), %xmm3 - movq 160(%r8), %xmm2 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm2 - addsd 168(%r8), %xmm3 - addsd 176(%r8), %xmm2 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm2 - addsd 184(%r8), %xmm3 - mulsd %xmm6, %xmm3 - addsd %xmm2, %xmm3 - mulsd %xmm1, %xmm3 - mulsd %xmm3, %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm5 - addsd %xmm4, %xmm0 - mulsd 304(%r8), %xmm5 - mulsd 304(%r8), %xmm0 - mulsd 296(%r8), %xmm1 - mulsd 296(%r8), %xmm3 - jl .L_2TAG_PACKET_12.0.1 - movsd 16(%rsp), %xmm2 - addsd %xmm5, %xmm0 - mulsd 208(%r8), %xmm1 - mulsd 208(%r8), %xmm3 - movq 32(%r8), %xmm4 - pand %xmm2, %xmm4 - subsd %xmm4, %xmm2 - movq %xmm1, %xmm5 - mulsd %xmm4, %xmm1 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm3 - mulsd %xmm5, %xmm2 - addsd %xmm4, %xmm3 - addsd %xmm3, %xmm2 - addsd %xmm2, %xmm1 -.L_2TAG_PACKET_13.0.1: - movsd 40(%rsp), %xmm3 - pand 192(%r8), %xmm3 - movl 36(%rsp), %eax - cmpl $0, %eax - jl .L_2TAG_PACKET_14.0.1 - por %xmm3, %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_14.0.1: - por %xmm0, %xmm3 - movq %xmm1, %xmm0 - movq %xmm3, %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_11.0.1: - psrlq $29, %xmm2 - pand 48(%r8), %xmm2 - pxor 64(%r8), %xmm2 - paddd 80(%r8), %xmm2 - rsqrtss %xmm2, %xmm2 - psubd 96(%r8), %xmm1 - psrld $3, %xmm2 - pand 112(%r8), %xmm1 - psrld $1, %xmm1 - paddd 128(%r8), %xmm2 - psubd %xmm1, %xmm2 - psllq $32, %xmm2 - movq %xmm2, %xmm1 - mulsd %xmm2, %xmm2 - mulsd %xmm2, %xmm7 - mulsd %xmm0, %xmm2 - subsd 144(%r8), %xmm7 - addsd %xmm2, %xmm7 - movq %xmm7, %xmm6 - mulsd %xmm7, %xmm7 - movq 152(%r8), %xmm3 - movq 160(%r8), %xmm2 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm2 - addsd 168(%r8), %xmm3 - addsd 176(%r8), %xmm2 - mulsd %xmm7, %xmm3 - mulsd %xmm7, %xmm2 - addsd 184(%r8), %xmm3 - mulsd %xmm6, %xmm3 - addsd %xmm2, %xmm3 - mulsd %xmm1, %xmm3 - mulsd %xmm3, %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm5 - addsd %xmm4, %xmm0 -.L_2TAG_PACKET_12.0.1: - addsd %xmm5, %xmm0 - movq 16(%rsp), %xmm2 - mulsd 264(%r8), %xmm2 - mulsd 248(%r8), %xmm2 - movq 32(%r8), %xmm4 - pand %xmm2, %xmm4 - subsd %xmm4, %xmm2 - movq %xmm1, %xmm5 - mulsd %xmm4, %xmm1 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm3 - mulsd %xmm5, %xmm2 - addsd %xmm4, %xmm3 - addsd %xmm3, %xmm2 - movq %xmm1, %xmm3 - addsd %xmm2, %xmm1 - pextrw $3, %xmm1, %eax - mulsd 272(%r8), %xmm1 - mulsd 280(%r8), %xmm1 - cmpl $19216, %eax - jge .L_2TAG_PACKET_13.0.1 - movq 272(%r8), %xmm5 - mulsd %xmm5, %xmm5 - cmpl $19056, %eax - jle .L_2TAG_PACKET_13.0.1 - movq 32(%r8), %xmm1 - pand %xmm3, %xmm1 - subsd %xmm1, %xmm3 - addsd %xmm3, %xmm2 - mulsd 272(%r8), %xmm1 - mulsd 272(%r8), %xmm2 - mulsd 280(%r8), %xmm1 - mulsd 280(%r8), %xmm2 - addsd %xmm2, %xmm1 - jmp .L_2TAG_PACKET_13.0.1 -.L_2TAG_PACKET_5.0.1: -.L_2TAG_PACKET_15.0.1: - movq 144(%r8), %xmm0 - addsd 40(%rsp), %xmm0 - movq %xmm0, %xmm1 - mulsd %xmm0, %xmm0 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_4.0.1: - movsd 32(%rsp), %xmm1 - mulsd %xmm1, %xmm1 - cmpl $2146435072, %ebx - jl .L_2TAG_PACKET_16.0.1 - movl 40(%rsp), %ebx - jg .L_2TAG_PACKET_17.0.1 - andl %ebx, %ebx - jne .L_2TAG_PACKET_17.0.1 - jmp .L_2TAG_PACKET_15.0.1 -.L_2TAG_PACKET_17.0.1: - movq 144(%r8), %xmm0 - addsd 40(%rsp), %xmm0 - cmpl $2146435072, %eax - movl 32(%rsp), %ebx - jg .L_2TAG_PACKET_18.0.1 - andl %ebx, %ebx - movl 36(%rsp), %ebx - jne .L_2TAG_PACKET_18.0.1 - cmpl $2146435072, %ebx - je .L_2TAG_PACKET_19.0.1 - mulsd %xmm1, %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_18.0.1: -.L_2TAG_PACKET_19.0.1: - movq 32(%rsp), %xmm0 - movq 40(%rsp), %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_16.0.1: - cmpl $2146435072, %eax - movl 32(%rsp), %eax - jg .L_2TAG_PACKET_20.0.1 - andl %eax, %eax - jne .L_2TAG_PACKET_20.0.1 - pxor %xmm2, %xmm2 - movl 36(%rsp), %eax - movq 40(%rsp), %xmm3 - testl $-2147483648, %eax - pand 192(%r8), %xmm3 - jne .L_2TAG_PACKET_21.0.1 - por %xmm3, %xmm2 - movq %xmm1, %xmm0 - movq %xmm2, %xmm1 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_21.0.1: - por %xmm3, %xmm1 - movq %xmm2, %xmm0 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret -.L_2TAG_PACKET_20.0.1: - movq %xmm1, %xmm0 - movq 64(%rsp), %rbx - movq 56(%rsp), %rsp - ret - .cfi_def_cfa_offset 8 -..B1.3: - .align 16,0x90 - .cfi_endproc - .type csqrt,@function - .size csqrt,.-csqrt - .data -# -- End csqrt - .section .rodata, "a" - .align 16 - .align 16 -csqrt_table: - .long 4160749568 - .long 2147483647 - .long 4160749568 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4160749568 - .long 4294967295 - .long 4160749568 - .long 4294967295 - .long 16777215 - .long 16777215 - .long 16777215 - .long 16777215 - .long 8388608 - .long 8388608 - .long 8388608 - .long 8388608 - .long 1065353216 - .long 1065353216 - .long 1065353216 - .long 1065353216 - .long 1048576 - .long 1048576 - .long 1048576 - .long 1048576 - .long 4292870144 - .long 4292870144 - .long 4292870144 - .long 4292870144 - .long 1475346432 - .long 1475346432 - .long 1475346432 - .long 1475346432 - .long 0 - .long 1072693248 - .long 0 - .long 3218046976 - .long 0 - .long 1070694400 - .long 0 - .long 3218341888 - .long 0 - .long 1071120384 - .long 0 - .long 3219128320 - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .long 0 - .long 1071644672 - .long 0 - .long 533725184 - .long 0 - .long 1342177280 - .long 0 - .long 1722810368 - .long 0 - .long 747634688 - .long 0 - .long 1281359872 - .long 0 - .long 967835648 - .long 0 - .long 2121269248 - .long 0 - .long 24117248 - .long 0 - .long 862978048 - .long 0 - .long 1062207488 - .long 0 - .long 1067450368 - .long 0 - .long 1077936128 - .type csqrt_table,@object - .size csqrt_table,312 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrtf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrtf.S deleted file mode 100644 index 150d2044d7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrtf.S +++ /dev/null @@ -1,386 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csqrtf.c" - .text -..TXTST0: -# -- Begin csqrtf - .text - .align 16,0x90 - .globl csqrtf -csqrtf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_csqrtf.1: -..L2: - -..B1.2: - movq %rsp, %rax - subq $120, %rsp - .cfi_def_cfa_offset 128 - movq %rax, 24(%rsp) - movss %xmm0, (%rsp) - pshufd $1, %xmm0, %xmm1 - movss %xmm1, 8(%rsp) - movq %rbx, 32(%rsp) - movd (%rsp), %xmm0 - movd 8(%rsp), %xmm1 - movl (%rsp), %eax - movl 8(%rsp), %ecx - unpcklps %xmm1, %xmm0 - movl %ecx, %edx - lea csqrtf_table(%rip), %r8 - andl $2139095040, %eax - andl $2139095040, %ecx - subl $8388608, %eax - subl $8388608, %ecx - andl $2139095040, %eax - andl $2139095040, %ecx - subl $2130706432, %eax - subl $2130706432, %ecx - testl %ecx, %eax - jns .L_2TAG_PACKET_0.0.1 - cvtps2pd %xmm0, %xmm0 - pxor %xmm4, %xmm4 - movl $16, %eax - movapd %xmm0, %xmm1 - unpckhpd %xmm1, %xmm1 - movapd %xmm0, %xmm7 - mulsd %xmm0, %xmm0 - movapd %xmm7, %xmm6 - mulsd %xmm1, %xmm1 - pinsrw $3, %eax, %xmm4 - addsd %xmm1, %xmm0 - andpd (%r8), %xmm7 - sqrtsd %xmm0, %xmm0 - addsd %xmm7, %xmm0 - psubd %xmm4, %xmm0 - movsd %xmm0, %xmm7 - movdqa %xmm0, %xmm1 - pand 16(%r8), %xmm0 - movdqa %xmm1, %xmm2 - paddd 32(%r8), %xmm0 - psrld $1, %xmm1 - psrlq $29, %xmm0 - pand 48(%r8), %xmm1 - rsqrtss %xmm0, %xmm0 - psubd 64(%r8), %xmm1 - psllq $29, %xmm0 - movapd 80(%r8), %xmm3 - psubd %xmm1, %xmm0 - movapd 96(%r8), %xmm1 - mulsd %xmm0, %xmm2 - movapd 48(%r8), %xmm4 - mulsd %xmm0, %xmm2 - subsd %xmm4, %xmm2 - mulsd %xmm2, %xmm3 - addsd %xmm1, %xmm3 - mulsd %xmm2, %xmm3 - mulsd %xmm0, %xmm3 - addsd %xmm3, %xmm0 - mulpd 112(%r8), %xmm7 - unpcklpd %xmm0, %xmm0 -.L_2TAG_PACKET_1.0.1: - pextrw $3, %xmm6, %eax - mulpd %xmm7, %xmm0 - andl $-2147483648, %edx - cvtpd2ps %xmm0, %xmm1 - testl $32768, %eax - pshufd $17, %xmm1, %xmm2 - je .L_2TAG_PACKET_2.0.1 - movd %xmm1, %ecx - movd %xmm2, %eax - orl %ecx, %edx - testl $2139095040, %eax - jmp .L_2TAG_PACKET_3.0.1 -.L_2TAG_PACKET_2.0.1: - movd %xmm2, %ecx - movd %xmm1, %eax - orl %ecx, %edx - testl $2139095040, %ecx -.L_2TAG_PACKET_3.0.1: - je .L_2TAG_PACKET_4.0.1 - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_4.0.1: - testl $2147483647, 8(%rsp) - jne .L_2TAG_PACKET_5.0.1 - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_5.0.1: - pshufd $14, %xmm0, %xmm0 - mulsd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm0 - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_0.0.1: - movdqa %xmm0, %xmm2 - movdqa 128(%r8), %xmm4 - pshufd $80, %xmm0, %xmm0 - pxor %xmm5, %xmm5 - movdqa %xmm2, %xmm3 - pand 144(%r8), %xmm0 - pshufd $115, %xmm2, %xmm2 - pcmpeqd %xmm4, %xmm0 - movdqa %xmm2, %xmm6 - movmskps %xmm0, %eax - pand %xmm2, %xmm4 - testl %eax, %eax - jne .L_2TAG_PACKET_6.0.1 - pxor %xmm0, %xmm0 -.L_2TAG_PACKET_7.0.1: - pand (%r8), %xmm2 - pcmpeqd %xmm5, %xmm4 - movdqa %xmm4, %xmm3 - pand 160(%r8), %xmm4 - psrlq $3, %xmm2 - pand 176(%r8), %xmm3 - por %xmm4, %xmm2 - paddd 192(%r8), %xmm3 - subpd %xmm4, %xmm2 - paddd %xmm3, %xmm2 - pandn %xmm2, %xmm0 - pxor %xmm4, %xmm4 - movl $16, %eax - movapd %xmm0, %xmm1 - unpckhpd %xmm1, %xmm1 - movapd %xmm0, %xmm7 - mulsd %xmm0, %xmm0 - mulsd %xmm1, %xmm1 - pinsrw $3, %eax, %xmm4 - addsd %xmm1, %xmm0 - sqrtsd %xmm0, %xmm0 - addsd %xmm7, %xmm0 - psubd %xmm4, %xmm0 - movsd %xmm0, %xmm7 - sqrtsd %xmm0, %xmm1 - movapd 48(%r8), %xmm0 - divsd %xmm1, %xmm0 - mulpd 112(%r8), %xmm7 - unpcklpd %xmm0, %xmm0 - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_6.0.1: - cmpl $5, %eax - je .L_2TAG_PACKET_8.0.1 - testl $10, %eax - jne .L_2TAG_PACKET_9.0.1 - pshufd $160, %xmm0, %xmm0 - jmp .L_2TAG_PACKET_7.0.1 -.L_2TAG_PACKET_8.0.1: - xorl %eax, %eax - andl $-2147483648, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_9.0.1: - movl %edx, %ecx - andl $2147483647, %ecx - movd %xmm3, %eax - cmpl $2139095040, %ecx - je .L_2TAG_PACKET_10.0.1 - ja .L_2TAG_PACKET_11.0.1 - andl $-2147483648, %edx - cmpl $-8388608, %eax - je .L_2TAG_PACKET_12.0.1 - cmpl $2139095040, %eax - jne .L_2TAG_PACKET_13.0.1 - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_12.0.1: - xorl %eax, %eax - orl $2139095040, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_11.0.1: - cmpl $2139095040, %eax - je .L_2TAG_PACKET_14.0.1 - cmpl $-8388608, %eax - je .L_2TAG_PACKET_15.0.1 -.L_2TAG_PACKET_13.0.1: - mulss %xmm3, %xmm1 - movss (%rsp), %xmm0 - mulss 8(%rsp), %xmm0 - movd %xmm1, %eax - movl %eax, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_14.0.1: - movss 8(%rsp), %xmm0 - mulss %xmm0, %xmm0 - orl $4194304, %edx - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_15.0.1: - movss 8(%rsp), %xmm0 - mulss %xmm0, %xmm0 - movl %edx, %eax - movl $2139095040, %edx - orl $4194304, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret -.L_2TAG_PACKET_10.0.1: - movss (%rsp), %xmm0 - mulss 208(%r8), %xmm0 - movl $2139095040, %eax - shlq $32, %rdx - orq %rdx, %rax - shrq $32, %rdx - movd %rax, %xmm0 - movq 32(%rsp), %rbx - movq 24(%rsp), %rsp - ret - .cfi_def_cfa_offset 8 -..B1.3: - .align 16,0x90 - .cfi_endproc - .type csqrtf,@function - .size csqrtf,.-csqrtf - .data -# -- End csqrtf - .section .rodata, "a" - .align 16 - .align 16 -csqrtf_table: - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2097151 - .long 4294967295 - .long 2097151 - .long 0 - .long 132120576 - .long 0 - .long 132120576 - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .long 0 - .long 1475346432 - .long 0 - .long 1475346432 - .long 2148429837 - .long 1071120401 - .long 2148429837 - .long 1071120401 - .long 195330 - .long 3219128325 - .long 195330 - .long 3219128325 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 0 - .long 2139095040 - .long 0 - .long 2139095040 - .long 2147483647 - .long 2139095040 - .long 2147483647 - .long 2139095040 - .long 0 - .long 133169152 - .long 0 - .long 133169152 - .long 0 - .long 4162846720 - .long 0 - .long 4162846720 - .long 0 - .long 939524096 - .long 0 - .long 939524096 - .long 1065353216 - .long 1065353216 - .long 1065353216 - .long 1065353216 - .type csqrtf_table,@object - .size csqrtf_table,224 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrtl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrtl.S deleted file mode 100644 index 1f9e0675d8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/csqrtl.S +++ /dev/null @@ -1,714 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "csqrtl.c" - .text -..TXTST0: -# -- Begin csqrtl - .text - .align 16,0x90 - .globl csqrtl -csqrtl: -# parameter 1: 288 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_csqrtl.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %rbx - .cfi_def_cfa_offset 24 - .cfi_offset 3, -24 - pushq %rbp - .cfi_def_cfa_offset 32 - .cfi_offset 6, -32 - subq $256, %rsp - .cfi_def_cfa_offset 288 - xorb %r12b, %r12b - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 240(%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fstpt 208(%rsp) - fldt 208(%rsp) - fstpt 224(%rsp) -..B1.2: - fnstcw 66(%rsp) -..B1.3: - movzwl 66(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 64(%rsp) -..B1.5: - fldcw 64(%rsp) -..B1.6: - movb $1, %r12b -..B1.7: - movzwl 296(%rsp), %eax - movl %eax, %ebp - andl $32767, %ebp - cmpl $32767, %ebp - jge ..B1.30 -..B1.8: - cmpl $0, 292(%rsp) - jne ..B1.10 -..B1.9: - cmpl $0, 288(%rsp) - je ..B1.30 -..B1.10: - movzwl 312(%rsp), %edx - movl %edx, %ebx - andl $32767, %ebx - cmpl $32767, %ebx - jge ..B1.46 -..B1.11: - cmpl $0, 308(%rsp) - jne ..B1.13 -..B1.12: - cmpl $0, 304(%rsp) - je ..B1.32 -..B1.13: - fldt 288(%rsp) - testl %ebp, %ebp - jle ..B1.55 -..B1.14: - andl $-32768, %eax - addl $-16383, %ebp - fstpt 176(%rsp) - fldt 176(%rsp) - orl $-49153, %eax - movw %ax, 184(%rsp) -..B1.15: - fldt 304(%rsp) - testl %ebx, %ebx - movb $63, 185(%rsp) - jle ..B1.54 -..B1.16: - andl $-32768, %edx - addl $-16383, %ebx - fstpt 80(%rsp) - fldt 80(%rsp) - orl $-49153, %edx - movw %dx, 88(%rsp) -..B1.17: - fldt 48(%rsp) - movb $63, 89(%rsp) - fstpt 96(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 320 - lea 144(%rsp), %rdi - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_csqrtl.11: - call __libm_hypot2l_k80@PLT -..___tag_value_csqrtl.12: -..B1.69: - addq $32, %rsp - .cfi_def_cfa_offset 288 -..B1.18: - fldt 128(%rsp) - lea 32+_CONSTANTS(%rip), %rax - lea t32(%rip), %rdx - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - fldt 112(%rsp) - fld %st(0) - fsqrt - fldt (%rdx) - fstpt (%rsp) - fldt (%rsp) - fmul %st(1), %st - fld %st(0) - movl 16(%rsp), %esi - fsubr %st(2), %st - sarl $1, %esi - faddp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fld %st(2) - fxch %st(2) - fsubrp %st, %st(4) - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt .L_2il0floatpacket.9(%rip) - fmulp %st, %st(2) - fdivr %st, %st(1) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 144(%rsp) - fldt 144(%rsp) - fsubr %st, %st(1) - movzwl 152(%rsp), %eax - fxch %st(1) - faddp %st, %st(2) - andl $32767, %eax - fxch %st(1) - fstpt 160(%rsp) - fldt 160(%rsp) - lea -16464(%rax,%rsi), %ecx - cmpl %ecx, %ebp - jle ..B1.22 -..B1.19: - lea -16302(%rax,%rsi), %eax - cmpl %eax, %ebp - jge ..B1.21 -..B1.20: - subl %esi, %ebp - fld %st(1) - addl $16383, %ebp - fld %st(2) - movzwl 184(%rsp), %eax - andl $32767, %ebp - andl $-32768, %eax - orl %ebp, %eax - movl %esi, %ebp - movw %ax, 184(%rsp) - fldt 176(%rsp) - fadd %st, %st(2) - fld %st(2) - fxch %st(2) - fsubr %st(3), %st - fsubr %st, %st(2) - fxch %st(2) - fsubrp %st, %st(5) - fsubp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%rsp) - jmp ..B1.23 -..B1.21: - fstp %st(0) - fstp %st(0) - fldt 176(%rsp) - jmp ..B1.23 -..B1.22: - fstpt 48(%rsp) - movl %esi, %ebp -..B1.23: - fldt 48(%rsp) - lea 1(%rbp), %eax - fldt (%rsp) - andl $1, %eax - subl %eax, %ebp - lea onetwo(%rip), %rdx - shlq $4, %rax - decl %ebp - sarl $1, %ebp - movl %ebp, %edi - fldt (%rax,%rdx) - fmul %st, %st(3) - fld %st(3) - fsqrt - fmul %st, %st(2) - fld %st(2) - fsubr %st(1), %st - faddp %st, %st(3) - fld %st(2) - fsubr %st(1), %st - fxch %st(2) - fmulp %st, %st(4) - fld %st(2) - fmul %st(3), %st - fld %st(1) - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(4) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(3) - fsubrp %st, %st(5) - fxch %st(2) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fldt .L_2il0floatpacket.9(%rip) - fmulp %st, %st(3) - fdivr %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 320 - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fstpt (%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 64(%rsp) -..___tag_value_csqrtl.15: - call __libm_scalbl_k80@PLT -..___tag_value_csqrtl.16: -..B1.70: - fldt 64(%rsp) - fxch %st(1) - fstpt 80(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 288 -..B1.24: - fldt 80(%rsp) - subl %ebp, %ebx - fldt 16(%rsp) - movl %ebx, %edi - fld %st(0) - fdivr %st(2), %st - fmul %st, %st(3) - fld %st(1) - fldt (%rsp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - fsubr %st(4), %st - faddp %st, %st(1) - fld %st(0) - fsubr %st(4), %st - fxch %st(2) - fmul %st(5), %st - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fmul %st(2), %st - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fld %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - fsubrp %st, %st(3) - fldt 96(%rsp) - faddp %st, %st(3) - fxch %st(3) - fsubrp %st, %st(2) - fldt 16(%rsp) - fdivrp %st, %st(2) - addq $-32, %rsp - .cfi_def_cfa_offset 320 - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.9(%rip) - fmul %st, %st(2) - fxch %st(2) - fstpt (%rsp) - fmulp %st, %st(1) - fstpt 16(%rsp) -..___tag_value_csqrtl.19: - call __libm_scalbl_k80@PLT -..___tag_value_csqrtl.20: -..B1.71: - addq $32, %rsp - .cfi_def_cfa_offset 288 -..B1.25: - testb $-128, 297(%rsp) - jne ..B1.27 -..B1.26: - fldt 48(%rsp) - lea 224(%rsp), %rbx - fstpt -16(%rbx) - jmp ..B1.28 -..B1.27: - fldt 48(%rsp) - lea 224(%rsp), %rbx - fxch %st(1) - fstpt -16(%rbx) -..B1.28: - movb 313(%rsp), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - fmulp %st, %st(1) - fstpt (%rbx) - jmp ..B1.49 -..B1.30: - movzwl 312(%rsp), %ebx - andl $32767, %ebx -..B1.31: - cmpl $32767, %ebx - jge ..B1.46 -..B1.32: - movq 288(%rsp), %rax - testq %rax, %rax - jne ..B1.39 -..B1.33: - cmpl $0, 308(%rsp) - jne ..B1.35 -..B1.34: - cmpl $0, 304(%rsp) - je ..B1.39 -..B1.35: - fldt 304(%rsp) - lea ones(%rip), %rdx - movb 313(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - cmpl $2, %ebx - fldl (%rdx,%rcx,8) - jl ..B1.37 -..B1.36: - lea halfs(%rip), %rax - fldl (%rax,%rcx,8) - fmulp %st, %st(2) - fxch %st(1) - fsqrt - jmp ..B1.38 -..B1.37: - lea _CONSTANTS(%rip), %rax - lea 64+_CONSTANTS(%rip), %rdx - fldt (%rax) - fmulp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fsqrt - fldt (%rdx) - fmulp %st, %st(1) -..B1.38: - fstpt 208(%rsp) - fldt 208(%rsp) - fmulp %st, %st(1) - fstpt 224(%rsp) - jmp ..B1.49 -..B1.39: - cmpl $32767, %ebp - jge ..B1.44 -..B1.40: - fldt 288(%rsp) - lea ones(%rip), %rcx - movb 297(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - fmull (%rcx,%rdx,8) - fstpt 176(%rsp) - fldt 176(%rsp) - fsqrt - jne ..B1.42 -..B1.41: - fstpt 208(%rsp) - lea 224(%rsp), %rbx - jmp ..B1.43 -..B1.42: - fldt 48(%rsp) - lea 224(%rsp), %rbx - fstpt -16(%rbx) - fstpt 48(%rsp) -..B1.43: - fldt 48(%rsp) - movb 313(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - fmull (%rcx,%rdx,8) - fstpt (%rbx) - jmp ..B1.49 -..B1.44: - movq $0x8000000000000000, %rdx - cmpq %rdx, %rax - je ..B1.40 -..B1.45: - fldt 288(%rsp) - fmul %st(0), %st - fstpt 208(%rsp) - fldt 208(%rsp) - fstpt 224(%rsp) - jmp ..B1.49 -..B1.46: - je ..B1.62 -..B1.47: - cmpl $32767, %ebp - je ..B1.58 -..B1.48: - fldt 288(%rsp) - fld %st(0) - fldt 304(%rsp) - fmul %st, %st(1) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fstpt 208(%rsp) - fmulp %st, %st(1) - fstpt 224(%rsp) -..B1.49: - testb %r12b, %r12b - je ..B1.51 -..B1.50: - fldcw 66(%rsp) -..B1.51: - movq 240(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.57 -..B1.52: - fldt 208(%rsp) - fldt 224(%rsp) - movq 240(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.56 -..B1.53: - addq $256, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 288 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 12, -16 -..B1.54: - lea 16+_CONSTANTS(%rip), %rbx - fldt (%rbx) - fmul %st(1), %st - fstpt 80(%rsp) - movzwl 88(%rsp), %eax - movl %eax, %ebx - andl $-32768, %eax - andl $32767, %ebx - orl $-49153, %eax - addl $-16639, %ebx - movw %ax, 88(%rsp) - jmp ..B1.17 -..B1.55: - lea 16+_CONSTANTS(%rip), %rbp - fldt (%rbp) - fmul %st(1), %st - fstpt 176(%rsp) - movzwl 184(%rsp), %eax - movl %eax, %ebp - andl $-32768, %eax - andl $32767, %ebp - orl $-49153, %eax - addl $-16639, %ebp - movw %ax, 184(%rsp) - jmp ..B1.15 -..B1.56: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.57: - call __stack_chk_fail@PLT -..B1.58: - movq $0x8000000000000000, %rax - cmpq 288(%rsp), %rax - jne ..B1.48 -..B1.59: - fldt 288(%rsp) - fmul %st(0), %st - fldt 304(%rsp) - fmul %st(0), %st - testb $-128, 297(%rsp) - jne ..B1.61 -..B1.60: - fxch %st(1) - fstpt 208(%rsp) - fstpt 224(%rsp) - jmp ..B1.49 -..B1.61: - fstpt 208(%rsp) - fstpt 224(%rsp) - jmp ..B1.49 -..B1.62: - movq $0x8000000000000000, %rax - cmpq 304(%rsp), %rax - jne ..B1.47 -..B1.63: - fldt 304(%rsp) - lea ones(%rip), %rdx - movb 313(%rsp), %al - andb $-128, %al - shrb $7, %al - fmul %st(0), %st - fstpt 208(%rsp) - fldt 208(%rsp) - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - fmulp %st, %st(1) - fstpt 224(%rsp) - jmp ..B1.49 - .align 16,0x90 - .cfi_endproc - .type csqrtl,@function - .size csqrtl,.-csqrtl - .data -# -- End csqrtl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,16 - .align 16 -t32: - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type t32,@object - .size t32,32 - .align 16 -onetwo: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type onetwo,@object - .size onetwo,32 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -halfs: - .long 0x00000000,0x3fe00000 - .long 0x00000000,0xbfe00000 - .type halfs,@object - .size halfs,16 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16127 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,80 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctan.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctan.S deleted file mode 100644 index aa3748e947..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctan.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctan.c" - .text -..TXTST0: -# -- Begin ctan - .text - .align 16,0x90 - .globl ctan -ctan: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ctan.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movsd %xmm1, 24(%rsp) - movzwl 30(%rsp), %eax - andl $32752, %eax - movsd %xmm0, 16(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.5 -..B1.3: - testl $1048575, 28(%rsp) - jne ..B1.7 -..B1.4: - cmpl $0, 24(%rsp) - jne ..B1.7 -..B1.5: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.6: - movb 31(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm1 - movhpd 8(%rsp), %xmm1 -..B1.7: - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - call ctanh@PLT -..B1.16: - movsd %xmm0, 16(%rsp) - movzwl 22(%rsp), %eax - andl $32752, %eax - movsd %xmm1, 24(%rsp) - cmpl $32752, %eax - unpcklpd %xmm0, %xmm1 - jl ..B1.11 -..B1.9: - testl $1048575, 20(%rsp) - jne ..B1.13 -..B1.10: - cmpl $0, 16(%rsp) - jne ..B1.13 -..B1.11: - movsd %xmm1, (%rsp) - movhpd %xmm1, 8(%rsp) -..B1.12: - movb 23(%rsp), %al - notb %al - movb 15(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movsd (%rsp), %xmm1 - movb %dl, 15(%rsp) - movhpd 8(%rsp), %xmm1 -..B1.13: - movaps %xmm1, %xmm2 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm2 - movaps %xmm2, %xmm1 - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ctan,@function - .size ctan,.-ctan - .data -# -- End ctan - .text -# -- Begin ctanf - .text - .align 16,0x90 - .globl ctanf -ctanf: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_ctanf.6: -..L7: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) - movzwl 14(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.4 -..B2.3: - testl $8388607, 12(%rsp) - jne ..B2.6 -..B2.4: - movsd %xmm0, (%rsp) -..B2.5: - movb 15(%rsp), %al - notb %al - movb 3(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 3(%rsp) - movsd (%rsp), %xmm0 -..B2.6: - call ctanhf@PLT -..B2.14: - movsd %xmm0, 8(%rsp) - movzwl 10(%rsp), %eax - andl $32640, %eax - movss 12(%rsp), %xmm0 - cmpl $32640, %eax - movss 8(%rsp), %xmm1 - unpcklps %xmm1, %xmm0 - jl ..B2.9 -..B2.8: - testl $8388607, 8(%rsp) - jne ..B2.11 -..B2.9: - movsd %xmm0, (%rsp) -..B2.10: - movb 11(%rsp), %al - notb %al - movb 7(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 7(%rsp) - movsd (%rsp), %xmm0 -..B2.11: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ctanf,@function - .size ctanf,.-ctanf - .data -# -- End ctanf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanh.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanh.S deleted file mode 100644 index 091b6f0793..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanh.S +++ /dev/null @@ -1,771 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctanh.c" - .text -..TXTST0: -# -- Begin ctanhf - .text - .align 16,0x90 - .globl ctanhf -ctanhf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ctanhf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - cvtps2pd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 -..___tag_value_ctanhf.4: - call ctanh@PLT -..___tag_value_ctanhf.5: -..B1.10: - unpcklpd %xmm1, %xmm0 -..B1.2: - cvtpd2ps %xmm0, %xmm0 - movsd %xmm0, 4(%rsp) - movzwl 6(%rsp), %eax - testl $32640, %eax - jne ..B1.4 -..B1.3: - testl $8388607, 4(%rsp) - jne ..B1.6 -..B1.4: - movzwl 10(%rsp), %eax - testl $32640, %eax - jne ..B1.7 -..B1.5: - testl $8388607, 8(%rsp) - je ..B1.7 -..B1.6: - movl $8388608, (%rsp) - movss (%rsp), %xmm1 - movss (%rsp), %xmm0 - mulss %xmm0, %xmm1 - movsd 4(%rsp), %xmm0 - movss %xmm1, (%rsp) -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ctanhf,@function - .size ctanhf,.-ctanhf - .data -# -- End ctanhf - .text -# -- Begin ctanh - .text - .align 16,0x90 - .globl ctanh -ctanh: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_ctanh.8: -..L9: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - movq %fs:40, %rax - subq $160, %rsp - .cfi_def_cfa_offset 192 - movsd %xmm0, 40(%rsp) - xorq %rsp, %rax - movzwl 46(%rsp), %r12d - andl $32752, %r12d - shrl $4, %r12d - movsd %xmm1, 48(%rsp) - cmpl $2047, %r12d - movq %rax, 152(%rsp) - jge ..B2.33 -..B2.2: - testl %r12d, %r12d - jle ..B2.61 -..B2.3: - movzwl 54(%rsp), %edi - movl %edi, %ebx - andl $32752, %ebx - shrl $4, %ebx - cmpl $2047, %ebx - jge ..B2.34 -..B2.4: - cmpl $1032, %r12d - jl ..B2.8 -..B2.5: - movb 47(%rsp), %dl - lea _DBL_MIN_NORMAL(%rip), %rax - andb $-128, %dl - lea ones(%rip), %rcx - shrb $7, %dl - movsd (%rax), %xmm1 - movzbl %dl, %esi - testl %ebx, %ebx - movsd (%rcx,%rsi,8), %xmm0 - subsd %xmm1, %xmm0 - movsd %xmm0, 24(%rsp) - jle ..B2.57 -..B2.6: - movsd %xmm1, 16(%rsp) - testl $32752, %edi - movsd 16(%rsp), %xmm1 - movsd 16(%rsp), %xmm0 - mulsd %xmm0, %xmm1 - movsd %xmm1, 16(%rsp) - movsd 16(%rsp), %xmm0 - jle ..B2.56 -..B2.7: - movsd 48(%rsp), %xmm0 - call tan@PLT -..B2.71: - lea 32(%rsp), %rax - pxor %xmm1, %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm1, (%rax) - movsd -8(%rax), %xmm0 - movhpd (%rax), %xmm0 - jmp ..B2.54 -..B2.8: - movsd 40(%rsp), %xmm0 - lea 104(%rsp), %rdi -..___tag_value_ctanh.17: - call __libm_cosh_k64@PLT -..___tag_value_ctanh.18: -..B2.72: - movl %eax, %ebx -..B2.9: - movsd 104(%rsp), %xmm2 - movsd 112(%rsp), %xmm3 - movaps %xmm2, %xmm4 - movzwl 46(%rsp), %eax - addsd %xmm3, %xmm4 - movaps %xmm4, %xmm1 - andl $32752, %eax - cmpl $13168, %eax - subsd %xmm4, %xmm2 - addsd %xmm3, %xmm2 - movsd .L_2il0floatpacket.13(%rip), %xmm3 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm0 - subsd %xmm4, %xmm0 - subsd %xmm0, %xmm1 - movsd %xmm1, 104(%rsp) - subsd %xmm1, %xmm4 - addsd %xmm2, %xmm4 - movsd %xmm4, 112(%rsp) - jge ..B2.11 -..B2.10: - lea 16+_CONSTANTS(%rip), %r12 - lea 80(%rsp), %r14 - movsd -40(%r14), %xmm0 - mulsd (%r12), %xmm0 - movsd %xmm0, -8(%r14) - movzwl -2(%r14), %eax - movl %eax, %r12d - andl $32752, %r12d - andl $-32753, %eax - shrl $4, %r12d - orl $-49168, %eax - movw %ax, -2(%r14) - addl $-1279, %r12d - pxor %xmm0, %xmm0 - jmp ..B2.13 -..B2.11: - movsd 40(%rsp), %xmm0 - lea 72(%rsp), %rdi -..___tag_value_ctanh.19: - call __libm_sinh_k64@PLT -..___tag_value_ctanh.20: -..B2.73: - movsd .L_2il0floatpacket.13(%rip), %xmm3 - movl %eax, %r12d -..B2.12: - lea 80(%rsp), %r14 - movsd (%r14), %xmm0 -..B2.13: - movsd 72(%rsp), %xmm4 - movaps %xmm0, %xmm5 - movaps %xmm3, %xmm2 - lea 56(%rsp), %rdi - addsd %xmm4, %xmm5 - mulsd %xmm5, %xmm2 - subsd %xmm5, %xmm4 - movaps %xmm2, %xmm1 - lea 88(%rsp), %rsi - subsd %xmm5, %xmm1 - addsd %xmm0, %xmm4 - subsd %xmm1, %xmm2 - movsd -40(%rsi), %xmm0 - subsd %xmm2, %xmm5 - movsd %xmm2, -16(%rsi) - addsd %xmm4, %xmm5 - movsd %xmm5, (%r14) -..___tag_value_ctanh.21: - call __libm_sincos_k64@PLT -..___tag_value_ctanh.22: -..B2.14: - movsd 88(%rsp), %xmm4 - lea 8+_CONSTANTS(%rip), %rax - movsd 96(%rsp), %xmm2 - movaps %xmm4, %xmm1 - movsd .L_2il0floatpacket.13(%rip), %xmm3 - addl %r12d, %ebx - movsd 112(%rsp), %xmm6 - movaps %xmm3, %xmm10 - movsd (%r14), %xmm13 - movaps %xmm6, %xmm11 - mulsd %xmm13, %xmm11 - addsd %xmm2, %xmm1 - movsd 104(%rsp), %xmm7 - lea (%r12,%r12), %r14d - movaps %xmm7, %xmm8 - subsd %xmm1, %xmm4 - mulsd %xmm13, %xmm7 - addsd %xmm2, %xmm4 - movaps %xmm3, %xmm2 - mulsd %xmm1, %xmm2 - movaps %xmm2, %xmm0 - movsd (%rax), %xmm5 - subsd %xmm1, %xmm0 - movsd %xmm5, 8(%rsp) - subsd %xmm0, %xmm2 - movsd 72(%rsp), %xmm0 - subsd %xmm2, %xmm1 - mulsd %xmm0, %xmm6 - addsd %xmm5, %xmm2 - mulsd %xmm0, %xmm8 - addsd %xmm4, %xmm1 - addsd %xmm6, %xmm11 - movaps %xmm8, %xmm12 - movaps %xmm0, %xmm5 - mulsd %xmm0, %xmm5 - addsd %xmm7, %xmm11 - mulsd %xmm13, %xmm0 - mulsd %xmm13, %xmm13 - addsd %xmm11, %xmm12 - addsd %xmm0, %xmm0 - mulsd %xmm12, %xmm10 - subsd %xmm12, %xmm8 - addsd %xmm13, %xmm0 - addsd %xmm8, %xmm11 - movaps %xmm10, %xmm9 - movaps %xmm2, %xmm6 - movsd %xmm5, 120(%rsp) - subsd %xmm12, %xmm9 - mulsd %xmm2, %xmm6 - subsd %xmm9, %xmm10 - movzwl 126(%rsp), %edx - subsd %xmm10, %xmm12 - andl $32752, %edx - addsd %xmm11, %xmm12 - shrl $4, %edx - movsd %xmm2, 88(%rsp) - mulsd %xmm1, %xmm2 - movsd %xmm6, 24(%rsp) - lea (%rdx,%r12,2), %eax - movzwl 30(%rsp), %edx - addsd %xmm2, %xmm2 - andl $32752, %edx - shrl $4, %edx - movsd %xmm1, 96(%rsp) - mulsd %xmm1, %xmm1 - movsd %xmm10, 136(%rsp) - lea -112(%rdx), %ecx - movsd %xmm12, 144(%rsp) - cmpl %ecx, %eax - movsd %xmm0, 128(%rsp) - addsd %xmm1, %xmm2 - jg ..B2.16 -..B2.15: - movsd %xmm2, 32(%rsp) - xorl %r14d, %r14d - jmp ..B2.22 -..B2.16: - addl $112, %edx - cmpl %edx, %eax - jge ..B2.21 -..B2.17: - movl %r14d, %eax - negl %eax - movsd .L_2il0floatpacket.14(%rip), %xmm1 - addl $1023, %eax - movsd %xmm1, (%rsp) - andl $2047, %eax - movzwl 6(%rsp), %edx - movaps %xmm5, %xmm1 - shll $4, %eax - andl $-32753, %edx - orl %eax, %edx - movw %dx, 6(%rsp) - movsd (%rsp), %xmm4 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm2 - comisd %xmm6, %xmm5 - addsd %xmm6, %xmm1 - movsd %xmm6, 24(%rsp) - movsd %xmm2, 32(%rsp) - jbe ..B2.19 -..B2.18: - subsd %xmm1, %xmm5 - addsd %xmm6, %xmm5 - addsd %xmm2, %xmm5 - addsd %xmm0, %xmm5 - jmp ..B2.20 -..B2.19: - subsd %xmm1, %xmm6 - addsd %xmm5, %xmm6 - addsd %xmm0, %xmm6 - addsd %xmm2, %xmm6 - movaps %xmm6, %xmm5 -..B2.20: - movaps %xmm5, %xmm6 - addsd %xmm1, %xmm6 - subsd %xmm6, %xmm1 - addsd %xmm1, %xmm5 - movaps %xmm5, %xmm2 - jmp ..B2.22 -..B2.21: - movsd %xmm2, 32(%rsp) - movaps %xmm5, %xmm6 - movaps %xmm0, %xmm2 -..B2.22: - movaps %xmm6, %xmm0 - movaps %xmm3, %xmm5 - movsd .L_2il0floatpacket.14(%rip), %xmm1 - movaps %xmm3, %xmm7 - movsd .L_2il0floatpacket.14(%rip), %xmm8 - negl %r14d - addl %r14d, %ebx - lea 136(%rsp), %rsi - movl %ebx, %edi - lea 120(%rsp), %rdx - addsd %xmm2, %xmm0 - mulsd %xmm0, %xmm5 - subsd %xmm0, %xmm6 - addsd %xmm2, %xmm6 - movaps %xmm5, %xmm2 - subsd %xmm0, %xmm2 - subsd %xmm2, %xmm5 - divsd %xmm5, %xmm1 - mulsd %xmm1, %xmm7 - subsd %xmm5, %xmm0 - movaps %xmm7, %xmm4 - lea 24(%rsp), %rcx - subsd %xmm1, %xmm4 - addsd %xmm0, %xmm6 - subsd %xmm4, %xmm7 - mulsd %xmm7, %xmm5 - mulsd %xmm7, %xmm6 - subsd %xmm5, %xmm8 - movsd %xmm7, (%rdx) - subsd %xmm6, %xmm8 - movsd .L_2il0floatpacket.14(%rip), %xmm6 - addsd %xmm8, %xmm6 - mulsd %xmm6, %xmm8 - mulsd %xmm7, %xmm8 - movsd %xmm8, 8(%rdx) -..___tag_value_ctanh.23: - call __libm_mul_k64@PLT -..___tag_value_ctanh.24: -..B2.23: - movzwl 54(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - movsd .L_2il0floatpacket.13(%rip), %xmm3 - testl %eax, %eax - jne ..B2.28 -..B2.24: - testl $1048575, 52(%rsp) - jne ..B2.28 -..B2.25: - cmpl $0, 48(%rsp) - jne ..B2.28 -..B2.26: - movq 48(%rsp), %rax - movq %rax, 32(%rsp) - movq 152(%rsp), %rdx - xorq %rsp, %rdx - movsd 48(%rsp), %xmm1 - movsd 24(%rsp), %xmm0 - cmpq %fs:40, %rdx - jne ..B2.60 -..B2.27: - addq $160, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -32 - .cfi_offset 12, -16 - .cfi_offset 14, -24 -..B2.28: - cmpl $823, %eax - jl ..B2.30 -..B2.29: - xorl %ecx, %ecx - lea 64(%rsp), %rax - movsd (%rax), %xmm0 - jmp ..B2.31 -..B2.30: - lea 16+_CONSTANTS(%rip), %rax - movsd 48(%rsp), %xmm0 - mulsd (%rax), %xmm0 - lea 64(%rsp), %rax - movsd %xmm0, -8(%rax) - movzwl -2(%rax), %edx - movl %edx, %ecx - andl $32752, %ecx - andl $-32753, %edx - shrl $4, %ecx - orl $-49168, %edx - movw %dx, -2(%rax) - addl $-1279, %ecx - pxor %xmm0, %xmm0 -..B2.31: - movsd 56(%rsp), %xmm1 - movaps %xmm0, %xmm6 - movaps %xmm3, %xmm2 - addl %ecx, %r14d - movsd 8(%rsp), %xmm4 - lea 136(%rsp), %rsi - movsd -40(%rsi), %xmm5 - lea 120(%rsp), %rdx - movsd -32(%rdx), %xmm7 - lea 32(%rsp), %rcx - movl %r14d, %edi - addsd %xmm1, %xmm6 - mulsd %xmm6, %xmm2 - subsd %xmm6, %xmm1 - addsd %xmm0, %xmm1 - movaps %xmm2, %xmm0 - subsd %xmm6, %xmm0 - subsd %xmm0, %xmm2 - subsd %xmm2, %xmm6 - addsd %xmm2, %xmm4 - addsd %xmm1, %xmm6 - movaps %xmm6, %xmm8 - movaps %xmm4, %xmm10 - mulsd %xmm5, %xmm8 - mulsd %xmm4, %xmm5 - mulsd %xmm7, %xmm10 - mulsd %xmm6, %xmm7 - addsd %xmm5, %xmm8 - movaps %xmm10, %xmm11 - addsd %xmm7, %xmm8 - movsd %xmm6, (%rax) - addsd %xmm8, %xmm11 - mulsd %xmm11, %xmm3 - subsd %xmm11, %xmm10 - movaps %xmm3, %xmm9 - addsd %xmm8, %xmm10 - subsd %xmm11, %xmm9 - movsd %xmm4, -64(%rdx) - subsd %xmm9, %xmm3 - movsd %xmm3, 16(%rdx) - subsd %xmm3, %xmm11 - addsd %xmm10, %xmm11 - movsd %xmm11, 24(%rdx) -..___tag_value_ctanh.36: - call __libm_mul_k64@PLT -..___tag_value_ctanh.37: -..B2.32: - movsd 24(%rsp), %xmm0 - movhpd 32(%rsp), %xmm0 - jmp ..B2.54 -..B2.33: - movzwl 54(%rsp), %ebx - andl $32752, %ebx - shrl $4, %ebx -..B2.34: - testl %ebx, %ebx - jne ..B2.37 -..B2.35: - testl $1048575, 52(%rsp) - jne ..B2.37 -..B2.36: - cmpl $0, 48(%rsp) - je ..B2.39 -..B2.37: - cmpl $2047, %ebx - jge ..B2.45 -..B2.38: - cmpl $2047, %r12d - je ..B2.65 -..B2.39: - movsd 40(%rsp), %xmm0 - call tanh@PLT -..B2.74: - movsd %xmm0, 24(%rsp) - testl %r12d, %r12d - jne ..B2.42 -..B2.40: - testl $1048575, 44(%rsp) - jne ..B2.42 -..B2.41: - cmpl $0, 40(%rsp) - je ..B2.44 -..B2.42: - testl %ebx, %ebx - jle ..B2.64 -..B2.43: - movsd 48(%rsp), %xmm0 - call tan@PLT -..B2.75: - pxor %xmm1, %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm1, 32(%rsp) - movsd 24(%rsp), %xmm0 - movhpd 32(%rsp), %xmm0 - jmp ..B2.54 -..B2.44: - movsd 48(%rsp), %xmm0 - call tan@PLT -..B2.76: - movsd %xmm0, 32(%rsp) - movsd 24(%rsp), %xmm0 - movhpd 32(%rsp), %xmm0 - jmp ..B2.54 -..B2.45: - cmpl $2047, %r12d - jge ..B2.47 -..B2.46: - movsd 48(%rsp), %xmm0 - call tan@PLT -..B2.77: - movsd %xmm0, 32(%rsp) - movsd %xmm0, 24(%rsp) - movhpd 32(%rsp), %xmm0 - jmp ..B2.54 -..B2.47: - testl $1048575, 44(%rsp) - jne ..B2.49 -..B2.48: - cmpl $0, 40(%rsp) - je ..B2.50 -..B2.49: - movsd 40(%rsp), %xmm0 - call tanh@PLT -..B2.78: - movsd 48(%rsp), %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm1, 32(%rsp) - movsd %xmm0, 24(%rsp) - movhpd 32(%rsp), %xmm0 - jmp ..B2.54 -..B2.50: - testl $1048575, 52(%rsp) - jne ..B2.52 -..B2.51: - cmpl $0, 48(%rsp) - je ..B2.53 -..B2.52: - movsd 48(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 48(%rsp) - movsd 40(%rsp), %xmm0 - call tanh@PLT -..B2.79: - lea zeros(%rip), %rax - movhpd (%rax), %xmm0 - movsd %xmm0, 24(%rsp) - movhpd %xmm0, 32(%rsp) - jmp ..B2.54 -..B2.53: - movsd 40(%rsp), %xmm0 - call tanh@PLT -..B2.80: - movb 55(%rsp), %dl - lea zeros(%rip), %rax - andb $-128, %dl - lea ones(%rip), %rcx - shrb $7, %dl - movsd (%rax), %xmm1 - movzbl %dl, %ebx - mulsd (%rcx,%rbx,8), %xmm1 - unpcklpd %xmm1, %xmm0 - movsd %xmm0, 24(%rsp) - movhpd %xmm0, 32(%rsp) -..B2.54: - movq 152(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.60 -..B2.55: - movaps %xmm0, %xmm1 - unpckhpd %xmm0, %xmm1 - addq $160, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -32 - .cfi_offset 12, -16 - .cfi_offset 14, -24 -..B2.56: - movb 55(%rsp), %dl - lea 32(%rsp), %rax - movsd %xmm0, (%rax) - andb $-128, %dl - movb 7(%rax), %cl - andb $127, %cl - orb %dl, %cl - movsd -8(%rax), %xmm0 - movb %cl, 7(%rax) - movhpd (%rax), %xmm0 - jmp ..B2.54 -..B2.57: - testl $1048575, 52(%rsp) - jne ..B2.6 -..B2.58: - cmpl $0, 48(%rsp) - jne ..B2.6 -..B2.59: - pxor %xmm0, %xmm0 - jmp ..B2.56 -..B2.60: - call __stack_chk_fail@PLT -..B2.61: - testl $1048575, 44(%rsp) - jne ..B2.3 -..B2.62: - cmpl $0, 40(%rsp) - jne ..B2.3 - jmp ..B2.33 -..B2.64: - pxor %xmm0, %xmm0 - mulsd 48(%rsp), %xmm0 - movsd %xmm0, 32(%rsp) - movsd 24(%rsp), %xmm0 - movhpd 32(%rsp), %xmm0 - jmp ..B2.54 -..B2.65: - testl $1048575, 44(%rsp) - jne ..B2.45 -..B2.66: - cmpl $0, 40(%rsp) - jne ..B2.45 -..B2.67: - movsd 40(%rsp), %xmm0 - call tanh@PLT -..B2.81: - movsd %xmm0, 24(%rsp) - jmp ..B2.42 - .align 16,0x90 - .cfi_endproc - .type ctanh,@function - .size ctanh,.-ctanh - .data -# -- End ctanh - .section .rodata, "a" - .align 16 - .align 16 -_DBL_MIN_NORMAL: - .long 0 - .long 1048576 - .type _DBL_MIN_NORMAL,@object - .size _DBL_MIN_NORMAL,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x02000000,0x41a00000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -zeros: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .type zeros,@object - .size zeros,16 - .align 4 -.L_2il0floatpacket.12: - .long 0x00800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .align 4 -_CONSTANTS: - .long 0 - .long 2145386496 - .long 0 - .long 1048576 - .long 0 - .long 1341128704 - .type _CONSTANTS,@object - .size _CONSTANTS,24 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanhl.S deleted file mode 100644 index ae3c9322f2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanhl.S +++ /dev/null @@ -1,1012 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctanhl.c" - .text -..TXTST0: -# -- Begin ctanhl - .text - .align 16,0x90 - .globl ctanhl -ctanhl: -# parameter 1: 448 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_ctanhl.1: -..L2: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - pushq %rbp - .cfi_def_cfa_offset 40 - .cfi_offset 6, -40 - subq $408, %rsp - .cfi_def_cfa_offset 448 - xorb %r15b, %r15b - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 400(%rsp) - fstpt 208(%rsp) - fldt 208(%rsp) - fstpt 368(%rsp) - fldt 368(%rsp) - fstpt 384(%rsp) -..B1.2: - fnstcw 226(%rsp) -..B1.3: - movzwl 226(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 224(%rsp) -..B1.5: - fldcw 224(%rsp) -..B1.6: - movb $1, %r15b -..B1.7: - movzwl 456(%rsp), %edx - andl $32767, %edx - cmpl $32767, %edx - jge ..B1.52 -..B1.8: - movzwl 472(%rsp), %ebp - andl $32767, %ebp - cmpl $32767, %ebp - jge ..B1.52 -..B1.9: - cmpl $0, 452(%rsp) - jne ..B1.11 -..B1.10: - cmpl $0, 448(%rsp) - je ..B1.52 -..B1.11: - cmpl $16396, %edx - jl ..B1.23 -..B1.12: - movb 457(%rsp), %dl - lea _CONSTANTS(%rip), %rax - andb $-128, %dl - lea ones(%rip), %rcx - shrb $7, %dl - fldt (%rax) - movzbl %dl, %ebx - cmpl $0, 468(%rsp) - fldl (%rcx,%rbx,8) - fsub %st(1), %st - fstpt 368(%rsp) - jne ..B1.14 -..B1.13: - cmpl $0, 464(%rsp) - je ..B1.15 -..B1.14: - fmul %st(0), %st - fstpt 384(%rsp) - jmp ..B1.16 -..B1.15: - fstp %st(0) - fldt 208(%rsp) - fstpt 384(%rsp) -..B1.16: - testl %ebp, %ebp - jle ..B1.76 -..B1.17: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 480(%rsp) - fstpt (%rsp) - call tanl@PLT -..B1.85: - addq $16, %rsp - .cfi_def_cfa_offset 448 - fstpt 192(%rsp) - movb 393(%rsp), %dl - movb 201(%rsp), %al - andb $127, %dl - andb $-128, %al - orb %al, %dl -..B1.18: - movb %dl, 393(%rsp) - testb %r15b, %r15b - je ..B1.20 -..B1.19: - fldcw 226(%rsp) -..B1.20: - movq 400(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.75 -..B1.21: - fldt 368(%rsp) - fldt 384(%rsp) - movq 400(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.74 -..B1.22: - addq $408, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 448 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.23: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 464(%rsp) - lea 288(%rsp), %rdi - fstpt (%rsp) -..___tag_value_ctanhl.29: - call __libm_coshl_k80@PLT -..___tag_value_ctanhl.30: -..B1.86: - addq $16, %rsp - .cfi_def_cfa_offset 448 -..B1.24: - fldt 288(%rsp) - lea 32+_CONSTANTS(%rip), %r14 - movzwl 456(%rsp), %eax - andl $32767, %eax - cmpl $16183, %eax - fldt (%r14) - fstpt 32(%rsp) - fldt 32(%rsp) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt 272(%rsp) - fld %st(0) - movl (%rsp), %r14d - fadd %st(2), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - jge ..B1.26 -..B1.25: - fldt 448(%rsp) - lea 16+_CONSTANTS(%rip), %rbp - fldt 208(%rsp) - lea 256(%rsp), %rdx - fstpt (%rdx) - fldt (%rbp) - fmulp %st, %st(1) - fstpt -16(%rdx) - movzwl -8(%rdx), %eax - movl %eax, %ebp - andl $-32768, %eax - andl $32767, %ebp - orl $-49153, %eax - addl $-16639, %ebp - movw %ax, -8(%rdx) - jmp ..B1.28 -..B1.26: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 464(%rsp) - lea 256(%rsp), %rdi - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value_ctanhl.33: - call __libm_sinhl_k80@PLT -..___tag_value_ctanhl.34: -..B1.87: - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 448 -..B1.27: - fldt 32(%rsp) - lea 256(%rsp), %rdx - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - movl (%rsp), %ebp -..B1.28: - fldt 240(%rsp) - fld %st(0) - fldt (%rdx) - fadd %st, %st(1) - fxch %st(1) - fstpt 160(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fsubp %st, %st(2) - fsubp %st, %st(1) - fldt 480(%rsp) - fstpt (%rsp) - lea 320(%rsp), %rdi - fxch %st(1) - fstpt 32(%rsp) - fstpt 112(%rsp) -..___tag_value_ctanhl.37: - call __libm_cosl_k80@PLT -..___tag_value_ctanhl.38: -..B1.88: - fldt 112(%rsp) - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 448 -..B1.29: - fldt 304(%rsp) - lea _CONSTANTS(%rip), %rax - fld %st(0) - lea t33(%rip), %rdx - fldt 320(%rsp) - addl %ebp, %r14d - fadd %st, %st(1) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fxch %st(1) - fmul %st(4), %st - fxch %st(1) - fmulp %st, %st(4) - fxch %st(3) - fstpt 128(%rsp) - fldt 128(%rsp) - fldt (%rax) - movzwl 168(%rsp), %eax - faddp %st, %st(4) - fxch %st(3) - fstpt 112(%rsp) - fldt 112(%rsp) - andl $32767, %eax - fstpt 144(%rsp) - fld %st(0) - fldt 160(%rsp) - addl %ebp, %eax - fld %st(0) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fldt (%rdx) - fmul %st, %st(3) - fld %st(0) - fmul %st(2), %st - movzwl 152(%rsp), %edx - fsub %st, %st(3) - andl $32767, %edx - fsubp %st, %st(3) - fxch %st(1) - fsub %st(2), %st - fadd %st(5), %st - fxch %st(1) - fstpt (%rsp) - fld %st(3) - lea 64(%rdx), %ecx - cmpl %ecx, %eax - fsubr %st(3), %st - fsubrp %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - fldt 80(%rsp) - faddp %st, %st(4) - fld %st(3) - fmul %st(3), %st - fld %st(2) - fmul %st(2), %st - fxch %st(2) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fsubp %st, %st(2) - fsubp %st, %st(1) - fstpt 64(%rsp) - fldt 112(%rsp) - jge ..B1.35 -..B1.30: - addl $-64, %edx - cmpl %edx, %eax - jle ..B1.34 -..B1.31: - fstpt 112(%rsp) - lea (%rbp,%rbp), %ebx - movzwl 120(%rsp), %eax - movl %eax, %edx - movzwl 136(%rsp), %ecx - subl %ebp, %eax - andl $32767, %ecx - andl $-32768, %edx - andl $32767, %eax - subl %ebp, %ecx - orl %eax, %edx - fxch %st(1) - fstpt 160(%rsp) - testl %ecx, %ecx - movw %dx, 120(%rsp) - jle ..B1.33 -..B1.32: - fldt 112(%rsp) - movzwl 168(%rsp), %eax - movl %eax, %edx - subl %ebp, %eax - andl $-32768, %edx - andl $32767, %eax - orl %eax, %edx - movw %dx, 168(%rsp) - jmp ..B1.38 -..B1.33: - fldt 112(%rsp) - jmp ..B1.38 -..B1.34: - fstp %st(1) - fldt 208(%rsp) - fstpt 112(%rsp) - fldt 112(%rsp) - fstpt 160(%rsp) -..B1.36: - fldt .L_2il0floatpacket.8(%rip) - fxch %st(1) - fstpt 16(%rsp) - xorl %ebx, %ebx - jmp ..B1.38 -..B1.35: - fldt 208(%rsp) - fstpt 112(%rsp) - fldt 112(%rsp) - fstpt 160(%rsp) - fldt 160(%rsp) - jl ..B1.100 -..B1.37: - fstp %st(3) - fstp %st(0) - lea (%rbp,%rbp), %ebx - fxch %st(1) -..B1.38: - addq $-32, %rsp - .cfi_def_cfa_offset 480 - fldt 48(%rsp) - lea 368(%rsp), %rdi - fstpt (%rsp) - fstpt 16(%rsp) - fstpt 128(%rsp) -..___tag_value_ctanhl.41: - call __libm_hypot2l_k80@PLT -..___tag_value_ctanhl.42: -..B1.89: - fldt 128(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 448 -..B1.39: - fldt 32(%rsp) - lea t32(%rip), %rbp - movzwl 8+.L_2il0floatpacket.9(%rip), %eax - movl %eax, %ecx - andl $-32768, %ecx - subl %ebx, %r14d - movl %r14d, %edi - faddp %st, %st(2) - fxch %st(1) - fstpt 176(%rsp) - fldt .L_2il0floatpacket.9(%rip) - movl 176(%rsp), %edx - addl %eax, %edx - andl $32767, %edx - fstpt 192(%rsp) - orl %edx, %ecx - fldt 336(%rsp) - fldt 352(%rsp) - fldt 16(%rsp) - fldt 160(%rsp) - fldt .L_2il0floatpacket.10(%rip) - fmul %st, %st(2) - fxch %st(5) - fmulp %st, %st(2) - fldt 112(%rsp) - movw %cx, 200(%rsp) - fmulp %st, %st(5) - fmulp %st, %st(4) - fldt 192(%rsp) - fmul %st, %st(3) - fld %st(3) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fstpt 352(%rsp) - fldt 352(%rsp) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fstpt 336(%rsp) - fldt 336(%rsp) - fldt 48(%rsp) - fld %st(0) - fdiv %st(2), %st - fmul %st, %st(3) - fldt (%rbp) - fld %st(0) - fmul %st(2), %st - fld %st(0) - fsubr %st(3), %st - faddp %st, %st(1) - fld %st(0) - fsubr %st(3), %st - fxch %st(2) - fstpt 80(%rsp) - fldt 80(%rsp) - fmul %st(5), %st - fsubr %st, %st(7) - faddp %st, %st(7) - fld %st(6) - fsubrp %st, %st(5) - fld %st(0) - fmul %st(7), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(1) - fmul %st(5), %st - faddp %st, %st(7) - fld %st(6) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(7) - faddp %st, %st(2) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(4) - fsubrp %st, %st(1) - fsubp %st, %st(1) - fldt 64(%rsp) - faddp %st, %st(1) - fsubp %st, %st(1) - fld %st(1) - fldt 96(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 480 - fdivrp %st, %st(2) - fadd %st(1), %st - fstpt (%rsp) - fldt (%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) -..___tag_value_ctanhl.45: - call __libm_scalbl_k80@PLT -..___tag_value_ctanhl.46: -..B1.90: - addq $32, %rsp - .cfi_def_cfa_offset 448 -..B1.40: - fstpt 368(%rsp) - cmpq $0, 464(%rsp) - jne ..B1.46 -..B1.41: - fldt 464(%rsp) - testb %r15b, %r15b - fstpt 384(%rsp) - je ..B1.43 -..B1.42: - fldcw 226(%rsp) -..B1.43: - movq 400(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.75 -..B1.44: - fldt 368(%rsp) - fldt 384(%rsp) - movq 400(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.74 -..B1.45: - addq $408, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 448 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.46: - movzwl 472(%rsp), %eax - andl $32767, %eax - cmpl $16183, %eax - jge ..B1.48 -..B1.47: - fldt 464(%rsp) - lea 16+_CONSTANTS(%rip), %rax - fldt 208(%rsp) - fstpt 32(%rsp) - fldt (%rax) - fmulp %st, %st(1) - fstpt 16(%rsp) - movzwl 24(%rsp), %edx - movl %edx, %edi - andl $-32768, %edx - andl $32767, %edi - orl $-49153, %edx - addl $-16639, %edi - movw %dx, 24(%rsp) - fldt 16(%rsp) - jmp ..B1.50 -..B1.48: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 480(%rsp) - lea 32(%rsp), %rdi - fstpt (%rsp) -..___tag_value_ctanhl.63: - call __libm_sinl_k80@PLT -..___tag_value_ctanhl.64: -..B1.91: - addq $16, %rsp - .cfi_def_cfa_offset 448 -..B1.49: - fldt 16(%rsp) - xorl %edi, %edi - fmul %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fldt 32(%rsp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 208(%rsp) - fldt 208(%rsp) - fstpt 32(%rsp) -..B1.50: - fldt 208(%rsp) - fld %st(1) - subl %ebx, %edi - fadd %st(1), %st - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fldt (%rsp) - fld %st(0) - fmul %st(4), %st - fsub %st, %st(2) - fsubp %st, %st(2) - fld %st(1) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fldt 144(%rsp) - fmul %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fsubrp %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fsubr %st, %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fldt 128(%rsp) - faddp %st, %st(2) - fld %st(1) - fmul %st(5), %st - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsub %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - fstpt 160(%rsp) - fldt 336(%rsp) - fld %st(0) - fdivr %st(2), %st - fld %st(1) - fldt 80(%rsp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - fsubr %st(4), %st - faddp %st, %st(1) - fld %st(0) - fsubr %st(4), %st - fxch %st(2) - fmul %st(5), %st - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(2) - fsubr %st, %st(4) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fmul %st(2), %st - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fsubrp %st, %st(3) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt 352(%rsp) - fmul %st(3), %st - fsubrp %st, %st(2) - fldt 336(%rsp) - fdivrp %st, %st(2) - addq $-32, %rsp - .cfi_def_cfa_offset 480 - fadd %st(1), %st - fstpt (%rsp) - fldt (%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) -..___tag_value_ctanhl.67: - call __libm_scalbl_k80@PLT -..___tag_value_ctanhl.68: -..B1.92: - addq $32, %rsp - .cfi_def_cfa_offset 448 -..B1.51: - fstpt 384(%rsp) - jmp ..B1.69 -..B1.52: - cmpq $0, 464(%rsp) - jne ..B1.54 -..B1.53: - movq 448(%rsp), %rbx - jmp ..B1.56 -..B1.54: - movzwl 472(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jge ..B1.60 -..B1.55: - movq 448(%rsp), %rbx - cmpl $32767, %edx - je ..B1.80 -..B1.56: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 464(%rsp) - fstpt (%rsp) - call tanhl@PLT -..B1.93: - addq $16, %rsp - .cfi_def_cfa_offset 448 - fstpt 368(%rsp) - testq %rbx, %rbx - jne ..B1.58 -..B1.57: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 480(%rsp) - fstpt (%rsp) - call tanl@PLT -..B1.94: - addq $16, %rsp - .cfi_def_cfa_offset 448 - fstpt 384(%rsp) - jmp ..B1.69 -..B1.58: - movzwl 472(%rsp), %eax - testl $32767, %eax - jle ..B1.79 -..B1.59: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 480(%rsp) - fstpt (%rsp) - call tanl@PLT -..B1.95: - addq $16, %rsp - .cfi_def_cfa_offset 448 - fldt 208(%rsp) - fmulp %st, %st(1) - fstpt 384(%rsp) - jmp ..B1.69 -..B1.60: - cmpl $32767, %edx - jge ..B1.62 -..B1.61: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 480(%rsp) - fstpt (%rsp) - call tanl@PLT -..B1.96: - addq $16, %rsp - .cfi_def_cfa_offset 448 - fstpt 368(%rsp) - fldt 368(%rsp) - fstpt 384(%rsp) - jmp ..B1.69 -..B1.62: - cmpl $-2147483648, 452(%rsp) - jne ..B1.64 -..B1.63: - cmpl $0, 448(%rsp) - je ..B1.65 -..B1.64: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 464(%rsp) - fstpt (%rsp) - call tanhl@PLT -..B1.97: - addq $16, %rsp - .cfi_def_cfa_offset 448 - fldt 464(%rsp) - fmul %st(1), %st - fstpt 384(%rsp) - fstpt 368(%rsp) - jmp ..B1.69 -..B1.65: - cmpl $-2147483648, 468(%rsp) - jne ..B1.67 -..B1.66: - cmpl $0, 464(%rsp) - je ..B1.68 -..B1.67: - fldt 464(%rsp) - fmul %st(0), %st - fstpt 464(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 464(%rsp) - fstpt (%rsp) - call tanhl@PLT -..B1.98: - addq $16, %rsp - .cfi_def_cfa_offset 448 - fldt 208(%rsp) - fstpt 384(%rsp) - fstpt 368(%rsp) - jmp ..B1.69 -..B1.68: - addq $-16, %rsp - .cfi_def_cfa_offset 464 - fldt 464(%rsp) - fstpt (%rsp) - call tanhl@PLT -..B1.99: - addq $16, %rsp - .cfi_def_cfa_offset 448 - lea ones(%rip), %rdx - movb 473(%rsp), %al - pxor %xmm0, %xmm0 - andb $-128, %al - fstpt 368(%rsp) - shrb $7, %al - movzbl %al, %ecx - mulsd (%rdx,%rcx,8), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 384(%rsp) -..B1.69: - testb %r15b, %r15b - je ..B1.71 -..B1.70: - fldcw 226(%rsp) -..B1.71: - movq 400(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.75 -..B1.72: - fldt 368(%rsp) - fldt 384(%rsp) - movq 400(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.74 -..B1.73: - addq $408, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 448 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.74: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.75: - call __stack_chk_fail@PLT -..B1.76: - movb 393(%rsp), %dl - movb 473(%rsp), %al - andb $127, %dl - andb $-128, %al - orb %al, %dl - jmp ..B1.18 -..B1.79: - fldt 464(%rsp) - fldt 208(%rsp) - fmulp %st, %st(1) - fstpt 384(%rsp) - jmp ..B1.69 -..B1.80: - movq $0x8000000000000000, %rax - cmpq %rax, %rbx - je ..B1.56 - jmp ..B1.60 -..B1.100: - fstp %st(0) - fstp %st(1) - jmp ..B1.36 - .align 16,0x90 - .cfi_endproc - .type ctanhl,@function - .size ctanhl,.-ctanhl - .data -# -- End ctanhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,16 - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,16 - .align 16 -t33: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type t33,@object - .size t33,32 - .align 16 -t32: - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type t32,@object - .size t32,32 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,48 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanl.S deleted file mode 100644 index d8053d5b13..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ctanl.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ctanl.c" - .text -..TXTST0: -# -- Begin ctanl - .text - .align 16,0x90 - .globl ctanl -ctanl: -# parameter 1: 144 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_ctanl.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - subq $128, %rsp - .cfi_def_cfa_offset 144 - xorb %r13b, %r13b - fldt .L_2il0floatpacket.8(%rip) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 112(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 96(%rsp) -..B1.2: - fnstcw 2(%rsp) -..B1.3: - movzwl 2(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, (%rsp) -..B1.5: - fldcw (%rsp) -..B1.6: - movb $1, %r13b -..B1.7: - fldt 160(%rsp) - movzwl 168(%rsp), %eax - andl $32767, %eax - fstpt 80(%rsp) - cmpl $32767, %eax - fldt 144(%rsp) - fstpt 96(%rsp) - jl ..B1.9 -..B1.8: - movq $0x8000000000000000, %rax - cmpq 160(%rsp), %rax - jne ..B1.10 -..B1.9: - movb 169(%rsp), %al - notb %al - movb 89(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 89(%rsp) -..B1.10: - addq $-32, %rsp - .cfi_def_cfa_offset 176 - movq %rsp, %rdi - movq 112(%rsp), %rax - movq 120(%rsp), %rdx - movq 128(%rsp), %rcx - movq 136(%rsp), %rsi - movq %rax, (%rdi) - movq %rdx, 8(%rdi) - movq %rcx, 16(%rdi) - movq %rsi, 24(%rdi) - call ctanhl@PLT -..B1.22: - fxch %st(1) - addq $32, %rsp - .cfi_def_cfa_offset 144 - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 24(%rsp), %eax - andl $32767, %eax - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - cmpl $32767, %eax - fstpt 48(%rsp) - fstpt 64(%rsp) - jl ..B1.12 -..B1.11: - movq $0x8000000000000000, %rax - cmpq 16(%rsp), %rax - jne ..B1.13 -..B1.12: - movb 25(%rsp), %al - notb %al - movb 73(%rsp), %dl - andb $-128, %al - andb $127, %dl - orb %al, %dl - movb %dl, 73(%rsp) -..B1.13: - testb %r13b, %r13b - je ..B1.15 -..B1.14: - fldcw 2(%rsp) -..B1.15: - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.19 -..B1.16: - fldt 48(%rsp) - fldt 64(%rsp) - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.18 -..B1.17: - addq $128, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - fxch %st(1) - ret - .cfi_def_cfa_offset 144 - .cfi_offset 13, -16 -..B1.18: - fstp %st(1) - fstp %st(0) - call __stack_chk_fail@PLT -..B1.19: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type ctanl,@function - .size ctanl,.-ctanl - .data -# -- End ctanl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_bessel.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_bessel.S deleted file mode 100644 index 8720bdd8d5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_bessel.S +++ /dev/null @@ -1,8227 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_bessel.c" - .text -..TXTST0: -# -- Begin __dpml_ux_bessel__ - .text - .align 16,0x90 -__dpml_ux_bessel__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -..B1.1: - .cfi_startproc -..___tag_value___dpml_ux_bessel__.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $136, %rsp - .cfi_def_cfa_offset 192 - movq %rsi, %r13 - movq %fs:40, %rax - movq %rcx, %r14 - xorq %rsp, %rax - movq %rdx, %r15 - movq %rax, 120(%rsp) - movq %rdi, %rbp - cmpq $2, %r13 - jge ..B1.53 -..B1.2: - lea __bessel_x_table(%rip), %r10 - lea (%r13,%r15), %rbx - lea (%rbx,%rbx,2), %r11 - movl 4(%rbp), %ecx - cmpl $5, %ecx - movq 8(%rbp), %rax - jg ..B1.8 -..B1.3: - je ..B1.50 -..B1.4: - movq %r10, %rbx - addq 19552(%r10,%r11,8), %rbx - testl %ecx, %ecx - jl ..B1.23 -..B1.5: - negl %ecx - addl $5, %ecx - shrq %cl, %rax - jmp ..B1.6 -..B1.7: - movq 8(%rbx), %r10 - sarq $32, %r10 - andq $1023, %r10 - addq %r10, %rbx -..B1.6: - cmpq (%rbx), %rax - jbe ..B1.23 - jmp ..B1.7 -..B1.8: - xorl %edi, %edi - movq %rbp, %rsi - movl $2, %edx - lea 96(%rsp), %rcx -..___tag_value___dpml_ux_bessel__.16: - call __dpml_divide__@PLT -..___tag_value___dpml_ux_bessel__.17: -..B1.9: - testq %r13, %r13 - jne ..B1.11 -..B1.10: - movl $10, %ebx - lea 18168+__bessel_x_table(%rip), %rsi - lea 18504+__bessel_x_table(%rip), %r12 - jmp ..B1.12 -..B1.11: - movl $9, %ebx - lea 18872+__bessel_x_table(%rip), %rsi - lea 19208+__bessel_x_table(%rip), %r12 -..B1.12: - movl $9, %edx - lea 96(%rsp), %rdi - movq $0x1000000000000044, %rcx - lea (%rsp), %r8 -..___tag_value___dpml_ux_bessel__.18: - call __dpml_evaluate_rational__@PLT -..___tag_value___dpml_ux_bessel__.19: -..B1.13: - movq %r12, %rsi - lea 96(%rsp), %rdi - movq %rbx, %rdx - movl $70, %ecx - lea 24(%rsp), %r8 -..___tag_value___dpml_ux_bessel__.20: - call __dpml_evaluate_rational__@PLT -..___tag_value___dpml_ux_bessel__.21: -..B1.14: - movq %rbp, %rdi - lea (%r13,%r13), %rsi - negq %rsi - movl $3, %edx - incq %rsi - lea 48(%rsp), %rcx - subq %r15, %rsi -..___tag_value___dpml_ux_bessel__.22: - call __dpml_ux_sincos@PLT -..___tag_value___dpml_ux_bessel__.23: -..B1.15: - lea (%rsp), %rdi - movq %rdi, %rdx - lea 48(%rsp), %rsi -..___tag_value___dpml_ux_bessel__.24: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_bessel__.25: -..B1.16: - lea 24(%rsp), %rdi - movq %rdi, %rdx - lea 72(%rsp), %rsi -..___tag_value___dpml_ux_bessel__.26: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_bessel__.27: -..B1.17: - xorl %edx, %edx - movl $1, %eax - testq %r13, %r13 - lea (%rsp), %rdi - cmove %rax, %rdx - lea 24(%rsp), %rsi - movq %rdi, %rcx -..___tag_value___dpml_ux_bessel__.28: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_bessel__.29: -..B1.18: - movl $1, %esi - lea 96(%rsp), %rdi - lea 24(%rsp), %rdx -..___tag_value___dpml_ux_bessel__.30: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___dpml_ux_bessel__.31: -..B1.19: - movq %r14, %rdx - lea (%rsp), %rdi - lea 24(%rsp), %rsi -..___tag_value___dpml_ux_bessel__.32: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_bessel__.33: -..B1.20: - movq 120(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.47 -..B1.21: - addq $136, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.23: - movq 8(%rbx), %r12 - testq $8388608, %r12 - jne ..B1.25 -..B1.24: - movq %rbp, %r15 - jmp ..B1.28 -..B1.25: - movq 16(%rbx), %rax - movq %rbp, %rdi - movq %rax, 32(%rsp) - lea 24(%rsp), %rsi - movq 24(%rbx), %r10 - movl $1, %edx - movq %r10, 16(%rsi) - lea (%rsp), %rcx - movl $0, 24(%rcx) - movl 40(%rbx), %r15d - andl $7, %r15d - movl %r15d, 28(%rcx) -..___tag_value___dpml_ux_bessel__.54: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_bessel__.55: -..B1.26: - movq 32(%rbx), %rax - lea (%rsp), %rdi - movq %rax, 32(%rdi) - lea 24(%rsp), %rsi - movq 40(%rbx), %r10 - movl $1, %edx - movq %rdi, %rcx - addl $-128, %r15d - movq %r10, 16(%rsi) - movl %r15d, 4(%rsi) -..___tag_value___dpml_ux_bessel__.56: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_bessel__.57: -..B1.27: - lea (%rsp), %r15 -..B1.28: - movq %r12, %rdx - addq $48, %rbx - sarq $14, %rdx - andq $127, %rdx - testq $16777216, %r12 - je ..B1.30 -..B1.29: - movq %r12, %rcx - movl $1, %eax - shrq $7, %rcx - movq %r12, %r8 - andq $127, %r8 - movq %r15, %rdi - shlq %cl, %rax - movq %rdx, %rsi - decq %rax - movq %rbx, %rdx - movq %rax, %rcx - movq %r14, %r9 -..___tag_value___dpml_ux_bessel__.58: - call __dpml_evaluate_packed_poly__@PLT -..___tag_value___dpml_ux_bessel__.59: - jmp ..B1.31 -..B1.30: - movq %r15, %rdi - movq %rbx, %rsi - movq %r12, %rcx - movq %r14, %r8 -..___tag_value___dpml_ux_bessel__.60: - call __dpml_evaluate_rational__@PLT -..___tag_value___dpml_ux_bessel__.61: -..B1.31: - movq %r12, %rdx - sarq $11, %rdx - andq $3, %rdx - je ..B1.33 -..B1.32: - decq %rdx - lea 24(%r14), %rsi - movq %r14, %rdi - movq %r14, %rcx -..___tag_value___dpml_ux_bessel__.62: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_bessel__.63: -..B1.33: - testq $4194304, %r12 - je ..B1.35 -..B1.34: - movq %r15, %rdi - movq %r14, %rsi - movq %r14, %rdx -..___tag_value___dpml_ux_bessel__.64: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_bessel__.65: -..B1.35: - testq $8192, %r12 - je ..B1.37 -..B1.36: - movslq (%r14), %rax - btcq $31, %rax - movl %eax, (%r14) -..B1.37: - testq $2097152, %r12 - je ..B1.45 -..B1.38: - cmpq %rbp, %r15 - jne ..B1.40 -..B1.39: - sarq $58, %r12 - subl %r12d, 4(%rbp) -..B1.40: - cmpq $1, %r13 - je ..B1.48 -..B1.41: - movq %rbp, %rdi - lea 19664+__bessel_x_table(%rip), %rsi - lea (%rsp), %rdx -..___tag_value___dpml_ux_bessel__.66: - call __dpml_ux_log__@PLT -..___tag_value___dpml_ux_bessel__.67: -..B1.42: - movq %rbp, %rdi - movq %r13, %rsi - xorl %edx, %edx - lea 24(%rsp), %rcx -..___tag_value___dpml_ux_bessel__.68: - call __dpml_ux_bessel__ -..___tag_value___dpml_ux_bessel__.69: -..B1.43: - lea (%rsp), %rsi - movq %rsi, %rdx - lea 24(%rsp), %rdi -..___tag_value___dpml_ux_bessel__.70: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_bessel__.71: -..B1.44: - movq %r14, %rsi - lea (%rsp), %rdi - movl $1, %edx - movq %r14, %rcx -..___tag_value___dpml_ux_bessel__.72: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_bessel__.73: -..B1.45: - movq 120(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - je ..B1.21 -..B1.47: - call __stack_chk_fail@PLT -..B1.48: - lea 19640+__bessel_x_table(%rip), %rdi - movq %rbp, %rsi - movl $2, %edx - lea 24(%rsp), %rcx -..___tag_value___dpml_ux_bessel__.74: - call __dpml_divide__@PLT -..___tag_value___dpml_ux_bessel__.75: -..B1.49: - movq %r14, %rdi - lea 24(%rsp), %rsi - xorl %edx, %edx - movq %r14, %rcx -..___tag_value___dpml_ux_bessel__.76: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_bessel__.77: - jmp ..B1.41 -..B1.50: - cmpq 19544(%r10,%r11,8), %rax - ja ..B1.8 -..B1.51: - movq %r10, %rbx - addq 19552(%r10,%r11,8), %rbx - jmp ..B1.5 -..B1.53: - movq %rbp, %rdi - movq %r13, %rsi - movq %r15, %rdx - movq %r14, %rcx -..___tag_value___dpml_ux_bessel__.78: - call __dpml_ux_large_order_bessel__ -..___tag_value___dpml_ux_bessel__.79: -..B1.54: - movq 120(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.47 - jmp ..B1.21 - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_bessel__,@function - .size __dpml_ux_bessel__,.-__dpml_ux_bessel__ - .data -# -- End __dpml_ux_bessel__ - .text -# -- Begin __dpml_ux_large_order_bessel__ - .text - .align 16,0x90 -__dpml_ux_large_order_bessel__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -..B2.1: - .cfi_startproc -..___tag_value___dpml_ux_large_order_bessel__.81: -..L82: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $184, %rsp - .cfi_def_cfa_offset 240 - movq %rdi, %r13 - movq %rcx, %rbx - movq %rdx, %r15 - movq %rsi, %rbp - xorl %edi, %edi - movq %r13, %rsi - movl $2, %edx - movq %fs:40, %rax - lea 120(%rsp), %rcx - xorq %rsp, %rax - movq %rax, 48(%rcx) -..___tag_value___dpml_ux_large_order_bessel__.96: - call __dpml_divide__@PLT -..___tag_value___dpml_ux_large_order_bessel__.97: -..B2.2: - movl $2, %esi - lea 48(%rsp), %rax - movq %rax, %rdi - lea 72(%rsp), %r14 - movq %rax, -8(%rax) - lea 96(%rsp), %r12 - movq %rbp, 8(%rax) -..___tag_value___dpml_ux_large_order_bessel__.98: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_large_order_bessel__.99: -..B2.57: - movq %rax, %rcx -..B2.3: - movl 4(%r13), %r10d - negq %rcx - movslq %r10d, %r8 - addq $64, %rcx - negq %r8 - pxor %xmm0, %xmm0 - addq %rcx, %r8 - pxor %xmm1, %xmm1 - cvtsi2sdq %r8, %xmm0 - cvtsi2sdq %rcx, %xmm1 - subsd .L_2il0floatpacket.97(%rip), %xmm0 - subsd .L_2il0floatpacket.98(%rip), %xmm1 - pxor %xmm2, %xmm2 - movq %rcx, %rax - cvtsi2sdq %rbp, %xmm2 - mulsd .L_2il0floatpacket.96(%rip), %xmm1 - mulsd %xmm0, %xmm2 - negq %rax - subsd %xmm1, %xmm2 - incq %rax - pxor %xmm1, %xmm1 - cvtsi2sdq %rax, %xmm1 - cmpq $2, %r15 - subsd %xmm2, %xmm1 - je ..B2.53 -..B2.4: - movsd .L_2il0floatpacket.100(%rip), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B2.8 -..B2.5: - movl $-65536, %edx - xorl %eax, %eax -..B2.6: - movl %eax, (%rbx) - movq $0x8000000000000000, %rax - movl %edx, 4(%rbx) - movq %rax, 8(%rbx) - movq $0, 16(%rbx) - movq 168(%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B2.32 -..B2.7: - addq $184, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 240 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.8: - negq %rcx - movq 8(%r13), %r9 - movq %r9, %rax - shrq %cl, %rax - testq %r8, %r8 - jle ..B2.38 -..B2.9: - shrq $1, %r9 - pxor %xmm0, %xmm0 - cvtsi2ssq %r9, %xmm0 - movss %xmm0, 32(%rsp) - pxor %xmm0, %xmm0 - cvtsi2ssq %rbp, %xmm0 - movss %xmm0, 16(%rsp) - movl %r10d, (%rsp) -..___tag_value___dpml_ux_large_order_bessel__.120: - call log2f@PLT -..___tag_value___dpml_ux_large_order_bessel__.121: -..B2.58: - movl (%rsp), %r10d - movss %xmm0, 8(%rsp) -..B2.10: - movss .L_2il0floatpacket.101(%rip), %xmm0 - mulss 8(%rsp), %xmm0 - movss .L_2il0floatpacket.108(%rip), %xmm1 - movl %r10d, (%rsp) - addss .L_2il0floatpacket.102(%rip), %xmm0 - addss 16(%rsp), %xmm1 - addss %xmm0, %xmm1 - movss 32(%rsp), %xmm0 - movss %xmm1, 24(%rsp) -..___tag_value___dpml_ux_large_order_bessel__.122: - call log2f@PLT -..___tag_value___dpml_ux_large_order_bessel__.123: -..B2.59: - movl (%rsp), %r10d - movss %xmm0, 32(%rsp) -..B2.11: - addl $-64, %r10d - pxor %xmm0, %xmm0 - cvtsi2ss %r10d, %xmm0 - movss 32(%rsp), %xmm3 - pxor %xmm1, %xmm1 - pxor %xmm4, %xmm4 - addss %xmm0, %xmm3 - cvtss2sd 16(%rsp), %xmm4 - addss .L_2il0floatpacket.103(%rip), %xmm3 - movss %xmm3, 32(%rsp) - cvtss2sd %xmm3, %xmm1 - subss 8(%rsp), %xmm3 - movsd .L_2il0floatpacket.96(%rip), %xmm2 - cvtss2sd %xmm3, %xmm3 - mulsd %xmm2, %xmm1 - addsd %xmm2, %xmm4 - movsd .L_2il0floatpacket.104(%rip), %xmm5 - mulsd %xmm3, %xmm4 - subsd %xmm1, %xmm5 - movss 24(%rsp), %xmm0 - subsd %xmm4, %xmm5 - cvtsd2ss %xmm5, %xmm5 - movss %xmm5, (%rsp) -..___tag_value___dpml_ux_large_order_bessel__.124: - call log2f@PLT -..___tag_value___dpml_ux_large_order_bessel__.125: -..B2.12: - pxor %xmm2, %xmm2 - pxor %xmm1, %xmm1 - cvtss2sd %xmm0, %xmm2 - cvtss2sd (%rsp), %xmm1 - subss 32(%rsp), %xmm0 - mulsd .L_2il0floatpacket.105(%rip), %xmm2 - cvtss2sd %xmm0, %xmm0 - addsd %xmm1, %xmm2 - divsd %xmm0, %xmm2 - cvtsd2ss %xmm2, %xmm2 - movss 24(%rsp), %xmm0 - movsd %xmm1, 16(%rsp) - addss %xmm2, %xmm0 - cvtss2sd %xmm0, %xmm0 - mulsd .L_2il0floatpacket.96(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 8(%rsp) -..___tag_value___dpml_ux_large_order_bessel__.126: - call log2f@PLT -..___tag_value___dpml_ux_large_order_bessel__.127: -..B2.61: - movsd 16(%rsp), %xmm1 -..B2.13: - pxor %xmm2, %xmm2 - cvtss2sd %xmm0, %xmm2 - subss 32(%rsp), %xmm0 - mulsd .L_2il0floatpacket.105(%rip), %xmm2 - cvtss2sd %xmm0, %xmm0 - addsd %xmm1, %xmm2 - divsd %xmm0, %xmm2 - cvtsd2ss %xmm2, %xmm2 - movss 8(%rsp), %xmm0 - movsd %xmm1, 16(%rsp) - addss %xmm2, %xmm0 - cvtss2sd %xmm0, %xmm0 - mulsd .L_2il0floatpacket.96(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, (%rsp) -..___tag_value___dpml_ux_large_order_bessel__.128: - call log2f@PLT -..___tag_value___dpml_ux_large_order_bessel__.129: -..B2.62: - movsd 16(%rsp), %xmm1 - movaps %xmm0, %xmm3 -..B2.14: - pxor %xmm2, %xmm2 - movq $0x8000000000000000, %r13 - cvtss2sd %xmm3, %xmm2 - subss 32(%rsp), %xmm3 - movsd .L_2il0floatpacket.105(%rip), %xmm0 - xorl %r8d, %r8d - mulsd %xmm2, %xmm0 - xorl %r9d, %r9d - cvtss2sd %xmm3, %xmm3 - addsd %xmm0, %xmm1 - divsd %xmm3, %xmm1 - cvtsd2ss %xmm1, %xmm1 - movss (%rsp), %xmm4 - movsd .L_2il0floatpacket.96(%rip), %xmm5 - addss %xmm1, %xmm4 - cvtss2sd %xmm4, %xmm4 - mulsd %xmm4, %xmm5 - cvtsd2ss %xmm5, %xmm5 - cvtss2sd %xmm5, %xmm5 - movsd .L_2il0floatpacket.109(%rip), %xmm7 - movaps %xmm7, %xmm6 - addsd .L_2il0floatpacket.106(%rip), %xmm5 - comisd %xmm7, %xmm5 - cmplesd %xmm5, %xmm6 - movaps %xmm5, %xmm8 - movd %xmm6, %r15 - subsd %xmm7, %xmm8 - jae ..L130 - movaps %xmm5, %xmm8 -..L130: - cvttsd2si %xmm8, %rax - andq %r13, %r15 - addq %r15, %rax - lea 1(%rbp), %r15 - cmpq %r15, %rax - movl %r8d, 48(%rsp) - cmova %rax, %r15 - movl $-262144, 52(%rsp) - testq $1, %r15 - movq %r9, 56(%rsp) - movq %r9, 64(%rsp) - movl %r8d, 72(%rsp) - movl $1, 76(%rsp) - movq %r13, 80(%rsp) - movq %r9, 88(%rsp) - movl %r8d, 8(%rsp) - je ..B2.16 -..B2.15: - movl $-262144, 12(%rsp) - movq %r9, 16(%rsp) - movq %r9, 24(%rsp) - jmp ..B2.17 -..B2.16: - movl $1, 12(%rsp) - movq %r13, 16(%rsp) - movq $0, 24(%rsp) -..B2.17: - movl $2, %esi - lea 144(%rsp), %rdi - lea (%r15,%r15), %rax - movq %rax, 8(%rdi) -..___tag_value___dpml_ux_large_order_bessel__.131: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_large_order_bessel__.132: -..B2.18: - movl 148(%rsp), %ecx - movq %r13, %rax - addl $62, %ecx - shrq %cl, %rax - movq %rbp, (%rsp) - movq %rax, %r13 - movq 40(%rsp), %rbp -..B2.19: - movq %r12, %rdx - lea 120(%rsp), %rdi - lea 144(%rsp), %rsi -..___tag_value___dpml_ux_large_order_bessel__.133: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_large_order_bessel__.134: -..B2.20: - movq %r14, %rdi - movq %r12, %rsi - movq %r12, %rdx -..___tag_value___dpml_ux_large_order_bessel__.135: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_large_order_bessel__.136: -..B2.21: - movq %r12, %rdi - xorl %esi, %esi -..___tag_value___dpml_ux_large_order_bessel__.137: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_large_order_bessel__.138: -..B2.22: - movq %rbp, %rdi - xorl %esi, %esi -..___tag_value___dpml_ux_large_order_bessel__.139: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_large_order_bessel__.140: -..B2.23: - movq %r12, %rdi - movq %rbp, %rsi - movl $1, %edx - movq %r12, %rcx -..___tag_value___dpml_ux_large_order_bessel__.141: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_large_order_bessel__.142: -..B2.24: - decq %r15 - je ..B2.33 -..B2.25: - cmpq (%rsp), %r15 - jne ..B2.27 -..B2.26: - movl (%r12), %r8d - movl 4(%r12), %r9d - movq 8(%r12), %r10 - movq 16(%r12), %r11 - movl %r8d, (%rbx) - movl %r9d, 4(%rbx) - movq %r10, 8(%rbx) - movq %r11, 16(%rbx) -..B2.27: - testq $1, %r15 - jne ..B2.29 -..B2.28: - movq %r12, %rsi - lea 8(%rsp), %rdi - xorl %edx, %edx - movq %rdi, %rcx -..___tag_value___dpml_ux_large_order_bessel__.143: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_large_order_bessel__.144: -..B2.29: - movq %rbp, %r8 - movq %r14, %rbp - movq %r12, %r14 - movq %r8, %r12 - movq 152(%rsp), %r8 - movq $0x8000000000000000, %r9 - subq %r13, %r8 - cmpq %r9, %r8 - jae ..B2.31 -..B2.30: - decl 148(%rsp) - addq %r8, %r8 - addq %r13, %r13 -..B2.31: - movq %r8, 152(%rsp) - jmp ..B2.19 -..B2.32: - call __stack_chk_fail@PLT -..B2.33: - movq %r12, %rdi - lea 8(%rsp), %rsi - xorl %edx, %edx - movq %rsi, %rcx - incl 4(%rsi) -..___tag_value___dpml_ux_large_order_bessel__.145: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_large_order_bessel__.146: -..B2.34: - movq %rbx, %rdi - lea 8(%rsp), %rsi - movl $2, %edx - movq %rbx, %rcx -..___tag_value___dpml_ux_large_order_bessel__.147: - call __dpml_divide__@PLT -..___tag_value___dpml_ux_large_order_bessel__.148: -..B2.35: - movq 168(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.32 - jmp ..B2.7 -..B2.38: - jne ..B2.40 -..B2.39: - cmpq %rbp, %rax - jb ..B2.9 -..B2.40: - movq %r13, %rdi - xorl %esi, %esi - movq %r15, %rdx - lea 48(%rsp), %rcx -..___tag_value___dpml_ux_large_order_bessel__.149: - call __dpml_ux_bessel__ -..___tag_value___dpml_ux_large_order_bessel__.150: -..B2.41: - movq %r13, %rdi - movl $1, %esi - movq %r15, %rdx - movq %r14, %rcx -..___tag_value___dpml_ux_large_order_bessel__.151: - call __dpml_ux_bessel__ -..___tag_value___dpml_ux_large_order_bessel__.152: -..B2.42: - movq $0x8000000000000000, %r15 - decq %rbp - movq %rbx, (%rsp) - movq %r15, %r13 - movl $0, 144(%rsp) - movl $2, 148(%rsp) - movq %r15, 152(%rsp) - movq $0, 160(%rsp) - movq 40(%rsp), %rbx -..B2.43: - movq %r12, %rdx - lea 120(%rsp), %rdi - lea 144(%rsp), %rsi -..___tag_value___dpml_ux_large_order_bessel__.153: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_large_order_bessel__.154: -..B2.44: - movq %r14, %rdi - movq %r12, %rsi - movq %r12, %rdx -..___tag_value___dpml_ux_large_order_bessel__.155: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_large_order_bessel__.156: -..B2.45: - movq %r12, %rdi - movq %rbx, %rsi - movl $1, %edx - movq %r12, %rcx -..___tag_value___dpml_ux_large_order_bessel__.157: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_large_order_bessel__.158: -..B2.46: - decq %rbp - testq %rbp, %rbp - jle ..B2.50 -..B2.47: - movq %rbx, %rax - movq %r14, %rbx - movq %r12, %r14 - movq %rax, %r12 - movq 152(%rsp), %rax - addq %r13, %rax - cmpq %r13, %rax - jae ..B2.49 -..B2.48: - shrq $1, %rax - incl 148(%rsp) - addq %r15, %rax - shrq $1, %r13 -..B2.49: - movq %rax, 152(%rsp) - jmp ..B2.43 -..B2.50: - movq (%rsp), %rbx - movl (%r12), %eax - movl 4(%r12), %ebp - movq 8(%r12), %r8 - movq 16(%r12), %rdx - movl %eax, (%rbx) - movl %ebp, 4(%rbx) - movq %r8, 8(%rbx) - movq %rdx, 16(%rbx) - movq 168(%rsp), %rcx - xorq %rsp, %rcx - cmpq %fs:40, %rcx - jne ..B2.32 - jmp ..B2.7 -..B2.53: - comisd .L_2il0floatpacket.99(%rip), %xmm2 - jbe ..B2.40 -..B2.54: - movl $65536, %edx - movq $0x080000000, %rax - jmp ..B2.6 - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_large_order_bessel__,@function - .size __dpml_ux_large_order_bessel__,.-__dpml_ux_large_order_bessel__ - .data -# -- End __dpml_ux_large_order_bessel__ - .text -# -- Begin __j0q - .text - .align 16,0x90 - .globl __j0q -__j0q: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value___j0q.160: -..L161: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - subq $368, %rsp - .cfi_def_cfa_offset 400 - xorl %esi, %esi - lea __bessel_x_table(%rip), %rcx - lea 48(%rsp), %rdi - movq %fs:40, %rax - lea 304(%rsp), %rdx - xorq %rsp, %rax - lea 336(%rsp), %r8 - movaps %xmm0, (%rdi) - lea (%rsp), %r9 - movq %rax, 48(%rdx) - movq $1, -40(%rdi) - movq $0, (%r9) -..___tag_value___j0q.169: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___j0q.170: -..B3.2: - testq %rax, %rax - jl ..B3.20 -..B3.4: - movl 308(%rsp), %ecx - lea 19544+__bessel_x_table(%rip), %rdi - movq 312(%rsp), %rax - cmpl $5, %ecx - movl $0, 304(%rsp) - jg ..B3.10 -..B3.5: - je ..B3.44 -..B3.6: - lea __bessel_x_table(%rip), %rbx - addq 8(%rdi), %rbx - testl %ecx, %ecx - jl ..B3.23 -..B3.7: - negl %ecx - addl $5, %ecx - shrq %cl, %rax - jmp ..B3.8 -..B3.9: - movq 8(%rbx), %rcx - sarq $32, %rcx - andq $1023, %rcx - addq %rcx, %rbx -..B3.8: - cmpq (%rbx), %rax - jbe ..B3.23 - jmp ..B3.9 -..B3.10: - xorl %edi, %edi - lea 304(%rsp), %rsi - movl $2, %edx - lea 160(%rsp), %rcx -..___tag_value___j0q.171: - call __dpml_divide__@PLT -..___tag_value___j0q.172: -..B3.11: - lea 18168+__bessel_x_table(%rip), %rsi - lea 160(%rsp), %rdi - movl $9, %edx - movq $0x1000000000000044, %rcx - lea 64(%rsp), %r8 -..___tag_value___j0q.173: - call __dpml_evaluate_rational__@PLT -..___tag_value___j0q.174: -..B3.12: - lea 18504+__bessel_x_table(%rip), %rsi - lea 160(%rsp), %rdi - movl $10, %edx - movl $70, %ecx - lea 88(%rsp), %r8 -..___tag_value___j0q.175: - call __dpml_evaluate_rational__@PLT -..___tag_value___j0q.176: -..B3.13: - movl $1, %esi - lea 304(%rsp), %rdi - movl $3, %edx - lea 112(%rsp), %rcx -..___tag_value___j0q.177: - call __dpml_ux_sincos@PLT -..___tag_value___j0q.178: -..B3.14: - lea 64(%rsp), %rdi - movq %rdi, %rdx - lea 112(%rsp), %rsi -..___tag_value___j0q.179: - call __dpml_multiply__@PLT -..___tag_value___j0q.180: -..B3.15: - lea 88(%rsp), %rdi - movq %rdi, %rdx - lea 136(%rsp), %rsi -..___tag_value___j0q.181: - call __dpml_multiply__@PLT -..___tag_value___j0q.182: -..B3.16: - movl $1, %edx - lea 64(%rsp), %rdi - movq %rdi, %rcx - lea 88(%rsp), %rsi -..___tag_value___j0q.183: - call __dpml_addsub__@PLT -..___tag_value___j0q.184: -..B3.17: - movl $1, %esi - lea 160(%rsp), %rdi - lea 88(%rsp), %rdx -..___tag_value___j0q.185: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___j0q.186: -..B3.18: - lea 64(%rsp), %rdi - lea 88(%rsp), %rsi - lea 256(%rsp), %rdx -..___tag_value___j0q.187: - call __dpml_multiply__@PLT -..___tag_value___j0q.188: -..B3.19: - xorl %edx, %edx - lea 256(%rsp), %rdi - xorl %ecx, %ecx - lea 336(%rsp), %rsi - lea (%rsp), %r8 -..___tag_value___j0q.189: - call __dpml_pack__@PLT -..___tag_value___j0q.190: -..B3.20: - movq 352(%rsp), %rax - xorq %rsp, %rax - movaps 336(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B3.46 -..B3.21: - addq $368, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 400 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B3.23: - movq 8(%rbx), %r14 - testq $8388608, %r14 - jne ..B3.25 -..B3.24: - lea 304(%rsp), %r15 - jmp ..B3.28 -..B3.25: - movq 16(%rbx), %rax - lea 304(%rsp), %rdi - movq %rax, -88(%rdi) - lea 208(%rsp), %rsi - movq 24(%rbx), %r8 - movl $1, %edx - movq %r8, 16(%rsi) - lea 184(%rsp), %rcx - movl $0, 24(%rcx) - movl 40(%rbx), %r15d - andl $7, %r15d - movl %r15d, 28(%rcx) -..___tag_value___j0q.202: - call __dpml_addsub__@PLT -..___tag_value___j0q.203: -..B3.26: - movq 32(%rbx), %rax - lea 184(%rsp), %rdi - movq %rax, 32(%rdi) - lea 208(%rsp), %rsi - movq 40(%rbx), %r8 - movl $1, %edx - movq %rdi, %rcx - addl $-128, %r15d - movq %r8, 16(%rsi) - movl %r15d, 4(%rsi) -..___tag_value___j0q.204: - call __dpml_addsub__@PLT -..___tag_value___j0q.205: -..B3.27: - lea 184(%rsp), %r15 -..B3.28: - movq %r14, %rdx - addq $48, %rbx - sarq $14, %rdx - andq $127, %rdx - testq $16777216, %r14 - je ..B3.30 -..B3.29: - movq %r14, %rcx - movl $1, %eax - shrq $7, %rcx - movq %r14, %r8 - andq $127, %r8 - movq %r15, %rdi - shlq %cl, %rax - movq %rdx, %rsi - decq %rax - movq %rbx, %rdx - movq %rax, %rcx - lea 256(%rsp), %r9 -..___tag_value___j0q.206: - call __dpml_evaluate_packed_poly__@PLT -..___tag_value___j0q.207: - jmp ..B3.31 -..B3.30: - movq %r15, %rdi - movq %rbx, %rsi - movq %r14, %rcx - lea 256(%rsp), %r8 -..___tag_value___j0q.208: - call __dpml_evaluate_rational__@PLT -..___tag_value___j0q.209: -..B3.31: - movq %r14, %rdx - sarq $11, %rdx - andq $3, %rdx - je ..B3.33 -..B3.32: - decq %rdx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 280(%rsp), %rsi -..___tag_value___j0q.210: - call __dpml_addsub__@PLT -..___tag_value___j0q.211: -..B3.33: - testq $4194304, %r14 - je ..B3.35 -..B3.34: - movq %r15, %rdi - lea 256(%rsp), %rsi - movq %rsi, %rdx -..___tag_value___j0q.212: - call __dpml_multiply__@PLT -..___tag_value___j0q.213: -..B3.35: - testq $8192, %r14 - je ..B3.37 -..B3.36: - movslq 256(%rsp), %rax - btcq $31, %rax - movl %eax, 256(%rsp) -..B3.37: - testq $2097152, %r14 - je ..B3.19 -..B3.38: - lea 304(%rsp), %rax - cmpq %rax, %r15 - jne ..B3.40 -..B3.39: - sarq $58, %r14 - subl %r14d, 308(%rsp) -..B3.40: - lea 19664+__bessel_x_table(%rip), %rsi - lea 304(%rsp), %rdi - lea 184(%rsp), %rdx -..___tag_value___j0q.214: - call __dpml_ux_log__@PLT -..___tag_value___j0q.215: -..B3.41: - xorl %esi, %esi - lea 304(%rsp), %rdi - xorl %edx, %edx - lea 208(%rsp), %rcx -..___tag_value___j0q.216: - call __dpml_ux_bessel__ -..___tag_value___j0q.217: -..B3.42: - lea 184(%rsp), %rsi - movq %rsi, %rdx - lea 208(%rsp), %rdi -..___tag_value___j0q.218: - call __dpml_multiply__@PLT -..___tag_value___j0q.219: -..B3.43: - movl $1, %edx - lea 256(%rsp), %rsi - movq %rsi, %rcx - lea 184(%rsp), %rdi -..___tag_value___j0q.220: - call __dpml_addsub__@PLT -..___tag_value___j0q.221: - jmp ..B3.19 -..B3.44: - cmpq (%rdi), %rax - ja ..B3.10 -..B3.45: - lea __bessel_x_table(%rip), %rbx - addq 8(%rdi), %rbx - jmp ..B3.7 -..B3.46: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __j0q,@function - .size __j0q,.-__j0q - .data -# -- End __j0q - .text -# -- Begin __j1q - .text - .align 16,0x90 - .globl __j1q -__j1q: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value___j1q.223: -..L224: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - pushq %rbp - .cfi_def_cfa_offset 40 - .cfi_offset 6, -40 - subq $360, %rsp - .cfi_def_cfa_offset 400 - xorl %esi, %esi - movaps %xmm0, 48(%rsp) - lea 48(%rsp), %rdi - movq 8(%rdi), %rbp - lea 304(%rsp), %rdx - shrq $32, %rbp - lea 8+__bessel_x_table(%rip), %rcx - movq %fs:40, %rax - lea 336(%rsp), %r8 - xorq %rsp, %rax - lea (%rsp), %r9 - movq %rax, 48(%rdx) - andl $-2147483648, %ebp - movq $1, -40(%rdi) - movq $0, (%r9) -..___tag_value___j1q.234: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___j1q.235: -..B4.2: - testq %rax, %rax - jge ..B4.4 -..B4.3: - movq $0x7fff000000000000, %rax - movslq %ebp, %rbp - movq %rax, %rdx - movq 344(%rsp), %rcx - andq %rcx, %rdx - shlq $32, %rbp - orq %rcx, %rbp - cmpq %rdx, %rax - cmovne %rbp, %rcx - movq %rcx, 344(%rsp) - jmp ..B4.20 -..B4.4: - movl 308(%rsp), %ecx - lea 19568+__bessel_x_table(%rip), %rdi - movq 312(%rsp), %rax - cmpl $5, %ecx - movl $0, 304(%rsp) - jg ..B4.10 -..B4.5: - je ..B4.46 -..B4.6: - lea __bessel_x_table(%rip), %rbx - addq 8(%rdi), %rbx - testl %ecx, %ecx - jl ..B4.23 -..B4.7: - negl %ecx - addl $5, %ecx - shrq %cl, %rax - jmp ..B4.8 -..B4.9: - movq 8(%rbx), %rcx - sarq $32, %rcx - andq $1023, %rcx - addq %rcx, %rbx -..B4.8: - cmpq (%rbx), %rax - jbe ..B4.23 - jmp ..B4.9 -..B4.10: - xorl %edi, %edi - lea 304(%rsp), %rsi - movl $2, %edx - lea 160(%rsp), %rcx -..___tag_value___j1q.236: - call __dpml_divide__@PLT -..___tag_value___j1q.237: -..B4.11: - lea 18872+__bessel_x_table(%rip), %rsi - lea 160(%rsp), %rdi - movl $9, %edx - movq $0x1000000000000044, %rcx - lea 64(%rsp), %r8 -..___tag_value___j1q.238: - call __dpml_evaluate_rational__@PLT -..___tag_value___j1q.239: -..B4.12: - lea 19208+__bessel_x_table(%rip), %rsi - lea 160(%rsp), %rdi - movl $9, %edx - movl $70, %ecx - lea 88(%rsp), %r8 -..___tag_value___j1q.240: - call __dpml_evaluate_rational__@PLT -..___tag_value___j1q.241: -..B4.13: - movq $-1, %rsi - lea 304(%rsp), %rdi - movl $3, %edx - lea 112(%rsp), %rcx -..___tag_value___j1q.242: - call __dpml_ux_sincos@PLT -..___tag_value___j1q.243: -..B4.14: - lea 64(%rsp), %rdi - movq %rdi, %rdx - lea 112(%rsp), %rsi -..___tag_value___j1q.244: - call __dpml_multiply__@PLT -..___tag_value___j1q.245: -..B4.15: - lea 88(%rsp), %rdi - movq %rdi, %rdx - lea 136(%rsp), %rsi -..___tag_value___j1q.246: - call __dpml_multiply__@PLT -..___tag_value___j1q.247: -..B4.16: - xorl %edx, %edx - lea 64(%rsp), %rdi - movq %rdi, %rcx - lea 88(%rsp), %rsi -..___tag_value___j1q.248: - call __dpml_addsub__@PLT -..___tag_value___j1q.249: -..B4.17: - movl $1, %esi - lea 160(%rsp), %rdi - lea 88(%rsp), %rdx -..___tag_value___j1q.250: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___j1q.251: -..B4.18: - lea 64(%rsp), %rdi - lea 88(%rsp), %rsi - lea 256(%rsp), %rdx -..___tag_value___j1q.252: - call __dpml_multiply__@PLT -..___tag_value___j1q.253: -..B4.19: - movl $8, %eax - xorl %ecx, %ecx - xorl %ebp, 256(%rsp) - cmovne %eax, %ecx - movl $513, %ebx - lea __bessel_error_codes(%rip), %r8 - shrq %cl, %rbx - lea 256(%rsp), %rdi - movzbl %bl, %ebp - lea 336(%rsp), %rsi - movq (%r8), %rcx - movq (%r8,%rbp,8), %rdx - lea (%rsp), %r8 -..___tag_value___j1q.254: - call __dpml_pack__@PLT -..___tag_value___j1q.255: -..B4.20: - movq 352(%rsp), %rax - xorq %rsp, %rax - movaps 336(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B4.48 -..B4.21: - addq $360, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 400 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 15, -24 -..B4.23: - movq 8(%rbx), %r12 - testq $8388608, %r12 - jne ..B4.25 -..B4.24: - lea 304(%rsp), %r15 - jmp ..B4.28 -..B4.25: - movq 16(%rbx), %rax - lea 304(%rsp), %rdi - movq %rax, -88(%rdi) - lea 208(%rsp), %rsi - movq 24(%rbx), %r8 - movl $1, %edx - movq %r8, 16(%rsi) - lea 184(%rsp), %rcx - movl $0, 24(%rcx) - movl 40(%rbx), %r15d - andl $7, %r15d - movl %r15d, 28(%rcx) -..___tag_value___j1q.270: - call __dpml_addsub__@PLT -..___tag_value___j1q.271: -..B4.26: - movq 32(%rbx), %rax - lea 184(%rsp), %rdi - movq %rax, 32(%rdi) - lea 208(%rsp), %rsi - movq 40(%rbx), %r8 - movl $1, %edx - movq %rdi, %rcx - addl $-128, %r15d - movq %r8, 16(%rsi) - movl %r15d, 4(%rsi) -..___tag_value___j1q.272: - call __dpml_addsub__@PLT -..___tag_value___j1q.273: -..B4.27: - lea 184(%rsp), %r15 -..B4.28: - movq %r12, %rdx - addq $48, %rbx - sarq $14, %rdx - andq $127, %rdx - testq $16777216, %r12 - je ..B4.30 -..B4.29: - movq %r12, %rcx - movl $1, %eax - shrq $7, %rcx - movq %r12, %r8 - andq $127, %r8 - movq %r15, %rdi - shlq %cl, %rax - movq %rdx, %rsi - decq %rax - movq %rbx, %rdx - movq %rax, %rcx - lea 256(%rsp), %r9 -..___tag_value___j1q.274: - call __dpml_evaluate_packed_poly__@PLT -..___tag_value___j1q.275: - jmp ..B4.31 -..B4.30: - movq %r15, %rdi - movq %rbx, %rsi - movq %r12, %rcx - lea 256(%rsp), %r8 -..___tag_value___j1q.276: - call __dpml_evaluate_rational__@PLT -..___tag_value___j1q.277: -..B4.31: - movq %r12, %rdx - sarq $11, %rdx - andq $3, %rdx - je ..B4.33 -..B4.32: - decq %rdx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 280(%rsp), %rsi -..___tag_value___j1q.278: - call __dpml_addsub__@PLT -..___tag_value___j1q.279: -..B4.33: - testq $4194304, %r12 - je ..B4.35 -..B4.34: - movq %r15, %rdi - lea 256(%rsp), %rsi - movq %rsi, %rdx -..___tag_value___j1q.280: - call __dpml_multiply__@PLT -..___tag_value___j1q.281: -..B4.35: - testq $8192, %r12 - je ..B4.37 -..B4.36: - movslq 256(%rsp), %rax - btcq $31, %rax - movl %eax, 256(%rsp) -..B4.37: - testq $2097152, %r12 - je ..B4.19 -..B4.38: - lea 304(%rsp), %rax - cmpq %rax, %r15 - jne ..B4.40 -..B4.39: - sarq $58, %r12 - subl %r12d, 308(%rsp) -..B4.40: - lea 19640+__bessel_x_table(%rip), %rdi - lea 304(%rsp), %rsi - movl $2, %edx - lea 208(%rsp), %rcx -..___tag_value___j1q.282: - call __dpml_divide__@PLT -..___tag_value___j1q.283: -..B4.41: - xorl %edx, %edx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 208(%rsp), %rsi -..___tag_value___j1q.284: - call __dpml_addsub__@PLT -..___tag_value___j1q.285: -..B4.42: - lea 19664+__bessel_x_table(%rip), %rsi - lea 304(%rsp), %rdi - lea 184(%rsp), %rdx -..___tag_value___j1q.286: - call __dpml_ux_log__@PLT -..___tag_value___j1q.287: -..B4.43: - movl $1, %esi - lea 304(%rsp), %rdi - xorl %edx, %edx - lea 208(%rsp), %rcx -..___tag_value___j1q.288: - call __dpml_ux_bessel__ -..___tag_value___j1q.289: -..B4.44: - lea 184(%rsp), %rsi - movq %rsi, %rdx - lea 208(%rsp), %rdi -..___tag_value___j1q.290: - call __dpml_multiply__@PLT -..___tag_value___j1q.291: -..B4.45: - movl $1, %edx - lea 256(%rsp), %rsi - movq %rsi, %rcx - lea 184(%rsp), %rdi -..___tag_value___j1q.292: - call __dpml_addsub__@PLT -..___tag_value___j1q.293: - jmp ..B4.19 -..B4.46: - cmpq (%rdi), %rax - ja ..B4.10 -..B4.47: - lea __bessel_x_table(%rip), %rbx - addq 8(%rdi), %rbx - jmp ..B4.7 -..B4.48: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __j1q,@function - .size __j1q,.-__j1q - .data -# -- End __j1q - .text -# -- Begin __jnq - .text - .align 16,0x90 - .globl __jnq -__jnq: -# parameter 1: %edi -# parameter 2: %xmm0 -..B5.1: - .cfi_startproc -..___tag_value___jnq.295: -..L296: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $368, %rsp - .cfi_def_cfa_offset 416 - movq $0x8000000000000000, %rbp - movaps %xmm0, 48(%rsp) - andq 56(%rsp), %rbp - movslq %edi, %r13 - shrq $32, %rbp - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 352(%rsp) - testq %r13, %r13 - movq $1, 8(%rsp) - movq $0, (%rsp) - jge ..B5.3 -..B5.2: - negq %r13 - xorl $-2147483648, %ebp -..B5.3: - xorl %r12d, %r12d - testq $1, %r13 - lea 48(%rsp), %rdi - cmove %r12d, %ebp - movl $2, %eax - cmpq $2, %r13 - lea __bessel_x_table(%rip), %r12 - cmovle %r13, %rax - xorl %esi, %esi - lea 304(%rsp), %rdx - andl $-2147483648, %ebp - lea 336(%rsp), %r8 - lea (%rsp), %r9 - lea (%r12,%rax,8), %rcx -..___tag_value___jnq.308: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___jnq.309: -..B5.4: - testq %rax, %rax - jge ..B5.6 -..B5.5: - movq $0x7fff000000000000, %rax - movslq %ebp, %rbp - movq %rax, %rdx - movq 344(%rsp), %rcx - andq %rcx, %rdx - shlq $32, %rbp - orq %rcx, %rbp - cmpq %rdx, %rax - cmovne %rbp, %rcx - movq %rcx, 344(%rsp) - jmp ..B5.26 -..B5.6: - movl $0, 304(%rsp) - cmpq $2, %r13 - jge ..B5.56 -..B5.7: - movl 308(%rsp), %ecx - lea (%r13,%r13,2), %r8 - movq 312(%rsp), %rax - cmpl $5, %ecx - jg ..B5.13 -..B5.8: - je ..B5.53 -..B5.9: - movq %r12, %rbx - addq 19552(%r12,%r8,8), %rbx - testl %ecx, %ecx - jl ..B5.29 -..B5.10: - negl %ecx - addl $5, %ecx - shrq %cl, %rax - jmp ..B5.11 -..B5.12: - movq 8(%rbx), %rcx - sarq $32, %rcx - andq $1023, %rcx - addq %rcx, %rbx -..B5.11: - cmpq (%rbx), %rax - jbe ..B5.29 - jmp ..B5.12 -..B5.13: - xorl %edi, %edi - lea 304(%rsp), %rsi - movl $2, %edx - lea 160(%rsp), %rcx -..___tag_value___jnq.310: - call __dpml_divide__@PLT -..___tag_value___jnq.311: -..B5.14: - testq %r13, %r13 - jne ..B5.16 -..B5.15: - movl $10, %r12d - lea 18168+__bessel_x_table(%rip), %rsi - lea 18504+__bessel_x_table(%rip), %rbx - jmp ..B5.17 -..B5.16: - movl $9, %r12d - lea 18872+__bessel_x_table(%rip), %rsi - lea 19208+__bessel_x_table(%rip), %rbx -..B5.17: - movl $9, %edx - lea 160(%rsp), %rdi - movq $0x1000000000000044, %rcx - lea 64(%rsp), %r8 -..___tag_value___jnq.312: - call __dpml_evaluate_rational__@PLT -..___tag_value___jnq.313: -..B5.18: - movq %rbx, %rsi - lea 160(%rsp), %rdi - movq %r12, %rdx - movl $70, %ecx - lea 88(%rsp), %r8 -..___tag_value___jnq.314: - call __dpml_evaluate_rational__@PLT -..___tag_value___jnq.315: -..B5.19: - movl $3, %edx - lea (%r13,%r13), %rsi - negq %rsi - lea 304(%rsp), %rdi - incq %rsi - lea 112(%rsp), %rcx -..___tag_value___jnq.316: - call __dpml_ux_sincos@PLT -..___tag_value___jnq.317: -..B5.20: - lea 64(%rsp), %rdi - movq %rdi, %rdx - lea 112(%rsp), %rsi -..___tag_value___jnq.318: - call __dpml_multiply__@PLT -..___tag_value___jnq.319: -..B5.21: - lea 88(%rsp), %rdi - movq %rdi, %rdx - lea 136(%rsp), %rsi -..___tag_value___jnq.320: - call __dpml_multiply__@PLT -..___tag_value___jnq.321: -..B5.22: - movl $1, %eax - xorl %edx, %edx - testq %r13, %r13 - lea 64(%rsp), %rdi - cmove %rax, %rdx - lea 88(%rsp), %rsi - movq %rdi, %rcx -..___tag_value___jnq.322: - call __dpml_addsub__@PLT -..___tag_value___jnq.323: -..B5.23: - movl $1, %esi - lea 160(%rsp), %rdi - lea 88(%rsp), %rdx -..___tag_value___jnq.324: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___jnq.325: -..B5.24: - lea 64(%rsp), %rdi - lea 88(%rsp), %rsi - lea 256(%rsp), %rdx -..___tag_value___jnq.326: - call __dpml_multiply__@PLT -..___tag_value___jnq.327: -..B5.25: - xorl %ecx, %ecx - movl $8, %eax - xorl %ebp, 256(%rsp) - cmovne %eax, %ecx - movl $1027, %ebx - lea __bessel_error_codes(%rip), %r8 - shrq %cl, %rbx - lea 256(%rsp), %rdi - movzbl %bl, %ebp - lea 336(%rsp), %rsi - movq (%r8), %rcx - movq (%r8,%rbp,8), %rdx - lea (%rsp), %r8 -..___tag_value___jnq.328: - call __dpml_pack__@PLT -..___tag_value___jnq.329: -..B5.26: - movq 352(%rsp), %rax - xorq %rsp, %rax - movaps 336(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B5.55 -..B5.27: - addq $368, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 416 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 15, -32 -..B5.29: - movq 8(%rbx), %r12 - testq $8388608, %r12 - jne ..B5.31 -..B5.30: - lea 304(%rsp), %r15 - jmp ..B5.34 -..B5.31: - movq 16(%rbx), %rax - lea 304(%rsp), %rdi - movq %rax, -88(%rdi) - lea 208(%rsp), %rsi - movq 24(%rbx), %r8 - movl $1, %edx - movq %r8, 16(%rsi) - lea 184(%rsp), %rcx - movl $0, 24(%rcx) - movl 40(%rbx), %r15d - andl $7, %r15d - movl %r15d, 28(%rcx) -..___tag_value___jnq.347: - call __dpml_addsub__@PLT -..___tag_value___jnq.348: -..B5.32: - movq 32(%rbx), %rax - lea 184(%rsp), %rdi - movq %rax, 32(%rdi) - lea 208(%rsp), %rsi - movq 40(%rbx), %r8 - movl $1, %edx - movq %rdi, %rcx - addl $-128, %r15d - movq %r8, 16(%rsi) - movl %r15d, 4(%rsi) -..___tag_value___jnq.349: - call __dpml_addsub__@PLT -..___tag_value___jnq.350: -..B5.33: - lea 184(%rsp), %r15 -..B5.34: - movq %r12, %rdx - addq $48, %rbx - sarq $14, %rdx - andq $127, %rdx - testq $16777216, %r12 - je ..B5.36 -..B5.35: - movq %r12, %rcx - movl $1, %eax - shrq $7, %rcx - movq %r12, %r8 - andq $127, %r8 - movq %r15, %rdi - shlq %cl, %rax - movq %rdx, %rsi - decq %rax - movq %rbx, %rdx - movq %rax, %rcx - lea 256(%rsp), %r9 -..___tag_value___jnq.351: - call __dpml_evaluate_packed_poly__@PLT -..___tag_value___jnq.352: - jmp ..B5.37 -..B5.36: - movq %r15, %rdi - movq %rbx, %rsi - movq %r12, %rcx - lea 256(%rsp), %r8 -..___tag_value___jnq.353: - call __dpml_evaluate_rational__@PLT -..___tag_value___jnq.354: -..B5.37: - movq %r12, %rdx - sarq $11, %rdx - andq $3, %rdx - je ..B5.39 -..B5.38: - decq %rdx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 280(%rsp), %rsi -..___tag_value___jnq.355: - call __dpml_addsub__@PLT -..___tag_value___jnq.356: -..B5.39: - testq $4194304, %r12 - je ..B5.41 -..B5.40: - movq %r15, %rdi - lea 256(%rsp), %rsi - movq %rsi, %rdx -..___tag_value___jnq.357: - call __dpml_multiply__@PLT -..___tag_value___jnq.358: -..B5.41: - testq $8192, %r12 - je ..B5.43 -..B5.42: - movslq 256(%rsp), %rax - btcq $31, %rax - movl %eax, 256(%rsp) -..B5.43: - testq $2097152, %r12 - je ..B5.25 -..B5.44: - lea 304(%rsp), %rax - cmpq %rax, %r15 - jne ..B5.46 -..B5.45: - sarq $58, %r12 - subl %r12d, 308(%rsp) -..B5.46: - cmpq $1, %r13 - je ..B5.51 -..B5.47: - lea 19664+__bessel_x_table(%rip), %rsi - lea 304(%rsp), %rdi - lea 184(%rsp), %rdx -..___tag_value___jnq.359: - call __dpml_ux_log__@PLT -..___tag_value___jnq.360: -..B5.48: - movq %r13, %rsi - lea 304(%rsp), %rdi - xorl %edx, %edx - lea 208(%rsp), %rcx -..___tag_value___jnq.361: - call __dpml_ux_bessel__ -..___tag_value___jnq.362: -..B5.49: - lea 184(%rsp), %rsi - movq %rsi, %rdx - lea 208(%rsp), %rdi -..___tag_value___jnq.363: - call __dpml_multiply__@PLT -..___tag_value___jnq.364: -..B5.50: - movl $1, %edx - lea 256(%rsp), %rsi - movq %rsi, %rcx - lea 184(%rsp), %rdi -..___tag_value___jnq.365: - call __dpml_addsub__@PLT -..___tag_value___jnq.366: - jmp ..B5.25 -..B5.51: - lea 19640+__bessel_x_table(%rip), %rdi - lea 304(%rsp), %rsi - movl $2, %edx - lea 208(%rsp), %rcx -..___tag_value___jnq.367: - call __dpml_divide__@PLT -..___tag_value___jnq.368: -..B5.52: - xorl %edx, %edx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 208(%rsp), %rsi -..___tag_value___jnq.369: - call __dpml_addsub__@PLT -..___tag_value___jnq.370: - jmp ..B5.47 -..B5.53: - cmpq 19544(%r12,%r8,8), %rax - ja ..B5.13 -..B5.54: - movq %r12, %rbx - addq 19552(%r12,%r8,8), %rbx - jmp ..B5.10 -..B5.55: - call __stack_chk_fail@PLT -..B5.56: - movq %r13, %rsi - lea 304(%rsp), %rdi - xorl %edx, %edx - lea 256(%rsp), %rcx -..___tag_value___jnq.371: - call __dpml_ux_large_order_bessel__ -..___tag_value___jnq.372: - jmp ..B5.25 - .align 16,0x90 - .cfi_endproc - .type __jnq,@function - .size __jnq,.-__jnq - .data -# -- End __jnq - .text -# -- Begin __y0q - .text - .align 16,0x90 - .globl __y0q -__y0q: -# parameter 1: %xmm0 -..B6.1: - .cfi_startproc -..___tag_value___y0q.374: -..L375: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - subq $368, %rsp - .cfi_def_cfa_offset 400 - xorl %esi, %esi - lea 40+__bessel_x_table(%rip), %rcx - lea 48(%rsp), %rdi - movq %fs:40, %rax - lea 304(%rsp), %rdx - xorq %rsp, %rax - lea 336(%rsp), %r8 - movaps %xmm0, (%rdi) - lea (%rsp), %r9 - movq %rax, 48(%rdx) - movq $1, -40(%rdi) - movq $0, (%r9) -..___tag_value___y0q.383: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___y0q.384: -..B6.2: - testq %rax, %rax - jl ..B6.20 -..B6.4: - movl 308(%rsp), %ecx - lea 19592+__bessel_x_table(%rip), %rdi - movq 312(%rsp), %rax - cmpl $5, %ecx - movl $0, 304(%rsp) - jg ..B6.10 -..B6.5: - je ..B6.44 -..B6.6: - lea __bessel_x_table(%rip), %rbx - addq 8(%rdi), %rbx - testl %ecx, %ecx - jl ..B6.23 -..B6.7: - negl %ecx - addl $5, %ecx - shrq %cl, %rax - jmp ..B6.8 -..B6.9: - movq 8(%rbx), %rcx - sarq $32, %rcx - andq $1023, %rcx - addq %rcx, %rbx -..B6.8: - cmpq (%rbx), %rax - jbe ..B6.23 - jmp ..B6.9 -..B6.10: - xorl %edi, %edi - lea 304(%rsp), %rsi - movl $2, %edx - lea 160(%rsp), %rcx -..___tag_value___y0q.385: - call __dpml_divide__@PLT -..___tag_value___y0q.386: -..B6.11: - lea 18168+__bessel_x_table(%rip), %rsi - lea 160(%rsp), %rdi - movl $9, %edx - movq $0x1000000000000044, %rcx - lea 64(%rsp), %r8 -..___tag_value___y0q.387: - call __dpml_evaluate_rational__@PLT -..___tag_value___y0q.388: -..B6.12: - lea 18504+__bessel_x_table(%rip), %rsi - lea 160(%rsp), %rdi - movl $10, %edx - movl $70, %ecx - lea 88(%rsp), %r8 -..___tag_value___y0q.389: - call __dpml_evaluate_rational__@PLT -..___tag_value___y0q.390: -..B6.13: - movq $-1, %rsi - lea 304(%rsp), %rdi - movl $3, %edx - lea 112(%rsp), %rcx -..___tag_value___y0q.391: - call __dpml_ux_sincos@PLT -..___tag_value___y0q.392: -..B6.14: - lea 64(%rsp), %rdi - movq %rdi, %rdx - lea 112(%rsp), %rsi -..___tag_value___y0q.393: - call __dpml_multiply__@PLT -..___tag_value___y0q.394: -..B6.15: - lea 88(%rsp), %rdi - movq %rdi, %rdx - lea 136(%rsp), %rsi -..___tag_value___y0q.395: - call __dpml_multiply__@PLT -..___tag_value___y0q.396: -..B6.16: - movl $1, %edx - lea 64(%rsp), %rdi - movq %rdi, %rcx - lea 88(%rsp), %rsi -..___tag_value___y0q.397: - call __dpml_addsub__@PLT -..___tag_value___y0q.398: -..B6.17: - movl $1, %esi - lea 160(%rsp), %rdi - lea 88(%rsp), %rdx -..___tag_value___y0q.399: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___y0q.400: -..B6.18: - lea 64(%rsp), %rdi - lea 88(%rsp), %rsi - lea 256(%rsp), %rdx -..___tag_value___y0q.401: - call __dpml_multiply__@PLT -..___tag_value___y0q.402: -..B6.19: - xorl %edx, %edx - lea 256(%rsp), %rdi - xorl %ecx, %ecx - lea 336(%rsp), %rsi - lea (%rsp), %r8 -..___tag_value___y0q.403: - call __dpml_pack__@PLT -..___tag_value___y0q.404: -..B6.20: - movq 352(%rsp), %rax - xorq %rsp, %rax - movaps 336(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B6.46 -..B6.21: - addq $368, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 400 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B6.23: - movq 8(%rbx), %r14 - testq $8388608, %r14 - jne ..B6.25 -..B6.24: - lea 304(%rsp), %r15 - jmp ..B6.28 -..B6.25: - movq 16(%rbx), %rax - lea 304(%rsp), %rdi - movq %rax, -88(%rdi) - lea 208(%rsp), %rsi - movq 24(%rbx), %r8 - movl $1, %edx - movq %r8, 16(%rsi) - lea 184(%rsp), %rcx - movl $0, 24(%rcx) - movl 40(%rbx), %r15d - andl $7, %r15d - movl %r15d, 28(%rcx) -..___tag_value___y0q.416: - call __dpml_addsub__@PLT -..___tag_value___y0q.417: -..B6.26: - movq 32(%rbx), %rax - lea 184(%rsp), %rdi - movq %rax, 32(%rdi) - lea 208(%rsp), %rsi - movq 40(%rbx), %r8 - movl $1, %edx - movq %rdi, %rcx - addl $-128, %r15d - movq %r8, 16(%rsi) - movl %r15d, 4(%rsi) -..___tag_value___y0q.418: - call __dpml_addsub__@PLT -..___tag_value___y0q.419: -..B6.27: - lea 184(%rsp), %r15 -..B6.28: - movq %r14, %rdx - addq $48, %rbx - sarq $14, %rdx - andq $127, %rdx - testq $16777216, %r14 - je ..B6.30 -..B6.29: - movq %r14, %rcx - movl $1, %eax - shrq $7, %rcx - movq %r14, %r8 - andq $127, %r8 - movq %r15, %rdi - shlq %cl, %rax - movq %rdx, %rsi - decq %rax - movq %rbx, %rdx - movq %rax, %rcx - lea 256(%rsp), %r9 -..___tag_value___y0q.420: - call __dpml_evaluate_packed_poly__@PLT -..___tag_value___y0q.421: - jmp ..B6.31 -..B6.30: - movq %r15, %rdi - movq %rbx, %rsi - movq %r14, %rcx - lea 256(%rsp), %r8 -..___tag_value___y0q.422: - call __dpml_evaluate_rational__@PLT -..___tag_value___y0q.423: -..B6.31: - movq %r14, %rdx - sarq $11, %rdx - andq $3, %rdx - je ..B6.33 -..B6.32: - decq %rdx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 280(%rsp), %rsi -..___tag_value___y0q.424: - call __dpml_addsub__@PLT -..___tag_value___y0q.425: -..B6.33: - testq $4194304, %r14 - je ..B6.35 -..B6.34: - movq %r15, %rdi - lea 256(%rsp), %rsi - movq %rsi, %rdx -..___tag_value___y0q.426: - call __dpml_multiply__@PLT -..___tag_value___y0q.427: -..B6.35: - testq $8192, %r14 - je ..B6.37 -..B6.36: - movslq 256(%rsp), %rax - btcq $31, %rax - movl %eax, 256(%rsp) -..B6.37: - testq $2097152, %r14 - je ..B6.19 -..B6.38: - lea 304(%rsp), %rax - cmpq %rax, %r15 - jne ..B6.40 -..B6.39: - sarq $58, %r14 - subl %r14d, 308(%rsp) -..B6.40: - lea 19664+__bessel_x_table(%rip), %rsi - lea 304(%rsp), %rdi - lea 184(%rsp), %rdx -..___tag_value___y0q.428: - call __dpml_ux_log__@PLT -..___tag_value___y0q.429: -..B6.41: - xorl %esi, %esi - lea 304(%rsp), %rdi - xorl %edx, %edx - lea 208(%rsp), %rcx -..___tag_value___y0q.430: - call __dpml_ux_bessel__ -..___tag_value___y0q.431: -..B6.42: - lea 184(%rsp), %rsi - movq %rsi, %rdx - lea 208(%rsp), %rdi -..___tag_value___y0q.432: - call __dpml_multiply__@PLT -..___tag_value___y0q.433: -..B6.43: - movl $1, %edx - lea 256(%rsp), %rsi - movq %rsi, %rcx - lea 184(%rsp), %rdi -..___tag_value___y0q.434: - call __dpml_addsub__@PLT -..___tag_value___y0q.435: - jmp ..B6.19 -..B6.44: - cmpq (%rdi), %rax - ja ..B6.10 -..B6.45: - lea __bessel_x_table(%rip), %rbx - addq 8(%rdi), %rbx - jmp ..B6.7 -..B6.46: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __y0q,@function - .size __y0q,.-__y0q - .data -# -- End __y0q - .text -# -- Begin __y1q - .text - .align 16,0x90 - .globl __y1q -__y1q: -# parameter 1: %xmm0 -..B7.1: - .cfi_startproc -..___tag_value___y1q.437: -..L438: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - pushq %rbp - .cfi_def_cfa_offset 40 - .cfi_offset 6, -40 - subq $360, %rsp - .cfi_def_cfa_offset 400 - xorl %esi, %esi - movaps %xmm0, 48(%rsp) - lea 48(%rsp), %rdi - movq 8(%rdi), %rbp - lea 304(%rsp), %rdx - shrq $32, %rbp - lea 48+__bessel_x_table(%rip), %rcx - movq %fs:40, %rax - lea 336(%rsp), %r8 - xorq %rsp, %rax - lea (%rsp), %r9 - movq %rax, 48(%rdx) - andl $-2147483648, %ebp - movq $1, -40(%rdi) - movq $0, (%r9) -..___tag_value___y1q.448: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___y1q.449: -..B7.2: - testq %rax, %rax - jge ..B7.4 -..B7.3: - movq $0x7fff000000000000, %rax - movslq %ebp, %rbp - movq %rax, %rdx - movq 344(%rsp), %rcx - andq %rcx, %rdx - shlq $32, %rbp - orq %rcx, %rbp - cmpq %rdx, %rax - cmovne %rbp, %rcx - movq %rcx, 344(%rsp) - jmp ..B7.20 -..B7.4: - movl 308(%rsp), %ecx - lea 19616+__bessel_x_table(%rip), %rdi - movq 312(%rsp), %rax - cmpl $5, %ecx - movl $0, 304(%rsp) - jg ..B7.10 -..B7.5: - je ..B7.46 -..B7.6: - lea __bessel_x_table(%rip), %rbx - addq 8(%rdi), %rbx - testl %ecx, %ecx - jl ..B7.23 -..B7.7: - negl %ecx - addl $5, %ecx - shrq %cl, %rax - jmp ..B7.8 -..B7.9: - movq 8(%rbx), %rcx - sarq $32, %rcx - andq $1023, %rcx - addq %rcx, %rbx -..B7.8: - cmpq (%rbx), %rax - jbe ..B7.23 - jmp ..B7.9 -..B7.10: - xorl %edi, %edi - lea 304(%rsp), %rsi - movl $2, %edx - lea 160(%rsp), %rcx -..___tag_value___y1q.450: - call __dpml_divide__@PLT -..___tag_value___y1q.451: -..B7.11: - lea 18872+__bessel_x_table(%rip), %rsi - lea 160(%rsp), %rdi - movl $9, %edx - movq $0x1000000000000044, %rcx - lea 64(%rsp), %r8 -..___tag_value___y1q.452: - call __dpml_evaluate_rational__@PLT -..___tag_value___y1q.453: -..B7.12: - lea 19208+__bessel_x_table(%rip), %rsi - lea 160(%rsp), %rdi - movl $9, %edx - movl $70, %ecx - lea 88(%rsp), %r8 -..___tag_value___y1q.454: - call __dpml_evaluate_rational__@PLT -..___tag_value___y1q.455: -..B7.13: - movq $-3, %rsi - lea 304(%rsp), %rdi - movl $3, %edx - lea 112(%rsp), %rcx -..___tag_value___y1q.456: - call __dpml_ux_sincos@PLT -..___tag_value___y1q.457: -..B7.14: - lea 64(%rsp), %rdi - movq %rdi, %rdx - lea 112(%rsp), %rsi -..___tag_value___y1q.458: - call __dpml_multiply__@PLT -..___tag_value___y1q.459: -..B7.15: - lea 88(%rsp), %rdi - movq %rdi, %rdx - lea 136(%rsp), %rsi -..___tag_value___y1q.460: - call __dpml_multiply__@PLT -..___tag_value___y1q.461: -..B7.16: - xorl %edx, %edx - lea 64(%rsp), %rdi - movq %rdi, %rcx - lea 88(%rsp), %rsi -..___tag_value___y1q.462: - call __dpml_addsub__@PLT -..___tag_value___y1q.463: -..B7.17: - movl $1, %esi - lea 160(%rsp), %rdi - lea 88(%rsp), %rdx -..___tag_value___y1q.464: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___y1q.465: -..B7.18: - lea 64(%rsp), %rdi - lea 88(%rsp), %rsi - lea 256(%rsp), %rdx -..___tag_value___y1q.466: - call __dpml_multiply__@PLT -..___tag_value___y1q.467: -..B7.19: - movl $24, %eax - movl $16, %ecx - xorl %ebp, 256(%rsp) - cmovne %eax, %ecx - movl $83886080, %ebx - lea __bessel_error_codes(%rip), %rbp - shrq %cl, %rbx - lea 256(%rsp), %rdi - movzbl %bl, %r8d - lea 336(%rsp), %rsi - movq (%rbp), %rdx - movq (%rbp,%r8,8), %rcx - lea (%rsp), %r8 -..___tag_value___y1q.468: - call __dpml_pack__@PLT -..___tag_value___y1q.469: -..B7.20: - movq 352(%rsp), %rax - xorq %rsp, %rax - movaps 336(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B7.48 -..B7.21: - addq $360, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 400 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 15, -24 -..B7.23: - movq 8(%rbx), %r12 - testq $8388608, %r12 - jne ..B7.25 -..B7.24: - lea 304(%rsp), %r15 - jmp ..B7.28 -..B7.25: - movq 16(%rbx), %rax - lea 304(%rsp), %rdi - movq %rax, -88(%rdi) - lea 208(%rsp), %rsi - movq 24(%rbx), %r8 - movl $1, %edx - movq %r8, 16(%rsi) - lea 184(%rsp), %rcx - movl $0, 24(%rcx) - movl 40(%rbx), %r15d - andl $7, %r15d - movl %r15d, 28(%rcx) -..___tag_value___y1q.484: - call __dpml_addsub__@PLT -..___tag_value___y1q.485: -..B7.26: - movq 32(%rbx), %rax - lea 184(%rsp), %rdi - movq %rax, 32(%rdi) - lea 208(%rsp), %rsi - movq 40(%rbx), %r8 - movl $1, %edx - movq %rdi, %rcx - addl $-128, %r15d - movq %r8, 16(%rsi) - movl %r15d, 4(%rsi) -..___tag_value___y1q.486: - call __dpml_addsub__@PLT -..___tag_value___y1q.487: -..B7.27: - lea 184(%rsp), %r15 -..B7.28: - movq %r12, %rdx - addq $48, %rbx - sarq $14, %rdx - andq $127, %rdx - testq $16777216, %r12 - je ..B7.30 -..B7.29: - movq %r12, %rcx - movl $1, %eax - shrq $7, %rcx - movq %r12, %r8 - andq $127, %r8 - movq %r15, %rdi - shlq %cl, %rax - movq %rdx, %rsi - decq %rax - movq %rbx, %rdx - movq %rax, %rcx - lea 256(%rsp), %r9 -..___tag_value___y1q.488: - call __dpml_evaluate_packed_poly__@PLT -..___tag_value___y1q.489: - jmp ..B7.31 -..B7.30: - movq %r15, %rdi - movq %rbx, %rsi - movq %r12, %rcx - lea 256(%rsp), %r8 -..___tag_value___y1q.490: - call __dpml_evaluate_rational__@PLT -..___tag_value___y1q.491: -..B7.31: - movq %r12, %rdx - sarq $11, %rdx - andq $3, %rdx - je ..B7.33 -..B7.32: - decq %rdx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 280(%rsp), %rsi -..___tag_value___y1q.492: - call __dpml_addsub__@PLT -..___tag_value___y1q.493: -..B7.33: - testq $4194304, %r12 - je ..B7.35 -..B7.34: - movq %r15, %rdi - lea 256(%rsp), %rsi - movq %rsi, %rdx -..___tag_value___y1q.494: - call __dpml_multiply__@PLT -..___tag_value___y1q.495: -..B7.35: - testq $8192, %r12 - je ..B7.37 -..B7.36: - movslq 256(%rsp), %rax - btcq $31, %rax - movl %eax, 256(%rsp) -..B7.37: - testq $2097152, %r12 - je ..B7.19 -..B7.38: - lea 304(%rsp), %rax - cmpq %rax, %r15 - jne ..B7.40 -..B7.39: - sarq $58, %r12 - subl %r12d, 308(%rsp) -..B7.40: - lea 19640+__bessel_x_table(%rip), %rdi - lea 304(%rsp), %rsi - movl $2, %edx - lea 208(%rsp), %rcx -..___tag_value___y1q.496: - call __dpml_divide__@PLT -..___tag_value___y1q.497: -..B7.41: - xorl %edx, %edx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 208(%rsp), %rsi -..___tag_value___y1q.498: - call __dpml_addsub__@PLT -..___tag_value___y1q.499: -..B7.42: - lea 19664+__bessel_x_table(%rip), %rsi - lea 304(%rsp), %rdi - lea 184(%rsp), %rdx -..___tag_value___y1q.500: - call __dpml_ux_log__@PLT -..___tag_value___y1q.501: -..B7.43: - movl $1, %esi - lea 304(%rsp), %rdi - xorl %edx, %edx - lea 208(%rsp), %rcx -..___tag_value___y1q.502: - call __dpml_ux_bessel__ -..___tag_value___y1q.503: -..B7.44: - lea 184(%rsp), %rsi - movq %rsi, %rdx - lea 208(%rsp), %rdi -..___tag_value___y1q.504: - call __dpml_multiply__@PLT -..___tag_value___y1q.505: -..B7.45: - movl $1, %edx - lea 256(%rsp), %rsi - movq %rsi, %rcx - lea 184(%rsp), %rdi -..___tag_value___y1q.506: - call __dpml_addsub__@PLT -..___tag_value___y1q.507: - jmp ..B7.19 -..B7.46: - cmpq (%rdi), %rax - ja ..B7.10 -..B7.47: - lea __bessel_x_table(%rip), %rbx - addq 8(%rdi), %rbx - jmp ..B7.7 -..B7.48: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __y1q,@function - .size __y1q,.-__y1q - .data -# -- End __y1q - .text -# -- Begin __ynq - .text - .align 16,0x90 - .globl __ynq -__ynq: -# parameter 1: %edi -# parameter 2: %xmm0 -..B8.1: - .cfi_startproc -..___tag_value___ynq.509: -..L510: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $368, %rsp - .cfi_def_cfa_offset 416 - movq $0x8000000000000000, %rdx - movaps %xmm0, 48(%rsp) - andq 56(%rsp), %rdx - movslq %edi, %r14 - shrq $32, %rdx - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 352(%rsp) - lea 40+__bessel_x_table(%rip), %rax - testq %r14, %r14 - movq $1, 8(%rsp) - movq $0, (%rsp) - jge ..B8.3 -..B8.2: - negq %r14 - xorl $-2147483648, %edx -..B8.3: - xorl %ebp, %ebp - testq $1, %r14 - lea 48(%rsp), %rdi - cmovne %edx, %ebp - movl $2, %ebx - cmpq $2, %r14 - lea 304(%rsp), %rdx - cmovle %r14, %rbx - xorl %esi, %esi - lea 336(%rsp), %r8 - andl $-2147483648, %ebp - lea (%rsp), %r9 - lea (%rax,%rbx,8), %rcx -..___tag_value___ynq.522: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___ynq.523: -..B8.4: - testq %rax, %rax - jge ..B8.6 -..B8.5: - movq $0x7fff000000000000, %rax - movslq %ebp, %rbp - movq %rax, %rdx - movq 344(%rsp), %rcx - andq %rcx, %rdx - shlq $32, %rbp - orq %rcx, %rbp - cmpq %rdx, %rax - cmovne %rbp, %rcx - movq %rcx, 344(%rsp) - jmp ..B8.26 -..B8.6: - movl $0, 304(%rsp) - cmpq $2, %r14 - jge ..B8.56 -..B8.7: - movl 308(%rsp), %ecx - lea (%r14,%r14,2), %r9 - movq 312(%rsp), %rax - lea __bessel_x_table(%rip), %r8 - cmpl $5, %ecx - jg ..B8.13 -..B8.8: - je ..B8.53 -..B8.9: - movq %r8, %rbx - addq 19600(%r8,%r9,8), %rbx - testl %ecx, %ecx - jl ..B8.29 -..B8.10: - negl %ecx - addl $5, %ecx - shrq %cl, %rax - jmp ..B8.11 -..B8.12: - movq 8(%rbx), %rcx - sarq $32, %rcx - andq $1023, %rcx - addq %rcx, %rbx -..B8.11: - cmpq (%rbx), %rax - jbe ..B8.29 - jmp ..B8.12 -..B8.13: - xorl %edi, %edi - lea 304(%rsp), %rsi - movl $2, %edx - lea 160(%rsp), %rcx -..___tag_value___ynq.524: - call __dpml_divide__@PLT -..___tag_value___ynq.525: -..B8.14: - testq %r14, %r14 - jne ..B8.16 -..B8.15: - movl $10, %r13d - lea 18168+__bessel_x_table(%rip), %rsi - lea 18504+__bessel_x_table(%rip), %rbx - jmp ..B8.17 -..B8.16: - movl $9, %r13d - lea 18872+__bessel_x_table(%rip), %rsi - lea 19208+__bessel_x_table(%rip), %rbx -..B8.17: - movl $9, %edx - lea 160(%rsp), %rdi - movq $0x1000000000000044, %rcx - lea 64(%rsp), %r8 -..___tag_value___ynq.526: - call __dpml_evaluate_rational__@PLT -..___tag_value___ynq.527: -..B8.18: - movq %rbx, %rsi - lea 160(%rsp), %rdi - movq %r13, %rdx - movl $70, %ecx - lea 88(%rsp), %r8 -..___tag_value___ynq.528: - call __dpml_evaluate_rational__@PLT -..___tag_value___ynq.529: -..B8.19: - movl $3, %edx - lea (%r14,%r14), %rsi - negq %rsi - lea 304(%rsp), %rdi - decq %rsi - lea 112(%rsp), %rcx -..___tag_value___ynq.530: - call __dpml_ux_sincos@PLT -..___tag_value___ynq.531: -..B8.20: - lea 64(%rsp), %rdi - movq %rdi, %rdx - lea 112(%rsp), %rsi -..___tag_value___ynq.532: - call __dpml_multiply__@PLT -..___tag_value___ynq.533: -..B8.21: - lea 88(%rsp), %rdi - movq %rdi, %rdx - lea 136(%rsp), %rsi -..___tag_value___ynq.534: - call __dpml_multiply__@PLT -..___tag_value___ynq.535: -..B8.22: - movl $1, %eax - xorl %edx, %edx - testq %r14, %r14 - lea 64(%rsp), %rdi - cmove %rax, %rdx - lea 88(%rsp), %rsi - movq %rdi, %rcx -..___tag_value___ynq.536: - call __dpml_addsub__@PLT -..___tag_value___ynq.537: -..B8.23: - movl $1, %esi - lea 160(%rsp), %rdi - lea 88(%rsp), %rdx -..___tag_value___ynq.538: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___ynq.539: -..B8.24: - lea 64(%rsp), %rdi - lea 88(%rsp), %rsi - lea 256(%rsp), %rdx -..___tag_value___ynq.540: - call __dpml_multiply__@PLT -..___tag_value___ynq.541: -..B8.25: - movl $24, %eax - movl $16, %ecx - xorl %ebp, 256(%rsp) - cmovne %eax, %ecx - movl $117833728, %ebx - lea __bessel_error_codes(%rip), %rbp - shrq %cl, %rbx - lea 256(%rsp), %rdi - movzbl %bl, %r8d - lea 336(%rsp), %rsi - movq (%rbp), %rdx - movq (%rbp,%r8,8), %rcx - lea (%rsp), %r8 -..___tag_value___ynq.542: - call __dpml_pack__@PLT -..___tag_value___ynq.543: -..B8.26: - movq 352(%rsp), %rax - xorq %rsp, %rax - movaps 336(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B8.55 -..B8.27: - addq $368, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 416 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B8.29: - movq 8(%rbx), %r13 - testq $8388608, %r13 - jne ..B8.31 -..B8.30: - lea 304(%rsp), %r15 - jmp ..B8.34 -..B8.31: - movq 16(%rbx), %rax - lea 304(%rsp), %rdi - movq %rax, -88(%rdi) - lea 208(%rsp), %rsi - movq 24(%rbx), %r8 - movl $1, %edx - movq %r8, 16(%rsi) - lea 184(%rsp), %rcx - movl $0, 24(%rcx) - movl 40(%rbx), %r15d - andl $7, %r15d - movl %r15d, 28(%rcx) -..___tag_value___ynq.561: - call __dpml_addsub__@PLT -..___tag_value___ynq.562: -..B8.32: - movq 32(%rbx), %rax - lea 184(%rsp), %rdi - movq %rax, 32(%rdi) - lea 208(%rsp), %rsi - movq 40(%rbx), %r8 - movl $1, %edx - movq %rdi, %rcx - addl $-128, %r15d - movq %r8, 16(%rsi) - movl %r15d, 4(%rsi) -..___tag_value___ynq.563: - call __dpml_addsub__@PLT -..___tag_value___ynq.564: -..B8.33: - lea 184(%rsp), %r15 -..B8.34: - movq %r13, %rdx - addq $48, %rbx - sarq $14, %rdx - andq $127, %rdx - testq $16777216, %r13 - je ..B8.36 -..B8.35: - movq %r13, %rcx - movl $1, %eax - shrq $7, %rcx - movq %r13, %r8 - andq $127, %r8 - movq %r15, %rdi - shlq %cl, %rax - movq %rdx, %rsi - decq %rax - movq %rbx, %rdx - movq %rax, %rcx - lea 256(%rsp), %r9 -..___tag_value___ynq.565: - call __dpml_evaluate_packed_poly__@PLT -..___tag_value___ynq.566: - jmp ..B8.37 -..B8.36: - movq %r15, %rdi - movq %rbx, %rsi - movq %r13, %rcx - lea 256(%rsp), %r8 -..___tag_value___ynq.567: - call __dpml_evaluate_rational__@PLT -..___tag_value___ynq.568: -..B8.37: - movq %r13, %rdx - sarq $11, %rdx - andq $3, %rdx - je ..B8.39 -..B8.38: - decq %rdx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 280(%rsp), %rsi -..___tag_value___ynq.569: - call __dpml_addsub__@PLT -..___tag_value___ynq.570: -..B8.39: - testq $4194304, %r13 - je ..B8.41 -..B8.40: - movq %r15, %rdi - lea 256(%rsp), %rsi - movq %rsi, %rdx -..___tag_value___ynq.571: - call __dpml_multiply__@PLT -..___tag_value___ynq.572: -..B8.41: - testq $8192, %r13 - je ..B8.43 -..B8.42: - movslq 256(%rsp), %rax - btcq $31, %rax - movl %eax, 256(%rsp) -..B8.43: - testq $2097152, %r13 - je ..B8.25 -..B8.44: - lea 304(%rsp), %rax - cmpq %rax, %r15 - jne ..B8.46 -..B8.45: - sarq $58, %r13 - subl %r13d, 308(%rsp) -..B8.46: - cmpq $1, %r14 - je ..B8.51 -..B8.47: - lea 19664+__bessel_x_table(%rip), %rsi - lea 304(%rsp), %rdi - lea 184(%rsp), %rdx -..___tag_value___ynq.573: - call __dpml_ux_log__@PLT -..___tag_value___ynq.574: -..B8.48: - movq %r14, %rsi - lea 304(%rsp), %rdi - xorl %edx, %edx - lea 208(%rsp), %rcx -..___tag_value___ynq.575: - call __dpml_ux_bessel__ -..___tag_value___ynq.576: -..B8.49: - lea 184(%rsp), %rsi - movq %rsi, %rdx - lea 208(%rsp), %rdi -..___tag_value___ynq.577: - call __dpml_multiply__@PLT -..___tag_value___ynq.578: -..B8.50: - movl $1, %edx - lea 256(%rsp), %rsi - movq %rsi, %rcx - lea 184(%rsp), %rdi -..___tag_value___ynq.579: - call __dpml_addsub__@PLT -..___tag_value___ynq.580: - jmp ..B8.25 -..B8.51: - lea 19640+__bessel_x_table(%rip), %rdi - lea 304(%rsp), %rsi - movl $2, %edx - lea 208(%rsp), %rcx -..___tag_value___ynq.581: - call __dpml_divide__@PLT -..___tag_value___ynq.582: -..B8.52: - xorl %edx, %edx - lea 256(%rsp), %rdi - movq %rdi, %rcx - lea 208(%rsp), %rsi -..___tag_value___ynq.583: - call __dpml_addsub__@PLT -..___tag_value___ynq.584: - jmp ..B8.47 -..B8.53: - cmpq 19592(%r8,%r9,8), %rax - ja ..B8.13 -..B8.54: - movq %r8, %rbx - addq 19600(%r8,%r9,8), %rbx - jmp ..B8.10 -..B8.55: - call __stack_chk_fail@PLT -..B8.56: - movq %r14, %rsi - lea 304(%rsp), %rdi - movl $2, %edx - lea 256(%rsp), %rcx -..___tag_value___ynq.585: - call __dpml_ux_large_order_bessel__ -..___tag_value___ynq.586: - jmp ..B8.25 - .align 16,0x90 - .cfi_endproc - .type __ynq,@function - .size __ynq,.-__ynq - .data -# -- End __ynq - .section .rodata, "a" - .align 16 - .align 16 -__bessel_x_table: - .long 4527112 - .long 882002208 - .long 4527112 - .long 609222656 - .long 4527112 - .long 340787200 - .long 0 - .long 0 - .long 2 - .long 0 - .long 2162758664 - .long 1056696334 - .long 15799304 - .long 796782607 - .long 2163807240 - .long 536868879 - .long 0 - .long 0 - .long 136 - .long 0 - .long 137 - .long 0 - .long 138 - .long 0 - .long 139 - .long 0 - .long 141 - .long 0 - .long 142 - .long 0 - .long 2943289511 - .long 514282869 - .long 12841452 - .long 4160750144 - .long 3101294049 - .long 2582161780 - .long 1312087176 - .long 1489306811 - .long 19644348 - .long 45583118 - .long 2057404378 - .long 3169098683 - .long 3035415578 - .long 893843444 - .long 337 - .long 0 - .long 1783633315 - .long 1777532950 - .long 15440 - .long 0 - .long 1098024042 - .long 3019602458 - .long 814258 - .long 0 - .long 225592541 - .long 3983311110 - .long 37212291 - .long 0 - .long 2852953733 - .long 2839658485 - .long 1458597808 - .long 0 - .long 4135355606 - .long 2153351721 - .long 1172250754 - .long 11 - .long 1418543880 - .long 1134849789 - .long 691229967 - .long 312 - .long 221999422 - .long 2942275987 - .long 892175906 - .long 7082 - .long 183528404 - .long 1091137495 - .long 33669418 - .long 128779 - .long 2062842702 - .long 3593466159 - .long 2350547321 - .long 1825862 - .long 3242024385 - .long 1732973365 - .long 1193716022 - .long 19485117 - .long 1037993584 - .long 3230003709 - .long 1091314384 - .long 149320065 - .long 865418991 - .long 2685299556 - .long 265703573 - .long 769292094 - .long 699915261 - .long 300027119 - .long 1754654657 - .long 2412548808 - .long 1339780591 - .long 830077839 - .long 3026944889 - .long 3889644321 - .long 4103150545 - .long 428322165 - .long 2828272473 - .long 2229721522 - .long 2 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 367384380 - .long 4326353 - .long 2148 - .long 0 - .long 3463681883 - .long 689773508 - .long 115915 - .long 0 - .long 1865635225 - .long 1707083401 - .long 5659280 - .long 0 - .long 57566505 - .long 2904667094 - .long 238211523 - .long 0 - .long 2506436672 - .long 4038967033 - .long 4242689712 - .long 1 - .long 900230770 - .long 2061385255 - .long 3485051853 - .long 59 - .long 3028033191 - .long 3312441247 - .long 2225862006 - .long 1485 - .long 2615755381 - .long 2826778077 - .long 1673380806 - .long 29835 - .long 355106258 - .long 2404984212 - .long 1016211595 - .long 472327 - .long 1503440334 - .long 2187913929 - .long 749248049 - .long 5704462 - .long 3147631426 - .long 2675016444 - .long 3447985920 - .long 50328354 - .long 3866449770 - .long 2131485908 - .long 579515915 - .long 305317757 - .long 1140039843 - .long 2720631446 - .long 456203296 - .long 1162742504 - .long 3233022265 - .long 2052397230 - .long 3523447208 - .long 2379802096 - .long 4168515076 - .long 4109278998 - .long 173166154 - .long 1854372776 - .long 2 - .long 0 - .long 1759813577 - .long 941616103 - .long 12816876 - .long 4227858976 - .long 1634871482 - .long 2963569369 - .long 683137648 - .long 2191944453 - .long 1580116130 - .long 3956925442 - .long 2076563715 - .long 714524096 - .long 1425042529 - .long 556010 - .long 0 - .long 0 - .long 2705967279 - .long 111702325 - .long 0 - .long 0 - .long 3713308765 - .long 3252247564 - .long 4 - .long 0 - .long 2100681787 - .long 1255672466 - .long 747 - .long 0 - .long 3619987580 - .long 2926178414 - .long 99420 - .long 0 - .long 2512861058 - .long 4217543322 - .long 11034432 - .long 0 - .long 2336326559 - .long 4282922616 - .long 1003296232 - .long 0 - .long 961767164 - .long 880412311 - .long 74952366 - .long 17 - .long 651638352 - .long 3978983768 - .long 3866178891 - .long 965 - .long 1596163871 - .long 1924711161 - .long 2529806704 - .long 41195 - .long 4143448985 - .long 965000726 - .long 2579935101 - .long 1257069 - .long 3252814079 - .long 2428688082 - .long 440599394 - .long 25575240 - .long 2037391762 - .long 3718324471 - .long 2593618161 - .long 310260222 - .long 3513168611 - .long 3970741434 - .long 128123702 - .long 1820672813 - .long 3402733470 - .long 3892867495 - .long 1270945360 - .long 2922852432 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1986947947 - .long 53265381 - .long 0 - .long 0 - .long 3270284272 - .long 1932314788 - .long 2 - .long 0 - .long 4084347788 - .long 3083682757 - .long 409 - .long 0 - .long 2552809164 - .long 4060325593 - .long 58254 - .long 0 - .long 3829133869 - .long 1310009699 - .long 6940915 - .long 0 - .long 3083277873 - .long 3078742755 - .long 680947971 - .long 0 - .long 3385783917 - .long 3611832980 - .long 2295622592 - .long 12 - .long 3171596108 - .long 2891115348 - .long 838843771 - .long 777 - .long 3771422218 - .long 1148182025 - .long 434950258 - .long 36482 - .long 393135174 - .long 80483983 - .long 3817092537 - .long 1235511 - .long 594123027 - .long 65162621 - .long 1218473398 - .long 28145623 - .long 3536617861 - .long 375824456 - .long 425129817 - .long 385237492 - .long 633237591 - .long 649365651 - .long 313906709 - .long 2545942344 - .long 873029334 - .long 423671385 - .long 1111949612 - .long 4235958077 - .long 4294967293 - .long 0 - .long 4159743234 - .long 1365459778 - .long 12825068 - .long 4227858976 - .long 1727418030 - .long 2322967398 - .long 1034782148 - .long 1761143608 - .long 748103118 - .long 681764742 - .long 1945985884 - .long 1037518188 - .long 2731139269 - .long 559058 - .long 0 - .long 0 - .long 3638286185 - .long 115784543 - .long 0 - .long 0 - .long 484918398 - .long 4013875548 - .long 4 - .long 0 - .long 868380236 - .long 106340102 - .long 775 - .long 0 - .long 3771022282 - .long 1666157217 - .long 103048 - .long 0 - .long 470645992 - .long 2100027425 - .long 11422638 - .long 0 - .long 1279250702 - .long 1788924811 - .long 1036227271 - .long 0 - .long 3067063928 - .long 3886781995 - .long 2181909072 - .long 17 - .long 103786080 - .long 119465851 - .long 1602069376 - .long 987 - .long 314091048 - .long 4120514941 - .long 1703984391 - .long 41665 - .long 3153492716 - .long 1769936992 - .long 3277791366 - .long 1248908 - .long 2480865882 - .long 357555572 - .long 1426486202 - .long 24641724 - .long 925215435 - .long 3875415602 - .long 2242310174 - .long 283170307 - .long 1206749920 - .long 1745236754 - .long 421850802 - .long 1512988987 - .long 554528472 - .long 4124376878 - .long 999726568 - .long 2331757501 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 844883384 - .long 48877615 - .long 0 - .long 0 - .long 613626429 - .long 1016694622 - .long 2 - .long 0 - .long 733791182 - .long 4037492605 - .long 370 - .long 0 - .long 2511602797 - .long 962949943 - .long 52209 - .long 0 - .long 2469661725 - .long 4226370589 - .long 6143972 - .long 0 - .long 2060721069 - .long 3581658067 - .long 593539814 - .long 0 - .long 2839602819 - .long 4222464368 - .long 3064291281 - .long 10 - .long 592311022 - .long 275206449 - .long 2221002398 - .long 647 - .long 3453980290 - .long 1100410175 - .long 2256369516 - .long 29367 - .long 965726650 - .long 341239821 - .long 1020304938 - .long 947922 - .long 2152956293 - .long 1358966229 - .long 796742083 - .long 20128900 - .long 2203770174 - .long 4010517667 - .long 1001215390 - .long 247246889 - .long 118635824 - .long 336180557 - .long 907042493 - .long 1379503488 - .long 1731363265 - .long 2376282645 - .long 3253758107 - .long 2155609720 - .long 4294967293 - .long 0 - .long 1133938837 - .long 1788275660 - .long 12816876 - .long 4227858976 - .long 328577348 - .long 3165265924 - .long 1527252342 - .long 1339392541 - .long 2394531985 - .long 243403399 - .long 1651082908 - .long 3768234999 - .long 1764410062 - .long 1127868 - .long 0 - .long 0 - .long 380965293 - .long 236501030 - .long 0 - .long 0 - .long 4057780011 - .long 296466121 - .long 10 - .long 0 - .long 1915520970 - .long 2413700929 - .long 1578 - .long 0 - .long 2515416277 - .long 1400529095 - .long 209346 - .long 0 - .long 1507502659 - .long 119133009 - .long 23121417 - .long 0 - .long 822245729 - .long 2123535665 - .long 2086838594 - .long 0 - .long 2761614169 - .long 2187408238 - .long 28089432 - .long 35 - .long 552668793 - .long 2572470762 - .long 825632309 - .long 1954 - .long 1089676525 - .long 4007660420 - .long 2284740089 - .long 81273 - .long 3790860620 - .long 4250011568 - .long 3911718864 - .long 2386138 - .long 1569325755 - .long 1413720016 - .long 751491568 - .long 45731817 - .long 955105128 - .long 1250521740 - .long 2097840313 - .long 506337017 - .long 1624392615 - .long 4258574603 - .long 3379569620 - .long 2624122564 - .long 4107144163 - .long 2368467334 - .long 1634973330 - .long 3993629493 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 818934838 - .long 89458952 - .long 0 - .long 0 - .long 1917175450 - .long 275918876 - .long 4 - .long 0 - .long 745599157 - .long 3172395316 - .long 667 - .long 0 - .long 2952822384 - .long 492051402 - .long 92937 - .long 0 - .long 2206545778 - .long 108664272 - .long 10789849 - .long 0 - .long 3593487476 - .long 2223761325 - .long 1025213015 - .long 0 - .long 4186460497 - .long 2115107000 - .long 546575231 - .long 18 - .long 4222869425 - .long 1697786641 - .long 1644425336 - .long 1067 - .long 2279245768 - .long 3297743944 - .long 144043411 - .long 46814 - .long 528690514 - .long 2305832912 - .long 3885610801 - .long 1446642 - .long 3948180674 - .long 1400240622 - .long 2848238597 - .long 29038477 - .long 365799999 - .long 3493109055 - .long 720503959 - .long 333431672 - .long 4157886487 - .long 4286999543 - .long 464978815 - .long 1767352013 - .long 3339500879 - .long 5789261 - .long 740497786 - .long 2709489262 - .long 4294967292 - .long 0 - .long 675685466 - .long 2210650544 - .long 12825068 - .long 4227858976 - .long 2475592912 - .long 4007987703 - .long 795233231 - .long 3544111414 - .long 3119445785 - .long 4019086602 - .long 1815298636 - .long 3651400695 - .long 250417896 - .long 1132895 - .long 0 - .long 0 - .long 1599660003 - .long 238893558 - .long 0 - .long 0 - .long 4178878964 - .long 640014589 - .long 10 - .long 0 - .long 3652653430 - .long 1664916825 - .long 1586 - .long 0 - .long 506609104 - .long 279824532 - .long 209578 - .long 0 - .long 3394823516 - .long 2710891899 - .long 23032181 - .long 0 - .long 1068742364 - .long 3396859346 - .long 2065409978 - .long 0 - .long 1532264156 - .long 1783373111 - .long 1537162281 - .long 34 - .long 3404313527 - .long 645034109 - .long 1238696626 - .long 1897 - .long 2815751506 - .long 1216048877 - .long 2381163022 - .long 77819 - .long 681356606 - .long 1742374831 - .long 1470157118 - .long 2245756 - .long 3583839604 - .long 3430133311 - .long 3428750273 - .long 42198880 - .long 2624104293 - .long 3836925937 - .long 2616934709 - .long 458497922 - .long 4091889117 - .long 2154475757 - .long 1334377092 - .long 2344404304 - .long 3811467832 - .long 4225344580 - .long 3014131639 - .long 3548440700 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2101683395 - .long 163038220 - .long 0 - .long 0 - .long 1150331703 - .long 1497034637 - .long 7 - .long 0 - .long 1295008257 - .long 2962522183 - .long 1195 - .long 0 - .long 193789761 - .long 1257830278 - .long 164530 - .long 0 - .long 3810960890 - .long 1878269909 - .long 18845080 - .long 0 - .long 2863024615 - .long 258783337 - .long 1761897164 - .long 0 - .long 2435461135 - .long 4254653612 - .long 2378780257 - .long 30 - .long 3635296493 - .long 4161741958 - .long 2074908190 - .long 1757 - .long 3250897880 - .long 2210089015 - .long 2132559608 - .long 74948 - .long 2166588251 - .long 3427170173 - .long 756319997 - .long 2241223 - .long 107629526 - .long 2814783011 - .long 580266263 - .long 43402774 - .long 2488417593 - .long 4037868436 - .long 2684236844 - .long 482393505 - .long 1636043988 - .long 2549915956 - .long 1055410979 - .long 2500896928 - .long 2063349270 - .long 3231350804 - .long 4156853657 - .long 3802515847 - .long 4294967291 - .long 0 - .long 191176124 - .long 2632795962 - .long 12816876 - .long 4227858976 - .long 1355787731 - .long 2425457148 - .long 539364904 - .long 1079897623 - .long 897043330 - .long 2066037045 - .long 1494461853 - .long 2159441332 - .long 2366379069 - .long 1131867 - .long 0 - .long 0 - .long 161545432 - .long 239220328 - .long 0 - .long 0 - .long 762722372 - .long 576200370 - .long 10 - .long 0 - .long 3468035492 - .long 1642011913 - .long 1578 - .long 0 - .long 4253764606 - .long 2733292311 - .long 207600 - .long 0 - .long 2811470101 - .long 3269311219 - .long 22691285 - .long 0 - .long 1825255966 - .long 1189284970 - .long 2021353589 - .long 0 - .long 717526141 - .long 2244953537 - .long 1522450794 - .long 33 - .long 693565287 - .long 2333767130 - .long 715945548 - .long 1824 - .long 2985180089 - .long 935432992 - .long 3298648348 - .long 73985 - .long 1392357808 - .long 2627674694 - .long 3107871798 - .long 2108973 - .long 3903806984 - .long 3473675411 - .long 4215247699 - .long 39146099 - .long 2236383345 - .long 2775867013 - .long 1051360344 - .long 420899965 - .long 715332657 - .long 3204539120 - .long 3177676604 - .long 2136936117 - .long 1567224951 - .long 2092241552 - .long 1304170706 - .long 3225156278 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3855812151 - .long 148081926 - .long 0 - .long 0 - .long 1028065361 - .long 2668697612 - .long 6 - .long 0 - .long 728439685 - .long 892227407 - .long 1067 - .long 0 - .long 615906957 - .long 1950415562 - .long 145255 - .long 0 - .long 3284206690 - .long 4202823521 - .long 16428718 - .long 0 - .long 1576659798 - .long 3860187404 - .long 1513740564 - .long 0 - .long 1223428711 - .long 1000755308 - .long 3492805977 - .long 25 - .long 1363712775 - .long 563079876 - .long 2891886022 - .long 1456 - .long 1912616499 - .long 4019273916 - .long 1170042322 - .long 60815 - .long 2578791056 - .long 3763338518 - .long 4013988507 - .long 1778302 - .long 596369036 - .long 4167829437 - .long 495223280 - .long 33706721 - .long 3069656582 - .long 1025646758 - .long 2029385299 - .long 368055588 - .long 4229256156 - .long 252497843 - .long 655863054 - .long 1886199584 - .long 3468886839 - .long 4222796798 - .long 2935312587 - .long 2855531945 - .long 4294967291 - .long 0 - .long 2797952740 - .long 3054806814 - .long 12825068 - .long 4227858976 - .long 2679935261 - .long 2846977675 - .long 1518593598 - .long 771365947 - .long 2901840529 - .long 102047653 - .long 404923885 - .long 709259131 - .long 475240934 - .long 1125214 - .long 0 - .long 0 - .long 1836195777 - .long 237921320 - .long 0 - .long 0 - .long 620715017 - .long 203920416 - .long 10 - .long 0 - .long 2730396855 - .long 4074598327 - .long 1558 - .long 0 - .long 149951721 - .long 1542475780 - .long 204126 - .long 0 - .long 895086698 - .long 26046181 - .long 22194201 - .long 0 - .long 1052098554 - .long 3499556639 - .long 1964976743 - .long 0 - .long 3912081837 - .long 3256319751 - .long 845978380 - .long 32 - .long 2103533506 - .long 1288917748 - .long 344362072 - .long 1747 - .long 586607141 - .long 2789855780 - .long 789521480 - .long 70264 - .long 1029756229 - .long 2597195099 - .long 1036923741 - .long 1985929 - .long 570319344 - .long 1441637551 - .long 3714173380 - .long 36574571 - .long 1955754200 - .long 3807195269 - .long 90410504 - .long 390763661 - .long 2874958444 - .long 3633243115 - .long 2931863300 - .long 1975635819 - .long 32243731 - .long 2591757144 - .long 3895319176 - .long 2976685396 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3502958424 - .long 134252990 - .long 0 - .long 0 - .long 2150545646 - .long 4111632521 - .long 5 - .long 0 - .long 2999463670 - .long 3120574364 - .long 951 - .long 0 - .long 681502082 - .long 4195687681 - .long 128253 - .long 0 - .long 442998991 - .long 979480158 - .long 14344565 - .long 0 - .long 151969242 - .long 4070078334 - .long 1305331397 - .long 0 - .long 1826390155 - .long 1249420678 - .long 4104872299 - .long 21 - .long 1355768955 - .long 3758834208 - .long 3412700795 - .long 1220 - .long 1644384830 - .long 2135273975 - .long 2887874099 - .long 50190 - .long 1150050798 - .long 2243957583 - .long 2798432622 - .long 1445747 - .long 3460890697 - .long 2393108922 - .long 2317365582 - .long 27037249 - .long 135336093 - .long 93459488 - .long 4047224670 - .long 292116325 - .long 2632066877 - .long 2478679361 - .long 3592211274 - .long 1486901023 - .long 4259160346 - .long 2383522946 - .long 1229950112 - .long 2245322564 - .long 4294967291 - .long 0 - .long 4131724546 - .long 247119503 - .long 229390 - .long 4227858728 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1920268374 - .long 676671 - .long 0 - .long 0 - .long 2648589321 - .long 145893005 - .long 0 - .long 0 - .long 86363579 - .long 792199897 - .long 6 - .long 0 - .long 3569661012 - .long 3338031321 - .long 964 - .long 0 - .long 3537357668 - .long 2546852361 - .long 127350 - .long 0 - .long 1674639321 - .long 989707703 - .long 14008565 - .long 0 - .long 633069455 - .long 3178427980 - .long 1260770870 - .long 0 - .long 2929308222 - .long 1214878390 - .long 581189477 - .long 21 - .long 3037977477 - .long 3608983388 - .long 2481839655 - .long 1183 - .long 1571270935 - .long 1253493999 - .long 1158050441 - .long 49710 - .long 2588063047 - .long 3245086386 - .long 381774870 - .long 1491308 - .long 2638540175 - .long 477218587 - .long 3340530119 - .long 29826161 - .long 1326835123 - .long 1431655765 - .long 1431655765 - .long 357913941 - .long 4293747565 - .long 4294967295 - .long 4294967295 - .long 2147483647 - .long 4294964933 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 0 - .long 0 - .long 105434711 - .long 715574136 - .long 12825068 - .long 4227858976 - .long 2071479615 - .long 4114262957 - .long 3040350773 - .long 3578447305 - .long 1647168078 - .long 978698920 - .long 1144287138 - .long 3827795094 - .long 3787403973 - .long 562609 - .long 0 - .long 0 - .long 1649578671 - .long 117913179 - .long 0 - .long 0 - .long 3082368152 - .long 40122077 - .long 5 - .long 0 - .long 602895375 - .long 3952322020 - .long 783 - .long 0 - .long 3838465116 - .long 2181233212 - .long 103846 - .long 0 - .long 851468155 - .long 4001763569 - .long 11469451 - .long 0 - .long 3659498813 - .long 523695164 - .long 1037041443 - .long 0 - .long 2978199351 - .long 773277203 - .long 2051066178 - .long 17 - .long 4092624060 - .long 3930860161 - .long 3294762475 - .long 984 - .long 1105652893 - .long 1066438988 - .long 3642064414 - .long 41652 - .long 2196971596 - .long 2146191353 - .long 3442355222 - .long 1259557 - .long 3918894073 - .long 188553237 - .long 818155667 - .long 25403502 - .long 852571760 - .long 3121326526 - .long 2509267963 - .long 306918409 - .long 2896427178 - .long 2552665716 - .long 2229539464 - .long 1835168886 - .long 1453277625 - .long 518768794 - .long 1711011538 - .long 3459676865 - .long 0 - .long 0 - .long 2062472710 - .long 69166 - .long 0 - .long 0 - .long 673615662 - .long 23833985 - .long 0 - .long 0 - .long 630248642 - .long 363685088 - .long 1 - .long 0 - .long 288759411 - .long 2697305718 - .long 181 - .long 0 - .long 2130785052 - .long 823708847 - .long 25870 - .long 0 - .long 1430316470 - .long 3023974030 - .long 3089586 - .long 0 - .long 3827036731 - .long 3302510044 - .long 304068797 - .long 0 - .long 3738696708 - .long 3274114857 - .long 2670490624 - .long 5 - .long 287265850 - .long 4109473262 - .long 3360573366 - .long 350 - .long 38249035 - .long 2812769293 - .long 2052670485 - .long 16622 - .long 3926290357 - .long 206759826 - .long 2443135158 - .long 571444 - .long 1809246839 - .long 3759763742 - .long 1694050886 - .long 13356266 - .long 1847069514 - .long 3357213528 - .long 2594247192 - .long 192045418 - .long 1427481913 - .long 3504276391 - .long 3430325004 - .long 1423790384 - .long 900295939 - .long 3843660490 - .long 2372410664 - .long 3611630842 - .long 4294967294 - .long 0 - .long 774013863 - .long 1145724988 - .long 12816876 - .long 4227858976 - .long 2744287014 - .long 3766464413 - .long 1053213460 - .long 3969062622 - .long 1083456455 - .long 3049621789 - .long 3365086587 - .long 561540346 - .long 2996396832 - .long 575091 - .long 0 - .long 0 - .long 42660608 - .long 117761546 - .long 0 - .long 0 - .long 3056183536 - .long 25400137 - .long 5 - .long 0 - .long 3539354956 - .long 964064098 - .long 784 - .long 0 - .long 1133846550 - .long 3354628177 - .long 103987 - .long 0 - .long 837408368 - .long 1875825334 - .long 11493772 - .long 0 - .long 4020356818 - .long 15105701 - .long 1039623118 - .long 0 - .long 2432213228 - .long 4116600081 - .long 2213395342 - .long 17 - .long 346536517 - .long 2329406249 - .long 1562759336 - .long 985 - .long 1904777685 - .long 777730941 - .long 3468653957 - .long 41521 - .long 2565172885 - .long 3392131685 - .long 216627896 - .long 1245806 - .long 777484384 - .long 1373172746 - .long 529073424 - .long 24734325 - .long 1189796029 - .long 1140288371 - .long 1770133260 - .long 289389693 - .long 2194668596 - .long 3631308278 - .long 3147219318 - .long 1613893367 - .long 344927104 - .long 1168140252 - .long 980702046 - .long 2577974684 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1881749350 - .long 46062706 - .long 0 - .long 0 - .long 2009952654 - .long 475434148 - .long 2 - .long 0 - .long 3595153284 - .long 3894518978 - .long 350 - .long 0 - .long 1401741016 - .long 800557075 - .long 49546 - .long 0 - .long 1250374609 - .long 1417939249 - .long 5854570 - .long 0 - .long 3066837935 - .long 3745800702 - .long 568662855 - .long 0 - .long 4187727968 - .long 1730013373 - .long 1461665574 - .long 10 - .long 3341641980 - .long 2588791038 - .long 1829968615 - .long 631 - .long 888818201 - .long 3523374130 - .long 852659386 - .long 29067 - .long 3905449900 - .long 720793762 - .long 1836357526 - .long 959598 - .long 711023215 - .long 2187868163 - .long 363719992 - .long 21124528 - .long 3782390642 - .long 1386816912 - .long 3690959132 - .long 275994811 - .long 3562870039 - .long 2887822114 - .long 2407074109 - .long 1720896075 - .long 723327461 - .long 1298307143 - .long 454424891 - .long 2939711024 - .long 4294967293 - .long 0 - .long 4220957082 - .long 1571153381 - .long 12825068 - .long 4227858976 - .long 4024519172 - .long 2730919557 - .long 1456036120 - .long 3256132268 - .long 2931624203 - .long 1339507405 - .long 1357793012 - .long 1094045067 - .long 1129712150 - .long 1138961 - .long 0 - .long 0 - .long 2372829177 - .long 237557530 - .long 0 - .long 0 - .long 534122416 - .long 423932365 - .long 10 - .long 0 - .long 4247263216 - .long 4283734547 - .long 1580 - .long 0 - .long 2387955306 - .long 607897802 - .long 209396 - .long 0 - .long 2812500241 - .long 994269493 - .long 23101510 - .long 0 - .long 3000333735 - .long 388858992 - .long 2083539857 - .long 0 - .long 1161363350 - .long 3153424268 - .long 4076649817 - .long 34 - .long 1819801357 - .long 1812729011 - .long 330148996 - .long 1953 - .long 3163500019 - .long 3864465446 - .long 4064814974 - .long 81467 - .long 3858761013 - .long 3692736596 - .long 1902533809 - .long 2406436 - .long 3293643408 - .long 375345917 - .long 2826147377 - .long 46631566 - .long 4164807482 - .long 4162856869 - .long 2610851470 - .long 525451848 - .long 2048614181 - .long 1569367797 - .long 3543942876 - .long 2777034414 - .long 3312093651 - .long 708453697 - .long 1978042629 - .long 4289897122 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2071065822 - .long 86614531 - .long 0 - .long 0 - .long 2391713785 - .long 4060239028 - .long 3 - .long 0 - .long 4029056008 - .long 1846783416 - .long 650 - .long 0 - .long 161647879 - .long 3413412248 - .long 90917 - .long 0 - .long 436274283 - .long 2466277660 - .long 10613189 - .long 0 - .long 671943584 - .long 553150431 - .long 1015563947 - .long 0 - .long 1753238306 - .long 1517906611 - .long 532738342 - .long 18 - .long 618689867 - .long 596492050 - .long 2460930076 - .long 1080 - .long 414131426 - .long 1367052230 - .long 3308909536 - .long 48209 - .long 4126473295 - .long 3381931776 - .long 1805298000 - .long 1525871 - .long 636148702 - .long 2186154781 - .long 2942928489 - .long 31683165 - .long 999999630 - .long 4126401816 - .long 259460410 - .long 380946890 - .long 231980038 - .long 363549591 - .long 883055596 - .long 2118559672 - .long 3622330114 - .long 1609129610 - .long 63100786 - .long 3373399958 - .long 4294967292 - .long 0 - .long 1588683414 - .long 1994957096 - .long 12816876 - .long 4227858976 - .long 2267877675 - .long 3576551320 - .long 1765045200 - .long 3464483214 - .long 1351689592 - .long 3801296041 - .long 352384788 - .long 331703635 - .long 605298272 - .long 1136492 - .long 0 - .long 0 - .long 2681104739 - .long 238950871 - .long 0 - .long 0 - .long 3149807504 - .long 621710226 - .long 10 - .long 0 - .long 2595166296 - .long 121246070 - .long 1585 - .long 0 - .long 2215012362 - .long 2482367452 - .long 209363 - .long 0 - .long 470943915 - .long 668008525 - .long 23014074 - .long 0 - .long 3763658407 - .long 3343124614 - .long 2065508072 - .long 0 - .long 249623666 - .long 2390602642 - .long 1795904366 - .long 34 - .long 1346725057 - .long 2927659279 - .long 1029310809 - .long 1906 - .long 3831989490 - .long 3024162362 - .long 457912312 - .long 78555 - .long 1623643704 - .long 979247650 - .long 4029398248 - .long 2282874 - .long 2791098952 - .long 2391841680 - .long 2696257895 - .long 43306505 - .long 262637107 - .long 3763159487 - .long 2938992385 - .long 475778611 - .long 3299175406 - .long 3677201670 - .long 2349553020 - .long 2458659840 - .long 206020084 - .long 2363120772 - .long 2638136209 - .long 3751386051 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3034634732 - .long 80259059 - .long 0 - .long 0 - .long 2987375659 - .long 2703374687 - .long 3 - .long 0 - .long 1215607278 - .long 4163686255 - .long 592 - .long 0 - .long 781938720 - .long 2086477677 - .long 82005 - .long 0 - .long 3556471813 - .long 3031971904 - .long 9451560 - .long 0 - .long 2005655437 - .long 2494233436 - .long 890598760 - .long 0 - .long 1167836918 - .long 114850616 - .long 2568442225 - .long 15 - .long 2351511177 - .long 1547877599 - .long 2724662709 - .long 908 - .long 1583056039 - .long 1830443712 - .long 1719394286 - .long 39382 - .long 1124627201 - .long 674092017 - .long 1868383046 - .long 1202161 - .long 4262245498 - .long 1815295967 - .long 3756878985 - .long 23872494 - .long 1013133814 - .long 1390137141 - .long 1845508344 - .long 272711216 - .long 2632746813 - .long 493954138 - .long 4257964097 - .long 1450886530 - .long 1659393003 - .long 4235627183 - .long 3605632322 - .long 2252460395 - .long 4294967292 - .long 0 - .long 1932081087 - .long 2418003218 - .long 12825068 - .long 4227858976 - .long 675685466 - .long 2210650544 - .long 2635457388 - .long 3001216681 - .long 2383987892 - .long 1958452314 - .long 200318573 - .long 1670080688 - .long 1772035109 - .long 1132935 - .long 0 - .long 0 - .long 2224132738 - .long 239067824 - .long 0 - .long 0 - .long 2504702558 - .long 548466910 - .long 10 - .long 0 - .long 120798343 - .long 3554901277 - .long 1577 - .long 0 - .long 2434954499 - .long 1660365081 - .long 207659 - .long 0 - .long 2744534538 - .long 1767005024 - .long 22722744 - .long 0 - .long 1354085614 - .long 573653951 - .long 2027648348 - .long 0 - .long 2302238895 - .long 940817979 - .long 2333007942 - .long 33 - .long 4044378246 - .long 2424318367 - .long 54614345 - .long 1841 - .long 3277428544 - .long 937510890 - .long 2353849014 - .long 75024 - .long 4005612974 - .long 1580435742 - .long 1601652905 - .long 2151432 - .long 3782038889 - .long 2892349902 - .long 3709353570 - .long 40211969 - .long 2209533886 - .long 1632935844 - .long 1972351296 - .long 435469920 - .long 2489865929 - .long 3249608891 - .long 2176055770 - .long 2225282526 - .long 4163770951 - .long 1426482641 - .long 75146285 - .long 3375249381 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2220915002 - .long 147504303 - .long 0 - .long 0 - .long 3383683424 - .long 2662024159 - .long 6 - .long 0 - .long 4203741875 - .long 3065385408 - .long 1071 - .long 0 - .long 94574798 - .long 3694012699 - .long 146649 - .long 0 - .long 548197575 - .long 3705365680 - .long 16693691 - .long 0 - .long 2971661595 - .long 3995690294 - .long 1550219778 - .long 0 - .long 3364157924 - .long 536970539 - .long 2951498969 - .long 26 - .long 3606982515 - .long 2998613798 - .long 1572386296 - .long 1523 - .long 54159713 - .long 2382254602 - .long 1960159626 - .long 64476 - .long 164299812 - .long 2501105432 - .long 2657580848 - .long 1915496 - .long 4191466314 - .long 1475491836 - .long 409725690 - .long 36942237 - .long 2000214888 - .long 3808326374 - .long 4191271566 - .long 410491162 - .long 3021924263 - .long 3759042010 - .long 567945948 - .long 2137524835 - .long 2922089864 - .long 3203830329 - .long 752382353 - .long 3278805360 - .long 4294967291 - .long 0 - .long 223335381 - .long 2840633637 - .long 12816876 - .long 4227858976 - .long 191176124 - .long 2632795962 - .long 792829484 - .long 4194095148 - .long 1561179743 - .long 586327156 - .long 2807878837 - .long 3545818423 - .long 1415596998 - .long 1125924 - .long 0 - .long 0 - .long 2335397241 - .long 237899312 - .long 0 - .long 0 - .long 898966976 - .long 220219689 - .long 10 - .long 0 - .long 3140042207 - .long 3171383055 - .long 1560 - .long 0 - .long 2021920923 - .long 1061467961 - .long 204590 - .long 0 - .long 1780915469 - .long 3394528573 - .long 22279398 - .long 0 - .long 2938289575 - .long 3726010345 - .long 1976658045 - .long 0 - .long 1742882295 - .long 3191343047 - .long 2047550512 - .long 32 - .long 3647296052 - .long 2253947992 - .long 1300129447 - .long 1768 - .long 2864334604 - .long 1571083743 - .long 2473956825 - .long 71411 - .long 902177211 - .long 1309134586 - .long 1494319522 - .long 2027873 - .long 1978202312 - .long 2898857432 - .long 1838265108 - .long 37534288 - .long 440015974 - .long 4230775195 - .long 1255344562 - .long 402981746 - .long 1205443830 - .long 4140044432 - .long 3282462476 - .long 2046231097 - .long 2809323527 - .long 1074462473 - .long 1051546203 - .long 3093465233 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1994591040 - .long 134874738 - .long 0 - .long 0 - .long 1154796671 - .long 33466848 - .long 6 - .long 0 - .long 944609558 - .long 611410016 - .long 964 - .long 0 - .long 3394269576 - .long 3253723903 - .long 130617 - .long 0 - .long 1604599336 - .long 2571734283 - .long 14700043 - .long 0 - .long 2720136884 - .long 1760790051 - .long 1347449133 - .long 0 - .long 3340661604 - .long 3195040324 - .long 3680379603 - .long 22 - .long 3451695816 - .long 2081337828 - .long 1427065647 - .long 1283 - .long 2755833528 - .long 3578899323 - .long 1127406403 - .long 53342 - .long 2103438216 - .long 2925829331 - .long 133275521 - .long 1554875 - .long 3003940918 - .long 1302060887 - .long 2008749614 - .long 29436400 - .long 4279932662 - .long 1473928468 - .long 533396292 - .long 321840330 - .long 3248261436 - .long 2035472962 - .long 372258839 - .long 1655927148 - .long 3127294521 - .long 3128066919 - .long 2865156314 - .long 2523236171 - .long 4294967291 - .long 0 - .long 1890690921 - .long 3263011055 - .long 12825068 - .long 4227858976 - .long 2797952740 - .long 3054806814 - .long 1894667006 - .long 214237447 - .long 1296756846 - .long 4060330468 - .long 1098085821 - .long 3604642180 - .long 1726893371 - .long 1115219 - .long 0 - .long 0 - .long 494710856 - .long 235638241 - .long 0 - .long 0 - .long 1193585816 - .long 3981686648 - .long 9 - .long 0 - .long 143797405 - .long 762868814 - .long 1536 - .long 0 - .long 898881458 - .long 2220674218 - .long 200569 - .long 0 - .long 271788931 - .long 1836576498 - .long 21741122 - .long 0 - .long 3732597210 - .long 2567748600 - .long 1918751890 - .long 0 - .long 3683010637 - .long 2674911154 - .long 1453366689 - .long 31 - .long 3314792629 - .long 3590832641 - .long 792084225 - .long 1695 - .long 710884882 - .long 1421882797 - .long 453673326 - .long 67984 - .long 4289998525 - .long 1545801705 - .long 2082770245 - .long 1917055 - .long 1427259630 - .long 3087470940 - .long 1747456958 - .long 35251400 - .long 2597591904 - .long 3049486553 - .long 2056710479 - .long 376393410 - .long 2213091204 - .long 2641098163 - .long 3971809407 - .long 1903717223 - .long 3244722564 - .long 177715146 - .long 3090222263 - .long 2872209565 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 4193727727 - .long 246007177 - .long 0 - .long 0 - .long 768822418 - .long 3782320021 - .long 10 - .long 0 - .long 2196079823 - .long 201893182 - .long 1732 - .long 0 - .long 1661061158 - .long 4260475543 - .long 232537 - .long 0 - .long 3959757821 - .long 1648015928 - .long 25908825 - .long 0 - .long 2136418328 - .long 2790862444 - .long 2348699355 - .long 0 - .long 14984150 - .long 3359899422 - .long 1557173094 - .long 39 - .long 2579163115 - .long 4209094591 - .long 2975956643 - .long 2181 - .long 809874233 - .long 1287653529 - .long 1784169535 - .long 89477 - .long 836980350 - .long 209256478 - .long 3015626027 - .long 2573945 - .long 2016221741 - .long 1745099515 - .long 1018088912 - .long 48139690 - .long 3329474215 - .long 1010710723 - .long 642962579 - .long 521003091 - .long 801578433 - .long 3224757113 - .long 3341503980 - .long 2660978634 - .long 2199935228 - .long 4052003304 - .long 2221814426 - .long 4038241008 - .long 4294967290 - .long 0 - .long 3178730751 - .long 116147812 - .long 14854636 - .long 416 - .long 416371481 - .long 2823641499 - .long 2506915568 - .long 4124207639 - .long 950494682 - .long 256731865 - .long 619428904 - .long 3037288495 - .long 4208811624 - .long 884105690 - .long 0 - .long 0 - .long 3410106176 - .long 4245208708 - .long 126 - .long 0 - .long 3116091236 - .long 3070791485 - .long 44137 - .long 0 - .long 1379902983 - .long 2256834745 - .long 12232777 - .long 0 - .long 2097914520 - .long 545273602 - .long 2619411277 - .long 0 - .long 215423817 - .long 3507318412 - .long 256238311 - .long 97 - .long 3668117219 - .long 4022295396 - .long 2420542464 - .long 10890 - .long 3822143167 - .long 3930114069 - .long 1325150521 - .long 798528 - .long 3699121161 - .long 791807715 - .long 67391017 - .long 33958538 - .long 3257898816 - .long 678025854 - .long 1894699409 - .long 674718922 - .long 1201340557 - .long 2594901103 - .long 3933905415 - .long 3704843775 - .long 4294967294 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 982743186 - .long 1840382683 - .long 8 - .long 0 - .long 2770471380 - .long 1232287742 - .long 3186 - .long 0 - .long 2689925901 - .long 4291161637 - .long 993651 - .long 0 - .long 1865452386 - .long 278667130 - .long 243198017 - .long 0 - .long 941914362 - .long 1579381843 - .long 2208801237 - .long 10 - .long 4030005343 - .long 1439537596 - .long 2913266490 - .long 1415 - .long 897709932 - .long 2611261457 - .long 3831192043 - .long 129715 - .long 2599986828 - .long 562288571 - .long 873738186 - .long 7347842 - .long 1676792497 - .long 2643238970 - .long 1059645264 - .long 218261805 - .long 3968061936 - .long 1814410518 - .long 4215318874 - .long 2360677848 - .long 4294967294 - .long 0 - .long 1965065697 - .long 125333813 - .long 29671681 - .long 368 - .long 2696892906 - .long 3837883846 - .long 4163818448 - .long 2636579655 - .long 352076257 - .long 2995873374 - .long 2356022824 - .long 2864685933 - .long 507647155 - .long 87534215 - .long 364999993 - .long 2297262027 - .long 3804603314 - .long 421232362 - .long 623004025 - .long 2436698064 - .long 857209363 - .long 4104727312 - .long 1300779075 - .long 2300222395 - .long 3549420260 - .long 815695431 - .long 3490474032 - .long 2175015012 - .long 273829883 - .long 837019448 - .long 1150859439 - .long 4129001094 - .long 166114890 - .long 262582295 - .long 2200440235 - .long 3934411649 - .long 4260765987 - .long 1496016656 - .long 613554758 - .long 3765455772 - .long 1537995402 - .long 3112915065 - .long 3831973801 - .long 3621881222 - .long 371259347 - .long 563988192 - .long 2577068580 - .long 3504039397 - .long 3892719810 - .long 2774136061 - .long 761863973 - .long 3413069278 - .long 932429307 - .long 3533847854 - .long 670352073 - .long 3351189942 - .long 332608650 - .long 3102655069 - .long 2958547113 - .long 3322177573 - .long 146996155 - .long 3411645617 - .long 2215850181 - .long 3332037184 - .long 590982538 - .long 2197714658 - .long 1764878165 - .long 3390200984 - .long 952267699 - .long 417090737 - .long 3487943763 - .long 3519763458 - .long 1338819266 - .long 2605877443 - .long 347561299 - .long 3761505334 - .long 3379093939 - .long 2405540353 - .long 1506019226 - .long 3884741458 - .long 2785505456 - .long 3086386584 - .long 2046080941 - .long 3789068741 - .long 1518238185 - .long 1088338119 - .long 1804079185 - .long 4226925859 - .long 2303172266 - .long 2741263628 - .long 633622237 - .long 3777083586 - .long 3757196004 - .long 294895316 - .long 27640459 - .long 432 - .long 2828420652 - .long 3361833042 - .long 1412248364 - .long 2211183849 - .long 0 - .long 3547577142 - .long 1 - .long 0 - .long 2851890648 - .long 450899591 - .long 287024625 - .long 4159553752 - .long 3788600515 - .long 2561792324 - .long 3962766183 - .long 3512577319 - .long 2861699545 - .long 2196522185 - .long 1554209519 - .long 4198958626 - .long 3194489346 - .long 2786967510 - .long 3304318871 - .long 3344542374 - .long 4105608152 - .long 867728568 - .long 2708443992 - .long 3505223656 - .long 1032912387 - .long 3711167273 - .long 1214238009 - .long 2611213035 - .long 3368625691 - .long 5584441 - .long 2611408711 - .long 2384597091 - .long 1152098306 - .long 3591611965 - .long 2962228819 - .long 3281323244 - .long 3071980506 - .long 3920864562 - .long 3855393805 - .long 2582452787 - .long 3343479107 - .long 1168797990 - .long 3053975971 - .long 3222544278 - .long 3909139483 - .long 1083468961 - .long 2101774947 - .long 2160722632 - .long 2110801092 - .long 4019214560 - .long 1350065479 - .long 2376260138 - .long 42240602 - .long 3769900699 - .long 2854857645 - .long 2686999005 - .long 4198697477 - .long 4081736268 - .long 2846299562 - .long 2478988733 - .long 427675101 - .long 2445602520 - .long 4233423029 - .long 2355264427 - .long 1558515652 - .long 2279564152 - .long 62666641 - .long 3298296210 - .long 1417642332 - .long 61859471 - .long 2115062510 - .long 2696409612 - .long 326492679 - .long 2534854374 - .long 1679925266 - .long 2160906787 - .long 3251033635 - .long 2671487866 - .long 2862247032 - .long 3574405396 - .long 3009660033 - .long 339349497 - .long 3007548001 - .long 2840034127 - .long 2252903388 - .long 1330394071 - .long 2157393054 - .long 2200692478 - .long 621144332 - .long 3987984878 - .long 1728372573 - .long 3841939891 - .long 2649374871 - .long 2008708732 - .long 1354882191 - .long 2904204888 - .long 3398077461 - .long 3906455313 - .long 2501808239 - .long 2340852904 - .long 257973487 - .long 728759453 - .long 30163463 - .long 848 - .long 3266633231 - .long 4249524844 - .long 2065907802 - .long 2501410748 - .long 2077120351 - .long 1559182036 - .long 2148606178 - .long 4119882265 - .long 315045067 - .long 14812806 - .long 1274331647 - .long 3156365682 - .long 238086315 - .long 2517423111 - .long 2041601736 - .long 2711078025 - .long 3652406632 - .long 753691269 - .long 2734041400 - .long 3820625006 - .long 2380832782 - .long 158270193 - .long 2340065183 - .long 2273321385 - .long 393890025 - .long 2894667190 - .long 1573700686 - .long 4092887025 - .long 464562897 - .long 303515614 - .long 3848216904 - .long 3328255744 - .long 1036006886 - .long 2121885428 - .long 3704818897 - .long 3211297370 - .long 1325824312 - .long 3493125121 - .long 3338748802 - .long 3232443331 - .long 3112594497 - .long 3307298736 - .long 2809691794 - .long 3731360010 - .long 3573632495 - .long 2312925567 - .long 629450595 - .long 3622381915 - .long 989010185 - .long 3398558103 - .long 4153621291 - .long 3607201927 - .long 2629100272 - .long 1953994464 - .long 1943384301 - .long 2759420002 - .long 2305022315 - .long 2391039855 - .long 612094863 - .long 3951603967 - .long 1340433416 - .long 3334026995 - .long 1491763737 - .long 4186248678 - .long 4198464715 - .long 87224683 - .long 4220145159 - .long 3881216024 - .long 2007772778 - .long 1722917095 - .long 2388984076 - .long 3799859053 - .long 732951595 - .long 3919415462 - .long 528829945 - .long 3610037081 - .long 3992395594 - .long 4037851002 - .long 1844118200 - .long 3714769074 - .long 3432638667 - .long 3108186388 - .long 746542694 - .long 3818486016 - .long 557823754 - .long 2427510280 - .long 3516120961 - .long 3892142094 - .long 1703329579 - .long 996501429 - .long 4081661750 - .long 3974028169 - .long 480847786 - .long 3006112619 - .long 1403431905 - .long 4065364793 - .long 1900483787 - .long 2649330773 - .long 651669812 - .long 4162988739 - .long 1619173352 - .long 1864819711 - .long 1131374484 - .long 4267744761 - .long 1834860043 - .long 2423625113 - .long 288099716 - .long 2190363742 - .long 2708503338 - .long 4126097102 - .long 3654529011 - .long 2251412339 - .long 3753107947 - .long 3496449780 - .long 2610603179 - .long 2317533940 - .long 3862344650 - .long 1030964414 - .long 451338797 - .long 2389337002 - .long 2524196363 - .long 569491811 - .long 2946926522 - .long 2467527406 - .long 196512138 - .long 497579000 - .long 2195809742 - .long 2552928386 - .long 1662952651 - .long 780129586 - .long 2880189481 - .long 2646511583 - .long 1545658730 - .long 789982365 - .long 191310475 - .long 2749424166 - .long 1470909419 - .long 1234100077 - .long 2044585165 - .long 2862876216 - .long 928663178 - .long 2102054363 - .long 3690288476 - .long 2988326180 - .long 2216922123 - .long 2305139484 - .long 4174545259 - .long 3130608048 - .long 1755153610 - .long 918723953 - .long 2738745609 - .long 3294047809 - .long 721728203 - .long 1773737866 - .long 4101484425 - .long 3433511350 - .long 1857351114 - .long 2879235855 - .long 1363799643 - .long 3536910801 - .long 4061718601 - .long 908917583 - .long 3005712244 - .long 4215915540 - .long 243897838 - .long 7660553 - .long 2731769662 - .long 2727825412 - .long 1695068807 - .long 2615038300 - .long 234665196 - .long 3149409338 - .long 2025012071 - .long 1264893574 - .long 1155162898 - .long 2643506208 - .long 3781832745 - .long 2126832235 - .long 1395780981 - .long 2754722035 - .long 4274723882 - .long 199777100 - .long 1853759306 - .long 3583381494 - .long 3072425958 - .long 993425135 - .long 3004341385 - .long 3435215656 - .long 3198694093 - .long 620059688 - .long 2085750463 - .long 2400804391 - .long 1026440073 - .long 2116228661 - .long 3422860059 - .long 3767238370 - .long 376557070 - .long 669608662 - .long 2826299222 - .long 4021726431 - .long 97861608 - .long 623049618 - .long 457143492 - .long 3494791496 - .long 647336461 - .long 20390326 - .long 156262610 - .long 3457815221 - .long 2242302115 - .long 1153736377 - .long 29917573 - .long 608 - .long 956831540 - .long 3804294695 - .long 1233656524 - .long 1169011973 - .long 3512247603 - .long 731707668 - .long 3804813427 - .long 3532496868 - .long 3861713254 - .long 3920998321 - .long 3249242362 - .long 2983748142 - .long 4254521127 - .long 3419828215 - .long 3612752470 - .long 3427243214 - .long 1865130836 - .long 1528519591 - .long 3104638828 - .long 2778394947 - .long 2428343797 - .long 2183879732 - .long 1050296790 - .long 3773933110 - .long 3652345540 - .long 2906583603 - .long 1426288469 - .long 3900013225 - .long 3885984869 - .long 2566242072 - .long 2597085889 - .long 3387828672 - .long 3402407620 - .long 2004411987 - .long 1378225957 - .long 3062031935 - .long 3648787989 - .long 92338370 - .long 4236899602 - .long 2817389734 - .long 1952242004 - .long 2304097414 - .long 127945474 - .long 2582972800 - .long 4281889637 - .long 2697225196 - .long 2199799063 - .long 2368525439 - .long 2882311446 - .long 2124741744 - .long 2454581530 - .long 2175676414 - .long 1363442533 - .long 235950345 - .long 3278607019 - .long 3991475143 - .long 2338347060 - .long 892652237 - .long 3886541672 - .long 3654822706 - .long 2206999749 - .long 359442761 - .long 1344250324 - .long 3448127457 - .long 2316542980 - .long 3829127353 - .long 220674587 - .long 3338303659 - .long 280815351 - .long 3269930602 - .long 4246425196 - .long 2475208849 - .long 3336161088 - .long 2206265573 - .long 1212344344 - .long 2473891454 - .long 491190659 - .long 2156317952 - .long 2981239741 - .long 2515194909 - .long 3609278228 - .long 1234146757 - .long 1026744012 - .long 2624029530 - .long 2704274272 - .long 1975162568 - .long 3276945619 - .long 2578639571 - .long 1034382165 - .long 2590969465 - .long 713762072 - .long 2201806508 - .long 4228198051 - .long 3980119693 - .long 4056525840 - .long 3097891989 - .long 2284336932 - .long 1932639591 - .long 1092540108 - .long 4171705026 - .long 1025654624 - .long 2806138305 - .long 3009647326 - .long 4248184906 - .long 1890367717 - .long 2289438980 - .long 2899757860 - .long 2719293081 - .long 2021534083 - .long 143536689 - .long 3592569555 - .long 2232683115 - .long 1092535430 - .long 1236892532 - .long 4153044331 - .long 2589276857 - .long 3416977538 - .long 1252322112 - .long 2546684106 - .long 3041465242 - .long 1082461383 - .long 209063033 - .long 689512483 - .long 3233542783 - .long 2486702483 - .long 195380297 - .long 3370408231 - .long 2473507057 - .long 2649928714 - .long 3477888857 - .long 4011137876 - .long 2392519727 - .long 735960098 - .long 892635115 - .long 2839435691 - .long 3648562506 - .long 4276128797 - .long 1399354710 - .long 1604489874 - .long 3300188966 - .long 3618086195 - .long 2363035047 - .long 3798645379 - .long 2910302351 - .long 2872403096 - .long 1995870309 - .long 1272108261 - .long 2577818883 - .long 1355290640 - .long 1576944867 - .long 29835783 - .long 528 - .long 602586217 - .long 2744039853 - .long 1836018387 - .long 1812008391 - .long 2257334696 - .long 1529386301 - .long 1071982020 - .long 1483132946 - .long 4031485769 - .long 2132222880 - .long 3196630878 - .long 2436179952 - .long 499786504 - .long 1744292863 - .long 2290711216 - .long 2504292584 - .long 1896329063 - .long 3237324739 - .long 2330780121 - .long 3744707929 - .long 1734827082 - .long 3296507779 - .long 823995655 - .long 3906271181 - .long 1416288288 - .long 2226659999 - .long 3321781362 - .long 3715853563 - .long 2544842791 - .long 504837419 - .long 2958966103 - .long 2231720942 - .long 750175301 - .long 4084077163 - .long 2549224941 - .long 3250807824 - .long 1369606438 - .long 3223323496 - .long 2083589876 - .long 3384767572 - .long 4248382916 - .long 4144081438 - .long 3229998485 - .long 3165770641 - .long 3223334087 - .long 2485373121 - .long 3818931504 - .long 3388848075 - .long 1252536709 - .long 1652370242 - .long 2624409840 - .long 2964694704 - .long 823791654 - .long 1167018965 - .long 2939238153 - .long 2953436515 - .long 884228550 - .long 292276865 - .long 734484637 - .long 2205305082 - .long 1913113287 - .long 3765099297 - .long 3745471985 - .long 4167966771 - .long 2931697765 - .long 3673300473 - .long 2182221826 - .long 2649024091 - .long 1975627272 - .long 3727134676 - .long 3712743943 - .long 2356773214 - .long 1995177638 - .long 1132588444 - .long 1959425557 - .long 2466886350 - .long 1844669961 - .long 3530525712 - .long 760398624 - .long 4132176514 - .long 1979460773 - .long 796554174 - .long 3170959411 - .long 3438043671 - .long 1989653354 - .long 84033345 - .long 407935807 - .long 2705661215 - .long 1743925380 - .long 3102969454 - .long 3987162576 - .long 3388329870 - .long 1765097355 - .long 2209606903 - .long 1187505799 - .long 2507493218 - .long 161532103 - .long 2079767141 - .long 2713931831 - .long 2181209439 - .long 3726577836 - .long 2678974047 - .long 4042300458 - .long 3044993725 - .long 569618662 - .long 2942019385 - .long 2267421895 - .long 3217189858 - .long 2072134893 - .long 690975306 - .long 3699981379 - .long 4279355559 - .long 3941553639 - .long 955448001 - .long 4102577460 - .long 2173892384 - .long 1871059570 - .long 2340022155 - .long 2864020166 - .long 2805153080 - .long 3271562790 - .long 928990650 - .long 4206766333 - .long 3357221519 - .long 685259147 - .long 3780305127 - .long 2513405378 - .long 4289834595 - .long 2048010913 - .long 1999500835 - .long 12816876 - .long 4227858976 - .long 255479044 - .long 3586592293 - .long 3058876998 - .long 264515361 - .long 3124897887 - .long 2490659405 - .long 1648870444 - .long 499533912 - .long 41235212 - .long 1135645 - .long 0 - .long 0 - .long 1870875844 - .long 237807939 - .long 0 - .long 0 - .long 1220251845 - .long 534075739 - .long 10 - .long 0 - .long 1566916386 - .long 2806728368 - .long 1584 - .long 0 - .long 359612094 - .long 1988210364 - .long 209791 - .long 0 - .long 4018390684 - .long 3143652161 - .long 23114812 - .long 0 - .long 1385310342 - .long 3191552623 - .long 2079730388 - .long 0 - .long 391712962 - .long 3496232483 - .long 3188676879 - .long 34 - .long 712670475 - .long 2384468018 - .long 3612170541 - .long 1928 - .long 2944407817 - .long 162857838 - .long 3871824152 - .long 79642 - .long 1897150183 - .long 2209645725 - .long 1648691441 - .long 2316814 - .long 4189666301 - .long 2103634775 - .long 2832836870 - .long 43914735 - .long 100148761 - .long 3544145710 - .long 882453749 - .long 480946030 - .long 743895637 - .long 1440146064 - .long 1167801510 - .long 2472892869 - .long 2527288726 - .long 3429197137 - .long 3389012105 - .long 3751366970 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3328931461 - .long 85211143 - .long 0 - .long 0 - .long 1806098240 - .long 3730920547 - .long 3 - .long 0 - .long 1452363271 - .long 241457122 - .long 632 - .long 0 - .long 2408523024 - .long 2523801313 - .long 87488 - .long 0 - .long 2245774023 - .long 1447128763 - .long 10087333 - .long 0 - .long 741575833 - .long 1516712297 - .long 950654827 - .long 0 - .long 188657751 - .long 2834063720 - .long 2756671478 - .long 16 - .long 1878890455 - .long 1600190830 - .long 298103694 - .long 968 - .long 2704961479 - .long 3096990934 - .long 62735862 - .long 41831 - .long 4224033960 - .long 872206772 - .long 3368762420 - .long 1269793 - .long 1493275548 - .long 4226875193 - .long 156115358 - .long 24976936 - .long 3675413693 - .long 3939858976 - .long 1188049005 - .long 281407884 - .long 4246420658 - .long 2584806369 - .long 1500891563 - .long 1472264476 - .long 3550606718 - .long 2355970614 - .long 848338822 - .long 2246143015 - .long 4294967292 - .long 0 - .long 4176598204 - .long 2421744458 - .long 12825068 - .long 4227858976 - .long 26255947 - .long 2214716320 - .long 3008850950 - .long 1148166722 - .long 3688411584 - .long 3263035913 - .long 28940749 - .long 823708345 - .long 2778463383 - .long 1133123 - .long 0 - .long 0 - .long 3375994644 - .long 239287696 - .long 0 - .long 0 - .long 1307882943 - .long 652616536 - .long 10 - .long 0 - .long 1617272991 - .long 332362201 - .long 1584 - .long 0 - .long 1120342694 - .long 786793736 - .long 208818 - .long 0 - .long 1754116211 - .long 4140995168 - .long 22886713 - .long 0 - .long 1065416575 - .long 2365212708 - .long 2045489262 - .long 0 - .long 4094841 - .long 1336050951 - .long 3805124179 - .long 33 - .long 2857461896 - .long 1181810454 - .long 3505581240 - .long 1861 - .long 317401726 - .long 1588400515 - .long 2236524720 - .long 75909 - .long 1498310037 - .long 3569634182 - .long 656796315 - .long 2175950 - .long 1147851401 - .long 3112077225 - .long 3624068591 - .long 40608505 - .long 3302439284 - .long 1412013598 - .long 1600554036 - .long 438608161 - .long 1138396370 - .long 2245711018 - .long 3467973442 - .long 2233633025 - .long 867533488 - .long 947112014 - .long 1198607031 - .long 3375241932 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1112979214 - .long 155431282 - .long 0 - .long 0 - .long 751906521 - .long 4198567473 - .long 6 - .long 0 - .long 1613582890 - .long 3858662071 - .long 1129 - .long 0 - .long 750469660 - .long 730914801 - .long 154615 - .long 0 - .long 3704035494 - .long 424802513 - .long 17595297 - .long 0 - .long 3547752153 - .long 653012047 - .long 1632696395 - .long 0 - .long 3895749118 - .long 1312132433 - .long 283540480 - .long 28 - .long 69337464 - .long 2039495909 - .long 480366968 - .long 1598 - .long 3999973752 - .long 512131576 - .long 3264765906 - .long 67376 - .long 1470627556 - .long 3527817596 - .long 506357093 - .long 1990112 - .long 1150644769 - .long 1706533685 - .long 1646793404 - .long 38078290 - .long 2272838918 - .long 315551185 - .long 931114118 - .long 418976801 - .long 799519248 - .long 833405850 - .long 3700723307 - .long 2157812839 - .long 1885423178 - .long 2894024424 - .long 986247108 - .long 3272778907 - .long 4294967291 - .long 0 - .long 205941362 - .long 2843814473 - .long 12816876 - .long 4227858976 - .long 4284396776 - .long 2636211962 - .long 2729248679 - .long 228940808 - .long 2721630221 - .long 4033427380 - .long 3518215373 - .long 3318265016 - .long 1583232401 - .long 1129188 - .long 0 - .long 0 - .long 2240090200 - .long 238747566 - .long 0 - .long 0 - .long 2182354368 - .long 422793662 - .long 10 - .long 0 - .long 2344384525 - .long 3611967473 - .long 1569 - .long 0 - .long 2363261376 - .long 55742926 - .long 206011 - .long 0 - .long 2169713945 - .long 2081106389 - .long 22457193 - .long 0 - .long 808249952 - .long 3928968053 - .long 1994189663 - .long 0 - .long 2498399120 - .long 610170797 - .long 3374767919 - .long 32 - .long 2499128949 - .long 806866088 - .long 2667994898 - .long 1785 - .long 1293127093 - .long 1533235693 - .long 3364558966 - .long 72094 - .long 3484449920 - .long 4142457389 - .long 393414345 - .long 2045553 - .long 1815566734 - .long 3205349654 - .long 1699048752 - .long 37804868 - .long 885836718 - .long 797019709 - .long 3601921623 - .long 405043970 - .long 1414187968 - .long 4238799387 - .long 2244838147 - .long 2051616278 - .long 2091776204 - .long 3735546130 - .long 1436809887 - .long 3093461814 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 194035164 - .long 141017056 - .long 0 - .long 0 - .long 3307569967 - .long 1206991859 - .long 6 - .long 0 - .long 3663448937 - .long 3391377880 - .long 1007 - .long 0 - .long 4126701083 - .long 2994857527 - .long 136467 - .long 0 - .long 1667733955 - .long 4058943102 - .long 15345719 - .long 0 - .long 2611265876 - .long 3831769830 - .long 1404776386 - .long 0 - .long 209321266 - .long 573187068 - .long 3359330694 - .long 23 - .long 1677262110 - .long 637572110 - .long 2122511782 - .long 1331 - .long 3496561941 - .long 3652813901 - .long 3559168047 - .long 55128 - .long 1750715127 - .long 4228815409 - .long 1050316 - .long 1598795 - .long 1840387030 - .long 2463042611 - .long 3094434052 - .long 30079053 - .long 2629602118 - .long 2049759618 - .long 945167723 - .long 326505049 - .long 3298129216 - .long 3410065465 - .long 1686243051 - .long 1666911635 - .long 3383305094 - .long 1693255217 - .long 2403972032 - .long 2519963779 - .long 4294967291 - .long 0 - .long 3238416553 - .long 3265778049 - .long 12825068 - .long 4227858976 - .long 3177200532 - .long 3057752043 - .long 1963397648 - .long 3926923754 - .long 1015831100 - .long 3054277238 - .long 214260357 - .long 3388682645 - .long 329260597 - .long 1120080 - .long 0 - .long 0 - .long 1129382972 - .long 236791308 - .long 0 - .long 0 - .long 200550114 - .long 4225205647 - .long 9 - .long 0 - .long 3987740840 - .long 662463985 - .long 1546 - .long 0 - .long 3625695977 - .long 942803776 - .long 202014 - .long 0 - .long 4082097994 - .long 2934588234 - .long 21910543 - .long 0 - .long 2081364333 - .long 826431917 - .long 1934499234 - .long 0 - .long 1761358361 - .long 1915853684 - .long 2581201468 - .long 31 - .long 1458338458 - .long 480335293 - .long 641318311 - .long 1709 - .long 2934587087 - .long 1935466844 - .long 4209158963 - .long 68508 - .long 2290297886 - .long 2520183995 - .long 2347470795 - .long 1930078 - .long 1214972608 - .long 3678131539 - .long 56536087 - .long 35444212 - .long 1624218450 - .long 2947499939 - .long 75007111 - .long 377830189 - .long 794554122 - .long 1484978356 - .long 1550658172 - .long 1907426674 - .long 1950966402 - .long 3741059307 - .long 468440577 - .long 2872207806 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2513119405 - .long 255601926 - .long 0 - .long 0 - .long 1340053149 - .long 1293535308 - .long 11 - .long 0 - .long 2520596056 - .long 243966073 - .long 1798 - .long 0 - .long 1240269441 - .long 1692289976 - .long 241208 - .long 0 - .long 486505533 - .long 4176826391 - .long 26843964 - .long 0 - .long 1085031321 - .long 2229862700 - .long 2429583838 - .long 0 - .long 3607912919 - .long 1284443184 - .long 2708483256 - .long 40 - .long 4286170020 - .long 2109173108 - .long 2872722597 - .long 2245 - .long 3765965368 - .long 2873757161 - .long 2280026745 - .long 91776 - .long 975034122 - .long 907445528 - .long 4183785771 - .long 2628820 - .long 2401876752 - .long 1790794470 - .long 4120636181 - .long 48923208 - .long 3456079977 - .long 3312351896 - .long 2533182876 - .long 526592659 - .long 300202939 - .long 3214183676 - .long 2700781633 - .long 2674019932 - .long 3409370037 - .long 142796896 - .long 590138558 - .long 4034348900 - .long 4294967290 - .long 0 - .long 2441521498 - .long 242594037 - .long 2326542 - .long 4227858728 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 292802143 - .long 2930268 - .long 0 - .long 0 - .long 535415153 - .long 618901269 - .long 0 - .long 0 - .long 1086559041 - .long 2797303288 - .long 25 - .long 0 - .long 4140762130 - .long 803311064 - .long 3903 - .long 0 - .long 3260682281 - .long 805348165 - .long 501094 - .long 0 - .long 946699523 - .long 2655018074 - .long 53417808 - .long 0 - .long 3184188054 - .long 357148693 - .long 343191017 - .long 1 - .long 2991785955 - .long 1885266767 - .long 2475080337 - .long 74 - .long 3202232014 - .long 1390745085 - .long 1906741299 - .long 3974 - .long 2460394114 - .long 145617371 - .long 1237048646 - .long 157131 - .long 2499420999 - .long 890518540 - .long 2984098479 - .long 4365826 - .long 4044160094 - .long 3502963765 - .long 4084883256 - .long 78771967 - .long 1855836510 - .long 1773383726 - .long 696038818 - .long 812348145 - .long 1371130586 - .long 4224739114 - .long 2913286396 - .long 3734813411 - .long 3022964429 - .long 4251306649 - .long 3856945722 - .long 3368235169 - .long 4294967295 - .long 0 - .long 3259021111 - .long 321006842 - .long 29835651 - .long 528 - .long 4287764257 - .long 2359162534 - .long 538435925 - .long 1893177075 - .long 2620595140 - .long 1125567552 - .long 2991073306 - .long 2159239491 - .long 623213113 - .long 2440954329 - .long 3454983919 - .long 2690441248 - .long 1981777827 - .long 3070641374 - .long 600396448 - .long 3989904562 - .long 503111015 - .long 2398913263 - .long 3729609173 - .long 2560895207 - .long 4264522276 - .long 1827510236 - .long 1453587439 - .long 2856034995 - .long 3530335573 - .long 2910390539 - .long 3830755809 - .long 3395214488 - .long 581887236 - .long 170861812 - .long 3783767784 - .long 3801720292 - .long 3874334995 - .long 3776894534 - .long 3941576344 - .long 4151651145 - .long 672178724 - .long 1876155966 - .long 2300153670 - .long 2280168405 - .long 2930820789 - .long 310363638 - .long 2337608734 - .long 2504022121 - .long 679615860 - .long 1866145491 - .long 925134179 - .long 2749395452 - .long 4164495461 - .long 1691717726 - .long 3504269286 - .long 3018609133 - .long 4091749652 - .long 2913918638 - .long 75440378 - .long 3313861766 - .long 2260863989 - .long 1783565696 - .long 3478989690 - .long 3637556251 - .long 386210930 - .long 165743778 - .long 2898550894 - .long 3992273458 - .long 138300613 - .long 2474605972 - .long 1444508693 - .long 2190379430 - .long 3716173044 - .long 211495398 - .long 2076026756 - .long 2402948622 - .long 884026613 - .long 3273453185 - .long 2774793032 - .long 2635331838 - .long 862601524 - .long 3461868441 - .long 1569319307 - .long 2889017487 - .long 2379289701 - .long 4014175908 - .long 4105967090 - .long 3165345439 - .long 4280005796 - .long 3658970897 - .long 1734788832 - .long 3465258574 - .long 1142155173 - .long 2128929843 - .long 1454912392 - .long 3791483352 - .long 1572825138 - .long 4100167805 - .long 2209491991 - .long 4149468636 - .long 1302034421 - .long 2240019943 - .long 2903825538 - .long 2241250238 - .long 1470684676 - .long 2909933371 - .long 1614391894 - .long 2346034557 - .long 3663942245 - .long 150553254 - .long 581996432 - .long 2853498413 - .long 2851485478 - .long 1062112106 - .long 2360862824 - .long 4080591848 - .long 3037166561 - .long 3942859811 - .long 2491765597 - .long 2637624859 - .long 3670749589 - .long 1175994297 - .long 2568760650 - .long 2257943156 - .long 4233645441 - .long 2769385451 - .long 3183971100 - .long 4072128784 - .long 1432427446 - .long 3380851706 - .long 2013943478 - .long 2236760609 - .long 4221662466 - .long 494326959 - .long 27640328 - .long 432 - .long 4152930537 - .long 3261335210 - .long 1647304022 - .long 2421513631 - .long 0 - .long 2182303040 - .long 2 - .long 0 - .long 2440707372 - .long 2648025301 - .long 1920343642 - .long 4033309261 - .long 228472035 - .long 951557190 - .long 1587559315 - .long 2974493459 - .long 2596925677 - .long 961292909 - .long 2340517507 - .long 4069972126 - .long 3800775586 - .long 2435894136 - .long 1723862257 - .long 2750240234 - .long 1983413582 - .long 438211295 - .long 1298530652 - .long 3389699362 - .long 2457352961 - .long 2834143237 - .long 3251433817 - .long 4162244914 - .long 2624345295 - .long 2198133979 - .long 1723202388 - .long 2299670239 - .long 3808420354 - .long 1821904843 - .long 3390094422 - .long 2531701946 - .long 1851152974 - .long 2701629785 - .long 1724191120 - .long 2482272915 - .long 648872229 - .long 865545185 - .long 2559674717 - .long 2406027884 - .long 910915727 - .long 2144582723 - .long 1642929274 - .long 4137212570 - .long 2336042754 - .long 239465408 - .long 3865561517 - .long 3439416156 - .long 2422534192 - .long 3569472253 - .long 2978472155 - .long 2559905612 - .long 2875291331 - .long 4046158321 - .long 3949085588 - .long 3503570860 - .long 2128927569 - .long 1225899162 - .long 2147335523 - .long 2230618794 - .long 2283389284 - .long 1333752198 - .long 1465231956 - .long 2336128911 - .long 2753251442 - .long 2966939997 - .long 2922138241 - .long 2536578790 - .long 2666112773 - .long 3385813147 - .long 623901210 - .long 3462131994 - .long 668414005 - .long 3701008851 - .long 3126176950 - .long 3345113301 - .long 358440900 - .long 3717742396 - .long 3947881290 - .long 3263003015 - .long 2610140914 - .long 3090322344 - .long 447998310 - .long 4170300383 - .long 397141160 - .long 2942373728 - .long 3824192808 - .long 2641349034 - .long 2658982609 - .long 4233303079 - .long 2524818000 - .long 3312990274 - .long 228893295 - .long 2515147602 - .long 3476745001 - .long 2698739548 - .long 2970265182 - .long 931672352 - .long 30032391 - .long 720 - .long 1031893951 - .long 2915037812 - .long 3514686481 - .long 3480585297 - .long 183393903 - .long 2624056858 - .long 28546027 - .long 1683875686 - .long 92539635 - .long 470440642 - .long 3104544566 - .long 2542111380 - .long 2423082850 - .long 4223302981 - .long 1880783390 - .long 3172707188 - .long 2733291596 - .long 4028584963 - .long 3133521808 - .long 2155982074 - .long 1545518760 - .long 2360167907 - .long 1514977624 - .long 3361750727 - .long 1775829359 - .long 1268098089 - .long 293245362 - .long 2922889930 - .long 4260567272 - .long 2130738070 - .long 78442230 - .long 3811451694 - .long 3185114409 - .long 1528069252 - .long 1469017227 - .long 3009687218 - .long 817620842 - .long 541098266 - .long 3429120157 - .long 3247469802 - .long 1386496969 - .long 2684347079 - .long 284179228 - .long 4184596161 - .long 3638765322 - .long 371021313 - .long 2606681771 - .long 2672602875 - .long 1153440841 - .long 681666828 - .long 2588485140 - .long 3667250000 - .long 2323000426 - .long 796579017 - .long 4170606170 - .long 2503045697 - .long 3134166249 - .long 3700272898 - .long 3134839549 - .long 3388945252 - .long 703661802 - .long 1462722757 - .long 1341451622 - .long 2296227379 - .long 443948971 - .long 1838486354 - .long 1829780795 - .long 3113397699 - .long 3423557800 - .long 3677683794 - .long 2988390605 - .long 4220311422 - .long 2364782699 - .long 377168398 - .long 988912816 - .long 2859792771 - .long 2272449576 - .long 2425114493 - .long 3394168911 - .long 3875037301 - .long 2614813611 - .long 1136311064 - .long 3219605340 - .long 2624778863 - .long 2109052744 - .long 2469309985 - .long 1975730813 - .long 3554907757 - .long 1295201579 - .long 391105893 - .long 1554957189 - .long 2406549547 - .long 576394664 - .long 1543244524 - .long 1882413337 - .long 3257006239 - .long 1017054059 - .long 1977139902 - .long 2097363325 - .long 2203699043 - .long 1908366122 - .long 67963273 - .long 641406479 - .long 2982177629 - .long 3746196521 - .long 1016392834 - .long 2077695946 - .long 4016838075 - .long 2069372298 - .long 3280381472 - .long 2122130600 - .long 2685921991 - .long 1883255817 - .long 3264982359 - .long 4098768927 - .long 3758603957 - .long 3506210954 - .long 1836307129 - .long 2822017765 - .long 2764063917 - .long 2012804049 - .long 1836928984 - .long 1054120456 - .long 2619585574 - .long 1055724672 - .long 2194227394 - .long 2447214543 - .long 2687690031 - .long 1327427687 - .long 1655178620 - .long 3028234167 - .long 3556180690 - .long 2927424394 - .long 229520228 - .long 65594667 - .long 3227047264 - .long 1689555076 - .long 4247943379 - .long 172770419 - .long 3675678736 - .long 657796043 - .long 288113065 - .long 2256116365 - .long 2460956283 - .long 2381283399 - .long 3352776929 - .long 3687288864 - .long 3224422563 - .long 672976042 - .long 857803139 - .long 2956970725 - .long 3269238901 - .long 2326138918 - .long 3946484787 - .long 3349422960 - .long 2579382025 - .long 3310332749 - .long 822582390 - .long 2446752418 - .long 2381540812 - .long 4287345289 - .long 449373617 - .long 1629474989 - .long 2287047921 - .long 3156879118 - .long 2932312680 - .long 4059116599 - .long 3501115759 - .long 2653478600 - .long 1047527497 - .long 2387670671 - .long 2153577515 - .long 4278907533 - .long 1522300626 - .long 2248985742 - .long 2923309751 - .long 2050095503 - .long 1358740372 - .long 29884806 - .long 576 - .long 189636935 - .long 2307472755 - .long 73850715 - .long 2629855449 - .long 3883672823 - .long 618265067 - .long 3875053116 - .long 3917969758 - .long 1449807750 - .long 2492768441 - .long 781111022 - .long 3190435238 - .long 1482976409 - .long 3746699123 - .long 673296220 - .long 2543135664 - .long 1097012132 - .long 2731166546 - .long 2691838079 - .long 3591085575 - .long 4108503415 - .long 2072634685 - .long 3936623385 - .long 2185856579 - .long 1923690262 - .long 3646023575 - .long 4216469600 - .long 2465929342 - .long 431460727 - .long 596938224 - .long 2153081083 - .long 2604407262 - .long 2280668022 - .long 3134357508 - .long 2589033740 - .long 2773504679 - .long 2807242375 - .long 2817121462 - .long 2773778968 - .long 2997091783 - .long 1733040470 - .long 818736373 - .long 2513276750 - .long 3273702286 - .long 3677662487 - .long 322072717 - .long 1865747051 - .long 3233516951 - .long 2915555540 - .long 937584400 - .long 659945040 - .long 2820584615 - .long 2133192181 - .long 2691571362 - .long 4196086611 - .long 2727659532 - .long 896759672 - .long 1769906504 - .long 3035342266 - .long 2750209132 - .long 1576632880 - .long 1478621509 - .long 1238707153 - .long 3507491969 - .long 126298229 - .long 3524093915 - .long 2681332129 - .long 2656870434 - .long 2282193125 - .long 2123250942 - .long 2537777848 - .long 2313555892 - .long 2236573588 - .long 3014805274 - .long 1599407648 - .long 4251279069 - .long 1359728578 - .long 2438133930 - .long 1558056398 - .long 2562927734 - .long 3023480919 - .long 1448378982 - .long 1701562892 - .long 2340149056 - .long 1506041285 - .long 779806113 - .long 4234929211 - .long 2470659521 - .long 3801687606 - .long 3749889093 - .long 4112153792 - .long 4129315601 - .long 3087235106 - .long 3558690450 - .long 4001893244 - .long 3474539130 - .long 508945001 - .long 2957303106 - .long 3788800591 - .long 2700334225 - .long 1697795651 - .long 4047812965 - .long 4036703836 - .long 3519182687 - .long 4240516712 - .long 1475971627 - .long 1575184661 - .long 2515949915 - .long 1673437412 - .long 2377231640 - .long 3395057130 - .long 2344040799 - .long 1065264411 - .long 1317525997 - .long 664446688 - .long 3082671496 - .long 1521403251 - .long 50174553 - .long 2566979079 - .long 3666263822 - .long 3888565980 - .long 425393181 - .long 383974 - .long 2211658859 - .long 3190477332 - .long 1452652764 - .long 881590408 - .long 2658571543 - .long 2768922591 - .long 607349007 - .long 1340513656 - .long 2982866930 - .long 2042743989 - .long 2907958666 - .long 2030930082 - .long 2170145182 - .long 1493033626 - .long 3329402172 - .long 1968890141 - .long 2331822590 - .long 2408886146 - .long 1783184274 - .long 12825068 - .long 4227858976 - .long 2710581281 - .long 3153889734 - .long 3238022506 - .long 4176533952 - .long 1531340198 - .long 4025201404 - .long 2485789300 - .long 650490227 - .long 2321085797 - .long 625172 - .long 0 - .long 0 - .long 1069281709 - .long 251624587 - .long 0 - .long 0 - .long 4197074614 - .long 91585281 - .long 10 - .long 0 - .long 2135656897 - .long 267376913 - .long 1588 - .long 0 - .long 3403656332 - .long 967418652 - .long 209472 - .long 0 - .long 463318414 - .long 1993660658 - .long 23089564 - .long 0 - .long 1930917064 - .long 2053446879 - .long 2077215423 - .long 0 - .long 657157488 - .long 2477268698 - .long 3166180846 - .long 34 - .long 1532275274 - .long 3903843069 - .long 3017665745 - .long 1932 - .long 3296114418 - .long 3153699036 - .long 1621212020 - .long 80134 - .long 1258014930 - .long 2176092298 - .long 1175504463 - .long 2347208 - .long 1382073311 - .long 570037013 - .long 1129603108 - .long 44970025 - .long 2202866424 - .long 1579426883 - .long 3017508354 - .long 499448209 - .long 4088025423 - .long 891205158 - .long 1193661411 - .long 2604580528 - .long 2532457727 - .long 3946349630 - .long 1951385266 - .long 3993662730 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2589520468 - .long 104644116 - .long 0 - .long 0 - .long 3884787564 - .long 2761065855 - .long 3 - .long 0 - .long 3187602994 - .long 4135562377 - .long 626 - .long 0 - .long 1724989792 - .long 1713856870 - .long 86304 - .long 0 - .long 2484708115 - .long 4089533751 - .long 10036248 - .long 0 - .long 275209371 - .long 2697520380 - .long 952228456 - .long 0 - .long 3236472558 - .long 1226316501 - .long 3598685087 - .long 16 - .long 3284813591 - .long 1063192554 - .long 3944393543 - .long 991 - .long 1278466978 - .long 2628971736 - .long 1168074903 - .long 43599 - .long 848711725 - .long 2087159795 - .long 759297680 - .long 1353656 - .long 1425592604 - .long 1129358307 - .long 2754552431 - .long 27432831 - .long 3204498819 - .long 300826889 - .long 3605445756 - .long 320203780 - .long 1698536723 - .long 3065896691 - .long 309908814 - .long 1734061231 - .long 3912468499 - .long 396401915 - .long 3674073704 - .long 2719285114 - .long 4294967292 - .long 0 - .long 3981914375 - .long 2206547233 - .long 12816876 - .long 4227858976 - .long 4096021827 - .long 3999001670 - .long 1063371522 - .long 3989528078 - .long 874562813 - .long 2447814409 - .long 1858302676 - .long 4162682718 - .long 1605953959 - .long 1135435 - .long 0 - .long 0 - .long 2549031326 - .long 239160205 - .long 0 - .long 0 - .long 454697744 - .long 620180210 - .long 10 - .long 0 - .long 2436299213 - .long 3355768607 - .long 1582 - .long 0 - .long 351390256 - .long 799610387 - .long 208707 - .long 0 - .long 25800287 - .long 698915934 - .long 22891066 - .long 0 - .long 4130988338 - .long 676217935 - .long 2048657779 - .long 0 - .long 2657270905 - .long 3829767903 - .long 59128891 - .long 34 - .long 1037582638 - .long 2935003680 - .long 713523288 - .long 1875 - .long 901580945 - .long 1268517119 - .long 2358220346 - .long 76826 - .long 1912766477 - .long 222206216 - .long 632792841 - .long 2216812 - .long 4065471431 - .long 1410808044 - .long 2022595908 - .long 41710361 - .long 438075994 - .long 598703158 - .long 1085011105 - .long 454516776 - .long 604410846 - .long 4058435110 - .long 2236814241 - .long 2333657313 - .long 2448294355 - .long 2704068860 - .long 1114425723 - .long 3548452336 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3769919769 - .long 153956907 - .long 0 - .long 0 - .long 646070119 - .long 4028818701 - .long 6 - .long 0 - .long 2588679469 - .long 1052177761 - .long 1128 - .long 0 - .long 2209274989 - .long 523514771 - .long 155204 - .long 0 - .long 2126396778 - .long 3565792859 - .long 17775584 - .long 0 - .long 2013180833 - .long 1908602229 - .long 1662519428 - .long 0 - .long 3793993839 - .long 1441646378 - .long 3693455390 - .long 28 - .long 3379423244 - .long 3965194379 - .long 1988414356 - .long 1663 - .long 1712981619 - .long 805217952 - .long 1789525478 - .long 71195 - .long 1327601011 - .long 2853644807 - .long 2041759317 - .long 2141557 - .long 944030315 - .long 2463564559 - .long 1071870408 - .long 41839542 - .long 3377497270 - .long 1387686562 - .long 1015294515 - .long 470457582 - .long 3802633795 - .long 4019363939 - .long 1055805497 - .long 2472026772 - .long 1903142729 - .long 1756051618 - .long 411357926 - .long 3811072860 - .long 4294967291 - .long 0 - .long 2342180209 - .long 2629357739 - .long 12825068 - .long 4227858976 - .long 4176598204 - .long 2421744458 - .long 608412369 - .long 593975024 - .long 2402997778 - .long 853372562 - .long 4106233885 - .long 999432807 - .long 1956711771 - .long 1129902 - .long 0 - .long 0 - .long 3668311682 - .long 238634701 - .long 0 - .long 0 - .long 1969498866 - .long 413457374 - .long 10 - .long 0 - .long 2816017558 - .long 1616523229 - .long 1570 - .long 0 - .long 3757647515 - .long 3035182130 - .long 206269 - .long 0 - .long 2187487164 - .long 1784472528 - .long 22516356 - .long 0 - .long 559031239 - .long 1740008181 - .long 2003371129 - .long 0 - .long 661394403 - .long 1757559962 - .long 108872688 - .long 33 - .long 2108184885 - .long 2675738113 - .long 243072689 - .long 1805 - .long 1896660970 - .long 944386947 - .long 1395829566 - .long 73206 - .long 2645692570 - .long 1073605584 - .long 391090218 - .long 2088195 - .long 3576186609 - .long 249080280 - .long 1318613440 - .long 38820429 - .long 1698387538 - .long 1714182690 - .long 2486672428 - .long 418377280 - .long 786186663 - .long 550325920 - .long 34733209 - .long 2130294753 - .long 123703415 - .long 1830333669 - .long 555170427 - .long 3225161241 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 372615672 - .long 141112893 - .long 0 - .long 0 - .long 3315900643 - .long 1327290262 - .long 6 - .long 0 - .long 3811139837 - .long 3724885846 - .long 1016 - .long 0 - .long 989130504 - .long 3252199933 - .long 138436 - .long 0 - .long 1221640456 - .long 1442402103 - .long 15666709 - .long 0 - .long 4152936768 - .long 1813348380 - .long 1445091735 - .long 0 - .long 4193896088 - .long 3387134533 - .long 2948009907 - .long 24 - .long 2262704738 - .long 1989650954 - .long 3803792063 - .long 1396 - .long 2783464578 - .long 434957745 - .long 1316597970 - .long 58551 - .long 1368551733 - .long 528983851 - .long 2424303193 - .long 1721511 - .long 2488297655 - .long 3464245304 - .long 3652031881 - .long 32861225 - .long 3506409524 - .long 3965838759 - .long 4041530878 - .long 361842100 - .long 1191665382 - .long 3299555859 - .long 1239122770 - .long 1871471448 - .long 3889602930 - .long 4175372373 - .long 3489971328 - .long 2859914059 - .long 4294967291 - .long 0 - .long 4097644266 - .long 3051847358 - .long 12816876 - .long 4227858976 - .long 205941362 - .long 2843814473 - .long 1373054629 - .long 908624394 - .long 572230967 - .long 3772158671 - .long 2295107357 - .long 875890232 - .long 1676909203 - .long 1121011 - .long 0 - .long 0 - .long 3140758008 - .long 236890113 - .long 0 - .long 0 - .long 78883718 - .long 4270561461 - .long 9 - .long 0 - .long 653004353 - .long 1003106748 - .long 1549 - .long 0 - .long 1997655276 - .long 2810156938 - .long 202673 - .long 0 - .long 816790074 - .long 126500350 - .long 22018895 - .long 0 - .long 483718758 - .long 1693602023 - .long 1948244742 - .long 0 - .long 1719888843 - .long 3024114415 - .long 3912173698 - .long 31 - .long 857585795 - .long 2024050081 - .long 2152155389 - .long 1731 - .long 2161391665 - .long 4153338473 - .long 3453597175 - .long 69665 - .long 690916841 - .long 3408680089 - .long 1481878010 - .long 1970802 - .long 4244781337 - .long 1956485181 - .long 3004849658 - .long 36347304 - .long 3508046261 - .long 2375922782 - .long 3796433011 - .long 389053187 - .long 1871421647 - .long 319248902 - .long 2844007792 - .long 1971197416 - .long 814256252 - .long 534724998 - .long 4096580698 - .long 2976687819 - .long 4294967295 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1862921762 - .long 128829141 - .long 0 - .long 0 - .long 2226943868 - .long 3083060057 - .long 5 - .long 0 - .long 3790004556 - .long 3473372331 - .long 913 - .long 0 - .long 1912405170 - .long 4207391429 - .long 123223 - .long 0 - .long 2818206388 - .long 546560525 - .long 13795947 - .long 0 - .long 926024359 - .long 466562391 - .long 1257280106 - .long 0 - .long 3443963035 - .long 4102181261 - .long 824629355 - .long 21 - .long 1095781235 - .long 2590304783 - .long 3003378070 - .long 1181 - .long 3706684271 - .long 2607807817 - .long 1026954074 - .long 48765 - .long 2542600140 - .long 2410120938 - .long 1491060906 - .long 1411271 - .long 1675138874 - .long 3651173547 - .long 1198416212 - .long 26539599 - .long 842200953 - .long 401492709 - .long 2211503215 - .long 288538794 - .long 1943642431 - .long 940486719 - .long 4288006473 - .long 1478519853 - .long 2666730960 - .long 3798148012 - .long 941219805 - .long 2247821888 - .long 4294967291 - .long 0 - .long 3590128009 - .long 612654688 - .long 716769122 - .long 2 - .long 1828204245 - .long 1775926740 - .long 862431319 - .long 1672 - .long 437955120 - .long 677313132 - .long 3681074436 - .long 185717 - .long 2884200252 - .long 2090641138 - .long 3992138721 - .long 6428191 - .long 3221531446 - .long 2371910721 - .long 4237081542 - .long 91796659 - .long 3709028830 - .long 1986863955 - .long 2283696654 - .long 618613015 - .long 1322699753 - .long 485003501 - .long 4170891366 - .long 2092077992 - .long 1956040154 - .long 1117518145 - .long 962574367 - .long 3571830532 - .long 3307700780 - .long 4011234461 - .long 1774218710 - .long 2881343143 - .long 391584861 - .long 529954976 - .long 2825691418 - .long 856722023 - .long 0 - .long 0 - .long 3298396499 - .long 2495110602 - .long 2303999958 - .long 1 - .long 2542348583 - .long 3627482097 - .long 3224340298 - .long 1074 - .long 967783320 - .long 1406672934 - .long 4087851085 - .long 117404 - .long 4177416572 - .long 3106181469 - .long 261241013 - .long 4043478 - .long 202539330 - .long 3294545774 - .long 2496277142 - .long 57629426 - .long 720582238 - .long 1814713548 - .long 3091376339 - .long 388014697 - .long 146526450 - .long 4271301162 - .long 2338306966 - .long 1311627297 - .long 2070656804 - .long 1921999658 - .long 2258254113 - .long 2238807899 - .long 242296837 - .long 3253310178 - .long 207686852 - .long 1805761504 - .long 0 - .long 0 - .long 0 - .long 536870912 - .long 3 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3266800725 - .long 2413762801 - .long 3330613244 - .long 98 - .long 1201359419 - .long 2714872150 - .long 3208385380 - .long 20210 - .long 1956238602 - .long 4223228119 - .long 2784422263 - .long 1028397 - .long 3439473030 - .long 2410851869 - .long 3292470576 - .long 20253447 - .long 1686397776 - .long 592553810 - .long 969547707 - .long 185741930 - .long 3468583933 - .long 1250725515 - .long 2117116206 - .long 869064170 - .long 3909100790 - .long 1843251452 - .long 3871208694 - .long 2155104570 - .long 4148130288 - .long 2464912491 - .long 1300300682 - .long 2809133898 - .long 4014582188 - .long 344247779 - .long 2796123058 - .long 1784697576 - .long 195792426 - .long 264977488 - .long 3560329357 - .long 428361011 - .long 4294967290 - .long 0 - .long 258978617 - .long 1401350217 - .long 414758348 - .long 0 - .long 3858563520 - .long 693344438 - .long 929988021 - .long 164 - .long 3412169140 - .long 2002911005 - .long 1900957617 - .long 27838 - .long 201299732 - .long 2653786175 - .long 836100553 - .long 1342443 - .long 112595646 - .long 24843945 - .long 2773043450 - .long 25894040 - .long 839565763 - .long 2401088019 - .long 1862800896 - .long 235227666 - .long 241900887 - .long 2111181527 - .long 559246656 - .long 1095314964 - .long 1679323588 - .long 170716610 - .long 3844392689 - .long 2709031418 - .long 2888224069 - .long 91827283 - .long 2484028115 - .long 3525834755 - .long 3046356865 - .long 465368430 - .long 2789327597 - .long 2238015503 - .long 0 - .long 0 - .long 0 - .long 536870912 - .long 3 - .long 0 - .long 1629800756 - .long 211083125 - .long 74954925 - .long 0 - .long 1545370875 - .long 1864504884 - .long 4276848488 - .long 99 - .long 535444102 - .long 452832597 - .long 341934841 - .long 25395 - .long 995111971 - .long 3604718273 - .long 313159131 - .long 1483348 - .long 467529526 - .long 927033629 - .long 3631579950 - .long 30995691 - .long 2550211567 - .long 3003753623 - .long 1495846756 - .long 281435025 - .long 1095077789 - .long 2892497672 - .long 2221613791 - .long 1215372727 - .long 1191801615 - .long 1667552124 - .long 2428434537 - .long 2551716115 - .long 1201465291 - .long 1874197394 - .long 578557072 - .long 2461680298 - .long 391584923 - .long 529954976 - .long 2825691418 - .long 856722023 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 677405811 - .long 113109491 - .long 129649144 - .long 114 - .long 3825428504 - .long 3691782001 - .long 3484121609 - .long 31057 - .long 2790365057 - .long 1503600960 - .long 2128362517 - .long 1842108 - .long 1815120706 - .long 3864377339 - .long 1520525307 - .long 38689413 - .long 2352056310 - .long 3376817110 - .long 3997253088 - .long 352036787 - .long 1198120374 - .long 2050750776 - .long 3970142361 - .long 1521787235 - .long 3363842978 - .long 1133863107 - .long 832963017 - .long 3196692150 - .long 3821983599 - .long 1263968260 - .long 873004851 - .long 3084767199 - .long 0 - .long 0 - .long 0 - .long 1073741824 - .long 2 - .long 0 - .long 2651322308 - .long 3386393833 - .long 2831116449 - .long 5 - .long 4289850283 - .long 2368640529 - .long 3021143330 - .long 3284 - .long 1866387201 - .long 153493322 - .long 2018528397 - .long 295326 - .long 712913332 - .long 628654228 - .long 3881360594 - .long 8668773 - .long 2507640802 - .long 239249479 - .long 2566710297 - .long 108181087 - .long 2758175823 - .long 567857163 - .long 2134567225 - .long 650389544 - .long 3640757112 - .long 2804269303 - .long 645858985 - .long 1991928169 - .long 804414238 - .long 2280600022 - .long 3914463340 - .long 3114948090 - .long 1937917503 - .long 2252804771 - .long 1940556944 - .long 2322010631 - .long 293688586 - .long 2544949880 - .long 3193010387 - .long 642541517 - .long 4294967291 - .long 0 - .long 453133727 - .long 877370797 - .long 1558279443 - .long 6 - .long 2547899573 - .long 3360184680 - .long 1178296802 - .long 2954 - .long 1755214995 - .long 2061159704 - .long 3531983056 - .long 253712 - .long 543505238 - .long 128612626 - .long 629116815 - .long 7334610 - .long 100838038 - .long 3022980312 - .long 2298747174 - .long 90954203 - .long 3014766307 - .long 96539771 - .long 3590315363 - .long 545180116 - .long 2964798914 - .long 2705356255 - .long 3013291713 - .long 1667101568 - .long 3407956254 - .long 2146783552 - .long 2206958848 - .long 2604739160 - .long 1922050233 - .long 3165283613 - .long 2563978608 - .long 1940712607 - .long 0 - .long 0 - .long 0 - .long 536870912 - .long 3 - .long 0 - .long 2797952740 - .long 3054806814 - .long 120 - .long 0 - .long 18168 - .long 0 - .long 1890690921 - .long 3263011055 - .long 3960 - .long 0 - .long 18872 - .long 0 - .long 3238416553 - .long 3265778049 - .long 8064 - .long 0 - .long 18168 - .long 0 - .long 4097644266 - .long 3051847358 - .long 13440 - .long 0 - .long 18872 - .long 0 - .long 0 - .long 0 - .long 1313084713 - .long 2734261102 - .long 4113882560 - .long 4230436817 - .long 0 - .long 4294967295 - .long 4105493977 - .long 3790490747 - .long 2885543867 - .long 1813033052 - .long 0 - .long 0 - .type __bessel_x_table,@object - .size __bessel_x_table,19696 - .align 8 -.L_2il0floatpacket.96: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.96,@object - .size .L_2il0floatpacket.96,8 - .align 8 -.L_2il0floatpacket.97: - .long 0x5a31a4be,0x3ff71547 - .type .L_2il0floatpacket.97,@object - .size .L_2il0floatpacket.97,8 - .align 8 -.L_2il0floatpacket.98: - .long 0x9a49f2dc,0x400d3643 - .type .L_2il0floatpacket.98,@object - .size .L_2il0floatpacket.98,8 - .align 8 -.L_2il0floatpacket.99: - .long 0x00000000,0x40d00000 - .type .L_2il0floatpacket.99,@object - .size .L_2il0floatpacket.99,8 - .align 8 -.L_2il0floatpacket.100: - .long 0x00000000,0xc0d01b80 - .type .L_2il0floatpacket.100,@object - .size .L_2il0floatpacket.100,8 - .align 8 -.L_2il0floatpacket.104: - .long 0x20000000,0x405cdc55 - .type .L_2il0floatpacket.104,@object - .size .L_2il0floatpacket.104,8 - .align 8 -.L_2il0floatpacket.105: - .long 0x00000000,0x40140000 - .type .L_2il0floatpacket.105,@object - .size .L_2il0floatpacket.105,8 - .align 8 -.L_2il0floatpacket.106: - .long 0xe0000000,0x3fefffff - .type .L_2il0floatpacket.106,@object - .size .L_2il0floatpacket.106,8 - .align 8 -.L_2il0floatpacket.109: - .long 0x00000000,0x43e00000 - .type .L_2il0floatpacket.109,@object - .size .L_2il0floatpacket.109,8 - .align 8 -__bessel_error_codes: - .long 0x00000000,0x00000000 - .long 0x00000081,0x00000000 - .long 0x00000082,0x00000000 - .long 0x00000083,0x00000000 - .long 0x00000084,0x00000000 - .long 0x0000008c,0x00000000 - .long 0x00000090,0x00000000 - .long 0x0000008f,0x00000000 - .type __bessel_error_codes,@object - .size __bessel_error_codes,64 - .align 4 -.L_2il0floatpacket.101: - .long 0x410f95e2 - .type .L_2il0floatpacket.101,@object - .size .L_2il0floatpacket.101,4 - .align 4 -.L_2il0floatpacket.102: - .long 0x41a3dd91 - .type .L_2il0floatpacket.102,@object - .size .L_2il0floatpacket.102,4 - .align 4 -.L_2il0floatpacket.103: - .long 0x3fb8aa3b - .type .L_2il0floatpacket.103,@object - .size .L_2il0floatpacket.103,4 - .align 4 -.L_2il0floatpacket.107: - .long 0x5f000000 - .type .L_2il0floatpacket.107,@object - .size .L_2il0floatpacket.107,4 - .align 4 -.L_2il0floatpacket.108: - .long 0x3f800000 - .type .L_2il0floatpacket.108,@object - .size .L_2il0floatpacket.108,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_log.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_log.S deleted file mode 100644 index 52001a5598..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_log.S +++ /dev/null @@ -1,356 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_log.c" - .text -..TXTST0: -# -- Begin __dpml_ux_log_poly__ - .text - .align 16,0x90 - .globl __dpml_ux_log_poly__ -__dpml_ux_log_poly__: -# parameter 1: %rdi -# parameter 2: %rsi -..B1.1: - .cfi_startproc -..___tag_value___dpml_ux_log_poly__.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - movq %rsi, %r13 - lea 128+__log_x_table(%rip), %rsi - movl $17, %edx - movl $6, %ecx - movq %r13, %r8 -..___tag_value___dpml_ux_log_poly__.5: - call __dpml_evaluate_rational__@PLT -..___tag_value___dpml_ux_log_poly__.6: -..B1.2: - movq %r13, %rdi - lea 472+__log_x_table(%rip), %rsi - movq %r13, %rdx - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - jmp __dpml_multiply__@PLT - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_log_poly__,@function - .size __dpml_ux_log_poly__,.-__dpml_ux_log_poly__ - .data -# -- End __dpml_ux_log_poly__ - .text -# -- Begin __dpml_ux_log__ - .text - .align 16,0x90 - .globl __dpml_ux_log__ -__dpml_ux_log__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -..B2.1: - .cfi_startproc -..___tag_value___dpml_ux_log__.10: -..L11: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - subq $56, %rsp - .cfi_def_cfa_offset 96 - movq %rdi, %r13 - lea 112+__log_x_table(%rip), %r8 - movq %rdx, %r15 - movq %rsi, %r14 - lea 424+__log_x_table(%rip), %rsi - movl $6, %edx - lea (%rsp), %rcx - movl 4(%r13), %r10d - movq (%r8), %r9 - cmpq 8(%r13), %r9 - movq %fs:40, %rax - lea -1(%r10), %ebx - adcl $0, %ebx - xorq %rsp, %rax - movq %rax, 48(%rcx) - subl %ebx, %r10d - movl %r10d, 4(%r13) -..___tag_value___dpml_ux_log__.21: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_log__.22: -..B2.2: - movl $2, %edx - lea 24(%rsp), %rdi - movq %r15, %rcx - lea (%rsp), %rsi - addl %ebx, 4(%r13) -..___tag_value___dpml_ux_log__.23: - call __dpml_divide__@PLT -..___tag_value___dpml_ux_log__.24: -..B2.3: - movq %r15, %rdi - lea 128+__log_x_table(%rip), %rsi - movl $17, %edx - movl $6, %ecx - lea (%rsp), %r8 -..___tag_value___dpml_ux_log__.25: - call __dpml_evaluate_rational__@PLT -..___tag_value___dpml_ux_log__.26: -..B2.4: - movq %r15, %rdi - movl $1, %esi - movslq %ebx, %rbx - movq %rbx, 8(%r15) -..___tag_value___dpml_ux_log__.27: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_log__.28: -..B2.5: - movq %r15, %rdi - lea (%rsp), %rsi - movl $8, %edx - movq %r15, %rcx -..___tag_value___dpml_ux_log__.29: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_log__.30: -..B2.6: - testq %r14, %r14 - je ..B2.8 -..B2.7: - movq %r15, %rdi - movq %r14, %rsi - movq %r15, %rdx -..___tag_value___dpml_ux_log__.31: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_log__.32: -..B2.8: - xorl %edx, %edx - movl $1, %eax - xorl %ecx, %ecx - cmpl $-262144, 28(%rsp) - movq 48(%rsp), %rbx - cmovne %eax, %ecx - testq %r14, %r14 - cmovne %eax, %edx - xorq %rsp, %rbx - orl %edx, %ecx - cmpq %fs:40, %rbx - jne ..B2.10 -..B2.9: - movq %rcx, %rax - addq $56, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -40 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B2.10: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_log__,@function - .size __dpml_ux_log__,.-__dpml_ux_log__ - .data -# -- End __dpml_ux_log__ - .section .rodata, "a" - .align 16 - .align 16 -__log_x_table: - .long 1088750600 - .long 519758862 - .long 58 - .long 0 - .long 59 - .long 0 - .long 60 - .long 0 - .long 1088750600 - .long 519758862 - .long 61 - .long 0 - .long 62 - .long 0 - .long 63 - .long 0 - .long 1088750600 - .long 519758862 - .long 64 - .long 0 - .long 65 - .long 0 - .long 66 - .long 0 - .long 15008776 - .long 336609536 - .long 58 - .long 0 - .long 4192101508 - .long 3037000499 - .long 4243534402 - .long 1518500249 - .long 1261892956 - .long 1305769775 - .long 706307789 - .long 114052365 - .long 2125978754 - .long 1401519948 - .long 2628436525 - .long 90640697 - .long 1075745124 - .long 4046945230 - .long 850547722 - .long 100185346 - .long 3858047057 - .long 2069326047 - .long 3415016796 - .long 106820841 - .long 196219186 - .long 3461778520 - .long 1283971156 - .long 114747264 - .long 133398994 - .long 3894487089 - .long 1548005786 - .long 123926548 - .long 4002430868 - .long 3905024888 - .long 1104860464 - .long 134702783 - .long 1396868873 - .long 2152947579 - .long 2102985887 - .long 147531619 - .long 361329122 - .long 2531697111 - .long 2794113080 - .long 163061263 - .long 2117398987 - .long 2352680084 - .long 3122626672 - .long 182244941 - .long 299366278 - .long 2801833386 - .long 1248329477 - .long 206544267 - .long 99864504 - .long 1693623838 - .long 1770762254 - .long 238320308 - .long 959885721 - .long 1462617677 - .long 2483170600 - .long 281651273 - .long 2353710846 - .long 1786830293 - .long 2080549112 - .long 344240445 - .long 2781107612 - .long 1683788319 - .long 2061424959 - .long 442594858 - .long 2924123738 - .long 1498310185 - .long 3744988402 - .long 619632801 - .long 2019498699 - .long 1065527877 - .long 1946680041 - .long 1032721336 - .long 1763524233 - .long 3196583632 - .long 1545072827 - .long 3098164009 - .long 2 - .long 0 - .long 0 - .long 1 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 2 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3520035243 - .long 2977044471 - .long 66254511 - .long 3387143064 - .long 0 - .long 4294967295 - .long 4224710552 - .long 2585827972 - .long 192713080 - .long 2408143276 - .long 0 - .long 0 - .type __log_x_table,@object - .size __log_x_table,528 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_ops.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_ops.S deleted file mode 100644 index 378c5da3fc..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_ops.S +++ /dev/null @@ -1,1405 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_ops.c" - .text -..TXTST0: -# -- Begin __dpml_unpack2__ - .text - .align 16,0x90 - .globl __dpml_unpack2__ -__dpml_unpack2__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9 -# parameter 7: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value___dpml_unpack2__.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - pushq %rsi - .cfi_def_cfa_offset 64 - movq %r9, %r12 - movq %r8, %r13 - movq %rcx, %rbp - movq %rsi, %r14 - xorl %esi, %esi - movq %r13, %rcx - movq %r12, %r8 - movq 64(%rsp), %r9 - movq %rdi, %r15 -..___tag_value___dpml_unpack2__.16: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___dpml_unpack2__.17: -..B1.10: - movq %rax, %rbx -..B1.2: - testq %rbx, %rbx - jl ..B1.4 -..B1.3: - testq %r14, %r14 - jne ..B1.5 -..B1.4: - movq %rbx, %rax - popq %rcx - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.5: - movq 8(%r13), %r10 - lea (,%rbx,4), %rcx - movq %r15, %rdi - movq %r14, %rsi - sarq %cl, %r10 - movq %rbp, %rdx - andq $15, %r10 - movq %r12, %r8 - movq 64(%rsp), %r9 - lea (%r13,%r10,8), %rcx -..___tag_value___dpml_unpack2__.38: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___dpml_unpack2__.39: -..B1.6: - shlq $4, %rbx - orq %rax, %rbx - movq %rbx, %rax - popq %rcx - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __dpml_unpack2__,@function - .size __dpml_unpack2__,.-__dpml_unpack2__ - .data -# -- End __dpml_unpack2__ - .text -# -- Begin __dpml_unpack_x_or_y__ - .text - .align 16,0x90 - .globl __dpml_unpack_x_or_y__ -__dpml_unpack_x_or_y__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9 -..B2.1: - .cfi_startproc -..___tag_value___dpml_unpack_x_or_y__.54: -..L55: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $104, %rsp - .cfi_def_cfa_offset 160 - movq %rsi, %r12 - movl $1, %r10d - xorl %r13d, %r13d - testq %r12, %r12 - movq %r8, %rbp - cmovne %r10d, %r13d - movq %rdi, %r8 - movq %rcx, %rbx - testq %r13, %r13 - movq $0x8000000000000000, %r11 - movq %fs:40, %rax - jne ..L69 - movq %r8, %rsi -..L69: - xorq %rsp, %rax - movq %rax, 96(%rsp) - movq 8(%rsi), %rax - movq %rax, %r10 - andq %rax, %r11 - shlq $15, %r10 - btsq $63, %r10 - movq (%rsi), %r14 - movq %r14, %rcx - movq %rsi, 24(%r9,%r13,8) - movq %r14, %r15 - shrq $49, %rcx - shrq $32, %r11 - lea (%r10,%r10), %rsi - orq %r14, %rsi - movq $0x1000000000000, %r14 - orq %rcx, %r10 - movq $0xffff000000000000, %rcx - movl %r11d, (%rdx) - movq %rax, %r11 - shrq $48, %r11 - andq $32767, %r11 - lea (%r14,%rax), %rdi - movq %rax, %r14 - addq %rax, %rcx - addq $-16382, %r11 - shlq $15, %r15 - shrq $63, %r14 - movq %r15, 16(%rdx) - movl $4, %r15d - xorq %rcx, %rdi - jl ..B2.33 -..B2.2: - movq %r10, 8(%rdx) - movl %r11d, 4(%rdx) -..B2.3: - addq %r14, %r15 - movl $1, %r10d - movl %r15d, %ecx - shll %cl, %r10d - movq (%r9), %rdx - shlq $10, %rdx - movslq %r10d, %r10 - orq %r10, %rdx - movq %rdx, (%r9) - testq %r15, %r15 - jne ..B2.5 -..B2.4: - movl $2139095040, 28(%rsp) - movss 28(%rsp), %xmm1 - movss 28(%rsp), %xmm0 - subss %xmm0, %xmm1 - movss %xmm1, 28(%rsp) -..B2.5: - movq (%rbx), %r11 - lea (%r15,%r15,2), %rcx - addq %rcx, %rcx - movq %r11, %rdi - sarq $60, %r11 - sarq %cl, %rdi - movq %rdi, %rdx - sarq $3, %rdi - andq $7, %rdx - andq $7, %rdi - je ..B2.26 -..B2.6: - movl %r10d, %esi - andl $240, %esi - cmpq %r13, %rdx - jg ..B2.8 -..B2.7: - testq %rdx, %rdx - movl %esi, %ebx - cmove %r8, %r12 - jmp ..B2.9 -..B2.8: - andq $15, %r11 - addq %rdx, %r11 - movq -8(%rbx,%r11,8), %rdx - movl $1, %ebx - movl %edx, %ecx - movq %rdx, %r12 - shlq $4, %r12 - shll %cl, %ebx - addq __x_constants__@GOTPCREL(%rip), %r12 - andl $240, %ebx -..B2.9: - cmpq $7, %rdi - je ..B2.30 -..B2.10: - cmpq $0, 8(%r9) - je ..B2.13 -..B2.11: - orl %esi, %ebx - je ..B2.13 -..B2.12: - movl $1182793727, 24(%rsp) - movss 24(%rsp), %xmm1 - movss 24(%rsp), %xmm0 - mulss %xmm0, %xmm1 - movss %xmm1, 24(%rsp) -..B2.13: - movq 8(%r12), %rbx - cmpq $1, %rdi - je ..B2.29 -..B2.14: - cmpq $3, %rdi - je ..B2.19 -..B2.15: - cmpq $4, %rdi - jne ..B2.17 -..B2.16: - movq $0x7fffffffffffffff, %rcx - andq %rcx, %rbx - jmp ..B2.20 -..B2.17: - cmpq $5, %rdi - jne ..B2.20 -..B2.18: - movq $0x7fffffffffffffff, %rcx - andq %rbx, %rcx - movq $0x8000000000000000, %rbx - andq 8(%r8), %rbx - orq %rcx, %rbx - jmp ..B2.20 -..B2.19: - movq $0x8000000000000000, %rcx - xorq %rcx, %rbx -..B2.20: - movq %rbx, 8(%rbp) - testl $192, %r10d - movq (%r12), %rcx - movq %rcx, (%rbp) - je ..B2.24 -..B2.21: - cmpq %r13, %rdx - jg ..B2.24 -..B2.22: - cmpq $0, 8(%r9) - je ..B2.24 -..B2.23: - movl $8388608, 20(%rsp) - movss 20(%rsp), %xmm0 - cvtss2sd %xmm0, %xmm0 - mulsd .L_2il0floatpacket.7(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 20(%rsp) -..B2.24: - movq 96(%rsp), %rcx - movq $0x8000000000000000, %rdx - xorq %rsp, %rcx - orq %rdx, %r15 - cmpq %fs:40, %rcx - jne ..B2.28 -..B2.25: - movq %r15, %rax - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.26: - movq 96(%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B2.28 -..B2.27: - movq %r15, %rax - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.28: - call __stack_chk_fail@PLT -..B2.29: - movq $0x800000000000, %rcx - orq %rcx, %rbx - jmp ..B2.20 -..B2.30: - andq $-2013265921, %rdx - lea 32(%rsp), %rdi - movq (%rbp), %rcx - orq $268435456, %rdx - movq 8(%rbp), %rbx - movq %rcx, 32(%rdi) - movq %rbx, 40(%rdi) - movq %rdx, (%rdi) -..___tag_value___dpml_unpack_x_or_y__.110: - call __dpml_exception@PLT -..___tag_value___dpml_unpack_x_or_y__.111: -..B2.31: - movq (%rax), %rdx - movq %rdx, (%rbp) - movq 8(%rax), %rcx - movq %rcx, 8(%rbp) - jmp ..B2.24 -..B2.33: - xorq %rax, %rcx - jl ..B2.35 -..B2.34: - shrq $47, %rax - xorl %r15d, %r15d - andq $1, %rax - testq %rsi, %rsi - movq %r10, 8(%rdx) - movl %r11d, 4(%rdx) - movl $2, %edx - cmove %rdx, %r15 - cmovne %rax, %r14 - jmp ..B2.3 -..B2.35: - testq %rsi, %rsi - jne ..B2.37 -..B2.36: - movq %r10, 8(%rdx) - movl $8, %r15d - movl %r11d, 4(%rdx) - jmp ..B2.3 -..B2.37: - movq $0x8000000000000000, %rax - movq %rdx, %rdi - xorl %esi, %esi - addq %rax, %r10 - incl %r11d - movq %r10, 8(%rdx) - movl %r11d, 4(%rdx) - movq %r8, (%rsp) - movq %r9, 8(%rsp) -..___tag_value___dpml_unpack_x_or_y__.112: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_unpack_x_or_y__.113: -..B2.38: - movl $2048, 16(%rsp) - movl $6, %r15d - movss 16(%rsp), %xmm1 - movss 16(%rsp), %xmm0 - movq 8(%rsp), %r9 - addss %xmm0, %xmm1 - movq (%rsp), %r8 - movss %xmm1, 16(%rsp) - jmp ..B2.3 - .align 16,0x90 - .cfi_endproc - .type __dpml_unpack_x_or_y__,@function - .size __dpml_unpack_x_or_y__,.-__dpml_unpack_x_or_y__ - .data -# -- End __dpml_unpack_x_or_y__ - .text -# -- Begin __dpml_pack__ - .text - .align 16,0x90 - .globl __dpml_pack__ -__dpml_pack__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -..B3.1: - .cfi_startproc -..___tag_value___dpml_pack__.115: -..L116: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $120, %rsp - .cfi_def_cfa_offset 176 - movq %rsi, %r14 - xorl %esi, %esi - movq %r8, %r15 - movq %fs:40, %rax - movq %rcx, %r13 - xorq %rsp, %rax - movq %rdx, %r12 - movq %rax, 104(%rsp) - movq %rdi, %rbp -..___tag_value___dpml_pack__.130: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_pack__.131: -..B3.2: - movslq 4(%rbp), %rax - cmpq $-262144, %rax - je ..B3.28 -..B3.3: - movq %rax, %rdx - negq %rdx - movq %rdx, %rbx - addq $-16381, %rbx - jle ..B3.9 -..B3.4: - movl (%rbp), %r9d - lea -16381(%rax,%rdx), %rax - movq %rbp, %rsi - lea 80(%rsp), %rdi - xorl %edx, %edx - movq %rbp, %rcx - movq $0x8000000000000000, %r8 - movq %r8, 8(%rdi) - movq $0, 16(%rdi) - movl %eax, 4(%rdi) - movl %r9d, (%rdi) -..___tag_value___dpml_pack__.132: - call __dpml_addsub__@PLT -..___tag_value___dpml_pack__.133: -..B3.5: - movq $-16382, %rax - cmpq $113, %rbx - jle ..B3.9 -..B3.6: - cmpq $245763, %rbx - je ..B3.8 -..B3.7: - movq $-16383, %rax - cmpq $49155, %rbx - jle ..B3.9 -..B3.8: - decq %rax -..B3.9: - movq 16(%rbp), %r8 - xorl %edx, %edx - addq $16384, %r8 - xorl %r9d, %r9d - cmpq $16384, %r8 - lea 1(%rax), %r10 - movq 8(%rbp), %rcx - movq $0x1000000000000, %r11 - setb %dl - addq %rdx, %rcx - cmpq %rdx, %rcx - movq %rcx, %rbx - setb %r9b - shrq $15, %rcx - testl %r9d, %r9d - cmovne %r10, %rax - cmovne %r11, %rcx - shrq $15, %r8 - shlq $49, %rbx - orq %rbx, %r8 - movq %r8, (%r14) - lea 16381(%rax), %rdx - movq %rdx, %rbx - shlq $48, %rbx - addq %rcx, %rbx - movslq (%rbp), %rcx - shlq $32, %rcx - orq %rcx, %rbx - cmpq $32766, %rdx - jae ..B3.14 -..B3.10: - movq %rbx, 8(%r14) - cmpq $0, 8(%r15) - je ..B3.12 -..B3.11: - movl $1182793727, (%rsp) - movss (%rsp), %xmm1 - movss (%rsp), %xmm0 - mulss %xmm0, %xmm1 - movss %xmm1, (%rsp) -..B3.12: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B3.24 -..B3.13: - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.14: - testq %rax, %rax - cmovl %r12, %r13 - addq $16382, %rax - testl %eax, %eax - jg ..B3.20 -..B3.15: - jl ..B3.26 -..B3.16: - movq %rbx, 8(%r14) - cmpq $0, 8(%r15) - jne ..B3.19 -..B3.17: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B3.24 -..B3.18: - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.19: - movq $0x8000000000000000, %rax - orq %rax, %r13 - jmp ..B3.21 -..B3.20: - movq %rbx, 8(%r14) -..B3.21: - andq $-2013265921, %r13 - lea 16(%rsp), %rdi - movq (%r14), %rax - orq $268435456, %r13 - movq 8(%r14), %rdx - movq %rax, 32(%rdi) - movq %rdx, 40(%rdi) - movq %r13, (%rdi) -..___tag_value___dpml_pack__.174: - call __dpml_exception@PLT -..___tag_value___dpml_pack__.175: -..B3.33: - movq %rax, %rdx -..B3.22: - movq (%rdx), %rax - movq %rax, (%r14) - movq 8(%rdx), %rdx - movq %rdx, 8(%r14) - movq 104(%rsp), %rcx - xorq %rsp, %rcx - cmpq %fs:40, %rcx - jne ..B3.24 -..B3.23: - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.24: - call __stack_chk_fail@PLT -..B3.26: - movq %rcx, 8(%r14) - jmp ..B3.21 -..B3.28: - movslq (%rbp), %rax - shlq $32, %rax - movq $0, (%r14) - movq %rax, 8(%r14) - movq 104(%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B3.24 - jmp ..B3.13 - .align 16,0x90 - .cfi_endproc - .type __dpml_pack__,@function - .size __dpml_pack__,.-__dpml_pack__ - .data -# -- End __dpml_pack__ - .text -# -- Begin __dpml_evaluate_packed_poly__ - .text - .align 16,0x90 - .globl __dpml_evaluate_packed_poly__ -__dpml_evaluate_packed_poly__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9 -..B4.1: - .cfi_startproc -..___tag_value___dpml_evaluate_packed_poly__.197: -..L198: - - subq $104, %rsp - .cfi_def_cfa_offset 112 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 88(%rsp) - movq %rcx, %rax - movq 8(%rdx), %r11 - notq %rax - movq (%rdx), %r10 - movq %r11, 8(%r9) - movq %r10, %r11 - andq %rax, %r11 - movq %r11, 16(%r9) - movq %r10, %r11 - shrq $1, %r10 - andq $1, %r11 - andq %rcx, %r10 - shlq $31, %r11 - subq %r8, %r10 - movl %r11d, (%r9) - decq %rsi - movl %r10d, 4(%r9) - js ..B4.8 -..B4.2: - xorl %r10d, %r10d - movl %r10d, 68(%rsp) - movl %r10d, 64(%rsp) - movq %rdi, 56(%rsp) - movq %rcx, 48(%rsp) - movq %r12, 40(%rsp) - .cfi_offset 12, -72 - movq %r9, %r12 - movq %r13, 32(%rsp) - .cfi_offset 13, -80 - movq %rax, %r13 - movq %r14, 24(%rsp) - .cfi_offset 14, -88 - movq %r8, %r14 - movq %r15, 16(%rsp) - .cfi_offset 15, -96 - movq %rdx, %r15 - movq %rbx, 8(%rsp) - movq %rbp, (%rsp) - .cfi_offset 3, -104 - .cfi_offset 6, -112 - movq %rsi, %rbp -..B4.3: - movq %r12, %rsi - movq %r12, %rdx - movq 56(%rsp), %rdi -..___tag_value___dpml_evaluate_packed_poly__.206: - call __dpml_multiply__@PLT -..___tag_value___dpml_evaluate_packed_poly__.207: -..B4.4: - movq %r12, %rdi - xorl %esi, %esi -..___tag_value___dpml_evaluate_packed_poly__.208: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_evaluate_packed_poly__.209: -..B4.5: - addq $16, %r15 - movq %r13, %r10 - movq %r12, %rdi - lea 64(%rsp), %rsi - movq %r12, %rcx - movq 8(%r15), %rbx - movq %rbx, 8(%rsi) - movq (%r15), %rbx - andq %rbx, %r10 - movq %rbx, %rdx - shrq $1, %rbx - andq $1, %rdx - andq -16(%rsi), %rbx - subq %r14, %rbx - movq %r10, 16(%rsi) -..___tag_value___dpml_evaluate_packed_poly__.210: - call __dpml_addsub__@PLT -..___tag_value___dpml_evaluate_packed_poly__.211: -..B4.6: - addl %ebx, 4(%r12) - decq %rbp - jns ..B4.3 -..B4.7: - movq 40(%rsp), %r12 - .cfi_restore 12 - movq 32(%rsp), %r13 - .cfi_restore 13 - movq 24(%rsp), %r14 - .cfi_restore 14 - movq 16(%rsp), %r15 - .cfi_restore 15 - movq 8(%rsp), %rbx - .cfi_restore 3 - movq (%rsp), %rbp - .cfi_restore 6 -..B4.8: - movq 88(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B4.10 -..B4.9: - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B4.10: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __dpml_evaluate_packed_poly__,@function - .size __dpml_evaluate_packed_poly__,.-__dpml_evaluate_packed_poly__ - .data -# -- End __dpml_evaluate_packed_poly__ - .text -# -- Begin __dpml_addsub__ - .text - .align 16,0x90 - .globl __dpml_addsub__ -__dpml_addsub__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -..B5.1: - .cfi_startproc -..___tag_value___dpml_addsub__.221: -..L222: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - pushq %rbp - .cfi_def_cfa_offset 40 - .cfi_offset 6, -40 - subq $40, %rsp - .cfi_def_cfa_offset 80 - movq %rdi, %r9 - movq %rdx, %r15 - movq %rsi, %rax - movq %r15, %rbx - movq %rcx, %r8 - movq %r15, %rcx - xorl %ebp, %ebp - movl (%r9), %edx - andq $4, %rcx - movslq %edx, %rdi - movslq (%rax), %r11 - cmovne %ebp, %edx - shlq $31, %rbx - xorq %rbx, %rdi - xorq %r11, %rdi - testq %rcx, %rcx - movl 4(%r9), %esi - cmovne %rbx, %rdi - movslq %esi, %rbx - sarq $31, %rdi - movq %rbx, %rcx - movq %fs:40, %r10 - andq $1, %rdi - xorq %rsp, %r10 - movq %r10, 32(%rsp) - movslq 4(%rax), %r10 - subq %r10, %rcx - jge ..B5.3 -..B5.2: - negq %rcx - movq %r9, %rbp - addq %rcx, %rbx - movq %rax, %r9 - movl %ebx, %esi - movq %rdi, %rbx - shlq $31, %rbx - movq %rbp, %rax - movslq %edx, %rdx - movl $-2147483648, %ebp - xorq %rbx, %rdx -..B5.3: - movq 16(%rax), %rbx - movl $2, %r11d - movq 8(%rax), %rax -..B5.4: - movq %rcx, %r10 - negq %r10 - addq $64, %r10 - testq %r10, %r10 - jg ..B5.11 -..B5.5: - movq %r10, %rcx - movq %rax, %rbx - negq %rcx - xorl %eax, %eax - decq %r11 - jne ..B5.4 -..B5.6: - movq 8(%r9), %rcx - testq $2, %r15 - movq %rcx, 8(%r8) - movl 4(%r9), %eax - movq 16(%r9), %rbx - movl %eax, 4(%r8) - movq %rbx, 16(%r8) - movl %edx, (%r8) - je ..B5.8 -..B5.7: - movq 8(%r9), %rcx - xorl %ebp, %edx - movq %rcx, 32(%r8) - movl 4(%r9), %eax - movq 16(%r9), %rbx - movl %eax, 28(%r8) - movq %rbx, 40(%r8) - movl %edx, 24(%r8) -..B5.8: - movq 32(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B5.10 -..B5.9: - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B5.10: - call __stack_chk_fail@PLT -..B5.11: - testq %rcx, %rcx - je ..B5.13 -..B5.12: - movl %ecx, %r11d - movl %r11d, %ecx - shrq %cl, %rbx - movl %r10d, %ecx - movq %rax, %r10 - shlq %cl, %r10 - movl %r11d, %ecx - shrq %cl, %rax - orq %r10, %rbx -..B5.13: - movq %r8, %r14 - movq %r12, 8(%rsp) - .cfi_offset 12, -72 - movq %rdi, %r12 - movq %r13, (%rsp) - .cfi_offset 13, -80 - movq %r9, %r13 - jmp ..B5.14 -..B5.22: - negq %r12 - xorq $2, %r15 - movl 4(%r13), %esi - incq %r12 - addq $24, %r14 - xorl %ebp, %edx -..B5.14: - movq 16(%r13), %r11 - testq %r12, %r12 - movq 8(%r13), %rdi - jne ..B5.17 -..B5.15: - xorl %ecx, %ecx - lea (%r11,%rbx), %r10 - cmpq %r11, %r10 - movl %ecx, %r11d - setb %r11b - xorl %r9d, %r9d - andq $15, %r15 - movl %r11d, %r8d - lea (%rax,%r8), %r11 - cmpq %r8, %r11 - setb %r9b - addq %rdi, %r11 - cmpq %rdi, %r11 - setb %cl - addl %ecx, %r9d - je ..B5.19 -..B5.16: - movq %r11, %rcx - incl %esi - shrq $1, %r10 - shlq $63, %rcx - shrq $1, %r11 - orq %rcx, %r10 - btsq $63, %r11 - jmp ..B5.19 -..B5.17: - xorl %ecx, %ecx - xorl %r10d, %r10d - cmpq %r11, %rbx - seta %r10b - xorl %r9d, %r9d - addq $-8, %r15 - movl %r10d, %r8d - movq %r11, %r10 - subq %rbx, %r10 - lea (%rax,%r8), %r11 - cmpq %r8, %r11 - setb %r9b - negq %r11 - addq %rdi, %r11 - cmpq %r11, %rdi - setb %cl - addl %ecx, %r9d - je ..B5.19 -..B5.18: - movq $-1, %rcx - xorl %edi, %edi - negq %r10 - movslq %edx, %rdx - cmovne %rcx, %rdi - btcq $31, %rdx - negq %r11 - movl $-2147483648, %ebp - addq %rdi, %r11 -..B5.19: - movq %r11, 8(%r14) - testq $16, %r15 - movq %r10, 16(%r14) - movl %esi, 4(%r14) - movl %edx, (%r14) - je ..B5.21 -..B5.20: - movq %r14, %rdi - xorl %esi, %esi - movl %edx, 16(%rsp) - movq %rax, 24(%rsp) -..___tag_value___dpml_addsub__.248: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_addsub__.249: -..B5.28: - movq 24(%rsp), %rax - movl 16(%rsp), %edx -..B5.21: - testq $2, %r15 - jne ..B5.22 -..B5.23: - movq 32(%rsp), %rax - xorq %rsp, %rax - movq 8(%rsp), %r12 - .cfi_restore 12 - movq (%rsp), %r13 - .cfi_restore 13 - cmpq %fs:40, %rax - jne ..B5.10 - jmp ..B5.9 - .align 16,0x90 - .cfi_endproc - .type __dpml_addsub__,@function - .size __dpml_addsub__,.-__dpml_addsub__ - .data -# -- End __dpml_addsub__ - .text -# -- Begin __dpml_ffs_and_shift__ - .text - .align 16,0x90 - .globl __dpml_ffs_and_shift__ -__dpml_ffs_and_shift__: -# parameter 1: %rdi -# parameter 2: %rsi -..B6.1: - .cfi_startproc -..___tag_value___dpml_ffs_and_shift__.253: -..L254: - - pushq %rsi - .cfi_def_cfa_offset 16 - movq %rdi, %r9 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, (%rsp) - testq %rsi, %rsi - movq 8(%r9), %r8 - jne ..B6.4 -..B6.2: - movslq 4(%r9), %rdi - testq %r8, %r8 - jl ..B6.12 -..B6.3: - movq 16(%r9), %rsi - jmp ..B6.7 -..B6.4: - xorl %ecx, %ecx - movl $64, %edi - cmpq $1, %rsi - jne ..B6.6 -..B6.5: - movq %r8, %rdx - movl $-2147483648, %eax - negq %rdx - testq %r8, %r8 - cmovl %eax, %ecx - cmovl %rdx, %r8 -..B6.6: - movq %r8, 8(%r9) - xorl %esi, %esi - movq $0, 16(%r9) - movl %ecx, (%r9) -..B6.7: - movl $2, %edx - xorl %eax, %eax -..B6.8: - testq %r8, %r8 - jne ..B6.16 -..B6.9: - addq $64, %rax - movq %rsi, %r8 - xorl %esi, %esi - decq %rdx - jne ..B6.8 -..B6.10: - movl $-262144, 4(%r9) - movq (%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B6.14 -..B6.11: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 -..B6.12: - movq (%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B6.14 -..B6.13: - xorl %eax, %eax - popq %rcx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 -..B6.14: - call __stack_chk_fail@PLT -..B6.16: - jl ..B6.21 -..B6.17: - movq %r8, %rcx - shrq $58, %rcx - andq $30, %rcx - je ..B6.19 -..B6.18: - movl $21932, %edx - shrl %cl, %edx - andl $3, %edx - incq %rdx - jmp ..B6.20 -..B6.19: - movq %r8, %rdx - pxor %xmm0, %xmm0 - andq $-256, %rdx - cmove %r8, %rdx - cvtsi2sdq %rdx, %xmm0 - testq %rdx, %rdx - jge ..B6.26 -..B6.27: - movq %rdx, %rcx - pxor %xmm0, %xmm0 - shrq $1, %rdx - andq $1, %rcx - orq %rdx, %rcx - cvtsi2sdq %rcx, %xmm0 - addsd %xmm0, %xmm0 -..B6.26: - movd %xmm0, %rdx - sarq $52, %rdx - negq %rdx - addq $1086, %rdx -..B6.20: - movl %edx, %ecx - movq %rsi, %r10 - shlq %cl, %r8 - movq %rdx, %rcx - negq %rcx - addq %rdx, %rax - shrq %cl, %r10 - movl %edx, %ecx - orq %r10, %r8 - shlq %cl, %rsi -..B6.21: - subq %rax, %rdi - movq %r8, 8(%r9) - movq %rsi, 16(%r9) - movl %edi, 4(%r9) - movq (%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B6.14 - jmp ..B6.11 - .align 16,0x90 - .cfi_endproc - .type __dpml_ffs_and_shift__,@function - .size __dpml_ffs_and_shift__,.-__dpml_ffs_and_shift__ - .data -# -- End __dpml_ffs_and_shift__ - .section .rodata, "a" - .align 16 - .align 16 - .globl __x_constants__ -__x_constants__: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1073610752 - .long 0 - .long 0 - .long 0 - .long 1073676288 - .long 0 - .long 0 - .long 0 - .long 1073741824 - .long 3306619320 - .long 2221509004 - .long 3041149649 - .long 1073648159 - .long 3306619320 - .long 2221509004 - .long 3041149649 - .long 1073779231 - .long 2479964490 - .long 592389929 - .long 3354604061 - .long 1073753495 - .long 3306619320 - .long 2221509004 - .long 3041149649 - .long 1073713695 - .long 0 - .long 0 - .long 0 - .long 1074030592 - .long 0 - .long 0 - .long 0 - .long 1074096128 - .long 0 - .long 0 - .long 0 - .long 1074138624 - .long 0 - .long 0 - .long 0 - .long 1074161664 - .long 0 - .long 0 - .long 0 - .long 2147418112 - .type __x_constants__,@object - .size __x_constants__,208 - .align 8 -.L_2il0floatpacket.7: - .long 0x00000000,0x3e600000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_ops_64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_ops_64.S deleted file mode 100644 index 60b2b7994d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_ops_64.S +++ /dev/null @@ -1,1964 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_ops_64.c" - .text -..TXTST0: -# -- Begin __dpml_extended_multiply__ - .text - .align 16,0x90 - .globl __dpml_extended_multiply__ -__dpml_extended_multiply__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -..B1.1: - .cfi_startproc -..___tag_value___dpml_extended_multiply__.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - movq %rdi, %r15 - movq 16(%rsi), %r14 - movq %r14, %r10 - movl %r14d, %r9d - movq %rcx, %r8 - movq %r9, %r13 - movq 16(%r15), %rax - movq %rax, %rbp - movl %eax, %ebx - movq %rax, %rdi - shrq $32, %rbp - imulq %rbx, %r13 - imulq %r14, %rdi - movq %r9, -8(%rsp) - imulq %rbp, %r9 - shrq $32, %r13 - shrq $32, %r10 - addq %r9, %r13 - movq %rbx, %r9 - imulq %r10, %r9 - addq %r13, %r9 - movq %r9, %rcx - cmpq %r13, %r9 - movq %rbp, %r9 - movl $0, %r13d - movq 8(%r15), %r12 - setb %r13b - imulq %r10, %r9 - imulq %r12, %r14 - movq 8(%rsi), %r11 - imulq %r11, %rax - shrq $32, %rcx - shlq $32, %r13 - addq %r13, %rcx - addq %r9, %rcx - movl (%r15), %r9d - addq %r14, %rcx - movq %rdi, 16(%r8) - xorl (%rsi), %r9d - cmpq %r14, %rcx - movl 4(%rsi), %esi - movq %r12, %r14 - movl 4(%r15), %edi - movl %r9d, (%rdx) - movl %r9d, (%r8) - movl $0, %r9d - setb %r9b - addq %rax, %rcx - movq %rcx, 8(%r8) - cmpq %rax, %rcx - movl %r11d, %ecx - lea (%rdi,%rsi), %r13d - movl %r13d, 4(%rdx) - lea -128(%rdi,%rsi), %r15d - movl %r15d, 4(%r8) - movq %rcx, %r15 - movq %rcx, %r13 - movl $0, %eax - setb %al - imulq %rbx, %r15 - imulq %r11, %r14 - imulq %rbp, %r13 - shrq $32, %r11 - imulq %r11, %rbx - imulq %r11, %rbp - shrq $32, %r15 - addq %r13, %r15 - addq %r15, %rbx - cmpq %r15, %rbx - movq %rbx, %r8 - movl $0, %ebx - setb %bl - shrq $32, %r8 - shlq $32, %rbx - addq %rbx, %r8 - addq %rbp, %r8 - movq -8(%rsp), %rbp - movq %rbp, %rdi - movl %r12d, %r15d - shrq $32, %r12 - movq %r15, %rsi - imulq %r15, %rdi - imulq %r12, %rbp - imulq %r10, %rsi - imulq %r12, %r10 - addq %rax, %r9 - xorl %eax, %eax - shrq $32, %rdi - addq %r14, %r9 - addq %rbp, %rdi - cmpq %r14, %r9 - movl $0, %r14d - setb %r14b - addq %rdi, %rsi - cmpq %rdi, %rsi - movq %rsi, %r13 - setb %al - addq %r8, %r9 - shrq $32, %r13 - shlq $32, %rax - addq %rax, %r13 - movq %rcx, %rax - imulq %r15, %rax - imulq %r12, %rcx - imulq %r11, %r15 - imulq %r11, %r12 - shrq $32, %rax - addq %r10, %r13 - addq %rcx, %rax - xorl %r10d, %r10d - cmpq %r8, %r9 - setb %r10b - xorl %r11d, %r11d - addq %rax, %r15 - cmpq %rax, %r15 - movq %r15, %rcx - movl $0, %r15d - setb %r15b - addq %r13, %r9 - cmpq %r13, %r9 - setb %r11b - shrq $32, %rcx - addq %r10, %r14 - shlq $32, %r15 - addq %r15, %rcx - addq %r12, %rcx - addq %r11, %r14 - addq %r14, %rcx - movq %r9, 16(%rdx) - movq %rcx, 8(%rdx) - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __dpml_extended_multiply__,@function - .size __dpml_extended_multiply__,.-__dpml_extended_multiply__ - .data -# -- End __dpml_extended_multiply__ - .text -# -- Begin __dpml_evaluate_rational__ - .text - .align 16,0x90 - .globl __dpml_evaluate_rational__ -__dpml_evaluate_rational__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -..B2.1: - .cfi_startproc -..___tag_value___dpml_evaluate_rational__.28: -..L29: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $88, %rsp - .cfi_def_cfa_offset 144 - movq %rdi, %r13 - movq %rcx, %rbx - movq %r8, %r14 - movq %rbx, %r9 - movq %rsi, %r15 - movq %rdx, 32(%rsp) - movq %rbx, %rbp - sarq $58, %r9 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 72(%rsp) - addl %r9d, 4(%r13) - testq $68, %rbx - jne ..B2.3 -..B2.2: - movl $136, %eax - xorl %ebp, %ebp - cmpl $0, (%r13) - movq %r13, %r12 - cmovne %rax, %rbp - xorq %rbx, %rbp - jmp ..B2.4 -..B2.3: - movq %r13, %rdi - lea 48(%rsp), %r12 - movq %r13, %rsi - movq %r12, %rdx -..___tag_value___dpml_evaluate_rational__.43: - call __dpml_multiply__@PLT -..___tag_value___dpml_evaluate_rational__.44: -..B2.4: - movq %r12, %rdi - xorl %esi, %esi -..___tag_value___dpml_evaluate_rational__.45: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_evaluate_rational__.46: -..B2.5: - movq 32(%rsp), %r9 - movq %r9, %r8 - negq %r8 - movslq 4(%r12), %rax - imulq %rax, %r8 - shlq $4, %r9 - movq %r8, 24(%rsp) - testq $512, %rbx - movq %r9, 40(%rsp) - je ..B2.7 -..B2.6: - testq $1024, %rbx - je ..B2.8 -..B2.7: - xorl %eax, %eax - jmp ..B2.9 -..B2.8: - movl $1, %eax -..B2.9: - testq $15, %rbx - lea (%rax,%rax,2), %rax - lea (,%rax,8), %r9 - lea (%r14,%rax,8), %r8 - je ..B2.16 -..B2.10: - testq $8, %rbp - lea __eval_neg_poly(%rip), %r11 - lea __eval_pos_poly(%rip), %r10 - movq %rbx, %rax - cmovne %r11, %r10 - negq %r9 - andq $240, %rax - cmove %r14, %r8 - addq %r14, %r9 - addq $24, %r9 - cmpq %r11, %r10 - jne ..B2.12 -..B2.11: - movq %r12, %rdi - movq %r15, %rdx - movq 24(%rsp), %rsi - movq 32(%rsp), %rcx - movq %r8, (%rsp) - movq %rax, 8(%rsp) - movq %r9, 16(%rsp) -..___tag_value___dpml_evaluate_rational__.47: - call __eval_neg_poly -..___tag_value___dpml_evaluate_rational__.48: - jmp ..B2.36 -..B2.12: - movq %r12, %rdi - movq %r15, %rdx - movq 24(%rsp), %rsi - movq 32(%rsp), %rcx - movq %r8, (%rsp) - movq %rax, 8(%rsp) - movq %r9, 16(%rsp) -..___tag_value___dpml_evaluate_rational__.49: - call __eval_pos_poly -..___tag_value___dpml_evaluate_rational__.50: -..B2.36: - movq 16(%rsp), %r9 - movq 8(%rsp), %rax - movq (%rsp), %r8 -..B2.13: - testq $2, %rbx - je ..B2.15 -..B2.14: - movq %r13, %rdi - movq %r8, %rsi - movq %r8, %rdx - movq %r8, (%rsp) - movq %rax, 8(%rsp) - movq %r9, 16(%rsp) -..___tag_value___dpml_evaluate_rational__.51: - call __dpml_multiply__@PLT -..___tag_value___dpml_evaluate_rational__.52: -..B2.35: - movq 16(%rsp), %r9 - movq 8(%rsp), %rax - movq (%rsp), %r8 -..B2.15: - movq 40(%rsp), %r10 - lea 24(%r15,%r10), %r15 - movl -8(%r15), %r11d - addl %r11d, 4(%r8) - jmp ..B2.17 -..B2.16: - movq 40(%rsp), %r10 - orq $256, %rbx - testq $1024, %rbx - movq %rbx, %rax - movq %r14, %r9 - lea 24(%r15,%r10), %r11 - cmovne %r11, %r15 - andq $240, %rax -..B2.17: - testq %rax, %rax - je ..B2.26 -..B2.18: - testq $128, %rbp - lea __eval_neg_poly(%rip), %rbp - lea __eval_pos_poly(%rip), %rax - cmovne %rbp, %rax - cmpq %rbp, %rax - jne ..B2.20 -..B2.19: - movq %r12, %rdi - movq %r15, %rdx - movq %r9, %r8 - movq 24(%rsp), %rsi - movq 32(%rsp), %rcx - movq %r9, 16(%rsp) -..___tag_value___dpml_evaluate_rational__.53: - call __eval_neg_poly -..___tag_value___dpml_evaluate_rational__.54: - jmp ..B2.39 -..B2.20: - movq %r12, %rdi - movq %r15, %rdx - movq %r9, %r8 - movq 24(%rsp), %rsi - movq 32(%rsp), %rcx - movq %r9, 16(%rsp) -..___tag_value___dpml_evaluate_rational__.55: - call __eval_pos_poly -..___tag_value___dpml_evaluate_rational__.56: -..B2.39: - movq 16(%rsp), %r9 -..B2.21: - testq $32, %rbx - je ..B2.23 -..B2.22: - movq %r13, %rdi - movq %r9, %rsi - movq %r9, %rdx - movq %r9, 16(%rsp) -..___tag_value___dpml_evaluate_rational__.57: - call __dpml_multiply__@PLT -..___tag_value___dpml_evaluate_rational__.58: -..B2.38: - movq 16(%rsp), %r9 -..B2.23: - movq 40(%rsp), %rax - movl 16(%rax,%r15), %ebp - addl %ebp, 4(%r9) - testq $1024, %rbx - je ..B2.27 -..B2.24: - movq 72(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.31 -..B2.25: - addq $88, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.26: - orq $256, %rbx -..B2.27: - testq $256, %rbx - jne ..B2.29 -..B2.28: - movq %r14, %rdi - lea 24(%r14), %rsi - movl $2, %edx - movq %r14, %rcx -..___tag_value___dpml_evaluate_rational__.79: - call __dpml_divide__@PLT -..___tag_value___dpml_evaluate_rational__.80: -..B2.29: - movq 72(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.31 -..B2.30: - addq $88, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.31: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __dpml_evaluate_rational__,@function - .size __dpml_evaluate_rational__,.-__dpml_evaluate_rational__ - .data -# -- End __dpml_evaluate_rational__ - .text -# -- Begin __eval_neg_poly - .text - .align 16,0x90 -__eval_neg_poly: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -..B3.1: - .cfi_startproc -..___tag_value___eval_neg_poly.102: -..L103: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - movq %rsi, %r12 - xorl %r10d, %r10d - cmpq $128, %r12 - movq %rcx, %rax - movl $1, %ecx - movslq 4(%rdi), %r11 - movq %rdx, %r13 - movq 8(%rdi), %r14 - movq 16(%rdi), %rdx - movq %r11, %rdi - cmovl %ecx, %r10d - xorl %ebx, %ebx - negq %rdi - xorl %r9d, %r9d - testl %r10d, %r10d - jne ..B3.5 -..B3.3: - addq %r11, %r12 - addq $16, %r13 - decq %rax - cmpq $128, %r12 - jge ..B3.3 -..B3.5: - xorl %ebp, %ebp - cmpq $64, %r12 - cmovge %ebp, %ecx - testl %ecx, %ecx - jne ..B3.12 -..B3.7: - movl %r12d, %ecx - decq %rax - addq %r11, %r12 - movq 8(%r13), %r9 - addq $16, %r13 - shrq %cl, %r9 - cmpq $64, %r12 - jl ..B3.12 -..B3.8: - testq %r9, %r9 - je ..B3.7 -..B3.9: - movq %r14, %rbp - xorl %r15d, %r15d - movl %r14d, %esi - shrq $32, %rbp - movq %r8, -72(%rsp) -..B3.10: - movl %r9d, %r10d - movq %rsi, %r8 - imulq %r10, %r8 - imulq %rbp, %r10 - shrq $32, %r9 - movq %rsi, %rcx - imulq %r9, %rcx - imulq %rbp, %r9 - shrq $32, %r8 - decq %rax - addq %r10, %r8 - addq %r8, %rcx - cmpq %r8, %rcx - movl %r15d, %r8d - movq %rcx, %r10 - movl %r12d, %ecx - setb %r8b - addq %r11, %r12 - shrq $32, %r10 - shlq $32, %r8 - addq %r8, %r10 - addq %r9, %r10 - movq 8(%r13), %r9 - addq $16, %r13 - shrq %cl, %r9 - subq %r10, %r9 - cmpq $64, %r12 - jge ..B3.10 -..B3.11: - movq -72(%rsp), %r8 -..B3.12: - movq %r12, %r10 - negq %r10 - testq %r12, %r12 - je ..B3.19 -..B3.13: - movq %r14, %rsi - movl %r14d, %ebp - shrq $32, %rsi - movq %r14, -16(%rsp) - xorl %r14d, %r14d - movq %r8, -72(%rsp) -..B3.14: - movl %r9d, %ebx - movq %rbp, %rcx - imulq %rbx, %rcx - imulq %rsi, %rbx - shrq $32, %r9 - movq %rbp, %r15 - imulq %r9, %r15 - imulq %rsi, %r9 - shrq $32, %rcx - decq %rax - addq %rbx, %rcx - movl %r14d, %ebx - addq %rcx, %r15 - cmpq %rcx, %r15 - movq %r15, %r8 - movl %r12d, %ecx - setb %bl - shrq $32, %r8 - shlq $32, %rbx - addq %rbx, %r8 - movq 8(%r13), %rbx - addq %r9, %r8 - movq (%r13), %r15 - movq %rbx, %r9 - shrq %cl, %r15 - movl %r10d, %ecx - shlq %cl, %r9 - movl %r12d, %ecx - orq %r9, %r15 - addq %rdi, %r10 - movq %r15, %r9 - addq $16, %r13 - subq %r8, %r9 - movl %r14d, %r8d - cmpq %r15, %r9 - seta %r8b - shrq %cl, %rbx - subq %r8, %rbx - addq %r11, %r12 - je ..B3.24 -..B3.15: - testq %rbx, %rbx - je ..B3.14 -..B3.16: - movq %rdx, %rcx - movl %edx, %r15d - shrq $32, %rcx - movq %rdx, -8(%rsp) - movq %rcx, -48(%rsp) - movq %r15, -40(%rsp) - movq %rsi, -32(%rsp) - movq %rdi, -56(%rsp) - movq %r11, -64(%rsp) -..B3.17: - movl %r12d, %ecx - decq %rax - movq 8(%r13), %r14 - movq %r14, %r11 - movq (%r13), %rdx - addq $16, %r13 - shrq %cl, %rdx - movl %r10d, %ecx - shlq %cl, %r11 - movl %r12d, %ecx - orq %r11, %rdx - movq -40(%rsp), %r11 - movq %r11, %r8 - movl %ebx, %esi - movq -48(%rsp), %r15 - shrq %cl, %r14 - movq %r15, %rcx - imulq %rsi, %r8 - imulq %rsi, %rcx - shrq $32, %r8 - movq -16(%rsp), %rdi - addq %rcx, %r8 - imulq %rbx, %rdi - shrq $32, %rbx - movq %r11, %rcx - imulq %rbx, %rcx - imulq %rbx, %r15 - addq %r8, %rcx - negq %rdi - cmpq %r8, %rcx - movl $0, %r8d - movq %rcx, %r11 - movl %r8d, %ecx - setb %cl - addq %rdx, %rdi - cmpq %rdx, %rdi - movq %rax, -24(%rsp) - movl %r8d, %edx - movl %r9d, %eax - seta %dl - shrq $32, %r11 - shlq $32, %rcx - addq %rcx, %r11 - addq %r15, %r11 - movq %rbp, %r15 - imulq %rax, %r15 - movq -32(%rsp), %rcx - negq %r11 - imulq %rcx, %rax - shrq $32, %r15 - addq %rdi, %r11 - shrq $32, %r9 - addq %rax, %r15 - movq %rbp, %rax - imulq %r9, %rax - imulq %rcx, %r9 - addq %r15, %rax - cmpq %r15, %rax - movl %r8d, %r15d - setb %r15b - subq %rdx, %r14 - movq %rax, %rdx - shrq $32, %rdx - shlq $32, %r15 - addq %r15, %rdx - xorl %r15d, %r15d - addq %r9, %rdx - xorl %r9d, %r9d - cmpq %rdi, %r11 - movq %rbp, %rdi - seta %r9b - imulq %rsi, %rdi - imulq %rcx, %rsi - shrq $32, %rdi - addq %rsi, %rdi - movq %rbp, %rsi - imulq %rbx, %rsi - imulq %rcx, %rbx - addq %rdi, %rsi - subq %r9, %r14 - movq %r11, %r9 - cmpq %rdi, %rsi - movq %rsi, %rax - setb %r15b - subq %rdx, %r9 - cmpq %r11, %r9 - seta %r8b - shrq $32, %rax - shlq $32, %r15 - addq %r15, %rax - subq %r8, %r14 - addq %rbx, %rax - movq %r14, %rbx - addq -56(%rsp), %r10 - subq %rax, %rbx - movq -24(%rsp), %rax - addq -64(%rsp), %r12 - jne ..B3.17 -..B3.18: - movq -8(%rsp), %rdx - movq -16(%rsp), %r14 - movq -72(%rsp), %r8 -..B3.19: - testq %rax, %rax - js ..B3.23 -..B3.20: - movl %edx, %r12d - movq %r14, %r10 - shrq $32, %rdx - movl %r14d, %r11d - shrq $32, %r10 - movq %rdx, -8(%rsp) - movq %r14, -16(%rsp) - movq %r8, -72(%rsp) -..B3.21: - movl %ebx, %ecx - movq %r12, %r8 - movq -8(%rsp), %r15 - movq %r15, %rdi - imulq %rcx, %r8 - imulq %rcx, %rdi - movq -16(%rsp), %rdx - movq %r12, %rbp - imulq %rbx, %rdx - shrq $32, %rbx - negq %rdx - imulq %rbx, %rbp - imulq %rbx, %r15 - shrq $32, %r8 - addq %rdi, %r8 - addq %r8, %rbp - movq %rbp, %rdi - cmpq %r8, %rbp - movl $0, %ebp - movl %ebp, %r8d - setb %r8b - movq (%r13), %r14 - addq %r14, %rdx - shrq $32, %rdi - shlq $32, %r8 - addq %r8, %rdi - xorl %r8d, %r8d - cmpq %r14, %rdx - movq %r11, %r14 - seta %r8b - addq %r15, %rdi - movl %r9d, %r15d - negq %rdi - addq %rdx, %rdi - imulq %r15, %r14 - imulq %r10, %r15 - movq 8(%r13), %rsi - addq $16, %r13 - shrq $32, %r9 - subq %r8, %rsi - movq %r11, %r8 - imulq %r9, %r8 - imulq %r10, %r9 - shrq $32, %r14 - addq %r15, %r14 - addq %r14, %r8 - cmpq %r14, %r8 - movl %ebp, %r14d - movq %r8, %r15 - setb %r14b - shrq $32, %r15 - shlq $32, %r14 - addq %r14, %r15 - xorl %r14d, %r14d - addq %r9, %r15 - xorl %r9d, %r9d - cmpq %rdx, %rdi - movq %r11, %rdx - seta %r9b - imulq %rcx, %rdx - imulq %r10, %rcx - shrq $32, %rdx - addq %rcx, %rdx - movq %r11, %rcx - imulq %rbx, %rcx - imulq %r10, %rbx - addq %rdx, %rcx - subq %r9, %rsi - movq %rdi, %r9 - cmpq %rdx, %rcx - movq %rcx, %r8 - setb %r14b - subq %r15, %r9 - cmpq %rdi, %r9 - seta %bpl - shrq $32, %r8 - shlq $32, %r14 - addq %r14, %r8 - subq %rbp, %rsi - addq %rbx, %r8 - movq %rsi, %rbx - subq %r8, %rbx - decq %rax - jns ..B3.21 -..B3.22: - movq -72(%rsp), %r8 -..B3.23: - xorl %eax, %eax - movq %rbx, 8(%r8) - movq %r9, 16(%r8) - movl %eax, 4(%r8) - movl %eax, (%r8) - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 56 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.24: - movq -16(%rsp), %r14 - movq -72(%rsp), %r8 - jmp ..B3.19 - .align 16,0x90 - .cfi_endproc - .type __eval_neg_poly,@function - .size __eval_neg_poly,.-__eval_neg_poly - .data -# -- End __eval_neg_poly - .text -# -- Begin __dpml_divide__ - .text - .align 16,0x90 - .globl __dpml_divide__ -__dpml_divide__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -..B4.1: - .cfi_startproc -..___tag_value___dpml_divide__.136: -..L137: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $56, %rsp - .cfi_def_cfa_offset 112 - movq %rsi, %rbp - testq %rbp, %rbp - lea __ux_one__(%rip), %r8 - movq %rdi, %rbx - movq %rcx, %r15 - jne ..L151 - movq %r8, %rbp -..L151: - testq %rbx, %rbx - movq %rdx, %r12 - movq %fs:40, %rax - jne ..L152 - movq %r8, %rbx -..L152: - xorq %rsp, %rax - movq %rax, 48(%rsp) - cmpq %r8, %rbp - movq 8(%rbp), %r13 - movq 16(%rbp), %r14 - je ..B4.12 -..B4.2: - testq %r13, %r13 - jl ..B4.5 -..B4.3: - movq %rbp, %rdi - xorl %esi, %esi -..___tag_value___dpml_divide__.153: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_divide__.154: -..B4.4: - movq 8(%rbp), %r13 - movq 16(%rbp), %r14 -..B4.5: - lea 16(%rsp), %rdi -..___tag_value___dpml_divide__.155: - call fegetenv@PLT -..___tag_value___dpml_divide__.156: -..B4.6: - movq %r13, %rcx - pxor %xmm0, %xmm0 - shrq $1, %rcx - movq $0x3fffffffff, %rax - cvtsi2sdq %rcx, %xmm0 - movsd .L_2il0floatpacket.0(%rip), %xmm3 - movq %r13, %r9 - divsd %xmm0, %xmm3 - andq %rax, %r9 - movq %r14, %r8 - shlq $15, %r9 - movq $0xffffffc000000000, %rdx - shrq $49, %r8 - movq %r13, %rsi - movl (%rbx), %r10d - orq %r8, %r9 - movl 4(%rbx), %r8d - andq %rdx, %rsi - xorl (%rbp), %r10d - pxor %xmm1, %xmm1 - subl 4(%rbp), %r8d - pxor %xmm2, %xmm2 - cvttsd2si %xmm3, %rbp - cvtsi2sdq %r9, %xmm2 - shrq $1, %rsi - addq $-1280, %rbp - cvtsi2sdq %rsi, %xmm1 - movq 8(%rbx), %rsi - pxor %xmm7, %xmm7 - movq 16(%rbx), %rcx - movq $0xfffffff000000000, %rbx - andq %rbx, %rbp - andq %rsi, %rax - cvtsi2sdq %rbp, %xmm7 - movsd .L_2il0floatpacket.1(%rip), %xmm5 - movq %rcx, %r11 - mulsd %xmm5, %xmm2 - pxor %xmm6, %xmm6 - mulsd %xmm7, %xmm1 - mulsd %xmm7, %xmm2 - movsd .L_2il0floatpacket.0(%rip), %xmm0 - movq %rsi, %rdi - shlq $15, %rax - andq %rsi, %rdx - shrq $49, %r11 - pxor %xmm8, %xmm8 - orq %r11, %rax - pxor %xmm9, %xmm9 - cvtsi2sdq %rax, %xmm6 - subsd %xmm1, %xmm0 - mulsd %xmm6, %xmm5 - subsd %xmm2, %xmm0 - movsd .L_2il0floatpacket.2(%rip), %xmm4 - mulsd %xmm3, %xmm4 - shrq $11, %rdi - shlq $10, %rdi - shrq $1, %rdx - cvtsi2sdq %rdi, %xmm8 - cvtsi2sdq %rdx, %xmm9 - mulsd %xmm4, %xmm0 - movsd .L_2il0floatpacket.3(%rip), %xmm10 - xorl %edi, %edi - mulsd %xmm7, %xmm10 - mulsd %xmm0, %xmm8 - mulsd %xmm10, %xmm9 - mulsd %xmm5, %xmm10 - mulsd .L_2il0floatpacket.4(%rip), %xmm9 - addsd %xmm8, %xmm10 - cvttsd2si %xmm9, %rdx - cvttsd2si %xmm10, %rbx - movq %rdx, %rax - lea (%rbx,%rdx,4), %rdx - cmpq %rbx, %rdx - movl %r10d, (%r15) - setb %dil - xorl %ebx, %ebx - shrq $62, %rax - addq %rdi, %rax - cmpq $1, %r12 - je ..B4.8 -..B4.7: - movsd .L_2il0floatpacket.5(%rip), %xmm1 - movq %r14, %r9 - mulsd %xmm0, %xmm1 - xorl %r11d, %r11d - movq %r15, (%rsp) - movq %rax, %r12 - cvttsd2si %xmm1, %r15 - movl %edx, %ebx - lea (%r15,%rbp,4), %r15 - testq %r15, %r15 - movq %rbx, %rdi - movl %r8d, 8(%rsp) - movq $-1, %r8 - movl %r14d, %ebp - cmove %r8, %r15 - shrq $32, %r9 - movq %rdx, %r8 - imulq %rbp, %rdi - movq %rbx, %r10 - negq %r12 - shrq $32, %r8 - andq %r12, %r14 - imulq %r9, %r10 - imulq %r8, %rbp - imulq %r8, %r9 - shrq $32, %rdi - andq %r13, %r12 - addq %r10, %rdi - addq %rdi, %rbp - cmpq %rdi, %rbp - movq %rbp, %r10 - movl %r13d, %ebp - movq %rbx, %rdi - setb %r11b - shrq $32, %r10 - shlq $32, %r11 - addq %r11, %r10 - movq %r13, %r11 - addq %r9, %r10 - movq %r13, %r9 - shrq $32, %r9 - addq %r10, %r14 - imulq %rbp, %rdi - imulq %r9, %rbx - imulq %r8, %rbp - imulq %rdx, %r11 - imulq %r8, %r9 - shrq $32, %rdi - xorl %r8d, %r8d - addq %rbx, %rdi - addq %rdi, %rbp - cmpq %rdi, %rbp - movq %rbp, %rbx - movl $0, %ebp - setb %bpl - cmpq %r10, %r14 - setb %r8b - xorl %r10d, %r10d - addq %r11, %r14 - shrq $32, %rbx - shlq $32, %rbp - addq %rbp, %rbx - xorl %ebp, %ebp - addq %r9, %rbx - xorl %r9d, %r9d - cmpq %r11, %r14 - setb %r9b - xorl %r11d, %r11d - addq %rbx, %r12 - cmpq %rbx, %r12 - setb %r11b - xorl %ebx, %ebx - addq %r9, %r8 - addq %r8, %r12 - xorl %r9d, %r9d - cmpq %r8, %r12 - setb %bl - cmpq %r14, %rcx - setb %r10b - addq %rbx, %r11 - xorl %ebx, %ebx - cmpq %r12, %rsi - setb %bl - negq %r12 - addq %rsi, %r12 - negq %r11 - cmpq %r10, %r12 - setb %bpl - subq %rbx, %r11 - movl $1, %ebx - cmpq %r12, %r10 - movl $0, %r12d - cmovne %ebx, %r12d - subq %rbp, %r11 - orq %r11, %r12 - cmove %r13, %r11 - negq %r14 - addq %rcx, %r14 - xorq %r11, %r13 - subq %r13, %r14 - movl %r15d, %r13d - movl %r14d, %edi - movq %r13, %r8 - shrq $32, %r14 - imulq %rdi, %r8 - imulq %r14, %r13 - shrq $32, %r15 - imulq %r15, %rdi - imulq %r15, %r14 - shrq $32, %r8 - addq %r13, %r8 - addq %r8, %rdi - cmpq %r8, %rdi - movq %rdi, %r13 - movl 8(%rsp), %r8d - setb %r9b - orq %rcx, %rsi - movl $0, %ecx - cmove %ecx, %ebx - xorl %esi, %esi - shrq $32, %r13 - shlq $32, %r9 - addq %r9, %r13 - addq %r14, %r13 - movq %r13, %r14 - shrq $63, %r14 - addq %r14, %r12 - addq %r12, %rdx - cmpq %r12, %rdx - setb %sil - sarq $63, %r12 - addq %r12, %rax - movq (%rsp), %r15 - lea (%rbx,%r13,2), %rbx - addq %rsi, %rax -..B4.8: - movq %rax, %rsi - movl %eax, %ecx - movq %rdx, %rbp - andq %rax, %rdx - shrq %cl, %rbp - movl %eax, %ecx - shlq $63, %rsi - lea 16(%rsp), %rdi - shlq $63, %rdx - orq %rbp, %rsi - shrq %cl, %rbx - movslq %r8d, %r8 - orq %rbx, %rdx - addq %rax, %r8 - movq %rsi, 8(%r15) - movq %rdx, 16(%r15) - movl %r8d, 4(%r15) -..___tag_value___dpml_divide__.157: - call fesetenv@PLT -..___tag_value___dpml_divide__.158: -..B4.9: - movq 48(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B4.11 -..B4.10: - addq $56, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B4.11: - call __stack_chk_fail@PLT -..B4.12: - movq 8(%rbx), %rcx - movq %rcx, 8(%r15) - movl (%rbx), %eax - movl 4(%rbx), %edx - movq 16(%rbx), %rbx - movl %eax, (%r15) - movl %edx, 4(%r15) - movq %rbx, 16(%r15) - movq 48(%rsp), %rbp - xorq %rsp, %rbp - cmpq %fs:40, %rbp - jne ..B4.11 - jmp ..B4.10 - .align 16,0x90 - .cfi_endproc - .type __dpml_divide__,@function - .size __dpml_divide__,.-__dpml_divide__ - .data -# -- End __dpml_divide__ - .text -# -- Begin __dpml_multiply__ - .text - .align 16,0x90 - .globl __dpml_multiply__ -__dpml_multiply__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -..B5.1: - .cfi_startproc -..___tag_value___dpml_multiply__.180: -..L181: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - movq %rdi, %r15 - movq 8(%rsi), %r9 - movq %rdx, %r11 - movl %r9d, %ecx - movq %rcx, %r13 - movq %rcx, %rax - movq 16(%r15), %rdi - movl %edi, %r14d - movq 8(%r15), %r8 - movq %r8, %r10 - shrq $32, %rdi - imulq %r14, %r13 - imulq %r9, %r10 - imulq %rdi, %rax - shrq $32, %r9 - imulq %r9, %r14 - imulq %r9, %rdi - shrq $32, %r13 - addq %rax, %r13 - addq %r13, %r14 - cmpq %r13, %r14 - movq %r14, %rax - movl $0, %r14d - setb %r14b - shrq $32, %rax - shlq $32, %r14 - addq %r14, %rax - addq %rdi, %rax - movl (%r15), %edi - addq %rax, %r10 - movq 16(%rsi), %rdx - xorl (%rsi), %edi - movl 4(%r15), %r15d - movl %edx, %r13d - movl %edi, (%r11) - movq %r13, %rdi - addl 4(%rsi), %r15d - movl %r8d, %esi - shrq $32, %r8 - movq %rsi, %r14 - imulq %rsi, %rdi - imulq %r8, %r13 - shrq $32, %rdx - imulq %rdx, %r14 - imulq %r8, %rdx - shrq $32, %rdi - addq %r13, %rdi - xorl %r13d, %r13d - addq %rdi, %r14 - cmpq %rdi, %r14 - movl %r15d, 4(%r11) - movq %r14, %r15 - setb %r13b - xorl %r14d, %r14d - cmpq %rax, %r10 - setb %r14b - shrq $32, %r15 - shlq $32, %r13 - addq %r13, %r15 - addq %rdx, %r15 - movq %rcx, %rdx - imulq %rsi, %rdx - imulq %r8, %rcx - imulq %r9, %rsi - imulq %r9, %r8 - shrq $32, %rdx - addq %r15, %r10 - addq %rcx, %rdx - xorl %ecx, %ecx - addq %rdx, %rsi - cmpq %rdx, %rsi - movq %rsi, %r13 - setb %cl - shrq $32, %r13 - shlq $32, %rcx - addq %rcx, %r13 - addq %r8, %r13 - xorl %r8d, %r8d - cmpq %r15, %r10 - setb %r8b - addq %r14, %r8 - addq %r8, %r13 - movq %r10, 16(%r11) - movq %r13, 8(%r11) - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __dpml_multiply__,@function - .size __dpml_multiply__,.-__dpml_multiply__ - .data -# -- End __dpml_multiply__ - .text -# -- Begin __eval_pos_poly - .text - .align 16,0x90 -__eval_pos_poly: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -..B6.1: - .cfi_startproc -..___tag_value___eval_pos_poly.195: -..L196: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - movq %rsi, %r11 - movq 16(%rdi), %r9 - cmpq $128, %r11 - movq %r9, -32(%rsp) - movl $0, %r9d - movq %rcx, %rax - movl $1, %ecx - movslq 4(%rdi), %rbp - cmovl %ecx, %r9d - xorl %ebx, %ebx - xorl %esi, %esi - movq %rbp, -64(%rsp) - negq %rbp - movq 8(%rdi), %r10 - testl %r9d, %r9d - jne ..B6.5 -..B6.2: - movq -64(%rsp), %rdi -..B6.3: - addq %rdi, %r11 - addq $16, %rdx - decq %rax - cmpq $128, %r11 - jge ..B6.3 -..B6.5: - xorl %edi, %edi - cmpq $64, %r11 - cmovge %edi, %ecx - testl %ecx, %ecx - jne ..B6.12 -..B6.6: - movq -64(%rsp), %rdi -..B6.7: - movl %r11d, %ecx - decq %rax - addq %rdi, %r11 - movq 8(%rdx), %rsi - addq $16, %rdx - shrq %cl, %rsi - cmpq $64, %r11 - jl ..B6.12 -..B6.8: - testq %rsi, %rsi - je ..B6.7 -..B6.9: - movq %r10, %r9 - xorl %r12d, %r12d - movl %r10d, %ebx - shrq $32, %r9 - movq -64(%rsp), %r13 -..B6.10: - movl %esi, %edi - movq %rbx, %r15 - imulq %rdi, %r15 - imulq %r9, %rdi - shrq $32, %rsi - movq %rbx, %r14 - imulq %rsi, %r14 - imulq %r9, %rsi - shrq $32, %r15 - movl %r12d, %ecx - addq %rdi, %r15 - decq %rax - addq %r15, %r14 - cmpq %r15, %r14 - movq %r14, %rdi - setb %cl - shrq $32, %rdi - shlq $32, %rcx - addq %rcx, %rdi - movl %r11d, %ecx - addq %rsi, %rdi - addq %r13, %r11 - movq 8(%rdx), %rsi - addq $16, %rdx - shrq %cl, %rsi - addq %rdi, %rsi - cmpq $64, %r11 - jge ..B6.10 -..B6.11: - xorl %ebx, %ebx - cmpq %rdi, %rsi - setb %bl -..B6.12: - movq %r11, %r9 - xorl %edi, %edi - negq %r9 - testq %r11, %r11 - je ..B6.38 -..B6.13: - testq %rbx, %rbx - jne ..B6.18 -..B6.14: - movq %r10, %rbx - xorl %r13d, %r13d - movq %r8, -56(%rsp) - movl %r10d, %r15d - shrq $32, %rbx - movq %r10, -40(%rsp) - movq -64(%rsp), %r8 -..B6.15: - movl %esi, %r12d - movq %r15, %r14 - imulq %r12, %r14 - imulq %rbx, %r12 - shrq $32, %rsi - movq %r15, %rcx - imulq %rsi, %rcx - imulq %rbx, %rsi - shrq $32, %r14 - decq %rax - addq %r12, %r14 - movl %r13d, %r12d - addq %r14, %rcx - cmpq %r14, %rcx - movq %rcx, %r10 - movl %r11d, %ecx - setb %r12b - shrq $32, %r10 - shlq $32, %r12 - addq %r12, %r10 - movq 8(%rdx), %r12 - addq %rsi, %r10 - movq (%rdx), %rsi - movq %r12, %r14 - shrq %cl, %rsi - movl %r9d, %ecx - shlq %cl, %r14 - movl %r11d, %ecx - orq %r14, %rsi - addq %rbp, %r9 - addq %r10, %rsi - addq $16, %rdx - cmpq %r10, %rsi - movl %r13d, %r10d - setb %r10b - shrq %cl, %r12 - addq %r10, %r12 - addq %r8, %r11 - je ..B6.32 -..B6.16: - testq %r12, %r12 - je ..B6.15 -..B6.17: - movq -40(%rsp), %r10 - movq %r12, %rbx - movq -56(%rsp), %r8 -..B6.18: - testq %rax, %rax - jge ..B6.33 -..B6.19: - movq %rbx, 8(%r8) - movq %rsi, 16(%r8) - movl %edi, 4(%r8) - movl $0, (%r8) - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 56 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B6.38: - movl %edi, -48(%rsp) - movq %r10, -40(%rsp) - movq %r8, -56(%rsp) -..B6.21: - testq %rax, %rax - jl ..B6.30 -..B6.22: - movl %ebx, %edi - decq %rax - movq -32(%rsp), %rcx - movq %rdi, %r15 - movl %ecx, %r13d - movq %rdi, %r11 - movq -40(%rsp), %rbp - movq %rbp, %r9 - shrq $32, %rcx - imulq %r13, %r15 - imulq %rbx, %r9 - imulq %rcx, %r11 - shrq $32, %rbx - movq %r13, -24(%rsp) - imulq %rbx, %r13 - shrq $32, %r15 - addq %r11, %r15 - xorl %r11d, %r11d - addq %r15, %r13 - xorl %r14d, %r14d - movq %r13, %r8 - cmpq %r15, %r13 - movq %rcx, %r13 - setb %r14b - imulq %rbx, %r13 - shrq $32, %r8 - shlq $32, %r14 - movq (%rdx), %r12 - addq %r14, %r8 - movq %rax, -16(%rsp) - addq %r9, %r12 - movl %esi, %eax - addq %r13, %r8 - xorl %r13d, %r13d - cmpq %r9, %r12 - movq %rax, %r14 - movl %ebp, %r9d - setb %r13b - addq %r8, %r12 - shrq $32, %rbp - imulq %r9, %r14 - imulq %rbp, %rax - shrq $32, %r14 - shrq $32, %rsi - addq %rax, %r14 - movq %r9, %rax - imulq %rsi, %rax - imulq %rbp, %rsi - addq %r14, %rax - cmpq %r14, %rax - movl %r11d, %r14d - movq %rax, %r15 - setb %r14b - shrq $32, %r15 - shlq $32, %r14 - addq %r14, %r15 - xorl %r14d, %r14d - addq %rsi, %r15 - xorl %esi, %esi - cmpq %r8, %r12 - movq %rdi, %r8 - setb %sil - imulq %r9, %r8 - imulq %rbp, %rdi - shrq $32, %r8 - addq %rdi, %r8 - movq %r9, %rdi - imulq %rbx, %rdi - imulq %rbp, %rbx - addq %r8, %rdi - cmpq %r8, %rdi - movq %rdi, %rax - setb %r14b - xorl %edi, %edi - shrq $32, %rax - addq %rsi, %r13 - shlq $32, %r14 - lea (%r12,%r15), %rsi - addq %r14, %rax - addq %rbx, %rax - xorl %ebx, %ebx - cmpq %r15, %rsi - setb %bl - addq %r13, %rbx - movq 8(%rdx), %r10 - addq $16, %rdx - addq %rbx, %r10 - cmpq %rbx, %r10 - setb %dil - lea (%r10,%rax), %rbx - cmpq %rax, %rbx - movq -16(%rsp), %rax - setb %r11b - addl %r11d, %edi - je ..B6.21 -..B6.23: - movq %rbx, %rdi - movl $1, %r11d - shrq $1, %rsi - shlq $63, %rdi - shrq $1, %rbx - orq %rdi, %rsi - incl -48(%rsp) - btsq $63, %rbx - testq %rax, %rax - js ..B6.30 -..B6.39: - movq %rcx, -72(%rsp) -..B6.26: - movl %r11d, %ecx - decq %rax - movq (%rdx), %r15 - shrq %cl, %r15 - movq %r11, %rcx - negq %rcx - movq 8(%rdx), %r12 - movq %r12, %r13 - movq -72(%rsp), %r10 - movq %r10, %r8 - shlq %cl, %r13 - addq $16, %rdx - movl %r11d, %ecx - orq %r13, %r15 - shrq %cl, %r12 - movq -24(%rsp), %rcx - movq %rcx, %r14 - movl %ebx, %r13d - imulq %r13, %r14 - imulq %r13, %r8 - movq -40(%rsp), %rdi - imulq %rbx, %rdi - shrq $32, %rbx - addq %rdi, %r15 - imulq %rbx, %rcx - imulq %rbx, %r10 - shrq $32, %r14 - addq %r8, %r14 - addq %r14, %rcx - cmpq %r14, %rcx - movl $0, %r14d - movq %rcx, %r8 - movl %r14d, %ecx - setb %cl - shrq $32, %r8 - shlq $32, %rcx - addq %rcx, %r8 - movq %rax, -16(%rsp) - addq %r10, %r8 - movl %esi, %eax - xorl %r10d, %r10d - cmpq %rdi, %r15 - movq %r9, %rdi - setb %r10b - addq %r8, %r15 - imulq %rax, %rdi - imulq %rbp, %rax - shrq $32, %rdi - shrq $32, %rsi - addq %rax, %rdi - movq %r9, %rax - imulq %rsi, %rax - imulq %rbp, %rsi - addq %rdi, %rax - cmpq %rdi, %rax - movl %r14d, %edi - movq %rax, %rcx - setb %dil - shrq $32, %rcx - shlq $32, %rdi - addq %rdi, %rcx - movq %r9, %rdi - imulq %r13, %rdi - imulq %rbp, %r13 - shrq $32, %rdi - addq %rsi, %rcx - addq %r13, %rdi - movq %r9, %r13 - imulq %rbx, %r13 - imulq %rbp, %rbx - xorl %esi, %esi - cmpq %r8, %r15 - setb %sil - xorl %r8d, %r8d - addq %rdi, %r13 - cmpq %rdi, %r13 - movq %r13, %rax - setb %r8b - shrq $32, %rax - addq %rsi, %r10 - shlq $32, %r8 - lea (%r15,%rcx), %rsi - addq %r8, %rax - xorl %r15d, %r15d - addq %rbx, %rax - xorl %ebx, %ebx - cmpq %rcx, %rsi - setb %bl - addq %r10, %rbx - addq %rbx, %r12 - cmpq %rbx, %r12 - setb %r15b - addq -64(%rsp), %r11 - lea (%r12,%rax), %rbx - cmpq %rax, %rbx - movq -16(%rsp), %rax - setb %r14b - addl %r14d, %r15d - je ..B6.28 -..B6.27: - movq %rbx, %rcx - incq %r11 - shrq $1, %rsi - shlq $63, %rcx - shrq $1, %rbx - orq %rcx, %rsi - incl -48(%rsp) - btsq $63, %rbx -..B6.28: - testq %r11, %r11 - je ..B6.21 -..B6.29: - testq %rax, %rax - jns ..B6.26 -..B6.30: - movl -48(%rsp), %edi - movq -56(%rsp), %r8 - jmp ..B6.19 -..B6.32: - movq -40(%rsp), %r10 - movq %r12, %rbx - movq -56(%rsp), %r8 - jmp ..B6.38 -..B6.33: - movq -32(%rsp), %rcx - movq %r10, %rbp - movl %ecx, %r15d - movl %r10d, %r9d - shrq $32, %rbp - shrq $32, %rcx - movq %r15, -24(%rsp) - movl %edi, -48(%rsp) - movq %r10, -40(%rsp) - movq %r8, -56(%rsp) - jmp ..B6.39 - .align 16,0x90 - .cfi_endproc - .type __eval_pos_poly,@function - .size __eval_pos_poly,.-__eval_pos_poly - .data -# -- End __eval_pos_poly - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x47b00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3ef00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x34700000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x3c300000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x00000000,0x3fd00000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x00000000,0x43d00000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -__ux_one__: - .long 0 - .long 1 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .type __ux_one__,@object - .size __ux_one__,24 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_sqrt.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_sqrt.S deleted file mode 100644 index 7ad9063da0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_sqrt.S +++ /dev/null @@ -1,686 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_sqrt.c" - .text -..TXTST0: -# -- Begin __dpml_ux_sqrt_evaluation__ - .text - .align 16,0x90 - .globl __dpml_ux_sqrt_evaluation__ -__dpml_ux_sqrt_evaluation__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -..B1.1: - .cfi_startproc -..___tag_value___dpml_ux_sqrt_evaluation__.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $104, %rsp - .cfi_def_cfa_offset 160 - movq %rdi, %rbx - movq %fs:40, %rax - lea (%rsp), %rdi - xorq %rsp, %rax - movq %rdx, %r12 - movq %rax, 88(%rdi) - movq %rsi, %rbp -..___tag_value___dpml_ux_sqrt_evaluation__.16: - call fegetenv@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.17: -..B1.2: - movq 8(%rbx), %r8 - movq %r8, %r10 - shrq $11, %r10 - movq $0x3fd0000000000000, %r9 - movl 4(%rbx), %eax - addq %r9, %r10 - movl %eax, %r9d - movq %r8, %r13 - andl $1, %r9d - movq %r8, %r15 - addl %r9d, %eax - pxor %xmm2, %xmm2 - shrq $56, %r8 - pxor %xmm4, %xmm4 - movq %r10, 80(%rsp) - pxor %xmm7, %xmm7 - movq __sqrt_t_table@GOTPCREL(%rip), %r10 - lea 40(%r9), %r14d - shll $7, %r9d - movl %r14d, %ecx - xorq %r9, %r8 - negl %ecx - shlq $4, %r8 - pxor %xmm6, %xmm6 - shlq %cl, %r13 - movl %r14d, %ecx - movsd 80(%rsp), %xmm1 - lea 56(%rsp), %rdx - movq 16(%rbx), %r11 - movaps %xmm1, %xmm0 - cvtss2sd 4(%r10,%r8), %xmm2 - cvtss2sd (%r10,%r8), %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm2 - mulsd %xmm0, %xmm4 - addsd 8(%r10,%r8), %xmm2 - shrq %cl, %r11 - movl %r14d, %ecx - shrq %cl, %r15 - orq %r11, %r13 - shrq $11, %r13 - lea 128+__sqrt_x_table(%rip), %r11 - cvtsi2sdq %r15, %xmm7 - cvtsi2sdq %r13, %xmm6 - addsd %xmm2, %xmm4 - mulsd (%r11), %xmm7 - lea 136+__sqrt_x_table(%rip), %r13 - lea 96+__sqrt_x_table(%rip), %r8 - movaps %xmm7, %xmm8 - lea 152+__sqrt_x_table(%rip), %r15 - lea 104+__sqrt_x_table(%rip), %r14 - lea 32(%rsp), %rdi - movsd .L_2il0floatpacket.21(%rip), %xmm12 - movq %rbx, %rsi - mulsd (%r13), %xmm6 - mulsd (%r8), %xmm4 - addsd %xmm6, %xmm8 - movaps %xmm8, %xmm3 - lea 144+__sqrt_x_table(%rip), %r8 - mulsd %xmm4, %xmm3 - cvtsd2ss %xmm4, %xmm4 - cvtsd2ss %xmm3, %xmm3 - cvtss2sd %xmm4, %xmm4 - cvtss2sd %xmm3, %xmm3 - mulsd %xmm4, %xmm7 - mulsd %xmm4, %xmm6 - subsd %xmm3, %xmm7 - movsd (%r15), %xmm10 - movaps %xmm4, %xmm9 - mulsd %xmm8, %xmm10 - movaps %xmm3, %xmm5 - addsd %xmm6, %xmm7 - mulsd %xmm4, %xmm9 - mulsd %xmm4, %xmm5 - mulsd %xmm4, %xmm7 - mulsd %xmm9, %xmm10 - movsd (%r14), %xmm11 - movsd (%r8), %xmm15 - lea 112+__sqrt_x_table(%rip), %r8 - sarl $1, %eax - subsd %xmm5, %xmm11 - subsd %xmm10, %xmm15 - subsd %xmm7, %xmm11 - mulsd %xmm4, %xmm15 - movsd (%r8), %xmm13 - lea 120+__sqrt_x_table(%rip), %r8 - mulsd %xmm4, %xmm13 - negl %eax - mulsd %xmm11, %xmm15 - comisd %xmm12, %xmm13 - mulsd (%r8), %xmm15 - movaps %xmm13, %xmm14 - cvttsd2si %xmm15, %r9 - subsd %xmm12, %xmm14 - jae ..L18 - movaps %xmm13, %xmm14 -..L18: - cvttsd2si %xmm14, %r10 - movq %r9, %r8 - incl %eax - shlq $39, %r10 - sarq $12, %r8 - sarq $11, %r9 - addq %r8, %r10 - andq $1, %r9 - movq $0x4000000000000000, %r8 - addq %r9, %r10 - andq %r10, %r8 - testq %r10, %r10 - movl $0, -24(%rdx) - movl %eax, -20(%rdx) - movq $0, -8(%rdx) - lea -1(,%r8,2), %r8 - cmovns %r8, %r10 - movq %r10, -16(%rdx) -..___tag_value___dpml_ux_sqrt_evaluation__.19: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.20: -..B1.3: - movq %r12, %rdx - lea 32(%rsp), %rdi - lea 56(%rsp), %rsi -..___tag_value___dpml_ux_sqrt_evaluation__.21: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.22: -..B1.4: - lea 160+__sqrt_x_table(%rip), %rdi - movq %r12, %rsi - movl $9, %edx - movq %r12, %rcx -..___tag_value___dpml_ux_sqrt_evaluation__.23: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.24: -..B1.5: - testq $1, %rbp - lea 32(%rsp), %rsi - movq %r12, %rdi - lea 56(%rsp), %rax - cmovne %rax, %rsi - movq %r12, %rdx -..___tag_value___dpml_ux_sqrt_evaluation__.25: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.26: -..B1.6: - decl 4(%r12) - lea (%rsp), %rdi -..___tag_value___dpml_ux_sqrt_evaluation__.27: - call fesetenv@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.28: -..B1.7: - xorl %r15d, %r15d - testq $2, %rbp - jne ..B1.11 -..B1.8: - movq 88(%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B1.10 -..B1.9: - movq %r15, %rax - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.10: - call __stack_chk_fail@PLT -..B1.11: - movq %r12, %rdi - xorl %esi, %esi -..___tag_value___dpml_ux_sqrt_evaluation__.49: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.50: -..B1.12: - movq 16(%r12), %r14 - lea 8(%r14), %r8 - testq $16368, %r8 - jne ..B1.8 -..B1.13: - andq $-32768, %r14 - movq %r12, %rdi - movq %r12, %rsi - lea 56(%rsp), %rdx - lea 32(%rsp), %rcx - lea 16384(%r14), %r13 - movq %r13, 16(%r12) -..___tag_value___dpml_ux_sqrt_evaluation__.51: - call __dpml_extended_multiply__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.52: -..B1.14: - movq %rbx, %rdi - lea 56(%rsp), %rsi - movl $1, %edx - movq %rsi, %rcx -..___tag_value___dpml_ux_sqrt_evaluation__.53: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.54: -..B1.15: - movl $1, %edx - lea 56(%rsp), %rdi - movq %rdi, %rcx - lea 32(%rsp), %rsi -..___tag_value___dpml_ux_sqrt_evaluation__.55: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.56: -..B1.16: - movl 56(%rsp), %r8d - testl %r8d, %r8d - cmove %r13, %r14 - testq $4, %rbp - movq %r14, 16(%r12) - je ..B1.8 -..B1.17: - movl 4(%r12), %ebx - xorl %edx, %edx - addl $-113, %ebx - lea 56(%rsp), %rdi - subl %ebx, 4(%rdi) - movl $1, %ebx - testl %r8d, %r8d - movq %r12, %rsi - cmove %ebx, %edx - movq %rdi, %rcx - orl $8, %edx -..___tag_value___dpml_ux_sqrt_evaluation__.57: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_sqrt_evaluation__.58: -..B1.18: - xorl %r15d, %r15d - cmpq $8192, 72(%rsp) - cmove %ebx, %r15d - jmp ..B1.8 - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_sqrt_evaluation__,@function - .size __dpml_ux_sqrt_evaluation__,.-__dpml_ux_sqrt_evaluation__ - .data -# -- End __dpml_ux_sqrt_evaluation__ - .text -# -- Begin __sqrtq - .text - .align 16,0x90 - .globl __sqrtq -__sqrtq: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value___sqrtq.60: -..L61: - - subq $136, %rsp - .cfi_def_cfa_offset 144 - xorl %esi, %esi - lea __sqrt_x_table(%rip), %rcx - lea 48(%rsp), %rdi - movq %fs:40, %rax - lea 88(%rsp), %rdx - xorq %rsp, %rax - lea 112(%rsp), %r8 - movaps %xmm0, -40(%rdx) - lea (%rsp), %r9 - movq %rax, 40(%rdx) - movq $1, -80(%rdx) - movq $0, (%r9) -..___tag_value___sqrtq.63: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___sqrtq.64: -..B2.2: - testq %rax, %rax - jl ..B2.5 -..B2.3: - movl $7, %esi - lea 88(%rsp), %rdi - lea 64(%rsp), %rdx -..___tag_value___sqrtq.65: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___sqrtq.66: -..B2.4: - movl $1, %edx - xorl %ecx, %ecx - testq %rax, %rax - lea 64(%rsp), %rdi - cmove %edx, %ecx - xorl %edx, %edx - lea 112(%rsp), %rsi - movq %rcx, -104(%rsi) - xorl %ecx, %ecx - lea (%rsp), %r8 -..___tag_value___sqrtq.67: - call __dpml_pack__@PLT -..___tag_value___sqrtq.68: -..B2.5: - movq 128(%rsp), %rax - xorq %rsp, %rax - movaps 112(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.7 -..B2.6: - addq $136, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 -..B2.7: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __sqrtq,@function - .size __sqrtq,.-__sqrtq - .data -# -- End __sqrtq - .text -# -- Begin __rsqrtq - .text - .align 16,0x90 - .globl __rsqrtq -__rsqrtq: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value___rsqrtq.72: -..L73: - - subq $136, %rsp - .cfi_def_cfa_offset 144 - xorl %esi, %esi - lea 8+__sqrt_x_table(%rip), %rcx - lea 48(%rsp), %rdi - movq %fs:40, %rax - lea 88(%rsp), %rdx - xorq %rsp, %rax - lea 112(%rsp), %r8 - movaps %xmm0, -40(%rdx) - lea (%rsp), %r9 - movq %rax, 40(%rdx) - movq $1, -80(%rdx) - movq $0, (%r9) -..___tag_value___rsqrtq.75: - call __dpml_unpack_x_or_y__@PLT -..___tag_value___rsqrtq.76: -..B3.2: - testq %rax, %rax - jl ..B3.5 -..B3.3: - xorl %esi, %esi - lea 88(%rsp), %rdi - lea 64(%rsp), %rdx -..___tag_value___rsqrtq.77: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___rsqrtq.78: -..B3.4: - movl $1, %edx - xorl %ecx, %ecx - testq %rax, %rax - lea 64(%rsp), %rdi - cmove %edx, %ecx - xorl %edx, %edx - lea 112(%rsp), %rsi - movq %rcx, -104(%rsi) - xorl %ecx, %ecx - lea (%rsp), %r8 -..___tag_value___rsqrtq.79: - call __dpml_pack__@PLT -..___tag_value___rsqrtq.80: -..B3.5: - movq 128(%rsp), %rax - xorq %rsp, %rax - movaps 112(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B3.7 -..B3.6: - addq $136, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 -..B3.7: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __rsqrtq,@function - .size __rsqrtq,.-__rsqrtq - .data -# -- End __rsqrtq - .text -# -- Begin __dpml_ux_hypot__ - .text - .align 16,0x90 - .globl __dpml_ux_hypot__ -__dpml_ux_hypot__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -..B4.1: - .cfi_startproc -..___tag_value___dpml_ux_hypot__.84: -..L85: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %rbp - .cfi_def_cfa_offset 24 - .cfi_offset 6, -24 - subq $88, %rsp - .cfi_def_cfa_offset 112 - movq %rdx, %r12 - movq %rsi, %rbp - movq %rdi, %rsi - movq %fs:40, %rax - lea (%rsp), %rdx - xorq %rsp, %rax - movq %rax, 72(%rdx) -..___tag_value___dpml_ux_hypot__.91: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_hypot__.92: -..B4.2: - movq %rbp, %rdi - movq %rbp, %rsi - lea 24(%rsp), %rdx -..___tag_value___dpml_ux_hypot__.93: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_hypot__.94: -..B4.3: - xorl %edx, %edx - lea (%rsp), %rdi - lea 24(%rsp), %rsi - lea 48(%rsp), %rcx -..___tag_value___dpml_ux_hypot__.95: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_hypot__.96: -..B4.4: - xorl %esi, %esi - lea 48(%rsp), %rdi -..___tag_value___dpml_ux_hypot__.97: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_hypot__.98: -..B4.5: - movl $7, %esi - lea 48(%rsp), %rdi - movq %r12, %rdx -..___tag_value___dpml_ux_hypot__.99: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___dpml_ux_hypot__.100: -..B4.6: - testq %rax, %rax - je ..B4.18 -..B4.7: - movl 4(%rsp), %ecx - lea (%rsp), %rbp - subl 28(%rbp), %ecx - movslq %ecx, %rcx - testq %rcx, %rcx - jns ..B4.9 -..B4.8: - negq %rcx - lea 24(%rsp), %rbp -..B4.9: - cmpq $128, %rcx - jle ..B4.11 -..B4.10: - xorl %eax, %eax - jmp ..B4.18 -..B4.11: - movl $1, %edx -..B4.12: - movq 8(%rbp,%rdx,8), %rax - testq %rax, %rax - jne ..B4.10 -..B4.13: - cmpq $64, %rcx - jl ..B4.16 -..B4.14: - addq $-64, %rcx - decq %rdx - jns ..B4.12 -..B4.16: - movq %rax, %rdx - movl $1, %ebp - shrq %cl, %rdx - xorl %esi, %esi - shlq %cl, %rdx - cmpq %rdx, %rax - cmove %ebp, %esi - movl %esi, %eax -..B4.18: - movq 72(%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B4.20 -..B4.19: - addq $88, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 - .cfi_offset 6, -24 - .cfi_offset 12, -16 -..B4.20: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_hypot__,@function - .size __dpml_ux_hypot__,.-__dpml_ux_hypot__ - .data -# -- End __dpml_ux_hypot__ - .section .rodata, "a" - .align 16 - .align 16 -__sqrt_x_table: - .long 1088750600 - .long 605086734 - .long 1088766984 - .long 519758862 - .long 112 - .long 0 - .long 113 - .long 0 - .long 114 - .long 0 - .long 0 - .long 0 - .long 0 - .long 268435456 - .long 858997845 - .long 34 - .long 1636176969 - .long 409044504 - .long 1099306057 - .long 404751376 - .long 545392672 - .long 404783624 - .long 142938632 - .long 302522498 - .long 1719614413 - .long 1073127582 - .long 0 - .long 1072693248 - .long 0 - .long 1097859072 - .long 0 - .long 1151336448 - .long 0 - .long 1047527424 - .long 0 - .long 991952896 - .long 0 - .long 1072431104 - .long 0 - .long 1071120384 - .long 0 - .long 2 - .long 0 - .long 3221225472 - .long 0 - .long 0 - .long 0 - .long 0 - .type __sqrt_x_table,@object - .size __sqrt_x_table,192 - .align 8 -.L_2il0floatpacket.21: - .long 0x00000000,0x43e00000 - .type .L_2il0floatpacket.21,@object - .size .L_2il0floatpacket.21,8 - .align 4 -.L_2il0floatpacket.20: - .long 0x5f000000 - .type .L_2il0floatpacket.20,@object - .size .L_2il0floatpacket.20,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_trig.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_trig.S deleted file mode 100644 index 6871597d29..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/dpml_ux_trig.S +++ /dev/null @@ -1,2192 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "dpml_ux_trig.c" - .text -..TXTST0: -# -- Begin __dpml_ux_radian_reduce__ - .text - .align 16,0x90 -__dpml_ux_radian_reduce__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -..B1.1: - .cfi_startproc -..___tag_value___dpml_ux_radian_reduce__.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $120, %rsp - .cfi_def_cfa_offset 176 - movq 8(%rdi), %rax - movq 16(%rdi), %rcx - movl (%rdi), %r8d - movq %rdx, 48(%rsp) - movq %rsi, %rdx - movslq 4(%rdi), %rsi - testq %rsi, %rsi - movq %rax, 80(%rsp) - movq %rcx, 104(%rsp) - movl %r8d, 40(%rsp) - jl ..B1.21 -..B1.2: - addq $8, %rsi - movq %rsi, %rbx - sarq $6, %rbx - movq __four_over_pi@GOTPCREL(%rip), %rax - movq %rbx, 56(%rsp) - lea (%rax,%rbx,8), %rbp - movq 32(%rbp), %rcx - movq (%rbp), %rbx - movq 8(%rbp), %r11 - movq 16(%rbp), %rdi - movq 24(%rbp), %rax - addq $40, %rbp - movq %rcx, 8(%rsp) - andq $63, %rsi - movq %rbp, (%rsp) - je ..B1.4 -..B1.3: - movq %rsi, %rbp - movl %esi, %ecx - negq %rbp - movq %r11, %r8 - movq %rbp, 56(%rsp) - movq %rdi, %r9 - shlq %cl, %rbx - movl %ebp, %ecx - shrq %cl, %r8 - movl %esi, %ecx - shlq %cl, %r11 - movl %ebp, %ecx - shrq %cl, %r9 - movl %esi, %ecx - shlq %cl, %rdi - movl %ebp, %ecx - movq %rax, %r10 - orq %r8, %rbx - shrq %cl, %r10 - movl %esi, %ecx - shlq %cl, %rax - movl %ebp, %ecx - movq 8(%rsp), %r12 - orq %r9, %r11 - shrq %cl, %r12 - orq %r10, %rdi - orq %r12, %rax -..B1.4: - movq %rdx, 32(%rsp) - xorl %r13d, %r13d - movl %eax, %edx - movq 104(%rsp), %r10 - movq %r10, %r8 - movl %r10d, %ebp - movq %rdx, %r15 - movq %rbx, 24(%rsp) - movq %rax, %rbx - shrq $32, %r8 - movq %rdx, %r12 - imulq %rbp, %r15 - imulq %r8, %r12 - shrq $32, %rbx - movq %rbp, %r9 - imulq %rbx, %r9 - movq %rsi, 112(%rsp) - movq %r10, %rsi - imulq %rax, %rsi - shrq $32, %r15 - movq %r8, %r14 - addq %r12, %r15 - addq %r15, %r9 - cmpq %r15, %r9 - movq %r9, %r12 - movq 80(%rsp), %r9 - setb %r13b - shrq $32, %r12 - shlq $32, %r13 - movq %rsi, 16(%rsp) - addq %r13, %r12 - movl %r9d, %ecx - movq %r9, %rsi - movq %rdx, %r13 - movq %rcx, %r15 - shrq $32, %rsi - imulq %rcx, %r13 - imulq %rsi, %rdx - imulq %rbx, %r15 - imulq %rbx, %r14 - imulq %r9, %rax - imulq %rsi, %rbx - shrq $32, %r13 - addq %r14, %r12 - addq %rdx, %r13 - addq %rax, %r12 - addq %r13, %r15 - cmpq %r13, %r15 - movq %r15, %rdx - movl $0, %r15d - setb %r15b - cmpq %rax, %r12 - movl $0, %eax - setb %al - shrq $32, %rdx - shlq $32, %r15 - addq %r15, %rdx - movq %r10, %r15 - addq %rbx, %rdx - addq %rax, %rdx - movq %rdi, %rbx - movl %edi, %eax - movq %rax, %r14 - movq %rax, %r13 - imulq %rbp, %r14 - imulq %r8, %r13 - imulq %rdi, %r15 - imulq %r9, %rdi - shrq $32, %rbx - addq %r15, %r12 - movq %rbp, 88(%rsp) - imulq %rbx, %rbp - shrq $32, %r14 - addq %r13, %r14 - addq %r14, %rbp - cmpq %r14, %rbp - movl $0, %r14d - movq %rbp, %r13 - movq %r8, %rbp - setb %r14b - cmpq %r15, %r12 - movl $0, %r15d - movq %rcx, 64(%rsp) - setb %r15b - imulq %rbx, %rbp - shrq $32, %r13 - shlq $32, %r14 - addq %r14, %r13 - movq %rax, %r14 - imulq %rcx, %r14 - imulq %rsi, %rax - imulq %rbx, %rcx - imulq %rsi, %rbx - addq %rbp, %r13 - addq %r15, %rdx - xorl %ebp, %ebp - cmpq %r15, %rdx - movq %rsi, 72(%rsp) - setb %bpl - xorl %esi, %esi - addq %r13, %rdx - cmpq %r13, %rdx - movl $0, %r13d - setb %r13b - addq %rdi, %rdx - shrq $32, %r14 - addq %rax, %r14 - addq %r14, %rcx - addq %r13, %rbp - xorl %r13d, %r13d - cmpq %r14, %rcx - movq %rcx, %r15 - setb %r13b - cmpq %rdi, %rdx - movl $0, %edi - setb %dil - movq %r10, %r14 - shrq $32, %r15 - shlq $32, %r13 - addq %r13, %r15 - movq %r11, %r13 - addq %rbx, %r15 - addq %rdi, %r15 - addq %rbp, %r15 - movl %r11d, %ebp - movq %rbp, %rbx - movq 88(%rsp), %rax - imulq %rax, %rbx - imulq %r8, %rbp - imulq %r11, %r14 - imulq %r9, %r11 - shrq $32, %r13 - addq %r14, %rdx - imulq %r13, %rax - imulq %r8, %r13 - shrq $32, %rbx - addq %r15, %r11 - addq %rbp, %rbx - xorl %ebp, %ebp - addq %rbx, %rax - cmpq %rbx, %rax - movq %rax, %rdi - movq 32(%rsp), %rbx - movq %rbx, %rcx - setb %sil - cmpq %r14, %rdx - setb %bpl - negq %rcx - shrq $32, %rdi - shlq $32, %rsi - addq %rsi, %rdi - addq %r13, %rdi - addq %rdi, %rbp - addq %r11, %rbp - movq 24(%rsp), %r11 - imulq %r10, %r11 - cmpl $0, 40(%rsp) - movq %r8, 96(%rsp) - cmovne %rcx, %rbx - addq %r11, %rbp - shlq $61, %rbx - addq %rbx, %rbp - movq 16(%rsp), %r8 - xorl %ebx, %ebx - movq (%rsp), %r10 - movq 8(%rsp), %r11 - jmp ..B1.5 -..B1.9: - movq $0xe000000000000000, %rsi - addq $64, %rbx - andq %rbp, %rsi - movq $0x1fffffffffffffff, %rbp - andq %rdx, %rbp - movq %r12, %rdx - orq %rsi, %rbp - movq %r8, %r12 - movq %rcx, %r8 -..B1.5: - movq $0x40000000000000, %rcx - movq $0x3f80000000000000, %rdi - lea (%rcx,%rbp), %rsi - testq %rdi, %rsi - jne ..B1.10 -..B1.6: - movq %r11, %r9 - movq 112(%rsp), %rsi - movl %esi, %ecx - movq %r9, %r14 - movq (%r10), %r11 - movq %r11, %rdi - shlq %cl, %r14 - addq $8, %r10 - movq 56(%rsp), %rcx - movq 88(%rsp), %rax - movq %rax, %r15 - shrq %cl, %rdi - orq %rdi, %r14 - testq %rsi, %rsi - movq 96(%rsp), %r13 - cmovne %r14, %r9 - movq %r13, %r14 - movl %r9d, %esi - movq %r9, %rdi - imulq %rsi, %r15 - imulq %rsi, %r14 - shrq $32, %rdi - imulq %rdi, %rax - imulq %rdi, %r13 - shrq $32, %r15 - addq %r14, %r15 - addq %r15, %rax - cmpq %r15, %rax - movl $0, %r15d - movq %rax, %r14 - setb %r15b - shrq $32, %r14 - shlq $32, %r15 - addq %r15, %r14 - addq %r13, %r14 - movq 64(%rsp), %r13 - movq %r13, %rax - imulq %rsi, %rax - movq 72(%rsp), %r15 - addq %r14, %r8 - imulq %r15, %rsi - shrq $32, %rax - cmpq %r14, %r8 - movq 104(%rsp), %rcx - movl $0, %r14d - setb %r14b - addq %rsi, %rax - movq %r13, %rsi - imulq %rdi, %rsi - imulq %r9, %rcx - imulq 80(%rsp), %r9 - imulq %r15, %rdi - addq %rax, %rsi - addq %r14, %r12 - movq %rsi, %r13 - cmpq %r14, %r12 - movl $0, %r14d - setb %r14b - cmpq %rax, %rsi - movl $0, %esi - setb %sil - addq %r9, %r8 - cmpq %r9, %r8 - movl $0, %r9d - setb %r9b - shrq $32, %r13 - shlq $32, %rsi - addq %rsi, %r13 - addq %r9, %r12 - addq %rdi, %r13 - xorl %esi, %esi - cmpq %r9, %r12 - setb %sil - addq %r13, %r12 - cmpq %r13, %r12 - movl $0, %r13d - setb %r13b - addl %r14d, %esi - addl %r13d, %esi - je ..B1.8 -..B1.7: - incq %rdx - lea 1(%rbp), %rsi - cmove %rsi, %rbp -..B1.8: - movq %rdx, %r9 - movq %rbp, %rsi - shrq $55, %r9 - shlq $9, %rsi - orq %rsi, %r9 - movq %r9, %rdi - sarq $63, %rdi - cmpq %r9, %rdi - je ..B1.9 -..B1.10: - movq %r8, 16(%rsp) -..B1.11: - lea (,%rbp,4), %rcx - sarq $2, %rcx - movq %rcx, %rsi - subq %rcx, %rbp - sarq $63, %rsi - movq %rcx, %rdi - cmpq %rsi, %rcx - jne ..B1.13 -..B1.12: - movq %rdx, %rcx - movq %r12, %rdx - movq %r8, %r12 - addq $64, %rbx -..B1.13: - movl $-2147483648, %r10d - xorl %esi, %esi - testq %rdi, %rdi - cmovge %esi, %r10d - testl %r10d, %r10d - je ..B1.15 -..B1.14: - notq %r12 - movl $1, %edi - incq %r12 - notq %rdx - cmove %edi, %esi - xorl %r8d, %r8d - notq %rcx - addq %rsi, %rdx - cmove %edi, %r8d - addq %r8, %rcx -..B1.15: - movq %rbp, %r8 - xorl %esi, %esi - movq 48(%rsp), %rdi - negq %r8 - movl 40(%rsp), %r9d - testl %r9d, %r9d - movl $3, 4(%rdi) - cmovne %r8, %rbp - xorl %r9d, %r10d - movl %r10d, (%rdi) - movq %rcx, 8(%rdi) - movq %rdx, 16(%rdi) -..___tag_value___dpml_ux_radian_reduce__.16: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_radian_reduce__.17: -..B1.16: - movq 48(%rsp), %rdx - movslq 4(%rdx), %rsi - movq %rsi, %rcx - addq $-3, %rcx - je ..B1.18 -..B1.17: - shrq %cl, %r12 - orq %r12, 16(%rdx) -..B1.18: - movq %rdx, %rdi - subq %rbx, %rsi - movq %rdi, %rdx - movl %esi, 4(%rdi) - lea 1008+__trig_x_table(%rip), %rsi -..___tag_value___dpml_ux_radian_reduce__.18: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_radian_reduce__.19: -..B1.19: - shrq $62, %rbp - movq %rbp, %rax - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.21: - movl %r8d, %ecx - sarl $31, %ecx - movslq %ecx, %rcx - addq %rdx, %rcx - movq %rcx, %rbx - andq $1, %rbx - addq %rbx, %rcx - movq %rcx, %rbx - sarq $1, %rbx - subq %rcx, %rdx - je ..B1.23 -..B1.22: - shrq $63, %rdx - lea 1008+__trig_x_table(%rip), %rsi - movq 48(%rsp), %rcx -..___tag_value___dpml_ux_radian_reduce__.40: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_radian_reduce__.41: - jmp ..B1.24 -..B1.23: - movq 48(%rsp), %rcx - movl %r8d, %edx - movl %esi, 4(%rcx) - movq %rax, %rsi - movq %rsi, 8(%rcx) - movq 16(%rdi), %rdi - movl %edx, (%rcx) - movq %rdi, 16(%rcx) -..B1.24: - movq %rbx, %rax - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_radian_reduce__,@function - .size __dpml_ux_radian_reduce__,.-__dpml_ux_radian_reduce__ - .data -# -- End __dpml_ux_radian_reduce__ - .text -# -- Begin __dpml_ux_degree_reduce__ - .text - .align 16,0x90 -__dpml_ux_degree_reduce__: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -..B2.1: - .cfi_startproc -..___tag_value___dpml_ux_degree_reduce__.56: -..L57: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $48, %rsp - .cfi_def_cfa_offset 96 - movq %rdi, %rbp - movq %rdx, %r13 - movq %rsi, %rbx - movl 4(%rbp), %r14d - cmpl $142, %r14d - movl (%rbp), %r15d - jle ..B2.3 -..B2.2: - lea 264+__trig_x_table(%rip), %rax - movslq %r14d, %r8 - addq $32641, %r8 - movl %r8d, %ecx - movq (%rax), %r9 - movq %rcx, %r10 - movl %r9d, %esi - shrq $32, %r9 - imulq %rsi, %r10 - imulq %r9, %rcx - shrq $32, %r8 - imulq %r8, %rsi - imulq %r8, %r9 - shrq $32, %r10 - addq %rcx, %r10 - addq %rsi, %r10 - shrq $32, %r10 - addq %r9, %r10 - lea (,%r10,8), %r11d - lea (%r11,%r10,4), %eax - negl %eax - lea 32772(%r14,%rax), %r14d - movl %r14d, 4(%rbp) -..B2.3: - cmpl $16, %r14d - jl ..B2.25 -..B2.4: - movslq %r14d, %r14 - xorl %r8d, %r8d - lea -15(%r14), %rsi - movq %rsi, %rcx - andq $63, %rcx - sarq $6, %rsi - subq %rcx, %r14 - testq %rcx, %rcx - je ..B2.6 -..B2.5: - movq 16(%rbp), %rax - movq %rax, %r8 - movq %rcx, %r9 - shlq %cl, %r8 - negq %r9 - movq %r8, 16(%rbp) - movq 8(%rbp), %r8 - movq %r8, %r10 - shlq %cl, %r10 - movl %r9d, %ecx - shrq %cl, %rax - movl %r9d, %ecx - orq %rax, %r10 - movq %r10, 8(%rbp) - shrq %cl, %r8 -..B2.6: - movq %r8, (%rbp) - lea (%rbp,%rsi,8), %rdi - movq 8(%rdi), %rcx - movq %rcx, %r9 - shrq $52, %r9 - xorl %r11d, %r11d - testq %rsi, %rsi - jl ..B2.19 -..B2.7: - xorl %eax, %eax - lea 1(%rsi), %rdx - movq %rdx, %rcx - movl $1, %r8d - shrq $63, %rcx - xorl %r10d, %r10d - lea 1(%rsi,%rcx), %rcx - sarq $1, %rcx - testq %rcx, %rcx - jbe ..B2.15 -..B2.8: - movq (%rbp,%rsi,8), %r8 - movq %r8, (%rsp) - movq $0xfffffffffffffff, %r8 - movq $0, 8(%rsp) - movl %r15d, 32(%rsp) - movq %r13, 16(%rsp) - movq %rbp, 24(%rsp) - movq %rcx, %rbp - movq %r12, 40(%rsp) - .cfi_offset 12, -56 - movq (%rsp), %r15 - movq 8(%rsp), %r13 -..B2.9: - movq %r8, %r12 - andq %r15, %r12 - shrq $60, %r15 - addq %r15, %r12 - addq %r9, %r12 - movq $0, (%rdi,%r13) - addq $4, %r11 - movq -8(%rdi,%r13), %r15 - je ..B2.11 -..B2.10: - movl %r11d, %ecx - movq %r15, %r9 - negq %r11 - addq $12, %r11 - shlq %cl, %r9 - movl %r11d, %ecx - andq $4095, %r9 - negq %r11 - shrq %cl, %r15 - addq %r9, %r12 -..B2.11: - movq %r8, %r9 - incq %rax - andq %r15, %r9 - addq $4, %r11 - shrq $60, %r15 - addq $-16, %r10 - addq %r15, %r9 - addq %r12, %r9 - movq $0, -8(%rdi,%r13) - cmpq %rbp, %rax - jae ..B2.14 -..B2.12: - movq (%r10,%rdi), %r15 - movq %r10, %r13 - testq %r11, %r11 - je ..B2.9 -..B2.13: - movl %r11d, %ecx - movq %r15, %r12 - negq %r11 - addq $12, %r11 - shlq %cl, %r12 - movl %r11d, %ecx - andq $4095, %r12 - negq %r11 - shrq %cl, %r15 - addq %r12, %r9 - jmp ..B2.9 -..B2.14: - movl 32(%rsp), %r15d - lea 1(,%rax,2), %r8 - movq 24(%rsp), %rbp - movq 16(%rsp), %r13 - movq 40(%rsp), %r12 - .cfi_restore 12 -..B2.15: - lea -1(%r8), %rax - cmpq %rax, %rdx - jbe ..B2.45 -..B2.16: - subq %r8, %rsi - testq %r11, %r11 - movq 8(%rbp,%rsi,8), %rax - je ..B2.18 -..B2.17: - movl %r11d, %ecx - movq %rax, %r8 - negq %r11 - addq $12, %r11 - shlq %cl, %r8 - movl %r11d, %ecx - andq $4095, %r8 - shrq %cl, %rax - addq %r8, %r9 -..B2.18: - movq $0xfffffffffffffff, %rcx - andq %rax, %rcx - shrq $60, %rax - movq $0, 8(%rbp,%rsi,8) - addq %rax, %rcx - addq %rcx, %r9 - movq 8(%rdi), %rcx -..B2.19: - movq %r9, %rax - shrq $12, %rax - testq %rax, %rax - je ..B2.23 -..B2.21: - andq $4095, %r9 - addq %rax, %r9 - movq %r9, %rax - shrq $12, %rax - testq %rax, %rax - jne ..B2.21 -..B2.23: - movq $0xfffffffffffff, %rax - xorl %esi, %esi - shlq $52, %r9 - andq %rcx, %rax - orq %r9, %rax - movq %rax, 8(%rdi) - movq %rbp, %rdi - movl %r14d, 4(%rbp) -..___tag_value___dpml_ux_degree_reduce__.71: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_degree_reduce__.72: -..B2.24: - subq %rax, %r14 -..B2.25: - movslq %r14d, %r14 - movl $0, (%rbp) - addq $-5, %r14 - movq 8(%rbp), %r8 - jle ..B2.27 -..B2.26: - lea 256+__trig_x_table(%rip), %rsi - movq %r8, %rax - movl %r8d, %ecx - xorl %r11d, %r11d - movq %rcx, %r10 - shrq $32, %rax - movq (%rsi), %rdx - movl %edx, %r9d - shrq $32, %rdx - imulq %r9, %r10 - imulq %rdx, %rcx - imulq %rax, %r9 - imulq %rax, %rdx - shrq $32, %r10 - addq %rcx, %r10 - addq %r10, %r9 - cmpq %r10, %r9 - movq %r9, %rsi - setb %r11b - shrq $32, %rsi - shlq $32, %r11 - addq %r11, %rsi - addq %rdx, %rsi - jmp ..B2.28 -..B2.27: - movl $1, %r14d - xorl %esi, %esi -..B2.28: - negq %r14 - movq %rbx, %rax - andq $1, %rax - incq %rax - shrq $1, %rbx - lea 63(%r14), %rcx - shlq %cl, %rax - addq %rsi, %rax - movl %r14d, %ecx - movl $1, %esi - shlq %cl, %rsi - movl %r14d, %ecx - decq %rsi - notq %rsi - andq %rsi, %rax - movq %r8, %rsi - movq %rax, %r10 - andq $3, %r8 - shrq %cl, %r10 - movq $0x0b4000000, %rcx - movl %eax, %r11d - movq %r10, %r9 - imulq %rcx, %r11 - shrq $32, %rax - negq %r9 - imulq %rax, %rcx - shrq $2, %rsi - testl %r15d, %r15d - cmovne %r9, %r10 - shrq $32, %r11 - addq %r10, %rbx - subq %r11, %rsi - subq %rcx, %rsi - lea (,%rsi,4), %rax - orq %rax, %r8 - testq %rsi, %rsi - jns ..B2.30 -..B2.29: - movq 16(%rbp), %rax - movl $1, %ecx - xorl %esi, %esi - testq %rax, %rax - cmovne %ecx, %esi - movq %rax, %r9 - movslq %r15d, %r15 - negq %r9 - btcq $31, %r15 - addq %rsi, %r8 - movq %r9, 16(%rbp) - negq %r8 -..B2.30: - movq %rbp, %rdi - xorl %esi, %esi - movq %r8, 8(%rbp) -..___tag_value___dpml_ux_degree_reduce__.73: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_degree_reduce__.74: -..B2.31: - shlq $3, %rbx - movq 8(%rbp), %rsi - shrl $3, %ebx - movl 4(%rbp), %ecx - testq %rsi, %rsi - jne ..B2.34 -..B2.32: - movq $0x2000000000000000, %rcx - orq %rcx, %rbx - testq $2, %rbx - je ..B2.43 -..B2.33: - movslq (%rbp), %rcx - btcq $31, %rcx - movl %ecx, (%rbp) - jmp ..B2.43 -..B2.34: - cmpl $5, %ecx - jl ..B2.42 -..B2.35: - cmpq $0, 16(%rbp) - jne ..B2.42 -..B2.36: - negl %ecx - movq %rsi, %r9 - shrq %cl, %r9 - movq %r9, %r8 - shlq %cl, %r8 - cmpq %r8, %rsi - jne ..B2.42 -..B2.37: - cmpq $30, %r9 - jne ..B2.41 -..B2.38: - testq $1, %rbx - jne ..B2.42 -..B2.39: - movq $0x4000000000000000, %rcx - xorl %r15d, (%rbp) - orq %rcx, %rbx - jmp ..B2.43 -..B2.41: - movq $0x8000000000000000, %rcx - orq %rbx, %rcx - cmpq $45, %r9 - cmove %rcx, %rbx -..B2.42: - xorl %r15d, (%rbp) -..B2.43: - movq %rbp, %rdi - lea 216+__trig_x_table(%rip), %rsi - movq %r13, %rdx -..___tag_value___dpml_ux_degree_reduce__.75: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_degree_reduce__.76: -..B2.44: - movq %rbx, %rax - addq $48, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B2.45: - movq 8(%rdi), %rcx - jmp ..B2.19 - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_degree_reduce__,@function - .size __dpml_ux_degree_reduce__,.-__dpml_ux_degree_reduce__ - .data -# -- End __dpml_ux_degree_reduce__ - .text -# -- Begin __dpml_ux_sincos - .text - .align 16,0x90 - .globl __dpml_ux_sincos -__dpml_ux_sincos: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -..B3.1: - .cfi_startproc -..___tag_value___dpml_ux_sincos.95: -..L96: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $136, %rsp - .cfi_def_cfa_offset 192 - movq %rdx, %r15 - testq $16, %r15 - lea __dpml_ux_degree_reduce__(%rip), %r10 - lea __dpml_ux_radian_reduce__(%rip), %r9 - movq %rcx, %r12 - cmovne %r10, %r9 - movq %rsi, %rbp - movq %fs:40, %rax - movq %rdi, %r13 - xorq %rsp, %rax - movq %rax, 128(%rsp) - cmpq %r10, %r9 - jne ..B3.54 -..B3.2: - movl 4(%r13), %ebx - cmpl $142, %ebx - movl (%r13), %r14d - jle ..B3.4 -..B3.3: - lea 264+__trig_x_table(%rip), %rax - movslq %ebx, %r9 - addq $32641, %r9 - movl %r9d, %ecx - movq (%rax), %r10 - movq %rcx, %r11 - movl %r10d, %esi - shrq $32, %r10 - imulq %rsi, %r11 - imulq %r10, %rcx - shrq $32, %r9 - imulq %r9, %rsi - imulq %r9, %r10 - shrq $32, %r11 - addq %rcx, %r11 - addq %rsi, %r11 - shrq $32, %r11 - addq %r10, %r11 - lea (,%r11,8), %eax - lea (%rax,%r11,4), %eax - negl %eax - lea 32772(%rbx,%rax), %ebx - movl %ebx, 4(%r13) -..B3.4: - cmpl $16, %ebx - jl ..B3.26 -..B3.5: - movslq %ebx, %rbx - xorl %r9d, %r9d - lea -15(%rbx), %rax - movq %rax, %rcx - andq $63, %rcx - sarq $6, %rax - subq %rcx, %rbx - testq %rcx, %rcx - je ..B3.7 -..B3.6: - movq 16(%r13), %rsi - movq %rsi, %r9 - movq %rcx, %r10 - shlq %cl, %r9 - negq %r10 - movq %r9, 16(%r13) - movq 8(%r13), %r9 - movq %r9, %r11 - shlq %cl, %r11 - movl %r10d, %ecx - shrq %cl, %rsi - movl %r10d, %ecx - orq %rsi, %r11 - movq %r11, 8(%r13) - shrq %cl, %r9 -..B3.7: - movq %r9, (%r13) - lea (%r13,%rax,8), %r8 - movq 8(%r8), %rcx - movq %rcx, %rsi - shrq $52, %rsi - xorl %edx, %edx - testq %rax, %rax - jl ..B3.20 -..B3.8: - xorl %r10d, %r10d - lea 1(%rax), %rdi - movq %rdi, %rcx - movl $1, %r9d - shrq $63, %rcx - xorl %r11d, %r11d - lea 1(%rax,%rcx), %rcx - sarq $1, %rcx - testq %rcx, %rcx - jbe ..B3.16 -..B3.9: - movq (%r13,%rax,8), %r9 - movq %r9, (%rsp) - movq $0xfffffffffffffff, %r9 - movq $0, 8(%rsp) - movl %r14d, 24(%rsp) - movq %r13, 32(%rsp) - movq %rbx, 16(%rsp) - movq %rcx, %rbx - movq %r12, 40(%rsp) - movq (%rsp), %r14 - movq 8(%rsp), %r13 -..B3.10: - movq %r9, %r12 - andq %r14, %r12 - shrq $60, %r14 - addq %r14, %r12 - addq %rsi, %r12 - movq $0, (%r8,%r13) - addq $4, %rdx - movq -8(%r8,%r13), %r14 - je ..B3.12 -..B3.11: - movl %edx, %ecx - movq %r14, %rsi - negq %rdx - addq $12, %rdx - shlq %cl, %rsi - movl %edx, %ecx - andq $4095, %rsi - negq %rdx - shrq %cl, %r14 - addq %rsi, %r12 -..B3.12: - movq %r9, %rsi - incq %r10 - andq %r14, %rsi - addq $4, %rdx - shrq $60, %r14 - addq $-16, %r11 - addq %r14, %rsi - addq %r12, %rsi - movq $0, -8(%r8,%r13) - cmpq %rbx, %r10 - jae ..B3.15 -..B3.13: - movq (%r11,%r8), %r14 - movq %r11, %r13 - testq %rdx, %rdx - je ..B3.10 -..B3.14: - movl %edx, %ecx - movq %r14, %r12 - negq %rdx - addq $12, %rdx - shlq %cl, %r12 - movl %edx, %ecx - andq $4095, %r12 - negq %rdx - shrq %cl, %r14 - addq %r12, %rsi - jmp ..B3.10 -..B3.15: - movq 16(%rsp), %rbx - lea 1(,%r10,2), %r9 - movl 24(%rsp), %r14d - movq 32(%rsp), %r13 - movq 40(%rsp), %r12 -..B3.16: - lea -1(%r9), %rcx - cmpq %rcx, %rdi - jbe ..B3.69 -..B3.17: - subq %r9, %rax - testq %rdx, %rdx - movq 8(%r13,%rax,8), %r9 - je ..B3.19 -..B3.18: - movl %edx, %ecx - movq %r9, %r10 - negq %rdx - addq $12, %rdx - shlq %cl, %r10 - movl %edx, %ecx - andq $4095, %r10 - shrq %cl, %r9 - addq %r10, %rsi -..B3.19: - movq $0xfffffffffffffff, %rcx - andq %r9, %rcx - shrq $60, %r9 - movq $0, 8(%r13,%rax,8) - addq %r9, %rcx - addq %rcx, %rsi - movq 8(%r8), %rcx -..B3.20: - movq %rsi, %rax - shrq $12, %rax - testq %rax, %rax - je ..B3.24 -..B3.22: - andq $4095, %rsi - addq %rax, %rsi - movq %rsi, %rax - shrq $12, %rax - testq %rax, %rax - jne ..B3.22 -..B3.24: - movq $0xfffffffffffff, %rax - movq %r13, %rdi - shlq $52, %rsi - andq %rcx, %rax - orq %rsi, %rax - xorl %esi, %esi - movq %rax, 8(%r8) - movl %ebx, 4(%r13) -..___tag_value___dpml_ux_sincos.110: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_sincos.111: -..B3.25: - subq %rax, %rbx -..B3.26: - movslq %ebx, %rbx - movl $0, (%r13) - addq $-5, %rbx - movq 8(%r13), %r9 - jle ..B3.28 -..B3.27: - lea 256+__trig_x_table(%rip), %rsi - movq %r9, %rax - movl %r9d, %ecx - movq %rcx, %r11 - shrq $32, %rax - movq (%rsi), %rdx - movl %edx, %r10d - shrq $32, %rdx - imulq %r10, %r11 - imulq %rdx, %rcx - imulq %rax, %r10 - imulq %rax, %rdx - shrq $32, %r11 - addq %rcx, %r11 - xorl %ecx, %ecx - addq %r11, %r10 - cmpq %r11, %r10 - movq %r10, %rsi - setb %cl - shrq $32, %rsi - shlq $32, %rcx - addq %rcx, %rsi - addq %rdx, %rsi - jmp ..B3.29 -..B3.28: - movl $1, %ebx - xorl %esi, %esi -..B3.29: - negq %rbx - movq %rbp, %rax - andq $1, %rax - incq %rax - shrq $1, %rbp - lea 63(%rbx), %rcx - shlq %cl, %rax - addq %rsi, %rax - movl %ebx, %ecx - movl $1, %esi - shlq %cl, %rsi - movl %ebx, %ecx - decq %rsi - notq %rsi - andq %rsi, %rax - movq $0x0b4000000, %rsi - movq %rax, %r11 - shrq %cl, %r11 - movl %eax, %ecx - movq %r11, %r10 - imulq %rsi, %rcx - shrq $32, %rax - negq %r10 - imulq %rax, %rsi - testl %r14d, %r14d - cmovne %r10, %r11 - movq %r9, %r10 - shrq $2, %r10 - andq $3, %r9 - shrq $32, %rcx - addq %r11, %rbp - subq %rcx, %r10 - subq %rsi, %r10 - lea (,%r10,4), %rax - orq %rax, %r9 - testq %r10, %r10 - jns ..B3.31 -..B3.30: - movq 16(%r13), %rax - movl $1, %ecx - xorl %esi, %esi - testq %rax, %rax - cmovne %ecx, %esi - movq %rax, %r10 - movslq %r14d, %r14 - negq %r10 - btcq $31, %r14 - addq %rsi, %r9 - movq %r10, 16(%r13) - negq %r9 -..B3.31: - movq %r13, %rdi - xorl %esi, %esi - movq %r9, 8(%r13) -..___tag_value___dpml_ux_sincos.112: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_sincos.113: -..B3.32: - shlq $3, %rbp - movq 8(%r13), %rax - shrl $3, %ebp - movl 4(%r13), %ecx - movl %ebp, %ebx - testq %rax, %rax - jne ..B3.35 -..B3.33: - movq $0x2000000000000000, %rax - orq %rax, %rbx - testq $2, %rbx - je ..B3.44 -..B3.34: - movslq (%r13), %rax - btcq $31, %rax - movl %eax, (%r13) - jmp ..B3.44 -..B3.35: - cmpl $5, %ecx - jl ..B3.43 -..B3.36: - cmpq $0, 16(%r13) - jne ..B3.43 -..B3.37: - negl %ecx - movq %rax, %rsi - shrq %cl, %rsi - movq %rsi, %rdx - shlq %cl, %rdx - cmpq %rdx, %rax - jne ..B3.43 -..B3.38: - cmpq $30, %rsi - jne ..B3.42 -..B3.39: - testq $1, %rbx - jne ..B3.43 -..B3.40: - movq $0x4000000000000000, %rax - xorl %r14d, (%r13) - orq %rax, %rbx - jmp ..B3.44 -..B3.42: - movq $0x8000000000000000, %rax - orq %rbx, %rax - cmpq $45, %rsi - cmove %rax, %rbx -..B3.43: - xorl %r14d, (%r13) -..B3.44: - movq %r13, %rdi - lea 216+__trig_x_table(%rip), %rsi - lea (%rsp), %rdx -..___tag_value___dpml_ux_sincos.114: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_sincos.115: -..B3.46: - andq $-17, %r15 - movl $3, %ecx - movl $1, %eax - cmpq $3, %r15 - movq %rbx, %rdx - cmove %rax, %rcx - xorl %r13d, %r13d - movl $1, %esi - sarq $61, %rdx - testq %rcx, %rdx - movq %rbx, %rcx - cmove %esi, %r13d - andq $1, %rcx - cmpq $3, %r15 - je ..B3.68 -..B3.47: - movl $1216, %edx - testq %rcx, %rcx - movl $1038, %ecx - cmovne %rdx, %rcx -..B3.48: - lea 272+__trig_x_table(%rip), %rsi - lea (%rsp), %rdi - movl $13, %edx - movq %r12, %r8 -..___tag_value___dpml_ux_sincos.116: - call __dpml_evaluate_rational__@PLT -..___tag_value___dpml_ux_sincos.117: -..B3.49: - testq $2, %rbx - je ..B3.51 -..B3.50: - movslq (%r12), %rdx - btcq $31, %rdx - movl %edx, (%r12) -..B3.51: - cmpq $3, %r15 - je ..B3.64 -..B3.52: - movq 128(%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B3.63 -..B3.53: - movq %r13, %rax - addq $136, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.54: - movq 8(%r13), %r11 - movq 16(%r13), %rax - movl (%r13), %ecx - movq %r11, 88(%rsp) - movslq 4(%r13), %r11 - testq %r11, %r11 - movq %rax, 112(%rsp) - movl %ecx, 56(%rsp) - jl ..B3.81 -..B3.55: - addq $8, %r11 - movq %r11, %rsi - sarq $6, %rsi - movq __four_over_pi@GOTPCREL(%rip), %rax - movq %rsi, 64(%rsp) - lea (%rax,%rsi,8), %r10 - movq 32(%r10), %rcx - movq (%r10), %r9 - movq 8(%r10), %rsi - movq 16(%r10), %rax - movq 24(%r10), %rdi - addq $40, %r10 - movq %rcx, 8(%rsp) - andq $63, %r11 - movq %r10, (%rsp) - je ..B3.57 -..B3.56: - movq %r11, %r10 - movl %r11d, %ecx - negq %r10 - movq %rsi, %r13 - movq %r10, 64(%rsp) - movq %rax, %r14 - shlq %cl, %r9 - movl %r10d, %ecx - shrq %cl, %r13 - movl %r11d, %ecx - shlq %cl, %rsi - movl %r10d, %ecx - shrq %cl, %r14 - movl %r11d, %ecx - shlq %cl, %rax - orq %r13, %r9 - movl %r10d, %ecx - movq %rdi, %r13 - shrq %cl, %r13 - movl %r11d, %ecx - shlq %cl, %rdi - movl %r10d, %ecx - orq %r13, %rax - orq %r14, %rsi - movq 8(%rsp), %r13 - shrq %cl, %r13 - orq %r13, %rdi -..B3.57: - movl %edi, %edx - movq %r11, 120(%rsp) - movq %rdx, %r13 - movq 112(%rsp), %r11 - movq %r11, %r8 - movq %r9, 24(%rsp) - movq %r11, %r9 - movq %r15, 16(%rsp) - movq %rdx, %r15 - movl %r11d, %ebx - movq %rbp, 32(%rsp) - movq %rdi, %rbp - shrq $32, %r9 - movq %rbx, %r10 - imulq %rbx, %r15 - imulq %r9, %r13 - imulq %rdi, %r8 - shrq $32, %rbp - movq %r9, %r14 - imulq %rbp, %r10 - imulq %rbp, %r14 - shrq $32, %r15 - addq %r13, %r15 - addq %r15, %r10 - cmpq %r15, %r10 - movq %r10, %r13 - movq %r12, 40(%rsp) - movl $0, %r12d - setb %r12b - shrq $32, %r13 - shlq $32, %r12 - movq 88(%rsp), %r10 - addq %r12, %r13 - movq %r8, 48(%rsp) - movq %r10, %r8 - movl %r10d, %ecx - movq %rdx, %r12 - shrq $32, %r8 - movq %rcx, %r15 - imulq %rcx, %r12 - imulq %r8, %rdx - imulq %rbp, %r15 - imulq %r10, %rdi - imulq %r8, %rbp - shrq $32, %r12 - addq %r14, %r13 - addq %rdx, %r12 - addq %rdi, %r13 - addq %r12, %r15 - cmpq %r12, %r15 - movq %r15, %rdx - movl $0, %r15d - setb %r15b - cmpq %rdi, %r13 - movl $0, %edi - setb %dil - shrq $32, %rdx - shlq $32, %r15 - addq %r15, %rdx - movq %r11, %r15 - addq %rbp, %rdx - addq %rdi, %rdx - movq %rax, %rbp - movl %eax, %edi - movq %rdi, %r14 - movq %rdi, %r12 - imulq %rbx, %r14 - imulq %r9, %r12 - imulq %rax, %r15 - imulq %r10, %rax - shrq $32, %rbp - addq %r15, %r13 - movq %rbx, 96(%rsp) - imulq %rbp, %rbx - shrq $32, %r14 - addq %r12, %r14 - addq %r14, %rbx - cmpq %r14, %rbx - movl $0, %r14d - movq %rbx, %r12 - movq %r9, %rbx - setb %r14b - cmpq %r15, %r13 - movl $0, %r15d - movq %rcx, 72(%rsp) - setb %r15b - imulq %rbp, %rbx - shrq $32, %r12 - shlq $32, %r14 - addq %r14, %r12 - movq %rdi, %r14 - imulq %rcx, %r14 - imulq %r8, %rdi - imulq %rbp, %rcx - imulq %r8, %rbp - addq %rbx, %r12 - addq %r15, %rdx - xorl %ebx, %ebx - cmpq %r15, %rdx - movq %r9, 104(%rsp) - setb %bl - addq %r12, %rdx - cmpq %r12, %rdx - movl $0, %r12d - setb %r12b - addq %rax, %rdx - shrq $32, %r14 - addq %rdi, %r14 - xorl %edi, %edi - addq %r14, %rcx - addq %r12, %rbx - xorl %r12d, %r12d - cmpq %r14, %rcx - movq %rcx, %r15 - setb %r12b - cmpq %rax, %rdx - movl $0, %eax - setb %al - movq %r11, %r14 - shrq $32, %r15 - shlq $32, %r12 - addq %r12, %r15 - movq %rsi, %r12 - addq %rbp, %r15 - addq %rax, %r15 - addq %rbx, %r15 - movl %esi, %ebx - movq %rbx, %rbp - movq 96(%rsp), %rcx - imulq %rcx, %rbp - imulq %r9, %rbx - imulq %rsi, %r14 - imulq %r10, %rsi - shrq $32, %r12 - addq %r14, %rdx - imulq %r12, %rcx - imulq %r9, %r12 - shrq $32, %rbp - addq %r15, %rsi - addq %rbx, %rbp - xorl %ebx, %ebx - addq %rbp, %rcx - cmpq %rbp, %rcx - movq %rcx, %rax - movq 32(%rsp), %rcx - setb %dil - cmpq %r14, %rdx - setb %bl - xorl %r14d, %r14d - shrq $32, %rax - shlq $32, %rdi - addq %rdi, %rax - addq %r12, %rax - addq %rax, %rbx - movq %rcx, %rax - addq %rsi, %rbx - negq %rax - movq 24(%rsp), %rsi - imulq %r11, %rsi - cmpl $0, 56(%rsp) - movq %r8, 80(%rsp) - cmovne %rax, %rcx - addq %rsi, %rbx - shlq $61, %rcx - movq 120(%rsp), %r11 - addq %rcx, %rbx - movq 48(%rsp), %r10 - movq (%rsp), %r8 - movq 8(%rsp), %r9 - jmp ..B3.58 -..B3.62: - movq $0xe000000000000000, %rax - addq $64, %r14 - andq %rbx, %rax - movq $0x1fffffffffffffff, %rbx - andq %rdx, %rbx - movq %r13, %rdx - orq %rax, %rbx - movq %r10, %r13 - movq %rcx, %r10 -..B3.58: - movq $0x40000000000000, %rax - movq $0x3f80000000000000, %rsi - lea (%rax,%rbx), %rcx - testq %rsi, %rcx - jne ..B3.70 -..B3.59: - movq %r9, %rdi - movq 120(%rsp), %rax - movl %eax, %ecx - movq %rdi, %r12 - movq (%r8), %r9 - movq %r9, %rsi - shlq %cl, %r12 - addq $8, %r8 - movq 64(%rsp), %rcx - movq 96(%rsp), %rbp - movq %rbp, %r15 - shrq %cl, %rsi - orq %rsi, %r12 - testq %rax, %rax - movq 104(%rsp), %r11 - cmovne %r12, %rdi - movq %r11, %r12 - movl %edi, %eax - movq %rdi, %rsi - imulq %rax, %r15 - imulq %rax, %r12 - shrq $32, %rsi - imulq %rsi, %rbp - imulq %rsi, %r11 - shrq $32, %r15 - addq %r12, %r15 - addq %r15, %rbp - cmpq %r15, %rbp - movl $0, %r15d - movq %rbp, %r12 - setb %r15b - shrq $32, %r12 - shlq $32, %r15 - addq %r15, %r12 - addq %r11, %r12 - movq 72(%rsp), %r11 - movq %r11, %rbp - imulq %rax, %rbp - movq 80(%rsp), %r15 - addq %r12, %r10 - imulq %r15, %rax - shrq $32, %rbp - cmpq %r12, %r10 - movq 112(%rsp), %rcx - movl $0, %r12d - setb %r12b - addq %rax, %rbp - movq %r11, %rax - imulq %rsi, %rax - imulq %rdi, %rcx - imulq 88(%rsp), %rdi - imulq %r15, %rsi - addq %rbp, %rax - addq %r12, %r13 - movq %rax, %r11 - cmpq %r12, %r13 - movl $0, %r12d - setb %r12b - cmpq %rbp, %rax - movl $0, %eax - setb %al - addq %rdi, %r10 - cmpq %rdi, %r10 - movl $0, %edi - setb %dil - shrq $32, %r11 - shlq $32, %rax - addq %rax, %r11 - addq %rdi, %r13 - addq %rsi, %r11 - xorl %eax, %eax - cmpq %rdi, %r13 - setb %al - addq %r11, %r13 - cmpq %r11, %r13 - movl $0, %r11d - setb %r11b - addl %r12d, %eax - addl %r11d, %eax - je ..B3.61 -..B3.60: - incq %rdx - lea 1(%rbx), %rax - cmove %rax, %rbx -..B3.61: - movq %rdx, %rdi - movq %rbx, %rax - shrq $55, %rdi - shlq $9, %rax - orq %rax, %rdi - movq %rdi, %rsi - sarq $63, %rsi - cmpq %rdi, %rsi - jne ..B3.70 - jmp ..B3.62 -..B3.63: - call __stack_chk_fail@PLT -..B3.64: - cmpq $0, 32(%r12) - jne ..B3.66 -..B3.65: - movl $0, 24(%r12) - jmp ..B3.52 -..B3.66: - incq %rbx - testq $2, %rbx - je ..B3.52 -..B3.67: - movslq 24(%r12), %rdx - btcq $31, %rdx - movl %edx, 24(%r12) - jmp ..B3.52 -..B3.68: - shlq $9, %rcx - orq $462, %rcx - jmp ..B3.48 -..B3.69: - movq 8(%r8), %rcx - jmp ..B3.20 -..B3.70: - movq 16(%rsp), %r15 - movq 40(%rsp), %r12 -..B3.71: - lea (,%rbx,4), %rcx - sarq $2, %rcx - movq %rcx, %rax - subq %rcx, %rbx - sarq $63, %rax - movq %rcx, %rsi - cmpq %rax, %rcx - jne ..B3.73 -..B3.72: - movq %rdx, %rcx - movq %r13, %rdx - movq %r10, %r13 - addq $64, %r14 -..B3.73: - movl $-2147483648, %eax - testq %rsi, %rsi - movl $0, %esi - cmovge %esi, %eax - testl %eax, %eax - je ..B3.75 -..B3.74: - notq %r13 - movl $1, %edi - incq %r13 - notq %rdx - cmove %edi, %esi - xorl %r9d, %r9d - notq %rcx - addq %rsi, %rdx - cmove %edi, %r9d - addq %r9, %rcx -..B3.75: - movq %rbx, %r9 - lea (%rsp), %rdi - movl 56(%rdi), %r10d - negq %r9 - testl %r10d, %r10d - movl $3, 4(%rdi) - movq %rcx, 8(%rdi) - cmovne %r9, %rbx - xorl %esi, %esi - xorl %r10d, %eax - movl %eax, (%rdi) - movq %rdx, 16(%rdi) -..___tag_value___dpml_ux_sincos.138: - call __dpml_ffs_and_shift__@PLT -..___tag_value___dpml_ux_sincos.139: -..B3.76: - movslq 4(%rsp), %rax - movq %rax, %rcx - addq $-3, %rcx - je ..B3.78 -..B3.77: - shrq %cl, %r13 - orq %r13, 16(%rsp) -..B3.78: - lea 1008+__trig_x_table(%rip), %rsi - lea (%rsp), %rdi - movq %rdi, %rdx - subq %r14, %rax - movl %eax, 4(%rdi) -..___tag_value___dpml_ux_sincos.140: - call __dpml_multiply__@PLT -..___tag_value___dpml_ux_sincos.141: -..B3.79: - shrq $62, %rbx - jmp ..B3.46 -..B3.81: - movl %ecx, %eax - sarl $31, %eax - movslq %eax, %rax - addq %rbp, %rax - movq %rax, %rcx - andq $1, %rcx - addq %rcx, %rax - movq %rax, %rbx - sarq $1, %rbx - subq %rax, %rbp - je ..B3.83 -..B3.82: - shrq $63, %rbp - movq %r13, %rdi - lea 1008+__trig_x_table(%rip), %rsi - movq %rbp, %rdx - lea (%rsp), %rcx -..___tag_value___dpml_ux_sincos.142: - call __dpml_addsub__@PLT -..___tag_value___dpml_ux_sincos.143: - jmp ..B3.46 -..B3.83: - movl 56(%rsp), %eax - movq 88(%rsp), %rdx - movq 112(%rsp), %rcx - movl %eax, (%rsp) - movl %r11d, 4(%rsp) - movq %rdx, 8(%rsp) - movq %rcx, 16(%rsp) - jmp ..B3.46 - .align 16,0x90 - .cfi_endproc - .type __dpml_ux_sincos,@function - .size __dpml_ux_sincos,.-__dpml_ux_sincos - .data -# -- End __dpml_ux_sincos - .section .rodata, "a" - .align 16 - .align 16 -__trig_x_table: - .long 15442952 - .long 1678786816 - .long 15709192 - .long 1414612240 - .long 15975432 - .long 1141915904 - .long 16241672 - .long 873463808 - .long 16507912 - .long 609305872 - .long 16774152 - .long 336592896 - .long 2 - .long 0 - .long 103 - .long 0 - .long 22 - .long 0 - .long 104 - .long 0 - .long 107 - .long 0 - .long 23 - .long 0 - .long 105 - .long 0 - .long 15176712 - .long 336609536 - .long 115 - .long 0 - .long 15176712 - .long 336592896 - .long 118 - .long 0 - .long 15176712 - .long 519700480 - .long 28 - .long 0 - .long 29 - .long 0 - .long 30 - .long 0 - .long 15176712 - .long 528281504 - .long 34 - .long 0 - .long 32 - .long 0 - .long 33 - .long 0 - .long 35 - .long 0 - .long 36 - .long 0 - .long 0 - .long 4294967291 - .long 2498349230 - .long 2398762258 - .long 2491794649 - .long 247854702 - .long 0 - .long 0 - .long 0 - .long 1073676288 - .long 95443718 - .long 1527099483 - .long 1431655766 - .long 357913941 - .long 2657305954 - .long 3 - .long 0 - .long 0 - .long 3705764381 - .long 2553 - .long 0 - .long 0 - .long 138031221 - .long 1532340 - .long 0 - .long 0 - .long 2983678984 - .long 775364077 - .long 0 - .long 0 - .long 20739419 - .long 3530365445 - .long 75 - .long 0 - .long 674366505 - .long 499172021 - .long 25931 - .long 0 - .long 1191312077 - .long 2630803580 - .long 7053263 - .long 0 - .long 2382099329 - .long 2712937970 - .long 1481185358 - .long 0 - .long 2412211635 - .long 2311528398 - .long 3431649258 - .long 53 - .long 3364759590 - .long 865053377 - .long 3819263687 - .long 5917 - .long 1745256079 - .long 2154301056 - .long 109078534 - .long 426088 - .long 286331142 - .long 286331153 - .long 286331153 - .long 17895697 - .long 1431655765 - .long 1431655765 - .long 1431655765 - .long 357913941 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 2851833826 - .long 97 - .long 0 - .long 0 - .long 1768459388 - .long 63846 - .long 0 - .long 0 - .long 2009193996 - .long 35243820 - .long 0 - .long 0 - .long 1368406537 - .long 3397743743 - .long 3 - .long 0 - .long 3946395699 - .long 2652434014 - .long 1440 - .long 0 - .long 2553743692 - .long 4190957063 - .long 440828 - .long 0 - .long 595011843 - .long 807348040 - .long 105798954 - .long 0 - .long 883371940 - .long 908455249 - .long 2075540478 - .long 4 - .long 761938407 - .long 3951975904 - .long 3388403475 - .long 591 - .long 217841633 - .long 3490513104 - .long 13634816 - .long 53261 - .long 3626846480 - .long 2195205506 - .long 763549741 - .long 2982616 - .long 1431655403 - .long 1431655765 - .long 1431655765 - .long 89478485 - .long 4294967292 - .long 4294967295 - .long 4294967295 - .long 1073741823 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2877741414 - .long 48456580 - .long 4555740 - .long 0 - .long 3312728015 - .long 4268104823 - .long 3744444631 - .long 1 - .long 6483522 - .long 3858350617 - .long 1187701358 - .long 879 - .long 3780777519 - .long 2626127639 - .long 2801410624 - .long 158172 - .long 3864078256 - .long 3316933375 - .long 1275824684 - .long 11667904 - .long 1744149096 - .long 2725495384 - .long 3617949641 - .long 318163395 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 3422290646 - .long 426546810 - .long 43450 - .long 0 - .long 3479121894 - .long 3493673009 - .long 236644653 - .long 0 - .long 4247003031 - .long 1084451344 - .long 1285072157 - .long 46 - .long 1927283714 - .long 2972340862 - .long 2243521359 - .long 13184 - .long 739625925 - .long 4125699428 - .long 1446479475 - .long 1522115 - .long 2250255868 - .long 2030226330 - .long 3149913922 - .long 70000510 - .long 312493331 - .long 1293839619 - .long 2186293876 - .long 1033991278 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 0 - .long 0 - .long 560513588 - .long 3373259426 - .long 2161908945 - .long 3301335691 - .long 0 - .long 0 - .type __trig_x_table,@object - .size __trig_x_table,1040 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erf.S deleted file mode 100644 index 029f5b98ec..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erf.S +++ /dev/null @@ -1,1390 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erf.c" - .text -..TXTST0: -# -- Begin erf - .text - .align 16,0x90 - .globl erf -erf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_erf.1: -..L2: - - movsd %xmm0, -8(%rsp) - movb -1(%rsp), %cl - movb %cl, %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - lea _vmldErfHATab(%rip), %rax - movzwl -2(%rsp), %esi - andl $32752, %esi - shrl $4, %esi - movsd 3632(%rax,%rdx,8), %xmm5 - cmpl $2047, %esi - je ..B1.17 -..B1.2: - movsd %xmm0, -8(%rsp) - andb $127, %cl - movb %cl, -1(%rsp) - cmpl $983, %esi - movsd -8(%rsp), %xmm4 - jl ..B1.9 -..B1.3: - lea 3664+_vmldErfHATab(%rip), %rdx - comisd (%rdx), %xmm4 - jb ..B1.8 -..B1.4: - lea 3672+_vmldErfHATab(%rip), %rdx - movsd (%rdx), %xmm0 - comisd %xmm4, %xmm0 - jbe ..B1.6 -..B1.5: - movl -4(%rsp), %edx - shll $20, %esi - andl $1048575, %edx - orl %edx, %esi - addl $-1069547520, %esi - sarl $18, %esi - lea (%rsi,%rsi,4), %ecx - lea 3616+_vmldErfHATab(%rip), %rsi - shll $2, %ecx - movslq %ecx, %rcx - movsd (%rsi), %xmm1 - movaps %xmm1, %xmm6 - movsd (%rax,%rcx,8), %xmm3 - mulsd %xmm3, %xmm4 - movsd 152(%rax,%rcx,8), %xmm2 - movsd 48(%rax,%rcx,8), %xmm11 - movsd 56(%rax,%rcx,8), %xmm12 - addsd 8(%rax,%rcx,8), %xmm4 - mulsd %xmm4, %xmm2 - mulsd %xmm4, %xmm6 - addsd 144(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - movsd %xmm6, -24(%rsp) - movsd -24(%rsp), %xmm7 - movsd 32(%rax,%rcx,8), %xmm6 - subsd %xmm4, %xmm7 - addsd 136(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - movsd %xmm7, -16(%rsp) - movsd -24(%rsp), %xmm9 - movsd -16(%rsp), %xmm8 - addsd 128(%rax,%rcx,8), %xmm2 - subsd %xmm8, %xmm9 - mulsd %xmm4, %xmm2 - movsd %xmm9, -24(%rsp) - movsd -24(%rsp), %xmm10 - addsd 120(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - addsd 112(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - addsd 104(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - addsd 96(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - addsd 88(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - addsd 80(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - addsd 72(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - addsd 64(%rax,%rcx,8), %xmm2 - mulsd %xmm4, %xmm2 - mulsd %xmm4, %xmm2 - mulsd %xmm4, %xmm2 - subsd %xmm10, %xmm4 - movsd %xmm4, -16(%rsp) - movsd -24(%rsp), %xmm4 - movsd -16(%rsp), %xmm0 - movaps %xmm4, %xmm3 - movaps %xmm0, %xmm13 - mulsd %xmm11, %xmm3 - mulsd %xmm12, %xmm13 - mulsd %xmm0, %xmm11 - mulsd %xmm4, %xmm12 - addsd %xmm11, %xmm13 - movaps %xmm3, %xmm14 - addsd %xmm12, %xmm13 - addsd %xmm6, %xmm14 - movsd %xmm13, -24(%rsp) - movsd -24(%rsp), %xmm7 - movsd %xmm14, -24(%rsp) - movsd -24(%rsp), %xmm15 - subsd %xmm15, %xmm6 - addsd %xmm3, %xmm6 - movsd %xmm6, -16(%rsp) - movsd -24(%rsp), %xmm11 - mulsd %xmm11, %xmm1 - movsd -16(%rsp), %xmm14 - movsd %xmm1, -24(%rsp) - addsd %xmm7, %xmm14 - movsd -24(%rsp), %xmm1 - subsd %xmm11, %xmm1 - addsd 40(%rax,%rcx,8), %xmm14 - movsd %xmm1, -16(%rsp) - movaps %xmm0, %xmm1 - movsd -24(%rsp), %xmm9 - movsd -16(%rsp), %xmm8 - subsd %xmm8, %xmm9 - movsd %xmm9, -24(%rsp) - movsd -24(%rsp), %xmm10 - subsd %xmm10, %xmm11 - movsd %xmm11, -16(%rsp) - movsd -24(%rsp), %xmm13 - movsd -16(%rsp), %xmm12 - movaps %xmm13, %xmm3 - mulsd %xmm0, %xmm13 - addsd %xmm12, %xmm14 - mulsd %xmm4, %xmm3 - mulsd %xmm14, %xmm1 - mulsd %xmm14, %xmm4 - addsd %xmm13, %xmm1 - movaps %xmm3, %xmm0 - addsd %xmm4, %xmm1 - movsd %xmm1, -24(%rsp) - movsd 16(%rax,%rcx,8), %xmm1 - movsd -24(%rsp), %xmm15 - addsd %xmm1, %xmm0 - movsd %xmm0, -24(%rsp) - movsd -24(%rsp), %xmm4 - subsd %xmm4, %xmm1 - addsd %xmm3, %xmm1 - movsd %xmm1, -16(%rsp) - movsd -24(%rsp), %xmm1 - movsd -16(%rsp), %xmm0 - addsd %xmm15, %xmm0 - addsd 24(%rax,%rcx,8), %xmm0 - addsd %xmm0, %xmm2 - movsd %xmm2, -24(%rsp) - movsd -24(%rsp), %xmm0 - addsd %xmm1, %xmm0 - mulsd %xmm5, %xmm0 - ret -..B1.6: - lea 3632+_vmldErfHATab(%rip), %rax - lea 3608+_vmldErfHATab(%rip), %rdx - movsd (%rax), %xmm0 - addsd (%rdx), %xmm0 - mulsd %xmm5, %xmm0 -..B1.7: - ret -..B1.8: - movaps %xmm4, %xmm6 - lea 3592+_vmldErfHATab(%rip), %rax - mulsd %xmm4, %xmm6 - lea 3584+_vmldErfHATab(%rip), %rdx - movsd (%rax), %xmm3 - lea 3576+_vmldErfHATab(%rip), %rcx - mulsd %xmm6, %xmm3 - movaps %xmm4, %xmm12 - mulsd %xmm6, %xmm12 - addsd (%rdx), %xmm3 - mulsd %xmm6, %xmm3 - lea 3616+_vmldErfHATab(%rip), %r10 - lea 3568+_vmldErfHATab(%rip), %rsi - lea 3560+_vmldErfHATab(%rip), %rdi - movsd (%r10), %xmm7 - lea 3544+_vmldErfHATab(%rip), %r8 - mulsd %xmm12, %xmm7 - addsd (%rcx), %xmm3 - mulsd %xmm6, %xmm3 - lea 3552+_vmldErfHATab(%rip), %r9 - movsd %xmm7, -24(%rsp) - lea 3528+_vmldErfHATab(%rip), %r11 - movsd -24(%rsp), %xmm8 - lea 3536+_vmldErfHATab(%rip), %rax - movsd (%r8), %xmm14 - subsd %xmm12, %xmm8 - addsd (%rsi), %xmm3 - mulsd %xmm6, %xmm3 - movaps %xmm14, %xmm2 - movsd %xmm8, -16(%rsp) - movsd -24(%rsp), %xmm10 - movsd -16(%rsp), %xmm9 - movsd (%r9), %xmm15 - subsd %xmm9, %xmm10 - addsd (%rdi), %xmm3 - mulsd %xmm6, %xmm3 - movaps %xmm4, %xmm6 - mulsd (%r10), %xmm6 - mulsd %xmm12, %xmm3 - movsd %xmm10, -24(%rsp) - movsd -24(%rsp), %xmm11 - subsd %xmm11, %xmm12 - movsd %xmm12, -16(%rsp) - movsd -24(%rsp), %xmm0 - movsd -16(%rsp), %xmm13 - movaps %xmm13, %xmm1 - mulsd %xmm15, %xmm1 - mulsd %xmm13, %xmm14 - mulsd %xmm0, %xmm2 - mulsd %xmm15, %xmm0 - addsd %xmm14, %xmm1 - addsd %xmm0, %xmm1 - movsd %xmm1, -24(%rsp) - movsd -24(%rsp), %xmm1 - movsd %xmm6, -24(%rsp) - movsd -24(%rsp), %xmm7 - movsd (%r11), %xmm6 - movaps %xmm6, %xmm0 - subsd -8(%rsp), %xmm7 - movsd %xmm7, -16(%rsp) - movsd -24(%rsp), %xmm9 - movsd -16(%rsp), %xmm8 - movsd (%rax), %xmm7 - subsd %xmm8, %xmm9 - movsd %xmm9, -24(%rsp) - movsd -24(%rsp), %xmm10 - subsd %xmm10, %xmm4 - movaps %xmm2, %xmm10 - addsd %xmm3, %xmm10 - movsd %xmm4, -16(%rsp) - movsd -24(%rsp), %xmm8 - movsd -16(%rsp), %xmm4 - movaps %xmm4, %xmm9 - mulsd %xmm7, %xmm9 - mulsd %xmm4, %xmm6 - mulsd %xmm8, %xmm0 - mulsd %xmm7, %xmm8 - addsd %xmm6, %xmm9 - addsd %xmm8, %xmm9 - movsd %xmm9, -24(%rsp) - movsd -24(%rsp), %xmm12 - movsd %xmm10, -24(%rsp) - movsd -24(%rsp), %xmm4 - subsd %xmm4, %xmm2 - addsd %xmm3, %xmm2 - movsd %xmm2, -16(%rsp) - movsd -24(%rsp), %xmm3 - movsd -16(%rsp), %xmm11 - addsd %xmm1, %xmm11 - movaps %xmm0, %xmm1 - addsd %xmm3, %xmm1 - addsd %xmm11, %xmm12 - movsd %xmm1, -24(%rsp) - movsd -24(%rsp), %xmm2 - subsd %xmm2, %xmm0 - addsd %xmm3, %xmm0 - movsd %xmm0, -16(%rsp) - movsd -24(%rsp), %xmm0 - movsd -16(%rsp), %xmm13 - addsd %xmm12, %xmm13 - addsd %xmm13, %xmm0 - mulsd %xmm5, %xmm0 - ret -..B1.9: - lea 3624+_vmldErfHATab(%rip), %rax - ucomisd (%rax), %xmm4 - jp ..B1.10 - je ..B1.7 -..B1.10: - testl %esi, %esi - jne ..B1.16 -..B1.11: - lea 3656+_vmldErfHATab(%rip), %rax - comisd (%rax), %xmm4 - jae ..B1.16 -..B1.12: - lea 3600+_vmldErfHATab(%rip), %rax - lea 3648+_vmldErfHATab(%rip), %rdx - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - comisd (%rdx), %xmm4 - jb ..B1.14 -..B1.13: - lea 3616+_vmldErfHATab(%rip), %rax - movaps %xmm0, %xmm1 - lea 3536+_vmldErfHATab(%rip), %rcx - lea 3528+_vmldErfHATab(%rip), %rdx - lea 3608+_vmldErfHATab(%rip), %rsi - movsd (%rax), %xmm10 - movsd (%rdx), %xmm8 - mulsd %xmm10, %xmm1 - movsd %xmm1, -24(%rsp) - movsd -24(%rsp), %xmm2 - subsd %xmm0, %xmm2 - movsd %xmm2, -16(%rsp) - movsd -24(%rsp), %xmm4 - movsd -16(%rsp), %xmm3 - subsd %xmm3, %xmm4 - movsd %xmm4, -24(%rsp) - movsd -24(%rsp), %xmm5 - subsd %xmm5, %xmm0 - movsd %xmm0, -16(%rsp) - movsd -24(%rsp), %xmm6 - movsd -16(%rsp), %xmm7 - movaps %xmm6, %xmm15 - movsd (%rcx), %xmm0 - movaps %xmm7, %xmm9 - mulsd %xmm0, %xmm9 - mulsd %xmm0, %xmm6 - mulsd %xmm8, %xmm15 - mulsd %xmm7, %xmm8 - addsd %xmm6, %xmm9 - mulsd %xmm15, %xmm10 - addsd %xmm8, %xmm9 - movsd %xmm9, -24(%rsp) - movsd -24(%rsp), %xmm0 - movsd %xmm10, -24(%rsp) - movsd -24(%rsp), %xmm11 - subsd %xmm15, %xmm11 - movsd %xmm11, -16(%rsp) - movsd -24(%rsp), %xmm13 - movsd -16(%rsp), %xmm12 - subsd %xmm12, %xmm13 - movsd %xmm13, -24(%rsp) - movsd -24(%rsp), %xmm14 - subsd %xmm14, %xmm15 - movsd %xmm15, -16(%rsp) - movsd -24(%rsp), %xmm11 - movsd -16(%rsp), %xmm10 - mulsd (%rsi), %xmm11 - addsd %xmm10, %xmm0 - mulsd (%rsi), %xmm0 - movsd %xmm11, -24(%rsp) - movsd %xmm0, -16(%rsp) - movsd -24(%rsp), %xmm2 - movsd -16(%rsp), %xmm1 - addsd %xmm1, %xmm2 - jmp ..B1.15 -..B1.14: - lea 3520+_vmldErfHATab(%rip), %rax - lea 3608+_vmldErfHATab(%rip), %rdx - movsd (%rax), %xmm2 - mulsd %xmm0, %xmm2 - mulsd (%rdx), %xmm2 -..B1.15: - movaps %xmm2, %xmm0 - ret -..B1.16: - lea 3600+_vmldErfHATab(%rip), %rax - lea 3616+_vmldErfHATab(%rip), %rdx - lea 3528+_vmldErfHATab(%rip), %rcx - lea 3536+_vmldErfHATab(%rip), %rsi - lea 3608+_vmldErfHATab(%rip), %rdi - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd (%rdx), %xmm2 - mulsd %xmm0, %xmm2 - movsd %xmm2, -24(%rsp) - movsd -24(%rsp), %xmm3 - movsd (%rcx), %xmm10 - subsd %xmm0, %xmm3 - movsd %xmm3, -16(%rsp) - movsd -24(%rsp), %xmm5 - movsd -16(%rsp), %xmm4 - movsd (%rsi), %xmm7 - subsd %xmm4, %xmm5 - movsd %xmm5, -24(%rsp) - movsd -24(%rsp), %xmm6 - subsd %xmm6, %xmm0 - movsd %xmm0, -16(%rsp) - movaps %xmm10, %xmm0 - movsd -24(%rsp), %xmm8 - movsd -16(%rsp), %xmm9 - movaps %xmm9, %xmm11 - mulsd %xmm8, %xmm0 - mulsd %xmm7, %xmm11 - mulsd %xmm7, %xmm8 - mulsd %xmm9, %xmm10 - addsd %xmm8, %xmm11 - addsd %xmm10, %xmm11 - movsd %xmm11, -24(%rsp) - movsd -24(%rsp), %xmm12 - addsd %xmm12, %xmm0 - mulsd (%rdi), %xmm0 - ret -..B1.17: - testl $1048575, -4(%rsp) - jne ..B1.20 -..B1.18: - cmpl $0, -8(%rsp) - jne ..B1.20 -..B1.19: - lea 3632+_vmldErfHATab(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm5, %xmm0 - ret -..B1.20: - movsd -8(%rsp), %xmm0 - addsd %xmm0, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type erf,@function - .size erf,.-erf - .data -# -- End erf - .section .rodata, "a" - .align 8 - .align 8 -_vmldErfHATab: - .long 0 - .long 1077936128 - .long 0 - .long 3222405120 - .long 3270920536 - .long 1069821311 - .long 1057270100 - .long 1014821379 - .long 337483220 - .long 1067561815 - .long 2929153520 - .long 1012421262 - .long 4026531840 - .long 3206801857 - .long 1030462481 - .long 3179971874 - .long 1486349066 - .long 3202788052 - .long 134277178 - .long 1047766669 - .long 1212351331 - .long 1042946157 - .long 1104268445 - .long 3183073920 - .long 2950952656 - .long 3177697379 - .long 1025949206 - .long 1022984782 - .long 1815731286 - .long 1017231760 - .long 3033581736 - .long 3157533247 - .long 2954897717 - .long 3151375491 - .long 1303182986 - .long 996834239 - .long 795652555 - .long 990371394 - .long 2343572077 - .long 3130906588 - .long 0 - .long 1077936128 - .long 0 - .long 3222667264 - .long 266066941 - .long 1070109953 - .long 2023669004 - .long 1013041695 - .long 3705654820 - .long 1067550541 - .long 3566009421 - .long 1011293070 - .long 134217728 - .long 3207076363 - .long 3355205190 - .long 3180252909 - .long 2219056158 - .long 3202743700 - .long 3264865953 - .long 1048027271 - .long 3807428681 - .long 1042858920 - .long 3066569234 - .long 3183403162 - .long 1059612996 - .long 3177583001 - .long 1631410288 - .long 1023296102 - .long 1209224421 - .long 1017119299 - .long 3957039910 - .long 3157768207 - .long 2748118263 - .long 3151198590 - .long 1787505922 - .long 997129044 - .long 167794763 - .long 990139564 - .long 2444798020 - .long 3131135431 - .long 0 - .long 1077936128 - .long 0 - .long 3222929408 - .long 3508744758 - .long 1070395510 - .long 3777053507 - .long 1014792775 - .long 2239870848 - .long 1067537158 - .long 80412370 - .long 1012585610 - .long 2550136832 - .long 3207341802 - .long 731471944 - .long 3177077062 - .long 620528720 - .long 3202691430 - .long 3841836855 - .long 1048273069 - .long 190893310 - .long 1042756870 - .long 3560172648 - .long 3183591033 - .long 3053707503 - .long 3177450205 - .long 2206487565 - .long 1023491751 - .long 3218422968 - .long 1016860737 - .long 598928797 - .long 3157970519 - .long 2475988840 - .long 3150996363 - .long 1159941103 - .long 997284625 - .long 3398924683 - .long 989876643 - .long 798935564 - .long 3131261061 - .long 0 - .long 1077936128 - .long 0 - .long 3223191552 - .long 1770174791 - .long 1070636781 - .long 4205036945 - .long 1015375813 - .long 2413196824 - .long 1067521741 - .long 2601975064 - .long 1005834579 - .long 2952790016 - .long 3207595360 - .long 3658041887 - .long 3181077562 - .long 4169926782 - .long 3202631738 - .long 2555230105 - .long 1048501852 - .long 2080004756 - .long 1042641364 - .long 4228979116 - .long 3183726688 - .long 3050753797 - .long 3177301266 - .long 157144205 - .long 1023611097 - .long 477563032 - .long 1016572798 - .long 1180941066 - .long 3158136250 - .long 103748847 - .long 3150576732 - .long 855028858 - .long 997378869 - .long 3717241463 - .long 989324501 - .long 2285599851 - .long 3131350893 - .long 0 - .long 1076887552 - .long 0 - .long 3222405120 - .long 2340732634 - .long 1070844330 - .long 1402414124 - .long 1012108932 - .long 4199089954 - .long 1068543572 - .long 2559319735 - .long 1013022575 - .long 2550136832 - .long 3209872415 - .long 1842851526 - .long 3180929664 - .long 3057689090 - .long 3205675264 - .long 4009292523 - .long 1052886727 - .long 2015516814 - .long 1047689133 - .long 520582071 - .long 3190189211 - .long 3416096878 - .long 3184261095 - .long 1113028140 - .long 1032138739 - .long 3929660173 - .long 1025537235 - .long 1947345592 - .long 3168795649 - .long 1874355335 - .long 3161325647 - .long 790309391 - .long 1010046575 - .long 3732702576 - .long 1001648133 - .long 3279395584 - .long 3146093738 - .long 0 - .long 1076887552 - .long 0 - .long 3222667264 - .long 1155126243 - .long 1071112537 - .long 4058417554 - .long 1015654408 - .long 4091643817 - .long 1068501692 - .long 992009585 - .long 1011189456 - .long 3355443200 - .long 3210088131 - .long 577555187 - .long 3183302762 - .long 3137228493 - .long 3205518745 - .long 1652609564 - .long 1053053423 - .long 3828684380 - .long 1047267014 - .long 859309674 - .long 3190350551 - .long 1723732682 - .long 3183536714 - .long 3655321812 - .long 1032243418 - .long 1849688920 - .long 1023985400 - .long 3853991388 - .long 3168837843 - .long 3217410018 - .long 1007305761 - .long 15852099 - .long 1010050248 - .long 1197806868 - .long 3148971557 - .long 1066481688 - .long 3146043461 - .long 0 - .long 1076887552 - .long 0 - .long 3222929408 - .long 3259520439 - .long 1071369470 - .long 2827660931 - .long 1015400118 - .long 2387383117 - .long 1068408154 - .long 3928547609 - .long 1012504486 - .long 2415919104 - .long 3210272729 - .long 2041761256 - .long 3182227901 - .long 2378546067 - .long 3205191821 - .long 2022373860 - .long 1053172536 - .long 1539712272 - .long 1046637816 - .long 2866781005 - .long 3190430666 - .long 1973204487 - .long 3181753511 - .long 471306766 - .long 1032252941 - .long 3917954587 - .long 3170909470 - .long 1575996247 - .long 3168793506 - .long 2080089276 - .long 1013809777 - .long 3478556236 - .long 1009933722 - .long 556567750 - .long 3150565473 - .long 3617504985 - .long 3145850711 - .long 0 - .long 1076887552 - .long 0 - .long 3223191552 - .long 2839711645 - .long 1071613690 - .long 2970658322 - .long 1014602120 - .long 3815538168 - .long 1068301377 - .long 1215242252 - .long 1012502501 - .long 3221225472 - .long 3210423421 - .long 1694424286 - .long 3182745304 - .long 2482618577 - .long 3204819422 - .long 1490180077 - .long 1053241721 - .long 716537363 - .long 1045509088 - .long 3220326238 - .long 3190429019 - .long 1649943177 - .long 1034362954 - .long 149820908 - .long 1032171009 - .long 2913777793 - .long 3172667222 - .long 2916685335 - .long 3168553958 - .long 3423621657 - .long 1014717380 - .long 3520470914 - .long 1009649189 - .long 1724012134 - .long 3151216830 - .long 973445297 - .long 3145359701 - .long 0 - .long 1075838976 - .long 0 - .long 3222405120 - .long 2293685631 - .long 1071799178 - .long 995883061 - .long 1015632714 - .long 3793057312 - .long 1069174900 - .long 303272667 - .long 1011854732 - .long 2013265920 - .long 3212679811 - .long 2434603502 - .long 3185139859 - .long 492809813 - .long 3207185437 - .long 3249638684 - .long 1057446891 - .long 3644008036 - .long 3197518090 - .long 2427527080 - .long 3196575624 - .long 382948573 - .long 1043637576 - .long 3944285033 - .long 1040289590 - .long 3216947186 - .long 3183007329 - .long 3738834740 - .long 3178455694 - .long 3578811002 - .long 1026832616 - .long 2077607461 - .long 1021301705 - .long 1329130827 - .long 3165226306 - .long 2937198399 - .long 3158390279 - .long 0 - .long 1075838976 - .long 0 - .long 3222667264 - .long 1026243227 - .long 1071999268 - .long 19842292 - .long 1014558455 - .long 615820035 - .long 1068925439 - .long 3077235950 - .long 1013851225 - .long 3489660928 - .long 3212767934 - .long 727482074 - .long 3183723353 - .long 1434284591 - .long 3204072020 - .long 1546025314 - .long 1057305153 - .long 3311043419 - .long 3199555764 - .long 1534557980 - .long 3196172205 - .long 1003545269 - .long 1044455453 - .long 982041524 - .long 1039309150 - .long 1046902208 - .long 3183487308 - .long 1293621534 - .long 3176225124 - .long 3225792447 - .long 1026964909 - .long 3923689281 - .long 3166944983 - .long 2903296563 - .long 3165127275 - .long 3175926173 - .long 1011691029 - .long 0 - .long 1075838976 - .long 0 - .long 3222929408 - .long 4209868920 - .long 1072167835 - .long 1271589702 - .long 1014394097 - .long 3991103290 - .long 1068673244 - .long 1964927110 - .long 1013592604 - .long 0 - .long 3212726887 - .long 4238629777 - .long 3183774781 - .long 1807339610 - .long 1059053689 - .long 35311788 - .long 1057028643 - .long 3165087585 - .long 3200229918 - .long 3586452917 - .long 3195213126 - .long 1777317359 - .long 1044610644 - .long 1848687836 - .long 1033934742 - .long 31916095 - .long 3183379115 - .long 185553482 - .long 1029904423 - .long 882484870 - .long 1026631250 - .long 3164391940 - .long 3169115287 - .long 3325423896 - .long 3164355775 - .long 3234707527 - .long 1012695165 - .long 0 - .long 1075838976 - .long 0 - .long 3223191552 - .long 2708123311 - .long 1072305489 - .long 1189046596 - .long 1013601674 - .long 1868283783 - .long 1068367010 - .long 1099775820 - .long 1012435153 - .long 1207959552 - .long 3212582104 - .long 3523250270 - .long 3180953827 - .long 1977223559 - .long 1059998873 - .long 469007091 - .long 1056393187 - .long 17425450 - .long 3200373232 - .long 391965510 - .long 3192157780 - .long 3314858537 - .long 1044490263 - .long 3600399866 - .long 3186407596 - .long 3215068466 - .long 3182787442 - .long 3697861179 - .long 1030898835 - .long 2771081374 - .long 1025463657 - .long 4146920243 - .long 3169520105 - .long 3077194481 - .long 3160459915 - .long 1463264555 - .long 1012730022 - .long 0 - .long 1074790400 - .long 0 - .long 3222405120 - .long 673836129 - .long 1072459181 - .long 1403851199 - .long 1016899858 - .long 3166402837 - .long 1068785305 - .long 375843704 - .long 1012382807 - .long 4026531840 - .long 3214338668 - .long 3760928269 - .long 3186707360 - .long 4037675931 - .long 1063570236 - .long 828875333 - .long 1058841864 - .long 1595734612 - .long 3205457361 - .long 3240025461 - .long 1053807046 - .long 2217213834 - .long 1050913991 - .long 1140208334 - .long 3195581500 - .long 1536578125 - .long 3189218053 - .long 1785608939 - .long 1041425703 - .long 3818468589 - .long 3183948101 - .long 4224809191 - .long 3181546992 - .long 1254902324 - .long 1030336836 - .long 2610385435 - .long 1025933392 - .long 0 - .long 1074790400 - .long 0 - .long 3222667264 - .long 3283395580 - .long 1072584552 - .long 1619691918 - .long 1013495334 - .long 1548049162 - .long 1067830873 - .long 1866614584 - .long 1009528830 - .long 3623878656 - .long 3213753274 - .long 3080383738 - .long 3186326900 - .long 2195737703 - .long 1063532365 - .long 1389581926 - .long 3206495117 - .long 1284275250 - .long 3204405036 - .long 1388678495 - .long 1054257519 - .long 2607787780 - .long 3195486202 - .long 1954028197 - .long 3195106308 - .long 1000142209 - .long 1043978813 - .long 4289390618 - .long 1039480054 - .long 1829994710 - .long 3184933148 - .long 1801900516 - .long 1031672376 - .long 994367613 - .long 1030081754 - .long 1886321575 - .long 3173571539 - .long 0 - .long 1074790400 - .long 0 - .long 3222929408 - .long 996654454 - .long 1072648041 - .long 2055905835 - .long 1016797060 - .long 2025629493 - .long 1066703316 - .long 3207138551 - .long 1007886082 - .long 2684354560 - .long 3212885244 - .long 3640404479 - .long 3184577086 - .long 3785526942 - .long 1063085617 - .long 914780829 - .long 3207165120 - .long 198538566 - .long 3200351555 - .long 743164606 - .long 1053656447 - .long 257739447 - .long 3197719723 - .long 4013344053 - .long 3192054846 - .long 2448984831 - .long 1043799255 - .long 301239699 - .long 3187102807 - .long 4198692195 - .long 3183507635 - .long 252775780 - .long 1033310081 - .long 3936202859 - .long 3174119617 - .long 2832995703 - .long 3173394688 - .long 0 - .long 1074790400 - .long 0 - .long 3223191552 - .long 4009021290 - .long 1072676449 - .long 2313960863 - .long 1015111149 - .long 939498435 - .long 1065430251 - .long 2354454115 - .long 1009400884 - .long 2147483648 - .long 3211794972 - .long 482970327 - .long 3184656008 - .long 3337941139 - .long 1062290385 - .long 1376485817 - .long 3206914838 - .long 3849340321 - .long 1055357361 - .long 3350371102 - .long 1051775129 - .long 2861188266 - .long 3197382603 - .long 2109605468 - .long 1045917685 - .long 3237589551 - .long 1041743271 - .long 485240880 - .long 3187249602 - .long 3692998039 - .long 1035162550 - .long 2284233074 - .long 1031989748 - .long 2141078118 - .long 3176508222 - .long 2775821538 - .long 1021961626 - .long 0 - .long 1073741824 - .long 0 - .long 3222405120 - .long 1979914676 - .long 1072690180 - .long 3909090605 - .long 1014961349 - .long 2850023777 - .long 1064124739 - .long 2716929087 - .long 1007836215 - .long 134217728 - .long 3211818166 - .long 661707185 - .long 3185457101 - .long 511854090 - .long 1063665398 - .long 846761866 - .long 3209923224 - .long 2075885217 - .long 1060492209 - .long 3563065698 - .long 3204958944 - .long 791923268 - .long 3201693745 - .long 905515084 - .long 1053843502 - .long 2412959807 - .long 3198694704 - .long 3378187023 - .long 3192392758 - .long 389556620 - .long 1046549597 - .long 4094604040 - .long 3191327001 - .long 2261901381 - .long 3186206862 - .long 3040498429 - .long 1038898667 - .long 0 - .long 1073741824 - .long 0 - .long 3222667264 - .long 4211364825 - .long 1072693036 - .long 2280492610 - .long 1015654639 - .long 3441679161 - .long 1060320780 - .long 631077559 - .long 1005402779 - .long 2550136832 - .long 3208276561 - .long 952708928 - .long 3179317867 - .long 1724702579 - .long 1060543732 - .long 1940663234 - .long 3207246018 - .long 1617314154 - .long 1058444121 - .long 3218201639 - .long 3204130645 - .long 1677675407 - .long 1054157666 - .long 983365761 - .long 3197588855 - .long 3697581654 - .long 3196234675 - .long 2384146406 - .long 1047319959 - .long 271521235 - .long 3191905541 - .long 1276705943 - .long 3186754722 - .long 2179097654 - .long 1039567487 - .long 301655052 - .long 3184379693 - .long 0 - .long 1073741824 - .long 0 - .long 3222929408 - .long 4193680981 - .long 1072693238 - .long 4060240663 - .long 1015946834 - .long 2365640378 - .long 1055824734 - .long 3526748952 - .long 995134091 - .long 3489660928 - .long 3203980860 - .long 2590051195 - .long 3175384383 - .long 2654771569 - .long 1056549448 - .long 4010094511 - .long 3203581909 - .long 3526856597 - .long 1055166628 - .long 1319720904 - .long 3201385798 - .long 499971761 - .long 1052133367 - .long 2524150070 - .long 3197462343 - .long 3595721810 - .long 1047211062 - .long 32165415 - .long 3189999948 - .long 131183479 - .long 3189246514 - .long 3500428453 - .long 1040184954 - .long 4217742894 - .long 3184647883 - .long 1659999320 - .long 3176152785 - .long 0 - .long 1073741824 - .long 0 - .long 3223191552 - .long 3270603235 - .long 1072693247 - .long 789463291 - .long 1015570140 - .long 3808393842 - .long 1050514289 - .long 2326429486 - .long 994919830 - .long 3221225472 - .long 3198925370 - .long 1345776679 - .long 3171106320 - .long 2968647484 - .long 1051768487 - .long 2248759888 - .long 3199010549 - .long 3387299329 - .long 1050887019 - .long 1430298481 - .long 3197384059 - .long 1348250416 - .long 1048645854 - .long 4055449617 - .long 3194443371 - .long 1237453215 - .long 1045012312 - .long 3542750561 - .long 3190150798 - .long 2477123228 - .long 1039795927 - .long 1515061420 - .long 3182966354 - .long 468112447 - .long 3181397693 - .long 3085255916 - .long 1032264152 - .long 0 - .long 1072693248 - .long 0 - .long 3222405120 - .long 4293196336 - .long 1072693247 - .long 2846765772 - .long 1013778335 - .long 708045282 - .long 1042226741 - .long 3617872673 - .long 984839576 - .long 3758096384 - .long 3191963901 - .long 3393404685 - .long 3164431480 - .long 678234459 - .long 1046059910 - .long 3154637626 - .long 3194706316 - .long 2318517263 - .long 1047966141 - .long 3341209390 - .long 3195954445 - .long 800124789 - .long 1048630880 - .long 2824228362 - .long 3196018487 - .long 785851381 - .long 1048106191 - .long 4129204204 - .long 3195061111 - .long 3370612561 - .long 1046690463 - .long 1422845730 - .long 3193098259 - .long 1920503482 - .long 1044382253 - .long 2798351277 - .long 3189961775 - .long 2515384124 - .long 1072782465 - .long 4217971979 - .long 3222778785 - .long 4294967193 - .long 1072693247 - .long 1248116507 - .long 1015814019 - .long 955504597 - .long 1027630151 - .long 942964606 - .long 972301410 - .long 268435456 - .long 3177488267 - .long 3130289062 - .long 3150952764 - .long 4292327811 - .long 1031864837 - .long 2929831361 - .long 3180636976 - .long 1961758009 - .long 1034139815 - .long 5545144 - .long 3182345703 - .long 485665603 - .long 1035212938 - .long 2600921430 - .long 3182853574 - .long 3983926904 - .long 1035334367 - .long 3203204633 - .long 3182602207 - .long 3287855196 - .long 1034606778 - .long 3286302033 - .long 3181514701 - .long 1856488612 - .long 1033626459 - .long 4001991753 - .long 3180127602 - .long 1346542445 - .long 1072827863 - .long 1342177280 - .long 1072827863 - .long 1147899556 - .long 1041278683 - .long 1744830464 - .long 3218608756 - .long 902814497 - .long 3190299599 - .long 436480833 - .long 1069343474 - .long 824474678 - .long 3214639822 - .long 3302084921 - .long 1064658364 - .long 3780041965 - .long 3209429686 - .long 3655817560 - .long 1059021901 - .long 0 - .long 1282408448 - .long 0 - .long 862978048 - .long 33554432 - .long 1101004800 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .long 0 - .long 256 - .long 1222277045 - .long 929276 - .long 0 - .long 1069547520 - .long 2378786344 - .long 1075294132 - .type _vmldErfHATab,@object - .size _vmldErfHATab,3680 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfc.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfc.S deleted file mode 100644 index 1169a8ac3d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfc.S +++ /dev/null @@ -1,2064 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erfc.c" - .text -..TXTST0: -# -- Begin erfc - .text - .align 16,0x90 - .globl erfc -erfc: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_erfc.1: -..L2: - - movaps %xmm0, %xmm1 - movsd %xmm1, -8(%rsp) - movzwl -2(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2047, %eax - je ..B1.18 -..B1.2: - cmpl $953, %eax - jl ..B1.16 -..B1.3: - lea 5016+_vmldErfcHATab(%rip), %rax - movb -1(%rsp), %dil - comisd (%rax), %xmm1 - jbe ..B1.15 -..B1.4: - lea 4992+_vmldErfcHATab(%rip), %rax - movsd (%rax), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B1.25 -..B1.5: - lea 4968+_vmldErfcHATab(%rip), %rcx - movb %dil, %sil - movsd %xmm1, -48(%rsp) - andb $127, %sil - movb %sil, -41(%rsp) - movsd -48(%rsp), %xmm3 - movsd (%rcx), %xmm2 - movaps %xmm3, %xmm7 - addsd %xmm2, %xmm7 - mulsd %xmm7, %xmm7 - mulsd %xmm7, %xmm7 - movsd %xmm7, -16(%rsp) - movzwl -10(%rsp), %edx - andl $32752, %edx - shrl $4, %edx - lea -1023(%rdx), %esi - lea -3069(%rdx,%rdx,2), %ecx - lea _vmldErfcHATab(%rip), %rdx - lea (,%rcx,8), %eax - lea 1(,%rcx,8), %r9d - lea 23(,%rcx,8), %r10d - movsd (%rdx,%rax,8), %xmm12 - lea 22(,%rcx,8), %r11d - mulsd %xmm3, %xmm12 - lea 21(,%rcx,8), %eax - movsd (%rdx,%r9,8), %xmm4 - movaps %xmm12, %xmm6 - addsd %xmm12, %xmm4 - movsd %xmm4, -40(%rsp) - movsd -40(%rsp), %xmm5 - subsd %xmm5, %xmm6 - movsd %xmm6, -32(%rsp) - movsd -40(%rsp), %xmm9 - movsd -32(%rsp), %xmm8 - addsd %xmm8, %xmm9 - movsd %xmm9, -24(%rsp) - movsd -32(%rsp), %xmm10 - addsd (%rdx,%r9,8), %xmm10 - movsd %xmm10, -32(%rsp) - lea 20(,%rcx,8), %r9d - movsd -24(%rsp), %xmm11 - subsd %xmm11, %xmm12 - movsd (%rdx,%r10,8), %xmm11 - movsd %xmm12, -24(%rsp) - lea 19(,%rcx,8), %r10d - movsd -32(%rsp), %xmm14 - movsd -24(%rsp), %xmm13 - addsd %xmm13, %xmm14 - movsd %xmm14, -24(%rsp) - movsd -40(%rsp), %xmm5 - mulsd %xmm5, %xmm11 - movaps %xmm5, %xmm0 - movaps %xmm5, %xmm15 - addsd (%rdx,%r11,8), %xmm11 - mulsd %xmm5, %xmm15 - mulsd %xmm5, %xmm11 - mulsd %xmm15, %xmm15 - addsd (%rdx,%rax,8), %xmm11 - mulsd %xmm5, %xmm11 - lea 18(,%rcx,8), %eax - movsd -24(%rsp), %xmm6 - lea 16(,%rcx,8), %r11d - movsd %xmm15, -16(%rsp) - addsd (%rdx,%r9,8), %xmm11 - mulsd %xmm5, %xmm11 - lea 17(,%rcx,8), %r9d - addsd (%rdx,%r10,8), %xmm11 - mulsd %xmm5, %xmm11 - lea 12(,%rcx,8), %r10d - movsd (%rdx,%r10,8), %xmm10 - lea 8(,%rcx,8), %r10d - movaps %xmm10, %xmm8 - addsd (%rdx,%rax,8), %xmm11 - mulsd %xmm5, %xmm11 - lea 15(,%rcx,8), %eax - addsd (%rdx,%r9,8), %xmm11 - mulsd %xmm5, %xmm11 - lea 14(,%rcx,8), %r9d - addsd (%rdx,%r11,8), %xmm11 - mulsd %xmm5, %xmm11 - lea 10(,%rcx,8), %r11d - addsd (%rdx,%rax,8), %xmm11 - lea 4944+_vmldErfcHATab(%rip), %rax - movsd (%rax), %xmm7 - mulsd %xmm7, %xmm0 - mulsd %xmm5, %xmm11 - movsd %xmm0, -40(%rsp) - movsd -40(%rsp), %xmm1 - subsd %xmm5, %xmm1 - addsd (%rdx,%r9,8), %xmm11 - movsd %xmm1, -32(%rsp) - lea 13(,%rcx,8), %r9d - movsd -40(%rsp), %xmm3 - movsd -32(%rsp), %xmm15 - mulsd %xmm5, %xmm11 - subsd %xmm15, %xmm3 - movsd %xmm3, -40(%rsp) - addsd %xmm11, %xmm8 - movsd -40(%rsp), %xmm4 - movsd (%rdx,%r11,8), %xmm15 - lea 6(,%rcx,8), %r11d - subsd %xmm4, %xmm5 - movsd %xmm5, -32(%rsp) - movsd -40(%rsp), %xmm0 - movsd -32(%rsp), %xmm1 - movsd %xmm8, -40(%rsp) - addsd %xmm6, %xmm1 - movsd -40(%rsp), %xmm9 - subsd %xmm9, %xmm10 - addsd %xmm10, %xmm11 - movsd %xmm11, -32(%rsp) - movsd -40(%rsp), %xmm3 - movaps %xmm3, %xmm12 - mulsd %xmm7, %xmm12 - movsd -32(%rsp), %xmm4 - movsd %xmm12, -40(%rsp) - movsd -40(%rsp), %xmm13 - subsd %xmm3, %xmm13 - addsd (%rdx,%r9,8), %xmm4 - movsd %xmm13, -32(%rsp) - lea 11(,%rcx,8), %r9d - movsd -40(%rsp), %xmm12 - movsd -32(%rsp), %xmm14 - subsd %xmm14, %xmm12 - movsd %xmm12, -40(%rsp) - movsd -40(%rsp), %xmm13 - subsd %xmm13, %xmm3 - movsd %xmm3, -32(%rsp) - movsd -40(%rsp), %xmm5 - movsd -32(%rsp), %xmm6 - movaps %xmm5, %xmm11 - mulsd %xmm1, %xmm5 - addsd %xmm4, %xmm6 - mulsd %xmm0, %xmm11 - movaps %xmm6, %xmm8 - movaps %xmm11, %xmm9 - mulsd %xmm1, %xmm8 - addsd %xmm15, %xmm9 - mulsd %xmm0, %xmm6 - addsd %xmm5, %xmm8 - addsd %xmm6, %xmm8 - movsd %xmm8, -40(%rsp) - movsd -40(%rsp), %xmm14 - movsd %xmm9, -40(%rsp) - movsd -40(%rsp), %xmm10 - subsd %xmm10, %xmm15 - addsd %xmm11, %xmm15 - movsd %xmm15, -32(%rsp) - movsd -40(%rsp), %xmm8 - movaps %xmm8, %xmm3 - mulsd %xmm7, %xmm3 - movsd -32(%rsp), %xmm11 - movsd %xmm3, -40(%rsp) - movaps %xmm0, %xmm3 - movsd -40(%rsp), %xmm4 - addsd %xmm14, %xmm11 - subsd %xmm8, %xmm4 - addsd (%rdx,%r9,8), %xmm11 - movsd %xmm4, -32(%rsp) - lea 9(,%rcx,8), %r9d - movsd -40(%rsp), %xmm5 - movsd -32(%rsp), %xmm14 - movsd (%rdx,%r10,8), %xmm4 - lea 4(,%rcx,8), %r10d - subsd %xmm14, %xmm5 - movsd %xmm5, -40(%rsp) - movsd -40(%rsp), %xmm6 - subsd %xmm6, %xmm8 - movsd %xmm8, -32(%rsp) - movsd -40(%rsp), %xmm10 - movsd -32(%rsp), %xmm9 - mulsd %xmm10, %xmm3 - addsd %xmm9, %xmm11 - mulsd %xmm1, %xmm10 - movaps %xmm11, %xmm12 - movaps %xmm3, %xmm13 - mulsd %xmm1, %xmm12 - addsd %xmm4, %xmm13 - mulsd %xmm0, %xmm11 - addsd %xmm10, %xmm12 - addsd %xmm11, %xmm12 - movsd %xmm12, -40(%rsp) - movsd -40(%rsp), %xmm5 - movsd %xmm13, -40(%rsp) - movsd -40(%rsp), %xmm15 - subsd %xmm15, %xmm4 - addsd %xmm3, %xmm4 - movsd %xmm4, -32(%rsp) - movsd -40(%rsp), %xmm12 - movaps %xmm12, %xmm6 - mulsd %xmm7, %xmm6 - movsd -32(%rsp), %xmm3 - movsd %xmm6, -40(%rsp) - movaps %xmm0, %xmm6 - movsd -40(%rsp), %xmm8 - addsd %xmm5, %xmm3 - subsd %xmm12, %xmm8 - addsd (%rdx,%r9,8), %xmm3 - movsd %xmm8, -32(%rsp) - lea 7(,%rcx,8), %r9d - movsd -40(%rsp), %xmm10 - movsd -32(%rsp), %xmm9 - movsd (%rdx,%r11,8), %xmm8 - lea 2(,%rcx,8), %r11d - subsd %xmm9, %xmm10 - movsd %xmm10, -40(%rsp) - movsd -40(%rsp), %xmm11 - subsd %xmm11, %xmm12 - movsd %xmm12, -32(%rsp) - movsd -40(%rsp), %xmm14 - movsd -32(%rsp), %xmm13 - mulsd %xmm14, %xmm6 - addsd %xmm13, %xmm3 - mulsd %xmm1, %xmm14 - movaps %xmm3, %xmm4 - movaps %xmm6, %xmm5 - mulsd %xmm1, %xmm4 - addsd %xmm8, %xmm5 - mulsd %xmm0, %xmm3 - addsd %xmm14, %xmm4 - addsd %xmm3, %xmm4 - movsd %xmm4, -40(%rsp) - movsd -40(%rsp), %xmm3 - movsd %xmm5, -40(%rsp) - movsd -40(%rsp), %xmm15 - subsd %xmm15, %xmm8 - addsd %xmm6, %xmm8 - movsd %xmm8, -32(%rsp) - movaps %xmm0, %xmm8 - movsd -40(%rsp), %xmm12 - movaps %xmm12, %xmm9 - mulsd %xmm7, %xmm9 - movsd -32(%rsp), %xmm6 - movsd %xmm9, -40(%rsp) - addsd %xmm3, %xmm6 - movsd -40(%rsp), %xmm10 - movsd (%rdx,%r10,8), %xmm9 - subsd %xmm12, %xmm10 - addsd (%rdx,%r9,8), %xmm6 - movsd %xmm10, -32(%rsp) - lea 5(,%rcx,8), %r9d - movsd -40(%rsp), %xmm11 - movsd -32(%rsp), %xmm4 - subsd %xmm4, %xmm11 - movsd %xmm11, -40(%rsp) - movsd -40(%rsp), %xmm5 - subsd %xmm5, %xmm12 - movsd %xmm12, -32(%rsp) - movsd -40(%rsp), %xmm3 - movsd -32(%rsp), %xmm13 - mulsd %xmm3, %xmm8 - addsd %xmm13, %xmm6 - mulsd %xmm1, %xmm3 - movaps %xmm6, %xmm4 - movaps %xmm8, %xmm5 - mulsd %xmm1, %xmm4 - addsd %xmm9, %xmm5 - mulsd %xmm0, %xmm6 - addsd %xmm3, %xmm4 - addsd %xmm6, %xmm4 - movsd %xmm4, -40(%rsp) - movsd -40(%rsp), %xmm15 - movsd %xmm5, -40(%rsp) - movsd -40(%rsp), %xmm14 - subsd %xmm14, %xmm9 - addsd %xmm8, %xmm9 - movsd %xmm9, -32(%rsp) - movsd -40(%rsp), %xmm4 - movaps %xmm4, %xmm10 - mulsd %xmm7, %xmm10 - movsd -32(%rsp), %xmm8 - movsd %xmm10, -40(%rsp) - movaps %xmm0, %xmm10 - movsd -40(%rsp), %xmm11 - addsd %xmm15, %xmm8 - subsd %xmm4, %xmm11 - addsd (%rdx,%r9,8), %xmm8 - movsd %xmm11, -32(%rsp) - movsd -40(%rsp), %xmm12 - movsd -32(%rsp), %xmm15 - subsd %xmm15, %xmm12 - movsd %xmm12, -40(%rsp) - movsd -40(%rsp), %xmm3 - subsd %xmm3, %xmm4 - movsd (%rdx,%r11,8), %xmm3 - movsd %xmm4, -32(%rsp) - movsd -40(%rsp), %xmm6 - movsd -32(%rsp), %xmm5 - mulsd %xmm6, %xmm10 - addsd %xmm5, %xmm8 - movaps %xmm8, %xmm9 - mulsd %xmm1, %xmm9 - mulsd %xmm6, %xmm1 - mulsd %xmm8, %xmm0 - addsd %xmm1, %xmm9 - addsd %xmm0, %xmm9 - movaps %xmm10, %xmm0 - addsd %xmm3, %xmm0 - movsd %xmm9, -40(%rsp) - movsd -40(%rsp), %xmm4 - movsd %xmm0, -40(%rsp) - movsd -40(%rsp), %xmm1 - subsd %xmm1, %xmm3 - addsd %xmm10, %xmm3 - movsd %xmm3, -32(%rsp) - movsd -40(%rsp), %xmm6 - movsd -32(%rsp), %xmm5 - addsd %xmm4, %xmm5 -..B1.28: - movaps %xmm6, %xmm1 - lea 3(,%rcx,8), %ecx - movsd (%rdx,%rcx,8), %xmm0 - cmpl $6, %esi - addsd %xmm0, %xmm5 - addsd %xmm5, %xmm1 - movsd %xmm1, -40(%rsp) - movsd -40(%rsp), %xmm3 - subsd %xmm3, %xmm6 - addsd %xmm5, %xmm6 - movsd %xmm6, -32(%rsp) - movsd -40(%rsp), %xmm1 - movsd -32(%rsp), %xmm0 - jae ..B1.7 -..B1.6: - movsd %xmm2, -48(%rsp) - jmp ..B1.8 -..B1.7: - movaps %xmm7, %xmm8 - lea 4976+_vmldErfcHATab(%rip), %r8 - mulsd %xmm1, %xmm8 - lea 4920+_vmldErfcHATab(%rip), %rcx - movsd %xmm8, -40(%rsp) - lea 4936+_vmldErfcHATab(%rip), %rsi - movsd -40(%rsp), %xmm9 - lea 4904+_vmldErfcHATab(%rip), %r9 - movsd -8(%rsp), %xmm4 - lea 4912+_vmldErfcHATab(%rip), %r10 - movaps %xmm4, %xmm14 - lea 3872+_vmldErfcHATab(%rip), %r11 - mulsd (%rax), %xmm14 - subsd %xmm1, %xmm9 - movsd %xmm9, -32(%rsp) - movsd -40(%rsp), %xmm11 - movsd -32(%rsp), %xmm10 - subsd %xmm10, %xmm11 - movsd %xmm11, -40(%rsp) - movsd -40(%rsp), %xmm12 - movsd (%rcx), %xmm11 - lea 3864+_vmldErfcHATab(%rip), %rcx - subsd %xmm12, %xmm1 - movsd (%r9), %xmm12 - movsd %xmm1, -32(%rsp) - lea 3848+_vmldErfcHATab(%rip), %r9 - movsd -40(%rsp), %xmm6 - movsd -32(%rsp), %xmm13 - movsd %xmm14, -40(%rsp) - addsd %xmm13, %xmm0 - movsd -40(%rsp), %xmm15 - subsd -8(%rsp), %xmm15 - movsd %xmm15, -32(%rsp) - movsd -40(%rsp), %xmm1 - movsd -32(%rsp), %xmm2 - subsd %xmm2, %xmm1 - movsd %xmm1, -40(%rsp) - movsd -40(%rsp), %xmm3 - subsd %xmm3, %xmm4 - movsd %xmm4, -32(%rsp) - movsd -40(%rsp), %xmm8 - movaps %xmm8, %xmm5 - mulsd %xmm8, %xmm5 - movsd -32(%rsp), %xmm9 - mulsd %xmm9, %xmm8 - mulsd %xmm9, %xmm9 - movsd (%r8), %xmm4 - addsd %xmm8, %xmm9 - mulsd %xmm4, %xmm5 - addsd %xmm8, %xmm9 - mulsd %xmm5, %xmm11 - movsd %xmm9, -40(%rsp) - movsd -40(%rsp), %xmm10 - mulsd %xmm10, %xmm4 - addsd (%rsi), %xmm11 - movsd %xmm11, -56(%rsp) - movsd -56(%rsp), %xmm3 - movl -56(%rsp), %r8d - movl %r8d, %eax - andl $63, %eax - subsd (%rsi), %xmm3 - mulsd %xmm3, %xmm12 - lea 3856+_vmldErfcHATab(%rip), %rsi - xorps .L_2il0floatpacket.166(%rip), %xmm3 - subsd %xmm12, %xmm5 - mulsd (%r10), %xmm3 - movaps %xmm5, %xmm13 - movaps %xmm5, %xmm2 - lea 3840+_vmldErfcHATab(%rip), %r10 - addsd %xmm3, %xmm13 - movsd %xmm13, -40(%rsp) - movsd -40(%rsp), %xmm14 - shrl $6, %r8d - subsd %xmm14, %xmm2 - movsd %xmm2, -32(%rsp) - addl $1023, %r8d - movsd -40(%rsp), %xmm1 - movsd -32(%rsp), %xmm15 - addsd %xmm15, %xmm1 - movsd %xmm1, -24(%rsp) - movsd -32(%rsp), %xmm2 - addsd %xmm2, %xmm3 - movsd %xmm3, -32(%rsp) - movsd -24(%rsp), %xmm8 - subsd %xmm8, %xmm5 - movsd %xmm5, -24(%rsp) - movsd -32(%rsp), %xmm2 - movsd -24(%rsp), %xmm5 - addsd %xmm5, %xmm2 - movsd %xmm2, -24(%rsp) - movsd -40(%rsp), %xmm12 - movaps %xmm12, %xmm1 - movaps %xmm12, %xmm8 - movsd -24(%rsp), %xmm3 - addsd %xmm4, %xmm1 - movsd %xmm1, -40(%rsp) - movsd -40(%rsp), %xmm5 - subsd %xmm5, %xmm8 - movsd (%r11), %xmm5 - movsd %xmm8, -32(%rsp) - movaps %xmm7, %xmm8 - movsd -40(%rsp), %xmm10 - lea 485(%rax,%rax), %r11d - movsd -32(%rsp), %xmm9 - lea 486(%rax,%rax), %eax - addsd %xmm9, %xmm10 - movsd %xmm10, -24(%rsp) - movsd -32(%rsp), %xmm11 - addsd %xmm11, %xmm4 - movsd %xmm4, -32(%rsp) - movsd -24(%rsp), %xmm4 - subsd %xmm4, %xmm12 - movsd %xmm12, -24(%rsp) - movsd -32(%rsp), %xmm14 - movsd -24(%rsp), %xmm13 - addsd %xmm13, %xmm14 - movsd %xmm14, -24(%rsp) - movsd -40(%rsp), %xmm4 - mulsd %xmm4, %xmm5 - movaps %xmm4, %xmm2 - movsd -24(%rsp), %xmm15 - addsd (%rcx), %xmm5 - movl %r8d, %ecx - addsd %xmm15, %xmm3 - mulsd %xmm4, %xmm5 - andl $2047, %ecx - addsd (%rsi), %xmm5 - mulsd %xmm4, %xmm5 - shll $4, %ecx - addsd (%r9), %xmm5 - mulsd %xmm4, %xmm5 - addsd (%r10), %xmm5 - mulsd %xmm4, %xmm5 - mulsd %xmm4, %xmm5 - addsd %xmm5, %xmm2 - movsd %xmm2, -32(%rsp) - movsd -32(%rsp), %xmm1 - subsd %xmm1, %xmm5 - addsd %xmm4, %xmm5 - movsd %xmm5, -24(%rsp) - movsd -32(%rsp), %xmm13 - mulsd %xmm13, %xmm8 - movsd -24(%rsp), %xmm1 - movsd %xmm8, -40(%rsp) - movsd -40(%rsp), %xmm9 - movsd (%rdx,%r11,8), %xmm5 - subsd %xmm13, %xmm9 - movsd %xmm9, -32(%rsp) - movsd -40(%rsp), %xmm11 - movsd -32(%rsp), %xmm10 - subsd %xmm10, %xmm11 - movsd %xmm11, -40(%rsp) - movsd -40(%rsp), %xmm12 - subsd %xmm12, %xmm13 - movaps %xmm5, %xmm12 - movsd %xmm13, -32(%rsp) - movsd -40(%rsp), %xmm2 - movsd -32(%rsp), %xmm14 - mulsd %xmm2, %xmm12 - addsd %xmm14, %xmm1 - movaps %xmm12, %xmm8 - addsd %xmm3, %xmm1 - movsd (%rdx,%rax,8), %xmm3 - movaps %xmm3, %xmm4 - mulsd %xmm1, %xmm4 - mulsd %xmm5, %xmm1 - addsd %xmm12, %xmm5 - mulsd %xmm3, %xmm2 - addsd %xmm1, %xmm4 - addsd %xmm2, %xmm4 - movsd %xmm4, -40(%rsp) - movsd -40(%rsp), %xmm2 - movsd %xmm5, -40(%rsp) - movsd -40(%rsp), %xmm1 - subsd %xmm1, %xmm8 - movaps %xmm7, %xmm1 - movsd %xmm8, -32(%rsp) - movsd -40(%rsp), %xmm9 - movsd -32(%rsp), %xmm3 - addsd %xmm3, %xmm9 - movsd %xmm9, -24(%rsp) - movsd -32(%rsp), %xmm10 - addsd (%rdx,%r11,8), %xmm10 - movsd %xmm10, -32(%rsp) - movsd -24(%rsp), %xmm11 - subsd %xmm11, %xmm12 - movsd %xmm12, -24(%rsp) - movsd -32(%rsp), %xmm14 - movsd -24(%rsp), %xmm13 - addsd %xmm13, %xmm14 - movsd %xmm14, -24(%rsp) - movsd -40(%rsp), %xmm8 - mulsd %xmm8, %xmm1 - movsd -24(%rsp), %xmm15 - movsd %xmm1, -40(%rsp) - movaps %xmm6, %xmm1 - movsd -40(%rsp), %xmm3 - subsd %xmm8, %xmm3 - addsd (%rdx,%rax,8), %xmm15 - movsd %xmm3, -32(%rsp) - addsd %xmm15, %xmm2 - movsd -40(%rsp), %xmm4 - lea 4952+_vmldErfcHATab(%rip), %rdx - movsd -32(%rsp), %xmm15 - subsd %xmm15, %xmm4 - movsd %xmm4, -40(%rsp) - movsd -40(%rsp), %xmm5 - movq (%rdx), %rax - subsd %xmm5, %xmm8 - movsd %xmm8, -32(%rsp) - movsd -40(%rsp), %xmm10 - movsd -32(%rsp), %xmm9 - mulsd %xmm10, %xmm1 - addsd %xmm9, %xmm2 - mulsd %xmm0, %xmm10 - movaps %xmm2, %xmm11 - mulsd %xmm0, %xmm11 - mulsd %xmm6, %xmm2 - movq %rax, -48(%rsp) - addsd %xmm2, %xmm11 - shrq $48, %rax - addsd %xmm10, %xmm11 - andl $-32753, %eax - movsd %xmm11, -40(%rsp) - orl %ecx, %eax - movsd -40(%rsp), %xmm0 - movw %ax, -42(%rsp) -..B1.8: - andb $-128, %dil - cmpb $-128, %dil - je ..B1.17 -..B1.9: - lea 5008+_vmldErfcHATab(%rip), %rax - movsd -8(%rsp), %xmm3 - movsd (%rax), %xmm2 - comisd %xmm3, %xmm2 - jbe ..B1.11 -..B1.10: - addsd %xmm1, %xmm0 - mulsd -48(%rsp), %xmm0 - ret -..B1.11: - lea 4952+_vmldErfcHATab(%rip), %rax - addl $200, %r8d - andl $2047, %r8d - lea 5000+_vmldErfcHATab(%rip), %rcx - shll $4, %r8d - movq (%rax), %rdx - movq %rdx, -48(%rsp) - shrq $48, %rdx - andl $-32753, %edx - orl %r8d, %edx - movw %dx, -42(%rsp) - movsd -48(%rsp), %xmm2 - mulsd %xmm2, %xmm1 - comisd (%rcx), %xmm3 - mulsd %xmm2, %xmm0 - jbe ..B1.13 -..B1.12: - lea 4928+_vmldErfcHATab(%rip), %rax - addsd %xmm1, %xmm0 - mulsd (%rax), %xmm0 - movaps %xmm0, %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm1, -40(%rsp) - movsd -40(%rsp), %xmm2 - addsd %xmm2, %xmm0 - ret -..B1.13: - movaps %xmm0, %xmm2 - lea 4928+_vmldErfcHATab(%rip), %rax - addsd %xmm1, %xmm2 - movsd %xmm2, -40(%rsp) - movsd -40(%rsp), %xmm3 - subsd %xmm3, %xmm1 - addsd %xmm0, %xmm1 - movsd %xmm1, -32(%rsp) - movsd -40(%rsp), %xmm5 - mulsd %xmm5, %xmm7 - movsd -32(%rsp), %xmm9 - movsd %xmm7, -40(%rsp) - movsd -40(%rsp), %xmm0 - subsd %xmm5, %xmm0 - movsd %xmm0, -32(%rsp) - movsd -40(%rsp), %xmm1 - movsd -32(%rsp), %xmm7 - subsd %xmm7, %xmm1 - movsd %xmm1, -40(%rsp) - movsd -40(%rsp), %xmm4 - subsd %xmm4, %xmm5 - movsd %xmm5, -32(%rsp) - movsd -40(%rsp), %xmm8 - movsd -32(%rsp), %xmm6 - mulsd (%rax), %xmm8 - addsd %xmm6, %xmm9 - mulsd (%rax), %xmm9 - movsd %xmm8, -40(%rsp) - movsd %xmm9, -32(%rsp) - movsd -40(%rsp), %xmm0 - movsd -32(%rsp), %xmm10 - addsd %xmm10, %xmm0 -..B1.14: - ret -..B1.15: - lea 4984+_vmldErfcHATab(%rip), %rax - lea 4928+_vmldErfcHATab(%rip), %rdx - movsd (%rax), %xmm0 - subsd (%rdx), %xmm0 - ret -..B1.16: - lea 4968+_vmldErfcHATab(%rip), %rax - movsd (%rax), %xmm0 - addsd -8(%rsp), %xmm0 - ret -..B1.17: - movsd -48(%rsp), %xmm2 - lea 4984+_vmldErfcHATab(%rip), %rax - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm0 - movsd (%rax), %xmm5 - xorps .L_2il0floatpacket.166(%rip), %xmm1 - movaps %xmm5, %xmm3 - xorps .L_2il0floatpacket.166(%rip), %xmm0 - addsd %xmm1, %xmm3 - movsd %xmm3, -40(%rsp) - movsd -40(%rsp), %xmm4 - subsd %xmm4, %xmm5 - addsd %xmm1, %xmm5 - movsd %xmm5, -32(%rsp) - movsd -40(%rsp), %xmm11 - movaps %xmm11, %xmm1 - movaps %xmm11, %xmm7 - movsd -32(%rsp), %xmm14 - addsd %xmm0, %xmm1 - movsd %xmm1, -40(%rsp) - movsd -40(%rsp), %xmm6 - subsd %xmm6, %xmm7 - movsd %xmm7, -32(%rsp) - movsd -40(%rsp), %xmm9 - movsd -32(%rsp), %xmm8 - addsd %xmm8, %xmm9 - movsd %xmm9, -24(%rsp) - movsd -32(%rsp), %xmm10 - addsd %xmm10, %xmm0 - movsd %xmm0, -32(%rsp) - movsd -24(%rsp), %xmm0 - subsd %xmm0, %xmm11 - movsd %xmm11, -24(%rsp) - movsd -32(%rsp), %xmm13 - movsd -24(%rsp), %xmm12 - addsd %xmm12, %xmm13 - movsd %xmm13, -24(%rsp) - movsd -40(%rsp), %xmm15 - movsd -24(%rsp), %xmm0 - addsd %xmm14, %xmm0 - addsd %xmm15, %xmm0 - ret -..B1.18: - testl $1048575, -4(%rsp) - jne ..B1.23 -..B1.19: - cmpl $0, -8(%rsp) - jne ..B1.23 -..B1.20: - movb -1(%rsp), %al - andb $-128, %al - cmpb $-128, %al - je ..B1.24 -..B1.21: - lea 4952+_vmldErfcHATab(%rip), %rax - movsd (%rax), %xmm0 -..B1.22: - ret -..B1.23: - movsd -8(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - ret -..B1.24: - lea 4984+_vmldErfcHATab(%rip), %rax - movsd (%rax), %xmm0 - ret -..B1.25: - lea 4960+_vmldErfcHATab(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type erfc,@function - .size erfc,.-erfc - .data -# -- End erfc - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.166: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.166,@object - .size .L_2il0floatpacket.166,16 - .align 8 -_vmldErfcHATab: - .long 0 - .long 1074790400 - .long 0 - .long 3219128320 - .long 2536042781 - .long 1072398983 - .long 1399772821 - .long 1016356498 - .long 2716363190 - .long 3218196015 - .long 2515012741 - .long 3161253520 - .long 2716363190 - .long 1065469487 - .long 2240747611 - .long 1008526987 - .long 3687592758 - .long 1064760658 - .long 803907102 - .long 1004882786 - .long 3448634865 - .long 3207698121 - .long 750050903 - .long 3152352039 - .long 601957364 - .long 3206196134 - .long 1555639211 - .long 3149699171 - .long 1774552010 - .long 1054291178 - .long 3884532135 - .long 1052283480 - .long 3233761315 - .long 3195467393 - .long 1379327181 - .long 3193076019 - .long 242623580 - .long 1041378609 - .long 2275269623 - .long 1038572401 - .long 254615366 - .long 3181902490 - .long 2447494219 - .long 3178851847 - .long 604424981 - .long 1027296749 - .long 50341065 - .long 1024134801 - .long 0 - .long 1073741824 - .long 0 - .long 3219390464 - .long 1599080160 - .long 1071977136 - .long 688395245 - .long 1016124311 - .long 3971924631 - .long 3219152851 - .long 3564228032 - .long 3163583509 - .long 3891163965 - .long 1068791752 - .long 3480798202 - .long 1012474408 - .long 1621928818 - .long 1067553147 - .long 4020082186 - .long 1012007724 - .long 685042962 - .long 3213042343 - .long 3489060295 - .long 3153732341 - .long 2848795668 - .long 3210759248 - .long 3762448119 - .long 3156070926 - .long 1324211555 - .long 1061670518 - .long 1476477459 - .long 1058441900 - .long 2515812913 - .long 3204852392 - .long 3304760842 - .long 3200696323 - .long 716797578 - .long 1052801360 - .long 2283992921 - .long 1047370885 - .long 2268754290 - .long 3195296397 - .long 1012519479 - .long 3185657836 - .long 944669356 - .long 1042638534 - .long 1931303816 - .long 3183131001 - .long 0 - .long 1072693248 - .long 0 - .long 3219390464 - .long 1180573078 - .long 1071127762 - .long 4113175178 - .long 1014965748 - .long 2484292509 - .long 3219680918 - .long 959898156 - .long 3163955503 - .long 957881989 - .long 1071548988 - .long 442195505 - .long 1012747532 - .long 35029730 - .long 1068269829 - .long 976783580 - .long 1012161104 - .long 2319046290 - .long 3217462844 - .long 10747389 - .long 3161497233 - .long 3758081287 - .long 1067192898 - .long 1126055042 - .long 1009745370 - .long 1760060230 - .long 1067789094 - .long 3251266701 - .long 3213655257 - .long 2806967453 - .long 3212534516 - .long 1864685761 - .long 1064158132 - .long 3738348856 - .long 1061687624 - .long 790737257 - .long 3209050005 - .long 1943644508 - .long 3204796481 - .long 2914584687 - .long 1058674792 - .long 2574038108 - .long 3201168805 - .long 1252008665 - .long 3203024355 - .long 0 - .long 1071644672 - .long 0 - .long 3219390464 - .long 866709712 - .long 1068743889 - .long 2877058776 - .long 1013060082 - .long 4210332368 - .long 3219015250 - .long 1459199107 - .long 3163298467 - .long 3688727889 - .long 1072884723 - .long 2792291460 - .long 1014241070 - .long 855534605 - .long 3220533712 - .long 759913640 - .long 3163946628 - .long 2131284961 - .long 1069103746 - .long 2597396527 - .long 1013374934 - .long 989201780 - .long 1073227786 - .long 3318708226 - .long 1013855758 - .long 699280746 - .long 3220558000 - .long 993015799 - .long 3218982987 - .long 1559561232 - .long 1073166816 - .long 680189340 - .long 3219046342 - .long 3200850606 - .long 3220010182 - .long 1492278808 - .long 1071125031 - .long 4108347350 - .long 3218518333 - .long 2186414716 - .long 3220448795 - .long 2803204773 - .long 3219471098 - .long 1021304598 - .long 3216041452 - .long 0 - .long 1072693248 - .long 0 - .long 3220701184 - .long 2395493008 - .long 1067539114 - .long 2347713276 - .long 1010696759 - .long 649597580 - .long 3216929335 - .long 3715599898 - .long 3160841752 - .long 1561014649 - .long 1069995433 - .long 3047088181 - .long 1014230941 - .long 735510274 - .long 3217146528 - .long 1352249772 - .long 3161795800 - .long 1629994682 - .long 1067898281 - .long 867814168 - .long 1012540688 - .long 3242132826 - .long 1066299959 - .long 1473115860 - .long 1010684527 - .long 1350993397 - .long 3214133819 - .long 212467593 - .long 1064529314 - .long 1581296174 - .long 1063476333 - .long 1019617056 - .long 3210475870 - .long 326531339 - .long 1058667915 - .long 2560102974 - .long 1060207995 - .long 1059830545 - .long 3205421344 - .long 73331091 - .long 1053435953 - .long 3519680827 - .long 1056963274 - .long 287235298 - .long 1054771565 - .long 0 - .long 1072693248 - .long 0 - .long 3220701184 - .long 2395492868 - .long 1067539114 - .long 3682704431 - .long 1012674156 - .long 649602216 - .long 3216929335 - .long 3411089016 - .long 3161142609 - .long 1560943486 - .long 1069995433 - .long 373233254 - .long 1014373936 - .long 736848572 - .long 3217146528 - .long 1866442275 - .long 3160326248 - .long 1560943474 - .long 1067898281 - .long 3576330307 - .long 1009307384 - .long 649623715 - .long 1066299959 - .long 725533065 - .long 1006865126 - .long 1925526991 - .long 3214133821 - .long 2782059224 - .long 1064529267 - .long 3902564706 - .long 1063475940 - .long 2706862450 - .long 3210478464 - .long 1817950372 - .long 1058560819 - .long 1279984267 - .long 1060154640 - .long 1456324877 - .long 3205782300 - .long 3219859931 - .long 3203609651 - .long 1354896425 - .long 1055916872 - .long 153053737 - .long 3200605489 - .long 0 - .long 1070596096 - .long 0 - .long 3219390464 - .long 4088869944 - .long 1070267315 - .long 2176293176 - .long 1014815941 - .long 2130816332 - .long 3218278509 - .long 1120272801 - .long 3163324298 - .long 2812844367 - .long 1071221080 - .long 3953643227 - .long 1013638927 - .long 1988706352 - .long 3219153696 - .long 4268394231 - .long 3159871631 - .long 1288160248 - .long 1071920576 - .long 2922427679 - .long 1016153595 - .long 2977979581 - .long 3219655118 - .long 3750808263 - .long 3157405326 - .long 985562119 - .long 1072408739 - .long 2519169024 - .long 3220102519 - .long 68429100 - .long 1072741226 - .long 3577866702 - .long 3220290005 - .long 2564607388 - .long 1072813459 - .long 2939200104 - .long 3220467302 - .long 4218579581 - .long 1071794210 - .long 1377164546 - .long 3221614222 - .long 2324734477 - .long 3221337613 - .long 1839603542 - .long 3222378369 - .long 0 - .long 1071644672 - .long 0 - .long 3220701184 - .long 2099420460 - .long 1070000514 - .long 2802853043 - .long 1014611496 - .long 1293201774 - .long 3216758446 - .long 754100791 - .long 3161260779 - .long 446218444 - .long 1068516350 - .long 4119686598 - .long 1008896294 - .long 464017249 - .long 3215087878 - .long 960597079 - .long 3159504610 - .long 785622302 - .long 1066666444 - .long 3339954945 - .long 1008950591 - .long 2636124640 - .long 3213180396 - .long 2995891561 - .long 3157221870 - .long 742584182 - .long 1064691513 - .long 2101069570 - .long 3211133521 - .long 2181624698 - .long 1062573543 - .long 880779555 - .long 3208950245 - .long 3229614298 - .long 1060332156 - .long 2776250631 - .long 3206681158 - .long 1726624674 - .long 1057845172 - .long 2932756839 - .long 3204700218 - .long 968482455 - .long 3200538336 - .long 839487434 - .long 3203407115 - .long 0 - .long 1071644672 - .long 0 - .long 3220701184 - .long 2099420460 - .long 1070000514 - .long 3971839787 - .long 1014611494 - .long 1293201774 - .long 3216758446 - .long 1164040504 - .long 3161242013 - .long 446218443 - .long 1068516350 - .long 752423430 - .long 1013624741 - .long 464016831 - .long 3215087878 - .long 1037460728 - .long 3159893622 - .long 785625671 - .long 1066666444 - .long 2777520670 - .long 1010462846 - .long 2633474472 - .long 3213180396 - .long 224500896 - .long 3158129422 - .long 768707698 - .long 1064691513 - .long 3292721506 - .long 3211133520 - .long 578140564 - .long 1062573549 - .long 2030948072 - .long 3208950024 - .long 703221627 - .long 1060333354 - .long 3302679767 - .long 3206661604 - .long 1902201635 - .long 1057974954 - .long 4048348141 - .long 3204024333 - .long 436255103 - .long 1054912980 - .long 2856127569 - .long 3199800416 - .long 0 - .long 1069547520 - .long 0 - .long 3219390464 - .long 2660514860 - .long 1069307683 - .long 3910050887 - .long 1010798723 - .long 1232972210 - .long 3217414211 - .long 3319476861 - .long 3162069233 - .long 728349866 - .long 1070632184 - .long 2957516014 - .long 1014996223 - .long 2614894425 - .long 3218648001 - .long 3908389506 - .long 3161696982 - .long 2191212410 - .long 1071782386 - .long 2431020086 - .long 1016759180 - .long 3218723210 - .long 3219794568 - .long 3000611168 - .long 3164060285 - .long 3635880648 - .long 1072866249 - .long 536114836 - .long 3220846078 - .long 772319782 - .long 1073876386 - .long 455323837 - .long 3221871435 - .long 2867783196 - .long 1074413781 - .long 2591697711 - .long 3223680483 - .long 3707131585 - .long 3224082365 - .long 1191412344 - .long 3226597368 - .long 26961465 - .long 3227158611 - .long 3399174677 - .long 3227576866 - .long 0 - .long 1070596096 - .long 0 - .long 3220701184 - .long 2223626006 - .long 1069006900 - .long 1459366060 - .long 1012973801 - .long 1839010552 - .long 3215906806 - .long 2068820260 - .long 3160057563 - .long 1249919926 - .long 1067698038 - .long 962503917 - .long 1012536115 - .long 2100991944 - .long 3214479466 - .long 3825857555 - .long 3158728160 - .long 2359368913 - .long 1066362061 - .long 743880428 - .long 1009085061 - .long 1096261871 - .long 3213062353 - .long 3975107283 - .long 3156829710 - .long 3079668469 - .long 1064816845 - .long 1037052812 - .long 3211583355 - .long 3759245614 - .long 1063340491 - .long 3200735738 - .long 3210008934 - .long 4161299971 - .long 1061559762 - .long 2934206128 - .long 3208900975 - .long 3971101203 - .long 3206549768 - .long 353687358 - .long 3209069242 - .long 3047695518 - .long 3208432442 - .long 3851119497 - .long 3207872727 - .long 0 - .long 1070596096 - .long 0 - .long 3220701184 - .long 2223626017 - .long 1069006900 - .long 1388676355 - .long 1012705760 - .long 1839008253 - .long 3215906806 - .long 815236617 - .long 3160082992 - .long 1250030689 - .long 1067698038 - .long 1288166708 - .long 1012882161 - .long 2094505532 - .long 3214479466 - .long 311037013 - .long 3156914212 - .long 2617751546 - .long 1066362061 - .long 2536920761 - .long 1010241475 - .long 1679260317 - .long 3213062352 - .long 3392965897 - .long 3157018830 - .long 1054244789 - .long 1064816864 - .long 3966408696 - .long 3211583052 - .long 1854848819 - .long 1063342388 - .long 3813743082 - .long 3209990587 - .long 395181184 - .long 1061696008 - .long 2456810233 - .long 3208392808 - .long 4089464644 - .long 1060125482 - .long 3698050549 - .long 3206684252 - .long 1112347086 - .long 1058131030 - .long 218099662 - .long 3203798608 - .long 0 - .long 1068498944 - .long 0 - .long 3219390464 - .long 525966855 - .long 1068285571 - .long 2606587153 - .long 1012297682 - .long 2443413391 - .long 3216426332 - .long 691043050 - .long 3159699549 - .long 1829248673 - .long 1069675485 - .long 797308607 - .long 1013894531 - .long 2897861001 - .long 3217829064 - .long 3729653017 - .long 3162035037 - .long 3517114205 - .long 1070988945 - .long 2096268315 - .long 1015157641 - .long 733746641 - .long 3219206769 - .long 2776288224 - .long 3161354348 - .long 312049674 - .long 1072253264 - .long 1779010374 - .long 3220866352 - .long 3398525311 - .long 3220286121 - .long 3932053403 - .long 3224771363 - .long 2526572080 - .long 3226863609 - .long 1052531014 - .long 3228950632 - .long 1237705257 - .long 3230476352 - .long 1818683855 - .long 3231504084 - .long 2771211543 - .long 3231812491 - .long 1784201120 - .long 3231087810 - .long 0 - .long 1069547520 - .long 0 - .long 3220701184 - .long 3317774106 - .long 1067973958 - .long 2923167300 - .long 1012645752 - .long 3241173892 - .long 3214918775 - .long 39491139 - .long 3156995939 - .long 285395131 - .long 1066727038 - .long 2541426776 - .long 1010932663 - .long 1226100891 - .long 3213595410 - .long 1495613600 - .long 3157951728 - .long 3870275689 - .long 1065488829 - .long 965710822 - .long 1009822465 - .long 3492316846 - .long 3212293408 - .long 2517483522 - .long 3156957513 - .long 1374076994 - .long 1064156941 - .long 372497316 - .long 3211297712 - .long 3813845480 - .long 3208055775 - .long 3900585526 - .long 3212419165 - .long 1960133516 - .long 3213181643 - .long 148017317 - .long 3214056684 - .long 3471465381 - .long 3214242476 - .long 65590178 - .long 3214048451 - .long 3138884841 - .long 3213067513 - .long 2557226666 - .long 3211122744 - .long 0 - .long 1069547520 - .long 0 - .long 3220701184 - .long 3319825997 - .long 1067973958 - .long 153387004 - .long 1010340046 - .long 3027068505 - .long 3214918775 - .long 2440895001 - .long 3158659807 - .long 1195164920 - .long 1066727039 - .long 1739223825 - .long 1010932951 - .long 3681176633 - .long 3213595373 - .long 2468586085 - .long 3156977493 - .long 2873291842 - .long 1065489208 - .long 1357898154 - .long 1010449195 - .long 449207067 - .long 3212287634 - .long 1843054170 - .long 3156472137 - .long 1688975421 - .long 1064223666 - .long 2606145257 - .long 3210999965 - .long 2843228885 - .long 1062852799 - .long 3218505005 - .long 3209735220 - .long 2000171025 - .long 1061515619 - .long 2480760959 - .long 3208347934 - .long 1915328357 - .long 1060202094 - .long 619623839 - .long 3207101805 - .long 3877388623 - .long 1057814602 - .long 1403207699 - .long 3206847388 - .long 0 - .long 1069547520 - .long 0 - .long 3220701184 - .long 3319825996 - .long 1067973958 - .long 2025830981 - .long 1009198696 - .long 3027068262 - .long 3214918775 - .long 462574407 - .long 3158874537 - .long 1195152753 - .long 1066727039 - .long 2026642833 - .long 1010473176 - .long 3680441114 - .long 3213595373 - .long 1280116659 - .long 3154901898 - .long 2858263562 - .long 1065489208 - .long 3653419668 - .long 1010119659 - .long 8491235 - .long 3212287634 - .long 2006410862 - .long 3152308929 - .long 669193667 - .long 1064223664 - .long 261358851 - .long 3210999947 - .long 3798337047 - .long 1062852562 - .long 3252853818 - .long 3209734051 - .long 2986380320 - .long 1061506613 - .long 2271475836 - .long 3208293716 - .long 4121652893 - .long 1060072878 - .long 1033391529 - .long 3206544683 - .long 472144880 - .long 1057491226 - .long 2996742642 - .long 3202556481 - .long 0 - .long 1067450368 - .long 0 - .long 3219390464 - .long 2310440956 - .long 1067243964 - .long 1910839802 - .long 1011085066 - .long 3231655782 - .long 3215394280 - .long 67697416 - .long 3158533143 - .long 747798972 - .long 1068652953 - .long 3842674820 - .long 1013874752 - .long 2960203073 - .long 3216848639 - .long 2643975567 - .long 3156914699 - .long 3514791177 - .long 1070021174 - .long 3133960404 - .long 1013937886 - .long 2900718461 - .long 3218240252 - .long 1762535320 - .long 3161495508 - .long 3933388189 - .long 1071460247 - .long 1623401109 - .long 3219631106 - .long 2243580782 - .long 1072656900 - .long 3113530625 - .long 3221833507 - .long 4278270359 - .long 3222733868 - .long 4152511010 - .long 3225895261 - .long 1448809675 - .long 3227655974 - .long 2046900051 - .long 3229157102 - .long 4134264961 - .long 3229841799 - .long 2742521525 - .long 3229722239 - .long 0 - .long 1068498944 - .long 0 - .long 3220701184 - .long 2295541704 - .long 1066929438 - .long 3837869256 - .long 1002512271 - .long 2403525199 - .long 3213885862 - .long 3057254264 - .long 3152556454 - .long 1273180940 - .long 1065699684 - .long 307148135 - .long 1007267775 - .long 4108180605 - .long 3212593363 - .long 867507169 - .long 3154906335 - .long 2406587489 - .long 1064486498 - .long 3600962311 - .long 1007048784 - .long 641070000 - .long 3211323670 - .long 942137894 - .long 3155422437 - .long 471088535 - .long 1063286275 - .long 3784803533 - .long 3210106468 - .long 2056014570 - .long 1061725436 - .long 975828111 - .long 3209750570 - .long 3879370210 - .long 3209336425 - .long 2803950026 - .long 3211135338 - .long 606260247 - .long 3211577897 - .long 1881144158 - .long 3211825519 - .long 670638336 - .long 3211103480 - .long 2138776162 - .long 3209709388 - .long 0 - .long 1068498944 - .long 0 - .long 3220701184 - .long 2295580191 - .long 1066929438 - .long 3681200523 - .long 1011869447 - .long 2400932937 - .long 3213885862 - .long 1282261590 - .long 3155177332 - .long 1435460813 - .long 1065699684 - .long 338806164 - .long 1009895735 - .long 2137816334 - .long 3212593362 - .long 2795067653 - .long 3156177866 - .long 4261873090 - .long 1064486517 - .long 3264144757 - .long 1007933656 - .long 2173718924 - .long 3211323291 - .long 3810711629 - .long 3155704795 - .long 2446322575 - .long 1063289064 - .long 2077064354 - .long 3210074792 - .long 504970137 - .long 1062005301 - .long 3765139549 - .long 3208846522 - .long 2079001974 - .long 1060716176 - .long 875759584 - .long 3207637152 - .long 4108525622 - .long 1059452531 - .long 4049318739 - .long 3206336314 - .long 3770858801 - .long 1058237468 - .long 2722340464 - .long 3205374723 - .long 0 - .long 1068498944 - .long 0 - .long 3220701184 - .long 2295580191 - .long 1066929438 - .long 2149023882 - .long 1011305144 - .long 2400932909 - .long 3213885862 - .long 1064137805 - .long 3156227957 - .long 1435458098 - .long 1065699684 - .long 4263810407 - .long 1007587847 - .long 2137652297 - .long 3212593362 - .long 1479815673 - .long 3155856170 - .long 4258425849 - .long 1064486517 - .long 3605379165 - .long 1009762642 - .long 2066788283 - .long 3211323291 - .long 3198576201 - .long 3153399561 - .long 1179383574 - .long 1063289064 - .long 140008546 - .long 3210074787 - .long 2930072161 - .long 1062005221 - .long 1129148062 - .long 3208846064 - .long 3175174977 - .long 1060711976 - .long 382350984 - .long 3207621985 - .long 3891461581 - .long 1059368087 - .long 1514607567 - .long 3205983602 - .long 292029317 - .long 1057267187 - .long 906505364 - .long 3202625257 - .long 0 - .long 1071644672 - .long 1431652600 - .long 1069897045 - .long 1431670732 - .long 1067799893 - .long 984555731 - .long 1065423122 - .long 472530941 - .long 1062650218 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 939524096 - .long 1072704666 - .long 2209988083 - .long 1046076929 - .long 3489660928 - .long 1072716208 - .long 2715237930 - .long 1044950059 - .long 402653184 - .long 1072727877 - .long 36755401 - .long 1042114290 - .long 1744830464 - .long 1072739672 - .long 1032479461 - .long 1045685796 - .long 805306368 - .long 1072751596 - .long 269498903 - .long 1044815501 - .long 3489660928 - .long 1072763649 - .long 2766913307 - .long 1039293264 - .long 2818572288 - .long 1072775834 - .long 2127365126 - .long 1046127799 - .long 939524096 - .long 1072788152 - .long 3950214642 - .long 1045558597 - .long 3892314112 - .long 1072800603 - .long 2850403528 - .long 1045134939 - .long 805306368 - .long 1072813191 - .long 2810207104 - .long 1043762074 - .long 2281701376 - .long 1072825915 - .long 2397289153 - .long 1041802037 - .long 1744830464 - .long 1072838778 - .long 3785033707 - .long 1046074760 - .long 1610612736 - .long 1072851781 - .long 1955981725 - .long 1045924339 - .long 4026531840 - .long 1072864925 - .long 2226165573 - .long 1045725051 - .long 2684354560 - .long 1072878213 - .long 754984053 - .long 1046188044 - .long 134217728 - .long 1072891646 - .long 2842642093 - .long 1044483512 - .long 2952790016 - .long 1072905224 - .long 4200916017 - .long 1044586679 - .long 805306368 - .long 1072918951 - .long 714887508 - .long 1046276775 - .long 805306368 - .long 1072932827 - .long 3685248805 - .long 1045665407 - .long 1207959552 - .long 1072946854 - .long 2295779401 - .long 1045448912 - .long 536870912 - .long 1072961034 - .long 2676240988 - .long 1044345570 - .long 1610612736 - .long 1072975368 - .long 1086643152 - .long 1041785419 - .long 2952790016 - .long 1072989858 - .long 1078920847 - .long 1045890291 - .long 3489660928 - .long 1073004506 - .long 2624917087 - .long 1045747880 - .long 1879048192 - .long 1073019314 - .long 2595540835 - .long 1046115506 - .long 1342177280 - .long 1073034283 - .long 125577743 - .long 1046115646 - .long 805306368 - .long 1073049415 - .long 1771811520 - .long 1046140063 - .long 3623878656 - .long 1073064711 - .long 2774738112 - .long 1045766480 - .long 268435456 - .long 1073080175 - .long 565866387 - .long 1045869701 - .long 2952790016 - .long 1073095806 - .long 1492679939 - .long 1041050306 - .long 2147483648 - .long 1073111608 - .long 612974287 - .long 1044556049 - .long 1610612736 - .long 1073127582 - .long 843197631 - .long 1046084847 - .long 939524096 - .long 1073143730 - .long 3150480267 - .long 1045533800 - .long 3892314112 - .long 1073160053 - .long 2074373662 - .long 1043172334 - .long 1342177280 - .long 1073176555 - .long 587053675 - .long 1046022559 - .long 1879048192 - .long 1073193236 - .long 918464641 - .long 1045387276 - .long 805306368 - .long 1073210099 - .long 2285990923 - .long 1046166841 - .long 2550136832 - .long 1073227145 - .long 682424459 - .long 1043647713 - .long 2550136832 - .long 1073244377 - .long 1678188781 - .long 1045046423 - .long 1073741824 - .long 1073261797 - .long 3671932459 - .long 1044468998 - .long 2550136832 - .long 1073279406 - .long 1656324724 - .long 1043421043 - .long 2952790016 - .long 1073297207 - .long 2659845000 - .long 1042921660 - .long 2550136832 - .long 1073315202 - .long 1043233352 - .long 1046444345 - .long 2147483648 - .long 1073333393 - .long 2162418230 - .long 1044717444 - .long 2013265920 - .long 1073351782 - .long 630511316 - .long 1045098283 - .long 2952790016 - .long 1073370371 - .long 3831108133 - .long 1044508970 - .long 1342177280 - .long 1073389163 - .long 4245662865 - .long 1045817334 - .long 2550136832 - .long 1073408159 - .long 3588780877 - .long 1043705146 - .long 3087007744 - .long 1073427362 - .long 3182425146 - .long 1041483134 - .long 4026531840 - .long 1073446774 - .long 928333188 - .long 1044896498 - .long 2415919104 - .long 1073466398 - .long 2300504125 - .long 1041428596 - .long 3623878656 - .long 1073486235 - .long 1887994668 - .long 1045828938 - .long 671088640 - .long 1073506289 - .long 757630176 - .long 1046044485 - .long 3623878656 - .long 1073526560 - .long 2756972335 - .long 1045675585 - .long 1207959552 - .long 1073547053 - .long 3697834264 - .long 1044397131 - .long 3623878656 - .long 1073567768 - .long 479684631 - .long 1045687954 - .long 0 - .long 1073588710 - .long 730095629 - .long 1045354900 - .long 805306368 - .long 1073609879 - .long 4123739734 - .long 1045159130 - .long 3758096384 - .long 1073631278 - .long 3634164812 - .long 1046359295 - .long 2684354560 - .long 1073652911 - .long 3425467293 - .long 1044718726 - .long 3892314112 - .long 1073674779 - .long 2648473416 - .long 1046054248 - .long 1476395008 - .long 1073696886 - .long 54164518 - .long 1045131818 - .long 2147483648 - .long 1073719233 - .long 2196310654 - .long 1043982605 - .long 4277796864 - .long 1065758274 - .long 3164486458 - .long 1025308570 - .long 1697350398 - .long 1079448903 - .long 0 - .long 862978048 - .long 0 - .long 1127743488 - .long 33554432 - .long 1101004800 - .long 0 - .long 0 - .long 1 - .long 1048576 - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .long 0 - .long 1073741824 - .long 1105497085 - .long 1077623260 - .long 261899793 - .long 1077588746 - .long 4235085970 - .long 1077578514 - .long 2406803786 - .long 3222762575 - .type _vmldErfcHATab,@object - .size _vmldErfcHATab,5024 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfcf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfcf.S deleted file mode 100644 index b6655001b7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfcf.S +++ /dev/null @@ -1,705 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erfcf.c" - .text -..TXTST0: -# -- Begin erfcf - .text - .align 16,0x90 - .globl erfcf -erfcf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_erfcf.1: -..L2: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - subq $32, %rsp - .cfi_def_cfa_offset 48 - movd %xmm0, %r14d - movss %xmm0, 16(%rsp) - movl %r14d, %ecx - andl $2147483647, %ecx - shrl $31, %r14d - cmpl $2139095040, %ecx - jae ..B1.24 -..B1.2: - movl %r14d, %eax - lea range(%rip), %rdx - cmpl (%rdx,%rax,4), %ecx - jae ..B1.21 -..B1.3: - cmpl $1081081856, %ecx - jae ..B1.15 -..B1.4: - cmpl $1073741824, %ecx - jae ..B1.11 -..B1.5: - cmpl $1056964608, %ecx - jae ..B1.10 -..B1.6: - cmpl $847249408, %ecx - jae ..B1.8 -..B1.7: - movss .L_2il0floatpacket.3(%rip), %xmm4 - subss %xmm0, %xmm4 - jmp ..B1.9 -..B1.8: - cvtss2sd %xmm0, %xmm0 - movaps %xmm0, %xmm1 - lea 40+_A(%rip), %rax - lea 48+_A(%rip), %rsi - lea 24+_A(%rip), %rdx - lea 32+_A(%rip), %rdi - lea 8+_A(%rip), %rcx - lea 16+_A(%rip), %r8 - lea _A(%rip), %r9 - movsd (%rax), %xmm4 - movsd (%rsi), %xmm3 - mulsd %xmm0, %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd (%rdx), %xmm4 - addsd (%rdi), %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm3 - addsd (%rcx), %xmm4 - addsd (%r8), %xmm3 - mulsd %xmm1, %xmm4 - mulsd %xmm2, %xmm3 - mulsd %xmm0, %xmm4 - addsd (%r9), %xmm3 - addsd .L_2il0floatpacket.4(%rip), %xmm4 - mulsd %xmm0, %xmm3 - addsd %xmm3, %xmm4 - cvtsd2ss %xmm4, %xmm4 -..B1.9: - movaps %xmm4, %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 14, -16 -..B1.10: - pxor %xmm1, %xmm1 - lea 48+_AP(%rip), %rdx - cvtss2sd 16(%rsp), %xmm1 - andps .L_2il0floatpacket.5(%rip), %xmm1 - lea 32+_AP(%rip), %rcx - movsd (%rdx), %xmm6 - lea 16+_AP(%rip), %rsi - lea _AP(%rip), %rdi - lea 56+_AP(%rip), %r8 - lea 48+_AQ(%rip), %r14 - lea 40+_AP(%rip), %r9 - lea 32+_AQ(%rip), %rdx - lea 24+_AP(%rip), %r10 - lea 8+_AP(%rip), %r11 - pxor %xmm5, %xmm5 - movsd (%r8), %xmm2 - lea 40+_AQ(%rip), %r8 - movsd (%r14), %xmm4 - lea _erfc1(%rip), %r14 - subsd .L_2il0floatpacket.4(%rip), %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - mulsd %xmm0, %xmm6 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm4 - addsd (%rcx), %xmm6 - addsd (%r9), %xmm2 - addsd (%rdx), %xmm4 - mulsd %xmm0, %xmm6 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm4 - addsd (%rsi), %xmm6 - addsd (%r10), %xmm2 - mulsd %xmm0, %xmm6 - mulsd %xmm0, %xmm2 - addsd (%rdi), %xmm6 - addsd (%r11), %xmm2 - lea 56+_AQ(%rip), %rdi - lea 24+_AQ(%rip), %r9 - lea 16+_AQ(%rip), %rcx - lea 8+_AQ(%rip), %r10 - lea _AQ(%rip), %rsi - lea _ones(%rip), %r11 - mulsd %xmm1, %xmm2 - addsd (%rcx), %xmm4 - cvtss2sd (%r11,%rax,4), %xmm5 - addsd %xmm2, %xmm6 - mulsd %xmm0, %xmm4 - movsd (%rdi), %xmm3 - mulsd %xmm0, %xmm3 - addsd (%rsi), %xmm4 - addsd (%r8), %xmm3 - mulsd %xmm0, %xmm3 - addsd (%r9), %xmm3 - mulsd %xmm0, %xmm3 - addsd (%r10), %xmm3 - mulsd %xmm1, %xmm3 - addsd %xmm3, %xmm4 - divsd %xmm4, %xmm6 - mulsd %xmm5, %xmm6 - addsd (%r14,%rax,8), %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 14, -16 -..B1.11: - pxor %xmm1, %xmm1 - testl %r14d, %r14d - cvtss2sd 16(%rsp), %xmm1 - andps .L_2il0floatpacket.5(%rip), %xmm1 - addsd .L_2il0floatpacket.2(%rip), %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - je ..B1.13 -..B1.12: - lea 48+_BP1(%rip), %rdx - lea 32+_BP1(%rip), %rcx - lea 16+_BP1(%rip), %rsi - lea 40+_BP1(%rip), %r8 - lea 48+_BQ1(%rip), %r11 - lea 32+_BQ1(%rip), %r14 - lea _BP1(%rip), %rdi - lea 24+_BP1(%rip), %r9 - movsd (%rdx), %xmm5 - lea 16+_BQ1(%rip), %rdx - movsd (%r8), %xmm2 - lea 8+_BP1(%rip), %r10 - movsd (%r11), %xmm4 - lea 8+_BQ1(%rip), %r8 - mulsd %xmm0, %xmm5 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd (%rcx), %xmm5 - addsd (%r14), %xmm4 - addsd (%r9), %xmm2 - mulsd %xmm0, %xmm5 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd (%rsi), %xmm5 - addsd (%rdx), %xmm4 - addsd (%r10), %xmm2 - mulsd %xmm0, %xmm5 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - addsd (%rdi), %xmm5 - lea 40+_BQ1(%rip), %rsi - lea 24+_BQ1(%rip), %rdi - lea _BQ1(%rip), %rcx - movsd (%rsi), %xmm3 - mulsd %xmm0, %xmm3 - addsd (%rcx), %xmm4 - addsd (%rdi), %xmm3 - mulsd %xmm0, %xmm3 - addsd (%r8), %xmm3 - mulsd %xmm1, %xmm3 - jmp ..B1.14 -..B1.13: - lea 80+_BP2(%rip), %rdx - lea 64+_BP2(%rip), %rcx - lea 88+_BP2(%rip), %r10 - lea 48+_BP2(%rip), %rsi - lea 72+_BP2(%rip), %r11 - lea 32+_BP2(%rip), %rdi - lea 56+_BP2(%rip), %r14 - lea 16+_BP2(%rip), %r8 - movsd (%rdx), %xmm5 - lea 40+_BP2(%rip), %rdx - mulsd %xmm0, %xmm5 - lea _BP2(%rip), %r9 - movsd (%r10), %xmm2 - lea 16+_BQ2(%rip), %r10 - mulsd %xmm0, %xmm2 - addsd (%rcx), %xmm5 - mulsd %xmm0, %xmm5 - addsd (%r11), %xmm2 - mulsd %xmm0, %xmm2 - addsd (%rsi), %xmm5 - mulsd %xmm0, %xmm5 - addsd (%r14), %xmm2 - lea 56+_BQ2(%rip), %r14 - addsd (%rdi), %xmm5 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm5 - addsd (%rdx), %xmm2 - addsd (%r8), %xmm5 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm5 - lea 64+_BQ2(%rip), %rdi - lea 48+_BQ2(%rip), %r8 - movsd (%r14), %xmm3 - lea 40+_BQ2(%rip), %rdx - lea 24+_BP2(%rip), %rcx - lea 8+_BP2(%rip), %rsi - mulsd %xmm0, %xmm3 - addsd (%r9), %xmm5 - addsd (%rcx), %xmm2 - addsd (%rdx), %xmm3 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm3 - addsd (%rsi), %xmm2 - movsd (%rdi), %xmm4 - lea 32+_BQ2(%rip), %r9 - lea 24+_BQ2(%rip), %rcx - lea 8+_BQ2(%rip), %rsi - lea _BQ2(%rip), %r11 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - addsd (%rcx), %xmm3 - addsd (%r8), %xmm4 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm4 - addsd (%rsi), %xmm3 - addsd (%r9), %xmm4 - mulsd %xmm1, %xmm3 - mulsd %xmm0, %xmm4 - addsd (%r10), %xmm4 - mulsd %xmm0, %xmm4 - addsd (%r11), %xmm4 -..B1.14: - lea _ones(%rip), %rdx - pxor %xmm0, %xmm0 - lea _erfc4(%rip), %rcx - addsd %xmm2, %xmm5 - addsd %xmm3, %xmm4 - cvtss2sd (%rdx,%rax,4), %xmm0 - divsd %xmm4, %xmm5 - mulsd %xmm0, %xmm5 - addsd (%rcx,%rax,8), %xmm5 - cvtsd2ss %xmm5, %xmm5 - movaps %xmm5, %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 14, -16 -..B1.15: - pxor %xmm0, %xmm0 - cvtss2sd 16(%rsp), %xmm0 - andps .L_2il0floatpacket.5(%rip), %xmm0 - movsd .L_2il0floatpacket.4(%rip), %xmm1 - divsd %xmm0, %xmm1 - mulsd %xmm0, %xmm0 - xorps .L_2il0floatpacket.6(%rip), %xmm0 - movsd %xmm1, 8(%rsp) -..___tag_value_erfcf.21: - call __libm_exp_k32@PLT -..___tag_value_erfcf.22: -..B1.32: - movaps %xmm0, %xmm4 -..B1.16: - movsd 8(%rsp), %xmm0 - lea 56+__R1(%rip), %rax - mulsd %xmm0, %xmm4 - lea 48+__R1(%rip), %rdi - mulsd %xmm0, %xmm0 - movaps %xmm0, %xmm1 - lea 40+__R1(%rip), %rdx - mulsd %xmm0, %xmm1 - lea 32+__R1(%rip), %r8 - movsd (%rax), %xmm3 - lea 24+__R1(%rip), %rcx - mulsd %xmm1, %xmm3 - lea 16+__R1(%rip), %r9 - movsd (%rdi), %xmm2 - lea 8+__R1(%rip), %rsi - mulsd %xmm1, %xmm2 - addsd (%rdx), %xmm3 - mulsd %xmm1, %xmm3 - addsd (%r8), %xmm2 - mulsd %xmm1, %xmm2 - addsd (%rcx), %xmm3 - mulsd %xmm1, %xmm3 - addsd (%r9), %xmm2 - mulsd %xmm1, %xmm2 - addsd (%rsi), %xmm3 - lea __R1(%rip), %r10 - testl %r14d, %r14d - mulsd %xmm0, %xmm3 - addsd (%r10), %xmm2 - addsd %xmm2, %xmm3 - mulsd %xmm3, %xmm4 - cvtsd2ss %xmm4, %xmm4 - jne ..B1.20 -..B1.17: - movd %xmm4, %eax - movss %xmm4, 4(%rsp) - cmpl $8388608, %eax - jl ..B1.28 -..B1.19: - movaps %xmm4, %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 14, -16 -..B1.20: - movss .L_2il0floatpacket.0(%rip), %xmm0 - subss %xmm4, %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 14, -16 -..B1.21: - testl %r14d, %r14d - je ..B1.29 -..B1.22: - movss .L_2il0floatpacket.0(%rip), %xmm0 -..B1.23: - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 14, -16 -..B1.24: - jne ..B1.26 -..B1.25: - lea zero_two(%rip), %rax - movss (%rax,%r14,4), %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 14, -16 -..B1.26: - movss 16(%rsp), %xmm0 -..B1.27: - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 14, -16 -..B1.28: - movss .L_2il0floatpacket.1(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, (%rsp) - movss 4(%rsp), %xmm4 - jmp ..B1.19 -..B1.29: - movss .L_2il0floatpacket.1(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, 4(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type erfcf,@function - .size erfcf,.-erfcf - .data -# -- End erfcf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.5: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 16 -.L_2il0floatpacket.6: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0xc0000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x40000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x0d800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x3f800000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -range: - .long 1092825907 - .long 1081791557 - .type range,@object - .size range,8 - .align 4 -_A: - .long 1346541978 - .long 3220311511 - .long 1794662342 - .long 1071125108 - .long 250944106 - .long 3216827122 - .long 215131671 - .long 1067156170 - .long 548330146 - .long 3212141823 - .long 76350191 - .long 1061937114 - .long 2772654316 - .long 3206307213 - .type _A,@object - .size _A,56 - .align 4 -_AP: - .long 4064916629 - .long 3190878451 - .long 2877165718 - .long 3218164236 - .long 2764139057 - .long 1068232842 - .long 168293639 - .long 3215329394 - .long 881203975 - .long 3215292554 - .long 342818617 - .long 1065638313 - .long 817546319 - .long 3212004140 - .long 1510911299 - .long 3202390104 - .type _AP,@object - .size _AP,64 - .align 4 -_AQ: - .long 1883560946 - .long 1071960885 - .long 853592313 - .long 1071685196 - .long 191605458 - .long 1071250674 - .long 2183121159 - .long 1070390698 - .long 3347411101 - .long 1068928985 - .long 273856425 - .long 1067608207 - .long 671820230 - .long 1065177551 - .long 2414119437 - .long 1063328696 - .type _AQ,@object - .size _AQ,64 - .align 4 -_erfc1: - .long 1879048192 - .long 1069818465 - .long 3523215360 - .long 1073576883 - .type _erfc1,@object - .size _erfc1,16 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 4 -_BP1: - .long 4019088381 - .long 1060143686 - .long 4231883845 - .long 3209038463 - .long 1510730124 - .long 1061755778 - .long 2929202078 - .long 3208591153 - .long 1409179897 - .long 1059475758 - .long 439372548 - .long 3204538649 - .long 3357266387 - .long 1053229132 - .type _BP1,@object - .size _BP1,56 - .align 4 -_BQ1: - .long 3444570556 - .long 1068208773 - .long 4145425017 - .long 1069029647 - .long 1145740212 - .long 1069192522 - .long 2413502193 - .long 1068797491 - .long 2712383784 - .long 1068007659 - .long 3941762314 - .long 1066743858 - .long 3272105283 - .long 1065447630 - .type _BQ1,@object - .size _BQ1,56 - .align 4 -_BP2: - .long 3138848853 - .long 1062211012 - .long 544119287 - .long 3211644465 - .long 2662071917 - .long 1064935492 - .long 2106254088 - .long 3212505578 - .long 377059754 - .long 1064517936 - .long 3523110848 - .long 3210978388 - .long 64932799 - .long 1062023575 - .long 2232373525 - .long 3207568747 - .long 3004568351 - .long 1057518327 - .long 1553969795 - .long 3201939481 - .long 865068135 - .long 1050709866 - .long 348213498 - .long 3193161330 - .type _BP2,@object - .size _BP2,96 - .align 4 -_BQ2: - .long 2220299070 - .long 1070256111 - .long 1607355279 - .long 1069737707 - .long 3222185356 - .long 1069664669 - .long 1988590515 - .long 1068489586 - .long 2612211906 - .long 1067468794 - .long 3802943557 - .long 1065572613 - .long 4286646379 - .long 1063895282 - .long 45248763 - .long 1061257684 - .long 3494068347 - .long 1058887001 - .type _BQ2,@object - .size _BQ2,72 - .align 4 -_erfc4: - .long 0 - .long 1045463040 - .long 4225761280 - .long 1073741823 - .type _erfc4,@object - .size _erfc4,16 - .align 4 -__R1: - .long 1340517714 - .long 1071779287 - .long 1760660317 - .long 3218214358 - .long 3277598851 - .long 1071322187 - .long 1776282588 - .long 3220235438 - .long 2229586924 - .long 1074588991 - .long 2042215417 - .long 3224150558 - .long 1374528972 - .long 1078534706 - .long 1825320511 - .long 3227067102 - .type __R1,@object - .size __R1,64 - .align 4 -zero_two: - .long 0x00000000 - .long 0x40000000 - .type zero_two,@object - .size zero_two,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfcl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfcl.S deleted file mode 100644 index c744e4c648..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfcl.S +++ /dev/null @@ -1,4944 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erfcl.c" - .text -..TXTST0: -# -- Begin erfcl - .text - .align 16,0x90 - .globl erfcl -erfcl: -# parameter 1: 208 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_erfcl.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - subq $168, %rsp - .cfi_def_cfa_offset 208 - xorb %r15b, %r15b - fldt 208(%rsp) - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 160(%rsp) - fstpt 64(%rsp) -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movzwl 82(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.5: - fldcw 80(%rsp) -..B1.6: - movb $1, %r15b -..B1.7: - movl 216(%rsp), %eax - movl %eax, %r14d - shrl $15, %r14d - andl $32767, %eax - andl $1, %r14d - cmpl $32767, %eax - je ..B1.56 -..B1.8: - fldt 208(%rsp) - lea _zeros(%rip), %rax - fldl (%rax) - fucomip %st(1), %st - jp ..B1.9 - je ..B1.51 -..B1.9: - lea _erfcl_RT1(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - ja ..B1.15 - jp ..B1.15 -..B1.10: - lea 16+_erfcl_RT1(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - jb ..B1.15 -..B1.11: - fstp %st(0) - lea _Epsilon(%rip), %rax - lea _ones(%rip), %rdx - testb %r15b, %r15b - fldt (%rax) - fsubrl (%rdx) - fstpt 16(%rsp) - je ..B1.13 -..B1.12: - fldcw 82(%rsp) -..B1.13: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 -..B1.14: - addq $168, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -40 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.15: - lea 8+_erfcl_ASYMPT(%rip), %rax - fldl (%rax) - fcomip %st(1), %st - jb ..B1.46 -..B1.16: - lea _erfcl_ASYMPT(%rip), %rax - fldl (%rax) - fcomip %st(1), %st - fstp %st(0) - jp ..B1.17 - jbe ..B1.21 -..B1.17: - fldt .L_2il0floatpacket.0(%rip) - lea _Epsilon(%rip), %rax - testb %r15b, %r15b - fldt (%rax) - fsubrp %st, %st(1) - fstpt 16(%rsp) - je ..B1.19 -..B1.18: - fldcw 82(%rsp) -..B1.19: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 -..B1.20: - addq $168, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -40 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.21: - fldt .L_2il0floatpacket.1(%rip) - lea _ones(%rip), %r13 - andl $32767, 72(%rsp) - lea 128(%rsp), %rdi - fldt -64(%rdi) - lea 96(%rsp), %rsi - fmul %st, %st(1) - fld %st(0) - fld %st(1) - fsub %st(3), %st - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fchs - fstpt (%rsi) - fld %st(1) - fsub %st(3), %st - fmul %st, %st(3) - fxch %st(3) - fchs - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(1) - fstpt 16(%rsi) - fldl (%r13) - fstpt -80(%rsi) - fldt -80(%rsi) - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fmul %st(1), %st - fmulp %st, %st(1) - fstpt -64(%rsi) - movl -56(%rsi), %r13d - andl $32767, %r13d - addq $-16383, %r13 - movl %r13d, %ebx - shll $4, %ebx - movslq %ebx, %rbx - shlq $4, %rbx -..___tag_value_erfcl.40: - call __libm_expl_k80@PLT -..___tag_value_erfcl.41: -..B1.78: - fldt 16(%rsp) -..B1.22: - lea _TWO_63H(%rip), %rax - fldl (%rax) - faddp %st, %st(2) - fxch %st(1) - fstpt 48(%rsp) - movl 48(%rsp), %edx - cmpl $-16300, %edx - fstpt 48(%rsp) - fldt 48(%rsp) - jle ..B1.24 -..B1.23: - fldt 128(%rsp) - addl $16383, %edx - movzwl 56(%rsp), %eax - andl $32767, %edx - andl $-32768, %eax - orl %edx, %eax - movw %ax, 56(%rsp) - lea 144(%rsp), %rax - fldt (%rax) - jmp ..B1.25 -..B1.24: - fldt 128(%rsp) - lea _TWO_POW_M400(%rip), %rsi - movzwl 56(%rsp), %eax - movl %eax, %ecx - andl $-32768, %ecx - fldl (%rsi) - lea 400(%rax,%rdx), %edx - andl $32767, %edx - lea 144(%rsp), %rax - orl %edx, %ecx - movw %cx, -88(%rax) - fmul %st, %st(1) - fldt (%rax) - fmulp %st, %st(1) -..B1.25: - fldt .L_2il0floatpacket.1(%rip) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt (%rax) - fldt (%rax) - lea _erfcl_CHDX(%rip), %rax - fxch %st(1) - fstpt 128(%rsp) - fldt 64(%rsp) - fldt (%rax) - fcomip %st(1), %st - jbe ..B1.27 -..B1.26: - lea _erfcl_DX(%rip), %rax - fld %st(0) - fldl (%rax) - fadd %st, %st(1) - fsub %st(1), %st - fadd %st(2), %st - jmp ..B1.28 -..B1.27: - lea 8+_erfcl_DX(%rip), %rax - fld %st(0) - fld %st(1) - fldl (%rax) - fadd %st, %st(2) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(1) -..B1.28: - fldt .L_2il0floatpacket.1(%rip) - fld %st(2) - shlq $4, %r13 - lea _erfcl_C(%rip), %rax - lea _erfcl_Q(%rip), %rdx - lea _erfcl_S(%rip), %rcx - testl %r14d, %r14d - fadd %st(2), %st - fdivr %st(6), %st - fmul %st, %st(1) - fxch %st(5) - fstpt 32(%rsp) - fld %st(0) - fadd %st(5), %st - fsubp %st, %st(1) - fsubr %st, %st(4) - fld %st(2) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(4), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(4) - fmul %st(2), %st - fld %st(1) - fmul %st(4), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(3) - fldt .L_2il0floatpacket.0(%rip) - fsub %st(1), %st - fldt .L_2il0floatpacket.0(%rip) - fsub %st(1), %st - fsubp %st, %st(2) - fxch %st(3) - fsubrp %st, %st(1) - fld %st(2) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(4), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fld %st(4) - fmul %st(1), %st - fld %st(2) - fmul %st(4), %st - fxch %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(4) - faddp %st, %st(3) - fld %st(0) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldt (%r13,%rax) - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fldt 224(%rdx,%rbx) - fmul %st(1), %st - fldt 192(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 160(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 128(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 96(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 64(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 32(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdx,%rbx) - faddp %st, %st(1) - fldt 240(%rdx,%rbx) - fmul %st(2), %st - fldt 208(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 176(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 144(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 112(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 80(%rdx,%rbx) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48(%rdx,%rbx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 16(%rdx,%rbx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(3) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fldt .L_2il0floatpacket.1(%rip) - fldt (%r13,%rcx) - fmul %st, %st(3) - fxch %st(1) - fmul %st(3), %st - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(3) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(2) - faddp %st, %st(4) - fldt 16(%rsp) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st(5), %st - fldt 32(%rsp) - fmul %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(2) - fld %st(3) - fld %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(6), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(5) - fxch %st(5) - faddp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fxch %st(3) - fmul %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 48(%rsp) - je ..B1.30 -..B1.29: - fldt .L_2il0floatpacket.0(%rip) - fxch %st(1) - fmul %st, %st(2) - fmulp %st, %st(3) - fldt .L_2il0floatpacket.0(%rip) - fsub %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - fsub %st(2), %st - fsub %st(3), %st - faddp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - jmp ..B1.33 -..B1.30: - fld %st(1) - fadd %st(3), %st - fmul %st(1), %st - fstpt 16(%rsp) - movzwl 24(%rsp), %eax - testl $32767, %eax - jne ..B1.33 -..B1.31: - movzwl 22(%rsp), %eax - testl %eax, %eax - jbe ..B1.33 -..B1.32: - fldt .L_2il0floatpacket.1(%rip) - fmul %st(2), %st - fld %st(2) - fsubr %st(1), %st - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - fadd %st(3), %st - fmul %st(1), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 16(%rsp) -..B1.33: - fstp %st(0) - fstp %st(1) - fstp %st(0) - fldt 208(%rsp) - lea _erfcl_UNDERFLOW_INT(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - fstp %st(0) - jp ..B1.34 - jbe ..B1.41 -..B1.34: - testb %r15b, %r15b - je ..B1.36 -..B1.35: - fldcw 82(%rsp) -..B1.36: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 -..B1.37: - addq $168, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -40 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.38: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.41: - lea _small_value_80(%rip), %rax - testb %r15b, %r15b - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - je ..B1.43 -..B1.42: - fldcw 82(%rsp) -..B1.43: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 - jmp ..B1.14 -..B1.46: - fstp %st(0) - lea _Epsilon(%rip), %rax - testb %r15b, %r15b - fldt (%rax) - fmul %st(0), %st - fstpt 16(%rsp) - je ..B1.48 -..B1.47: - fldcw 82(%rsp) -..B1.48: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 - jmp ..B1.14 -..B1.51: - fstp %st(0) - lea _ones(%rip), %rax - testb %r15b, %r15b - fldl (%rax) - fstpt 16(%rsp) - je ..B1.53 -..B1.52: - fldcw 82(%rsp) -..B1.53: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 - jmp ..B1.14 -..B1.56: - movl 212(%rsp), %eax - testl %r14d, %r14d - jne ..B1.63 -..B1.57: - cmpl $-2147483648, %eax - jne ..B1.69 -..B1.58: - cmpl $0, 208(%rsp) - jne ..B1.69 -..B1.59: - lea _zeros(%rip), %rax - testb %r15b, %r15b - fldl (%rax) - fstpt 16(%rsp) - je ..B1.61 -..B1.60: - fldcw 82(%rsp) -..B1.61: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 -..B1.62: - addq $168, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -40 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.63: - cmpl $-2147483648, %eax - jne ..B1.69 -..B1.64: - cmpl $0, 208(%rsp) - jne ..B1.69 -..B1.65: - fldt .L_2il0floatpacket.0(%rip) - testb %r15b, %r15b - fstpt 16(%rsp) - je ..B1.67 -..B1.66: - fldcw 82(%rsp) -..B1.67: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 -..B1.68: - addq $168, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -40 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.69: - fldt 208(%rsp) - lea _ones(%rip), %rax - testb %r15b, %r15b - fmull (%rax) - fstpt 16(%rsp) - je ..B1.71 -..B1.70: - fldcw 82(%rsp) -..B1.71: - fldt 16(%rsp) - movq 160(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.38 -..B1.72: - addq $168, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type erfcl,@function - .size erfcl,.-erfcl - .data -# -- End erfcl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_erfcl_ASYMPT: - .long 0 - .long 3222929408 - .long 0 - .long 1079689216 - .type _erfcl_ASYMPT,@object - .size _erfcl_ASYMPT,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_POW_M400: - .long 0 - .long 653262848 - .type _TWO_POW_M400,@object - .size _TWO_POW_M400,8 - .align 4 -_erfcl_DX: - .long 0 - .long 1072431104 - .long 0 - .long 1071906816 - .type _erfcl_DX,@object - .size _erfcl_DX,16 - .align 2 -_erfcl_RT1: - .word 21820 - .word 42875 - .word 50317 - .word 58079 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 21820 - .word 42875 - .word 50317 - .word 58079 - .word 16317 - .word 0 - .word 0 - .word 0 - .type _erfcl_RT1,@object - .size _erfcl_RT1,32 - .align 2 -_Epsilon: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _Epsilon,@object - .size _Epsilon,16 - .align 2 -_erfcl_CHDX: - .word 54762 - .word 44346 - .word 63893 - .word 44681 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _erfcl_CHDX,@object - .size _erfcl_CHDX,16 - .align 2 -_erfcl_C: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50944 - .word 39545 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61184 - .word 35913 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64512 - .word 55108 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 38967 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58112 - .word 52540 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 34340 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 43938 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 55351 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 34462 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 42532 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 52130 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 63543 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 38558 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 46628 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 56226 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63488 - .word 33819 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 40606 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 48676 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 58274 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63488 - .word 34843 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 41630 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 49700 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 59298 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63488 - .word 35355 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 42142 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 50212 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32256 - .word 54690 - .word 16389 - .word 0 - .word 0 - .word 0 - .type _erfcl_C,@object - .size _erfcl_C,448 - .align 2 -_erfcl_Q: - .word 13465 - .word 63964 - .word 23888 - .word 38962 - .word 49066 - .word 0 - .word 0 - .word 0 - .word 56793 - .word 9364 - .word 2074 - .word 60725 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 38094 - .word 52495 - .word 21659 - .word 37955 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 56255 - .word 60659 - .word 19352 - .word 51197 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 38745 - .word 34996 - .word 58130 - .word 47148 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 27061 - .word 31727 - .word 37700 - .word 35458 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 30316 - .word 60982 - .word 15920 - .word 46457 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 52759 - .word 48094 - .word 27926 - .word 54790 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 31704 - .word 15513 - .word 33742 - .word 59335 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 10280 - .word 12123 - .word 40636 - .word 59798 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 55231 - .word 62106 - .word 54809 - .word 56625 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 36666 - .word 22902 - .word 8427 - .word 50746 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 46592 - .word 43726 - .word 50753 - .word 43230 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 64491 - .word 43284 - .word 59259 - .word 34800 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 61229 - .word 19548 - .word 49801 - .word 49926 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 1687 - .word 39069 - .word 16746 - .word 48555 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 55359 - .word 55853 - .word 34963 - .word 33408 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 24851 - .word 44488 - .word 55772 - .word 44700 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 44447 - .word 58130 - .word 38723 - .word 40258 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 1500 - .word 15080 - .word 64595 - .word 34359 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 52078 - .word 14763 - .word 48694 - .word 63117 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 4694 - .word 53159 - .word 65475 - .word 45416 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 37430 - .word 32424 - .word 1930 - .word 56261 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 33679 - .word 45771 - .word 8173 - .word 62515 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 49757 - .word 3681 - .word 5948 - .word 63753 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 9193 - .word 10955 - .word 22026 - .word 60547 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 55541 - .word 20458 - .word 54828 - .word 54096 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 47142 - .word 16345 - .word 20299 - .word 45812 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 29126 - .word 37494 - .word 48225 - .word 36984 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 15107 - .word 34726 - .word 44130 - .word 57191 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 57806 - .word 26620 - .word 53230 - .word 42777 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 45097 - .word 47803 - .word 25447 - .word 61330 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 40016 - .word 15109 - .word 58793 - .word 33461 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 6456 - .word 21547 - .word 27586 - .word 56453 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 5294 - .word 26959 - .word 24309 - .word 57122 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 9256 - .word 20178 - .word 27285 - .word 56054 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 11974 - .word 6713 - .word 58610 - .word 53898 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 56155 - .word 5104 - .word 43351 - .word 37953 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 31236 - .word 18492 - .word 31580 - .word 45205 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 20337 - .word 4737 - .word 24808 - .word 48018 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 43780 - .word 34731 - .word 45426 - .word 46730 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 61467 - .word 48142 - .word 38368 - .word 42346 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 39936 - .word 34435 - .word 51154 - .word 36121 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 41171 - .word 26385 - .word 45942 - .word 58461 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 31471 - .word 18426 - .word 18937 - .word 45145 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 23734 - .word 23053 - .word 7429 - .word 33424 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 28624 - .word 21549 - .word 30360 - .word 48021 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 9108 - .word 57175 - .word 16609 - .word 33031 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 44968 - .word 30293 - .word 53704 - .word 38182 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 63279 - .word 65139 - .word 8683 - .word 42110 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 43283 - .word 52727 - .word 26719 - .word 56933 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 18528 - .word 63869 - .word 40120 - .word 60712 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 28913 - .word 42968 - .word 213 - .word 43569 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 2240 - .word 11347 - .word 26371 - .word 51717 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 7147 - .word 20723 - .word 31050 - .word 54241 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 49648 - .word 51324 - .word 11444 - .word 51872 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 8690 - .word 5809 - .word 9903 - .word 46065 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 1296 - .word 54160 - .word 11620 - .word 38443 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 251 - .word 19098 - .word 34161 - .word 60807 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 46412 - .word 5592 - .word 55877 - .word 45861 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 5959 - .word 21591 - .word 50019 - .word 33145 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 2025 - .word 457 - .word 9244 - .word 46095 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 54038 - .word 55252 - .word 55370 - .word 62518 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 47036 - .word 16304 - .word 12880 - .word 40628 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 18241 - .word 19196 - .word 21406 - .word 57530 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 21199 - .word 5012 - .word 49009 - .word 34179 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 54990 - .word 53386 - .word 65270 - .word 33668 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 28726 - .word 33993 - .word 32251 - .word 45542 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 13837 - .word 35230 - .word 52966 - .word 64362 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 39173 - .word 47380 - .word 34462 - .word 36139 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 39489 - .word 64902 - .word 49120 - .word 35472 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 21714 - .word 58783 - .word 27254 - .word 63315 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 7367 - .word 49518 - .word 65112 - .word 52470 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 43556 - .word 37199 - .word 28377 - .word 40908 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 37864 - .word 51941 - .word 23210 - .word 60543 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 51520 - .word 41236 - .word 58920 - .word 42796 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 27066 - .word 4055 - .word 50549 - .word 58076 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 8077 - .word 7791 - .word 5643 - .word 37977 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 56642 - .word 7120 - .word 1392 - .word 48650 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 33215 - .word 4176 - .word 55081 - .word 59653 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 38962 - .word 43845 - .word 18883 - .word 41782 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 9405 - .word 19610 - .word 41716 - .word 40526 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 22463 - .word 33011 - .word 2834 - .word 59404 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 23962 - .word 42196 - .word 52880 - .word 56044 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 56651 - .word 1819 - .word 25970 - .word 41984 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 36494 - .word 8013 - .word 55275 - .word 45183 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 29601 - .word 10973 - .word 29140 - .word 41460 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 33142 - .word 6988 - .word 53485 - .word 34321 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 42305 - .word 46215 - .word 46985 - .word 52653 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 32750 - .word 12648 - .word 9511 - .word 38000 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 28037 - .word 7223 - .word 39341 - .word 52115 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 43511 - .word 40096 - .word 33119 - .word 34189 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 41081 - .word 59110 - .word 54072 - .word 43128 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 52022 - .word 40239 - .word 12039 - .word 52524 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 9970 - .word 11940 - .word 19019 - .word 62959 - .word 49128 - .word 0 - .word 0 - .word 0 - .word 8444 - .word 14648 - .word 8577 - .word 36069 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 47055 - .word 6244 - .word 23935 - .word 45569 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 17962 - .word 25012 - .word 42920 - .word 38222 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 32361 - .word 55573 - .word 62116 - .word 40518 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 23469 - .word 12285 - .word 11074 - .word 41169 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 29710 - .word 22026 - .word 53610 - .word 45713 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 19101 - .word 51375 - .word 37915 - .word 49464 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 1487 - .word 25012 - .word 26269 - .word 42849 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 24702 - .word 7300 - .word 26639 - .word 32851 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 5625 - .word 62032 - .word 62646 - .word 46360 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 16670 - .word 28857 - .word 9900 - .word 61429 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 46530 - .word 36341 - .word 10884 - .word 38667 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 26979 - .word 7608 - .word 53990 - .word 46612 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 13306 - .word 33772 - .word 42194 - .word 54094 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 5215 - .word 26849 - .word 40637 - .word 60704 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 22157 - .word 10775 - .word 9954 - .word 33697 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 62485 - .word 60905 - .word 33942 - .word 35703 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 47033 - .word 9473 - .word 12114 - .word 36373 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 18718 - .word 57887 - .word 63790 - .word 64802 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 60436 - .word 32137 - .word 16772 - .word 44812 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 22870 - .word 68 - .word 14788 - .word 47045 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 13858 - .word 11038 - .word 51083 - .word 33832 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 24411 - .word 53664 - .word 52423 - .word 44992 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 23130 - .word 50537 - .word 29298 - .word 38364 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 59445 - .word 25072 - .word 42634 - .word 55036 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 27750 - .word 60051 - .word 51021 - .word 35697 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 41673 - .word 42346 - .word 29154 - .word 43180 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 24646 - .word 17588 - .word 60780 - .word 49501 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 30636 - .word 48402 - .word 41439 - .word 54315 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 53530 - .word 51574 - .word 33266 - .word 57402 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 24832 - .word 32214 - .word 6566 - .word 58730 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 57338 - .word 52017 - .word 53845 - .word 59748 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 1236 - .word 12983 - .word 25321 - .word 57902 - .word 16352 - .word 0 - .word 0 - .word 0 - .word 42696 - .word 11590 - .word 13704 - .word 47288 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 20112 - .word 35255 - .word 63039 - .word 51665 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 20272 - .word 45351 - .word 26440 - .word 36407 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 23351 - .word 42139 - .word 19582 - .word 38935 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 65431 - .word 27369 - .word 16464 - .word 36140 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 53584 - .word 5561 - .word 32961 - .word 55717 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 39374 - .word 7231 - .word 45599 - .word 56117 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 1294 - .word 6051 - .word 44462 - .word 39418 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 34729 - .word 52585 - .word 9627 - .word 47645 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 17858 - .word 59905 - .word 65371 - .word 52695 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 43933 - .word 27878 - .word 22295 - .word 54792 - .word 49127 - .word 0 - .word 0 - .word 0 - .word 57164 - .word 8466 - .word 41536 - .word 54342 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 62613 - .word 13809 - .word 4914 - .word 51847 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 51382 - .word 5505 - .word 45058 - .word 47893 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 20574 - .word 54447 - .word 25989 - .word 44189 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 20867 - .word 50041 - .word 5177 - .word 38746 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 51710 - .word 33997 - .word 26466 - .word 39335 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 35180 - .word 39426 - .word 44580 - .word 39632 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 39102 - .word 49560 - .word 46254 - .word 52105 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 49858 - .word 3610 - .word 18403 - .word 60348 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 63577 - .word 52764 - .word 23423 - .word 53731 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 17746 - .word 20210 - .word 17254 - .word 46087 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 57780 - .word 38655 - .word 62917 - .word 51922 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 56818 - .word 27103 - .word 46800 - .word 44610 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 42772 - .word 47939 - .word 39429 - .word 53363 - .word 49128 - .word 0 - .word 0 - .word 0 - .word 7127 - .word 43872 - .word 47188 - .word 55109 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 35603 - .word 15923 - .word 26337 - .word 52288 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 15540 - .word 23148 - .word 44469 - .word 46826 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 38573 - .word 44351 - .word 49528 - .word 40134 - .word 49120 - .word 0 - .word 0 - .word 0 - .word 46922 - .word 10206 - .word 58026 - .word 33232 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 48893 - .word 37264 - .word 47364 - .word 55135 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 34563 - .word 54412 - .word 19025 - .word 43320 - .word 16345 - .word 0 - .word 0 - .word 0 - .word 50485 - .word 58441 - .word 18478 - .word 53939 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 57295 - .word 1543 - .word 39725 - .word 59283 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 61902 - .word 50672 - .word 60234 - .word 34832 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 47445 - .word 686 - .word 22678 - .word 38214 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 38808 - .word 16930 - .word 17219 - .word 37683 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 15851 - .word 55325 - .word 43407 - .word 60214 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 1143 - .word 605 - .word 3834 - .word 44087 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 37926 - .word 51721 - .word 32650 - .word 51423 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 719 - .word 37404 - .word 19156 - .word 44137 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 35866 - .word 56877 - .word 40751 - .word 46818 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 17240 - .word 30023 - .word 36586 - .word 42015 - .word 49121 - .word 0 - .word 0 - .word 0 - .word 54230 - .word 7254 - .word 30602 - .word 34461 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 8012 - .word 12609 - .word 22719 - .word 53286 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 30585 - .word 22802 - .word 38382 - .word 39498 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 49910 - .word 61459 - .word 13066 - .word 58648 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 4234 - .word 29117 - .word 43487 - .word 41014 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 15283 - .word 31 - .word 53183 - .word 37265 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 38704 - .word 430 - .word 57551 - .word 43591 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 53647 - .word 31489 - .word 59377 - .word 44715 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 58843 - .word 40196 - .word 27184 - .word 44045 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 21712 - .word 17792 - .word 22495 - .word 41091 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 4064 - .word 22340 - .word 38581 - .word 35349 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 24218 - .word 42337 - .word 60128 - .word 52640 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 20378 - .word 19984 - .word 2299 - .word 54122 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 31249 - .word 59274 - .word 16273 - .word 55107 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 52834 - .word 54517 - .word 12431 - .word 49909 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 54832 - .word 24393 - .word 30353 - .word 51256 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 65180 - .word 60129 - .word 24669 - .word 41244 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 6591 - .word 13357 - .word 31681 - .word 59287 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 26454 - .word 14700 - .word 42966 - .word 39875 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 2956 - .word 33652 - .word 3414 - .word 53265 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 52370 - .word 22181 - .word 28024 - .word 33144 - .word 16337 - .word 0 - .word 0 - .word 0 - .word 13170 - .word 827 - .word 21750 - .word 47190 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 46086 - .word 34614 - .word 16391 - .word 63371 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 23901 - .word 55438 - .word 56964 - .word 55951 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 6825 - .word 37234 - .word 16184 - .word 48173 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 100 - .word 15349 - .word 44285 - .word 40213 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 46705 - .word 62401 - .word 15619 - .word 64493 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 5832 - .word 45818 - .word 5603 - .word 48870 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 26154 - .word 11509 - .word 12905 - .word 33853 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 57899 - .word 64916 - .word 17522 - .word 39399 - .word 16352 - .word 0 - .word 0 - .word 0 - .word 11797 - .word 62659 - .word 15787 - .word 52982 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 4387 - .word 49305 - .word 27685 - .word 41688 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 8893 - .word 53993 - .word 6961 - .word 62732 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 6561 - .word 49840 - .word 37854 - .word 49392 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 22913 - .word 52496 - .word 16836 - .word 64532 - .word 16337 - .word 0 - .word 0 - .word 0 - .word 61478 - .word 12903 - .word 22917 - .word 40137 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 20254 - .word 5653 - .word 41280 - .word 45163 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 9250 - .word 21583 - .word 29887 - .word 42398 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 21296 - .word 56033 - .word 20302 - .word 45697 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 2595 - .word 14223 - .word 9373 - .word 34428 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 43880 - .word 13192 - .word 17465 - .word 51046 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 10750 - .word 52386 - .word 15061 - .word 37140 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 43380 - .word 26688 - .word 4603 - .word 52842 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 57923 - .word 50589 - .word 40806 - .word 36546 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 41550 - .word 43340 - .word 52700 - .word 48703 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 2829 - .word 50954 - .word 33981 - .word 61546 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 53540 - .word 53334 - .word 26985 - .word 35726 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 1383 - .word 41626 - .word 39002 - .word 35204 - .word 16343 - .word 0 - .word 0 - .word 0 - .word 4988 - .word 17152 - .word 47624 - .word 42298 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 13081 - .word 59676 - .word 51281 - .word 43278 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 20576 - .word 9083 - .word 44900 - .word 60572 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 5241 - .word 64752 - .word 26216 - .word 43285 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 54740 - .word 4493 - .word 22744 - .word 47855 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 40170 - .word 38190 - .word 50840 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 64000 - .word 51124 - .word 38392 - .word 32771 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 6193 - .word 27449 - .word 18043 - .word 41906 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 55083 - .word 10857 - .word 24850 - .word 53024 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 39204 - .word 24043 - .word 43883 - .word 33151 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 16615 - .word 33399 - .word 37109 - .word 40897 - .word 49128 - .word 0 - .word 0 - .word 0 - .word 45005 - .word 13768 - .word 23576 - .word 49662 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 19875 - .word 47904 - .word 27295 - .word 59169 - .word 49120 - .word 0 - .word 0 - .word 0 - .word 50767 - .word 38341 - .word 26349 - .word 34421 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 61460 - .word 9200 - .word 49063 - .word 38824 - .word 49113 - .word 0 - .word 0 - .word 0 - .word 17698 - .word 13464 - .word 19312 - .word 41938 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 14145 - .word 49711 - .word 41841 - .word 42410 - .word 49105 - .word 0 - .word 0 - .word 0 - .word 52259 - .word 38890 - .word 11861 - .word 38197 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 37928 - .word 15208 - .word 58116 - .word 52459 - .word 49096 - .word 0 - .word 0 - .word 0 - .word 32955 - .word 48671 - .word 55988 - .word 42873 - .word 49084 - .word 0 - .word 0 - .word 0 - .word 10284 - .word 13591 - .word 10015 - .word 45425 - .word 16321 - .word 0 - .word 0 - .word 0 - .word 60165 - .word 7231 - .word 29309 - .word 47020 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 2826 - .word 34241 - .word 10052 - .word 46822 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 38150 - .word 11520 - .word 57874 - .word 50634 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 13154 - .word 32010 - .word 59285 - .word 54374 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 3630 - .word 36258 - .word 15737 - .word 57945 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 33484 - .word 32040 - .word 11194 - .word 61229 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 29890 - .word 19177 - .word 6587 - .word 64088 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 47912 - .word 33375 - .word 45262 - .word 33179 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 35727 - .word 49010 - .word 4249 - .word 33927 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 48287 - .word 11774 - .word 34966 - .word 34177 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 59219 - .word 12218 - .word 14591 - .word 33807 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 45587 - .word 38263 - .word 60150 - .word 65351 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 64248 - .word 19753 - .word 11467 - .word 61248 - .word 16330 - .word 0 - .word 0 - .word 0 - .word 8987 - .word 4417 - .word 35296 - .word 54967 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 58348 - .word 59855 - .word 58179 - .word 46574 - .word 16322 - .word 0 - .word 0 - .word 0 - .word 838 - .word 40288 - .word 16803 - .word 34203 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 19985 - .word 64792 - .word 35689 - .word 34160 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 63242 - .word 24737 - .word 37564 - .word 33357 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 21080 - .word 30395 - .word 32053 - .word 60879 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 31967 - .word 27284 - .word 22818 - .word 55292 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 25886 - .word 29922 - .word 20917 - .word 49964 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 16415 - .word 22145 - .word 37135 - .word 44903 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 60061 - .word 56529 - .word 59607 - .word 40115 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 61716 - .word 63444 - .word 60667 - .word 35604 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 44658 - .word 58531 - .word 9530 - .word 62744 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 62260 - .word 39586 - .word 42345 - .word 54833 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 28253 - .word 12485 - .word 44364 - .word 47473 - .word 16336 - .word 0 - .word 0 - .word 0 - .word 12640 - .word 24607 - .word 1626 - .word 40656 - .word 49100 - .word 0 - .word 0 - .word 0 - .word 34428 - .word 36370 - .word 1024 - .word 34362 - .word 16328 - .word 0 - .word 0 - .word 0 - .word 29040 - .word 20316 - .word 63988 - .word 57186 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 56625 - .word 35023 - .word 4494 - .word 47694 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 12074 - .word 64589 - .word 55447 - .word 37930 - .word 49083 - .word 0 - .word 0 - .word 0 - .word 50967 - .word 1382 - .word 5204 - .word 52101 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 3284 - .word 33134 - .word 2262 - .word 47439 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 46363 - .word 11691 - .word 13356 - .word 36476 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 3419 - .word 29155 - .word 56063 - .word 55913 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 46070 - .word 27060 - .word 45787 - .word 42709 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 48455 - .word 49617 - .word 63339 - .word 65012 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 11309 - .word 38321 - .word 50476 - .word 49291 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 63177 - .word 54179 - .word 19446 - .word 37218 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 17008 - .word 20702 - .word 63396 - .word 55953 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 58916 - .word 21526 - .word 44533 - .word 41856 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 4054 - .word 60910 - .word 64524 - .word 62288 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 572 - .word 56463 - .word 6651 - .word 46074 - .word 49097 - .word 0 - .word 0 - .word 0 - .word 294 - .word 32916 - .word 12940 - .word 33845 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 61241 - .word 23461 - .word 12133 - .word 49362 - .word 49088 - .word 0 - .word 0 - .word 0 - .word 43813 - .word 54697 - .word 47595 - .word 36628 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 7023 - .word 63196 - .word 1211 - .word 52552 - .word 49079 - .word 0 - .word 0 - .word 0 - .word 49710 - .word 23216 - .word 57316 - .word 57937 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 16917 - .word 54685 - .word 15559 - .word 33684 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 19402 - .word 20755 - .word 35177 - .word 43607 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 18988 - .word 7708 - .word 26373 - .word 56330 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 31678 - .word 36048 - .word 15370 - .word 36299 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 62053 - .word 9463 - .word 59420 - .word 46669 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 43189 - .word 37083 - .word 47017 - .word 59851 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 56431 - .word 23594 - .word 54456 - .word 38275 - .word 49113 - .word 0 - .word 0 - .word 0 - .word 57207 - .word 5358 - .word 61057 - .word 48816 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 55955 - .word 61547 - .word 7096 - .word 62073 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 38324 - .word 43297 - .word 2038 - .word 39337 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 48019 - .word 63539 - .word 58854 - .word 49683 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 38415 - .word 45891 - .word 48038 - .word 62495 - .word 16321 - .word 0 - .word 0 - .word 0 - .word 6285 - .word 58141 - .word 38062 - .word 39153 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 8535 - .word 47970 - .word 20521 - .word 50223 - .word 16312 - .word 0 - .word 0 - .word 0 - .word 3599 - .word 31205 - .word 53376 - .word 62523 - .word 49075 - .word 0 - .word 0 - .word 0 - .word 53390 - .word 39428 - .word 31508 - .word 33365 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 24907 - .word 1998 - .word 17203 - .word 47787 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 65154 - .word 44054 - .word 55771 - .word 52050 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 59345 - .word 56252 - .word 17241 - .word 56609 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 21068 - .word 33081 - .word 36502 - .word 61470 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 5838 - .word 32265 - .word 27141 - .word 33320 - .word 49121 - .word 0 - .word 0 - .word 0 - .word 13157 - .word 36097 - .word 56398 - .word 36061 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 34641 - .word 3406 - .word 61161 - .word 38959 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 36822 - .word 2107 - .word 7812 - .word 42013 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 57689 - .word 7026 - .word 46609 - .word 45217 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 65442 - .word 46672 - .word 32230 - .word 48567 - .word 16328 - .word 0 - .word 0 - .word 0 - .word 38794 - .word 56166 - .word 59740 - .word 52052 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 7020 - .word 42539 - .word 58408 - .word 55641 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 5792 - .word 16154 - .word 40642 - .word 59348 - .word 49081 - .word 0 - .word 0 - .word 0 - .word 45758 - .word 39239 - .word 10684 - .word 64996 - .word 16308 - .word 0 - .word 0 - .word 0 - .word 17135 - .word 25280 - .word 14240 - .word 34593 - .word 49072 - .word 0 - .word 0 - .word 0 - .word 22956 - .word 27174 - .word 6236 - .word 35739 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 41448 - .word 9608 - .word 15061 - .word 33872 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 35041 - .word 22115 - .word 31787 - .word 62060 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 47943 - .word 57954 - .word 5630 - .word 56794 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 12256 - .word 51468 - .word 48243 - .word 51918 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 16861 - .word 555 - .word 19712 - .word 47409 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 14521 - .word 28998 - .word 64476 - .word 43241 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 42742 - .word 52364 - .word 18112 - .word 39394 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 11937 - .word 57143 - .word 59317 - .word 35844 - .word 16336 - .word 0 - .word 0 - .word 0 - .word 54775 - .word 41142 - .word 37066 - .word 65147 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 52047 - .word 20166 - .word 2989 - .word 59124 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 63890 - .word 14576 - .word 19973 - .word 53583 - .word 49088 - .word 0 - .word 0 - .word 0 - .word 51017 - .word 21644 - .word 32682 - .word 48474 - .word 16315 - .word 0 - .word 0 - .word 0 - .word 14951 - .word 9527 - .word 54932 - .word 43797 - .word 49078 - .word 0 - .word 0 - .word 0 - .word 19956 - .word 63323 - .word 21590 - .word 40697 - .word 16305 - .word 0 - .word 0 - .word 0 - .word 13287 - .word 59412 - .word 52293 - .word 36781 - .word 49068 - .word 0 - .word 0 - .word 0 - .word 20654 - .word 3963 - .word 37243 - .word 46202 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 14259 - .word 41161 - .word 56379 - .word 47991 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 29552 - .word 20159 - .word 19967 - .word 36969 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 36671 - .word 37033 - .word 31146 - .word 56915 - .word 49128 - .word 0 - .word 0 - .word 0 - .word 40096 - .word 16159 - .word 8745 - .word 43779 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 31426 - .word 40251 - .word 6629 - .word 33649 - .word 49118 - .word 0 - .word 0 - .word 0 - .word 62460 - .word 14572 - .word 46922 - .word 51685 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 21330 - .word 50824 - .word 20752 - .word 39663 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 59043 - .word 6300 - .word 36178 - .word 60824 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 11117 - .word 55297 - .word 15596 - .word 46598 - .word 49096 - .word 0 - .word 0 - .word 0 - .word 52972 - .word 24185 - .word 7857 - .word 35668 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 48165 - .word 35957 - .word 4973 - .word 54554 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 40559 - .word 40135 - .word 50657 - .word 41665 - .word 16312 - .word 0 - .word 0 - .word 0 - .word 22209 - .word 12399 - .word 38770 - .word 63599 - .word 49074 - .word 0 - .word 0 - .word 0 - .word 21134 - .word 56966 - .word 28654 - .word 49967 - .word 16301 - .word 0 - .word 0 - .word 0 - .word 55252 - .word 38724 - .word 60696 - .word 38196 - .word 49064 - .word 0 - .word 0 - .word 0 - .word 50324 - .word 38050 - .word 41691 - .word 52128 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 57576 - .word 19017 - .word 35093 - .word 33984 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 45261 - .word 53464 - .word 26203 - .word 44021 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 59506 - .word 58350 - .word 50456 - .word 56993 - .word 49127 - .word 0 - .word 0 - .word 0 - .word 39656 - .word 29013 - .word 30706 - .word 36875 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 15950 - .word 25278 - .word 29858 - .word 47692 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 44951 - .word 52254 - .word 26639 - .word 61649 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 14884 - .word 15288 - .word 36355 - .word 39823 - .word 49105 - .word 0 - .word 0 - .word 0 - .word 33589 - .word 37339 - .word 42662 - .word 51420 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 59837 - .word 52901 - .word 27833 - .word 33178 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 23530 - .word 8792 - .word 46326 - .word 42790 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 22918 - .word 41993 - .word 30280 - .word 55154 - .word 49082 - .word 0 - .word 0 - .word 0 - .word 22935 - .word 40180 - .word 10208 - .word 35510 - .word 16309 - .word 0 - .word 0 - .word 0 - .word 24655 - .word 6092 - .word 5569 - .word 45708 - .word 49071 - .word 0 - .word 0 - .word 0 - .word 1836 - .word 9946 - .word 17030 - .word 60600 - .word 16297 - .word 0 - .word 0 - .word 0 - .word 58034 - .word 64044 - .word 12732 - .word 39095 - .word 49060 - .word 0 - .word 0 - .word 0 - .word 54043 - .word 4884 - .word 4993 - .word 50896 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 52175 - .word 36282 - .word 1403 - .word 48115 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 8979 - .word 278 - .word 60581 - .word 52397 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 62427 - .word 36042 - .word 64958 - .word 57041 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 22617 - .word 56486 - .word 29933 - .word 62075 - .word 16352 - .word 0 - .word 0 - .word 0 - .word 6668 - .word 34800 - .word 16726 - .word 33764 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 58438 - .word 34332 - .word 45904 - .word 36716 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 64514 - .word 12491 - .word 17770 - .word 39912 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 38781 - .word 4147 - .word 20350 - .word 43369 - .word 16329 - .word 0 - .word 0 - .word 0 - .word 11653 - .word 23288 - .word 23101 - .word 47107 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 24538 - .word 52112 - .word 19258 - .word 51147 - .word 16317 - .word 0 - .word 0 - .word 0 - .word 55081 - .word 11864 - .word 2795 - .word 55511 - .word 49079 - .word 0 - .word 0 - .word 0 - .word 30359 - .word 7516 - .word 42523 - .word 60199 - .word 16305 - .word 0 - .word 0 - .word 0 - .word 51632 - .word 54516 - .word 60788 - .word 65273 - .word 49067 - .word 0 - .word 0 - .word 0 - .word 8259 - .word 26817 - .word 16640 - .word 36463 - .word 16294 - .word 0 - .word 0 - .word 0 - .word 25358 - .word 21633 - .word 63088 - .word 39650 - .word 49056 - .word 0 - .word 0 - .word 0 - .word 37940 - .word 45084 - .word 22741 - .word 53976 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 56905 - .word 35663 - .word 13071 - .word 34053 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 6338 - .word 45524 - .word 29128 - .word 62353 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 53870 - .word 55231 - .word 26051 - .word 57072 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 25356 - .word 27338 - .word 39402 - .word 52225 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 53832 - .word 61470 - .word 21273 - .word 47778 - .word 49113 - .word 0 - .word 0 - .word 0 - .word 58577 - .word 63695 - .word 35460 - .word 43698 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 4520 - .word 44723 - .word 47409 - .word 39956 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 1812 - .word 29018 - .word 42821 - .word 36525 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 59061 - .word 29228 - .word 16191 - .word 33380 - .word 49089 - .word 0 - .word 0 - .word 0 - .word 39396 - .word 18010 - .word 60638 - .word 60994 - .word 16314 - .word 0 - .word 0 - .word 0 - .word 49088 - .word 9900 - .word 51011 - .word 55711 - .word 49076 - .word 0 - .word 0 - .word 0 - .word 37150 - .word 50516 - .word 56492 - .word 50852 - .word 16302 - .word 0 - .word 0 - .word 0 - .word 28484 - .word 40361 - .word 52896 - .word 46416 - .word 49064 - .word 0 - .word 0 - .word 0 - .word 62255 - .word 31126 - .word 18737 - .word 43665 - .word 16290 - .word 0 - .word 0 - .word 0 - .word 12057 - .word 58357 - .word 2287 - .word 39984 - .word 49052 - .word 0 - .word 0 - .word 0 - .word 10303 - .word 34822 - .word 30753 - .word 42638 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 35383 - .word 38620 - .word 16953 - .word 48193 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 33393 - .word 6703 - .word 23267 - .word 37093 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 15343 - .word 55882 - .word 8818 - .word 57090 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 43704 - .word 64267 - .word 56511 - .word 43925 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 4607 - .word 47760 - .word 9543 - .word 33791 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 56389 - .word 24814 - .word 13621 - .word 51980 - .word 16337 - .word 0 - .word 0 - .word 0 - .word 53957 - .word 28278 - .word 52920 - .word 39972 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 44558 - .word 56829 - .word 64035 - .word 61466 - .word 16324 - .word 0 - .word 0 - .word 0 - .word 38720 - .word 53021 - .word 48635 - .word 47250 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 44746 - .word 16730 - .word 48948 - .word 36315 - .word 16312 - .word 0 - .word 0 - .word 0 - .word 35899 - .word 1861 - .word 5901 - .word 55812 - .word 49073 - .word 0 - .word 0 - .word 0 - .word 22074 - .word 38313 - .word 14608 - .word 42863 - .word 16299 - .word 0 - .word 0 - .word 0 - .word 55515 - .word 23576 - .word 64018 - .word 32920 - .word 49061 - .word 0 - .word 0 - .word 0 - .word 12839 - .word 2194 - .word 19804 - .word 52126 - .word 16286 - .word 0 - .word 0 - .word 0 - .word 11439 - .word 41150 - .word 15351 - .word 40172 - .word 49048 - .word 0 - .word 0 - .word 0 - .word 29431 - .word 9874 - .word 45662 - .word 49530 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 65266 - .word 58931 - .word 1289 - .word 34097 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 37900 - .word 52013 - .word 19533 - .word 44126 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 56648 - .word 29183 - .word 44293 - .word 57098 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 6159 - .word 2813 - .word 55364 - .word 36937 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 43479 - .word 31839 - .word 13895 - .word 47785 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 5187 - .word 20139 - .word 24873 - .word 61810 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 122 - .word 12763 - .word 63612 - .word 39970 - .word 49097 - .word 0 - .word 0 - .word 0 - .word 44050 - .word 14658 - .word 36451 - .word 51689 - .word 16322 - .word 0 - .word 0 - .word 0 - .word 25644 - .word 4873 - .word 38936 - .word 33417 - .word 49084 - .word 0 - .word 0 - .word 0 - .word 47798 - .word 57836 - .word 54492 - .word 43203 - .word 16309 - .word 0 - .word 0 - .word 0 - .word 13594 - .word 52300 - .word 36178 - .word 55848 - .word 49070 - .word 0 - .word 0 - .word 0 - .word 62324 - .word 37045 - .word 44215 - .word 36078 - .word 16296 - .word 0 - .word 0 - .word 0 - .word 9408 - .word 55695 - .word 35369 - .word 46620 - .word 49057 - .word 0 - .word 0 - .word 0 - .word 55933 - .word 58459 - .word 63135 - .word 62102 - .word 16282 - .word 0 - .word 0 - .word 0 - .word 9035 - .word 28599 - .word 9663 - .word 40267 - .word 49044 - .word 0 - .word 0 - .word 0 - .word 64440 - .word 9942 - .word 11459 - .word 51063 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 54621 - .word 1381 - .word 54593 - .word 57593 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 57672 - .word 22144 - .word 48770 - .word 34240 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 41335 - .word 40315 - .word 35384 - .word 40709 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 44154 - .word 2667 - .word 29983 - .word 48395 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 11933 - .word 28752 - .word 33333 - .word 57526 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 28038 - .word 64578 - .word 40018 - .word 34186 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 37517 - .word 65009 - .word 17291 - .word 40628 - .word 49096 - .word 0 - .word 0 - .word 0 - .word 55118 - .word 35846 - .word 36301 - .word 48278 - .word 16321 - .word 0 - .word 0 - .word 0 - .word 8485 - .word 24440 - .word 14912 - .word 57363 - .word 49082 - .word 0 - .word 0 - .word 0 - .word 32377 - .word 28880 - .word 65211 - .word 34074 - .word 16308 - .word 0 - .word 0 - .word 0 - .word 34616 - .word 16831 - .word 8616 - .word 40478 - .word 49069 - .word 0 - .word 0 - .word 0 - .word 8999 - .word 50919 - .word 12017 - .word 48079 - .word 16294 - .word 0 - .word 0 - .word 0 - .word 35787 - .word 61739 - .word 12812 - .word 57101 - .word 49055 - .word 0 - .word 0 - .word 0 - .word 44504 - .word 58876 - .word 42861 - .word 33904 - .word 16281 - .word 0 - .word 0 - .word 0 - .word 47876 - .word 27247 - .word 49503 - .word 40257 - .word 49042 - .word 0 - .word 0 - .word 0 - .type _erfcl_Q,@object - .size _erfcl_Q,7168 - .align 2 -_erfcl_S: - .word 0 - .word 0 - .word 0 - .word 57344 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56559 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55197 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45662 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45290 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44607 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43781 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42924 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42104 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41357 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40696 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40122 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39629 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39210 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38855 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38556 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38304 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38091 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37913 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37763 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37637 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37531 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37442 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37368 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37305 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37252 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37208 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37189 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _erfcl_S,@object - .size _erfcl_S,448 - .align 2 -_erfcl_UNDERFLOW_INT: - .word 42217 - .word 46880 - .word 24677 - .word 54546 - .word 16389 - .word 0 - .word 0 - .word 0 - .type _erfcl_UNDERFLOW_INT,@object - .size _erfcl_UNDERFLOW_INT,16 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erff.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erff.S deleted file mode 100644 index 07752ac1c5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erff.S +++ /dev/null @@ -1,254 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erff.c" - .text -..TXTST0: -# -- Begin erff - .text - .align 16,0x90 - .globl erff -erff: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_erff.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -16(%rsp) - movl %edx, %eax - andl $2147483647, %edx - andl $-2147483648, %eax - orl $1065353216, %eax - movl %eax, -24(%rsp) - cmpl $2139095040, %edx - movss -24(%rsp), %xmm0 - jge ..B1.8 -..B1.2: - cmpl $1081791744, %edx - jge ..B1.7 -..B1.3: - cmpl $1065353216, %edx - jl ..B1.5 -..B1.4: - movl %edx, %eax - andl $8388607, %edx - orl $1065353216, %edx - pxor %xmm4, %xmm4 - movl %edx, -24(%rsp) - lea _dbA(%rip), %rsi - shrl $23, %eax - cvtss2sd -24(%rsp), %xmm4 - cvtss2sd %xmm0, %xmm0 - subsd .L_2il0floatpacket.0(%rip), %xmm4 - movaps %xmm4, %xmm3 - lea -1016(,%rax,8), %edx - mulsd %xmm4, %xmm3 - lea -508(%rdx,%rax,4), %ecx - movslq %ecx, %rcx - movaps %xmm3, %xmm7 - mulsd %xmm3, %xmm7 - movsd 152(%rsi,%rcx,8), %xmm6 - mulsd %xmm4, %xmm6 - movsd 120(%rsi,%rcx,8), %xmm8 - mulsd %xmm4, %xmm8 - addsd 144(%rsi,%rcx,8), %xmm6 - movsd 136(%rsi,%rcx,8), %xmm5 - mulsd %xmm3, %xmm6 - addsd 112(%rsi,%rcx,8), %xmm8 - mulsd %xmm4, %xmm5 - mulsd %xmm3, %xmm8 - addsd %xmm5, %xmm6 - movsd 88(%rsi,%rcx,8), %xmm9 - movsd 104(%rsi,%rcx,8), %xmm2 - mulsd %xmm4, %xmm9 - addsd 128(%rsi,%rcx,8), %xmm6 - mulsd %xmm4, %xmm2 - mulsd %xmm7, %xmm6 - addsd 80(%rsi,%rcx,8), %xmm9 - addsd %xmm2, %xmm8 - mulsd %xmm3, %xmm9 - addsd 96(%rsi,%rcx,8), %xmm8 - movsd 72(%rsi,%rcx,8), %xmm1 - addsd %xmm6, %xmm8 - mulsd %xmm4, %xmm1 - mulsd %xmm7, %xmm8 - addsd %xmm1, %xmm9 - addsd 64(%rsi,%rcx,8), %xmm9 - addsd %xmm8, %xmm9 - mulsd %xmm0, %xmm9 - cvtsd2ss %xmm9, %xmm9 - jmp ..B1.6 -..B1.5: - pxor %xmm3, %xmm3 - lea 56+_dbA(%rip), %rdi - lea 48+_dbA(%rip), %rax - lea 40+_dbA(%rip), %r8 - lea 32+_dbA(%rip), %rdx - lea 24+_dbA(%rip), %r9 - lea 16+_dbA(%rip), %rcx - lea 8+_dbA(%rip), %r10 - movsd (%rdi), %xmm2 - lea _dbA(%rip), %rsi - movsd (%rax), %xmm9 - cvtss2sd -16(%rsp), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm9 - addsd (%r8), %xmm2 - addsd (%rdx), %xmm9 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm9 - addsd (%r9), %xmm2 - addsd (%rcx), %xmm9 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm9 - addsd (%r10), %xmm2 - addsd (%rsi), %xmm9 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm9 - mulsd %xmm3, %xmm9 - cvtsd2ss %xmm9, %xmm9 -..B1.6: - movaps %xmm9, %xmm0 - ret -..B1.7: - cvtss2sd %xmm0, %xmm0 - lea 256+_dbA(%rip), %rax - mulsd (%rax), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.8: - movss -16(%rsp), %xmm1 - addss %xmm1, %xmm1 - je ..L3 - movaps %xmm1, %xmm0 -..L3: - ret - .align 16,0x90 - .cfi_endproc - .type erff,@function - .size erff,.-erff - .data -# -- End erff - .section .rodata, "a" - .align 16 - .align 16 -_dbA: - .long 1346373606 - .long 1072827863 - .long 1710987328 - .long 3218608756 - .long 2039146822 - .long 1069343472 - .long 2052989911 - .long 3214639770 - .long 3741021613 - .long 1064657550 - .long 2828932584 - .long 3209415657 - .long 556515485 - .long 1058898537 - .long 1493771156 - .long 3202627648 - .long 1460823802 - .long 1072622165 - .long 647757120 - .long 1069445687 - .long 1478820123 - .long 3217479081 - .long 827266439 - .long 1069662880 - .long 4153551678 - .long 3215381932 - .long 3249389370 - .long 3213783616 - .long 3875823656 - .long 1066650297 - .long 2479749796 - .long 3212012677 - .long 4079794357 - .long 3210967401 - .long 3292960271 - .long 1062989018 - .long 1338933997 - .long 3204757561 - .long 4209598023 - .long 3207545998 - .long 2886434981 - .long 1072693201 - .long 1721637260 - .long 1060257935 - .long 960688093 - .long 3210436681 - .long 1128797080 - .long 1064950642 - .long 798939459 - .long 3213958757 - .long 937205111 - .long 1067493282 - .long 3504975339 - .long 3215465534 - .long 3388113641 - .long 1068080152 - .long 9542307 - .long 3215088353 - .long 1310184383 - .long 1065080747 - .long 3264801679 - .long 1066837484 - .long 3394984936 - .long 3214223095 - .long 4294967295 - .long 1072693247 - .type _dbA,@object - .size _dbA,264 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3ff80000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfl.S deleted file mode 100644 index 22d826349b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/erfl.S +++ /dev/null @@ -1,2357 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "erfl.c" - .text -..TXTST0: -# -- Begin erfl - .text - .align 16,0x90 - .globl erfl -erfl: -# parameter 1: 80 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_erfl.1: -..L2: - - subq $72, %rsp - .cfi_def_cfa_offset 80 - xorb %dl, %dl -..B1.2: - fnstcw 58(%rsp) -..B1.3: - movzwl 58(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %ecx - movw %cx, 56(%rsp) -..B1.5: - fldcw 56(%rsp) -..B1.6: - movb $1, %dl -..B1.7: - movb 89(%rsp), %cl - lea ones(%rip), %rsi - andb $-128, %cl - shrb $7, %cl - movzbl %cl, %edi - movzwl 88(%rsp), %eax - andl $32767, %eax - movzwl 86(%rsp), %r8d - movss (%rsi,%rdi,4), %xmm0 - movl %eax, %esi - shll $16, %esi - orl %r8d, %esi - cmpl $32767, %eax - je ..B1.32 -..B1.8: - cmpl $1073860832, %esi - jge ..B1.26 -..B1.9: - fldt 80(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fldt .L_2il0floatpacket.0(%rip) - fucomip %st(1), %st - fstp %st(0) - jp ..B1.10 - je ..B1.29 -..B1.10: - cmpl $16343, %eax - jle ..B1.18 -..B1.11: - cmpl $16380, %eax - jge ..B1.15 -..B1.12: - fldt 32(%rsp) - lea 128+_ldbA(%rip), %rcx - fld %st(0) - lea 112+_ldbA(%rip), %rsi - fmul %st(1), %st - lea _TWO_32H(%rip), %rax - lea 96+_ldbA(%rip), %rdi - fld %st(1) - lea 80+_ldbA(%rip), %r8 - lea 64+_ldbA(%rip), %r9 - lea 48+_ldbA(%rip), %r10 - lea 32+_ldbA(%rip), %r11 - fld %st(2) - testb %dl, %dl - fldl (%rax) - lea 16+_ldbA(%rip), %rax - fmul %st(4), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fsub %st(1), %st - fldt (%rcx) - fmul %st(3), %st - fldt (%rsi) - lea _ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%rax) - fmul %st(4), %st - fxch %st(3) - fmulp %st, %st(4) - fldt (%rcx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - je ..B1.14 -..B1.13: - fldcw 58(%rsp) -..B1.14: - fldt 32(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.15: - fldt 32(%rsp) - lea -1073793024(%rsi), %eax - shrl $16, %esi - movl $6, %ecx - movss %xmm0, 48(%rsp) - lea erfRRTable(%rip), %r8 - fmuls 48(%rsp) - addq $-16380, %rsi - cmpl $47103, %eax - lea _ldbA(%rip), %r11 - lea _TWO_32H(%rip), %r10 - cmovbe %rcx, %rsi - movq %rsi, %r9 - movl %esi, %edi - shlq $4, %r9 - shll $5, %edi - subl %esi, %edi - subl %esi, %edi - fmull (%r9,%r8) - movslq %edi, %rdi - faddl 8(%r8,%r9) - shlq $4, %rdi - fstpt 32(%rsp) - fldt 32(%rsp) - testb %dl, %dl - fldt 608(%r11,%rdi) - fmul %st(1), %st - fldt 592(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 576(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 560(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 544(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 528(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 512(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 496(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 480(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 464(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 448(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 432(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 416(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 400(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 384(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 368(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 352(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt 336(%r11,%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fld %st(1) - fldt 320(%r11,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 304(%r11,%rdi) - faddp %st, %st(1) - fmul %st(2), %st - fldt 288(%r11,%rdi) - faddp %st, %st(1) - fmul %st(2), %st - fld %st(2) - fldt 272(%r11,%rdi) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldl (%r10) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fld %st(0) - fxch %st(3) - fsub %st(4), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(6), %st - fmul %st(2), %st - faddp %st, %st(3) - fld %st(3) - fmul %st(1), %st - fadd %st, %st(5) - fsubrp %st, %st(5) - fsub %st(4), %st - faddp %st, %st(2) - fldt 176(%r11,%rdi) - fld %st(0) - fmul %st(6), %st - fstpt 16(%rsp) - fmul %st(1), %st - fldt 192(%r11,%rdi) - fmul %st(7), %st - faddp %st, %st(1) - fldt 240(%r11,%rdi) - fmul %st, %st(6) - fmulp %st, %st(2) - fldt 256(%r11,%rdi) - fmulp %st, %st(7) - fxch %st(6) - faddp %st, %st(1) - fldt 208(%r11,%rdi) - fld %st(0) - fadd %st(6), %st - fmul %st, %st(4) - fsubr %st, %st(1) - fxch %st(6) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 224(%r11,%rdi) - faddp %st, %st(1) - fld %st(4) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fmul %st(4), %st - fxch %st(3) - fsubr %st, %st(5) - fxch %st(1) - faddp %st, %st(5) - fxch %st(3) - fmul %st(4), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 144(%r11,%rdi) - fld %st(0) - fldt 16(%rsp) - fadd %st, %st(1) - fld %st(1) - fadd %st(5), %st - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(5) - faddp %st, %st(2) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fldt 32(%rsp) - fld %st(0) - fmul %st(1), %st - fmul %st(1), %st - fmulp %st, %st(1) - fldt (%rsp) - fmulp %st, %st(1) - fldt 160(%r11,%rdi) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fmuls 48(%rsp) - fstpt (%rsp) - je ..B1.17 -..B1.16: - fldcw 58(%rsp) -..B1.17: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.18: - fldt 32(%rsp) - lea _TWO5600(%rip), %rcx - lea _TWO_32H(%rip), %rdi - lea _ldbA(%rip), %r8 - lea 16+_ldbA(%rip), %r9 - testl %eax, %eax - fldt (%rcx) - fmul %st, %st(1) - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%rdi) - fld %st(0) - fmul %st(2), %st - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(1) - fld %st(0) - fsubr %st(3), %st - fldt (%r8) - fmul %st, %st(2) - fmulp %st, %st(1) - fldt (%r9) - fmulp %st, %st(4) - faddp %st, %st(3) - jne ..B1.22 -..B1.19: - testl $65520, %esi - je ..B1.22 -..B1.20: - fldt 32(%rsp) - lea _DenoBND(%rip), %rax - movss %xmm0, 48(%rsp) - flds 48(%rsp) - fmulp %st, %st(1) - fldt (%rax) - fmul %st(5), %st - fcomip %st(1), %st - fstp %st(0) - jbe ..B1.22 -..B1.21: - fstp %st(3) - fld %st(2) - lea 16+_TWO5600(%rip), %rax - fadd %st(2), %st - fmul %st, %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fldt (%rax) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - jmp ..B1.23 -..B1.22: - fstp %st(1) - fstp %st(2) - lea 16+_TWO5600(%rip), %rax - faddp %st, %st(1) - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.23: - testb %dl, %dl - je ..B1.25 -..B1.24: - fldcw 58(%rsp) -..B1.25: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.26: - lea _Epsilon(%rip), %rax - testb %dl, %dl - movss %xmm0, 48(%rsp) - flds 48(%rsp) - fldt (%rax) - fmul %st(1), %st - fsubrp %st, %st(1) - fstpt (%rsp) - je ..B1.28 -..B1.27: - fldcw 58(%rsp) -..B1.28: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.29: - testb %dl, %dl - je ..B1.31 -..B1.30: - fldcw 58(%rsp) - fldt 80(%rsp) - fstpt 32(%rsp) -..B1.31: - fldt 32(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.32: - fldt 80(%rsp) - movq $0x8000000000000000, %rax - movss %xmm0, 48(%rsp) - fadd %st(0), %st - flds 48(%rsp) - cmpq 80(%rsp), %rax - fcmovne %st(1), %st - fstp %st(1) - fstpt (%rsp) - testb %dl, %dl - je ..B1.34 -..B1.33: - fldcw 58(%rsp) -..B1.34: - fldt (%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type erfl,@function - .size erfl,.-erfl - .data -# -- End erfl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -_ldbA: - .word 0 - .word 0 - .word 47746 - .word 36974 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 30720 - .word 36515 - .word 17515 - .word 42715 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 13842 - .word 7119 - .word 41816 - .word 49299 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 3215 - .word 8543 - .word 37072 - .word 59159 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 33545 - .word 17489 - .word 29065 - .word 56342 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 23161 - .word 4543 - .word 59015 - .word 43821 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 15198 - .word 65095 - .word 55656 - .word 57366 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 11319 - .word 61676 - .word 11803 - .word 64720 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 23735 - .word 16978 - .word 56014 - .word 63664 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61888 - .word 54818 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 10044 - .word 28505 - .word 55013 - .word 60780 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27524 - .word 35697 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 61965 - .word 13477 - .word 25391 - .word 40556 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8518 - .word 53546 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 60180 - .word 52984 - .word 38086 - .word 60834 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60744 - .word 44249 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 63138 - .word 9916 - .word 20408 - .word 61684 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 50506 - .word 17424 - .word 9343 - .word 52291 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 50365 - .word 34444 - .word 5016 - .word 49178 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 17941 - .word 44182 - .word 56946 - .word 34035 - .word 49128 - .word 0 - .word 0 - .word 0 - .word 41364 - .word 35872 - .word 36905 - .word 43189 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 47342 - .word 2906 - .word 40861 - .word 33222 - .word 16352 - .word 0 - .word 0 - .word 0 - .word 48408 - .word 44394 - .word 43316 - .word 61646 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 52639 - .word 32949 - .word 29686 - .word 51873 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 13354 - .word 8312 - .word 46883 - .word 36813 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 10783 - .word 42642 - .word 20549 - .word 33739 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 42435 - .word 44080 - .word 27835 - .word 37640 - .word 16330 - .word 0 - .word 0 - .word 0 - .word 55413 - .word 51626 - .word 37570 - .word 37609 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 62471 - .word 35756 - .word 61962 - .word 33520 - .word 49089 - .word 0 - .word 0 - .word 0 - .word 40388 - .word 48302 - .word 32466 - .word 36673 - .word 16317 - .word 0 - .word 0 - .word 0 - .word 21782 - .word 37556 - .word 26897 - .word 52597 - .word 16311 - .word 0 - .word 0 - .word 0 - .word 35272 - .word 16771 - .word 34830 - .word 63430 - .word 49075 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26972 - .word 52968 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 34629 - .word 50944 - .word 29785 - .word 56844 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26328 - .word 64248 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 5285 - .word 428 - .word 53188 - .word 60110 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19746 - .word 48186 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 3964 - .word 321 - .word 7123 - .word 45083 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25230 - .word 61571 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 57803 - .word 48946 - .word 59164 - .word 36732 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 46948 - .word 32819 - .word 54758 - .word 43668 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 16614 - .word 63709 - .word 23635 - .word 47684 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 5734 - .word 50071 - .word 41702 - .word 52540 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 1767 - .word 50346 - .word 34241 - .word 45792 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 21673 - .word 57712 - .word 23306 - .word 47181 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 30917 - .word 34592 - .word 23220 - .word 33297 - .word 16352 - .word 0 - .word 0 - .word 0 - .word 55246 - .word 63001 - .word 17535 - .word 33707 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 5457 - .word 35457 - .word 53300 - .word 62645 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 9460 - .word 62267 - .word 29700 - .word 39878 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 54791 - .word 30369 - .word 50586 - .word 36074 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 2078 - .word 44475 - .word 65531 - .word 40136 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 65081 - .word 909 - .word 65384 - .word 51785 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 42502 - .word 52825 - .word 47801 - .word 35033 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 56809 - .word 22568 - .word 24289 - .word 58056 - .word 49096 - .word 0 - .word 0 - .word 0 - .word 53182 - .word 10272 - .word 7761 - .word 53779 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 48071 - .word 2665 - .word 17237 - .word 54209 - .word 16321 - .word 0 - .word 0 - .word 0 - .word 49513 - .word 25795 - .word 55780 - .word 36409 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19372 - .word 46606 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 22905 - .word 34398 - .word 64354 - .word 59506 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8556 - .word 42135 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 15826 - .word 39989 - .word 27742 - .word 58791 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45602 - .word 63202 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 61021 - .word 62759 - .word 37190 - .word 44093 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11408 - .word 56180 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 10545 - .word 4814 - .word 18495 - .word 39194 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 49818 - .word 2604 - .word 44885 - .word 39501 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 35457 - .word 26400 - .word 3144 - .word 55829 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 1168 - .word 22940 - .word 48307 - .word 56355 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 60825 - .word 56496 - .word 32133 - .word 38661 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 41837 - .word 62246 - .word 39292 - .word 38617 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 61718 - .word 27283 - .word 11883 - .word 33288 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 51738 - .word 39830 - .word 42849 - .word 49937 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 45393 - .word 52381 - .word 54757 - .word 41874 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 45169 - .word 44591 - .word 30009 - .word 57007 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 11552 - .word 4380 - .word 40671 - .word 40665 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 28211 - .word 31057 - .word 64947 - .word 47497 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 61755 - .word 33819 - .word 30246 - .word 61557 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 57599 - .word 65445 - .word 31608 - .word 55873 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 21063 - .word 33239 - .word 23242 - .word 34595 - .word 49113 - .word 0 - .word 0 - .word 0 - .word 24566 - .word 16137 - .word 47167 - .word 52509 - .word 16343 - .word 0 - .word 0 - .word 0 - .word 20857 - .word 62758 - .word 44126 - .word 43729 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 26678 - .word 64201 - .word 37761 - .word 41436 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 15315 - .word 3435 - .word 56025 - .word 62814 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 19814 - .word 59948 - .word 14740 - .word 56311 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 36977 - .word 22840 - .word 9289 - .word 39778 - .word 49096 - .word 0 - .word 0 - .word 0 - .word 62085 - .word 64048 - .word 54574 - .word 65118 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 28752 - .word 34202 - .word 22833 - .word 38817 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43704 - .word 63314 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 17048 - .word 17271 - .word 64911 - .word 39894 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47414 - .word 62353 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 53119 - .word 3173 - .word 58504 - .word 64362 - .word 49113 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19176 - .word 46765 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 36591 - .word 64385 - .word 59980 - .word 41399 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 352 - .word 36373 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 63217 - .word 55085 - .word 16723 - .word 42154 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 62758 - .word 20699 - .word 19176 - .word 46765 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 18142 - .word 49445 - .word 47413 - .word 62353 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 54343 - .word 9201 - .word 60310 - .word 40529 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 62797 - .word 60885 - .word 40240 - .word 39787 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 7512 - .word 45008 - .word 10012 - .word 39639 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 20359 - .word 48234 - .word 1564 - .word 57372 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 11764 - .word 26683 - .word 64145 - .word 49882 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 32393 - .word 50330 - .word 31801 - .word 34151 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 5247 - .word 4806 - .word 33577 - .word 41709 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 43823 - .word 34097 - .word 44124 - .word 38558 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 65526 - .word 14942 - .word 25531 - .word 60526 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 38557 - .word 7794 - .word 42920 - .word 40918 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 31363 - .word 35665 - .word 11710 - .word 52655 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 33312 - .word 35439 - .word 34687 - .word 46194 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 21144 - .word 58026 - .word 60687 - .word 57306 - .word 49127 - .word 0 - .word 0 - .word 0 - .word 20701 - .word 12315 - .word 12846 - .word 54836 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 45362 - .word 30760 - .word 28723 - .word 42182 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 16353 - .word 46602 - .word 41748 - .word 42697 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 20735 - .word 3347 - .word 26735 - .word 62816 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 13205 - .word 16964 - .word 38504 - .word 48289 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 28004 - .word 15789 - .word 31604 - .word 37913 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 17923 - .word 56666 - .word 63953 - .word 36481 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36194 - .word 65534 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 12232 - .word 62525 - .word 48597 - .word 39676 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29918 - .word 37380 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 48638 - .word 64479 - .word 2811 - .word 58988 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44876 - .word 56070 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 64093 - .word 3811 - .word 8439 - .word 45892 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42382 - .word 52955 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 7924 - .word 29399 - .word 61525 - .word 36582 - .word 16343 - .word 0 - .word 0 - .word 0 - .word 46606 - .word 18426 - .word 11663 - .word 35044 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 15382 - .word 23178 - .word 43683 - .word 34109 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 6438 - .word 10314 - .word 6872 - .word 49529 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 64583 - .word 11206 - .word 41955 - .word 52421 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 13495 - .word 31464 - .word 61723 - .word 36178 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 28427 - .word 18799 - .word 40522 - .word 59729 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 47510 - .word 26829 - .word 39947 - .word 33535 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 64666 - .word 11700 - .word 15653 - .word 46358 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 6475 - .word 64324 - .word 16618 - .word 52067 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 31765 - .word 32664 - .word 9436 - .word 33916 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 38078 - .word 37286 - .word 55507 - .word 62195 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 16438 - .word 19728 - .word 54394 - .word 45557 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 34868 - .word 45266 - .word 60847 - .word 41133 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 6929 - .word 9316 - .word 56077 - .word 32933 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 60039 - .word 42217 - .word 20756 - .word 52409 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 38571 - .word 57934 - .word 18985 - .word 61369 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 44492 - .word 40353 - .word 2663 - .word 35859 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 54254 - .word 26892 - .word 54523 - .word 56697 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 63636 - .word 38694 - .word 30824 - .word 51163 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 56107 - .word 41638 - .word 48577 - .word 57632 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 13301 - .word 46198 - .word 34221 - .word 52080 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 6730 - .word 19704 - .word 41453 - .word 49062 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 32541 - .word 25746 - .word 20185 - .word 50811 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40118 - .word 38623 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 63899 - .word 60569 - .word 18971 - .word 35021 - .word 49068 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35006 - .word 57940 - .word 49105 - .word 0 - .word 0 - .word 0 - .word 31190 - .word 18012 - .word 64261 - .word 44050 - .word 16305 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44288 - .word 57137 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 30741 - .word 21478 - .word 2085 - .word 43126 - .word 49077 - .word 0 - .word 0 - .word 0 - .word 43184 - .word 28511 - .word 48193 - .word 41628 - .word 49113 - .word 0 - .word 0 - .word 0 - .word 38069 - .word 12322 - .word 59848 - .word 47812 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 14423 - .word 51984 - .word 32740 - .word 45128 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 4208 - .word 46602 - .word 27709 - .word 35782 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 36873 - .word 25112 - .word 30428 - .word 48402 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 10843 - .word 45056 - .word 322 - .word 58525 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 34740 - .word 5397 - .word 19459 - .word 63343 - .word 49128 - .word 0 - .word 0 - .word 0 - .word 43258 - .word 62838 - .word 12965 - .word 52557 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 52181 - .word 57107 - .word 24596 - .word 44275 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 8033 - .word 61170 - .word 58452 - .word 55638 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 18754 - .word 55045 - .word 40463 - .word 41822 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 31326 - .word 56708 - .word 50347 - .word 42397 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 54840 - .word 45764 - .word 11355 - .word 33431 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 56285 - .word 35328 - .word 49599 - .word 58875 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 42904 - .word 46324 - .word 60880 - .word 56231 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 42754 - .word 64912 - .word 63809 - .word 36632 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 28983 - .word 59630 - .word 18663 - .word 33292 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 56135 - .word 38086 - .word 60740 - .word 37575 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 11769 - .word 21615 - .word 56585 - .word 54481 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 64055 - .word 1299 - .word 36942 - .word 50744 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 6073 - .word 42872 - .word 14757 - .word 53598 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 7021 - .word 43375 - .word 58781 - .word 46458 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64268 - .word 65535 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 36579 - .word 26545 - .word 24435 - .word 50138 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14458 - .word 38069 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 15998 - .word 59065 - .word 36918 - .word 41001 - .word 16328 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15150 - .word 34500 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 33246 - .word 7128 - .word 23211 - .word 39186 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36820 - .word 40101 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 45920 - .word 25716 - .word 39121 - .word 51060 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 52724 - .word 56956 - .word 1384 - .word 33467 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 16783 - .word 11603 - .word 62021 - .word 42511 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 34064 - .word 49622 - .word 4121 - .word 42444 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 14084 - .word 4161 - .word 1985 - .word 33838 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 65189 - .word 58247 - .word 7682 - .word 43141 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 15983 - .word 3226 - .word 43602 - .word 43186 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 7235 - .word 9522 - .word 4836 - .word 63885 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 33104 - .word 49991 - .word 48728 - .word 55353 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 10837 - .word 43216 - .word 47090 - .word 42202 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 11340 - .word 13469 - .word 16673 - .word 42993 - .word 49128 - .word 0 - .word 0 - .word 0 - .word 19848 - .word 42271 - .word 35005 - .word 38963 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 38280 - .word 23060 - .word 26803 - .word 65491 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 3155 - .word 63825 - .word 24453 - .word 53521 - .word 49121 - .word 0 - .word 0 - .word 0 - .word 8736 - .word 25576 - .word 59728 - .word 40305 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 21836 - .word 54867 - .word 10689 - .word 53743 - .word 49120 - .word 0 - .word 0 - .word 0 - .word 35590 - .word 40641 - .word 40511 - .word 35834 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 42959 - .word 52506 - .word 48660 - .word 55474 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 62734 - .word 58818 - .word 9020 - .word 51302 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 59117 - .word 1762 - .word 19420 - .word 58690 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 54865 - .word 3647 - .word 6267 - .word 65292 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 35287 - .word 43939 - .word 50577 - .word 38705 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 78 - .word 46283 - .word 25201 - .word 34088 - .word 16338 - .word 0 - .word 0 - .word 0 - .type _ldbA,@object - .size _ldbA,3504 - .align 16 -erfRRTable: - .long 0x00000000,0x40200000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x40100000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x40000000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3fe00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3fd00000 - .long 0x00000000,0xbff80000 - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xc00d0000 - .type erfRRTable,@object - .size erfRRTable,112 - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_TWO5600: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 21983 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 10783 - .word 0 - .word 0 - .word 0 - .type _TWO5600,@object - .size _TWO5600,32 - .align 2 -_DenoBND: - .word 43678 - .word 54205 - .word 57926 - .word 29039 - .word 0 - .word 0 - .word 0 - .word 0 - .type _DenoBND,@object - .size _DenoBND,16 - .align 2 -_Epsilon: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16313 - .word 0 - .word 0 - .word 0 - .type _Epsilon,@object - .size _Epsilon,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10_gen.S deleted file mode 100644 index 9f149e5cf6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10_gen.S +++ /dev/null @@ -1,427 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp10_gen.c" - .text -..TXTST0: -# -- Begin exp10 - .text - .align 16,0x90 - .globl exp10 -exp10: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_exp10.1: -..L2: - - movsd %xmm0, -40(%rsp) - movl -36(%rsp), %esi - movl %esi, %edi - movl %esi, %edx - andl $2147483647, %edi - shrl $31, %edx - cmpl $1012924416, %edi - jb ..B1.24 -..B1.2: - lea _range(%rip), %rcx - cmpl 4(%rcx,%rdx,8), %edi - jb ..B1.5 -..B1.3: - jne ..B1.16 -..B1.4: - movl -40(%rsp), %eax - cmpl (%rcx,%rdx,8), %eax - ja ..B1.16 -..B1.5: - addl $-1072693248, %esi - cmpl $4587520, %esi - ja ..B1.8 -..B1.6: - lea _TWO_52H(%rip), %rax - movsd -40(%rsp), %xmm0 - movaps %xmm0, %xmm1 - movsd (%rax), %xmm2 - addsd (%rax), %xmm1 - movsd %xmm1, -32(%rsp) - movsd -32(%rsp), %xmm1 - movslq -32(%rsp), %rcx - subsd %xmm2, %xmm1 - ucomisd %xmm0, %xmm1 - jp ..B1.7 - je ..B1.26 -..B1.7: - movsd %xmm1, -24(%rsp) - jmp ..B1.9 -..B1.8: - lea _TWO_52H(%rip), %rax - movsd -40(%rsp), %xmm0 - movsd (%rax), %xmm2 -..B1.9: - movaps %xmm0, %xmm1 - lea _TWO_32H(%rip), %rcx - mulsd .L_2il0floatpacket.0(%rip), %xmm1 - lea SC2_BIAS(%rip), %rdi - movsd .L_2il0floatpacket.2(%rip), %xmm3 - addsd %xmm2, %xmm1 - movsd %xmm1, -32(%rsp) - movsd -32(%rsp), %xmm6 - movsd (%rcx), %xmm5 - subsd %xmm2, %xmm6 - movsd .L_2il0floatpacket.1(%rip), %xmm2 - mulsd %xmm6, %xmm2 - mulsd %xmm3, %xmm6 - subsd %xmm2, %xmm0 - movaps %xmm0, %xmm4 - movl -32(%rsp), %eax - movl %eax, %r9d - movsd .L_2il0floatpacket.4(%rip), %xmm12 - movl %eax, %esi - movsd .L_2il0floatpacket.8(%rip), %xmm2 - subsd %xmm6, %xmm4 - movsd .L_2il0floatpacket.3(%rip), %xmm8 - addsd %xmm5, %xmm4 - movsd %xmm4, -32(%rsp) - movsd -32(%rsp), %xmm9 - movsd .L_2il0floatpacket.12(%rip), %xmm7 - subsd %xmm5, %xmm9 - shll $25, %r9d - subsd %xmm9, %xmm0 - sarl $25, %r9d - subsd %xmm6, %xmm0 - movaps %xmm0, %xmm11 - subl %r9d, %esi - mulsd %xmm8, %xmm0 - addsd %xmm9, %xmm11 - mulsd %xmm8, %xmm9 - movaps %xmm11, %xmm10 - addsd %xmm9, %xmm7 - mulsd %xmm11, %xmm10 - mulsd %xmm10, %xmm12 - mulsd %xmm10, %xmm2 - addsd .L_2il0floatpacket.5(%rip), %xmm12 - addsd .L_2il0floatpacket.9(%rip), %xmm2 - mulsd %xmm10, %xmm12 - mulsd %xmm10, %xmm2 - addsd .L_2il0floatpacket.6(%rip), %xmm12 - addsd .L_2il0floatpacket.10(%rip), %xmm2 - mulsd %xmm10, %xmm12 - mulsd %xmm10, %xmm2 - addsd %xmm0, %xmm12 - addsd .L_2il0floatpacket.11(%rip), %xmm2 - movsd %xmm7, -24(%rsp) - movl $0, -24(%rsp) - movsd -24(%rsp), %xmm1 - movsd .L_2il0floatpacket.7(%rip), %xmm0 - mulsd %xmm11, %xmm2 - addsd %xmm1, %xmm0 - movslq %r9d, %r9 - subsd %xmm0, %xmm9 - shlq $4, %r9 - addsd %xmm9, %xmm12 - movq __libm_exp_table_128@GOTPCREL(%rip), %r10 - addsd %xmm12, %xmm2 - shrl $7, %esi - movsd 1032(%r10,%r9), %xmm4 - movslq (%rdi,%rdx,4), %r8 - movaps %xmm4, %xmm0 - addq %rsi, %r8 - shlq $52, %r8 - movq %r8, -16(%rsp) - cmpl $-130815, %eax - movsd 1024(%r10,%r9), %xmm3 - mulsd %xmm2, %xmm0 - mulsd %xmm1, %xmm4 - jle ..B1.11 -..B1.10: - lea _SC2(%rip), %rax - addsd %xmm1, %xmm2 - mulsd %xmm2, %xmm3 - addsd %xmm3, %xmm0 - addsd %xmm4, %xmm0 - mulsd -16(%rsp), %xmm0 - mulsd (%rax,%rdx,8), %xmm0 - movsd %xmm0, -40(%rsp) - ret -..B1.11: - lea _SC2(%rip), %rax - addsd %xmm1, %xmm2 - mulsd %xmm2, %xmm3 - movaps %xmm4, %xmm1 - movsd (%rax,%rdx,8), %xmm2 - addsd %xmm3, %xmm0 - addsd %xmm0, %xmm1 - movsd %xmm1, -24(%rsp) - movl $0, -24(%rsp) - movsd -24(%rsp), %xmm3 - movsd -16(%rsp), %xmm1 - subsd %xmm3, %xmm4 - addsd %xmm0, %xmm4 - movaps %xmm3, %xmm0 - addsd %xmm4, %xmm0 - mulsd %xmm1, %xmm0 - mulsd %xmm2, %xmm0 - movsd %xmm0, -40(%rsp) - movl -36(%rsp), %eax - cmpl $1048576, %eax - jge ..B1.15 -..B1.12: - testl %eax, %eax - jle ..B1.14 -..B1.13: - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm4 - mulsd %xmm2, %xmm3 - mulsd %xmm2, %xmm4 - addsd %xmm4, %xmm3 - movsd %xmm3, -40(%rsp) -..B1.14: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, -32(%rsp) - movsd -40(%rsp), %xmm0 -..B1.15: - ret -..B1.16: - cmpl $2146435072, %edi - jae ..B1.20 -..B1.17: - testl $-2147483648, %esi - je ..B1.25 -..B1.18: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, -40(%rsp) -..B1.19: - ret -..B1.20: - addl $-2146435072, %edi - orl -40(%rsp), %edi - jne ..B1.22 -..B1.21: - lea _inf_zero(%rip), %rax - movsd (%rax,%rdx,8), %xmm0 - ret -..B1.22: - movsd -40(%rsp), %xmm0 - addsd %xmm0, %xmm0 -..B1.23: - ret -..B1.24: - movsd .L_2il0floatpacket.12(%rip), %xmm0 - addsd -40(%rsp), %xmm0 - ret -..B1.25: - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, -40(%rsp) - ret -..B1.26: - lea exact_values(%rip), %rax - movsd (%rax,%rcx,8), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type exp10,@function - .size exp10,.-exp10 - .data -# -- End exp10 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x0979a371,0x407a934f - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f634413 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x7fbcc47c,0x3e0427de - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x40026bb1 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xd9d41e9c,0x3fca7ed8 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x09fd8b95,0x3ff2bd76 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xc73cea69,0x40053524 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x25f8c2cc,0x3fb16e4f - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0xfd1d41fe,0x3fe1429f - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x91de2ca4,0x40004705 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0xa2b05ba9,0x3eb776aa - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -exact_values: - .long 0x00000000,0x00000000 - .long 0x00000000,0x40240000 - .long 0x00000000,0x40590000 - .long 0x00000000,0x408f4000 - .long 0x00000000,0x40c38800 - .long 0x00000000,0x40f86a00 - .long 0x00000000,0x412e8480 - .long 0x00000000,0x416312d0 - .long 0x00000000,0x4197d784 - .long 0x00000000,0x41cdcd65 - .long 0x20000000,0x4202a05f - .long 0xe8000000,0x42374876 - .long 0xa2000000,0x426d1a94 - .long 0xe5400000,0x42a2309c - .long 0x1e900000,0x42d6bcc4 - .long 0x26340000,0x430c6bf5 - .long 0x37e08000,0x4341c379 - .long 0x85d8a000,0x43763457 - .long 0x674ec800,0x43abc16d - .long 0x60913d00,0x43e158e4 - .long 0x78b58c40,0x4415af1d - .long 0xd6e2ef50,0x444b1ae4 - .long 0x064dd592,0x4480f0cf - .type exact_values,@object - .size exact_values,184 - .align 4 -_range: - .long 1352628734 - .long 1081295891 - .long 1189309266 - .long 1081358775 - .type _range,@object - .size _range,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -SC2_BIAS: - .long 511 - .long 1535 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_SC2: - .long 0 - .long 1609564160 - .long 0 - .long 535822336 - .type _SC2,@object - .size _SC2,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_inf_zero: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zero,@object - .size _inf_zero,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End - - .globl pow10 - .equ pow10, exp10 - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10f_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10f_gen.S deleted file mode 100644 index d1a435e2c7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10f_gen.S +++ /dev/null @@ -1,260 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp10f_gen.c" - .text -..TXTST0: -# -- Begin exp10f - .text - .align 16,0x90 - .globl exp10f -exp10f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_exp10f.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - movl %edx, %esi - movl %edx, %ecx - andl $2147483647, %esi - shrl $31, %ecx - cmpl $8388608, %esi - jb ..B1.17 -..B1.2: - movl %ecx, %edi - lea range(%rip), %rax - cmpl (%rax,%rdi,4), %esi - ja ..B1.8 -..B1.3: - movss .L_2il0floatpacket.0(%rip), %xmm1 - cmpl $1065353216, %edx - jl ..B1.7 -..B1.4: - movl %esi, %ecx - shrl $23, %ecx - addl $10, %ecx - shll %cl, %esi - testl %esi, %esi - jne ..B1.7 -..B1.5: - addss %xmm1, %xmm0 - movss %xmm0, -16(%rsp) - movl -16(%rsp), %eax - shll $10, %eax - sarl $10, %eax - cmpl $10, %eax - jg ..B1.7 -..B1.6: - movslq %eax, %rax - lea exact_values(%rip), %rdx - movss (%rdx,%rax,4), %xmm0 - ret -..B1.7: - pxor %xmm3, %xmm3 - movq $0x3ff0000000000000, %rcx - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm0 - mulsd .L_2il0floatpacket.1(%rip), %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - movq __libm_expf_table_64@GOTPCREL(%rip), %rsi - addsd .L_2il0floatpacket.2(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm2 - movsd .L_2il0floatpacket.4(%rip), %xmm0 - subss %xmm1, %xmm2 - cvtss2sd %xmm2, %xmm2 - mulsd .L_2il0floatpacket.3(%rip), %xmm2 - movl -16(%rsp), %edx - addsd %xmm2, %xmm3 - movaps %xmm3, %xmm1 - andl $4194303, %edx - mulsd %xmm3, %xmm1 - movl %edx, %eax - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm0 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm3, %xmm4 - shll $26, %eax - addsd %xmm4, %xmm0 - sarl $26, %eax - movslq %eax, %rax - subl %eax, %edx - shrl $6, %edx - movsd 256(%rsi,%rax,8), %xmm5 - mulsd %xmm5, %xmm0 - shlq $52, %rdx - addsd %xmm5, %xmm0 - addq %rcx, %rdx - movq %rdx, -24(%rsp) - mulsd -24(%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.8: - cmpl $2139095040, %esi - jae ..B1.13 -..B1.9: - testl %ecx, %ecx - je ..B1.11 -..B1.10: - movss .L_2il0floatpacket.8(%rip), %xmm0 - mulss %xmm0, %xmm0 - ret -..B1.11: - movss .L_2il0floatpacket.9(%rip), %xmm0 - mulss %xmm0, %xmm0 -..B1.12: - ret -..B1.13: - jne ..B1.15 -..B1.14: - lea _inf_zero(%rip), %rax - movss (%rax,%rdi,4), %xmm0 - ret -..B1.15: - movss -8(%rsp), %xmm0 -..B1.16: - ret -..B1.17: - movss .L_2il0floatpacket.10(%rip), %xmm0 - addss -8(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type exp10f,@function - .size exp10f,.-exp10f - .data -# -- End exp10f - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.1: - .long 0x0979a371,0x406a934f - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x41680000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x509f79ff,0xbf734413 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xe2724acf,0x3ff2d784 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0xcd26a2f3,0x40053524 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xd3f4b8ec,0x400046f7 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0xbbb47127,0x40026bb1 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x4b400000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.8: - .long 0x0d800000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,4 - .align 4 -.L_2il0floatpacket.9: - .long 0x71800000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,4 - .align 4 -.L_2il0floatpacket.10: - .long 0x3f800000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,4 - .align 4 -range: - .long 1109008539 - .long 1110823542 - .type range,@object - .size range,8 - .align 4 -exact_values: - .long 0x00000000 - .long 0x41200000 - .long 0x42c80000 - .long 0x447a0000 - .long 0x461c4000 - .long 0x47c35000 - .long 0x49742400 - .long 0x4b189680 - .long 0x4cbebc20 - .long 0x4e6e6b28 - .long 0x501502f9 - .type exact_values,@object - .size exact_values,44 - .align 4 -_inf_zero: - .long 2139095040 - .long 0 - .type _inf_zero,@object - .size _inf_zero,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End - - .globl pow10f - .equ pow10f, exp10f - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10l.S deleted file mode 100644 index 5b3c4075ef..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp10l.S +++ /dev/null @@ -1,1282 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp10l.c" - .text -..TXTST0: -# -- Begin exp10l - .text - .align 16,0x90 - .globl exp10l -exp10l: -# parameter 1: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_exp10l.1: -..L2: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %dil, %dil -..B1.2: - fnstcw 86(%rsp) -..B1.3: - movzwl 104(%rsp), %esi - movl %esi, %eax - movzbl 105(%rsp), %ecx - andl $32767, %eax - shrl $7, %ecx - shll $15, %ecx - orl %eax, %ecx - shll $16, %ecx - movzwl 102(%rsp), %edx - orl %edx, %ecx - addl $-1073709056, %ecx - cmpl $284672, %ecx - ja ..B1.6 -..B1.4: - fldt 96(%rsp) - lea _TWO_23H(%rip), %rax - fld %st(0) - fldl (%rax) - fadd %st, %st(1) - fxch %st(1) - fstps 80(%rsp) - movss 80(%rsp), %xmm0 - movss %xmm0, 16(%rsp) - flds 16(%rsp) - fsubp %st, %st(1) - fucomip %st(1), %st - fstp %st(0) - jp ..B1.5 - je ..B1.79 -..B1.5: - movl %esi, %eax - andl $32767, %eax -..B1.6: - cmpl $16388, %eax - jge ..B1.45 -..B1.7: - movzwl 86(%rsp), %edx - cmpl $16375, %eax - jge ..B1.38 -..B1.8: - cmpl $16368, %eax - jge ..B1.31 -..B1.9: - cmpl $16357, %eax - jge ..B1.24 -..B1.10: - cmpl $16316, %eax - jge ..B1.17 -..B1.11: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.73 -..B1.12: - orl $-64768, %edx - movw %dx, 84(%rsp) -..B1.13: - fldcw 84(%rsp) -..B1.14: - fldt .L_2il0floatpacket.3(%rip) - fldt 96(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) -..B1.15: - fldcw 86(%rsp) -..B1.16: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.17: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.21 -..B1.18: - orl $-64768, %edx - movw %dx, 84(%rsp) -..B1.19: - fldcw 84(%rsp) -..B1.20: - movb $1, %dil -..B1.21: - fldt 96(%rsp) - lea 16+_Q2(%rip), %rax - fldt .L_2il0floatpacket.3(%rip) - lea _Q2(%rip), %rdx - testb %dil, %dil - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.23 -..B1.22: - fldcw 86(%rsp) -..B1.23: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.24: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.28 -..B1.25: - orl $-64768, %edx - movw %dx, 84(%rsp) -..B1.26: - fldcw 84(%rsp) -..B1.27: - movb $1, %dil -..B1.28: - fldt 96(%rsp) - lea 48+_Q1(%rip), %rax - fld %st(0) - lea 32+_Q1(%rip), %rdx - fmul %st(1), %st - lea 16+_Q1(%rip), %rcx - fldt (%rax) - lea _Q1(%rip), %rsi - fmul %st(1), %st - testb %dil, %dil - fldt (%rdx) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.3(%rip) - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.30 -..B1.29: - fldcw 86(%rsp) -..B1.30: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.31: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.35 -..B1.32: - orl $-64768, %edx - movw %dx, 84(%rsp) -..B1.33: - fldcw 84(%rsp) -..B1.34: - movb $1, %dil -..B1.35: - fldt 96(%rsp) - lea 112+_Q0(%rip), %rdx - fld %st(0) - lea 96+_Q0(%rip), %rcx - fmul %st(1), %st - lea 80+_Q0(%rip), %rsi - lea 64+_Q0(%rip), %r8 - lea 48+_Q0(%rip), %r9 - lea 32+_Q0(%rip), %r10 - lea _TWO_48H(%rip), %rax - lea 16+_Q0(%rip), %r11 - fld %st(1) - fld %st(2) - testb %dil, %dil - fldt (%rdx) - lea 128+_Q0(%rip), %rdx - fmul %st(3), %st - fldl (%rax) - lea _Q0(%rip), %rax - fadd %st, %st(3) - fsubr %st(3), %st - fsubr %st, %st(2) - fldt (%rcx) - fmul %st(5), %st - fldt (%rsi) - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - fldt (%r8) - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - fldt (%r9) - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - fldt (%r10) - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - fldt (%r11) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(5) - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fldt (%rdx) - fmul %st, %st(4) - fmulp %st, %st(1) - faddp %st, %st(2) - fldt .L_2il0floatpacket.3(%rip) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - je ..B1.85 -..B1.36: - fstpt 48(%rsp) -..B1.82: - fldcw 86(%rsp) - jmp ..B1.37 -..B1.85: - fstp %st(0) -..B1.37: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.38: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.42 -..B1.39: - orl $-64768, %edx - movw %dx, 84(%rsp) -..B1.40: - fldcw 84(%rsp) -..B1.41: - movb $1, %dil -..B1.42: - fldt 96(%rsp) - lea _TWO_63H(%rip), %rdx - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_48H(%rip), %rcx - fmul %st(1), %st - lea 80+_P(%rip), %r8 - fldl (%rdx) - lea 48+_P(%rip), %r10 - lea 64+_P(%rip), %r9 - lea 32+_P(%rip), %r11 - lea 16+_P(%rip), %rdx - fadd %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fsubp %st, %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(1), %st - movl 48(%rsp), %esi - fsubrp %st, %st(2) - fld %st(1) - fldt .L_2il0floatpacket.2(%rip) - fmulp %st, %st(2) - movsbq %sil, %rax - fsub %st(1), %st - fldl (%rcx) - lea _P(%rip), %rcx - subl %eax, %esi - fadd %st, %st(1) - shrl $8, %esi - fsubr %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - shll $23, %esi - fxch %st(3) - fsubrp %st, %st(4) - addl $1065353216, %esi - fadd %st(3), %st - fld %st(0) - fmul %st(1), %st - fldt (%r8) - fmul %st(1), %st - fldt (%r9) - fmul %st(2), %st - fldt (%r10) - movl %esi, 32(%rsp) - lea 96+_P(%rip), %rsi - shlq $4, %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - testb %dil, %dil - fldt (%r11) - movq __libm_expl_table_256@GOTPCREL(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fldt (%rcx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt (%rsi) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(3) - fmulp %st, %st(2) - fldl 2056(%r8,%rax) - fldl 2048(%r8,%rax) - fld %st(0) - fmul %st(5), %st - fxch %st(4) - fadd %st, %st(5) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fmul %st(3), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmuls 32(%rsp) - fstpt 16(%rsp) - je ..B1.86 -..B1.43: - fstpt 48(%rsp) -..B1.83: - fldcw 86(%rsp) - jmp ..B1.44 -..B1.86: - fstp %st(0) -..B1.44: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.45: - movb 105(%rsp), %dl - lea _ranges(%rip), %r8 - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %esi - movq %rsi, %rcx - shlq $4, %rcx - movzwl 8(%rcx,%r8), %edx - andl $32767, %edx - cmpl %edx, %eax - jl ..B1.50 -..B1.46: - jne ..B1.62 -..B1.47: - movl 100(%rsp), %edx - cmpl 4(%rcx,%r8), %edx - jb ..B1.50 -..B1.48: - jne ..B1.62 -..B1.49: - movl 96(%rsp), %edx - cmpl (%rcx,%r8), %edx - jae ..B1.62 -..B1.50: - movzwl 86(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.54 -..B1.51: - orl $-64768, %edx - movw %dx, 84(%rsp) -..B1.52: - fldcw 84(%rsp) -..B1.53: - movb $1, %dil -..B1.54: - fldt .L_2il0floatpacket.3(%rip) - lea _TWO_63H(%rip), %r8 - fstpt 64(%rsp) - lea _TWO_48H(%rip), %r9 - fldt 96(%rsp) - lea SC2_BIAS(%rip), %r10 - fldt .L_2il0floatpacket.0(%rip) - fmul %st(1), %st - fldl (%r8) - movzwl 8+.L_2il0floatpacket.3(%rip), %r8d - fadd %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - andl $-32768, %r8d - movl 48(%rsp), %edx - fsubp %st, %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(1), %st - movsbq %dl, %rax - fsubr %st(2), %st - fld %st(0) - movl %eax, %r11d - fldt .L_2il0floatpacket.2(%rip) - negl %r11d - fmulp %st, %st(3) - addl %edx, %r11d - shrl $8, %r11d - addl $4196735, %edx - addl (%r10,%rsi,4), %r11d - lea 80+_P(%rip), %rsi - andl $32767, %r11d - lea 16+_P(%rip), %r10 - orl %r11d, %r8d - lea _P(%rip), %r11 - movw %r8w, 72(%rsp) - lea 48+_P(%rip), %r8 - shlq $4, %rax - fsub %st(2), %st - fldl (%r9) - lea 32+_P(%rip), %r9 - cmpl $3070, %edx - fadd %st, %st(1) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - fsubrp %st, %st(2) - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt (%rsi) - lea 64+_P(%rip), %rsi - fmul %st(1), %st - fldt (%rsi) - lea 96+_P(%rip), %rsi - fmul %st(2), %st - fldt (%r8) - movq __libm_expl_table_256@GOTPCREL(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fldt (%r11) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt (%rsi) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(2) - fldl 2048(%r8,%rax) - fld %st(0) - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(1) - fmul %st, %st(3) - faddp %st, %st(3) - fmull 2056(%r8,%rax) - faddp %st, %st(1) - faddl 2056(%r8,%rax) - ja ..B1.57 -..B1.55: - lea _exp10but(%rip), %rax - fldt (%rax) - fcomip %st(3), %st - jbe ..B1.57 -..B1.56: - fstp %st(2) - fld %st(0) - lea _TWO_12H(%rip), %rax - lea _SC2(%rip), %rdx - fadd %st(2), %st - fldl (%rax) - fmul %st(1), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt (%rcx,%rdx) - fldt 64(%rsp) - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B1.58 -..B1.57: - fstp %st(2) - fldt 64(%rsp) - fxch %st(2) - faddp %st, %st(1) - lea _SC2(%rip), %rax - fmulp %st, %st(1) - fldt (%rcx,%rax) - fmulp %st, %st(1) - fstpt 32(%rsp) -..B1.58: - fldt 32(%rsp) - lea _minnorm(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - fstp %st(0) - ja ..B1.74 -..B1.59: - testb %dil, %dil - je ..B1.61 -..B1.60: - fldt 16(%rsp) - fstpt 48(%rsp) -..B1.84: - fldcw 86(%rsp) -..B1.61: - fldt 32(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.62: - movzwl 86(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.66 -..B1.63: - orl $-64768, %ecx - movw %cx, 84(%rsp) -..B1.64: - fldcw 84(%rsp) -..B1.65: - movzwl 104(%rsp), %eax - movb $1, %dil - andl $32767, %eax -..B1.66: - cmpl $32767, %eax - je ..B1.75 -..B1.67: - testq %rsi, %rsi - je ..B1.69 -..B1.68: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 16(%rsp) - jmp ..B1.70 -..B1.69: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 16(%rsp) -..B1.70: - testb %dil, %dil - je ..B1.72 -..B1.71: - fldcw 86(%rsp) -..B1.72: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.73: - fldt .L_2il0floatpacket.3(%rip) - fldt 96(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.16 -..B1.74: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.59 -..B1.75: - cmpl $-2147483648, 100(%rsp) - jne ..B1.78 -..B1.76: - cmpl $0, 96(%rsp) - jne ..B1.78 -..B1.77: - lea _inf_zeros(%rip), %rax - fldl (%rax,%rsi,8) - fstpt 16(%rsp) - jmp ..B1.70 -..B1.78: - fldt 96(%rsp) - fstpt 16(%rsp) - jmp ..B1.70 -..B1.79: - movl 80(%rsp), %eax - lea _exact_values(%rip), %rdx - andl $4194303, %eax - shlq $4, %rax - fldt -16(%rdx,%rax) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type exp10l,@function - .size exp10l,.-exp10l - .data -# -- End exp10l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x88,0x1b,0xcd,0x4b,0x78,0x9a,0xd4,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x85,0x9a,0x20,0x9a,0xf5,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0xc8,0xd4,0x0e,0xee,0x0c,0x01,0x86,0xd0,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 4 -_TWO_23H: - .long 0 - .long 1097334784 - .type _TWO_23H,@object - .size _TWO_23H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -SC2_BIAS: - .long 8191 - .long 24575 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 4 -_inf_zeros: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zeros,@object - .size _inf_zeros,16 - .align 2 -_Q2: - .word 45097 - .word 43688 - .word 36317 - .word 37725 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 18666 - .word 59219 - .word 9785 - .word 43433 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 44055 - .word 43688 - .word 36317 - .word 37725 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 17466 - .word 59219 - .word 9785 - .word 43433 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 8942 - .word 31610 - .word 11407 - .word 33336 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 11423 - .word 35775 - .word 45136 - .word 38379 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q0: - .word 11092 - .word 42962 - .word 43694 - .word 58436 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 17467 - .word 59219 - .word 9785 - .word 43433 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 8985 - .word 61797 - .word 11406 - .word 33336 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 8830 - .word 60614 - .word 45135 - .word 38379 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 62265 - .word 59600 - .word 65512 - .word 35348 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 36045 - .word 15298 - .word 47170 - .word 54262 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 33342 - .word 6003 - .word 33899 - .word 35698 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 20958 - .word 58269 - .word 28628 - .word 41099 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37726 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _Q0,@object - .size _Q0,144 - .align 2 -_P: - .word 405 - .word 44055 - .word 43688 - .word 36317 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 17467 - .word 59219 - .word 9785 - .word 43433 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 7929 - .word 61789 - .word 11406 - .word 33336 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 36964 - .word 60605 - .word 45135 - .word 38379 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 55739 - .word 36897 - .word 684 - .word 35349 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 13923 - .word 51509 - .word 48217 - .word 54262 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37725 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,112 - .align 2 -_ranges: - .word 63385 - .word 64463 - .word 39556 - .word 39456 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 55376 - .word 5815 - .word 21149 - .word 39608 - .word 16395 - .word 0 - .word 0 - .word 0 - .type _ranges,@object - .size _ranges,32 - .align 2 -_exp10but: - .word 6424 - .word 10152 - .word 51584 - .word 39451 - .word 49163 - .word 0 - .word 0 - .word 0 - .type _exp10but,@object - .size _exp10but,16 - .align 2 -_SC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .type _SC2,@object - .size _SC2,32 - .align 2 -_minnorm: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _minnorm,@object - .size _minnorm,16 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_exact_values: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64000 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40000 - .word 16396 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50000 - .word 16399 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62500 - .word 16402 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39062 - .word 16406 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8192 - .word 48828 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10240 - .word 61035 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63744 - .word 38146 - .word 16416 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46912 - .word 47683 - .word 16419 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42256 - .word 59604 - .word 16422 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59178 - .word 37252 - .word 16426 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8436 - .word 46566 - .word 16429 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 43313 - .word 58207 - .word 16432 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1024 - .word 51647 - .word 36379 - .word 16436 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50432 - .word 48174 - .word 45474 - .word 16439 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30272 - .word 27450 - .word 56843 - .word 16442 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35304 - .word 8964 - .word 35527 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44130 - .word 60357 - .word 44408 - .word 16449 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6010 - .word 9911 - .word 55511 - .word 16452 - .word 0 - .word 0 - .word 0 - .word 36864 - .word 28332 - .word 30770 - .word 34694 - .word 16456 - .word 0 - .word 0 - .word 0 - .word 46080 - .word 2647 - .word 5695 - .word 43368 - .word 16459 - .word 0 - .word 0 - .word 0 - .word 41216 - .word 52461 - .word 7118 - .word 54210 - .word 16462 - .word 0 - .word 0 - .word 0 - .word 33952 - .word 16404 - .word 20833 - .word 33881 - .word 16466 - .word 0 - .word 0 - .word 0 - .word 42440 - .word 36889 - .word 42425 - .word 42351 - .word 16469 - .word 0 - .word 0 - .word 0 - .word 3898 - .word 62496 - .word 36647 - .word 52939 - .word 16472 - .word 0 - .word 0 - .word 0 - .type _exact_values,@object - .size _exact_values,432 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End - - .globl pow10l - .equ pow10l, exp10l - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2_gen.S deleted file mode 100644 index 17707759ca..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2_gen.S +++ /dev/null @@ -1,517 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp2_gen.c" - .text -..TXTST0: -# -- Begin exp2 - .text - .align 16,0x90 - .globl exp2 -exp2: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_exp2.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - xorb %sil, %sil - movsd %xmm0, 40(%rsp) -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movl 44(%rsp), %edx - movl %edx, %eax - andl $2147483647, %eax - lea -1072693248(%rax), %ecx - cmpl $10483712, %ecx - ja ..B1.9 -..B1.4: - movl %eax, %ecx - movl $1048575, %edi - shrl $20, %ecx - incl %ecx - shrl %cl, %edi - andl %eax, %edi - orl 40(%rsp), %edi - jne ..B1.9 -..B1.5: - lea _TWO_52H(%rip), %rcx - movsd 40(%rsp), %xmm0 - addsd (%rcx), %xmm0 - movsd %xmm0, 16(%rsp) - movl 16(%rsp), %ecx - cmpl $-1074, %ecx - jl ..B1.9 -..B1.6: - lea 1023(%rcx), %eax - testl %eax, %eax - jle ..B1.37 -..B1.7: - movslq %eax, %rax - shlq $52, %rax - movq %rax, 8(%rsp) -..B1.8: - movsd 8(%rsp), %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.9: - cmpl $1079984128, %eax - jae ..B1.14 -..B1.10: - cmpl $1012924416, %eax - jae ..B1.12 -..B1.11: - movsd .L_2il0floatpacket.11(%rip), %xmm0 - addsd 40(%rsp), %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.12: - movsd 40(%rsp), %xmm0 - pxor %xmm13, %xmm13 - lea _TWO_52H(%rip), %rax - lea _two_32p1(%rip), %rdx - movsd .L_2il0floatpacket.4(%rip), %xmm9 - lea _two_32(%rip), %rcx - movsd .L_2il0floatpacket.7(%rip), %xmm10 - movsd .L_2il0floatpacket.2(%rip), %xmm4 - movsd (%rax), %xmm1 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd (%rdx), %xmm2 - addsd %xmm1, %xmm0 - movsd %xmm0, 16(%rsp) - movsd 16(%rsp), %xmm8 - movl 16(%rsp), %esi - movl %esi, %edi - movsd .L_2il0floatpacket.3(%rip), %xmm3 - subsd %xmm1, %xmm8 - mulsd .L_2il0floatpacket.1(%rip), %xmm8 - shll $25, %edi - addsd 40(%rsp), %xmm8 - movaps %xmm8, %xmm7 - movaps %xmm8, %xmm5 - mulsd %xmm8, %xmm7 - mulsd %xmm7, %xmm9 - mulsd %xmm7, %xmm10 - addsd .L_2il0floatpacket.5(%rip), %xmm9 - addsd .L_2il0floatpacket.8(%rip), %xmm10 - mulsd %xmm7, %xmm9 - mulsd %xmm7, %xmm10 - addsd .L_2il0floatpacket.6(%rip), %xmm9 - addsd .L_2il0floatpacket.9(%rip), %xmm10 - mulsd %xmm7, %xmm9 - mulsd %xmm7, %xmm10 - movsd %xmm8, (%rsp) - movl $0, (%rsp) - movsd (%rsp), %xmm6 - sarl $25, %edi - subsd %xmm6, %xmm5 - mulsd %xmm4, %xmm6 - addsd .L_2il0floatpacket.10(%rip), %xmm10 - mulsd %xmm4, %xmm5 - addsd %xmm6, %xmm2 - mulsd %xmm8, %xmm10 - addsd %xmm5, %xmm9 - movsd %xmm2, 16(%rsp) - subl %edi, %esi - movsd 16(%rsp), %xmm11 - movslq %edi, %rdi - subsd (%rcx), %xmm11 - shlq $4, %rdi - addsd %xmm11, %xmm3 - movq __libm_exp_table_128@GOTPCREL(%rip), %r8 - subsd %xmm3, %xmm6 - movsd 1032(%r8,%rdi), %xmm12 - addsd %xmm6, %xmm9 - movaps %xmm12, %xmm0 - addsd %xmm9, %xmm10 - mulsd %xmm11, %xmm12 - mulsd %xmm10, %xmm0 - addsd %xmm11, %xmm10 - mulsd 1024(%r8,%rdi), %xmm10 - shrl $7, %esi - addsd %xmm10, %xmm0 - shll $23, %esi - addsd %xmm12, %xmm0 - addl $1065353216, %esi - movl %esi, 24(%rsp) - cvtss2sd 24(%rsp), %xmm13 - mulsd %xmm13, %xmm0 - movsd %xmm11, (%rsp) - movsd %xmm0, 8(%rsp) -..B1.13: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.14: - lea _range(%rip), %r8 - movl %edx, %ecx - shrl $31, %ecx - cmpl 4(%r8,%rcx,8), %eax - jb ..B1.17 -..B1.15: - jne ..B1.28 -..B1.16: - movl 40(%rsp), %edi - cmpl (%r8,%rcx,8), %edi - ja ..B1.28 -..B1.17: - movsd 40(%rsp), %xmm0 - lea _TWO_52H(%rip), %rdi - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - lea _two_32p1(%rip), %r9 - movsd (%rdi), %xmm1 - lea _two_32(%rip), %r10 - movsd .L_2il0floatpacket.4(%rip), %xmm9 - lea SC2_BIAS(%rip), %r11 - movsd .L_2il0floatpacket.2(%rip), %xmm4 - addsd %xmm1, %xmm0 - movsd %xmm0, 16(%rsp) - movsd 16(%rsp), %xmm8 - movsd (%r9), %xmm2 - subsd %xmm1, %xmm8 - mulsd .L_2il0floatpacket.1(%rip), %xmm8 - movsd .L_2il0floatpacket.7(%rip), %xmm1 - movl 16(%rsp), %edx - movl %edx, %eax - movsd .L_2il0floatpacket.3(%rip), %xmm3 - movl %edx, %r8d - shll $25, %eax - addsd 40(%rsp), %xmm8 - movaps %xmm8, %xmm7 - movaps %xmm8, %xmm5 - mulsd %xmm8, %xmm7 - mulsd %xmm7, %xmm9 - mulsd %xmm7, %xmm1 - addsd .L_2il0floatpacket.5(%rip), %xmm9 - addsd .L_2il0floatpacket.8(%rip), %xmm1 - mulsd %xmm7, %xmm9 - mulsd %xmm7, %xmm1 - addsd .L_2il0floatpacket.6(%rip), %xmm9 - addsd .L_2il0floatpacket.9(%rip), %xmm1 - mulsd %xmm7, %xmm9 - mulsd %xmm7, %xmm1 - movsd %xmm8, (%rsp) - movl $0, (%rsp) - movsd (%rsp), %xmm6 - sarl $25, %eax - subsd %xmm6, %xmm5 - mulsd %xmm4, %xmm6 - addsd .L_2il0floatpacket.10(%rip), %xmm1 - mulsd %xmm4, %xmm5 - addsd %xmm6, %xmm2 - mulsd %xmm8, %xmm1 - addsd %xmm5, %xmm9 - movsd %xmm2, 16(%rsp) - subl %eax, %r8d - movsd 16(%rsp), %xmm11 - movsd %xmm6, (%rsp) - movslq %eax, %rax - subsd (%r10), %xmm11 - shlq $4, %rax - addsd %xmm11, %xmm3 - movq __libm_exp_table_128@GOTPCREL(%rip), %r9 - subsd %xmm3, %xmm6 - movsd 1032(%r9,%rax), %xmm2 - addsd %xmm6, %xmm9 - shrl $7, %r8d - addsd %xmm9, %xmm1 - movaps %xmm1, %xmm10 - mulsd %xmm2, %xmm1 - addsd %xmm11, %xmm10 - mulsd %xmm11, %xmm2 - mulsd 1024(%r9,%rax), %xmm10 - movslq (%r11,%rcx,4), %rdi - addsd %xmm10, %xmm1 - addq %r8, %rdi - movaps %xmm1, %xmm0 - shlq $52, %rdi - addsd %xmm2, %xmm0 - movq %rdi, 24(%rsp) - cmpl $-130815, %edx - jg ..B1.26 -..B1.18: - movsd %xmm0, (%rsp) - andl $-4096, (%rsp) - movsd (%rsp), %xmm0 - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - subsd %xmm0, %xmm2 - cmpl $768, %eax - addsd %xmm1, %xmm2 - je ..B1.22 -..B1.19: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.20: - fldcw 32(%rsp) -..B1.21: - movsd (%rsp), %xmm0 - movb $1, %sil -..B1.22: - fldl 24(%rsp) - lea _SC2(%rip), %rax - movsd %xmm0, (%rsp) - testb %sil, %sil - fldl (%rsp) - movsd %xmm2, (%rsp) - fldl (%rsp) - faddp %st, %st(1) - fmulp %st, %st(1) - fmull (%rax,%rcx,8) - fstpl 8(%rsp) - je ..B1.24 -..B1.23: - fldcw 34(%rsp) -..B1.24: - cmpl $1048576, 12(%rsp) - jl ..B1.8 -..B1.25: - movsd 8(%rsp), %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.26: - movsd 24(%rsp), %xmm1 - lea _SC2(%rip), %rax - mulsd %xmm1, %xmm0 - mulsd (%rax,%rcx,8), %xmm0 - movsd %xmm0, 8(%rsp) -..B1.27: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.28: - cmpl $2146435072, %eax - jae ..B1.33 -..B1.29: - testl $-2147483648, %edx - je ..B1.31 -..B1.30: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, 8(%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.31: - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, 8(%rsp) -..B1.32: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.33: - addl $-2146435072, %eax - orl 40(%rsp), %eax - jne ..B1.35 -..B1.34: - lea _inf_zero(%rip), %rax - movsd (%rax,%rcx,8), %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.35: - movsd 40(%rsp), %xmm0 - addsd %xmm0, %xmm0 -..B1.36: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.37: - addl $1074, %ecx - movl $1, %eax - shlq %cl, %rax - movq %rax, 8(%rsp) - jmp ..B1.8 - .align 16,0x90 - .cfi_endproc - .type exp2,@function - .size exp2,.-exp2 - .data -# -- End exp2 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x40600000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0xbf800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x3fe62e42 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xac59a345,0x3f24308c - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x6fba31d1,0x3f83b2ab - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xff82c58f,0x3fcebfbd - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x00cb0678,0x3ef0097a - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0xe87ed439,0x3f55d87f - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0xd704a0c3,0x3fac6b08 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x3de6af28,0x3e9fdf47 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_two_32p1: - .long 1048576 - .long 1106247680 - .type _two_32p1,@object - .size _two_32p1,8 - .align 4 -_two_32: - .long 0 - .long 1106247680 - .type _two_32,@object - .size _two_32,8 - .align 4 -_range: - .long 4294967295 - .long 1083179007 - .long 4294967295 - .long 1083232255 - .type _range,@object - .size _range,16 - .align 4 -SC2_BIAS: - .long 511 - .long 1535 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_SC2: - .long 0 - .long 1609564160 - .long 0 - .long 535822336 - .type _SC2,@object - .size _SC2,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_inf_zero: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zero,@object - .size _inf_zero,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2f_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2f_gen.S deleted file mode 100644 index a33b058d9f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2f_gen.S +++ /dev/null @@ -1,306 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp2f_gen.c" - .text -..TXTST0: -# -- Begin exp2f - .text - .align 16,0x90 - .globl exp2f -exp2f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_exp2f.1: -..L2: - - movaps %xmm0, %xmm1 - movd %xmm1, %esi - movss %xmm1, -8(%rsp) - andl $2147483647, %esi - lea -1065353216(%rsi), %eax - cmpl $58589184, %eax - ja ..B1.7 -..B1.2: - movl %esi, %ecx - movl %esi, %eax - shrl $23, %ecx - addl $10, %ecx - shll %cl, %eax - testl %eax, %eax - jne ..B1.7 -..B1.3: - movss .L_2il0floatpacket.0(%rip), %xmm0 - addss %xmm0, %xmm1 - movss %xmm1, -12(%rsp) - movl -12(%rsp), %ecx - shll $10, %ecx - sarl $10, %ecx - cmpl $-149, %ecx - jl ..B1.7 -..B1.4: - movl %ecx, %eax - addl $127, %eax - jle ..B1.23 -..B1.5: - shll $23, %eax - movl %eax, -16(%rsp) -..B1.6: - movss -16(%rsp), %xmm0 - ret -..B1.7: - cmpl $1123680256, %esi - jae ..B1.12 -..B1.8: - cmpl $830472192, %esi - jae ..B1.10 -..B1.9: - movss .L_2il0floatpacket.10(%rip), %xmm0 - addss -8(%rsp), %xmm0 - movss %xmm0, -12(%rsp) - ret -..B1.10: - pxor %xmm3, %xmm3 - pxor %xmm6, %xmm6 - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm0 - mulsd .L_2il0floatpacket.1(%rip), %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - movq __libm_expf_table_64@GOTPCREL(%rip), %rcx - addsd .L_2il0floatpacket.2(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -12(%rsp) - movss -12(%rsp), %xmm1 - movsd .L_2il0floatpacket.4(%rip), %xmm0 - movl -12(%rsp), %edx - movl %edx, %eax - shll $26, %eax - subss .L_2il0floatpacket.0(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - mulsd .L_2il0floatpacket.3(%rip), %xmm1 - sarl $26, %eax - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm0 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm3, %xmm4 - movslq %eax, %rax - addsd %xmm4, %xmm0 - movsd 256(%rcx,%rax,8), %xmm5 - subl %eax, %edx - mulsd %xmm5, %xmm0 - shrl $6, %edx - addsd %xmm5, %xmm0 - shll $23, %edx - addl $1065353216, %edx - movl %edx, -24(%rsp) - cvtss2sd -24(%rsp), %xmm6 - mulsd %xmm6, %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) -..B1.11: - ret -..B1.12: - lea range(%rip), %rdx - movl -8(%rsp), %eax - shrl $31, %eax - cmpl (%rdx,%rax,4), %esi - ja ..B1.14 -..B1.13: - pxor %xmm3, %xmm3 - movq $0x3ff0000000000000, %rcx - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm0 - mulsd .L_2il0floatpacket.1(%rip), %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - movq __libm_expf_table_64@GOTPCREL(%rip), %rsi - addsd .L_2il0floatpacket.2(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -12(%rsp) - movss -12(%rsp), %xmm1 - movsd .L_2il0floatpacket.4(%rip), %xmm0 - movl -12(%rsp), %edx - andl $4194303, %edx - subss .L_2il0floatpacket.0(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - mulsd .L_2il0floatpacket.3(%rip), %xmm1 - movl %edx, %eax - shll $26, %eax - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm0 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm3, %xmm4 - sarl $26, %eax - addsd %xmm4, %xmm0 - movslq %eax, %rax - subl %eax, %edx - shrl $6, %edx - movsd 256(%rsi,%rax,8), %xmm5 - mulsd %xmm5, %xmm0 - shlq $52, %rdx - addsd %xmm5, %xmm0 - addq %rcx, %rdx - movq %rdx, -24(%rsp) - mulsd -24(%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - ret -..B1.14: - cmpl $2139095040, %esi - jae ..B1.19 -..B1.15: - testq %rax, %rax - je ..B1.17 -..B1.16: - movss .L_2il0floatpacket.8(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - ret -..B1.17: - movss .L_2il0floatpacket.9(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) -..B1.18: - ret -..B1.19: - jne ..B1.21 -..B1.20: - lea _inf_zero(%rip), %rdx - movss (%rdx,%rax,4), %xmm0 - ret -..B1.21: - movss -8(%rsp), %xmm0 - addss %xmm0, %xmm0 -..B1.22: - ret -..B1.23: - addl $149, %ecx - movl $1, %eax - shll %cl, %eax - movl %eax, -16(%rsp) - jmp ..B1.6 - .align 16,0x90 - .cfi_endproc - .type exp2f,@function - .size exp2f,.-exp2f - .data -# -- End exp2f - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x40500000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x41680000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0xbf900000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x3e46f43a,0x3f83ce0f - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x081585e7,0x3fcebfbe - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xd93cf576,0x3fac6af0 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0xfef9277b,0x3fe62e42 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x4b400000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.8: - .long 0x0d800000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,4 - .align 4 -.L_2il0floatpacket.9: - .long 0x71800000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,4 - .align 4 -.L_2il0floatpacket.10: - .long 0x3f800000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,4 - .align 4 -range: - .long 1124073471 - .long 1126039552 - .type range,@object - .size range,8 - .align 4 -_inf_zero: - .long 2139095040 - .long 0 - .type _inf_zero,@object - .size _inf_zero,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2l.S deleted file mode 100644 index 4bd828bf77..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp2l.S +++ /dev/null @@ -1,683 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp2l.c" - .text -..TXTST0: -# -- Begin exp2l - .text - .align 16,0x90 - .globl exp2l -exp2l: -# parameter 1: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_exp2l.1: -..L2: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %r8b, %r8b -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movb 105(%rsp), %cl - lea _ranges(%rip), %rdx - andb $-128, %cl - shrb $7, %cl - movzbl %cl, %edi - movq %rdi, %rsi - shlq $4, %rsi - movzwl 104(%rsp), %ecx - andl $32767, %ecx - movzwl 8(%rsi,%rdx), %eax - andl $32767, %eax - cmpl %eax, %ecx - jl ..B1.8 -..B1.4: - jne ..B1.39 -..B1.5: - movl 100(%rsp), %eax - cmpl 4(%rsi,%rdx), %eax - jb ..B1.8 -..B1.6: - jne ..B1.39 -..B1.7: - movl 96(%rsp), %eax - cmpl (%rsi,%rdx), %eax - jae ..B1.39 -..B1.8: - movzwl 82(%rsp), %edx - cmpl $16369, %ecx - jge ..B1.19 -..B1.9: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.13 -..B1.10: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.11: - fldcw 80(%rsp) -..B1.12: - movzwl 104(%rsp), %ecx - movb $1, %r8b - andl $32767, %ecx -..B1.13: - fldt 96(%rsp) - cmpl $16316, %ecx - fstpt 16(%rsp) - jge ..B1.15 -..B1.14: - fldt .L_2il0floatpacket.0(%rip) - fldt 16(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.16 -..B1.15: - fldt 16(%rsp) - lea 48+_P1(%rip), %rax - fld %st(0) - lea 32+_P1(%rip), %rcx - lea 16+_P1(%rip), %rdx - lea _P1(%rip), %rsi - fmul %st(1), %st - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - fmulp %st, %st(2) - fldt (%rsi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - faddp %st, %st(1) - fstpt 16(%rsp) -..B1.16: - testb %r8b, %r8b - je ..B1.18 -..B1.17: - fldcw 82(%rsp) -..B1.18: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.19: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.23 -..B1.20: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.21: - fldcw 80(%rsp) -..B1.22: - movzwl 104(%rsp), %ecx - movb $1, %r8b - andl $32767, %ecx -..B1.23: - fldt .L_2il0floatpacket.0(%rip) - cmpl $16383, %ecx - fstpt 64(%rsp) - jl ..B1.30 -..B1.24: - fldt 96(%rsp) - lea _TWO_63H(%rip), %rax - cmpl $0, 96(%rsp) - fldl (%rax) - jne ..B1.31 -..B1.25: - negl %ecx - movl $-1, %eax - addl $30, %ecx - shll %cl, %eax - testl %eax, 100(%rsp) - jne ..B1.31 -..B1.26: - fld %st(1) - fadd %st(1), %st - fstpt 48(%rsp) - movl 48(%rsp), %eax - cmpl $-16382, %eax - jl ..B1.31 -..B1.27: - fstp %st(0) - fstp %st(0) - addl $16383, %eax - movzwl 8+.L_2il0floatpacket.0(%rip), %edx - andl $32767, %eax - andl $-32768, %edx - orl %eax, %edx - movw %dx, 72(%rsp) - testb %r8b, %r8b - je ..B1.29 -..B1.28: - fldcw 82(%rsp) -..B1.29: - fldt 64(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.30: - fldt 96(%rsp) - lea _TWO_63H(%rip), %rax - fldl (%rax) -..B1.31: - fldt .L_2il0floatpacket.1(%rip) - lea _TWO_48H(%rip), %rcx - fmul %st(2), %st - lea SC2_BIAS(%rip), %r9 - movzwl 72(%rsp), %r11d - fadd %st(1), %st - fstpt 48(%rsp) - fldt 48(%rsp) - andl $-32768, %r11d - movl 48(%rsp), %edx - fsubp %st, %st(1) - fldt .L_2il0floatpacket.2(%rip) - fmulp %st, %st(1) - movsbq %dl, %rax - fsubr %st(1), %st - fldl (%rcx) - movl %eax, %r10d - fld %st(0) - negl %r10d - addl %edx, %r10d - lea 48+_P(%rip), %rcx - shrl $8, %r10d - addl $4196735, %edx - addl (%r9,%rdi,4), %r10d - lea 80+_P(%rip), %rdi - lea 64+_P(%rip), %r9 - andl $32767, %r10d - orl %r10d, %r11d - lea 32+_P(%rip), %r10 - movw %r11w, 72(%rsp) - lea _P(%rip), %r11 - shlq $4, %rax - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - cmpl $3070, %edx - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fldt (%rdi) - lea 16+_P(%rip), %rdi - fmul %st(1), %st - fldt (%rcx) - lea 96+_P(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - movq __libm_expl_table_256@GOTPCREL(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r11) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt (%rcx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(1) - fldl 2048(%rdi,%rax) - fld %st(0) - fmul %st(3), %st - fxch %st(2) - fadd %st, %st(3) - fmul %st(1), %st - faddp %st, %st(1) - fxch %st(2) - fmull 2056(%rdi,%rax) - faddp %st, %st(1) - faddl 2056(%rdi,%rax) - ja ..B1.34 -..B1.32: - lea _exp2but(%rip), %rax - fldt (%rax) - fcomip %st(3), %st - jbe ..B1.34 -..B1.33: - fstp %st(2) - fld %st(0) - lea _TWO_12H(%rip), %rax - lea _SC2(%rip), %rdx - fadd %st(2), %st - fldl (%rax) - fmul %st(1), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt (%rsi,%rdx) - fldt 64(%rsp) - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B1.35 -..B1.34: - fstp %st(2) - fldt 64(%rsp) - fxch %st(2) - faddp %st, %st(1) - lea _SC2(%rip), %rax - fmulp %st, %st(1) - fldt (%rsi,%rax) - fmulp %st, %st(1) - fstpt 32(%rsp) -..B1.35: - fldt 32(%rsp) - lea _minnorm(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - fstp %st(0) - ja ..B1.48 -..B1.36: - testb %r8b, %r8b - je ..B1.38 -..B1.37: - fldt 16(%rsp) - fstpt 48(%rsp) -..B1.58: - fldcw 82(%rsp) -..B1.38: - fldt 32(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.39: - movzwl 82(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.43 -..B1.40: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.41: - fldcw 80(%rsp) -..B1.42: - movzwl 104(%rsp), %ecx - movb $1, %r8b - andl $32767, %ecx -..B1.43: - cmpl $32767, %ecx - je ..B1.49 -..B1.44: - testq %rdi, %rdi - je ..B1.46 -..B1.45: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.46: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st -..B1.47: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.48: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.36 -..B1.49: - cmpl $-2147483648, 100(%rsp) - jne ..B1.52 -..B1.50: - cmpl $0, 96(%rsp) - jne ..B1.52 -..B1.51: - lea _inf_zeros(%rip), %rax - fldl (%rax,%rdi,8) - fstpt 16(%rsp) - jmp ..B1.53 -..B1.52: - fldt 96(%rsp) - fstpt 16(%rsp) -..B1.53: - testb %r8b, %r8b - je ..B1.55 -..B1.54: - fldcw 82(%rsp) -..B1.55: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type exp2l,@function - .size exp2l,.-exp2l - .data -# -- End exp2l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x07,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf7,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -SC2_BIAS: - .long 8191 - .long 24575 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 4 -_inf_zeros: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zeros,@object - .size _inf_zeros,16 - .align 2 -_ranges: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16397 - .word 0 - .word 0 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 32894 - .word 16397 - .word 0 - .word 0 - .word 0 - .type _ranges,@object - .size _ranges,32 - .align 2 -_P1: - .word 31148 - .word 53711 - .word 6135 - .word 45426 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30019 - .word 5676 - .word 61436 - .word 62973 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 31705 - .word 37440 - .word 18104 - .word 58200 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 59309 - .word 6415 - .word 23422 - .word 40341 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,64 - .align 2 -_P: - .word 12039 - .word 52575 - .word 36475 - .word 49086 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 30020 - .word 5676 - .word 61436 - .word 62973 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 64966 - .word 9463 - .word 18104 - .word 58200 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 46891 - .word 53866 - .word 23421 - .word 40341 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 12114 - .word 63546 - .word 699 - .word 44740 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 63250 - .word 29232 - .word 35994 - .word 41348 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45426 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,112 - .align 2 -_exp2but: - .word 0 - .word 0 - .word 0 - .word 65528 - .word 49164 - .word 0 - .word 0 - .word 0 - .type _exp2but,@object - .size _exp2but,16 - .align 2 -_SC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .type _SC2,@object - .size _SC2,32 - .align 2 -_minnorm: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _minnorm,@object - .size _minnorm,16 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp_gen.S deleted file mode 100644 index f79846d22c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp_gen.S +++ /dev/null @@ -1,604 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp_gen.c" - .text -..TXTST0: -# -- Begin exp - .text - .align 16,0x90 - .globl exp -exp: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_exp.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) -..B1.2: - unpcklpd %xmm0, %xmm0 - movapd cv(%rip), %xmm1 - movapd Shifter(%rip), %xmm6 - movapd 16+cv(%rip), %xmm2 - movapd 32+cv(%rip), %xmm3 - pextrw $3, %xmm0, %eax - andl $32767, %eax - movl $16527, %edx - subl %eax, %edx - subl $15504, %eax - orl %eax, %edx - cmpl $-2147483648, %edx - jae .L_2TAG_PACKET_0.0.2 - lea Tbl_addr(%rip), %r8 - mulpd %xmm0, %xmm1 - addpd %xmm6, %xmm1 - movapd %xmm1, %xmm7 - subpd %xmm6, %xmm1 - mulpd %xmm1, %xmm2 - movapd 64+cv(%rip), %xmm4 - mulpd %xmm1, %xmm3 - movapd 80+cv(%rip), %xmm5 - subpd %xmm2, %xmm0 - movd %xmm7, %eax - movl %eax, %ecx - andl $63, %ecx - shll $4, %ecx - sarl $6, %eax - movl %eax, %edx - movdqa mmask(%rip), %xmm6 - pand %xmm6, %xmm7 - movdqa bias(%rip), %xmm6 - paddq %xmm6, %xmm7 - psllq $46, %xmm7 - subpd %xmm3, %xmm0 - movapd (%rcx,%r8), %xmm2 - mulpd %xmm0, %xmm4 - movapd %xmm0, %xmm6 - movapd %xmm0, %xmm1 - mulpd %xmm6, %xmm6 - mulpd %xmm6, %xmm0 - addpd %xmm4, %xmm5 - mulsd %xmm6, %xmm0 - mulpd 48+cv(%rip), %xmm6 - addsd %xmm2, %xmm1 - unpckhpd %xmm2, %xmm2 - mulpd %xmm5, %xmm0 - addsd %xmm0, %xmm1 - orpd %xmm7, %xmm2 - unpckhpd %xmm0, %xmm0 - addsd %xmm1, %xmm0 - addsd %xmm6, %xmm0 - addl $894, %edx - cmpl $1916, %edx - ja .L_2TAG_PACKET_1.0.2 - mulsd %xmm2, %xmm0 - addsd %xmm2, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_1.0.2: - xorpd %xmm3, %xmm3 - movapd ALLONES(%rip), %xmm4 - movl $-1022, %edx - subl %eax, %edx - movd %edx, %xmm5 - psllq %xmm5, %xmm4 - movl %eax, %ecx - sarl $1, %eax - pinsrw $3, %eax, %xmm3 - movapd ebias(%rip), %xmm6 - psllq $4, %xmm3 - psubd %xmm3, %xmm2 - mulsd %xmm2, %xmm0 - cmpl $52, %edx - jg .L_2TAG_PACKET_2.0.2 - andpd %xmm2, %xmm4 - paddd %xmm6, %xmm3 - subsd %xmm4, %xmm2 - addsd %xmm2, %xmm0 - cmpl $1023, %ecx - jge .L_2TAG_PACKET_3.0.2 - pextrw $3, %xmm0, %ecx - andl $32768, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_4.0.2 - movapd %xmm0, %xmm6 - addsd %xmm4, %xmm0 - mulsd %xmm3, %xmm0 - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl $0, %ecx - je .L_2TAG_PACKET_5.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_5.0.2: - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm4 - movsd %xmm6, %xmm0 - pxor %xmm4, %xmm6 - psrad $31, %xmm6 - pshufd $85, %xmm6, %xmm6 - psllq $1, %xmm0 - psrlq $1, %xmm0 - pxor %xmm6, %xmm0 - psrlq $63, %xmm6 - paddq %xmm6, %xmm0 - paddq %xmm4, %xmm0 - movl $15, (%rsp) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_4.0.2: - addsd %xmm4, %xmm0 - mulsd %xmm3, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_3.0.2: - addsd %xmm4, %xmm0 - mulsd %xmm3, %xmm0 - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - cmpl $32752, %ecx - jnb .L_2TAG_PACKET_7.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_2.0.2: - paddd %xmm6, %xmm3 - addpd %xmm2, %xmm0 - mulsd %xmm3, %xmm0 - movl $15, (%rsp) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_8.0.2: - cmpl $2146435072, %eax - jae .L_2TAG_PACKET_9.0.2 - movl 12(%rsp), %eax - cmpl $-2147483648, %eax - jae .L_2TAG_PACKET_10.0.2 - movsd XMAX(%rip), %xmm0 - mulsd %xmm0, %xmm0 -.L_2TAG_PACKET_7.0.2: - movl $14, (%rsp) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_10.0.2: - movsd XMIN(%rip), %xmm0 - mulsd %xmm0, %xmm0 - movl $15, (%rsp) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_9.0.2: - movl 8(%rsp), %edx - cmpl $2146435072, %eax - ja .L_2TAG_PACKET_11.0.2 - cmpl $0, %edx - jne .L_2TAG_PACKET_11.0.2 - movl 12(%rsp), %eax - cmpl $2146435072, %eax - jne .L_2TAG_PACKET_12.0.2 - movsd INF(%rip), %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_12.0.2: - movsd ZERO(%rip), %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_11.0.2: - movsd 8(%rsp), %xmm0 - addsd %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - movl 12(%rsp), %eax - andl $2147483647, %eax - cmpl $1083179008, %eax - jae .L_2TAG_PACKET_8.0.2 - movsd 8(%rsp), %xmm0 - addsd ONE_val(%rip), %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_6.0.2: - movsd %xmm0, 16(%rsp) -..B1.3: - movq 16(%rsp), %xmm0 -.L_2TAG_PACKET_13.0.2: -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type exp,@function - .size exp,.-exp - .data -# -- End exp - .section .rodata, "a" - .align 16 - .align 16 -cv: - .long 1697350398 - .long 1079448903 - .long 1697350398 - .long 1079448903 - .long 4277796864 - .long 1065758274 - .long 4277796864 - .long 1065758274 - .long 3164486458 - .long 1025308570 - .long 3164486458 - .long 1025308570 - .long 4294967294 - .long 1071644671 - .long 4294967294 - .long 1071644671 - .long 3811088480 - .long 1062650204 - .long 1432067621 - .long 1067799893 - .long 3230715663 - .long 1065423125 - .long 1431604129 - .long 1069897045 - .type cv,@object - .size cv,96 - .align 16 -Shifter: - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .type Shifter,@object - .size Shifter,16 - .align 16 -Tbl_addr: - .long 0 - .long 0 - .long 0 - .long 0 - .long 235107661 - .long 1018002367 - .long 1048019040 - .long 11418 - .long 896005651 - .long 1015861842 - .long 3541402996 - .long 22960 - .long 1642514529 - .long 1012987726 - .long 410360776 - .long 34629 - .long 1568897900 - .long 1016568486 - .long 1828292879 - .long 46424 - .long 1882168529 - .long 1010744893 - .long 852742562 - .long 58348 - .long 509852888 - .long 1017336174 - .long 3490863952 - .long 70401 - .long 653277307 - .long 1017431380 - .long 2930322911 - .long 82586 - .long 1649557430 - .long 1017729363 - .long 1014845818 - .long 94904 - .long 1058231231 - .long 1015777676 - .long 3949972341 - .long 107355 - .long 1044000607 - .long 1016786167 - .long 828946858 - .long 119943 - .long 1151779725 - .long 1015705409 - .long 2288159958 - .long 132667 - .long 3819481236 - .long 1016499965 - .long 1853186616 - .long 145530 - .long 2552227826 - .long 1015039787 - .long 1709341917 - .long 158533 - .long 1829350193 - .long 1015216097 - .long 4112506593 - .long 171677 - .long 1913391795 - .long 1015756674 - .long 2799960843 - .long 184965 - .long 1303423926 - .long 1015238005 - .long 171030293 - .long 198398 - .long 1574172746 - .long 1016061241 - .long 2992903935 - .long 211976 - .long 3424156969 - .long 1017196428 - .long 926591434 - .long 225703 - .long 1938513547 - .long 1017631273 - .long 887463926 - .long 239579 - .long 2804567149 - .long 1015390024 - .long 1276261410 - .long 253606 - .long 631083525 - .long 1017690182 - .long 569847337 - .long 267786 - .long 1623370770 - .long 1011049453 - .long 1617004845 - .long 282120 - .long 3667985273 - .long 1013894369 - .long 3049340112 - .long 296610 - .long 3145379760 - .long 1014403278 - .long 3577096743 - .long 311258 - .long 2603100681 - .long 1017152460 - .long 1990012070 - .long 326066 - .long 3249202951 - .long 1017448880 - .long 1453150081 - .long 341035 - .long 419288974 - .long 1016280325 - .long 917841882 - .long 356167 - .long 3793507337 - .long 1016095713 - .long 3712504873 - .long 371463 - .long 728023093 - .long 1016345318 - .long 363667784 - .long 386927 - .long 2582678538 - .long 1017123460 - .long 2956612996 - .long 402558 - .long 7592966 - .long 1016721543 - .long 2186617380 - .long 418360 - .long 228611441 - .long 1016696141 - .long 1719614412 - .long 434334 - .long 2261665670 - .long 1017457593 - .long 1013258798 - .long 450482 - .long 544148907 - .long 1017323666 - .long 3907805043 - .long 466805 - .long 2383914918 - .long 1017143586 - .long 1447192520 - .long 483307 - .long 1176412038 - .long 1017267372 - .long 1944781190 - .long 499988 - .long 2882956373 - .long 1013312481 - .long 919555682 - .long 516851 - .long 3154077648 - .long 1016528543 - .long 2571947538 - .long 533897 - .long 348651999 - .long 1016405780 - .long 2604962540 - .long 551129 - .long 3253791412 - .long 1015920431 - .long 1110089947 - .long 568549 - .long 1509121860 - .long 1014756995 - .long 2568320822 - .long 586158 - .long 2617649212 - .long 1017340090 - .long 2966275556 - .long 603959 - .long 553214634 - .long 1016457425 - .long 2682146383 - .long 621954 - .long 730975783 - .long 1014083580 - .long 2191782032 - .long 640145 - .long 1486499517 - .long 1016818996 - .long 2069751140 - .long 658534 - .long 2595788928 - .long 1016407932 - .long 2990417244 - .long 677123 - .long 1853053619 - .long 1015310724 - .long 1434058175 - .long 695915 - .long 2462790535 - .long 1015814775 - .long 2572866477 - .long 714911 - .long 3693944214 - .long 1017259110 - .long 3092190714 - .long 734114 - .long 2979333550 - .long 1017188654 - .long 4076559942 - .long 753526 - .long 174054861 - .long 1014300631 - .long 2420883922 - .long 773150 - .long 816778419 - .long 1014197934 - .long 3716502172 - .long 792987 - .long 3507050924 - .long 1015341199 - .long 777507147 - .long 813041 - .long 1821514088 - .long 1013410604 - .long 3706687593 - .long 833312 - .long 920623539 - .long 1016295433 - .long 1242007931 - .long 853805 - .long 2789017511 - .long 1014276997 - .long 3707479175 - .long 874520 - .long 3586233004 - .long 1015962192 - .long 64696965 - .long 895462 - .long 474650514 - .long 1016642419 - .long 863738718 - .long 916631 - .long 1614448851 - .long 1014281732 - .long 3884662774 - .long 938030 - .long 2450082086 - .long 1016164135 - .long 2728693977 - .long 959663 - .long 1101668360 - .long 1015989180 - .long 3999357479 - .long 981531 - .long 835814894 - .long 1015702697 - .long 1533953344 - .long 1003638 - .long 1301400989 - .long 1014466875 - .long 2174652632 - .long 1025985 - .type Tbl_addr,@object - .size Tbl_addr,1024 - .align 16 -mmask: - .long 4294967232 - .long 0 - .long 4294967232 - .long 0 - .type mmask,@object - .size mmask,16 - .align 16 -bias: - .long 65472 - .long 0 - .long 65472 - .long 0 - .type bias,@object - .size bias,16 - .align 16 -ALLONES: - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .type ALLONES,@object - .size ALLONES,16 - .align 16 -ebias: - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .type ebias,@object - .size ebias,16 - .align 4 -XMAX: - .long 4294967295 - .long 2146435071 - .type XMAX,@object - .size XMAX,8 - .align 4 -XMIN: - .long 0 - .long 1048576 - .type XMIN,@object - .size XMIN,8 - .align 4 -INF: - .long 0 - .long 2146435072 - .type INF,@object - .size INF,8 - .align 4 -ZERO: - .long 0 - .long 0 - .type ZERO,@object - .size ZERO,8 - .align 4 -ONE_val: - .long 0 - .long 1072693248 - .type ONE_val,@object - .size ONE_val,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp_table.S deleted file mode 100644 index 54de6cac65..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/exp_table.S +++ /dev/null @@ -1,515 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "exp_table.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __libm_exp_hi_table_64 -__libm_exp_hi_table_64: - .long 0x667f3c00,0x3fe6a09e - .long 0x3c651a40,0x3fe6dfb2 - .long 0xe8ec5f80,0x3fe71f75 - .long 0x56426800,0x3fe75feb - .long 0x73eb01c0,0x3fe7a114 - .long 0x36cf4e80,0x3fe7e2f3 - .long 0x994cce20,0x3fe82589 - .long 0x9b449300,0x3fe868d9 - .long 0x422aa0e0,0x3fe8ace5 - .long 0x99157740,0x3fe8f1ae - .long 0xb0cdc600,0x3fe93737 - .long 0x9fde4e60,0x3fe97d82 - .long 0x82a3f0a0,0x3fe9c491 - .long 0x7b5de580,0x3fea0c66 - .long 0xb23e2560,0x3fea5503 - .long 0x5579fdc0,0x3fea9e6b - .long 0x995ad3c0,0x3feae89f - .long 0xb84f1600,0x3feb33a2 - .long 0xf2fb5e60,0x3feb7f76 - .long 0x904bc1e0,0x3febcc1e - .long 0xdd8552a0,0x3fec199b - .long 0x2e57d150,0x3fec67f1 - .long 0xdcef9070,0x3fecb720 - .long 0x4a078980,0x3fed072d - .long 0xdcfba490,0x3fed5818 - .long 0x03db3290,0x3feda9e6 - .long 0x337b9b60,0x3fedfc97 - .long 0xe78b3ff8,0x3fee502e - .long 0xa2a490e0,0x3feea4af - .long 0xee615a28,0x3feefa1b - .long 0x5b6e4544,0x3fef5076 - .long 0x819e90da,0x3fefa7c1 - .long 0x00000000,0x3ff00000 - .long 0x3e778060,0x3ff02c9a - .long 0xd3158574,0x3ff059b0 - .long 0x18759bc8,0x3ff08745 - .long 0x6cf9890c,0x3ff0b558 - .long 0x32d3d1a0,0x3ff0e3ec - .long 0xd0125b50,0x3ff11301 - .long 0xaea92dd8,0x3ff1429a - .long 0x3c7d5178,0x3ff172b8 - .long 0xeb6fcb70,0x3ff1a35b - .long 0x3168b9a8,0x3ff1d487 - .long 0x88628cd0,0x3ff2063b - .long 0x6e756230,0x3ff2387a - .long 0x65e27cd0,0x3ff26b45 - .long 0xf51fdee0,0x3ff29e9d - .long 0xa6e40300,0x3ff2d285 - .long 0x0a31b710,0x3ff306fe - .long 0xb26416f0,0x3ff33c08 - .long 0x373aa9c0,0x3ff371a7 - .long 0x34e59ff0,0x3ff3a7db - .long 0x4c123420,0x3ff3dea6 - .long 0x21f72e20,0x3ff4160a - .long 0x60618920,0x3ff44e08 - .long 0xb5c13cc0,0x3ff486a2 - .long 0xd5362a20,0x3ff4bfda - .long 0x769d2ca0,0x3ff4f9b2 - .long 0x569d4f80,0x3ff5342b - .long 0x36b527c0,0x3ff56f47 - .long 0xdd485420,0x3ff5ab07 - .long 0x15ad2140,0x3ff5e76f - .long 0xb03a5580,0x3ff6247e - .long 0x82552220,0x3ff66238 - .long 0x667f3bc0,0x3ff6a09e - .type __libm_exp_hi_table_64,@object - .size __libm_exp_hi_table_64,520 - .align 8 - .globl __libm_exp_mi_table_64 -__libm_exp_mi_table_64: - .long 0x33018800,0xbfd2bec3 - .long 0x8735cb80,0xbfd2409b - .long 0x2e274100,0xbfd1c114 - .long 0x537b3000,0xbfd14029 - .long 0x1829fc80,0xbfd0bdd7 - .long 0x92616300,0xbfd03a19 - .long 0x9accc780,0xbfcf69d9 - .long 0x92edb400,0xbfce5c99 - .long 0xf7557c80,0xbfcd4c6a - .long 0x9baa2300,0xbfcc3945 - .long 0x3cc8e800,0xbfcb2321 - .long 0x8086c680,0xbfca09f5 - .long 0xf5703d80,0xbfc8edb9 - .long 0x12886a00,0xbfc7ce66 - .long 0x37076a80,0xbfc6abf1 - .long 0xaa180900,0xbfc58652 - .long 0x9a94b100,0xbfc45d81 - .long 0x1ec3a800,0xbfc33175 - .long 0x34128680,0xbfc20224 - .long 0xbed0f880,0xbfc0cf85 - .long 0x13d56b00,0xbfbf3321 - .long 0x8d417580,0xbfbcc076 - .long 0x18837c80,0xbfba46f9 - .long 0xafc3b400,0xbfb7c695 - .long 0x1822db80,0xbfb53f39 - .long 0xe1266b80,0xbfb2b0cf - .long 0x64232500,0xbfb01b46 - .long 0x874c0080,0xbfaafd11 - .long 0xd5b6f200,0xbfa5b505 - .long 0x19ea5d80,0xbfa05e41 - .long 0x92375780,0xbf95f134 - .long 0x985bc980,0xbf860f9f - .long 0x00000000,0x00000000 - .long 0x3bc03000,0x3f864d1f - .long 0xc5615d00,0x3f966c34 - .long 0x0eb37900,0x3fa0e8a3 - .long 0x9f312180,0x3fa6ab0d - .long 0x5a7a3400,0x3fac7d86 - .long 0x0125b500,0x3fb1301d - .long 0xea92dd80,0x3fb429aa - .long 0xc7d51780,0x3fb72b83 - .long 0xb6fcb700,0x3fba35be - .long 0x168b9a80,0x3fbd4873 - .long 0x43146680,0x3fc031dc - .long 0x73ab1180,0x3fc1c3d3 - .long 0x2f13e680,0x3fc35a2b - .long 0xa8fef700,0x3fc4f4ef - .long 0x37201800,0x3fc6942d - .long 0x518db880,0x3fc837f0 - .long 0x9320b780,0x3fc9e045 - .long 0xb9d54e00,0x3fcb8d39 - .long 0xa72cff80,0x3fcd3ed9 - .long 0x6091a100,0x3fcef532 - .long 0x87dcb880,0x3fd05828 - .long 0x81862480,0x3fd13821 - .long 0xd704f300,0x3fd21a8a - .long 0x54d8a880,0x3fd2ff6b - .long 0xda74b280,0x3fd3e6c9 - .long 0x5a753e00,0x3fd4d0ad - .long 0xdad49f00,0x3fd5bd1c - .long 0x75215080,0x3fd6ac1f - .long 0x56b48500,0x3fd79dbc - .long 0xc0e95600,0x3fd891fa - .long 0x09548880,0x3fd988e2 - .long 0x99fcef00,0x3fda8279 - .type __libm_exp_mi_table_64,@object - .size __libm_exp_mi_table_64,520 - .align 8 - .globl __libm_exp_lo_table_64 -__libm_exp_lo_table_64: - .long 0x682764c9,0xbcf9b7ba - .long 0x1d341e44,0xbce10ddf - .long 0x1e1a21ea,0xbcd845b9 - .long 0xb2ae62dc,0xbcfba048 - .long 0x77ee0499,0xbcfc9415 - .long 0xfd45ea87,0xbcedefa2 - .long 0xeea0a997,0xbcdaea60 - .long 0xe26f53db,0xbce37f1b - .long 0xea979b4e,0xbcc29160 - .long 0xb17471a2,0xbcd3a8cf - .long 0xe3c0dabf,0xbceb0baf - .long 0x6df06e17,0xbce07461 - .long 0x729f1c1b,0xbcdfc707 - .long 0x25747355,0xbceb4d65 - .long 0xdb71a83c,0xbcbba5ed - .long 0x78840167,0xbc97829b - .long 0xcb2e88ce,0xbce2a178 - .long 0xbc6109ae,0xbcc42500 - .long 0x4f7e54ac,0xbce91558 - .long 0xbe174986,0xbcdbb708 - .long 0xa76afb72,0xbcbeeef9 - .long 0x200b7c35,0xbcc2d77b - .long 0xd0b85ad9,0xbccbabf0 - .long 0x743797aa,0xbcc1cbc3 - .long 0xf4a29324,0xbcd1b44b - .long 0xfcb49256,0xbcd51ee7 - .long 0x53c612d7,0xbca46973 - .long 0xcfeac66e,0xbcad8c2e - .long 0x3179c289,0xbcc9e9c2 - .long 0xbcada4a8,0xbc911c05 - .long 0xda44ebcf,0xbcbcc583 - .long 0x818b4d9c,0xbcad16f5 - .long 0x00000000,0x00000000 - .long 0x95949ef4,0x3cadcdef - .long 0xa475b465,0x3c8d73e2 - .long 0x4bb284ff,0x3c6186be - .long 0xc95b8c21,0x3ccb14c5 - .long 0x1727c57b,0x3cc0103a - .long 0xe35db263,0x3ca49d77 - .long 0x0650ec96,0x3cdecd04 - .long 0xe4628759,0x3cc6e6fb - .long 0x63da4b47,0x3cd4f2da - .long 0xc0144c88,0x3cc3c02d - .long 0xac0a5425,0x3cd8ee3b - .long 0xf5b6382c,0x3ce0cd83 - .long 0xce6503a7,0x3cea4af4 - .long 0x15f5a24b,0x3cb2c25d - .long 0x3aa6da0f,0x3ce68012 - .long 0x56918c17,0x3cd4b7a3 - .long 0x0c21b2cd,0x3cee9939 - .long 0xaa05e8a9,0x3ce54e28 - .long 0x24a67828,0x3cdba86f - .long 0x911f09ec,0x3cc1ada0 - .long 0x4b71e7b7,0x3ce3f086 - .long 0xde813be0,0x3cea0626 - .long 0xa3b69063,0x3cf013c1 - .long 0x5ebfb10c,0x3cdc750e - .long 0x62da6a82,0x3cdab4cf - .long 0x3c49d86a,0x3cbdf0a8 - .long 0xb004764f,0x3cfa66ec - .long 0x602a323d,0x3ce2b192 - .long 0xc9840733,0x3ce0dd37 - .long 0xe81bf4b7,0x3cd2c7c3 - .long 0x678a6e3d,0x3cd2449f - .long 0x5f626cdd,0x3ce92116 - .type __libm_exp_lo_table_64,@object - .size __libm_exp_lo_table_64,520 - .align 8 - .globl __libm_exp_table_128 -__libm_exp_table_128: - .long 0x908b2fb1,0x3def3bcc - .long 0x66600000,0x3fe6a09e - .long 0xdaed5330,0x3dd7b57d - .long 0x75000000,0x3fe6c012 - .long 0xc8838b30,0x3dc468bb - .long 0x3c600000,0x3fe6dfb2 - .long 0xcf87e1b5,0x3de19483 - .long 0xf9400000,0x3fe6ff7d - .long 0xba46e1e6,0x3dd8bee7 - .long 0xe8e00000,0x3fe71f75 - .long 0xf572693a,0x3dc605ce - .long 0x48a00000,0x3fe73f9a - .long 0xfb74d51a,0x3db33e45 - .long 0x56400000,0x3fe75feb - .long 0x619ae028,0x3dee5d3f - .long 0x4fc00000,0x3fe78069 - .long 0xafaa2048,0x3dd6030d - .long 0x73e00000,0x3fe7a114 - .long 0x7c493344,0x3de0c132 - .long 0x01200000,0x3fe7c1ed - .long 0x20ba0574,0x3dde9cc4 - .long 0x36c00000,0x3fe7e2f3 - .long 0xb60de676,0x3dee1a11 - .long 0x54200000,0x3fe80427 - .long 0x159f115f,0x3dd99c25 - .long 0x99400000,0x3fe82589 - .long 0x7297b5cc,0x3dbe3d66 - .long 0x46200000,0x3fe8471a - .long 0x03907643,0x3dc24bb2 - .long 0x9b400000,0x3fe868d9 - .long 0xcca6179c,0x3dd4cd32 - .long 0xd9800000,0x3fe88ac7 - .long 0xb74f8ab4,0x3dd541b6 - .long 0x42200000,0x3fe8ace5 - .long 0xef2aa1cd,0x3de5448b - .long 0x16a00000,0x3fe8cf32 - .long 0x2b982746,0x3de57736 - .long 0x99000000,0x3fe8f1ae - .long 0x88a61b47,0x3de1ffc5 - .long 0x0b800000,0x3fe9145b - .long 0xe8a0387e,0x3ddb8bc9 - .long 0xb0c00000,0x3fe93737 - .long 0xd36906d3,0x3dd0a41d - .long 0xcbc00000,0x3fe95a44 - .long 0x8b9e9210,0x3dee4e4f - .long 0x9fc00000,0x3fe97d82 - .long 0x74621372,0x3dd40f73 - .long 0x70c00000,0x3fe9a0f1 - .long 0xe3e23584,0x3dbf8480 - .long 0x82a00000,0x3fe9c491 - .long 0xc12653c7,0x3db91918 - .long 0x19e00000,0x3fe9e863 - .long 0xb29ada8c,0x3dede564 - .long 0x7b400000,0x3fea0c66 - .long 0xb182e3ef,0x3dd45a66 - .long 0xec400000,0x3fea309b - .long 0x8b424492,0x3dee255c - .long 0xb2200000,0x3fea5503 - .long 0x6f2dfb2b,0x3de0b358 - .long 0x13200000,0x3fea799e - .long 0x43eb243c,0x3de9fdbf - .long 0x55600000,0x3fea9e6b - .long 0xc0db966a,0x3de3f379 - .long 0xbfc00000,0x3feac36b - .long 0x5e8734d1,0x3dead3ad - .long 0x99400000,0x3feae89f - .long 0x2108559c,0x3ddb6ccb - .long 0x29800000,0x3feb0e07 - .long 0xed7fa1cf,0x3dde2bf5 - .long 0xb8400000,0x3feb33a2 - .long 0x38e20444,0x3dc564e6 - .long 0x8de00000,0x3feb5972 - .long 0xeaa7b082,0x3deb5e46 - .long 0xf2e00000,0x3feb7f76 - .long 0x40cb3c6b,0x3da06498 - .long 0x30a00000,0x3feba5b0 - .long 0x48f741e9,0x3dd783a4 - .long 0x90400000,0x3febcc1e - .long 0x8408d702,0x3de71e08 - .long 0x5bc00000,0x3febf2c2 - .long 0x88832c4b,0x3dc54a70 - .long 0xdd800000,0x3fec199b - .long 0x6d14df82,0x3defd07a - .long 0x5fe00000,0x3fec40ab - .long 0x4a2137fd,0x3de7d14b - .long 0x2e400000,0x3fec67f1 - .long 0x46b2f122,0x3dcb9ed4 - .long 0x94000000,0x3fec8f6d - .long 0x2a0797a4,0x3ddf20d2 - .long 0xdce00000,0x3fecb720 - .long 0xc44f8959,0x3dedc3f9 - .long 0x55400000,0x3fecdf0b - .long 0x343c8bc8,0x3dce25ee - .long 0x4a000000,0x3fed072d - .long 0x15bc2473,0x3ddb13e3 - .long 0x08000000,0x3fed2f87 - .long 0x25da05af,0x3deba487 - .long 0xdce00000,0x3fed5818 - .long 0x7709f3a1,0x3dd3072f - .long 0x16c00000,0x3fed80e3 - .long 0x708c01a6,0x3deb3285 - .long 0x03c00000,0x3feda9e6 - .long 0xb695de3c,0x3dab4604 - .long 0xf3000000,0x3fedd321 - .long 0xb968cac4,0x3deb9b5e - .long 0x33600000,0x3fedfc97 - .long 0xa12761fa,0x3de5a128 - .long 0x14e00000,0x3fee2646 - .long 0x4e7a2603,0x3dd67fec - .long 0xe7800000,0x3fee502e - .long 0x2d522ca1,0x3dcd320d - .long 0xfbc00000,0x3fee7a51 - .long 0x163dce86,0x3dc24366 - .long 0xa2a00000,0x3feea4af - .long 0x1b60625f,0x3ddccfe1 - .long 0x2d800000,0x3feecf48 - .long 0x71fd21a9,0x3da5a277 - .long 0xee600000,0x3feefa1b - .long 0x9d0d2df8,0x3dd7752e - .long 0x37600000,0x3fef252b - .long 0xce9f096f,0x3ddc8a80 - .long 0x5b600000,0x3fef5076 - .long 0x8913b4c0,0x3decbe13 - .long 0xad800000,0x3fef7bfd - .long 0x2e90a7e7,0x3dee90d8 - .long 0x81800000,0x3fefa7c1 - .long 0x12eb7496,0x3ddee3e2 - .long 0x2b800000,0x3fefd3c2 - .long 0x00000000,0x00000000 - .long 0x00000000,0x3ff00000 - .long 0x6d84a66b,0x3dfb3335 - .long 0xa9e00000,0x3ff0163d - .long 0xee6f7cad,0x3df78060 - .long 0x3e600000,0x3ff02c9a - .long 0x7ae71f34,0x3decff09 - .long 0xe8600000,0x3ff04315 - .long 0x3ae7c549,0x3df58574 - .long 0xd3000000,0x3ff059b0 - .long 0xc6dc403b,0x3dfdf6dd - .long 0x29c00000,0x3ff0706b - .long 0x08c35f26,0x3df59bc8 - .long 0x18600000,0x3ff08745 - .long 0x14878183,0x3ddbce0d - .long 0xcac00000,0x3ff09e3e - .long 0x6298b92b,0x3df9890f - .long 0x6ce00000,0x3ff0b558 - .long 0x407b705c,0x3df247f7 - .long 0x2b600000,0x3ff0cc92 - .long 0x020742e5,0x3df3d1a2 - .long 0x32c00000,0x3ff0e3ec - .long 0xf232091e,0x3dfed31a - .long 0xafe00000,0x3ff0fb66 - .long 0xa4ebbf1b,0x3df25b50 - .long 0xd0000000,0x3ff11301 - .long 0xf72575a6,0x3de86397 - .long 0xc0600000,0x3ff12abd - .long 0x66820328,0x3de25bbf - .long 0xaea00000,0x3ff1429a - .long 0x920355cf,0x3dd63944 - .long 0xc8a00000,0x3ff15a98 - .long 0xdcdf7c8c,0x3dfd517a - .long 0x3c600000,0x3ff172b8 - .long 0x777ee173,0x3de91bd3 - .long 0x38800000,0x3ff18af9 - .long 0x796d31ed,0x3def96ea - .long 0xeb600000,0x3ff1a35b - .long 0x6ac79cad,0x3dd1734e - .long 0x84000000,0x3ff1bbe0 - .long 0xf00b7005,0x3de17354 - .long 0x31600000,0x3ff1d487 - .long 0xb8819ff6,0x3dfcd91c - .long 0x22e00000,0x3ff1ed50 - .long 0xdc775815,0x3dc466b1 - .long 0x88600000,0x3ff2063b - .long 0x2552fd29,0x3dfddc96 - .long 0x91600000,0x3ff21f49 - .long 0x66c1fadb,0x3df56238 - .long 0x6e600000,0x3ff2387a - .long 0x3582ab7e,0x3df2a63f - .long 0x4fa00000,0x3ff251ce - .long 0x2bd33994,0x3dc3e6e9 - .long 0x65e00000,0x3ff26b45 - .long 0x96cf15cf,0x3df56380 - .long 0xe1e00000,0x3ff284df - .long 0x2c25d15f,0x3dffdee1 - .long 0xf5000000,0x3ff29e9d - .long 0xfddea465,0x3dfad98f - .long 0xd0c00000,0x3ff2b87f - .long 0x0024754e,0x3dd00c2d - .long 0xa6e00000,0x3ff2d285 - .long 0x11ca0f46,0x3dfe2f56 - .long 0xa9200000,0x3ff2ecaf - .long 0x2de8d5a4,0x3df1b715 - .long 0x0a200000,0x3ff306fe - .long 0x6a739e38,0x3de9b062 - .long 0xfc400000,0x3ff32170 - .long 0x32721843,0x3dd05bfd - .long 0xb2600000,0x3ff33c08 - .long 0xc9462347,0x3df29ff0 - .long 0x5f800000,0x3ff356c5 - .long 0xa7145503,0x3dfaa9ca - .long 0x37200000,0x3ff371a7 - .long 0x16a72c36,0x3dd76196 - .long 0x6d000000,0x3ff38cae - .long 0xa86f24a6,0x3dd67fdb - .long 0x34e00000,0x3ff3a7db - .long 0x84001f23,0x3df3a8e4 - .long 0xc3000000,0x3ff3c32d - .long 0x35b41224,0x3df23422 - .long 0x4c000000,0x3ff3dea6 - .long 0x417ee035,0x3de90037 - .long 0x04a00000,0x3ff3fa45 - .long 0xf84325b9,0x3df72e29 - .long 0x21e00000,0x3ff4160a - .long 0xdc704439,0x3df0a896 - .long 0xd9400000,0x3ff431f5 - .long 0x3136f40a,0x3db892d0 - .long 0x60600000,0x3ff44e08 - .long 0x72512f46,0x3dfd0057 - .long 0xed000000,0x3ff46a41 - .long 0x3c1a3b69,0x3db3cd01 - .long 0xb5c00000,0x3ff486a2 - .long 0x672d8bcf,0x3df7d3de - .long 0xf0c00000,0x3ff4a32a - .long 0x1d4397b0,0x3df62a27 - .long 0xd5200000,0x3ff4bfda - .long 0x63b36ef2,0x3dfddd0d - .long 0x99e00000,0x3ff4dcb2 - .long 0xad33d8b7,0x3dfd2ca6 - .long 0x76800000,0x3ff4f9b2 - .long 0x8225ea59,0x3deecc83 - .long 0xa2c00000,0x3ff516da - .long 0xdf0a83c5,0x3dfd4f81 - .long 0x56800000,0x3ff5342b - .long 0xc52ec620,0x3dfd920e - .long 0xca400000,0x3ff551a4 - .long 0x66ecb004,0x3df527da - .long 0x36a00000,0x3ff56f47 - .long 0x252bc2b7,0x3df7c7fd - .long 0xd4800000,0x3ff58d12 - .long 0xb192602a,0x3de0a852 - .long 0xdd400000,0x3ff5ab07 - .long 0x01c4b1b8,0x3df946b7 - .long 0x8a400000,0x3ff5c926 - .long 0xdd37c984,0x3dea4290 - .long 0x15a00000,0x3ff5e76f - .long 0xb076f593,0x3df6dc08 - .long 0xb9600000,0x3ff605e1 - .long 0xb1f0fa07,0x3dfa5584 - .long 0xb0200000,0x3ff6247e - .long 0x8edf0e2a,0x3de9863f - .long 0x34c00000,0x3ff64346 - .long 0x9127d9e3,0x3df52224 - .long 0x82400000,0x3ff66238 - .long 0x1038ae45,0x3de952e6 - .long 0xd4400000,0x3ff68155 - .long 0x908b2fb1,0x3dff3bcc - .long 0x66600000,0x3ff6a09e - .type __libm_exp_table_128,@object - .size __libm_exp_table_128,2064 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expf_gen.S deleted file mode 100644 index cad669ec94..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expf_gen.S +++ /dev/null @@ -1,721 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expf_gen.c" - .text -..TXTST0: -# -- Begin expf - .text - .align 16,0x90 - .globl expf -expf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_expf.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 -..B1.2: - movss LOW_FLOAT_MASK(%rip), %xmm1 - movq log2e(%rip), %xmm3 - movq $0x4338000000000000, %rax - movd %rax, %xmm4 - andps %xmm0, %xmm1 - movd %xmm0, %ecx - cvtps2pd %xmm1, %xmm1 - andl $2147483647, %ecx - subl $830472192, %ecx - cmpl $288180587, %ecx - jae .L_2TAG_PACKET_0.0.2 - movq c2(%rip), %xmm6 - mulsd %xmm1, %xmm3 - movq %xmm4, %xmm2 - addsd %xmm3, %xmm4 - movq 8+c2(%rip), %xmm5 - movd %xmm4, %eax - subsd %xmm4, %xmm2 - movq $0x3ff0000000000000, %rdx - movd %rdx, %xmm1 - lea Th(%rip), %r11 - xorpd %xmm7, %xmm7 - movl %eax, %ecx - andl $255, %eax - movq (%r11,%rax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm7 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm7, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - addl $830472192, %ecx - cmpl $830472192, %ecx - jb .L_2TAG_PACKET_1.0.2 - cmpl $1124073472, %ecx - jae .L_2TAG_PACKET_2.0.2 - movq c2(%rip), %xmm6 - mulsd %xmm1, %xmm3 - movq %xmm4, %xmm2 - xorpd %xmm1, %xmm1 - addsd %xmm3, %xmm4 - movq 8+c2(%rip), %xmm5 - movd %xmm4, %eax - subsd %xmm4, %xmm2 - movl $16368, %edx - pinsrw $3, %edx, %xmm1 - lea Th(%rip), %r11 - xorpd %xmm7, %xmm7 - movl %eax, %ecx - andl $255, %eax - movq (%r11,%rax,8), %xmm0 - addsd %xmm2, %xmm3 - sarl $4, %ecx - andl $-16, %ecx - pinsrw $3, %ecx, %xmm7 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm1, %xmm5 - paddd %xmm7, %xmm0 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm0 - cvtpd2ps %xmm0, %xmm0 - movd %xmm0, %eax - cmpl $8388608, %eax - jb .L_2TAG_PACKET_3.0.2 - cmpl $2139095040, %eax - je .L_2TAG_PACKET_4.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_2.0.2: - movd %xmm0, %edx - cmpl $2139095040, %ecx - jae .L_2TAG_PACKET_5.0.2 - testl $-2147483648, %edx - je .L_2TAG_PACKET_4.0.2 - movl $8388608, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 -.L_2TAG_PACKET_3.0.2: - movl $17, (%rsp) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_4.0.2: - movl $2130706432, %eax - movd %eax, %xmm0 - mulss %xmm0, %xmm0 - movl $16, (%rsp) - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_1.0.2: - movl $1065353216, %eax - movd %eax, %xmm1 - addss %xmm1, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_5.0.2: - cmpl $-8388608, %edx - je .L_2TAG_PACKET_7.0.2 - addss %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_7.0.2: - xorps %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_6.0.2: - movss %xmm0, 4(%rsp) -..B1.3: - movss 4(%rsp), %xmm0 -.L_2TAG_PACKET_8.0.2: -..B1.5: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type expf,@function - .size expf,.-expf - .data -# -- End expf - .section .rodata, "a" - .align 16 - .align 16 -LOW_FLOAT_MASK: - .long 4294967295 - .type LOW_FLOAT_MASK,@object - .size LOW_FLOAT_MASK,4 - .space 4, 0x00 # pad - .align 8 -log2e: - .long 1697350398 - .long 1081546055 - .type log2e,@object - .size log2e,8 - .align 8 -c2: - .long 4286760334 - .long 1053736893 - .long 4277826245 - .long 1063661122 - .type c2,@object - .size c2,16 - .align 8 -Th: - .long 0 - .long 1072693248 - .long 4200250559 - .long 1072696090 - .long 2851812149 - .long 1072698941 - .long 339411585 - .long 1072701800 - .long 1048019041 - .long 1072704666 - .long 772914124 - .long 1072707540 - .long 3899555717 - .long 1072710421 - .long 1928746161 - .long 1072713311 - .long 3541402996 - .long 1072716208 - .long 238821257 - .long 1072719114 - .long 702412510 - .long 1072722027 - .long 728934454 - .long 1072724948 - .long 410360776 - .long 1072727877 - .long 4133881824 - .long 1072730813 - .long 3402036099 - .long 1072733758 - .long 2602514713 - .long 1072736711 - .long 1828292879 - .long 1072739672 - .long 1172597893 - .long 1072742641 - .long 728909815 - .long 1072745618 - .long 590962156 - .long 1072748603 - .long 852742562 - .long 1072751596 - .long 1608493509 - .long 1072754597 - .long 2952712987 - .long 1072757606 - .long 685187902 - .long 1072760624 - .long 3490863953 - .long 1072763649 - .long 2875075254 - .long 1072766683 - .long 3228316108 - .long 1072769725 - .long 351405227 - .long 1072772776 - .long 2930322912 - .long 1072775834 - .long 2471440686 - .long 1072778901 - .long 3366293073 - .long 1072781976 - .long 1416741826 - .long 1072785060 - .long 1014845819 - .long 1072788152 - .long 2257959872 - .long 1072791252 - .long 948735466 - .long 1072794361 - .long 1480023343 - .long 1072797478 - .long 3949972341 - .long 1072800603 - .long 4162030108 - .long 1072803737 - .long 2214878420 - .long 1072806880 - .long 2502433899 - .long 1072810031 - .long 828946858 - .long 1072813191 - .long 1588871207 - .long 1072816359 - .long 586995997 - .long 1072819536 - .long 2218315341 - .long 1072822721 - .long 2288159958 - .long 1072825915 - .long 897099801 - .long 1072829118 - .long 2440944790 - .long 1072832329 - .long 2725843665 - .long 1072835549 - .long 1853186616 - .long 1072838778 - .long 4219606026 - .long 1072842015 - .long 1337108031 - .long 1072845262 - .long 1897844341 - .long 1072848517 - .long 1709341917 - .long 1072851781 - .long 874372905 - .long 1072855054 - .long 3790955393 - .long 1072858335 - .long 1972484976 - .long 1072861626 - .long 4112506593 - .long 1072864925 - .long 1724976915 - .long 1072868234 - .long 3504003472 - .long 1072871551 - .long 964107055 - .long 1072874878 - .long 2799960843 - .long 1072878213 - .long 526652809 - .long 1072881558 - .long 2839424854 - .long 1072884911 - .long 1253935211 - .long 1072888274 - .long 171030293 - .long 1072891646 - .long 3991843581 - .long 1072895026 - .long 4232894513 - .long 1072898416 - .long 1000925746 - .long 1072901816 - .long 2992903935 - .long 1072905224 - .long 1726216749 - .long 1072908642 - .long 1603444721 - .long 1072912069 - .long 2732492859 - .long 1072915505 - .long 926591435 - .long 1072918951 - .long 589198666 - .long 1072922406 - .long 1829099622 - .long 1072925870 - .long 460407023 - .long 1072929344 - .long 887463927 - .long 1072932827 - .long 3219942644 - .long 1072936319 - .long 3272845541 - .long 1072939821 - .long 1156440435 - .long 1072943333 - .long 1276261410 - .long 1072946854 - .long 3743175029 - .long 1072950384 - .long 78413852 - .long 1072953925 - .long 3278348324 - .long 1072957474 - .long 569847338 - .long 1072961034 - .long 654919306 - .long 1072964603 - .long 3645941911 - .long 1072968181 - .long 1065662932 - .long 1072971770 - .long 1617004845 - .long 1072975368 - .long 1118294578 - .long 1072978976 - .long 3978100823 - .long 1072982593 - .long 1720398391 - .long 1072986221 - .long 3049340112 - .long 1072989858 - .long 3784486610 - .long 1072993505 - .long 4040676318 - .long 1072997162 - .long 3933059031 - .long 1073000829 - .long 3577096743 - .long 1073004506 - .long 3088564500 - .long 1073008193 - .long 2583551245 - .long 1073011890 - .long 2178460671 - .long 1073015597 - .long 1990012071 - .long 1073019314 - .long 2135241198 - .long 1073023041 - .long 2731501122 - .long 1073026778 - .long 3896463087 - .long 1073030525 - .long 1453150082 - .long 1073034283 - .long 4109806887 - .long 1073038050 - .long 3395129871 - .long 1073041828 - .long 3723038930 - .long 1073045616 - .long 917841882 - .long 1073049415 - .long 3689071823 - .long 1073053223 - .long 3566716925 - .long 1073057042 - .long 671025100 - .long 1073060872 - .long 3712504873 - .long 1073064711 - .long 4222122499 - .long 1073068561 - .long 2321106615 - .long 1073072422 - .long 2425981843 - .long 1073076293 - .long 363667784 - .long 1073080175 - .long 551349105 - .long 1073084067 - .long 3111574537 - .long 1073087969 - .long 3872257780 - .long 1073091882 - .long 2956612997 - .long 1073095806 - .long 488188413 - .long 1073099741 - .long 885834528 - .long 1073103686 - .long 4273770423 - .long 1073107641 - .long 2186617381 - .long 1073111608 - .long 3339203574 - .long 1073115585 - .long 3561793907 - .long 1073119573 - .long 2979960120 - .long 1073123572 - .long 1719614413 - .long 1073127582 - .long 4201977662 - .long 1073131602 - .long 1963711167 - .long 1073135634 - .long 3721688645 - .long 1073139676 - .long 1013258799 - .long 1073143730 - .long 2555984613 - .long 1073147794 - .long 4182873220 - .long 1073151869 - .long 1727278727 - .long 1073155956 - .long 3907805044 - .long 1073160053 - .long 2263535754 - .long 1073164162 - .long 1218806132 - .long 1073168282 - .long 903334909 - .long 1073172413 - .long 1447192521 - .long 1073176555 - .long 2980802057 - .long 1073180708 - .long 1339972927 - .long 1073184873 - .long 950803702 - .long 1073189049 - .long 1944781191 - .long 1073193236 - .long 158781403 - .long 1073197435 - .long 19972402 - .long 1073201645 - .long 1660913392 - .long 1073205866 - .long 919555682 - .long 1073210099 - .long 2224145553 - .long 1073214343 - .long 1413356050 - .long 1073218599 - .long 2916157145 - .long 1073222866 - .long 2571947539 - .long 1073227145 - .long 515457527 - .long 1073231436 - .long 1176749997 - .long 1073235738 - .long 396319521 - .long 1073240052 - .long 2604962541 - .long 1073244377 - .long 3643909174 - .long 1073248714 - .long 3649726105 - .long 1073253063 - .long 2759350287 - .long 1073257424 - .long 1110089947 - .long 1073261797 - .long 3134592888 - .long 1073266181 - .long 380978316 - .long 1073270578 - .long 1577608921 - .long 1073274986 - .long 2568320822 - .long 1073279406 - .long 3492293770 - .long 1073283838 - .long 194117574 - .long 1073288283 - .long 1403662306 - .long 1073292739 - .long 2966275557 - .long 1073297207 - .long 727685349 - .long 1073301688 - .long 3418903055 - .long 1073306180 - .long 2591453363 - .long 1073310685 - .long 2682146384 - .long 1073315202 - .long 3833209506 - .long 1073319731 - .long 1892288442 - .long 1073324273 - .long 1297350157 - .long 1073328827 - .long 2191782032 - .long 1073333393 - .long 424392917 - .long 1073337972 - .long 434316067 - .long 1073342563 - .long 2366108318 - .long 1073347166 - .long 2069751141 - .long 1073351782 - .long 3985553595 - .long 1073356410 - .long 3964284211 - .long 1073361051 - .long 2152073944 - .long 1073365705 - .long 2990417245 - .long 1073370371 - .long 2331271250 - .long 1073375050 - .long 321958744 - .long 1073379742 - .long 1405169241 - .long 1073384446 - .long 1434058175 - .long 1073389163 - .long 557149882 - .long 1073393893 - .long 3218338682 - .long 1073398635 - .long 977020788 - .long 1073403391 - .long 2572866477 - .long 1073408159 - .long 3861050111 - .long 1073412940 - .long 697153126 - .long 1073417735 - .long 1822067026 - .long 1073422542 - .long 3092190715 - .long 1073427362 - .long 364333489 - .long 1073432196 - .long 2380618042 - .long 1073437042 - .long 703710506 - .long 1073441902 - .long 4076559943 - .long 1073446774 - .long 4062661092 - .long 1073451660 - .long 815859274 - .long 1073456560 - .long 3080351519 - .long 1073461472 - .long 2420883922 - .long 1073466398 - .long 3287523847 - .long 1073471337 - .long 1540824585 - .long 1073476290 - .long 1631695677 - .long 1073481256 - .long 3716502172 - .long 1073486235 - .long 3657065772 - .long 1073491228 - .long 1610600570 - .long 1073496235 - .long 2029714210 - .long 1073501255 - .long 777507147 - .long 1073506289 - .long 2307442995 - .long 1073511336 - .long 2483480501 - .long 1073516397 - .long 1464976603 - .long 1073521472 - .long 3706687593 - .long 1073526560 - .long 778901109 - .long 1073531663 - .long 1432208378 - .long 1073536779 - .long 1532734324 - .long 1073541909 - .long 1242007932 - .long 1073547053 - .long 721996136 - .long 1073552211 - .long 135105010 - .long 1073557383 - .long 3939148246 - .long 1073562568 - .long 3707479175 - .long 1073567768 - .long 3898795731 - .long 1073572982 - .long 382305176 - .long 1073578211 - .long 1912561781 - .long 1073583453 - .long 64696965 - .long 1073588710 - .long 3594158869 - .long 1073593980 - .long 4076975200 - .long 1073599265 - .long 1679558232 - .long 1073604565 - .long 863738719 - .long 1073609879 - .long 1796832535 - .long 1073615207 - .long 351641897 - .long 1073620550 - .long 991358482 - .long 1073625907 - .long 3884662774 - .long 1073631278 - .long 610758006 - .long 1073636665 - .long 4224142467 - .long 1073642065 - .long 2009970496 - .long 1073647481 - .long 2728693978 - .long 1073652911 - .long 2256325230 - .long 1073658356 - .long 764307441 - .long 1073663816 - .long 2719515920 - .long 1073669290 - .long 3999357479 - .long 1073674779 - .long 481706282 - .long 1073680284 - .long 929806999 - .long 1073685803 - .long 1222472308 - .long 1073691337 - .long 1533953344 - .long 1073696886 - .long 2038973688 - .long 1073702450 - .long 2912730644 - .long 1073708029 - .long 35929225 - .long 1073713624 - .long 2174652632 - .long 1073719233 - .long 915592468 - .long 1073724858 - .long 730821105 - .long 1073730498 - .long 1797923801 - .long 1073736153 - .type Th,@object - .size Th,2048 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expf_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expf_table.S deleted file mode 100644 index dc6538a147..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expf_table.S +++ /dev/null @@ -1,112 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expf_table.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __libm_expf_table_64 -__libm_expf_table_64: - .long 0x667f3bcd,0x3fe6a09e - .long 0x3c651a2f,0x3fe6dfb2 - .long 0xe8ec5f74,0x3fe71f75 - .long 0x564267c9,0x3fe75feb - .long 0x73eb0187,0x3fe7a114 - .long 0x36cf4e62,0x3fe7e2f3 - .long 0x994cce13,0x3fe82589 - .long 0x9b4492ed,0x3fe868d9 - .long 0x422aa0db,0x3fe8ace5 - .long 0x99157736,0x3fe8f1ae - .long 0xb0cdc5e5,0x3fe93737 - .long 0x9fde4e50,0x3fe97d82 - .long 0x82a3f090,0x3fe9c491 - .long 0x7b5de565,0x3fea0c66 - .long 0xb23e255d,0x3fea5503 - .long 0x5579fdbf,0x3fea9e6b - .long 0x995ad3ad,0x3feae89f - .long 0xb84f15fb,0x3feb33a2 - .long 0xf2fb5e47,0x3feb7f76 - .long 0x904bc1d2,0x3febcc1e - .long 0xdd85529c,0x3fec199b - .long 0x2e57d14b,0x3fec67f1 - .long 0xdcef9069,0x3fecb720 - .long 0x4a07897c,0x3fed072d - .long 0xdcfba487,0x3fed5818 - .long 0x03db3285,0x3feda9e6 - .long 0x337b9b5f,0x3fedfc97 - .long 0xe78b3ff6,0x3fee502e - .long 0xa2a490da,0x3feea4af - .long 0xee615a27,0x3feefa1b - .long 0x5b6e4540,0x3fef5076 - .long 0x819e90d8,0x3fefa7c1 - .long 0x00000000,0x3ff00000 - .long 0x3e778061,0x3ff02c9a - .long 0xd3158574,0x3ff059b0 - .long 0x18759bc8,0x3ff08745 - .long 0x6cf9890f,0x3ff0b558 - .long 0x32d3d1a2,0x3ff0e3ec - .long 0xd0125b51,0x3ff11301 - .long 0xaea92de0,0x3ff1429a - .long 0x3c7d517b,0x3ff172b8 - .long 0xeb6fcb75,0x3ff1a35b - .long 0x3168b9aa,0x3ff1d487 - .long 0x88628cd6,0x3ff2063b - .long 0x6e756238,0x3ff2387a - .long 0x65e27cdd,0x3ff26b45 - .long 0xf51fdee1,0x3ff29e9d - .long 0xa6e4030b,0x3ff2d285 - .long 0x0a31b715,0x3ff306fe - .long 0xb26416ff,0x3ff33c08 - .long 0x373aa9cb,0x3ff371a7 - .long 0x34e59ff7,0x3ff3a7db - .long 0x4c123422,0x3ff3dea6 - .long 0x21f72e2a,0x3ff4160a - .long 0x6061892d,0x3ff44e08 - .long 0xb5c13cd0,0x3ff486a2 - .long 0xd5362a27,0x3ff4bfda - .long 0x769d2ca7,0x3ff4f9b2 - .long 0x569d4f82,0x3ff5342b - .long 0x36b527da,0x3ff56f47 - .long 0xdd485429,0x3ff5ab07 - .long 0x15ad2148,0x3ff5e76f - .long 0xb03a5585,0x3ff6247e - .long 0x82552225,0x3ff66238 - .long 0x667f3bcd,0x3ff6a09e - .type __libm_expf_table_64,@object - .size __libm_expf_table_64,520 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expl.S deleted file mode 100644 index fbd0ff76a7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expl.S +++ /dev/null @@ -1,599 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expl.c" - .text -..TXTST0: -# -- Begin expl - .text - .align 16,0x90 - .globl expl -expl: -# parameter 1: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_expl.1: -..L2: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %dil, %dil -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movb 105(%rsp), %al - lea _ranges(%rip), %r8 - andb $-128, %al - shrb $7, %al - movzbl %al, %esi - movq %rsi, %rcx - shlq $4, %rcx - movzwl 104(%rsp), %eax - andl $32767, %eax - movzwl 8(%rcx,%r8), %edx - andl $32767, %edx - cmpl %edx, %eax - jl ..B1.8 -..B1.4: - jne ..B1.31 -..B1.5: - movl 100(%rsp), %edx - cmpl 4(%rcx,%r8), %edx - jb ..B1.8 -..B1.6: - jne ..B1.31 -..B1.7: - movl 96(%rsp), %edx - cmpl (%rcx,%r8), %edx - jae ..B1.31 -..B1.8: - movzwl 82(%rsp), %r8d - cmpl $16363, %eax - jge ..B1.19 -..B1.9: - movl %r8d, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.13 -..B1.10: - orl $-64768, %r8d - movw %r8w, 80(%rsp) -..B1.11: - fldcw 80(%rsp) -..B1.12: - movzwl 104(%rsp), %eax - movb $1, %dil - andl $32767, %eax -..B1.13: - fldt 96(%rsp) - cmpl $16316, %eax - fstpt 16(%rsp) - jge ..B1.15 -..B1.14: - fldt .L_2il0floatpacket.0(%rip) - fldt 16(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.16 -..B1.15: - fldt 16(%rsp) - lea 16+_P1(%rip), %rax - fldt .L_2il0floatpacket.0(%rip) - lea _P1(%rip), %rdx - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(2), %st - fmul %st(2), %st - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) -..B1.16: - testb %dil, %dil - je ..B1.18 -..B1.17: - fldcw 82(%rsp) -..B1.18: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.19: - movl %r8d, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.23 -..B1.20: - orl $-64768, %r8d - movw %r8w, 80(%rsp) -..B1.21: - fldcw 80(%rsp) -..B1.22: - movb $1, %dil -..B1.23: - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %r8 - fstpt 48(%rsp) - lea _TWO_32H(%rip), %r9 - fldt 96(%rsp) - lea SC2_BIAS(%rip), %r10 - fldt .L_2il0floatpacket.1(%rip) - fmul %st(1), %st - fldl (%r8) - movzwl 8+.L_2il0floatpacket.0(%rip), %r8d - fadd %st, %st(1) - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - andl $-32768, %r8d - movl 64(%rsp), %edx - fsubp %st, %st(1) - fldt .L_2il0floatpacket.2(%rip) - fmul %st(1), %st - movsbq %dl, %rax - fsubr %st(2), %st - fld %st(0) - movl %eax, %r11d - fldt .L_2il0floatpacket.3(%rip) - negl %r11d - fmulp %st, %st(3) - addl %edx, %r11d - shrl $8, %r11d - addl $4196735, %edx - addl (%r10,%rsi,4), %r11d - lea 64+_P(%rip), %rsi - andl $32767, %r11d - lea 16+_P(%rip), %r10 - orl %r11d, %r8d - fsub %st(2), %st - fldl (%r9) - lea 48+_P(%rip), %r9 - movw %r8w, 56(%rsp) - lea _P(%rip), %r8 - shlq $4, %rax - fadd %st, %st(1) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - cmpl $3070, %edx - movq __libm_expl_table_256@GOTPCREL(%rip), %r11 - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt (%rsi) - lea 32+_P(%rip), %rsi - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fldl 2048(%r11,%rax) - fld %st(0) - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fxch %st(1) - fmull 2056(%r11,%rax) - faddp %st, %st(2) - faddl 2056(%r11,%rax) - faddp %st, %st(1) - ja ..B1.26 -..B1.24: - lea _expbut(%rip), %rax - fldt (%rax) - fcomip %st(3), %st - jbe ..B1.26 -..B1.25: - fstp %st(2) - fld %st(0) - lea _TWO_12H(%rip), %rax - lea _SC2(%rip), %rdx - fadd %st(2), %st - fldl (%rax) - fmul %st(1), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fldt (%rcx,%rdx) - fldt 48(%rsp) - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B1.27 -..B1.26: - fstp %st(2) - lea _SC2(%rip), %rax - faddp %st, %st(1) - fldt 48(%rsp) - fmulp %st, %st(1) - fldt (%rcx,%rax) - fmulp %st, %st(1) - fstpt 32(%rsp) -..B1.27: - fldt 32(%rsp) - lea _minnorm(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - fstp %st(0) - ja ..B1.42 -..B1.28: - testb %dil, %dil - je ..B1.30 -..B1.29: - fldt 16(%rsp) - fstpt 64(%rsp) -..B1.49: - fldcw 82(%rsp) -..B1.30: - fldt 32(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.31: - movzwl 82(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.35 -..B1.32: - orl $-64768, %ecx - movw %cx, 80(%rsp) -..B1.33: - fldcw 80(%rsp) -..B1.34: - movzwl 104(%rsp), %eax - movb $1, %dil - andl $32767, %eax -..B1.35: - cmpl $32767, %eax - je ..B1.43 -..B1.36: - testq %rsi, %rsi - je ..B1.38 -..B1.37: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 16(%rsp) - jmp ..B1.39 -..B1.38: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 16(%rsp) -..B1.39: - testb %dil, %dil - je ..B1.41 -..B1.40: - fldcw 82(%rsp) -..B1.41: - fldt 16(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.42: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.28 -..B1.43: - cmpl $-2147483648, 100(%rsp) - jne ..B1.46 -..B1.44: - cmpl $0, 96(%rsp) - jne ..B1.46 -..B1.45: - lea _inf_zeros(%rip), %rax - fldl (%rax,%rsi,8) - fstpt 16(%rsp) - jmp ..B1.39 -..B1.46: - fldt 96(%rsp) - fstpt 16(%rsp) - jmp ..B1.39 - .align 16,0x90 - .cfi_endproc - .type expl,@function - .size expl,.-expl - .data -# -- End expl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -SC2_BIAS: - .long 8191 - .long 24575 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 4 -_inf_zeros: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zeros,@object - .size _inf_zeros,16 - .align 2 -_ranges: - .word 31148 - .word 53711 - .word 6135 - .word 45426 - .word 16396 - .word 0 - .word 0 - .word 0 - .word 488 - .word 27074 - .word 50247 - .word 45600 - .word 16396 - .word 0 - .word 0 - .word 0 - .type _ranges,@object - .size _ranges,32 - .align 2 -_P1: - .word 43691 - .word 10 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30584 - .word 43703 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,32 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,80 - .align 2 -_expbut: - .word 60207 - .word 4624 - .word 35943 - .word 45420 - .word 49164 - .word 0 - .word 0 - .word 0 - .type _expbut,@object - .size _expbut,16 - .align 2 -_SC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .type _SC2,@object - .size _SC2,32 - .align 2 -_minnorm: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _minnorm,@object - .size _minnorm,16 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expl_table.S deleted file mode 100644 index e01307b984..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expl_table.S +++ /dev/null @@ -1,561 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expl_table.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __libm_expl_table_256 -__libm_expl_table_256: - .long 0x66800000,0x3fe6a09e - .long 0xee9a09d9,0xbd98866d - .long 0xfa800000,0x3fe6b052 - .long 0xcb8e15a7,0xbdd5d183 - .long 0x75000000,0x3fe6c012 - .long 0xdaed5330,0x3dd7b57d - .long 0xde000000,0x3fe6cfdc - .long 0x470aac92,0xbdf5c4dd - .long 0x3c400000,0x3fe6dfb2 - .long 0x79107166,0x3df28d17 - .long 0x98400000,0x3fe6ef92 - .long 0xbd1a2d88,0x3de93ae4 - .long 0xf9400000,0x3fe6ff7d - .long 0xcf87e1b5,0x3de19483 - .long 0x67000000,0x3fe70f74 - .long 0xf314dd96,0xbdd7a2f1 - .long 0xe9000000,0x3fe71f75 - .long 0x22dc8f0d,0xbde3a08c - .long 0x87000000,0x3fe72f82 - .long 0x482a80b3,0xbde52f76 - .long 0x48c00000,0x3fe73f9a - .long 0x42a365b2,0xbdea7e8c - .long 0x35c00000,0x3fe74fbd - .long 0x411ff586,0x3de7cbfd - .long 0x56400000,0x3fe75feb - .long 0xfb74d51a,0x3db33e45 - .long 0xb1c00000,0x3fe77024 - .long 0x921e23a6,0xbde491f6 - .long 0x4fc00000,0x3fe78069 - .long 0x619ae028,0x3dee5d3f - .long 0x38c00000,0x3fe790b9 - .long 0xb2d95e75,0xbde3e309 - .long 0x74000000,0x3fe7a114 - .long 0x282aefdc,0xbde4fe79 - .long 0x09800000,0x3fe7b17b - .long 0xdf5dac23,0xbdd2604a - .long 0x01000000,0x3fe7c1ed - .long 0x3e2499a2,0x3df86099 - .long 0x63000000,0x3fe7d26a - .long 0x4224048d,0xbd8e43ee - .long 0x36c00000,0x3fe7e2f3 - .long 0x20ba0574,0x3dde9cc4 - .long 0x84800000,0x3fe7f387 - .long 0xdf01dc61,0x3de1c490 - .long 0x54400000,0x3fe80427 - .long 0x9f21989b,0xbdae5ee4 - .long 0xae000000,0x3fe814d2 - .long 0x573791e6,0xbdf77c93 - .long 0x99400000,0x3fe82589 - .long 0x159f115f,0x3dd99c25 - .long 0x1e800000,0x3fe8364c - .long 0xb3373464,0x3dfca0fb - .long 0x46400000,0x3fe8471a - .long 0x31ad0947,0xbdec3853 - .long 0x17800000,0x3fe857f4 - .long 0xf9162dc2,0x3def5b20 - .long 0x9b400000,0x3fe868d9 - .long 0x03907643,0x3dc24bb2 - .long 0xd9400000,0x3fe879ca - .long 0xa8b4a0b5,0xbddcb793 - .long 0xd9800000,0x3fe88ac7 - .long 0xcca6179c,0x3dd4cd32 - .long 0xa4800000,0x3fe89bd0 - .long 0x2ac6abb9,0xbdce9fc2 - .long 0x42400000,0x3fe8ace5 - .long 0xa4583aa6,0xbde55f24 - .long 0xbac00000,0x3fe8be05 - .long 0x7b2d7bf1,0x3de61778 - .long 0x16c00000,0x3fe8cf32 - .long 0x21aabc66,0xbdd576e8 - .long 0x5e400000,0x3fe8e06a - .long 0xae2294e0,0xbdfbcc93 - .long 0x99000000,0x3fe8f1ae - .long 0x2b982746,0x3de57736 - .long 0xd0000000,0x3fe902fe - .long 0x2b25950c,0x3df41645 - .long 0x0b800000,0x3fe9145b - .long 0x88a61b47,0x3de1ffc5 - .long 0x53800000,0x3fe925c3 - .long 0xecbaa05a,0x3df517f0 - .long 0xb0c00000,0x3fe93737 - .long 0xe8a0387e,0x3ddb8bc9 - .long 0x2b400000,0x3fe948b8 - .long 0xc478530d,0x3def98e4 - .long 0xcbc00000,0x3fe95a44 - .long 0xd36906d3,0x3dd0a41d - .long 0x9a400000,0x3fe96bdd - .long 0x7c8b4d30,0x3dfb3859 - .long 0x9fc00000,0x3fe97d82 - .long 0x8b9e9210,0x3dee4e4f - .long 0xe4800000,0x3fe98f33 - .long 0x8d509577,0xbdc77577 - .long 0x70c00000,0x3fe9a0f1 - .long 0x74621372,0x3dd40f73 - .long 0x4d400000,0x3fe9b2bb - .long 0x889ec6c8,0x3de3fe0c - .long 0x82800000,0x3fe9c491 - .long 0x0e3e2358,0x3df1f848 - .long 0x19400000,0x3fe9d674 - .long 0x574a0ae1,0x3dd771a9 - .long 0x19c00000,0x3fe9e863 - .long 0x8c12653c,0x3df19191 - .long 0x8d000000,0x3fe9fa5e - .long 0x5ab18aa8,0x3dcfca77 - .long 0x7b400000,0x3fea0c66 - .long 0xb29ada8c,0x3dede564 - .long 0xed800000,0x3fea1e7a - .long 0xe330c774,0x3ddd7176 - .long 0xec400000,0x3fea309b - .long 0xb182e3ef,0x3dd45a66 - .long 0x80400000,0x3fea42c9 - .long 0x5587fa76,0x3dc82b5e - .long 0xb2400000,0x3fea5503 - .long 0x4bdbb6e3,0xbdadaa37 - .long 0x8b000000,0x3fea674a - .long 0xeaf0a9d0,0xbdd73f5b - .long 0x13400000,0x3fea799e - .long 0x21a409aa,0xbdde994f - .long 0x53c00000,0x3fea8bfe - .long 0xc1e61351,0x3da2e58a - .long 0x55400000,0x3fea9e6b - .long 0xa1f5921e,0x3dfcfedf - .long 0x21400000,0x3feab0e5 - .long 0x9d8f3894,0xbdd5228b - .long 0xbfc00000,0x3feac36b - .long 0xc0db966a,0x3de3f379 - .long 0x3a400000,0x3fead5ff - .long 0x0218892a,0xbdbec45d - .long 0x99800000,0x3feae89f - .long 0x50bc6597,0xbdf29629 - .long 0xe6400000,0x3feafb4c - .long 0x52cbf03d,0xbded0d01 - .long 0x29800000,0x3feb0e07 - .long 0x2108559c,0x3ddb6ccb - .long 0x6c800000,0x3feb20ce - .long 0x53740928,0x3dea8952 - .long 0xb8800000,0x3feb33a2 - .long 0x84a0178c,0xbdf87502 - .long 0x15c00000,0x3feb4684 - .long 0x3eec7bd4,0xbdd16c9e - .long 0x8e000000,0x3feb5972 - .long 0x71c77eef,0xbdeaa6c6 - .long 0x2a000000,0x3feb6c6e - .long 0x6ab8656c,0xbddc75ab - .long 0xf3000000,0x3feb7f76 - .long 0x55613df9,0xbdc286e4 - .long 0xf2400000,0x3feb928c - .long 0x6dc85953,0xbde8b61c - .long 0x30c00000,0x3feba5b0 - .long 0x7bf34c39,0xbdeef9b6 - .long 0xb7c00000,0x3febb8e0 - .long 0x80fa968e,0xbdf2c870 - .long 0x90400000,0x3febcc1e - .long 0x48f741e9,0x3dd783a4 - .long 0xc4000000,0x3febdf69 - .long 0x0384c46c,0xbdd8bbf2 - .long 0x5c000000,0x3febf2c2 - .long 0xbdfb947f,0xbdf470fb - .long 0x61400000,0x3fec0628 - .long 0x4eb4abc1,0x3dab33cc - .long 0xdd800000,0x3fec199b - .long 0x88832c4b,0x3dc54a70 - .long 0xd9c00000,0x3fec2d1c - .long 0xd235d3d0,0x3dfd3295 - .long 0x60000000,0x3fec40ab - .long 0x75903ef8,0xbd77c2c9 - .long 0x79000000,0x3fec5447 - .long 0xed0f8db7,0xbdc41376 - .long 0x2e400000,0x3fec67f1 - .long 0x4a2137fd,0x3de7d14b - .long 0x89c00000,0x3fec7ba8 - .long 0x9e76bbbe,0xbdfb9b66 - .long 0x94000000,0x3fec8f6d - .long 0x46b2f122,0x3dcb9ed4 - .long 0x57400000,0x3feca340 - .long 0xd01a825e,0x3de1c4da - .long 0xdd000000,0x3fecb720 - .long 0xeafc342e,0xbde06f96 - .long 0x2e800000,0x3feccb0f - .long 0x1d220f86,0xbde2e98b - .long 0x55400000,0x3fecdf0b - .long 0xc44f8959,0x3dedc3f9 - .long 0x5b800000,0x3fecf315 - .long 0x3411d371,0xbdf22a46 - .long 0x4a000000,0x3fed072d - .long 0x343c8bc8,0x3dce25ee - .long 0x2b000000,0x3fed1b53 - .long 0xaab1b10d,0x3dd192d0 - .long 0x08000000,0x3fed2f87 - .long 0x15bc2473,0x3ddb13e3 - .long 0xeac00000,0x3fed43c8 - .long 0x9eda9dfb,0x3dd543ac - .long 0xdd000000,0x3fed5818 - .long 0x6897e945,0xbdc16de3 - .long 0xe8400000,0x3fed6c76 - .long 0x83fd0f49,0x3df17369 - .long 0x16c00000,0x3fed80e3 - .long 0x7709f3a1,0x3dd3072f - .long 0x72000000,0x3fed955d - .long 0xfd692233,0xbd93f152 - .long 0x04000000,0x3feda9e6 - .long 0x47b9ff2d,0xbdf266bd - .long 0xd6400000,0x3fedbe7c - .long 0xb76f1927,0xbdc5f3ad - .long 0xf3000000,0x3fedd321 - .long 0xb695de3c,0x3dab4604 - .long 0x64000000,0x3fede7d5 - .long 0x8d6ab5c6,0x3dec0657 - .long 0x33800000,0x3fedfc97 - .long 0x1a5cd4f2,0xbdc19285 - .long 0x6b000000,0x3fee1167 - .long 0xed4ad643,0x3de97d16 - .long 0x15000000,0x3fee2646 - .long 0xbdb13c0c,0xbdd4bdae - .long 0x3b000000,0x3fee3b33 - .long 0x982d6f38,0x3de6ee11 - .long 0xe7c00000,0x3fee502e - .long 0xec61767f,0xbdfa6004 - .long 0x24800000,0x3fee6539 - .long 0x2c7ff0ea,0xbde8928a - .long 0xfbc00000,0x3fee7a51 - .long 0x2d522ca1,0x3dcd320d - .long 0x77c00000,0x3fee8f79 - .long 0x77bb5bfa,0x3ddb6e7f - .long 0xa2c00000,0x3feea4af - .long 0x7a708c5e,0xbdeb6f26 - .long 0x86800000,0x3feeb9f4 - .long 0x6f9a1bae,0xbdb9ac8d - .long 0x2d800000,0x3feecf48 - .long 0x1b60625f,0x3ddccfe1 - .long 0xa2000000,0x3feee4aa - .long 0x471a3692,0x3de88510 - .long 0xee400000,0x3feefa1b - .long 0xbb8fe90d,0x3df0ad13 - .long 0x1cc00000,0x3fef0f9c - .long 0x99100329,0xbdd37dac - .long 0x37800000,0x3fef252b - .long 0xb1796904,0xbde44568 - .long 0x48c00000,0x3fef3ac9 - .long 0xe6a5a5c1,0x3ded7273 - .long 0x5b800000,0x3fef5076 - .long 0x98b07b49,0xbde1babf - .long 0x79800000,0x3fef6632 - .long 0xfd1bd9aa,0x3dd089f0 - .long 0xadc00000,0x3fef7bfd - .long 0x3b7625a0,0xbdf1a0f6 - .long 0x02400000,0x3fef91d8 - .long 0x08975454,0xbdebc377 - .long 0x81c00000,0x3fefa7c1 - .long 0xe8b7ac0c,0xbdf0b793 - .long 0x36800000,0x3fefbdba - .long 0xe6988ceb,0x3de2d513 - .long 0x2b800000,0x3fefd3c2 - .long 0x12eb7496,0x3ddee3e2 - .long 0x6b400000,0x3fefe9d9 - .long 0xeb59fc8c,0xbde5dc26 - .long 0x00000000,0x3ff00000 - .long 0x00000000,0x00000000 - .long 0xfa600000,0x3ff00b1a - .long 0xa7b5953b,0xbdd50d04 - .long 0xaa000000,0x3ff0163d - .long 0x49ed6654,0xbdd3332a - .long 0x14400000,0x3ff02168 - .long 0x95f9887e,0xbdd3f5fc - .long 0x3e800000,0x3ff02c9a - .long 0x232106a7,0xbde0ff3e - .long 0x2e200000,0x3ff037d4 - .long 0xea97ee11,0xbdec8867 - .long 0xe8800000,0x3ff04315 - .long 0x428c7066,0xbdf1807b - .long 0x73000000,0x3ff04e5f - .long 0xacf21b15,0xbde3569d - .long 0xd3200000,0x3ff059b0 - .long 0x8a30756e,0xbde4f517 - .long 0x0e400000,0x3ff0650a - .long 0xb96f6af3,0xbdcf03ba - .long 0x29e00000,0x3ff0706b - .long 0xc91dfe2b,0xbdc04911 - .long 0x2b800000,0x3ff07bd4 - .long 0xb3732eaf,0xbdeaaf93 - .long 0x18800000,0x3ff08745 - .long 0xee7941b4,0xbde4c86f - .long 0xf6600000,0x3ff092bd - .long 0x97f9c7ff,0x3dd81f7e - .long 0xcac00000,0x3ff09e3e - .long 0x14878183,0x3ddbce0d - .long 0x9b200000,0x3ff0a9c7 - .long 0x8ba4de31,0xbda8dcda - .long 0x6d000000,0x3ff0b558 - .long 0x759d1b52,0xbdd9dbc2 - .long 0x45e00000,0x3ff0c0f1 - .long 0x4f98906d,0x3dd1b215 - .long 0x2b600000,0x3ff0cc92 - .long 0x407b705c,0x3df247f7 - .long 0x23400000,0x3ff0d83b - .long 0xbc14de44,0xbdda8851 - .long 0x32e00000,0x3ff0e3ec - .long 0xfbf17a36,0xbde85cbb - .long 0x5fe00000,0x3ff0efa5 - .long 0x9db9bc54,0xbd958ed4 - .long 0xb0000000,0x3ff0fb66 - .long 0xdcdf6e22,0xbdb2ce50 - .long 0x28c00000,0x3ff10730 - .long 0x3a8dd62d,0x3df7233e - .long 0xd0200000,0x3ff11301 - .long 0xb62881ca,0xbdeb495e - .long 0xab600000,0x3ff11edb - .long 0x29153dc1,0xbdbd54a7 - .long 0xc0600000,0x3ff12abd - .long 0xf72575a6,0x3de86397 - .long 0x14e00000,0x3ff136a8 - .long 0xf477b823,0x3df204aa - .long 0xaea00000,0x3ff1429a - .long 0x66820328,0x3de25bbf - .long 0x93600000,0x3ff14e95 - .long 0x3723d073,0xbdf0ced2 - .long 0xc8a00000,0x3ff15a98 - .long 0x920355cf,0x3dd63944 - .long 0x54600000,0x3ff166a4 - .long 0x063c8ee1,0x3df1c3c2 - .long 0x3c800000,0x3ff172b8 - .long 0x19041b9d,0xbdc57429 - .long 0x86a00000,0x3ff17ed4 - .long 0xdec3803b,0xbde4887f - .long 0x38800000,0x3ff18af9 - .long 0x777ee173,0x3de91bd3 - .long 0x58400000,0x3ff19726 - .long 0x5aa913d0,0xbde145a1 - .long 0xeb600000,0x3ff1a35b - .long 0x796d31ed,0x3def96ea - .long 0xf8200000,0x3ff1af99 - .long 0x4203d2da,0xbde8ebc7 - .long 0x84000000,0x3ff1bbe0 - .long 0x6ac79cad,0x3dd1734e - .long 0x95200000,0x3ff1c82f - .long 0x804bbc01,0x3de038d6 - .long 0x31800000,0x3ff1d487 - .long 0x87fa47fd,0xbdf74655 - .long 0x5ec00000,0x3ff1e0e7 - .long 0xb7eec044,0xbde77fb2 - .long 0x23000000,0x3ff1ed50 - .long 0x3bf3004f,0xbdc9371a - .long 0x84400000,0x3ff1f9c1 - .long 0xbf524a09,0xbddcc6cd - .long 0x88600000,0x3ff2063b - .long 0xdc775815,0x3dc466b1 - .long 0x35600000,0x3ff212be - .long 0x4d64b4b4,0x3df8a819 - .long 0x91800000,0x3ff21f49 - .long 0xd56816b7,0xbdc11b4e - .long 0xa2800000,0x3ff22bdd - .long 0x16582554,0xbddbb4bb - .long 0x6e800000,0x3ff2387a - .long 0x327c0a4a,0xbde53b8f - .long 0xfba00000,0x3ff2451f - .long 0xca6066de,0xbdfdebf5 - .long 0x4fc00000,0x3ff251ce - .long 0x94faa904,0xbdeab381 - .long 0x71200000,0x3ff25e85 - .long 0x07976d4f,0xbdb318ab - .long 0x65e00000,0x3ff26b45 - .long 0x2bd33994,0x3dc3e6e9 - .long 0x34200000,0x3ff2780e - .long 0x3f307f41,0xbdc106b4 - .long 0xe1e00000,0x3ff284df - .long 0x96cf15cf,0x3df56380 - .long 0x75800000,0x3ff291ba - .long 0xda671baf,0x3df1bb6f - .long 0xf5200000,0x3ff29e9d - .long 0xed175053,0xbd808f69 - .long 0x66c00000,0x3ff2ab8a - .long 0x9aa2f39c,0x3df10f12 - .long 0xd0e00000,0x3ff2b87f - .long 0x08856e6b,0xbdd499c0 - .long 0x39600000,0x3ff2c57e - .long 0xabfae964,0x3df71b2e - .long 0xa7000000,0x3ff2d285 - .long 0xbff6e2ad,0xbdfbfcf4 - .long 0x1f600000,0x3ff2df96 - .long 0xd16cffbc,0x3dd05625 - .long 0xa9400000,0x3ff2ecaf - .long 0xe35f0ba3,0xbdbd0a9e - .long 0x4ac00000,0x3ff2f9d2 - .long 0x54f1554d,0xbdc3bca8 - .long 0x0a200000,0x3ff306fe - .long 0x2de8d5a4,0x3df1b715 - .long 0xee000000,0x3ff31432 - .long 0xcd4cb818,0xbdf14d02 - .long 0xfc400000,0x3ff32170 - .long 0x6a739e38,0x3de9b062 - .long 0x3ba00000,0x3ff32eb8 - .long 0x1dd0be1a,0x3de1d463 - .long 0xb2600000,0x3ff33c08 - .long 0x32721843,0x3dd05bfd - .long 0x66e00000,0x3ff34962 - .long 0xca58a6cf,0x3dcfd166 - .long 0x5fa00000,0x3ff356c5 - .long 0x6d73b971,0xbdeac01e - .long 0xa2e00000,0x3ff36431 - .long 0x8628940e,0xbdb77c53 - .long 0x37400000,0x3ff371a7 - .long 0x63aeabf4,0xbdd558d5 - .long 0x23200000,0x3ff37f26 - .long 0x7d72a7b4,0xbdb8ab66 - .long 0x6d000000,0x3ff38cae - .long 0x16a72c36,0x3dd76196 - .long 0x1b800000,0x3ff39a40 - .long 0xcd4d2fe4,0xbded7e22 - .long 0x34e00000,0x3ff3a7db - .long 0xa86f24a6,0x3dd67fdb - .long 0xc0000000,0x3ff3b57f - .long 0xaace6476,0xbdf3930b - .long 0xc3200000,0x3ff3c32d - .long 0xf7ffc1bb,0xbde8ae36 - .long 0x44e00000,0x3ff3d0e5 - .long 0x3fd1a118,0x3debc2e6 - .long 0x4c200000,0x3ff3dea6 - .long 0x9497dbb8,0xbdeb97bb - .long 0xdf200000,0x3ff3ec70 - .long 0xaf6637b9,0xbdcd7459 - .long 0x04a00000,0x3ff3fa45 - .long 0x417ee035,0x3de90037 - .long 0xc3600000,0x3ff40822 - .long 0xdeefc5b8,0x3dde8090 - .long 0x22000000,0x3ff4160a - .long 0x0f79b48e,0xbde1a3ac - .long 0x27000000,0x3ff423fb - .long 0x3dce91fa,0x3de28d13 - .long 0xd9600000,0x3ff431f5 - .long 0x471f778d,0xbdeeaed2 - .long 0x3f800000,0x3ff43ffa - .long 0xc405f4b8,0x3dd2e750 - .long 0x60600000,0x3ff44e08 - .long 0x3136f40a,0x3db892d0 - .long 0x42a00000,0x3ff45c20 - .long 0xcf37ccfa,0x3ddf48c7 - .long 0xed200000,0x3ff46a41 - .long 0x6d7685d3,0xbdc7fd44 - .long 0x66800000,0x3ff4786d - .long 0x1ef87896,0x3de6646d - .long 0xb5c00000,0x3ff486a2 - .long 0x3c1a3b69,0x3db3cd01 - .long 0xe1a00000,0x3ff494e1 - .long 0x4eca2579,0xbdeaa25c - .long 0xf0e00000,0x3ff4a32a - .long 0x31a4e861,0xbde05843 - .long 0xea800000,0x3ff4b17d - .long 0x224b70fe,0xbdf24829 - .long 0xd5400000,0x3ff4bfda - .long 0xc578d0a0,0xbde3abb1 - .long 0xb8000000,0x3ff4ce41 - .long 0x4178a5a4,0x3df7c114 - .long 0x9a000000,0x3ff4dcb2 - .long 0xe2648873,0xbdc11794 - .long 0x81e00000,0x3ff4eb2d - .long 0x5257d2e6,0xbddd5005 - .long 0x76a00000,0x3ff4f9b2 - .long 0x96613a4b,0xbdc69aca - .long 0x7f400000,0x3ff50841 - .long 0x68926d27,0x3dd4c7b8 - .long 0xa2c00000,0x3ff516da - .long 0x8225ea59,0x3deecc83 - .long 0xe8400000,0x3ff5257d - .long 0x9331a87e,0xbda62223 - .long 0x56a00000,0x3ff5342b - .long 0x07abe1db,0xbdc583f1 - .long 0xf4e00000,0x3ff542e2 - .long 0x2f24da32,0x3df6ad27 - .long 0xca600000,0x3ff551a4 - .long 0xd689ceff,0xbdc36f89 - .long 0xde000000,0x3ff56070 - .long 0x43edb85a,0xbdf6ef2e - .long 0x36800000,0x3ff56f47 - .long 0x33765802,0x3e0a93ed - .long 0xdbc00000,0x3ff57e27 - .long 0x5e8ce6eb,0x3e016267 - .long 0xd4800000,0x3ff58d12 - .long 0x252bc2b7,0x3df7c7fd - .long 0x28000000,0x3ff59c08 - .long 0xf1677234,0xbdaf068b - .long 0xdd400000,0x3ff5ab07 - .long 0xb192602a,0x3de0a852 - .long 0xfb800000,0x3ff5ba11 - .long 0x4910bd68,0x3e043d01 - .long 0x8a400000,0x3ff5c926 - .long 0x01c4b1b8,0x3df946b7 - .long 0x90800000,0x3ff5d845 - .long 0x8ca5615d,0x3df98b92 - .long 0x15800000,0x3ff5e76f - .long 0x374df261,0x3e0690a4 - .long 0x20c00000,0x3ff5f6a3 - .long 0xcc2a4438,0x3dfceb70 - .long 0xb9800000,0x3ff605e1 - .long 0x9f1214db,0xbde247ee - .long 0xe6c00000,0x3ff6152a - .long 0xf259f256,0x3debede8 - .long 0xb0400000,0x3ff6247e - .long 0x383c17e4,0xbdd6a9ed - .long 0x1d000000,0x3ff633dd - .long 0x611c42fb,0x3df929fd - .long 0x34c00000,0x3ff64346 - .long 0x8edf0e2a,0x3de9863f - .long 0xfec00000,0x3ff652b9 - .long 0x5c7ab935,0xbdcb824b - .long 0x82400000,0x3ff66238 - .long 0x9127d9e3,0x3df52224 - .long 0xc7000000,0x3ff671c1 - .long 0x85e3369e,0x3de067eb - .long 0xd4400000,0x3ff68155 - .long 0x1038ae45,0x3de952e6 - .long 0xb1c00000,0x3ff690f4 - .long 0xe7fb4265,0xbe00b563 - .long 0x66800000,0x3ff6a09e - .long 0xee9a09d9,0xbda8866d - .type __libm_expl_table_256,@object - .size __libm_expl_table_256,4112 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1_gen.S deleted file mode 100644 index bc4160aadc..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1_gen.S +++ /dev/null @@ -1,387 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expm1_gen.c" - .text -..TXTST0: -# -- Begin expm1 - .text - .align 16,0x90 - .globl expm1 -expm1: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_expm1.1: -..L2: - - lea _range(%rip), %rsi - movsd %xmm0, -24(%rsp) - movl -20(%rsp), %edx - movl %edx, %eax - shrl $31, %edx - andl $2147483647, %eax - cmpl 4(%rsi,%rdx,8), %eax - jb ..B1.4 -..B1.2: - jne ..B1.20 -..B1.3: - movl -24(%rsp), %ecx - cmpl (%rsi,%rdx,8), %ecx - ja ..B1.20 -..B1.4: - cmpl $1064304640, %eax - jae ..B1.13 -..B1.5: - cmpl $1012924416, %eax - jae ..B1.12 -..B1.6: - cmpl $1048576, %eax - jb ..B1.8 -..B1.7: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - addsd -24(%rsp), %xmm0 - ret -..B1.8: - movl -24(%rsp), %edx - orl %edx, %eax - je ..B1.10 -..B1.9: - lea _small_value_64(%rip), %rax - movsd -24(%rsp), %xmm0 - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm1 - movsd %xmm1, -16(%rsp) - addsd %xmm1, %xmm0 - ret -..B1.10: - movsd -24(%rsp), %xmm0 -..B1.11: - ret -..B1.12: - movsd -24(%rsp), %xmm0 - movaps %xmm0, %xmm3 - mulsd %xmm0, %xmm3 - movsd .L_2il0floatpacket.4(%rip), %xmm4 - movsd .L_2il0floatpacket.6(%rip), %xmm1 - mulsd %xmm3, %xmm4 - mulsd %xmm3, %xmm1 - addsd .L_2il0floatpacket.5(%rip), %xmm4 - addsd .L_2il0floatpacket.7(%rip), %xmm1 - mulsd %xmm3, %xmm4 - mulsd %xmm0, %xmm1 - movsd .L_2il0floatpacket.8(%rip), %xmm2 - addsd %xmm1, %xmm4 - movsd %xmm3, -8(%rsp) - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm3, %xmm4 - addsd %xmm4, %xmm0 - ret -..B1.13: - movsd -24(%rsp), %xmm1 - lea _TWO_52H(%rip), %rcx - movaps %xmm1, %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd (%rcx), %xmm2 - movsd .L_2il0floatpacket.1(%rip), %xmm3 - addsd %xmm2, %xmm0 - movsd %xmm0, -16(%rsp) - movsd -16(%rsp), %xmm5 - movsd .L_2il0floatpacket.2(%rip), %xmm4 - subsd %xmm2, %xmm5 - mulsd %xmm5, %xmm3 - mulsd %xmm4, %xmm5 - subsd %xmm3, %xmm1 - movaps %xmm1, %xmm8 - movsd .L_2il0floatpacket.9(%rip), %xmm6 - subsd %xmm5, %xmm8 - movsd .L_2il0floatpacket.3(%rip), %xmm7 - movaps %xmm8, %xmm9 - movl -16(%rsp), %esi - movl %esi, %edi - shll $25, %edi - addsd %xmm8, %xmm6 - subsd %xmm8, %xmm1 - movsd %xmm6, -8(%rsp) - subsd %xmm5, %xmm1 - movl $0, -8(%rsp) - addsd %xmm1, %xmm9 - movsd -8(%rsp), %xmm6 - sarl $25, %edi - addsd %xmm6, %xmm7 - subl %edi, %esi - subsd %xmm7, %xmm8 - movslq %edi, %rdi - addsd %xmm8, %xmm1 - shrl $7, %esi - shlq $4, %rdi - movq __libm_exp_table_128@GOTPCREL(%rip), %r8 - cmpl $1078204908, -20(%rsp) - jle ..B1.15 -..B1.14: - movaps %xmm9, %xmm3 - lea SC2_BIAS(%rip), %rax - movsd .L_2il0floatpacket.4(%rip), %xmm4 - movsd .L_2il0floatpacket.6(%rip), %xmm0 - movsd .L_2il0floatpacket.8(%rip), %xmm2 - mulsd %xmm9, %xmm3 - mulsd %xmm3, %xmm4 - mulsd %xmm3, %xmm0 - addsd .L_2il0floatpacket.5(%rip), %xmm4 - addsd .L_2il0floatpacket.7(%rip), %xmm0 - mulsd %xmm3, %xmm4 - mulsd %xmm9, %xmm0 - movsd 1032(%r8,%rdi), %xmm5 - addsd %xmm0, %xmm4 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm3 - movslq (%rax,%rdx,4), %rcx - addsd %xmm3, %xmm4 - addq %rsi, %rcx - addsd %xmm4, %xmm1 - movaps %xmm1, %xmm0 - addsd %xmm6, %xmm1 - mulsd %xmm5, %xmm0 - mulsd %xmm6, %xmm5 - mulsd 1024(%r8,%rdi), %xmm1 - shlq $52, %rcx - addsd %xmm1, %xmm0 - movq %rcx, -24(%rsp) - addsd %xmm5, %xmm0 - mulsd -24(%rsp), %xmm0 - lea _SC2(%rip), %rsi - mulsd (%rsi,%rdx,8), %xmm0 - ret -..B1.15: - movaps %xmm9, %xmm3 - movq $0x3ff0000000000000, %rdx - mulsd %xmm9, %xmm3 - addl $-1078081678, %eax - movsd .L_2il0floatpacket.4(%rip), %xmm4 - movsd .L_2il0floatpacket.6(%rip), %xmm0 - mulsd %xmm3, %xmm4 - mulsd %xmm3, %xmm0 - addsd .L_2il0floatpacket.5(%rip), %xmm4 - addsd .L_2il0floatpacket.7(%rip), %xmm0 - mulsd %xmm3, %xmm4 - mulsd %xmm9, %xmm0 - movsd .L_2il0floatpacket.8(%rip), %xmm2 - addsd %xmm0, %xmm4 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm3 - movsd 1032(%r8,%rdi), %xmm5 - addsd %xmm3, %xmm4 - shlq $52, %rsi - addsd %xmm4, %xmm1 - movaps %xmm1, %xmm0 - addq %rdx, %rsi - mulsd %xmm5, %xmm0 - addsd %xmm6, %xmm1 - mulsd %xmm6, %xmm5 - mulsd 1024(%r8,%rdi), %xmm1 - movq %rsi, -24(%rsp) - cmpl $216675, %eax - addsd %xmm1, %xmm0 - movsd -24(%rsp), %xmm1 - mulsd %xmm1, %xmm5 - mulsd %xmm1, %xmm0 - ja ..B1.17 -..B1.16: - movsd .L_2il0floatpacket.9(%rip), %xmm1 - subsd %xmm1, %xmm0 - jmp ..B1.18 -..B1.17: - movsd .L_2il0floatpacket.9(%rip), %xmm1 - movaps %xmm5, %xmm2 - movaps %xmm1, %xmm3 - subsd %xmm1, %xmm5 - movsd %xmm5, -8(%rsp) - addsd %xmm5, %xmm3 - subsd %xmm2, %xmm3 - subsd %xmm3, %xmm0 -..B1.18: - addsd %xmm5, %xmm0 -..B1.19: - ret -..B1.20: - cmpl $2146435072, %eax - jae ..B1.24 -..B1.21: - testq %rdx, %rdx - je ..B1.28 -..B1.22: - lea _small_value_64(%rip), %rax - movsd .L_2il0floatpacket.3(%rip), %xmm0 - addsd (%rax), %xmm0 -..B1.23: - ret -..B1.24: - addl $-2146435072, %eax - orl -24(%rsp), %eax - jne ..B1.26 -..B1.25: - lea _inf_none(%rip), %rax - movsd (%rax,%rdx,8), %xmm0 - ret -..B1.26: - movsd -24(%rsp), %xmm0 -..B1.27: - ret -..B1.28: - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type expm1,@function - .size expm1,.-expm1 - .data -# -- End expm1 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 4 -_range: - .long 4277811695 - .long 1082535490 - .long 2669343409 - .long 1078159482 - .type _range,@object - .size _range,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -SC2_BIAS: - .long 511 - .long 1535 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_SC2: - .long 0 - .long 1609564160 - .long 0 - .long 535822336 - .type _SC2,@object - .size _SC2,16 - .align 4 -_inf_none: - .long 0 - .long 2146435072 - .long 0 - .long 3220176896 - .type _inf_none,@object - .size _inf_none,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1f_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1f_gen.S deleted file mode 100644 index dabc16b0b7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1f_gen.S +++ /dev/null @@ -1,348 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expm1f_gen.c" - .text -..TXTST0: -# -- Begin expm1f - .text - .align 16,0x90 - .globl expm1f -expm1f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_expm1f.1: -..L2: - - movd %xmm0, %eax - movss %xmm0, -8(%rsp) - movl %eax, %ecx - andl $2147483647, %ecx - cmpl $1118652779, %ecx - jae ..B1.12 -..B1.2: - cmpl $1040187392, %ecx - jae ..B1.11 -..B1.3: - cmpl $838860800, %ecx - jae ..B1.10 -..B1.4: - cmpl $8388608, %ecx - jb ..B1.6 -..B1.5: - movss .L_2il0floatpacket.15(%rip), %xmm1 - mulss %xmm1, %xmm1 - addss %xmm1, %xmm0 - ret -..B1.6: - testl %ecx, %ecx - je ..B1.8 -..B1.7: - movss .L_2il0floatpacket.15(%rip), %xmm0 - pxor %xmm2, %xmm2 - mulss %xmm0, %xmm0 - pxor %xmm1, %xmm1 - cvtss2sd -8(%rsp), %xmm2 - cvtss2sd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm1 - addsd %xmm0, %xmm2 - pxor %xmm0, %xmm0 - movss %xmm1, -16(%rsp) - cvtsd2ss %xmm2, %xmm0 - ret -..B1.8: - movss -8(%rsp), %xmm0 -..B1.9: - ret -..B1.10: - movss -8(%rsp), %xmm1 - movaps %xmm1, %xmm0 - mulss %xmm1, %xmm0 - cvtss2sd %xmm1, %xmm1 - cvtss2sd %xmm0, %xmm0 - movsd .L_2il0floatpacket.9(%rip), %xmm3 - mulsd %xmm0, %xmm3 - movsd .L_2il0floatpacket.12(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.10(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.13(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.11(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd .L_2il0floatpacket.14(%rip), %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm0, %xmm2 - addsd %xmm2, %xmm3 - addsd %xmm1, %xmm3 - cvtsd2ss %xmm3, %xmm3 - movaps %xmm3, %xmm0 - ret -..B1.11: - pxor %xmm3, %xmm3 - pxor %xmm6, %xmm6 - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - movq __libm_expf_table_64@GOTPCREL(%rip), %rcx - addsd .L_2il0floatpacket.1(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm1 - movsd .L_2il0floatpacket.4(%rip), %xmm0 - movl -16(%rsp), %edx - movl %edx, %eax - shll $26, %eax - subss .L_2il0floatpacket.2(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - mulsd .L_2il0floatpacket.3(%rip), %xmm1 - sarl $26, %eax - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm0 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm3, %xmm4 - movslq %eax, %rax - addsd %xmm4, %xmm0 - movsd 256(%rcx,%rax,8), %xmm5 - subl %eax, %edx - mulsd %xmm5, %xmm0 - shrl $6, %edx - addsd %xmm5, %xmm0 - shll $23, %edx - addl $1065353216, %edx - movl %edx, -24(%rsp) - cvtss2sd -24(%rsp), %xmm6 - mulsd %xmm6, %xmm0 - addsd .L_2il0floatpacket.8(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.12: - lea range(%rip), %rdx - shrl $31, %eax - cmpl (%rdx,%rax,4), %ecx - jb ..B1.21 -..B1.13: - cmpl $2139095040, %ecx - jae ..B1.17 -..B1.14: - testq %rax, %rax - je ..B1.22 -..B1.15: - movss .L_2il0floatpacket.16(%rip), %xmm0 -..B1.16: - ret -..B1.17: - jne ..B1.19 -..B1.18: - lea _inf_none(%rip), %rdx - movss (%rdx,%rax,4), %xmm0 - ret -..B1.19: - movss -8(%rsp), %xmm0 -..B1.20: - ret -..B1.21: - pxor %xmm3, %xmm3 - movq $0x3ff0000000000000, %rcx - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - movq __libm_expf_table_64@GOTPCREL(%rip), %rsi - addsd .L_2il0floatpacket.1(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm1 - movsd .L_2il0floatpacket.4(%rip), %xmm0 - movl -16(%rsp), %edx - andl $4194303, %edx - subss .L_2il0floatpacket.2(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - mulsd .L_2il0floatpacket.3(%rip), %xmm1 - movl %edx, %eax - shll $26, %eax - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm0 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm3, %xmm4 - sarl $26, %eax - addsd %xmm4, %xmm0 - movslq %eax, %rax - subl %eax, %edx - shrl $6, %edx - movsd 256(%rsi,%rax,8), %xmm5 - mulsd %xmm5, %xmm0 - shlq $52, %rdx - addsd %xmm5, %xmm0 - addq %rcx, %rdx - movq %rdx, -24(%rsp) - mulsd -24(%rsp), %xmm0 - addsd .L_2il0floatpacket.8(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.22: - movss .L_2il0floatpacket.17(%rip), %xmm0 - mulss %xmm0, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type expm1f,@function - .size expm1f,.-expm1f - .data -# -- End expm1f - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40571547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x41680000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.3: - .long 0xfefa39ef,0xbf862e42 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xeb78fa85,0x3fa56420 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x008d6118,0x3fe00000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xda752d4f,0x3fc55550 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0xffffe7c6,0x3fefffff - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0xd2809cf8,0x3f2a04e1 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0xeb5ecfe9,0x3f811110 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x55579a3a,0x3fc55555 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x9843cb2c,0x3f56c445 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x27a9b288,0x3fa55555 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0x00016df6,0x3fe00000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 4 -.L_2il0floatpacket.2: - .long 0x4b400000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.15: - .long 0x0d800000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,4 - .align 4 -.L_2il0floatpacket.16: - .long 0xbf800000 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,4 - .align 4 -.L_2il0floatpacket.17: - .long 0x71800000 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,4 - .align 4 -range: - .long 1118925336 - .long 1107296256 - .type range,@object - .size range,8 - .align 4 -_inf_none: - .long 2139095040 - .long 3212836864 - .type _inf_none,@object - .size _inf_none,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1l.S deleted file mode 100644 index c56ed2c280..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/expm1l.S +++ /dev/null @@ -1,1156 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "expm1l.c" - .text -..TXTST0: -# -- Begin expm1l - .text - .align 16,0x90 - .globl expm1l -expm1l: -# parameter 1: 160 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_expm1l.1: -..L2: - - subq $152, %rsp - .cfi_def_cfa_offset 160 - xorb %dil, %dil -..B1.2: - fnstcw 146(%rsp) -..B1.3: - movb 169(%rsp), %cl - lea _ranges(%rip), %r8 - andb $-128, %cl - shrb $7, %cl - movzbl %cl, %esi - movq %rsi, %rdx - shlq $4, %rdx - movzwl 168(%rsp), %ecx - andl $32767, %ecx - movzwl 8(%rdx,%r8), %eax - andl $32767, %eax - cmpl %eax, %ecx - jl ..B1.8 -..B1.4: - jne ..B1.63 -..B1.5: - movl 164(%rsp), %eax - cmpl 4(%rdx,%r8), %eax - jb ..B1.8 -..B1.6: - jne ..B1.63 -..B1.7: - movl 160(%rsp), %eax - cmpl (%rdx,%r8), %eax - jae ..B1.63 -..B1.8: - cmpl $16381, %ecx - jge ..B1.49 -..B1.9: - movzwl 146(%rsp), %edx - cmpl $16370, %ecx - jge ..B1.42 -..B1.10: - cmpl $16359, %ecx - jge ..B1.35 -..B1.11: - cmpl $16345, %ecx - jge ..B1.28 -..B1.12: - cmpl $16308, %ecx - jge ..B1.22 -..B1.13: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.17 -..B1.14: - orl $-64768, %edx - movw %dx, 144(%rsp) -..B1.15: - fldcw 144(%rsp) -..B1.16: - movzwl 168(%rsp), %ecx - movb $1, %dil - andl $32767, %ecx -..B1.17: - testl %ecx, %ecx - jle ..B1.73 -..B1.18: - fldt 160(%rsp) - lea _TWO_75(%rip), %rax - lea ones(%rip), %rdx - lea 8+_TWO_75(%rip), %rcx - fldl (%rax) - fmul %st(1), %st - fxch %st(1) - fmull (%rdx,%rsi,8) - faddp %st, %st(1) - fmull (%rcx) - fstpt 16(%rsp) -..B1.19: - testb %dil, %dil - je ..B1.21 -..B1.20: - fldcw 146(%rsp) -..B1.21: - fldt 16(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 -..B1.22: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.77 -..B1.23: - orl $-64768, %edx - movw %dx, 144(%rsp) -..B1.24: - fldcw 144(%rsp) -..B1.25: - fldt 160(%rsp) - lea _Q3(%rip), %rax - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) -..B1.26: - fldcw 146(%rsp) -..B1.27: - fldt 16(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 -..B1.28: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.32 -..B1.29: - orl $-64768, %edx - movw %dx, 144(%rsp) -..B1.30: - fldcw 144(%rsp) -..B1.31: - movb $1, %dil -..B1.32: - fldt 160(%rsp) - lea 16+_Q2(%rip), %rax - lea _Q2(%rip), %rdx - testb %dil, %dil - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fldt (%rdx) - fmul %st(2), %st - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.34 -..B1.33: - fldcw 146(%rsp) -..B1.34: - fldt 16(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 -..B1.35: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.39 -..B1.36: - orl $-64768, %edx - movw %dx, 144(%rsp) -..B1.37: - fldcw 144(%rsp) -..B1.38: - movb $1, %dil -..B1.39: - fldt 160(%rsp) - lea 48+_Q1(%rip), %rax - fld %st(0) - lea 32+_Q1(%rip), %rcx - fmul %st(1), %st - lea 16+_Q1(%rip), %rdx - fldt (%rax) - lea _Q1(%rip), %rsi - fmul %st(1), %st - testb %dil, %dil - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - fmulp %st, %st(2) - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.41 -..B1.40: - fldcw 146(%rsp) -..B1.41: - fldt 16(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 -..B1.42: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.46 -..B1.43: - orl $-64768, %edx - movw %dx, 144(%rsp) -..B1.44: - fldcw 144(%rsp) -..B1.45: - movb $1, %dil -..B1.46: - fldt 160(%rsp) - lea _TWO_54H(%rip), %rax - fld %st(0) - fld %st(1) - fld %st(2) - lea 208+_Q(%rip), %r8 - lea 240+_Q(%rip), %rcx - lea 176+_Q(%rip), %r9 - fld %st(3) - lea 224+_Q(%rip), %rsi - fldl (%rax) - lea 144+_Q(%rip), %r10 - fmul %st(5), %st - lea 112+_Q(%rip), %r11 - lea 80+_Q(%rip), %rax - lea 256+_Q(%rip), %rdx - testb %dil, %dil - fadd %st, %st(4) - fxch %st(4) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(4) - fld %st(3) - fld %st(4) - fmul %st(5), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(4) - fsub %st(5), %st - fmul %st, %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fadd %st(4), %st - fxch %st(5) - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fstpt 96(%rsp) - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt (%rdx) - lea 48+_Q(%rip), %rdx - fmul %st, %st(2) - fldt (%rcx) - lea 16+_Q(%rip), %rcx - fstpt 112(%rsp) - fldt (%rsi) - lea 192+_Q(%rip), %rsi - fstpt 128(%rsp) - fldt (%r8) - lea 160+_Q(%rip), %r8 - fmul %st(4), %st - fldt (%r9) - lea 128+_Q(%rip), %r9 - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r10) - lea 96+_Q(%rip), %r10 - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r11) - lea 64+_Q(%rip), %r11 - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rax) - lea 32+_Q(%rip), %rax - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rdx) - lea _Q(%rip), %rdx - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rsi) - fmul %st(5), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt (%rdx) - faddp %st, %st(5) - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fldt 112(%rsp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldt 128(%rsp) - fld %st(0) - fldt 64(%rsp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(5) - fxch %st(4) - fmul %st(5), %st - fldt 96(%rsp) - fmulp %st, %st(4) - fldt 80(%rsp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt 48(%rsp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fmul %st(2), %st - fxch %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(3) - fxch %st(3) - fstpt 160(%rsp) - fldt 160(%rsp) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - je ..B1.48 -..B1.47: - fldt 16(%rsp) - fstpt 48(%rsp) -..B1.85: - fldcw 146(%rsp) -..B1.48: - fldt 32(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 -..B1.49: - movzwl 146(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.53 -..B1.50: - orl $-64768, %edx - movw %dx, 144(%rsp) -..B1.51: - fldcw 144(%rsp) -..B1.52: - movzwl 168(%rsp), %ecx - movb $1, %dil - andl $32767, %ecx -..B1.53: - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %rax - fstpt 32(%rsp) - lea _TWO_32H(%rip), %r8 - fldt 160(%rsp) - cmpl $16396, %ecx - fldt .L_2il0floatpacket.1(%rip) - fmul %st(1), %st - fldl (%rax) - movzwl 8+.L_2il0floatpacket.0(%rip), %r9d - fadd %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fsubp %st, %st(1) - fldt .L_2il0floatpacket.2(%rip) - fmul %st(1), %st - movl 48(%rsp), %eax - fsubrp %st, %st(2) - fld %st(1) - fldt .L_2il0floatpacket.3(%rip) - fmulp %st, %st(2) - movsbq %al, %rdx - fsub %st(1), %st - fldl (%r8) - fadd %st, %st(1) - fsubr %st(1), %st - fsubr %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - jge ..B1.60 -..B1.54: - fld %st(1) - subl %edx, %eax - shrl $8, %eax - andl $-32768, %r9d - addl $16383, %eax - lea 32+_P(%rip), %r8 - andl $32767, %eax - lea 48+_P(%rip), %r10 - orl %eax, %r9d - lea 64+_P(%rip), %rax - movw %r9w, 40(%rsp) - lea _P(%rip), %r9 - lea 16+_P(%rip), %r11 - fadd %st(3), %st - fld %st(0) - fmul %st(1), %st - fldt (%rax) - fmul %st(1), %st - fldt (%r8) - shlq $4, %rdx - faddp %st, %st(1) - fmul %st(1), %st - testq %rsi, %rsi - fldt (%r9) - movq __libm_expl_table_256@GOTPCREL(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(3) - fldl 2048(%rax,%rdx) - fld %st(0) - fmul %st(4), %st - fxch %st(3) - fadd %st, %st(4) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(4) - fmull 2056(%rax,%rdx) - faddp %st, %st(3) - fldt 32(%rsp) - fmul %st, %st(4) - fxch %st(1) - faddl 2056(%rax,%rdx) - faddp %st, %st(3) - fmulp %st, %st(2) - je ..B1.56 -..B1.55: - fldt .L_2il0floatpacket.4(%rip) - fadd %st(3), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fldt .L_2il0floatpacket.0(%rip) - faddp %st, %st(1) - fsubp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(1) - jmp ..B1.57 -..B1.56: - movzbl 169(%rsp), %edx - xorl %esi, %esi - shrl $7, %edx - lea zero_one(%rip), %r8 - shll $15, %edx - orl %ecx, %edx - shll $16, %edx - movzwl 166(%rsp), %eax - orl %eax, %edx - cmpl $1074049228, %edx - setb %sil - fldl (%r8,%rsi,8) - xorl $1, %esi - fsubrp %st, %st(3) - fxch %st(2) - fstpt 16(%rsp) - fsubl (%r8,%rsi,8) -..B1.57: - fldt 16(%rsp) - testb %dil, %dil - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.88 -..B1.58: - fstpt 48(%rsp) -..B1.86: - fldcw 146(%rsp) - jmp ..B1.59 -..B1.88: - fstp %st(0) -..B1.59: - fldt 16(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 -..B1.60: - fld %st(1) - subl %edx, %eax - shrl $8, %eax - lea 32+_P(%rip), %rsi - addl $8191, %eax - lea _P(%rip), %r8 - movzwl 40(%rsp), %ecx - andl $32767, %eax - andl $-32768, %ecx - lea 48+_P(%rip), %r9 - orl %eax, %ecx - lea 64+_P(%rip), %rax - lea 16+_P(%rip), %r10 - fadd %st(3), %st - fld %st(0) - fmul %st(1), %st - fldt (%rax) - lea _SC2(%rip), %rax - fmul %st(1), %st - fldt (%rsi) - shlq $4, %rdx - faddp %st, %st(1) - fmul %st(1), %st - testb %dil, %dil - fldt (%r8) - movq __libm_expl_table_256@GOTPCREL(%rip), %r11 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - fmul %st(2), %st - fldt (%r10) - movw %cx, 40(%rsp) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(3) - fldl 2056(%r11,%rdx) - fldl 2048(%r11,%rdx) - fld %st(0) - fmul %st(5), %st - fxch %st(4) - fadd %st, %st(5) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%rsp) - fmulp %st, %st(1) - fldt (%rax) - fmulp %st, %st(1) - fstpt 16(%rsp) - je ..B1.89 -..B1.61: - fstpt 48(%rsp) -..B1.87: - fldcw 146(%rsp) - jmp ..B1.62 -..B1.89: - fstp %st(0) -..B1.62: - fldt 16(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 -..B1.63: - movzwl 146(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.67 -..B1.64: - orl $-64768, %edx - movw %dx, 144(%rsp) -..B1.65: - fldcw 144(%rsp) -..B1.66: - movzwl 168(%rsp), %ecx - movb $1, %dil - andl $32767, %ecx -..B1.67: - cmpl $32767, %ecx - je ..B1.79 -..B1.68: - testq %rsi, %rsi - je ..B1.78 -..B1.69: - fldt .L_2il0floatpacket.4(%rip) - lea _small_value_80(%rip), %rax - fldt (%rax) - faddp %st, %st(1) - fstpt 16(%rsp) -..B1.70: - testb %dil, %dil - je ..B1.72 -..B1.71: - fldcw 146(%rsp) -..B1.72: - fldt 16(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 -..B1.73: - cmpl $0, 164(%rsp) - jne ..B1.75 -..B1.74: - cmpl $0, 160(%rsp) - je ..B1.76 -..B1.75: - fldt 160(%rsp) - lea _TWO_75(%rip), %rdx - lea ones(%rip), %rcx - lea _small_value_80(%rip), %rax - fldl (%rdx) - fmul %st(1), %st - fxch %st(1) - fmull (%rcx,%rsi,8) - lea 8+_TWO_75(%rip), %rsi - faddp %st, %st(1) - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - fmull (%rsi) - fstpt 16(%rsp) - jmp ..B1.19 -..B1.76: - fldt 160(%rsp) - fstpt 16(%rsp) - jmp ..B1.19 -..B1.77: - fldt 160(%rsp) - lea _Q3(%rip), %rax - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.27 -..B1.78: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 16(%rsp) - jmp ..B1.70 -..B1.79: - cmpl $-2147483648, 164(%rsp) - jne ..B1.82 -..B1.80: - cmpl $0, 160(%rsp) - jne ..B1.82 -..B1.81: - lea _inf_none(%rip), %rax - fldl (%rax,%rsi,8) - fstpt 16(%rsp) - jmp ..B1.70 -..B1.82: - fldt 160(%rsp) - fstpt 16(%rsp) - jmp ..B1.70 - .align 16,0x90 - .cfi_endproc - .type expm1l,@function - .size expm1l,.-expm1l - .data -# -- End expm1l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -zero_one: - .long 0x00000000,0x00000000 - .long 0x00000000,0x3ff00000 - .type zero_one,@object - .size zero_one,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_54H: - .long 0 - .long 1129840640 - .type _TWO_54H,@object - .size _TWO_54H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_inf_none: - .long 0 - .long 2146435072 - .long 0 - .long 3220176896 - .type _inf_none,@object - .size _inf_none,16 - .align 2 -_ranges: - .word 31148 - .word 53711 - .word 6135 - .word 45426 - .word 16396 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16389 - .word 0 - .word 0 - .word 0 - .type _ranges,@object - .size _ranges,32 - .align 2 -_Q3: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 2731 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 46967 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 65530 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 43687 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 52365 - .word 52428 - .word 43692 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56491 - .word 10318 - .word 34954 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 39683 - .word 36691 - .word 42743 - .word 55145 - .word 16297 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 43690 - .word 43690 - .word 43690 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 46686 - .word 2912 - .word 24758 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 53372 - .word 3328 - .word 208 - .word 53261 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 5395 - .word 3321 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 7401 - .word 46642 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 52768 - .word 7506 - .word 32188 - .word 37874 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 23003 - .word 12485 - .word 11072 - .word 55090 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 3702 - .word 18929 - .word 50035 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 2630 - .word 23096 - .word 11140 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 46660 - .word 62794 - .word 49270 - .word 51706 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 61237 - .word 7998 - .word 19059 - .word 55154 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43648 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43648 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,272 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,80 - .align 2 -_SC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .type _SC2,@object - .size _SC2,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabs.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabs.S deleted file mode 100644 index e285d5fceb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabs.S +++ /dev/null @@ -1,85 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fabs.c" - .text -..TXTST0: -# -- Begin fabs - .text - .align 16,0x90 - .globl fabs -fabs: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_fabs.1: -..L2: - -..B1.2: - movq MASK(%rip), %xmm1 - movq ONE(%rip), %xmm2 - andpd %xmm1, %xmm0 - mulsd %xmm2, %xmm0 - ret -..B1.3: - .align 16,0x90 - .cfi_endproc - .type fabs,@function - .size fabs,.-fabs - .data -# -- End fabs - .section .rodata, "a" - .align 16 - .align 16 -MASK: - .long 4294967295 - .long 2147483647 - .type MASK,@object - .size MASK,8 - .space 8, 0x00 # pad - .align 16 -ONE: - .long 0 - .long 1072693248 - .type ONE,@object - .size ONE,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabsf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabsf.S deleted file mode 100644 index 9c6b491937..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabsf.S +++ /dev/null @@ -1,82 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fabsf.c" - .text -..TXTST0: -# -- Begin fabsf - .text - .align 16,0x90 - .globl fabsf -fabsf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_fabsf.1: -..L2: - -..B1.2: - movd MASK(%rip), %xmm1 - movd ONE(%rip), %xmm2 - andps %xmm1, %xmm0 - mulss %xmm2, %xmm0 - ret -..B1.3: - .align 16,0x90 - .cfi_endproc - .type fabsf,@function - .size fabsf,.-fabsf - .data -# -- End fabsf - .section .rodata, "a" - .align 16 - .align 16 -MASK: - .long 2147483647 - .type MASK,@object - .size MASK,4 - .align 4 -ONE: - .long 1065353216 - .type ONE,@object - .size ONE,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabsl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabsl.S deleted file mode 100644 index 4a4614c636..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fabsl.S +++ /dev/null @@ -1,127 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fabsl.c" - .text -..TXTST0: -# -- Begin fabsl - .text - .align 16,0x90 - .globl fabsl -fabsl: -# parameter 1: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_fabsl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - xorb %sil, %sil -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.5: - fldcw 16(%rsp) -..B1.6: - movb $1, %sil -..B1.7: - movzwl 40(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.12 -..B1.8: - fldt 32(%rsp) - lea ones(%rip), %rdx - movb 41(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fmull (%rdx,%rcx,8) - fstpt (%rsp) -..B1.9: - testb %sil, %sil - je ..B1.11 -..B1.10: - fldcw 18(%rsp) -..B1.11: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.12: - cmpl $-2147483648, 36(%rsp) - jne ..B1.14 -..B1.13: - cmpl $0, 32(%rsp) - je ..B1.8 -..B1.14: - fldt 32(%rsp) - movb 41(%rsp), %al - fstpt (%rsp) - andb $127, %al - movb %al, 9(%rsp) - jmp ..B1.9 - .align 16,0x90 - .cfi_endproc - .type fabsl,@function - .size fabsl,.-fabsl - .data -# -- End fabsl - .section .rodata, "a" - .align 8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdim_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdim_gen.S deleted file mode 100644 index edab127872..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdim_gen.S +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fdim_gen.c" - .text -..TXTST0: -# -- Begin fdim - .text - .align 16,0x90 - .globl fdim -fdim: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_fdim.1: -..L2: - - movsd %xmm0, -16(%rsp) - movsd %xmm1, -8(%rsp) - movzwl -10(%rsp), %edx - andl $32752, %edx - movzwl -2(%rsp), %eax - andl $32752, %eax - shrl $4, %edx - shrl $4, %eax - cmpl $2047, %edx - je ..B1.14 -..B1.2: - cmpl $2047, %eax - je ..B1.11 -..B1.3: - movsd -16(%rsp), %xmm0 - movsd -8(%rsp), %xmm2 - comisd %xmm2, %xmm0 - jbe ..B1.10 -..B1.4: - cmpl $2047, %edx - je ..B1.8 -..B1.5: - cmpl $2047, %eax - je ..B1.8 -..B1.6: - cmpl $2046, %edx - je ..B1.9 -..B1.7: - cmpl $2046, %eax - je ..B1.9 -..B1.8: - subsd %xmm2, %xmm0 - ret -..B1.9: - movsd .L_2il0floatpacket.0(%rip), %xmm1 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm2 - subsd %xmm2, %xmm0 - movsd %xmm0, -24(%rsp) - movsd -24(%rsp), %xmm0 - mulsd .L_2il0floatpacket.1(%rip), %xmm0 - ret -..B1.10: - lea _zeros(%rip), %rax - movsd (%rax), %xmm0 - ret -..B1.11: - testl $1048575, -4(%rsp) - jne ..B1.13 -..B1.12: - cmpl $0, -8(%rsp) - je ..B1.3 -..B1.13: - movsd -8(%rsp), %xmm0 - ret -..B1.14: - testl $1048575, -12(%rsp) - jne ..B1.16 -..B1.15: - cmpl $0, -16(%rsp) - je ..B1.2 -..B1.16: - movsd -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type fdim,@function - .size fdim,.-fdim - .data -# -- End fdim - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdimf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdimf_gen.S deleted file mode 100644 index f352c8467e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdimf_gen.S +++ /dev/null @@ -1,133 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fdimf_gen.c" - .text -..TXTST0: -# -- Begin fdimf - .text - .align 16,0x90 - .globl fdimf -fdimf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_fdimf.1: -..L2: - - movss %xmm0, -16(%rsp) - movss %xmm1, -8(%rsp) - movzwl -14(%rsp), %edx - andl $32640, %edx - movzwl -6(%rsp), %eax - andl $32640, %eax - shrl $7, %edx - shrl $7, %eax - cmpl $255, %edx - je ..B1.13 -..B1.2: - cmpl $255, %eax - je ..B1.11 -..B1.3: - movss -16(%rsp), %xmm0 - movss -8(%rsp), %xmm2 - comiss %xmm2, %xmm0 - jbe ..B1.10 -..B1.4: - cmpl $255, %edx - je ..B1.8 -..B1.5: - cmpl $255, %eax - je ..B1.8 -..B1.6: - cmpl $254, %edx - je ..B1.9 -..B1.7: - cmpl $254, %eax - je ..B1.9 -..B1.8: - subss %xmm2, %xmm0 - ret -..B1.9: - movss .L_2il0floatpacket.0(%rip), %xmm1 - mulss %xmm1, %xmm0 - mulss %xmm1, %xmm2 - subss %xmm2, %xmm0 - movss %xmm0, -24(%rsp) - movss -24(%rsp), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - ret -..B1.10: - pxor %xmm0, %xmm0 - ret -..B1.11: - testl $8388607, -8(%rsp) - je ..B1.3 -..B1.12: - movss -8(%rsp), %xmm0 - ret -..B1.13: - testl $8388607, -16(%rsp) - je ..B1.2 -..B1.14: - movss -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type fdimf,@function - .size fdimf,.-fdimf - .data -# -- End fdimf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x3f000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x40000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdiml.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdiml.S deleted file mode 100644 index da480d2d04..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fdiml.S +++ /dev/null @@ -1,291 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fdiml.c" - .text -..TXTST0: -# -- Begin fdiml - .text - .align 16,0x90 - .globl fdiml -fdiml: -# parameter 1: 32 + %rsp -# parameter 2: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_fdiml.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - xorb %al, %al -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movzwl 40(%rsp), %edi - andl $32767, %edi - movzwl 56(%rsp), %esi - andl $32767, %esi - cmpl $32767, %edi - je ..B1.38 -..B1.4: - cmpl $32767, %esi - je ..B1.29 -..B1.5: - movzwl 18(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.9 -..B1.6: - orl $-64768, %ecx - movw %cx, 16(%rsp) -..B1.7: - fldcw 16(%rsp) -..B1.8: - movb $1, %al -..B1.9: - fldt 48(%rsp) - lea _zeros(%rip), %rdx - fldl (%rdx) - fstpt (%rsp) - fldt 32(%rsp) - fcomi %st(1), %st - jbe ..B1.42 -..B1.10: - cmpl $32767, %edi - je ..B1.14 -..B1.11: - cmpl $32767, %esi - je ..B1.14 -..B1.12: - cmpl $32766, %edi - je ..B1.26 -..B1.13: - cmpl $32766, %esi - je ..B1.18 -..B1.14: - fsubp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.42: - fstp %st(0) - fstp %st(0) -..B1.15: - testb %al, %al - je ..B1.17 -..B1.16: - fldcw 18(%rsp) -..B1.17: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.18: - testl %edi, %edi - jne ..B1.22 -..B1.19: - cmpl $0, 36(%rsp) - jne ..B1.21 -..B1.20: - cmpl $0, 32(%rsp) - je ..B1.22 -..B1.21: - lea _ranges(%rip), %rdx - fsubp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) - fldt (%rdx) - fucomip %st(1), %st - fstp %st(0) - jne ..B1.15 - jp ..B1.15 - jmp ..B1.24 -..B1.22: - fldt .L_2il0floatpacket.0(%rip) - lea 16+_ranges(%rip), %rdx - fmul %st, %st(1) - fmulp %st, %st(2) - fsubp %st, %st(1) - fldt (%rdx) - fcomip %st(1), %st - jp ..B1.23 - jbe ..B1.25 -..B1.23: - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.24: - lea _large_value_80(%rip), %rdx - fldt (%rdx) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.15 -..B1.25: - fstp %st(0) - lea _large_value_80(%rip), %rdx - fldt (%rdx) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.15 -..B1.26: - testl %esi, %esi - jne ..B1.22 -..B1.27: - cmpl $0, 52(%rsp) - jne ..B1.21 -..B1.28: - cmpl $0, 48(%rsp) - jne ..B1.21 - jmp ..B1.22 -..B1.29: - cmpl $-2147483648, 52(%rsp) - jne ..B1.31 -..B1.30: - cmpl $0, 48(%rsp) - je ..B1.5 -..B1.31: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.37 -..B1.32: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.33: - fldcw 16(%rsp) -..B1.34: - fldt 32(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.35: - fldcw 18(%rsp) -..B1.36: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.37: - fldt 32(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.36 -..B1.38: - cmpl $-2147483648, 36(%rsp) - jne ..B1.31 -..B1.39: - cmpl $0, 32(%rsp) - je ..B1.4 - jmp ..B1.31 - .align 16,0x90 - .cfi_endproc - .type fdiml,@function - .size fdiml,.-fdiml - .data -# -- End fdiml - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_ranges: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .type _ranges,@object - .size _ranges,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feclearexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feclearexcept.S deleted file mode 100644 index 4d8dec30e9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feclearexcept.S +++ /dev/null @@ -1,98 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feclearexcept.c" - .text -..TXTST0: -# -- Begin feclearexcept - .text - .align 16,0x90 - .globl feclearexcept -feclearexcept: -# parameter 1: %edi -..B1.1: - .cfi_startproc -..___tag_value_feclearexcept.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 40(%rsp) - andl $63, %edi - je ..B1.9 -..B1.2: - stmxcsr (%rsp) -..B1.3: - notl %edi - andl %edi, (%rsp) -..B1.4: - ldmxcsr (%rsp) -..B1.5: - fnstenv 4(%rsp) -..B1.6: - andw %di, 8(%rsp) -..B1.7: - fnclex -..B1.8: - fldenv 4(%rsp) -..B1.9: - movq 40(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.11 -..B1.10: - xorl %eax, %eax - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.11: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type feclearexcept,@function - .size feclearexcept,.-feclearexcept - .data -# -- End feclearexcept - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fedisableexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fedisableexcept.S deleted file mode 100644 index 90d6b05291..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fedisableexcept.S +++ /dev/null @@ -1,105 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fedisableexcept.c" - .text -..TXTST0: -# -- Begin fedisableexcept - .text - .align 16,0x90 - .globl fedisableexcept -fedisableexcept: -# parameter 1: %edi -..B1.1: - .cfi_startproc -..___tag_value_fedisableexcept.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movq %fs:40, %rax - andl $63, %edi - xorq %rsp, %rax - movq %rax, 40(%rsp) -..B1.2: - stmxcsr 4(%rsp) -..B1.3: - testl %edi, %edi - je ..B1.10 -..B1.4: - movl %edi, %eax - shll $7, %eax - orl 4(%rsp), %eax - movl %eax, (%rsp) -..B1.5: - fnstenv 8(%rsp) -..B1.6: - orw %di, 8(%rsp) -..B1.7: - fnclex -..B1.8: - fldenv 8(%rsp) -..B1.9: - ldmxcsr (%rsp) -..B1.10: - movl 4(%rsp), %eax - shrl $7, %eax - movq 40(%rsp), %rdx - notl %eax - xorq %rsp, %rdx - andl $63, %eax - cmpq %fs:40, %rdx - jne ..B1.12 -..B1.11: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.12: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type fedisableexcept,@function - .size fedisableexcept,.-fedisableexcept - .data -# -- End fedisableexcept - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feenableexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feenableexcept.S deleted file mode 100644 index 54e7fa2572..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feenableexcept.S +++ /dev/null @@ -1,107 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feenableexcept.c" - .text -..TXTST0: -# -- Begin feenableexcept - .text - .align 16,0x90 - .globl feenableexcept -feenableexcept: -# parameter 1: %edi -..B1.1: - .cfi_startproc -..___tag_value_feenableexcept.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movq %fs:40, %rax - andl $63, %edi - xorq %rsp, %rax - movq %rax, 40(%rsp) -..B1.2: - stmxcsr 4(%rsp) -..B1.3: - testl %edi, %edi - je ..B1.10 -..B1.4: - movl %edi, %eax - shll $7, %eax - notl %eax - andl 4(%rsp), %eax - movl %eax, (%rsp) -..B1.5: - fnstenv 8(%rsp) -..B1.6: - notl %edi - andw %di, 8(%rsp) -..B1.7: - fnclex -..B1.8: - fldenv 8(%rsp) -..B1.9: - ldmxcsr (%rsp) -..B1.10: - movl 4(%rsp), %eax - shrl $7, %eax - movq 40(%rsp), %rdx - notl %eax - xorq %rsp, %rdx - andl $63, %eax - cmpq %fs:40, %rdx - jne ..B1.12 -..B1.11: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.12: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type feenableexcept,@function - .size feenableexcept,.-feenableexcept - .data -# -- End feenableexcept - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetexcept.S deleted file mode 100644 index 3fa4440273..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetexcept.S +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fegetexcept.c" - .text -..TXTST0: -# -- Begin fegetexcept - .text - .align 16,0x90 - .globl fegetexcept -fegetexcept: -..B1.1: - .cfi_startproc -..___tag_value_fegetexcept.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 -..B1.2: - stmxcsr (%rsp) -..B1.3: - movl (%rsp), %eax - shrl $7, %eax - notl %eax - andl $63, %eax - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fegetexcept,@function - .size fegetexcept,.-fegetexcept - .data -# -- End fegetexcept - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetexceptflag.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetexceptflag.S deleted file mode 100644 index d5d2bae756..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetexceptflag.S +++ /dev/null @@ -1,81 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fegetexceptflag.c" - .text -..TXTST0: -# -- Begin fegetexceptflag - .text - .align 16,0x90 - .globl fegetexceptflag -fegetexceptflag: -# parameter 1: %rdi -# parameter 2: %esi -..B1.1: - .cfi_startproc -..___tag_value_fegetexceptflag.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - andl $63, %esi -..B1.2: - stmxcsr (%rsp) -..B1.3: - fnstsw 4(%rsp) -..B1.4: - movzwl 4(%rsp), %eax - orl (%rsp), %eax - andl %eax, %esi - movl %eax, (%rsp) - xorl %eax, %eax - movw %si, (%rdi) - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fegetexceptflag,@function - .size fegetexceptflag,.-fegetexceptflag - .data -# -- End fegetexceptflag - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetround.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetround.S deleted file mode 100644 index 8a77f3d6a4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fegetround.S +++ /dev/null @@ -1,73 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fegetround.c" - .text -..TXTST0: -# -- Begin fegetround - .text - .align 16,0x90 - .globl fegetround -fegetround: -..B1.1: - .cfi_startproc -..___tag_value_fegetround.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 -..B1.2: - stmxcsr (%rsp) -..B1.3: - movl (%rsp), %eax - shrl $3, %eax - andl $3072, %eax - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fegetround,@function - .size fegetround,.-fegetround - .data -# -- End fegetround - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feholdexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feholdexcept.S deleted file mode 100644 index 0075d09749..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feholdexcept.S +++ /dev/null @@ -1,110 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feholdexcept.c" - .text -..TXTST0: -# -- Begin feholdexcept - .text - .align 16,0x90 - .globl feholdexcept -feholdexcept: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value_feholdexcept.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 40(%rsp) -..B1.2: - fnstenv 4(%rsp) -..B1.3: - movzwl 8(%rsp), %eax - movzwl 4(%rsp), %edx - movw %ax, 4(%rdi) - movw %dx, (%rdi) -..B1.4: - stmxcsr (%rsp) -..B1.5: - movl (%rsp), %eax - movzwl 8(%rsp), %edx - movzwl 4(%rsp), %ecx - andl $-64, %edx - orl $63, %ecx - movl %eax, 28(%rdi) - movw %dx, 8(%rsp) - movw %cx, 4(%rsp) -..B1.6: - fnclex -..B1.7: - fldenv 4(%rsp) -..B1.8: - movl (%rsp), %eax - andl $-64, %eax - orl $8064, %eax - movl %eax, (%rsp) -..B1.9: - ldmxcsr (%rsp) -..B1.10: - movq 40(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.12 -..B1.11: - xorl %eax, %eax - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.12: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type feholdexcept,@function - .size feholdexcept,.-feholdexcept - .data -# -- End feholdexcept - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feraiseexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feraiseexcept.S deleted file mode 100644 index adc7c2b293..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feraiseexcept.S +++ /dev/null @@ -1,159 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feraiseexcept.c" - .text -..TXTST0: -# -- Begin feraiseexcept - .text - .align 16,0x90 - .globl feraiseexcept -feraiseexcept: -# parameter 1: %edi -..B1.1: - .cfi_startproc -..___tag_value_feraiseexcept.1: -..L2: - - testl $1, %edi - je ..B1.3 -..B1.2: - lea d_zero(%rip), %rax - movsd (%rax), %xmm0 - divsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) -..B1.3: - testl $4, %edi - je ..B1.5 -..B1.4: - movq p_one(%rip), %rax - movq p_zero(%rip), %rdx - movsd (%rax), %xmm0 - divsd (%rdx), %xmm0 - movsd %xmm0, -8(%rsp) -..B1.5: - testl $2, %edi - je ..B1.7 -..B1.6: - lea d_tiny(%rip), %rax - movsd (%rax), %xmm0 - addsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) -..B1.7: - testl $8, %edi - je ..B1.9 -..B1.8: - lea d_huge(%rip), %rax - movsd (%rax), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) -..B1.9: - testl $16, %edi - je ..B1.11 -..B1.10: - lea d_norm(%rip), %rax - movsd (%rax), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) -..B1.11: - testl $32, %edi - je ..B1.13 -..B1.12: - movq p_one(%rip), %rax - movq p_norm(%rip), %rdx - movsd (%rax), %xmm0 - addsd (%rdx), %xmm0 - movsd %xmm0, -8(%rsp) -..B1.13: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type feraiseexcept,@function - .size feraiseexcept,.-feraiseexcept - .data -# -- End feraiseexcept - .section .rodata, "a" - .align 8 - .align 8 -d_zero: - .long 0x00000000,0x00000000 - .type d_zero,@object - .size d_zero,8 - .align 8 -d_one: - .long 0x00000000,0x3ff00000 - .type d_one,@object - .size d_one,8 - .align 8 -d_tiny: - .long 0xffffffff,0x000fffff - .type d_tiny,@object - .size d_tiny,8 - .align 8 -d_huge: - .long 0xffffffff,0x7fefffff - .type d_huge,@object - .size d_huge,8 - .align 8 -d_norm: - .long 0x00000000,0x00100000 - .type d_norm,@object - .size d_norm,8 - .section .data.rel.ro.local, "aw",@progbits - .align 8 - .align 8 -p_one: - .quad d_one - .type p_one,@object - .size p_one,8 - .align 8 -p_zero: - .quad d_zero - .type p_zero,@object - .size p_zero,8 - .align 8 -p_norm: - .quad d_norm - .type p_norm,@object - .size p_norm,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetenv.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetenv.S deleted file mode 100644 index 34d7de7f65..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetenv.S +++ /dev/null @@ -1,119 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fesetenv.c" - .text -..TXTST0: -# -- Begin fesetenv - .text - .align 16,0x90 - .globl fesetenv -fesetenv: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value_fesetenv.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 40(%rsp) -..B1.2: - fnstenv 4(%rsp) -..B1.3: - movzwl 4(%rsp), %eax - movzwl 8(%rsp), %edx - andl $-3136, %eax - andl $-64, %edx - movw %ax, 4(%rsp) - movw %dx, 8(%rsp) -..B1.4: - stmxcsr (%rsp) -..B1.5: - movl (%rsp), %eax - andl $-32704, %eax - cmpq $-1, %rdi - je ..B1.13 -..B1.6: - movzwl (%rdi), %edx - movzwl 4(%rdi), %ecx - andl $3135, %edx - movl 28(%rdi), %eax - andl $63, %ecx - movl %eax, (%rsp) - orw %dx, 4(%rsp) - orw %cx, 8(%rsp) -..B1.7: - fnclex -..B1.8: - fldenv 4(%rsp) -..B1.9: - ldmxcsr (%rsp) -..B1.10: - movq 40(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.12 -..B1.11: - xorl %eax, %eax - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.12: - call __stack_chk_fail@PLT -..B1.13: - orl $8064, %eax - movl %eax, (%rsp) - movzwl 4(%rsp), %eax - orl $63, %eax - movw %ax, 4(%rsp) - jmp ..B1.7 - .align 16,0x90 - .cfi_endproc - .type fesetenv,@function - .size fesetenv,.-fesetenv - .data -# -- End fesetenv - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetexceptflag.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetexceptflag.S deleted file mode 100644 index 2c49d08b29..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetexceptflag.S +++ /dev/null @@ -1,110 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fesetexceptflag.c" - .text -..TXTST0: -# -- Begin fesetexceptflag - .text - .align 16,0x90 - .globl fesetexceptflag -fesetexceptflag: -# parameter 1: %rdi -# parameter 2: %esi -..B1.1: - .cfi_startproc -..___tag_value_fesetexceptflag.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 40(%rsp) - andl $63, %esi - je ..B1.9 -..B1.2: - stmxcsr (%rsp) -..B1.3: - movl %esi, %ecx - notl %ecx - movl (%rsp), %edx - movzwl (%rdi), %eax - andl %ecx, %edx - andl %esi, %eax - orl %eax, %edx - movl %edx, (%rsp) -..B1.4: - ldmxcsr (%rsp) -..B1.5: - fnstenv 4(%rsp) -..B1.6: - movzwl 8(%rsp), %eax - andl %ecx, %eax - movzwl (%rdi), %ecx - andl %esi, %ecx - orl %ecx, %eax - movw %ax, 8(%rsp) -..B1.7: - fnclex -..B1.8: - fldenv 4(%rsp) -..B1.9: - movq 40(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.11 -..B1.10: - xorl %eax, %eax - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.11: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type fesetexceptflag,@function - .size fesetexceptflag,.-fesetexceptflag - .data -# -- End fesetexceptflag - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetround.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetround.S deleted file mode 100644 index 4e0665258c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fesetround.S +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fesetround.c" - .text -..TXTST0: -# -- Begin fesetround - .text - .align 16,0x90 - .globl fesetround -fesetround: -# parameter 1: %edi -..B1.1: - .cfi_startproc -..___tag_value_fesetround.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 40(%rsp) - testl $-3073, %edi - jne ..B1.11 -..B1.2: - stmxcsr (%rsp) -..B1.3: - movl (%rsp), %edx - lea (,%rdi,8), %eax - andl $-24577, %edx - orl %eax, %edx - movl %edx, (%rsp) -..B1.4: - ldmxcsr (%rsp) -..B1.5: - fnstenv 4(%rsp) -..B1.6: - movzwl 4(%rsp), %eax - andl $-3073, %eax - orl %edi, %eax - movw %ax, 4(%rsp) -..B1.7: - fnclex -..B1.8: - fldenv 4(%rsp) -..B1.9: - movq 40(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.13 -..B1.10: - xorl %eax, %eax - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.11: - movq 40(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.13 -..B1.12: - movl $1, %eax - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.13: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type fesetround,@function - .size fesetround,.-fesetround - .data -# -- End fesetround - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fetestexcept.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fetestexcept.S deleted file mode 100644 index 37631aa293..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fetestexcept.S +++ /dev/null @@ -1,85 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fetestexcept.c" - .text -..TXTST0: -# -- Begin fetestexcept - .text - .align 16,0x90 - .globl fetestexcept -fetestexcept: -# parameter 1: %edi -..B1.1: - .cfi_startproc -..___tag_value_fetestexcept.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - andl $63, %edi - je ..B1.5 -..B1.2: - stmxcsr (%rsp) -..B1.3: - fnstsw 4(%rsp) -..B1.4: - movzwl 4(%rsp), %eax - orl (%rsp), %eax - movl %eax, (%rsp) - andl %edi, %eax - popq %rcx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 -..B1.5: - xorl %eax, %eax - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fetestexcept,@function - .size fetestexcept,.-fetestexcept - .data -# -- End fetestexcept - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feupdateenv.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feupdateenv.S deleted file mode 100644 index 6d0471e58c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/feupdateenv.S +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "feupdateenv.c" - .text -..TXTST0: -# -- Begin feupdateenv - .text - .align 16,0x90 - .globl feupdateenv -feupdateenv: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value_feupdateenv.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %rsi - .cfi_def_cfa_offset 32 - movq %rdi, %r12 - movl $63, %edi -..___tag_value_feupdateenv.8: - call fetestexcept@PLT -..___tag_value_feupdateenv.9: -..B1.7: - movl %eax, %r13d -..B1.2: - movq %r12, %rdi -..___tag_value_feupdateenv.10: - call fesetenv@PLT -..___tag_value_feupdateenv.11: -..B1.3: - movl %r13d, %edi -..___tag_value_feupdateenv.12: - call feraiseexcept@PLT -..___tag_value_feupdateenv.13: -..B1.4: - xorl %eax, %eax - popq %rcx - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type feupdateenv,@function - .size feupdateenv,.-feupdateenv - .data -# -- End feupdateenv - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floor_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floor_gen.S deleted file mode 100644 index daa3faa589..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floor_gen.S +++ /dev/null @@ -1,167 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "floor_gen.c" - .text -..TXTST0: -# -- Begin floor - .text - .align 16,0x90 - .globl floor -floor: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_floor.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - movl %eax, %edi - andl $2147483647, %edi - lea -1072693248(%rdi), %edx - cmpl $54525952, %edx - jae ..B1.12 -..B1.2: - movl %edi, %ecx - shrl $20, %ecx - cmpl $22020096, %edx - jae ..B1.8 -..B1.3: - negl %ecx - movl $-1, %esi - addl $19, %ecx - shll %cl, %esi - movl %esi, %edx - andl %esi, %eax - notl %edx - andl %edx, %edi - orl -8(%rsp), %edi - movl $0, -8(%rsp) - testl $-2147483648, %eax - je ..B1.6 -..B1.4: - testl %edi, %edi - je ..B1.6 -..B1.5: - subl %esi, %eax - movl %eax, -4(%rsp) - jmp ..B1.11 -..B1.6: - movl %eax, -4(%rsp) - jmp ..B1.11 -..B1.8: - negl %ecx - movl $-1, %esi - addl $19, %ecx - shll %cl, %esi - movl %esi, %ecx - notl %ecx - movl -8(%rsp), %edx - andl %edx, %ecx - andl %esi, %edx - movl %edx, -8(%rsp) - testl $-2147483648, %eax - je ..B1.11 -..B1.9: - testl %ecx, %ecx - je ..B1.11 -..B1.10: - movl -4(%rsp), %eax - shlq $32, %rax - movslq %esi, %rsi - orq %rdx, %rax - subq %rsi, %rax - movq %rax, -8(%rsp) -..B1.11: - movsd -8(%rsp), %xmm0 - ret -..B1.12: - testl $-2147483648, %edx - je ..B1.17 -..B1.13: - movl -8(%rsp), %edx - orl %edx, %edi - jne ..B1.15 -..B1.14: - movsd -8(%rsp), %xmm0 - ret -..B1.15: - lea _pzero_none(%rip), %rdx - shrl $31, %eax - movsd (%rdx,%rax,8), %xmm0 -..B1.16: - ret -..B1.17: - movsd -8(%rsp), %xmm0 - cmpl $1073741824, %edx - jb ..B1.20 -..B1.19: - lea _ones(%rip), %rax - mulsd (%rax), %xmm0 -..B1.20: - ret - .align 16,0x90 - .cfi_endproc - .type floor,@function - .size floor,.-floor - .data -# -- End floor - .section .rodata, "a" - .align 4 - .align 4 -_pzero_none: - .long 0 - .long 0 - .long 0 - .long 3220176896 - .type _pzero_none,@object - .size _pzero_none,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floorf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floorf_gen.S deleted file mode 100644 index 1a7ad62bab..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floorf_gen.S +++ /dev/null @@ -1,141 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "floorf_gen.c" - .text -..TXTST0: -# -- Begin floorf - .text - .align 16,0x90 - .globl floorf -floorf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_floorf.1: -..L2: - - movaps %xmm0, %xmm2 - movss %xmm2, -16(%rsp) - movzwl -14(%rsp), %eax - andl $32640, %eax - shrl $7, %eax - cmpl $149, %eax - jge ..B1.8 -..B1.2: - cmpl $127, %eax - jl ..B1.4 -..B1.3: - movss .L_2il0floatpacket.0(%rip), %xmm1 - movaps %xmm1, %xmm0 - addss %xmm2, %xmm0 - movss %xmm0, -24(%rsp) - movss -24(%rsp), %xmm3 - movss .L_2il0floatpacket.1(%rip), %xmm0 - subss %xmm1, %xmm3 - comiss %xmm2, %xmm3 - addss %xmm3, %xmm0 - ja ..L3 - movaps %xmm3, %xmm0 -..L3: - ret -..B1.4: - testl %eax, %eax - jne ..B1.7 -..B1.5: - testl $8388607, -16(%rsp) - jne ..B1.7 -..B1.6: - movss -16(%rsp), %xmm0 - ret -..B1.7: - movb -13(%rsp), %dl - lea _pzero_none(%rip), %rcx - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %esi - movl -16(%rsp), %eax - movl %eax, -24(%rsp) - movss (%rcx,%rsi,4), %xmm0 - ret -..B1.8: - cmpl $150, %eax - jge ..B1.6 -..B1.9: - movss -16(%rsp), %xmm1 - movss .L_2il0floatpacket.2(%rip), %xmm0 - testb $1, -16(%rsp) - addss %xmm1, %xmm0 - jne ..L4 - movaps %xmm1, %xmm0 -..L4: - ret - .align 16,0x90 - .cfi_endproc - .type floorf,@function - .size floorf,.-floorf - .data -# -- End floorf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4b400000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0xbf800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0xbf000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -_pzero_none: - .long 0 - .long 3212836864 - .type _pzero_none,@object - .size _pzero_none,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floorl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floorl.S deleted file mode 100644 index 5f739d46df..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/floorl.S +++ /dev/null @@ -1,256 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "floorl.c" - .text -..TXTST0: -# -- Begin floorl - .text - .align 16,0x90 - .globl floorl -floorl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_floorl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %cl, %cl -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 56(%rsp), %eax - andl $32767, %eax - cmpl $16445, %eax - jge ..B1.20 -..B1.4: - cmpl $16383, %eax - jl ..B1.15 -..B1.5: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.9 -..B1.6: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.7: - fldcw 24(%rsp) -..B1.8: - movb $1, %cl -..B1.9: - fldt 48(%rsp) - lea _TWO_63H(%rip), %rax - fld %st(0) - fldl (%rax) - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 8(%rsp) - fldt 8(%rsp) - fcomip %st(1), %st - fstp %st(0) - jbe ..B1.12 -..B1.10: - fldt 8(%rsp) - lea 8+_ones(%rip), %rax - faddl (%rax) - fstpt 8(%rsp) -..B1.12: - testb %cl, %cl - je ..B1.14 -..B1.13: - fldcw 26(%rsp) -..B1.14: - fldt 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.15: - testl %eax, %eax - jne ..B1.19 -..B1.16: - cmpq $0, 48(%rsp) - jne ..B1.18 -..B1.17: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.18: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, (%rsp) -..B1.19: - movb 57(%rsp), %al - lea _pzero_none(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.20: - cmpl $16446, %eax - jge ..B1.29 -..B1.21: - testb $1, 48(%rsp) - je ..B1.28 -..B1.22: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.35 -..B1.23: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.24: - fldcw 24(%rsp) -..B1.25: - fldt 48(%rsp) - lea 8+_halfs(%rip), %rax - faddl (%rax) - fstpt 8(%rsp) -..B1.26: - fldcw 26(%rsp) -..B1.27: - fldt 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.28: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.29: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.30: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.31: - fldcw 24(%rsp) -..B1.32: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) -..B1.33: - fldcw 26(%rsp) -..B1.34: - fldt 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.35: - fldt 48(%rsp) - lea 8+_halfs(%rip), %rax - faddl (%rax) - fstpt 8(%rsp) - jmp ..B1.27 -..B1.36: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) - jmp ..B1.34 - .align 16,0x90 - .cfi_endproc - .type floorl,@function - .size floorl,.-floorl - .data -# -- End floorl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_pzero_none: - .long 0 - .long 0 - .long 0 - .long 3220176896 - .type _pzero_none,@object - .size _pzero_none,16 - .align 4 -_halfs: - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .type _halfs,@object - .size _halfs,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fma_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fma_gen.S deleted file mode 100644 index 51110ae806..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fma_gen.S +++ /dev/null @@ -1,1644 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fma_gen.c" - .text -..TXTST0: -# -- Begin fma - .text - - .globl fma -fma: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -# parameter 3: %xmm2 -..B1.1: - .cfi_startproc -..___tag_value_fma.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - movq %rsp, %rbp - .cfi_def_cfa 6, 16 - .cfi_offset 6, -16 - subq $272, %rsp - movsd %xmm0, -80(%rbp) - movsd %xmm1, -72(%rbp) - movsd %xmm2, -64(%rbp) -..B1.2: - stmxcsr -272(%rbp) -..B1.3: - movl -272(%rbp), %eax - andl $24576, %eax - movl %eax, -268(%rbp) - lea -80(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - andl $2147483647, %eax - movl %eax, -264(%rbp) - lea -80(%rbp), %rax - movl (%rax), %eax - movl %eax, -260(%rbp) - lea -72(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - andl $2147483647, %eax - movl %eax, -256(%rbp) - lea -72(%rbp), %rax - movl (%rax), %eax - movl %eax, -252(%rbp) - lea -64(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - andl $2147483647, %eax - movl %eax, -248(%rbp) - lea -64(%rbp), %rax - movl (%rax), %eax - movl %eax, -244(%rbp) - movl -260(%rbp), %eax - orl -264(%rbp), %eax - je ..B1.11 -..B1.4: - movl -264(%rbp), %eax - cmpl $2146435072, %eax - jae ..B1.11 -..B1.5: - movl $-1072693248, %eax - addl -264(%rbp), %eax - orl -260(%rbp), %eax - je ..B1.11 -..B1.6: - movl -252(%rbp), %eax - orl -256(%rbp), %eax - je ..B1.11 -..B1.7: - movl -256(%rbp), %eax - cmpl $2146435072, %eax - jae ..B1.11 -..B1.8: - movl $-1072693248, %eax - addl -256(%rbp), %eax - orl -252(%rbp), %eax - je ..B1.11 -..B1.9: - movl -244(%rbp), %eax - orl -248(%rbp), %eax - je ..B1.11 -..B1.10: - movl -248(%rbp), %eax - cmpl $2146435072, %eax - jb ..B1.28 -..B1.11: - movl -264(%rbp), %eax - cmpl $2146435072, %eax - ja ..B1.14 -..B1.12: - movl -264(%rbp), %eax - cmpl $2146435072, %eax - jne ..B1.15 -..B1.13: - movl -260(%rbp), %eax - testl %eax, %eax - je ..B1.15 -..B1.14: - movsd -80(%rbp), %xmm0 - lea _ones(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.15: - movl -256(%rbp), %eax - cmpl $2146435072, %eax - ja ..B1.18 -..B1.16: - movl -256(%rbp), %eax - cmpl $2146435072, %eax - jne ..B1.19 -..B1.17: - movl -252(%rbp), %eax - testl %eax, %eax - je ..B1.19 -..B1.18: - movsd -72(%rbp), %xmm0 - lea _ones(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.19: - movl -248(%rbp), %eax - cmpl $2146435072, %eax - ja ..B1.22 -..B1.20: - movl -248(%rbp), %eax - cmpl $2146435072, %eax - jne ..B1.23 -..B1.21: - movl -244(%rbp), %eax - testl %eax, %eax - je ..B1.23 -..B1.22: - movsd -64(%rbp), %xmm0 - lea _ones(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.23: - movl -264(%rbp), %eax - cmpl $2146435072, %eax - jae ..B1.27 -..B1.24: - movl -256(%rbp), %eax - cmpl $2146435072, %eax - jae ..B1.27 -..B1.25: - movl -248(%rbp), %eax - cmpl $2146435072, %eax - jb ..B1.27 -..B1.26: - movsd -64(%rbp), %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.27: - movsd -80(%rbp), %xmm0 - movsd -72(%rbp), %xmm1 - mulsd %xmm1, %xmm0 - movsd -64(%rbp), %xmm1 - addsd %xmm1, %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.28: - movl -264(%rbp), %eax - cmpl $1048576, %eax - jae ..B1.30 -..B1.29: - lea -80(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - shrl $31, %eax - movl %eax, -240(%rbp) - lea -80(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - orl $1072693248, %eax - lea -80(%rbp), %rdx - addq $4, %rdx - movl %eax, (%rdx) - movl -240(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _ones(%rip), %rdx - addq %rax, %rdx - movsd -80(%rbp), %xmm0 - movsd (%rdx), %xmm1 - subsd %xmm1, %xmm0 - movsd %xmm0, -80(%rbp) - lea -80(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - andl $2147483647, %eax - movl %eax, -264(%rbp) - lea -80(%rbp), %rax - movl (%rax), %eax - movl %eax, -260(%rbp) - movl -264(%rbp), %eax - shrl $20, %eax - addl $-1022, %eax - movl %eax, -236(%rbp) - jmp ..B1.31 -..B1.30: - movl -264(%rbp), %eax - shrl $20, %eax - movl %eax, -236(%rbp) -..B1.31: - movl -256(%rbp), %eax - cmpl $1048576, %eax - jae ..B1.33 -..B1.32: - lea -72(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - shrl $31, %eax - movl %eax, -232(%rbp) - lea -72(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - orl $1072693248, %eax - lea -72(%rbp), %rdx - addq $4, %rdx - movl %eax, (%rdx) - movl -232(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _ones(%rip), %rdx - addq %rax, %rdx - movsd -72(%rbp), %xmm0 - movsd (%rdx), %xmm1 - subsd %xmm1, %xmm0 - movsd %xmm0, -72(%rbp) - lea -72(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - andl $2147483647, %eax - movl %eax, -256(%rbp) - lea -72(%rbp), %rax - movl (%rax), %eax - movl %eax, -252(%rbp) - movl -256(%rbp), %eax - shrl $20, %eax - addl $-1022, %eax - movl %eax, -228(%rbp) - jmp ..B1.34 -..B1.33: - movl -256(%rbp), %eax - shrl $20, %eax - movl %eax, -228(%rbp) -..B1.34: - movl -248(%rbp), %eax - cmpl $1048576, %eax - jae ..B1.36 -..B1.35: - lea -64(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - shrl $31, %eax - movl %eax, -224(%rbp) - lea -64(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - orl $1072693248, %eax - lea -64(%rbp), %rdx - addq $4, %rdx - movl %eax, (%rdx) - movl -224(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _ones(%rip), %rdx - addq %rax, %rdx - movsd -64(%rbp), %xmm0 - movsd (%rdx), %xmm1 - subsd %xmm1, %xmm0 - movsd %xmm0, -64(%rbp) - lea -64(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - andl $2147483647, %eax - movl %eax, -248(%rbp) - lea -64(%rbp), %rax - movl (%rax), %eax - movl %eax, -244(%rbp) - movl -248(%rbp), %eax - shrl $20, %eax - addl $-1022, %eax - movl %eax, -220(%rbp) - jmp ..B1.37 -..B1.36: - movl -248(%rbp), %eax - shrl $20, %eax - movl %eax, -220(%rbp) -..B1.37: - movl -264(%rbp), %eax - andl $1048575, %eax - orl $1048576, %eax - movl %eax, -216(%rbp) - movl -256(%rbp), %eax - andl $1048575, %eax - orl $1048576, %eax - movl %eax, -212(%rbp) - movl -248(%rbp), %eax - andl $1048575, %eax - orl $1048576, %eax - movl %eax, -208(%rbp) - lea -80(%rbp), %rax - addq $4, %rax - lea -72(%rbp), %rdx - addq $4, %rdx - movl (%rdx), %edx - xorl (%rax), %edx - andl $-2147483648, %edx - movl %edx, -204(%rbp) - movl -228(%rbp), %eax - addl -236(%rbp), %eax - addl $-1023, %eax - movl %eax, -200(%rbp) - movl -252(%rbp), %eax - movl -260(%rbp), %edx - imulq %rax, %rdx - movq %rdx, -56(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -196(%rbp) - movl -56(%rbp), %eax - movl %eax, -192(%rbp) - movl -252(%rbp), %eax - movl -216(%rbp), %edx - imulq %rax, %rdx - movq %rdx, -48(%rbp) - movq -48(%rbp), %rax - shrq $32, %rax - movl %eax, -188(%rbp) - movl -48(%rbp), %eax - movl %eax, -184(%rbp) - movl -212(%rbp), %eax - movl -260(%rbp), %edx - imulq %rax, %rdx - movq %rdx, -40(%rbp) - movq -40(%rbp), %rax - shrq $32, %rax - movl %eax, -180(%rbp) - movl -40(%rbp), %eax - movl %eax, -176(%rbp) - movl -212(%rbp), %eax - movl -216(%rbp), %edx - imulq %rax, %rdx - movq %rdx, -32(%rbp) - movq -32(%rbp), %rax - shrq $32, %rax - movl %eax, -172(%rbp) - movl -32(%rbp), %eax - movl %eax, -168(%rbp) - movl -192(%rbp), %eax - movl %eax, -164(%rbp) - movl -196(%rbp), %eax - movq %rax, -24(%rbp) - movl -184(%rbp), %eax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -176(%rbp), %eax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -24(%rbp), %eax - movl %eax, -160(%rbp) - movq -24(%rbp), %rax - shrq $32, %rax - movl %eax, -156(%rbp) - movl -168(%rbp), %eax - movq %rax, -24(%rbp) - movl -188(%rbp), %eax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -180(%rbp), %eax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -156(%rbp), %eax - movslq %eax, %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -24(%rbp), %eax - movl %eax, -152(%rbp) - movq -24(%rbp), %rax - shrq $32, %rax - movl %eax, -156(%rbp) - movl -156(%rbp), %eax - addl -172(%rbp), %eax - movl %eax, -148(%rbp) - movl -148(%rbp), %eax - testl $512, %eax - je ..B1.39 -..B1.38: - movl -148(%rbp), %eax - shll $11, %eax - movl -152(%rbp), %edx - shrl $21, %edx - orl %edx, %eax - movl %eax, -148(%rbp) - movl -152(%rbp), %eax - shll $11, %eax - movl -160(%rbp), %edx - shrl $21, %edx - orl %edx, %eax - movl %eax, -152(%rbp) - movl -160(%rbp), %eax - shll $11, %eax - movl -164(%rbp), %edx - shrl $21, %edx - orl %edx, %eax - movl %eax, -160(%rbp) - shll $11, -164(%rbp) - movl $1, %eax - addl -200(%rbp), %eax - movl %eax, -200(%rbp) - jmp ..B1.40 -..B1.39: - movl -148(%rbp), %eax - shll $12, %eax - movl -152(%rbp), %edx - shrl $20, %edx - orl %edx, %eax - movl %eax, -148(%rbp) - movl -152(%rbp), %eax - shll $12, %eax - movl -160(%rbp), %edx - shrl $20, %edx - orl %edx, %eax - movl %eax, -152(%rbp) - movl -160(%rbp), %eax - shll $12, %eax - movl -164(%rbp), %edx - shrl $20, %edx - orl %edx, %eax - movl %eax, -160(%rbp) - shll $12, -164(%rbp) -..B1.40: - movl -200(%rbp), %eax - movl -220(%rbp), %edx - cmpl %edx, %eax - jg ..B1.45 -..B1.41: - movl -200(%rbp), %eax - movl -220(%rbp), %edx - cmpl %edx, %eax - jne ..B1.46 -..B1.42: - movl -148(%rbp), %eax - movl -208(%rbp), %edx - cmpl %edx, %eax - ja ..B1.45 -..B1.43: - movl -148(%rbp), %eax - movl -208(%rbp), %edx - cmpl %edx, %eax - jne ..B1.46 -..B1.44: - movl -152(%rbp), %eax - movl -244(%rbp), %edx - cmpl %edx, %eax - jb ..B1.46 -..B1.45: - movl -220(%rbp), %eax - negl %eax - addl -200(%rbp), %eax - movl %eax, -144(%rbp) - movl -208(%rbp), %eax - movl %eax, -140(%rbp) - movl -244(%rbp), %eax - movl %eax, -136(%rbp) - movl $0, %eax - movl %eax, -132(%rbp) - movl %eax, -128(%rbp) - lea -64(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - andl $-2147483648, %eax - movl %eax, -224(%rbp) - jmp ..B1.47 -..B1.46: - movl -200(%rbp), %eax - negl %eax - addl -220(%rbp), %eax - movl %eax, -144(%rbp) - movl -220(%rbp), %eax - movl %eax, -200(%rbp) - movl -148(%rbp), %eax - movl %eax, -140(%rbp) - movl -152(%rbp), %eax - movl %eax, -136(%rbp) - movl -160(%rbp), %eax - movl %eax, -128(%rbp) - movl -164(%rbp), %eax - movl %eax, -132(%rbp) - movl -208(%rbp), %eax - movl %eax, -148(%rbp) - movl -244(%rbp), %eax - movl %eax, -152(%rbp) - movl $0, %eax - movl %eax, -164(%rbp) - movl %eax, -160(%rbp) - movl -204(%rbp), %eax - movl %eax, -224(%rbp) - lea -64(%rbp), %rax - addq $4, %rax - movl (%rax), %eax - andl $-2147483648, %eax - movl %eax, -204(%rbp) -..B1.47: - movl $0, -124(%rbp) - movl -144(%rbp), %eax - testl %eax, %eax - je ..B1.57 -..B1.48: - movl -144(%rbp), %eax - cmpl $32, %eax - jge ..B1.50 -..B1.49: - movl -144(%rbp), %eax - negl %eax - addl $32, %eax - movl %eax, -120(%rbp) - movl -144(%rbp), %eax - movl %eax, -116(%rbp) - movl $-1, %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -112(%rbp) - movl -132(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl %eax, -124(%rbp) - movl -128(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -132(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -132(%rbp) - movl -136(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -128(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -128(%rbp) - movl -140(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -136(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -136(%rbp) - movl -116(%rbp), %eax - movl %eax, %ecx - shrl %cl, -140(%rbp) - jmp ..B1.57 -..B1.50: - movl -144(%rbp), %eax - cmpl $64, %eax - jge ..B1.52 -..B1.51: - movl -144(%rbp), %eax - negl %eax - addl $64, %eax - movl %eax, -120(%rbp) - movl $-32, %eax - addl -144(%rbp), %eax - movl %eax, -116(%rbp) - movl $-1, %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -112(%rbp) - movl -128(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -132(%rbp), %edx - movl $1, %ecx - testl %edx, %edx - cmovne %ecx, %edx - orl %edx, %eax - movl %eax, -124(%rbp) - movl -136(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -128(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -132(%rbp) - movl -140(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -136(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -128(%rbp) - movl -140(%rbp), %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl %eax, -136(%rbp) - movl $0, -140(%rbp) - jmp ..B1.57 -..B1.52: - movl -144(%rbp), %eax - cmpl $96, %eax - jge ..B1.54 -..B1.53: - movl -144(%rbp), %eax - negl %eax - addl $96, %eax - movl %eax, -120(%rbp) - movl $-64, %eax - addl -144(%rbp), %eax - movl %eax, -116(%rbp) - movl $-1, %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -112(%rbp) - movl -136(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -132(%rbp), %edx - orl -128(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -124(%rbp) - movl -140(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -136(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -132(%rbp) - movl -140(%rbp), %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl %eax, -128(%rbp) - movl $0, %eax - movl %eax, -136(%rbp) - movl %eax, -140(%rbp) - jmp ..B1.57 -..B1.54: - movl -144(%rbp), %eax - cmpl $128, %eax - jge ..B1.56 -..B1.55: - movl -144(%rbp), %eax - negl %eax - addl $128, %eax - movl %eax, -120(%rbp) - movl $-96, %eax - addl -144(%rbp), %eax - movl %eax, -116(%rbp) - movl $-1, %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -112(%rbp) - movl -140(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -128(%rbp), %edx - orl -136(%rbp), %edx - orl -132(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -124(%rbp) - movl -140(%rbp), %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl %eax, -132(%rbp) - movl $0, -128(%rbp) - movl $0, %eax - movl %eax, -136(%rbp) - movl %eax, -140(%rbp) - jmp ..B1.57 -..B1.56: - movl -136(%rbp), %eax - orl -140(%rbp), %eax - orl -128(%rbp), %eax - orl -132(%rbp), %eax - movl $1, %eax - movl $0, %edx - cmovne %eax, %edx - movl %edx, -124(%rbp) - movl $0, -132(%rbp) - movl $0, -128(%rbp) - movl $0, %eax - movl %eax, -136(%rbp) - movl %eax, -140(%rbp) -..B1.57: - movl -204(%rbp), %eax - movl -224(%rbp), %edx - cmpl %edx, %eax - jne ..B1.64 -..B1.58: - movl -164(%rbp), %eax - movl %eax, -108(%rbp) - movl -132(%rbp), %eax - addl -164(%rbp), %eax - movl %eax, -164(%rbp) - movl -164(%rbp), %eax - movl -108(%rbp), %edx - cmpl %edx, %eax - jb ..B1.60 -..B1.59: - movl $0, -156(%rbp) - jmp ..B1.61 -..B1.60: - movl $1, -156(%rbp) -..B1.61: - movl -160(%rbp), %eax - movq %rax, -24(%rbp) - movl -128(%rbp), %eax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -156(%rbp), %eax - movslq %eax, %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -24(%rbp), %eax - movl %eax, -160(%rbp) - movq -24(%rbp), %rax - shrq $32, %rax - movl %eax, -156(%rbp) - movl -152(%rbp), %eax - movq %rax, -24(%rbp) - movl -136(%rbp), %eax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -156(%rbp), %eax - movslq %eax, %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -24(%rbp), %eax - movl %eax, -152(%rbp) - movq -24(%rbp), %rax - shrq $32, %rax - movl %eax, -156(%rbp) - movl -140(%rbp), %eax - addl -148(%rbp), %eax - movl %eax, -148(%rbp) - movl -156(%rbp), %eax - addl -148(%rbp), %eax - movl %eax, -148(%rbp) - movl -148(%rbp), %eax - testl $2097152, %eax - je ..B1.63 -..B1.62: - movl -152(%rbp), %eax - shll $31, %eax - movl -164(%rbp), %edx - orl -160(%rbp), %edx - orl -124(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -124(%rbp) - movl -148(%rbp), %eax - shll $31, %eax - movl -152(%rbp), %edx - shrl $1, %edx - orl %edx, %eax - movl %eax, -100(%rbp) - movl -148(%rbp), %eax - shrl $1, %eax - andl $1048575, %eax - movl %eax, -96(%rbp) - movl $1, %eax - addl -200(%rbp), %eax - movl %eax, -200(%rbp) - jmp ..B1.90 -..B1.63: - movl -160(%rbp), %eax - movl -124(%rbp), %edx - orl -164(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -124(%rbp) - movl -152(%rbp), %eax - movl %eax, -100(%rbp) - movl -148(%rbp), %eax - andl $1048575, %eax - movl %eax, -96(%rbp) - jmp ..B1.90 -..B1.64: - movl -124(%rbp), %eax - negl %eax - movl %eax, -124(%rbp) - movl -124(%rbp), %eax - testl %eax, %eax - jne ..B1.66 -..B1.65: - movl $0, -104(%rbp) - jmp ..B1.67 -..B1.66: - movl $1, -104(%rbp) -..B1.67: - movl -164(%rbp), %eax - movq %rax, -24(%rbp) - movl -132(%rbp), %eax - negq %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -104(%rbp), %eax - movslq %eax, %rax - negq %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -24(%rbp), %eax - movl %eax, -164(%rbp) - movq -24(%rbp), %rax - shrq $32, %rax - movl %eax, -104(%rbp) - movl -160(%rbp), %eax - movq %rax, -24(%rbp) - movl -128(%rbp), %eax - negq %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -104(%rbp), %eax - movslq %eax, %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -24(%rbp), %eax - movl %eax, -160(%rbp) - movq -24(%rbp), %rax - shrq $32, %rax - movl %eax, -104(%rbp) - movl -152(%rbp), %eax - movq %rax, -24(%rbp) - movl -136(%rbp), %eax - negq %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -104(%rbp), %eax - movslq %eax, %rax - addq -24(%rbp), %rax - movq %rax, -24(%rbp) - movl -24(%rbp), %eax - movl %eax, -152(%rbp) - movq -24(%rbp), %rax - shrq $32, %rax - movl %eax, -104(%rbp) - movl -140(%rbp), %eax - negl %eax - addl -148(%rbp), %eax - movl %eax, -148(%rbp) - movl -104(%rbp), %eax - addl -148(%rbp), %eax - movl %eax, -148(%rbp) - movl -148(%rbp), %eax - testl %eax, %eax - je ..B1.69 -..B1.68: - movl -148(%rbp), %eax - shll $11, %eax - movl %eax, -108(%rbp) - movl $0, -144(%rbp) - jmp ..B1.78 -..B1.69: - movl -152(%rbp), %eax - testl %eax, %eax - je ..B1.71 -..B1.70: - movl -152(%rbp), %eax - movl %eax, -108(%rbp) - movl $21, -144(%rbp) - jmp ..B1.78 -..B1.71: - movl -160(%rbp), %eax - testl %eax, %eax - je ..B1.73 -..B1.72: - movl -160(%rbp), %eax - movl %eax, -108(%rbp) - movl $53, -144(%rbp) - jmp ..B1.78 -..B1.73: - movl -164(%rbp), %eax - testl %eax, %eax - je ..B1.75 -..B1.74: - movl -164(%rbp), %eax - movl %eax, -108(%rbp) - movl $85, -144(%rbp) - jmp ..B1.78 -..B1.75: - movl -124(%rbp), %eax - testl %eax, %eax - je ..B1.77 -..B1.76: - movl -124(%rbp), %eax - movl %eax, -108(%rbp) - movl $117, -144(%rbp) - jmp ..B1.78 -..B1.77: - movl -268(%rbp), %eax - movl $1, %edx - movl $0, %ecx - cmpl $8192, %eax - cmove %edx, %ecx - movslq %ecx, %rcx - shlq $3, %rcx - lea _zeros(%rip), %rax - addq %rcx, %rax - movsd (%rax), %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.78: - movl -108(%rbp), %eax - testl $-2147483648, %eax - jne ..B1.80 -..B1.79: - shll $1, -108(%rbp) - movl $1, %eax - addl -144(%rbp), %eax - movl %eax, -144(%rbp) - jmp ..B1.78 -..B1.80: - movl -144(%rbp), %eax - cmpl $32, %eax - jge ..B1.82 -..B1.81: - movl -144(%rbp), %eax - movl %eax, -120(%rbp) - movl -144(%rbp), %eax - negl %eax - addl $32, %eax - movl %eax, -116(%rbp) - movl $1, %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - decl %eax - movl %eax, -92(%rbp) - movl -160(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -124(%rbp), %edx - orl -164(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -124(%rbp) - movl -152(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -160(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - andl -92(%rbp), %edx - orl %edx, %eax - movl %eax, -100(%rbp) - movl -148(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -152(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - andl -92(%rbp), %edx - orl %edx, %eax - andl $1048575, %eax - movl %eax, -96(%rbp) - jmp ..B1.89 -..B1.82: - movl -144(%rbp), %eax - cmpl $64, %eax - jge ..B1.84 -..B1.83: - movl $-32, %eax - addl -144(%rbp), %eax - movl %eax, -120(%rbp) - movl -144(%rbp), %eax - negl %eax - addl $64, %eax - movl %eax, -116(%rbp) - movl $1, %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - decl %eax - movl %eax, -92(%rbp) - movl -164(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -124(%rbp), %edx - movl $1, %ecx - testl %edx, %edx - cmovne %ecx, %edx - orl %edx, %eax - movl %eax, -124(%rbp) - movl -160(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -164(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - andl -92(%rbp), %edx - orl %edx, %eax - movl %eax, -100(%rbp) - movl -152(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -160(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - andl -92(%rbp), %edx - orl %edx, %eax - andl $1048575, %eax - movl %eax, -96(%rbp) - jmp ..B1.89 -..B1.84: - movl -144(%rbp), %eax - cmpl $96, %eax - jge ..B1.86 -..B1.85: - movl $-64, %eax - addl -144(%rbp), %eax - movl %eax, -120(%rbp) - movl -144(%rbp), %eax - negl %eax - addl $96, %eax - movl %eax, -116(%rbp) - movl $1, %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - decl %eax - movl %eax, -92(%rbp) - movl -120(%rbp), %eax - movl %eax, %ecx - shll %cl, -124(%rbp) - movl -164(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -124(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - andl -92(%rbp), %edx - orl %edx, %eax - movl %eax, -100(%rbp) - movl -160(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -164(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - andl -92(%rbp), %edx - orl %edx, %eax - andl $1048575, %eax - movl %eax, -96(%rbp) - jmp ..B1.89 -..B1.86: - movl -144(%rbp), %eax - cmpl $128, %eax - jge ..B1.88 -..B1.87: - movl $-96, %eax - addl -144(%rbp), %eax - movl %eax, -120(%rbp) - movl -144(%rbp), %eax - negl %eax - addl $128, %eax - movl %eax, -116(%rbp) - movl $1, %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - decl %eax - movl %eax, -92(%rbp) - movl $0, -124(%rbp) - movl -124(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl %eax, -100(%rbp) - movl -164(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -124(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - andl -92(%rbp), %edx - orl %edx, %eax - andl $1048575, %eax - movl %eax, -96(%rbp) - jmp ..B1.89 -..B1.88: - movl $-128, %eax - addl -144(%rbp), %eax - movl %eax, -120(%rbp) - movl $0, %eax - movl %eax, -100(%rbp) - movl %eax, -124(%rbp) - movl -124(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl $1048575, %eax - movl %eax, -96(%rbp) -..B1.89: - movl -144(%rbp), %eax - negl %eax - addl -200(%rbp), %eax - movl %eax, -200(%rbp) -..B1.90: - movl $-1, %eax - addl -200(%rbp), %eax - cmpl $2046, %eax - jb ..B1.98 -..B1.91: - movl -200(%rbp), %eax - cmpl $2047, %eax - jl ..B1.93 -..B1.92: - shrl $31, -204(%rbp) - movl -204(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _large_value_64(%rip), %rdx - addq %rax, %rdx - movsd (%rdx), %xmm0 - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, -16(%rbp) - movsd %xmm0, -8(%rbp) - movsd -8(%rbp), %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.93: - orl $1048576, -96(%rbp) - movl -200(%rbp), %eax - negl %eax - incl %eax - movl %eax, -144(%rbp) - movl -144(%rbp), %eax - cmpl $32, %eax - jge ..B1.95 -..B1.94: - movl -144(%rbp), %eax - negl %eax - addl $32, %eax - movl %eax, -120(%rbp) - movl -144(%rbp), %eax - movl %eax, -116(%rbp) - movl $-1, %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -112(%rbp) - movl -100(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -124(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl -124(%rbp), %edx - movl -120(%rbp), %ecx - shll %cl, %edx - movl -112(%rbp), %ecx - testl %ecx, %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -124(%rbp) - movl -96(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -100(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -100(%rbp) - movl -116(%rbp), %eax - movl %eax, %ecx - shrl %cl, -96(%rbp) - jmp ..B1.99 -..B1.95: - movl -144(%rbp), %eax - cmpl $53, %eax - jg ..B1.97 -..B1.96: - movl -144(%rbp), %eax - negl %eax - addl $64, %eax - movl %eax, -120(%rbp) - movl $-32, %eax - addl -144(%rbp), %eax - movl %eax, -116(%rbp) - movl $-1, %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -112(%rbp) - movl -96(%rbp), %eax - movl -120(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -112(%rbp), %eax - movl -100(%rbp), %edx - movl -116(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl -100(%rbp), %edx - movl -120(%rbp), %ecx - shll %cl, %edx - andl -112(%rbp), %edx - orl -124(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -124(%rbp) - movl -96(%rbp), %eax - movl -116(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl %eax, -100(%rbp) - movl $0, -96(%rbp) - jmp ..B1.99 -..B1.97: - movl $1, -124(%rbp) - movl $0, %eax - movl %eax, -100(%rbp) - movl %eax, -96(%rbp) - jmp ..B1.99 -..B1.98: - movl -200(%rbp), %eax - shll $20, %eax - orl -96(%rbp), %eax - movl %eax, -96(%rbp) -..B1.99: - movl -124(%rbp), %eax - testl %eax, %eax - je ..B1.136 -..B1.100: - lea _ones(%rip), %rax - lea _small_value_64(%rip), %rdx - movsd (%rax), %xmm0 - movsd (%rdx), %xmm1 - addsd %xmm1, %xmm0 - movsd %xmm0, -16(%rbp) - movl -268(%rbp), %eax - movl %eax, -88(%rbp) - testl %eax, %eax - je ..B1.104 -..B1.101: - movl -88(%rbp), %eax - cmpl $24576, %eax - je ..B1.108 -..B1.102: - movl -88(%rbp), %eax - cmpl $16384, %eax - je ..B1.112 -..B1.103: - movl -88(%rbp), %eax - cmpl $8192, %eax - je ..B1.124 - jmp ..B1.136 -..B1.104: - movl -124(%rbp), %eax - testl $-2147483648, %eax - je ..B1.108 -..B1.105: - movl -100(%rbp), %eax - andl $1, %eax - movl -124(%rbp), %edx - andl $2147483647, %edx - orl %edx, %eax - je ..B1.108 -..B1.106: - movl $1, %eax - addl -100(%rbp), %eax - movl %eax, -100(%rbp) - movl $1, %eax - movl $0, %edx - cmove %eax, %edx - addl -96(%rbp), %edx - movl %edx, -96(%rbp) - movl -96(%rbp), %eax - cmpl $2146435072, %eax - jb ..B1.108 -..B1.107: - shrl $31, -204(%rbp) - movl -204(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _large_value_64(%rip), %rdx - addq %rax, %rdx - movsd (%rdx), %xmm0 - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, -16(%rbp) - movsd %xmm0, -8(%rbp) - movsd -8(%rbp), %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.108: - movl -96(%rbp), %eax - cmpl $1048576, %eax - jb ..B1.111 -..B1.109: - movl $-1048576, %eax - addl -96(%rbp), %eax - orl -100(%rbp), %eax - jne ..B1.136 -..B1.110: - movl -124(%rbp), %eax - cmpl $-2147483648, %eax - jne ..B1.136 -..B1.111: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, -16(%rbp) - jmp ..B1.136 -..B1.112: - movl -204(%rbp), %eax - testl %eax, %eax - je ..B1.114 -..B1.113: - movl -96(%rbp), %eax - cmpl $1048576, %eax - jb ..B1.120 -..B1.114: - movl -204(%rbp), %eax - testl %eax, %eax - jne ..B1.121 -..B1.115: - movl -96(%rbp), %eax - cmpl $1048575, %eax - jb ..B1.120 -..B1.116: - movl -96(%rbp), %eax - cmpl $1048575, %eax - jne ..B1.121 -..B1.117: - movl -100(%rbp), %eax - cmpl $-1, %eax - jb ..B1.120 -..B1.118: - movl -100(%rbp), %eax - cmpl $-1, %eax - jne ..B1.121 -..B1.119: - movl -124(%rbp), %eax - cmpl $-2147483648, %eax - jae ..B1.121 -..B1.120: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, -16(%rbp) -..B1.121: - movl -204(%rbp), %eax - testl %eax, %eax - jne ..B1.136 -..B1.122: - movl $1, %eax - addl -100(%rbp), %eax - movl %eax, -100(%rbp) - movl $1, %eax - movl $0, %edx - cmove %eax, %edx - addl -96(%rbp), %edx - movl %edx, -96(%rbp) - movl -96(%rbp), %eax - cmpl $2146435072, %eax - jb ..B1.136 -..B1.123: - shrl $31, -204(%rbp) - movl -204(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _large_value_64(%rip), %rdx - addq %rax, %rdx - movsd (%rdx), %xmm0 - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, -16(%rbp) - movsd %xmm0, -8(%rbp) - movsd -8(%rbp), %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.124: - movl -204(%rbp), %eax - testl %eax, %eax - jne ..B1.126 -..B1.125: - movl -96(%rbp), %eax - cmpl $1048576, %eax - jb ..B1.132 -..B1.126: - movl -204(%rbp), %eax - testl %eax, %eax - je ..B1.133 -..B1.127: - movl -96(%rbp), %eax - cmpl $1048575, %eax - jb ..B1.132 -..B1.128: - movl -96(%rbp), %eax - cmpl $1048575, %eax - jne ..B1.133 -..B1.129: - movl -100(%rbp), %eax - cmpl $-1, %eax - jb ..B1.132 -..B1.130: - movl -100(%rbp), %eax - cmpl $-1, %eax - jne ..B1.133 -..B1.131: - movl -124(%rbp), %eax - cmpl $-2147483648, %eax - jae ..B1.133 -..B1.132: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, -16(%rbp) -..B1.133: - movl -204(%rbp), %eax - testl %eax, %eax - je ..B1.136 -..B1.134: - movl $1, %eax - addl -100(%rbp), %eax - movl %eax, -100(%rbp) - movl $1, %eax - movl $0, %edx - cmove %eax, %edx - addl -96(%rbp), %edx - movl %edx, -96(%rbp) - movl -96(%rbp), %eax - cmpl $2146435072, %eax - jb ..B1.136 -..B1.135: - shrl $31, -204(%rbp) - movl -204(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _large_value_64(%rip), %rdx - addq %rax, %rdx - movsd (%rdx), %xmm0 - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, -16(%rbp) - movsd %xmm0, -8(%rbp) - movsd -8(%rbp), %xmm0 - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.136: - movl -96(%rbp), %eax - orl -204(%rbp), %eax - lea -8(%rbp), %rdx - addq $4, %rdx - movl %eax, (%rdx) - lea -8(%rbp), %rax - movl -100(%rbp), %edx - movl %edx, (%rax) - movsd -8(%rbp), %xmm0 - leave - .cfi_restore 6 - ret - .cfi_endproc - .type fma,@function - .size fma,.-fma - .data -# -- End fma - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaf_gen.S deleted file mode 100644 index a51bcef8cb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaf_gen.S +++ /dev/null @@ -1,683 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmaf_gen.c" - .text -..TXTST0: -# -- Begin fmaf - .text - .align 16,0x90 - .globl fmaf -fmaf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -# parameter 3: %xmm2 -..B1.1: - .cfi_startproc -..___tag_value_fmaf.1: -..L2: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - pushq %rbp - .cfi_def_cfa_offset 40 - .cfi_offset 6, -40 - subq $40, %rsp - .cfi_def_cfa_offset 80 - movss %xmm0, 8(%rsp) - movss %xmm1, 16(%rsp) - movss %xmm2, 24(%rsp) -..B1.2: - stmxcsr 12(%rsp) -..B1.3: - movl 16(%rsp), %r8d - movl %r8d, %ebp - movl 24(%rsp), %r11d - movl %r11d, %r10d - movl 8(%rsp), %esi - movl %esi, %ebx - movzwl 12(%rsp), %edi - andl $2147483647, %ebp - andl $24576, %edi - andl $2147483647, %r10d - andl $2147483647, %ebx - je ..B1.86 -..B1.4: - cmpl $2139095040, %ebx - jae ..B1.86 -..B1.5: - cmpl $1065353216, %ebx - je ..B1.86 -..B1.6: - testl %ebp, %ebp - je ..B1.86 -..B1.7: - cmpl $2139095040, %ebp - jae ..B1.86 -..B1.8: - cmpl $1065353216, %ebp - je ..B1.86 -..B1.9: - testl %r10d, %r10d - je ..B1.86 -..B1.10: - cmpl $2139095040, %r10d - jae ..B1.86 -..B1.11: - cmpl $8388608, %ebx - jae ..B1.13 -..B1.12: - movl %esi, %eax - orl $1065353216, %esi - movl %esi, 8(%rsp) - lea _ones(%rip), %rsi - shrl $31, %eax - movss 8(%rsp), %xmm0 - subss (%rsi,%rax,4), %xmm0 - movd %xmm0, %esi - movss %xmm0, 8(%rsp) - movl %esi, %ebx - andl $2147483647, %ebx - movl %ebx, %ecx - shrl $23, %ecx - addl $-126, %ecx - jmp ..B1.14 -..B1.13: - movl %ebx, %ecx - shrl $23, %ecx -..B1.14: - cmpl $8388608, %ebp - jae ..B1.16 -..B1.15: - movl %r8d, %eax - orl $1065353216, %r8d - movl %r8d, 16(%rsp) - lea _ones(%rip), %r8 - shrl $31, %eax - movss 16(%rsp), %xmm0 - subss (%r8,%rax,4), %xmm0 - movd %xmm0, %r8d - movss %xmm0, 16(%rsp) - movl %r8d, %ebp - andl $2147483647, %ebp - movl %ebp, %edx - shrl $23, %edx - addl $-126, %edx - jmp ..B1.17 -..B1.16: - movl %ebp, %edx - shrl $23, %edx -..B1.17: - cmpl $8388608, %r10d - jae ..B1.19 -..B1.18: - movl %r11d, %eax - orl $1065353216, %r11d - movl %r11d, 24(%rsp) - lea _ones(%rip), %r11 - shrl $31, %eax - movss 24(%rsp), %xmm0 - subss (%r11,%rax,4), %xmm0 - movd %xmm0, %r11d - movss %xmm0, 24(%rsp) - movl %r11d, %r10d - andl $2147483647, %r10d - movl %r10d, %eax - shrl $23, %eax - addl $-126, %eax - jmp ..B1.20 -..B1.19: - movl %r10d, %eax - shrl $23, %eax -..B1.20: - lea -127(%rcx,%rdx), %r9d - andq $8388607, %rbx - andq $8388607, %rbp - orq $8388608, %rbx - orq $8388608, %rbp - andl $8388607, %r10d - imulq %rbp, %rbx - movq %rbx, %rdx - xorl %r8d, %esi - shrq $32, %rdx - orl $8388608, %r10d - andl $-2147483648, %esi - movl %ebx, %ebp - testl $32768, %edx - je ..B1.22 -..B1.21: - shrq $24, %rbx - incl %r9d - shll $8, %ebp - jmp ..B1.23 -..B1.22: - shrq $23, %rbx - shll $9, %ebp -..B1.23: - cmpl %eax, %r9d - jg ..B1.26 -..B1.24: - jne ..B1.27 -..B1.25: - cmpl %r10d, %ebx - jb ..B1.27 -..B1.26: - movl %r9d, %r8d - xorl %edx, %edx - subl %eax, %r8d - movl %r10d, %eax - movl %r11d, %r10d - andl $-2147483648, %r10d - jmp ..B1.28 -..B1.27: - movl %eax, %r8d - movl %ebp, %edx - subl %r9d, %r8d - movl %eax, %r9d - movl %ebx, %eax - movl %r10d, %ebx - movl %esi, %r10d - movl %r11d, %esi - xorl %ebp, %ebp - andl $-2147483648, %esi -..B1.28: - xorl %r14d, %r14d - testl %r8d, %r8d - je ..B1.95 -..B1.29: - cmpl $32, %r8d - jge ..B1.31 -..B1.30: - movl %r8d, %r15d - movl %r8d, %ecx - negl %r15d - movl $-1, %r11d - shrl %cl, %r11d - movl %r15d, %ecx - movl %edx, %r14d - notl %r11d - shll %cl, %r14d - movl %r15d, %ecx - movl %eax, %r15d - shll %cl, %r15d - movl %r8d, %ecx - shrl %cl, %edx - andl %r11d, %r15d - movl %r8d, %ecx - orl %r15d, %edx - shrl %cl, %eax - movl $1, %r11d - jmp ..B1.34 -..B1.31: - cmpl $64, %r8d - jge ..B1.33 -..B1.32: - movl %r8d, %r14d - movl %r8d, %ecx - negl %r14d - movl $-1, %r11d - shrl %cl, %r11d - movl %r14d, %ecx - movl %eax, %r14d - notl %r11d - shll %cl, %r14d - movl %r8d, %ecx - andl %r11d, %r14d - movl $1, %r11d - testl %edx, %edx - cmovne %r11d, %edx - orl %edx, %r14d - movl %eax, %edx - shrl %cl, %edx - xorl %eax, %eax - jmp ..B1.34 -..B1.33: - movl $1, %r11d - orl %eax, %edx - cmovne %r11d, %r14d - xorl %edx, %edx - xorl %eax, %eax - jmp ..B1.34 -..B1.95: - movl $1, %r11d -..B1.34: - cmpl %r10d, %esi - jne ..B1.38 -..B1.35: - addl %ebp, %edx - addl %eax, %ebx - cmpl %ebp, %edx - movl $0, %ebp - setb %bpl - addl %ebp, %ebx - testl $16777216, %ebx - je ..B1.37 -..B1.36: - orl %r14d, %edx - movl %ebx, %eax - movl $0, %edx - cmovne %r11d, %edx - incl %r9d - shll $31, %eax - shrl $1, %ebx - orl %edx, %eax - andl $8388607, %ebx - jmp ..B1.54 -..B1.37: - testl %r14d, %r14d - movl %edx, %eax - cmovne %r11d, %r14d - andl $8388607, %ebx - orl %r14d, %eax - jmp ..B1.54 -..B1.38: - xorl %r8d, %r8d - negl %r14d - cmovne %r11d, %r8d - negl %edx - addl %ebp, %edx - subl %eax, %ebx - subl %r8d, %edx - cmpl %ebp, %edx - movl $0, %ebp - seta %bpl - subl %ebp, %ebx - je ..B1.40 -..B1.39: - movl %ebx, %eax - xorl %ebp, %ebp - shll $8, %eax - jmp ..B1.44 -..B1.40: - testl %edx, %edx - je ..B1.42 -..B1.41: - movl %edx, %eax - movl $24, %ebp - jmp ..B1.44 -..B1.42: - testl %r14d, %r14d - je ..B1.85 -..B1.43: - movl %r14d, %eax - movl $56, %ebp -..B1.44: - testl $-2147483648, %eax - jne ..B1.48 -..B1.46: - addl %eax, %eax - incl %ebp - testl $-2147483648, %eax - je ..B1.46 -..B1.48: - cmpl $32, %ebp - jge ..B1.50 -..B1.49: - movl %ebp, %eax - movl %ebp, %ecx - negl %eax - movl %edx, %r10d - shll %cl, %ebx - movl %eax, %ecx - shrl %cl, %r10d - movl %ebp, %ecx - movl %r11d, %r8d - testl %r14d, %r14d - cmovne %r11d, %r14d - shll %cl, %r8d - movl %ebp, %ecx - decl %r8d - shll %cl, %edx - andl %r8d, %r10d - orl %r10d, %ebx - movl %edx, %eax - andl $8388607, %ebx - orl %r14d, %eax - jmp ..B1.53 -..B1.50: - cmpl $64, %ebp - jge ..B1.52 -..B1.51: - movl %ebp, %eax - movl %ebp, %ecx - negl %eax - movl %r14d, %r8d - shll %cl, %edx - movl %eax, %ecx - shrl %cl, %r8d - movl %ebp, %ecx - movl %r11d, %ebx - movl %r14d, %eax - shll %cl, %ebx - movl %ebp, %ecx - decl %ebx - andl %ebx, %r8d - orl %r8d, %edx - movl %edx, %ebx - shll %cl, %eax - andl $8388607, %ebx - jmp ..B1.53 -..B1.52: - movl %ebp, %ecx - xorl %eax, %eax - shll %cl, %r14d - movl %r14d, %ebx - andl $8388607, %ebx -..B1.53: - subl %ebp, %r9d -..B1.54: - lea -1(%r9), %edx - cmpl $254, %edx - jb ..B1.60 -..B1.55: - cmpl $255, %r9d - jge ..B1.90 -..B1.56: - negl %r9d - incl %r9d - cmpl $24, %r9d - jg ..B1.58 -..B1.57: - movl %r9d, %edx - movl %r9d, %ecx - negl %edx - movl $-1, %ebp - orl $8388608, %ebx - testl %eax, %eax - movl %ebx, %r8d - cmovne %r11d, %eax - shrl %cl, %ebp - movl %edx, %ecx - shll %cl, %r8d - notl %ebp - andl %ebp, %r8d - movl %r9d, %ecx - shrl %cl, %ebx - orl %r8d, %eax - jmp ..B1.61 -..B1.58: - movl %r11d, %eax - xorl %ebx, %ebx - jmp ..B1.62 -..B1.60: - shll $23, %r9d - orl %r9d, %ebx -..B1.61: - testl %eax, %eax - je ..B1.84 -..B1.62: - movl $1065353216, (%rsp) - testl %edi, %edi - je ..B1.87 -..B1.63: - cmpl $24576, %edi - je ..B1.80 -..B1.64: - cmpl $16384, %edi - jne ..B1.72 -..B1.65: - testl %esi, %esi - je ..B1.67 -..B1.66: - cmpl $8388608, %ebx - jb ..B1.70 - jmp ..B1.84 -..B1.67: - cmpl $8388607, %ebx - jb ..B1.70 -..B1.68: - jne ..B1.71 -..B1.69: - cmpl $-2147483648, %eax - jae ..B1.71 -..B1.70: - movss .L_2il0floatpacket.1(%rip), %xmm0 - testl %esi, %esi - mulss %xmm0, %xmm0 - movss %xmm0, (%rsp) - jne ..B1.84 -..B1.71: - incl %ebx - cmpl $2139095040, %ebx - jae ..B1.90 - jmp ..B1.84 -..B1.72: - cmpl $8192, %edi - jne ..B1.84 -..B1.73: - testl %esi, %esi - jne ..B1.75 -..B1.74: - cmpl $8388608, %ebx - jb ..B1.78 - jmp ..B1.84 -..B1.75: - cmpl $8388607, %ebx - jb ..B1.78 -..B1.76: - jne ..B1.79 -..B1.77: - cmpl $-2147483648, %eax - jae ..B1.79 -..B1.78: - movss .L_2il0floatpacket.1(%rip), %xmm0 - testl %esi, %esi - mulss %xmm0, %xmm0 - movss %xmm0, (%rsp) - je ..B1.84 -..B1.79: - incl %ebx - cmpl $2139095040, %ebx - jae ..B1.90 - jmp ..B1.84 -..B1.80: - cmpl $8388608, %ebx - jb ..B1.83 -..B1.81: - jne ..B1.84 -..B1.82: - cmpl $-2147483648, %eax - jne ..B1.84 -..B1.83: - movss .L_2il0floatpacket.1(%rip), %xmm0 - mulss %xmm0, %xmm0 - movss %xmm0, (%rsp) -..B1.84: - orl %ebx, %esi - movl %esi, 4(%rsp) - movss 4(%rsp), %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.85: - xorl %edx, %edx - cmpl $8192, %edi - lea _zeros(%rip), %rcx - sete %dl - movss (%rcx,%rdx,4), %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.86: - movss 8(%rsp), %xmm0 - mulss 16(%rsp), %xmm0 - addss 24(%rsp), %xmm0 - movss %xmm0, 4(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.87: - testl $-2147483648, %eax - je ..B1.80 -..B1.88: - movl %ebx, %ecx - movl %eax, %edx - andl $1, %ecx - andl $2147483647, %edx - orl %edx, %ecx - je ..B1.80 -..B1.89: - incl %ebx - cmpl $2139095040, %ebx - jb ..B1.80 -..B1.90: - lea _large_value_32(%rip), %rax - shrl $31, %esi - movss (%rax,%rsi,4), %xmm0 - mulss .L_2il0floatpacket.0(%rip), %xmm0 - movss %xmm0, (%rsp) - movss %xmm0, 4(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fmaf,@function - .size fmaf,.-fmaf - .data -# -- End fmaf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x71800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x0d800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x3f800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmal.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmal.S deleted file mode 100644 index 6f18fb06bb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmal.S +++ /dev/null @@ -1,2062 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmal.c" - .text -..TXTST0: -# -- Begin fmal - .text - - .globl fmal -fmal: -# parameter 1: 16 + %rbp -# parameter 2: 32 + %rbp -# parameter 3: 48 + %rbp -..B1.1: - .cfi_startproc -..___tag_value_fmal.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - movq %rsp, %rbp - .cfi_def_cfa 6, 16 - .cfi_offset 6, -16 - subq $336, %rsp - lea 16(%rbp), %rax - movq %rax, -128(%rbp) - lea 32(%rbp), %rax - movq %rax, -120(%rbp) - lea 48(%rbp), %rax - movq %rax, -112(%rbp) - lea -32(%rbp), %rax - movq %rax, -104(%rbp) - movl $0, -328(%rbp) -..B1.2: - fnstcw -336(%rbp) -..B1.3: - fnstcw -334(%rbp) -..B1.4: - movzwl -334(%rbp), %eax - movzwl %ax, %eax - andl $3072, %eax - movl %eax, -324(%rbp) - movq -128(%rbp), %rax - movzbl 9(%rax), %eax - movzbl %al, %eax - andl $128, %eax - shrl $7, %eax - movl %eax, -320(%rbp) - movq -128(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $32767, %eax - movl %eax, -316(%rbp) - movq -120(%rbp), %rax - movzbl 9(%rax), %eax - movzbl %al, %eax - andl $128, %eax - shrl $7, %eax - movl %eax, -312(%rbp) - movq -120(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $32767, %eax - movl %eax, -308(%rbp) - movq -112(%rbp), %rax - movzbl 9(%rax), %eax - movzbl %al, %eax - andl $128, %eax - shrl $7, %eax - movl %eax, -304(%rbp) - movq -112(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $32767, %eax - movl %eax, -300(%rbp) - movl -316(%rbp), %eax - cmpl $32767, %eax - je ..B1.22 -..B1.5: - movl -316(%rbp), %eax - testl %eax, %eax - jne ..B1.8 -..B1.6: - movq -128(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.8 -..B1.7: - movq -128(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.22 -..B1.8: - movl -316(%rbp), %eax - cmpl $16383, %eax - jne ..B1.11 -..B1.9: - movq -128(%rbp), %rax - movl 4(%rax), %eax - cmpl $-2147483648, %eax - jne ..B1.11 -..B1.10: - movq -128(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.22 -..B1.11: - movl -308(%rbp), %eax - cmpl $32767, %eax - je ..B1.22 -..B1.12: - movl -308(%rbp), %eax - testl %eax, %eax - jne ..B1.15 -..B1.13: - movq -120(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.15 -..B1.14: - movq -120(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.22 -..B1.15: - movl -308(%rbp), %eax - cmpl $16383, %eax - jne ..B1.18 -..B1.16: - movq -120(%rbp), %rax - movl 4(%rax), %eax - cmpl $-2147483648, %eax - jne ..B1.18 -..B1.17: - movq -120(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.22 -..B1.18: - movl -300(%rbp), %eax - cmpl $32767, %eax - je ..B1.22 -..B1.19: - movl -300(%rbp), %eax - testl %eax, %eax - jne ..B1.87 -..B1.20: - movq -112(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.87 -..B1.21: - movq -112(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - jne ..B1.87 -..B1.22: - movl -316(%rbp), %eax - testl %eax, %eax - jne ..B1.25 -..B1.23: - movq -128(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.31 -..B1.24: - movq -128(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - jne ..B1.31 -..B1.25: - movl -308(%rbp), %eax - testl %eax, %eax - jne ..B1.28 -..B1.26: - movq -120(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.31 -..B1.27: - movq -120(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - jne ..B1.31 -..B1.28: - movl -300(%rbp), %eax - testl %eax, %eax - jne ..B1.32 -..B1.29: - movq -112(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.31 -..B1.30: - movq -112(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.32 -..B1.31: - lea _smallest_value_64(%rip), %rax - movsd (%rax), %xmm0 - movsd %xmm0, -96(%rbp) -..B1.32: - movl -316(%rbp), %eax - cmpl $32767, %eax - jne ..B1.43 -..B1.33: - movq -128(%rbp), %rax - movl 4(%rax), %eax - cmpl $-2147483648, %eax - jne ..B1.35 -..B1.34: - movq -128(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.43 -..B1.35: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.39 -..B1.36: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $-769, %eax - orl $768, %eax - movw %ax, -332(%rbp) -..B1.37: - fldcw -332(%rbp) -..B1.38: - movl $1, -328(%rbp) -..B1.39: - fldt 16(%rbp) - fldt 32(%rbp) - fmulp %st, %st(1) - fstpt -32(%rbp) - fldt -32(%rbp) - fldt 48(%rbp) - fmulp %st, %st(1) - fstpt -32(%rbp) - movl -328(%rbp), %eax - testl %eax, %eax - je ..B1.42 -..B1.40: - fldcw -336(%rbp) -..B1.41: - movl $0, -328(%rbp) -..B1.42: - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.43: - movl -308(%rbp), %eax - cmpl $32767, %eax - jne ..B1.54 -..B1.44: - movq -120(%rbp), %rax - movl 4(%rax), %eax - cmpl $-2147483648, %eax - jne ..B1.46 -..B1.45: - movq -120(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.54 -..B1.46: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.50 -..B1.47: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $-769, %eax - orl $768, %eax - movw %ax, -332(%rbp) -..B1.48: - fldcw -332(%rbp) -..B1.49: - movl $1, -328(%rbp) -..B1.50: - fldt 32(%rbp) - fldt 48(%rbp) - fmulp %st, %st(1) - fstpt -32(%rbp) - fldt -32(%rbp) - fldt 16(%rbp) - fmulp %st, %st(1) - fstpt -32(%rbp) - movl -328(%rbp), %eax - testl %eax, %eax - je ..B1.53 -..B1.51: - fldcw -336(%rbp) -..B1.52: - movl $0, -328(%rbp) -..B1.53: - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.54: - movl -300(%rbp), %eax - cmpl $32767, %eax - jne ..B1.65 -..B1.55: - movq -112(%rbp), %rax - movl 4(%rax), %eax - cmpl $-2147483648, %eax - jne ..B1.57 -..B1.56: - movq -112(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.65 -..B1.57: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.61 -..B1.58: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $-769, %eax - orl $768, %eax - movw %ax, -332(%rbp) -..B1.59: - fldcw -332(%rbp) -..B1.60: - movl $1, -328(%rbp) -..B1.61: - fldt 48(%rbp) - fldt 16(%rbp) - fmulp %st, %st(1) - fstpt -32(%rbp) - fldt -32(%rbp) - fldt 32(%rbp) - fmulp %st, %st(1) - fstpt -32(%rbp) - movl -328(%rbp), %eax - testl %eax, %eax - je ..B1.64 -..B1.62: - fldcw -336(%rbp) -..B1.63: - movl $0, -328(%rbp) -..B1.64: - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.65: - movl -316(%rbp), %eax - cmpl $32767, %eax - jge ..B1.69 -..B1.66: - movl -308(%rbp), %eax - cmpl $32767, %eax - jge ..B1.69 -..B1.67: - movl -300(%rbp), %eax - cmpl $32767, %eax - jne ..B1.69 -..B1.68: - fldt 48(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.69: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.73 -..B1.70: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $-769, %eax - orl $768, %eax - movw %ax, -332(%rbp) -..B1.71: - fldcw -332(%rbp) -..B1.72: - movl $1, -328(%rbp) -..B1.73: - fldt 16(%rbp) - fldt 32(%rbp) - fmulp %st, %st(1) - fstpt -32(%rbp) - movq -128(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - jne ..B1.76 -..B1.74: - movq -128(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.76 -..B1.75: - movq -128(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.82 -..B1.76: - movq -120(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - jne ..B1.79 -..B1.77: - movq -120(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.79 -..B1.78: - movq -120(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.82 -..B1.79: - movq -104(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - jne ..B1.82 -..B1.80: - movq -104(%rbp), %rax - movl 4(%rax), %eax - testl %eax, %eax - jne ..B1.82 -..B1.81: - movq -104(%rbp), %rax - movl (%rax), %eax - testl %eax, %eax - je ..B1.83 -..B1.82: - fldt -32(%rbp) - fldt 48(%rbp) - faddp %st, %st(1) - fstpt -32(%rbp) -..B1.83: - movl -328(%rbp), %eax - testl %eax, %eax - je ..B1.86 -..B1.84: - fldcw -336(%rbp) -..B1.85: - movl $0, -328(%rbp) -..B1.86: - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.87: - movq -128(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - je ..B1.90 -..B1.88: - movq -120(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - je ..B1.90 -..B1.89: - movq -112(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - jne ..B1.103 -..B1.90: - lea _smallest_value_64(%rip), %rax - movsd (%rax), %xmm0 - movsd %xmm0, -96(%rbp) - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.94 -..B1.91: - movzwl -336(%rbp), %eax - movzwl %ax, %eax - andl $-769, %eax - orl $768, %eax - movw %ax, -332(%rbp) -..B1.92: - fldcw -332(%rbp) -..B1.93: - movl $1, -328(%rbp) -..B1.94: - movq -128(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - jne ..B1.96 -..B1.95: - movq -128(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $-32768, %eax - orl $16383, %eax - movq -128(%rbp), %rdx - movw %ax, 8(%rdx) - movq -128(%rbp), %rax - movl 4(%rax), %eax - orl $-2147483648, %eax - movq -128(%rbp), %rdx - movl %eax, 4(%rdx) - movl -320(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _ones(%rip), %rdx - addq %rax, %rdx - movsd (%rdx), %xmm0 - movsd %xmm0, -48(%rbp) - fldl -48(%rbp) - fldt 16(%rbp) - fsubp %st, %st(1) - fstpt 16(%rbp) - movq -128(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $32767, %eax - addl $-16382, %eax - movl %eax, -316(%rbp) -..B1.96: - movq -120(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - jne ..B1.98 -..B1.97: - movq -120(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $-32768, %eax - orl $16383, %eax - movq -120(%rbp), %rdx - movw %ax, 8(%rdx) - movq -120(%rbp), %rax - movl 4(%rax), %eax - orl $-2147483648, %eax - movq -120(%rbp), %rdx - movl %eax, 4(%rdx) - movl -312(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _ones(%rip), %rdx - addq %rax, %rdx - movsd (%rdx), %xmm0 - movsd %xmm0, -48(%rbp) - fldl -48(%rbp) - fldt 32(%rbp) - fsubp %st, %st(1) - fstpt 32(%rbp) - movq -120(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $32767, %eax - addl $-16382, %eax - movl %eax, -308(%rbp) -..B1.98: - movq -112(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - testl $32767, %eax - jne ..B1.100 -..B1.99: - movq -112(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $-32768, %eax - orl $16383, %eax - movq -112(%rbp), %rdx - movw %ax, 8(%rdx) - movq -112(%rbp), %rax - movl 4(%rax), %eax - orl $-2147483648, %eax - movq -112(%rbp), %rdx - movl %eax, 4(%rdx) - movl -304(%rbp), %eax - movslq %eax, %rax - shlq $3, %rax - lea _ones(%rip), %rdx - addq %rax, %rdx - movsd (%rdx), %xmm0 - movsd %xmm0, -48(%rbp) - fldl -48(%rbp) - fldt 48(%rbp) - fsubp %st, %st(1) - fstpt 48(%rbp) - movq -112(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $32767, %eax - addl $-16382, %eax - movl %eax, -300(%rbp) -..B1.100: - movl -328(%rbp), %eax - testl %eax, %eax - je ..B1.103 -..B1.101: - fldcw -336(%rbp) -..B1.102: - movl $0, -328(%rbp) -..B1.103: - movq -128(%rbp), %rax - movl 4(%rax), %eax - movl %eax, -296(%rbp) - movq -128(%rbp), %rax - movl (%rax), %eax - movl %eax, -292(%rbp) - movq -120(%rbp), %rax - movl 4(%rax), %eax - movl %eax, -288(%rbp) - movq -120(%rbp), %rax - movl (%rax), %eax - movl %eax, -284(%rbp) - movq -112(%rbp), %rax - movl 4(%rax), %eax - movl %eax, -280(%rbp) - movq -112(%rbp), %rax - movl (%rax), %eax - movl %eax, -276(%rbp) - movl -312(%rbp), %eax - xorl -320(%rbp), %eax - movl %eax, -272(%rbp) - movl -308(%rbp), %eax - addl -316(%rbp), %eax - addl $-16383, %eax - movl %eax, -268(%rbp) - movl -284(%rbp), %eax - movl -292(%rbp), %edx - imulq %rax, %rdx - movq %rdx, -88(%rbp) - movq -88(%rbp), %rax - shrq $32, %rax - movl %eax, -264(%rbp) - movl -88(%rbp), %eax - movl %eax, -260(%rbp) - movl -284(%rbp), %eax - movl -296(%rbp), %edx - imulq %rax, %rdx - movq %rdx, -80(%rbp) - movq -80(%rbp), %rax - shrq $32, %rax - movl %eax, -256(%rbp) - movl -80(%rbp), %eax - movl %eax, -252(%rbp) - movl -288(%rbp), %eax - movl -292(%rbp), %edx - imulq %rax, %rdx - movq %rdx, -72(%rbp) - movq -72(%rbp), %rax - shrq $32, %rax - movl %eax, -248(%rbp) - movl -72(%rbp), %eax - movl %eax, -244(%rbp) - movl -288(%rbp), %eax - movl -296(%rbp), %edx - imulq %rax, %rdx - movq %rdx, -64(%rbp) - movq -64(%rbp), %rax - shrq $32, %rax - movl %eax, -240(%rbp) - movl -64(%rbp), %eax - movl %eax, -236(%rbp) - movl -260(%rbp), %eax - movl %eax, -232(%rbp) - movl -264(%rbp), %eax - movq %rax, -56(%rbp) - movl -252(%rbp), %eax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -244(%rbp), %eax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -56(%rbp), %eax - movl %eax, -228(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -224(%rbp) - movl -236(%rbp), %eax - movq %rax, -56(%rbp) - movl -256(%rbp), %eax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -248(%rbp), %eax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -224(%rbp), %eax - movslq %eax, %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -56(%rbp), %eax - movl %eax, -220(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -224(%rbp) - movl -224(%rbp), %eax - addl -240(%rbp), %eax - movl %eax, -216(%rbp) - movl -216(%rbp), %eax - testl $-2147483648, %eax - je ..B1.105 -..B1.104: - movl $1, %eax - addl -268(%rbp), %eax - movl %eax, -268(%rbp) - jmp ..B1.106 -..B1.105: - movl -216(%rbp), %eax - shll $1, %eax - movl -220(%rbp), %edx - shrl $31, %edx - orl %edx, %eax - movl %eax, -216(%rbp) - movl -220(%rbp), %eax - shll $1, %eax - movl -228(%rbp), %edx - shrl $31, %edx - orl %edx, %eax - movl %eax, -220(%rbp) - movl -228(%rbp), %eax - shll $1, %eax - movl -232(%rbp), %edx - shrl $31, %edx - orl %edx, %eax - movl %eax, -228(%rbp) - shll $1, -232(%rbp) -..B1.106: - movl -268(%rbp), %eax - movl -300(%rbp), %edx - cmpl %edx, %eax - jg ..B1.111 -..B1.107: - movl -268(%rbp), %eax - movl -300(%rbp), %edx - cmpl %edx, %eax - jne ..B1.112 -..B1.108: - movl -216(%rbp), %eax - movl -280(%rbp), %edx - cmpl %edx, %eax - ja ..B1.111 -..B1.109: - movl -216(%rbp), %eax - movl -280(%rbp), %edx - cmpl %edx, %eax - jne ..B1.112 -..B1.110: - movl -220(%rbp), %eax - movl -276(%rbp), %edx - cmpl %edx, %eax - jb ..B1.112 -..B1.111: - movl -300(%rbp), %eax - negl %eax - addl -268(%rbp), %eax - movl %eax, -212(%rbp) - movl -280(%rbp), %eax - movl %eax, -208(%rbp) - movl -276(%rbp), %eax - movl %eax, -204(%rbp) - movl $0, %eax - movl %eax, -200(%rbp) - movl %eax, -196(%rbp) - jmp ..B1.113 -..B1.112: - movl -268(%rbp), %eax - negl %eax - addl -300(%rbp), %eax - movl %eax, -212(%rbp) - movl -300(%rbp), %eax - movl %eax, -268(%rbp) - movl -216(%rbp), %eax - movl %eax, -208(%rbp) - movl -220(%rbp), %eax - movl %eax, -204(%rbp) - movl -228(%rbp), %eax - movl %eax, -196(%rbp) - movl -232(%rbp), %eax - movl %eax, -200(%rbp) - movl -280(%rbp), %eax - movl %eax, -216(%rbp) - movl -276(%rbp), %eax - movl %eax, -220(%rbp) - movl $0, %eax - movl %eax, -232(%rbp) - movl %eax, -228(%rbp) - movl -272(%rbp), %eax - movl %eax, -304(%rbp) - movq -112(%rbp), %rax - movzbl 9(%rax), %eax - movzbl %al, %eax - andl $128, %eax - shrl $7, %eax - movl %eax, -272(%rbp) -..B1.113: - movl $0, -192(%rbp) - movl -212(%rbp), %eax - testl %eax, %eax - je ..B1.123 -..B1.114: - movl -212(%rbp), %eax - cmpl $32, %eax - jge ..B1.116 -..B1.115: - movl -212(%rbp), %eax - negl %eax - addl $32, %eax - movl %eax, -188(%rbp) - movl -212(%rbp), %eax - movl %eax, -184(%rbp) - movl $-1, %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -180(%rbp) - movl -200(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl %eax, -192(%rbp) - movl -196(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -200(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -200(%rbp) - movl -204(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -196(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -196(%rbp) - movl -208(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -204(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -204(%rbp) - movl -184(%rbp), %eax - movl %eax, %ecx - shrl %cl, -208(%rbp) - jmp ..B1.123 -..B1.116: - movl -212(%rbp), %eax - cmpl $64, %eax - jge ..B1.118 -..B1.117: - movl -212(%rbp), %eax - negl %eax - addl $64, %eax - movl %eax, -188(%rbp) - movl $-32, %eax - addl -212(%rbp), %eax - movl %eax, -184(%rbp) - movl $-1, %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -180(%rbp) - movl -196(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -200(%rbp), %edx - movl $1, %ecx - testl %edx, %edx - cmovne %ecx, %edx - orl %edx, %eax - movl %eax, -192(%rbp) - movl -204(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -196(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -200(%rbp) - movl -208(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -204(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -196(%rbp) - movl -208(%rbp), %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl %eax, -204(%rbp) - movl $0, -208(%rbp) - jmp ..B1.123 -..B1.118: - movl -212(%rbp), %eax - cmpl $96, %eax - jge ..B1.120 -..B1.119: - movl -212(%rbp), %eax - negl %eax - addl $96, %eax - movl %eax, -188(%rbp) - movl $-64, %eax - addl -212(%rbp), %eax - movl %eax, -184(%rbp) - movl $-1, %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -180(%rbp) - movl -204(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -200(%rbp), %edx - orl -196(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -192(%rbp) - movl -208(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -204(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -200(%rbp) - movl -208(%rbp), %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl %eax, -196(%rbp) - movl $0, %eax - movl %eax, -204(%rbp) - movl %eax, -208(%rbp) - jmp ..B1.123 -..B1.120: - movl -212(%rbp), %eax - cmpl $128, %eax - jge ..B1.122 -..B1.121: - movl -212(%rbp), %eax - negl %eax - addl $128, %eax - movl %eax, -188(%rbp) - movl $-96, %eax - addl -212(%rbp), %eax - movl %eax, -184(%rbp) - movl $-1, %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -180(%rbp) - movl -208(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -196(%rbp), %edx - orl -204(%rbp), %edx - orl -200(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -192(%rbp) - movl -208(%rbp), %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl %eax, -200(%rbp) - movl $0, -196(%rbp) - movl $0, %eax - movl %eax, -204(%rbp) - movl %eax, -208(%rbp) - jmp ..B1.123 -..B1.122: - movl -204(%rbp), %eax - orl -208(%rbp), %eax - orl -196(%rbp), %eax - orl -200(%rbp), %eax - movl $1, %eax - movl $0, %edx - cmovne %eax, %edx - movl %edx, -192(%rbp) - movl $0, -200(%rbp) - movl $0, -196(%rbp) - movl $0, %eax - movl %eax, -204(%rbp) - movl %eax, -208(%rbp) -..B1.123: - movl -272(%rbp), %eax - movl -304(%rbp), %edx - cmpl %edx, %eax - jne ..B1.130 -..B1.124: - movl -232(%rbp), %eax - movl %eax, -176(%rbp) - movl -200(%rbp), %eax - addl -232(%rbp), %eax - movl %eax, -232(%rbp) - movl -232(%rbp), %eax - movl -176(%rbp), %edx - cmpl %edx, %eax - jb ..B1.126 -..B1.125: - movl $0, -224(%rbp) - jmp ..B1.127 -..B1.126: - movl $1, -224(%rbp) -..B1.127: - movl -228(%rbp), %eax - movq %rax, -56(%rbp) - movl -196(%rbp), %eax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -224(%rbp), %eax - movslq %eax, %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -56(%rbp), %eax - movl %eax, -228(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -224(%rbp) - movl -220(%rbp), %eax - movq %rax, -56(%rbp) - movl -204(%rbp), %eax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -224(%rbp), %eax - movslq %eax, %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -56(%rbp), %eax - movl %eax, -220(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -224(%rbp) - movl -216(%rbp), %eax - movq %rax, -56(%rbp) - movl -208(%rbp), %eax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -224(%rbp), %eax - movslq %eax, %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -56(%rbp), %eax - movl %eax, -216(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -224(%rbp) - movl -224(%rbp), %eax - testl %eax, %eax - je ..B1.129 -..B1.128: - movl -220(%rbp), %eax - shll $31, %eax - movl -232(%rbp), %edx - orl -228(%rbp), %edx - orl -192(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -192(%rbp) - movl -216(%rbp), %eax - shll $31, %eax - movl -220(%rbp), %edx - shrl $1, %edx - orl %edx, %eax - movl %eax, -168(%rbp) - movl -216(%rbp), %eax - shrl $1, %eax - orl $-2147483648, %eax - movl %eax, -164(%rbp) - movl $1, %eax - addl -268(%rbp), %eax - movl %eax, -268(%rbp) - jmp ..B1.156 -..B1.129: - movl -228(%rbp), %eax - movl -192(%rbp), %edx - orl -232(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -192(%rbp) - movl -220(%rbp), %eax - movl %eax, -168(%rbp) - movl -216(%rbp), %eax - movl %eax, -164(%rbp) - jmp ..B1.156 -..B1.130: - movl -192(%rbp), %eax - negl %eax - movl %eax, -192(%rbp) - movl -192(%rbp), %eax - testl %eax, %eax - jne ..B1.132 -..B1.131: - movl $0, -172(%rbp) - jmp ..B1.133 -..B1.132: - movl $1, -172(%rbp) -..B1.133: - movl -232(%rbp), %eax - movq %rax, -56(%rbp) - movl -200(%rbp), %eax - negq %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -172(%rbp), %eax - movslq %eax, %rax - negq %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -56(%rbp), %eax - movl %eax, -232(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -172(%rbp) - movl -228(%rbp), %eax - movq %rax, -56(%rbp) - movl -196(%rbp), %eax - negq %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -172(%rbp), %eax - movslq %eax, %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -56(%rbp), %eax - movl %eax, -228(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -172(%rbp) - movl -220(%rbp), %eax - movq %rax, -56(%rbp) - movl -204(%rbp), %eax - negq %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -172(%rbp), %eax - movslq %eax, %rax - addq -56(%rbp), %rax - movq %rax, -56(%rbp) - movl -56(%rbp), %eax - movl %eax, -220(%rbp) - movq -56(%rbp), %rax - shrq $32, %rax - movl %eax, -172(%rbp) - movl -208(%rbp), %eax - negl %eax - addl -216(%rbp), %eax - movl %eax, -216(%rbp) - movl -172(%rbp), %eax - addl -216(%rbp), %eax - movl %eax, -216(%rbp) - movl -216(%rbp), %eax - testl %eax, %eax - je ..B1.135 -..B1.134: - movl -216(%rbp), %eax - movl %eax, -176(%rbp) - movl $0, -212(%rbp) - jmp ..B1.144 -..B1.135: - movl -220(%rbp), %eax - testl %eax, %eax - je ..B1.137 -..B1.136: - movl -220(%rbp), %eax - movl %eax, -176(%rbp) - movl $32, -212(%rbp) - jmp ..B1.144 -..B1.137: - movl -228(%rbp), %eax - testl %eax, %eax - je ..B1.139 -..B1.138: - movl -228(%rbp), %eax - movl %eax, -176(%rbp) - movl $64, -212(%rbp) - jmp ..B1.144 -..B1.139: - movl -232(%rbp), %eax - testl %eax, %eax - je ..B1.141 -..B1.140: - movl -232(%rbp), %eax - movl %eax, -176(%rbp) - movl $96, -212(%rbp) - jmp ..B1.144 -..B1.141: - movl -192(%rbp), %eax - testl %eax, %eax - je ..B1.143 -..B1.142: - movl -192(%rbp), %eax - movl %eax, -176(%rbp) - movl $128, -212(%rbp) - jmp ..B1.144 -..B1.143: - movl -324(%rbp), %eax - movl $1, %edx - movl $0, %ecx - cmpl $1024, %eax - cmove %edx, %ecx - movslq %ecx, %rcx - shlq $3, %rcx - lea _zeros(%rip), %rax - addq %rcx, %rax - movsd (%rax), %xmm0 - movsd %xmm0, -48(%rbp) - fldl -48(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.144: - movl -176(%rbp), %eax - testl $-2147483648, %eax - jne ..B1.146 -..B1.145: - shll $1, -176(%rbp) - movl $1, %eax - addl -212(%rbp), %eax - movl %eax, -212(%rbp) - jmp ..B1.144 -..B1.146: - movl -212(%rbp), %eax - cmpl $32, %eax - jge ..B1.148 -..B1.147: - movl -212(%rbp), %eax - movl %eax, -188(%rbp) - movl -212(%rbp), %eax - negl %eax - addl $32, %eax - movl %eax, -184(%rbp) - movl $1, %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - decl %eax - movl %eax, -160(%rbp) - movl -228(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -192(%rbp), %edx - orl -232(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -192(%rbp) - movl -220(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -228(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - andl -160(%rbp), %edx - orl %edx, %eax - movl %eax, -168(%rbp) - movl -216(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -220(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - andl -160(%rbp), %edx - orl %edx, %eax - movl %eax, -164(%rbp) - jmp ..B1.155 -..B1.148: - movl -212(%rbp), %eax - cmpl $64, %eax - jge ..B1.150 -..B1.149: - movl $-32, %eax - addl -212(%rbp), %eax - movl %eax, -188(%rbp) - movl -212(%rbp), %eax - negl %eax - addl $64, %eax - movl %eax, -184(%rbp) - movl $1, %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - decl %eax - movl %eax, -160(%rbp) - movl -232(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -192(%rbp), %edx - movl $1, %ecx - testl %edx, %edx - cmovne %ecx, %edx - orl %edx, %eax - movl %eax, -192(%rbp) - movl -228(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -232(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - andl -160(%rbp), %edx - orl %edx, %eax - movl %eax, -168(%rbp) - movl -220(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -228(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - andl -160(%rbp), %edx - orl %edx, %eax - movl %eax, -164(%rbp) - jmp ..B1.155 -..B1.150: - movl -212(%rbp), %eax - cmpl $96, %eax - jge ..B1.152 -..B1.151: - movl $-64, %eax - addl -212(%rbp), %eax - movl %eax, -188(%rbp) - movl -212(%rbp), %eax - negl %eax - addl $96, %eax - movl %eax, -184(%rbp) - movl $1, %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - decl %eax - movl %eax, -160(%rbp) - movl -188(%rbp), %eax - movl %eax, %ecx - shll %cl, -192(%rbp) - movl -232(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -192(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - andl -160(%rbp), %edx - orl %edx, %eax - movl %eax, -168(%rbp) - movl -228(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -232(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - andl -160(%rbp), %edx - orl %edx, %eax - movl %eax, -164(%rbp) - jmp ..B1.155 -..B1.152: - movl -212(%rbp), %eax - cmpl $128, %eax - jge ..B1.154 -..B1.153: - movl $-96, %eax - addl -212(%rbp), %eax - movl %eax, -188(%rbp) - movl -212(%rbp), %eax - negl %eax - addl $128, %eax - movl %eax, -184(%rbp) - movl $1, %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - decl %eax - movl %eax, -160(%rbp) - movl $0, -192(%rbp) - movl -192(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl %eax, -168(%rbp) - movl -232(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl -192(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - andl -160(%rbp), %edx - orl %edx, %eax - movl %eax, -164(%rbp) - jmp ..B1.155 -..B1.154: - movl $-128, %eax - addl -212(%rbp), %eax - movl %eax, -188(%rbp) - movl $0, %eax - movl %eax, -168(%rbp) - movl %eax, -192(%rbp) - movl -192(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - movl %eax, -164(%rbp) -..B1.155: - movl -212(%rbp), %eax - negl %eax - addl -268(%rbp), %eax - movl %eax, -268(%rbp) -..B1.156: - movl $-1, %eax - addl -268(%rbp), %eax - cmpl $32766, %eax - jb ..B1.167 -..B1.157: - movl -268(%rbp), %eax - cmpl $32767, %eax - jl ..B1.159 -..B1.158: - movl -272(%rbp), %eax - movslq %eax, %rax - shlq $4, %rax - lea _large_value_80(%rip), %rdx - addq %rax, %rdx - fldt (%rdx) - lea _large_value_80(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt -16(%rbp) - fldt -16(%rbp) - fstpt -32(%rbp) - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.159: - movl -268(%rbp), %eax - negl %eax - incl %eax - movl %eax, -212(%rbp) - movl -212(%rbp), %eax - cmpl $32, %eax - jge ..B1.161 -..B1.160: - movl -212(%rbp), %eax - negl %eax - addl $32, %eax - movl %eax, -188(%rbp) - movl -212(%rbp), %eax - movl %eax, -184(%rbp) - movl $-1, %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -180(%rbp) - movl -168(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -192(%rbp), %edx - movl $1, %ecx - testl %edx, %edx - cmovne %ecx, %edx - orl %edx, %eax - movl %eax, -192(%rbp) - movl -164(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -168(%rbp), %edx - movl -184(%rbp), %ecx - shrl %cl, %edx - orl %edx, %eax - movl %eax, -168(%rbp) - movl -184(%rbp), %eax - movl %eax, %ecx - shrl %cl, -164(%rbp) - jmp ..B1.166 -..B1.161: - movl -212(%rbp), %eax - cmpl $64, %eax - jge ..B1.163 -..B1.162: - movl -212(%rbp), %eax - negl %eax - addl $64, %eax - movl %eax, -188(%rbp) - movl $-32, %eax - addl -212(%rbp), %eax - movl %eax, -184(%rbp) - movl $-1, %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -180(%rbp) - movl -164(%rbp), %eax - movl -188(%rbp), %edx - movl %edx, %ecx - shll %cl, %eax - andl -180(%rbp), %eax - movl -192(%rbp), %edx - orl -168(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -192(%rbp) - movl -164(%rbp), %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl %eax, -168(%rbp) - movl $0, -164(%rbp) - jmp ..B1.166 -..B1.163: - movl -212(%rbp), %eax - cmpl $96, %eax - jge ..B1.165 -..B1.164: - movl -212(%rbp), %eax - negl %eax - addl $96, %eax - movl %eax, -188(%rbp) - movl $-64, %eax - addl -212(%rbp), %eax - movl %eax, -184(%rbp) - movl $-1, %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - notl %eax - movl %eax, -180(%rbp) - movl -164(%rbp), %eax - movl -184(%rbp), %edx - movl %edx, %ecx - shrl %cl, %eax - movl -164(%rbp), %edx - movl -188(%rbp), %ecx - shll %cl, %edx - andl -180(%rbp), %edx - orl -168(%rbp), %edx - orl -192(%rbp), %edx - movl $1, %edx - movl $0, %ecx - cmovne %edx, %ecx - orl %ecx, %eax - movl %eax, -192(%rbp) - movl $0, %eax - movl %eax, -168(%rbp) - movl %eax, -164(%rbp) - jmp ..B1.166 -..B1.165: - movl $1, -192(%rbp) - movl $0, %eax - movl %eax, -168(%rbp) - movl %eax, -164(%rbp) -..B1.166: - movl $0, -268(%rbp) -..B1.167: - movl -192(%rbp), %eax - testl %eax, %eax - je ..B1.222 -..B1.168: - lea _ones(%rip), %rax - movsd (%rax), %xmm0 - movsd %xmm0, -48(%rbp) - fldl -48(%rbp) - lea _small_value_80(%rip), %rax - fldt (%rax) - faddp %st, %st(1) - fstpt -16(%rbp) - movl -324(%rbp), %eax - movl %eax, -156(%rbp) - testl %eax, %eax - je ..B1.172 -..B1.169: - movl -156(%rbp), %eax - cmpl $3072, %eax - je ..B1.182 -..B1.170: - movl -156(%rbp), %eax - cmpl $2048, %eax - je ..B1.186 -..B1.171: - movl -156(%rbp), %eax - cmpl $1024, %eax - je ..B1.204 - jmp ..B1.222 -..B1.172: - movl -192(%rbp), %eax - testl $-2147483648, %eax - je ..B1.182 -..B1.173: - movl -168(%rbp), %eax - andl $1, %eax - movl -192(%rbp), %edx - andl $2147483647, %edx - orl %edx, %eax - je ..B1.182 -..B1.174: - movl $1, %eax - addl -168(%rbp), %eax - movl %eax, -168(%rbp) - jne ..B1.180 -..B1.175: - movl $1, %eax - addl -164(%rbp), %eax - movl %eax, -152(%rbp) - movl %eax, -164(%rbp) - movl -268(%rbp), %eax - testl %eax, %eax - je ..B1.177 -..B1.176: - movl $0, -148(%rbp) - jmp ..B1.178 -..B1.177: - movl $-2147483648, -148(%rbp) -..B1.178: - movl -148(%rbp), %eax - movl -152(%rbp), %edx - cmpl %eax, %edx - jne ..B1.180 -..B1.179: - orl $-2147483648, -164(%rbp) - movl $1, %eax - addl -268(%rbp), %eax - movl %eax, -268(%rbp) -..B1.180: - movl -268(%rbp), %eax - cmpl $32767, %eax - jl ..B1.182 -..B1.181: - movl -272(%rbp), %eax - movslq %eax, %rax - shlq $4, %rax - lea _large_value_80(%rip), %rdx - addq %rax, %rdx - fldt (%rdx) - lea _large_value_80(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt -16(%rbp) - fldt -16(%rbp) - fstpt -32(%rbp) - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.182: - movl -268(%rbp), %eax - testl %eax, %eax - je ..B1.185 -..B1.183: - movl $-1, %eax - addl -268(%rbp), %eax - movl $-2147483648, %edx - negl %edx - addl -164(%rbp), %edx - orl %edx, %eax - orl -168(%rbp), %eax - jne ..B1.222 -..B1.184: - movl -192(%rbp), %eax - cmpl $-2147483648, %eax - jne ..B1.222 -..B1.185: - lea _small_value_80(%rip), %rax - fldt (%rax) - lea _small_value_80(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt -16(%rbp) - jmp ..B1.222 -..B1.186: - movl -268(%rbp), %eax - testl %eax, %eax - jne ..B1.195 -..B1.187: - movl -272(%rbp), %eax - testl %eax, %eax - jne ..B1.194 -..B1.188: - movl -272(%rbp), %eax - testl %eax, %eax - jne ..B1.195 -..B1.189: - movl -164(%rbp), %eax - cmpl $2147483647, %eax - jb ..B1.194 -..B1.190: - movl -164(%rbp), %eax - cmpl $2147483647, %eax - jne ..B1.195 -..B1.191: - movl -168(%rbp), %eax - cmpl $-1, %eax - jb ..B1.194 -..B1.192: - movl -168(%rbp), %eax - cmpl $-1, %eax - jne ..B1.195 -..B1.193: - movl -192(%rbp), %eax - cmpl $-2147483648, %eax - jae ..B1.195 -..B1.194: - lea _small_value_80(%rip), %rax - fldt (%rax) - lea _small_value_80(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt -16(%rbp) -..B1.195: - movl -272(%rbp), %eax - testl %eax, %eax - jne ..B1.222 -..B1.196: - movl $1, %eax - addl -168(%rbp), %eax - movl %eax, -168(%rbp) - jne ..B1.202 -..B1.197: - movl $1, %eax - addl -164(%rbp), %eax - movl %eax, -144(%rbp) - movl %eax, -164(%rbp) - movl -268(%rbp), %eax - testl %eax, %eax - je ..B1.199 -..B1.198: - movl $0, -140(%rbp) - jmp ..B1.200 -..B1.199: - movl $-2147483648, -140(%rbp) -..B1.200: - movl -140(%rbp), %eax - movl -144(%rbp), %edx - cmpl %eax, %edx - jne ..B1.202 -..B1.201: - orl $-2147483648, -164(%rbp) - movl $1, %eax - addl -268(%rbp), %eax - movl %eax, -268(%rbp) -..B1.202: - movl -268(%rbp), %eax - cmpl $32767, %eax - jl ..B1.222 -..B1.203: - movl -272(%rbp), %eax - movslq %eax, %rax - shlq $4, %rax - lea _large_value_80(%rip), %rdx - addq %rax, %rdx - fldt (%rdx) - lea _large_value_80(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt -16(%rbp) - fldt -16(%rbp) - fstpt -32(%rbp) - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.204: - movl -268(%rbp), %eax - testl %eax, %eax - jne ..B1.213 -..B1.205: - movl -272(%rbp), %eax - testl %eax, %eax - je ..B1.212 -..B1.206: - movl -272(%rbp), %eax - testl %eax, %eax - je ..B1.213 -..B1.207: - movl -164(%rbp), %eax - cmpl $2147483647, %eax - jb ..B1.212 -..B1.208: - movl -164(%rbp), %eax - cmpl $2147483647, %eax - jne ..B1.213 -..B1.209: - movl -168(%rbp), %eax - cmpl $-1, %eax - jb ..B1.212 -..B1.210: - movl -168(%rbp), %eax - cmpl $-1, %eax - jne ..B1.213 -..B1.211: - movl -192(%rbp), %eax - cmpl $-2147483648, %eax - jae ..B1.213 -..B1.212: - lea _small_value_80(%rip), %rax - fldt (%rax) - lea _small_value_80(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt -16(%rbp) -..B1.213: - movl -272(%rbp), %eax - testl %eax, %eax - je ..B1.222 -..B1.214: - movl $1, %eax - addl -168(%rbp), %eax - movl %eax, -168(%rbp) - jne ..B1.220 -..B1.215: - movl $1, %eax - addl -164(%rbp), %eax - movl %eax, -136(%rbp) - movl %eax, -164(%rbp) - movl -268(%rbp), %eax - testl %eax, %eax - je ..B1.217 -..B1.216: - movl $0, -132(%rbp) - jmp ..B1.218 -..B1.217: - movl $-2147483648, -132(%rbp) -..B1.218: - movl -132(%rbp), %eax - movl -136(%rbp), %edx - cmpl %eax, %edx - jne ..B1.220 -..B1.219: - orl $-2147483648, -164(%rbp) - movl $1, %eax - addl -268(%rbp), %eax - movl %eax, -268(%rbp) -..B1.220: - movl -268(%rbp), %eax - cmpl $32767, %eax - jl ..B1.222 -..B1.221: - movl -272(%rbp), %eax - movslq %eax, %rax - shlq $4, %rax - lea _large_value_80(%rip), %rdx - addq %rax, %rdx - fldt (%rdx) - lea _large_value_80(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt -16(%rbp) - fldt -16(%rbp) - fstpt -32(%rbp) - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_offset 6, -16 -..B1.222: - movq -104(%rbp), %rax - movzbl 9(%rax), %eax - movzbl %al, %eax - andl $-129, %eax - movl -272(%rbp), %edx - andl $1, %edx - shll $7, %edx - orl %edx, %eax - movq -104(%rbp), %rdx - movb %al, 9(%rdx) - movq -104(%rbp), %rax - movzwl 8(%rax), %eax - movzwl %ax, %eax - andl $-32768, %eax - movl -268(%rbp), %edx - andl $32767, %edx - orl %edx, %eax - movq -104(%rbp), %rdx - movw %ax, 8(%rdx) - movq -104(%rbp), %rax - movl -164(%rbp), %edx - movl %edx, 4(%rax) - movq -104(%rbp), %rax - movl -168(%rbp), %edx - movl %edx, (%rax) - fldt -32(%rbp) - leave - .cfi_restore 6 - ret - .cfi_endproc - .type fmal,@function - .size fmal,.-fmal - .data -# -- End fmal - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmax_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmax_gen.S deleted file mode 100644 index b4d21d2e2d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmax_gen.S +++ /dev/null @@ -1,97 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmax_gen.c" - .text -..TXTST0: -# -- Begin fmax - .text - .align 16,0x90 - .globl fmax -fmax: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_fmax.1: -..L2: - - movsd %xmm0, -24(%rsp) - movzwl -18(%rsp), %eax - andl $32752, %eax - movsd %xmm1, -16(%rsp) - cmpl $32752, %eax - je ..B1.7 -..B1.2: - movzwl -10(%rsp), %eax - andl $32752, %eax - cmpl $32752, %eax - jne ..B1.6 -..B1.3: - testl $1048575, -12(%rsp) - jne ..B1.5 -..B1.4: - cmpl $0, -16(%rsp) - je ..B1.6 -..B1.5: - movsd -24(%rsp), %xmm0 - ret -..B1.6: - movsd -24(%rsp), %xmm0 - maxsd -16(%rsp), %xmm0 - ret -..B1.7: - testl $1048575, -20(%rsp) - jne ..B1.9 -..B1.8: - cmpl $0, -24(%rsp) - je ..B1.2 -..B1.9: - movsd -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type fmax,@function - .size fmax,.-fmax - .data -# -- End fmax - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaxf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaxf_gen.S deleted file mode 100644 index 11343026f0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaxf_gen.S +++ /dev/null @@ -1,91 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmaxf_gen.c" - .text -..TXTST0: -# -- Begin fmaxf - .text - .align 16,0x90 - .globl fmaxf -fmaxf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_fmaxf.1: -..L2: - - movss %xmm0, -24(%rsp) - movzwl -22(%rsp), %eax - andl $32640, %eax - movss %xmm1, -16(%rsp) - cmpl $32640, %eax - je ..B1.6 -..B1.2: - movzwl -14(%rsp), %eax - andl $32640, %eax - cmpl $32640, %eax - jne ..B1.5 -..B1.3: - testl $8388607, -16(%rsp) - je ..B1.5 -..B1.4: - movss -24(%rsp), %xmm0 - ret -..B1.5: - movss -24(%rsp), %xmm0 - maxss -16(%rsp), %xmm0 - ret -..B1.6: - testl $8388607, -24(%rsp) - je ..B1.2 -..B1.7: - movss -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type fmaxf,@function - .size fmaxf,.-fmaxf - .data -# -- End fmaxf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaxl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaxl.S deleted file mode 100644 index ee873d884e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmaxl.S +++ /dev/null @@ -1,203 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmaxl.c" - .text -..TXTST0: -# -- Begin fmaxl - .text - .align 16,0x90 - .globl fmaxl -fmaxl: -# parameter 1: 48 + %rsp -# parameter 2: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_fmaxl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %sil, %sil -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzwl 56(%rsp), %ecx - movl %ecx, %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.34 -..B1.4: - movzwl 72(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.17 -..B1.5: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.9 -..B1.6: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.7: - fldcw 32(%rsp) -..B1.8: - movb $1, %sil -..B1.9: - fldt 48(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fldt 64(%rsp) - fxch %st(1) - fcomip %st(1), %st - jbe ..B1.11 -..B1.10: - fstp %st(0) - jmp ..B1.13 -..B1.11: - fldt 16(%rsp) - fucomip %st(1), %st - jp ..B1.12 - je ..B1.16 -..B1.12: - fstpt 16(%rsp) -..B1.13: - testb %sil, %sil - je ..B1.15 -..B1.14: - fldcw 34(%rsp) -..B1.15: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.16: - testb $-128, 73(%rsp) - jne ..B1.10 - jmp ..B1.12 -..B1.17: - cmpl $-2147483648, 68(%rsp) - jne ..B1.19 -..B1.18: - cmpl $0, 64(%rsp) - je ..B1.5 -..B1.19: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.33 -..B1.20: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.21: - fldcw 32(%rsp) -..B1.22: - fldt 48(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.23: - fldcw 34(%rsp) - movzwl 56(%rsp), %ecx -..B1.24: - andl $32767, %ecx - cmpl $32767, %ecx - jne ..B1.27 -..B1.25: - cmpl $-2147483648, 52(%rsp) - jne ..B1.28 -..B1.26: - cmpl $0, 48(%rsp) - jne ..B1.28 -..B1.27: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.28: - movzwl 72(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.31 -..B1.29: - cmpl $-2147483648, 68(%rsp) - jne ..B1.32 -..B1.30: - cmpl $0, 64(%rsp) - jne ..B1.32 -..B1.31: - fldt 64(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.32: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.33: - fldt 48(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.24 -..B1.34: - cmpl $-2147483648, 52(%rsp) - jne ..B1.19 -..B1.35: - cmpl $0, 48(%rsp) - je ..B1.4 - jmp ..B1.19 - .align 16,0x90 - .cfi_endproc - .type fmaxl,@function - .size fmaxl,.-fmaxl - .data -# -- End fmaxl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmin_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmin_gen.S deleted file mode 100644 index 4afa69faad..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmin_gen.S +++ /dev/null @@ -1,97 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmin_gen.c" - .text -..TXTST0: -# -- Begin fmin - .text - .align 16,0x90 - .globl fmin -fmin: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_fmin.1: -..L2: - - movsd %xmm0, -24(%rsp) - movzwl -18(%rsp), %eax - andl $32752, %eax - movsd %xmm1, -16(%rsp) - cmpl $32752, %eax - je ..B1.7 -..B1.2: - movzwl -10(%rsp), %eax - andl $32752, %eax - cmpl $32752, %eax - jne ..B1.6 -..B1.3: - testl $1048575, -12(%rsp) - jne ..B1.5 -..B1.4: - cmpl $0, -16(%rsp) - je ..B1.6 -..B1.5: - movsd -24(%rsp), %xmm0 - ret -..B1.6: - movsd -24(%rsp), %xmm0 - minsd -16(%rsp), %xmm0 - ret -..B1.7: - testl $1048575, -20(%rsp) - jne ..B1.9 -..B1.8: - cmpl $0, -24(%rsp) - je ..B1.2 -..B1.9: - movsd -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type fmin,@function - .size fmin,.-fmin - .data -# -- End fmin - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fminf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fminf_gen.S deleted file mode 100644 index 2126ac6dae..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fminf_gen.S +++ /dev/null @@ -1,91 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fminf_gen.c" - .text -..TXTST0: -# -- Begin fminf - .text - .align 16,0x90 - .globl fminf -fminf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_fminf.1: -..L2: - - movss %xmm0, -24(%rsp) - movzwl -22(%rsp), %eax - andl $32640, %eax - movss %xmm1, -16(%rsp) - cmpl $32640, %eax - je ..B1.6 -..B1.2: - movzwl -14(%rsp), %eax - andl $32640, %eax - cmpl $32640, %eax - jne ..B1.5 -..B1.3: - testl $8388607, -16(%rsp) - je ..B1.5 -..B1.4: - movss -24(%rsp), %xmm0 - ret -..B1.5: - movss -24(%rsp), %xmm0 - minss -16(%rsp), %xmm0 - ret -..B1.6: - testl $8388607, -24(%rsp) - je ..B1.2 -..B1.7: - movss -16(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type fminf,@function - .size fminf,.-fminf - .data -# -- End fminf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fminl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fminl.S deleted file mode 100644 index 122e39e01c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fminl.S +++ /dev/null @@ -1,187 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fminl.c" - .text -..TXTST0: -# -- Begin fminl - .text - .align 16,0x90 - .globl fminl -fminl: -# parameter 1: 48 + %rsp -# parameter 2: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_fminl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %sil, %sil -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzwl 56(%rsp), %ecx - movl %ecx, %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.29 -..B1.4: - movzwl 72(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.12 -..B1.5: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.9 -..B1.6: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.7: - fldcw 32(%rsp) -..B1.8: - movb $1, %sil -..B1.9: - fldt 48(%rsp) - fldt 64(%rsp) - fcomi %st(1), %st - fcmovnbe %st(1), %st - fstp %st(1) - fstpt 16(%rsp) - testb %sil, %sil - je ..B1.11 -..B1.10: - fldcw 34(%rsp) -..B1.11: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.12: - cmpl $-2147483648, 68(%rsp) - jne ..B1.14 -..B1.13: - cmpl $0, 64(%rsp) - je ..B1.5 -..B1.14: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.28 -..B1.15: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.16: - fldcw 32(%rsp) -..B1.17: - fldt 48(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.18: - fldcw 34(%rsp) - movzwl 56(%rsp), %ecx -..B1.19: - andl $32767, %ecx - cmpl $32767, %ecx - jne ..B1.22 -..B1.20: - cmpl $-2147483648, 52(%rsp) - jne ..B1.23 -..B1.21: - cmpl $0, 48(%rsp) - jne ..B1.23 -..B1.22: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.23: - movzwl 72(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.26 -..B1.24: - cmpl $-2147483648, 68(%rsp) - jne ..B1.27 -..B1.25: - cmpl $0, 64(%rsp) - jne ..B1.27 -..B1.26: - fldt 64(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.27: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.28: - fldt 48(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.19 -..B1.29: - cmpl $-2147483648, 52(%rsp) - jne ..B1.14 -..B1.30: - cmpl $0, 48(%rsp) - je ..B1.4 - jmp ..B1.14 - .align 16,0x90 - .cfi_endproc - .type fminl,@function - .size fminl,.-fminl - .data -# -- End fminl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmod_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmod_gen.S deleted file mode 100644 index 2a5a27cbec..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmod_gen.S +++ /dev/null @@ -1,212 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmod_gen.c" - .text -..TXTST0: -# -- Begin fmod - .text - .align 16,0x90 - .globl fmod -fmod: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_fmod.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movq $0x8000000000000000, %rsi - movd %xmm1, %rcx - movq $0x7fffffffffffffff, %rdi - movd %xmm0, %rax - movsd %xmm0, 16(%rsp) - movsd %xmm1, 24(%rsp) - btrq $63, %rcx - movq $0x3ff0000000000000, %rdx - andq %rax, %rsi - andq %rax, %rdi - cmpq %rdx, %rcx - jne ..B1.30 -..B1.2: - cmpq %rcx, %rdi - ja ..B1.7 -..B1.3: - jne ..B1.6 -..B1.4: - pxor %xmm1, %xmm1 - mulsd %xmm1, %xmm0 -..B1.6: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.7: - movq $0x4330000000000000, %rax - cmpq %rax, %rdi - jae ..B1.9 -..B1.8: - negq %rcx - addq %rdi, %rcx - shrq $52, %rcx - negq %rcx - addq $52, %rcx - movsd 16(%rsp), %xmm0 - shrq %cl, %rdi - shlq %cl, %rdi - orq %rsi, %rdi - movq %rdi, (%rsp) - subsd (%rsp), %xmm0 - movd %xmm0, %rax - orq %rsi, %rax - movq %rax, (%rsp) - movsd (%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.9: - movq $0x7ff0000000000000, %rax - cmpq %rax, %rdi - jae ..B1.11 -..B1.10: - pxor %xmm0, %xmm0 - mulsd 16(%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.30: - movq $0x7ff0000000000000, %rax - cmpq %rax, %rdi -..B1.11: - ja ..B1.25 -..B1.12: - cmpq %rax, %rcx - ja ..B1.24 -..B1.13: - testq %rcx, %rcx - je ..B1.23 -..B1.14: - cmpq %rax, %rdi - je ..B1.23 -..B1.15: - cmpq %rax, %rcx - je ..B1.22 -..B1.16: - cmpq %rcx, %rdi - jb ..B1.21 -..B1.17: - je ..B1.27 -..B1.18: - movq %rdi, (%rsp) -..B1.19: - fldl 24(%rsp) - fldl 16(%rsp) -.L_2TAG_PACKET_0.0.2: - fprem - fstsw %ax - andw $1024, %ax - jne .L_2TAG_PACKET_0.0.2 - fstp %st(1) - fstpl 8(%rsp) -..B1.20: - movsd 8(%rsp), %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.21: - movsd 16(%rsp), %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.22: - movsd 16(%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.23: - pxor %xmm0, %xmm0 - pxor %xmm1, %xmm1 - divsd %xmm1, %xmm0 - movsd %xmm0, 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.24: - movsd 24(%rsp), %xmm0 - mulsd 16(%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.25: - movsd 16(%rsp), %xmm0 - mulsd 24(%rsp), %xmm0 - movsd %xmm0, 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.27: - pxor %xmm0, %xmm0 - mulsd 16(%rsp), %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fmod,@function - .size fmod,.-fmod - .data -# -- End fmod - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmodf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmodf_gen.S deleted file mode 100644 index 43c0192674..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmodf_gen.S +++ /dev/null @@ -1,74 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmodf_gen.c" - .text -..TXTST0: -# -- Begin fmodf - .text - .align 16,0x90 - .globl fmodf -fmodf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_fmodf.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - cvtss2sd %xmm0, %xmm0 - cvtss2sd %xmm1, %xmm1 - call fmod@PLT -..B1.4: - cvtsd2ss %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fmodf,@function - .size fmodf,.-fmodf - .data -# -- End fmodf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmodl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmodl.S deleted file mode 100644 index 03f1fe9287..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fmodl.S +++ /dev/null @@ -1,308 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fmodl.c" - .text -..TXTST0: -# -- Begin fmodl - .text - .align 16,0x90 - .globl fmodl -fmodl: -# parameter 1: 80 + %rsp -# parameter 2: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_fmodl.1: -..L2: - - subq $72, %rsp - .cfi_def_cfa_offset 80 - xorb %dl, %dl - fldt 80(%rsp) - fstpt 32(%rsp) - fldt 96(%rsp) - fstpt 48(%rsp) -..B1.2: - fnstcw 66(%rsp) -..B1.3: - movzwl 104(%rsp), %ecx - andl $32767, %ecx - jne ..B1.6 -..B1.4: - cmpl $0, 100(%rsp) - jne ..B1.6 -..B1.5: - cmpl $0, 96(%rsp) - je ..B1.42 -..B1.6: - movzwl 88(%rsp), %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.40 -..B1.7: - cmpl $32767, %ecx - je ..B1.17 -..B1.8: - movzwl 66(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.12 -..B1.9: - orl $-64768, %ecx - movw %cx, 64(%rsp) -..B1.10: - fldcw 64(%rsp) -..B1.11: - movb $1, %dl -..B1.12: - fldt 48(%rsp) - fldt 32(%rsp) - movq $1024, %rcx -.L_2TAG_PACKET_0.0.2: - fprem - fstsw %ax - andq %rcx, %rax - cmpq $1024, %rax - je .L_2TAG_PACKET_0.0.2 - fstp %st(1) - fstpt 16(%rsp) -..B1.13: - testb %dl, %dl - je ..B1.15 -..B1.14: - fldcw 66(%rsp) -..B1.15: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.17: - movq $0x8000000000000000, %rax - cmpq 96(%rsp), %rax - je ..B1.25 -..B1.18: - movzwl 66(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.24 -..B1.19: - orl $-64768, %edx - movw %dx, 64(%rsp) -..B1.20: - fldcw 64(%rsp) -..B1.21: - fldt 80(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpt 16(%rsp) -..B1.22: - fldcw 66(%rsp) -..B1.23: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.24: - fldt 80(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.23 -..B1.25: - cmpl $32767, %esi - je ..B1.31 -..B1.26: - testl %esi, %esi - jne ..B1.30 -..B1.27: - cmpl $0, 84(%rsp) - jne ..B1.29 -..B1.28: - cmpl $0, 80(%rsp) - je ..B1.30 -..B1.29: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 8(%rsp) -..B1.30: - fldt 80(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.31: - cmpl $-2147483648, 84(%rsp) - jne ..B1.30 -..B1.32: - cmpl $0, 80(%rsp) - jne ..B1.30 -..B1.33: - movzwl 66(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.37 -..B1.34: - orl $-64768, %ecx - movw %cx, 64(%rsp) -..B1.35: - fldcw 64(%rsp) -..B1.36: - movb $1, %dl -..B1.37: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - testb %dl, %dl - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 16(%rsp) - je ..B1.39 -..B1.38: - fldcw 66(%rsp) -..B1.39: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.40: - movq $0x8000000000000000, %rax - cmpq 80(%rsp), %rax - jne ..B1.18 -..B1.41: - cmpl $32767, %ecx - je ..B1.17 - jmp ..B1.25 -..B1.42: - movzwl 66(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.46 -..B1.43: - orl $-64768, %ecx - movw %cx, 64(%rsp) -..B1.44: - fldcw 64(%rsp) -..B1.45: - movb $1, %dl -..B1.46: - movzwl 88(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.49 -..B1.47: - movq $0x8000000000000000, %rax - cmpq 80(%rsp), %rax - je ..B1.49 -..B1.48: - fldt 80(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) - jmp ..B1.50 -..B1.49: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 16(%rsp) -..B1.50: - testb %dl, %dl - je ..B1.52 -..B1.51: - fldcw 66(%rsp) -..B1.52: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fmodl,@function - .size fmodl,.-fmodl - .data -# -- End fmodl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fpclassify.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fpclassify.S deleted file mode 100644 index fe51fc3393..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/fpclassify.S +++ /dev/null @@ -1,423 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "fpclassify.c" - .text -..TXTST0: -# -- Begin __fpclassifyd - .text - .align 16,0x90 - .globl __fpclassifyd -__fpclassifyd: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___fpclassifyd.1: -..L2: - - movd %xmm0, %rcx - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - btrq $63, %rcx - andl $2147483647, %eax - cmpl $2146435072, %eax - jb ..B1.3 -..B1.2: - movq $0x7ff0000000000000, %rdx - xorl %eax, %eax - cmpq %rcx, %rdx - setae %al - ret -..B1.3: - cmpl $1048576, %eax - jae ..B1.5 -..B1.4: - movl $3, %edx - movl $2, %eax - testq %rcx, %rcx - cmovne %edx, %eax - ret -..B1.5: - movl $4, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __fpclassifyd,@function - .size __fpclassifyd,.-__fpclassifyd - .data -# -- End __fpclassifyd - .text -# -- Begin fpclassifyd - .text - .align 16,0x90 - .globl fpclassifyd -fpclassifyd: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_fpclassifyd.4: -..L5: - - movd %xmm0, %rcx - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - btrq $63, %rcx - andl $2147483647, %eax - cmpl $2146435072, %eax - jb ..B2.3 -..B2.2: - movq $0x7ff0000000000000, %rdx - xorl %eax, %eax - cmpq %rcx, %rdx - setae %al - ret -..B2.3: - cmpl $1048576, %eax - jae ..B2.5 -..B2.4: - movl $3, %edx - movl $2, %eax - testq %rcx, %rcx - cmovne %edx, %eax - ret -..B2.5: - movl $4, %eax - ret - .align 16,0x90 - .cfi_endproc - .type fpclassifyd,@function - .size fpclassifyd,.-fpclassifyd - .data -# -- End fpclassifyd - .text -# -- Begin __fpclassify - .text - .align 16,0x90 - .globl __fpclassify -__fpclassify: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value___fpclassify.7: -..L8: - - movd %xmm0, %rcx - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - btrq $63, %rcx - andl $2147483647, %eax - cmpl $2146435072, %eax - jb ..B3.3 -..B3.2: - movq $0x7ff0000000000000, %rdx - xorl %eax, %eax - cmpq %rcx, %rdx - setae %al - ret -..B3.3: - cmpl $1048576, %eax - jae ..B3.5 -..B3.4: - movl $3, %edx - movl $2, %eax - testq %rcx, %rcx - cmovne %edx, %eax - ret -..B3.5: - movl $4, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __fpclassify,@function - .size __fpclassify,.-__fpclassify - .data -# -- End __fpclassify - .text -# -- Begin fpclassify - .text - .align 16,0x90 - .globl fpclassify -fpclassify: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value_fpclassify.10: -..L11: - - movd %xmm0, %rcx - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - btrq $63, %rcx - andl $2147483647, %eax - cmpl $2146435072, %eax - jb ..B4.3 -..B4.2: - movq $0x7ff0000000000000, %rdx - xorl %eax, %eax - cmpq %rcx, %rdx - setae %al - ret -..B4.3: - cmpl $1048576, %eax - jae ..B4.5 -..B4.4: - movl $3, %edx - movl $2, %eax - testq %rcx, %rcx - cmovne %edx, %eax - ret -..B4.5: - movl $4, %eax - ret - .align 16,0x90 - .cfi_endproc - .type fpclassify,@function - .size fpclassify,.-fpclassify - .data -# -- End fpclassify - .text -# -- Begin __fpclassifyf - .text - .align 16,0x90 - .globl __fpclassifyf -__fpclassifyf: -# parameter 1: %xmm0 -..B5.1: - .cfi_startproc -..___tag_value___fpclassifyf.13: -..L14: - - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - jb ..B5.3 -..B5.2: - movl $0, %eax - setbe %al - ret -..B5.3: - cmpl $8388608, %edx - jae ..B5.5 -..B5.4: - movl $3, %ecx - movl $2, %eax - testl %edx, %edx - cmovne %ecx, %eax - ret -..B5.5: - movl $4, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __fpclassifyf,@function - .size __fpclassifyf,.-__fpclassifyf - .data -# -- End __fpclassifyf - .text -# -- Begin fpclassifyf - .text - .align 16,0x90 - .globl fpclassifyf -fpclassifyf: -# parameter 1: %xmm0 -..B6.1: - .cfi_startproc -..___tag_value_fpclassifyf.16: -..L17: - - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - jb ..B6.3 -..B6.2: - movl $0, %eax - setbe %al - ret -..B6.3: - cmpl $8388608, %edx - jae ..B6.5 -..B6.4: - movl $3, %ecx - movl $2, %eax - testl %edx, %edx - cmovne %ecx, %eax - ret -..B6.5: - movl $4, %eax - ret - .align 16,0x90 - .cfi_endproc - .type fpclassifyf,@function - .size fpclassifyf,.-fpclassifyf - .data -# -- End fpclassifyf - .text -# -- Begin __fpclassifyl - .text - .align 16,0x90 - .globl __fpclassifyl -__fpclassifyl: -# parameter 1: 8 + %rsp -..B7.1: - .cfi_startproc -..___tag_value___fpclassifyl.19: -..L20: - - movzwl 16(%rsp), %ecx - andl $32767, %ecx - movl 12(%rsp), %esi - movl %ecx, %eax - movl %esi, %edx - shll $16, %eax - shrl $16, %edx - orl %edx, %eax - cmpl $2147418112, %eax - jb ..B7.5 -..B7.2: - cmpl $32767, %ecx - je ..B7.12 -..B7.3: - xorl %eax, %eax -..B7.4: - ret -..B7.5: - cmpl $65536, %eax - jae ..B7.11 -..B7.6: - testl %esi, %esi - jne ..B7.8 -..B7.7: - cmpl $0, 8(%rsp) - je ..B7.9 -..B7.8: - movl $3, %eax - ret -..B7.9: - movl $2, %eax -..B7.10: - ret -..B7.11: - andl $32768, %eax - shrl $15, %eax - addl $3, %eax - ret -..B7.12: - cmpl $-2147483648, %esi - jne ..B7.3 -..B7.13: - cmpl $0, 8(%rsp) - jne ..B7.3 -..B7.14: - movl $1, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __fpclassifyl,@function - .size __fpclassifyl,.-__fpclassifyl - .data -# -- End __fpclassifyl - .text -# -- Begin fpclassifyl - .text - .align 16,0x90 - .globl fpclassifyl -fpclassifyl: -# parameter 1: 8 + %rsp -..B8.1: - .cfi_startproc -..___tag_value_fpclassifyl.22: -..L23: - - movzwl 16(%rsp), %ecx - andl $32767, %ecx - movl 12(%rsp), %esi - movl %ecx, %eax - movl %esi, %edx - shll $16, %eax - shrl $16, %edx - orl %edx, %eax - cmpl $2147418112, %eax - jb ..B8.5 -..B8.2: - cmpl $32767, %ecx - je ..B8.12 -..B8.3: - xorl %eax, %eax -..B8.4: - ret -..B8.5: - cmpl $65536, %eax - jae ..B8.11 -..B8.6: - testl %esi, %esi - jne ..B8.8 -..B8.7: - cmpl $0, 8(%rsp) - je ..B8.9 -..B8.8: - movl $3, %eax - ret -..B8.9: - movl $2, %eax -..B8.10: - ret -..B8.11: - andl $32768, %eax - shrl $15, %eax - addl $3, %eax - ret -..B8.12: - cmpl $-2147483648, %esi - jne ..B8.3 -..B8.13: - cmpl $0, 8(%rsp) - jne ..B8.3 -..B8.14: - movl $1, %eax - ret - .align 16,0x90 - .cfi_endproc - .type fpclassifyl,@function - .size fpclassifyl,.-fpclassifyl - .data -# -- End fpclassifyl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexp_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexp_gen.S deleted file mode 100644 index 42177750cb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexp_gen.S +++ /dev/null @@ -1,115 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "frexp_gen.c" - .text -..TXTST0: -# -- Begin frexp - .text - .align 16,0x90 - .globl frexp -frexp: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_frexp.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - movl %eax, %edx - andl $2147483647, %edx - lea -1048576(%rdx), %ecx - cmpl $2145386496, %ecx - jb ..B1.6 -..B1.2: - testl %ecx, %ecx - jge ..B1.5 -..B1.3: - movl -8(%rsp), %eax - orl %eax, %edx - je ..B1.5 -..B1.4: - lea _TWO_55(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - movl %edx, %ecx - andl $2147483647, %ecx - andl $-2146435073, %edx - shrl $20, %ecx - orl $1071644672, %edx - movl %edx, -4(%rsp) - addl $-1077, %ecx - movl %ecx, (%rdi) - movsd -8(%rsp), %xmm0 - ret -..B1.5: - movl $0, (%rdi) - movsd -8(%rsp), %xmm0 - ret -..B1.6: - andl $-2146435073, %eax - shrl $20, %ecx - orl $1071644672, %eax - movl %eax, -4(%rsp) - addl $-1021, %ecx - movl %ecx, (%rdi) - movsd -8(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type frexp,@function - .size frexp,.-frexp - .data -# -- End frexp - .section .rodata, "a" - .align 4 - .align 4 -_TWO_55: - .long 0 - .long 1130364928 - .type _TWO_55,@object - .size _TWO_55,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexpf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexpf.S deleted file mode 100644 index 58d2539b42..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexpf.S +++ /dev/null @@ -1,114 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "frexpf.c" - .text -..TXTST0: -# -- Begin frexpf - .text - .align 16,0x90 - .globl frexpf -frexpf: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_frexpf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - movl %edx, %eax - andl $2147483647, %eax - lea -8388608(%rax), %ecx - cmpl $2130706432, %ecx - jb ..B1.5 -..B1.2: - decl %eax - cmpl $2139095039, %eax - jae ..B1.6 -..B1.3: - movl %edx, -20(%rsp) - orl $1056964608, %edx - movl %edx, -24(%rsp) - andl $-2147483648, %edx - orl $1056964608, %edx - movl %edx, -16(%rsp) - movss -24(%rsp), %xmm2 - movss -20(%rsp), %xmm1 - movss -20(%rsp), %xmm0 - subss -16(%rsp), %xmm2 - addss %xmm0, %xmm1 - movd %xmm2, %eax - movss %xmm1, -20(%rsp) - movl %eax, %edx - andl $-2139095041, %eax - andl $2139095040, %edx - orl $1056964608, %eax - shrl $23, %edx - movl %eax, -24(%rsp) - addl $-251, %edx - movl %edx, (%rdi) - movss -24(%rsp), %xmm0 -..B1.4: - ret -..B1.5: - andl $-2139095041, %edx - shrl $23, %ecx - orl $1056964608, %edx - movl %edx, -24(%rsp) - addl $-125, %ecx - movl %ecx, (%rdi) - movss -24(%rsp), %xmm0 - ret -..B1.6: - movss -8(%rsp), %xmm0 - movl $0, (%rdi) - addss %xmm0, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type frexpf,@function - .size frexpf,.-frexpf - .data -# -- End frexpf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexpl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexpl.S deleted file mode 100644 index 45c09e0930..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/frexpl.S +++ /dev/null @@ -1,174 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "frexpl.c" - .text -..TXTST0: -# -- Begin frexpl - .text - .align 16,0x90 - .globl frexpl -frexpl: -# parameter 1: 32 + %rsp -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_frexpl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movzwl 40(%rsp), %edx - movl %edx, %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.15 -..B1.4: - testl %eax, %eax - jne ..B1.13 -..B1.5: - cmpq $0, 32(%rsp) - je ..B1.12 -..B1.6: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.14 -..B1.7: - orl $-64768, %edx - movl $0, (%rdi) - movw %dx, 16(%rsp) -..B1.8: - fldcw 16(%rsp) -..B1.9: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) -..B1.10: - fldcw 18(%rsp) -..B1.11: - movzwl 40(%rsp), %edx - movl %edx, %eax - andl $-32768, %edx - andl $32767, %eax - orl $-49154, %edx - addl $-16457, %eax - movw %dx, 40(%rsp) - fldt 32(%rsp) - movl %eax, (%rdi) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.12: - fldt 32(%rsp) - movl $0, (%rdi) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.13: - andl $-32768, %edx - addl $-16382, %eax - orl $-49154, %edx - movw %dx, 40(%rsp) - fldt 32(%rsp) - movl %eax, (%rdi) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.14: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) - jmp ..B1.11 -..B1.15: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - movl $0, (%rdi) - cmpl $768, %eax - je ..B1.21 -..B1.16: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.17: - fldcw 16(%rsp) -..B1.18: - fldt 32(%rsp) - fstpt (%rsp) -..B1.19: - fldcw 18(%rsp) -..B1.20: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.21: - fldt 32(%rsp) - fstpt (%rsp) - jmp ..B1.20 - .align 16,0x90 - .cfi_endproc - .type frexpl,@function - .size frexpl,.-frexpl - .data -# -- End frexpl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypot_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypot_gen.S deleted file mode 100644 index d1b9a11db6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypot_gen.S +++ /dev/null @@ -1,143 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "hypot_gen.c" - .text -..TXTST0: -# -- Begin hypot - .text - .align 16,0x90 - .globl hypot -hypot: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_hypot.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %cl, %cl - movsd %xmm0, 8(%rsp) - movsd %xmm1, 16(%rsp) -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.5: - fldcw 32(%rsp) -..B1.6: - movb $1, %cl -..B1.7: - fldl 8(%rsp) - fmull 8(%rsp) - fldl 16(%rsp) - fmull 16(%rsp) - faddp - fsqrt - fstpl 24(%rsp) -..B1.8: - testb %cl, %cl - je ..B1.10 -..B1.9: - fldcw 34(%rsp) -..B1.10: - movq $0x7ff0000000000000, %rcx - movq 24(%rsp), %rax - cmpq %rcx, %rax - jb ..B1.19 -..B1.11: - movq 8(%rsp), %rdx - movq 16(%rsp), %rsi - btrq $63, %rdx - btrq $63, %rsi - cmpq %rcx, %rax - je ..B1.17 -..B1.12: - cmpq %rcx, %rdx - jne ..B1.14 -..B1.13: - movq %rdx, (%rsp) - movsd (%rsp), %xmm0 - movsd %xmm0, 24(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.14: - cmpq %rcx, %rsi - jne ..B1.17 -..B1.15: - movq %rsi, (%rsp) - movsd (%rsp), %xmm0 - movsd %xmm0, 24(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.17: - movsd 24(%rsp), %xmm0 -..B1.18: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.19: - movsd 24(%rsp), %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type hypot,@function - .size hypot,.-hypot - .data -# -- End hypot - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypotf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypotf_gen.S deleted file mode 100644 index 6a1b3d8b1c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypotf_gen.S +++ /dev/null @@ -1,100 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "hypotf_gen.c" - .text -..TXTST0: -# -- Begin hypotf - .text - .align 16,0x90 - .globl hypotf -hypotf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_hypotf.1: -..L2: - - movaps %xmm1, %xmm3 - movaps %xmm0, %xmm1 - pxor %xmm0, %xmm0 - pxor %xmm2, %xmm2 - cvtss2sd %xmm1, %xmm0 - cvtss2sd %xmm3, %xmm2 - mulsd %xmm0, %xmm0 - mulsd %xmm2, %xmm2 - addsd %xmm2, %xmm0 - sqrtsd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm0 - movd %xmm0, %eax - cmpl $2139095040, %eax - jb ..B1.8 -..B1.2: - movd %xmm1, %edx - movd %xmm3, %ecx - andl $2147483647, %edx - andl $2147483647, %ecx - cmpl $2139095040, %eax - je ..B1.8 -..B1.4: - cmpl $2139095040, %edx - jne ..B1.6 -..B1.5: - movl %edx, -8(%rsp) - movss -8(%rsp), %xmm0 - ret -..B1.6: - cmpl $2139095040, %ecx - jne ..B1.8 -..B1.7: - movl %ecx, -8(%rsp) - movss -8(%rsp), %xmm0 -..B1.8: - ret - .align 16,0x90 - .cfi_endproc - .type hypotf,@function - .size hypotf,.-hypotf - .data -# -- End hypotf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypotl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypotl.S deleted file mode 100644 index 4e5f91abcc..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/hypotl.S +++ /dev/null @@ -1,849 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "hypotl.c" - .text -..TXTST0: -# -- Begin hypotl - .text - .align 16,0x90 - .globl hypotl -hypotl: -# parameter 1: 32 + %rsp -# parameter 2: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_hypotl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - xorb %sil, %sil -..B1.2: - fnstcw 18(%rsp) -..B1.3: - andb $127, 41(%rsp) - andb $127, 57(%rsp) - movzwl 40(%rsp), %edx - andl $32767, %edx - movzwl 56(%rsp), %eax - andl $32767, %eax - cmpl $32767, %edx - je ..B1.67 -..B1.4: - cmpl $32767, %eax - je ..B1.67 -..B1.5: - movl %edx, %ecx - subl %eax, %ecx - lea 64(%rcx), %edi - cmpl $128, %edi - ja ..B1.25 -..B1.6: - lea (%rdx,%rax), %edi - cmpl $18376, %edi - jge ..B1.35 -..B1.7: - testl %edx, %edx - jne ..B1.12 -..B1.8: - cmpq $0, 32(%rsp) - jne ..B1.12 -..B1.9: - testl %eax, %eax - jne ..B1.12 -..B1.10: - cmpq $0, 48(%rsp) - jne ..B1.12 -..B1.11: - lea _zeros(%rip), %rax - fldl (%rax) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.12: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.16 -..B1.13: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.14: - fldcw 16(%rsp) -..B1.15: - movb $1, %sil -..B1.16: - fldt 32(%rsp) - lea _scales(%rip), %rax - fldt 48(%rsp) - lea 4(%rcx), %edx - cmpl $8, %edx - fldt (%rax) - fmul %st, %st(2) - fmulp %st, %st(1) - ja ..B1.20 -..B1.17: - lea _TWO_48H(%rip), %rax - fld %st(1) - fld %st(2) - fld %st(3) - fld %st(3) - lea _TWO_32H(%rip), %rdx - fxch %st(5) - fcomi %st(4), %st - fldl (%rax) - fmul %st, %st(4) - fxch %st(3) - fadd %st(4), %st - fsubp %st, %st(4) - fld %st(3) - fld %st(5) - fxch %st(4) - fmul %st(6), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(3) - fxch %st(3) - fsub %st(5), %st - fmul %st, %st(1) - fxch %st(4) - fsubr %st, %st(7) - fxch %st(3) - fmul %st(7), %st - fxch %st(2) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - fld %st(0) - fxch %st(3) - fmul %st(0), %st - fadd %st, %st(3) - fldl (%rdx) - fld %st(0) - fmul %st(5), %st - fadd %st, %st(5) - fsubrp %st, %st(5) - jbe ..B1.19 -..B1.18: - fxch %st(1) - fsubr %st(4), %st - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - jmp ..B1.22 -..B1.19: - fxch %st(2) - fsubr %st(4), %st - fsubrp %st, %st(1) - faddp %st, %st(2) - fxch %st(2) - jmp ..B1.22 -..B1.20: - lea _TWO_48H(%rip), %rax - lea _TWO_32H(%rip), %rdx - testl %ecx, %ecx - fldl (%rax) - fldl (%rdx) - jle ..B1.34 -..B1.21: - fxch %st(1) - fmul %st(3), %st - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(4) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st(0), %st - fxch %st(2) - fxch %st(1) - fxch %st(2) -..B1.22: - fld %st(0) - lea 16+_scales(%rip), %rax - testb %sil, %sil - fadd %st(2), %st - fsqrt - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fsubrp %st, %st(2) - fld %st(3) - fxch %st(1) - fsub %st(4), %st - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(2) - fadd %st(2), %st - fdivrp %st, %st(1) - faddp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.24 -..B1.23: - fldcw 18(%rsp) -..B1.24: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.25: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.26: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.27: - fldcw 16(%rsp) -..B1.28: - movb $1, %sil -..B1.29: - fldt 32(%rsp) - lea 16+_ranges(%rip), %rax - fldt 48(%rsp) - faddp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) - fldt (%rax) - fcomip %st(1), %st - fstp %st(0) - jae ..B1.31 - jp ..B1.31 -..B1.30: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) -..B1.31: - testb %sil, %sil - je ..B1.33 -..B1.32: - fldcw 18(%rsp) -..B1.33: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.34: - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(3) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - jmp ..B1.22 -..B1.35: - movzwl 18(%rsp), %edx - cmpl $47156, %edi - jle ..B1.51 -..B1.36: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.40 -..B1.37: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.38: - fldcw 16(%rsp) -..B1.39: - movb $1, %sil -..B1.40: - fldt 32(%rsp) - lea 16+_scales(%rip), %rax - fldt 48(%rsp) - lea 4(%rcx), %edx - cmpl $8, %edx - fldt (%rax) - fmul %st, %st(2) - fmulp %st, %st(1) - ja ..B1.44 -..B1.41: - lea _TWO_48H(%rip), %rax - fld %st(1) - fld %st(2) - fld %st(3) - fld %st(3) - lea _TWO_32H(%rip), %rdx - fxch %st(5) - fcomi %st(4), %st - fldl (%rax) - fmul %st, %st(4) - fxch %st(3) - fadd %st(4), %st - fsubp %st, %st(4) - fld %st(3) - fld %st(5) - fxch %st(4) - fmul %st(6), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(3) - fxch %st(3) - fsub %st(5), %st - fmul %st, %st(1) - fxch %st(4) - fsubr %st, %st(7) - fxch %st(3) - fmul %st(7), %st - fxch %st(2) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - fld %st(0) - fxch %st(3) - fmul %st(0), %st - fadd %st, %st(3) - fldl (%rdx) - fld %st(0) - fmul %st(5), %st - fadd %st, %st(5) - fsubrp %st, %st(5) - jbe ..B1.43 -..B1.42: - fxch %st(1) - fsubr %st(4), %st - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - jmp ..B1.46 -..B1.43: - fxch %st(2) - fsubr %st(4), %st - fsubrp %st, %st(1) - faddp %st, %st(2) - fxch %st(2) - jmp ..B1.46 -..B1.44: - lea _TWO_48H(%rip), %rax - lea _TWO_32H(%rip), %rdx - testl %ecx, %ecx - fldl (%rax) - fldl (%rdx) - jle ..B1.65 -..B1.45: - fxch %st(1) - fmul %st(3), %st - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(4) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st(0), %st - fxch %st(2) - fxch %st(1) - fxch %st(2) -..B1.46: - fldt .L_2il0floatpacket.0(%rip) - fld %st(1) - lea _ranges(%rip), %rax - fadd %st(3), %st - fsqrt - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(5) - fld %st(4) - fmul %st(5), %st - fsubrp %st, %st(3) - fld %st(4) - fxch %st(1) - fsub %st(5), %st - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(3) - fadd %st(3), %st - fdivrp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) - fldt (%rax) - fcomip %st(1), %st - fstp %st(0) - jp ..B1.47 - jbe ..B1.64 -..B1.47: - fldt (%rsp) - lea _scales(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.48: - testb %sil, %sil - je ..B1.50 -..B1.49: - fldcw 18(%rsp) -..B1.50: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.51: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.55 -..B1.52: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.53: - fldcw 16(%rsp) -..B1.54: - movb $1, %sil -..B1.55: - lea 4(%rcx), %eax - cmpl $8, %eax - ja ..B1.59 -..B1.56: - fldt 32(%rsp) - lea _TWO_48H(%rip), %rax - fld %st(0) - fld %st(1) - fld %st(2) - lea _TWO_32H(%rip), %rdx - fldt 48(%rsp) - fld %st(0) - fxch %st(5) - fcomi %st(1), %st - fldl (%rax) - fmul %st, %st(5) - fxch %st(4) - fadd %st(5), %st - fsubp %st, %st(5) - fld %st(4) - fld %st(2) - fxch %st(3) - fmul %st, %st(5) - fxch %st(3) - fadd %st(5), %st - fsubp %st, %st(5) - fld %st(4) - fxch %st(4) - fsub %st(6), %st - fmul %st, %st(1) - fxch %st(5) - fsubr %st, %st(7) - fxch %st(4) - fmul %st(7), %st - fxch %st(2) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fmul %st(0), %st - fld %st(0) - fxch %st(2) - fmul %st(0), %st - fadd %st, %st(2) - fldl (%rdx) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - jbe ..B1.58 -..B1.57: - fxch %st(1) - fsubr %st(3), %st - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - fxch %st(1) - jmp ..B1.61 -..B1.58: - fxch %st(2) - fsubr %st(3), %st - fsubrp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - fxch %st(1) - jmp ..B1.61 -..B1.59: - fldt 32(%rsp) - lea _TWO_48H(%rip), %rax - fldt 48(%rsp) - lea _TWO_32H(%rip), %rdx - testl %ecx, %ecx - fldl (%rax) - fldl (%rdx) - jle ..B1.66 -..B1.60: - fxch %st(1) - fmul %st(3), %st - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(4) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(5) - faddp %st, %st(4) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st(0), %st - fxch %st(2) - fxch %st(1) - fxch %st(2) -..B1.61: - fldt .L_2il0floatpacket.0(%rip) - fld %st(1) - testb %sil, %sil - fadd %st(3), %st - fsqrt - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fsubp %st, %st(5) - fld %st(4) - fmul %st(5), %st - fsubrp %st, %st(3) - fld %st(4) - fxch %st(1) - fsub %st(5), %st - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(3) - fadd %st(3), %st - fdivrp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.63 -..B1.62: - fldcw 18(%rsp) -..B1.63: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.64: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.48 -..B1.65: - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(3) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - jmp ..B1.46 -..B1.66: - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fld %st(3) - fsub %st(2), %st - fmul %st, %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - jmp ..B1.61 -..B1.67: - movzwl 18(%rsp), %edi - movl %edi, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.71 -..B1.68: - orl $-64768, %edi - movw %di, 16(%rsp) -..B1.69: - fldcw 16(%rsp) -..B1.70: - movb $1, %sil -..B1.71: - cmpl $32767, %edx - je ..B1.87 -..B1.72: - cmpl $32767, %eax - je ..B1.85 -..B1.73: - fldt 32(%rsp) - fldt 48(%rsp) - faddp %st, %st(1) - fstpt (%rsp) -..B1.74: - testb %sil, %sil - je ..B1.76 -..B1.75: - fldcw 18(%rsp) -..B1.76: - cmpl $32767, %edx - je ..B1.82 -..B1.77: - cmpl $32767, %eax - jne ..B1.81 -..B1.78: - cmpl $-2147483648, 52(%rsp) - jne ..B1.81 -..B1.79: - cmpl $0, 48(%rsp) - jne ..B1.81 -..B1.80: - fldt 48(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.81: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.82: - cmpl $-2147483648, 36(%rsp) - jne ..B1.77 -..B1.83: - cmpl $0, 32(%rsp) - jne ..B1.77 -..B1.84: - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.85: - movq $0x8000000000000000, %rcx - cmpq 48(%rsp), %rcx - je ..B1.73 -..B1.86: - fldt 32(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.74 -..B1.87: - movq $0x8000000000000000, %rcx - cmpq 32(%rsp), %rcx - jne ..B1.86 - jmp ..B1.72 - .align 16,0x90 - .cfi_endproc - .type hypotl,@function - .size hypotl,.-hypotl - .data -# -- End hypotl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_scales: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24653 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8113 - .word 0 - .word 0 - .word 0 - .type _scales,@object - .size _scales,32 - .align 2 -_ranges: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24497 - .word 0 - .word 0 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 32766 - .word 0 - .word 0 - .word 0 - .type _ranges,@object - .size _ranges,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogb_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogb_gen.S deleted file mode 100644 index 8bd3be4b36..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogb_gen.S +++ /dev/null @@ -1,134 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ilogb_gen.c" - .text -..TXTST0: -# -- Begin ilogb - .text - .align 16,0x90 - .globl ilogb -ilogb: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ilogb.1: -..L2: - - movsd %xmm0, -16(%rsp) - movl -12(%rsp), %ecx - andl $2147483647, %ecx - lea -1048576(%rcx), %eax - cmpl $2145386496, %eax - jb ..B1.4 -..B1.2: - testl %eax, %eax - jl ..B1.5 -..B1.3: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - addl $-2146435072, %ecx - orl -16(%rsp), %ecx - movl $2147483647, %ecx - movsd (%rax), %xmm0 - movl $-2147483648, %eax - mulsd (%rdx), %xmm0 - cmove %ecx, %eax - movsd %xmm0, -24(%rsp) - ret -..B1.4: - shrl $20, %eax - addl $-1022, %eax - ret -..B1.5: - movl -16(%rsp), %eax - orl %eax, %ecx - je ..B1.7 -..B1.6: - lea _TWO_55(%rip), %rax - movsd -16(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -16(%rsp) - movl -12(%rsp), %eax - andl $2147483647, %eax - shrl $20, %eax - addl $-1078, %eax - ret -..B1.7: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - movl $-2147483648, %eax - mulsd (%rdx), %xmm0 - movsd %xmm0, -24(%rsp) - ret - .align 16,0x90 - .cfi_endproc - .type ilogb,@function - .size ilogb,.-ilogb - .data -# -- End ilogb - .section .rodata, "a" - .align 4 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_55: - .long 0 - .long 1130364928 - .type _TWO_55,@object - .size _TWO_55,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogbf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogbf.S deleted file mode 100644 index be18f3b22b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogbf.S +++ /dev/null @@ -1,116 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ilogbf.c" - .text -..TXTST0: -# -- Begin ilogbf - .text - .align 16,0x90 - .globl ilogbf -ilogbf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ilogbf.1: -..L2: - - movd %xmm0, %ecx - movss %xmm0, -16(%rsp) - andl $2147483647, %ecx - addl $-8388608, %ecx - cmpl $2130706432, %ecx - jb ..B1.4 -..B1.2: - testl %ecx, %ecx - jl ..B1.5 -..B1.3: - movl $2147483647, %edx - movl $-2147483648, %eax - cmpl $2130706432, %ecx - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.0(%rip), %xmm0 - cmove %edx, %eax - movss %xmm0, -24(%rsp) - ret -..B1.4: - shrl $23, %ecx - addl $-126, %ecx - movl %ecx, %eax - ret -..B1.5: - cmpl $-8388608, %ecx - je ..B1.7 -..B1.6: - movss -16(%rsp), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - movd %xmm0, %eax - movss %xmm0, -16(%rsp) - andl $2147483647, %eax - shrl $23, %eax - addl $-152, %eax - ret -..B1.7: - movl $-2147483648, %eax - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.0(%rip), %xmm0 - movss %xmm0, -24(%rsp) - ret - .align 16,0x90 - .cfi_endproc - .type ilogbf,@function - .size ilogbf,.-ilogbf - .data -# -- End ilogbf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x7f800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4c000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogbl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogbl.S deleted file mode 100644 index 0b9cff62e4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ilogbl.S +++ /dev/null @@ -1,200 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ilogbl.c" - .text -..TXTST0: -# -- Begin ilogbl - .text - .align 16,0x90 - .globl ilogbl -ilogbl: -# parameter 1: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_ilogbl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..B1.2: - fnstcw 10(%rsp) -..B1.3: - movzwl 40(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.19 -..B1.4: - testl %eax, %eax - jne ..B1.12 -..B1.5: - movzwl 10(%rsp), %edx - cmpq $0, 32(%rsp) - je ..B1.14 -..B1.6: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.13 -..B1.7: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.8: - fldcw 8(%rsp) -..B1.9: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) -..B1.10: - fldcw 10(%rsp) -..B1.11: - movzwl 40(%rsp), %eax - andl $32767, %eax - addl $-16458, %eax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.12: - addl $-16383, %eax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.13: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) - jmp ..B1.11 -..B1.14: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.18 -..B1.15: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.16: - fldcw 8(%rsp) -..B1.17: - fldcw 10(%rsp) -..B1.18: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - movl $-2147483648, %eax - mulsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.19: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - cmpl $-2147483648, 36(%rsp) - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) - jne ..B1.22 -..B1.20: - cmpl $0, 32(%rsp) - jne ..B1.22 -..B1.21: - movl $2147483647, %eax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.22: - movzwl 10(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.26 -..B1.23: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.24: - fldcw 8(%rsp) -..B1.25: - fldcw 10(%rsp) -..B1.26: - movl $-2147483648, %eax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ilogbl,@function - .size ilogbl,.-ilogbl - .data -# -- End ilogbl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/intel_quad_exception.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/intel_quad_exception.S deleted file mode 100644 index d68df25de4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/intel_quad_exception.S +++ /dev/null @@ -1,1993 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "intel_quad_exception.c" - .text -..TXTST0: -# -- Begin __dpml_exception - .text - .align 16,0x90 - .globl __dpml_exception -__dpml_exception: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value___dpml_exception.1: -..L2: - - movq $0x7fffffffffffffff, %rdx - movq (%rdi), %rsi - andq %rsi, %rdx - testq %rsi, %rsi - lea 7+__dpml_response_table(%rip), %rax - lea 6+__dpml_response_table(%rip), %rcx - lea 32(%rdi), %r11 - cmovl %rdx, %rsi - movq $0xffffffff07ffffff, %rdx - andq %rsi, %rdx - movq %rsi, %r9 - shrq $27, %r9 - movq __dpml_globals_table@GOTPCREL(%rip), %r10 - movzbl (%rax,%rdx,8), %r8d - shlq $5, %r8 - movzbl (%rcx,%rdx,8), %esi - addq $-4, %rdx - lea (%r8,%r9,8), %rcx - addq %r10, %rcx - cmpl $4, %esi - cmove %r11, %rcx - cmpq $171, %rdx - ja ..B1.69 -..B1.2: - movl %edx, %r8d - lea .2.9_2.switchtab.1(%rip), %rdx - movzbl (%rdx,%r8), %edx - lea ..1.1_0.TAG.12.0.1(%rip), %rax - addq %rdx, %rax - jmp *%rax -..1.1_0.TAG.12.0.1: -..1.1_0.TAG.9.0.1: -..1.1_0.TAG.11.0.1: -..1.1_0.TAG.8.0.1: -..B1.59: - xorl %esi, %esi - lea 32(%rdi), %rcx - jmp ..B1.70 -..1.1_0.TAG.171.0.1: -..1.1_0.TAG.170.0.1: -..1.1_0.TAG.145.0.1: -..1.1_0.TAG.144.0.1: -..1.1_0.TAG.140.0.1: -..1.1_0.TAG.139.0.1: -..1.1_0.TAG.138.0.1: -..1.1_0.TAG.136.0.1: -..1.1_0.TAG.135.0.1: -..1.1_0.TAG.133.0.1: -..1.1_0.TAG.128.0.1: -..1.1_0.TAG.127.0.1: -..1.1_0.TAG.126.0.1: -..1.1_0.TAG.125.0.1: -..1.1_0.TAG.116.0.1: -..1.1_0.TAG.115.0.1: -..1.1_0.TAG.114.0.1: -..1.1_0.TAG.112.0.1: -..1.1_0.TAG.111.0.1: -..1.1_0.TAG.104.0.1: -..1.1_0.TAG.103.0.1: -..1.1_0.TAG.102.0.1: -..1.1_0.TAG.101.0.1: -..1.1_0.TAG.100.0.1: -..1.1_0.TAG.99.0.1: -..1.1_0.TAG.98.0.1: -..1.1_0.TAG.97.0.1: -..1.1_0.TAG.79.0.1: -..1.1_0.TAG.76.0.1: -..1.1_0.TAG.67.0.1: -..1.1_0.TAG.64.0.1: -..1.1_0.TAG.62.0.1: -..1.1_0.TAG.61.0.1: -..1.1_0.TAG.59.0.1: -..1.1_0.TAG.58.0.1: -..1.1_0.TAG.56.0.1: -..1.1_0.TAG.55.0.1: -..1.1_0.TAG.34.0.1: -..1.1_0.TAG.33.0.1: -..1.1_0.TAG.32.0.1: -..1.1_0.TAG.31.0.1: -..1.1_0.TAG.30.0.1: -..1.1_0.TAG.29.0.1: -..1.1_0.TAG.28.0.1: -..1.1_0.TAG.26.0.1: -..1.1_0.TAG.25.0.1: -..1.1_0.TAG.24.0.1: -..1.1_0.TAG.23.0.1: -..1.1_0.TAG.22.0.1: -..1.1_0.TAG.19.0.1: -..1.1_0.TAG.18.0.1: -..1.1_0.TAG.13.0.1: -..1.1_0.TAG.10.0.1: -..1.1_0.TAG.7.0.1: -..1.1_0.TAG.6.0.1: -..1.1_0.TAG.4.0.1: -..1.1_0.TAG.3.0.1: -..1.1_0.TAG.2.0.1: -..1.1_0.SWBASE.0.1: -..1.1_0.TAG.0.0.1: -..B1.69: - cmpl $4, %esi - ja ..B1.81 -..B1.70: - lea .2.9_2.switchtab.2(%rip), %rdx - movzbl (%rdx,%rsi), %edx - lea ..1.1_1.TAG.4.0.1(%rip), %rax - addq %rdx, %rax - jmp *%rax -..1.1_1.TAG.4.0.1: -..B1.72: - movl $8388608, -16(%rsp) - movss -16(%rsp), %xmm0 - cvtss2sd %xmm0, %xmm0 - mulsd .L_2il0floatpacket.2(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - jmp ..B1.81 -..1.1_1.TAG.3.0.1: -..B1.74: - movl $2130706432, -20(%rsp) - movss -20(%rsp), %xmm1 - movss -20(%rsp), %xmm0 - mulss %xmm0, %xmm1 - movss %xmm1, -20(%rsp) - jmp ..B1.81 -..1.1_1.TAG.2.0.1: -..B1.76: - movl $0, -8(%rsp) -..B1.77: - movss -8(%rsp), %xmm0 - cvtss2sd %xmm0, %xmm0 - movsd .L_2il0floatpacket.3(%rip), %xmm1 - divsd %xmm0, %xmm1 - cvtsd2ss %xmm1, %xmm1 - movss %xmm1, -8(%rsp) - jmp ..B1.81 -..1.1_1.TAG.1.0.1: -..B1.79: - movl $2139095040, -24(%rsp) - movss -24(%rsp), %xmm1 - movss -24(%rsp), %xmm0 - subss %xmm0, %xmm1 - movss %xmm1, -24(%rsp) -..1.1_1.TAG.0.0.1: -..B1.81: - movq %rcx, %rax - ret - .align 16,0x90 - .cfi_endproc - .type __dpml_exception,@function - .size __dpml_exception,.-__dpml_exception - .section .rodata, "a" - .align 8 - .align 1 -.2.9_2.switchtab.1: - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.12.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.12.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.12.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.12.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .byte ..1.1_0.TAG.171.0.1 - ..1.1_0.TAG.12.0.1 - .align 1 -.2.9_2.switchtab.2: - .byte ..1.1_1.TAG.0.0.1 - ..1.1_1.TAG.4.0.1 - .byte ..1.1_1.TAG.1.0.1 - ..1.1_1.TAG.4.0.1 - .byte ..1.1_1.TAG.2.0.1 - ..1.1_1.TAG.4.0.1 - .byte ..1.1_1.TAG.3.0.1 - ..1.1_1.TAG.4.0.1 - .byte ..1.1_1.TAG.4.0.1 - ..1.1_1.TAG.4.0.1 - .data -# -- End __dpml_exception - .text -# -- Begin __dpml_intel_atan_fixup - .text - .align 16,0x90 - .globl __dpml_intel_atan_fixup -__dpml_intel_atan_fixup: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -..B2.1: - .cfi_startproc -..___tag_value___dpml_intel_atan_fixup.4: -..L5: - - movq %rcx, %r9 - movq %rdx, %rcx - movq %rdi, %rdx - btrq $63, %rdx - movl $4, %r10d - movq %rdx, %rax - movq %rdx, %r11 - sarq $4, %r11 - andq $15, %rax - testq %r9, %r9 - cmovne %r11, %rdx - cmove %r10, %rax - xorb %dil, %dil - lea (%rdx,%rdx,4), %r9 - lea -22(%rax,%r9,2), %rax - cmpq $77, %rax - ja ..B2.56 -..B2.2: - movl %eax, %eax - lea .2.10_2.switchtab.4(%rip), %rdx - movzwl (%rdx,%rax,2), %edx - lea ..1.2_0.TAG.77.0.2(%rip), %rax - addq %rdx, %rax - jmp *%rax -..1.2_0.TAG.77.0.2: -..B2.4: - movl $5, %eax - movl $11, %r8d - movb $3, %dil - testq %rcx, %rcx - cmovne %rax, %r8 - jne ..B2.51 - jmp ..B2.52 -..1.2_0.TAG.76.0.2: -..B2.6: - movq __x_constants__@GOTPCREL(%rip), %r8 - movq 8(%r8), %rax - jmp ..B2.54 -..1.2_0.TAG.75.0.2: -..1.2_0.TAG.73.0.2: -..1.2_0.TAG.71.0.2: -..1.2_0.TAG.65.0.2: -..1.2_0.TAG.63.0.2: -..1.2_0.TAG.61.0.2: -..1.2_0.TAG.57.0.2: -..1.2_0.TAG.56.0.2: -..1.2_0.TAG.51.0.2: -..1.2_0.TAG.47.0.2: -..1.2_0.TAG.46.0.2: -..1.2_0.TAG.41.0.2: -..1.2_0.TAG.37.0.2: -..1.2_0.TAG.36.0.2: -..1.2_0.TAG.31.0.2: -..1.2_0.TAG.27.0.2: -..1.2_0.TAG.26.0.2: -..1.2_0.TAG.21.0.2: -..1.2_0.TAG.17.0.2: -..1.2_0.TAG.16.0.2: -..1.2_0.TAG.15.0.2: -..1.2_0.TAG.14.0.2: -..1.2_0.TAG.13.0.2: -..1.2_0.TAG.12.0.2: -..1.2_0.TAG.7.0.2: -..1.2_0.TAG.6.0.2: -..1.2_0.TAG.5.0.2: -..1.2_0.TAG.4.0.2: -..1.2_0.TAG.3.0.2: -..1.2_0.TAG.2.0.2: -..B2.7: - testq %rcx, %rcx - jne ..B2.51 - jmp ..B2.52 -..1.2_0.TAG.67.0.2: -..B2.11: - movl $5, %eax - movl $11, %r8d - movb $2, %dil - testq %rcx, %rcx - cmovne %rax, %r8 - jne ..B2.51 - jmp ..B2.52 -..1.2_0.TAG.66.0.2: -..B2.13: - movq __x_constants__@GOTPCREL(%rip), %r8 - movq 8(%r8), %rax - jmp ..B2.55 -..1.2_0.TAG.11.0.2: -..B2.36: - movl $6, %eax - movl $10, %r8d - movb $3, %dil - testq %rcx, %rcx - cmovne %rax, %r8 - jne ..B2.51 - jmp ..B2.52 -..1.2_0.TAG.10.0.2: -..B2.38: - movl $8, %r8d - movb $3, %dil - testq %rcx, %rcx - cmovne %r10, %r8 - jne ..B2.51 - jmp ..B2.52 -..1.2_0.TAG.1.0.2: -..B2.47: - movl $6, %eax - movl $10, %r8d - movb $2, %dil - testq %rcx, %rcx - cmovne %rax, %r8 - jne ..B2.51 - jmp ..B2.52 -..1.2_0.TAG.0.0.2: -..B2.49: - movl $8, %r8d - movb $2, %dil - testq %rcx, %rcx - cmovne %r10, %r8 -..B2.50: - je ..B2.52 -..B2.51: - movl $1182793727, -8(%rsp) - movss -8(%rsp), %xmm1 - movss -8(%rsp), %xmm0 - mulss %xmm0, %xmm1 - movss %xmm1, -8(%rsp) -..B2.52: - testb %dil, %dil - je ..B2.56 -..B2.53: - shlq $4, %r8 - movq __x_constants__@GOTPCREL(%rip), %rax - addq %rax, %r8 - cmpb $3, %dil - movq 8(%r8), %rax - jne ..B2.55 -..B2.54: - btcq $63, %rax -..B2.55: - movq %rax, 8(%rsi) - movq (%r8), %rax - movq %rax, (%rsi) - ret -..1.2_0.SWBASE.0.2: -..B2.56: - ret - .align 16,0x90 - .cfi_endproc - .type __dpml_intel_atan_fixup,@function - .size __dpml_intel_atan_fixup,.-__dpml_intel_atan_fixup - .section .rodata, "a" - .space 1, 0x00 # pad - .align 2 -.2.10_2.switchtab.4: - .word ..1.2_0.TAG.0.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.1.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.10.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.11.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.66.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.67.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.SWBASE.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.75.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.76.0.2 - ..1.2_0.TAG.77.0.2 - .word ..1.2_0.TAG.77.0.2 - ..1.2_0.TAG.77.0.2 - .data -# -- End __dpml_intel_atan_fixup - .text -# -- Begin __dpml_intel_pow_fixup - .text - .align 16,0x90 - .globl __dpml_intel_pow_fixup -__dpml_intel_pow_fixup: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9 -# parameter 7: 96 + %rsp -..B3.1: - .cfi_startproc -..___tag_value___dpml_intel_pow_fixup.7: -..L8: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $48, %rsp - .cfi_def_cfa_offset 96 - movq %rdi, %r12 - movq %rcx, %r11 - movq %r12, %rcx - sarq $4, %rcx - movq %r12, %r10 - andq $15, %rcx - andq $15, %r10 - movq %r9, %rbx - movq %rsi, %rbp - testq %r12, %r12 - lea (%rcx,%rcx,4), %rcx - lea (%r10,%rcx,2), %r9 - jl ..B3.20 -..B3.2: - movq $0x8000000000000000, %r14 - movl $1, %r15d - xorl %ecx, %ecx - cmpq 8(%r11), %r14 - cmove %r15d, %ecx - xorl %eax, %eax - cmpq $0, 16(%r11) - cmove %r15d, %eax - andl %eax, %ecx - cmpq $94, %r9 - je ..B3.19 -..B3.3: - lea -42(%r9), %rax - cmpq $1, %rax - jbe ..B3.13 -..B3.4: - lea -52(%r9), %rax - cmpq $1, %rax - jbe ..B3.13 -..B3.5: - lea -34(%r9), %rcx - cmpq $1, %rcx - ja ..B3.7 -..B3.6: - xorl %ebx, %ebx - cmpq $5, %r10 - movq $0x7fff000000000000, %rdi - movq __x_constants__@GOTPCREL(%rip), %rdx - cmove %rbx, %rdi - movq 96(%rsp), %r10 - cmpq $3, %r10 - cmove %r14, %rbx - orq %r14, %r12 - movq (%rdx), %rcx - xorq %rbx, %rdi - movq %rcx, (%rbp) - movq %rdi, 8(%rbp) - jmp ..B3.16 -..B3.7: - cmpq $44, %r9 - jne ..B3.16 -..B3.8: - movq __x_constants__@GOTPCREL(%rip), %r9 - movq 8(%r8), %rcx - cmpq 24(%r9), %rcx - jne ..B3.16 -..B3.9: - movq (%r8), %rcx - cmpq 16(%r9), %rcx - jne ..B3.16 -..B3.10: - movq %r11, %rdi - movl $7, %esi - movq %rbx, %rdx -..___tag_value___dpml_intel_pow_fixup.20: - call __dpml_ux_sqrt_evaluation__@PLT -..___tag_value___dpml_intel_pow_fixup.21: -..B3.11: - xorl %r9d, %r9d - testq %rax, %rax - movq %rbx, %rdi - cmove %r15d, %r9d - xorl %edx, %edx - movq %rbp, %rsi - xorl %ecx, %ecx - lea (%rsp), %r8 - movq %r9, 8(%r8) -..___tag_value___dpml_intel_pow_fixup.22: - call __dpml_pack__@PLT -..___tag_value___dpml_intel_pow_fixup.23: - jmp ..B3.15 -..B3.13: - movq __x_constants__@GOTPCREL(%rip), %rdx - movq 32(%rdx), %rbx - movq 40(%rdx), %r8 - movl 4(%r11), %edx - cmpl $1, %edx - movq %rbx, (%rbp) - je ..B3.17 -..B3.14: - testl %edx, %edx - movl $0, %edx - movq $0x7fff000000000000, %rcx - cmovle %r15d, %edx - xorl %ebx, %ebx - cmpq $2, %r10 - movl $0, %r10d - cmove %r15d, %r10d - cmpl %edx, %r10d - cmovne %rcx, %rbx - movq %rbx, 8(%rbp) -..B3.15: - orq %r14, %r12 -..B3.16: - movq %r12, %rax - addq $48, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B3.17: - testl %ecx, %ecx - je ..B3.14 -..B3.18: - movq %r8, 8(%rbp) - jmp ..B3.15 -..B3.19: - movq 96(%rsp), %rcx - xorl %ebx, %ebx - cmpq $3, %rcx - cmove %r14, %rbx - orq %r14, %r12 - movq %rbx, 8(%rbp) - movq (%rdx), %rdx - movq %rdx, (%rbp) - jmp ..B3.16 -..B3.20: - cmpq $95, %r9 - je ..B3.32 -..B3.21: - lea -40(%r9), %rcx - cmpq $1, %rcx - jbe ..B3.29 -..B3.22: - lea -80(%r9), %rcx - cmpq $1, %rcx - jbe ..B3.28 -..B3.23: - lea -90(%r9), %rcx - cmpq $1, %rcx - jbe ..B3.28 -..B3.24: - addq $-46, %r9 - cmpq $1, %r9 - ja ..B3.16 -..B3.25: - movq __x_constants__@GOTPCREL(%rip), %rbx - movq 8(%rdx), %rcx - cmpq 40(%rbx), %rcx - jne ..B3.27 -..B3.26: - movq (%rdx), %rdx - cmpq 32(%rbx), %rdx - je ..B3.16 -..B3.27: - movl $1182793727, 40(%rsp) - movss 40(%rsp), %xmm1 - movss 40(%rsp), %xmm0 - mulss %xmm0, %xmm1 - movss %xmm1, 40(%rsp) - jmp ..B3.16 -..B3.28: - movq 8(%r8), %rdx - btsq $47, %rdx - movq %rdx, 8(%rbp) - movq (%r8), %rcx - movq %rcx, (%rbp) - jmp ..B3.16 -..B3.29: - movq __x_constants__@GOTPCREL(%rip), %rcx - movq 40(%rcx), %rbx - cmpq 8(%rdx), %rbx - jne ..B3.28 -..B3.30: - movq 32(%rcx), %rcx - cmpq (%rdx), %rcx - jne ..B3.28 -..B3.31: - movq %rbx, 8(%rbp) - movq %rcx, (%rbp) - jmp ..B3.16 -..B3.32: - movq 96(%rsp), %rdx - testq %rdx, %rdx - je ..B3.16 -..B3.33: - movq 96(%rsp), %rdx - testq $2, %rdx - je ..B3.16 -..B3.34: - movq 8(%rbp), %rdx - btcq $63, %rdx - movq %rdx, 8(%rbp) - jmp ..B3.16 - .align 16,0x90 - .cfi_endproc - .type __dpml_intel_pow_fixup,@function - .size __dpml_intel_pow_fixup,.-__dpml_intel_pow_fixup - .data -# -- End __dpml_intel_pow_fixup - .text -# -- Begin __dpml_d_intel_order_fixup - .text - .align 16,0x90 - .globl __dpml_d_intel_order_fixup -__dpml_d_intel_order_fixup: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value___dpml_d_intel_order_fixup.42: -..L43: - - ret - .align 16,0x90 - .cfi_endproc - .type __dpml_d_intel_order_fixup,@function - .size __dpml_d_intel_order_fixup,.-__dpml_d_intel_order_fixup - .data -# -- End __dpml_d_intel_order_fixup - .section .rodata, "a" - .space 2, 0x00 # pad - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x3e600000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 4 -__dpml_response_table: - .long 0 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 1 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 2 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 3 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 3 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 4 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 4 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 6 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 7 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 8 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 8 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 8 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 9 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 9 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 9 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 10 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 10 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 10 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 11 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 11 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 39 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 39 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 12 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 13 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 14 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 33 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 33 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 33 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 33 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 33 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 33 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 34 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 34 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 34 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 34 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 34 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 34 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 34 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 34 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 16 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 16 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 16 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 16 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 17 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 17 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 17 - .byte 0 - .byte 12 - .byte 0 - .byte 12 - .long 38 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 38 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 38 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 47 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 47 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 47 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 47 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 47 - .byte 0 - .byte 8 - .byte 0 - .byte 8 - .long 47 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 47 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 47 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 37 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 18 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 18 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 18 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 19 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 19 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 19 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 20 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 20 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 20 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 45 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 45 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 21 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 21 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 21 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 40 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 40 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 40 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 40 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 22 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 22 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 22 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 22 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 22 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 22 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 22 - .byte 0 - .byte 11 - .byte 0 - .byte 11 - .long 22 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 22 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 22 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 22 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 22 - .byte 0 - .byte 8 - .byte 0 - .byte 8 - .long 22 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 22 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 22 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 41 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 41 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 41 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 41 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 41 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 41 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 41 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 48 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 48 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 23 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 23 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 23 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 24 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 31 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 32 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 32 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 25 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 25 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 26 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 26 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 26 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 27 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 63 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 63 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 28 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 29 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 29 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 29 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 29 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 29 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 30 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 30 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 35 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 36 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 36 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 49 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 50 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 51 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 50 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 50 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 51 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 51 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 42 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 43 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 44 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 42 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 42 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 43 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 43 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 43 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 44 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 44 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 44 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 44 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 46 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 46 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 46 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 46 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 46 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 53 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 78 - .byte 0 - .byte 1 - .byte 0 - .byte 0 - .long 64 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 64 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 64 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 64 - .byte 0 - .byte 1 - .byte 0 - .byte 1 - .long 66 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 66 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 66 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 67 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 67 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 67 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 65 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 65 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 65 - .byte 0 - .byte 7 - .byte 0 - .byte 7 - .long 65 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 65 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 65 - .byte 2 - .byte 6 - .byte 2 - .byte 8 - .long 65 - .byte 2 - .byte 5 - .byte 2 - .byte 7 - .long 68 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 69 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 70 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 71 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 72 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 72 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 72 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 73 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 73 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 73 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 73 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 74 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 74 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 77 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 77 - .byte 4 - .byte 2 - .byte 4 - .byte 2 - .long 77 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .long 77 - .byte 3 - .byte 6 - .byte 3 - .byte 8 - .long 77 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 77 - .byte 1 - .byte 1 - .byte 1 - .byte 0 - .long 79 - .byte 4 - .byte 1 - .byte 4 - .byte 1 - .long 79 - .byte 3 - .byte 5 - .byte 3 - .byte 7 - .type __dpml_response_table,@object - .size __dpml_response_table,1520 - .align 4 - .globl __dpml_globals_table -__dpml_globals_table: - .long 4290772992 - .long 0 - .long 0 - .long 4294443008 - .long 0 - .long 0 - .long 0 - .long 4294934528 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 2147483648 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1 - .long 0 - .long 1 - .long 0 - .long 1 - .long 0 - .long 0 - .long 0 - .long 2147483649 - .long 0 - .long 1 - .long 2147483648 - .long 1 - .long 0 - .long 0 - .long 2147483648 - .long 2139095039 - .long 0 - .long 4294967295 - .long 2146435071 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 2147418111 - .long 4286578687 - .long 0 - .long 4294967295 - .long 4293918719 - .long 4294967295 - .long 4294967295 - .long 4294967295 - .long 4294901759 - .long 2139095040 - .long 0 - .long 0 - .long 2146435072 - .long 0 - .long 0 - .long 0 - .long 2147418112 - .long 4286578688 - .long 0 - .long 0 - .long 4293918720 - .long 0 - .long 0 - .long 0 - .long 4294901760 - .long 872415232 - .long 0 - .long 0 - .long 1018167296 - .long 0 - .long 0 - .long 0 - .long 1066336256 - .long 3019898880 - .long 0 - .long 0 - .long 3165650944 - .long 0 - .long 0 - .long 0 - .long 3213819904 - .long 1065353216 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 1073676288 - .long 3212836864 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 3221159936 - .type __dpml_globals_table,@object - .size __dpml_globals_table,416 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isfinite.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isfinite.S deleted file mode 100644 index c1b5e34cac..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isfinite.S +++ /dev/null @@ -1,449 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "isfinite.c" - .text -..TXTST0: -# -- Begin isfinitel - .text - .align 16,0x90 - .globl isfinitel -isfinitel: -# parameter 1: 8 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_isfinitel.1: -..L2: - - xorl %eax, %eax - movzwl 16(%rsp), %ecx - shll $16, %ecx - movzwl 14(%rsp), %edx - orl %edx, %ecx - andl $2147483647, %ecx - cmpl $2147418112, %ecx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isfinitel,@function - .size isfinitel,.-isfinitel - .data -# -- End isfinitel - .text -# -- Begin __isfinitel - .text - .align 16,0x90 - .globl __isfinitel -__isfinitel: -# parameter 1: 8 + %rsp -..B2.1: - .cfi_startproc -..___tag_value___isfinitel.4: -..L5: - - xorl %eax, %eax - movzwl 16(%rsp), %ecx - shll $16, %ecx - movzwl 14(%rsp), %edx - orl %edx, %ecx - andl $2147483647, %ecx - cmpl $2147418112, %ecx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isfinitel,@function - .size __isfinitel,.-__isfinitel - .data -# -- End __isfinitel - .text -# -- Begin isfinitef - .text - .align 16,0x90 - .globl isfinitef -isfinitef: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value_isfinitef.7: -..L8: - - xorl %eax, %eax - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isfinitef,@function - .size isfinitef,.-isfinitef - .data -# -- End isfinitef - .text -# -- Begin __isfinitef - .text - .align 16,0x90 - .globl __isfinitef -__isfinitef: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value___isfinitef.10: -..L11: - - xorl %eax, %eax - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isfinitef,@function - .size __isfinitef,.-__isfinitef - .data -# -- End __isfinitef - .text -# -- Begin isfinite - .text - .align 16,0x90 - .globl isfinite -isfinite: -# parameter 1: %xmm0 -..B5.1: - .cfi_startproc -..___tag_value_isfinite.13: -..L14: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isfinite,@function - .size isfinite,.-isfinite - .data -# -- End isfinite - .text -# -- Begin __isfinite - .text - .align 16,0x90 - .globl __isfinite -__isfinite: -# parameter 1: %xmm0 -..B6.1: - .cfi_startproc -..___tag_value___isfinite.16: -..L17: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isfinite,@function - .size __isfinite,.-__isfinite - .data -# -- End __isfinite - .text -# -- Begin isfinited - .text - .align 16,0x90 - .globl isfinited -isfinited: -# parameter 1: %xmm0 -..B7.1: - .cfi_startproc -..___tag_value_isfinited.19: -..L20: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isfinited,@function - .size isfinited,.-isfinited - .data -# -- End isfinited - .text -# -- Begin __isfinited - .text - .align 16,0x90 - .globl __isfinited -__isfinited: -# parameter 1: %xmm0 -..B8.1: - .cfi_startproc -..___tag_value___isfinited.22: -..L23: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isfinited,@function - .size __isfinited,.-__isfinited - .data -# -- End __isfinited - .text -# -- Begin finitel - .text - .align 16,0x90 - .globl finitel -finitel: -# parameter 1: 8 + %rsp -..B9.1: - .cfi_startproc -..___tag_value_finitel.25: -..L26: - - xorl %eax, %eax - movzwl 16(%rsp), %ecx - shll $16, %ecx - movzwl 14(%rsp), %edx - orl %edx, %ecx - andl $2147483647, %ecx - cmpl $2147418112, %ecx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type finitel,@function - .size finitel,.-finitel - .data -# -- End finitel - .text -# -- Begin __finitel - .text - .align 16,0x90 - .globl __finitel -__finitel: -# parameter 1: 8 + %rsp -..B10.1: - .cfi_startproc -..___tag_value___finitel.28: -..L29: - - xorl %eax, %eax - movzwl 16(%rsp), %ecx - shll $16, %ecx - movzwl 14(%rsp), %edx - orl %edx, %ecx - andl $2147483647, %ecx - cmpl $2147418112, %ecx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __finitel,@function - .size __finitel,.-__finitel - .data -# -- End __finitel - .text -# -- Begin finitef - .text - .align 16,0x90 - .globl finitef -finitef: -# parameter 1: %xmm0 -..B11.1: - .cfi_startproc -..___tag_value_finitef.31: -..L32: - - xorl %eax, %eax - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type finitef,@function - .size finitef,.-finitef - .data -# -- End finitef - .text -# -- Begin __finitef - .text - .align 16,0x90 - .globl __finitef -__finitef: -# parameter 1: %xmm0 -..B12.1: - .cfi_startproc -..___tag_value___finitef.34: -..L35: - - xorl %eax, %eax - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __finitef,@function - .size __finitef,.-__finitef - .data -# -- End __finitef - .text -# -- Begin finite - .text - .align 16,0x90 - .globl finite -finite: -# parameter 1: %xmm0 -..B13.1: - .cfi_startproc -..___tag_value_finite.37: -..L38: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type finite,@function - .size finite,.-finite - .data -# -- End finite - .text -# -- Begin __finite - .text - .align 16,0x90 - .globl __finite -__finite: -# parameter 1: %xmm0 -..B14.1: - .cfi_startproc -..___tag_value___finite.40: -..L41: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __finite,@function - .size __finite,.-__finite - .data -# -- End __finite - .text -# -- Begin finited - .text - .align 16,0x90 - .globl finited -finited: -# parameter 1: %xmm0 -..B15.1: - .cfi_startproc -..___tag_value_finited.43: -..L44: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type finited,@function - .size finited,.-finited - .data -# -- End finited - .text -# -- Begin __finited - .text - .align 16,0x90 - .globl __finited -__finited: -# parameter 1: %xmm0 -..B16.1: - .cfi_startproc -..___tag_value___finited.46: -..L47: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __finited,@function - .size __finited,.-__finited - .data -# -- End __finited - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isinf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isinf.S deleted file mode 100644 index f2a6d0c7a4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isinf.S +++ /dev/null @@ -1,309 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "isinf.c" - .text -..TXTST0: -# -- Begin __isinfd - .text - .align 16,0x90 - .globl __isinfd -__isinfd: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___isinfd.1: -..L2: - - movq $0x7ff0000000000000, %rax - movd %xmm0, %rcx - cmpq %rax, %rcx - jne ..B1.3 -..B1.2: - movl $1, %eax - ret -..B1.3: - movq $0xfff0000000000000, %rdx - movl $-1, %esi - xorl %eax, %eax - cmpq %rcx, %rdx - cmove %esi, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __isinfd,@function - .size __isinfd,.-__isinfd - .data -# -- End __isinfd - .text -# -- Begin isinfd - .text - .align 16,0x90 - .globl isinfd -isinfd: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_isinfd.4: -..L5: - - movq $0x7ff0000000000000, %rax - movd %xmm0, %rcx - cmpq %rax, %rcx - jne ..B2.3 -..B2.2: - movl $1, %eax - ret -..B2.3: - movq $0xfff0000000000000, %rdx - movl $-1, %esi - xorl %eax, %eax - cmpq %rcx, %rdx - cmove %esi, %eax - ret - .align 16,0x90 - .cfi_endproc - .type isinfd,@function - .size isinfd,.-isinfd - .data -# -- End isinfd - .text -# -- Begin __isinf - .text - .align 16,0x90 - .globl __isinf -__isinf: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value___isinf.7: -..L8: - - movq $0x7ff0000000000000, %rax - movd %xmm0, %rcx - cmpq %rax, %rcx - jne ..B3.3 -..B3.2: - movl $1, %eax - ret -..B3.3: - movq $0xfff0000000000000, %rdx - movl $-1, %esi - xorl %eax, %eax - cmpq %rcx, %rdx - cmove %esi, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __isinf,@function - .size __isinf,.-__isinf - .data -# -- End __isinf - .text -# -- Begin isinf - .text - .align 16,0x90 - .globl isinf -isinf: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value_isinf.10: -..L11: - - movq $0x7ff0000000000000, %rax - movd %xmm0, %rcx - cmpq %rax, %rcx - jne ..B4.3 -..B4.2: - movl $1, %eax - ret -..B4.3: - movq $0xfff0000000000000, %rdx - movl $-1, %esi - xorl %eax, %eax - cmpq %rcx, %rdx - cmove %esi, %eax - ret - .align 16,0x90 - .cfi_endproc - .type isinf,@function - .size isinf,.-isinf - .data -# -- End isinf - .text -# -- Begin __isinff - .text - .align 16,0x90 - .globl __isinff -__isinff: -# parameter 1: %xmm0 -..B5.1: - .cfi_startproc -..___tag_value___isinff.13: -..L14: - - movd %xmm0, %edx - cmpl $2139095040, %edx - jne ..B5.3 -..B5.2: - movl $1, %eax - ret -..B5.3: - movl $-1, %ecx - xorl %eax, %eax - cmpl $-8388608, %edx - cmove %ecx, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __isinff,@function - .size __isinff,.-__isinff - .data -# -- End __isinff - .text -# -- Begin isinff - .text - .align 16,0x90 - .globl isinff -isinff: -# parameter 1: %xmm0 -..B6.1: - .cfi_startproc -..___tag_value_isinff.16: -..L17: - - movd %xmm0, %edx - cmpl $2139095040, %edx - jne ..B6.3 -..B6.2: - movl $1, %eax - ret -..B6.3: - movl $-1, %ecx - xorl %eax, %eax - cmpl $-8388608, %edx - cmove %ecx, %eax - ret - .align 16,0x90 - .cfi_endproc - .type isinff,@function - .size isinff,.-isinff - .data -# -- End isinff - .text -# -- Begin __isinfl - .text - .align 16,0x90 - .globl __isinfl -__isinfl: -# parameter 1: 8 + %rsp -..B7.1: - .cfi_startproc -..___tag_value___isinfl.19: -..L20: - - movzwl 16(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B7.5 -..B7.2: - cmpl $-2147483648, 12(%rsp) - jne ..B7.5 -..B7.3: - cmpl $0, 8(%rsp) - jne ..B7.5 -..B7.4: - movzbl 17(%rsp), %eax - notl %eax - andl $128, %eax - shrl $6, %eax - decl %eax - ret -..B7.5: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __isinfl,@function - .size __isinfl,.-__isinfl - .data -# -- End __isinfl - .text -# -- Begin isinfl - .text - .align 16,0x90 - .globl isinfl -isinfl: -# parameter 1: 8 + %rsp -..B8.1: - .cfi_startproc -..___tag_value_isinfl.22: -..L23: - - movzwl 16(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B8.5 -..B8.2: - cmpl $-2147483648, 12(%rsp) - jne ..B8.5 -..B8.3: - cmpl $0, 8(%rsp) - jne ..B8.5 -..B8.4: - movzbl 17(%rsp), %eax - notl %eax - andl $128, %eax - shrl $6, %eax - decl %eax - ret -..B8.5: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type isinfl,@function - .size isinfl,.-isinfl - .data -# -- End isinfl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isnan.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isnan.S deleted file mode 100644 index 31d0f2eda5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isnan.S +++ /dev/null @@ -1,259 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "isnan.c" - .text -..TXTST0: -# -- Begin __isnand - .text - .align 16,0x90 - .globl __isnand -__isnand: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___isnand.1: -..L2: - - movq $0x7ff0000000000000, %rdx - movd %xmm0, %rcx - xorl %eax, %eax - btrq $63, %rcx - cmpq %rcx, %rdx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isnand,@function - .size __isnand,.-__isnand - .data -# -- End __isnand - .text -# -- Begin isnand - .text - .align 16,0x90 - .globl isnand -isnand: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_isnand.4: -..L5: - - movq $0x7ff0000000000000, %rdx - movd %xmm0, %rcx - xorl %eax, %eax - btrq $63, %rcx - cmpq %rcx, %rdx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isnand,@function - .size isnand,.-isnand - .data -# -- End isnand - .text -# -- Begin __isnan - .text - .align 16,0x90 - .globl __isnan -__isnan: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value___isnan.7: -..L8: - - movq $0x7ff0000000000000, %rdx - movd %xmm0, %rcx - xorl %eax, %eax - btrq $63, %rcx - cmpq %rcx, %rdx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isnan,@function - .size __isnan,.-__isnan - .data -# -- End __isnan - .text -# -- Begin isnan - .text - .align 16,0x90 - .globl isnan -isnan: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value_isnan.10: -..L11: - - movq $0x7ff0000000000000, %rdx - movd %xmm0, %rcx - xorl %eax, %eax - btrq $63, %rcx - cmpq %rcx, %rdx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isnan,@function - .size isnan,.-isnan - .data -# -- End isnan - .text -# -- Begin __isnanf - .text - .align 16,0x90 - .globl __isnanf -__isnanf: -# parameter 1: %xmm0 -..B5.1: - .cfi_startproc -..___tag_value___isnanf.13: -..L14: - - xorl %eax, %eax - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - seta %al - ret - .align 16,0x90 - .cfi_endproc - .type __isnanf,@function - .size __isnanf,.-__isnanf - .data -# -- End __isnanf - .text -# -- Begin isnanf - .text - .align 16,0x90 - .globl isnanf -isnanf: -# parameter 1: %xmm0 -..B6.1: - .cfi_startproc -..___tag_value_isnanf.16: -..L17: - - xorl %eax, %eax - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - seta %al - ret - .align 16,0x90 - .cfi_endproc - .type isnanf,@function - .size isnanf,.-isnanf - .data -# -- End isnanf - .text -# -- Begin __isnanl - .text - .align 16,0x90 - .globl __isnanl -__isnanl: -# parameter 1: 8 + %rsp -..B7.1: - .cfi_startproc -..___tag_value___isnanl.19: -..L20: - - movzwl 16(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B7.4 -..B7.2: - xorl %eax, %eax -..B7.3: - ret -..B7.4: - movq $0x8000000000000000, %rdx - movl $1, %ecx - xorl %eax, %eax - cmpq 8(%rsp), %rdx - cmovne %ecx, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __isnanl,@function - .size __isnanl,.-__isnanl - .data -# -- End __isnanl - .text -# -- Begin isnanl - .text - .align 16,0x90 - .globl isnanl -isnanl: -# parameter 1: 8 + %rsp -..B8.1: - .cfi_startproc -..___tag_value_isnanl.22: -..L23: - - movzwl 16(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B8.4 -..B8.2: - xorl %eax, %eax -..B8.3: - ret -..B8.4: - movq $0x8000000000000000, %rdx - movl $1, %ecx - xorl %eax, %eax - cmpq 8(%rsp), %rdx - cmovne %ecx, %eax - ret - .align 16,0x90 - .cfi_endproc - .type isnanl,@function - .size isnanl,.-isnanl - .data -# -- End isnanl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isnormal.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isnormal.S deleted file mode 100644 index 2794501d32..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/isnormal.S +++ /dev/null @@ -1,273 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "isnormal.c" - .text -..TXTST0: -# -- Begin __isnormald - .text - .align 16,0x90 - .globl __isnormald -__isnormald: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___isnormald.1: -..L2: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - addl $-1048576, %edx - cmpl $2145386496, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isnormald,@function - .size __isnormald,.-__isnormald - .data -# -- End __isnormald - .text -# -- Begin isnormald - .text - .align 16,0x90 - .globl isnormald -isnormald: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_isnormald.4: -..L5: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - addl $-1048576, %edx - cmpl $2145386496, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isnormald,@function - .size isnormald,.-isnormald - .data -# -- End isnormald - .text -# -- Begin __isnormal - .text - .align 16,0x90 - .globl __isnormal -__isnormal: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value___isnormal.7: -..L8: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - addl $-1048576, %edx - cmpl $2145386496, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isnormal,@function - .size __isnormal,.-__isnormal - .data -# -- End __isnormal - .text -# -- Begin isnormal - .text - .align 16,0x90 - .globl isnormal -isnormal: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value_isnormal.10: -..L11: - - xorl %eax, %eax - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $2147483647, %edx - addl $-1048576, %edx - cmpl $2145386496, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isnormal,@function - .size isnormal,.-isnormal - .data -# -- End isnormal - .text -# -- Begin __isnormalf - .text - .align 16,0x90 - .globl __isnormalf -__isnormalf: -# parameter 1: %xmm0 -..B5.1: - .cfi_startproc -..___tag_value___isnormalf.13: -..L14: - - xorl %eax, %eax - movd %xmm0, %edx - andl $2147483647, %edx - addl $-8388608, %edx - cmpl $2130706432, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isnormalf,@function - .size __isnormalf,.-__isnormalf - .data -# -- End __isnormalf - .text -# -- Begin isnormalf - .text - .align 16,0x90 - .globl isnormalf -isnormalf: -# parameter 1: %xmm0 -..B6.1: - .cfi_startproc -..___tag_value_isnormalf.16: -..L17: - - xorl %eax, %eax - movd %xmm0, %edx - andl $2147483647, %edx - addl $-8388608, %edx - cmpl $2130706432, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isnormalf,@function - .size isnormalf,.-isnormalf - .data -# -- End isnormalf - .text -# -- Begin __isnormall - .text - .align 16,0x90 - .globl __isnormall -__isnormall: -# parameter 1: 8 + %rsp -..B7.1: - .cfi_startproc -..___tag_value___isnormall.19: -..L20: - - movzwl 16(%rsp), %edx - shll $16, %edx - movzwl 14(%rsp), %eax - orl %eax, %edx - andl $2147483647, %edx - cmpl $4096, %edx - jb ..B7.4 -..B7.2: - testl $32768, %edx - jne ..B7.4 -..B7.3: - xorl %eax, %eax - ret -..B7.4: - addl $-65536, %edx - xorl %eax, %eax - cmpl $2147352576, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type __isnormall,@function - .size __isnormall,.-__isnormall - .data -# -- End __isnormall - .text -# -- Begin isnormall - .text - .align 16,0x90 - .globl isnormall -isnormall: -# parameter 1: 8 + %rsp -..B8.1: - .cfi_startproc -..___tag_value_isnormall.22: -..L23: - - movzwl 16(%rsp), %edx - shll $16, %edx - movzwl 14(%rsp), %eax - orl %eax, %edx - andl $2147483647, %edx - cmpl $4096, %edx - jb ..B8.4 -..B8.2: - testl $32768, %edx - jne ..B8.4 -..B8.3: - xorl %eax, %eax - ret -..B8.4: - addl $-65536, %edx - xorl %eax, %eax - cmpl $2147352576, %edx - setb %al - ret - .align 16,0x90 - .cfi_endproc - .type isnormall,@function - .size isnormall,.-isnormall - .data -# -- End isnormall - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0.S deleted file mode 100644 index f8ebda2d7a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0.S +++ /dev/null @@ -1,2957 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j0.c" - .text -..TXTST0: -# -- Begin j0 - .text - .align 16,0x90 - .globl j0 -j0: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_j0.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - subq $32, %rsp - .cfi_def_cfa_offset 48 - xorb %bl, %bl - movsd %xmm0, 8(%rsp) -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movl 12(%rsp), %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - jge ..B1.14 -..B1.4: - cmpl $1012924416, %eax - jl ..B1.13 -..B1.5: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.9 -..B1.6: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.7: - fldcw 16(%rsp) -..B1.8: - movb $1, %bl -..B1.9: - addq $-16, %rsp - .cfi_def_cfa_offset 64 - movsd 24(%rsp), %xmm0 - andps .L_2il0floatpacket.0(%rip), %xmm0 - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - fstpt (%rsp) -..___tag_value_j0.7: - call __j0l@PLT -..___tag_value_j0.8: -..B1.20: - addq $16, %rsp - .cfi_def_cfa_offset 48 -..B1.10: - fstpl (%rsp) - testb %bl, %bl - movsd (%rsp), %xmm0 - je ..B1.12 -..B1.11: - fldcw 18(%rsp) -..B1.12: - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 3, -16 -..B1.13: - lea _ones(%rip), %rax - movsd 8(%rsp), %xmm1 - andps .L_2il0floatpacket.0(%rip), %xmm1 - movsd (%rax), %xmm0 - subsd %xmm1, %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 3, -16 -..B1.14: - andl $-2146435073, %eax - orl 8(%rsp), %eax - je ..B1.16 -..B1.15: - lea _ones(%rip), %rax - movsd (%rax), %xmm0 - mulsd 8(%rsp), %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 3, -16 -..B1.16: - lea _zeros(%rip), %rax - movsd (%rax), %xmm0 -..B1.17: - addq $32, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type j0,@function - .size j0,.-j0 - .data -# -- End j0 - .text -# -- Begin __j0l - .text - .align 16,0x90 - .globl __j0l -__j0l: -# parameter 1: 96 + %rsp -..B2.1: - .cfi_startproc -..___tag_value___j0l.29: -..L30: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - lea 176+_S(%rip), %rax - fldt 96(%rsp) - fldt (%rax) - fcomip %st(1), %st - jb ..B2.9 -..B2.2: - lea _S(%rip), %rcx - fldt (%rcx) - fcomip %st(1), %st - jbe ..B2.4 -..B2.3: - lea _Z(%rip), %rax - lea _P1(%rip), %rdx - lea 16+_P1(%rip), %rcx - lea 32+_P1(%rip), %rsi - lea 48+_P1(%rip), %rdi - lea 64+_P1(%rip), %r8 - lea 80+_P1(%rip), %r9 - lea 96+_P1(%rip), %r10 - fldt (%rax) - lea 112+_P1(%rip), %r11 - lea 128+_P1(%rip), %rax - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea 144+_P1(%rip), %rdx - fmul %st(1), %st - fldt (%rcx) - lea 160+_P1(%rip), %rcx - fmul %st(2), %st - fldt (%rsi) - lea 176+_P1(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 192+_P1(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 208+_P1(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 224+_P1(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 240+_P1(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 256+_P1(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 272+_P1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 288+_P1(%rip), %rdx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - lea 304+_P1(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 320+_P1(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rcx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rsi) - faddp %st, %st(1) - faddp %st, %st(1) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.4: - movl $1, %edx - movl $16, %eax -..B2.5: - fldt (%rax,%rcx) - fcomip %st(1), %st - ja ..B2.8 - jp ..B2.8 -..B2.6: - incq %rdx - addq $16, %rax - cmpq $11, %rdx - jl ..B2.5 -..B2.7: - movq %rdx, %rax - shlq $4, %rax -..B2.8: - lea _Z(%rip), %rcx - fldt (%rax,%rcx) - lea (%rdx,%rdx,4), %rax - shlq $6, %rax - fsubrp %st, %st(1) - fld %st(0) - lea _P(%rip), %rdx - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt -320(%rax,%rdx) - fmul %st(1), %st - fldt -304(%rax,%rdx) - fmul %st(2), %st - fldt -288(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -272(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -256(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -240(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -224(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -208(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -192(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -176(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -160(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -144(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -128(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -112(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -96(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -80(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -64(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -48(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt -32(%rax,%rdx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt -16(%rax,%rdx) - faddp %st, %st(1) - faddp %st, %st(1) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.9: - lea _ones(%rip), %rax - lea _val_36_0L(%rip), %rdx - lea _PP(%rip), %rcx - lea _QP(%rip), %rsi - lea 16+_PP(%rip), %rdi - lea 16+_QP(%rip), %r8 - lea 32+_PP(%rip), %r9 - lea 32+_QP(%rip), %r10 - fldl (%rax) - lea 48+_PP(%rip), %r11 - fdiv %st(1), %st - lea 48+_QP(%rip), %rax - fxch %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fldt (%rdx) - lea 64+_PP(%rip), %rdx - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - fxch %st(2) - fstpt (%rsp) - fldt (%rcx) - lea 64+_QP(%rip), %rcx - fmul %st(1), %st - fldt (%rsi) - lea 80+_PP(%rip), %rsi - fmul %st(2), %st - fldt (%rdi) - lea 80+_QP(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 96+_PP(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 96+_QP(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 112+_PP(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 112+_QP(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_PP(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 128+_QP(%rip), %rdx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - lea 144+_PP(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 144+_QP(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 80(%rsp), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - movl $-1, %edx - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rcx) - faddp %st, %st(1) - fstpt -48(%rdi) - fldt (%rsi) - lea 64(%rsp), %rsi - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -16(%rsi) -..___tag_value___j0l.37: - call __libm_sincos_pi4l@PLT -..___tag_value___j0l.38: -..B2.18: - fldt 112(%rsp) - fldt 48(%rsp) - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 96 -..B2.10: - fldt 48(%rsp) - lea _val_0_03L(%rip), %rax - fmulp %st, %st(1) - fldt 64(%rsp) - fmulp %st, %st(2) - fsub %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt (%rax) - fmulp %st, %st(1) - fcomip %st(1), %st - fstp %st(0) - jae ..B2.12 - jp ..B2.12 -..B2.11: - fstp %st(1) - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.12: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B2.20: - addq $16, %rsp - .cfi_def_cfa_offset 96 - movaps (%rsp), %xmm0 -..___tag_value___j0l.44: - call __j0q@PLT -..___tag_value___j0l.45: -..B2.13: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B2.21: - fstpl 8(%rsp) - movsd 8(%rsp), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) -..B2.14: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __j0l,@function - .size __j0l,.-__j0l - .data -# -- End __j0l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_S: - .word 17728 - .word 31608 - .word 43949 - .word 62778 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 32551 - .word 41874 - .word 44957 - .word 57471 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 18949 - .word 61409 - .word 34437 - .word 41670 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 4396 - .word 34605 - .word 55192 - .word 54573 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 9307 - .word 10310 - .word 55728 - .word 33731 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 7613 - .word 2917 - .word 18234 - .word 40173 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 24292 - .word 42693 - .word 42782 - .word 46612 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 12570 - .word 29960 - .word 47214 - .word 53050 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 24415 - .word 36838 - .word 59299 - .word 59487 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 32322 - .word 22879 - .word 15219 - .word 32962 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 56404 - .word 12107 - .word 18542 - .word 36180 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 18639 - .word 44635 - .word 10526 - .word 39398 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _S,@object - .size _S,192 - .align 2 -_Z: - .word 64993 - .word 47321 - .word 43380 - .word 39400 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 10427 - .word 24946 - .word 31449 - .word 45220 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 20142 - .word 26358 - .word 43878 - .word 35445 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 45380 - .word 5013 - .word 8196 - .word 48298 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 36049 - .word 37774 - .word 2551 - .word 61157 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 44499 - .word 20687 - .word 35324 - .word 37009 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 37149 - .word 40892 - .word 28299 - .word 43441 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 59921 - .word 2742 - .word 56472 - .word 49873 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 35749 - .word 60152 - .word 42287 - .word 56306 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 36553 - .word 24054 - .word 44174 - .word 62739 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 12707 - .word 13183 - .word 28829 - .word 34586 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 24309 - .word 45263 - .word 7124 - .word 37803 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _Z,@object - .size _Z,192 - .align 2 -_P1: - .word 41974 - .word 50359 - .word 55 - .word 49432 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 46729 - .word 24287 - .word 10077 - .word 43682 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 54556 - .word 53463 - .word 26566 - .word 47408 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 61625 - .word 30678 - .word 34691 - .word 56786 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 32205 - .word 55323 - .word 47622 - .word 59679 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 29650 - .word 64976 - .word 4011 - .word 64391 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 31057 - .word 21065 - .word 6935 - .word 59041 - .word 16343 - .word 0 - .word 0 - .word 0 - .word 36662 - .word 39842 - .word 13910 - .word 57058 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 21879 - .word 21964 - .word 7382 - .word 44566 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 35904 - .word 38403 - .word 56995 - .word 38056 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 18301 - .word 44371 - .word 51380 - .word 49148 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 24372 - .word 2933 - .word 6164 - .word 36455 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 49391 - .word 5716 - .word 15337 - .word 37270 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 25965 - .word 16194 - .word 56568 - .word 46953 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 45667 - .word 13925 - .word 5584 - .word 35484 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 49022 - .word 26773 - .word 37576 - .word 36812 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 36832 - .word 53763 - .word 58864 - .word 36312 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 33543 - .word 46187 - .word 17185 - .word 59351 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 40102 - .word 5284 - .word 63312 - .word 56590 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 857 - .word 43156 - .word 55730 - .word 34022 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 52121 - .word 9280 - .word 35775 - .word 47190 - .word 16318 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,336 - .align 2 -_P: - .word 25701 - .word 56152 - .word 43593 - .word 44746 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 48832 - .word 40943 - .word 62738 - .word 40407 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 27954 - .word 18691 - .word 56371 - .word 61331 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 59673 - .word 34431 - .word 10026 - .word 51320 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 19628 - .word 6656 - .word 43961 - .word 34852 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 10797 - .word 38877 - .word 18617 - .word 49740 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 55276 - .word 31862 - .word 41256 - .word 61817 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 56169 - .word 58452 - .word 6548 - .word 36482 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 22526 - .word 12680 - .word 38609 - .word 41195 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 35707 - .word 29316 - .word 48923 - .word 38609 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 54924 - .word 17159 - .word 27854 - .word 39283 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 7410 - .word 20104 - .word 60324 - .word 54971 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 42961 - .word 8606 - .word 41997 - .word 49951 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 20439 - .word 51893 - .word 4000 - .word 47026 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 59638 - .word 54459 - .word 36852 - .word 37873 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 53889 - .word 4789 - .word 65352 - .word 38847 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 1714 - .word 3910 - .word 34394 - .word 55562 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 303 - .word 16967 - .word 38717 - .word 64635 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 5713 - .word 19393 - .word 12368 - .word 44599 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 21960 - .word 14969 - .word 53843 - .word 43675 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 52500 - .word 174 - .word 33388 - .word 44907 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 36805 - .word 62602 - .word 43329 - .word 35133 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 27761 - .word 25841 - .word 3607 - .word 63286 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 6612 - .word 54609 - .word 58140 - .word 43860 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 37993 - .word 17870 - .word 56109 - .word 35856 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 61675 - .word 27140 - .word 56422 - .word 41440 - .word 16343 - .word 0 - .word 0 - .word 0 - .word 56971 - .word 52432 - .word 57814 - .word 63191 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 25412 - .word 37118 - .word 3118 - .word 58735 - .word 49118 - .word 0 - .word 0 - .word 0 - .word 38291 - .word 36319 - .word 26004 - .word 41665 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 50251 - .word 22788 - .word 9163 - .word 59245 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 15018 - .word 28 - .word 26139 - .word 39028 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 33331 - .word 48247 - .word 16919 - .word 39314 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 9684 - .word 33609 - .word 24106 - .word 48128 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 51011 - .word 47822 - .word 659 - .word 60363 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 37534 - .word 11575 - .word 45084 - .word 34566 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 45912 - .word 27680 - .word 6912 - .word 42099 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 56715 - .word 12873 - .word 49782 - .word 46172 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 26728 - .word 49648 - .word 65144 - .word 32891 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 40426 - .word 15254 - .word 52157 - .word 35579 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 38384 - .word 45177 - .word 47511 - .word 58357 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 58158 - .word 44133 - .word 45474 - .word 44841 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 25822 - .word 50828 - .word 25446 - .word 60617 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 15324 - .word 12408 - .word 38243 - .word 63699 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 14774 - .word 16677 - .word 5572 - .word 37105 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 22149 - .word 54660 - .word 59654 - .word 35846 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 11697 - .word 52785 - .word 2274 - .word 34156 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 53627 - .word 64285 - .word 10253 - .word 62534 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 24801 - .word 65406 - .word 2005 - .word 46814 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 32190 - .word 19121 - .word 50201 - .word 40636 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 54751 - .word 12899 - .word 38715 - .word 45207 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 43490 - .word 42082 - .word 27556 - .word 37283 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 22028 - .word 56865 - .word 50900 - .word 56715 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 16346 - .word 12991 - .word 64075 - .word 44659 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 52492 - .word 22409 - .word 7105 - .word 40702 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 6702 - .word 59476 - .word 47051 - .word 61808 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 62316 - .word 14189 - .word 19866 - .word 53935 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 9195 - .word 51568 - .word 61124 - .word 40040 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 6439 - .word 11299 - .word 34414 - .word 41343 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 46739 - .word 24947 - .word 62261 - .word 60937 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 58365 - .word 23430 - .word 12962 - .word 38007 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 58251 - .word 41189 - .word 49383 - .word 44339 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 48598 - .word 60621 - .word 33089 - .word 52046 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 15609 - .word 33598 - .word 37151 - .word 63031 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 47302 - .word 16218 - .word 41542 - .word 62539 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 57122 - .word 24762 - .word 37625 - .word 35182 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 14554 - .word 11813 - .word 4690 - .word 56239 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 54525 - .word 1724 - .word 15173 - .word 60713 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 63047 - .word 59633 - .word 16097 - .word 37474 - .word 49118 - .word 0 - .word 0 - .word 0 - .word 47674 - .word 64044 - .word 50935 - .word 38909 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 10733 - .word 57181 - .word 7346 - .word 35019 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 60139 - .word 34186 - .word 61790 - .word 35089 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 42252 - .word 41404 - .word 34184 - .word 42385 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 1522 - .word 6058 - .word 55347 - .word 41209 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 8896 - .word 65510 - .word 60684 - .word 58885 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 5547 - .word 57306 - .word 64532 - .word 55968 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 14723 - .word 16104 - .word 43168 - .word 38160 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 64145 - .word 20360 - .word 50512 - .word 35772 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 36202 - .word 63428 - .word 51591 - .word 58021 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 65464 - .word 45991 - .word 59516 - .word 54144 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 24568 - .word 20436 - .word 61634 - .word 37862 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 45319 - .word 25104 - .word 37206 - .word 43484 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 21849 - .word 55910 - .word 13070 - .word 44688 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 3252 - .word 24429 - .word 41684 - .word 61678 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 18877 - .word 5474 - .word 3532 - .word 52835 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 29000 - .word 47276 - .word 64838 - .word 34154 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 20967 - .word 63980 - .word 13404 - .word 46613 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 52562 - .word 53463 - .word 21966 - .word 58373 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 9777 - .word 2939 - .word 17549 - .word 60815 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 26283 - .word 15936 - .word 57935 - .word 36992 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 53769 - .word 29752 - .word 63351 - .word 55571 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 39733 - .word 64164 - .word 46820 - .word 32952 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 176 - .word 24001 - .word 47175 - .word 32916 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 42514 - .word 53223 - .word 40190 - .word 38228 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 32337 - .word 51109 - .word 43299 - .word 44928 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 59799 - .word 62803 - .word 25577 - .word 51379 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 14970 - .word 20015 - .word 15936 - .word 57562 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 65161 - .word 31438 - .word 7531 - .word 65214 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 20513 - .word 44789 - .word 62889 - .word 43571 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 4307 - .word 19900 - .word 64182 - .word 49211 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 23601 - .word 8473 - .word 7427 - .word 49494 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 7362 - .word 8526 - .word 7254 - .word 42403 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 35188 - .word 37258 - .word 23196 - .word 38516 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 28716 - .word 28394 - .word 59353 - .word 59952 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 5380 - .word 17306 - .word 43095 - .word 44938 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 62603 - .word 29353 - .word 43042 - .word 32969 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 14219 - .word 29360 - .word 8286 - .word 39065 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 51755 - .word 8774 - .word 37073 - .word 55906 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 56892 - .word 44416 - .word 43797 - .word 50190 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 61329 - .word 48733 - .word 6023 - .word 35132 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 7541 - .word 9021 - .word 40244 - .word 45179 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 26533 - .word 29344 - .word 18926 - .word 62060 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 30572 - .word 2598 - .word 8389 - .word 52807 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 51943 - .word 22643 - .word 23287 - .word 35717 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 64388 - .word 35284 - .word 47919 - .word 35658 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 29632 - .word 11036 - .word 42088 - .word 47700 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 31422 - .word 44089 - .word 40511 - .word 45376 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 24082 - .word 23937 - .word 40663 - .word 60291 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 35871 - .word 18767 - .word 59204 - .word 34260 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 55945 - .word 59437 - .word 40276 - .word 45420 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 36087 - .word 44447 - .word 31316 - .word 65259 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 33015 - .word 55199 - .word 13485 - .word 41205 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 28040 - .word 38678 - .word 23200 - .word 33402 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 24126 - .word 8131 - .word 32863 - .word 58069 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 35392 - .word 16287 - .word 64004 - .word 38564 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 24419 - .word 65021 - .word 26451 - .word 63502 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 50428 - .word 39809 - .word 46675 - .word 33151 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 43497 - .word 65182 - .word 62592 - .word 53510 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 13653 - .word 47792 - .word 51483 - .word 42124 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 51670 - .word 53417 - .word 2690 - .word 33418 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 18048 - .word 20017 - .word 2806 - .word 37530 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 28377 - .word 1564 - .word 33730 - .word 58682 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 50365 - .word 41139 - .word 10086 - .word 43478 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 61280 - .word 6173 - .word 58518 - .word 33596 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 37780 - .word 41188 - .word 55897 - .word 58318 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 54954 - .word 62311 - .word 27470 - .word 44684 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 57442 - .word 38159 - .word 64608 - .word 36945 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 24087 - .word 55434 - .word 11948 - .word 56328 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 3958 - .word 29640 - .word 49133 - .word 55700 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 27700 - .word 45302 - .word 5983 - .word 42389 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 40427 - .word 54367 - .word 12482 - .word 37240 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 59852 - .word 29007 - .word 23004 - .word 39969 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 34211 - .word 57602 - .word 36659 - .word 58360 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 44442 - .word 16364 - .word 9911 - .word 56161 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 28102 - .word 25155 - .word 37530 - .word 33414 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 6555 - .word 37232 - .word 8513 - .word 61132 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 19389 - .word 63961 - .word 54328 - .word 56964 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 46901 - .word 14299 - .word 54235 - .word 51269 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 21562 - .word 53008 - .word 37762 - .word 35900 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 39053 - .word 49830 - .word 37166 - .word 63741 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 45681 - .word 41863 - .word 1807 - .word 63504 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 32524 - .word 20075 - .word 31047 - .word 55727 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 19491 - .word 55333 - .word 6932 - .word 36559 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 44244 - .word 33552 - .word 34722 - .word 63577 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 16901 - .word 42071 - .word 41001 - .word 48810 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 62438 - .word 12223 - .word 44142 - .word 42160 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 23223 - .word 6493 - .word 11343 - .word 61664 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 62523 - .word 30008 - .word 29610 - .word 53050 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 14947 - .word 31100 - .word 26993 - .word 46432 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 54892 - .word 55125 - .word 25696 - .word 39893 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 64089 - .word 10154 - .word 50994 - .word 64131 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 25208 - .word 35455 - .word 35497 - .word 38745 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 22601 - .word 23897 - .word 16529 - .word 51375 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 39957 - .word 27913 - .word 24611 - .word 54302 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 45382 - .word 20134 - .word 36574 - .word 58452 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 42298 - .word 30543 - .word 37555 - .word 58890 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 22768 - .word 53677 - .word 2298 - .word 49504 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 58111 - .word 6687 - .word 35097 - .word 49208 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 10603 - .word 28285 - .word 57192 - .word 62022 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 32868 - .word 54034 - .word 283 - .word 60966 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 45349 - .word 58038 - .word 8163 - .word 54564 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 55920 - .word 35455 - .word 60237 - .word 53133 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 60123 - .word 63321 - .word 17152 - .word 62548 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 39317 - .word 30736 - .word 60380 - .word 60458 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 49393 - .word 44945 - .word 51803 - .word 41616 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 20738 - .word 26362 - .word 9659 - .word 40012 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 60223 - .word 27976 - .word 18717 - .word 52467 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 54339 - .word 42843 - .word 18062 - .word 50282 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 34001 - .word 60559 - .word 43103 - .word 39476 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 26526 - .word 28531 - .word 16125 - .word 37792 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 6095 - .word 56607 - .word 38079 - .word 40348 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 15971 - .word 7192 - .word 49983 - .word 37562 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 50443 - .word 47213 - .word 11879 - .word 45566 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 11802 - .word 10368 - .word 62578 - .word 52530 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 31461 - .word 32590 - .word 25910 - .word 51580 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 23034 - .word 4503 - .word 56149 - .word 56800 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 23084 - .word 49532 - .word 8891 - .word 43466 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 52278 - .word 51985 - .word 56128 - .word 47325 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 64046 - .word 3409 - .word 24460 - .word 54209 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 21815 - .word 55080 - .word 59949 - .word 58476 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 52803 - .word 16320 - .word 8321 - .word 47500 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 52718 - .word 62993 - .word 9405 - .word 50844 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 54524 - .word 45491 - .word 53115 - .word 54272 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 17147 - .word 2195 - .word 64554 - .word 57739 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 25716 - .word 30593 - .word 61559 - .word 36022 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 34582 - .word 27844 - .word 9712 - .word 38156 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 11089 - .word 32571 - .word 7121 - .word 45346 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 19256 - .word 10500 - .word 41195 - .word 47904 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 34688 - .word 57357 - .word 16578 - .word 34099 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 33812 - .word 7938 - .word 37351 - .word 35991 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 39461 - .word 41125 - .word 38968 - .word 43650 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 44025 - .word 18687 - .word 5475 - .word 36436 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 23695 - .word 42035 - .word 32968 - .word 40701 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 38927 - .word 50812 - .word 3019 - .word 50863 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 61445 - .word 40975 - .word 17938 - .word 45887 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 29652 - .word 52899 - .word 3582 - .word 54866 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 20058 - .word 59066 - .word 2994 - .word 38517 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 39274 - .word 56137 - .word 36322 - .word 45609 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 15638 - .word 5070 - .word 53701 - .word 47866 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 51166 - .word 27629 - .word 45907 - .word 56238 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 29387 - .word 28474 - .word 13265 - .word 41814 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 6001 - .word 55757 - .word 63641 - .word 48808 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 65207 - .word 5152 - .word 25385 - .word 47657 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 16879 - .word 18288 - .word 49778 - .word 55345 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 63014 - .word 23411 - .word 42365 - .word 63147 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 41060 - .word 50204 - .word 58630 - .word 36532 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 38440 - .word 64136 - .word 63792 - .word 39699 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 22495 - .word 32960 - .word 60573 - .word 45833 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 59007 - .word 19608 - .word 21801 - .word 59681 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 39231 - .word 52779 - .word 63106 - .word 34425 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 40257 - .word 55273 - .word 33242 - .word 51859 - .word 16320 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,3520 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,16 - .align 2 -_PP: - .word 3555 - .word 4199 - .word 61716 - .word 36505 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 21640 - .word 56203 - .word 47336 - .word 57608 - .word 16322 - .word 0 - .word 0 - .word 0 - .word 3059 - .word 27554 - .word 42044 - .word 45622 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 55815 - .word 35656 - .word 54748 - .word 47307 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 42025 - .word 6728 - .word 28939 - .word 34692 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 58943 - .word 11189 - .word 14960 - .word 38786 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 43526 - .word 20005 - .word 29826 - .word 37014 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 58976 - .word 17109 - .word 36079 - .word 36708 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 58243 - .word 36408 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _PP,@object - .size _PP,160 - .align 2 -_QP: - .word 30466 - .word 14887 - .word 33885 - .word 35327 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 41139 - .word 65374 - .word 59488 - .word 50915 - .word 49088 - .word 0 - .word 0 - .word 0 - .word 35675 - .word 30946 - .word 22284 - .word 35505 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 65216 - .word 29458 - .word 42913 - .word 63176 - .word 49097 - .word 0 - .word 0 - .word 0 - .word 5130 - .word 24339 - .word 48915 - .word 38634 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 30040 - .word 27658 - .word 23448 - .word 34596 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 37816 - .word 17431 - .word 24401 - .word 49646 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 4377 - .word 35057 - .word 45578 - .word 33037 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 19863 - .word 65266 - .word 6202 - .word 53939 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 49142 - .word 0 - .word 0 - .word 0 - .type _QP,@object - .size _QP,160 - .align 2 -_val_0_03L: - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _val_0_03L,@object - .size _val_0_03L,16 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _tonpi,@object - .size _tonpi,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0f.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0f.S deleted file mode 100644 index 69420f75c2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0f.S +++ /dev/null @@ -1,596 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j0f.c" - .text -..TXTST0: -# -- Begin j0f - .text - .align 16,0x90 - .globl j0f -j0f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_j0f.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movd %xmm0, %edx - movss %xmm0, 48(%rsp) - andl $2147483647, %edx - cmpl $2139095040, %edx - jae ..B1.18 -..B1.2: - cmpl $1099154394, %edx - jae ..B1.19 -..B1.3: - cmpl $1081424556, %edx - jae ..B1.14 -..B1.4: - cmpl $1048576000, %edx - jae ..B1.13 -..B1.5: - cmpl $998244352, %edx - jae ..B1.12 -..B1.6: - cmpl $947912704, %edx - jae ..B1.11 -..B1.7: - movss .L_2il0floatpacket.0(%rip), %xmm1 - cmpl $838860800, %edx - jae ..B1.9 -..B1.8: - andps .L_2il0floatpacket.1(%rip), %xmm0 - subss %xmm0, %xmm1 - jmp ..B1.10 -..B1.9: - mulss %xmm0, %xmm0 - subss %xmm0, %xmm1 -..B1.10: - movaps %xmm1, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.11: - pxor %xmm0, %xmm0 - lea 8+_Q3(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - lea _Q3(%rip), %rdx - movsd (%rax), %xmm1 - mulsd %xmm0, %xmm1 - addsd (%rdx), %xmm1 - mulsd %xmm0, %xmm1 - addsd .L_2il0floatpacket.2(%rip), %xmm1 - cvtsd2ss %xmm1, %xmm1 - movaps %xmm1, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.12: - pxor %xmm1, %xmm1 - lea 24+_Q2(%rip), %rax - cvtss2sd 48(%rsp), %xmm1 - mulsd %xmm1, %xmm1 - lea 16+_Q2(%rip), %rcx - movaps %xmm1, %xmm0 - lea 8+_Q2(%rip), %rdx - mulsd %xmm1, %xmm0 - lea _Q2(%rip), %rsi - movsd (%rax), %xmm3 - movsd (%rcx), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm0, %xmm2 - addsd (%rdx), %xmm3 - addsd (%rsi), %xmm2 - mulsd %xmm0, %xmm3 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm3 - addsd .L_2il0floatpacket.2(%rip), %xmm3 - cvtsd2ss %xmm3, %xmm3 - movaps %xmm3, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.13: - pxor %xmm1, %xmm1 - lea 112+_Q1(%rip), %rax - cvtss2sd 48(%rsp), %xmm1 - andps .L_2il0floatpacket.3(%rip), %xmm1 - lea 104+_Q1(%rip), %rdx - lea 72+_Q1(%rip), %rcx - lea 88+_Q1(%rip), %rdi - lea 96+_Q1(%rip), %r11 - lea 56+_Q1(%rip), %r8 - lea 40+_Q1(%rip), %rsi - lea 24+_Q1(%rip), %r9 - movsd (%rdx), %xmm6 - lea 32+_Q1(%rip), %rdx - movsd (%rdi), %xmm0 - lea 16+_Q1(%rip), %rdi - movsd (%r11), %xmm5 - lea 8+_Q1(%rip), %r10 - subsd (%rax), %xmm1 - lea 64+_Q1(%rip), %rax - movaps %xmm1, %xmm3 - mulsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd (%rcx), %xmm6 - addsd (%r8), %xmm0 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd (%rsi), %xmm6 - addsd (%r9), %xmm0 - addsd (%rdx), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm3, %xmm0 - mulsd %xmm2, %xmm5 - addsd %xmm0, %xmm6 - lea 80+_Q1(%rip), %rcx - lea 48+_Q1(%rip), %rsi - lea _Q1(%rip), %r8 - addsd (%r10), %xmm6 - movsd (%rcx), %xmm4 - mulsd %xmm2, %xmm4 - mulsd %xmm1, %xmm6 - addsd (%rsi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%rdi), %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - addsd (%r8), %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.14: - cmpl $1092798087, %edx - jae ..B1.16 -..B1.15: - cmpl $1088454576, %edx - lea _P1(%rip), %rcx - lea _P2(%rip), %rax - jb ..B1.17 - movq %rax, %rcx - jmp ..B1.17 -..B1.16: - cmpl $1096101336, %edx - lea _P3(%rip), %rcx - lea _P4(%rip), %rax - jb ..L12 - movq %rax, %rcx -..L12: -..B1.17: - pxor %xmm3, %xmm3 - cvtss2sd 48(%rsp), %xmm3 - andps .L_2il0floatpacket.3(%rip), %xmm3 - movsd 96(%rcx), %xmm6 - movsd 80(%rcx), %xmm0 - movsd 88(%rcx), %xmm5 - movsd 72(%rcx), %xmm4 - subsd 104(%rcx), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd 64(%rcx), %xmm6 - mulsd %xmm2, %xmm4 - addsd 48(%rcx), %xmm0 - addsd 56(%rcx), %xmm5 - mulsd %xmm2, %xmm6 - addsd 40(%rcx), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd 32(%rcx), %xmm6 - mulsd %xmm2, %xmm4 - addsd 16(%rcx), %xmm0 - addsd 24(%rcx), %xmm5 - mulsd %xmm2, %xmm6 - addsd 8(%rcx), %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm5 - mulsd %xmm3, %xmm4 - addsd %xmm0, %xmm6 - mulsd %xmm3, %xmm5 - addsd (%rcx), %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.18: - pxor %xmm0, %xmm0 - jbe ..L15 - movss 48(%rsp), %xmm0 -..L15: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.19: - pxor %xmm0, %xmm0 - lea _val_16_0(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - andps .L_2il0floatpacket.3(%rip), %xmm0 - lea (%rsp), %rdi - movsd .L_2il0floatpacket.2(%rip), %xmm1 - lea 8(%rsp), %rsi - divsd %xmm0, %xmm1 - movsd (%rax), %xmm2 - movl $-1, %edx - mulsd %xmm1, %xmm2 - movsd %xmm2, 8(%rsi) - mulsd %xmm2, %xmm2 - movsd %xmm2, 24(%rsi) - mulsd %xmm2, %xmm2 - movsd %xmm1, 16(%rsi) - movsd %xmm2, 32(%rsi) -..___tag_value_j0f.18: - call __libm_sincos_k32@PLT -..___tag_value_j0f.19: -..B1.20: - lea 40+_QP(%rip), %r10 - lea 40+_PP(%rip), %rdx - movsd 40(%rsp), %xmm2 - lea 24+_QP(%rip), %r11 - lea 24+_PP(%rip), %rcx - lea 32+_PP(%rip), %rdi - lea _tonpi(%rip), %rax - lea 16+_PP(%rip), %r8 - movsd (%r10), %xmm5 - lea 8+_PP(%rip), %rsi - movsd (%rdx), %xmm6 - lea 32+_QP(%rip), %rdx - mulsd %xmm2, %xmm5 - lea _PP(%rip), %r9 - mulsd %xmm2, %xmm6 - addsd (%r11), %xmm5 - addsd (%rcx), %xmm6 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm6 - movsd (%rdx), %xmm4 - lea 16+_QP(%rip), %rcx - mulsd %xmm2, %xmm4 - addsd (%rsi), %xmm6 - movsd (%rdi), %xmm1 - lea _QP(%rip), %rsi - mulsd %xmm2, %xmm1 - addsd (%rcx), %xmm4 - movsd (%rax), %xmm0 - lea 8+_QP(%rip), %rax - mulsd %xmm2, %xmm4 - addsd (%r8), %xmm1 - mulsd 24(%rsp), %xmm0 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm1 - addsd (%rsi), %xmm4 - sqrtsd %xmm0, %xmm0 - addsd (%r9), %xmm1 - movsd 32(%rsp), %xmm3 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm1, %xmm6 - mulsd 16(%rsp), %xmm5 - mulsd 8(%rsp), %xmm6 - mulsd (%rsp), %xmm5 - subsd %xmm5, %xmm6 - mulsd %xmm6, %xmm0 - cvtsd2ss %xmm0, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type j0f,@function - .size j0f,.-j0f - .data -# -- End j0f - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x7fffffff,0x00000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.3: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x3f800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -_Q3: - .long 4294966841 - .long 3218079743 - .long 477219499 - .long 1066401791 - .type _Q3,@object - .size _Q3,16 - .align 4 -_Q2: - .long 4294967005 - .long 3218079743 - .long 4292583532 - .long 1066401791 - .long 2963922746 - .long 3208409541 - .long 1698509326 - .long 1054632110 - .type _Q2,@object - .size _Q2,32 - .align 4 -_Q1: - .long 569392270 - .long 3163659129 - .long 911539783 - .long 3219168475 - .long 3927550863 - .long 1069261278 - .long 1680954783 - .long 1068301032 - .long 3247602706 - .long 3212950300 - .long 1528576945 - .long 3210869138 - .long 2120930432 - .long 1060197251 - .long 3147753376 - .long 1057418557 - .long 3445667889 - .long 3201446637 - .long 160313185 - .long 3198274950 - .long 2157358765 - .long 1047004568 - .long 1405517519 - .long 1043512506 - .long 3055202941 - .long 3187001715 - .long 562966967 - .long 3183555197 - .long 781654848 - .long 1073954069 - .type _Q1,@object - .size _Q1,120 - .align 4 -_P1: - .long 2556390964 - .long 3162487616 - .long 168113101 - .long 1070974694 - .long 3865632959 - .long 3214905202 - .long 3384884860 - .long 3215663440 - .long 3461368592 - .long 1064499199 - .long 2947775703 - .long 1063419441 - .long 1964351934 - .long 3207001659 - .long 1081690493 - .long 3204998104 - .long 2315304668 - .long 1053480462 - .long 3655541446 - .long 1050880364 - .long 988219424 - .long 3194139699 - .long 2647984383 - .long 3191029766 - .long 3459760917 - .long 1038956170 - .long 1529622085 - .long 1075188879 - .type _P1,@object - .size _P1,112 - .align 4 -_P2: - .long 2989381656 - .long 3164006638 - .long 2007135498 - .long 3218169721 - .long 3461465629 - .long 1066405759 - .long 1292000183 - .long 1067879320 - .long 1048188593 - .long 3211038307 - .long 2811900586 - .long 3210797269 - .long 275024305 - .long 1058896216 - .long 2179928921 - .long 1057456107 - .long 2316750355 - .long 3200463196 - .long 1626245786 - .long 3198355713 - .long 2429961783 - .long 1046264853 - .long 3081665457 - .long 1043557342 - .long 3760684269 - .long 3186121773 - .long 1825365706 - .long 1075924661 - .type _P2,@object - .size _P2,112 - .align 4 -_P3: - .long 915277891 - .long 3163740397 - .long 1721892699 - .long 1070448958 - .long 3433548142 - .long 3213111280 - .long 3603643349 - .long 3215166749 - .long 2193444562 - .long 1062884841 - .long 1036402988 - .long 1063136790 - .long 2039602830 - .long 3205750717 - .long 2039806946 - .long 3204828766 - .long 3757243411 - .long 1052487712 - .long 2819184679 - .long 1050816211 - .long 1638789445 - .long 3193302656 - .long 96077275 - .long 3191008024 - .long 34207204 - .long 1038327735 - .long 8549046 - .long 1076335940 - .type _P3,@object - .size _P3,112 - .align 4 -_P4: - .long 4010378302 - .long 3164933090 - .long 260862994 - .long 3217715229 - .long 793353311 - .long 1065112761 - .long 2823013001 - .long 1067546520 - .long 4006575139 - .long 3209863700 - .long 3390737311 - .long 3210433566 - .long 1793352299 - .long 1057800372 - .long 3528876835 - .long 1057234714 - .long 2505438989 - .long 3199512871 - .long 2785865938 - .long 3198229698 - .long 565130724 - .long 1045495083 - .long 410977742 - .long 1043470609 - .long 4266013081 - .long 3185543354 - .long 1056076242 - .long 1076747425 - .type _P4,@object - .size _P4,112 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_QP: - .long 4294921804 - .long 3212836863 - .long 4153409851 - .long 1056096255 - .long 2226361937 - .long 3196916170 - .long 3849695089 - .long 1044094312 - .long 663042994 - .long 3187124278 - .long 3336948587 - .long 1035486718 - .type _QP,@object - .size _QP,48 - .align 4 -_PP: - .long 4294966288 - .long 1072693247 - .long 4269912424 - .long 3207725055 - .long 1780799603 - .long 1052554744 - .long 2285933488 - .long 3194113879 - .long 3892950982 - .long 1041746526 - .long 150212775 - .long 3184818833 - .type _PP,@object - .size _PP,48 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0l.S deleted file mode 100644 index d2ea20c856..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j0l.S +++ /dev/null @@ -1,86 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j0l.c" - .text -..TXTST0: -# -- Begin j0l - .text - .align 16,0x90 - .globl j0l -j0l: -# parameter 1: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_j0l.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 48 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B1.6: - addq $16, %rsp - .cfi_def_cfa_offset 32 - movaps (%rsp), %xmm0 -..___tag_value_j0l.6: - call __j0q@PLT -..___tag_value_j0l.7: -..B1.2: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type j0l,@function - .size j0l,.-j0l - .data -# -- End j0l - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1.S deleted file mode 100644 index b335b1562b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1.S +++ /dev/null @@ -1,3028 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j1.c" - .text -..TXTST0: -# -- Begin j1 - .text - .align 16,0x90 - .globl j1 -j1: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_j1.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - subq $40, %rsp - .cfi_def_cfa_offset 64 - xorb %r13b, %r13b - movsd %xmm0, 24(%rsp) -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movl 28(%rsp), %r12d - movl %r12d, %edx - andl $2147483647, %edx - shrl $31, %r12d - cmpl $2146435072, %edx - jge ..B1.20 -..B1.4: - cmpl $1012924416, %edx - jge ..B1.12 -..B1.5: - cmpl $1048576, %edx - jle ..B1.7 -..B1.6: - movl %r12d, %r12d - lea _small_value_64(%rip), %rax - movsd 24(%rsp), %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd (%rax,%r12,8), %xmm1 - mulsd (%rax), %xmm1 - subsd %xmm1, %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.7: - movl 24(%rsp), %eax - je ..B1.24 -..B1.8: - orl %eax, %edx - je ..B1.10 -..B1.9: - movl %r12d, %r12d - lea _small_value_64(%rip), %rax - movsd (%rax,%r12,8), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, (%rsp) - movsd 24(%rsp), %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd (%rsp), %xmm1 - subsd %xmm1, %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.10: - movsd 24(%rsp), %xmm0 -..B1.11: - addq $40, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.12: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.16 -..B1.13: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.14: - fldcw 16(%rsp) -..B1.15: - movb $1, %r13b -..B1.16: - addq $-16, %rsp - .cfi_def_cfa_offset 80 - movsd 40(%rsp), %xmm0 - andps .L_2il0floatpacket.1(%rip), %xmm0 - movsd %xmm0, 24(%rsp) - fldl 24(%rsp) - fstpt (%rsp) -..___tag_value_j1.33: - call __j1l@PLT -..___tag_value_j1.34: -..B1.27: - addq $16, %rsp - .cfi_def_cfa_offset 64 -..B1.17: - fstpl 8(%rsp) - testb %r13b, %r13b - movsd 8(%rsp), %xmm1 - je ..B1.19 -..B1.18: - fldcw 18(%rsp) -..B1.19: - movaps %xmm1, %xmm0 - testl %r12d, %r12d - xorps .L_2il0floatpacket.2(%rip), %xmm0 - jne ..L36 - movaps %xmm1, %xmm0 -..L36: - addq $40, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.20: - andl $-2146435073, %edx - orl 24(%rsp), %edx - je ..B1.22 -..B1.21: - lea _ones(%rip), %rax - movsd (%rax), %xmm0 - mulsd 24(%rsp), %xmm0 - addq $40, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.22: - lea _zeros(%rip), %rax - movsd (%rax,%r12,8), %xmm0 -..B1.23: - addq $40, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.24: - testl %eax, %eax - jne ..B1.6 - jmp ..B1.8 - .align 16,0x90 - .cfi_endproc - .type j1,@function - .size j1,.-j1 - .data -# -- End j1 - .text -# -- Begin __j1l - .text - .align 16,0x90 - .globl __j1l -__j1l: -# parameter 1: 96 + %rsp -..B2.1: - .cfi_startproc -..___tag_value___j1l.62: -..L63: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - lea 176+_S(%rip), %rax - fldt 96(%rsp) - fldt (%rax) - fcomip %st(1), %st - jbe ..B2.9 -..B2.2: - lea _S(%rip), %rcx - fldt (%rcx) - fcomip %st(1), %st - jbe ..B2.4 -..B2.3: - fld %st(0) - lea _P1(%rip), %rax - fmul %st(1), %st - lea 16+_P1(%rip), %rdx - fld %st(0) - lea 32+_P1(%rip), %rcx - fmul %st(1), %st - lea 48+_P1(%rip), %rsi - fstpt 64(%rsp) - lea 64+_P1(%rip), %rdi - lea 80+_P1(%rip), %r8 - lea 96+_P1(%rip), %r9 - lea 112+_P1(%rip), %r10 - lea 128+_P1(%rip), %r11 - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%rax) - lea 144+_P1(%rip), %rax - fmul %st(1), %st - fldt (%rdx) - lea 160+_P1(%rip), %rdx - fmul %st(2), %st - fldt (%rcx) - lea 176+_P1(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 192+_P1(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 208+_P1(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 224+_P1(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 240+_P1(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 256+_P1(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 272+_P1(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 288+_P1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.4: - movb $1, %dl - movl $16, %eax -..B2.5: - fldt (%rax,%rcx) - fcomip %st(1), %st - ja ..B2.8 - jp ..B2.8 -..B2.6: - incb %dl - addq $16, %rax - cmpb $11, %dl - jl ..B2.5 -..B2.8: - decb %dl - movzbl %dl, %ecx - lea _Z(%rip), %rax - movq %rcx, %rdx - lea _P(%rip), %rdi - shlq $4, %rdx - lea (%rcx,%rcx,4), %rsi - shlq $6, %rsi - fldt (%rax,%rdx) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%rsi,%rdi) - fmul %st(1), %st - fldt 16(%rsi,%rdi) - fmul %st(2), %st - fldt 32(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 48(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 64(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 80(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 96(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 112(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 128(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 144(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 160(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 176(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 192(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 208(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 224(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 240(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 256(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 272(%rsi,%rdi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 288(%rsi,%rdi) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 304(%rsi,%rdi) - faddp %st, %st(1) - faddp %st, %st(1) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.9: - lea _ones(%rip), %rax - lea _val_36_0L(%rip), %rdx - lea _PP(%rip), %rcx - lea _QP(%rip), %rsi - lea 16+_PP(%rip), %rdi - lea 16+_QP(%rip), %r8 - lea 32+_PP(%rip), %r9 - lea 32+_QP(%rip), %r10 - fldl (%rax) - lea 48+_PP(%rip), %r11 - fdiv %st(1), %st - lea 48+_QP(%rip), %rax - fxch %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fldt (%rdx) - lea 64+_PP(%rip), %rdx - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - fxch %st(2) - fstpt (%rsp) - fldt (%rcx) - lea 64+_QP(%rip), %rcx - fmul %st(1), %st - fldt (%rsi) - lea 80+_PP(%rip), %rsi - fmul %st(2), %st - fldt (%rdi) - lea 80+_QP(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 96+_PP(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 96+_QP(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 112+_PP(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 112+_QP(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_PP(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 128+_QP(%rip), %rdx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - lea 144+_PP(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 144+_QP(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 64(%rsp), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - movl $-3, %edx - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rcx) - faddp %st, %st(1) - fstpt -32(%rdi) - fldt (%rsi) - lea 80(%rsp), %rsi - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -32(%rsi) -..___tag_value___j1l.70: - call __libm_sincos_pi4l@PLT -..___tag_value___j1l.71: -..B2.18: - fldt 112(%rsp) - fldt 48(%rsp) - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 96 -..B2.10: - fldt 64(%rsp) - lea _val_0_03L(%rip), %rax - fmulp %st, %st(1) - fldt 48(%rsp) - fmulp %st, %st(2) - fsub %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt (%rax) - fmulp %st, %st(1) - fcomip %st(1), %st - fstp %st(0) - jae ..B2.12 - jp ..B2.12 -..B2.11: - fstp %st(1) - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B2.12: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B2.20: - addq $16, %rsp - .cfi_def_cfa_offset 96 - movaps (%rsp), %xmm0 -..___tag_value___j1l.77: - call __j1q@PLT -..___tag_value___j1l.78: -..B2.13: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B2.21: - fstpl 8(%rsp) - movsd 8(%rsp), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) -..B2.14: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __j1l,@function - .size __j1l,.-__j1l - .data -# -- End __j1l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_S: - .word 64993 - .word 47321 - .word 43380 - .word 39400 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 10427 - .word 24946 - .word 31449 - .word 45220 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 20142 - .word 26358 - .word 43878 - .word 35445 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 45380 - .word 5013 - .word 8196 - .word 48298 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 36049 - .word 37774 - .word 2551 - .word 61157 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 44499 - .word 20687 - .word 35324 - .word 37009 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 37149 - .word 40892 - .word 28299 - .word 43441 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 59921 - .word 2742 - .word 56472 - .word 49873 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 35749 - .word 60152 - .word 42287 - .word 56306 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 36553 - .word 24054 - .word 44174 - .word 62739 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 12707 - .word 13183 - .word 28829 - .word 34586 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 24309 - .word 45263 - .word 7124 - .word 37803 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _S,@object - .size _S,192 - .align 2 -_P1: - .word 26041 - .word 45178 - .word 34801 - .word 41495 - .word 49090 - .word 0 - .word 0 - .word 0 - .word 65370 - .word 9956 - .word 39004 - .word 61276 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 9622 - .word 32383 - .word 51277 - .word 45692 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 53955 - .word 64596 - .word 5222 - .word 35592 - .word 49100 - .word 0 - .word 0 - .word 0 - .word 34986 - .word 10535 - .word 24469 - .word 42796 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 2569 - .word 3934 - .word 58827 - .word 40937 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 16535 - .word 14264 - .word 30755 - .word 37884 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 39497 - .word 52694 - .word 37205 - .word 63078 - .word 49104 - .word 0 - .word 0 - .word 0 - .word 50010 - .word 60332 - .word 8210 - .word 49710 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 10498 - .word 63852 - .word 64151 - .word 35274 - .word 49105 - .word 0 - .word 0 - .word 0 - .word 55591 - .word 43795 - .word 24807 - .word 46603 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 15642 - .word 32907 - .word 52420 - .word 55914 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 53151 - .word 24867 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 37497 - .word 10412 - .word 6022 - .word 55715 - .word 49100 - .word 0 - .word 0 - .word 0 - .word 14397 - .word 43702 - .word 43690 - .word 43690 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 57427 - .word 55015 - .word 8445 - .word 53508 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 64958 - .word 65535 - .word 65535 - .word 65535 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 64696 - .word 39566 - .word 31598 - .word 54025 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,304 - .align 2 -_Z: - .word 17728 - .word 31608 - .word 43949 - .word 62778 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 32551 - .word 41874 - .word 44957 - .word 57471 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 18949 - .word 61409 - .word 34437 - .word 41670 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 4396 - .word 34605 - .word 55192 - .word 54573 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 9307 - .word 10310 - .word 55728 - .word 33731 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 7613 - .word 2917 - .word 18234 - .word 40173 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 24292 - .word 42693 - .word 42782 - .word 46612 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 12570 - .word 29960 - .word 47214 - .word 53050 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 24415 - .word 36838 - .word 59299 - .word 59487 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 32322 - .word 22879 - .word 15219 - .word 32962 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 56404 - .word 12107 - .word 18542 - .word 36180 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _Z,@object - .size _Z,176 - .align 2 -_P: - .word 43464 - .word 52019 - .word 16370 - .word 39301 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 45212 - .word 20213 - .word 4367 - .word 36322 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 62182 - .word 43016 - .word 65056 - .word 63104 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 45004 - .word 1793 - .word 2432 - .word 46043 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 10697 - .word 46113 - .word 34013 - .word 35792 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 9065 - .word 41098 - .word 5532 - .word 44900 - .word 16343 - .word 0 - .word 0 - .word 0 - .word 26003 - .word 49876 - .word 4534 - .word 63025 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 42133 - .word 20669 - .word 62629 - .word 33244 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 10663 - .word 14825 - .word 55564 - .word 41652 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 21046 - .word 62601 - .word 18713 - .word 35715 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 28431 - .word 25084 - .word 11881 - .word 39361 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 40049 - .word 63841 - .word 60004 - .word 52172 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 992 - .word 25066 - .word 14104 - .word 49616 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 44948 - .word 43537 - .word 5801 - .word 46886 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 65381 - .word 44162 - .word 41036 - .word 37465 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 14125 - .word 39149 - .word 41569 - .word 43450 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 9425 - .word 2504 - .word 59629 - .word 56004 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 7469 - .word 36200 - .word 7418 - .word 55109 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 63186 - .word 26107 - .word 31425 - .word 52790 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 52143 - .word 25611 - .word 44594 - .word 35227 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 35717 - .word 29166 - .word 20585 - .word 41467 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 2832 - .word 5439 - .word 21266 - .word 33717 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 5378 - .word 24417 - .word 51356 - .word 63335 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 48412 - .word 30659 - .word 29190 - .word 42335 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 9054 - .word 19776 - .word 30431 - .word 35870 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 1836 - .word 17934 - .word 4966 - .word 40411 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 4836 - .word 40500 - .word 17629 - .word 63063 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 23076 - .word 41820 - .word 25860 - .word 58134 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 39832 - .word 57656 - .word 52920 - .word 41521 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 22342 - .word 1014 - .word 59094 - .word 59974 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 25371 - .word 16474 - .word 28775 - .word 38931 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 48127 - .word 54624 - .word 55306 - .word 41258 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 60537 - .word 50282 - .word 14991 - .word 48309 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 15691 - .word 57338 - .word 50654 - .word 33690 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 40468 - .word 19472 - .word 58347 - .word 35325 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 2985 - .word 7922 - .word 38039 - .word 52517 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 33464 - .word 30509 - .word 7663 - .word 49252 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 63790 - .word 6933 - .word 28208 - .word 44856 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 21342 - .word 14964 - .word 50588 - .word 39336 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 56226 - .word 19816 - .word 23757 - .word 47758 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 41064 - .word 34118 - .word 40187 - .word 42472 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 9004 - .word 37522 - .word 42571 - .word 60097 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 40290 - .word 31235 - .word 60424 - .word 63498 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 59943 - .word 36153 - .word 34778 - .word 37099 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 23867 - .word 38881 - .word 17085 - .word 35787 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 43845 - .word 22338 - .word 8742 - .word 34578 - .word 16343 - .word 0 - .word 0 - .word 0 - .word 21920 - .word 9728 - .word 29300 - .word 62498 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 43241 - .word 30911 - .word 50314 - .word 48209 - .word 49118 - .word 0 - .word 0 - .word 0 - .word 5869 - .word 26658 - .word 63775 - .word 40733 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 50245 - .word 25343 - .word 31579 - .word 47683 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 51932 - .word 37189 - .word 37317 - .word 37600 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 35305 - .word 45319 - .word 11991 - .word 61881 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 43727 - .word 7380 - .word 41898 - .word 45538 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 55996 - .word 31666 - .word 20048 - .word 46502 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 20142 - .word 56563 - .word 4676 - .word 64142 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 42758 - .word 26948 - .word 20336 - .word 64653 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 18102 - .word 54076 - .word 11950 - .word 42374 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 55144 - .word 962 - .word 65430 - .word 51473 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 35076 - .word 30182 - .word 41634 - .word 65458 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 45599 - .word 55541 - .word 39885 - .word 63330 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 11397 - .word 64373 - .word 55097 - .word 42716 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 7278 - .word 1186 - .word 16759 - .word 52647 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 55821 - .word 1941 - .word 7835 - .word 62966 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 43692 - .word 51803 - .word 23893 - .word 63855 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 7306 - .word 740 - .word 42177 - .word 35243 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 20304 - .word 26112 - .word 14593 - .word 58152 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 44429 - .word 26104 - .word 43204 - .word 60999 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 43100 - .word 25366 - .word 26069 - .word 39382 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 53318 - .word 3475 - .word 36258 - .word 39277 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 61289 - .word 34432 - .word 35705 - .word 37567 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 47881 - .word 43207 - .word 60352 - .word 35669 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 3664 - .word 62231 - .word 63343 - .word 46625 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 41733 - .word 11611 - .word 33384 - .word 42291 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 22414 - .word 28668 - .word 61827 - .word 33289 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 39839 - .word 31083 - .word 29085 - .word 58078 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 45039 - .word 64406 - .word 35589 - .word 44277 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 21856 - .word 35851 - .word 11264 - .word 37516 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 38193 - .word 55017 - .word 53611 - .word 34369 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 50065 - .word 40254 - .word 39875 - .word 57241 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 21434 - .word 36257 - .word 28860 - .word 44273 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 24899 - .word 55058 - .word 27384 - .word 42408 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 23952 - .word 61552 - .word 63266 - .word 45785 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 20309 - .word 44505 - .word 41003 - .word 61821 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 9759 - .word 19768 - .word 52219 - .word 54624 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 3188 - .word 41981 - .word 52169 - .word 34347 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 7467 - .word 53297 - .word 24491 - .word 48747 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 26956 - .word 25629 - .word 26154 - .word 58912 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 2746 - .word 62708 - .word 29606 - .word 64476 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 23526 - .word 40632 - .word 17955 - .word 37512 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 58003 - .word 45489 - .word 17648 - .word 59859 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 12684 - .word 55359 - .word 8573 - .word 33616 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 29881 - .word 6055 - .word 26438 - .word 36076 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 37160 - .word 17925 - .word 32887 - .word 39269 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 52986 - .word 52867 - .word 51415 - .word 50108 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 29602 - .word 44157 - .word 62211 - .word 53157 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 14158 - .word 17332 - .word 5318 - .word 65232 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 63939 - .word 33203 - .word 7646 - .word 33955 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 29120 - .word 11480 - .word 39280 - .word 50030 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 42029 - .word 1146 - .word 14309 - .word 51502 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 13934 - .word 45324 - .word 64176 - .word 62054 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 407 - .word 40447 - .word 21497 - .word 41724 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 29047 - .word 47840 - .word 58616 - .word 39773 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 45982 - .word 37340 - .word 60343 - .word 60272 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 61708 - .word 5158 - .word 50916 - .word 46783 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 15241 - .word 33011 - .word 52635 - .word 33255 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 27136 - .word 17183 - .word 21500 - .word 41066 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 41313 - .word 44818 - .word 44575 - .word 56585 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 1149 - .word 8286 - .word 16932 - .word 53342 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 29145 - .word 29789 - .word 51640 - .word 35705 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 48645 - .word 17912 - .word 55357 - .word 48589 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 34105 - .word 33794 - .word 2760 - .word 63371 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 30589 - .word 55184 - .word 63547 - .word 57492 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 36766 - .word 25700 - .word 37915 - .word 36654 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 54115 - .word 65102 - .word 9808 - .word 39287 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 15191 - .word 22168 - .word 7058 - .word 49192 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 21631 - .word 11360 - .word 58072 - .word 50534 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 52725 - .word 34636 - .word 1139 - .word 62446 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 53409 - .word 43718 - .word 34635 - .word 38501 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 21083 - .word 16045 - .word 34961 - .word 47202 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 38780 - .word 63942 - .word 22964 - .word 35475 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 58574 - .word 20162 - .word 19964 - .word 40809 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 36576 - .word 45489 - .word 13327 - .word 34648 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 40869 - .word 46352 - .word 6352 - .word 58511 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 38766 - .word 2767 - .word 13055 - .word 40283 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 11002 - .word 40490 - .word 24288 - .word 64180 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 21330 - .word 2672 - .word 53484 - .word 34906 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 11637 - .word 63948 - .word 58709 - .word 54245 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 16451 - .word 23295 - .word 46139 - .word 44738 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 40013 - .word 16865 - .word 3459 - .word 33992 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 28055 - .word 62424 - .word 59084 - .word 40217 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 37015 - .word 7577 - .word 64481 - .word 59907 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 8219 - .word 9822 - .word 27279 - .word 47011 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 859 - .word 2558 - .word 12826 - .word 34425 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 34289 - .word 12934 - .word 665 - .word 63599 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 15142 - .word 54455 - .word 30227 - .word 45946 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 13599 - .word 50987 - .word 20426 - .word 40603 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 224 - .word 55674 - .word 54991 - .word 58096 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 12803 - .word 33902 - .word 43760 - .word 61618 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 3255 - .word 47153 - .word 28829 - .word 43826 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 57503 - .word 42370 - .word 48259 - .word 34977 - .word 16317 - .word 0 - .word 0 - .word 0 - .word 28464 - .word 31222 - .word 4873 - .word 39771 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 7076 - .word 4355 - .word 19850 - .word 60674 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 58695 - .word 18024 - .word 41082 - .word 56674 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 1100 - .word 13540 - .word 64577 - .word 34943 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 25873 - .word 27686 - .word 11323 - .word 61856 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 12188 - .word 35264 - .word 2250 - .word 59962 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 59387 - .word 26772 - .word 9493 - .word 52010 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 50361 - .word 26279 - .word 61391 - .word 38047 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 40446 - .word 22175 - .word 52931 - .word 64839 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 16288 - .word 22519 - .word 41833 - .word 33884 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 22795 - .word 59507 - .word 36930 - .word 56848 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 9090 - .word 34727 - .word 62738 - .word 39279 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 6548 - .word 61899 - .word 57259 - .word 65037 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 20477 - .word 44577 - .word 947 - .word 52780 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 9901 - .word 21929 - .word 34492 - .word 43241 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 52812 - .word 31464 - .word 11463 - .word 33533 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 16273 - .word 3725 - .word 28705 - .word 54534 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 28551 - .word 65013 - .word 38971 - .word 50753 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 55907 - .word 45101 - .word 33737 - .word 41084 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 43426 - .word 25495 - .word 20291 - .word 49461 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 1975 - .word 51775 - .word 24779 - .word 38683 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 29807 - .word 50650 - .word 32397 - .word 53456 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 5564 - .word 52273 - .word 7778 - .word 54851 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 7750 - .word 4868 - .word 38403 - .word 61120 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 15407 - .word 2698 - .word 46605 - .word 59622 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 137 - .word 48802 - .word 34590 - .word 52040 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 61391 - .word 58349 - .word 18865 - .word 49927 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 11732 - .word 37228 - .word 55154 - .word 32778 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 21770 - .word 7395 - .word 32621 - .word 61994 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 14091 - .word 47411 - .word 37523 - .word 57988 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 50358 - .word 51525 - .word 37270 - .word 54151 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 22903 - .word 22329 - .word 47941 - .word 33412 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 47512 - .word 65334 - .word 39843 - .word 61750 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 35590 - .word 32984 - .word 45077 - .word 44683 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 56839 - .word 21073 - .word 60125 - .word 40948 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 16525 - .word 17598 - .word 3587 - .word 56588 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 56933 - .word 2767 - .word 44815 - .word 51549 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 35966 - .word 59943 - .word 1117 - .word 42745 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 40172 - .word 7271 - .word 14707 - .word 38800 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 8476 - .word 4419 - .word 45780 - .word 62512 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 49137 - .word 16671 - .word 19871 - .word 37593 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 63934 - .word 59521 - .word 24158 - .word 47409 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 31258 - .word 33926 - .word 28141 - .word 53090 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 17384 - .word 36966 - .word 994 - .word 53889 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 55527 - .word 7910 - .word 53076 - .word 57518 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 18447 - .word 54969 - .word 49626 - .word 45611 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 13282 - .word 62682 - .word 5627 - .word 48010 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 7550 - .word 10759 - .word 6881 - .word 57138 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 65344 - .word 23540 - .word 39388 - .word 59430 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 2956 - .word 21512 - .word 45255 - .word 50285 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 29054 - .word 47408 - .word 36565 - .word 51766 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 19154 - .word 63758 - .word 53467 - .word 57697 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 22082 - .word 2480 - .word 53967 - .word 58888 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 52243 - .word 32283 - .word 44909 - .word 38447 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 7267 - .word 45206 - .word 61308 - .word 38976 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 10717 - .word 24270 - .word 52189 - .word 48572 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 40118 - .word 3643 - .word 65534 - .word 49002 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 44194 - .word 5661 - .word 50617 - .word 36641 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 26911 - .word 20494 - .word 63331 - .word 36858 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 20013 - .word 62028 - .word 17108 - .word 33468 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 9949 - .word 25572 - .word 4049 - .word 36529 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 39945 - .word 24442 - .word 45585 - .word 42322 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 59756 - .word 52868 - .word 48949 - .word 51417 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 35066 - .word 41141 - .word 44695 - .word 47881 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 42453 - .word 21162 - .word 44569 - .word 55557 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 30136 - .word 39390 - .word 37319 - .word 40338 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 60101 - .word 48639 - .word 6972 - .word 46254 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 56660 - .word 41165 - .word 63413 - .word 50313 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 13109 - .word 12767 - .word 29074 - .word 57119 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 2453 - .word 26502 - .word 15952 - .word 44109 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 44844 - .word 50072 - .word 22431 - .word 49646 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 33416 - .word 16999 - .word 40271 - .word 50445 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 26560 - .word 32264 - .word 54945 - .word 56373 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 58100 - .word 55846 - .word 35515 - .word 33528 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 44190 - .word 42353 - .word 4741 - .word 37259 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 47772 - .word 5308 - .word 50468 - .word 42281 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 53822 - .word 6159 - .word 32580 - .word 46797 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 5509 - .word 51700 - .word 62457 - .word 63728 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 52274 - .word 35926 - .word 43999 - .word 35182 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 33647 - .word 41025 - .word 45844 - .word 37383 - .word 16317 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,3520 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,16 - .align 2 -_PP: - .word 52008 - .word 23245 - .word 2457 - .word 38658 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 61876 - .word 57278 - .word 25234 - .word 61346 - .word 49090 - .word 0 - .word 0 - .word 0 - .word 33834 - .word 23040 - .word 39409 - .word 49003 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 54525 - .word 6554 - .word 40935 - .word 51421 - .word 49100 - .word 0 - .word 0 - .word 0 - .word 9848 - .word 9769 - .word 18248 - .word 38344 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 45790 - .word 60252 - .word 47538 - .word 43957 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 27022 - .word 41654 - .word 23333 - .word 43744 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 12816 - .word 40723 - .word 46387 - .word 47196 - .word 49127 - .word 0 - .word 0 - .word 0 - .word 4849 - .word 19418 - .word 12136 - .word 48545 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _PP,@object - .size _PP,160 - .align 2 -_QP: - .word 65402 - .word 6822 - .word 45128 - .word 37300 - .word 49084 - .word 0 - .word 0 - .word 0 - .word 41532 - .word 52948 - .word 50360 - .word 54021 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 21320 - .word 30785 - .word 26870 - .word 37955 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 55382 - .word 38611 - .word 29746 - .word 34115 - .word 16330 - .word 0 - .word 0 - .word 0 - .word 37194 - .word 6554 - .word 16235 - .word 42314 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 17886 - .word 15840 - .word 33918 - .word 38666 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 62905 - .word 55876 - .word 18072 - .word 57284 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 28423 - .word 64693 - .word 26579 - .word 40379 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 40135 - .word 58793 - .word 24002 - .word 37757 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _QP,@object - .size _QP,160 - .align 2 -_val_0_03L: - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _val_0_03L,@object - .size _val_0_03L,16 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _tonpi,@object - .size _tonpi,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1f.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1f.S deleted file mode 100644 index 2508345690..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1f.S +++ /dev/null @@ -1,733 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j1f.c" - .text -..TXTST0: -# -- Begin j1f - .text - .align 16,0x90 - .globl j1f -j1f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_j1f.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - subq $64, %rsp - .cfi_def_cfa_offset 80 - movd %xmm0, %r13d - movss %xmm0, 56(%rsp) - movl %r13d, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - jae ..B1.24 -..B1.2: - cmpl $1099993482, %edx - jae ..B1.22 -..B1.3: - cmpl $1075439785, %edx - jae ..B1.16 -..B1.4: - cmpl $1048576000, %edx - jae ..B1.15 -..B1.5: - cmpl $998244352, %edx - jae ..B1.14 -..B1.6: - cmpl $838860800, %edx - jae ..B1.13 -..B1.7: - shrl $31, %r13d - cmpl $8388608, %edx - jbe ..B1.9 -..B1.8: - movl %r13d, %r13d - lea _small_value_32(%rip), %rax - movss .L_2il0floatpacket.0(%rip), %xmm1 - mulss %xmm1, %xmm0 - movss (%rax,%r13,4), %xmm2 - mulss .L_2il0floatpacket.1(%rip), %xmm2 - subss %xmm2, %xmm0 - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.9: - testl %edx, %edx - je ..B1.11 -..B1.10: - lea _small_value_32(%rip), %rax - pxor %xmm2, %xmm2 - pxor %xmm1, %xmm1 - movss (%rax,%r13,4), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - cvtss2sd %xmm0, %xmm2 - movss 56(%rsp), %xmm0 - mulss .L_2il0floatpacket.0(%rip), %xmm0 - cvtsd2ss %xmm2, %xmm1 - cvtss2sd %xmm0, %xmm0 - movss %xmm1, (%rsp) - subsd %xmm2, %xmm0 - cvtsd2ss %xmm0, %xmm0 - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.11: - movss 56(%rsp), %xmm0 -..B1.12: - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.13: - movss 56(%rsp), %xmm0 - lea 8+_Q2(%rip), %rax - mulss .L_2il0floatpacket.0(%rip), %xmm0 - lea _Q2(%rip), %rdx - cvtss2sd %xmm0, %xmm0 - movaps %xmm0, %xmm1 - mulsd %xmm0, %xmm1 - movsd (%rax), %xmm2 - mulsd %xmm1, %xmm2 - addsd (%rdx), %xmm2 - mulsd %xmm1, %xmm2 - mulsd %xmm0, %xmm2 - addsd %xmm0, %xmm2 - cvtsd2ss %xmm2, %xmm2 - movaps %xmm2, %xmm0 - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.14: - movss 56(%rsp), %xmm0 - lea 24+_Q2(%rip), %rax - mulss .L_2il0floatpacket.0(%rip), %xmm0 - lea 16+_Q2(%rip), %rcx - cvtss2sd %xmm0, %xmm0 - movaps %xmm0, %xmm2 - lea 8+_Q2(%rip), %rdx - mulsd %xmm0, %xmm2 - lea _Q2(%rip), %rsi - movaps %xmm2, %xmm1 - mulsd %xmm2, %xmm1 - movsd (%rax), %xmm4 - movsd (%rcx), %xmm3 - mulsd %xmm1, %xmm4 - mulsd %xmm1, %xmm3 - addsd (%rdx), %xmm4 - addsd (%rsi), %xmm3 - mulsd %xmm1, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm3, %xmm4 - mulsd %xmm0, %xmm4 - addsd %xmm0, %xmm4 - cvtsd2ss %xmm4, %xmm4 - movaps %xmm4, %xmm0 - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.15: - pxor %xmm3, %xmm3 - lea 80+_Q1(%rip), %r9 - cvtss2sd 56(%rsp), %xmm3 - andps .L_2il0floatpacket.2(%rip), %xmm3 - testl $-2147483648, %r13d - movaps %xmm3, %xmm1 - lea 88+_Q1(%rip), %rax - mulsd %xmm3, %xmm1 - lea 72+_Q1(%rip), %rsi - movaps %xmm1, %xmm2 - lea 64+_Q1(%rip), %r13 - mulsd %xmm1, %xmm2 - lea 48+_Q1(%rip), %r10 - movsd (%r9), %xmm5 - lea 56+_Q1(%rip), %rdx - mulsd %xmm2, %xmm5 - lea 40+_Q1(%rip), %rdi - movsd (%rax), %xmm6 - lea 32+_Q1(%rip), %rax - movsd (%rsi), %xmm0 - lea 16+_Q1(%rip), %r11 - movsd (%r13), %xmm4 - lea 24+_Q1(%rip), %rcx - mulsd %xmm2, %xmm6 - addsd (%r10), %xmm5 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm4 - addsd (%rdx), %xmm6 - mulsd %xmm2, %xmm5 - addsd (%rdi), %xmm0 - addsd (%rax), %xmm4 - mulsd %xmm2, %xmm6 - addsd (%r11), %xmm5 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm4 - addsd (%rcx), %xmm6 - mulsd %xmm1, %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm3, %xmm5 - lea 8+_Q1(%rip), %r8 - lea _Q1(%rip), %rdx - addsd (%r8), %xmm0 - addsd (%rdx), %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm3, %xmm4 - addsd %xmm0, %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - movaps %xmm6, %xmm0 - xorps .L_2il0floatpacket.3(%rip), %xmm0 - jne ..L31 - movaps %xmm6, %xmm0 -..L31: - cvtsd2ss %xmm0, %xmm0 - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.16: - pxor %xmm3, %xmm3 - andl $-2147483648, %r13d - cvtss2sd 56(%rsp), %xmm3 - andps .L_2il0floatpacket.2(%rip), %xmm3 - cmpl $1097786634, %edx - jae ..B1.20 -..B1.17: - cmpl $1091204523, %edx - jae ..B1.19 -..B1.18: - cmpl $1085318267, %edx - lea _P1(%rip), %rcx - lea _P2(%rip), %rax - jb ..B1.21 - movq %rax, %rcx - jmp ..B1.21 -..B1.19: - cmpl $1094494752, %edx - lea _P3(%rip), %rcx - lea _P4(%rip), %rax - jb ..B1.21 - movq %rax, %rcx - jmp ..B1.21 -..B1.20: - lea _P5(%rip), %rcx -..B1.21: - testl %r13d, %r13d - movsd 96(%rcx), %xmm6 - movsd 80(%rcx), %xmm0 - movsd 88(%rcx), %xmm5 - movsd 72(%rcx), %xmm4 - subsd 104(%rcx), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd 64(%rcx), %xmm6 - mulsd %xmm2, %xmm4 - addsd 48(%rcx), %xmm0 - addsd 56(%rcx), %xmm5 - mulsd %xmm2, %xmm6 - addsd 40(%rcx), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd 32(%rcx), %xmm6 - mulsd %xmm2, %xmm4 - addsd 16(%rcx), %xmm0 - addsd 24(%rcx), %xmm5 - mulsd %xmm2, %xmm6 - addsd 8(%rcx), %xmm4 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm5 - mulsd %xmm3, %xmm4 - addsd %xmm0, %xmm6 - mulsd %xmm3, %xmm5 - addsd (%rcx), %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - movaps %xmm6, %xmm0 - xorps .L_2il0floatpacket.3(%rip), %xmm0 - jne ..L37 - movaps %xmm6, %xmm0 -..L37: - cvtsd2ss %xmm0, %xmm0 - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.22: - pxor %xmm0, %xmm0 - lea _val_16_0(%rip), %rax - cvtss2sd 56(%rsp), %xmm0 - andps .L_2il0floatpacket.2(%rip), %xmm0 - lea 8(%rsp), %rdi - movsd .L_2il0floatpacket.4(%rip), %xmm1 - lea 16(%rsp), %rsi - divsd %xmm0, %xmm1 - movsd (%rax), %xmm2 - movl $-3, %edx - mulsd %xmm1, %xmm2 - andl $-2147483648, %r13d - movsd %xmm2, 8(%rsi) - mulsd %xmm2, %xmm2 - movsd %xmm2, 24(%rsi) - mulsd %xmm2, %xmm2 - movsd %xmm1, 16(%rsi) - movsd %xmm2, 32(%rsi) -..___tag_value_j1f.43: - call __libm_sincos_k32@PLT -..___tag_value_j1f.44: -..B1.23: - lea 40+_QP(%rip), %r10 - lea 40+_PP(%rip), %rdx - movsd 48(%rsp), %xmm2 - lea 24+_QP(%rip), %r11 - lea 24+_PP(%rip), %rcx - lea 32+_PP(%rip), %rdi - lea _tonpi(%rip), %rax - lea 16+_PP(%rip), %r8 - movsd (%r10), %xmm5 - lea 8+_PP(%rip), %rsi - movsd (%rdx), %xmm6 - lea 32+_QP(%rip), %rdx - mulsd %xmm2, %xmm5 - lea _PP(%rip), %r9 - mulsd %xmm2, %xmm6 - addsd (%r11), %xmm5 - addsd (%rcx), %xmm6 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm6 - movsd (%rdx), %xmm4 - lea 16+_QP(%rip), %rcx - mulsd %xmm2, %xmm4 - addsd (%rsi), %xmm6 - movsd (%rdi), %xmm1 - lea _QP(%rip), %rsi - mulsd %xmm2, %xmm1 - addsd (%rcx), %xmm4 - movsd (%rax), %xmm0 - lea 8+_QP(%rip), %rax - mulsd %xmm2, %xmm4 - addsd (%r8), %xmm1 - mulsd 32(%rsp), %xmm0 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm1 - addsd (%rsi), %xmm4 - sqrtsd %xmm0, %xmm0 - addsd (%r9), %xmm1 - movsd 40(%rsp), %xmm3 - testl %r13d, %r13d - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm1, %xmm6 - mulsd 24(%rsp), %xmm5 - mulsd 16(%rsp), %xmm6 - mulsd 8(%rsp), %xmm5 - subsd %xmm5, %xmm6 - mulsd %xmm6, %xmm0 - movaps %xmm0, %xmm2 - xorps .L_2il0floatpacket.3(%rip), %xmm2 - jne ..L45 - movaps %xmm0, %xmm2 -..L45: - cvtsd2ss %xmm2, %xmm2 - movaps %xmm2, %xmm0 - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.24: - ja ..B1.26 -..B1.25: - lea _zeros(%rip), %rax - shrl $31, %r13d - movss (%rax,%r13,4), %xmm0 - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 -..B1.26: - movss 56(%rsp), %xmm0 -..B1.27: - addq $64, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type j1f,@function - .size j1f,.-j1f - .data -# -- End j1f - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.2: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 8 -.L_2il0floatpacket.4: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x3f000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x0d800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -_Q2: - .long 4294942533 - .long 3219128319 - .long 1380922587 - .long 1068848469 - .long 4229217063 - .long 3212603831 - .long 2485211372 - .long 1060546867 - .type _Q2,@object - .size _Q2,32 - .align 4 -_Q1: - .long 4294875887 - .long 1071644671 - .long 4170968197 - .long 1038133990 - .long 82133904 - .long 3215982592 - .long 2332230043 - .long 1043853917 - .long 2564340116 - .long 1063605580 - .long 220691470 - .long 1046506888 - .long 254563561 - .long 3205265147 - .long 694808779 - .long 1046622203 - .long 4019568744 - .long 1051070668 - .long 1556554770 - .long 1044540217 - .long 1786312313 - .long 3191946521 - .long 1750363188 - .long 1039907362 - .type _Q1,@object - .size _Q1,96 - .align 4 -_P1: - .long 3288017007 - .long 3163666881 - .long 1479173198 - .long 3218720463 - .long 2681037136 - .long 1068165283 - .long 482223942 - .long 1068193949 - .long 1641242500 - .long 3212130132 - .long 3602486439 - .long 3210890035 - .long 1295520927 - .long 1059513544 - .long 2893642677 - .long 1057503730 - .long 2144568350 - .long 3200875225 - .long 914896231 - .long 3198366754 - .long 1774974526 - .long 1046581392 - .long 3090631217 - .long 1043566169 - .long 3310618599 - .long 3186783429 - .long 1974431497 - .long 1074702165 - .type _P1,@object - .size _P1,112 - .align 4 -_P2: - .long 216484910 - .long 1015040375 - .long 3011708428 - .long 1070806296 - .long 3332724636 - .long 3214272269 - .long 3160644008 - .long 3215461507 - .long 2925435221 - .long 1063888050 - .long 725350898 - .long 1063337916 - .long 297499451 - .long 3206574940 - .long 3278099830 - .long 3204945545 - .long 2222993240 - .long 1053042193 - .long 2059286351 - .long 1050869046 - .long 306569625 - .long 3193793299 - .long 95256688 - .long 3191038309 - .long 616794992 - .long 1039029534 - .long 4088689232 - .long 1075580917 - .type _P2,@object - .size _P2,112 - .align 4 -_P3: - .long 1314465059 - .long 1017127215 - .long 1413823668 - .long 3218077268 - .long 4087546795 - .long 1065951807 - .long 3559351807 - .long 1067757765 - .long 338531188 - .long 3210711466 - .long 2516776276 - .long 3210695105 - .long 1548953411 - .long 1058452686 - .long 3819184955 - .long 1057373236 - .long 1262833741 - .long 3200137243 - .long 325214128 - .long 3198310046 - .long 1253465703 - .long 1045913252 - .long 3453826356 - .long 1043528319 - .long 2667154656 - .long 3186140571 - .long 3502111785 - .long 1076123856 - .type _P3,@object - .size _P3,112 - .align 4 -_P4: - .long 1657852450 - .long 3163577804 - .long 2020212262 - .long 1070330675 - .long 774106997 - .long 3212888122 - .long 2119717923 - .long 3215085957 - .long 2098754573 - .long 1062575793 - .long 2137093530 - .long 1063017421 - .long 2437037263 - .long 3205513537 - .long 2698759453 - .long 3204752976 - .long 1998212634 - .long 1052165362 - .long 2817762251 - .long 1050764623 - .long 357372240 - .long 3193071576 - .long 3891599306 - .long 3190966182 - .long 2865549426 - .long 1038348895 - .long 4077970850 - .long 1076536762 - .type _P4,@object - .size _P4,112 - .align 4 -_P5: - .long 1537387514 - .long 3166104464 - .long 4237757176 - .long 3217630662 - .long 789391682 - .long 1064857043 - .long 3122547501 - .long 1067488355 - .long 3303098147 - .long 3209681410 - .long 2944525948 - .long 3210343613 - .long 1468487066 - .long 1057519518 - .long 285546763 - .long 1057172625 - .long 830693909 - .long 3199311383 - .long 1284260698 - .long 3198182585 - .long 1823688212 - .long 1045254801 - .long 1962790020 - .long 1043427779 - .long 1867031598 - .long 3185590079 - .long 906299589 - .long 1076918395 - .type _P5,@object - .size _P5,112 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_QP: - .long 4294954956 - .long 1066926079 - .long 4141388976 - .long 3204071423 - .long 1500123100 - .long 1049740228 - .long 3264213437 - .long 3191856517 - .long 1489731078 - .long 1039824630 - .long 1807021260 - .long 3183130166 - .type _QP,@object - .size _QP,48 - .align 4 -_PP: - .long 551 - .long 1072693248 - .long 4267608614 - .long 1061027839 - .long 3690881252 - .long 3200414971 - .long 3933039373 - .long 1046848465 - .long 3246008603 - .long 3189439465 - .long 1689113401 - .long 1037483563 - .type _PP,@object - .size _PP,48 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1l.S deleted file mode 100644 index 936d12f68b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/j1l.S +++ /dev/null @@ -1,86 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "j1l.c" - .text -..TXTST0: -# -- Begin j1l - .text - .align 16,0x90 - .globl j1l -j1l: -# parameter 1: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_j1l.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 48 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B1.6: - addq $16, %rsp - .cfi_def_cfa_offset 32 - movaps (%rsp), %xmm0 -..___tag_value_j1l.6: - call __j1q@PLT -..___tag_value_j1l.7: -..B1.2: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type j1l,@function - .size j1l,.-j1l - .data -# -- End j1l - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jn.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jn.S deleted file mode 100644 index 05c0135d90..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jn.S +++ /dev/null @@ -1,1714 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "jn.c" - .text -..TXTST0: -# -- Begin jn - .text - .align 16,0x90 - .globl jn -jn: -# parameter 1: %edi -# parameter 2: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_jn.1: -..L2: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - subq $208, %rsp - .cfi_def_cfa_offset 240 - movl %edi, %ebx - movsd %xmm0, (%rsp) - movl $1, %r14d - xorb %r15b, %r15b -..B1.2: - fnstcw 194(%rsp) -..B1.3: - movzwl 6(%rsp), %eax - andl $32752, %eax - cmpl $32752, %eax - je ..B1.74 -..B1.4: - testl %ebx, %ebx - je ..B1.55 -..B1.5: - lea _zeros(%rip), %rsi - movsd (%rsp), %xmm2 - movsd (%rsi), %xmm0 - ucomisd %xmm0, %xmm2 - jp ..B1.6 - je ..B1.79 -..B1.6: - testl %ebx, %ebx - jge ..B1.8 -..B1.7: - movl %ebx, %eax - negl %ebx - notl %eax - andl $1, %eax - lea -1(%rax,%rax), %r14d -..B1.8: - comisd %xmm2, %xmm0 - jbe ..B1.10 -..B1.9: - movl %r14d, %eax - negl %eax - testb $1, %bl - xorps .L_2il0floatpacket.1(%rip), %xmm2 - movsd %xmm2, (%rsp) - cmovne %eax, %r14d -..B1.10: - cmpl $1, %ebx - je ..B1.78 -..B1.11: - movl %ebx, %ecx - sarl $5, %ecx - cmpl $160, %ecx - jg ..B1.13 -..B1.12: - movslq %ecx, %rcx - lea XZERO(%rip), %rax - movsd (%rax,%rcx,8), %xmm1 - jmp ..B1.14 -..B1.13: - pxor %xmm1, %xmm1 - lea -640(,%rcx,4), %eax - lea (,%rax,8), %ecx - subl %eax, %ecx - cvtsi2sd %ecx, %xmm1 - addsd .L_2il0floatpacket.0(%rip), %xmm1 -..B1.14: - comisd %xmm2, %xmm1 - ja ..B1.83 -..B1.15: - movzwl 194(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.19 -..B1.16: - orl $-64768, %ecx - movw %cx, 192(%rsp) -..B1.17: - fldcw 192(%rsp) -..B1.18: - movsd (%rsp), %xmm2 - movb $1, %r15b -..B1.19: - movsd %xmm2, 80(%rsp) - cmpl $1753, %ebx - fldl 80(%rsp) - movl %ebx, 80(%rsp) - fildl 80(%rsp) - jg ..B1.32 -..B1.20: - fldt val_0_4(%rip) - fmul %st(1), %st - fcomip %st(2), %st - jbe ..B1.32 -..B1.21: - fstp %st(0) - lea _val_2_0L(%rip), %rax - lea _val_1_0L(%rip), %rcx - testl %ebx, %ebx - fldt (%rax) - fdivrp %st, %st(1) - fldt (%rcx) - movl $0, %ecx - fld %st(0) - movl %ecx, %eax - fld %st(0) - fld %st(2) - fld %st(3) - jle ..B1.25 -..B1.23: - incl %ecx - fmul %st(5), %st - cmpl %ebx, %ecx - jb ..B1.23 -..B1.25: - movl %eax, %ecx - testl %ebx, %ebx - jle ..B1.28 -..B1.27: - incl %ecx - fxch %st(1) - fmul %st(3), %st - fxch %st(3) - fadd %st(4), %st - cmpl %ebx, %ecx - fxch %st(3) - fxch %st(1) - jb ..B1.27 -..B1.28: - fstp %st(3) -..B1.29: - fxch %st(4) - fmul %st(0), %st - fchs -..B1.30: - incl %eax - incl %ebx - movl %eax, %ecx - fld %st(3) - imull %ebx, %ecx - fxch %st(1) - fmul %st, %st(2) - movl %ecx, 80(%rsp) - fildl 80(%rsp) - fdivrp %st, %st(3) - fxch %st(2) - fadd %st, %st(4) - fxch %st(1) - fucomip %st(4), %st - fxch %st(1) - jne ..B1.30 - jp ..B1.30 -..B1.31: - fstp %st(0) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(2) - fdivrp %st, %st(1) - fxch %st(1) - fstpt 32(%rsp) - jmp ..B1.45 -..B1.32: - fcomi %st(1), %st - ja ..B1.51 -..B1.33: - lea _val_20_0L(%rip), %rax - lea _val_1000_0L(%rip), %rcx - fldt (%rax) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fcomip %st(2), %st - ja ..B1.57 -..B1.34: - lea _val_4_0L(%rip), %rax - fld %st(0) - lea _val_1_0L(%rip), %rdi - lea _val_8_0L(%rip), %rsi - lea _val_2_0L(%rip), %r8 - lea _val_3_0L(%rip), %r9 - lea _val_5_0L(%rip), %r10 - movl $-1, %ecx - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fldt (%rax) - xorb %al, %al - fstpt 144(%rsp) - fldt 144(%rsp) - fmulp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 176(%rsp) - fldt 176(%rsp) - fldt (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 160(%rsp) - fldt 160(%rsp) - fldt (%rdi) - fld %st(0) - fsubrp %st, %st(3) - fxch %st(1) - fdivrp %st, %st(2) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 80(%rsp) - fldt (%r8) - fstpt 128(%rsp) - fldt 128(%rsp) - fstpt 32(%rsp) - fldt (%r9) - fstpt 96(%rsp) - fldt 96(%rsp) - fldt (%r10) - fstpt (%rsp) - fldt (%rsp) - fldt 96(%rsp) - fldt 32(%rsp) - fldt 16(%rsp) -..B1.35: - fldt 160(%rsp) - fld %st(3) - fmul %st(4), %st - testl %ecx, %ecx - fxch %st(4) - fstpt 96(%rsp) - fxch %st(2) - fstpt 32(%rsp) - fldt 32(%rsp) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt 176(%rsp) - fsub %st, %st(4) - fxch %st(3) - fdivrp %st, %st(4) - fxch %st(6) - fmulp %st, %st(3) - fld %st(3) - fmul %st(4), %st - fsubrp %st, %st(2) - fdivrp %st, %st(1) - fmul %st(1), %st - fldt 96(%rsp) - fldt 32(%rsp) - jle ..B1.37 -..B1.36: - fxch %st(3) - faddp %st, %st(6) - fldt 48(%rsp) - fadd %st(2), %st - fstpt 48(%rsp) - jmp ..B1.38 -..B1.37: - fxch %st(3) - fsubrp %st, %st(6) - fldt 48(%rsp) - fsub %st(2), %st - fstpt 48(%rsp) -..B1.38: - fldt 128(%rsp) - fadd %st, %st(3) - faddp %st, %st(5) - fldt 144(%rsp) - fadd %st, %st(1) - faddp %st, %st(4) - fld %st(1) - fdiv %st(6), %st - fabs - fldt 80(%rsp) - fcomip %st(1), %st - jbe ..B1.40 -..B1.39: - fstpt 80(%rsp) - movb $1, %al - jmp ..B1.41 -..B1.40: - fstp %st(0) - testb %al, %al - jne ..B1.56 -..B1.41: - fldt (%rsp) - negl %ecx - fucomip %st(6), %st - fxch %st(2) - fxch %st(1) - fxch %st(5) - jne ..B1.35 - jp ..B1.35 -..B1.42: - fstp %st(4) - fstp %st(1) - fstp %st(0) - fstp %st(0) - fldt 64(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) - fstpt 32(%rsp) - fldt 112(%rsp) -..B1.43: - addl %ebx, %ebx - addq $-16, %rsp - .cfi_def_cfa_offset 256 - negl %ebx - lea 16(%rsp), %rdi - decl %ebx - lea 48(%rsp), %rsi - movl %ebx, %edx - fstpt (%rsp) - fldt (%rsp) - fstpt 80(%rsi) -..___tag_value_jn.11: - call __libm_sincos_pi4l@PLT -..___tag_value_jn.12: -..B1.82: - fldt 128(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 240 -..B1.44: - fldt 16(%rsp) - lea _tonpi(%rip), %rax - fldt (%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fldt (%rax) - fdivp %st, %st(3) - fxch %st(2) - fsqrt - fldt 32(%rsp) - fmulp %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fmulp %st, %st(1) -..B1.45: - testl %r14d, %r14d - jl ..B1.47 -..B1.46: - fstpt (%rsp) - jmp ..B1.48 -..B1.47: - fchs - fstpt (%rsp) -..B1.48: - testb %r15b, %r15b - je ..B1.50 -..B1.49: - fldcw 194(%rsp) -..B1.50: - fldt (%rsp) - fstpl 16(%rsp) - movsd 16(%rsp), %xmm0 - addq $208, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 240 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.51: - fstp %st(0) - fld %st(0) - lea (%rbx,%rbx), %esi - movl %esi, 80(%rsp) - lea _val_1_0L(%rip), %rcx - lea _val_2_0L(%rip), %rdi - lea _val_0_0L(%rip), %rax - fmul %st(1), %st - fchs - fstpt 64(%rsp) - fld %st(0) - fxch %st(1) - fstpt 112(%rsp) - fldt (%rax) - fldt (%rcx) - fstpt 32(%rsp) - fldt 32(%rsp) - fld %st(0) - fxch %st(1) - fstpt 16(%rsp) - fildl 80(%rsp) - fstpt (%rsp) - fldt (%rsp) - fldt (%rdi) - fstpt 48(%rsp) - fldt (%rsp) - jmp ..B1.52 -..B1.53: - fstp %st(3) - fxch %st(1) - fxch %st(2) - fxch %st(4) - fxch %st(3) - fxch %st(1) -..B1.52: - fldt 48(%rsp) - faddp %st, %st(1) - fld %st(4) - fmul %st(1), %st - fld %st(2) - fmul %st(2), %st - fldt 64(%rsp) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(2) - fldt 32(%rsp) - fmulp %st, %st(6) - faddp %st, %st(5) - fld %st(0) - fxch %st(1) - fdiv %st(5), %st - fucomi %st(4), %st - fxch %st(3) - fstpt 32(%rsp) - jne ..B1.53 - jp ..B1.53 - jmp ..B1.67 -..B1.55: - movsd (%rsp), %xmm0 - call j0@PLT -..B1.83: - addq $208, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 240 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.56: - fstp %st(4) - fstp %st(3) - fstp %st(0) - fstp %st(0) - fldt 64(%rsp) - fstpt (%rsp) - fxch %st(1) - fstpt 16(%rsp) - fstpt 32(%rsp) - fldt 112(%rsp) - jmp ..B1.43 -..B1.57: - fstp %st(0) - lea _val_36_0L(%rip), %rax - fldt (%rax) - fcomi %st(1), %st - jbe ..B1.61 -..B1.58: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 256 - fstpt (%rsp) - fldt (%rsp) - fstpt 128(%rsp) -..___tag_value_jn.37: - call __j0l@PLT -..___tag_value_jn.38: -..B1.84: - fldt 128(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 240 -..B1.59: - fxch %st(1) - fstpt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 256 - fstpt (%rsp) - fldt (%rsp) - fstpt 128(%rsp) -..___tag_value_jn.41: - call __j1l@PLT -..___tag_value_jn.42: -..B1.85: - fldt 128(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 240 -..B1.60: - fxch %st(1) - jmp ..B1.63 -..B1.61: - lea _ones(%rip), %rax - lea _PP0(%rip), %rcx - lea 16+_PP0(%rip), %r9 - lea _PP1(%rip), %r8 - lea 16+_PP1(%rip), %r10 - lea 32+_PP0(%rip), %r11 - lea 48+_PP1(%rip), %rsi - lea 64+_PP0(%rip), %rdi - fldl (%rax) - lea 32+_PP1(%rip), %rax - fdiv %st(2), %st - movl $-1, %edx - fmul %st, %st(1) - fld %st(1) - fmul %st(2), %st - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(1) - fstpt (%rsp) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt (%rcx) - lea 48+_PP0(%rip), %rcx - fmul %st(2), %st - fldt (%r8) - lea 64+_PP1(%rip), %r8 - fmul %st(3), %st - fldt (%r9) - lea 80+_PP0(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r10) - lea 80+_PP1(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r11) - lea 96+_PP0(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 96+_PP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 112+_PP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 112+_PP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 128+_PP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 128+_PP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 144+_PP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 144+_PP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 256 - lea 112(%rsp), %rdi - lea 96(%rsp), %rsi - fxch %st(3) - fstpt (%rsp) - fldt (%rsp) - fstpt 32(%rsi) - fldt (%rax) - lea _QP0(%rip), %rax - faddp %st, %st(3) - fxch %st(2) - fstpt -32(%rsi) - fldt (%rax) - lea _QP1(%rip), %rax - fmul %st(1), %st - fldt (%rax) - lea 16+_QP0(%rip), %rax - fmul %st(2), %st - fldt (%rax) - lea 16+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 32+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 32+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 48+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 48+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 64+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 64+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 80+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 80+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 96+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 96+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 112+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 112+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 144+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rax) - lea 144+_QP1(%rip), %rax - faddp %st, %st(1) - fmul %st(2), %st - fstpt -48(%rsi) - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -16(%rsi) -..___tag_value_jn.45: - call __libm_sincos_pi4l@PLT -..___tag_value_jn.46: -..B1.86: - fldt 128(%rsp) - fldt 80(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 240 -..B1.62: - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt 80(%rsp) - fldt 16(%rsp) - fmul %st(1), %st - fxch %st(5) - fmulp %st, %st(1) - fldt (%rax) - fmulp %st, %st(2) - fxch %st(1) - fsqrt - fldt 96(%rsp) - fmul %st, %st(3) - fxch %st(3) - fsubrp %st, %st(5) - fmul %st, %st(4) - fxch %st(4) - fstpt 32(%rsp) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) -..B1.63: - lea _val_2_0L(%rip), %rax - cmpl $1, %ebx - fldt (%rax) - movl $0, %eax - fld %st(0) - jle ..B1.91 -..B1.64: - fldt 32(%rsp) - decl %ebx -..B1.65: - fld %st(1) - incl %eax - fdiv %st(5), %st - cmpl %ebx, %eax - fmul %st(4), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(2) - fsubp %st, %st(1) - fld %st(3) - jae ..B1.66 -..B1.92: - fstp %st(4) - fxch %st(3) - jmp ..B1.65 -..B1.66: - fstp %st(5) - fstp %st(4) - fstp %st(0) - fstp %st(0) - fstpt 32(%rsp) - jmp ..B1.45 -..B1.67: - fstp %st(2) - fstp %st(4) - fstp %st(0) - fstp %st(1) - fstp %st(1) - fldt 48(%rsp) - decl %ebx - fldt 16(%rsp) - xorl %eax, %eax - movl %ebx, 80(%rsp) - fld %st(0) - fxch %st(1) - fdiv %st, %st(3) - fildl 80(%rsp) - fmul %st(3), %st - fldt 112(%rsp) - fdivr %st, %st(3) -..B1.68: - fld %st(5) - incl %eax - fmul %st(2), %st - fxch %st(2) - fsub %st(5), %st - fxch %st(1) - fmul %st, %st(3) - cmpl %ebx, %eax - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fld %st(5) - fld %st(1) - jge ..B1.69 -..B1.93: - fstp %st(7) - fstp %st(1) - fxch %st(2) - jmp ..B1.68 -..B1.69: - fstp %st(0) - fstp %st(4) - fstp %st(4) - fstp %st(0) - fxch %st(2) - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(1) - fabs - fxch %st(1) - fabs - fcomip %st(1), %st - fstp %st(0) - fxch %st(1) - fstpt (%rsp) - jae ..B1.72 - jp ..B1.72 -..B1.70: - addq $-16, %rsp - .cfi_def_cfa_offset 256 - fstpt (%rsp) -..___tag_value_jn.49: - call __j1l@PLT -..___tag_value_jn.50: -..B1.87: - addq $16, %rsp - .cfi_def_cfa_offset 240 -..B1.71: - fldt (%rsp) - fdivrp %st, %st(1) - jmp ..B1.45 -..B1.72: - addq $-16, %rsp - .cfi_def_cfa_offset 256 - fstpt (%rsp) -..___tag_value_jn.53: - call __j0l@PLT -..___tag_value_jn.54: -..B1.88: - addq $16, %rsp - .cfi_def_cfa_offset 240 -..B1.73: - fldt 32(%rsp) - fdivrp %st, %st(1) - jmp ..B1.45 -..B1.74: - testl $1048575, 4(%rsp) - jne ..B1.77 -..B1.75: - cmpl $0, (%rsp) - jne ..B1.77 -..B1.76: - movzbl 7(%rsp), %ecx - movl %ebx, %eax - andl $128, %ecx - lea _zeros(%rip), %rdx - shrl $7, %ecx - shrl $31, %eax - xorl %eax, %ecx - andl %ebx, %ecx - movsd (%rdx,%rcx,8), %xmm0 - addq $208, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 240 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.77: - movsd (%rsp), %xmm0 - addq $208, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 240 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.78: - movaps %xmm2, %xmm0 - call j1@PLT -..B1.89: - movaps %xmm0, %xmm1 - testl %r14d, %r14d - xorps .L_2il0floatpacket.1(%rip), %xmm1 - jge ..L78 - movaps %xmm1, %xmm0 -..L78: - addq $208, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 240 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.79: - movzbl 7(%rsp), %ecx - movl %ebx, %eax - andl $128, %ecx - shrl $7, %ecx - shrl $31, %eax - xorl %eax, %ecx - andl %ebx, %ecx - movsd (%rsi,%rcx,8), %xmm0 - addq $208, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 240 - .cfi_offset 3, -32 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.91: - fstp %st(3) - fstp %st(2) - fstp %st(1) - jmp ..B1.45 - .align 16,0x90 - .cfi_endproc - .type jn,@function - .size jn,.-jn - .data -# -- End jn - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -val_0_4: - .byte 0x00,0xd0,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xfd,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type val_0_4,@object - .size val_0_4,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x40add600 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -XZERO: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x33333333,0x3fd33333 - .long 0x66666666,0x3ff66666 - .long 0x00000000,0x400c0000 - .long 0x00000000,0x401c0000 - .long 0x00000000,0x40280000 - .long 0xcccccccd,0x40324ccc - .long 0x00000000,0x403a0000 - .long 0x00000000,0x40418000 - .long 0x9999999a,0x40469999 - .long 0x00000000,0x404c4000 - .long 0x33333333,0x40513333 - .long 0x00000000,0x40548000 - .long 0x00000000,0x40580000 - .long 0x33333333,0x405bb333 - .long 0xcccccccd,0x405f8ccc - .long 0xcccccccd,0x4061cccc - .long 0x33333333,0x4063e333 - .long 0xcccccccd,0x40660ccc - .long 0x33333333,0x40684333 - .long 0xcccccccd,0x406a8ccc - .long 0x33333333,0x406ce333 - .long 0x66666666,0x406f4666 - .long 0x9999999a,0x4070d999 - .long 0x00000000,0x40721800 - .long 0x9999999a,0x40735999 - .long 0x9999999a,0x4074a199 - .long 0x66666666,0x4075ee66 - .long 0x00000000,0x40774000 - .long 0xcccccccd,0x407894cc - .long 0x66666666,0x4079ee66 - .long 0x33333333,0x407b4b33 - .long 0x33333333,0x407cab33 - .long 0x00000000,0x407e1000 - .long 0x66666666,0x407f7666 - .long 0xcccccccd,0x408070cc - .long 0x33333333,0x40812733 - .long 0x33333333,0x4081df33 - .long 0xcccccccd,0x408298cc - .long 0x33333333,0x40835333 - .long 0x33333333,0x40840f33 - .long 0xcccccccd,0x4084cccc - .long 0x66666666,0x40858a66 - .long 0x66666666,0x40864a66 - .long 0x66666666,0x40870a66 - .long 0x00000000,0x4087cc00 - .long 0x66666666,0x40888e66 - .long 0x9999999a,0x40895199 - .long 0x9999999a,0x408a1599 - .long 0x33333333,0x408adb33 - .long 0xcccccccd,0x408ba0cc - .long 0x00000000,0x408c6000 - .long 0x00000000,0x408d2800 - .long 0x00000000,0x408df000 - .long 0x00000000,0x408ec000 - .long 0x00000000,0x408f8800 - .long 0x00000000,0x40902800 - .long 0x00000000,0x40909000 - .long 0x00000000,0x4090f400 - .long 0x00000000,0x40915c00 - .long 0x00000000,0x4091c000 - .long 0x00000000,0x40922800 - .long 0x00000000,0x40929000 - .long 0x00000000,0x4092f800 - .long 0x00000000,0x40935c00 - .long 0x00000000,0x4093c400 - .long 0x00000000,0x40943000 - .long 0x00000000,0x40949800 - .long 0x00000000,0x40950000 - .long 0x00000000,0x40956800 - .long 0x00000000,0x4095d000 - .long 0x00000000,0x40963c00 - .long 0x00000000,0x4096a400 - .long 0x00000000,0x40971000 - .long 0x00000000,0x40977800 - .long 0x00000000,0x4097e400 - .long 0x00000000,0x40984c00 - .long 0x00000000,0x4098b800 - .long 0x00000000,0x40992400 - .long 0x00000000,0x40999000 - .long 0x00000000,0x4099f800 - .long 0x00000000,0x409a6400 - .long 0x00000000,0x409ad000 - .long 0x00000000,0x409b3c00 - .long 0x00000000,0x409ba800 - .long 0x00000000,0x409c1400 - .long 0x00000000,0x409c8000 - .long 0x00000000,0x409cec00 - .long 0x00000000,0x409d5c00 - .long 0x00000000,0x409dc800 - .long 0x00000000,0x409e3400 - .long 0x00000000,0x409ea000 - .long 0x00000000,0x409f1000 - .long 0x00000000,0x409f7c00 - .long 0x00000000,0x409fe800 - .long 0x00000000,0x40a02c00 - .long 0x00000000,0x40a06200 - .long 0x00000000,0x40a09a00 - .long 0x00000000,0x40a0d000 - .long 0x00000000,0x40a10800 - .long 0x00000000,0x40a13e00 - .long 0x00000000,0x40a17600 - .long 0x00000000,0x40a1ae00 - .long 0x00000000,0x40a1e400 - .long 0x00000000,0x40a21c00 - .long 0x00000000,0x40a25400 - .long 0x00000000,0x40a28c00 - .long 0x00000000,0x40a2c200 - .long 0x00000000,0x40a2fa00 - .long 0x00000000,0x40a33200 - .long 0x00000000,0x40a36a00 - .long 0x00000000,0x40a3a200 - .long 0x00000000,0x40a3da00 - .long 0x00000000,0x40a41200 - .long 0x00000000,0x40a44a00 - .long 0x00000000,0x40a48200 - .long 0x00000000,0x40a4ba00 - .long 0x00000000,0x40a4f200 - .long 0x00000000,0x40a52a00 - .long 0x00000000,0x40a56200 - .long 0x00000000,0x40a59a00 - .long 0x00000000,0x40a5d200 - .long 0x00000000,0x40a60a00 - .long 0x00000000,0x40a64400 - .long 0x00000000,0x40a67c00 - .long 0x00000000,0x40a6b400 - .long 0x00000000,0x40a6ec00 - .long 0x00000000,0x40a72600 - .long 0x00000000,0x40a75e00 - .long 0x00000000,0x40a79600 - .long 0x00000000,0x40a7d000 - .long 0x00000000,0x40a80800 - .long 0x00000000,0x40a84000 - .long 0x00000000,0x40a87a00 - .long 0x00000000,0x40a8b200 - .long 0x00000000,0x40a8ec00 - .long 0x00000000,0x40a92400 - .long 0x00000000,0x40a95c00 - .long 0x00000000,0x40a99600 - .long 0x00000000,0x40a9ce00 - .long 0x00000000,0x40aa0800 - .long 0x00000000,0x40aa4200 - .long 0x00000000,0x40aa7a00 - .long 0x00000000,0x40aab400 - .long 0x00000000,0x40aaec00 - .long 0x00000000,0x40ab2600 - .long 0x00000000,0x40ab6000 - .long 0x00000000,0x40ab9800 - .long 0x00000000,0x40abd200 - .long 0x00000000,0x40ac0a00 - .long 0x00000000,0x40ac4400 - .long 0x00000000,0x40ac7e00 - .long 0x00000000,0x40acb800 - .long 0x00000000,0x40acf000 - .long 0x00000000,0x40ad2a00 - .long 0x00000000,0x40ad6400 - .long 0x00000000,0x40ad9e00 - .long 0x00000000,0x40add600 - .type XZERO,@object - .size XZERO,1288 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_val_2_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _val_2_0L,@object - .size _val_2_0L,16 - .align 2 -_val_1_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _val_1_0L,@object - .size _val_1_0L,16 - .align 2 -_val_20_0L: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16387 - .word 0 - .word 0 - .word 0 - .type _val_20_0L,@object - .size _val_20_0L,16 - .align 2 -_val_1000_0L: - .word 0 - .word 0 - .word 0 - .word 64000 - .word 16392 - .word 0 - .word 0 - .word 0 - .type _val_1000_0L,@object - .size _val_1000_0L,16 - .align 2 -_val_4_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16385 - .word 0 - .word 0 - .word 0 - .type _val_4_0L,@object - .size _val_4_0L,16 - .align 2 -_val_8_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16386 - .word 0 - .word 0 - .word 0 - .type _val_8_0L,@object - .size _val_8_0L,16 - .align 2 -_val_3_0L: - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _val_3_0L,@object - .size _val_3_0L,16 - .align 2 -_val_5_0L: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16385 - .word 0 - .word 0 - .word 0 - .type _val_5_0L,@object - .size _val_5_0L,16 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _tonpi,@object - .size _tonpi,16 - .align 2 -_val_0_0L: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _val_0_0L,@object - .size _val_0_0L,16 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,16 - .align 2 -_PP0: - .word 3555 - .word 4199 - .word 61716 - .word 36505 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 21640 - .word 56203 - .word 47336 - .word 57608 - .word 16322 - .word 0 - .word 0 - .word 0 - .word 3059 - .word 27554 - .word 42044 - .word 45622 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 55815 - .word 35656 - .word 54748 - .word 47307 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 42025 - .word 6728 - .word 28939 - .word 34692 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 58943 - .word 11189 - .word 14960 - .word 38786 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 43526 - .word 20005 - .word 29826 - .word 37014 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 58976 - .word 17109 - .word 36079 - .word 36708 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 58243 - .word 36408 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _PP0,@object - .size _PP0,160 - .align 2 -_PP1: - .word 52008 - .word 23245 - .word 2457 - .word 38658 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 61876 - .word 57278 - .word 25234 - .word 61346 - .word 49090 - .word 0 - .word 0 - .word 0 - .word 33834 - .word 23040 - .word 39409 - .word 49003 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 54525 - .word 6554 - .word 40935 - .word 51421 - .word 49100 - .word 0 - .word 0 - .word 0 - .word 9848 - .word 9769 - .word 18248 - .word 38344 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 45790 - .word 60252 - .word 47538 - .word 43957 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 27022 - .word 41654 - .word 23333 - .word 43744 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 12816 - .word 40723 - .word 46387 - .word 47196 - .word 49127 - .word 0 - .word 0 - .word 0 - .word 4849 - .word 19418 - .word 12136 - .word 48545 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _PP1,@object - .size _PP1,160 - .align 2 -_QP0: - .word 30466 - .word 14887 - .word 33885 - .word 35327 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 41139 - .word 65374 - .word 59488 - .word 50915 - .word 49088 - .word 0 - .word 0 - .word 0 - .word 35675 - .word 30946 - .word 22284 - .word 35505 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 65216 - .word 29458 - .word 42913 - .word 63176 - .word 49097 - .word 0 - .word 0 - .word 0 - .word 5130 - .word 24339 - .word 48915 - .word 38634 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 30040 - .word 27658 - .word 23448 - .word 34596 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 37816 - .word 17431 - .word 24401 - .word 49646 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 4377 - .word 35057 - .word 45578 - .word 33037 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 19863 - .word 65266 - .word 6202 - .word 53939 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 49142 - .word 0 - .word 0 - .word 0 - .type _QP0,@object - .size _QP0,160 - .align 2 -_QP1: - .word 65402 - .word 6822 - .word 45128 - .word 37300 - .word 49084 - .word 0 - .word 0 - .word 0 - .word 41532 - .word 52948 - .word 50360 - .word 54021 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 21320 - .word 30785 - .word 26870 - .word 37955 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 55382 - .word 38611 - .word 29746 - .word 34115 - .word 16330 - .word 0 - .word 0 - .word 0 - .word 37194 - .word 6554 - .word 16235 - .word 42314 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 17886 - .word 15840 - .word 33918 - .word 38666 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 62905 - .word 55876 - .word 18072 - .word 57284 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 28423 - .word 64693 - .word 26579 - .word 40379 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 40135 - .word 58793 - .word 24002 - .word 37757 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _QP1,@object - .size _QP1,160 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jnf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jnf.S deleted file mode 100644 index 3638f57366..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jnf.S +++ /dev/null @@ -1,1156 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "jnf.c" - .text -..TXTST0: -# -- Begin jnf - .text - .align 16,0x90 - .globl jnf -jnf: -# parameter 1: %edi -# parameter 2: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_jnf.1: -..L2: - - pushq %r14 - .cfi_def_cfa_offset 16 - .cfi_offset 14, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - subq $72, %rsp - .cfi_def_cfa_offset 96 - movl %edi, %r14d - movd %xmm0, %r15d - movss %xmm0, (%rsp) - movl %r15d, %ecx - andl $2147483647, %ecx - cmpl $2139095040, %ecx - jae ..B1.41 -..B1.2: - testl %r14d, %r14d - je ..B1.40 -..B1.3: - xorl %r14d, %r15d - shrl $31, %r15d - andl %r14d, %r15d - testl %ecx, %ecx - je ..B1.39 -..B1.4: - movl %r14d, %eax - cltd - xorl %edx, %r14d - subl %edx, %r14d - andps .L_2il0floatpacket.1(%rip), %xmm0 - cmpl $1, %r14d - movss %xmm0, (%rsp) - je ..B1.58 -..B1.5: - movl %r14d, %esi - sarl $3, %esi - cmpl $320, %esi - jg ..B1.7 -..B1.6: - movslq %esi, %rsi - lea function_zeros(%rip), %rcx - movss (%rcx,%rsi,4), %xmm2 - jmp ..B1.8 -..B1.7: - pxor %xmm2, %xmm2 - lea -320(%rsi), %ecx - lea -2560(,%rsi,8), %esi - subl %ecx, %esi - cvtsi2ss %esi, %xmm2 - addss .L_2il0floatpacket.0(%rip), %xmm2 -..B1.8: - comiss %xmm0, %xmm2 - ja ..B1.38 -..B1.9: - pxor %xmm1, %xmm1 - pxor %xmm3, %xmm3 - cvtss2sd %xmm0, %xmm1 - cvtsi2sd %r14d, %xmm3 - cmpl $170, %r14d - jg ..B1.22 -..B1.10: - lea _val_0_6(%rip), %rcx - movsd (%rcx), %xmm2 - mulsd %xmm3, %xmm2 - comisd %xmm1, %xmm2 - jb ..B1.22 -..B1.11: - lea _val_2_0(%rip), %rcx - testl %r14d, %r14d - movsd .L_2il0floatpacket.2(%rip), %xmm4 - movaps %xmm4, %xmm3 - movaps %xmm4, %xmm0 - movaps %xmm4, %xmm2 - divsd (%rcx), %xmm1 - movl $0, %ecx - jle ..B1.15 -..B1.13: - incl %ecx - mulsd %xmm1, %xmm0 - cmpl %r14d, %ecx - jb ..B1.13 -..B1.14: - testl %r14d, %r14d -..B1.15: - movl $0, %ecx - jle ..B1.19 -..B1.17: - incl %ecx - mulsd %xmm2, %xmm3 - addsd %xmm4, %xmm2 - cmpl %r14d, %ecx - jb ..B1.17 -..B1.19: - mulsd %xmm1, %xmm1 - lea _TWO_19H(%rip), %rsi - movsd %xmm4, 16(%rsp) - xorl %ecx, %ecx - movsd %xmm4, 56(%rsp) - xorps .L_2il0floatpacket.4(%rip), %xmm1 - movsd (%rsi), %xmm2 - .align 16,0x90 -..B1.20: - incl %ecx - incl %r14d - movl %ecx, %esi - movaps %xmm4, %xmm8 - imull %r14d, %esi - pxor %xmm4, %xmm4 - movsd 16(%rsp), %xmm5 - movaps %xmm2, %xmm7 - movsd 56(%rsp), %xmm6 - mulsd %xmm1, %xmm5 - cvtsi2sd %esi, %xmm4 - divsd %xmm4, %xmm5 - movsd %xmm5, 16(%rsp) - addsd %xmm5, %xmm6 - mulsd %xmm6, %xmm7 - movsd %xmm6, 56(%rsp) - addsd %xmm7, %xmm6 - movsd %xmm6, 64(%rsp) - movsd 64(%rsp), %xmm4 - subsd %xmm7, %xmm4 - ucomisd %xmm4, %xmm8 - jne ..B1.20 - jp ..B1.20 -..B1.21: - mulsd 56(%rsp), %xmm0 - divsd %xmm3, %xmm0 - jmp ..B1.34 -..B1.22: - comisd %xmm1, %xmm3 - ja ..B1.35 -..B1.23: - pxor %xmm2, %xmm2 - lea (%r14,%r14,4), %ecx - lea 1000(,%rcx,4), %esi - cvtsi2sd %esi, %xmm2 - comisd %xmm1, %xmm2 - ja ..B1.47 -..B1.24: - lea _val_4_0(%rip), %rcx - movaps %xmm3, %xmm10 - lea _val_8_0(%rip), %rdi - lea _val_2_0(%rip), %r8 - movsd .L_2il0floatpacket.2(%rip), %xmm12 - lea _val_3_0(%rip), %r9 - lea _val_5_0(%rip), %r10 - movl $-1, %esi - movsd (%rcx), %xmm11 - movaps %xmm12, %xmm2 - movsd (%rdi), %xmm8 - movaps %xmm12, %xmm9 - movsd (%r8), %xmm7 - xorb %cl, %cl - mulsd %xmm11, %xmm10 - movaps %xmm7, %xmm6 - mulsd %xmm1, %xmm8 - mulsd %xmm3, %xmm10 - movaps %xmm10, %xmm13 - movsd (%r9), %xmm5 - subsd %xmm12, %xmm13 - divsd %xmm8, %xmm13 - movsd %xmm13, 16(%rsp) - movaps %xmm5, %xmm4 - movsd (%r10), %xmm3 -..B1.25: - movaps %xmm4, %xmm14 - movaps %xmm6, %xmm15 - mulsd %xmm4, %xmm14 - testl %esi, %esi - mulsd %xmm8, %xmm15 - movsd %xmm2, 56(%rsp) - movaps %xmm10, %xmm2 - subsd %xmm14, %xmm2 - movaps %xmm3, %xmm14 - mulsd %xmm3, %xmm14 - divsd %xmm15, %xmm2 - movaps %xmm10, %xmm15 - mulsd 16(%rsp), %xmm2 - subsd %xmm14, %xmm15 - movaps %xmm8, %xmm14 - mulsd %xmm5, %xmm14 - divsd %xmm14, %xmm15 - mulsd %xmm2, %xmm15 - jle ..B1.46 -..B1.26: - addsd %xmm2, %xmm12 - addsd %xmm15, %xmm13 -..B1.27: - movsd %xmm15, 16(%rsp) - addsd %xmm7, %xmm6 - divsd %xmm12, %xmm15 - andps .L_2il0floatpacket.3(%rip), %xmm15 - addsd %xmm7, %xmm5 - addsd %xmm11, %xmm4 - addsd %xmm11, %xmm3 - comisd %xmm15, %xmm9 - jbe ..B1.29 -..B1.28: - movaps %xmm15, %xmm9 - movb $1, %cl - jmp ..B1.30 -..B1.29: - testb %cl, %cl - jne ..B1.32 -..B1.30: - lea _TWO_19H(%rip), %rdi - movaps %xmm12, %xmm2 - negl %esi - movsd (%rdi), %xmm14 - mulsd %xmm12, %xmm14 - addsd %xmm14, %xmm2 - movsd %xmm2, 64(%rsp) - movsd 64(%rsp), %xmm2 - subsd %xmm14, %xmm2 - ucomisd 56(%rsp), %xmm2 - jne ..B1.25 - jp ..B1.25 -..B1.32: - addl %r14d, %r14d - lea 56(%rsp), %rdi - negl %r14d - lea 16(%rsp), %rsi - decl %r14d - movaps %xmm1, %xmm0 - movl %r14d, %edx - movsd %xmm13, (%rsp) - movsd %xmm12, -8(%rsi) - movsd %xmm1, 32(%rsi) -..___tag_value_jnf.8: - call __libm_sincos_k32@PLT -..___tag_value_jnf.9: -..B1.33: - lea _tonpi(%rip), %rax - movsd 48(%rsp), %xmm1 - movsd 8(%rsp), %xmm12 - movsd (%rsp), %xmm13 - movsd (%rax), %xmm0 - divsd %xmm1, %xmm0 - sqrtsd %xmm0, %xmm0 - mulsd 16(%rsp), %xmm12 - mulsd 56(%rsp), %xmm13 - subsd %xmm13, %xmm12 - mulsd %xmm12, %xmm0 -..B1.34: - movaps %xmm0, %xmm1 - testl %r15d, %r15d - xorps .L_2il0floatpacket.4(%rip), %xmm1 - jne ..L10 - movaps %xmm0, %xmm1 -..L10: - cvtsd2ss %xmm1, %xmm1 - movaps %xmm1, %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.35: - pxor %xmm8, %xmm8 - lea (%r14,%r14), %esi - cvtsi2sd %esi, %xmm8 - movaps %xmm1, %xmm7 - xorl %ecx, %ecx - mulsd %xmm1, %xmm7 - lea _val_2_0(%rip), %rdi - lea _TWO_19H(%rip), %r8 - pxor %xmm11, %xmm11 - movsd .L_2il0floatpacket.2(%rip), %xmm3 - movaps %xmm1, %xmm9 - movq %rcx, 56(%rsp) - movaps %xmm3, %xmm10 - xorps .L_2il0floatpacket.4(%rip), %xmm7 - movaps %xmm8, %xmm6 - movsd %xmm3, 16(%rsp) - movsd (%rdi), %xmm4 - movsd (%r8), %xmm5 - jmp ..B1.36 -..B1.37: - movsd %xmm12, 56(%rsp) - movsd %xmm12, 16(%rsp) -..B1.36: - movaps %xmm9, %xmm2 - movaps %xmm8, %xmm12 - mulsd %xmm7, %xmm11 - addsd %xmm4, %xmm6 - mulsd %xmm7, %xmm10 - mulsd %xmm6, %xmm2 - mulsd %xmm6, %xmm12 - addsd %xmm11, %xmm2 - addsd %xmm10, %xmm12 - movaps %xmm9, %xmm11 - movaps %xmm2, %xmm9 - divsd %xmm12, %xmm2 - movaps %xmm5, %xmm14 - movaps %xmm8, %xmm10 - mulsd %xmm2, %xmm14 - movaps %xmm12, %xmm8 - movaps %xmm14, %xmm13 - movsd 16(%rsp), %xmm15 - addsd %xmm2, %xmm13 - movsd %xmm13, 64(%rsp) - movsd 64(%rsp), %xmm12 - subsd %xmm14, %xmm12 - ucomisd %xmm12, %xmm15 - jne ..B1.37 - jp ..B1.37 - jmp ..B1.55 -..B1.38: - pxor %xmm0, %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.39: - lea _zeros(%rip), %rax - movss (%rax,%r15,4), %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.40: - movss (%rsp), %xmm0 - call j0f@PLT -..B1.61: - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.41: - ja ..B1.43 -..B1.42: - lea _zeros(%rip), %rax - xorl %r14d, %r15d - shrl $31, %r15d - andl %r14d, %r15d - movss (%rax,%r15,4), %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.43: - movss (%rsp), %xmm0 -..B1.44: - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 14, -16 - .cfi_offset 15, -24 -..B1.46: - subsd %xmm2, %xmm12 - subsd %xmm15, %xmm13 - jmp ..B1.27 -..B1.47: - lea _val_17_0(%rip), %rcx - movsd (%rcx), %xmm2 - comisd %xmm1, %xmm2 - jbe ..B1.49 -..B1.48: - movaps %xmm1, %xmm0 - movsd %xmm1, 48(%rsp) - call j0@PLT -..B1.63: - movsd 48(%rsp), %xmm1 - movaps %xmm0, %xmm2 - movaps %xmm1, %xmm0 - movsd %xmm2, (%rsp) - call j1@PLT -..B1.62: - movsd 48(%rsp), %xmm1 - movsd (%rsp), %xmm2 - jmp ..B1.51 -..B1.49: - movsd .L_2il0floatpacket.2(%rip), %xmm2 - lea _val_16_0(%rip), %rcx - divsd %xmm1, %xmm2 - movsd (%rcx), %xmm8 - movaps %xmm1, %xmm0 - mulsd %xmm2, %xmm8 - lea (%rsp), %rdi - movaps %xmm8, %xmm6 - lea 8(%rsp), %rsi - mulsd %xmm8, %xmm6 - movl $-1, %edx - movaps %xmm6, %xmm7 - mulsd %xmm6, %xmm7 - movq $0, 48(%rsi) - movsd %xmm2, 8(%rsi) - movsd %xmm6, 16(%rsi) - movsd %xmm7, 24(%rsi) - movsd %xmm8, 32(%rsi) - movsd %xmm1, 40(%rsi) -..___tag_value_jnf.59: - call __libm_sincos_k32@PLT -..___tag_value_jnf.60: -..B1.50: - lea 40+_PP1(%rip), %r11 - lea 40+_PP0(%rip), %rcx - movsd 32(%rsp), %xmm7 - lea 24+_PP0(%rip), %rsi - lea 8+_PP0(%rip), %rdi - lea 32+_PP0(%rip), %r8 - movsd 24(%rsp), %xmm6 - lea 16+_PP0(%rip), %r9 - movsd (%r11), %xmm10 - lea _PP0(%rip), %r10 - movsd (%rcx), %xmm2 - lea 24+_PP1(%rip), %rcx - movsd (%r8), %xmm3 - movsd 40(%rsp), %xmm8 - mulsd %xmm7, %xmm10 - mulsd %xmm7, %xmm2 - mulsd %xmm7, %xmm3 - addsd (%rcx), %xmm10 - addsd (%rsi), %xmm2 - addsd (%r9), %xmm3 - mulsd %xmm7, %xmm10 - mulsd %xmm7, %xmm2 - mulsd %xmm7, %xmm3 - addsd (%rdi), %xmm2 - addsd (%r10), %xmm3 - mulsd %xmm6, %xmm2 - lea 8+_PP1(%rip), %rcx - addsd %xmm3, %xmm2 - addsd (%rcx), %xmm10 - lea 32+_PP1(%rip), %rcx - mulsd %xmm6, %xmm10 - movsd (%rcx), %xmm4 - lea 16+_PP1(%rip), %rcx - mulsd %xmm7, %xmm4 - movsd 48(%rsp), %xmm1 - addsd (%rcx), %xmm4 - lea _PP1(%rip), %rcx - mulsd %xmm7, %xmm4 - addsd (%rcx), %xmm4 - lea 40+_QP0(%rip), %rcx - movsd (%rcx), %xmm9 - lea 24+_QP0(%rip), %rcx - mulsd %xmm7, %xmm9 - addsd %xmm4, %xmm10 - addsd (%rcx), %xmm9 - lea 8+_QP0(%rip), %rcx - mulsd %xmm7, %xmm9 - addsd (%rcx), %xmm9 - lea 32+_QP0(%rip), %rcx - movsd (%rcx), %xmm5 - lea 16+_QP0(%rip), %rcx - mulsd %xmm7, %xmm5 - mulsd %xmm6, %xmm9 - addsd (%rcx), %xmm5 - mulsd %xmm8, %xmm9 - mulsd %xmm7, %xmm5 - lea _QP0(%rip), %rcx - addsd (%rcx), %xmm5 - lea 40+_QP1(%rip), %rcx - movsd (%rcx), %xmm11 - lea 24+_QP1(%rip), %rcx - mulsd %xmm7, %xmm11 - mulsd %xmm8, %xmm5 - addsd (%rcx), %xmm11 - addsd %xmm5, %xmm9 - mulsd %xmm7, %xmm11 - lea 8+_QP1(%rip), %rcx - addsd (%rcx), %xmm11 - lea 32+_QP1(%rip), %rcx - mulsd %xmm6, %xmm11 - movsd (%rcx), %xmm6 - lea 16+_QP1(%rip), %rcx - mulsd %xmm7, %xmm6 - mulsd %xmm8, %xmm11 - addsd (%rcx), %xmm6 - mulsd %xmm7, %xmm6 - lea _QP1(%rip), %rcx - movsd 8(%rsp), %xmm7 - mulsd %xmm7, %xmm2 - addsd (%rcx), %xmm6 - lea _tonpi(%rip), %rcx - mulsd %xmm8, %xmm6 - movsd (%rcx), %xmm0 - addsd %xmm6, %xmm11 - mulsd 16(%rsp), %xmm0 - mulsd %xmm11, %xmm7 - sqrtsd %xmm0, %xmm0 - movsd (%rsp), %xmm8 - mulsd %xmm8, %xmm9 - mulsd %xmm10, %xmm8 - subsd %xmm9, %xmm2 - addsd %xmm7, %xmm8 - mulsd %xmm0, %xmm2 - mulsd %xmm8, %xmm0 -..B1.51: - lea _val_2_0(%rip), %rcx - cmpl $1, %r14d - movsd (%rcx), %xmm3 - movl $0, %ecx - divsd %xmm1, %xmm3 - jle ..B1.34 -..B1.52: - decl %r14d -..B1.53: - incl %ecx - pxor %xmm1, %xmm1 - cvtsi2sd %ecx, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm0, %xmm4 - mulsd %xmm0, %xmm1 - cmpl %r14d, %ecx - movaps %xmm1, %xmm0 - subsd %xmm2, %xmm0 - movaps %xmm4, %xmm2 - jb ..B1.53 - jmp ..B1.34 -..B1.55: - movaps %xmm3, %xmm6 - lea -2(%r14,%r14), %ecx - divsd %xmm2, %xmm6 - pxor %xmm5, %xmm5 - movaps %xmm3, %xmm2 - cvtsi2sd %ecx, %xmm5 - divsd %xmm1, %xmm2 - xorl %ecx, %ecx - decl %r14d -..B1.56: - movaps %xmm6, %xmm7 - incl %ecx - mulsd %xmm5, %xmm7 - subsd %xmm4, %xmm5 - mulsd %xmm1, %xmm3 - cmpl %r14d, %ecx - subsd %xmm3, %xmm7 - mulsd %xmm2, %xmm7 - movaps %xmm6, %xmm3 - movaps %xmm7, %xmm6 - jl ..B1.56 -..B1.57: - movaps %xmm1, %xmm0 - movsd %xmm7, (%rsp) - call j0@PLT -..B1.64: - divsd (%rsp), %xmm0 - jmp ..B1.34 -..B1.58: - call j1f@PLT -..B1.65: - movaps %xmm0, %xmm1 - testl %r15d, %r15d - xorps .L_2il0floatpacket.5(%rip), %xmm1 - je ..L61 - movaps %xmm1, %xmm0 -..L61: - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type jnf,@function - .size jnf,.-jnf - .data -# -- End jnf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x7fffffff,0x00000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.3: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -.L_2il0floatpacket.5: - .long 0x80000000,0x00000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x450ea000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -function_zeros: - .long 0x00000000 - .long 0x00000000 - .long 0x00000000 - .long 0x00000000 - .long 0x00000000 - .long 0x3f000000 - .long 0x3fcccccd - .long 0x40600000 - .long 0x40c33333 - .long 0x4111999a - .long 0x414b3333 - .long 0x4184cccd - .long 0x41a66666 - .long 0x41ca6666 - .long 0x41f0cccd - .long 0x420c0000 - .long 0x42206666 - .long 0x4235999a - .long 0x424b3333 - .long 0x42613333 - .long 0x42780000 - .long 0x42876666 - .long 0x42930000 - .long 0x429ecccd - .long 0x42aacccd - .long 0x42b6cccd - .long 0x42c30000 - .long 0x42cf6666 - .long 0x42dbcccd - .long 0x42e86666 - .long 0x42f50000 - .long 0x4300e666 - .long 0x43074ccd - .long 0x430db333 - .long 0x43143333 - .long 0x431ab333 - .long 0x43214ccd - .long 0x4327e666 - .long 0x432e8000 - .long 0x4335199a - .long 0x433bcccd - .long 0x43428000 - .long 0x43493333 - .long 0x43500000 - .long 0x43560000 - .long 0x435d0000 - .long 0x43640000 - .long 0x436b0000 - .long 0x43720000 - .long 0x43780000 - .long 0x437f0000 - .long 0x43830000 - .long 0x43868000 - .long 0x438a0000 - .long 0x438d8000 - .long 0x43910000 - .long 0x43948000 - .long 0x43980000 - .long 0x439b8000 - .long 0x439f0000 - .long 0x43a28000 - .long 0x43a60000 - .long 0x43a98000 - .long 0x43ad0000 - .long 0x43b08000 - .long 0x43b40000 - .long 0x43b78000 - .long 0x43bb0000 - .long 0x43bf0000 - .long 0x43c28000 - .long 0x43c60000 - .long 0x43c98000 - .long 0x43cd0000 - .long 0x43d08000 - .long 0x43d40000 - .long 0x43d80000 - .long 0x43db8000 - .long 0x43df0000 - .long 0x43e28000 - .long 0x43e60000 - .long 0x43ea0000 - .long 0x43ed8000 - .long 0x43f10000 - .long 0x43f48000 - .long 0x43f88000 - .long 0x43fc0000 - .long 0x43ff8000 - .long 0x44018000 - .long 0x44038000 - .long 0x44054000 - .long 0x44070000 - .long 0x44090000 - .long 0x440ac000 - .long 0x440c8000 - .long 0x440e4000 - .long 0x44104000 - .long 0x44120000 - .long 0x4413c000 - .long 0x4415c000 - .long 0x44178000 - .long 0x44194000 - .long 0x441b4000 - .long 0x441d0000 - .long 0x441ec000 - .long 0x4420c000 - .long 0x44228000 - .long 0x44244000 - .long 0x44264000 - .long 0x44280000 - .long 0x442a0000 - .long 0x442bc000 - .long 0x442d8000 - .long 0x442f8000 - .long 0x44314000 - .long 0x44334000 - .long 0x44350000 - .long 0x4436c000 - .long 0x4438c000 - .long 0x443a8000 - .long 0x443c8000 - .long 0x443e4000 - .long 0x44400000 - .long 0x44420000 - .long 0x4443c000 - .long 0x4445c000 - .long 0x44478000 - .long 0x44498000 - .long 0x444b4000 - .long 0x444d0000 - .long 0x444f0000 - .long 0x4450c000 - .long 0x4452c000 - .long 0x44548000 - .long 0x44568000 - .long 0x44584000 - .long 0x445a4000 - .long 0x445c0000 - .long 0x445e0000 - .long 0x445fc000 - .long 0x4461c000 - .long 0x44638000 - .long 0x44658000 - .long 0x44674000 - .long 0x44694000 - .long 0x446b0000 - .long 0x446cc000 - .long 0x446ec000 - .long 0x44708000 - .long 0x44728000 - .long 0x44744000 - .long 0x44764000 - .long 0x44784000 - .long 0x447a0000 - .long 0x447c0000 - .long 0x447dc000 - .long 0x447fc000 - .long 0x4480c000 - .long 0x4481c000 - .long 0x4482a000 - .long 0x4483a000 - .long 0x44848000 - .long 0x44858000 - .long 0x44866000 - .long 0x44876000 - .long 0x44884000 - .long 0x44894000 - .long 0x448a2000 - .long 0x448b2000 - .long 0x448c0000 - .long 0x448d0000 - .long 0x448e0000 - .long 0x448ee000 - .long 0x448fe000 - .long 0x4490c000 - .long 0x4491c000 - .long 0x4492a000 - .long 0x4493a000 - .long 0x44948000 - .long 0x44958000 - .long 0x44968000 - .long 0x44976000 - .long 0x44986000 - .long 0x44994000 - .long 0x449a4000 - .long 0x449b2000 - .long 0x449c2000 - .long 0x449d2000 - .long 0x449e0000 - .long 0x449f0000 - .long 0x449fe000 - .long 0x44a0e000 - .long 0x44a1c000 - .long 0x44a2c000 - .long 0x44a3c000 - .long 0x44a4a000 - .long 0x44a5a000 - .long 0x44a68000 - .long 0x44a78000 - .long 0x44a88000 - .long 0x44a96000 - .long 0x44aa6000 - .long 0x44ab4000 - .long 0x44ac4000 - .long 0x44ad4000 - .long 0x44ae2000 - .long 0x44af2000 - .long 0x44b00000 - .long 0x44b10000 - .long 0x44b20000 - .long 0x44b2e000 - .long 0x44b3e000 - .long 0x44b4c000 - .long 0x44b5c000 - .long 0x44b6c000 - .long 0x44b7a000 - .long 0x44b8a000 - .long 0x44b9a000 - .long 0x44ba8000 - .long 0x44bb8000 - .long 0x44bc6000 - .long 0x44bd6000 - .long 0x44be6000 - .long 0x44bf4000 - .long 0x44c04000 - .long 0x44c14000 - .long 0x44c22000 - .long 0x44c32000 - .long 0x44c40000 - .long 0x44c50000 - .long 0x44c60000 - .long 0x44c6e000 - .long 0x44c7e000 - .long 0x44c8e000 - .long 0x44c9c000 - .long 0x44cac000 - .long 0x44cba000 - .long 0x44cca000 - .long 0x44cda000 - .long 0x44ce8000 - .long 0x44cf8000 - .long 0x44d08000 - .long 0x44d16000 - .long 0x44d26000 - .long 0x44d36000 - .long 0x44d44000 - .long 0x44d54000 - .long 0x44d64000 - .long 0x44d72000 - .long 0x44d82000 - .long 0x44d92000 - .long 0x44da0000 - .long 0x44db0000 - .long 0x44dc0000 - .long 0x44dce000 - .long 0x44dde000 - .long 0x44dec000 - .long 0x44dfc000 - .long 0x44e0c000 - .long 0x44e1a000 - .long 0x44e2a000 - .long 0x44e3a000 - .long 0x44e48000 - .long 0x44e58000 - .long 0x44e68000 - .long 0x44e76000 - .long 0x44e86000 - .long 0x44e96000 - .long 0x44ea4000 - .long 0x44eb4000 - .long 0x44ec4000 - .long 0x44ed4000 - .long 0x44ee2000 - .long 0x44ef2000 - .long 0x44f02000 - .long 0x44f10000 - .long 0x44f20000 - .long 0x44f30000 - .long 0x44f3e000 - .long 0x44f4e000 - .long 0x44f5e000 - .long 0x44f6c000 - .long 0x44f7c000 - .long 0x44f8c000 - .long 0x44f9a000 - .long 0x44faa000 - .long 0x44fba000 - .long 0x44fc8000 - .long 0x44fd8000 - .long 0x44fe8000 - .long 0x44ff6000 - .long 0x45003000 - .long 0x4500b000 - .long 0x45013000 - .long 0x4501a000 - .long 0x45022000 - .long 0x4502a000 - .long 0x45031000 - .long 0x45039000 - .long 0x45041000 - .long 0x45048000 - .long 0x45050000 - .long 0x45058000 - .long 0x4505f000 - .long 0x45067000 - .long 0x4506f000 - .long 0x45077000 - .long 0x4507e000 - .long 0x45086000 - .long 0x4508e000 - .long 0x45095000 - .long 0x4509d000 - .long 0x450a5000 - .long 0x450ac000 - .long 0x450b4000 - .long 0x450bc000 - .long 0x450c4000 - .long 0x450cb000 - .long 0x450d3000 - .long 0x450db000 - .long 0x450e2000 - .long 0x450ea000 - .type function_zeros,@object - .size function_zeros,1284 - .align 4 -_val_0_6: - .long 858993459 - .long 1071854387 - .type _val_0_6,@object - .size _val_0_6,8 - .align 4 -_val_2_0: - .long 0 - .long 1073741824 - .type _val_2_0,@object - .size _val_2_0,8 - .align 4 -_TWO_19H: - .long 0 - .long 1093140480 - .type _TWO_19H,@object - .size _TWO_19H,8 - .align 4 -_val_4_0: - .long 0 - .long 1074790400 - .type _val_4_0,@object - .size _val_4_0,8 - .align 4 -_val_8_0: - .long 0 - .long 1075838976 - .type _val_8_0,@object - .size _val_8_0,8 - .align 4 -_val_3_0: - .long 0 - .long 1074266112 - .type _val_3_0,@object - .size _val_3_0,8 - .align 4 -_val_5_0: - .long 0 - .long 1075052544 - .type _val_5_0,@object - .size _val_5_0,8 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .align 4 -_val_17_0: - .long 0 - .long 1076953088 - .type _val_17_0,@object - .size _val_17_0,8 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_PP1: - .long 551 - .long 1072693248 - .long 4267608614 - .long 1061027839 - .long 3690881252 - .long 3200414971 - .long 3933039373 - .long 1046848465 - .long 3246008603 - .long 3189439465 - .long 1689113401 - .long 1037483563 - .type _PP1,@object - .size _PP1,48 - .align 4 -_PP0: - .long 4294966288 - .long 1072693247 - .long 4269912424 - .long 3207725055 - .long 1780799603 - .long 1052554744 - .long 2285933488 - .long 3194113879 - .long 3892950982 - .long 1041746526 - .long 150212775 - .long 3184818833 - .type _PP0,@object - .size _PP0,48 - .align 4 -_QP0: - .long 4294921804 - .long 3212836863 - .long 4153409851 - .long 1056096255 - .long 2226361937 - .long 3196916170 - .long 3849695089 - .long 1044094312 - .long 663042994 - .long 3187124278 - .long 3336948587 - .long 1035486718 - .type _QP0,@object - .size _QP0,48 - .align 4 -_QP1: - .long 4294954956 - .long 1066926079 - .long 4141388976 - .long 3204071423 - .long 1500123100 - .long 1049740228 - .long 3264213437 - .long 3191856517 - .long 1489731078 - .long 1039824630 - .long 1807021260 - .long 3183130166 - .type _QP1,@object - .size _QP1,48 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jnl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jnl.S deleted file mode 100644 index 57e13b0eec..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/jnl.S +++ /dev/null @@ -1,95 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "jnl.c" - .text -..TXTST0: -# -- Begin jnl - .text - .align 16,0x90 - .globl jnl -jnl: -# parameter 1: %edi -# parameter 2: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_jnl.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - .cfi_offset 6, -16 - subq $16, %rsp - .cfi_def_cfa_offset 32 - movl %edi, %ebp - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 48 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B1.6: - addq $16, %rsp - .cfi_def_cfa_offset 32 - movl %ebp, %edi - movaps (%rsp), %xmm0 -..___tag_value_jnl.8: - call __jnq@PLT -..___tag_value_jnl.9: -..B1.2: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B1.7: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type jnl,@function - .size jnl,.-jnl - .data -# -- End jnl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/l2q.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/l2q.S deleted file mode 100644 index a238bae0f1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/l2q.S +++ /dev/null @@ -1,106 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "l2q.c" - .text -..TXTST0: -# -- Begin __ltoq - .text - .align 16,0x90 - .globl __ltoq -__ltoq: -# parameter 1: %rdi -# parameter 2: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value___ltoq.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..B1.2: - fnstcw 16(%rsp) -..B1.3: - movzwl 16(%rsp), %eax - orl $-64768, %eax - movw %ax, 18(%rsp) -..B1.4: - fldcw 18(%rsp) -..B1.5: - fldt 32(%rsp) - lea __l_one(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.6: - fldcw 16(%rsp) -..B1.7: - movq (%rsp), %rsi - movq %rsi, %rax - shrq $15, %rsi - movq $0xffffffffffff, %rdx - movl 8(%rsp), %ecx - andq %rdx, %rsi - shlq $48, %rcx - shlq $49, %rax - orq %rcx, %rsi - movq %rax, (%rdi) - movq %rsi, 8(%rdi) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __ltoq,@function - .size __ltoq,.-__ltoq - .data -# -- End __ltoq - .section .rodata, "a" - .align 4 - .align 4 -__l_one: - .long 0 - .long 2147483648 - .long 16383 - .type __l_one,@object - .size __l_one,12 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexp_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexp_gen.S deleted file mode 100644 index 2be804be25..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexp_gen.S +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ldexp_gen.c" - .text -..TXTST0: -# -- Begin ldexp - .text - .align 16,0x90 - .globl ldexp -ldexp: -# parameter 1: %xmm0 -# parameter 2: %edi -..B1.1: - .cfi_startproc -..___tag_value_ldexp.1: -..L2: - - movsd %xmm0, -8(%rsp) - movzwl -2(%rsp), %esi - movl %esi, %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $2047, %ecx - je ..B1.17 -..B1.2: - xorb %r8b, %r8b - testl %ecx, %ecx - jne ..B1.7 -..B1.3: - testl $1048575, -4(%rsp) - jne ..B1.6 -..B1.4: - cmpl $0, -8(%rsp) - jne ..B1.6 -..B1.5: - movsd -8(%rsp), %xmm0 - ret -..B1.6: - lea _TWO_55(%rip), %rax - movb $1, %r8b - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) - movzwl -2(%rsp), %esi - movl %esi, %ecx - andl $32752, %ecx - shrl $4, %ecx - addl $-55, %ecx -..B1.7: - movl $65536, %eax - cmpl $65536, %edi - cmovg %eax, %edi - movl $-65536, %edx - cmpl $-65536, %edi - cmovle %edx, %edi - lea (%rcx,%rdi), %eax - testl %eax, %eax - jle ..B1.12 -..B1.8: - cmpl $2047, %eax - jge ..B1.11 -..B1.9: - andl $2047, %eax - andl $-32753, %esi - shll $4, %eax - orl %eax, %esi - movw %si, -2(%rsp) - movsd -8(%rsp), %xmm0 -..B1.10: - ret -..B1.11: - movb -1(%rsp), %al - lea _large_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.12: - cmpl $-52, %eax - jl ..B1.16 -..B1.13: - lea 8+_TWO_55(%rip), %rdx - lea 55(%rcx,%rdi), %eax - andl $2047, %eax - andl $-32753, %esi - shll $4, %eax - orl %eax, %esi - movw %si, -2(%rsp) - testb %r8b, %r8b - movsd -8(%rsp), %xmm0 - mulsd (%rdx), %xmm0 - je ..B1.15 -..B1.14: - testl %edi, %edi - jl ..B1.10 -..B1.15: - ret -..B1.16: - movb -1(%rsp), %al - lea _small_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.17: - lea _ones(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type ldexp,@function - .size ldexp,.-ldexp - .data -# -- End ldexp - .section .rodata, "a" - .align 4 - .align 4 -_TWO_55: - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .type _TWO_55,@object - .size _TWO_55,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexpf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexpf.S deleted file mode 100644 index cc0d200317..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexpf.S +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ldexpf.c" - .text -..TXTST0: -# -- Begin ldexpf - .text - .align 16,0x90 - .globl ldexpf -ldexpf: -# parameter 1: %xmm0 -# parameter 2: %edi -..B1.1: - .cfi_startproc -..___tag_value_ldexpf.1: -..L2: - - movl %edi, %r8d - movss %xmm0, -8(%rsp) - movzwl -6(%rsp), %eax - movl %eax, %esi - andl $32640, %esi - shrl $7, %esi - cmpl $255, %esi - je ..B1.9 -..B1.2: - xorb %dil, %dil - testl %esi, %esi - jne ..B1.5 -..B1.3: - testl $8388607, -8(%rsp) - je ..B1.9 -..B1.4: - movss -8(%rsp), %xmm0 - movb $1, %dil - mulss .L_2il0floatpacket.0(%rip), %xmm0 - movss %xmm0, -8(%rsp) - movzwl -6(%rsp), %eax - movl %eax, %esi - andl $32640, %esi - shrl $7, %esi - addl $-25, %esi -..B1.5: - movl $65536, %edx - cmpl $65536, %r8d - cmovg %edx, %r8d - movl $-65536, %ecx - cmpl $-65536, %r8d - cmovle %ecx, %r8d - lea (%rsi,%r8), %edx - testl %edx, %edx - jle ..B1.11 -..B1.6: - cmpl $255, %edx - jge ..B1.10 -..B1.7: - movzbl %dl, %edx - andl $-32641, %eax - shll $7, %edx - orl %edx, %eax - movw %ax, -6(%rsp) - movss -8(%rsp), %xmm0 -..B1.8: - ret -..B1.9: - movss -8(%rsp), %xmm0 - ret -..B1.10: - movb -5(%rsp), %al - lea _large_value_32(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - ret -..B1.11: - cmpl $-23, %edx - jl ..B1.15 -..B1.12: - andl $-32641, %eax - lea 25(%rsi,%r8), %edx - movzbl %dl, %edx - shll $7, %edx - orl %edx, %eax - movw %ax, -6(%rsp) - testb %dil, %dil - movss -8(%rsp), %xmm0 - mulss .L_2il0floatpacket.3(%rip), %xmm0 - je ..B1.14 -..B1.13: - testl %r8d, %r8d - jl ..B1.8 -..B1.14: - ret -..B1.15: - movb -5(%rsp), %al - lea _small_value_32(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.2(%rip), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type ldexpf,@function - .size ldexpf,.-ldexpf - .data -# -- End ldexpf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x0d800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x33000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexpl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexpl.S deleted file mode 100644 index 60cbda83a4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ldexpl.S +++ /dev/null @@ -1,321 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ldexpl.c" - .text -..TXTST0: -# -- Begin ldexpl - .text - .align 16,0x90 - .globl ldexpl -ldexpl: -# parameter 1: 32 + %rsp -# parameter 2: %edi -..B1.1: - .cfi_startproc -..___tag_value_ldexpl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movzwl 40(%rsp), %r8d - movl %r8d, %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.39 -..B1.4: - testl %esi, %esi - jne ..B1.12 -..B1.5: - cmpq $0, 32(%rsp) - je ..B1.15 -..B1.6: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.7: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.8: - fldcw 16(%rsp) -..B1.9: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) -..B1.10: - fldcw 18(%rsp) -..B1.11: - movzwl 40(%rsp), %r8d - movl %r8d, %esi - andl $32767, %esi - addl $-75, %esi -..B1.12: - movl $65536, %edx - cmpl $65536, %edi - cmovg %edx, %edi - movl $-65536, %ecx - xorb %al, %al - cmpl $-65536, %edi - cmovle %ecx, %edi - lea (%rsi,%rdi), %edx - testl %edx, %edx - jle ..B1.23 -..B1.13: - cmpl $32767, %edx - jge ..B1.16 -..B1.14: - andl $-32768, %r8d - andl $32767, %edx - orl %edx, %r8d - movw %r8w, 40(%rsp) - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.15: - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.16: - movzwl 18(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.20 -..B1.17: - orl $-64768, %ecx - movw %cx, 16(%rsp) -..B1.18: - fldcw 16(%rsp) -..B1.19: - movb $1, %al -..B1.20: - movb 41(%rsp), %dl - lea _large_value_80(%rip), %rsi - andb $-128, %dl - shrb $7, %dl - fldt (%rsi) - movzbl %dl, %ecx - shlq $4, %rcx - testb %al, %al - fldt (%rsi,%rcx) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.22 -..B1.21: - fldcw 18(%rsp) -..B1.22: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.23: - cmpl $-63, %edx - jl ..B1.31 -..B1.24: - andl $-32768, %r8d - lea 75(%rsi,%rdi), %eax - andl $32767, %eax - orl %eax, %r8d - movzwl 18(%rsp), %eax - movl %eax, %edx - andl $768, %edx - movw %r8w, 40(%rsp) - cmpl $768, %edx - je ..B1.30 -..B1.25: - orl $-64768, %eax - movw %ax, 16(%rsp) -..B1.26: - fldcw 16(%rsp) -..B1.27: - fldt 32(%rsp) - lea 8+_TWO_75(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.28: - fldcw 18(%rsp) -..B1.29: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.30: - fldt 32(%rsp) - lea 8+_TWO_75(%rip), %rax - fmull (%rax) - fstpt (%rsp) - jmp ..B1.29 -..B1.31: - movzwl 18(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.35 -..B1.32: - orl $-64768, %ecx - movw %cx, 16(%rsp) -..B1.33: - fldcw 16(%rsp) -..B1.34: - movb $1, %al -..B1.35: - movb 41(%rsp), %dl - lea _small_value_80(%rip), %rsi - andb $-128, %dl - shrb $7, %dl - fldt (%rsi) - movzbl %dl, %ecx - shlq $4, %rcx - testb %al, %al - fldt (%rsi,%rcx) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.37 -..B1.36: - fldcw 18(%rsp) -..B1.37: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.38: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) - jmp ..B1.11 -..B1.39: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.40: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.41: - fldcw 16(%rsp) -..B1.42: - fldt 32(%rsp) - fstpt (%rsp) -..B1.43: - fldcw 18(%rsp) -..B1.44: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.45: - fldt 32(%rsp) - fstpt (%rsp) - jmp ..B1.44 - .align 16,0x90 - .cfi_endproc - .type ldexpl,@function - .size ldexpl,.-ldexpl - .data -# -- End ldexpl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgamma.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgamma.S deleted file mode 100644 index 8ab4cfddb1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgamma.S +++ /dev/null @@ -1,7348 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lgamma.c" - .text -..TXTST0: -# -- Begin lgamma - .text - .align 16,0x90 - .globl lgamma -lgamma: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_lgamma.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - lea (%rsp), %rdi -..___tag_value_lgamma.4: - call __libm_lgamma -..___tag_value_lgamma.5: -..B1.2: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type lgamma,@function - .size lgamma,.-lgamma - .data -# -- End lgamma - .text -# -- Begin __libm_lgamma - .text - .align 16,0x90 -__libm_lgamma: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B2.1: - .cfi_startproc -..___tag_value___libm_lgamma.8: -..L9: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $152, %rsp - .cfi_def_cfa_offset 208 - xorb %r12b, %r12b - movsd %xmm0, 32(%rsp) - movq %rdi, %r15 - movb 39(%rsp), %cl - xorb %bpl, %bpl - andb $-128, %cl - shrb $7, %cl - movzwl 38(%rsp), %r14d - andl $32752, %r14d - shrl $4, %r14d - movl %r14d, %r13d - movl 36(%rsp), %edx - shll $20, %r13d - andl $1048575, %edx - movq %fs:40, %rax - orl %edx, %r13d - xorq %rsp, %rax - movq %rax, 144(%rsp) - movb %cl, (%rsp) -..B2.2: - fnstcw 138(%rsp) -..B2.3: -..___tag_value___libm_lgamma.23: - call fegetround@PLT -..___tag_value___libm_lgamma.24: -..B2.205: - movl %eax, %ebx -..B2.4: - testl %ebx, %ebx - je ..B2.6 -..B2.5: - xorl %edi, %edi - movb $1, %r12b -..___tag_value___libm_lgamma.25: - call fesetround@PLT -..___tag_value___libm_lgamma.26: -..B2.6: - movzwl 138(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.10 -..B2.7: - orl $-64768, %edx - movw %dx, 136(%rsp) -..B2.8: - fldcw 136(%rsp) -..B2.9: - movb $1, %bpl -..B2.10: - cmpl $2047, %r14d - jne ..B2.17 -..B2.11: - movl $1, (%r15) - testb %bpl, %bpl - je ..B2.13 -..B2.12: - fldcw 138(%rsp) -..B2.13: - testb %r12b, %r12b - je ..B2.15 -..B2.14: - movl %ebx, %edi -..___tag_value___libm_lgamma.27: - call fesetround@PLT -..___tag_value___libm_lgamma.28: -..B2.15: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 32(%rsp), %xmm0 - mulsd %xmm0, %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.16: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.17: - testl %r14d, %r14d - jne ..B2.22 -..B2.18: - testl $1048575, 36(%rsp) - jne ..B2.22 -..B2.19: - cmpl $0, 32(%rsp) - je ..B2.98 -..B2.22: - movl $1, (%r15) -..B2.23: - movb (%rsp), %al - testb %al, %al - je ..B2.124 -..B2.24: - movsd 32(%rsp), %xmm0 - call nearbyint@PLT -..B2.206: - movsd %xmm0, 128(%rsp) - movsd 128(%rsp), %xmm1 - movsd 32(%rsp), %xmm0 - ucomisd %xmm1, %xmm0 - jp ..B2.25 - je ..B2.117 -..B2.25: - comisd .L_2il0floatpacket.0(%rip), %xmm0 - jbe ..B2.29 -..B2.26: - call ceil@PLT -..B2.207: - movsd %xmm0, 128(%rsp) - movsd 128(%rsp), %xmm1 - addsd .L_2il0floatpacket.0(%rip), %xmm1 - movsd %xmm1, 128(%rsp) - testb $1, 128(%rsp) - jne ..B2.28 -..B2.27: - movl $-1, (%r15) - movsd 32(%rsp), %xmm0 - jmp ..B2.29 -..B2.28: - movsd 32(%rsp), %xmm0 -..B2.29: - cmpl $1073741824, %r13d - jae ..B2.41 -..B2.30: - fldt .L_2il0floatpacket.1(%rip) - movsd %xmm0, 88(%rsp) - fld %st(0) - fldl 88(%rsp) - fcomi %st(2), %st - jae ..B2.109 - jp ..B2.109 -..B2.32: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B2.33 - jb ..B2.32 -..B2.33: - fstp %st(2) - fstpt 96(%rsp) -..B2.34: - andb $127, 105(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fldt 112(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) - call logl@PLT -..B2.209: - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fxch %st(1) - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value___libm_lgamma.52: - call lgamma_pos -..___tag_value___libm_lgamma.53: -..B2.208: - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - testb %r12b, %r12b - je ..B2.37 -..B2.35: - fstp %st(0) - movl %ebx, %edi - fstpt (%rsp) -..___tag_value___libm_lgamma.55: - call fesetround@PLT -..___tag_value___libm_lgamma.56: -..B2.36: - fldt (%rsp) - fldt 96(%rsp) -..B2.37: - testb %bpl, %bpl - fsubrp %st, %st(1) - fstpl 128(%rsp) - je ..B2.39 -..B2.38: - fldcw 138(%rsp) -..B2.39: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.40: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.41: - cmpl $1076756480, %r13d - jae ..B2.71 -..B2.42: - fldt .L_2il0floatpacket.4(%rip) - movaps %xmm0, %xmm5 - lea _TWO_52H(%rip), %rax - addsd .L_2il0floatpacket.3(%rip), %xmm0 - movsd %xmm0, 80(%rsp) - movsd 80(%rsp), %xmm0 - movsd (%rax), %xmm1 - subsd %xmm0, %xmm1 - movsd %xmm1, 128(%rsp) - movsd 128(%rsp), %xmm2 - movl 128(%rsp), %ecx - subsd (%rax), %xmm2 - lea _LRIB(%rip), %rax - movsd %xmm2, 128(%rsp) - lea 1(%rcx), %edx - movsd 128(%rsp), %xmm3 - movsd %xmm3, 88(%rsp) - fldl 88(%rsp) - movsd 80(%rsp), %xmm4 - movsd %xmm4, 88(%rsp) - fldl 88(%rsp) - faddp %st, %st(1) - fxch %st(1) - fcomip %st(1), %st - fstp %st(0) - cmova %edx, %ecx - lea (%rcx,%rcx,2), %edx - movslq %edx, %rsi - comisd (%rax,%rsi,8), %xmm5 - jbe ..B2.51 -..B2.43: - movsd 16(%rax,%rsi,8), %xmm0 - comisd %xmm5, %xmm0 - jbe ..B2.51 -..B2.44: - movsd %xmm5, 88(%rsp) - fldl 88(%rsp) - movslq %ecx, %rcx - fsubl 8(%rax,%rsi,8) - fld %st(0) - lea _LRP16(%rip), %rax - fmul %st(1), %st - lea _LRP(%rip), %rsi - fldl (%rax,%rcx,8) - shll $3, %edx - fmul %st(1), %st - testb %r12b, %r12b - movslq %edx, %rdx - fldt 64(%rsi,%rdx,8) - fldt 32(%rsi,%rdx,8) - fldt (%rsi,%rdx,8) - fldt 48(%rsi,%rdx,8) - fldt 16(%rsi,%rdx,8) - fxch %st(5) - faddl 152(%rsi,%rdx,8) - fmul %st(6), %st - faddl 136(%rsi,%rdx,8) - fmul %st(6), %st - faddl 120(%rsi,%rdx,8) - fmul %st(6), %st - faddl 104(%rsi,%rdx,8) - fmul %st(6), %st - faddl 88(%rsi,%rdx,8) - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl 160(%rsi,%rdx,8) - fmul %st(4), %st - faddl 144(%rsi,%rdx,8) - fmul %st(4), %st - faddl 128(%rsi,%rdx,8) - fmul %st(4), %st - faddl 112(%rsi,%rdx,8) - fmul %st(4), %st - faddl 96(%rsi,%rdx,8) - fmul %st(4), %st - faddl 80(%rsi,%rdx,8) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - je ..B2.47 -..B2.45: - fstp %st(0) - movl %ebx, %edi -..___tag_value___libm_lgamma.77: - call fesetround@PLT -..___tag_value___libm_lgamma.78: -..B2.46: - fldt 96(%rsp) -..B2.47: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstpl 128(%rsp) - je ..B2.49 -..B2.48: - fldcw 138(%rsp) -..B2.49: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.50: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.51: - lea _RRIB(%rip), %rax - comisd (%rax,%rsi,8), %xmm5 - jbe ..B2.60 -..B2.52: - movsd 16(%rax,%rsi,8), %xmm0 - comisd %xmm5, %xmm0 - jbe ..B2.60 -..B2.53: - movsd %xmm5, 88(%rsp) - lea _RRP(%rip), %rdx - fldl 88(%rsp) - fsubl 8(%rax,%rsi,8) - fld %st(0) - lea (%rcx,%rcx,4), %eax - shll $2, %eax - movslq %eax, %rax - testb %r12b, %r12b - fmul %st(1), %st - fldl 72(%rdx,%rax,8) - fmul %st(1), %st - fldt 32(%rdx,%rax,8) - fldt (%rdx,%rax,8) - fldl 64(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 120(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 112(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 88(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 80(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 136(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 128(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 104(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 96(%rdx,%rax,8) - fmul %st(4), %st - fxch %st(3) - faddl 152(%rdx,%rax,8) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fldt 48(%rdx,%rax,8) - fldt 16(%rdx,%rax,8) - fxch %st(3) - faddl 144(%rdx,%rax,8) - fmul %st(4), %st - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B2.56 -..B2.54: - fstp %st(0) - movl %ebx, %edi -..___tag_value___libm_lgamma.99: - call fesetround@PLT -..___tag_value___libm_lgamma.100: -..B2.55: - fldt 96(%rsp) -..B2.56: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstpl 128(%rsp) - je ..B2.58 -..B2.57: - fldcw 138(%rsp) -..B2.58: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.59: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.60: - fldt .L_2il0floatpacket.1(%rip) - movsd %xmm5, 88(%rsp) - fld %st(0) - fldl 88(%rsp) - fstpt (%rsp) - fldt (%rsp) - fcomip %st(2), %st - jae ..B2.113 - jp ..B2.113 -..B2.61: - fldt (%rsp) -..B2.62: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B2.63 - jb ..B2.62 -..B2.63: - fstp %st(2) - fxch %st(1) - fstpt (%rsp) - fstpt 96(%rsp) -..B2.64: - andb $127, 105(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fldt 112(%rsp) - fstpt (%rsp) - call logl@PLT -..B2.211: - addq $16, %rsp - .cfi_def_cfa_offset 208 - fstpt 96(%rsp) - fldt 96(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fldt 16(%rsp) - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value___libm_lgamma.124: - call lgamma_pos -..___tag_value___libm_lgamma.125: -..B2.210: - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - testb %r12b, %r12b - je ..B2.67 -..B2.65: - fstp %st(0) - movl %ebx, %edi - fstpt (%rsp) -..___tag_value___libm_lgamma.127: - call fesetround@PLT -..___tag_value___libm_lgamma.128: -..B2.66: - fldt (%rsp) - fldt 96(%rsp) -..B2.67: - testb %bpl, %bpl - fsubrp %st, %st(1) - fstpl 128(%rsp) - je ..B2.69 -..B2.68: - fldcw 138(%rsp) -..B2.69: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.70: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.71: - cmpl $1076953088, %r13d - jae ..B2.82 -..B2.72: - fldt .L_2il0floatpacket.1(%rip) - movsd %xmm0, 88(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fldl 88(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(1), %st - fldt .L_2il0floatpacket.4(%rip) - fstpt 48(%rsp) - fldt 48(%rsp) - jae ..B2.223 - jp ..B2.223 -..B2.73: - fldt 16(%rsp) - fstp %st(1) -..B2.74: - fldt .L_2il0floatpacket.4(%rip) - fstp %st(0) - fld %st(0) - fxch %st(1) - fldt .L_2il0floatpacket.5(%rip) - fmul %st(1), %st - fadd %st, %st(2) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fsubp %st, %st(2) - fld %st(0) - fsub %st(2), %st - fxch %st(1) - fadd %st(3), %st - fcomi %st(3), %st - fldt 32(%rsp) - fld %st(0) - fldt 48(%rsp) - fldt .L_2il0floatpacket.5(%rip) - fmul %st(3), %st - fadd %st, %st(2) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(3) - fmul %st(1), %st - fld %st(5) - fmul %st(3), %st - fxch %st(2) - fmulp %st, %st(6) - faddp %st, %st(5) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fsubp %st, %st(2) - fxch %st(2) - fsubp %st, %st(1) - fstpt 48(%rsp) - jp ..B2.75 - jb ..B2.74 -..B2.75: - fstp %st(1) - fstpt 16(%rsp) -..B2.76: - andb $127, 41(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fldt 48(%rsp) - fstpt (%rsp) - call logl@PLT -..B2.213: - fstpt 16(%rsp) - fldt 32(%rsp) - fstpt (%rsp) -..___tag_value___libm_lgamma.150: - call lgamma_pos -..___tag_value___libm_lgamma.151: -..B2.212: - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - testb %r12b, %r12b - je ..B2.78 -..B2.77: - movl %ebx, %edi -..___tag_value___libm_lgamma.153: - call fesetround@PLT -..___tag_value___libm_lgamma.154: -..B2.78: - fldt (%rsp) - testb %bpl, %bpl - fldt 16(%rsp) - fsubp %st, %st(1) - fstpl 128(%rsp) - je ..B2.80 -..B2.79: - fldcw 138(%rsp) -..B2.80: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.81: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.82: - movsd %xmm0, 88(%rsp) - cmpl $1082130432, %r13d - fldl 88(%rsp) - jb ..B2.90 -..B2.83: - fldt .L_2il0floatpacket.2(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - fsubr %st(1), %st - fld %st(1) - fchs - fldt (%rax) - fstpt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fstpt (%rsp) - fldt (%rsp) - fstpt 32(%rsp) - fstpt 48(%rsp) - fstpt 64(%rsp) - call logl@PLT -..B2.214: - fldt 64(%rsp) - lea _TWO_52H(%rip), %rsi - fldt 48(%rsp) - lea _S26(%rip), %r8 - fmulp %st, %st(2) - lea _S22(%rip), %r9 - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - fldt (%rsp) - lea _S18(%rip), %r10 - movq (%rsi), %rcx - lea _S14(%rip), %r11 - movq %rcx, 128(%rsp) - lea _S10(%rip), %r13 - movsd 128(%rsp), %xmm0 - lea _W4(%rip), %rax - movsd %xmm0, 88(%rsp) - lea _W2(%rip), %rdx - lea _S06(%rip), %r14 - lea _S02(%rip), %r15 - testb %r12b, %r12b - fsubrp %st, %st(3) - fxch %st(1) - fsubr %st, %st(2) - fldt .L_2il0floatpacket.1(%rip) - fdiv %st(1), %st - fld %st(0) - fmul %st(1), %st - fmull (%rax) - lea _S28(%rip), %rax - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(3) - fldl 88(%rsp) - fsubp %st, %st(1) - fstpl 128(%rsp) - fldl (%r8) - fldt (%r13) - fldt (%r14) - fldt (%r15) - movsd 128(%rsp), %xmm1 - subsd (%rsi), %xmm1 - movsd %xmm1, 128(%rsp) - movsd 128(%rsp), %xmm2 - movsd %xmm2, 88(%rsp) - fxch %st(4) - fsubl 88(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - fxch %st(4) - faddl (%r9) - fmul %st(4), %st - faddl (%r10) - fmul %st(4), %st - faddl (%r11) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(3) - fmulp %st, %st(2) - fldl (%rax) - lea _S24(%rip), %rax - fmul %st(1), %st - faddl (%rax) - lea _S20(%rip), %rax - fmul %st(1), %st - faddl (%rax) - lea _S16(%rip), %rax - fmul %st(1), %st - faddl (%rax) - lea _S12(%rip), %rax - fmul %st(1), %st - fldt (%rax) - lea _S08(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - lea _S04(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - je ..B2.86 -..B2.84: - fstp %st(0) - movl %ebx, %edi - fstpt 32(%rsp) -..___tag_value___libm_lgamma.177: - call fesetround@PLT -..___tag_value___libm_lgamma.178: -..B2.85: - fldt 32(%rsp) - fldt 96(%rsp) -..B2.86: - andb $127, 73(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fldt 80(%rsp) - fstpt (%rsp) - fsubrp %st, %st(1) - fstpt 48(%rsp) - call logl@PLT -..B2.215: - fldt 48(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - testb %bpl, %bpl - fsubp %st, %st(1) - fstpl 128(%rsp) - je ..B2.88 -..B2.87: - fldcw 138(%rsp) -..B2.88: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.89: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.90: - lea _TWO_52H(%rip), %rdx - movq (%rdx), %rax - movq %rax, 128(%rsp) - movsd 128(%rsp), %xmm0 - movsd %xmm0, 88(%rsp) - fldl 88(%rsp) - fsub %st(1), %st - fstpl 128(%rsp) - fchs - movsd 128(%rsp), %xmm1 - subsd (%rdx), %xmm1 - movsd %xmm1, 128(%rsp) - movsd 128(%rsp), %xmm2 - movsd %xmm2, 88(%rsp) - fldl 88(%rsp) - fsubr %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fstpt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fstpt (%rsp) - call logl@PLT -..B2.217: - fchs - movsd 48(%rsp), %xmm0 - xorps .L_2il0floatpacket.7(%rip), %xmm0 - movsd %xmm0, 104(%rsp) - fldl 104(%rsp) - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value___libm_lgamma.202: - call lgamma_pos -..___tag_value___libm_lgamma.203: -..B2.216: - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - fldt (%rsp) - lea _S26(%rip), %rax - lea _S22(%rip), %rdx - lea _S18(%rip), %rcx - lea _S14(%rip), %rsi - lea _S10(%rip), %r8 - lea _S06(%rip), %r9 - lea _S02(%rip), %r10 - lea _S28(%rip), %r11 - lea _S24(%rip), %r13 - lea _S20(%rip), %r14 - lea _S16(%rip), %r15 - testb %r12b, %r12b - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fmul %st(2), %st - fldl (%rax) - lea _S12(%rip), %rax - fmul %st(1), %st - fldt (%r8) - fldt (%r9) - fldt (%r10) - fldt (%rax) - lea _S08(%rip), %rax - fxch %st(4) - faddl (%rdx) - fmul %st(5), %st - faddl (%rcx) - fmul %st(5), %st - faddl (%rsi) - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(4) - fldl (%r11) - fmul %st(2), %st - fldt (%rax) - lea _S04(%rip), %rax - fxch %st(1) - faddl (%r13) - fmul %st(3), %st - fldt (%rax) - fxch %st(1) - faddl (%r14) - fmul %st(4), %st - faddl (%r15) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - je ..B2.93 -..B2.91: - fstp %st(0) - movl %ebx, %edi - fstpt 16(%rsp) -..___tag_value___libm_lgamma.205: - call fesetround@PLT -..___tag_value___libm_lgamma.206: -..B2.92: - fldt 16(%rsp) - fldt 96(%rsp) -..B2.93: - andb $127, 73(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fldt 80(%rsp) - fstpt (%rsp) - fsubrp %st, %st(1) - fstpt 32(%rsp) - call logl@PLT -..B2.218: - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - testb %bpl, %bpl - fsubp %st, %st(1) - fstpl 128(%rsp) - je ..B2.95 -..B2.94: - fldcw 138(%rsp) -..B2.95: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.96: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.97: - call __stack_chk_fail@PLT -..B2.98: - movb (%rsp), %al - testb %al, %al - je ..B2.100 -..B2.99: - movl $-1, (%r15) - jmp ..B2.101 -..B2.100: - movl $1, (%r15) -..B2.101: - testb %r12b, %r12b - je ..B2.103 -..B2.102: - movl %ebx, %edi -..___tag_value___libm_lgamma.229: - call fesetround@PLT -..___tag_value___libm_lgamma.230: -..B2.103: - movss .L_2il0floatpacket.8(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - cvtss2sd %xmm1, %xmm1 - movsd %xmm1, 128(%rsp) - je ..B2.105 -..B2.104: - fldcw 138(%rsp) -..B2.105: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 - jmp ..B2.16 -..B2.109: - fstp %st(1) - fxch %st(1) - fstpt 96(%rsp) - jmp ..B2.34 -..B2.113: - fstp %st(0) - fstpt 96(%rsp) - jmp ..B2.64 -..B2.117: - testb %r12b, %r12b - je ..B2.119 -..B2.118: - movl %ebx, %edi -..___tag_value___libm_lgamma.231: - call fesetround@PLT -..___tag_value___libm_lgamma.232: -..B2.119: - movss .L_2il0floatpacket.8(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - cvtss2sd %xmm1, %xmm1 - movsd %xmm1, 128(%rsp) - je ..B2.121 -..B2.120: - fldcw 138(%rsp) -..B2.121: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 - jmp ..B2.16 -..B2.124: - movzwl 38(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2037, %eax - jg ..B2.196 -..B2.125: - je ..B2.193 -..B2.126: - movsd 32(%rsp), %xmm0 - ucomisd .L_2il0floatpacket.9(%rip), %xmm0 - jp ..B2.127 - je ..B2.186 -..B2.127: - cmpl $1032, %r14d - jb ..B2.134 -..B2.128: - fldt .L_2il0floatpacket.2(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movsd %xmm0, 88(%rsp) - fldl 88(%rsp) - fstl 32(%rsp) - fsub %st, %st(1) - fxch %st(1) - fstpt (%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fstpt (%rsp) - fldt (%rax) - fstpt 32(%rsp) - call logl@PLT -..B2.219: - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 208 - fldt (%rsp) - lea _W4(%rip), %rax - fldl 32(%rsp) - lea _W2(%rip), %rdx - fxch %st(3) - fmulp %st, %st(1) - testb %r12b, %r12b - faddp %st, %st(1) - fsub %st(1), %st - fldt .L_2il0floatpacket.1(%rip) - fdivp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fmull (%rax) - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - je ..B2.130 -..B2.129: - movl %ebx, %edi - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_lgamma.235: - call fesetround@PLT -..___tag_value___libm_lgamma.236: -..B2.222: - fldt 16(%rsp) - fldt (%rsp) -..B2.130: - testb %bpl, %bpl - faddp %st, %st(1) - fstpl 128(%rsp) - je ..B2.132 -..B2.131: - fldcw 138(%rsp) -..B2.132: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.133: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.134: - cmpl $1025, %r14d - jb ..B2.141 -..B2.135: - lea _A(%rip), %rdx - lea -1025(%r14), %eax - movslq %eax, %rax - lea _B(%rip), %rcx - movsd %xmm0, 88(%rsp) - lea -3075(%r14,%r14,2), %r13d - fldl 88(%rsp) - lea _C5(%rip), %r14 - shll $3, %r13d - movslq %r13d, %r13 - fsubl (%rdx,%rax,8) - fmull (%rcx,%rax,8) - shlq $4, %r13 - fld %st(0) - fmul %st(1), %st - testb %r12b, %r12b - fldt 16(%r13,%r14) - fmul %st(2), %st - fadd %st(1), %st - fldt (%r13,%r14) - faddp %st, %st(1) - fldt 48(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 32(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 80(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 64(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 112(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 96(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 144(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 128(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 176(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 160(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 208(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 192(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 240(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 224(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 272(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 256(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 304(%r13,%r14) - fmul %st(3), %st - fadd %st(2), %st - fldt 288(%r13,%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 336(%r13,%r14) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 320(%r13,%r14) - faddp %st, %st(1) - fmul %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fstpt 96(%rsp) - je ..B2.137 -..B2.136: - movl %ebx, %edi -..___tag_value___libm_lgamma.257: - call fesetround@PLT -..___tag_value___libm_lgamma.258: -..B2.137: - fldt 352(%r13,%r14) - testb %bpl, %bpl - fldt (%rsp) - fmulp %st, %st(1) - fstpl 128(%rsp) - je ..B2.139 -..B2.138: - fldcw 138(%rsp) -..B2.139: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.140: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.141: - cmpl $1073872896, %r13d - jb ..B2.148 -..B2.142: - lea 48+_C4(%rip), %rcx - lea 16+_C4(%rip), %rax - movsd %xmm0, 88(%rsp) - lea 80+_C4(%rip), %r8 - fldl 88(%rsp) - lea 32+_C4(%rip), %rsi - fld %st(0) - lea 112+_C4(%rip), %r10 - fmul %st(1), %st - lea _C4(%rip), %rdx - lea 64+_C4(%rip), %r9 - lea 144+_C4(%rip), %r13 - lea 96+_C4(%rip), %r11 - lea 176+_C4(%rip), %r15 - lea 128+_C4(%rip), %r14 - testb %r12b, %r12b - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fldt (%rax) - lea 160+_C4(%rip), %rax - fmul %st(1), %st - fadd %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fldt (%rcx) - fmul %st(2), %st - fadd %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r8) - fmul %st(2), %st - fadd %st(3), %st - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r10) - fmul %st(2), %st - fadd %st(3), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r13) - fmul %st(2), %st - fadd %st(3), %st - fldt (%r14) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r15) - fmul %st(2), %st - fadd %st(3), %st - fldt (%rax) - lea 208+_C4(%rip), %rax - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rax) - lea 192+_C4(%rip), %rax - fmul %st(2), %st - fadd %st(3), %st - fldt (%rax) - lea 240+_C4(%rip), %rax - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rax) - lea 224+_C4(%rip), %rax - fmul %st(2), %st - fadd %st(3), %st - fldt (%rax) - lea 272+_C4(%rip), %rax - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rax) - lea 256+_C4(%rip), %rax - fmul %st(2), %st - fadd %st(3), %st - fldt (%rax) - lea 304+_C4(%rip), %rax - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rax) - lea 288+_C4(%rip), %rax - fmul %st(2), %st - fadd %st(3), %st - fldt (%rax) - lea 336+_C4(%rip), %rax - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rax) - lea 320+_C4(%rip), %rax - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt (%rax) - lea 352+_C4(%rip), %rax - faddp %st, %st(2) - fmul %st(1), %st - fxch %st(1) - fstpt 96(%rsp) - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B2.144 -..B2.143: - movl %ebx, %edi -..___tag_value___libm_lgamma.279: - call fesetround@PLT -..___tag_value___libm_lgamma.280: -..B2.144: - fldt .L_2il0floatpacket.6(%rip) - testb %bpl, %bpl - fldt 16(%rsp) - fsubp %st, %st(1) - fldt (%rsp) - fmulp %st, %st(1) - fstpl 128(%rsp) - je ..B2.146 -..B2.145: - fldcw 138(%rsp) -..B2.146: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.147: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.148: - cmpl $1073479680, %r13d - jb ..B2.156 -..B2.149: - fldt .L_2il0floatpacket.6(%rip) - lea 168+_C3(%rip), %rax - movsd %xmm0, 88(%rsp) - lea 152+_C3(%rip), %rdx - fldl 88(%rsp) - lea 136+_C3(%rip), %rcx - lea 120+_C3(%rip), %rsi - lea 104+_C3(%rip), %r8 - lea 88+_C3(%rip), %r9 - lea 64+_C3(%rip), %r10 - lea 160+_C3(%rip), %r14 - lea 144+_C3(%rip), %r15 - lea 32+_C3(%rip), %r11 - lea _C3(%rip), %r13 - testb %r12b, %r12b - fsubp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl (%rax) - lea 128+_C3(%rip), %rax - fmul %st(1), %st - fldt (%r10) - fldt (%r11) - fldt (%r13) - fxch %st(3) - faddl (%rdx) - fmul %st(4), %st - faddl (%rcx) - fmul %st(4), %st - faddl (%rsi) - fmul %st(4), %st - faddl (%r8) - fmul %st(4), %st - faddl (%r9) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl (%r14) - fmul %st(2), %st - faddl (%r15) - fmul %st(2), %st - faddl (%rax) - lea 112+_C3(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 96+_C3(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 80+_C3(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 48+_C3(%rip), %rax - fmul %st(2), %st - fldt (%rax) - lea 16+_C3(%rip), %rax - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - je ..B2.152 -..B2.150: - fstp %st(0) - movl %ebx, %edi -..___tag_value___libm_lgamma.301: - call fesetround@PLT -..___tag_value___libm_lgamma.302: -..B2.151: - fldt 96(%rsp) -..B2.152: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstpl 128(%rsp) - je ..B2.154 -..B2.153: - fldcw 138(%rsp) -..B2.154: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.155: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.156: - movsd %xmm0, 88(%rsp) - cmpl $1072955392, %r13d - fldl 88(%rsp) - jb ..B2.164 -..B2.157: - lea _LM(%rip), %rax - lea 184+_LGAMMA_C2(%rip), %rdx - lea 168+_LGAMMA_C2(%rip), %rcx - lea 152+_LGAMMA_C2(%rip), %rsi - lea 136+_LGAMMA_C2(%rip), %r8 - lea 120+_LGAMMA_C2(%rip), %r9 - lea 104+_LGAMMA_C2(%rip), %r10 - lea 80+_LGAMMA_C2(%rip), %r11 - fldt (%rax) - lea 176+_LGAMMA_C2(%rip), %r15 - lea 160+_LGAMMA_C2(%rip), %rax - lea 48+_LGAMMA_C2(%rip), %r13 - lea 16+_LGAMMA_C2(%rip), %r14 - testb %r12b, %r12b - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl (%rdx) - fmul %st(1), %st - fldt (%r11) - fldt (%r13) - fldt (%r14) - fxch %st(3) - faddl (%rcx) - fmul %st(4), %st - faddl (%rsi) - fmul %st(4), %st - faddl (%r8) - fmul %st(4), %st - faddl (%r9) - fmul %st(4), %st - faddl (%r10) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl (%r15) - fmul %st(2), %st - faddl (%rax) - lea 144+_LGAMMA_C2(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 128+_LGAMMA_C2(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 112+_LGAMMA_C2(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 96+_LGAMMA_C2(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 64+_LGAMMA_C2(%rip), %rax - fmul %st(2), %st - fldt (%rax) - lea 32+_LGAMMA_C2(%rip), %rax - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rax) - lea _LGAMMA_C2(%rip), %rax - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - je ..B2.160 -..B2.158: - fstp %st(0) - movl %ebx, %edi -..___tag_value___libm_lgamma.323: - call fesetround@PLT -..___tag_value___libm_lgamma.324: -..B2.159: - fldt 96(%rsp) -..B2.160: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstpl 128(%rsp) - je ..B2.162 -..B2.161: - fldcw 138(%rsp) -..B2.162: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.163: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.164: - cmpl $1072431104, %r13d - jb ..B2.172 -..B2.165: - fldt .L_2il0floatpacket.1(%rip) - lea 168+_C1(%rip), %rax - lea 152+_C1(%rip), %rdx - lea 136+_C1(%rip), %rcx - lea 120+_C1(%rip), %rsi - lea 160+_C1(%rip), %r14 - lea 144+_C1(%rip), %r15 - lea 104+_C1(%rip), %r8 - lea 88+_C1(%rip), %r9 - lea 64+_C1(%rip), %r10 - lea 32+_C1(%rip), %r11 - lea _C1(%rip), %r13 - testb %r12b, %r12b - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl (%rax) - lea 128+_C1(%rip), %rax - fmul %st(1), %st - fldt (%r10) - fldt (%r11) - fldt (%r13) - fldl (%r14) - fmul %st(5), %st - fxch %st(4) - faddl (%rdx) - fmul %st(5), %st - fxch %st(4) - faddl (%r15) - fmul %st(5), %st - fxch %st(4) - faddl (%rcx) - fmul %st(5), %st - fxch %st(4) - faddl (%rax) - fmul %st(5), %st - fxch %st(4) - faddl (%rsi) - fmul %st(5), %st - lea 112+_C1(%rip), %rax - fxch %st(4) - faddl (%rax) - fmul %st(5), %st - fxch %st(4) - faddl (%r8) - fmul %st(5), %st - lea 96+_C1(%rip), %rax - fxch %st(4) - faddl (%rax) - fmul %st(5), %st - fxch %st(4) - faddl (%r9) - fmul %st(5), %st - lea 80+_C1(%rip), %rax - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(2) - faddl (%rax) - lea 48+_C1(%rip), %rax - fmul %st(1), %st - fldt (%rax) - lea 16+_C1(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B2.168 -..B2.166: - fstp %st(0) - movl %ebx, %edi -..___tag_value___libm_lgamma.345: - call fesetround@PLT -..___tag_value___libm_lgamma.346: -..B2.167: - fldt 96(%rsp) -..B2.168: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstpl 128(%rsp) - je ..B2.170 -..B2.169: - fldcw 138(%rsp) -..B2.170: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.171: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.172: - fldt .L_2il0floatpacket.1(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 224 - fadd %st(1), %st - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value___libm_lgamma.368: - call lgamma_pos -..___tag_value___libm_lgamma.369: -..B2.221: - fldt 32(%rsp) - fxch %st(1) - fstpt 16(%rsp) - fstpt (%rsp) - call logl@PLT -..B2.220: - addq $16, %rsp - .cfi_def_cfa_offset 208 - fstpt 96(%rsp) - fldt 96(%rsp) - testb %r12b, %r12b - je ..B2.175 -..B2.173: - fstp %st(0) - movl %ebx, %edi -..___tag_value___libm_lgamma.371: - call fesetround@PLT -..___tag_value___libm_lgamma.372: -..B2.174: - fldt 96(%rsp) -..B2.175: - fldt (%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstpl 128(%rsp) - je ..B2.177 -..B2.176: - fldcw 138(%rsp) -..B2.177: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 -..B2.178: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.186: - testb %bpl, %bpl - je ..B2.188 -..B2.187: - fldcw 138(%rsp) -..B2.188: - testb %r12b, %r12b - je ..B2.190 -..B2.189: - movl %ebx, %edi -..___tag_value___libm_lgamma.393: - call fesetround@PLT -..___tag_value___libm_lgamma.394: -..B2.190: - movq 144(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.97 -..B2.191: - pxor %xmm0, %xmm0 - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.193: - movl 36(%rsp), %eax - andl $1048575, %eax - cmpl $480473, %eax - jg ..B2.196 -..B2.194: - jne ..B2.126 -..B2.195: - cmpl $663441831, 32(%rsp) - jbe ..B2.126 -..B2.196: - testb %r12b, %r12b - je ..B2.198 -..B2.197: - movl %ebx, %edi -..___tag_value___libm_lgamma.415: - call fesetround@PLT -..___tag_value___libm_lgamma.416: -..B2.198: - lea _PBIG(%rip), %rax - testb %bpl, %bpl - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 128(%rsp) - je ..B2.200 -..B2.199: - fldcw 138(%rsp) -..B2.200: - movq 144(%rsp), %rax - xorq %rsp, %rax - movsd 128(%rsp), %xmm0 - cmpq %fs:40, %rax - jne ..B2.97 - jmp ..B2.16 -..B2.223: - fstp %st(1) - fstp %st(0) - jmp ..B2.76 - .align 16,0x90 - .cfi_endproc - .type __libm_lgamma,@function - .size __libm_lgamma,.-__libm_lgamma - .data -# -- End __libm_lgamma - .text -# -- Begin lgamma_pos - .text - .align 16,0x90 -lgamma_pos: -# parameter 1: 8 + %rsp -..B3.1: - .cfi_startproc -..___tag_value_lgamma_pos.418: -..L419: - - fldt 8(%rsp) - fstl -8(%rsp) - fldt .L_2il0floatpacket.4(%rip) - movzwl -2(%rsp), %ecx - andl $32752, %ecx - shrl $4, %ecx - movl -4(%rsp), %eax - shll $20, %ecx - andl $1048575, %eax - orl %eax, %ecx - cmpl $1074790400, %ecx - jb ..B3.3 -..B3.2: - fstp %st(0) - addl $-1074790400, %ecx - lea _A(%rip), %rax - sarl $20, %ecx - lea _B(%rip), %rdx - movslq %ecx, %rcx - lea _C5(%rip), %rdi - lea (%rcx,%rcx,2), %esi - shll $3, %esi - movslq %esi, %rsi - fldl (%rax,%rcx,8) - shlq $4, %rsi - fsubrp %st, %st(1) - fmull (%rdx,%rcx,8) - fld %st(0) - fmul %st(1), %st - fldt 16(%rdi,%rsi) - fmul %st(2), %st - fadd %st(1), %st - fldt 48(%rdi,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 32(%rdi,%rsi) - faddp %st, %st(1) - fldt 80(%rdi,%rsi) - fmul %st(4), %st - fadd %st(3), %st - fldt 64(%rdi,%rsi) - faddp %st, %st(1) - fldt 112(%rdi,%rsi) - fmul %st(5), %st - fadd %st(4), %st - fldt 144(%rdi,%rsi) - fmul %st(6), %st - fadd %st(5), %st - fldt (%rsi,%rdi) - faddp %st, %st(5) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - fldt 96(%rdi,%rsi) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 128(%rdi,%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 176(%rdi,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 160(%rdi,%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 208(%rdi,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 192(%rdi,%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 240(%rdi,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 224(%rdi,%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 272(%rdi,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 256(%rdi,%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 304(%rdi,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 288(%rdi,%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 336(%rdi,%rsi) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 320(%rdi,%rsi) - fadd %st, %st(1) - fxch %st(1) - fmulp %st, %st(2) - fldt 352(%rdi,%rsi) - fmulp %st, %st(2) - fxch %st(1) - jmp ..B3.11 -..B3.3: - cmpl $1073872896, %ecx - jb ..B3.5 -..B3.4: - fstp %st(0) - lea 48+_C4(%rip), %rcx - lea 16+_C4(%rip), %rax - fld %st(0) - lea 80+_C4(%rip), %rdi - fmul %st(1), %st - lea 32+_C4(%rip), %rsi - fldt (%rax) - lea 112+_C4(%rip), %r9 - fmul %st(2), %st - lea _C4(%rip), %rdx - lea 64+_C4(%rip), %r8 - lea 144+_C4(%rip), %r11 - lea 96+_C4(%rip), %r10 - lea 128+_C4(%rip), %rax - fadd %st(1), %st - fldt (%rdx) - lea 176+_C4(%rip), %rdx - faddp %st, %st(1) - fldt (%rcx) - lea 160+_C4(%rip), %rcx - fmul %st(3), %st - fadd %st(2), %st - fldt (%rsi) - lea 208+_C4(%rip), %rsi - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rdi) - lea 192+_C4(%rip), %rdi - fmul %st(3), %st - fadd %st(2), %st - fldt (%r8) - lea 240+_C4(%rip), %r8 - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r9) - lea 224+_C4(%rip), %r9 - fmul %st(3), %st - fadd %st(2), %st - fldt (%r10) - lea 272+_C4(%rip), %r10 - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r11) - lea 256+_C4(%rip), %r11 - fmul %st(3), %st - fadd %st(2), %st - fldt (%rax) - lea 304+_C4(%rip), %rax - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rdx) - lea 288+_C4(%rip), %rdx - fmul %st(3), %st - fadd %st(2), %st - fldt (%rcx) - lea 336+_C4(%rip), %rcx - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rsi) - lea 320+_C4(%rip), %rsi - fmul %st(3), %st - fadd %st(2), %st - fldt (%rdi) - lea 352+_C4(%rip), %rdi - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r8) - fmul %st(3), %st - fadd %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r10) - fmul %st(3), %st - fadd %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rax) - fmul %st(3), %st - fadd %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rcx) - fmul %st(3), %st - faddp %st, %st(2) - fldt (%rsi) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt (%rdi) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.6(%rip) - fsubrp %st, %st(2) - fmul %st(1), %st - jmp ..B3.11 -..B3.5: - cmpl $1073479680, %ecx - jb ..B3.7 -..B3.6: - fstp %st(0) - fldt .L_2il0floatpacket.6(%rip) - lea 160+_C3(%rip), %rax - lea 144+_C3(%rip), %rdx - lea 128+_C3(%rip), %rcx - lea 112+_C3(%rip), %rsi - lea 96+_C3(%rip), %rdi - lea 80+_C3(%rip), %r8 - lea 48+_C3(%rip), %r9 - lea 168+_C3(%rip), %r11 - fsubrp %st, %st(1) - fld %st(0) - lea 16+_C3(%rip), %r10 - fmul %st(1), %st - fldl (%rax) - lea 152+_C3(%rip), %rax - fmul %st(1), %st - fldt (%r9) - lea 32+_C3(%rip), %r9 - fldt (%r10) - lea _C3(%rip), %r10 - fxch %st(2) - faddl (%rdx) - lea 136+_C3(%rip), %rdx - fmul %st(3), %st - fldt (%r9) - fldt (%r10) - fxch %st(2) - faddl (%rcx) - lea 120+_C3(%rip), %rcx - fmul %st(5), %st - faddl (%rsi) - lea 104+_C3(%rip), %rsi - fmul %st(5), %st - faddl (%rdi) - lea 88+_C3(%rip), %rdi - fmul %st(5), %st - faddl (%r8) - lea 64+_C3(%rip), %r8 - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldl (%r11) - fmul %st(4), %st - fldt (%r8) - fxch %st(1) - faddl (%rax) - fmul %st(5), %st - faddl (%rdx) - fmul %st(5), %st - faddl (%rcx) - fmul %st(5), %st - faddl (%rsi) - fmul %st(5), %st - faddl (%rdi) - fmul %st(5), %st - faddp %st, %st(1) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - jmp ..B3.11 -..B3.7: - cmpl $1072955392, %ecx - jb ..B3.9 -..B3.8: - fstp %st(0) - lea _LM(%rip), %rax - lea 176+_LGAMMA_C2(%rip), %rdx - lea 160+_LGAMMA_C2(%rip), %rcx - lea 144+_LGAMMA_C2(%rip), %rsi - lea 128+_LGAMMA_C2(%rip), %rdi - lea 112+_LGAMMA_C2(%rip), %r8 - lea 96+_LGAMMA_C2(%rip), %r9 - lea 64+_LGAMMA_C2(%rip), %r10 - fldt (%rax) - lea 32+_LGAMMA_C2(%rip), %r11 - lea _LGAMMA_C2(%rip), %rax - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl (%rdx) - lea 184+_LGAMMA_C2(%rip), %rdx - fmul %st(1), %st - fldt (%r10) - lea 80+_LGAMMA_C2(%rip), %r10 - fldt (%r11) - lea 48+_LGAMMA_C2(%rip), %r11 - fldt (%rax) - lea 16+_LGAMMA_C2(%rip), %rax - fxch %st(3) - faddl (%rcx) - lea 168+_LGAMMA_C2(%rip), %rcx - fmul %st(4), %st - fldt (%r10) - fldt (%r11) - fxch %st(2) - faddl (%rsi) - lea 152+_LGAMMA_C2(%rip), %rsi - fmul %st(6), %st - faddl (%rdi) - lea 136+_LGAMMA_C2(%rip), %rdi - fmul %st(6), %st - faddl (%r8) - lea 120+_LGAMMA_C2(%rip), %r8 - fmul %st(6), %st - faddl (%r9) - lea 104+_LGAMMA_C2(%rip), %r9 - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(3) - fldl (%rdx) - fmul %st(4), %st - faddl (%rcx) - fmul %st(4), %st - faddl (%rsi) - fmul %st(4), %st - faddl (%rdi) - fmul %st(4), %st - faddl (%r8) - fmul %st(4), %st - faddl (%r9) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - jmp ..B3.11 -..B3.9: - cmpl $1072431104, %ecx - jb ..B3.11 -..B3.10: - fstp %st(0) - fldt .L_2il0floatpacket.1(%rip) - lea 160+_C1(%rip), %rax - lea 144+_C1(%rip), %rdx - lea 128+_C1(%rip), %rcx - lea 112+_C1(%rip), %rsi - lea 96+_C1(%rip), %rdi - lea 80+_C1(%rip), %r8 - lea 48+_C1(%rip), %r9 - lea 168+_C1(%rip), %r11 - fsubrp %st, %st(1) - fld %st(0) - lea 16+_C1(%rip), %r10 - fmul %st(1), %st - fldl (%rax) - lea 152+_C1(%rip), %rax - fmul %st(1), %st - fldt (%r9) - lea 32+_C1(%rip), %r9 - fldt (%r10) - lea _C1(%rip), %r10 - fxch %st(2) - faddl (%rdx) - lea 136+_C1(%rip), %rdx - fmul %st(3), %st - fldt (%r9) - fldt (%r10) - fxch %st(2) - faddl (%rcx) - lea 120+_C1(%rip), %rcx - fmul %st(5), %st - faddl (%rsi) - lea 104+_C1(%rip), %rsi - fmul %st(5), %st - faddl (%rdi) - lea 88+_C1(%rip), %rdi - fmul %st(5), %st - faddl (%r8) - lea 64+_C1(%rip), %r8 - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldl (%r11) - fmul %st(4), %st - fldt (%r8) - fxch %st(1) - faddl (%rax) - fmul %st(5), %st - faddl (%rdx) - fmul %st(5), %st - faddl (%rcx) - fmul %st(5), %st - faddl (%rsi) - fmul %st(5), %st - faddl (%rdi) - fmul %st(5), %st - faddp %st, %st(1) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) -..B3.11: - fstp %st(1) - ret - .align 16,0x90 - .cfi_endproc - .type lgamma_pos,@function - .size lgamma_pos,.-lgamma_pos - .data -# -- End lgamma_pos - .text -# -- Begin gamma - .text - .align 16,0x90 - .globl gamma -gamma: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value_gamma.421: -..L422: - - pushq %rsi - .cfi_def_cfa_offset 16 - lea (%rsp), %rdi -..___tag_value_gamma.424: - call __libm_lgamma -..___tag_value_gamma.425: -..B4.2: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type gamma,@function - .size gamma,.-gamma - .data -# -- End gamma - .text -# -- Begin lgamma_r - .text - .align 16,0x90 - .globl lgamma_r -lgamma_r: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B5.1: - .cfi_startproc -..___tag_value_lgamma_r.428: -..L429: - - pushq %rsi - .cfi_def_cfa_offset 16 -..___tag_value_lgamma_r.431: - call __libm_lgamma -..___tag_value_lgamma_r.432: -..B5.2: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type lgamma_r,@function - .size lgamma_r,.-lgamma_r - .data -# -- End lgamma_r - .text -# -- Begin gamma_r - .text - .align 16,0x90 - .globl gamma_r -gamma_r: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B6.1: - .cfi_startproc -..___tag_value_gamma_r.435: -..L436: - - pushq %rsi - .cfi_def_cfa_offset 16 -..___tag_value_gamma_r.438: - call __libm_lgamma -..___tag_value_gamma_r.439: -..B6.2: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type gamma_r,@function - .size gamma_r,.-gamma_r - .data -# -- End gamma_r - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 16 -.L_2il0floatpacket.7: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,16 - .align 16 -_LRIB: - .long 3639930760 - .long 3221638968 - .long 169597185 - .long 3221617473 - .long 994230906 - .long 3221595977 - .long 249193764 - .long 3222253755 - .long 1417424869 - .long 3222250609 - .long 2585655974 - .long 3222247463 - .long 679699934 - .long 3222534303 - .long 2054089469 - .long 3222533975 - .long 3428479004 - .long 3222533647 - .long 1666697798 - .long 3222798023 - .long 4119983117 - .long 3222797970 - .long 2278301140 - .long 3222797918 - .long 753528318 - .long 3223060435 - .long 4151019248 - .long 3223060427 - .long 3253542882 - .long 3223060420 - .long 1221915992 - .long 3223322618 - .long 2139183567 - .long 3223322617 - .long 3056451142 - .long 3223322616 - .long 2968798493 - .long 3223453695 - .long 2743618512 - .long 3223453695 - .long 2518438531 - .long 3223453695 - .long 4156721779 - .long 3223584767 - .long 4139833280 - .long 3223584767 - .long 4122944781 - .long 3223584767 - .long 4282834537 - .long 3223715839 - .long 4280864212 - .long 3223715839 - .long 4278893887 - .long 3223715839 - .long 4293918703 - .long 3223846911 - .long 4293792039 - .long 3223846911 - .long 4293665375 - .long 3223846911 - .long 4294888151 - .long 3223977983 - .long 4294876892 - .long 3223977983 - .long 4294865633 - .long 3223977983 - .long 4294961261 - .long 3224109055 - .long 4294960839 - .long 3224109055 - .long 4294960417 - .long 3224109055 - .long 4294966894 - .long 3224240127 - .long 4294966866 - .long 3224240127 - .long 4294966838 - .long 3224240127 - .type _LRIB,@object - .size _LRIB,312 - .space 8, 0x00 # pad - .align 16 -_LRP16: - .long 2378050348 - .long 1101969305 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .type _LRP16,@object - .size _LRP16,104 - .space 8, 0x00 # pad - .align 16 -_LRP: - .word 17751 - .word 54196 - .word 10629 - .word 51164 - .word 16330 - .word 0 - .word 0 - .word 0 - .word 41133 - .word 9612 - .word 27976 - .word 62729 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 42459 - .word 13010 - .word 63969 - .word 39219 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 65437 - .word 25696 - .word 54808 - .word 41154 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 58026 - .word 20377 - .word 22118 - .word 64130 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 35937 - .word 22559 - .word 22660 - .word 49256 - .word 8259 - .word 31940 - .word 14143 - .word 16516 - .word 36722 - .word 48879 - .word 8761 - .word 49313 - .word 17702 - .word 59215 - .word 47717 - .word 16573 - .word 13453 - .word 50588 - .word 11555 - .word 49370 - .word 8896 - .word 4195 - .word 22549 - .word 16631 - .word 8306 - .word 47544 - .word 1832 - .word 49429 - .word 60153 - .word 61869 - .word 6523 - .word 16691 - .word 63612 - .word 2764 - .word 26286 - .word 49489 - .word 63356 - .word 31621 - .word 64278 - .word 16751 - .word 24055 - .word 64192 - .word 21464 - .word 49552 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49769 - .word 49242 - .word 6580 - .word 61152 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 7708 - .word 25266 - .word 60595 - .word 42444 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 45975 - .word 8629 - .word 62832 - .word 64438 - .word 16390 - .word 0 - .word 0 - .word 0 - .word 39855 - .word 22905 - .word 44266 - .word 59689 - .word 49162 - .word 0 - .word 0 - .word 0 - .word 10240 - .word 41089 - .word 5368 - .word 62588 - .word 16398 - .word 0 - .word 0 - .word 0 - .word 3194 - .word 32877 - .word 5879 - .word 49457 - .word 40173 - .word 43959 - .word 59635 - .word 16755 - .word 53371 - .word 1664 - .word 56254 - .word 49591 - .word 34510 - .word 44659 - .word 12150 - .word 16893 - .word 33872 - .word 42862 - .word 8799 - .word 49730 - .word 10662 - .word 44157 - .word 53571 - .word 17030 - .word 55074 - .word 58798 - .word 65525 - .word 49868 - .word 1276 - .word 34610 - .word 36363 - .word 17170 - .word 7041 - .word 29575 - .word 61144 - .word 50007 - .word 19121 - .word 53977 - .word 34010 - .word 17312 - .word 54457 - .word 12310 - .word 48419 - .word 50149 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55737 - .word 12115 - .word 42602 - .word 40775 - .word 16337 - .word 0 - .word 0 - .word 0 - .word 42581 - .word 53029 - .word 20983 - .word 59666 - .word 49157 - .word 0 - .word 0 - .word 0 - .word 24816 - .word 20947 - .word 58172 - .word 55961 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 3130 - .word 13042 - .word 49143 - .word 34463 - .word 49170 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 24697 - .word 14253 - .word 47765 - .word 16408 - .word 0 - .word 0 - .word 0 - .word 32693 - .word 5691 - .word 15709 - .word 49649 - .word 20491 - .word 21402 - .word 35932 - .word 16986 - .word 44071 - .word 16276 - .word 1675 - .word 49861 - .word 13758 - .word 14468 - .word 65445 - .word 17200 - .word 60394 - .word 3375 - .word 60434 - .word 50075 - .word 49748 - .word 2796 - .word 14419 - .word 17415 - .word 61579 - .word 22133 - .word 33066 - .word 50291 - .word 25055 - .word 28661 - .word 31699 - .word 17632 - .word 55823 - .word 18661 - .word 6347 - .word 50508 - .word 58142 - .word 19935 - .word 64799 - .word 17849 - .word 41216 - .word 59562 - .word 42287 - .word 50726 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16006 - .word 65034 - .word 42959 - .word 34185 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 40843 - .word 53953 - .word 46369 - .word 45839 - .word 49160 - .word 0 - .word 0 - .word 0 - .word 54179 - .word 42767 - .word 58812 - .word 64462 - .word 16400 - .word 0 - .word 0 - .word 0 - .word 50676 - .word 3143 - .word 1093 - .word 60276 - .word 49177 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56865 - .word 38982 - .word 63406 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 65273 - .word 45226 - .word 24230 - .word 49857 - .word 23450 - .word 59950 - .word 19796 - .word 17236 - .word 4038 - .word 16755 - .word 26702 - .word 50152 - .word 24087 - .word 51196 - .word 62539 - .word 17533 - .word 25486 - .word 58858 - .word 44079 - .word 50450 - .word 31845 - .word 29909 - .word 37453 - .word 17831 - .word 19699 - .word 12384 - .word 3664 - .word 50750 - .word 26808 - .word 47918 - .word 18611 - .word 18131 - .word 25376 - .word 13791 - .word 62285 - .word 51048 - .word 64886 - .word 33542 - .word 28786 - .word 18433 - .word 54686 - .word 5814 - .word 3500 - .word 51351 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33175 - .word 51870 - .word 55516 - .word 61254 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 3685 - .word 30034 - .word 48430 - .word 40287 - .word 49163 - .word 0 - .word 0 - .word 0 - .word 3323 - .word 33320 - .word 53546 - .word 49572 - .word 16406 - .word 0 - .word 0 - .word 0 - .word 19902 - .word 19517 - .word 60782 - .word 40648 - .word 49186 - .word 0 - .word 0 - .word 0 - .word 28672 - .word 31090 - .word 60187 - .word 37497 - .word 16430 - .word 0 - .word 0 - .word 0 - .word 4362 - .word 57115 - .word 1063 - .word 50082 - .word 17298 - .word 34206 - .word 30558 - .word 17506 - .word 19701 - .word 2977 - .word 30695 - .word 50467 - .word 45209 - .word 25144 - .word 62418 - .word 17892 - .word 6287 - .word 3260 - .word 59477 - .word 50854 - .word 26251 - .word 62311 - .word 23506 - .word 18281 - .word 50215 - .word 3065 - .word 23294 - .word 51244 - .word 519 - .word 28602 - .word 60080 - .word 18671 - .word 56824 - .word 33188 - .word 7096 - .word 51634 - .word 27357 - .word 50961 - .word 5574 - .word 19062 - .word 7770 - .word 52374 - .word 38304 - .word 52025 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33559 - .word 2783 - .word 4720 - .word 38214 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 65291 - .word 24589 - .word 47090 - .word 40315 - .word 49166 - .word 0 - .word 0 - .word 0 - .word 7930 - .word 21505 - .word 15205 - .word 49607 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 61775 - .word 9936 - .word 17817 - .word 40691 - .word 49195 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 37628 - .word 658 - .word 37550 - .word 16442 - .word 0 - .word 0 - .word 0 - .word 14352 - .word 33815 - .word 3114 - .word 50322 - .word 43816 - .word 13363 - .word 33081 - .word 17794 - .word 62601 - .word 27719 - .word 33798 - .word 50803 - .word 1036 - .word 16074 - .word 700 - .word 18277 - .word 33117 - .word 56648 - .word 64173 - .word 51286 - .word 17251 - .word 52492 - .word 29265 - .word 18761 - .word 11155 - .word 27451 - .word 30367 - .word 51772 - .word 7487 - .word 7247 - .word 2371 - .word 19248 - .word 14759 - .word 9929 - .word 13587 - .word 52258 - .word 11730 - .word 26190 - .word 56262 - .word 19733 - .word 56923 - .word 11047 - .word 18072 - .word 52745 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37589 - .word 36570 - .word 62298 - .word 45320 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 17708 - .word 57749 - .word 28642 - .word 45359 - .word 49169 - .word 0 - .word 0 - .word 0 - .word 40067 - .word 38581 - .word 2689 - .word 62790 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 36505 - .word 63458 - .word 34596 - .word 57945 - .word 49204 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 38946 - .word 9029 - .word 60159 - .word 16454 - .word 0 - .word 0 - .word 0 - .word 61014 - .word 7077 - .word 17362 - .word 50576 - .word 11572 - .word 44638 - .word 49972 - .word 18098 - .word 64171 - .word 46242 - .word 17172 - .word 51158 - .word 7607 - .word 1130 - .word 63213 - .word 18682 - .word 20847 - .word 56361 - .word 38627 - .word 51744 - .word 49497 - .word 58620 - .word 43800 - .word 19268 - .word 63056 - .word 11021 - .word 657 - .word 52330 - .word 42127 - .word 49291 - .word 30722 - .word 19856 - .word 13674 - .word 31481 - .word 1908 - .word 52917 - .word 60194 - .word 12516 - .word 3868 - .word 20445 - .word 3386 - .word 31577 - .word 62924 - .word 53506 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44838 - .word 25647 - .word 6736 - .word 62345 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 31560 - .word 12645 - .word 60726 - .word 56699 - .word 49172 - .word 0 - .word 0 - .word 0 - .word 56942 - .word 25011 - .word 17364 - .word 49055 - .word 16425 - .word 0 - .word 0 - .word 0 - .word 3371 - .word 3119 - .word 24466 - .word 56588 - .word 49214 - .word 0 - .word 0 - .word 0 - .word 14336 - .word 15684 - .word 2636 - .word 36719 - .word 16468 - .word 0 - .word 0 - .word 0 - .word 47554 - .word 44810 - .word 53673 - .word 50840 - .word 53371 - .word 50832 - .word 58584 - .word 18417 - .word 46548 - .word 9025 - .word 35353 - .word 51530 - .word 2727 - .word 25780 - .word 5967 - .word 19108 - .word 27113 - .word 1073 - .word 59097 - .word 52222 - .word 11834 - .word 38905 - .word 4058 - .word 19800 - .word 56017 - .word 55971 - .word 60637 - .word 52914 - .word 5287 - .word 8439 - .word 65517 - .word 20493 - .word 37028 - .word 58958 - .word 62480 - .word 53607 - .word 57582 - .word 43721 - .word 1738 - .word 21188 - .word 9819 - .word 37368 - .word 17165 - .word 54304 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13429 - .word 7444 - .word 20593 - .word 34837 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 49742 - .word 37689 - .word 16091 - .word 38981 - .word 49176 - .word 0 - .word 0 - .word 0 - .word 46524 - .word 21314 - .word 39987 - .word 46372 - .word 16432 - .word 0 - .word 0 - .word 0 - .word 14081 - .word 37459 - .word 64348 - .word 36776 - .word 49225 - .word 0 - .word 0 - .word 0 - .word 30720 - .word 57650 - .word 51740 - .word 32812 - .word 16482 - .word 0 - .word 0 - .word 0 - .word 13868 - .word 61714 - .word 32487 - .word 51118 - .word 53288 - .word 8914 - .word 15189 - .word 18750 - .word 25547 - .word 51031 - .word 54157 - .word 51918 - .word 4587 - .word 22569 - .word 2868 - .word 19552 - .word 4628 - .word 56702 - .word 63256 - .word 52720 - .word 60585 - .word 38579 - .word 10763 - .word 20354 - .word 20343 - .word 32825 - .word 42223 - .word 53523 - .word 15259 - .word 21287 - .word 25207 - .word 21157 - .word 19232 - .word 27853 - .word 30722 - .word 54327 - .word 6202 - .word 34921 - .word 46892 - .word 21963 - .word 54314 - .word 63337 - .word 3818 - .word 55135 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12932 - .word 7413 - .word 50416 - .word 52775 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 49070 - .word 42612 - .word 57119 - .word 58471 - .word 49179 - .word 0 - .word 0 - .word 0 - .word 37517 - .word 48554 - .word 12217 - .word 52169 - .word 16439 - .word 0 - .word 0 - .word 0 - .word 3686 - .word 14060 - .word 10284 - .word 62061 - .word 49235 - .word 0 - .word 0 - .word 0 - .word 12288 - .word 36186 - .word 45004 - .word 41528 - .word 16496 - .word 0 - .word 0 - .word 0 - .word 36572 - .word 10708 - .word 62070 - .word 51404 - .word 43863 - .word 23526 - .word 34237 - .word 19093 - .word 49453 - .word 49937 - .word 30100 - .word 52320 - .word 42622 - .word 48103 - .word 45810 - .word 20009 - .word 63343 - .word 18283 - .word 24986 - .word 53236 - .word 211 - .word 7406 - .word 23986 - .word 20928 - .word 55487 - .word 58939 - .word 35978 - .word 54154 - .word 20786 - .word 29108 - .word 45903 - .word 21845 - .word 43676 - .word 27033 - .word 56912 - .word 55073 - .word 56762 - .word 13326 - .word 51569 - .word 22766 - .word 11195 - .word 61166 - .word 50980 - .word 55993 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8176 - .word 5164 - .word 64154 - .word 36090 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 19140 - .word 63711 - .word 39190 - .word 47508 - .word 49183 - .word 0 - .word 0 - .word 0 - .word 61957 - .word 29915 - .word 7046 - .word 34440 - .word 16447 - .word 0 - .word 0 - .word 0 - .word 29909 - .word 15770 - .word 39264 - .word 33288 - .word 49247 - .word 0 - .word 0 - .word 0 - .word 38912 - .word 2108 - .word 35420 - .word 36197 - .word 16511 - .word 0 - .word 0 - .word 0 - .word 63755 - .word 16362 - .word 32791 - .word 51700 - .word 7043 - .word 34288 - .word 50374 - .word 19448 - .word 36869 - .word 13569 - .word 51161 - .word 52734 - .word 30422 - .word 39536 - .word 34368 - .word 20483 - .word 2356 - .word 27571 - .word 10627 - .word 53769 - .word 24204 - .word 35273 - .word 27312 - .word 21520 - .word 8451 - .word 46569 - .word 41820 - .word 54805 - .word 23553 - .word 63476 - .word 47626 - .word 22556 - .word 30024 - .word 47627 - .word 14141 - .word 55843 - .word 22061 - .word 10635 - .word 17534 - .word 23595 - .word 50593 - .word 17237 - .word 38322 - .word 56882 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26357 - .word 41545 - .word 7157 - .word 37888 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 28550 - .word 47270 - .word 51275 - .word 41572 - .word 49187 - .word 0 - .word 0 - .word 0 - .word 7474 - .word 4460 - .word 27226 - .word 52743 - .word 16454 - .word 0 - .word 0 - .word 0 - .word 18816 - .word 51641 - .word 26417 - .word 44610 - .word 49258 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 61733 - .word 61279 - .word 42447 - .word 16526 - .word 0 - .word 0 - .word 0 - .word 45407 - .word 18829 - .word 2399 - .word 52005 - .word 35928 - .word 2098 - .word 15792 - .word 19814 - .word 23614 - .word 62930 - .word 12196 - .word 53160 - .word 7674 - .word 56712 - .word 55660 - .word 20970 - .word 53358 - .word 2019 - .word 18277 - .word 54318 - .word 57563 - .word 186 - .word 18788 - .word 22129 - .word 38957 - .word 32276 - .word 61462 - .word 55475 - .word 46995 - .word 58305 - .word 12150 - .word 23287 - .word 60702 - .word 18274 - .word 9955 - .word 56635 - .word 40407 - .word 43665 - .word 14520 - .word 24448 - .word 50736 - .word 28578 - .word 16181 - .word 57795 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5404 - .word 12511 - .word 60447 - .word 38763 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 42770 - .word 34093 - .word 51209 - .word 39016 - .word 49191 - .word 0 - .word 0 - .word 0 - .word 6888 - .word 59302 - .word 12508 - .word 46457 - .word 16462 - .word 0 - .word 0 - .word 0 - .word 49565 - .word 60790 - .word 42341 - .word 36877 - .word 49270 - .word 0 - .word 0 - .word 0 - .word 28672 - .word 39351 - .word 39031 - .word 32932 - .word 16542 - .word 0 - .word 0 - .word 0 - .word 35933 - .word 37102 - .word 41613 - .word 52318 - .word 59745 - .word 3284 - .word 26050 - .word 20190 - .word 16458 - .word 62792 - .word 1547 - .word 53599 - .word 38519 - .word 37566 - .word 10560 - .word 21472 - .word 36560 - .word 62869 - .word 6875 - .word 54881 - .word 58623 - .word 15626 - .word 21634 - .word 22754 - .word 22503 - .word 3380 - .word 55147 - .word 56163 - .word 21679 - .word 23644 - .word 42908 - .word 24037 - .word 43760 - .word 1032 - .word 52442 - .word 57447 - .word 14782 - .word 45605 - .word 45261 - .word 25322 - .word 22271 - .word 11633 - .word 47287 - .word 58733 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _LRP,@object - .size _LRP,2496 - .align 16 -_RRIB: - .long 4234632914 - .long 3221491298 - .long 2516645996 - .long 3221465084 - .long 798659078 - .long 3221438870 - .long 2133702104 - .long 3221835523 - .long 3164494255 - .long 3221825037 - .long 4195286406 - .long 3221814551 - .long 816546054 - .long 3222285677 - .long 2019136897 - .long 3222284366 - .long 3221727740 - .long 3222283055 - .long 2093868532 - .long 3222538608 - .long 1475393241 - .long 3222538346 - .long 856917950 - .long 3222538084 - .long 2471449286 - .long 3222798751 - .long 629767309 - .long 3222798699 - .long 3083052628 - .long 3222798646 - .long 862741805 - .long 3223060539 - .long 4260232735 - .long 3223060531 - .long 3362756369 - .long 3223060524 - .long 3046734174 - .long 3223322627 - .long 1076409337 - .long 3223322627 - .long 3401051796 - .long 3223322626 - .long 1762435764 - .long 3223453696 - .long 1551329531 - .long 3223453696 - .long 1340223298 - .long 3223453696 - .long 175962963 - .long 3223584768 - .long 155133815 - .long 3223584768 - .long 134304667 - .long 3223584768 - .long 16073407 - .long 3223715840 - .long 14103082 - .long 3223715840 - .long 12132757 - .long 3223715840 - .long 1330068 - .long 3223846912 - .long 1175257 - .long 3223846912 - .long 1020446 - .long 3223846912 - .long 101663 - .long 3223977984 - .long 90404 - .long 3223977984 - .long 79145 - .long 3223977984 - .long 7020 - .long 3224109056 - .long 6457 - .long 3224109056 - .long 5894 - .long 3224109056 - .type _RRIB,@object - .size _RRIB,312 - .space 8, 0x00 # pad - .align 16 -_RRP: - .word 26273 - .word 65347 - .word 56168 - .word 33169 - .word 16329 - .word 0 - .word 0 - .word 0 - .word 899 - .word 31387 - .word 19253 - .word 49663 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 58984 - .word 6058 - .word 23936 - .word 39799 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 62168 - .word 21442 - .word 12332 - .word 46245 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 32619 - .word 37054 - .word 53131 - .word 16575 - .word 61379 - .word 13125 - .word 14178 - .word 16562 - .word 10270 - .word 45115 - .word 37615 - .word 16506 - .word 38745 - .word 51073 - .word 34560 - .word 16498 - .word 53490 - .word 20212 - .word 2544 - .word 16440 - .word 38291 - .word 26669 - .word 54063 - .word 16440 - .word 45779 - .word 11956 - .word 18019 - .word 16540 - .word 18677 - .word 64033 - .word 42794 - .word 16529 - .word 35035 - .word 51098 - .word 10618 - .word 16473 - .word 64107 - .word 31719 - .word 36522 - .word 16468 - .word 8831 - .word 57419 - .word 13215 - .word 16407 - .word 40450 - .word 31904 - .word 29069 - .word 16417 - .word 3821 - .word 29651 - .word 12061 - .word 62640 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 3177 - .word 32099 - .word 13049 - .word 63749 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 10153 - .word 35464 - .word 38075 - .word 52902 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 20859 - .word 27364 - .word 47250 - .word 57481 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 12411 - .word 3381 - .word 24721 - .word 16978 - .word 33723 - .word 48761 - .word 26869 - .word 16934 - .word 60995 - .word 48715 - .word 17741 - .word 16804 - .word 43031 - .word 16238 - .word 40105 - .word 16761 - .word 3889 - .word 41280 - .word 47482 - .word 16635 - .word 43797 - .word 63405 - .word 37827 - .word 16594 - .word 62186 - .word 39109 - .word 61647 - .word 16889 - .word 62356 - .word 27755 - .word 9779 - .word 16848 - .word 54712 - .word 4438 - .word 22518 - .word 16720 - .word 46932 - .word 1372 - .word 7843 - .word 16677 - .word 64555 - .word 14297 - .word 39523 - .word 16553 - .word 24913 - .word 15735 - .word 26400 - .word 16514 - .word 23128 - .word 31275 - .word 33489 - .word 52246 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 56543 - .word 37040 - .word 59300 - .word 54866 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 35342 - .word 2554 - .word 44652 - .word 41504 - .word 16391 - .word 0 - .word 0 - .word 0 - .word 60438 - .word 21728 - .word 35033 - .word 43725 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 2425 - .word 35124 - .word 13908 - .word 17426 - .word 60985 - .word 47869 - .word 25665 - .word 17352 - .word 21213 - .word 45459 - .word 26876 - .word 17133 - .word 52591 - .word 14597 - .word 24526 - .word 17060 - .word 20426 - .word 18941 - .word 5374 - .word 16845 - .word 38724 - .word 49064 - .word 24125 - .word 16773 - .word 29994 - .word 36366 - .word 21088 - .word 17279 - .word 13269 - .word 25406 - .word 24800 - .word 17205 - .word 56893 - .word 35190 - .word 33689 - .word 16988 - .word 18235 - .word 52539 - .word 13276 - .word 16916 - .word 8454 - .word 46451 - .word 9758 - .word 16704 - .word 59084 - .word 57882 - .word 27928 - .word 16633 - .word 38110 - .word 57460 - .word 5118 - .word 49980 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 32056 - .word 19825 - .word 28737 - .word 63161 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 37650 - .word 4479 - .word 6518 - .word 59238 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 47963 - .word 64405 - .word 49841 - .word 37534 - .word 16402 - .word 0 - .word 0 - .word 0 - .word 53082 - .word 25478 - .word 58397 - .word 17968 - .word 35980 - .word 11362 - .word 59289 - .word 17858 - .word 37178 - .word 29007 - .word 44012 - .word 17530 - .word 40762 - .word 17715 - .word 56491 - .word 17422 - .word 58318 - .word 3223 - .word 43216 - .word 17097 - .word 46157 - .word 23530 - .word 32141 - .word 16991 - .word 63138 - .word 35190 - .word 24151 - .word 17748 - .word 9862 - .word 36309 - .word 14376 - .word 17639 - .word 38034 - .word 65220 - .word 2337 - .word 17314 - .word 16819 - .word 31850 - .word 22525 - .word 17205 - .word 7604 - .word 29558 - .word 57367 - .word 16883 - .word 27719 - .word 62170 - .word 8797 - .word 16778 - .word 19348 - .word 65423 - .word 37299 - .word 53534 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 8233 - .word 55180 - .word 9457 - .word 46319 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 43066 - .word 26574 - .word 6722 - .word 65137 - .word 16400 - .word 0 - .word 0 - .word 0 - .word 4285 - .word 7102 - .word 7454 - .word 61224 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 1453 - .word 4915 - .word 61926 - .word 18584 - .word 43088 - .word 28644 - .word 50480 - .word 18434 - .word 16532 - .word 18100 - .word 54137 - .word 17983 - .word 49885 - .word 46980 - .word 54409 - .word 17832 - .word 24326 - .word 38273 - .word 20489 - .word 17385 - .word 28149 - .word 12270 - .word 61982 - .word 17236 - .word 4581 - .word 37632 - .word 45525 - .word 18282 - .word 46626 - .word 30655 - .word 34430 - .word 18132 - .word 63429 - .word 60638 - .word 37201 - .word 17683 - .word 18031 - .word 50879 - .word 14891 - .word 17535 - .word 64064 - .word 1811 - .word 54229 - .word 17089 - .word 27163 - .word 21077 - .word 40059 - .word 16943 - .word 43177 - .word 42972 - .word 46613 - .word 45511 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 51480 - .word 49923 - .word 15697 - .word 40352 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 9513 - .word 31676 - .word 11989 - .word 49652 - .word 16406 - .word 0 - .word 0 - .word 0 - .word 30527 - .word 7034 - .word 38319 - .word 40746 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 7022 - .word 27009 - .word 58741 - .word 19257 - .word 64033 - .word 16049 - .word 22023 - .word 19062 - .word 45243 - .word 42262 - .word 39716 - .word 18476 - .word 50731 - .word 20793 - .word 36853 - .word 18281 - .word 36100 - .word 48270 - .word 37858 - .word 17699 - .word 42104 - .word 28941 - .word 36380 - .word 17506 - .word 23499 - .word 6717 - .word 19492 - .word 18866 - .word 55911 - .word 14060 - .word 7353 - .word 18672 - .word 26519 - .word 16988 - .word 4787 - .word 18087 - .word 28065 - .word 5309 - .word 5697 - .word 17893 - .word 40193 - .word 22022 - .word 5795 - .word 17314 - .word 8456 - .word 42078 - .word 24130 - .word 17122 - .word 59016 - .word 62162 - .word 39673 - .word 39540 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 38154 - .word 49049 - .word 18422 - .word 40324 - .word 16398 - .word 0 - .word 0 - .word 0 - .word 42164 - .word 50610 - .word 50330 - .word 49617 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 25875 - .word 59750 - .word 15469 - .word 40704 - .word 16427 - .word 0 - .word 0 - .word 0 - .word 34173 - .word 58862 - .word 54392 - .word 19977 - .word 59819 - .word 8454 - .word 18296 - .word 19734 - .word 30024 - .word 20882 - .word 32589 - .word 19004 - .word 29754 - .word 31085 - .word 31060 - .word 18761 - .word 52191 - .word 27376 - .word 34749 - .word 18035 - .word 4562 - .word 4929 - .word 33854 - .word 17794 - .word 25001 - .word 9100 - .word 13901 - .word 19490 - .word 47424 - .word 1290 - .word 2840 - .word 19248 - .word 22386 - .word 25633 - .word 77 - .word 18519 - .word 15514 - .word 17548 - .word 1870 - .word 18277 - .word 63012 - .word 41083 - .word 3742 - .word 17554 - .word 48968 - .word 51531 - .word 22462 - .word 17314 - .word 41404 - .word 42732 - .word 62757 - .word 38778 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 7009 - .word 42712 - .word 36892 - .word 45360 - .word 16401 - .word 0 - .word 0 - .word 0 - .word 39847 - .word 2109 - .word 39294 - .word 62791 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 32179 - .word 43914 - .word 44915 - .word 57947 - .word 16436 - .word 0 - .word 0 - .word 0 - .word 27779 - .word 16034 - .word 51140 - .word 20738 - .word 17003 - .word 57008 - .word 53620 - .word 20444 - .word 23469 - .word 38349 - .word 865 - .word 19562 - .word 25226 - .word 11109 - .word 43957 - .word 19268 - .word 36845 - .word 29881 - .word 17299 - .word 18390 - .word 19837 - .word 16116 - .word 50064 - .word 18098 - .word 57862 - .word 29290 - .word 2992 - .word 20149 - .word 46818 - .word 59090 - .word 31382 - .word 19856 - .word 61466 - .word 30954 - .word 38749 - .word 18976 - .word 30984 - .word 39998 - .word 63388 - .word 18682 - .word 41543 - .word 16681 - .word 17428 - .word 17808 - .word 20643 - .word 64049 - .word 24643 - .word 17517 - .word 52468 - .word 15578 - .word 48717 - .word 44571 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 54595 - .word 6191 - .word 4821 - .word 56700 - .word 16404 - .word 0 - .word 0 - .word 0 - .word 50514 - .word 10282 - .word 25695 - .word 49055 - .word 16425 - .word 0 - .word 0 - .word 0 - .word 13176 - .word 11594 - .word 38881 - .word 56588 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 28019 - .word 59660 - .word 42453 - .word 21536 - .word 50810 - .word 20541 - .word 28938 - .word 21188 - .word 53928 - .word 47752 - .word 60679 - .word 20146 - .word 24270 - .word 60826 - .word 4097 - .word 19800 - .word 57327 - .word 59875 - .word 35368 - .word 18762 - .word 31038 - .word 58486 - .word 58593 - .word 18417 - .word 41074 - .word 26743 - .word 60755 - .word 20839 - .word 49334 - .word 8669 - .word 63919 - .word 20493 - .word 20472 - .word 19395 - .word 59120 - .word 19454 - .word 27230 - .word 61299 - .word 5980 - .word 19108 - .word 60536 - .word 14479 - .word 53684 - .word 18072 - .word 24589 - .word 24698 - .word 60903 - .word 17729 - .word 24724 - .word 11272 - .word 24781 - .word 60135 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 54850 - .word 34200 - .word 16766 - .word 38981 - .word 16408 - .word 0 - .word 0 - .word 0 - .word 58717 - .word 18738 - .word 40849 - .word 46372 - .word 16432 - .word 0 - .word 0 - .word 0 - .word 11614 - .word 63671 - .word 65373 - .word 36776 - .word 16457 - .word 0 - .word 0 - .word 0 - .word 54464 - .word 24503 - .word 3823 - .word 22367 - .word 6780 - .word 11041 - .word 46896 - .word 21963 - .word 31922 - .word 33372 - .word 42225 - .word 20755 - .word 24666 - .word 18144 - .word 10765 - .word 20354 - .word 1690 - .word 51390 - .word 54159 - .word 19150 - .word 40728 - .word 53860 - .word 15190 - .word 18750 - .word 62163 - .word 16835 - .word 30725 - .word 21559 - .word 49586 - .word 46435 - .word 25209 - .word 21157 - .word 392 - .word 18629 - .word 63258 - .word 19952 - .word 57023 - .word 35208 - .word 2869 - .word 19552 - .word 15849 - .word 23514 - .word 32489 - .word 18350 - .word 45455 - .word 56342 - .word 1433 - .word 17952 - .word 26203 - .word 24931 - .word 14914 - .word 64372 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 32494 - .word 4334 - .word 57160 - .word 58471 - .word 16411 - .word 0 - .word 0 - .word 0 - .word 38313 - .word 48554 - .word 12217 - .word 52169 - .word 16439 - .word 0 - .word 0 - .word 0 - .word 13841 - .word 14060 - .word 10284 - .word 62061 - .word 16467 - .word 0 - .word 0 - .word 0 - .word 27928 - .word 25887 - .word 22600 - .word 23226 - .word 25867 - .word 43031 - .word 24792 - .word 22767 - .word 61361 - .word 28179 - .word 36008 - .word 21386 - .word 1901 - .word 19713 - .word 23997 - .word 20928 - .word 53849 - .word 49977 - .word 30100 - .word 19552 - .word 12987 - .word 23545 - .word 34237 - .word 19093 - .word 36035 - .word 18526 - .word 55738 - .word 22305 - .word 4173 - .word 53170 - .word 44844 - .word 21845 - .word 20134 - .word 6065 - .word 24986 - .word 20468 - .word 63684 - .word 40633 - .word 45810 - .word 20009 - .word 28281 - .word 10708 - .word 62070 - .word 18636 - .word 42557 - .word 63889 - .word 18197 - .word 18180 - .word 24464 - .word 43564 - .word 52277 - .word 36083 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 8651 - .word 37688 - .word 39193 - .word 47508 - .word 16415 - .word 0 - .word 0 - .word 0 - .word 61957 - .word 29915 - .word 7046 - .word 34440 - .word 16447 - .word 0 - .word 0 - .word 0 - .word 29909 - .word 15770 - .word 39264 - .word 33288 - .word 16479 - .word 0 - .word 0 - .word 0 - .word 16042 - .word 19253 - .word 38322 - .word 24114 - .word 28448 - .word 10617 - .word 17534 - .word 23595 - .word 64229 - .word 46570 - .word 41820 - .word 22037 - .word 23727 - .word 35273 - .word 27312 - .word 21520 - .word 36874 - .word 13569 - .word 51161 - .word 19966 - .word 7043 - .word 34288 - .word 50374 - .word 19448 - .word 38316 - .word 47529 - .word 14141 - .word 23075 - .word 12297 - .word 63477 - .word 47626 - .word 22556 - .word 1229 - .word 27571 - .word 10627 - .word 21001 - .word 30426 - .word 39536 - .word 34368 - .word 20483 - .word 63755 - .word 16362 - .word 32791 - .word 18932 - .word 1939 - .word 19329 - .word 44209 - .word 18417 - .word 1291 - .word 6677 - .word 4999 - .word 37888 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 36671 - .word 58224 - .word 51275 - .word 41572 - .word 16419 - .word 0 - .word 0 - .word 0 - .word 7476 - .word 4460 - .word 27226 - .word 52743 - .word 16454 - .word 0 - .word 0 - .word 0 - .word 18838 - .word 51641 - .word 26417 - .word 44610 - .word 16490 - .word 0 - .word 0 - .word 0 - .word 10710 - .word 48640 - .word 32083 - .word 25027 - .word 33620 - .word 55766 - .word 26236 - .word 24448 - .word 24667 - .word 39142 - .word 61464 - .word 22707 - .word 56170 - .word 8470 - .word 18789 - .word 22129 - .word 23296 - .word 62931 - .word 12196 - .word 20392 - .word 57231 - .word 2098 - .word 15792 - .word 19814 - .word 1704 - .word 49608 - .word 9547 - .word 23867 - .word 46419 - .word 24648 - .word 11891 - .word 23287 - .word 19376 - .word 1296 - .word 18277 - .word 21550 - .word 46223 - .word 56399 - .word 55660 - .word 20970 - .word 45364 - .word 18829 - .word 2399 - .word 19237 - .word 9387 - .word 60414 - .word 47613 - .word 18660 - .type _RRP,@object - .size _RRP,2080 - .align 16 -_LN_SQRT_TWO_PI: - .word 42293 - .word 9717 - .word 36419 - .word 60223 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _LN_SQRT_TWO_PI,@object - .size _LN_SQRT_TWO_PI,16 - .align 16 -_S10: - .word 26777 - .word 63736 - .word 61426 - .word 52480 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _S10,@object - .size _S10,16 - .align 16 -_W2: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _W2,@object - .size _W2,16 - .align 16 -_S06: - .word 26251 - .word 64205 - .word 25991 - .word 44448 - .word 49149 - .word 0 - .word 0 - .word 0 - .type _S06,@object - .size _S06,16 - .align 16 -_S02: - .word 39072 - .word 38974 - .word 13074 - .word 53901 - .word 49151 - .word 0 - .word 0 - .word 0 - .type _S02,@object - .size _S02,16 - .align 16 -_S12: - .word 13864 - .word 61389 - .word 41932 - .word 43701 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _S12,@object - .size _S12,16 - .align 16 -_S08: - .word 6565 - .word 12686 - .word 39772 - .word 32901 - .word 49149 - .word 0 - .word 0 - .word 0 - .type _S08,@object - .size _S08,16 - .align 16 -_S04: - .word 60211 - .word 16071 - .word 37206 - .word 35465 - .word 49150 - .word 0 - .word 0 - .word 0 - .type _S04,@object - .size _S04,16 - .align 16 -_A: - .long 0 - .long 1074790400 - .long 0 - .long 1075838976 - .long 0 - .long 1076887552 - .long 0 - .long 1077936128 - .long 0 - .long 1078984704 - .long 0 - .long 1080033280 - .long 0 - .long 1081081856 - .type _A,@object - .size _A,56 - .space 8, 0x00 # pad - .align 16 -_B: - .long 0 - .long 1070596096 - .long 0 - .long 1069547520 - .long 0 - .long 1068498944 - .long 0 - .long 1067450368 - .long 0 - .long 1066401792 - .long 0 - .long 1065353216 - .long 0 - .long 1064304640 - .type _B,@object - .size _B,56 - .space 8, 0x00 # pad - .align 16 -_C5: - .word 65250 - .word 31226 - .word 64195 - .word 51294 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 2062 - .word 11523 - .word 15490 - .word 40735 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 32754 - .word 31980 - .word 31403 - .word 49421 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 43174 - .word 39951 - .word 44282 - .word 37916 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 17740 - .word 24638 - .word 31711 - .word 45907 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 40119 - .word 37337 - .word 13155 - .word 65076 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 17604 - .word 23486 - .word 20029 - .word 41172 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 33185 - .word 5727 - .word 44714 - .word 50187 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 59315 - .word 25153 - .word 8859 - .word 35740 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 56975 - .word 59828 - .word 57702 - .word 65082 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 44451 - .word 24185 - .word 18874 - .word 60288 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 63603 - .word 63450 - .word 63770 - .word 55108 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 29224 - .word 39171 - .word 38378 - .word 49676 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 11522 - .word 59843 - .word 6225 - .word 34695 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 52920 - .word 16467 - .word 35974 - .word 40266 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 32911 - .word 20526 - .word 49212 - .word 40083 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 50633 - .word 19120 - .word 5716 - .word 64631 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 27278 - .word 20509 - .word 60679 - .word 63371 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 47711 - .word 23018 - .word 38994 - .word 51179 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 57200 - .word 35818 - .word 16826 - .word 37630 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 2413 - .word 19605 - .word 64315 - .word 49218 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 41670 - .word 6403 - .word 34702 - .word 40993 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 6011 - .word 2134 - .word 32659 - .word 52266 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42605 - .word 32107 - .word 35187 - .word 43545 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 3574 - .word 60450 - .word 45882 - .word 53610 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 2808 - .word 20835 - .word 5027 - .word 56256 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 3021 - .word 28181 - .word 33636 - .word 39028 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 14493 - .word 33433 - .word 18281 - .word 35725 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 39323 - .word 51299 - .word 2596 - .word 32961 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 28336 - .word 24032 - .word 53553 - .word 44237 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 52853 - .word 63658 - .word 36534 - .word 41882 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 47917 - .word 51227 - .word 19034 - .word 54081 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 51044 - .word 31166 - .word 18963 - .word 37856 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 35962 - .word 40199 - .word 871 - .word 65049 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 39889 - .word 54182 - .word 40011 - .word 55797 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 29169 - .word 47361 - .word 8730 - .word 38268 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 39706 - .word 37143 - .word 20168 - .word 33289 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 16433 - .word 42895 - .word 21426 - .word 43820 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 1625 - .word 9463 - .word 65082 - .word 51468 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 58247 - .word 1594 - .word 2790 - .word 48648 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 20868 - .word 31765 - .word 34026 - .word 33401 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 23737 - .word 4448 - .word 39427 - .word 52225 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 3456 - .word 40222 - .word 65015 - .word 38939 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 35551 - .word 41260 - .word 40325 - .word 54131 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 8973 - .word 47485 - .word 2472 - .word 41842 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 43053 - .word 31703 - .word 19755 - .word 33274 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36731 - .word 27611 - .word 11212 - .word 55816 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 63893 - .word 30149 - .word 45246 - .word 60594 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 47198 - .word 37666 - .word 57801 - .word 61119 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 25856 - .word 56265 - .word 35798 - .word 40402 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 6470 - .word 34102 - .word 54471 - .word 38654 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 9295 - .word 39366 - .word 17179 - .word 34081 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 45822 - .word 31766 - .word 42784 - .word 47587 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 5059 - .word 11140 - .word 37473 - .word 43359 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 58055 - .word 60744 - .word 5900 - .word 57832 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 38212 - .word 45613 - .word 58947 - .word 40054 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 7938 - .word 56610 - .word 27106 - .word 34591 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 32824 - .word 16764 - .word 60057 - .word 56720 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 10908 - .word 30532 - .word 62164 - .word 40510 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 63750 - .word 13029 - .word 27501 - .word 34026 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 33477 - .word 11068 - .word 13144 - .word 46215 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 42530 - .word 57434 - .word 58521 - .word 52671 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 18986 - .word 9605 - .word 39740 - .word 51163 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 28928 - .word 13634 - .word 42974 - .word 34196 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 35215 - .word 30142 - .word 47225 - .word 54824 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 28719 - .word 4316 - .word 52012 - .word 39873 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 4508 - .word 8703 - .word 27075 - .word 56773 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 26288 - .word 30246 - .word 8808 - .word 42848 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 44455 - .word 3575 - .word 25942 - .word 45691 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2794 - .word 62330 - .word 8461 - .word 63853 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 21479 - .word 44765 - .word 7865 - .word 64840 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 31874 - .word 33681 - .word 56423 - .word 65041 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 21473 - .word 44172 - .word 64358 - .word 41494 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 32222 - .word 10523 - .word 55592 - .word 40956 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 21434 - .word 30837 - .word 63797 - .word 34911 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 39649 - .word 32992 - .word 36682 - .word 50257 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 13095 - .word 39473 - .word 7384 - .word 44359 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 31843 - .word 64809 - .word 59872 - .word 60895 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 8672 - .word 5021 - .word 16314 - .word 40945 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 39714 - .word 18801 - .word 4723 - .word 36324 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 614 - .word 42734 - .word 5731 - .word 57950 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 64434 - .word 24821 - .word 2679 - .word 42435 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 12194 - .word 23846 - .word 20957 - .word 34750 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 10830 - .word 21930 - .word 2400 - .word 48308 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 22166 - .word 52453 - .word 43476 - .word 53777 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 47257 - .word 46311 - .word 24367 - .word 53391 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 54217 - .word 40926 - .word 61378 - .word 34907 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 63951 - .word 56465 - .word 60729 - .word 57145 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 26614 - .word 13946 - .word 18662 - .word 40698 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 1838 - .word 12847 - .word 15941 - .word 59142 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 4759 - .word 49273 - .word 38799 - .word 43731 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 26568 - .word 56798 - .word 57629 - .word 34217 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25804 - .word 39657 - .word 51638 - .word 34652 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 2771 - .word 24731 - .word 11874 - .word 33806 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 19474 - .word 34269 - .word 14010 - .word 33912 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 56824 - .word 53459 - .word 23053 - .word 42279 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 18742 - .word 13031 - .word 52011 - .word 42483 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 5937 - .word 64580 - .word 50859 - .word 35501 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 23055 - .word 38603 - .word 6524 - .word 51938 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 3664 - .word 27625 - .word 50793 - .word 45121 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 52489 - .word 3557 - .word 32438 - .word 62735 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 894 - .word 16203 - .word 51477 - .word 42152 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 34963 - .word 47118 - .word 6430 - .word 37322 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 26422 - .word 42936 - .word 42081 - .word 58310 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 13130 - .word 21399 - .word 54693 - .word 43505 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 30323 - .word 50910 - .word 30337 - .word 35076 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 38115 - .word 10576 - .word 10000 - .word 49442 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 37599 - .word 18432 - .word 63354 - .word 54317 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 58822 - .word 42699 - .word 64187 - .word 54575 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 64288 - .word 61574 - .word 23831 - .word 35266 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 11805 - .word 33285 - .word 40274 - .word 58365 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 20167 - .word 739 - .word 36989 - .word 41119 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 62447 - .word 46690 - .word 58491 - .word 60379 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 1463 - .word 47000 - .word 35484 - .word 44185 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 64817 - .word 40328 - .word 40776 - .word 61320 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60250 - .word 42976 - .word 52322 - .word 36598 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 26918 - .word 53639 - .word 1629 - .word 34777 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 192 - .word 43979 - .word 65472 - .word 34978 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 52261 - .word 56023 - .word 49807 - .word 42881 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 1627 - .word 46939 - .word 43260 - .word 43630 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 60557 - .word 13735 - .word 20430 - .word 35946 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 37731 - .word 15708 - .word 47147 - .word 53188 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 21753 - .word 29315 - .word 41089 - .word 45691 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 6001 - .word 56966 - .word 64901 - .word 64096 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 60203 - .word 9392 - .word 60017 - .word 43055 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 63698 - .word 8838 - .word 668 - .word 38058 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 63354 - .word 11979 - .word 38628 - .word 58569 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 14495 - .word 23154 - .word 18917 - .word 44293 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 21391 - .word 34042 - .word 43308 - .word 35313 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 19364 - .word 56057 - .word 34969 - .word 50274 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 24688 - .word 56191 - .word 53239 - .word 54710 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 29387 - .word 5660 - .word 12964 - .word 55444 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 35686 - .word 64227 - .word 46433 - .word 35526 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 36666 - .word 59843 - .word 47733 - .word 59258 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 36678 - .word 17293 - .word 20572 - .word 41425 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 18431 - .word 63251 - .word 49151 - .word 61285 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 60545 - .word 37455 - .word 56348 - .word 44514 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 37261 - .word 1613 - .word 29792 - .word 57954 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15271 - .word 17124 - .word 50042 - .word 38057 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 7933 - .word 60764 - .word 31972 - .word 35498 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 36698 - .word 903 - .word 21735 - .word 35834 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 61921 - .word 64342 - .word 37428 - .word 43367 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 25723 - .word 57108 - .word 17005 - .word 44538 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 55361 - .word 30601 - .word 552 - .word 36302 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 60144 - .word 14680 - .word 32635 - .word 54172 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 56958 - .word 12456 - .word 10479 - .word 46147 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 483 - .word 34108 - .word 14727 - .word 65164 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 43794 - .word 49057 - .word 50532 - .word 43789 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 12225 - .word 29228 - .word 35085 - .word 38633 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 54219 - .word 64754 - .word 11030 - .word 58760 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 52932 - .word 63137 - .word 8758 - .word 44908 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 27270 - .word 37632 - .word 62601 - .word 35495 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 53773 - .word 63879 - .word 47305 - .word 50923 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 29965 - .word 53650 - .word 14162 - .word 55014 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 10444 - .word 24307 - .word 52989 - .word 56120 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 12949 - .word 6021 - .word 2059 - .word 35728 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 41140 - .word 26313 - .word 26076 - .word 59954 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 53675 - .word 12584 - .word 54309 - .word 41661 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 28849 - .word 13964 - .word 11627 - .word 61991 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 33057 - .word 63851 - .word 41026 - .word 44769 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 61939 - .word 60366 - .word 37868 - .word 56319 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _C5,@object - .size _C5,2688 - .align 16 -_C4: - .word 39764 - .word 13333 - .word 46799 - .word 55432 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 6306 - .word 35111 - .word 59607 - .word 63624 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 40772 - .word 10749 - .word 40067 - .word 48311 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 17977 - .word 41258 - .word 10043 - .word 63023 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 17757 - .word 54940 - .word 38650 - .word 52104 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 36152 - .word 14316 - .word 50442 - .word 43322 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 48990 - .word 25502 - .word 42020 - .word 58640 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 57431 - .word 49505 - .word 17362 - .word 46284 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 34483 - .word 2420 - .word 54299 - .word 50782 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 37575 - .word 3091 - .word 26415 - .word 50860 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 5185 - .word 25440 - .word 63351 - .word 37946 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 37934 - .word 12918 - .word 47534 - .word 41618 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 59537 - .word 51974 - .word 16286 - .word 51369 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 31611 - .word 51820 - .word 58572 - .word 58708 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 57757 - .word 54077 - .word 23114 - .word 64558 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 63584 - .word 48263 - .word 62815 - .word 37616 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 281 - .word 14439 - .word 46939 - .word 38182 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 63169 - .word 10307 - .word 53265 - .word 44896 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 22654 - .word 54923 - .word 22649 - .word 42855 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 37607 - .word 64061 - .word 25856 - .word 50581 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 47296 - .word 11647 - .word 64103 - .word 45853 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 30544 - .word 55384 - .word 11467 - .word 54194 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 39553 - .word 55407 - .word 30581 - .word 33698 - .word 49111 - .word 0 - .word 0 - .word 0 - .type _C4,@object - .size _C4,368 - .align 16 -_C3: - .word 28854 - .word 1182 - .word 12345 - .word 55415 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 12848 - .word 12413 - .word 26149 - .word 42266 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 13313 - .word 43952 - .word 210 - .word 35312 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 13187 - .word 60452 - .word 5475 - .word 43161 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 20972 - .word 51120 - .word 32272 - .word 61954 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 22296 - .word 60123 - .word 44502 - .word 16231 - .word 21517 - .word 49855 - .word 35525 - .word 48979 - .word 44698 - .word 63620 - .word 45930 - .word 16192 - .word 34147 - .word 51190 - .word 16340 - .word 48941 - .word 42301 - .word 55313 - .word 4730 - .word 16154 - .word 35999 - .word 24973 - .word 36325 - .word 48903 - .word 63277 - .word 55760 - .word 33014 - .word 16117 - .word 6314 - .word 46281 - .word 52205 - .word 48867 - .word 12513 - .word 17037 - .word 21130 - .word 16082 - .word 49946 - .word 1999 - .word 4813 - .word 48833 - .word 595 - .word 34534 - .word 265 - .word 16049 - .word 36690 - .word 64093 - .word 7546 - .word 48800 - .type _C3,@object - .size _C3,176 - .align 16 -_LM: - .word 64512 - .word 46577 - .word 49946 - .word 47894 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _LM,@object - .size _LM,16 - .align 16 -_LGAMMA_C2: - .word 3599 - .word 7250 - .word 52710 - .word 63693 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 31159 - .word 473 - .word 17060 - .word 35466 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 23705 - .word 29125 - .word 24135 - .word 63417 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 8259 - .word 13793 - .word 15470 - .word 38689 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 1592 - .word 43035 - .word 5286 - .word 33882 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 34241 - .word 35161 - .word 18170 - .word 34381 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 17215 - .word 38817 - .word 26343 - .word 16274 - .word 43407 - .word 38166 - .word 8095 - .word 49029 - .word 9256 - .word 10755 - .word 64736 - .word 16248 - .word 19293 - .word 8064 - .word 12058 - .word 49006 - .word 55284 - .word 28504 - .word 33554 - .word 16226 - .word 50892 - .word 40251 - .word 63876 - .word 48982 - .word 34903 - .word 32886 - .word 50950 - .word 16204 - .word 5270 - .word 55866 - .word 9779 - .word 48962 - .word 8284 - .word 46907 - .word 3681 - .word 16183 - .word 12968 - .word 35363 - .word 2442 - .word 48942 - .word 52637 - .word 49970 - .word 50463 - .word 16163 - .word 28134 - .word 34361 - .word 26628 - .word 48914 - .type _LGAMMA_C2,@object - .size _LGAMMA_C2,192 - .align 16 -_C1: - .word 51111 - .word 32176 - .word 26595 - .word 37828 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 38980 - .word 38974 - .word 13074 - .word 53901 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30416 - .word 21910 - .word 43743 - .word 52518 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 47709 - .word 16075 - .word 37206 - .word 35465 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 15719 - .word 21694 - .word 57533 - .word 54364 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 13628 - .word 45309 - .word 46092 - .word 16325 - .word 18814 - .word 7557 - .word 28730 - .word 49090 - .word 30522 - .word 27866 - .word 4275 - .word 16320 - .word 35905 - .word 26356 - .word 32871 - .word 49084 - .word 38506 - .word 60969 - .word 40989 - .word 16313 - .word 18199 - .word 53198 - .word 18595 - .word 49079 - .word 21817 - .word 41319 - .word 22094 - .word 16309 - .word 3261 - .word 2506 - .word 46646 - .word 49075 - .word 41261 - .word 44393 - .word 26269 - .word 16306 - .word 45347 - .word 5923 - .word 3109 - .word 49073 - .word 3843 - .word 55608 - .word 31192 - .word 16299 - .word 33944 - .word 58380 - .word 1271 - .word 49050 - .type _C1,@object - .size _C1,176 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xc3300000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x40080000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 4 -.L_2il0floatpacket.8: - .long 0x3f800000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,4 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_S26: - .long 1826776023 - .long 1070820717 - .type _S26,@object - .size _S26,8 - .align 4 -_S22: - .long 342869935 - .long 3214497781 - .type _S22,@object - .size _S22,8 - .align 4 -_S18: - .long 1060196486 - .long 3216761200 - .type _S18,@object - .size _S18,8 - .align 4 -_S14: - .long 3265047626 - .long 3217180894 - .type _S14,@object - .size _S14,8 - .align 4 -_W4: - .long 381774871 - .long 3211182444 - .type _W4,@object - .size _W4,8 - .align 4 -_S28: - .long 2468013457 - .long 3218873328 - .type _S28,@object - .size _S28,8 - .align 4 -_S24: - .long 3872164012 - .long 3218225849 - .type _S24,@object - .size _S24,8 - .align 4 -_S20: - .long 1339685656 - .long 3216855407 - .type _S20,@object - .size _S20,8 - .align 4 -_S16: - .long 618803264 - .long 3217033139 - .type _S16,@object - .size _S16,8 - .align 4 -_PBIG: - .long 4294967295 - .long 2146435071 - .type _PBIG,@object - .size _PBIG,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgammaf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgammaf.S deleted file mode 100644 index dadd3618b9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgammaf.S +++ /dev/null @@ -1,6068 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lgammaf.c" - .text -..TXTST0: -# -- Begin lgammaf - .text - .align 16,0x90 - .globl lgammaf -lgammaf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_lgammaf.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $120, %rsp - .cfi_def_cfa_offset 176 - xorb %r12b, %r12b - movss %xmm0, 112(%rsp) - xorb %bpl, %bpl - movzwl 114(%rsp), %r15d - andl $32640, %r15d - movd %xmm0, %eax - shrl $7, %r15d - andl $8388607, %eax - movl %r15d, %r14d - shll $23, %r14d - movb 115(%rsp), %r13b - orl %eax, %r14d - andb $-128, %r13b -..B1.2: - fnstcw 110(%rsp) -..B1.3: -..___tag_value_lgammaf.16: - call fegetround@PLT -..___tag_value_lgammaf.17: -..B1.156: - movl %eax, %ebx -..B1.4: - testl %ebx, %ebx - je ..B1.6 -..B1.5: - xorl %edi, %edi - movb $1, %r12b -..___tag_value_lgammaf.18: - call fesetround@PLT -..___tag_value_lgammaf.19: -..B1.6: - movzwl 110(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.10 -..B1.7: - orl $-64768, %edx - movw %dx, 108(%rsp) -..B1.8: - fldcw 108(%rsp) -..B1.9: - movb $1, %bpl -..B1.10: - cmpl $255, %r15d - jne ..B1.16 -..B1.11: - testb %bpl, %bpl - je ..B1.13 -..B1.12: - fldcw 110(%rsp) -..B1.13: - testb %r12b, %r12b - je ..B1.15 -..B1.14: - movl %ebx, %edi -..___tag_value_lgammaf.20: - call fesetround@PLT -..___tag_value_lgammaf.21: -..B1.15: - movss 112(%rsp), %xmm0 - mulss %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.16: - testl %r14d, %r14d - je ..B1.149 -..B1.17: - testb %r13b, %r13b - jne ..B1.74 -..B1.18: - cmpl $2084876174, %r14d - jae ..B1.136 -..B1.19: - movss 112(%rsp), %xmm0 - ucomiss .L_2il0floatpacket.6(%rip), %xmm0 - jp ..B1.20 - je ..B1.131 -..B1.20: - cmpl $1174405120, %r14d - jb ..B1.26 -..B1.21: - fldt .L_2il0floatpacket.1(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movss %xmm0, 56(%rsp) - pxor %xmm0, %xmm0 - flds 56(%rsp) - cvtss2sd 56(%rsp), %xmm0 - fsub %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fstps 32(%rsp) - fldt (%rax) - fstpt 16(%rsp) - call log@PLT -..B1.157: - fldt (%rsp) - testb %r12b, %r12b - movsd %xmm0, 56(%rsp) - fmull 56(%rsp) - fstpt (%rsp) - je ..B1.23 -..B1.22: - movl %ebx, %edi -..___tag_value_lgammaf.42: - call fesetround@PLT -..___tag_value_lgammaf.43: -..B1.23: - fldt (%rsp) - testb %bpl, %bpl - fldt 16(%rsp) - faddp %st, %st(1) - fsubs 32(%rsp) - fstps 104(%rsp) - je ..B1.124 -..B1.24: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.26: - cmpl $1082130432, %r14d - jb ..B1.33 -..B1.27: - addl $-1082130432, %r14d - lea _A(%rip), %rax - sarl $23, %r14d - lea _B(%rip), %rdx - movslq %r14d, %r14 - lea _C5(%rip), %r8 - movss %xmm0, 56(%rsp) - lea (,%r14,8), %ecx - flds 56(%rsp) - lea (%r14,%r14,2), %esi - movslq %ecx, %rcx - lea _C5_0(%rip), %r9 - movslq %esi, %rsi - testb %r12b, %r12b - fsubs (%rax,%r14,4) - fmuls (%rdx,%r14,4) - fld %st(0) - fmul %st(1), %st - fldl 8(%r8,%rcx,8) - fmul %st(1), %st - fldl (%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 40(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 32(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 8(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl (%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl 56(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 48(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 24(%r8,%rcx,8) - fmulp %st, %st(3) - fxch %st(2) - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(2) - faddl 16(%r8,%rcx,8) - fmulp %st, %st(1) - faddl 16(%r9,%rsi,8) - fstpt (%rsp) - je ..B1.30 -..B1.28: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf.44: - call fesetround@PLT -..___tag_value_lgammaf.45: -..B1.29: - fldt 80(%rsp) -..B1.30: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.31: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.33: - ucomiss .L_2il0floatpacket.4(%rip), %xmm0 - jp ..B1.34 - je ..B1.126 -..B1.34: - movss %xmm0, 56(%rsp) - cmpl $1073741824, %r14d - flds 56(%rsp) - jbe ..B1.40 -..B1.35: - fldt .L_2il0floatpacket.5(%rip) - fld %st(1) - lea _C4(%rip), %r9 - lea 8+_C4(%rip), %rax - fmul %st(2), %st - lea 32+_C4(%rip), %r10 - fldl (%rax) - lea 40+_C4(%rip), %rdx - fmul %st(1), %st - lea 64+_C4(%rip), %r11 - fldl (%r9) - lea 72+_C4(%rip), %rcx - fmul %st(2), %st - fxch %st(1) - faddl (%rdx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - lea 48+_C4(%rip), %r13 - lea 56+_C4(%rip), %rsi - fmul %st(2), %st - fxch %st(1) - faddl (%r11) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - lea 16+_C4(%rip), %r14 - lea 24+_C4(%rip), %r8 - fmul %st(2), %st - fxch %st(1) - faddl (%r13) - fmul %st(2), %st - fxch %st(1) - faddl (%r8) - lea 80+_C4(%rip), %r15 - testb %r12b, %r12b - fmul %st(4), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(3) - fsubrp %st, %st(4) - faddl (%r14) - fmulp %st, %st(1) - faddl (%r15) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.37 -..B1.36: - movl %ebx, %edi -..___tag_value_lgammaf.46: - call fesetround@PLT -..___tag_value_lgammaf.47: -..B1.37: - fldt (%rsp) - testb %bpl, %bpl - fstps 104(%rsp) - je ..B1.124 -..B1.38: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.40: - cmpl $1071644672, %r14d - jb ..B1.47 -..B1.41: - fld %st(0) - lea 16+_C3(%rip), %rax - fmul %st(1), %st - lea 48+_C3(%rip), %rdx - fldl (%rax) - lea 32+_C3(%rip), %rcx - fmul %st(1), %st - lea 64+_C3(%rip), %rsi - lea 8+_C3(%rip), %r8 - lea 40+_C3(%rip), %r9 - lea 24+_C3(%rip), %r10 - lea 56+_C3(%rip), %r11 - lea _C3(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B1.44 -..B1.42: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf.48: - call fesetround@PLT -..___tag_value_lgammaf.49: -..B1.43: - fldt 80(%rsp) -..B1.44: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.45: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.47: - cmpl $1069547520, %r14d - jb ..B1.54 -..B1.48: - fld %st(0) - lea 16+_LGAMMAF_C2(%rip), %rax - fmul %st(1), %st - lea 48+_LGAMMAF_C2(%rip), %rdx - fldl (%rax) - lea 32+_LGAMMAF_C2(%rip), %rcx - fmul %st(1), %st - lea 64+_LGAMMAF_C2(%rip), %rsi - lea 8+_LGAMMAF_C2(%rip), %r8 - lea 40+_LGAMMAF_C2(%rip), %r9 - lea 24+_LGAMMAF_C2(%rip), %r10 - lea 56+_LGAMMAF_C2(%rip), %r11 - lea _LGAMMAF_C2(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B1.51 -..B1.49: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf.50: - call fesetround@PLT -..___tag_value_lgammaf.51: -..B1.50: - fldt 80(%rsp) -..B1.51: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.52: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.54: - cmpl $1067450368, %r14d - jb ..B1.61 -..B1.55: - lea _LM(%rip), %rax - lea 16+_C1(%rip), %rdx - lea 48+_C1(%rip), %rcx - lea 32+_C1(%rip), %rsi - lea 64+_C1(%rip), %r8 - lea 8+_C1(%rip), %r9 - lea 40+_C1(%rip), %r10 - lea 24+_C1(%rip), %r11 - fldl (%rdx) - lea 56+_C1(%rip), %r13 - lea _C1(%rip), %r14 - testb %r12b, %r12b - fxch %st(1) - fsubl (%rax) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(2) - faddl (%rcx) - fmul %st(2), %st - faddl (%rsi) - fmul %st(2), %st - faddl (%r8) - fmulp %st, %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmul %st(2), %st - faddl (%r13) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r14) - fstpt (%rsp) - je ..B1.58 -..B1.56: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf.52: - call fesetround@PLT -..___tag_value_lgammaf.53: -..B1.57: - fldt 80(%rsp) -..B1.58: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.59: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.61: - cmpl $1065353216, %r14d - jb ..B1.68 -..B1.62: - fld %st(0) - lea 16+_C0(%rip), %rax - fmul %st(1), %st - lea 48+_C0(%rip), %rdx - fldl (%rax) - lea 32+_C0(%rip), %rcx - fmul %st(1), %st - lea 64+_C0(%rip), %rsi - lea 8+_C0(%rip), %r8 - lea 40+_C0(%rip), %r9 - lea 24+_C0(%rip), %r10 - lea 56+_C0(%rip), %r11 - lea _C0(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B1.65 -..B1.63: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf.54: - call fesetround@PLT -..___tag_value_lgammaf.55: -..B1.64: - fldt 80(%rsp) -..B1.65: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.66: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.68: - fldt .L_2il0floatpacket.0(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fadd %st(1), %st - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value_lgammaf.57: - call lgammaf_pos -..___tag_value_lgammaf.58: -..B1.159: - fldt 32(%rsp) - fxch %st(1) - fstpt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B1.158: - movsd %xmm0, 56(%rsp) - testb %r12b, %r12b - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - je ..B1.71 -..B1.69: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf.60: - call fesetround@PLT -..___tag_value_lgammaf.61: -..B1.70: - fldt 80(%rsp) -..B1.71: - fldt (%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.72: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.74: - movss 112(%rsp), %xmm0 - call nearbyintf@PLT -..B1.160: - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm1 - movss 112(%rsp), %xmm4 - ucomiss %xmm1, %xmm4 - jp ..B1.75 - je ..B1.144 -..B1.75: - cmpl $1073741824, %r14d - jae ..B1.86 -..B1.76: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm4, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(2), %st - jae ..B1.141 - jp ..B1.141 -..B1.77: - fldt 16(%rsp) -..B1.78: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B1.79 - jb ..B1.78 -..B1.79: - fstp %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..B1.80: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B1.162: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_lgammaf.63: - call lgammaf_pos -..___tag_value_lgammaf.64: -..B1.161: - fldt 16(%rsp) - fxch %st(1) - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - testb %r12b, %r12b - je ..B1.83 -..B1.81: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf.66: - call fesetround@PLT -..___tag_value_lgammaf.67: -..B1.82: - fldt 80(%rsp) -..B1.83: - fldt 16(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.84: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.86: - cmpl $1082130432, %r14d - jae ..B1.103 -..B1.87: - movss .L_2il0floatpacket.2(%rip), %xmm0 - lea _LRIB(%rip), %rdx - movss .L_2il0floatpacket.3(%rip), %xmm2 - subss %xmm4, %xmm0 - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm1 - addss %xmm2, %xmm1 - movss %xmm1, 104(%rsp) - pxor %xmm1, %xmm1 - cvtss2sd %xmm4, %xmm1 - movl 104(%rsp), %ecx - andl $1, %ecx - movss 104(%rsp), %xmm3 - subss %xmm2, %xmm3 - movss %xmm3, 104(%rsp) - lea (%rcx,%rcx,2), %eax - comisd (%rdx,%rax,8), %xmm1 - jbe ..B1.90 -..B1.88: - movsd 16(%rdx,%rax,8), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B1.90 -..B1.89: - movss %xmm4, 56(%rsp) - flds 56(%rsp) - shll $2, %ecx - fsubl 8(%rdx,%rax,8) - lea _LRP(%rip), %rax - fldl (%rax,%rcx,8) - fmul %st(1), %st - faddl 8(%rax,%rcx,8) - fmul %st(1), %st - faddl 16(%rax,%rcx,8) - fmulp %st, %st(1) - faddl 24(%rax,%rcx,8) - fstpt (%rsp) - jmp ..B1.98 -..B1.90: - lea _RRIB(%rip), %rdx - comisd (%rdx,%rax,8), %xmm1 - jbe ..B1.93 -..B1.91: - movsd 16(%rdx,%rax,8), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B1.93 -..B1.92: - movss %xmm4, 56(%rsp) - flds 56(%rsp) - shll $2, %ecx - fsubl 8(%rdx,%rax,8) - lea _RRP(%rip), %rax - fldl (%rax,%rcx,8) - fmul %st(1), %st - faddl 8(%rax,%rcx,8) - fmul %st(1), %st - faddl 16(%rax,%rcx,8) - fmulp %st, %st(1) - faddl 24(%rax,%rcx,8) - fstpt (%rsp) - jmp ..B1.98 -..B1.93: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm4, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt (%rsp) - fldt (%rsp) - fcomip %st(2), %st - jae ..B1.142 - jp ..B1.142 -..B1.94: - fldt (%rsp) -..B1.95: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B1.96 - jb ..B1.95 -..B1.96: - fstp %st(2) - fxch %st(1) - fstpt (%rsp) - fstpt 80(%rsp) -..B1.97: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B1.164: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstl 16(%rsp) - fstpt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 16(%rsp) - fstpt (%rsp) -..___tag_value_lgammaf.69: - call lgammaf_pos -..___tag_value_lgammaf.70: -..B1.163: - addq $16, %rsp - .cfi_def_cfa_offset 176 - fsubl 16(%rsp) - fstpt (%rsp) -..B1.98: - testb %r12b, %r12b - je ..B1.100 -..B1.99: - movl %ebx, %edi -..___tag_value_lgammaf.72: - call fesetround@PLT -..___tag_value_lgammaf.73: -..B1.100: - fldt (%rsp) - testb %bpl, %bpl - fstps 104(%rsp) - je ..B1.124 -..B1.101: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.103: - cmpl $1091567616, %r14d - jae ..B1.114 -..B1.104: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm4, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(2), %st - jae ..B1.143 - jp ..B1.143 -..B1.105: - fldt 16(%rsp) -..B1.106: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B1.107 - jb ..B1.106 -..B1.107: - fstp %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..B1.108: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B1.166: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_lgammaf.75: - call lgammaf_pos -..___tag_value_lgammaf.76: -..B1.165: - fldt 16(%rsp) - fxch %st(1) - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - testb %r12b, %r12b - je ..B1.111 -..B1.109: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf.78: - call fesetround@PLT -..___tag_value_lgammaf.79: -..B1.110: - fldt 80(%rsp) -..B1.111: - fldt 16(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.112: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.114: - cmpl $1174405120, %r14d - jb ..B1.120 -..B1.115: - fldt .L_2il0floatpacket.1(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movss %xmm4, 56(%rsp) - flds 56(%rsp) - fsts (%rsp) - fsub %st, %st(1) - fxch %st(1) - fstpt 8(%rsp) - fchs - fstl 96(%rsp) - movsd 96(%rsp), %xmm0 - fstpt 40(%rsp) - fldt (%rax) - fstpt 24(%rsp) - call log@PLT -..B1.168: - fldt 8(%rsp) - lea _S16(%rip), %rax - fldt 24(%rsp) - lea _S14(%rip), %rdx - fldt 40(%rsp) - lea _S12(%rip), %rcx - movss .L_2il0floatpacket.3(%rip), %xmm2 - lea _S10(%rip), %rsi - fldl (%rax) - lea _S08(%rip), %r8 - movss %xmm2, 104(%rsp) - lea _S06(%rip), %r9 - movss 104(%rsp), %xmm1 - lea _S04(%rip), %r10 - movsd %xmm0, 56(%rsp) - lea _S02(%rip), %r11 - fxch %st(3) - fmull 56(%rsp) - subss 112(%rsp), %xmm1 - fsubp %st, %st(2) - movss %xmm1, 104(%rsp) - movss 104(%rsp), %xmm3 - fxch %st(1) - fsubs (%rsp) - subss %xmm2, %xmm3 - movss %xmm3, 104(%rsp) - movss 104(%rsp), %xmm4 - movss %xmm4, 56(%rsp) - fxch %st(1) - fsubs 56(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fmul %st, %st(2) - andb $127, 73(%rsp) - fldt 64(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - fxch %st(2) - faddl (%rdx) - fmul %st(2), %st - faddl (%rcx) - fmul %st(2), %st - faddl (%rsi) - fmul %st(2), %st - faddl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(1) - fstpt 8(%rsp) - call log@PLT -..B1.167: - movsd %xmm0, 56(%rsp) - testb %r12b, %r12b - fldl 56(%rsp) - je ..B1.117 -..B1.116: - movl %ebx, %edi - fstpl (%rsp) -..___tag_value_lgammaf.80: - call fesetround@PLT -..___tag_value_lgammaf.81: -..B1.172: - fldl (%rsp) -..B1.117: - fldt 8(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.118: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.120: - flds 112(%rsp) - movss .L_2il0floatpacket.3(%rip), %xmm1 - fchs - movaps %xmm1, %xmm0 - fstl 96(%rsp) - subss %xmm4, %xmm0 - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm2 - movsd 96(%rsp), %xmm0 - subss %xmm1, %xmm2 - movss %xmm2, 104(%rsp) - movss 104(%rsp), %xmm3 - movss %xmm3, 56(%rsp) - fstpt 40(%rsp) - fldt 40(%rsp) - flds 56(%rsp) - fsubrp %st, %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fstpt 24(%rsp) - call log@PLT -..B1.171: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fchs - fldt 56(%rsp) - fstpt (%rsp) - fstpt 24(%rsp) -..___tag_value_lgammaf.83: - call lgammaf_pos -..___tag_value_lgammaf.84: -..B1.170: - fldt 24(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - fldt 24(%rsp) - lea _S14(%rip), %rax - fld %st(0) - lea _S16(%rip), %r8 - fmul %st(1), %st - lea _S10(%rip), %rdx - fxch %st(3) - fsubrp %st, %st(2) - fldl (%rax) - lea _S12(%rip), %r9 - fmul %st(3), %st - lea _S06(%rip), %rcx - fldl (%r8) - lea _S08(%rip), %r10 - fmul %st(4), %st - fxch %st(1) - faddl (%rdx) - fmul %st(4), %st - fxch %st(1) - faddl (%r9) - fmul %st(4), %st - fxch %st(1) - faddl (%rcx) - fmul %st(4), %st - fxch %st(1) - faddl (%r10) - fmul %st(4), %st - lea _S02(%rip), %rsi - fxch %st(1) - faddl (%rsi) - lea _S04(%rip), %r11 - fmulp %st, %st(2) - faddl (%r11) - fmulp %st, %st(3) - andb $127, 73(%rsp) - faddp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(1) - fstpt 8(%rsp) - fldt 64(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B1.169: - fldt 8(%rsp) - testb %r12b, %r12b - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - je ..B1.122 -..B1.121: - movl %ebx, %edi - fstpl (%rsp) - fstpt 8(%rsp) -..___tag_value_lgammaf.86: - call fesetround@PLT -..___tag_value_lgammaf.87: -..B1.173: - fldt 8(%rsp) - fldl (%rsp) -..B1.122: - testb %bpl, %bpl - fsubrp %st, %st(1) - fstps 104(%rsp) - je ..B1.124 -..B1.123: - fldcw 110(%rsp) -..B1.124: - movss 104(%rsp), %xmm0 -..B1.125: - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.126: - testb %bpl, %bpl - je ..B1.128 -..B1.127: - fldcw 110(%rsp) -..B1.128: - testb %r12b, %r12b - je ..B1.130 -..B1.129: - movl %ebx, %edi -..___tag_value_lgammaf.108: - call fesetround@PLT -..___tag_value_lgammaf.109: -..B1.130: - pxor %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.131: - testb %bpl, %bpl - je ..B1.133 -..B1.132: - fldcw 110(%rsp) -..B1.133: - testb %r12b, %r12b - je ..B1.135 -..B1.134: - movl %ebx, %edi -..___tag_value_lgammaf.130: - call fesetround@PLT -..___tag_value_lgammaf.131: -..B1.135: - pxor %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.136: - testb %r12b, %r12b - je ..B1.138 -..B1.137: - movl %ebx, %edi -..___tag_value_lgammaf.152: - call fesetround@PLT -..___tag_value_lgammaf.153: -..B1.138: - lea _PBIG(%rip), %rax - testb %bpl, %bpl - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 104(%rsp) - je ..B1.124 -..B1.139: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.141: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B1.80 -..B1.142: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B1.97 -..B1.143: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B1.108 -..B1.144: - testb %r12b, %r12b - je ..B1.146 -..B1.145: - movl %ebx, %edi -..___tag_value_lgammaf.154: - call fesetround@PLT -..___tag_value_lgammaf.155: -..B1.146: - movss .L_2il0floatpacket.6(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - je ..B1.124 -..B1.147: - fldcw 110(%rsp) - jmp ..B1.124 -..B1.149: - testb %r12b, %r12b - je ..B1.151 -..B1.150: - movl %ebx, %edi -..___tag_value_lgammaf.156: - call fesetround@PLT -..___tag_value_lgammaf.157: -..B1.151: - movss .L_2il0floatpacket.6(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - je ..B1.124 -..B1.152: - fldcw 110(%rsp) - jmp ..B1.124 - .align 16,0x90 - .cfi_endproc - .type lgammaf,@function - .size lgammaf,.-lgammaf - .data -# -- End lgammaf - .text -# -- Begin lgammaf_pos - .text - .align 16,0x90 -lgammaf_pos: -# parameter 1: 8 + %rsp -..B2.1: - .cfi_startproc -..___tag_value_lgammaf_pos.159: -..L160: - - fldt 8(%rsp) - fstl -8(%rsp) - fldt .L_2il0floatpacket.7(%rip) - movzwl -2(%rsp), %ecx - andl $32752, %ecx - shrl $4, %ecx - movl -4(%rsp), %eax - shll $20, %ecx - andl $1048575, %eax - orl %eax, %ecx - cmpl $1074790400, %ecx - jb ..B2.3 -..B2.2: - fstp %st(0) - addl $-1074790400, %ecx - lea _A(%rip), %rax - sarl $20, %ecx - lea _B(%rip), %rdx - movslq %ecx, %rcx - lea _C5(%rip), %r9 - lea _C5_0(%rip), %r8 - lea (,%rcx,8), %esi - movslq %esi, %rsi - lea (%rcx,%rcx,2), %edi - movslq %edi, %rdi - flds (%rax,%rcx,4) - fsubrp %st, %st(1) - fmuls (%rdx,%rcx,4) - fld %st(0) - fmul %st(1), %st - fldl (%r9,%rsi,8) - fmul %st(1), %st - fldl 8(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl 32(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl 40(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl (%r8,%rdi,8) - fmul %st(2), %st - fxch %st(1) - faddl 8(%r8,%rdi,8) - fmul %st(2), %st - fxch %st(1) - faddl 48(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl 56(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl 16(%r9,%rsi,8) - fmulp %st, %st(2) - faddl 24(%r9,%rsi,8) - fmulp %st, %st(2) - faddl 16(%r8,%rdi,8) - faddp %st, %st(1) - ret -..B2.3: - cmpl $1073741824, %ecx - jne ..B2.5 -..B2.4: - fstp %st(1) - ret -..B2.5: - jbe ..B2.7 -..B2.6: - fstp %st(0) - fldt .L_2il0floatpacket.5(%rip) - fld %st(1) - lea _C4(%rip), %rax - lea 32+_C4(%rip), %rdx - fmul %st(2), %st - lea 8+_C4(%rip), %r9 - fldl (%rax) - lea 40+_C4(%rip), %r10 - lea 64+_C4(%rip), %rcx - lea 72+_C4(%rip), %r11 - lea 48+_C4(%rip), %rsi - lea 56+_C4(%rip), %rax - lea 16+_C4(%rip), %rdi - lea 80+_C4(%rip), %r8 - fmul %st(1), %st - fldl (%r9) - fmul %st(2), %st - fxch %st(1) - faddl (%rdx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - fmul %st(2), %st - fxch %st(1) - faddl (%r11) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - fmul %st(2), %st - fxch %st(1) - faddl (%rax) - fmul %st(2), %st - fxch %st(1) - faddl (%rdi) - lea 24+_C4(%rip), %rdx - fmulp %st, %st(2) - faddl (%rdx) - fmul %st(3), %st - fxch %st(1) - faddl (%r8) - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fmulp %st, %st(1) - ret -..B2.7: - cmpl $1073479680, %ecx - jb ..B2.9 -..B2.8: - fstp %st(0) - fld %st(0) - lea 8+_C3(%rip), %rax - lea 16+_C3(%rip), %r8 - lea 40+_C3(%rip), %rdx - lea 48+_C3(%rip), %r9 - lea 24+_C3(%rip), %rcx - lea 32+_C3(%rip), %r10 - lea 56+_C3(%rip), %rsi - lea 64+_C3(%rip), %r11 - lea _C3(%rip), %rdi - fmul %st(1), %st - fldl (%rax) - fmul %st(1), %st - fldl (%r8) - fmul %st(2), %st - fxch %st(1) - faddl (%rdx) - fmul %st(2), %st - fxch %st(1) - faddl (%r9) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - fmulp %st, %st(2) - faddl (%r11) - fmulp %st, %st(2) - faddl (%rdi) - faddp %st, %st(1) - ret -..B2.9: - cmpl $1073217536, %ecx - jb ..B2.11 -..B2.10: - fstp %st(0) - fld %st(0) - lea 8+_LGAMMAF_C2(%rip), %rax - lea 16+_LGAMMAF_C2(%rip), %r8 - lea 40+_LGAMMAF_C2(%rip), %rdx - lea 48+_LGAMMAF_C2(%rip), %r9 - lea 24+_LGAMMAF_C2(%rip), %rcx - lea 32+_LGAMMAF_C2(%rip), %r10 - lea 56+_LGAMMAF_C2(%rip), %rsi - lea 64+_LGAMMAF_C2(%rip), %r11 - lea _LGAMMAF_C2(%rip), %rdi - fmul %st(1), %st - fldl (%rax) - fmul %st(1), %st - fldl (%r8) - fmul %st(2), %st - fxch %st(1) - faddl (%rdx) - fmul %st(2), %st - fxch %st(1) - faddl (%r9) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - fmulp %st, %st(2) - faddl (%r11) - fmulp %st, %st(2) - faddl (%rdi) - faddp %st, %st(1) - ret -..B2.11: - cmpl $1072955392, %ecx - jb ..B2.13 -..B2.12: - fstp %st(0) - lea _LM(%rip), %rax - lea 8+_C1(%rip), %rdx - lea 16+_C1(%rip), %r9 - lea 40+_C1(%rip), %rcx - lea 48+_C1(%rip), %r10 - lea 24+_C1(%rip), %rsi - lea 32+_C1(%rip), %r11 - lea 56+_C1(%rip), %rdi - fldl (%rax) - lea 64+_C1(%rip), %rax - lea _C1(%rip), %r8 - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldl (%rdx) - fmul %st(1), %st - fldl (%r9) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - fmul %st(2), %st - fxch %st(1) - faddl (%r11) - fmul %st(2), %st - fxch %st(1) - faddl (%rdi) - fmulp %st, %st(2) - faddl (%rax) - fmulp %st, %st(2) - faddl (%r8) - faddp %st, %st(1) - ret -..B2.13: - cmpl $1072693248, %ecx - jb ..B2.4 -..B2.14: - fstp %st(0) - fld %st(0) - lea 8+_C0(%rip), %rax - lea 16+_C0(%rip), %r8 - lea 40+_C0(%rip), %rdx - lea 48+_C0(%rip), %r9 - lea 24+_C0(%rip), %rcx - lea 32+_C0(%rip), %r10 - lea 56+_C0(%rip), %rsi - lea 64+_C0(%rip), %r11 - lea _C0(%rip), %rdi - fmul %st(1), %st - fldl (%rax) - fmul %st(1), %st - fldl (%r8) - fmul %st(2), %st - fxch %st(1) - faddl (%rdx) - fmul %st(2), %st - fxch %st(1) - faddl (%r9) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - fmulp %st, %st(2) - faddl (%r11) - fmulp %st, %st(2) - faddl (%rdi) - faddp %st, %st(1) -..B2.15: - ret - .align 16,0x90 - .cfi_endproc - .type lgammaf_pos,@function - .size lgammaf_pos,.-lgammaf_pos - .data -# -- End lgammaf_pos - .text -# -- Begin gammaf - .text - .align 16,0x90 - .globl gammaf -gammaf: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value_gammaf.162: -..L163: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $120, %rsp - .cfi_def_cfa_offset 176 - xorb %r12b, %r12b - movss %xmm0, 112(%rsp) - xorb %bpl, %bpl - movzwl 114(%rsp), %r15d - andl $32640, %r15d - movd %xmm0, %eax - shrl $7, %r15d - andl $8388607, %eax - movl %r15d, %r14d - shll $23, %r14d - movb 115(%rsp), %r13b - orl %eax, %r14d - andb $-128, %r13b -..B3.2: - fnstcw 110(%rsp) -..B3.3: -..___tag_value_gammaf.177: - call fegetround@PLT -..___tag_value_gammaf.178: -..B3.156: - movl %eax, %ebx -..B3.4: - testl %ebx, %ebx - je ..B3.6 -..B3.5: - xorl %edi, %edi - movb $1, %r12b -..___tag_value_gammaf.179: - call fesetround@PLT -..___tag_value_gammaf.180: -..B3.6: - movzwl 110(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B3.10 -..B3.7: - orl $-64768, %edx - movw %dx, 108(%rsp) -..B3.8: - fldcw 108(%rsp) -..B3.9: - movb $1, %bpl -..B3.10: - cmpl $255, %r15d - jne ..B3.16 -..B3.11: - testb %bpl, %bpl - je ..B3.13 -..B3.12: - fldcw 110(%rsp) -..B3.13: - testb %r12b, %r12b - je ..B3.15 -..B3.14: - movl %ebx, %edi -..___tag_value_gammaf.181: - call fesetround@PLT -..___tag_value_gammaf.182: -..B3.15: - movss 112(%rsp), %xmm0 - mulss %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.16: - testl %r14d, %r14d - je ..B3.149 -..B3.17: - testb %r13b, %r13b - jne ..B3.74 -..B3.18: - cmpl $2084876174, %r14d - jae ..B3.136 -..B3.19: - movss 112(%rsp), %xmm0 - ucomiss .L_2il0floatpacket.6(%rip), %xmm0 - jp ..B3.20 - je ..B3.131 -..B3.20: - cmpl $1174405120, %r14d - jb ..B3.26 -..B3.21: - fldt .L_2il0floatpacket.1(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movss %xmm0, 56(%rsp) - pxor %xmm0, %xmm0 - flds 56(%rsp) - cvtss2sd 56(%rsp), %xmm0 - fsub %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fstps 32(%rsp) - fldt (%rax) - fstpt 16(%rsp) - call log@PLT -..B3.157: - fldt (%rsp) - testb %r12b, %r12b - movsd %xmm0, 56(%rsp) - fmull 56(%rsp) - fstpt (%rsp) - je ..B3.23 -..B3.22: - movl %ebx, %edi -..___tag_value_gammaf.203: - call fesetround@PLT -..___tag_value_gammaf.204: -..B3.23: - fldt (%rsp) - testb %bpl, %bpl - fldt 16(%rsp) - faddp %st, %st(1) - fsubs 32(%rsp) - fstps 104(%rsp) - je ..B3.124 -..B3.24: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.26: - cmpl $1082130432, %r14d - jb ..B3.33 -..B3.27: - addl $-1082130432, %r14d - lea _A(%rip), %rax - sarl $23, %r14d - lea _B(%rip), %rdx - movslq %r14d, %r14 - lea _C5(%rip), %r8 - movss %xmm0, 56(%rsp) - lea (,%r14,8), %ecx - flds 56(%rsp) - lea (%r14,%r14,2), %esi - movslq %ecx, %rcx - lea _C5_0(%rip), %r9 - movslq %esi, %rsi - testb %r12b, %r12b - fsubs (%rax,%r14,4) - fmuls (%rdx,%r14,4) - fld %st(0) - fmul %st(1), %st - fldl 8(%r8,%rcx,8) - fmul %st(1), %st - fldl (%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 40(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 32(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 8(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl (%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl 56(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 48(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 24(%r8,%rcx,8) - fmulp %st, %st(3) - fxch %st(2) - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(2) - faddl 16(%r8,%rcx,8) - fmulp %st, %st(1) - faddl 16(%r9,%rsi,8) - fstpt (%rsp) - je ..B3.30 -..B3.28: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf.205: - call fesetround@PLT -..___tag_value_gammaf.206: -..B3.29: - fldt 80(%rsp) -..B3.30: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.31: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.33: - ucomiss .L_2il0floatpacket.4(%rip), %xmm0 - jp ..B3.34 - je ..B3.126 -..B3.34: - movss %xmm0, 56(%rsp) - cmpl $1073741824, %r14d - flds 56(%rsp) - jbe ..B3.40 -..B3.35: - fldt .L_2il0floatpacket.5(%rip) - fld %st(1) - lea _C4(%rip), %r9 - lea 8+_C4(%rip), %rax - fmul %st(2), %st - lea 32+_C4(%rip), %r10 - fldl (%rax) - lea 40+_C4(%rip), %rdx - fmul %st(1), %st - lea 64+_C4(%rip), %r11 - fldl (%r9) - lea 72+_C4(%rip), %rcx - fmul %st(2), %st - fxch %st(1) - faddl (%rdx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - lea 48+_C4(%rip), %r13 - lea 56+_C4(%rip), %rsi - fmul %st(2), %st - fxch %st(1) - faddl (%r11) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - lea 16+_C4(%rip), %r14 - lea 24+_C4(%rip), %r8 - fmul %st(2), %st - fxch %st(1) - faddl (%r13) - fmul %st(2), %st - fxch %st(1) - faddl (%r8) - lea 80+_C4(%rip), %r15 - testb %r12b, %r12b - fmul %st(4), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(3) - fsubrp %st, %st(4) - faddl (%r14) - fmulp %st, %st(1) - faddl (%r15) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B3.37 -..B3.36: - movl %ebx, %edi -..___tag_value_gammaf.207: - call fesetround@PLT -..___tag_value_gammaf.208: -..B3.37: - fldt (%rsp) - testb %bpl, %bpl - fstps 104(%rsp) - je ..B3.124 -..B3.38: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.40: - cmpl $1071644672, %r14d - jb ..B3.47 -..B3.41: - fld %st(0) - lea 16+_C3(%rip), %rax - fmul %st(1), %st - lea 48+_C3(%rip), %rdx - fldl (%rax) - lea 32+_C3(%rip), %rcx - fmul %st(1), %st - lea 64+_C3(%rip), %rsi - lea 8+_C3(%rip), %r8 - lea 40+_C3(%rip), %r9 - lea 24+_C3(%rip), %r10 - lea 56+_C3(%rip), %r11 - lea _C3(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B3.44 -..B3.42: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf.209: - call fesetround@PLT -..___tag_value_gammaf.210: -..B3.43: - fldt 80(%rsp) -..B3.44: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.45: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.47: - cmpl $1069547520, %r14d - jb ..B3.54 -..B3.48: - fld %st(0) - lea 16+_LGAMMAF_C2(%rip), %rax - fmul %st(1), %st - lea 48+_LGAMMAF_C2(%rip), %rdx - fldl (%rax) - lea 32+_LGAMMAF_C2(%rip), %rcx - fmul %st(1), %st - lea 64+_LGAMMAF_C2(%rip), %rsi - lea 8+_LGAMMAF_C2(%rip), %r8 - lea 40+_LGAMMAF_C2(%rip), %r9 - lea 24+_LGAMMAF_C2(%rip), %r10 - lea 56+_LGAMMAF_C2(%rip), %r11 - lea _LGAMMAF_C2(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B3.51 -..B3.49: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf.211: - call fesetround@PLT -..___tag_value_gammaf.212: -..B3.50: - fldt 80(%rsp) -..B3.51: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.52: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.54: - cmpl $1067450368, %r14d - jb ..B3.61 -..B3.55: - lea _LM(%rip), %rax - lea 16+_C1(%rip), %rdx - lea 48+_C1(%rip), %rcx - lea 32+_C1(%rip), %rsi - lea 64+_C1(%rip), %r8 - lea 8+_C1(%rip), %r9 - lea 40+_C1(%rip), %r10 - lea 24+_C1(%rip), %r11 - fldl (%rdx) - lea 56+_C1(%rip), %r13 - lea _C1(%rip), %r14 - testb %r12b, %r12b - fxch %st(1) - fsubl (%rax) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(2) - faddl (%rcx) - fmul %st(2), %st - faddl (%rsi) - fmul %st(2), %st - faddl (%r8) - fmulp %st, %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmul %st(2), %st - faddl (%r13) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r14) - fstpt (%rsp) - je ..B3.58 -..B3.56: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf.213: - call fesetround@PLT -..___tag_value_gammaf.214: -..B3.57: - fldt 80(%rsp) -..B3.58: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.59: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.61: - cmpl $1065353216, %r14d - jb ..B3.68 -..B3.62: - fld %st(0) - lea 16+_C0(%rip), %rax - fmul %st(1), %st - lea 48+_C0(%rip), %rdx - fldl (%rax) - lea 32+_C0(%rip), %rcx - fmul %st(1), %st - lea 64+_C0(%rip), %rsi - lea 8+_C0(%rip), %r8 - lea 40+_C0(%rip), %r9 - lea 24+_C0(%rip), %r10 - lea 56+_C0(%rip), %r11 - lea _C0(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B3.65 -..B3.63: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf.215: - call fesetround@PLT -..___tag_value_gammaf.216: -..B3.64: - fldt 80(%rsp) -..B3.65: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.66: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.68: - fldt .L_2il0floatpacket.0(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fadd %st(1), %st - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value_gammaf.218: - call lgammaf_pos -..___tag_value_gammaf.219: -..B3.159: - fldt 32(%rsp) - fxch %st(1) - fstpt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B3.158: - movsd %xmm0, 56(%rsp) - testb %r12b, %r12b - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - je ..B3.71 -..B3.69: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf.221: - call fesetround@PLT -..___tag_value_gammaf.222: -..B3.70: - fldt 80(%rsp) -..B3.71: - fldt (%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.72: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.74: - movss 112(%rsp), %xmm0 - call nearbyintf@PLT -..B3.160: - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm1 - movss 112(%rsp), %xmm4 - ucomiss %xmm1, %xmm4 - jp ..B3.75 - je ..B3.144 -..B3.75: - cmpl $1073741824, %r14d - jae ..B3.86 -..B3.76: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm4, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(2), %st - jae ..B3.141 - jp ..B3.141 -..B3.77: - fldt 16(%rsp) -..B3.78: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B3.79 - jb ..B3.78 -..B3.79: - fstp %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..B3.80: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B3.162: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_gammaf.224: - call lgammaf_pos -..___tag_value_gammaf.225: -..B3.161: - fldt 16(%rsp) - fxch %st(1) - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - testb %r12b, %r12b - je ..B3.83 -..B3.81: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf.227: - call fesetround@PLT -..___tag_value_gammaf.228: -..B3.82: - fldt 80(%rsp) -..B3.83: - fldt 16(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.84: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.86: - cmpl $1082130432, %r14d - jae ..B3.103 -..B3.87: - movss .L_2il0floatpacket.2(%rip), %xmm0 - lea _LRIB(%rip), %rdx - movss .L_2il0floatpacket.3(%rip), %xmm2 - subss %xmm4, %xmm0 - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm1 - addss %xmm2, %xmm1 - movss %xmm1, 104(%rsp) - pxor %xmm1, %xmm1 - cvtss2sd %xmm4, %xmm1 - movl 104(%rsp), %ecx - andl $1, %ecx - movss 104(%rsp), %xmm3 - subss %xmm2, %xmm3 - movss %xmm3, 104(%rsp) - lea (%rcx,%rcx,2), %eax - comisd (%rdx,%rax,8), %xmm1 - jbe ..B3.90 -..B3.88: - movsd 16(%rdx,%rax,8), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B3.90 -..B3.89: - movss %xmm4, 56(%rsp) - flds 56(%rsp) - shll $2, %ecx - fsubl 8(%rdx,%rax,8) - lea _LRP(%rip), %rax - fldl (%rax,%rcx,8) - fmul %st(1), %st - faddl 8(%rax,%rcx,8) - fmul %st(1), %st - faddl 16(%rax,%rcx,8) - fmulp %st, %st(1) - faddl 24(%rax,%rcx,8) - fstpt (%rsp) - jmp ..B3.98 -..B3.90: - lea _RRIB(%rip), %rdx - comisd (%rdx,%rax,8), %xmm1 - jbe ..B3.93 -..B3.91: - movsd 16(%rdx,%rax,8), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B3.93 -..B3.92: - movss %xmm4, 56(%rsp) - flds 56(%rsp) - shll $2, %ecx - fsubl 8(%rdx,%rax,8) - lea _RRP(%rip), %rax - fldl (%rax,%rcx,8) - fmul %st(1), %st - faddl 8(%rax,%rcx,8) - fmul %st(1), %st - faddl 16(%rax,%rcx,8) - fmulp %st, %st(1) - faddl 24(%rax,%rcx,8) - fstpt (%rsp) - jmp ..B3.98 -..B3.93: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm4, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt (%rsp) - fldt (%rsp) - fcomip %st(2), %st - jae ..B3.142 - jp ..B3.142 -..B3.94: - fldt (%rsp) -..B3.95: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B3.96 - jb ..B3.95 -..B3.96: - fstp %st(2) - fxch %st(1) - fstpt (%rsp) - fstpt 80(%rsp) -..B3.97: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B3.164: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstl 16(%rsp) - fstpt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 16(%rsp) - fstpt (%rsp) -..___tag_value_gammaf.230: - call lgammaf_pos -..___tag_value_gammaf.231: -..B3.163: - addq $16, %rsp - .cfi_def_cfa_offset 176 - fsubl 16(%rsp) - fstpt (%rsp) -..B3.98: - testb %r12b, %r12b - je ..B3.100 -..B3.99: - movl %ebx, %edi -..___tag_value_gammaf.233: - call fesetround@PLT -..___tag_value_gammaf.234: -..B3.100: - fldt (%rsp) - testb %bpl, %bpl - fstps 104(%rsp) - je ..B3.124 -..B3.101: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.103: - cmpl $1091567616, %r14d - jae ..B3.114 -..B3.104: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm4, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(2), %st - jae ..B3.143 - jp ..B3.143 -..B3.105: - fldt 16(%rsp) -..B3.106: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B3.107 - jb ..B3.106 -..B3.107: - fstp %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..B3.108: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B3.166: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_gammaf.236: - call lgammaf_pos -..___tag_value_gammaf.237: -..B3.165: - fldt 16(%rsp) - fxch %st(1) - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - testb %r12b, %r12b - je ..B3.111 -..B3.109: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf.239: - call fesetround@PLT -..___tag_value_gammaf.240: -..B3.110: - fldt 80(%rsp) -..B3.111: - fldt 16(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.112: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.114: - cmpl $1174405120, %r14d - jb ..B3.120 -..B3.115: - fldt .L_2il0floatpacket.1(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movss %xmm4, 56(%rsp) - flds 56(%rsp) - fsts (%rsp) - fsub %st, %st(1) - fxch %st(1) - fstpt 8(%rsp) - fchs - fstl 96(%rsp) - movsd 96(%rsp), %xmm0 - fstpt 40(%rsp) - fldt (%rax) - fstpt 24(%rsp) - call log@PLT -..B3.168: - fldt 8(%rsp) - lea _S16(%rip), %rax - fldt 24(%rsp) - lea _S14(%rip), %rdx - fldt 40(%rsp) - lea _S12(%rip), %rcx - movss .L_2il0floatpacket.3(%rip), %xmm2 - lea _S10(%rip), %rsi - fldl (%rax) - lea _S08(%rip), %r8 - movss %xmm2, 104(%rsp) - lea _S06(%rip), %r9 - movss 104(%rsp), %xmm1 - lea _S04(%rip), %r10 - movsd %xmm0, 56(%rsp) - lea _S02(%rip), %r11 - fxch %st(3) - fmull 56(%rsp) - subss 112(%rsp), %xmm1 - fsubp %st, %st(2) - movss %xmm1, 104(%rsp) - movss 104(%rsp), %xmm3 - fxch %st(1) - fsubs (%rsp) - subss %xmm2, %xmm3 - movss %xmm3, 104(%rsp) - movss 104(%rsp), %xmm4 - movss %xmm4, 56(%rsp) - fxch %st(1) - fsubs 56(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fmul %st, %st(2) - andb $127, 73(%rsp) - fldt 64(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - fxch %st(2) - faddl (%rdx) - fmul %st(2), %st - faddl (%rcx) - fmul %st(2), %st - faddl (%rsi) - fmul %st(2), %st - faddl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(1) - fstpt 8(%rsp) - call log@PLT -..B3.167: - movsd %xmm0, 56(%rsp) - testb %r12b, %r12b - fldl 56(%rsp) - je ..B3.117 -..B3.116: - movl %ebx, %edi - fstpl (%rsp) -..___tag_value_gammaf.241: - call fesetround@PLT -..___tag_value_gammaf.242: -..B3.172: - fldl (%rsp) -..B3.117: - fldt 8(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.118: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.120: - flds 112(%rsp) - movss .L_2il0floatpacket.3(%rip), %xmm1 - fchs - movaps %xmm1, %xmm0 - fstl 96(%rsp) - subss %xmm4, %xmm0 - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm2 - movsd 96(%rsp), %xmm0 - subss %xmm1, %xmm2 - movss %xmm2, 104(%rsp) - movss 104(%rsp), %xmm3 - movss %xmm3, 56(%rsp) - fstpt 40(%rsp) - fldt 40(%rsp) - flds 56(%rsp) - fsubrp %st, %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fstpt 24(%rsp) - call log@PLT -..B3.171: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fchs - fldt 56(%rsp) - fstpt (%rsp) - fstpt 24(%rsp) -..___tag_value_gammaf.244: - call lgammaf_pos -..___tag_value_gammaf.245: -..B3.170: - fldt 24(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - fldt 24(%rsp) - lea _S14(%rip), %rax - fld %st(0) - lea _S16(%rip), %r8 - fmul %st(1), %st - lea _S10(%rip), %rdx - fxch %st(3) - fsubrp %st, %st(2) - fldl (%rax) - lea _S12(%rip), %r9 - fmul %st(3), %st - lea _S06(%rip), %rcx - fldl (%r8) - lea _S08(%rip), %r10 - fmul %st(4), %st - fxch %st(1) - faddl (%rdx) - fmul %st(4), %st - fxch %st(1) - faddl (%r9) - fmul %st(4), %st - fxch %st(1) - faddl (%rcx) - fmul %st(4), %st - fxch %st(1) - faddl (%r10) - fmul %st(4), %st - lea _S02(%rip), %rsi - fxch %st(1) - faddl (%rsi) - lea _S04(%rip), %r11 - fmulp %st, %st(2) - faddl (%r11) - fmulp %st, %st(3) - andb $127, 73(%rsp) - faddp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(1) - fstpt 8(%rsp) - fldt 64(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B3.169: - fldt 8(%rsp) - testb %r12b, %r12b - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - je ..B3.122 -..B3.121: - movl %ebx, %edi - fstpl (%rsp) - fstpt 8(%rsp) -..___tag_value_gammaf.247: - call fesetround@PLT -..___tag_value_gammaf.248: -..B3.173: - fldt 8(%rsp) - fldl (%rsp) -..B3.122: - testb %bpl, %bpl - fsubrp %st, %st(1) - fstps 104(%rsp) - je ..B3.124 -..B3.123: - fldcw 110(%rsp) -..B3.124: - movss 104(%rsp), %xmm0 -..B3.125: - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.126: - testb %bpl, %bpl - je ..B3.128 -..B3.127: - fldcw 110(%rsp) -..B3.128: - testb %r12b, %r12b - je ..B3.130 -..B3.129: - movl %ebx, %edi -..___tag_value_gammaf.269: - call fesetround@PLT -..___tag_value_gammaf.270: -..B3.130: - pxor %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.131: - testb %bpl, %bpl - je ..B3.133 -..B3.132: - fldcw 110(%rsp) -..B3.133: - testb %r12b, %r12b - je ..B3.135 -..B3.134: - movl %ebx, %edi -..___tag_value_gammaf.291: - call fesetround@PLT -..___tag_value_gammaf.292: -..B3.135: - pxor %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B3.136: - testb %r12b, %r12b - je ..B3.138 -..B3.137: - movl %ebx, %edi -..___tag_value_gammaf.313: - call fesetround@PLT -..___tag_value_gammaf.314: -..B3.138: - lea _PBIG(%rip), %rax - testb %bpl, %bpl - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 104(%rsp) - je ..B3.124 -..B3.139: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.141: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B3.80 -..B3.142: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B3.97 -..B3.143: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B3.108 -..B3.144: - testb %r12b, %r12b - je ..B3.146 -..B3.145: - movl %ebx, %edi -..___tag_value_gammaf.315: - call fesetround@PLT -..___tag_value_gammaf.316: -..B3.146: - movss .L_2il0floatpacket.6(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - je ..B3.124 -..B3.147: - fldcw 110(%rsp) - jmp ..B3.124 -..B3.149: - testb %r12b, %r12b - je ..B3.151 -..B3.150: - movl %ebx, %edi -..___tag_value_gammaf.317: - call fesetround@PLT -..___tag_value_gammaf.318: -..B3.151: - movss .L_2il0floatpacket.6(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - je ..B3.124 -..B3.152: - fldcw 110(%rsp) - jmp ..B3.124 - .align 16,0x90 - .cfi_endproc - .type gammaf,@function - .size gammaf,.-gammaf - .data -# -- End gammaf - .text -# -- Begin lgammaf_r - .text - .align 16,0x90 - .globl lgammaf_r -lgammaf_r: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B4.1: - .cfi_startproc -..___tag_value_lgammaf_r.320: -..L321: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $120, %rsp - .cfi_def_cfa_offset 176 - xorb %r12b, %r12b - movss %xmm0, 112(%rsp) - movq %rdi, %r15 - movb 115(%rsp), %dl - xorb %bpl, %bpl - andb $-128, %dl - shrb $7, %dl - movd %xmm0, %eax - movzwl 114(%rsp), %r14d - andl $8388607, %eax - andl $32640, %r14d - shrl $7, %r14d - movl %r14d, %r13d - shll $23, %r13d - movb %dl, (%rsp) - orl %eax, %r13d -..B4.2: - fnstcw 110(%rsp) -..B4.3: -..___tag_value_lgammaf_r.335: - call fegetround@PLT -..___tag_value_lgammaf_r.336: -..B4.162: - movl %eax, %ebx -..B4.4: - testl %ebx, %ebx - je ..B4.6 -..B4.5: - xorl %edi, %edi - movb $1, %r12b -..___tag_value_lgammaf_r.337: - call fesetround@PLT -..___tag_value_lgammaf_r.338: -..B4.6: - movzwl 110(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B4.10 -..B4.7: - orl $-64768, %edx - movw %dx, 108(%rsp) -..B4.8: - fldcw 108(%rsp) -..B4.9: - movb $1, %bpl -..B4.10: - cmpl $255, %r14d - jne ..B4.16 -..B4.11: - movl $1, (%r15) - testb %bpl, %bpl - je ..B4.13 -..B4.12: - fldcw 110(%rsp) -..B4.13: - testb %r12b, %r12b - je ..B4.15 -..B4.14: - movl %ebx, %edi -..___tag_value_lgammaf_r.339: - call fesetround@PLT -..___tag_value_lgammaf_r.340: -..B4.15: - movss 112(%rsp), %xmm0 - mulss %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B4.16: - testl %r13d, %r13d - je ..B4.152 -..B4.17: - movb (%rsp), %al - testb %al, %al - movl $1, (%r15) - jne ..B4.74 -..B4.18: - cmpl $2084876174, %r13d - jae ..B4.139 -..B4.19: - movss 112(%rsp), %xmm0 - ucomiss .L_2il0floatpacket.6(%rip), %xmm0 - jp ..B4.20 - je ..B4.134 -..B4.20: - cmpl $1174405120, %r13d - jb ..B4.26 -..B4.21: - fldt .L_2il0floatpacket.1(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movss %xmm0, 56(%rsp) - pxor %xmm0, %xmm0 - flds 56(%rsp) - cvtss2sd 56(%rsp), %xmm0 - fsub %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fstps 32(%rsp) - fldt (%rax) - fstpt 16(%rsp) - call log@PLT -..B4.163: - fldt (%rsp) - testb %r12b, %r12b - movsd %xmm0, 56(%rsp) - fmull 56(%rsp) - fstpt (%rsp) - je ..B4.23 -..B4.22: - movl %ebx, %edi -..___tag_value_lgammaf_r.361: - call fesetround@PLT -..___tag_value_lgammaf_r.362: -..B4.23: - fldt (%rsp) - testb %bpl, %bpl - fldt 16(%rsp) - faddp %st, %st(1) - fsubs 32(%rsp) - fstps 104(%rsp) - je ..B4.127 -..B4.24: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.26: - cmpl $1082130432, %r13d - jb ..B4.33 -..B4.27: - addl $-1082130432, %r13d - lea _A(%rip), %rax - sarl $23, %r13d - lea _B(%rip), %rdx - movslq %r13d, %r13 - lea _C5(%rip), %r8 - movss %xmm0, 56(%rsp) - lea (,%r13,8), %ecx - flds 56(%rsp) - lea (%r13,%r13,2), %esi - movslq %ecx, %rcx - lea _C5_0(%rip), %r9 - movslq %esi, %rsi - testb %r12b, %r12b - fsubs (%rax,%r13,4) - fmuls (%rdx,%r13,4) - fld %st(0) - fmul %st(1), %st - fldl 8(%r8,%rcx,8) - fmul %st(1), %st - fldl (%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 40(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 32(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 8(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl (%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl 56(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 48(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 24(%r8,%rcx,8) - fmulp %st, %st(3) - fxch %st(2) - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(2) - faddl 16(%r8,%rcx,8) - fmulp %st, %st(1) - faddl 16(%r9,%rsi,8) - fstpt (%rsp) - je ..B4.30 -..B4.28: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf_r.363: - call fesetround@PLT -..___tag_value_lgammaf_r.364: -..B4.29: - fldt 80(%rsp) -..B4.30: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.31: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.33: - ucomiss .L_2il0floatpacket.4(%rip), %xmm0 - jp ..B4.34 - je ..B4.129 -..B4.34: - movss %xmm0, 56(%rsp) - cmpl $1073741824, %r13d - flds 56(%rsp) - jbe ..B4.40 -..B4.35: - fldt .L_2il0floatpacket.5(%rip) - fld %st(1) - lea _C4(%rip), %r9 - lea 8+_C4(%rip), %rax - fmul %st(2), %st - lea 32+_C4(%rip), %r10 - fldl (%rax) - lea 40+_C4(%rip), %rdx - fmul %st(1), %st - lea 64+_C4(%rip), %r11 - fldl (%r9) - lea 72+_C4(%rip), %rcx - fmul %st(2), %st - fxch %st(1) - faddl (%rdx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - lea 48+_C4(%rip), %r13 - lea 56+_C4(%rip), %rsi - fmul %st(2), %st - fxch %st(1) - faddl (%r11) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - lea 16+_C4(%rip), %r14 - lea 24+_C4(%rip), %r8 - fmul %st(2), %st - fxch %st(1) - faddl (%r13) - fmul %st(2), %st - fxch %st(1) - faddl (%r8) - lea 80+_C4(%rip), %r15 - testb %r12b, %r12b - fmul %st(4), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(3) - fsubrp %st, %st(4) - faddl (%r14) - fmulp %st, %st(1) - faddl (%r15) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B4.37 -..B4.36: - movl %ebx, %edi -..___tag_value_lgammaf_r.365: - call fesetround@PLT -..___tag_value_lgammaf_r.366: -..B4.37: - fldt (%rsp) - testb %bpl, %bpl - fstps 104(%rsp) - je ..B4.127 -..B4.38: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.40: - cmpl $1071644672, %r13d - jb ..B4.47 -..B4.41: - fld %st(0) - lea 16+_C3(%rip), %rax - fmul %st(1), %st - lea 48+_C3(%rip), %rdx - fldl (%rax) - lea 32+_C3(%rip), %rcx - fmul %st(1), %st - lea 64+_C3(%rip), %rsi - lea 8+_C3(%rip), %r8 - lea 40+_C3(%rip), %r9 - lea 24+_C3(%rip), %r10 - lea 56+_C3(%rip), %r11 - lea _C3(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B4.44 -..B4.42: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf_r.367: - call fesetround@PLT -..___tag_value_lgammaf_r.368: -..B4.43: - fldt 80(%rsp) -..B4.44: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.45: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.47: - cmpl $1069547520, %r13d - jb ..B4.54 -..B4.48: - fld %st(0) - lea 16+_LGAMMAF_C2(%rip), %rax - fmul %st(1), %st - lea 48+_LGAMMAF_C2(%rip), %rdx - fldl (%rax) - lea 32+_LGAMMAF_C2(%rip), %rcx - fmul %st(1), %st - lea 64+_LGAMMAF_C2(%rip), %rsi - lea 8+_LGAMMAF_C2(%rip), %r8 - lea 40+_LGAMMAF_C2(%rip), %r9 - lea 24+_LGAMMAF_C2(%rip), %r10 - lea 56+_LGAMMAF_C2(%rip), %r11 - lea _LGAMMAF_C2(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B4.51 -..B4.49: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf_r.369: - call fesetround@PLT -..___tag_value_lgammaf_r.370: -..B4.50: - fldt 80(%rsp) -..B4.51: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.52: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.54: - cmpl $1067450368, %r13d - jb ..B4.61 -..B4.55: - lea _LM(%rip), %rax - lea 16+_C1(%rip), %rdx - lea 48+_C1(%rip), %rcx - lea 32+_C1(%rip), %rsi - lea 64+_C1(%rip), %r8 - lea 8+_C1(%rip), %r9 - lea 40+_C1(%rip), %r10 - lea 24+_C1(%rip), %r11 - fldl (%rdx) - lea 56+_C1(%rip), %r13 - lea _C1(%rip), %r14 - testb %r12b, %r12b - fxch %st(1) - fsubl (%rax) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(2) - faddl (%rcx) - fmul %st(2), %st - faddl (%rsi) - fmul %st(2), %st - faddl (%r8) - fmulp %st, %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmul %st(2), %st - faddl (%r13) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r14) - fstpt (%rsp) - je ..B4.58 -..B4.56: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf_r.371: - call fesetround@PLT -..___tag_value_lgammaf_r.372: -..B4.57: - fldt 80(%rsp) -..B4.58: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.59: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.61: - cmpl $1065353216, %r13d - jb ..B4.68 -..B4.62: - fld %st(0) - lea 16+_C0(%rip), %rax - fmul %st(1), %st - lea 48+_C0(%rip), %rdx - fldl (%rax) - lea 32+_C0(%rip), %rcx - fmul %st(1), %st - lea 64+_C0(%rip), %rsi - lea 8+_C0(%rip), %r8 - lea 40+_C0(%rip), %r9 - lea 24+_C0(%rip), %r10 - lea 56+_C0(%rip), %r11 - lea _C0(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B4.65 -..B4.63: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf_r.373: - call fesetround@PLT -..___tag_value_lgammaf_r.374: -..B4.64: - fldt 80(%rsp) -..B4.65: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.66: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.68: - fldt .L_2il0floatpacket.0(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fadd %st(1), %st - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value_lgammaf_r.376: - call lgammaf_pos -..___tag_value_lgammaf_r.377: -..B4.165: - fldt 32(%rsp) - fxch %st(1) - fstpt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B4.164: - movsd %xmm0, 56(%rsp) - testb %r12b, %r12b - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - je ..B4.71 -..B4.69: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf_r.379: - call fesetround@PLT -..___tag_value_lgammaf_r.380: -..B4.70: - fldt 80(%rsp) -..B4.71: - fldt (%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.72: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.74: - movss 112(%rsp), %xmm0 - call nearbyintf@PLT -..B4.166: - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm1 - movss 112(%rsp), %xmm2 - ucomiss %xmm1, %xmm2 - jp ..B4.75 - je ..B4.147 -..B4.75: - comiss .L_2il0floatpacket.8(%rip), %xmm2 - jbe ..B4.78 -..B4.76: - movaps %xmm2, %xmm0 - movss %xmm2, (%rsp) - call ceilf@PLT -..B4.167: - cvttss2si %xmm0, %eax - movss (%rsp), %xmm2 - testb $1, %al - jne ..B4.78 -..B4.77: - movl $-1, (%r15) -..B4.78: - cmpl $1073741824, %r13d - jae ..B4.89 -..B4.79: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm2, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(2), %st - jae ..B4.144 - jp ..B4.144 -..B4.80: - fldt 16(%rsp) -..B4.81: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B4.82 - jb ..B4.81 -..B4.82: - fstp %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..B4.83: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B4.169: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_lgammaf_r.382: - call lgammaf_pos -..___tag_value_lgammaf_r.383: -..B4.168: - fldt 16(%rsp) - fxch %st(1) - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - testb %r12b, %r12b - je ..B4.86 -..B4.84: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf_r.385: - call fesetround@PLT -..___tag_value_lgammaf_r.386: -..B4.85: - fldt 80(%rsp) -..B4.86: - fldt 16(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.87: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.89: - cmpl $1082130432, %r13d - jae ..B4.106 -..B4.90: - movss .L_2il0floatpacket.2(%rip), %xmm1 - lea _LRIB(%rip), %rdx - subss %xmm2, %xmm1 - movss .L_2il0floatpacket.3(%rip), %xmm2 - movss %xmm1, 104(%rsp) - pxor %xmm1, %xmm1 - movss 104(%rsp), %xmm0 - addss %xmm2, %xmm0 - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm3 - movl 104(%rsp), %ecx - subss %xmm2, %xmm3 - movss 112(%rsp), %xmm2 - andl $1, %ecx - cvtss2sd %xmm2, %xmm1 - movss %xmm3, 104(%rsp) - lea (%rcx,%rcx,2), %eax - comisd (%rdx,%rax,8), %xmm1 - jbe ..B4.93 -..B4.91: - movsd 16(%rdx,%rax,8), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B4.93 -..B4.92: - movss %xmm2, 56(%rsp) - flds 56(%rsp) - shll $2, %ecx - fsubl 8(%rdx,%rax,8) - lea _LRP(%rip), %rax - fldl (%rax,%rcx,8) - fmul %st(1), %st - faddl 8(%rax,%rcx,8) - fmul %st(1), %st - faddl 16(%rax,%rcx,8) - fmulp %st, %st(1) - faddl 24(%rax,%rcx,8) - fstpt (%rsp) - jmp ..B4.101 -..B4.93: - lea _RRIB(%rip), %rdx - comisd (%rdx,%rax,8), %xmm1 - jbe ..B4.96 -..B4.94: - movsd 16(%rdx,%rax,8), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B4.96 -..B4.95: - movss %xmm2, 56(%rsp) - flds 56(%rsp) - shll $2, %ecx - fsubl 8(%rdx,%rax,8) - lea _RRP(%rip), %rax - fldl (%rax,%rcx,8) - fmul %st(1), %st - faddl 8(%rax,%rcx,8) - fmul %st(1), %st - faddl 16(%rax,%rcx,8) - fmulp %st, %st(1) - faddl 24(%rax,%rcx,8) - fstpt (%rsp) - jmp ..B4.101 -..B4.96: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm2, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt (%rsp) - fldt (%rsp) - fcomip %st(2), %st - jae ..B4.145 - jp ..B4.145 -..B4.97: - fldt (%rsp) -..B4.98: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B4.99 - jb ..B4.98 -..B4.99: - fstp %st(2) - fxch %st(1) - fstpt (%rsp) - fstpt 80(%rsp) -..B4.100: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B4.171: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstl 16(%rsp) - fstpt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 16(%rsp) - fstpt (%rsp) -..___tag_value_lgammaf_r.388: - call lgammaf_pos -..___tag_value_lgammaf_r.389: -..B4.170: - addq $16, %rsp - .cfi_def_cfa_offset 176 - fsubl 16(%rsp) - fstpt (%rsp) -..B4.101: - testb %r12b, %r12b - je ..B4.103 -..B4.102: - movl %ebx, %edi -..___tag_value_lgammaf_r.391: - call fesetround@PLT -..___tag_value_lgammaf_r.392: -..B4.103: - fldt (%rsp) - testb %bpl, %bpl - fstps 104(%rsp) - je ..B4.127 -..B4.104: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.106: - cmpl $1091567616, %r13d - jae ..B4.117 -..B4.107: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm2, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(2), %st - jae ..B4.146 - jp ..B4.146 -..B4.108: - fldt 16(%rsp) -..B4.109: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B4.110 - jb ..B4.109 -..B4.110: - fstp %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..B4.111: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B4.173: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_lgammaf_r.394: - call lgammaf_pos -..___tag_value_lgammaf_r.395: -..B4.172: - fldt 16(%rsp) - fxch %st(1) - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - testb %r12b, %r12b - je ..B4.114 -..B4.112: - fstp %st(0) - movl %ebx, %edi -..___tag_value_lgammaf_r.397: - call fesetround@PLT -..___tag_value_lgammaf_r.398: -..B4.113: - fldt 80(%rsp) -..B4.114: - fldt 16(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.115: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.117: - cmpl $1174405120, %r13d - jb ..B4.123 -..B4.118: - fldt .L_2il0floatpacket.1(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movss %xmm2, 56(%rsp) - flds 56(%rsp) - fsts (%rsp) - fsub %st, %st(1) - fxch %st(1) - fstpt 8(%rsp) - fchs - fstl 96(%rsp) - movsd 96(%rsp), %xmm0 - fstpt 40(%rsp) - fldt (%rax) - fstpt 24(%rsp) - call log@PLT -..B4.175: - fldt 8(%rsp) - lea _S16(%rip), %rax - fldt 24(%rsp) - lea _S14(%rip), %rdx - fldt 40(%rsp) - lea _S12(%rip), %rcx - movss .L_2il0floatpacket.3(%rip), %xmm2 - lea _S10(%rip), %rsi - fldl (%rax) - lea _S08(%rip), %r8 - movss %xmm2, 104(%rsp) - lea _S06(%rip), %r9 - movss 104(%rsp), %xmm1 - lea _S04(%rip), %r10 - movsd %xmm0, 56(%rsp) - lea _S02(%rip), %r11 - fxch %st(3) - fmull 56(%rsp) - subss 112(%rsp), %xmm1 - fsubp %st, %st(2) - movss %xmm1, 104(%rsp) - movss 104(%rsp), %xmm3 - fxch %st(1) - fsubs (%rsp) - subss %xmm2, %xmm3 - movss %xmm3, 104(%rsp) - movss 104(%rsp), %xmm4 - movss %xmm4, 56(%rsp) - fxch %st(1) - fsubs 56(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fmul %st, %st(2) - andb $127, 73(%rsp) - fldt 64(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - fxch %st(2) - faddl (%rdx) - fmul %st(2), %st - faddl (%rcx) - fmul %st(2), %st - faddl (%rsi) - fmul %st(2), %st - faddl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(1) - fstpt 8(%rsp) - call log@PLT -..B4.174: - movsd %xmm0, 56(%rsp) - testb %r12b, %r12b - fldl 56(%rsp) - je ..B4.120 -..B4.119: - movl %ebx, %edi - fstpl (%rsp) -..___tag_value_lgammaf_r.399: - call fesetround@PLT -..___tag_value_lgammaf_r.400: -..B4.179: - fldl (%rsp) -..B4.120: - fldt 8(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.121: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.123: - flds 112(%rsp) - movss .L_2il0floatpacket.3(%rip), %xmm3 - fchs - movaps %xmm3, %xmm1 - fstl 96(%rsp) - subss %xmm2, %xmm1 - movss %xmm1, 104(%rsp) - movss 104(%rsp), %xmm0 - fstpt 40(%rsp) - fldt 40(%rsp) - subss %xmm3, %xmm0 - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm2 - movss %xmm2, 56(%rsp) - flds 56(%rsp) - movsd 96(%rsp), %xmm0 - fsubrp %st, %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fstpt 24(%rsp) - call log@PLT -..B4.178: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fchs - fldt 56(%rsp) - fstpt (%rsp) - fstpt 24(%rsp) -..___tag_value_lgammaf_r.402: - call lgammaf_pos -..___tag_value_lgammaf_r.403: -..B4.177: - fldt 24(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - fldt 24(%rsp) - lea _S14(%rip), %rax - fld %st(0) - lea _S16(%rip), %r8 - fmul %st(1), %st - lea _S10(%rip), %rdx - fxch %st(3) - fsubrp %st, %st(2) - fldl (%rax) - lea _S12(%rip), %r9 - fmul %st(3), %st - lea _S06(%rip), %rcx - fldl (%r8) - lea _S08(%rip), %r10 - fmul %st(4), %st - fxch %st(1) - faddl (%rdx) - fmul %st(4), %st - fxch %st(1) - faddl (%r9) - fmul %st(4), %st - fxch %st(1) - faddl (%rcx) - fmul %st(4), %st - fxch %st(1) - faddl (%r10) - fmul %st(4), %st - lea _S02(%rip), %rsi - fxch %st(1) - faddl (%rsi) - lea _S04(%rip), %r11 - fmulp %st, %st(2) - faddl (%r11) - fmulp %st, %st(3) - andb $127, 73(%rsp) - faddp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(1) - fstpt 8(%rsp) - fldt 64(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B4.176: - fldt 8(%rsp) - testb %r12b, %r12b - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - je ..B4.125 -..B4.124: - movl %ebx, %edi - fstpl (%rsp) - fstpt 8(%rsp) -..___tag_value_lgammaf_r.405: - call fesetround@PLT -..___tag_value_lgammaf_r.406: -..B4.180: - fldt 8(%rsp) - fldl (%rsp) -..B4.125: - testb %bpl, %bpl - fsubrp %st, %st(1) - fstps 104(%rsp) - je ..B4.127 -..B4.126: - fldcw 110(%rsp) -..B4.127: - movss 104(%rsp), %xmm0 -..B4.128: - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B4.129: - testb %bpl, %bpl - je ..B4.131 -..B4.130: - fldcw 110(%rsp) -..B4.131: - testb %r12b, %r12b - je ..B4.133 -..B4.132: - movl %ebx, %edi -..___tag_value_lgammaf_r.427: - call fesetround@PLT -..___tag_value_lgammaf_r.428: -..B4.133: - pxor %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B4.134: - testb %bpl, %bpl - je ..B4.136 -..B4.135: - fldcw 110(%rsp) -..B4.136: - testb %r12b, %r12b - je ..B4.138 -..B4.137: - movl %ebx, %edi -..___tag_value_lgammaf_r.449: - call fesetround@PLT -..___tag_value_lgammaf_r.450: -..B4.138: - pxor %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B4.139: - testb %r12b, %r12b - je ..B4.141 -..B4.140: - movl %ebx, %edi -..___tag_value_lgammaf_r.471: - call fesetround@PLT -..___tag_value_lgammaf_r.472: -..B4.141: - lea _PBIG(%rip), %rax - testb %bpl, %bpl - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 104(%rsp) - je ..B4.127 -..B4.142: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.144: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B4.83 -..B4.145: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B4.100 -..B4.146: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B4.111 -..B4.147: - testb %r12b, %r12b - je ..B4.149 -..B4.148: - movl %ebx, %edi -..___tag_value_lgammaf_r.473: - call fesetround@PLT -..___tag_value_lgammaf_r.474: -..B4.149: - movss .L_2il0floatpacket.6(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - je ..B4.127 -..B4.150: - fldcw 110(%rsp) - jmp ..B4.127 -..B4.152: - movb (%rsp), %al - testb %al, %al - je ..B4.154 -..B4.153: - movl $-1, (%r15) - jmp ..B4.155 -..B4.154: - movl $1, (%r15) -..B4.155: - testb %r12b, %r12b - je ..B4.157 -..B4.156: - movl %ebx, %edi -..___tag_value_lgammaf_r.475: - call fesetround@PLT -..___tag_value_lgammaf_r.476: -..B4.157: - movss .L_2il0floatpacket.6(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - je ..B4.127 -..B4.158: - fldcw 110(%rsp) - jmp ..B4.127 - .align 16,0x90 - .cfi_endproc - .type lgammaf_r,@function - .size lgammaf_r,.-lgammaf_r - .data -# -- End lgammaf_r - .text -# -- Begin gammaf_r - .text - .align 16,0x90 - .globl gammaf_r -gammaf_r: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B5.1: - .cfi_startproc -..___tag_value_gammaf_r.478: -..L479: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $120, %rsp - .cfi_def_cfa_offset 176 - xorb %r12b, %r12b - movss %xmm0, 112(%rsp) - movq %rdi, %r15 - movb 115(%rsp), %dl - xorb %bpl, %bpl - andb $-128, %dl - shrb $7, %dl - movd %xmm0, %eax - movzwl 114(%rsp), %r14d - andl $8388607, %eax - andl $32640, %r14d - shrl $7, %r14d - movl %r14d, %r13d - shll $23, %r13d - movb %dl, (%rsp) - orl %eax, %r13d -..B5.2: - fnstcw 110(%rsp) -..B5.3: -..___tag_value_gammaf_r.493: - call fegetround@PLT -..___tag_value_gammaf_r.494: -..B5.162: - movl %eax, %ebx -..B5.4: - testl %ebx, %ebx - je ..B5.6 -..B5.5: - xorl %edi, %edi - movb $1, %r12b -..___tag_value_gammaf_r.495: - call fesetround@PLT -..___tag_value_gammaf_r.496: -..B5.6: - movzwl 110(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B5.10 -..B5.7: - orl $-64768, %edx - movw %dx, 108(%rsp) -..B5.8: - fldcw 108(%rsp) -..B5.9: - movb $1, %bpl -..B5.10: - cmpl $255, %r14d - jne ..B5.16 -..B5.11: - movl $1, (%r15) - testb %bpl, %bpl - je ..B5.13 -..B5.12: - fldcw 110(%rsp) -..B5.13: - testb %r12b, %r12b - je ..B5.15 -..B5.14: - movl %ebx, %edi -..___tag_value_gammaf_r.497: - call fesetround@PLT -..___tag_value_gammaf_r.498: -..B5.15: - movss 112(%rsp), %xmm0 - mulss %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B5.16: - testl %r13d, %r13d - je ..B5.152 -..B5.17: - movb (%rsp), %al - testb %al, %al - movl $1, (%r15) - jne ..B5.74 -..B5.18: - cmpl $2084876174, %r13d - jae ..B5.139 -..B5.19: - movss 112(%rsp), %xmm0 - ucomiss .L_2il0floatpacket.6(%rip), %xmm0 - jp ..B5.20 - je ..B5.134 -..B5.20: - cmpl $1174405120, %r13d - jb ..B5.26 -..B5.21: - fldt .L_2il0floatpacket.1(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movss %xmm0, 56(%rsp) - pxor %xmm0, %xmm0 - flds 56(%rsp) - cvtss2sd 56(%rsp), %xmm0 - fsub %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fstps 32(%rsp) - fldt (%rax) - fstpt 16(%rsp) - call log@PLT -..B5.163: - fldt (%rsp) - testb %r12b, %r12b - movsd %xmm0, 56(%rsp) - fmull 56(%rsp) - fstpt (%rsp) - je ..B5.23 -..B5.22: - movl %ebx, %edi -..___tag_value_gammaf_r.519: - call fesetround@PLT -..___tag_value_gammaf_r.520: -..B5.23: - fldt (%rsp) - testb %bpl, %bpl - fldt 16(%rsp) - faddp %st, %st(1) - fsubs 32(%rsp) - fstps 104(%rsp) - je ..B5.127 -..B5.24: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.26: - cmpl $1082130432, %r13d - jb ..B5.33 -..B5.27: - addl $-1082130432, %r13d - lea _A(%rip), %rax - sarl $23, %r13d - lea _B(%rip), %rdx - movslq %r13d, %r13 - lea _C5(%rip), %r8 - movss %xmm0, 56(%rsp) - lea (,%r13,8), %ecx - flds 56(%rsp) - lea (%r13,%r13,2), %esi - movslq %ecx, %rcx - lea _C5_0(%rip), %r9 - movslq %esi, %rsi - testb %r12b, %r12b - fsubs (%rax,%r13,4) - fmuls (%rdx,%r13,4) - fld %st(0) - fmul %st(1), %st - fldl 8(%r8,%rcx,8) - fmul %st(1), %st - fldl (%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 40(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 32(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 8(%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl (%r9,%rsi,8) - fmul %st(2), %st - fxch %st(1) - faddl 56(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 48(%r8,%rcx,8) - fmul %st(2), %st - fxch %st(1) - faddl 24(%r8,%rcx,8) - fmulp %st, %st(3) - fxch %st(2) - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(2) - faddl 16(%r8,%rcx,8) - fmulp %st, %st(1) - faddl 16(%r9,%rsi,8) - fstpt (%rsp) - je ..B5.30 -..B5.28: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf_r.521: - call fesetround@PLT -..___tag_value_gammaf_r.522: -..B5.29: - fldt 80(%rsp) -..B5.30: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.31: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.33: - ucomiss .L_2il0floatpacket.4(%rip), %xmm0 - jp ..B5.34 - je ..B5.129 -..B5.34: - movss %xmm0, 56(%rsp) - cmpl $1073741824, %r13d - flds 56(%rsp) - jbe ..B5.40 -..B5.35: - fldt .L_2il0floatpacket.5(%rip) - fld %st(1) - lea _C4(%rip), %r9 - lea 8+_C4(%rip), %rax - fmul %st(2), %st - lea 32+_C4(%rip), %r10 - fldl (%rax) - lea 40+_C4(%rip), %rdx - fmul %st(1), %st - lea 64+_C4(%rip), %r11 - fldl (%r9) - lea 72+_C4(%rip), %rcx - fmul %st(2), %st - fxch %st(1) - faddl (%rdx) - fmul %st(2), %st - fxch %st(1) - faddl (%r10) - fmul %st(2), %st - fxch %st(1) - faddl (%rcx) - lea 48+_C4(%rip), %r13 - lea 56+_C4(%rip), %rsi - fmul %st(2), %st - fxch %st(1) - faddl (%r11) - fmul %st(2), %st - fxch %st(1) - faddl (%rsi) - lea 16+_C4(%rip), %r14 - lea 24+_C4(%rip), %r8 - fmul %st(2), %st - fxch %st(1) - faddl (%r13) - fmul %st(2), %st - fxch %st(1) - faddl (%r8) - lea 80+_C4(%rip), %r15 - testb %r12b, %r12b - fmul %st(4), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fxch %st(3) - fsubrp %st, %st(4) - faddl (%r14) - fmulp %st, %st(1) - faddl (%r15) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B5.37 -..B5.36: - movl %ebx, %edi -..___tag_value_gammaf_r.523: - call fesetround@PLT -..___tag_value_gammaf_r.524: -..B5.37: - fldt (%rsp) - testb %bpl, %bpl - fstps 104(%rsp) - je ..B5.127 -..B5.38: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.40: - cmpl $1071644672, %r13d - jb ..B5.47 -..B5.41: - fld %st(0) - lea 16+_C3(%rip), %rax - fmul %st(1), %st - lea 48+_C3(%rip), %rdx - fldl (%rax) - lea 32+_C3(%rip), %rcx - fmul %st(1), %st - lea 64+_C3(%rip), %rsi - lea 8+_C3(%rip), %r8 - lea 40+_C3(%rip), %r9 - lea 24+_C3(%rip), %r10 - lea 56+_C3(%rip), %r11 - lea _C3(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B5.44 -..B5.42: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf_r.525: - call fesetround@PLT -..___tag_value_gammaf_r.526: -..B5.43: - fldt 80(%rsp) -..B5.44: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.45: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.47: - cmpl $1069547520, %r13d - jb ..B5.54 -..B5.48: - fld %st(0) - lea 16+_LGAMMAF_C2(%rip), %rax - fmul %st(1), %st - lea 48+_LGAMMAF_C2(%rip), %rdx - fldl (%rax) - lea 32+_LGAMMAF_C2(%rip), %rcx - fmul %st(1), %st - lea 64+_LGAMMAF_C2(%rip), %rsi - lea 8+_LGAMMAF_C2(%rip), %r8 - lea 40+_LGAMMAF_C2(%rip), %r9 - lea 24+_LGAMMAF_C2(%rip), %r10 - lea 56+_LGAMMAF_C2(%rip), %r11 - lea _LGAMMAF_C2(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B5.51 -..B5.49: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf_r.527: - call fesetround@PLT -..___tag_value_gammaf_r.528: -..B5.50: - fldt 80(%rsp) -..B5.51: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.52: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.54: - cmpl $1067450368, %r13d - jb ..B5.61 -..B5.55: - lea _LM(%rip), %rax - lea 16+_C1(%rip), %rdx - lea 48+_C1(%rip), %rcx - lea 32+_C1(%rip), %rsi - lea 64+_C1(%rip), %r8 - lea 8+_C1(%rip), %r9 - lea 40+_C1(%rip), %r10 - lea 24+_C1(%rip), %r11 - fldl (%rdx) - lea 56+_C1(%rip), %r13 - lea _C1(%rip), %r14 - testb %r12b, %r12b - fxch %st(1) - fsubl (%rax) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(2) - faddl (%rcx) - fmul %st(2), %st - faddl (%rsi) - fmul %st(2), %st - faddl (%r8) - fmulp %st, %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmul %st(2), %st - faddl (%r13) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r14) - fstpt (%rsp) - je ..B5.58 -..B5.56: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf_r.529: - call fesetround@PLT -..___tag_value_gammaf_r.530: -..B5.57: - fldt 80(%rsp) -..B5.58: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.59: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.61: - cmpl $1065353216, %r13d - jb ..B5.68 -..B5.62: - fld %st(0) - lea 16+_C0(%rip), %rax - fmul %st(1), %st - lea 48+_C0(%rip), %rdx - fldl (%rax) - lea 32+_C0(%rip), %rcx - fmul %st(1), %st - lea 64+_C0(%rip), %rsi - lea 8+_C0(%rip), %r8 - lea 40+_C0(%rip), %r9 - lea 24+_C0(%rip), %r10 - lea 56+_C0(%rip), %r11 - lea _C0(%rip), %r13 - testb %r12b, %r12b - faddl (%rdx) - fmul %st(1), %st - faddl (%rcx) - fmul %st(1), %st - faddl (%rsi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - faddl (%r13) - fstpt (%rsp) - je ..B5.65 -..B5.63: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf_r.531: - call fesetround@PLT -..___tag_value_gammaf_r.532: -..B5.64: - fldt 80(%rsp) -..B5.65: - fldt (%rsp) - testb %bpl, %bpl - faddp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.66: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.68: - fldt .L_2il0floatpacket.0(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fadd %st(1), %st - fstpt (%rsp) - fstpt 32(%rsp) -..___tag_value_gammaf_r.534: - call lgammaf_pos -..___tag_value_gammaf_r.535: -..B5.165: - fldt 32(%rsp) - fxch %st(1) - fstpt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B5.164: - movsd %xmm0, 56(%rsp) - testb %r12b, %r12b - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - je ..B5.71 -..B5.69: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf_r.537: - call fesetround@PLT -..___tag_value_gammaf_r.538: -..B5.70: - fldt 80(%rsp) -..B5.71: - fldt (%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.72: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.74: - movss 112(%rsp), %xmm0 - call nearbyintf@PLT -..B5.166: - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm1 - movss 112(%rsp), %xmm2 - ucomiss %xmm1, %xmm2 - jp ..B5.75 - je ..B5.147 -..B5.75: - comiss .L_2il0floatpacket.8(%rip), %xmm2 - jbe ..B5.78 -..B5.76: - movaps %xmm2, %xmm0 - movss %xmm2, (%rsp) - call ceilf@PLT -..B5.167: - cvttss2si %xmm0, %eax - movss (%rsp), %xmm2 - testb $1, %al - jne ..B5.78 -..B5.77: - movl $-1, (%r15) -..B5.78: - cmpl $1073741824, %r13d - jae ..B5.89 -..B5.79: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm2, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(2), %st - jae ..B5.144 - jp ..B5.144 -..B5.80: - fldt 16(%rsp) -..B5.81: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B5.82 - jb ..B5.81 -..B5.82: - fstp %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..B5.83: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B5.169: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_gammaf_r.540: - call lgammaf_pos -..___tag_value_gammaf_r.541: -..B5.168: - fldt 16(%rsp) - fxch %st(1) - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - testb %r12b, %r12b - je ..B5.86 -..B5.84: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf_r.543: - call fesetround@PLT -..___tag_value_gammaf_r.544: -..B5.85: - fldt 80(%rsp) -..B5.86: - fldt 16(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.87: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.89: - cmpl $1082130432, %r13d - jae ..B5.106 -..B5.90: - movss .L_2il0floatpacket.2(%rip), %xmm1 - lea _LRIB(%rip), %rdx - subss %xmm2, %xmm1 - movss .L_2il0floatpacket.3(%rip), %xmm2 - movss %xmm1, 104(%rsp) - pxor %xmm1, %xmm1 - movss 104(%rsp), %xmm0 - addss %xmm2, %xmm0 - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm3 - movl 104(%rsp), %ecx - subss %xmm2, %xmm3 - movss 112(%rsp), %xmm2 - andl $1, %ecx - cvtss2sd %xmm2, %xmm1 - movss %xmm3, 104(%rsp) - lea (%rcx,%rcx,2), %eax - comisd (%rdx,%rax,8), %xmm1 - jbe ..B5.93 -..B5.91: - movsd 16(%rdx,%rax,8), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B5.93 -..B5.92: - movss %xmm2, 56(%rsp) - flds 56(%rsp) - shll $2, %ecx - fsubl 8(%rdx,%rax,8) - lea _LRP(%rip), %rax - fldl (%rax,%rcx,8) - fmul %st(1), %st - faddl 8(%rax,%rcx,8) - fmul %st(1), %st - faddl 16(%rax,%rcx,8) - fmulp %st, %st(1) - faddl 24(%rax,%rcx,8) - fstpt (%rsp) - jmp ..B5.101 -..B5.93: - lea _RRIB(%rip), %rdx - comisd (%rdx,%rax,8), %xmm1 - jbe ..B5.96 -..B5.94: - movsd 16(%rdx,%rax,8), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B5.96 -..B5.95: - movss %xmm2, 56(%rsp) - flds 56(%rsp) - shll $2, %ecx - fsubl 8(%rdx,%rax,8) - lea _RRP(%rip), %rax - fldl (%rax,%rcx,8) - fmul %st(1), %st - faddl 8(%rax,%rcx,8) - fmul %st(1), %st - faddl 16(%rax,%rcx,8) - fmulp %st, %st(1) - faddl 24(%rax,%rcx,8) - fstpt (%rsp) - jmp ..B5.101 -..B5.96: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm2, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt (%rsp) - fldt (%rsp) - fcomip %st(2), %st - jae ..B5.145 - jp ..B5.145 -..B5.97: - fldt (%rsp) -..B5.98: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B5.99 - jb ..B5.98 -..B5.99: - fstp %st(2) - fxch %st(1) - fstpt (%rsp) - fstpt 80(%rsp) -..B5.100: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B5.171: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstl 16(%rsp) - fstpt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 16(%rsp) - fstpt (%rsp) -..___tag_value_gammaf_r.546: - call lgammaf_pos -..___tag_value_gammaf_r.547: -..B5.170: - addq $16, %rsp - .cfi_def_cfa_offset 176 - fsubl 16(%rsp) - fstpt (%rsp) -..B5.101: - testb %r12b, %r12b - je ..B5.103 -..B5.102: - movl %ebx, %edi -..___tag_value_gammaf_r.549: - call fesetround@PLT -..___tag_value_gammaf_r.550: -..B5.103: - fldt (%rsp) - testb %bpl, %bpl - fstps 104(%rsp) - je ..B5.127 -..B5.104: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.106: - cmpl $1091567616, %r13d - jae ..B5.117 -..B5.107: - fldt .L_2il0floatpacket.0(%rip) - movss %xmm2, 56(%rsp) - fld %st(0) - flds 56(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fcomip %st(2), %st - jae ..B5.146 - jp ..B5.146 -..B5.108: - fldt 16(%rsp) -..B5.109: - fmul %st, %st(1) - fadd %st(2), %st - fcomi %st(2), %st - jp ..B5.110 - jb ..B5.109 -..B5.110: - fstp %st(2) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..B5.111: - andb $127, 89(%rsp) - fldt 80(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B5.173: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fldt 32(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value_gammaf_r.552: - call lgammaf_pos -..___tag_value_gammaf_r.553: -..B5.172: - fldt 16(%rsp) - fxch %st(1) - fstpt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - testb %r12b, %r12b - je ..B5.114 -..B5.112: - fstp %st(0) - movl %ebx, %edi -..___tag_value_gammaf_r.555: - call fesetround@PLT -..___tag_value_gammaf_r.556: -..B5.113: - fldt 80(%rsp) -..B5.114: - fldt 16(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.115: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.117: - cmpl $1174405120, %r13d - jb ..B5.123 -..B5.118: - fldt .L_2il0floatpacket.1(%rip) - lea _LN_SQRT_TWO_PI(%rip), %rax - movss %xmm2, 56(%rsp) - flds 56(%rsp) - fsts (%rsp) - fsub %st, %st(1) - fxch %st(1) - fstpt 8(%rsp) - fchs - fstl 96(%rsp) - movsd 96(%rsp), %xmm0 - fstpt 40(%rsp) - fldt (%rax) - fstpt 24(%rsp) - call log@PLT -..B5.175: - fldt 8(%rsp) - lea _S16(%rip), %rax - fldt 24(%rsp) - lea _S14(%rip), %rdx - fldt 40(%rsp) - lea _S12(%rip), %rcx - movss .L_2il0floatpacket.3(%rip), %xmm2 - lea _S10(%rip), %rsi - fldl (%rax) - lea _S08(%rip), %r8 - movss %xmm2, 104(%rsp) - lea _S06(%rip), %r9 - movss 104(%rsp), %xmm1 - lea _S04(%rip), %r10 - movsd %xmm0, 56(%rsp) - lea _S02(%rip), %r11 - fxch %st(3) - fmull 56(%rsp) - subss 112(%rsp), %xmm1 - fsubp %st, %st(2) - movss %xmm1, 104(%rsp) - movss 104(%rsp), %xmm3 - fxch %st(1) - fsubs (%rsp) - subss %xmm2, %xmm3 - movss %xmm3, 104(%rsp) - movss 104(%rsp), %xmm4 - movss %xmm4, 56(%rsp) - fxch %st(1) - fsubs 56(%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fmul %st, %st(2) - andb $127, 73(%rsp) - fldt 64(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - fxch %st(2) - faddl (%rdx) - fmul %st(2), %st - faddl (%rcx) - fmul %st(2), %st - faddl (%rsi) - fmul %st(2), %st - faddl (%r8) - fmul %st(2), %st - faddl (%r9) - fmul %st(2), %st - faddl (%r10) - fmul %st(2), %st - faddl (%r11) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(1) - fstpt 8(%rsp) - call log@PLT -..B5.174: - movsd %xmm0, 56(%rsp) - testb %r12b, %r12b - fldl 56(%rsp) - je ..B5.120 -..B5.119: - movl %ebx, %edi - fstpl (%rsp) -..___tag_value_gammaf_r.557: - call fesetround@PLT -..___tag_value_gammaf_r.558: -..B5.179: - fldl (%rsp) -..B5.120: - fldt 8(%rsp) - testb %bpl, %bpl - fsubp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.121: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.123: - flds 112(%rsp) - movss .L_2il0floatpacket.3(%rip), %xmm3 - fchs - movaps %xmm3, %xmm1 - fstl 96(%rsp) - subss %xmm2, %xmm1 - movss %xmm1, 104(%rsp) - movss 104(%rsp), %xmm0 - fstpt 40(%rsp) - fldt 40(%rsp) - subss %xmm3, %xmm0 - movss %xmm0, 104(%rsp) - movss 104(%rsp), %xmm2 - movss %xmm2, 56(%rsp) - flds 56(%rsp) - movsd 96(%rsp), %xmm0 - fsubrp %st, %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fmul %st(0), %st - fstpt 24(%rsp) - call log@PLT -..B5.178: - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 192 - fchs - fldt 56(%rsp) - fstpt (%rsp) - fstpt 24(%rsp) -..___tag_value_gammaf_r.560: - call lgammaf_pos -..___tag_value_gammaf_r.561: -..B5.177: - fldt 24(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 176 - fldt 24(%rsp) - lea _S14(%rip), %rax - fld %st(0) - lea _S16(%rip), %r8 - fmul %st(1), %st - lea _S10(%rip), %rdx - fxch %st(3) - fsubrp %st, %st(2) - fldl (%rax) - lea _S12(%rip), %r9 - fmul %st(3), %st - lea _S06(%rip), %rcx - fldl (%r8) - lea _S08(%rip), %r10 - fmul %st(4), %st - fxch %st(1) - faddl (%rdx) - fmul %st(4), %st - fxch %st(1) - faddl (%r9) - fmul %st(4), %st - fxch %st(1) - faddl (%rcx) - fmul %st(4), %st - fxch %st(1) - faddl (%r10) - fmul %st(4), %st - lea _S02(%rip), %rsi - fxch %st(1) - faddl (%rsi) - lea _S04(%rip), %r11 - fmulp %st, %st(2) - faddl (%r11) - fmulp %st, %st(3) - andb $127, 73(%rsp) - faddp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(1) - fstpt 8(%rsp) - fldt 64(%rsp) - fstpl 96(%rsp) - movsd 96(%rsp), %xmm0 - call log@PLT -..B5.176: - fldt 8(%rsp) - testb %r12b, %r12b - movsd %xmm0, 56(%rsp) - fldl 56(%rsp) - je ..B5.125 -..B5.124: - movl %ebx, %edi - fstpl (%rsp) - fstpt 8(%rsp) -..___tag_value_gammaf_r.563: - call fesetround@PLT -..___tag_value_gammaf_r.564: -..B5.180: - fldt 8(%rsp) - fldl (%rsp) -..B5.125: - testb %bpl, %bpl - fsubrp %st, %st(1) - fstps 104(%rsp) - je ..B5.127 -..B5.126: - fldcw 110(%rsp) -..B5.127: - movss 104(%rsp), %xmm0 -..B5.128: - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B5.129: - testb %bpl, %bpl - je ..B5.131 -..B5.130: - fldcw 110(%rsp) -..B5.131: - testb %r12b, %r12b - je ..B5.133 -..B5.132: - movl %ebx, %edi -..___tag_value_gammaf_r.585: - call fesetround@PLT -..___tag_value_gammaf_r.586: -..B5.133: - pxor %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B5.134: - testb %bpl, %bpl - je ..B5.136 -..B5.135: - fldcw 110(%rsp) -..B5.136: - testb %r12b, %r12b - je ..B5.138 -..B5.137: - movl %ebx, %edi -..___tag_value_gammaf_r.607: - call fesetround@PLT -..___tag_value_gammaf_r.608: -..B5.138: - pxor %xmm0, %xmm0 - addq $120, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 176 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B5.139: - testb %r12b, %r12b - je ..B5.141 -..B5.140: - movl %ebx, %edi -..___tag_value_gammaf_r.629: - call fesetround@PLT -..___tag_value_gammaf_r.630: -..B5.141: - lea _PBIG(%rip), %rax - testb %bpl, %bpl - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 104(%rsp) - je ..B5.127 -..B5.142: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.144: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B5.83 -..B5.145: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B5.100 -..B5.146: - fstp %st(0) - fstpt 80(%rsp) - jmp ..B5.111 -..B5.147: - testb %r12b, %r12b - je ..B5.149 -..B5.148: - movl %ebx, %edi -..___tag_value_gammaf_r.631: - call fesetround@PLT -..___tag_value_gammaf_r.632: -..B5.149: - movss .L_2il0floatpacket.6(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - je ..B5.127 -..B5.150: - fldcw 110(%rsp) - jmp ..B5.127 -..B5.152: - movb (%rsp), %al - testb %al, %al - je ..B5.154 -..B5.153: - movl $-1, (%r15) - jmp ..B5.155 -..B5.154: - movl $1, (%r15) -..B5.155: - testb %r12b, %r12b - je ..B5.157 -..B5.156: - movl %ebx, %edi -..___tag_value_gammaf_r.633: - call fesetround@PLT -..___tag_value_gammaf_r.634: -..B5.157: - movss .L_2il0floatpacket.6(%rip), %xmm1 - testb %bpl, %bpl - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, 104(%rsp) - je ..B5.127 -..B5.158: - fldcw 110(%rsp) - jmp ..B5.127 - .align 16,0x90 - .cfi_endproc - .type gammaf_r,@function - .size gammaf_r,.-gammaf_r - .data -# -- End gammaf_r - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 16 -_LN_SQRT_TWO_PI: - .word 42293 - .word 9717 - .word 36419 - .word 60223 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _LN_SQRT_TWO_PI,@object - .size _LN_SQRT_TWO_PI,16 - .align 16 -_A: - .long 1082130432 - .long 1090519040 - .long 1098907648 - .long 1107296256 - .long 1115684864 - .long 1124073472 - .long 1132462080 - .long 1140850688 - .long 1149239296 - .long 1157627904 - .long 1166016512 - .type _A,@object - .size _A,44 - .space 4, 0x00 # pad - .align 16 -_B: - .long 1048576000 - .long 1040187392 - .long 1031798784 - .long 1023410176 - .long 1015021568 - .long 1006632960 - .long 998244352 - .long 989855744 - .long 981467136 - .long 973078528 - .long 964689920 - .type _B,@object - .size _B,44 - .space 4, 0x00 # pad - .align 16 -_C5: - .long 2219950285 - .long 1064025046 - .long 657069815 - .long 3214307011 - .long 2744833897 - .long 1073883684 - .long 3746154693 - .long 1075058958 - .long 24044097 - .long 1068577021 - .long 1852002888 - .long 3217117620 - .long 426096126 - .long 1071550305 - .long 3945160253 - .long 3219869968 - .long 889741930 - .long 1064529657 - .long 2918550257 - .long 3214927323 - .long 3306758232 - .long 1074858655 - .long 2801363753 - .long 1076895752 - .long 216130741 - .long 1069082446 - .long 2022127190 - .long 3217667546 - .long 4043317980 - .long 1072274701 - .long 948933764 - .long 3220711872 - .long 1837011561 - .long 1065353117 - .long 614133169 - .long 3215620106 - .long 128884864 - .long 1075872424 - .long 1749057555 - .long 1078324632 - .long 1278187959 - .long 1069867493 - .long 1878987920 - .long 3218464301 - .long 2508500615 - .long 1073176520 - .long 3716705454 - .long 3221664954 - .long 1971591775 - .long 1066198339 - .long 3489274850 - .long 3216507307 - .long 2978044890 - .long 1076904104 - .long 399657850 - .long 1079744937 - .long 2176842243 - .long 1070795947 - .long 1642919051 - .long 3219397359 - .long 325839939 - .long 1074155724 - .long 1189620011 - .long 3222667808 - .long 583706808 - .long 1067149757 - .long 1974968851 - .long 3217478792 - .long 3433705325 - .long 1077944360 - .long 3946626575 - .long 1081121452 - .long 1495561758 - .long 1071787114 - .long 4062466621 - .long 3220390645 - .long 1556755231 - .long 1075170624 - .long 75679593 - .long 3223694033 - .long 3504606470 - .long 1068150172 - .long 1348305099 - .long 3218489288 - .long 3580634696 - .long 1078988808 - .long 1259291510 - .long 1082352761 - .long 652214916 - .long 1072807425 - .long 4143445962 - .long 3221412067 - .long 2123749472 - .long 1076202613 - .long 4248403985 - .long 3224731560 - .long 1507106795 - .long 1069174188 - .long 3519298167 - .long 3219518582 - .long 3633366982 - .long 1080035328 - .long 2867629808 - .long 1083583554 - .long 3975256969 - .long 1073841792 - .long 2533063588 - .long 3222447083 - .long 3711656185 - .long 1077242956 - .long 3206083648 - .long 3225774644 - .long 4129446490 - .long 1070209876 - .long 3121668168 - .long 3220557159 - .long 3645659330 - .long 1081082878 - .long 1254870306 - .long 1084814091 - .long 1589013900 - .long 1074883091 - .long 485315198 - .long 3223488795 - .long 402512060 - .long 1078287430 - .long 1922980292 - .long 3226820482 - .long 157052617 - .long 1071251449 - .long 2992469705 - .long 3221600396 - .long 1492808525 - .long 1082130942 - .long 3131814131 - .long 1086044499 - .long 2683002247 - .long 1075927855 - .long 2649378904 - .long 3224533843 - .long 3018380877 - .long 1079333956 - .long 653917322 - .long 3227867691 - .long 2713966257 - .long 1072296037 - .long 4209563533 - .long 3222646006 - .long 943575735 - .long 1083179262 - .long 512478091 - .long 1087274844 - .long 3856346814 - .long 1076974372 - .long 1324813592 - .long 3225580569 - .long 1409229319 - .long 1080381507 - .long 3787450294 - .long 3228915583 - .long 3333539597 - .long 1073342203 - .long 2943809629 - .long 3223692845 - .long 794946536 - .long 1084227710 - .long 1068889795 - .long 1088463522 - .long 3231716378 - .long 1078021787 - .long 4072054083 - .long 3226628144 - .long 1998042203 - .long 1081429569 - .long 1148344549 - .long 3229963818 - .type _C5,@object - .size _C5,704 - .align 16 -_C5_0: - .long 2415979356 - .long 1070304454 - .long 2697119297 - .long 3218348439 - .long 4195263586 - .long 1073523467 - .long 3725211212 - .long 1070931684 - .long 2560716363 - .long 3219131775 - .long 4079479268 - .long 1075907809 - .long 1732432466 - .long 1071796064 - .long 3508892908 - .long 3219947991 - .long 2788858919 - .long 1077667382 - .long 2647999156 - .long 1072759450 - .long 547175205 - .long 3220886396 - .long 4254853098 - .long 1079215590 - .long 2099688739 - .long 1073767129 - .long 1386213411 - .long 3221881825 - .long 1373988558 - .long 1080631372 - .long 3012547841 - .long 1074795638 - .long 3012018428 - .long 3222904295 - .long 3968063321 - .long 1082046682 - .long 2372211290 - .long 1075829504 - .long 1852200321 - .long 3223939920 - .long 822603622 - .long 1083320025 - .long 2940107565 - .long 1076868074 - .long 1118670349 - .long 3224982033 - .long 4034033966 - .long 1084551076 - .long 3328910691 - .long 1077911588 - .long 4065388177 - .long 3226027369 - .long 3374537656 - .long 1085781831 - .long 3604631852 - .long 1078957575 - .long 786281660 - .long 3227074315 - .long 3320933858 - .long 1087012393 - .long 4128496013 - .long 1080004805 - .long 820316847 - .long 3228122065 - .long 596318476 - .long 1088242837 - .type _C5_0,@object - .size _C5_0,264 - .space 8, 0x00 # pad - .align 16 -_C4: - .long 951661919 - .long 3199388794 - .long 406044492 - .long 1057185581 - .long 2144499589 - .long 3220511658 - .long 1533861631 - .long 1073519965 - .long 4190848711 - .long 3208779382 - .long 4195628742 - .long 1064581106 - .long 501584638 - .long 3218581252 - .long 4276665641 - .long 1072296199 - .long 2679252139 - .long 3214810152 - .long 1146917984 - .long 1069511714 - .long 3597634954 - .long 3220184694 - .type _C4,@object - .size _C4,88 - .space 8, 0x00 # pad - .align 16 -_C3: - .long 953601802 - .long 1073782987 - .long 53392282 - .long 1061851682 - .long 2280564131 - .long 3213671573 - .long 126074441 - .long 1073190208 - .long 1099663909 - .long 3221770684 - .long 2017365083 - .long 1069271442 - .long 1709742889 - .long 3219105406 - .long 4029656968 - .long 1074967560 - .long 3888843833 - .long 3222480972 - .type _C3,@object - .size _C3,72 - .space 8, 0x00 # pad - .align 16 -_LGAMMAF_C2: - .long 4192182476 - .long 1073863432 - .long 3945858175 - .long 1063638439 - .long 2616885214 - .long 3215216300 - .long 3886441432 - .long 1074077679 - .long 3758761250 - .long 3222447567 - .long 984616456 - .long 1070653784 - .long 2508733349 - .long 3220210863 - .long 2272977058 - .long 1075337602 - .long 3074119607 - .long 3222665277 - .type _LGAMMAF_C2,@object - .size _LGAMMAF_C2,72 - .space 8, 0x00 # pad - .align 16 -_LM: - .long 1666629183 - .long 1073177304 - .type _LM,@object - .size _LM,8 - .space 8, 0x00 # pad - .align 16 -_C1: - .long 3166931522 - .long 3216972217 - .long 900077338 - .long 1065586189 - .long 3591574455 - .long 3213040571 - .long 425993680 - .long 1068534592 - .long 2772351024 - .long 3217220647 - .long 3693139651 - .long 1066567133 - .long 2619486276 - .long 3214985484 - .long 3371509884 - .long 1071576875 - .long 2931564028 - .long 1032391485 - .type _C1,@object - .size _C1,72 - .space 8, 0x00 # pad - .align 16 -_C0: - .long 561403216 - .long 1074066324 - .long 3155481408 - .long 1068272863 - .long 4228834524 - .long 3219267730 - .long 2107372888 - .long 1076349696 - .long 3392182390 - .long 3224133636 - .long 3282054928 - .long 1074040136 - .long 4253763640 - .long 3223020498 - .long 1528000942 - .long 1076400076 - .long 4059292707 - .long 3223275314 - .type _C0,@object - .size _C0,72 - .space 8, 0x00 # pad - .align 16 -_LRIB: - .long 2838661661 - .long 3221617475 - .long 169597185 - .long 3221617473 - .long 1795500005 - .long 3221617470 - .long 3503748181 - .long 3222250619 - .long 1417424869 - .long 3222250609 - .long 2147483648 - .long 3222250589 - .type _LRIB,@object - .size _LRIB,48 - .align 16 -_LRP: - .long 3272807679 - .long 3224639578 - .long 1009311715 - .long 1076045439 - .long 2835657108 - .long 3221135661 - .long 817526409 - .long 1017707397 - .long 2658191496 - .long 3232572725 - .long 2929834182 - .long 1081046750 - .long 2523682372 - .long 3224680861 - .long 915934040 - .long 3166559235 - .type _LRP,@object - .size _LRP,64 - .align 16 -_RRIB: - .long 890743176 - .long 3221465087 - .long 2516645996 - .long 3221465084 - .long 4142548816 - .long 3221465081 - .long 1538591435 - .long 3221825040 - .long 3164494255 - .long 3221825037 - .long 495429779 - .long 3221825035 - .type _RRIB,@object - .size _RRIB,48 - .align 16 -_RRP: - .long 93164946 - .long 1073124518 - .long 2953029931 - .long 1075015403 - .long 1722766176 - .long 1073233897 - .long 1830807661 - .long 1016083003 - .long 308861496 - .long 1079775543 - .long 2541562915 - .long 1077531858 - .long 1596959842 - .long 1075781798 - .long 3819862626 - .long 1021220357 - .type _RRP,@object - .size _RRP,64 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,16 - .align 4 -.L_2il0floatpacket.2: - .long 0xc0200000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x4b400000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -.L_2il0floatpacket.4: - .long 0x40000000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,4 - .align 4 -.L_2il0floatpacket.6: - .long 0x3f800000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,4 - .align 4 -_S16: - .long 2760304672 - .long 3218442033 - .type _S16,@object - .size _S16,8 - .align 4 -_S14: - .long 3264091561 - .long 3215213868 - .type _S14,@object - .size _S14,8 - .align 4 -_S12: - .long 1381164920 - .long 3217582605 - .type _S12,@object - .size _S12,8 - .align 4 -_S10: - .long 3387828299 - .long 3217636872 - .type _S10,@object - .size _S10,8 - .align 4 -_S08: - .long 3786959951 - .long 3218084854 - .type _S08,@object - .size _S08,8 - .align 4 -_S06: - .long 2675586079 - .long 3218453489 - .type _S06,@object - .size _S06,8 - .align 4 -_S04: - .long 1432133341 - .long 3219214642 - .type _S04,@object - .size _S04,8 - .align 4 -_S02: - .long 1648889397 - .long 3220853158 - .type _S02,@object - .size _S02,8 - .align 4 -_PBIG: - .long 2139095039 - .long 2139095039 - .type _PBIG,@object - .size _PBIG,8 - .align 4 -.L_2il0floatpacket.8: - .long 0xcb400000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgammal.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgammal.S deleted file mode 100644 index 156681889b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lgammal.S +++ /dev/null @@ -1,9424 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lgammal.c" - .text -..TXTST0: -# -- Begin lgammal - .text - .align 16,0x90 - .globl lgammal -lgammal: -# parameter 1: 16 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_lgammal.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - fldt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 32 - lea 16(%rsp), %rdi - fstpt (%rsp) -..___tag_value_lgammal.5: - call __libm_lgammal -..___tag_value_lgammal.6: -..B1.2: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type lgammal,@function - .size lgammal,.-lgammal - .data -# -- End lgammal - .text -# -- Begin __libm_lgammal - .text - .align 16,0x90 -__libm_lgammal: -# parameter 1: 336 + %rsp -# parameter 2: %rdi -..B2.1: - .cfi_startproc -..___tag_value___libm_lgammal.9: -..L10: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $280, %rsp - .cfi_def_cfa_offset 336 - movq %rdi, %rbp - movq %fs:40, %rax - xorl %r12d, %r12d - xorq %rsp, %rax - xorb %r14b, %r14b - movq %rax, 272(%rsp) -..B2.2: - fnstcw 194(%rsp) -..B2.3: -..___tag_value___libm_lgammal.24: - call fegetround@PLT -..___tag_value___libm_lgammal.25: -..B2.275: - movl %eax, %r13d -..B2.4: - testl %r13d, %r13d - je ..B2.6 -..B2.5: - xorl %edi, %edi - movl $1, %r12d -..___tag_value___libm_lgammal.26: - call fesetround@PLT -..___tag_value___libm_lgammal.27: -..B2.6: - movzwl 194(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B2.10 -..B2.7: - orl $-64768, %edx - movw %dx, 192(%rsp) -..B2.8: - fldcw 192(%rsp) -..B2.9: - movb $1, %r14b -..B2.10: - movzbl 345(%rsp), %ecx - lea ones(%rip), %rax - movl %ecx, %r15d - andl $128, %r15d - shrl $7, %r15d - movzwl 344(%rsp), %ebx - movss (%rax,%r15,4), %xmm0 - andl $32767, %ebx - shll $15, %r15d - orl %ebx, %r15d - shll $16, %r15d - movzwl 342(%rsp), %edx - orl %edx, %r15d - cmpl $32767, %ebx - je ..B2.259 -..B2.11: - fldt 336(%rsp) - fldt .L_2il0floatpacket.0(%rip) - fucomi %st(1), %st - jp ..B2.12 - je ..B2.252 -..B2.12: - lea _OFW_BOUND(%rip), %rax - fldt (%rax) - fcomip %st(2), %st - jb ..B2.244 -..B2.13: - fldt .L_2il0floatpacket.1(%rip) - fucomip %st(2), %st - jp ..B2.14 - je ..B2.235 -..B2.14: - fldt .L_2il0floatpacket.2(%rip) - fucomip %st(2), %st - jp ..B2.15 - je ..B2.235 -..B2.15: - testl %r15d, %r15d - jl ..B2.227 -..B2.16: - cmpl $16382, %ebx - jl ..B2.163 -..B2.17: - cmpl $16463, %ebx - jge ..B2.156 -..B2.18: - fldt .L_2il0floatpacket.4(%rip) - fcomip %st(2), %st - jbe ..B2.146 -..B2.19: - fldt .L_2il0floatpacket.5(%rip) - fcomip %st(2), %st - jae ..B2.113 - jp ..B2.113 -..B2.20: - movl %r15d, %eax - andl $2147483647, %eax - cmpl $1073659904, %eax - jl ..B2.104 -..B2.21: - fcomi %st(1), %st - jae ..B2.24 - jp ..B2.24 -..B2.22: - fldt .L_2il0floatpacket.10(%rip) - fcomip %st(2), %st - jbe ..B2.24 -..B2.23: - fstp %st(0) - fldt .L_2il0floatpacket.11(%rip) - movl $1, (%rbp) - jmp ..B2.27 -..B2.24: - fldt .L_2il0floatpacket.11(%rip) - fcomi %st(2), %st - jae ..B2.37 - jp ..B2.37 -..B2.25: - fldt .L_2il0floatpacket.12(%rip) - fcomip %st(3), %st - jbe ..B2.37 -..B2.26: - fstp %st(1) - movl $1, (%rbp) -..B2.27: - lea 2800+_ldbA(%rip), %rdx - lea 480+_dbA(%rip), %rcx - fcomip %st(1), %st - jae ..B2.29 - jp ..B2.29 -..B2.28: - fldt .L_2il0floatpacket.2(%rip) - lea 656+_dbA(%rip), %rcx - lea 2912+_ldbA(%rip), %rdx - fsubrp %st, %st(1) - jmp ..B2.30 -..B2.29: - fldt .L_2il0floatpacket.1(%rip) - fsubp %st, %st(1) -..B2.30: - fldl 88(%rcx) - lea _TWO_32H(%rip), %rax - fmul %st(1), %st - fld %st(1) - fld %st(2) - testl %r12d, %r12d - fldl (%rax) - fmul %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(3) - fsub %st(2), %st - fldt (%rdx) - fxch %st(4) - faddl 104(%rcx) - fmul %st(5), %st - fldt 48(%rdx) - fldt 16(%rdx) - fxch %st(2) - faddl 96(%rcx) - fmul %st(7), %st - faddl 80(%rcx) - fmul %st(7), %st - faddl 152(%rcx) - fmul %st(7), %st - faddl 120(%rcx) - fmul %st(7), %st - faddl 112(%rcx) - fmul %st(7), %st - faddl 136(%rcx) - fmul %st(7), %st - faddl 128(%rcx) - fmul %st(7), %st - faddl 40(%rcx) - fmul %st(7), %st - faddl 32(%rcx) - fmul %st(7), %st - faddl 56(%rcx) - fmul %st(7), %st - faddl 48(%rcx) - fmul %st(7), %st - faddl 144(%rcx) - fmul %st(7), %st - faddp %st, %st(6) - fxch %st(5) - fmul %st(6), %st - faddp %st, %st(5) - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fldt 64(%rdx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 32(%rdx) - faddp %st, %st(1) - fmul %st(4), %st - fldt 80(%rdx) - faddp %st, %st(1) - fmul %st(4), %st - fld %st(1) - fldt 96(%rdx) - faddp %st, %st(2) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - fmul %st(6), %st - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fldl (%rcx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(3) - fmul %st(2), %st - fxch %st(1) - faddl 72(%rcx) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmul %st(5), %st - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(1) - fldl 16(%rcx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fxch %st(1) - faddl 168(%rcx) - faddp %st, %st(2) - fld %st(3) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(1) - fldl 64(%rcx) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fxch %st(1) - faddl 8(%rcx) - faddp %st, %st(2) - fld %st(3) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(1) - fldl 160(%rcx) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(4) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddl 24(%rcx) - faddp %st, %st(1) - fld %st(1) - fadd %st(3), %st - fsubp %st, %st(3) - fxch %st(2) - fmul %st, %st(4) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) - fxch %st(1) - je ..B2.33 -..B2.31: - fstp %st(1) - fstp %st(0) - movl %r13d, %edi -..___tag_value___libm_lgammal.28: - call fesetround@PLT -..___tag_value___libm_lgammal.29: -..B2.32: - fldt (%rsp) - fldt 16(%rsp) -..B2.33: - testb %r14b, %r14b - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.35 -..B2.34: - fldcw 194(%rsp) -..B2.35: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.36: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.37: - fstp %st(0) - fcomi %st(1), %st - jae ..B2.46 - jp ..B2.46 -..B2.38: - fldt .L_2il0floatpacket.2(%rip) - fcomip %st(2), %st - jbe ..B2.46 -..B2.39: - fstp %st(0) - lea 3024+_ldbA(%rip), %rax - addq $-16, %rsp - .cfi_def_cfa_offset 352 - lea 3040+_ldbA(%rip), %rdi - lea 832+_dbA(%rip), %rsi - movl $1, (%rbp) - lea 16(%rsp), %rdx - fldt (%rax) - fsubrp %st, %st(1) - fstpt (%rsp) -..___tag_value___libm_lgammal.51: - call __libm_p25 -..___tag_value___libm_lgammal.52: -..B2.276: - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B2.40: - testl %r12d, %r12d - je ..B2.42 -..B2.41: - movl %r13d, %edi -..___tag_value___libm_lgammal.54: - call fesetround@PLT -..___tag_value___libm_lgammal.55: -..B2.42: - fldt (%rsp) - testb %r14b, %r14b - fldt 16(%rsp) - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.44 -..B2.43: - fldcw 194(%rsp) -..B2.44: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.45: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.46: - fcomi %st(1), %st - jbe ..B2.95 -..B2.47: - fldt .L_2il0floatpacket.14(%rip) - fcomi %st(2), %st - jae ..B2.56 - jp ..B2.56 -..B2.48: - fstp %st(0) - fldt .L_2il0floatpacket.15(%rip) - fcomi %st(2), %st - jbe ..B2.56 -..B2.49: - fstp %st(1) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - lea 3424+_ldbA(%rip), %rdi - lea 1360+_dbA(%rip), %rsi - lea 16(%rsp), %rdx - movl $-1, (%rbp) - fsubrp %st, %st(1) - fstpt (%rsp) -..___tag_value___libm_lgammal.77: - call __libm_p25 -..___tag_value___libm_lgammal.78: -..B2.277: - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B2.50: - testl %r12d, %r12d - je ..B2.52 -..B2.51: - movl %r13d, %edi -..___tag_value___libm_lgammal.80: - call fesetround@PLT -..___tag_value___libm_lgammal.81: -..B2.52: - fldt (%rsp) - testb %r14b, %r14b - fldt 16(%rsp) - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.54 -..B2.53: - fldcw 194(%rsp) -..B2.54: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.55: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.56: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fstp %st(0) - fstpt (%rsp) - fldt (%rsp) - fstpt 64(%rsp) - call nearbyintl@PLT -..B2.278: - fldt 64(%rsp) - fldt .L_2il0floatpacket.0(%rip) - addq $16, %rsp - .cfi_def_cfa_offset 336 - fxch %st(2) - fucomi %st(1), %st - jp ..B2.57 - je ..B2.191 -..B2.57: - fldt .L_2il0floatpacket.17(%rip) - fcomip %st(2), %st - ja ..B2.69 - jp ..B2.69 -..B2.58: - fldt .L_2il0floatpacket.18(%rip) - fcomip %st(2), %st - jb ..B2.69 -..B2.59: - fstp %st(0) - fldt .L_2il0floatpacket.19(%rip) - fcomip %st(1), %st - jae ..B2.61 - jp ..B2.61 -..B2.60: - movl $-1, (%rbp) - jmp ..B2.62 -..B2.61: - movl $1, (%rbp) -..B2.62: - fldt .L_2il0floatpacket.1(%rip) - lea ones(%rip), %rdx - faddp %st, %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fld %st(0) - movb 105(%rsp), %al - andb $-128, %al - shrb $7, %al - fmul %st(1), %st - fstpt 128(%rsp) - fld %st(0) - fchs - movzbl %al, %ecx - fstpt 16(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - lea 240(%rsp), %rdi - fmuls (%rdx,%rcx,4) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_lgammal.105: - call __libm_logl_k80@PLT -..___tag_value___libm_lgammal.106: -..B2.279: - fstp %st(0) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B2.63: - fldt 96(%rsp) - lea 1560+_dbA(%rip), %rax - fldt 16(%rsp) - lea 1552+_dbA(%rip), %rdx - lea 1544+_dbA(%rip), %rcx - lea 1536+_dbA(%rip), %rbx - lea 3600+_ldbA(%rip), %rbp - lea 3584+_ldbA(%rip), %rsi - fldl (%rax) - lea 1568+_dbA(%rip), %r10 - fmul %st(2), %st - lea 1576+_dbA(%rip), %r11 - fldt (%rbp) - lea 1584+_dbA(%rip), %r15 - fldt (%rsi) - lea 1592+_dbA(%rip), %rax - lea 3568+_ldbA(%rip), %r8 - lea 3552+_ldbA(%rip), %r9 - testl %r12d, %r12d - fxch %st(2) - faddl (%rdx) - fmul %st(4), %st - fldt (%r8) - fldt (%r9) - fxch %st(2) - faddl (%rcx) - fmul %st(6), %st - faddl (%rbx) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(2) - fldl (%r10) - fmul %st(1), %st - fldt 128(%rsp) - fxch %st(1) - faddl (%r11) - fmul %st(2), %st - faddl (%r15) - fmul %st(2), %st - faddl (%rax) - lea 1600+_dbA(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 1608+_dbA(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 1616+_dbA(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 1624+_dbA(%rip), %rax - fmul %st(2), %st - faddl (%rax) - lea 3664+_ldbA(%rip), %rax - fmul %st(2), %st - fmul %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fstpt 240(%rsp) - fldt 240(%rsp) - faddp %st, %st(2) - fldt (%rax) - lea 3648+_ldbA(%rip), %rax - fmul %st(1), %st - fldt (%rax) - lea 3632+_ldbA(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - lea 3616+_ldbA(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(1) - fsubp %st, %st(1) - fstpt (%rsp) - je ..B2.65 -..B2.64: - movl %r13d, %edi -..___tag_value___libm_lgammal.108: - call fesetround@PLT -..___tag_value___libm_lgammal.109: -..B2.65: - fldt 224(%rsp) - testb %r14b, %r14b - fldt (%rsp) - fsubp %st, %st(1) - fldt 208(%rsp) - fsubrp %st, %st(1) - fstpt 176(%rsp) - je ..B2.67 -..B2.66: - fldcw 194(%rsp) -..B2.67: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.68: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.69: - fnstcw (%rsp) - movzwl (%rsp), %eax - orl $3072, %eax - movl %eax, 8(%rsp) - fldcw 8(%rsp) - fistl 16(%rsp) - fldcw (%rsp) - fld %st(1) - lea 848+_ldbA(%rip), %r8 - movl 16(%rsp), %edx - fsubp %st, %st(1) - negl %edx - lea -2(%rdx), %eax - andl $1, %edx - jne ..B2.72 -..B2.70: - fcomi %st(2), %st - jae ..B2.73 - jp ..B2.73 -..B2.71: - movl $-1, (%rbp) - jmp ..B2.74 -..B2.72: - jne ..B2.188 -..B2.73: - movl $1, (%rbp) -..B2.74: - fldt .L_2il0floatpacket.20(%rip) - xorl %edx, %edx - fxch %st(2) - fcomi %st(2), %st - fxch %st(2) - fstp %st(0) - cmova %edx, %eax - movl $17, %ecx - xorl %ebp, %ebp - lea 1424+_ldbA(%rip), %rdx - fcomi %st(2), %st - cmova %ecx, %ebp - addl %ebp, %eax - movslq %eax, %rsi - shlq $4, %rsi - fldt (%rsi,%r8) - lea (%rax,%rax), %r8d - movslq %r8d, %r8 - fsubr %st(2), %st - shlq $4, %r8 - fldt (%r8,%rdx) - fcomip %st(3), %st - jae ..B2.84 - jp ..B2.84 -..B2.75: - fldt 16(%r8,%rdx) - fcomip %st(3), %st - jbe ..B2.84 -..B2.77: - fstp %st(3) - fstp %st(1) - lea _ldbA(%rip), %rbx - lea (%rax,%rax,2), %ecx - movslq %ecx, %rcx - lea (%rax,%rax,4), %eax - shll $2, %eax - lea _dbA(%rip), %rbp - shlq $4, %rcx - addq $-16, %rsp - .cfi_def_cfa_offset 352 - movslq %eax, %rax - lea 256(%rsp), %rdx - fxch %st(1) - fstpt (%rsp) - lea 4480(%rbx,%rcx), %rdi - fstpt 16(%rsp) - lea 2432(%rbp,%rax,8), %rsi -..___tag_value___libm_lgammal.131: - call __libm_p19root -..___tag_value___libm_lgammal.132: -..B2.280: - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B2.78: - testl %r12d, %r12d - je ..B2.80 -..B2.79: - movl %r13d, %edi - fstpt (%rsp) -..___tag_value___libm_lgammal.134: - call fesetround@PLT -..___tag_value___libm_lgammal.135: -..B2.305: - fldt (%rsp) -..B2.80: - fldt 240(%rsp) - testb %r14b, %r14b - fldt 256(%rsp) - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.311 -..B2.81: - fstpt 96(%rsp) -..B2.281: - fldcw 194(%rsp) - jmp ..B2.82 -..B2.311: - fstp %st(0) -..B2.82: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.83: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.84: - fstp %st(0) - fstpt 96(%rsp) -..B2.85: - lea -16382(%rbx), %eax - cmpl $2, %eax - jne ..B2.87 -..B2.86: - fldt .L_2il0floatpacket.21(%rip) - addl $-16380, %ebx - fcomip %st(1), %st - cmova %ebx, %eax -..B2.87: - fldt .L_2il0floatpacket.19(%rip) - lea (%rax,%rax,4), %edx - fmul %st, %st(1) - lea (%rdx,%rdx), %eax - fstp %st(2) - fstpt 80(%rsp) - lea _dbA(%rip), %rsi - fldt .L_2il0floatpacket.16(%rip) - lea _ldbA(%rip), %rbx - movzwl 88(%rsp), %ecx - lea _TWO_32H(%rip), %rbp - andl $-32768, %ecx - orl $-49153, %ecx - movw %cx, 88(%rsp) - fldt 80(%rsp) - shll $2, %edx - fsubp %st, %st(1) - movslq %edx, %rdx - movslq %eax, %rax - shlq $4, %rax - fstpt 80(%rsp) - fldt 80(%rsp) - fldl 1784(%rsi,%rdx,8) - fmul %st(1), %st - fldt 3824(%rbx,%rax) - fldt 3808(%rbx,%rax) - fldt 3792(%rbx,%rax) - fldt 3776(%rbx,%rax) - fldt 3760(%rbx,%rax) - fxch %st(5) - faddl 1776(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1768(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1760(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1752(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1744(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1736(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1728(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1720(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1712(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1704(%rsi,%rdx,8) - fmul %st(6), %st - faddl 1696(%rsi,%rdx,8) - fmul %st(6), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmul %st(1), %st - fldt 3744(%rbx,%rax) - faddp %st, %st(1) - fmul %st(1), %st - fldt 3728(%rbx,%rax) - faddp %st, %st(1) - fmul %st(1), %st - fld %st(1) - fldt 3712(%rbx,%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt 3696(%rbx,%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 3680(%rbx,%rax) - faddp %st, %st(1) - fldl (%rbp) - fld %st(0) - fmul %st(4), %st - fadd %st, %st(3) - fsubrp %st, %st(3) - fxch %st(2) - fstpt 160(%rsp) - fldt 160(%rsp) - fld %st(2) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(2), %st - fxch %st(1) - fsubr %st, %st(3) - fld %st(3) - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(6) - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(2) - fldl 1632(%rsi,%rdx,8) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(4) - fmul %st(2), %st - fxch %st(1) - faddl 1640(%rsi,%rdx,8) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(1) - fmul %st(4), %st - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st(5), %st - faddp %st, %st(2) - fldl 1680(%rsi,%rdx,8) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(4) - fmul %st(2), %st - fxch %st(1) - faddl 1688(%rsi,%rdx,8) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(1) - fmul %st(4), %st - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(1) - fmul %st(5), %st - faddp %st, %st(2) - fldl 1664(%rsi,%rdx,8) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fxch %st(1) - faddl 1672(%rsi,%rdx,8) - faddp %st, %st(3) - fld %st(4) - fmul %st(2), %st - fstpt 128(%rsp) - fldt 128(%rsp) - fadd %st, %st(1) - fxch %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fldl 1648(%rsi,%rdx,8) - fld %st(0) - fadd %st(4), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.0(%rip) - fxch %st(3) - faddl 1656(%rsi,%rdx,8) - faddp %st, %st(1) - fstpt (%rsp) - fldt 336(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - fmulp %st, %st(3) - lea 272(%rsp), %rdi - fxch %st(2) - fstpt (%rsp) - fstpt 16(%rsp) - fstpt 64(%rsp) -..___tag_value___libm_lgammal.157: - call __libm_logl_k80@PLT -..___tag_value___libm_lgammal.158: -..B2.282: - fstp %st(0) - fldt .L_2il0floatpacket.0(%rip) - fldt 64(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B2.88: - fldt 96(%rsp) - lea ones(%rip), %rdx - movb 105(%rsp), %al - addq $-32, %rsp - .cfi_def_cfa_offset 368 - andb $-128, %al - lea 240(%rsp), %rdi - shrb $7, %al - movzbl %al, %ecx - fmuls (%rdx,%rcx,4) - fstpt (%rsp) - fldt (%rsp) - fxch %st(2) - fstpt 16(%rsp) - fxch %st(1) - fstpt 80(%rsp) - fstpt 64(%rsp) -..___tag_value___libm_lgammal.161: - call __libm_logl_k80@PLT -..___tag_value___libm_lgammal.162: -..B2.283: - fstp %st(0) - fldt 64(%rsp) - fldt 80(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B2.89: - fld %st(0) - lea 544+_ldbA(%rip), %rcx - fmul %st(2), %st - fld %st(1) - lea 528+_ldbA(%rip), %rbx - lea 512+_ldbA(%rip), %rbp - lea 496+_ldbA(%rip), %rsi - lea 480+_ldbA(%rip), %r8 - lea 464+_ldbA(%rip), %r9 - lea 448+_ldbA(%rip), %r10 - lea 432+_ldbA(%rip), %r11 - lea 416+_ldbA(%rip), %r15 - lea 304+_ldbA(%rip), %rax - lea 48+_dbA(%rip), %rdx - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(1) - fsub %st(1), %st - fxch %st(2) - fmul %st(0), %st - fldt (%rcx) - lea 400+_ldbA(%rip), %rcx - fmul %st(1), %st - fldt (%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r15) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 384+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 368+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 352+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 336+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fld %st(2) - fmul %st(3), %st - fldt (%rcx) - lea 320+_ldbA(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rax) - lea 64+_dbA(%rip), %rax - faddp %st, %st(2) - fld %st(0) - fldt .L_2il0floatpacket.2(%rip) - fmulp %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fld %st(5) - fmul %st(3), %st - fxch %st(5) - fmul %st(0), %st - faddp %st, %st(1) - fld %st(5) - fmul %st(2), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(3) - fld %st(3) - fadd %st(6), %st - fsubp %st, %st(6) - fmul %st(5), %st - fxch %st(2) - fsub %st(4), %st - faddp %st, %st(1) - fld %st(3) - fxch %st(3) - fsub %st(5), %st - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(3) - fmul %st(4), %st - faddp %st, %st(2) - fldl (%rax) - fld %st(0) - lea 72+_dbA(%rip), %rax - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(6) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fld %st(4) - fxch %st(2) - faddl (%rax) - lea 56+_dbA(%rip), %rax - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fmul %st(1), %st - fld %st(3) - fmul %st(3), %st - fxch %st(3) - fmul %st(5), %st - faddp %st, %st(1) - fxch %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fldl (%rdx) - fld %st(0) - lea ones(%rip), %rdx - fadd %st(3), %st - fmul %st, %st(6) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(6), %st - fsubp %st, %st(6) - fxch %st(2) - fsub %st(5), %st - fld %st(3) - fmul %st(6), %st - fstpt 64(%rsp) - fxch %st(4) - fmul %st, %st(5) - fxch %st(2) - faddl (%rax) - faddp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 80(%rsp) - fldt 16(%rsp) - fld %st(0) - fld %st(1) - fld %st(2) - fldt (%rsp) - fadd %st, %st(1) - fxch %st(1) - fstpt 128(%rsp) - fldt 128(%rsp) - fldt 240(%rsp) - fld %st(0) - fxch %st(1) - fadd %st, %st(5) - movb 137(%rsp), %al - fxch %st(4) - fsub %st(5), %st - andb $-128, %al - fadd %st(4), %st - shrb $7, %al - fadd %st(3), %st - fxch %st(4) - fsub %st(5), %st - movzbl %al, %eax - faddp %st, %st(6) - fxch %st(1) - fmuls (%rdx,%rax,4) - fldt 256(%rsp) - fadd %st, %st(2) - fxch %st(2) - fstpt 144(%rsp) - fldt 144(%rsp) - fxch %st(2) - fadd %st, %st(6) - movb 153(%rsp), %al - fxch %st(3) - faddp %st, %st(6) - fxch %st(2) - faddp %st, %st(3) - fldt 208(%rsp) - andb $-128, %al - fld %st(0) - fldt 64(%rsp) - shrb $7, %al - fadd %st, %st(1) - fxch %st(1) - fchs - fadd %st, %st(2) - movzbl %al, %eax - fxch %st(2) - fchs - fsubp %st, %st(1) - fld %st(1) - fsub %st(6), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(3) - fmuls (%rdx,%rax,4) - fxch %st(4) - fcomip %st(4), %st - fxch %st(3) - fstp %st(0) - fxch %st(5) - fcmovnbe %st(3), %st - fstp %st(3) - fld %st(4) - fldt 224(%rsp) - fsubrp %st, %st(3) - fld %st(4) - fadd %st(4), %st - fstpt 144(%rsp) - fldt 144(%rsp) - fldt 80(%rsp) - fsubrp %st, %st(4) - fxch %st(1) - fadd %st(3), %st - fstpt 128(%rsp) - fldt 128(%rsp) - fld %st(6) - movb 137(%rsp), %al - fsub %st(3), %st - andb $-128, %al - fsub %st(6), %st - shrb $7, %al - fadd %st(4), %st - movzbl %al, %eax - fsub %st(5), %st - fxch %st(3) - faddp %st, %st(6) - fxch %st(5) - fchs - faddp %st, %st(6) - fxch %st(3) - fsubrp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fxch %st(2) - fmuls (%rdx,%rax,4) - movb 153(%rsp), %al - andb $-128, %al - shrb $7, %al - fstpt 128(%rsp) - fldt 128(%rsp) - movzbl %al, %eax - fxch %st(1) - fmuls (%rdx,%rax,4) - fxch %st(1) - fcomip %st(1), %st - fxch %st(2) - fcmovnbe %st(1), %st - fstp %st(1) - fstpt 32(%rsp) - testl %r12d, %r12d - je ..B2.91 -..B2.90: - movl %r13d, %edi - fstpt (%rsp) -..___tag_value___libm_lgammal.164: - call fesetround@PLT -..___tag_value___libm_lgammal.165: -..B2.303: - fldt (%rsp) -..B2.91: - fldt 32(%rsp) - testb %r14b, %r14b - fldt 48(%rsp) - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.312 -..B2.92: - fstpt 144(%rsp) -..B2.284: - fldcw 194(%rsp) - jmp ..B2.93 -..B2.312: - fstp %st(0) -..B2.93: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.94: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.95: - fstp %st(0) - fldt .L_2il0floatpacket.13(%rip) - lea 3168+_ldbA(%rip), %rdi - movl $1, (%rbp) - lea 1008+_dbA(%rip), %rsi - fmul %st, %st(1) - cmpl $16385, %ebx - jne ..B2.97 -..B2.96: - fmul %st, %st(1) - lea 1184+_dbA(%rip), %rsi - lea 3296+_ldbA(%rip), %rdi -..B2.97: - fstp %st(0) - fldt .L_2il0floatpacket.16(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fsubrp %st, %st(1) - fstpt (%rsp) - lea 16(%rsp), %rdx -..___tag_value___libm_lgammal.187: - call __libm_p25 -..___tag_value___libm_lgammal.188: -..B2.285: - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B2.98: - testl %r12d, %r12d - je ..B2.100 -..B2.99: - movl %r13d, %edi -..___tag_value___libm_lgammal.190: - call fesetround@PLT -..___tag_value___libm_lgammal.191: -..B2.100: - fldt (%rsp) - testb %r14b, %r14b - fldt 16(%rsp) - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.102 -..B2.101: - fldcw 194(%rsp) -..B2.102: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.103: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.104: - fstp %st(0) - fldt .L_2il0floatpacket.8(%rip) - lea 2544+_ldbA(%rip), %rdi - lea 128+_dbA(%rip), %rsi - testl %r15d, %r15d - fsubr %st(1), %st - jl ..B2.200 -..B2.105: - fstp %st(1) - movl $1, (%rbp) -..B2.106: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - lea 16(%rsp), %rdx - fstpt (%rsp) -..___tag_value___libm_lgammal.213: - call __libm_p25 -..___tag_value___libm_lgammal.214: -..B2.286: - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B2.107: - testl %r12d, %r12d - je ..B2.109 -..B2.108: - movl %r13d, %edi -..___tag_value___libm_lgammal.216: - call fesetround@PLT -..___tag_value___libm_lgammal.217: -..B2.109: - fldt (%rsp) - testb %r14b, %r14b - fldt 16(%rsp) - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.111 -..B2.110: - fldcw 194(%rsp) -..B2.111: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.112: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.113: - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fstp %st(0) - fstpt (%rsp) - fldt (%rsp) - movss %xmm0, 48(%rsp) - fstpt 64(%rsp) - call nearbyintl@PLT -..B2.287: - fldt 64(%rsp) - fld %st(0) - movss 48(%rsp), %xmm0 - addq $16, %rsp - .cfi_def_cfa_offset 336 - fsub %st(2), %st - fldt .L_2il0floatpacket.0(%rip) - fucomi %st(1), %st - jp ..B2.114 - je ..B2.209 -..B2.114: - fldt .L_2il0floatpacket.9(%rip) - fcomip %st(3), %st - jae ..B2.131 - jp ..B2.131 -..B2.115: - fxch %st(3) - fnstcw (%rsp) - movzwl (%rsp), %eax - orl $3072, %eax - movl %eax, 8(%rsp) - fldcw 8(%rsp) - fistl 16(%rsp) - fldcw (%rsp) - lea 848+_ldbA(%rip), %rbx - movl 16(%rsp), %r8d - movl %r8d, %edx - negl %edx - lea -2(%rdx), %eax - addl $15, %edx - fxch %st(1) - fcomi %st(3), %st - cmova %edx, %eax - lea 1424+_ldbA(%rip), %rdx - movslq %eax, %rcx - shlq $4, %rcx - lea (%rax,%rax), %esi - movslq %esi, %rsi - fldt (%rcx,%rbx) - shlq $4, %rsi - fsubr %st(3), %st - fldt (%rsi,%rdx) - fcomip %st(4), %st - jae ..B2.129 - jp ..B2.129 -..B2.116: - fldt 16(%rsi,%rdx) - fcomip %st(4), %st - jbe ..B2.129 -..B2.117: - fstp %st(2) - fstp %st(2) - negl %r8d - andl $1, %r8d - jne ..B2.120 -..B2.118: - fxch %st(2) - fcomi %st(1), %st - fxch %st(2) - jbe ..B2.121 -..B2.119: - fstp %st(2) - movl $-1, (%rbp) - jmp ..B2.122 -..B2.120: - jne ..B2.202 -..B2.121: - fstp %st(2) - movl $1, (%rbp) -..B2.122: - lea _ldbA(%rip), %rbx - lea (%rax,%rax,2), %ecx - movslq %ecx, %rcx - lea (%rax,%rax,4), %eax - shll $2, %eax - lea _dbA(%rip), %rbp - shlq $4, %rcx - addq $-16, %rsp - .cfi_def_cfa_offset 352 - movslq %eax, %rax - lea 256(%rsp), %rdx - fxch %st(1) - fstpt (%rsp) - lea 4480(%rbx,%rcx), %rdi - fstpt 16(%rsp) - lea 2432(%rbp,%rax,8), %rsi -..___tag_value___libm_lgammal.241: - call __libm_p19root -..___tag_value___libm_lgammal.242: -..B2.288: - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 336 -..B2.123: - testl %r12d, %r12d - je ..B2.125 -..B2.124: - movl %r13d, %edi - fstpt (%rsp) -..___tag_value___libm_lgammal.244: - call fesetround@PLT -..___tag_value___libm_lgammal.245: -..B2.307: - fldt (%rsp) -..B2.125: - fldt 240(%rsp) - testb %r14b, %r14b - fldt 256(%rsp) - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.313 -..B2.126: - fstpt 96(%rsp) -..B2.289: - fldcw 194(%rsp) - jmp ..B2.127 -..B2.313: - fstp %st(0) -..B2.127: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.128: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.129: - fstp %st(0) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(1) - fxch %st(3) - fxch %st(1) - jmp ..B2.132 -..B2.131: - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) -..B2.132: - fldt .L_2il0floatpacket.13(%rip) - addq $-16, %rsp - .cfi_def_cfa_offset 352 - fmulp %st, %st(4) - fstp %st(1) - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - fstpt 32(%rsp) - fxch %st(1) - fstpt 16(%rsp) - movss %xmm0, 48(%rsp) - fstpt 64(%rsp) - call nearbyintl@PLT -..B2.290: - fldt 64(%rsp) - fldt 16(%rsp) - fldt 32(%rsp) - fldt .L_2il0floatpacket.0(%rip) - movss 48(%rsp), %xmm0 - addq $16, %rsp - .cfi_def_cfa_offset 336 - fxch %st(4) - fucomip %st(1), %st - fstp %st(0) - jp ..B2.133 - je ..B2.206 -..B2.133: - fcomip %st(2), %st - jbe ..B2.135 -..B2.134: - movl $-1, (%rbp) - jmp ..B2.136 -..B2.135: - movl $1, (%rbp) -..B2.136: - movss %xmm0, (%rsp) - fxch %st(1) - flds (%rsp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - lea 272(%rsp), %rdi - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_lgammal.269: - call __libm_logl_k80@PLT -..___tag_value___libm_lgammal.270: -..B2.291: - fstp %st(0) - fldt .L_2il0floatpacket.0(%rip) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B2.137: - fldt 240(%rsp) - lea _TWO_32H(%rip), %rax - fldt 256(%rsp) - fstp %st(2) - lea 560+_ldbA(%rip), %rdx - fldt 80(%rsp) - fld %st(0) - fld %st(1) - fldl (%rax) - lea 80+_dbA(%rip), %rax - fstpt 16(%rsp) - fldt 16(%rsp) - fmul %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fsubp %st, %st(2) - fxch %st(1) - fstpt 160(%rsp) - fldt 160(%rsp) - fld %st(2) - fsub %st(1), %st - fldt .L_2il0floatpacket.13(%rip) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fmul %st(7), %st - fstpt 48(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fsubrp %st, %st(6) - fxch %st(3) - fmul %st(5), %st - fstpt 128(%rsp) - fldt 128(%rsp) - fld %st(5) - fadd %st(1), %st - fstpt 144(%rsp) - fldt 144(%rsp) - fsubp %st, %st(1) - fsubr %st, %st(5) - fxch %st(6) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fld %st(5) - fmul %st(2), %st - fxch %st(4) - fmul %st, %st(6) - fxch %st(5) - faddp %st, %st(6) - fld %st(3) - fadd %st(3), %st - fstpt (%rsp) - fldt (%rsp) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(4) - faddp %st, %st(2) - fldt 48(%rsp) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) - fldt .L_2il0floatpacket.7(%rip) - fcomip %st(1), %st - fstp %st(0) - fldt .L_2il0floatpacket.0(%rip) - jbe ..B2.139 -..B2.138: - lea 704+_ldbA(%rip), %rdx - lea 96+_dbA(%rip), %rax -..B2.139: - fldt .L_2il0floatpacket.1(%rip) - fld %st(3) - fstp %st(2) - movb 105(%rsp), %cl - lea ones(%rip), %rbx - andb $-128, %cl - fxch %st(1) - fadd %st(2), %st - shrb $7, %cl - fdivr %st(1), %st - fld %st(3) - fldt 16(%rsp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - movzbl %cl, %ebp - fadd %st(4), %st - fsubp %st, %st(1) - fmul %st, %st(6) - fxch %st(4) - fsubrp %st, %st(6) - fxch %st(2) - fsub %st(3), %st - fld %st(0) - fadd %st(4), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st, %st(2) - fxch %st(5) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(5) - fmulp %st, %st(4) - fxch %st(3) - fsubrp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fmul %st(0), %st - fldt 128(%rdx) - fmul %st(1), %st - fldt 112(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 96(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 80(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 64(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 32(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 16(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdx) - lea 120+_dbA(%rip), %rdx - faddp %st, %st(1) - fmulp %st, %st(1) - fldl (%rax) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(5) - fld %st(0) - fadd %st(6), %st - fsubp %st, %st(6) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(5), %st - fstpt 240(%rsp) - fldt 240(%rsp) - fxch %st(2) - fsub %st(5), %st - fxch %st(4) - fmul %st, %st(5) - fxch %st(1) - faddl 8(%rax) - lea 112+_dbA(%rip), %rax - faddp %st, %st(4) - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 256(%rsp) - fldt 256(%rsp) - fldl (%rax) - fld %st(0) - fadd %st(3), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(2) - fldt 96(%rsp) - fmuls (%rbx,%rbp,4) - fxch %st(2) - faddl (%rdx) - faddp %st, %st(1) - fstpt 48(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - lea 240(%rsp), %rdi - fstpt (%rsp) - fldt (%rsp) - fldt .L_2il0floatpacket.0(%rip) - fstpt 16(%rsp) - fstpt -128(%rdi) -..___tag_value___libm_lgammal.273: - call __libm_logl_k80@PLT -..___tag_value___libm_lgammal.274: -..B2.292: - fstp %st(0) - fldt 112(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B2.140: - fldt 16(%rsp) - lea 544+_ldbA(%rip), %rcx - fld %st(1) - lea 528+_ldbA(%rip), %rbx - lea 512+_ldbA(%rip), %rbp - lea 496+_ldbA(%rip), %rsi - fmul %st(1), %st - fld %st(2) - lea 480+_ldbA(%rip), %r8 - lea 464+_ldbA(%rip), %r9 - lea 448+_ldbA(%rip), %r10 - lea 432+_ldbA(%rip), %r11 - lea 416+_ldbA(%rip), %r15 - lea 304+_ldbA(%rip), %rax - lea 48+_dbA(%rip), %rdx - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(2) - fsub %st(1), %st - fxch %st(3) - fmul %st(0), %st - fldt (%rcx) - lea 400+_ldbA(%rip), %rcx - fmul %st(1), %st - fldt (%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r15) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 384+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 368+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 352+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 336+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - lea 320+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(1), %st - fld %st(3) - fldt (%rcx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fld %st(2) - fmul %st(3), %st - fmul %st, %st(2) - fldt (%rax) - lea 64+_dbA(%rip), %rax - faddp %st, %st(2) - fldt .L_2il0floatpacket.2(%rip) - fmulp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fld %st(4) - fmul %st(2), %st - fxch %st(6) - fmul %st(0), %st - faddp %st, %st(1) - fld %st(3) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fld %st(2) - fadd %st(7), %st - fsubp %st, %st(7) - fmul %st(6), %st - fxch %st(3) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fxch %st(2) - fsub %st(6), %st - fmul %st, %st(2) - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(2) - fmul %st(5), %st - faddp %st, %st(1) - fldl (%rax) - fld %st(0) - lea 72+_dbA(%rip), %rax - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fld %st(5) - fmul %st(4), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(3) - fld %st(4) - fxch %st(2) - faddl (%rax) - lea 56+_dbA(%rip), %rax - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmul %st(2), %st - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fmul %st(6), %st - faddp %st, %st(1) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fldl (%rdx) - fld %st(0) - lea ones(%rip), %rdx - fadd %st(2), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(1) - fsub %st(4), %st - fld %st(3) - fmul %st(5), %st - fxch %st(5) - fmul %st(6), %st - fxch %st(2) - faddl (%rax) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 64(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 160(%rsp) - fldt 160(%rsp) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fldt 48(%rsp) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 64(%rsp) - fldt 208(%rsp) - fld %st(0) - fchs - fldt (%rsp) - fld %st(0) - fadd %st(3), %st - fstpt 176(%rsp) - fldt 176(%rsp) - fld %st(1) - movb 185(%rsp), %al - fsub %st(1), %st - andb $-128, %al - fadd %st(4), %st - shrb $7, %al - fxch %st(1) - fsubr %st, %st(4) - fxch %st(2) - fadd %st, %st(4) - fcomip %st(3), %st - fxch %st(2) - fstp %st(0) - fldt 32(%rsp) - movzbl %al, %eax - fadd %st, %st(2) - fldt 224(%rsp) - fadd %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - faddp %st, %st(2) - fxch %st(2) - fcmovnbe %st(1), %st - fstp %st(1) - fld %st(1) - fadd %st(3), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fld %st(2) - fsub %st(1), %st - fadd %st(4), %st - fadd %st(2), %st - flds (%rdx,%rax,4) - fmul %st(4), %st - movb 169(%rsp), %al - andb $-128, %al - shrb $7, %al - fstpt 128(%rsp) - fldt 128(%rsp) - fldt 64(%rsp) - fadd %st, %st(2) - movzbl %al, %eax - flds (%rdx,%rax,4) - fmul %st(7), %st - fxch %st(2) - fcomip %st(2), %st - fxch %st(1) - fstpt 112(%rsp) - fxch %st(2) - fsubrp %st, %st(5) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fcmovbe %st(1), %st - fstp %st(1) - fstpt 96(%rsp) - testl %r12d, %r12d - je ..B2.142 -..B2.141: - movl %r13d, %edi -..___tag_value___libm_lgammal.276: - call fesetround@PLT -..___tag_value___libm_lgammal.277: -..B2.142: - fldt 80(%rsp) - testb %r14b, %r14b - fldt 96(%rsp) - faddp %st, %st(1) - fchs - fstpt 176(%rsp) - je ..B2.144 -..B2.143: - fldt 112(%rsp) - fstpt 144(%rsp) -..B2.293: - fldcw 194(%rsp) -..B2.144: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.145: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.146: - addq $-32, %rsp - .cfi_def_cfa_offset 368 - movl $1, (%rbp) - lea 272(%rsp), %rdi - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_lgammal.299: - call __libm_logl_k80@PLT -..___tag_value___libm_lgammal.300: -..B2.294: - fstp %st(0) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B2.147: - fldt 336(%rsp) - lea _TWO_32H(%rip), %rax - fld %st(0) - fld %st(1) - fld %st(2) - lea 560+_ldbA(%rip), %rdx - fldt 240(%rsp) - fldl (%rax) - lea 80+_dbA(%rip), %rax - fmul %st, %st(4) - fxch %st(3) - fadd %st(4), %st - fsubp %st, %st(4) - fxch %st(3) - fstpt 32(%rsp) - fldt 32(%rsp) - fsubr %st, %st(1) - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt .L_2il0floatpacket.6(%rip) - fmul %st(4), %st - fldt .L_2il0floatpacket.6(%rip) - fldt 256(%rsp) - fmul %st, %st(1) - fxch %st(1) - fstpt 80(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fsubrp %st, %st(6) - fxch %st(2) - fmul %st(5), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fld %st(5) - fadd %st(1), %st - fstpt (%rsp) - fldt (%rsp) - fsubp %st, %st(1) - fmul %st, %st(3) - fsubr %st, %st(5) - fxch %st(2) - faddp %st, %st(5) - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(2) - fmulp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 80(%rsp) - faddp %st, %st(1) - fldt .L_2il0floatpacket.7(%rip) - fcomip %st(2), %st - jbe ..B2.149 -..B2.148: - lea 704+_ldbA(%rip), %rdx - lea 96+_dbA(%rip), %rax -..B2.149: - fldt 48(%rsp) - testl %r12d, %r12d - fstpt 48(%rsp) - fstpt 80(%rsp) - fldt 32(%rsp) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fldt 64(%rsp) - fld %st(0) - fldt .L_2il0floatpacket.1(%rip) - fdiv %st, %st(3) - fxch %st(1) - fmul %st(3), %st - fld %st(0) - fadd %st(4), %st - fsubp %st, %st(1) - fsubr %st, %st(3) - fld %st(3) - fadd %st(1), %st - fmul %st, %st(6) - fld %st(5) - fmul %st(5), %st - faddp %st, %st(7) - fxch %st(1) - fmul %st, %st(5) - fxch %st(2) - fsubrp %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(3) - fsubrp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fmul %st(0), %st - fldt 128(%rdx) - fmul %st(1), %st - fldt 112(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 96(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 80(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 64(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 32(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt 16(%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdx) - lea 120+_dbA(%rip), %rdx - faddp %st, %st(1) - fmulp %st, %st(1) - fldl (%rax) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(1) - fsub %st(4), %st - fld %st(3) - fmul %st(5), %st - fstpt 240(%rsp) - fldt 240(%rsp) - fxch %st(3) - fmul %st, %st(5) - fxch %st(2) - faddl 8(%rax) - lea 112+_dbA(%rip), %rax - faddp %st, %st(1) - fmul %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 256(%rsp) - fldt 256(%rsp) - fldl (%rax) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fldt 48(%rsp) - fxch %st(1) - faddl (%rdx) - faddp %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fldt 80(%rsp) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 48(%rsp) - je ..B2.152 -..B2.150: - movl %r13d, %edi - fstpt 176(%rsp) -..___tag_value___libm_lgammal.302: - call fesetround@PLT -..___tag_value___libm_lgammal.303: -..B2.151: - fldt 176(%rsp) -..B2.152: - fldt 48(%rsp) - testb %r14b, %r14b - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.154 -..B2.153: - fldt 32(%rsp) - fstpt 160(%rsp) - fldt (%rsp) - fstpt 144(%rsp) - fldt 16(%rsp) - fstpt 128(%rsp) -..B2.295: - fldcw 194(%rsp) -..B2.154: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.155: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.156: - addq $-32, %rsp - .cfi_def_cfa_offset 368 - movl $1, (%rbp) - lea 272(%rsp), %rdi - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_lgammal.325: - call __libm_logl_k80@PLT -..___tag_value___libm_lgammal.326: -..B2.296: - fstp %st(0) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B2.157: - fldt 336(%rsp) - lea 16+_TWO5600(%rip), %rax - fldt 240(%rsp) - lea _TWO_32H(%rip), %rdx - fldt .L_2il0floatpacket.1(%rip) - testl %r12d, %r12d - fsubrp %st, %st(1) - fstpt 240(%rsp) - fldt 240(%rsp) - fldt (%rax) - fmulp %st, %st(2) - fld %st(1) - fxch %st(2) - fstpt 336(%rsp) - fldt 336(%rsp) - fldl (%rdx) - fld %st(0) - fmul %st(2), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(3) - fsubr %st(2), %st - fxch %st(1) - fmul %st(3), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fld %st(3) - fadd %st(1), %st - fld %st(0) - fsubp %st, %st(2) - fld %st(1) - fmul %st(6), %st - fstpt 64(%rsp) - fxch %st(1) - fsubr %st, %st(4) - fmulp %st, %st(2) - fxch %st(4) - fstpt 48(%rsp) - fldt 256(%rsp) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - je ..B2.159 -..B2.158: - movl %r13d, %edi - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_lgammal.328: - call fesetround@PLT -..___tag_value___libm_lgammal.329: -..B2.304: - fldt 16(%rsp) - fldt (%rsp) -..B2.159: - fldt 64(%rsp) - lea _TWO5600(%rip), %rax - testb %r14b, %r14b - faddp %st, %st(1) - fldt (%rax) - fmulp %st, %st(1) - fstpt 176(%rsp) - je ..B2.314 -..B2.160: - fldt 48(%rsp) - fstpt 160(%rsp) - fstpt 144(%rsp) - fldt 32(%rsp) - fstpt 128(%rsp) -..B2.297: - fldcw 194(%rsp) - jmp ..B2.161 -..B2.314: - fstp %st(0) -..B2.161: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.162: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.163: - fldt .L_2il0floatpacket.3(%rip) - fcomip %st(2), %st - jbe ..B2.165 -..B2.164: - movl $-1, (%rbp) - jmp ..B2.166 -..B2.165: - movl $1, (%rbp) -..B2.166: - movss %xmm0, (%rsp) - flds (%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 368 - fmulp %st, %st(2) - lea 272(%rsp), %rdi - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fxch %st(1) - fstpt 16(%rsp) - fstpt 80(%rsp) -..___tag_value___libm_lgammal.351: - call __libm_logl_k80@PLT -..___tag_value___libm_lgammal.352: -..B2.298: - fstp %st(0) - fldt 80(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 336 -..B2.167: - cmpl $16313, %ebx - jge ..B2.174 -..B2.168: - fldt 240(%rsp) - testl %r12d, %r12d - fldt 256(%rsp) - faddp %st, %st(1) - fchs - fstpt 176(%rsp) - je ..B2.170 -..B2.169: - movl %r13d, %edi - fstpt 48(%rsp) -..___tag_value___libm_lgammal.354: - call fesetround@PLT -..___tag_value___libm_lgammal.355: -..B2.310: - fldt 48(%rsp) -..B2.170: - testb %r14b, %r14b - je ..B2.315 -..B2.171: - fstpt 80(%rsp) -..B2.299: - fldcw 194(%rsp) - jmp ..B2.172 -..B2.315: - fstp %st(0) -..B2.172: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.173: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.174: - lea 288+_ldbA(%rip), %rax - lea 272+_ldbA(%rip), %rdx - lea 256+_ldbA(%rip), %rcx - lea 240+_ldbA(%rip), %rbx - lea 224+_ldbA(%rip), %rbp - lea 208+_ldbA(%rip), %rsi - lea 192+_ldbA(%rip), %r8 - lea 176+_ldbA(%rip), %r9 - fldt (%rax) - lea 160+_ldbA(%rip), %r10 - fmul %st(1), %st - lea 144+_ldbA(%rip), %r11 - lea 128+_ldbA(%rip), %rax - testl %r15d, %r15d - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt (%rdx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rcx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rbx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rbp) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rsi) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r8) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r9) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r10) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r11) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rax) - lea 112+_ldbA(%rip), %rax - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rax) - lea 96+_ldbA(%rip), %rax - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rax) - lea 80+_ldbA(%rip), %rax - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rax) - lea 64+_ldbA(%rip), %rax - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rax) - lea 48+_ldbA(%rip), %rax - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rax) - lea 32+_ldbA(%rip), %rax - faddp %st, %st(2) - fmul %st, %st(1) - fld %st(0) - fldt (%rax) - lea 16+_ldbA(%rip), %rax - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt (%rax) - lea _ldbA(%rip), %rax - faddp %st, %st(3) - fmul %st, %st(2) - fld %st(0) - fldt (%rax) - lea _TWO_32H(%rip), %rax - faddp %st, %st(4) - fld %st(3) - fldl (%rax) - lea 32+_dbA(%rip), %rax - fld %st(0) - fmul %st(6), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fmul %st, %st(2) - fxch %st(2) - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(2) - fsub %st(4), %st - fld %st(5) - fsub %st(2), %st - fmul %st(5), %st - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fxch %st(1) - fmul %st(4), %st - fldl (%rax) - lea 40+_dbA(%rip), %rax - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(3) - fmul %st(2), %st - fxch %st(1) - faddl (%rax) - lea 16+_dbA(%rip), %rax - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fld %st(2) - fmul %st(6), %st - fxch %st(3) - fmul %st(7), %st - faddp %st, %st(1) - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(1) - fldl (%rax) - fld %st(0) - lea 24+_dbA(%rip), %rax - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(3) - fmul %st(3), %st - fxch %st(1) - faddl (%rax) - lea _dbA(%rip), %rax - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fmul %st(6), %st - fxch %st(2) - fmul %st(7), %st - faddp %st, %st(2) - fxch %st(2) - fmul %st(6), %st - faddp %st, %st(1) - fldl (%rax) - fld %st(0) - lea 8+_dbA(%rip), %rax - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fxch %st(1) - faddl (%rax) - faddp %st, %st(2) - fld %st(3) - fmul %st(3), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fadd %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fmul %st(6), %st - fxch %st(2) - fmul %st(7), %st - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(6) - faddp %st, %st(5) - fldt 240(%rsp) - jl ..B2.220 -..B2.175: - fstp %st(2) - fstp %st(2) - fldt 256(%rsp) - fld %st(2) - testl %r12d, %r12d - fsub %st(2), %st - fadd %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fxch %st(2) - je ..B2.178 -..B2.176: - movl %r13d, %edi - fstpt 176(%rsp) - fstpt 16(%rsp) - fstpt 32(%rsp) -..___tag_value___libm_lgammal.376: - call fesetround@PLT -..___tag_value___libm_lgammal.377: -..B2.177: - fldt 32(%rsp) - fldt 16(%rsp) - fldt 176(%rsp) -..B2.178: - testb %r14b, %r14b - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.316 -..B2.179: - fldt 48(%rsp) - fstpt 144(%rsp) - fstpt 160(%rsp) - fldt 64(%rsp) - fstpt 128(%rsp) -..B2.300: - fldcw 194(%rsp) - jmp ..B2.180 -..B2.316: - fstp %st(0) -..B2.180: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 -..B2.181: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.182: - fstp %st(0) - call __stack_chk_fail@PLT -..B2.188: - fcomi %st(2), %st - ja ..B2.71 - jmp ..B2.73 -..B2.191: - fstp %st(0) - fstp %st(1) - fstp %st(0) - movl $1, (%rbp) - testl %r12d, %r12d - je ..B2.193 -..B2.192: - movl %r13d, %edi -..___tag_value___libm_lgammal.398: - call fesetround@PLT -..___tag_value___libm_lgammal.399: -..B2.193: - movss .L_2il0floatpacket.22(%rip), %xmm1 - testb %r14b, %r14b - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, (%rsp) - flds (%rsp) - fstpt 176(%rsp) - je ..B2.195 -..B2.194: - fldcw 194(%rsp) -..B2.195: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 - jmp ..B2.36 -..B2.200: - fstp %st(0) - fldt .L_2il0floatpacket.8(%rip) - lea 304+_dbA(%rip), %rsi - movl $-1, (%rbp) - lea 2672+_ldbA(%rip), %rdi - faddp %st, %st(1) - jmp ..B2.106 -..B2.202: - fxch %st(2) - fcomip %st(1), %st - jae ..B2.204 - jp ..B2.204 -..B2.203: - movl $-1, (%rbp) - jmp ..B2.122 -..B2.204: - movl $1, (%rbp) - jmp ..B2.122 -..B2.206: - fcomip %st(2), %st - jae ..B2.135 - jp ..B2.135 - jmp ..B2.134 -..B2.209: - fstp %st(3) - fstp %st(2) - fstp %st(0) - movl $1, (%rbp) - testl %r12d, %r12d - je ..B2.211 -..B2.210: - movl %r13d, %edi - fstpt (%rsp) -..___tag_value___libm_lgammal.400: - call fesetround@PLT -..___tag_value___libm_lgammal.401: -..B2.306: - fldt (%rsp) -..B2.211: - movss .L_2il0floatpacket.22(%rip), %xmm1 - testb %r14b, %r14b - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, (%rsp) - flds (%rsp) - fstpt 176(%rsp) - je ..B2.317 -..B2.212: - fstpt 96(%rsp) -..B2.301: - fldcw 194(%rsp) - jmp ..B2.213 -..B2.317: - fstp %st(0) -..B2.213: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 - jmp ..B2.36 -..B2.220: - lea 544+_ldbA(%rip), %rcx - lea 528+_ldbA(%rip), %rbx - fxch %st(5) - fstpt (%rsp) - fld %st(2) - lea 512+_ldbA(%rip), %rbp - lea 496+_ldbA(%rip), %rsi - lea 480+_ldbA(%rip), %r8 - lea 464+_ldbA(%rip), %r9 - lea 448+_ldbA(%rip), %r10 - lea 432+_ldbA(%rip), %r11 - lea 416+_ldbA(%rip), %r15 - lea 304+_ldbA(%rip), %rax - lea 48+_dbA(%rip), %rdx - testl %r12d, %r12d - fsub %st(4), %st - fxch %st(3) - fmul %st(0), %st - fxch %st(5) - fstpt 16(%rsp) - fxch %st(3) - fstpt 32(%rsp) - fldt 32(%rsp) - fldt (%rcx) - lea 400+_ldbA(%rip), %rcx - fmul %st(5), %st - fldt (%rbx) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rbp) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r15) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - lea 384+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - lea 368+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - lea 352+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - lea 336+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - lea 320+_ldbA(%rip), %rcx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt (%rax) - lea 64+_dbA(%rip), %rax - faddp %st, %st(5) - fld %st(4) - fld %st(1) - fmul %st(2), %st - fldt .L_2il0floatpacket.2(%rip) - fmulp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fld %st(3) - fmul %st(3), %st - fxch %st(5) - fmul %st(0), %st - faddp %st, %st(1) - fld %st(2) - fadd %st(5), %st - fsubp %st, %st(5) - fld %st(4) - fxch %st(3) - fsub %st(5), %st - faddp %st, %st(1) - fld %st(3) - fmul %st(7), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fsubr %st, %st(6) - fmul %st(1), %st - fld %st(4) - fmul %st(7), %st - faddp %st, %st(1) - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fldl (%rax) - fld %st(0) - lea 72+_dbA(%rip), %rax - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fxch %st(1) - faddl (%rax) - lea 56+_dbA(%rip), %rax - faddp %st, %st(2) - fld %st(3) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(3) - fmul %st(1), %st - fxch %st(1) - fmul %st(6), %st - fld %st(4) - fmul %st(3), %st - faddp %st, %st(1) - fxch %st(2) - fmul %st(6), %st - faddp %st, %st(2) - fldl (%rdx) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(4) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddl (%rax) - faddp %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fsub %st(2), %st - faddp %st, %st(1) - fld %st(2) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fld %st(1) - fldt 16(%rsp) - fadd %st, %st(1) - fxch %st(1) - fchs - fadd %st, %st(1) - fxch %st(1) - fchs - fsubp %st, %st(3) - fldt 256(%rsp) - fsubrp %st, %st(3) - fldt (%rsp) - fsubrp %st, %st(3) - fld %st(0) - fsub %st(4), %st - fsub %st, %st(1) - fxch %st(1) - fchs - fsubp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fsubrp %st, %st(2) - fldt 32(%rsp) - fxch %st(2) - je ..B2.222 -..B2.221: - movl %r13d, %edi - fstpt (%rsp) - fstpt 16(%rsp) - fstpt 32(%rsp) -..___tag_value___libm_lgammal.402: - call fesetround@PLT -..___tag_value___libm_lgammal.403: -..B2.308: - fldt 32(%rsp) - fldt 16(%rsp) - fldt (%rsp) -..B2.222: - testb %r14b, %r14b - faddp %st, %st(1) - fstpt 176(%rsp) - je ..B2.318 -..B2.223: - fldt 48(%rsp) - fstpt 144(%rsp) - fstpt 160(%rsp) - fldt 64(%rsp) - fstpt 128(%rsp) -..B2.302: - fldcw 194(%rsp) - jmp ..B2.224 -..B2.318: - fstp %st(0) -..B2.224: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 - jmp ..B2.36 -..B2.227: - cmpl $16446, %ebx - jle ..B2.16 -..B2.228: - fstp %st(0) - fstp %st(0) - movl $1, (%rbp) - testl %r12d, %r12d - je ..B2.230 -..B2.229: - movl %r13d, %edi -..___tag_value___libm_lgammal.404: - call fesetround@PLT -..___tag_value___libm_lgammal.405: -..B2.230: - movss .L_2il0floatpacket.22(%rip), %xmm1 - testb %r14b, %r14b - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - movss %xmm1, (%rsp) - flds (%rsp) - fstpt 176(%rsp) - je ..B2.232 -..B2.231: - fldcw 194(%rsp) -..B2.232: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 - jmp ..B2.36 -..B2.235: - fstp %st(1) - movl $1, (%rbp) -..B2.236: - testl %r12d, %r12d - je ..B2.238 -..B2.237: - movl %r13d, %edi - fstp %st(0) -..___tag_value___libm_lgammal.406: - call fesetround@PLT -..___tag_value___libm_lgammal.407: -..B2.309: - fldt .L_2il0floatpacket.0(%rip) -..B2.238: - fstpt 176(%rsp) - testb %r14b, %r14b - je ..B2.240 -..B2.239: - fldcw 194(%rsp) -..B2.240: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 - jmp ..B2.36 -..B2.244: - fstp %st(0) - movl $1, (%rbp) - testl %r12d, %r12d - je ..B2.247 -..B2.245: - fstp %st(0) - movl %r13d, %edi -..___tag_value___libm_lgammal.408: - call fesetround@PLT -..___tag_value___libm_lgammal.409: -..B2.246: - fldt 336(%rsp) -..B2.247: - fld %st(0) - testb %r14b, %r14b - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 176(%rsp) - je ..B2.249 -..B2.248: - fldcw 194(%rsp) -..B2.249: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 - jmp ..B2.36 -..B2.252: - fstp %st(0) - fstp %st(0) - testl %r12d, %r12d - je ..B2.254 -..B2.253: - movl %r13d, %edi - movl $1, (%rbp) -..___tag_value___libm_lgammal.410: - call fesetround@PLT -..___tag_value___libm_lgammal.411: - movzbl 345(%rsp), %ecx -..B2.254: - movss .L_2il0floatpacket.22(%rip), %xmm1 - andl $128, %ecx - pxor %xmm0, %xmm0 - divss %xmm0, %xmm1 - shrl $7, %ecx - addl %ecx, %ecx - movss %xmm1, (%rsp) - negl %ecx - flds (%rsp) - incl %ecx - fstpt 176(%rsp) - testb %r14b, %r14b - movl %ecx, (%rbp) - je ..B2.256 -..B2.255: - fldcw 194(%rsp) -..B2.256: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 - jmp ..B2.36 -..B2.259: - movq $0x8000000000000000, %rax - cmpq 336(%rsp), %rax - je ..B2.270 -..B2.260: - movl $0, (%rbp) - testl %r12d, %r12d - je ..B2.262 -..B2.261: - movl %r13d, %edi -..___tag_value___libm_lgammal.412: - call fesetround@PLT -..___tag_value___libm_lgammal.413: -..B2.262: - fldt 336(%rsp) - fadd %st(0), %st - fstpt 176(%rsp) -..B2.263: - testl %r12d, %r12d - je ..B2.265 -..B2.264: - movl %r13d, %edi -..___tag_value___libm_lgammal.414: - call fesetround@PLT -..___tag_value___libm_lgammal.415: -..B2.265: - testb %r14b, %r14b - je ..B2.267 -..B2.266: - fldcw 194(%rsp) -..B2.267: - fldt 176(%rsp) - movq 272(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.182 - jmp ..B2.36 -..B2.270: - movl $1, (%rbp) - testl %r12d, %r12d - je ..B2.272 -..B2.271: - movl %r13d, %edi -..___tag_value___libm_lgammal.416: - call fesetround@PLT -..___tag_value___libm_lgammal.417: -..B2.272: - fldt 336(%rsp) - fmul %st(0), %st - fstpt 176(%rsp) - jmp ..B2.263 - .align 16,0x90 - .cfi_endproc - .type __libm_lgammal,@function - .size __libm_lgammal,.-__libm_lgammal - .data -# -- End __libm_lgammal - .text -# -- Begin __libm_p25 - .text - .align 16,0x90 -__libm_p25: -# parameter 1: 8 + %rsp -# parameter 2: %rdi -# parameter 3: %rsi -# parameter 4: %rdx -..B3.1: - .cfi_startproc -..___tag_value___libm_p25.419: -..L420: - - lea _TWO_32H(%rip), %rax - fldt 8(%rsp) - fld %st(0) - fld %st(1) - fldl 56(%rsi) - fmul %st(3), %st - fldl (%rax) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(3) - fsub %st(3), %st - fldt 64(%rdi) - fxch %st(2) - faddl 48(%rsi) - fmul %st(5), %st - fldt (%rdi) - fldt 80(%rdi) - fxch %st(2) - faddl 152(%rsi) - fmul %st(7), %st - faddl 144(%rsi) - fmul %st(7), %st - faddl 168(%rsi) - fmul %st(7), %st - faddl 160(%rsi) - fmul %st(7), %st - faddl 104(%rsi) - fmul %st(7), %st - faddl 96(%rsi) - fmul %st(7), %st - faddl 120(%rsi) - fmul %st(7), %st - faddl 112(%rsi) - fmul %st(7), %st - faddl 136(%rsi) - fmul %st(7), %st - faddl 128(%rsi) - fmul %st(7), %st - faddl 40(%rsi) - fmul %st(7), %st - faddl 32(%rsi) - fmul %st(7), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt 16(%rdi) - faddp %st, %st(1) - fmul %st(4), %st - fldt 32(%rdi) - fldt 96(%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - faddp %st, %st(1) - fmul %st(4), %st - fldt 112(%rdi) - faddp %st, %st(1) - fmul %st(4), %st - fld %st(2) - fldt 48(%rdi) - faddp %st, %st(2) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - fmul %st(6), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fldl (%rsi) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(4) - fmul %st(2), %st - fxch %st(1) - faddl 88(%rsi) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fmul %st(5), %st - fld %st(4) - fmul %st(2), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldl 64(%rsi) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(4) - fmul %st(3), %st - fxch %st(1) - faddl 72(%rsi) - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fld %st(4) - fmul %st(2), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(1) - fldl 16(%rsi) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(4) - fmul %st, %st(5) - fsubr %st, %st(2) - fmulp %st, %st(3) - fxch %st(3) - faddl 24(%rsi) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fldl 80(%rsi) - fld %st(0) - fadd %st(2), %st - fstpt (%rdx) - fldt (%rdx) - fsubrp %st, %st(1) - faddp %st, %st(1) - faddl 8(%rsi) - faddp %st, %st(1) - fstpt 16(%rdx) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_p25,@function - .size __libm_p25,.-__libm_p25 - .data -# -- End __libm_p25 - .text -# -- Begin __libm_p19root - .text - .align 16,0x90 -__libm_p19root: -# parameter 1: 8 + %rsp -# parameter 2: %rdi -# parameter 3: %rsi -# parameter 4: %rdx -..B4.1: - .cfi_startproc -..___tag_value___libm_p19root.422: -..L423: - - lea _TWO_32H(%rip), %rax - fldt 8(%rsp) - lea ones(%rip), %r10 - fld %st(0) - fld %st(1) - fldl 152(%rsi) - fmul %st(3), %st - fldl (%rax) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(3) - fsub %st(3), %st - fldt 32(%rdi) - fxch %st(2) - faddl 144(%rsi) - fmul %st(5), %st - fldt 16(%rdi) - fldt (%rdi) - fxch %st(2) - faddl 136(%rsi) - fmul %st(7), %st - faddl 128(%rsi) - fmul %st(7), %st - faddl 120(%rsi) - fmul %st(7), %st - faddl 112(%rsi) - fmul %st(7), %st - faddl 104(%rsi) - fmul %st(7), %st - faddl 96(%rsi) - fmul %st(7), %st - faddl 88(%rsi) - fmul %st(7), %st - faddl 80(%rsi) - fmul %st(7), %st - faddl 72(%rsi) - fmul %st(7), %st - faddl 64(%rsi) - fmul %st(7), %st - faddl 56(%rsi) - fmul %st(7), %st - faddl 48(%rsi) - fmul %st(7), %st - faddp %st, %st(4) - fxch %st(3) - fmul %st(6), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fld %st(1) - fld %st(3) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - fmul %st(6), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldl 32(%rsi) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(4) - fmul %st(2), %st - fxch %st(1) - faddl 40(%rsi) - faddp %st, %st(4) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fmul %st(5), %st - fld %st(4) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldl 16(%rsi) - fld %st(0) - fadd %st(3), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(5), %st - fsubp %st, %st(5) - fxch %st(1) - fmul %st(4), %st - fxch %st(2) - fsub %st(4), %st - fxch %st(4) - fmulp %st, %st(5) - faddl 24(%rsi) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt -40(%rsp) - fldt -40(%rsp) - fldl (%rsi) - fld %st(0) - fldl 8(%rsi) - movb -31(%rsp), %cl - fadd %st, %st(1) - fxch %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - andb $-128, %cl - movb -15(%rsp), %r9b - andb $-128, %r9b - shrb $7, %r9b - shrb $7, %cl - movzbl %r9b, %r11d - movzbl %cl, %r8d - flds (%r10,%r11,4) - fmulp %st, %st(1) - fld %st(2) - fadd %st(5), %st - fstpt (%rdx) - fldt (%rdx) - flds (%r10,%r8,4) - fmulp %st, %st(5) - fxch %st(4) - fcomi %st(1), %st - fxch %st(1) - fstp %st(0) - fld %st(3) - fsubr %st(5), %st - fadd %st(3), %st - fadd %st(6), %st - fadd %st(2), %st - fxch %st(1) - fstpt -40(%rsp) - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fcmovnbe %st(1), %st - fstp %st(1) - fstpt 16(%rdx) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_p19root,@function - .size __libm_p19root,.-__libm_p19root - .data -# -- End __libm_p19root - .text -# -- Begin gammal - .text - .align 16,0x90 - .globl gammal -gammal: -# parameter 1: 16 + %rsp -..B5.1: - .cfi_startproc -..___tag_value_gammal.425: -..L426: - - pushq %rsi - .cfi_def_cfa_offset 16 - fldt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 32 - lea 16(%rsp), %rdi - fstpt (%rsp) -..___tag_value_gammal.429: - call __libm_lgammal -..___tag_value_gammal.430: -..B5.2: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type gammal,@function - .size gammal,.-gammal - .data -# -- End gammal - .text -# -- Begin lgammal_r - .text - .align 16,0x90 - .globl lgammal_r -lgammal_r: -# parameter 1: 8 + %rsp -# parameter 2: %rdi -..B6.1: - .cfi_startproc -..___tag_value_lgammal_r.433: -..L434: - - fldt 8(%rsp) - fstpt 8(%rsp) - jmp __libm_lgammal - .align 16,0x90 - .cfi_endproc - .type lgammal_r,@function - .size lgammal_r,.-lgammal_r - .data -# -- End lgammal_r - .text -# -- Begin gammal_r - .text - .align 16,0x90 - .globl gammal_r -gammal_r: -# parameter 1: 8 + %rsp -# parameter 2: %rdi -..B7.1: - .cfi_startproc -..___tag_value_gammal_r.436: -..L437: - - fldt 8(%rsp) - fstpt 8(%rsp) - jmp __libm_lgammal - .align 16,0x90 - .cfi_endproc - .type gammal_r,@function - .size gammal_r,.-gammal_r - .data -# -- End gammal_r - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x01,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9c,0x03,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,16 - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,16 - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,16 - .align 16 -.L_2il0floatpacket.12: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x90,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,16 - .align 16 -.L_2il0floatpacket.13: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,16 - .align 16 -.L_2il0floatpacket.14: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x70,0xa6,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,16 - .align 16 -.L_2il0floatpacket.15: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 16 -.L_2il0floatpacket.16: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,16 - .align 16 -.L_2il0floatpacket.17: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x81,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,16 - .align 16 -.L_2il0floatpacket.18: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xfe,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,16 - .align 16 -.L_2il0floatpacket.19: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.19,@object - .size .L_2il0floatpacket.19,16 - .align 16 -.L_2il0floatpacket.20: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.20,@object - .size .L_2il0floatpacket.20,16 - .align 16 -.L_2il0floatpacket.21: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x00,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.21,@object - .size .L_2il0floatpacket.21,16 - .align 16 -_ldbA: - .word 48403 - .word 16065 - .word 37206 - .word 35465 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 32498 - .word 21186 - .word 57533 - .word 54364 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 48455 - .word 64043 - .word 25991 - .word 44448 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 36906 - .word 8596 - .word 53485 - .word 37761 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 16786 - .word 63789 - .word 39740 - .word 32901 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 43334 - .word 50722 - .word 13591 - .word 58371 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 51242 - .word 42271 - .word 52839 - .word 52480 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 22272 - .word 27707 - .word 58025 - .word 47684 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 48537 - .word 42093 - .word 143 - .word 43693 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 5437 - .word 23105 - .word 19142 - .word 40288 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 43105 - .word 25781 - .word 60600 - .word 37244 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 64996 - .word 46896 - .word 33038 - .word 34212 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 8055 - .word 35794 - .word 25027 - .word 61223 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 26586 - .word 4739 - .word 1082 - .word 51475 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 65450 - .word 65402 - .word 39793 - .word 38562 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 18875 - .word 24550 - .word 64026 - .word 48031 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 3811 - .word 11690 - .word 33485 - .word 45433 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 21488 - .word 64404 - .word 56511 - .word 56861 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 64157 - .word 44249 - .word 62935 - .word 34811 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 1503 - .word 1560 - .word 25992 - .word 44448 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 53495 - .word 49976 - .word 39767 - .word 32901 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 21693 - .word 55175 - .word 61890 - .word 52480 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 18005 - .word 14879 - .word 27421 - .word 43701 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 4785 - .word 48109 - .word 28463 - .word 37451 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 17404 - .word 30303 - .word 36440 - .word 32768 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 19413 - .word 44833 - .word 30216 - .word 58252 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 61231 - .word 61633 - .word 10791 - .word 52455 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 18500 - .word 21868 - .word 57423 - .word 47400 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 24302 - .word 39700 - .word 47161 - .word 45652 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 48514 - .word 20900 - .word 46081 - .word 58518 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 11885 - .word 12460 - .word 35625 - .word 41968 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41690 - .word 14982 - .word 21018 - .word 53469 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 2894 - .word 27339 - .word 226 - .word 41728 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 26025 - .word 18501 - .word 20978 - .word 46979 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 53900 - .word 55553 - .word 17653 - .word 38916 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 46603 - .word 2912 - .word 24758 - .word 46603 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 53261 - .word 3328 - .word 208 - .word 53261 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 39946 - .word 2496 - .word 49308 - .word 39945 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 6840 - .word 51193 - .word 61784 - .word 56488 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 58384 - .word 51683 - .word 34508 - .word 64341 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 53773 - .word 3360 - .word 8402 - .word 53773 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 48865 - .word 31388 - .word 13912 - .word 61972 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 65489 - .word 61491 - .word 45504 - .word 47092 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 53102 - .word 49401 - .word 14344 - .word 45627 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 2166 - .word 2831 - .word 24758 - .word 46603 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 9580 - .word 21681 - .word 206 - .word 53261 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 30177 - .word 46479 - .word 48966 - .word 39945 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 52333 - .word 51482 - .word 18491 - .word 56488 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 40942 - .word 14796 - .word 26057 - .word 64313 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 50177 - .word 16139 - .word 15070 - .word 53362 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 2931 - .word 59423 - .word 29748 - .word 57837 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 12931 - .word 12185 - .word 50840 - .word 32873 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 60991 - .word 64091 - .word 63067 - .word 49777 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 24747 - .word 1987 - .word 58544 - .word 40255 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 31726 - .word 62157 - .word 28132 - .word 51504 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 1560 - .word 52396 - .word 29634 - .word 33090 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 51301 - .word 34230 - .word 21183 - .word 41027 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 26476 - .word 19428 - .word 22828 - .word 49163 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 62911 - .word 28656 - .word 40943 - .word 57345 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 51702 - .word 17823 - .word 6657 - .word 32768 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 55405 - .word 47943 - .word 739 - .word 36864 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 47506 - .word 63803 - .word 73 - .word 40960 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 21270 - .word 47505 - .word 6 - .word 45056 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 51059 - .word 36726 - .word 0 - .word 49152 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 8970 - .word 2825 - .word 0 - .word 53248 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 52133 - .word 201 - .word 0 - .word 57344 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 29690 - .word 13 - .word 0 - .word 61440 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 27552 - .word 0 - .word 0 - .word 32768 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 1621 - .word 0 - .word 0 - .word 34816 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 90 - .word 0 - .word 0 - .word 36864 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 5 - .word 0 - .word 0 - .word 38912 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 1630 - .word 57032 - .word 2128 - .word 45018 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 10332 - .word 57727 - .word 35491 - .word 64803 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 59042 - .word 30551 - .word 48083 - .word 40890 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 27388 - .word 36768 - .word 38828 - .word 49140 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 32744 - .word 23607 - .word 24507 - .word 57342 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 30841 - .word 2766 - .word 52220 - .word 65535 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 33024 - .word 16990 - .word 64796 - .word 36863 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 64973 - .word 1725 - .word 65462 - .word 40959 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 40731 - .word 18030 - .word 65529 - .word 45055 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 14452 - .word 28809 - .word 65535 - .word 49151 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 56566 - .word 62710 - .word 65535 - .word 53247 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 13403 - .word 65334 - .word 65535 - .word 57343 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 35846 - .word 65522 - .word 65535 - .word 61439 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 10432 - .word 65535 - .word 65535 - .word 65535 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 63915 - .word 65535 - .word 65535 - .word 34815 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 65446 - .word 65535 - .word 65535 - .word 36863 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 65531 - .word 65535 - .word 65535 - .word 38911 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38912 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 47937 - .word 50671 - .word 32821 - .word 51896 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 8469 - .word 62640 - .word 24113 - .word 51168 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 23666 - .word 39283 - .word 12728 - .word 33144 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 1338 - .word 16824 - .word 25401 - .word 33044 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 38006 - .word 50858 - .word 35636 - .word 41038 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 6523 - .word 10616 - .word 46244 - .word 41017 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 30889 - .word 22666 - .word 15710 - .word 49165 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 22694 - .word 63464 - .word 47653 - .word 49161 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 7860 - .word 665 - .word 58690 - .word 57345 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 35199 - .word 5838 - .word 25732 - .word 57345 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 27551 - .word 53562 - .word 7766 - .word 32768 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 34954 - .word 15277 - .word 5706 - .word 32768 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 10026 - .word 1321 - .word 863 - .word 36864 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 38128 - .word 3645 - .word 634 - .word 36864 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 22656 - .word 19824 - .word 86 - .word 40960 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 3271 - .word 26602 - .word 63 - .word 40960 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 57583 - .word 55422 - .word 7 - .word 45056 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 8869 - .word 50081 - .word 5 - .word 45056 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 59569 - .word 42847 - .word 0 - .word 49152 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 6316 - .word 31480 - .word 0 - .word 49152 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 65078 - .word 3295 - .word 0 - .word 53248 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 35775 - .word 2421 - .word 0 - .word 53248 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 28054 - .word 235 - .word 0 - .word 57344 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 63410 - .word 172 - .word 0 - .word 57344 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 45561 - .word 15 - .word 0 - .word 61440 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 34811 - .word 11 - .word 0 - .word 61440 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 32144 - .word 0 - .word 0 - .word 32768 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 23616 - .word 0 - .word 0 - .word 32768 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 1891 - .word 0 - .word 0 - .word 34816 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 1389 - .word 0 - .word 0 - .word 34816 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 105 - .word 0 - .word 0 - .word 36864 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 77 - .word 0 - .word 0 - .word 36864 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 6 - .word 0 - .word 0 - .word 38912 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 5 - .word 0 - .word 0 - .word 38912 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 30094 - .word 17612 - .word 34825 - .word 45621 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 27787 - .word 64487 - .word 61865 - .word 44498 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 45180 - .word 62215 - .word 30788 - .word 64910 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 56909 - .word 5419 - .word 21954 - .word 64678 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 26983 - .word 61012 - .word 55414 - .word 40900 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 17042 - .word 26812 - .word 58543 - .word 40878 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 17649 - .word 49100 - .word 16895 - .word 49142 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 47753 - .word 6644 - .word 42105 - .word 49138 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 56665 - .word 15855 - .word 40064 - .word 57342 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 9214 - .word 11959 - .word 6291 - .word 57342 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 44995 - .word 64071 - .word 54163 - .word 65535 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 35553 - .word 53091 - .word 49943 - .word 65535 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 39205 - .word 16423 - .word 64904 - .word 36863 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 61074 - .word 52942 - .word 64669 - .word 36863 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 11000 - .word 54094 - .word 65472 - .word 40959 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 41911 - .word 24986 - .word 65449 - .word 40959 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 33350 - .word 16833 - .word 65530 - .word 45055 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 41532 - .word 8229 - .word 65528 - .word 45055 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 52046 - .word 34170 - .word 65535 - .word 49151 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 9080 - .word 22531 - .word 65535 - .word 49151 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 19128 - .word 63123 - .word 65535 - .word 53247 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 61194 - .word 62227 - .word 65535 - .word 53247 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 43497 - .word 65363 - .word 65535 - .word 57343 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 46501 - .word 65299 - .word 65535 - .word 57343 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 33483 - .word 65524 - .word 65535 - .word 61439 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 16207 - .word 65520 - .word 65535 - .word 61439 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 18477 - .word 65535 - .word 65535 - .word 65535 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 1013 - .word 65535 - .word 65535 - .word 65535 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 64152 - .word 65535 - .word 65535 - .word 34815 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 63638 - .word 65535 - .word 65535 - .word 34815 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 65459 - .word 65535 - .word 65535 - .word 36863 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 65431 - .word 65535 - .word 65535 - .word 36863 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 65532 - .word 65535 - .word 65535 - .word 38911 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 65531 - .word 65535 - .word 65535 - .word 38911 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 16368 - .word 23276 - .word 14028 - .word 45039 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 59281 - .word 7220 - .word 1358 - .word 44002 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 209 - .word 31529 - .word 17251 - .word 45971 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 22774 - .word 54591 - .word 46864 - .word 55119 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 36309 - .word 6992 - .word 45734 - .word 65508 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 57509 - .word 44567 - .word 44472 - .word 62561 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 24352 - .word 36914 - .word 35595 - .word 62910 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 36298 - .word 16311 - .word 10079 - .word 34683 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 8745 - .word 24487 - .word 32401 - .word 58540 - .word 16393 - .word 0 - .word 0 - .word 0 - .word 64710 - .word 25493 - .word 17440 - .word 41602 - .word 16391 - .word 0 - .word 0 - .word 0 - .word 9540 - .word 49275 - .word 24345 - .word 64260 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 32123 - .word 43450 - .word 42726 - .word 58824 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 56179 - .word 18517 - .word 55467 - .word 35137 - .word 49163 - .word 0 - .word 0 - .word 0 - .word 59411 - .word 7122 - .word 11027 - .word 48002 - .word 49160 - .word 0 - .word 0 - .word 0 - .word 11599 - .word 47165 - .word 19459 - .word 34091 - .word 49158 - .word 0 - .word 0 - .word 0 - .word 3871 - .word 11740 - .word 51838 - .word 51028 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 54329 - .word 49239 - .word 6514 - .word 47686 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 32133 - .word 56 - .word 14391 - .word 58371 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 29265 - .word 29887 - .word 53486 - .word 37761 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 40734 - .word 56364 - .word 61890 - .word 52480 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 62017 - .word 50151 - .word 39767 - .word 32901 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 62465 - .word 1557 - .word 25992 - .word 44448 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 46350 - .word 21258 - .word 57533 - .word 54364 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 28472 - .word 57318 - .word 11755 - .word 48239 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 64030 - .word 27012 - .word 42555 - .word 59902 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 15295 - .word 64624 - .word 11797 - .word 40022 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 40088 - .word 48672 - .word 55416 - .word 53395 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 32150 - .word 7351 - .word 22467 - .word 34203 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 32397 - .word 56161 - .word 46934 - .word 48494 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 35896 - .word 51119 - .word 32272 - .word 61954 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 64369 - .word 46577 - .word 49946 - .word 47894 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 13507 - .word 11243 - .word 36867 - .word 37912 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 13500 - .word 7397 - .word 345 - .word 51175 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 36308 - .word 1299 - .word 15549 - .word 37687 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 1494 - .word 43036 - .word 5286 - .word 33882 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 51612 - .word 44256 - .word 49203 - .word 47051 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 24103 - .word 45476 - .word 53751 - .word 61816 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 18204 - .word 4207 - .word 64680 - .word 43260 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 39634 - .word 35210 - .word 18170 - .word 34381 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 30073 - .word 2874 - .word 60159 - .word 61890 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 21923 - .word 37483 - .word 63587 - .word 45930 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 17610 - .word 34235 - .word 25953 - .word 38432 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 27391 - .word 45200 - .word 21903 - .word 41572 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 8472 - .word 18376 - .word 37439 - .word 36904 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 15138 - .word 28105 - .word 43771 - .word 52749 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 19597 - .word 13484 - .word 38971 - .word 41168 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 3303 - .word 60299 - .word 50447 - .word 38102 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 47075 - .word 52558 - .word 55475 - .word 37762 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 52173 - .word 35461 - .word 11437 - .word 59897 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 36076 - .word 14373 - .word 35326 - .word 54659 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 59562 - .word 13882 - .word 310 - .word 33073 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 21162 - .word 13390 - .word 51910 - .word 43836 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 25864 - .word 5553 - .word 52105 - .word 33196 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 50214 - .word 4354 - .word 50978 - .word 55906 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 22538 - .word 16515 - .word 54348 - .word 57115 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 25669 - .word 8964 - .word 45428 - .word 52429 - .word 16390 - .word 0 - .word 0 - .word 0 - .word 42066 - .word 12451 - .word 5346 - .word 32773 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 59247 - .word 49506 - .word 42126 - .word 43753 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 41212 - .word 16190 - .word 63627 - .word 33236 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 43030 - .word 44942 - .word 52710 - .word 59310 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 4241 - .word 60350 - .word 9519 - .word 55057 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 13201 - .word 63684 - .word 48400 - .word 58952 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 43405 - .word 43520 - .word 7800 - .word 38026 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 51109 - .word 32176 - .word 26595 - .word 37828 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 39193 - .word 38974 - .word 13074 - .word 53901 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 18403 - .word 21914 - .word 43743 - .word 52518 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 11905 - .word 16066 - .word 37206 - .word 35465 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 39192 - .word 38974 - .word 13074 - .word 53901 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 16822 - .word 16066 - .word 37206 - .word 35465 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 12453 - .word 1560 - .word 25992 - .word 44448 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 46918 - .word 49948 - .word 39767 - .word 32901 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 993 - .word 37711 - .word 1229 - .word 53967 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 22241 - .word 58002 - .word 54887 - .word 56142 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 8639 - .word 23392 - .word 41786 - .word 61781 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 824 - .word 14446 - .word 39837 - .word 35166 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 4398 - .word 47415 - .word 48788 - .word 40961 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 53320 - .word 18702 - .word 33902 - .word 48514 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 47965 - .word 49933 - .word 53838 - .word 58200 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 46987 - .word 9286 - .word 62309 - .word 35268 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 6461 - .word 640 - .word 17377 - .word 43104 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 30338 - .word 25067 - .word 12218 - .word 53050 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 3327 - .word 27408 - .word 8301 - .word 61564 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 59387 - .word 42287 - .word 60059 - .word 60716 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 13826 - .word 21215 - .word 7405 - .word 64741 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 26137 - .word 29234 - .word 53880 - .word 36165 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 10231 - .word 52926 - .word 36203 - .word 41655 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 23407 - .word 27273 - .word 49305 - .word 49005 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 11641 - .word 23288 - .word 44339 - .word 58553 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 25249 - .word 6483 - .word 6272 - .word 35397 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 42921 - .word 12425 - .word 13798 - .word 43198 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 50188 - .word 64017 - .word 41333 - .word 53119 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 25097 - .word 45200 - .word 21903 - .word 41572 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 10972 - .word 60304 - .word 50447 - .word 38102 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 15639 - .word 33828 - .word 25953 - .word 38432 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 37131 - .word 35786 - .word 38971 - .word 41168 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 11219 - .word 39714 - .word 63573 - .word 45930 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 59109 - .word 9738 - .word 44211 - .word 52749 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 51163 - .word 1079 - .word 49343 - .word 61890 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 19090 - .word 15031 - .word 12079 - .word 36906 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 6956 - .word 155 - .word 44549 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 54475 - .word 22231 - .word 8036 - .word 54711 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 43885 - .word 13882 - .word 310 - .word 33073 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 49382 - .word 16501 - .word 54348 - .word 57115 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 54884 - .word 14552 - .word 35326 - .word 54659 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 24455 - .word 7515 - .word 50978 - .word 55906 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 57687 - .word 611 - .word 11437 - .word 59897 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 26110 - .word 1729 - .word 52102 - .word 33196 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 49827 - .word 25553 - .word 55506 - .word 37762 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 45356 - .word 51283 - .word 52132 - .word 43836 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 37526 - .word 52421 - .word 6331 - .word 51720 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 23504 - .word 7355 - .word 4713 - .word 61833 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 28030 - .word 45200 - .word 21903 - .word 41572 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 64882 - .word 60298 - .word 50447 - .word 38102 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 36628 - .word 34230 - .word 25953 - .word 38432 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 2186 - .word 13495 - .word 38971 - .word 41168 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 42048 - .word 38474 - .word 63587 - .word 45930 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 44984 - .word 21655 - .word 43771 - .word 52749 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 10340 - .word 31180 - .word 60154 - .word 61890 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 29368 - .word 33685 - .word 37418 - .word 36904 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 632 - .word 28858 - .word 25336 - .word 44574 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 47657 - .word 7722 - .word 28520 - .word 54386 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 48861 - .word 21442 - .word 12332 - .word 46245 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 55836 - .word 1266 - .word 27621 - .word 35724 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 19864 - .word 22843 - .word 65282 - .word 47516 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 55755 - .word 27362 - .word 47250 - .word 57481 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 27703 - .word 47960 - .word 491 - .word 37689 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 41421 - .word 53711 - .word 6590 - .word 52435 - .word 16394 - .word 0 - .word 0 - .word 0 - .word 57789 - .word 21731 - .word 35033 - .word 43725 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 55298 - .word 55134 - .word 50960 - .word 52072 - .word 16399 - .word 0 - .word 0 - .word 0 - .word 30636 - .word 39282 - .word 62891 - .word 33072 - .word 16404 - .word 0 - .word 0 - .word 0 - .word 7959 - .word 64403 - .word 49841 - .word 37534 - .word 16402 - .word 0 - .word 0 - .word 0 - .word 5854 - .word 54131 - .word 61334 - .word 53522 - .word 16408 - .word 0 - .word 0 - .word 0 - .word 5803 - .word 45364 - .word 48027 - .word 40704 - .word 16415 - .word 0 - .word 0 - .word 0 - .word 1370 - .word 7138 - .word 7454 - .word 61224 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 57336 - .word 44117 - .word 55954 - .word 64739 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 54670 - .word 41483 - .word 43064 - .word 36510 - .word 16428 - .word 0 - .word 0 - .word 0 - .word 42312 - .word 7696 - .word 38319 - .word 40746 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 12302 - .word 62594 - .word 5410 - .word 37618 - .word 16430 - .word 0 - .word 0 - .word 0 - .word 9293 - .word 14879 - .word 6832 - .word 37045 - .word 16442 - .word 0 - .word 0 - .word 0 - .word 2958 - .word 50542 - .word 15469 - .word 40704 - .word 16427 - .word 0 - .word 0 - .word 0 - .word 42649 - .word 12819 - .word 63050 - .word 37565 - .word 16442 - .word 0 - .word 0 - .word 0 - .word 6063 - .word 43732 - .word 62723 - .word 36980 - .word 16457 - .word 0 - .word 0 - .word 0 - .word 22453 - .word 18298 - .word 44915 - .word 57947 - .word 16436 - .word 0 - .word 0 - .word 0 - .word 20554 - .word 96 - .word 8145 - .word 60162 - .word 16454 - .word 0 - .word 0 - .word 0 - .word 27743 - .word 60960 - .word 41480 - .word 33312 - .word 16473 - .word 0 - .word 0 - .word 0 - .word 22238 - .word 6527 - .word 38867 - .word 56588 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 38516 - .word 42313 - .word 15095 - .word 36719 - .word 16468 - .word 0 - .word 0 - .word 0 - .word 36587 - .word 28039 - .word 41391 - .word 50829 - .word 16489 - .word 0 - .word 0 - .word 0 - .word 29867 - .word 13204 - .word 65176 - .word 36776 - .word 16457 - .word 0 - .word 0 - .word 0 - .word 31042 - .word 28858 - .word 52725 - .word 32812 - .word 16482 - .word 0 - .word 0 - .word 0 - .word 10384 - .word 4515 - .word 18607 - .word 62455 - .word 16506 - .word 0 - .word 0 - .word 0 - .word 9765 - .word 184 - .word 10999 - .word 62061 - .word 16467 - .word 0 - .word 0 - .word 0 - .word 31509 - .word 19231 - .word 45642 - .word 41528 - .word 16496 - .word 0 - .word 0 - .word 0 - .word 9807 - .word 42010 - .word 46528 - .word 59283 - .word 16524 - .word 0 - .word 0 - .word 0 - .word 34508 - .word 54054 - .word 11762 - .word 33288 - .word 16479 - .word 0 - .word 0 - .word 0 - .word 35651 - .word 17126 - .word 61083 - .word 36196 - .word 16511 - .word 0 - .word 0 - .word 0 - .word 61937 - .word 2245 - .word 55342 - .word 41983 - .word 16543 - .word 0 - .word 0 - .word 0 - .word 55800 - .word 52004 - .word 63053 - .word 44600 - .word 16490 - .word 0 - .word 0 - .word 0 - .word 1794 - .word 6965 - .word 62764 - .word 42435 - .word 16526 - .word 0 - .word 0 - .word 0 - .word 31259 - .word 48342 - .word 51287 - .word 43067 - .word 16562 - .word 0 - .word 0 - .word 0 - .word 51054 - .word 24828 - .word 3408 - .word 36750 - .word 16502 - .word 0 - .word 0 - .word 0 - .word 10851 - .word 65289 - .word 49628 - .word 32780 - .word 16542 - .word 0 - .word 0 - .word 0 - .word 55922 - .word 53580 - .word 2985 - .word 62379 - .word 16581 - .word 0 - .word 0 - .word 0 - .word 3514 - .word 59781 - .word 19773 - .word 36749 - .word 16514 - .word 0 - .word 0 - .word 0 - .word 6233 - .word 41678 - .word 56685 - .word 32779 - .word 16558 - .word 0 - .word 0 - .word 0 - .word 7397 - .word 40156 - .word 60492 - .word 62376 - .word 16601 - .word 0 - .word 0 - .word 0 - .word 64764 - .word 30182 - .word 28471 - .word 44055 - .word 16526 - .word 0 - .word 0 - .word 0 - .word 47394 - .word 43518 - .word 20307 - .word 41745 - .word 16574 - .word 0 - .word 0 - .word 0 - .word 48961 - .word 13130 - .word 26792 - .word 42193 - .word 16622 - .word 0 - .word 0 - .word 0 - .word 13149 - .word 49204 - .word 39329 - .word 62843 - .word 16538 - .word 0 - .word 0 - .word 0 - .word 63753 - .word 8765 - .word 38452 - .word 33516 - .word 16591 - .word 0 - .word 0 - .word 0 - .word 60000 - .word 22498 - .word 28021 - .word 38134 - .word 16643 - .word 0 - .word 0 - .word 0 - .word 10643 - .word 26389 - .word 15903 - .word 44739 - .word 16551 - .word 0 - .word 0 - .word 0 - .word 24943 - .word 57881 - .word 5976 - .word 53687 - .word 16607 - .word 0 - .word 0 - .word 0 - .word 62568 - .word 44908 - .word 48389 - .word 34359 - .word 16664 - .word 0 - .word 0 - .word 0 - .word 36352 - .word 25695 - .word 54808 - .word 41154 - .word 49155 - .word 0 - .word 0 - .word 0 - .word 53950 - .word 20364 - .word 22118 - .word 64130 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 29016 - .word 1013 - .word 8897 - .word 49860 - .word 49158 - .word 0 - .word 0 - .word 0 - .word 48790 - .word 22905 - .word 44266 - .word 59689 - .word 49162 - .word 0 - .word 0 - .word 0 - .word 10097 - .word 41173 - .word 5368 - .word 62588 - .word 16398 - .word 0 - .word 0 - .word 0 - .word 18460 - .word 26935 - .word 48131 - .word 34999 - .word 49171 - .word 0 - .word 0 - .word 0 - .word 39812 - .word 13033 - .word 49143 - .word 34463 - .word 49170 - .word 0 - .word 0 - .word 0 - .word 11756 - .word 24889 - .word 14253 - .word 47765 - .word 16408 - .word 0 - .word 0 - .word 0 - .word 27397 - .word 56992 - .word 59569 - .word 35306 - .word 49183 - .word 0 - .word 0 - .word 0 - .word 1499 - .word 3328 - .word 1093 - .word 60276 - .word 49177 - .word 0 - .word 0 - .word 0 - .word 54443 - .word 57316 - .word 38982 - .word 63406 - .word 16418 - .word 0 - .word 0 - .word 0 - .word 46810 - .word 23189 - .word 13701 - .word 35573 - .word 49196 - .word 0 - .word 0 - .word 0 - .word 40551 - .word 19489 - .word 60782 - .word 40648 - .word 49186 - .word 0 - .word 0 - .word 0 - .word 16371 - .word 31130 - .word 60187 - .word 37497 - .word 16430 - .word 0 - .word 0 - .word 0 - .word 56271 - .word 55717 - .word 16120 - .word 36897 - .word 49210 - .word 0 - .word 0 - .word 0 - .word 11488 - .word 11046 - .word 17817 - .word 40691 - .word 49195 - .word 0 - .word 0 - .word 0 - .word 54617 - .word 39007 - .word 658 - .word 37550 - .word 16442 - .word 0 - .word 0 - .word 0 - .word 32140 - .word 49295 - .word 21536 - .word 36961 - .word 49225 - .word 0 - .word 0 - .word 0 - .word 5702 - .word 58081 - .word 34597 - .word 57945 - .word 49204 - .word 0 - .word 0 - .word 0 - .word 48280 - .word 56894 - .word 9030 - .word 60159 - .word 16454 - .word 0 - .word 0 - .word 0 - .word 61535 - .word 4768 - .word 37086 - .word 33310 - .word 49241 - .word 0 - .word 0 - .word 0 - .word 53564 - .word 21787 - .word 24446 - .word 56588 - .word 49214 - .word 0 - .word 0 - .word 0 - .word 35771 - .word 11952 - .word 2619 - .word 36719 - .word 16468 - .word 0 - .word 0 - .word 0 - .word 47624 - .word 53808 - .word 19802 - .word 50829 - .word 49257 - .word 0 - .word 0 - .word 0 - .word 42706 - .word 15946 - .word 64291 - .word 36776 - .word 49225 - .word 0 - .word 0 - .word 0 - .word 8317 - .word 44716 - .word 51672 - .word 32812 - .word 16482 - .word 0 - .word 0 - .word 0 - .word 31251 - .word 20899 - .word 16102 - .word 62455 - .word 49274 - .word 0 - .word 0 - .word 0 - .word 2105 - .word 17517 - .word 10872 - .word 62061 - .word 49235 - .word 0 - .word 0 - .word 0 - .word 60728 - .word 14335 - .word 45529 - .word 41528 - .word 16496 - .word 0 - .word 0 - .word 0 - .word 1336 - .word 56903 - .word 46326 - .word 59283 - .word 49292 - .word 0 - .word 0 - .word 0 - .word 34501 - .word 54054 - .word 11762 - .word 33288 - .word 49247 - .word 0 - .word 0 - .word 0 - .word 35638 - .word 17126 - .word 61083 - .word 36196 - .word 16511 - .word 0 - .word 0 - .word 0 - .word 12489 - .word 2246 - .word 55342 - .word 41983 - .word 49311 - .word 0 - .word 0 - .word 0 - .word 55790 - .word 52004 - .word 63053 - .word 44600 - .word 49258 - .word 0 - .word 0 - .word 0 - .word 1778 - .word 6965 - .word 62764 - .word 42435 - .word 16526 - .word 0 - .word 0 - .word 0 - .word 47762 - .word 48342 - .word 51287 - .word 43067 - .word 49330 - .word 0 - .word 0 - .word 0 - .word 51047 - .word 24828 - .word 3408 - .word 36750 - .word 49270 - .word 0 - .word 0 - .word 0 - .word 10839 - .word 65289 - .word 49628 - .word 32780 - .word 16542 - .word 0 - .word 0 - .word 0 - .word 14289 - .word 53581 - .word 2985 - .word 62379 - .word 49349 - .word 0 - .word 0 - .word 0 - .word 3506 - .word 59781 - .word 19773 - .word 36749 - .word 49282 - .word 0 - .word 0 - .word 0 - .word 6220 - .word 41678 - .word 56685 - .word 32779 - .word 16558 - .word 0 - .word 0 - .word 0 - .word 31299 - .word 40156 - .word 60492 - .word 62376 - .word 49369 - .word 0 - .word 0 - .word 0 - .word 64754 - .word 30182 - .word 28471 - .word 44055 - .word 49294 - .word 0 - .word 0 - .word 0 - .word 47368 - .word 43518 - .word 20307 - .word 41745 - .word 16574 - .word 0 - .word 0 - .word 0 - .word 65114 - .word 13130 - .word 26792 - .word 42193 - .word 49390 - .word 0 - .word 0 - .word 0 - .word 13136 - .word 49204 - .word 39329 - .word 62843 - .word 49306 - .word 0 - .word 0 - .word 0 - .word 63757 - .word 8765 - .word 38452 - .word 33516 - .word 16591 - .word 0 - .word 0 - .word 0 - .word 9085 - .word 22499 - .word 28021 - .word 38134 - .word 49411 - .word 0 - .word 0 - .word 0 - .word 10631 - .word 26389 - .word 15903 - .word 44739 - .word 49319 - .word 0 - .word 0 - .word 0 - .word 24915 - .word 57881 - .word 5976 - .word 53687 - .word 16607 - .word 0 - .word 0 - .word 0 - .word 16910 - .word 44909 - .word 48389 - .word 34359 - .word 49432 - .word 0 - .word 0 - .word 0 - .type _ldbA,@object - .size _ldbA,6160 - .align 16 -_dbA: - .long 4235179544 - .long 3219290252 - .long 3295226828 - .long 3164508998 - .long 1649608659 - .long 1072320934 - .long 3173846476 - .long 1014071527 - .long 1542107862 - .long 3218711765 - .long 2540989727 - .long 3163202496 - .long 1649608660 - .long 3220853158 - .long 859914669 - .long 1017880115 - .long 717740104 - .long 3219214642 - .long 2376945980 - .long 3162254827 - .long 1431655765 - .long 1068848469 - .long 1431655765 - .long 1012225365 - .long 1431655765 - .long 1068848469 - .long 42583435 - .long 1011709190 - .long 3362045620 - .long 1072523249 - .long 4064281872 - .long 1016386130 - .long 4002465326 - .long 3220678216 - .long 1750589542 - .long 1014054706 - .long 2343010478 - .long 3220651595 - .long 2022209519 - .long 3165213628 - .long 3582788241 - .long 1077376220 - .long 3584976419 - .long 3225506388 - .long 2237448112 - .long 1085305363 - .long 634573353 - .long 3233318238 - .long 2248101888 - .long 1073427871 - .long 1861873466 - .long 1016835790 - .long 2560862412 - .long 1071060948 - .long 30404090 - .long 3163588833 - .long 1673151062 - .long 1081107801 - .long 641486499 - .long 3229145757 - .long 2847476088 - .long 1079825078 - .long 4109693297 - .long 3227890617 - .long 80699903 - .long 1078574114 - .long 2114691410 - .long 3226679074 - .long 1354791574 - .long 1083527322 - .long 1238563653 - .long 3231741049 - .long 2909836308 - .long 1082322123 - .long 2961745666 - .long 3230453807 - .long 4254370204 - .long 3222569838 - .long 2523116623 - .long 1016608103 - .long 3036354677 - .long 3220338375 - .long 4197032384 - .long 3163739097 - .long 618767413 - .long 1086658447 - .long 4224046954 - .long 3235503748 - .long 918515347 - .long 1104466354 - .long 1558545744 - .long 3253448772 - .long 3598672851 - .long 1075147148 - .long 1862579612 - .long 1019557195 - .long 814211565 - .long 1073042505 - .long 3816489657 - .long 3166119701 - .long 1438601496 - .long 1094947899 - .long 3932640262 - .long 3243813893 - .long 1025077628 - .long 1092155011 - .long 4084583552 - .long 3241103782 - .long 2491631644 - .long 1089473568 - .long 3212116569 - .long 3238261210 - .long 764386880 - .long 1100022671 - .long 1839771210 - .long 3248755462 - .long 3990369246 - .long 1097905463 - .long 1112302030 - .long 3246751353 - .long 717740104 - .long 1070682418 - .long 230143214 - .long 1014072542 - .long 1542107862 - .long 1071228117 - .long 2869986399 - .long 1017025354 - .long 2620920409 - .long 1068568872 - .long 3005931917 - .long 1068498895 - .long 3773030413 - .long 1068741081 - .long 221735135 - .long 1068648815 - .long 1649608659 - .long 1072320934 - .long 2259103138 - .long 1014410184 - .long 1798481678 - .long 1068036068 - .long 1435858614 - .long 1066348979 - .long 2798813559 - .long 1068114295 - .long 1711004053 - .long 1067747678 - .long 2010902109 - .long 1068166444 - .long 2474987820 - .long 1068059813 - .long 780818753 - .long 1068375890 - .long 4117616766 - .long 1068267614 - .long 1604677386 - .long 1068848813 - .long 1854392195 - .long 1067982657 - .long 4235179544 - .long 1071806604 - .long 2606438347 - .long 1015960145 - .long 2893907075 - .long 1066734370 - .long 2294698909 - .long 1014073149 - .long 441808390 - .long 3216064000 - .long 1880662273 - .long 1012321168 - .long 3253204732 - .long 3200326446 - .long 3649195207 - .long 1051723342 - .long 1676415034 - .long 3202599881 - .long 856428669 - .long 1053972858 - .long 3299217318 - .long 1070900044 - .long 4151699616 - .long 1010498715 - .long 1123572530 - .long 1044951237 - .long 3942090667 - .long 3191111442 - .long 179320158 - .long 3191607973 - .long 648955671 - .long 3189543958 - .long 338963396 - .long 3195730567 - .long 729244107 - .long 1047109933 - .long 491939632 - .long 3198035439 - .long 2441649049 - .long 1049392674 - .long 4000663347 - .long 1056276700 - .long 3497022620 - .long 3193423889 - .long 119575502 - .long 1071320806 - .long 3893526980 - .long 3160417465 - .long 2378611747 - .long 3217220647 - .long 3721041488 - .long 3160948136 - .long 212213087 - .long 1003805565 - .long 3707885569 - .long 946762142 - .long 954325311 - .long 1061996326 - .long 2572405945 - .long 3208784108 - .long 2047107390 - .long 1053958905 - .long 2157300588 - .long 3201555925 - .long 3371055275 - .long 1071576875 - .long 1069844800 - .long 1015429887 - .long 3166931521 - .long 3216972217 - .long 3220968514 - .long 3161728497 - .long 4141120019 - .long 1057975373 - .long 3048513049 - .long 3204734413 - .long 1172170140 - .long 1059250739 - .long 2600146741 - .long 3206041877 - .long 2751605624 - .long 1060573214 - .long 1663282963 - .long 3207426590 - .long 3895324829 - .long 1055298027 - .long 157415216 - .long 3202171477 - .long 3734613381 - .long 1056602430 - .long 277770430 - .long 3203481600 - .long 3198889327 - .long 3217706325 - .long 2705408501 - .long 1014676637 - .long 59787751 - .long 1073579891 - .long 1470716836 - .long 1013369721 - .long 2045320829 - .long 1061536716 - .long 93552279 - .long 3208285776 - .long 1578930691 - .long 1053381091 - .long 2541023 - .long 3199217833 - .long 2303467340 - .long 1072252569 - .long 567354353 - .long 1016170573 - .long 4277811695 - .long 1072049730 - .long 3950020367 - .long 3160819724 - .long 2523318625 - .long 1057215902 - .long 2302510246 - .long 3203993877 - .long 298082853 - .long 1058616118 - .long 2097322096 - .long 3205466603 - .long 1798601470 - .long 1060132265 - .long 1407285416 - .long 3206822737 - .long 4077669298 - .long 1054450862 - .long 2333929458 - .long 3201533971 - .long 2747507284 - .long 1055881541 - .long 2839080721 - .long 3202576178 - .long 3383958356 - .long 3218498155 - .long 613656875 - .long 1017795528 - .long 173059452 - .long 1075530818 - .long 704088483 - .long 1015836313 - .long 669591746 - .long 1061765380 - .long 2029568326 - .long 3208524070 - .long 4157429832 - .long 1054150757 - .long 704852271 - .long 3201323640 - .long 846452204 - .long 1073165719 - .long 1707052239 - .long 1015225852 - .long 1011120585 - .long 1074996836 - .long 2354399398 - .long 3161432137 - .long 954697072 - .long 1057288366 - .long 1270411324 - .long 3204047380 - .long 711769130 - .long 1058758297 - .long 1128721 - .long 3205559284 - .long 179011054 - .long 1060257504 - .long 4204770871 - .long 3206955261 - .long 3137275514 - .long 1053955134 - .long 762311517 - .long 3199983289 - .long 728345252 - .long 1056011172 - .long 1369631397 - .long 3202845593 - .long 3569027386 - .long 3214047105 - .long 3629871173 - .long 3159432582 - .long 2480864277 - .long 1072801415 - .long 765976303 - .long 1016615598 - .long 759560957 - .long 1082479958 - .long 4267700141 - .long 3214355674 - .long 519344805 - .long 3246817843 - .long 220815467 - .long 3246677566 - .long 585197945 - .long 1074992152 - .long 3068616556 - .long 1020233496 - .long 4125953813 - .long 3215772665 - .long 1932096513 - .long 3151829739 - .long 891522464 - .long 1087323966 - .long 2489260670 - .long 3237524288 - .long 198576582 - .long 1086294508 - .long 1118764770 - .long 3231025522 - .long 4028480604 - .long 1084377135 - .long 1979567970 - .long 3223360994 - .long 4063308394 - .long 3244561236 - .long 4166146281 - .long 3246077527 - .long 2664161993 - .long 3240072782 - .long 259025260 - .long 3242645417 - .long 378360574 - .long 1070238620 - .long 2959696752 - .long 1069921292 - .long 573154909 - .long 1069707436 - .long 4044344316 - .long 1069551882 - .long 477218588 - .long 1069314503 - .long 0 - .long 3217031168 - .long 2454267026 - .long 1069697316 - .long 1431655765 - .long 3217380693 - .long 2576980378 - .long 1070176665 - .long 0 - .long 3218079744 - .long 1431655765 - .long 1070945621 - .long 0 - .long 3219128320 - .long 2759451285 - .long 3216787420 - .long 439852373 - .long 3160440428 - .long 925239789 - .long 1070204188 - .long 1052235825 - .long 1014694615 - .long 2825585883 - .long 3219218351 - .long 1250510261 - .long 3158266606 - .long 4280873151 - .long 1070880196 - .long 3382653115 - .long 1014364358 - .long 3432120556 - .long 1060112640 - .long 1689864936 - .long 3206804514 - .long 2559966835 - .long 1058598642 - .long 1675881979 - .long 3205446725 - .long 3157807190 - .long 1057195995 - .long 83437824 - .long 3203930944 - .long 714759041 - .long 1055696489 - .long 94115283 - .long 3202310560 - .long 231342353 - .long 1053665780 - .long 2283895727 - .long 3199602663 - .long 2514471110 - .long 1050042839 - .long 1783553765 - .long 3194406773 - .long 2977985131 - .long 3217141333 - .long 1199854581 - .long 3162366396 - .long 2962538897 - .long 3216960405 - .long 4143040985 - .long 3159573871 - .long 1505583242 - .long 1067626192 - .long 1685935487 - .long 1007379916 - .long 1307717362 - .long 1071507942 - .long 2592844004 - .long 1015649171 - .long 799685378 - .long 1060113448 - .long 3181808512 - .long 3206805166 - .long 237118685 - .long 1058600582 - .long 1021521704 - .long 3205452843 - .long 562863096 - .long 1057199158 - .long 124222188 - .long 3203968611 - .long 666083857 - .long 1055962453 - .long 2573104645 - .long 3202709164 - .long 3241565485 - .long 1053885149 - .long 1335355988 - .long 3200533016 - .long 1040080838 - .long 1054134824 - .long 2847172487 - .long 3201012249 - .long 3198889327 - .long 3217706325 - .long 1543330549 - .long 3160864782 - .long 4277811695 - .long 1072049730 - .long 993295933 - .long 1014676638 - .long 59787751 - .long 1073579891 - .long 130295530 - .long 1013369744 - .long 2303467340 - .long 1072252569 - .long 3943765603 - .long 1016170278 - .long 3608922566 - .long 1060045649 - .long 1453569939 - .long 3207287740 - .long 3338057825 - .long 3206066477 - .long 3038862383 - .long 3208900206 - .long 2094875998 - .long 3209983096 - .long 1016858122 - .long 3211012944 - .long 2854570659 - .long 3211659217 - .long 1144696552 - .long 3211904901 - .long 2176258130 - .long 3211749311 - .long 3478125247 - .long 3210994876 - .long 2355567962 - .long 3209692799 - .long 3598755244 - .long 3207186288 - .long 3383958356 - .long 3218498155 - .long 141035778 - .long 3162876606 - .long 1011120585 - .long 1074996836 - .long 1865540452 - .long 1017795522 - .long 173059452 - .long 1075530818 - .long 1582816653 - .long 1015838421 - .long 846452204 - .long 1073165719 - .long 2382960778 - .long 1015259319 - .long 3627221817 - .long 1060257525 - .long 782594551 - .long 3206955283 - .long 1981242537 - .long 1058758037 - .long 1755079229 - .long 3205559658 - .long 2436997517 - .long 1057278666 - .long 3384076381 - .long 3204067450 - .long 2476719666 - .long 1056224805 - .long 337705071 - .long 3201230508 - .long 776493412 - .long 3197801902 - .long 2139883963 - .long 3204685556 - .long 1475852201 - .long 3204789337 - .long 945638604 - .long 3203947238 - .long 3198889327 - .long 3217706325 - .long 4282828456 - .long 3160832800 - .long 4277811695 - .long 1072049730 - .long 993624082 - .long 1014676638 - .long 59787751 - .long 1073579891 - .long 1881378167 - .long 1013369744 - .long 2303467340 - .long 1072252569 - .long 2285482445 - .long 1016170301 - .long 2583886559 - .long 1060132251 - .long 2972085422 - .long 3206822622 - .long 1867851267 - .long 1058615355 - .long 680445507 - .long 3205461644 - .long 1455562209 - .long 1057201491 - .long 2171135678 - .long 3203931082 - .long 973516116 - .long 1055683749 - .long 442346719 - .long 3202274605 - .long 3339219778 - .long 1053603010 - .long 4261370927 - .long 3199529466 - .long 1389725956 - .long 1049937931 - .long 3421055527 - .long 3194266408 - .long 3440444171 - .long 3149749917 - .long 2683862484 - .long 3093774621 - .long 1722766174 - .long 1073233897 - .long 1535800986 - .long 1017782563 - .long 2952983900 - .long 1075015403 - .long 1613333390 - .long 1019450778 - .long 1747624399 - .long 1077465903 - .long 1323746741 - .long 1077414384 - .long 2170768622 - .long 1079283370 - .long 3681271869 - .long 1079585146 - .long 2395326938 - .long 1081247483 - .long 1534348539 - .long 1081774816 - .long 339892429 - .long 1083288020 - .long 3528406654 - .long 1083985153 - .long 2588043907 - .long 1085376283 - .long 2346296707 - .long 1086214596 - .long 207705063 - .long 1087509517 - .long 2560418979 - .long 1088486188 - .long 2868926017 - .long 1088759609 - .long 1843351610 - .long 1091968574 - .long 2991121454 - .long 1008150290 - .long 2149211495 - .long 952864023 - .long 1596959828 - .long 1075781798 - .long 2172289614 - .long 1019977377 - .long 2540785903 - .long 1077531858 - .long 1236674410 - .long 1020936929 - .long 4153228343 - .long 1087542211 - .long 2696338690 - .long 1090238842 - .long 878599865 - .long 1092951715 - .long 1553131440 - .long 1095784438 - .long 1380037893 - .long 1098488966 - .long 2667481451 - .long 1101284640 - .long 2282526011 - .long 1104162081 - .long 2355356013 - .long 1106903006 - .long 2198000318 - .long 1109722332 - .long 415847444 - .long 1112609215 - .long 1244368631 - .long 1115409383 - .long 1504872183 - .long 1118250351 - .long 1483597343 - .long 1121215185 - .long 2372686104 - .long 1123791138 - .long 2950620603 - .long 1012416763 - .long 1854687498 - .long 952811571 - .long 4103214658 - .long 1077594716 - .long 2773032534 - .long 1020189917 - .long 3447799694 - .long 1081361429 - .long 400789830 - .long 1023147708 - .long 3214535591 - .long 1099259453 - .long 1237622722 - .long 1103959294 - .long 3800166525 - .long 1108620252 - .long 3349752687 - .long 1113359257 - .long 1736707866 - .long 1118068670 - .long 1604218008 - .long 1122855127 - .long 472376766 - .long 1127573289 - .long 2849635624 - .long 1132420823 - .long 1552594705 - .long 1137123494 - .long 3251899291 - .long 1141973158 - .long 523050174 - .long 1146711894 - .long 2820496385 - .long 1151553661 - .long 507113183 - .long 1156515491 - .long 3382661695 - .long 1160984436 - .long 1797993220 - .long 1014085677 - .long 1007534641 - .long 957814894 - .long 136949250 - .long 1079957294 - .long 360284395 - .long 1016466469 - .long 784478107 - .long 1086123203 - .long 2737766812 - .long 1029538613 - .long 1541190179 - .long 1113554317 - .long 209153222 - .long 1120512208 - .long 2353533988 - .long 1127569405 - .long 445988592 - .long 1134692642 - .long 3579939511 - .long 1141824664 - .long 1580626808 - .long 1148890066 - .long 214151816 - .long 1156005346 - .long 2068712408 - .long 1163158821 - .long 839406419 - .long 1170342165 - .long 3247543387 - .long 1177546316 - .long 4025420415 - .long 1184654254 - .long 956971024 - .long 1191825477 - .long 2268897124 - .long 1199100768 - .long 3197790250 - .long 1206020453 - .long 2712668744 - .long 1014362371 - .long 420246125 - .long 958137372 - .long 2654663338 - .long 1082564068 - .long 4161996347 - .long 1025251297 - .long 1213005072 - .long 1091554851 - .long 789699257 - .long 1035400076 - .long 800710857 - .long 1129640478 - .long 2496483081 - .long 1139363849 - .long 599798751 - .long 1149188652 - .long 1701185240 - .long 1158910290 - .long 2369516264 - .long 1168692319 - .long 283492325 - .long 1178587937 - .long 3183141054 - .long 1188335795 - .long 3641040163 - .long 1198179274 - .long 561697907 - .long 1208059224 - .long 1909654917 - .long 1217858291 - .long 2831089635 - .long 1227776627 - .long 2923368563 - .long 1237613769 - .long 3277782853 - .long 1247623400 - .long 2305379544 - .long 1257247294 - .long 2173558120 - .long 3167899773 - .long 3928519072 - .long 3112134976 - .long 2855828427 - .long 1085518855 - .long 2402042833 - .long 1029906467 - .long 3668949703 - .long 1097350789 - .long 1498999354 - .long 1041534216 - .long 1894732623 - .long 1147309596 - .long 3157447236 - .long 1159959522 - .long 1106557451 - .long 1172641345 - .long 2830063624 - .long 1185354419 - .long 1827524850 - .long 1198100435 - .long 3148494391 - .long 1210882790 - .long 408406249 - .long 1223697282 - .long 1409028207 - .long 1236424336 - .long 3586220107 - .long 1249179206 - .long 1522157876 - .long 1261965775 - .long 1820647987 - .long 1274787293 - .long 141517691 - .long 1287671841 - .long 1169226569 - .long 1300517027 - .long 1216765362 - .long 1313047128 - .long 1448028998 - .long 1021264728 - .long 3859033985 - .long 964258238 - .long 4275468065 - .long 1088663688 - .long 2839015045 - .long 1031960699 - .long 2471825140 - .long 1103641144 - .long 2116308392 - .long 1045704405 - .long 320063693 - .long 1166181438 - .long 1786259137 - .long 1181976509 - .long 2022503488 - .long 1197803342 - .long 3654410397 - .long 1213661261 - .long 3612544687 - .long 1229551918 - .long 2586390227 - .long 1245478664 - .long 4037720966 - .long 1261441627 - .long 425603198 - .long 1277313397 - .long 2335359117 - .long 1293212748 - .long 663099774 - .long 1309143515 - .long 3275152075 - .long 1325108897 - .long 3939307299 - .long 1341142935 - .long 2389223216 - .long 1357131850 - .long 3001851795 - .long 1372807567 - .long 2843660044 - .long 1027797837 - .long 4081430736 - .long 972886614 - .long 59873159 - .long 1091970578 - .long 89491691 - .long 1036070212 - .long 800587417 - .long 1110354163 - .long 1316695415 - .long 1054362062 - .long 1053415956 - .long 1186120592 - .long 1951112295 - .long 1205224339 - .long 3452306653 - .long 1224406940 - .long 3087408826 - .long 1243649885 - .long 3141065505 - .long 1262791580 - .long 1611223017 - .long 1282016047 - .long 2457220276 - .long 1301315843 - .long 567478369 - .long 1320490698 - .long 744018712 - .long 1339759601 - .long 3767838035 - .long 1359052970 - .long 2731826519 - .long 1378265330 - .long 2965944329 - .long 1397620918 - .long 3792836018 - .long 1416954415 - .long 4140163483 - .long 1435938859 - .long 3803251356 - .long 1031449026 - .long 1468351707 - .long 974519095 - .long 1510773204 - .long 1095479170 - .long 3459876679 - .long 1039900066 - .long 2329980675 - .long 1117254636 - .long 1442547585 - .long 1060380811 - .long 3793321184 - .long 1207035105 - .long 3851928555 - .long 1229621800 - .long 221632261 - .long 1252267869 - .long 2942953492 - .long 1274996464 - .long 3017520070 - .long 1297616871 - .long 239470767 - .long 1320348902 - .long 1043025700 - .long 1343095998 - .long 252688637 - .long 1365768517 - .long 3880214591 - .long 1388528317 - .long 3579258508 - .long 1411323545 - .long 4034496078 - .long 1434003397 - .long 4007330572 - .long 1456787727 - .long 4167750282 - .long 1479686237 - .long 1263363363 - .long 1502124177 - .long 1204128515 - .long 3180787222 - .long 711751003 - .long 3124411148 - .long 655669005 - .long 1099106472 - .long 1779452985 - .long 1041271036 - .long 3714137145 - .long 1124508819 - .long 3422050113 - .long 1068643358 - .long 2129754319 - .long 1228815190 - .long 1696310114 - .long 1255068559 - .long 1933048134 - .long 1281362741 - .long 1387613391 - .long 1307637530 - .long 3120180336 - .long 1333930483 - .long 2543548174 - .long 1360241860 - .long 1743952085 - .long 1386572739 - .long 830746048 - .long 1412924879 - .long 3823372438 - .long 1439300663 - .long 3126160514 - .long 1465701841 - .long 3650788872 - .long 1492126330 - .long 1753940109 - .long 1518485640 - .long 4158688957 - .long 1544943454 - .long 2419002512 - .long 1571054314 - .long 1387068573 - .long 1036196119 - .long 693317055 - .long 975620966 - .long 85037501 - .long 1102875900 - .long 2766547698 - .long 1047046221 - .long 692715848 - .long 1132034342 - .long 4084350207 - .long 1074738271 - .long 3670967869 - .long 1251313085 - .long 877136010 - .long 1281389973 - .long 2367669872 - .long 1311355635 - .long 127681551 - .long 1341415835 - .long 294488793 - .long 1371561390 - .long 2268228308 - .long 1401588863 - .long 1971903155 - .long 1431680659 - .long 3068569563 - .long 1461838328 - .long 2810042085 - .long 1491968471 - .long 1803405805 - .long 1522051425 - .long 2718559511 - .long 1552192554 - .long 1282364655 - .long 1582403523 - .long 2077022624 - .long 1612690417 - .long 3574791831 - .long 1642467624 - .long 1679930357 - .long 3189181796 - .long 2680901783 - .long 3131938295 - .long 3217922759 - .long 1106719372 - .long 512421297 - .long 1047804811 - .long 767402551 - .long 1139855610 - .long 1780644693 - .long 1084244525 - .long 2568107092 - .long 1274594461 - .long 3742446639 - .long 1308542877 - .long 2828203709 - .long 1342408213 - .long 1035153137 - .long 1376332101 - .long 135830143 - .long 1410361976 - .long 3493601403 - .long 1444258562 - .long 2859691870 - .long 1478279541 - .long 289914903 - .long 1512259079 - .long 388251426 - .long 1546250265 - .long 3047966471 - .long 1580303536 - .long 3861742472 - .long 1614266653 - .long 1260166508 - .long 1648392316 - .long 904399223 - .long 1682450578 - .long 3334685854 - .long 1716212562 - .long 883499133 - .long 1045834798 - .long 1040153219 - .long 987496666 - .long 789418155 - .long 1110723643 - .long 2045920566 - .long 1052287721 - .long 682953991 - .long 1147781119 - .long 96584340 - .long 1092099645 - .long 666163210 - .long 1298545479 - .long 1527740296 - .long 1336421526 - .long 43027861 - .long 1374344588 - .long 1893757912 - .long 1412317817 - .long 3310921752 - .long 1450264132 - .long 1086815150 - .long 1488186400 - .long 2822587825 - .long 1526147814 - .long 1629445394 - .long 1564156239 - .long 2622810410 - .long 1602221540 - .long 2876661682 - .long 1640163607 - .long 151499969 - .long 1678143447 - .long 3591180187 - .long 1716205976 - .long 126024331 - .long 1754364017 - .long 3251093187 - .long 1792100966 - .long 2455853998 - .long 3194846833 - .long 2105329433 - .long 3137419111 - .long 1677091468 - .long 1114834807 - .long 3103559369 - .long 1057563919 - .long 156965555 - .long 1155965375 - .long 1332523955 - .long 1098438055 - .long 2734085455 - .long 1323184128 - .long 3116950081 - .long 1365165587 - .long 2683234966 - .long 1407189808 - .long 2373753488 - .long 1449192848 - .long 1367022160 - .long 1491213979 - .long 3828829922 - .long 1533253445 - .long 649201501 - .long 1575312310 - .long 1349232455 - .long 1617392311 - .long 2871919995 - .long 1659495809 - .long 3481654166 - .long 1701624529 - .long 3617101938 - .long 1743779051 - .long 431481593 - .long 1785867563 - .long 121308995 - .long 1828052659 - .long 357611834 - .long 1869892289 - .long 294133886 - .long 3202139689 - .long 3712546231 - .long 3146198591 - .long 3880935161 - .long 1119029102 - .long 59549724 - .long 1063684005 - .long 3647913141 - .long 1164353962 - .long 4227156178 - .long 1109331949 - .long 3682674216 - .long 1348349871 - .long 2807072537 - .long 1394525619 - .long 2124002856 - .long 1440744183 - .long 2605559380 - .long 1486941516 - .long 2185296140 - .long 1533156938 - .long 3364132884 - .long 1579390693 - .long 3636842097 - .long 1625643843 - .long 1564856349 - .long 1671918127 - .long 282911834 - .long 1718215904 - .long 224295158 - .long 1764538898 - .long 1397797422 - .long 1810887684 - .long 130160665 - .long 1857170584 - .long 3494254532 - .long 1903549984 - .long 2087544159 - .long 1949584056 - .long 2070009724 - .long 3207114478 - .long 3313155961 - .long 3151739743 - .long 1799064076 - .long 1123301109 - .long 3318052585 - .long 1067728611 - .long 1398608221 - .long 1172933154 - .long 3195587656 - .long 1117275768 - .long 3966862011 - .long 1374007527 - .long 3094801078 - .long 1424457063 - .long 201966774 - .long 1474951107 - .long 1216746698 - .long 1525492144 - .long 4169038329 - .long 1576047750 - .long 2574869838 - .long 1626540825 - .long 3353136223 - .long 1677069826 - .long 246421124 - .long 1727641760 - .long 3497001028 - .long 1778265406 - .long 1014877316 - .long 1828833334 - .long 2620327651 - .long 1879376562 - .long 1343179361 - .long 1929994932 - .long 3499694378 - .long 1980775534 - .long 852481763 - .long 2031094897 - .long 858300611 - .long 1060903333 - .long 1069421656 - .long 1004554972 - .long 381774873 - .long 1127661932 - .long 2890562600 - .long 1072008419 - .long 3230239600 - .long 1181757061 - .long 1093463150 - .long 1126994478 - .long 2041459920 - .long 1400246667 - .long 1834149192 - .long 1455089424 - .long 3431867819 - .long 1509997896 - .long 673297555 - .long 1564813682 - .long 2939272129 - .long 1619727956 - .long 2561583193 - .long 1674674892 - .long 1592460776 - .long 1729549373 - .long 4229377564 - .long 1784543364 - .long 3147274091 - .long 1839450750 - .long 199676655 - .long 1894400365 - .long 515597810 - .long 1949398723 - .long 2826001657 - .long 2004337665 - .long 1832191040 - .long 2059473164 - .long 486033509 - .long 2114113687 - .long 2615285763 - .long 3215685247 - .long 3139164341 - .long 3160067829 - .long 2576980377 - .long 1132042649 - .long 2136544456 - .long 1076438044 - .long 1202590842 - .long 1190427361 - .long 3058408830 - .long 1135356281 - .long 2163381214 - .long 1426480799 - .long 2353327718 - .long 1485745575 - .long 3794661129 - .long 1544911246 - .long 3594844771 - .long 1604225727 - .long 3801864141 - .long 1663434111 - .long 1474426882 - .long 1722809436 - .long 2103181697 - .long 1782019277 - .long 1306699518 - .long 1841386098 - .long 2394149058 - .long 1900657427 - .long 2802357954 - .long 1959997432 - .long 4190579671 - .long 2019374921 - .long 1589399104 - .long 2078657782 - .long 459261522 - .long 2137266825 - .long 4294967295 - .long 2146435071 - .long 158971950 - .long 3154658393 - .long 3459173435 - .long 3099360488 - .long 2835657100 - .long 3221135661 - .long 3134582638 - .long 3163662002 - .long 1009146449 - .long 1076045439 - .long 2177907437 - .long 1020724564 - .long 2093419253 - .long 1082406719 - .long 3184966549 - .long 3231785529 - .long 3799028631 - .long 1086175845 - .long 81768581 - .long 3235523877 - .long 1017495356 - .long 1089951767 - .long 1546026610 - .long 3239380678 - .long 980092412 - .long 1093867758 - .long 4064795288 - .long 3243341671 - .long 3027586419 - .long 1097863735 - .long 1002816472 - .long 3247290528 - .long 985745927 - .long 1101758613 - .long 1714999460 - .long 3251222455 - .long 808706777 - .long 1105883774 - .long 2540867906 - .long 3255308994 - .long 1548702939 - .long 3157340334 - .long 1276328330 - .long 3102548777 - .long 2523682374 - .long 3224680861 - .long 1002691513 - .long 3168986622 - .long 2919511741 - .long 1081046750 - .long 3737147325 - .long 1024759629 - .long 2879373926 - .long 1098115315 - .long 103788827 - .long 3250052030 - .long 3732555687 - .long 1107111798 - .long 3845853773 - .long 3259114079 - .long 3808164400 - .long 1116131626 - .long 1738785984 - .long 3268214722 - .long 581652 - .long 1125291233 - .long 3382894442 - .long 3277322952 - .long 2879368705 - .long 1134502288 - .long 2391566275 - .long 3286518813 - .long 274553400 - .long 1143638273 - .long 512789562 - .long 3295790146 - .long 3583864087 - .long 1152986324 - .long 2337425402 - .long 3304798727 - .long 1854575809 - .long 3159867196 - .long 1765059742 - .long 3103980390 - .long 1056564255 - .long 3227329098 - .long 957604928 - .long 3170301297 - .long 1737111893 - .long 1086018364 - .long 3821479224 - .long 1030262355 - .long 1397067068 - .long 1113230428 - .long 1054232731 - .long 3267692171 - .long 1978243918 - .long 1127284645 - .long 3722409577 - .long 3281775634 - .long 1918858489 - .long 1141323813 - .long 3391721543 - .long 3295903979 - .long 2607178807 - .long 1155564765 - .long 3212344015 - .long 3310103974 - .long 3369531970 - .long 1169698149 - .long 335451402 - .long 3324302881 - .long 431247382 - .long 1183973580 - .long 3717434926 - .long 3338657222 - .long 1904523769 - .long 1198380992 - .long 8765522 - .long 3352646819 - .long 2089515505 - .long 1016996008 - .long 1260660699 - .long 961055715 - .long 2755288594 - .long 3230032374 - .long 651647436 - .long 3174928677 - .long 3079991920 - .long 1091533276 - .long 3443268597 - .long 1035583207 - .long 3925746702 - .long 1129598292 - .long 1087270140 - .long 3286788174 - .long 494941268 - .long 1149105228 - .long 1413067450 - .long 3306335280 - .long 2943951130 - .long 1168609830 - .long 1917094202 - .long 3325955583 - .long 3282582259 - .long 1188254230 - .long 205065768 - .long 3345548222 - .long 3975827413 - .long 1207978573 - .long 608024766 - .long 3365228477 - .long 514952666 - .long 1227617187 - .long 1683103546 - .long 3384985256 - .long 3324939681 - .long 1247457575 - .long 4078451799 - .long 3404527118 - .long 3100987862 - .long 1019853288 - .long 2384335067 - .long 962691388 - .long 2781784351 - .long 3233000439 - .long 1271614660 - .long 3176489869 - .long 626016822 - .long 1097348250 - .long 3842822006 - .long 1040353260 - .long 2239739676 - .long 1147303774 - .long 189136319 - .long 3307436007 - .long 2396687400 - .long 1172632530 - .long 1908223243 - .long 3332827221 - .long 2121588596 - .long 1198087089 - .long 3983173167 - .long 3358350016 - .long 2487337699 - .long 1223686165 - .long 3249965797 - .long 3383895554 - .long 3887284480 - .long 1249163916 - .long 138948171 - .long 3409430498 - .long 1463100005 - .long 1274763805 - .long 34738943 - .long 3435142323 - .long 2889101777 - .long 1300502035 - .long 2665757401 - .long 3460504734 - .long 987318156 - .long 3170486179 - .long 252831213 - .long 3113594951 - .long 4266405771 - .long 3236147062 - .long 52757777 - .long 3180182741 - .long 1823142101 - .long 1103640807 - .long 3806357955 - .long 1046313461 - .long 875359927 - .long 1166180665 - .long 1815208659 - .long 3329459206 - .long 1303129141 - .long 1197802172 - .long 4280462790 - .long 3361143469 - .long 626701262 - .long 1229550147 - .long 2303856491 - .long 3392960132 - .long 2759522360 - .long 1261440286 - .long 145515022 - .long 3424795397 - .long 2201193688 - .long 1293210725 - .long 2057332964 - .long 3456624552 - .long 3539517099 - .long 1325105434 - .long 1364231459 - .long 3488625947 - .long 3421843712 - .long 1357133388 - .long 200896422 - .long 3520281853 - .long 951171540 - .long 1026768452 - .long 3090769089 - .long 971487574 - .long 4234403032 - .long 3239454189 - .long 1460268972 - .long 3184474466 - .long 1346899734 - .long 1110354113 - .long 145456861 - .long 1052864217 - .long 2924701438 - .long 1186120500 - .long 3023147446 - .long 3352707860 - .long 1486479387 - .long 1224406765 - .long 1193997181 - .long 3391133412 - .long 2679629000 - .long 1262791412 - .long 2670450976 - .long 3429499462 - .long 1831795719 - .long 1301315682 - .long 3473315319 - .long 3467974125 - .long 2616420704 - .long 1339759302 - .long 1949536880 - .long 3506536322 - .long 2518396463 - .long 1378264708 - .long 142869669 - .long 3545106524 - .long 804820494 - .long 1416958345 - .long 2985125801 - .long 3583414179 - .long 2729716642 - .long 3174389784 - .long 1779261930 - .long 3115790859 - .long 2784196366 - .long 3242962813 - .long 2825451289 - .long 3185986297 - .long 2032114899 - .long 1117254632 - .long 1505002334 - .long 1059738942 - .long 3277658686 - .long 1207035096 - .long 498115686 - .long 3377105433 - .long 1711172328 - .long 1252267855 - .long 261417437 - .long 3422480089 - .long 1133240684 - .long 1297616851 - .long 1456800292 - .long 3467832532 - .long 2145797446 - .long 1343095967 - .long 2516644728 - .long 3513252141 - .long 725820954 - .long 1388528302 - .long 3986994814 - .long 3558807006 - .long 1955265405 - .long 1434003000 - .long 122646123 - .long 3604272992 - .long 1491943337 - .long 1479689885 - .long 1036478018 - .long 3649599135 - .long 523859850 - .long 3181400160 - .long 3846079041 - .long 3121433884 - .long 3639230521 - .long 3246590119 - .long 2638130497 - .long 3191278647 - .long 2154057324 - .long 1124508819 - .long 3236410824 - .long 1069265219 - .long 175871336 - .long 1228815189 - .long 2852522281 - .long 3402552205 - .long 1806384070 - .long 1281362740 - .long 423509286 - .long 3455121177 - .long 1160294737 - .long 1333930482 - .long 3543120866 - .long 3507725506 - .long 1036273485 - .long 1386572737 - .long 2942188771 - .long 3560408527 - .long 2777944578 - .long 1439300670 - .long 2738100981 - .long 3613185349 - .long 527942274 - .long 1492126097 - .long 1294011372 - .long 3665970729 - .long 3274455694 - .long 1544947882 - .long 1889769429 - .long 3718530789 - .long 136073262 - .long 1038797747 - .long 502134597 - .long 982165232 - .long 4211775762 - .long 3250359547 - .long 1347037926 - .long 3194312374 - .long 543769047 - .long 1132034342 - .long 1153606166 - .long 1076402838 - .long 3293430877 - .long 1251313085 - .long 540290119 - .long 3428873621 - .long 1766589444 - .long 1311355635 - .long 3887512491 - .long 3488899482 - .long 4113271272 - .long 1371561389 - .long 1216453194 - .long 3549072511 - .long 761821280 - .long 1431680659 - .long 3412859739 - .long 3609321978 - .long 1736216465 - .long 1491968482 - .long 1379671921 - .long 3669534956 - .long 871564305 - .long 1552192257 - .long 3755076681 - .long 3729888559 - .long 465380849 - .long 1612696812 - .long 1801521440 - .long 3789943511 - .long 926050541 - .long 3187761455 - .long 2363428923 - .long 3130505121 - .long 3212464044 - .long 3254203020 - .long 1767044225 - .long 3196691034 - .long 767402551 - .long 1139855610 - .long 3251527812 - .long 1084244526 - .long 2568107110 - .long 1274594461 - .long 3742439917 - .long 3456026525 - .long 2828194370 - .long 1342408213 - .long 1036563767 - .long 3523815749 - .long 138125806 - .long 1410361976 - .long 3332253618 - .long 3591742210 - .long 2265969007 - .long 1478279541 - .long 2044799860 - .long 3659742729 - .long 3159788672 - .long 1546250274 - .long 3040087996 - .long 3727787101 - .long 3566786041 - .long 1614266310 - .long 3445702274 - .long 3795877266 - .long 1647738551 - .long 1682455451 - .long 820553625 - .long 3863686600 - .long 2466985759 - .long 1045839115 - .long 2115301394 - .long 988248469 - .long 789067623 - .long 3258207291 - .long 2594430310 - .long 3200300918 - .long 682953991 - .long 1147781119 - .long 334308353 - .long 1092099647 - .long 666163226 - .long 1298545479 - .long 1527735017 - .long 3483905174 - .long 43015025 - .long 1374344588 - .long 1895454381 - .long 3559801465 - .long 3313337462 - .long 1450264132 - .long 938251762 - .long 3635670048 - .long 2344246077 - .long 1526147814 - .long 3329926839 - .long 3711639890 - .long 2189826955 - .long 1602221552 - .long 307911546 - .long 3787647166 - .long 4271816317 - .long 1678143122 - .long 3455709496 - .long 3863691777 - .long 509127304 - .long 1754367541 - .long 2246034954 - .long 3939578533 - .long 309332673 - .long 3194846686 - .long 4050026421 - .long 3139306075 - .long 1677069013 - .long 3262318455 - .long 407665306 - .long 3207206552 - .long 156965555 - .long 1155965375 - .long 2320115828 - .long 1098438062 - .long 2734085477 - .long 1323184128 - .long 3116943360 - .long 3512649235 - .long 2683227306 - .long 1407189808 - .long 2374702532 - .long 3596676496 - .long 1369556142 - .long 1491213979 - .long 3682738445 - .long 3680737093 - .long 208207094 - .long 1575312310 - .long 1070212038 - .long 3764875962 - .long 1332751409 - .long 1659495819 - .long 2960239586 - .long 3849108041 - .long 1328259946 - .long 1743778590 - .long 2152673987 - .long 3933352648 - .long 2459568424 - .long 1828057070 - .long 1053026559 - .long 4017368800 - .long 4272716315 - .long 3202139688 - .long 2347479448 - .long 3145750572 - .long 3880933726 - .long 3266512750 - .long 1526392126 - .long 3209922805 - .long 3647913141 - .long 1164353962 - .long 3796124307 - .long 1109331951 - .long 3682674239 - .long 1348349871 - .long 2807065817 - .long 3542009267 - .long 2123995152 - .long 1440744183 - .long 2606508288 - .long 3634425164 - .long 2187838465 - .long 1533156938 - .long 3218070138 - .long 3726874341 - .long 3194985081 - .long 1625643843 - .long 1282672122 - .long 3819401778 - .long 3085269549 - .long 1718215913 - .long 4171823927 - .long 3912022409 - .long 2286527342 - .long 1810887222 - .long 4263058773 - .long 4004655668 - .long 276869381 - .long 1903554397 - .long 2981609009 - .long 4097060567 - .long 2069415824 - .long 3207114478 - .long 3815897610 - .long 3150201997 - .long 1799063985 - .long 3270784757 - .long 609928762 - .long 3210962773 - .long 1398608221 - .long 1172933154 - .long 2839394180 - .long 1117275773 - .long 3966862031 - .long 1374007527 - .long 3094795956 - .long 3571940711 - .long 201952387 - .long 1474951107 - .long 1218377639 - .long 3672975792 - .long 4171572408 - .long 1576047750 - .long 2433360787 - .long 3774024473 - .long 2872117748 - .long 1677069826 - .long 1125668053 - .long 3875125411 - .long 1838424462 - .long 1778265418 - .long 1923560800 - .long 3976316898 - .long 2192672438 - .long 1879376253 - .long 2795231406 - .long 4077480577 - .long 3134618972 - .long 1980778833 - .long 2542206299 - .long 4178570441 - .long 858317418 - .long 1060903333 - .long 3120786235 - .long 1004681431 - .long 381774867 - .long 3275145580 - .long 1575769843 - .long 3219836452 - .long 3230239600 - .long 1181757061 - .long 1694309796 - .long 1126994475 - .long 2041459926 - .long 1400246667 - .long 1834143305 - .long 3602573072 - .long 3431862699 - .long 1509997896 - .long 674489055 - .long 3712297330 - .long 2942256815 - .long 1619727956 - .long 2430104127 - .long 3822158540 - .long 1181772448 - .long 1729549373 - .long 3316918483 - .long 3932027016 - .long 2290692518 - .long 1839450757 - .long 717742192 - .long 4041883887 - .long 2723262413 - .long 1949398481 - .long 726994291 - .long 4151823214 - .long 2316520017 - .long 2059476550 - .long 3506192554 - .long 4261590717 - .long 2615285756 - .long 3215685247 - .long 3456994573 - .long 3158988097 - .long 2576980377 - .long 3279526297 - .long 457772008 - .long 3222963352 - .long 1202590842 - .long 1190427361 - .long 3150210795 - .long 1135356295 - .long 2163381170 - .long 1426480799 - .long 2353315751 - .long 3633229223 - .long 3794716365 - .long 1544911246 - .long 3598226895 - .long 3751709375 - .long 3778743776 - .long 1663434111 - .long 1038551128 - .long 3870293084 - .long 2177305923 - .long 1782019278 - .long 316150431 - .long 3988869748 - .long 3666573938 - .long 1900657340 - .long 1225202613 - .long 4107481261 - .long 4106613245 - .long 2019377222 - .long 3685171119 - .long 4226128894 - .long 3001847201 - .long 2137308914 - .long 4294967295 - .long 4293918719 - .type _dbA,@object - .size _dbA,8032 - .space 672, 0x00 # pad - .align 4 -.L_2il0floatpacket.22: - .long 0x3f800000 - .type .L_2il0floatpacket.22,@object - .size .L_2il0floatpacket.22,4 - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_OFW_BOUND: - .word 60404 - .word 65533 - .word 19595 - .word 47317 - .word 32753 - .word 0 - .word 0 - .word 0 - .type _OFW_BOUND,@object - .size _OFW_BOUND,16 - .align 2 -_TWO5600: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 21983 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 10783 - .word 0 - .word 0 - .word 0 - .type _TWO5600,@object - .size _TWO5600,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_atan2_k64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_atan2_k64.S deleted file mode 100644 index a4710fc4a5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_atan2_k64.S +++ /dev/null @@ -1,1434 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_atan2_k64.c" - .text -..TXTST0: -# -- Begin __libm_atan2_k64 - .text - .align 16,0x90 - .globl __libm_atan2_k64 -__libm_atan2_k64: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -..B1.1: - .cfi_startproc -..___tag_value___libm_atan2_k64.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - movq %rsi, %r9 - movq %rdx, %rax - movzwl 6(%r9), %r11d - andl $32752, %r11d - movb 7(%r9), %sil - movb 7(%rax), %dl - andb $-128, %sil - movzwl 6(%rax), %r10d - andb $-128, %dl - andl $32752, %r10d - shrl $4, %r11d - shrb $7, %sil - shrb $7, %dl - shrl $4, %r10d - cmpl $2047, %r11d - jge ..B1.34 -..B1.2: - cmpl $2047, %r10d - jge ..B1.35 -..B1.3: - testl %r11d, %r11d - jne ..B1.6 -..B1.4: - testl $1048575, 4(%r9) - jne ..B1.6 -..B1.5: - cmpl $0, (%r9) - je ..B1.29 -..B1.6: - testl %r10d, %r10d - jne ..B1.9 -..B1.7: - testl $1048575, 4(%rax) - jne ..B1.9 -..B1.8: - cmpl $0, (%rax) - je ..B1.27 -..B1.9: - movzbl %sil, %r8d - lea _dAtan2Tab(%rip), %rcx - movsd (%r9), %xmm4 - testl %r11d, %r11d - movsd 8(%r9), %xmm6 - movzbl %dl, %r9d - movsd 1904(%rcx,%r8,8), %xmm9 - movsd (%rax), %xmm3 - mulsd %xmm9, %xmm4 - movaps %xmm3, %xmm2 - mulsd %xmm9, %xmm6 - movsd 8(%rax), %xmm9 - movsd 1904(%rcx,%r9,8), %xmm0 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm9 - jle ..B1.47 -..B1.10: - lea 1888+_dAtan2Tab(%rip), %rax - lea -1023(%r11), %r9d - movl %r9d, %r13d - negl %r13d - addl $1023, %r13d - movq (%rax), %r8 - andl $2047, %r13d - movq %r8, -32(%rsp) - shrq $48, %r8 - shll $4, %r13d - andl $-32753, %r8d - movsd %xmm4, -24(%rsp) - orl %r13d, %r8d - movw %r8w, -26(%rsp) - movzwl -18(%rsp), %eax - andl $-32753, %eax - movsd -32(%rsp), %xmm0 - orl $-49168, %eax - movw %ax, -18(%rsp) - mulsd %xmm0, %xmm6 -..B1.11: - testl %r10d, %r10d - jle ..B1.46 -..B1.12: - lea 1888+_dAtan2Tab(%rip), %rax - lea -1023(%r10), %r8d - movsd %xmm2, -16(%rsp) - movq (%rax), %r13 - movl %r8d, %eax - negl %eax - addl $1023, %eax - movq %r13, -32(%rsp) - andl $2047, %eax - shrq $48, %r13 - shll $4, %eax - andl $-32753, %r13d - orl %eax, %r13d - movw %r13w, -26(%rsp) - movzwl -10(%rsp), %eax - andl $-32753, %eax - movsd -32(%rsp), %xmm0 - orl $-49168, %eax - movw %ax, -10(%rsp) - mulsd %xmm0, %xmm9 -..B1.13: - movl %r9d, %eax - subl %r8d, %eax - cmpl $-54, %eax - jle ..B1.24 -..B1.14: - cmpl $54, %eax - jge ..B1.21 -..B1.15: - testb %dl, %dl - jne ..B1.17 -..B1.16: - lea 1992+_dAtan2Tab(%rip), %rax - movsd (%rax), %xmm12 - movaps %xmm12, %xmm13 - jmp ..B1.18 -..B1.17: - lea 1952+_dAtan2Tab(%rip), %rax - lea 1960+_dAtan2Tab(%rip), %r10 - movsd (%rax), %xmm12 - movsd (%r10), %xmm13 -..B1.18: - negl %r9d - lea 1888+_dAtan2Tab(%rip), %rax - movsd -16(%rsp), %xmm8 - lea 1880+_dAtan2Tab(%rip), %r11 - movzwl 6(%rax), %r10d - lea 1023(%r8,%r9), %r8d - andl $2047, %r8d - andl $-32753, %r10d - movsd (%rax), %xmm10 - lea 2016+_dAtan2Tab(%rip), %r9 - shll $4, %r8d - movaps %xmm10, %xmm1 - movsd %xmm10, -64(%rsp) - orl %r8d, %r10d - movw %r10w, -58(%rsp) - movsd -64(%rsp), %xmm4 - mulsd %xmm4, %xmm8 - mulsd %xmm4, %xmm9 - movsd -24(%rsp), %xmm4 - movsd (%r9), %xmm11 - movaps %xmm4, %xmm5 - mulsd %xmm11, %xmm5 - movaps %xmm4, %xmm7 - movaps %xmm5, %xmm3 - subsd %xmm4, %xmm3 - subsd %xmm3, %xmm5 - movaps %xmm11, %xmm3 - mulsd %xmm8, %xmm3 - subsd %xmm5, %xmm7 - movaps %xmm3, %xmm2 - addsd %xmm6, %xmm7 - subsd %xmm8, %xmm2 - subsd %xmm2, %xmm3 - movaps %xmm8, %xmm2 - divsd %xmm3, %xmm1 - movaps %xmm1, %xmm15 - movaps %xmm3, %xmm0 - mulsd %xmm11, %xmm15 - subsd %xmm3, %xmm2 - movaps %xmm15, %xmm14 - addsd %xmm9, %xmm2 - subsd %xmm1, %xmm14 - subsd %xmm14, %xmm15 - movaps %xmm10, %xmm14 - mulsd %xmm15, %xmm0 - movaps %xmm15, %xmm1 - mulsd %xmm2, %xmm1 - subsd %xmm0, %xmm14 - subsd %xmm1, %xmm14 - movaps %xmm15, %xmm1 - mulsd %xmm5, %xmm1 - movaps %xmm14, %xmm0 - addsd %xmm10, %xmm0 - mulsd %xmm0, %xmm14 - movaps %xmm7, %xmm0 - mulsd %xmm15, %xmm14 - mulsd %xmm7, %xmm15 - mulsd %xmm14, %xmm0 - mulsd %xmm5, %xmm14 - addsd %xmm14, %xmm0 - addsd %xmm15, %xmm0 - movaps %xmm0, %xmm14 - addsd %xmm1, %xmm14 - comisd (%r11), %xmm14 - subsd %xmm14, %xmm1 - addsd %xmm0, %xmm1 - jb ..B1.20 -..B1.19: - movsd %xmm14, -64(%rsp) - lea 1984+_dAtan2Tab(%rip), %r9 - movl -60(%rsp), %r8d - lea 1872+_dAtan2Tab(%rip), %r10 - andl $-524288, %r8d - lea 1864+_dAtan2Tab(%rip), %r11 - orl $262144, %r8d - lea 1856+_dAtan2Tab(%rip), %r13 - movl $0, -64(%rsp) - movl %r8d, -60(%rsp) - lea 1848+_dAtan2Tab(%rip), %r8 - movsd -64(%rsp), %xmm1 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm5 - mulsd %xmm1, %xmm7 - movsd (%r9), %xmm0 - movaps %xmm11, %xmm1 - mulsd %xmm0, %xmm3 - lea 1840+_dAtan2Tab(%rip), %r9 - mulsd %xmm2, %xmm0 - movsd %xmm14, -40(%rsp) - movaps %xmm3, %xmm14 - movaps %xmm4, %xmm2 - addsd %xmm0, %xmm14 - movl -36(%rsp), %eax - subsd %xmm14, %xmm3 - andl $2147483647, %eax - addsd %xmm3, %xmm0 - movaps %xmm14, %xmm3 - addl $-1069547520, %eax - sarl $18, %eax - addsd %xmm4, %xmm3 - andl $-2, %eax - subsd %xmm3, %xmm2 - movslq %eax, %rax - addsd %xmm2, %xmm14 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm4 - addsd %xmm4, %xmm14 - movaps %xmm3, %xmm4 - mulsd %xmm11, %xmm4 - addsd %xmm14, %xmm6 - movaps %xmm4, %xmm15 - addsd %xmm0, %xmm6 - subsd %xmm3, %xmm15 - movaps %xmm5, %xmm0 - subsd %xmm15, %xmm4 - addsd %xmm7, %xmm0 - subsd %xmm4, %xmm3 - subsd %xmm0, %xmm5 - addsd %xmm6, %xmm3 - addsd %xmm5, %xmm7 - movaps %xmm0, %xmm5 - movaps %xmm8, %xmm6 - addsd %xmm8, %xmm5 - subsd %xmm5, %xmm6 - addsd %xmm6, %xmm0 - addsd %xmm5, %xmm6 - subsd %xmm6, %xmm8 - addsd %xmm8, %xmm0 - addsd %xmm0, %xmm9 - movaps %xmm5, %xmm0 - mulsd %xmm11, %xmm0 - addsd %xmm7, %xmm9 - movaps %xmm0, %xmm7 - subsd %xmm5, %xmm7 - subsd %xmm7, %xmm0 - movsd (%r10), %xmm7 - lea 1832+_dAtan2Tab(%rip), %r10 - subsd %xmm0, %xmm5 - addsd %xmm9, %xmm5 - movaps %xmm10, %xmm9 - divsd %xmm0, %xmm9 - mulsd %xmm9, %xmm1 - movaps %xmm1, %xmm8 - subsd %xmm9, %xmm8 - movaps %xmm10, %xmm9 - subsd %xmm8, %xmm1 - movaps %xmm12, %xmm8 - mulsd %xmm1, %xmm0 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm5 - mulsd %xmm4, %xmm2 - subsd %xmm0, %xmm9 - subsd %xmm5, %xmm9 - movaps %xmm2, %xmm5 - addsd %xmm9, %xmm10 - mulsd %xmm10, %xmm9 - movaps %xmm3, %xmm10 - mulsd %xmm1, %xmm9 - mulsd %xmm3, %xmm1 - mulsd %xmm9, %xmm10 - mulsd %xmm9, %xmm4 - addsd %xmm4, %xmm10 - addsd %xmm1, %xmm10 - addsd %xmm10, %xmm5 - movaps %xmm5, %xmm3 - movaps %xmm5, %xmm15 - mulsd %xmm5, %xmm3 - subsd %xmm5, %xmm2 - mulsd %xmm11, %xmm15 - mulsd %xmm3, %xmm7 - addsd %xmm2, %xmm10 - movaps %xmm15, %xmm4 - addsd (%r11), %xmm7 - subsd %xmm5, %xmm4 - mulsd %xmm3, %xmm7 - subsd %xmm4, %xmm15 - addsd (%r13), %xmm7 - subsd %xmm15, %xmm5 - mulsd %xmm3, %xmm7 - addsd %xmm5, %xmm10 - addsd (%r8), %xmm7 - mulsd %xmm3, %xmm7 - lea 1824+_dAtan2Tab(%rip), %r11 - movaps %xmm10, %xmm0 - addsd (%r9), %xmm7 - mulsd %xmm3, %xmm7 - movsd (%rcx,%rax,8), %xmm4 - addsd (%r10), %xmm7 - mulsd %xmm3, %xmm7 - addsd (%r11), %xmm7 - mulsd %xmm3, %xmm7 - mulsd %xmm7, %xmm11 - movaps %xmm11, %xmm6 - subsd %xmm7, %xmm6 - subsd %xmm6, %xmm11 - movaps %xmm11, %xmm14 - subsd %xmm11, %xmm7 - mulsd %xmm15, %xmm14 - mulsd %xmm10, %xmm11 - mulsd %xmm7, %xmm0 - mulsd %xmm15, %xmm7 - addsd %xmm11, %xmm0 - movaps %xmm14, %xmm2 - movaps %xmm14, %xmm11 - addsd %xmm15, %xmm2 - addsd %xmm7, %xmm0 - subsd %xmm2, %xmm11 - movaps %xmm2, %xmm3 - movaps %xmm2, %xmm1 - addsd %xmm11, %xmm15 - addsd %xmm2, %xmm11 - addsd %xmm4, %xmm3 - subsd %xmm11, %xmm14 - subsd %xmm3, %xmm1 - addsd %xmm14, %xmm15 - addsd %xmm1, %xmm4 - addsd %xmm3, %xmm1 - addsd %xmm15, %xmm10 - subsd %xmm1, %xmm2 - addsd %xmm0, %xmm10 - addsd %xmm2, %xmm4 - movsd %xmm3, -56(%rsp) - addsd %xmm10, %xmm4 - addsd 8(%rcx,%rax,8), %xmm4 - movb %dl, %cl - shlb $7, %cl - movsd %xmm4, -48(%rsp) - movb -49(%rsp), %al - andb $127, %al - orb %cl, %al - movb %al, -49(%rsp) - movsd -56(%rsp), %xmm7 - movaps %xmm7, %xmm5 - addsd %xmm7, %xmm8 - movb -41(%rsp), %r8b - movb %r8b, %r9b - shrb $7, %r8b - subsd %xmm8, %xmm5 - movaps %xmm8, %xmm6 - addsd %xmm5, %xmm12 - addsd %xmm5, %xmm6 - xorb %r8b, %dl - andb $127, %r9b - shlb $7, %dl - subsd %xmm6, %xmm7 - movsd %xmm8, -56(%rsp) - addsd %xmm7, %xmm12 - orb %dl, %r9b - movb %r9b, -41(%rsp) - movsd -48(%rsp), %xmm9 - movb -49(%rsp), %dl - movb %dl, %al - shrb $7, %dl - addsd %xmm12, %xmm9 - movsd %xmm12, -32(%rsp) - addsd %xmm13, %xmm9 - movsd %xmm9, -48(%rsp) - xorb %sil, %dl - movb -41(%rsp), %cl - movb %cl, %r8b - shrb $7, %cl - andb $127, %al - shlb $7, %dl - xorb %sil, %cl - andb $127, %r8b - shlb $7, %cl - orb %dl, %al - orb %cl, %r8b - movb %al, -49(%rsp) - movb %r8b, -41(%rsp) - movq -56(%rsp), %rsi - movq -48(%rsp), %rax - movq %rsi, (%rdi) - movq %rax, 8(%rdi) - xorl %eax, %eax - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.20: - movaps %xmm14, %xmm0 - lea 1872+_dAtan2Tab(%rip), %rax - mulsd %xmm14, %xmm0 - lea 1864+_dAtan2Tab(%rip), %rcx - movsd (%rax), %xmm3 - lea 1856+_dAtan2Tab(%rip), %r8 - mulsd %xmm0, %xmm3 - lea 1848+_dAtan2Tab(%rip), %r9 - lea 1840+_dAtan2Tab(%rip), %r10 - addsd (%rcx), %xmm3 - mulsd %xmm0, %xmm3 - lea 1832+_dAtan2Tab(%rip), %r11 - movaps %xmm11, %xmm6 - movb %dl, %al - mulsd %xmm14, %xmm6 - addsd (%r8), %xmm3 - shlb $7, %al - mulsd %xmm0, %xmm3 - movaps %xmm6, %xmm2 - subsd %xmm14, %xmm2 - addsd (%r9), %xmm3 - subsd %xmm2, %xmm6 - mulsd %xmm0, %xmm3 - subsd %xmm6, %xmm14 - addsd (%r10), %xmm3 - addsd %xmm14, %xmm1 - mulsd %xmm0, %xmm3 - lea 1824+_dAtan2Tab(%rip), %r13 - addsd (%r11), %xmm3 - mulsd %xmm0, %xmm3 - movaps %xmm6, %xmm5 - movaps %xmm12, %xmm9 - addsd (%r13), %xmm3 - mulsd %xmm0, %xmm3 - mulsd %xmm3, %xmm11 - movaps %xmm11, %xmm14 - subsd %xmm3, %xmm14 - subsd %xmm14, %xmm11 - movaps %xmm11, %xmm4 - subsd %xmm11, %xmm3 - mulsd %xmm6, %xmm4 - mulsd %xmm1, %xmm11 - addsd %xmm4, %xmm5 - movaps %xmm3, %xmm7 - mulsd %xmm1, %xmm7 - mulsd %xmm6, %xmm3 - addsd %xmm11, %xmm7 - movaps %xmm4, %xmm11 - addsd %xmm3, %xmm7 - subsd %xmm5, %xmm11 - movsd %xmm5, -56(%rsp) - addsd %xmm11, %xmm6 - addsd %xmm5, %xmm11 - movb -49(%rsp), %cl - subsd %xmm11, %xmm4 - andb $127, %cl - addsd %xmm4, %xmm6 - orb %al, %cl - addsd %xmm6, %xmm1 - movb %cl, -49(%rsp) - addsd %xmm7, %xmm1 - movsd -56(%rsp), %xmm8 - movaps %xmm8, %xmm10 - addsd %xmm8, %xmm9 - movsd %xmm1, -48(%rsp) - movaps %xmm9, %xmm1 - movb -41(%rsp), %r8b - movb %r8b, %r9b - shrb $7, %r8b - subsd %xmm9, %xmm10 - movsd %xmm9, -56(%rsp) - addsd %xmm10, %xmm1 - addsd %xmm12, %xmm10 - subsd %xmm1, %xmm8 - xorb %r8b, %dl - andb $127, %r9b - shlb $7, %dl - addsd %xmm8, %xmm10 - movsd %xmm10, -32(%rsp) - orb %dl, %r9b - movb %r9b, -41(%rsp) - movsd -48(%rsp), %xmm12 - movb -49(%rsp), %dl - movb %dl, %al - shrb $7, %dl - addsd %xmm10, %xmm12 - addsd %xmm13, %xmm12 - movsd %xmm12, -48(%rsp) - xorb %sil, %dl - movb -41(%rsp), %cl - movb %cl, %r8b - shrb $7, %cl - andb $127, %al - shlb $7, %dl - xorb %sil, %cl - andb $127, %r8b - shlb $7, %cl - orb %dl, %al - orb %cl, %r8b - movb %al, -49(%rsp) - movb %r8b, -41(%rsp) - movq -56(%rsp), %rsi - movq -48(%rsp), %rax - movq %rsi, (%rdi) - movq %rax, 8(%rdi) - xorl %eax, %eax - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.21: - subl %r10d, %r11d - cmpl $74, %r11d - jge ..B1.23 -..B1.22: - divsd %xmm4, %xmm3 - lea 1944+_dAtan2Tab(%rip), %rax - lea 1936+_dAtan2Tab(%rip), %rdx - movsd %xmm3, -32(%rsp) - movsd (%rax), %xmm0 - xorl %eax, %eax - movq (%rdx), %rcx - subsd %xmm3, %xmm0 - movq %rcx, (%rdi) - shrq $56, %rcx - movsd %xmm0, 8(%rdi) - movb 15(%rdi), %r9b - movb %cl, %r8b - shrb $7, %cl - movb %r9b, %r10b - shrb $7, %r9b - xorb %sil, %cl - xorb %sil, %r9b - shlb $7, %cl - andb $127, %r8b - shlb $7, %r9b - andb $127, %r10b - orb %cl, %r8b - orb %r9b, %r10b - movb %r8b, 7(%rdi) - movb %r10b, 15(%rdi) - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.23: - lea 1936+_dAtan2Tab(%rip), %rax - lea 1944+_dAtan2Tab(%rip), %rdx - movq (%rax), %rcx - xorl %eax, %eax - movq (%rdx), %r9 - movq %rcx, (%rdi) - movq %r9, 8(%rdi) - shrq $56, %rcx - shrq $56, %r9 - movb %cl, %r8b - shrb $7, %cl - movb %r9b, %r10b - shrb $7, %r9b - xorb %sil, %cl - xorb %sil, %r9b - shlb $7, %cl - andb $127, %r8b - shlb $7, %r9b - andb $127, %r10b - orb %cl, %r8b - orb %r9b, %r10b - movb %r8b, 7(%rdi) - movb %r10b, 15(%rdi) - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.24: - testb %dl, %dl - jne ..B1.26 -..B1.25: - lea 2016+_dAtan2Tab(%rip), %rdx - lea 1888+_dAtan2Tab(%rip), %rcx - movsd -24(%rsp), %xmm8 - movaps %xmm8, %xmm7 - movsd -16(%rsp), %xmm3 - movsd (%rdx), %xmm10 - movaps %xmm3, %xmm2 - mulsd %xmm10, %xmm7 - mulsd %xmm10, %xmm2 - movaps %xmm7, %xmm0 - movsd (%rcx), %xmm4 - subsd %xmm8, %xmm0 - movaps %xmm4, %xmm5 - subsd %xmm0, %xmm7 - subsd %xmm7, %xmm8 - addsd %xmm6, %xmm8 - movaps %xmm2, %xmm6 - subsd %xmm3, %xmm6 - movaps %xmm8, %xmm11 - subsd %xmm6, %xmm2 - subsd %xmm2, %xmm3 - addsd %xmm9, %xmm3 - movaps %xmm4, %xmm9 - divsd %xmm2, %xmm9 - mulsd %xmm9, %xmm10 - movaps %xmm10, %xmm1 - subsd %xmm9, %xmm1 - subsd %xmm1, %xmm10 - mulsd %xmm10, %xmm2 - movaps %xmm10, %xmm13 - mulsd %xmm10, %xmm3 - mulsd %xmm7, %xmm13 - subsd %xmm2, %xmm5 - movsd %xmm10, -56(%rsp) - subsd %xmm3, %xmm5 - addsd %xmm5, %xmm4 - mulsd %xmm4, %xmm5 - mulsd %xmm10, %xmm5 - mulsd %xmm8, %xmm10 - mulsd %xmm5, %xmm11 - mulsd %xmm5, %xmm7 - movsd %xmm5, -48(%rsp) - addsd %xmm7, %xmm11 - addsd %xmm10, %xmm11 - movaps %xmm11, %xmm12 - addsd %xmm13, %xmm12 - movsd %xmm12, (%rdi) - subsd %xmm12, %xmm13 - movsd %xmm13, -32(%rsp) - addsd %xmm11, %xmm13 - movsd %xmm13, 8(%rdi) - movb 7(%rdi), %r8b - movb %r8b, %r9b - movb 15(%rdi), %r10b - movb %r10b, %r11b - shrb $7, %r8b - andb $127, %r9b - shrb $7, %r10b - movsd %xmm12, -40(%rsp) - xorb %sil, %r8b - xorb %sil, %r10b - shlb $7, %r8b - andb $127, %r11b - shlb $7, %r10b - orb %r8b, %r9b - orb %r10b, %r11b - movb %r9b, 7(%rdi) - movb %r11b, 15(%rdi) - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.26: - lea 1952+_dAtan2Tab(%rip), %rax - lea 1960+_dAtan2Tab(%rip), %rdx - movq (%rax), %rcx - xorl %eax, %eax - movq (%rdx), %r9 - movq %rcx, (%rdi) - movq %r9, 8(%rdi) - shrq $56, %rcx - shrq $56, %r9 - movb %cl, %r8b - shrb $7, %cl - movb %r9b, %r10b - shrb $7, %r9b - xorb %sil, %cl - xorb %sil, %r9b - shlb $7, %cl - andb $127, %r8b - shlb $7, %r9b - andb $127, %r10b - orb %cl, %r8b - orb %r9b, %r10b - movb %r8b, 7(%rdi) - movb %r10b, 15(%rdi) - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.27: - testl %r11d, %r11d - jne ..B1.23 -..B1.28: - testl $1048575, 4(%r9) - jne ..B1.23 - jmp ..B1.57 -..B1.29: - jne ..B1.23 -..B1.31: - testb %dl, %dl - jne ..B1.26 -..B1.32: - lea 1992+_dAtan2Tab(%rip), %rax - movq (%rax), %rdx - xorl %eax, %eax - movq %rdx, (%rdi) - movq %rdx, 8(%rdi) - shrq $56, %rdx - movb %dl, %cl - shrb $7, %dl - andb $127, %cl - xorb %sil, %dl - shlb $7, %dl - orb %dl, %cl - movb %cl, 7(%rdi) - movb %cl, 15(%rdi) - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.34: - je ..B1.51 -..B1.56: - cmpl $2047, %r10d -..B1.35: - je ..B1.48 -..B1.36: - jl ..B1.23 -..B1.38: - cmpl $2047, %r11d - jge ..B1.42 -..B1.39: - testb %dl, %dl - je ..B1.32 - jmp ..B1.26 -..B1.42: - testb %dl, %dl - jne ..B1.44 -..B1.43: - lea 1920+_dAtan2Tab(%rip), %rax - lea 1928+_dAtan2Tab(%rip), %rdx - movq (%rax), %rcx - xorl %eax, %eax - movq (%rdx), %r9 - movq %rcx, (%rdi) - movq %r9, 8(%rdi) - shrq $56, %rcx - shrq $56, %r9 - movb %cl, %r8b - shrb $7, %cl - movb %r9b, %r10b - shrb $7, %r9b - xorb %sil, %cl - xorb %sil, %r9b - shlb $7, %cl - andb $127, %r8b - shlb $7, %r9b - andb $127, %r10b - orb %cl, %r8b - orb %r9b, %r10b - movb %r8b, 7(%rdi) - movb %r10b, 15(%rdi) - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.44: - lea 1968+_dAtan2Tab(%rip), %rax - lea 1976+_dAtan2Tab(%rip), %rdx - movq (%rax), %rcx - xorl %eax, %eax - movq (%rdx), %r9 - movq %rcx, (%rdi) - movq %r9, 8(%rdi) - shrq $56, %rcx - shrq $56, %r9 - movb %cl, %r8b - shrb $7, %cl - movb %r9b, %r10b - shrb $7, %r9b - xorb %sil, %cl - xorb %sil, %r9b - shlb $7, %cl - andb $127, %r8b - shlb $7, %r9b - andb $127, %r10b - orb %cl, %r8b - orb %r9b, %r10b - movb %r8b, 7(%rdi) - movb %r10b, 15(%rdi) -..B1.45: - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.46: - lea 2000+_dAtan2Tab(%rip), %rax - movl $-1022, %r8d - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm9 - movsd %xmm2, -16(%rsp) - jmp ..B1.13 -..B1.47: - lea 2000+_dAtan2Tab(%rip), %rax - movaps %xmm4, %xmm0 - movl $-1022, %r9d - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm6 - movsd %xmm0, -24(%rsp) - jmp ..B1.11 -..B1.48: - testl $1048575, 4(%rax) - jne ..B1.50 -..B1.49: - cmpl $0, (%rax) - je ..B1.38 -..B1.50: - movsd (%r9), %xmm0 - addsd (%rax), %xmm0 - lea 1992+_dAtan2Tab(%rip), %rax - movq (%rax), %rdx - xorl %eax, %eax - movsd %xmm0, (%rdi) - movq %rdx, 8(%rdi) - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 -..B1.51: - testl $1048575, 4(%r9) - jne ..B1.50 -..B1.52: - cmpl $0, (%r9) - jne ..B1.50 -..B1.55: - cmpl $2047, %r10d - je ..B1.48 - jmp ..B1.36 -..B1.57: - cmpl $0, (%r9) - jne ..B1.23 - jmp ..B1.31 - .align 16,0x90 - .cfi_endproc - .type __libm_atan2_k64,@function - .size __libm_atan2_k64,.-__libm_atan2_k64 - .data -# -- End __libm_atan2_k64 - .section .rodata, "a" - .align 16 - .align 16 -_dAtan2Tab: - .long 3892314112 - .long 1069799150 - .long 2332892550 - .long 1039715405 - .long 1342177280 - .long 1070305495 - .long 270726690 - .long 1041535749 - .long 939524096 - .long 1070817911 - .long 2253973841 - .long 3188654726 - .long 3221225472 - .long 1071277294 - .long 3853927037 - .long 1043226911 - .long 2818572288 - .long 1071767563 - .long 2677759107 - .long 1044314101 - .long 3355443200 - .long 1072103591 - .long 1636578514 - .long 3191094734 - .long 1476395008 - .long 1072475260 - .long 1864703685 - .long 3188646936 - .long 805306368 - .long 1072747407 - .long 192551812 - .long 3192726267 - .long 2013265920 - .long 1072892781 - .long 2240369452 - .long 1043768538 - .long 0 - .long 1072999953 - .long 3665168337 - .long 3192705970 - .long 402653184 - .long 1073084787 - .long 1227953434 - .long 3192313277 - .long 2013265920 - .long 1073142981 - .long 3853283127 - .long 1045277487 - .long 805306368 - .long 1073187261 - .long 1676192264 - .long 3192868861 - .long 134217728 - .long 1073217000 - .long 4290763938 - .long 1042034855 - .long 671088640 - .long 1073239386 - .long 994303084 - .long 3189643768 - .long 402653184 - .long 1073254338 - .long 1878067156 - .long 1042652475 - .long 1610612736 - .long 1073265562 - .long 670314820 - .long 1045138554 - .long 3221225472 - .long 1073273048 - .long 691126919 - .long 3189987794 - .long 3489660928 - .long 1073278664 - .long 1618990832 - .long 3188194509 - .long 1207959552 - .long 1073282409 - .long 2198872939 - .long 1044806069 - .long 3489660928 - .long 1073285217 - .long 2633982383 - .long 1042307894 - .long 939524096 - .long 1073287090 - .long 1059367786 - .long 3189114230 - .long 2281701376 - .long 1073288494 - .long 3158525533 - .long 1044484961 - .long 3221225472 - .long 1073289430 - .long 286581777 - .long 1044893263 - .long 4026531840 - .long 1073290132 - .long 2000245215 - .long 3191647611 - .long 134217728 - .long 1073290601 - .long 4205071590 - .long 1045035927 - .long 536870912 - .long 1073290952 - .long 2334392229 - .long 1043447393 - .long 805306368 - .long 1073291186 - .long 2281458177 - .long 3188885569 - .long 3087007744 - .long 1073291361 - .long 691611507 - .long 1044733832 - .long 3221225472 - .long 1073291478 - .long 1816229550 - .long 1044363390 - .long 2281701376 - .long 1073291566 - .long 1993843750 - .long 3189837440 - .long 134217728 - .long 1073291625 - .long 3654754496 - .long 1044970837 - .long 4026531840 - .long 1073291668 - .long 3224300229 - .long 3191935390 - .long 805306368 - .long 1073291698 - .long 2988777976 - .long 3188950659 - .long 536870912 - .long 1073291720 - .long 1030371341 - .long 1043402665 - .long 3221225472 - .long 1073291734 - .long 1524463765 - .long 1044361356 - .long 3087007744 - .long 1073291745 - .long 2754295320 - .long 1044731036 - .long 134217728 - .long 1073291753 - .long 3099629057 - .long 1044970710 - .long 2281701376 - .long 1073291758 - .long 962914160 - .long 3189838838 - .long 805306368 - .long 1073291762 - .long 3543908206 - .long 3188950786 - .long 4026531840 - .long 1073291764 - .long 1849909620 - .long 3191935434 - .long 3221225472 - .long 1073291766 - .long 1641333636 - .long 1044361352 - .long 536870912 - .long 1073291768 - .long 1373968792 - .long 1043402654 - .long 134217728 - .long 1073291769 - .long 2033191599 - .long 1044970710 - .long 3087007744 - .long 1073291769 - .long 4117947437 - .long 1044731035 - .long 805306368 - .long 1073291770 - .long 315378368 - .long 3188950787 - .long 2281701376 - .long 1073291770 - .long 2428571750 - .long 3189838838 - .long 3221225472 - .long 1073291770 - .long 1608007466 - .long 1044361352 - .long 4026531840 - .long 1073291770 - .long 1895711420 - .long 3191935434 - .long 134217728 - .long 1073291771 - .long 2031108713 - .long 1044970710 - .long 536870912 - .long 1073291771 - .long 1362518342 - .long 1043402654 - .long 805306368 - .long 1073291771 - .long 317461253 - .long 3188950787 - .long 939524096 - .long 1073291771 - .long 4117231784 - .long 1044731035 - .long 1073741824 - .long 1073291771 - .long 1607942376 - .long 1044361352 - .long 1207959552 - .long 1073291771 - .long 2428929577 - .long 3189838838 - .long 1207959552 - .long 1073291771 - .long 2031104645 - .long 1044970710 - .long 1342177280 - .long 1073291771 - .long 1895722602 - .long 3191935434 - .long 1342177280 - .long 1073291771 - .long 317465322 - .long 3188950787 - .long 1342177280 - .long 1073291771 - .long 1362515546 - .long 1043402654 - .long 1342177280 - .long 1073291771 - .long 1607942248 - .long 1044361352 - .long 1342177280 - .long 1073291771 - .long 4117231610 - .long 1044731035 - .long 1342177280 - .long 1073291771 - .long 2031104637 - .long 1044970710 - .long 1342177280 - .long 1073291771 - .long 1540251232 - .long 1045150466 - .long 1342177280 - .long 1073291771 - .long 2644671394 - .long 1045270303 - .long 1342177280 - .long 1073291771 - .long 2399244691 - .long 1045360181 - .long 1342177280 - .long 1073291771 - .long 803971124 - .long 1045420100 - .long 1476395008 - .long 1073291771 - .long 3613709523 - .long 3192879152 - .long 1476395008 - .long 1073291771 - .long 2263862659 - .long 3192849193 - .long 1476395008 - .long 1073291771 - .long 177735686 - .long 3192826724 - .long 1476395008 - .long 1073291771 - .long 1650295902 - .long 3192811744 - .long 1476395008 - .long 1073291771 - .long 2754716064 - .long 3192800509 - .long 1476395008 - .long 1073291771 - .long 3490996172 - .long 3192793019 - .long 1476395008 - .long 1073291771 - .long 1895722605 - .long 3192787402 - .long 1476395008 - .long 1073291771 - .long 2263862659 - .long 3192783657 - .long 1476395008 - .long 1073291771 - .long 3613709523 - .long 3192780848 - .long 1476395008 - .long 1073291771 - .long 1650295902 - .long 3192778976 - .long 1476395008 - .long 1073291771 - .long 177735686 - .long 3192777572 - .long 1476395008 - .long 1073291771 - .long 3490996172 - .long 3192776635 - .long 1476395008 - .long 1073291771 - .long 2754716064 - .long 3192775933 - .long 1476395008 - .long 1073291771 - .long 2263862659 - .long 3192775465 - .long 1476395008 - .long 1073291771 - .long 1895722605 - .long 3192775114 - .long 1476395008 - .long 1073291771 - .long 1650295902 - .long 3192774880 - .long 1476395008 - .long 1073291771 - .long 3613709523 - .long 3192774704 - .long 1476395008 - .long 1073291771 - .long 3490996172 - .long 3192774587 - .long 1476395008 - .long 1073291771 - .long 177735686 - .long 3192774500 - .long 1476395008 - .long 1073291771 - .long 2263862659 - .long 3192774441 - .long 1476395008 - .long 1073291771 - .long 2754716064 - .long 3192774397 - .long 1476395008 - .long 1073291771 - .long 1650295902 - .long 3192774368 - .long 1476395008 - .long 1073291771 - .long 1895722605 - .long 3192774346 - .long 1476395008 - .long 1073291771 - .long 3490996172 - .long 3192774331 - .long 1476395008 - .long 1073291771 - .long 3613709523 - .long 3192774320 - .long 1476395008 - .long 1073291771 - .long 2263862659 - .long 3192774313 - .long 1476395008 - .long 1073291771 - .long 177735686 - .long 3192774308 - .long 1476395008 - .long 1073291771 - .long 1650295902 - .long 3192774304 - .long 1476395008 - .long 1073291771 - .long 2754716064 - .long 3192774301 - .long 1476395008 - .long 1073291771 - .long 3490996172 - .long 3192774299 - .long 1476395008 - .long 1073291771 - .long 1895722605 - .long 3192774298 - .long 1476395008 - .long 1073291771 - .long 2263862659 - .long 3192774297 - .long 1476395008 - .long 1073291771 - .long 3613709523 - .long 3192774296 - .long 1476395008 - .long 1073291771 - .long 1650295902 - .long 3192774296 - .long 1476395008 - .long 1073291771 - .long 177735686 - .long 3192774296 - .long 1476395008 - .long 1073291771 - .long 3490996172 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 2754716064 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 2263862659 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1895722605 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1650295902 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1466225875 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1343512524 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1251477510 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1190120835 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1144103328 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1113424990 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1090416237 - .long 3192774295 - .long 1476395008 - .long 1073291771 - .long 1075077068 - .long 3192774295 - .long 1431655765 - .long 3218429269 - .long 2576978363 - .long 1070176665 - .long 2453154343 - .long 3217180964 - .long 4189149139 - .long 1069314502 - .long 1775019125 - .long 3216459198 - .long 273199057 - .long 1068739452 - .long 874748308 - .long 3215993277 - .long 0 - .long 1069547520 - .long 0 - .long 1072693248 - .long 0 - .long 1073741824 - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .long 1413754136 - .long 1072243195 - .long 856972295 - .long 1015129638 - .long 1413754136 - .long 1073291771 - .long 856972295 - .long 1016178214 - .long 1413754136 - .long 1074340347 - .long 856972295 - .long 1017226790 - .long 2134057426 - .long 1073928572 - .long 1285458442 - .long 1016756537 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 2144337920 - .long 0 - .long 1048576 - .long 33554432 - .long 1101004800 - .type _dAtan2Tab,@object - .size _dAtan2Tab,2024 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_atan2l_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_atan2l_k80.S deleted file mode 100644 index 65952a4d34..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_atan2l_k80.S +++ /dev/null @@ -1,1835 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_atan2l_k80.c" - .text -..TXTST0: -# -- Begin __libm_atan2l_k80 - .text - .align 16,0x90 - .globl __libm_atan2l_k80 -__libm_atan2l_k80: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -..B1.1: - .cfi_startproc -..___tag_value___libm_atan2l_k80.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $224, %rsp - .cfi_def_cfa_offset 272 - movq %rdi, %r15 - movb 9(%rsi), %cl - andb $-128, %cl - shrb $7, %cl - movzbl 9(%rdx), %r14d - movzwl 8(%rsi), %ebp - andl $128, %r14d - andl $32767, %ebp - movq %fs:40, %rax - movzbl %cl, %ebx - xorq %rsp, %rax - movzwl 8(%rdx), %ecx - shrl $7, %r14d - andl $32767, %ecx - movq %rax, 208(%rsp) - cmpl $32767, %ebp - je ..B1.104 -..B1.2: - cmpl $32767, %ecx - je ..B1.92 -..B1.3: - cmpq $0, (%rsi) - jne ..B1.11 -..B1.4: - cmpq $0, (%rdx) - jne ..B1.8 -..B1.5: - movl $0, 32(%r15) - testl %r14d, %r14d - je ..B1.7 -..B1.6: - shlq $4, %rbx - lea _pilo_00l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_00l(%rip), %rax - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) - jmp ..B1.13 -..B1.7: - shlq $4, %rbx - lea zeros(%rip), %rax - lea ones(%rip), %rdx - fldt (%rax) - fstpt 16(%r15) - fldt 16(%r15) - fldt (%rdx,%rbx) - fmulp %st, %st(1) - fstpt (%r15) - jmp ..B1.13 -..B1.8: - movl $0, 32(%r15) - testl %r14d, %r14d - je ..B1.10 -..B1.9: - shlq $4, %rbx - lea _pilo_00l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_00l(%rip), %rax - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) - jmp ..B1.13 -..B1.10: - shlq $4, %rbx - lea zeros(%rip), %rax - lea ones(%rip), %rdx - fldt (%rax) - fstpt 16(%r15) - fldt 16(%r15) - fldt (%rdx,%rbx) - fmulp %st, %st(1) - fstpt (%r15) - jmp ..B1.13 -..B1.11: - cmpq $0, (%rdx) - jne ..B1.15 -..B1.12: - shlq $4, %rbx - lea _pilo_02l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_02l(%rip), %rax - movl $0, 32(%r15) - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) -..B1.13: - movq 208(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.84 -..B1.14: - addq $224, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 272 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.15: - movq (%rdx), %rax - lea 112(%rsp), %rbp - movq 8(%rdx), %rcx - movq %rbp, %rdi - movq 16(%rdx), %r8 - movq 24(%rdx), %r9 - movq 32(%rdx), %r10 - movq 40(%rdx), %rdx - movq %rax, (%rbp) - movq %rcx, 8(%rbp) - movq %rdx, 40(%rbp) - movq (%rsi), %r11 - movq 8(%rsi), %r13 - movq 16(%rsi), %rax - movq 24(%rsi), %rdx - movq 32(%rsi), %rcx - movq 40(%rsi), %rsi - movq %r8, 16(%rbp) - movq %r9, 24(%rbp) - movq %r10, 32(%rbp) - movq %r11, 48(%rbp) - movq %r13, 56(%rbp) - movq %rax, 64(%rbp) - movq %rdx, 72(%rbp) - movq %rcx, 80(%rbp) - movq %rsi, 88(%rbp) -..___tag_value___libm_atan2l_k80.31: - call __libm_normalizel_k80@PLT -..___tag_value___libm_atan2l_k80.32: -..B1.16: - lea 160(%rsp), %rdi -..___tag_value___libm_atan2l_k80.33: - call __libm_normalizel_k80@PLT -..___tag_value___libm_atan2l_k80.34: -..B1.17: - fldt 112(%rsp) - movq %rbx, %rdx - fld %st(0) - lea ones(%rip), %r13 - fldt 128(%rsp) - movl %r14d, %eax - fadd %st, %st(1) - shlq $4, %rax - fxch %st(1) - fsub %st, %st(2) - shlq $4, %rdx - fxch %st(2) - fsubrp %st, %st(1) - fldt 160(%rsp) - fld %st(0) - fldt 176(%rsp) - movl 144(%rsp), %ecx - fadd %st, %st(1) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fldt (%rax,%r13) - fmul %st, %st(4) - fmulp %st, %st(3) - fldt (%rdx,%r13) - movl 192(%rsp), %eax - cmpl %eax, %ecx - fmul %st, %st(2) - fmul %st, %st(1) - jg ..B1.20 -..B1.18: - jne ..B1.70 -..B1.19: - fxch %st(4) - fcomi %st(2), %st - fxch %st(4) - jbe ..B1.70 -..B1.20: - lea 12(%rax), %edx - cmpl %edx, %ecx - jle ..B1.65 -..B1.21: - lea 75(%rax), %edx - cmpl %edx, %ecx - jle ..B1.38 -..B1.22: - testl %r14d, %r14d - je ..B1.24 -..B1.23: - fstp %st(0) - fstp %st(2) - fstp %st(1) - fstp %st(0) - fstp %st(0) - shlq $4, %rbx - lea _pilo_00l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_00l(%rip), %rax - movl $0, 32(%r15) - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) - jmp ..B1.36 -..B1.24: - fxch %st(2) - fstpt 160(%rsp) - fldt 160(%rsp) - movzwl 168(%rsp), %edx - andl $32767, %edx - fxch %st(4) - fstpt 112(%rsp) - fldt 112(%rsp) - cmpl $8383, %edx - jge ..B1.26 -..B1.25: - fstp %st(4) - fstp %st(3) - fxch %st(2) - fstpt 176(%rsp) - fstpt 128(%rsp) - jmp ..B1.32 -..B1.26: - cmpl $24383, %edx - jg ..B1.25 -..B1.28: - movzwl 120(%rsp), %edx - andl $32767, %edx - cmpl $8383, %edx - jl ..B1.25 -..B1.30: - cmpl $24383, %edx - fxch %st(3) - fxch %st(2) - fxch %st(4) - fxch %st(1) - jle ..B1.35 -..B1.31: - fstp %st(1) - fstp %st(2) - fxch %st(1) - fstpt 176(%rsp) - fstpt 128(%rsp) -..B1.32: - fstpt 64(%rsp) - lea 160(%rsp), %rdi -..___tag_value___libm_atan2l_k80.35: - call __libm_normalizel_k80@PLT -..___tag_value___libm_atan2l_k80.36: -..B1.33: - fldt 64(%rsp) - movq %rbp, %rdi - fstpt 64(%rsp) -..___tag_value___libm_atan2l_k80.37: - call __libm_normalizel_k80@PLT -..___tag_value___libm_atan2l_k80.38: -..B1.34: - fldt 64(%rsp) - fldt 112(%rsp) - fldt 128(%rsp) - fldt 160(%rsp) - fldt 176(%rsp) - movl 144(%rsp), %ecx - movl 192(%rsp), %eax -..B1.35: - fld %st(1) - subl %ecx, %eax - fdiv %st(4), %st - lea _small_value_80(%rip), %rdx - movl %eax, 32(%r15) - lea t32(%rip), %rax - fstpt 16(%rsp) - fldt 16(%rsp) - fxch %st(5) - fstpt 64(%rsp) - fxch %st(3) - fstpt (%rsp) - fldt (%rsp) - fldt (%rax) - fld %st(0) - fmul %st(6), %st - fld %st(0) - fsubr %st(7), %st - faddp %st, %st(1) - fld %st(0) - fsubrp %st, %st(7) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fsub %st(1), %st - faddp %st, %st(1) - fsubr %st, %st(2) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fmul %st(7), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(6) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(5) - fsubrp %st, %st(1) - fsubp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%rsp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(0) - fldt (%rsp) - fdivrp %st, %st(3) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt 64(%rsp) - fmul %st, %st(1) - fxch %st(1) - fstpt (%r15) - fmulp %st, %st(1) - fstpt 16(%r15) - fldt (%r13) - fldt (%rdx) - faddp %st, %st(1) - fstpt 32(%rsp) -..B1.36: - movq 208(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.84 -..B1.37: - addq $224, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 272 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.38: - fldt (%r13) - subl %ecx, %eax - movzwl 8(%r13), %ebx - movl %ebx, %edx - addl $16383, %eax - andl $-32768, %edx - andl $32767, %eax - xorl %ecx, %ecx - fstpt 96(%rsp) - fldt 96(%rsp) - orl %eax, %edx - movw %dx, 104(%rsp) - xorl %edx, %edx - fxch %st(5) - fstpt 112(%rsp) - fldt 112(%rsp) - xorl %esi, %esi - fxch %st(5) - fstpt 48(%rsp) - fldt 96(%rsp) - fmul %st, %st(3) - fxch %st(3) - fstpt 160(%rsp) - fldt 160(%rsp) - movzwl 168(%rsp), %eax - andl $32767, %eax - fxch %st(3) - fmulp %st, %st(2) - testl %r14d, %r14d - je ..B1.52 -..B1.39: - cmpl $8383, %eax - jge ..B1.41 -..B1.40: - fstp %st(2) - fstp %st(3) - movl %edx, 192(%rsp) - movl %edx, 144(%rsp) - fxch %st(2) - fstpt 176(%rsp) - fstpt 128(%rsp) - jmp ..B1.47 -..B1.41: - cmpl $24383, %eax - jg ..B1.40 -..B1.43: - movzwl 120(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.40 -..B1.45: - cmpl $24383, %eax - fxch %st(4) - fxch %st(3) - fxch %st(2) - fxch %st(1) - jle ..B1.50 -..B1.46: - fstp %st(1) - fstp %st(2) - movl %edx, 192(%rsp) - movl %edx, 144(%rsp) - fxch %st(1) - fstpt 176(%rsp) - fstpt 128(%rsp) -..B1.47: - fstpt 64(%rsp) - lea 160(%rsp), %rdi -..___tag_value___libm_atan2l_k80.56: - call __libm_normalizel_k80@PLT -..___tag_value___libm_atan2l_k80.57: -..B1.48: - fldt 64(%rsp) - movq %rbp, %rdi - fstpt 64(%rsp) -..___tag_value___libm_atan2l_k80.58: - call __libm_normalizel_k80@PLT -..___tag_value___libm_atan2l_k80.59: -..B1.49: - fldt 64(%rsp) - fldt 112(%rsp) - fldt 128(%rsp) - fldt 160(%rsp) - fldt 176(%rsp) - movl 144(%rsp), %ecx - movl 192(%rsp), %esi -..B1.50: - fld %st(1) - lea t32(%rip), %rax - fdiv %st(4), %st - subl %ecx, %esi - fstpt 16(%rsp) - fldt 16(%rsp) - addl $16383, %esi - fxch %st(5) - fstpt 64(%rsp) - andl $-32768, %ebx - fxch %st(3) - fstpt (%rsp) - fldt (%rsp) - andl $32767, %esi - fldt (%rax) - orl %esi, %ebx - fld %st(0) - lea 48+_P(%rip), %rdx - fmul %st(6), %st - lea 16+_P(%rip), %rcx - fld %st(0) - lea _P(%rip), %rbp - movq __libm_atanl_table_128@GOTPCREL(%rip), %rsi - fsubr %st(7), %st - faddp %st, %st(1) - fld %st(0) - fsubrp %st, %st(7) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fsub %st(1), %st - faddp %st, %st(1) - fsubr %st, %st(2) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fmul %st(7), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(6) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(5) - fsubrp %st, %st(1) - fsubp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%rsp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fldt (%rsp) - fdivrp %st, %st(2) - faddp %st, %st(1) - fldt 48(%rsp) - fstpt 96(%rsp) - fldt (%rdx) - fldt (%rcx) - fldt (%rbp) - movw %bx, 104(%rsp) - lea 32+_P(%rip), %rbx - fldt 96(%rsp) - fmulp %st, %st(4) - fld %st(3) - fmul %st(4), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(4) - fstpt 96(%rsp) - fldt 96(%rsp) - fldt (%rbx) - fmulp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fldl 8192(%rsi) - fldl 8200(%rsi) - movl $0, 32(%r15) - fsubp %st, %st(2) - fldt 64(%rsp) - fmul %st, %st(1) - fld %st(1) - fxch %st(1) - fmulp %st, %st(3) - fadd %st(2), %st - fstpt (%r15) - fldt (%r15) - fsubp %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%r15) - movq 208(%rsp), %rdi - xorq %rsp, %rdi - cmpq %fs:40, %rdi - jne ..B1.84 -..B1.51: - addq $224, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 272 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.52: - cmpl $8383, %eax - jge ..B1.54 -..B1.53: - fstp %st(2) - fstp %st(3) - movl %edx, 192(%rsp) - movl %edx, 144(%rsp) - fxch %st(2) - fstpt 176(%rsp) - fstpt 128(%rsp) - jmp ..B1.60 -..B1.54: - cmpl $24383, %eax - jg ..B1.53 -..B1.56: - movzwl 120(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.53 -..B1.58: - cmpl $24383, %eax - fxch %st(4) - fxch %st(3) - fxch %st(2) - fxch %st(1) - jle ..B1.63 -..B1.59: - fstp %st(1) - fstp %st(2) - movl %edx, 192(%rsp) - movl %edx, 144(%rsp) - fxch %st(1) - fstpt 176(%rsp) - fstpt 128(%rsp) -..B1.60: - fstpt 64(%rsp) - lea 160(%rsp), %rdi -..___tag_value___libm_atan2l_k80.77: - call __libm_normalizel_k80@PLT -..___tag_value___libm_atan2l_k80.78: -..B1.61: - fldt 64(%rsp) - movq %rbp, %rdi - fstpt 64(%rsp) -..___tag_value___libm_atan2l_k80.79: - call __libm_normalizel_k80@PLT -..___tag_value___libm_atan2l_k80.80: -..B1.62: - fldt 64(%rsp) - fldt 112(%rsp) - fldt 128(%rsp) - fldt 160(%rsp) - fldt 176(%rsp) - movl 144(%rsp), %ecx - movl 192(%rsp), %esi -..B1.63: - fld %st(1) - lea t32(%rip), %rax - fdiv %st(4), %st - subl %ecx, %esi - fstpt 16(%rsp) - fldt 16(%rsp) - addl $16383, %esi - fxch %st(5) - fstpt 64(%rsp) - andl $-32768, %ebx - fxch %st(3) - fstpt (%rsp) - fldt (%rsp) - andl $32767, %esi - fldt (%rax) - orl %esi, %ebx - fld %st(0) - lea 48+_P(%rip), %rdx - fmul %st(6), %st - lea 16+_P(%rip), %rcx - fld %st(0) - lea _P(%rip), %rbp - movl $0, 32(%r15) - fsubr %st(7), %st - faddp %st, %st(1) - fld %st(0) - fsubrp %st, %st(7) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fsub %st(1), %st - faddp %st, %st(1) - fsubr %st, %st(2) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fmul %st(7), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(6) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(5) - fsubrp %st, %st(1) - fsubp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%rsp) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fldt (%rsp) - fdivrp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt 48(%rsp) - fstpt 96(%rsp) - fldt (%rdx) - fldt (%rcx) - fldt (%rbp) - movw %bx, 104(%rsp) - lea 32+_P(%rip), %rbx - fldt 96(%rsp) - fmul %st, %st(4) - fmul %st, %st(4) - fld %st(4) - fmul %st(5), %st - fld %st(0) - fmul %st(1), %st - fmul %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fxch %st(1) - fmul %st, %st(6) - fmulp %st, %st(6) - fxch %st(4) - fstpt 96(%rsp) - fldt 96(%rsp) - fldt (%rbx) - fmulp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(2) - fldt 64(%rsp) - fmul %st, %st(1) - fxch %st(1) - fstpt (%r15) - fmulp %st, %st(1) - fstpt 16(%r15) - movq 208(%rsp), %rsi - xorq %rsp, %rsi - cmpq %fs:40, %rsi - jne ..B1.84 -..B1.64: - addq $224, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 272 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.65: - fldt (%r13) - subl %ecx, %eax - addl $16383, %eax - lea _TWO_63H(%rip), %rcx - movzwl 8(%r13), %edx - andl $32767, %eax - andl $-32768, %edx - lea _TWO_48H(%rip), %rbx - fstpt 96(%rsp) - fldt 96(%rsp) - orl %eax, %edx - movw %dx, 104(%rsp) - fld %st(5) - fxch %st(1) - fstpt (%rsp) - lea 16+ones(%rip), %rbp - fxch %st(1) - fstpt 64(%rsp) - lea 48+_P(%rip), %rsi - fxch %st(4) - fstpt 112(%rsp) - fldt 112(%rsp) - lea 32+_P(%rip), %r8 - fxch %st(3) - fstpt 128(%rsp) - fldt 128(%rsp) - lea 16+_P(%rip), %rdi - fldt 96(%rsp) - lea _P(%rip), %r9 - fmul %st, %st(3) - xorl %eax, %eax - fxch %st(3) - fstpt 160(%rsp) - fldt 160(%rsp) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpt 176(%rsp) - fldt 176(%rsp) - fldt .L_2il0floatpacket.11(%rip) - fmul %st(3), %st - fdiv %st(4), %st - fldt .L_2il0floatpacket.12(%rip) - movl %eax, 144(%rsp) - movl %eax, 192(%rsp) - fxch %st(1) - faddl (%rcx) - fstpt 80(%rsp) - fldt 80(%rsp) - fldl (%rbx) - movslq 80(%rsp), %rdx - shlq $4, %rdx - fxch %st(1) - fsubl (%rcx) - fmulp %st, %st(2) - fld %st(5) - fmul %st(1), %st - testl %r14d, %r14d - fadd %st, %st(7) - fxch %st(7) - fstpt 80(%rsp) - fldt 80(%rsp) - fsubp %st, %st(7) - fxch %st(5) - fsub %st(6), %st - faddp %st, %st(3) - fld %st(4) - fmul %st(4), %st - fld %st(0) - fadd %st(5), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fsubp %st, %st(1) - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fld %st(3) - fmul %st(1), %st - fadd %st(3), %st - fld %st(2) - fmul %st(2), %st - fadd %st(7), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - fsubrp %st, %st(5) - fxch %st(3) - fmulp %st, %st(6) - fxch %st(5) - fsubrp %st, %st(1) - fld %st(4) - fadd %st(2), %st - fldt (%rsp) - fdivp %st, %st(1) - fmul %st, %st(4) - fld %st(4) - fadd %st(1), %st - fstpt 80(%rsp) - fxch %st(4) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(2) - fmul %st(4), %st - fldt 80(%rsp) - fsubp %st, %st(3) - fld %st(2) - fsubr %st(5), %st - fld %st(6) - fmul %st(1), %st - faddp %st, %st(2) - fxch %st(3) - fmul %st, %st(6) - fldt (%rbp) - faddp %st, %st(7) - fxch %st(1) - faddp %st, %st(6) - fxch %st(5) - fmulp %st, %st(4) - fxch %st(3) - fsubrp %st, %st(1) - fld %st(3) - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fld %st(1) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(2) - fmul %st(3), %st - fxch %st(2) - fadd %st(3), %st - fld %st(1) - fmul %st(1), %st - faddp %st, %st(3) - fld %st(3) - fmul %st(4), %st - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fldt (%rsi) - fmul %st(1), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - fmulp %st, %st(2) - fldt (%r9) - faddp %st, %st(2) - fxch %st(4) - fmulp %st, %st(1) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 64(%rsp) - je ..B1.67 -..B1.66: - negq %rdx - fld %st(2) - movq __libm_atanl_table_128@GOTPCREL(%rip), %rax - fldl 8192(%rax,%rdx) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fxch %st(3) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl 8200(%rax,%rdx) - fsubp %st, %st(3) - faddp %st, %st(2) - jmp ..B1.68 -..B1.67: - movq __libm_atanl_table_128@GOTPCREL(%rip), %rax - fld %st(2) - fldl (%rdx,%rax) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(4) - fxch %st(3) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl 8(%rdx,%rax) - faddp %st, %st(3) - faddp %st, %st(2) -..B1.68: - fmul %st, %st(2) - fld %st(2) - fxch %st(2) - fmulp %st, %st(1) - movl $0, 32(%r15) - fadd %st, %st(1) - fxch %st(1) - fstpt (%r15) - fldt (%r15) - fsubp %st, %st(2) - fsubp %st, %st(1) - fstpt 16(%r15) - movq 208(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.84 -..B1.69: - addq $224, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 272 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.70: - lea 12(%rcx), %edx - cmpl %edx, %eax - jle ..B1.79 -..B1.71: - fstp %st(3) - fstp %st(0) - lea 75(%rcx), %edx - cmpl %edx, %eax - jg ..B1.77 -..B1.72: - fldt (%r13) - subl %ecx, %eax - addl $16383, %eax - lea 32+_P(%rip), %rbx - movzwl 8(%r13), %edx - andl $32767, %eax - andl $-32768, %edx - lea 16+_P(%rip), %rcx - fstpt 96(%rsp) - orl %eax, %edx - movw %dx, 104(%rsp) - lea 48+_P(%rip), %rax - fldt 96(%rsp) - lea _P(%rip), %rbp - fmulp %st, %st(1) - testl %r14d, %r14d - fdivrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fmul %st(1), %st - fldt (%rax) - fmul %st(1), %st - fldt (%rcx) - movq __libm_atanl_table_128@GOTPCREL(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rbx) - fmulp %st, %st(2) - fldt (%rbp) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(2) - fldl 4096(%rsi) - fmul %st(1), %st - fldl 4104(%rsi) - movl $0, 32(%r15) - je ..B1.74 -..B1.73: - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - jmp ..B1.75 -..B1.74: - fsubp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) -..B1.75: - fld %st(0) - fadd %st(2), %st - fstpt (%r15) - fldt (%r15) - fsubp %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%r15) - movq 208(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.84 -..B1.76: - addq $224, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 272 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.77: - fstp %st(1) - fstp %st(0) - fstp %st(0) - shlq $4, %rbx - lea _pilo_02l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_02l(%rip), %rax - movl $0, 32(%r15) - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) - movq 208(%rsp), %rbx - xorq %rsp, %rbx - cmpq %fs:40, %rbx - jne ..B1.84 -..B1.78: - addq $224, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 272 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.79: - fldt (%r13) - subl %ecx, %eax - addl $16383, %eax - lea _TWO_63H(%rip), %rcx - movzwl 8(%r13), %edx - andl $32767, %eax - andl $-32768, %edx - lea _TWO_48H(%rip), %rbx - fstpt 96(%rsp) - fldt 96(%rsp) - orl %eax, %edx - movw %dx, 104(%rsp) - fld %st(5) - fxch %st(2) - fstpt 64(%rsp) - lea 16+ones(%rip), %rbp - fstpt (%rsp) - lea 48+_P(%rip), %rsi - fxch %st(4) - fstpt 112(%rsp) - fldt 112(%rsp) - lea 16+_P(%rip), %rdi - fxch %st(3) - fstpt 128(%rsp) - fldt 128(%rsp) - lea 32+_P(%rip), %r8 - fldt 96(%rsp) - lea _P(%rip), %r9 - fmul %st, %st(3) - xorl %eax, %eax - fxch %st(3) - fstpt 160(%rsp) - fldt 160(%rsp) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - fstpt 176(%rsp) - fldt 176(%rsp) - fldt .L_2il0floatpacket.11(%rip) - fmul %st(4), %st - fdiv %st(3), %st - fldt .L_2il0floatpacket.12(%rip) - movl %eax, 144(%rsp) - movl %eax, 192(%rsp) - fxch %st(1) - faddl (%rcx) - fstpt 80(%rsp) - fld %st(4) - fldt 80(%rsp) - movslq 80(%rsp), %rdx - shlq $4, %rdx - fsubl (%rcx) - fmulp %st, %st(2) - testl %r14d, %r14d - fldl (%rbx) - fmul %st, %st(7) - fxch %st(1) - fadd %st(7), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fsubp %st, %st(7) - fxch %st(5) - fsub %st(6), %st - faddp %st, %st(3) - fld %st(4) - fmul %st(4), %st - fld %st(0) - fadd %st(5), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fsubp %st, %st(1) - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fld %st(5) - fmul %st(1), %st - fadd %st(2), %st - fstpt 16(%rsp) - fld %st(2) - fmul %st(1), %st - fadd %st(4), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fsubrp %st, %st(6) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(1) - fldt 16(%rsp) - fadd %st(2), %st - fldt (%rsp) - fdivp %st, %st(1) - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fstpt 80(%rsp) - fxch %st(3) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(2) - fmul %st(3), %st - fldt 80(%rsp) - fsubp %st, %st(3) - fld %st(2) - fsubr %st(4), %st - fldt 16(%rsp) - fmul %st(1), %st - faddp %st, %st(2) - fldt 16(%rsp) - fmul %st(4), %st - fldt (%rbp) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fsubp %st, %st(3) - fld %st(1) - fmul %st(1), %st - fxch %st(1) - fadd %st(4), %st - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fld %st(2) - fxch %st(4) - fmulp %st, %st(2) - fmul %st(1), %st - fld %st(2) - fadd %st(2), %st - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fld %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fldt (%rsi) - fmul %st(1), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - fmulp %st, %st(2) - fldt (%r9) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 64(%rsp) - je ..B1.81 -..B1.80: - movq __libm_atanl_table_128@GOTPCREL(%rip), %rax - fld %st(2) - fldl 4096(%rax,%rdx) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(4) - fxch %st(3) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl 4104(%rax,%rdx) - faddp %st, %st(3) - faddp %st, %st(2) - jmp ..B1.82 -..B1.81: - negq %rdx - fld %st(2) - movq __libm_atanl_table_128@GOTPCREL(%rip), %rax - fldl 4096(%rax,%rdx) - fsub %st, %st(1) - fsub %st(1), %st - fsubp %st, %st(4) - fxch %st(3) - fstpt 96(%rsp) - fldt 96(%rsp) - fldl 4104(%rax,%rdx) - fsubp %st, %st(3) - faddp %st, %st(2) -..B1.82: - fmul %st, %st(2) - fld %st(2) - fxch %st(2) - fmulp %st, %st(1) - movl $0, 32(%r15) - fadd %st, %st(1) - fxch %st(1) - fstpt (%r15) - fldt (%r15) - fsubp %st, %st(2) - fsubp %st, %st(1) - fstpt 16(%r15) - movq 208(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.84 -..B1.83: - addq $224, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 272 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.84: - call __stack_chk_fail@PLT -..B1.92: - movq $0x8000000000000000, %rax - cmpq (%rdx), %rax - je ..B1.97 -..B1.93: - fldt (%rdx) - lea zeros(%rip), %rax - fldt (%rsi) - movl $0, 32(%r15) - fmulp %st, %st(1) - fstpt (%r15) - fldt (%rax) - fstpt 16(%r15) -..B1.94: - movq 208(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.84 - jmp ..B1.14 -..B1.97: - movl $0, 32(%r15) - cmpl $32767, %ebp - je ..B1.101 -..B1.98: - testl %r14d, %r14d - je ..B1.100 -..B1.99: - shlq $4, %rbx - lea _pilo_00l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_00l(%rip), %rax - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) - jmp ..B1.94 -..B1.100: - shlq $4, %rbx - lea zeros(%rip), %rax - lea ones(%rip), %rdx - fldt (%rax) - fstpt 16(%r15) - fldt 16(%r15) - fldt (%rdx,%rbx) - fmulp %st, %st(1) - fstpt (%r15) - jmp ..B1.94 -..B1.101: - shlq $4, %rbx - testl %r14d, %r14d - je ..B1.103 -..B1.102: - lea _pilo_34l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_34l(%rip), %rax - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) - jmp ..B1.94 -..B1.103: - lea _pilo_04l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_04l(%rip), %rax - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) - jmp ..B1.94 -..B1.104: - movq $0x8000000000000000, %rax - cmpq (%rsi), %rax - jne ..B1.93 -..B1.105: - cmpl $32767, %ecx - je ..B1.92 -..B1.106: - shlq $4, %rbx - lea _pilo_02l(%rip), %rdx - lea _small_value_80(%rip), %rcx - lea _pi_02l(%rip), %rax - movl $0, 32(%r15) - fldt (%rbx,%rdx) - fldt (%rbx,%rax) - fstpt (%r15) - fldt (%rbx,%rcx) - fsubrp %st, %st(1) - fstpt 16(%r15) - jmp ..B1.94 - .align 16,0x90 - .cfi_endproc - .type __libm_atan2l_k80,@function - .size __libm_atan2l_k80,.-__libm_atan2l_k80 - .data -# -- End __libm_atan2l_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x06,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,16 - .align 16 -.L_2il0floatpacket.12: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xf8,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,16 - .align 16 -zeros: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type zeros,@object - .size zeros,32 - .align 16 -ones: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type ones,@object - .size ones,32 - .align 16 -t32: - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type t32,@object - .size t32,32 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 2 -_pilo_00l: - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 16318 - .word 0 - .word 0 - .word 0 - .type _pilo_00l,@object - .size _pilo_00l,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_pi_00l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49152 - .word 0 - .word 0 - .word 0 - .type _pi_00l,@object - .size _pi_00l,32 - .align 2 -_pilo_02l: - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 16317 - .word 0 - .word 0 - .word 0 - .type _pilo_02l,@object - .size _pilo_02l,32 - .align 2 -_pi_02l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49151 - .word 0 - .word 0 - .word 0 - .type _pi_02l,@object - .size _pi_02l,32 - .align 2 -_P: - .word 43664 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 43235 - .word 52379 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59507 - .word 38278 - .word 9340 - .word 37449 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 9132 - .word 55602 - .word 8665 - .word 58245 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,64 - .align 2 -_pilo_34l: - .word 54470 - .word 48821 - .word 27694 - .word 55510 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 54470 - .word 48821 - .word 27694 - .word 55510 - .word 16319 - .word 0 - .word 0 - .word 0 - .type _pilo_34l,@object - .size _pilo_34l,32 - .align 2 -_pi_34l: - .word 37288 - .word 39182 - .word 58361 - .word 38603 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 37288 - .word 39182 - .word 58361 - .word 38603 - .word 49152 - .word 0 - .word 0 - .word 0 - .type _pi_34l,@object - .size _pi_34l,32 - .align 2 -_pilo_04l: - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 49084 - .word 0 - .word 0 - .word 0 - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 16316 - .word 0 - .word 0 - .word 0 - .type _pilo_04l,@object - .size _pilo_04l,32 - .align 2 -_pi_04l: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 49150 - .word 0 - .word 0 - .word 0 - .type _pi_04l,@object - .size _pi_04l,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_cosh_k64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_cosh_k64.S deleted file mode 100644 index 2926b29694..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_cosh_k64.S +++ /dev/null @@ -1,341 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_cosh_k64.c" - .text -..TXTST0: -# -- Begin __libm_cosh_k64 - .text - .align 16,0x90 - .globl __libm_cosh_k64 -__libm_cosh_k64: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_cosh_k64.1: -..L2: - - movsd %xmm0, -32(%rsp) - movzwl -26(%rsp), %eax - andl $32752, %eax - cmpl $16720, %eax - jge ..B1.12 -..B1.2: - movl -28(%rsp), %edx - andl $2147483647, %edx - cmpl $1065646817, %edx - jae ..B1.7 -..B1.3: - cmpl $1012924416, %edx - jae ..B1.5 -..B1.4: - movq $0x3ff0000000000000, %rax - movq %rax, (%rdi) - movq $0, 8(%rdi) - jmp ..B1.6 -..B1.5: - movsd -32(%rsp), %xmm0 - movq $0x3ff0000000000000, %rax - mulsd %xmm0, %xmm0 - movaps %xmm0, %xmm1 - mulsd %xmm0, %xmm1 - movsd .L_2il0floatpacket.3(%rip), %xmm3 - mulsd %xmm1, %xmm3 - movsd .L_2il0floatpacket.5(%rip), %xmm2 - mulsd %xmm1, %xmm2 - addsd .L_2il0floatpacket.4(%rip), %xmm3 - mulsd %xmm0, %xmm3 - movsd %xmm0, -40(%rsp) - addsd %xmm2, %xmm3 - movq %rax, (%rdi) - movsd %xmm3, 8(%rdi) -..B1.6: - xorl %eax, %eax - ret -..B1.7: - movsd -32(%rsp), %xmm2 - lea _TWO_52(%rip), %rax - andps .L_2il0floatpacket.12(%rip), %xmm2 - movsd .L_2il0floatpacket.0(%rip), %xmm4 - mulsd %xmm2, %xmm4 - movsd (%rax), %xmm0 - movsd .L_2il0floatpacket.1(%rip), %xmm1 - addsd %xmm0, %xmm4 - movsd %xmm4, -40(%rsp) - subsd %xmm0, %xmm4 - mulsd %xmm4, %xmm1 - movsd %xmm2, -32(%rsp) - subsd %xmm1, %xmm2 - movsd .L_2il0floatpacket.2(%rip), %xmm3 - movaps %xmm2, %xmm6 - mulsd %xmm3, %xmm4 - movl -40(%rsp), %eax - movl %eax, %r8d - shll $25, %r8d - subsd %xmm4, %xmm6 - sarl $25, %r8d - subsd %xmm6, %xmm2 - subl %r8d, %eax - subsd %xmm4, %xmm2 - movsd .L_2il0floatpacket.11(%rip), %xmm1 - movaps %xmm2, %xmm0 - sarl $7, %eax - addsd %xmm6, %xmm0 - addsd %xmm6, %xmm1 - movzwl 6+.L_2il0floatpacket.11(%rip), %esi - cmpl $1077338037, %edx - jae ..B1.9 -..B1.8: - movaps %xmm0, %xmm7 - xorl %edx, %edx - mulsd %xmm0, %xmm7 - movaps %xmm6, %xmm9 - movsd .L_2il0floatpacket.7(%rip), %xmm8 - movl %eax, %ecx - mulsd %xmm7, %xmm8 - negl %ecx - movsd .L_2il0floatpacket.11(%rip), %xmm3 - addl $1023, %ecx - movsd %xmm1, -32(%rsp) - subl %eax, %ecx - movl %edx, -32(%rsp) - andl $2047, %ecx - movsd -32(%rsp), %xmm10 - andl $-32753, %esi - movsd .L_2il0floatpacket.6(%rip), %xmm4 - decl %eax - movsd .L_2il0floatpacket.6(%rip), %xmm5 - subsd %xmm6, %xmm3 - addsd .L_2il0floatpacket.8(%rip), %xmm8 - addsd %xmm10, %xmm4 - mulsd %xmm7, %xmm8 - subsd %xmm4, %xmm9 - mulsd %xmm0, %xmm8 - addsd %xmm2, %xmm9 - movsd .L_2il0floatpacket.9(%rip), %xmm0 - addsd %xmm8, %xmm9 - mulsd %xmm7, %xmm0 - movsd %xmm3, -24(%rsp) - movl %edx, -24(%rsp) - movsd -24(%rsp), %xmm1 - movslq %r8d, %r8 - addsd .L_2il0floatpacket.10(%rip), %xmm0 - addsd %xmm1, %xmm5 - mulsd %xmm7, %xmm0 - addsd %xmm5, %xmm6 - addsd .L_2il0floatpacket.4(%rip), %xmm0 - addsd %xmm6, %xmm2 - mulsd %xmm7, %xmm0 - xorps .L_2il0floatpacket.13(%rip), %xmm2 - addsd %xmm0, %xmm9 - subsd %xmm8, %xmm2 - movaps %xmm9, %xmm15 - addsd %xmm10, %xmm9 - addsd %xmm0, %xmm2 - movsd .L_2il0floatpacket.11(%rip), %xmm6 - movaps %xmm2, %xmm12 - shll $4, %ecx - addsd %xmm1, %xmm2 - shlq $4, %r8 - orl %ecx, %esi - movsd %xmm6, -16(%rsp) - movw %si, -10(%rsp) - movq __libm_exp_table_128@GOTPCREL(%rip), %rsi - movsd 1032(%r8,%rsi), %xmm13 - mulsd 1024(%r8,%rsi), %xmm9 - negq %r8 - mulsd %xmm13, %xmm15 - mulsd 1024(%rsi,%r8), %xmm2 - mulsd %xmm10, %xmm13 - addsd %xmm9, %xmm15 - movsd 1032(%rsi,%r8), %xmm11 - movaps %xmm13, %xmm14 - mulsd %xmm11, %xmm12 - mulsd %xmm11, %xmm1 - addsd %xmm2, %xmm12 - movsd -16(%rsp), %xmm2 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm12 - addsd %xmm1, %xmm14 - addsd %xmm12, %xmm15 - subsd %xmm14, %xmm13 - movsd %xmm1, -24(%rsp) - addsd %xmm1, %xmm13 - movsd %xmm14, -40(%rsp) - addsd %xmm13, %xmm15 - movsd %xmm13, -32(%rsp) - movsd %xmm14, (%rdi) - movsd %xmm15, 8(%rdi) - ret -..B1.9: - movsd %xmm1, -40(%rsp) - movaps %xmm0, %xmm4 - movl $0, -40(%rsp) - decl %eax - movsd -40(%rsp), %xmm7 - movsd .L_2il0floatpacket.6(%rip), %xmm1 - mulsd %xmm0, %xmm4 - addsd %xmm7, %xmm1 - movsd .L_2il0floatpacket.9(%rip), %xmm5 - subsd %xmm1, %xmm6 - mulsd %xmm4, %xmm5 - addsd %xmm6, %xmm2 - addsd .L_2il0floatpacket.10(%rip), %xmm5 - movsd .L_2il0floatpacket.7(%rip), %xmm6 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm5 - addsd .L_2il0floatpacket.8(%rip), %xmm6 - mulsd %xmm6, %xmm0 - movsd .L_2il0floatpacket.4(%rip), %xmm3 - addsd %xmm0, %xmm5 - mulsd %xmm4, %xmm5 - mulsd %xmm3, %xmm4 - movslq %r8d, %r8 - addsd %xmm4, %xmm5 - shlq $4, %r8 - addsd %xmm5, %xmm2 - movaps %xmm2, %xmm8 - addsd %xmm7, %xmm2 - movq __libm_exp_table_128@GOTPCREL(%rip), %rdx - movsd 1032(%r8,%rdx), %xmm0 - mulsd 1024(%r8,%rdx), %xmm2 - mulsd %xmm0, %xmm8 - mulsd %xmm0, %xmm7 - addsd %xmm2, %xmm8 - movsd %xmm7, -40(%rsp) - movsd %xmm7, (%rdi) - movsd %xmm8, 8(%rdi) -..B1.10: - ret -..B1.12: - xorl %eax, %eax - movq %rax, (%rdi) - movq %rax, 8(%rdi) -..B1.13: - xorl %eax, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __libm_cosh_k64,@function - .size __libm_cosh_k64,.-__libm_cosh_k64 - .data -# -- End __libm_cosh_k64 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.12: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,16 - .align 16 -.L_2il0floatpacket.13: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x6a3d464e,0x3f56c171 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x5554a6cf,0x3fa55555 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 4 -_TWO_52: - .long 0 - .long 1127219200 - .type _TWO_52,@object - .size _TWO_52,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_coshl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_coshl_k80.S deleted file mode 100644 index 6f542ee182..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_coshl_k80.S +++ /dev/null @@ -1,748 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_coshl_k80.c" - .text -..TXTST0: -# -- Begin __libm_coshl_k80 - .text - .align 16,0x90 - .globl __libm_coshl_k80 -__libm_coshl_k80: -# parameter 1: 8 + %rsp -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_coshl_k80.1: -..L2: - - movzwl 16(%rsp), %eax - andl $32767, %eax - cmpl $16405, %eax - jge ..B1.20 -..B1.2: - cmpl $16382, %eax - jge ..B1.13 -..B1.3: - cmpl $16378, %eax - jge ..B1.11 -..B1.4: - fldt .L_2il0floatpacket.1(%rip) - cmpl $16372, %eax - jge ..B1.10 -..B1.5: - cmpl $16365, %eax - jge ..B1.9 -..B1.6: - fstpt (%rdi) - cmpl $16308, %eax - jge ..B1.8 -..B1.7: - fldt .L_2il0floatpacket.0(%rip) - fstpt 16(%rdi) - fldt 16(%rdi) - ret -..B1.8: - fldt 8(%rsp) - lea _Q3(%rip), %rax - fldt (%rax) - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.0(%rip) - ret -..B1.9: - fldt 8(%rsp) - lea 16+_Q2(%rip), %rax - lea _Q2(%rip), %rdx - fmul %st(0), %st - fxch %st(1) - fstpt (%rdi) - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.0(%rip) - ret -..B1.10: - fldt 8(%rsp) - lea 48+_Q1(%rip), %rax - lea 32+_Q1(%rip), %rcx - lea 16+_Q1(%rip), %rdx - lea _Q1(%rip), %rsi - fmul %st(0), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fstpt (%rdi) - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - fmulp %st, %st(3) - fldt (%rsi) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.0(%rip) - ret -..B1.11: - fldt 8(%rsp) - lea _TWO_48H(%rip), %rax - fld %st(0) - fld %st(1) - fld %st(2) - lea 96+_Q(%rip), %rdx - fmul %st(3), %st - lea 64+_Q(%rip), %rcx - fld %st(0) - lea 112+_Q(%rip), %r8 - lea 32+_Q(%rip), %rsi - lea 80+_Q(%rip), %r9 - lea 48+_Q(%rip), %r10 - lea 16+_Q(%rip), %r11 - fmul %st(1), %st - fldl (%rax) - lea 144+_Q(%rip), %rax - fadd %st, %st(4) - fxch %st(4) - fstpt -24(%rsp) - fldt -24(%rsp) - fsub %st(4), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(1) - fmul %st(4), %st - fxch %st(6) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(5) - fxch %st(2) - fmul %st(0), %st - fldt (%rdx) - lea 128+_Q(%rip), %rdx - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r8) - fmul %st(4), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(4) - fld %st(5) - fldt (%r11) - faddp %st, %st(5) - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fldt (%rax) - fld %st(0) - fmul %st(7), %st - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fmul %st(1), %st - fmul %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmul %st, %st(2) - fldt (%rdx) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(2) - fmulp %st, %st(4) - fld %st(1) - fadd %st(4), %st - fadd %st(3), %st - fstpt -24(%rsp) - fldt -24(%rsp) - fsubp %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.1(%rip) - faddp %st, %st(1) - fstpt (%rdi) - fldt .L_2il0floatpacket.0(%rip) -..B1.12: - ret -..B1.13: - fldt 8(%rsp) - lea _KLN2(%rip), %rsi - movb 17(%rsp), %cl - lea _TWO_63H(%rip), %rax - andb $-128, %cl - lea _LN2K(%rip), %r8 - shrb $7, %cl - lea 16+_LN2K(%rip), %r9 - fldt (%rsi) - fldl (%rax) - fldt (%r8) - fldt (%r9) - movzbl %cl, %edx - lea ones(%rip), %rcx - lea _TWO_32P(%rip), %r10 - lea _TWO_32(%rip), %r11 - lea 64+_P(%rip), %rsi - lea 32+_P(%rip), %r8 - lea _P(%rip), %r9 - fxch %st(4) - fmull (%rcx,%rdx,8) - fmul %st, %st(3) - fxch %st(2) - fadd %st, %st(3) - fxch %st(3) - fstpt -24(%rsp) - fxch %st(1) - fstpt 8(%rsp) - fldt 8(%rsp) - fldt -24(%rsp) - movl -24(%rsp), %edx - fsubp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - movsbq %dl, %rax - fsubrp %st, %st(1) - fld %st(0) - subl %eax, %edx - fxch %st(3) - fmulp %st, %st(2) - sarl $8, %edx - fxch %st(1) - fsubr %st, %st(2) - fldl (%r10) - lea 48+_P(%rip), %r10 - fmul %st(3), %st - fldl (%r11) - lea 16+_P(%rip), %r11 - fmulp %st, %st(4) - fsubp %st, %st(3) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fsubp %st, %st(1) - fadd %st, %st(1) - fld %st(1) - fmul %st(2), %st - fldt (%rsi) - fmul %st(1), %st - fldt (%r8) - movzwl 16(%rsp), %esi - faddp %st, %st(1) - fmul %st(1), %st - andl $32767, %esi - fldt (%r9) - cmpl $16387, %esi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - jg ..B1.19 -..B1.14: - jne ..B1.18 -..B1.15: - movl 12(%rsp), %esi - cmpl $-782985146, %esi - ja ..B1.19 -..B1.16: - jne ..B1.18 -..B1.17: - cmpl $1501741449, 8(%rsp) - ja ..B1.19 -..B1.18: - fldt .L_2il0floatpacket.1(%rip) - movl %edx, %r8d - negl %r8d - lea -1(%rdx), %esi - addl $16383, %r8d - shlq $4, %rax - subl %edx, %r8d - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - andl $32767, %r8d - fstpt -40(%rsp) - fld %st(1) - movzwl 8+.L_2il0floatpacket.1(%rip), %r9d - fadd %st(1), %st - fxch %st(1) - fsubrp %st, %st(2) - fld %st(2) - andl $-32768, %r9d - fldl 2056(%rdx,%rax) - orl %r8d, %r9d - fldl 2048(%rdx,%rax) - negq %rax - fstpt -72(%rsp) - fldt -72(%rsp) - movw %r9w, -32(%rsp) - fadd %st(1), %st - fmulp %st, %st(3) - fld %st(4) - fmul %st(1), %st - movl %esi, -8(%rsp) - faddp %st, %st(3) - fldl 2056(%rdx,%rax) - fmul %st, %st(2) - fldl 2048(%rdx,%rax) - fld %st(0) - movb 17(%rsp), %al - fadd %st(2), %st - fmulp %st, %st(6) - andb $-128, %al - shrb $7, %al - fxch %st(3) - fsubrp %st, %st(5) - fxch %st(4) - fstpt -56(%rsp) - fld %st(4) - fxch %st(2) - fmul %st, %st(5) - fldt -72(%rsp) - fmul %st, %st(3) - fld %st(0) - movzbl %al, %r10d - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fsub %st(5), %st - fsubr %st, %st(3) - fxch %st(5) - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(0) - fldt -56(%rsp) - faddp %st, %st(4) - fldt -40(%rsp) - fmul %st, %st(5) - fxch %st(1) - fadd %st(5), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldl (%rcx,%r10,8) - fmul %st, %st(1) - fxch %st(1) - fstpt (%rdi) - fmulp %st, %st(1) - fstpt 16(%rdi) - fildl -8(%rsp) - ret -..B1.19: - shlq $4, %rax - decl %edx - movl %edx, -8(%rsp) - faddp %st, %st(1) - fildl -8(%rsp) - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - fldl 2056(%rdx,%rax) - fldl 2048(%rdx,%rax) - fld %st(0) - fmul %st(4), %st - fxch %st(4) - fadd %st(5), %st - fmul %st(2), %st - movb 17(%rsp), %al - faddp %st, %st(4) - fmul %st, %st(4) - fld %st(0) - andb $-128, %al - shrb $7, %al - fadd %st(5), %st - fsubr %st, %st(1) - movzbl %al, %esi - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fldl (%rcx,%rsi,8) - fmul %st, %st(3) - fxch %st(3) - fstpt (%rdi) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rdi) - ret -..B1.20: - cmpl $32767, %eax - je ..B1.23 -..B1.21: - fldt .L_2il0floatpacket.0(%rip) - lea _infs(%rip), %rax - fstpt 16(%rdi) - fldt (%rax) - fstpt (%rdi) - fldt (%rdi) -..B1.22: - ret -..B1.23: - fldt 8(%rsp) - fmul %st(0), %st - fstpt (%rdi) - fldt (%rdi) - fldt .L_2il0floatpacket.0(%rip) - fstpt 16(%rdi) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_coshl_k80,@function - .size __libm_coshl_k80,.-__libm_coshl_k80 - .data -# -- End __libm_coshl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 2 -_Q3: - .word 21845 - .word 213 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 62430 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 22894 - .word 21845 - .word 43733 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 65531 - .word 65535 - .word 65535 - .word 65535 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 7054 - .word 43693 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 25016 - .word 58228 - .word 24755 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 57397 - .word 35800 - .word 53031 - .word 53262 - .word 16367 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 18360 - .word 43637 - .word 28980 - .word 40373 - .word 49076 - .word 0 - .word 0 - .word 0 - .word 16302 - .word 43691 - .word 43690 - .word 43690 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 46125 - .word 2912 - .word 24758 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 29965 - .word 3335 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 54950 - .word 46751 - .word 32187 - .word 37874 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 30733 - .word 25775 - .word 51110 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 49850 - .word 450 - .word 9929 - .word 51659 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 2776 - .word 45191 - .word 37201 - .word 55334 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,160 - .align 2 -_KLN2: - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 16391 - .word 0 - .word 0 - .word 0 - .type _KLN2,@object - .size _KLN2,16 - .align 2 -_LN2K: - .word 0 - .word 0 - .word 6134 - .word 45426 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 55756 - .word 58609 - .word 48341 - .word 59623 - .word 16343 - .word 0 - .word 0 - .word 0 - .type _LN2K,@object - .size _LN2K,32 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,80 - .align 2 -_infs: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .type _infs,@object - .size _infs,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_cosl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_cosl_k80.S deleted file mode 100644 index f1b0501958..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_cosl_k80.S +++ /dev/null @@ -1,848 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_cosl_k80.c" - .text -..TXTST0: -# -- Begin __libm_cosl_k80 - .text - .align 16,0x90 - .globl __libm_cosl_k80 -__libm_cosl_k80: -# parameter 1: 144 + %rsp -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_cosl_k80.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - pushq %rbp - .cfi_def_cfa_offset 24 - .cfi_offset 6, -24 - subq $120, %rsp - .cfi_def_cfa_offset 144 - movq %rdi, %rbp - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 112(%rsp) - movzwl 152(%rsp), %eax - andl $32767, %eax - cmpl $16378, %eax - jge ..B1.18 -..B1.2: - cmpl $16372, %eax - jge ..B1.16 -..B1.3: - cmpl $16364, %eax - jge ..B1.14 -..B1.4: - cmpl $16308, %eax - jge ..B1.12 -..B1.5: - testl %eax, %eax - jne ..B1.8 -..B1.6: - cmpl $0, 148(%rsp) - jne ..B1.8 -..B1.7: - cmpl $0, 144(%rsp) - je ..B1.9 -..B1.8: - lea _ones(%rip), %rax - lea _small_value_80(%rip), %rdx - lea _zeros(%rip), %rcx - fldl (%rax) - fldt (%rdx) - fsubr %st(1), %st - fstpt (%rbp) - fldl (%rcx) - fstpt 16(%rbp) - jmp ..B1.10 -..B1.9: - lea _ones(%rip), %rax - lea _zeros(%rip), %rdx - fldl (%rax) - fstpt (%rbp) - fldt (%rbp) - fldl (%rdx) - fstpt 16(%rbp) -..B1.10: - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.28 -..B1.11: - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.12: - fldt 144(%rsp) - lea _CP3(%rip), %rdx - lea _ones(%rip), %rax - fldt (%rdx) - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 16(%rbp) - fldl (%rax) - fstpt (%rbp) - fldt (%rbp) - movq 112(%rsp), %rcx - xorq %rsp, %rcx - cmpq %fs:40, %rcx - jne ..B1.28 -..B1.13: - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.14: - fldt 144(%rsp) - lea 16+_CP2(%rip), %rdx - fmul %st(0), %st - lea _CP2(%rip), %rcx - fldt (%rdx) - lea _ones(%rip), %rax - fmul %st(1), %st - fldl (%rax) - fstpt (%rbp) - fldt (%rbp) - fldt (%rcx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbp) - movq 112(%rsp), %rbx - xorq %rsp, %rbx - cmpq %fs:40, %rbx - jne ..B1.28 -..B1.15: - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.16: - fldt 144(%rsp) - lea 48+_CP1(%rip), %rdx - fmul %st(0), %st - lea 32+_CP1(%rip), %rbx - fld %st(0) - lea 16+_CP1(%rip), %rcx - fmul %st(1), %st - lea _CP1(%rip), %rsi - fldt (%rdx) - lea _ones(%rip), %rax - fmul %st(1), %st - fldl (%rax) - fstpt (%rbp) - fldt (%rbp) - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rbx) - fmulp %st, %st(3) - fldt (%rsi) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rbp) - movq 112(%rsp), %rbp - xorq %rsp, %rbp - cmpq %fs:40, %rbp - jne ..B1.28 -..B1.17: - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.18: - cmpl $16382, %eax - jge ..B1.20 -..B1.19: - fldt 144(%rsp) - xorl %ecx, %ecx - movb 153(%rsp), %bl - xorl %esi, %esi - andb $-128, %bl - lea _TWO_52H(%rip), %rdx - shrb $7, %bl - fldl (%rdx) - movzbl %bl, %eax - lea _ones(%rip), %rbx - fxch %st(1) - fmull (%rbx,%rax,8) - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fstpt 16(%rsp) - fstpt 144(%rsp) - fldt 144(%rsp) - jmp ..B1.23 -..B1.20: - je ..B1.33 -..B1.21: - fldt 144(%rsp) - xorl %edi, %edi - movb 153(%rsp), %bl - andb $-128, %bl - shrb $7, %bl - movzbl %bl, %eax - lea _ones(%rip), %rbx - fmull (%rbx,%rax,8) - fstpt 144(%rsp) - fldt 144(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 160 - lea 112(%rsp), %rsi - fstpt (%rsp) -..___tag_value___libm_cosl_k80.41: - call __libm_reduce_pi04l@PLT -..___tag_value___libm_cosl_k80.42: -..B1.38: - movl %eax, %esi - addq $16, %rsp - .cfi_def_cfa_offset 144 -..B1.22: - fldl 96(%rsp) - lea 3(%rsi), %ecx - lea _TWO_52H(%rip), %rax - fld %st(0) - fldl 104(%rsp) - movsd 96(%rsp), %xmm0 - shrl $2, %ecx - mulsd (%rax), %xmm0 - andl $1, %ecx - movsd %xmm0, (%rsp) - fldl (%rsp) - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - faddp %st, %st(1) -..B1.23: - fldt 16(%rsp) - fld %st(2) - fmul %st(1), %st - lea _TWO_53H(%rip), %rax - fxch %st(1) - fmul %st(2), %st - incl %esi - faddp %st, %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fld %st(2) - fmul %st(3), %st - testl $2, %esi - fld %st(0) - fadd %st(2), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fld %st(1) - fmul %st(2), %st - fld %st(0) - faddp %st, %st(2) - fldl (%rax) - fstpt 48(%rsp) - fldl (%rbx,%rcx,8) - je ..B1.25 -..B1.24: - lea 112+_SP(%rip), %rax - lea 80+_SP(%rip), %rdx - fstpt (%rsp) - lea 48+_SP(%rip), %rcx - lea 128+_SP(%rip), %rdi - lea 16+_SP(%rip), %rsi - lea 96+_SP(%rip), %r8 - lea 64+_SP(%rip), %r9 - fldt (%rax) - lea 32+_SP(%rip), %r10 - lea _SP(%rip), %r11 - lea 160+_SP(%rip), %rax - fmul %st(2), %st - fldt (%rdx) - lea 144+_SP(%rip), %rdx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%r11) - faddp %st, %st(3) - fldt 32(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 64(%rsp) - fldt 80(%rsp) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rdx) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fldt 48(%rsp) - fmul %st(1), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(2) - fld %st(2) - fldt 16(%rsp) - fld %st(0) - fmul %st(3), %st - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(1) - fmul %st(3), %st - fadd %st, %st(1) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt (%rbp) - fmulp %st, %st(1) - fstpt 16(%rbp) - fldl (%rbx) - jmp ..B1.26 -..B1.25: - fstp %st(4) - fstp %st(4) - lea 112+_CP(%rip), %rax - lea 80+_CP(%rip), %rdx - lea 48+_CP(%rip), %rcx - lea 16+_CP(%rip), %rsi - lea 128+_CP(%rip), %rdi - lea 96+_CP(%rip), %r8 - lea 64+_CP(%rip), %r9 - lea 32+_CP(%rip), %r10 - fldt (%rax) - lea _CP(%rip), %r11 - lea 160+_CP(%rip), %rax - fmul %st(1), %st - fldt (%rdx) - lea 144+_CP(%rip), %rdx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r11) - faddp %st, %st(2) - fldt 32(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 64(%rsp) - fldt 80(%rsp) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(5) - fldt (%rdx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fld %st(4) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fadd %st, %st(1) - fldt 48(%rsp) - fmul %st(2), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fldl (%rbx) - fadd %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fxch %st(1) - fmul %st(2), %st - fstpt (%rbp) - fmulp %st, %st(1) - fstpt 16(%rbp) -..B1.26: - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.28 -..B1.27: - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.28: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.33: - movl 148(%rsp), %eax - cmpl $-921707870, %eax - jb ..B1.19 -..B1.34: - jne ..B1.21 -..B1.35: - cmpl $560513589, 144(%rsp) - jbe ..B1.19 - jmp ..B1.21 - .align 16,0x90 - .cfi_endproc - .type __libm_cosl_k80,@function - .size __libm_cosl_k80,.-__libm_cosl_k80 - .data -# -- End __libm_cosl_k80 - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_CP3: - .word 0 - .word 65450 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .type _CP3,@object - .size _CP3,16 - .align 2 -_CP2: - .word 63855 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 18238 - .word 17476 - .word 43656 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _CP2,@object - .size _CP2,32 - .align 2 -_CP1: - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 47533 - .word 43689 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 14131 - .word 49466 - .word 24756 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 37142 - .word 18013 - .word 35855 - .word 53259 - .word 16367 - .word 0 - .word 0 - .word 0 - .type _CP1,@object - .size _CP1,64 - .align 2 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _SP,@object - .size _SP,176 - .align 2 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 0 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 0 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _CP,@object - .size _CP,176 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_exp_k32.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_exp_k32.S deleted file mode 100644 index 3fd3808323..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_exp_k32.S +++ /dev/null @@ -1,220 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_exp_k32.c" - .text -..TXTST0: -# -- Begin __libm_exp_k32 - .text - .align 16,0x90 - .globl __libm_exp_k32 -__libm_exp_k32: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___libm_exp_k32.1: -..L2: - - movsd %xmm0, -16(%rsp) - movl -12(%rsp), %eax - movl %eax, %edx - andl $2147483647, %edx - shrl $31, %eax - cmpl $1012924416, %edx - jb ..B1.3 -..B1.2: - movsd .L_2il0floatpacket.0(%rip), %xmm1 - lea _TWO_52H(%rip), %rdx - movsd .L_2il0floatpacket.1(%rip), %xmm3 - lea SC2_BIAS(%rip), %rsi - movsd .L_2il0floatpacket.2(%rip), %xmm4 - lea _SC2(%rip), %r10 - movsd .L_2il0floatpacket.4(%rip), %xmm13 - movsd (%rdx), %xmm2 - movsd .L_2il0floatpacket.6(%rip), %xmm10 - mulsd %xmm0, %xmm1 - movsd .L_2il0floatpacket.9(%rip), %xmm6 - addsd %xmm2, %xmm1 - movsd %xmm1, -40(%rsp) - movsd -40(%rsp), %xmm5 - movsd .L_2il0floatpacket.3(%rip), %xmm7 - subsd %xmm2, %xmm5 - mulsd %xmm5, %xmm3 - mulsd %xmm4, %xmm5 - subsd %xmm3, %xmm0 - movaps %xmm0, %xmm8 - movsd %xmm0, -16(%rsp) - subsd %xmm5, %xmm8 - movaps %xmm8, %xmm9 - subsd %xmm8, %xmm0 - addsd %xmm8, %xmm6 - subsd %xmm5, %xmm0 - movsd %xmm6, -32(%rsp) - addsd %xmm0, %xmm9 - movaps %xmm9, %xmm11 - mulsd %xmm9, %xmm11 - mulsd %xmm11, %xmm13 - mulsd %xmm11, %xmm10 - addsd .L_2il0floatpacket.5(%rip), %xmm13 - addsd .L_2il0floatpacket.7(%rip), %xmm10 - mulsd %xmm11, %xmm13 - mulsd %xmm9, %xmm10 - movl $0, -32(%rsp) - addsd %xmm10, %xmm13 - movsd -32(%rsp), %xmm14 - movsd .L_2il0floatpacket.8(%rip), %xmm12 - addsd %xmm14, %xmm7 - mulsd %xmm11, %xmm13 - mulsd %xmm11, %xmm12 - subsd %xmm7, %xmm8 - addsd %xmm12, %xmm13 - addsd %xmm8, %xmm0 - movl -40(%rsp), %ecx - movl %ecx, %r8d - shll $25, %r8d - addsd %xmm13, %xmm0 - sarl $25, %r8d - subl %r8d, %ecx - movslq %r8d, %r8 - shlq $4, %r8 - movq __libm_exp_table_128@GOTPCREL(%rip), %r9 - shrl $7, %ecx - movslq (%rsi,%rax,4), %rdi - movsd 1032(%r9,%r8), %xmm15 - addq %rcx, %rdi - movaps %xmm15, %xmm1 - mulsd %xmm0, %xmm1 - addsd %xmm14, %xmm0 - mulsd %xmm14, %xmm15 - mulsd 1024(%r9,%r8), %xmm0 - shlq $52, %rdi - addsd %xmm0, %xmm1 - movq %rdi, -24(%rsp) - addsd %xmm15, %xmm1 - mulsd -24(%rsp), %xmm1 - mulsd (%r10,%rax,8), %xmm1 - jmp ..B1.4 -..B1.3: - movsd .L_2il0floatpacket.9(%rip), %xmm1 - addsd -16(%rsp), %xmm1 -..B1.4: - movaps %xmm1, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type __libm_exp_k32,@function - .size __libm_exp_k32,.-__libm_exp_k32 - .data -# -- End __libm_exp_k32 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -SC2_BIAS: - .long 511 - .long 1535 - .type SC2_BIAS,@object - .size SC2_BIAS,8 - .align 4 -_SC2: - .long 0 - .long 1609564160 - .long 0 - .long 535822336 - .type _SC2,@object - .size _SC2,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_exp_k64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_exp_k64.S deleted file mode 100644 index 6069cf9943..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_exp_k64.S +++ /dev/null @@ -1,260 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_exp_k64.c" - .text -..TXTST0: -# -- Begin __libm_exp_k64 - .text - .align 16,0x90 - .globl __libm_exp_k64 -__libm_exp_k64: -# parameter 1: %xmm0 -# parameter 2: %rdi -# parameter 3: %rsi -..B1.1: - .cfi_startproc -..___tag_value___libm_exp_k64.1: -..L2: - - movsd %xmm0, -8(%rsp) - movzwl -2(%rsp), %eax - andl $32752, %eax - movb -1(%rsp), %dl - andb $-128, %dl - shrl $4, %eax - shrb $7, %dl - cmpl $2047, %eax - je ..B1.10 -..B1.2: - cmpl $966, %eax - jge ..B1.6 -..B1.3: - movl $0, (%rdi) - cmpl $917, %eax - jge ..B1.5 -..B1.4: - movq $0x3ff0000000000000, %rax - movq %rax, (%rsi) - movq $0, 8(%rsi) - ret -..B1.5: - movsd .L_2il0floatpacket.9(%rip), %xmm0 - movsd -8(%rsp), %xmm2 - movaps %xmm0, %xmm1 - addsd %xmm2, %xmm1 - movsd %xmm1, (%rsi) - subsd %xmm0, %xmm1 - movsd %xmm1, -24(%rsp) - subsd %xmm1, %xmm2 - movsd %xmm2, 8(%rsi) - ret -..B1.6: - cmpl $1035, %eax - jge ..B1.8 -..B1.7: - movsd -8(%rsp), %xmm0 - lea _TWO_52H(%rip), %rax - movsd .L_2il0floatpacket.0(%rip), %xmm4 - movsd .L_2il0floatpacket.1(%rip), %xmm2 - movsd .L_2il0floatpacket.2(%rip), %xmm3 - mulsd %xmm0, %xmm4 - movsd (%rax), %xmm1 - movsd .L_2il0floatpacket.4(%rip), %xmm12 - addsd %xmm1, %xmm4 - movsd %xmm4, -24(%rsp) - subsd %xmm1, %xmm4 - mulsd %xmm4, %xmm2 - mulsd %xmm3, %xmm4 - subsd %xmm2, %xmm0 - movaps %xmm0, %xmm7 - movsd %xmm0, -8(%rsp) - subsd %xmm4, %xmm7 - movaps %xmm7, %xmm8 - subsd %xmm7, %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm9 - subsd %xmm4, %xmm0 - movsd .L_2il0floatpacket.9(%rip), %xmm5 - addsd %xmm0, %xmm8 - addsd %xmm7, %xmm5 - movaps %xmm8, %xmm10 - mulsd %xmm8, %xmm10 - mulsd %xmm10, %xmm12 - mulsd %xmm10, %xmm9 - addsd .L_2il0floatpacket.5(%rip), %xmm12 - addsd .L_2il0floatpacket.7(%rip), %xmm9 - mulsd %xmm10, %xmm12 - mulsd %xmm8, %xmm9 - movsd %xmm5, -16(%rsp) - addsd %xmm9, %xmm12 - movl $0, -16(%rsp) - movsd -16(%rsp), %xmm14 - movsd .L_2il0floatpacket.3(%rip), %xmm6 - movsd .L_2il0floatpacket.8(%rip), %xmm11 - addsd %xmm14, %xmm6 - mulsd %xmm10, %xmm12 - mulsd %xmm10, %xmm11 - subsd %xmm6, %xmm7 - addsd %xmm11, %xmm12 - addsd %xmm7, %xmm0 - movl -24(%rsp), %r8d - movl %r8d, %edx - shll $25, %edx - addsd %xmm12, %xmm0 - sarl $25, %edx - subl %edx, %r8d - movslq %edx, %rdx - shlq $4, %rdx - movq __libm_exp_table_128@GOTPCREL(%rip), %rcx - sarl $7, %r8d - movsd 1032(%rcx,%rdx), %xmm1 - movaps %xmm1, %xmm13 - mulsd %xmm0, %xmm1 - addsd %xmm14, %xmm0 - mulsd %xmm14, %xmm13 - movsd 1024(%rcx,%rdx), %xmm15 - mulsd %xmm0, %xmm15 - movl %r8d, (%rdi) - addsd %xmm15, %xmm1 - movsd %xmm13, (%rsi) - movsd %xmm1, 8(%rsi) - ret -..B1.8: - movzbl %dl, %edx - lea _inf_zeros(%rip), %rax - movl $0, (%rdi) - movq $0, 8(%rsi) - movq (%rax,%rdx,8), %rcx - movq %rcx, (%rsi) -..B1.9: - ret -..B1.10: - testl $1048575, -4(%rsp) - jne ..B1.13 -..B1.11: - cmpl $0, -8(%rsp) - jne ..B1.13 -..B1.12: - movzbl %dl, %edx - lea _inf_zeros(%rip), %rax - movsd (%rax,%rdx,8), %xmm0 - jmp ..B1.14 -..B1.13: - movsd -8(%rsp), %xmm0 -..B1.14: - movl $0, (%rdi) - movsd %xmm0, (%rsi) - movq $0, 8(%rsi) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_exp_k64,@function - .size __libm_exp_k64,.-__libm_exp_k64 - .data -# -- End __libm_exp_k64 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_inf_zeros: - .long 0 - .long 2146435072 - .long 0 - .long 0 - .type _inf_zeros,@object - .size _inf_zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_expl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_expl_k80.S deleted file mode 100644 index 5b62cc0fb1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_expl_k80.S +++ /dev/null @@ -1,395 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_expl_k80.c" - .text -..TXTST0: -# -- Begin __libm_expl_k80 - .text - .align 16,0x90 - .globl __libm_expl_k80 -__libm_expl_k80: -# parameter 1: %rdi -# parameter 2: %rsi -..B1.1: - .cfi_startproc -..___tag_value___libm_expl_k80.1: -..L2: - - fldt (%rsi) - movb 9(%rsi), %dl - movzwl 8(%rsi), %eax - andb $-128, %dl - andl $32767, %eax - shrb $7, %dl - fstpt -24(%rsp) - fldt -24(%rsp) - fldt 16(%rsi) - cmpl $32767, %eax - je ..B1.11 -..B1.2: - cmpl $16358, %eax - jge ..B1.7 -..B1.3: - cmpl $16183, %eax - jge ..B1.5 -..B1.4: - fstp %st(1) - fstp %st(0) - fldt .L_2il0floatpacket.0(%rip) - fstpt (%rdi) - fldt .L_2il0floatpacket.1(%rip) - fstpt 16(%rdi) - fldt 16(%rdi) - ret -..B1.5: - fldt .L_2il0floatpacket.0(%rip) - lea 16+_P1(%rip), %rax - lea _P1(%rip), %rdx - fldt (%rax) - fmul %st(3), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(3), %st - fmul %st(3), %st - faddp %st, %st(3) - fldt .L_2il0floatpacket.0(%rip) - fadd %st(3), %st - fstpt (%rdi) - fldt (%rdi) - fsubrp %st, %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.1(%rip) -..B1.6: - ret -..B1.7: - cmpl $16405, %eax - jge ..B1.9 -..B1.8: - fldt -24(%rsp) - lea _KLN2(%rip), %rdx - lea _TWO_63H(%rip), %rcx - lea _LN2K(%rip), %r8 - lea 16+_LN2K(%rip), %r9 - lea 64+_P(%rip), %r10 - lea 32+_P(%rip), %r11 - fldt (%rdx) - lea _P(%rip), %rdx - fmulp %st, %st(3) - fldt (%rcx) - lea 48+_P(%rip), %rcx - fadd %st, %st(3) - fxch %st(3) - fstpt -56(%rsp) - fldt -56(%rsp) - movl -56(%rsp), %esi - fsubp %st, %st(3) - fldt (%r8) - fmul %st(3), %st - fstpt -56(%rsp) - fxch %st(2) - fchs - fldt -56(%rsp) - movsbq %sil, %rax - fsubrp %st, %st(3) - fldt (%r9) - subl %eax, %esi - fmulp %st, %st(1) - fstpt -56(%rsp) - fldt -56(%rsp) - sarl $8, %esi - fadd %st(2), %st - fld %st(0) - movl %esi, -40(%rsp) - fsub %st(3), %st - fld %st(1) - lea 16+_P(%rip), %rsi - shlq $4, %rax - fsub %st(1), %st - movq __libm_expl_table_256@GOTPCREL(%rip), %r8 - fsubrp %st, %st(4) - fildl -40(%rsp) - fldt -56(%rsp) - fsubp %st, %st(2) - fxch %st(4) - faddp %st, %st(1) - fld %st(2) - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fld %st(3) - fsub %st(2), %st - fchs - fld %st(0) - fsubr %st(3), %st - fsubrp %st, %st(5) - fsubrp %st, %st(5) - fxch %st(3) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fldt (%r10) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldl 2056(%r8,%rax) - fldl 2048(%r8,%rax) - fld %st(0) - fmul %st(4), %st - fxch %st(3) - fadd %st, %st(4) - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fstpt (%rdi) - fldt (%rdi) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rdi) - ret -..B1.9: - fstp %st(1) - fstp %st(0) - fldt .L_2il0floatpacket.1(%rip) - lea _inf_zeros(%rip), %rax - movzbl %dl, %edx - fstpt 16(%rdi) - shlq $4, %rdx - fldt (%rax,%rdx) - fstpt (%rdi) - fldt (%rdi) -..B1.10: - ret -..B1.11: - fstp %st(0) - cmpl $-2147483648, -20(%rsp) - jne ..B1.15 -..B1.12: - cmpl $0, -24(%rsp) - jne ..B1.15 -..B1.13: - fstp %st(0) - movzbl %dl, %edx - lea _inf_zeros(%rip), %rax - shlq $4, %rdx - fldt (%rax,%rdx) -..B1.15: - fldt .L_2il0floatpacket.1(%rip) - fstpt 16(%rdi) - fstpt (%rdi) - fldt (%rdi) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_expl_k80,@function - .size __libm_expl_k80,.-__libm_expl_k80 - .data -# -- End __libm_expl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 2 -_P1: - .word 43691 - .word 10 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30584 - .word 43703 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,32 - .align 2 -_KLN2: - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 16391 - .word 0 - .word 0 - .word 0 - .type _KLN2,@object - .size _KLN2,16 - .align 2 -_TWO_63H: - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16446 - .word 0 - .word 0 - .word 0 - .type _TWO_63H,@object - .size _TWO_63H,16 - .align 2 -_LN2K: - .word 0 - .word 0 - .word 6134 - .word 45426 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 55756 - .word 58609 - .word 48341 - .word 59623 - .word 16343 - .word 0 - .word 0 - .word 0 - .type _LN2K,@object - .size _LN2K,32 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,80 - .align 2 -_inf_zeros: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _inf_zeros,@object - .size _inf_zeros,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_fegetenv.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_fegetenv.S deleted file mode 100644 index 69dc3ea79f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_fegetenv.S +++ /dev/null @@ -1,85 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_fegetenv.c" - .text -..TXTST0: -# -- Begin fegetenv - .text - .align 16,0x90 - .globl fegetenv -fegetenv: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value_fegetenv.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movq %rdi, (%rsp) -..B1.2: - stmxcsr 8(%rsp) -..B1.3: - movq (%rsp), %rdx - movl 8(%rsp), %eax - movl %eax, 28(%rdx) -..B1.4: - movq (%rsp), %rax -..B1.5: - fnstenv (%rax) -..B1.6: - fnclex -..B1.7: - fldenv (%rax) -..B1.8: - xorl %eax, %eax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type fegetenv,@function - .size fegetenv,.-fegetenv - .data -# -- End fegetenv - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_hypot2_k64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_hypot2_k64.S deleted file mode 100644 index 2217a31551..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_hypot2_k64.S +++ /dev/null @@ -1,320 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_hypot2_k64.c" - .text -..TXTST0: -# -- Begin __libm_hypot2_k64 - .text - .align 16,0x90 - .globl __libm_hypot2_k64 -__libm_hypot2_k64: -# parameter 1: %rdi -# parameter 2: %xmm0 -# parameter 3: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value___libm_hypot2_k64.1: -..L2: - - movsd %xmm0, -24(%rsp) - movzwl -18(%rsp), %eax - testl $32752, %eax - movsd %xmm1, -16(%rsp) - jne ..B1.8 -..B1.2: - testl $1048575, -20(%rsp) - jne ..B1.8 -..B1.3: - cmpl $0, -24(%rsp) - jne ..B1.8 -..B1.4: - movzwl -10(%rsp), %eax - testl $32752, %eax - jne ..B1.8 -..B1.5: - testl $1048575, -12(%rsp) - jne ..B1.8 -..B1.6: - cmpl $0, -16(%rsp) - jne ..B1.8 -..B1.7: - movq -24(%rsp), %rax - movq -16(%rsp), %rdx - pxor %xmm0, %xmm0 - movq %rax, (%rdi) - movq %rdx, 8(%rdi) - ret -..B1.8: - movsd -24(%rsp), %xmm0 - movsd -16(%rsp), %xmm2 - andps .L_2il0floatpacket.6(%rip), %xmm0 - andps .L_2il0floatpacket.6(%rip), %xmm2 - comisd %xmm2, %xmm0 - jbe ..B1.10 -..B1.9: - movsd %xmm0, -8(%rsp) - movaps %xmm0, %xmm1 - jmp ..B1.11 -..B1.10: - movsd %xmm2, -8(%rsp) - movaps %xmm2, %xmm1 - movaps %xmm0, %xmm2 -..B1.11: - movsd %xmm2, -16(%rsp) - movzwl -10(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - testl %eax, %eax - je ..B1.13 -..B1.12: - addl $-1023, %eax - jmp ..B1.17 -..B1.13: - testl $1048575, -12(%rsp) - jne ..B1.16 -..B1.14: - cmpl $0, -16(%rsp) - jne ..B1.16 -..B1.15: - movl $-10000, %eax - jmp ..B1.17 -..B1.16: - lea 48+_CONSTANTS(%rip), %rax - movaps %xmm2, %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -24(%rsp) - movzwl -18(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - addl $-2046, %eax -..B1.17: - movzwl -2(%rsp), %edx - andl $32752, %edx - shrl $4, %edx - testl %edx, %edx - je ..B1.19 -..B1.18: - addl $-1023, %edx - jmp ..B1.20 -..B1.19: - lea 48+_CONSTANTS(%rip), %rax - movaps %xmm1, %xmm0 - addl $-2046, %edx - mulsd (%rax), %xmm0 - movsd %xmm0, -24(%rsp) - movzwl -18(%rsp), %eax - andl $32752, %eax - shrl $4, %eax -..B1.20: - addl $-56, %edx - cmpl %edx, %eax - lea _CONSTANTS(%rip), %rax - pxor %xmm0, %xmm0 - jg ..L3 - movaps %xmm0, %xmm2 -..L3: - comisd (%rax), %xmm1 - jb ..B1.22 -..B1.21: - lea 40+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm2 - movsd %xmm1, -8(%rsp) - movsd %xmm2, -16(%rsp) - movsd .L_2il0floatpacket.0(%rip), %xmm0 - jmp ..B1.28 -..B1.22: - lea 8+_CONSTANTS(%rip), %rax - comisd (%rax), %xmm1 - jb ..B1.24 -..B1.23: - lea 40+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm2 - movsd %xmm1, -8(%rsp) - movsd %xmm2, -16(%rsp) - movsd .L_2il0floatpacket.3(%rip), %xmm0 - jmp ..B1.28 -..B1.24: - lea 16+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm3 - comisd %xmm1, %xmm3 - jb ..B1.26 -..B1.25: - lea 32+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm2 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm2 - movsd %xmm1, -8(%rsp) - movsd %xmm2, -16(%rsp) - movsd .L_2il0floatpacket.4(%rip), %xmm0 - jmp ..B1.28 -..B1.26: - lea 24+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm3 - comisd %xmm1, %xmm3 - jb ..B1.28 -..B1.27: - lea 32+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm2 - movsd %xmm1, -8(%rsp) - movsd %xmm2, -16(%rsp) - movsd .L_2il0floatpacket.5(%rip), %xmm0 -..B1.28: - movsd .L_2il0floatpacket.1(%rip), %xmm9 - mulsd %xmm1, %xmm9 - movaps %xmm9, %xmm3 - movsd .L_2il0floatpacket.1(%rip), %xmm14 - subsd %xmm1, %xmm3 - mulsd %xmm2, %xmm14 - subsd %xmm3, %xmm9 - movsd .L_2il0floatpacket.2(%rip), %xmm5 - movaps %xmm9, %xmm6 - mulsd %xmm9, %xmm6 - subsd %xmm9, %xmm1 - mulsd %xmm5, %xmm9 - movaps %xmm14, %xmm4 - movaps %xmm6, %xmm8 - mulsd %xmm1, %xmm9 - subsd %xmm2, %xmm4 - mulsd %xmm1, %xmm1 - subsd %xmm4, %xmm14 - addsd %xmm9, %xmm8 - subsd %xmm14, %xmm2 - movaps %xmm14, %xmm12 - movaps %xmm8, %xmm7 - mulsd %xmm14, %xmm12 - subsd %xmm6, %xmm7 - mulsd %xmm5, %xmm14 - subsd %xmm7, %xmm9 - mulsd %xmm2, %xmm14 - mulsd %xmm2, %xmm2 - addsd %xmm1, %xmm9 - movaps %xmm8, %xmm10 - addsd %xmm12, %xmm10 - movaps %xmm10, %xmm13 - movaps %xmm10, %xmm1 - addsd %xmm14, %xmm13 - subsd %xmm8, %xmm1 - movaps %xmm13, %xmm11 - subsd %xmm1, %xmm12 - subsd %xmm10, %xmm11 - addsd %xmm9, %xmm12 - subsd %xmm11, %xmm14 - movsd %xmm13, (%rdi) - addsd %xmm12, %xmm14 - addsd %xmm2, %xmm14 - movsd %xmm14, 8(%rdi) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_hypot2_k64,@function - .size __libm_hypot2_k64,.-__libm_hypot2_k64 - .data -# -- End __libm_hypot2_k64 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.6: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x40a00800 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x02000000,0x41a00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x40900800 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x00000000,0xc0a00800 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x00000000,0xc0900800 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 4 -_CONSTANTS: - .long 0 - .long 1727004672 - .long 4294967295 - .long 1608515583 - .long 4294967295 - .long 481296383 - .long 0 - .long 651165696 - .long 0 - .long 1610612736 - .long 0 - .long 534773760 - .long 0 - .long 2145386496 - .long 0 - .long 1126170624 - .type _CONSTANTS,@object - .size _CONSTANTS,64 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_hypot2l_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_hypot2l_k80.S deleted file mode 100644 index 46053cd7bb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_hypot2l_k80.S +++ /dev/null @@ -1,496 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_hypot2l_k80.c" - .text -..TXTST0: -# -- Begin __libm_hypot2l_k80 - .text - .align 16,0x90 - .globl __libm_hypot2l_k80 -__libm_hypot2l_k80: -# parameter 1: %rdi -# parameter 2: 8 + %rsp -# parameter 3: 24 + %rsp -..B1.1: - .cfi_startproc -..___tag_value___libm_hypot2l_k80.1: -..L2: - - movzwl 16(%rsp), %eax - testl $32767, %eax - jne ..B1.6 -..B1.2: - cmpq $0, 8(%rsp) - jne ..B1.6 -..B1.3: - movzwl 32(%rsp), %eax - testl $32767, %eax - jne ..B1.6 -..B1.4: - cmpq $0, 24(%rsp) - jne ..B1.6 -..B1.5: - fldt 8(%rsp) - fstpt (%rdi) - fldt 24(%rsp) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.0(%rip) - ret -..B1.6: - fldt 8(%rsp) - fabs - fstpt -56(%rsp) - fldt -56(%rsp) - fldt 24(%rsp) - fabs - fstpt -24(%rsp) - fldt -24(%rsp) - movzwl -48(%rsp), %ecx - movzwl -16(%rsp), %esi - andl $32767, %ecx - andl $32767, %esi - cmpl %esi, %ecx - jg ..B1.11 -..B1.7: - jne ..B1.12 -..B1.8: - movl -52(%rsp), %eax - movl -20(%rsp), %edx - cmpl %edx, %eax - ja ..B1.57 -..B1.9: - jne ..B1.56 -..B1.10: - movl -56(%rsp), %eax - cmpl -24(%rsp), %eax - jbe ..B1.56 -..B1.57: - cmpl %esi, %ecx -..B1.11: - fxch %st(1) - fstpt -40(%rsp) - fldt -40(%rsp) - fld %st(0) - fxch %st(2) - fxch %st(1) - fxch %st(2) - jl ..B1.18 - jmp ..B1.14 -..B1.12: - fstpt -40(%rsp) - fldt -40(%rsp) - fld %st(0) -..B1.13: - jl ..B1.18 -..B1.14: - jne ..B1.19 -..B1.15: - movl -52(%rsp), %eax - movl -20(%rsp), %edx - cmpl %edx, %eax - jb ..B1.18 -..B1.16: - jne ..B1.19 -..B1.17: - movl -56(%rsp), %eax - cmpl -24(%rsp), %eax - jae ..B1.19 -..B1.18: - fstp %st(1) - fxch %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - jmp ..B1.20 -..B1.19: - fstp %st(2) - fstpt -24(%rsp) - fldt -24(%rsp) -..B1.20: - movswl -16(%rsp), %ecx - testl %ecx, %ecx - je ..B1.22 -..B1.21: - addl $-16383, %ecx - jmp ..B1.26 -..B1.22: - movzwl -16(%rsp), %eax - testl $32767, %eax - jne ..B1.25 -..B1.23: - cmpq $0, -24(%rsp) - jne ..B1.25 -..B1.24: - movl $-16526, %ecx - jmp ..B1.26 -..B1.25: - lea 96+_CONSTANTS(%rip), %rax - lea 112+_CONSTANTS(%rip), %rdx - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - fmulp %st, %st(1) - fstpt -56(%rsp) - movswl -48(%rsp), %ecx - addl $-32828, %ecx -..B1.26: - movswl -32(%rsp), %eax - testl %eax, %eax - je ..B1.28 -..B1.27: - addl $-16383, %eax - jmp ..B1.29 -..B1.28: - lea 96+_CONSTANTS(%rip), %rax - lea 112+_CONSTANTS(%rip), %rdx - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - fmulp %st, %st(1) - fstpt -56(%rsp) - movswl -48(%rsp), %eax - addl $-32828, %eax -..B1.29: - fldt .L_2il0floatpacket.0(%rip) - addl $-67, %eax - cmpl %eax, %ecx - movzwl -32(%rsp), %eax - jg ..L3 - fst %st(1) -..L3: - andl $32767, %eax - cmpl $24709, %eax - jg ..B1.34 -..B1.30: - jne ..B1.35 -..B1.31: - lea _CONSTANTS(%rip), %rcx - movl -36(%rsp), %edx - cmpl 4(%rcx), %edx - ja ..B1.34 -..B1.32: - jne ..B1.35 -..B1.33: - movl -40(%rsp), %edx - cmpl (%rcx), %edx - jb ..B1.35 -..B1.34: - fstp %st(0) - lea 80+_CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st, %st(2) - fmul %st, %st(2) - fxch %st(2) - fstpt -40(%rsp) - fldt -40(%rsp) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(2) - fxch %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - fldt .L_2il0floatpacket.1(%rip) - jmp ..B1.53 -..B1.35: - cmpl $24573, %eax - jg ..B1.40 -..B1.36: - jne ..B1.41 -..B1.37: - lea 16+_CONSTANTS(%rip), %rcx - movl -36(%rsp), %edx - cmpl 4(%rcx), %edx - ja ..B1.40 -..B1.38: - jne ..B1.41 -..B1.39: - movl -40(%rsp), %edx - cmpl (%rcx), %edx - jb ..B1.41 -..B1.40: - fstp %st(0) - lea 80+_CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - fstpt -40(%rsp) - fldt -40(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - fldt .L_2il0floatpacket.4(%rip) - jmp ..B1.53 -..B1.41: - cmpl $8127, %eax - jl ..B1.46 -..B1.42: - jne ..B1.47 -..B1.43: - lea 32+_CONSTANTS(%rip), %rcx - movl -36(%rsp), %edx - cmpl 4(%rcx), %edx - jb ..B1.46 -..B1.44: - jne ..B1.47 -..B1.45: - movl -40(%rsp), %edx - cmpl (%rcx), %edx - ja ..B1.47 -..B1.46: - fstp %st(0) - lea 64+_CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st, %st(2) - fmul %st, %st(2) - fxch %st(2) - fstpt -40(%rsp) - fldt -40(%rsp) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(2) - fxch %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - fldt .L_2il0floatpacket.5(%rip) - jmp ..B1.53 -..B1.47: - cmpl $8323, %eax - jl ..B1.52 -..B1.48: - jne ..B1.53 -..B1.49: - lea 48+_CONSTANTS(%rip), %rdx - movl -36(%rsp), %eax - cmpl 4(%rdx), %eax - jb ..B1.52 -..B1.50: - jne ..B1.53 -..B1.51: - movl -40(%rsp), %eax - cmpl (%rdx), %eax - ja ..B1.53 -..B1.52: - fstp %st(0) - lea 64+_CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - fstpt -40(%rsp) - fldt -40(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - fldt .L_2il0floatpacket.6(%rip) -..B1.53: - fldt .L_2il0floatpacket.2(%rip) - fmul %st(3), %st - fld %st(3) - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fld %st(3) - fxch %st(2) - fsubr %st, %st(5) - fldt .L_2il0floatpacket.2(%rip) - fmul %st(5), %st - fsub %st, %st(3) - fsubp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(5) - fldt .L_2il0floatpacket.3(%rip) - fmul %st, %st(2) - fxch %st(2) - fmul %st(7), %st - fxch %st(2) - fmulp %st, %st(1) - fmul %st(5), %st - fld %st(2) - fadd %st(2), %st - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(2) - fxch %st(6) - fmul %st(0), %st - faddp %st, %st(1) - fld %st(1) - fadd %st(3), %st - fld %st(0) - fadd %st(7), %st - fstpt (%rdi) - fldt (%rdi) - fxch %st(1) - fsub %st, %st(3) - fxch %st(3) - fsubrp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fxch %st(4) - fmul %st(0), %st - fxch %st(4) - fsubp %st, %st(1) - fsubrp %st, %st(4) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rdi) - ret -..B1.56: - cmpl %esi, %ecx - jmp ..B1.12 - .align 16,0x90 - .cfi_endproc - .type __libm_hypot2l_k80,@function - .size __libm_hypot2l_k80,.-__libm_hypot2l_k80 - .data -# -- End __libm_hypot2l_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0e,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0d,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0e,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x80,0x0d,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24709 - .word 0 - .word 0 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 24573 - .word 0 - .word 0 - .word 0 - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 8127 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8323 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24576 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8190 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16445 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,128 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log1pl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log1pl_k80.S deleted file mode 100644 index 0f91f7acfd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log1pl_k80.S +++ /dev/null @@ -1,2003 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_log1pl_k80.c" - .text -..TXTST0: -# -- Begin __libm_log1p_k80 - .text - .align 16,0x90 - .globl __libm_log1p_k80 -__libm_log1p_k80: -# parameter 1: %rdi -# parameter 2: %rsi -..B1.1: - .cfi_startproc -..___tag_value___libm_log1p_k80.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - subq $120, %rsp - .cfi_def_cfa_offset 144 - movq %rsi, %r14 - movq %fs:40, %rax - movq %rdi, %r13 - xorq %rsp, %rax - movq %rax, 112(%rsp) - movzwl 8(%r14), %edx - andl $32767, %edx - movl 32(%r14), %ecx - lea (%rcx,%rdx), %eax - cmpl $16511, %eax - jge ..B1.9 -..B1.2: - cmpl $16255, %eax - jle ..B1.8 -..B1.3: - addl $-8383, %edx - cmpl $16000, %edx - jbe ..B1.6 -..B1.4: - movq %r14, %rdi -..___tag_value___libm_log1p_k80.8: - call __libm_normalizel_k80@PLT -..___tag_value___libm_log1p_k80.9: -..B1.5: - movl 32(%r14), %ecx -..B1.6: - fldt (%r14) - addl $16383, %ecx - fldt 16(%r14) - andl $32767, %ecx - andb $127, 9(%rsp) - lea 80(%rsp), %rdi - movzwl -72(%rdi), %eax - lea 48(%rsp), %rsi - andl $-32768, %eax - orl %ecx, %eax - movw %ax, -40(%rsi) - movl $-2147483648, -44(%rsi) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt (%rsi) - fmulp %st, %st(1) - fstpt 16(%rsi) -..___tag_value___libm_log1p_k80.10: - call __libm_log1pl_k80@PLT -..___tag_value___libm_log1p_k80.11: -..B1.7: - fldt 80(%rsp) - fmul %st(1), %st - movl $0, 32(%r13) - fstpt (%r13) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpt 16(%r13) - jmp ..B1.19 -..B1.8: - movq (%r14), %rax - movq %rax, (%r13) - movq 8(%r14), %rdx - movq %rdx, 8(%r13) - movq 16(%r14), %rcx - movq %rcx, 16(%r13) - movq 24(%r14), %rsi - movq %rsi, 24(%r13) - movq 32(%r14), %r8 - movq %r8, 32(%r13) - movq 40(%r14), %rdi - movq %rdi, 40(%r13) - jmp ..B1.19 -..B1.9: - movq %r14, %rdi -..___tag_value___libm_log1p_k80.12: - call __libm_normalizel_k80@PLT -..___tag_value___libm_log1p_k80.13: -..B1.10: - fildl 32(%r14) - fstpt (%rsp) - fldt (%r14) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt 16(%r14) - fstpt 64(%rsp) - fldt 64(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 176 - lea 112(%rsp), %rdi - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_log1p_k80.15: - call __libm_logl_k80@PLT -..___tag_value___libm_log1p_k80.16: -..B1.25: - addq $32, %rsp - .cfi_def_cfa_offset 144 -..B1.11: - fldt 80(%rsp) - lea _LN2_K80(%rip), %rax - lea 16+_LN2_K80(%rip), %rdx - fmul %st(1), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fldt 96(%rsp) - fmulp %st, %st(2) - movzwl 88(%rsp), %esi - andl $32767, %esi - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fldt (%rax) - fldt (%rsp) - fmul %st, %st(1) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fld %st(0) - movzwl 24(%rsp), %ecx - fadd %st(4), %st - fldt (%rdx) - andl $32767, %ecx - fmulp %st, %st(3) - cmpl %esi, %ecx - fxch %st(2) - fstpt 32(%rsp) - fldt 32(%rsp) - movl $0, 32(%r13) - jg ..B1.16 -..B1.12: - jne ..B1.17 -..B1.13: - movl 20(%rsp), %eax - movl 84(%rsp), %edx - cmpl %edx, %eax - ja ..B1.16 -..B1.14: - jne ..B1.17 -..B1.15: - movl 16(%rsp), %eax - cmpl 80(%rsp), %eax - jbe ..B1.17 -..B1.16: - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.18 -..B1.17: - fxch %st(2) - fsubr %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) -..B1.18: - fld %st(1) - fadd %st(1), %st - fstpt (%r13) - fldt (%r13) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%r13) -..B1.19: - movq 112(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.21 -..B1.20: - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 13, -16 - .cfi_offset 14, -24 -..B1.21: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __libm_log1p_k80,@function - .size __libm_log1p_k80,.-__libm_log1p_k80 - .data -# -- End __libm_log1p_k80 - .text -# -- Begin __libm_log1pl_k80 - .text - .align 16,0x90 - .globl __libm_log1pl_k80 -__libm_log1pl_k80: -# parameter 1: %rdi -# parameter 2: %rsi -..B2.1: - .cfi_startproc -..___tag_value___libm_log1pl_k80.27: -..L28: - - subq $440, %rsp - .cfi_def_cfa_offset 448 - movq %rsi, %rax - movq %fs:40, %rdx - movq %rdi, %r9 - xorq %rsp, %rdx - lea zeros(%rip), %r8 - movq %rdx, 432(%rsp) - fldt (%rax) - fld %st(0) - fldt 16(%rax) - fadd %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fsub %st, %st(2) - movzbl 9(%rsp), %edi - fxch %st(2) - fsubrp %st, %st(1) - fldt (%r8) - andl $128, %edi - shrl $7, %edi - movl %edi, %edx - movzwl 8(%rsp), %esi - shll $15, %edx - andl $32767, %esi - movl 4(%rsp), %r10d - orl %esi, %edx - movl %r10d, %ecx - shll $16, %edx - shrl $16, %ecx - orl %ecx, %edx - fstpt 16(%r9) - fldt 16(%r9) - cmpl $32767, %esi - je ..B2.115 -..B2.2: - cmpl $-1073774592, %edx - jae ..B2.101 -..B2.3: - fstp %st(1) - fstpt (%r9) - fldt (%r9) -..B2.4: - cmpl $16375, %esi - jge ..B2.52 -..B2.5: - fstp %st(0) - cmpl $16363, %esi - jge ..B2.30 -..B2.6: - fstp %st(0) - cmpl $16298, %esi - jge ..B2.8 -..B2.7: - fldt (%rax) - fstpt (%r9) - fldt 16(%rax) - lea ones(%rip), %rax - fstpt 16(%r9) - fldt (%rax) - jmp ..B2.104 -..B2.8: - fldt (%rax) - lea t32(%rip), %rdx - fld %st(0) - fld %st(1) - lea 32+_S(%rip), %rcx - lea _S(%rip), %rsi - lea 16+_S(%rip), %rdi - lea 64+_S(%rip), %r8 - fldt (%rdx) - fmul %st, %st(2) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(2) - fld %st(1) - fld %st(3) - fsub %st(3), %st - fmul %st, %st(1) - fxch %st(1) - fadd %st(0), %st - fld %st(0) - fld %st(4) - fmul %st(5), %st - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(2) - fld %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(5) - fxch %st(4) - fstpt 16(%rsp) - fldt 16(%rsp) - fxch %st(5) - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(3) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt 16(%rax) - fmulp %st, %st(5) - fxch %st(4) - fadd %st(0), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fmul %st, %st(5) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fldt (%rcx) - fld %st(0) - fmul %st(2), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fxch %st(1) - fmul %st(3), %st - fstpt (%rsp) - fldt (%rsp) - fstpt 320(%rsp) - fld %st(1) - fsub %st(6), %st - faddp %st, %st(6) - fld %st(1) - fsub %st(6), %st - fxch %st(1) - fstpt 304(%rsp) - fxch %st(6) - fmulp %st, %st(2) - fld %st(2) - fmul %st(5), %st - fxch %st(3) - fmul %st(6), %st - fxch %st(4) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fld %st(3) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(4) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fldt 16(%rax) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt (%rsi) - fld %st(0) - fld %st(1) - fldt 16(%rsp) - fld %st(0) - fmul %st(4), %st - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(1) - fsub %st(2), %st - fxch %st(1) - fmul %st(6), %st - fsubr %st, %st(4) - faddp %st, %st(4) - fxch %st(3) - fstpt 80(%rsp) - fldt 80(%rsp) - fld %st(5) - fsub %st(1), %st - fld %st(2) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(2) - fmul %st(4), %st - fldt (%rdi) - fmul %st(6), %st - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 336(%rsp) - fldt 336(%rsp) - fsubr %st, %st(1) - movzwl 344(%rsp), %r10d - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - andl $32767, %r10d - fstpt 352(%rsp) - fldt 32(%rsp) - fld %st(0) - fxch %st(1) - fmul %st(3), %st - fldt 80(%rsp) - fmul %st, %st(2) - fldt 48(%rsp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fld %st(1) - fldt (%rax) - fmul %st, %st(5) - fldt 16(%rax) - fmulp %st, %st(7) - fxch %st(6) - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fldt (%r8) - fmul %st, %st(4) - fxch %st(4) - fstpt 368(%rsp) - fldt 368(%rsp) - fadd %st, %st(1) - fxch %st(4) - fmulp %st, %st(3) - movzwl 376(%rsp), %r11d - andl $32767, %r11d - fxch %st(2) - fstpt 384(%rsp) - fldt 384(%rsp) - cmpl %r11d, %r10d - fldt 64(%rsp) - fldt 96(%rsp) - jg ..B2.13 -..B2.9: - jne ..B2.14 -..B2.10: - movl 340(%rsp), %edx - movl 372(%rsp), %ecx - cmpl %ecx, %edx - ja ..B2.13 -..B2.11: - jne ..B2.14 -..B2.12: - movl 336(%rsp), %edx - cmpl 368(%rsp), %edx - jbe ..B2.14 -..B2.13: - fxch %st(3) - fsub %st(4), %st - faddp %st, %st(5) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - jmp ..B2.15 -..B2.14: - fxch %st(4) - fsubr %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) -..B2.15: - fld %st(2) - movzwl 312(%rsp), %edx - fadd %st(1), %st - fstpt 400(%rsp) - fldt 400(%rsp) - andl $32767, %edx - movzwl 408(%rsp), %ecx - fld %st(2) - andl $32767, %ecx - fadd %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - cmpl %ecx, %edx - fxch %st(2) - faddp %st, %st(4) - fxch %st(3) - fstpt 416(%rsp) - fldt 416(%rsp) - jg ..B2.20 -..B2.16: - jne ..B2.21 -..B2.17: - movl 308(%rsp), %edx - movl 404(%rsp), %ecx - cmpl %ecx, %edx - ja ..B2.20 -..B2.18: - jne ..B2.21 -..B2.19: - movl 304(%rsp), %edx - cmpl 400(%rsp), %edx - jbe ..B2.21 -..B2.20: - fldt (%rsp) - fxch %st(3) - fsub %st(4), %st - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.22 -..B2.21: - fldt (%rsp) - fxch %st(2) - fsub %st(4), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) -..B2.22: - fld %st(0) - movzwl 8(%rax), %edx - fadd %st(2), %st - fstpt 272(%rsp) - fldt 272(%rsp) - andl $32767, %edx - movzwl 280(%rsp), %ecx - fsubr %st, %st(2) - andl $32767, %ecx - fxch %st(2) - faddp %st, %st(1) - fstpt 288(%rsp) - fldt 288(%rsp) - cmpl %ecx, %edx - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 16(%r9) - fldt 16(%r9) - jg ..B2.27 -..B2.23: - jne ..B2.28 -..B2.24: - movl 276(%rsp), %edx - cmpl 4(%rax), %edx - jb ..B2.27 -..B2.25: - jne ..B2.28 -..B2.26: - movl (%rax), %edx - cmpl 272(%rsp), %edx - jbe ..B2.28 -..B2.27: - fldt (%rax) - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%rax) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - jmp ..B2.29 -..B2.28: - fldt (%rax) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 16(%rax) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) -..B2.29: - fld %st(1) - lea ones(%rip), %rax - fadd %st(1), %st - fstpt (%r9) - fldt (%r9) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%r9) - fldt (%rax) - jmp ..B2.104 -..B2.30: - fldt (%rax) - lea t32(%rip), %rdx - fld %st(0) - fld %st(1) - fld %st(2) - lea _S(%rip), %rcx - fxch %st(4) - fstpt 48(%rsp) - lea 16+_S(%rip), %rsi - fldt (%rdx) - lea 32+_S(%rip), %rdi - fmul %st, %st(2) - lea 176+_S(%rip), %r10 - lea 64+_S(%rip), %r8 - lea 160+_S(%rip), %r11 - lea 144+_S(%rip), %rdx - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(2) - fld %st(1) - fld %st(2) - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(5) - fxch %st(1) - fmul %st(5), %st - fadd %st(0), %st - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fld %st(5) - fmul %st(6), %st - faddp %st, %st(4) - fld %st(4) - fxch %st(3) - fstpt 64(%rsp) - fldt 64(%rsp) - fxch %st(2) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt 16(%rax) - fmulp %st, %st(4) - fxch %st(3) - fadd %st(0), %st - faddp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fld %st(3) - fmul %st(3), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fxch %st(4) - fstpt 16(%rsp) - fldt 16(%rsp) - fld %st(1) - fsub %st(3), %st - fmul %st, %st(4) - fxch %st(3) - fmul %st(7), %st - faddp %st, %st(4) - fld %st(3) - fadd %st(5), %st - fsubr %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(2) - fmul %st(6), %st - faddp %st, %st(4) - fld %st(4) - fmulp %st, %st(2) - fstpt 96(%rsp) - fldt 96(%rsp) - fldt 16(%rax) - fldt 64(%rsp) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fmul %st, %st(3) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - fld %st(1) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fld %st(1) - fsub %st(1), %st - fldt 80(%rsp) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st(2), %st - fxch %st(3) - fmul %st(7), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fldt 16(%rax) - fmul %st(3), %st - faddp %st, %st(5) - faddp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fstpt 128(%rsp) - fldt 128(%rsp) - faddp %st, %st(3) - fldt 48(%rsp) - fmulp %st, %st(3) - fxch %st(2) - fstpt (%rsp) - fldt (%rcx) - lea 128+_S(%rip), %rcx - fld %st(0) - fld %st(1) - fxch %st(2) - fmul %st, %st(3) - fldt 64(%rsp) - fmulp %st, %st(1) - fsubr %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fmul %st(5), %st - fxch %st(2) - fmul %st, %st(5) - fldt 112(%rsp) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(4) - fldt 16(%rsp) - fldt (%rsi) - lea 112+_S(%rip), %rsi - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fstpt 336(%rsp) - fldt 336(%rsp) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fstpt 352(%rsp) - fldt 352(%rsp) - fldt (%rdi) - lea 96+_S(%rip), %rdi - fmul %st, %st(2) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 320(%rsp) - fldt 96(%rsp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 304(%rsp) - fldt 304(%rsp) - fldt (%r8) - lea 80+_S(%rip), %r8 - fldt 32(%rsp) - fmul %st(1), %st - fstpt 368(%rsp) - fldt 368(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fldt 128(%rsp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 384(%rsp) - fldt 384(%rsp) - fldt (%r10) - fldt 48(%rsp) - fmul %st, %st(1) - fldt (%r11) - movzwl 344(%rsp), %r10d - faddp %st, %st(2) - fmul %st, %st(1) - andl $32767, %r10d - fldt (%rdx) - movzwl 376(%rsp), %edx - faddp %st, %st(2) - fmul %st, %st(1) - andl $32767, %edx - fldt (%rcx) - cmpl %edx, %r10d - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rsi) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rdi) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt (%r8) - faddp %st, %st(1) - fld %st(5) - faddp %st, %st(3) - fldt (%rsp) - fmulp %st, %st(1) - fstpt (%rsp) - fldt (%rax) - jg ..B2.35 -..B2.31: - jne ..B2.36 -..B2.32: - movl 340(%rsp), %edx - movl 372(%rsp), %ecx - cmpl %ecx, %edx - ja ..B2.35 -..B2.33: - jne ..B2.36 -..B2.34: - movl 336(%rsp), %edx - cmpl 368(%rsp), %edx - jbe ..B2.36 -..B2.35: - fldt 32(%rsp) - fxch %st(3) - fsubr %st, %st(6) - fxch %st(3) - faddp %st, %st(6) - fxch %st(1) - faddp %st, %st(5) - fxch %st(3) - faddp %st, %st(4) - jmp ..B2.37 -..B2.36: - fldt 32(%rsp) - fsub %st(3), %st - faddp %st, %st(6) - fxch %st(4) - faddp %st, %st(5) - faddp %st, %st(4) -..B2.37: - fld %st(3) - movzwl 312(%rsp), %edx - fadd %st(1), %st - fstpt 400(%rsp) - fldt 400(%rsp) - andl $32767, %edx - movzwl 408(%rsp), %ecx - fsubr %st, %st(1) - andl $32767, %ecx - fxch %st(1) - faddp %st, %st(4) - fxch %st(3) - fstpt 416(%rsp) - fldt 416(%rsp) - fld %st(1) - cmpl %ecx, %edx - fadd %st(4), %st - jg ..B2.42 -..B2.38: - jne ..B2.43 -..B2.39: - movl 308(%rsp), %edx - movl 404(%rsp), %ecx - cmpl %ecx, %edx - ja ..B2.42 -..B2.40: - jne ..B2.43 -..B2.41: - movl 304(%rsp), %edx - cmpl 400(%rsp), %edx - jbe ..B2.43 -..B2.42: - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 16(%rsp) - faddp %st, %st(1) - fxch %st(2) - jmp ..B2.44 -..B2.43: - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fldt 16(%rsp) - faddp %st, %st(4) - faddp %st, %st(3) -..B2.44: - fld %st(2) - movzwl 8(%rax), %edx - fadd %st(1), %st - fstpt 272(%rsp) - fldt 272(%rsp) - andl $32767, %edx - movzwl 280(%rsp), %ecx - fsubr %st, %st(1) - andl $32767, %ecx - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - fstpt 288(%rsp) - fldt 288(%rsp) - cmpl %ecx, %edx - fxch %st(1) - fadd %st(2), %st - fstpt 16(%r9) - fldt 16(%r9) - jg ..B2.49 -..B2.45: - jne ..B2.50 -..B2.46: - movl 276(%rsp), %edx - cmpl 4(%rax), %edx - jb ..B2.49 -..B2.47: - jne ..B2.50 -..B2.48: - movl (%rax), %edx - cmpl 272(%rsp), %edx - jbe ..B2.50 -..B2.49: - fldt (%rax) - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%rax) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - jmp ..B2.51 -..B2.50: - fldt (%rax) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 16(%rax) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) -..B2.51: - fld %st(1) - lea ones(%rip), %rax - fadd %st(1), %st - fstpt (%r9) - fldt (%r9) - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt (%rsp) - faddp %st, %st(1) - fstpt 16(%r9) - fldt (%rax) - jmp ..B2.104 -..B2.52: - fstp %st(1) - fldt (%rax) - lea ones(%rip), %r8 - movzwl 8(%rax), %edx - fld %st(0) - andl $32767, %edx - fldt (%r8) - movzwl 8(%r8), %edi - movl %edi, %esi - andl $32767, %esi - fadd %st, %st(1) - cmpl %esi, %edx - jg ..B2.57 -..B2.53: - jne ..B2.58 -..B2.54: - movl 4(%rax), %edx - cmpl 4(%r8), %edx - ja ..B2.57 -..B2.55: - jne ..B2.58 -..B2.56: - movl (%rax), %edx - cmpl (%r8), %edx - jbe ..B2.58 -..B2.57: - fldt 16(%rax) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - fadd %st, %st(3) - fxch %st(3) - fadd %st(4), %st - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.59 -..B2.58: - fldt 16(%rax) - fld %st(1) - fsub %st(3), %st - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - fadd %st(3), %st -..B2.59: - fld %st(0) - movq __libm_rcp_table_256@GOTPCREL(%rip), %r10 - fadd %st(2), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubr %st, %st(2) - movzwl 120(%rsp), %ecx - fxch %st(2) - faddp %st, %st(1) - movl 116(%rsp), %eax - andl $32767, %ecx - shrl $23, %eax - movzbl %al, %eax - fstpt 128(%rsp) - fldt 128(%rsp) - lea -16383(%rcx), %edx - cmpl $16383, %edx - flds (%r10,%rax,4) - jge ..B2.61 -..B2.60: - movl %edx, %r10d - andl $-32768, %edi - negl %r10d - addl $16383, %r10d - andl $32767, %r10d - fxch %st(3) - fstpt (%rsp) - fldt (%rsp) - orl %r10d, %edi - movw %di, 8(%rsp) - fldt (%rsp) - fxch %st(1) - fxch %st(4) - fxch %st(1) - jmp ..B2.62 -..B2.61: - lea _CONSTANTS(%rip), %rdi - fldt (%rdi) -..B2.62: - movzwl 136(%rsp), %edi - andl $32767, %edi - addl $128, %edi - fmul %st, %st(3) - cmpl %edi, %ecx - jge ..B2.64 -..B2.63: - fmulp %st, %st(2) - fxch %st(1) - jmp ..B2.65 -..B2.64: - fstp %st(0) - fstp %st(1) - fld %st(3) -..B2.65: - movl %edx, 96(%rsp) - lea _LN2(%rip), %rdx - fildl 96(%rsp) - lea 16+_LN2(%rip), %rcx - fxch %st(4) - fstpt 64(%rsp) - shlq $4, %rax - movq __libm_logl_table_256@GOTPCREL(%rip), %rdi - fstpt 80(%rsp) - fld %st(1) - fldt (%rdx) - fmul %st(4), %st - fldt (%rcx) - fmulp %st, %st(5) - fld %st(3) - fxch %st(1) - faddl (%rax,%rdi) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 240(%rsp) - fld %st(3) - fxch %st(4) - fmul %st(6), %st - fxch %st(5) - faddl 8(%rdi,%rax) - lea t32(%rip), %rax - fstpt (%rsp) - fld %st(2) - fldt (%rax) - fmul %st, %st(3) - fxch %st(3) - fsubr %st, %st(5) - faddp %st, %st(5) - fxch %st(1) - fsub %st(4), %st - fxch %st(1) - fmul %st(2), %st - fxch %st(2) - fstpt 32(%rsp) - fld %st(2) - fsub %st(2), %st - faddp %st, %st(2) - fld %st(2) - fsub %st(2), %st - fld %st(4) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(5) - fxch %st(3) - faddp %st, %st(5) - fld %st(4) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(5) - faddp %st, %st(2) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 80(%rsp) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubr %st, %st(1) - movzwl 120(%rsp), %r10d - fxch %st(1) - faddp %st, %st(2) - andl $32767, %r10d - fxch %st(1) - fstpt 128(%rsp) - fldt 128(%rsp) - cmpl %esi, %r10d - fldt 64(%rsp) - fld %st(0) - fsubr %st(3), %st - fstpt 48(%rsp) - jg ..B2.70 -..B2.66: - jne ..B2.71 -..B2.67: - movl 116(%rsp), %eax - cmpl 4(%r8), %eax - ja ..B2.70 -..B2.68: - jne ..B2.71 -..B2.69: - movl 112(%rsp), %eax - cmpl (%r8), %eax - jbe ..B2.71 -..B2.70: - fldt 48(%rsp) - fsubrp %st, %st(3) - fsubr %st, %st(2) - fxch %st(3) - fsubrp %st, %st(2) - faddp %st, %st(1) - jmp ..B2.72 -..B2.71: - fldt 48(%rsp) - fadd %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) -..B2.72: - fldt 48(%rsp) - lea _S(%rip), %rax - fld %st(0) - lea 16+_S(%rip), %rdx - lea 32+_S(%rip), %rcx - lea 64+_S(%rip), %rsi - lea 176+_S(%rip), %rdi - lea 160+_S(%rip), %r8 - lea 144+_S(%rip), %r10 - lea 128+_S(%rip), %r11 - fadd %st(2), %st - fstpt 128(%rsp) - fldt 128(%rsp) - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 144(%rsp) - fxch %st(2) - fstpt 64(%rsp) - fld %st(0) - fxch %st(2) - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(1) - fstpt 256(%rsp) - fldt 256(%rsp) - fldt 32(%rsp) - fld %st(0) - fmul %st(2), %st - fsubr %st, %st(4) - faddp %st, %st(4) - fld %st(3) - fld %st(2) - fsub %st(5), %st - fmul %st, %st(1) - fxch %st(1) - fadd %st(0), %st - fld %st(0) - fld %st(6) - fmul %st(7), %st - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(2) - fld %st(2) - fmul %st(3), %st - faddp %st, %st(2) - fld %st(5) - fmul %st(5), %st - fadd %st(0), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fmul %st, %st(4) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fld %st(1) - fsub %st(4), %st - faddp %st, %st(4) - fxch %st(1) - fstpt 176(%rsp) - fldt 176(%rsp) - fld %st(6) - fmul %st(4), %st - fxch %st(1) - fsub %st(4), %st - fxch %st(3) - fmul %st, %st(4) - fxch %st(7) - fstpt 160(%rsp) - fldt 160(%rsp) - fmul %st(3), %st - faddp %st, %st(4) - fld %st(3) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fxch %st(2) - fmul %st(6), %st - faddp %st, %st(2) - fld %st(3) - fmulp %st, %st(1) - fld %st(4) - fldt 176(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fstpt 192(%rsp) - fldt 192(%rsp) - fldt 32(%rsp) - fldt 160(%rsp) - fxch %st(1) - fmul %st(2), %st - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(2) - fstpt 208(%rsp) - fldt 208(%rsp) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fmul %st(7), %st - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(1) - fld %st(2) - fmulp %st, %st(4) - fldt 192(%rsp) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fstpt 224(%rsp) - fldt 224(%rsp) - faddp %st, %st(2) - fldt 144(%rsp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 80(%rsp) - fldt (%rax) - lea 112+_S(%rip), %rax - fld %st(0) - fld %st(1) - fxch %st(2) - fmul %st, %st(3) - fldt 32(%rsp) - fmulp %st, %st(1) - fsubr %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fmul %st(5), %st - fxch %st(2) - fmul %st, %st(5) - fldt 208(%rsp) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(4) - fldt 96(%rsp) - fldt (%rdx) - lea 96+_S(%rip), %rdx - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fstpt 336(%rsp) - fldt 336(%rsp) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fstpt 352(%rsp) - fldt 352(%rsp) - fldt (%rcx) - lea 80+_S(%rip), %rcx - fmul %st, %st(2) - fxch %st(2) - fstpt 96(%rsp) - fldt 96(%rsp) - fstpt 320(%rsp) - fldt 176(%rsp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 304(%rsp) - fldt 304(%rsp) - fldt (%rsi) - fldt 112(%rsp) - fmul %st(1), %st - fstpt 368(%rsp) - fldt 368(%rsp) - movzwl 344(%rsp), %esi - andl $32767, %esi - fstpt 112(%rsp) - fldt 112(%rsp) - fldt 224(%rsp) - fmulp %st, %st(2) - fxch %st(1) - fstpt 384(%rsp) - fldt 384(%rsp) - fldt (%rdi) - fldt 144(%rsp) - fmul %st, %st(1) - fldt (%r8) - movzwl 376(%rsp), %edi - faddp %st, %st(2) - fmul %st, %st(1) - andl $32767, %edi - fldt (%r10) - cmpl %edi, %esi - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r11) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rax) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rdx) - faddp %st, %st(2) - fmulp %st, %st(1) - fldt (%rcx) - faddp %st, %st(1) - fldt 80(%rsp) - fmulp %st, %st(1) - fstpt 80(%rsp) - fld %st(4) - faddp %st, %st(2) - fldt 64(%rsp) - fldt 128(%rsp) - jg ..B2.77 -..B2.73: - jne ..B2.78 -..B2.74: - movl 340(%rsp), %eax - movl 372(%rsp), %edx - cmpl %edx, %eax - ja ..B2.77 -..B2.75: - jne ..B2.78 -..B2.76: - movl 336(%rsp), %eax - cmpl 368(%rsp), %eax - jbe ..B2.78 -..B2.77: - fldt 112(%rsp) - fxch %st(4) - fsubr %st, %st(7) - fxch %st(4) - faddp %st, %st(7) - fxch %st(2) - faddp %st, %st(6) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fxch %st(4) - jmp ..B2.79 -..B2.78: - fldt 112(%rsp) - fsub %st(4), %st - faddp %st, %st(7) - fxch %st(5) - faddp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) -..B2.79: - fld %st(0) - movzwl 312(%rsp), %eax - fadd %st(2), %st - fstpt 400(%rsp) - fldt 400(%rsp) - andl $32767, %eax - movzwl 408(%rsp), %edx - fld %st(3) - andl $32767, %edx - fadd %st(1), %st - fxch %st(1) - fsubr %st, %st(3) - cmpl %edx, %eax - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 416(%rsp) - fldt 416(%rsp) - jg ..B2.84 -..B2.80: - jne ..B2.85 -..B2.81: - movl 308(%rsp), %eax - movl 404(%rsp), %edx - cmpl %edx, %eax - ja ..B2.84 -..B2.82: - jne ..B2.85 -..B2.83: - movl 304(%rsp), %eax - cmpl 400(%rsp), %eax - jbe ..B2.85 -..B2.84: - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 96(%rsp) - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.86 -..B2.85: - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fldt 96(%rsp) - faddp %st, %st(2) - faddp %st, %st(1) -..B2.86: - fld %st(0) - movzwl 264(%rsp), %eax - fadd %st(2), %st - fstpt 272(%rsp) - fldt 272(%rsp) - andl $32767, %eax - movzwl 280(%rsp), %edx - fld %st(3) - andl $32767, %edx - fadd %st(1), %st - fxch %st(1) - fsubr %st, %st(3) - cmpl %edx, %eax - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 288(%rsp) - fldt 288(%rsp) - jg ..B2.91 -..B2.87: - jne ..B2.92 -..B2.88: - movl 260(%rsp), %eax - movl 276(%rsp), %edx - cmpl %edx, %eax - ja ..B2.91 -..B2.89: - jne ..B2.92 -..B2.90: - movl 256(%rsp), %eax - cmpl 272(%rsp), %eax - jbe ..B2.92 -..B2.91: - fldt 48(%rsp) - fxch %st(2) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.93 -..B2.92: - fldt 48(%rsp) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) -..B2.93: - fldt 80(%rsp) - fld %st(1) - movzwl 248(%rsp), %edx - fadd %st(3), %st - fstpt 32(%rsp) - fldt 32(%rsp) - andl $32767, %edx - movzwl 40(%rsp), %eax - fsubr %st, %st(3) - andl $32767, %eax - fxch %st(2) - faddp %st, %st(3) - cmpl %edx, %eax - faddp %st, %st(2) - fldt 16(%rsp) - fadd %st(1), %st - jg ..B2.98 -..B2.94: - jne ..B2.99 -..B2.95: - movl 36(%rsp), %eax - movl 244(%rsp), %edx - cmpl %edx, %eax - ja ..B2.98 -..B2.96: - jne ..B2.99 -..B2.97: - movl 32(%rsp), %eax - cmpl 240(%rsp), %eax - jbe ..B2.99 -..B2.98: - fldt 16(%rsp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt (%rsp) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - jmp ..B2.100 -..B2.99: - fldt 16(%rsp) - fsub %st(1), %st - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt (%rsp) - faddp %st, %st(1) -..B2.100: - fld %st(0) - fadd %st(2), %st - fstpt (%r9) - fldt (%r9) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%r9) - jmp ..B2.104 -..B2.101: - cmpl $1, %edi - je ..B2.108 -..B2.122: - fstp %st(1) -..B2.102: - lea 16+ones(%rip), %rax - fldt (%rax) - fxch %st(2) - fucomip %st(2), %st - jp ..B2.103 - je ..B2.107 -..B2.103: - fstp %st(1) - lea _infs(%rip), %rax - lea ones(%rip), %rdx - fldl (%rax) - fmulp %st, %st(1) - fstpt (%r9) - fldt (%rdx) -..B2.104: - movq 432(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.106 -..B2.105: - addq $440, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 448 -..B2.106: - fstp %st(0) - call __stack_chk_fail@PLT -..B2.107: - fdivrp %st, %st(1) - lea ones(%rip), %rax - fstpt (%r9) - fldt (%rax) - jmp ..B2.104 -..B2.108: - cmpl $16383, %esi - jne ..B2.122 -..B2.109: - movq $0x8000000000000000, %rdx - cmpq (%rsp), %rdx - jne ..B2.122 -..B2.110: - fxch %st(1) - fstpt (%rsp) - testb $-128, 9(%rsp) - jne ..B2.102 -..B2.111: - cmpl $0, 4(%rsp) - jne ..B2.114 -..B2.113: - cmpl $0, (%rsp) - je ..B2.102 -..B2.114: - fstpt (%r9) - fldt (%r9) - jmp ..B2.4 -..B2.115: - fstp %st(1) - testl %edi, %edi - je ..B2.119 -..B2.116: - cmpl $-2147483648, %r10d - jne ..B2.119 -..B2.117: - cmpl $0, (%rsp) - jne ..B2.119 -..B2.118: - fstp %st(1) - lea _infs(%rip), %rax - lea ones(%rip), %rdx - fldl (%rax) - fmulp %st, %st(1) - fstpt (%r9) - fldt (%rdx) - jmp ..B2.104 -..B2.119: - fstp %st(0) - lea ones(%rip), %rax - fldt (%rax) - fmul %st, %st(1) - fxch %st(1) - fstpt (%r9) - jmp ..B2.104 - .align 16,0x90 - .cfi_endproc - .type __libm_log1pl_k80,@function - .size __libm_log1pl_k80,.-__libm_log1pl_k80 - .data -# -- End __libm_log1pl_k80 - .section .rodata, "a" - .align 16 - .align 16 -zeros: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type zeros,@object - .size zeros,32 - .align 16 -ones: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type ones,@object - .size ones,32 - .align 16 -t32: - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type t32,@object - .size t32,32 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_LN2_K80: - .word 0 - .word 0 - .word 6136 - .word 45426 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 12704 - .word 55409 - .word 6480 - .word 47298 - .word 49116 - .word 0 - .word 0 - .word 0 - .type _LN2_K80,@object - .size _LN2_K80,32 - .align 2 -_S: - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16317 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 52429 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 37449 - .word 18724 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 52429 - .word 52428 - .word 52428 - .word 52428 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 11916 - .word 59578 - .word 35746 - .word 47662 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _S,@object - .size _S,192 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,16 - .align 2 -_LN2: - .word 0 - .word 53711 - .word 6135 - .word 45426 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 2022 - .word 26416 - .word 37831 - .word 62295 - .word 16333 - .word 0 - .word 0 - .word 0 - .type _LN2,@object - .size _LN2,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log_k32.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log_k32.S deleted file mode 100644 index f6a4e7083c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log_k32.S +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_log_k32.c" - .text -..TXTST0: -# -- Begin __libm_log_k32 - .text - .align 16,0x90 - .globl __libm_log_k32 -__libm_log_k32: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___libm_log_k32.1: -..L2: - - movsd %xmm0, -24(%rsp) - movl -20(%rsp), %ecx - movl %ecx, %eax - andl $2146435072, %eax - negl %eax - lea -1072676864(%rcx), %edx - addl $2145386496, %eax - movl %eax, -12(%rsp) - cmpl $24576, %edx - movl $0, -16(%rsp) - movsd .L_2il0floatpacket.0(%rip), %xmm1 - jae ..B1.3 -..B1.2: - lea 32+_Q(%rip), %rax - addsd %xmm1, %xmm0 - movaps %xmm0, %xmm2 - lea 24+_Q(%rip), %rcx - movsd (%rax), %xmm3 - lea 16+_Q(%rip), %rdx - lea 8+_Q(%rip), %rsi - lea _Q(%rip), %rdi - movsd %xmm0, -24(%rsp) - movsd (%rcx), %xmm1 - mulsd %xmm0, %xmm2 - mulsd %xmm2, %xmm3 - mulsd %xmm2, %xmm1 - addsd (%rdx), %xmm3 - addsd (%rsi), %xmm1 - mulsd %xmm2, %xmm3 - mulsd %xmm0, %xmm1 - addsd %xmm1, %xmm3 - addsd (%rdi), %xmm3 - mulsd %xmm2, %xmm3 - addsd %xmm3, %xmm0 - ret -..B1.3: - movl %ecx, %esi - pxor %xmm0, %xmm0 - shrl $12, %ecx - lea 8+_P(%rip), %rax - movzbl %cl, %r9d - lea _P(%rip), %rdx - movq __libm_rcp_table_256@GOTPCREL(%rip), %rcx - lea _LN2(%rip), %rdi - movsd -24(%rsp), %xmm2 - shrl $20, %esi - addl $-1023, %esi - cvtss2sd (%rcx,%r9,4), %xmm0 - mulsd -16(%rsp), %xmm2 - mulsd %xmm0, %xmm2 - movsd (%rax), %xmm0 - addsd %xmm1, %xmm2 - mulsd %xmm2, %xmm0 - pxor %xmm1, %xmm1 - cvtsi2sd %esi, %xmm1 - addsd (%rdx), %xmm0 - mulsd (%rdi), %xmm1 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm0 - movq __libm_logf_table_256@GOTPCREL(%rip), %r8 - addsd %xmm2, %xmm0 - addsd (%r8,%r9,8), %xmm1 - movsd %xmm2, -24(%rsp) - addsd %xmm1, %xmm0 -..B1.4: - ret - .align 16,0x90 - .cfi_endproc - .type __libm_log_k32,@function - .size __libm_log_k32,.-__libm_log_k32 - .data -# -- End __libm_log_k32 - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 4 -_Q: - .long 4294868184 - .long 3219128319 - .long 1443356411 - .long 1070945621 - .long 823147527 - .long 3218079745 - .long 748089218 - .long 1070176642 - .long 1053536005 - .long 3217353219 - .type _Q,@object - .size _Q,40 - .align 4 -_P: - .long 3879088107 - .long 3219128321 - .long 1754324240 - .long 1070945626 - .type _P,@object - .size _P,16 - .align 4 -_LN2: - .long 4277811695 - .long 1072049730 - .type _LN2,@object - .size _LN2,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log_k64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log_k64.S deleted file mode 100644 index 2e67ca75b5..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_log_k64.S +++ /dev/null @@ -1,632 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_log_k64.c" - .text -..TXTST0: -# -- Begin __libm_log_k64 - .text - .align 16,0x90 - .globl __libm_log_k64 -__libm_log_k64: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -# parameter 3: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_log_k64.1: -..L2: - - movaps %xmm1, %xmm6 - movsd %xmm0, -24(%rsp) - movzwl -18(%rsp), %esi - andl $32752, %esi - shrl $4, %esi - cmpl $2047, %esi - jge ..B1.12 -..B1.2: - testl %esi, %esi - jne ..B1.6 -..B1.3: - testl $1048575, -20(%rsp) - jne ..B1.6 -..B1.4: - cmpl $0, -24(%rsp) - jne ..B1.6 -..B1.5: - lea 1640+_libm_log_k64_table(%rip), %rax - lea 1624+_libm_log_k64_table(%rip), %rcx - movq (%rax), %rdx - movq (%rcx), %rsi - movq %rdx, (%rdi) - movq %rsi, 8(%rdi) - ret -..B1.6: - testb $-128, -17(%rsp) - jne ..B1.11 -..B1.7: - movsd -24(%rsp), %xmm4 - testl %esi, %esi - jne ..B1.9 -..B1.8: - lea 1656+_libm_log_k64_table(%rip), %rax - pxor %xmm9, %xmm9 - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm6 - movsd %xmm4, -24(%rsp) - movzwl -18(%rsp), %esi - andl $32752, %esi - shrl $4, %esi - addl $-1076, %esi - cvtsi2sd %esi, %xmm9 - jmp ..B1.10 -..B1.9: - addl $-1023, %esi - pxor %xmm9, %xmm9 - cvtsi2sd %esi, %xmm9 -..B1.10: - lea 1616+_libm_log_k64_table(%rip), %rcx - negl %esi - addl $1023, %esi - lea 1664+_libm_log_k64_table(%rip), %rax - andl $2047, %esi - lea _libm_log_k64_table(%rip), %r11 - shll $4, %esi - lea 1672+_libm_log_k64_table(%rip), %rdx - movzwl 6(%rcx), %r8d - movsd (%rcx), %xmm5 - andl $-32753, %r8d - movsd %xmm5, -16(%rsp) - orl %esi, %r8d - movw %r8w, -10(%rsp) - lea 1680+_libm_log_k64_table(%rip), %rsi - movsd (%rax), %xmm7 - lea 1688+_libm_log_k64_table(%rip), %rax - movsd -16(%rsp), %xmm1 - lea 1600+_libm_log_k64_table(%rip), %rcx - movsd (%rdx), %xmm0 - lea 1608+_libm_log_k64_table(%rip), %rdx - movsd (%rsi), %xmm2 - lea 1592+_libm_log_k64_table(%rip), %rsi - movsd (%rax), %xmm3 - lea 1584+_libm_log_k64_table(%rip), %r8 - movaps %xmm3, %xmm8 - lea 1560+_libm_log_k64_table(%rip), %rax - mulsd %xmm1, %xmm4 - mulsd %xmm1, %xmm6 - mulsd %xmm9, %xmm7 - addsd %xmm4, %xmm8 - mulsd %xmm0, %xmm9 - addsd %xmm4, %xmm2 - subsd %xmm3, %xmm8 - movsd %xmm2, -8(%rsp) - subsd %xmm8, %xmm4 - movl -8(%rsp), %r9d - addsd %xmm4, %xmm6 - andl $127, %r9d - movsd %xmm8, -24(%rsp) - movsd (%rdx), %xmm4 - lea (%r9,%r9,2), %r10d - lea 1576+_libm_log_k64_table(%rip), %r9 - movsd (%r11,%r10,8), %xmm10 - mulsd %xmm10, %xmm8 - addsd 8(%r11,%r10,8), %xmm7 - addsd 16(%r11,%r10,8), %xmm9 - mulsd %xmm6, %xmm10 - subsd %xmm5, %xmm8 - movaps %xmm8, %xmm6 - lea 1568+_libm_log_k64_table(%rip), %r11 - addsd %xmm10, %xmm6 - addsd %xmm9, %xmm10 - addsd %xmm7, %xmm8 - mulsd %xmm6, %xmm4 - movsd %xmm8, (%rdi) - addsd (%rcx), %xmm4 - mulsd %xmm6, %xmm4 - addsd (%rsi), %xmm4 - mulsd %xmm6, %xmm4 - addsd (%r8), %xmm4 - mulsd %xmm6, %xmm4 - addsd (%r9), %xmm4 - mulsd %xmm6, %xmm4 - addsd (%r11), %xmm4 - mulsd %xmm6, %xmm4 - mulsd %xmm6, %xmm6 - addsd (%rax), %xmm4 - mulsd %xmm4, %xmm6 - addsd %xmm6, %xmm10 - movsd %xmm10, 8(%rdi) - ret -..B1.11: - lea 1648+_libm_log_k64_table(%rip), %rax - movq (%rax), %rdx - movq %rdx, (%rdi) - movq %rdx, 8(%rdi) - ret -..B1.12: - lea 1632+_libm_log_k64_table(%rip), %rax - lea 1624+_libm_log_k64_table(%rip), %rdx - movsd -24(%rsp), %xmm0 - movq (%rdx), %rcx - movq %rcx, 8(%rdi) - addsd (%rax), %xmm0 - movsd %xmm0, (%rdi) -..B1.13: - ret - .align 16,0x90 - .cfi_endproc - .type __libm_log_k64,@function - .size __libm_log_k64,.-__libm_log_k64 - .data -# -- End __libm_log_k64 - .section .rodata, "a" - .align 16 - .align 16 -_libm_log_k64_table: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072660480 - .long 1486880768 - .long 1066410070 - .long 1813744607 - .long 3179892593 - .long 0 - .long 1072629760 - .long 377487360 - .long 1067416219 - .long 919019713 - .long 3179241129 - .long 0 - .long 1072599040 - .long 1513619456 - .long 1067944025 - .long 874573033 - .long 3178512940 - .long 0 - .long 1072570368 - .long 3221749760 - .long 1068427825 - .long 4181665006 - .long 3177478212 - .long 0 - .long 1072541696 - .long 4162322432 - .long 1068708823 - .long 627020255 - .long 1028629941 - .long 0 - .long 1072513024 - .long 183107584 - .long 1068957907 - .long 2376703469 - .long 1030233118 - .long 0 - .long 1072486400 - .long 1053425664 - .long 1069192557 - .long 696277142 - .long 1030474863 - .long 0 - .long 1072459776 - .long 3996123136 - .long 1069430535 - .long 2630798680 - .long 1028792016 - .long 0 - .long 1072435200 - .long 3452764160 - .long 1069600382 - .long 624954044 - .long 3177101741 - .long 0 - .long 1072409600 - .long 207650816 - .long 1069717971 - .long 3272735636 - .long 3175176575 - .long 0 - .long 1072386048 - .long 2647228416 - .long 1069827627 - .long 3594228712 - .long 1029303785 - .long 0 - .long 1072362496 - .long 2712010752 - .long 1069938736 - .long 3653242769 - .long 3176839013 - .long 0 - .long 1072338944 - .long 374439936 - .long 1070051337 - .long 4072775574 - .long 3176577495 - .long 0 - .long 1072316416 - .long 3707174912 - .long 1070160474 - .long 1486946159 - .long 1023930920 - .long 0 - .long 1072294912 - .long 1443954688 - .long 1070265993 - .long 293532967 - .long 3176278277 - .long 0 - .long 1072273408 - .long 127762432 - .long 1070372856 - .long 3404145447 - .long 3177023955 - .long 0 - .long 1072252928 - .long 2053832704 - .long 1070475911 - .long 1575076358 - .long 1029048544 - .long 0 - .long 1072232448 - .long 3194093568 - .long 1070580248 - .long 1864169120 - .long 1026866084 - .long 0 - .long 1072212992 - .long 3917201408 - .long 1070638340 - .long 2362145246 - .long 3175606197 - .long 0 - .long 1072193536 - .long 3417112576 - .long 1070689116 - .long 70087871 - .long 3174183577 - .long 0 - .long 1072175104 - .long 4226777088 - .long 1070737793 - .long 1620410586 - .long 3174700065 - .long 0 - .long 1072156672 - .long 3168870400 - .long 1070787042 - .long 311238082 - .long 1025781772 - .long 0 - .long 1072139264 - .long 2150580224 - .long 1070834092 - .long 1664262457 - .long 3175299224 - .long 0 - .long 1072120832 - .long 4095672320 - .long 1070884491 - .long 1657121015 - .long 3174674199 - .long 0 - .long 1072104448 - .long 2595577856 - .long 1070929805 - .long 2014006823 - .long 3175423830 - .long 0 - .long 1072087040 - .long 3747176448 - .long 1070978493 - .long 144991708 - .long 3171552042 - .long 0 - .long 1072070656 - .long 1050435584 - .long 1071024840 - .long 3386227432 - .long 1027876916 - .long 0 - .long 1072055296 - .long 255516672 - .long 1071068760 - .long 2637594316 - .long 1028049573 - .long 0 - .long 1072038912 - .long 1640783872 - .long 1071116120 - .long 893247007 - .long 1028452162 - .long 0 - .long 1072023552 - .long 2940411904 - .long 1071161011 - .long 813240633 - .long 1027664048 - .long 0 - .long 1072009216 - .long 882917376 - .long 1071203348 - .long 2376597551 - .long 3175828767 - .long 0 - .long 1071993856 - .long 213966848 - .long 1071249188 - .long 2977204125 - .long 1028350609 - .long 0 - .long 1071979520 - .long 2921504768 - .long 1071292428 - .long 523218347 - .long 1028007004 - .long 0 - .long 1071965184 - .long 3186655232 - .long 1071336119 - .long 2352907891 - .long 1026967097 - .long 0 - .long 1071951872 - .long 2653364224 - .long 1071377101 - .long 2453418583 - .long 3174349512 - .long 0 - .long 1071938560 - .long 3759783936 - .long 1071418487 - .long 3685870403 - .long 3175415611 - .long 0 - .long 1071925248 - .long 2468364288 - .long 1071460286 - .long 1578908842 - .long 3175510517 - .long 0 - .long 1071911936 - .long 81903616 - .long 1071502506 - .long 770710269 - .long 1026742353 - .long 0 - .long 1071899648 - .long 2799321088 - .long 1071541858 - .long 3822266185 - .long 1028434427 - .long 0 - .long 1071886336 - .long 2142265344 - .long 1071584911 - .long 175901806 - .long 3173871540 - .long 0 - .long 1071874048 - .long 2944024576 - .long 1071625048 - .long 2747360403 - .long 1027672159 - .long 0 - .long 1071862784 - .long 3434301440 - .long 1071653426 - .long 4194662196 - .long 3173893003 - .long 0 - .long 1071850496 - .long 1547755520 - .long 1071673870 - .long 4248764681 - .long 3172759087 - .long 0 - .long 1071839232 - .long 4246986752 - .long 1071692786 - .long 2840205638 - .long 3174430911 - .long 0 - .long 1071826944 - .long 3418390528 - .long 1071713619 - .long 3041880823 - .long 1025440860 - .long 0 - .long 1071816704 - .long 4143093760 - .long 1071731139 - .long 2727587401 - .long 3173965207 - .long 0 - .long 1071805440 - .long 3121326080 - .long 1071750582 - .long 3173887692 - .long 3174190163 - .long 0 - .long 1071794176 - .long 1852893184 - .long 1071770207 - .long 3951060252 - .long 1027348295 - .long 0 - .long 1071783936 - .long 3636379648 - .long 1071788208 - .long 1684924001 - .long 3174777086 - .long 0 - .long 1071773696 - .long 516505600 - .long 1071806366 - .long 429181199 - .long 3173211033 - .long 0 - .long 1071763456 - .long 4186185728 - .long 1071824681 - .long 2044904577 - .long 3174967132 - .long 0 - .long 1071753216 - .long 877596672 - .long 1071843159 - .long 1396318105 - .long 3173959727 - .long 0 - .long 1071742976 - .long 2912784384 - .long 1071861800 - .long 448136789 - .long 3174814192 - .long 0 - .long 1071733760 - .long 3722825728 - .long 1071878720 - .long 714165913 - .long 3173439560 - .long 0 - .long 1071723520 - .long 2522374144 - .long 1071897682 - .long 3227240353 - .long 3173394323 - .long 0 - .long 1071714304 - .long 4165410816 - .long 1071914895 - .long 1365684961 - .long 3174365060 - .long 0 - .long 1071705088 - .long 3477135360 - .long 1071932251 - .long 368482985 - .long 3174140821 - .long 0 - .long 1071695872 - .long 2079455232 - .long 1071949752 - .long 1320576317 - .long 1026822714 - .long 0 - .long 1071687680 - .long 851795968 - .long 1071965432 - .long 3702467026 - .long 1025224125 - .long 0 - .long 1071678464 - .long 647743488 - .long 1071983213 - .long 772992109 - .long 3174038459 - .long 0 - .long 1071670272 - .long 26537984 - .long 1071999146 - .long 2360214276 - .long 3174861275 - .long 0 - .long 1071661056 - .long 1547061248 - .long 1072017216 - .long 2886781435 - .long 1026423395 - .long 0 - .long 1071652864 - .long 2854492160 - .long 1072033410 - .long 215631550 - .long 1025638968 - .long 0 - .long 1071644672 - .long 4277811200 - .long 1072049730 - .long 2479318832 - .long 1026487127 - .long 0 - .long 3219128320 - .long 1431655955 - .long 1070945621 - .long 610 - .long 3218079744 - .long 2545118337 - .long 1070176665 - .long 1378399119 - .long 3217380693 - .long 612435357 - .long 1069697472 - .long 94536557 - .long 3217031348 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .long 0 - .long 4294443008 - .long 0 - .long 1128267776 - .long 4277811200 - .long 1072049730 - .long 2479318832 - .long 1026487127 - .long 64 - .long 1120927744 - .long 0 - .long 1094713344 - .type _libm_log_k64_table,@object - .size _libm_log_k64_table,1696 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_logl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_logl.S deleted file mode 100644 index f2b01ecfb2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_logl.S +++ /dev/null @@ -1,778 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_logl.c" - .text -..TXTST0: -# -- Begin __libm_logl - .text - .align 16,0x90 - .globl __libm_logl -__libm_logl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value___libm_logl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %sil, %sil -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzbl 57(%rsp), %r8d - andl $128, %r8d - shrl $7, %r8d - movzwl 56(%rsp), %eax - movl %eax, %edx - movl %r8d, %edi - andl $32767, %edx - shll $15, %edi - orl %edx, %edi - shll $16, %edi - movzwl 54(%rsp), %ecx - orl %ecx, %edi - cmpl $2147450880, %edi - jae ..B1.31 -..B1.4: - lea -1073674240(%rdi), %ecx - cmpl $36864, %ecx - ja ..B1.21 -..B1.5: - addl $-1073676287, %edi - cmpl $32769, %edi - ja ..B1.14 -..B1.6: - cmpl $16383, %edx - je ..B1.40 -..B1.7: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.11 -..B1.8: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.9: - fldcw 32(%rsp) -..B1.10: - movb $1, %sil -..B1.11: - fldt 48(%rsp) - lea 8+_ones(%rip), %rax - lea 48+_Q1(%rip), %rdx - lea 16+_Q1(%rip), %rcx - lea 32+_Q1(%rip), %rdi - lea _Q1(%rip), %r8 - testb %sil, %sil - faddl (%rax) - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%rdx) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(2), %st - fmul %st(1), %st - fldt (%rdi) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.13 -..B1.12: - fldcw 34(%rsp) -..B1.13: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.14: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.18 -..B1.15: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.16: - fldcw 32(%rsp) -..B1.17: - movb $1, %sil -..B1.18: - fldt 48(%rsp) - lea 8+_ones(%rip), %rax - lea _TWO_52H(%rip), %rdx - lea 208+_Q2(%rip), %rcx - lea 176+_Q2(%rip), %rdi - lea 144+_Q2(%rip), %r8 - lea 112+_Q2(%rip), %r9 - lea 80+_Q2(%rip), %r10 - lea 48+_Q2(%rip), %r11 - testb %sil, %sil - fldl (%rdx) - lea 192+_Q2(%rip), %rdx - fldt (%rcx) - lea 160+_Q2(%rip), %rcx - fldt (%rdi) - lea 128+_Q2(%rip), %rdi - fxch %st(3) - faddl (%rax) - lea 16+_Q2(%rip), %rax - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fld %st(1) - fsub %st(4), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fmul %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fld %st(0) - fld %st(4) - fmul %st(5), %st - fadd %st, %st(1) - fxch %st(1) - fmul %st, %st(4) - fxch %st(6) - faddp %st, %st(4) - fxch %st(3) - fmul %st(5), %st - fxch %st(2) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%r8) - lea 96+_Q2(%rip), %r8 - faddp %st, %st(3) - fxch %st(2) - fmul %st(5), %st - fldt (%r9) - lea 64+_Q2(%rip), %r9 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r10) - lea 32+_Q2(%rip), %r10 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r11) - lea _Q2(%rip), %r11 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rax) - lea 240+_Q2(%rip), %rax - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rdx) - lea 224+_Q2(%rip), %rdx - fmul %st(6), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(6) - fldt (%r11) - faddp %st, %st(6) - fxch %st(2) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fldt (%rax) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(3) - fmulp %st, %st(1) - fld %st(1) - fldt (%rdx) - fld %st(0) - fmul %st(4), %st - faddp %st, %st(3) - fldt 16(%rsp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(5) - fxch %st(1) - fmul %st(4), %st - fxch %st(2) - fadd %st, %st(4) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.20 -..B1.19: - fldcw 34(%rsp) -..B1.20: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.21: - movzwl 34(%rsp), %edi - movl %edi, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.25 -..B1.22: - orl $-64768, %edi - movw %di, 32(%rsp) -..B1.23: - fldcw 32(%rsp) -..B1.24: - movzwl 56(%rsp), %eax - movl %eax, %edx - movb $1, %sil - andl $32767, %edx -..B1.25: - movl $-16383, %ecx - testl %edx, %edx - jne ..B1.28 -..B1.26: - fldt 48(%rsp) - lea _TWO_75(%rip), %rcx - lea _zeros(%rip), %rax - fmull (%rcx) - movl $-16458, %ecx - fstpt 48(%rsp) - fldt 48(%rsp) - fldl (%rax) - movsd (%rax), %xmm0 - fucomip %st(1), %st - fstp %st(0) - jp ..B1.27 - je ..B1.42 -..B1.27: - movzwl 56(%rsp), %eax - movl %eax, %edx - andl $32767, %edx -..B1.28: - lea _TWO_32H(%rip), %rdi - andl $-32768, %eax - orl $-49153, %eax - addl %edx, %ecx - movw %ax, 56(%rsp) - lea 8+_ones(%rip), %r9 - fldt 48(%rsp) - lea 48+_P(%rip), %r10 - fld %st(0) - lea 16+_P(%rip), %r11 - fldl (%rdi) - lea _P(%rip), %rdi - movl 52(%rsp), %edx - fadd %st, %st(1) - shrl $23, %edx - fsubrp %st, %st(1) - movzbl %dl, %eax - lea 64+_P(%rip), %rdx - movq __libm_rcp_table_256@GOTPCREL(%rip), %r8 - fsubr %st, %st(1) - flds (%r8,%rax,4) - fmul %st, %st(1) - fmulp %st, %st(2) - faddl (%r9) - fld %st(0) - movl %ecx, 16(%rsp) - lea 80+_P(%rip), %rcx - shlq $4, %rax - fadd %st(2), %st - fld %st(0) - testb %sil, %sil - fmul %st(1), %st - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fildl 16(%rsp) - fldt (%rcx) - lea 32+_P(%rip), %rcx - fmul %st(3), %st - fldt (%r10) - movq __libm_logl_table_256@GOTPCREL(%rip), %r8 - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(3), %st - fmulp %st, %st(2) - fldt (%rdx) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.0(%rip) - fmul %st(1), %st - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(2) - faddl 8(%r8,%rax) - faddp %st, %st(3) - faddl (%rax,%r8) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.30 -..B1.29: - fldcw 34(%rsp) -..B1.30: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.31: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.35 -..B1.32: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.33: - fldcw 32(%rsp) -..B1.34: - movzbl 57(%rsp), %r8d - movb $1, %sil - andl $128, %r8d - shrl $7, %r8d -..B1.35: - testl %r8d, %r8d - jne ..B1.45 -..B1.36: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.37: - testb %sil, %sil - je ..B1.39 -..B1.38: - fldcw 34(%rsp) -..B1.39: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.40: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.7 -..B1.41: - lea _zeros(%rip), %rax - fldl (%rax) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.42: - lea 8+_ones(%rip), %rax - testb %sil, %sil - movsd (%rax), %xmm1 - divsd %xmm0, %xmm1 - je ..B1.44 -..B1.43: - fldcw 34(%rsp) -..B1.44: - movsd %xmm1, 16(%rsp) - fldl 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.45: - movzwl 56(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.47 -..B1.46: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.36 - jmp ..B1.50 -..B1.47: - testl %eax, %eax - jne ..B1.50 -..B1.48: - cmpq $0, 48(%rsp) - jne ..B1.50 -..B1.49: - lea 8+_ones(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - divsd (%rdx), %xmm0 - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - fstpt (%rsp) - jmp ..B1.37 -..B1.50: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - fstpt (%rsp) - jmp ..B1.37 - .align 16,0x90 - .cfi_endproc - .type __libm_logl,@function - .size __libm_logl,.-__libm_logl - .data -# -- End __libm_logl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_Q1: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 5458 - .word 43692 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 44682 - .word 49156 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 63914 - .word 24446 - .word 52434 - .word 52426 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q2: - .word 58950 - .word 11767 - .word 59949 - .word 40744 - .word 49076 - .word 0 - .word 0 - .word 0 - .word 44486 - .word 43690 - .word 43690 - .word 43690 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 65514 - .word 65535 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 49718 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 36693 - .word 43691 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41156 - .word 18852 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 14101 - .word 65290 - .word 65535 - .word 65535 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 21744 - .word 48151 - .word 14557 - .word 58254 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 57454 - .word 983 - .word 52353 - .word 52428 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 54021 - .word 59409 - .word 39452 - .word 47662 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 35608 - .word 4659 - .word 11214 - .word 43692 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 35524 - .word 31332 - .word 8749 - .word 40326 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 54832 - .word 20873 - .word 17674 - .word 36915 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 48567 - .word 9481 - .word 46911 - .word 55870 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,256 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,96 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_logl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_logl_k80.S deleted file mode 100644 index bbc390e8e7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_logl_k80.S +++ /dev/null @@ -1,966 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_logl_k80.c" - .text -..TXTST0: -# -- Begin __libm_log_k80 - .text - .align 16,0x90 - .globl __libm_log_k80 -__libm_log_k80: -# parameter 1: %rdi -# parameter 2: %rsi -..B1.1: - .cfi_startproc -..___tag_value___libm_log_k80.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - subq $88, %rsp - .cfi_def_cfa_offset 112 - movq %rsi, %r12 - movq %rdi, %r13 - movq %r12, %rdi - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 80(%rsp) -..___tag_value___libm_log_k80.8: - call __libm_normalizel_k80@PLT -..___tag_value___libm_log_k80.9: -..B1.2: - fldt (%r12) - fldt 16(%r12) - movl 32(%r12), %eax - cmpl $-1, %eax - je ..B1.15 -..B1.3: - movl %eax, 16(%rsp) - fildl 16(%rsp) - fstpt (%rsp) -..B1.4: - addq $-32, %rsp - .cfi_def_cfa_offset 144 - lea 48(%rsp), %rdi - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_log_k80.11: - call __libm_logl_k80@PLT -..___tag_value___libm_log_k80.12: -..B1.18: - addq $32, %rsp - .cfi_def_cfa_offset 112 -..B1.5: - fldt 16(%rsp) - lea _LN2_K80(%rip), %rax - lea 16+_LN2_K80(%rip), %rdx - fmul %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fldt 32(%rsp) - fmulp %st, %st(2) - movzwl 24(%rsp), %esi - andl $32767, %esi - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - fldt (%rax) - fldt (%rsp) - fmul %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fld %st(0) - movzwl 56(%rsp), %ecx - fadd %st(4), %st - fldt (%rdx) - andl $32767, %ecx - fmulp %st, %st(3) - cmpl %esi, %ecx - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - movl $0, 32(%r13) - jg ..B1.10 -..B1.6: - jne ..B1.11 -..B1.7: - movl 52(%rsp), %eax - movl 20(%rsp), %edx - cmpl %edx, %eax - ja ..B1.10 -..B1.8: - jne ..B1.11 -..B1.9: - movl 48(%rsp), %eax - cmpl 16(%rsp), %eax - jbe ..B1.11 -..B1.10: - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.12 -..B1.11: - fxch %st(2) - fsubr %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) -..B1.12: - fld %st(1) - fadd %st(1), %st - fstpt (%r13) - fldt (%r13) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%r13) - movq 80(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.14 -..B1.13: - addq $88, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.14: - call __stack_chk_fail@PLT -..B1.15: - lea _zeros(%rip), %rax - lea halfs(%rip), %rdx - fldl (%rax) - fstpt (%rsp) - fldt (%rdx) - fmul %st, %st(2) - fmulp %st, %st(1) - jmp ..B1.4 - .align 16,0x90 - .cfi_endproc - .type __libm_log_k80,@function - .size __libm_log_k80,.-__libm_log_k80 - .data -# -- End __libm_log_k80 - .text -# -- Begin __libm_logl_k80 - .text - .align 16,0x90 - .globl __libm_logl_k80 -__libm_logl_k80: -# parameter 1: 8 + %rsp -# parameter 2: 24 + %rsp -# parameter 3: %rdi -..B2.1: - .cfi_startproc -..___tag_value___libm_logl_k80.23: -..L24: - - fldt 8(%rsp) - movzbl 17(%rsp), %r9d - andl $128, %r9d - shrl $7, %r9d - movzwl 16(%rsp), %ecx - movl %ecx, %eax - movl %r9d, %r8d - andl $32767, %eax - shll $15, %r8d - movl 12(%rsp), %edx - orl %eax, %r8d - movl %edx, %esi - shll $16, %r8d - shrl $16, %esi - orl %esi, %r8d - fstpt -24(%rsp) - fldt -24(%rsp) - cmpl $2147450880, %r8d - fldt 24(%rsp) - jae ..B2.14 -..B2.2: - lea -1073674240(%r8), %esi - cmpl $36864, %esi - ja ..B2.8 -..B2.3: - addl $-1073676287, %r8d - cmpl $32769, %r8d - ja ..B2.7 -..B2.4: - lea _ones(%rip), %rax - fldl (%rax) - fucomi %st(2), %st - jne ..B2.6 - jp ..B2.6 -..B2.5: - lea _zeros(%rip), %rax - fldl (%rax) - fucomi %st(2), %st - jp ..B2.27 - je ..B2.23 -..B2.27: - fstp %st(0) -..B2.6: - fld %st(2) - lea 48+_Q1(%rip), %rax - lea 16+_Q1(%rip), %rdx - lea 32+_Q1(%rip), %rcx - lea _Q1(%rip), %rsi - fsub %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubrp %st, %st(4) - faddp %st, %st(3) - fld %st(1) - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsub %st, %st(4) - fxch %st(4) - fsubrp %st, %st(3) - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(2), %st - fmulp %st, %st(1) - fldt (%rcx) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(3) - fadd %st(1), %st - fstpt (%rdi) - fldt (%rdi) - fsubrp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 16(%rdi) - ret -..B2.7: - lea 8+_ones(%rip), %rax - fld %st(1) - lea _TWO_52H(%rip), %rdx - lea 208+_Q2(%rip), %rcx - lea 176+_Q2(%rip), %rsi - lea 144+_Q2(%rip), %r8 - lea 112+_Q2(%rip), %r9 - lea 80+_Q2(%rip), %r10 - fldl (%rax) - lea 48+_Q2(%rip), %r11 - lea 16+_Q2(%rip), %rax - fadd %st, %st(1) - fld %st(1) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fld %st(0) - fld %st(1) - fxch %st(2) - fstpt -24(%rsp) - fldt -24(%rsp) - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fldl (%rdx) - fmul %st(4), %st - lea 192+_Q2(%rip), %rdx - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fld %st(1) - fmul %st(2), %st - fxch %st(2) - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(2) - fstpt -56(%rsp) - fldt -56(%rsp) - fmul %st, %st(2) - fmul %st(4), %st - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fldt (%rcx) - fmul %st(1), %st - lea 160+_Q2(%rip), %rcx - fldt (%rsi) - lea 128+_Q2(%rip), %rsi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - lea 96+_Q2(%rip), %r8 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - lea 64+_Q2(%rip), %r9 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - lea 32+_Q2(%rip), %r10 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - lea _Q2(%rip), %r11 - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - lea 240+_Q2(%rip), %rax - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdx) - lea 224+_Q2(%rip), %rdx - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r11) - faddp %st, %st(2) - fxch %st(5) - fmulp %st, %st(1) - faddp %st, %st(4) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fmulp %st, %st(1) - fld %st(1) - fldt (%rdx) - fld %st(0) - fmul %st(4), %st - faddp %st, %st(3) - fldt -56(%rsp) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(5) - fxch %st(1) - fmul %st(4), %st - fxch %st(2) - fadd %st, %st(4) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fstpt (%rdi) - fldt (%rdi) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rdi) - lea _ones(%rip), %rdi - fldl (%rdi) - ret -..B2.8: - lea _zeros(%rip), %r8 - movl $-16383, %esi - testl %eax, %eax - fldl (%r8) - movsd (%r8), %xmm0 - jne ..B2.11 -..B2.9: - lea _TWO_75(%rip), %rax - movl $-16458, %esi - fldl (%rax) - fmul %st, %st(3) - fxch %st(3) - fucomi %st(1), %st - fxch %st(3) - fmulp %st, %st(2) - jp ..B2.10 - je ..B2.24 -..B2.10: - fxch %st(2) - fstpt -24(%rsp) - fldt -24(%rsp) - movzwl -16(%rsp), %ecx - movl %ecx, %eax - movl -20(%rsp), %edx - andl $32767, %eax - fxch %st(2) -..B2.11: - fstp %st(2) - addl %eax, %esi - fucomi %st(1), %st - fxch %st(1) - fstp %st(0) - jp ..B2.12 - je ..B2.13 -..B2.12: - fstpt -56(%rsp) - movzwl -48(%rsp), %r8d - movl %r8d, %r9d - subl %eax, %r8d - andl $-32768, %r9d - addl $16383, %r8d - andl $32767, %r8d - orl %r8d, %r9d - movw %r9w, -48(%rsp) - fldt -56(%rsp) -..B2.13: - shrl $23, %edx - andl $-32768, %ecx - movzbl %dl, %eax - lea _TWO_32H(%rip), %rdx - orl $-49153, %ecx - lea 8+_ones(%rip), %r8 - movw %cx, -16(%rsp) - lea 48+_P(%rip), %r9 - fldt -24(%rsp) - lea 16+_P(%rip), %r10 - fld %st(0) - lea 64+_P(%rip), %r11 - fldl (%rdx) - lea 32+_P(%rip), %rdx - movq __libm_rcp_table_256@GOTPCREL(%rip), %rcx - fadd %st, %st(1) - movl %esi, -40(%rsp) - lea 80+_P(%rip), %rsi - fsubrp %st, %st(1) - fsubr %st, %st(1) - flds (%rcx,%rax,4) - fmul %st, %st(1) - fmul %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - fstpt -56(%rsp) - fldt -56(%rsp) - lea _P(%rip), %rcx - shlq $4, %rax - faddp %st, %st(1) - fldl (%r8) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - fildl -40(%rsp) - fldt (%rsi) - fmul %st(3), %st - fldt (%r9) - movq __libm_logl_table_256@GOTPCREL(%rip), %rsi - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(3), %st - fmulp %st, %st(2) - fldt (%r11) - fmul %st(3), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldt .L_2il0floatpacket.2(%rip) - fmul %st(1), %st - fldt .L_2il0floatpacket.3(%rip) - fmulp %st, %st(2) - faddl 8(%rsi,%rax) - faddp %st, %st(2) - faddl (%rax,%rsi) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt (%rdi) - fldt (%rdi) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rdi) - lea _ones(%rip), %rdi - fldl (%rdi) - ret -..B2.14: - fstp %st(0) - testl %r9d, %r9d - jne ..B2.16 -..B2.15: - lea _ones(%rip), %rax - lea _zeros(%rip), %rdx - fldl (%rax) - fmul %st, %st(1) - movsd (%rdx), %xmm1 - fxch %st(1) - jmp ..B2.21 -..B2.16: - cmpl $32767, %eax - je ..B2.22 -..B2.17: - fstp %st(0) - testl %eax, %eax - jne ..B2.20 -..B2.18: - cmpq $0, -24(%rsp) - jne ..B2.20 -..B2.19: - lea _zeros(%rip), %rax - lea 8+_ones(%rip), %rdx - lea _ones(%rip), %rcx - movsd (%rax), %xmm1 - fldl (%rcx) - movsd (%rdx), %xmm0 - divsd %xmm1, %xmm0 - movsd %xmm0, -40(%rsp) - fldl -40(%rsp) - jmp ..B2.21 -..B2.20: - lea _zeros(%rip), %rax - lea _infs(%rip), %rdx - lea _ones(%rip), %rcx - movsd (%rax), %xmm1 - fldl (%rcx) - movsd (%rdx), %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, -40(%rsp) - fldl -40(%rsp) -..B2.21: - movsd %xmm1, -40(%rsp) - fstpt (%rdi) - fldl -40(%rsp) - fstpt 16(%rdi) - ret -..B2.22: - movq $0x8000000000000000, %rax - cmpq -24(%rsp), %rax - jne ..B2.15 - jmp ..B2.28 -..B2.23: - fstp %st(1) - fstp %st(2) - fstp %st(0) - fstpt (%rdi) - fldt (%rdi) - fld %st(0) - fxch %st(1) - fstpt 16(%rdi) - ret -..B2.24: - fstp %st(2) - fstp %st(0) - lea 8+_ones(%rip), %rax - lea _ones(%rip), %rdx - fstpt 16(%rdi) - movsd (%rax), %xmm1 - divsd %xmm0, %xmm1 - movsd %xmm1, -40(%rsp) - fldl -40(%rsp) - fstpt (%rdi) - fldl (%rdx) - ret -..B2.28: - fstp %st(0) - jmp ..B2.20 - .align 16,0x90 - .cfi_endproc - .type __libm_logl_k80,@function - .size __libm_logl_k80,.-__libm_logl_k80 - .data -# -- End __libm_logl_k80 - .section .rodata, "a" - .align 16 - .align 16 -halfs: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type halfs,@object - .size halfs,32 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_LN2_K80: - .word 0 - .word 0 - .word 6136 - .word 45426 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 12704 - .word 55409 - .word 6480 - .word 47298 - .word 49116 - .word 0 - .word 0 - .word 0 - .type _LN2_K80,@object - .size _LN2_K80,32 - .align 2 -_Q1: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 5458 - .word 43692 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 44682 - .word 49156 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 63914 - .word 24446 - .word 52434 - .word 52426 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q2: - .word 58950 - .word 11767 - .word 59949 - .word 40744 - .word 49076 - .word 0 - .word 0 - .word 0 - .word 44486 - .word 43690 - .word 43690 - .word 43690 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 65514 - .word 65535 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 49718 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 36693 - .word 43691 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41156 - .word 18852 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 14101 - .word 65290 - .word 65535 - .word 65535 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 21744 - .word 48151 - .word 14557 - .word 58254 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 57454 - .word 983 - .word 52353 - .word 52428 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 54021 - .word 59409 - .word 39452 - .word 47662 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 35608 - .word 4659 - .word 11214 - .word 43692 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 35524 - .word 31332 - .word 8749 - .word 40326 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 54832 - .word 20873 - .word 17674 - .word 36915 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 48567 - .word 9481 - .word 46911 - .word 55870 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,256 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,96 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_mul_k64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_mul_k64.S deleted file mode 100644 index fd242c56a3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_mul_k64.S +++ /dev/null @@ -1,320 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_mul_k64.c" - .text -..TXTST0: -# -- Begin __libm_mul_k64 - .text - .align 16,0x90 - .globl __libm_mul_k64 -__libm_mul_k64: -# parameter 1: %edi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -..B1.1: - .cfi_startproc -..___tag_value___libm_mul_k64.1: -..L2: - - movq %rdx, %rax - movzwl 6(%rsi), %edx - andl $32752, %edx - shrl $4, %edx - movsd (%rsi), %xmm3 - cmpl $2047, %edx - movsd 8(%rsi), %xmm7 - movsd (%rax), %xmm2 - movsd 8(%rax), %xmm4 - je ..B1.12 -..B1.2: - testl %edx, %edx - jne ..B1.7 -..B1.3: - testl $1048575, 4(%rsi) - jne ..B1.7 -..B1.4: - cmpl $0, (%rsi) - je ..B1.12 -..B1.7: - movsd %xmm2, -24(%rsp) -..B1.8: - movzwl -18(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $2047, %eax - je ..B1.12 -..B1.9: - testl %eax, %eax - jne ..B1.13 -..B1.10: - testl $1048575, -20(%rsp) - jne ..B1.13 -..B1.11: - cmpl $0, -24(%rsp) - jne ..B1.13 -..B1.12: - mulsd %xmm2, %xmm3 - movsd %xmm3, (%rcx) - ret -..B1.13: - testl %edx, %edx - jne ..B1.15 -..B1.14: - lea _CONSTANTS(%rip), %rdx - movaps %xmm3, %xmm1 - addl $-1023, %edi - movsd (%rdx), %xmm0 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm7 - jmp ..B1.16 -..B1.15: - lea 32+_CONSTANTS(%rip), %rsi - movl %edx, %r9d - negl %r9d - movaps %xmm3, %xmm1 - addl $-2, %r9d - lea -1023(%rdi,%rdx), %edi - andl $2047, %r9d - movq (%rsi), %r8 - movq %r8, -24(%rsp) - shrq $48, %r8 - shll $4, %r9d - andl $-32753, %r8d - orl %r9d, %r8d - movw %r8w, -18(%rsp) - movsd -24(%rsp), %xmm0 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm7 -..B1.16: - testl %eax, %eax - jne ..B1.18 -..B1.17: - lea _CONSTANTS(%rip), %rax - movaps %xmm2, %xmm8 - addl $-1023, %edi - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm8 - mulsd %xmm0, %xmm4 - jmp ..B1.19 -..B1.18: - lea 32+_CONSTANTS(%rip), %rdx - movl %eax, %r8d - negl %r8d - movaps %xmm2, %xmm8 - addl $-2, %r8d - lea -1023(%rdi,%rax), %edi - andl $2047, %r8d - movq (%rdx), %rsi - movq %rsi, -24(%rsp) - shrq $48, %rsi - shll $4, %r8d - andl $-32753, %esi - orl %r8d, %esi - movw %si, -18(%rsp) - movsd -24(%rsp), %xmm0 - mulsd %xmm0, %xmm8 - mulsd %xmm0, %xmm4 -..B1.19: - movaps %xmm7, %xmm0 - lea 16+_CONSTANTS(%rip), %rax - movaps %xmm4, %xmm10 - addsd %xmm1, %xmm0 - addsd %xmm8, %xmm10 - movaps %xmm0, %xmm5 - movaps %xmm0, %xmm9 - movaps %xmm10, %xmm11 - subsd %xmm1, %xmm5 - movsd (%rax), %xmm1 - subsd %xmm5, %xmm7 - mulsd %xmm1, %xmm9 - mulsd %xmm1, %xmm11 - movaps %xmm9, %xmm6 - subsd %xmm0, %xmm6 - subsd %xmm6, %xmm9 - movaps %xmm9, %xmm5 - subsd %xmm9, %xmm0 - addsd %xmm7, %xmm0 - movaps %xmm10, %xmm7 - subsd %xmm8, %xmm7 - movaps %xmm11, %xmm8 - movaps %xmm0, %xmm6 - subsd %xmm10, %xmm8 - subsd %xmm7, %xmm4 - subsd %xmm8, %xmm11 - mulsd %xmm11, %xmm0 - subsd %xmm11, %xmm10 - mulsd %xmm11, %xmm5 - addsd %xmm4, %xmm10 - mulsd %xmm10, %xmm6 - movaps %xmm5, %xmm4 - mulsd %xmm9, %xmm10 - addsd %xmm10, %xmm6 - addsd %xmm0, %xmm6 - addsd %xmm6, %xmm4 - movsd %xmm4, -16(%rsp) - movzwl -10(%rsp), %edx - movl %edx, %esi - andl $32752, %esi - shrl $4, %esi - lea (%rdi,%rsi), %eax - cmpl $2047, %eax - jl ..B1.21 -..B1.20: - lea _CONSTANTS(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - mulsd %xmm3, %xmm0 - mulsd %xmm2, %xmm0 - movsd %xmm0, (%rcx) - ret -..B1.21: - testl %eax, %eax - jle ..B1.23 -..B1.22: - andl $2047, %eax - andl $-32753, %edx - shll $4, %eax - orl %eax, %edx - movw %dx, -10(%rsp) - movq -16(%rsp), %rax - movq %rax, (%rcx) - ret -..B1.23: - cmpl $-9, %eax - jl ..B1.25 -..B1.24: - lea 8+_CONSTANTS(%rip), %rax - lea 32+_CONSTANTS(%rip), %rsi - lea 24+_CONSTANTS(%rip), %rdx - addl $1423, %edi - andl $2047, %edi - shll $4, %edi - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movq (%rsi), %r8 - addsd %xmm0, %xmm5 - movaps %xmm5, %xmm4 - movq %r8, -24(%rsp) - addsd %xmm6, %xmm4 - mulsd %xmm4, %xmm1 - movaps %xmm4, %xmm2 - subsd %xmm5, %xmm2 - movaps %xmm1, %xmm5 - subsd %xmm2, %xmm6 - subsd %xmm4, %xmm5 - shrq $48, %r8 - subsd %xmm5, %xmm1 - andl $-32753, %r8d - subsd %xmm1, %xmm4 - orl %edi, %r8d - addsd %xmm6, %xmm4 - movsd (%rdx), %xmm6 - mulsd %xmm6, %xmm1 - mulsd %xmm6, %xmm4 - movw %r8w, -18(%rsp) - movsd -24(%rsp), %xmm3 - mulsd %xmm3, %xmm1 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm1 - movsd %xmm1, (%rcx) - ret -..B1.25: - cmpl $-62, %eax - jle ..B1.27 -..B1.26: - lea 32+_CONSTANTS(%rip), %rax - lea 1022(%rdi,%rsi), %esi - lea 8+_CONSTANTS(%rip), %rdi - andl $-32753, %edx - orl $16, %edx - andl $2047, %esi - movw %dx, -10(%rsp) - movq (%rax), %rdx - movsd (%rdi), %xmm0 - mulsd %xmm0, %xmm0 - movq %rdx, -24(%rsp) - shrq $48, %rdx - shll $4, %esi - andl $-32753, %edx - orl %esi, %edx - movw %dx, -18(%rsp) - movsd -16(%rsp), %xmm1 - addsd -24(%rsp), %xmm0 - mulsd %xmm0, %xmm1 - movsd %xmm0, -24(%rsp) - movsd %xmm1, -16(%rsp) - movsd %xmm1, (%rcx) - ret -..B1.27: - lea 8+_CONSTANTS(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - mulsd %xmm3, %xmm0 - mulsd %xmm2, %xmm0 - movsd %xmm0, (%rcx) -..B1.28: - ret - .align 16,0x90 - .cfi_endproc - .type __libm_mul_k64,@function - .size __libm_mul_k64,.-__libm_mul_k64 - .data -# -- End __libm_mul_k64 - .section .rodata, "a" - .align 16 - .align 16 -_CONSTANTS: - .long 0 - .long 2145386496 - .long 0 - .long 1048576 - .long 33554432 - .long 1101004800 - .long 0 - .long 653262848 - .long 0 - .long 1072693248 - .type _CONSTANTS,@object - .size _CONSTANTS,40 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_normalizel_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_normalizel_k80.S deleted file mode 100644 index c2071f0bac..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_normalizel_k80.S +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_normalizel_k80.c" - .text -..TXTST0: -# -- Begin __libm_normalizel_k80 - .text - .align 16,0x90 - .globl __libm_normalizel_k80 -__libm_normalizel_k80: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_normalizel_k80.1: -..L2: - - cmpl $0, 4(%rdi) - jne ..B1.3 -..B1.2: - cmpl $0, (%rdi) - je ..B1.14 -..B1.3: - movzwl 8(%rdi), %eax - movl %eax, %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.14 -..B1.4: - testl %esi, %esi - jle ..B1.16 -..B1.5: - andl $-32768, %eax - addl $-16383, %esi - orl $-49153, %eax -..B1.6: - movw %ax, 8(%rdi) - cmpl $0, 20(%rdi) - jne ..B1.8 -..B1.7: - cmpl $0, 16(%rdi) - je ..B1.13 -..B1.8: - movzwl 24(%rdi), %edx - movl %edx, %ecx - andl $32767, %ecx - jle ..B1.15 -..B1.9: - andl $-32768, %edx - addl $-16383, %ecx - orl $-49153, %edx -..B1.10: - lea -256(%rsi), %eax - cmpl %eax, %ecx - jle ..B1.12 -..B1.11: - subl %esi, %ecx - andl $-32768, %edx - addl $16383, %ecx - andl $32767, %ecx - orl %ecx, %edx - movw %dx, 24(%rdi) - jmp ..B1.13 -..B1.12: - lea zeros(%rip), %rax - fldt (%rax) - fstpt 16(%rdi) -..B1.13: - addl %esi, 32(%rdi) -..B1.14: - ret -..B1.15: - fldt 16(%rdi) - lea _CONSTANTS(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt 16(%rdi) - movzwl 24(%rdi), %edx - movl %edx, %ecx - andl $32767, %ecx - andl $-32768, %edx - addl $-16639, %ecx - orl $-49153, %edx - jmp ..B1.10 -..B1.16: - fldt (%rdi) - lea _CONSTANTS(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fstpt (%rdi) - movzwl 8(%rdi), %eax - movl %eax, %esi - andl $32767, %esi - andl $-32768, %eax - addl $-16639, %esi - orl $-49153, %eax - jmp ..B1.6 - .align 16,0x90 - .cfi_endproc - .type __libm_normalizel_k80,@function - .size __libm_normalizel_k80,.-__libm_normalizel_k80 - .data -# -- End __libm_normalizel_k80 - .section .rodata, "a" - .align 16 - .align 16 -zeros: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type zeros,@object - .size zeros,32 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16639 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_recacoshl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_recacoshl_k80.S deleted file mode 100644 index d23b01b76b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_recacoshl_k80.S +++ /dev/null @@ -1,1655 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_recacoshl_k80.c" - .text -..TXTST0: -# -- Begin __libm_recacoshl_k80 - .text - .align 16,0x90 - .globl __libm_recacoshl_k80 -__libm_recacoshl_k80: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9 -# parameter 7: 688 + %rsp -# parameter 8: 696 + %rsp -# parameter 9: 704 + %rsp -# parameter 10: 712 + %rsp -..B1.1: - .cfi_startproc -..___tag_value___libm_recacoshl_k80.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r15 - .cfi_def_cfa_offset 24 - .cfi_offset 15, -24 - pushq %rbp - .cfi_def_cfa_offset 32 - .cfi_offset 6, -32 - subq $656, %rsp - .cfi_def_cfa_offset 688 - movq %r9, %rbp - movzwl 8(%rdi), %r10d - movq %r8, %r15 - andl $32767, %r10d - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 640(%rsp) - cmpl $16383, %r10d - movq 704(%rsp), %r13 - jl ..B1.31 -..B1.2: - movzwl 8(%r13), %r9d - movl %r9d, %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.6 -..B1.3: - cmpl $24383, %eax - jg ..B1.6 -..B1.4: - movzwl 8(%r15), %r10d - movl %r10d, %r11d - andl $32767, %r11d - cmpl $8383, %r11d - jl ..B1.6 -..B1.5: - cmpl $24383, %r11d - jle ..B1.9 -..B1.6: - movq %r13, %rdi -..___tag_value___libm_recacoshl_k80.10: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.11: -..B1.7: - movq %r15, %rdi -..___tag_value___libm_recacoshl_k80.12: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.13: -..B1.8: - movzwl 8(%r13), %r9d - movl %r9d, %eax - movzwl 8(%r15), %r10d - movl %r10d, %r11d - andl $32767, %eax - andl $32767, %r11d -..B1.9: - movl 32(%r15), %edx - movl 32(%r13), %ecx - lea -134(%rdx,%r11), %esi - lea (%rax,%rcx), %r8d - cmpl %r8d, %esi - jge ..B1.26 -..B1.10: - lea 134(%rdx,%r11), %esi - cmpl %esi, %r8d - jge ..B1.26 -..B1.11: - cmpl $0, 4(%r13) - jne ..B1.13 -..B1.12: - cmpl $0, (%r13) - je ..B1.26 -..B1.13: - cmpl $0, 4(%r15) - jne ..B1.15 -..B1.14: - cmpl $0, (%r15) - je ..B1.26 -..B1.15: - cmpl %edx, %ecx - je ..B1.17 -..B1.16: - fldt (%r13) - subl %edx, %ecx - fldt 16(%r13) - addl $16383, %ecx - andb $127, 9(%rsp) - andl $32767, %ecx - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 32(%r13) - fxch %st(2) - fstpt (%r13) - fldt (%r13) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%r13) - fldt 16(%r13) - movl 32(%r15), %edx - movzwl 8(%r15), %r10d - movzwl 8(%r13), %r9d - jmp ..B1.18 -..B1.17: - fldt (%r13) - fldt 16(%r13) -..B1.18: - fldt (%r15) - andl $32767, %r9d - andl $32767, %r10d - fld %st(2) - movl %edx, 96(%rsp) - cmpl %r10d, %r9d - fadd %st(1), %st - jg ..B1.23 -..B1.19: - jne ..B1.24 -..B1.20: - movl 4(%r13), %eax - cmpl 4(%r15), %eax - ja ..B1.23 -..B1.21: - jne ..B1.24 -..B1.22: - movl (%r13), %eax - cmpl (%r15), %eax - jbe ..B1.24 -..B1.23: - fldt 16(%r15) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) - jmp ..B1.25 -..B1.24: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%r15) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) -..B1.25: - fld %st(0) - fadd %st(2), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 80(%rsp) - jmp ..B1.30 -..B1.26: - cmpq $0, (%r13) - je ..B1.28 -..B1.27: - lea -16517(%rdx,%r11), %edx - lea -16383(%rcx,%rax), %eax - cmpl %eax, %edx - jl ..B1.29 -..B1.28: - movq (%r15), %rax - movq 8(%r15), %rdx - movq 16(%r15), %rcx - movq 24(%r15), %rsi - movq 32(%r15), %r8 - movq 40(%r15), %r9 - movq %rax, 64(%rsp) - movq %rdx, 72(%rsp) - movq %rcx, 80(%rsp) - movq %rsi, 88(%rsp) - movq %r8, 96(%rsp) - movq %r9, 104(%rsp) - jmp ..B1.30 -..B1.29: - movq (%r13), %rax - movq 8(%r13), %rdx - movq 16(%r13), %rcx - movq 24(%r13), %rsi - movq 32(%r13), %r8 - movq 40(%r13), %r9 - movq %rax, 64(%rsp) - movq %rdx, 72(%rsp) - movq %rcx, 80(%rsp) - movq %rsi, 88(%rsp) - movq %r8, 96(%rsp) - movq %r9, 104(%rsp) -..B1.30: - lea ones(%rip), %rax - lea zeros(%rip), %rdx - movl $0, 144(%rsp) - fldt (%rax) - fstpt 112(%rsp) - fldt 112(%rsp) - fldt (%rdx) - fstpt 128(%rsp) - fldt 128(%rsp) - jmp ..B1.59 -..B1.31: - movq 688(%rsp), %r9 - movq (%r9), %rax - movq 8(%r9), %rdx - movq 16(%r9), %rcx - movq 24(%r9), %rsi - movq 32(%r9), %r8 - movq 40(%r9), %r10 - movzwl 8(%r13), %r9d - movq %rax, 64(%rsp) - movl %r9d, %eax - andl $32767, %eax - movq %rdx, 72(%rsp) - cmpl $8383, %eax - movq %rcx, 80(%rsp) - movq %rsi, 88(%rsp) - movq %r8, 96(%rsp) - movq %r10, 104(%rsp) - jl ..B1.35 -..B1.32: - cmpl $24383, %eax - jg ..B1.35 -..B1.33: - movzwl 8(%r15), %r10d - movl %r10d, %r11d - andl $32767, %r11d - cmpl $8383, %r11d - jl ..B1.35 -..B1.34: - cmpl $24383, %r11d - jle ..B1.38 -..B1.35: - movq %r13, %rdi -..___tag_value___libm_recacoshl_k80.14: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.15: -..B1.36: - movq %r15, %rdi -..___tag_value___libm_recacoshl_k80.16: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.17: -..B1.37: - movzwl 8(%r13), %r9d - movl %r9d, %eax - movzwl 8(%r15), %r10d - movl %r10d, %r11d - andl $32767, %eax - andl $32767, %r11d -..B1.38: - movl 32(%r15), %edx - movl 32(%r13), %ecx - lea -134(%rdx,%r11), %esi - lea (%rax,%rcx), %r8d - cmpl %r8d, %esi - jge ..B1.55 -..B1.39: - lea 134(%rdx,%r11), %esi - cmpl %esi, %r8d - jge ..B1.55 -..B1.40: - cmpl $0, 4(%r13) - jne ..B1.42 -..B1.41: - cmpl $0, (%r13) - je ..B1.55 -..B1.42: - cmpl $0, 4(%r15) - jne ..B1.44 -..B1.43: - cmpl $0, (%r15) - je ..B1.55 -..B1.44: - cmpl %edx, %ecx - je ..B1.46 -..B1.45: - fldt (%r13) - subl %edx, %ecx - fldt 16(%r13) - addl $16383, %ecx - andb $127, 9(%rsp) - andl $32767, %ecx - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 32(%r13) - fxch %st(2) - fstpt (%r13) - fldt (%r13) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%r13) - fldt 16(%r13) - movl 32(%r15), %edx - movzwl 8(%r15), %r10d - movzwl 8(%r13), %r9d - jmp ..B1.47 -..B1.46: - fldt (%r13) - fldt 16(%r13) -..B1.47: - fldt (%r15) - andl $32767, %r9d - andl $32767, %r10d - fld %st(2) - movl %edx, 144(%rsp) - cmpl %r10d, %r9d - fsub %st(1), %st - jg ..B1.52 -..B1.48: - jne ..B1.53 -..B1.49: - movl 4(%r13), %eax - cmpl 4(%r15), %eax - ja ..B1.52 -..B1.50: - jne ..B1.53 -..B1.51: - movl (%r13), %eax - cmpl (%r15), %eax - jbe ..B1.53 -..B1.52: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 16(%r15) - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) - jmp ..B1.54 -..B1.53: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%r15) - fsubrp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) -..B1.54: - fld %st(1) - lea ones(%rip), %rax - lea zeros(%rip), %rdx - fadd %st(1), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 128(%rsp) - fldt (%rax) - fldt (%rdx) - jmp ..B1.59 -..B1.55: - cmpq $0, (%r13) - je ..B1.57 -..B1.56: - lea -16517(%rdx,%r11), %esi - lea -16383(%rcx,%rax), %eax - cmpl %eax, %esi - jl ..B1.58 -..B1.57: - fldt (%r15) - lea ones(%rip), %rax - movl %edx, 144(%rsp) - lea zeros(%rip), %rdx - fchs - fstpt 112(%rsp) - fldt 16(%r15) - fchs - fstpt 128(%rsp) - fldt (%rax) - fldt (%rdx) - jmp ..B1.59 -..B1.58: - lea ones(%rip), %r10 - lea zeros(%rip), %r11 - movq (%r13), %rax - movq 8(%r13), %rdx - movq 16(%r13), %rcx - fldt (%r10) - fldt (%r11) - movq 24(%r13), %rsi - movq 32(%r13), %r8 - movq 40(%r13), %r9 - movq %rax, 112(%rsp) - movq %rdx, 120(%rsp) - movq %rcx, 128(%rsp) - movq %rsi, 136(%rsp) - movq %r8, 144(%rsp) - movq %r9, 152(%rsp) -..B1.59: - movq 712(%rsp), %r13 - fxch %st(1) - fadd %st(0), %st - movzwl 8(%r13), %r8d - movl %r8d, %r11d - andl $32767, %r11d - movl $0, 288(%rsp) - cmpl $8383, %r11d - fstpt 256(%rsp) - fstpt 272(%rsp) - jl ..B1.63 -..B1.60: - cmpl $24383, %r11d - jg ..B1.63 -..B1.61: - movzwl 264(%rsp), %edx - movl %edx, %r10d - andl $32767, %r10d - cmpl $8383, %r10d - jl ..B1.63 -..B1.62: - cmpl $24383, %r10d - jle ..B1.66 -..B1.63: - movq %r13, %rdi -..___tag_value___libm_recacoshl_k80.18: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.19: -..B1.64: - lea 256(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.20: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.21: -..B1.65: - movzwl 8(%r13), %r8d - movl %r8d, %r11d - movzwl 264(%rsp), %edx - movl %edx, %r10d - andl $32767, %r11d - andl $32767, %r10d -..B1.66: - movl 288(%rsp), %r9d - movl 32(%r13), %eax - lea -134(%r9,%r10), %ecx - lea (%r11,%rax), %esi - cmpl %ecx, %esi - jle ..B1.83 -..B1.67: - lea 134(%r9,%r10), %ecx - cmpl %ecx, %esi - jge ..B1.83 -..B1.68: - cmpl $0, 4(%r13) - jne ..B1.70 -..B1.69: - cmpl $0, (%r13) - je ..B1.83 -..B1.70: - cmpl $0, 260(%rsp) - jne ..B1.72 -..B1.71: - cmpl $0, 256(%rsp) - je ..B1.83 -..B1.72: - cmpl %r9d, %eax - je ..B1.74 -..B1.73: - fldt (%r13) - subl %r9d, %eax - fldt 16(%r13) - addl $16383, %eax - andb $127, 9(%rsp) - andl $32767, %eax - movzwl 8(%rsp), %ecx - andl $-32768, %ecx - orl %eax, %ecx - movw %cx, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r9d, 32(%r13) - fxch %st(2) - fstpt (%r13) - fldt (%r13) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%r13) - fldt 16(%r13) - movzwl 8(%r13), %r8d - jmp ..B1.75 -..B1.74: - fldt (%r13) - fldt 16(%r13) -..B1.75: - fldt 256(%rsp) - movl %edx, %eax - andl $32767, %r8d - andl $32767, %eax - fld %st(2) - cmpl %eax, %r8d - movl %r9d, 192(%rsp) - fadd %st(1), %st - jg ..B1.80 -..B1.76: - andl $32767, %edx - cmpl %edx, %r8d - jne ..B1.81 -..B1.77: - movl 4(%r13), %eax - cmpl 260(%rsp), %eax - ja ..B1.80 -..B1.78: - jne ..B1.81 -..B1.79: - movl (%r13), %eax - cmpl 256(%rsp), %eax - jbe ..B1.81 -..B1.80: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 272(%rsp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.82 -..B1.81: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 272(%rsp) - faddp %st, %st(1) -..B1.82: - fld %st(0) - fadd %st(2), %st - fstpt 160(%rsp) - fldt 160(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 176(%rsp) - jmp ..B1.87 -..B1.83: - cmpq $0, (%r13) - je ..B1.85 -..B1.84: - lea -16517(%r9,%r10), %edx - lea -16383(%rax,%r11), %eax - cmpl %eax, %edx - jl ..B1.86 -..B1.85: - movaps 256(%rsp), %xmm0 - movaps 272(%rsp), %xmm1 - movaps 288(%rsp), %xmm2 - movaps %xmm0, 160(%rsp) - movaps %xmm1, 176(%rsp) - movaps %xmm2, 192(%rsp) - jmp ..B1.87 -..B1.86: - movq (%r13), %rax - movq 8(%r13), %rdx - movq 16(%r13), %rcx - movq 24(%r13), %rsi - movq 32(%r13), %r8 - movq 40(%r13), %r9 - movq %rax, 160(%rsp) - movq %rdx, 168(%rsp) - movq %rcx, 176(%rsp) - movq %rsi, 184(%rsp) - movq %r8, 192(%rsp) - movq %r9, 200(%rsp) -..B1.87: - movzwl 168(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.91 -..B1.88: - cmpl $24383, %eax - jg ..B1.91 -..B1.89: - movzwl 72(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.91 -..B1.90: - cmpl $24383, %eax - jle ..B1.93 -..B1.91: - lea 160(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.22: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.23: -..B1.92: - lea 64(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.24: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.25: -..B1.93: - fldt 160(%rsp) - lea t32(%rip), %rdx - fld %st(0) - fld %st(1) - fldt 64(%rsp) - fld %st(0) - fldt (%rdx) - fld %st(0) - fmul %st(6), %st - movq 696(%rsp), %r13 - fsubr %st, %st(5) - movzwl 8(%r13), %esi - movl %esi, %r11d - movl 192(%rsp), %eax - andl $32767, %r11d - addl 96(%rsp), %eax - faddp %st, %st(5) - fld %st(4) - fld %st(3) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - cmpl $8383, %r11d - fmul %st(4), %st - movl %eax, 240(%rsp) - fsubr %st, %st(3) - faddp %st, %st(3) - fmul %st(2), %st - fxch %st(4) - fsub %st(5), %st - fxch %st(1) - fsub %st(2), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 80(%rsp) - fmulp %st, %st(4) - fldt 176(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 208(%rsp) - fldt 208(%rsp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 224(%rsp) - fstpt 32(%rsp) - jl ..B1.97 -..B1.94: - cmpl $24383, %r11d - jg ..B1.97 -..B1.95: - movzwl 8(%rbp), %r8d - movl %r8d, %r10d - andl $32767, %r10d - cmpl $8383, %r10d - jl ..B1.97 -..B1.96: - cmpl $24383, %r10d - jle ..B1.100 -..B1.97: - movq %r13, %rdi -..___tag_value___libm_recacoshl_k80.26: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.27: -..B1.98: - movq %rbp, %rdi -..___tag_value___libm_recacoshl_k80.28: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.29: -..B1.99: - movzwl 8(%r13), %esi - movl %esi, %r11d - movzwl 8(%rbp), %r8d - movl %r8d, %r10d - andl $32767, %r11d - andl $32767, %r10d -..B1.100: - movl 32(%rbp), %r9d - movl 32(%r13), %eax - lea -134(%r9,%r10), %edx - lea (%r11,%rax), %ecx - cmpl %edx, %ecx - jle ..B1.117 -..B1.101: - lea 134(%r9,%r10), %edx - cmpl %edx, %ecx - jge ..B1.117 -..B1.102: - cmpl $0, 4(%r13) - jne ..B1.104 -..B1.103: - cmpl $0, (%r13) - je ..B1.117 -..B1.104: - cmpl $0, 4(%rbp) - jne ..B1.106 -..B1.105: - cmpl $0, (%rbp) - je ..B1.117 -..B1.106: - cmpl %r9d, %eax - je ..B1.108 -..B1.107: - fldt 32(%rsp) - subl %r9d, %eax - fstpt (%rsp) - addl $16383, %eax - fldt (%r13) - andl $32767, %eax - fldt 16(%r13) - andb $127, 9(%rsp) - movzwl 8(%rsp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r9d, 32(%r13) - fxch %st(2) - fstpt (%r13) - fldt (%r13) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%r13) - fldt 16(%r13) - movl 32(%rbp), %r9d - movzwl 8(%rbp), %r8d - movzwl 8(%r13), %esi - jmp ..B1.109 -..B1.108: - fldt (%r13) - fldt 16(%r13) -..B1.109: - fldt (%rbp) - andl $32767, %esi - andl $32767, %r8d - fld %st(2) - movl %r9d, 336(%rsp) - cmpl %r8d, %esi - fadd %st(1), %st - jg ..B1.114 -..B1.110: - jne ..B1.115 -..B1.111: - movl 4(%r13), %eax - cmpl 4(%rbp), %eax - ja ..B1.114 -..B1.112: - jne ..B1.115 -..B1.113: - movl (%r13), %eax - cmpl (%rbp), %eax - jbe ..B1.115 -..B1.114: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 16(%rbp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.116 -..B1.115: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 16(%rbp) - faddp %st, %st(1) -..B1.116: - fld %st(0) - fadd %st(2), %st - fstpt 304(%rsp) - fldt 304(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 320(%rsp) - jmp ..B1.121 -..B1.117: - cmpq $0, (%r13) - je ..B1.119 -..B1.118: - lea -16517(%r9,%r10), %edx - lea -16383(%rax,%r11), %eax - cmpl %eax, %edx - jl ..B1.120 -..B1.119: - movq (%rbp), %rax - movq 8(%rbp), %rdx - movq 16(%rbp), %rcx - movq 24(%rbp), %rsi - movq 32(%rbp), %r8 - movq 40(%rbp), %rbp - movq %rax, 304(%rsp) - movq %rdx, 312(%rsp) - movq %rcx, 320(%rsp) - movq %rsi, 328(%rsp) - movq %r8, 336(%rsp) - movq %rbp, 344(%rsp) - jmp ..B1.121 -..B1.120: - movq (%r13), %rax - movq 8(%r13), %rdx - movq 16(%r13), %rcx - movq 24(%r13), %rbp - movq 32(%r13), %rsi - movq 40(%r13), %rdi - movq %rax, 304(%rsp) - movq %rdx, 312(%rsp) - movq %rcx, 320(%rsp) - movq %rbp, 328(%rsp) - movq %rsi, 336(%rsp) - movq %rdi, 344(%rsp) -..B1.121: - movzwl 312(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.125 -..B1.122: - cmpl $24383, %eax - jg ..B1.125 -..B1.123: - movzwl 120(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.125 -..B1.124: - cmpl $24383, %eax - jle ..B1.127 -..B1.125: - lea 304(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.30: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.31: -..B1.126: - lea 112(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.32: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.33: -..B1.127: - fldt 304(%rsp) - fld %st(0) - fld %st(1) - fldt 16(%rsp) - fld %st(0) - fmul %st(4), %st - movl 336(%rsp), %ecx - fsubr %st, %st(3) - movzwl 216(%rsp), %eax - faddp %st, %st(3) - fld %st(2) - andl $32767, %eax - addl 144(%rsp), %ecx - fxch %st(2) - fsub %st(3), %st - fldt 112(%rsp) - cmpl $8383, %eax - fmul %st, %st(2) - fld %st(0) - movl %ecx, 384(%rsp) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 128(%rsp) - fmulp %st, %st(4) - fldt 320(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 352(%rsp) - fldt 352(%rsp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 368(%rsp) - fldt 368(%rsp) - jl ..B1.131 -..B1.128: - cmpl $24383, %eax - jg ..B1.131 -..B1.129: - movzwl 360(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.131 -..B1.130: - cmpl $24383, %eax - jle ..B1.134 -..B1.131: - fstp %st(1) - fstp %st(0) - lea 208(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.34: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.35: -..B1.132: - lea 352(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.36: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.37: -..B1.133: - fldt 352(%rsp) - fldt 368(%rsp) - movl 384(%rsp), %ecx -..B1.134: - fldt 208(%rsp) - fld %st(2) - fdivr %st(1), %st - fmul %st, %st(2) - fld %st(3) - fxch %st(4) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt 16(%rsp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - movl 240(%rsp), %edx - fsubr %st(4), %st - subl %ecx, %edx - faddp %st, %st(1) - fld %st(0) - decl %edx - movl %edx, 432(%rsp) - fsubr %st(4), %st - fxch %st(2) - fmul %st(3), %st - fsubr %st, %st(7) - faddp %st, %st(7) - fxch %st(2) - fsub %st(6), %st - fld %st(2) - fmul %st(7), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(1) - fmul %st, %st(3) - fxch %st(7) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(6) - faddp %st, %st(5) - fsubrp %st, %st(2) - fxch %st(3) - fsubrp %st, %st(1) - fldt 224(%rsp) - faddp %st, %st(1) - fsubp %st, %st(1) - fldt 48(%rsp) - fdivrp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 400(%rsp) - fldt 400(%rsp) - fsubrp %st, %st(2) - movzwl 408(%rsp), %esi - movl %esi, %eax - andl $32767, %eax - fadd %st, %st(1) - fxch %st(1) - fstpt 416(%rsp) - cmpl $8383, %eax - fstpt 32(%rsp) - jl ..B1.138 -..B1.135: - cmpl $24383, %eax - jg ..B1.138 -..B1.136: - movzwl 264(%rsp), %edi - movl %edi, %r9d - andl $32767, %r9d - cmpl $8383, %r9d - jl ..B1.138 -..B1.137: - cmpl $24383, %r9d - jle ..B1.141 -..B1.138: - lea 400(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.38: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.39: -..B1.139: - lea 256(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.40: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.41: -..B1.140: - movzwl 264(%rsp), %edi - movl %edi, %r9d - movzwl 408(%rsp), %esi - movl %esi, %eax - movl 432(%rsp), %edx - andl $32767, %r9d - andl $32767, %eax -..B1.141: - movl 288(%rsp), %r8d - lea (%rdx,%rax), %ebp - lea -134(%r8,%r9), %ecx - cmpl %ecx, %ebp - jle ..B1.158 -..B1.142: - lea 134(%r8,%r9), %ecx - cmpl %ecx, %ebp - jge ..B1.158 -..B1.143: - cmpl $0, 404(%rsp) - jne ..B1.145 -..B1.144: - cmpl $0, 400(%rsp) - je ..B1.158 -..B1.145: - cmpl $0, 260(%rsp) - jne ..B1.147 -..B1.146: - cmpl $0, 256(%rsp) - je ..B1.158 -..B1.147: - cmpl %r8d, %edx - je ..B1.149 -..B1.148: - fldt 32(%rsp) - subl %r8d, %edx - fstpt (%rsp) - addl $16383, %edx - fldt 400(%rsp) - andl $32767, %edx - fldt 416(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edx, %eax - movl %r8d, %edx - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 400(%rsp) - fldt 400(%rsp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 408(%rsp), %esi - movl %esi, %eax - andl $32767, %eax - movl %r8d, 432(%rsp) - movl %eax, %ecx - fstpt 416(%rsp) - fldt 416(%rsp) - jmp ..B1.150 -..B1.149: - fldt 400(%rsp) - movl %esi, %ecx - fldt 416(%rsp) - andl $32767, %ecx -..B1.150: - fldt 256(%rsp) - movl %edi, %ebp - andl $32767, %ebp - fld %st(2) - movl %r8d, 480(%rsp) - cmpl %ebp, %ecx - fadd %st(1), %st - jg ..B1.155 -..B1.151: - andl $32767, %esi - andl $32767, %edi - cmpl %edi, %esi - jne ..B1.156 -..B1.152: - movl 404(%rsp), %ecx - cmpl 260(%rsp), %ecx - ja ..B1.155 -..B1.153: - jne ..B1.156 -..B1.154: - movl 400(%rsp), %ecx - cmpl 256(%rsp), %ecx - jbe ..B1.156 -..B1.155: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 272(%rsp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.157 -..B1.156: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 272(%rsp) - faddp %st, %st(1) -..B1.157: - fld %st(0) - fadd %st(2), %st - fstpt 448(%rsp) - fldt 448(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 464(%rsp) - jmp ..B1.162 -..B1.158: - cmpq $0, 400(%rsp) - je ..B1.160 -..B1.159: - lea -16517(%r8,%r9), %ecx - lea -16383(%rdx,%rax), %ebp - cmpl %ebp, %ecx - jl ..B1.161 -..B1.160: - movaps 256(%rsp), %xmm0 - movaps 272(%rsp), %xmm1 - movaps 288(%rsp), %xmm2 - movaps %xmm0, 448(%rsp) - movaps %xmm1, 464(%rsp) - movaps %xmm2, 480(%rsp) - jmp ..B1.162 -..B1.161: - movaps 400(%rsp), %xmm0 - movaps 416(%rsp), %xmm1 - movaps 432(%rsp), %xmm2 - movaps %xmm0, 448(%rsp) - movaps %xmm1, 464(%rsp) - movaps %xmm2, 480(%rsp) -..B1.162: - cmpl $8383, %eax - jl ..B1.166 -..B1.163: - cmpl $24383, %eax - jg ..B1.166 -..B1.164: - movzwl 456(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.166 -..B1.165: - cmpl $24383, %eax - jle ..B1.169 -..B1.166: - lea 400(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.42: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.43: -..B1.167: - lea 448(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.44: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.45: -..B1.168: - movl 432(%rsp), %edx -..B1.169: - fldt 400(%rsp) - fld %st(0) - fld %st(1) - fldt 16(%rsp) - fld %st(0) - fmul %st(4), %st - addl 480(%rsp), %edx - fsubr %st, %st(3) - movl %edx, 528(%rsp) - faddp %st, %st(3) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fldt 448(%rsp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 464(%rsp) - fmulp %st, %st(4) - fldt 416(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 496(%rsp) - fldt 496(%rsp) - fsubr %st, %st(1) - movzwl 504(%rsp), %eax - fxch %st(1) - faddp %st, %st(2) - andl $32767, %eax - fxch %st(1) - fstpt 512(%rsp) - fldt 512(%rsp) - cmpl $383, %eax - fxch %st(1) - fstpt 32(%rsp) - jl ..B1.171 -..B1.170: - cmpl $32383, %eax - jle ..B1.173 -..B1.171: - fstp %st(0) - lea 496(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.46: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.47: -..B1.172: - fldt 496(%rsp) - fstpt 32(%rsp) - fldt 512(%rsp) - movl 528(%rsp), %edx -..B1.173: - testb $1, %dl - jne ..B1.208 -..B1.174: - lea halfs(%rip), %rax - fldt (%rax) -..B1.175: - fldt 32(%rsp) - fld %st(0) - fsqrt - fldt 16(%rsp) - fmul %st(1), %st - fld %st(0) - movzwl 408(%rsp), %ebp - movl %ebp, %r9d - andl $32767, %r9d - fsubr %st(2), %st - sarl $1, %edx - faddp %st, %st(1) - fld %st(0) - cmpl $8383, %r9d - movl %edx, 576(%rsp) - fsubr %st(2), %st - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fmulp %st, %st(1) - fdiv %st(1), %st - fld %st(0) - fadd %st(2), %st - fstpt 544(%rsp) - fldt 544(%rsp) - fsubrp %st, %st(2) - fadd %st, %st(1) - fxch %st(1) - fstpt 560(%rsp) - fstpt 32(%rsp) - jl ..B1.179 -..B1.176: - cmpl $24383, %r9d - jg ..B1.179 -..B1.177: - movzwl 552(%rsp), %esi - movl %esi, %edi - andl $32767, %edi - cmpl $8383, %edi - jl ..B1.179 -..B1.178: - cmpl $24383, %edi - jle ..B1.182 -..B1.179: - lea 400(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.48: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.49: -..B1.180: - lea 544(%rsp), %rdi -..___tag_value___libm_recacoshl_k80.50: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacoshl_k80.51: -..B1.181: - movzwl 408(%rsp), %ebp - movl %ebp, %r9d - movzwl 552(%rsp), %esi - movl %esi, %edi - movl 576(%rsp), %edx - andl $32767, %r9d - andl $32767, %edi -..B1.182: - movl 432(%rsp), %r8d - lea -134(%rdx,%rdi), %eax - lea (%r9,%r8), %ecx - cmpl %eax, %ecx - jle ..B1.199 -..B1.183: - lea 134(%rdx,%rdi), %eax - cmpl %eax, %ecx - jge ..B1.199 -..B1.184: - cmpl $0, 404(%rsp) - jne ..B1.186 -..B1.185: - cmpl $0, 400(%rsp) - je ..B1.199 -..B1.186: - cmpl $0, 548(%rsp) - jne ..B1.188 -..B1.187: - cmpl $0, 544(%rsp) - je ..B1.199 -..B1.188: - cmpl %edx, %r8d - je ..B1.190 -..B1.189: - fldt 32(%rsp) - subl %edx, %r8d - fstpt (%rsp) - addl $16383, %r8d - fldt 400(%rsp) - andl $32767, %r8d - fldt 416(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %r8d, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 400(%rsp) - fldt 400(%rsp) - fxch %st(2) - fmulp %st, %st(1) - movl %edx, 432(%rsp) - fstpt 416(%rsp) - fldt 416(%rsp) - movzwl 408(%rsp), %ebp - jmp ..B1.191 -..B1.190: - fldt 400(%rsp) - fldt 416(%rsp) -..B1.191: - fldt 544(%rsp) - movl %ebp, %eax - movl %edx, 48(%rsp) - movl %esi, %edx - andl $32767, %eax - andl $32767, %edx - fld %st(2) - cmpl %edx, %eax - fadd %st(1), %st - jg ..B1.196 -..B1.192: - andl $32767, %ebp - andl $32767, %esi - cmpl %esi, %ebp - jne ..B1.197 -..B1.193: - movl 404(%rsp), %eax - cmpl 548(%rsp), %eax - ja ..B1.196 -..B1.194: - jne ..B1.197 -..B1.195: - movl 400(%rsp), %eax - cmpl 544(%rsp), %eax - jbe ..B1.197 -..B1.196: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 560(%rsp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - jmp ..B1.198 -..B1.197: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 560(%rsp) - faddp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) -..B1.198: - fld %st(0) - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B1.203 -..B1.199: - cmpq $0, 400(%rsp) - je ..B1.201 -..B1.200: - lea -16517(%rdx,%rdi), %eax - lea -16383(%r8,%r9), %edx - cmpl %edx, %eax - jl ..B1.202 -..B1.201: - movaps 544(%rsp), %xmm0 - movaps 560(%rsp), %xmm1 - movaps 576(%rsp), %xmm2 - movaps %xmm0, 16(%rsp) - movaps %xmm1, 32(%rsp) - movaps %xmm2, 48(%rsp) - jmp ..B1.203 -..B1.202: - movaps 400(%rsp), %xmm0 - movaps 416(%rsp), %xmm1 - movaps 432(%rsp), %xmm2 - movaps %xmm0, 16(%rsp) - movaps %xmm1, 32(%rsp) - movaps %xmm2, 48(%rsp) -..B1.203: - lea 592(%rsp), %rdi - lea 16(%rsp), %rsi -..___tag_value___libm_recacoshl_k80.52: - call __libm_log1p_k80@PLT -..___tag_value___libm_recacoshl_k80.53: -..B1.204: - addq $-32, %rsp - .cfi_def_cfa_offset 720 - fldt 624(%rsp) - movl 656(%rsp), %edi - fstpt (%rsp) - fldt 640(%rsp) - fstpt 16(%rsp) -..___tag_value___libm_recacoshl_k80.55: - call __libm_scalbl_k80@PLT -..___tag_value___libm_recacoshl_k80.56: -..B1.211: - addq $32, %rsp - .cfi_def_cfa_offset 688 -..B1.205: - movq 640(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.207 -..B1.206: - addq $656, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 688 - .cfi_offset 6, -32 - .cfi_offset 13, -16 - .cfi_offset 15, -24 -..B1.207: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.208: - fldt 32(%rsp) - incl %edx - lea halfs(%rip), %rax - movl %edx, 528(%rsp) - fldt (%rax) - fmul %st, %st(1) - fxch %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fstpt 512(%rsp) - fldt 512(%rsp) - fxch %st(1) - fstpt 496(%rsp) - fxch %st(1) - jmp ..B1.175 - .align 16,0x90 - .cfi_endproc - .type __libm_recacoshl_k80,@function - .size __libm_recacoshl_k80,.-__libm_recacoshl_k80 - .data -# -- End __libm_recacoshl_k80 - .section .rodata, "a" - .align 16 - .align 16 -ones: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type ones,@object - .size ones,32 - .align 16 -zeros: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type zeros,@object - .size zeros,32 - .align 16 -t32: - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type t32,@object - .size t32,32 - .align 16 -halfs: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type halfs,@object - .size halfs,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_recacosl_recasinl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_recacosl_recasinl_k80.S deleted file mode 100644 index 233a1e1097..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_recacosl_recasinl_k80.S +++ /dev/null @@ -1,5813 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_recacosl_recasinl_k80.c" - .text -..TXTST0: -# -- Begin __libm_carctrigprepare_k80 - .text - .align 16,0x90 - .globl __libm_carctrigprepare_k80 -__libm_carctrigprepare_k80: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9 -# parameter 7: 320 + %rsp -# parameter 8: 328 + %rsp -# parameter 9: 336 + %rsp -# parameter 10: 344 + %rsp -..B1.1: - .cfi_startproc -..___tag_value___libm_carctrigprepare_k80.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $272, %rsp - .cfi_def_cfa_offset 320 - lea ones(%rip), %r10 - movq %rdx, %rbp - lea zeros(%rip), %r11 - movq %fs:40, %rax - movq %rcx, %r13 - xorq %rsp, %rax - movq %r9, %r14 - fldt (%r10) - movq %r8, %r12 - fldt (%r11) - movq %rsi, %rbx - movq (%rdi), %r10 - movq %rax, 256(%rsp) - xorl %eax, %eax - movq %r10, (%rbp) - movq 8(%rdi), %rdx - movb 9(%rdi), %cl - movq %rbp, %rdi - movq %rdx, 8(%rbp) - andb $127, %cl - movl %eax, 96(%rsp) - fstpt (%rsp) - fldt (%rsp) - fxch %st(1) - fstpt 64(%rsp) - fstpt 80(%rsp) - fldt 80(%rsp) - movl %eax, 32(%rbp) - movb %cl, 9(%rbp) - fstpt 16(%rbp) -..___tag_value___libm_carctrigprepare_k80.14: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.15: -..B1.2: - fldt (%rsp) - movq %r13, %rdi - movq (%rbx), %rax - movq %rax, (%r13) - movq 8(%rbx), %rdx - movb 9(%rbx), %cl - movq %rdx, 8(%r13) - andb $127, %cl - movl $0, 32(%r13) - movb %cl, 9(%r13) - fstpt 16(%r13) -..___tag_value___libm_carctrigprepare_k80.16: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.17: -..B1.3: - fldt (%r13) - lea t32(%rip), %rdx - fld %st(0) - fld %st(1) - fld %st(2) - fldt 16(%r13) - fmulp %st, %st(4) - movq 320(%rsp), %rbx - fxch %st(3) - fadd %st(0), %st - fldt (%rdx) - fmul %st, %st(3) - movl 32(%r13), %eax - fxch %st(2) - fsub %st(3), %st - addl %eax, %eax - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(3) - fsubr %st, %st(4) - fmul %st(4), %st - movl %eax, 32(%rbx) - fadd %st(0), %st - fxch %st(4) - fmul %st(0), %st - fxch %st(2) - fstpt 16(%rsp) - fld %st(3) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt (%rbx) - fldt (%rbx) - fsubrp %st, %st(1) - movzwl 8(%rbp), %edx - movl %edx, %eax - andl $32767, %eax - fadd %st(1), %st - fstpt 16(%rbx) - cmpl $8383, %eax - fstpt 32(%rsp) - jl ..B1.7 -..B1.4: - cmpl $24383, %eax - jg ..B1.7 -..B1.5: - movzwl 72(%rsp), %esi - movl %esi, %r8d - andl $32767, %r8d - cmpl $8383, %r8d - jl ..B1.7 -..B1.6: - cmpl $24383, %r8d - jle ..B1.10 -..B1.7: - movq %rbp, %rdi -..___tag_value___libm_carctrigprepare_k80.18: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.19: -..B1.8: - lea 64(%rsp), %rdi -..___tag_value___libm_carctrigprepare_k80.20: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.21: -..B1.9: - movzwl 8(%rbp), %edx - movl %edx, %eax - movzwl 72(%rsp), %esi - movl %esi, %r8d - andl $32767, %eax - andl $32767, %r8d -..B1.10: - movl 32(%rbp), %ecx - movl 96(%rsp), %r9d - lea (%rax,%rcx), %r13d - lea -134(%r9,%r8), %r11d - cmpl %r13d, %r11d - lea (%r8,%r9), %r10d - jge ..B1.27 -..B1.11: - lea 134(%r9,%r8), %edi - cmpl %edi, %r13d - jge ..B1.27 -..B1.12: - cmpl $0, 4(%rbp) - jne ..B1.14 -..B1.13: - cmpl $0, (%rbp) - je ..B1.27 -..B1.14: - cmpl $0, 68(%rsp) - jne ..B1.16 -..B1.15: - cmpl $0, 64(%rsp) - je ..B1.27 -..B1.16: - cmpl %r9d, %ecx - je ..B1.18 -..B1.17: - fldt 32(%rsp) - subl %r9d, %ecx - fstpt (%rsp) - addl $16383, %ecx - fldt (%rbp) - andl $32767, %ecx - fldt 16(%rbp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r9d, 32(%rbp) - fxch %st(2) - fstpt (%rbp) - fldt (%rbp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbp) - fstpt 32(%rsp) - movzwl 8(%rbp), %edx - jmp ..B1.19 -..B1.18: - fldt (%rbp) - fstpt 32(%rsp) -..B1.19: - fldt 64(%rsp) - movl %esi, %eax - fldt 32(%rsp) - andl $32767, %edx - andl $32767, %eax - movl %r9d, 32(%r14) - cmpl %eax, %edx - fadd %st(1), %st - fstpt 16(%r14) - fldt 16(%r14) - jg ..B1.24 -..B1.20: - movl %esi, %eax - andl $32767, %eax - cmpl %eax, %edx - jne ..B1.25 -..B1.21: - movl 4(%rbp), %eax - cmpl 68(%rsp), %eax - ja ..B1.24 -..B1.22: - jne ..B1.25 -..B1.23: - movl (%rbp), %eax - cmpl 64(%rsp), %eax - jbe ..B1.25 -..B1.24: - fldt 32(%rsp) - fsub %st(1), %st - faddp %st, %st(2) - fldt 80(%rsp) - faddp %st, %st(2) - fldt 16(%rbp) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) - jmp ..B1.26 -..B1.25: - fldt 32(%rsp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 80(%rsp) - fldt 16(%rbp) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) -..B1.26: - fldt 32(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt (%r14) - fldt (%r14) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%r14) - jmp ..B1.31 -..B1.27: - cmpq $0, (%rbp) - je ..B1.29 -..B1.28: - lea -16517(%r9,%r8), %edx - lea -16383(%rcx,%rax), %eax - cmpl %eax, %edx - jl ..B1.30 -..B1.29: - movq 64(%rsp), %rax - movq %rax, (%r14) - movq 96(%rsp), %rax - movq %rax, 32(%r14) - movq 72(%rsp), %rdx - movq 80(%rsp), %rcx - movq 88(%rsp), %r13 - movq 104(%rsp), %rax - movq %rdx, 8(%r14) - movq %rcx, 16(%r14) - movq %r13, 24(%r14) - movq %rax, 40(%r14) - jmp ..B1.31 -..B1.30: - movq (%rbp), %rax - movq %rax, (%r14) - movq 8(%rbp), %rdx - movq %rdx, 8(%r14) - movq 16(%rbp), %rcx - movq %rcx, 16(%r14) - movq 24(%rbp), %r13 - movq %r13, 24(%r14) - movq 32(%rbp), %rax - movq %rax, 32(%r14) - movq 40(%rbp), %rax - movq %rax, 40(%r14) -..B1.31: - movzwl 8(%rbp), %edx - movl %edx, %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.35 -..B1.32: - cmpl $24383, %eax - jg ..B1.35 -..B1.33: - cmpl $8383, %r8d - jl ..B1.35 -..B1.34: - cmpl $24383, %r8d - jle ..B1.38 -..B1.35: - movq %rbp, %rdi -..___tag_value___libm_carctrigprepare_k80.22: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.23: -..B1.36: - lea 64(%rsp), %rdi -..___tag_value___libm_carctrigprepare_k80.24: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.25: -..B1.37: - movzwl 72(%rsp), %esi - movl %esi, %ecx - andl $32767, %ecx - movl 96(%rsp), %r9d - movzwl 8(%rbp), %edx - movl %edx, %eax - andl $32767, %eax - lea (%r9,%rcx), %r10d - lea -134(%r9,%rcx), %r11d -..B1.38: - movl 32(%rbp), %r13d - lea (%rax,%r13), %ecx - cmpl %ecx, %r11d - jge ..B1.55 -..B1.39: - lea 134(%r10), %r8d - cmpl %r8d, %ecx - jge ..B1.55 -..B1.40: - cmpl $0, 4(%rbp) - jne ..B1.42 -..B1.41: - cmpl $0, (%rbp) - je ..B1.55 -..B1.42: - cmpl $0, 68(%rsp) - jne ..B1.44 -..B1.43: - cmpl $0, 64(%rsp) - je ..B1.55 -..B1.44: - cmpl %r9d, %r13d - je ..B1.46 -..B1.45: - fldt 32(%rsp) - subl %r9d, %r13d - fstpt (%rsp) - addl $16383, %r13d - fldt (%rbp) - andl $32767, %r13d - fldt 16(%rbp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %r13d, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r9d, 32(%rbp) - fxch %st(2) - fstpt (%rbp) - fldt (%rbp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbp) - movzwl 8(%rbp), %edx - jmp ..B1.47 -..B1.46: - fldt (%rbp) -..B1.47: - fldt 64(%rsp) - fld %st(1) - movl %esi, %eax - andl $32767, %edx - andl $32767, %eax - fadd %st(1), %st - movl %r9d, 32(%r14) - cmpl %eax, %edx - fstpt 16(%r14) - fldt 16(%r14) - jg ..B1.52 -..B1.48: - andl $32767, %esi - cmpl %esi, %edx - jne ..B1.53 -..B1.49: - movl 4(%rbp), %eax - cmpl 68(%rsp), %eax - ja ..B1.52 -..B1.50: - jne ..B1.53 -..B1.51: - movl (%rbp), %eax - cmpl 64(%rsp), %eax - jbe ..B1.53 -..B1.52: - fldt 80(%rsp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 16(%rbp) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.54 -..B1.53: - fldt 16(%rbp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 80(%rsp) - faddp %st, %st(1) -..B1.54: - fld %st(0) - fadd %st(2), %st - fstpt (%r14) - fldt (%r14) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%r14) - jmp ..B1.59 -..B1.55: - cmpq $0, (%rbp) - je ..B1.57 -..B1.56: - addl $-16517, %r10d - lea -16383(%r13,%rax), %eax - cmpl %eax, %r10d - jl ..B1.58 -..B1.57: - movq 64(%rsp), %rax - movq 72(%rsp), %rdx - movq 80(%rsp), %rcx - movq 88(%rsp), %rsi - movq 96(%rsp), %r8 - movq 104(%rsp), %r9 - movq %rax, (%r14) - movq %rdx, 8(%r14) - movq %rcx, 16(%r14) - movq %rsi, 24(%r14) - movq %r8, 32(%r14) - movq %r9, 40(%r14) - jmp ..B1.59 -..B1.58: - movq (%rbp), %rax - movq %rax, (%r14) - movq 8(%rbp), %rdx - movq %rdx, 8(%r14) - movq 16(%rbp), %rcx - movq %rcx, 16(%r14) - movq 24(%rbp), %rsi - movq %rsi, 24(%r14) - movq 32(%rbp), %r8 - movq %r8, 32(%r14) - movq 40(%rbp), %r9 - movq %r9, 40(%r14) -..B1.59: - movzwl 8(%r14), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.61 -..B1.60: - cmpl $24383, %eax - jle ..B1.63 -..B1.61: - movq %r14, %rdi -..___tag_value___libm_carctrigprepare_k80.26: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.27: -..B1.62: - movq %r14, %rdi -..___tag_value___libm_carctrigprepare_k80.28: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.29: -..B1.63: - fldt (%r14) - fld %st(0) - fld %st(1) - fldt 16(%r14) - fldt 16(%rsp) - movl 32(%r14), %eax - fmul %st(4), %st - addl %eax, %eax - movl %eax, 144(%rsp) - fsubr %st, %st(3) - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(2) - fsub %st(3), %st - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(1) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubrp %st, %st(2) - movzwl 120(%rsp), %esi - movl %esi, %r11d - andl $32767, %r11d - fadd %st, %st(1) - fxch %st(1) - fstpt 128(%rsp) - cmpl $8383, %r11d - fstpt 32(%rsp) - jl ..B1.67 -..B1.64: - cmpl $24383, %r11d - jg ..B1.67 -..B1.65: - movzwl 8(%rbx), %r8d - movl %r8d, %r10d - andl $32767, %r10d - cmpl $8383, %r10d - jl ..B1.67 -..B1.66: - cmpl $24383, %r10d - jle ..B1.70 -..B1.67: - lea 112(%rsp), %rdi -..___tag_value___libm_carctrigprepare_k80.30: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.31: -..B1.68: - movq %rbx, %rdi -..___tag_value___libm_carctrigprepare_k80.32: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.33: -..B1.69: - movzwl 120(%rsp), %esi - movl %esi, %r11d - movzwl 8(%rbx), %r8d - movl %r8d, %r10d - movl 144(%rsp), %eax - andl $32767, %r11d - andl $32767, %r10d -..B1.70: - movl 32(%rbx), %r9d - lea (%rax,%r11), %ecx - lea -134(%r9,%r10), %edx - cmpl %edx, %ecx - jle ..B1.87 -..B1.71: - lea 134(%r9,%r10), %edx - cmpl %edx, %ecx - jge ..B1.87 -..B1.72: - cmpl $0, 116(%rsp) - jne ..B1.74 -..B1.73: - cmpl $0, 112(%rsp) - je ..B1.87 -..B1.74: - cmpl $0, 4(%rbx) - jne ..B1.76 -..B1.75: - cmpl $0, (%rbx) - je ..B1.87 -..B1.76: - cmpl %r9d, %eax - je ..B1.78 -..B1.77: - fldt 32(%rsp) - subl %r9d, %eax - fstpt (%rsp) - addl $16383, %eax - fldt 112(%rsp) - andl $32767, %eax - fldt 128(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %edx - andl $-32768, %edx - orl %eax, %edx - movw %dx, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fxch %st(2) - fmulp %st, %st(1) - movl %r9d, 144(%rsp) - fstpt 128(%rsp) - fldt 128(%rsp) - movzwl 120(%rsp), %esi - jmp ..B1.79 -..B1.78: - fldt 112(%rsp) - fldt 128(%rsp) -..B1.79: - fldt (%rbx) - movl %esi, %eax - andl $32767, %r8d - andl $32767, %eax - fld %st(2) - cmpl %r8d, %eax - movl %r9d, 192(%rsp) - fadd %st(1), %st - jg ..B1.84 -..B1.80: - andl $32767, %esi - cmpl %r8d, %esi - jne ..B1.85 -..B1.81: - movl 4(%rbx), %eax - cmpl 116(%rsp), %eax - jb ..B1.84 -..B1.82: - jne ..B1.85 -..B1.83: - movl 112(%rsp), %eax - cmpl (%rbx), %eax - jbe ..B1.85 -..B1.84: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 16(%rbx) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.86 -..B1.85: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 16(%rbx) - faddp %st, %st(1) -..B1.86: - fld %st(0) - fadd %st(2), %st - fstpt 160(%rsp) - fldt 160(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 176(%rsp) - jmp ..B1.91 -..B1.87: - cmpq $0, 112(%rsp) - je ..B1.89 -..B1.88: - lea -16517(%r9,%r10), %edx - lea -16383(%rax,%r11), %eax - cmpl %eax, %edx - jl ..B1.90 -..B1.89: - movq (%rbx), %rax - movq 8(%rbx), %rdx - movq 16(%rbx), %rcx - movq 24(%rbx), %rsi - movq 32(%rbx), %r8 - movq 40(%rbx), %r9 - movq %rax, 160(%rsp) - movq %rdx, 168(%rsp) - movq %rcx, 176(%rsp) - movq %rsi, 184(%rsp) - movq %r8, 192(%rsp) - movq %r9, 200(%rsp) - jmp ..B1.91 -..B1.90: - movaps 112(%rsp), %xmm0 - movaps 128(%rsp), %xmm1 - movaps 144(%rsp), %xmm2 - movaps %xmm0, 160(%rsp) - movaps %xmm1, 176(%rsp) - movaps %xmm2, 192(%rsp) -..B1.91: - movzwl 168(%rsp), %eax - andl $32767, %eax - cmpl $383, %eax - jl ..B1.93 -..B1.92: - cmpl $32383, %eax - jle ..B1.94 -..B1.93: - lea 160(%rsp), %rdi -..___tag_value___libm_carctrigprepare_k80.34: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.35: -..B1.94: - movl 192(%rsp), %edx - testb $1, %dl - jne ..B1.193 -..B1.95: - fldt 160(%rsp) - lea halfs(%rip), %rax - fstpt 48(%rsp) - fldt 176(%rsp) - fldt (%rax) - fstpt 32(%rsp) -..B1.96: - fldt 48(%rsp) - fld %st(0) - fsqrt - fldt 16(%rsp) - movq 328(%rsp), %r13 - fmul %st(1), %st - fld %st(0) - sarl $1, %edx - fsubr %st(2), %st - movl %edx, 32(%r13) - faddp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%rsp) - fmulp %st, %st(1) - fdiv %st(1), %st - fld %st(0) - fadd %st(2), %st - fstpt (%r13) - fldt (%r13) - fsubrp %st, %st(2) - movzwl 8(%rbp), %r9d - movl %r9d, %r11d - andl $32767, %r11d - fadd %st, %st(1) - fxch %st(1) - fstpt 16(%r13) - cmpl $8383, %r11d - fstpt 48(%rsp) - jl ..B1.100 -..B1.97: - cmpl $24383, %r11d - jg ..B1.100 -..B1.98: - movzwl 72(%rsp), %ecx - movl %ecx, %r10d - andl $32767, %r10d - cmpl $8383, %r10d - jl ..B1.100 -..B1.99: - cmpl $24383, %r10d - jle ..B1.103 -..B1.100: - movq %rbp, %rdi -..___tag_value___libm_carctrigprepare_k80.36: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.37: -..B1.101: - lea 64(%rsp), %rdi -..___tag_value___libm_carctrigprepare_k80.38: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.39: -..B1.102: - movzwl 8(%rbp), %r9d - movl %r9d, %r11d - movzwl 72(%rsp), %ecx - movl %ecx, %r10d - andl $32767, %r11d - andl $32767, %r10d -..B1.103: - movl 32(%rbp), %eax - movl 96(%rsp), %edx - lea (%r11,%rax), %r8d - lea -134(%rdx,%r10), %esi - cmpl %esi, %r8d - jle ..B1.120 -..B1.104: - lea 134(%rdx,%r10), %esi - cmpl %esi, %r8d - jge ..B1.120 -..B1.105: - cmpl $0, 4(%rbp) - jne ..B1.107 -..B1.106: - cmpl $0, (%rbp) - je ..B1.120 -..B1.107: - cmpl $0, 68(%rsp) - jne ..B1.109 -..B1.108: - cmpl $0, 64(%rsp) - je ..B1.120 -..B1.109: - cmpl %edx, %eax - je ..B1.111 -..B1.110: - fldt 48(%rsp) - subl %edx, %eax - fstpt (%rsp) - addl $16383, %eax - fldt (%rbp) - andl $32767, %eax - fldt 16(%rbp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %esi - andl $-32768, %esi - orl %eax, %esi - movw %si, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 32(%rbp) - fxch %st(2) - fstpt (%rbp) - fldt (%rbp) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbp) - movzwl 8(%rbp), %r9d - jmp ..B1.112 -..B1.111: - fldt (%rbp) -..B1.112: - fldt 64(%rsp) - fld %st(1) - movl %ecx, %eax - andl $32767, %r9d - andl $32767, %eax - fsub %st(1), %st - movl %edx, 32(%r12) - cmpl %eax, %r9d - fstpt 16(%r12) - fldt 16(%r12) - jg ..B1.117 -..B1.113: - andl $32767, %ecx - cmpl %ecx, %r9d - jne ..B1.118 -..B1.114: - movl 4(%rbp), %eax - cmpl 68(%rsp), %eax - ja ..B1.117 -..B1.115: - jne ..B1.118 -..B1.116: - movl (%rbp), %eax - cmpl 64(%rsp), %eax - jbe ..B1.118 -..B1.117: - fldt 16(%rbp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fldt 80(%rsp) - fsubrp %st, %st(3) - faddp %st, %st(2) - jmp ..B1.119 -..B1.118: - fldt 80(%rsp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fldt 16(%rbp) - faddp %st, %st(3) - fsubrp %st, %st(2) -..B1.119: - fld %st(1) - fadd %st(1), %st - fstpt (%r12) - fldt (%r12) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%r12) - jmp ..B1.124 -..B1.120: - cmpq $0, (%rbp) - je ..B1.122 -..B1.121: - lea -16517(%rdx,%r10), %ecx - lea -16383(%rax,%r11), %eax - cmpl %eax, %ecx - jl ..B1.123 -..B1.122: - fldt 64(%rsp) - fchs - movl %edx, 32(%r12) - fstpt (%r12) - fldt 80(%rsp) - fchs - fstpt 16(%r12) - jmp ..B1.124 -..B1.123: - movq (%rbp), %rax - movq %rax, (%r12) - movq 8(%rbp), %rdx - movq %rdx, 8(%r12) - movq 16(%rbp), %rcx - movq %rcx, 16(%r12) - movq 24(%rbp), %rsi - movq %rsi, 24(%r12) - movq 32(%rbp), %r8 - movq %r8, 32(%r12) - movq 40(%rbp), %rbp - movq %rbp, 40(%r12) -..B1.124: - movzwl 8(%r12), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B1.126 -..B1.125: - cmpl $24383, %eax - jle ..B1.128 -..B1.126: - movq %r12, %rdi -..___tag_value___libm_carctrigprepare_k80.40: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.41: -..B1.127: - movq %r12, %rdi -..___tag_value___libm_carctrigprepare_k80.42: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.43: -..B1.128: - fldt (%r12) - fld %st(0) - fld %st(1) - fldt 16(%r12) - fldt 16(%rsp) - movl 32(%r12), %r9d - fmul %st(4), %st - addl %r9d, %r9d - movl %r9d, 144(%rsp) - fsubr %st, %st(3) - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fxch %st(2) - fsub %st(3), %st - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(1) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - fadd %st(0), %st - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubrp %st, %st(2) - movzwl 120(%rsp), %ecx - movl %ecx, %r10d - andl $32767, %r10d - fadd %st, %st(1) - fxch %st(1) - fstpt 128(%rsp) - cmpl $8383, %r10d - fstpt 48(%rsp) - jl ..B1.132 -..B1.129: - cmpl $24383, %r10d - jg ..B1.132 -..B1.130: - movzwl 8(%rbx), %ebp - movl %ebp, %r8d - andl $32767, %r8d - cmpl $8383, %r8d - jl ..B1.132 -..B1.131: - cmpl $24383, %r8d - jle ..B1.135 -..B1.132: - lea 112(%rsp), %rdi -..___tag_value___libm_carctrigprepare_k80.44: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.45: -..B1.133: - movq %rbx, %rdi -..___tag_value___libm_carctrigprepare_k80.46: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.47: -..B1.134: - movzwl 120(%rsp), %ecx - movl %ecx, %r10d - movzwl 8(%rbx), %ebp - movl %ebp, %r8d - movl 144(%rsp), %r9d - andl $32767, %r10d - andl $32767, %r8d -..B1.135: - movl 32(%rbx), %esi - lea (%r9,%r10), %edx - lea -134(%rsi,%r8), %eax - cmpl %eax, %edx - jle ..B1.152 -..B1.136: - lea 134(%rsi,%r8), %eax - cmpl %eax, %edx - jge ..B1.152 -..B1.137: - cmpl $0, 116(%rsp) - jne ..B1.139 -..B1.138: - cmpl $0, 112(%rsp) - je ..B1.152 -..B1.139: - cmpl $0, 4(%rbx) - jne ..B1.141 -..B1.140: - cmpl $0, (%rbx) - je ..B1.152 -..B1.141: - cmpl %esi, %r9d - je ..B1.143 -..B1.142: - fldt 48(%rsp) - subl %esi, %r9d - fstpt (%rsp) - addl $16383, %r9d - fldt 112(%rsp) - andl $32767, %r9d - fldt 128(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %r9d, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fxch %st(2) - fmulp %st, %st(1) - movl %esi, 144(%rsp) - fstpt 128(%rsp) - fldt 128(%rsp) - movzwl 120(%rsp), %ecx - jmp ..B1.144 -..B1.143: - fldt 112(%rsp) - fldt 128(%rsp) -..B1.144: - fldt (%rbx) - movl %ecx, %eax - andl $32767, %ebp - andl $32767, %eax - fld %st(2) - cmpl %ebp, %eax - movl %esi, 240(%rsp) - fadd %st(1), %st - jg ..B1.149 -..B1.145: - andl $32767, %ecx - cmpl %ebp, %ecx - jne ..B1.150 -..B1.146: - movl 4(%rbx), %eax - cmpl 116(%rsp), %eax - jb ..B1.149 -..B1.147: - jne ..B1.150 -..B1.148: - movl 112(%rsp), %eax - cmpl (%rbx), %eax - jbe ..B1.150 -..B1.149: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 16(%rbx) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.151 -..B1.150: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 16(%rbx) - faddp %st, %st(1) -..B1.151: - fld %st(0) - fadd %st(2), %st - fstpt 208(%rsp) - fldt 208(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 224(%rsp) - jmp ..B1.156 -..B1.152: - cmpq $0, 112(%rsp) - je ..B1.154 -..B1.153: - lea -16517(%rsi,%r8), %eax - lea -16383(%r9,%r10), %edx - cmpl %edx, %eax - jl ..B1.155 -..B1.154: - movq (%rbx), %rax - movq 8(%rbx), %rdx - movq 16(%rbx), %rcx - movq 24(%rbx), %rbp - movq 32(%rbx), %rsi - movq 40(%rbx), %rbx - movq %rax, 208(%rsp) - movq %rdx, 216(%rsp) - movq %rcx, 224(%rsp) - movq %rbp, 232(%rsp) - movq %rsi, 240(%rsp) - movq %rbx, 248(%rsp) - jmp ..B1.156 -..B1.155: - movaps 112(%rsp), %xmm0 - movaps 128(%rsp), %xmm1 - movaps 144(%rsp), %xmm2 - movaps %xmm0, 208(%rsp) - movaps %xmm1, 224(%rsp) - movaps %xmm2, 240(%rsp) -..B1.156: - movzwl 216(%rsp), %eax - andl $32767, %eax - cmpl $383, %eax - jl ..B1.158 -..B1.157: - cmpl $32383, %eax - jle ..B1.159 -..B1.158: - lea 208(%rsp), %rdi -..___tag_value___libm_carctrigprepare_k80.48: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.49: -..B1.159: - movl 240(%rsp), %r11d - testl $1, %r11d - jne ..B1.192 -..B1.160: - fldt 208(%rsp) - fstpt 48(%rsp) - fldt 224(%rsp) -..B1.161: - fldt 48(%rsp) - fld %st(0) - fsqrt - fldt 16(%rsp) - fmul %st(1), %st - fld %st(0) - movq 336(%rsp), %rbx - fsubr %st(2), %st - sarl $1, %r11d - faddp %st, %st(1) - fld %st(0) - movl %r11d, 32(%rbx) - fsubr %st(2), %st - fld %st(1) - fmul %st(2), %st - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%rsp) - fmulp %st, %st(1) - fdiv %st(1), %st - fld %st(0) - fadd %st(2), %st - fstpt (%rbx) - fldt (%rbx) - fsubrp %st, %st(2) - movzwl 8(%r13), %ebp - movl %ebp, %r10d - andl $32767, %r10d - fadd %st, %st(1) - fxch %st(1) - fstpt 16(%rbx) - cmpl $8383, %r10d - fstpt 48(%rsp) - jl ..B1.165 -..B1.162: - cmpl $24383, %r10d - jg ..B1.165 -..B1.163: - movzwl 8(%rbx), %esi - movl %esi, %r8d - andl $32767, %r8d - cmpl $8383, %r8d - jl ..B1.165 -..B1.164: - cmpl $24383, %r8d - jle ..B1.168 -..B1.165: - movq %r13, %rdi -..___tag_value___libm_carctrigprepare_k80.50: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.51: -..B1.166: - movq %rbx, %rdi -..___tag_value___libm_carctrigprepare_k80.52: - call __libm_normalizel_k80@PLT -..___tag_value___libm_carctrigprepare_k80.53: -..B1.167: - movzwl 8(%r13), %ebp - movl %ebp, %r10d - movzwl 8(%rbx), %esi - movl %esi, %r8d - movl 32(%rbx), %r11d - andl $32767, %r10d - andl $32767, %r8d -..B1.168: - movl 32(%r13), %r9d - lea -134(%r11,%r8), %edx - movq 344(%rsp), %rax - lea (%r10,%r9), %ecx - cmpl %edx, %ecx - jle ..B1.185 -..B1.169: - lea 134(%r11,%r8), %edx - cmpl %edx, %ecx - jge ..B1.185 -..B1.170: - cmpl $0, 4(%r13) - jne ..B1.172 -..B1.171: - cmpl $0, (%r13) - je ..B1.185 -..B1.172: - cmpl $0, 4(%rbx) - jne ..B1.174 -..B1.173: - cmpl $0, (%rbx) - je ..B1.185 -..B1.174: - cmpl %r11d, %r9d - je ..B1.176 -..B1.175: - fldt 48(%rsp) - subl %r11d, %r9d - fstpt (%rsp) - addl $16383, %r9d - fldt (%r13) - andl $32767, %r9d - fldt 16(%r13) - andb $127, 9(%rsp) - movzwl 8(%rsp), %edx - andl $-32768, %edx - orl %r9d, %edx - movw %dx, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %r11d, 32(%r13) - fxch %st(2) - fstpt (%r13) - fldt (%r13) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%r13) - movl 32(%rbx), %r11d - movzwl 8(%rbx), %esi - movzwl 8(%r13), %ebp - jmp ..B1.177 -..B1.176: - fldt (%r13) -..B1.177: - fldt (%rbx) - fld %st(1) - andl $32767, %ebp - andl $32767, %esi - movl %r11d, 32(%rax) - cmpl %esi, %ebp - fadd %st(1), %st - fstpt 16(%rax) - fldt 16(%rax) - jg ..B1.182 -..B1.178: - jne ..B1.183 -..B1.179: - movl 4(%r13), %edx - cmpl 4(%rbx), %edx - ja ..B1.182 -..B1.180: - jne ..B1.183 -..B1.181: - movl (%r13), %edx - cmpl (%rbx), %edx - jbe ..B1.183 -..B1.182: - fldt 16(%rbx) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 16(%r13) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - jmp ..B1.184 -..B1.183: - fldt 16(%r13) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 16(%rbx) - faddp %st, %st(1) - fstpt (%rsp) - fldt (%rsp) -..B1.184: - fld %st(0) - fadd %st(2), %st - fstpt (%rax) - fldt (%rax) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rax) - jmp ..B1.189 -..B1.185: - cmpq $0, (%r13) - je ..B1.187 -..B1.186: - lea -16517(%r11,%r8), %edx - lea -16383(%r9,%r10), %ecx - cmpl %ecx, %edx - jl ..B1.188 -..B1.187: - movq (%rbx), %rdx - movq %rdx, (%rax) - movq 8(%rbx), %rcx - movq %rcx, 8(%rax) - movq 16(%rbx), %rbp - movq %rbp, 16(%rax) - movq 24(%rbx), %rsi - movq %rsi, 24(%rax) - movq 32(%rbx), %r8 - movq %r8, 32(%rax) - movq 40(%rbx), %rbx - movq %rbx, 40(%rax) - jmp ..B1.189 -..B1.188: - movq (%r13), %rdx - movq %rdx, (%rax) - movq 8(%r13), %rcx - movq %rcx, 8(%rax) - movq 16(%r13), %rbx - movq %rbx, 16(%rax) - movq 24(%r13), %rbp - movq %rbp, 24(%rax) - movq 32(%r13), %rsi - movq %rsi, 32(%rax) - movq 40(%r13), %rdi - movq %rdi, 40(%rax) -..B1.189: - movq 256(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.191 -..B1.190: - addq $272, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 320 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.191: - call __stack_chk_fail@PLT -..B1.192: - fldt 208(%rsp) - incl %r11d - fldt 32(%rsp) - fmul %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fstpt 208(%rsp) - fldt 224(%rsp) - fmulp %st, %st(1) - movl %r11d, 240(%rsp) - fstpt 224(%rsp) - fldt 224(%rsp) - jmp ..B1.161 -..B1.193: - fldt 160(%rsp) - incl %edx - lea halfs(%rip), %rax - movl %edx, 192(%rsp) - fldt (%rax) - fmul %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fstpt 160(%rsp) - fstpt 32(%rsp) - fldt 32(%rsp) - fldt 176(%rsp) - fmulp %st, %st(1) - fstpt 176(%rsp) - fldt 176(%rsp) - jmp ..B1.96 - .align 16,0x90 - .cfi_endproc - .type __libm_carctrigprepare_k80,@function - .size __libm_carctrigprepare_k80,.-__libm_carctrigprepare_k80 - .data -# -- End __libm_carctrigprepare_k80 - .text -# -- Begin __libm_recacosl_k80 - .text - .align 16,0x90 - .globl __libm_recacosl_k80 -__libm_recacosl_k80: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9 -# parameter 7: 864 + %rsp -# parameter 8: 872 + %rsp -# parameter 9: 880 + %rsp -# parameter 10: 888 + %rsp -..B2.1: - .cfi_startproc -..___tag_value___libm_recacosl_k80.72: -..L73: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $808, %rsp - .cfi_def_cfa_offset 864 - movq %rdx, %r12 - movq %fs:40, %rax - movq %r9, %r15 - xorq %rsp, %rax - movq %r8, %rbp - movq %rax, 800(%rsp) - movq %rdi, %r14 - movzwl 8(%r12), %eax - andl $32767, %eax - movq 888(%rsp), %r13 - cmpl $8383, %eax - jl ..B2.5 -..B2.2: - cmpl $24383, %eax - jg ..B2.5 -..B2.3: - movzwl 8(%r13), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.5 -..B2.4: - cmpl $24383, %eax - jle ..B2.7 -..B2.5: - movq %r12, %rdi -..___tag_value___libm_recacosl_k80.87: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.88: -..B2.6: - movq %r13, %rdi -..___tag_value___libm_recacosl_k80.89: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.90: -..B2.7: - fldt (%r12) - lea t32(%rip), %rax - fld %st(0) - fldt (%r13) - fdivr %st, %st(1) - fld %st(0) - fld %st(1) - fldt (%rax) - fld %st(0) - fmul %st(5), %st - fld %st(0) - movl 32(%r12), %ebx - fsubr %st(6), %st - subl 32(%r13), %ebx - faddp %st, %st(1) - fld %st(0) - lea 1(%rbx), %edx - movl %edx, 784(%rsp) - fsubr %st(6), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(3) - fsub %st(4), %st - faddp %st, %st(4) - fld %st(4) - fsub %st(4), %st - fxch %st(3) - fstpt 48(%rsp) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fsubrp %st, %st(3) - fldt 16(%r12) - faddp %st, %st(3) - fldt 16(%r13) - fmul %st(2), %st - fsubrp %st, %st(3) - fdivrp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 752(%rsp) - fldt 752(%rsp) - fsubrp %st, %st(1) - movzwl 760(%rsp), %ecx - fadd %st(1), %st - andl $32767, %ecx - fstpt 768(%rsp) - fstpt 16(%rsp) - lea 1(%rcx,%rbx), %esi - cmpl $16382, %esi - jl ..B2.192 -..B2.8: - movzwl 8(%r14), %eax - andl $32767, %eax - movq 880(%rsp), %rbx - cmpl $16383, %eax - jl ..B2.37 -..B2.9: - movq 864(%rsp), %r9 - movq (%r9), %rax - movq 8(%r9), %rdx - movq 16(%r9), %rcx - movq 24(%r9), %rsi - movq 32(%r9), %r8 - movq 40(%r9), %r10 - movzwl 8(%rbx), %r9d - movq %rax, 416(%rsp) - movl %r9d, %eax - andl $32767, %eax - movq %rdx, 424(%rsp) - cmpl $8383, %eax - movq %rcx, 432(%rsp) - movq %rsi, 440(%rsp) - movq %r8, 448(%rsp) - movq %r10, 456(%rsp) - jl ..B2.13 -..B2.10: - cmpl $24383, %eax - jg ..B2.13 -..B2.11: - movzwl 8(%rbp), %r10d - movl %r10d, %r11d - andl $32767, %r11d - cmpl $8383, %r11d - jl ..B2.13 -..B2.12: - cmpl $24383, %r11d - jle ..B2.16 -..B2.13: - movq %rbx, %rdi -..___tag_value___libm_recacosl_k80.91: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.92: -..B2.14: - movq %rbp, %rdi -..___tag_value___libm_recacosl_k80.93: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.94: -..B2.15: - movzwl 8(%rbx), %r9d - movl %r9d, %eax - movzwl 8(%rbp), %r10d - movl %r10d, %r11d - andl $32767, %eax - andl $32767, %r11d -..B2.16: - movl 32(%rbp), %edx - movl 32(%rbx), %ecx - lea -134(%rdx,%r11), %esi - lea (%rax,%rcx), %r8d - cmpl %r8d, %esi - jge ..B2.33 -..B2.17: - lea 134(%rdx,%r11), %esi - cmpl %esi, %r8d - jge ..B2.33 -..B2.18: - cmpl $0, 4(%rbx) - jne ..B2.20 -..B2.19: - cmpl $0, (%rbx) - je ..B2.33 -..B2.20: - cmpl $0, 4(%rbp) - jne ..B2.22 -..B2.21: - cmpl $0, (%rbp) - je ..B2.33 -..B2.22: - cmpl %edx, %ecx - je ..B2.24 -..B2.23: - fldt 16(%rsp) - subl %edx, %ecx - fstpt (%rsp) - addl $16383, %ecx - fldt (%rbx) - andl $32767, %ecx - fldt 16(%rbx) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 32(%rbx) - fxch %st(2) - fstpt (%rbx) - fldt (%rbx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbx) - fldt 16(%rbx) - fxch %st(1) - fstpt 16(%rsp) - movl 32(%rbp), %edx - movzwl 8(%rbp), %r10d - movzwl 8(%rbx), %r9d - jmp ..B2.25 -..B2.24: - fldt (%rbx) - fstpt 16(%rsp) - fldt 16(%rbx) -..B2.25: - fldt (%rbp) - andl $32767, %r9d - fldt 16(%rsp) - andl $32767, %r10d - movl %edx, 496(%rsp) - cmpl %r10d, %r9d - fadd %st(1), %st - jg ..B2.30 -..B2.26: - jne ..B2.31 -..B2.27: - movl 4(%rbx), %eax - cmpl 4(%rbp), %eax - ja ..B2.30 -..B2.28: - jne ..B2.31 -..B2.29: - movl (%rbx), %eax - cmpl (%rbp), %eax - jbe ..B2.31 -..B2.30: - fldt 16(%rsp) - fsub %st(1), %st - faddp %st, %st(2) - fldt 16(%rbp) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B2.32 -..B2.31: - fldt 16(%rsp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 16(%rbp) - faddp %st, %st(1) - fstpt 16(%rsp) -..B2.32: - fldt 16(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 464(%rsp) - fldt 464(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 480(%rsp) - jmp ..B2.65 -..B2.33: - cmpq $0, (%rbx) - je ..B2.35 -..B2.34: - lea -16517(%rdx,%r11), %edx - lea -16383(%rcx,%rax), %eax - cmpl %eax, %edx - jl ..B2.36 -..B2.35: - movq (%rbp), %rax - movq 8(%rbp), %rdx - movq 16(%rbp), %rcx - movq 24(%rbp), %rbx - movq 32(%rbp), %rsi - movq 40(%rbp), %rbp - movq %rax, 464(%rsp) - movq %rdx, 472(%rsp) - movq %rcx, 480(%rsp) - movq %rbx, 488(%rsp) - movq %rsi, 496(%rsp) - movq %rbp, 504(%rsp) - jmp ..B2.65 -..B2.36: - movq (%rbx), %rax - movq 8(%rbx), %rdx - movq 16(%rbx), %rcx - movq 24(%rbx), %rbp - movq 32(%rbx), %rsi - movq 40(%rbx), %rbx - movq %rax, 464(%rsp) - movq %rdx, 472(%rsp) - movq %rcx, 480(%rsp) - movq %rbp, 488(%rsp) - movq %rsi, 496(%rsp) - movq %rbx, 504(%rsp) - jmp ..B2.65 -..B2.37: - lea ones(%rip), %rax - lea zeros(%rip), %rdx - movzwl 8(%rbx), %r9d - movl $0, 496(%rsp) - fldt (%rax) - movl %r9d, %eax - andl $32767, %eax - fstpt 464(%rsp) - cmpl $8383, %eax - fldt (%rdx) - fstpt 480(%rsp) - jl ..B2.41 -..B2.38: - cmpl $24383, %eax - jg ..B2.41 -..B2.39: - movzwl 8(%rbp), %r10d - movl %r10d, %r11d - andl $32767, %r11d - cmpl $8383, %r11d - jl ..B2.41 -..B2.40: - cmpl $24383, %r11d - jle ..B2.44 -..B2.41: - movq %rbx, %rdi -..___tag_value___libm_recacosl_k80.95: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.96: -..B2.42: - movq %rbp, %rdi -..___tag_value___libm_recacosl_k80.97: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.98: -..B2.43: - movzwl 8(%rbx), %r9d - movl %r9d, %eax - movzwl 8(%rbp), %r10d - movl %r10d, %r11d - andl $32767, %eax - andl $32767, %r11d -..B2.44: - movl 32(%rbp), %edx - movl 32(%rbx), %ecx - lea -134(%rdx,%r11), %esi - lea (%rax,%rcx), %r8d - cmpl %r8d, %esi - jge ..B2.61 -..B2.45: - lea 134(%rdx,%r11), %esi - cmpl %esi, %r8d - jge ..B2.61 -..B2.46: - cmpl $0, 4(%rbx) - jne ..B2.48 -..B2.47: - cmpl $0, (%rbx) - je ..B2.61 -..B2.48: - cmpl $0, 4(%rbp) - jne ..B2.50 -..B2.49: - cmpl $0, (%rbp) - je ..B2.61 -..B2.50: - cmpl %edx, %ecx - je ..B2.52 -..B2.51: - fldt 16(%rsp) - subl %edx, %ecx - fstpt (%rsp) - addl $16383, %ecx - fldt (%rbx) - andl $32767, %ecx - fldt 16(%rbx) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 32(%rbx) - fxch %st(2) - fstpt (%rbx) - fldt (%rbx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbx) - fldt 16(%rbx) - fstpt 16(%rsp) - movl 32(%rbp), %edx - movzwl 8(%rbp), %r10d - movzwl 8(%rbx), %r9d - jmp ..B2.53 -..B2.52: - fldt (%rbx) - fldt 16(%rbx) - fstpt 16(%rsp) -..B2.53: - fldt (%rbp) - andl $32767, %r9d - andl $32767, %r10d - fld %st(1) - movl %edx, 448(%rsp) - cmpl %r10d, %r9d - fsub %st(1), %st - jg ..B2.58 -..B2.54: - jne ..B2.59 -..B2.55: - movl 4(%rbx), %eax - cmpl 4(%rbp), %eax - ja ..B2.58 -..B2.56: - jne ..B2.59 -..B2.57: - movl (%rbx), %eax - cmpl (%rbp), %eax - jbe ..B2.59 -..B2.58: - fldt 16(%rsp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fldt 16(%rbp) - fsubrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - jmp ..B2.60 -..B2.59: - fldt 16(%rbp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fldt 16(%rsp) - faddp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) -..B2.60: - fldt 16(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 432(%rsp) - jmp ..B2.65 -..B2.61: - cmpq $0, (%rbx) - je ..B2.63 -..B2.62: - lea -16517(%rdx,%r11), %esi - lea -16383(%rcx,%rax), %eax - cmpl %eax, %esi - jl ..B2.64 -..B2.63: - fldt (%rbp) - fchs - movl %edx, 448(%rsp) - fstpt 416(%rsp) - fldt 16(%rbp) - fchs - fstpt 432(%rsp) - jmp ..B2.65 -..B2.64: - movq (%rbx), %rax - movq 8(%rbx), %rdx - movq 16(%rbx), %rcx - movq 24(%rbx), %rbp - movq 32(%rbx), %rsi - movq 40(%rbx), %rbx - movq %rax, 416(%rsp) - movq %rdx, 424(%rsp) - movq %rcx, 432(%rsp) - movq %rbp, 440(%rsp) - movq %rsi, 448(%rsp) - movq %rbx, 456(%rsp) -..B2.65: - movzwl 8(%r12), %ebp - movl %ebp, %r9d - andl $32767, %r9d - movl 32(%r12), %edx - incl %edx - movl %edx, 32(%r12) - cmpl $8383, %r9d - jl ..B2.69 -..B2.66: - cmpl $24383, %r9d - jg ..B2.69 -..B2.67: - movzwl 8(%r13), %eax - movl %eax, %r8d - andl $32767, %r8d - cmpl $8383, %r8d - jl ..B2.69 -..B2.68: - cmpl $24383, %r8d - jle ..B2.72 -..B2.69: - movq %r12, %rdi -..___tag_value___libm_recacosl_k80.99: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.100: -..B2.70: - movq %r13, %rdi -..___tag_value___libm_recacosl_k80.101: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.102: -..B2.71: - movzwl 8(%r12), %ebp - movl %ebp, %r9d - movzwl 8(%r13), %eax - movl %eax, %r8d - movl 32(%r12), %edx - andl $32767, %r9d - andl $32767, %r8d -..B2.72: - movl 32(%r13), %esi - lea (%rdx,%r9), %ebx - lea -134(%rsi,%r8), %ecx - cmpl %ecx, %ebx - jle ..B2.89 -..B2.73: - lea 134(%rsi,%r8), %ecx - cmpl %ecx, %ebx - jge ..B2.89 -..B2.74: - cmpl $0, 4(%r12) - jne ..B2.76 -..B2.75: - cmpl $0, (%r12) - je ..B2.89 -..B2.76: - cmpl $0, 4(%r13) - jne ..B2.78 -..B2.77: - cmpl $0, (%r13) - je ..B2.89 -..B2.78: - cmpl %esi, %edx - je ..B2.80 -..B2.79: - fldt 16(%rsp) - subl %esi, %edx - fstpt (%rsp) - addl $16383, %edx - fldt (%r12) - andl $32767, %edx - fldt 16(%r12) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edx, %eax - movl %esi, %edx - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %esi, 32(%r12) - fxch %st(2) - fstpt (%r12) - fldt (%r12) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%r12) - fldt 16(%r12) - movl 32(%r13), %esi - movzwl 8(%r13), %eax - movzwl 8(%r12), %ebp - jmp ..B2.81 -..B2.80: - fldt (%r12) - fldt 16(%r12) -..B2.81: - fldt (%r13) - movl %eax, %ecx - andl $32767, %ebp - andl $32767, %ecx - fld %st(2) - cmpl %ecx, %ebp - movl %esi, 544(%rsp) - fadd %st(1), %st - jg ..B2.86 -..B2.82: - jne ..B2.87 -..B2.83: - movl 4(%r12), %ecx - cmpl 4(%r13), %ecx - ja ..B2.86 -..B2.84: - jne ..B2.87 -..B2.85: - movl (%r12), %ecx - cmpl (%r13), %ecx - jbe ..B2.87 -..B2.86: - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 16(%r13) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - jmp ..B2.88 -..B2.87: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%r13) - faddp %st, %st(2) -..B2.88: - fld %st(1) - fadd %st(1), %st - fstpt 512(%rsp) - fldt 512(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 528(%rsp) - jmp ..B2.93 -..B2.89: - cmpq $0, (%r12) - je ..B2.91 -..B2.90: - lea -16517(%rsi,%r8), %ecx - lea -16383(%rdx,%r9), %ebx - cmpl %ebx, %ecx - jl ..B2.92 -..B2.91: - movq (%r13), %rcx - movq 8(%r13), %rbx - movq 16(%r13), %rbp - movq 24(%r13), %rsi - movq 32(%r13), %r8 - movq 40(%r13), %r9 - movq %rcx, 512(%rsp) - movq %rbx, 520(%rsp) - movq %rbp, 528(%rsp) - movq %rsi, 536(%rsp) - movq %r8, 544(%rsp) - movq %r9, 552(%rsp) - jmp ..B2.93 -..B2.92: - movq (%r12), %rcx - movq 8(%r12), %rbx - movq 16(%r12), %rbp - movq 24(%r12), %rsi - movq 32(%r12), %r8 - movq 40(%r12), %r9 - movq %rcx, 512(%rsp) - movq %rbx, 520(%rsp) - movq %rbp, 528(%rsp) - movq %rsi, 536(%rsp) - movq %r8, 544(%rsp) - movq %r9, 552(%rsp) -..B2.93: - decl %edx - movl %edx, 32(%r12) - movzwl 520(%rsp), %edx - andl $32767, %edx - cmpl $8383, %edx - jl ..B2.97 -..B2.94: - cmpl $24383, %edx - jg ..B2.97 -..B2.95: - movzwl 424(%rsp), %edx - andl $32767, %edx - cmpl $8383, %edx - jl ..B2.97 -..B2.96: - cmpl $24383, %edx - jle ..B2.99 -..B2.97: - lea 512(%rsp), %rdi -..___tag_value___libm_recacosl_k80.103: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.104: -..B2.98: - lea 416(%rsp), %rdi -..___tag_value___libm_recacosl_k80.105: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.106: - movzwl 8(%r13), %eax -..B2.99: - fldt 512(%rsp) - andl $32767, %eax - fld %st(0) - fld %st(1) - fldt 48(%rsp) - fld %st(0) - fmul %st(4), %st - movl 544(%rsp), %edx - fsubr %st, %st(3) - addl 448(%rsp), %edx - faddp %st, %st(3) - fld %st(2) - cmpl $8383, %eax - movl %edx, 592(%rsp) - fxch %st(2) - fsub %st(3), %st - fldt 416(%rsp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 432(%rsp) - fmulp %st, %st(4) - fldt 528(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 560(%rsp) - fldt 560(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 576(%rsp) - jl ..B2.103 -..B2.100: - cmpl $24383, %eax - jg ..B2.103 -..B2.101: - movzwl 472(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.103 -..B2.102: - cmpl $24383, %eax - jle ..B2.105 -..B2.103: - movq %r13, %rdi -..___tag_value___libm_recacosl_k80.107: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.108: -..B2.104: - lea 464(%rsp), %rdi -..___tag_value___libm_recacosl_k80.109: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.110: -..B2.105: - fldt (%r13) - fld %st(0) - fld %st(1) - fldt 48(%rsp) - fld %st(0) - fmul %st(4), %st - movq 872(%rsp), %rbx - fsubr %st, %st(3) - movzwl 8(%rbx), %ecx - movl %ecx, %r10d - movl 496(%rsp), %eax - andl $32767, %r10d - addl 32(%r13), %eax - faddp %st, %st(3) - fld %st(2) - cmpl $8383, %r10d - movl %eax, 640(%rsp) - fxch %st(2) - fsub %st(3), %st - fldt 464(%rsp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 480(%rsp) - fmulp %st, %st(4) - fldt 16(%r13) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 608(%rsp) - fldt 608(%rsp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 624(%rsp) - fstpt 16(%rsp) - jl ..B2.109 -..B2.106: - cmpl $24383, %r10d - jg ..B2.109 -..B2.107: - movzwl 8(%r15), %ebp - movl %ebp, %r8d - andl $32767, %r8d - cmpl $8383, %r8d - jl ..B2.109 -..B2.108: - cmpl $24383, %r8d - jle ..B2.112 -..B2.109: - movq %rbx, %rdi -..___tag_value___libm_recacosl_k80.111: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.112: -..B2.110: - movq %r15, %rdi -..___tag_value___libm_recacosl_k80.113: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.114: -..B2.111: - movzwl 8(%rbx), %ecx - movl %ecx, %r10d - movzwl 8(%r15), %ebp - movl %ebp, %r8d - andl $32767, %r10d - andl $32767, %r8d -..B2.112: - movl 32(%r15), %esi - movl 32(%rbx), %r9d - lea -134(%rsi,%r8), %eax - lea (%r10,%r9), %edx - cmpl %eax, %edx - jle ..B2.129 -..B2.113: - lea 134(%rsi,%r8), %eax - cmpl %eax, %edx - jge ..B2.129 -..B2.114: - cmpl $0, 4(%rbx) - jne ..B2.116 -..B2.115: - cmpl $0, (%rbx) - je ..B2.129 -..B2.116: - cmpl $0, 4(%r15) - jne ..B2.118 -..B2.117: - cmpl $0, (%r15) - je ..B2.129 -..B2.118: - cmpl %esi, %r9d - je ..B2.120 -..B2.119: - fldt 16(%rsp) - subl %esi, %r9d - fstpt (%rsp) - addl $16383, %r9d - fldt (%rbx) - andl $32767, %r9d - fldt 16(%rbx) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %r9d, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %esi, 32(%rbx) - fxch %st(2) - fstpt (%rbx) - fldt (%rbx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbx) - fldt 16(%rbx) - movl 32(%r15), %esi - movzwl 8(%r15), %ebp - movzwl 8(%rbx), %ecx - jmp ..B2.121 -..B2.120: - fldt (%rbx) - fldt 16(%rbx) -..B2.121: - fldt (%r15) - andl $32767, %ecx - andl $32767, %ebp - fld %st(2) - movl %esi, 688(%rsp) - cmpl %ebp, %ecx - fadd %st(1), %st - jg ..B2.126 -..B2.122: - jne ..B2.127 -..B2.123: - movl 4(%rbx), %eax - cmpl 4(%r15), %eax - ja ..B2.126 -..B2.124: - jne ..B2.127 -..B2.125: - movl (%rbx), %eax - cmpl (%r15), %eax - jbe ..B2.127 -..B2.126: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 16(%r15) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B2.128 -..B2.127: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 16(%r15) - faddp %st, %st(1) -..B2.128: - fld %st(0) - fadd %st(2), %st - fstpt 656(%rsp) - fldt 656(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 672(%rsp) - jmp ..B2.133 -..B2.129: - cmpq $0, (%rbx) - je ..B2.131 -..B2.130: - lea -16517(%rsi,%r8), %eax - lea -16383(%r9,%r10), %edx - cmpl %edx, %eax - jl ..B2.132 -..B2.131: - movq (%r15), %rax - movq 8(%r15), %rdx - movq 16(%r15), %rcx - movq 24(%r15), %rbx - movq 32(%r15), %rbp - movq 40(%r15), %rsi - movq %rax, 656(%rsp) - movq %rdx, 664(%rsp) - movq %rcx, 672(%rsp) - movq %rbx, 680(%rsp) - movq %rbp, 688(%rsp) - movq %rsi, 696(%rsp) - jmp ..B2.133 -..B2.132: - movq (%rbx), %rax - movq 8(%rbx), %rdx - movq 16(%rbx), %rcx - movq 24(%rbx), %rbp - movq 32(%rbx), %rsi - movq 40(%rbx), %rbx - movq %rax, 656(%rsp) - movq %rdx, 664(%rsp) - movq %rcx, 672(%rsp) - movq %rbp, 680(%rsp) - movq %rsi, 688(%rsp) - movq %rbx, 696(%rsp) -..B2.133: - movzwl 616(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.137 -..B2.134: - cmpl $24383, %eax - jg ..B2.137 -..B2.135: - movzwl 664(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.137 -..B2.136: - cmpl $24383, %eax - jle ..B2.139 -..B2.137: - lea 608(%rsp), %rdi -..___tag_value___libm_recacosl_k80.115: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.116: -..B2.138: - lea 656(%rsp), %rdi -..___tag_value___libm_recacosl_k80.117: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.118: -..B2.139: - fldt 608(%rsp) - fld %st(0) - fld %st(1) - fldt 48(%rsp) - fld %st(0) - fmul %st(4), %st - movl 640(%rsp), %edx - fsubr %st, %st(3) - movzwl 568(%rsp), %eax - faddp %st, %st(3) - fld %st(2) - andl $32767, %eax - addl 688(%rsp), %edx - fxch %st(2) - fsub %st(3), %st - fldt 656(%rsp) - cmpl $8383, %eax - fmul %st, %st(2) - fld %st(0) - movl %edx, 736(%rsp) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 672(%rsp) - fmulp %st, %st(4) - fldt 624(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 704(%rsp) - fldt 704(%rsp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 720(%rsp) - fldt 720(%rsp) - jl ..B2.143 -..B2.140: - cmpl $24383, %eax - jg ..B2.143 -..B2.141: - movzwl 712(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B2.143 -..B2.142: - cmpl $24383, %eax - jle ..B2.146 -..B2.143: - fstp %st(1) - fstp %st(0) - lea 560(%rsp), %rdi -..___tag_value___libm_recacosl_k80.119: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.120: -..B2.144: - lea 704(%rsp), %rdi -..___tag_value___libm_recacosl_k80.121: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.122: -..B2.145: - fldt 704(%rsp) - fldt 720(%rsp) - movl 736(%rsp), %edx -..B2.146: - fldt 560(%rsp) - fld %st(2) - fdivr %st(1), %st - fmul %st, %st(2) - fld %st(3) - fxch %st(4) - fstpt 32(%rsp) - fldt 32(%rsp) - fldt 48(%rsp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - movl 592(%rsp), %ecx - fsubr %st(4), %st - subl %edx, %ecx - faddp %st, %st(1) - fld %st(0) - testb $-128, 9(%r14) - fsubr %st(4), %st - fxch %st(2) - fmul %st(3), %st - fsubr %st, %st(7) - faddp %st, %st(7) - fxch %st(2) - fsub %st(6), %st - fld %st(2) - fmul %st(7), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(1) - fmul %st, %st(3) - fxch %st(7) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) - fxch %st(4) - fsubrp %st, %st(2) - fxch %st(3) - fsubrp %st, %st(1) - fldt 576(%rsp) - faddp %st, %st(1) - fsubp %st, %st(1) - fldt 32(%rsp) - fdivrp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fadd %st, %st(2) - fstpt 16(%rsp) - jne ..B2.155 -..B2.147: - fstpt 320(%rsp) - fldt 320(%rsp) - decl %ecx - movzwl 328(%rsp), %eax - andl $32767, %eax - movl %ecx, 352(%rsp) - cmpl $383, %eax - fxch %st(1) - fstpt 336(%rsp) - fldt 336(%rsp) - jl ..B2.149 -..B2.148: - cmpl $32383, %eax - jle ..B2.151 -..B2.149: - fstp %st(0) - fstp %st(0) - lea 320(%rsp), %rdi -..___tag_value___libm_recacosl_k80.123: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.124: -..B2.150: - fldt 320(%rsp) - fldt 336(%rsp) - movl 352(%rsp), %ecx -..B2.151: - testb $1, %cl - jne ..B2.226 -..B2.152: - lea halfs(%rip), %rax - fldt (%rax) -..B2.153: - fldt 48(%rsp) - fld %st(3) - fsqrt - lea 224(%rsp), %rdi - fmul %st, %st(1) - lea 368(%rsp), %rsi - fld %st(1) - sarl $1, %ecx - fsubr %st(1), %st - movl %ecx, 32(%rsi) - faddp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(2) - fsubrp %st, %st(5) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(2) - fdivr %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt (%rsi) - fldt (%rsi) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsi) -..___tag_value___libm_recacosl_k80.125: - call asinpoly -..___tag_value___libm_recacosl_k80.126: -..B2.154: - fldt 224(%rsp) - fldt 240(%rsp) - movl 256(%rsp), %edi - incl %edi - movl %edi, 256(%rsp) - jmp ..B2.223 -..B2.155: - fstpt 128(%rsp) - fldt 128(%rsp) - decl %ecx - movzwl 136(%rsp), %eax - andl $32767, %eax - movl %ecx, 160(%rsp) - cmpl $383, %eax - fxch %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - jl ..B2.157 -..B2.156: - cmpl $32383, %eax - jle ..B2.159 -..B2.157: - fstp %st(0) - fstp %st(0) - lea 128(%rsp), %rdi -..___tag_value___libm_recacosl_k80.127: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.128: -..B2.158: - fldt 128(%rsp) - fldt 144(%rsp) - movl 160(%rsp), %ecx -..B2.159: - testb $1, %cl - jne ..B2.227 -..B2.160: - lea halfs(%rip), %rax - fldt (%rax) -..B2.161: - fldt 48(%rsp) - fld %st(3) - fsqrt - lea 80(%rsp), %rdi - fmul %st, %st(1) - lea 176(%rsp), %rsi - fld %st(1) - sarl $1, %ecx - fsubr %st(1), %st - movl %ecx, 32(%rsi) - faddp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(2) - fsubrp %st, %st(5) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(2) - fdivr %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt (%rsi) - fldt (%rsi) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsi) -..___tag_value___libm_recacosl_k80.129: - call asinpoly -..___tag_value___libm_recacosl_k80.130: -..B2.162: - lea 16+_PIO2_K80(%rip), %rax - lea 32+_PIO2_K80(%rip), %rdx - movl 112(%rsp), %edi - movl $1, %ebp - incl %edi - movl %edi, 112(%rsp) - fldt (%rax) - movzwl 8(%rax), %esi - andl $32767, %esi - movl $1, 304(%rsp) - cmpl $8383, %esi - fstpt 272(%rsp) - fldt (%rdx) - fstpt 288(%rsp) - jl ..B2.166 -..B2.163: - cmpl $24383, %esi - jg ..B2.166 -..B2.164: - movzwl 88(%rsp), %ebx - andl $32767, %ebx - cmpl $8383, %ebx - jl ..B2.166 -..B2.165: - cmpl $24383, %ebx - jle ..B2.169 -..B2.166: - lea 272(%rsp), %rdi -..___tag_value___libm_recacosl_k80.131: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.132: -..B2.167: - lea 80(%rsp), %rdi -..___tag_value___libm_recacosl_k80.133: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.134: -..B2.168: - movzwl 280(%rsp), %esi - movzwl 88(%rsp), %ebx - andl $32767, %esi - movl 112(%rsp), %edi - andl $32767, %ebx - movl 304(%rsp), %ebp -..B2.169: - lea (%rbp,%rsi), %edx - lea -134(%rdi,%rbx), %eax - cmpl %eax, %edx - jle ..B2.186 -..B2.170: - movl 276(%rsp), %ecx - lea 134(%rdi,%rbx), %eax - cmpl %eax, %edx - jge ..B2.187 -..B2.171: - testl %ecx, %ecx - jne ..B2.173 -..B2.172: - cmpl $0, 272(%rsp) - je ..B2.188 -..B2.173: - movl 84(%rsp), %edx - testl %edx, %edx - jne ..B2.175 -..B2.174: - cmpl $0, 80(%rsp) - je ..B2.187 -..B2.175: - cmpl %edi, %ebp - je ..B2.177 -..B2.176: - fldt 16(%rsp) - subl %edi, %ebp - fstpt (%rsp) - addl $16383, %ebp - fldt 272(%rsp) - andl $32767, %ebp - fldt 288(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ebp, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 272(%rsp) - fldt 272(%rsp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 280(%rsp), %esi - movl %edi, 304(%rsp) - andl $32767, %esi - fstpt 288(%rsp) - fldt 288(%rsp) - jmp ..B2.178 -..B2.177: - fldt 272(%rsp) - fldt 288(%rsp) -..B2.178: - fldt 80(%rsp) - fld %st(2) - movl %edi, 256(%rsp) - cmpl %ebx, %esi - fsub %st(1), %st - jg ..B2.183 -..B2.179: - jne ..B2.184 -..B2.180: - movl 276(%rsp), %eax - cmpl %edx, %eax - ja ..B2.183 -..B2.181: - jne ..B2.184 -..B2.182: - movl 272(%rsp), %eax - cmpl 80(%rsp), %eax - jbe ..B2.184 -..B2.183: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 96(%rsp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - jmp ..B2.185 -..B2.184: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 96(%rsp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) -..B2.185: - fld %st(0) - fadd %st(2), %st - fstpt 224(%rsp) - fldt 224(%rsp) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 240(%rsp) - fldt 240(%rsp) - jmp ..B2.223 -..B2.186: - movl 276(%rsp), %ecx -..B2.187: - testl %ecx, %ecx - jne ..B2.189 -..B2.232: - cmpl $0, 272(%rsp) -..B2.188: - je ..B2.190 -..B2.189: - lea -16517(%rdi,%rbx), %eax - lea -16383(%rbp,%rsi), %edx - cmpl %edx, %eax - jl ..B2.191 -..B2.190: - fldt 80(%rsp) - fchs - movl %edi, 256(%rsp) - fstpt 224(%rsp) - fldt 224(%rsp) - fldt 96(%rsp) - fchs - fstpt 240(%rsp) - fldt 240(%rsp) - jmp ..B2.223 -..B2.191: - fldt 272(%rsp) - fldt 288(%rsp) - movaps 272(%rsp), %xmm0 - movaps 288(%rsp), %xmm1 - movaps 304(%rsp), %xmm2 - movl 304(%rsp), %edi - movaps %xmm0, 224(%rsp) - movaps %xmm1, 240(%rsp) - movaps %xmm2, 256(%rsp) - jmp ..B2.223 -..B2.192: - lea 16+_PIO2_K80(%rip), %rax - lea 32+_PIO2_K80(%rip), %rdx - movl $0, 64(%rsp) - lea 80(%rsp), %rdi - lea 752(%rsp), %rsi - fldt (%rax) - fstpt -48(%rdi) - fldt (%rdx) - fstpt -32(%rdi) -..___tag_value___libm_recacosl_k80.135: - call asinpoly -..___tag_value___libm_recacosl_k80.136: -..B2.193: - fldt 80(%rsp) - lea ones(%rip), %rcx - fldt 96(%rsp) - movb 9(%r14), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - shlq $4, %rdx - movzwl 40(%rsp), %ebp - andl $32767, %ebp - cmpl $8383, %ebp - fldt (%rdx,%rcx) - fmul %st, %st(2) - fxch %st(2) - fstpt 80(%rsp) - fmulp %st, %st(1) - fstpt 96(%rsp) - jl ..B2.197 -..B2.194: - cmpl $24383, %ebp - jg ..B2.197 -..B2.195: - movzwl 88(%rsp), %ebx - andl $32767, %ebx - cmpl $8383, %ebx - jl ..B2.197 -..B2.196: - cmpl $24383, %ebx - jle ..B2.200 -..B2.197: - lea 32(%rsp), %rdi -..___tag_value___libm_recacosl_k80.137: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.138: -..B2.198: - lea 80(%rsp), %rdi -..___tag_value___libm_recacosl_k80.139: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recacosl_k80.140: -..B2.199: - movzwl 88(%rsp), %ebx - movzwl 40(%rsp), %ebp - andl $32767, %ebx - andl $32767, %ebp -..B2.200: - movl 112(%rsp), %edi - movl 64(%rsp), %esi - lea -134(%rdi,%rbx), %eax - lea (%rbp,%rsi), %edx - cmpl %eax, %edx - jle ..B2.217 -..B2.201: - movl 36(%rsp), %ecx - lea 134(%rdi,%rbx), %eax - cmpl %eax, %edx - jge ..B2.218 -..B2.202: - testl %ecx, %ecx - jne ..B2.204 -..B2.203: - cmpl $0, 32(%rsp) - je ..B2.219 -..B2.204: - movl 84(%rsp), %edx - testl %edx, %edx - jne ..B2.206 -..B2.205: - cmpl $0, 80(%rsp) - je ..B2.218 -..B2.206: - cmpl %edi, %esi - je ..B2.208 -..B2.207: - fldt 16(%rsp) - subl %edi, %esi - fstpt (%rsp) - addl $16383, %esi - fldt 32(%rsp) - andl $32767, %esi - fldt 48(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %esi, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 40(%rsp), %ebp - movl %edi, 64(%rsp) - andl $32767, %ebp - fstpt 48(%rsp) - fldt 48(%rsp) - jmp ..B2.209 -..B2.208: - fldt 32(%rsp) - fldt 48(%rsp) -..B2.209: - fldt 80(%rsp) - fld %st(2) - movl %edi, 256(%rsp) - cmpl %ebx, %ebp - fsub %st(1), %st - jg ..B2.214 -..B2.210: - jne ..B2.215 -..B2.211: - movl 36(%rsp), %eax - cmpl %edx, %eax - ja ..B2.214 -..B2.212: - jne ..B2.215 -..B2.213: - movl 32(%rsp), %eax - cmpl 80(%rsp), %eax - jbe ..B2.215 -..B2.214: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 96(%rsp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - jmp ..B2.216 -..B2.215: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 96(%rsp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) -..B2.216: - fld %st(0) - fadd %st(2), %st - fstpt 224(%rsp) - fldt 224(%rsp) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 240(%rsp) - fldt 240(%rsp) - jmp ..B2.223 -..B2.217: - movl 36(%rsp), %ecx -..B2.218: - testl %ecx, %ecx - jne ..B2.220 -..B2.233: - cmpl $0, 32(%rsp) -..B2.219: - je ..B2.190 -..B2.220: - lea -16517(%rdi,%rbx), %eax - lea -16383(%rsi,%rbp), %edx - cmpl %edx, %eax - jge ..B2.190 -..B2.222: - fldt 32(%rsp) - movl %esi, %edi - fldt 48(%rsp) - movaps 32(%rsp), %xmm0 - movaps 48(%rsp), %xmm1 - movaps 64(%rsp), %xmm2 - movaps %xmm0, 224(%rsp) - movaps %xmm1, 240(%rsp) - movaps %xmm2, 256(%rsp) -..B2.223: - addq $-32, %rsp - .cfi_def_cfa_offset 896 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_recacosl_k80.142: - call __libm_scalbl_k80@PLT -..___tag_value___libm_recacosl_k80.143: -..B2.231: - addq $32, %rsp - .cfi_def_cfa_offset 864 -..B2.224: - movq 800(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B2.228 -..B2.225: - addq $808, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 864 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.226: - lea halfs(%rip), %rax - incl %ecx - movl %ecx, 352(%rsp) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - fstpt 320(%rsp) - fldt 320(%rsp) - fxch %st(1) - fmul %st(2), %st - fstpt 336(%rsp) - fldt 336(%rsp) - fxch %st(1) - fxch %st(2) - jmp ..B2.153 -..B2.227: - lea halfs(%rip), %rax - incl %ecx - movl %ecx, 160(%rsp) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - fstpt 128(%rsp) - fldt 128(%rsp) - fxch %st(1) - fmul %st(2), %st - fstpt 144(%rsp) - fldt 144(%rsp) - fxch %st(1) - fxch %st(2) - jmp ..B2.161 -..B2.228: - fstp %st(0) - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __libm_recacosl_k80,@function - .size __libm_recacosl_k80,.-__libm_recacosl_k80 - .data -# -- End __libm_recacosl_k80 - .text -# -- Begin asinpoly - .text - .align 16,0x90 -asinpoly: -# parameter 1: %rdi -# parameter 2: %rsi -..B3.1: - .cfi_startproc -..___tag_value_asinpoly.166: -..L167: - - subq $184, %rsp - .cfi_def_cfa_offset 192 - lea ones(%rip), %rax - movl 32(%rsi), %r8d - movzwl 8(%rsi), %ecx - andl $32767, %ecx - fldt (%rax) - lea 16383(%r8), %edx - movzwl 8(%rax), %eax - andl $32767, %edx - andl $-32768, %eax - addl %ecx, %r8d - orl %edx, %eax - fstpt 112(%rsp) - cmpl $16343, %r8d - jl ..B3.38 -..B3.2: - fldt (%rsi) - lea 240+_ASIN_POLY(%rip), %rdx - fldt 16(%rsi) - lea 208+_ASIN_POLY(%rip), %rcx - movw %ax, 120(%rsp) - lea 272+_ASIN_POLY(%rip), %rax - fldt 112(%rsp) - lea 176+_ASIN_POLY(%rip), %rsi - fmul %st, %st(2) - lea 144+_ASIN_POLY(%rip), %r8 - fld %st(2) - lea 112+_ASIN_POLY(%rip), %r9 - fmul %st(3), %st - lea 80+_ASIN_POLY(%rip), %r10 - fld %st(0) - lea 256+_ASIN_POLY(%rip), %r11 - fmul %st(1), %st - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fxch %st(3) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 144(%rsp) - fldt 144(%rsp) - fldt (%rax) - lea 224+_ASIN_POLY(%rip), %rax - fmul %st(2), %st - fldt (%rdx) - lea 192+_ASIN_POLY(%rip), %rdx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - lea 160+_ASIN_POLY(%rip), %rcx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 128+_ASIN_POLY(%rip), %rsi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - lea 96+_ASIN_POLY(%rip), %r8 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - lea 64+_ASIN_POLY(%rip), %r9 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - lea t32(%rip), %r10 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r11) - fmul %st(3), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdx) - lea 48+_ASIN_POLY(%rip), %rdx - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%r9) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 160(%rsp) - fldt 160(%rsp) - fld %st(1) - fldt (%r10) - fstpt 48(%rsp) - fldt 48(%rsp) - fmul %st(3), %st - movzwl 168(%rsp), %eax - fsubr %st, %st(1) - andl $32767, %eax - faddp %st, %st(1) - fld %st(0) - cmpl $16377, %eax - fsubr %st(3), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fld %st(1) - fmul %st(2), %st - fxch %st(5) - fmulp %st, %st(4) - fxch %st(3) - fadd %st(0), %st - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fmul %st(3), %st - fadd %st(0), %st - fld %st(0) - fadd %st(5), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(6) - fxch %st(2) - faddp %st, %st(6) - fxch %st(4) - fmul %st(0), %st - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%rsp) - fldt (%rdx) - fld %st(0) - fadd %st(2), %st - jg ..B3.7 -..B3.3: - jne ..B3.8 -..B3.4: - movl 164(%rsp), %eax - cmpl 4(%rdx), %eax - ja ..B3.7 -..B3.5: - jne ..B3.8 -..B3.6: - movl 160(%rsp), %eax - cmpl (%rdx), %eax - jbe ..B3.8 -..B3.7: - lea 336+_ASIN_POLY(%rip), %rdx - fsubr %st, %st(2) - lea zeros(%rip), %rax - fxch %st(1) - faddp %st, %st(2) - fldt (%rax) - fldt (%rdx) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - jmp ..B3.9 -..B3.8: - lea zeros(%rip), %rax - fsubr %st, %st(1) - lea 336+_ASIN_POLY(%rip), %rdx - fxch %st(2) - faddp %st, %st(1) - fldt (%rax) - faddp %st, %st(1) - fldt (%rdx) - faddp %st, %st(1) -..B3.9: - fldt 64(%rsp) - lea 32+_ASIN_POLY(%rip), %rdx - fld %st(0) - fld %st(2) - fadd %st(4), %st - fld %st(0) - fld %st(1) - fxch %st(2) - fsubr %st, %st(6) - fxch %st(5) - faddp %st, %st(6) - fxch %st(3) - fmul %st, %st(5) - fldt 48(%rsp) - fld %st(0) - fmul %st(6), %st - fsubr %st, %st(5) - faddp %st, %st(5) - fxch %st(2) - fsub %st(4), %st - fld %st(1) - fmulp %st, %st(3) - fxch %st(2) - fsubr %st, %st(3) - faddp %st, %st(3) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fsubr %st, %st(2) - fxch %st(2) - fstpt 128(%rsp) - fldt 128(%rsp) - fld %st(3) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(4) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fldt 96(%rsp) - fmulp %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fldt 128(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt 160(%rsp) - fldt 160(%rsp) - fsubr %st, %st(2) - movzwl 168(%rsp), %eax - fxch %st(1) - faddp %st, %st(2) - fldt (%rdx) - andl $32767, %eax - fld %st(0) - cmpl $16378, %eax - fadd %st(2), %st - jg ..B3.14 -..B3.10: - jne ..B3.15 -..B3.11: - movl 164(%rsp), %eax - cmpl 4(%rdx), %eax - ja ..B3.14 -..B3.12: - jne ..B3.15 -..B3.13: - movl 160(%rsp), %eax - cmpl (%rdx), %eax - jbe ..B3.15 -..B3.14: - lea 320+_ASIN_POLY(%rip), %rax - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - jmp ..B3.16 -..B3.15: - lea 320+_ASIN_POLY(%rip), %rax - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldt (%rax) - faddp %st, %st(2) -..B3.16: - fldt 112(%rsp) - lea 16+_ASIN_POLY(%rip), %rdx - fld %st(0) - fld %st(3) - fadd %st(3), %st - fld %st(0) - fld %st(1) - fxch %st(2) - fsubr %st, %st(5) - fxch %st(6) - faddp %st, %st(5) - fldt 48(%rsp) - fmul %st(6), %st - fsubr %st, %st(1) - faddp %st, %st(1) - fmul %st, %st(2) - fsubr %st, %st(1) - fxch %st(1) - fmul %st, %st(3) - fldt 128(%rsp) - fmul %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt 96(%rsp) - fmulp %st, %st(5) - fldt 64(%rsp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fstpt 160(%rsp) - fldt 160(%rsp) - fsubr %st, %st(1) - movzwl 168(%rsp), %eax - fxch %st(2) - faddp %st, %st(1) - fldt (%rdx) - andl $32767, %eax - fld %st(0) - cmpl $16379, %eax - fadd %st(3), %st - jg ..B3.21 -..B3.17: - jne ..B3.22 -..B3.18: - movl 164(%rsp), %eax - cmpl 4(%rdx), %eax - ja ..B3.21 -..B3.19: - jne ..B3.22 -..B3.20: - movl 160(%rsp), %eax - cmpl (%rdx), %eax - jbe ..B3.22 -..B3.21: - lea 304+_ASIN_POLY(%rip), %rax - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt (%rax) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - jmp ..B3.23 -..B3.22: - lea 304+_ASIN_POLY(%rip), %rax - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt (%rax) - faddp %st, %st(1) -..B3.23: - fldt 112(%rsp) - lea _ASIN_POLY(%rip), %rdx - fld %st(0) - fld %st(2) - fadd %st(4), %st - fld %st(0) - fld %st(1) - fxch %st(2) - fsubr %st, %st(6) - fxch %st(5) - faddp %st, %st(6) - fldt 48(%rsp) - fmul %st(5), %st - fsubr %st, %st(1) - faddp %st, %st(1) - fmul %st, %st(2) - fsubr %st, %st(1) - fxch %st(1) - fmul %st, %st(3) - fldt 128(%rsp) - fmul %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 96(%rsp) - fmulp %st, %st(3) - fldt 64(%rsp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt 160(%rsp) - fldt 160(%rsp) - fsubr %st, %st(2) - movzwl 168(%rsp), %eax - fxch %st(1) - faddp %st, %st(2) - fldt (%rdx) - andl $32767, %eax - fld %st(0) - cmpl $16380, %eax - fadd %st(2), %st - jg ..B3.28 -..B3.24: - jne ..B3.29 -..B3.25: - movl 164(%rsp), %eax - cmpl 4(%rdx), %eax - ja ..B3.28 -..B3.26: - jne ..B3.29 -..B3.27: - movl 160(%rsp), %eax - cmpl (%rdx), %eax - jbe ..B3.29 -..B3.28: - lea 288+_ASIN_POLY(%rip), %rax - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - jmp ..B3.30 -..B3.29: - lea 288+_ASIN_POLY(%rip), %rax - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldt (%rax) - faddp %st, %st(2) -..B3.30: - fldt 48(%rsp) - fld %st(2) - movzwl 152(%rsp), %edx - fadd %st(2), %st - fmul %st, %st(1) - fld %st(0) - andl $32767, %edx - fsub %st(2), %st - faddp %st, %st(2) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(2) - fsub %st(1), %st - fldt 112(%rsp) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fmul %st(2), %st - fldt 128(%rsp) - fmul %st, %st(4) - fxch %st(1) - faddp %st, %st(4) - fld %st(3) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fmulp %st, %st(2) - faddp %st, %st(1) - fld %st(1) - fldt 96(%rsp) - fmulp %st, %st(5) - fldt 64(%rsp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(2) - fldt 48(%rsp) - fmul %st(4), %st - fsubr %st, %st(1) - faddp %st, %st(1) - fsubr %st, %st(1) - fldt (%rsp) - fld %st(0) - fmul %st(2), %st - fxch %st(1) - fmul %st(3), %st - fldt 32(%rsp) - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(0) - fldt 16(%rsp) - fmulp %st, %st(5) - fldt 80(%rsp) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(5) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fadd %st(3), %st - fstpt 160(%rsp) - fldt 160(%rsp) - fsubr %st, %st(1) - movzwl 168(%rsp), %eax - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fadd %st(2), %st - andl $32767, %eax - cmpl %edx, %eax - jg ..B3.35 -..B3.31: - jne ..B3.36 -..B3.32: - movl 164(%rsp), %eax - movl 148(%rsp), %edx - cmpl %edx, %eax - ja ..B3.35 -..B3.33: - jne ..B3.36 -..B3.34: - movl 160(%rsp), %eax - cmpl 144(%rsp), %eax - jbe ..B3.36 -..B3.35: - fldt 80(%rsp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 16(%rsp) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - jmp ..B3.37 -..B3.36: - fldt 80(%rsp) - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%rsp) - faddp %st, %st(2) -..B3.37: - fld %st(1) - movl $0, 32(%rdi) - fadd %st(1), %st - fstpt (%rdi) - fldt (%rdi) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rdi) - addq $184, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 -..B3.38: - movq (%rsi), %rax - movq 8(%rsi), %rdx - movq 16(%rsi), %rcx - movq 24(%rsi), %r8 - movq 32(%rsi), %r9 - movq 40(%rsi), %rsi - movq %rax, (%rdi) - movq %rdx, 8(%rdi) - movq %rcx, 16(%rdi) - movq %r8, 24(%rdi) - movq %r9, 32(%rdi) - movq %rsi, 40(%rdi) -..B3.39: - addq $184, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type asinpoly,@function - .size asinpoly,.-asinpoly - .data -# -- End asinpoly - .text -# -- Begin __libm_recasinl_k80 - .text - .align 16,0x90 - .globl __libm_recasinl_k80 -__libm_recasinl_k80: -# parameter 1: %rdi -# parameter 2: %rsi -# parameter 3: %rdx -# parameter 4: %rcx -# parameter 5: %r8 -# parameter 6: %r9 -# parameter 7: 704 + %rsp -# parameter 8: 712 + %rsp -# parameter 9: 720 + %rsp -# parameter 10: 728 + %rsp -..B4.1: - .cfi_startproc -..___tag_value___libm_recasinl_k80.173: -..L174: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $648, %rsp - .cfi_def_cfa_offset 704 - movq %rdx, %r12 - movq %fs:40, %rax - movq %r9, %r14 - xorq %rsp, %rax - movq %r8, %rbp - movq %rax, 640(%rsp) - movq %rdi, %r15 - movzwl 8(%r12), %eax - andl $32767, %eax - movq 728(%rsp), %r13 - cmpl $8383, %eax - jl ..B4.5 -..B4.2: - cmpl $24383, %eax - jg ..B4.5 -..B4.3: - movzwl 8(%r13), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.5 -..B4.4: - cmpl $24383, %eax - jle ..B4.7 -..B4.5: - movq %r12, %rdi -..___tag_value___libm_recasinl_k80.188: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.189: -..B4.6: - movq %r13, %rdi -..___tag_value___libm_recasinl_k80.190: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.191: -..B4.7: - fldt (%r12) - lea t32(%rip), %rax - fld %st(0) - fldt (%r13) - fdivr %st, %st(1) - fld %st(0) - fld %st(1) - fldt (%rax) - fld %st(0) - fmul %st(5), %st - fld %st(0) - movl 32(%r12), %ebx - fsubr %st(6), %st - subl 32(%r13), %ebx - faddp %st, %st(1) - fld %st(0) - lea 1(%rbx), %edx - movl %edx, 624(%rsp) - fsubr %st(6), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(3) - fsub %st(4), %st - faddp %st, %st(4) - fld %st(4) - fsub %st(4), %st - fxch %st(3) - fstpt 48(%rsp) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fxch %st(1) - fsubrp %st, %st(4) - fsubrp %st, %st(3) - fldt 16(%r12) - faddp %st, %st(3) - fldt 16(%r13) - fmul %st(2), %st - fsubrp %st, %st(3) - fdivrp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 592(%rsp) - fldt 592(%rsp) - fsubrp %st, %st(1) - movzwl 600(%rsp), %ecx - fadd %st(1), %st - andl $32767, %ecx - fstpt 608(%rsp) - fstpt 16(%rsp) - lea 1(%rcx,%rbx), %esi - cmpl $16382, %esi - jl ..B4.183 -..B4.8: - movzwl 8(%r15), %eax - andl $32767, %eax - movq 720(%rsp), %rbx - cmpl $16383, %eax - jl ..B4.37 -..B4.9: - movq 704(%rsp), %r9 - movq (%r9), %rax - movq 8(%r9), %rdx - movq 16(%r9), %rcx - movq 24(%r9), %rsi - movq 32(%r9), %r8 - movq 40(%r9), %r10 - movzwl 8(%rbx), %r9d - movq %rax, 64(%rsp) - movl %r9d, %eax - andl $32767, %eax - movq %rdx, 72(%rsp) - cmpl $8383, %eax - movq %rcx, 80(%rsp) - movq %rsi, 88(%rsp) - movq %r8, 96(%rsp) - movq %r10, 104(%rsp) - jl ..B4.13 -..B4.10: - cmpl $24383, %eax - jg ..B4.13 -..B4.11: - movzwl 8(%rbp), %r10d - movl %r10d, %r11d - andl $32767, %r11d - cmpl $8383, %r11d - jl ..B4.13 -..B4.12: - cmpl $24383, %r11d - jle ..B4.16 -..B4.13: - movq %rbx, %rdi -..___tag_value___libm_recasinl_k80.192: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.193: -..B4.14: - movq %rbp, %rdi -..___tag_value___libm_recasinl_k80.194: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.195: -..B4.15: - movzwl 8(%rbx), %r9d - movl %r9d, %eax - movzwl 8(%rbp), %r10d - movl %r10d, %r11d - andl $32767, %eax - andl $32767, %r11d -..B4.16: - movl 32(%rbp), %edx - movl 32(%rbx), %ecx - lea -134(%rdx,%r11), %esi - lea (%rax,%rcx), %r8d - cmpl %r8d, %esi - jge ..B4.33 -..B4.17: - lea 134(%rdx,%r11), %esi - cmpl %esi, %r8d - jge ..B4.33 -..B4.18: - cmpl $0, 4(%rbx) - jne ..B4.20 -..B4.19: - cmpl $0, (%rbx) - je ..B4.33 -..B4.20: - cmpl $0, 4(%rbp) - jne ..B4.22 -..B4.21: - cmpl $0, (%rbp) - je ..B4.33 -..B4.22: - cmpl %edx, %ecx - je ..B4.24 -..B4.23: - fldt 16(%rsp) - subl %edx, %ecx - fstpt (%rsp) - addl $16383, %ecx - fldt (%rbx) - andl $32767, %ecx - fldt 16(%rbx) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 32(%rbx) - fxch %st(2) - fstpt (%rbx) - fldt (%rbx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbx) - fldt 16(%rbx) - fxch %st(1) - fstpt 16(%rsp) - movl 32(%rbp), %edx - movzwl 8(%rbp), %r10d - movzwl 8(%rbx), %r9d - jmp ..B4.25 -..B4.24: - fldt (%rbx) - fstpt 16(%rsp) - fldt 16(%rbx) -..B4.25: - fldt (%rbp) - andl $32767, %r9d - fldt 16(%rsp) - andl $32767, %r10d - movl %edx, 144(%rsp) - cmpl %r10d, %r9d - fadd %st(1), %st - jg ..B4.30 -..B4.26: - jne ..B4.31 -..B4.27: - movl 4(%rbx), %eax - cmpl 4(%rbp), %eax - ja ..B4.30 -..B4.28: - jne ..B4.31 -..B4.29: - movl (%rbx), %eax - cmpl (%rbp), %eax - jbe ..B4.31 -..B4.30: - fldt 16(%rsp) - fsub %st(1), %st - faddp %st, %st(2) - fldt 16(%rbp) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B4.32 -..B4.31: - fldt 16(%rsp) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 16(%rbp) - faddp %st, %st(1) - fstpt 16(%rsp) -..B4.32: - fldt 16(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 128(%rsp) - jmp ..B4.65 -..B4.33: - cmpq $0, (%rbx) - je ..B4.35 -..B4.34: - lea -16517(%rdx,%r11), %edx - lea -16383(%rcx,%rax), %eax - cmpl %eax, %edx - jl ..B4.36 -..B4.35: - movq (%rbp), %rax - movq 8(%rbp), %rdx - movq 16(%rbp), %rcx - movq 24(%rbp), %rbx - movq 32(%rbp), %rsi - movq 40(%rbp), %rbp - movq %rax, 112(%rsp) - movq %rdx, 120(%rsp) - movq %rcx, 128(%rsp) - movq %rbx, 136(%rsp) - movq %rsi, 144(%rsp) - movq %rbp, 152(%rsp) - jmp ..B4.65 -..B4.36: - movq (%rbx), %rax - movq 8(%rbx), %rdx - movq 16(%rbx), %rcx - movq 24(%rbx), %rbp - movq 32(%rbx), %rsi - movq 40(%rbx), %rbx - movq %rax, 112(%rsp) - movq %rdx, 120(%rsp) - movq %rcx, 128(%rsp) - movq %rbp, 136(%rsp) - movq %rsi, 144(%rsp) - movq %rbx, 152(%rsp) - jmp ..B4.65 -..B4.37: - lea ones(%rip), %rax - lea zeros(%rip), %rdx - movzwl 8(%rbx), %r9d - movl $0, 144(%rsp) - fldt (%rax) - movl %r9d, %eax - andl $32767, %eax - fstpt 112(%rsp) - cmpl $8383, %eax - fldt (%rdx) - fstpt 128(%rsp) - jl ..B4.41 -..B4.38: - cmpl $24383, %eax - jg ..B4.41 -..B4.39: - movzwl 8(%rbp), %r10d - movl %r10d, %r11d - andl $32767, %r11d - cmpl $8383, %r11d - jl ..B4.41 -..B4.40: - cmpl $24383, %r11d - jle ..B4.44 -..B4.41: - movq %rbx, %rdi -..___tag_value___libm_recasinl_k80.196: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.197: -..B4.42: - movq %rbp, %rdi -..___tag_value___libm_recasinl_k80.198: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.199: -..B4.43: - movzwl 8(%rbx), %r9d - movl %r9d, %eax - movzwl 8(%rbp), %r10d - movl %r10d, %r11d - andl $32767, %eax - andl $32767, %r11d -..B4.44: - movl 32(%rbp), %edx - movl 32(%rbx), %ecx - lea -134(%rdx,%r11), %esi - lea (%rax,%rcx), %r8d - cmpl %r8d, %esi - jge ..B4.61 -..B4.45: - lea 134(%rdx,%r11), %esi - cmpl %esi, %r8d - jge ..B4.61 -..B4.46: - cmpl $0, 4(%rbx) - jne ..B4.48 -..B4.47: - cmpl $0, (%rbx) - je ..B4.61 -..B4.48: - cmpl $0, 4(%rbp) - jne ..B4.50 -..B4.49: - cmpl $0, (%rbp) - je ..B4.61 -..B4.50: - cmpl %edx, %ecx - je ..B4.52 -..B4.51: - fldt 16(%rsp) - subl %edx, %ecx - fstpt (%rsp) - addl $16383, %ecx - fldt (%rbx) - andl $32767, %ecx - fldt 16(%rbx) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %edx, 32(%rbx) - fxch %st(2) - fstpt (%rbx) - fldt (%rbx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbx) - fldt 16(%rbx) - fstpt 16(%rsp) - movl 32(%rbp), %edx - movzwl 8(%rbp), %r10d - movzwl 8(%rbx), %r9d - jmp ..B4.53 -..B4.52: - fldt (%rbx) - fldt 16(%rbx) - fstpt 16(%rsp) -..B4.53: - fldt (%rbp) - andl $32767, %r9d - andl $32767, %r10d - fld %st(1) - movl %edx, 96(%rsp) - cmpl %r10d, %r9d - fsub %st(1), %st - jg ..B4.58 -..B4.54: - jne ..B4.59 -..B4.55: - movl 4(%rbx), %eax - cmpl 4(%rbp), %eax - ja ..B4.58 -..B4.56: - jne ..B4.59 -..B4.57: - movl (%rbx), %eax - cmpl (%rbp), %eax - jbe ..B4.59 -..B4.58: - fldt 16(%rsp) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fldt 16(%rbp) - fsubrp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - jmp ..B4.60 -..B4.59: - fldt 16(%rbp) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fsubrp %st, %st(3) - fldt 16(%rsp) - faddp %st, %st(3) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) -..B4.60: - fldt 16(%rsp) - fld %st(0) - fadd %st(2), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 80(%rsp) - jmp ..B4.65 -..B4.61: - cmpq $0, (%rbx) - je ..B4.63 -..B4.62: - lea -16517(%rdx,%r11), %esi - lea -16383(%rcx,%rax), %eax - cmpl %eax, %esi - jl ..B4.64 -..B4.63: - fldt (%rbp) - fchs - movl %edx, 96(%rsp) - fstpt 64(%rsp) - fldt 16(%rbp) - fchs - fstpt 80(%rsp) - jmp ..B4.65 -..B4.64: - movq (%rbx), %rax - movq 8(%rbx), %rdx - movq 16(%rbx), %rcx - movq 24(%rbx), %rbp - movq 32(%rbx), %rsi - movq 40(%rbx), %rbx - movq %rax, 64(%rsp) - movq %rdx, 72(%rsp) - movq %rcx, 80(%rsp) - movq %rbp, 88(%rsp) - movq %rsi, 96(%rsp) - movq %rbx, 104(%rsp) -..B4.65: - movzwl 8(%r12), %ebp - movl %ebp, %r9d - andl $32767, %r9d - movl 32(%r12), %edx - incl %edx - movl %edx, 32(%r12) - cmpl $8383, %r9d - jl ..B4.69 -..B4.66: - cmpl $24383, %r9d - jg ..B4.69 -..B4.67: - movzwl 8(%r13), %eax - movl %eax, %r8d - andl $32767, %r8d - cmpl $8383, %r8d - jl ..B4.69 -..B4.68: - cmpl $24383, %r8d - jle ..B4.72 -..B4.69: - movq %r12, %rdi -..___tag_value___libm_recasinl_k80.200: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.201: -..B4.70: - movq %r13, %rdi -..___tag_value___libm_recasinl_k80.202: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.203: -..B4.71: - movzwl 8(%r12), %ebp - movl %ebp, %r9d - movzwl 8(%r13), %eax - movl %eax, %r8d - movl 32(%r12), %edx - andl $32767, %r9d - andl $32767, %r8d -..B4.72: - movl 32(%r13), %esi - lea (%rdx,%r9), %ebx - lea -134(%rsi,%r8), %ecx - cmpl %ecx, %ebx - jle ..B4.89 -..B4.73: - lea 134(%rsi,%r8), %ecx - cmpl %ecx, %ebx - jge ..B4.89 -..B4.74: - cmpl $0, 4(%r12) - jne ..B4.76 -..B4.75: - cmpl $0, (%r12) - je ..B4.89 -..B4.76: - cmpl $0, 4(%r13) - jne ..B4.78 -..B4.77: - cmpl $0, (%r13) - je ..B4.89 -..B4.78: - cmpl %esi, %edx - je ..B4.80 -..B4.79: - fldt 16(%rsp) - subl %esi, %edx - fstpt (%rsp) - addl $16383, %edx - fldt (%r12) - andl $32767, %edx - fldt 16(%r12) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %edx, %eax - movl %esi, %edx - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %esi, 32(%r12) - fxch %st(2) - fstpt (%r12) - fldt (%r12) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%r12) - fldt 16(%r12) - movl 32(%r13), %esi - movzwl 8(%r13), %eax - movzwl 8(%r12), %ebp - jmp ..B4.81 -..B4.80: - fldt (%r12) - fldt 16(%r12) -..B4.81: - fldt (%r13) - movl %eax, %ecx - andl $32767, %ebp - andl $32767, %ecx - fld %st(2) - cmpl %ecx, %ebp - movl %esi, 192(%rsp) - fadd %st(1), %st - jg ..B4.86 -..B4.82: - jne ..B4.87 -..B4.83: - movl 4(%r12), %ecx - cmpl 4(%r13), %ecx - ja ..B4.86 -..B4.84: - jne ..B4.87 -..B4.85: - movl (%r12), %ecx - cmpl (%r13), %ecx - jbe ..B4.87 -..B4.86: - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt 16(%r13) - faddp %st, %st(1) - faddp %st, %st(1) - fxch %st(1) - jmp ..B4.88 -..B4.87: - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 16(%r13) - faddp %st, %st(2) -..B4.88: - fld %st(1) - fadd %st(1), %st - fstpt 160(%rsp) - fldt 160(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 176(%rsp) - jmp ..B4.93 -..B4.89: - cmpq $0, (%r12) - je ..B4.91 -..B4.90: - lea -16517(%rsi,%r8), %ecx - lea -16383(%rdx,%r9), %ebx - cmpl %ebx, %ecx - jl ..B4.92 -..B4.91: - movq (%r13), %rcx - movq 8(%r13), %rbx - movq 16(%r13), %rbp - movq 24(%r13), %rsi - movq 32(%r13), %r8 - movq 40(%r13), %r9 - movq %rcx, 160(%rsp) - movq %rbx, 168(%rsp) - movq %rbp, 176(%rsp) - movq %rsi, 184(%rsp) - movq %r8, 192(%rsp) - movq %r9, 200(%rsp) - jmp ..B4.93 -..B4.92: - movq (%r12), %rcx - movq 8(%r12), %rbx - movq 16(%r12), %rbp - movq 24(%r12), %rsi - movq 32(%r12), %r8 - movq 40(%r12), %r9 - movq %rcx, 160(%rsp) - movq %rbx, 168(%rsp) - movq %rbp, 176(%rsp) - movq %rsi, 184(%rsp) - movq %r8, 192(%rsp) - movq %r9, 200(%rsp) -..B4.93: - decl %edx - movl %edx, 32(%r12) - movzwl 168(%rsp), %edx - andl $32767, %edx - cmpl $8383, %edx - jl ..B4.97 -..B4.94: - cmpl $24383, %edx - jg ..B4.97 -..B4.95: - movzwl 72(%rsp), %edx - andl $32767, %edx - cmpl $8383, %edx - jl ..B4.97 -..B4.96: - cmpl $24383, %edx - jle ..B4.99 -..B4.97: - lea 160(%rsp), %rdi -..___tag_value___libm_recasinl_k80.204: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.205: -..B4.98: - lea 64(%rsp), %rdi -..___tag_value___libm_recasinl_k80.206: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.207: - movzwl 8(%r13), %eax -..B4.99: - fldt 160(%rsp) - andl $32767, %eax - fld %st(0) - fld %st(1) - fldt 48(%rsp) - fld %st(0) - fmul %st(4), %st - movl 192(%rsp), %edx - fsubr %st, %st(3) - addl 96(%rsp), %edx - faddp %st, %st(3) - fld %st(2) - cmpl $8383, %eax - movl %edx, 240(%rsp) - fxch %st(2) - fsub %st(3), %st - fldt 64(%rsp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 80(%rsp) - fmulp %st, %st(4) - fldt 176(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 208(%rsp) - fldt 208(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 224(%rsp) - jl ..B4.103 -..B4.100: - cmpl $24383, %eax - jg ..B4.103 -..B4.101: - movzwl 120(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.103 -..B4.102: - cmpl $24383, %eax - jle ..B4.105 -..B4.103: - movq %r13, %rdi -..___tag_value___libm_recasinl_k80.208: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.209: -..B4.104: - lea 112(%rsp), %rdi -..___tag_value___libm_recasinl_k80.210: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.211: -..B4.105: - fldt (%r13) - fld %st(0) - fld %st(1) - fldt 48(%rsp) - fld %st(0) - fmul %st(4), %st - movq 712(%rsp), %rbx - fsubr %st, %st(3) - movzwl 8(%rbx), %ecx - movl %ecx, %r10d - movl 144(%rsp), %eax - andl $32767, %r10d - addl 32(%r13), %eax - faddp %st, %st(3) - fld %st(2) - cmpl $8383, %r10d - movl %eax, 288(%rsp) - fxch %st(2) - fsub %st(3), %st - fldt 112(%rsp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 128(%rsp) - fmulp %st, %st(4) - fldt 16(%r13) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 256(%rsp) - fldt 256(%rsp) - fsubrp %st, %st(1) - fadd %st(1), %st - fstpt 272(%rsp) - fstpt 16(%rsp) - jl ..B4.109 -..B4.106: - cmpl $24383, %r10d - jg ..B4.109 -..B4.107: - movzwl 8(%r14), %ebp - movl %ebp, %r8d - andl $32767, %r8d - cmpl $8383, %r8d - jl ..B4.109 -..B4.108: - cmpl $24383, %r8d - jle ..B4.112 -..B4.109: - movq %rbx, %rdi -..___tag_value___libm_recasinl_k80.212: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.213: -..B4.110: - movq %r14, %rdi -..___tag_value___libm_recasinl_k80.214: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.215: -..B4.111: - movzwl 8(%rbx), %ecx - movl %ecx, %r10d - movzwl 8(%r14), %ebp - movl %ebp, %r8d - andl $32767, %r10d - andl $32767, %r8d -..B4.112: - movl 32(%r14), %esi - movl 32(%rbx), %r9d - lea -134(%rsi,%r8), %eax - lea (%r10,%r9), %edx - cmpl %eax, %edx - jle ..B4.129 -..B4.113: - lea 134(%rsi,%r8), %eax - cmpl %eax, %edx - jge ..B4.129 -..B4.114: - cmpl $0, 4(%rbx) - jne ..B4.116 -..B4.115: - cmpl $0, (%rbx) - je ..B4.129 -..B4.116: - cmpl $0, 4(%r14) - jne ..B4.118 -..B4.117: - cmpl $0, (%r14) - je ..B4.129 -..B4.118: - cmpl %esi, %r9d - je ..B4.120 -..B4.119: - fldt 16(%rsp) - subl %esi, %r9d - fstpt (%rsp) - addl $16383, %r9d - fldt (%rbx) - andl $32767, %r9d - fldt 16(%rbx) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %r9d, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - movl %esi, 32(%rbx) - fxch %st(2) - fstpt (%rbx) - fldt (%rbx) - fxch %st(2) - fmulp %st, %st(1) - fstpt 16(%rbx) - fldt 16(%rbx) - movl 32(%r14), %esi - movzwl 8(%r14), %ebp - movzwl 8(%rbx), %ecx - jmp ..B4.121 -..B4.120: - fldt (%rbx) - fldt 16(%rbx) -..B4.121: - fldt (%r14) - andl $32767, %ecx - andl $32767, %ebp - fld %st(2) - movl %esi, 336(%rsp) - cmpl %ebp, %ecx - fadd %st(1), %st - jg ..B4.126 -..B4.122: - jne ..B4.127 -..B4.123: - movl 4(%rbx), %eax - cmpl 4(%r14), %eax - ja ..B4.126 -..B4.124: - jne ..B4.127 -..B4.125: - movl (%rbx), %eax - cmpl (%r14), %eax - jbe ..B4.127 -..B4.126: - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fldt 16(%r14) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B4.128 -..B4.127: - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 16(%r14) - faddp %st, %st(1) -..B4.128: - fld %st(0) - fadd %st(2), %st - fstpt 304(%rsp) - fldt 304(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpt 320(%rsp) - jmp ..B4.133 -..B4.129: - cmpq $0, (%rbx) - je ..B4.131 -..B4.130: - lea -16517(%rsi,%r8), %eax - lea -16383(%r9,%r10), %edx - cmpl %edx, %eax - jl ..B4.132 -..B4.131: - movq (%r14), %rax - movq 8(%r14), %rdx - movq 16(%r14), %rcx - movq 24(%r14), %rbx - movq 32(%r14), %rbp - movq 40(%r14), %rsi - movq %rax, 304(%rsp) - movq %rdx, 312(%rsp) - movq %rcx, 320(%rsp) - movq %rbx, 328(%rsp) - movq %rbp, 336(%rsp) - movq %rsi, 344(%rsp) - jmp ..B4.133 -..B4.132: - movq (%rbx), %rax - movq 8(%rbx), %rdx - movq 16(%rbx), %rcx - movq 24(%rbx), %rbp - movq 32(%rbx), %rsi - movq 40(%rbx), %rbx - movq %rax, 304(%rsp) - movq %rdx, 312(%rsp) - movq %rcx, 320(%rsp) - movq %rbp, 328(%rsp) - movq %rsi, 336(%rsp) - movq %rbx, 344(%rsp) -..B4.133: - movzwl 264(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.137 -..B4.134: - cmpl $24383, %eax - jg ..B4.137 -..B4.135: - movzwl 312(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.137 -..B4.136: - cmpl $24383, %eax - jle ..B4.139 -..B4.137: - lea 256(%rsp), %rdi -..___tag_value___libm_recasinl_k80.216: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.217: -..B4.138: - lea 304(%rsp), %rdi -..___tag_value___libm_recasinl_k80.218: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.219: -..B4.139: - fldt 256(%rsp) - fld %st(0) - fld %st(1) - fldt 48(%rsp) - fld %st(0) - fmul %st(4), %st - movl 288(%rsp), %edx - fsubr %st, %st(3) - movzwl 216(%rsp), %eax - faddp %st, %st(3) - fld %st(2) - andl $32767, %eax - addl 336(%rsp), %edx - fxch %st(2) - fsub %st(3), %st - fldt 304(%rsp) - cmpl $8383, %eax - fmul %st, %st(2) - fld %st(0) - movl %edx, 384(%rsp) - fsub %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st, %st(3) - fld %st(2) - fsub %st(1), %st - fmul %st, %st(5) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(5) - fld %st(4) - fadd %st(4), %st - fsub %st, %st(4) - fxch %st(4) - fchs - faddp %st, %st(5) - fmulp %st, %st(1) - faddp %st, %st(3) - fldt 320(%rsp) - fmulp %st, %st(4) - fldt 272(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 352(%rsp) - fldt 352(%rsp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 368(%rsp) - fldt 368(%rsp) - jl ..B4.143 -..B4.140: - cmpl $24383, %eax - jg ..B4.143 -..B4.141: - movzwl 360(%rsp), %eax - andl $32767, %eax - cmpl $8383, %eax - jl ..B4.143 -..B4.142: - cmpl $24383, %eax - jle ..B4.146 -..B4.143: - fstp %st(1) - fstp %st(0) - lea 208(%rsp), %rdi -..___tag_value___libm_recasinl_k80.220: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.221: -..B4.144: - lea 352(%rsp), %rdi -..___tag_value___libm_recasinl_k80.222: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.223: -..B4.145: - fldt 352(%rsp) - fldt 368(%rsp) - movl 384(%rsp), %edx -..B4.146: - fldt 208(%rsp) - fld %st(2) - fdivr %st(1), %st - fmul %st, %st(2) - fld %st(3) - fxch %st(4) - fstpt 32(%rsp) - fldt 32(%rsp) - fldt 48(%rsp) - fld %st(0) - fmul %st(3), %st - fld %st(0) - movl 240(%rsp), %ecx - fsubr %st(4), %st - subl %edx, %ecx - faddp %st, %st(1) - fld %st(0) - decl %ecx - movl %ecx, 432(%rsp) - fsubr %st(4), %st - fxch %st(2) - fmul %st(3), %st - fsubr %st, %st(7) - faddp %st, %st(7) - fxch %st(2) - fsub %st(6), %st - fld %st(2) - fmul %st(7), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(1) - fmul %st, %st(3) - fxch %st(7) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(1) - fxch %st(4) - fsubrp %st, %st(2) - fxch %st(3) - fsubrp %st, %st(1) - fldt 224(%rsp) - faddp %st, %st(1) - fsubp %st, %st(1) - fldt 32(%rsp) - fdivrp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 400(%rsp) - fldt 400(%rsp) - fsubr %st, %st(2) - movzwl 408(%rsp), %eax - fxch %st(1) - fadd %st, %st(2) - andl $32767, %eax - fxch %st(2) - fstpt 416(%rsp) - fldt 416(%rsp) - cmpl $383, %eax - fxch %st(2) - fstpt 16(%rsp) - fxch %st(1) - jl ..B4.148 -..B4.147: - cmpl $32383, %eax - jle ..B4.150 -..B4.148: - fstp %st(0) - fstp %st(0) - lea 400(%rsp), %rdi -..___tag_value___libm_recasinl_k80.224: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.225: -..B4.149: - fldt 400(%rsp) - fldt 416(%rsp) - movl 432(%rsp), %ecx -..B4.150: - testb $1, %cl - jne ..B4.188 -..B4.151: - lea halfs(%rip), %rax - fldt (%rax) -..B4.152: - fldt 48(%rsp) - fld %st(3) - fsqrt - lea 448(%rsp), %rdi - fmul %st, %st(1) - lea 496(%rsp), %rsi - fld %st(1) - sarl $1, %ecx - fsubr %st(1), %st - movl %ecx, 32(%rsi) - faddp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - fadd %st(0), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - fmul %st(0), %st - faddp %st, %st(1) - fxch %st(2) - fsubrp %st, %st(5) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(2) - fdivr %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt (%rsi) - fldt (%rsi) - fsubrp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rsi) -..___tag_value___libm_recasinl_k80.226: - call asinpoly -..___tag_value___libm_recasinl_k80.227: -..B4.153: - lea 16+_PIO2_K80(%rip), %rax - lea 32+_PIO2_K80(%rip), %rdx - movl 480(%rsp), %edi - xorl %ebp, %ebp - incl %edi - movl %edi, 480(%rsp) - fldt (%rax) - movzwl 8(%rax), %esi - andl $32767, %esi - movl $0, 576(%rsp) - cmpl $8383, %esi - fstpt 544(%rsp) - fldt (%rdx) - fstpt 560(%rsp) - jl ..B4.157 -..B4.154: - cmpl $24383, %esi - jg ..B4.157 -..B4.155: - movzwl 456(%rsp), %ebx - andl $32767, %ebx - cmpl $8383, %ebx - jl ..B4.157 -..B4.156: - cmpl $24383, %ebx - jle ..B4.160 -..B4.157: - lea 544(%rsp), %rdi -..___tag_value___libm_recasinl_k80.228: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.229: -..B4.158: - lea 448(%rsp), %rdi -..___tag_value___libm_recasinl_k80.230: - call __libm_normalizel_k80@PLT -..___tag_value___libm_recasinl_k80.231: -..B4.159: - movzwl 552(%rsp), %esi - movzwl 456(%rsp), %ebx - andl $32767, %esi - movl 480(%rsp), %edi - andl $32767, %ebx - movl 576(%rsp), %ebp -..B4.160: - lea (%rbp,%rsi), %edx - lea -134(%rdi,%rbx), %eax - cmpl %eax, %edx - jle ..B4.177 -..B4.161: - movl 548(%rsp), %ecx - lea 134(%rdi,%rbx), %eax - cmpl %eax, %edx - jge ..B4.178 -..B4.162: - testl %ecx, %ecx - jne ..B4.164 -..B4.163: - cmpl $0, 544(%rsp) - je ..B4.179 -..B4.164: - movl 452(%rsp), %edx - testl %edx, %edx - jne ..B4.166 -..B4.165: - cmpl $0, 448(%rsp) - je ..B4.178 -..B4.166: - cmpl %edi, %ebp - je ..B4.168 -..B4.167: - fldt 16(%rsp) - subl %edi, %ebp - fstpt (%rsp) - addl $16383, %ebp - fldt 544(%rsp) - andl $32767, %ebp - fldt 560(%rsp) - andb $127, 9(%rsp) - movzwl 8(%rsp), %eax - andl $-32768, %eax - orl %ebp, %eax - movw %ax, 8(%rsp) - movl $-2147483648, 4(%rsp) - movl $0, (%rsp) - fldt (%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt 544(%rsp) - fldt 544(%rsp) - fxch %st(2) - fmulp %st, %st(1) - movzwl 552(%rsp), %esi - movl %edi, 576(%rsp) - andl $32767, %esi - fstpt 560(%rsp) - fldt 560(%rsp) - jmp ..B4.169 -..B4.168: - fldt 544(%rsp) - fldt 560(%rsp) -..B4.169: - fldt 448(%rsp) - fld %st(2) - movl %edi, 48(%rsp) - cmpl %ebx, %esi - fsub %st(1), %st - jg ..B4.174 -..B4.170: - jne ..B4.175 -..B4.171: - movl 548(%rsp), %eax - cmpl %edx, %eax - ja ..B4.174 -..B4.172: - jne ..B4.175 -..B4.173: - movl 544(%rsp), %eax - cmpl 448(%rsp), %eax - jbe ..B4.175 -..B4.174: - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fldt 464(%rsp) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - jmp ..B4.176 -..B4.175: - fadd %st, %st(1) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fldt 464(%rsp) - fsubrp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) -..B4.176: - fld %st(0) - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - jmp ..B4.185 -..B4.177: - movl 548(%rsp), %ecx -..B4.178: - testl %ecx, %ecx - jne ..B4.180 -..B4.193: - cmpl $0, 544(%rsp) -..B4.179: - je ..B4.181 -..B4.180: - lea -16517(%rdi,%rbx), %eax - lea -16383(%rbp,%rsi), %edx - cmpl %edx, %eax - jl ..B4.182 -..B4.181: - fldt 448(%rsp) - fchs - movl %edi, 48(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fldt 464(%rsp) - fchs - fstpt 32(%rsp) - fldt 32(%rsp) - jmp ..B4.185 -..B4.182: - fldt 544(%rsp) - fldt 560(%rsp) - movaps 544(%rsp), %xmm0 - movaps 560(%rsp), %xmm1 - movaps 576(%rsp), %xmm2 - movl 576(%rsp), %edi - movaps %xmm0, 16(%rsp) - movaps %xmm1, 32(%rsp) - movaps %xmm2, 48(%rsp) - jmp ..B4.185 -..B4.183: - lea 16(%rsp), %rdi - lea 592(%rsp), %rsi -..___tag_value___libm_recasinl_k80.232: - call asinpoly -..___tag_value___libm_recasinl_k80.233: -..B4.184: - fldt 16(%rsp) - fldt 32(%rsp) - movl 48(%rsp), %edi -..B4.185: - addq $-32, %rsp - .cfi_def_cfa_offset 736 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_recasinl_k80.235: - call __libm_scalbl_k80@PLT -..___tag_value___libm_recasinl_k80.236: -..B4.192: - addq $32, %rsp - .cfi_def_cfa_offset 704 -..B4.186: - movb 9(%r15), %al - lea ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - shlq $4, %rcx - movq 640(%rsp), %rbx - xorq %rsp, %rbx - cmpq %fs:40, %rbx - fldt (%rdx,%rcx) - fmulp %st, %st(1) - jne ..B4.189 -..B4.187: - addq $648, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 704 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B4.188: - lea halfs(%rip), %rax - incl %ecx - movl %ecx, 432(%rsp) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - fstpt 400(%rsp) - fldt 400(%rsp) - fxch %st(1) - fmul %st(2), %st - fstpt 416(%rsp) - fldt 416(%rsp) - fxch %st(1) - fxch %st(2) - jmp ..B4.152 -..B4.189: - fstp %st(0) - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __libm_recasinl_k80,@function - .size __libm_recasinl_k80,.-__libm_recasinl_k80 - .data -# -- End __libm_recasinl_k80 - .section .rodata, "a" - .align 16 - .align 16 -ones: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type ones,@object - .size ones,32 - .align 16 -zeros: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type zeros,@object - .size zeros,32 - .align 16 -t32: - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x1f,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type t32,@object - .size t32,32 - .align 16 -halfs: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type halfs,@object - .size halfs,32 - .align 2 -_PIO2_K80: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 36027 - .word 64655 - .word 30161 - .word 60646 - .word 49085 - .word 0 - .word 0 - .word 0 - .type _PIO2_K80,@object - .size _PIO2_K80,48 - .align 2 -_ASIN_POLY: - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39322 - .word 39321 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28087 - .word 46811 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36409 - .word 63715 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 62186 - .word 9163 - .word 53620 - .word 46917 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 11943 - .word 18321 - .word 25215 - .word 36391 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 12527 - .word 63486 - .word 51909 - .word 58572 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 16437 - .word 53165 - .word 60799 - .word 48451 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 39560 - .word 816 - .word 43435 - .word 40940 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 47763 - .word 38463 - .word 31161 - .word 35220 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 61035 - .word 37666 - .word 58653 - .word 60832 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 4110 - .word 2419 - .word 35453 - .word 57515 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 3126 - .word 47859 - .word 6163 - .word 61068 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 56145 - .word 58008 - .word 18829 - .word 55579 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 17944 - .word 24712 - .word 25688 - .word 38195 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 27414 - .word 34244 - .word 64801 - .word 51841 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 63442 - .word 25896 - .word 35822 - .word 55851 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 37640 - .word 1996 - .word 32075 - .word 42748 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 39460 - .word 64770 - .word 43690 - .word 43690 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 48327 - .word 21484 - .word 52058 - .word 52428 - .word 49114 - .word 0 - .word 0 - .word 0 - .word 52692 - .word 45548 - .word 47571 - .word 37453 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 9214 - .word 45875 - .word 56244 - .word 56360 - .word 49110 - .word 0 - .word 0 - .word 0 - .type _ASIN_POLY,@object - .size _ASIN_POLY,352 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pi04d.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pi04d.S deleted file mode 100644 index a30dabaca8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pi04d.S +++ /dev/null @@ -1,313 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_reduce_pi04d.c" - .text -..TXTST0: -# -- Begin __libm_reduce_pi04d - .text - .align 16,0x90 - .globl __libm_reduce_pi04d -__libm_reduce_pi04d: -# parameter 1: %xmm0 -# parameter 2: %rdi -# parameter 3: %esi -..B1.1: - .cfi_startproc -..___tag_value___libm_reduce_pi04d.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movl %esi, %r8d - movsd %xmm0, (%rsp) - xorb %sil, %sil -..B1.2: - fnstcw 10(%rsp) -..B1.3: - movzwl 10(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.5: - fldcw 8(%rsp) -..B1.6: - movb $1, %sil -..B1.7: - movzwl 6(%rsp), %r10d - movl %r10d, %ecx - andl $32752, %ecx - movl $1374389535, %eax - shrl $4, %ecx - andl $-32753, %r10d - lea -1052(%rcx), %r11d - imull %r11d - sarl $31, %r11d - lea -200(%rcx), %r9d - sarl $3, %edx - andl $2047, %r9d - subl %r11d, %edx - imull $-25, %edx, %eax - shll $4, %r9d - lea -1052(%rax,%rcx), %ecx - orl %r9d, %r10d - movw %r10w, 6(%rsp) - movsd (%rsp), %xmm2 - andl $-134217728, (%rsp) - movsd (%rsp), %xmm1 - cmpl $17, %ecx - subsd %xmm1, %xmm2 - jl ..B1.9 -..B1.8: - movslq %edx, %rdx - lea _DP(%rip), %r9 - movsd (%r9,%rdx,8), %xmm7 - movsd 8(%r9,%rdx,8), %xmm0 - incl %edx - mulsd %xmm2, %xmm7 - mulsd %xmm1, %xmm0 - addsd %xmm0, %xmm7 - movsd %xmm7, (%rsp) - andl $-1048576, (%rsp) - subsd (%rsp), %xmm7 - jmp ..B1.10 -..B1.9: - lea _DP(%rip), %r9 - pxor %xmm7, %xmm7 -..B1.10: - movslq %edx, %rdx - movaps %xmm1, %xmm3 - movaps %xmm1, %xmm5 - lea zero_none(%rip), %r11 - movaps %xmm1, %xmm9 - movaps %xmm1, %xmm11 - movaps %xmm1, %xmm13 - movsd (%r9,%rdx,8), %xmm4 - movsd 8(%r9,%rdx,8), %xmm0 - mulsd %xmm2, %xmm4 - mulsd %xmm0, %xmm3 - mulsd %xmm2, %xmm0 - addsd %xmm3, %xmm4 - movsd 16(%r9,%rdx,8), %xmm8 - addsd %xmm4, %xmm7 - mulsd %xmm8, %xmm5 - mulsd %xmm2, %xmm8 - addsd %xmm5, %xmm0 - movaps %xmm7, %xmm6 - movsd 24(%r9,%rdx,8), %xmm10 - addsd %xmm0, %xmm6 - movsd %xmm6, (%rsp) - movzwl 6(%rsp), %ecx - shrl $4, %ecx - movd %xmm6, %r10 - negl %ecx - movsd 32(%r9,%rdx,8), %xmm12 - movsd 40(%r9,%rdx,8), %xmm14 - addl $51, %ecx - sarq %cl, %r10 - movl %r10d, %eax - shlq %cl, %r10 - addl %r8d, %eax - movq %r10, (%rsp) - movl %eax, %r8d - andl $1, %r8d - subsd (%rsp), %xmm7 - mulsd %xmm12, %xmm9 - mulsd %xmm2, %xmm12 - mulsd %xmm14, %xmm11 - addsd (%r11,%r8,8), %xmm7 - mulsd %xmm2, %xmm14 - addsd %xmm7, %xmm0 - addsd %xmm11, %xmm12 - movaps %xmm1, %xmm7 - testb %sil, %sil - mulsd %xmm10, %xmm7 - mulsd %xmm2, %xmm10 - addsd %xmm7, %xmm8 - addsd %xmm9, %xmm10 - addsd %xmm8, %xmm0 - movsd 48(%r9,%rdx,8), %xmm15 - addsd %xmm10, %xmm0 - mulsd %xmm15, %xmm13 - mulsd %xmm15, %xmm2 - addsd %xmm12, %xmm0 - addsd %xmm13, %xmm14 - movsd 56(%r9,%rdx,8), %xmm3 - addsd %xmm14, %xmm0 - mulsd %xmm3, %xmm1 - addsd %xmm1, %xmm2 - addsd %xmm2, %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd %xmm0, (%rdi) - je ..B1.12 -..B1.11: - fldcw 10(%rsp) -..B1.12: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __libm_reduce_pi04d,@function - .size __libm_reduce_pi04d,.-__libm_reduce_pi04d - .data -# -- End __libm_reduce_pi04d - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.0: - .long 0x54442d18,0x3fe921fb - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -zero_none: - .long 0x00000000,0x00000000 - .long 0x00000000,0xbff00000 - .type zero_none,@object - .size zero_none,16 - .align 4 -_DP: - .long 0 - .long 0 - .long 1610612736 - .long 1282694960 - .long 0 - .long 1256952721 - .long 536870912 - .long 1229269500 - .long 3221225472 - .long 1202544455 - .long 0 - .long 1176818551 - .long 2147483648 - .long 1148939346 - .long 536870912 - .long 1124701124 - .long 3758096384 - .long 1099498527 - .long 3758096384 - .long 1071929578 - .long 1342177280 - .long 1046982385 - .long 805306368 - .long 1020320658 - .long 2147483648 - .long 993817732 - .long 0 - .long 968598976 - .long 2684354560 - .long 942220475 - .long 2415919104 - .long 915426956 - .long 0 - .long 885849629 - .long 536870912 - .long 863855510 - .long 1610612736 - .long 836031391 - .long 4026531840 - .long 810828058 - .long 1073741824 - .long 784674491 - .long 1610612736 - .long 757207974 - .long 3489660928 - .long 732020890 - .long 0 - .long 703061904 - .long 1610612736 - .long 679713053 - .long 2147483648 - .long 652001705 - .long 1073741824 - .long 626850382 - .long 2147483648 - .long 597786158 - .long 805306368 - .long 575535400 - .long 536870912 - .long 548814833 - .long 268435456 - .long 523239288 - .long 3758096384 - .long 495550718 - .long 2952790016 - .long 469954840 - .long 1073741824 - .long 442925723 - .long 1073741824 - .long 416247094 - .long 3758096384 - .long 392128403 - .long 2147483648 - .long 364254062 - .long 3221225472 - .long 339643518 - .long 2684354560 - .long 313162111 - .long 805306368 - .long 286354345 - .long 2952790016 - .long 260811902 - .long 1610612736 - .long 234667567 - .long 3758096384 - .long 207520668 - .long 1073741824 - .long 182175017 - .long 4026531840 - .long 155380331 - .long 805306368 - .long 129417058 - .long 536870912 - .long 103691636 - .long 0 - .long 73760972 - .long 3221225472 - .long 48348958 - .type _DP,@object - .size _DP,392 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pi04l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pi04l.S deleted file mode 100644 index b7c70a722c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pi04l.S +++ /dev/null @@ -1,4808 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_reduce_pi04l.c" - .text -..TXTST0: -# -- Begin __libm_reduce_pi04l - .text - .align 16,0x90 - .globl __libm_reduce_pi04l -__libm_reduce_pi04l: -# parameter 1: 8 + %rsp -# parameter 2: %edi -# parameter 3: %rsi -..B1.1: - .cfi_startproc -..___tag_value___libm_reduce_pi04l.1: -..L2: - - movzwl 16(%rsp), %r8d - andl $32767, %r8d - cmpl $16413, %r8d - jge ..B1.8 -..B1.2: - fldt 8(%rsp) - lea __4onpi_d(%rip), %rax - fldl (%rax) - fmul %st(1), %st - fstpt -24(%rsp) - movzwl -16(%rsp), %ecx - negl %ecx - addl $30, %ecx - movl -20(%rsp), %eax - shrl %cl, %eax - testl %edi, %edi - jne ..B1.4 -..B1.3: - lea 1(%rax), %ecx - andl $-2, %ecx - jmp ..B1.5 -..B1.4: - movl %eax, %ecx - addl %edi, %eax - movl %eax, %edx - andl $1, %edx - addl %edx, %ecx -..B1.5: - lea _TWO_32H(%rip), %rdx - cmpl $16400, %r8d - movl %ecx, -40(%rsp) - fildl -40(%rsp) - fldl (%rdx) - jge ..B1.7 -..B1.6: - lea _pi04_3d(%rip), %rdx - lea 8+_pi04_3d(%rip), %rcx - lea 16+_pi04_3d(%rip), %rdi - fldl (%rdx) - fmul %st(2), %st - fsubrp %st, %st(3) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl (%rcx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl (%rdi) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.15 -..B1.7: - lea _pi04_5d(%rip), %rdx - lea 8+_pi04_5d(%rip), %rcx - lea 16+_pi04_5d(%rip), %rdi - lea 24+_pi04_5d(%rip), %r8 - lea 32+_pi04_5d(%rip), %r9 - fldl (%rdx) - fmul %st(2), %st - fsubrp %st, %st(3) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl (%rcx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fldl (%rdi) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl (%r8) - fmul %st(2), %st - fld %st(0) - fsubr %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fldl (%r9) - fmulp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - jmp ..B1.15 -..B1.8: - fldt 8(%rsp) - lea -16417(%r8), %r9d - movl $-2078209981, %eax - lea _SCALE(%rip), %rcx - imull %r9d - fmull (%rcx) - sarl $31, %r9d - lea -16417(%rdx,%r8), %edx - sarl $4, %edx - subl %r9d, %edx - movl %edx, %r10d - shll $5, %r10d - negl %r10d - addl %edx, %r10d - fstpt 8(%rsp) - fldt 8(%rsp) - movl $0, 8(%rsp) - fldt 8(%rsp) - lea -16417(%r10,%r8), %r8d - cmpl $17, %r8d - fsubr %st, %st(1) - jl ..B1.10 -..B1.9: - movslq %edx, %rax - incl %edx - shlq $4, %rax - lea __4onpi_31l(%rip), %r8 - fldt (%rax,%r8) - fmul %st(2), %st - fldt 16(%r8,%rax) - fmul %st(2), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt -24(%rsp) - andl $-16777216, -24(%rsp) - fldt -24(%rsp) - fsubrp %st, %st(1) - jmp ..B1.11 -..B1.10: - lea _zeros(%rip), %rax - lea __4onpi_31l(%rip), %r8 - fldl (%rax) - fld %st(0) -..B1.11: - movslq %edx, %rdx - fld %st(0) - shlq $4, %rdx - fld %st(3) - fldt (%rdx,%r8) - fmul %st(6), %st - fadd %st, %st(2) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fldt 16(%rdx,%r8) - fmul %st, %st(2) - fld %st(2) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fadd %st(3), %st - fxch %st(2) - fmul %st(5), %st - fadd %st, %st(2) - fld %st(4) - fldt 32(%rdx,%r8) - fmul %st, %st(1) - fxch %st(1) - fadd %st, %st(4) - fxch %st(4) - fstpt -24(%rsp) - movzwl -16(%rsp), %r9d - andl $32767, %r9d - cmpl $16415, %r9d - jge ..B1.13 -..B1.12: - negl %r9d - addl $30, %r9d - movl %r9d, %ecx - movl -20(%rsp), %eax - shrl %cl, %eax - movl %r9d, %ecx - shll %cl, %eax - movl %r9d, %ecx - movl %eax, -20(%rsp) - movl $0, -24(%rsp) - shrl %cl, %eax - jmp ..B1.14 -..B1.13: - negl %r9d - addl $30, %r9d - movl %r9d, %ecx - movl -24(%rsp), %r10d - shrl %cl, %r10d - movl %r9d, %ecx - shll %cl, %r10d - movl %r9d, %ecx - negl %ecx - movl -20(%rsp), %eax - shll %cl, %eax - movl %r9d, %ecx - movl %r10d, -24(%rsp) - shrl %cl, %r10d - orl %r10d, %eax -..B1.14: - fldt -24(%rsp) - addl %edi, %eax - lea zero_none(%rip), %rdi - fsubrp %st, %st(3) - fmul %st(6), %st - fld %st(4) - movl %eax, %ecx - andl $1, %ecx - fadd %st(3), %st - lea 8+_pi04_2d(%rip), %r9 - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fldl (%rdi,%rcx,8) - faddp %st, %st(3) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(4) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(3) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(2) - fldt 48(%rdx,%r8) - fmul %st, %st(1) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fxch %st(1) - fmul %st(4), %st - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(2) - fld %st(3) - fldt 64(%rdx,%r8) - fmul %st, %st(2) - fld %st(2) - fadd %st(4), %st - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fld %st(4) - fxch %st(3) - fmul %st(6), %st - fldt 80(%rdx,%r8) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(4) - fxch %st(2) - fmul %st(5), %st - fldt 96(%rdx,%r8) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(4) - fldt 112(%r8,%rdx) - lea _TWO_32H(%rip), %rdx - lea _pi04_2d(%rip), %r8 - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(2) - fadd %st(2), %st - fldl (%rdx) - fmul %st(1), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldl (%r8) - fld %st(0) - fmul %st(2), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - fmull (%r9) - faddp %st, %st(1) -..B1.15: - fld %st(1) - lea _TWO_12H(%rip), %rdx - fadd %st(1), %st - fstpt -24(%rsp) - fldt -24(%rsp) - fldl (%rdx) - fmul %st(1), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstl (%rsi) - fsubrp %st, %st(2) - faddp %st, %st(1) - fstpl 8(%rsi) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_reduce_pi04l,@function - .size __libm_reduce_pi04l,.-__libm_reduce_pi04l - .data -# -- End __libm_reduce_pi04l - .section .rodata, "a" - .align 8 - .align 8 -zero_none: - .long 0x00000000,0x00000000 - .long 0x00000000,0xbff00000 - .type zero_none,@object - .size zero_none,16 - .align 4 -__4onpi_d: - .long 1841940611 - .long 1072979760 - .type __4onpi_d,@object - .size __4onpi_d,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_pi04_3d: - .long 1413754112 - .long 1072243195 - .long 2563527040 - .long 1021855384 - .long 3417685868 - .long 3118450936 - .type _pi04_3d,@object - .size _pi04_3d,24 - .align 4 -_pi04_5d: - .long 1413480448 - .long 1072243195 - .long 442499072 - .long 1036039265 - .long 771751936 - .long 999496074 - .long 622854144 - .long 963347354 - .long 1396597664 - .long 922906692 - .type _pi04_5d,@object - .size _pi04_5d,40 - .align 4 -_SCALE: - .long 0 - .long 845152256 - .type _SCALE,@object - .size _SCALE,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_pi04_2d: - .long 1413480448 - .long 1072243195 - .long 442655537 - .long 1036039265 - .type _pi04_2d,@object - .size _pi04_2d,16 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 2 -__4onpi_31l: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33646 - .word 41721 - .word 16600 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10832 - .word 40072 - .word 16567 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44008 - .word 65043 - .word 16537 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28384 - .word 64154 - .word 16505 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38272 - .word 56162 - .word 16472 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7298 - .word 51682 - .word 16445 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45504 - .word 65320 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61204 - .word 44922 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18652 - .word 50030 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14144 - .word 59657 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37450 - .word 47105 - .word 16290 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14898 - .word 56641 - .word 16259 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34680 - .word 34623 - .word 16226 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4760 - .word 45515 - .word 16196 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41480 - .word 40187 - .word 16166 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47852 - .word 55252 - .word 16134 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54072 - .word 35081 - .word 16103 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26808 - .word 57421 - .word 16071 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20068 - .word 57232 - .word 16042 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49576 - .word 60188 - .word 16009 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10016 - .word 52861 - .word 15978 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30648 - .word 35825 - .word 15947 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60542 - .word 58528 - .word 15918 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65468 - .word 61743 - .word 15887 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64960 - .word 45825 - .word 15851 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50604 - .word 38792 - .word 15825 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18394 - .word 33435 - .word 15794 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55780 - .word 42703 - .word 15763 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14056 - .word 63841 - .word 15731 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63080 - .word 62563 - .word 15700 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20840 - .word 62207 - .word 15669 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30094 - .word 59983 - .word 15639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61818 - .word 60389 - .word 15608 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40186 - .word 40579 - .word 15577 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42170 - .word 58004 - .word 15546 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55276 - .word 39678 - .word 15514 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44672 - .word 36806 - .word 15481 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13060 - .word 34144 - .word 15452 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28016 - .word 57231 - .word 15419 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16112 - .word 44995 - .word 15390 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53464 - .word 33387 - .word 15358 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7296 - .word 60751 - .word 15325 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29452 - .word 45231 - .word 15297 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26208 - .word 49689 - .word 15266 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37900 - .word 44002 - .word 15235 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57340 - .word 33800 - .word 15204 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27544 - .word 50178 - .word 15173 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6168 - .word 40132 - .word 15142 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21392 - .word 43702 - .word 15109 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45168 - .word 54372 - .word 15081 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8986 - .word 40688 - .word 15050 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1648 - .word 53745 - .word 15018 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30520 - .word 55795 - .word 14986 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43060 - .word 32914 - .word 14956 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46172 - .word 52771 - .word 14925 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14056 - .word 45285 - .word 14893 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53590 - .word 44868 - .word 14864 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40786 - .word 35970 - .word 14833 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33436 - .word 65411 - .word 14801 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32006 - .word 61382 - .word 14771 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37856 - .word 45239 - .word 14738 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60894 - .word 49555 - .word 14709 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48064 - .word 53065 - .word 14674 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48624 - .word 54844 - .word 14647 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7988 - .word 40762 - .word 14616 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16270 - .word 58745 - .word 14585 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37064 - .word 50168 - .word 14553 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18624 - .word 63736 - .word 14519 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60758 - .word 44966 - .word 14492 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33304 - .word 47465 - .word 14461 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6226 - .word 60503 - .word 14430 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26380 - .word 54900 - .word 14398 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44352 - .word 49860 - .word 14368 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11904 - .word 42646 - .word 14337 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55296 - .word 50279 - .word 14300 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15474 - .word 50606 - .word 14275 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45062 - .word 44137 - .word 14244 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13472 - .word 36063 - .word 14210 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40658 - .word 53854 - .word 14182 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28652 - .word 43690 - .word 14151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24640 - .word 64348 - .word 14118 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30284 - .word 41980 - .word 14088 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45652 - .word 38222 - .word 14057 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15900 - .word 62940 - .word 14026 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31494 - .word 50741 - .word 13996 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43194 - .word 55096 - .word 13965 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1740 - .word 45646 - .word 13933 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28936 - .word 44150 - .word 13903 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8996 - .word 42955 - .word 13872 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44096 - .word 61205 - .word 13839 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44614 - .word 54550 - .word 13810 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24926 - .word 57347 - .word 13779 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3312 - .word 61415 - .word 13745 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64336 - .word 63884 - .word 13717 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2748 - .word 62259 - .word 13685 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56672 - .word 51775 - .word 13653 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32438 - .word 55423 - .word 13624 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17652 - .word 45713 - .word 13593 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65408 - .word 51586 - .word 13558 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40416 - .word 55736 - .word 13531 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52546 - .word 37734 - .word 13500 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48880 - .word 64238 - .word 13469 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56004 - .word 46833 - .word 13437 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61760 - .word 38110 - .word 13405 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41496 - .word 35659 - .word 13374 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25472 - .word 41269 - .word 13342 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45444 - .word 36018 - .word 13314 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6510 - .word 56417 - .word 13283 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3072 - .word 56837 - .word 13252 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61338 - .word 48440 - .word 13221 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49568 - .word 57088 - .word 13189 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4240 - .word 39283 - .word 13157 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18562 - .word 33537 - .word 13128 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31422 - .word 44487 - .word 13097 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31930 - .word 60459 - .word 13066 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42272 - .word 36641 - .word 13033 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28940 - .word 36150 - .word 13004 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21010 - .word 50925 - .word 12973 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29448 - .word 64886 - .word 12941 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20500 - .word 54600 - .word 12911 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54258 - .word 46233 - .word 12880 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32628 - .word 42502 - .word 12848 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61608 - .word 55072 - .word 12818 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6236 - .word 57871 - .word 12786 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42408 - .word 34616 - .word 12756 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56692 - .word 51963 - .word 12724 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39094 - .word 48526 - .word 12694 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59870 - .word 38783 - .word 12663 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26560 - .word 33165 - .word 12632 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58666 - .word 37666 - .word 12601 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58728 - .word 39788 - .word 12569 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9048 - .word 43530 - .word 12538 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58496 - .word 57659 - .word 12505 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12324 - .word 37025 - .word 12477 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38432 - .word 55856 - .word 12445 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35210 - .word 45960 - .word 12415 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45644 - .word 51345 - .word 12384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32854 - .word 63883 - .word 12353 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29348 - .word 41450 - .word 12321 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27384 - .word 38024 - .word 12289 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57356 - .word 57291 - .word 12260 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61164 - .word 51521 - .word 12228 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21472 - .word 59151 - .word 12196 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36704 - .word 39943 - .word 12165 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45864 - .word 50151 - .word 12136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37892 - .word 63687 - .word 12104 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14560 - .word 51615 - .word 12073 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38776 - .word 55684 - .word 12041 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59136 - .word 53570 - .word 12010 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55556 - .word 37955 - .word 11981 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54458 - .word 44670 - .word 11950 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36446 - .word 34084 - .word 11919 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46416 - .word 51693 - .word 11886 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21432 - .word 34376 - .word 11857 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56036 - .word 34809 - .word 11826 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10562 - .word 55654 - .word 11795 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20264 - .word 53052 - .word 11763 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64064 - .word 50415 - .word 11729 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17444 - .word 48295 - .word 11701 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11874 - .word 52677 - .word 11671 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60808 - .word 39275 - .word 11640 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31792 - .word 55677 - .word 11606 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60710 - .word 49006 - .word 11578 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10520 - .word 37403 - .word 11546 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20004 - .word 59470 - .word 11515 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28096 - .word 37612 - .word 11485 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20268 - .word 44280 - .word 11453 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50740 - .word 61588 - .word 11422 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56432 - .word 58835 - .word 11390 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8576 - .word 42496 - .word 11355 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33920 - .word 54912 - .word 11324 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35620 - .word 54843 - .word 11298 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 736 - .word 43591 - .word 11264 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39632 - .word 61060 - .word 11235 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63452 - .word 63129 - .word 11206 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56798 - .word 58512 - .word 11175 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13472 - .word 46333 - .word 11141 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37300 - .word 36598 - .word 11112 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41952 - .word 41639 - .word 11079 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52452 - .word 33459 - .word 11050 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58558 - .word 33287 - .word 11020 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7570 - .word 43843 - .word 10989 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59416 - .word 63990 - .word 10957 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65298 - .word 47744 - .word 10927 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21076 - .word 34089 - .word 10896 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7048 - .word 57394 - .word 10865 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12872 - .word 55405 - .word 10832 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12608 - .word 51669 - .word 10798 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5350 - .word 48455 - .word 10772 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23568 - .word 58692 - .word 10740 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40784 - .word 37046 - .word 10708 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38992 - .word 43861 - .word 10678 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10064 - .word 40199 - .word 10648 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26368 - .word 35771 - .word 10611 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23994 - .word 60721 - .word 10586 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25052 - .word 34302 - .word 10554 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39842 - .word 54964 - .word 10524 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11568 - .word 58277 - .word 10491 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26160 - .word 46438 - .word 10461 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23252 - .word 43049 - .word 10431 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35288 - .word 58000 - .word 10400 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14614 - .word 50216 - .word 10369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1168 - .word 48804 - .word 10336 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60934 - .word 33006 - .word 10307 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64512 - .word 62247 - .word 10272 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59968 - .word 43121 - .word 10240 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25560 - .word 39974 - .word 10212 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1978 - .word 49353 - .word 10183 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16290 - .word 38807 - .word 10152 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8646 - .word 65226 - .word 10121 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56896 - .word 34317 - .word 10088 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40136 - .word 39118 - .word 10057 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14200 - .word 41756 - .word 10026 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59256 - .word 63202 - .word 9995 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 22968 - .word 63553 - .word 9965 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 736 - .word 44292 - .word 9933 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23186 - .word 37760 - .word 9904 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51008 - .word 34950 - .word 9869 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1664 - .word 64248 - .word 9836 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64352 - .word 35199 - .word 9811 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34656 - .word 63747 - .word 9780 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44330 - .word 49864 - .word 9749 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11654 - .word 35567 - .word 9718 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7924 - .word 58919 - .word 9686 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2532 - .word 32800 - .word 9655 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30024 - .word 53799 - .word 9624 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30172 - .word 64347 - .word 9593 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60036 - .word 51382 - .word 9562 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58576 - .word 33093 - .word 9531 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13888 - .word 38760 - .word 9500 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9322 - .word 52460 - .word 9470 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20944 - .word 41077 - .word 9437 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17976 - .word 41861 - .word 9407 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55176 - .word 55158 - .word 9377 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4976 - .word 35223 - .word 9346 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7816 - .word 39783 - .word 9314 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27656 - .word 55669 - .word 9284 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64944 - .word 53184 - .word 9250 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12544 - .word 49190 - .word 9222 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50612 - .word 44644 - .word 9190 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8832 - .word 63111 - .word 9155 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11744 - .word 36870 - .word 9129 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9404 - .word 63025 - .word 9098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47316 - .word 43381 - .word 9067 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55716 - .word 47433 - .word 9035 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46414 - .word 48441 - .word 9005 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19116 - .word 39506 - .word 8974 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48060 - .word 53381 - .word 8943 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57112 - .word 50739 - .word 8911 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5840 - .word 60581 - .word 8879 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62112 - .word 57199 - .word 8846 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35908 - .word 59499 - .word 8818 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13760 - .word 48116 - .word 8787 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3136 - .word 56059 - .word 8752 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37596 - .word 39221 - .word 8726 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3232 - .word 48550 - .word 8691 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 22872 - .word 42749 - .word 8662 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41948 - .word 40319 - .word 8633 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31196 - .word 64693 - .word 8601 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62052 - .word 52923 - .word 8571 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2750 - .word 33544 - .word 8540 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12462 - .word 46179 - .word 8509 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25128 - .word 45120 - .word 8476 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51634 - .word 62523 - .word 8447 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15758 - .word 42163 - .word 8416 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34022 - .word 36267 - .word 8385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41252 - .word 39796 - .word 8353 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49782 - .word 54423 - .word 8323 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25428 - .word 42086 - .word 8291 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34388 - .word 44810 - .word 8260 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7456 - .word 64092 - .word 8228 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48336 - .word 62448 - .word 8196 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60912 - .word 61622 - .word 8167 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17852 - .word 37250 - .word 8137 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57940 - .word 56453 - .word 8106 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47256 - .word 59825 - .word 8074 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3774 - .word 59120 - .word 8044 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43448 - .word 62852 - .word 8012 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4840 - .word 57195 - .word 7982 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40862 - .word 52565 - .word 7951 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1440 - .word 60474 - .word 7919 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55520 - .word 38648 - .word 7889 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15316 - .word 52422 - .word 7857 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18704 - .word 47227 - .word 7827 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48892 - .word 54283 - .word 7795 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12670 - .word 41990 - .word 7765 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27570 - .word 49842 - .word 7734 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47230 - .word 47992 - .word 7703 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41020 - .word 56253 - .word 7671 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23404 - .word 58312 - .word 7641 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35176 - .word 51854 - .word 7610 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49188 - .word 59051 - .word 7578 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16656 - .word 54507 - .word 7546 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41320 - .word 48565 - .word 7517 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 302 - .word 42490 - .word 7486 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26680 - .word 39967 - .word 7454 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41304 - .word 43638 - .word 7424 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2314 - .word 48533 - .word 7393 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63294 - .word 35693 - .word 7362 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24538 - .word 48319 - .word 7331 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56296 - .word 47263 - .word 7300 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 38599 - .word 7268 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6594 - .word 62116 - .word 7238 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47104 - .word 63573 - .word 7198 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34812 - .word 34303 - .word 7176 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5144 - .word 33695 - .word 7145 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24966 - .word 55768 - .word 7114 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62720 - .word 43946 - .word 7078 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31542 - .word 56062 - .word 7052 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62356 - .word 59096 - .word 7020 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28412 - .word 40533 - .word 6990 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24080 - .word 50467 - .word 6958 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33296 - .word 46841 - .word 6925 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39600 - .word 38627 - .word 6897 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14436 - .word 37607 - .word 6865 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39032 - .word 56421 - .word 6833 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64032 - .word 54987 - .word 6804 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27648 - .word 42212 - .word 6768 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43840 - .word 46107 - .word 6739 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17316 - .word 36574 - .word 6711 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8928 - .word 37652 - .word 6677 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24944 - .word 47433 - .word 6648 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27392 - .word 57430 - .word 6616 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39848 - .word 43340 - .word 6585 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64160 - .word 43542 - .word 6555 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35226 - .word 63015 - .word 6525 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40736 - .word 64368 - .word 6493 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42168 - .word 49526 - .word 6462 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45596 - .word 34243 - .word 6432 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20690 - .word 39705 - .word 6401 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54448 - .word 46856 - .word 6368 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64392 - .word 62736 - .word 6337 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12780 - .word 56461 - .word 6307 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15360 - .word 49145 - .word 6277 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20512 - .word 49931 - .word 6242 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54512 - .word 55820 - .word 6212 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8402 - .word 39333 - .word 6184 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34094 - .word 53593 - .word 6153 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31960 - .word 38817 - .word 6121 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16954 - .word 39291 - .word 6091 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49600 - .word 48765 - .word 6056 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59580 - .word 56541 - .word 6029 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35624 - .word 44550 - .word 5998 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4142 - .word 47316 - .word 5967 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43520 - .word 43612 - .word 5935 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20976 - .word 40896 - .word 5902 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63576 - .word 57729 - .word 5874 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37288 - .word 33122 - .word 5843 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24384 - .word 52079 - .word 5809 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47952 - .word 58719 - .word 5779 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44242 - .word 55445 - .word 5750 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61232 - .word 38847 - .word 5716 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 46039 - .word 5683 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13396 - .word 42933 - .word 5657 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27392 - .word 43305 - .word 5622 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40708 - .word 35319 - .word 5595 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44408 - .word 55685 - .word 5564 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42090 - .word 44607 - .word 5533 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25504 - .word 53466 - .word 5500 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24208 - .word 33149 - .word 5470 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5268 - .word 45375 - .word 5440 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 144 - .word 40000 - .word 5409 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56688 - .word 52358 - .word 5376 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25848 - .word 56175 - .word 5345 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57900 - .word 44055 - .word 5315 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24800 - .word 43437 - .word 5283 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17984 - .word 54872 - .word 5249 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25744 - .word 41345 - .word 5223 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7668 - .word 43682 - .word 5191 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47434 - .word 36705 - .word 5161 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20888 - .word 40323 - .word 5129 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3962 - .word 43032 - .word 5099 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50270 - .word 49260 - .word 5068 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20160 - .word 64041 - .word 5032 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25624 - .word 36013 - .word 5004 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48328 - .word 59345 - .word 4975 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51508 - .word 63920 - .word 4943 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27872 - .word 39135 - .word 4913 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13590 - .word 58857 - .word 4882 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50880 - .word 61323 - .word 4847 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44802 - .word 37181 - .word 4820 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53808 - .word 57813 - .word 4789 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64424 - .word 49714 - .word 4757 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31652 - .word 44011 - .word 4727 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28252 - .word 50834 - .word 4696 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30370 - .word 38742 - .word 4665 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57728 - .word 58403 - .word 4628 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35900 - .word 37112 - .word 4603 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40764 - .word 40914 - .word 4572 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21472 - .word 46910 - .word 4541 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17854 - .word 35030 - .word 4510 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4378 - .word 35776 - .word 4479 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57962 - .word 55295 - .word 4448 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64352 - .word 56717 - .word 4415 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37744 - .word 49416 - .word 4384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38484 - .word 35759 - .word 4355 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55020 - .word 54969 - .word 4324 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9188 - .word 55223 - .word 4292 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6822 - .word 43079 - .word 4262 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48870 - .word 40943 - .word 4231 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9936 - .word 42731 - .word 4198 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23430 - .word 43136 - .word 4169 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4700 - .word 55665 - .word 4137 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8056 - .word 40216 - .word 4106 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3716 - .word 45403 - .word 4075 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53440 - .word 49488 - .word 4044 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41776 - .word 50188 - .word 4013 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20994 - .word 64556 - .word 3983 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16252 - .word 60661 - .word 3951 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61252 - .word 65021 - .word 3920 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16236 - .word 43803 - .word 3889 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63064 - .word 35308 - .word 3857 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49096 - .word 39848 - .word 3828 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15680 - .word 48673 - .word 3797 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48068 - .word 50957 - .word 3766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20824 - .word 56086 - .word 3734 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46504 - .word 43224 - .word 3704 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52428 - .word 46094 - .word 3672 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17548 - .word 52066 - .word 3642 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61738 - .word 35565 - .word 3611 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31184 - .word 50588 - .word 3579 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1716 - .word 52681 - .word 3549 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44656 - .word 43385 - .word 3518 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12668 - .word 43259 - .word 3486 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24544 - .word 35408 - .word 3453 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28854 - .word 65018 - .word 3425 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5696 - .word 40391 - .word 3393 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39580 - .word 56400 - .word 3363 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20428 - .word 39579 - .word 3332 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32328 - .word 36727 - .word 3301 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34020 - .word 54457 - .word 3270 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34016 - .word 48400 - .word 3238 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6922 - .word 51417 - .word 3208 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27208 - .word 64641 - .word 3176 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1802 - .word 48886 - .word 3146 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35440 - .word 61590 - .word 3115 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60610 - .word 51604 - .word 3084 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5440 - .word 38199 - .word 3050 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6914 - .word 43867 - .word 3022 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24000 - .word 45256 - .word 2989 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51496 - .word 57396 - .word 2959 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11538 - .word 46256 - .word 2929 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36802 - .word 48020 - .word 2898 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57910 - .word 57903 - .word 2867 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47484 - .word 48798 - .word 2835 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57766 - .word 57709 - .word 2805 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54064 - .word 47856 - .word 2774 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49340 - .word 48080 - .word 2743 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36454 - .word 56731 - .word 2712 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51548 - .word 63385 - .word 2681 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56000 - .word 48716 - .word 2645 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44992 - .word 50040 - .word 2615 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43136 - .word 58177 - .word 2585 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49730 - .word 33270 - .word 2557 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29808 - .word 51063 - .word 2526 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25276 - .word 46724 - .word 2494 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17324 - .word 35928 - .word 2463 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52284 - .word 63916 - .word 2433 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5414 - .word 46704 - .word 2402 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51710 - .word 57168 - .word 2371 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27366 - .word 49253 - .word 2340 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45332 - .word 53033 - .word 2309 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54152 - .word 37418 - .word 2276 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53076 - .word 47398 - .word 2247 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14374 - .word 59477 - .word 2216 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59336 - .word 33435 - .word 2184 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21612 - .word 43267 - .word 2154 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34664 - .word 39372 - .word 2121 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 172 - .word 62761 - .word 2091 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9816 - .word 40715 - .word 2060 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65116 - .word 40481 - .word 2030 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28066 - .word 39184 - .word 1999 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37408 - .word 63923 - .word 1968 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15760 - .word 42305 - .word 1937 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 59340 - .word 1905 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43258 - .word 59402 - .word 1875 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19988 - .word 50087 - .word 1844 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63456 - .word 47833 - .word 1810 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65184 - .word 61426 - .word 1781 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52982 - .word 48456 - .word 1751 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30020 - .word 62809 - .word 1719 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9096 - .word 63061 - .word 1688 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59648 - .word 44374 - .word 1654 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11456 - .word 33847 - .word 1625 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12392 - .word 50500 - .word 1595 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56432 - .word 59196 - .word 1563 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61008 - .word 40265 - .word 1532 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37842 - .word 33270 - .word 1503 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37916 - .word 44543 - .word 1471 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11490 - .word 36421 - .word 1441 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19040 - .word 38397 - .word 1409 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31224 - .word 47162 - .word 1379 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52056 - .word 41461 - .word 1347 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10810 - .word 56374 - .word 1317 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5358 - .word 35086 - .word 1286 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36640 - .word 50226 - .word 1251 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33856 - .word 45597 - .word 1222 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21552 - .word 63128 - .word 1191 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1198 - .word 35616 - .word 1162 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1232 - .word 59506 - .word 1131 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51086 - .word 34963 - .word 1100 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3960 - .word 39061 - .word 1067 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4564 - .word 57134 - .word 1037 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59468 - .word 35285 - .word 1007 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63422 - .word 35431 - .word 976 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38352 - .word 51462 - .word 945 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25806 - .word 55660 - .word 914 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38842 - .word 41327 - .word 883 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17980 - .word 50458 - .word 852 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61194 - .word 59710 - .word 821 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21098 - .word 42086 - .word 790 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16704 - .word 43341 - .word 757 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46316 - .word 52840 - .word 728 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20386 - .word 33936 - .word 697 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20064 - .word 51864 - .word 664 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2268 - .word 57500 - .word 634 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11152 - .word 51171 - .word 604 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23164 - .word 63727 - .word 572 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20514 - .word 40280 - .word 542 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21818 - .word 57922 - .word 511 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32366 - .word 46413 - .word 480 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53972 - .word 43148 - .word 449 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30134 - .word 65133 - .word 418 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15282 - .word 61516 - .word 387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49872 - .word 49222 - .word 355 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9484 - .word 63958 - .word 325 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47028 - .word 35341 - .word 294 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6770 - .word 58613 - .word 263 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33372 - .word 43448 - .word 232 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27792 - .word 51629 - .word 198 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19712 - .word 53691 - .word 170 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42144 - .word 60929 - .word 135 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35240 - .word 48799 - .word 107 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 910 - .word 51212 - .word 77 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65062 - .word 33668 - .word 46 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52624 - .word 51799 - .word 14 - .word 0 - .word 0 - .word 0 - .type __4onpi_31l,@object - .size __4onpi_31l,8592 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pio2.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pio2.S deleted file mode 100644 index 644bf3a434..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_reduce_pio2.S +++ /dev/null @@ -1,543 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_reduce_pio2.c" - .text -..TXTST0: -# -- Begin __libm_reduce_pio2d - .text - .align 16,0x90 - .globl __libm_reduce_pio2d -__libm_reduce_pio2d: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_reduce_pio2d.1: -..L2: - - movq %rdi, %r9 - movsd %xmm0, -8(%rsp) - movzbl -1(%rsp), %eax - movl %eax, %r8d - andl $127, %eax - andl $128, %r8d - movb %al, -1(%rsp) - movzwl -2(%rsp), %eax - movl %eax, %edx - andl $32752, %edx - shrl $4, %edx - shrl $7, %r8d - cmpl $1053, %edx - jge ..B1.9 -..B1.2: - lea _PI04_INV(%rip), %rax - movsd -8(%rsp), %xmm0 - movsd (%rax), %xmm1 - mulsd %xmm0, %xmm1 - movsd %xmm1, -16(%rsp) - movzwl -10(%rsp), %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $1023, %ecx - jl ..B1.4 -..B1.3: - movl -12(%rsp), %esi - negl %ecx - orl $-1048576, %esi - addl $30, %ecx - movl -16(%rsp), %eax - shll $11, %esi - shrl $21, %eax - orl %eax, %esi - shrl %cl, %esi - jmp ..B1.5 -..B1.4: - xorl %esi, %esi -..B1.5: - movl %esi, %ecx - lea (%r8,%r8), %eax - andl $1, %ecx - negl %eax - addl %esi, %ecx - incl %esi - shrl $1, %esi - incl %eax - imull %esi, %eax - pxor %xmm7, %xmm7 - cvtsi2sd %ecx, %xmm7 - andl $3, %eax - cmpl $1046, %edx - jge ..B1.7 -..B1.6: - lea _PI04_29x4(%rip), %rdx - lea 8+_PI04_29x4(%rip), %rcx - lea 16+_PI04_29x4(%rip), %rsi - lea 24+_PI04_29x4(%rip), %rdi - movsd (%rdx), %xmm1 - mulsd %xmm7, %xmm1 - movsd (%rcx), %xmm2 - subsd %xmm1, %xmm0 - mulsd %xmm7, %xmm2 - movaps %xmm0, %xmm4 - movsd (%rsi), %xmm3 - subsd %xmm2, %xmm4 - mulsd %xmm7, %xmm3 - subsd %xmm4, %xmm0 - movsd (%rdi), %xmm5 - subsd %xmm2, %xmm0 - mulsd %xmm5, %xmm7 - movaps %xmm4, %xmm2 - subsd %xmm3, %xmm2 - subsd %xmm2, %xmm4 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm0 - subsd %xmm7, %xmm0 - jmp ..B1.8 -..B1.7: - lea _PI04_21x5(%rip), %rdx - lea 8+_PI04_21x5(%rip), %rcx - lea 16+_PI04_21x5(%rip), %rsi - lea 24+_PI04_21x5(%rip), %rdi - lea 32+_PI04_21x5(%rip), %r10 - movsd (%rdx), %xmm1 - movsd (%rcx), %xmm2 - mulsd %xmm7, %xmm1 - mulsd %xmm7, %xmm2 - subsd %xmm1, %xmm0 - movaps %xmm0, %xmm4 - movsd (%rsi), %xmm3 - subsd %xmm2, %xmm4 - mulsd %xmm7, %xmm3 - subsd %xmm4, %xmm0 - movaps %xmm4, %xmm8 - subsd %xmm2, %xmm0 - subsd %xmm3, %xmm8 - movaps %xmm8, %xmm5 - subsd %xmm8, %xmm4 - movsd (%r10), %xmm6 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm0 - addsd %xmm0, %xmm5 - movaps %xmm5, %xmm2 - subsd %xmm5, %xmm8 - addsd %xmm0, %xmm8 - movsd (%rdi), %xmm0 - mulsd %xmm7, %xmm0 - mulsd %xmm6, %xmm7 - subsd %xmm0, %xmm2 - subsd %xmm2, %xmm5 - subsd %xmm0, %xmm5 - addsd %xmm5, %xmm8 - subsd %xmm7, %xmm8 - movaps %xmm8, %xmm0 -..B1.8: - movl %r8d, %r8d - lea _ones(%rip), %rdx - movsd (%rdx,%r8,8), %xmm1 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm0 - movaps %xmm2, %xmm3 - addsd %xmm0, %xmm3 - movsd %xmm3, (%r9) - subsd %xmm3, %xmm2 - addsd %xmm0, %xmm2 - movsd %xmm2, 8(%r9) - ret -..B1.9: - andl $-32753, %eax - lea -200(%rdx), %r10d - andl $2047, %r10d - shll $4, %r10d - orl %r10d, %eax - movw %ax, -2(%rsp) - lea -1052(%rdx), %eax - imull $83886, %eax, %edi - movsd -8(%rsp), %xmm2 - movsd %xmm2, -24(%rsp) - sarl $21, %edi - movslq %edi, %rdi - imull $-25, %edi, %esi - movl -8(%rsp), %r11d - lea -1052(%rsi,%rdx), %ecx - andl $-134217728, %r11d - lea _DP(%rip), %rsi - movl %r11d, -24(%rsp) - negl %ecx - movsd -24(%rsp), %xmm1 - addl $38, %ecx - movaps %xmm1, %xmm3 - movq $-1, %rdx - movsd (%rsi,%rdi,8), %xmm0 - movaps %xmm1, %xmm7 - movsd 8(%rsi,%rdi,8), %xmm5 - movaps %xmm1, %xmm14 - mulsd %xmm5, %xmm3 - subsd %xmm1, %xmm2 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - movaps %xmm0, %xmm6 - shlq %cl, %rdx - addsd %xmm3, %xmm6 - movaps %xmm6, %xmm4 - subsd %xmm6, %xmm0 - movsd 16(%rsi,%rdi,8), %xmm12 - addsd %xmm3, %xmm0 - mulsd %xmm12, %xmm7 - mulsd %xmm2, %xmm12 - addsd %xmm0, %xmm4 - movd %xmm4, %r10 - movsd 24(%rsi,%rdi,8), %xmm3 - mulsd %xmm3, %xmm14 - mulsd %xmm2, %xmm3 - andq %rdx, %r10 - movq %r10, -16(%rsp) - subsd -16(%rsp), %xmm6 - movaps %xmm6, %xmm8 - addsd %xmm5, %xmm8 - movaps %xmm8, %xmm10 - subsd %xmm8, %xmm6 - addsd %xmm7, %xmm10 - addsd %xmm5, %xmm6 - subsd %xmm10, %xmm8 - addsd %xmm6, %xmm0 - addsd %xmm7, %xmm8 - movaps %xmm10, %xmm9 - movaps %xmm1, %xmm5 - movsd 32(%rsi,%rdi,8), %xmm7 - addsd %xmm8, %xmm0 - mulsd %xmm7, %xmm5 - mulsd %xmm2, %xmm7 - addsd %xmm0, %xmm9 - movaps %xmm0, %xmm13 - addsd %xmm12, %xmm9 - addsd %xmm14, %xmm9 - movsd %xmm9, -16(%rsp) - movzwl -10(%rsp), %ecx - shrl $4, %ecx - movd %xmm9, %rax - negl %ecx - movaps %xmm1, %xmm9 - addl $51, %ecx - sarq %cl, %rax - movl %eax, %edx - shlq %cl, %rax - movl %edx, %r11d - movq %rax, -16(%rsp) - lea _zero_none(%rip), %rax - andl $1, %r11d - incl %edx - shrl $1, %edx - lea _PI04_25x2(%rip), %rcx - subsd -16(%rsp), %xmm10 - movsd (%rax,%r11,8), %xmm11 - lea (%r8,%r8), %eax - negl %eax - addsd %xmm10, %xmm13 - incl %eax - subsd %xmm13, %xmm10 - imull %edx, %eax - addsd %xmm11, %xmm13 - addsd %xmm10, %xmm0 - movaps %xmm13, %xmm15 - movaps %xmm1, %xmm11 - lea _TWO_26H(%rip), %rdx - andl $3, %eax - addsd %xmm12, %xmm15 - movaps %xmm15, %xmm4 - subsd %xmm15, %xmm13 - addsd %xmm14, %xmm4 - addsd %xmm12, %xmm13 - subsd %xmm4, %xmm15 - addsd %xmm13, %xmm0 - addsd %xmm14, %xmm15 - movaps %xmm4, %xmm6 - movaps %xmm1, %xmm14 - movsd 40(%rsi,%rdi,8), %xmm12 - addsd %xmm3, %xmm6 - mulsd %xmm12, %xmm9 - addsd %xmm15, %xmm0 - mulsd %xmm2, %xmm12 - subsd %xmm6, %xmm4 - movaps %xmm6, %xmm8 - addsd %xmm3, %xmm4 - addsd %xmm5, %xmm8 - addsd %xmm4, %xmm0 - subsd %xmm8, %xmm6 - movaps %xmm8, %xmm10 - addsd %xmm5, %xmm6 - addsd %xmm7, %xmm10 - addsd %xmm6, %xmm0 - subsd %xmm10, %xmm8 - movsd 48(%rsi,%rdi,8), %xmm3 - movaps %xmm10, %xmm13 - mulsd %xmm3, %xmm11 - addsd %xmm9, %xmm13 - addsd %xmm7, %xmm8 - mulsd %xmm2, %xmm3 - addsd %xmm11, %xmm12 - subsd %xmm13, %xmm10 - addsd %xmm8, %xmm0 - addsd %xmm9, %xmm10 - movsd 56(%rsi,%rdi,8), %xmm15 - movaps %xmm13, %xmm4 - mulsd %xmm15, %xmm14 - addsd %xmm12, %xmm4 - addsd %xmm10, %xmm0 - mulsd %xmm15, %xmm2 - addsd %xmm14, %xmm3 - subsd %xmm4, %xmm13 - movaps %xmm4, %xmm5 - addsd %xmm12, %xmm13 - addsd %xmm3, %xmm5 - addsd %xmm13, %xmm0 - subsd %xmm5, %xmm4 - addsd %xmm3, %xmm4 - movsd 64(%rsi,%rdi,8), %xmm3 - mulsd %xmm3, %xmm1 - addsd %xmm4, %xmm0 - addsd %xmm1, %xmm2 - movaps %xmm2, %xmm3 - lea 8+_PI04_25x2(%rip), %rsi - movsd (%rdx), %xmm1 - lea _ones(%rip), %rdx - addsd %xmm5, %xmm3 - mulsd %xmm3, %xmm1 - addsd %xmm1, %xmm3 - subsd %xmm1, %xmm3 - subsd %xmm3, %xmm5 - addsd %xmm2, %xmm5 - movsd (%rcx), %xmm2 - addsd %xmm5, %xmm0 - movaps %xmm0, %xmm1 - addsd %xmm3, %xmm0 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm3 - mulsd (%rsi), %xmm0 - addsd %xmm0, %xmm1 - movaps %xmm1, %xmm0 - addsd %xmm3, %xmm0 - subsd %xmm0, %xmm3 - addsd %xmm1, %xmm3 - movsd (%rdx,%r8,8), %xmm1 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm3 - movsd %xmm0, (%r9) - movsd %xmm3, 8(%r9) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_reduce_pio2d,@function - .size __libm_reduce_pio2d,.-__libm_reduce_pio2d - .data -# -- End __libm_reduce_pio2d - .section .rodata, "a" - .align 16 - .align 16 -_PI04_INV: - .long 1841940611 - .long 1072979760 - .type _PI04_INV,@object - .size _PI04_INV,8 - .space 8, 0x00 # pad - .align 16 -_PI04_29x4: - .long 1409286144 - .long 1072243195 - .long 301989888 - .long 1040255814 - .long 1006632960 - .long 3156637299 - .long 2207917344 - .long 979464219 - .type _PI04_29x4,@object - .size _PI04_29x4,32 - .align 16 -_PI04_21x5: - .long 0 - .long 1072243194 - .long 0 - .long 1051018307 - .long 0 - .long 3174514122 - .long 0 - .long 3153310618 - .long 3773204808 - .long 981752838 - .type _PI04_21x5,@object - .size _PI04_21x5,40 - .space 8, 0x00 # pad - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_DP: - .long 0 - .long 0 - .long 1610612736 - .long 1282694960 - .long 0 - .long 1256952721 - .long 536870912 - .long 1229269500 - .long 3221225472 - .long 1202544455 - .long 0 - .long 1176818551 - .long 2147483648 - .long 1148939346 - .long 536870912 - .long 1124701124 - .long 3758096384 - .long 1099498527 - .long 3758096384 - .long 1071929578 - .long 1342177280 - .long 1046982385 - .long 805306368 - .long 1020320658 - .long 2147483648 - .long 993817732 - .long 0 - .long 968598976 - .long 2684354560 - .long 942220475 - .long 2415919104 - .long 915426956 - .long 0 - .long 885849629 - .long 536870912 - .long 863855510 - .long 1610612736 - .long 836031391 - .long 4026531840 - .long 810828058 - .long 1073741824 - .long 784674491 - .long 1610612736 - .long 757207974 - .long 3489660928 - .long 732020890 - .long 0 - .long 703061904 - .long 1610612736 - .long 679713053 - .long 2147483648 - .long 652001705 - .long 1073741824 - .long 626850382 - .long 2147483648 - .long 597786158 - .long 805306368 - .long 575535400 - .long 536870912 - .long 548814833 - .long 268435456 - .long 523239288 - .long 3758096384 - .long 495550718 - .long 2952790016 - .long 469954840 - .long 1073741824 - .long 442925723 - .long 1073741824 - .long 416247094 - .long 3758096384 - .long 392128403 - .long 2147483648 - .long 364254062 - .long 3221225472 - .long 339643518 - .long 2684354560 - .long 313162111 - .long 805306368 - .long 286354345 - .long 2952790016 - .long 260811902 - .long 1610612736 - .long 234667567 - .long 3758096384 - .long 207520668 - .long 1073741824 - .long 182175017 - .long 4026531840 - .long 155380331 - .long 805306368 - .long 129417058 - .long 536870912 - .long 103691636 - .long 0 - .long 73760972 - .long 3221225472 - .long 48348958 - .long 536870912 - .long 23784188 - .type _DP,@object - .size _DP,400 - .align 16 -_zero_none: - .long 0 - .long 0 - .long 0 - .long 3220176896 - .type _zero_none,@object - .size _zero_none,16 - .align 16 -_PI04_25x2: - .long 1073741824 - .long 1072243195 - .long 407279769 - .long 1046758445 - .type _PI04_25x2,@object - .size _PI04_25x2,16 - .align 16 -_TWO_26H: - .long 0 - .long 1100480512 - .type _TWO_26H,@object - .size _TWO_26H,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_scalbl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_scalbl_k80.S deleted file mode 100644 index b06884bd1c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_scalbl_k80.S +++ /dev/null @@ -1,247 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_scalbl_k80.c" - .text -..TXTST0: -# -- Begin __libm_scalbl_k80 - .text - .align 16,0x90 - .globl __libm_scalbl_k80 -__libm_scalbl_k80: -# parameter 1: 8 + %rsp -# parameter 2: 24 + %rsp -# parameter 3: %edi -..B1.1: - .cfi_startproc -..___tag_value___libm_scalbl_k80.1: -..L2: - - fldt 24(%rsp) - fldt 8(%rsp) - fld %st(0) - cmpq $0, 8(%rsp) - fadd %st(2), %st - jne ..B1.3 -..B1.2: - fstp %st(2) - fstp %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - ret -..B1.3: - movzwl 16(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.2 -..B1.4: - fstpt -24(%rsp) - fldt -24(%rsp) - movzwl -16(%rsp), %ecx - movl %ecx, %eax - andl $32767, %eax - lea -1(%rdi,%rax), %edx - cmpl $32765, %edx - lea (%rdi,%rax), %esi - ja ..B1.6 -..B1.5: - fstp %st(1) - fstp %st(1) - fstp %st(0) - andl $-32768, %ecx - andl $32767, %esi - orl %esi, %ecx - movw %cx, -16(%rsp) - fldt -24(%rsp) - ret -..B1.6: - cmpl $32766, %esi - jle ..B1.8 -..B1.7: - fstp %st(2) - fstp %st(1) - lea _CONSTANTS(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fmulp %st, %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - ret -..B1.8: - lea 16+_CONSTANTS(%rip), %rax - cmpl $-63, %esi - fldt (%rax) - jge ..B1.10 -..B1.9: - fstp %st(3) - fstp %st(0) - fxch %st(1) - fmul %st(0), %st - fmulp %st, %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - ret -..B1.10: - cmpl $-19, %esi - jge ..B1.12 -..B1.11: - fstp %st(2) - fstp %st(2) - fldt .L_2il0floatpacket.0(%rip) - movzwl 8+.L_2il0floatpacket.0(%rip), %eax - andl $-32768, %eax - fstpt -56(%rsp) - fmul %st(0), %st - faddp %st, %st(1) - fstpt -24(%rsp) - movzwl -16(%rsp), %edx - lea 256(%rdi,%rdx), %edi - andl $-32768, %edx - andl $32767, %edi - orl $-49409, %edx - orl %edi, %eax - movw %ax, -48(%rsp) - fldt -56(%rsp) - movw %dx, -16(%rsp) - fldt -24(%rsp) - fmulp %st, %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) - ret -..B1.12: - fstp %st(1) - fmul %st(0), %st - lea 32+_CONSTANTS(%rip), %rcx - movzwl 8+.L_2il0floatpacket.0(%rip), %r8d - faddp %st, %st(1) - fldt .L_2il0floatpacket.1(%rip) - andl $-32768, %r8d - fmul %st(1), %st - fld %st(0) - fsub %st(2), %st - fsubrp %st, %st(1) - fstpt -40(%rsp) - fldt -40(%rsp) - fsubrp %st, %st(1) - movzwl -32(%rsp), %esi - faddp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - lea -16383(%rsi), %eax - negl %eax - movl %esi, %edx - addl $16383, %eax - lea -32512(%rdi,%rsi), %edi - andl $32767, %eax - andl $-32768, %edx - fstpt -56(%rsp) - orl %eax, %r8d - fldt (%rcx) - andl $32767, %edi - fmulp %st, %st(1) - orl $-49409, %edx - movw %r8w, -48(%rsp) - andl $-32768, %r8d - fldt -56(%rsp) - orl %edi, %r8d - fmulp %st, %st(1) - movw %dx, -32(%rsp) - fldt -40(%rsp) - movw %r8w, -48(%rsp) - fldt -56(%rsp) - fmul %st, %st(1) - fxch %st(1) - fstpt -40(%rsp) - fldt -40(%rsp) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt -24(%rsp) - fldt -24(%rsp) -..B1.13: - ret - .align 16,0x90 - .cfi_endproc - .type __libm_scalbl_k80,@function - .size __libm_scalbl_k80,.-__libm_scalbl_k80 - .data -# -- End __libm_scalbl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 2 -_CONSTANTS: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16127 - .word 0 - .word 0 - .word 0 - .type _CONSTANTS,@object - .size _CONSTANTS,48 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sincos_k32.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sincos_k32.S deleted file mode 100644 index 2816a3e943..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sincos_k32.S +++ /dev/null @@ -1,366 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sincos_k32.c" - .text -..TXTST0: -# -- Begin __libm_sincos_k32 - .text - .align 16,0x90 - .globl __libm_sincos_k32 -__libm_sincos_k32: -# parameter 1: %xmm0 -# parameter 2: %rdi -# parameter 3: %rsi -# parameter 4: %edx -..B1.1: - .cfi_startproc -..___tag_value___libm_sincos_k32.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %rbx - .cfi_def_cfa_offset 24 - .cfi_offset 3, -24 - pushq %rbp - .cfi_def_cfa_offset 32 - .cfi_offset 6, -32 - subq $16, %rsp - .cfi_def_cfa_offset 48 - lea iones(%rip), %rax - movsd %xmm0, 8(%rsp) - movl %edx, %ecx - movl 12(%rsp), %r12d - movl %r12d, %r10d - shrl $31, %r12d - andl $2147483647, %r10d - imull (%rax,%r12,4), %ecx - movq %rsi, %rbp - andps .L_2il0floatpacket.2(%rip), %xmm0 - movq %rdi, %rbx - cmpl $1103101952, %r10d - jae ..B1.9 -..B1.2: - cmpl $1073283072, %r10d - ja ..B1.6 -..B1.3: - incl %ecx - movl %ecx, %edx - andl $2, %edx - je ..B1.5 -..B1.4: - subsd .L_2il0floatpacket.0(%rip), %xmm0 - movsd %xmm0, 8(%rsp) - jmp ..B1.11 -..B1.5: - movsd %xmm0, 8(%rsp) - jmp ..B1.11 -..B1.6: - lea _INV_PI04(%rip), %rax - lea _TWO_52H(%rip), %rdx - pxor %xmm2, %xmm2 - pxor %xmm5, %xmm5 - movsd %xmm0, 8(%rsp) - movsd (%rax), %xmm3 - mulsd %xmm0, %xmm3 - movsd (%rdx), %xmm1 - addsd %xmm3, %xmm1 - movsd %xmm1, (%rsp) - movl (%rsp), %r9d - cvtsi2sd %r9d, %xmm2 - cmpltsd %xmm2, %xmm3 - movd %xmm3, %edi - negl %edi - subl %edi, %r9d - addl %r9d, %ecx - movl %ecx, %r8d - andl $1, %r8d - addl %r8d, %r9d - addl %r8d, %ecx - cvtsi2sd %r9d, %xmm5 - cmpl $1090519040, %r10d - jae ..B1.8 -..B1.7: - lea _DP2(%rip), %rax - lea 8+_DP2(%rip), %rdx - lea 16+_DP2(%rip), %rdi - movsd (%rax), %xmm1 - mulsd %xmm5, %xmm1 - movsd (%rdx), %xmm2 - movl %ecx, %edx - mulsd %xmm5, %xmm2 - subsd %xmm1, %xmm0 - movsd (%rdi), %xmm3 - andl $2, %edx - mulsd %xmm3, %xmm5 - subsd %xmm2, %xmm0 - subsd %xmm5, %xmm0 - movsd %xmm0, 8(%rsp) - jmp ..B1.11 -..B1.8: - lea _DP3(%rip), %rax - lea 8+_DP3(%rip), %rdx - movsd 8(%rsp), %xmm0 - lea 16+_DP3(%rip), %rdi - lea 24+_DP3(%rip), %r8 - movsd (%rax), %xmm1 - movsd (%rdx), %xmm2 - movl %ecx, %edx - mulsd %xmm5, %xmm1 - andl $2, %edx - mulsd %xmm5, %xmm2 - subsd %xmm1, %xmm0 - movsd (%rdi), %xmm3 - subsd %xmm2, %xmm0 - mulsd %xmm5, %xmm3 - movsd (%r8), %xmm4 - subsd %xmm3, %xmm0 - mulsd %xmm4, %xmm5 - subsd %xmm5, %xmm0 - movsd %xmm0, 8(%rsp) - jmp ..B1.11 -..B1.9: - movl %ecx, %esi - lea 8(%rsp), %rdi - movsd %xmm0, (%rdi) -..___tag_value___libm_sincos_k32.10: - call __libm_reduce_pi04d@PLT -..___tag_value___libm_sincos_k32.11: -..B1.17: - movl %eax, %ecx -..B1.10: - incl %ecx - movl %ecx, %edx - movsd 8(%rsp), %xmm0 - andl $2, %edx -..B1.11: - movaps %xmm0, %xmm2 - lea 24+_CP(%rip), %rsi - mulsd %xmm0, %xmm2 - lea 8+_CP(%rip), %rdi - movaps %xmm2, %xmm1 - lea 24+_SP(%rip), %r8 - mulsd %xmm2, %xmm1 - lea 32+_CP(%rip), %r10 - movsd (%rsi), %xmm6 - lea 32+_SP(%rip), %rsi - mulsd %xmm1, %xmm6 - lea 8+_SP(%rip), %r9 - movsd (%rsi), %xmm4 - lea 16+_CP(%rip), %r11 - mulsd %xmm1, %xmm4 - addsd (%rdi), %xmm6 - lea 16+_SP(%rip), %rdi - lea 2(%rcx), %eax - movsd (%r8), %xmm5 - lea _SP(%rip), %r8 - movsd (%r10), %xmm3 - mulsd %xmm1, %xmm5 - addsd (%rdi), %xmm4 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm6 - addsd (%r9), %xmm5 - mulsd %xmm1, %xmm4 - addsd (%r11), %xmm3 - addsd .L_2il0floatpacket.1(%rip), %xmm6 - mulsd %xmm1, %xmm5 - addsd (%r8), %xmm4 - mulsd %xmm1, %xmm3 - mulsd %xmm0, %xmm5 - mulsd %xmm2, %xmm4 - addsd %xmm0, %xmm5 - mulsd %xmm0, %xmm4 - shrl $2, %ecx - addsd %xmm4, %xmm5 - andl $1, %ecx - xorq %rcx, %r12 - lea _CP(%rip), %rcx - shrl $2, %eax - andl $1, %eax - testl %edx, %edx - addsd (%rcx), %xmm3 - lea ones(%rip), %rcx - mulsd %xmm2, %xmm3 - movsd (%rcx,%r12,8), %xmm0 - addsd %xmm3, %xmm6 - je ..B1.13 -..B1.12: - mulsd %xmm0, %xmm6 - movsd (%rcx,%rax,8), %xmm0 - mulsd %xmm0, %xmm5 - movsd %xmm6, (%rbx) - movsd %xmm5, (%rbp) - addq $16, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 12, -16 -..B1.13: - mulsd %xmm5, %xmm0 - movsd %xmm0, (%rbx) - movsd (%rcx,%rax,8), %xmm0 - mulsd %xmm0, %xmm6 - movsd %xmm6, (%rbp) -..B1.14: - addq $16, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __libm_sincos_k32,@function - .size __libm_sincos_k32,.-__libm_sincos_k32 - .data -# -- End __libm_sincos_k32 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.2: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x54442d18,0x3fe921fb - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 4 -_INV_PI04: - .long 1841940611 - .long 1072979760 - .type _INV_PI04,@object - .size _INV_PI04,8 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_DP2: - .long 1413742592 - .long 1072243195 - .long 1279262720 - .long 1031179299 - .long 1880851354 - .long 996723793 - .type _DP2,@object - .size _DP2,24 - .align 4 -_DP3: - .long 1073741824 - .long 1072243195 - .long 0 - .long 1046758445 - .long 2147483648 - .long 1021855384 - .long 1880851354 - .long 996723793 - .type _DP3,@object - .size _DP3,32 - .align 4 -_CP: - .long 4294960802 - .long 3219128319 - .long 1427442001 - .long 1067799893 - .long 2926645240 - .long 3210133867 - .long 2571283200 - .long 1056571689 - .long 2069816734 - .long 3197257552 - .type _CP,@object - .size _CP,40 - .align 4 -_SP: - .long 1431654765 - .long 3217380693 - .long 285032968 - .long 1065423121 - .long 3653044354 - .long 3207201183 - .long 2777006020 - .long 1053236634 - .long 43514947 - .long 3193610888 - .type _SP,@object - .size _SP,40 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sincos_k64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sincos_k64.S deleted file mode 100644 index c86f6c9625..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sincos_k64.S +++ /dev/null @@ -1,846 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sincos_k64.c" - .text -..TXTST0: -# -- Begin __libm_sincos_k64 - .text - .align 16,0x90 - .globl __libm_sincos_k64 -__libm_sincos_k64: -# parameter 1: %xmm0 -# parameter 2: %rdi -# parameter 3: %rsi -..B1.1: - .cfi_startproc -..___tag_value___libm_sincos_k64.1: -..L2: - - pushq %r15 - .cfi_def_cfa_offset 16 - .cfi_offset 15, -16 - pushq %rbx - .cfi_def_cfa_offset 24 - .cfi_offset 3, -24 - subq $56, %rsp - .cfi_def_cfa_offset 80 - movq %rsi, %r15 - movsd %xmm0, (%rsp) - movq %rdi, %rbx - movzwl 6(%rsp), %edx - movq %fs:40, %rax - andl $32752, %edx - movsd (%rsp), %xmm0 - xorq %rsp, %rax - movq %rax, 48(%rsp) - movb 7(%rsp), %al - andb $127, %al - movsd %xmm0, 8(%rsp) - cmpl $32752, %edx - je ..B1.13 -..B1.2: - movb %al, 15(%rsp) - movzwl 14(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $771, %eax - jl ..B1.9 -..B1.3: - cmpl $1040, %eax - jge ..B1.5 -..B1.4: - lea 2176+sincos_table(%rip), %rax - movsd (%rax), %xmm1 - xorl %eax, %eax - movsd %xmm1, 40(%rsp) - jmp ..B1.7 -..B1.5: - lea 32(%rsp), %rdi -..___tag_value___libm_sincos_k64.8: - call __libm_reduce_pio2d@PLT -..___tag_value___libm_sincos_k64.9: -..B1.6: - movsd 32(%rsp), %xmm0 - movsd 40(%rsp), %xmm1 -..B1.7: - lea 2048+sincos_table(%rip), %rcx - lea 2056+sincos_table(%rip), %rsi - lea 2064+sincos_table(%rip), %r8 - lea 2072+sincos_table(%rip), %r9 - lea 2112+sincos_table(%rip), %r11 - lea 2080+sincos_table(%rip), %r10 - shll $4, %eax - movsd (%rcx), %xmm13 - lea 2104+sincos_table(%rip), %rcx - mulsd %xmm0, %xmm13 - movsd (%r8), %xmm11 - lea 2144+sincos_table(%rip), %r8 - movsd (%r9), %xmm12 - lea 2136+sincos_table(%rip), %r9 - movsd (%r11), %xmm15 - lea 2120+sincos_table(%rip), %r11 - addsd (%rsi), %xmm13 - movsd %xmm13, (%rsp) - movl (%rsp), %edi - subsd (%rsi), %xmm13 - lea 2096+sincos_table(%rip), %rsi - mulsd %xmm13, %xmm11 - lea (%rdi,%rax), %edx - mulsd %xmm13, %xmm12 - mulsd (%r10), %xmm13 - subsd %xmm11, %xmm0 - movaps %xmm0, %xmm10 - lea 2128+sincos_table(%rip), %r10 - movsd (%r8), %xmm11 - lea 16(%rdi,%rax), %eax - lea 2088+sincos_table(%rip), %rdi - andl $63, %edx - shll $2, %edx - andl $63, %eax - shll $2, %eax - subsd %xmm12, %xmm10 - movaps %xmm10, %xmm14 - subsd %xmm10, %xmm0 - mulsd %xmm10, %xmm14 - subsd %xmm12, %xmm0 - mulsd %xmm14, %xmm11 - mulsd %xmm14, %xmm15 - subsd %xmm13, %xmm0 - addsd (%r9), %xmm11 - addsd (%rcx), %xmm15 - addsd %xmm1, %xmm0 - mulsd %xmm14, %xmm11 - mulsd %xmm14, %xmm15 - addsd (%r10), %xmm11 - addsd (%rsi), %xmm15 - mulsd %xmm14, %xmm11 - mulsd %xmm14, %xmm15 - addsd (%r11), %xmm11 - addsd (%rdi), %xmm15 - mulsd %xmm14, %xmm11 - mulsd %xmm14, %xmm15 - lea sincos_table(%rip), %rcx - movaps %xmm10, %xmm12 - mulsd %xmm10, %xmm15 - movsd 8(%rcx,%rdx,8), %xmm2 - movaps %xmm2, %xmm1 - mulsd %xmm11, %xmm1 - mulsd %xmm2, %xmm12 - movsd (%rcx,%rdx,8), %xmm9 - movsd (%rcx,%rax,8), %xmm6 - movaps %xmm9, %xmm8 - movsd 24(%rcx,%rdx,8), %xmm4 - movaps %xmm6, %xmm3 - movsd 24(%rcx,%rax,8), %xmm5 - addsd %xmm4, %xmm8 - mulsd %xmm10, %xmm4 - addsd %xmm5, %xmm3 - mulsd %xmm10, %xmm5 - mulsd %xmm10, %xmm9 - mulsd %xmm10, %xmm6 - movsd %xmm1, 16(%rsp) - movaps %xmm4, %xmm13 - movsd 8(%rcx,%rax,8), %xmm1 - movaps %xmm5, %xmm14 - mulsd %xmm1, %xmm10 - addsd %xmm2, %xmm13 - addsd %xmm1, %xmm14 - mulsd %xmm1, %xmm11 - subsd %xmm13, %xmm2 - subsd %xmm14, %xmm1 - addsd %xmm4, %xmm2 - addsd %xmm5, %xmm1 - movaps %xmm8, %xmm7 - subsd %xmm12, %xmm8 - mulsd %xmm15, %xmm7 - mulsd %xmm3, %xmm15 - subsd %xmm10, %xmm3 - mulsd %xmm0, %xmm8 - mulsd %xmm3, %xmm0 - addsd 16(%rcx,%rdx,8), %xmm8 - addsd 16(%rcx,%rax,8), %xmm0 - addsd %xmm2, %xmm8 - addsd %xmm1, %xmm0 - movsd %xmm11, 24(%rsp) - movaps %xmm13, %xmm11 - movsd %xmm15, 8(%rsp) - movaps %xmm14, %xmm15 - addsd %xmm9, %xmm11 - addsd %xmm6, %xmm15 - subsd %xmm11, %xmm13 - subsd %xmm15, %xmm14 - addsd %xmm13, %xmm9 - addsd %xmm14, %xmm6 - addsd %xmm9, %xmm8 - addsd %xmm6, %xmm0 - addsd %xmm7, %xmm8 - addsd 8(%rsp), %xmm0 - addsd 16(%rsp), %xmm8 - addsd 24(%rsp), %xmm0 - movsd %xmm11, (%rbx) - movsd %xmm8, 8(%rbx) - movsd %xmm15, (%r15) - movsd %xmm0, 8(%r15) - movq 48(%rsp), %rbx - xorq %rsp, %rbx - cmpq %fs:40, %rbx - jne ..B1.11 -..B1.8: - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -24 - .cfi_offset 15, -16 -..B1.9: - xorl %eax, %eax - movsd %xmm0, (%rbx) - movq %rax, 8(%rbx) - movq $0x3ff0000000000000, %rbx - movq %rbx, (%r15) - movq %rax, 8(%r15) - movq 48(%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - jne ..B1.11 -..B1.10: - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -24 - .cfi_offset 15, -16 -..B1.11: - call __stack_chk_fail@PLT -..B1.13: - lea 2176+sincos_table(%rip), %rax - xorl %edx, %edx - movq %rdx, 8(%rbx) - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - movsd %xmm0, (%rbx) - movsd %xmm0, (%r15) - movq %rdx, 8(%r15) - movq 48(%rsp), %rcx - xorq %rsp, %rcx - cmpq %fs:40, %rcx - jne ..B1.11 - jmp ..B1.8 - .align 16,0x90 - .cfi_endproc - .type __libm_sincos_k64,@function - .size __libm_sincos_k64,.-__libm_sincos_k64 - .data -# -- End __libm_sincos_k64 - .section .rodata, "a" - .align 16 - .align 16 -sincos_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 1072693248 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1071644672 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 1071644672 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1070596096 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 1070596096 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1069547520 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 3217031168 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 3218079744 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 3218079744 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 3219128320 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 3220176896 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3219128320 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 3219128320 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3218079744 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 3218079744 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3217031168 - .long 0 - .long 2147483648 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 1069547520 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 1070596096 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 1070596096 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 1071644672 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 1072693248 - .long 1841940611 - .long 1076125488 - .long 0 - .long 1127743488 - .long 1413480448 - .long 1069097467 - .long 442499072 - .long 1032893537 - .long 771977331 - .long 996350346 - .long 1431655765 - .long 3217380693 - .long 286331153 - .long 1065423121 - .long 436314138 - .long 3207201184 - .long 2773927732 - .long 1053236707 - .long 0 - .long 3219128320 - .long 1431655765 - .long 1067799893 - .long 381774871 - .long 3210133868 - .long 436314138 - .long 1056571808 - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 2146435072 - .type sincos_table,@object - .size sincos_table,2192 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinh_k64.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinh_k64.S deleted file mode 100644 index a3e2e60c2d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinh_k64.S +++ /dev/null @@ -1,394 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sinh_k64.c" - .text -..TXTST0: -# -- Begin __libm_sinh_k64 - .text - .align 16,0x90 - .globl __libm_sinh_k64 -__libm_sinh_k64: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_sinh_k64.1: -..L2: - - movaps %xmm0, %xmm3 - movsd %xmm3, -32(%rsp) - movzwl -26(%rsp), %eax - andl $32752, %eax - shrl $4, %eax - cmpl $1045, %eax - jge ..B1.11 -..B1.2: - movl -28(%rsp), %edx - movl %edx, %ecx - andl $2147483647, %ecx - cmpl $1066695393, %ecx - jae ..B1.7 -..B1.3: - cmpl $1012924416, %ecx - jae ..B1.5 -..B1.4: - movsd %xmm3, (%rdi) - movq $0, 8(%rdi) - jmp ..B1.6 -..B1.5: - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.3(%rip), %xmm4 - movsd .L_2il0floatpacket.5(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.4(%rip), %xmm4 - addsd .L_2il0floatpacket.6(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - movsd %xmm1, -40(%rsp) - addsd %xmm2, %xmm4 - mulsd %xmm3, %xmm4 - movsd %xmm3, (%rdi) - movsd %xmm4, 8(%rdi) -..B1.6: - xorl %eax, %eax - ret -..B1.7: - movsd -32(%rsp), %xmm2 - lea _TWO_52(%rip), %rax - andps .L_2il0floatpacket.13(%rip), %xmm2 - movsd .L_2il0floatpacket.0(%rip), %xmm4 - mulsd %xmm2, %xmm4 - movsd (%rax), %xmm0 - movsd .L_2il0floatpacket.1(%rip), %xmm1 - addsd %xmm0, %xmm4 - movsd %xmm4, -40(%rsp) - subsd %xmm0, %xmm4 - mulsd %xmm4, %xmm1 - movsd %xmm2, -32(%rsp) - subsd %xmm1, %xmm2 - movsd .L_2il0floatpacket.2(%rip), %xmm3 - movaps %xmm2, %xmm6 - mulsd %xmm3, %xmm4 - movl -40(%rsp), %eax - movl %eax, %r10d - shll $25, %r10d - subsd %xmm4, %xmm6 - sarl $25, %r10d - subsd %xmm6, %xmm2 - subl %r10d, %eax - subsd %xmm4, %xmm2 - movsd .L_2il0floatpacket.15(%rip), %xmm1 - movaps %xmm2, %xmm0 - sarl $7, %eax - addsd %xmm6, %xmm0 - addsd %xmm6, %xmm1 - cmpl $1077338037, %ecx - jae ..B1.9 -..B1.8: - movaps %xmm0, %xmm7 - xorl %ecx, %ecx - mulsd %xmm0, %xmm7 - movaps %xmm6, %xmm9 - movsd .L_2il0floatpacket.8(%rip), %xmm8 - movl %eax, %esi - mulsd %xmm7, %xmm8 - negl %esi - movsd .L_2il0floatpacket.15(%rip), %xmm3 - addl $1023, %esi - movsd %xmm1, -32(%rsp) - subl %eax, %esi - movl %ecx, -32(%rsp) - andl $2047, %esi - movsd -32(%rsp), %xmm10 - decl %eax - movsd .L_2il0floatpacket.7(%rip), %xmm4 - subsd %xmm6, %xmm3 - addsd .L_2il0floatpacket.9(%rip), %xmm8 - addsd %xmm10, %xmm4 - mulsd %xmm7, %xmm8 - subsd %xmm4, %xmm9 - mulsd %xmm0, %xmm8 - addsd %xmm2, %xmm9 - movsd .L_2il0floatpacket.10(%rip), %xmm0 - addsd %xmm8, %xmm9 - mulsd %xmm7, %xmm0 - movsd %xmm3, -24(%rsp) - lea ones(%rip), %r11 - movl %ecx, -24(%rsp) - movsd -24(%rsp), %xmm1 - movsd .L_2il0floatpacket.7(%rip), %xmm5 - movslq %r10d, %r10 - addsd .L_2il0floatpacket.11(%rip), %xmm0 - addsd %xmm1, %xmm5 - mulsd %xmm7, %xmm0 - addsd %xmm5, %xmm6 - addsd .L_2il0floatpacket.12(%rip), %xmm0 - addsd %xmm6, %xmm2 - mulsd %xmm7, %xmm0 - xorps .L_2il0floatpacket.14(%rip), %xmm2 - addsd %xmm0, %xmm9 - subsd %xmm8, %xmm2 - shlq $4, %r10 - addsd %xmm0, %xmm2 - movaps %xmm9, %xmm0 - movaps %xmm2, %xmm12 - movq __libm_exp_table_128@GOTPCREL(%rip), %r9 - addsd %xmm10, %xmm9 - addsd %xmm1, %xmm2 - mulsd 1024(%r10,%r9), %xmm9 - movsd 1032(%r10,%r9), %xmm13 - negq %r10 - movzwl 6+.L_2il0floatpacket.15(%rip), %r8d - movsd .L_2il0floatpacket.15(%rip), %xmm6 - andl $-32753, %r8d - shll $4, %esi - movsd 1032(%r9,%r10), %xmm11 - orl %esi, %r8d - mulsd 1024(%r9,%r10), %xmm2 - mulsd %xmm11, %xmm12 - mulsd %xmm11, %xmm1 - mulsd %xmm13, %xmm0 - addsd %xmm2, %xmm12 - mulsd %xmm10, %xmm13 - addsd %xmm9, %xmm0 - movsd %xmm6, -16(%rsp) - movaps %xmm13, %xmm14 - movw %r8w, -10(%rsp) - movsd -16(%rsp), %xmm2 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm12 - subsd %xmm1, %xmm14 - subsd %xmm12, %xmm0 - subsd %xmm14, %xmm13 - shrl $31, %edx - subsd %xmm1, %xmm13 - movsd (%r11,%rdx,8), %xmm15 - addsd %xmm13, %xmm0 - movsd %xmm14, -40(%rsp) - mulsd %xmm15, %xmm14 - mulsd %xmm15, %xmm0 - movsd %xmm1, -24(%rsp) - movsd %xmm13, -32(%rsp) - movsd %xmm14, (%rdi) - movsd %xmm0, 8(%rdi) - ret -..B1.9: - movsd %xmm1, -40(%rsp) - movaps %xmm0, %xmm4 - movl $0, -40(%rsp) - decl %eax - movsd -40(%rsp), %xmm7 - lea ones(%rip), %rsi - movsd .L_2il0floatpacket.7(%rip), %xmm1 - movsd .L_2il0floatpacket.10(%rip), %xmm5 - addsd %xmm7, %xmm1 - mulsd %xmm0, %xmm4 - subsd %xmm1, %xmm6 - mulsd %xmm4, %xmm5 - addsd %xmm6, %xmm2 - addsd .L_2il0floatpacket.11(%rip), %xmm5 - movsd .L_2il0floatpacket.8(%rip), %xmm6 - mulsd %xmm4, %xmm6 - mulsd %xmm4, %xmm5 - addsd .L_2il0floatpacket.9(%rip), %xmm6 - mulsd %xmm6, %xmm0 - movsd .L_2il0floatpacket.12(%rip), %xmm3 - addsd %xmm0, %xmm5 - mulsd %xmm4, %xmm5 - mulsd %xmm3, %xmm4 - movslq %r10d, %r10 - addsd %xmm4, %xmm5 - shlq $4, %r10 - addsd %xmm5, %xmm2 - movaps %xmm2, %xmm8 - addsd %xmm7, %xmm2 - movq __libm_exp_table_128@GOTPCREL(%rip), %rcx - shrl $31, %edx - movsd 1032(%r10,%rcx), %xmm0 - mulsd 1024(%r10,%rcx), %xmm2 - mulsd %xmm0, %xmm8 - mulsd %xmm0, %xmm7 - addsd %xmm2, %xmm8 - movsd (%rsi,%rdx,8), %xmm2 - movsd %xmm7, -40(%rsp) - mulsd %xmm2, %xmm7 - mulsd %xmm8, %xmm2 - movsd %xmm7, (%rdi) - movsd %xmm2, 8(%rdi) -..B1.10: - ret -..B1.11: - movb -25(%rsp), %dl - andb $-128, %dl - shrb $7, %dl - cmpl $2047, %eax - je ..B1.14 -..B1.12: - movzbl %dl, %edx - lea infs(%rip), %rax - pxor %xmm0, %xmm0 - movq $0, 8(%rdi) - movl (%rax,%rdx,4), %ecx - cvtsi2sdq %rcx, %xmm0 - movsd %xmm0, (%rdi) -..B1.13: - xorl %eax, %eax - ret -..B1.14: - movq -32(%rsp), %rax - movq %rax, (%rdi) - movq $0, 8(%rdi) - jmp ..B1.13 - .align 16,0x90 - .cfi_endproc - .type __libm_sinh_k64,@function - .size __libm_sinh_k64,.-__libm_sinh_k64 - .data -# -- End __libm_sinh_k64 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.13: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,16 - .align 16 -.L_2il0floatpacket.14: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0xb9ff12f0,0x3ec71e39 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x111111c1,0x3f811111 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x1940cd88,0x3f2a01a0 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x55555555,0x3fc55555 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.15: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_52: - .long 0 - .long 1127219200 - .type _TWO_52,@object - .size _TWO_52,8 - .align 4 -infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type infs,@object - .size infs,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinhl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinhl_k80.S deleted file mode 100644 index f307983252..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinhl_k80.S +++ /dev/null @@ -1,745 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sinhl_k80.c" - .text -..TXTST0: -# -- Begin __libm_sinhl_k80 - .text - .align 16,0x90 - .globl __libm_sinhl_k80 -__libm_sinhl_k80: -# parameter 1: 8 + %rsp -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_sinhl_k80.1: -..L2: - - movzwl 16(%rsp), %eax - andl $32767, %eax - cmpl $16405, %eax - jge ..B1.20 -..B1.2: - cmpl $16382, %eax - jge ..B1.13 -..B1.3: - fldt 8(%rsp) - cmpl $16378, %eax - jge ..B1.11 -..B1.4: - cmpl $16373, %eax - jge ..B1.10 -..B1.5: - cmpl $16366, %eax - jge ..B1.9 -..B1.6: - fstpt (%rdi) - fldt (%rdi) - cmpl $16308, %eax - jge ..B1.8 -..B1.7: - fstp %st(0) - fldt .L_2il0floatpacket.0(%rip) - fstpt 16(%rdi) - fldt 16(%rdi) - ret -..B1.8: - lea _Q3(%rip), %rax - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.0(%rip) - ret -..B1.9: - fld %st(0) - lea 16+_Q2(%rip), %rax - lea _Q2(%rip), %rdx - fmul %st(1), %st - fxch %st(1) - fstpt (%rdi) - fldt (%rdi) - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.0(%rip) - ret -..B1.10: - fld %st(0) - lea 48+_Q1(%rip), %rax - lea 32+_Q1(%rip), %rcx - lea 16+_Q1(%rip), %rdx - lea _Q1(%rip), %rsi - fmul %st(1), %st - fld %st(0) - fmul %st(1), %st - fxch %st(2) - fstpt (%rdi) - fldt (%rdi) - fldt (%rax) - fmul %st(3), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - fmulp %st, %st(4) - fldt (%rsi) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.0(%rip) - ret -..B1.11: - lea _TWO_48H(%rip), %rax - fld %st(0) - fmul %st(1), %st - lea 112+_Q(%rip), %rdx - fld %st(0) - lea 80+_Q(%rip), %rcx - lea 48+_Q(%rip), %rsi - lea 96+_Q(%rip), %r9 - lea 16+_Q(%rip), %r8 - lea 64+_Q(%rip), %r10 - lea 32+_Q(%rip), %r11 - fmul %st(1), %st - fld %st(2) - fxch %st(3) - fstpt -88(%rsp) - fldt -88(%rsp) - fldl (%rax) - lea _Q(%rip), %rax - fadd %st, %st(4) - fxch %st(4) - fstpt -24(%rsp) - fldt -24(%rsp) - fsubp %st, %st(4) - fld %st(3) - fld %st(1) - fsub %st(5), %st - fmul %st, %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fxch %st(4) - fstpt -72(%rsp) - fldt -72(%rsp) - fmul %st(0), %st - fldt (%rdx) - lea 128+_Q(%rip), %rdx - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r9) - fmul %st(4), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(4) - fldt (%rax) - faddp %st, %st(4) - fxch %st(4) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(0) - fldt (%rdx) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - fxch %st(4) - fmulp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - fldt -88(%rsp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldt -72(%rsp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt (%rdi) - fldt (%rdi) - fsubrp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 16(%rdi) - fldt .L_2il0floatpacket.0(%rip) -..B1.12: - ret -..B1.13: - fldt 8(%rsp) - lea ones(%rip), %rax - movb 17(%rsp), %dl - lea _KLN2(%rip), %r8 - andb $-128, %dl - lea _TWO_63H(%rip), %rsi - shrb $7, %dl - lea _LN2K(%rip), %r9 - fldt (%r8) - fldl (%rsi) - fldt (%r9) - movzbl %dl, %ecx - lea 16+_LN2K(%rip), %r10 - lea _TWO_32P(%rip), %r11 - lea 64+_P(%rip), %rsi - lea 32+_P(%rip), %r8 - lea _P(%rip), %r9 - fldl (%rax,%rcx,8) - lea _TWO_32(%rip), %rcx - fmul %st, %st(4) - fxch %st(3) - fmul %st(4), %st - fadd %st(2), %st - fstpt -24(%rsp) - fxch %st(3) - fstpt 8(%rsp) - fldt 8(%rsp) - fldt -24(%rsp) - movl -24(%rsp), %edx - fsubp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - movsbq %dl, %rax - fxch %st(3) - fsubrp %st, %st(1) - fld %st(0) - subl %eax, %edx - fldt (%r10) - lea 48+_P(%rip), %r10 - fmulp %st, %st(4) - sarl $8, %edx - fsub %st(3), %st - fldl (%r11) - lea 16+_P(%rip), %r11 - fmul %st(1), %st - fldl (%rcx) - fmulp %st, %st(2) - movzwl 16(%rsp), %ecx - fsubp %st, %st(1) - fld %st(0) - andl $32767, %ecx - cmpl $16387, %ecx - fxch %st(1) - fsubr %st, %st(2) - fxch %st(4) - fsubrp %st, %st(2) - fadd %st(1), %st - fld %st(0) - fmul %st(1), %st - fldt (%rsi) - fmul %st(1), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - jg ..B1.19 -..B1.14: - jne ..B1.18 -..B1.15: - movl 12(%rsp), %ecx - cmpl $-782985146, %ecx - ja ..B1.19 -..B1.16: - jne ..B1.18 -..B1.17: - cmpl $1501741449, 8(%rsp) - ja ..B1.19 -..B1.18: - fldt .L_2il0floatpacket.1(%rip) - movl %edx, %esi - negl %esi - lea -1(%rdx), %ecx - addl $16383, %esi - shlq $4, %rax - subl %edx, %esi - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - andl $32767, %esi - fstpt -40(%rsp) - fld %st(0) - movzwl 8+.L_2il0floatpacket.1(%rip), %r8d - fadd %st(2), %st - fxch %st(2) - fsubrp %st, %st(1) - fxch %st(2) - fstpt -88(%rsp) - fld %st(2) - fldl 2056(%rdx,%rax) - andl $-32768, %r8d - fldl 2048(%rdx,%rax) - negq %rax - fstpt -72(%rsp) - fldt -72(%rsp) - orl %esi, %r8d - movw %r8w, -32(%rsp) - fadd %st(1), %st - fmulp %st, %st(3) - fld %st(4) - fmul %st(1), %st - movl %ecx, -8(%rsp) - faddp %st, %st(3) - fldl 2056(%rdx,%rax) - fldl 2048(%rdx,%rax) - fld %st(0) - fadd %st(2), %st - fmulp %st, %st(6) - fld %st(6) - fmul %st(2), %st - fsubrp %st, %st(6) - fxch %st(5) - fstpt -56(%rsp) - fxch %st(4) - fmul %st, %st(5) - fldt -72(%rsp) - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fsub %st(5), %st - fsubr %st, %st(3) - fxch %st(5) - fsubrp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(0) - fldt -56(%rsp) - faddp %st, %st(4) - fldt -40(%rsp) - fmul %st, %st(5) - fxch %st(1) - fsub %st(5), %st - fsubr %st, %st(2) - fxch %st(5) - fsubrp %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(1) - fldt -88(%rsp) - fmul %st, %st(2) - fxch %st(2) - fstpt (%rdi) - fmulp %st, %st(1) - fstpt 16(%rdi) - fildl -8(%rsp) - ret -..B1.19: - shlq $4, %rax - decl %edx - movl %edx, -8(%rsp) - faddp %st, %st(1) - fildl -8(%rsp) - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - fldl 2056(%rdx,%rax) - fldl 2048(%rdx,%rax) - fld %st(0) - fmul %st(4), %st - fxch %st(4) - fadd %st(6), %st - fmul %st(2), %st - faddp %st, %st(4) - fmul %st, %st(5) - fld %st(0) - fadd %st(6), %st - fsubr %st, %st(1) - fxch %st(6) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - fstpt (%rdi) - fmulp %st, %st(2) - fxch %st(1) - fstpt 16(%rdi) - ret -..B1.20: - movb 17(%rsp), %dl - andb $-128, %dl - shrb $7, %dl - cmpl $32767, %eax - je ..B1.23 -..B1.21: - fldt .L_2il0floatpacket.0(%rip) - movzbl %dl, %eax - lea _infs(%rip), %rdx - shlq $4, %rax - fstpt 16(%rdi) - fldt (%rdx,%rax) - fstpt (%rdi) - fldt (%rdx) -..B1.22: - ret -..B1.23: - fldt 8(%rsp) - fstpt (%rdi) - fldt (%rdi) - fmul %st(0), %st - fldt .L_2il0floatpacket.0(%rip) - fstpt 16(%rdi) - ret - .align 16,0x90 - .cfi_endproc - .type __libm_sinhl_k80,@function - .size __libm_sinhl_k80,.-__libm_sinhl_k80 - .data -# -- End __libm_sinhl_k80 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 2 -_Q3: - .word 21845 - .word 44373 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 29491 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 1838 - .word 3745 - .word 35050 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 56472 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 6470 - .word 8609 - .word 207 - .word 53261 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 51515 - .word 9159 - .word 10794 - .word 47344 - .word 16364 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 43620 - .word 43690 - .word 43690 - .word 43690 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 52382 - .word 3328 - .word 208 - .word 53261 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 44665 - .word 46658 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 15678 - .word 35942 - .word 11071 - .word 55090 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 10412 - .word 23121 - .word 12507 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 37213 - .word 41879 - .word 65084 - .word 55102 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 1721 - .word 42148 - .word 19309 - .word 52099 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,144 - .align 2 -_KLN2: - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 16391 - .word 0 - .word 0 - .word 0 - .type _KLN2,@object - .size _KLN2,16 - .align 2 -_LN2K: - .word 0 - .word 0 - .word 6134 - .word 45426 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 55756 - .word 58609 - .word 48341 - .word 59623 - .word 16343 - .word 0 - .word 0 - .word 0 - .type _LN2K,@object - .size _LN2K,32 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,80 - .align 2 -_infs: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32767 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 65535 - .word 0 - .word 0 - .word 0 - .type _infs,@object - .size _infs,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinl_k80.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinl_k80.S deleted file mode 100644 index 23cbd838a2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sinl_k80.S +++ /dev/null @@ -1,830 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sinl_k80.c" - .text -..TXTST0: -# -- Begin __libm_sinl_k80 - .text - .align 16,0x90 - .globl __libm_sinl_k80 -__libm_sinl_k80: -# parameter 1: 160 + %rsp -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_sinl_k80.1: -..L2: - - pushq %r15 - .cfi_def_cfa_offset 16 - .cfi_offset 15, -16 - pushq %rbx - .cfi_def_cfa_offset 24 - .cfi_offset 3, -24 - pushq %rbp - .cfi_def_cfa_offset 32 - .cfi_offset 6, -32 - subq $128, %rsp - .cfi_def_cfa_offset 160 - movq %rdi, %r15 - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 120(%rsp) - movzwl 168(%rsp), %eax - andl $32767, %eax - cmpl $16378, %eax - jge ..B1.13 -..B1.2: - fldt 160(%rsp) - cmpl $16372, %eax - jge ..B1.11 -..B1.3: - cmpl $16364, %eax - jge ..B1.9 -..B1.4: - fstpt (%r15) - fldt (%r15) - cmpl $16308, %eax - jge ..B1.6 -..B1.5: - fstp %st(0) - lea _zeros(%rip), %rax - lea _ones(%rip), %rdx - fldl (%rax) - fstpt 16(%r15) - fldl (%rdx) - jmp ..B1.7 -..B1.6: - lea _SP3(%rip), %rax - lea _ones(%rip), %rdx - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmulp %st, %st(1) - fstpt 16(%r15) - fldl (%rdx) -..B1.7: - movq 120(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.23 -..B1.8: - addq $128, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 15, -16 -..B1.9: - fld %st(0) - lea 16+_SP2(%rip), %rax - fmul %st(1), %st - lea _SP2(%rip), %rdx - lea _ones(%rip), %rcx - fxch %st(1) - fstpt (%r15) - fldt (%r15) - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - movsd (%rcx), %xmm0 - faddp %st, %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - fstpt 16(%r15) - movq 120(%rsp), %rbx - xorq %rsp, %rbx - cmpq %fs:40, %rbx - jne ..B1.24 -..B1.10: - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - addq $128, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 15, -16 -..B1.11: - fld %st(0) - lea 48+_SP1(%rip), %rax - fmul %st(1), %st - lea 32+_SP1(%rip), %rcx - fld %st(0) - lea 16+_SP1(%rip), %rdx - fmul %st(1), %st - lea _SP1(%rip), %rbx - lea _ones(%rip), %rbp - fxch %st(2) - fstpt (%r15) - fldt (%r15) - fldt (%rax) - fmul %st(3), %st - fldt (%rdx) - movsd (%rbp), %xmm0 - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - fmulp %st, %st(4) - fldt (%rbx) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%r15) - movq 120(%rsp), %rsi - xorq %rsp, %rsi - cmpq %fs:40, %rsi - jne ..B1.24 -..B1.12: - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - addq $128, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 15, -16 -..B1.13: - cmpl $16382, %eax - jge ..B1.15 -..B1.14: - fldt 160(%rsp) - xorl %ecx, %ecx - movb 169(%rsp), %bl - lea _ones(%rip), %rbp - andb $-128, %bl - lea _TWO_52H(%rip), %rax - shrb $7, %bl - fldl (%rax) - movzbl %bl, %ebx - fxch %st(1) - fmull (%rbp,%rbx,8) - fmul %st, %st(1) - fld %st(1) - fadd %st(1), %st - fstpt (%rsp) - fstpt 24(%rsp) - fldt 24(%rsp) - fstpt 160(%rsp) - fldt 160(%rsp) - fldt (%rsp) - fsubp %st, %st(2) - fld %st(1) - fsubrp %st, %st(1) - fxch %st(1) - jmp ..B1.18 -..B1.15: - je ..B1.27 -..B1.16: - fldt 160(%rsp) - lea _ones(%rip), %rbp - movb 169(%rsp), %al - xorl %edi, %edi - andb $-128, %al - shrb $7, %al - movzbl %al, %ebx - fmull (%rbp,%rbx,8) - fstpt 160(%rsp) - fldt 160(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 176 - lea 120(%rsp), %rsi - fstpt (%rsp) -..___tag_value___libm_sinl_k80.44: - call __libm_reduce_pi04l@PLT -..___tag_value___libm_sinl_k80.45: -..B1.32: - movl %eax, %ecx - addq $16, %rsp - .cfi_def_cfa_offset 160 -..B1.17: - fldl 104(%rsp) - lea 1(%rcx), %eax - lea _TWO_52H(%rip), %rdx - fld %st(0) - movsd 104(%rsp), %xmm0 - sarl $2, %eax - movslq %eax, %rax - mulsd (%rdx), %xmm0 - xorq %rax, %rbx - movsd %xmm0, 16(%rsp) - andq $1, %rbx - fldl 16(%rsp) - fadd %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fldl 112(%rsp) - faddp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fstpt 24(%rsp) -..B1.18: - fldt 24(%rsp) - fld %st(1) - fmul %st(3), %st - fld %st(3) - fmulp %st, %st(2) - lea _TWO_53H(%rip), %rax - incl %ecx - testb $2, %cl - faddp %st, %st(1) - fstpt 40(%rsp) - fldt 40(%rsp) - fld %st(1) - fmul %st(2), %st - fld %st(0) - fadd %st(2), %st - fstpt 72(%rsp) - fldt 72(%rsp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 56(%rsp) - fldt 56(%rsp) - fxch %st(1) - fstpt 88(%rsp) - fldt 88(%rsp) - fmul %st(0), %st - fld %st(0) - faddp %st, %st(2) - fldl (%rax) - je ..B1.20 -..B1.19: - fstp %st(4) - fstp %st(2) - lea 112+_CP(%rip), %rax - lea 80+_CP(%rip), %rdx - lea 128+_CP(%rip), %rdi - lea 96+_CP(%rip), %r8 - lea 48+_CP(%rip), %rcx - lea 64+_CP(%rip), %r9 - lea 16+_CP(%rip), %rsi - lea 32+_CP(%rip), %r10 - fldt (%rax) - lea _CP(%rip), %r11 - lea 160+_CP(%rip), %rax - fmul %st(1), %st - fldt (%rdx) - lea 144+_CP(%rip), %rdx - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r11) - faddp %st, %st(2) - fldt 72(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 56(%rsp) - fldt 40(%rsp) - fldt 88(%rsp) - fldt (%rax) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(4) - fldt (%rdx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fld %st(3) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fadd %st(1), %st - fmul %st, %st(3) - fadd %st(3), %st - fstpt (%rsp) - fldt (%rsp) - fsubp %st, %st(3) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(1) - fld %st(1) - fldl (%rbp) - fld %st(0) - fxch %st(1) - fadd %st, %st(2) - fxch %st(1) - fsub %st(2), %st - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fldl (%rbp,%rbx,8) - fmul %st, %st(1) - fxch %st(1) - fstpt (%r15) - fmulp %st, %st(2) - fxch %st(1) - fstpt 16(%r15) - jmp ..B1.21 -..B1.20: - lea 112+_SP(%rip), %rax - lea 80+_SP(%rip), %rdx - lea 48+_SP(%rip), %rcx - lea 128+_SP(%rip), %rdi - lea 16+_SP(%rip), %rsi - lea 96+_SP(%rip), %r8 - lea 64+_SP(%rip), %r9 - lea 32+_SP(%rip), %r10 - fldt (%rax) - lea _SP(%rip), %r11 - lea 160+_SP(%rip), %rax - fmul %st(3), %st - fldt (%rdx) - lea 144+_SP(%rip), %rdx - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - fmul %st(4), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(4) - fldt (%r11) - faddp %st, %st(4) - fldt 72(%rsp) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt 56(%rsp) - fldt 40(%rsp) - fldt (%rax) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(3) - fldt (%rdx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fldt 88(%rsp) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fmul %st, %st(1) - fadd %st(1), %st - fstpt (%rsp) - fldt (%rsp) - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fld %st(3) - fmul %st(1), %st - fxch %st(1) - fmul %st(3), %st - fldt 24(%rsp) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(3) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldl (%rbp,%rbx,8) - fmul %st, %st(1) - fxch %st(1) - fstpt (%r15) - fmulp %st, %st(1) - fstpt 16(%r15) - fldl (%rbp) -..B1.21: - movq 120(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.23 -..B1.22: - addq $128, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 15, -16 -..B1.23: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.24: - call __stack_chk_fail@PLT -..B1.27: - movl 164(%rsp), %eax - cmpl $-921707870, %eax - jb ..B1.14 -..B1.28: - jne ..B1.16 -..B1.29: - cmpl $560513589, 160(%rsp) - jbe ..B1.14 - jmp ..B1.16 - .align 16,0x90 - .cfi_endproc - .type __libm_sinl_k80,@function - .size __libm_sinl_k80,.-__libm_sinl_k80 - .data -# -- End __libm_sinl_k80 - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 2 -_SP3: - .word 17476 - .word 43656 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _SP3,@object - .size _SP3,16 - .align 2 -_SP2: - .word 43210 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 1587 - .word 57422 - .word 34932 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _SP2,@object - .size _SP2,32 - .align 2 -_SP1: - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 12518 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 43088 - .word 7396 - .word 207 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 55827 - .word 48618 - .word 3602 - .word 47342 - .word 16364 - .word 0 - .word 0 - .word 0 - .type _SP1,@object - .size _SP1,64 - .align 2 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 0 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 0 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _CP,@object - .size _CP,176 - .align 2 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _SP,@object - .size _SP,176 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sse2_sincos.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sse2_sincos.S deleted file mode 100644 index 19101b10f4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_sse2_sincos.S +++ /dev/null @@ -1,1406 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_sse2_sincos.c" - .text -..TXTST0: -# -- Begin __libm_sse2_sincos - .text - .align 16,0x90 - .globl __libm_sse2_sincos -__libm_sse2_sincos: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___libm_sse2_sincos.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movq %fs:40, %rax - xorq %rsp, %rax - movsd %xmm0, (%rsp) - movq %rax, 40(%rsp) -..B1.2: - pextrw $3, %xmm0, %eax - andw $32767, %ax - subw $12336, %ax - cmpw $4293, %ax - ja .L_2TAG_PACKET_0.0.1 - unpcklpd %xmm0, %xmm0 - movapd PI32INV(%rip), %xmm1 - mulpd %xmm0, %xmm1 - movapd SHIFTER(%rip), %xmm2 - cvtsd2si %xmm1, %edx - addpd %xmm2, %xmm1 - movapd P_1(%rip), %xmm3 - subpd %xmm2, %xmm1 - movapd P_2(%rip), %xmm2 - mulpd %xmm1, %xmm3 - addq $1865216, %rdx - movapd %xmm0, %xmm4 - andq $63, %rdx - movapd SC_4(%rip), %xmm5 - lea Ctable(%rip), %rax - shlq $6, %rdx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - subpd %xmm3, %xmm0 - mulpd P_3(%rip), %xmm1 - subpd %xmm3, %xmm4 - movapd 16(%rax), %xmm7 - movapd %xmm4, %xmm3 - subpd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - movapd SC_2(%rip), %xmm6 - mulpd %xmm4, %xmm7 - subpd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subpd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subpd %xmm3, %xmm1 - movapd 48(%rax), %xmm3 - addpd %xmm3, %xmm2 - subpd %xmm2, %xmm7 - mulpd %xmm7, %xmm1 - movapd 16(%rax), %xmm7 - mulpd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulpd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm7 - mulpd %xmm0, %xmm0 - addpd SC_3(%rip), %xmm5 - mulpd (%rax), %xmm4 - addpd SC_1(%rip), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, %xmm0 - addpd 16(%rax), %xmm3 - addpd %xmm5, %xmm6 - movq %xmm6, %xmm5 - unpckhpd %xmm6, %xmm6 - unpcklpd %xmm5, %xmm5 - mulpd %xmm7, %xmm6 - mulpd %xmm5, %xmm2 - movapd %xmm4, %xmm7 - addpd %xmm3, %xmm4 - movapd 16(%rax), %xmm5 - subpd %xmm3, %xmm5 - subpd %xmm4, %xmm3 - addpd 32(%rax), %xmm1 - addpd %xmm0, %xmm5 - addpd %xmm7, %xmm3 - addpd %xmm5, %xmm1 - addpd %xmm3, %xmm1 - addpd %xmm2, %xmm1 - addpd %xmm6, %xmm1 - addpd %xmm4, %xmm1 - movq %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - jmp ..B1.7 -.L_2TAG_PACKET_0.0.1: - jg .L_2TAG_PACKET_1.0.1 - movq %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orw $32768, %ax - pinsrw $3, %eax, %xmm1 - addsd ONE(%rip), %xmm1 - cmpw $32784, %ax - jge .L_2TAG_PACKET_2.0.1 - mulsd ALL_ONES(%rip), %xmm0 - jmp ..B1.7 -.L_2TAG_PACKET_2.0.1: - movq TWO_POW_55(%rip), %xmm3 - mulsd %xmm0, %xmm3 - subsd %xmm3, %xmm0 - mulsd TWO_POW_M55(%rip), %xmm0 - jmp ..B1.7 -.L_2TAG_PACKET_1.0.1: - pextrw $3, %xmm0, %eax - andl $32752, %eax - cmpl $32752, %eax - je .L_2TAG_PACKET_3.0.1 -..B1.3: - movsd (%rsp), %xmm0 - lea 24(%rsp), %rdi -..___tag_value___libm_sse2_sincos.4: - call __libm_reduce_pio2d@PLT -..___tag_value___libm_sse2_sincos.5: -..B1.4: - movl %eax, 16(%rsp) -..B1.5: - movq 24(%rsp), %xmm0 - movq 32(%rsp), %xmm6 - unpcklpd %xmm0, %xmm0 - unpcklpd %xmm6, %xmm6 - movapd PI32INV(%rip), %xmm1 - mulpd %xmm0, %xmm1 - movapd SHIFTER(%rip), %xmm2 - cvtsd2si %xmm1, %edx - addpd %xmm2, %xmm1 - movapd P_1(%rip), %xmm3 - subpd %xmm2, %xmm1 - movapd P_2(%rip), %xmm2 - mulpd %xmm1, %xmm3 - movl 16(%rsp), %eax - shlq $4, %rax - addq $1865216, %rdx - movapd %xmm0, %xmm4 - addq %rax, %rdx - andq $63, %rdx - movapd SC_4(%rip), %xmm5 - lea Ctable(%rip), %rax - shlq $6, %rdx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - subpd %xmm3, %xmm0 - mulpd P_3(%rip), %xmm1 - subpd %xmm3, %xmm4 - movapd 16(%rax), %xmm7 - movapd %xmm4, %xmm3 - subpd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - mulpd %xmm4, %xmm7 - subpd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subpd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subpd %xmm3, %xmm1 - movapd 48(%rax), %xmm3 - addpd %xmm3, %xmm2 - subpd %xmm2, %xmm7 - subpd %xmm6, %xmm1 - movapd SC_2(%rip), %xmm6 - mulpd %xmm7, %xmm1 - movapd 16(%rax), %xmm7 - mulpd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulpd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm7 - mulpd %xmm0, %xmm0 - addpd SC_3(%rip), %xmm5 - mulpd (%rax), %xmm4 - addpd SC_1(%rip), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, %xmm0 - addpd 16(%rax), %xmm3 - addpd %xmm5, %xmm6 - movq %xmm6, %xmm5 - unpckhpd %xmm6, %xmm6 - unpcklpd %xmm5, %xmm5 - mulpd %xmm7, %xmm6 - mulpd %xmm5, %xmm2 - movapd %xmm4, %xmm7 - addpd %xmm3, %xmm4 - movapd 16(%rax), %xmm5 - subpd %xmm3, %xmm5 - subpd %xmm4, %xmm3 - addpd 32(%rax), %xmm1 - addpd %xmm0, %xmm5 - addpd %xmm7, %xmm3 - addpd %xmm5, %xmm1 - addpd %xmm3, %xmm1 - addpd %xmm2, %xmm1 - addpd %xmm6, %xmm1 - addpd %xmm4, %xmm1 - movq %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - jmp ..B1.7 -.L_2TAG_PACKET_3.0.1: - movq (%rsp), %xmm0 - pxor %xmm1, %xmm1 - mulsd %xmm1, %xmm0 - movq %xmm0, %xmm1 - movq %xmm0, 8(%rsp) - jmp ..B1.7 -.L_2TAG_PACKET_4.0.1: -..B1.7: - movq 40(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.9 -..B1.8: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.9: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __libm_sse2_sincos,@function - .size __libm_sse2_sincos,.-__libm_sse2_sincos - .data -# -- End __libm_sse2_sincos - .section .rodata, "a" - .align 16 - .align 16 -PI32INV: - .long 1841940611 - .long 1076125488 - .long 1841940611 - .long 1076125488 - .type PI32INV,@object - .size PI32INV,16 - .align 16 -SHIFTER: - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .type SHIFTER,@object - .size SHIFTER,16 - .align 16 -P_1: - .long 1413480448 - .long 1069097467 - .long 1413480448 - .long 1069097467 - .type P_1,@object - .size P_1,16 - .align 16 -P_2: - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .type P_2,@object - .size P_2,16 - .align 16 -SC_4: - .long 2773927732 - .long 1053236707 - .long 436314138 - .long 1056571808 - .type SC_4,@object - .size SC_4,16 - .align 16 -Ctable: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 3217031168 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 3220176896 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 1069547520 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 1071644672 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 1072693248 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 1069547520 - .type Ctable,@object - .size Ctable,4096 - .space 512, 0x00 # pad - .align 16 -P_3: - .long 771977331 - .long 996350346 - .long 771977331 - .long 996350346 - .type P_3,@object - .size P_3,16 - .align 16 -SC_2: - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .type SC_2,@object - .size SC_2,16 - .align 16 -SC_3: - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .type SC_3,@object - .size SC_3,16 - .align 16 -SC_1: - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .type SC_1,@object - .size SC_1,16 - .align 16 -TWO_POW_55: - .long 0 - .long 1130364928 - .type TWO_POW_55,@object - .size TWO_POW_55,8 - .align 8 -ONE: - .long 0 - .long 1072693248 - .type ONE,@object - .size ONE,8 - .align 8 -ALL_ONES: - .long 4294967295 - .long 1072693247 - .type ALL_ONES,@object - .size ALL_ONES,8 - .align 8 -TWO_POW_M55: - .long 0 - .long 3162505216 - .type TWO_POW_M55,@object - .size TWO_POW_M55,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_strtoull.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_strtoull.S deleted file mode 100644 index 7ac4bbcccd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/libm_strtoull.S +++ /dev/null @@ -1,1006 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "libm_strtoull.c" - .text -..TXTST0: -# -- Begin __libm_conv_strtoull - .text - .align 16,0x90 - .globl __libm_conv_strtoull -__libm_conv_strtoull: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value___libm_conv_strtoull.1: -..L2: - - movq %rdi, %rdx - xorl %esi, %esi - testq %rdi, %rdi - je ..B1.7 -..B1.2: - movsbl (%rdi), %eax - testl %eax, %eax - je ..B1.7 -..B1.4: - incq %rdx - incl %esi - cmpb $0, (%rdx) - jne ..B1.4 -..B1.5: - testl %esi, %esi - je ..B1.7 -..B1.6: - lea -48(%rax), %ecx - cmpl $9, %ecx - jbe ..B1.8 -..B1.7: - xorl %eax, %eax - jmp ..B1.21 -..B1.8: - cmpl $48, %eax - je ..B1.23 -..B1.9: - movl $1, %ecx - cmpl $1, %esi - jle ..B1.14 -..B1.10: - movslq %esi, %rax -..B1.11: - movsbl (%rcx,%rdi), %r8d - addl $-48, %r8d - cmpl $9, %r8d - ja ..B1.7 -..B1.12: - incq %rcx - cmpq %rax, %rcx - jl ..B1.11 -..B1.14: - movl $64, %ecx - cmpl $64, %esi - cmovb %esi, %ecx - xorl %eax, %eax - testl %esi, %esi - jle ..B1.21 -..B1.15: - movl %ecx, %r9d - xorl %r10d, %r10d - shrl $1, %r9d - movl $1, %edi - xorl %r8d, %r8d - xorl %r11d, %r11d - testl %r9d, %r9d - jbe ..B1.19 -..B1.16: - movq %r12, -8(%rsp) - xorl %edi, %edi - lea _C_MUL_10_POW_I(%rip), %rsi - .cfi_offset 12, -16 -..B1.17: - movb -1(%r11,%rdx), %r12b - incl %r8d - addb $-48, %r12b - movsbq %r12b, %r12 - lea (%rsi,%r12,8), %r12 - addq (%r12,%r10), %rax - movb -2(%r11,%rdx), %r12b - addq $-2, %r11 - addb $-48, %r12b - movsbq %r12b, %r12 - lea (%rsi,%r12,8), %r12 - addq 80(%r12,%r10), %rdi - addq $160, %r10 - cmpl %r9d, %r8d - jb ..B1.17 -..B1.18: - movq -8(%rsp), %r12 - .cfi_restore 12 - addq %rdi, %rax - lea 1(%r8,%r8), %edi -..B1.19: - lea -1(%rdi), %esi - cmpl %esi, %ecx - jbe ..B1.21 -..B1.20: - movslq %edi, %rdi - lea _C_MUL_10_POW_I(%rip), %r8 - subq %rdi, %rdx - lea (%rdi,%rdi,4), %rcx - movb (%rdx), %dl - addb $-48, %dl - movsbq %dl, %rsi - shlq $4, %rcx - lea (%rcx,%rsi,8), %r9 - addq -80(%r8,%r9), %rax -..B1.21: - ret -..B1.23: - cmpl $3, %esi - jl ..B1.25 -..B1.24: - movsbl 1(%rdi), %eax - andl $-33, %eax - cmpl $88, %eax - je ..B1.38 -..B1.25: - movl $1, %ecx - cmpl $1, %esi - jle ..B1.30 -..B1.26: - movslq %esi, %rax -..B1.27: - movsbl (%rcx,%rdi), %r8d - addl $-48, %r8d - cmpl $7, %r8d - ja ..B1.7 -..B1.28: - incq %rcx - cmpq %rax, %rcx - jl ..B1.27 -..B1.30: - decl %esi - movl $22, %r8d - cmpl $22, %esi - cmovb %esi, %r8d - xorl %eax, %eax - testl %esi, %esi - jle ..B1.21 -..B1.31: - movl %r8d, %edi - xorl %esi, %esi - shrl $1, %edi - xorl %r9d, %r9d - movl $1, %r11d - xorl %r10d, %r10d - testl %edi, %edi - jbe ..B1.35 -..B1.32: - movq %r12, -8(%rsp) - xorl %r11d, %r11d - .cfi_offset 12, -16 -..B1.33: - movslq %r9d, %r9 - movl %r10d, %ecx - incl %esi - movb -1(%r9,%rdx), %r12b - addb $-48, %r12b - movsbq %r12b, %r12 - shlq %cl, %r12 - lea 3(%r10), %ecx - addq %r12, %rax - addl $6, %r10d - movb -2(%r9,%rdx), %r12b - addl $-2, %r9d - addb $-48, %r12b - movsbq %r12b, %r12 - shlq %cl, %r12 - addq %r12, %r11 - cmpl %edi, %esi - jb ..B1.33 -..B1.34: - movq -8(%rsp), %r12 - .cfi_restore 12 - addq %r11, %rax - lea 1(%rsi,%rsi), %r11d -..B1.35: - lea -1(%r11), %ecx - cmpl %ecx, %r8d - jbe ..B1.21 -..B1.36: - movslq %r11d, %r11 - subq %r11, %rdx - lea 61(%r11,%r11,2), %ecx - movb (%rdx), %dl - addb $-48, %dl - movsbq %dl, %rsi - shlq %cl, %rsi - addq %rsi, %rax - jmp ..B1.21 -..B1.38: - movslq %esi, %rax - xorl %ecx, %ecx - addq $-2, %rax -..B1.39: - movsbl 2(%rcx,%rdi), %r9d - lea -48(%r9), %r8d - cmpl $9, %r8d - jbe ..B1.42 -..B1.40: - lea -97(%r9), %r8d - cmpl $5, %r8d - jbe ..B1.42 -..B1.41: - addl $-65, %r9d - cmpl $5, %r9d - ja ..B1.7 -..B1.42: - incq %rcx - cmpq %rax, %rcx - jb ..B1.39 -..B1.43: - addl $-2, %esi - movl $16, %r9d - cmpl $16, %esi - cmovb %esi, %r9d - xorl %eax, %eax - testl %esi, %esi - jle ..B1.21 -..B1.44: - movl %r9d, %r8d - xorl %r10d, %r10d - shrl $1, %r8d - movl $1, %ecx - xorl %r11d, %r11d - testl %r8d, %r8d - jbe ..B1.54 -..B1.45: - movq %r12, -8(%rsp) - .cfi_offset 12, -16 -..B1.46: - movslq %r11d, %rsi - movsbl -1(%rsi,%rdx), %edi - lea -48(%rdi), %ecx - cmpl $9, %ecx - ja ..B1.48 -..B1.47: - movsbq %cl, %rdi - jmp ..B1.49 -..B1.48: - lea -97(%rdi), %ecx - lea -87(%rdi), %r12d - addl $-55, %edi - cmpl $5, %ecx - movsbq %r12b, %r12 - movsbq %dil, %rdi - cmovbe %r12, %rdi -..B1.49: - lea (,%r10,8), %ecx - shlq %cl, %rdi - movsbl -2(%rsi,%rdx), %ecx - addq %rdi, %rax - lea -48(%rcx), %esi - cmpl $9, %esi - ja ..B1.51 -..B1.50: - movsbq %sil, %rsi - jmp ..B1.52 -..B1.51: - lea -97(%rcx), %edi - lea -87(%rcx), %esi - addl $-55, %ecx - cmpl $5, %edi - movsbq %sil, %r12 - movsbq %cl, %rsi - cmovbe %r12, %rsi -..B1.52: - addl $-2, %r11d - lea 4(,%r10,8), %ecx - shlq %cl, %rsi - incl %r10d - addq %rsi, %rax - cmpl %r8d, %r10d - jb ..B1.46 -..B1.53: - movq -8(%rsp), %r12 - .cfi_restore 12 - lea 1(%r10,%r10), %ecx -..B1.54: - lea -1(%rcx), %esi - cmpl %esi, %r9d - jbe ..B1.21 -..B1.55: - movslq %ecx, %rcx - subq %rcx, %rdx - movsbl (%rdx), %esi - lea -48(%rsi), %edx - cmpl $9, %edx - ja ..B1.57 -..B1.56: - movsbq %dl, %rdx - jmp ..B1.58 -..B1.57: - lea -97(%rsi), %edi - lea -87(%rsi), %edx - addl $-55, %esi - cmpl $5, %edi - movsbq %dl, %r8 - movsbq %sil, %rdx - cmovbe %r8, %rdx -..B1.58: - lea 60(,%rcx,4), %ecx - shlq %cl, %rdx - addq %rdx, %rax - jmp ..B1.21 - .align 16,0x90 - .cfi_endproc - .type __libm_conv_strtoull,@function - .size __libm_conv_strtoull,.-__libm_conv_strtoull - .data -# -- End __libm_conv_strtoull - .section .rodata, "a" - .align 8 - .align 8 -_C_MUL_10_POW_I: - .long 0x00000000,0x00000000 - .long 0x00000001,0x00000000 - .long 0x00000002,0x00000000 - .long 0x00000003,0x00000000 - .long 0x00000004,0x00000000 - .long 0x00000005,0x00000000 - .long 0x00000006,0x00000000 - .long 0x00000007,0x00000000 - .long 0x00000008,0x00000000 - .long 0x00000009,0x00000000 - .long 0x00000000,0x00000000 - .long 0x0000000a,0x00000000 - .long 0x00000014,0x00000000 - .long 0x0000001e,0x00000000 - .long 0x00000028,0x00000000 - .long 0x00000032,0x00000000 - .long 0x0000003c,0x00000000 - .long 0x00000046,0x00000000 - .long 0x00000050,0x00000000 - .long 0x0000005a,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000064,0x00000000 - .long 0x000000c8,0x00000000 - .long 0x0000012c,0x00000000 - .long 0x00000190,0x00000000 - .long 0x000001f4,0x00000000 - .long 0x00000258,0x00000000 - .long 0x000002bc,0x00000000 - .long 0x00000320,0x00000000 - .long 0x00000384,0x00000000 - .long 0x00000000,0x00000000 - .long 0x000003e8,0x00000000 - .long 0x000007d0,0x00000000 - .long 0x00000bb8,0x00000000 - .long 0x00000fa0,0x00000000 - .long 0x00001388,0x00000000 - .long 0x00001770,0x00000000 - .long 0x00001b58,0x00000000 - .long 0x00001f40,0x00000000 - .long 0x00002328,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00002710,0x00000000 - .long 0x00004e20,0x00000000 - .long 0x00007530,0x00000000 - .long 0x00009c40,0x00000000 - .long 0x0000c350,0x00000000 - .long 0x0000ea60,0x00000000 - .long 0x00011170,0x00000000 - .long 0x00013880,0x00000000 - .long 0x00015f90,0x00000000 - .long 0x00000000,0x00000000 - .long 0x000186a0,0x00000000 - .long 0x00030d40,0x00000000 - .long 0x000493e0,0x00000000 - .long 0x00061a80,0x00000000 - .long 0x0007a120,0x00000000 - .long 0x000927c0,0x00000000 - .long 0x000aae60,0x00000000 - .long 0x000c3500,0x00000000 - .long 0x000dbba0,0x00000000 - .long 0x00000000,0x00000000 - .long 0x000f4240,0x00000000 - .long 0x001e8480,0x00000000 - .long 0x002dc6c0,0x00000000 - .long 0x003d0900,0x00000000 - .long 0x004c4b40,0x00000000 - .long 0x005b8d80,0x00000000 - .long 0x006acfc0,0x00000000 - .long 0x007a1200,0x00000000 - .long 0x00895440,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00989680,0x00000000 - .long 0x01312d00,0x00000000 - .long 0x01c9c380,0x00000000 - .long 0x02625a00,0x00000000 - .long 0x02faf080,0x00000000 - .long 0x03938700,0x00000000 - .long 0x042c1d80,0x00000000 - .long 0x04c4b400,0x00000000 - .long 0x055d4a80,0x00000000 - .long 0x00000000,0x00000000 - .long 0x05f5e100,0x00000000 - .long 0x0bebc200,0x00000000 - .long 0x11e1a300,0x00000000 - .long 0x17d78400,0x00000000 - .long 0x1dcd6500,0x00000000 - .long 0x23c34600,0x00000000 - .long 0x29b92700,0x00000000 - .long 0x2faf0800,0x00000000 - .long 0x35a4e900,0x00000000 - .long 0x00000000,0x00000000 - .long 0x3b9aca00,0x00000000 - .long 0x77359400,0x00000000 - .long 0xb2d05e00,0x00000000 - .long 0xee6b2800,0x00000000 - .long 0x2a05f200,0x00000001 - .long 0x65a0bc00,0x00000001 - .long 0xa13b8600,0x00000001 - .long 0xdcd65000,0x00000001 - .long 0x18711a00,0x00000002 - .long 0x00000000,0x00000000 - .long 0x540be400,0x00000002 - .long 0xa817c800,0x00000004 - .long 0xfc23ac00,0x00000006 - .long 0x502f9000,0x00000009 - .long 0xa43b7400,0x0000000b - .long 0xf8475800,0x0000000d - .long 0x4c533c00,0x00000010 - .long 0xa05f2000,0x00000012 - .long 0xf46b0400,0x00000014 - .long 0x00000000,0x00000000 - .long 0x4876e800,0x00000017 - .long 0x90edd000,0x0000002e - .long 0xd964b800,0x00000045 - .long 0x21dba000,0x0000005d - .long 0x6a528800,0x00000074 - .long 0xb2c97000,0x0000008b - .long 0xfb405800,0x000000a2 - .long 0x43b74000,0x000000ba - .long 0x8c2e2800,0x000000d1 - .long 0x00000000,0x00000000 - .long 0xd4a51000,0x000000e8 - .long 0xa94a2000,0x000001d1 - .long 0x7def3000,0x000002ba - .long 0x52944000,0x000003a3 - .long 0x27395000,0x0000048c - .long 0xfbde6000,0x00000574 - .long 0xd0837000,0x0000065d - .long 0xa5288000,0x00000746 - .long 0x79cd9000,0x0000082f - .long 0x00000000,0x00000000 - .long 0x4e72a000,0x00000918 - .long 0x9ce54000,0x00001230 - .long 0xeb57e000,0x00001b48 - .long 0x39ca8000,0x00002461 - .long 0x883d2000,0x00002d79 - .long 0xd6afc000,0x00003691 - .long 0x25226000,0x00003faa - .long 0x73950000,0x000048c2 - .long 0xc207a000,0x000051da - .long 0x00000000,0x00000000 - .long 0x107a4000,0x00005af3 - .long 0x20f48000,0x0000b5e6 - .long 0x316ec000,0x000110d9 - .long 0x41e90000,0x00016bcc - .long 0x52634000,0x0001c6bf - .long 0x62dd8000,0x000221b2 - .long 0x7357c000,0x00027ca5 - .long 0x83d20000,0x0002d798 - .long 0x944c4000,0x0003328b - .long 0x00000000,0x00000000 - .long 0xa4c68000,0x00038d7e - .long 0x498d0000,0x00071afd - .long 0xee538000,0x000aa87b - .long 0x931a0000,0x000e35fa - .long 0x37e08000,0x0011c379 - .long 0xdca70000,0x001550f7 - .long 0x816d8000,0x0018de76 - .long 0x26340000,0x001c6bf5 - .long 0xcafa8000,0x001ff973 - .long 0x00000000,0x00000000 - .long 0x6fc10000,0x002386f2 - .long 0xdf820000,0x00470de4 - .long 0x4f430000,0x006a94d7 - .long 0xbf040000,0x008e1bc9 - .long 0x2ec50000,0x00b1a2bc - .long 0x9e860000,0x00d529ae - .long 0x0e470000,0x00f8b0a1 - .long 0x7e080000,0x011c3793 - .long 0xedc90000,0x013fbe85 - .long 0x00000000,0x00000000 - .long 0x5d8a0000,0x01634578 - .long 0xbb140000,0x02c68af0 - .long 0x189e0000,0x0429d069 - .long 0x76280000,0x058d15e1 - .long 0xd3b20000,0x06f05b59 - .long 0x313c0000,0x0853a0d2 - .long 0x8ec60000,0x09b6e64a - .long 0xec500000,0x0b1a2bc2 - .long 0x49da0000,0x0c7d713b - .long 0x00000000,0x00000000 - .long 0xa7640000,0x0de0b6b3 - .long 0x4ec80000,0x1bc16d67 - .long 0xf62c0000,0x29a2241a - .long 0x9d900000,0x3782dace - .long 0x44f40000,0x45639182 - .long 0xec580000,0x53444835 - .long 0x93bc0000,0x6124fee9 - .long 0x3b200000,0x6f05b59d - .long 0xe2840000,0x7ce66c50 - .long 0x00000000,0x00000000 - .long 0x89e80000,0x8ac72304 - .long 0x13d00000,0x158e4609 - .long 0x9db80000,0xa055690d - .long 0x27a00000,0x2b1c8c12 - .long 0xb1880000,0xb5e3af16 - .long 0x3b700000,0x40aad21b - .long 0xc5580000,0xcb71f51f - .long 0x4f400000,0x56391824 - .long 0xd9280000,0xe1003b28 - .long 0x00000000,0x00000000 - .long 0x63100000,0x6bc75e2d - .long 0xc6200000,0xd78ebc5a - .long 0x29300000,0x43561a88 - .long 0x8c400000,0xaf1d78b5 - .long 0xef500000,0x1ae4d6e2 - .long 0x52600000,0x86ac3510 - .long 0xb5700000,0xf273933d - .long 0x18800000,0x5e3af16b - .long 0x7b900000,0xca024f98 - .long 0x00000000,0x00000000 - .long 0xdea00000,0x35c9adc5 - .long 0xbd400000,0x6b935b8b - .long 0x9be00000,0xa15d0951 - .long 0x7a800000,0xd726b717 - .long 0x59200000,0x0cf064dd - .long 0x37c00000,0x42ba12a3 - .long 0x16600000,0x7883c069 - .long 0xf5000000,0xae4d6e2e - .long 0xd3a00000,0xe4171bf4 - .long 0x00000000,0x00000000 - .long 0xb2400000,0x19e0c9ba - .long 0x64800000,0x33c19375 - .long 0x16c00000,0x4da25d30 - .long 0xc9000000,0x678326ea - .long 0x7b400000,0x8163f0a5 - .long 0x2d800000,0x9b44ba60 - .long 0xdfc00000,0xb525841a - .long 0x92000000,0xcf064dd5 - .long 0x44400000,0xe8e71790 - .long 0x00000000,0x00000000 - .long 0xf6800000,0x02c7e14a - .long 0xed000000,0x058fc295 - .long 0xe3800000,0x0857a3e0 - .long 0xda000000,0x0b1f852b - .long 0xd0800000,0x0de76676 - .long 0xc7000000,0x10af47c1 - .long 0xbd800000,0x1377290c - .long 0xb4000000,0x163f0a57 - .long 0xaa800000,0x1906eba2 - .long 0x00000000,0x00000000 - .long 0xa1000000,0x1bcecced - .long 0x42000000,0x379d99db - .long 0xe3000000,0x536c66c8 - .long 0x84000000,0x6f3b33b6 - .long 0x25000000,0x8b0a00a4 - .long 0xc6000000,0xa6d8cd91 - .long 0x67000000,0xc2a79a7f - .long 0x08000000,0xde76676d - .long 0xa9000000,0xfa45345a - .long 0x00000000,0x00000000 - .long 0x4a000000,0x16140148 - .long 0x94000000,0x2c280290 - .long 0xde000000,0x423c03d8 - .long 0x28000000,0x58500521 - .long 0x72000000,0x6e640669 - .long 0xbc000000,0x847807b1 - .long 0x06000000,0x9a8c08fa - .long 0x50000000,0xb0a00a42 - .long 0x9a000000,0xc6b40b8a - .long 0x00000000,0x00000000 - .long 0xe4000000,0xdcc80cd2 - .long 0xc8000000,0xb99019a5 - .long 0xac000000,0x96582678 - .long 0x90000000,0x7320334b - .long 0x74000000,0x4fe8401e - .long 0x58000000,0x2cb04cf1 - .long 0x3c000000,0x097859c4 - .long 0x20000000,0xe6406697 - .long 0x04000000,0xc308736a - .long 0x00000000,0x00000000 - .long 0xe8000000,0x9fd0803c - .long 0xd0000000,0x3fa10079 - .long 0xb8000000,0xdf7180b6 - .long 0xa0000000,0x7f4200f3 - .long 0x88000000,0x1f128130 - .long 0x70000000,0xbee3016d - .long 0x58000000,0x5eb381aa - .long 0x40000000,0xfe8401e7 - .long 0x28000000,0x9e548224 - .long 0x00000000,0x00000000 - .long 0x10000000,0x3e250261 - .long 0x20000000,0x7c4a04c2 - .long 0x30000000,0xba6f0723 - .long 0x40000000,0xf8940984 - .long 0x50000000,0x36b90be5 - .long 0x60000000,0x74de0e46 - .long 0x70000000,0xb30310a7 - .long 0x80000000,0xf1281308 - .long 0x90000000,0x2f4d1569 - .long 0x00000000,0x00000000 - .long 0xa0000000,0x6d7217ca - .long 0x40000000,0xdae42f95 - .long 0xe0000000,0x4856475f - .long 0x80000000,0xb5c85f2a - .long 0x20000000,0x233a76f5 - .long 0xc0000000,0x90ac8ebf - .long 0x60000000,0xfe1ea68a - .long 0x00000000,0x6b90be55 - .long 0xa0000000,0xd902d61f - .long 0x00000000,0x00000000 - .long 0x40000000,0x4674edea - .long 0x80000000,0x8ce9dbd4 - .long 0xc0000000,0xd35ec9be - .long 0x00000000,0x19d3b7a9 - .long 0x40000000,0x6048a593 - .long 0x80000000,0xa6bd937d - .long 0xc0000000,0xed328167 - .long 0x00000000,0x33a76f52 - .long 0x40000000,0x7a1c5d3c - .long 0x00000000,0x00000000 - .long 0x80000000,0xc0914b26 - .long 0x00000000,0x8122964d - .long 0x80000000,0x41b3e173 - .long 0x00000000,0x02452c9a - .long 0x80000000,0xc2d677c0 - .long 0x00000000,0x8367c2e7 - .long 0x80000000,0x43f90e0d - .long 0x00000000,0x048a5934 - .long 0x80000000,0xc51ba45a - .long 0x00000000,0x00000000 - .long 0x00000000,0x85acef81 - .long 0x00000000,0x0b59df02 - .long 0x00000000,0x9106ce83 - .long 0x00000000,0x16b3be04 - .long 0x00000000,0x9c60ad85 - .long 0x00000000,0x220d9d06 - .long 0x00000000,0xa7ba8c87 - .long 0x00000000,0x2d677c08 - .long 0x00000000,0xb3146b89 - .long 0x00000000,0x00000000 - .long 0x00000000,0x38c15b0a - .long 0x00000000,0x7182b614 - .long 0x00000000,0xaa44111e - .long 0x00000000,0xe3056c28 - .long 0x00000000,0x1bc6c732 - .long 0x00000000,0x5488223c - .long 0x00000000,0x8d497d46 - .long 0x00000000,0xc60ad850 - .long 0x00000000,0xfecc335a - .long 0x00000000,0x00000000 - .long 0x00000000,0x378d8e64 - .long 0x00000000,0x6f1b1cc8 - .long 0x00000000,0xa6a8ab2c - .long 0x00000000,0xde363990 - .long 0x00000000,0x15c3c7f4 - .long 0x00000000,0x4d515658 - .long 0x00000000,0x84dee4bc - .long 0x00000000,0xbc6c7320 - .long 0x00000000,0xf3fa0184 - .long 0x00000000,0x00000000 - .long 0x00000000,0x2b878fe8 - .long 0x00000000,0x570f1fd0 - .long 0x00000000,0x8296afb8 - .long 0x00000000,0xae1e3fa0 - .long 0x00000000,0xd9a5cf88 - .long 0x00000000,0x052d5f70 - .long 0x00000000,0x30b4ef58 - .long 0x00000000,0x5c3c7f40 - .long 0x00000000,0x87c40f28 - .long 0x00000000,0x00000000 - .long 0x00000000,0xb34b9f10 - .long 0x00000000,0x66973e20 - .long 0x00000000,0x19e2dd30 - .long 0x00000000,0xcd2e7c40 - .long 0x00000000,0x807a1b50 - .long 0x00000000,0x33c5ba60 - .long 0x00000000,0xe7115970 - .long 0x00000000,0x9a5cf880 - .long 0x00000000,0x4da89790 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00f436a0 - .long 0x00000000,0x01e86d40 - .long 0x00000000,0x02dca3e0 - .long 0x00000000,0x03d0da80 - .long 0x00000000,0x04c51120 - .long 0x00000000,0x05b947c0 - .long 0x00000000,0x06ad7e60 - .long 0x00000000,0x07a1b500 - .long 0x00000000,0x0895eba0 - .long 0x00000000,0x00000000 - .long 0x00000000,0x098a2240 - .long 0x00000000,0x13144480 - .long 0x00000000,0x1c9e66c0 - .long 0x00000000,0x26288900 - .long 0x00000000,0x2fb2ab40 - .long 0x00000000,0x393ccd80 - .long 0x00000000,0x42c6efc0 - .long 0x00000000,0x4c511200 - .long 0x00000000,0x55db3440 - .long 0x00000000,0x00000000 - .long 0x00000000,0x5f655680 - .long 0x00000000,0xbecaad00 - .long 0x00000000,0x1e300380 - .long 0x00000000,0x7d955a00 - .long 0x00000000,0xdcfab080 - .long 0x00000000,0x3c600700 - .long 0x00000000,0x9bc55d80 - .long 0x00000000,0xfb2ab400 - .long 0x00000000,0x5a900a80 - .long 0x00000000,0x00000000 - .long 0x00000000,0xb9f56100 - .long 0x00000000,0x73eac200 - .long 0x00000000,0x2de02300 - .long 0x00000000,0xe7d58400 - .long 0x00000000,0xa1cae500 - .long 0x00000000,0x5bc04600 - .long 0x00000000,0x15b5a700 - .long 0x00000000,0xcfab0800 - .long 0x00000000,0x89a06900 - .long 0x00000000,0x00000000 - .long 0x00000000,0x4395ca00 - .long 0x00000000,0x872b9400 - .long 0x00000000,0xcac15e00 - .long 0x00000000,0x0e572800 - .long 0x00000000,0x51ecf200 - .long 0x00000000,0x9582bc00 - .long 0x00000000,0xd9188600 - .long 0x00000000,0x1cae5000 - .long 0x00000000,0x60441a00 - .long 0x00000000,0x00000000 - .long 0x00000000,0xa3d9e400 - .long 0x00000000,0x47b3c800 - .long 0x00000000,0xeb8dac00 - .long 0x00000000,0x8f679000 - .long 0x00000000,0x33417400 - .long 0x00000000,0xd71b5800 - .long 0x00000000,0x7af53c00 - .long 0x00000000,0x1ecf2000 - .long 0x00000000,0xc2a90400 - .long 0x00000000,0x00000000 - .long 0x00000000,0x6682e800 - .long 0x00000000,0xcd05d000 - .long 0x00000000,0x3388b800 - .long 0x00000000,0x9a0ba000 - .long 0x00000000,0x008e8800 - .long 0x00000000,0x67117000 - .long 0x00000000,0xcd945800 - .long 0x00000000,0x34174000 - .long 0x00000000,0x9a9a2800 - .long 0x00000000,0x00000000 - .long 0x00000000,0x011d1000 - .long 0x00000000,0x023a2000 - .long 0x00000000,0x03573000 - .long 0x00000000,0x04744000 - .long 0x00000000,0x05915000 - .long 0x00000000,0x06ae6000 - .long 0x00000000,0x07cb7000 - .long 0x00000000,0x08e88000 - .long 0x00000000,0x0a059000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x0b22a000 - .long 0x00000000,0x16454000 - .long 0x00000000,0x2167e000 - .long 0x00000000,0x2c8a8000 - .long 0x00000000,0x37ad2000 - .long 0x00000000,0x42cfc000 - .long 0x00000000,0x4df26000 - .long 0x00000000,0x59150000 - .long 0x00000000,0x6437a000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x6f5a4000 - .long 0x00000000,0xdeb48000 - .long 0x00000000,0x4e0ec000 - .long 0x00000000,0xbd690000 - .long 0x00000000,0x2cc34000 - .long 0x00000000,0x9c1d8000 - .long 0x00000000,0x0b77c000 - .long 0x00000000,0x7ad20000 - .long 0x00000000,0xea2c4000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x59868000 - .long 0x00000000,0xb30d0000 - .long 0x00000000,0x0c938000 - .long 0x00000000,0x661a0000 - .long 0x00000000,0xbfa08000 - .long 0x00000000,0x19270000 - .long 0x00000000,0x72ad8000 - .long 0x00000000,0xcc340000 - .long 0x00000000,0x25ba8000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x7f410000 - .long 0x00000000,0xfe820000 - .long 0x00000000,0x7dc30000 - .long 0x00000000,0xfd040000 - .long 0x00000000,0x7c450000 - .long 0x00000000,0xfb860000 - .long 0x00000000,0x7ac70000 - .long 0x00000000,0xfa080000 - .long 0x00000000,0x79490000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xf88a0000 - .long 0x00000000,0xf1140000 - .long 0x00000000,0xe99e0000 - .long 0x00000000,0xe2280000 - .long 0x00000000,0xdab20000 - .long 0x00000000,0xd33c0000 - .long 0x00000000,0xcbc60000 - .long 0x00000000,0xc4500000 - .long 0x00000000,0xbcda0000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xb5640000 - .long 0x00000000,0x6ac80000 - .long 0x00000000,0x202c0000 - .long 0x00000000,0xd5900000 - .long 0x00000000,0x8af40000 - .long 0x00000000,0x40580000 - .long 0x00000000,0xf5bc0000 - .long 0x00000000,0xab200000 - .long 0x00000000,0x60840000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x15e80000 - .long 0x00000000,0x2bd00000 - .long 0x00000000,0x41b80000 - .long 0x00000000,0x57a00000 - .long 0x00000000,0x6d880000 - .long 0x00000000,0x83700000 - .long 0x00000000,0x99580000 - .long 0x00000000,0xaf400000 - .long 0x00000000,0xc5280000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xdb100000 - .long 0x00000000,0xb6200000 - .long 0x00000000,0x91300000 - .long 0x00000000,0x6c400000 - .long 0x00000000,0x47500000 - .long 0x00000000,0x22600000 - .long 0x00000000,0xfd700000 - .long 0x00000000,0xd8800000 - .long 0x00000000,0xb3900000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x8ea00000 - .long 0x00000000,0x1d400000 - .long 0x00000000,0xabe00000 - .long 0x00000000,0x3a800000 - .long 0x00000000,0xc9200000 - .long 0x00000000,0x57c00000 - .long 0x00000000,0xe6600000 - .long 0x00000000,0x75000000 - .long 0x00000000,0x03a00000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x92400000 - .long 0x00000000,0x24800000 - .long 0x00000000,0xb6c00000 - .long 0x00000000,0x49000000 - .long 0x00000000,0xdb400000 - .long 0x00000000,0x6d800000 - .long 0x00000000,0xffc00000 - .long 0x00000000,0x92000000 - .long 0x00000000,0x24400000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xb6800000 - .long 0x00000000,0x6d000000 - .long 0x00000000,0x23800000 - .long 0x00000000,0xda000000 - .long 0x00000000,0x90800000 - .long 0x00000000,0x47000000 - .long 0x00000000,0xfd800000 - .long 0x00000000,0xb4000000 - .long 0x00000000,0x6a800000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x21000000 - .long 0x00000000,0x42000000 - .long 0x00000000,0x63000000 - .long 0x00000000,0x84000000 - .long 0x00000000,0xa5000000 - .long 0x00000000,0xc6000000 - .long 0x00000000,0xe7000000 - .long 0x00000000,0x08000000 - .long 0x00000000,0x29000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x4a000000 - .long 0x00000000,0x94000000 - .long 0x00000000,0xde000000 - .long 0x00000000,0x28000000 - .long 0x00000000,0x72000000 - .long 0x00000000,0xbc000000 - .long 0x00000000,0x06000000 - .long 0x00000000,0x50000000 - .long 0x00000000,0x9a000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xe4000000 - .long 0x00000000,0xc8000000 - .long 0x00000000,0xac000000 - .long 0x00000000,0x90000000 - .long 0x00000000,0x74000000 - .long 0x00000000,0x58000000 - .long 0x00000000,0x3c000000 - .long 0x00000000,0x20000000 - .long 0x00000000,0x04000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xe8000000 - .long 0x00000000,0xd0000000 - .long 0x00000000,0xb8000000 - .long 0x00000000,0xa0000000 - .long 0x00000000,0x88000000 - .long 0x00000000,0x70000000 - .long 0x00000000,0x58000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x28000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x10000000 - .long 0x00000000,0x20000000 - .long 0x00000000,0x30000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x50000000 - .long 0x00000000,0x60000000 - .long 0x00000000,0x70000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x90000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xa0000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0xe0000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x20000000 - .long 0x00000000,0xc0000000 - .long 0x00000000,0x60000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0xa0000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0xc0000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0xc0000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x40000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x80000000 - .type _C_MUL_10_POW_I,@object - .size _C_MUL_10_POW_I,5120 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrint_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrint_gen.S deleted file mode 100644 index 521d61705a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrint_gen.S +++ /dev/null @@ -1,88 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llrint_gen.c" - .text -..TXTST0: -# -- Begin llrint - .text - .align 16,0x90 - .globl llrint -llrint: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_llrint.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - movq %rsp, %rbp - .cfi_def_cfa 6, 16 - .cfi_offset 6, -16 - subq $16, %rsp - movq $0, -16(%rbp) - movl $0, -8(%rbp) -..B1.2: - pushq %rax - xorpd %xmm1, %xmm1 - stmxcsr -8(%rbp) - andl $-2, -8(%rbp) - ldmxcsr -8(%rbp) - cvtsd2si %xmm0, %rax - addsd %xmm0, %xmm1 - movq %rax, -16(%rbp) - stmxcsr -8(%rbp) - popq %rax -..B1.3: - movq -16(%rbp), %rax - movq %rbp, %rsp - popq %rbp - .cfi_restore 6 - ret - .align 16,0x90 - .cfi_endproc - .type llrint,@function - .size llrint,.-llrint - .data -# -- End llrint - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrintf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrintf_gen.S deleted file mode 100644 index 88e55452d0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrintf_gen.S +++ /dev/null @@ -1,88 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llrintf_gen.c" - .text -..TXTST0: -# -- Begin llrintf - .text - .align 16,0x90 - .globl llrintf -llrintf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_llrintf.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - movq %rsp, %rbp - .cfi_def_cfa 6, 16 - .cfi_offset 6, -16 - subq $16, %rsp - movq $0, -16(%rbp) - movl $0, -8(%rbp) -..B1.2: - pushq %rax - xorpd %xmm1, %xmm1 - stmxcsr -8(%rbp) - andl $-2, -8(%rbp) - ldmxcsr -8(%rbp) - cvtss2si %xmm0, %rax - addss %xmm0, %xmm1 - movq %rax, -16(%rbp) - stmxcsr -8(%rbp) - popq %rax -..B1.3: - movq -16(%rbp), %rax - movq %rbp, %rsp - popq %rbp - .cfi_restore 6 - ret - .align 16,0x90 - .cfi_endproc - .type llrintf,@function - .size llrintf,.-llrintf - .data -# -- End llrintf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrintl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrintl.S deleted file mode 100644 index b2e5f8e7a3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llrintl.S +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llrintl.c" - .text -..TXTST0: -# -- Begin llrintl - .text - .align 16,0x90 - .globl llrintl -llrintl: -# parameter 1: 80 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_llrintl.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - pushq %rbp - .cfi_def_cfa_offset 24 - .cfi_offset 6, -24 - subq $56, %rsp - .cfi_def_cfa_offset 80 - fldt 80(%rsp) - movzbl 89(%rsp), %edi - movzwl 88(%rsp), %r8d - andl $128, %edi - andl $32767, %r8d - shrl $7, %edi - fstpt 32(%rsp) - cmpl $16445, %r8d - jge ..B1.8 -..B1.2: - testl %r8d, %r8d - jne ..B1.6 -..B1.3: - cmpl $0, 84(%rsp) - jne ..B1.5 -..B1.4: - cmpl $0, 80(%rsp) - je ..B1.6 -..B1.5: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 8(%rsp) -..B1.6: - fldt 32(%rsp) - fistpq 16(%rsp) -..B1.7: - movq 16(%rsp), %rax - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.8: - cmpl $16447, %r8d - jge ..B1.21 -..B1.9: - movl %edi, %esi - movq $0x7fffffffffffffff, %rax - addq %rax, %rsi - cmpl $16446, %r8d - jge ..B1.16 -..B1.10: - fnstcw 4(%rsp) -..B1.11: - movl 80(%rsp), %ebx - movl %ebx, %ebp - movzwl 4(%rsp), %r11d - andl $1, %ebp - movl 84(%rsp), %ecx - andl $3072, %r11d - jne ..B1.13 -..B1.12: - movl %ebx, %eax - andl $3, %ebx - movl %ecx, %edx - movl $1, %r9d - cmpl $3, %ebx - movl $0, %ebx - cmovne %ebx, %r9d - shrl $1, %edx - shll $31, %ecx - shrl $1, %eax - orl %eax, %ecx - shlq $32, %rdx - orq %rcx, %rdx - addq %r9, %rdx - jmp ..B1.17 -..B1.13: - movl $1, %eax - xorl %edx, %edx - cmpl $3072, %r11d - cmove %eax, %edx - xorl %r10d, %r10d - cmpl $2048, %r11d - movl %eax, %r9d - cmove %eax, %r10d - testl %edi, %edi - cmove %edi, %r9d - andl %r9d, %r10d - xorl %r9d, %r9d - cmpl $1024, %r11d - cmove %eax, %r9d - xorl %r11d, %r11d - testl %edi, %edi - cmovne %r11d, %eax - orl %r10d, %edx - andl %eax, %r9d - orl %r9d, %edx - je ..B1.15 -..B1.14: - movl %ecx, %edx - shrl $1, %edx - shll $31, %ecx - shrl $1, %ebx - orl %ebx, %ecx - shlq $32, %rdx - orq %rcx, %rdx - jmp ..B1.17 -..B1.15: - movl %ecx, %edx - movl %ebx, %eax - shrl $1, %edx - shll $31, %ecx - shrl $1, %eax - orl %eax, %ecx - shlq $32, %rdx - orq %rcx, %rdx - andq $1, %rbx - addq %rbx, %rdx - jmp ..B1.17 -..B1.16: - movl 84(%rsp), %edx - xorl %ebp, %ebp - shlq $32, %rdx - movl 80(%rsp), %eax - orq %rax, %rdx -..B1.17: - movq %rdx, %rax - xorl %ecx, %ecx - negq %rax - testl %edi, %edi - cmove %rdx, %rax - cmpq %rdx, %rax - setae %cl - cmpq %rsi, %rdx - movl $0, %edx - setbe %dl - testl %edx, %ecx - je ..B1.21 -..B1.18: - testl %ebp, %ebp - je ..B1.20 -..B1.19: - lea _ones(%rip), %rdx - lea _small_value_64(%rip), %rcx - movq %rax, 16(%rsp) - movsd (%rdx), %xmm0 - addsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) -..B1.20: - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.21: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movq $0x8000000000000000, %rcx - cmpl $32767, %r8d - movq %rcx, 16(%rsp) - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 8(%rsp) - jne ..B1.24 -..B1.22: - cmpl $-2147483648, 84(%rsp) - jne ..B1.29 -..B1.23: - cmpl $0, 80(%rsp) - jne ..B1.29 -..B1.24: - fnstcw 2(%rsp) -..B1.25: - movzwl 2(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.26: - orl $-64768, %edx - movw %dx, (%rsp) -..B1.27: - fldcw (%rsp) -..B1.28: - fldcw 2(%rsp) -..B1.29: - movq 16(%rsp), %rax - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type llrintl,@function - .size llrintl,.-llrintl - .data -# -- End llrintl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llround_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llround_gen.S deleted file mode 100644 index 9a4fc739ac..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llround_gen.S +++ /dev/null @@ -1,138 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llround_gen.c" - .text -..TXTST0: -# -- Begin llround - .text - .align 16,0x90 - .globl llround -llround: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_llround.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) - movq $0, 8(%rsp) - movl $0, 16(%rsp) -..B1.2: - stmxcsr 16(%rsp) - movsd (%rsp), %xmm1 - xorpd %xmm2, %xmm2 - andl $-2, 16(%rsp) - ldmxcsr 16(%rsp) - cvtsd2si %xmm1, %rax - addsd %xmm1, %xmm2 - movq %rax, 8(%rsp) - stmxcsr 16(%rsp) -..B1.3: - testb $1, 16(%rsp) - jne ..B1.6 -..B1.4: - pxor %xmm2, %xmm2 - movq 8(%rsp), %rax - cvtsi2sdq %rax, %xmm2 - movsd (%rsp), %xmm1 - movaps %xmm1, %xmm0 - subsd %xmm2, %xmm0 - andps .L_2il0floatpacket.1(%rip), %xmm0 - ucomisd .L_2il0floatpacket.0(%rip), %xmm0 - jp ..B1.5 - je ..B1.7 -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.6: - movq 8(%rsp), %rax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.7: - pxor %xmm0, %xmm0 - comisd %xmm0, %xmm1 - jbe ..B1.10 -..B1.8: - comisd %xmm2, %xmm1 - jbe ..B1.5 -..B1.9: - incq %rax - movq %rax, 8(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.10: - comisd %xmm1, %xmm2 - jbe ..B1.5 -..B1.11: - decq %rax - movq %rax, 8(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type llround,@function - .size llround,.-llround - .data -# -- End llround - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llroundf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llroundf_gen.S deleted file mode 100644 index 9cf1b3a981..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llroundf_gen.S +++ /dev/null @@ -1,138 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llroundf_gen.c" - .text -..TXTST0: -# -- Begin llroundf - .text - .align 16,0x90 - .globl llroundf -llroundf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_llroundf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movss %xmm0, 16(%rsp) - movq $0, (%rsp) - movl $0, 8(%rsp) -..B1.2: - stmxcsr 8(%rsp) - movsd 16(%rsp), %xmm1 - xorpd %xmm2, %xmm2 - andl $-2, 8(%rsp) - ldmxcsr 8(%rsp) - cvtss2si %xmm1, %rax - addss %xmm1, %xmm2 - movq %rax, (%rsp) - stmxcsr 8(%rsp) -..B1.3: - testb $1, 8(%rsp) - jne ..B1.6 -..B1.4: - pxor %xmm2, %xmm2 - movq (%rsp), %rax - cvtsi2ssq %rax, %xmm2 - movss 16(%rsp), %xmm1 - movaps %xmm1, %xmm0 - subss %xmm2, %xmm0 - andps .L_2il0floatpacket.1(%rip), %xmm0 - ucomiss .L_2il0floatpacket.0(%rip), %xmm0 - jp ..B1.5 - je ..B1.7 -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.6: - movq (%rsp), %rax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.7: - pxor %xmm0, %xmm0 - comiss %xmm0, %xmm1 - jbe ..B1.10 -..B1.8: - comiss %xmm2, %xmm1 - jbe ..B1.5 -..B1.9: - incq %rax - movq %rax, (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.10: - comiss %xmm1, %xmm2 - jbe ..B1.5 -..B1.11: - decq %rax - movq %rax, (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type llroundf,@function - .size llroundf,.-llroundf - .data -# -- End llroundf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x7fffffff,0x00000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 4 -.L_2il0floatpacket.0: - .long 0x3f000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llroundl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llroundl.S deleted file mode 100644 index 5b390da096..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/llroundl.S +++ /dev/null @@ -1,236 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "llroundl.c" - .text -..TXTST0: -# -- Begin llroundl - .text - .align 16,0x90 - .globl llroundl -llroundl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_llroundl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %dl, %dl -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movb 57(%rsp), %r8b - lea _range(%rip), %rdi - andb $-128, %r8b - shrb $7, %r8b - movzbl %r8b, %eax - movq %rax, %rsi - shlq $4, %rsi - movzwl 56(%rsp), %r9d - andl $32767, %r9d - movzwl 8(%rsi,%rdi), %ecx - andl $32767, %ecx - cmpl %ecx, %r9d - jl ..B1.8 -..B1.4: - jne ..B1.16 -..B1.5: - movl 52(%rsp), %ecx - cmpl 4(%rsi,%rdi), %ecx - jb ..B1.8 -..B1.6: - jne ..B1.16 -..B1.7: - movl 48(%rsp), %ecx - cmpl (%rsi,%rdi), %ecx - ja ..B1.16 -..B1.8: - cmpl $16383, %r9d - jl ..B1.10 -..B1.9: - movl %r9d, %edi - negl %edi - movl 52(%rsp), %r10d - movl %r10d, %eax - movl 48(%rsp), %edx - movl %edx, %esi - shlq $32, %r10 - lea 29(%rdi), %ecx - shrl %cl, %eax - addl $62, %edi - shrl %cl, %esi - cmpl $16414, %r9d - movl %edi, %ecx - cmovl %eax, %esi - orq %rdx, %r10 - andl $1, %esi - shrq %cl, %r10 - addq %rsi, %r10 - movq %r10, %r9 - negq %r9 - testb %r8b, %r8b - cmovne %r9, %r10 - movq %r10, %rax - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.10: - cmpl $16382, %r9d - je ..B1.23 -..B1.11: - testl %r9d, %r9d - jne ..B1.15 -..B1.12: - cmpl $0, 52(%rsp) - jne ..B1.14 -..B1.13: - cmpl $0, 48(%rsp) - je ..B1.15 -..B1.14: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, (%rsp) -..B1.15: - xorl %eax, %eax - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.16: - movzwl 34(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.20 -..B1.17: - orl $-64768, %ecx - movw %cx, 32(%rsp) -..B1.18: - fldcw 32(%rsp) -..B1.19: - movb $1, %dl -..B1.20: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - testb %dl, %dl - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) - je ..B1.22 -..B1.21: - fldcw 34(%rsp) -..B1.22: - movq $0x8000000000000000, %rax - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.23: - lea iones(%rip), %rdx - movslq (%rdx,%rax,4), %rax - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type llroundl,@function - .size llroundl,.-llroundl - .data -# -- End llroundl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 2 -_range: - .word 65534 - .word 65535 - .word 65535 - .word 65535 - .word 16445 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49214 - .word 0 - .word 0 - .word 0 - .type _range,@object - .size _range,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10_gen.S deleted file mode 100644 index 24aa936736..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10_gen.S +++ /dev/null @@ -1,784 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log10_gen.c" - .text -..TXTST0: -# -- Begin log10 - .text - .align 16,0x90 - .globl log10 -log10: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_log10.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) -..B1.2: - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movl $1054736384, %ecx - movd %ecx, %xmm7 - xorpd %xmm3, %xmm3 - movl $30704, %edx - pinsrw $3, %edx, %xmm3 - movq %xmm0, %xmm1 - movl $32768, %edx - movd %edx, %xmm4 - movapd HIGHSIGMASK(%rip), %xmm5 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $16352, %ecx - psrlq $27, %xmm0 - movq LOG10_E(%rip), %xmm2 - psrld $2, %xmm0 - rcpps %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $78, %xmm5, %xmm6 - psrlq $12, %xmm1 - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - mulss %xmm7, %xmm0 - orpd %xmm3, %xmm1 - lea L_tbl(%rip), %r11 - andpd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - subsd %xmm5, %xmm1 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm6, %xmm0 - andl $32752, %eax - subl %ecx, %eax - cvtsi2sd %eax, %xmm7 - mulpd %xmm0, %xmm5 - mulsd %xmm0, %xmm1 - movq log2(%rip), %xmm6 - movapd coeff(%rip), %xmm3 - subsd %xmm2, %xmm5 - andl $16711680, %edx - shrl $12, %edx - movapd -1504(%r11,%rdx), %xmm0 - movapd 16+coeff(%rip), %xmm4 - addsd %xmm5, %xmm1 - movapd 32+coeff(%rip), %xmm2 - mulsd %xmm7, %xmm6 - pshufd $68, %xmm1, %xmm5 - mulsd 8+log2(%rip), %xmm7 - mulsd %xmm1, %xmm3 - addsd %xmm6, %xmm0 - mulpd %xmm5, %xmm4 - movq 8+LOG10_E(%rip), %xmm6 - mulpd %xmm5, %xmm5 - addpd %xmm2, %xmm4 - mulpd %xmm5, %xmm3 - pshufd $228, %xmm0, %xmm2 - addsd %xmm1, %xmm0 - mulsd %xmm1, %xmm4 - subsd %xmm0, %xmm2 - mulsd %xmm1, %xmm6 - addsd %xmm2, %xmm1 - pshufd $238, %xmm0, %xmm2 - mulsd %xmm5, %xmm5 - addsd %xmm2, %xmm7 - addsd %xmm6, %xmm1 - addpd %xmm3, %xmm4 - addsd %xmm7, %xmm1 - mulpd %xmm5, %xmm4 - addsd %xmm4, %xmm1 - pshufd $238, %xmm4, %xmm5 - addsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - movq (%rsp), %xmm0 - movq (%rsp), %xmm1 - addl $16, %eax - cmpl $32768, %eax - jae .L_2TAG_PACKET_2.0.2 - cmpl $16, %eax - jb .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_4.0.2: - addsd %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_5.0.2: - ja .L_2TAG_PACKET_4.0.2 - cmpl $0, %edx - ja .L_2TAG_PACKET_4.0.2 - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_3.0.2: - xorpd %xmm1, %xmm1 - addsd %xmm0, %xmm1 - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_7.0.2 - xorpd %xmm1, %xmm1 - movl $18416, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movq %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $18416, %ecx - psrlq $27, %xmm0 - movq LOG10_E(%rip), %xmm2 - psrld $2, %xmm0 - rcpps %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $78, %xmm5, %xmm6 - psrlq $12, %xmm1 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - addl %ecx, %ecx - cmpl $-2097152, %ecx - jae .L_2TAG_PACKET_5.0.2 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_7.0.2 -.L_2TAG_PACKET_6.0.2: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - movl $9, 16(%rsp) - jmp .L_2TAG_PACKET_8.0.2 -.L_2TAG_PACKET_7.0.2: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $49136, %eax - pinsrw $3, %eax, %xmm0 - divsd %xmm1, %xmm0 - movl $8, 16(%rsp) -.L_2TAG_PACKET_8.0.2: - movq %xmm0, 8(%rsp) -..B1.3: - movq 8(%rsp), %xmm0 -.L_2TAG_PACKET_9.0.2: -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type log10,@function - .size log10,.-log10 - .data -# -- End log10 - .section .rodata, "a" - .align 16 - .align 16 -HIGHSIGMASK: - .long 4160749568 - .long 4294967295 - .long 0 - .long 4294959104 - .type HIGHSIGMASK,@object - .size HIGHSIGMASK,16 - .align 16 -LOG10_E: - .long 0 - .long 1071366144 - .long 3207479560 - .long 1062894188 - .type LOG10_E,@object - .size LOG10_E,16 - .align 16 -L_tbl: - .long 1352628224 - .long 1070810131 - .long 521319256 - .long 1025503025 - .long 2150839296 - .long 1070801944 - .long 3329350096 - .long 3170190015 - .long 1360613376 - .long 1070793794 - .long 2024059075 - .long 1024991594 - .long 1875350528 - .long 1070785680 - .long 2163882141 - .long 3163564137 - .long 2312126464 - .long 1070777602 - .long 1975711076 - .long 1023674196 - .long 1306336256 - .long 1070769560 - .long 3524899523 - .long 3170508164 - .long 1806334976 - .long 1070761553 - .long 4254777025 - .long 1025238739 - .long 2483193856 - .long 1070753581 - .long 3800671317 - .long 3172916830 - .long 2025350144 - .long 1070745644 - .long 1731514745 - .long 1025501083 - .long 3433285632 - .long 1070737741 - .long 2551857336 - .long 3169662186 - .long 1134317568 - .long 1070729873 - .long 3426297655 - .long 3172637891 - .long 2457152512 - .long 1070722038 - .long 63549415 - .long 1025415416 - .long 1861803008 - .long 1070714237 - .long 1910171636 - .long 1023977580 - .long 2414140416 - .long 1070706469 - .long 4002514337 - .long 3170841618 - .long 2900726784 - .long 1070698734 - .long 3268064083 - .long 1022459609 - .long 2123517952 - .long 1070691032 - .long 1767031218 - .long 1022448156 - .long 3194569728 - .long 1070683362 - .long 3402332618 - .long 3171671160 - .long 650882048 - .long 1070675725 - .long 4146023905 - .long 3171023038 - .long 1928988672 - .long 1070668119 - .long 1438617867 - .long 1016360491 - .long 1594908672 - .long 1070660545 - .long 971389377 - .long 1024763979 - .long 2818746368 - .long 1070653002 - .long 3555925341 - .long 3172434821 - .long 194584576 - .long 1070645491 - .long 943919215 - .long 3172950063 - .long 1215096832 - .long 1070638010 - .long 2283358588 - .long 1022335098 - .long 501519360 - .long 1070630560 - .long 480904295 - .long 1024437959 - .long 1278266368 - .long 1070623140 - .long 2755806066 - .long 3172342012 - .long 2487812096 - .long 1070615750 - .long 2489653202 - .long 3172481099 - .long 3085451264 - .long 1070608390 - .long 3759184951 - .long 3172574892 - .long 2039090176 - .long 1070601060 - .long 1361176676 - .long 3172355319 - .long 953057280 - .long 1070591423 - .long 1176587546 - .long 3166422018 - .long 3370524672 - .long 1070576879 - .long 3669570051 - .long 1025376630 - .long 749742080 - .long 1070562394 - .long 707700964 - .long 3170814058 - .long 4008353792 - .long 1070547965 - .long 3247327652 - .long 1022431400 - .long 2612455424 - .long 1070533594 - .long 2453457344 - .long 3172322969 - .long 3230920704 - .long 1070519279 - .long 1296781801 - .long 1025115335 - .long 3965253632 - .long 1070505020 - .long 373075289 - .long 1017938528 - .long 2593157120 - .long 1070476669 - .long 1068054086 - .long 1021616576 - .long 925962240 - .long 1070448537 - .long 850121213 - .long 1023928989 - .long 1732556800 - .long 1070420620 - .long 1305206740 - .long 3172665570 - .long 3815630848 - .long 1070392915 - .long 192642943 - .long 3172699907 - .long 2001758208 - .long 1070365420 - .long 2820786683 - .long 1024704867 - .long 16746496 - .long 1070338131 - .long 1399573110 - .long 3171372773 - .long 1886492672 - .long 1070311044 - .long 3621428075 - .long 3172974358 - .long 3338196992 - .long 1070284157 - .long 3793882035 - .long 1025124701 - .long 381769728 - .long 1070257468 - .long 3877933342 - .long 3170195490 - .long 2186491904 - .long 1070230972 - .long 1838687089 - .long 1017927292 - .long 1008330752 - .long 1070204668 - .long 2228321664 - .long 1025352196 - .long 2247065600 - .long 1070178552 - .long 1413900906 - .long 3170902532 - .long 2964070400 - .long 1070152622 - .long 3590454629 - .long 1025016844 - .long 465154048 - .long 1070126876 - .long 2079688550 - .long 3172268183 - .long 883615744 - .long 1070101310 - .long 989244452 - .long 3171900485 - .long 1993768960 - .long 1070075922 - .long 1124327841 - .long 3172964992 - .long 1794471936 - .long 1070050710 - .long 1140575046 - .long 1022673726 - .long 2797932544 - .long 1070025671 - .long 1894836933 - .long 3172544059 - .long 3433797632 - .long 1070000803 - .long 3221831166 - .long 3171921685 - .long 2338371584 - .long 1069976104 - .long 3732461053 - .long 3164513518 - .long 2644013056 - .long 1069951571 - .long 2519460462 - .long 3172548740 - .long 3383814144 - .long 1069927202 - .long 2290997657 - .long 1025499649 - .long 3781380096 - .long 1069902995 - .long 380479405 - .long 1025184136 - .long 3245785088 - .long 1069878948 - .long 1096398261 - .long 3169885192 - .long 1366712320 - .long 1069855059 - .long 2218343715 - .long 3170281628 - .long 2204717056 - .long 1069831325 - .long 2668334011 - .long 1025264524 - .long 1401772032 - .long 1069807745 - .long 4103993159 - .long 1022925721 - .long 3356721152 - .long 1069784316 - .long 3573790772 - .long 3172186527 - .long 4041148416 - .long 1069761037 - .long 4027691910 - .long 3171276990 - .long 3880151040 - .long 1069737906 - .long 4087118786 - .long 3172710734 - .long 3453364224 - .long 1069714921 - .long 99014299 - .long 3172003077 - .long 3491092480 - .long 1069692080 - .long 3801836701 - .long 3172989287 - .long 575580160 - .long 1069669382 - .long 1920406012 - .long 3170874125 - .long 22282240 - .long 1069646824 - .long 964193370 - .long 1019363159 - .long 2991429632 - .long 1069624404 - .long 3372589890 - .long 1023425053 - .long 2189645824 - .long 1069602122 - .long 2610503872 - .long 1023652442 - .long 3341467648 - .long 1069579975 - .long 1190292004 - .long 1022425665 - .long 3711293440 - .long 1069557962 - .long 1104795356 - .long 1023625829 - .long 1380401152 - .long 1069524644 - .long 1156998217 - .long 1025100499 - .long 765710336 - .long 1069481144 - .long 1736649113 - .long 1024999439 - .long 849412096 - .long 1069437902 - .long 2618178330 - .long 3170853629 - .long 1433104384 - .long 1069394915 - .long 43477267 - .long 3170378811 - .long 2548596736 - .long 1069352180 - .long 3967367063 - .long 1025246584 - .long 157577216 - .long 1069309695 - .long 100402533 - .long 3172825502 - .long 3326238720 - .long 1069267455 - .long 1176892909 - .long 1025464099 - .long 4155494400 - .long 1069225459 - .long 3713707617 - .long 3172630046 - .long 3545804800 - .long 1069183704 - .long 857007315 - .long 1024965777 - .long 2602520576 - .long 1069142187 - .long 2588758347 - .long 1022463131 - .long 2631196672 - .long 1069100905 - .long 2118424235 - .long 1022490989 - .long 838135808 - .long 1069059856 - .long 4117002727 - .long 1024874520 - .long 3210903552 - .long 1069019036 - .long 650070125 - .long 3172012966 - .long 3039211520 - .long 1068978444 - .long 438055812 - .long 1017743757 - .long 2385633280 - .long 1068938077 - .long 3011990369 - .long 3171312044 - .long 3491618816 - .long 1068897932 - .long 712813818 - .long 3172720400 - .long 183644160 - .long 1068858008 - .long 4287006742 - .long 1022379728 - .long 3639214080 - .long 1068818300 - .long 353762279 - .long 3172980009 - .long 3728416768 - .long 1068778808 - .long 1851367730 - .long 1025486574 - .long 3370094592 - .long 1068739529 - .long 4046594913 - .long 3172567047 - .long 1348407296 - .long 1068700461 - .long 143189675 - .long 1025397632 - .long 899403776 - .long 1068661601 - .long 3753687842 - .long 3170772772 - .long 1117708288 - .long 1068622947 - .long 1857340812 - .long 3170782678 - .long 1248276480 - .long 1068584497 - .long 1289858203 - .long 1025222289 - .long 683237376 - .long 1068546249 - .long 2356679608 - .long 3171629170 - .long 3253764096 - .long 1068508200 - .long 3267136556 - .long 1018554987 - .long 94478336 - .long 1068441756 - .long 1927868814 - .long 3169378180 - .long 3233144832 - .long 1068366445 - .long 2682188854 - .long 1023964004 - .long 2940297216 - .long 1068291522 - .long 275301289 - .long 1023944679 - .long 3677708288 - .long 1068216982 - .long 302658771 - .long 1024465567 - .long 1576968192 - .long 1068142822 - .long 3672035940 - .long 3172254610 - .long 1614069760 - .long 1068069037 - .long 480052905 - .long 3172692062 - .long 424435712 - .long 1067995624 - .long 2207869657 - .long 3170965436 - .long 3477782528 - .long 1067922578 - .long 2980661858 - .long 3164990018 - .long 3598401536 - .long 1067849897 - .long 1974393034 - .long 3171357083 - .long 2435235840 - .long 1067777577 - .long 1385289011 - .long 1024615823 - .long 1867333632 - .long 1067705614 - .long 3442236633 - .long 1025334384 - .long 3999301632 - .long 1067634004 - .long 3506472073 - .long 1025132546 - .long 2566971392 - .long 1067562745 - .long 1425757592 - .long 3172358463 - .long 112943104 - .long 1067491833 - .long 1693407156 - .long 3172426603 - .long 3079929856 - .long 1067392159 - .long 3999942455 - .long 1018549369 - .long 2443837440 - .long 1067251701 - .long 974534460 - .long 1023963412 - .long 359366656 - .long 1067111917 - .long 2204915018 - .long 1013514416 - .long 3564519424 - .long 1066972799 - .long 3977441659 - .long 3170879860 - .long 2011086848 - .long 1066834343 - .long 590145514 - .long 1025390011 - .long 3216982016 - .long 1066696541 - .long 3629120110 - .long 1024330313 - .long 2194128896 - .long 1066559388 - .long 2367098512 - .long 3172260338 - .long 2916220928 - .long 1066422877 - .long 2262431886 - .long 1021229446 - .long 2263941120 - .long 1066172214 - .long 3118507287 - .long 1021484970 - .long 3076292608 - .long 1065901726 - .long 1411737803 - .long 3172957147 - .long 1186136064 - .long 1065632488 - .long 3109349337 - .long 1025397383 - .long 3085303808 - .long 1065364487 - .long 584715031 - .long 3172596519 - .long 1821048832 - .long 1064842211 - .long 2182246895 - .long 3172536214 - .long 697368576 - .long 1064311094 - .long 3157561765 - .long 3172716357 - .long 894042112 - .long 1063260131 - .long 3237958154 - .long 3172587292 - .long 0 - .long 0 - .long 0 - .long 0 - .type L_tbl,@object - .size L_tbl,2064 - .align 16 -log2: - .long 1352628224 - .long 1066615827 - .long 521319256 - .long 1021308721 - .type log2,@object - .size log2,16 - .align 16 -coeff: - .long 3248877870 - .long 1077250164 - .long 1691676429 - .long 3221787401 - .long 945132465 - .long 3223701783 - .long 3700831335 - .long 1073506818 - .long 2141010593 - .long 1075227551 - .long 3698831637 - .long 3220339442 - .type coeff,@object - .size coeff,48 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10f_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10f_gen.S deleted file mode 100644 index 7bf4ceb71f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10f_gen.S +++ /dev/null @@ -1,285 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log10f_gen.c" - .text -..TXTST0: -# -- Begin log10f - .text - .align 16,0x90 - .globl log10f -log10f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_log10f.1: -..L2: - - movd %xmm0, %edi - movss %xmm0, -8(%rsp) - cmpl $2139095040, %edi - jae ..B1.14 -..B1.2: - lea -1065222144(%rdi), %eax - cmpl $196608, %eax - jae ..B1.7 -..B1.3: - cmpl $1065353216, %edi - jne ..B1.5 -..B1.4: - pxor %xmm3, %xmm3 - jmp ..B1.6 -..B1.5: - movss -8(%rsp), %xmm0 - lea 40+_Q(%rip), %rax - lea 32+_Q(%rip), %rsi - addss .L_2il0floatpacket.0(%rip), %xmm0 - cvtss2sd %xmm0, %xmm0 - movaps %xmm0, %xmm1 - lea 24+_Q(%rip), %rdx - movsd (%rax), %xmm3 - lea 16+_Q(%rip), %rdi - movsd (%rsi), %xmm2 - lea 8+_Q(%rip), %rcx - lea _Q(%rip), %r8 - mulsd %xmm0, %xmm1 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm2 - addsd (%rdx), %xmm3 - addsd (%rdi), %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm2 - addsd (%rcx), %xmm3 - addsd (%r8), %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm0, %xmm2 - addsd %xmm2, %xmm3 - cvtsd2ss %xmm3, %xmm3 -..B1.6: - movaps %xmm3, %xmm0 - ret -..B1.7: - movl %edi, %eax - movl %edi, %esi - shrl $23, %eax - andl $8388607, %esi - addl $-127, %eax - movl %esi, -8(%rsp) - cmpl $8388608, %edi - jae ..B1.10 -..B1.8: - testl %edi, %edi - je ..B1.22 -..B1.9: - movss -8(%rsp), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - movd %xmm0, %esi - movss %xmm0, -8(%rsp) - movl %esi, %eax - movl %esi, %edi - shrl $23, %eax - addl $-152, %eax -..B1.10: - imull $21846, %eax, %edx - sarl $15, %edx - cmpl $34, %eax - ja ..B1.13 -..B1.11: - andl $-2, %edx - lea _exact_values(%rip), %rcx - movslq %edx, %rdx - cmpl (%rcx,%rdx,4), %edi - jne ..B1.13 -..B1.12: - movss 4(%rcx,%rdx,4), %xmm0 - ret -..B1.13: - shrl $15, %edi - orl $1065353216, %esi - movzbl %dil, %r8d - pxor %xmm2, %xmm2 - movl %esi, -8(%rsp) - pxor %xmm0, %xmm0 - movq __libm_rcp_table_256@GOTPCREL(%rip), %rsi - lea 16+_P(%rip), %rdx - cvtss2sd -8(%rsp), %xmm2 - cvtss2sd (%rsi,%r8,4), %xmm0 - mulsd %xmm0, %xmm2 - lea 8+_P(%rip), %rcx - movsd (%rdx), %xmm0 - lea _P(%rip), %r9 - movq __libm_logf_table_256@GOTPCREL(%rip), %rdi - pxor %xmm3, %xmm3 - cvtsi2sd %eax, %xmm3 - addsd .L_2il0floatpacket.2(%rip), %xmm2 - mulsd %xmm2, %xmm0 - lea _LOG102(%rip), %rax - mulsd (%rax), %xmm3 - addsd (%rcx), %xmm0 - mulsd %xmm2, %xmm0 - movsd (%rdi,%r8,8), %xmm1 - mulsd %xmm2, %xmm0 - addsd %xmm1, %xmm2 - mulsd (%r9), %xmm2 - addsd %xmm2, %xmm0 - addsd %xmm3, %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.14: - movl %edi, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.20 -..B1.15: - testl $-2147483648, %edi - je ..B1.20 -..B1.16: - testl %eax, %eax - jne ..B1.18 -..B1.17: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - ret -..B1.18: - movss .L_2il0floatpacket.3(%rip), %xmm1 - pxor %xmm0, %xmm0 - mulss %xmm1, %xmm0 -..B1.19: - ret -..B1.20: - movss -8(%rsp), %xmm0 - ret -..B1.22: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type log10f,@function - .size log10f,.-log10f - .data -# -- End log10f - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4c000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x7f800000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_Q: - .long 354870542 - .long 1071369083 - .long 354784454 - .long 3217804155 - .long 1678399179 - .long 1069713319 - .long 656012052 - .long 3216755581 - .long 509767151 - .long 1068907598 - .long 3001134819 - .long 3216124527 - .type _Q,@object - .size _Q,48 - .align 4 -_exact_values: - .long 4294967295 - .long 4294967295 - .long 1092616192 - .long 1065353216 - .long 1120403456 - .long 1073741824 - .long 1148846080 - .long 1077936128 - .long 1176256512 - .long 1082130432 - .long 1203982336 - .long 1084227584 - .long 1232348160 - .long 1086324736 - .long 1259902592 - .long 1088421888 - .long 1287568416 - .long 1090519040 - .long 1315859240 - .long 1091567616 - .long 4294967295 - .long 4294967295 - .long 1343554297 - .long 1092616192 - .type _exact_values,@object - .size _exact_values,96 - .align 4 -_P: - .long 354870542 - .long 1071369083 - .long 1669757279 - .long 3217804158 - .long 3421439185 - .long 1069713323 - .type _P,@object - .size _P,24 - .align 4 -_LOG102: - .long 1352628735 - .long 1070810131 - .type _LOG102,@object - .size _LOG102,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10l.S deleted file mode 100644 index d8604ea777..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10l.S +++ /dev/null @@ -1,1052 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log10l.c" - .text -..TXTST0: -# -- Begin log10l - .text - .align 16,0x90 - .globl log10l -log10l: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_log10l.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %r8b, %r8b -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzbl 57(%rsp), %r9d - andl $128, %r9d - shrl $7, %r9d - movzwl 56(%rsp), %esi - movl %esi, %edi - movl %r9d, %edx - andl $32767, %edi - shll $15, %edx - movl 52(%rsp), %ecx - orl %edi, %edx - movl %ecx, %eax - shll $16, %edx - shrl $16, %eax - orl %eax, %edx - cmpl $2147450880, %edx - jae ..B1.29 -..B1.4: - addl $-1073676224, %edx - cmpl $32863, %edx - ja ..B1.13 -..B1.5: - cmpl $16383, %edi - je ..B1.38 -..B1.6: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.10 -..B1.7: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.8: - fldcw 24(%rsp) -..B1.9: - movb $1, %r8b -..B1.10: - fldt 48(%rsp) - lea 8+_ones(%rip), %rax - lea 112+_P(%rip), %rcx - lea 80+_P(%rip), %rsi - lea 48+_P(%rip), %rdi - lea 96+_P(%rip), %r10 - lea _TWO_32H(%rip), %rdx - lea 64+_P(%rip), %r11 - lea 16+_P(%rip), %r9 - testb %r8b, %r8b - fldt (%rcx) - lea 128+_P(%rip), %rcx - fldt (%rsi) - fldl (%rdx) - lea _P(%rip), %rdx - fldt (%rdi) - fxch %st(4) - faddl (%rax) - lea 32+_P(%rip), %rax - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fld %st(1) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(1) - fsub %st(3), %st - fxch %st(2) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r10) - fmul %st(5), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt (%rdx) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt (%rcx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.12 -..B1.11: - fldcw 26(%rsp) -..B1.12: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.13: - cmpl $16383, %edi - jl ..B1.19 -..B1.14: - cmpl $16471, %edi - jge ..B1.19 -..B1.15: - movl $1431655766, %eax - lea -16383(%rdi), %r9d - imull %r9d - sarl $31, %r9d - subl %r9d, %edx - lea _exact_values(%rip), %r9 - addl %edx, %edx - movslq %edx, %rdx - shlq $4, %rdx - movzwl 8(%rdx,%r9), %r10d - andl $32767, %r10d - cmpl %r10d, %edi - jne ..B1.19 -..B1.16: - cmpl 4(%rdx,%r9), %ecx - jne ..B1.19 -..B1.17: - movl 48(%rsp), %eax - cmpl (%rdx,%r9), %eax - jne ..B1.19 -..B1.18: - fldt 16(%r9,%rdx) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.19: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.23 -..B1.20: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.21: - fldcw 24(%rsp) -..B1.22: - movzwl 56(%rsp), %esi - movl %esi, %edi - movb $1, %r8b - andl $32767, %edi -..B1.23: - movl $-16383, %eax - testl %edi, %edi - jne ..B1.26 -..B1.24: - fldt 48(%rsp) - lea _TWO_75(%rip), %rax - lea _zeros(%rip), %rdx - fmull (%rax) - movl $-16458, %eax - fstpt 48(%rsp) - fldt 48(%rsp) - fldl (%rdx) - movsd (%rdx), %xmm0 - fucomip %st(1), %st - fstp %st(0) - jp ..B1.25 - je ..B1.40 -..B1.25: - movzwl 56(%rsp), %esi - movl %esi, %edi - andl $32767, %edi -..B1.26: - lea _TWO_32H(%rip), %rcx - andl $-32768, %esi - orl $-49153, %esi - addl %eax, %edi - movw %si, 56(%rsp) - lea 8+_ones(%rip), %r9 - fldt 48(%rsp) - lea 112+_P(%rip), %r10 - fld %st(0) - lea 80+_P(%rip), %r11 - fldl (%rcx) - lea 16+_P(%rip), %rcx - movl 52(%rsp), %edx - fadd %st, %st(1) - shrl $23, %edx - fsubrp %st, %st(1) - movzbl %dl, %eax - lea 48+_P(%rip), %rdx - movq __libm_rcp_table_256@GOTPCREL(%rip), %rsi - fsubr %st, %st(1) - flds (%rsi,%rax,4) - lea 96+_P(%rip), %rsi - fmul %st, %st(1) - fmulp %st, %st(2) - faddl (%r9) - fld %st(0) - lea 64+_P(%rip), %r9 - movl %edi, 16(%rsp) - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%r10) - lea 32+_P(%rip), %r10 - fmul %st(2), %st - fldt (%r11) - lea _P(%rip), %r11 - shlq $4, %rax - faddp %st, %st(1) - fmul %st(2), %st - testb %r8b, %r8b - fldt (%rdx) - lea 128+_P(%rip), %rdx - movq __libm_log10l_table_256@GOTPCREL(%rip), %rdi - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%r11) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt (%rdx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(1) - fildl 16(%rsp) - fldt .L_2il0floatpacket.0(%rip) - fmul %st(1), %st - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(2) - faddl 8(%rdi,%rax) - faddp %st, %st(3) - faddl (%rax,%rdi) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.28 -..B1.27: - fldcw 26(%rsp) -..B1.28: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.29: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.33 -..B1.30: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.31: - fldcw 24(%rsp) -..B1.32: - movzbl 57(%rsp), %r9d - movb $1, %r8b - andl $128, %r9d - shrl $7, %r9d -..B1.33: - testl %r9d, %r9d - jne ..B1.43 -..B1.34: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.35: - testb %r8b, %r8b - je ..B1.37 -..B1.36: - fldcw 26(%rsp) -..B1.37: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.38: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.6 -..B1.39: - lea _zeros(%rip), %rax - fldl (%rax) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.40: - lea 8+_ones(%rip), %rax - testb %r8b, %r8b - movsd (%rax), %xmm1 - divsd %xmm0, %xmm1 - je ..B1.42 -..B1.41: - fldcw 26(%rsp) -..B1.42: - movsd %xmm1, 16(%rsp) - fldl 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.43: - movzwl 56(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.45 -..B1.44: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.34 - jmp ..B1.48 -..B1.45: - testl %eax, %eax - jne ..B1.48 -..B1.46: - cmpq $0, 48(%rsp) - jne ..B1.48 -..B1.47: - lea 8+_ones(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - divsd (%rdx), %xmm0 - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - fstpt (%rsp) - jmp ..B1.35 -..B1.48: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - fstpt (%rsp) - jmp ..B1.35 - .align 16,0x90 - .cfi_endproc - .type log10l,@function - .size log10l,.-log10l - .data -# -- End log10l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xc8,0xd4,0x0e,0xee,0x0c,0x01,0x86,0xd8,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x85,0x9a,0x20,0x9a,0xfd,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_P: - .word 23339 - .word 38197 - .word 10353 - .word 43319 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 29077 - .word 14120 - .word 55465 - .word 56923 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 63176 - .word 31258 - .word 15131 - .word 37949 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 29577 - .word 14120 - .word 55465 - .word 56923 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 61319 - .word 34328 - .word 5050 - .word 45539 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 52415 - .word 26390 - .word 15131 - .word 37949 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 16765 - .word 7621 - .word 20590 - .word 65056 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 14162 - .word 11829 - .word 26041 - .word 56924 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55296 - .word 56923 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,144 - .align 2 -_exact_values: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64000 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40000 - .word 16396 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50000 - .word 16399 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62500 - .word 16402 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39062 - .word 16406 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57344 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8192 - .word 48828 - .word 16409 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10240 - .word 61035 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63744 - .word 38146 - .word 16416 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46912 - .word 47683 - .word 16419 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45056 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42256 - .word 59604 - .word 16422 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59178 - .word 37252 - .word 16426 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53248 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8436 - .word 46566 - .word 16429 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57344 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 43313 - .word 58207 - .word 16432 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61440 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1024 - .word 51647 - .word 36379 - .word 16436 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50432 - .word 48174 - .word 45474 - .word 16439 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30272 - .word 27450 - .word 56843 - .word 16442 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35304 - .word 8964 - .word 35527 - .word 16446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38912 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44130 - .word 60357 - .word 44408 - .word 16449 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6010 - .word 9911 - .word 55511 - .word 16452 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 36864 - .word 28332 - .word 30770 - .word 34694 - .word 16456 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45056 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 46080 - .word 2647 - .word 5695 - .word 43368 - .word 16459 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47104 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 41216 - .word 52461 - .word 7118 - .word 54210 - .word 16462 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 33952 - .word 16404 - .word 20833 - .word 33881 - .word 16466 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51200 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 42440 - .word 36889 - .word 42425 - .word 42351 - .word 16469 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53248 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 3898 - .word 62496 - .word 36647 - .word 52939 - .word 16472 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55296 - .word 16387 - .word 0 - .word 0 - .word 0 - .type _exact_values,@object - .size _exact_values,960 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10l_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10l_table.S deleted file mode 100644 index 4574b6e180..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log10l_table.S +++ /dev/null @@ -1,559 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log10l_table.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __libm_log10l_table_256 -__libm_log10l_table_256: - .long 0x45bfc000,0x3f4bd270 - .long 0xeb5a6902,0x3cc024b0 - .long 0x793a4000,0x3f64e84e - .long 0xbdc59429,0x3ccd29dc - .long 0x5ab86000,0x3f717508 - .long 0xf6df9894,0xbc6f70c9 - .long 0x9d914000,0x3f787cff - .long 0xeb029384,0x3cde94f0 - .long 0x72b8c000,0x3f7ea9d3 - .long 0x75a2920a,0xbd001bfa - .long 0x95daa000,0x3f82df9d - .long 0x77634a76,0xbcf3c705 - .long 0x72d64000,0x3f866df1 - .long 0x93609ef4,0xbcf1a833 - .long 0xef5ec000,0x3f898d79 - .long 0x7a519e99,0x3d16f7e1 - .long 0xf3f94000,0x3f8d22ad - .long 0xa10c1504,0x3d079c92 - .long 0x1d30c000,0x3f902423 - .long 0x2dcf9263,0x3cecc021 - .long 0x98898000,0x3f91f23a - .long 0x21ad4280,0xbce5b1e0 - .long 0x7b818000,0x3f93881a - .long 0x9c5111b1,0x3d0f3cbd - .long 0x1e75a000,0x3f951f6e - .long 0xaf539251,0xbcdcad0e - .long 0xe7adc000,0x3f96f2bc - .long 0x7385f0a6,0x3cf6d084 - .long 0x2cdf4000,0x3f988d36 - .long 0x41385083,0xbd04c3af - .long 0xaf014000,0x3f9a292b - .long 0x3724b270,0xbd2b3f0c - .long 0x3117c000,0x3f9bc6a0 - .long 0x667331b5,0x3d25cb86 - .long 0x7de3c000,0x3f9d6596 - .long 0x31612f8e,0xbd14f74b - .long 0x67fc4000,0x3f9f0611 - .long 0x143b6bad,0xbd0c30f3 - .long 0xe4f78000,0x3fa05409 - .long 0x5b985713,0x3ce9bb8e - .long 0x432ea000,0x3fa125d0 - .long 0x68a0dc47,0x3cf06e09 - .long 0x440d2000,0x3fa1f85d - .long 0x507c1dd7,0x3d133627 - .long 0x57496000,0x3fa2ad75 - .long 0x7f319445,0x3ce7c850 - .long 0x2a00e000,0x3fa38177 - .long 0x9d2bb1a5,0x3d080fdc - .long 0xe165a000,0x3fa45643 - .long 0xf742c845,0x3d0c2a9f - .long 0x03446000,0x3fa52bdd - .long 0x5036c404,0x3d25b862 - .long 0x6b7ec000,0x3fa5e396 - .long 0x23196824,0xbd36b572 - .long 0x47c5c000,0x3fa6baaf - .long 0x6d3e4a28,0xbd1b7614 - .long 0xe8c4c000,0x3fa773b3 - .long 0xf794b354,0x3d39e3f5 - .long 0xebee8000,0x3fa84c51 - .long 0x2cb6638b,0x3d1a2aaa - .long 0x786fc000,0x3fa906a6 - .long 0xdfffb059,0x3cecab9f - .long 0xabf00000,0x3fa9c197 - .long 0x3d6e4566,0x3d1badcf - .long 0x71218000,0x3faa9c78 - .long 0xcb03a47d,0x3d21f757 - .long 0x9c8d4000,0x3fab58c0 - .long 0x3b0fe4fe,0x3d31be11 - .long 0xbcdd4000,0x3fac15a8 - .long 0xb6d13ff4,0x3d3dbf2d - .long 0xe2c28000,0x3facd331 - .long 0x77fafd44,0x3d267bed - .long 0xd766c000,0x3fadb11e - .long 0x23c3e44c,0xbd240bcd - .long 0x9346c000,0x3fae7008 - .long 0xd4c5edca,0xbd2619d1 - .long 0xc6754000,0x3faf2f96 - .long 0xb182cded,0x3d15dbd8 - .long 0x8d450000,0x3fafefca - .long 0xcc1beb8a,0x3d2fd5cf - .long 0x83764000,0x3fb05852 - .long 0x779b9fcf,0x3cf77c3e - .long 0xaac7c000,0x3fb0b913 - .long 0xbc7f44a6,0x3d33a6ff - .long 0x4f258000,0x3fb11a29 - .long 0xb8d25b3a,0xbd360a72 - .long 0xa2698000,0x3fb16b51 - .long 0x7904e2d7,0xbd376f39 - .long 0xadacc000,0x3fb1cd03 - .long 0x084a2298,0x3d217bee - .long 0xdd776000,0x3fb22f0b - .long 0xa204f9bf,0xbd3a0ad1 - .long 0xca38e000,0x3fb2916a - .long 0xffeb8381,0xbd2c3074 - .long 0x0df76000,0x3fb2f421 - .long 0x0d443b33,0x3d18f3ef - .long 0xc3c48000,0x3fb346a6 - .long 0x15025ea7,0x3d306599 - .long 0xbc606000,0x3fb3a9fe - .long 0xa7db519f,0xbd27eca8 - .long 0x10a3c000,0x3fb3fd0c - .long 0xb6f7db46,0xbd35abc5 - .long 0xd3540000,0x3fb46107 - .long 0x813a4964,0x3d25039a - .long 0xd1696000,0x3fb4c55d - .long 0x64286476,0x3d1ff9d8 - .long 0x330c0000,0x3fb51940 - .long 0x2c505825,0x3ca5ed92 - .long 0x0ee70000,0x3fb56d62 - .long 0x06e88a06,0x3d315e58 - .long 0xcf260000,0x3fb5d2ab - .long 0xd90fb16b,0x3d378d89 - .long 0xa5dec000,0x3fb6275a - .long 0x405920cd,0xbcdfa0db - .long 0xaf26c000,0x3fb68d4e - .long 0x1d3da9e2,0x3d37ee53 - .long 0x5c54c000,0x3fb6e28c - .long 0x9d9b5afe,0xbd3d72f7 - .long 0x9665c000,0x3fb7380b - .long 0xb00e89cf,0xbd20707b - .long 0xc2790000,0x3fb78dcc - .long 0x9a7343d9,0xbd37a4ff - .long 0x2cf28000,0x3fb7f50c - .long 0xfacefdb0,0xbd45431c - .long 0xd5eb0000,0x3fb84b5f - .long 0x2b4f09ce,0xbd302851 - .long 0xbab2c000,0x3fb8a1f6 - .long 0x11e41a3e,0xbd2bb389 - .long 0x44558000,0x3fb8f8d1 - .long 0xbf96339c,0xbd1083fd - .long 0xdcd64000,0x3fb94fef - .long 0xe07d5241,0xbd4136f4 - .long 0xef314000,0x3fb9a752 - .long 0xa5e3191a,0x3d40a49e - .long 0xe7614000,0x3fb9fefa - .long 0xa1f54e0a,0xbd40902f - .long 0x325f4000,0x3fba56e8 - .long 0xec5e03cc,0x3d3c86ee - .long 0x3e298000,0x3fbaaf1b - .long 0xcb09696b,0xbd1130fe - .long 0x79c34000,0x3fbb0794 - .long 0x628b8546,0x3d495642 - .long 0x553b0000,0x3fbb6054 - .long 0xa20d3394,0x3d32f77b - .long 0x41ab8000,0x3fbbb95b - .long 0x61433066,0xbd418d39 - .long 0xb1400000,0x3fbc12a9 - .long 0xd5882f66,0xbd3f86c6 - .long 0x17380000,0x3fbc6c40 - .long 0x219900ae,0x3d45f518 - .long 0xba424000,0x3fbcb41f - .long 0x6665a718,0x3d443661 - .long 0xce734000,0x3fbd0e38 - .long 0xd0afc15d,0xbd1b04a7 - .long 0x21940000,0x3fbd689b - .long 0x80039681,0xbd2d9a08 - .long 0x2b1d0000,0x3fbdc347 - .long 0xd102c576,0x3d442ff9 - .long 0x300d8000,0x3fbe0c06 - .long 0xe391d6b6,0xbd46ba4d - .long 0x190e4000,0x3fbe6738 - .long 0x23d01c6b,0xbd1ad0ad - .long 0x0d208000,0x3fbec2b5 - .long 0xb6656ff4,0x3d2b355d - .long 0x2b938000,0x3fbf0c1c - .long 0x4980111b,0xbd37d822 - .long 0x6c9cc000,0x3fbf6821 - .long 0xd0891bcc,0x3d1c9a3b - .long 0x38184000,0x3fbfb1f6 - .long 0x16ca77f0,0x3d36f3d3 - .long 0xaf4ce000,0x3fc00742 - .long 0xee8b5696,0x3d27e0ee - .long 0x90650000,0x3fc02c64 - .long 0xe445f2fd,0x3d42d27a - .long 0xe63e2000,0x3fc05af1 - .long 0xa16f7336,0xbd4c4b92 - .long 0xea724000,0x3fc0804b - .long 0xb736f965,0xbd255d7c - .long 0xd6712000,0x3fc0af1f - .long 0x009609f5,0xbd35b214 - .long 0xa8806000,0x3fc0d4b2 - .long 0xc4dfdce2,0xbd2800b0 - .long 0xf136a000,0x3fc0fa5e - .long 0x2043a891,0x3ceb0a92 - .long 0x4fb3e000,0x3fc1299a - .long 0x26f70b35,0x3d182c63 - .long 0x6253c000,0x3fc14f80 - .long 0x44ac2d9f,0x3d1f65c1 - .long 0x5d158000,0x3fc17580 - .long 0x33b79054,0x3d2f04d6 - .long 0x637cc000,0x3fc19b9a - .long 0xe16cee25,0xbd4d6b79 - .long 0xc26ee000,0x3fc1cb5f - .long 0x6b51c369,0xbd0e934a - .long 0xe65f2000,0x3fc1f1b4 - .long 0x70fcf287,0x3d264160 - .long 0x8b5dc000,0x3fc21824 - .long 0xa3811df5,0x3d1f2866 - .long 0xd62ae000,0x3fc23eae - .long 0x75f6e51d,0xbd1c4ef6 - .long 0xebd34000,0x3fc26553 - .long 0xcd48326e,0xbd308652 - .long 0xf1b12000,0x3fc28c13 - .long 0xdfe3a7af,0xbd2c0024 - .long 0x14382000,0x3fc2bcaa - .long 0x21480e44,0xbd38f4c6 - .long 0x40b78000,0x3fc2e3a7 - .long 0x60689912,0x3cbd2885 - .long 0xd8f34000,0x3fc30abf - .long 0x508d5aa5,0xbd3893a6 - .long 0x03984000,0x3fc331f4 - .long 0xe9a3a8db,0x3d409691 - .long 0xe7a60000,0x3fc35943 - .long 0x43d5764a,0x3d2a3e8e - .long 0xac6e8000,0x3fc380af - .long 0x4d90e64e,0xbd1fc4d9 - .long 0x7997c000,0x3fc3a837 - .long 0xab2a4593,0xbd286816 - .long 0x771ca000,0x3fc3cfdb - .long 0x16e57a0f,0xbd2493c7 - .long 0x0d39a000,0x3fc3eda9 - .long 0x2ae78433,0x3d277ad1 - .long 0xc0950000,0x3fc4157e - .long 0xa37f5324,0x3d27333a - .long 0x13fb2000,0x3fc43d71 - .long 0xb82461da,0xbd4b3f09 - .long 0x30ad2000,0x3fc46580 - .long 0x72bdc442,0xbd198b79 - .long 0x40464000,0x3fc48dac - .long 0xc1788616,0xbd2c28bc - .long 0x6cbbc000,0x3fc4b5f5 - .long 0xef1ba41e,0xbd2e5a23 - .long 0xe05e6000,0x3fc4de5b - .long 0x8b90e0a0,0x3d4582b8 - .long 0x07770000,0x3fc4fcbc - .long 0x794dd932,0xbd13d6f8 - .long 0x1e926000,0x3fc52556 - .long 0x9b81384c,0xbd322350 - .long 0xf3198000,0x3fc54e0d - .long 0x2cd70aca,0x3d30ca92 - .long 0x7112c000,0x3fc56cab - .long 0x2a6e4407,0xbd10ed4c - .long 0xba734000,0x3fc59597 - .long 0x187e8930,0x3d4b1553 - .long 0x3a508000,0x3fc5bea2 - .long 0x1e386e4d,0xbd402641 - .long 0x08de4000,0x3fc5dd7e - .long 0x0b3f247b,0xbd2f4535 - .long 0xd3f90000,0x3fc606bd - .long 0x7c6ff8cd,0x3d51aaa0 - .long 0x518a4000,0x3fc6301c - .long 0x4d6761d0,0x3d401ece - .long 0x70618000,0x3fc64f37 - .long 0xa791b8a6,0x3d322b46 - .long 0x14c20000,0x3fc678cc - .long 0x7917b19f,0xbd4d287f - .long 0x05ed4000,0x3fc69810 - .long 0xcb5870e8,0xbd46b8cb - .long 0x5f9bc000,0x3fc6c1db - .long 0x986fe812,0xbd3994b8 - .long 0x8ecd0000,0x3fc6e148 - .long 0x4fa56719,0x3d54407b - .long 0x2e7e4000,0x3fc70b4b - .long 0xc215a307,0x3d0b8ea3 - .long 0x09144000,0x3fc72ae2 - .long 0x8e443b8a,0x3d55fc4a - .long 0x81bd8000,0x3fc7551c - .long 0xaffc42e9,0x3d3b9ef2 - .long 0x76cc4000,0x3fc774dd - .long 0x8d3f5094,0x3d1ded36 - .long 0x5db00000,0x3fc79f50 - .long 0xdd7a0df9,0x3d3d105d - .long 0xde098000,0x3fc7bf3b - .long 0xf47b93c9,0x3d4f301f - .long 0xcac44000,0x3fc7e9e7 - .long 0x64ca2675,0xbd300eff - .long 0x49030000,0x3fc809fe - .long 0xa2382d7a,0xbd57f954 - .long 0x57998000,0x3fc82a27 - .long 0xa5427ebe,0xbd51a131 - .long 0xc6260000,0x3fc85525 - .long 0x18660d2c,0xbd4f67be - .long 0x79834000,0x3fc8757a - .long 0xe73d6696,0xbd53bc75 - .long 0x058d8000,0x3fc895e2 - .long 0x37dbd0a7,0x3d3c0532 - .long 0x37698000,0x3fc8c134 - .long 0x6534d35a,0xbd55670a - .long 0x12ef0000,0x3fc8e1c8 - .long 0x21fe7581,0x3d595f21 - .long 0x11218000,0x3fc9026f - .long 0xaefa5f2f,0x3d47e805 - .long 0x48888000,0x3fc92329 - .long 0xfa5a2c46,0x3d301501 - .long 0x4b834000,0x3fc94eea - .long 0x142e461b,0xbd361a29 - .long 0xb63a0000,0x3fc96fd1 - .long 0xe74e02a0,0xbd1fb7d8 - .long 0xa6620000,0x3fc990cc - .long 0x8c78b1e9,0x3d54d5fa - .long 0x33334000,0x3fc9b1db - .long 0xf104deb4,0x3d3085fd - .long 0x740e4000,0x3fc9d2fd - .long 0x4be3a88f,0x3d530348 - .long 0xeedc8000,0x3fc9ff49 - .long 0xe2bda395,0x3d5aa98b - .long 0x84fc0000,0x3fca209a - .long 0xb83b532a,0xbd580433 - .long 0x1e440000,0x3fca41ff - .long 0xada9a5e4,0xbd3fa98d - .long 0xd2cec000,0x3fca6377 - .long 0xe131e3b9,0xbd564407 - .long 0xbae0c000,0x3fca8504 - .long 0x018eb699,0x3d49f5f5 - .long 0xeeec0000,0x3fcaa6a5 - .long 0x1db03170,0xbd401d1e - .long 0x878d8000,0x3fcac85b - .long 0x09bf0cc9,0xbd2e1c0b - .long 0x9d900000,0x3fcaea25 - .long 0x1d013253,0xbd27d321 - .long 0x49eb4000,0x3fcb0c04 - .long 0x85567deb,0x3d36d506 - .long 0xa5c50000,0x3fcb2df7 - .long 0xe6dd603b,0x3d14c9cc - .long 0xca710000,0x3fcb4fff - .long 0x81ec1ae1,0xbd4b2ea2 - .long 0xd1714000,0x3fcb721c - .long 0xf660b9da,0x3d47e295 - .long 0xd4780000,0x3fcb944e - .long 0xa337b6c0,0xbd558993 - .long 0xed658000,0x3fcbb695 - .long 0x5395b891,0xbd51c199 - .long 0x364ac000,0x3fcbd8f2 - .long 0xa0feae19,0x3d560784 - .long 0xc96a0000,0x3fcbfb63 - .long 0xd6eafbe6,0xbd36014a - .long 0xc134c000,0x3fcc1dea - .long 0x84f72786,0x3d44e96e - .long 0x384f4000,0x3fcc4087 - .long 0x3f7c716e,0x3d3f006e - .long 0x498f0000,0x3fcc6339 - .long 0x93e69cea,0x3d33c317 - .long 0x0ffc0000,0x3fcc8601 - .long 0x7e3ccfb7,0x3d2dae5f - .long 0x065c4000,0x3fcc9d3d - .long 0xa7bafd57,0x3d4b4180 - .long 0x375b8000,0x3fccc029 - .long 0xfa45fc85,0x3d503cf7 - .long 0x6697c000,0x3fcce32b - .long 0xcc5fc3d0,0xbd5a2df8 - .long 0xafd54000,0x3fcd0643 - .long 0xf7c24bc7,0xbd55fdc6 - .long 0x2f0e0000,0x3fcd2972 - .long 0xc812d894,0xbd45bacd - .long 0x00710000,0x3fcd4cb7 - .long 0x2cb52790,0xbd0bc64a - .long 0xab3f8000,0x3fcd6446 - .long 0x8139913c,0x3d392b7b - .long 0xef71c000,0x3fcd87b0 - .long 0x822c4d80,0x3d4b449e - .long 0xd1fe8000,0x3fcdab31 - .long 0x4f09d1d4,0x3d49a698 - .long 0x6fdc8000,0x3fcdcec9 - .long 0x4231d353,0x3d311dde - .long 0x88764000,0x3fcde690 - .long 0x8e8f9b14,0xbd350c11 - .long 0x4a25c000,0x3fce0a4e - .long 0x1868dfd1,0x3d0ffb66 - .long 0x15754000,0x3fce2e23 - .long 0x6ad712e4,0x3d4e32b0 - .long 0x22d18000,0x3fce4613 - .long 0x75f8b410,0xbd4b758b - .long 0x95c78000,0x3fce6a0e - .long 0x94c67dc7,0xbd2e13dc - .long 0x6243c000,0x3fce8e21 - .long 0xf23f1279,0x3d4d600d - .long 0xf26e0000,0x3fcea63a - .long 0x668806d4,0x3cef1bb1 - .long 0xed160000,0x3fceca74 - .long 0xfe665305,0xbd4f489c - .long 0x92ccc000,0x3fceeec6 - .long 0x1d627f70,0x3d4259f1 - .long 0x36b8c000,0x3fcf070a - .long 0x714687e0,0x3d49c0c3 - .long 0x93e34000,0x3fcf2b83 - .long 0x5715356c,0x3d345a59 - .long 0xef53c000,0x3fcf5014 - .long 0xb6f783a8,0xbd5ad2b5 - .long 0x3af18000,0x3fcf6883 - .long 0x4bcc6e04,0x3d58bfdb - .long 0xd9f3c000,0x3fcf8d3c - .long 0xf63ab05d,0x3d58276d - .long 0x1add8000,0x3fcfa5c6 - .long 0x9beccf8d,0x3d43e926 - .long 0x567e8000,0x3fcfcaa8 - .long 0x362fdd81,0x3d5d3cfe - .long 0xc8744000,0x3fcfe34c - .long 0xc008381c,0xbd113e5f - .long 0xfd74e000,0x3fd0042b - .long 0x617c00f4,0x3d551936 - .long 0xf6a18000,0x3fd016bd - .long 0x52b01c58,0x3cd77bf6 - .long 0x2f906000,0x3fd02326 - .long 0x9269b5c5,0x3d53227c - .long 0xed8d4000,0x3fd035cc - .long 0x46d0dd58,0xbd4abd7e - .long 0x0e86a000,0x3fd04243 - .long 0x07af3e66,0xbcb117c1 - .long 0xc842c000,0x3fd04ebe - .long 0xa51b431d,0xbd4a401d - .long 0xe84fc000,0x3fd06182 - .long 0x4e2f0b29,0x3d54abd9 - .long 0xb609c000,0x3fd06e0c - .long 0xcd12a34d,0x3d538308 - .long 0x0bec8000,0x3fd080e6 - .long 0x7faf9c27,0x3d4e24d8 - .long 0x0d896000,0x3fd08d7e - .long 0xf5dd9bd9,0xbd58cad1 - .long 0xc96a2000,0x3fd0a06c - .long 0xb30ebd03,0x3cf56aec - .long 0x1f3b2000,0x3fd0ad13 - .long 0xf6264d3a,0x3d5c5508 - .long 0x71e78000,0x3fd0c017 - .long 0x801d3fff,0xbd440944 - .long 0x3cad8000,0x3fd0cccc - .long 0x8fd76450,0xbd50b4df - .long 0xd91a4000,0x3fd0d986 - .long 0xeca91a49,0xbd46ae31 - .long 0xb8860000,0x3fd0eca9 - .long 0x0cf1281c,0x3d5a2d53 - .long 0xf87fe000,0x3fd0f972 - .long 0x0e3b7b78,0x3d53d583 - .long 0x1cf0e000,0x3fd10642 - .long 0x36cc41d7,0x3d37dcbc - .long 0xebe28000,0x3fd11983 - .long 0x56ee7372,0x3d453935 - .long 0xe35b8000,0x3fd12661 - .long 0xf97392ab,0xbd3e990a - .long 0xd277a000,0x3fd13345 - .long 0xd681ef76,0xbd2625f2 - .long 0xf5974000,0x3fd146a6 - .long 0x4e1038a4,0xbd57c5c5 - .long 0xe81ea000,0x3fd15399 - .long 0xd5972106,0x3d407ab6 - .long 0xe5d3a000,0x3fd16092 - .long 0x74a3a2b7,0x3d434c04 - .long 0xc3b7a000,0x3fd17413 - .long 0xadcb10c6,0x3d46bb42 - .long 0xf629e000,0x3fd1811b - .long 0xc5305a70,0xbd420a8b - .long 0x47b46000,0x3fd18e2a - .long 0x61f0b069,0x3d3a17c8 - .long 0xbe1a4000,0x3fd19b3e - .long 0x9d0c4bc2,0x3d306106 - .long 0x017cc000,0x3fd1aee9 - .long 0xf7f8b601,0xbd475f35 - .long 0xed714000,0x3fd1bc0c - .long 0x4ef21e21,0xbd463c17 - .long 0x12abc000,0x3fd1c937 - .long 0x61c2e7a5,0x3d3ffdc5 - .long 0x77148000,0x3fd1d667 - .long 0xa4cb0170,0xbd260af0 - .long 0xd1286000,0x3fd1ea3b - .long 0xc64da380,0x3d4c38dc - .long 0xed934000,0x3fd1f77b - .long 0x11c5ddf7,0xbd53b3e4 - .long 0x5e1b0000,0x3fd204c2 - .long 0x7b28110e,0x3d28fa35 - .long 0x28ce8000,0x3fd2120f - .long 0x0bc856ad,0xbd564e99 - .long 0x53c4a000,0x3fd21f62 - .long 0xe0bb0bd9,0xbd52ff6c - .long 0xe51d6000,0x3fd22cbb - .long 0x9c33f19c,0x3d0531fc - .long 0x4c976000,0x3fd240ce - .long 0x4672ee85,0xbd4777b4 - .long 0xf8ece000,0x3fd24e37 - .long 0x8e29bedb,0xbd3461fa - .long 0x215b0000,0x3fd25ba8 - .long 0x2d8bf07a,0xbd4007bf - .long 0xcc2a0000,0x3fd2691e - .long 0xd592a8b0,0xbd4f7b1a - .long 0xffab4000,0x3fd2769b - .long 0x75f34cfe,0xbd520002 - .long 0xc2394000,0x3fd2841f - .long 0xf75ce6c1,0x3d52c96f - .long 0x1a384000,0x3fd291aa - .long 0x73fd8960,0x3d42f012 - .long 0x0e154000,0x3fd29f3b - .long 0xa111a5a3,0x3d584ad4 - .long 0xee47a000,0x3fd2b3a0 - .long 0x875f458c,0xbd2044f7 - .long 0x842c0000,0x3fd2c142 - .long 0xb02650df,0x3d43cbc1 - .long 0xccb7c000,0x3fd2ceea - .long 0xb6dc5d61,0xbd249ad3 - .long 0xce830000,0x3fd2dc99 - .long 0xfe13a4e3,0xbd0beb52 - .long 0x902fc000,0x3fd2ea4f - .long 0x4d1def58,0x3d57d999 - .long 0x186a2000,0x3fd2f80c - .long 0xb0baac1f,0x3d37f290 - .long 0x6de7c000,0x3fd305cf - .long 0x4343671c,0xbd4e1284 - .long 0x97684000,0x3fd31399 - .long 0x31df7b15,0xbd28c485 - .long 0x9bb5a000,0x3fd3216a - .long 0xc8a62d99,0xbd1838f8 - .long 0x81a3c000,0x3fd32f42 - .long 0x7ce7627b,0x3d4dfd72 - .long 0x50110000,0x3fd33d21 - .long 0x0c6b638c,0x3d023363 - .type __libm_log10l_table_256,@object - .size __libm_log10l_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1p_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1p_gen.S deleted file mode 100644 index ce83de9783..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1p_gen.S +++ /dev/null @@ -1,574 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log1p_gen.c" - .text -..TXTST0: -# -- Begin log1p - .text - .align 16,0x90 - .globl log1p -log1p: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_log1p.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edi - movl %edi, %edx - andl $2147483647, %edx - cmpl $2146435072, %edx - jae ..B1.24 -..B1.2: - cmpl $-1074790400, %edi - jae ..B1.20 -..B1.3: - cmpl $1068646400, %edx - jae ..B1.16 -..B1.4: - cmpl $1066401792, %edx - jae ..B1.15 -..B1.5: - cmpl $1059061760, %edx - jae ..B1.14 -..B1.6: - cmpl $1012924416, %edx - jae ..B1.13 -..B1.7: - cmpl $1048576, %edx - jb ..B1.9 -..B1.8: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm1 - subsd %xmm1, %xmm0 - ret -..B1.9: - movl -8(%rsp), %eax - orl %eax, %edx - je ..B1.11 -..B1.10: - lea _small_value_64(%rip), %rax - movsd -8(%rsp), %xmm0 - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm1 - movsd %xmm1, -40(%rsp) - subsd %xmm1, %xmm0 - ret -..B1.11: - movsd -8(%rsp), %xmm0 -..B1.12: - ret -..B1.13: - movsd -8(%rsp), %xmm3 - lea 24+_Q3(%rip), %rax - movaps %xmm3, %xmm1 - lea 16+_Q3(%rip), %rcx - mulsd %xmm3, %xmm1 - lea 8+_Q3(%rip), %rdx - movsd (%rax), %xmm0 - lea _Q3(%rip), %rsi - movsd (%rcx), %xmm2 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm2 - addsd (%rdx), %xmm0 - addsd (%rsi), %xmm2 - mulsd %xmm1, %xmm0 - mulsd %xmm3, %xmm2 - movsd %xmm1, -16(%rsp) - addsd %xmm2, %xmm0 - mulsd %xmm3, %xmm0 - addsd %xmm3, %xmm0 - ret -..B1.14: - movsd -8(%rsp), %xmm3 - lea 56+_Q2(%rip), %rdx - movaps %xmm3, %xmm5 - lea 64+_Q2(%rip), %r8 - mulsd %xmm3, %xmm5 - lea 40+_Q2(%rip), %rcx - movsd (%rdx), %xmm6 - lea 48+_Q2(%rip), %r9 - movsd (%r8), %xmm4 - lea 24+_Q2(%rip), %rsi - mulsd %xmm5, %xmm6 - lea 32+_Q2(%rip), %r10 - mulsd %xmm5, %xmm4 - addsd (%rcx), %xmm6 - addsd (%r9), %xmm4 - mulsd %xmm5, %xmm6 - mulsd %xmm5, %xmm4 - addsd (%rsi), %xmm6 - addsd (%r10), %xmm4 - mulsd %xmm5, %xmm6 - mulsd %xmm5, %xmm4 - xorl %eax, %eax - movaps %xmm3, %xmm10 - movl %eax, -8(%rsp) - lea 8+_Q2(%rip), %rdi - movsd -8(%rsp), %xmm0 - lea 16+_Q2(%rip), %r11 - movaps %xmm0, %xmm1 - movaps %xmm0, %xmm7 - mulsd %xmm0, %xmm7 - subsd %xmm0, %xmm10 - addsd (%rdi), %xmm6 - addsd (%r11), %xmm4 - addsd %xmm10, %xmm1 - mulsd %xmm3, %xmm6 - mulsd %xmm5, %xmm4 - mulsd %xmm10, %xmm1 - addsd %xmm4, %xmm6 - movaps %xmm0, %xmm2 - mulsd %xmm10, %xmm2 - mulsd %xmm5, %xmm6 - addsd %xmm1, %xmm2 - addsd %xmm6, %xmm10 - movsd %xmm7, -16(%rsp) - movl %eax, -16(%rsp) - lea _Q2(%rip), %rax - movsd -16(%rsp), %xmm8 - subsd %xmm8, %xmm7 - movsd (%rax), %xmm9 - addsd %xmm2, %xmm7 - mulsd %xmm9, %xmm7 - mulsd %xmm8, %xmm9 - addsd %xmm7, %xmm10 - addsd %xmm9, %xmm0 - movsd %xmm0, -8(%rsp) - addsd %xmm10, %xmm0 - movsd %xmm10, -24(%rsp) - ret -..B1.15: - movsd -8(%rsp), %xmm12 - lea 96+_Q1(%rip), %rcx - movaps %xmm12, %xmm1 - lea 88+_Q1(%rip), %r11 - mulsd %xmm12, %xmm1 - lea _TWO_32P(%rip), %rdx - movsd (%rcx), %xmm2 - lea 80+_Q1(%rip), %rsi - movsd (%r11), %xmm7 - lea 64+_Q1(%rip), %rdi - mulsd %xmm1, %xmm2 - lea 56+_Q1(%rip), %rcx - mulsd %xmm1, %xmm7 - addsd (%rsi), %xmm2 - movsd (%rdx), %xmm4 - lea 72+_Q1(%rip), %rdx - mulsd %xmm1, %xmm2 - lea 48+_Q1(%rip), %r8 - addsd (%rdx), %xmm7 - addsd (%rdi), %xmm2 - mulsd %xmm1, %xmm7 - mulsd %xmm1, %xmm2 - addsd (%rcx), %xmm7 - addsd (%r8), %xmm2 - mulsd %xmm1, %xmm7 - mulsd %xmm1, %xmm2 - lea 40+_Q1(%rip), %rsi - lea 32+_Q1(%rip), %r9 - lea 24+_Q1(%rip), %rdi - lea _TWO_32(%rip), %rax - movaps %xmm12, %xmm0 - movaps %xmm12, %xmm6 - mulsd %xmm4, %xmm0 - lea 16+_Q1(%rip), %r10 - addsd (%rsi), %xmm7 - mulsd (%rax), %xmm6 - addsd (%r9), %xmm2 - mulsd %xmm1, %xmm7 - mulsd %xmm1, %xmm2 - addsd (%rdi), %xmm7 - addsd (%r10), %xmm2 - mulsd %xmm1, %xmm7 - mulsd %xmm1, %xmm2 - lea 8+_Q1(%rip), %r8 - lea 112+_Q1(%rip), %r9 - movsd %xmm0, -40(%rsp) - movaps %xmm12, %xmm3 - movsd -40(%rsp), %xmm5 - lea 104+_Q1(%rip), %r10 - movaps %xmm4, %xmm9 - subsd %xmm6, %xmm5 - addsd (%r8), %xmm7 - subsd %xmm5, %xmm3 - mulsd %xmm12, %xmm7 - mulsd %xmm3, %xmm12 - addsd %xmm7, %xmm2 - movsd (%r9), %xmm11 - movaps %xmm5, %xmm15 - movaps %xmm11, %xmm8 - mulsd %xmm5, %xmm11 - mulsd %xmm3, %xmm8 - mulsd %xmm3, %xmm15 - addsd (%r10), %xmm11 - addsd %xmm8, %xmm2 - addsd %xmm12, %xmm15 - movaps %xmm11, %xmm10 - movaps %xmm15, %xmm14 - movsd (%rax), %xmm13 - addsd %xmm2, %xmm10 - mulsd %xmm10, %xmm9 - mulsd %xmm13, %xmm10 - movsd %xmm9, -40(%rsp) - movsd -40(%rsp), %xmm0 - movsd %xmm5, -8(%rsp) - subsd %xmm10, %xmm0 - movaps %xmm5, %xmm10 - subsd %xmm0, %xmm11 - mulsd %xmm5, %xmm10 - addsd %xmm11, %xmm2 - addsd %xmm10, %xmm14 - mulsd %xmm1, %xmm2 - mulsd %xmm14, %xmm4 - mulsd %xmm13, %xmm14 - movsd %xmm4, -40(%rsp) - movsd -40(%rsp), %xmm4 - movsd %xmm3, -24(%rsp) - subsd %xmm14, %xmm4 - movsd %xmm1, -16(%rsp) - subsd %xmm4, %xmm10 - addsd %xmm15, %xmm10 - mulsd %xmm0, %xmm10 - mulsd %xmm4, %xmm0 - addsd %xmm2, %xmm10 - addsd %xmm5, %xmm0 - addsd %xmm3, %xmm10 - movsd %xmm0, -32(%rsp) - addsd %xmm10, %xmm0 - ret -..B1.16: - cmpl $1130364928, %edx - jae ..B1.18 -..B1.17: - lea _ones(%rip), %rcx - pxor %xmm1, %xmm1 - movsd -8(%rsp), %xmm7 - xorl %esi, %esi - movq __libm_rcp_table_256@GOTPCREL(%rip), %rdi - lea 8+_ones(%rip), %r8 - movl %esi, -8(%rsp) - lea _TWO_32(%rip), %r9 - movsd (%rcx), %xmm0 - movsd -8(%rsp), %xmm5 - addsd %xmm7, %xmm0 - subsd %xmm5, %xmm7 - movsd %xmm0, -32(%rsp) - movl -28(%rsp), %eax - movl %eax, %edx - andl $2146435072, %edx - movl %eax, %ecx - negl %edx - shrl $12, %eax - addl $2145386496, %edx - movl %edx, -28(%rsp) - movzbl %al, %edx - movl %esi, -32(%rsp) - movsd (%r8), %xmm2 - movsd (%r9), %xmm3 - cvtss2sd (%rdi,%rdx,4), %xmm1 - mulsd -32(%rsp), %xmm1 - mulsd %xmm1, %xmm5 - addsd %xmm1, %xmm2 - mulsd %xmm1, %xmm7 - addsd %xmm2, %xmm5 - movaps %xmm5, %xmm4 - movsd %xmm5, -16(%rsp) - addsd %xmm7, %xmm4 - movsd %xmm4, -8(%rsp) - addsd %xmm3, %xmm4 - movsd %xmm4, -40(%rsp) - movsd -40(%rsp), %xmm6 - shrl $20, %ecx - subsd (%r9), %xmm6 - movsd %xmm7, -24(%rsp) - addl $-1023, %ecx - movsd %xmm2, -32(%rsp) - subsd %xmm6, %xmm5 - addsd %xmm5, %xmm7 - jmp ..B1.19 -..B1.18: - movl %edx, %ecx - pxor %xmm0, %xmm0 - shrl $12, %edx - andl $1048575, %edi - movzbl %dl, %edx - orl $1072693248, %edi - movq __libm_rcp_table_256@GOTPCREL(%rip), %rax - lea 8+_ones(%rip), %r8 - movl %edi, -4(%rsp) - shlq $32, %rdi - movl -8(%rsp), %esi - orq %rsi, %rdi - cvtss2sd (%rax,%rdx,4), %xmm0 - movq %rdi, -24(%rsp) - movl $0, -8(%rsp) - movsd -8(%rsp), %xmm6 - movsd -24(%rsp), %xmm7 - shrl $20, %ecx - subsd %xmm6, %xmm7 - mulsd %xmm0, %xmm6 - mulsd %xmm0, %xmm7 - addsd (%r8), %xmm6 - movsd %xmm0, -32(%rsp) - addl $-1023, %ecx -..B1.19: - movaps %xmm6, %xmm0 - lea 32+_P(%rip), %rsi - lea 24+_P(%rip), %r9 - lea 16+_P(%rip), %rdi - lea 8+_P(%rip), %r10 - lea _P(%rip), %r8 - lea 8+_LN2(%rip), %r11 - addsd %xmm7, %xmm0 - movaps %xmm0, %xmm1 - mulsd %xmm0, %xmm1 - movsd (%rsi), %xmm3 - mulsd %xmm1, %xmm3 - movsd (%r9), %xmm2 - mulsd %xmm1, %xmm2 - addsd (%rdi), %xmm3 - mulsd %xmm1, %xmm3 - addsd (%r10), %xmm2 - mulsd %xmm0, %xmm2 - addsd (%r8), %xmm3 - pxor %xmm0, %xmm0 - cvtsi2sd %ecx, %xmm0 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm2 - lea _LN2(%rip), %rcx - addsd %xmm2, %xmm3 - movsd (%rcx), %xmm4 - addsd %xmm3, %xmm7 - mulsd %xmm0, %xmm4 - movsd (%r11), %xmm5 - mulsd %xmm5, %xmm0 - shlq $4, %rdx - movq __libm_log_table_256@GOTPCREL(%rip), %rax - movsd %xmm1, -16(%rsp) - addsd (%rax,%rdx), %xmm4 - addsd 8(%rax,%rdx), %xmm0 - addsd %xmm4, %xmm7 - addsd %xmm6, %xmm0 - movsd %xmm0, -8(%rsp) - addsd %xmm7, %xmm0 - movsd %xmm7, -24(%rsp) - ret -..B1.20: - lea _zeros(%rip), %rax - addl $-1072693248, %edx - orl -8(%rsp), %edx - movsd (%rax), %xmm1 - jne ..B1.22 -..B1.21: - lea 8+_ones(%rip), %rax - movsd (%rax), %xmm0 - divsd %xmm1, %xmm0 - ret -..B1.22: - lea _infs(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm1, %xmm0 -..B1.23: - ret -..B1.24: - addl $1048576, %edi - orl -8(%rsp), %edi - je ..B1.27 -..B1.25: - lea _ones(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 -..B1.26: - ret -..B1.27: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type log1p,@function - .size log1p,.-log1p - .data -# -- End log1p - .section .rodata, "a" - .align 4 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_Q3: - .long 0 - .long 3219128320 - .long 1431655765 - .long 1070945621 - .long 55924054 - .long 3218079744 - .long 2711205044 - .long 1070176665 - .type _Q3,@object - .size _Q3,32 - .align 4 -_Q2: - .long 0 - .long 3219128320 - .long 1431655765 - .long 1070945621 - .long 4294967292 - .long 3218079743 - .long 2577017633 - .long 1070176665 - .long 1431726806 - .long 3217380693 - .long 2027016470 - .long 1069697316 - .long 3108735575 - .long 3217031167 - .long 1449976333 - .long 1069315434 - .long 60833854 - .long 3216612762 - .type _Q2,@object - .size _Q2,72 - .align 4 -_Q1: - .long 3234281536 - .long 3150348867 - .long 1430600241 - .long 1047876949 - .long 4294967294 - .long 3218079743 - .long 2576981961 - .long 1070176665 - .long 1431660017 - .long 3217380693 - .long 2452398325 - .long 1069697316 - .long 4287730462 - .long 3217031167 - .long 2576343554 - .long 1069314503 - .long 1474253516 - .long 3216611738 - .long 2720006255 - .long 1068975428 - .long 1874652295 - .long 3216331940 - .long 2893691300 - .long 1068761010 - .long 1325424864 - .long 3216153938 - .long 0 - .long 3219128320 - .long 0 - .long 1070945621 - .type _Q1,@object - .size _Q1,120 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_P: - .long 0 - .long 3219128320 - .long 1431621855 - .long 1070945621 - .long 4294842013 - .long 3218079743 - .long 1289448124 - .long 1070176674 - .long 2077359316 - .long 3217380703 - .type _P,@object - .size _P,40 - .align 4 -_LN2: - .long 897137782 - .long 1038760431 - .long 4276092928 - .long 1072049730 - .type _LN2,@object - .size _LN2,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1pf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1pf_gen.S deleted file mode 100644 index 9eace98e22..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1pf_gen.S +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log1pf_gen.c" - .text -..TXTST0: -# -- Begin log1pf - .text - .align 16,0x90 - .globl log1pf -log1pf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_log1pf.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - pxor %xmm2, %xmm2 - cvtss2sd %xmm0, %xmm2 - movd %xmm0, %eax - movaps %xmm2, %xmm1 - andl $2147483647, %eax - cmpl $2139095040, %eax - andps .L_2il0floatpacket.6(%rip), %xmm1 - ja ..B1.9 -..B1.2: - movsd .L_2il0floatpacket.0(%rip), %xmm0 - comisd %xmm2, %xmm0 - jb ..B1.5 -..B1.3: - ucomisd %xmm0, %xmm2 - jp ..B1.4 - je ..B1.10 -..B1.4: - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.3(%rip), %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 -..B1.5: - comisd .L_2il0floatpacket.1(%rip), %xmm1 - jb ..B1.7 -..B1.6: - movsd .L_2il0floatpacket.5(%rip), %xmm0 - addsd %xmm2, %xmm0 - call log@PLT -..B1.13: - cvtsd2ss %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 -..B1.7: - movaps %xmm2, %xmm1 - pxor %xmm0, %xmm0 - mulsd %xmm2, %xmm1 - mulsd .L_2il0floatpacket.4(%rip), %xmm1 - subsd %xmm1, %xmm2 - cvtsd2ss %xmm2, %xmm0 -..B1.8: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 -..B1.9: - addss %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 16 -..B1.10: - movss .L_2il0floatpacket.2(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type log1pf,@function - .size log1pf,.-log1pf - .data -# -- End log1pf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.6: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3e300000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 4 -.L_2il0floatpacket.2: - .long 0xbf800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x7f800000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1pl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1pl.S deleted file mode 100644 index 4cfbf09a90..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log1pl.S +++ /dev/null @@ -1,1027 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log1pl.c" - .text -..TXTST0: -# -- Begin log1pl - .text - .align 16,0x90 - .globl log1pl -log1pl: -# parameter 1: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_log1pl.1: -..L2: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %cl, %cl -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movzbl 105(%rsp), %r8d - andl $128, %r8d - shrl $7, %r8d - movl %r8d, %edi - movzwl 104(%rsp), %esi - shll $15, %edi - andl $32767, %esi - orl %esi, %edi - shll $16, %edi - movzwl 102(%rsp), %eax - orl %eax, %edi - movzwl 82(%rsp), %eax - cmpl $32767, %esi - je ..B1.71 -..B1.4: - cmpl $-1073774592, %edi - jae ..B1.57 -..B1.5: - cmpl $16379, %esi - jge ..B1.47 -..B1.6: - cmpl $16369, %esi - jge ..B1.40 -..B1.7: - cmpl $16358, %esi - jge ..B1.33 -..B1.8: - cmpl $16345, %esi - jge ..B1.26 -..B1.9: - cmpl $16308, %esi - jge ..B1.19 -..B1.10: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.14 -..B1.11: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.12: - fldcw 80(%rsp) -..B1.13: - movzwl 104(%rsp), %esi - movb $1, %cl - andl $32767, %esi -..B1.14: - testl %esi, %esi - jle ..B1.67 -..B1.15: - fldt 96(%rsp) - lea _TWO_75(%rip), %rax - movb 105(%rsp), %dl - lea _ones(%rip), %rsi - andb $-128, %dl - lea 8+_TWO_75(%rip), %r8 - shrb $7, %dl - fldl (%rax) - fmul %st(1), %st - movzbl %dl, %edi - fxch %st(1) - fmull (%rsi,%rdi,8) - fsubrp %st, %st(1) - fmull (%r8) - fstpt (%rsp) -..B1.16: - testb %cl, %cl - je ..B1.18 -..B1.17: - fldcw 82(%rsp) -..B1.18: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.19: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.23 -..B1.20: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.21: - fldcw 80(%rsp) -..B1.22: - movb $1, %cl -..B1.23: - fldt 96(%rsp) - lea _Q3(%rip), %rax - lea _TWO_75(%rip), %rdx - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fadd %st(1), %st - fstpt (%rsp) - fldl (%rdx) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.25 -..B1.24: - fldcw 82(%rsp) -..B1.25: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.26: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.30 -..B1.27: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.28: - fldcw 80(%rsp) -..B1.29: - movb $1, %cl -..B1.30: - fldt 96(%rsp) - lea 16+_Q2(%rip), %rax - lea _Q2(%rip), %rdx - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.32 -..B1.31: - fldcw 82(%rsp) -..B1.32: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.33: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.37 -..B1.34: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.35: - fldcw 80(%rsp) -..B1.36: - movb $1, %cl -..B1.37: - fldt 96(%rsp) - lea 48+_Q1(%rip), %rax - fld %st(0) - lea 32+_Q1(%rip), %rsi - fmul %st(1), %st - lea 16+_Q1(%rip), %rdx - fldt (%rax) - lea _Q1(%rip), %rdi - fmul %st(1), %st - testb %cl, %cl - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.39 -..B1.38: - fldcw 82(%rsp) -..B1.39: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.40: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.44 -..B1.41: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.42: - fldcw 80(%rsp) -..B1.43: - movb $1, %cl -..B1.44: - fldt 96(%rsp) - lea _TWO_52H(%rip), %rax - fld %st(0) - fld %st(1) - fld %st(2) - lea 208+_Q(%rip), %rdi - lea 176+_Q(%rip), %r8 - lea 144+_Q(%rip), %r9 - fldl (%rax) - lea 112+_Q(%rip), %r10 - fmul %st(4), %st - lea 80+_Q(%rip), %r11 - lea 48+_Q(%rip), %rax - lea 224+_Q(%rip), %rsi - lea 240+_Q(%rip), %rdx - testb %cl, %cl - fadd %st, %st(3) - fsubrp %st, %st(3) - fld %st(2) - fxch %st(2) - fsub %st(3), %st - fmul %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fxch %st(3) - fstpt 32(%rsp) - fldt 32(%rsp) - fmul %st(0), %st - fstpt 64(%rsp) - fldt 64(%rsp) - faddp %st, %st(3) - fstpt 48(%rsp) - fldt (%rdx) - lea 16+_Q(%rip), %rdx - fmul %st, %st(1) - fldt (%rsi) - lea 192+_Q(%rip), %rsi - fldt (%rdi) - lea 160+_Q(%rip), %rdi - fmul %st(4), %st - fldt (%r8) - lea 128+_Q(%rip), %r8 - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r9) - lea 96+_Q(%rip), %r9 - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r10) - lea 64+_Q(%rip), %r10 - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r11) - lea 32+_Q(%rip), %r11 - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rax) - lea _Q(%rip), %rax - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rsi) - fmul %st(5), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(5) - fld %st(1) - fldt (%rax) - faddp %st, %st(6) - fxch %st(5) - fmul %st(6), %st - faddp %st, %st(1) - faddp %st, %st(3) - fldt 48(%rsp) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(4) - fldt 64(%rsp) - fmulp %st, %st(1) - fldt 32(%rsp) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(2) - fmul %st(1), %st - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.46 -..B1.45: - fldcw 82(%rsp) -..B1.46: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.47: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.51 -..B1.48: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.49: - fldcw 80(%rsp) -..B1.50: - movzbl 105(%rsp), %r8d - movb $1, %cl - andl $128, %r8d - shrl $7, %r8d -..B1.51: - lea ranges(%rip), %rax - cmpl (%rax,%r8,4), %edi - jae ..B1.53 -..B1.52: - fldt 96(%rsp) - xorl %edi, %edi - movzwl 104(%rsp), %eax - lea _shifters(%rip), %rsi - andl $32767, %eax - fld %st(0) - addl $-16415, %eax - lea zero_one(%rip), %r8 - lea _ones(%rip), %r9 - setl %dil - fldl (%r9) - fstpt (%rsp) - fldl (%rsi,%rdi,8) - fmul %st(2), %st - movzwl 8(%rsp), %r11d - fadd %st, %st(1) - andl $-32768, %r11d - fsubrp %st, %st(1) - movq __libm_rcp_table_256@GOTPCREL(%rip), %rsi - fsubr %st, %st(1) - faddl (%r8,%rdi,8) - xorl $1, %edi - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(1) - faddl (%r8,%rdi,8) - fadd %st, %st(1) - fxch %st(1) - fstpt 96(%rsp) - movzwl 104(%rsp), %edx - andl $32767, %edx - movl %edx, %r10d - addl $-16383, %edx - negl %r10d - movl 100(%rsp), %eax - addl $-2, %r10d - shrl $23, %eax - andl $32767, %r10d - movzbl %al, %eax - orl %r10d, %r11d - movw %r11w, 8(%rsp) - fldt (%rsp) - fmuls (%rsi,%rax,4) - jmp ..B1.54 -..B1.53: - fldt 96(%rsp) - lea zero_one(%rip), %rdx - lea _TWO_32H(%rip), %rdi - faddl (%rdx,%r8,8) - fstpt 96(%rsp) - fldl (%rdi) - movzwl 104(%rsp), %eax - movl %eax, %edx - andl $-32768, %eax - andl $32767, %edx - orl $-49153, %eax - addl $-16383, %edx - movw %ax, 104(%rsp) - fldt 96(%rsp) - fld %st(0) - movl 100(%rsp), %esi - fadd %st(2), %st - shrl $23, %esi - fsubp %st, %st(2) - movzbl %sil, %eax - fsub %st(1), %st - movq __libm_rcp_table_256@GOTPCREL(%rip), %r8 - fxch %st(1) - fstpt 32(%rsp) - flds (%r8,%rax,4) -..B1.54: - fldt 32(%rsp) - lea 8+_ones(%rip), %rsi - fmul %st(1), %st - lea 48+_P(%rip), %rdi - fxch %st(2) - fmulp %st, %st(1) - fxch %st(1) - faddl (%rsi) - fld %st(0) - lea 16+_P(%rip), %r8 - movl %edx, 48(%rsp) - lea 80+_P(%rip), %rdx - lea 64+_P(%rip), %r9 - lea 32+_P(%rip), %r10 - lea _P(%rip), %r11 - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fildl 48(%rsp) - fldt (%rdx) - fmul %st(3), %st - fldt (%rdi) - shlq $4, %rax - faddp %st, %st(1) - fmul %st(3), %st - testb %cl, %cl - fldt (%r8) - movq __libm_logl_table_256@GOTPCREL(%rip), %rdx - faddp %st, %st(1) - fmul %st(3), %st - fmulp %st, %st(2) - fldt (%r9) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(3) - fldt .L_2il0floatpacket.0(%rip) - fmul %st(1), %st - fldt .L_2il0floatpacket.1(%rip) - fmulp %st, %st(2) - faddl 8(%rdx,%rax) - faddp %st, %st(3) - faddl (%rax,%rdx) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - je ..B1.56 -..B1.55: - fldcw 82(%rsp) -..B1.56: - fldt 32(%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.57: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.61 -..B1.58: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.59: - fldcw 80(%rsp) -..B1.60: - movb $1, %cl -..B1.61: - fldt 96(%rsp) - lea 8+_ones(%rip), %rdx - lea _zeros(%rip), %rax - fldl (%rdx) - movsd (%rdx), %xmm0 - movsd (%rax), %xmm1 - fucomip %st(1), %st - fstp %st(0) - jp ..B1.62 - je ..B1.63 -..B1.62: - lea _infs(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm1, %xmm0 - movsd %xmm0, 48(%rsp) - fldl 48(%rsp) - fstpt (%rsp) - jmp ..B1.64 -..B1.63: - divsd %xmm1, %xmm0 - movsd %xmm0, 48(%rsp) - fldl 48(%rsp) - fstpt (%rsp) -..B1.64: - testb %cl, %cl - je ..B1.66 -..B1.65: - fldcw 82(%rsp) -..B1.66: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.67: - cmpl $0, 100(%rsp) - jne ..B1.69 -..B1.68: - cmpl $0, 96(%rsp) - je ..B1.70 -..B1.69: - fldt 96(%rsp) - lea _TWO_75(%rip), %rdx - movb 105(%rsp), %sil - lea _ones(%rip), %rdi - andb $-128, %sil - lea _small_value_80(%rip), %rax - lea 8+_TWO_75(%rip), %r9 - fldl (%rdx) - shrb $7, %sil - fmul %st(1), %st - fldt (%rax) - fmul %st(0), %st - movzbl %sil, %r8d - fstpt 16(%rsp) - fxch %st(1) - fmull (%rdi,%r8,8) - fsubrp %st, %st(1) - fmull (%r9) - fstpt (%rsp) - jmp ..B1.16 -..B1.70: - fldt 96(%rsp) - fstpt (%rsp) - jmp ..B1.16 -..B1.71: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.75 -..B1.72: - orl $-64768, %eax - movw %ax, 80(%rsp) -..B1.73: - fldcw 80(%rsp) -..B1.74: - movzbl 105(%rsp), %r8d - movb $1, %cl - andl $128, %r8d - shrl $7, %r8d -..B1.75: - testl %r8d, %r8d - je ..B1.78 -..B1.76: - cmpl $-2147483648, 100(%rsp) - jne ..B1.78 -..B1.77: - cmpl $0, 96(%rsp) - je ..B1.82 -..B1.78: - fldt 96(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.79: - testb %cl, %cl - je ..B1.81 -..B1.80: - fldcw 82(%rsp) -..B1.81: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.82: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 48(%rsp) - fldl 48(%rsp) - fstpt (%rsp) - jmp ..B1.79 - .align 16,0x90 - .cfi_endproc - .type log1pl,@function - .size log1pl,.-log1pl - .data -# -- End log1pl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xdc,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -zero_one: - .long 0x00000000,0x00000000 - .long 0x00000000,0x3ff00000 - .type zero_one,@object - .size zero_one,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -ranges: - .long 1078558720 - .long 3221127168 - .type ranges,@object - .size ranges,8 - .align 4 -_shifters: - .long 0 - .long 1098383360 - .long 0 - .long 1123549184 - .type _shifters,@object - .size _shifters,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_Q3: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 4096 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 53521 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 65509 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 43631 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 43690 - .word 6 - .word 32768 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 60885 - .word 52536 - .word 52444 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 14363 - .word 62279 - .word 27629 - .word 62293 - .word 49080 - .word 0 - .word 0 - .word 0 - .word 44555 - .word 43690 - .word 43690 - .word 43690 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 64968 - .word 65535 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 50395 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 39590 - .word 43714 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 15749 - .word 18782 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 61040 - .word 7204 - .word 65535 - .word 65535 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 10454 - .word 61175 - .word 14561 - .word 58254 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 57771 - .word 22430 - .word 52985 - .word 52428 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 7036 - .word 15828 - .word 36565 - .word 47662 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 17194 - .word 46991 - .word 54030 - .word 43687 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 63541 - .word 11931 - .word 21910 - .word 40326 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 36457 - .word 1697 - .word 61895 - .word 37932 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 65454 - .word 16107 - .word 6024 - .word 35469 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,256 - .align 2 -_P: - .word 65 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 44010 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 58670 - .word 61414 - .word 65535 - .word 65535 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 24905 - .word 46201 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 57053 - .word 27587 - .word 64478 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 41508 - .word 48914 - .word 32459 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,96 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2_gen.S deleted file mode 100644 index e1907d9c6f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2_gen.S +++ /dev/null @@ -1,774 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log2_gen.c" - .text -..TXTST0: -# -- Begin log2 - .text - .align 16,0x90 - .globl log2 -log2: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_log2.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) -..B1.2: - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movl $1069088768, %ecx - movd %rcx, %xmm7 - movapd HIGHSIGMASK(%rip), %xmm5 - movq $0x77f0000000000000, %rdx - movd %rdx, %xmm3 - movl $32768, %r9d - movd %r9, %xmm4 - movq %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $16352, %ecx - psrlq $27, %xmm0 - movq LOG2_E(%rip), %xmm2 - psrld $2, %xmm0 - rcpps %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $78, %xmm5, %xmm6 - psrlq $12, %xmm1 - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - mulss %xmm7, %xmm0 - orpd %xmm3, %xmm1 - lea L_tbl(%rip), %r11 - andpd %xmm1, %xmm5 - paddd %xmm4, %xmm0 - subsd %xmm5, %xmm1 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm6, %xmm0 - andl $32752, %eax - subl %ecx, %eax - sarl $4, %eax - cvtsi2sd %eax, %xmm7 - mulpd %xmm0, %xmm5 - mulsd %xmm0, %xmm1 - movapd coeff(%rip), %xmm3 - subsd %xmm2, %xmm5 - andl $16711680, %edx - shrl $12, %edx - movapd -912(%r11,%rdx), %xmm0 - movapd 16+coeff(%rip), %xmm4 - addsd %xmm5, %xmm1 - movapd 32+coeff(%rip), %xmm2 - movq $0xbf5dabe1161bb241, %r8 - movd %r8, %xmm6 - movapd %xmm1, %xmm5 - unpcklpd %xmm1, %xmm5 - mulsd %xmm1, %xmm3 - addsd %xmm7, %xmm0 - mulpd %xmm5, %xmm4 - mulpd %xmm5, %xmm5 - addpd %xmm2, %xmm4 - mulpd %xmm5, %xmm3 - movapd %xmm0, %xmm7 - unpcklpd %xmm0, %xmm7 - addsd %xmm1, %xmm0 - mulsd %xmm1, %xmm4 - subsd %xmm0, %xmm7 - mulsd %xmm1, %xmm6 - pshufd $238, %xmm0, %xmm2 - addsd %xmm7, %xmm1 - mulsd %xmm5, %xmm5 - addpd %xmm3, %xmm4 - addsd %xmm6, %xmm2 - mulpd %xmm5, %xmm4 - addsd %xmm2, %xmm1 - addsd %xmm4, %xmm1 - pshufd $238, %xmm4, %xmm5 - addsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - movq (%rsp), %xmm0 - movq (%rsp), %xmm1 - addl $16, %eax - cmpl $32768, %eax - jae .L_2TAG_PACKET_2.0.2 - cmpl $16, %eax - jb .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_4.0.2: - addsd %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_5.0.2: - ja .L_2TAG_PACKET_4.0.2 - cmpl $0, %edx - ja .L_2TAG_PACKET_4.0.2 - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_2.0.2: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - addl %ecx, %ecx - cmpl $-2097152, %ecx - jae .L_2TAG_PACKET_5.0.2 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_7.0.2 -.L_2TAG_PACKET_6.0.2: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %eax - pinsrw $3, %eax, %xmm1 - movl $171, 16(%rsp) - mulsd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_8.0.2 -.L_2TAG_PACKET_7.0.2: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $49136, %eax - pinsrw $3, %eax, %xmm0 - divsd %xmm1, %xmm0 - movl $170, 16(%rsp) - jmp .L_2TAG_PACKET_8.0.2 -.L_2TAG_PACKET_3.0.2: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_7.0.2 - xorpd %xmm1, %xmm1 - movl $18416, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - xorpd %xmm2, %xmm2 - movl $16368, %eax - pinsrw $3, %eax, %xmm2 - movq %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $18416, %ecx - psrlq $27, %xmm0 - movq LOG2_E(%rip), %xmm2 - psrld $2, %xmm0 - rcpps %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $78, %xmm5, %xmm6 - psrlq $12, %xmm1 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_8.0.2: - movq %xmm0, 8(%rsp) -..B1.3: - movq 8(%rsp), %xmm0 -.L_2TAG_PACKET_9.0.2: -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type log2,@function - .size log2,.-log2 - .data -# -- End log2 - .section .rodata, "a" - .align 16 - .align 16 -HIGHSIGMASK: - .long 4160749568 - .long 4294967295 - .long 0 - .long 4294959104 - .type HIGHSIGMASK,@object - .size HIGHSIGMASK,16 - .align 16 -LOG2_E: - .long 0 - .long 1073160192 - .long 370913857 - .long 3210587105 - .type LOG2_E,@object - .size LOG2_E,16 - .align 16 -L_tbl: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 3065110528 - .long 1072676937 - .long 969155058 - .long 1027421928 - .long 3789631488 - .long 1072660714 - .long 1061361078 - .long 1026032326 - .long 2461925376 - .long 1072644578 - .long 1624763829 - .long 3175910818 - .long 3729080320 - .long 1072628527 - .long 1845599454 - .long 1028591843 - .long 3710689280 - .long 1072612561 - .long 3776236642 - .long 1025648432 - .long 2882404352 - .long 1072596679 - .long 3683226528 - .long 3174591570 - .long 1779716096 - .long 1072580880 - .long 1916484889 - .long 3173934989 - .long 996708352 - .long 1072565163 - .long 716999656 - .long 3175673444 - .long 1184837632 - .long 1072549527 - .long 1973599317 - .long 3174949482 - .long 3051761664 - .long 1072533971 - .long 1437348984 - .long 1028530411 - .long 3065225216 - .long 1072518495 - .long 1219343899 - .long 1028525753 - .long 2041864192 - .long 1072503098 - .long 388496599 - .long 3175919551 - .long 851140608 - .long 1072487779 - .long 2822909360 - .long 3173772990 - .long 414302208 - .long 1072472537 - .long 1306322068 - .long 1026235748 - .long 1703325696 - .long 1072457371 - .long 1651655805 - .long 3174368281 - .long 1444937728 - .long 1072442281 - .long 1145646243 - .long 3175573309 - .long 709566464 - .long 1072427266 - .long 3608295147 - .long 3168585112 - .long 615415808 - .long 1072412325 - .long 2957847316 - .long 1027961637 - .long 2327523328 - .long 1072397457 - .long 3266875511 - .long 3175163169 - .long 2761863168 - .long 1072382662 - .long 3329930550 - .long 1027790656 - .long 3174416384 - .long 1072367939 - .long 3349298596 - .long 3172501429 - .long 570335232 - .long 1072353288 - .long 905028281 - .long 3175970581 - .long 588005376 - .long 1072338707 - .long 40558280 - .long 1022275054 - .long 318357504 - .long 1072324196 - .long 3000963593 - .long 3175644723 - .long 1188933632 - .long 1072309754 - .long 1152643439 - .long 3171407768 - .long 373186560 - .long 1072295381 - .long 3440409283 - .long 3174861647 - .long 3674587136 - .long 1072281075 - .long 1985407462 - .long 1026124611 - .long 4051050496 - .long 1072266837 - .long 2734481544 - .long 1026856954 - .long 3089022976 - .long 1072252666 - .long 3365453112 - .long 1028135364 - .long 2412838912 - .long 1072238561 - .long 1203709499 - .long 3175656792 - .long 3683999744 - .long 1072224521 - .long 4237943120 - .long 3176014210 - .long 10571776 - .long 1072210547 - .long 1358548904 - .long 3174161579 - .long 1716314112 - .long 1072196636 - .long 1192519078 - .long 3175777045 - .long 1980272640 - .long 1072182789 - .long 1567013979 - .long 3174472130 - .long 2605957120 - .long 1072169005 - .long 1671600287 - .long 1028158963 - .long 1135812608 - .long 1072155284 - .long 1547709291 - .long 3174179085 - .long 3735490560 - .long 1072141624 - .long 2225392115 - .long 1027056729 - .long 3718443008 - .long 1072128026 - .long 3797315894 - .long 3175978381 - .long 3020144640 - .long 1072114489 - .long 569231379 - .long 3176080301 - .long 3607605248 - .long 1072101012 - .long 2931542967 - .long 1028585043 - .long 3183849472 - .long 1072087595 - .long 1779595699 - .long 1025078612 - .long 3777277952 - .long 1072074237 - .long 3836888569 - .long 3176101128 - .long 3151212544 - .long 1072060938 - .long 4204238866 - .long 1027628024 - .long 3393323008 - .long 1072047697 - .long 3590952967 - .long 1024914744 - .long 2325151744 - .long 1072034514 - .long 2081953065 - .long 1024436445 - .long 2091569152 - .long 1072021388 - .long 1869579321 - .long 3176039801 - .long 570331136 - .long 1072008319 - .long 1169272038 - .long 1028145343 - .long 4256530432 - .long 1071995305 - .long 3897289024 - .long 3171837174 - .long 2492289024 - .long 1071982348 - .long 3892405903 - .long 3175484647 - .long 1826058240 - .long 1071969446 - .long 4079999923 - .long 3175326622 - .long 242364416 - .long 1071956599 - .long 850820968 - .long 3175983841 - .long 46260224 - .long 1071943806 - .long 2164938638 - .long 1028426857 - .long 3567947776 - .long 1071931066 - .long 2011723452 - .long 1028083988 - .long 277430272 - .long 1071918381 - .long 2531435800 - .long 3169601318 - .long 1143848960 - .long 1071905748 - .long 294923185 - .long 1023738369 - .long 4275343360 - .long 1071893167 - .long 2459435756 - .long 1028412742 - .long 3508592640 - .long 1071880639 - .long 503755275 - .long 3173140530 - .long 1293312000 - .long 1071868163 - .long 3333822795 - .long 1026993594 - .long 101961728 - .long 1071855738 - .long 2904005851 - .long 1027338469 - .long 2429362176 - .long 1071843363 - .long 1235892196 - .long 3175679811 - .long 2202386432 - .long 1071831039 - .long 2295142960 - .long 1028565357 - .long 1959501824 - .long 1071818765 - .long 254808788 - .long 1028157588 - .long 4260454400 - .long 1071806540 - .long 1281464327 - .long 3173548784 - .long 3096002560 - .long 1071794365 - .long 2126040068 - .long 3168834094 - .long 1067458560 - .long 1071782239 - .long 957416402 - .long 3171516564 - .long 796413952 - .long 1071770161 - .long 3663270514 - .long 1026937343 - .long 629456896 - .long 1071758131 - .long 2081311685 - .long 1026861414 - .long 3227787264 - .long 1071746148 - .long 325239760 - .long 3175812466 - .long 2681995264 - .long 1071734213 - .long 692600417 - .long 1028316258 - .long 1691656192 - .long 1071722325 - .long 2854288619 - .long 3174069820 - .long 2975059968 - .long 1071710483 - .long 2357806657 - .long 3175896595 - .long 1853362176 - .long 1071686938 - .long 182026883 - .long 3174676055 - .long 4247105536 - .long 1071663574 - .long 1264810745 - .long 1026738550 - .long 671424512 - .long 1071636109 - .long 321222784 - .long 1028039985 - .long 4092968960 - .long 1071590092 - .long 3658154599 - .long 3175856095 - .long 193347584 - .long 1071544424 - .long 723354347 - .long 3173824323 - .long 985587712 - .long 1071499097 - .long 2344377442 - .long 1027857554 - .long 1801297920 - .long 1071454107 - .long 2398211919 - .long 3175430015 - .long 2750758912 - .long 1071409449 - .long 223148174 - .long 1028267694 - .long 118882304 - .long 1071365119 - .long 1958423088 - .long 1026816298 - .long 3531350016 - .long 1071321110 - .long 875023512 - .long 1027316085 - .long 1581752320 - .long 1071277420 - .long 345754833 - .long 1027657950 - .long 473587712 - .long 1071234043 - .long 3024467474 - .long 3175496105 - .long 2533163008 - .long 1071190974 - .long 3279280870 - .long 3173991880 - .long 1902854144 - .long 1071148210 - .long 3170372974 - .long 3174359141 - .long 1709547520 - .long 1071105746 - .long 3312617382 - .long 3175326532 - .long 1168744448 - .long 1071063578 - .long 2799128425 - .long 1027228825 - .long 4163903488 - .long 1071021701 - .long 1285964057 - .long 3176060221 - .long 2056257536 - .long 1070980113 - .long 2706516695 - .long 1028650734 - .long 3739770880 - .long 1070938808 - .long 246392277 - .long 3174722093 - .long 1271734272 - .long 1070897784 - .long 3679462403 - .long 3174159366 - .long 4223328256 - .long 1070857035 - .long 2433294629 - .long 1027980203 - .long 1015963648 - .long 1070816560 - .long 4253198713 - .long 1026847814 - .long 1862295552 - .long 1070776353 - .long 1509191037 - .long 3173682029 - .long 103178240 - .long 1070736412 - .long 3582688163 - .long 3173089500 - .long 2264358912 - .long 1070696732 - .long 1779381280 - .long 1025292403 - .long 2278850560 - .long 1070657311 - .long 3240888728 - .long 1027177644 - .long 2954207232 - .long 1070618145 - .long 3564986365 - .long 1024870970 - .long 1865613312 - .long 1070562367 - .long 3892585078 - .long 1027946215 - .long 3434348544 - .long 1070485036 - .long 3011363162 - .long 3175199985 - .long 671449088 - .long 1070408197 - .long 1145012811 - .long 1026506981 - .long 1327038464 - .long 1070331842 - .long 227553652 - .long 1028331265 - .long 766836736 - .long 1070255966 - .long 518075456 - .long 3175312400 - .long 3434479616 - .long 1070180562 - .long 1452680450 - .long 3174267422 - .long 1364688896 - .long 1070105626 - .long 2571031723 - .long 3174222501 - .long 4236263424 - .long 1070031150 - .long 3514507731 - .long 3175326685 - .long 706019328 - .long 1069957131 - .long 2980398698 - .long 1026808442 - .long 1347502080 - .long 1069883561 - .long 1818423398 - .long 3175271900 - .long 4280483840 - .long 1069810435 - .long 3925170731 - .long 3175415416 - .long 3750608896 - .long 1069737749 - .long 710015584 - .long 3170118559 - .long 3004235776 - .long 1069665497 - .long 3823542833 - .long 3174354681 - .long 1393737728 - .long 1069593674 - .long 4238122296 - .long 1028475778 - .long 1621164032 - .long 1069497029 - .long 2232087921 - .long 3175937870 - .long 2762080256 - .long 1069355067 - .long 3580752115 - .long 3175802838 - .long 2914779136 - .long 1069213933 - .long 1251526596 - .long 1028548772 - .long 3808428032 - .long 1069073617 - .long 1491573749 - .long 1025131695 - .long 3589865472 - .long 1068934110 - .long 2320751647 - .long 3175285520 - .long 1102381056 - .long 1068795403 - .long 2369472545 - .long 3174735692 - .long 164790272 - .long 1068657486 - .long 3958705468 - .long 1027545055 - .long 966098944 - .long 1068520350 - .long 91754714 - .long 3174161762 - .long 100794368 - .long 1068269030 - .long 3205869737 - .long 3173509296 - .long 2079653888 - .long 1067997831 - .long 930310477 - .long 1028614386 - .long 3471048704 - .long 1067728143 - .long 1091811766 - .long 1028000848 - .long 1092419584 - .long 1067459950 - .long 629649056 - .long 3175844743 - .long 3079012352 - .long 1066936100 - .long 3939938999 - .long 3172112142 - .long 3666608128 - .long 1066405591 - .long 4185504407 - .long 3175959388 - .long 526647296 - .long 1065354156 - .long 1469727419 - .long 3173760470 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type L_tbl,@object - .size L_tbl,2064 - .align 16 -coeff: - .long 1367832035 - .long 1066403058 - .long 2677381210 - .long 3216320731 - .long 3610762001 - .long 3214607116 - .long 1215221452 - .long 1069835102 - .long 2894285243 - .long 1067936923 - .long 3011779882 - .long 3218479542 - .type coeff,@object - .size coeff,48 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2f_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2f_gen.S deleted file mode 100644 index 7da6f101d8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2f_gen.S +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log2f_gen.c" - .text -..TXTST0: -# -- Begin log2f - .text - .align 16,0x90 - .globl log2f -log2f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_log2f.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - cmpl $2139095040, %edx - jae ..B1.14 -..B1.2: - lea -1065222144(%rdx), %eax - cmpl $196608, %eax - jae ..B1.7 -..B1.3: - cmpl $1065353216, %edx - jne ..B1.5 -..B1.4: - pxor %xmm3, %xmm3 - jmp ..B1.6 -..B1.5: - movss -8(%rsp), %xmm0 - lea 40+_Q(%rip), %rax - lea 32+_Q(%rip), %rsi - addss .L_2il0floatpacket.0(%rip), %xmm0 - cvtss2sd %xmm0, %xmm0 - movaps %xmm0, %xmm1 - lea 24+_Q(%rip), %rdx - movsd (%rax), %xmm3 - lea 16+_Q(%rip), %rdi - movsd (%rsi), %xmm2 - lea 8+_Q(%rip), %rcx - lea _Q(%rip), %r8 - mulsd %xmm0, %xmm1 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm2 - addsd (%rdx), %xmm3 - addsd (%rdi), %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm1, %xmm2 - addsd (%rcx), %xmm3 - addsd (%r8), %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm0, %xmm2 - addsd %xmm2, %xmm3 - cvtsd2ss %xmm3, %xmm3 -..B1.6: - movaps %xmm3, %xmm0 - ret -..B1.7: - movl %edx, %r9d - movl %edx, %eax - shrl $23, %r9d - andl $8388607, %eax - addl $-127, %r9d - movl %eax, -8(%rsp) - cmpl $8388608, %edx - jae ..B1.10 -..B1.8: - testl %edx, %edx - je ..B1.22 -..B1.9: - movss -8(%rsp), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - movd %xmm0, %eax - movss %xmm0, -8(%rsp) - movl %eax, %r9d - movl %eax, %edx - shrl $23, %r9d - addl $-152, %r9d -..B1.10: - testl $8388607, %edx - jne ..B1.12 -..B1.11: - pxor %xmm0, %xmm0 - cvtsi2ss %r9d, %xmm0 - ret -..B1.12: - shrl $15, %edx - orl $1065353216, %eax - movzbl %dl, %edi - pxor %xmm2, %xmm2 - movl %eax, -8(%rsp) - pxor %xmm0, %xmm0 - movq __libm_rcp_table_256@GOTPCREL(%rip), %rax - lea 16+_P(%rip), %rdx - lea 8+_P(%rip), %rcx - lea _P(%rip), %r8 - movq __libm_logf_table_256@GOTPCREL(%rip), %rsi - pxor %xmm3, %xmm3 - cvtss2sd -8(%rsp), %xmm2 - cvtss2sd (%rax,%rdi,4), %xmm0 - cvtsi2sd %r9d, %xmm3 - mulsd %xmm0, %xmm2 - movsd (%rdx), %xmm0 - movsd (%rsi,%rdi,8), %xmm1 - addsd .L_2il0floatpacket.2(%rip), %xmm2 - mulsd %xmm2, %xmm0 - addsd (%rcx), %xmm0 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm0 - addsd %xmm1, %xmm2 - mulsd (%r8), %xmm2 - addsd %xmm2, %xmm0 - addsd %xmm3, %xmm0 - cvtsd2ss %xmm0, %xmm0 -..B1.13: - ret -..B1.14: - movl %edx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.20 -..B1.15: - testl $-2147483648, %edx - je ..B1.20 -..B1.16: - testl %eax, %eax - jne ..B1.18 -..B1.17: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - ret -..B1.18: - movss .L_2il0floatpacket.3(%rip), %xmm1 - pxor %xmm0, %xmm0 - mulss %xmm1, %xmm0 -..B1.19: - ret -..B1.20: - movss -8(%rsp), %xmm0 - ret -..B1.22: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type log2f,@function - .size log2f,.-log2f - .data -# -- End log2f - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4c000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x7f800000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_Q: - .long 1697350398 - .long 1073157447 - .long 1697278904 - .long 3219592519 - .long 3711670093 - .long 1071564553 - .long 491294680 - .long 3218543945 - .long 1795286032 - .long 1070757723 - .long 557036084 - .long 3217959989 - .type _Q,@object - .size _Q,48 - .align 4 -_P: - .long 1697350398 - .long 1073157447 - .long 605117704 - .long 3219592522 - .long 782203563 - .long 1071564561 - .type _P,@object - .size _P,24 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2l.S deleted file mode 100644 index a068414a1a..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2l.S +++ /dev/null @@ -1,541 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log2l.c" - .text -..TXTST0: -# -- Begin log2l - .text - .align 16,0x90 - .globl log2l -log2l: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_log2l.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %sil, %sil -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzbl 57(%rsp), %r8d - andl $128, %r8d - shrl $7, %r8d - movzwl 56(%rsp), %eax - movl %eax, %edx - movl %r8d, %edi - andl $32767, %edx - shll $15, %edi - orl %edx, %edi - shll $16, %edi - movzwl 54(%rsp), %ecx - orl %ecx, %edi - cmpl $2147450880, %edi - jae ..B1.28 -..B1.4: - addl $-1073676224, %edi - cmpl $32863, %edi - ja ..B1.13 -..B1.5: - cmpl $16383, %edx - je ..B1.37 -..B1.6: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.10 -..B1.7: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.8: - fldcw 24(%rsp) -..B1.9: - movb $1, %sil -..B1.10: - fldt 48(%rsp) - lea 8+_ones(%rip), %rax - lea 112+_P(%rip), %rcx - lea 80+_P(%rip), %rdi - lea 48+_P(%rip), %r8 - lea 96+_P(%rip), %r10 - lea _TWO_32H(%rip), %rdx - lea 64+_P(%rip), %r11 - lea 16+_P(%rip), %r9 - testb %sil, %sil - fldt (%rcx) - lea 128+_P(%rip), %rcx - fldt (%rdi) - fldl (%rdx) - lea _P(%rip), %rdx - fldt (%r8) - fxch %st(4) - faddl (%rax) - lea 32+_P(%rip), %rax - fld %st(0) - fmul %st(1), %st - fmul %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(2) - fmul %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fld %st(1) - fxch %st(2) - fmul %st, %st(3) - fxch %st(2) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(1) - fsub %st(3), %st - fxch %st(2) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r10) - fmul %st(5), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt (%rdx) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fldt (%rcx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.12 -..B1.11: - fldcw 26(%rsp) -..B1.12: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.13: - movzwl 26(%rsp), %edi - movl %edi, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.17 -..B1.14: - orl $-64768, %edi - movw %di, 24(%rsp) -..B1.15: - fldcw 24(%rsp) -..B1.16: - movzwl 56(%rsp), %eax - movl %eax, %edx - movb $1, %sil - andl $32767, %edx -..B1.17: - movl $-16383, %ecx - testl %edx, %edx - jne ..B1.20 -..B1.18: - fldt 48(%rsp) - lea _TWO_75(%rip), %rcx - lea _zeros(%rip), %rax - fmull (%rcx) - movl $-16458, %ecx - fstpt 48(%rsp) - fldt 48(%rsp) - fldl (%rax) - movsd (%rax), %xmm0 - fucomip %st(1), %st - fstp %st(0) - jp ..B1.19 - je ..B1.39 -..B1.19: - movzwl 56(%rsp), %eax - movl %eax, %edx - andl $32767, %edx -..B1.20: - movl 52(%rsp), %edi - cmpl $-2147483648, %edi - jne ..B1.25 -..B1.21: - cmpl $0, 48(%rsp) - jne ..B1.25 -..B1.22: - addl %edx, %ecx - movl %ecx, 16(%rsp) - testb %sil, %sil - fildl 16(%rsp) - fstpt (%rsp) - je ..B1.24 -..B1.23: - fldcw 26(%rsp) -..B1.24: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.25: - addl %edx, %ecx - lea _TWO_32H(%rip), %rdx - andl $-32768, %eax - lea 8+_ones(%rip), %r8 - orl $-49153, %eax - lea 112+_P(%rip), %r9 - movw %ax, 56(%rsp) - lea 80+_P(%rip), %r10 - fldt 48(%rsp) - lea 48+_P(%rip), %r11 - fld %st(0) - fldl (%rdx) - lea 16+_P(%rip), %rdx - shrl $23, %edi - fadd %st, %st(1) - movzbl %dil, %eax - fsubrp %st, %st(1) - movq __libm_rcp_table_256@GOTPCREL(%rip), %rdi - fsubr %st, %st(1) - flds (%rdi,%rax,4) - lea 96+_P(%rip), %rdi - fmul %st, %st(1) - fmulp %st, %st(2) - faddl (%r8) - fld %st(0) - lea 64+_P(%rip), %r8 - movl %ecx, 16(%rsp) - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%r9) - lea 32+_P(%rip), %r9 - fmul %st(2), %st - fldt (%r10) - lea _P(%rip), %r10 - shlq $4, %rax - faddp %st, %st(1) - fmul %st(2), %st - testb %sil, %sil - fldt (%r11) - lea 128+_P(%rip), %r11 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdx) - movq __libm_log2l_table_256@GOTPCREL(%rip), %rdx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%r10) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt (%r11) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(2) - fmulp %st, %st(1) - fildl 16(%rsp) - fxch %st(2) - faddl 8(%rdx,%rax) - fxch %st(2) - faddl (%rax,%rdx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.27 -..B1.26: - fldcw 26(%rsp) -..B1.27: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.28: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.32 -..B1.29: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.30: - fldcw 24(%rsp) -..B1.31: - movzbl 57(%rsp), %r8d - movb $1, %sil - andl $128, %r8d - shrl $7, %r8d -..B1.32: - testl %r8d, %r8d - jne ..B1.42 -..B1.33: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.34: - testb %sil, %sil - je ..B1.36 -..B1.35: - fldcw 26(%rsp) -..B1.36: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.37: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.6 -..B1.38: - lea _zeros(%rip), %rax - fldl (%rax) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.39: - lea 8+_ones(%rip), %rax - testb %sil, %sil - movsd (%rax), %xmm1 - divsd %xmm0, %xmm1 - je ..B1.41 -..B1.40: - fldcw 26(%rsp) -..B1.41: - movsd %xmm1, 16(%rsp) - fldl 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.42: - movzwl 56(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - jne ..B1.44 -..B1.43: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.33 - jmp ..B1.47 -..B1.44: - testl %eax, %eax - jne ..B1.47 -..B1.45: - cmpq $0, 48(%rsp) - jne ..B1.47 -..B1.46: - lea 8+_ones(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - divsd (%rdx), %xmm0 - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - fstpt (%rsp) - jmp ..B1.34 -..B1.47: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 16(%rsp) - fldl 16(%rsp) - fstpt (%rsp) - jmp ..B1.34 - .align 16,0x90 - .cfi_endproc - .type log2l,@function - .size log2l,.-log2l - .data -# -- End log2l - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_P: - .word 17354 - .word 24031 - .word 3064 - .word 38062 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 61628 - .word 23575 - .word 15145 - .word 47274 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 60493 - .word 53279 - .word 20193 - .word 63032 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 62043 - .word 23575 - .word 15145 - .word 47274 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 33329 - .word 29325 - .word 25223 - .word 37819 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 5068 - .word 45194 - .word 20193 - .word 63032 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 43239 - .word 63403 - .word 6517 - .word 54028 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 25259 - .word 45714 - .word 45135 - .word 47274 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14848 - .word 47274 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,144 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2l_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2l_table.S deleted file mode 100644 index d85ec17901..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log2l_table.S +++ /dev/null @@ -1,559 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log2l_table.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __libm_log2l_table_256 -__libm_log2l_table_256: - .long 0xa42e4000,0x3f671b0e - .long 0x1dbbd1a5,0x3cefda26 - .long 0x8eaec000,0x3f815cfe - .long 0xac00d0eb,0x3cf06028 - .long 0x0c5d0000,0x3f8cfee7 - .long 0x6dfa58c3,0xbd0a2394 - .long 0x62192000,0x3f94564a - .long 0x88333d4e,0x3d0068bc - .long 0xace34000,0x3f997723 - .long 0xac9ac44a,0x3d1765d0 - .long 0xc69b8000,0x3f9f5923 - .long 0xcfb08e1d,0xbd25afb7 - .long 0xa085c000,0x3fa2a094 - .long 0xa481e15f,0x3d2692b8 - .long 0x1776a000,0x3fa53894 - .long 0x36a2459e,0x3d201dc0 - .long 0x9b914000,0x3fa8324c - .long 0x2b15e585,0x3d178efe - .long 0xce080000,0x3faacf54 - .long 0x8e2d6a53,0xbd340b58 - .long 0x58dac000,0x3fadced9 - .long 0xd3ddb87a,0x3d2c119c - .long 0xfbca8000,0x3fb0387e - .long 0x16f872eb,0x3d1a7682 - .long 0x06748000,0x3fb18ac6 - .long 0xdff59ce4,0xbd18ff0d - .long 0x3e136000,0x3fb30edd - .long 0x15f8f5c1,0xbd29e679 - .long 0x59364000,0x3fb463c1 - .long 0x07b8e917,0x3d193671 - .long 0x3c3f8000,0x3fb5b9e1 - .long 0x4ce80f25,0x3d410e4a - .long 0x3259c000,0x3fb7113f - .long 0x637425fc,0x3d403cdb - .long 0x8d1b0000,0x3fb869dd - .long 0x3dfca47b,0x3d401a71 - .long 0xa49d0000,0x3fb9c3be - .long 0x8c6c8e73,0x3d4909ed - .long 0xd7960000,0x3fbb1ee4 - .long 0xf4540d3e,0x3d370159 - .long 0x8b70c000,0x3fbc7b52 - .long 0x0d939dcf,0x3d48e27d - .long 0x2c678000,0x3fbdd90a - .long 0x04d3d5b4,0xbd312b9c - .long 0x976c4000,0x3fbf05d4 - .long 0xcd9838ba,0xbd3fd7bc - .long 0xbaee8000,0x3fc032fb - .long 0x7d1edf2f,0xbd429af3 - .long 0xa9f32000,0x3fc0e3b5 - .long 0xeeb39e80,0x3d3094fb - .long 0x5c7d2000,0x3fc19519 - .long 0xa7453897,0xbd3b4aad - .long 0xc2ab2000,0x3fc22dad - .long 0xd23af327,0x3d4496d2 - .long 0x231e0000,0x3fc2e050 - .long 0xa377c7ec,0xbd350520 - .long 0x9c2b2000,0x3fc379f7 - .long 0xa3793dbe,0x3d256aea - .long 0x2ba1c000,0x3fc42ddd - .long 0xac74b87f,0xbd36ad5b - .long 0x9e680000,0x3fc4c89b - .long 0x02de76ad,0x3d2fd2e8 - .long 0x29ffc000,0x3fc563dc - .long 0x78df21ad,0xbd434df3 - .long 0x5f5d8000,0x3fc619a2 - .long 0xaf108e66,0xbd29cc54 - .long 0xbf368000,0x3fc6b5ff - .long 0x175a06f6,0xbd337788 - .long 0xf6610000,0x3fc752e1 - .long 0x902c7d37,0xbd2ca90f - .long 0xe7540000,0x3fc7f049 - .long 0xec326af7,0xbd483153 - .long 0x0abfc000,0x3fc8a898 - .long 0xab240e90,0xbd166ccc - .long 0xcca64000,0x3fc94724 - .long 0x82d7bfe5,0x3d47be4d - .long 0x24970000,0x3fc9e63a - .long 0xca6bec19,0x3d4f45ea - .long 0xfeb20000,0x3fca85d8 - .long 0xd08dc20f,0x3d17b6aa - .long 0x497d8000,0x3fcb2602 - .long 0x90cb67ba,0xbd565d39 - .long 0xf5ee4000,0x3fcbc6b6 - .long 0xcabaa043,0xbd51b254 - .long 0xf770c000,0x3fcc67f7 - .long 0xab00c050,0xbd49821f - .long 0xb2234000,0x3fcceec4 - .long 0xdad67ab8,0x3d3f73bc - .long 0x7ad10000,0x3fcd9109 - .long 0x370c6558,0x3d5cc12e - .long 0x57f3c000,0x3fce33dd - .long 0x4a928ccd,0x3d433481 - .long 0x46bc8000,0x3fced741 - .long 0x984a7cdc,0xbd23bfd7 - .long 0x46ff0000,0x3fcf7b36 - .long 0x48e15c73,0xbd32f9b5 - .long 0xa943e000,0x3fd00223 - .long 0x00388584,0xbd2f3862 - .long 0x74bf0000,0x3fd054a4 - .long 0xf7113597,0x3d4d6efe - .long 0x9b926000,0x3fd0999d - .long 0xa7e48c00,0xbd397bf5 - .long 0x6d3b4000,0x3fd0eca6 - .long 0xcb31a070,0xbd5a7f50 - .long 0x2e85c000,0x3fd13ffa - .long 0xc54ae907,0xbd471577 - .long 0x44fa0000,0x3fd185a4 - .long 0x6fa317ed,0x3d44f66d - .long 0x12f28000,0x3fd1cb83 - .long 0xce4e50d0,0xbd1010cf - .long 0x441ce000,0x3fd21fa1 - .long 0xf89df349,0x3d379e4a - .long 0x26e60000,0x3fd265f5 - .long 0x84a6a593,0x3d2e59ad - .long 0xc34be000,0x3fd2baa0 - .long 0xcd51a1bf,0x3d1ebefe - .long 0x45de2000,0x3fd3016b - .long 0xec0723df,0x3d1ce045 - .long 0x38aa2000,0x3fd3486c - .long 0xaa5dfd69,0x3d434f09 - .long 0xefaa8000,0x3fd38fa3 - .long 0x91962d0f,0x3d2313fc - .long 0xc0816000,0x3fd3e562 - .long 0xfa64765f,0x3d440340 - .long 0x1f53c000,0x3fd42d14 - .long 0x167aead5,0xbd4374da - .long 0x543f2000,0x3fd474fd - .long 0x400ce06e,0x3d216293 - .long 0xb6810000,0x3fd4bd1e - .long 0x8d05e4fa,0xbd5ab857 - .long 0x9e236000,0x3fd50578 - .long 0xbbaffd12,0xbd542eea - .long 0x64004000,0x3fd54e0b - .long 0x92de8d74,0xbd323e74 - .long 0x61c40000,0x3fd596d7 - .long 0xb5eabc35,0xbd6f07ff - .long 0xf1eec000,0x3fd5dfdc - .long 0xd2926f16,0xbd51f1bb - .long 0x6fd94000,0x3fd6291c - .long 0xdc0e627c,0xbd4ac899 - .long 0x37b58000,0x3fd67296 - .long 0xd82f9efc,0x3d541782 - .long 0xa6930000,0x3fd6bc4a - .long 0x46b4eaee,0xbd5f036d - .long 0x1a5fc000,0x3fd7063a - .long 0x0e43a37f,0xbd461b8d - .long 0xf1ed0000,0x3fd75064 - .long 0xec06848a,0x3d3c558f - .long 0x8cf10000,0x3fd79acb - .long 0x9ea019ad,0x3d2c7d46 - .long 0x1e438000,0x3fd7d67c - .long 0x2119c4e9,0x3d672dc9 - .long 0x4068c000,0x3fd8214f - .long 0x8322d649,0xbd505944 - .long 0x36dec000,0x3fd86c5f - .long 0x982b6522,0xbd5c2445 - .long 0x64dd8000,0x3fd8b7ac - .long 0x3c24b943,0xbcf8cd4c - .long 0x7a0c8000,0x3fd8f416 - .long 0x1882631a,0xbd506e0d - .long 0xd5e1c000,0x3fd93fd2 - .long 0x37daf317,0xbd0c6d2c - .long 0x84298000,0x3fd98bcd - .long 0x1c4482c6,0xbd56ba65 - .long 0x33e70000,0x3fd9c8c3 - .long 0x2b947c14,0xbd565ac6 - .long 0x14298000,0x3fda152f - .long 0x0e65d2ce,0x3d1b3d7b - .long 0xd95fc000,0x3fda527f - .long 0xad63ae87,0x3d58ff36 - .long 0x3edec000,0x3fda9f5e - .long 0x112e6c5e,0xbd38668d - .long 0x2b574000,0x3fdadd0b - .long 0x1a609aaa,0x3d55a69a - .long 0x6f520000,0x3fdb2a5d - .long 0xfdf426cf,0xbcff5369 - .long 0x99b00000,0x3fdb6867 - .long 0x84b3fb1a,0x3d47c5c7 - .long 0x1b888000,0x3fdbb62f - .long 0xef0b8928,0xbd29427b - .long 0x9f664000,0x3fdbf497 - .long 0x3da6863a,0x3d63342a - .long 0x6e83c000,0x3fdc332a - .long 0xb6303c0d,0xbd6315fe - .long 0xc2d44000,0x3fdc819d - .long 0x95d8ac46,0x3d5fe438 - .long 0x8e19c000,0x3fdcc090 - .long 0x870d5301,0xbd4085c5 - .long 0x611b0000,0x3fdcffae - .long 0xb8e97d14,0xbd676a4e - .long 0x76d44000,0x3fdd3ef7 - .long 0x378ff59d,0xbcc81e2b - .long 0x02710000,0x3fdd8e50 - .long 0x99a48379,0x3d128679 - .long 0x486cc000,0x3fddcdfb - .long 0x57e20e48,0xbd397d70 - .long 0x94244000,0x3fde0dd2 - .long 0x4e05d479,0x3d5fe3e2 - .long 0x22a28000,0x3fde4dd6 - .long 0x3522eadc,0x3d407f39 - .long 0x31710000,0x3fde8e06 - .long 0xd1f94399,0x3d54efc5 - .long 0xfe9ac000,0x3fdece62 - .long 0x793f3b67,0xbd63755a - .long 0x4a154000,0x3fdf1f16 - .long 0x1e0f6657,0xbd3d990d - .long 0xa9064000,0x3fdf5fd8 - .long 0x0109b0f1,0xbd1cb6f7 - .long 0x937e8000,0x3fdfa0c8 - .long 0xcacac36e,0xbd2515e1 - .long 0x49bb8000,0x3fdfe1e6 - .long 0x293a746b,0xbd5cca93 - .long 0x06416000,0x3fe01199 - .long 0xd8721fec,0xbd594c3a - .long 0x0e91e000,0x3fe03256 - .long 0x3e307cbb,0x3d467783 - .long 0x5ebce000,0x3fe0532a - .long 0xa9a9f37a,0xbd576c46 - .long 0x17f60000,0x3fe07416 - .long 0xbbaf9ab0,0xbd3ebdb1 - .long 0x53f38000,0x3fe08cd6 - .long 0x7d0732d6,0x3d5072ba - .long 0x55c12000,0x3fe0adeb - .long 0x502d528c,0xbd5f89ea - .long 0x1d5d2000,0x3fe0cf18 - .long 0x656576a5,0xbd317e70 - .long 0xcd0ac000,0x3fe0f05c - .long 0xc4d028f0,0x3d5dae75 - .long 0x87578000,0x3fe111b9 - .long 0xfb8eb2af,0x3d51553a - .long 0x6f1bc000,0x3fe1332e - .long 0x1e351573,0x3d5ee62e - .long 0xa77c2000,0x3fe154bb - .long 0x96dcbe61,0x3d1109e5 - .long 0x9bfa2000,0x3fe16df5 - .long 0x0adf6a55,0xbd693ea9 - .long 0xb6e2c000,0x3fe18fad - .long 0x517ae88c,0x3d63c19b - .long 0x849ae000,0x3fe1b17e - .long 0xff1e8ea2,0xbd3ecf4d - .long 0x6a0de000,0x3fe1caeb - .long 0x854dfeca,0x3d5027e9 - .long 0xc8310000,0x3fe1ece7 - .long 0x7a9fc25e,0xbd6136da - .long 0x3dae0000,0x3fe20efd - .long 0xa02e61be,0x3d2df373 - .long 0xe375e000,0x3fe2289d - .long 0xc27a8169,0xbd4bfa6f - .long 0x9b6a8000,0x3fe24adf - .long 0x14538362,0xbd601f94 - .long 0xd1aea000,0x3fe26d3a - .long 0xb5d13c0f,0x3d6cfc3a - .long 0x0c276000,0x3fe28710 - .long 0xcec1b4ea,0x3d61f3e3 - .long 0x3b3c0000,0x3fe2a998 - .long 0xcb3fff52,0x3d6b2840 - .long 0x5c842000,0x3fe2c38f - .long 0xdfa568f7,0x3d10bad7 - .long 0xfac06000,0x3fe2e644 - .long 0xbe206bcc,0xbd60284e - .long 0x5c482000,0x3fe3005e - .long 0x50757c6c,0x3d4411d0 - .long 0xe1d88000,0x3fe32341 - .long 0x4bed16a8,0x3d5370c2 - .long 0xde748000,0x3fe33d7d - .long 0x4a603b86,0xbd57fbb4 - .long 0xc5650000,0x3fe3608f - .long 0x14f8ca8f,0x3d3a63aa - .long 0xb9548000,0x3fe37aee - .long 0xc4484d2e,0xbd52b278 - .long 0x7d9a8000,0x3fe39e2f - .long 0xf9f603ee,0xbd627a85 - .long 0xc68fa000,0x3fe3b8b1 - .long 0x9336b66e,0x3d4bb4b6 - .long 0xe613e000,0x3fe3dc21 - .long 0xe04a7773,0xbd60c6e3 - .long 0xe33ba000,0x3fe3f6c7 - .long 0xfc271317,0x3d325d25 - .long 0x4b1fe000,0x3fe4117d - .long 0xf19c5879,0xbd47fe42 - .long 0xefeec000,0x3fe43531 - .long 0x74b82e7e,0xbd52f11d - .long 0x969d0000,0x3fe4500b - .long 0xbb075298,0x3d65b869 - .long 0xe41a2000,0x3fe46af4 - .long 0x4d994a2a,0xbd182943 - .long 0x19316000,0x3fe48eef - .long 0x3956fa5e,0x3d6990d4 - .long 0x333d4000,0x3fe4a9fd - .long 0xe1bd6277,0x3d67e24a - .long 0x318c0000,0x3fe4c51b - .long 0x2a8a4d7a,0xbd5f91de - .long 0x26d38000,0x3fe4e049 - .long 0xdd409e96,0xbd320665 - .long 0x63f64000,0x3fe5049f - .long 0x7b11231a,0x3d5b76a8 - .long 0xe3022000,0x3fe51ff2 - .long 0xa00b120a,0xbd56879f - .long 0x98572000,0x3fe53b56 - .long 0xfa5c51d1,0x3d673642 - .long 0x973dc000,0x3fe556ca - .long 0x459db47f,0xbd53cd8a - .long 0xf3200000,0x3fe5724e - .long 0x9385d649,0x3d591597 - .long 0x03a5c000,0x3fe59719 - .long 0x449e2590,0xbd31bb71 - .long 0xda198000,0x3fe5b2c3 - .long 0x492bf6ff,0xbd5b8afe - .long 0x4f3e4000,0x3fe5ce7f - .long 0x4f9a9e0c,0x3d76ae3f - .long 0x77184000,0x3fe5ea4b - .long 0x06727b86,0x3d65cd66 - .long 0x65cf0000,0x3fe60628 - .long 0x2f6664db,0x3d5e3c54 - .long 0x2faf4000,0x3fe62216 - .long 0x60c37437,0xbd773ea5 - .long 0xe929c000,0x3fe63e14 - .long 0xcd9d28e6,0x3d346549 - .long 0xa6d5c000,0x3fe65a24 - .long 0xc074b84d,0x3d5de792 - .long 0x7d6f8000,0x3fe67645 - .long 0x3180227e,0x3d45bfa4 - .long 0x81d94000,0x3fe69277 - .long 0x137a3d8c,0xbd5aaf6f - .long 0xc91b8000,0x3fe6aeba - .long 0x459f4910,0xbd2c3a4f - .long 0x6865c000,0x3fe6cb0f - .long 0xdb502403,0x3d51d406 - .long 0x750e8000,0x3fe6e775 - .long 0x54ae8096,0x3d57aac5 - .long 0x0493c000,0x3fe703ed - .long 0xd0d1a7f0,0xbd4c2657 - .long 0x2c9b0000,0x3fe72076 - .long 0xf1ec6bfa,0x3d6cb070 - .long 0x02f2c000,0x3fe73d11 - .long 0x28f88499,0x3d130454 - .long 0x9d914000,0x3fe759bd - .long 0x84b0b58b,0x3d5ed855 - .long 0x12968000,0x3fe7767c - .long 0x12e0b4f3,0xbd46eb96 - .long 0x784b4000,0x3fe7934c - .long 0x9cb23d17,0x3d6f0113 - .long 0xe522c000,0x3fe7b02e - .long 0xa5258bb7,0x3d77f7ed - .long 0x92280000,0x3fe7c37a - .long 0x818d34cf,0xbd6804b7 - .long 0x3d39c000,0x3fe7e07b - .long 0xf457de07,0x3d650290 - .long 0x2c1b4000,0x3fe7fd8e - .long 0xb343a140,0x3d2a15a5 - .long 0x75dc0000,0x3fe81ab3 - .long 0x2ec63274,0x3d584b7a - .long 0x31b7c000,0x3fe837eb - .long 0x22b56634,0x3d6c362e - .long 0x7716c000,0x3fe85535 - .long 0xa24036e1,0xbd7707b5 - .long 0xa808c000,0x3fe868c6 - .long 0xdc0e40d3,0xbd5bd2ae - .long 0x0713c000,0x3fe88630 - .long 0x6f909cf3,0xbd6203b8 - .long 0x2ee78000,0x3fe8a3ac - .long 0xbd315db9,0xbd5c935d - .long 0x3791c000,0x3fe8c13b - .long 0x11e2bd73,0x3d5dffed - .long 0x70e24000,0x3fe8d4fa - .long 0x8994b162,0xbd3b912d - .long 0x2639c000,0x3fe8f2a9 - .long 0x1cc06b22,0xbd677406 - .long 0xfd704000,0x3fe9106a - .long 0x6f31880a,0xbd1b76a4 - .long 0x3a284000,0x3fe9244c - .long 0x7db199c6,0xbd72bd2d - .long 0x2b878000,0x3fe9422e - .long 0x1eceebf4,0x3d607320 - .long 0x81210000,0x3fe96023 - .long 0x2956f019,0x3d6518a1 - .long 0x3737c000,0x3fe97427 - .long 0x71deb637,0x3d61e54d - .long 0x16b18000,0x3fe9923d - .long 0xebd2e82c,0x3d5028ed - .long 0x9e1bc000,0x3fe9b066 - .long 0xc89c6f2d,0xbd210f7a - .long 0x45f2c000,0x3fe9c48d - .long 0xe6a10cca,0xbd55b5da - .long 0xc93fc000,0x3fe9e2d7 - .long 0x6045b96c,0xbd74e31c - .long 0x39988000,0x3fea0136 - .long 0xd9459b34,0x3d3d25cf - .long 0x4e0bc000,0x3fea1580 - .long 0xd0364be2,0x3d744421 - .long 0x2ea54000,0x3fea3400 - .long 0x3388b97b,0x3d5c79a4 - .long 0xa67f8000,0x3fea4860 - .long 0xa2e241fc,0xbd5eddce - .long 0x414dc000,0x3fea6702 - .long 0xcc538261,0xbd43167c - .long 0x4e2e0000,0x3fea7b79 - .long 0xf16ff990,0xbd43cf0f - .long 0xee1c0000,0x3fea9a3c - .long 0xe3084679,0x3cf6c31d - .long 0x1be18000,0x3feab915 - .long 0x2c022617,0xbd672292 - .long 0xb33ac000,0x3feacdb0 - .long 0xb1410c94,0xbd4b23e5 - .long 0x60094000,0x3feaecab - .long 0x0ae3394c,0x3d50556b - .long 0x107c4000,0x3feb015e - .long 0xed2b2eb2,0xbd5d0db1 - .long 0x0cb28000,0x3feb161a - .long 0xd90df0b9,0x3d5353b3 - .long 0x8761c000,0x3feb3545 - .long 0x2b834fe3,0x3d647978 - .long 0xe5b20000,0x3feb4a18 - .long 0x2a855a1a,0x3d402327 - .long 0x9b240000,0x3feb6967 - .long 0x3726f484,0xbd7b3b86 - .long 0x90874000,0x3feb7e52 - .long 0x09b9625e,0x3d2d2152 - .long 0xd0b8c000,0x3feb9dc4 - .long 0x29c44115,0xbd46be4a - .long 0x92ddc000,0x3febb2c7 - .long 0xd690403e,0xbd28b7fc - .long 0xaeddc000,0x3febd25d - .long 0xb0f92e32,0x3d46a10e - .long 0x742ac000,0x3febe778 - .long 0x7ecf463f,0xbd6ad6fb - .long 0xe3b98000,0x3febfc9c - .long 0x1185e784,0xbd42cbe5 - .long 0xbdb50000,0x3fec1c65 - .long 0x6951096d,0x3d3e742a - .long 0x7dd04000,0x3fec31a2 - .long 0xcbdb5d9e,0xbd7a5b21 - .long 0x076cc000,0x3fec46e9 - .long 0x86f88587,0xbd3ddb78 - .long 0x43730000,0x3fec66e5 - .long 0xbaa5a734,0x3d523bf0 - .long 0x6c790000,0x3fec7c44 - .long 0xf67dd7ae,0xbd7c7a0d - .long 0x7ed84000,0x3fec91ad - .long 0x6188e18f,0x3d722f0b - .long 0xc4194000,0x3fecb1dd - .long 0x4bba7e1c,0x3d77b6c1 - .long 0xc6410000,0x3fecc75f - .long 0xb0c280a9,0x3d64f1b9 - .long 0xd2374000,0x3fecdceb - .long 0x391924a7,0xbd49ad57 - .long 0xcb184000,0x3fecfd50 - .long 0x6ab58d83,0xbd6078ca - .long 0x18c18000,0x3fed12f6 - .long 0xeb119dc6,0xbd6fe599 - .long 0x914e4000,0x3fed28a5 - .long 0x26c0de13,0xbd6fb0e6 - .long 0x3e504000,0x3fed3e5f - .long 0x9ace87f7,0xbd506b11 - .long 0xf93fc000,0x3fed5f08 - .long 0x4f2d37b7,0xbd73bb6d - .long 0x539dc000,0x3fed74dc - .long 0xb806844c,0x3d727a5f - .long 0x045b0000,0x3fed8aba - .long 0xf65ddbc9,0x3d2c7a4f - .long 0x15464000,0x3feda0a2 - .long 0x0af75927,0x3d74c8da - .long 0xb896c000,0x3fedc191 - .long 0x5363737e,0xbd6cdb50 - .long 0xe53dc000,0x3fedd793 - .long 0xa1dc7b13,0xbd76ffa3 - .long 0x94d7c000,0x3fededa0 - .long 0x1919aabd,0x3d6747e2 - .long 0xd174c000,0x3fee03b7 - .long 0x2f683f98,0xbd514fc4 - .long 0xa531c000,0x3fee19d9 - .long 0x3a87769f,0x3d7728dc - .long 0x1a3c0000,0x3fee3006 - .long 0x768a06ef,0xbd7a0e7d - .long 0xce9f8000,0x3fee515c - .long 0x518e12cc,0xbd65f71b - .long 0x03cb4000,0x3fee67a4 - .long 0xfaf8e258,0x3d75735c - .long 0xfe538000,0x3fee7df5 - .long 0xf6a2b592,0x3d55669d - .long 0xc8a70000,0x3fee9452 - .long 0xec9f90f7,0x3d60278c - .long 0x6d444000,0x3feeaaba - .long 0x2268e3e2,0x3d799543 - .long 0xf6b98000,0x3feec12c - .long 0x09d2dc10,0xbd468988 - .long 0x6fa38000,0x3feed7aa - .long 0x51433cdb,0xbd7387ac - .long 0xe2aec000,0x3feeee32 - .long 0x4fd75f61,0x3d597da2 - .long 0x3bbf4000,0x3fef1014 - .long 0x68ea48c7,0x3d71983c - .long 0x4f39c000,0x3fef26b8 - .long 0x4efa434d,0xbd72177b - .long 0x82ae0000,0x3fef3d67 - .long 0xf9197819,0x3d6fbc2b - .long 0xe1110000,0x3fef5421 - .long 0xa92b420d,0x3d69402d - .long 0x75670000,0x3fef6ae7 - .long 0x00c52b20,0xbd67cf2e - .long 0x4ac44000,0x3fef81b8 - .long 0x10fed627,0x3d2f2407 - .long 0x6c4e4000,0x3fef9894 - .long 0xd2088b22,0x3d61d346 - .long 0xe53ac000,0x3fefaf7b - .long 0xf5920222,0x3d69b7dc - .long 0xc0d04000,0x3fefc66e - .long 0xdbf33c61,0x3d6314d8 - .long 0x0a660000,0x3fefdd6d - .long 0x088b0624,0x3d603dc6 - .long 0xcd644000,0x3feff476 - .long 0xf02b035e,0x3d6e05d5 - .type __libm_log2l_table_256,@object - .size __libm_log2l_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log_gen.S deleted file mode 100644 index 1a11f6b3d2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log_gen.S +++ /dev/null @@ -1,758 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log_gen.c" - .text -..TXTST0: -# -- Begin log - .text - .align 16,0x90 - .globl log -log: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_log.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) -..B1.2: - movq $0x3ff0000000000000, %rax - movd %rax, %xmm2 - movq $0x77f0000000000000, %rdx - movd %rdx, %xmm3 - movl $32768, %ecx - movd %rcx, %xmm4 - movq $0xffffe00000000000, %r8 - movd %r8, %xmm5 - movq %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - movl $16352, %ecx - psrlq $27, %xmm0 - lea L_tbl(%rip), %r11 - psrld $2, %xmm0 - rcpps %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $228, %xmm5, %xmm6 - psrlq $12, %xmm1 - subl $16, %eax - cmpl $32736, %eax - jae .L_2TAG_PACKET_0.0.2 -.L_2TAG_PACKET_1.0.2: - paddd %xmm4, %xmm0 - orpd %xmm3, %xmm1 - movd %xmm0, %edx - psllq $29, %xmm0 - andpd %xmm1, %xmm5 - andpd %xmm6, %xmm0 - subsd %xmm5, %xmm1 - mulpd %xmm0, %xmm5 - andl $32752, %eax - subl %ecx, %eax - cvtsi2sd %eax, %xmm7 - mulsd %xmm0, %xmm1 - movq log2(%rip), %xmm6 - movapd coeff(%rip), %xmm3 - subsd %xmm2, %xmm5 - andl $16711680, %edx - shrl $12, %edx - movapd (%r11,%rdx), %xmm0 - movapd 16+coeff(%rip), %xmm4 - addsd %xmm5, %xmm1 - movapd 32+coeff(%rip), %xmm2 - mulsd %xmm7, %xmm6 - movapd %xmm1, %xmm5 - unpcklpd %xmm1, %xmm5 - mulsd 8+log2(%rip), %xmm7 - mulsd %xmm1, %xmm3 - addsd %xmm6, %xmm0 - mulpd %xmm5, %xmm4 - mulpd %xmm5, %xmm5 - movapd %xmm0, %xmm6 - unpcklpd %xmm0, %xmm6 - addsd %xmm1, %xmm0 - addpd %xmm2, %xmm4 - mulpd %xmm5, %xmm3 - subsd %xmm0, %xmm6 - mulsd %xmm1, %xmm4 - pshufd $238, %xmm0, %xmm2 - addsd %xmm6, %xmm1 - mulsd %xmm5, %xmm5 - addsd %xmm2, %xmm7 - addpd %xmm3, %xmm4 - addsd %xmm7, %xmm1 - mulpd %xmm5, %xmm4 - addsd %xmm4, %xmm1 - pshufd $238, %xmm4, %xmm5 - addsd %xmm5, %xmm1 - addsd %xmm1, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - movq (%rsp), %xmm0 - movq (%rsp), %xmm1 - addl $16, %eax - cmpl $32768, %eax - jae .L_2TAG_PACKET_2.0.2 - cmpl $16, %eax - jb .L_2TAG_PACKET_3.0.2 -.L_2TAG_PACKET_4.0.2: - addsd %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_5.0.2: - ja .L_2TAG_PACKET_4.0.2 - cmpl $0, %edx - ja .L_2TAG_PACKET_4.0.2 - jmp .L_2TAG_PACKET_6.0.2 -.L_2TAG_PACKET_3.0.2: - xorpd %xmm1, %xmm1 - addsd %xmm0, %xmm1 - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_7.0.2 - xorpd %xmm1, %xmm1 - movl $18416, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - movq %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orpd %xmm2, %xmm0 - psrlq $27, %xmm0 - movl $18416, %ecx - psrld $2, %xmm0 - rcpps %xmm0, %xmm0 - psllq $12, %xmm1 - pshufd $228, %xmm5, %xmm6 - psrlq $12, %xmm1 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_2.0.2: - movd %xmm1, %edx - psrlq $32, %xmm1 - movd %xmm1, %ecx - addl %ecx, %ecx - cmpl $-2097152, %ecx - jae .L_2TAG_PACKET_5.0.2 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_7.0.2 -.L_2TAG_PACKET_6.0.2: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $32752, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm0 - movl $3, 16(%rsp) - jmp .L_2TAG_PACKET_8.0.2 -.L_2TAG_PACKET_7.0.2: - xorpd %xmm1, %xmm1 - xorpd %xmm0, %xmm0 - movl $49136, %eax - pinsrw $3, %eax, %xmm0 - divsd %xmm1, %xmm0 - movl $2, 16(%rsp) -.L_2TAG_PACKET_8.0.2: - movq %xmm0, 8(%rsp) -..B1.3: - movq 8(%rsp), %xmm0 -.L_2TAG_PACKET_9.0.2: -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type log,@function - .size log,.-log - .data -# -- End log - .section .rodata, "a" - .align 16 - .align 16 -L_tbl: - .long 4277811200 - .long 1072049730 - .long 2479318832 - .long 1026487127 - .long 2854492160 - .long 1072033410 - .long 215631550 - .long 1025638968 - .long 1547061248 - .long 1072017216 - .long 2886781435 - .long 1026423395 - .long 649825280 - .long 1072001146 - .long 4281533405 - .long 1024038923 - .long 646346752 - .long 1071985198 - .long 1562735921 - .long 1023790276 - .long 2203734016 - .long 1071969370 - .long 1838397691 - .long 3173936209 - .long 1872169984 - .long 1071953661 - .long 3981202460 - .long 1022325013 - .long 669557760 - .long 1071938069 - .long 4182597802 - .long 3173174122 - .long 4076413952 - .long 1071922591 - .long 1209029111 - .long 3170736207 - .long 556125184 - .long 1071907228 - .long 821086028 - .long 3173437049 - .long 204914688 - .long 1071891976 - .long 2097025986 - .long 3171071798 - .long 387545088 - .long 1071876834 - .long 3142936996 - .long 3173092218 - .long 2912783360 - .long 1071861800 - .long 2502420140 - .long 1024505919 - .long 1144260608 - .long 1071846874 - .long 3315658140 - .long 3173469843 - .long 1471209472 - .long 1071832053 - .long 129621009 - .long 3172443877 - .long 1829683200 - .long 1071817336 - .long 3885467693 - .long 1025535275 - .long 288676864 - .long 1071802722 - .long 86139472 - .long 3171639793 - .long 3636378624 - .long 1071788208 - .long 1850238587 - .long 1024654342 - .long 1606817792 - .long 1071773795 - .long 3388899795 - .long 3173675586 - .long 1236164608 - .long 1071759480 - .long 3983599207 - .long 1020046558 - .long 1089616896 - .long 1071745262 - .long 4171974224 - .long 1024773198 - .long 4143093760 - .long 1071731139 - .long 2727587401 - .long 3173965207 - .long 600267776 - .long 1071717112 - .long 3147685042 - .long 3173353031 - .long 2249313280 - .long 1071703177 - .long 125835074 - .long 1025255832 - .long 3805303808 - .long 1071689334 - .long 2289991207 - .long 1025460331 - .long 87278592 - .long 1071675583 - .long 1106114045 - .long 1025933602 - .long 3195405312 - .long 1071661920 - .long 3885316576 - .long 3171206239 - .long 3853649920 - .long 1071648346 - .long 2977069852 - .long 3171236771 - .long 2944026624 - .long 1071625048 - .long 1008093493 - .long 1023444474 - .long 3993180160 - .long 1071598247 - .long 1862355595 - .long 1024642533 - .long 1454641152 - .long 1071571617 - .long 1514603089 - .long 1026500596 - .long 3286085632 - .long 1071545154 - .long 1400028424 - .long 3173279056 - .long 438773760 - .long 1071518858 - .long 120727864 - .long 3172148914 - .long 1212979200 - .long 1071492725 - .long 1625055594 - .long 3172901933 - .long 1189017600 - .long 1071466754 - .long 3920062376 - .long 1025727407 - .long 403064832 - .long 1071440943 - .long 1053271728 - .long 3171391427 - .long 3343210496 - .long 1071415289 - .long 3243395502 - .long 3173627613 - .long 1765777408 - .long 1071389792 - .long 2145968512 - .long 1026354304 - .long 461430784 - .long 1071364449 - .long 4094322285 - .long 1026021467 - .long 71706624 - .long 1071339258 - .long 763632021 - .long 1024496933 - .long 1380503552 - .long 1071314217 - .long 1383547992 - .long 3173088453 - .long 1015732224 - .long 1071289325 - .long 3198646877 - .long 1025390322 - .long 35977216 - .long 1071264580 - .long 2141026805 - .long 1025754693 - .long 3927306240 - .long 1071239979 - .long 282116272 - .long 3173394334 - .long 1125341184 - .long 1071215523 - .long 2768427504 - .long 3172279059 - .long 1666971648 - .long 1071191208 - .long 786837629 - .long 3172427445 - .long 2827694080 - .long 1071167033 - .long 3857122416 - .long 3173014241 - .long 2003683328 - .long 1071142997 - .long 859010954 - .long 1026545007 - .long 1004017664 - .long 1071119098 - .long 3356644970 - .long 3173458064 - .long 1753020416 - .long 1071095334 - .long 788338552 - .long 1026157693 - .long 1992718336 - .long 1071071704 - .long 1239179443 - .long 1026394889 - .long 3870234624 - .long 1071048206 - .long 2082614663 - .long 1024926053 - .long 1050437632 - .long 1071024840 - .long 660007840 - .long 1025548499 - .long 188395520 - .long 1071001603 - .long 3878792704 - .long 3173889571 - .long 3747176448 - .long 1070978493 - .long 144991708 - .long 3171552042 - .long 1405669376 - .long 1070955511 - .long 3999088879 - .long 1025486317 - .long 121151488 - .long 1070932654 - .long 2170865497 - .long 1026473584 - .long 2652319744 - .long 1070909920 - .long 453695652 - .long 3173916809 - .long 3262236672 - .long 1070887309 - .long 157800053 - .long 3173984206 - .long 601221120 - .long 1070864820 - .long 3968917661 - .long 1023992886 - .long 1999843328 - .long 1070842450 - .long 3053895004 - .long 1024998228 - .long 1992167424 - .long 1070820199 - .long 2968614856 - .long 1024552653 - .long 3788726272 - .long 1070798065 - .long 3542170808 - .long 3173573242 - .long 2094829568 - .long 1070776048 - .long 1246758132 - .long 1026202874 - .long 288675840 - .long 1070754146 - .long 3747328950 - .long 1026331585 - .long 1829681152 - .long 1070732357 - .long 3125197546 - .long 1024100318 - .long 1666869248 - .long 1070710681 - .long 1363656119 - .long 1026336493 - .long 3417110528 - .long 1070689116 - .long 4154791553 - .long 1026267853 - .long 2183653376 - .long 1070667662 - .long 1671819292 - .long 3173785870 - .long 1734434816 - .long 1070646317 - .long 373091049 - .long 1025972363 - .long 1615681536 - .long 1070625080 - .long 384650897 - .long 1022926043 - .long 1445382144 - .long 1070603950 - .long 344320330 - .long 3172397196 - .long 1823715328 - .long 1070569756 - .long 3389841200 - .long 1025231852 - .long 3839688704 - .long 1070527917 - .long 1706790417 - .long 3167363349 - .long 4293332992 - .long 1070486286 - .long 1614935088 - .long 1019351591 - .long 2966720512 - .long 1070444861 - .long 4145393717 - .long 3173711658 - .long 4066729984 - .long 1070403639 - .long 1974925028 - .long 3171437182 - .long 3337621504 - .long 1070362619 - .long 3314953170 - .long 3169971314 - .long 943448064 - .long 1070321799 - .long 1498682038 - .long 3173862340 - .long 1465634816 - .long 1070281176 - .long 1319952810 - .long 3171693965 - .long 1015734272 - .long 1070240749 - .long 1347821929 - .long 3173544515 - .long 118001664 - .long 1070200516 - .long 1751482746 - .long 1026134093 - .long 3707174912 - .long 1070160474 - .long 1486946159 - .long 1023930920 - .long 3946381312 - .long 1070120623 - .long 2867408081 - .long 3171368276 - .long 1699848192 - .long 1070080961 - .long 2590187139 - .long 1025379803 - .long 2235846656 - .long 1070041485 - .long 1888568069 - .long 3172754960 - .long 2339729408 - .long 1070002194 - .long 3852214753 - .long 3173323149 - .long 3196850176 - .long 1069963086 - .long 742141560 - .long 1025101707 - .long 1800683520 - .long 1069924160 - .long 3949500444 - .long 3172102179 - .long 3835801600 - .long 1069885413 - .long 3848895943 - .long 1025913832 - .long 2201202688 - .long 1069846845 - .long 1425913464 - .long 1025868665 - .long 2778279936 - .long 1069808453 - .long 2120889677 - .long 3173831128 - .long 2954203136 - .long 1069770236 - .long 592147081 - .long 1019621288 - .long 210141184 - .long 1069732193 - .long 3414275233 - .long 1023647084 - .long 709476352 - .long 1069694321 - .long 2413027164 - .long 1024462115 - .long 2116284416 - .long 1069656619 - .long 1144559924 - .long 1026336654 - .long 2183651328 - .long 1069619086 - .long 3459057650 - .long 1025634168 - .long 3047047168 - .long 1069581720 - .long 1879674924 - .long 3173508573 - .long 970711040 - .long 1069541521 - .long 1335954173 - .long 3173332182 - .long 2198478848 - .long 1069467449 - .long 2951103968 - .long 3173892200 - .long 1669611520 - .long 1069393703 - .long 531044147 - .long 1025149248 - .long 29114368 - .long 1069320280 - .long 3327831251 - .long 1025918673 - .long 2376949760 - .long 1069247176 - .long 737634533 - .long 3172176000 - .long 1085390848 - .long 1069174390 - .long 3108243400 - .long 3171828406 - .long 1566130176 - .long 1069101918 - .long 985483226 - .long 1025708380 - .long 792780800 - .long 1069029758 - .long 4184866295 - .long 1024426204 - .long 183156736 - .long 1068957907 - .long 2845699378 - .long 1022107277 - .long 1301782528 - .long 1068886362 - .long 1012735262 - .long 3173804294 - .long 1562411008 - .long 1068815121 - .long 2197086703 - .long 3170187813 - .long 2815549440 - .long 1068744181 - .long 2782613207 - .long 1026345054 - .long 2756124672 - .long 1068673540 - .long 2929486205 - .long 3173037800 - .long 3511050240 - .long 1068603195 - .long 1443733147 - .long 3173331549 - .long 3047047168 - .long 1068533144 - .long 1879674924 - .long 3172459997 - .long 3221667840 - .long 1068427825 - .long 1338588027 - .long 3171815742 - .long 3453861888 - .long 1068288883 - .long 1205348359 - .long 3172624626 - .long 3506110464 - .long 1068150514 - .long 893105198 - .long 1025571866 - .long 346013696 - .long 1068012714 - .long 3495569021 - .long 3172563349 - .long 4074029056 - .long 1067875476 - .long 3961106338 - .long 3171065595 - .long 3559784448 - .long 1067738798 - .long 1975385384 - .long 3173783155 - .long 797769728 - .long 1067602675 - .long 3760305787 - .long 1026047642 - .long 2313633792 - .long 1067467101 - .long 1559353171 - .long 1023480256 - .long 3960766464 - .long 1067213778 - .long 1067365107 - .long 1025865926 - .long 684261376 - .long 1066944805 - .long 844762164 - .long 3173687482 - .long 630718464 - .long 1066676905 - .long 2458269694 - .long 1024033081 - .long 1486061568 - .long 1066410070 - .long 115537874 - .long 3173243995 - .long 2743664640 - .long 1065886792 - .long 3665098304 - .long 3173471607 - .long 1971912704 - .long 1065357333 - .long 2577214440 - .long 3171993451 - .long 1498939392 - .long 1064306693 - .long 3409036923 - .long 1025599151 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type L_tbl,@object - .size L_tbl,2064 - .align 16 -log2: - .long 4277811200 - .long 1067855426 - .long 2479318832 - .long 1022292823 - .type log2,@object - .size log2,16 - .align 16 -coeff: - .long 2454267026 - .long 1069697316 - .long 0 - .long 3218079744 - .long 1030730101 - .long 3217380702 - .long 1431655765 - .long 1070945621 - .long 2576980378 - .long 1070176665 - .long 0 - .long 3219128320 - .type coeff,@object - .size coeff,48 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log_table.S deleted file mode 100644 index eebf30a349..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/log_table.S +++ /dev/null @@ -1,559 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "log_table.c" - .section .rodata, "a" - .align 32 - .align 32 - .globl __libm_log_table_256 -__libm_log_table_256: - .long 0x2779c19c,0x3e057562 - .long 0x00000000,0x3f600401 - .long 0x540e0a5d,0x3df4586b - .long 0x00000000,0x3f781212 - .long 0x5df1d574,0x3e3f2d06 - .long 0x00000000,0x3f841929 - .long 0xe0cc0310,0x3e3098eb - .long 0x00000000,0x3f8c3173 - .long 0x861d36aa,0x3e1ac733 - .long 0x00000000,0x3f91a6b9 - .long 0x0e5dc270,0x3e3766b0 - .long 0x00000000,0x3f95ba9a - .long 0xcf80538b,0x3dfd0c97 - .long 0x00000000,0x3f99d2a8 - .long 0x01095e5d,0x3e22cbcc - .long 0x00000000,0x3f9d6b27 - .long 0x5531753a,0x3e5433bf - .long 0x00000000,0x3fa0c58f - .long 0x86a4cae2,0x3e4e32f3 - .long 0x00000000,0x3fa2954c - .long 0x2b382296,0x3e36d4b6 - .long 0x00000000,0x3fa4a94d - .long 0x6b08209f,0x3e5e5a97 - .long 0x00000000,0x3fa67c94 - .long 0x0d02a20b,0x3e56c61e - .long 0x00000000,0x3fa85188 - .long 0xe988d46e,0x3e57ce75 - .long 0x00000000,0x3faa6b8a - .long 0x78fa4c28,0x3e0bdcaa - .long 0x00000000,0x3fac441e - .long 0x069e5bd9,0x3e23606d - .long 0x00000000,0x3fae1e67 - .long 0x008c9838,0x3e21ab93 - .long 0x00000000,0x3faffa69 - .long 0xc0123f2a,0x3e638bb4 - .long 0x00000000,0x3fb0ec13 - .long 0x42c9365e,0x3e590f46 - .long 0x00000000,0x3fb1dbd2 - .long 0xe38bd0cb,0x3e609fcb - .long 0x00000000,0x3fb2cc72 - .long 0xcc85ea5e,0x3e64fa3d - .long 0x00000000,0x3fb3bdf5 - .long 0xb814e378,0x3e5ea804 - .long 0x00000000,0x3fb4b05d - .long 0xc07f6cbe,0x3e5f3ad5 - .long 0x00000000,0x3fb580db - .long 0x4f332994,0x3e6126cb - .long 0x00000000,0x3fb674f0 - .long 0x46bb18e7,0x3e4635ab - .long 0x00000000,0x3fb769ef - .long 0x23f3f334,0x3e43a835 - .long 0x00000000,0x3fb85fd9 - .long 0x622b8758,0x3e575652 - .long 0x00000000,0x3fb9335e - .long 0xfa6531cd,0x3e406472 - .long 0x00000000,0x3fba2b02 - .long 0xd57cb81c,0x3e658350 - .long 0x00000000,0x3fbb0004 - .long 0x843191b0,0x3e5da7f2 - .long 0x00000000,0x3fbbf968 - .long 0x750465fd,0x3e67fdc2 - .long 0x00000000,0x3fbccfed - .long 0xa89401fa,0x3e58e111 - .long 0x00000000,0x3fbda727 - .long 0xde61a8fd,0x3e5ff843 - .long 0x00000000,0x3fbea325 - .long 0xbcbe8b53,0x3e6fdb7f - .long 0x00000000,0x3fbf7be9 - .long 0x7ce635d5,0x3e64bfc9 - .long 0x00000000,0x3fc02ab3 - .long 0x133742da,0x3e65e748 - .long 0x00000000,0x3fc097ce - .long 0x8f7bc671,0x3e7044fc - .long 0x00000000,0x3fc1178e - .long 0xcce888b8,0x3e6f6fb3 - .long 0x00000000,0x3fc18574 - .long 0xa08b164f,0x3e52f92e - .long 0x00000000,0x3fc1f3b9 - .long 0x56b4e87b,0x3e4e6ddf - .long 0x00000000,0x3fc2625d - .long 0x73ad9970,0x3e390d02 - .long 0x00000000,0x3fc2d161 - .long 0x85c23082,0x3e72e822 - .long 0x00000000,0x3fc340c5 - .long 0xaa42e1ae,0x3e69d5fc - .long 0x00000000,0x3fc3b08b - .long 0x06ed14f1,0x3e306f00 - .long 0x00000000,0x3fc40dfb - .long 0xef836a49,0x3e7d194b - .long 0x00000000,0x3fc47e74 - .long 0xbc83d21d,0x3e7ec8cd - .long 0x00000000,0x3fc4ef51 - .long 0xa2c28034,0x3e7c0574 - .long 0x00000000,0x3fc56092 - .long 0x3530a5ba,0x3e65f35d - .long 0x00000000,0x3fc5d238 - .long 0xbb20ab0e,0x3e5b99ae - .long 0x00000000,0x3fc6313a - .long 0x706cb199,0x3e7b577a - .long 0x00000000,0x3fc6a399 - .long 0x8350bc53,0x3e7ba79c - .long 0x00000000,0x3fc70337 - .long 0x274badf2,0x3e428f61 - .long 0x00000000,0x3fc77654 - .long 0x16849fa4,0x3e550581 - .long 0x00000000,0x3fc7e9d8 - .long 0x4baffaa4,0x3e6d67d4 - .long 0x00000000,0x3fc84a6b - .long 0x61fae141,0x3e7abeb4 - .long 0x00000000,0x3fc8ab47 - .long 0x0369cf31,0x3e7212cb - .long 0x00000000,0x3fc91fe4 - .long 0x9d5bb3d2,0x3e60046a - .long 0x00000000,0x3fc98163 - .long 0x904d6866,0x3e2c2259 - .long 0x00000000,0x3fc9f6c4 - .long 0xa19f5411,0x3e549a47 - .long 0x00000000,0x3fca58e7 - .long 0x759a5351,0x3e7862d2 - .long 0x00000000,0x3fcabb55 - .long 0xf400c4b3,0x3e62467b - .long 0x00000000,0x3fcb1e10 - .long 0xf9503717,0x3e727c6c - .long 0x00000000,0x3fcb94ee - .long 0xabdf1b3f,0x3e780cea - .long 0x00000000,0x3fcbf851 - .long 0xe97aab9f,0x3e652fc8 - .long 0x00000000,0x3fcc5c02 - .long 0x8a4a9e8b,0x3e793b67 - .long 0x00000000,0x3fccc000 - .long 0xce7d8064,0x3e73390a - .long 0x00000000,0x3fcd244d - .long 0x2835ff73,0x3e5fd97a - .long 0x00000000,0x3fcd88e9 - .long 0x804954d6,0x3e5bf577 - .long 0x00000000,0x3fcdedd4 - .long 0x024244ec,0x3e7ffce2 - .long 0x00000000,0x3fce530e - .long 0x7137ba40,0x3e4648b9 - .long 0x00000000,0x3fceb89a - .long 0x7bcea6d1,0x3e7f5bf3 - .long 0x00000000,0x3fcf1e75 - .long 0x1abc74cf,0x3e5756be - .long 0x00000000,0x3fcf84a3 - .long 0xe6831bc0,0x3e59f503 - .long 0x00000000,0x3fcfeb22 - .long 0x83851858,0x3e88e06b - .long 0x00000000,0x3fd028f9 - .long 0x6b43c71e,0x3e8c1b2c - .long 0x00000000,0x3fd05c8b - .long 0xf2ea89fa,0x3e81f15c - .long 0x00000000,0x3fd085eb - .long 0x2224e892,0x3e8c65a3 - .long 0x00000000,0x3fd0b9c8 - .long 0x20336a5b,0x3e782de0 - .long 0x00000000,0x3fd0edd0 - .long 0x8fdd9770,0x3e733c01 - .long 0x00000000,0x3fd12202 - .long 0x9a817c85,0x3e824f5d - .long 0x00000000,0x3fd14be2 - .long 0x5be801bd,0x3e81de31 - .long 0x00000000,0x3fd18061 - .long 0xc766b993,0x3e87c5f8 - .long 0x00000000,0x3fd1b50b - .long 0x85a1f823,0x3e88f9e4 - .long 0x00000000,0x3fd1df4c - .long 0x350fbd75,0x3e7b43ae - .long 0x00000000,0x3fd21445 - .long 0x4920ddbb,0x3e8323d7 - .long 0x00000000,0x3fd23ec5 - .long 0x5f6600ba,0x3e83f0e1 - .long 0x00000000,0x3fd2740d - .long 0x4073b3be,0x3e8579bf - .long 0x00000000,0x3fd29ecd - .long 0x72f2232b,0x3e256e67 - .long 0x00000000,0x3fd2d466 - .long 0x3a896d5f,0x3e8609d5 - .long 0x00000000,0x3fd2ff66 - .long 0x8ddf913a,0x3e72cd56 - .long 0x00000000,0x3fd33550 - .long 0xd7253e69,0x3e77b113 - .long 0x00000000,0x3fd36092 - .long 0xce9e941f,0x3e88666f - .long 0x00000000,0x3fd38bf1 - .long 0x60ed52d8,0x3e7dcccc - .long 0x00000000,0x3fd3c252 - .long 0x0f983d68,0x3e78f05a - .long 0x00000000,0x3fd3edf4 - .long 0x6390dbb2,0x3e61eaf4 - .long 0x00000000,0x3fd419b4 - .long 0xe916a76d,0x3e8c0a73 - .long 0x00000000,0x3fd44591 - .long 0x2b59a2e0,0x3e7d6dbc - .long 0x00000000,0x3fd47c91 - .long 0xc24fc7a2,0x3e70554a - .long 0x00000000,0x3fd4a8b3 - .long 0x33faf275,0x3e821120 - .long 0x00000000,0x3fd4d4f3 - .long 0x2cfac6d3,0x3e81b43f - .long 0x00000000,0x3fd50152 - .long 0x3d98a28d,0x3e78d1f5 - .long 0x00000000,0x3fd52dd0 - .long 0x44e3b5b4,0x3e6e3dc5 - .long 0x00000000,0x3fd55a6d - .long 0x2c814b0b,0x3e658895 - .long 0x00000000,0x3fd5925d - .long 0x6c7ee0a5,0x3e7ad50f - .long 0x00000000,0x3fd5bf40 - .long 0xd6e34245,0x3e6eae1a - .long 0x00000000,0x3fd5ec43 - .long 0x83dd4a7f,0x3e89b605 - .long 0x00000000,0x3fd61965 - .long 0xa87b925b,0x3e724d6c - .long 0x00000000,0x3fd646a8 - .long 0xd28ed1d3,0x3e8ba63b - .long 0x00000000,0x3fd6740a - .long 0x18a4a613,0x3e86e94b - .long 0x00000000,0x3fd6a18d - .long 0xb0b244a7,0x3e3619c3 - .long 0x00000000,0x3fd6cf31 - .long 0x173b6f5e,0x3e8d0a5e - .long 0x00000000,0x3fd6f180 - .long 0x3be91c4c,0x3e7c6e25 - .long 0x00000000,0x3fd71f5d - .long 0xab8359ed,0x3e8dfacd - .long 0x00000000,0x3fd74d5a - .long 0x6fb93ec4,0x3e82457a - .long 0x00000000,0x3fd77b79 - .long 0x3c4bbc8b,0x3e8113e3 - .long 0x00000000,0x3fd7a9b9 - .long 0x31fa7741,0x3e2bf5b5 - .long 0x00000000,0x3fd7d81b - .long 0x186f4789,0x3e69c139 - .long 0x00000000,0x3fd8069e - .long 0x7956aae8,0x3e8a7df1 - .long 0x00000000,0x3fd82996 - .long 0xfeab799a,0x3e7ddb72 - .long 0x00000000,0x3fd85855 - .long 0x33b8ef04,0x3e760c9f - .long 0x00000000,0x3fd88736 - .long 0x19dccb10,0x3e82e757 - .long 0x00000000,0x3fd8aa75 - .long 0x9c910289,0x3e8b9104 - .long 0x00000000,0x3fd8d992 - .long 0xa230be1d,0x3e8d4fb2 - .long 0x00000000,0x3fd908d2 - .long 0xcac1703a,0x3e8cf381 - .long 0x00000000,0x3fd92c59 - .long 0xb4a553e7,0x3e743b8f - .long 0x00000000,0x3fd95bd7 - .long 0x5b5274b7,0x3e51a3ee - .long 0x00000000,0x3fd98b78 - .long 0x0d70a52d,0x3e8e67a8 - .long 0x00000000,0x3fd9af47 - .long 0x4f0d2c7f,0x3e483229 - .long 0x00000000,0x3fd9df27 - .long 0xb48f7d3d,0x3e8da29f - .long 0x00000000,0x3fda0325 - .long 0xc6457f9d,0x3e2127d3 - .long 0x00000000,0x3fda3344 - .long 0xe0b95e88,0x3e77a030 - .long 0x00000000,0x3fda5772 - .long 0x991f7846,0x3e565dd1 - .long 0x00000000,0x3fda87d0 - .long 0x256f237b,0x3e7b00fe - .long 0x00000000,0x3fdaac2e - .long 0xa0437713,0x3e7bf7da - .long 0x00000000,0x3fdadccc - .long 0xc8192dd8,0x3e6f58f3 - .long 0x00000000,0x3fdb015b - .long 0xa41f8565,0x3e6d31ac - .long 0x00000000,0x3fdb323a - .long 0x25494b61,0x3e3118a4 - .long 0x00000000,0x3fdb56fa - .long 0x92694e9d,0x3e84cb37 - .long 0x00000000,0x3fdb881a - .long 0x2c99792a,0x3e8de7b6 - .long 0x00000000,0x3fdbad0b - .long 0x85ec7449,0x3e82ef03 - .long 0x00000000,0x3fdbd212 - .long 0x0c4250d7,0x3e6b7844 - .long 0x00000000,0x3fdc0392 - .long 0xfce511d5,0x3e5e4d32 - .long 0x00000000,0x3fdc28cb - .long 0x78348ca5,0x3e8708e4 - .long 0x00000000,0x3fdc4e19 - .long 0x992488fb,0x3e88e8aa - .long 0x00000000,0x3fdc7ff9 - .long 0xc144344b,0x3e793a76 - .long 0x00000000,0x3fdca57b - .long 0x5f7d6efe,0x3e44b9d7 - .long 0x00000000,0x3fdccb13 - .long 0x4de9f3e0,0x3e8a31e6 - .long 0x00000000,0x3fdcf0c0 - .long 0x80488966,0x3e7d6d68 - .long 0x00000000,0x3fdd2320 - .long 0x9add7f4d,0x3e71b7be - .long 0x00000000,0x3fdd4902 - .long 0xb9ac5131,0x3e8231a4 - .long 0x00000000,0x3fdd6efa - .long 0x4bdc3bac,0x3e7c1eb9 - .long 0x00000000,0x3fdd9509 - .long 0xaa85604a,0x3e8fd258 - .long 0x00000000,0x3fddbb2e - .long 0x57753a10,0x3e6a22f2 - .long 0x00000000,0x3fddee2f - .long 0xcd94df8d,0x3e5a2726 - .long 0x00000000,0x3fde148a - .long 0x7ff6aa8c,0x3e4493fe - .long 0x00000000,0x3fde3afc - .long 0xb6cae4c0,0x3e6036a8 - .long 0x00000000,0x3fde6185 - .long 0x546c92af,0x3e7e208f - .long 0x00000000,0x3fde8825 - .long 0x8619d6bd,0x3e67564c - .long 0x00000000,0x3fdeaedd - .long 0xf8b97910,0x3e77d0da - .long 0x00000000,0x3fded5ac - .long 0x5c542068,0x3e6368b5 - .long 0x00000000,0x3fdefc93 - .long 0xbff8880b,0x3e8442ae - .long 0x00000000,0x3fdf2391 - .long 0x259bcade,0x3e8dc063 - .long 0x00000000,0x3fdf4aa7 - .long 0xd802b8c4,0x3e63e185 - .long 0x00000000,0x3fdf71d6 - .long 0xde5f6650,0x3e7b2cec - .long 0x00000000,0x3fdf991c - .long 0x21ff49a1,0x3e8b4d35 - .long 0x00000000,0x3fdfc07a - .long 0xa7c2b8c5,0x3e81d607 - .long 0x00000000,0x3fdfe7f1 - .long 0x0b9d6ee5,0x3e84f140 - .long 0x00000000,0x3fe007c0 - .long 0xd0756a93,0x3e70cc52 - .long 0x00000000,0x3fe01b94 - .long 0x3aad0772,0x3e800319 - .long 0x00000000,0x3fe02f74 - .long 0x759dd00c,0x3e97cec0 - .long 0x00000000,0x3fe04360 - .long 0xc67418f8,0x3e9588ff - .long 0x00000000,0x3fe05759 - .long 0x51e8da67,0x3e6911cf - .long 0x00000000,0x3fe06b5f - .long 0xa048907b,0x3e44cf15 - .long 0x00000000,0x3fe078bf - .long 0xc39803ff,0x3e8a1f9e - .long 0x00000000,0x3fe08cd9 - .long 0x06525ba1,0x3e8d33e4 - .long 0x00000000,0x3fe0a100 - .long 0x3b46098d,0x3e7d11a2 - .long 0x00000000,0x3fe0b534 - .long 0x39b814fa,0x3e991286 - .long 0x00000000,0x3fe0c974 - .long 0x432f7532,0x3e782dcc - .long 0x00000000,0x3fe0ddc2 - .long 0x4618affd,0x3e82ebf2 - .long 0x00000000,0x3fe0eb52 - .long 0x1d77bbef,0x3e8084e9 - .long 0x00000000,0x3fe0ffb5 - .long 0xcfaf1c2c,0x3e7ed4be - .long 0x00000000,0x3fe11425 - .long 0xbfce7a70,0x3e83c766 - .long 0x00000000,0x3fe128a2 - .long 0x1930b4c4,0x3e84afc2 - .long 0x00000000,0x3fe13652 - .long 0x4b441313,0x3e862d2a - .long 0x00000000,0x3fe14ae5 - .long 0xcb6b7c9c,0x3e94338e - .long 0x00000000,0x3fe15f85 - .long 0xfd3aea12,0x3e7c608c - .long 0x00000000,0x3fe16d4d - .long 0x266a0b45,0x3e9841ba - .long 0x00000000,0x3fe18203 - .long 0xe75899eb,0x3e978963 - .long 0x00000000,0x3fe196c7 - .long 0x9e2b1260,0x3e7c5bd1 - .long 0x00000000,0x3fe1a4a7 - .long 0xa79bc2a5,0x3e98192c - .long 0x00000000,0x3fe1b981 - .long 0x0d5eb986,0x3e9d1762 - .long 0x00000000,0x3fe1ce69 - .long 0x28836a17,0x3e93bc0d - .long 0x00000000,0x3fe1dc61 - .long 0xb47416ca,0x3e9455a1 - .long 0x00000000,0x3fe1f160 - .long 0xdf997414,0x3e8dd01c - .long 0x00000000,0x3fe2066d - .long 0x72755e61,0x3e9748f4 - .long 0x00000000,0x3fe2147d - .long 0x586cc870,0x3e978bd7 - .long 0x00000000,0x3fe229a1 - .long 0x05ced5b8,0x3e90834a - .long 0x00000000,0x3fe237c1 - .long 0xb34d2934,0x3e9cdf01 - .long 0x00000000,0x3fe24cfc - .long 0xd891ba01,0x3e857355 - .long 0x00000000,0x3fe25b2c - .long 0x103a61e4,0x3e8357df - .long 0x00000000,0x3fe2707f - .long 0x7071361a,0x3e908594 - .long 0x00000000,0x3fe285e0 - .long 0xdcc2f0a7,0x3e81c22d - .long 0x00000000,0x3fe29429 - .long 0xc30f37c8,0x3e89c2bf - .long 0x00000000,0x3fe2a9a2 - .long 0x604c3ff4,0x3e76468e - .long 0x00000000,0x3fe2b7fb - .long 0x7d42bf88,0x3e88e57d - .long 0x00000000,0x3fe2c65a - .long 0xd0b235f1,0x3e85ec37 - .long 0x00000000,0x3fe2dbf5 - .long 0xca965170,0x3e987f2e - .long 0x00000000,0x3fe2ea64 - .long 0xb996d64e,0x3e71b426 - .long 0x00000000,0x3fe30018 - .long 0xb998ef97,0x3e9d3516 - .long 0x00000000,0x3fe30e97 - .long 0x9d3de3b9,0x3e9d7ba6 - .long 0x00000000,0x3fe32463 - .long 0xcad27856,0x3e78a56b - .long 0x00000000,0x3fe332f4 - .long 0x9f9e227c,0x3e5ce8c9 - .long 0x00000000,0x3fe348d9 - .long 0xadb2d775,0x3e9f1887 - .long 0x00000000,0x3fe35779 - .long 0x53263e64,0x3e92c34d - .long 0x00000000,0x3fe36621 - .long 0xcd4571cb,0x3e93e786 - .long 0x00000000,0x3fe37c29 - .long 0xe748544b,0x3e671976 - .long 0x00000000,0x3fe38ae2 - .long 0xf9cce311,0x3e85e980 - .long 0x00000000,0x3fe399a1 - .long 0x3a222092,0x3e9fcef7 - .long 0x00000000,0x3fe3afcc - .long 0xed5008bd,0x3e840d4c - .long 0x00000000,0x3fe3be9d - .long 0x1452e9ec,0x3e901695 - .long 0x00000000,0x3fe3cd74 - .long 0xb62b2ce8,0x3e7c8c7b - .long 0x00000000,0x3fe3e3c4 - .long 0xd8d571ad,0x3e964fda - .long 0x00000000,0x3fe3f2ac - .long 0x498c3678,0x3e7092e5 - .long 0x00000000,0x3fe4019c - .long 0xc8960bd4,0x3e884e25 - .long 0x00000000,0x3fe41810 - .long 0x5157ce35,0x3e84637d - .long 0x00000000,0x3fe42711 - .long 0xafcc2a6b,0x3e8384ad - .long 0x00000000,0x3fe43619 - .long 0x9a4ffe6d,0x3e875a3a - .long 0x00000000,0x3fe44528 - .long 0x4e8516c0,0x3e819322 - .long 0x00000000,0x3fe45bcc - .long 0xfe3457c8,0x3e70f88b - .long 0x00000000,0x3fe46aed - .long 0x69a4a836,0x3e73f451 - .long 0x00000000,0x3fe47a15 - .long 0x32f98351,0x3e87bfff - .long 0x00000000,0x3fe48944 - .long 0x06a8d925,0x3e9796d3 - .long 0x00000000,0x3fe4a018 - .long 0xaef076e2,0x3e593acb - .long 0x00000000,0x3fe4af5a - .long 0xd0e13620,0x3e94b7b7 - .long 0x00000000,0x3fe4bea2 - .long 0x88cfb12e,0x3e91e215 - .long 0x00000000,0x3fe4cdf2 - .long 0x0b0cb912,0x3e99f328 - .long 0x00000000,0x3fe4dd49 - .long 0xa0e67b10,0x3e8b9929 - .long 0x00000000,0x3fe4eca8 - .long 0xb401f873,0x3e7e6c75 - .long 0x00000000,0x3fe503c4 - .long 0x15ce5326,0x3e8999ff - .long 0x00000000,0x3fe51335 - .long 0x5f3840b2,0x3e4ce28f - .long 0x00000000,0x3fe522ae - .long 0x2b9988ba,0x3e73433c - .long 0x00000000,0x3fe5322e - .long 0x0122cc5c,0x3e9972f3 - .long 0x00000000,0x3fe541b5 - .long 0xac4eb353,0x3e9fb797 - .long 0x00000000,0x3fe55144 - .long 0x78d26225,0x3e988a2a - .long 0x00000000,0x3fe560db - .long 0x333017fe,0x3e735dc6 - .long 0x00000000,0x3fe5707a - .long 0xff9e8c9a,0x3e5dab71 - .long 0x00000000,0x3fe587f6 - .long 0xe623c257,0x3e92ef91 - .long 0x00000000,0x3fe597a7 - .long 0x715f0d98,0x3e9ac697 - .long 0x00000000,0x3fe5a760 - .long 0x21dc5b09,0x3e9a52be - .long 0x00000000,0x3fe5b721 - .long 0xdf20565e,0x3e928863 - .long 0x00000000,0x3fe5c6ea - .long 0x7afa1d46,0x3e717543 - .long 0x00000000,0x3fe5d6bb - .long 0x71f3b726,0x3e90c8ba - .long 0x00000000,0x3fe5e693 - .long 0xda3470be,0x3e98c345 - .long 0x00000000,0x3fe5f673 - .long 0x24c45894,0x3e9d470b - .long 0x00000000,0x3fe6065b - .long 0x0d6b6214,0x3e9f4f98 - .long 0x00000000,0x3fe6164b - .long 0xe85e3147,0x3e9fd9f2 - .long 0x00000000,0x3fe62643 - .type __libm_log_table_256,@object - .size __libm_log_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logb_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logb_gen.S deleted file mode 100644 index d1f8050802..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logb_gen.S +++ /dev/null @@ -1,132 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logb_gen.c" - .text -..TXTST0: -# -- Begin logb - .text - .align 16,0x90 - .globl logb -logb: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_logb.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - movl %eax, %edx - andl $2147483647, %edx - lea -1048576(%rdx), %ecx - cmpl $2145386496, %ecx - jb ..B1.7 -..B1.2: - testl %ecx, %ecx - jge ..B1.6 -..B1.3: - movl -8(%rsp), %eax - orl %eax, %edx - je ..B1.8 -..B1.4: - lea _TWO_55(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) - pxor %xmm0, %xmm0 - movl -4(%rsp), %edx - andl $2147483647, %edx - shrl $20, %edx - addl $-1078, %edx - cvtsi2sd %edx, %xmm0 -..B1.5: - ret -..B1.6: - lea _ones(%rip), %rdx - shrl $31, %eax - movsd (%rdx,%rax,8), %xmm1 - mulsd %xmm1, %xmm0 - ret -..B1.7: - shrl $20, %ecx - pxor %xmm0, %xmm0 - addl $-1022, %ecx - cvtsi2sd %ecx, %xmm0 - ret -..B1.8: - lea 8+_ones(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - divsd (%rdx), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type logb,@function - .size logb,.-logb - .data -# -- End logb - .section .rodata, "a" - .align 4 - .align 4 -_TWO_55: - .long 0 - .long 1130364928 - .type _TWO_55,@object - .size _TWO_55,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logbf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logbf.S deleted file mode 100644 index 330dd4f8aa..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logbf.S +++ /dev/null @@ -1,123 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logbf.c" - .text -..TXTST0: -# -- Begin logbf - .text - .align 16,0x90 - .globl logbf -logbf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_logbf.1: -..L2: - - movd %xmm0, %eax - movss %xmm0, -8(%rsp) - movl %eax, %edx - andl $2147483647, %edx - addl $-8388608, %edx - cmpl $2130706432, %edx - jb ..B1.7 -..B1.2: - testl %edx, %edx - jge ..B1.6 -..B1.3: - cmpl $-8388608, %edx - je ..B1.8 -..B1.4: - movss -8(%rsp), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - movd %xmm0, %eax - movss %xmm0, -8(%rsp) - pxor %xmm0, %xmm0 - andl $2147483647, %eax - shrl $23, %eax - addl $-152, %eax - cvtsi2ss %eax, %xmm0 -..B1.5: - ret -..B1.6: - lea _ones(%rip), %rdx - shrl $31, %eax - movss (%rdx,%rax,4), %xmm1 - mulss %xmm1, %xmm0 - ret -..B1.7: - shrl $23, %edx - pxor %xmm0, %xmm0 - addl $-126, %edx - cvtsi2ss %edx, %xmm0 - ret -..B1.8: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type logbf,@function - .size logbf,.-logbf - .data -# -- End logbf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4c000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logbl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logbl.S deleted file mode 100644 index 629052bf4f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logbl.S +++ /dev/null @@ -1,165 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logbl.c" - .text -..TXTST0: -# -- Begin logbl - .text - .align 16,0x90 - .globl logbl -logbl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_logbl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %al, %al -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 26(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.7 -..B1.4: - orl $-64768, %ecx - movw %cx, 24(%rsp) -..B1.5: - fldcw 24(%rsp) -..B1.6: - movb $1, %al -..B1.7: - movzwl 56(%rsp), %edx - andl $32767, %edx - cmpl $32767, %edx - je ..B1.16 -..B1.8: - testl %edx, %edx - jne ..B1.11 -..B1.9: - cmpq $0, 48(%rsp) - je ..B1.15 -..B1.10: - fldt 48(%rsp) - lea _TWO_75(%rip), %rdx - fmull (%rdx) - fstpt 48(%rsp) - movzwl 56(%rsp), %ecx - andl $32767, %ecx - addl $-16458, %ecx - movl %ecx, (%rsp) - fildl (%rsp) - fstpt 8(%rsp) - jmp ..B1.12 -..B1.11: - addl $-16383, %edx - movl %edx, (%rsp) - fildl (%rsp) - fstpt 8(%rsp) -..B1.12: - testb %al, %al - je ..B1.14 -..B1.13: - fldcw 26(%rsp) -..B1.14: - fldt 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.15: - lea 8+_ones(%rip), %rdx - lea _zeros(%rip), %rcx - movsd (%rdx), %xmm0 - divsd (%rcx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 8(%rsp) - jmp ..B1.12 -..B1.16: - fldt 48(%rsp) - lea _ones(%rip), %rcx - movb 57(%rsp), %dl - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %esi - fmull (%rcx,%rsi,8) - fstpt 8(%rsp) - jmp ..B1.12 - .align 16,0x90 - .cfi_endproc - .type logbl,@function - .size logbl,.-logbl - .data -# -- End logbl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logf_gen.S deleted file mode 100644 index 9b3bd3f0f8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logf_gen.S +++ /dev/null @@ -1,234 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logf_gen.c" - .text -..TXTST0: -# -- Begin logf - .text - .align 16,0x90 - .globl logf -logf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_logf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - cmpl $2139095040, %edx - jae ..B1.11 -..B1.2: - lea -1065091072(%rdx), %eax - cmpl $524288, %eax - jae ..B1.7 -..B1.3: - cmpl $1065353216, %edx - jne ..B1.5 -..B1.4: - pxor %xmm3, %xmm3 - jmp ..B1.6 -..B1.5: - movss -8(%rsp), %xmm0 - lea 32+_Q(%rip), %rax - lea 24+_Q(%rip), %rcx - addss .L_2il0floatpacket.0(%rip), %xmm0 - cvtss2sd %xmm0, %xmm0 - movaps %xmm0, %xmm2 - lea 16+_Q(%rip), %rdx - movsd (%rax), %xmm3 - lea 8+_Q(%rip), %rsi - movsd (%rcx), %xmm1 - lea _Q(%rip), %rdi - mulsd %xmm0, %xmm2 - mulsd %xmm2, %xmm3 - mulsd %xmm2, %xmm1 - addsd (%rdx), %xmm3 - addsd (%rsi), %xmm1 - mulsd %xmm2, %xmm3 - mulsd %xmm0, %xmm1 - addsd %xmm1, %xmm3 - addsd (%rdi), %xmm3 - mulsd %xmm2, %xmm3 - addsd %xmm0, %xmm3 - cvtsd2ss %xmm3, %xmm3 -..B1.6: - movaps %xmm3, %xmm0 - ret -..B1.7: - movl %edx, %esi - movl %edx, %eax - shrl $23, %esi - andl $8388607, %eax - addl $-127, %esi - cmpl $8388608, %edx - jae ..B1.10 -..B1.8: - movl %eax, -8(%rsp) - testl %edx, %edx - je ..B1.19 -..B1.9: - movss -8(%rsp), %xmm0 - mulss .L_2il0floatpacket.2(%rip), %xmm0 - movd %xmm0, %eax - movss %xmm0, -8(%rsp) - movl %eax, %esi - movl %eax, %edx - shrl $23, %esi - addl $-152, %esi -..B1.10: - shrl $15, %edx - orl $1065353216, %eax - movzbl %dl, %r8d - pxor %xmm1, %xmm1 - movl %eax, -8(%rsp) - pxor %xmm0, %xmm0 - movq __libm_rcp_table_256@GOTPCREL(%rip), %rax - lea 8+_P(%rip), %rdx - cvtss2sd -8(%rsp), %xmm1 - cvtss2sd (%rax,%r8,4), %xmm0 - mulsd %xmm0, %xmm1 - lea _P(%rip), %rcx - movsd (%rdx), %xmm0 - pxor %xmm2, %xmm2 - cvtsi2sd %esi, %xmm2 - addsd .L_2il0floatpacket.1(%rip), %xmm1 - mulsd %xmm1, %xmm0 - lea _LN2(%rip), %rsi - mulsd (%rsi), %xmm2 - addsd (%rcx), %xmm0 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movq __libm_logf_table_256@GOTPCREL(%rip), %rdi - addsd %xmm1, %xmm0 - addsd (%rdi,%r8,8), %xmm2 - addsd %xmm2, %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.11: - movl %edx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.17 -..B1.12: - testl $-2147483648, %edx - je ..B1.17 -..B1.13: - testl %eax, %eax - jne ..B1.15 -..B1.14: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - ret -..B1.15: - movss .L_2il0floatpacket.3(%rip), %xmm1 - pxor %xmm0, %xmm0 - mulss %xmm1, %xmm0 -..B1.16: - ret -..B1.17: - movss -8(%rsp), %xmm0 - ret -..B1.19: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type logf,@function - .size logf,.-logf - .data -# -- End logf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x4c000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x7f800000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_Q: - .long 4294868184 - .long 3219128319 - .long 1443356411 - .long 1070945621 - .long 823147527 - .long 3218079745 - .long 748089218 - .long 1070176642 - .long 1053536005 - .long 3217353219 - .type _Q,@object - .size _Q,40 - .align 4 -_P: - .long 3879088107 - .long 3219128321 - .long 1754324240 - .long 1070945626 - .type _P,@object - .size _P,16 - .align 4 -_LN2: - .long 4277811695 - .long 1072049730 - .type _LN2,@object - .size _LN2,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logf_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logf_table.S deleted file mode 100644 index 9122ccb3c6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logf_table.S +++ /dev/null @@ -1,303 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logf_table.c" - .section .rodata, "a" - .align 32 - .align 32 - .globl __libm_logf_table_256 -__libm_logf_table_256: - .long 0x55d5889e,0x3f600401 - .long 0x14586b54,0x3f781212 - .long 0xf96832f0,0x3f841929 - .long 0x84c75f07,0x3f8c3173 - .long 0x1ac73386,0x3f91a6b9 - .long 0x5d9ac03a,0x3f95ba9a - .long 0x074325f4,0x3f99d2a8 - .long 0x25979802,0x3f9d6b27 - .long 0xa19dfaa9,0x3fa0c58f - .long 0x78cbce1b,0x3fa2954c - .long 0x2da96c57,0x3fa4a94d - .long 0xf2d4bb58,0x3fa67c94 - .long 0xb630f068,0x3fa85188 - .long 0xbe73af4c,0x3faa6b8a - .long 0x06f72a9e,0x3fac441e - .long 0x13606d07,0x3fae1e67 - .long 0x11ab9301,0x3faffa69 - .long 0x9c5da601,0x3fb0ec13 - .long 0x643d190b,0x3fb1dbd2 - .long 0x84fe5f1c,0x3fb2cc72 - .long 0xa7d1ee64,0x3fb3bdf5 - .long 0x7aa012e0,0x3fb4b05d - .long 0x7ceb5702,0x3fb580db - .long 0x89365a7a,0x3fb674f0 - .long 0x2c6b568d,0x3fb769ef - .long 0x27506a48,0x3fb85fd9 - .long 0x5d594989,0x3fb9335e - .long 0x20c8e5f5,0x3fba2b02 - .long 0xac1a86ac,0x3fbb0004 - .long 0x769fca11,0x3fbbf968 - .long 0xbfee13a8,0x3fbccfed - .long 0x638446a2,0x3fbda727 - .long 0x7fe10f7a,0x3fbea325 - .long 0xfedbfde6,0x3fbf7be9 - .long 0x52ff25f4,0x3fc02ab3 - .long 0x579d204d,0x3fc097ce - .long 0x8227e47c,0x3fc1178e - .long 0x7dbecf34,0x3fc18574 - .long 0x25f25d41,0x3fc1f3b9 - .long 0x1e6ddf57,0x3fc2625d - .long 0x0c86813a,0x3fc2d161 - .long 0x9741142e,0x3fc340c5 - .long 0x6757f2a9,0x3fc3b08b - .long 0x08378004,0x3fc40dfb - .long 0xe8ca5f7c,0x3fc47e74 - .long 0xf6466de4,0x3fc4ef51 - .long 0xe02ba516,0x3fc56092 - .long 0x57cd74d5,0x3fc5d238 - .long 0x37335d76,0x3fc6313a - .long 0xdabbd383,0x3fc6a399 - .long 0xdd3ce41a,0x3fc70337 - .long 0x128f6127,0x3fc77654 - .long 0x2a0b022d,0x3fc7e9d8 - .long 0x759f512f,0x3fc84a6b - .long 0xd5f5a310,0x3fc8ab47 - .long 0x9096581b,0x3fc91fe4 - .long 0x4011aa76,0x3fc98163 - .long 0x07089664,0x3fc9f6c4 - .long 0x29348f43,0x3fca58e7 - .long 0xc31693ad,0x3fcabb55 - .long 0x4919efd0,0x3fcb1e10 - .long 0x93e367cb,0x3fcb94ee - .long 0xc067555f,0x3fcbf851 - .long 0x54bf23a6,0x3fcc5c02 - .long 0xc9db3c52,0x3fccc000 - .long 0x99c85674,0x3fcd244d - .long 0x3fb2f450,0x3fcd88e9 - .long 0x37eaef01,0x3fcdedd4 - .long 0xffe71012,0x3fce530e - .long 0x1648b971,0x3fceb89a - .long 0xfadf9bde,0x3fcf1e75 - .long 0x2ead7c36,0x3fcf84a3 - .long 0x33ea07cd,0x3fcfeb22 - .long 0xc7035c1c,0x3fd028f9 - .long 0xe0d9635a,0x3fd05c8b - .long 0x8f8ae797,0x3fd085eb - .long 0xe32d1911,0x3fd0b9c8 - .long 0x60b78081,0x3fd0edd0 - .long 0x4cf0063f,0x3fd12202 - .long 0x927aecd4,0x3fd14be2 - .long 0x8ef18adf,0x3fd18061 - .long 0xbe2fc63b,0x3fd1b50b - .long 0xc7cf242d,0x3fd1df4c - .long 0x6d0eb8d4,0x3fd21445 - .long 0x991eba49,0x3fd23ec5 - .long 0x9f870afb,0x3fd2740d - .long 0xabcdfa04,0x3fd29ecd - .long 0x02adccee,0x3fd2d466 - .long 0xb04ea9d4,0x3fd2ff66 - .long 0x4b355a38,0x3fd33550 - .long 0x5ec44f5d,0x3fd36092 - .long 0xc3337e75,0x3fd38bf1 - .long 0x77333184,0x3fd3c252 - .long 0x63c1683e,0x3fd3edf4 - .long 0x23d5e8c7,0x3fd419b4 - .long 0xe0539f49,0x3fd44591 - .long 0x75b6f0ad,0x3fd47c91 - .long 0x41552b09,0x3fd4a8b3 - .long 0x908901a0,0x3fd4d4f3 - .long 0x8da1f968,0x3fd50152 - .long 0x6347d4f6,0x3fd52dd0 - .long 0x3c7b8a8a,0x3fd55a6d - .long 0x2b112a59,0x3fd5925d - .long 0x6b543db2,0x3fd5bf40 - .long 0x3d5c35ae,0x3fd5ec43 - .long 0xcdb02c1f,0x3fd61965 - .long 0x4935b2a2,0x3fd646a8 - .long 0xdd31de95,0x3fd6740a - .long 0xb74a58c5,0x3fd6a18d - .long 0x058670ec,0x3fd6cf31 - .long 0xe852f0ba,0x3fd6f180 - .long 0x71b894f0,0x3fd71f5d - .long 0xefd66d5c,0x3fd74d5a - .long 0x922bd37e,0x3fd77b79 - .long 0x889f19e2,0x3fd7a9b9 - .long 0x037eb6a6,0x3fd7d81b - .long 0x33827231,0x3fd8069e - .long 0xd3ef8bcb,0x3fd82996 - .long 0x776dcbfb,0x3fd85855 - .long 0x58327ccf,0x3fd88736 - .long 0x973ab8cf,0x3fd8aa75 - .long 0xdc8824e5,0x3fd8d992 - .long 0xea7d9512,0x3fd908d2 - .long 0xe79c0e56,0x3fd92c59 - .long 0x50ee3ed3,0x3fd95bd7 - .long 0x11a3ee5b,0x3fd98b78 - .long 0xf33d406c,0x3fd9af47 - .long 0x0c1914a8,0x3fd9df27 - .long 0xed14fda5,0x3fda0325 - .long 0x0224fa79,0x3fda3344 - .long 0x5e80c383,0x3fda5772 - .long 0x165dd199,0x3fda87d0 - .long 0x6c03f896,0x3fdaac2e - .long 0x6fdf6a81,0x3fdadccc - .long 0x3eb1e790,0x3fdb015b - .long 0x3a635948,0x3fdb323a - .long 0x04462909,0x3fdb56fa - .long 0xa659bc93,0x3fdb881a - .long 0xef3db165,0x3fdbad0b - .long 0x97781c2f,0x3fdbd212 - .long 0x36f08819,0x3fdc0392 - .long 0x1e4d32fd,0x3fdc28cb - .long 0xb84723c2,0x3fdc4e19 - .long 0xc74554c9,0x3fdc7ff9 - .long 0x64e9db05,0x3fdca57b - .long 0x0a5cebb0,0x3fdccb13 - .long 0xd18f326f,0x3fdcf0c0 - .long 0x75b5a201,0x3fdd2320 - .long 0x46defa6b,0x3fdd4902 - .long 0x918d25cd,0x3fdd6efa - .long 0x707ae52f,0x3fdd9509 - .long 0xfe92c554,0x3fddbb2e - .long 0x3445e4af,0x3fddee2f - .long 0x1a2726ce,0x3fde148a - .long 0x0a49ff40,0x3fde3afc - .long 0x206d516e,0x3fde6185 - .long 0x78823d52,0x3fde8825 - .long 0x2eac990c,0x3fdeaedd - .long 0x5f436be3,0x3fded5ac - .long 0x26d16ab9,0x3fdefc93 - .long 0xa2157600,0x3fdf2391 - .long 0xee03192d,0x3fdf4aa7 - .long 0x27c30bb0,0x3fdf71d6 - .long 0x6cb3b379,0x3fdf991c - .long 0xda69a910,0x3fdfc07a - .long 0x8eb03d3e,0x3fdfe7f1 - .long 0x53c5002e,0x3fe007c0 - .long 0x2198a5a1,0x3fe01b94 - .long 0x400c64eb,0x3fe02f74 - .long 0xbe7603ad,0x3fe04360 - .long 0xac47fe34,0x3fe05759 - .long 0x1911cf52,0x3fe06b5f - .long 0x0533c568,0x3fe078bf - .long 0x687e7b0e,0x3fe08cd9 - .long 0x74cf9019,0x3fe0a100 - .long 0x3a234477,0x3fe0b534 - .long 0xc89431ce,0x3fe0c974 - .long 0x305b9886,0x3fe0ddc2 - .long 0x4bafc918,0x3fe0eb52 - .long 0x4213a476,0x3fe0ffb5 - .long 0x3da97d9f,0x3fe11425 - .long 0x4f1d9aff,0x3fe128a2 - .long 0x52bf0865,0x3fe13652 - .long 0x58b4a92d,0x3fe14ae5 - .long 0xa19c765b,0x3fe15f85 - .long 0x38c119fa,0x3fe16d4d - .long 0xc20dd133,0x3fe18203 - .long 0xbc4b1f3b,0x3fe196c7 - .long 0x38b7a33c,0x3fe1a4a7 - .long 0xc0c9653d,0x3fe1b981 - .long 0xe8bb106b,0x3fe1ce69 - .long 0x9de06944,0x3fe1dc61 - .long 0xa2ad0da4,0x3fe1f160 - .long 0x7740737e,0x3fe2066d - .long 0xba47a394,0x3fe2147d - .long 0xbc5ebac3,0x3fe229a1 - .long 0x841a502e,0x3fe237c1 - .long 0xe6f80d9a,0x3fe24cfc - .long 0x55cd5762,0x3fe25b2c - .long 0x4d5f7c41,0x3fe2707f - .long 0x842ca384,0x3fe285e0 - .long 0x4708b773,0x3fe29429 - .long 0x670aff0c,0x3fe2a9a2 - .long 0x2c8d1cc1,0x3fe2b7fb - .long 0x6395f5f5,0x3fe2c65a - .long 0x57b0df43,0x3fe2dbf5 - .long 0xc3f97655,0x3fe2ea64 - .long 0x23684d73,0x3fe30018 - .long 0xe9a8b5cd,0x3fe30e97 - .long 0xebdd34ea,0x3fe32463 - .long 0x314ad796,0x3fe332f4 - .long 0x0e7464d0,0x3fe348d9 - .long 0xf8c43d6e,0x3fe35779 - .long 0x961a6a99,0x3fe36621 - .long 0x9f3c366a,0x3fe37c29 - .long 0x171976e7,0x3fe38ae2 - .long 0x57a603e7,0x3fe399a1 - .long 0xfe77b9d1,0x3fe3afcc - .long 0x503533b5,0x3fe3be9d - .long 0x80b4a8a3,0x3fe3cd74 - .long 0x3918f76c,0x3fe3e3c4 - .long 0xb27ed6c7,0x3fe3f2ac - .long 0x2125ca93,0x3fe4019c - .long 0x61389722,0x3fe41810 - .long 0x518df545,0x3fe42711 - .long 0x4e12b6bf,0x3fe43619 - .long 0x5d68ea69,0x3fe44528 - .long 0x464c893a,0x3fe45bcc - .long 0x21f117fc,0x3fe46aed - .long 0x27e8a2d3,0x3fe47a15 - .long 0x5efffccc,0x3fe48944 - .long 0xbcb69835,0x3fe4a018 - .long 0x0c9d65d7,0x3fe4af5a - .long 0xa5bdbe87,0x3fe4bea2 - .long 0x8f10ac47,0x3fe4cdf2 - .long 0xcf994058,0x3fe4dd49 - .long 0x6e64a684,0x3fe4eca8 - .long 0x3cd8eb68,0x3fe503c4 - .long 0x6667fc57,0x3fe51335 - .long 0x0738a3d8,0x3fe522ae - .long 0x26867857,0x3fe5322e - .long 0xcb979809,0x3fe541b5 - .long 0xfdbcbd62,0x3fe55144 - .long 0xc45153c7,0x3fe560db - .long 0x26bb8c66,0x3fe5707a - .long 0x0ed5b900,0x3fe587f6 - .long 0x977c8f31,0x3fe597a7 - .long 0xd634bb8b,0x3fe5a760 - .long 0xd295f10f,0x3fe5b721 - .long 0x94431ef9,0x3fe5c6ea - .long 0x22ea86f6,0x3fe5d6bb - .long 0x8645d390,0x3fe5e693 - .long 0xc61a2ed2,0x3fe5f673 - .long 0xea385926,0x3fe6065b - .long 0xfa7cc06b,0x3fe6164b - .long 0xfecf9743,0x3fe62643 - .type __libm_logf_table_256,@object - .size __libm_logf_table_256,2048 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logl.S deleted file mode 100644 index 5479c7e4e0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logl.S +++ /dev/null @@ -1,66 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logl.c" - .text -..TXTST0: -# -- Begin logl - .text - .align 16,0x90 - .globl logl -logl: -# parameter 1: 8 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_logl.1: -..L2: - - fldt 8(%rsp) - fstpt 8(%rsp) - jmp __libm_logl@PLT - .align 16,0x90 - .cfi_endproc - .type logl,@function - .size logl,.-logl - .data -# -- End logl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logl_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logl_table.S deleted file mode 100644 index 596f44159c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/logl_table.S +++ /dev/null @@ -1,559 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "logl_table.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __libm_logl_table_256 -__libm_logl_table_256: - .long 0x55d5a000,0x3f600401 - .long 0xf98e1114,0xbce76218 - .long 0x14588000,0x3f781212 - .long 0xf5a30364,0xbcf4abf1 - .long 0xf9684000,0x3f841929 - .long 0xa8bfb25e,0xbcfa20e2 - .long 0x84c74000,0x3f8c3173 - .long 0x18823013,0x3d0f0660 - .long 0x1ac72000,0x3f91a6b9 - .long 0x36a9c5bb,0x3d13861d - .long 0x5d9ac000,0x3f95ba9a - .long 0xe08d78ac,0x3cacbb84 - .long 0x07434000,0x3f99d2a8 - .long 0xeb1d2ef8,0xbd1a0c1f - .long 0x2597c000,0x3f9d6b27 - .long 0xa1a37071,0xbd23fef6 - .long 0xa19e0000,0x3fa0c58f - .long 0x58b17913,0xbd0559d1 - .long 0x78cbc000,0x3fa2954c - .long 0x570c1572,0x3d1c3526 - .long 0x2da98000,0x3fa4a94d - .long 0xbad48944,0xbd23a98f - .long 0xf2d4c000,0x3fa67c94 - .long 0xec19afa2,0xbd029efb - .long 0xb6310000,0x3fa85188 - .long 0xdf4d03fb,0xbd1f2fd5 - .long 0xbe73c000,0x3faa6b8a - .long 0x5c8ed1b8,0xbd20b3b9 - .long 0x06f74000,0x3fac441e - .long 0x6cf5e5d5,0xbd2561c1 - .long 0x13608000,0x3fae1e67 - .long 0xa4275f13,0xbd22f961 - .long 0x11ab8000,0x3faffa69 - .long 0x98381a8f,0x3d23008c - .long 0x9c5da000,0x3fb0ec13 - .long 0xe54ebd73,0x3d180247 - .long 0x643d2000,0x3fb1dbd2 - .long 0x9a20edb0,0xbd1bd36c - .long 0x84fe6000,0x3fb2cc72 - .long 0x34cd5d84,0xbcec742f - .long 0xa7d1e000,0x3fb3bdf5 - .long 0xa5db4ed7,0x3d2cc85e - .long 0x7aa00000,0x3fb4b05d - .long 0x8ddf26e3,0x3d32e053 - .long 0x7ceb8000,0x3fb580db - .long 0x26833e56,0xbd447f01 - .long 0x89364000,0x3fb674f0 - .long 0x4c9d3302,0x3d3a7999 - .long 0x2c6b8000,0x3fb769ef - .long 0xe71892b5,0xbd44b944 - .long 0x27508000,0x3fb85fd9 - .long 0x19970c1c,0xbd35b818 - .long 0x5d594000,0x3fb9335e - .long 0x3abd47da,0x3d23115c - .long 0x20c90000,0x3fba2b02 - .long 0x9c652090,0xbd3a0b35 - .long 0xac1a8000,0x3fbb0004 - .long 0x037f2b35,0x3d1aaf97 - .long 0x769fc000,0x3fbbf968 - .long 0x8d824283,0x3d24218c - .long 0xbfee0000,0x3fbccfed - .long 0x2fe71256,0x3d33a823 - .long 0x63844000,0x3fbda727 - .long 0x1fa71733,0x3d1a8940 - .long 0x7fe10000,0x3fbea325 - .long 0x47e4627a,0x3d2ef30d - .long 0xfedc0000,0x3fbf7be9 - .long 0x2b2b3bc6,0xbd00d05d - .long 0x52ff2000,0x3fc02ab3 - .long 0x5d569b2b,0x3d27ce63 - .long 0x579d2000,0x3fc097ce - .long 0xda652881,0x3ce33742 - .long 0x82280000,0x3fc1178e - .long 0xcc74be04,0xbd4b8421 - .long 0x7dbec000,0x3fc18574 - .long 0x45bd9b49,0x3d3e6744 - .long 0x25f26000,0x3fc1f3b9 - .long 0x9b083633,0xbd15f74e - .long 0x1e6de000,0x3fc2625d - .long 0xf09e3d82,0xbcf52962 - .long 0x0c868000,0x3fc2d161 - .long 0xcb81b4a1,0x3d039d6c - .long 0x97412000,0x3fc340c5 - .long 0xf7d9d386,0xbd37a3dc - .long 0x67580000,0x3fc3b08b - .long 0xf29320fb,0xbd3aade8 - .long 0x08378000,0x3fc40dfb - .long 0xc4f7b685,0x3c9bb453 - .long 0xe8ca6000,0x3fc47e74 - .long 0xb7020316,0xbcf07c95 - .long 0xf6466000,0x3fc4ef51 - .long 0x21c8cd53,0x3d3bc83d - .long 0xe02bc000,0x3fc56092 - .long 0xfe5d989a,0xbd4ae9eb - .long 0x57cd4000,0x3fc5d238 - .long 0x4b74dcf5,0x3d5a6a61 - .long 0x37334000,0x3fc6313a - .long 0x561bc2b2,0x3d4d7641 - .long 0xdabc0000,0x3fc6a399 - .long 0x399a856a,0xbd563e4d - .long 0xdd3d0000,0x3fc70337 - .long 0x1d685519,0xbd4be57a - .long 0x128f8000,0x3fc77654 - .long 0x520d9718,0xbd4ed8b4 - .long 0x2a0b4000,0x3fc7e9d8 - .long 0x605bf1b1,0xbd5ee97b - .long 0x759f8000,0x3fc84a6b - .long 0x0ab7e182,0xbd5768a0 - .long 0xd5f5c000,0x3fc8ab47 - .long 0xf5f4572e,0xbd4cf028 - .long 0x90964000,0x3fc91fe4 - .long 0x79850e19,0x3d481b4e - .long 0x4011c000,0x3fc98163 - .long 0x30b7dd0f,0xbd458a91 - .long 0x07088000,0x3fc9f6c4 - .long 0x5a19605e,0x3d466413 - .long 0x29348000,0x3fca58e7 - .long 0x504551b1,0x3d3e867d - .long 0xc3168000,0x3fcabb55 - .long 0x9a875994,0x3d43acd2 - .long 0x491a0000,0x3fcb1e10 - .long 0xed340663,0xbd402ffc - .long 0x93e38000,0x3fcb94ee - .long 0x47492dd7,0xbd48357e - .long 0xc0674000,0x3fcbf851 - .long 0xd9fbd5aa,0x3d455ef8 - .long 0x54bf4000,0x3fcc5c02 - .long 0x5184bd39,0xbd4c5a15 - .long 0xc9db4000,0x3fccc000 - .long 0x5d57aff9,0xbd1d6d58 - .long 0x99c84000,0x3fcd244d - .long 0x032241dc,0x3d4673ec - .long 0x3fb30000,0x3fcd88e9 - .long 0x0234bf51,0xbd375f28 - .long 0x37eb0000,0x3fcdedd4 - .long 0x565353b4,0xbd40ff6d - .long 0xffe70000,0x3fce530e - .long 0x276041f4,0x3d401212 - .long 0x1648c000,0x3fceb89a - .long 0x16fee901,0xbd2a3b21 - .long 0xfadfc000,0x3fcf1e75 - .long 0x64bb07ee,0xbd5210c5 - .long 0x2ead8000,0x3fcf84a3 - .long 0xb3098725,0xbd1e5438 - .long 0x33ea0000,0x3fcfeb22 - .long 0xde00938b,0x3d2f3418 - .long 0xc7036000,0x3fd028f9 - .long 0xe9f33100,0xbd2f1eb9 - .long 0xe0d96000,0x3fd05c8b - .long 0xc77ccb58,0x3d2ad0f1 - .long 0x8f8ae000,0x3fd085eb - .long 0x3f45fe7b,0x3d3e5d51 - .long 0xe32d2000,0x3fd0b9c8 - .long 0xedbee0d8,0xbd3bbb62 - .long 0x60b78000,0x3fd0edd0 - .long 0x2d8435f5,0x3d0019b5 - .long 0x4cf02000,0x3fd12202 - .long 0xa2415097,0xbd59c089 - .long 0x927ae000,0x3fd14be2 - .long 0xc85685e2,0x3d49a817 - .long 0x8ef18000,0x3fd18061 - .long 0x1bc9638d,0x3d45be80 - .long 0xbe2fc000,0x3fd1b50b - .long 0x3263201f,0x3d38ecd7 - .long 0xc7cf2000,0x3fd1df4c - .long 0x0455f7e4,0x3d30b43f - .long 0x6d0ea000,0x3fd21445 - .long 0xf5d235d7,0x3d58d43e - .long 0x991ec000,0x3fd23ec5 - .long 0x48a2e522,0xbd36dbe4 - .long 0x9f872000,0x3fd2740d - .long 0xfa32bfeb,0xbd5504cf - .long 0xabce0000,0x3fd29ecd - .long 0x8847bb7a,0xbd37f189 - .long 0x02ade000,0x3fd2d466 - .long 0xbb9aa833,0xbd5311a1 - .long 0xb04ea000,0x3fd2ff66 - .long 0xd5f0c8e9,0x3d43a896 - .long 0x4b356000,0x3fd33550 - .long 0xec6206db,0xbd372206 - .long 0x5ec44000,0x3fd36092 - .long 0xf344bbd1,0x3d4eb929 - .long 0xc3336000,0x3fd38bf1 - .long 0xa0f4a8b7,0x3d5e74f4 - .long 0x77332000,0x3fd3c252 - .long 0x4b606bd6,0x3d5183b5 - .long 0x63c16000,0x3fd3edf4 - .long 0xeb4069e1,0x3d407cc1 - .long 0x23d5e000,0x3fd419b4 - .long 0x6ec90e0a,0x3d418e43 - .long 0xe053a000,0x3fd44591 - .long 0x92923d88,0xbd06e958 - .long 0x75b6e000,0x3fd47c91 - .long 0x8b804f1b,0x3d50ad66 - .long 0x41554000,0x3fd4a8b3 - .long 0xe1791b98,0xbd54f6c0 - .long 0x90890000,0x3fd4d4f3 - .long 0x3a9f1441,0x3d19fd79 - .long 0x8da1e000,0x3fd50152 - .long 0x3694fa6b,0x3d5967d6 - .long 0x6347e000,0x3fd52dd0 - .long 0xeb98a049,0xbd46133a - .long 0x3c7b8000,0x3fd55a6d - .long 0xd6cf85a4,0x3d45138e - .long 0x2b110000,0x3fd5925d - .long 0x4b0b521a,0x3d652c81 - .long 0x6b544000,0x3fd5bf40 - .long 0xeb68981c,0xbd227023 - .long 0x3d5c4000,0x3fd5ec43 - .long 0xf6eb1741,0xbd44a472 - .long 0xcdb04000,0x3fd61965 - .long 0xac078912,0xbd53e115 - .long 0x4935c000,0x3fd646a8 - .long 0x6d25a6ca,0xbd4abc23 - .long 0xdd320000,0x3fd6740a - .long 0xb8b270ac,0xbd60b5c4 - .long 0xb74a8000,0x3fd6a18d - .long 0x67b50a45,0xbd639d6d - .long 0x05868000,0x3fd6cf31 - .long 0xddac7ab9,0xbd4e27a6 - .long 0xe8530000,0x3fd6f180 - .long 0x0a20af33,0xbd4e8c49 - .long 0x71b88000,0x3fd71f5d - .long 0x712fcc92,0x3d54efa4 - .long 0xefd68000,0x3fd74d5a - .long 0x30990150,0xbd52a3e5 - .long 0x922bc000,0x3fd77b79 - .long 0xf6201124,0x3d537dc9 - .long 0x889f4000,0x3fd7a9b9 - .long 0x0dd20a44,0xbd630ed1 - .long 0x037ec000,0x3fd7d81b - .long 0x622fc2c1,0xbd42b381 - .long 0x33828000,0x3fd8069e - .long 0xe1da7992,0xbd4b9e42 - .long 0xd3ef8000,0x3fd82996 - .long 0xae7d64a2,0x3d47956a - .long 0x776e0000,0x3fd85855 - .long 0x0cccc887,0xbd6a02a9 - .long 0x58328000,0x3fd88736 - .long 0x1f7fc497,0xbd2988e2 - .long 0x973ac000,0x3fd8aa75 - .long 0x9e0af65a,0xbd3cc466 - .long 0xdc884000,0x3fd8d992 - .long 0xebb56b23,0xbd5b1b77 - .long 0xea7d8000,0x3fd908d2 - .long 0xf0e513c0,0x3d551185 - .long 0xe79c0000,0x3fd92c59 - .long 0x039fe987,0x3d4cac17 - .long 0x50ee4000,0x3fd95bd7 - .long 0x0649244f,0xbd12d6ab - .long 0x11a3c000,0x3fd98b78 - .long 0x3a5b6609,0x3d672da9 - .long 0xf33d4000,0x3fd9af47 - .long 0x59d98c86,0x3cfae14a - .long 0x0c190000,0x3fd9df27 - .long 0x963f4336,0x3d54a786 - .long 0xed150000,0x3fda0325 - .long 0xb0d5e095,0xbd22dc20 - .long 0x02250000,0x3fda3344 - .long 0x40314305,0xbd361cdd - .long 0x5e80c000,0x3fda5772 - .long 0xd1062b1b,0x3d2c172b - .long 0x165dc000,0x3fda87d0 - .long 0x7845f58e,0x3d51991f - .long 0x6c040000,0x3fdaac2e - .long 0xc856ee3b,0xbd3da90d - .long 0x6fdf8000,0x3fdadccc - .long 0x23b48979,0xbd557ef2 - .long 0x3eb20000,0x3fdb015b - .long 0xa4504de4,0xbd586fcd - .long 0x3a638000,0x3fdb323a - .long 0x7a9aa342,0xbd635be0 - .long 0x04464000,0x3fdb56fa - .long 0xad27be67,0xbd56f6ad - .long 0xa659c000,0x3fdb881a - .long 0x58ba5c9c,0xbd2b65ac - .long 0xef3d8000,0x3fdbad0b - .long 0xe4a81b98,0x3d68b265 - .long 0x97780000,0x3fdbd212 - .long 0xa247841c,0x3d5c2f63 - .long 0x36f08000,0x3fdc0392 - .long 0x435af523,0x3d403109 - .long 0x1e4d4000,0x3fdc28cb - .long 0xdc568214,0xbd4a0635 - .long 0xb8474000,0x3fdc4e19 - .long 0x9ad9f32c,0xbd5c3e5b - .long 0xc7454000,0x3fdc7ff9 - .long 0x47d5b6ca,0x3d54c924 - .long 0x64e9c000,0x3fdca57b - .long 0xd12a2803,0x3d5b0510 - .long 0x0a5d0000,0x3fdccb13 - .long 0x48811a12,0xbd545041 - .long 0xd18f4000,0x3fdcf0c0 - .long 0xc2008d44,0xbd4b2160 - .long 0x75b58000,0x3fdd2320 - .long 0x12cccc3a,0x3d610091 - .long 0x46df0000,0x3fdd4902 - .long 0x0b2c4c2c,0xbd365228 - .long 0x918d4000,0x3fdd6efa - .long 0x7676c78e,0xbd5a329d - .long 0x707ac000,0x3fdd9509 - .long 0x77579caf,0x3d6297b8 - .long 0xfe92c000,0x3fddbb2e - .long 0x0943c435,0x3d3550ac - .long 0x3445c000,0x3fddee2f - .long 0x3a0f9d04,0x3d625775 - .long 0x1a274000,0x3fde148a - .long 0x20732293,0xbd59326b - .long 0x0a4a0000,0x3fde3afc - .long 0x573921f0,0xbd080095 - .long 0x206d4000,0x3fde6185 - .long 0xc9807dcf,0x3d516d95 - .long 0x78824000,0x3fde8825 - .long 0xaa15d3d9,0xbd25726d - .long 0x2eac8000,0x3fdeaedd - .long 0xad7934b2,0x3d590c33 - .long 0x5f438000,0x3fded5ac - .long 0x1bc1c15c,0xbd541d1a - .long 0x26d14000,0x3fdefc93 - .long 0x206858e7,0x3d655c54 - .long 0xa2154000,0x3fdf2391 - .long 0x202b7ba5,0x3d6affe2 - .long 0xee030000,0x3fdf4aa7 - .long 0x56f014a9,0x3d592cde - .long 0x27c30000,0x3fdf71d6 - .long 0xe30f87ad,0x3d47600a - .long 0x6cb38000,0x3fdf991c - .long 0xcca0cdf3,0x3d69bcbe - .long 0xda698000,0x3fdfc07a - .long 0x2683bdae,0x3d6487fd - .long 0x8eb04000,0x3fdfe7f1 - .long 0xceb37e7a,0xbd260f51 - .long 0x53c50000,0x3fe007c0 - .long 0xc9c065f1,0x3cf73add - .long 0x2198a000,0x3fe01b94 - .long 0x5498efb5,0x3d4683ab - .long 0x400c8000,0x3fe02f74 - .long 0xe23775e2,0xbd6b154b - .long 0xbe760000,0x3fe04360 - .long 0x030d58c4,0x3d3d6774 - .long 0xac480000,0x3fe05759 - .long 0x83c1e850,0xbd2cc5f3 - .long 0x1911e000,0x3fe06b5f - .long 0x2598b50b,0xbd60ae17 - .long 0x0533c000,0x3fe078bf - .long 0x907b7d7f,0x3d45a048 - .long 0x687e8000,0x3fe08cd9 - .long 0xc00a19af,0xbd43c67f - .long 0x74cfa000,0x3fe0a100 - .long 0x22f73f90,0xbd5fcd6d - .long 0x3a234000,0x3fe0b534 - .long 0x4c68a7e5,0x3d41da30 - .long 0xc8942000,0x3fe0c974 - .long 0xa7cdcbb8,0x3d61cdc0 - .long 0x305ba000,0x3fe0ddc2 - .long 0x566f7df8,0xbd4de684 - .long 0x4bafc000,0x3fe0eb52 - .long 0x7feb3411,0x3d5230c5 - .long 0x4213a000,0x3fe0ffb5 - .long 0xbeeae6be,0x3d41d77b - .long 0x3da98000,0x3fe11425 - .long 0x3d4743ea,0xbd33050e - .long 0x4f1da000,0x3fe128a2 - .long 0x5906450d,0xbd440318 - .long 0x52bf0000,0x3fe13652 - .long 0xa621d4be,0x3d50c985 - .long 0x58b4a000,0x3fe14ae5 - .long 0x9895512f,0x3d525a20 - .long 0xa19c6000,0x3fe15f85 - .long 0xe4dca81e,0x3d665b5b - .long 0x38c12000,0x3fe16d4d - .long 0xaf71a89e,0xbd481628 - .long 0xc20de000,0x3fe18203 - .long 0x4bb7b8b9,0xbd5d995f - .long 0xbc4b2000,0x3fe196c7 - .long 0x14cec2c3,0xbd18a766 - .long 0x38b7a000,0x3fe1a4a7 - .long 0x26042793,0x3d39e2b1 - .long 0xc0c96000,0x3fe1b981 - .long 0x549461ed,0x3d44f378 - .long 0xe8bb0000,0x3fe1ce69 - .long 0xcc3339e5,0x3d606af5 - .long 0x9de06000,0x3fe1dc61 - .long 0xa1767071,0x3d528836 - .long 0xa2ad0000,0x3fe1f160 - .long 0x6c9de298,0x3d5b4741 - .long 0x77406000,0x3fe2066d - .long 0xd051f38d,0x3d637e65 - .long 0xba47c000,0x3fe2147d - .long 0x0cf5c8e9,0xbd6c6c55 - .long 0xbc5ec000,0x3fe229a1 - .long 0xf20d6e42,0xbd44f266 - .long 0x841a6000,0x3fe237c1 - .long 0xa47dba85,0xbd5fa312 - .long 0xe6f82000,0x3fe24cfc - .long 0xb65cb7bb,0xbd626596 - .long 0x55cd6000,0x3fe25b2c - .long 0x2ff856c0,0xbd513b72 - .long 0x4d5f8000,0x3fe2707f - .long 0xc37d4cdf,0xbd3df8b3 - .long 0x842ca000,0x3fe285e0 - .long 0x866d5f22,0x3d3c1c4d - .long 0x4708c000,0x3fe29429 - .long 0x7aca88eb,0xbd5119e8 - .long 0x670b0000,0x3fe2a9a2 - .long 0x1c2e5d10,0xbd1e7864 - .long 0x2c8d2000,0x3fe2b7fb - .long 0x00c270dd,0xbd39fb3c - .long 0x63960000,0x3fe2c65a - .long 0x03be9586,0xbd5415ea - .long 0x57b0e000,0x3fe2dbf5 - .long 0x07b9dc11,0xbd17a6e5 - .long 0xc3f96000,0x3fe2ea64 - .long 0x8b7d46fa,0x3d6654b2 - .long 0x23686000,0x3fe30018 - .long 0x5363d25e,0xbd628cd2 - .long 0xe9a8c000,0x3fe30e97 - .long 0x06943683,0xbd546671 - .long 0xebdd4000,0x3fe32463 - .long 0xc46cb528,0xbd562c21 - .long 0x314ae000,0x3fe332f4 - .long 0x1ea74541,0xbd50d4b6 - .long 0x0e746000,0x3fe348d9 - .long 0x44f828b5,0x3d433f3c - .long 0xf8c44000,0x3fe35779 - .long 0x22a46dd6,0xbd34934a - .long 0x961a8000,0x3fe36621 - .long 0x0cdd9d24,0xbd6566ce - .long 0x9f3c2000,0x3fe37c29 - .long 0x8e5820fe,0x3d666a2b - .long 0x17198000,0x3fe38ae2 - .long 0x576aad35,0xbd52316f - .long 0x57a60000,0x3fe399a1 - .long 0x62286d89,0x3d3f399c - .long 0xfe77c000,0x3fe3afcc - .long 0xedc1a56f,0xbd48bbbb - .long 0x50352000,0x3fe3be9d - .long 0x22f47589,0x3d63b540 - .long 0x80b4a000,0x3fe3cd74 - .long 0x9ebf0b71,0x3d51452e - .long 0x39190000,0x3fe3e3c4 - .long 0x4c617cda,0xbd512753 - .long 0xb27ec000,0x3fe3f2ac - .long 0x8d68a543,0x3d66c6ab - .long 0x2125c000,0x3fe4019c - .long 0xd9e1e717,0x3d552630 - .long 0x6138a000,0x3fe41810 - .long 0xa1618e8d,0xbd51bb4f - .long 0x518de000,0x3fe42711 - .long 0x38d47013,0x3d65455f - .long 0x4e12c000,0x3fe43619 - .long 0xaca69593,0xbd52819e - .long 0x5d68e000,0x3fe44528 - .long 0xf367503a,0x3d54d27f - .long 0x464ca000,0x3fe45bcc - .long 0xa4ffdcb2,0xbd66c5eb - .long 0x21f12000,0x3fe46aed - .long 0xa0df038b,0xbd50072e - .long 0x27e8a000,0x3fe47a15 - .long 0x83594fab,0x3d369a4a - .long 0x5f000000,0x3fe48944 - .long 0x95dc2343,0xbd39a0cf - .long 0xbcb6a000,0x3fe4a018 - .long 0xdb5ebf58,0xbd4f2ae4 - .long 0x0c9d6000,0x3fe4af5a - .long 0xedc4bac0,0x3d475de0 - .long 0xa5bdc000,0x3fe4bea2 - .long 0xefe50211,0xbd278f64 - .long 0x8f10c000,0x3fe4cdf2 - .long 0x7690ed86,0xbd63b982 - .long 0xcf994000,0x3fe4dd49 - .long 0x24d59d34,0x3d061972 - .long 0x6e64a000,0x3fe4eca8 - .long 0xb1079278,0x3d4a0e67 - .long 0x3cd90000,0x3fe503c4 - .long 0x0f1a734d,0xbd6497fc - .long 0x6667e000,0x3fe51335 - .long 0x4c9987aa,0x3d6c5739 - .long 0x0738a000,0x3fe522ae - .long 0x8164c759,0x3d3ebe70 - .long 0x26868000,0x3fe5322e - .long 0xba2da8ad,0xbd4ea333 - .long 0xcb978000,0x3fe541b5 - .long 0x62e3a6b9,0x3d680916 - .long 0xfdbcc000,0x3fe55144 - .long 0x2b35ba3e,0xbd34ec53 - .long 0xc4518000,0x3fe560db - .long 0x776b86a6,0xbd761cb6 - .long 0x26bb8000,0x3fe5707a - .long 0x5ff9981f,0x3d58ccc0 - .long 0x0ed5c000,0x3fe587f6 - .long 0xe6cce4c9,0xbd4c00c2 - .long 0x977cc000,0x3fe597a7 - .long 0xf6a33533,0xbd786770 - .long 0xd6348000,0x3fe5a760 - .long 0x365e53d9,0x3d7dc57c - .long 0xd2960000,0x3fe5b721 - .long 0x4f6ab8cd,0xbd5de23a - .long 0x94434000,0x3fe5c6ea - .long 0xa68978ec,0xbd70837e - .long 0x22ea8000,0x3fe5d6bb - .long 0xea2eecbe,0x3d4bd7d0 - .long 0x86460000,0x3fe5e693 - .long 0x23677de5,0xbd763831 - .long 0xc61a4000,0x3fe5f673 - .long 0x7a110a0e,0xbd612e5c - .long 0xea384000,0x3fe6065b - .long 0xc49e2cb9,0x3d692622 - .long 0xfa7cc000,0x3fe6164b - .long 0x27c383a0,0x3d0ad6c4 - .long 0xfecfc000,0x3fe62643 - .long 0x3ae25ed1,0xbd745e87 - .type __libm_logl_table_256,@object - .size __libm_logl_table_256,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrint_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrint_gen.S deleted file mode 100644 index b3d895587c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrint_gen.S +++ /dev/null @@ -1,88 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lrint_gen.c" - .text -..TXTST0: -# -- Begin lrint - .text - .align 16,0x90 - .globl lrint -lrint: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_lrint.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - movq %rsp, %rbp - .cfi_def_cfa 6, 16 - .cfi_offset 6, -16 - subq $16, %rsp - movq $0, -16(%rbp) - movl $0, -8(%rbp) -..B1.2: - pushq %rax - xorpd %xmm1, %xmm1 - stmxcsr -8(%rbp) - andl $-2, -8(%rbp) - ldmxcsr -8(%rbp) - cvtsd2si %xmm0, %rax - addsd %xmm0, %xmm1 - movq %rax, -16(%rbp) - stmxcsr -8(%rbp) - popq %rax -..B1.3: - movq -16(%rbp), %rax - movq %rbp, %rsp - popq %rbp - .cfi_restore 6 - ret - .align 16,0x90 - .cfi_endproc - .type lrint,@function - .size lrint,.-lrint - .data -# -- End lrint - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrintf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrintf_gen.S deleted file mode 100644 index 984b6174b7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrintf_gen.S +++ /dev/null @@ -1,88 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lrintf_gen.c" - .text -..TXTST0: -# -- Begin lrintf - .text - .align 16,0x90 - .globl lrintf -lrintf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_lrintf.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - movq %rsp, %rbp - .cfi_def_cfa 6, 16 - .cfi_offset 6, -16 - subq $16, %rsp - movq $0, -16(%rbp) - movl $0, -8(%rbp) -..B1.2: - pushq %rax - xorpd %xmm1, %xmm1 - stmxcsr -8(%rbp) - andl $-2, -8(%rbp) - ldmxcsr -8(%rbp) - cvtss2si %xmm0, %rax - addss %xmm0, %xmm1 - movq %rax, -16(%rbp) - stmxcsr -8(%rbp) - popq %rax -..B1.3: - movq -16(%rbp), %rax - movq %rbp, %rsp - popq %rbp - .cfi_restore 6 - ret - .align 16,0x90 - .cfi_endproc - .type lrintf,@function - .size lrintf,.-lrintf - .data -# -- End lrintf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrintl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrintl.S deleted file mode 100644 index 6473321dfd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lrintl.S +++ /dev/null @@ -1,314 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lrintl.c" - .text -..TXTST0: -# -- Begin lrintl - .text - .align 16,0x90 - .globl lrintl -lrintl: -# parameter 1: 80 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_lrintl.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - pushq %rbp - .cfi_def_cfa_offset 24 - .cfi_offset 6, -24 - subq $56, %rsp - .cfi_def_cfa_offset 80 - fldt 80(%rsp) - movzbl 89(%rsp), %edi - movzwl 88(%rsp), %r8d - andl $128, %edi - andl $32767, %r8d - shrl $7, %edi - fstpt 32(%rsp) - cmpl $16445, %r8d - jge ..B1.8 -..B1.2: - testl %r8d, %r8d - jne ..B1.6 -..B1.3: - cmpl $0, 84(%rsp) - jne ..B1.5 -..B1.4: - cmpl $0, 80(%rsp) - je ..B1.6 -..B1.5: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 8(%rsp) -..B1.6: - fldt 32(%rsp) - fistpq 16(%rsp) -..B1.7: - movq 16(%rsp), %rax - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.8: - cmpl $16447, %r8d - jge ..B1.21 -..B1.9: - movl %edi, %esi - movq $0x7fffffffffffffff, %rax - addq %rax, %rsi - cmpl $16446, %r8d - jge ..B1.16 -..B1.10: - fnstcw 4(%rsp) -..B1.11: - movl 80(%rsp), %ebx - movl %ebx, %ebp - movzwl 4(%rsp), %r11d - andl $1, %ebp - movl 84(%rsp), %ecx - andl $3072, %r11d - jne ..B1.13 -..B1.12: - movl %ebx, %eax - andl $3, %ebx - movl %ecx, %edx - movl $1, %r9d - cmpl $3, %ebx - movl $0, %ebx - cmovne %ebx, %r9d - shrl $1, %edx - shll $31, %ecx - shrl $1, %eax - orl %eax, %ecx - shlq $32, %rdx - orq %rcx, %rdx - addq %r9, %rdx - jmp ..B1.17 -..B1.13: - movl $1, %eax - xorl %edx, %edx - cmpl $3072, %r11d - cmove %eax, %edx - xorl %r10d, %r10d - cmpl $2048, %r11d - movl %eax, %r9d - cmove %eax, %r10d - testl %edi, %edi - cmove %edi, %r9d - andl %r9d, %r10d - xorl %r9d, %r9d - cmpl $1024, %r11d - cmove %eax, %r9d - xorl %r11d, %r11d - testl %edi, %edi - cmovne %r11d, %eax - orl %r10d, %edx - andl %eax, %r9d - orl %r9d, %edx - je ..B1.15 -..B1.14: - movl %ecx, %edx - shrl $1, %edx - shll $31, %ecx - shrl $1, %ebx - orl %ebx, %ecx - shlq $32, %rdx - orq %rcx, %rdx - jmp ..B1.17 -..B1.15: - movl %ecx, %edx - movl %ebx, %eax - shrl $1, %edx - shll $31, %ecx - shrl $1, %eax - orl %eax, %ecx - shlq $32, %rdx - orq %rcx, %rdx - andq $1, %rbx - addq %rbx, %rdx - jmp ..B1.17 -..B1.16: - movl 84(%rsp), %edx - xorl %ebp, %ebp - shlq $32, %rdx - movl 80(%rsp), %eax - orq %rax, %rdx -..B1.17: - movq %rdx, %rax - xorl %ecx, %ecx - negq %rax - testl %edi, %edi - cmove %rdx, %rax - cmpq %rdx, %rax - setae %cl - cmpq %rsi, %rdx - movl $0, %edx - setbe %dl - testl %edx, %ecx - je ..B1.21 -..B1.18: - testl %ebp, %ebp - je ..B1.20 -..B1.19: - lea _ones(%rip), %rdx - lea _small_value_64(%rip), %rcx - movq %rax, 16(%rsp) - movsd (%rdx), %xmm0 - addsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) -..B1.20: - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.21: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movq $0x8000000000000000, %rcx - cmpl $32767, %r8d - movq %rcx, 16(%rsp) - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 8(%rsp) - jne ..B1.24 -..B1.22: - cmpl $-2147483648, 84(%rsp) - jne ..B1.29 -..B1.23: - cmpl $0, 80(%rsp) - jne ..B1.29 -..B1.24: - fnstcw 2(%rsp) -..B1.25: - movzwl 2(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.26: - orl $-64768, %edx - movw %dx, (%rsp) -..B1.27: - fldcw (%rsp) -..B1.28: - fldcw 2(%rsp) -..B1.29: - movq 16(%rsp), %rax - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type lrintl,@function - .size lrintl,.-lrintl - .data -# -- End lrintl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lround_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lround_gen.S deleted file mode 100644 index 95136def07..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lround_gen.S +++ /dev/null @@ -1,138 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lround_gen.c" - .text -..TXTST0: -# -- Begin lround - .text - .align 16,0x90 - .globl lround -lround: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_lround.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) - movq $0, 8(%rsp) - movl $0, 16(%rsp) -..B1.2: - stmxcsr 16(%rsp) - movsd (%rsp), %xmm1 - xorpd %xmm2, %xmm2 - andl $-2, 16(%rsp) - ldmxcsr 16(%rsp) - cvtsd2si %xmm1, %rax - addsd %xmm1, %xmm2 - movq %rax, 8(%rsp) - stmxcsr 16(%rsp) -..B1.3: - testb $1, 16(%rsp) - jne ..B1.6 -..B1.4: - pxor %xmm2, %xmm2 - movq 8(%rsp), %rax - cvtsi2sdq %rax, %xmm2 - movsd (%rsp), %xmm1 - movaps %xmm1, %xmm0 - subsd %xmm2, %xmm0 - andps .L_2il0floatpacket.1(%rip), %xmm0 - ucomisd .L_2il0floatpacket.0(%rip), %xmm0 - jp ..B1.5 - je ..B1.7 -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.6: - movq 8(%rsp), %rax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.7: - pxor %xmm0, %xmm0 - comisd %xmm0, %xmm1 - jbe ..B1.10 -..B1.8: - comisd %xmm2, %xmm1 - jbe ..B1.5 -..B1.9: - incq %rax - movq %rax, 8(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.10: - comisd %xmm1, %xmm2 - jbe ..B1.5 -..B1.11: - decq %rax - movq %rax, 8(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type lround,@function - .size lround,.-lround - .data -# -- End lround - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lroundf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lroundf_gen.S deleted file mode 100644 index 43fd9b79c7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lroundf_gen.S +++ /dev/null @@ -1,138 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lroundf_gen.c" - .text -..TXTST0: -# -- Begin lroundf - .text - .align 16,0x90 - .globl lroundf -lroundf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_lroundf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movss %xmm0, 16(%rsp) - movq $0, (%rsp) - movl $0, 8(%rsp) -..B1.2: - stmxcsr 8(%rsp) - movsd 16(%rsp), %xmm1 - xorpd %xmm2, %xmm2 - andl $-2, 8(%rsp) - ldmxcsr 8(%rsp) - cvtss2si %xmm1, %rax - addss %xmm1, %xmm2 - movq %rax, (%rsp) - stmxcsr 8(%rsp) -..B1.3: - testb $1, 8(%rsp) - jne ..B1.6 -..B1.4: - pxor %xmm2, %xmm2 - movq (%rsp), %rax - cvtsi2ssq %rax, %xmm2 - movss 16(%rsp), %xmm1 - movaps %xmm1, %xmm0 - subss %xmm2, %xmm0 - andps .L_2il0floatpacket.1(%rip), %xmm0 - ucomiss .L_2il0floatpacket.0(%rip), %xmm0 - jp ..B1.5 - je ..B1.7 -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.6: - movq (%rsp), %rax - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.7: - pxor %xmm0, %xmm0 - comiss %xmm0, %xmm1 - jbe ..B1.10 -..B1.8: - comiss %xmm2, %xmm1 - jbe ..B1.5 -..B1.9: - incq %rax - movq %rax, (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.10: - comiss %xmm1, %xmm2 - jbe ..B1.5 -..B1.11: - decq %rax - movq %rax, (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type lroundf,@function - .size lroundf,.-lroundf - .data -# -- End lroundf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x7fffffff,0x00000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 4 -.L_2il0floatpacket.0: - .long 0x3f000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lroundl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lroundl.S deleted file mode 100644 index d60f8badfd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/lroundl.S +++ /dev/null @@ -1,243 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "lroundl.c" - .text -..TXTST0: -# -- Begin lroundl - .text - .align 16,0x90 - .globl lroundl -lroundl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_lroundl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %dl, %dl -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movb 57(%rsp), %r8b - lea _range(%rip), %rdi - andb $-128, %r8b - shrb $7, %r8b - movzbl %r8b, %eax - movq %rax, %rsi - shlq $4, %rsi - movzwl 56(%rsp), %r9d - andl $32767, %r9d - movzwl 8(%rsi,%rdi), %ecx - andl $32767, %ecx - cmpl %ecx, %r9d - jl ..B1.8 -..B1.4: - jne ..B1.16 -..B1.5: - movl 52(%rsp), %ecx - cmpl 4(%rsi,%rdi), %ecx - jb ..B1.8 -..B1.6: - jne ..B1.16 -..B1.7: - movl 48(%rsp), %ecx - cmpl (%rsi,%rdi), %ecx - ja ..B1.16 -..B1.8: - cmpl $16383, %r9d - jl ..B1.10 -..B1.9: - movl %r9d, %edi - negl %edi - movl 52(%rsp), %r10d - movl %r10d, %eax - movl 48(%rsp), %edx - movl %edx, %esi - shlq $32, %r10 - lea 29(%rdi), %ecx - shrl %cl, %eax - addl $62, %edi - shrl %cl, %esi - cmpl $16414, %r9d - movl %edi, %ecx - cmovl %eax, %esi - orq %rdx, %r10 - andl $1, %esi - shrq %cl, %r10 - addq %rsi, %r10 - movq %r10, %r9 - negq %r9 - testb %r8b, %r8b - cmovne %r9, %r10 - movq %r10, %rax - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.10: - cmpl $16382, %r9d - je ..B1.23 -..B1.11: - testl %r9d, %r9d - jne ..B1.15 -..B1.12: - cmpl $0, 52(%rsp) - jne ..B1.14 -..B1.13: - cmpl $0, 48(%rsp) - je ..B1.15 -..B1.14: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, (%rsp) -..B1.15: - xorl %eax, %eax - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.16: - lea lres_maxmin(%rip), %rcx - movq (%rcx,%rax,8), %rax - movzwl 34(%rsp), %ecx - movl %ecx, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.20 -..B1.17: - orl $-64768, %ecx - movw %cx, 32(%rsp) -..B1.18: - fldcw 32(%rsp) -..B1.19: - movb $1, %dl -..B1.20: - lea _infs(%rip), %rcx - lea _zeros(%rip), %rsi - testb %dl, %dl - movsd (%rcx), %xmm0 - mulsd (%rsi), %xmm0 - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) - je ..B1.22 -..B1.21: - fldcw 34(%rsp) -..B1.22: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.23: - lea iones(%rip), %rdx - movslq (%rdx,%rax,4), %rax - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type lroundl,@function - .size lroundl,.-lroundl - .data -# -- End lroundl - .section .rodata, "a" - .align 8 - .align 8 -lres_maxmin: - .long 0xffffffff,0x7fffffff - .long 0x00000000,0x80000000 - .type lres_maxmin,@object - .size lres_maxmin,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 2 -_range: - .word 65534 - .word 65535 - .word 65535 - .word 65535 - .word 16445 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49214 - .word 0 - .word 0 - .word 0 - .type _range,@object - .size _range,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modf_gen.S deleted file mode 100644 index e40486993c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modf_gen.S +++ /dev/null @@ -1,153 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "modf_gen.c" - .text -..TXTST0: -# -- Begin modf - .text - .align 16,0x90 - .globl modf -modf: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_modf.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - movl %eax, %r8d - andl $2147483647, %r8d - lea -1072693248(%r8), %edx - cmpl $54525952, %edx - jae ..B1.9 -..B1.2: - movl %r8d, %ecx - shrl $20, %ecx - movl -8(%rsp), %esi - cmpl $1094713344, %r8d - jae ..B1.4 -..B1.3: - negl %ecx - movl $-1, %edx - addl $19, %ecx - shll %cl, %edx - movl %edx, %ecx - andl %eax, %edx - notl %ecx - andl %eax, %ecx - movl %edx, 4(%rdi) - orl %esi, %ecx - movl $0, (%rdi) - jmp ..B1.5 -..B1.4: - negl %ecx - movl $-1, %edx - addl $19, %ecx - shll %cl, %edx - movl %edx, %ecx - andl %esi, %edx - notl %ecx - movl %edx, (%rdi) - andl %esi, %ecx - movl %eax, 4(%rdi) -..B1.5: - testl %ecx, %ecx - je ..B1.7 -..B1.6: - movsd -8(%rsp), %xmm0 - subsd (%rdi), %xmm0 - ret -..B1.7: - lea _zeros(%rip), %rdx - shrl $31, %eax - movsd (%rdx,%rax,8), %xmm0 -..B1.8: - ret -..B1.9: - shrl $31, %eax - cmpl $2146435072, %r8d - jb ..B1.12 -..B1.10: - addl $-2146435072, %r8d - orl -8(%rsp), %r8d - je ..B1.13 -..B1.11: - movsd -8(%rsp), %xmm0 - addsd %xmm0, %xmm0 - movsd %xmm0, (%rdi) - ret -..B1.12: - cmpl $1072693248, %r8d - jbe ..B1.14 -..B1.13: - movl %eax, %eax - lea _zeros(%rip), %rcx - movq -8(%rsp), %rdx - movq %rdx, (%rdi) - movsd (%rcx,%rax,8), %xmm0 - ret -..B1.14: - lea _zeros(%rip), %rdx - movsd -8(%rsp), %xmm0 - movq (%rdx,%rax,8), %rcx - movq %rcx, (%rdi) - ret - .align 16,0x90 - .cfi_endproc - .type modf,@function - .size modf,.-modf - .data -# -- End modf - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modff.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modff.S deleted file mode 100644 index 4232ea9187..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modff.S +++ /dev/null @@ -1,126 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "modff.c" - .text -..TXTST0: -# -- Begin modff - .text - .align 16,0x90 - .globl modff -modff: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_modff.1: -..L2: - - movd %xmm0, %esi - movss %xmm0, -8(%rsp) - movl %esi, %ecx - andl $2147483647, %ecx - lea -1065353216(%rcx), %eax - cmpl $192937984, %eax - jae ..B1.6 -..B1.2: - shrl $23, %ecx - movl $-1, %edx - negl %ecx - addl $22, %ecx - shll %cl, %edx - movl %edx, %eax - andl %esi, %edx - notl %eax - movl %edx, (%rdi) - testl %eax, %esi - je ..B1.4 -..B1.3: - subss (%rdi), %xmm0 - ret -..B1.4: - lea _zeros(%rip), %rax - shrl $31, %esi - movss (%rax,%rsi,4), %xmm0 -..B1.5: - ret -..B1.6: - shrl $31, %esi - cmpl $2139095040, %ecx - ja ..B1.11 -..B1.7: - cmpl $1065353216, %ecx - jbe ..B1.9 -..B1.8: - movl %esi, %esi - lea _zeros(%rip), %rdx - movl -8(%rsp), %eax - movl %eax, (%rdi) - movss (%rdx,%rsi,4), %xmm0 - ret -..B1.9: - lea _zeros(%rip), %rax - movss -8(%rsp), %xmm0 - movl (%rax,%rsi,4), %edx - movl %edx, (%rdi) -..B1.10: - ret -..B1.11: - movss -8(%rsp), %xmm0 - addss %xmm0, %xmm0 - movss %xmm0, (%rdi) - ret - .align 16,0x90 - .cfi_endproc - .type modff,@function - .size modff,.-modff - .data -# -- End modff - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modfl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modfl.S deleted file mode 100644 index 1788f0b5df..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/modfl.S +++ /dev/null @@ -1,262 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "modfl.c" - .text -..TXTST0: -# -- Begin modfl - .text - .align 16,0x90 - .globl modfl -modfl: -# parameter 1: 48 + %rsp -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_modfl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 56(%rsp), %ecx - andl $32767, %ecx - cmpl $16446, %ecx - jge ..B1.21 -..B1.4: - cmpl $16383, %ecx - jl ..B1.16 -..B1.5: - fldt 48(%rsp) - cmpl $16415, %ecx - fstpt (%rsp) - jge ..B1.7 -..B1.6: - negl %ecx - movl $-1, %eax - addl $30, %ecx - shll %cl, %eax - movl %eax, %ecx - notl %ecx - movl 52(%rsp), %edx - andl %edx, %ecx - andl %eax, %edx - orl 48(%rsp), %ecx - movl %edx, 52(%rsp) - xorl %edx, %edx - jmp ..B1.8 -..B1.7: - negl %ecx - movl $-1, %edx - addl $30, %ecx - shll %cl, %edx - movl %edx, %ecx - notl %ecx - movl 48(%rsp), %eax - andl %eax, %ecx - andl %eax, %edx -..B1.8: - movl %edx, 48(%rsp) - testl %ecx, %ecx - je ..B1.14 -..B1.9: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.31 -..B1.10: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.11: - fldcw 24(%rsp) -..B1.12: - fldt 48(%rsp) - fstpt (%rdi) - fldt (%rdi) - fldt (%rsp) - fsubp %st, %st(1) - fstpt (%rsp) -..B1.13: - fldcw 26(%rsp) - jmp ..B1.15 -..B1.14: - fldt 48(%rsp) - lea _zeros(%rip), %rdx - movb 57(%rsp), %al - andb $-128, %al - fstpt (%rdi) - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - fstpt (%rsp) -..B1.15: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.16: - testl %ecx, %ecx - jne ..B1.20 -..B1.17: - cmpl $0, 52(%rsp) - jne ..B1.19 -..B1.18: - cmpl $0, 48(%rsp) - je ..B1.20 -..B1.19: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 16(%rsp) -..B1.20: - movb 57(%rsp), %al - lea _zeros(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - fstpt (%rdi) - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.21: - cmpl $32767, %ecx - jne ..B1.24 -..B1.22: - cmpl $-2147483648, 52(%rsp) - jne ..B1.25 -..B1.23: - cmpl $0, 48(%rsp) - jne ..B1.25 -..B1.24: - fldt 48(%rsp) - lea _zeros(%rip), %rdx - movb 57(%rsp), %al - andb $-128, %al - shrb $7, %al - fstpt (%rdi) - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.25: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.32 -..B1.26: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.27: - fldcw 24(%rsp) -..B1.28: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) - fldt (%rsp) - fstpt (%rdi) -..B1.29: - fldcw 26(%rsp) -..B1.30: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.31: - fldt 48(%rsp) - fstpt (%rdi) - fldt (%rdi) - fldt (%rsp) - fsubp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.32: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) - fldt (%rsp) - fstpt (%rdi) - jmp ..B1.30 - .align 16,0x90 - .cfi_endproc - .type modfl,@function - .size modfl,.-modfl - .data -# -- End modfl - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nan.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nan.S deleted file mode 100644 index d5e836144b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nan.S +++ /dev/null @@ -1,144 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nan.c" - .text -..TXTST0: -# -- Begin nanf - .text - .align 16,0x90 - .globl nanf -nanf: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value_nanf.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 -..___tag_value_nanf.4: - call __libm_conv_strtoull@PLT -..___tag_value_nanf.5: -..B1.2: - andl $4194303, %eax - orl $2143289344, %eax - movl %eax, (%rsp) - movss (%rsp), %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type nanf,@function - .size nanf,.-nanf - .data -# -- End nanf - .text -# -- Begin nan - .text - .align 16,0x90 - .globl nan -nan: -# parameter 1: %rdi -..B2.1: - .cfi_startproc -..___tag_value_nan.8: -..L9: - - pushq %rsi - .cfi_def_cfa_offset 16 -..___tag_value_nan.11: - call __libm_conv_strtoull@PLT -..___tag_value_nan.12: -..B2.2: - movq $0x7ffffffffffff, %rdx - andq %rax, %rdx - movq $0x7ff8000000000000, %rax - orq %rdx, %rax - movq %rax, (%rsp) - movsd (%rsp), %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type nan,@function - .size nan,.-nan - .data -# -- End nan - .text -# -- Begin nanl - .text - .align 16,0x90 - .globl nanl -nanl: -# parameter 1: %rdi -..B3.1: - .cfi_startproc -..___tag_value_nanl.15: -..L16: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..___tag_value_nanl.18: - call __libm_conv_strtoull@PLT -..___tag_value_nanl.19: -..B3.5: - movq %rax, %rdx -..B3.2: - movq $0xc000000000000000, %rax - orq %rax, %rdx - movq %rdx, (%rsp) - movl $32767, %edx - movw %dx, 8(%rsp) - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type nanl,@function - .size nanl,.-nanl - .data -# -- End nanl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyint_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyint_gen.S deleted file mode 100644 index b7b32a6eda..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyint_gen.S +++ /dev/null @@ -1,435 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nearbyint_gen.c" - .text -..TXTST0: -# -- Begin nearbyint - .text - .align 16,0x90 - .globl nearbyint -nearbyint: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_nearbyint.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) -..B1.2: - stmxcsr 8(%rsp) -..B1.3: - movzwl 6(%rsp), %esi - andl $32752, %esi - shrl $4, %esi - cmpl $1075, %esi - jge ..B1.62 -..B1.4: - movl 8(%rsp), %eax - andl $24576, %eax - cmpl $8192, %eax - je ..B1.49 -..B1.5: - cmpl $16384, %eax - jne ..B1.19 -..B1.6: - cmpl $1023, %esi - jl ..B1.14 -..B1.7: - cmpl $1043, %esi - jle ..B1.9 -..B1.8: - negl %esi - movl $-1, %edi - addl $19, %esi - movl %esi, %ecx - shll %cl, %edi - movl (%rsp), %eax - andl %eax, %edi - movl %edi, (%rsp) - xorl %eax, %edi - jmp ..B1.10 -..B1.9: - negl %esi - movl $1048575, %eax - addl $19, %esi - movl 4(%rsp), %edx - movl %edx, %edi - movl %esi, %ecx - andl $1048575, %edi - shll %cl, %eax - andl $-1048576, %edx - andl %edi, %eax - orl %eax, %edx - movl %edx, 4(%rsp) - andl $1048575, %edx - xorl %edx, %edi - orl (%rsp), %edi - movl $0, (%rsp) -..B1.10: - testb $-128, 7(%rsp) - jne ..B1.13 -..B1.11: - testl %edi, %edi - je ..B1.13 -..B1.12: - lea _ones(%rip), %rax - movsd (%rsp), %xmm0 - addsd (%rax), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.13: - movsd (%rsp), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.14: - testl %esi, %esi - jne ..B1.18 -..B1.15: - testl $1048575, 4(%rsp) - jne ..B1.18 -..B1.16: - cmpl $0, (%rsp) - je ..B1.13 -..B1.18: - movb 7(%rsp), %al - lea _pone_nzero(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movsd (%rdx,%rcx,8), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.19: - cmpl $24576, %eax - jne ..B1.26 -..B1.20: - cmpl $1023, %esi - jl ..B1.25 -..B1.21: - cmpl $1043, %esi - jle ..B1.23 -..B1.22: - negl %esi - movl $-1, %eax - addl $19, %esi - movl %esi, %ecx - shll %cl, %eax - andl (%rsp), %eax - jmp ..B1.24 -..B1.23: - negl %esi - movl $1048575, %eax - addl $19, %esi - movl %esi, %ecx - shll %cl, %eax - movl 4(%rsp), %edx - movl %edx, %edi - andl %eax, %edx - andl $-1048576, %edi - andl $1048575, %edx - xorl %eax, %eax - orl %edx, %edi - movl %edi, 4(%rsp) -..B1.24: - movl %eax, (%rsp) - movsd (%rsp), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.25: - movb 7(%rsp), %al - lea _zeros(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movsd (%rdx,%rcx,8), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.26: - cmpl $1023, %esi - jl ..B1.42 -..B1.27: - movl (%rsp), %eax - cmpl $1043, %esi - jl ..B1.29 -..B1.28: - movl %eax, %edx - lea 13(%rsi), %ecx - shll %cl, %edx - xorl %r9d, %r9d - jmp ..B1.30 -..B1.29: - movl 4(%rsp), %edx - lea 13(%rsi), %ecx - andl $1048575, %edx - movl %eax, %r9d - shll %cl, %edx -..B1.30: - cmpl $1043, %esi - jle ..B1.32 -..B1.31: - negl %esi - movl $-1, %edi - addl $19, %esi - movl %esi, %ecx - shll %cl, %edi - andl %edi, %eax - jmp ..B1.33 -..B1.32: - negl %esi - movl $1048575, %eax - addl $19, %esi - movl %esi, %ecx - shll %cl, %eax - movl 4(%rsp), %edi - movl %edi, %r8d - andl %eax, %edi - andl $-1048576, %r8d - andl $1048575, %edi - xorl %eax, %eax - orl %edi, %r8d - movl %r8d, 4(%rsp) -..B1.33: - movl %eax, (%rsp) - testl %edx, %edx - jge ..B1.13 -..B1.34: - andl $2147483647, %edx - orl %r9d, %edx - jne ..B1.37 -..B1.35: - movzwl 6(%rsp), %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $1043, %ecx - jle ..B1.38 -..B1.36: - negl %ecx - movl $1, %edx - addl $19, %ecx - shll %cl, %edx - testl %edx, %eax - je ..B1.13 -..B1.37: - movb 7(%rsp), %al - lea _ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movsd (%rsp), %xmm0 - movzbl %al, %ecx - addsd (%rdx,%rcx,8), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.38: - negl %ecx - movl $1, %eax - addl $19, %ecx - shll %cl, %eax - testl %eax, 4(%rsp) - je ..B1.13 -..B1.39: - movb 7(%rsp), %al - lea _ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movsd (%rsp), %xmm0 - movzbl %al, %ecx - addsd (%rdx,%rcx,8), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.42: - cmpl $1022, %esi - jg ..B1.48 -..B1.43: - jne ..B1.25 -..B1.44: - movl 4(%rsp), %eax - andl $1048575, %eax - jg ..B1.48 -..B1.45: - jne ..B1.25 -..B1.46: - cmpl $0, (%rsp) - jbe ..B1.25 -..B1.48: - movb 7(%rsp), %al - lea _ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movsd (%rdx,%rcx,8), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.49: - cmpl $1023, %esi - jl ..B1.57 -..B1.50: - cmpl $1043, %esi - jle ..B1.52 -..B1.51: - negl %esi - movl $-1, %eax - addl $19, %esi - movl %esi, %ecx - shll %cl, %eax - movl (%rsp), %edi - andl %edi, %eax - movl %eax, (%rsp) - xorl %eax, %edi - jmp ..B1.53 -..B1.52: - negl %esi - movl $1048575, %eax - addl $19, %esi - movl 4(%rsp), %edx - movl %edx, %edi - movl %esi, %ecx - andl $1048575, %edi - shll %cl, %eax - andl $-1048576, %edx - andl %edi, %eax - orl %eax, %edx - movl %edx, 4(%rsp) - andl $1048575, %edx - xorl %edx, %edi - orl (%rsp), %edi - movl $0, (%rsp) -..B1.53: - testb $-128, 7(%rsp) - je ..B1.13 -..B1.54: - testl %edi, %edi - je ..B1.13 -..B1.55: - lea 8+_ones(%rip), %rax - movsd (%rsp), %xmm0 - addsd (%rax), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.57: - testl %esi, %esi - jne ..B1.61 -..B1.58: - testl $1048575, 4(%rsp) - jne ..B1.61 -..B1.59: - cmpl $0, (%rsp) - je ..B1.13 -..B1.61: - movb 7(%rsp), %al - lea _pzero_none(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movsd (%rdx,%rcx,8), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.62: - lea _ones(%rip), %rax - movsd (%rsp), %xmm0 - mulsd (%rax), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type nearbyint,@function - .size nearbyint,.-nearbyint - .data -# -- End nearbyint - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_pone_nzero: - .long 0 - .long 1072693248 - .long 0 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_pzero_none: - .long 0 - .long 0 - .long 0 - .long 3220176896 - .type _pzero_none,@object - .size _pzero_none,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyintf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyintf_gen.S deleted file mode 100644 index 06543a1462..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyintf_gen.S +++ /dev/null @@ -1,336 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nearbyintf_gen.c" - .text -..TXTST0: -# -- Begin nearbyintf - .text - .align 16,0x90 - .globl nearbyintf -nearbyintf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_nearbyintf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movss %xmm0, 8(%rsp) -..B1.2: - stmxcsr 4(%rsp) -..B1.3: - movzwl 10(%rsp), %eax - andl $32640, %eax - shrl $7, %eax - cmpl $150, %eax - jge ..B1.10 -..B1.4: - movl 4(%rsp), %edx - andl $24576, %edx - cmpl $8192, %edx - je ..B1.32 -..B1.5: - cmpl $16384, %edx - jne ..B1.15 -..B1.6: - cmpl $127, %eax - jl ..B1.11 -..B1.7: - negl %eax - movl $8388607, %edx - addl $22, %eax - movl 8(%rsp), %esi - movl %esi, %edi - movl %eax, %ecx - andl $8388607, %edi - shll %cl, %edx - andl $-8388608, %esi - andl %edi, %edx - orl %edx, %esi - movl %esi, %eax - andl $8388607, %eax - movl %esi, 8(%rsp) - testl $-2147483648, %esi - jne ..B1.10 -..B1.8: - cmpl %edi, %eax - je ..B1.10 -..B1.9: - movss 8(%rsp), %xmm0 - addss .L_2il0floatpacket.1(%rip), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.10: - movss 8(%rsp), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.11: - testl %eax, %eax - jne ..B1.14 -..B1.12: - testl $8388607, 8(%rsp) - je ..B1.10 -..B1.14: - movb 11(%rsp), %dl - lea _pone_nzero(%rip), %rcx - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %esi - movl 8(%rsp), %eax - movl %eax, (%rsp) - movss (%rcx,%rsi,4), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.15: - cmpl $24576, %edx - jne ..B1.20 -..B1.16: - cmpl $127, %eax - jl ..B1.18 -..B1.17: - negl %eax - movl $8388607, %edx - addl $22, %eax - movl %eax, %ecx - shll %cl, %edx - movl 8(%rsp), %esi - movl %esi, %edi - andl %edx, %esi - andl $-8388608, %edi - andl $8388607, %esi - orl %esi, %edi - movl %edi, 8(%rsp) - movss 8(%rsp), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.18: - movb 11(%rsp), %dl - lea _zeros(%rip), %rcx - andb $-128, %dl - movl 8(%rsp), %eax - movl %eax, (%rsp) - shrb $7, %dl - movzbl %dl, %esi - movss (%rcx,%rsi,4), %xmm0 -..B1.19: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.20: - cmpl $127, %eax - jl ..B1.27 -..B1.21: - movl 8(%rsp), %edi - movl %edi, %esi - andl $8388607, %esi - lea 10(%rax), %ecx - negl %eax - movl %esi, %r8d - addl $22, %eax - movl $8388607, %edx - shll %cl, %r8d - movl %eax, %ecx - shll %cl, %edx - andl $-8388608, %edi - andl %edx, %esi - orl %esi, %edi - movl %edi, 8(%rsp) - testl %r8d, %r8d - jge ..B1.10 -..B1.22: - cmpl $-2147483648, %r8d - jne ..B1.24 -..B1.23: - movzwl 10(%rsp), %ecx - movl $1, %eax - shrl $7, %ecx - negl %ecx - addl $22, %ecx - shll %cl, %eax - testl %eax, 8(%rsp) - je ..B1.10 -..B1.24: - movb 11(%rsp), %al - lea _ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movss 8(%rsp), %xmm0 - movzbl %al, %ecx - addss (%rdx,%rcx,4), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.27: - cmpl $126, %eax - jg ..B1.31 -..B1.28: - jne ..B1.30 -..B1.29: - testl $8388607, 8(%rsp) - jg ..B1.31 -..B1.30: - movb 11(%rsp), %dl - lea _zeros(%rip), %rcx - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %esi - movl 8(%rsp), %eax - movl %eax, (%rsp) - movss (%rcx,%rsi,4), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.31: - movb 11(%rsp), %al - lea _ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.32: - cmpl $127, %eax - jl ..B1.37 -..B1.33: - negl %eax - movl $8388607, %edx - addl $22, %eax - movl 8(%rsp), %esi - movl %esi, %edi - movl %eax, %ecx - andl $8388607, %edi - shll %cl, %edx - andl $-8388608, %esi - andl %edi, %edx - orl %edx, %esi - movl %esi, %eax - andl $8388607, %eax - movl %esi, 8(%rsp) - testl $-2147483648, %esi - je ..B1.10 -..B1.34: - cmpl %edi, %eax - je ..B1.10 -..B1.35: - movss 8(%rsp), %xmm0 - addss .L_2il0floatpacket.0(%rip), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.37: - testl %eax, %eax - jne ..B1.40 -..B1.38: - testl $8388607, 8(%rsp) - je ..B1.10 -..B1.40: - movb 11(%rsp), %dl - lea _pzero_none(%rip), %rcx - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %esi - movl 8(%rsp), %eax - movl %eax, (%rsp) - movss (%rcx,%rsi,4), %xmm0 - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type nearbyintf,@function - .size nearbyintf,.-nearbyintf - .data -# -- End nearbyintf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x3f800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_pone_nzero: - .long 1065353216 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 4 -_pzero_none: - .long 0 - .long 3212836864 - .type _pzero_none,@object - .size _pzero_none,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyintl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyintl.S deleted file mode 100644 index 02ceb8f562..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nearbyintl.S +++ /dev/null @@ -1,617 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nearbyintl.c" - .text -..TXTST0: -# -- Begin nearbyintl - .text - .align 16,0x90 - .globl nearbyintl -nearbyintl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_nearbyintl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %dil, %dil -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 56(%rsp), %r8d - andl $32767, %r8d - movzwl 26(%rsp), %r9d - cmpl $16446, %r8d - jge ..B1.95 -..B1.4: - movl %r9d, %eax - andl $3072, %eax - cmpl $1024, %eax - je ..B1.77 -..B1.5: - cmpl $2048, %eax - jne ..B1.24 -..B1.6: - cmpl $16383, %r8d - jl ..B1.19 -..B1.7: - cmpl $16415, %r8d - jl ..B1.9 -..B1.8: - negl %r8d - movl $-1, %edx - addl $30, %r8d - movl %r8d, %ecx - shll %cl, %edx - movl 48(%rsp), %eax - andl %eax, %edx - movl %edx, 48(%rsp) - xorl %eax, %edx - jmp ..B1.10 -..B1.9: - negl %r8d - movl $-1, %edx - addl $30, %r8d - movl %r8d, %ecx - shll %cl, %edx - movl 52(%rsp), %eax - andl %eax, %edx - movl %edx, 52(%rsp) - xorl %eax, %edx - orl 48(%rsp), %edx - movl $0, 48(%rsp) -..B1.10: - testb $-128, 57(%rsp) - jne ..B1.18 -..B1.11: - testl %edx, %edx - je ..B1.18 -..B1.12: - movl %r9d, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.101 -..B1.13: - orl $-64768, %r9d - movw %r9w, 24(%rsp) -..B1.14: - fldcw 24(%rsp) -..B1.15: - fldt 48(%rsp) - lea _ones(%rip), %rax - faddl (%rax) - fstpt (%rsp) -..B1.16: - fldcw 26(%rsp) -..B1.17: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.18: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.19: - testl %r8d, %r8d - jne ..B1.23 -..B1.20: - cmpq $0, 48(%rsp) - jne ..B1.22 -..B1.21: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.22: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 16(%rsp) -..B1.23: - movb 57(%rsp), %al - lea _pone_nzero(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.24: - cmpl $3072, %eax - jne ..B1.35 -..B1.25: - cmpl $16383, %r8d - jl ..B1.30 -..B1.26: - cmpl $16415, %r8d - jl ..B1.28 -..B1.27: - negl %r8d - movl $-1, %eax - addl $30, %r8d - movl %r8d, %ecx - shll %cl, %eax - andl 48(%rsp), %eax - jmp ..B1.29 -..B1.28: - negl %r8d - movl $-1, %eax - addl $30, %r8d - movl %r8d, %ecx - shll %cl, %eax - andl %eax, 52(%rsp) - xorl %eax, %eax -..B1.29: - movl %eax, 48(%rsp) - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.30: - testl %r8d, %r8d - jne ..B1.34 -..B1.31: - cmpl $0, 52(%rsp) - jne ..B1.33 -..B1.32: - cmpl $0, 48(%rsp) - je ..B1.34 -..B1.33: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 16(%rsp) -..B1.34: - movb 57(%rsp), %al - lea _zeros(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.35: - cmpl $16383, %r8d - jl ..B1.69 -..B1.36: - movl 48(%rsp), %esi - cmpl $16414, %r8d - jl ..B1.38 -..B1.37: - movl %esi, %edx - lea 2(%r8), %ecx - shll %cl, %edx - xorl %eax, %eax - jmp ..B1.39 -..B1.38: - movl 52(%rsp), %edx - lea 2(%r8), %ecx - shll %cl, %edx - movl %esi, %eax -..B1.39: - cmpl $16415, %r8d - jl ..B1.41 -..B1.40: - movl %r8d, %ecx - movl $-1, %r10d - negl %ecx - addl $30, %ecx - shll %cl, %r10d - andl %r10d, %esi - movl %esi, 48(%rsp) - jmp ..B1.42 -..B1.41: - movl %r8d, %ecx - movl $-1, %r10d - negl %ecx - xorl %esi, %esi - addl $30, %ecx - shll %cl, %r10d - movl $0, 48(%rsp) - andl %r10d, 52(%rsp) -..B1.42: - testl %edx, %edx - jge ..B1.68 -..B1.43: - andl $2147483647, %edx - orl %eax, %edx - je ..B1.51 -..B1.44: - movl %r9d, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.48 -..B1.45: - orl $-64768, %r9d - movw %r9w, 24(%rsp) -..B1.46: - fldcw 24(%rsp) -..B1.47: - movb $1, %dil -..B1.48: - fldt 48(%rsp) - lea _ones(%rip), %rdx - movb 57(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - testb %dil, %dil - faddl (%rdx,%rcx,8) - fstpt (%rsp) - je ..B1.50 -..B1.49: - fldcw 26(%rsp) -..B1.50: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.51: - cmpl $16415, %r8d - jl ..B1.60 -..B1.52: - negl %r8d - movl $1, %eax - addl $30, %r8d - movl %r8d, %ecx - shll %cl, %eax - testl %eax, %esi - je ..B1.68 -..B1.53: - movl %r9d, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.57 -..B1.54: - orl $-64768, %r9d - movw %r9w, 24(%rsp) -..B1.55: - fldcw 24(%rsp) -..B1.56: - movb $1, %dil -..B1.57: - fldt 48(%rsp) - lea _ones(%rip), %rdx - movb 57(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - testb %dil, %dil - faddl (%rdx,%rcx,8) - fstpt (%rsp) - je ..B1.59 -..B1.58: - fldcw 26(%rsp) -..B1.59: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.60: - negl %r8d - movl $1, %eax - addl $30, %r8d - movl %r8d, %ecx - shll %cl, %eax - testl %eax, 52(%rsp) - je ..B1.68 -..B1.61: - movl %r9d, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.65 -..B1.62: - orl $-64768, %r9d - movw %r9w, 24(%rsp) -..B1.63: - fldcw 24(%rsp) -..B1.64: - movb $1, %dil -..B1.65: - fldt 48(%rsp) - lea _ones(%rip), %rdx - movb 57(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - testb %dil, %dil - faddl (%rdx,%rcx,8) - fstpt (%rsp) - je ..B1.67 -..B1.66: - fldcw 26(%rsp) -..B1.67: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.68: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.69: - cmpl $16382, %r8d - jg ..B1.76 -..B1.70: - je ..B1.102 -..B1.71: - testl %r8d, %r8d - jne ..B1.75 -..B1.72: - cmpl $0, 52(%rsp) - jne ..B1.74 -..B1.73: - cmpl $0, 48(%rsp) - je ..B1.75 -..B1.74: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 16(%rsp) -..B1.75: - movb 57(%rsp), %al - lea _zeros(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.76: - movb 57(%rsp), %al - lea _ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.77: - cmpl $16383, %r8d - jl ..B1.90 -..B1.78: - cmpl $16415, %r8d - jl ..B1.80 -..B1.79: - negl %r8d - movl $-1, %eax - addl $30, %r8d - movl %r8d, %ecx - shll %cl, %eax - movl 48(%rsp), %edx - andl %edx, %eax - movl %eax, 48(%rsp) - xorl %eax, %edx - jmp ..B1.81 -..B1.80: - negl %r8d - movl $-1, %eax - addl $30, %r8d - movl %r8d, %ecx - shll %cl, %eax - movl 52(%rsp), %edx - andl %edx, %eax - xorl %eax, %edx - orl 48(%rsp), %edx - movl %eax, 52(%rsp) - movl $0, 48(%rsp) -..B1.81: - testb $-128, 57(%rsp) - je ..B1.89 -..B1.82: - testl %edx, %edx - je ..B1.89 -..B1.83: - movl %r9d, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.105 -..B1.84: - orl $-64768, %r9d - movw %r9w, 24(%rsp) -..B1.85: - fldcw 24(%rsp) -..B1.86: - fldt 48(%rsp) - lea 8+_ones(%rip), %rax - faddl (%rax) - fstpt (%rsp) -..B1.87: - fldcw 26(%rsp) -..B1.88: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.89: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.90: - testl %r8d, %r8d - jne ..B1.94 -..B1.91: - cmpq $0, 48(%rsp) - jne ..B1.93 -..B1.92: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.93: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 16(%rsp) -..B1.94: - movb 57(%rsp), %al - lea _pzero_none(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.95: - movl %r9d, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.106 -..B1.96: - orl $-64768, %r9d - movw %r9w, 24(%rsp) -..B1.97: - fldcw 24(%rsp) -..B1.98: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.99: - fldcw 26(%rsp) -..B1.100: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.101: - fldt 48(%rsp) - lea _ones(%rip), %rax - faddl (%rax) - fstpt (%rsp) - jmp ..B1.17 -..B1.102: - movl 52(%rsp), %eax - cmpl $-2147483648, %eax - ja ..B1.76 -..B1.103: - jne ..B1.75 -..B1.104: - cmpl $0, 48(%rsp) - ja ..B1.76 - jmp ..B1.75 -..B1.105: - fldt 48(%rsp) - lea 8+_ones(%rip), %rax - faddl (%rax) - fstpt (%rsp) - jmp ..B1.88 -..B1.106: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) - jmp ..B1.100 - .align 16,0x90 - .cfi_endproc - .type nearbyintl,@function - .size nearbyintl,.-nearbyintl - .data -# -- End nearbyintl - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_pone_nzero: - .long 0 - .long 1072693248 - .long 0 - .long 2147483648 - .type _pone_nzero,@object - .size _pone_nzero,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_pzero_none: - .long 0 - .long 0 - .long 0 - .long 3220176896 - .type _pzero_none,@object - .size _pzero_none,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafter_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafter_gen.S deleted file mode 100644 index 9d8d5ea14b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafter_gen.S +++ /dev/null @@ -1,202 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nextafter_gen.c" - .text -..TXTST0: -# -- Begin nextafter - .text - .align 16,0x90 - .globl nextafter -nextafter: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_nextafter.1: -..L2: - - movsd %xmm0, -16(%rsp) - movzwl -10(%rsp), %r8d - andl $32752, %r8d - shrl $4, %r8d - movsd %xmm1, -8(%rsp) - cmpl $2047, %r8d - je ..B1.23 -..B1.2: - movzwl -2(%rsp), %edi - andl $32752, %edi - shrl $4, %edi - cmpl $2047, %edi - je ..B1.20 -..B1.3: - movsd -8(%rsp), %xmm0 - movsd -16(%rsp), %xmm1 - ucomisd %xmm0, %xmm1 - jp ..B1.4 - je ..B1.17 -..B1.4: - movl -12(%rsp), %edx - movl %edx, %eax - andl $2147483647, %eax - orl -16(%rsp), %eax - je ..B1.19 -..B1.5: - movl %edx, %eax - movl -4(%rsp), %ecx - xorl %ecx, %eax - movq -16(%rsp), %rsi - testl $-2147483648, %eax - jne ..B1.11 -..B1.6: - cmpl %edi, %r8d - jg ..B1.11 -..B1.7: - jne ..B1.12 -..B1.8: - andl $1048575, %edx - andl $1048575, %ecx - cmpl %ecx, %edx - jg ..B1.11 -..B1.9: - jne ..B1.12 -..B1.10: - movl -16(%rsp), %eax - cmpl -8(%rsp), %eax - jbe ..B1.12 -..B1.11: - decq %rsi - movq %rsi, -16(%rsp) - jmp ..B1.13 -..B1.12: - incq %rsi - movq %rsi, -16(%rsp) -..B1.13: - movl -12(%rsp), %edx - andl $2147483647, %edx - lea -1048576(%rdx), %eax - cmpl $2145386496, %eax - jb ..B1.18 -..B1.14: - cmpl $1048576, %edx - jae ..B1.16 -..B1.15: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, -24(%rsp) - movsd -16(%rsp), %xmm0 - ret -..B1.16: - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, -24(%rsp) - movsd -16(%rsp), %xmm0 -..B1.17: - ret -..B1.18: - movsd -16(%rsp), %xmm0 - ret -..B1.19: - movb -1(%rsp), %al - lea _small_value_64(%rip), %rdi - andb $-128, %al - lea _smallest_value_64(%rip), %rdx - shrb $7, %al - movsd (%rdi), %xmm0 - mulsd %xmm0, %xmm0 - movzbl %al, %ecx - movsd %xmm0, -24(%rsp) - movq (%rdx,%rcx,8), %rsi - movq %rsi, -16(%rsp) - jmp ..B1.18 -..B1.20: - testl $1048575, -4(%rsp) - jne ..B1.22 -..B1.21: - cmpl $0, -8(%rsp) - je ..B1.3 -..B1.22: - movsd -16(%rsp), %xmm0 - addsd -8(%rsp), %xmm0 - ret -..B1.23: - testl $1048575, -12(%rsp) - jne ..B1.22 -..B1.24: - cmpl $0, -16(%rsp) - jne ..B1.22 - jmp ..B1.2 - .align 16,0x90 - .cfi_endproc - .type nextafter,@function - .size nextafter,.-nextafter - .data -# -- End nextafter - .section .rodata, "a" - .align 4 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafterf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafterf_gen.S deleted file mode 100644 index 7725fa21da..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafterf_gen.S +++ /dev/null @@ -1,182 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nextafterf_gen.c" - .text -..TXTST0: -# -- Begin nextafterf - .text - .align 16,0x90 - .globl nextafterf -nextafterf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_nextafterf.1: -..L2: - - movss %xmm0, -8(%rsp) - movzwl -6(%rsp), %edi - andl $32640, %edi - shrl $7, %edi - movss %xmm1, -16(%rsp) - cmpl $255, %edi - je ..B1.20 -..B1.2: - movzwl -14(%rsp), %esi - andl $32640, %esi - shrl $7, %esi - cmpl $255, %esi - je ..B1.18 -..B1.3: - movss -16(%rsp), %xmm0 - movss -8(%rsp), %xmm1 - ucomiss %xmm0, %xmm1 - jp ..B1.4 - je ..B1.15 -..B1.4: - movl -8(%rsp), %ecx - testl $2147483647, %ecx - je ..B1.17 -..B1.5: - movl %ecx, %eax - movl -16(%rsp), %edx - xorl %edx, %eax - testl $-2147483648, %eax - jne ..B1.9 -..B1.6: - cmpl %esi, %edi - jg ..B1.9 -..B1.7: - jne ..B1.10 -..B1.8: - movl %ecx, %eax - andl $8388607, %edx - andl $8388607, %eax - cmpl %edx, %eax - jle ..B1.10 -..B1.9: - decl %ecx - movl %ecx, -20(%rsp) - jmp ..B1.11 -..B1.10: - incl %ecx - movl %ecx, -20(%rsp) -..B1.11: - andl $2147483647, %ecx - lea -8388608(%rcx), %eax - cmpl $2130706432, %eax - jb ..B1.16 -..B1.12: - cmpl $8388608, %ecx - jae ..B1.14 -..B1.13: - movss .L_2il0floatpacket.0(%rip), %xmm1 - movss %xmm1, -24(%rsp) - movss -24(%rsp), %xmm0 - mulss %xmm0, %xmm1 - movss -20(%rsp), %xmm0 - movss %xmm1, -24(%rsp) - ret -..B1.14: - movss .L_2il0floatpacket.1(%rip), %xmm0 - movss %xmm0, -24(%rsp) - movss -24(%rsp), %xmm1 - mulss %xmm0, %xmm1 - movss -20(%rsp), %xmm0 - movss %xmm1, -24(%rsp) -..B1.15: - ret -..B1.16: - movss -20(%rsp), %xmm0 - ret -..B1.17: - movb -13(%rsp), %al - lea _smallest_value_32(%rip), %rdx - andb $-128, %al - movss .L_2il0floatpacket.0(%rip), %xmm0 - movss %xmm0, -24(%rsp) - shrb $7, %al - movss -24(%rsp), %xmm1 - mulss %xmm0, %xmm1 - movss %xmm1, -24(%rsp) - movzbl %al, %ecx - movl (%rdx,%rcx,4), %esi - movl %esi, -20(%rsp) - jmp ..B1.16 -..B1.18: - testl $8388607, -16(%rsp) - je ..B1.3 -..B1.19: - movss -8(%rsp), %xmm0 - addss -16(%rsp), %xmm0 - ret -..B1.20: - testl $8388607, -8(%rsp) - jne ..B1.19 - jmp ..B1.2 - .align 16,0x90 - .cfi_endproc - .type nextafterf,@function - .size nextafterf,.-nextafterf - .data -# -- End nextafterf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x0d800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_smallest_value_32: - .long 1 - .long 2147483649 - .type _smallest_value_32,@object - .size _smallest_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafterl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafterl.S deleted file mode 100644 index 17e8aa1407..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nextafterl.S +++ /dev/null @@ -1,382 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nextafterl.c" - .text -..TXTST0: -# -- Begin nextafterl - .text - .align 16,0x90 - .globl nextafterl -nextafterl: -# parameter 1: 48 + %rsp -# parameter 2: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_nextafterl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzwl 56(%rsp), %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.53 -..B1.4: - movzwl 72(%rsp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.45 -..B1.5: - fldt 48(%rsp) - fldt 64(%rsp) - fucomi %st(1), %st - jp ..B1.6 - je ..B1.54 -..B1.6: - fstp %st(0) - testl %esi, %esi - jne ..B1.9 -..B1.7: - cmpl $0, 52(%rsp) - jne ..B1.9 -..B1.8: - cmpl $0, 48(%rsp) - je ..B1.44 -..B1.9: - movb 73(%rsp), %al - movb 57(%rsp), %dl - andb $-128, %al - andb $-128, %dl - shrb $7, %al - shrb $7, %dl - fstpt 16(%rsp) - cmpb %dl, %al - jne ..B1.15 -..B1.10: - cmpl %ecx, %esi - jg ..B1.15 -..B1.11: - jne ..B1.29 -..B1.12: - movl 52(%rsp), %eax - movl 68(%rsp), %edx - cmpl %edx, %eax - ja ..B1.15 -..B1.13: - jne ..B1.29 -..B1.14: - movl 48(%rsp), %eax - cmpl 64(%rsp), %eax - jbe ..B1.29 -..B1.15: - movzwl 24(%rsp), %edx - movl %edx, %edi - movl 16(%rsp), %eax - andl $32767, %edi - decl %eax - movl %eax, 16(%rsp) - cmpl $-1, %eax - jne ..B1.34 -..B1.16: - movl 20(%rsp), %eax - decl %eax - testl %edi, %edi - je ..B1.22 -..B1.17: - cmpl $2147483647, %eax - jne ..B1.21 -..B1.18: - decl %edi - andl $-32768, %edx - andl $32767, %edi - orl %edi, %edx - movw %dx, 24(%rsp) - testl %edi, %edi - je ..B1.20 -..B1.19: - movl %edx, %edi - orl $-2147483648, %eax - movl %eax, 20(%rsp) - andl $32767, %edi - jmp ..B1.34 -..B1.20: - movl %edx, %edi - movl %eax, 20(%rsp) - andl $32767, %edi - jmp ..B1.34 -..B1.21: - movl %eax, 20(%rsp) - jmp ..B1.35 -..B1.22: - movl %eax, 20(%rsp) -..B1.23: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.24: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.25: - fldcw 32(%rsp) -..B1.26: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) -..B1.27: - fldcw 34(%rsp) -..B1.28: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.29: - movzwl 24(%rsp), %ecx - movl %ecx, %edi - movl 16(%rsp), %eax - andl $32767, %edi - incl %eax - movl %eax, 16(%rsp) - jne ..B1.33 -..B1.30: - movl $-2147483648, %eax - xorl %edx, %edx - testl %edi, %edi - movl 20(%rsp), %esi - cmove %eax, %edx - incl %esi - cmpl %edx, %esi - jne ..B1.32 -..B1.31: - incl %edi - andl $-32768, %ecx - andl $32767, %edi - orl $-2147483648, %esi - orl %edi, %ecx - movl %ecx, %edi - movl %esi, 20(%rsp) - andl $32767, %edi - movw %cx, 24(%rsp) - jmp ..B1.33 -..B1.32: - movl %esi, 20(%rsp) -..B1.33: - cmpl $32767, %edi - je ..B1.37 -..B1.34: - testl %edi, %edi - je ..B1.23 -..B1.35: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.36: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.28 -..B1.37: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.43 -..B1.38: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.39: - fldcw 32(%rsp) -..B1.40: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) -..B1.41: - fldcw 34(%rsp) -..B1.42: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.43: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.42 -..B1.44: - fstp %st(0) - movb 73(%rsp), %al - lea _smallest_value_80(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - shlq $4, %rcx - fldt (%rdx,%rcx) - movzwl 8(%rdx,%rcx), %edi - fstpt 16(%rsp) - andl $32767, %edi - jmp ..B1.34 -..B1.45: - movq $0x8000000000000000, %rax - cmpq 64(%rsp), %rax - je ..B1.5 -..B1.46: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.52 -..B1.47: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.48: - fldcw 32(%rsp) -..B1.49: - fldt 48(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - fstpt 16(%rsp) -..B1.50: - fldcw 34(%rsp) -..B1.51: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.52: - fldt 48(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.51 -..B1.53: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.46 - jmp ..B1.4 -..B1.54: - fstp %st(1) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type nextafterl,@function - .size nextafterl,.-nextafterl - .data -# -- End nextafterl - .section .rodata, "a" - .align 4 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_smallest_value_80: - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .word 0 - .word 0 - .type _smallest_value_80,@object - .size _smallest_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttoward_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttoward_gen.S deleted file mode 100644 index aa9a7f0e30..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttoward_gen.S +++ /dev/null @@ -1,212 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nexttoward_gen.c" - .text -..TXTST0: -# -- Begin nexttoward - .text - .align 16,0x90 - .globl nexttoward -nexttoward: -# parameter 1: %xmm0 -# parameter 2: 8 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_nexttoward.1: -..L2: - - movsd %xmm0, -8(%rsp) - movzwl -2(%rsp), %eax - andl $32752, %eax - cmpl $32752, %eax - je ..B1.22 -..B1.2: - movzwl 16(%rsp), %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.20 -..B1.3: - fldl -8(%rsp) - fldt 8(%rsp) - fucomi %st(1), %st - jp ..B1.4 - je ..B1.24 -..B1.4: - fstp %st(0) - movl -4(%rsp), %eax - andl $2147483647, %eax - orl -8(%rsp), %eax - je ..B1.19 -..B1.5: - fstpt -24(%rsp) - movb -15(%rsp), %dl - movb 17(%rsp), %al - andb $-128, %dl - andb $-128, %al - shrb $7, %dl - shrb $7, %al - movq -8(%rsp), %rcx - cmpb %dl, %al - jne ..B1.11 -..B1.6: - movzwl -16(%rsp), %eax - andl $32767, %eax - cmpl %esi, %eax - jg ..B1.11 -..B1.7: - jne ..B1.12 -..B1.8: - movl -20(%rsp), %eax - movl 12(%rsp), %edx - cmpl %edx, %eax - ja ..B1.11 -..B1.9: - jne ..B1.12 -..B1.10: - movl -24(%rsp), %eax - cmpl 8(%rsp), %eax - jbe ..B1.12 -..B1.11: - decq %rcx - movq %rcx, -40(%rsp) - jmp ..B1.13 -..B1.12: - incq %rcx - movq %rcx, -40(%rsp) -..B1.13: - movl -36(%rsp), %edx - andl $2147483647, %edx - lea -1048576(%rdx), %eax - cmpl $2145386496, %eax - jb ..B1.18 -..B1.14: - cmpl $1048576, %edx - jae ..B1.16 -..B1.15: - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, -32(%rsp) - movsd -40(%rsp), %xmm0 - ret -..B1.16: - lea _large_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, -32(%rsp) - movsd -40(%rsp), %xmm0 -..B1.17: - ret -..B1.18: - movsd -40(%rsp), %xmm0 - ret -..B1.19: - fstp %st(0) - movb 17(%rsp), %al - lea _small_value_64(%rip), %rdi - andb $-128, %al - lea _smallest_value_64(%rip), %rdx - shrb $7, %al - movsd (%rdi), %xmm0 - mulsd %xmm0, %xmm0 - movzbl %al, %ecx - movsd %xmm0, -32(%rsp) - movq (%rdx,%rcx,8), %rsi - movq %rsi, -40(%rsp) - jmp ..B1.18 -..B1.20: - movq $0x8000000000000000, %rax - cmpq 8(%rsp), %rax - je ..B1.3 -..B1.21: - fldl -8(%rsp) - fldt 8(%rsp) - fmulp %st, %st(1) - fstpl -40(%rsp) - movsd -40(%rsp), %xmm0 - ret -..B1.22: - testl $1048575, -4(%rsp) - jne ..B1.21 -..B1.23: - cmpl $0, -8(%rsp) - jne ..B1.21 - jmp ..B1.2 -..B1.24: - fstp %st(1) - fstpl -40(%rsp) - movsd -40(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type nexttoward,@function - .size nexttoward,.-nexttoward - .data -# -- End nexttoward - .section .rodata, "a" - .align 4 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttowardf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttowardf_gen.S deleted file mode 100644 index cb6ecda6e4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttowardf_gen.S +++ /dev/null @@ -1,201 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nexttowardf_gen.c" - .text -..TXTST0: -# -- Begin nexttowardf - .text - .align 16,0x90 - .globl nexttowardf -nexttowardf: -# parameter 1: %xmm0 -# parameter 2: 8 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_nexttowardf.1: -..L2: - - movss %xmm0, -16(%rsp) - movzwl -14(%rsp), %eax - andl $32640, %eax - cmpl $32640, %eax - je ..B1.22 -..B1.2: - movzwl 16(%rsp), %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.20 -..B1.3: - flds -16(%rsp) - fldt 8(%rsp) - fucomi %st(1), %st - jp ..B1.4 - je ..B1.23 -..B1.4: - fstp %st(0) - movl -16(%rsp), %ecx - testl $2147483647, %ecx - je ..B1.19 -..B1.5: - fstpt -24(%rsp) - movb -15(%rsp), %dl - movb 17(%rsp), %al - andb $-128, %dl - andb $-128, %al - shrb $7, %dl - shrb $7, %al - cmpb %dl, %al - jne ..B1.11 -..B1.6: - movzwl -16(%rsp), %eax - andl $32767, %eax - cmpl %esi, %eax - jg ..B1.11 -..B1.7: - jne ..B1.12 -..B1.8: - movl -20(%rsp), %eax - movl 12(%rsp), %edx - cmpl %edx, %eax - ja ..B1.11 -..B1.9: - jne ..B1.12 -..B1.10: - movl -24(%rsp), %eax - cmpl 8(%rsp), %eax - jbe ..B1.12 -..B1.11: - decl %ecx - movl %ecx, -24(%rsp) - jmp ..B1.13 -..B1.12: - incl %ecx - movl %ecx, -24(%rsp) -..B1.13: - andl $2147483647, %ecx - lea -8388608(%rcx), %eax - cmpl $2130706432, %eax - jb ..B1.18 -..B1.14: - cmpl $8388608, %ecx - jae ..B1.16 -..B1.15: - movss .L_2il0floatpacket.0(%rip), %xmm1 - movss %xmm1, -8(%rsp) - movss -8(%rsp), %xmm0 - mulss %xmm0, %xmm1 - movss -24(%rsp), %xmm0 - movss %xmm1, -8(%rsp) - ret -..B1.16: - movss .L_2il0floatpacket.1(%rip), %xmm0 - movss %xmm0, -8(%rsp) - movss -8(%rsp), %xmm1 - mulss %xmm0, %xmm1 - movss -24(%rsp), %xmm0 - movss %xmm1, -8(%rsp) -..B1.17: - ret -..B1.18: - movss -24(%rsp), %xmm0 - ret -..B1.19: - fstp %st(0) - movb 17(%rsp), %al - lea _smallest_value_32(%rip), %rdx - andb $-128, %al - movss .L_2il0floatpacket.0(%rip), %xmm0 - movss %xmm0, -8(%rsp) - shrb $7, %al - movss -8(%rsp), %xmm1 - mulss %xmm0, %xmm1 - movss %xmm1, -8(%rsp) - movzbl %al, %ecx - movl (%rdx,%rcx,4), %esi - movl %esi, -24(%rsp) - jmp ..B1.18 -..B1.20: - movq $0x8000000000000000, %rax - cmpq 8(%rsp), %rax - je ..B1.3 -..B1.21: - flds -16(%rsp) - fldt 8(%rsp) - fmulp %st, %st(1) - fstps -24(%rsp) - movss -24(%rsp), %xmm0 - ret -..B1.22: - testl $8388607, -16(%rsp) - jne ..B1.21 - jmp ..B1.2 -..B1.23: - fstp %st(1) - fstps -24(%rsp) - movss -24(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type nexttowardf,@function - .size nexttowardf,.-nexttowardf - .data -# -- End nexttowardf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x0d800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_smallest_value_32: - .long 1 - .long 2147483649 - .type _smallest_value_32,@object - .size _smallest_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttowardl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttowardl.S deleted file mode 100644 index 765e2c35bf..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/nexttowardl.S +++ /dev/null @@ -1,382 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "nexttowardl.c" - .text -..TXTST0: -# -- Begin nexttowardl - .text - .align 16,0x90 - .globl nexttowardl -nexttowardl: -# parameter 1: 48 + %rsp -# parameter 2: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_nexttowardl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzwl 56(%rsp), %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.53 -..B1.4: - movzwl 72(%rsp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.45 -..B1.5: - fldt 48(%rsp) - fldt 64(%rsp) - fucomi %st(1), %st - jp ..B1.6 - je ..B1.54 -..B1.6: - fstp %st(0) - testl %esi, %esi - jne ..B1.9 -..B1.7: - cmpl $0, 52(%rsp) - jne ..B1.9 -..B1.8: - cmpl $0, 48(%rsp) - je ..B1.44 -..B1.9: - movb 73(%rsp), %al - movb 57(%rsp), %dl - andb $-128, %al - andb $-128, %dl - shrb $7, %al - shrb $7, %dl - fstpt 16(%rsp) - cmpb %dl, %al - jne ..B1.15 -..B1.10: - cmpl %ecx, %esi - jg ..B1.15 -..B1.11: - jne ..B1.29 -..B1.12: - movl 52(%rsp), %eax - movl 68(%rsp), %edx - cmpl %edx, %eax - ja ..B1.15 -..B1.13: - jne ..B1.29 -..B1.14: - movl 48(%rsp), %eax - cmpl 64(%rsp), %eax - jbe ..B1.29 -..B1.15: - movzwl 24(%rsp), %edx - movl %edx, %edi - movl 16(%rsp), %eax - andl $32767, %edi - decl %eax - movl %eax, 16(%rsp) - cmpl $-1, %eax - jne ..B1.34 -..B1.16: - movl 20(%rsp), %eax - decl %eax - testl %edi, %edi - je ..B1.22 -..B1.17: - cmpl $2147483647, %eax - jne ..B1.21 -..B1.18: - decl %edi - andl $-32768, %edx - andl $32767, %edi - orl %edi, %edx - movw %dx, 24(%rsp) - testl %edi, %edi - je ..B1.20 -..B1.19: - movl %edx, %edi - orl $-2147483648, %eax - movl %eax, 20(%rsp) - andl $32767, %edi - jmp ..B1.34 -..B1.20: - movl %edx, %edi - movl %eax, 20(%rsp) - andl $32767, %edi - jmp ..B1.34 -..B1.21: - movl %eax, 20(%rsp) - jmp ..B1.35 -..B1.22: - movl %eax, 20(%rsp) -..B1.23: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.24: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.25: - fldcw 32(%rsp) -..B1.26: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) -..B1.27: - fldcw 34(%rsp) -..B1.28: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.29: - movzwl 24(%rsp), %ecx - movl %ecx, %edi - movl 16(%rsp), %eax - andl $32767, %edi - incl %eax - movl %eax, 16(%rsp) - jne ..B1.33 -..B1.30: - movl $-2147483648, %eax - xorl %edx, %edx - testl %edi, %edi - movl 20(%rsp), %esi - cmove %eax, %edx - incl %esi - cmpl %edx, %esi - jne ..B1.32 -..B1.31: - incl %edi - andl $-32768, %ecx - andl $32767, %edi - orl $-2147483648, %esi - orl %edi, %ecx - movl %ecx, %edi - movl %esi, 20(%rsp) - andl $32767, %edi - movw %cx, 24(%rsp) - jmp ..B1.33 -..B1.32: - movl %esi, 20(%rsp) -..B1.33: - cmpl $32767, %edi - je ..B1.37 -..B1.34: - testl %edi, %edi - je ..B1.23 -..B1.35: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.36: - lea _small_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.28 -..B1.37: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.43 -..B1.38: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.39: - fldcw 32(%rsp) -..B1.40: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) -..B1.41: - fldcw 34(%rsp) -..B1.42: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.43: - lea _large_value_80(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt (%rsp) - jmp ..B1.42 -..B1.44: - fstp %st(0) - movb 73(%rsp), %al - lea _smallest_value_80(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - shlq $4, %rcx - fldt (%rdx,%rcx) - movzwl 8(%rdx,%rcx), %edi - fstpt 16(%rsp) - andl $32767, %edi - jmp ..B1.34 -..B1.45: - movq $0x8000000000000000, %rax - cmpq 64(%rsp), %rax - je ..B1.5 -..B1.46: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.52 -..B1.47: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.48: - fldcw 32(%rsp) -..B1.49: - fldt 48(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - fstpt 16(%rsp) -..B1.50: - fldcw 34(%rsp) -..B1.51: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.52: - fldt 48(%rsp) - fldt 64(%rsp) - fmulp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.51 -..B1.53: - movq $0x8000000000000000, %rax - cmpq 48(%rsp), %rax - jne ..B1.46 - jmp ..B1.4 -..B1.54: - fstp %st(1) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type nexttowardl,@function - .size nexttowardl,.-nexttowardl - .data -# -- End nexttowardl - .section .rodata, "a" - .align 4 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_smallest_value_80: - .word 1 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 0 - .word 0 - .word 0 - .type _smallest_value_80,@object - .size _smallest_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/pow_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/pow_gen.S deleted file mode 100644 index 5df1c692ec..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/pow_gen.S +++ /dev/null @@ -1,4493 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "pow_gen.c" - .text -..TXTST0: -# -- Begin pow - .text - .align 16,0x90 - .globl pow -pow: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_pow.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movsd %xmm0, 8(%rsp) - movsd %xmm1, 16(%rsp) -..B1.2: - movlpd SIGMASK(%rip), %xmm7 - movlpd ONEMASK(%rip), %xmm2 - andpd %xmm0, %xmm7 - movq %xmm0, %xmm4 - psrlq $44, %xmm0 - pextrw $0, %xmm0, %eax - orpd %xmm2, %xmm7 - pextrw $3, %xmm4, %ecx - andl $255, %eax - addl $1, %eax - andl $510, %eax - lea rcp_t1(%rip), %r8 - mulsd (%r8,%rax,4), %xmm7 - movlpd (%r8,%rax,4), %xmm5 - addl %eax, %eax - lea log2_t1(%rip), %r8 - movapd (%r8,%rax,4), %xmm6 - movl $32751, %edx - subl %ecx, %edx - subl $16, %ecx - orl %edx, %ecx - cmpl $-2147483648, %ecx - jae .L_2TAG_PACKET_0.0.2 - movl $0, %ecx - movl $261759, %edx -.L_2TAG_PACKET_1.0.2: -.L_2TAG_PACKET_2.0.2: - movd %edx, %xmm1 - psubq %xmm1, %xmm0 - psrlq $8, %xmm0 - cvtdq2pd %xmm0, %xmm0 - movlpd HALFSIG(%rip), %xmm1 - movq %xmm7, %xmm3 - psrlq $38, %xmm7 - pextrw $0, %xmm7, %eax - andpd SIGMASK(%rip), %xmm4 - andl $255, %eax - addl $1, %eax - andl $510, %eax - lea rcp_t2(%rip), %r8 - mulsd (%r8,%rax,4), %xmm3 - mulsd (%r8,%rax,4), %xmm5 - addl %eax, %eax - lea log2_t2(%rip), %r8 - addpd (%r8,%rax,4), %xmm6 - orpd ONEMASK(%rip), %xmm4 - addsd %xmm0, %xmm6 - andpd %xmm4, %xmm1 - movq %xmm3, %xmm2 - psrlq $31, %xmm3 - pextrw $0, %xmm3, %eax - movlpd HALFSIG(%rip), %xmm0 - subsd %xmm1, %xmm4 - movlpd LHN(%rip), %xmm7 - andl $511, %eax - addl $1, %eax - andl $1022, %eax - lea rcp_t3(%rip), %r8 - mulsd (%r8,%rax,4), %xmm5 - mulsd (%r8,%rax,4), %xmm2 - lea log2_t3(%rip), %r8 - addpd (%r8,%rax,8), %xmm6 - andpd %xmm5, %xmm0 - subsd %xmm0, %xmm5 - addsd %xmm2, %xmm7 - movq %xmm0, %xmm3 - mulsd %xmm1, %xmm0 - mulsd %xmm5, %xmm1 - mulsd %xmm4, %xmm3 - subsd %xmm0, %xmm2 - mulsd %xmm5, %xmm4 - movq %xmm6, %xmm0 - subsd %xmm1, %xmm2 - addsd %xmm7, %xmm6 - movlpd 16(%rsp), %xmm1 - pextrw $3, %xmm1, %eax - subsd %xmm3, %xmm2 - subsd %xmm6, %xmm0 - movlpd HALFSIG(%rip), %xmm3 - pextrw $3, %xmm6, %edx - subsd %xmm4, %xmm2 - movq %xmm6, %xmm4 - addsd %xmm7, %xmm0 - subsd %xmm2, %xmm7 - subsd %xmm2, %xmm6 - unpcklpd %xmm7, %xmm7 - andl $32752, %eax - cmpl $32752, %eax - jae .L_2TAG_PACKET_3.0.2 - andl $32752, %edx - subl $16368, %eax - addl %edx, %eax - movl $16544, %edx - subl %eax, %edx - subl $15472, %eax - orl %eax, %edx - cmpl $-2147483648, %edx - jae .L_2TAG_PACKET_4.0.2 -.L_2TAG_PACKET_5.0.2: - subsd %xmm6, %xmm4 - subsd %xmm4, %xmm2 - movlpd HALFSIG(%rip), %xmm4 - andpd %xmm1, %xmm3 - andpd %xmm6, %xmm4 - subsd %xmm2, %xmm0 - xorpd %xmm2, %xmm2 - movl $16480, %edx - pinsrw $3, %edx, %xmm2 - movq %xmm3, %xmm5 - mulsd %xmm4, %xmm3 - subsd %xmm4, %xmm6 - subsd %xmm5, %xmm1 - mulsd %xmm2, %xmm3 - mulsd %xmm6, %xmm5 - movapd clv(%rip), %xmm2 - mulsd %xmm1, %xmm4 - cvtsd2si %xmm3, %eax - mulsd %xmm1, %xmm6 - movapd 16+clv(%rip), %xmm1 - addsd %xmm4, %xmm5 - pshufd $238, %xmm6, %xmm4 - addsd %xmm6, %xmm5 - movl $130943, %edx - subl %eax, %edx - addl $123391, %eax - orl %eax, %edx - subl $123391, %eax - cmpl $0, %edx - jle .L_2TAG_PACKET_6.0.2 - addl %eax, %ecx - andl $127, %eax - andl $-128, %ecx - addl $130944, %ecx - addsd %xmm0, %xmm4 - movq %xmm3, %xmm0 - addsd Shifter(%rip), %xmm3 - mulpd %xmm7, %xmm2 - subsd Shifter(%rip), %xmm3 - mulpd %xmm7, %xmm7 - subsd %xmm3, %xmm0 - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - lea exp2_tbl(%rip), %r8 - movapd (%r8,%rax), %xmm3 - movapd cev(%rip), %xmm6 - mulpd %xmm7, %xmm1 - addpd %xmm1, %xmm2 - pshufd $238, %xmm2, %xmm1 - mulsd %xmm7, %xmm2 - xorpd %xmm7, %xmm7 - movl $16256, %edx - addsd %xmm1, %xmm2 - pinsrw $3, %edx, %xmm7 - addsd %xmm4, %xmm2 - movlpd 32+cev(%rip), %xmm4 - movd %ecx, %xmm1 - mulsd 16(%rsp), %xmm2 - mulsd %xmm7, %xmm0 - psllq $45, %xmm1 - pshufd $68, %xmm1, %xmm1 - movapd 16+cev(%rip), %xmm7 - addsd %xmm2, %xmm5 - addsd %xmm5, %xmm0 - unpcklpd %xmm0, %xmm0 - mulpd %xmm0, %xmm6 - mulsd %xmm0, %xmm4 - pshufd $238, %xmm3, %xmm5 - mulpd %xmm0, %xmm0 - addpd %xmm6, %xmm7 - mulpd %xmm0, %xmm7 - mulsd %xmm3, %xmm0 - pshufd $238, %xmm7, %xmm6 - mulsd %xmm7, %xmm0 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm4 - addsd %xmm5, %xmm0 - addsd %xmm6, %xmm0 - addsd %xmm4, %xmm0 - addsd %xmm3, %xmm0 - mulsd %xmm1, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - movlpd 16(%rsp), %xmm1 - movlpd ABSVALMASK(%rip), %xmm3 - movd %xmm1, %eax - movq %xmm1, %xmm2 - andpd %xmm3, %xmm1 - psrlq $32, %xmm1 - movd %xmm1, %ecx - cmpl $2146435072, %ecx - jae .L_2TAG_PACKET_7.0.2 - orl %ecx, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_8.0.2 - cmpl $0, %edx - jge .L_2TAG_PACKET_9.0.2 - negl %edx - addl $32751, %edx - psllq $52, %xmm3 - orpd %xmm3, %xmm2 - movl $1011, %ecx - movd %ecx, %xmm3 - psrlq $20, %xmm1 - psubd %xmm3, %xmm1 - pxor %xmm3, %xmm3 - pmaxsw %xmm3, %xmm1 - psllq %xmm1, %xmm2 - pcmpeqd %xmm3, %xmm2 - pmovmskb %xmm2, %eax - movl %edx, %ecx - andl $32767, %edx - cmpl $32752, %edx - jae .L_2TAG_PACKET_10.0.2 - andl $255, %eax - cmpl $255, %eax - jne .L_2TAG_PACKET_11.0.2 - movlpd 16(%rsp), %xmm1 - movlpd 16(%rsp), %xmm2 - movl $1012, %ecx - movd %ecx, %xmm3 - andpd ABSVALMASK(%rip), %xmm1 - psrlq $52, %xmm1 - psubd %xmm3, %xmm1 - movlpd NEG_ZERO(%rip), %xmm3 - psllq %xmm1, %xmm2 - pcmpeqd %xmm3, %xmm2 - pmovmskb %xmm2, %eax - andl $255, %eax - movl $261889, %ecx - addl %eax, %ecx - andl $262144, %ecx - cmpl $16, %edx - jb .L_2TAG_PACKET_12.0.2 - movl $786047, %edx - movlpd SIGMASK(%rip), %xmm3 - movlpd ONEMASK(%rip), %xmm2 - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_7.0.2: - movlpd 8(%rsp), %xmm7 - movlpd 8(%rsp), %xmm4 - movd %xmm7, %edx - psrlq $32, %xmm7 - movd %xmm7, %eax - movl %eax, %ecx - andl $2147483647, %eax - cmpl $2146435072, %eax - jb .L_2TAG_PACKET_13.0.2 - ja .L_2TAG_PACKET_14.0.2 - cmpl $0, %edx - ja .L_2TAG_PACKET_14.0.2 - jmp .L_2TAG_PACKET_13.0.2 -.L_2TAG_PACKET_9.0.2: - movl $0, %ecx -.L_2TAG_PACKET_12.0.2: - xorpd %xmm0, %xmm0 - movl $17392, %eax - pinsrw $3, %eax, %xmm0 - movlpd SIGMASK(%rip), %xmm7 - movlpd ONEMASK(%rip), %xmm2 - mulsd %xmm4, %xmm0 - movd %xmm4, %edx - psrlq $32, %xmm4 - movd %xmm4, %eax - cmpl $0, %edx - je .L_2TAG_PACKET_15.0.2 - movq 16(%rsp), %xmm4 - pextrw $3, %xmm4, %eax - andl $49152, %eax - cmpl $16384, %eax - je .L_2TAG_PACKET_16.0.2 -.L_2TAG_PACKET_17.0.2: - andpd %xmm0, %xmm7 - movq %xmm0, %xmm4 - andpd ABSVALMASK(%rip), %xmm0 - psrlq $44, %xmm0 - pextrw $0, %xmm0, %eax - orpd %xmm2, %xmm7 - andl $255, %eax - addl $1, %eax - andl $510, %eax - lea rcp_t1(%rip), %r8 - mulsd (%r8,%rax,4), %xmm7 - movlpd (%r8,%rax,4), %xmm5 - addl %eax, %eax - lea log2_t1(%rip), %r8 - movapd (%r8,%rax,4), %xmm6 - movl $278143, %edx - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_15.0.2: - movl %eax, %edx - andl $2147483647, %edx - cmpl $0, %edx - jne .L_2TAG_PACKET_17.0.2 - movl 20(%rsp), %edx - andl $-2147483648, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_18.0.2 - shll $13, %ecx - andl %ecx, %eax - movl $2146435072, %edx - orl %eax, %edx - movd %edx, %xmm0 - psllq $32, %xmm0 - movlpd ONEMASK(%rip), %xmm1 - movlpd 8(%rsp), %xmm2 - divsd %xmm2, %xmm1 -.L_2TAG_PACKET_19.0.2: - movl $27, (%rsp) - jmp .L_2TAG_PACKET_20.0.2 -.L_2TAG_PACKET_18.0.2: - shll $13, %ecx - andl %ecx, %eax - cmpl $0, %eax - jne .L_2TAG_PACKET_21.0.2 - pxor %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_10.0.2: - movlpd SIGMASK(%rip), %xmm3 - xorpd %xmm1, %xmm1 - andpd %xmm4, %xmm3 - pcmpeqd %xmm3, %xmm1 - pmovmskb %xmm1, %ecx - andl $255, %ecx - cmpl $255, %ecx - jne .L_2TAG_PACKET_14.0.2 - pextrw $3, %xmm4, %ecx - andl $32768, %ecx - cmpl $0, %ecx - je .L_2TAG_PACKET_22.0.2 - andl $255, %eax - cmpl $255, %eax - jne .L_2TAG_PACKET_23.0.2 - movlpd 16(%rsp), %xmm1 - movlpd 16(%rsp), %xmm2 - movl $1012, %ecx - movd %ecx, %xmm3 - andpd ABSVALMASK(%rip), %xmm1 - psrlq $52, %xmm1 - psubd %xmm3, %xmm1 - pxor %xmm3, %xmm3 - psllq %xmm1, %xmm2 - pcmpeqd %xmm3, %xmm2 - pmovmskb %xmm2, %eax - andl $255, %eax - cmpl $255, %eax - je .L_2TAG_PACKET_23.0.2 - movlpd 16(%rsp), %xmm1 - pextrw $3, %xmm1, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_24.0.2 -.L_2TAG_PACKET_21.0.2: - movq NEG_ZERO(%rip), %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_24.0.2: - movq NEG_INF(%rip), %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_23.0.2: - movlpd 16(%rsp), %xmm1 - pextrw $3, %xmm1, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_25.0.2 - pxor %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_22.0.2: - movlpd 16(%rsp), %xmm1 - pextrw $3, %xmm1, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_25.0.2 - pxor %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_14.0.2: - addsd %xmm4, %xmm4 - movq %xmm4, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_11.0.2: - movlpd 8(%rsp), %xmm2 - movd %xmm2, %eax - psrlq $32, %xmm2 - movd %xmm2, %edx - andl $2147483647, %edx - orl %edx, %eax - movl $0, %ecx - cmpl $0, %eax - je .L_2TAG_PACKET_15.0.2 - movlpd sNaN(%rip), %xmm0 - mulsd %xmm0, %xmm0 - movl $28, (%rsp) - jmp .L_2TAG_PACKET_20.0.2 -.L_2TAG_PACKET_3.0.2: - movlpd 8(%rsp), %xmm4 - movlpd 16(%rsp), %xmm2 - movd %xmm4, %eax - cmpl $0, %eax - jne .L_2TAG_PACKET_13.0.2 - psrlq $32, %xmm4 - movd %xmm4, %edx - cmpl $1072693248, %edx - je .L_2TAG_PACKET_26.0.2 - cmpl $-1074790400, %edx - jne .L_2TAG_PACKET_13.0.2 - movlpd SIGMASK(%rip), %xmm3 - xorpd %xmm1, %xmm1 - andpd %xmm2, %xmm3 - pcmpeqd %xmm3, %xmm1 - pmovmskb %xmm1, %eax - cmpl $255, %eax - jne .L_2TAG_PACKET_27.0.2 - movq ONEMASK(%rip), %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_13.0.2: - movlpd SIGMASK(%rip), %xmm3 - xorpd %xmm1, %xmm1 - andpd %xmm2, %xmm3 - pcmpeqd %xmm3, %xmm1 - pmovmskb %xmm1, %eax - andl $255, %eax - cmpl $255, %eax - jne .L_2TAG_PACKET_27.0.2 - pextrw $3, %xmm2, %eax - movlpd 8(%rsp), %xmm4 - andl $32768, %eax - xorl $-1074790400, %ecx - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_26.0.2 - cmpl $0, %eax - je .L_2TAG_PACKET_28.0.2 - pextrw $3, %xmm4, %eax - andl $32752, %eax - cmpl $16368, %eax - jae .L_2TAG_PACKET_29.0.2 - movd %xmm4, %eax - psrlq $32, %xmm4 - movd %xmm4, %edx - andl $2147483647, %edx - orl %eax, %edx - cmpl $0, %edx - jne .L_2TAG_PACKET_25.0.2 - xorpd %xmm1, %xmm1 - xorpd %xmm4, %xmm4 - movl $16368, %eax - pinsrw $3, %eax, %xmm1 - divsd %xmm4, %xmm1 - movq %xmm1, %xmm0 - jmp .L_2TAG_PACKET_19.0.2 -.L_2TAG_PACKET_29.0.2: - pxor %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_28.0.2: - pextrw $3, %xmm4, %eax - andl $32752, %eax - cmpl $16368, %eax - jae .L_2TAG_PACKET_25.0.2 - pxor %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_25.0.2: - movq INF(%rip), %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_27.0.2: - addsd %xmm2, %xmm2 - movq %xmm2, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_30.0.2: - movl $26, (%rsp) - jmp .L_2TAG_PACKET_20.0.2 -.L_2TAG_PACKET_31.0.2: - movl $29, (%rsp) - jmp .L_2TAG_PACKET_20.0.2 -.L_2TAG_PACKET_8.0.2: - movd %xmm4, %eax - psrlq $32, %xmm4 - movd %xmm4, %edx - andl $2147483647, %edx - movl %eax, %ecx - orl %edx, %eax - movlpd ONEMASK(%rip), %xmm0 - cmpl $0, %eax - je .L_2TAG_PACKET_30.0.2 - movd %xmm4, %eax - andl $2147483647, %eax - cmpl $2146435072, %eax - ja .L_2TAG_PACKET_31.0.2 - jb .L_2TAG_PACKET_32.0.2 - cmpl $0, %ecx - ja .L_2TAG_PACKET_31.0.2 -.L_2TAG_PACKET_32.0.2: -.L_2TAG_PACKET_26.0.2: - movq ONEMASK(%rip), %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_33.0.2: - movl $24, (%rsp) - jmp .L_2TAG_PACKET_20.0.2 -.L_2TAG_PACKET_34.0.2: - movl $25, (%rsp) - jmp .L_2TAG_PACKET_20.0.2 -.L_2TAG_PACKET_6.0.2: - cmpl $0, %eax - jle .L_2TAG_PACKET_35.0.2 - cmpl $262144, %eax - jae .L_2TAG_PACKET_36.0.2 - movl %eax, %edx - andl $127, %eax - addl $261888, %ecx - subl $128, %edx - andl $-128, %edx - movl $16368, %edi - jmp .L_2TAG_PACKET_37.0.2 -.L_2TAG_PACKET_35.0.2: - cmpl $-261632, %eax - jle .L_2TAG_PACKET_16.0.2 - movl %eax, %edx - andl $127, %eax - addl $128, %ecx - andl $-128, %edx - addl $261760, %edx - movl $0, %edi -.L_2TAG_PACKET_37.0.2: - addsd %xmm0, %xmm4 - movq %xmm3, %xmm0 - addsd Shifter(%rip), %xmm3 - movl %edx, %esi - subl $130944, %esi - mulpd %xmm7, %xmm2 - subsd Shifter(%rip), %xmm3 - mulpd %xmm7, %xmm7 - subsd %xmm3, %xmm0 - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - addl %eax, %eax - lea exp2_tbl(%rip), %r8 - movapd (%r8,%rax), %xmm3 - movapd cev(%rip), %xmm6 - mulpd %xmm7, %xmm1 - addpd %xmm1, %xmm2 - pshufd $238, %xmm2, %xmm1 - mulsd %xmm7, %xmm2 - addsd %xmm1, %xmm2 - addsd %xmm4, %xmm2 - movlpd 32+cev(%rip), %xmm4 - movd %edx, %xmm1 - subl $130944, %edx - negl %edx - sarl $7, %edx - addl $2, %edx - movl %edx, %eax - andl $32, %eax - addl %eax, %edx - xorpd %xmm7, %xmm7 - movl $16256, %eax - pinsrw $3, %eax, %xmm7 - mulsd 16(%rsp), %xmm2 - mulsd %xmm7, %xmm0 - psllq $45, %xmm1 - pshufd $68, %xmm1, %xmm1 - movapd 16+cev(%rip), %xmm7 - addsd %xmm2, %xmm5 - mulpd %xmm1, %xmm3 - addsd %xmm5, %xmm0 - unpcklpd %xmm0, %xmm0 - mulpd %xmm0, %xmm6 - mulsd %xmm0, %xmm4 - mulpd %xmm0, %xmm0 - addpd %xmm6, %xmm7 - mulpd %xmm0, %xmm7 - mulsd %xmm3, %xmm0 - pshufd $238, %xmm7, %xmm6 - mulsd %xmm7, %xmm0 - pshufd $238, %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm4 - movd %ecx, %xmm7 - psllq $45, %xmm7 - movd %edx, %xmm2 - pcmpeqd %xmm1, %xmm1 - psllq %xmm2, %xmm1 - addsd %xmm5, %xmm0 - addsd %xmm6, %xmm0 - andpd %xmm3, %xmm1 - addsd %xmm4, %xmm0 - xorpd %xmm6, %xmm6 - pcmpeqd %xmm4, %xmm4 - psllq %xmm2, %xmm4 - subsd %xmm1, %xmm3 - movq %xmm1, %xmm2 - addsd %xmm0, %xmm1 - andpd %xmm4, %xmm1 - pinsrw $3, %edi, %xmm6 - subsd %xmm1, %xmm2 - addsd %xmm2, %xmm0 - addsd %xmm3, %xmm0 - cmpl $0, %esi - jge .L_2TAG_PACKET_38.0.2 - mulsd %xmm7, %xmm0 - mulsd %xmm7, %xmm1 - addsd %xmm1, %xmm0 - mulsd %xmm0, %xmm6 - addsd %xmm6, %xmm0 - pextrw $3, %xmm0, %eax - andl $32752, %eax - cmpl $32752, %eax - je .L_2TAG_PACKET_33.0.2 - cmpl $0, %eax - je .L_2TAG_PACKET_34.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_38.0.2: - addsd %xmm1, %xmm0 - mulsd %xmm7, %xmm0 - mulsd %xmm0, %xmm6 - addsd %xmm6, %xmm0 - pextrw $3, %xmm0, %eax - andl $32752, %eax - cmpl $32752, %eax - je .L_2TAG_PACKET_33.0.2 - cmpl $0, %eax - je .L_2TAG_PACKET_39.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_39.0.2: - xorpd %xmm2, %xmm2 - movl $1, %eax - movd %eax, %xmm2 - mulsd %xmm2, %xmm2 - jmp .L_2TAG_PACKET_34.0.2 -.L_2TAG_PACKET_16.0.2: - movlpd EMIN(%rip), %xmm0 - movd %ecx, %xmm1 - mulsd %xmm0, %xmm0 - psllq $45, %xmm1 - orpd %xmm1, %xmm0 - jmp .L_2TAG_PACKET_34.0.2 -.L_2TAG_PACKET_36.0.2: - xorpd %xmm1, %xmm1 - movl $32751, %eax - pinsrw $3, %eax, %xmm1 - mulsd %xmm1, %xmm1 - cmpl $0, %ecx - je .L_2TAG_PACKET_40.0.2 - movlpd NEG_INF(%rip), %xmm0 - jmp .L_2TAG_PACKET_33.0.2 -.L_2TAG_PACKET_40.0.2: - movlpd INF(%rip), %xmm0 - jmp .L_2TAG_PACKET_33.0.2 -.L_2TAG_PACKET_41.0.2: - movlpd 8(%rsp), %xmm4 - pextrw $3, %xmm4, %edx - andl $32752, %edx - subl $16368, %edx - pextrw $3, %xmm1, %eax - xorl %edx, %eax - andl $32768, %eax - cmpl $0, %eax - jne .L_2TAG_PACKET_16.0.2 - jmp .L_2TAG_PACKET_36.0.2 -.L_2TAG_PACKET_4.0.2: - pshufd $68, %xmm1, %xmm4 - mulpd %xmm6, %xmm4 - pextrw $3, %xmm4, %eax - andl $32752, %eax - movl $16544, %edx - subl %eax, %edx - subl $15472, %eax - orl %eax, %edx - cmpl $-2147483648, %edx - jb .L_2TAG_PACKET_5.0.2 - cmpl $-2147483648, %eax - jb .L_2TAG_PACKET_41.0.2 - orl $130944, %ecx - movd %ecx, %xmm0 - psllq $45, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_20.0.2: - movq %xmm0, 24(%rsp) -..B1.3: - movq 24(%rsp), %xmm0 -.L_2TAG_PACKET_42.0.2: -..B1.5: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type pow,@function - .size pow,.-pow - .data -# -- End pow - .section .rodata, "a" - .align 16 - .align 16 -SIGMASK: - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 1048575 - .type SIGMASK,@object - .size SIGMASK,16 - .align 16 -ONEMASK: - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .type ONEMASK,@object - .size ONEMASK,16 - .align 16 -log2_t1: - .long 0 - .long 0 - .long 0 - .long 0 - .long 1641152512 - .long 1065811444 - .long 1188689655 - .long 1027383036 - .long 830078976 - .long 1066853925 - .long 1683363035 - .long 1027948302 - .long 2542927872 - .long 1067522658 - .long 3621009110 - .long 1028493916 - .long 2686386176 - .long 1067891457 - .long 1949948784 - .long 1027381598 - .long 1667006464 - .long 1068256947 - .long 3184186889 - .long 1028293010 - .long 2150858752 - .long 1068558987 - .long 2486115301 - .long 1028528023 - .long 1655242752 - .long 1068739056 - .long 773151300 - .long 1026560495 - .long 1341652992 - .long 1068918120 - .long 2376679343 - .long 1026589938 - .long 861732864 - .long 1069095356 - .long 3976461951 - .long 1025794178 - .long 3619700736 - .long 1069270713 - .long 1113925208 - .long 1027979240 - .long 3789324288 - .long 1069445746 - .long 590586460 - .long 1028271785 - .long 2182004736 - .long 1069583575 - .long 297009670 - .long 1026900933 - .long 976470016 - .long 1069669519 - .long 2876077132 - .long 1027955084 - .long 665796608 - .long 1069755258 - .long 4251263665 - .long 1023912865 - .long 1282670592 - .long 1069839958 - .long 614174576 - .long 1028506527 - .long 1687183360 - .long 1069924424 - .long 2120169064 - .long 1026082260 - .long 4017643520 - .long 1070008228 - .long 1495131896 - .long 1028622058 - .long 4207116288 - .long 1070091353 - .long 1370573431 - .long 1027824851 - .long 1789706240 - .long 1070173781 - .long 3512135184 - .long 1026825352 - .long 53207040 - .long 1070255920 - .long 3737096549 - .long 1026438963 - .long 330194944 - .long 1070337330 - .long 2978734829 - .long 1028330940 - .long 3604373504 - .long 1070418425 - .long 3265342761 - .long 1026602327 - .long 2318204928 - .long 1070498761 - .long 3507296498 - .long 1027877621 - .long 3818315776 - .long 1070578756 - .long 677794871 - .long 1028109305 - .long 154591232 - .long 1070627028 - .long 135420162 - .long 1027142134 - .long 632459264 - .long 1070666446 - .long 256228069 - .long 1027376412 - .long 2011426816 - .long 1070705675 - .long 184843939 - .long 1027577616 - .long 2429726720 - .long 1070744485 - .long 3907638365 - .long 1027382133 - .long 2912112640 - .long 1070783319 - .long 596296254 - .long 1022964981 - .long 3197370368 - .long 1070821720 - .long 1122235614 - .long 1028265681 - .long 1147121664 - .long 1070859908 - .long 1274805357 - .long 1028037537 - .long 2702757888 - .long 1070897876 - .long 1929563301 - .long 1027984695 - .long 3792781312 - .long 1070935387 - .long 260587083 - .long 1027244900 - .long 1736605696 - .long 1070972899 - .long 1038777690 - .long 1028224348 - .long 2490597376 - .long 1071010174 - .long 574252996 - .long 1028557352 - .long 2465140736 - .long 1071047207 - .long 243175481 - .long 1026641700 - .long 2144403456 - .long 1071083992 - .long 835940059 - .long 1025870511 - .long 1797877760 - .long 1071120523 - .long 2362104182 - .long 1024853432 - .long 1487233024 - .long 1071156794 - .long 1462661599 - .long 1025546239 - .long 2657701888 - .long 1071193041 - .long 3841377895 - .long 1028504382 - .long 2881359872 - .long 1071229019 - .long 174174934 - .long 1028491418 - .long 1607143424 - .long 1071264722 - .long 3643575766 - .long 1028610165 - .long 2395561984 - .long 1071300143 - .long 2430782595 - .long 1027372849 - .long 658427904 - .long 1071335525 - .long 161357664 - .long 1028306250 - .long 242749440 - .long 1071370366 - .long 470667040 - .long 1025936066 - .long 3127775232 - .long 1071405408 - .long 2529919486 - .long 1027847357 - .long 2341548032 - .long 1071440150 - .long 89987554 - .long 1026534819 - .long 539168768 - .long 1071474585 - .long 2531816708 - .long 1025043792 - .long 234864640 - .long 1071508706 - .long 753765034 - .long 1027859052 - .long 2905993216 - .long 1071542763 - .long 3767440865 - .long 1023481353 - .long 3544465408 - .long 1071576755 - .long 756421882 - .long 1027650395 - .long 2658430976 - .long 1071610420 - .long 2178519328 - .long 1028288112 - .long 2660024320 - .long 1071644012 - .long 780560797 - .long 1023043397 - .long 2121920512 - .long 1071660969 - .long 3880750062 - .long 1025990162 - .long 2371102720 - .long 1071677556 - .long 2026769115 - .long 1027312699 - .long 1355743232 - .long 1071694102 - .long 3943781029 - .long 1028003666 - .long 649166848 - .long 1071710472 - .long 2315768408 - .long 1028563913 - .long 3712673792 - .long 1071726796 - .long 427741889 - .long 1025493722 - .long 1031030784 - .long 1071743075 - .long 132151873 - .long 1025660183 - .long 1854838784 - .long 1071759170 - .long 1812291413 - .long 1027042047 - .long 1572052992 - .long 1071775215 - .long 2231490673 - .long 1027883742 - .long 3357544448 - .long 1071791208 - .long 2435425658 - .long 1025969268 - .long 2690285568 - .long 1071807011 - .long 816977062 - .long 1028436202 - .long 473251840 - .long 3218771869 - .long 1330616403 - .long 3175482613 - .long 2934157312 - .long 3218740486 - .long 3685911680 - .long 3175415699 - .long 2326081536 - .long 3218709220 - .long 4062709 - .long 3171839703 - .long 1474240512 - .long 3218678073 - .long 3223011199 - .long 3174963306 - .long 2315530240 - .long 3218647330 - .long 3482179715 - .long 3175726112 - .long 3209805824 - .long 3218616430 - .long 1850213782 - .long 3175467046 - .long 92246016 - .long 3218585658 - .long 2672047941 - .long 3174429943 - .long 939302912 - .long 3218555302 - .long 2683312141 - .long 3175097844 - .long 3886694400 - .long 3218525081 - .long 3584491562 - .long 3175164762 - .long 3897806848 - .long 3218494709 - .long 2353689255 - .long 3175401216 - .long 2446540800 - .long 3218464767 - .long 3549477525 - .long 3175044174 - .long 863473664 - .long 3218434969 - .long 834332530 - .long 3174636992 - .long 1568866304 - .long 3218405023 - .long 3528175174 - .long 3174626157 - .long 558092288 - .long 3218375520 - .long 2586999089 - .long 3168836697 - .long 2316124160 - .long 3218346169 - .long 686294058 - .long 3172297276 - .long 3825598464 - .long 3218316675 - .long 1136723030 - .long 3175382806 - .long 4172640256 - .long 3218287637 - .long 3760034353 - .long 3171774178 - .long 143781888 - .long 3218258460 - .long 1815979570 - .long 3174536455 - .long 2912956416 - .long 3218229746 - .long 4273313359 - .long 3173677065 - .long 1821376512 - .long 3218200896 - .long 1051181106 - .long 3175433943 - .long 3545214976 - .long 3218172213 - .long 881689764 - .long 3173077446 - .long 977260544 - .long 3218144009 - .long 607141 - .long 3173756076 - .long 2363125760 - .long 3218115672 - .long 1333321633 - .long 3175335724 - .long 2364801024 - .long 3218087202 - .long 3356747073 - .long 3174852978 - .long 2121375744 - .long 3218038698 - .long 549802689 - .long 3174897014 - .long 155041792 - .long 3217983102 - .long 4093639872 - .long 3174461350 - .long 4268572672 - .long 3217927248 - .long 3146719241 - .long 3173737604 - .long 3896410112 - .long 3217871768 - .long 3834824761 - .long 3171284429 - .long 492560384 - .long 3217816668 - .long 239252792 - .long 3173483664 - .long 4219723776 - .long 3217761952 - .long 3911150007 - .long 3175766937 - .long 1522245632 - .long 3217706989 - .long 2153956895 - .long 3175454574 - .long 3796140032 - .long 3217653061 - .long 1733676290 - .long 3175095395 - .long 155754496 - .long 3217598893 - .long 1693604437 - .long 3175909818 - .long 2753691648 - .long 3217544480 - .long 3490227517 - .long 3173083716 - .long 3246325760 - .long 3217491126 - .long 1834407662 - .long 3175168640 - .long 2629189632 - .long 3217437536 - .long 394182940 - .long 3174297893 - .long 4285202432 - .long 3217384365 - .long 127148739 - .long 3175942199 - .long 2197757952 - .long 3217331621 - .long 326147828 - .long 3175005587 - .long 623484928 - .long 3217278646 - .long 2190917468 - .long 3175273136 - .long 1792204800 - .long 3217226104 - .long 3259512355 - .long 3174781320 - .long 41181184 - .long 3217174003 - .long 3260046653 - .long 3174058211 - .long 1413185536 - .long 3217121676 - .long 2746620881 - .long 3175463126 - .long 2720399360 - .long 3217069797 - .long 590176758 - .long 3175866008 - .long 1549172736 - .long 3217005579 - .long 3081069142 - .long 3175953539 - .long 2465087488 - .long 3216902292 - .long 4241850246 - .long 3175110025 - .long 3847749632 - .long 3216799930 - .long 59228567 - .long 3174380829 - .long 4210442240 - .long 3216698507 - .long 2884243012 - .long 3174896587 - .long 1231667200 - .long 3216596658 - .long 2996426567 - .long 3174508538 - .long 1101037568 - .long 3216495763 - .long 3170347605 - .long 3176066808 - .long 2861760512 - .long 3216395836 - .long 52313802 - .long 3174148818 - .long 3538583552 - .long 3216295495 - .long 291262391 - .long 3169534916 - .long 2493661184 - .long 3216196139 - .long 979886872 - .long 3175226185 - .long 3478798336 - .long 3216096373 - .long 329155479 - .long 3175972274 - .long 4175200256 - .long 3215997608 - .long 3920581672 - .long 3172282657 - .long 4103045120 - .long 3215814286 - .long 1366711740 - .long 3174574396 - .long 3613917184 - .long 3215617982 - .long 3682391844 - .long 3173719142 - .long 3246555136 - .long 3215423741 - .long 4071576370 - .long 3174315914 - .long 575995904 - .long 3215228718 - .long 2479189453 - .long 3173663302 - .long 2771812352 - .long 3215032905 - .long 1608471371 - .long 3175357197 - .long 3995074560 - .long 3214744373 - .long 766833229 - .long 3175292855 - .long 830078976 - .long 3214361213 - .long 1258533011 - .long 3175547121 - .long 219152384 - .long 3213976530 - .long 1716511551 - .long 3175540921 - .long 1290797056 - .long 3213306911 - .long 1477436787 - .long 3173730612 - .long 1836580864 - .long 3212249540 - .long 1456335140 - .long 3175441338 - .long 0 - .long 0 - .long 0 - .long 0 - .type log2_t1,@object - .size log2_t1,2064 - .align 16 -log2_t2: - .long 0 - .long 0 - .long 0 - .long 0 - .long 2088763392 - .long 1059147817 - .long 4130365781 - .long 1025575177 - .long 3758096384 - .long 1060385579 - .long 3761435677 - .long 1024020876 - .long 1623195648 - .long 1061142175 - .long 1460419383 - .long 1028311484 - .long 2740977664 - .long 1061528887 - .long 1629990790 - .long 1027810560 - .long 3418357760 - .long 1061907277 - .long 3164482262 - .long 1027367455 - .long 372244480 - .long 1062246601 - .long 749537322 - .long 1027570412 - .long 1678770176 - .long 1062435842 - .long 1420381118 - .long 1028382503 - .long 3506438144 - .long 1062625106 - .long 2539787500 - .long 1028059273 - .long 1584398336 - .long 1062814394 - .long 4277851274 - .long 1025918452 - .long 230686720 - .long 1063003705 - .long 2279601279 - .long 1027165899 - .long 3765436416 - .long 1063193038 - .long 1648733663 - .long 1027693874 - .long 3958898688 - .long 1063319229 - .long 3585544732 - .long 1028203366 - .long 4208984064 - .long 1063413919 - .long 395326031 - .long 1026777160 - .long 2644508672 - .long 1063508621 - .long 3080139365 - .long 1026686561 - .long 3572498432 - .long 1063603334 - .long 3213016626 - .long 1028477442 - .long 2711093248 - .long 1063698059 - .long 439612993 - .long 1027235725 - .long 71303168 - .long 1063792796 - .long 847494235 - .long 1028613481 - .long 4256169984 - .long 1063887543 - .long 1915821278 - .long 1028326816 - .long 2392850432 - .long 1063982303 - .long 2225307780 - .long 1026401230 - .long 3082813440 - .long 1064077074 - .long 3438929084 - .long 1027103624 - .long 2043674624 - .long 1064171857 - .long 2082386238 - .long 1027684439 - .long 3582459904 - .long 1064266651 - .long 1897021122 - .long 1028567773 - .long 3855876096 - .long 1064333048 - .long 1828790394 - .long 1028459899 - .long 2926837760 - .long 1064380457 - .long 4113329424 - .long 1027931731 - .long 1157627904 - .long 1064427872 - .long 1702728849 - .long 1027539743 - .long 2849243136 - .long 1064475292 - .long 981368224 - .long 1027987814 - .long 3713007616 - .long 1064522718 - .long 3588215231 - .long 1027706406 - .long 3754950656 - .long 1064570150 - .long 2599429676 - .long 1027136642 - .long 2981101568 - .long 1064617588 - .long 3033621989 - .long 1027640910 - .long 1397751808 - .long 1064665032 - .long 1866428510 - .long 1026593332 - .long 3305635840 - .long 1064712481 - .long 3898020334 - .long 1028538281 - .long 121372672 - .long 1064759937 - .long 2418247211 - .long 1028479303 - .long 440926208 - .long 1064807398 - .long 2151876465 - .long 1027654537 - .long 4270325760 - .long 1064854864 - .long 638259760 - .long 1025479387 - .long 3025666048 - .long 1064902337 - .long 3300197061 - .long 1024786488 - .long 1007943680 - .long 1064949816 - .long 2066224929 - .long 1028181309 - .long 2518679552 - .long 1064997300 - .long 1194091706 - .long 1027784991 - .long 3268673536 - .long 1065044790 - .long 3941768658 - .long 1028458821 - .long 3264479232 - .long 1065092286 - .long 2285092471 - .long 1025632049 - .long 2511601664 - .long 1065139788 - .long 274659519 - .long 1028009304 - .long 1016594432 - .long 1065187296 - .long 2660244528 - .long 1028621601 - .long 3080716288 - .long 1065234809 - .long 2948866684 - .long 1027363323 - .long 119799808 - .long 1065282329 - .long 2305553338 - .long 1027606374 - .long 730071040 - .long 1065329854 - .long 1656362908 - .long 1027822979 - .long 2458910720 - .long 1065365300 - .long 1598786858 - .long 1026178251 - .long 2587623424 - .long 1065383126 - .long 2378958549 - .long 1028197240 - .long 839778304 - .long 1065406897 - .long 1456429431 - .long 1026244901 - .long 3036413952 - .long 1065430670 - .long 1932205944 - .long 1027981879 - .long 590872576 - .long 1065454447 - .long 4023608769 - .long 1027958429 - .long 2096103424 - .long 1065478226 - .long 3732079947 - .long 1027967416 - .long 3260284928 - .long 1065502008 - .long 336608668 - .long 1026095801 - .long 4086300672 - .long 1065525793 - .long 136967562 - .long 1028120471 - .long 282460160 - .long 1065549582 - .long 3624814115 - .long 1028328839 - .long 441843712 - .long 1065573373 - .long 3566723455 - .long 1022759747 - .long 272236544 - .long 1065597167 - .long 4015454571 - .long 1028257780 - .long 4072013824 - .long 1065620963 - .long 4162319098 - .long 1028151765 - .long 3254255616 - .long 1065644763 - .long 3888083220 - .long 1027286836 - .long 2116943872 - .long 1065668566 - .long 1025436577 - .long 1027036048 - .long 663224320 - .long 1065692372 - .long 2834872887 - .long 1025744984 - .long 3191078912 - .long 1065716180 - .long 1809631811 - .long 1027064556 - .long 1113718784 - .long 1065739992 - .long 1168962244 - .long 1027829789 - .long 3024224256 - .long 1065763806 - .long 2016586535 - .long 1027435289 - .long 335675392 - .long 1065787624 - .long 1431812300 - .long 1027676827 - .long 1836580864 - .long 3212249540 - .long 1456335140 - .long 3175441338 - .long 2446065664 - .long 3212225994 - .long 1539749707 - .long 3174539680 - .long 1201405952 - .long 3212202447 - .long 1821058149 - .long 3175488506 - .long 2397044736 - .long 3212178898 - .long 3567155664 - .long 3175677071 - .long 1737228288 - .long 3212155348 - .long 3350760572 - .long 3175687587 - .long 3516137472 - .long 3212131796 - .long 54506174 - .long 3175826950 - .long 3438280704 - .long 3212108243 - .long 1906648915 - .long 3172999433 - .long 1502347264 - .long 3212084689 - .long 2084064274 - .long 3175617184 - .long 2003042304 - .long 3212061133 - .long 2608241578 - .long 3175876387 - .long 644612096 - .long 3212037576 - .long 1051263361 - .long 3175383946 - .long 1721237504 - .long 3212014017 - .long 3354885735 - .long 3173549367 - .long 936902656 - .long 3211990457 - .long 87463564 - .long 3175445923 - .long 2586312704 - .long 3211966895 - .long 506361461 - .long 3173795297 - .long 2373189632 - .long 3211943332 - .long 3280686310 - .long 3176104310 - .long 297533440 - .long 3211919768 - .long 3617245347 - .long 3172626443 - .long 652738560 - .long 3211896202 - .long 579141699 - .long 3175545653 - .long 3438542848 - .long 3211872634 - .long 3721652079 - .long 3176073447 - .long 64225280 - .long 3211849066 - .long 4212107268 - .long 3176133288 - .long 3413901312 - .long 3211825495 - .long 2932346116 - .long 3176017856 - .long 601882624 - .long 3211801924 - .long 3484155727 - .long 3176018735 - .long 435159040 - .long 3211768414 - .long 1225556500 - .long 3173101246 - .long 224395264 - .long 3211721265 - .long 1151472644 - .long 3175433137 - .long 570949632 - .long 3211674113 - .long 169440649 - .long 3175424350 - .long 1473249280 - .long 3211626958 - .long 767490525 - .long 3174092077 - .long 2929197056 - .long 3211579800 - .long 3954462340 - .long 3175313650 - .long 642777088 - .long 3211532640 - .long 293664658 - .long 3175782850 - .long 3202875392 - .long 3211485476 - .long 2810753961 - .long 3172053070 - .long 2016935936 - .long 3211438310 - .long 68049842 - .long 3174903053 - .long 1379401728 - .long 3211391141 - .long 2125367929 - .long 3172998826 - .long 1288175616 - .long 3211343969 - .long 2899939163 - .long 3173729914 - .long 1741684736 - .long 3211296794 - .long 3555933291 - .long 3175823424 - .long 2739404800 - .long 3211249616 - .long 3666032509 - .long 3173379218 - .long 4278714368 - .long 3211202435 - .long 836003693 - .long 3174279974 - .long 2063597568 - .long 3211155252 - .long 1236704766 - .long 3174628627 - .long 387448832 - .long 3211108066 - .long 2756688253 - .long 3175196858 - .long 3543662592 - .long 3211060876 - .long 3160170483 - .long 3175973516 - .long 2941255680 - .long 3211013684 - .long 2830353174 - .long 3175364122 - .long 2873098240 - .long 3210966489 - .long 4144291481 - .long 3175737650 - .long 3338141696 - .long 3210919291 - .long 3260331491 - .long 3175267671 - .long 39845888 - .long 3210872091 - .long 1922313952 - .long 3172367859 - .long 1566048256 - .long 3210824887 - .long 3310171853 - .long 3174855326 - .long 3620732928 - .long 3210777680 - .long 3325808113 - .long 3175681701 - .long 3815768064 - .long 3210721230 - .long 3926816425 - .long 3173875772 - .long 1439694848 - .long 3210626806 - .long 2528441557 - .long 3175954827 - .long 112197632 - .long 3210532376 - .long 2735049661 - .long 3176047308 - .long 4125097984 - .long 3210437939 - .long 2814107016 - .long 3175038571 - .long 589299712 - .long 3210343498 - .long 84420116 - .long 3175362012 - .long 2387607552 - .long 3210249050 - .long 886636141 - .long 3175106949 - .long 926941184 - .long 3210154597 - .long 4249864732 - .long 3174015648 - .long 498073600 - .long 3210060138 - .long 2571744411 - .long 3176070508 - .long 1099956224 - .long 3209965673 - .long 191977345 - .long 3175708074 - .long 2728394752 - .long 3209871202 - .long 1836848871 - .long 3175824104 - .long 1086324736 - .long 3209776726 - .long 3259464767 - .long 3174065342 - .long 929038336 - .long 3209673352 - .long 885961784 - .long 3173053400 - .long 1719664640 - .long 3209484376 - .long 3633085090 - .long 3175298882 - .long 245366784 - .long 3209295389 - .long 622998640 - .long 3175676299 - .long 794820608 - .long 3209106390 - .long 183843539 - .long 3175700419 - .long 3361734656 - .long 3208917379 - .long 319142191 - .long 3175621005 - .long 3644850176 - .long 3208728357 - .long 4064393657 - .long 3175686713 - .long 3279945728 - .long 3208436088 - .long 921315957 - .long 3167773730 - .long 3263168512 - .long 3208057998 - .long 1191737347 - .long 3175145444 - .long 2940207104 - .long 3207679885 - .long 676306098 - .long 3174972367 - .long 293601280 - .long 3207009515 - .long 3713153157 - .long 3176043736 - .long 989855744 - .long 3205960985 - .long 847981310 - .long 3172455261 - .long 0 - .long 0 - .long 0 - .long 0 - .type log2_t2,@object - .size log2_t2,2064 - .align 16 -log2_t3: - .long 0 - .long 0 - .long 0 - .long 0 - .long 3221225472 - .long 1052246016 - .long 10217817 - .long 1028072176 - .long 2684354560 - .long 1053294593 - .long 1823923246 - .long 1027991127 - .long 2684354560 - .long 1053884417 - .long 2844515178 - .long 1028130658 - .long 0 - .long 1054277635 - .long 1230948249 - .long 1025710668 - .long 2952790016 - .long 1054670852 - .long 1764281763 - .long 1028204164 - .long 1744830464 - .long 1054965763 - .long 2682119783 - .long 1027942224 - .long 1879048192 - .long 1055129604 - .long 690677466 - .long 1027931089 - .long 3623878656 - .long 1055326213 - .long 2988899587 - .long 1028585756 - .long 2013265920 - .long 1055522823 - .long 2646883118 - .long 1027643276 - .long 1207959552 - .long 1055719433 - .long 3152640337 - .long 1026797173 - .long 4026531840 - .long 1055883274 - .long 2707659781 - .long 1026392505 - .long 2348810240 - .long 1055997958 - .long 2715649106 - .long 1027422884 - .long 3087007744 - .long 1056096263 - .long 285997833 - .long 1028488126 - .long 0 - .long 1056194569 - .long 2595623046 - .long 1027865547 - .long 1610612736 - .long 1056292874 - .long 3757543522 - .long 1027743124 - .long 2550136832 - .long 1056374795 - .long 1685325986 - .long 1027848425 - .long 603979776 - .long 1056473101 - .long 971111892 - .long 1028643022 - .long 3422552064 - .long 1056571406 - .long 1310768194 - .long 1027840696 - .long 2348810240 - .long 1056669712 - .long 647785154 - .long 1027472771 - .long 335544320 - .long 1056751634 - .long 3447719136 - .long 1027384110 - .long 0 - .long 1056849940 - .long 2473353221 - .long 1028109426 - .long 134217728 - .long 1056948246 - .long 3908013601 - .long 1026650988 - .long 335544320 - .long 1057005580 - .long 3241725099 - .long 1023809487 - .long 4261412864 - .long 1057046540 - .long 3592425610 - .long 1028549905 - .long 637534208 - .long 1057095694 - .long 1951774861 - .long 1025790338 - .long 1476395008 - .long 1057144847 - .long 2386717008 - .long 1027825275 - .long 2550136832 - .long 1057194000 - .long 936867399 - .long 1026725625 - .long 3825205248 - .long 1057243153 - .long 3781996145 - .long 1026256374 - .long 33554432 - .long 1057284115 - .long 1781441569 - .long 1026554167 - .long 1677721600 - .long 1057333268 - .long 541855954 - .long 1027837629 - .long 3556769792 - .long 1057382421 - .long 3808194027 - .long 1026230743 - .long 1342177280 - .long 1057431575 - .long 1679773493 - .long 1024039205 - .long 2516582400 - .long 1057472536 - .long 4034037987 - .long 1022229492 - .long 671088640 - .long 1057521690 - .long 1732823594 - .long 1026728033 - .long 3321888768 - .long 1057570843 - .long 2629452715 - .long 1028246558 - .long 1912602624 - .long 1057619997 - .long 2171860443 - .long 1027730387 - .long 704643072 - .long 1057669151 - .long 1413946002 - .long 1027714921 - .long 2717908992 - .long 1057710112 - .long 3583986569 - .long 1027909771 - .long 1912602624 - .long 1057759266 - .long 2993702118 - .long 1024684384 - .long 1275068416 - .long 1057808420 - .long 3380540156 - .long 1028118518 - .long 872415232 - .long 1057857574 - .long 3787132338 - .long 1027925509 - .long 3556769792 - .long 1057898535 - .long 399829967 - .long 1027972484 - .long 3556769792 - .long 1057947689 - .long 99635239 - .long 1022741119 - .long 3724541952 - .long 1057996843 - .long 3258250598 - .long 1027826609 - .long 4211081216 - .long 1058029590 - .long 3506657137 - .long 1027308398 - .long 3741319168 - .long 1058050071 - .long 541288431 - .long 1027107230 - .long 4127195136 - .long 1058074648 - .long 3646427416 - .long 1027904075 - .long 335544320 - .long 1058099226 - .long 246496071 - .long 1025659624 - .long 922746880 - .long 1058123803 - .long 2177775776 - .long 1028406323 - .long 1627389952 - .long 1058148380 - .long 1181919501 - .long 1028360402 - .long 1577058304 - .long 1058168861 - .long 1426415599 - .long 1028530121 - .long 2483027968 - .long 1058193438 - .long 1417624514 - .long 1027006858 - .long 3489660928 - .long 1058218015 - .long 3323042516 - .long 1021955058 - .long 285212672 - .long 1058242593 - .long 710383729 - .long 1028457251 - .long 570425344 - .long 1058263074 - .long 179923617 - .long 1028480130 - .long 1879048192 - .long 1058287651 - .long 1513572732 - .long 1026553379 - .long 3271557120 - .long 1058312228 - .long 3860576606 - .long 1028277345 - .long 486539264 - .long 1058336806 - .long 742310640 - .long 1027879207 - .long 1107296256 - .long 1058357287 - .long 2654634259 - .long 1027755563 - .long 2801795072 - .long 1058381864 - .long 2910466432 - .long 1028276410 - .long 318767104 - .long 1058406442 - .long 4054947979 - .long 1026798334 - .long 2231369728 - .long 1058431019 - .long 878023543 - .long 1023510847 - .long 4227858432 - .long 1058455596 - .long 263450436 - .long 1028652562 - .long 989855744 - .long 1058476078 - .long 3244478756 - .long 1024589954 - .long 3187671040 - .long 1058500655 - .long 1529358695 - .long 1027496060 - .long 1207959552 - .long 1058525233 - .long 1449606828 - .long 1025374457 - .long 3607101440 - .long 1058549810 - .long 1121865491 - .long 1028651213 - .long 704643072 - .long 1058570292 - .long 76632162 - .long 1015281729 - .long 3305111552 - .long 1058594869 - .long 1705840257 - .long 1026852007 - .long 1711276032 - .long 1058619447 - .long 2189122428 - .long 1028401790 - .long 234881024 - .long 1058644025 - .long 3860440574 - .long 1027979737 - .long 1946157056 - .long 1058664506 - .long 3805699399 - .long 1027836413 - .long 654311424 - .long 1058689084 - .long 3144514508 - .long 1028333941 - .long 3774873600 - .long 1058713661 - .long 1551239808 - .long 1026867407 - .long 2701131776 - .long 1058738239 - .long 3872647589 - .long 1023700698 - .long 1711276032 - .long 1058762817 - .long 2939649020 - .long 1028642081 - .long 3858759680 - .long 1058783298 - .long 3869973501 - .long 1024259487 - .long 3070230528 - .long 1058807876 - .long 3430235573 - .long 1027394848 - .long 2399141888 - .long 1058832454 - .long 2837866956 - .long 1024798194 - .long 1811939328 - .long 1058857032 - .long 3195008471 - .long 1028558077 - .long 4278190080 - .long 1058877513 - .long 925127753 - .long 1028542902 - .long 3909091328 - .long 1058902091 - .long 3453656528 - .long 1026590044 - .long 3623878656 - .long 1058926669 - .long 2547020848 - .long 1028250625 - .long 3456106496 - .long 1058951247 - .long 3173507594 - .long 1027808713 - .long 1962934272 - .long 1058971729 - .long 624230052 - .long 1027649088 - .long 1979711488 - .long 1058996307 - .long 1896525098 - .long 1028127351 - .long 2113929216 - .long 1059020885 - .long 3776127051 - .long 1026276788 - .long 2332033024 - .long 1059045463 - .long 1850790470 - .long 1028492603 - .long 3481272320 - .long 1059065900 - .long 111238633 - .long 1028379644 - .long 2944401408 - .long 1059076141 - .long 1234093769 - .long 1028494241 - .long 3212836864 - .long 1059088430 - .long 4181043184 - .long 1026804589 - .long 3523215360 - .long 1059100719 - .long 2569064410 - .long 1028514056 - .long 3892314112 - .long 1059113008 - .long 312914348 - .long 1028228528 - .long 3523215360 - .long 1059123249 - .long 3115983504 - .long 1028199393 - .long 3992977408 - .long 1059135538 - .long 2038492604 - .long 1024861349 - .long 209715200 - .long 1059147828 - .long 152199155 - .long 1027874535 - .long 780140544 - .long 1059160117 - .long 1978960733 - .long 1027229157 - .long 578813952 - .long 1059170358 - .long 505645676 - .long 1026884061 - .long 1241513984 - .long 1059182647 - .long 514239020 - .long 1027707324 - .long 1962934272 - .long 1059194936 - .long 2032269232 - .long 1021518627 - .long 2726297600 - .long 1059207225 - .long 3497533428 - .long 1028043129 - .long 3548381184 - .long 1059219514 - .long 3658695522 - .long 1027915933 - .long 3556769792 - .long 1059229755 - .long 501547381 - .long 1028018915 - .long 184549376 - .long 1059242045 - .long 3705047602 - .long 1024687479 - .long 1149239296 - .long 1059254334 - .long 675335170 - .long 1028011771 - .long 2172649472 - .long 1059266623 - .long 2543593460 - .long 1027713249 - .long 2348810240 - .long 1059276864 - .long 2216047412 - .long 1027673535 - .long 3464495104 - .long 1059289153 - .long 712855157 - .long 1028296196 - .long 343932928 - .long 1059301443 - .long 930266665 - .long 1027043929 - .long 1568669696 - .long 1059313732 - .long 780927773 - .long 1025654091 - .long 1912602624 - .long 1059323973 - .long 3399331078 - .long 1024229490 - .long 3229614080 - .long 1059336262 - .long 3996204339 - .long 1026644611 - .long 301989888 - .long 1059348552 - .long 143359080 - .long 1028079044 - .long 1728053248 - .long 1059360841 - .long 2849827553 - .long 1027273550 - .long 3204448256 - .long 1059373130 - .long 2690987141 - .long 1026998795 - .long 3758096384 - .long 1059383371 - .long 2222711807 - .long 1027188284 - .long 1031798784 - .long 1059395661 - .long 1353013621 - .long 1028180599 - .long 2659188736 - .long 1059407950 - .long 756253115 - .long 1027136298 - .long 41943040 - .long 1059420240 - .long 532576643 - .long 1026486854 - .long 763363328 - .long 1059430481 - .long 3289135452 - .long 1026299195 - .long 2533359616 - .long 1059442770 - .long 1513734706 - .long 1027630332 - .long 67108864 - .long 1059455060 - .long 2085312894 - .long 1023872287 - .long 1937768448 - .long 1059467349 - .long 3183199319 - .long 1028270313 - .long 2826960896 - .long 1059477590 - .long 3972158195 - .long 1028082057 - .long 503316480 - .long 1059489880 - .long 264248663 - .long 1028526857 - .long 2533359616 - .long 1059502169 - .long 3362227203 - .long 1027150375 - .long 318767104 - .long 1059514459 - .long 4064547853 - .long 1024810530 - .long 268435456 - .long 3205959634 - .long 691182318 - .long 3173304996 - .long 3456106496 - .long 3205947346 - .long 2237848631 - .long 3175922029 - .long 1291845632 - .long 3205939155 - .long 2610806712 - .long 3173520353 - .long 150994944 - .long 3205926868 - .long 1392581829 - .long 3174351268 - .long 3271557120 - .long 3205914580 - .long 3292400060 - .long 3175929370 - .long 2080374784 - .long 3205902293 - .long 4178356410 - .long 3175965902 - .long 872415232 - .long 3205890006 - .long 330416743 - .long 3174570455 - .long 3925868544 - .long 3205877718 - .long 1897771058 - .long 3174145242 - .long 2650800128 - .long 3205865431 - .long 3340394865 - .long 3175328080 - .long 1358954496 - .long 3205853144 - .long 4006478009 - .long 3174644517 - .long 33554432 - .long 3205840857 - .long 2338318098 - .long 3175328560 - .long 1996488704 - .long 3205832665 - .long 908420916 - .long 3175917031 - .long 637534208 - .long 3205820378 - .long 1000116813 - .long 3175123051 - .long 3539992576 - .long 3205808090 - .long 4281444920 - .long 3175253057 - .long 2130706432 - .long 3205795803 - .long 376816689 - .long 3172256578 - .long 687865856 - .long 3205783516 - .long 196000653 - .long 3170433881 - .long 3506438144 - .long 3205771228 - .long 2744030195 - .long 3174702892 - .long 2013265920 - .long 3205758941 - .long 2211786449 - .long 3173892702 - .long 486539264 - .long 3205746654 - .long 4020273651 - .long 3175077302 - .long 2315255808 - .long 3205738462 - .long 3572678407 - .long 3175733405 - .long 754974720 - .long 3205726175 - .long 1564087220 - .long 3174977341 - .long 3456106496 - .long 3205713887 - .long 1784641315 - .long 3175256025 - .long 1845493760 - .long 3205701600 - .long 679907493 - .long 3173008683 - .long 201326592 - .long 3205689313 - .long 2119625261 - .long 3172818812 - .long 2818572288 - .long 3205677025 - .long 2101485035 - .long 3175178180 - .long 1124073472 - .long 3205664738 - .long 2832998731 - .long 3174717836 - .long 3690987520 - .long 3205652450 - .long 3610578708 - .long 3175551729 - .long 1946157056 - .long 3205640163 - .long 2398766049 - .long 3174966407 - .long 3623878656 - .long 3205631971 - .long 3995335152 - .long 3175656959 - .long 1828716544 - .long 3205619684 - .long 183250326 - .long 3175973344 - .long 16777216 - .long 3205607397 - .long 4019803825 - .long 3175116509 - .long 2466250752 - .long 3205595109 - .long 1578128721 - .long 3175183606 - .long 603979776 - .long 3205582822 - .long 112661265 - .long 3170010307 - .long 2986344448 - .long 3205570534 - .long 3756900035 - .long 3175992425 - .long 1073741824 - .long 3205558247 - .long 3996691019 - .long 3174185852 - .long 3422552064 - .long 3205545959 - .long 4247306560 - .long 3172221188 - .long 1442840576 - .long 3205533672 - .long 920037013 - .long 3174307610 - .long 2969567232 - .long 3205525480 - .long 2901018317 - .long 3175306400 - .long 956301312 - .long 3205513193 - .long 4209407270 - .long 3173953969 - .long 3204448256 - .long 3205500905 - .long 4232478211 - .long 3174316659 - .long 2248146944 - .long 3205480404 - .long 3976793802 - .long 3175786245 - .long 2348810240 - .long 3205455829 - .long 223141518 - .long 3175696845 - .long 2415919104 - .long 3205431254 - .long 2202058045 - .long 3173520944 - .long 2415919104 - .long 3205406679 - .long 780543142 - .long 3170584573 - .long 2348810240 - .long 3205382104 - .long 1379108477 - .long 3174272970 - .long 2248146944 - .long 3205357529 - .long 875461665 - .long 3170488084 - .long 704643072 - .long 3205341146 - .long 2105849568 - .long 3174271106 - .long 503316480 - .long 3205316571 - .long 1835672135 - .long 3174776330 - .long 234881024 - .long 3205291996 - .long 3252628102 - .long 3176108718 - .long 4227858432 - .long 3205267420 - .long 2720009520 - .long 3176111930 - .long 3892314112 - .long 3205242845 - .long 850238367 - .long 3174795595 - .long 3489660928 - .long 3205218270 - .long 3536085073 - .long 3174303192 - .long 3019898880 - .long 3205193695 - .long 3558909717 - .long 3175373323 - .long 2516582400 - .long 3205169120 - .long 920693007 - .long 3174667265 - .long 704643072 - .long 3205152737 - .long 4071589563 - .long 3175526566 - .long 100663296 - .long 3205128162 - .long 3392361480 - .long 3175871650 - .long 3758096384 - .long 3205103586 - .long 2972601747 - .long 3174998742 - .long 3053453312 - .long 3205079011 - .long 1605892160 - .long 3175139069 - .long 2315255808 - .long 3205054436 - .long 1553740054 - .long 3169146216 - .long 1476395008 - .long 3205029861 - .long 3751995331 - .long 3176004720 - .long 637534208 - .long 3205005286 - .long 3091908485 - .long 3174267031 - .long 4026531840 - .long 3204980710 - .long 3333214935 - .long 3172771610 - .long 3053453312 - .long 3204956135 - .long 790487160 - .long 3174501480 - .long 939524096 - .long 3204939752 - .long 1992793420 - .long 3175422045 - .long 4194304000 - .long 3204915176 - .long 3717748377 - .long 3174284044 - .long 3087007744 - .long 3204890601 - .long 105034497 - .long 3174659776 - .long 1912602624 - .long 3204866026 - .long 4120994791 - .long 3175985638 - .long 704643072 - .long 3204841451 - .long 136721814 - .long 3175923992 - .long 3758096384 - .long 3204816875 - .long 4178760049 - .long 3174289887 - .long 2449473536 - .long 3204792300 - .long 1385241146 - .long 3173295534 - .long 1073741824 - .long 3204767725 - .long 614436572 - .long 3174892815 - .long 3959422976 - .long 3204743149 - .long 3717352206 - .long 3173503234 - .long 1543503872 - .long 3204726766 - .long 2074792065 - .long 3174982293 - .long 33554432 - .long 3204702191 - .long 1160049312 - .long 3175315117 - .long 2785017856 - .long 3204677615 - .long 947382601 - .long 3173470865 - .long 1174405120 - .long 3204653040 - .long 1784674375 - .long 3173592242 - .long 3791650816 - .long 3204628464 - .long 3966380974 - .long 3175406146 - .long 2080374784 - .long 3204603889 - .long 90923019 - .long 3175186916 - .long 301989888 - .long 3204579314 - .long 2809276197 - .long 3175891468 - .long 2785017856 - .long 3204554738 - .long 2488581129 - .long 3175422649 - .long 100663296 - .long 3204538355 - .long 4207284753 - .long 3176089346 - .long 2516582400 - .long 3204513779 - .long 1763582947 - .long 3173239999 - .long 536870912 - .long 3204489204 - .long 1591642683 - .long 3175659480 - .long 2818572288 - .long 3204464628 - .long 1247815734 - .long 3175781625 - .long 1543503872 - .long 3204431850 - .long 3175237814 - .long 3174372638 - .long 1610612736 - .long 3204382699 - .long 3136020064 - .long 3174117678 - .long 1543503872 - .long 3204333548 - .long 145926225 - .long 3175399182 - .long 1409286144 - .long 3204284397 - .long 1146502365 - .long 3174956000 - .long 1140850688 - .long 3204235246 - .long 1806880589 - .long 3175568698 - .long 3825205248 - .long 3204202478 - .long 748557588 - .long 3171070759 - .long 3355443200 - .long 3204153327 - .long 3616893112 - .long 3175503309 - .long 2818572288 - .long 3204104176 - .long 3332544853 - .long 3175717064 - .long 2214592512 - .long 3204055025 - .long 59215988 - .long 3174426688 - .long 1476395008 - .long 3204005874 - .long 2509632280 - .long 3174354848 - .long 603979776 - .long 3203956723 - .long 1669980294 - .long 3175609302 - .long 3959422976 - .long 3203907571 - .long 231858041 - .long 3175323695 - .long 2885681152 - .long 3203858420 - .long 192153543 - .long 3175961815 - .long 1744830464 - .long 3203809269 - .long 507582953 - .long 3175426507 - .long 3758096384 - .long 3203776501 - .long 1672537466 - .long 3176048847 - .long 2483027968 - .long 3203727350 - .long 3522791035 - .long 3172632365 - .long 1006632960 - .long 3203678199 - .long 2149811783 - .long 3175485759 - .long 3758096384 - .long 3203629047 - .long 1999469990 - .long 3175541209 - .long 2147483648 - .long 3203579896 - .long 2226222860 - .long 3173477057 - .long 402653184 - .long 3203530745 - .long 4286112849 - .long 3172408839 - .long 2818572288 - .long 3203481593 - .long 713604598 - .long 3174828560 - .long 872415232 - .long 3203432442 - .long 2347361448 - .long 3173841417 - .long 1879048192 - .long 3203366901 - .long 1438571646 - .long 3174899801 - .long 402653184 - .long 3203301366 - .long 3419522004 - .long 3175593882 - .long 268435456 - .long 3203203063 - .long 4288382338 - .long 3174545520 - .long 4160749568 - .long 3203104759 - .long 272162157 - .long 3174838779 - .long 3489660928 - .long 3203006456 - .long 2794103335 - .long 3176033766 - .long 2684354560 - .long 3202908153 - .long 2632246937 - .long 3175930608 - .long 1744830464 - .long 3202809850 - .long 1508829515 - .long 3174219824 - .long 536870912 - .long 3202711547 - .long 3295780812 - .long 3172985552 - .long 3355443200 - .long 3202613243 - .long 1122596525 - .long 3174655334 - .long 805306368 - .long 3202547708 - .long 2645694757 - .long 3175532338 - .long 3355443200 - .long 3202449404 - .long 1159177678 - .long 3174604459 - .long 2684354560 - .long 3202351098 - .long 1034248407 - .long 3175079694 - .long 2684354560 - .long 3202154491 - .long 1158806475 - .long 3171580989 - .long 2147483648 - .long 3201957884 - .long 1293148021 - .long 3171385480 - .long 1073741824 - .long 3201761277 - .long 3828985497 - .long 3175006371 - .long 4026531840 - .long 3201564669 - .long 3153776129 - .long 3174482233 - .long 2147483648 - .long 3201368062 - .long 171710315 - .long 3175446758 - .long 0 - .long 3201040382 - .long 1900250098 - .long 3174781524 - .long 2147483648 - .long 3200778238 - .long 2246244539 - .long 3175572705 - .long 536870912 - .long 3200385023 - .long 3628536486 - .long 3175901120 - .long 1073741824 - .long 3199729663 - .long 231762015 - .long 3175023909 - .long 2147483648 - .long 3198681087 - .long 1401818636 - .long 3175134547 - .long 0 - .long 0 - .long 0 - .long 0 - .type log2_t3,@object - .size log2_t3,4112 - .space 496, 0x00 # pad - .align 16 -clv: - .long 1655945238 - .long 1069842388 - .long 2523158510 - .long 1048167334 - .long 713798755 - .long 3216330823 - .long 1181303047 - .long 3218484803 - .type clv,@object - .size clv,32 - .align 16 -exp2_tbl: - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 2851812149 - .long 1072698941 - .long 2595802551 - .long 1016815913 - .long 1048019041 - .long 1072704666 - .long 1398474845 - .long 3161559171 - .long 3899555717 - .long 1072710421 - .long 427280750 - .long 3163595548 - .long 3541402996 - .long 1072716208 - .long 2759177317 - .long 1015903202 - .long 702412510 - .long 1072722027 - .long 3803266086 - .long 3163328991 - .long 410360776 - .long 1072727877 - .long 1269990655 - .long 1013024446 - .long 3402036099 - .long 1072733758 - .long 405889333 - .long 1016154232 - .long 1828292879 - .long 1072739672 - .long 1255956746 - .long 1016636974 - .long 728909815 - .long 1072745618 - .long 383930225 - .long 1016078044 - .long 852742562 - .long 1072751596 - .long 667253586 - .long 1010842135 - .long 2952712987 - .long 1072757606 - .long 3293494651 - .long 3161168877 - .long 3490863953 - .long 1072763649 - .long 960797497 - .long 3163997456 - .long 3228316108 - .long 1072769725 - .long 3010241991 - .long 3159471380 - .long 2930322912 - .long 1072775834 - .long 2599499422 - .long 3163762623 - .long 3366293073 - .long 1072781976 - .long 3119426313 - .long 1015169130 - .long 1014845819 - .long 1072788152 - .long 3117910645 - .long 3162607681 - .long 948735466 - .long 1072794361 - .long 3516338027 - .long 3163623459 - .long 3949972341 - .long 1072800603 - .long 2068408548 - .long 1015962444 - .long 2214878420 - .long 1072806880 - .long 892270087 - .long 3164164998 - .long 828946858 - .long 1072813191 - .long 10642492 - .long 1016988014 - .long 586995997 - .long 1072819536 - .long 41662347 - .long 3163676568 - .long 2288159958 - .long 1072825915 - .long 2169144468 - .long 1015924597 - .long 2440944790 - .long 1072832329 - .long 2492769773 - .long 1015196030 - .long 1853186616 - .long 1072838778 - .long 3066496370 - .long 1016705150 - .long 1337108031 - .long 1072845262 - .long 3203724452 - .long 1015726421 - .long 1709341917 - .long 1072851781 - .long 2571168217 - .long 1015201075 - .long 3790955393 - .long 1072858335 - .long 2352942461 - .long 3164228666 - .long 4112506593 - .long 1072864925 - .long 2947355221 - .long 1015419624 - .long 3504003472 - .long 1072871551 - .long 3594001059 - .long 3158379228 - .long 2799960843 - .long 1072878213 - .long 1423655380 - .long 1016070727 - .long 2839424854 - .long 1072884911 - .long 1171596163 - .long 1014090255 - .long 171030293 - .long 1072891646 - .long 3526460132 - .long 1015477354 - .long 4232894513 - .long 1072898416 - .long 2383938684 - .long 1015717095 - .long 2992903935 - .long 1072905224 - .long 2218154405 - .long 1016276769 - .long 1603444721 - .long 1072912069 - .long 1548633640 - .long 3163249902 - .long 926591435 - .long 1072918951 - .long 3208833761 - .long 3163962090 - .long 1829099622 - .long 1072925870 - .long 1016661180 - .long 3164509581 - .long 887463927 - .long 1072932827 - .long 3596744162 - .long 3161842742 - .long 3272845541 - .long 1072939821 - .long 928852419 - .long 3164536824 - .long 1276261410 - .long 1072946854 - .long 300981947 - .long 1015732745 - .long 78413852 - .long 1072953925 - .long 4183226867 - .long 3164065827 - .long 569847338 - .long 1072961034 - .long 472945272 - .long 3160339305 - .long 3645941911 - .long 1072968181 - .long 3814685080 - .long 3162621917 - .long 1617004845 - .long 1072975368 - .long 82804943 - .long 1011391354 - .long 3978100823 - .long 1072982593 - .long 3513027190 - .long 1016894539 - .long 3049340112 - .long 1072989858 - .long 3062915824 - .long 1014219171 - .long 4040676318 - .long 1072997162 - .long 4090609238 - .long 1016712034 - .long 3577096743 - .long 1073004506 - .long 2951496418 - .long 1014842263 - .long 2583551245 - .long 1073011890 - .long 3161094195 - .long 1016655067 - .long 1990012071 - .long 1073019314 - .long 3529070563 - .long 3163861769 - .long 2731501122 - .long 1073026778 - .long 1774031854 - .long 3163518597 - .long 1453150082 - .long 1073034283 - .long 498154668 - .long 3162536638 - .long 3395129871 - .long 1073041828 - .long 4025345434 - .long 3163383964 - .long 917841882 - .long 1073049415 - .long 18715564 - .long 1016707884 - .long 3566716925 - .long 1073057042 - .long 1536826855 - .long 1015191009 - .long 3712504873 - .long 1073064711 - .long 88491948 - .long 1016476236 - .long 2321106615 - .long 1073072422 - .long 2171176610 - .long 1010584347 - .long 363667784 - .long 1073080175 - .long 813753949 - .long 1016833785 - .long 3111574537 - .long 1073087969 - .long 2606161479 - .long 3163808322 - .long 2956612997 - .long 1073095806 - .long 2118169750 - .long 3163784129 - .long 885834528 - .long 1073103686 - .long 1973258546 - .long 3163310140 - .long 2186617381 - .long 1073111608 - .long 2270764083 - .long 3164321289 - .long 3561793907 - .long 1073119573 - .long 1157054052 - .long 1012938926 - .long 1719614413 - .long 1073127582 - .long 330458197 - .long 3164331316 - .long 1963711167 - .long 1073135634 - .long 1744767756 - .long 3161622870 - .long 1013258799 - .long 1073143730 - .long 1748797610 - .long 3161177658 - .long 4182873220 - .long 1073151869 - .long 629542646 - .long 3163044879 - .long 3907805044 - .long 1073160053 - .long 2257091225 - .long 3162598983 - .long 1218806132 - .long 1073168282 - .long 1818613051 - .long 3163597017 - .long 1447192521 - .long 1073176555 - .long 1462857171 - .long 3163563097 - .long 1339972927 - .long 1073184873 - .long 167908908 - .long 1016620728 - .long 1944781191 - .long 1073193236 - .long 3993278767 - .long 3162772855 - .long 19972402 - .long 1073201645 - .long 3507899861 - .long 1017057868 - .long 919555682 - .long 1073210099 - .long 3121969534 - .long 1013996802 - .long 1413356050 - .long 1073218599 - .long 1651349290 - .long 3163716742 - .long 2571947539 - .long 1073227145 - .long 3558159063 - .long 3164425245 - .long 1176749997 - .long 1073235738 - .long 2738998779 - .long 3163084420 - .long 2604962541 - .long 1073244377 - .long 2614425274 - .long 3164587768 - .long 3649726105 - .long 1073253063 - .long 4085036346 - .long 1016698050 - .long 1110089947 - .long 1073261797 - .long 1451641638 - .long 1016523249 - .long 380978316 - .long 1073270578 - .long 854188970 - .long 3161511262 - .long 2568320822 - .long 1073279406 - .long 2732824428 - .long 1015401491 - .long 194117574 - .long 1073288283 - .long 777528611 - .long 3164460665 - .long 2966275557 - .long 1073297207 - .long 2176155323 - .long 3160891335 - .long 3418903055 - .long 1073306180 - .long 2527457337 - .long 3161869180 - .long 2682146384 - .long 1073315202 - .long 2082178512 - .long 3164411995 - .long 1892288442 - .long 1073324273 - .long 2446255666 - .long 3163648957 - .long 2191782032 - .long 1073333393 - .long 2960257726 - .long 1014791238 - .long 434316067 - .long 1073342563 - .long 2028358766 - .long 1014506698 - .long 2069751141 - .long 1073351782 - .long 1562170674 - .long 3163773257 - .long 3964284211 - .long 1073361051 - .long 2111583915 - .long 1016475740 - .long 2990417245 - .long 1073370371 - .long 3683467745 - .long 3164417902 - .long 321958744 - .long 1073379742 - .long 3401933766 - .long 1016843134 - .long 1434058175 - .long 1073389163 - .long 251133233 - .long 1016134345 - .long 3218338682 - .long 1073398635 - .long 3404164304 - .long 3163525684 - .long 2572866477 - .long 1073408159 - .long 878562433 - .long 1016570317 - .long 697153126 - .long 1073417735 - .long 1283515428 - .long 3164331765 - .long 3092190715 - .long 1073427362 - .long 814012167 - .long 3160571998 - .long 2380618042 - .long 1073437042 - .long 3149557219 - .long 3164369375 - .long 4076559943 - .long 1073446774 - .long 2119478330 - .long 3161806927 - .long 815859274 - .long 1073456560 - .long 240396590 - .long 3164536019 - .long 2420883922 - .long 1073466398 - .long 2049810052 - .long 1015168464 - .long 1540824585 - .long 1073476290 - .long 1064017010 - .long 3164536266 - .long 3716502172 - .long 1073486235 - .long 2303740125 - .long 1015091301 - .long 1610600570 - .long 1073496235 - .long 3766732298 - .long 1016808759 - .long 777507147 - .long 1073506289 - .long 4282924204 - .long 1016236109 - .long 2483480501 - .long 1073516397 - .long 1216371780 - .long 1014082748 - .long 3706687593 - .long 1073526560 - .long 3521726939 - .long 1014301643 - .long 1432208378 - .long 1073536779 - .long 1401068914 - .long 3163412539 - .long 1242007932 - .long 1073547053 - .long 1132034716 - .long 3164388407 - .long 135105010 - .long 1073557383 - .long 1906148727 - .long 3164424315 - .long 3707479175 - .long 1073567768 - .long 3613079302 - .long 1015213314 - .long 382305176 - .long 1073578211 - .long 2347622376 - .long 3163627201 - .long 64696965 - .long 1073588710 - .long 1768797490 - .long 1016865536 - .long 4076975200 - .long 1073599265 - .long 2029000898 - .long 1016257111 - .long 863738719 - .long 1073609879 - .long 1326992219 - .long 3163661773 - .long 351641897 - .long 1073620550 - .long 2172261526 - .long 3164059175 - .long 3884662774 - .long 1073631278 - .long 2158611599 - .long 1015258761 - .long 4224142467 - .long 1073642065 - .long 3389820385 - .long 1016255778 - .long 2728693978 - .long 1073652911 - .long 396109971 - .long 3164511267 - .long 764307441 - .long 1073663816 - .long 3021057420 - .long 3164378099 - .long 3999357479 - .long 1073674779 - .long 2258941616 - .long 1016973300 - .long 929806999 - .long 1073685803 - .long 3205336643 - .long 1016308133 - .long 1533953344 - .long 1073696886 - .long 769171850 - .long 1016714209 - .long 2912730644 - .long 1073708029 - .long 3490067721 - .long 3164453650 - .long 2174652632 - .long 1073719233 - .long 4087714590 - .long 1015498835 - .long 730821105 - .long 1073730498 - .long 2523232743 - .long 1013115764 - .type exp2_tbl,@object - .size exp2_tbl,2048 - .align 16 -cev: - .long 3884607281 - .long 1062590591 - .long 3607404735 - .long 1068264200 - .long 1874480759 - .long 1065595563 - .long 4286760334 - .long 1070514109 - .long 4277811695 - .long 1072049730 - .type cev,@object - .size cev,40 - .space 8, 0x00 # pad - .align 16 -ABSVALMASK: - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .type ABSVALMASK,@object - .size ABSVALMASK,16 - .align 4 -rcp_t1: - .long 0 - .long 1072693248 - .long 0 - .long 1072676992 - .long 0 - .long 1072660992 - .long 0 - .long 1072645248 - .long 0 - .long 1072629696 - .long 0 - .long 1072614400 - .long 0 - .long 1072599360 - .long 0 - .long 1072584512 - .long 0 - .long 1072569856 - .long 0 - .long 1072555456 - .long 0 - .long 1072541312 - .long 0 - .long 1072527296 - .long 0 - .long 1072513472 - .long 0 - .long 1072499904 - .long 0 - .long 1072486464 - .long 0 - .long 1072473280 - .long 0 - .long 1072460224 - .long 0 - .long 1072447360 - .long 0 - .long 1072434688 - .long 0 - .long 1072422208 - .long 0 - .long 1072409856 - .long 0 - .long 1072397696 - .long 0 - .long 1072385664 - .long 0 - .long 1072373824 - .long 0 - .long 1072362112 - .long 0 - .long 1072350592 - .long 0 - .long 1072339200 - .long 0 - .long 1072327936 - .long 0 - .long 1072316864 - .long 0 - .long 1072305856 - .long 0 - .long 1072295040 - .long 0 - .long 1072284352 - .long 0 - .long 1072273792 - .long 0 - .long 1072263424 - .long 0 - .long 1072253120 - .long 0 - .long 1072242944 - .long 0 - .long 1072232896 - .long 0 - .long 1072222976 - .long 0 - .long 1072213184 - .long 0 - .long 1072203520 - .long 0 - .long 1072193920 - .long 0 - .long 1072184448 - .long 0 - .long 1072175104 - .long 0 - .long 1072165888 - .long 0 - .long 1072156736 - .long 0 - .long 1072147776 - .long 0 - .long 1072138816 - .long 0 - .long 1072129984 - .long 0 - .long 1072121280 - .long 0 - .long 1072112704 - .long 0 - .long 1072104192 - .long 0 - .long 1072095744 - .long 0 - .long 1072087424 - .long 0 - .long 1072079168 - .long 0 - .long 1072071040 - .long 0 - .long 1072062976 - .long 0 - .long 1072054976 - .long 0 - .long 1072047104 - .long 0 - .long 1072039296 - .long 0 - .long 1072031552 - .long 0 - .long 1072023936 - .long 0 - .long 1072016384 - .long 0 - .long 1072008896 - .long 0 - .long 1072001536 - .long 0 - .long 1071994176 - .long 0 - .long 1071986944 - .long 0 - .long 1071979776 - .long 0 - .long 1071972672 - .long 0 - .long 1071965696 - .long 0 - .long 1071958720 - .long 0 - .long 1071951808 - .long 0 - .long 1071945024 - .long 0 - .long 1071938304 - .long 0 - .long 1071931584 - .long 0 - .long 1071924992 - .long 0 - .long 1071918464 - .long 0 - .long 1071911936 - .long 0 - .long 1071905536 - .long 0 - .long 1071899200 - .long 0 - .long 1071892864 - .long 0 - .long 1071886656 - .long 0 - .long 1071880448 - .long 0 - .long 1071874368 - .long 0 - .long 1071868288 - .long 0 - .long 1071862272 - .long 0 - .long 1071856384 - .long 0 - .long 1071850496 - .long 0 - .long 1071844608 - .long 0 - .long 1071838848 - .long 0 - .long 1071833152 - .long 0 - .long 1071827456 - .long 0 - .long 1071821824 - .long 0 - .long 1071816256 - .long 0 - .long 1071810752 - .long 0 - .long 1071805248 - .long 0 - .long 1071799872 - .long 0 - .long 1071794496 - .long 0 - .long 1071789120 - .long 0 - .long 1071783872 - .long 0 - .long 1071778624 - .long 0 - .long 1071773440 - .long 0 - .long 1071768320 - .long 0 - .long 1071763200 - .long 0 - .long 1071758144 - .long 0 - .long 1071753152 - .long 0 - .long 1071748160 - .long 0 - .long 1071743232 - .long 0 - .long 1071738368 - .long 0 - .long 1071733504 - .long 0 - .long 1071728704 - .long 0 - .long 1071723968 - .long 0 - .long 1071719232 - .long 0 - .long 1071714560 - .long 0 - .long 1071709952 - .long 0 - .long 1071705344 - .long 0 - .long 1071700800 - .long 0 - .long 1071696256 - .long 0 - .long 1071691776 - .long 0 - .long 1071687296 - .long 0 - .long 1071682880 - .long 0 - .long 1071678528 - .long 0 - .long 1071674176 - .long 0 - .long 1071669824 - .long 0 - .long 1071665536 - .long 0 - .long 1071661312 - .long 0 - .long 1071657088 - .long 0 - .long 1071652928 - .long 0 - .long 1071648768 - .long 0 - .long 1071644672 - .long 0 - .long 0 - .type rcp_t1,@object - .size rcp_t1,1040 - .align 4 -HALFSIG: - .long 4160749568 - .long 4294967295 - .type HALFSIG,@object - .size HALFSIG,8 - .align 4 -rcp_t2: - .long 0 - .long 1072693248 - .long 0 - .long 1072693056 - .long 0 - .long 1072692800 - .long 0 - .long 1072692544 - .long 0 - .long 1072692288 - .long 0 - .long 1072692032 - .long 0 - .long 1072691776 - .long 0 - .long 1072691520 - .long 0 - .long 1072691264 - .long 0 - .long 1072691008 - .long 0 - .long 1072690752 - .long 0 - .long 1072690496 - .long 0 - .long 1072690240 - .long 0 - .long 1072689984 - .long 0 - .long 1072689728 - .long 0 - .long 1072689472 - .long 0 - .long 1072689216 - .long 0 - .long 1072688960 - .long 0 - .long 1072688704 - .long 0 - .long 1072688448 - .long 0 - .long 1072688192 - .long 0 - .long 1072687936 - .long 0 - .long 1072687680 - .long 0 - .long 1072687424 - .long 0 - .long 1072687168 - .long 0 - .long 1072686912 - .long 0 - .long 1072686656 - .long 0 - .long 1072686400 - .long 0 - .long 1072686144 - .long 0 - .long 1072685888 - .long 0 - .long 1072685632 - .long 0 - .long 1072685376 - .long 0 - .long 1072685120 - .long 0 - .long 1072684864 - .long 0 - .long 1072684608 - .long 0 - .long 1072684352 - .long 0 - .long 1072684096 - .long 0 - .long 1072683840 - .long 0 - .long 1072683584 - .long 0 - .long 1072683328 - .long 0 - .long 1072683072 - .long 0 - .long 1072682816 - .long 0 - .long 1072682560 - .long 0 - .long 1072682304 - .long 0 - .long 1072682048 - .long 0 - .long 1072681792 - .long 0 - .long 1072681600 - .long 0 - .long 1072681344 - .long 0 - .long 1072681088 - .long 0 - .long 1072680832 - .long 0 - .long 1072680576 - .long 0 - .long 1072680320 - .long 0 - .long 1072680064 - .long 0 - .long 1072679808 - .long 0 - .long 1072679552 - .long 0 - .long 1072679296 - .long 0 - .long 1072679040 - .long 0 - .long 1072678784 - .long 0 - .long 1072678528 - .long 0 - .long 1072678272 - .long 0 - .long 1072678016 - .long 0 - .long 1072677760 - .long 0 - .long 1072677504 - .long 0 - .long 1072677248 - .long 0 - .long 1072697344 - .long 0 - .long 1072697280 - .long 0 - .long 1072697216 - .long 0 - .long 1072697152 - .long 0 - .long 1072697088 - .long 0 - .long 1072697024 - .long 0 - .long 1072696960 - .long 0 - .long 1072696896 - .long 0 - .long 1072696832 - .long 0 - .long 1072696768 - .long 0 - .long 1072696704 - .long 0 - .long 1072696640 - .long 0 - .long 1072696576 - .long 0 - .long 1072696512 - .long 0 - .long 1072696448 - .long 0 - .long 1072696384 - .long 0 - .long 1072696320 - .long 0 - .long 1072696256 - .long 0 - .long 1072696192 - .long 0 - .long 1072696128 - .long 0 - .long 1072696064 - .long 0 - .long 1072696000 - .long 0 - .long 1072695936 - .long 0 - .long 1072695872 - .long 0 - .long 1072695808 - .long 0 - .long 1072695744 - .long 0 - .long 1072695680 - .long 0 - .long 1072695616 - .long 0 - .long 1072695552 - .long 0 - .long 1072695488 - .long 0 - .long 1072695424 - .long 0 - .long 1072695360 - .long 0 - .long 1072695296 - .long 0 - .long 1072695232 - .long 0 - .long 1072695168 - .long 0 - .long 1072695104 - .long 0 - .long 1072695040 - .long 0 - .long 1072694976 - .long 0 - .long 1072694912 - .long 0 - .long 1072694848 - .long 0 - .long 1072694784 - .long 0 - .long 1072694720 - .long 0 - .long 1072694656 - .long 0 - .long 1072694592 - .long 0 - .long 1072694528 - .long 0 - .long 1072694464 - .long 0 - .long 1072694400 - .long 0 - .long 1072694336 - .long 0 - .long 1072694272 - .long 0 - .long 1072694208 - .long 0 - .long 1072694144 - .long 0 - .long 1072694080 - .long 0 - .long 1072694016 - .long 0 - .long 1072693952 - .long 0 - .long 1072693888 - .long 0 - .long 1072693824 - .long 0 - .long 1072693760 - .long 0 - .long 1072693696 - .long 0 - .long 1072693632 - .long 0 - .long 1072693568 - .long 0 - .long 1072693504 - .long 0 - .long 1072693440 - .long 0 - .long 1072693376 - .long 0 - .long 1072693312 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .type rcp_t2,@object - .size rcp_t2,1040 - .align 4 -LHN: - .long 1073741824 - .long 3220641095 - .type LHN,@object - .size LHN,8 - .align 4 -rcp_t3: - .long 1073741824 - .long 1073157447 - .long 3221225472 - .long 1073157445 - .long 1073741824 - .long 1073157444 - .long 0 - .long 1073157443 - .long 2147483648 - .long 1073157441 - .long 0 - .long 1073157440 - .long 2147483648 - .long 1073157438 - .long 1073741824 - .long 1073157437 - .long 3221225472 - .long 1073157435 - .long 1073741824 - .long 1073157434 - .long 3221225472 - .long 1073157432 - .long 2147483648 - .long 1073157431 - .long 0 - .long 1073157430 - .long 2147483648 - .long 1073157428 - .long 0 - .long 1073157427 - .long 2147483648 - .long 1073157425 - .long 1073741824 - .long 1073157424 - .long 3221225472 - .long 1073157422 - .long 1073741824 - .long 1073157421 - .long 3221225472 - .long 1073157419 - .long 2147483648 - .long 1073157418 - .long 0 - .long 1073157417 - .long 2147483648 - .long 1073157415 - .long 0 - .long 1073157414 - .long 3221225472 - .long 1073157412 - .long 1073741824 - .long 1073157411 - .long 3221225472 - .long 1073157409 - .long 1073741824 - .long 1073157408 - .long 3221225472 - .long 1073157406 - .long 2147483648 - .long 1073157405 - .long 0 - .long 1073157404 - .long 2147483648 - .long 1073157402 - .long 0 - .long 1073157401 - .long 3221225472 - .long 1073157399 - .long 1073741824 - .long 1073157398 - .long 3221225472 - .long 1073157396 - .long 1073741824 - .long 1073157395 - .long 3221225472 - .long 1073157393 - .long 2147483648 - .long 1073157392 - .long 0 - .long 1073157391 - .long 2147483648 - .long 1073157389 - .long 0 - .long 1073157388 - .long 3221225472 - .long 1073157386 - .long 1073741824 - .long 1073157385 - .long 3221225472 - .long 1073157383 - .long 1073741824 - .long 1073157382 - .long 0 - .long 1073157381 - .long 2147483648 - .long 1073157379 - .long 0 - .long 1073157378 - .long 2147483648 - .long 1073157376 - .long 0 - .long 1073157375 - .long 3221225472 - .long 1073157373 - .long 1073741824 - .long 1073157372 - .long 3221225472 - .long 1073157370 - .long 1073741824 - .long 1073157369 - .long 0 - .long 1073157368 - .long 2147483648 - .long 1073157366 - .long 0 - .long 1073157365 - .long 2147483648 - .long 1073157363 - .long 1073741824 - .long 1073157362 - .long 3221225472 - .long 1073157360 - .long 1073741824 - .long 1073157359 - .long 3221225472 - .long 1073157357 - .long 1073741824 - .long 1073157356 - .long 0 - .long 1073157355 - .long 2147483648 - .long 1073157353 - .long 0 - .long 1073157352 - .long 2147483648 - .long 1073157350 - .long 1073741824 - .long 1073157349 - .long 3221225472 - .long 1073157347 - .long 1073741824 - .long 1073157346 - .long 3221225472 - .long 1073157344 - .long 2147483648 - .long 1073157343 - .long 0 - .long 1073157342 - .long 2147483648 - .long 1073157340 - .long 0 - .long 1073157339 - .long 2147483648 - .long 1073157337 - .long 1073741824 - .long 1073157336 - .long 3221225472 - .long 1073157334 - .long 1073741824 - .long 1073157333 - .long 3221225472 - .long 1073157331 - .long 2147483648 - .long 1073157330 - .long 0 - .long 1073157329 - .long 2147483648 - .long 1073157327 - .long 0 - .long 1073157326 - .long 3221225472 - .long 1073157324 - .long 1073741824 - .long 1073157323 - .long 3221225472 - .long 1073157321 - .long 1073741824 - .long 1073157320 - .long 3221225472 - .long 1073157318 - .long 2147483648 - .long 1073157317 - .long 0 - .long 1073157316 - .long 2147483648 - .long 1073157314 - .long 0 - .long 1073157313 - .long 3221225472 - .long 1073157311 - .long 1073741824 - .long 1073157310 - .long 3221225472 - .long 1073157308 - .long 1073741824 - .long 1073157307 - .long 0 - .long 1073157306 - .long 2147483648 - .long 1073157304 - .long 0 - .long 1073157303 - .long 2147483648 - .long 1073157301 - .long 0 - .long 1073157300 - .long 3221225472 - .long 1073157298 - .long 1073741824 - .long 1073157297 - .long 3221225472 - .long 1073157295 - .long 1073741824 - .long 1073157294 - .long 0 - .long 1073157293 - .long 2147483648 - .long 1073157291 - .long 0 - .long 1073157290 - .long 2147483648 - .long 1073157288 - .long 1073741824 - .long 1073157287 - .long 3221225472 - .long 1073157285 - .long 1073741824 - .long 1073157284 - .long 3221225472 - .long 1073157282 - .long 1073741824 - .long 1073157281 - .long 0 - .long 1073157280 - .long 2147483648 - .long 1073157278 - .long 0 - .long 1073157277 - .long 2147483648 - .long 1073157275 - .long 1073741824 - .long 1073157274 - .long 3221225472 - .long 1073157272 - .long 1073741824 - .long 1073157271 - .long 3221225472 - .long 1073157269 - .long 2147483648 - .long 1073157268 - .long 0 - .long 1073157267 - .long 2147483648 - .long 1073157265 - .long 0 - .long 1073157264 - .long 2147483648 - .long 1073157539 - .long 3221225472 - .long 1073157538 - .long 1073741824 - .long 1073157538 - .long 2147483648 - .long 1073157537 - .long 3221225472 - .long 1073157536 - .long 0 - .long 1073157536 - .long 1073741824 - .long 1073157535 - .long 2147483648 - .long 1073157534 - .long 3221225472 - .long 1073157533 - .long 0 - .long 1073157533 - .long 1073741824 - .long 1073157532 - .long 3221225472 - .long 1073157531 - .long 0 - .long 1073157531 - .long 1073741824 - .long 1073157530 - .long 2147483648 - .long 1073157529 - .long 3221225472 - .long 1073157528 - .long 0 - .long 1073157528 - .long 1073741824 - .long 1073157527 - .long 2147483648 - .long 1073157526 - .long 0 - .long 1073157526 - .long 1073741824 - .long 1073157525 - .long 2147483648 - .long 1073157524 - .long 3221225472 - .long 1073157523 - .long 0 - .long 1073157523 - .long 1073741824 - .long 1073157522 - .long 2147483648 - .long 1073157521 - .long 3221225472 - .long 1073157520 - .long 0 - .long 1073157520 - .long 2147483648 - .long 1073157519 - .long 3221225472 - .long 1073157518 - .long 0 - .long 1073157518 - .long 1073741824 - .long 1073157517 - .long 2147483648 - .long 1073157516 - .long 3221225472 - .long 1073157515 - .long 0 - .long 1073157515 - .long 1073741824 - .long 1073157514 - .long 2147483648 - .long 1073157513 - .long 0 - .long 1073157513 - .long 1073741824 - .long 1073157512 - .long 2147483648 - .long 1073157511 - .long 3221225472 - .long 1073157510 - .long 0 - .long 1073157510 - .long 1073741824 - .long 1073157509 - .long 2147483648 - .long 1073157508 - .long 3221225472 - .long 1073157507 - .long 0 - .long 1073157507 - .long 2147483648 - .long 1073157506 - .long 3221225472 - .long 1073157505 - .long 0 - .long 1073157505 - .long 1073741824 - .long 1073157504 - .long 2147483648 - .long 1073157503 - .long 3221225472 - .long 1073157502 - .long 0 - .long 1073157502 - .long 1073741824 - .long 1073157501 - .long 3221225472 - .long 1073157500 - .long 0 - .long 1073157500 - .long 1073741824 - .long 1073157499 - .long 2147483648 - .long 1073157498 - .long 3221225472 - .long 1073157497 - .long 0 - .long 1073157497 - .long 1073741824 - .long 1073157496 - .long 2147483648 - .long 1073157495 - .long 3221225472 - .long 1073157494 - .long 1073741824 - .long 1073157494 - .long 2147483648 - .long 1073157493 - .long 3221225472 - .long 1073157492 - .long 0 - .long 1073157492 - .long 1073741824 - .long 1073157491 - .long 2147483648 - .long 1073157490 - .long 3221225472 - .long 1073157489 - .long 0 - .long 1073157489 - .long 1073741824 - .long 1073157488 - .long 3221225472 - .long 1073157487 - .long 0 - .long 1073157487 - .long 1073741824 - .long 1073157486 - .long 2147483648 - .long 1073157485 - .long 3221225472 - .long 1073157484 - .long 0 - .long 1073157484 - .long 1073741824 - .long 1073157483 - .long 2147483648 - .long 1073157482 - .long 0 - .long 1073157482 - .long 1073741824 - .long 1073157481 - .long 2147483648 - .long 1073157480 - .long 3221225472 - .long 1073157479 - .long 0 - .long 1073157479 - .long 1073741824 - .long 1073157478 - .long 2147483648 - .long 1073157477 - .long 3221225472 - .long 1073157476 - .long 0 - .long 1073157476 - .long 2147483648 - .long 1073157475 - .long 3221225472 - .long 1073157474 - .long 0 - .long 1073157474 - .long 1073741824 - .long 1073157473 - .long 2147483648 - .long 1073157472 - .long 3221225472 - .long 1073157471 - .long 0 - .long 1073157471 - .long 1073741824 - .long 1073157470 - .long 2147483648 - .long 1073157469 - .long 0 - .long 1073157469 - .long 1073741824 - .long 1073157468 - .long 2147483648 - .long 1073157467 - .long 3221225472 - .long 1073157466 - .long 0 - .long 1073157466 - .long 1073741824 - .long 1073157465 - .long 2147483648 - .long 1073157464 - .long 3221225472 - .long 1073157463 - .long 0 - .long 1073157463 - .long 2147483648 - .long 1073157462 - .long 3221225472 - .long 1073157461 - .long 0 - .long 1073157461 - .long 1073741824 - .long 1073157460 - .long 2147483648 - .long 1073157459 - .long 3221225472 - .long 1073157458 - .long 0 - .long 1073157458 - .long 1073741824 - .long 1073157457 - .long 3221225472 - .long 1073157456 - .long 0 - .long 1073157456 - .long 1073741824 - .long 1073157455 - .long 2147483648 - .long 1073157454 - .long 3221225472 - .long 1073157453 - .long 0 - .long 1073157453 - .long 1073741824 - .long 1073157452 - .long 2147483648 - .long 1073157451 - .long 3221225472 - .long 1073157450 - .long 1073741824 - .long 1073157450 - .long 2147483648 - .long 1073157449 - .long 3221225472 - .long 1073157448 - .long 0 - .long 1073157448 - .long 1073741824 - .long 1073157447 - .long 0 - .long 0 - .type rcp_t3,@object - .size rcp_t3,2064 - .align 4 -Shifter: - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .type Shifter,@object - .size Shifter,16 - .align 4 -NEG_ZERO: - .long 0 - .long 2147483648 - .type NEG_ZERO,@object - .size NEG_ZERO,8 - .align 4 -NEG_INF: - .long 0 - .long 4293918720 - .type NEG_INF,@object - .size NEG_INF,8 - .align 4 -sNaN: - .long 1 - .long 2146435072 - .type sNaN,@object - .size sNaN,8 - .align 4 -INF: - .long 0 - .long 2146435072 - .type INF,@object - .size INF,8 - .align 4 -EMIN: - .long 0 - .long 1048576 - .type EMIN,@object - .size EMIN,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/powf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/powf_gen.S deleted file mode 100644 index f841ac81fe..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/powf_gen.S +++ /dev/null @@ -1,892 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "powf_gen.c" - .text -..TXTST0: -# -- Begin powf - .text - .align 16,0x90 - .globl powf -powf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_powf.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movss %xmm0, 16(%rsp) - movss %xmm1, 24(%rsp) -..B1.2: - movq $0x3ff0000000000000, %r8 - movd %r8, %xmm5 - movd %xmm0, %eax - lea B_table(%rip), %r11 - psllq $32, %xmm0 - psrlq $3, %xmm0 - cvtss2sd %xmm1, %xmm1 - movapd cv(%rip), %xmm6 - orpd %xmm0, %xmm5 - movl $2130706431, %ecx - movl %eax, %edx - subl $8388608, %edx - cmpl %edx, %ecx - jb .L_2TAG_PACKET_0.0.2 - movl $0, %ecx - shrl $16, %eax -.L_2TAG_PACKET_1.0.2: -.L_2TAG_PACKET_2.0.2: - movl $127, %edx - andl %eax, %edx - addl $1, %edx - andl $254, %edx - movq (%r11,%rdx,8), %xmm3 - movl $130944, %r8d - addl %edx, %r8d - movd %r8, %xmm7 - movq 8(%r11,%rdx,8), %xmm0 - addl $65, %eax - sarl $7, %eax - subl $127, %eax - cvtsi2sd %eax, %xmm4 - psllq $45, %xmm7 - subsd %xmm7, %xmm5 - movl %eax, %edx - sarl $31, %eax - addl %eax, %edx - xorl %edx, %eax - movapd 16+cv(%rip), %xmm2 - mulsd %xmm3, %xmm5 - movq $0x42e8000000000000, %r9 - movd %r9, %xmm3 - pshufd $68, %xmm5, %xmm7 - addsd %xmm5, %xmm0 - bsr %eax, %eax - mulpd %xmm7, %xmm6 - mulpd %xmm7, %xmm7 - addsd %xmm4, %xmm0 - pextrw $3, %xmm1, %edx - addpd %xmm2, %xmm6 - andl $32752, %edx - shrl $4, %edx - subl $993, %eax - addl %edx, %eax - cmpl $35, %eax - jae .L_2TAG_PACKET_3.0.2 - mulsd %xmm1, %xmm0 - mulsd %xmm7, %xmm7 - movq %xmm0, %xmm4 - addsd %xmm3, %xmm0 - mulpd %xmm7, %xmm6 - movd %xmm0, %eax - subsd %xmm3, %xmm0 - pshufd $238, %xmm6, %xmm7 - subsd %xmm0, %xmm4 - addsd %xmm7, %xmm6 - movapd cev(%rip), %xmm7 - mulsd %xmm6, %xmm1 - movapd 16+cev(%rip), %xmm2 - xorpd %xmm6, %xmm6 - addsd %xmm1, %xmm4 - pshufd $68, %xmm4, %xmm5 - movl %eax, %edx - sarl $1, %edx - andl $31, %eax - movq 1056(%r11,%rax,8), %xmm3 - orl $16368, %ecx - andl $-16, %edx - addl %edx, %ecx - pinsrw $3, %ecx, %xmm6 - mulpd %xmm5, %xmm7 - mulsd %xmm5, %xmm5 - mulsd %xmm3, %xmm4 - addpd %xmm7, %xmm2 - mulsd %xmm6, %xmm3 - mulsd %xmm2, %xmm5 - pshufd $238, %xmm2, %xmm0 - mulsd %xmm6, %xmm4 - addsd %xmm5, %xmm0 - mulsd %xmm4, %xmm0 - addsd %xmm0, %xmm3 - cvtpd2ps %xmm3, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - movq ABSVALMASK(%rip), %xmm3 - movd %xmm1, %edx - movq %xmm1, %xmm0 - movq %xmm1, %xmm7 - andpd %xmm3, %xmm0 - psrlq $32, %xmm0 - movd %xmm0, %ecx - cmpl $2146435072, %ecx - jae .L_2TAG_PACKET_4.0.2 - orl %ecx, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_5.0.2 - movl 16(%rsp), %edx - cmpl $2139095039, %edx - jbe .L_2TAG_PACKET_6.0.2 - movl 24(%rsp), %eax - movl %eax, %r9d - shrl $23, %r9d - andl $255, %r9d - subl $127, %r9d - movl %r9d, %ecx - sarl $31, %ecx - notl %ecx - addl $8, %r9d - andl %r9d, %ecx - subl $32, %ecx - movl %ecx, %r8d - sarl $31, %r8d - andl %r8d, %ecx - addl $32, %ecx - andl $8388607, %eax - orl $8388608, %eax - shlq %cl, %rax - andl $2147483647, %edx - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_7.0.2 - testl $2147483647, %eax - jne .L_2TAG_PACKET_8.0.2 - movl %eax, %ecx - shrl $16, %ecx - cmpl $8388608, %edx - jb .L_2TAG_PACKET_9.0.2 - movl 16(%rsp), %eax - shrl $16, %eax - andl $32767, %eax - jmp .L_2TAG_PACKET_1.0.2 -.L_2TAG_PACKET_4.0.2: - movss 16(%rsp), %xmm0 - movd %xmm0, %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - ja .L_2TAG_PACKET_10.0.2 - jmp .L_2TAG_PACKET_11.0.2 -.L_2TAG_PACKET_10.0.2: - movss 16(%rsp), %xmm0 - addss %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_6.0.2: - movl $0, %ecx -.L_2TAG_PACKET_9.0.2: - xorpd %xmm0, %xmm0 - movl $24448, %edx - pinsrw $1, %edx, %xmm0 - movss 16(%rsp), %xmm4 - movq EXPMASK(%rip), %xmm5 - mulss %xmm0, %xmm4 - movd %xmm4, %edx - andl $2147483647, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_12.0.2 - pextrw $1, %xmm4, %eax - movaps %xmm4, %xmm0 - andps ABSVALS(%rip), %xmm4 - psllq $29, %xmm0 - orpd %xmm0, %xmm5 - andl $32767, %eax - subl $8192, %eax - jmp .L_2TAG_PACKET_2.0.2 -.L_2TAG_PACKET_13.0.2: - movl 24(%rsp), %edx - andl $-2147483648, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_14.0.2 - movss ONEMASK(%rip), %xmm0 - xorps %xmm4, %xmm4 - divss %xmm4, %xmm0 -.L_2TAG_PACKET_15.0.2: - movl $33, (%rsp) - jmp .L_2TAG_PACKET_16.0.2 -.L_2TAG_PACKET_12.0.2: - movl 24(%rsp), %edx - andl $-2147483648, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_17.0.2 - shll $16, %ecx - movl 16(%rsp), %edx - andl %ecx, %edx - orl $2139095040, %edx - movd %edx, %xmm0 - movss ONEMASK(%rip), %xmm5 - divss %xmm4, %xmm5 - jmp .L_2TAG_PACKET_15.0.2 -.L_2TAG_PACKET_17.0.2: - shll $16, %ecx - movd %xmm4, %edx - andl %ecx, %edx - cmpl $0, %edx - jne .L_2TAG_PACKET_18.0.2 - xorps %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_7.0.2: - movl 16(%rsp), %edx - cmpl $2139095040, %edx - je .L_2TAG_PACKET_19.0.2 - andl $2147483647, %edx - cmpl $2139095040, %edx - ja .L_2TAG_PACKET_10.0.2 - cmpl $-2147483648, %eax - jne .L_2TAG_PACKET_20.0.2 - pextrw $3, %xmm1, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_21.0.2 -.L_2TAG_PACKET_18.0.2: - movl $-2147483648, %eax - movd %rax, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_21.0.2: - movl $-8388608, %eax - movd %rax, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_20.0.2: - pextrw $3, %xmm1, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_22.0.2 - xorps %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_19.0.2: - pextrw $3, %xmm1, %eax - andl $32768, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_22.0.2 - xorps %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_8.0.2: - cmpl $0, %edx - je .L_2TAG_PACKET_13.0.2 - movss sNaN(%rip), %xmm0 - mulss %xmm0, %xmm0 - movl $34, (%rsp) - jmp .L_2TAG_PACKET_16.0.2 -.L_2TAG_PACKET_11.0.2: - movss 16(%rsp), %xmm4 - movss 24(%rsp), %xmm1 - movl 24(%rsp), %eax - movl %eax, %ecx - andl $2147483647, %eax - cmpl $2139095040, %eax - ja .L_2TAG_PACKET_23.0.2 - andl $-2147483648, %ecx - movd %xmm4, %edx - movl $2147483647, %eax - andl %edx, %eax - je .L_2TAG_PACKET_12.0.2 - xorl $-1082130432, %edx - cmpl $0, %edx - je .L_2TAG_PACKET_24.0.2 - cmpl $0, %ecx - je .L_2TAG_PACKET_25.0.2 - movd %xmm4, %eax - andl $2147483647, %eax - cmpl $1065353216, %eax - jae .L_2TAG_PACKET_14.0.2 - jmp .L_2TAG_PACKET_22.0.2 -.L_2TAG_PACKET_14.0.2: - xorps %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_24.0.2: - stmxcsr 4(%rsp) - andl $-34, 4(%rsp) - ldmxcsr 4(%rsp) - movl $1065353216, %eax - movd %rax, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_25.0.2: - pextrw $1, %xmm4, %eax - andl $32640, %eax - cmpl $16256, %eax - jae .L_2TAG_PACKET_22.0.2 - xorps %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_22.0.2: - movl $2139095040, %eax - movd %rax, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_26.0.2: - movl $32, (%rsp) - jmp .L_2TAG_PACKET_16.0.2 -.L_2TAG_PACKET_27.0.2: - movl $35, (%rsp) - jmp .L_2TAG_PACKET_16.0.2 -.L_2TAG_PACKET_23.0.2: - movss 24(%rsp), %xmm0 - addss %xmm0, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_5.0.2: - movss 16(%rsp), %xmm4 - movss 24(%rsp), %xmm1 - movd %xmm4, %eax - movss ONEMASK(%rip), %xmm0 - cmpl $0, %eax - je .L_2TAG_PACKET_26.0.2 - movd %xmm4, %eax - xorps %xmm2, %xmm2 - addss %xmm2, %xmm4 - andl $2147483647, %eax - cmpl $2139095040, %eax - ja .L_2TAG_PACKET_27.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_28.0.2: - mulsd %xmm7, %xmm7 - mulpd %xmm7, %xmm6 - pshufd $238, %xmm6, %xmm7 - addsd %xmm7, %xmm0 - mulsd %xmm1, %xmm0 - movapd cev(%rip), %xmm7 - mulsd %xmm6, %xmm1 - movq %xmm0, %xmm4 - addsd %xmm3, %xmm0 - movd %xmm0, %eax - subsd %xmm3, %xmm0 - subsd %xmm0, %xmm4 - movapd 16+cev(%rip), %xmm2 - xorpd %xmm6, %xmm6 - addsd %xmm1, %xmm4 - pshufd $68, %xmm4, %xmm5 - movl %eax, %edx - sarl $1, %edx - andl $31, %eax - movq 1056(%r11,%rax,8), %xmm3 - orl $16368, %ecx - andl $-16, %edx - addl %edx, %ecx - pinsrw $3, %ecx, %xmm6 - mulpd %xmm5, %xmm7 - mulsd %xmm5, %xmm5 - mulsd %xmm3, %xmm4 - addpd %xmm7, %xmm2 - mulsd %xmm6, %xmm3 - mulsd %xmm6, %xmm4 - mulsd %xmm2, %xmm5 - pshufd $238, %xmm2, %xmm0 - addsd %xmm5, %xmm0 - mulsd %xmm4, %xmm0 - addsd %xmm3, %xmm0 - cvtpd2ps %xmm0, %xmm0 - pextrw $1, %xmm0, %eax - andl $32767, %eax - cmpl $32640, %eax - jae .L_2TAG_PACKET_29.0.2 - cmpl $16, %eax - jb .L_2TAG_PACKET_30.0.2 - jmp ..B1.5 -.L_2TAG_PACKET_31.0.2: - orl $32639, %ecx - xorpd %xmm0, %xmm0 - pinsrw $1, %ecx, %xmm0 - addss %xmm0, %xmm0 -.L_2TAG_PACKET_29.0.2: - movl $30, (%rsp) - jmp .L_2TAG_PACKET_16.0.2 -.L_2TAG_PACKET_32.0.2: - movl $8388608, %eax - movd %eax, %xmm5 - mulss %xmm5, %xmm5 - xorpd %xmm0, %xmm0 - pinsrw $1, %ecx, %xmm0 -.L_2TAG_PACKET_30.0.2: - movl $31, (%rsp) - jmp .L_2TAG_PACKET_16.0.2 -.L_2TAG_PACKET_3.0.2: - movl 16(%rsp), %edx - cmpl $1065353216, %edx - je .L_2TAG_PACKET_24.0.2 - movl 24(%rsp), %edx - andl $2147483647, %edx - cmpl $2139095040, %edx - jae .L_2TAG_PACKET_11.0.2 - cmpl $0, %edx - je .L_2TAG_PACKET_5.0.2 - cmpl $0, %eax - jl .L_2TAG_PACKET_33.0.2 - cmpl $38, %eax - jb .L_2TAG_PACKET_28.0.2 - movl 16(%rsp), %edx - andl $2139095040, %edx - subl $1056964608, %edx - cmpl $8388608, %edx - jbe .L_2TAG_PACKET_34.0.2 -.L_2TAG_PACKET_35.0.2: - movl 16(%rsp), %eax - movl 24(%rsp), %edx - andl $2139095040, %eax - subl $1065353216, %eax - xorl %edx, %eax - andl $-2147483648, %eax - cmpl $0, %eax - je .L_2TAG_PACKET_31.0.2 - jmp .L_2TAG_PACKET_32.0.2 -.L_2TAG_PACKET_34.0.2: - movss 16(%rsp), %xmm4 - movl $1065353216, %eax - movd %eax, %xmm2 - pslld $1, %xmm4 - psrld $1, %xmm4 - subss %xmm4, %xmm2 - movd %xmm2, %edx - andl $2139095040, %edx - je .L_2TAG_PACKET_33.0.2 - movq %xmm1, %xmm4 - mulsd %xmm0, %xmm4 - pextrw $3, %xmm4, %eax - andl $32752, %eax - cmpl $16496, %eax - jb .L_2TAG_PACKET_28.0.2 - jmp .L_2TAG_PACKET_35.0.2 -.L_2TAG_PACKET_33.0.2: - shll $16, %ecx - orl $1065353216, %ecx - movd %ecx, %xmm0 - jmp ..B1.5 -.L_2TAG_PACKET_16.0.2: - movss %xmm0, 8(%rsp) -..B1.3: - movss 8(%rsp), %xmm0 -.L_2TAG_PACKET_36.0.2: -..B1.5: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type powf,@function - .size powf,.-powf - .data -# -- End powf - .section .rodata, "a" - .align 16 - .align 16 -B_table: - .long 1697350398 - .long 1073157447 - .long 0 - .long 0 - .long 3983912013 - .long 1073134173 - .long 2244132864 - .long 1066854294 - .long 3077571303 - .long 1073111605 - .long 1972305920 - .long 1067891411 - .long 787997771 - .long 1073089711 - .long 2678235136 - .long 1068559160 - .long 2608086797 - .long 1073068460 - .long 4207480832 - .long 1068917750 - .long 4250927815 - .long 1073047825 - .long 1085124608 - .long 1069271106 - .long 4006130247 - .long 1073027780 - .long 2363127808 - .long 1069583448 - .long 2255915958 - .long 1073008300 - .long 3799560192 - .long 1069755113 - .long 1031537321 - .long 1072989361 - .long 972806144 - .long 1069924378 - .long 3606154084 - .long 1072970940 - .long 3492741120 - .long 1070091307 - .long 1235818328 - .long 1072953018 - .long 766832640 - .long 1070255966 - .long 2880061438 - .long 1072935573 - .long 1278367744 - .long 1070418414 - .long 525144062 - .long 1072918588 - .long 3103942656 - .long 1070578710 - .long 3251485016 - .long 1072902043 - .long 3671264256 - .long 1070666503 - .long 2604098795 - .long 1072885923 - .long 2869823488 - .long 1070744583 - .long 2408035495 - .long 1072870211 - .long 3466906624 - .long 1070821668 - .long 1357880318 - .long 1072854892 - .long 1271733248 - .long 1070897784 - .long 1394140652 - .long 1072839951 - .long 972806144 - .long 1070972954 - .long 3210356685 - .long 1072825374 - .long 3449621504 - .long 1071047201 - .long 1774519652 - .long 1072811149 - .long 1662393344 - .long 1071120549 - .long 3338441873 - .long 1072797262 - .long 2300516352 - .long 1071193018 - .long 3804456356 - .long 1072783702 - .long 176119808 - .long 1071264630 - .long 1462910403 - .long 1072770458 - .long 4147676160 - .long 1071335403 - .long 1149890700 - .long 1072757518 - .long 2905168896 - .long 1071405359 - .long 1234436653 - .long 1072744872 - .long 3761433600 - .long 1071474515 - .long 2089211650 - .long 1072732510 - .long 2716292096 - .long 1071542890 - .long 1684223316 - .long 1072720423 - .long 1758136320 - .long 1071610501 - .long 4072784951 - .long 1072708601 - .long 2341968384 - .long 1071661018 - .long 2114454037 - .long 1072697037 - .long 14039552 - .long 1071694085 - .long 2012861074 - .long 1072678195 - .long 4204914176 - .long 1071726793 - .long 2037138800 - .long 1072656045 - .long 513134592 - .long 1071759153 - .long 3417210877 - .long 1072634361 - .long 3559335936 - .long 1071791169 - .long 3694789629 - .long 1072613129 - .long 1904282624 - .long 3218771961 - .long 2992528814 - .long 1072592335 - .long 714524672 - .long 3218709255 - .long 3882342941 - .long 1072571965 - .long 180337664 - .long 3218647192 - .long 2671772639 - .long 1072552007 - .long 47131648 - .long 3218585759 - .long 2172608510 - .long 1072532448 - .long 1751500800 - .long 3218524943 - .long 3001586108 - .long 1072513276 - .long 4058951680 - .long 3218464732 - .long 3477449063 - .long 1072494480 - .long 2999895040 - .long 3218405115 - .long 3818975826 - .long 1072476049 - .long 398715904 - .long 3218346080 - .long 1758664544 - .long 1072457973 - .long 3815829504 - .long 3218287614 - .long 1046539701 - .long 1072440241 - .long 722717696 - .long 3218229709 - .long 2778964739 - .long 1072422843 - .long 1399058432 - .long 3218172352 - .long 1026978211 - .long 1072405771 - .long 227933184 - .long 3218115534 - .long 4238694625 - .long 1072389014 - .long 2835759104 - .long 3218038744 - .long 811117725 - .long 1072372566 - .long 3554951168 - .long 3217927202 - .long 1975098645 - .long 1072356416 - .long 2818570240 - .long 3217816679 - .long 3079413536 - .long 1072340557 - .long 3041732608 - .long 3217707156 - .long 712695513 - .long 1072324982 - .long 180338688 - .long 3217598616 - .long 1238508315 - .long 1072309682 - .long 835166208 - .long 3217491040 - .long 3563503614 - .long 1072294650 - .long 704622592 - .long 3217384412 - .long 3383126459 - .long 1072279880 - .long 1695342592 - .long 3217278715 - .long 1724836050 - .long 1072265365 - .long 3266000896 - .long 3217173933 - .long 608820196 - .long 1072251098 - .long 2363885568 - .long 3217070051 - .long 3005930546 - .long 1072237072 - .long 3908239360 - .long 3216902938 - .long 4207804139 - .long 1072223282 - .long 448159744 - .long 3216698681 - .long 378851326 - .long 1072209723 - .long 2530197504 - .long 3216496132 - .long 1405092650 - .long 1072196387 - .long 4268273664 - .long 3216295264 - .long 795096448 - .long 1072183270 - .long 2785038336 - .long 3216096050 - .long 1417164049 - .long 1072170366 - .long 522182656 - .long 3215814333 - .long 2583387630 - .long 1072157670 - .long 3386466304 - .long 3215422356 - .long 20099889 - .long 1072145178 - .long 3838140416 - .long 3215033528 - .long 3019600065 - .long 1072132883 - .long 2250194944 - .long 3214361582 - .long 53601996 - .long 1072120783 - .long 2718924800 - .long 3213307003 - .long 1697350398 - .long 1072108871 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 3541402996 - .long 1072716208 - .long 1828292879 - .long 1072739672 - .long 3490863953 - .long 1072763649 - .long 1014845819 - .long 1072788152 - .long 828946858 - .long 1072813191 - .long 1853186616 - .long 1072838778 - .long 4112506593 - .long 1072864925 - .long 171030293 - .long 1072891646 - .long 926591435 - .long 1072918951 - .long 1276261410 - .long 1072946854 - .long 1617004845 - .long 1072975368 - .long 3577096743 - .long 1073004506 - .long 1453150082 - .long 1073034283 - .long 3712504873 - .long 1073064711 - .long 2956612997 - .long 1073095806 - .long 1719614413 - .long 1073127582 - .long 3907805044 - .long 1073160053 - .long 1944781191 - .long 1073193236 - .long 2571947539 - .long 1073227145 - .long 1110089947 - .long 1073261797 - .long 2966275557 - .long 1073297207 - .long 2191782032 - .long 1073333393 - .long 2990417245 - .long 1073370371 - .long 2572866477 - .long 1073408159 - .long 4076559943 - .long 1073446774 - .long 3716502172 - .long 1073486235 - .long 3706687593 - .long 1073526560 - .long 3707479175 - .long 1073567768 - .long 863738719 - .long 1073609879 - .long 2728693978 - .long 1073652911 - .long 1533953344 - .long 1073696886 - .type B_table,@object - .size B_table,1312 - .align 16 -cv: - .long 531389993 - .long 1067950900 - .long 4289495988 - .long 1069842387 - .long 2705553552 - .long 3216330822 - .long 4277811695 - .long 3218484802 - .type cv,@object - .size cv,32 - .align 16 -cev: - .long 1874480759 - .long 1065595563 - .long 4286760334 - .long 1070514109 - .long 3607404735 - .long 1068264200 - .long 4277811695 - .long 1072049730 - .type cev,@object - .size cev,32 - .align 16 -ABSVALMASK: - .long 4294967295 - .long 2147483647 - .type ABSVALMASK,@object - .size ABSVALMASK,8 - .space 8, 0x00 # pad - .align 16 -ABSVALS: - .long 2147483647 - .long 0 - .long 0 - .long 0 - .type ABSVALS,@object - .size ABSVALS,16 - .align 8 -EXPMASK: - .long 0 - .long 1072693248 - .type EXPMASK,@object - .size EXPMASK,8 - .align 4 -ONEMASK: - .long 1065353216 - .type ONEMASK,@object - .size ONEMASK,4 - .align 4 -sNaN: - .long 2139095041 - .type sNaN,@object - .size sNaN,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/powl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/powl.S deleted file mode 100644 index 564551d4bc..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/powl.S +++ /dev/null @@ -1,2945 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "powl.c" - .text -..TXTST0: -# -- Begin powl - .text - .align 16,0x90 - .globl powl -powl: -# parameter 1: 336 + %rsp -# parameter 2: 352 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_powl.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $280, %rsp - .cfi_def_cfa_offset 336 - xorb %r10b, %r10b - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 264(%rsp) -..B1.2: - fnstcw 250(%rsp) -..B1.3: - movzbl 345(%rsp), %ecx - xorl %r15d, %r15d - shrl $7, %ecx - movzwl 344(%rsp), %r14d - shll $15, %ecx - andl $32767, %r14d - movl 340(%rsp), %edx - orl %r14d, %ecx - movl %edx, %eax - movzbl 361(%rsp), %r8d - shrl $7, %r8d - shll $16, %ecx - shrl $16, %eax - movzwl 360(%rsp), %r12d - orl %eax, %ecx - shll $15, %r8d - andl $32767, %r12d - movl 356(%rsp), %eax - orl %r12d, %r8d - movl %eax, %ebx - movl %ecx, %r9d - shll $16, %r8d - andl $2147483647, %r9d - shrl $16, %ebx - cmpl $1073709056, %r9d - movl %ecx, %r13d - setb %r15b - orl %ebx, %r8d - movl %r8d, %ebp - andl $2147483647, %r8d - shrl $31, %ebp - movl %ebp, 128(%rsp) - xorl %ebp, %r15d - movl %r8d, %ebp - orl %eax, %ebp - shrl $31, %r13d - movl 352(%rsp), %r11d - orl %r11d, %ebp - movl 336(%rsp), %ebx - movl %r15d, 256(%rsp) - je ..B1.5 -..B1.4: - addl $-1073709056, %ecx - lea -2147483648(%rdx), %r15d - orl %r15d, %ecx - movl %r15d, 24(%rsp) - orl %ebx, %ecx - jne ..B1.11 -..B1.5: - cmpl $2147450880, %r8d - jae ..B1.8 -..B1.6: - cmpl $2147450880, %r9d - jb ..B1.9 -..B1.7: - addl $-2147483648, %edx - orl %ebx, %edx - je ..B1.9 -..B1.8: - fldt 336(%rsp) - fldt 352(%rsp) - fmulp %st, %st(1) - fstpt 224(%rsp) -..B1.9: - lea _ones(%rip), %rax - movq 264(%rsp), %rdx - xorq %rsp, %rdx - cmpq %fs:40, %rdx - movsd (%rax), %xmm0 - jne ..B1.155 -..B1.10: - movsd %xmm0, (%rsp) - fldl (%rsp) - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.11: - xorl %ecx, %ecx - lea -1073709056(%r8), %r15d - movq %rcx, 16(%rsp) - cmpl $4194304, %r15d - movq %rcx, 240(%rsp) - movl %r15d, 8(%rsp) - jae ..B1.16 -..B1.12: - movl %r8d, %edi - shrl $16, %edi - cmpl $1075806208, %r8d - ja ..B1.14 -..B1.13: - movl %edi, %ecx - movl %eax, %ebp - negl %ecx - addl $30, %ecx - shrl %cl, %ebp - movl %ebp, (%rsp) - lea 2(%rdi), %ecx - movl %eax, %ebp - shll %cl, %ebp - orl %r11d, %ebp - cmpl $1075740672, %r8d - cmova %r11d, %ebp - jmp ..B1.15 -..B1.14: - movl %edi, %ecx - movl %r11d, %ebp - negl %ecx - xorl %r15d, %r15d - addl $30, %ecx - shrl %cl, %ebp - movl %ebp, (%rsp) - lea 2(%rdi), %ecx - movl %r11d, %ebp - shll %cl, %ebp - cmpl $1077837824, %r8d - cmovae %r15d, %ebp -..B1.15: - xorl %ecx, %ecx - andl $1, (%rsp) - movl %r13d, %r15d - cmove %rcx, %r15 - movl (%rsp), %ecx - movq %r15, 240(%rsp) - movq %rcx, 16(%rsp) - jmp ..B1.17 -..B1.16: - xorl %ecx, %ecx - cmpl $1073709056, %r8d - cmovae %ecx, %ebp -..B1.17: - cmpl $32767, %r14d - je ..B1.233 -..B1.18: - cmpl $32767, %r12d - je ..B1.189 -..B1.19: - movl %edx, %ecx - andl $2147483647, %ecx - orl %ebx, %ecx - jne ..B1.26 -..B1.20: - movl %edx, %ecx - orl %r9d, %ecx - jne ..B1.26 -..B1.21: - movl $1, %edx - xorl %ecx, %ecx - testl %ebp, %ebp - cmove %edx, %ecx - movq 240(%rsp), %rax - andl %ecx, %eax - cmpl $0, 128(%rsp) - jne ..B1.157 -..B1.22: - cmpl $65536, %r8d - jae ..B1.24 -..B1.23: - lea _smallest_value_64(%rip), %rdx - movq (%rdx), %rcx - movq %rcx, 216(%rsp) -..B1.24: - movl %eax, %eax - lea _zeros(%rip), %rdx - movq 264(%rsp), %rcx - xorq %rsp, %rcx - cmpq %fs:40, %rcx - movsd (%rdx,%rax,8), %xmm0 - jne ..B1.155 -..B1.25: - movsd %xmm0, (%rsp) - fldl (%rsp) - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.26: - testl %r13d, %r13d - je ..B1.32 -..B1.27: - cmpl $1077837824, %r8d - jae ..B1.29 -..B1.28: - testl %ebp, %ebp - jne ..B1.160 -..B1.29: - lea -1073709056(%r9), %ecx - orl 24(%rsp), %ecx - orl %ebx, %ecx - jne ..B1.32 -..B1.30: - lea _ones(%rip), %rax - movq 16(%rsp), %rdx - movq 264(%rsp), %rcx - xorq %rsp, %rcx - movsd (%rax,%rdx,8), %xmm0 - cmpq %fs:40, %rcx - jne ..B1.155 -..B1.31: - movsd %xmm0, (%rsp) - fldl (%rsp) - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.32: - lea -65536(%r9), %r12d - lea -65536(%r8), %ecx - orl %ecx, %r12d - testl $-2147483648, %r12d - je ..B1.34 -..B1.33: - lea _smallest_value_64(%rip), %rcx - movq (%rcx), %r12 - movq %r12, 216(%rsp) -..B1.34: - movl %eax, %ecx - andl $2147483647, %ecx - orl %r11d, %ecx - jne ..B1.67 -..B1.35: - cmpl $1073709056, %r8d - jne ..B1.47 -..B1.36: - cmpl $0, 128(%rsp) - je ..B1.45 -..B1.37: - movzwl 250(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.41 -..B1.38: - orl $-64768, %edx - movw %dx, 248(%rsp) -..B1.39: - fldcw 248(%rsp) -..B1.40: - movb $1, %r10b -..B1.41: - fldt 336(%rsp) - lea _ones(%rip), %rax - testb %r10b, %r10b - movsd (%rax), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fdivp %st, %st(1) - fstpt 144(%rsp) - je ..B1.43 -..B1.42: - fldcw 250(%rsp) -..B1.43: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.44: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.45: - fldt 336(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.46: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.47: - cmpl $1073643520, %r8d - jne ..B1.67 -..B1.48: - movzwl 250(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.52 -..B1.49: - orl $-64768, %edx - movw %dx, 248(%rsp) -..B1.50: - fldcw 248(%rsp) -..B1.51: - movb $1, %r10b -..B1.52: - cmpl $0, 128(%rsp) - je ..B1.60 -..B1.53: - fldt 336(%rsp) - lea _ones(%rip), %rcx - movzbl 345(%rsp), %ebp - shrl $7, %ebp - movzwl 344(%rsp), %eax - shll $15, %ebp - andl $32767, %eax - orl %eax, %ebp - shll $16, %ebp - movzwl 342(%rsp), %edx - orl %edx, %ebp - fstpt 32(%rsp) - fldt 32(%rsp) - fstp %st(0) - fldl (%rcx) - fstpt (%rsp) - fldt (%rsp) - lea -536838144(%rbp), %ebx - cmpl $1073741824, %ebx - jbe ..B1.57 -..B1.54: - cmpl $536838144, %ebp - jae ..B1.56 -..B1.55: - fldt 32(%rsp) - lea _invsqrtl_scales(%rip), %rax - lea 16+_invsqrtl_scales(%rip), %rdx - fldt (%rax) - fmulp %st, %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - fstp %st(0) - fldt (%rdx) - fstpt (%rsp) - jmp ..B1.57 -..B1.56: - fldt 32(%rsp) - lea 32+_invsqrtl_scales(%rip), %rax - lea 48+_invsqrtl_scales(%rip), %rdx - fldt (%rax) - fmulp %st, %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - fstp %st(0) - fldt (%rdx) - fstpt (%rsp) -..B1.57: - fldt 32(%rsp) - lea _TWO_43H(%rip), %rax - fld %st(0) - fxch %st(1) - fdivr %st, %st(2) - fxch %st(2) - fstpt 64(%rsp) - fldl (%rax) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(1) - fstpt 32(%rsp) -..B1.58: - fldt 64(%rsp) - fsqrt - fstpt 96(%rsp) -..B1.59: - fldt 96(%rsp) - fld %st(0) - fldt 16(%rsp) - fld %st(0) - fldt 32(%rsp) - fmul %st(4), %st - fldl (%rax) - lea 8+_ones(%rip), %rax - fmul %st(5), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(3) - fsubr %st(5), %st - fmul %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fld %st(1) - fxch %st(3) - fmul %st(4), %st - fmul %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fmul %st(3), %st - fldt .L_2il0floatpacket.0(%rip) - fldt (%rsp) - fxch %st(2) - faddl (%rax) - faddp %st, %st(4) - fxch %st(5) - fmulp %st, %st(3) - fxch %st(4) - fmulp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 144(%rsp) - jmp ..B1.63 -..B1.60: - fldt 336(%rsp) - fstpt 48(%rsp) -..B1.61: - fldt 48(%rsp) - fsqrt - fstpt 80(%rsp) -..B1.62: - fldt 80(%rsp) - fstpt 144(%rsp) -..B1.63: - testb %r10b, %r10b - je ..B1.65 -..B1.64: - fldcw 250(%rsp) -..B1.65: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.66: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.67: - movzwl 250(%rsp), %r11d - movl %r11d, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.71 -..B1.68: - orl $-64768, %r11d - movw %r11w, 248(%rsp) -..B1.69: - fldcw 248(%rsp) -..B1.70: - movb $1, %r10b -..B1.71: - fldt 336(%rsp) - lea _ones(%rip), %r11 - testl %ebp, %ebp - fmull (%r11,%r13,8) - fstpt 336(%rsp) - fldt 336(%rsp) - jne ..B1.100 -..B1.72: - cmpl $1048576, 8(%rsp) - jae ..B1.100 -..B1.73: - movl %r8d, %ecx - lea _exact_masks(%rip), %r12 - shrl $16, %ecx - negl %ecx - addl $30, %ecx - shrl %cl, %eax - cmpl $46, %eax - lea -2(%rax), %edi - jb ..L136 - movl $46, %edi -..L136: - movslq %edi, %rdi - movl 4(%r12,%rdi,8), %ebp - andl %ebp, %edx - movl (%r12,%rdi,8), %r13d - andl %r13d, %ebx - orl %ebx, %edx - jne ..B1.100 -..B1.74: - movq 240(%rsp), %rdx - cmpl $65535, %r9d - fldl (%r11,%rdx,8) - ja ..B1.76 -..B1.75: - lea _TWO_75(%rip), %rdx - fldl (%rdx) - fmulp %st, %st(2) - fxch %st(1) - fstpt 176(%rsp) - movzwl 184(%rsp), %ebp - movl %ebp, %ebx - andl $32767, %ebx - addl $-16458, %ebx - jmp ..B1.77 -..B1.76: - movzwl 344(%rsp), %ebx - fxch %st(1) - fstpt 176(%rsp) - andl $32767, %ebx - movzwl 184(%rsp), %ebp - addl $-16383, %ebx -..B1.77: - lea iones(%rip), %rdx - andl $-32768, %ebp - movl 128(%rsp), %ecx - orl $-49153, %ebp - movw %bp, 184(%rsp) - movl (%rdx,%rcx,4), %edx - imull %eax, %edx - imull %ebx, %edx - lea 16445(%rdx), %ebx - cmpl $32829, %ebx - lea 16383(%rdx), %ecx - jb ..B1.85 -..B1.78: - shlq $4, 240(%rsp) - cmpl $-63, %ecx - jg ..B1.80 -..B1.79: - lea _small_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) - jmp ..B1.81 -..B1.80: - lea _large_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) -..B1.81: - fstpt 144(%rsp) - testb %r10b, %r10b - je ..B1.245 -..B1.82: - fstpt 32(%rsp) -..B1.237: - fldcw 250(%rsp) - jmp ..B1.83 -..B1.245: - fstp %st(0) -..B1.83: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.84: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.85: - fstpt 32(%rsp) - testl %ecx, %ecx - jg ..B1.87 -..B1.86: - addl $16458, %edx - movzwl 40(%rsp), %ecx - andl $32767, %edx - andl $-32768, %ecx - orl %edx, %ecx - lea 8+_TWO_75(%rip), %rdx - movw %cx, 40(%rsp) - fldt 32(%rsp) - fmull (%rdx) - fstpt 32(%rsp) - fldt 32(%rsp) - jmp ..B1.88 -..B1.87: - movzwl 40(%rsp), %edx - andl $32767, %ecx - andl $-32768, %edx - orl %ecx, %edx - movw %dx, 40(%rsp) - fldt 32(%rsp) -..B1.88: - cmpl $-2147483648, 180(%rsp) - jne ..B1.95 -..B1.89: - cmpl $0, 176(%rsp) - jne ..B1.95 -..B1.90: - fstpt 144(%rsp) -..B1.91: - testb %r10b, %r10b - je ..B1.93 -..B1.92: - fldcw 250(%rsp) -..B1.93: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.94: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.95: - fldt 176(%rsp) - lea _zeros(%rip), %rdx - fstpt 112(%rsp) - fldt 112(%rsp) - fldl (%r11) - movl $0, 112(%rsp) - fld %st(0) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fldt 112(%rsp) - fsubr %st, %st(3) - fldl (%rdx) - jmp ..B1.96 -..B1.99: - fld %st(1) - fadd %st(5), %st - fld %st(2) - fmul %st(6), %st - fxch %st(1) - fmulp %st, %st(6) - faddp %st, %st(5) - fld %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - movl $0, 112(%rsp) - fldt 112(%rsp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(5) - fxch %st(1) -..B1.96: - testb $1, %al - je ..B1.98 -..B1.97: - fld %st(1) - fadd %st(5), %st - fmulp %st, %st(1) - fld %st(4) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(1) - fmulp %st, %st(4) - fxch %st(3) - fstpt 16(%rsp) - fldt 16(%rsp) - movl $0, 16(%rsp) - fldt 16(%rsp) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(4) - fxch %st(3) -..B1.98: - shrl $1, %eax - testl %eax, %eax - je ..B1.169 - jmp ..B1.99 -..B1.100: - lea -1073676224(%r9), %eax - cmpl $32864, %eax - jae ..B1.102 -..B1.101: - lea 8+_ones(%rip), %rdx - lea _TWO_32H(%rip), %rcx - movb $1, %al - fldl (%rdx) - faddp %st, %st(1) - fld %st(0) - fld %st(1) - fxch %st(2) - fstpt 192(%rsp) - fldt 192(%rsp) - fldl (%rcx) - fmul %st, %st(2) - fxch %st(2) - fadd %st, %st(3) - fsubrp %st, %st(3) - fsub %st(2), %st - fxch %st(2) - jmp ..B1.106 -..B1.102: - xorb %al, %al - cmpl $65535, %r9d - ja ..B1.104 -..B1.103: - lea _TWO_75(%rip), %rdx - fldl (%rdx) - fmulp %st, %st(1) - fstpt 176(%rsp) - movzwl 184(%rsp), %edx - movl %edx, %edi - andl $32767, %edi - addl $-16458, %edi - jmp ..B1.105 -..B1.104: - movzwl 344(%rsp), %edi - fstpt 176(%rsp) - andl $32767, %edi - movzwl 184(%rsp), %edx - addl $-16383, %edi -..B1.105: - andl $-32768, %edx - lea 8+_ones(%rip), %rbx - orl $-49153, %edx - movw %dx, 184(%rsp) - lea _TWO_32H(%rip), %rdx - fldt 176(%rsp) - fld %st(0) - fld %st(1) - movl 180(%rsp), %esi - fldl (%rdx) - fmul %st, %st(2) - movq __libm_rcp_table_256@GOTPCREL(%rip), %rcx - fxch %st(1) - fadd %st(2), %st - shrl $23, %esi - fsubp %st, %st(2) - movzbl %sil, %esi - fxch %st(1) - fsubr %st, %st(2) - flds (%rcx,%rsi,4) - fmul %st, %st(1) - fmulp %st, %st(3) - faddl (%rbx) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fstpt 192(%rsp) - fldt 192(%rsp) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) -..B1.106: - fldt 192(%rsp) - lea 128+_LP(%rip), %rdx - fld %st(0) - lea 112+_LP(%rip), %rcx - lea 96+_LP(%rip), %rbx - lea 80+_LP(%rip), %rbp - lea 64+_LP(%rip), %r9 - lea 48+_LP(%rip), %r12 - lea 32+_LP(%rip), %r13 - lea 16+_LP(%rip), %r14 - lea _LP(%rip), %r15 - testb %al, %al - fadd %st(2), %st - fmul %st(4), %st - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - fmul %st(0), %st - fld %st(0) - fadd %st(3), %st - fld %st(0) - fxch %st(6) - fstpt 16(%rsp) - fld %st(0) - fmul %st(5), %st - fadd %st, %st(6) - fsubrp %st, %st(6) - fxch %st(1) - fsub %st(5), %st - faddp %st, %st(3) - fldt (%rdx) - fmul %st(1), %st - fldt (%rcx) - fmul %st(2), %st - fldt (%rbx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rbp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r12) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r13) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r14) - faddp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fmul %st(4), %st - fld %st(2) - fadd %st(1), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fmul %st(4), %st - fldt (%r15) - fmul %st, %st(5) - fld %st(5) - fadd %st(2), %st - fsubr %st, %st(6) - fxch %st(2) - faddp %st, %st(6) - fmulp %st, %st(3) - fxch %st(1) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fldt (%rsp) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(1) - fadd %st(4), %st - fldt 16(%rsp) - faddp %st, %st(3) - faddp %st, %st(2) - je ..B1.108 -..B1.107: - fld %st(0) - fld %st(1) - fxch %st(2) - fxch %st(5) - fxch %st(2) - jmp ..B1.109 -..B1.108: - fstp %st(3) - movslq %esi, %rsi - pxor %xmm0, %xmm0 - lea _LT2(%rip), %rax - movq %rsi, %rdx - shlq $4, %rdx - lea _LLN2(%rip), %rbp - movq __libm_logl_table_256@GOTPCREL(%rip), %rcx - lea 16+_LLN2(%rip), %rbx - cvtss2sd (%rax,%rsi,4), %xmm0 - fldl (%rdx,%rcx) - fldt (%rbx) - fldt (%rbp) - addsd 8(%rdx,%rcx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - movl %edi, (%rsp) - fildl (%rsp) - fmul %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(2) - fadd %st(1), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(4), %st - fld %st(0) - fld %st(2) - fsub %st(2), %st - fadd %st(6), %st - faddp %st, %st(4) -..B1.109: - fld %st(1) - fadd %st(4), %st - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 24(%rsp), %edx - shll $16, %edx - movzwl 22(%rsp), %eax - orl %eax, %edx - andl $2147483647, %edx - lea -1610514432(%rdx,%r8), %ecx - cmpl $538050560, %ecx - lea (%r8,%rdx), %eax - jbe ..B1.123 -..B1.110: - cmpl $-2146402304, %eax - jbe ..B1.118 -..B1.111: - fstp %st(4) - fstp %st(4) - fstp %st(2) - fstp %st(1) - shlq $4, 240(%rsp) - cmpl $0, 256(%rsp) - je ..B1.113 -..B1.112: - lea _small_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) - jmp ..B1.114 -..B1.113: - lea _large_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) -..B1.114: - fstpt 144(%rsp) - testb %r10b, %r10b - je ..B1.246 -..B1.115: - fldt 32(%rsp) - fstpt 160(%rsp) - fxch %st(2) - fstpt 112(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) - fldt 192(%rsp) - fstpt 176(%rsp) -..B1.238: - fldcw 250(%rsp) - jmp ..B1.116 -..B1.246: - fstp %st(2) - fstp %st(1) - fstp %st(0) -..B1.116: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.117: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.118: - cmpl $1610514432, %eax - jae ..B1.123 -..B1.119: - fstp %st(4) - fstp %st(4) - fstp %st(2) - fstp %st(1) - movq 240(%rsp), %rcx - lea _small_value_80(%rip), %rdx - movl %ecx, %eax - xorl 256(%rsp), %eax - shlq $4, %rax - testb %r10b, %r10b - fldt (%rdx,%rax) - faddl (%r11,%rcx,8) - fstpt 144(%rsp) - je ..B1.247 -..B1.120: - fldt 32(%rsp) - fstpt 160(%rsp) - fxch %st(2) - fstpt 112(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) - fldt 192(%rsp) - fstpt 176(%rsp) -..B1.239: - fldcw 250(%rsp) - jmp ..B1.121 -..B1.247: - fstp %st(2) - fstp %st(1) - fstp %st(0) -..B1.121: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.122: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.123: - fstp %st(1) - fld %st(0) - fmul %st(5), %st - movq 240(%rsp), %rax - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fld %st(3) - fldt 352(%rsp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 128(%rsp) - fldt 128(%rsp) - fsubp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fmul %st(3), %st - fxch %st(5) - fmulp %st, %st(1) - faddp %st, %st(4) - fld %st(3) - fxch %st(1) - fmulp %st, %st(2) - fadd %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fldl (%r11,%rax,8) - movzwl 24(%rsp), %eax - shll $16, %eax - movzwl 22(%rsp), %edx - orl %edx, %eax - andl $2147483647, %eax - fstpl 208(%rsp) - cmpl $1072398336, %eax - jae ..B1.131 -..B1.124: - fstp %st(4) - cmpl $1069318144, %eax - jae ..B1.126 -..B1.125: - fstp %st(2) - fldl 208(%rsp) - fmul %st, %st(3) - faddp %st, %st(3) - fxch %st(1) - fxch %st(2) - jmp ..B1.127 -..B1.126: - lea 16+_EP1(%rip), %rax - lea _EP1(%rip), %rdx - fldt (%rax) - fmul %st(4), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(4), %st - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fldl 208(%rsp) - fmul %st, %st(1) - faddp %st, %st(1) -..B1.127: - fstpt 144(%rsp) - testb %r10b, %r10b - je ..B1.248 -..B1.128: - fldt 128(%rsp) - fstpt 160(%rsp) - fstpt 16(%rsp) - fxch %st(1) - fstpt 112(%rsp) - fstpt (%rsp) - fldt 192(%rsp) - fstpt 176(%rsp) - fldl 208(%rsp) - fstpt 32(%rsp) -..B1.240: - fldcw 250(%rsp) - jmp ..B1.129 -..B1.248: - fstp %st(2) - fstp %st(1) - fstp %st(0) -..B1.129: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.130: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.131: - fldt .L_2il0floatpacket.1(%rip) - lea _TWO_63H(%rip), %rdx - fmul %st(1), %st - lea ESC2_BIAS(%rip), %rbx - fxch %st(1) - fstpt 144(%rsp) - fldl (%rdx) - movl 256(%rsp), %eax - fadd %st, %st(1) - fxch %st(1) - fstpt 160(%rsp) - fldt 160(%rsp) - fsubp %st, %st(1) - fldt .L_2il0floatpacket.2(%rip) - fmul %st(1), %st - movl 160(%rsp), %edx - movl %edx, %esi - movsbq %dl, %rcx - fsubr %st(2), %st - fldt .L_2il0floatpacket.3(%rip) - subl %ecx, %esi - fmulp %st, %st(2) - fld %st(0) - sarl $8, %esi - fsub %st(2), %st - movl (%rbx,%rax,4), %ebp - fadd %st(6), %st - fstpt 128(%rsp) - fldt 128(%rsp) - lea -1(%rbp,%rsi), %edi - cmpl $32766, %edi - lea (%rbp,%rsi), %ebx - fsubp %st, %st(6) - fsub %st(5), %st - fsubp %st, %st(1) - fstpt 112(%rsp) - fldt 144(%rsp) - jb ..B1.139 -..B1.132: - fstp %st(0) - fstp %st(2) - fstp %st(2) - shlq $4, 240(%rsp) - cmpl $1, %ebx - jg ..B1.134 -..B1.133: - lea _small_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) - jmp ..B1.135 -..B1.134: - lea _large_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) -..B1.135: - fstpt 144(%rsp) - testb %r10b, %r10b - je ..B1.249 -..B1.136: - fldt 128(%rsp) - fstpt 160(%rsp) - fxch %st(1) - fstpt 16(%rsp) - fxch %st(1) - fstpt 112(%rsp) - fstpt (%rsp) - fldt 192(%rsp) - fstpt 176(%rsp) - fldl 208(%rsp) - fstpt 32(%rsp) -..B1.241: - fldcw 250(%rsp) - jmp ..B1.137 -..B1.249: - fstp %st(2) - fstp %st(0) - fstp %st(0) -..B1.137: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.138: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.139: - fldl 208(%rsp) - andl $32767, %ebx - fstpt 32(%rsp) - fld %st(4) - fxch %st(2) - fstpt 16(%rsp) - lea 48+_EP(%rip), %rsi - movzwl 40(%rsp), %ebp - lea 32+_EP(%rip), %rdi - andl $-32768, %ebp - lea 16+_EP(%rip), %r8 - fstpt 144(%rsp) - orl %ebx, %ebp - lea 64+_EP(%rip), %rbx - lea _EP(%rip), %r9 - fxch %st(1) - fstpt (%rsp) - addl $4196735, %edx - fldt 112(%rsp) - movslq %ecx, %rcx - faddp %st, %st(2) - shlq $4, %rcx - fadd %st(1), %st - fld %st(0) - cmpl $3070, %edx - fmul %st(1), %st - fldt (%rbx) - fmul %st(1), %st - fldt (%rsi) - fmul %st(2), %st - fldt (%rdi) - movq __libm_expl_table_256@GOTPCREL(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - movw %bp, 40(%rsp) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fmulp %st, %st(3) - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fxch %st(1) - fadd %st(2), %st - fldl 2048(%rcx,%r11) - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fxch %st(1) - fmul %st, %st(3) - fsub %st(1), %st - faddp %st, %st(4) - fxch %st(1) - fmull 2056(%rcx,%r11) - faddp %st, %st(2) - fldt 16(%rsp) - fxch %st(3) - faddl 2056(%rcx,%r11) - faddp %st, %st(2) - fldt 144(%rsp) - fldt (%rsp) - ja ..B1.142 -..B1.140: - lea _Eexpbut(%rip), %rdx - fldt (%rdx) - fcomip %st(2), %st - jbe ..B1.142 -..B1.141: - fstp %st(1) - fld %st(1) - lea _TWO_12H(%rip), %rdx - shlq $4, %rax - fadd %st(3), %st - fldl (%rdx) - lea _ESC2(%rip), %rcx - fmul %st(1), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 128(%rsp) - fldt 128(%rsp) - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldt (%rax,%rcx) - fldt 32(%rsp) - fmul %st, %st(3) - fxch %st(1) - fmul %st, %st(3) - fxch %st(4) - fmulp %st, %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 144(%rsp) - jmp ..B1.143 -..B1.142: - fstp %st(1) - shlq $4, %rax - lea _ESC2(%rip), %rdx - fldt (%rax,%rdx) - fmul %st, %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 32(%rsp) - fmulp %st, %st(1) - fstpt 144(%rsp) -..B1.143: - movzwl 152(%rsp), %ecx - shll $16, %ecx - movzwl 150(%rsp), %eax - orl %eax, %ecx - andl $2147483647, %ecx - lea -98304(%rcx), %edx - cmpl $2147319808, %edx - jb ..B1.151 -..B1.144: - shlq $4, 240(%rsp) - cmpl $65535, %ecx - ja ..B1.146 -..B1.145: - lea _small_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) - fstpt 224(%rsp) - jmp ..B1.147 -..B1.146: - lea _large_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) - fstpt 144(%rsp) -..B1.147: - testb %r10b, %r10b - je ..B1.250 -..B1.148: - fldt 128(%rsp) - fstpt 160(%rsp) - fxch %st(2) - fstpt 112(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) - fldt 192(%rsp) - fstpt 176(%rsp) -..B1.242: - fldcw 250(%rsp) - jmp ..B1.149 -..B1.250: - fstp %st(2) - fstp %st(1) - fstp %st(0) -..B1.149: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.150: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.151: - testb %r10b, %r10b - je ..B1.251 -..B1.152: - fldt 128(%rsp) - fstpt 160(%rsp) - fxch %st(2) - fstpt 112(%rsp) - fstpt (%rsp) - fstpt 16(%rsp) - fldt 192(%rsp) - fstpt 176(%rsp) -..B1.243: - fldcw 250(%rsp) - jmp ..B1.153 -..B1.251: - fstp %st(2) - fstp %st(1) - fstp %st(0) -..B1.153: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.154: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.155: - call __stack_chk_fail@PLT -..B1.157: - lea _ones(%rip), %rdx - lea _zeros(%rip), %rcx - movsd (%rdx,%rax,8), %xmm0 - divsd (%rcx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 144(%rsp) - fldt 144(%rsp) - movq 264(%rsp), %rbx - xorq %rsp, %rbx - cmpq %fs:40, %rbx - je ..B1.44 -..B1.159: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.160: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 144(%rsp) - fldt 144(%rsp) - movq 264(%rsp), %rcx - xorq %rsp, %rcx - cmpq %fs:40, %rcx - jne ..B1.159 - jmp ..B1.44 -..B1.169: - fstp %st(4) - fstp %st(0) - cmpl $0, 128(%rsp) - jne ..B1.171 -..B1.170: - fstp %st(0) - fstpt (%rsp) - fldt (%rsp) - jmp ..B1.172 -..B1.171: - fld %st(1) - lea 8+_ones(%rip), %rax - fadd %st(3), %st - fdivr %st, %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fld %st(0) - movl $0, (%rsp) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fldt (%rsp) - fmul %st, %st(5) - fsubr %st, %st(2) - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(5) - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - faddl (%rax) - faddp %st, %st(4) - fmulp %st, %st(3) - fsubp %st, %st(2) -..B1.172: - fld %st(0) - fmul %st(3), %st - fld %st(0) - fld %st(4) - fmul %st(4), %st - fadd %st(1), %st - fstpt 144(%rsp) - movzwl 152(%rsp), %edx - shll $16, %edx - movzwl 150(%rsp), %eax - orl %eax, %edx - andl $2147483647, %edx - cmpl $65535, %edx - ja ..B1.174 -..B1.173: - fld %st(4) - fdivrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - fadd %st, %st(3) - fxch %st(3) - fmul %st(4), %st - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fadd %st(1), %st - fstpt 144(%rsp) - fldt 144(%rsp) - movzwl 152(%rsp), %edx - shll $16, %edx - movzwl 150(%rsp), %eax - orl %eax, %edx - andl $2147483647, %edx - fxch %st(1) - fxch %st(3) - fxch %st(2) -..B1.174: - fstp %st(1) - fstp %st(1) - fstp %st(0) - fstp %st(1) - fstp %st(0) - lea -98304(%rdx), %eax - cmpl $2147319808, %eax - jb ..B1.91 -..B1.175: - shlq $4, 240(%rsp) - cmpl $65535, %edx - ja ..B1.177 -..B1.176: - lea _small_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) - fstpt 224(%rsp) - jmp ..B1.178 -..B1.177: - lea _large_value_80(%rip), %rdx - movq 240(%rsp), %rax - fldt (%rax,%rdx) - fldt (%rdx) - fmulp %st, %st(1) - fstpt 144(%rsp) -..B1.178: - testb %r10b, %r10b - je ..B1.180 -..B1.179: - fldcw 250(%rsp) -..B1.180: - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 - jmp ..B1.44 -..B1.189: - movq $0x8000000000000000, %rcx - cmpq 352(%rsp), %rcx - je ..B1.193 -..B1.190: - fldt 336(%rsp) - fldt 352(%rsp) - fmulp %st, %st(1) - fstpt 224(%rsp) - fldt 224(%rsp) - fstpt 144(%rsp) - fldt 144(%rsp) - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 - jmp ..B1.44 -..B1.193: - cmpl $32767, %r14d - je ..B1.223 -..B1.194: - cmpl $32767, %r12d - jne ..B1.19 -..B1.195: - cmpl $-2147483648, %eax - jne ..B1.19 -..B1.196: - testl %r11d, %r11d - jne ..B1.19 -..B1.197: - cmpl $1073709056, %r9d - jae ..B1.210 -..B1.198: - orl %r9d, %ebx - jne ..B1.203 -..B1.199: - lea _zeros(%rip), %rax - cmpl $0, 128(%rsp) - movsd (%rax), %xmm0 - jne ..B1.219 -..B1.200: - movsd %xmm0, (%rsp) - fldl (%rsp) -..B1.201: - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.202: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.203: - cmpl $65536, %r9d - jae ..B1.205 -..B1.204: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 216(%rsp) -..B1.205: - cmpl $0, 128(%rsp) - je ..B1.207 -..B1.206: - lea _infs(%rip), %rax - fldl (%rax) - jmp ..B1.208 -..B1.207: - lea _zeros(%rip), %rax - fldl (%rax) -..B1.208: - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.209: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.210: - addl $-1073709056, %r9d - orl 24(%rsp), %r9d - orl %ebx, %r9d - je ..B1.216 -..B1.211: - cmpl $0, 128(%rsp) - je ..B1.213 -..B1.212: - lea _zeros(%rip), %rax - fldl (%rax) - jmp ..B1.214 -..B1.213: - lea _infs(%rip), %rax - fldl (%rax) -..B1.214: - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 -..B1.215: - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.216: - lea _ones(%rip), %rax - movq 16(%rsp), %rdx - movq 264(%rsp), %rcx - xorq %rsp, %rcx - movsd (%rax,%rdx,8), %xmm0 - cmpq %fs:40, %rcx - jne ..B1.155 -..B1.217: - movsd %xmm0, (%rsp) - fldl (%rsp) - addq $280, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 336 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.219: - lea _ones(%rip), %rax - movsd (%rax), %xmm1 - divsd %xmm0, %xmm1 - movsd %xmm1, (%rsp) - fldl (%rsp) - fstpt 144(%rsp) - fldt 144(%rsp) - jmp ..B1.201 -..B1.223: - cmpl $-2147483648, %edx - jne ..B1.194 -..B1.224: - testl %ebx, %ebx - jne ..B1.194 -..B1.225: - cmpl $65536, %r8d - jae ..B1.227 -..B1.226: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 216(%rsp) -..B1.227: - xorl %eax, %eax - testl %ebp, %ebp - je ..L377 - movq %rax, 240(%rsp) -..L377: - cmpl $0, 128(%rsp) - je ..B1.229 -..B1.228: - lea _zeros(%rip), %rax - movq 240(%rsp), %rdx - fldl (%rax,%rdx,8) - jmp ..B1.230 -..B1.229: - lea _infs(%rip), %rax - movq 240(%rsp), %rdx - fldl (%rax,%rdx,8) -..B1.230: - movq 264(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.159 - jmp ..B1.44 -..B1.233: - movq $0x8000000000000000, %rcx - cmpq 336(%rsp), %rcx - jne ..B1.190 -..B1.234: - cmpl $32767, %r12d - je ..B1.189 - jmp ..B1.193 - .align 16,0x90 - .cfi_endproc - .type powl,@function - .size powl,.-powl - .data -# -- End powl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_43H: - .long 0 - .long 1118306304 - .type _TWO_43H,@object - .size _TWO_43H,8 - .align 4 -_exact_masks: - .long 131071 - .long 0 - .long 4294967295 - .long 1 - .long 4294967295 - .long 511 - .long 4294967295 - .long 16383 - .long 4294967295 - .long 131071 - .long 4294967295 - .long 1048575 - .long 4294967295 - .long 2097151 - .long 4294967295 - .long 8388607 - .long 4294967295 - .long 16777215 - .long 4294967295 - .long 33554431 - .long 4294967295 - .long 33554431 - .long 4294967295 - .long 67108863 - .long 4294967295 - .long 134217727 - .long 4294967295 - .long 134217727 - .long 4294967295 - .long 134217727 - .long 4294967295 - .long 268435455 - .long 4294967295 - .long 268435455 - .long 4294967295 - .long 268435455 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 536870911 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 1073741823 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .long 4294967295 - .long 2147483647 - .type _exact_masks,@object - .size _exact_masks,376 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_LT2: - .long 180342526 - .long 2357584585 - .long 2340989257 - .long 193458247 - .long 2370723239 - .long 2317577053 - .long 2382055315 - .long 232148275 - .long 200972627 - .long 2376530255 - .long 2376860906 - .long 222325808 - .long 228268523 - .long 229816737 - .long 2387925496 - .long 239088248 - .long 235445027 - .long 219576635 - .long 2365457762 - .long 200344795 - .long 2377779510 - .long 2396359259 - .long 256760275 - .long 2390604874 - .long 2403557039 - .long 2397936349 - .long 2387307486 - .long 2389941185 - .long 2375749593 - .long 224865835 - .long 2394232861 - .long 180745560 - .long 231885773 - .long 2352962188 - .long 2306055684 - .long 206875141 - .long 258325764 - .long 2386208973 - .long 231066739 - .long 195513036 - .long 2360327132 - .long 2396045581 - .long 236564318 - .long 2282584976 - .long 2351736009 - .long 236364231 - .long 2384427773 - .long 267355851 - .long 255771104 - .long 265321597 - .long 2384375360 - .long 2399209743 - .long 186438128 - .long 2407131686 - .long 2382793784 - .long 2395218767 - .long 229223248 - .long 256892528 - .long 2394735602 - .long 2385223602 - .long 2372921302 - .long 2398642377 - .long 2399679754 - .long 255686225 - .long 220689523 - .long 2385772978 - .long 209771590 - .long 2396079173 - .long 247531082 - .long 236085121 - .long 264660069 - .long 2357821390 - .long 236486650 - .long 2368138461 - .long 239690108 - .long 2396070228 - .long 196955922 - .long 217533735 - .long 255641653 - .long 249646543 - .long 253232621 - .long 246212714 - .long 2396427575 - .long 261629730 - .long 2364672847 - .long 2403865410 - .long 251273869 - .long 261125380 - .long 2388321036 - .long 2375891827 - .long 2381014317 - .long 2414822930 - .long 2406245053 - .long 2406988902 - .long 2395399973 - .long 213294711 - .long 2401319324 - .long 265450299 - .long 231845893 - .long 260578794 - .long 258934474 - .long 2368795786 - .long 2422506717 - .long 218205033 - .long 258708287 - .long 257044854 - .long 2396281866 - .long 2415975150 - .long 257697283 - .long 2393801226 - .long 2388654986 - .long 262910764 - .long 235638432 - .long 268054962 - .long 271083258 - .long 256780444 - .long 256064350 - .long 252979189 - .long 2420460964 - .long 233178508 - .long 251655134 - .long 2404577473 - .long 2408876374 - .long 2401072099 - .long 228623072 - .long 2421706621 - .long 2353033467 - .long 2411792212 - .long 2345330012 - .long 2397189005 - .long 243110369 - .long 2408213151 - .long 219253901 - .long 246695172 - .long 259288551 - .long 254210780 - .long 261865355 - .long 230359170 - .long 263524551 - .long 2405618542 - .long 2399869921 - .long 233826616 - .long 2362750769 - .long 257576291 - .long 251808114 - .long 2403390977 - .long 253249058 - .long 261065811 - .long 215406974 - .long 2407628993 - .long 258391343 - .long 2394470699 - .long 258495470 - .long 2415771687 - .long 224670583 - .long 263047889 - .long 2389031226 - .long 259453051 - .long 266564569 - .long 2422023012 - .long 264051375 - .long 2409075373 - .long 252244729 - .long 220302768 - .long 254847756 - .long 243124762 - .long 2363519942 - .long 2393496158 - .long 2402135082 - .long 2365706590 - .long 237902971 - .long 262295026 - .long 252689257 - .long 236678680 - .long 255167613 - .long 2406879752 - .long 274254693 - .long 259983961 - .long 245852525 - .long 256459527 - .long 220533989 - .long 245387845 - .long 243835221 - .long 2377853444 - .long 274540751 - .long 229741069 - .long 263626566 - .long 220608387 - .long 226161046 - .long 247301717 - .long 268433686 - .long 222008210 - .long 2414961139 - .long 276137642 - .long 2412197898 - .long 258445918 - .long 2412645341 - .long 260857859 - .long 263113037 - .long 2386484264 - .long 2390742630 - .long 259665290 - .long 2363417497 - .long 2384122046 - .long 263493300 - .long 219472625 - .long 2420433676 - .long 274201285 - .long 2404911312 - .long 257926520 - .long 260332203 - .long 256695016 - .long 218494534 - .long 2420150889 - .long 2414586287 - .long 267006159 - .long 231320206 - .long 2382797064 - .long 2414903062 - .long 263514471 - .long 2406010284 - .long 2410428205 - .long 2414319991 - .long 249083715 - .long 2381171937 - .long 236369629 - .long 2409614279 - .long 2424220710 - .long 2378379154 - .long 218677462 - .long 2382987336 - .long 2377870458 - .long 258155310 - .long 2368239928 - .long 2414896572 - .long 193310867 - .long 256673115 - .long 2406448055 - .long 271719709 - .long 248566852 - .long 229016248 - .long 272541555 - .long 2382115967 - .long 2375311600 - .long 2393766434 - .long 257187362 - .long 277931545 - .long 281038165 - .long 2373962226 - .long 261638946 - .long 255465134 - .long 273460929 - .long 275851296 - .long 2417166241 - .long 2361106656 - .long 278653754 - .type _LT2,@object - .size _LT2,1024 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -ESC2_BIAS: - .long 4095 - .long 28671 - .type ESC2_BIAS,@object - .size ESC2_BIAS,8 - .align 4 -_TWO_12H: - .long 0 - .long 1085800448 - .type _TWO_12H,@object - .size _TWO_12H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 2 -_invsqrtl_scales: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 24575 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 20479 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 8191 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 12287 - .word 0 - .word 0 - .word 0 - .type _invsqrtl_scales,@object - .size _invsqrtl_scales,64 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_LP: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 52785 - .word 52428 - .word 52428 - .word 52428 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 44453 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 25655 - .word 14678 - .word 9362 - .word 37449 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 38741 - .word 53722 - .word 65535 - .word 65535 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 45676 - .word 59527 - .word 48579 - .word 58254 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 41682 - .word 64796 - .word 25002 - .word 52429 - .word 49147 - .word 0 - .word 0 - .word 0 - .type _LP,@object - .size _LP,144 - .align 2 -_LLN2: - .word 0 - .word 53711 - .word 6135 - .word 45426 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 2022 - .word 26416 - .word 37831 - .word 62295 - .word 16333 - .word 0 - .word 0 - .word 0 - .type _LLN2,@object - .size _LLN2,32 - .align 2 -_EP1: - .word 43691 - .word 10 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30584 - .word 43703 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _EP1,@object - .size _EP1,32 - .align 2 -_EP: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _EP,@object - .size _EP,80 - .align 2 -_Eexpbut: - .word 60207 - .word 4624 - .word 35943 - .word 45420 - .word 49164 - .word 0 - .word 0 - .word 0 - .type _Eexpbut,@object - .size _Eexpbut,16 - .align 2 -_ESC2: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 28671 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 4095 - .word 0 - .word 0 - .word 0 - .type _ESC2,@object - .size _ESC2,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/q2l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/q2l.S deleted file mode 100644 index 6c9150bee8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/q2l.S +++ /dev/null @@ -1,289 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "q2l.c" - .text -..TXTST0: -# -- Begin __qtol - .text - .align 16,0x90 - .globl __qtol -__qtol: -# parameter 1: %rdi -..B1.1: - .cfi_startproc -..___tag_value___qtol.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movq %rdi, %rdx - movq $0xffffffffffff, %rcx - movq 8(%rdx), %rax - movq %rax, %rsi - shrq $48, %rsi - andq %rax, %rcx - movq (%rdx), %rdi - movq %rdi, %r8 - movl %esi, %edx - shlq $15, %rcx - andl $32767, %edx - shrq $49, %r8 - shlq $15, %rdi - orq %r8, %rcx - cmpl $32767, %edx - jne ..B1.7 -..B1.2: - orq %rcx, %rdi - je ..B1.6 -..B1.3: - movq $0x4000000000000000, %rdx - testq %rcx, %rdx - jne ..B1.5 -..B1.4: - movq p_zero(%rip), %rax - movsd (%rax), %xmm0 - divsd %xmm0, %xmm0 - movsd %xmm0, (%rsp) -..B1.5: - orq %rdx, %rcx -..B1.6: - btsq $63, %rcx - movl %esi, 24(%rsp) - movq %rcx, 16(%rsp) - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.7: - testl %edx, %edx - je ..B1.9 -..B1.8: - movq $0x8000000000000000, %rax - orq %rax, %rcx - jmp ..B1.11 -..B1.9: - movq %rcx, %rax - orq %rdi, %rax - je ..B1.22 -..B1.10: - movq p_tiny(%rip), %rax - movq p_one(%rip), %r8 - movsd (%rax), %xmm0 - mulsd (%r8), %xmm0 - movsd %xmm0, (%rsp) -..B1.11: - testq %rdi, %rdi - je ..B1.21 -..B1.12: - stmxcsr 8(%rsp) -..B1.13: - movl 8(%rsp), %eax - shrl $3, %eax - andl $3072, %eax - jne ..B1.15 -..B1.14: - testq %rdi, %rdi - jl ..B1.23 - jmp ..B1.18 -..B1.15: - testl $32768, %esi - je ..B1.17 -..B1.16: - cmpl $1024, %eax - je ..B1.23 - jmp ..B1.18 -..B1.17: - cmpl $2048, %eax - je ..B1.23 -..B1.18: - testl %edx, %edx - jne ..B1.20 -..B1.19: - movq p_norm(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, (%rsp) - jmp ..B1.21 -..B1.20: - movq p_one(%rip), %rax - movq p_norm(%rip), %rdx - movsd (%rax), %xmm0 - addsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) -..B1.21: - movl %esi, 24(%rsp) - movq %rcx, 16(%rsp) - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.22: - movl %esi, 24(%rsp) - movq $0, 16(%rsp) - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.23: - incq %rcx - testl %edx, %edx - je ..B1.29 -..B1.24: - testq %rcx, %rcx - jne ..B1.28 -..B1.25: - incl %esi - movq $0x8000000000000000, %rcx - movl %esi, %edx - andl $32767, %edx -..B1.26: - cmpl $32767, %edx - jne ..B1.18 -..B1.27: - movq p_huge(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, (%rsp) - jmp ..B1.21 -..B1.28: - movq $0x8000000000000000, %rdx - movl $1, %r8d - cmpq %rdi, %rdx - movl $0, %edi - movq p_one(%rip), %r9 - movq p_norm(%rip), %r10 - cmove %r8d, %edi - testl %eax, %eax - movl $0, %eax - movsd (%r9), %xmm0 - cmove %r8d, %eax - addsd (%r10), %xmm0 - andl %eax, %edi - notl %edi - movslq %edi, %rdi - movsd %xmm0, (%rsp) - andq %rdi, %rcx - jmp ..B1.21 -..B1.29: - movq $0x8000000000000000, %rdx - movl $1, %r8d - cmpq %rdi, %rdx - movl $0, %edi - cmove %r8d, %edi - testl %eax, %eax - movl $0, %eax - cmove %r8d, %eax - andl %eax, %edi - notl %edi - movslq %edi, %rdi - andq %rdi, %rcx - jge ..B1.19 -..B1.30: - incl %esi - movl %esi, %edx - andl $32767, %edx - jmp ..B1.26 - .align 16,0x90 - .cfi_endproc - .type __qtol,@function - .size __qtol,.-__qtol - .data -# -- End __qtol - .data - .align 8 - .align 8 -p_zero: - .quad d_zero - .type p_zero,@object - .size p_zero,8 - .align 8 -p_tiny: - .quad d_tiny - .type p_tiny,@object - .size p_tiny,8 - .align 8 -p_one: - .quad d_one - .type p_one,@object - .size p_one,8 - .align 8 -p_norm: - .quad d_norm - .type p_norm,@object - .size p_norm,8 - .align 8 -p_huge: - .quad d_huge - .type p_huge,@object - .size p_huge,8 - .section .rodata, "a" - .align 8 - .align 8 -d_zero: - .long 0x00000000,0x00000000 - .type d_zero,@object - .size d_zero,8 - .align 8 -d_tiny: - .long 0x00000001,0x00000000 - .type d_tiny,@object - .size d_tiny,8 - .align 8 -d_one: - .long 0x00000000,0x3ff00000 - .type d_one,@object - .size d_one,8 - .align 8 -d_norm: - .long 0x00000000,0x00100000 - .type d_norm,@object - .size d_norm,8 - .align 8 -d_huge: - .long 0xffffffff,0x7fefffff - .type d_huge,@object - .size d_huge,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rcp_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rcp_table.S deleted file mode 100644 index ec4cfe363d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rcp_table.S +++ /dev/null @@ -1,820 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "rcp_table.c" - .section .rodata, "a" - .align 32 - .align 32 - .globl __libm_rcp_table_256 -__libm_rcp_table_256: - .long 0x3f7f8000 - .long 0x3f7e8000 - .long 0x3f7d8000 - .long 0x3f7c8000 - .long 0x3f7ba000 - .long 0x3f7aa000 - .long 0x3f79a000 - .long 0x3f78c000 - .long 0x3f77c000 - .long 0x3f76e000 - .long 0x3f75e000 - .long 0x3f750000 - .long 0x3f742000 - .long 0x3f732000 - .long 0x3f724000 - .long 0x3f716000 - .long 0x3f708000 - .long 0x3f6fa000 - .long 0x3f6ec000 - .long 0x3f6de000 - .long 0x3f6d0000 - .long 0x3f6c2000 - .long 0x3f6b6000 - .long 0x3f6a8000 - .long 0x3f69a000 - .long 0x3f68c000 - .long 0x3f680000 - .long 0x3f672000 - .long 0x3f666000 - .long 0x3f658000 - .long 0x3f64c000 - .long 0x3f640000 - .long 0x3f632000 - .long 0x3f626000 - .long 0x3f61a000 - .long 0x3f60e000 - .long 0x3f600000 - .long 0x3f5f4000 - .long 0x3f5e8000 - .long 0x3f5dc000 - .long 0x3f5d0000 - .long 0x3f5c4000 - .long 0x3f5b8000 - .long 0x3f5ae000 - .long 0x3f5a2000 - .long 0x3f596000 - .long 0x3f58a000 - .long 0x3f57e000 - .long 0x3f574000 - .long 0x3f568000 - .long 0x3f55e000 - .long 0x3f552000 - .long 0x3f546000 - .long 0x3f53c000 - .long 0x3f532000 - .long 0x3f526000 - .long 0x3f51c000 - .long 0x3f510000 - .long 0x3f506000 - .long 0x3f4fc000 - .long 0x3f4f2000 - .long 0x3f4e6000 - .long 0x3f4dc000 - .long 0x3f4d2000 - .long 0x3f4c8000 - .long 0x3f4be000 - .long 0x3f4b4000 - .long 0x3f4aa000 - .long 0x3f4a0000 - .long 0x3f496000 - .long 0x3f48c000 - .long 0x3f482000 - .long 0x3f478000 - .long 0x3f46e000 - .long 0x3f464000 - .long 0x3f45c000 - .long 0x3f452000 - .long 0x3f448000 - .long 0x3f43e000 - .long 0x3f436000 - .long 0x3f42c000 - .long 0x3f422000 - .long 0x3f41a000 - .long 0x3f410000 - .long 0x3f408000 - .long 0x3f3fe000 - .long 0x3f3f6000 - .long 0x3f3ec000 - .long 0x3f3e4000 - .long 0x3f3da000 - .long 0x3f3d2000 - .long 0x3f3ca000 - .long 0x3f3c0000 - .long 0x3f3b8000 - .long 0x3f3b0000 - .long 0x3f3a8000 - .long 0x3f39e000 - .long 0x3f396000 - .long 0x3f38e000 - .long 0x3f386000 - .long 0x3f37e000 - .long 0x3f376000 - .long 0x3f36c000 - .long 0x3f364000 - .long 0x3f35c000 - .long 0x3f354000 - .long 0x3f34c000 - .long 0x3f344000 - .long 0x3f33c000 - .long 0x3f334000 - .long 0x3f32e000 - .long 0x3f326000 - .long 0x3f31e000 - .long 0x3f316000 - .long 0x3f30e000 - .long 0x3f306000 - .long 0x3f2fe000 - .long 0x3f2f8000 - .long 0x3f2f0000 - .long 0x3f2e8000 - .long 0x3f2e2000 - .long 0x3f2da000 - .long 0x3f2d2000 - .long 0x3f2cc000 - .long 0x3f2c4000 - .long 0x3f2bc000 - .long 0x3f2b6000 - .long 0x3f2ae000 - .long 0x3f2a8000 - .long 0x3f2a0000 - .long 0x3f29a000 - .long 0x3f292000 - .long 0x3f28c000 - .long 0x3f284000 - .long 0x3f27e000 - .long 0x3f276000 - .long 0x3f270000 - .long 0x3f268000 - .long 0x3f262000 - .long 0x3f25c000 - .long 0x3f254000 - .long 0x3f24e000 - .long 0x3f248000 - .long 0x3f240000 - .long 0x3f23a000 - .long 0x3f234000 - .long 0x3f22e000 - .long 0x3f226000 - .long 0x3f220000 - .long 0x3f21a000 - .long 0x3f214000 - .long 0x3f20e000 - .long 0x3f206000 - .long 0x3f200000 - .long 0x3f1fa000 - .long 0x3f1f4000 - .long 0x3f1ee000 - .long 0x3f1e8000 - .long 0x3f1e2000 - .long 0x3f1dc000 - .long 0x3f1d6000 - .long 0x3f1d0000 - .long 0x3f1ca000 - .long 0x3f1c4000 - .long 0x3f1be000 - .long 0x3f1b8000 - .long 0x3f1b2000 - .long 0x3f1ac000 - .long 0x3f1a6000 - .long 0x3f1a0000 - .long 0x3f19a000 - .long 0x3f194000 - .long 0x3f190000 - .long 0x3f18a000 - .long 0x3f184000 - .long 0x3f17e000 - .long 0x3f178000 - .long 0x3f172000 - .long 0x3f16e000 - .long 0x3f168000 - .long 0x3f162000 - .long 0x3f15c000 - .long 0x3f158000 - .long 0x3f152000 - .long 0x3f14c000 - .long 0x3f148000 - .long 0x3f142000 - .long 0x3f13c000 - .long 0x3f138000 - .long 0x3f132000 - .long 0x3f12c000 - .long 0x3f128000 - .long 0x3f122000 - .long 0x3f11c000 - .long 0x3f118000 - .long 0x3f112000 - .long 0x3f10e000 - .long 0x3f108000 - .long 0x3f104000 - .long 0x3f0fe000 - .long 0x3f0f8000 - .long 0x3f0f4000 - .long 0x3f0ee000 - .long 0x3f0ea000 - .long 0x3f0e6000 - .long 0x3f0e0000 - .long 0x3f0dc000 - .long 0x3f0d6000 - .long 0x3f0d2000 - .long 0x3f0cc000 - .long 0x3f0c8000 - .long 0x3f0c2000 - .long 0x3f0be000 - .long 0x3f0ba000 - .long 0x3f0b4000 - .long 0x3f0b0000 - .long 0x3f0ac000 - .long 0x3f0a6000 - .long 0x3f0a2000 - .long 0x3f09e000 - .long 0x3f098000 - .long 0x3f094000 - .long 0x3f090000 - .long 0x3f08a000 - .long 0x3f086000 - .long 0x3f082000 - .long 0x3f07e000 - .long 0x3f078000 - .long 0x3f074000 - .long 0x3f070000 - .long 0x3f06c000 - .long 0x3f066000 - .long 0x3f062000 - .long 0x3f05e000 - .long 0x3f05a000 - .long 0x3f056000 - .long 0x3f052000 - .long 0x3f04c000 - .long 0x3f048000 - .long 0x3f044000 - .long 0x3f040000 - .long 0x3f03c000 - .long 0x3f038000 - .long 0x3f034000 - .long 0x3f030000 - .long 0x3f02a000 - .long 0x3f026000 - .long 0x3f022000 - .long 0x3f01e000 - .long 0x3f01a000 - .long 0x3f016000 - .long 0x3f012000 - .long 0x3f00e000 - .long 0x3f00a000 - .long 0x3f006000 - .long 0x3f002000 - .type __libm_rcp_table_256,@object - .size __libm_rcp_table_256,1024 - .align 32 - .globl __libm_double_rcp_table_256 -__libm_double_rcp_table_256: - .long 0 - .long 1072689152 - .long 0 - .long 1072680960 - .long 0 - .long 1072672768 - .long 0 - .long 1072664576 - .long 0 - .long 1072657408 - .long 0 - .long 1072649216 - .long 0 - .long 1072641024 - .long 0 - .long 1072633856 - .long 0 - .long 1072625664 - .long 0 - .long 1072618496 - .long 0 - .long 1072610304 - .long 0 - .long 1072603136 - .long 0 - .long 1072595968 - .long 0 - .long 1072587776 - .long 0 - .long 1072580608 - .long 0 - .long 1072573440 - .long 0 - .long 1072566272 - .long 0 - .long 1072559104 - .long 0 - .long 1072551936 - .long 0 - .long 1072544768 - .long 0 - .long 1072537600 - .long 0 - .long 1072530432 - .long 0 - .long 1072524288 - .long 0 - .long 1072517120 - .long 0 - .long 1072509952 - .long 0 - .long 1072502784 - .long 0 - .long 1072496640 - .long 0 - .long 1072489472 - .long 0 - .long 1072483328 - .long 0 - .long 1072476160 - .long 0 - .long 1072470016 - .long 0 - .long 1072463872 - .long 0 - .long 1072456704 - .long 0 - .long 1072450560 - .long 0 - .long 1072444416 - .long 0 - .long 1072438272 - .long 0 - .long 1072431104 - .long 0 - .long 1072424960 - .long 0 - .long 1072418816 - .long 0 - .long 1072412672 - .long 0 - .long 1072406528 - .long 0 - .long 1072400384 - .long 0 - .long 1072394240 - .long 0 - .long 1072389120 - .long 0 - .long 1072382976 - .long 0 - .long 1072376832 - .long 0 - .long 1072370688 - .long 0 - .long 1072364544 - .long 0 - .long 1072359424 - .long 0 - .long 1072353280 - .long 0 - .long 1072348160 - .long 0 - .long 1072342016 - .long 0 - .long 1072335872 - .long 0 - .long 1072330752 - .long 0 - .long 1072325632 - .long 0 - .long 1072319488 - .long 0 - .long 1072314368 - .long 0 - .long 1072308224 - .long 0 - .long 1072303104 - .long 0 - .long 1072297984 - .long 0 - .long 1072292864 - .long 0 - .long 1072286720 - .long 0 - .long 1072281600 - .long 0 - .long 1072276480 - .long 0 - .long 1072271360 - .long 0 - .long 1072266240 - .long 0 - .long 1072261120 - .long 0 - .long 1072256000 - .long 0 - .long 1072250880 - .long 0 - .long 1072245760 - .long 0 - .long 1072240640 - .long 0 - .long 1072235520 - .long 0 - .long 1072230400 - .long 0 - .long 1072225280 - .long 0 - .long 1072220160 - .long 0 - .long 1072216064 - .long 0 - .long 1072210944 - .long 0 - .long 1072205824 - .long 0 - .long 1072200704 - .long 0 - .long 1072196608 - .long 0 - .long 1072191488 - .long 0 - .long 1072186368 - .long 0 - .long 1072182272 - .long 0 - .long 1072177152 - .long 0 - .long 1072173056 - .long 0 - .long 1072167936 - .long 0 - .long 1072163840 - .long 0 - .long 1072158720 - .long 0 - .long 1072154624 - .long 0 - .long 1072149504 - .long 0 - .long 1072145408 - .long 0 - .long 1072141312 - .long 0 - .long 1072136192 - .long 0 - .long 1072132096 - .long 0 - .long 1072128000 - .long 0 - .long 1072123904 - .long 0 - .long 1072118784 - .long 0 - .long 1072114688 - .long 0 - .long 1072110592 - .long 0 - .long 1072106496 - .long 0 - .long 1072102400 - .long 0 - .long 1072098304 - .long 0 - .long 1072093184 - .long 0 - .long 1072089088 - .long 0 - .long 1072084992 - .long 0 - .long 1072080896 - .long 0 - .long 1072076800 - .long 0 - .long 1072072704 - .long 0 - .long 1072068608 - .long 0 - .long 1072064512 - .long 0 - .long 1072061440 - .long 0 - .long 1072057344 - .long 0 - .long 1072053248 - .long 0 - .long 1072049152 - .long 0 - .long 1072045056 - .long 0 - .long 1072040960 - .long 0 - .long 1072036864 - .long 0 - .long 1072033792 - .long 0 - .long 1072029696 - .long 0 - .long 1072025600 - .long 0 - .long 1072022528 - .long 0 - .long 1072018432 - .long 0 - .long 1072014336 - .long 0 - .long 1072011264 - .long 0 - .long 1072007168 - .long 0 - .long 1072003072 - .long 0 - .long 1072000000 - .long 0 - .long 1071995904 - .long 0 - .long 1071992832 - .long 0 - .long 1071988736 - .long 0 - .long 1071985664 - .long 0 - .long 1071981568 - .long 0 - .long 1071978496 - .long 0 - .long 1071974400 - .long 0 - .long 1071971328 - .long 0 - .long 1071967232 - .long 0 - .long 1071964160 - .long 0 - .long 1071960064 - .long 0 - .long 1071956992 - .long 0 - .long 1071953920 - .long 0 - .long 1071949824 - .long 0 - .long 1071946752 - .long 0 - .long 1071943680 - .long 0 - .long 1071939584 - .long 0 - .long 1071936512 - .long 0 - .long 1071933440 - .long 0 - .long 1071930368 - .long 0 - .long 1071926272 - .long 0 - .long 1071923200 - .long 0 - .long 1071920128 - .long 0 - .long 1071917056 - .long 0 - .long 1071913984 - .long 0 - .long 1071909888 - .long 0 - .long 1071906816 - .long 0 - .long 1071903744 - .long 0 - .long 1071900672 - .long 0 - .long 1071897600 - .long 0 - .long 1071894528 - .long 0 - .long 1071891456 - .long 0 - .long 1071888384 - .long 0 - .long 1071885312 - .long 0 - .long 1071882240 - .long 0 - .long 1071879168 - .long 0 - .long 1071876096 - .long 0 - .long 1071873024 - .long 0 - .long 1071869952 - .long 0 - .long 1071866880 - .long 0 - .long 1071863808 - .long 0 - .long 1071860736 - .long 0 - .long 1071857664 - .long 0 - .long 1071854592 - .long 0 - .long 1071851520 - .long 0 - .long 1071849472 - .long 0 - .long 1071846400 - .long 0 - .long 1071843328 - .long 0 - .long 1071840256 - .long 0 - .long 1071837184 - .long 0 - .long 1071834112 - .long 0 - .long 1071832064 - .long 0 - .long 1071828992 - .long 0 - .long 1071825920 - .long 0 - .long 1071822848 - .long 0 - .long 1071820800 - .long 0 - .long 1071817728 - .long 0 - .long 1071814656 - .long 0 - .long 1071812608 - .long 0 - .long 1071809536 - .long 0 - .long 1071806464 - .long 0 - .long 1071804416 - .long 0 - .long 1071801344 - .long 0 - .long 1071798272 - .long 0 - .long 1071796224 - .long 0 - .long 1071793152 - .long 0 - .long 1071790080 - .long 0 - .long 1071788032 - .long 0 - .long 1071784960 - .long 0 - .long 1071782912 - .long 0 - .long 1071779840 - .long 0 - .long 1071777792 - .long 0 - .long 1071774720 - .long 0 - .long 1071771648 - .long 0 - .long 1071769600 - .long 0 - .long 1071766528 - .long 0 - .long 1071764480 - .long 0 - .long 1071762432 - .long 0 - .long 1071759360 - .long 0 - .long 1071757312 - .long 0 - .long 1071754240 - .long 0 - .long 1071752192 - .long 0 - .long 1071749120 - .long 0 - .long 1071747072 - .long 0 - .long 1071744000 - .long 0 - .long 1071741952 - .long 0 - .long 1071739904 - .long 0 - .long 1071736832 - .long 0 - .long 1071734784 - .long 0 - .long 1071732736 - .long 0 - .long 1071729664 - .long 0 - .long 1071727616 - .long 0 - .long 1071725568 - .long 0 - .long 1071722496 - .long 0 - .long 1071720448 - .long 0 - .long 1071718400 - .long 0 - .long 1071715328 - .long 0 - .long 1071713280 - .long 0 - .long 1071711232 - .long 0 - .long 1071709184 - .long 0 - .long 1071706112 - .long 0 - .long 1071704064 - .long 0 - .long 1071702016 - .long 0 - .long 1071699968 - .long 0 - .long 1071696896 - .long 0 - .long 1071694848 - .long 0 - .long 1071692800 - .long 0 - .long 1071690752 - .long 0 - .long 1071688704 - .long 0 - .long 1071686656 - .long 0 - .long 1071683584 - .long 0 - .long 1071681536 - .long 0 - .long 1071679488 - .long 0 - .long 1071677440 - .long 0 - .long 1071675392 - .long 0 - .long 1071673344 - .long 0 - .long 1071671296 - .long 0 - .long 1071669248 - .long 0 - .long 1071666176 - .long 0 - .long 1071664128 - .long 0 - .long 1071662080 - .long 0 - .long 1071660032 - .long 0 - .long 1071657984 - .long 0 - .long 1071655936 - .long 0 - .long 1071653888 - .long 0 - .long 1071651840 - .long 0 - .long 1071649792 - .long 0 - .long 1071647744 - .long 0 - .long 1071645696 - .type __libm_double_rcp_table_256,@object - .size __libm_double_rcp_table_256,2048 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainder_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainder_gen.S deleted file mode 100644 index b76afc36f3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainder_gen.S +++ /dev/null @@ -1,311 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remainder_gen.c" - .text -..TXTST0: -# -- Begin remainder - .text - .align 16,0x90 - .globl remainder -remainder: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_remainder.1: -..L2: - - movq $0x7fffffffffffffff, %rdi - movd %xmm0, %r9 - movq $0x7ff0000000000000, %rax - movd %xmm1, %rdx - movsd %xmm0, -32(%rsp) - movsd %xmm1, -40(%rsp) - andq %r9, %rdi - btrq $63, %rdx - movq $0x7ff0000000000000, %rcx - andq %rdi, %rax - andq %rdx, %rcx - xorb %r8b, %r8b - shrq $52, %rax - shrq $52, %rcx - addl $-1023, %eax - movq %rdi, -16(%rsp) - addl $-1023, %ecx - movq %rdx, -8(%rsp) - sarq $63, %r9 - movq $0, -24(%rsp) - cmpl $1024, %eax - movsd -16(%rsp), %xmm2 - movsd -8(%rsp), %xmm0 - je ..B1.5 -..B1.2: - cmpl $1024, %ecx - je ..B1.5 -..B1.3: - testq %rdi, %rdi - je ..B1.5 -..B1.4: - testq %rdx, %rdx - jne ..B1.6 -..B1.5: - movb $1, %r8b -..B1.6: - movq $0xfffffffffffff, %rsi - andq %rsi, %rdi - andq %rsi, %rdx - testb %r8b, %r8b - je ..B1.17 -..B1.7: - testq %rdi, %rdi - je ..B1.9 -..B1.8: - cmpl $1024, %eax - je ..B1.43 -..B1.9: - testq %rdx, %rdx - je ..B1.11 -..B1.10: - cmpl $1024, %ecx - je ..B1.44 -..B1.11: - movsd -24(%rsp), %xmm1 - ucomisd %xmm1, %xmm0 - jp ..B1.12 - je ..B1.45 -..B1.12: - movsd -24(%rsp), %xmm0 - ucomisd %xmm0, %xmm2 - jp ..B1.13 - je ..B1.15 -..B1.13: - testq %rdi, %rdi - jne ..B1.15 -..B1.14: - cmpl $1024, %eax - je ..B1.45 -..B1.15: - movsd -32(%rsp), %xmm0 -..B1.16: - ret -..B1.17: - comisd %xmm2, %xmm0 - jb ..B1.23 -..B1.18: - ucomisd %xmm0, %xmm2 - jp ..B1.19 - je ..B1.57 -..B1.19: - cmpl $1023, %eax - je ..B1.21 -..B1.20: - movaps %xmm2, %xmm1 - addsd %xmm2, %xmm1 - comisd %xmm1, %xmm0 - jae ..B1.22 -..B1.21: - testl %r9d, %r9d - subsd %xmm0, %xmm2 - movaps %xmm2, %xmm0 - xorps .L_2il0floatpacket.1(%rip), %xmm0 - jne ..L3 - movaps %xmm2, %xmm0 -..L3: - ret -..B1.22: - movsd -32(%rsp), %xmm0 - ret -..B1.23: - cmpl $-1023, %eax - je ..B1.53 -..B1.24: - movq $0x10000000000000, %r8 - orq %r8, %rdi -..B1.25: - cmpl $-1023, %ecx - je ..B1.49 -..B1.26: - movq $0x10000000000000, %r8 - orq %r8, %rdx -..B1.27: - subl %ecx, %eax - xorl %r8d, %r8d - xorl %r11d, %r11d - incl %eax - je ..B1.31 -..B1.28: - movl $1, %r10d -..B1.29: - movq %rdi, %r8 - incl %r11d - subq %rdx, %r8 - cmpq %rdx, %rdi - cmovae %r8, %rdi - movl $0, %r8d - cmovae %r10, %r8 - addq %rdi, %rdi - cmpl %eax, %r11d - jb ..B1.29 -..B1.31: - testq %rdi, %rdi - je ..B1.58 -..B1.32: - shrq $1, %rdi - cmpq %rsi, %rdi - ja ..B1.36 -..B1.34: - addq %rdi, %rdi - decl %ecx - cmpq %rsi, %rdi - jbe ..B1.34 -..B1.36: - cmpl $-1022, %ecx - jl ..B1.38 -..B1.37: - movslq %ecx, %rcx - andq %rdi, %rsi - addq $1023, %rcx - jmp ..B1.39 -..B1.38: - negl %ecx - movq %rdi, %rsi - addl $2, %ecx - shrq %cl, %rsi - xorl %ecx, %ecx -..B1.39: - shlq $52, %rcx - orq %rsi, %rcx - movq %rcx, -40(%rsp) - movsd -40(%rsp), %xmm2 - movaps %xmm2, %xmm1 - addsd %xmm2, %xmm1 - comisd %xmm0, %xmm1 - jb ..B1.42 -..B1.40: - ucomisd %xmm1, %xmm0 - jp ..B1.41 - je ..B1.48 -..B1.41: - subsd %xmm0, %xmm2 -..B1.42: - movaps %xmm2, %xmm0 - testl %r9d, %r9d - xorps .L_2il0floatpacket.1(%rip), %xmm0 - jne ..L4 - movaps %xmm2, %xmm0 -..L4: - ret -..B1.43: - movsd -32(%rsp), %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - ret -..B1.44: - movsd -40(%rsp), %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - ret -..B1.45: - movsd -24(%rsp), %xmm0 - movsd -24(%rsp), %xmm1 - divsd %xmm1, %xmm0 - ret -..B1.48: - movaps %xmm2, %xmm0 - testq %r8, %r8 - xorps .L_2il0floatpacket.1(%rip), %xmm0 - je ..B1.42 - movaps %xmm0, %xmm2 - jmp ..B1.42 -..B1.49: - testq %rdx, %rdx - je ..B1.26 -..B1.50: - movl $-1022, %ecx -..B1.51: - addq %rdx, %rdx - decl %ecx - cmpq %rsi, %rdx - jbe ..B1.51 - jmp ..B1.27 -..B1.53: - testq %rdi, %rdi - je ..B1.24 -..B1.54: - movl $-1022, %eax -..B1.55: - addq %rdi, %rdi - decl %eax - cmpq %rsi, %rdi - jbe ..B1.55 - jmp ..B1.25 -..B1.57: - movsd -24(%rsp), %xmm0 - mulsd -32(%rsp), %xmm0 - ret -..B1.58: - movsd -24(%rsp), %xmm0 - mulsd -32(%rsp), %xmm0 - movq %rdi, -40(%rsp) - ret - .align 16,0x90 - .cfi_endproc - .type remainder,@function - .size remainder,.-remainder - .data -# -- End remainder - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x33333333,0x3ffb3333 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End - - .globl drem - .equ drem, remainder - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainderf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainderf_gen.S deleted file mode 100644 index 48bf94945f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainderf_gen.S +++ /dev/null @@ -1,78 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remainderf_gen.c" - .text -..TXTST0: -# -- Begin remainderf - .text - .align 16,0x90 - .globl remainderf -remainderf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_remainderf.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - cvtss2sd %xmm0, %xmm0 - cvtss2sd %xmm1, %xmm1 - call remainder@PLT -..B1.4: - cvtsd2ss %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type remainderf,@function - .size remainderf,.-remainderf - .data -# -- End remainderf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End - - .globl dremf - .equ dremf, remainderf - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainderl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainderl.S deleted file mode 100644 index 8174b7d7a2..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remainderl.S +++ /dev/null @@ -1,313 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remainderl.c" - .text -..TXTST0: -# -- Begin remainderl - .text - .align 16,0x90 - .globl remainderl -remainderl: -# parameter 1: 80 + %rsp -# parameter 2: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_remainderl.1: -..L2: - - subq $72, %rsp - .cfi_def_cfa_offset 80 - xorb %dl, %dl - fldt 80(%rsp) - fstpt 32(%rsp) - fldt 96(%rsp) - fstpt 48(%rsp) -..B1.2: - fnstcw 66(%rsp) -..B1.3: - movzwl 104(%rsp), %ecx - andl $32767, %ecx - jne ..B1.6 -..B1.4: - cmpl $0, 100(%rsp) - jne ..B1.6 -..B1.5: - cmpl $0, 96(%rsp) - je ..B1.42 -..B1.6: - movzwl 88(%rsp), %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.40 -..B1.7: - cmpl $32767, %ecx - je ..B1.17 -..B1.8: - movzwl 66(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.12 -..B1.9: - orl $-64768, %ecx - movw %cx, 64(%rsp) -..B1.10: - fldcw 64(%rsp) -..B1.11: - movb $1, %dl -..B1.12: - fldt 48(%rsp) - fldt 32(%rsp) - movq $1024, %rcx -.L_2TAG_PACKET_0.0.2: - fprem1 - fstsw %ax - andq %rcx, %rax - cmpq $1024, %rax - je .L_2TAG_PACKET_0.0.2 - fstp %st(1) - fstpt 16(%rsp) -..B1.13: - testb %dl, %dl - je ..B1.15 -..B1.14: - fldcw 66(%rsp) -..B1.15: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.17: - movq $0x8000000000000000, %rax - cmpq 96(%rsp), %rax - je ..B1.25 -..B1.18: - movzwl 66(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.24 -..B1.19: - orl $-64768, %edx - movw %dx, 64(%rsp) -..B1.20: - fldcw 64(%rsp) -..B1.21: - fldt 80(%rsp) - fldt 96(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) -..B1.22: - fldcw 66(%rsp) -..B1.23: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.24: - fldt 80(%rsp) - fldt 96(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.23 -..B1.25: - cmpl $32767, %esi - je ..B1.31 -..B1.26: - testl %esi, %esi - jne ..B1.30 -..B1.27: - cmpl $0, 84(%rsp) - jne ..B1.29 -..B1.28: - cmpl $0, 80(%rsp) - je ..B1.30 -..B1.29: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 8(%rsp) -..B1.30: - fldt 80(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.31: - cmpl $-2147483648, 84(%rsp) - jne ..B1.30 -..B1.32: - cmpl $0, 80(%rsp) - jne ..B1.30 -..B1.33: - movzwl 66(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.37 -..B1.34: - orl $-64768, %ecx - movw %cx, 64(%rsp) -..B1.35: - fldcw 64(%rsp) -..B1.36: - movb $1, %dl -..B1.37: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - testb %dl, %dl - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 16(%rsp) - je ..B1.39 -..B1.38: - fldcw 66(%rsp) -..B1.39: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.40: - movq $0x8000000000000000, %rax - cmpq 80(%rsp), %rax - jne ..B1.18 -..B1.41: - cmpl $32767, %ecx - je ..B1.17 - jmp ..B1.25 -..B1.42: - movzwl 66(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.46 -..B1.43: - orl $-64768, %ecx - movw %cx, 64(%rsp) -..B1.44: - fldcw 64(%rsp) -..B1.45: - movb $1, %dl -..B1.46: - movzwl 88(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.51 -..B1.47: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 16(%rsp) -..B1.48: - testb %dl, %dl - je ..B1.50 -..B1.49: - fldcw 66(%rsp) -..B1.50: - fldt 16(%rsp) - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.51: - movq $0x8000000000000000, %rax - cmpq 80(%rsp), %rax - je ..B1.47 -..B1.52: - fldt 80(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) - jmp ..B1.48 - .align 16,0x90 - .cfi_endproc - .type remainderl,@function - .size remainderl,.-remainderl - .data -# -- End remainderl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End - - .globl dreml - .equ dreml, remainderl - diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquo.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquo.S deleted file mode 100644 index dfb79d1776..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquo.S +++ /dev/null @@ -1,411 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remquo.c" - .text -..TXTST0: -# -- Begin remquo - .text - .align 16,0x90 - .globl remquo -remquo: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -# parameter 3: %rdi -..B1.1: - .cfi_startproc -..___tag_value_remquo.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - pushq %rbp - .cfi_def_cfa_offset 24 - .cfi_offset 6, -24 - movq $0x7fffffffffffffff, %r8 - movd %xmm0, %rdx - movq $0x7fffffffffffffff, %rsi - movd %xmm1, %r9 - movsd %xmm0, -32(%rsp) - movsd %xmm1, -40(%rsp) - andq %rdx, %r8 - andq %r9, %rsi - sarq $63, %rdx - movq $0x7ff0000000000000, %rcx - sarq $63, %r9 - andq %rsi, %rcx - movl $-1, %eax - movl $1, %ebx - cmpl %edx, %r9d - movq $0x7ff0000000000000, %r9 - movq %r8, -16(%rsp) - movq %rsi, -8(%rsp) - cmovne %eax, %ebx - xorb %bpl, %bpl - andq %r8, %r9 - shrq $52, %r9 - shrq $52, %rcx - addl $-1023, %r9d - addl $-1023, %ecx - movq $0, -24(%rsp) - cmpl $1024, %r9d - movsd -16(%rsp), %xmm2 - movsd -8(%rsp), %xmm0 - je ..B1.5 -..B1.2: - cmpl $1024, %ecx - je ..B1.5 -..B1.3: - testq %r8, %r8 - je ..B1.5 -..B1.4: - testq %rsi, %rsi - jne ..B1.6 -..B1.5: - movb $1, %bpl -..B1.6: - movq $0xfffffffffffff, %r11 - movq %r8, %rax - movq %rsi, %r10 - andq %r11, %rax - andq %r11, %r10 - testb %bpl, %bpl - je ..B1.18 -..B1.7: - movl $0, (%rdi) - testq %rax, %rax - je ..B1.9 -..B1.8: - cmpl $1024, %r9d - je ..B1.47 -..B1.9: - testq %r10, %r10 - je ..B1.11 -..B1.10: - cmpl $1024, %ecx - je ..B1.48 -..B1.11: - testq %rsi, %rsi - je ..B1.49 -..B1.12: - testq %r8, %r8 - je ..B1.16 -..B1.14: - testq %rax, %rax - jne ..B1.16 -..B1.15: - cmpl $1024, %r9d - je ..B1.49 -..B1.16: - movsd -32(%rsp), %xmm0 -..B1.17: - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 24 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.18: - comisd %xmm2, %xmm0 - jb ..B1.25 -..B1.19: - ucomisd %xmm0, %xmm2 - jp ..B1.20 - je ..B1.62 -..B1.20: - cmpl $1023, %r9d - je ..B1.22 -..B1.21: - movaps %xmm2, %xmm1 - addsd %xmm2, %xmm1 - comisd %xmm1, %xmm0 - jae ..B1.24 -..B1.22: - movl %ebx, (%rdi) -..B1.23: - testl %edx, %edx - subsd %xmm0, %xmm2 - movaps %xmm2, %xmm0 - xorps .L_2il0floatpacket.1(%rip), %xmm0 - jne ..L14 - movaps %xmm2, %xmm0 -..L14: - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 24 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.24: - movl $0, (%rdi) - movsd -32(%rsp), %xmm0 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 24 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.25: - cmpl $-1023, %r9d - je ..B1.58 -..B1.26: - movq $0x10000000000000, %rbp - orq %rbp, %rax -..B1.27: - cmpl $-1023, %ecx - je ..B1.54 -..B1.28: - movq $0x10000000000000, %rbp - orq %rbp, %r10 -..B1.29: - subl %ecx, %r9d - xorl %ebp, %ebp - xorl %esi, %esi - incl %r9d - je ..B1.35 -..B1.31: - addl %ebp, %ebp - cmpq %r10, %rax - jb ..B1.33 -..B1.32: - subq %r10, %rax - incl %ebp -..B1.33: - incl %esi - addq %rax, %rax - cmpl %r9d, %esi - jb ..B1.31 -..B1.35: - testq %rax, %rax - je ..B1.63 -..B1.36: - shrq $1, %rax - movq $0xfffffffffffff, %rsi - cmpq %rsi, %rax - ja ..B1.40 -..B1.38: - addq %rax, %rax - decl %ecx - cmpq %rsi, %rax - jbe ..B1.38 -..B1.40: - cmpl $-1022, %ecx - jl ..B1.42 -..B1.41: - movslq %ecx, %rcx - movq $0xfffffffffffff, %rsi - andq %rax, %rsi - addq $1023, %rcx - jmp ..B1.43 -..B1.42: - negl %ecx - movq %rax, %rsi - addl $2, %ecx - shrq %cl, %rsi - xorl %ecx, %ecx -..B1.43: - shlq $52, %rcx - orq %rsi, %rcx - movq %rcx, -40(%rsp) - movsd -40(%rsp), %xmm2 - movaps %xmm2, %xmm1 - addsd %xmm2, %xmm1 - comisd %xmm0, %xmm1 - jb ..B1.46 -..B1.44: - ucomisd %xmm1, %xmm0 - jp ..B1.45 - je ..B1.52 -..B1.45: - incl %ebp - subsd %xmm0, %xmm2 -..B1.46: - andl $2147483647, %ebp - movaps %xmm2, %xmm0 - imull %ebp, %ebx - testl %edx, %edx - xorps .L_2il0floatpacket.1(%rip), %xmm0 - movl %ebx, (%rdi) - jne ..L29 - movaps %xmm2, %xmm0 -..L29: - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 24 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.47: - movsd -32(%rsp), %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 24 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.48: - movsd -40(%rsp), %xmm0 - mulsd .L_2il0floatpacket.0(%rip), %xmm0 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 24 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.49: - movsd -24(%rsp), %xmm0 - movsd -24(%rsp), %xmm1 - divsd %xmm1, %xmm0 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 24 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.52: - testl $1, %ebp - je ..B1.46 -..B1.53: - xorps .L_2il0floatpacket.1(%rip), %xmm2 - incl %ebp - jmp ..B1.46 -..B1.54: - testq %r10, %r10 - je ..B1.28 -..B1.55: - movl $-1022, %ecx - movq $0xfffffffffffff, %rbp -..B1.56: - addq %r10, %r10 - decl %ecx - cmpq %rbp, %r10 - jbe ..B1.56 - jmp ..B1.29 -..B1.58: - testq %rax, %rax - je ..B1.26 -..B1.59: - movl $-1022, %r9d - movq $0xfffffffffffff, %rbp -..B1.60: - addq %rax, %rax - decl %r9d - cmpq %rbp, %rax - jbe ..B1.60 - jmp ..B1.27 -..B1.62: - movl %ebx, (%rdi) - movsd -24(%rsp), %xmm0 - mulsd -32(%rsp), %xmm0 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 24 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.63: - andl $2147483647, %ebp - imull %ebp, %ebx - movl %ebx, (%rdi) - movsd -24(%rsp), %xmm0 - mulsd -32(%rsp), %xmm0 - movq %rax, -40(%rsp) - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type remquo,@function - .size remquo,.-remquo - .data -# -- End remquo - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x33333333,0x3ffb3333 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquof.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquof.S deleted file mode 100644 index a4866f0b2d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquof.S +++ /dev/null @@ -1,75 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remquof.c" - .text -..TXTST0: -# -- Begin remquof - .text - .align 16,0x90 - .globl remquof -remquof: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -# parameter 3: %rdi -..B1.1: - .cfi_startproc -..___tag_value_remquof.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 - cvtss2sd %xmm0, %xmm0 - cvtss2sd %xmm1, %xmm1 - call remquo@PLT -..B1.2: - cvtsd2ss %xmm0, %xmm0 - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type remquof,@function - .size remquof,.-remquof - .data -# -- End remquof - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquol.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquol.S deleted file mode 100644 index 0b15bd3228..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/remquol.S +++ /dev/null @@ -1,1244 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "remquol.c" - .text -..TXTST0: -# -- Begin remquol - .text - .align 16,0x90 - .globl remquol -remquol: -# parameter 1: 80 + %rsp -# parameter 2: 96 + %rsp -# parameter 3: %rdi -..B1.1: - .cfi_startproc -..___tag_value_remquol.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %rbx - .cfi_def_cfa_offset 32 - .cfi_offset 3, -32 - pushq %rbp - .cfi_def_cfa_offset 40 - .cfi_offset 6, -40 - subq $40, %rsp - .cfi_def_cfa_offset 80 - movq %rdi, %r13 - xorb %r12b, %r12b -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzwl 104(%rsp), %edx - movl $0, (%r13) - andl $32767, %edx - jne ..B1.6 -..B1.4: - cmpl $0, 100(%rsp) - jne ..B1.6 -..B1.5: - cmpl $0, 96(%rsp) - je ..B1.50 -..B1.6: - movzwl 88(%rsp), %ecx - andl $32767, %ecx - cmpl $32767, %ecx - je ..B1.48 -..B1.7: - cmpl $32767, %edx - je ..B1.25 -..B1.8: - movzwl 34(%rsp), %edx - movl %edx, %eax - movb 89(%rsp), %bpl - andl $3840, %eax - movb 105(%rsp), %bl - andb $-128, %bpl - andb $-128, %bl - shrb $7, %bpl - shrb $7, %bl - cmpl $768, %eax - je ..B1.12 -..B1.9: - andl $-3841, %edx - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.10: - fldcw 32(%rsp) -..B1.11: - movb $1, %r12b -..B1.12: - addq $-32, %rsp - .cfi_def_cfa_offset 112 - movq %r13, %rdi - fldt 112(%rsp) - fstpt (%rsp) - fldt 128(%rsp) - fstpt 16(%rsp) -..___tag_value_remquol.13: - call __libm_remquol@PLT -..___tag_value_remquol.14: -..B1.63: - addq $32, %rsp - .cfi_def_cfa_offset 80 -..B1.13: - fstpt 16(%rsp) - testb %r12b, %r12b - je ..B1.15 -..B1.14: - fldcw 34(%rsp) -..B1.15: - movl (%r13), %esi - testl %esi, %esi - je ..B1.19 -..B1.16: - movzbl %bl, %edx - lea iones(%rip), %rax - movl (%rax,%rdx,4), %ecx - imull %ecx, %esi - cmpb %bpl, %bl - je ..B1.18 -..B1.17: - orl $-2147483648, %esi - movl %esi, (%r13) - jmp ..B1.19 -..B1.18: - andl $2147483647, %esi - movl %esi, (%r13) -..B1.19: - movzwl 24(%rsp), %eax - testl $32767, %eax - jne ..B1.24 -..B1.20: - cmpq $0, 16(%rsp) - jne ..B1.22 -..B1.21: - movzbl %bpl, %edx - lea _zeros(%rip), %rax - fldl (%rax,%rdx,8) - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.22: - fldt 16(%rsp) - lea _small_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 8(%rsp) -..B1.23: - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.24: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.25: - movq $0x8000000000000000, %rax - cmpq 96(%rsp), %rax - je ..B1.33 -..B1.26: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.32 -..B1.27: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.28: - fldcw 32(%rsp) -..B1.29: - fldt 80(%rsp) - fldt 96(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) -..B1.30: - fldcw 34(%rsp) -..B1.31: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.32: - fldt 80(%rsp) - fldt 96(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.31 -..B1.33: - cmpl $32767, %ecx - je ..B1.39 -..B1.34: - testl %ecx, %ecx - jne ..B1.38 -..B1.35: - cmpl $0, 84(%rsp) - jne ..B1.37 -..B1.36: - cmpl $0, 80(%rsp) - je ..B1.38 -..B1.37: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 8(%rsp) -..B1.38: - fldt 80(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.39: - cmpl $-2147483648, 84(%rsp) - jne ..B1.38 -..B1.40: - cmpl $0, 80(%rsp) - jne ..B1.38 -..B1.41: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.42: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.43: - fldcw 32(%rsp) -..B1.44: - movb $1, %r12b -..B1.45: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - testb %r12b, %r12b - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 16(%rsp) - je ..B1.47 -..B1.46: - fldcw 34(%rsp) -..B1.47: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.48: - movq $0x8000000000000000, %rax - cmpq 80(%rsp), %rax - jne ..B1.26 -..B1.49: - cmpl $32767, %edx - je ..B1.25 - jmp ..B1.33 -..B1.50: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.54 -..B1.51: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.52: - fldcw 32(%rsp) -..B1.53: - movb $1, %r12b -..B1.54: - movzwl 88(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.59 -..B1.55: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 16(%rsp) -..B1.56: - testb %r12b, %r12b - je ..B1.58 -..B1.57: - fldcw 34(%rsp) -..B1.58: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 40 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 32 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -32 - .cfi_offset 6, -40 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.59: - movq $0x8000000000000000, %rax - cmpq 80(%rsp), %rax - je ..B1.55 -..B1.60: - fldt 80(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) - jmp ..B1.56 - .align 16,0x90 - .cfi_endproc - .type remquol,@function - .size remquol,.-remquol - .data -# -- End remquol - .text -# -- Begin __libm_remquol - .text - .align 16,0x90 - .globl __libm_remquol -__libm_remquol: -# parameter 1: 208 + %rsp -# parameter 2: 224 + %rsp -# parameter 3: %rdi -..B2.1: - .cfi_startproc -..___tag_value___libm_remquol.115: -..L116: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $152, %rsp - .cfi_def_cfa_offset 208 - lea _ones(%rip), %rax - fldt 208(%rsp) - movq %rdi, %rbx - andb $127, 233(%rsp) - movzwl 216(%rsp), %r15d - andl $32767, %r15d - movzwl 232(%rsp), %r11d - andl $32767, %r11d - fstpt 112(%rsp) - fldt 112(%rsp) - cmpl $32703, %r15d - fldt 224(%rsp) - fstpt 128(%rsp) - fldt 128(%rsp) - fldl (%rax) - movl $0, 128(%rsp) - jl ..B2.8 -..B2.2: - fstp %st(0) - cmpl $32703, %r11d - jl ..B2.5 -..B2.3: - lea 8+_scales(%rip), %rax - movq %rbx, %rdi - fldl (%rax) - fmul %st, %st(1) - fxch %st(1) - fstpt 224(%rsp) - fldt 224(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 240 - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_remquol.131: - call __libm_remquol@PLT -..___tag_value___libm_remquol.132: -..B2.35: - addq $32, %rsp - .cfi_def_cfa_offset 208 -..B2.4: - lea _scales(%rip), %rax - fmull (%rax) - fstpt 112(%rsp) - fldt 112(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.5: - lea 8+_scales(%rip), %rax - addq $-32, %rsp - .cfi_def_cfa_offset 240 - movq %rbx, %rdi - fldl (%rax) - fmulp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_remquol.155: - call __libm_remquol@PLT -..___tag_value___libm_remquol.156: -..B2.6: - lea _scales(%rip), %rax - movq %rbx, %rdi - fldl (%rax) - fmulp %st, %st(1) - fstpt (%rsp) - fldt 256(%rsp) - fstpt 16(%rsp) -..___tag_value___libm_remquol.157: - call __libm_remquol@PLT -..___tag_value___libm_remquol.158: -..B2.37: - addq $32, %rsp - .cfi_def_cfa_offset 208 -..B2.7: - fstpt 112(%rsp) - fldt 112(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.8: - cmpl $64, %r11d - jge ..B2.12 -..B2.9: - fstp %st(0) - lea _scales(%rip), %rax - movq %rbx, %rdi - fldl (%rax) - fmul %st, %st(1) - fxch %st(1) - fstpt 224(%rsp) - fldt 224(%rsp) - fxch %st(1) - fstpt (%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 240 - fxch %st(1) - fstpt (%rsp) - fstpt 16(%rsp) -..___tag_value___libm_remquol.181: - call __libm_remquol@PLT -..___tag_value___libm_remquol.182: -..B2.38: - addq $32, %rsp - .cfi_def_cfa_offset 208 -..B2.10: - fldt (%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 240 - fmulp %st, %st(1) - movq %rbx, %rdi - fstpt (%rsp) - fldt 256(%rsp) - fstpt 16(%rsp) -..___tag_value___libm_remquol.185: - call __libm_remquol@PLT -..___tag_value___libm_remquol.186: -..B2.39: - addq $32, %rsp - .cfi_def_cfa_offset 208 -..B2.11: - lea 8+_scales(%rip), %rax - fmull (%rax) - fstpt 112(%rsp) - fldt 112(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.12: - lea 1(%r15), %eax - cmpl %eax, %r11d - jg ..B2.31 -..B2.13: - lea -32(%r15), %eax - cmpl %eax, %r11d - jle ..B2.22 -..B2.14: - fstp %st(0) - fldt 128(%rsp) - fld %st(2) - fdiv %st(2), %st - lea _TWO_63H(%rip), %rax - fld %st(2) - lea _halfs(%rip), %rdx - fsub %st(2), %st - fldl (%rax) - fld %st(0) - fadd %st(3), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fmul %st, %st(3) - movl 16(%rsp), %eax - fxch %st(3) - fsubrp %st, %st(5) - fmul %st(2), %st - fsubrp %st, %st(4) - fld %st(1) - fsubr %st(1), %st - fabs - fldl (%rdx) - fucomi %st(1), %st - fxch %st(1) - fstp %st(0) - jp ..B2.15 - je ..B2.16 -..B2.15: - fstp %st(3) - fstp %st(1) - fstp %st(0) - fstp %st(0) - movl %eax, (%rbx) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.16: - fmul %st(3), %st - fld %st(4) - fabs - fcomip %st(1), %st - fstp %st(0) - jp ..B2.17 - jbe ..B2.21 -..B2.17: - fcomip %st(1), %st - fstp %st(0) - ja ..B2.19 - jp ..B2.19 -..B2.18: - decl %eax - faddp %st, %st(1) - movl %eax, (%rbx) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.19: - incl %eax - fsubrp %st, %st(1) - movl %eax, (%rbx) -..B2.20: - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.21: - fstp %st(2) - fstp %st(0) - fstp %st(0) - movl %eax, (%rbx) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.22: - fldt 128(%rsp) - subl %r11d, %r15d - fstpt 32(%rsp) - fldt 32(%rsp) - fld %st(1) - fdiv %st(3), %st - fld %st(3) - fsubp %st, %st(2) - xorl %r10d, %r10d - addl $-31, %r15d - movl %r15d, %ecx - jle ..B2.32 -..B2.23: - lea _TWO_63H(%rip), %rdi - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 16(%rsp) - fldt 16(%rsp) - fxch %st(2) - fstpt 96(%rsp) - fldl (%rdi) - movzwl 8(%rsp), %eax - movzwl 88(%rsp), %r8d - andl $32767, %eax - movzwl 24(%rsp), %esi - movl 20(%rsp), %ebp - movzwl 104(%rsp), %edx - movzwl 136(%rsp), %r12d - movl 132(%rsp), %r13d - movzwl 72(%rsp), %r14d - movl 4(%rsp), %r9d - movq %rbx, 48(%rsp) - xorl %ebx, %ebx -..B2.24: - movl %esi, %edi - andl $-32768, %r8d - subl %r15d, %edi - andl $-32768, %edx - andl $32767, %edi - andl $-32768, %r14d - orl %edi, %r8d - lea (%r12,%r15), %edi - movw %r8w, 88(%rsp) - andl $32767, %edi - movl %ebp, 84(%rsp) - orl %edi, %edx - fldt 80(%rsp) - movl $1, %edi - testl %eax, %eax - fmul %st(5), %st - cmove %eax, %edi - subl %r15d, %ecx - imull %r15d, %edi - fadd %st(1), %st - fstpt 16(%rsp) - fldt 16(%rsp) - addl %eax, %edi - movw %dx, 104(%rsp) - andl $32767, %edi - movl %r13d, 100(%rsp) - orl %edi, %r14d - movw %r14w, 72(%rsp) - fsub %st(1), %st - fldt 96(%rsp) - fmul %st(1), %st - movl %r9d, 68(%rsp) - fsubrp %st, %st(6) - fldt 64(%rsp) - fmulp %st, %st(1) - shll %cl, %r10d - cmpl $32, %ecx - movl %r15d, %ecx - fsubrp %st, %st(5) - fxch %st(4) - fstpt 112(%rsp) - fldt 112(%rsp) - cmovae %ebx, %r10d - movzwl 120(%rsp), %edi - andl $32767, %edi - subl %r11d, %edi - movl %edi, %r15d - addl 16(%rsp), %r10d - addl $-31, %r15d - fxch %st(4) - jg ..B2.24 -..B2.25: - movq 48(%rsp), %rbx -..B2.26: - fldt 32(%rsp) - fld %st(1) - fxch %st(4) - fmul %st(6), %st - lea _halfs(%rip), %rdx - shll %cl, %r10d - xorl %eax, %eax - cmpl $32, %ecx - fadd %st, %st(4) - fxch %st(4) - fstpt 16(%rsp) - fldt 16(%rsp) - fld %st(3) - cmovb %r10d, %eax - fxch %st(1) - fsub %st(3), %st - fmul %st, %st(2) - addl 16(%rsp), %eax - fxch %st(2) - fsubrp %st, %st(7) - fmul %st(1), %st - fsubrp %st, %st(6) - fld %st(5) - fabs - fldl (%rdx) - fmul %st(6), %st - fstpt (%rsp) - fldt (%rsp) - fcomip %st(1), %st - ja ..B2.30 -..B2.27: - fldt (%rsp) - fcomip %st(1), %st - fstp %st(0) - jae ..B2.29 - jp ..B2.29 -..B2.28: - fstp %st(2) - fstp %st(0) - fxch %st(1) - fcomip %st(1), %st - fstp %st(0) - fld %st(1) - movl %eax, (%rbx) - fsub %st(1), %st - fxch %st(1) - faddp %st, %st(2) - fcmovb %st(1), %st - fstp %st(1) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.29: - fstp %st(0) - fstp %st(2) - fldt 32(%rsp) - fxch %st(3) - fdivr %st(4), %st - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - addl 16(%rsp), %eax - fxch %st(2) - fsubrp %st, %st(3) - fmulp %st, %st(1) - movl %eax, (%rbx) - fsubrp %st, %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.30: - fstp %st(5) - fstp %st(4) - fstp %st(3) - fstp %st(1) - fstp %st(0) - fstp %st(0) - movl %eax, (%rbx) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.31: - fstp %st(1) - fstp %st(0) - movl $0, (%rbx) - addq $152, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 208 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B2.32: - fstp %st(2) - lea _TWO_63H(%rip), %rax - fldl (%rax) - jmp ..B2.26 - .align 16,0x90 - .cfi_endproc - .type __libm_remquol,@function - .size __libm_remquol,.-__libm_remquol - .data -# -- End __libm_remquol - .section .rodata, "a" - .align 4 - .align 4 -iones: - .long 1 - .long -1 - .type iones,@object - .size iones,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_scales: - .long 0 - .long 1341128704 - .long 0 - .long 804257792 - .type _scales,@object - .size _scales,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_halfs: - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .type _halfs,@object - .size _halfs,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rint_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rint_gen.S deleted file mode 100644 index 71ee463b45..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rint_gen.S +++ /dev/null @@ -1,89 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "rint_gen.c" - .text -..TXTST0: -# -- Begin rint - .text - .align 16,0x90 - .globl rint -rint: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_rint.1: -..L2: - -..B1.2: - xorpd %xmm1, %xmm1 - ucomisd p2to52(%rip), %xmm0 - jae .L_2TAG_PACKET_0.0.1 - ucomisd m2to52(%rip), %xmm0 - jbe .L_2TAG_PACKET_0.0.1 - ucomisd %xmm1, %xmm0 - je .L_2TAG_PACKET_0.0.1 - cvtsd2si %xmm0, %rax - cvtsi2sdq %rax, %xmm0 -.L_2TAG_PACKET_0.0.1: - ret -..B1.3: - .align 16,0x90 - .cfi_endproc - .type rint,@function - .size rint,.-rint - .data -# -- End rint - .section .rodata, "a" - .align 16 - .align 16 -p2to52: - .long 0x00000000,0x43300000 - .type p2to52,@object - .size p2to52,8 - .space 8, 0x00 # pad - .align 16 -m2to52: - .long 0x00000000,0xc3300000 - .type m2to52,@object - .size m2to52,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rintf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rintf_gen.S deleted file mode 100644 index caef1e7adb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rintf_gen.S +++ /dev/null @@ -1,89 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "rintf_gen.c" - .text -..TXTST0: -# -- Begin rintf - .text - .align 16,0x90 - .globl rintf -rintf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_rintf.1: -..L2: - -..B1.2: - xorps %xmm1, %xmm1 - ucomiss p2to23(%rip), %xmm0 - jae .L_2TAG_PACKET_0.0.1 - ucomiss m2to23(%rip), %xmm0 - jbe .L_2TAG_PACKET_0.0.1 - ucomiss %xmm1, %xmm0 - je .L_2TAG_PACKET_0.0.1 - cvtss2si %xmm0, %eax - cvtsi2ss %eax, %xmm0 -.L_2TAG_PACKET_0.0.1: - ret -..B1.3: - .align 16,0x90 - .cfi_endproc - .type rintf,@function - .size rintf,.-rintf - .data -# -- End rintf - .section .rodata, "a" - .align 16 - .align 16 -p2to23: - .long 0x4b000000 - .type p2to23,@object - .size p2to23,4 - .space 12, 0x00 # pad - .align 16 -m2to23: - .long 0xcb000000 - .type m2to23,@object - .size m2to23,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rintl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rintl.S deleted file mode 100644 index 0c1537593b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/rintl.S +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "rintl.c" - .text -..TXTST0: -# -- Begin rintl - .text - .align 16,0x90 - .globl rintl -rintl: -# parameter 1: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_rintl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - xorb %cl, %cl -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movb 41(%rsp), %dl - movzwl 40(%rsp), %eax - andb $-128, %dl - andl $32767, %eax - shrb $7, %dl - movzwl 18(%rsp), %esi - cmpl $16446, %eax - jge ..B1.13 -..B1.4: - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.8 -..B1.5: - orl $-64768, %esi - movw %si, 16(%rsp) -..B1.6: - fldcw 16(%rsp) -..B1.7: - movb $1, %cl -..B1.8: - fldt 32(%rsp) - lea _TWO_63(%rip), %rax - movzbl %dl, %edx - testb %cl, %cl - fldl (%rax,%rdx,8) - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 32(%rsp) - je ..B1.10 -..B1.9: - fldcw 18(%rsp) -..B1.10: - fldt 32(%rsp) - lea _zeros(%rip), %rax - fldl (%rax) - fucomip %st(1), %st - jp ..B1.12 - je ..B1.19 -..B1.12: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.13: - movl %esi, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.20 -..B1.14: - orl $-64768, %esi - movw %si, 16(%rsp) -..B1.15: - fldcw 16(%rsp) -..B1.16: - fldt 32(%rsp) - fstpt (%rsp) -..B1.17: - fldcw 18(%rsp) -..B1.18: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.19: - fstp %st(0) - fldl (%rax,%rdx,8) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.20: - fldt 32(%rsp) - fstpt (%rsp) - jmp ..B1.18 - .align 16,0x90 - .cfi_endproc - .type rintl,@function - .size rintl,.-rintl - .data -# -- End rintl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_63: - .long 0 - .long 1138753536 - .long 0 - .long 3286237184 - .type _TWO_63,@object - .size _TWO_63,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/round_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/round_gen.S deleted file mode 100644 index 3aec83c446..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/round_gen.S +++ /dev/null @@ -1,181 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "round_gen.c" - .text -..TXTST0: -# -- Begin round - .text - .align 16,0x90 - .globl round -round: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_round.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, (%rsp) -..B1.2: - movapd bns(%rip), %xmm2 - movapd %xmm0, %xmm3 - movapd %xmm0, %xmm1 - psrlq $52, %xmm0 - movd %xmm0, %eax - andpd s(%rip), %xmm0 - psubd %xmm0, %xmm2 - psrlq %xmm2, %xmm1 - psllq %xmm2, %xmm1 - testl $2048, %eax - jne .L_2TAG_PACKET_0.0.1 - cmpl $1023, %eax - jl .L_2TAG_PACKET_1.0.1 - cmpl $1074, %eax - jg .L_2TAG_PACKET_2.0.1 - subsd %xmm1, %xmm3 - movq %xmm1, %xmm0 - cmppd $5, p_half(%rip), %xmm3 - andpd p_one(%rip), %xmm3 - addsd %xmm3, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_1.0.1: - cmpl $1022, %eax - jl .L_2TAG_PACKET_3.0.1 - movq p_one(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_3.0.1: - pxor %xmm0, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_2.0.1: - movq (%rsp), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_0.0.1: - cmpl $3071, %eax - jl .L_2TAG_PACKET_4.0.1 - cmpl $3122, %eax - jg .L_2TAG_PACKET_2.0.1 - subsd %xmm1, %xmm3 - movq %xmm1, %xmm0 - cmppd $2, n_half(%rip), %xmm3 - andpd n_one(%rip), %xmm3 - addsd %xmm3, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_4.0.1: - cmpl $3070, %eax - jl .L_2TAG_PACKET_5.0.1 - movq n_one(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_5.0.1: - movq 8+zeros(%rip), %xmm0 - movq %xmm0, 8(%rsp) -.L_2TAG_PACKET_6.0.1: -..B1.4: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type round,@function - .size round,.-round - .data -# -- End round - .section .rodata, "a" - .align 16 - .align 16 -bns: - .long 1075 - .long 0 - .long 1075 - .long 0 - .type bns,@object - .size bns,16 - .align 16 -s: - .long 2047 - .long 0 - .long 0 - .long 0 - .type s,@object - .size s,16 - .align 16 -p_half: - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .type p_half,@object - .size p_half,16 - .align 16 -p_one: - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .type p_one,@object - .size p_one,16 - .align 16 -n_half: - .long 0 - .long 3219128320 - .long 0 - .long 1127219200 - .type n_half,@object - .size n_half,16 - .align 16 -n_one: - .long 0 - .long 3220176896 - .long 0 - .long 1127219200 - .type n_one,@object - .size n_one,16 - .align 16 -zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type zeros,@object - .size zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/roundf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/roundf_gen.S deleted file mode 100644 index 8bd688ee02..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/roundf_gen.S +++ /dev/null @@ -1,118 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "roundf_gen.c" - .text -..TXTST0: -# -- Begin roundf - .text - .align 16,0x90 - .globl roundf -roundf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_roundf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movss %xmm0, 8(%rsp) -..B1.2: - movl 8(%rsp), %eax - testl %eax, %eax - jl .L_2TAG_PACKET_0.0.1 - cmpl $1056964608, %eax - jl .L_2TAG_PACKET_1.0.1 - cmpl $1258291200, %eax - jge .L_2TAG_PACKET_2.0.1 - cmpl $1065353216, %eax - je .L_2TAG_PACKET_2.0.1 - addss half(%rip), %xmm0 - cvttss2si %xmm0, %eax - cvtsi2ss %eax, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_1.0.1: - pxor %xmm0, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_2.0.1: - movss 8(%rsp), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_3.0.1: - movss nzero(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_0.0.1: - andl $2147483647, %eax - cmpl $1056964608, %eax - jl .L_2TAG_PACKET_3.0.1 - cmpl $1258291200, %eax - jge .L_2TAG_PACKET_2.0.1 - cmpl $1065353216, %eax - je .L_2TAG_PACKET_2.0.1 - subss half(%rip), %xmm0 - cvttss2si %xmm0, %eax - cvtsi2ss %eax, %xmm0 - movss %xmm0, (%rsp) -.L_2TAG_PACKET_4.0.1: -..B1.4: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type roundf,@function - .size roundf,.-roundf - .data -# -- End roundf - .section .rodata, "a" - .align 4 - .align 4 -half: - .long 1056964608 - .type half,@object - .size half,4 - .align 4 -nzero: - .long 2147483648 - .type nzero,@object - .size nzero,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/roundl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/roundl.S deleted file mode 100644 index 75046e8fa0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/roundl.S +++ /dev/null @@ -1,245 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "roundl.c" - .text -..TXTST0: -# -- Begin roundl - .text - .align 16,0x90 - .globl roundl -roundl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_roundl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %al, %al -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 56(%rsp), %edi - andl $32767, %edi - cmpl $16446, %edi - jge ..B1.25 -..B1.4: - cmpl $16383, %edi - jl ..B1.19 -..B1.5: - cmpl $16414, %edi - jge ..B1.7 -..B1.6: - movl 52(%rsp), %edx - lea 2(%rdi), %ecx - negl %edi - movl %edx, %esi - addl $30, %edi - shll %cl, %esi - movl %edi, %ecx - shrl %cl, %edx - movl %edi, %ecx - shll %cl, %edx - movl %edx, 52(%rsp) - movl $0, 48(%rsp) - jmp ..B1.10 -..B1.7: - jle ..B1.9 -..B1.8: - movl 48(%rsp), %edx - lea 2(%rdi), %ecx - negl %edi - movl %edx, %esi - addl $30, %edi - shll %cl, %esi - movl %edi, %ecx - shrl %cl, %edx - movl %edi, %ecx - shll %cl, %edx - movl %edx, 48(%rsp) - jmp ..B1.10 -..B1.9: - movl 48(%rsp), %esi - movl $0, 48(%rsp) -..B1.10: - testl %esi, %esi - jge ..B1.18 -..B1.11: - movzwl 26(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.15 -..B1.12: - orl $-64768, %ecx - movw %cx, 24(%rsp) -..B1.13: - fldcw 24(%rsp) -..B1.14: - movb $1, %al -..B1.15: - fldt 48(%rsp) - lea _ones(%rip), %rcx - movb 57(%rsp), %dl - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %esi - testb %al, %al - faddl (%rcx,%rsi,8) - fstpt (%rsp) - je ..B1.17 -..B1.16: - fldcw 26(%rsp) -..B1.17: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.18: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.19: - cmpl $16382, %edi - je ..B1.32 -..B1.20: - testl %edi, %edi - jne ..B1.24 -..B1.21: - cmpl $0, 52(%rsp) - jne ..B1.23 -..B1.22: - cmpl $0, 48(%rsp) - je ..B1.24 -..B1.23: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, 16(%rsp) -..B1.24: - movb 57(%rsp), %al - lea _zeros(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.25: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.31 -..B1.26: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.27: - fldcw 24(%rsp) -..B1.28: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.29: - fldcw 26(%rsp) -..B1.30: - fldt (%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.31: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt (%rsp) - jmp ..B1.30 -..B1.32: - movb 57(%rsp), %al - lea _ones(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type roundl,@function - .size roundl,.-roundl - .data -# -- End roundl - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalb_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalb_gen.S deleted file mode 100644 index 9d63d2832e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalb_gen.S +++ /dev/null @@ -1,369 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalb_gen.c" - .text -..TXTST0: -# -- Begin scalb - .text - .align 16,0x90 - .globl scalb -scalb: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_scalb.1: -..L2: - - movaps %xmm1, %xmm2 - movsd %xmm0, -16(%rsp) - movzwl -10(%rsp), %eax - movl %eax, %edx - movsd %xmm2, -8(%rsp) - andl $32752, %edx - movzwl -2(%rsp), %ecx - andl $32752, %ecx - shrl $4, %edx - shrl $4, %ecx - cmpl $2047, %edx - je ..B1.56 -..B1.2: - cmpl $2047, %ecx - je ..B1.37 -..B1.3: - cmpl $1023, %ecx - jl ..B1.20 -..B1.4: - cmpl $1044, %ecx - jge ..B1.7 -..B1.5: - lea _TWO_52H(%rip), %rcx - pxor %xmm1, %xmm1 - movsd (%rcx), %xmm0 - addsd %xmm2, %xmm0 - movsd %xmm0, -24(%rsp) - movl -24(%rsp), %edi - cvtsi2sd %edi, %xmm1 - ucomisd %xmm2, %xmm1 - jp ..B1.6 - je ..B1.10 -..B1.6: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - ret -..B1.7: - movb -1(%rsp), %sil - lea large_integers(%rip), %rdi - andb $-128, %sil - shrb $7, %sil - movzbl %sil, %r8d - cmpl $1075, %ecx - movl (%rdi,%r8,4), %edi - jge ..B1.10 -..B1.8: - addl $13, %ecx - movl -8(%rsp), %esi - shll %cl, %esi - testl %esi, %esi - jne ..B1.6 -..B1.10: - testl %edx, %edx - jne ..B1.15 -..B1.11: - testl $1048575, -12(%rsp) - jne ..B1.14 -..B1.12: - cmpl $0, -16(%rsp) - jne ..B1.14 -..B1.13: - movsd -16(%rsp), %xmm0 - ret -..B1.14: - lea _TWO_55(%rip), %rax - movsd -16(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -16(%rsp) - movzwl -10(%rsp), %eax - movl %eax, %edx - andl $32752, %edx - shrl $4, %edx - addl $-55, %edx -..B1.15: - movl $65536, %ecx - cmpl $65536, %edi - cmovg %ecx, %edi - movl $-65536, %esi - cmpl $-65536, %edi - cmovge %edi, %esi - lea (%rdx,%rsi), %ecx - testl %ecx, %ecx - jle ..B1.33 -..B1.16: - cmpl $2047, %ecx - jl ..B1.18 -..B1.17: - movb -9(%rsp), %al - lea _large_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.18: - andl $2047, %ecx - andl $-32753, %eax - shll $4, %ecx - orl %ecx, %eax - movw %ax, -10(%rsp) - movsd -16(%rsp), %xmm0 -..B1.19: - ret -..B1.20: - testl %ecx, %ecx - jne ..B1.24 -..B1.21: - testl $1048575, -4(%rsp) - jne ..B1.24 -..B1.22: - cmpl $0, -8(%rsp) - jne ..B1.24 -..B1.23: - lea _ones(%rip), %rax - movsd -16(%rsp), %xmm0 - mulsd (%rax), %xmm0 - ret -..B1.24: - cmpl $2047, %edx - jne ..B1.6 -..B1.25: - testl %ecx, %ecx - jle ..B1.6 -..B1.26: - cmpl $1, %ecx - jne ..B1.30 -..B1.27: - movl -4(%rsp), %eax - andl $1048575, %eax -..B1.28: - jne ..B1.30 -..B1.29: - cmpl $0, -8(%rsp) - jbe ..B1.6 -..B1.30: - movb -9(%rsp), %al - lea _infs(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movsd (%rdx,%rcx,8), %xmm0 - ret -..B1.33: - cmpl $-52, %ecx - jge ..B1.35 -..B1.34: - movb -9(%rsp), %al - lea _small_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.35: - andl $-32753, %eax - lea 55(%rdx,%rsi), %edx - andl $2047, %edx - shll $4, %edx - orl %edx, %eax - movw %ax, -10(%rsp) - lea 8+_TWO_55(%rip), %rax - movsd -16(%rsp), %xmm0 - mulsd (%rax), %xmm0 -..B1.36: - ret -..B1.37: - testl $1048575, -4(%rsp) - jne ..B1.51 -..B1.38: - cmpl $0, -8(%rsp) - jne ..B1.51 -..B1.39: - testl %edx, %edx - jne ..B1.46 -..B1.40: - testl $1048575, -12(%rsp) - jne ..B1.47 -..B1.41: - cmpl $0, -16(%rsp) - jne ..B1.47 -..B1.42: - testb $-128, -1(%rsp) - je ..B1.44 -..B1.43: - movsd -16(%rsp), %xmm0 - ret -..B1.44: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 -..B1.45: - ret -..B1.46: - cmpl $2047, %edx - je ..B1.52 -..B1.47: - movb -9(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - testb $-128, -1(%rsp) - je ..B1.49 -..B1.48: - lea _zeros(%rip), %rax - movsd (%rax,%rdx,8), %xmm0 - ret -..B1.49: - lea _infs(%rip), %rax - movsd (%rax,%rdx,8), %xmm0 -..B1.50: - ret -..B1.51: - movsd -16(%rsp), %xmm0 - addsd -8(%rsp), %xmm0 - ret -..B1.52: - testb $-128, -1(%rsp) - jne ..B1.54 -..B1.53: - movsd -16(%rsp), %xmm0 - ret -..B1.54: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 -..B1.55: - ret -..B1.56: - testl $1048575, -12(%rsp) - jne ..B1.51 -..B1.57: - cmpl $0, -16(%rsp) - jne ..B1.51 -..B1.58: - cmpl $2047, %ecx - je ..B1.37 - jmp ..B1.20 - .align 16,0x90 - .cfi_endproc - .type scalb,@function - .size scalb,.-scalb - .data -# -- End scalb - .section .rodata, "a" - .align 4 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -large_integers: - .long 65536 - .long -65536 - .type large_integers,@object - .size large_integers,8 - .align 4 -_TWO_55: - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .type _TWO_55,@object - .size _TWO_55,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbf.S deleted file mode 100644 index a8e79cb12b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbf.S +++ /dev/null @@ -1,321 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbf.c" - .text -..TXTST0: -# -- Begin scalbf - .text - .align 16,0x90 - .globl scalbf -scalbf: -# parameter 1: %xmm0 -# parameter 2: %xmm1 -..B1.1: - .cfi_startproc -..___tag_value_scalbf.1: -..L2: - - movss %xmm0, -16(%rsp) - movzwl -14(%rsp), %esi - movl %esi, %edx - movss %xmm1, -24(%rsp) - andl $32640, %edx - movzwl -22(%rsp), %r8d - andl $32640, %r8d - shrl $7, %edx - shrl $7, %r8d - cmpl $255, %edx - je ..B1.48 -..B1.2: - cmpl $255, %r8d - je ..B1.31 -..B1.3: - cmpl $127, %r8d - jl ..B1.16 -..B1.4: - cmpl $150, %r8d - jge ..B1.7 -..B1.5: - movd %xmm1, %edi - movl %r8d, %ecx - andl $8388607, %edi - negl %ecx - movl %edi, %eax - addl $22, %ecx - orl $8388608, %eax - addl $10, %r8d - shrl %cl, %eax - movl %r8d, %ecx - shll %cl, %edi - testl %edi, %edi - je ..B1.8 -..B1.6: - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.0(%rip), %xmm0 - ret -..B1.7: - movl $65536, %eax -..B1.8: - testl %edx, %edx - jne ..B1.11 -..B1.9: - testl $8388607, -16(%rsp) - je ..B1.15 -..B1.10: - movss -16(%rsp), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - movss %xmm0, -16(%rsp) - movzwl -14(%rsp), %esi - movl %esi, %edx - andl $32640, %edx - shrl $7, %edx - addl $-25, %edx -..B1.11: - movl $65536, %ecx - cmpl $65536, %eax - movzbl -21(%rsp), %edi - cmovg %ecx, %eax - movl %eax, %r8d - negl %r8d - testl $128, %edi - cmovne %r8d, %eax - lea (%rdx,%rax), %ecx - testl %ecx, %ecx - jle ..B1.27 -..B1.12: - cmpl $255, %ecx - jge ..B1.26 -..B1.13: - movzbl %cl, %ecx - andl $-32641, %esi - shll $7, %ecx - orl %ecx, %esi - movw %si, -14(%rsp) - movss -16(%rsp), %xmm0 -..B1.14: - ret -..B1.15: - movss -16(%rsp), %xmm0 - ret -..B1.16: - testl %r8d, %r8d - jne ..B1.19 -..B1.17: - testl $8388607, -24(%rsp) - je ..B1.15 -..B1.19: - cmpl $255, %edx - jne ..B1.6 -..B1.20: - testl %r8d, %r8d - jle ..B1.6 -..B1.21: - cmpl $1, %r8d - jne ..B1.23 -..B1.22: - testl $8388607, -24(%rsp) - jle ..B1.6 -..B1.23: - movb -13(%rsp), %al - lea _infs(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - ret -..B1.26: - movb -13(%rsp), %al - lea _large_value_32(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.2(%rip), %xmm0 - movss %xmm0, -24(%rsp) - ret -..B1.27: - cmpl $-23, %ecx - jge ..B1.29 -..B1.28: - movb -13(%rsp), %al - lea _small_value_32(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.3(%rip), %xmm0 - jmp ..B1.30 -..B1.29: - movl -16(%rsp), %ecx - lea 25(%rdx,%rax), %eax - movl %ecx, -24(%rsp) - shrl $16, %ecx - movzbl %al, %eax - andl $-32641, %ecx - shll $7, %eax - orl %eax, %ecx - movw %cx, -22(%rsp) - movss -24(%rsp), %xmm0 - mulss .L_2il0floatpacket.4(%rip), %xmm0 -..B1.30: - movss %xmm0, -24(%rsp) - ret -..B1.31: - testl $8388607, -24(%rsp) - jne ..B1.43 -..B1.32: - testl %edx, %edx - jne ..B1.38 -..B1.33: - testl $8388607, -16(%rsp) - jne ..B1.39 -..B1.34: - testb $-128, -21(%rsp) - je ..B1.36 -..B1.35: - movss -16(%rsp), %xmm0 - ret -..B1.36: - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.0(%rip), %xmm0 -..B1.37: - ret -..B1.38: - cmpl $255, %edx - je ..B1.44 -..B1.39: - movb -13(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - testb $-128, -21(%rsp) - je ..B1.41 -..B1.40: - lea _zeros(%rip), %rax - movss (%rax,%rdx,4), %xmm0 - ret -..B1.41: - lea _infs(%rip), %rax - movss (%rax,%rdx,4), %xmm0 -..B1.42: - ret -..B1.43: - movss -16(%rsp), %xmm0 - addss -24(%rsp), %xmm0 - ret -..B1.44: - testb $-128, -21(%rsp) - jne ..B1.46 -..B1.45: - movss -16(%rsp), %xmm0 - ret -..B1.46: - pxor %xmm0, %xmm0 - mulss .L_2il0floatpacket.0(%rip), %xmm0 -..B1.47: - ret -..B1.48: - testl $8388607, -16(%rsp) - jne ..B1.43 -..B1.49: - cmpl $255, %r8d - je ..B1.31 - jmp ..B1.16 - .align 16,0x90 - .cfi_endproc - .type scalbf,@function - .size scalbf,.-scalbf - .data -# -- End scalbf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x7f800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x4c000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x71800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x0d800000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -.L_2il0floatpacket.4: - .long 0x33000000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,4 - .align 4 -_infs: - .long 2139095040 - .long 4286578688 - .type _infs,@object - .size _infs,8 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbl.S deleted file mode 100644 index 9fe1d5ab06..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbl.S +++ /dev/null @@ -1,623 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbl.c" - .text -..TXTST0: -# -- Begin scalbl - .text - .align 16,0x90 - .globl scalbl -scalbl: -# parameter 1: 48 + %rsp -# parameter 2: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_scalbl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - xorb %dl, %dl -..B1.2: - fnstcw 34(%rsp) -..B1.3: - movzwl 56(%rsp), %eax - andl $32767, %eax - movzwl 72(%rsp), %ecx - andl $32767, %ecx - cmpl $32767, %eax - je ..B1.100 -..B1.4: - cmpl $32767, %ecx - je ..B1.69 -..B1.5: - cmpl $16383, %ecx - jl ..B1.32 -..B1.6: - movzwl 34(%rsp), %edi - movl %edi, %esi - andl $768, %esi - cmpl $768, %esi - je ..B1.10 -..B1.7: - orl $-64768, %edi - movw %di, 32(%rsp) -..B1.8: - fldcw 32(%rsp) -..B1.9: - movb $1, %dl -..B1.10: - cmpl $16414, %ecx - jge ..B1.15 -..B1.11: - fldt 64(%rsp) - lea _TWO_63H(%rip), %rcx - fldl (%rcx) - fadd %st(1), %st - fstpt 16(%rsp) - fildl 16(%rsp) - movl 16(%rsp), %edi - fucomip %st(1), %st - fstp %st(0) - jp ..B1.12 - je ..B1.20 -..B1.12: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - testb %dl, %dl - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) - je ..B1.14 -..B1.13: - fldcw 34(%rsp) -..B1.14: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.15: - movb 73(%rsp), %sil - lea large_integers(%rip), %rdi - andb $-128, %sil - shrb $7, %sil - movzbl %sil, %r8d - cmpl $16446, %ecx - movl (%rdi,%r8,4), %edi - jge ..B1.20 -..B1.16: - addl $2, %ecx - movl 64(%rsp), %esi - shll %cl, %esi - testl %esi, %esi - je ..B1.20 -..B1.17: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - testb %dl, %dl - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) - je ..B1.19 -..B1.18: - fldcw 34(%rsp) -..B1.19: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.20: - testl %eax, %eax - jne ..B1.26 -..B1.21: - cmpq $0, 48(%rsp) - jne ..B1.25 -..B1.22: - testb %dl, %dl - je ..B1.24 -..B1.23: - fldcw 34(%rsp) -..B1.24: - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.25: - fldt 48(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 48(%rsp) - movzwl 56(%rsp), %eax - andl $32767, %eax - addl $-75, %eax -..B1.26: - movl $65536, %ecx - cmpl $65536, %edi - cmovg %ecx, %edi - movl $-65536, %esi - cmpl $-65536, %edi - cmovge %edi, %esi - lea (%rax,%rsi), %ecx - testl %ecx, %ecx - jle ..B1.49 -..B1.27: - cmpl $32767, %ecx - jge ..B1.48 -..B1.28: - movzwl 56(%rsp), %eax - andl $32767, %ecx - andl $-32768, %eax - orl %ecx, %eax - movw %ax, 56(%rsp) - fldt 48(%rsp) -..B1.29: - fstpt 16(%rsp) - testb %dl, %dl - je ..B1.31 -..B1.30: - fldcw 34(%rsp) -..B1.31: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.32: - testl %ecx, %ecx - jne ..B1.40 -..B1.33: - cmpq $0, 64(%rsp) - jne ..B1.40 -..B1.34: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.55 -..B1.35: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.36: - fldcw 32(%rsp) -..B1.37: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) -..B1.38: - fldcw 34(%rsp) -..B1.39: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.40: - cmpl $32767, %eax - je ..B1.56 -..B1.41: - movzwl 34(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.42: - orl $-64768, %ecx - movw %cx, 32(%rsp) -..B1.43: - fldcw 32(%rsp) -..B1.44: - movb $1, %dl -..B1.45: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - testb %dl, %dl - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) - je ..B1.47 -..B1.46: - fldcw 34(%rsp) -..B1.47: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.48: - movb 57(%rsp), %al - lea _large_value_80(%rip), %rsi - andb $-128, %al - shrb $7, %al - fldt (%rsi) - movzbl %al, %ecx - shlq $4, %rcx - fldt (%rsi,%rcx) - fmulp %st, %st(1) - jmp ..B1.29 -..B1.49: - cmpl $-63, %ecx - jge ..B1.51 -..B1.50: - movb 57(%rsp), %al - lea _small_value_80(%rip), %rsi - andb $-128, %al - shrb $7, %al - fldt (%rsi) - movzbl %al, %ecx - shlq $4, %rcx - fldt (%rsi,%rcx) - fmulp %st, %st(1) - jmp ..B1.52 -..B1.51: - fldt 48(%rsp) - lea 75(%rax,%rsi), %eax - movzwl 56(%rsp), %ecx - andl $32767, %eax - lea 8+_TWO_75(%rip), %rsi - andl $-32768, %ecx - fstpt 16(%rsp) - orl %eax, %ecx - movw %cx, 24(%rsp) - fldt 16(%rsp) - fmull (%rsi) -..B1.52: - fstpt 16(%rsp) - testb %dl, %dl - je ..B1.54 -..B1.53: - fldcw 34(%rsp) -..B1.54: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.55: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) - jmp ..B1.39 -..B1.56: - testl %ecx, %ecx - jle ..B1.61 -..B1.57: - cmpl $1, %ecx - jne ..B1.68 -..B1.58: - movl 68(%rsp), %eax - cmpl $-2147483648, %eax - jb ..B1.61 -..B1.59: - jne ..B1.68 -..B1.60: - cmpl $0, 64(%rsp) - ja ..B1.68 -..B1.61: - movzwl 34(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.65 -..B1.62: - orl $-64768, %ecx - movw %cx, 32(%rsp) -..B1.63: - fldcw 32(%rsp) -..B1.64: - movb $1, %dl -..B1.65: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - testb %dl, %dl - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) - je ..B1.67 -..B1.66: - fldcw 34(%rsp) -..B1.67: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.68: - movb 57(%rsp), %al - lea _infs(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.69: - movq $0x8000000000000000, %rcx - cmpq 64(%rsp), %rcx - je ..B1.77 -..B1.70: - movzwl 34(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.76 -..B1.71: - orl $-64768, %edx - movw %dx, 32(%rsp) -..B1.72: - fldcw 32(%rsp) -..B1.73: - fldt 48(%rsp) - fldt 64(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) -..B1.74: - fldcw 34(%rsp) -..B1.75: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.76: - fldt 48(%rsp) - fldt 64(%rsp) - faddp %st, %st(1) - fstpt 16(%rsp) - jmp ..B1.75 -..B1.77: - movzwl 34(%rsp), %esi - movl %esi, %ecx - andl $768, %ecx - cmpl $768, %ecx - je ..B1.81 -..B1.78: - orl $-64768, %esi - movw %si, 32(%rsp) -..B1.79: - fldcw 32(%rsp) -..B1.80: - movb $1, %dl -..B1.81: - testl %eax, %eax - jne ..B1.89 -..B1.82: - cmpl $0, 52(%rsp) - jne ..B1.84 -..B1.83: - cmpl $0, 48(%rsp) - je ..B1.85 -..B1.84: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rcx - movq %rcx, (%rsp) -..B1.85: - cmpq $0, 48(%rsp) - jne ..B1.90 -..B1.86: - testb $-128, 73(%rsp) - je ..B1.88 -..B1.87: - fldt 48(%rsp) - fstpt 16(%rsp) - jmp ..B1.94 -..B1.88: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) - jmp ..B1.94 -..B1.89: - cmpl $32767, %eax - je ..B1.97 -..B1.90: - movb 57(%rsp), %al - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - testb $-128, 73(%rsp) - je ..B1.92 -..B1.91: - lea _zeros(%rip), %rax - movsd (%rax,%rcx,8), %xmm0 - jmp ..B1.93 -..B1.92: - lea _infs(%rip), %rax - movsd (%rax,%rcx,8), %xmm0 -..B1.93: - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) -..B1.94: - testb %dl, %dl - je ..B1.96 -..B1.95: - fldcw 34(%rsp) -..B1.96: - fldt 16(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.97: - testb $-128, 73(%rsp) - jne ..B1.99 -..B1.98: - fldt 48(%rsp) - fstpt 16(%rsp) - jmp ..B1.94 -..B1.99: - lea _infs(%rip), %rax - lea _zeros(%rip), %rcx - movsd (%rax), %xmm0 - mulsd (%rcx), %xmm0 - movsd %xmm0, 8(%rsp) - fldl 8(%rsp) - fstpt 16(%rsp) - jmp ..B1.94 -..B1.100: - movq $0x8000000000000000, %rsi - cmpq 48(%rsp), %rsi - jne ..B1.70 -..B1.101: - cmpl $32767, %ecx - je ..B1.69 - jmp ..B1.32 - .align 16,0x90 - .cfi_endproc - .type scalbl,@function - .size scalbl,.-scalbl - .data -# -- End scalbl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -large_integers: - .long 65536 - .long -65536 - .type large_integers,@object - .size large_integers,8 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbln_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbln_gen.S deleted file mode 100644 index 54f08a639c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbln_gen.S +++ /dev/null @@ -1,195 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbln_gen.c" - .text -..TXTST0: -# -- Begin scalbln - .text - .align 16,0x90 - .globl scalbln -scalbln: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_scalbln.1: -..L2: - - movsd %xmm0, -8(%rsp) - movzwl -2(%rsp), %esi - movl %esi, %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $2047, %ecx - je ..B1.17 -..B1.2: - xorb %r8b, %r8b - testl %ecx, %ecx - jne ..B1.7 -..B1.3: - testl $1048575, -4(%rsp) - jne ..B1.6 -..B1.4: - cmpl $0, -8(%rsp) - jne ..B1.6 -..B1.5: - movsd -8(%rsp), %xmm0 - ret -..B1.6: - lea _TWO_55(%rip), %rax - movb $1, %r8b - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) - movzwl -2(%rsp), %esi - movl %esi, %ecx - andl $32752, %ecx - shrl $4, %ecx - addl $-55, %ecx -..B1.7: - movl $65536, %eax - cmpq $65536, %rdi - cmovg %rax, %rdi - movq $-65536, %rdx - cmpq $-65536, %rdi - movslq %ecx, %rcx - cmovl %rdx, %rdi - addq %rdi, %rcx - testl %ecx, %ecx - jle ..B1.12 -..B1.8: - cmpl $2047, %ecx - jge ..B1.11 -..B1.9: - andl $2047, %ecx - andl $-32753, %esi - shll $4, %ecx - orl %ecx, %esi - movw %si, -2(%rsp) - movsd -8(%rsp), %xmm0 -..B1.10: - ret -..B1.11: - movb -1(%rsp), %al - lea _large_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.12: - cmpl $-52, %ecx - jl ..B1.16 -..B1.13: - addl $55, %ecx - lea 8+_TWO_55(%rip), %rax - andl $2047, %ecx - andl $-32753, %esi - shll $4, %ecx - orl %ecx, %esi - movw %si, -2(%rsp) - testb %r8b, %r8b - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - je ..B1.15 -..B1.14: - testq %rdi, %rdi - jl ..B1.10 -..B1.15: - ret -..B1.16: - movb -1(%rsp), %al - lea _small_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.17: - lea _ones(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type scalbln,@function - .size scalbln,.-scalbln - .data -# -- End scalbln - .section .rodata, "a" - .align 4 - .align 4 -_TWO_55: - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .type _TWO_55,@object - .size _TWO_55,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalblnf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalblnf.S deleted file mode 100644 index 917c6bf513..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalblnf.S +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalblnf.c" - .text -..TXTST0: -# -- Begin scalblnf - .text - .align 16,0x90 - .globl scalblnf -scalblnf: -# parameter 1: %xmm0 -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_scalblnf.1: -..L2: - - movq %rdi, %r8 - movss %xmm0, -8(%rsp) - movzwl -6(%rsp), %eax - movl %eax, %esi - andl $32640, %esi - shrl $7, %esi - cmpl $255, %esi - je ..B1.9 -..B1.2: - xorb %dil, %dil - testl %esi, %esi - jne ..B1.5 -..B1.3: - testl $8388607, -8(%rsp) - je ..B1.9 -..B1.4: - movss -8(%rsp), %xmm0 - movb $1, %dil - mulss .L_2il0floatpacket.0(%rip), %xmm0 - movss %xmm0, -8(%rsp) - movzwl -6(%rsp), %eax - movl %eax, %esi - andl $32640, %esi - shrl $7, %esi - addl $-25, %esi -..B1.5: - movl $65536, %edx - cmpq $65536, %r8 - cmovg %rdx, %r8 - movq $-65536, %rcx - cmpq $-65536, %r8 - movslq %esi, %rsi - cmovl %rcx, %r8 - addq %r8, %rsi - testl %esi, %esi - jle ..B1.11 -..B1.6: - cmpl $255, %esi - jge ..B1.10 -..B1.7: - movzbl %sil, %esi - andl $-32641, %eax - shll $7, %esi - orl %esi, %eax - movw %ax, -6(%rsp) - movss -8(%rsp), %xmm0 -..B1.8: - ret -..B1.9: - movss -8(%rsp), %xmm0 - ret -..B1.10: - movb -5(%rsp), %al - lea _large_value_32(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - ret -..B1.11: - cmpl $-23, %esi - jl ..B1.15 -..B1.12: - addl $25, %esi - andl $-32641, %eax - movzbl %sil, %esi - shll $7, %esi - orl %esi, %eax - movw %ax, -6(%rsp) - testb %dil, %dil - movss -8(%rsp), %xmm0 - mulss .L_2il0floatpacket.3(%rip), %xmm0 - je ..B1.14 -..B1.13: - testq %r8, %r8 - jl ..B1.8 -..B1.14: - ret -..B1.15: - movb -5(%rsp), %al - lea _small_value_32(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.2(%rip), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type scalblnf,@function - .size scalblnf,.-scalblnf - .data -# -- End scalblnf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x0d800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x33000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalblnl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalblnl.S deleted file mode 100644 index f934b79dfa..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalblnl.S +++ /dev/null @@ -1,322 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalblnl.c" - .text -..TXTST0: -# -- Begin scalblnl - .text - .align 16,0x90 - .globl scalblnl -scalblnl: -# parameter 1: 32 + %rsp -# parameter 2: %rdi -..B1.1: - .cfi_startproc -..___tag_value_scalblnl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movzwl 40(%rsp), %eax - movl %eax, %r9d - andq $32767, %r9 - cmpq $32767, %r9 - je ..B1.39 -..B1.4: - testq %r9, %r9 - jne ..B1.12 -..B1.5: - cmpq $0, 32(%rsp) - je ..B1.15 -..B1.6: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.7: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.8: - fldcw 16(%rsp) -..B1.9: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) -..B1.10: - fldcw 18(%rsp) -..B1.11: - movzwl 40(%rsp), %eax - movl %eax, %ecx - andl $32767, %ecx - movl %ecx, %r9d - addq $-75, %r9 -..B1.12: - movl $65536, %esi - cmpq $65536, %rdi - cmovg %rsi, %rdi - movq $-65536, %r8 - xorb %dl, %dl - cmpq $-65536, %rdi - cmovl %r8, %rdi - lea (%r9,%rdi), %rcx - testq %rcx, %rcx - jle ..B1.23 -..B1.13: - cmpq $32767, %rcx - jge ..B1.16 -..B1.14: - andl $-32768, %eax - andl $32767, %ecx - orl %ecx, %eax - movw %ax, 40(%rsp) - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.15: - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.16: - movzwl 18(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.20 -..B1.17: - orl $-64768, %ecx - movw %cx, 16(%rsp) -..B1.18: - fldcw 16(%rsp) -..B1.19: - movb $1, %dl -..B1.20: - movb 41(%rsp), %al - lea _large_value_80(%rip), %rsi - andb $-128, %al - shrb $7, %al - fldt (%rsi) - movzbl %al, %ecx - shlq $4, %rcx - testb %dl, %dl - fldt (%rsi,%rcx) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.22 -..B1.21: - fldcw 18(%rsp) -..B1.22: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.23: - cmpq $-63, %rcx - jl ..B1.31 -..B1.24: - andl $-32768, %eax - lea 75(%r9,%rdi), %rdx - andl $32767, %edx - orl %edx, %eax - movzwl 18(%rsp), %edx - movw %ax, 40(%rsp) - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.30 -..B1.25: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.26: - fldcw 16(%rsp) -..B1.27: - fldt 32(%rsp) - lea 8+_TWO_75(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.28: - fldcw 18(%rsp) -..B1.29: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.30: - fldt 32(%rsp) - lea 8+_TWO_75(%rip), %rax - fmull (%rax) - fstpt (%rsp) - jmp ..B1.29 -..B1.31: - movzwl 18(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.35 -..B1.32: - orl $-64768, %ecx - movw %cx, 16(%rsp) -..B1.33: - fldcw 16(%rsp) -..B1.34: - movb $1, %dl -..B1.35: - movb 41(%rsp), %al - lea _small_value_80(%rip), %rsi - andb $-128, %al - shrb $7, %al - fldt (%rsi) - movzbl %al, %ecx - shlq $4, %rcx - testb %dl, %dl - fldt (%rsi,%rcx) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.37 -..B1.36: - fldcw 18(%rsp) -..B1.37: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.38: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) - jmp ..B1.11 -..B1.39: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.40: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.41: - fldcw 16(%rsp) -..B1.42: - fldt 32(%rsp) - fstpt (%rsp) -..B1.43: - fldcw 18(%rsp) -..B1.44: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.45: - fldt 32(%rsp) - fstpt (%rsp) - jmp ..B1.44 - .align 16,0x90 - .cfi_endproc - .type scalblnl,@function - .size scalblnl,.-scalblnl - .data -# -- End scalblnl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbn_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbn_gen.S deleted file mode 100644 index 27322b85b0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbn_gen.S +++ /dev/null @@ -1,194 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbn_gen.c" - .text -..TXTST0: -# -- Begin scalbn - .text - .align 16,0x90 - .globl scalbn -scalbn: -# parameter 1: %xmm0 -# parameter 2: %edi -..B1.1: - .cfi_startproc -..___tag_value_scalbn.1: -..L2: - - movsd %xmm0, -8(%rsp) - movzwl -2(%rsp), %esi - movl %esi, %ecx - andl $32752, %ecx - shrl $4, %ecx - cmpl $2047, %ecx - je ..B1.17 -..B1.2: - xorb %r8b, %r8b - testl %ecx, %ecx - jne ..B1.7 -..B1.3: - testl $1048575, -4(%rsp) - jne ..B1.6 -..B1.4: - cmpl $0, -8(%rsp) - jne ..B1.6 -..B1.5: - movsd -8(%rsp), %xmm0 - ret -..B1.6: - lea _TWO_55(%rip), %rax - movb $1, %r8b - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) - movzwl -2(%rsp), %esi - movl %esi, %ecx - andl $32752, %ecx - shrl $4, %ecx - addl $-55, %ecx -..B1.7: - movl $65536, %eax - cmpl $65536, %edi - cmovg %eax, %edi - movl $-65536, %edx - cmpl $-65536, %edi - cmovle %edx, %edi - lea (%rcx,%rdi), %eax - testl %eax, %eax - jle ..B1.12 -..B1.8: - cmpl $2047, %eax - jge ..B1.11 -..B1.9: - andl $2047, %eax - andl $-32753, %esi - shll $4, %eax - orl %eax, %esi - movw %si, -2(%rsp) - movsd -8(%rsp), %xmm0 -..B1.10: - ret -..B1.11: - movb -1(%rsp), %al - lea _large_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.12: - cmpl $-52, %eax - jl ..B1.16 -..B1.13: - lea 8+_TWO_55(%rip), %rdx - lea 55(%rcx,%rdi), %eax - andl $2047, %eax - andl $-32753, %esi - shll $4, %eax - orl %eax, %esi - movw %si, -2(%rsp) - testb %r8b, %r8b - movsd -8(%rsp), %xmm0 - mulsd (%rdx), %xmm0 - je ..B1.15 -..B1.14: - testl %edi, %edi - jl ..B1.10 -..B1.15: - ret -..B1.16: - movb -1(%rsp), %al - lea _small_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - ret -..B1.17: - lea _ones(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type scalbn,@function - .size scalbn,.-scalbn - .data -# -- End scalbn - .section .rodata, "a" - .align 4 - .align 4 -_TWO_55: - .long 0 - .long 1130364928 - .long 0 - .long 1015021568 - .type _TWO_55,@object - .size _TWO_55,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbnf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbnf.S deleted file mode 100644 index 23c5beb1a1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbnf.S +++ /dev/null @@ -1,185 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbnf.c" - .text -..TXTST0: -# -- Begin scalbnf - .text - .align 16,0x90 - .globl scalbnf -scalbnf: -# parameter 1: %xmm0 -# parameter 2: %edi -..B1.1: - .cfi_startproc -..___tag_value_scalbnf.1: -..L2: - - movl %edi, %r8d - movss %xmm0, -8(%rsp) - movzwl -6(%rsp), %eax - movl %eax, %esi - andl $32640, %esi - shrl $7, %esi - cmpl $255, %esi - je ..B1.9 -..B1.2: - xorb %dil, %dil - testl %esi, %esi - jne ..B1.5 -..B1.3: - testl $8388607, -8(%rsp) - je ..B1.9 -..B1.4: - movss -8(%rsp), %xmm0 - movb $1, %dil - mulss .L_2il0floatpacket.0(%rip), %xmm0 - movss %xmm0, -8(%rsp) - movzwl -6(%rsp), %eax - movl %eax, %esi - andl $32640, %esi - shrl $7, %esi - addl $-25, %esi -..B1.5: - movl $65536, %edx - cmpl $65536, %r8d - cmovg %edx, %r8d - movl $-65536, %ecx - cmpl $-65536, %r8d - cmovle %ecx, %r8d - lea (%rsi,%r8), %edx - testl %edx, %edx - jle ..B1.11 -..B1.6: - cmpl $255, %edx - jge ..B1.10 -..B1.7: - movzbl %dl, %edx - andl $-32641, %eax - shll $7, %edx - orl %edx, %eax - movw %ax, -6(%rsp) - movss -8(%rsp), %xmm0 -..B1.8: - ret -..B1.9: - movss -8(%rsp), %xmm0 - ret -..B1.10: - movb -5(%rsp), %al - lea _large_value_32(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - ret -..B1.11: - cmpl $-23, %edx - jl ..B1.15 -..B1.12: - andl $-32641, %eax - lea 25(%rsi,%r8), %edx - movzbl %dl, %edx - shll $7, %edx - orl %edx, %eax - movw %ax, -6(%rsp) - testb %dil, %dil - movss -8(%rsp), %xmm0 - mulss .L_2il0floatpacket.3(%rip), %xmm0 - je ..B1.14 -..B1.13: - testl %r8d, %r8d - jl ..B1.8 -..B1.14: - ret -..B1.15: - movb -5(%rsp), %al - lea _small_value_32(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - movss (%rdx,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.2(%rip), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type scalbnf,@function - .size scalbnf,.-scalbnf - .data -# -- End scalbnf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x0d800000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0x33000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbnl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbnl.S deleted file mode 100644 index 3d755cd844..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/scalbnl.S +++ /dev/null @@ -1,321 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "scalbnl.c" - .text -..TXTST0: -# -- Begin scalbnl - .text - .align 16,0x90 - .globl scalbnl -scalbnl: -# parameter 1: 32 + %rsp -# parameter 2: %edi -..B1.1: - .cfi_startproc -..___tag_value_scalbnl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movzwl 40(%rsp), %r8d - movl %r8d, %esi - andl $32767, %esi - cmpl $32767, %esi - je ..B1.39 -..B1.4: - testl %esi, %esi - jne ..B1.12 -..B1.5: - cmpq $0, 32(%rsp) - je ..B1.15 -..B1.6: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.7: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.8: - fldcw 16(%rsp) -..B1.9: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) -..B1.10: - fldcw 18(%rsp) -..B1.11: - movzwl 40(%rsp), %r8d - movl %r8d, %esi - andl $32767, %esi - addl $-75, %esi -..B1.12: - movl $65536, %edx - cmpl $65536, %edi - cmovg %edx, %edi - movl $-65536, %ecx - xorb %al, %al - cmpl $-65536, %edi - cmovle %ecx, %edi - lea (%rsi,%rdi), %edx - testl %edx, %edx - jle ..B1.23 -..B1.13: - cmpl $32767, %edx - jge ..B1.16 -..B1.14: - andl $-32768, %r8d - andl $32767, %edx - orl %edx, %r8d - movw %r8w, 40(%rsp) - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.15: - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.16: - movzwl 18(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.20 -..B1.17: - orl $-64768, %ecx - movw %cx, 16(%rsp) -..B1.18: - fldcw 16(%rsp) -..B1.19: - movb $1, %al -..B1.20: - movb 41(%rsp), %dl - lea _large_value_80(%rip), %rsi - andb $-128, %dl - shrb $7, %dl - fldt (%rsi) - movzbl %dl, %ecx - shlq $4, %rcx - testb %al, %al - fldt (%rsi,%rcx) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.22 -..B1.21: - fldcw 18(%rsp) -..B1.22: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.23: - cmpl $-63, %edx - jl ..B1.31 -..B1.24: - andl $-32768, %r8d - lea 75(%rsi,%rdi), %eax - andl $32767, %eax - orl %eax, %r8d - movzwl 18(%rsp), %eax - movl %eax, %edx - andl $768, %edx - movw %r8w, 40(%rsp) - cmpl $768, %edx - je ..B1.30 -..B1.25: - orl $-64768, %eax - movw %ax, 16(%rsp) -..B1.26: - fldcw 16(%rsp) -..B1.27: - fldt 32(%rsp) - lea 8+_TWO_75(%rip), %rax - fmull (%rax) - fstpt (%rsp) -..B1.28: - fldcw 18(%rsp) -..B1.29: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.30: - fldt 32(%rsp) - lea 8+_TWO_75(%rip), %rax - fmull (%rax) - fstpt (%rsp) - jmp ..B1.29 -..B1.31: - movzwl 18(%rsp), %ecx - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.35 -..B1.32: - orl $-64768, %ecx - movw %cx, 16(%rsp) -..B1.33: - fldcw 16(%rsp) -..B1.34: - movb $1, %al -..B1.35: - movb 41(%rsp), %dl - lea _small_value_80(%rip), %rsi - andb $-128, %dl - shrb $7, %dl - fldt (%rsi) - movzbl %dl, %ecx - shlq $4, %rcx - testb %al, %al - fldt (%rsi,%rcx) - fmulp %st, %st(1) - fstpt (%rsp) - je ..B1.37 -..B1.36: - fldcw 18(%rsp) -..B1.37: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.38: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) - jmp ..B1.11 -..B1.39: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.45 -..B1.40: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.41: - fldcw 16(%rsp) -..B1.42: - fldt 32(%rsp) - fstpt (%rsp) -..B1.43: - fldcw 18(%rsp) -..B1.44: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.45: - fldt 32(%rsp) - fstpt (%rsp) - jmp ..B1.44 - .align 16,0x90 - .cfi_endproc - .type scalbnl,@function - .size scalbnl,.-scalbnl - .data -# -- End scalbnl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/signbit.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/signbit.S deleted file mode 100644 index f5f7efaf4e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/signbit.S +++ /dev/null @@ -1,233 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "signbit.c" - .text -..TXTST0: -# -- Begin __signbitd - .text - .align 16,0x90 - .globl __signbitd -__signbitd: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value___signbitd.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __signbitd,@function - .size __signbitd,.-__signbitd - .data -# -- End __signbitd - .text -# -- Begin signbitd - .text - .align 16,0x90 - .globl signbitd -signbitd: -# parameter 1: %xmm0 -..B2.1: - .cfi_startproc -..___tag_value_signbitd.4: -..L5: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .cfi_endproc - .type signbitd,@function - .size signbitd,.-signbitd - .data -# -- End signbitd - .text -# -- Begin __signbit - .text - .align 16,0x90 - .globl __signbit -__signbit: -# parameter 1: %xmm0 -..B3.1: - .cfi_startproc -..___tag_value___signbit.7: -..L8: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __signbit,@function - .size __signbit,.-__signbit - .data -# -- End __signbit - .text -# -- Begin signbit - .text - .align 16,0x90 - .globl signbit -signbit: -# parameter 1: %xmm0 -..B4.1: - .cfi_startproc -..___tag_value_signbit.10: -..L11: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - shrl $31, %eax - ret - .align 16,0x90 - .cfi_endproc - .type signbit,@function - .size signbit,.-signbit - .data -# -- End signbit - .text -# -- Begin __signbitf - .text - .align 16,0x90 - .globl __signbitf -__signbitf: -# parameter 1: %xmm0 -..B5.1: - .cfi_startproc -..___tag_value___signbitf.13: -..L14: - - movd %xmm0, %eax - shrl $31, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __signbitf,@function - .size __signbitf,.-__signbitf - .data -# -- End __signbitf - .text -# -- Begin signbitf - .text - .align 16,0x90 - .globl signbitf -signbitf: -# parameter 1: %xmm0 -..B6.1: - .cfi_startproc -..___tag_value_signbitf.16: -..L17: - - movd %xmm0, %eax - shrl $31, %eax - ret - .align 16,0x90 - .cfi_endproc - .type signbitf,@function - .size signbitf,.-signbitf - .data -# -- End signbitf - .text -# -- Begin __signbitl - .text - .align 16,0x90 - .globl __signbitl -__signbitl: -# parameter 1: 8 + %rsp -..B7.1: - .cfi_startproc -..___tag_value___signbitl.19: -..L20: - - movzbl 17(%rsp), %eax - shrl $7, %eax - movzwl 16(%rsp), %edx - shll $15, %eax - andl $32767, %edx - orl %edx, %eax - shll $16, %eax - movzwl 14(%rsp), %ecx - orl %ecx, %eax - shrl $31, %eax - ret - .align 16,0x90 - .cfi_endproc - .type __signbitl,@function - .size __signbitl,.-__signbitl - .data -# -- End __signbitl - .text -# -- Begin signbitl - .text - .align 16,0x90 - .globl signbitl -signbitl: -# parameter 1: 8 + %rsp -..B8.1: - .cfi_startproc -..___tag_value_signbitl.22: -..L23: - - movzbl 17(%rsp), %eax - shrl $7, %eax - movzwl 16(%rsp), %edx - shll $15, %eax - andl $32767, %edx - orl %edx, %eax - shll $16, %eax - movzwl 14(%rsp), %ecx - orl %ecx, %eax - shrl $31, %eax - ret - .align 16,0x90 - .cfi_endproc - .type signbitl,@function - .size signbitl,.-signbitl - .data -# -- End signbitl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significand_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significand_gen.S deleted file mode 100644 index d3f789b75d..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significand_gen.S +++ /dev/null @@ -1,119 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "significand_gen.c" - .text -..TXTST0: -# -- Begin significand - .text - .align 16,0x90 - .globl significand -significand: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_significand.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %ecx - movl %ecx, %edx - andl $2147483647, %edx - lea -1048576(%rdx), %eax - cmpl $2145386496, %eax - jb ..B1.8 -..B1.2: - testl %eax, %eax - jge ..B1.7 -..B1.3: - movl -8(%rsp), %eax - orl %eax, %edx - jne ..B1.5 -..B1.4: - movsd -8(%rsp), %xmm0 - ret -..B1.5: - lea _TWO_55(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - andl $-2146435073, %edx - orl $1072693248, %edx - movl %edx, -4(%rsp) - movsd -8(%rsp), %xmm0 -..B1.6: - ret -..B1.7: - lea _ones(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 - ret -..B1.8: - andl $-2146435073, %ecx - orl $1072693248, %ecx - movl %ecx, -4(%rsp) - movsd -8(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type significand,@function - .size significand,.-significand - .data -# -- End significand - .section .rodata, "a" - .align 4 - .align 4 -_TWO_55: - .long 0 - .long 1130364928 - .type _TWO_55,@object - .size _TWO_55,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significandf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significandf_gen.S deleted file mode 100644 index 390a851e54..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significandf_gen.S +++ /dev/null @@ -1,101 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "significandf_gen.c" - .text -..TXTST0: -# -- Begin significandf - .text - .align 16,0x90 - .globl significandf -significandf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_significandf.1: -..L2: - - movaps %xmm0, %xmm1 - movd %xmm1, %ecx - movss %xmm1, -8(%rsp) - movl %ecx, %edx - andl $2147483647, %edx - lea -8388608(%rdx), %eax - cmpl $2130706432, %eax - jb ..B1.6 -..B1.2: - decl %edx - cmpl $2139095039, %edx - jae ..B1.4 -..B1.3: - movss .L_2il0floatpacket.0(%rip), %xmm0 - mulss %xmm0, %xmm1 - movd %xmm1, %eax - andl $-2139095041, %eax - orl $1065353216, %eax - movl %eax, -8(%rsp) - movss -8(%rsp), %xmm0 - ret -..B1.4: - movss -8(%rsp), %xmm0 -..B1.5: - ret -..B1.6: - andl $-2139095041, %ecx - orl $1065353216, %ecx - movl %ecx, -8(%rsp) - movss -8(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type significandf,@function - .size significandf,.-significandf - .data -# -- End significandf - .section .rodata, "a" - .align 4 - .align 4 -.L_2il0floatpacket.0: - .long 0x4c000000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significandl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significandl.S deleted file mode 100644 index 051c22980f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/significandl.S +++ /dev/null @@ -1,164 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "significandl.c" - .text -..TXTST0: -# -- Begin significandl - .text - .align 16,0x90 - .globl significandl -significandl: -# parameter 1: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_significandl.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..B1.2: - fnstcw 18(%rsp) -..B1.3: - movzwl 40(%rsp), %edx - movl %edx, %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.15 -..B1.4: - testl %eax, %eax - jne ..B1.13 -..B1.5: - cmpq $0, 32(%rsp) - je ..B1.12 -..B1.6: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.14 -..B1.7: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.8: - fldcw 16(%rsp) -..B1.9: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) -..B1.10: - fldcw 18(%rsp) -..B1.11: - movzwl 40(%rsp), %eax - andl $-32768, %eax - orl $-49153, %eax - movw %ax, 40(%rsp) - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.12: - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.13: - andl $-32768, %edx - orl $-49153, %edx - movw %dx, 40(%rsp) - fldt 32(%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.14: - fldt 32(%rsp) - lea _TWO_75(%rip), %rax - fmull (%rax) - fstpt 32(%rsp) - jmp ..B1.11 -..B1.15: - movzwl 18(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.21 -..B1.16: - orl $-64768, %edx - movw %dx, 16(%rsp) -..B1.17: - fldcw 16(%rsp) -..B1.18: - fldt 32(%rsp) - fstpt (%rsp) -..B1.19: - fldcw 18(%rsp) -..B1.20: - fldt (%rsp) - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 -..B1.21: - fldt 32(%rsp) - fstpt (%rsp) - jmp ..B1.20 - .align 16,0x90 - .cfi_endproc - .type significandl,@function - .size significandl,.-significandl - .data -# -- End significandl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sin_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sin_gen.S deleted file mode 100644 index b0a8199ab6..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sin_gen.S +++ /dev/null @@ -1,1150 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sin_gen.c" - .text -..TXTST0: -# -- Begin sin - .text - .align 16,0x90 - .globl sin -sin: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_sin.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - subq $16, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) -..B1.2: - pextrw $3, %xmm0, %eax - andw $32767, %ax - subw $12336, %ax - cmpw $4293, %ax - ja .L_2TAG_PACKET_0.0.1 - movq PI32INV(%rip), %xmm1 - mulsd %xmm0, %xmm1 - movapd ONEHALF(%rip), %xmm5 - movsd SIGN_MASK(%rip), %xmm4 - andpd %xmm0, %xmm4 - orps %xmm4, %xmm5 - addpd %xmm5, %xmm1 - cvttsd2si %xmm1, %edx - cvtsi2sd %edx, %xmm1 - movapd P_2(%rip), %xmm6 - movq $0x3fb921fb54400000, %r8 - movd %r8, %xmm3 - movapd SC_4(%rip), %xmm5 - pshufd $68, %xmm0, %xmm4 - mulsd %xmm1, %xmm3 - unpcklpd %xmm1, %xmm1 - andl $63, %edx - shll $5, %edx - lea Ctable(%rip), %rax - addq %rdx, %rax - mulpd %xmm1, %xmm6 - mulsd P_3(%rip), %xmm1 - subsd %xmm3, %xmm4 - movq 8(%rax), %xmm7 - subsd %xmm3, %xmm0 - movapd %xmm4, %xmm3 - unpcklpd %xmm4, %xmm3 - subsd %xmm6, %xmm4 - pshufd $68, %xmm0, %xmm0 - movapd (%rax), %xmm2 - mulpd %xmm0, %xmm5 - subpd %xmm6, %xmm0 - mulsd %xmm4, %xmm7 - subsd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subsd %xmm6, %xmm3 - movapd SC_2(%rip), %xmm6 - subsd %xmm3, %xmm1 - movq 24(%rax), %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm7 - mulsd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulsd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm0 - addpd SC_3(%rip), %xmm5 - mulsd (%rax), %xmm4 - addpd SC_1(%rip), %xmm6 - mulpd %xmm0, %xmm5 - movq %xmm3, %xmm0 - addsd 8(%rax), %xmm3 - mulpd %xmm7, %xmm1 - movq %xmm4, %xmm7 - addsd %xmm3, %xmm4 - addpd %xmm5, %xmm6 - movq 8(%rax), %xmm5 - subsd %xmm3, %xmm5 - subsd %xmm4, %xmm3 - addsd 16(%rax), %xmm1 - mulpd %xmm2, %xmm6 - addsd %xmm0, %xmm5 - addsd %xmm7, %xmm3 - addsd %xmm5, %xmm1 - addsd %xmm3, %xmm1 - addsd %xmm6, %xmm1 - unpckhpd %xmm6, %xmm6 - movq %xmm4, %xmm0 - addsd %xmm6, %xmm1 - addsd %xmm1, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_0.0.1: - jg .L_2TAG_PACKET_1.0.1 - shrl $4, %eax - cmpw $3325, %ax - jne .L_2TAG_PACKET_2.0.1 - mulsd ALL_ONES(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_2.0.1: - movq TWO_POW_55(%rip), %xmm3 - mulsd %xmm0, %xmm3 - subsd %xmm0, %xmm3 - mulsd TWO_POW_M55(%rip), %xmm3 - jmp ..B1.4 -.L_2TAG_PACKET_1.0.1: - pextrw $3, %xmm0, %eax - andl $32752, %eax - cmpl $32752, %eax - je .L_2TAG_PACKET_3.0.1 - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - subl $16224, %ecx - shrl $7, %ecx - andl $65532, %ecx - lea PI_INV_TABLE(%rip), %r11 - addq %r11, %rcx - movd %xmm0, %rax - movl 20(%rcx), %r10d - movl 24(%rcx), %r8d - movl %eax, %edx - shrq $21, %rax - orl $-2147483648, %eax - shrl $11, %eax - movl %r10d, %r9d - imulq %rdx, %r10 - imulq %rax, %r9 - imulq %rax, %r8 - movl 16(%rcx), %esi - movl 12(%rcx), %edi - movl %r10d, %r11d - shrq $32, %r10 - addq %r10, %r9 - addq %r8, %r11 - movl %r11d, %r8d - shrq $32, %r11 - addq %r11, %r9 - movl %esi, %r10d - imulq %rdx, %rsi - imulq %rax, %r10 - movl %edi, %r11d - imulq %rdx, %rdi - movl %esi, %ebx - shrq $32, %rsi - addq %rbx, %r9 - movl %r9d, %ebx - shrq $32, %r9 - addq %rsi, %r10 - addq %r9, %r10 - shlq $32, %rbx - orq %rbx, %r8 - imulq %rax, %r11 - movl 8(%rcx), %r9d - movl 4(%rcx), %esi - movl %edi, %ebx - shrq $32, %rdi - addq %rbx, %r10 - movl %r10d, %ebx - shrq $32, %r10 - addq %rdi, %r11 - addq %r10, %r11 - movq %r9, %rdi - imulq %rdx, %r9 - imulq %rax, %rdi - movl %r9d, %r10d - shrq $32, %r9 - addq %r10, %r11 - movl %r11d, %r10d - shrq $32, %r11 - addq %r9, %rdi - addq %r11, %rdi - movq %rsi, %r9 - imulq %rdx, %rsi - imulq %rax, %r9 - shlq $32, %r10 - orq %rbx, %r10 - movl (%rcx), %eax - movl %esi, %r11d - shrq $32, %rsi - addq %r11, %rdi - movl %edi, %r11d - shrq $32, %rdi - addq %rsi, %r9 - addq %rdi, %r9 - imulq %rax, %rdx - pextrw $3, %xmm0, %ebx - lea PI_INV_TABLE(%rip), %rdi - subq %rdi, %rcx - addl %ecx, %ecx - addl %ecx, %ecx - addl %ecx, %ecx - addl $19, %ecx - movl $32768, %esi - andl %ebx, %esi - shrl $4, %ebx - andl $2047, %ebx - subl $1023, %ebx - subl %ebx, %ecx - addq %rdx, %r9 - movl %ecx, %edx - addl $32, %edx - cmpl $1, %ecx - jl .L_2TAG_PACKET_4.0.1 - negl %ecx - addl $29, %ecx - shll %cl, %r9d - movl %r9d, %edi - andl $536870911, %r9d - testl $268435456, %r9d - jne .L_2TAG_PACKET_5.0.1 - shrl %cl, %r9d - movl $0, %ebx - shlq $32, %r9 - orq %r11, %r9 -.L_2TAG_PACKET_6.0.1: -.L_2TAG_PACKET_7.0.1: - cmpq $0, %r9 - je .L_2TAG_PACKET_8.0.1 -.L_2TAG_PACKET_9.0.1: - bsr %r9, %r11 - movl $29, %ecx - subl %r11d, %ecx - jle .L_2TAG_PACKET_10.0.1 - shlq %cl, %r9 - movq %r10, %rax - shlq %cl, %r10 - addl %ecx, %edx - negl %ecx - addl $64, %ecx - shrq %cl, %rax - shrq %cl, %r8 - orq %rax, %r9 - orq %r8, %r10 -.L_2TAG_PACKET_11.0.1: - cvtsi2sdq %r9, %xmm0 - shrq $1, %r10 - cvtsi2sdq %r10, %xmm3 - xorpd %xmm4, %xmm4 - shll $4, %edx - negl %edx - addl $16368, %edx - orl %esi, %edx - xorl %ebx, %edx - pinsrw $3, %edx, %xmm4 - movq PI_4(%rip), %xmm2 - movq 8+PI_4(%rip), %xmm6 - xorpd %xmm5, %xmm5 - subl $1008, %edx - pinsrw $3, %edx, %xmm5 - mulsd %xmm4, %xmm0 - shll $16, %esi - sarl $31, %esi - mulsd %xmm5, %xmm3 - movq %xmm0, %xmm1 - mulsd %xmm2, %xmm0 - shrl $29, %edi - addsd %xmm3, %xmm1 - mulsd %xmm2, %xmm3 - addl %esi, %edi - xorl %esi, %edi - mulsd %xmm1, %xmm6 - movl %edi, %eax - addsd %xmm3, %xmm6 - movq %xmm0, %xmm2 - addsd %xmm6, %xmm0 - subsd %xmm0, %xmm2 - addsd %xmm2, %xmm6 -.L_2TAG_PACKET_12.0.1: - movq PI32INV(%rip), %xmm1 - mulsd %xmm0, %xmm1 - movq ONEHALF(%rip), %xmm5 - movq SIGN_MASK(%rip), %xmm4 - andpd %xmm0, %xmm4 - orps %xmm4, %xmm5 - addpd %xmm5, %xmm1 - cvttsd2si %xmm1, %edx - cvtsi2sd %edx, %xmm1 - movq P_1(%rip), %xmm3 - movapd P_2(%rip), %xmm2 - mulsd %xmm1, %xmm3 - unpcklpd %xmm1, %xmm1 - shll $3, %eax - addl $1865216, %edx - movq %xmm0, %xmm4 - addl %eax, %edx - andl $63, %edx - movapd SC_4(%rip), %xmm5 - lea Ctable(%rip), %rax - shll $5, %edx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - subsd %xmm3, %xmm0 - mulsd P_3(%rip), %xmm1 - subsd %xmm3, %xmm4 - movq 8(%rax), %xmm7 - unpcklpd %xmm0, %xmm0 - movq %xmm4, %xmm3 - subsd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - mulsd %xmm4, %xmm7 - subsd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subsd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subsd %xmm3, %xmm1 - movq 24(%rax), %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm7 - subsd %xmm6, %xmm1 - movapd SC_2(%rip), %xmm6 - mulsd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulsd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm0 - addpd SC_3(%rip), %xmm5 - mulsd (%rax), %xmm4 - addpd SC_1(%rip), %xmm6 - mulpd %xmm0, %xmm5 - movq %xmm3, %xmm0 - addsd 8(%rax), %xmm3 - mulpd %xmm7, %xmm1 - movq %xmm4, %xmm7 - addsd %xmm3, %xmm4 - addpd %xmm5, %xmm6 - movq 8(%rax), %xmm5 - subsd %xmm3, %xmm5 - subsd %xmm4, %xmm3 - addsd 16(%rax), %xmm1 - mulpd %xmm2, %xmm6 - addsd %xmm0, %xmm5 - addsd %xmm7, %xmm3 - addsd %xmm5, %xmm1 - addsd %xmm3, %xmm1 - addsd %xmm6, %xmm1 - unpckhpd %xmm6, %xmm6 - movq %xmm4, %xmm0 - addsd %xmm6, %xmm1 - addsd %xmm1, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_8.0.1: - addl $64, %edx - movq %r10, %r9 - movq %r8, %r10 - movq $0, %r8 - cmpq $0, %r9 - jne .L_2TAG_PACKET_9.0.1 - addl $64, %edx - movq %r10, %r9 - movq %r8, %r10 - cmpq $0, %r9 - jne .L_2TAG_PACKET_9.0.1 - xorpd %xmm0, %xmm0 - xorpd %xmm6, %xmm6 - jmp .L_2TAG_PACKET_12.0.1 -.L_2TAG_PACKET_10.0.1: - je .L_2TAG_PACKET_11.0.1 - negl %ecx - shrq %cl, %r10 - movq %r9, %rax - shrq %cl, %r9 - subl %ecx, %edx - negl %ecx - addl $64, %ecx - shlq %cl, %rax - orq %rax, %r10 - jmp .L_2TAG_PACKET_11.0.1 -.L_2TAG_PACKET_4.0.1: - negl %ecx - shlq $32, %r9 - orq %r11, %r9 - shlq %cl, %r9 - movq %r9, %rdi - testl $-2147483648, %r9d - jne .L_2TAG_PACKET_13.0.1 - shrl %cl, %r9d - movl $0, %ebx - shrq $3, %rdi - jmp .L_2TAG_PACKET_7.0.1 -.L_2TAG_PACKET_5.0.1: - shrl %cl, %r9d - movl $536870912, %ebx - shrl %cl, %ebx - shlq $32, %r9 - orq %r11, %r9 - shlq $32, %rbx - addl $536870912, %edi - movq $0, %rcx - movq $0, %r11 - subq %r8, %rcx - sbbq %r10, %r11 - sbbq %r9, %rbx - movq %rcx, %r8 - movq %r11, %r10 - movq %rbx, %r9 - movl $32768, %ebx - jmp .L_2TAG_PACKET_6.0.1 -.L_2TAG_PACKET_13.0.1: - shrl %cl, %r9d - movq $0x100000000, %rbx - shrq %cl, %rbx - movq $0, %rcx - movq $0, %r11 - subq %r8, %rcx - sbbq %r10, %r11 - sbbq %r9, %rbx - movq %rcx, %r8 - movq %r11, %r10 - movq %rbx, %r9 - movl $32768, %ebx - shrq $3, %rdi - addl $536870912, %edi - jmp .L_2TAG_PACKET_7.0.1 -.L_2TAG_PACKET_3.0.1: - movq 8(%rsp), %xmm0 - mulsd NEG_ZERO(%rip), %xmm0 - movq %xmm0, (%rsp) -.L_2TAG_PACKET_14.0.1: -..B1.4: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type sin,@function - .size sin,.-sin - .data -# -- End sin - .section .rodata, "a" - .align 16 - .align 16 -ONEHALF: - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .type ONEHALF,@object - .size ONEHALF,16 - .align 16 -P_2: - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .type P_2,@object - .size P_2,16 - .align 16 -SC_4: - .long 2773927732 - .long 1053236707 - .long 436314138 - .long 1056571808 - .type SC_4,@object - .size SC_4,16 - .align 16 -Ctable: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 1072693248 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1071644672 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 1071644672 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1070596096 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 1070596096 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1069547520 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 1072683149 - .long 1073741824 - .long 3163061750 - .long 0 - .long 3217031168 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 1072652951 - .long 536870912 - .long 1014325783 - .long 0 - .long 3218079744 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 1072602945 - .long 3758096384 - .long 1015505073 - .long 0 - .long 3218079744 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 1072533611 - .long 536870912 - .long 1014257638 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 1072445618 - .long 2147483648 - .long 3161907377 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 1072339814 - .long 3758096384 - .long 1010431536 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3162686945 - .long 0 - .long 3219128320 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1013450602 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 1071761211 - .long 536870912 - .long 1015752157 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 1071524701 - .long 536870912 - .long 1012796809 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 1071152610 - .long 3758096384 - .long 3160878317 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 1070765062 - .long 2684354560 - .long 3161838221 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 1070135480 - .long 3221225472 - .long 3160567065 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 1069094822 - .long 3758096384 - .long 3158189848 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 393047345 - .long 1064548654 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3220176896 - .long 18115067 - .long 1066642694 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3220176896 - .long 2476548698 - .long 1067846634 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3220176896 - .long 2255197647 - .long 1068727457 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3220176896 - .long 1945768569 - .long 1069431400 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 3220176896 - .long 1539668340 - .long 1069912679 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 3220176896 - .long 1403757309 - .long 1070403070 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 2485417816 - .long 3217109964 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 3219128320 - .long 2598800519 - .long 3215750067 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3219128320 - .long 2140183630 - .long 1067272748 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3219128320 - .long 1699043957 - .long 1069418613 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 3219128320 - .long 1991047213 - .long 3215237169 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3218079744 - .long 240740309 - .long 1068244255 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 3218079744 - .long 257503056 - .long 1067164005 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 257503056 - .long 3214647653 - .long 2748392742 - .long 3220166797 - .long 1073741824 - .long 1015578102 - .long 0 - .long 1069547520 - .long 240740309 - .long 3215727903 - .long 3489094832 - .long 3220136599 - .long 536870912 - .long 3161809431 - .long 0 - .long 1070596096 - .long 1991047213 - .long 1067753521 - .long 1455828442 - .long 3220086593 - .long 3758096384 - .long 3162988721 - .long 0 - .long 1070596096 - .long 1699043957 - .long 3216902261 - .long 3476196678 - .long 3220017259 - .long 536870912 - .long 3161741286 - .long 0 - .long 1071644672 - .long 2140183630 - .long 3214756396 - .long 4051746225 - .long 3219929266 - .long 2147483648 - .long 1014423729 - .long 0 - .long 1071644672 - .long 2598800519 - .long 1068266419 - .long 688824739 - .long 3219823462 - .long 3758096384 - .long 3157915184 - .long 0 - .long 1071644672 - .long 2485417816 - .long 1069626316 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1015203297 - .long 0 - .long 1071644672 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3160934250 - .long 0 - .long 1072693248 - .long 1539668340 - .long 3217396327 - .long 967731400 - .long 3219244859 - .long 536870912 - .long 3163235805 - .long 0 - .long 1072693248 - .long 1945768569 - .long 3216915048 - .long 939980347 - .long 3219008349 - .long 536870912 - .long 3160280457 - .long 0 - .long 1072693248 - .long 2255197647 - .long 3216211105 - .long 2796464483 - .long 3218636258 - .long 3758096384 - .long 1013394669 - .long 0 - .long 1072693248 - .long 2476548698 - .long 3215330282 - .long 785751814 - .long 3218248710 - .long 2684354560 - .long 1014354573 - .long 0 - .long 1072693248 - .long 18115067 - .long 3214126342 - .long 1013556747 - .long 3217619128 - .long 3221225472 - .long 1013083417 - .long 0 - .long 1072693248 - .long 393047345 - .long 3212032302 - .long 3156849708 - .long 3216578470 - .long 3758096384 - .long 1010706200 - .long 0 - .long 1072693248 - .type Ctable,@object - .size Ctable,2048 - .align 16 -SC_2: - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .type SC_2,@object - .size SC_2,16 - .align 16 -SC_3: - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .type SC_3,@object - .size SC_3,16 - .align 16 -SC_1: - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .type SC_1,@object - .size SC_1,16 - .align 16 -PI_INV_TABLE: - .long 0 - .long 0 - .long 2734261102 - .long 1313084713 - .long 4230436817 - .long 4113882560 - .long 3680671129 - .long 1011060801 - .long 4266746795 - .long 3736847713 - .long 3072618042 - .long 1112396512 - .long 105459434 - .long 164729372 - .long 4263373596 - .long 2972297022 - .long 3900847605 - .long 784024708 - .long 3919343654 - .long 3026157121 - .long 965858873 - .long 2203269620 - .long 2625920907 - .long 3187222587 - .long 536385535 - .long 3724908559 - .long 4012839307 - .long 1510632735 - .long 1832287951 - .long 667617719 - .long 1330003814 - .long 2657085997 - .long 1965537991 - .long 3957715323 - .long 1023883767 - .long 2320667370 - .long 1811636145 - .long 529358088 - .long 1443049542 - .long 4235946923 - .long 4040145953 - .type PI_INV_TABLE,@object - .size PI_INV_TABLE,164 - .space 12, 0x00 # pad - .align 16 -PI_4: - .long 1073741824 - .long 1072243195 - .long 407279769 - .long 1046758445 - .type PI_4,@object - .size PI_4,16 - .align 8 -PI32INV: - .long 1841940611 - .long 1076125488 - .type PI32INV,@object - .size PI32INV,8 - .align 8 -SIGN_MASK: - .long 0 - .long 2147483648 - .type SIGN_MASK,@object - .size SIGN_MASK,8 - .align 8 -P_3: - .long 771977331 - .long 996350346 - .type P_3,@object - .size P_3,8 - .align 8 -ALL_ONES: - .long 4294967295 - .long 1072693247 - .type ALL_ONES,@object - .size ALL_ONES,8 - .align 8 -TWO_POW_55: - .long 0 - .long 1130364928 - .type TWO_POW_55,@object - .size TWO_POW_55,8 - .align 8 -TWO_POW_M55: - .long 0 - .long 1015021568 - .type TWO_POW_M55,@object - .size TWO_POW_M55,8 - .align 8 -P_1: - .long 1413480448 - .long 1069097467 - .type P_1,@object - .size P_1,8 - .align 8 -NEG_ZERO: - .long 0 - .long 2147483648 - .type NEG_ZERO,@object - .size NEG_ZERO,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincos_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincos_gen.S deleted file mode 100644 index 1ca9835a35..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincos_gen.S +++ /dev/null @@ -1,1479 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincos_gen.c" - .text -..TXTST0: -# -- Begin sincos - .text - .align 16,0x90 - .globl sincos -sincos: -# parameter 1: %xmm0 -# parameter 2: %rdi -# parameter 3: %rsi -..B1.1: - .cfi_startproc -..___tag_value_sincos.1: -..L2: - - subq $72, %rsp - .cfi_def_cfa_offset 80 - movq %fs:40, %rax - xorq %rsp, %rax - movsd %xmm0, 8(%rsp) - movq %rdi, 16(%rsp) - movq %rsi, 24(%rsp) - movq %rax, 56(%rsp) -..B1.2: - stmxcsr (%rsp) - movl (%rsp), %eax - andl $-24577, %eax - cmpl (%rsp), %eax - jne .L_2TAG_PACKET_0.0.1 -.L_2TAG_PACKET_1.0.1: - pextrw $3, %xmm0, %eax - andw $32767, %ax - subw $12336, %ax - cmpw $4293, %ax - ja .L_2TAG_PACKET_2.0.1 - unpcklpd %xmm0, %xmm0 - movapd PI32INV(%rip), %xmm1 - mulpd %xmm0, %xmm1 - movapd SHIFTER(%rip), %xmm2 - cvtsd2si %xmm1, %edx - addpd %xmm2, %xmm1 - movapd P_1(%rip), %xmm3 - subpd %xmm2, %xmm1 - movapd P_2(%rip), %xmm2 - mulpd %xmm1, %xmm3 - addq $1865216, %rdx - movapd %xmm0, %xmm4 - andq $63, %rdx - movapd SC_4(%rip), %xmm5 - lea Ctable(%rip), %rax - shlq $6, %rdx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - subpd %xmm3, %xmm0 - mulpd P_3(%rip), %xmm1 - subpd %xmm3, %xmm4 - movapd 16(%rax), %xmm7 - movapd %xmm4, %xmm3 - subpd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - movapd SC_2(%rip), %xmm6 - mulpd %xmm4, %xmm7 - subpd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subpd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subpd %xmm3, %xmm1 - movapd 48(%rax), %xmm3 - addpd %xmm3, %xmm2 - subpd %xmm2, %xmm7 - mulpd %xmm7, %xmm1 - movapd 16(%rax), %xmm7 - mulpd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulpd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm7 - mulpd %xmm0, %xmm0 - addpd SC_3(%rip), %xmm5 - mulpd (%rax), %xmm4 - addpd SC_1(%rip), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, %xmm0 - addpd 16(%rax), %xmm3 - addpd %xmm5, %xmm6 - movq %xmm6, %xmm5 - unpckhpd %xmm6, %xmm6 - unpcklpd %xmm5, %xmm5 - mulpd %xmm7, %xmm6 - mulpd %xmm5, %xmm2 - movapd %xmm4, %xmm7 - addpd %xmm3, %xmm4 - movapd 16(%rax), %xmm5 - subpd %xmm3, %xmm5 - subpd %xmm4, %xmm3 - addpd 32(%rax), %xmm1 - addpd %xmm0, %xmm5 - addpd %xmm7, %xmm3 - addpd %xmm5, %xmm1 - movl (%rsp), %eax - andl $-24577, %eax - cmpl (%rsp), %eax - je .L_2TAG_PACKET_3.0.1 - stmxcsr 4(%rsp) - movl (%rsp), %eax - andl $24576, %eax - orl %eax, 4(%rsp) - ldmxcsr 4(%rsp) -.L_2TAG_PACKET_3.0.1: - addpd %xmm3, %xmm1 - addpd %xmm2, %xmm1 - addpd %xmm6, %xmm1 - addpd %xmm4, %xmm1 - movq %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - movq 16(%rsp), %rax - movq %xmm0, (%rax) - movq 24(%rsp), %rax - movq %xmm1, (%rax) - jmp ..B1.7 -.L_2TAG_PACKET_2.0.1: - jg .L_2TAG_PACKET_4.0.1 - movq %xmm0, %xmm1 - pextrw $3, %xmm0, %eax - orw $32768, %ax - pinsrw $3, %eax, %xmm1 - addsd ONE(%rip), %xmm1 - cmpw $32784, %ax - jge .L_2TAG_PACKET_5.0.1 - movl (%rsp), %eax - andl $-24577, %eax - cmpl (%rsp), %eax - je .L_2TAG_PACKET_6.0.1 - stmxcsr 4(%rsp) - movl (%rsp), %eax - andl $24576, %eax - orl %eax, 4(%rsp) - ldmxcsr 4(%rsp) -.L_2TAG_PACKET_6.0.1: - mulsd ALL_ONES(%rip), %xmm0 - movq 16(%rsp), %rax - movq %xmm0, (%rax) - movq 24(%rsp), %rax - movq %xmm1, (%rax) - jmp ..B1.7 -.L_2TAG_PACKET_5.0.1: - movq TWO_POW_55(%rip), %xmm3 - mulsd %xmm0, %xmm3 - subsd %xmm3, %xmm0 - mulsd TWO_POW_M55(%rip), %xmm0 - movq 16(%rsp), %rax - movq %xmm0, (%rax) - movq 24(%rsp), %rax - movq %xmm1, (%rax) - jmp .L_2TAG_PACKET_7.0.1 -.L_2TAG_PACKET_4.0.1: - pextrw $3, %xmm0, %eax - andl $32752, %eax - cmpl $32752, %eax - je .L_2TAG_PACKET_8.0.1 -..B1.3: - movsd 8(%rsp), %xmm0 - lea 40(%rsp), %rdi -..___tag_value_sincos.4: - call __libm_reduce_pio2d@PLT -..___tag_value_sincos.5: -..B1.4: - movl %eax, 32(%rsp) -..B1.5: - movq 40(%rsp), %xmm0 - movq 48(%rsp), %xmm6 - unpcklpd %xmm0, %xmm0 - unpcklpd %xmm6, %xmm6 - movapd PI32INV(%rip), %xmm1 - mulpd %xmm0, %xmm1 - movapd SHIFTER(%rip), %xmm2 - cvtsd2si %xmm1, %edx - addpd %xmm2, %xmm1 - movapd P_1(%rip), %xmm3 - subpd %xmm2, %xmm1 - movapd P_2(%rip), %xmm2 - mulpd %xmm1, %xmm3 - movl 32(%rsp), %eax - shlq $4, %rax - addq $1865216, %rdx - movapd %xmm0, %xmm4 - addq %rax, %rdx - andq $63, %rdx - movapd SC_4(%rip), %xmm5 - lea Ctable(%rip), %rax - shlq $6, %rdx - addq %rdx, %rax - mulpd %xmm1, %xmm2 - subpd %xmm3, %xmm0 - mulpd P_3(%rip), %xmm1 - subpd %xmm3, %xmm4 - movapd 16(%rax), %xmm7 - movapd %xmm4, %xmm3 - subpd %xmm2, %xmm4 - mulpd %xmm0, %xmm5 - subpd %xmm2, %xmm0 - mulpd %xmm4, %xmm7 - subpd %xmm4, %xmm3 - mulpd %xmm0, %xmm5 - mulpd %xmm0, %xmm0 - subpd %xmm2, %xmm3 - movapd (%rax), %xmm2 - subpd %xmm3, %xmm1 - movapd 48(%rax), %xmm3 - addpd %xmm3, %xmm2 - subpd %xmm2, %xmm7 - subpd %xmm6, %xmm1 - movapd SC_2(%rip), %xmm6 - mulpd %xmm7, %xmm1 - movapd 16(%rax), %xmm7 - mulpd %xmm4, %xmm2 - mulpd %xmm0, %xmm6 - mulpd %xmm4, %xmm3 - mulpd %xmm0, %xmm2 - mulpd %xmm0, %xmm7 - mulpd %xmm0, %xmm0 - addpd SC_3(%rip), %xmm5 - mulpd (%rax), %xmm4 - addpd SC_1(%rip), %xmm6 - mulpd %xmm0, %xmm5 - movapd %xmm3, %xmm0 - addpd 16(%rax), %xmm3 - addpd %xmm5, %xmm6 - movq %xmm6, %xmm5 - unpckhpd %xmm6, %xmm6 - unpcklpd %xmm5, %xmm5 - mulpd %xmm7, %xmm6 - mulpd %xmm5, %xmm2 - movapd %xmm4, %xmm7 - addpd %xmm3, %xmm4 - movapd 16(%rax), %xmm5 - subpd %xmm3, %xmm5 - subpd %xmm4, %xmm3 - addpd 32(%rax), %xmm1 - addpd %xmm0, %xmm5 - addpd %xmm7, %xmm3 - addpd %xmm5, %xmm1 - movl (%rsp), %eax - andl $-24577, %eax - cmpl (%rsp), %eax - je .L_2TAG_PACKET_9.0.1 - stmxcsr 4(%rsp) - movl (%rsp), %eax - andl $24576, %eax - orl %eax, 4(%rsp) - ldmxcsr 4(%rsp) -.L_2TAG_PACKET_9.0.1: - addpd %xmm3, %xmm1 - addpd %xmm2, %xmm1 - addpd %xmm6, %xmm1 - addpd %xmm4, %xmm1 - movq %xmm1, %xmm0 - unpckhpd %xmm1, %xmm1 - movq 16(%rsp), %rax - movq %xmm0, (%rax) - movq 24(%rsp), %rax - movq %xmm1, (%rax) - jmp ..B1.7 -.L_2TAG_PACKET_8.0.1: - movq 8(%rsp), %xmm0 - pxor %xmm1, %xmm1 - mulsd %xmm1, %xmm0 - movq 16(%rsp), %rax - movq %xmm0, (%rax) - movq 24(%rsp), %rax - movq %xmm0, (%rax) -.L_2TAG_PACKET_7.0.1: - movl (%rsp), %eax - andl $-24577, %eax - cmpl (%rsp), %eax - je .L_2TAG_PACKET_10.0.1 - stmxcsr 4(%rsp) - movl (%rsp), %eax - andl $24576, %eax - orl %eax, 4(%rsp) - ldmxcsr 4(%rsp) -.L_2TAG_PACKET_10.0.1: - jmp ..B1.7 -.L_2TAG_PACKET_0.0.1: - movl %eax, 4(%rsp) - ldmxcsr 4(%rsp) - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_11.0.1: -..B1.7: - movq 56(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.9 -..B1.8: - addq $72, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 -..B1.9: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type sincos,@function - .size sincos,.-sincos - .data -# -- End sincos - .section .rodata, "a" - .align 16 - .align 16 -PI32INV: - .long 1841940611 - .long 1076125488 - .long 1841940611 - .long 1076125488 - .type PI32INV,@object - .size PI32INV,16 - .align 16 -SHIFTER: - .long 0 - .long 1127743488 - .long 0 - .long 1127743488 - .type SHIFTER,@object - .size SHIFTER,16 - .align 16 -P_1: - .long 1413480448 - .long 1069097467 - .long 1413480448 - .long 1069097467 - .type P_1,@object - .size P_1,16 - .align 16 -P_2: - .long 442499072 - .long 1032893537 - .long 442499072 - .long 1032893537 - .type P_2,@object - .size P_2,16 - .align 16 -SC_4: - .long 2773927732 - .long 1053236707 - .long 436314138 - .long 1056571808 - .type SC_4,@object - .size SC_4,16 - .align 16 -Ctable: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 3217031168 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 3218079744 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 3219128320 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 3219128320 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 3220176896 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 3220176896 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 1064548654 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 3163061750 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 3220176896 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 1066642694 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 1014325783 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 1067846634 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 1015505073 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 3220176896 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 1068727457 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 1014257638 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 1069431400 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 3161907377 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 1069912679 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 1010431536 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 1070403070 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 3162686945 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 3220176896 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 3217719929 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 3163282740 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 3219128320 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 3217109964 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 1013450602 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 3215750067 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 1015752157 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 1067272748 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 1012796809 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 1069418613 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 3160878317 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 3219128320 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 3215237169 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 3161838221 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 1068244255 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 3160567065 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 3218079744 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 1067164005 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 3158189848 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 3217031168 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 393047345 - .long 1064548654 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 3220166797 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 1015578102 - .long 0 - .long 3220176896 - .long 0 - .long 1069547520 - .long 18115067 - .long 1066642694 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 3220136599 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 3161809431 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2476548698 - .long 1067846634 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 3220086593 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 3162988721 - .long 0 - .long 3220176896 - .long 0 - .long 1070596096 - .long 2255197647 - .long 1068727457 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 3220017259 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 3161741286 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1945768569 - .long 1069431400 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 3219929266 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 1014423729 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1539668340 - .long 1069912679 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 3219823462 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 3157915184 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 1403757309 - .long 1070403070 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 3219700864 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 1015203297 - .long 0 - .long 3220176896 - .long 0 - .long 1071644672 - .long 2583490354 - .long 3217719929 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 3219562654 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 1015799092 - .long 0 - .long 3219128320 - .long 0 - .long 1071644672 - .long 2485417816 - .long 3217109964 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 3219410163 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 3160934250 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2598800519 - .long 3215750067 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 3219244859 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 3163235805 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 2140183630 - .long 1067272748 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 3219008349 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 3160280457 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1699043957 - .long 1069418613 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 3218636258 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 1013394669 - .long 0 - .long 3219128320 - .long 0 - .long 1072693248 - .long 1991047213 - .long 3215237169 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 3218248710 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 1014354573 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 240740309 - .long 1068244255 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 3217619128 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 1013083417 - .long 0 - .long 3218079744 - .long 0 - .long 1072693248 - .long 257503056 - .long 1067164005 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 3216578470 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 1010706200 - .long 0 - .long 3217031168 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 257503056 - .long 3214647653 - .long 393047345 - .long 3212032302 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 1069094822 - .long 1073741824 - .long 1015578102 - .long 3758096384 - .long 3158189848 - .long 0 - .long 1069547520 - .long 0 - .long 1072693248 - .long 240740309 - .long 3215727903 - .long 18115067 - .long 3214126342 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 1070135480 - .long 536870912 - .long 3161809431 - .long 3221225472 - .long 3160567065 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1991047213 - .long 1067753521 - .long 2476548698 - .long 3215330282 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 1070765062 - .long 3758096384 - .long 3162988721 - .long 2684354560 - .long 3161838221 - .long 0 - .long 1070596096 - .long 0 - .long 1072693248 - .long 1699043957 - .long 3216902261 - .long 2255197647 - .long 3216211105 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 1071152610 - .long 536870912 - .long 3161741286 - .long 3758096384 - .long 3160878317 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2140183630 - .long 3214756396 - .long 1945768569 - .long 3216915048 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 1071524701 - .long 2147483648 - .long 1014423729 - .long 536870912 - .long 1012796809 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2598800519 - .long 1068266419 - .long 1539668340 - .long 3217396327 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 1071761211 - .long 3758096384 - .long 3157915184 - .long 536870912 - .long 1015752157 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2485417816 - .long 1069626316 - .long 1403757309 - .long 3217886718 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 1071926515 - .long 536870912 - .long 1015203297 - .long 536870912 - .long 1013450602 - .long 0 - .long 1071644672 - .long 0 - .long 1072693248 - .long 2583490354 - .long 1070236281 - .long 2583490354 - .long 1070236281 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 1072079006 - .long 536870912 - .long 1015799092 - .long 536870912 - .long 3163282740 - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .long 1403757309 - .long 3217886718 - .long 2485417816 - .long 1069626316 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 1072217216 - .long 536870912 - .long 3160934250 - .long 536870912 - .long 3162686945 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1539668340 - .long 3217396327 - .long 2598800519 - .long 1068266419 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 1072339814 - .long 536870912 - .long 3163235805 - .long 3758096384 - .long 1010431536 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 1945768569 - .long 3216915048 - .long 2140183630 - .long 3214756396 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 1072445618 - .long 536870912 - .long 3160280457 - .long 2147483648 - .long 3161907377 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2255197647 - .long 3216211105 - .long 1699043957 - .long 3216902261 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 1072533611 - .long 3758096384 - .long 1013394669 - .long 536870912 - .long 1014257638 - .long 0 - .long 1072693248 - .long 0 - .long 1071644672 - .long 2476548698 - .long 3215330282 - .long 1991047213 - .long 1067753521 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 1072602945 - .long 2684354560 - .long 1014354573 - .long 3758096384 - .long 1015505073 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 18115067 - .long 3214126342 - .long 240740309 - .long 3215727903 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 1072652951 - .long 3221225472 - .long 1013083417 - .long 536870912 - .long 1014325783 - .long 0 - .long 1072693248 - .long 0 - .long 1070596096 - .long 393047345 - .long 3212032302 - .long 257503056 - .long 3214647653 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 1072683149 - .long 3758096384 - .long 1010706200 - .long 1073741824 - .long 3163061750 - .long 0 - .long 1072693248 - .long 0 - .long 1069547520 - .type Ctable,@object - .size Ctable,4096 - .space 512, 0x00 # pad - .align 16 -P_3: - .long 771977331 - .long 996350346 - .long 771977331 - .long 996350346 - .type P_3,@object - .size P_3,16 - .align 16 -SC_2: - .long 286331153 - .long 1065423121 - .long 1431655765 - .long 1067799893 - .type SC_2,@object - .size SC_2,16 - .align 16 -SC_3: - .long 436314138 - .long 3207201184 - .long 381774871 - .long 3210133868 - .type SC_3,@object - .size SC_3,16 - .align 16 -SC_1: - .long 1431655765 - .long 3217380693 - .long 0 - .long 3219128320 - .type SC_1,@object - .size SC_1,16 - .align 16 -TWO_POW_55: - .long 0 - .long 1130364928 - .type TWO_POW_55,@object - .size TWO_POW_55,8 - .align 8 -ONE: - .long 0 - .long 1072693248 - .type ONE,@object - .size ONE,8 - .align 8 -ALL_ONES: - .long 4294967295 - .long 1072693247 - .type ALL_ONES,@object - .size ALL_ONES,8 - .align 8 -TWO_POW_M55: - .long 0 - .long 3162505216 - .type TWO_POW_M55,@object - .size TWO_POW_M55,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincos_pi4l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincos_pi4l.S deleted file mode 100644 index d664d8382e..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincos_pi4l.S +++ /dev/null @@ -1,5050 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincos_pi4l.c" - .text -..TXTST0: -# -- Begin __libm_sincos_pi4l - .text - .align 16,0x90 - .globl __libm_sincos_pi4l -__libm_sincos_pi4l: -# parameter 1: 80 + %rsp -# parameter 2: %rdi -# parameter 3: %rsi -# parameter 4: %edx -..B1.1: - .cfi_startproc -..___tag_value___libm_sincos_pi4l.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - subq $56, %rsp - .cfi_def_cfa_offset 80 - lea _pzerol_value(%rip), %rax - fldt 80(%rsp) - movl %edx, %r8d - movl %r8d, %r9d - fld %st(0) - movq %fs:40, %rcx - negl %r9d - xorq %rsp, %rcx - fchs - fldt (%rax) - lea _pion4(%rip), %r11 - movl $1, %r10d - fcomi %st(2), %st - movq %rcx, 48(%rsp) - fxch %st(2) - fcmovnbe %st(1), %st - fstp %st(1) - fldt (%r11) - movl $-1, %ecx - cmova %r9d, %r8d - cmovbe %r10d, %ecx - fcomi %st(1), %st - jbe ..B1.3 -..B1.2: - fstp %st(2) - testl $1, %r8d - fsub %st, %st(1) - fcmovne %st(1), %st - fstp %st(1) - jmp ..B1.22 -..B1.3: - lea _cody_thres_val(%rip), %rax - fldz - fldt (%rax) - fcomip %st(3), %st - jbe ..B1.5 -..B1.4: - fstp %st(3) - fstp %st(0) - fstp %st(1) - lea __4onpi(%rip), %rax - lea _PI04(%rip), %r10 - lea 16+_PI04(%rip), %r11 - lea 32+_PI04(%rip), %r13 - fldt (%rax) - fmul %st(1), %st - fnstcw (%rsp) - movzwl (%rsp), %eax - orl $3072, %eax - movl %eax, 8(%rsp) - fldcw 8(%rsp) - fistpl 16(%rsp) - fldcw (%rsp) - fldt (%r10) - fldt (%r11) - fldt (%r13) - movl 16(%rsp), %r9d - addl %r9d, %r8d - testl $1, %r8d - lea 1(%r9), %edx - cmovne %edx, %r9d - movl %r9d, 24(%rsp) - fildl 24(%rsp) - fmul %st, %st(3) - fxch %st(3) - fsubrp %st, %st(4) - fxch %st(1) - fmul %st(2), %st - fsubrp %st, %st(3) - fmulp %st, %st(1) - fsubrp %st, %st(1) - jmp ..B1.22 -..B1.5: - fxch %st(2) - fstpt 16(%rsp) - movl $-2078209981, %eax - movzwl 24(%rsp), %r11d - movl %r11d, %r9d - andl $32767, %r9d - andl $-32768, %r11d - lea -16417(%r9), %r13d - imull %r13d - sarl $31, %r13d - lea -16417(%rdx,%r9), %eax - sarl $4, %eax - lea -62(%r9), %r10d - subl %r13d, %eax - andl $32767, %r10d - movl %eax, %r14d - orl %r10d, %r11d - shll $5, %r14d - negl %r14d - addl %eax, %r14d - movw %r11w, 24(%rsp) - fldt 16(%rsp) - fstpt (%rsp) - fldt (%rsp) - movl $0, (%rsp) - lea -16417(%r14,%r9), %edx - fldt (%rsp) - cmpl $23, %edx - fsubr %st, %st(1) - jl ..B1.7 -..B1.6: - movslq %eax, %rdx - incl %eax - shlq $4, %rdx - lea _4OPI(%rip), %r13 - fxch %st(3) - fstpt 16(%rsp) - fldt (%rdx,%r13) - fmul %st(1), %st - fldt 16(%rdx,%r13) - fmul %st(4), %st - faddp %st, %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - andl $-16777216, 32(%rsp) - fldt 32(%rsp) - fsubrp %st, %st(1) - jmp ..B1.8 -..B1.7: - fstp %st(3) - fld %st(3) - lea _4OPI(%rip), %r13 -..B1.8: - movslq %eax, %rdx - fld %st(3) - shlq $4, %rdx - lea _ADDING(%rip), %r9 - fldt 16(%rdx,%r13) - fmul %st, %st(1) - fmul %st(3), %st - fldt (%rdx,%r13) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fldt 32(%rdx,%r13) - fmul %st(6), %st - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fadd %st, %st(1) - fstpt 32(%rsp) - fldt (%r9) - fld %st(0) - fadd %st(2), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - movl 16(%rsp), %r9d - fcomi %st(1), %st - fxch %st(1) - fstp %st(0) - fldt (%rsp) - jbe ..B1.10 -..B1.9: - lea _nonel_value(%rip), %rdx - decl %r9d - fldt (%rdx) - faddp %st, %st(2) -..B1.10: - addl %r9d, %r8d - fxch %st(1) - fsubrp %st, %st(2) - testl $1, %r8d - je ..B1.13 -..B1.11: - fstp %st(5) - lea _nonel_value(%rip), %rdx - fldt (%rdx) - fxch %st(5) -..B1.13: - movslq %eax, %rax - movl $5, %r9d - fxch %st(1) - faddp %st, %st(5) - lea 2(%rax), %rdx - movl %edx, %r11d - faddp %st, %st(4) - negl %r11d - addl $532, %r11d - cmpl $5, %r11d - cmova %r9d, %r11d - cmpq $532, %rdx - jge ..B1.20 -..B1.14: - movl %r11d, %r9d - movl $1, %r14d - shrl $1, %r9d - xorl %r10d, %r10d - testl %r9d, %r9d - jbe ..B1.18 -..B1.15: - fldt .L_2il0floatpacket.0(%rip) - shlq $4, %rdx - addq %r13, %rdx -..B1.16: - jmp ..L8 -..L9: - faddp %st, %st(1) -..L8: - fld %st(3) - lea (%r10,%r10), %r14d - movslq %r14d, %r14 - incl %r10d - shlq $4, %r14 - cmpl %r9d, %r10d - fldt 16(%rdx,%r14) - fmul %st, %st(1) - fmul %st(3), %st - fldt (%rdx,%r14) - fmul %st(4), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(6) - fldt 32(%rdx,%r14) - fmul %st(5), %st - faddp %st, %st(1) - jb ..L9 - faddp %st, %st(1) -..B1.17: - faddp %st, %st(4) - lea 1(%r10,%r10), %r14d -..B1.18: - decl %r14d - movslq %r14d, %r14 - movslq %r11d, %r11 - cmpq %r11, %r14 - jae ..B1.20 -..B1.19: - lea 2(%r14,%rax), %rax - shlq $4, %rax - fldt (%rax,%r13) - fmulp %st, %st(1) - fldt 16(%rax,%r13) - fmulp %st, %st(3) - fadd %st(2), %st - fadd %st, %st(3) -..B1.20: - fstp %st(2) - fstp %st(1) - fmulp %st, %st(1) -..B1.22: - testl $1, %r8d - lea ssign(%rip), %rdx - lea csign(%rip), %r10 - lea 1(%r8), %eax - cmovne %eax, %r8d - fld %st(0) - andl $7, %r8d - movl (%rdx,%r8,4), %r9d - imull %r9d, %ecx - fmul %st(1), %st - movl (%r10,%r8,4), %eax - andl $3, %r8d - decl %r8d - movl %ecx, 24(%rsp) - cmpl $1, %r8d - fildl 24(%rsp) - ja ..B1.24 -..B1.23: - lea _PC(%rip), %rdx - lea 16+_PC(%rip), %rcx - lea 32+_PC(%rip), %r8 - lea 48+_PC(%rip), %r9 - lea 64+_PC(%rip), %r10 - lea 80+_PC(%rip), %r11 - lea 96+_PC(%rip), %r13 - lea 112+_PC(%rip), %r14 - fldt (%rdx) - lea _ponel_value(%rip), %rdx - movl %eax, 24(%rsp) - fmul %st(2), %st - fldt (%rcx) - lea 32+_PS(%rip), %rcx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - lea 64+_PS(%rip), %r8 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - lea 80+_PS(%rip), %r9 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - lea 96+_PS(%rip), %r10 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r11) - lea 112+_PS(%rip), %r11 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r13) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r14) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 16+_PS(%rip), %rdx - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rdi) - lea _PS(%rip), %rdi - fldt (%rdx) - fldt (%r8) - fldt (%r9) - fldt (%rdi) - lea 48+_PS(%rip), %rdi - fmul %st(4), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fildl 24(%rsp) - fmulp %st, %st(1) - fstpt (%rsi) - jmp ..B1.25 -..B1.24: - lea _PS(%rip), %rdx - lea 16+_PS(%rip), %rcx - lea 32+_PS(%rip), %r8 - lea 48+_PS(%rip), %r9 - lea 64+_PS(%rip), %r10 - lea 80+_PS(%rip), %r11 - lea 96+_PS(%rip), %r13 - lea 112+_PS(%rip), %r14 - fldt (%rdx) - lea 48+_PC(%rip), %rdx - movl %eax, 24(%rsp) - lea _PC(%rip), %rax - fmul %st(2), %st - fldt (%rcx) - lea 64+_PC(%rip), %rcx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - lea 96+_PC(%rip), %r8 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - lea 112+_PC(%rip), %r9 - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - lea _ponel_value(%rip), %r10 - faddp %st, %st(1) - fmul %st(2), %st - fildl 24(%rsp) - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r13) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r14) - faddp %st, %st(1) - fmul %st(3), %st - fmul %st(4), %st - faddp %st, %st(4) - fxch %st(3) - fmulp %st, %st(1) - fstpt (%rdi) - lea 16+_PC(%rip), %rdi - fldt (%rax) - lea 32+_PC(%rip), %rax - fmul %st(1), %st - fldt (%rdi) - lea 80+_PC(%rip), %rdi - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt (%rsi) -..B1.25: - movq 48(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.27 -..B1.26: - addq $56, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 13, -16 - .cfi_offset 14, -24 -..B1.27: - call __stack_chk_fail@PLT - .align 16,0x90 - .cfi_endproc - .type __libm_sincos_pi4l,@function - .size __libm_sincos_pi4l,.-__libm_sincos_pi4l - .data -# -- End __libm_sincos_pi4l - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 4 -ssign: - .long 1 - .long 1 - .long 1 - .long 1 - .long -1 - .long -1 - .long -1 - .long -1 - .type ssign,@object - .size ssign,32 - .align 4 -csign: - .long 1 - .long 1 - .long -1 - .long -1 - .long -1 - .long -1 - .long 1 - .long 1 - .type csign,@object - .size csign,32 - .align 2 -_pzerol_value: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _pzerol_value,@object - .size _pzerol_value,16 - .align 2 -_pion4: - .word 49717 - .word 8552 - .word 55970 - .word 51471 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _pion4,@object - .size _pion4,16 - .align 2 -_cody_thres_val: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16413 - .word 0 - .word 0 - .word 0 - .type _cody_thres_val,@object - .size _cody_thres_val,16 - .align 2 -__4onpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16383 - .word 0 - .word 0 - .word 0 - .type __4onpi,@object - .size __4onpi,16 - .align 2 -_PI04: - .word 0 - .word 0 - .word 55936 - .word 51471 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41728 - .word 34949 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 14087 - .word 41696 - .word 12696 - .word 36145 - .word 16328 - .word 0 - .word 0 - .word 0 - .type _PI04,@object - .size _PI04,48 - .align 2 -_4OPI: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33646 - .word 41721 - .word 16445 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10832 - .word 40072 - .word 16412 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44008 - .word 65043 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28384 - .word 64154 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38272 - .word 56162 - .word 16317 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7298 - .word 51682 - .word 16290 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45504 - .word 65320 - .word 16254 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61204 - .word 44922 - .word 16227 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18652 - .word 50030 - .word 16196 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14144 - .word 59657 - .word 16163 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37450 - .word 47105 - .word 16135 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14898 - .word 56641 - .word 16104 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34680 - .word 34623 - .word 16071 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4760 - .word 45515 - .word 16041 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41480 - .word 40187 - .word 16011 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47852 - .word 55252 - .word 15979 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54072 - .word 35081 - .word 15948 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26808 - .word 57421 - .word 15916 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20068 - .word 57232 - .word 15887 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49576 - .word 60188 - .word 15854 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10016 - .word 52861 - .word 15823 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30648 - .word 35825 - .word 15792 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60542 - .word 58528 - .word 15763 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65468 - .word 61743 - .word 15732 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64960 - .word 45825 - .word 15696 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50604 - .word 38792 - .word 15670 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18394 - .word 33435 - .word 15639 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55780 - .word 42703 - .word 15608 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14056 - .word 63841 - .word 15576 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63080 - .word 62563 - .word 15545 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20840 - .word 62207 - .word 15514 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30094 - .word 59983 - .word 15484 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61818 - .word 60389 - .word 15453 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40186 - .word 40579 - .word 15422 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42170 - .word 58004 - .word 15391 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55276 - .word 39678 - .word 15359 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44672 - .word 36806 - .word 15326 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13060 - .word 34144 - .word 15297 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28016 - .word 57231 - .word 15264 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16112 - .word 44995 - .word 15235 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53464 - .word 33387 - .word 15203 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7296 - .word 60751 - .word 15170 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29452 - .word 45231 - .word 15142 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26208 - .word 49689 - .word 15111 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37900 - .word 44002 - .word 15080 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57340 - .word 33800 - .word 15049 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27544 - .word 50178 - .word 15018 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6168 - .word 40132 - .word 14987 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21392 - .word 43702 - .word 14954 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45168 - .word 54372 - .word 14926 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8986 - .word 40688 - .word 14895 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1648 - .word 53745 - .word 14863 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30520 - .word 55795 - .word 14831 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43060 - .word 32914 - .word 14801 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46172 - .word 52771 - .word 14770 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14056 - .word 45285 - .word 14738 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53590 - .word 44868 - .word 14709 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40786 - .word 35970 - .word 14678 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33436 - .word 65411 - .word 14646 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32006 - .word 61382 - .word 14616 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37856 - .word 45239 - .word 14583 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60894 - .word 49555 - .word 14554 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48064 - .word 53065 - .word 14519 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48624 - .word 54844 - .word 14492 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7988 - .word 40762 - .word 14461 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16270 - .word 58745 - .word 14430 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37064 - .word 50168 - .word 14398 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18624 - .word 63736 - .word 14364 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60758 - .word 44966 - .word 14337 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33304 - .word 47465 - .word 14306 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6226 - .word 60503 - .word 14275 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26380 - .word 54900 - .word 14243 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44352 - .word 49860 - .word 14213 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11904 - .word 42646 - .word 14182 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55296 - .word 50279 - .word 14145 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15474 - .word 50606 - .word 14120 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45062 - .word 44137 - .word 14089 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13472 - .word 36063 - .word 14055 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40658 - .word 53854 - .word 14027 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28652 - .word 43690 - .word 13996 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24640 - .word 64348 - .word 13963 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30284 - .word 41980 - .word 13933 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45652 - .word 38222 - .word 13902 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15900 - .word 62940 - .word 13871 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31494 - .word 50741 - .word 13841 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43194 - .word 55096 - .word 13810 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1740 - .word 45646 - .word 13778 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28936 - .word 44150 - .word 13748 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8996 - .word 42955 - .word 13717 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44096 - .word 61205 - .word 13684 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44614 - .word 54550 - .word 13655 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24926 - .word 57347 - .word 13624 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3312 - .word 61415 - .word 13590 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64336 - .word 63884 - .word 13562 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2748 - .word 62259 - .word 13530 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56672 - .word 51775 - .word 13498 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32438 - .word 55423 - .word 13469 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17652 - .word 45713 - .word 13438 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65408 - .word 51586 - .word 13403 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40416 - .word 55736 - .word 13376 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52546 - .word 37734 - .word 13345 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48880 - .word 64238 - .word 13314 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56004 - .word 46833 - .word 13282 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61760 - .word 38110 - .word 13250 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41496 - .word 35659 - .word 13219 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25472 - .word 41269 - .word 13187 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45444 - .word 36018 - .word 13159 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6510 - .word 56417 - .word 13128 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3072 - .word 56837 - .word 13097 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61338 - .word 48440 - .word 13066 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49568 - .word 57088 - .word 13034 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4240 - .word 39283 - .word 13002 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18562 - .word 33537 - .word 12973 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31422 - .word 44487 - .word 12942 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31930 - .word 60459 - .word 12911 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42272 - .word 36641 - .word 12878 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28940 - .word 36150 - .word 12849 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21010 - .word 50925 - .word 12818 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29448 - .word 64886 - .word 12786 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20500 - .word 54600 - .word 12756 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54258 - .word 46233 - .word 12725 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32628 - .word 42502 - .word 12693 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61608 - .word 55072 - .word 12663 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6236 - .word 57871 - .word 12631 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42408 - .word 34616 - .word 12601 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56692 - .word 51963 - .word 12569 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39094 - .word 48526 - .word 12539 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59870 - .word 38783 - .word 12508 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26560 - .word 33165 - .word 12477 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58666 - .word 37666 - .word 12446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58728 - .word 39788 - .word 12414 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9048 - .word 43530 - .word 12383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58496 - .word 57659 - .word 12350 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12324 - .word 37025 - .word 12322 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38432 - .word 55856 - .word 12290 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35210 - .word 45960 - .word 12260 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45644 - .word 51345 - .word 12229 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32854 - .word 63883 - .word 12198 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29348 - .word 41450 - .word 12166 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27384 - .word 38024 - .word 12134 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57356 - .word 57291 - .word 12105 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61164 - .word 51521 - .word 12073 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21472 - .word 59151 - .word 12041 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36704 - .word 39943 - .word 12010 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45864 - .word 50151 - .word 11981 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37892 - .word 63687 - .word 11949 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14560 - .word 51615 - .word 11918 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38776 - .word 55684 - .word 11886 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59136 - .word 53570 - .word 11855 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55556 - .word 37955 - .word 11826 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54458 - .word 44670 - .word 11795 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36446 - .word 34084 - .word 11764 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46416 - .word 51693 - .word 11731 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21432 - .word 34376 - .word 11702 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56036 - .word 34809 - .word 11671 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10562 - .word 55654 - .word 11640 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20264 - .word 53052 - .word 11608 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64064 - .word 50415 - .word 11574 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17444 - .word 48295 - .word 11546 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11874 - .word 52677 - .word 11516 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60808 - .word 39275 - .word 11485 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31792 - .word 55677 - .word 11451 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60710 - .word 49006 - .word 11423 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10520 - .word 37403 - .word 11391 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20004 - .word 59470 - .word 11360 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28096 - .word 37612 - .word 11330 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20268 - .word 44280 - .word 11298 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50740 - .word 61588 - .word 11267 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56432 - .word 58835 - .word 11235 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8576 - .word 42496 - .word 11200 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33920 - .word 54912 - .word 11169 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35620 - .word 54843 - .word 11143 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 736 - .word 43591 - .word 11109 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39632 - .word 61060 - .word 11080 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63452 - .word 63129 - .word 11051 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56798 - .word 58512 - .word 11020 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13472 - .word 46333 - .word 10986 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37300 - .word 36598 - .word 10957 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41952 - .word 41639 - .word 10924 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52452 - .word 33459 - .word 10895 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58558 - .word 33287 - .word 10865 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7570 - .word 43843 - .word 10834 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59416 - .word 63990 - .word 10802 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65298 - .word 47744 - .word 10772 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21076 - .word 34089 - .word 10741 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7048 - .word 57394 - .word 10710 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12872 - .word 55405 - .word 10677 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12608 - .word 51669 - .word 10643 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5350 - .word 48455 - .word 10617 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23568 - .word 58692 - .word 10585 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40784 - .word 37046 - .word 10553 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38992 - .word 43861 - .word 10523 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10064 - .word 40199 - .word 10493 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26368 - .word 35771 - .word 10456 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23994 - .word 60721 - .word 10431 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25052 - .word 34302 - .word 10399 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39842 - .word 54964 - .word 10369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11568 - .word 58277 - .word 10336 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26160 - .word 46438 - .word 10306 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23252 - .word 43049 - .word 10276 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35288 - .word 58000 - .word 10245 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14614 - .word 50216 - .word 10214 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1168 - .word 48804 - .word 10181 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60934 - .word 33006 - .word 10152 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64512 - .word 62247 - .word 10117 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59968 - .word 43121 - .word 10085 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25560 - .word 39974 - .word 10057 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1978 - .word 49353 - .word 10028 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16290 - .word 38807 - .word 9997 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8646 - .word 65226 - .word 9966 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56896 - .word 34317 - .word 9933 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40136 - .word 39118 - .word 9902 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14200 - .word 41756 - .word 9871 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59256 - .word 63202 - .word 9840 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 22968 - .word 63553 - .word 9810 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 736 - .word 44292 - .word 9778 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23186 - .word 37760 - .word 9749 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51008 - .word 34950 - .word 9714 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1664 - .word 64248 - .word 9681 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64352 - .word 35199 - .word 9656 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34656 - .word 63747 - .word 9625 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44330 - .word 49864 - .word 9594 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11654 - .word 35567 - .word 9563 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7924 - .word 58919 - .word 9531 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2532 - .word 32800 - .word 9500 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30024 - .word 53799 - .word 9469 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30172 - .word 64347 - .word 9438 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60036 - .word 51382 - .word 9407 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 58576 - .word 33093 - .word 9376 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13888 - .word 38760 - .word 9345 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9322 - .word 52460 - .word 9315 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20944 - .word 41077 - .word 9282 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17976 - .word 41861 - .word 9252 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55176 - .word 55158 - .word 9222 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4976 - .word 35223 - .word 9191 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7816 - .word 39783 - .word 9159 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27656 - .word 55669 - .word 9129 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64944 - .word 53184 - .word 9095 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12544 - .word 49190 - .word 9067 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50612 - .word 44644 - .word 9035 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8832 - .word 63111 - .word 9000 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11744 - .word 36870 - .word 8974 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9404 - .word 63025 - .word 8943 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47316 - .word 43381 - .word 8912 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55716 - .word 47433 - .word 8880 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46414 - .word 48441 - .word 8850 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19116 - .word 39506 - .word 8819 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48060 - .word 53381 - .word 8788 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57112 - .word 50739 - .word 8756 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5840 - .word 60581 - .word 8724 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62112 - .word 57199 - .word 8691 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35908 - .word 59499 - .word 8663 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13760 - .word 48116 - .word 8632 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3136 - .word 56059 - .word 8597 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37596 - .word 39221 - .word 8571 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3232 - .word 48550 - .word 8536 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 22872 - .word 42749 - .word 8507 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41948 - .word 40319 - .word 8478 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31196 - .word 64693 - .word 8446 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62052 - .word 52923 - .word 8416 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2750 - .word 33544 - .word 8385 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12462 - .word 46179 - .word 8354 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25128 - .word 45120 - .word 8321 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51634 - .word 62523 - .word 8292 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15758 - .word 42163 - .word 8261 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34022 - .word 36267 - .word 8230 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41252 - .word 39796 - .word 8198 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49782 - .word 54423 - .word 8168 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25428 - .word 42086 - .word 8136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34388 - .word 44810 - .word 8105 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7456 - .word 64092 - .word 8073 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48336 - .word 62448 - .word 8041 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60912 - .word 61622 - .word 8012 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17852 - .word 37250 - .word 7982 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57940 - .word 56453 - .word 7951 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47256 - .word 59825 - .word 7919 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3774 - .word 59120 - .word 7889 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43448 - .word 62852 - .word 7857 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4840 - .word 57195 - .word 7827 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40862 - .word 52565 - .word 7796 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1440 - .word 60474 - .word 7764 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55520 - .word 38648 - .word 7734 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15316 - .word 52422 - .word 7702 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 18704 - .word 47227 - .word 7672 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48892 - .word 54283 - .word 7640 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12670 - .word 41990 - .word 7610 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27570 - .word 49842 - .word 7579 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47230 - .word 47992 - .word 7548 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41020 - .word 56253 - .word 7516 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23404 - .word 58312 - .word 7486 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35176 - .word 51854 - .word 7455 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49188 - .word 59051 - .word 7423 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16656 - .word 54507 - .word 7391 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41320 - .word 48565 - .word 7362 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 302 - .word 42490 - .word 7331 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 26680 - .word 39967 - .word 7299 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41304 - .word 43638 - .word 7269 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2314 - .word 48533 - .word 7238 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63294 - .word 35693 - .word 7207 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24538 - .word 48319 - .word 7176 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56296 - .word 47263 - .word 7145 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 38599 - .word 7113 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6594 - .word 62116 - .word 7083 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47104 - .word 63573 - .word 7043 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34812 - .word 34303 - .word 7021 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5144 - .word 33695 - .word 6990 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24966 - .word 55768 - .word 6959 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62720 - .word 43946 - .word 6923 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31542 - .word 56062 - .word 6897 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 62356 - .word 59096 - .word 6865 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28412 - .word 40533 - .word 6835 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24080 - .word 50467 - .word 6803 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33296 - .word 46841 - .word 6770 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39600 - .word 38627 - .word 6742 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14436 - .word 37607 - .word 6710 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39032 - .word 56421 - .word 6678 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64032 - .word 54987 - .word 6649 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27648 - .word 42212 - .word 6613 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43840 - .word 46107 - .word 6584 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17316 - .word 36574 - .word 6556 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8928 - .word 37652 - .word 6522 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24944 - .word 47433 - .word 6493 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27392 - .word 57430 - .word 6461 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39848 - .word 43340 - .word 6430 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64160 - .word 43542 - .word 6400 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35226 - .word 63015 - .word 6370 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40736 - .word 64368 - .word 6338 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42168 - .word 49526 - .word 6307 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45596 - .word 34243 - .word 6277 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20690 - .word 39705 - .word 6246 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54448 - .word 46856 - .word 6213 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64392 - .word 62736 - .word 6182 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12780 - .word 56461 - .word 6152 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15360 - .word 49145 - .word 6122 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20512 - .word 49931 - .word 6087 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54512 - .word 55820 - .word 6057 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8402 - .word 39333 - .word 6029 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34094 - .word 53593 - .word 5998 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31960 - .word 38817 - .word 5966 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16954 - .word 39291 - .word 5936 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49600 - .word 48765 - .word 5901 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59580 - .word 56541 - .word 5874 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35624 - .word 44550 - .word 5843 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4142 - .word 47316 - .word 5812 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43520 - .word 43612 - .word 5780 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20976 - .word 40896 - .word 5747 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63576 - .word 57729 - .word 5719 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37288 - .word 33122 - .word 5688 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24384 - .word 52079 - .word 5654 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47952 - .word 58719 - .word 5624 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44242 - .word 55445 - .word 5595 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61232 - .word 38847 - .word 5561 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63232 - .word 46039 - .word 5528 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13396 - .word 42933 - .word 5502 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27392 - .word 43305 - .word 5467 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40708 - .word 35319 - .word 5440 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44408 - .word 55685 - .word 5409 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 42090 - .word 44607 - .word 5378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25504 - .word 53466 - .word 5345 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24208 - .word 33149 - .word 5315 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5268 - .word 45375 - .word 5285 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 144 - .word 40000 - .word 5254 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56688 - .word 52358 - .word 5221 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25848 - .word 56175 - .word 5190 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57900 - .word 44055 - .word 5160 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24800 - .word 43437 - .word 5128 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17984 - .word 54872 - .word 5094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25744 - .word 41345 - .word 5068 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 7668 - .word 43682 - .word 5036 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47434 - .word 36705 - .word 5006 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20888 - .word 40323 - .word 4974 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3962 - .word 43032 - .word 4944 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50270 - .word 49260 - .word 4913 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20160 - .word 64041 - .word 4877 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25624 - .word 36013 - .word 4849 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48328 - .word 59345 - .word 4820 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51508 - .word 63920 - .word 4788 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27872 - .word 39135 - .word 4758 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 13590 - .word 58857 - .word 4727 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 50880 - .word 61323 - .word 4692 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44802 - .word 37181 - .word 4665 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53808 - .word 57813 - .word 4634 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64424 - .word 49714 - .word 4602 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31652 - .word 44011 - .word 4572 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28252 - .word 50834 - .word 4541 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30370 - .word 38742 - .word 4510 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57728 - .word 58403 - .word 4473 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35900 - .word 37112 - .word 4448 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 40764 - .word 40914 - .word 4417 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21472 - .word 46910 - .word 4386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17854 - .word 35030 - .word 4355 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4378 - .word 35776 - .word 4324 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57962 - .word 55295 - .word 4293 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 64352 - .word 56717 - .word 4260 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37744 - .word 49416 - .word 4229 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38484 - .word 35759 - .word 4200 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 55020 - .word 54969 - .word 4169 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9188 - .word 55223 - .word 4137 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6822 - .word 43079 - .word 4107 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48870 - .word 40943 - .word 4076 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9936 - .word 42731 - .word 4043 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23430 - .word 43136 - .word 4014 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4700 - .word 55665 - .word 3982 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 8056 - .word 40216 - .word 3951 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3716 - .word 45403 - .word 3920 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53440 - .word 49488 - .word 3889 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 41776 - .word 50188 - .word 3858 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20994 - .word 64556 - .word 3828 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16252 - .word 60661 - .word 3796 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61252 - .word 65021 - .word 3765 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16236 - .word 43803 - .word 3734 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63064 - .word 35308 - .word 3702 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49096 - .word 39848 - .word 3673 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15680 - .word 48673 - .word 3642 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 48068 - .word 50957 - .word 3611 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20824 - .word 56086 - .word 3579 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46504 - .word 43224 - .word 3549 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52428 - .word 46094 - .word 3517 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17548 - .word 52066 - .word 3487 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61738 - .word 35565 - .word 3456 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31184 - .word 50588 - .word 3424 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1716 - .word 52681 - .word 3394 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44656 - .word 43385 - .word 3363 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12668 - .word 43259 - .word 3331 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24544 - .word 35408 - .word 3298 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28854 - .word 65018 - .word 3270 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5696 - .word 40391 - .word 3238 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 39580 - .word 56400 - .word 3208 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20428 - .word 39579 - .word 3177 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32328 - .word 36727 - .word 3146 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34020 - .word 54457 - .word 3115 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34016 - .word 48400 - .word 3083 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6922 - .word 51417 - .word 3053 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27208 - .word 64641 - .word 3021 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1802 - .word 48886 - .word 2991 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 35440 - .word 61590 - .word 2960 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 60610 - .word 51604 - .word 2929 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5440 - .word 38199 - .word 2895 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6914 - .word 43867 - .word 2867 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 24000 - .word 45256 - .word 2834 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51496 - .word 57396 - .word 2804 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11538 - .word 46256 - .word 2774 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36802 - .word 48020 - .word 2743 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57910 - .word 57903 - .word 2712 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47484 - .word 48798 - .word 2680 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 57766 - .word 57709 - .word 2650 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54064 - .word 47856 - .word 2619 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49340 - .word 48080 - .word 2588 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36454 - .word 56731 - .word 2557 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51548 - .word 63385 - .word 2526 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56000 - .word 48716 - .word 2490 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 44992 - .word 50040 - .word 2460 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43136 - .word 58177 - .word 2430 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49730 - .word 33270 - .word 2402 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 29808 - .word 51063 - .word 2371 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25276 - .word 46724 - .word 2339 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17324 - .word 35928 - .word 2308 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52284 - .word 63916 - .word 2278 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5414 - .word 46704 - .word 2247 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51710 - .word 57168 - .word 2216 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27366 - .word 49253 - .word 2185 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 45332 - .word 53033 - .word 2154 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 54152 - .word 37418 - .word 2121 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53076 - .word 47398 - .word 2092 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 14374 - .word 59477 - .word 2061 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59336 - .word 33435 - .word 2029 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21612 - .word 43267 - .word 1999 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34664 - .word 39372 - .word 1966 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 172 - .word 62761 - .word 1936 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9816 - .word 40715 - .word 1905 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65116 - .word 40481 - .word 1875 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28066 - .word 39184 - .word 1844 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37408 - .word 63923 - .word 1813 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15760 - .word 42305 - .word 1782 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 28236 - .word 59340 - .word 1750 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43258 - .word 59402 - .word 1720 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19988 - .word 50087 - .word 1689 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63456 - .word 47833 - .word 1655 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 65184 - .word 61426 - .word 1626 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52982 - .word 48456 - .word 1596 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30020 - .word 62809 - .word 1564 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9096 - .word 63061 - .word 1533 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59648 - .word 44374 - .word 1499 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11456 - .word 33847 - .word 1470 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 12392 - .word 50500 - .word 1440 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 56432 - .word 59196 - .word 1408 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61008 - .word 40265 - .word 1377 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37842 - .word 33270 - .word 1348 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 37916 - .word 44543 - .word 1316 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11490 - .word 36421 - .word 1286 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19040 - .word 38397 - .word 1254 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 31224 - .word 47162 - .word 1224 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 52056 - .word 41461 - .word 1192 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 10810 - .word 56374 - .word 1162 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 5358 - .word 35086 - .word 1131 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 36640 - .word 50226 - .word 1096 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33856 - .word 45597 - .word 1067 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21552 - .word 63128 - .word 1036 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1198 - .word 35616 - .word 1007 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 1232 - .word 59506 - .word 976 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 51086 - .word 34963 - .word 945 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 3960 - .word 39061 - .word 912 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 4564 - .word 57134 - .word 882 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 59468 - .word 35285 - .word 852 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 63422 - .word 35431 - .word 821 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38352 - .word 51462 - .word 790 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 25806 - .word 55660 - .word 759 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 38842 - .word 41327 - .word 728 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 17980 - .word 50458 - .word 697 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 61194 - .word 59710 - .word 666 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21098 - .word 42086 - .word 635 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 16704 - .word 43341 - .word 602 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 46316 - .word 52840 - .word 573 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20386 - .word 33936 - .word 542 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20064 - .word 51864 - .word 509 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 2268 - .word 57500 - .word 479 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 11152 - .word 51171 - .word 449 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 23164 - .word 63727 - .word 417 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 20514 - .word 40280 - .word 387 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 21818 - .word 57922 - .word 356 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32366 - .word 46413 - .word 325 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 53972 - .word 43148 - .word 294 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 30134 - .word 65133 - .word 263 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 15282 - .word 61516 - .word 232 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 49872 - .word 49222 - .word 200 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 9484 - .word 63958 - .word 170 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 47028 - .word 35341 - .word 139 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 6770 - .word 58613 - .word 108 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 33372 - .word 43448 - .word 77 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 27792 - .word 51629 - .word 43 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 19712 - .word 53691 - .word 15 - .word 0 - .word 0 - .word 0 - .type _4OPI,@object - .size _4OPI,8512 - .space 192, 0x00 # pad - .align 2 -_ADDING: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16446 - .word 0 - .word 0 - .word 0 - .type _ADDING,@object - .size _ADDING,16 - .align 2 -_nonel_value: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .type _nonel_value,@object - .size _nonel_value,16 - .align 2 -_PC: - .word 23996 - .word 61276 - .word 60076 - .word 54715 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 29541 - .word 45883 - .word 23690 - .word 51658 - .word 49114 - .word 0 - .word 0 - .word 0 - .word 41007 - .word 30189 - .word 50933 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 11013 - .word 35124 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 13032 - .word 3304 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 45630 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .type _PC,@object - .size _PC,128 - .align 2 -_ponel_value: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _ponel_value,@object - .size _ponel_value,16 - .align 2 -_PS: - .word 25 - .word 22807 - .word 53737 - .word 51452 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 54536 - .word 42444 - .word 58524 - .word 55101 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 63911 - .word 27722 - .word 12213 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 3718 - .word 18986 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 10480 - .word 46680 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 12958 - .word 3329 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 35030 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _PS,@object - .size _PS,128 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosd_table.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosd_table.S deleted file mode 100644 index 369422e4b4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosd_table.S +++ /dev/null @@ -1,767 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincosd_table.c" - .section .rodata, "a" - .align 16 - .align 16 - .globl __libm_sindl_cosdl_table -__libm_sindl_cosdl_table: - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 730455326 - .long 1066524427 - .long 1746175880 - .long 1010139981 - .long 2549460874 - .long 1072692928 - .long 4286585365 - .long 3162605893 - .long 3388464167 - .long 1067572824 - .long 3405773388 - .long 1011262106 - .long 2025784679 - .long 1072691970 - .long 3458349249 - .long 3162669794 - .long 1223674126 - .long 1068157895 - .long 1350368814 - .long 3158420169 - .long 3977438749 - .long 1072690373 - .long 2138672104 - .long 1015504988 - .long 1835684136 - .long 1068620687 - .long 3698316769 - .long 3158223757 - .long 1903230966 - .long 1072688139 - .long 1549185311 - .long 1015860439 - .long 3099754755 - .long 1068912598 - .long 85775068 - .long 3160181596 - .long 3021477282 - .long 1072685267 - .long 1009168830 - .long 3161309439 - .long 2604423020 - .long 1069204064 - .long 2303648607 - .long 1009017464 - .long 2499307462 - .long 1072681759 - .long 1081812731 - .long 1015750919 - .long 1280271059 - .long 1069494996 - .long 1784430238 - .long 1012342196 - .long 631389835 - .long 1072677616 - .long 319889322 - .long 1015931913 - .long 2525863449 - .long 1069666412 - .long 3319430370 - .long 1012720668 - .long 2838533242 - .long 1072672838 - .long 3931096191 - .long 3163228296 - .long 1739084661 - .long 1069811211 - .long 266127812 - .long 1005440081 - .long 2486166620 - .long 1072667428 - .long 1862034983 - .long 3163124964 - .long 2114679690 - .long 1069955610 - .long 1043937223 - .long 3160884320 - .long 2357271575 - .long 1072661387 - .long 1809738197 - .long 1015448300 - .long 3715523151 - .long 1070099565 - .long 3282620278 - .long 1013092107 - .long 1765324482 - .long 1072654717 - .long 2731192352 - .long 3162086677 - .long 2890029302 - .long 1070243033 - .long 2223107338 - .long 3159965253 - .long 846856320 - .long 1072647420 - .long 116450415 - .long 3163379753 - .long 919455349 - .long 1070385970 - .long 2064618035 - .long 3159935516 - .long 558794511 - .long 1072639498 - .long 1424282741 - .long 3161718678 - .long 4075075869 - .long 1070528331 - .long 3748620424 - .long 3160490968 - .long 2675554853 - .long 1072630953 - .long 3840651826 - .long 3156703495 - .long 3247638160 - .long 1070633085 - .long 3696489768 - .long 1014652612 - .long 1195949845 - .long 1072621789 - .long 1259393923 - .long 3162332067 - .long 3711077929 - .long 1070703626 - .long 3146917124 - .long 1014611084 - .long 3814620032 - .long 1072612007 - .long 3070837564 - .long 3162674392 - .long 3481523655 - .long 1070773815 - .long 2713761655 - .long 1014001377 - .long 1853610783 - .long 1072601612 - .long 3649998803 - .long 1015704482 - .long 925886800 - .long 1070843631 - .long 436010265 - .long 3162460259 - .long 323245311 - .long 1072590606 - .long 3093873492 - .long 1015519453 - .long 3489713627 - .long 1070913051 - .long 528334979 - .long 1014764117 - .long 738112715 - .long 1072578992 - .long 334349375 - .long 3162809522 - .long 1955204085 - .long 1070982056 - .long 1689242582 - .long 1014445850 - .long 1112681756 - .long 1072566774 - .long 1734695380 - .long 3163113281 - .long 533648188 - .long 1071050624 - .long 3960375553 - .long 1012377538 - .long 251639813 - .long 1072553956 - .long 3380683078 - .long 1012638586 - .long 4008023681 - .long 1071118733 - .long 570275026 - .long 1014484594 - .long 2039991128 - .long 1072540541 - .long 1062999797 - .long 3162182390 - .long 580452267 - .long 1071186365 - .long 3449718872 - .long 3161633148 - .long 2553046639 - .long 1072526534 - .long 2419472295 - .long 3163244343 - .long 554048209 - .long 1071253497 - .long 2399772791 - .long 3156410517 - .long 2935979925 - .long 1072511939 - .long 1428602113 - .long 1015064920 - .long 2000132179 - .long 1071320109 - .long 2171125689 - .long 3159852223 - .long 808310631 - .long 1072496761 - .long 4227501583 - .long 1014931887 - .long 3669886408 - .long 1071386181 - .long 3536165134 - .long 1013933230 - .long 3142990026 - .long 1072481003 - .long 4101727212 - .long 3163150444 - .long 725933569 - .long 1071451694 - .long 522349177 - .long 3161311953 - .long 490548333 - .long 1072464672 - .long 2395907389 - .long 3162833649 - .long 1948536952 - .long 1071516626 - .long 320619183 - .long 1014863857 - .long 1332553480 - .long 1072447771 - .long 3321840403 - .long 3163208850 - .long 3991904492 - .long 1071580958 - .long 2374541978 - .long 1014892768 - .long 2010331591 - .long 1072430306 - .long 1428309641 - .long 3163418034 - .long 0 - .long 1071644672 - .long 0 - .long 0 - .long 3898100906 - .long 1072412282 - .long 3501572579 - .long 1015868565 - .long 553508627 - .long 1071676209 - .long 3116078237 - .long 1016033865 - .long 511109854 - .long 1072393706 - .long 3227708102 - .long 3163199948 - .long 1051516202 - .long 1071707417 - .long 2823792103 - .long 1015984420 - .long 3268258117 - .long 1072374581 - .long 893580578 - .long 1013933326 - .long 3614471965 - .long 1071738286 - .long 2346555295 - .long 3158494963 - .long 2829987804 - .long 1072354915 - .long 4086147764 - .long 3161968777 - .long 2215771410 - .long 1071768808 - .long 2812627676 - .long 1015346091 - .long 3450400421 - .long 1072334713 - .long 2241324349 - .long 3163087632 - .long 4168894840 - .long 1071798972 - .long 555969416 - .long 1015775320 - .long 1494583111 - .long 1072313982 - .long 92043893 - .long 3160700658 - .long 74799710 - .long 1071828771 - .long 2770520589 - .long 3160558553 - .long 2610427048 - .long 1072292727 - .long 436010265 - .long 3162460259 - .long 2488647350 - .long 1071858193 - .long 3884027735 - .long 1013773085 - .long 245529108 - .long 1072270956 - .long 3304882442 - .long 1014213155 - .long 2982005049 - .long 1071887231 - .long 3980032926 - .long 3161177863 - .long 1408525265 - .long 1072248674 - .long 1201054953 - .long 1015994881 - .long 2219342526 - .long 1071915876 - .long 3430823751 - .long 3163318748 - .long 890610472 - .long 1072225889 - .long 1982309908 - .long 3162056199 - .long 1379669533 - .long 1071944119 - .long 3329850390 - .long 3162839200 - .long 2731495481 - .long 1072202607 - .long 1347545148 - .long 1014567853 - .long 2167951316 - .long 1071971951 - .long 2070879930 - .long 1013227818 - .long 3030457399 - .long 1072178836 - .long 162525240 - .long 3161624810 - .long 2531396568 - .long 1071999364 - .long 4091857862 - .long 3162202094 - .long 2821963458 - .long 1072154583 - .long 1545337900 - .long 3160735078 - .long 965516331 - .long 1072026350 - .long 156922899 - .long 1014731144 - .long 3771230594 - .long 1072129855 - .long 3521184819 - .long 1014696396 - .long 820015888 - .long 1072052900 - .long 2191736501 - .long 1015202773 - .long 3869592889 - .long 1072104660 - .long 2133682458 - .long 3163440098 - .long 1719614413 - .long 1072079006 - .long 330458198 - .long 3163282740 - .long 1719614413 - .long 1072079006 - .long 330458198 - .long 3163282740 - .long 3869592889 - .long 1072104660 - .long 2133682458 - .long 3163440098 - .long 820015888 - .long 1072052900 - .long 2191736501 - .long 1015202773 - .long 3771230594 - .long 1072129855 - .long 3521184819 - .long 1014696396 - .long 965516331 - .long 1072026350 - .long 156922899 - .long 1014731144 - .long 2821963458 - .long 1072154583 - .long 1545337900 - .long 3160735078 - .long 2531396568 - .long 1071999364 - .long 4091857862 - .long 3162202094 - .long 3030457399 - .long 1072178836 - .long 162525240 - .long 3161624810 - .long 2167951316 - .long 1071971951 - .long 2070879930 - .long 1013227818 - .long 2731495481 - .long 1072202607 - .long 1347545148 - .long 1014567853 - .long 1379669533 - .long 1071944119 - .long 3329850390 - .long 3162839200 - .long 890610472 - .long 1072225889 - .long 1982309908 - .long 3162056199 - .long 2219342526 - .long 1071915876 - .long 3430823751 - .long 3163318748 - .long 1408525265 - .long 1072248674 - .long 1201054953 - .long 1015994881 - .long 2982005049 - .long 1071887231 - .long 3980032926 - .long 3161177863 - .long 245529108 - .long 1072270956 - .long 3304882442 - .long 1014213155 - .long 2488647350 - .long 1071858193 - .long 3884027735 - .long 1013773085 - .long 2610427048 - .long 1072292727 - .long 436010265 - .long 3162460259 - .long 74799710 - .long 1071828771 - .long 2770520589 - .long 3160558553 - .long 1494583111 - .long 1072313982 - .long 92043893 - .long 3160700658 - .long 4168894840 - .long 1071798972 - .long 555969416 - .long 1015775320 - .long 3450400421 - .long 1072334713 - .long 2241324349 - .long 3163087632 - .long 2215771410 - .long 1071768808 - .long 2812627676 - .long 1015346091 - .long 2829987804 - .long 1072354915 - .long 4086147764 - .long 3161968777 - .long 3614471965 - .long 1071738286 - .long 2346555295 - .long 3158494963 - .long 3268258117 - .long 1072374581 - .long 893580578 - .long 1013933326 - .long 1051516202 - .long 1071707417 - .long 2823792103 - .long 1015984420 - .long 511109854 - .long 1072393706 - .long 3227708102 - .long 3163199948 - .long 553508627 - .long 1071676209 - .long 3116078237 - .long 1016033865 - .long 3898100906 - .long 1072412282 - .long 3501572579 - .long 1015868565 - .long 0 - .long 1071644672 - .long 0 - .long 0 - .long 2010331591 - .long 1072430306 - .long 1428309641 - .long 3163418034 - .long 3991904492 - .long 1071580958 - .long 2374541978 - .long 1014892768 - .long 1332553480 - .long 1072447771 - .long 3321840403 - .long 3163208850 - .long 1948536952 - .long 1071516626 - .long 320619183 - .long 1014863857 - .long 490548333 - .long 1072464672 - .long 2395907389 - .long 3162833649 - .long 725933569 - .long 1071451694 - .long 522349177 - .long 3161311953 - .long 3142990026 - .long 1072481003 - .long 4101727212 - .long 3163150444 - .long 3669886408 - .long 1071386181 - .long 3536165134 - .long 1013933230 - .long 808310631 - .long 1072496761 - .long 4227501583 - .long 1014931887 - .long 2000132179 - .long 1071320109 - .long 2171125689 - .long 3159852223 - .long 2935979925 - .long 1072511939 - .long 1428602113 - .long 1015064920 - .long 554048209 - .long 1071253497 - .long 2399772791 - .long 3156410517 - .long 2553046639 - .long 1072526534 - .long 2419472295 - .long 3163244343 - .long 580452267 - .long 1071186365 - .long 3449718872 - .long 3161633148 - .long 2039991128 - .long 1072540541 - .long 1062999797 - .long 3162182390 - .long 4008023681 - .long 1071118733 - .long 570275026 - .long 1014484594 - .long 251639813 - .long 1072553956 - .long 3380683078 - .long 1012638586 - .long 533648188 - .long 1071050624 - .long 3960375553 - .long 1012377538 - .long 1112681756 - .long 1072566774 - .long 1734695380 - .long 3163113281 - .long 1955204085 - .long 1070982056 - .long 1689242582 - .long 1014445850 - .long 738112715 - .long 1072578992 - .long 334349375 - .long 3162809522 - .long 3489713627 - .long 1070913051 - .long 528334979 - .long 1014764117 - .long 323245311 - .long 1072590606 - .long 3093873492 - .long 1015519453 - .long 925886800 - .long 1070843631 - .long 436010265 - .long 3162460259 - .long 1853610783 - .long 1072601612 - .long 3649998803 - .long 1015704482 - .long 3481523655 - .long 1070773815 - .long 2713761655 - .long 1014001377 - .long 3814620032 - .long 1072612007 - .long 3070837564 - .long 3162674392 - .long 3711077929 - .long 1070703626 - .long 3146917124 - .long 1014611084 - .long 1195949845 - .long 1072621789 - .long 1259393923 - .long 3162332067 - .long 3247638160 - .long 1070633085 - .long 3696489768 - .long 1014652612 - .long 2675554853 - .long 1072630953 - .long 3840651826 - .long 3156703495 - .long 4075075869 - .long 1070528331 - .long 3748620424 - .long 3160490968 - .long 558794511 - .long 1072639498 - .long 1424282741 - .long 3161718678 - .long 919455349 - .long 1070385970 - .long 2064618035 - .long 3159935516 - .long 846856320 - .long 1072647420 - .long 116450415 - .long 3163379753 - .long 2890029302 - .long 1070243033 - .long 2223107338 - .long 3159965253 - .long 1765324482 - .long 1072654717 - .long 2731192352 - .long 3162086677 - .long 3715523151 - .long 1070099565 - .long 3282620278 - .long 1013092107 - .long 2357271575 - .long 1072661387 - .long 1809738197 - .long 1015448300 - .long 2114679690 - .long 1069955610 - .long 1043937223 - .long 3160884320 - .long 2486166620 - .long 1072667428 - .long 1862034983 - .long 3163124964 - .long 1739084661 - .long 1069811211 - .long 266127812 - .long 1005440081 - .long 2838533242 - .long 1072672838 - .long 3931096191 - .long 3163228296 - .long 2525863449 - .long 1069666412 - .long 3319430370 - .long 1012720668 - .long 631389835 - .long 1072677616 - .long 319889322 - .long 1015931913 - .long 1280271059 - .long 1069494996 - .long 1784430238 - .long 1012342196 - .long 2499307462 - .long 1072681759 - .long 1081812731 - .long 1015750919 - .long 2604423020 - .long 1069204064 - .long 2303648607 - .long 1009017464 - .long 3021477282 - .long 1072685267 - .long 1009168830 - .long 3161309439 - .long 3099754755 - .long 1068912598 - .long 85775068 - .long 3160181596 - .long 1903230966 - .long 1072688139 - .long 1549185311 - .long 1015860439 - .long 1835684136 - .long 1068620687 - .long 3698316769 - .long 3158223757 - .long 3977438749 - .long 1072690373 - .long 2138672104 - .long 1015504988 - .long 1223674126 - .long 1068157895 - .long 1350368814 - .long 3158420169 - .long 2025784679 - .long 1072691970 - .long 3458349249 - .long 3162669794 - .long 3388464167 - .long 1067572824 - .long 3405773388 - .long 1011262106 - .long 2549460874 - .long 1072692928 - .long 4286585365 - .long 3162605893 - .long 730455326 - .long 1066524427 - .long 1746175880 - .long 1010139981 - .type __libm_sindl_cosdl_table,@object - .size __libm_sindl_cosdl_table,2880 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosf_gen.S deleted file mode 100644 index cce988fef3..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosf_gen.S +++ /dev/null @@ -1,531 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincosf_gen.c" - .text -..TXTST0: -# -- Begin sincosf - .text - .align 16,0x90 - .globl sincosf -sincosf: -# parameter 1: %xmm0 -# parameter 2: %rdi -# parameter 3: %rsi -..B1.1: - .cfi_startproc -..___tag_value_sincosf.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 - movq %rdi, (%rsp) - movq %rsi, 8(%rsp) -..B1.2: - pextrw $1, %xmm0, %eax - andw $32767, %ax - subw $128, %ax - cmpw $17791, %ax - ja .L_2TAG_PACKET_0.0.1 - movq PI_32_RECIP(%rip), %xmm1 - mulss %xmm0, %xmm1 - movapd BIT_31(%rip), %xmm3 - cvtss2si %xmm1, %edx - movl %edx, %ecx - andpd %xmm0, %xmm3 - cvtss2sd %xmm0, %xmm0 - movlhps %xmm0, %xmm0 - addss SHIFTER(%rip), %xmm1 - subss SHIFTER(%rip), %xmm1 - movapd %xmm3, %xmm4 - psllq $32, %xmm3 - psllq $29, %xmm4 - xorpd %xmm4, %xmm3 - addl $1865216, %edx - shll $4, %edx - addl $1865232, %ecx - shll $4, %ecx - movq P_1(%rip), %xmm2 - xorpd %xmm3, %xmm2 - xorpd P_2(%rip), %xmm3 - movlhps %xmm2, %xmm2 - movlhps %xmm3, %xmm3 - lea Ctable(%rip), %rax - andq $1008, %rdx - andq $1008, %rcx - addq %rax, %rcx - addq %rdx, %rax - psllq $29, %xmm1 - movlhps %xmm1, %xmm1 - mulpd %xmm1, %xmm2 - mulpd %xmm1, %xmm3 - subpd %xmm2, %xmm0 - addpd %xmm0, %xmm3 - mulpd %xmm0, %xmm0 - movapd C_1(%rip), %xmm4 - movapd S_1(%rip), %xmm5 - movapd ONE(%rip), %xmm1 - mulpd %xmm0, %xmm4 - mulpd %xmm0, %xmm5 - movapd C_2(%rip), %xmm6 - movapd S_2(%rip), %xmm7 - mulpd %xmm0, %xmm0 - addpd %xmm1, %xmm4 - mulpd %xmm0, %xmm6 - addpd %xmm1, %xmm5 - mulpd %xmm0, %xmm7 - addpd %xmm6, %xmm4 - addpd %xmm7, %xmm5 - movq (%rax), %xmm2 - movq 8(%rax), %xmm1 - movhpd (%rcx), %xmm2 - movhpd 8(%rcx), %xmm1 - mulpd %xmm1, %xmm3 - mulpd %xmm4, %xmm2 - mulpd %xmm5, %xmm3 - addpd %xmm3, %xmm2 - cvtpd2ps %xmm2, %xmm0 - movq (%rsp), %rax - movss %xmm0, (%rax) - movq 8(%rsp), %rax - pshufd $1, %xmm0, %xmm0 - movss %xmm0, (%rax) - jmp ..B1.7 -.L_2TAG_PACKET_0.0.1: - jg .L_2TAG_PACKET_1.0.1 - cvtss2sd %xmm0, %xmm0 - movq ONE(%rip), %xmm1 - movq %xmm0, %xmm2 - mulsd ONE_M230(%rip), %xmm0 - mulsd %xmm2, %xmm2 - subsd %xmm2, %xmm1 - cvtsd2ss %xmm0, %xmm0 - cvtsd2ss %xmm1, %xmm1 - movq (%rsp), %rax - movss %xmm0, (%rax) - movq 8(%rsp), %rax - movss %xmm1, (%rax) - jmp ..B1.7 -.L_2TAG_PACKET_1.0.1: - movd %xmm0, %eax - andl $2139095040, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_2.0.1 - cvtss2sd %xmm0, %xmm0 - movq %xmm0, 16(%rsp) -..B1.3: - movsd 16(%rsp), %xmm0 -..___tag_value_sincosf.4: - call __libm_sse2_sincos@PLT -..___tag_value_sincosf.5: -..B1.4: - movsd %xmm0, 24(%rsp) -..B1.5: - movq 24(%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - cvtsd2ss %xmm1, %xmm1 - movq (%rsp), %rax - movss %xmm0, (%rax) - movq 8(%rsp), %rax - movss %xmm1, (%rax) - jmp ..B1.7 -.L_2TAG_PACKET_2.0.1: - pxor %xmm1, %xmm1 - mulss %xmm1, %xmm0 - movq (%rsp), %rax - movss %xmm0, (%rax) - movq 8(%rsp), %rax - movss %xmm0, (%rax) -.L_2TAG_PACKET_3.0.1: -..B1.7: - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type sincosf,@function - .size sincosf,.-sincosf - .data -# -- End sincosf - .section .rodata, "a" - .align 16 - .align 16 -BIT_31: - .long 2147483648 - .long 0 - .long 0 - .long 0 - .type BIT_31,@object - .size BIT_31,16 - .align 16 -P_1: - .long 1413758976 - .long 2008621563 - .type P_1,@object - .size P_1,8 - .space 8, 0x00 # pad - .align 16 -P_2: - .long 1734816687 - .long 1966270393 - .type P_2,@object - .size P_2,8 - .space 8, 0x00 # pad - .align 16 -Ctable: - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 1072683149 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 1072652951 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 1072602945 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 1072533611 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 1072445618 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 1072339814 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 1072217216 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 1072079006 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 1071926515 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 1071761211 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 1071524701 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 1071152610 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 1070765062 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 1070135480 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 1069094822 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 2748392742 - .long 1072683149 - .long 3156849708 - .long 3216578470 - .long 3489094832 - .long 1072652951 - .long 1013556747 - .long 3217619128 - .long 1455828442 - .long 1072602945 - .long 785751814 - .long 3218248710 - .long 3476196678 - .long 1072533611 - .long 2796464483 - .long 3218636258 - .long 4051746225 - .long 1072445618 - .long 939980347 - .long 3219008349 - .long 688824739 - .long 1072339814 - .long 967731400 - .long 3219244859 - .long 1796544321 - .long 1072217216 - .long 621354454 - .long 3219410163 - .long 1719614413 - .long 1072079006 - .long 1719614413 - .long 3219562654 - .long 621354454 - .long 1071926515 - .long 1796544321 - .long 3219700864 - .long 967731400 - .long 1071761211 - .long 688824739 - .long 3219823462 - .long 939980347 - .long 1071524701 - .long 4051746225 - .long 3219929266 - .long 2796464483 - .long 1071152610 - .long 3476196678 - .long 3220017259 - .long 785751814 - .long 1070765062 - .long 1455828442 - .long 3220086593 - .long 1013556747 - .long 1070135480 - .long 3489094832 - .long 3220136599 - .long 3156849708 - .long 1069094822 - .long 2748392742 - .long 3220166797 - .long 0 - .long 0 - .long 0 - .long 3220176896 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 3220166797 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 3220136599 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 3220086593 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 3220017259 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 3219929266 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 3219823462 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 3219700864 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 3219562654 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 3219410163 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 3219244859 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 3219008349 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 3218636258 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 3218248710 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 3217619128 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 3216578470 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 2748392742 - .long 3220166797 - .long 3156849708 - .long 1069094822 - .long 3489094832 - .long 3220136599 - .long 1013556747 - .long 1070135480 - .long 1455828442 - .long 3220086593 - .long 785751814 - .long 1070765062 - .long 3476196678 - .long 3220017259 - .long 2796464483 - .long 1071152610 - .long 4051746225 - .long 3219929266 - .long 939980347 - .long 1071524701 - .long 688824739 - .long 3219823462 - .long 967731400 - .long 1071761211 - .long 1796544321 - .long 3219700864 - .long 621354454 - .long 1071926515 - .long 1719614413 - .long 3219562654 - .long 1719614413 - .long 1072079006 - .long 621354454 - .long 3219410163 - .long 1796544321 - .long 1072217216 - .long 967731400 - .long 3219244859 - .long 688824739 - .long 1072339814 - .long 939980347 - .long 3219008349 - .long 4051746225 - .long 1072445618 - .long 2796464483 - .long 3218636258 - .long 3476196678 - .long 1072533611 - .long 785751814 - .long 3218248710 - .long 1455828442 - .long 1072602945 - .long 1013556747 - .long 3217619128 - .long 3489094832 - .long 1072652951 - .long 3156849708 - .long 3216578470 - .long 2748392742 - .long 1072683149 - .type Ctable,@object - .size Ctable,1024 - .align 16 -C_1: - .long 0 - .long 3219128320 - .long 0 - .long 3219128320 - .type C_1,@object - .size C_1,16 - .align 16 -S_1: - .long 1431655765 - .long 3217380693 - .long 1431655765 - .long 3217380693 - .type S_1,@object - .size S_1,16 - .align 16 -ONE: - .long 0 - .long 1072693248 - .long 0 - .long 1072693248 - .type ONE,@object - .size ONE,16 - .align 16 -C_2: - .long 1431655765 - .long 1067799893 - .long 1431655765 - .long 1067799893 - .type C_2,@object - .size C_2,16 - .align 16 -S_2: - .long 286331153 - .long 1065423121 - .long 286331153 - .long 1065423121 - .type S_2,@object - .size S_2,16 - .align 8 -PI_32_RECIP: - .long 1092811139 - .long 0 - .type PI_32_RECIP,@object - .size PI_32_RECIP,8 - .align 8 -SHIFTER: - .long 1262485504 - .type SHIFTER,@object - .size SHIFTER,4 - .space 4, 0x00 # pad - .align 8 -ONE_M230: - .long 4286578688 - .long 1072693247 - .type ONE_M230,@object - .size ONE_M230,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosl.S deleted file mode 100644 index 4fb7522bf7..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sincosl.S +++ /dev/null @@ -1,1226 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sincosl.c" - .text -..TXTST0: -# -- Begin sincosl - .text - .align 16,0x90 - .globl sincosl -sincosl: -# parameter 1: 224 + %rsp -# parameter 2: %rdi -# parameter 3: %rsi -..B1.1: - .cfi_startproc -..___tag_value_sincosl.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $176, %rsp - .cfi_def_cfa_offset 224 - movq %rsi, %r14 - movq %fs:40, %rax - movq %rdi, %r13 - xorq %rsp, %rax - xorb %r12b, %r12b - movq %rax, 168(%rsp) -..B1.2: - fnstcw 146(%rsp) -..B1.3: - movzwl 232(%rsp), %edx - andl $32767, %edx - movzwl 146(%rsp), %ecx - cmpl $32767, %edx - je ..B1.70 -..B1.4: - cmpl $16378, %edx - jge ..B1.42 -..B1.5: - cmpl $16372, %edx - jge ..B1.34 -..B1.6: - cmpl $16364, %edx - jge ..B1.26 -..B1.7: - cmpl $16308, %edx - jge ..B1.18 -..B1.8: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.12 -..B1.9: - orl $-64768, %ecx - movw %cx, 144(%rsp) -..B1.10: - fldcw 144(%rsp) -..B1.11: - movzwl 232(%rsp), %edx - movb $1, %r12b - andl $32767, %edx -..B1.12: - testl %edx, %edx - jle ..B1.59 -..B1.13: - fldt 224(%rsp) - lea _TWO_75(%rip), %rax - lea _small_value_80(%rip), %rcx - lea 8+_TWO_75(%rip), %rdx - lea _ones(%rip), %rbx - fldl (%rax) - fmul %st(1), %st - fsubp %st, %st(1) - fldt (%rcx) - fsubrl (%rbx) - fstpt 32(%rsp) - fmull (%rdx) - fstpt 16(%rsp) -..B1.14: - testb %r12b, %r12b - je ..B1.16 -..B1.15: - fldcw 146(%rsp) -..B1.16: - fldt 16(%rsp) - fstpt (%r13) - fldt 32(%rsp) - fstpt (%r14) - movq 168(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.17: - addq $176, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 224 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.18: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.22 -..B1.19: - orl $-64768, %ecx - movw %cx, 144(%rsp) -..B1.20: - fldcw 144(%rsp) -..B1.21: - movb $1, %r12b -..B1.22: - fldt 224(%rsp) - lea _SP3(%rip), %rax - lea _CP3(%rip), %rdx - lea _ones(%rip), %rcx - testb %r12b, %r12b - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - fadd %st(1), %st - fstpt 32(%rsp) - fldt (%rdx) - fmul %st(1), %st - fmulp %st, %st(1) - faddl (%rcx) - fstpt 16(%rsp) - je ..B1.24 -..B1.23: - fldcw 146(%rsp) -..B1.24: - fldt 32(%rsp) - fstpt (%r13) - fldt 16(%rsp) - fstpt (%r14) - movq 168(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.25: - addq $176, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 224 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.26: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.30 -..B1.27: - orl $-64768, %ecx - movw %cx, 144(%rsp) -..B1.28: - fldcw 144(%rsp) -..B1.29: - movb $1, %r12b -..B1.30: - fldt 224(%rsp) - lea 16+_SP2(%rip), %rax - fld %st(0) - lea _SP2(%rip), %rdx - fmul %st(1), %st - lea 16+_CP2(%rip), %rcx - fldt (%rax) - lea _CP2(%rip), %rbx - fmul %st(1), %st - lea _ones(%rip), %rbp - fldt (%rdx) - testb %r12b, %r12b - faddp %st, %st(1) - fmul %st(1), %st - fmul %st(2), %st - faddp %st, %st(2) - fxch %st(1) - fstpt 32(%rsp) - fldt (%rcx) - fmul %st(1), %st - fldt (%rbx) - faddp %st, %st(1) - fmulp %st, %st(1) - faddl (%rbp) - fstpt 16(%rsp) - je ..B1.32 -..B1.31: - fldcw 146(%rsp) -..B1.32: - fldt 32(%rsp) - fstpt (%r13) - fldt 16(%rsp) - fstpt (%r14) - movq 168(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.33: - addq $176, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 224 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.34: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.35: - orl $-64768, %ecx - movw %cx, 144(%rsp) -..B1.36: - fldcw 144(%rsp) -..B1.37: - movb $1, %r12b -..B1.38: - fldt 224(%rsp) - lea 32+_SP1(%rip), %rcx - fld %st(0) - lea _SP1(%rip), %rbx - fmul %st(1), %st - lea 48+_SP1(%rip), %rax - fld %st(0) - lea 48+_CP1(%rip), %rbp - fmul %st(1), %st - lea 16+_SP1(%rip), %rdx - fldt (%rax) - lea 16+_CP1(%rip), %rsi - fmul %st(1), %st - lea 32+_CP1(%rip), %rdi - fldt (%rdx) - lea _CP1(%rip), %r8 - lea _ones(%rip), %r9 - testb %r12b, %r12b - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - fmul %st(2), %st - fldt (%rbx) - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(3) - fxch %st(2) - fstpt 32(%rsp) - fldt (%rbp) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rdi) - fmulp %st, %st(3) - fldt (%r8) - faddp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - faddl (%r9) - fstpt 16(%rsp) - je ..B1.40 -..B1.39: - fldcw 146(%rsp) -..B1.40: - fldt 32(%rsp) - fstpt (%r13) - fldt 16(%rsp) - fstpt (%r14) - movq 168(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.41: - addq $176, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 224 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.42: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.46 -..B1.43: - orl $-64768, %ecx - movw %cx, 144(%rsp) -..B1.44: - fldcw 144(%rsp) -..B1.45: - movb $1, %r12b -..B1.46: - fldt 224(%rsp) - lea _ones(%rip), %rbp - movzbl 233(%rsp), %ebx - xorl %eax, %eax - andl $128, %ebx - shrl $7, %ebx - fmull (%rbp,%rbx,8) - fstpt 224(%rsp) - fldt 224(%rsp) - movzwl 232(%rsp), %edx - andl $32767, %edx - cmpl $16382, %edx - jge ..B1.48 -..B1.47: - lea _TWO_52H(%rip), %rcx - fld %st(0) - xorl %edx, %edx - fldl (%rcx) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fld %st(1) - fsubp %st, %st(1) - fxch %st(1) - jmp ..B1.51 -..B1.48: - je ..B1.67 -..B1.49: - addq $-16, %rsp - .cfi_def_cfa_offset 240 - xorl %edi, %edi - lea 168(%rsp), %rsi - fstpt (%rsp) -..___tag_value_sincosl.83: - call __libm_reduce_pi04l@PLT -..___tag_value_sincosl.84: -..B1.85: - movl %eax, %edx - addq $16, %rsp - .cfi_def_cfa_offset 224 -..B1.50: - fldl 152(%rsp) - lea 1(%rdx), %eax - lea _TWO_52H(%rip), %rcx - fld %st(0) - movsd 152(%rsp), %xmm0 - shrl $2, %eax - xorl %eax, %ebx - lea 3(%rdx), %eax - mulsd (%rcx), %xmm0 - andl $1, %ebx - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - shrl $2, %eax - fadd %st, %st(1) - andl $1, %eax - fsubrp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubr %st, %st(1) - fldl 160(%rsp) - faddp %st, %st(2) - fadd %st(1), %st -..B1.51: - fldt 16(%rsp) - lea 112+_SP(%rip), %rcx - fld %st(0) - lea 80+_SP(%rip), %rsi - fmul %st(3), %st - lea 48+_SP(%rip), %rdi - fxch %st(1) - fmul %st(0), %st - fld %st(0) - fld %st(1) - fxch %st(5) - fstpt 48(%rsp) - fldt 48(%rsp) - lea 128+_SP(%rip), %r9 - fmul %st(4), %st - lea 16+_SP(%rip), %r8 - lea 96+_SP(%rip), %r10 - lea 64+_SP(%rip), %r11 - movl %ebx, %ebx - incl %edx - testb $2, %dl - faddp %st, %st(3) - fld %st(2) - fxch %st(1) - fadd %st(3), %st - fmul %st, %st(1) - fxch %st(3) - fmul %st, %st(5) - fxch %st(1) - faddp %st, %st(5) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fmul %st(0), %st - fld %st(0) - fadd %st(5), %st - fxch %st(4) - fstpt 64(%rsp) - fstpt 112(%rsp) - fldt 112(%rsp) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt (%rcx) - lea 32+_SP(%rip), %rcx - fmul %st(4), %st - fldt (%rsi) - lea _SP(%rip), %rsi - faddp %st, %st(1) - fmul %st(4), %st - fldt (%rdi) - lea 160+_SP(%rip), %rdi - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r8) - lea 144+_SP(%rip), %r8 - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r9) - lea _TWO_53H(%rip), %r9 - fmul %st(5), %st - fldt (%r10) - lea 112+_CP(%rip), %r10 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r11) - lea 80+_CP(%rip), %r11 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - lea 48+_CP(%rip), %rcx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rsi) - lea 16+_CP(%rip), %rsi - faddp %st, %st(1) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(5) - fldt (%rdi) - lea 128+_CP(%rip), %rdi - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(3) - fldt (%r8) - lea 96+_CP(%rip), %r8 - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 96(%rsp) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fldl (%r9) - fstpt 128(%rsp) - fldt 128(%rsp) - lea 64+_CP(%rip), %r9 - fmul %st(1), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 48(%rsp) - fld %st(0) - fmul %st(3), %st - fldt 64(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 16(%rsp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(2) - faddp %st, %st(1) - fldt (%r10) - fmul %st(3), %st - fldt (%r11) - lea 32+_CP(%rip), %r10 - lea _CP(%rip), %r11 - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - lea 160+_CP(%rip), %rcx - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rsi) - lea 144+_CP(%rip), %rsi - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - fmul %st(4), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(4) - fldt (%r11) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt (%rcx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt (%rsi) - fldt 80(%rsp) - fmul %st(1), %st - faddp %st, %st(2) - fldt 112(%rsp) - fmulp %st, %st(4) - fldt 96(%rsp) - fmulp %st, %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fldt 128(%rsp) - fmul %st(1), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fldl (%rbp) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fldl (%rbp,%rbx,8) - fldl (%rbp,%rax,8) - je ..B1.53 -..B1.52: - fxch %st(1) - fmul %st, %st(4) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmul %st, %st(1) - fldt 32(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - fstpt 16(%rsp) - jmp ..B1.54 -..B1.53: - fldt 32(%rsp) - fmul %st(2), %st - fxch %st(4) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmul %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fstpt 16(%rsp) - fstpt 32(%rsp) -..B1.54: - testb %r12b, %r12b - je ..B1.56 -..B1.55: - fldcw 146(%rsp) -..B1.56: - fldt 16(%rsp) - fstpt (%r13) - fldt 32(%rsp) - fstpt (%r14) - movq 168(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.57: - addq $176, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 224 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.58: - call __stack_chk_fail@PLT -..B1.59: - cmpl $0, 228(%rsp) - jne ..B1.61 -..B1.60: - cmpl $0, 224(%rsp) - je ..B1.62 -..B1.61: - fldt 224(%rsp) - lea _TWO_75(%rip), %rbx - movb 233(%rsp), %al - lea _small_value_80(%rip), %rcx - andb $-128, %al - lea _ones(%rip), %rsi - lea 8+_TWO_75(%rip), %rbp - fldl (%rbx) - shrb $7, %al - fmul %st(1), %st - fsubp %st, %st(1) - fldt (%rcx) - fxch %st(1) - fmull (%rbp) - movzbl %al, %edx - shlq $4, %rdx - fstpt 16(%rsp) - fldl (%rsi) - fsub %st(1), %st - fstpt 32(%rsp) - fldt (%rcx,%rdx) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.14 -..B1.62: - fldt 224(%rsp) - lea _ones(%rip), %rax - fstpt 16(%rsp) - fldl (%rax) - fstpt 32(%rsp) - jmp ..B1.14 -..B1.67: - movl 228(%rsp), %edx - cmpl $-921707870, %edx - jb ..B1.47 -..B1.68: - jne ..B1.49 -..B1.69: - cmpl $560513589, 224(%rsp) - jbe ..B1.47 - jmp ..B1.49 -..B1.70: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.74 -..B1.71: - orl $-64768, %ecx - movw %cx, 144(%rsp) -..B1.72: - fldcw 144(%rsp) -..B1.73: - movb $1, %r12b -..B1.74: - cmpl $-2147483648, 228(%rsp) - jne ..B1.77 -..B1.75: - cmpl $0, 224(%rsp) - jne ..B1.77 -..B1.76: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fstpt 16(%rsp) - jmp ..B1.78 -..B1.77: - fldt 224(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) -..B1.78: - testb %r12b, %r12b - je ..B1.80 -..B1.79: - fldcw 146(%rsp) -..B1.80: - fldt 16(%rsp) - fstpt (%r13) - fldt (%r13) - fstpt (%r14) - movq 168(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 - jmp ..B1.17 - .align 16,0x90 - .cfi_endproc - .type sincosl,@function - .size sincosl,.-sincosl - .data -# -- End sincosl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_SP3: - .word 17476 - .word 43656 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _SP3,@object - .size _SP3,16 - .align 2 -_CP3: - .word 0 - .word 65450 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .type _CP3,@object - .size _CP3,16 - .align 2 -_SP2: - .word 43210 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 1587 - .word 57422 - .word 34932 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _SP2,@object - .size _SP2,32 - .align 2 -_CP2: - .word 63855 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 18238 - .word 17476 - .word 43656 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _CP2,@object - .size _CP2,32 - .align 2 -_SP1: - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 12518 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 43088 - .word 7396 - .word 207 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 55827 - .word 48618 - .word 3602 - .word 47342 - .word 16364 - .word 0 - .word 0 - .word 0 - .type _SP1,@object - .size _SP1,64 - .align 2 -_CP1: - .word 65535 - .word 65535 - .word 65535 - .word 65535 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 47533 - .word 43689 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 14131 - .word 49466 - .word 24756 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 37142 - .word 18013 - .word 35855 - .word 53259 - .word 16367 - .word 0 - .word 0 - .word 0 - .type _CP1,@object - .size _CP1,64 - .align 2 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _SP,@object - .size _SP,176 - .align 2 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 0 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 0 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _CP,@object - .size _CP,176 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sindl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sindl.S deleted file mode 100644 index 42958e7e65..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sindl.S +++ /dev/null @@ -1,837 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sindl.c" - .text -..TXTST0: -# -- Begin sindl - .text - .align 16,0x90 - .globl sindl -sindl: -# parameter 1: 112 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_sindl.1: -..L2: - - subq $104, %rsp - .cfi_def_cfa_offset 112 - xorb %r8b, %r8b -..B1.2: - fnstcw 90(%rsp) -..B1.3: - movzwl 90(%rsp), %edx - movl %edx, %eax - andl $3840, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - andl $-3841, %edx - orl $-64768, %edx - movw %dx, 88(%rsp) -..B1.5: - fldcw 88(%rsp) -..B1.6: - movb $1, %r8b -..B1.7: - fldt 112(%rsp) - lea ones(%rip), %rdi - movzwl 120(%rsp), %eax - movl %eax, %esi - shrl $15, %eax - andl $32767, %esi - cmpl $32767, %esi - flds (%rdi,%rax,4) - movss (%rdi,%rax,4), %xmm0 - fmul %st, %st(1) - je ..B1.32 -..B1.8: - fldt .L_2il0floatpacket.0(%rip) - fstpt 72(%rsp) - fldt 72(%rsp) - fucomip %st(2), %st - jp ..B1.9 - je ..B1.31 -..B1.9: - testl %esi, %esi - je ..B1.24 -..B1.10: - cmpl $7, %esi - fxch %st(1) - jl ..B1.25 -..B1.11: - cmpl $10783, %esi - jl ..B1.26 -..B1.12: - fstp %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - cmpl $16446, %esi - jge ..B1.17 -..B1.13: - fldt .L_2il0floatpacket.2(%rip) - lea _Rcp90(%rip), %rax - fldt 72(%rsp) - fldt (%rax) - fmulp %st, %st(3) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - fstpt 48(%rsp) - fldt 48(%rsp) - movl 48(%rsp), %ecx - movl %ecx, %edx - andl $2, %edx - fsubp %st, %st(2) - fldt 112(%rsp) - fldt .L_2il0floatpacket.3(%rip) - fmulp %st, %st(3) - shrl $1, %edx - fsubp %st, %st(2) - mulss (%rdi,%rdx,4), %xmm0 - fucomip %st(1), %st - jp ..B1.14 - je ..B1.30 -..B1.14: - fldt .L_2il0floatpacket.4(%rip) - lea _TWO_53H(%rip), %rax - fmul %st(1), %st - fld %st(1) - movss %xmm0, (%rsp) - testb $1, %cl - fsubr %st(1), %st - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fld %st(0) - fld %st(3) - fsubr %st(3), %st - fchs - fmul %st, %st(3) - fld %st(4) - fxch %st(1) - fmul %st(5), %st - faddp %st, %st(4) - fld %st(4) - fldl (%rax) - fld %st(0) - fmul %st(5), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fxch %st(3) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(5) - fxch %st(1) - fmul %st(2), %st - fld %st(5) - fadd %st(1), %st - fsubp %st, %st(1) - fsub %st, %st(1) - fxch %st(1) - fchs - fstpt 32(%rsp) - fld %st(4) - fmul %st(5), %st - fld %st(0) - fmul %st(1), %st - flds (%rsp) - fstps 64(%rsp) - je ..B1.16 -..B1.15: - fstp %st(6) - fstp %st(1) - fld %st(2) - lea 112+_cosdl_poly_coeff(%rip), %rax - fmul %st(3), %st - lea 80+_cosdl_poly_coeff(%rip), %rdx - fmul %st, %st(2) - fld %st(1) - fmul %st(5), %st - fxch %st(4) - fstpt (%rsp) - fldt (%rsp) - fld %st(2) - lea 48+_cosdl_poly_coeff(%rip), %rcx - lea 96+_cosdl_poly_coeff(%rip), %rsi - lea 64+_cosdl_poly_coeff(%rip), %rdi - lea 32+_cosdl_poly_coeff(%rip), %r9 - lea 24+_cosdl_mp_poly_coeff(%rip), %r10 - lea 8+_cosdl_mp_poly_coeff(%rip), %r11 - fmul %st(7), %st - fxch %st(1) - fmul %st(6), %st - faddp %st, %st(5) - fld %st(1) - fadd %st(4), %st - fsubp %st, %st(4) - fxch %st(3) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(1) - faddp %st, %st(3) - fldt (%rax) - fmul %st(5), %st - fldt (%rdx) - lea 16+_cosdl_mp_poly_coeff(%rip), %rax - lea _cosdl_mp_poly_coeff(%rip), %rdx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmul %st(6), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r9) - faddp %st, %st(1) - faddp %st, %st(1) - fmulp %st, %st(2) - fldl (%r10) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fldl (%r11) - fmulp %st, %st(4) - faddp %st, %st(3) - fldl (%rax) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldl (%rdx) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldt (%rsp) - fmulp %st, %st(2) - fld %st(1) - fldt 16(%rsp) - fmulp %st, %st(2) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - flds 64(%rsp) - fld %st(0) - fldt .L_2il0floatpacket.5(%rip) - fadd %st(4), %st - fmul %st, %st(1) - fldt .L_2il0floatpacket.5(%rip) - fsubp %st, %st(1) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 72(%rsp) - jmp ..B1.27 -..B1.16: - fld %st(6) - lea 128+_sindl_poly_coeff(%rip), %rax - fmul %st(2), %st - lea 96+_sindl_poly_coeff(%rip), %rdx - fstpt 16(%rsp) - lea 64+_sindl_poly_coeff(%rip), %rcx - fxch %st(2) - fstpt (%rsp) - fldt (%rsp) - lea 32+_sindl_poly_coeff(%rip), %rsi - lea 112+_sindl_poly_coeff(%rip), %rdi - lea 80+_sindl_poly_coeff(%rip), %r9 - lea 48+_sindl_poly_coeff(%rip), %r10 - lea 24+_sindl_mp_poly_coeff(%rip), %r11 - fmul %st(4), %st - fmul %st, %st(3) - fxch %st(5) - fmul %st(6), %st - fldt 32(%rsp) - fmul %st, %st(5) - fxch %st(1) - faddp %st, %st(5) - fld %st(5) - fadd %st(4), %st - fsubp %st, %st(4) - fxch %st(3) - fsubr %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - lea 8+_sindl_mp_poly_coeff(%rip), %rax - lea 16+_sindl_mp_poly_coeff(%rip), %rdx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - lea _sindl_mp_poly_coeff(%rip), %rcx - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%rdi) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 16(%rsp) - fmul %st, %st(1) - fldl (%r11) - fmulp %st, %st(1) - faddp %st, %st(1) - fldl (%rax) - fmulp %st, %st(5) - faddp %st, %st(4) - fldl (%rdx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fldl (%rcx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldt (%rsp) - fmulp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - flds 64(%rsp) - fld %st(0) - fmulp %st, %st(2) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 72(%rsp) - jmp ..B1.27 -..B1.17: - fstp %st(0) - lea -16446(%rsi), %ecx - cmpl $14, %ecx - jle ..B1.19 -..B1.18: - addl $-16449, %esi - movl $715827883, %eax - imull %esi - movl %esi, %ecx - sarl $1, %edx - sarl $31, %ecx - subl %ecx, %edx - lea (,%rdx,8), %r9d - lea (%r9,%rdx,4), %r10d - subl %r10d, %esi - lea 3(%rsi), %ecx -..B1.19: - movl 116(%rsp), %r11d - movl %r11d, %esi - shll $8, %esi - movl $381774871, %eax - movl %esi, %edx - andl $-16777216, %r11d - shrl $3, %edx - movl %r11d, %r10d - mull %edx - shrl $19, %r11d - shrl $2, %edx - imull $-360, %edx, %eax - addl %eax, %esi - movl $381774871, %eax - mull %r11d - shrl $16, %r10d - movl $381774871, %eax - shrl $2, %edx - imull $-360, %edx, %r9d - addl %r9d, %r10d - movl 112(%rsp), %r9d - addl %r10d, %esi - movl %r9d, %r10d - shrl $3, %r10d - mull %r10d - movl $-1240768329, %eax - shrl $2, %edx - imull $-360, %edx, %r11d - addl %r11d, %r9d - addl %r9d, %esi - shll %cl, %esi - imull %esi - movl %esi, %ecx - addl %esi, %edx - sarl $8, %edx - sarl $31, %ecx - subl %ecx, %edx - imull $-360, %edx, %eax - lea (%rsi,%rax), %edx - cmpl $179, %edx - lea -180(%rsi,%rax), %ecx - movl $2, %esi - movl $0, %eax - cmovg %ecx, %edx - cmovg %esi, %eax - cmpl $89, %edx - jle ..B1.21 -..B1.20: - incl %eax - addl $-90, %edx -..B1.21: - movl %edx, %ecx - orl %eax, %ecx - je ..B1.27 -..B1.22: - movl %eax, %ecx - andl $2, %eax - andl $1, %ecx - addl %ecx, %ecx - shrl $1, %eax - mulss (%rdi,%rax,4), %xmm0 - movq __libm_sindl_cosdl_table@GOTPCREL(%rip), %rdi - lea (%rcx,%rdx,4), %edx - movss %xmm0, (%rsp) - flds (%rsp) - movslq %edx, %rdx - fldl (%rdi,%rdx,8) - faddl 8(%rdi,%rdx,8) - fmulp %st, %st(1) - fstpt 72(%rsp) - jmp ..B1.27 -..B1.24: - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - testl $-1048576, 116(%rsp) - je ..B1.26 -..B1.25: - lea _TWO5600(%rip), %rax - lea _TWO_53H(%rip), %rdx - lea 8+_sindl_mp_poly_coeff(%rip), %rcx - lea _sindl_mp_poly_coeff(%rip), %rsi - lea 16+_TWO5600(%rip), %rdi - fldt (%rax) - fmulp %st, %st(1) - fld %st(0) - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fldl (%rdx) - fmul %st(1), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fldl (%rcx) - fmulp %st, %st(2) - fldl (%rsi) - fmul %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fld %st(0) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fsub %st, %st(1) - fsubp %st, %st(1) - fsub %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(1) - fldt (%rdi) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 72(%rsp) - jmp ..B1.27 -..B1.26: - lea _TWO5600(%rip), %rax - lea _TWO_53H(%rip), %rdx - lea 8+_sindl_mp_poly_coeff(%rip), %rcx - lea _sindl_mp_poly_coeff(%rip), %rsi - lea 16+_TWO5600(%rip), %rdi - fldt (%rax) - fmulp %st, %st(1) - fld %st(0) - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fldl (%rdx) - fmul %st(1), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fsubr %st(1), %st - fldl (%rcx) - fmulp %st, %st(2) - fldl (%rsi) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fld %st(0) - fxch %st(2) - fmulp %st, %st(3) - fxch %st(1) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fsub %st, %st(1) - fsubp %st, %st(1) - fsub %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(1) - faddp %st, %st(1) - fldt (%rdi) - fmulp %st, %st(1) - fstpt 72(%rsp) -..B1.27: - testb %r8b, %r8b - je ..B1.29 -..B1.28: - fldcw 90(%rsp) -..B1.29: - fldt 72(%rsp) - addq $104, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 112 -..B1.30: - fstp %st(0) - fldt 72(%rsp) - testb $1, %cl - movss %xmm0, (%rsp) - flds (%rsp) - fcmove %st(1), %st - fstp %st(1) - fstpt 72(%rsp) - jmp ..B1.27 -..B1.31: - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fmulp %st, %st(1) - fstpt 72(%rsp) - jmp ..B1.27 -..B1.32: - fstp %st(0) - fldt .L_2il0floatpacket.0(%rip) - fmul %st(1), %st - fstpt 72(%rsp) - fstpt 112(%rsp) - jmp ..B1.27 - .align 16,0x90 - .cfi_endproc - .type sindl,@function - .size sindl,.-sindl - .data -# -- End sindl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x80,0x13,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x3e,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xb4,0x05,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 16 -_cosdl_poly_coeff: - .word 52350 - .word 41213 - .word 3800 - .word 40885 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 28613 - .word 7908 - .word 35668 - .word 34008 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 19927 - .word 58728 - .word 49885 - .word 45261 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 32884 - .word 22035 - .word 23267 - .word 64541 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 36401 - .word 51897 - .word 8309 - .word 57265 - .word 49070 - .word 0 - .word 0 - .word 0 - .word 34286 - .word 2728 - .word 41564 - .word 34642 - .word 16284 - .word 0 - .word 0 - .word 0 - .word 63248 - .word 18030 - .word 35596 - .word 60796 - .word 49032 - .word 0 - .word 0 - .word 0 - .word 52149 - .word 21294 - .word 63985 - .word 40123 - .word 16245 - .word 0 - .word 0 - .word 0 - .type _cosdl_poly_coeff,@object - .size _cosdl_poly_coeff,128 - .align 16 -_cosdl_mp_poly_coeff: - .long 3675529145 - .long 3206805153 - .long 2134983071 - .long 3151100167 - .long 1787026573 - .long 1043372817 - .long 205083639 - .long 988746860 - .type _cosdl_mp_poly_coeff,@object - .size _cosdl_mp_poly_coeff,32 - .align 16 -_sindl_poly_coeff: - .word 51374 - .word 38121 - .word 13586 - .word 36602 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 50116 - .word 41339 - .word 4204 - .word 60892 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 33704 - .word 2155 - .word 42839 - .word 60780 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 21250 - .word 19076 - .word 27901 - .word 57780 - .word 49097 - .word 0 - .word 0 - .word 0 - .word 9076 - .word 49244 - .word 613 - .word 64083 - .word 16311 - .word 0 - .word 0 - .word 0 - .word 40572 - .word 30418 - .word 36251 - .word 46520 - .word 49061 - .word 0 - .word 0 - .word 0 - .word 3227 - .word 25505 - .word 5540 - .word 47626 - .word 16274 - .word 0 - .word 0 - .word 0 - .word 60933 - .word 3300 - .word 57416 - .word 36218 - .word 49023 - .word 0 - .word 0 - .word 0 - .word 45811 - .word 42646 - .word 37125 - .word 42185 - .word 16235 - .word 0 - .word 0 - .word 0 - .type _sindl_poly_coeff,@object - .size _sindl_poly_coeff,144 - .align 16 -_sindl_mp_poly_coeff: - .long 2723323193 - .long 1066524486 - .long 2863989530 - .long 1008058840 - .long 227815288 - .long 3199056770 - .long 3752327299 - .long 3142458725 - .type _sindl_mp_poly_coeff,@object - .size _sindl_mp_poly_coeff,32 - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 2 -_Rcp90: - .word 46603 - .word 2912 - .word 24758 - .word 46603 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _Rcp90,@object - .size _Rcp90,16 - .align 2 -_TWO5600: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 21983 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 10783 - .word 0 - .word 0 - .word 0 - .type _TWO5600,@object - .size _TWO5600,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinf_gen.S deleted file mode 100644 index 5e58fe229f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinf_gen.S +++ /dev/null @@ -1,543 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinf_gen.c" - .text -..TXTST0: -# -- Begin sinf - .text - .align 16,0x90 - .globl sinf -sinf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_sinf.1: -..L2: - -..B1.2: - subq $32, %rsp - .cfi_def_cfa_offset 40 - stmxcsr 8(%rsp) - cmpl $-24577, 8(%rsp) - jne .L_2TAG_PACKET_0.0.1 -.L_2TAG_PACKET_1.0.1: - pshuflw $68, %xmm0, %xmm1 - movd %xmm0, %ecx - cvtps2pd %xmm1, %xmm1 - movq $0x40445f306e000000, %rax - movd %rax, %xmm2 - movl $2147483647, %r10d - movl $1241513983, %r8d - andl %ecx, %r10d - subl %r10d, %r8d - subl $964689920, %r10d - orl %r10d, %r8d - jl .L_2TAG_PACKET_2.0.1 - movq $0x4338000000000000, %r11 - movd %r11, %xmm4 - mulsd %xmm1, %xmm2 - movq $0xbe5b1bbead603d8b, %rdx - movd %rdx, %xmm3 - movapd %xmm2, %xmm5 - addsd %xmm4, %xmm2 - movd %xmm2, %r9d - subsd %xmm4, %xmm2 - mulsd %xmm3, %xmm1 -.L_2TAG_PACKET_3.0.1: - lea Ctable(%rip), %r10 - movl $384, %eax - movq $0x40c37423899a1558, %rdx - movd %rdx, %xmm4 - subsd %xmm2, %xmm5 - addl %r9d, %r9d - movl %r9d, %r8d - sarb $7, %r9b - andl %r8d, %eax - addb %r9b, %r8b - xorb %r9b, %r8b - addsd %xmm5, %xmm1 - andl $254, %r8d - movsd (%r10,%r8,8), %xmm3 - movq $0x40a9f02f6222c720, %r11 - movd %r11, %xmm0 - movapd %xmm1, %xmm2 - unpcklpd %xmm1, %xmm2 - mulsd %xmm1, %xmm1 - movsd 8(%r10,%r8,8), %xmm5 - movl %eax, %r9d - addl $128, %r9d - andl $256, %r9d - shlq $55, %r9 - mulsd %xmm2, %xmm3 - movd %r9, %xmm2 - subsd %xmm1, %xmm0 - andl $256, %eax - shlq $55, %rax - subsd %xmm1, %xmm4 - movd %rax, %xmm1 - xorpd %xmm2, %xmm4 - mulsd %xmm5, %xmm0 - mulsd %xmm4, %xmm3 - xorpd %xmm1, %xmm0 - addsd %xmm3, %xmm0 - movl 8(%rsp), %eax - andl $-24577, %eax - cmpl 8(%rsp), %eax - jne .L_2TAG_PACKET_4.0.1 -.L_2TAG_PACKET_5.0.1: - cvtpd2ps %xmm0, %xmm0 - addq $32, %rsp - ret -.L_2TAG_PACKET_2.0.1: - andl $2147483647, %ecx - cmpl $1040187392, %ecx - ja .L_2TAG_PACKET_6.0.1 - cvtss2sd %xmm0, %xmm0 - mulsd ONE_M230(%rip), %xmm0 - movl 8(%rsp), %eax - andl $-24577, %eax - cmpl 8(%rsp), %eax - jne .L_2TAG_PACKET_4.0.1 - jmp .L_2TAG_PACKET_5.0.1 -.L_2TAG_PACKET_6.0.1: - movd %xmm0, %eax - andl $2139095040, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_7.0.1 - shrl $23, %r10d - subl $27, %r10d - andl $65528, %r10d - lea Pitable(%rip), %rax - movsd (%rax,%r10,2), %xmm3 - movsd 8(%rax,%r10,2), %xmm5 - movq $0xffffffffff000000, %r9 - movd %r9, %xmm2 - movq $0x4338000000000000, %r11 - movd %r11, %xmm4 - andpd %xmm3, %xmm2 - psllq $40, %xmm3 - mulsd %xmm1, %xmm2 - mulsd %xmm1, %xmm3 - mulsd %xmm5, %xmm1 - movapd %xmm2, %xmm0 - addsd %xmm3, %xmm2 - movapd %xmm2, %xmm5 - subsd %xmm2, %xmm0 - addsd %xmm4, %xmm2 - addsd %xmm0, %xmm3 - movd %xmm2, %r9d - subsd %xmm4, %xmm2 - addsd %xmm3, %xmm1 - jmp .L_2TAG_PACKET_3.0.1 -.L_2TAG_PACKET_7.0.1: - movl 8(%rsp), %eax - andl $-24577, %eax - cmpl 8(%rsp), %eax - je .L_2TAG_PACKET_8.0.1 - stmxcsr 16(%rsp) - movl 8(%rsp), %eax - andl $24576, %eax - orl %eax, 16(%rsp) - ldmxcsr 16(%rsp) -.L_2TAG_PACKET_8.0.1: - subss %xmm0, %xmm0 - addq $32, %rsp - ret -.L_2TAG_PACKET_0.0.1: - movl 8(%rsp), %eax - andl $-24577, %eax - movl %eax, 16(%rsp) - ldmxcsr 16(%rsp) - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_4.0.1: - stmxcsr 16(%rsp) - movl 8(%rsp), %eax - andl $24576, %eax - orl %eax, 16(%rsp) - ldmxcsr 16(%rsp) - jmp .L_2TAG_PACKET_5.0.1 - .cfi_def_cfa_offset 8 -..B1.3: - .align 16,0x90 - .cfi_endproc - .type sinf,@function - .size sinf,.-sinf - .data -# -- End sinf - .section .rodata, "a" - .align 16 - .align 16 -Ctable: - .long 3861233235 - .long 1053076412 - .long 0 - .long 0 - .long 3836476539 - .long 1053076004 - .long 1466910230 - .long 1054802127 - .long 522802171 - .long 1053074781 - .long 1693671239 - .long 1055850091 - .long 1381230637 - .long 1053072742 - .long 3419039295 - .long 1056390099 - .long 3096463640 - .long 1053069889 - .long 3054827835 - .long 1056896220 - .long 163641427 - .long 1053066225 - .long 3381119115 - .long 1057182863 - .long 2063766514 - .long 1053061750 - .long 544295963 - .long 1057434550 - .long 3193221610 - .long 1053056468 - .long 3297207428 - .long 1057685321 - .long 36665700 - .long 1053050383 - .long 2811721921 - .long 1057935027 - .long 4043704933 - .long 1053043496 - .long 2950925715 - .long 1058098350 - .long 2964703016 - .long 1053035814 - .long 2674059679 - .long 1058221912 - .long 3789723003 - .long 1053027340 - .long 879820317 - .long 1058344717 - .long 2671784286 - .long 1053018080 - .long 1979618421 - .long 1058466690 - .long 2093526290 - .long 1053008039 - .long 3945677176 - .long 1058587758 - .long 2262842797 - .long 1052997223 - .long 2796081240 - .long 1058707849 - .long 1097233945 - .long 1052985639 - .long 1373383079 - .long 1058826890 - .long 2796885356 - .long 1052973293 - .long 941816458 - .long 1058944809 - .long 646746141 - .long 1052960194 - .long 1372808103 - .long 1059061535 - .long 2767093429 - .long 1052946348 - .long 664370609 - .long 1059119379 - .long 2028347177 - .long 1052931765 - .long 1369913724 - .long 1059176444 - .long 1799297257 - .long 1052916453 - .long 3344537919 - .long 1059232808 - .long 3039475318 - .long 1052900421 - .long 2500108843 - .long 1059288438 - .long 4275292648 - .long 1052883679 - .long 944109265 - .long 1059343300 - .long 1575056534 - .long 1052866238 - .long 2771364651 - .long 1059397360 - .long 1407782048 - .long 1052848107 - .long 1264637048 - .long 1059450587 - .long 3436142021 - .long 1052829297 - .long 453708735 - .long 1059502948 - .long 488211833 - .long 1052809821 - .long 2313428161 - .long 1059554411 - .long 2993330 - .long 1052789689 - .long 2550341159 - .long 1059604946 - .long 755484892 - .long 1052767523 - .long 3567792879 - .long 1059654522 - .long 3348027550 - .long 1052724710 - .long 1659779181 - .long 1059703110 - .long 2580634211 - .long 1052680662 - .long 4268074870 - .long 1059750679 - .long 742418353 - .long 1052635405 - .long 4288148241 - .long 1059797202 - .long 3250975870 - .long 1052588965 - .long 1618129506 - .long 1059842651 - .long 1401987205 - .long 1052541372 - .long 3231311734 - .long 1059886997 - .long 2361617751 - .long 1052492653 - .long 1772140623 - .long 1059930215 - .long 3322544997 - .long 1052442838 - .long 1395127179 - .long 1059972278 - .long 17970311 - .long 1052391958 - .long 652328457 - .long 1060013161 - .long 3823857331 - .long 1052340041 - .long 1148832537 - .long 1060052839 - .long 3024934267 - .long 1052287121 - .long 3311502568 - .long 1060091288 - .long 1388494065 - .long 1052233229 - .long 1077921708 - .long 1060119411 - .long 902054988 - .long 1052178397 - .long 115411415 - .long 1060137373 - .long 1689375324 - .long 1052122658 - .long 3838419993 - .long 1060154686 - .long 1925003623 - .long 1052066046 - .long 1813501338 - .long 1060171342 - .long 2042383238 - .long 1052008595 - .long 2490283769 - .long 1060187329 - .long 350661592 - .long 1051950340 - .long 3162654741 - .long 1060202638 - .long 1535093810 - .long 1051891315 - .long 2878576948 - .long 1060217260 - .long 3681356269 - .long 1051831556 - .long 2463945945 - .long 1060231186 - .long 2478530408 - .long 1051771100 - .long 250409509 - .long 1060244408 - .long 3726787968 - .long 1051698237 - .long 687004205 - .long 1060256917 - .long 2082609563 - .long 1051574753 - .long 1475857720 - .long 1060268706 - .long 1666812989 - .long 1051450094 - .long 2181617495 - .long 1060279768 - .long 2865853451 - .long 1051324335 - .long 4249822861 - .long 1060290096 - .long 321119318 - .long 1051197553 - .long 2434209605 - .long 1060299685 - .long 4207787592 - .long 1051069822 - .long 1992674941 - .long 1060308528 - .long 1382541649 - .long 1050941222 - .long 1522351063 - .long 1060316620 - .long 2429158325 - .long 1050811828 - .long 1563320407 - .long 1060323956 - .long 2803392399 - .long 1050681719 - .long 316258674 - .long 1060330532 - .long 3917367244 - .long 1050428795 - .long 2243801771 - .long 1060336343 - .long 1991825541 - .long 1050166188 - .long 900924147 - .long 1060341387 - .long 624330694 - .long 1049902623 - .long 418831766 - .long 1060345660 - .long 3087185898 - .long 1049638258 - .long 2627920248 - .long 1060349159 - .long 3670374716 - .long 1049121932 - .long 2769466396 - .long 1060351883 - .long 3431923622 - .long 1048590963 - .long 2385983684 - .long 1060353830 - .long 918535681 - .long 1047542708 - .long 735532773 - .long 1060354999 - .long 0 - .long 0 - .long 3384690142 - .long 1060355388 - .type Ctable,@object - .size Ctable,1040 - .align 16 -Pitable: - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1832810809 - .long 1078222640 - .long 4036845384 - .long 1030771879 - .long 1916669064 - .long 1072155675 - .long 660066805 - .long 1024797180 - .long 3829231700 - .long 1062745828 - .long 2884172442 - .long 1017445907 - .long 540874025 - .long 1055617650 - .long 4198409884 - .long 1011844330 - .long 2839315448 - .long 1046639136 - .long 4204424928 - .long 1000582120 - .long 1329339431 - .long 1038229673 - .long 1295478839 - .long 993391741 - .long 658191860 - .long 1024797180 - .long 3691886121 - .long 979325773 - .long 1966800710 - .long 1020436418 - .long 1882642597 - .long 977095991 - .long 2100977488 - .long 1012908661 - .long 1840335565 - .long 967470816 - .long 4198093645 - .long 1000582120 - .long 3307942521 - .long 957055414 - .long 2839123165 - .long 996851343 - .long 1387472776 - .long 952638316 - .long 2788761024 - .long 988712873 - .long 3005712498 - .long 944467026 - .long 3694676832 - .long 979325773 - .long 1326507024 - .long 934847846 - .long 221775557 - .long 970149340 - .long 1133527550 - .long 924162364 - .type Pitable,@object - .size Pitable,240 - .align 8 -ONE_M230: - .long 4286578688 - .long 1072693247 - .type ONE_M230,@object - .size ONE_M230,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinh_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinh_gen.S deleted file mode 100644 index d584312f9c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinh_gen.S +++ /dev/null @@ -1,457 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinh_gen.c" - .text -..TXTST0: -# -- Begin sinh - .text - .align 16,0x90 - .globl sinh -sinh: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_sinh.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - movl %eax, %ecx - andl $2147483647, %ecx - cmpl $1077338037, %ecx - jae ..B1.12 -..B1.2: - cmpl $1066695393, %ecx - jae ..B1.11 -..B1.3: - cmpl $1012924416, %ecx - jae ..B1.10 -..B1.4: - shrl $31, %eax - cmpl $1048576, %ecx - jb ..B1.6 -..B1.5: - movsd .L_2il0floatpacket.13(%rip), %xmm1 - addsd %xmm0, %xmm1 - movsd %xmm1, -24(%rsp) - movsd -24(%rsp), %xmm2 - mulsd %xmm2, %xmm0 - ret -..B1.6: - movl -8(%rsp), %edx - orl %edx, %ecx - je ..B1.8 -..B1.7: - lea _small_value_64(%rip), %rdx - movsd (%rdx,%rax,8), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, -24(%rsp) - movsd -24(%rsp), %xmm0 - addsd -8(%rsp), %xmm0 - ret -..B1.8: - movsd -8(%rsp), %xmm0 -..B1.9: - ret -..B1.10: - movsd -8(%rsp), %xmm4 - movaps %xmm4, %xmm2 - mulsd %xmm4, %xmm2 - movaps %xmm2, %xmm1 - mulsd %xmm2, %xmm1 - movsd .L_2il0floatpacket.9(%rip), %xmm0 - movsd .L_2il0floatpacket.11(%rip), %xmm3 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm3 - addsd .L_2il0floatpacket.10(%rip), %xmm0 - addsd .L_2il0floatpacket.12(%rip), %xmm3 - mulsd %xmm1, %xmm0 - mulsd %xmm2, %xmm3 - addsd %xmm3, %xmm0 - mulsd %xmm4, %xmm0 - addsd %xmm4, %xmm0 - ret -..B1.11: - movsd -8(%rsp), %xmm1 - lea _TWO_52(%rip), %rdx - andps .L_2il0floatpacket.14(%rip), %xmm1 - lea _ptwo_32p1(%rip), %rsi - movsd .L_2il0floatpacket.0(%rip), %xmm2 - lea _ntwo_32p1(%rip), %rdi - mulsd %xmm1, %xmm2 - lea _two_32(%rip), %r8 - movsd .L_2il0floatpacket.1(%rip), %xmm3 - andl $-2147483648, %eax - movsd %xmm1, -8(%rsp) - movsd .L_2il0floatpacket.2(%rip), %xmm4 - movsd (%rsi), %xmm6 - movsd (%rdi), %xmm7 - movsd .L_2il0floatpacket.4(%rip), %xmm13 - movsd .L_2il0floatpacket.6(%rip), %xmm14 - movsd .L_2il0floatpacket.3(%rip), %xmm8 - movsd .L_2il0floatpacket.3(%rip), %xmm9 - addsd (%rdx), %xmm2 - movsd %xmm2, -24(%rsp) - movsd -24(%rsp), %xmm5 - movl -24(%rsp), %r10d - movl %r10d, %ecx - shll $25, %ecx - subsd (%rdx), %xmm5 - mulsd %xmm5, %xmm3 - mulsd %xmm4, %xmm5 - subsd %xmm3, %xmm1 - movaps %xmm1, %xmm10 - sarl $25, %ecx - subsd %xmm5, %xmm10 - movaps %xmm10, %xmm11 - movaps %xmm10, %xmm15 - movslq %ecx, %rcx - subsd %xmm10, %xmm1 - addsd %xmm10, %xmm6 - subsd %xmm10, %xmm7 - subsd %xmm5, %xmm1 - movsd %xmm6, -40(%rsp) - subl %ecx, %r10d - movsd %xmm7, -32(%rsp) - pxor %xmm5, %xmm5 - movsd -40(%rsp), %xmm2 - addsd %xmm1, %xmm11 - subsd (%r8), %xmm2 - movaps %xmm11, %xmm12 - addsd %xmm2, %xmm8 - mulsd %xmm11, %xmm12 - subsd %xmm8, %xmm15 - mulsd %xmm12, %xmm13 - mulsd %xmm12, %xmm14 - addsd %xmm1, %xmm15 - addsd .L_2il0floatpacket.5(%rip), %xmm13 - addsd .L_2il0floatpacket.7(%rip), %xmm14 - mulsd %xmm12, %xmm13 - mulsd %xmm12, %xmm14 - mulsd %xmm11, %xmm13 - addsd .L_2il0floatpacket.8(%rip), %xmm14 - addsd %xmm13, %xmm15 - mulsd %xmm12, %xmm14 - movsd -32(%rsp), %xmm0 - addsd %xmm14, %xmm15 - addsd (%r8), %xmm0 - shrl $7, %r10d - addsd %xmm0, %xmm9 - shll $23, %r10d - addsd %xmm9, %xmm10 - shlq $4, %rcx - lea 1056964608(%r10), %r9d - negl %r10d - orl %eax, %r9d - addl $1056964608, %r10d - addsd %xmm10, %xmm1 - orl %r10d, %eax - movl %eax, -12(%rsp) - movq __libm_exp_table_128@GOTPCREL(%rip), %rax - xorps .L_2il0floatpacket.15(%rip), %xmm1 - movl %r9d, -16(%rsp) - subsd %xmm13, %xmm1 - cvtss2sd -16(%rsp), %xmm5 - addsd %xmm14, %xmm1 - movsd 1032(%rax,%rcx), %xmm8 - movaps %xmm8, %xmm4 - mulsd %xmm15, %xmm4 - addsd %xmm2, %xmm15 - mulsd %xmm8, %xmm2 - mulsd 1024(%rax,%rcx), %xmm15 - negq %rcx - addsd %xmm15, %xmm4 - movsd 1032(%rax,%rcx), %xmm15 - movaps %xmm15, %xmm3 - mulsd %xmm1, %xmm3 - addsd %xmm0, %xmm1 - mulsd %xmm15, %xmm0 - mulsd %xmm5, %xmm4 - mulsd 1024(%rax,%rcx), %xmm1 - mulsd %xmm2, %xmm5 - addsd %xmm1, %xmm3 - pxor %xmm1, %xmm1 - cvtss2sd -12(%rsp), %xmm1 - mulsd %xmm1, %xmm3 - mulsd %xmm0, %xmm1 - subsd %xmm3, %xmm4 - movaps %xmm5, %xmm0 - subsd %xmm1, %xmm0 - subsd %xmm0, %xmm5 - subsd %xmm1, %xmm5 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm0 - ret -..B1.12: - cmpl $1082536910, %ecx - jb ..B1.18 -..B1.13: - jne ..B1.15 -..B1.14: - cmpl $-1883637635, -8(%rsp) - jbe ..B1.18 -..B1.15: - cmpl $2146435072, %ecx - jb ..B1.19 -..B1.16: - movsd -8(%rsp), %xmm0 - addsd %xmm0, %xmm0 -..B1.17: - ret -..B1.18: - movsd -8(%rsp), %xmm12 - lea _TWO_52(%rip), %rdx - andps .L_2il0floatpacket.14(%rip), %xmm12 - lea _ptwo_32p1(%rip), %rcx - movsd .L_2il0floatpacket.0(%rip), %xmm0 - lea _two_32(%rip), %rsi - mulsd %xmm12, %xmm0 - andl $-2147483648, %eax - movsd .L_2il0floatpacket.1(%rip), %xmm1 - lea _TWO_512(%rip), %r9 - movsd %xmm12, -8(%rsp) - movsd .L_2il0floatpacket.2(%rip), %xmm2 - movsd .L_2il0floatpacket.6(%rip), %xmm11 - movsd .L_2il0floatpacket.4(%rip), %xmm8 - movsd (%rcx), %xmm4 - movsd .L_2il0floatpacket.3(%rip), %xmm5 - movsd .L_2il0floatpacket.8(%rip), %xmm10 - movl $0, -16(%rsp) - addsd (%rdx), %xmm0 - movsd %xmm0, -24(%rsp) - movsd -24(%rsp), %xmm3 - movl -24(%rsp), %edi - movl %edi, %r8d - shll $25, %r8d - subsd (%rdx), %xmm3 - mulsd %xmm3, %xmm1 - mulsd %xmm2, %xmm3 - subsd %xmm1, %xmm12 - movaps %xmm12, %xmm6 - sarl $25, %r8d - subsd %xmm3, %xmm6 - movaps %xmm6, %xmm7 - subl %r8d, %edi - shrl $7, %edi - subsd %xmm6, %xmm12 - addsd %xmm6, %xmm4 - subsd %xmm3, %xmm12 - movsd %xmm4, -24(%rsp) - addsd %xmm12, %xmm7 - movaps %xmm7, %xmm9 - mulsd %xmm7, %xmm9 - mulsd %xmm9, %xmm11 - mulsd %xmm9, %xmm8 - mulsd %xmm9, %xmm10 - addsd .L_2il0floatpacket.7(%rip), %xmm11 - addsd .L_2il0floatpacket.5(%rip), %xmm8 - mulsd %xmm9, %xmm11 - mulsd %xmm7, %xmm8 - movsd -24(%rsp), %xmm0 - addsd %xmm8, %xmm11 - subsd (%rsi), %xmm0 - mulsd %xmm9, %xmm11 - addsd %xmm0, %xmm5 - addsd %xmm10, %xmm11 - subsd %xmm5, %xmm6 - shll $20, %edi - addsd %xmm6, %xmm12 - movslq %r8d, %r8 - addl $534773760, %edi - shlq $4, %r8 - orl %edi, %eax - movl %eax, -12(%rsp) - addsd %xmm11, %xmm12 - movq __libm_exp_table_128@GOTPCREL(%rip), %rax - movsd 1032(%rax,%r8), %xmm13 - movaps %xmm13, %xmm14 - mulsd %xmm12, %xmm14 - addsd %xmm0, %xmm12 - mulsd %xmm13, %xmm0 - mulsd 1024(%rax,%r8), %xmm12 - addsd %xmm12, %xmm14 - addsd %xmm14, %xmm0 - mulsd -16(%rsp), %xmm0 - mulsd (%r9), %xmm0 - ret -..B1.19: - lea _large_value_64(%rip), %rdx - shrl $31, %eax - movsd (%rdx,%rax,8), %xmm0 - mulsd (%rdx), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type sinh,@function - .size sinh,.-sinh - .data -# -- End sinh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.14: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,16 - .align 16 -.L_2il0floatpacket.15: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0xb9ff12f0,0x3ec71e39 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x111111c1,0x3f811111 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x1940cd88,0x3f2a01a0 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x55555555,0x3fc55555 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_TWO_52: - .long 0 - .long 1127219200 - .type _TWO_52,@object - .size _TWO_52,8 - .align 4 -_ptwo_32p1: - .long 1048576 - .long 1106247680 - .type _ptwo_32p1,@object - .size _ptwo_32p1,8 - .align 4 -_ntwo_32p1: - .long 4292870144 - .long 3253731327 - .type _ntwo_32p1,@object - .size _ntwo_32p1,8 - .align 4 -_two_32: - .long 0 - .long 1106247680 - .type _two_32,@object - .size _two_32,8 - .align 4 -_TWO_512: - .long 0 - .long 1609564160 - .type _TWO_512,@object - .size _TWO_512,8 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinhf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinhf_gen.S deleted file mode 100644 index 6875ce04c9..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinhf_gen.S +++ /dev/null @@ -1,365 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinhf_gen.c" - .text -..TXTST0: -# -- Begin sinhf - .text - .align 16,0x90 - .globl sinhf -sinhf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_sinhf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - movl %edx, %eax - andl $2147483647, %eax - cmpl $1107296256, %eax - jae ..B1.14 -..B1.2: - cmpl $1056964608, %eax - jae ..B1.13 -..B1.3: - cmpl $1031798784, %eax - jae ..B1.12 -..B1.4: - cmpl $838860800, %eax - jae ..B1.11 -..B1.5: - shrl $31, %edx - cmpl $8388608, %eax - jb ..B1.7 -..B1.6: - movss .L_2il0floatpacket.16(%rip), %xmm1 - addss %xmm0, %xmm1 - movss %xmm1, -16(%rsp) - ret -..B1.7: - testl %eax, %eax - je ..B1.9 -..B1.8: - lea _small_value_32(%rip), %rax - movss (%rax,%rdx,4), %xmm0 - mulss .L_2il0floatpacket.15(%rip), %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm0 - addss -8(%rsp), %xmm0 - ret -..B1.9: - movss -8(%rsp), %xmm0 -..B1.10: - ret -..B1.11: - pxor %xmm1, %xmm1 - cvtss2sd -8(%rsp), %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.13(%rip), %xmm2 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.14(%rip), %xmm2 - mulsd %xmm0, %xmm2 - mulsd %xmm1, %xmm2 - addsd %xmm1, %xmm2 - cvtsd2ss %xmm2, %xmm2 - movaps %xmm2, %xmm0 - ret -..B1.12: - pxor %xmm3, %xmm3 - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.8(%rip), %xmm4 - movsd .L_2il0floatpacket.10(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.9(%rip), %xmm4 - addsd .L_2il0floatpacket.11(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm3, %xmm4 - cvtsd2ss %xmm4, %xmm4 - movaps %xmm4, %xmm0 - ret -..B1.13: - pxor %xmm3, %xmm3 - andl $-2147483648, %edx - cvtss2sd -8(%rsp), %xmm3 - andps .L_2il0floatpacket.17(%rip), %xmm3 - pxor %xmm4, %xmm4 - movsd .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm6, %xmm6 - mulsd %xmm3, %xmm0 - movsd .L_2il0floatpacket.4(%rip), %xmm7 - movsd .L_2il0floatpacket.6(%rip), %xmm5 - addsd .L_2il0floatpacket.1(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm1 - movl -16(%rsp), %esi - movl %esi, %eax - shll $26, %eax - subss .L_2il0floatpacket.2(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - mulsd .L_2il0floatpacket.3(%rip), %xmm1 - sarl $26, %eax - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm7 - mulsd %xmm2, %xmm5 - addsd .L_2il0floatpacket.5(%rip), %xmm7 - addsd .L_2il0floatpacket.7(%rip), %xmm5 - mulsd %xmm2, %xmm7 - mulsd %xmm3, %xmm5 - addsd .L_2il0floatpacket.18(%rip), %xmm7 - movslq %eax, %rax - movaps %xmm7, %xmm0 - subl %eax, %esi - addsd %xmm5, %xmm0 - subsd %xmm5, %xmm7 - shrl $6, %esi - shll $23, %esi - shlq $3, %rax - lea 1056964608(%rsi), %ecx - negl %esi - addl $1056964608, %esi - orl %edx, %ecx - orl %esi, %edx - movl %edx, -20(%rsp) - movq __libm_expf_table_64@GOTPCREL(%rip), %rdx - movl %ecx, -24(%rsp) - cvtss2sd -24(%rsp), %xmm4 - cvtss2sd -20(%rsp), %xmm6 - mulsd 256(%rdx,%rax), %xmm0 - negq %rax - mulsd %xmm4, %xmm0 - mulsd 256(%rdx,%rax), %xmm7 - mulsd %xmm6, %xmm7 - subsd %xmm7, %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.14: - cmpl $1119016188, %eax - jbe ..B1.18 -..B1.15: - cmpl $2139095040, %eax - jb ..B1.19 -..B1.16: - movss -8(%rsp), %xmm0 - addss %xmm0, %xmm0 -..B1.17: - ret -..B1.18: - pxor %xmm3, %xmm3 - andl $-2147483648, %edx - cvtss2sd -8(%rsp), %xmm3 - andps .L_2il0floatpacket.17(%rip), %xmm3 - movsd .L_2il0floatpacket.0(%rip), %xmm0 - mulsd %xmm3, %xmm0 - movsd .L_2il0floatpacket.6(%rip), %xmm4 - movl $0, -24(%rsp) - addsd .L_2il0floatpacket.1(%rip), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm1 - movsd .L_2il0floatpacket.4(%rip), %xmm0 - movl -16(%rsp), %eax - movl %eax, %ecx - shll $26, %ecx - subss .L_2il0floatpacket.2(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - mulsd .L_2il0floatpacket.3(%rip), %xmm1 - sarl $26, %ecx - addsd %xmm1, %xmm3 - movaps %xmm3, %xmm2 - subl %ecx, %eax - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm4 - addsd .L_2il0floatpacket.5(%rip), %xmm0 - addsd .L_2il0floatpacket.7(%rip), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm3, %xmm4 - shrl $6, %eax - addsd %xmm4, %xmm0 - shll $20, %eax - addsd .L_2il0floatpacket.18(%rip), %xmm0 - addl $1071644672, %eax - movslq %ecx, %rcx - orl %eax, %edx - movl %edx, -20(%rsp) - movq __libm_expf_table_64@GOTPCREL(%rip), %rdx - mulsd 256(%rdx,%rcx,8), %xmm0 - mulsd -24(%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - ret -..B1.19: - lea _large_value_32(%rip), %rax - shrl $31, %edx - movss (%rax,%rdx,4), %xmm0 - mulss .L_2il0floatpacket.12(%rip), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type sinhf,@function - .size sinhf,.-sinhf - .data -# -- End sinhf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.17: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40571547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x41680000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.3: - .long 0xfefa39ef,0xbf862e42 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xeb78fa85,0x3fa56420 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x008d6118,0x3fe00000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xda752d4f,0x3fc55550 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0xffffe7c6,0x3fefffff - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x4bc96d7d,0x3ec749d8 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x326ed15a,0x3f811111 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0xd09557cf,0x3f2a0168 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x552ed1e2,0x3fc55555 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x1fc8e65a,0x3f8111c7 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0x4fa4d5d9,0x3fc55555 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 8 -.L_2il0floatpacket.18: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,8 - .align 4 -.L_2il0floatpacket.2: - .long 0x4b400000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.12: - .long 0x71800000 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,4 - .align 4 -.L_2il0floatpacket.15: - .long 0x0d800000 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,4 - .align 4 -.L_2il0floatpacket.16: - .long 0x3f800000 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinhl.S deleted file mode 100644 index 5aa5fd95fd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinhl.S +++ /dev/null @@ -1,960 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinhl.c" - .text -..TXTST0: -# -- Begin sinhl - .text - .align 16,0x90 - .globl sinhl -sinhl: -# parameter 1: 96 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_sinhl.1: -..L2: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - xorb %cl, %cl -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movzwl 104(%rsp), %esi - andl $32767, %esi - cmpl $16396, %esi - jge ..B1.59 -..B1.4: - cmpl $16382, %esi - jge ..B1.46 -..B1.5: - movzwl 82(%rsp), %edx - cmpl $16378, %esi - jge ..B1.39 -..B1.6: - cmpl $16373, %esi - jge ..B1.32 -..B1.7: - cmpl $16366, %esi - jge ..B1.25 -..B1.8: - cmpl $16308, %esi - jge ..B1.18 -..B1.9: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.13 -..B1.10: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.11: - fldcw 80(%rsp) -..B1.12: - movzwl 104(%rsp), %esi - movb $1, %cl - andl $32767, %esi -..B1.13: - testl %esi, %esi - jle ..B1.70 -..B1.14: - fldt 96(%rsp) - lea _TWO_75(%rip), %rax - lea 8+_TWO_75(%rip), %rdx - fldl (%rax) - fmul %st(1), %st - faddp %st, %st(1) - fmull (%rdx) - fstpt (%rsp) -..B1.15: - testb %cl, %cl - je ..B1.17 -..B1.16: - fldcw 82(%rsp) -..B1.17: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.18: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.22 -..B1.19: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.20: - fldcw 80(%rsp) -..B1.21: - movb $1, %cl -..B1.22: - fldt 96(%rsp) - lea _Q3(%rip), %rax - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.24 -..B1.23: - fldcw 82(%rsp) -..B1.24: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.25: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.26: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.27: - fldcw 80(%rsp) -..B1.28: - movb $1, %cl -..B1.29: - fldt 96(%rsp) - lea 16+_Q2(%rip), %rax - fld %st(0) - lea _Q2(%rip), %rdx - fmul %st(1), %st - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.31 -..B1.30: - fldcw 82(%rsp) -..B1.31: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.32: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.36 -..B1.33: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.34: - fldcw 80(%rsp) -..B1.35: - movb $1, %cl -..B1.36: - fldt 96(%rsp) - lea 48+_Q1(%rip), %rax - fld %st(0) - lea 32+_Q1(%rip), %rsi - fmul %st(1), %st - lea 16+_Q1(%rip), %rdx - fld %st(0) - lea _Q1(%rip), %rdi - fmul %st(1), %st - testb %cl, %cl - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.38 -..B1.37: - fldcw 82(%rsp) -..B1.38: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.39: - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.43 -..B1.40: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.41: - fldcw 80(%rsp) -..B1.42: - movb $1, %cl -..B1.43: - fldt 96(%rsp) - lea _TWO_48H(%rip), %rax - fld %st(0) - fld %st(1) - fld %st(2) - lea 112+_Q(%rip), %rsi - fmul %st(3), %st - lea 80+_Q(%rip), %rdi - fld %st(0) - lea 48+_Q(%rip), %r8 - fmul %st(1), %st - lea 16+_Q(%rip), %r9 - fldl (%rax) - lea 96+_Q(%rip), %r10 - lea 64+_Q(%rip), %r11 - lea 32+_Q(%rip), %rax - lea 128+_Q(%rip), %rdx - testb %cl, %cl - fadd %st, %st(4) - fxch %st(4) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(4) - fld %st(3) - fxch %st(3) - fsub %st(4), %st - fmul %st, %st(3) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(3) - fxch %st(4) - fstpt 48(%rsp) - fxch %st(2) - fstpt 32(%rsp) - fldt 32(%rsp) - fmul %st(0), %st - fldt (%rdx) - lea _Q(%rip), %rdx - fmul %st, %st(2) - fmulp %st, %st(1) - fldt (%rsi) - fmul %st(4), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(4), %st - fldt (%r10) - fmul %st(5), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(5) - fldt (%rdx) - faddp %st, %st(5) - fxch %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 48(%rsp) - fld %st(0) - fmul %st(3), %st - fldt 96(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldt 32(%rsp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.45 -..B1.44: - fldt 16(%rsp) - fstpt 32(%rsp) -..B1.84: - fldcw 82(%rsp) -..B1.45: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.46: - movzwl 82(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.50 -..B1.47: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.48: - fldcw 80(%rsp) -..B1.49: - movb $1, %cl -..B1.50: - fldt 96(%rsp) - lea ones(%rip), %rax - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %rdi - fldt .L_2il0floatpacket.1(%rip) - lea _TWO_32(%rip), %r8 - fldt .L_2il0floatpacket.2(%rip) - lea _TWO_32P(%rip), %r9 - movb 105(%rsp), %dl - lea 64+_P(%rip), %r10 - fldl (%rdi) - andb $-128, %dl - fldl (%r8) - lea 32+_P(%rip), %r11 - shrb $7, %dl - lea 48+_P(%rip), %rdi - fstl 16(%rsp) - movzbl %dl, %esi - lea 16+_P(%rip), %r8 - fldl (%rax,%rsi,8) - lea _P(%rip), %rsi - fmul %st, %st(6) - fxch %st(5) - fmul %st(6), %st - fadd %st(2), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fsubp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - fmulp %st, %st(2) - fxch %st(4) - fstpt 96(%rsp) - fldt 96(%rsp) - fsubp %st, %st(2) - fld %st(1) - movl 32(%rsp), %edx - fsub %st(1), %st - movsbq %dl, %rax - subl %eax, %edx - shrl $8, %edx - fxch %st(3) - fstpt 64(%rsp) - fldt 64(%rsp) - fldl (%r9) - fmul %st(4), %st - fxch %st(5) - fmulp %st, %st(4) - movzwl 104(%rsp), %r9d - fxch %st(3) - fsubrp %st, %st(4) - fld %st(3) - andl $32767, %r9d - cmpl $16387, %r9d - fxch %st(2) - fsub %st(4), %st - fsubp %st, %st(1) - fadd %st, %st(1) - fld %st(1) - fmul %st(2), %st - fldt (%r10) - fmul %st(1), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rdi) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - jle ..B1.54 -..B1.51: - addl $16350, %edx - faddp %st, %st(1) - movzwl 72(%rsp), %esi - andl $32767, %edx - andl $-32768, %esi - shlq $4, %rax - orl %edx, %esi - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - testb %cl, %cl - movw %si, 72(%rsp) - fldl 2056(%rdx,%rax) - fldl 2048(%rdx,%rax) - fld %st(0) - fmul %st(3), %st - fxch %st(3) - fadd %st(5), %st - fmul %st(2), %st - faddp %st, %st(3) - fmul %st, %st(4) - fld %st(0) - fadd %st(5), %st - fsubr %st, %st(1) - fxch %st(5) - faddp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(1) - fldt 64(%rsp) - fmul %st, %st(3) - fmulp %st, %st(1) - fldl 16(%rsp) - fmul %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - je ..B1.86 -..B1.52: - fstpt 48(%rsp) -..B1.85: - fldcw 82(%rsp) - jmp ..B1.53 -..B1.86: - fstp %st(0) -..B1.53: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.54: - je ..B1.74 -..B1.55: - fxch %st(2) - fstpt 48(%rsp) -..B1.56: - movzwl 56(%rsp), %r8d - lea 16382(%rdx), %esi - negl %edx - andl $-32768, %r8d - addl $16382, %edx - fld %st(0) - andl $32767, %edx - andl $32767, %esi - shlq $4, %rax - orl %edx, %r8d - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - fadd %st(2), %st - fxch %st(2) - fsubrp %st, %st(1) - fld %st(2) - fldl 2056(%rdx,%rax) - fldl 2048(%rdx,%rax) - negq %rax - fstpt 16(%rsp) - fldt 16(%rsp) - movzwl 72(%rsp), %edi - fadd %st(1), %st - fmulp %st, %st(4) - fld %st(4) - fmul %st(1), %st - andl $-32768, %edi - faddp %st, %st(4) - fldl 2056(%rdx,%rax) - orl %esi, %edi - fldl 2048(%rdx,%rax) - testb %cl, %cl - fld %st(0) - movw %di, 72(%rsp) - fadd %st(2), %st - fmulp %st, %st(5) - fld %st(6) - fmul %st(2), %st - movw %r8w, 56(%rsp) - fsubrp %st, %st(5) - fxch %st(4) - fstpt 32(%rsp) - fxch %st(3) - fmul %st, %st(5) - fldt 16(%rsp) - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fsub %st(5), %st - fsubr %st, %st(4) - fxch %st(5) - fsubrp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 32(%rsp) - faddp %st, %st(2) - fldt 64(%rsp) - fmul %st, %st(1) - fld %st(1) - fxch %st(4) - fmulp %st, %st(1) - fldt 48(%rsp) - fmul %st, %st(5) - fxch %st(4) - fsub %st(5), %st - fsubr %st, %st(2) - fxch %st(5) - fsubrp %st, %st(2) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - fsubrp %st, %st(2) - faddp %st, %st(1) - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.58 -..B1.57: - fldcw 82(%rsp) -..B1.58: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.59: - je ..B1.79 -..B1.60: - movzwl 82(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.64 -..B1.61: - orl $-64768, %edx - movw %dx, 80(%rsp) -..B1.62: - fldcw 80(%rsp) -..B1.63: - movzwl 104(%rsp), %esi - movb $1, %cl - andl $32767, %esi -..B1.64: - cmpl $32767, %esi - jne ..B1.66 -..B1.65: - fldt 96(%rsp) - fstpt (%rsp) - jmp ..B1.67 -..B1.66: - movb 105(%rsp), %al - lea _large_value_80(%rip), %rsi - andb $-128, %al - shrb $7, %al - fldt (%rsi) - movzbl %al, %edx - shlq $4, %rdx - fldt (%rsi,%rdx) - fmulp %st, %st(1) - fstpt (%rsp) -..B1.67: - testb %cl, %cl - je ..B1.69 -..B1.68: - fldcw 82(%rsp) -..B1.69: - fldt (%rsp) - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 -..B1.70: - cmpl $0, 100(%rsp) - jne ..B1.72 -..B1.71: - cmpl $0, 96(%rsp) - je ..B1.73 -..B1.72: - fldt 96(%rsp) - lea _small_value_80(%rip), %rsi - movb 105(%rsp), %al - andb $-128, %al - shrb $7, %al - fldt (%rsi) - movzbl %al, %edx - shlq $4, %rdx - fldt (%rsi,%rdx) - fmulp %st, %st(1) - fstpt 32(%rsp) - fldt 32(%rsp) - faddp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.73: - fldt 96(%rsp) - fstpt (%rsp) - jmp ..B1.15 -..B1.74: - movl 100(%rsp), %esi - cmpl $-782985146, %esi - ja ..B1.51 -..B1.75: - jne ..B1.55 -..B1.76: - cmpl $1501741449, 96(%rsp) - ja ..B1.51 - jmp ..B1.55 -..B1.79: - movl 100(%rsp), %eax - cmpl $-1317741120, %eax - jb ..B1.4 -..B1.80: - jne ..B1.60 -..B1.81: - cmpl $833536233, 96(%rsp) - jbe ..B1.4 - jmp ..B1.60 - .align 16,0x90 - .cfi_endproc - .type sinhl,@function - .size sinhl,.-sinhl - .data -# -- End sinhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 2 -_Q3: - .word 21845 - .word 44373 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 29491 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 1838 - .word 3745 - .word 35050 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 56472 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 6470 - .word 8609 - .word 207 - .word 53261 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 51515 - .word 9159 - .word 10794 - .word 47344 - .word 16364 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 43620 - .word 43690 - .word 43690 - .word 43690 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 52382 - .word 3328 - .word 208 - .word 53261 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 44665 - .word 46658 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 15678 - .word 35942 - .word 11071 - .word 55090 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 10412 - .word 23121 - .word 12507 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 37213 - .word 41879 - .word 65084 - .word 55102 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 1721 - .word 42148 - .word 19309 - .word 52099 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,144 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,80 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinl.S deleted file mode 100644 index eb9b79a4a8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sinl.S +++ /dev/null @@ -1,1048 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sinl.c" - .text -..TXTST0: -# -- Begin sinl - .text - .align 16,0x90 - .globl sinl -sinl: -# parameter 1: 192 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_sinl.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %rbx - .cfi_def_cfa_offset 24 - .cfi_offset 3, -24 - pushq %rbp - .cfi_def_cfa_offset 32 - .cfi_offset 6, -32 - subq $160, %rsp - .cfi_def_cfa_offset 192 - xorb %r12b, %r12b - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 152(%rsp) -..B1.2: - fnstcw 130(%rsp) -..B1.3: - movzwl 200(%rsp), %edx - andl $32767, %edx - movzwl 130(%rsp), %ecx - cmpl $32767, %edx - je ..B1.70 -..B1.4: - cmpl $16378, %edx - jge ..B1.42 -..B1.5: - cmpl $16372, %edx - jge ..B1.34 -..B1.6: - cmpl $16364, %edx - jge ..B1.26 -..B1.7: - cmpl $16308, %edx - jge ..B1.18 -..B1.8: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.12 -..B1.9: - orl $-64768, %ecx - movw %cx, 128(%rsp) -..B1.10: - fldcw 128(%rsp) -..B1.11: - movzwl 200(%rsp), %edx - movb $1, %r12b - andl $32767, %edx -..B1.12: - testl %edx, %edx - jle ..B1.59 -..B1.13: - fldt 192(%rsp) - lea _TWO_75(%rip), %rax - lea 8+_TWO_75(%rip), %rdx - fldl (%rax) - fmul %st(1), %st - fsubp %st, %st(1) - fmull (%rdx) - fstpt 16(%rsp) -..B1.14: - testb %r12b, %r12b - je ..B1.16 -..B1.15: - fldcw 130(%rsp) -..B1.16: - movq 152(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.17: - fldt 16(%rsp) - addq $160, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 12, -16 -..B1.18: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.22 -..B1.19: - orl $-64768, %ecx - movw %cx, 128(%rsp) -..B1.20: - fldcw 128(%rsp) -..B1.21: - movb $1, %r12b -..B1.22: - fldt 192(%rsp) - lea _SP3(%rip), %rax - testb %r12b, %r12b - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.24 -..B1.23: - fldcw 130(%rsp) -..B1.24: - movq 152(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.25: - fldt 16(%rsp) - addq $160, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 12, -16 -..B1.26: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.30 -..B1.27: - orl $-64768, %ecx - movw %cx, 128(%rsp) -..B1.28: - fldcw 128(%rsp) -..B1.29: - movb $1, %r12b -..B1.30: - fldt 192(%rsp) - lea 16+_SP2(%rip), %rax - fld %st(0) - lea _SP2(%rip), %rdx - fmul %st(1), %st - testb %r12b, %r12b - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.32 -..B1.31: - fldcw 130(%rsp) -..B1.32: - movq 152(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.33: - fldt 16(%rsp) - addq $160, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 12, -16 -..B1.34: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.38 -..B1.35: - orl $-64768, %ecx - movw %cx, 128(%rsp) -..B1.36: - fldcw 128(%rsp) -..B1.37: - movb $1, %r12b -..B1.38: - fldt 192(%rsp) - lea 48+_SP1(%rip), %rax - fld %st(0) - lea 32+_SP1(%rip), %rcx - fmul %st(1), %st - lea 16+_SP1(%rip), %rdx - fld %st(0) - lea _SP1(%rip), %rbx - fmul %st(1), %st - testb %r12b, %r12b - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - fmulp %st, %st(2) - fldt (%rbx) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.40 -..B1.39: - fldcw 130(%rsp) -..B1.40: - movq 152(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.41: - fldt 16(%rsp) - addq $160, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 12, -16 -..B1.42: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.46 -..B1.43: - orl $-64768, %ecx - movw %cx, 128(%rsp) -..B1.44: - fldcw 128(%rsp) -..B1.45: - movzwl 200(%rsp), %edx - movb $1, %r12b - andl $32767, %edx -..B1.46: - cmpl $16382, %edx - jge ..B1.48 -..B1.47: - fldt 192(%rsp) - xorl %ecx, %ecx - movb 201(%rsp), %bpl - lea _TWO_52H(%rip), %rdx - andb $-128, %bpl - shrb $7, %bpl - fldl (%rdx) - movzbl %bpl, %eax - lea _ones(%rip), %rbp - fldl (%rbp,%rax,8) - fmul %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fxch %st(1) - fstpt 16(%rsp) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(1) - fld %st(0) - fsubr %st(2), %st - fxch %st(2) - fstpt 192(%rsp) - fldt 192(%rsp) - jmp ..B1.51 -..B1.48: - je ..B1.67 -..B1.49: - fldt 192(%rsp) - lea _ones(%rip), %rbp - movzbl 201(%rsp), %ebx - xorl %edi, %edi - andl $128, %ebx - shrl $7, %ebx - fmull (%rbp,%rbx,8) - fstpt 192(%rsp) - fldt 192(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 208 - lea 152(%rsp), %rsi - fstpt (%rsp) -..___tag_value_sinl.55: - call __libm_reduce_pi04l@PLT -..___tag_value_sinl.56: -..B1.85: - movl %eax, %ecx - addq $16, %rsp - .cfi_def_cfa_offset 192 -..B1.50: - fldl 136(%rsp) - lea 1(%rcx), %eax - lea _TWO_52H(%rip), %rdx - fld %st(0) - movsd 136(%rsp), %xmm0 - shrl $2, %eax - xorl %eax, %ebx - mulsd (%rdx), %xmm0 - andl $1, %ebx - fldl (%rbp,%rbx,8) - movsd %xmm0, 32(%rsp) - fstpt 16(%rsp) - fldl 32(%rsp) - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(1) - fldl 144(%rsp) - faddp %st, %st(2) - fld %st(0) - fadd %st(2), %st -..B1.51: - fld %st(1) - lea _TWO_53H(%rip), %rax - fmul %st(3), %st - fld %st(3) - fmul %st(2), %st - incl %ecx - faddp %st, %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fld %st(2) - fmul %st(3), %st - testb $2, %cl - fld %st(0) - fadd %st(2), %st - fstpt 80(%rsp) - fldt 80(%rsp) - fld %st(1) - fmul %st(3), %st - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fmul %st(0), %st - fld %st(0) - faddp %st, %st(2) - fldl (%rax) - fstpt 48(%rsp) - je ..B1.53 -..B1.52: - fstp %st(2) - fstp %st(2) - fstp %st(2) - lea 128+_CP(%rip), %rsi - lea 112+_CP(%rip), %rax - lea 96+_CP(%rip), %rdi - lea 80+_CP(%rip), %rdx - lea 64+_CP(%rip), %r8 - lea 48+_CP(%rip), %rcx - lea 32+_CP(%rip), %r9 - lea 16+_CP(%rip), %rbx - fldt (%rax) - lea _CP(%rip), %r10 - lea 160+_CP(%rip), %r11 - lea 144+_CP(%rip), %rax - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rbx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rsi) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r10) - faddp %st, %st(2) - fldt 80(%rsp) - fmulp %st, %st(2) - faddp %st, %st(1) - fldt 96(%rsp) - fldt 64(%rsp) - fldt 112(%rsp) - fldt 48(%rsp) - fldt (%r11) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(5) - fxch %st(3) - fmulp %st, %st(5) - fldt (%rax) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(5) - fld %st(4) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fadd %st(2), %st - fmul %st, %st(1) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldl (%rbp) - fadd %st, %st(1) - fsub %st(1), %st - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 16(%rsp) - fmul %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fstpt 32(%rsp) - jmp ..B1.54 -..B1.53: - lea 112+_SP(%rip), %rax - lea 80+_SP(%rip), %rdx - lea 48+_SP(%rip), %rcx - lea 128+_SP(%rip), %rbp - lea 16+_SP(%rip), %rbx - lea 96+_SP(%rip), %rsi - lea 64+_SP(%rip), %rdi - lea 32+_SP(%rip), %r8 - fldt (%rax) - lea _SP(%rip), %r9 - lea 160+_SP(%rip), %r10 - lea 144+_SP(%rip), %r11 - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rbx) - faddp %st, %st(1) - fmul %st(2), %st - fldt (%rbp) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%r9) - faddp %st, %st(3) - fldt 80(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - fldt 96(%rsp) - fldt 64(%rsp) - fldt (%r10) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - fmulp %st, %st(2) - fldt (%r11) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldt 112(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fld %st(5) - fldt 48(%rsp) - fmul %st(2), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(3) - fmul %st(1), %st - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fldt 16(%rsp) - fmul %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 32(%rsp) -..B1.54: - testb %r12b, %r12b - je ..B1.56 -..B1.55: - fldcw 130(%rsp) -..B1.56: - movq 152(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.57: - fldt 32(%rsp) - addq $160, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 192 - .cfi_offset 3, -24 - .cfi_offset 6, -32 - .cfi_offset 12, -16 -..B1.58: - call __stack_chk_fail@PLT -..B1.59: - cmpl $0, 196(%rsp) - jne ..B1.61 -..B1.60: - cmpl $0, 192(%rsp) - je ..B1.62 -..B1.61: - fldt 192(%rsp) - lea _TWO_75(%rip), %rbx - movb 201(%rsp), %al - lea _small_value_80(%rip), %rcx - andb $-128, %al - lea 8+_TWO_75(%rip), %rbp - shrb $7, %al - fldl (%rbx) - fmul %st(1), %st - fsubp %st, %st(1) - fldt (%rcx) - fxch %st(1) - fmull (%rbp) - movzbl %al, %edx - shlq $4, %rdx - fstpt 16(%rsp) - fldt (%rcx,%rdx) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.14 -..B1.62: - fldt 192(%rsp) - fstpt 16(%rsp) - jmp ..B1.14 -..B1.67: - movl 196(%rsp), %eax - cmpl $-921707870, %eax - jb ..B1.47 -..B1.68: - jne ..B1.49 -..B1.69: - cmpl $560513589, 192(%rsp) - jbe ..B1.47 - jmp ..B1.49 -..B1.70: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.74 -..B1.71: - orl $-64768, %ecx - movw %cx, 128(%rsp) -..B1.72: - fldcw 128(%rsp) -..B1.73: - movb $1, %r12b -..B1.74: - cmpl $-2147483648, 196(%rsp) - jne ..B1.77 -..B1.75: - cmpl $0, 192(%rsp) - jne ..B1.77 -..B1.76: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fstpt 16(%rsp) - jmp ..B1.78 -..B1.77: - fldt 192(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) -..B1.78: - testb %r12b, %r12b - je ..B1.80 -..B1.79: - fldcw 130(%rsp) -..B1.80: - movq 152(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.58 -..B1.81: - fldt 16(%rsp) - addq $160, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 24 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type sinl,@function - .size sinl,.-sinl - .data -# -- End sinl - .section .rodata, "a" - .align 4 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 2 -_SP3: - .word 17476 - .word 43656 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _SP3,@object - .size _SP3,16 - .align 2 -_SP2: - .word 43210 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 1587 - .word 57422 - .word 34932 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _SP2,@object - .size _SP2,32 - .align 2 -_SP1: - .word 43690 - .word 43690 - .word 43690 - .word 43690 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 12518 - .word 34952 - .word 34952 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 43088 - .word 7396 - .word 207 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 55827 - .word 48618 - .word 3602 - .word 47342 - .word 16364 - .word 0 - .word 0 - .word 0 - .type _SP1,@object - .size _SP1,64 - .align 2 -_CP: - .word 51631 - .word 16464 - .word 16497 - .word 44012 - .word 16306 - .word 0 - .word 0 - .word 0 - .word 43685 - .word 43690 - .word 43690 - .word 43690 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 46557 - .word 2912 - .word 24758 - .word 46603 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 28380 - .word 3328 - .word 208 - .word 53261 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 23816 - .word 50302 - .word 32187 - .word 37874 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 49866 - .word 64527 - .word 51070 - .word 36726 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 65056 - .word 3638 - .word 41889 - .word 51659 - .word 49114 - .word 0 - .word 0 - .word 0 - .word 13834 - .word 11317 - .word 33607 - .word 55101 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 40709 - .word 42374 - .word 64411 - .word 45709 - .word 49098 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43008 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _CP,@object - .size _CP,176 - .align 2 -_SP: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 34948 - .word 34952 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 53243 - .word 3328 - .word 208 - .word 53261 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 30577 - .word 46649 - .word 7466 - .word 47343 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 11760 - .word 43464 - .word 11071 - .word 55090 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 47000 - .word 43232 - .word 12444 - .word 45202 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 52983 - .word 47009 - .word 40440 - .word 55103 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 35433 - .word 14927 - .word 40941 - .word 51860 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 1340 - .word 16361 - .word 50747 - .word 38523 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _SP,@object - .size _SP,176 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrt.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrt.S deleted file mode 100644 index ca5b6693cf..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrt.S +++ /dev/null @@ -1,80 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sqrt.c" - .text -..TXTST0: -# -- Begin sqrt - .text - .align 16,0x90 - .globl sqrt -sqrt: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_sqrt.1: -..L2: - - pushq %rsi - .cfi_def_cfa_offset 16 -..B1.2: - movq %xmm0, %xmm2 - xorpd %xmm1, %xmm1 - sqrtsd %xmm0, %xmm0 - ucomisd %xmm1, %xmm2 - jae ..B1.5 - jp ..B1.5 - movq %xmm0, (%rsp) -..B1.3: - movq (%rsp), %xmm0 -.L_2TAG_PACKET_0.0.2: -..B1.5: - popq %rcx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type sqrt,@function - .size sqrt,.-sqrt - .data -# -- End sqrt - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrt_tab_t.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrt_tab_t.S deleted file mode 100644 index 64efaa5b42..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrt_tab_t.S +++ /dev/null @@ -1,815 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sqrt_tab_t.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __sqrt_t_table -__sqrt_t_table: - .long 0x400672f9 - .long 0xc060f4f5 - .long 0xba659415,0x40052c06 - .long 0x4003de5a - .long 0xc05e5b2f - .long 0xfe66c797,0x4005170e - .long 0x40015b59 - .long 0xc05bce24 - .long 0x13b32f30,0x40050255 - .long 0x3ffdd2b8 - .long 0xc0594d7e - .long 0xdae79d26,0x4004edd7 - .long 0x3ff90fa1 - .long 0xc056d8e8 - .long 0x13220f7f,0x4004d996 - .long 0x3ff46c51 - .long 0xc0547012 - .long 0xb3fa6a49,0x4004c58e - .long 0x3fefe7bb - .long 0xc05212ae - .long 0xa20bcbc6,0x4004b1c0 - .long 0x3feb80db - .long 0xc04fc070 - .long 0xc76937e4,0x40049e2a - .long 0x3fe736b7 - .long 0xc04d790f - .long 0x1f93d776,0x40048acc - .long 0x3fe30860 - .long 0xc04b3c44 - .long 0xa15ae4b0,0x400477a3 - .long 0x3fdef4f0 - .long 0xc04909cc - .long 0x697f4726,0x400464b0 - .long 0x3fdafb8a - .long 0xc046e163 - .long 0x6403b289,0x400451f1 - .long 0x3fd71b59 - .long 0xc044c2ca - .long 0xb7aecc11,0x40043f65 - .long 0x3fd35392 - .long 0xc042adc3 - .long 0x76dd1156,0x40042d0c - .long 0x3fcfa371 - .long 0xc040a213 - .long 0xd01983f9,0x40041ae4 - .long 0x3fcc0a37 - .long 0xc03e9f7d - .long 0xbecf4a2b,0x400408ed - .long 0x3fc88730 - .long 0xc03ca5ca - .long 0x7b0eeed7,0x4003f726 - .long 0x3fc519ad - .long 0xc03ab4c5 - .long 0x50846ea3,0x4003e58e - .long 0x3fc1c105 - .long 0xc038cc36 - .long 0x3decb5a1,0x4003d424 - .long 0x3fbe7c97 - .long 0xc036ebed - .long 0xb2048812,0x4003c2e7 - .long 0x3fbb4bc6 - .long 0xc03513b5 - .long 0xb29c9700,0x4003b1d7 - .long 0x3fb82dfc - .long 0xc0334360 - .long 0xa89c0a0a,0x4003a0f3 - .long 0x3fb522a8 - .long 0xc0317abe - .long 0xc440fe15,0x4003903a - .long 0x3fb2293e - .long 0xc02fb9a2 - .long 0x596206ff,0x40037fac - .long 0x3faf4138 - .long 0xc02dffe0 - .long 0xb44972f3,0x40036f47 - .long 0x3fac6a14 - .long 0xc02c4d4c - .long 0x1107001d,0x40035f0c - .long 0x3fa9a354 - .long 0xc02aa1be - .long 0xe7c62025,0x40034ef8 - .long 0x3fa6ec80 - .long 0xc028fd0d - .long 0x815ec2da,0x40033f0d - .long 0x3fa44523 - .long 0xc0275f11 - .long 0x2e0b0c0e,0x40032f49 - .long 0x3fa1accc - .long 0xc025c7a5 - .long 0x66b9f8b6,0x40031fab - .long 0x3f9f230f - .long 0xc02436a3 - .long 0x788665c8,0x40031033 - .long 0x3f9ca783 - .long 0xc022abe8 - .long 0xded1e594,0x400300e0 - .long 0x3f9a39c2 - .long 0xc0212751 - .long 0x0842a075,0x4002f1b3 - .long 0x3f97d96b - .long 0xc01fa8bb - .long 0x494fbc25,0x4002e2a9 - .long 0x3f95861f - .long 0xc01e3006 - .long 0x2b018f07,0x4002d3c3 - .long 0x3f933f82 - .long 0xc01cbd11 - .long 0x142c8510,0x4002c500 - .long 0x3f91053c - .long 0xc01b4fbd - .long 0x7f1daa26,0x4002b65f - .long 0x3f8ed6f7 - .long 0xc019e7eb - .long 0xdda5e7e2,0x4002a7e0 - .long 0x3f8cb461 - .long 0xc018857f - .long 0xc9948908,0x40029983 - .long 0x3f8a9d2a - .long 0xc017285b - .long 0xaa59eeeb,0x40028b47 - .long 0x3f889104 - .long 0xc015d062 - .long 0xf2821162,0x40027d2b - .long 0x3f868fa5 - .long 0xc0147d7c - .long 0x669445ed,0x40026f30 - .long 0x3f8498c3 - .long 0xc0132f8a - .long 0x3b85fad8,0x40026154 - .long 0x3f82ac1a - .long 0xc011e676 - .long 0x3e988364,0x40025397 - .long 0x3f80c964 - .long 0xc010a224 - .long 0xcf7601fc,0x400245f8 - .long 0x3f7de0c1 - .long 0xc00f627e - .long 0xaab7acb5,0x40023878 - .long 0x3f7a419f - .long 0xc00e276a - .long 0x36aab17c,0x40022b16 - .long 0x3f76b4e6 - .long 0xc00cf0d1 - .long 0x0f2aa54c,0x40021dd1 - .long 0x3f733a1e - .long 0xc00bbe9d - .long 0xdacdcc1a,0x400210a8 - .long 0x3f6fd0d4 - .long 0xc00a90b8 - .long 0x30e54b08,0x4002039d - .long 0x3f6c7897 - .long 0xc009670b - .long 0x8e05e1b3,0x4001f6ad - .long 0x3f6930fa - .long 0xc0084182 - .long 0xa51b1d74,0x4001e9d9 - .long 0x3f65f994 - .long 0xc0072009 - .long 0x1cf6297b,0x4001dd21 - .long 0x3f62d1fe - .long 0xc006028b - .long 0x8103f9e2,0x4001d083 - .long 0x3f5fb9d5 - .long 0xc004e8f5 - .long 0x7cc51dba,0x4001c400 - .long 0x3f5cb0b7 - .long 0xc003d333 - .long 0xa3e7f161,0x4001b797 - .long 0x3f59b649 - .long 0xc002c134 - .long 0xb4f86544,0x4001ab48 - .long 0x3f56ca2e - .long 0xc001b2e5 - .long 0x4bc09f7e,0x40019f13 - .long 0x3f53ec0f - .long 0xc000a834 - .long 0x04a8d6a9,0x400192f7 - .long 0x3f511b96 - .long 0xbfff4221 - .long 0x9d5a7e63,0x400186f3 - .long 0x3f4e5870 - .long 0xbffd3ad2 - .long 0xb211c804,0x40017b08 - .long 0x3f4ba24c - .long 0xbffb3a5b - .long 0xfc173425,0x40016f35 - .long 0x3f48f8dc - .long 0xbff9409b - .long 0x1e599490,0x4001637b - .long 0x3f465bd5 - .long 0xbff74d73 - .long 0xc880b659,0x400157d7 - .long 0x3f43caeb - .long 0xbff560c5 - .long 0xbd156bcf,0x40014c4b - .long 0x3f4145d7 - .long 0xbff37a71 - .long 0x9283ab1d,0x400140d6 - .long 0x3f3ecc53 - .long 0xbff19a5c - .long 0x19073c6b,0x40013578 - .long 0x3f3c5e1c - .long 0xbfefc069 - .long 0xfd4a0663,0x40012a2f - .long 0x3f39faef - .long 0xbfedec7b - .long 0xede7b908,0x40011efd - .long 0x3f37a28c - .long 0xbfec1e78 - .long 0xb252b4d7,0x400113e1 - .long 0x3f3554b6 - .long 0xbfea5645 - .long 0xf9904832,0x400108da - .long 0x3f33112e - .long 0xbfe893c7 - .long 0x7e150822,0x4000fde9 - .long 0x3f30d7ba - .long 0xbfe6d6e5 - .long 0xfd1a5086,0x4000f30c - .long 0x3f2ea821 - .long 0xbfe51f87 - .long 0x3d632fc4,0x4000e845 - .long 0x3f2c822c - .long 0xbfe36d94 - .long 0xf11c7d33,0x4000dd91 - .long 0x3f2a65a2 - .long 0xbfe1c0f3 - .long 0xd61ea754,0x4000d2f2 - .long 0x3f285250 - .long 0xbfe0198f - .long 0xc0d51627,0x4000c867 - .long 0x3f264803 - .long 0xbfde7750 - .long 0x61244ec6,0x4000bdf0 - .long 0x3f244687 - .long 0xbfdcda1f - .long 0x7a6b2e99,0x4000b38c - .long 0x3f224dad - .long 0xbfdb41e7 - .long 0xd19f4764,0x4000a93b - .long 0x3f205d44 - .long 0xbfd9ae92 - .long 0x2ad2e77d,0x40009efe - .long 0x3f1e751f - .long 0xbfd8200d - .long 0x5dbcaf97,0x400094d3 - .long 0x3f1c9510 - .long 0xbfd69641 - .long 0x14b04d5e,0x40008abb - .long 0x3f1abcec - .long 0xbfd5111c - .long 0x2cda2e67,0x400080b5 - .long 0x3f18ec88 - .long 0xbfd3908a - .long 0x6ab42acc,0x400076c1 - .long 0x3f1723ba - .long 0xbfd21477 - .long 0x8e9d45e3,0x40006cdf - .long 0x3f156259 - .long 0xbfd09cd0 - .long 0x62171386,0x4000630f - .long 0x3f13a83e - .long 0xbfcf2984 - .long 0xbfb6fb6a,0x40005950 - .long 0x3f11f542 - .long 0xbfcdba80 - .long 0x68a7e5f7,0x40004fa3 - .long 0x3f104940 - .long 0xbfcc4fb3 - .long 0x2ef38d27,0x40004607 - .long 0x3f0ea414 - .long 0xbfcae90c - .long 0xe03435f5,0x40003c7b - .long 0x3f0d0598 - .long 0xbfc98678 - .long 0x3b99fee4,0x40003301 - .long 0x3f0b6dab - .long 0xbfc827e9 - .long 0x28d4ef26,0x40002997 - .long 0x3f09dc2b - .long 0xbfc6cd4e - .long 0x6d906b03,0x4000203d - .long 0x3f0850f6 - .long 0xbfc57696 - .long 0xd0880103,0x400016f3 - .long 0x3f06cbec - .long 0xbfc423b3 - .long 0x37509185,0x40000dba - .long 0x3f054cee - .long 0xbfc2d495 - .long 0x66ce8c53,0x40000490 - .long 0x3f03d3dc - .long 0xbfc1892d - .long 0x72279bc0,0x3ffff6ec - .long 0x3f026099 - .long 0xbfc0416c - .long 0xeda5cd81,0x3fffe4d6 - .long 0x3f00f308 - .long 0xbfbefd45 - .long 0x0c012834,0x3fffd2e0 - .long 0x3eff1616 - .long 0xbfbdbca8 - .long 0x52f75b3b,0x3fffc107 - .long 0x3efc510e - .long 0xbfbc7f88 - .long 0x799a7f94,0x3fffaf4c - .long 0x3ef996c2 - .long 0xbfbb45d9 - .long 0x55edcc30,0x3fff9daf - .long 0x3ef6e6fb - .long 0xbfba0f8b - .long 0x537eb099,0x3fff8c2f - .long 0x3ef44186 - .long 0xbfb8dc92 - .long 0x38cd722f,0x3fff7acc - .long 0x3ef1a631 - .long 0xbfb7ace2 - .long 0xc800858f,0x3fff6985 - .long 0x3eef14c9 - .long 0xbfb6806e - .long 0xaed5086e,0x3fff585b - .long 0x3eec8d1e - .long 0xbfb55729 - .long 0x88bfcc7e,0x3fff474d - .long 0x3eea0f02 - .long 0xbfb43109 - .long 0x3db0d3c5,0x3fff365b - .long 0x3ee79a45 - .long 0xbfb30e00 - .long 0x4f3507e4,0x3fff2584 - .long 0x3ee52ebb - .long 0xbfb1ee03 - .long 0x7dab64e4,0x3fff14c8 - .long 0x3ee2cc37 - .long 0xbfb0d107 - .long 0x9247f5f1,0x3fff0427 - .long 0x3ee0728f - .long 0xbfafb700 - .long 0x252987ab,0x3ffef3a1 - .long 0x3ede2198 - .long 0xbfae9fe4 - .long 0x12fb7286,0x3ffee335 - .long 0x3edbd929 - .long 0xbfad8ba8 - .long 0x0e1fbfd6,0x3ffed2e3 - .long 0x3ed9991a - .long 0xbfac7a41 - .long 0xc33c7a14,0x3ffec2aa - .long 0x3ed76144 - .long 0xbfab6ba5 - .long 0xf7968902,0x3ffeb28b - .long 0x3ed53180 - .long 0xbfaa5fca - .long 0x72271f31,0x3ffea286 - .long 0x3ed309a8 - .long 0xbfa956a6 - .long 0xf446dfa2,0x3ffe9299 - .long 0x3ed0e998 - .long 0xbfa8502f - .long 0x31fc7113,0x3ffe82c6 - .long 0x3eced12c - .long 0xbfa74c5a - .long 0xc17a77a1,0x3ffe730a - .long 0x3eccc040 - .long 0xbfa64b20 - .long 0xb683d568,0x3ffe6367 - .long 0x3ecab6b3 - .long 0xbfa54c76 - .long 0x93851ebf,0x3ffe53dc - .long 0x3ec8b462 - .long 0xbfa45054 - .long 0x48e8d2d8,0x3ffe4469 - .long 0x3ec6b92d - .long 0xbfa356b0 - .long 0x72ed724b,0x3ffe350d - .long 0x3ec4c4f3 - .long 0xbfa25f82 - .long 0xf5acec61,0x3ffe25c8 - .long 0x3ec2d795 - .long 0xbfa16ac0 - .long 0x67c5c2c3,0x3ffe169b - .long 0x3ec0f0f5 - .long 0xbfa07864 - .long 0xd8265439,0x3ffe0784 - .long 0x3fbe23c8 - .long 0xc01f118b - .long 0x1ec5a532,0x3ffdf113 - .long 0x3fba7d85 - .long 0xc01d3ac5 - .long 0x0000d4c8,0x3ffdd36c - .long 0x3fb6f02d - .long 0xc01b6d00 - .long 0x57cb9031,0x3ffdb61c - .long 0x3fb37ae5 - .long 0xc019a7fe - .long 0x72ed1c77,0x3ffd9922 - .long 0x3fb01cdd - .long 0xc017eb83 - .long 0x95b0b15c,0x3ffd7c7c - .long 0x3facd54f - .long 0xc0163758 - .long 0x6603fec1,0x3ffd6029 - .long 0x3fa9a37b - .long 0xc0148b45 - .long 0x469777ae,0x3ffd4427 - .long 0x3fa686a9 - .long 0xc012e714 - .long 0xa71adcce,0x3ffd2874 - .long 0x3fa37e28 - .long 0xc0114a91 - .long 0x0c38599d,0x3ffd0d10 - .long 0x3fa08950 - .long 0xc00fb58a - .long 0xfc8f14cb,0x3ffcf1f7 - .long 0x3f9da77d - .long 0xc00e27d0 - .long 0x5027d5b6,0x3ffcd72b - .long 0x3f9ad814 - .long 0xc00ca133 - .long 0x77f69e05,0x3ffcbca8 - .long 0x3f981a7f - .long 0xc00b2187 - .long 0x4e14c785,0x3ffca26e - .long 0x3f956e2d - .long 0xc009a89f - .long 0x67cdb787,0x3ffc887b - .long 0x3f92d292 - .long 0xc0083650 - .long 0x7d1a45e5,0x3ffc6ece - .long 0x3f90472b - .long 0xc006ca73 - .long 0x887296e4,0x3ffc5566 - .long 0x3f8dcb76 - .long 0xc00564de - .long 0x1b6717e3,0x3ffc3c42 - .long 0x3f8b5ef7 - .long 0xc004056b - .long 0x264323b8,0x3ffc2360 - .long 0x3f890138 - .long 0xc002abf5 - .long 0x8c0c1853,0x3ffc0abf - .long 0x3f86b1c6 - .long 0xc0015858 - .long 0x4069b804,0x3ffbf25f - .long 0x3f847032 - .long 0xc0000a6f - .long 0xf2c0f56b,0x3ffbda3d - .long 0x3f823c13 - .long 0xbffd8435 - .long 0xe82b41be,0x3ffbc25a - .long 0x3f801501 - .long 0xbffafe6e - .long 0xd0c8f1c2,0x3ffbaab4 - .long 0x3f7bf536 - .long 0xbff8834b - .long 0xc1a3163f,0x3ffb934a - .long 0x3f77d900 - .long 0xbff6128d - .long 0xc6e21d7e,0x3ffb7c1b - .long 0x3f73d4ab - .long 0xbff3abf8 - .long 0xe60015a5,0x3ffb6526 - .long 0x3f6fe784 - .long 0xbff14f50 - .long 0x21cbd876,0x3ffb4e6b - .long 0x3f6c10e1 - .long 0xbfeefc5d - .long 0x9ee07b4c,0x3ffb37e7 - .long 0x3f68501d - .long 0xbfecb2e7 - .long 0x6d2d48b6,0x3ffb219b - .long 0x3f64a499 - .long 0xbfea72b8 - .long 0xa81c9b61,0x3ffb0b85 - .long 0x3f610dbb - .long 0xbfe83b9d - .long 0x902fdc83,0x3ffaf5a5 - .long 0x3f5d8aee - .long 0xbfe60d61 - .long 0x27f22c44,0x3ffadffa - .long 0x3f5a1ba3 - .long 0xbfe3e7d3 - .long 0xa3884d02,0x3ffaca82 - .long 0x3f56bf51 - .long 0xbfe1cac5 - .long 0x554d369e,0x3ffab53e - .long 0x3f537570 - .long 0xbfdfb606 - .long 0x5450035a,0x3ffaa02c - .long 0x3f503d7f - .long 0xbfdda969 - .long 0xe28ff013,0x3ffa8b4b - .long 0x3f4d1702 - .long 0xbfdba4c2 - .long 0x3ccf3bef,0x3ffa769c - .long 0x3f4a017f - .long 0xbfd9a7e6 - .long 0xadd0d7d8,0x3ffa621c - .long 0x3f46fc82 - .long 0xbfd7b2ab - .long 0x73a23063,0x3ffa4dcc - .long 0x3f440799 - .long 0xbfd5c4e8 - .long 0xd9b8e6fd,0x3ffa39aa - .long 0x3f412258 - .long 0xbfd3de77 - .long 0x47a99575,0x3ffa25b7 - .long 0x3f3e4c53 - .long 0xbfd1ff2e - .long 0xd6d4c329,0x3ffa11f0 - .long 0x3f3b8525 - .long 0xbfd026eb - .long 0x1e725d64,0x3ff9fe57 - .long 0x3f38cc6a - .long 0xbfce5587 - .long 0x4a856a92,0x3ff9eae9 - .long 0x3f3621c3 - .long 0xbfcc8ae0 - .long 0xd3534a3f,0x3ff9d7a6 - .long 0x3f3384d1 - .long 0xbfcac6d1 - .long 0xf6170fe5,0x3ff9c48e - .long 0x3f30f53c - .long 0xbfc9093b - .long 0x43d296cd,0x3ff9b1a1 - .long 0x3f2e72ac - .long 0xbfc751fb - .long 0xfbbf8768,0x3ff99edc - .long 0x3f2bfccb - .long 0xbfc5a0f2 - .long 0xaa7c60ad,0x3ff98c41 - .long 0x3f299349 - .long 0xbfc3f600 - .long 0x9e5e0c30,0x3ff979ce - .long 0x3f2735d5 - .long 0xbfc25106 - .long 0x47a967c7,0x3ff96783 - .long 0x3f24e423 - .long 0xbfc0b1e7 - .long 0x213a91b3,0x3ff9555f - .long 0x3f229de8 - .long 0xbfbf1887 - .long 0xb92f1e71,0x3ff94361 - .long 0x3f2062db - .long 0xbfbd84c7 - .long 0x4e9fbb55,0x3ff9318a - .long 0x3f1e32b7 - .long 0xbfbbf68e - .long 0x8c3e135d,0x3ff91fd8 - .long 0x3f1c0d36 - .long 0xbfba6dc0 - .long 0xe5486399,0x3ff90e4b - .long 0x3f19f217 - .long 0xbfb8ea42 - .long 0xbecd10bc,0x3ff8fce3 - .long 0x3f17e11a - .long 0xbfb76bfc - .long 0xbe525978,0x3ff8eb9f - .long 0x3f15d9ff - .long 0xbfb5f2d3 - .long 0x48293568,0x3ff8da7f - .long 0x3f13dc8c - .long 0xbfb47eb1 - .long 0x05d5e650,0x3ff8c982 - .long 0x3f11e884 - .long 0xbfb30f7c - .long 0x60ba5dac,0x3ff8b8a7 - .long 0x3f0ffdb0 - .long 0xbfb1a51e - .long 0xefd22e82,0x3ff8a7ee - .long 0x3f0e1bd7 - .long 0xbfb03f80 - .long 0x47805b92,0x3ff89758 - .long 0x3f0c42c3 - .long 0xbfaede8a - .long 0xcd57cc04,0x3ff886e2 - .long 0x3f0a7241 - .long 0xbfad8229 - .long 0x46b3d0d8,0x3ff8768e - .long 0x3f08aa1e - .long 0xbfac2a48 - .long 0x4cc7ad59,0x3ff8665a - .long 0x3f06ea27 - .long 0xbfaad6cf - .long 0x3347fcf1,0x3ff85646 - .long 0x3f05322e - .long 0xbfa987ad - .long 0xcc7c68cf,0x3ff84651 - .long 0x3f038204 - .long 0xbfa83ccd - .long 0x95d48bda,0x3ff8367c - .long 0x3f01d97a - .long 0xbfa6f61c - .long 0x40b0d774,0x3ff826c6 - .long 0x3f003866 - .long 0xbfa5b387 - .long 0x521e69ab,0x3ff8172e - .long 0x3efd3d38 - .long 0xbfa474fb - .long 0x64a31380,0x3ff807b4 - .long 0x3efa17e4 - .long 0xbfa33a67 - .long 0x344463f5,0x3ff7f858 - .long 0x3ef70080 - .long 0xbfa203b9 - .long 0x536e309d,0x3ff7e919 - .long 0x3ef3f6bd - .long 0xbfa0d0df - .long 0x51d9db7f,0x3ff7d9f7 - .long 0x3ef0fa4e - .long 0xbf9fa1ca - .long 0x03bdd024,0x3ff7caf2 - .long 0x3eee0ae8 - .long 0xbf9e7667 - .long 0xd06a95a6,0x3ff7bc08 - .long 0x3eeb2842 - .long 0xbf9d4ea8 - .long 0x96a621bf,0x3ff7ad3b - .long 0x3ee85215 - .long 0xbf9c2a7d - .long 0xfac56bba,0x3ff79e89 - .long 0x3ee5881d - .long 0xbf9b09d5 - .long 0x79c2bb58,0x3ff78ff3 - .long 0x3ee2ca16 - .long 0xbf99eca3 - .long 0xfa3e419f,0x3ff78177 - .long 0x3ee017bf - .long 0xbf98d2d7 - .long 0x07c1acb7,0x3ff77317 - .long 0x3edd70d7 - .long 0xbf97bc62 - .long 0x49bbc9e6,0x3ff764d0 - .long 0x3edad522 - .long 0xbf96a937 - .long 0x8367baca,0x3ff756a3 - .long 0x3ed84462 - .long 0xbf959948 - .long 0x6acc6906,0x3ff74890 - .long 0x3ed5be5d - .long 0xbf948c88 - .long 0xbcc0ac8a,0x3ff73a96 - .long 0x3ed342d8 - .long 0xbf9382e7 - .long 0xed77fbb2,0x3ff72cb5 - .long 0x3ed0d19d - .long 0xbf927c5c - .long 0x1262b283,0x3ff71eee - .long 0x3ece6a74 - .long 0xbf9178d7 - .long 0x928b4839,0x3ff7113e - .long 0x3ecc0d29 - .long 0xbf90784d - .long 0x46765494,0x3ff703a7 - .long 0x3ec9b988 - .long 0xbf8f7ab1 - .long 0xd271890f,0x3ff6f627 - .long 0x3ec76f5d - .long 0xbf8e7ff8 - .long 0x1330f37e,0x3ff6e8c0 - .long 0x3ec52e79 - .long 0xbf8d8817 - .long 0xca5f6659,0x3ff6db6f - .long 0x3ec2f6aa - .long 0xbf8c9300 - .long 0x7a3c2c24,0x3ff6ce36 - .long 0x3ec0c7c2 - .long 0xbf8ba0aa - .long 0x18d80162,0x3ff6c114 - .long 0x3ebea193 - .long 0xbf8ab109 - .long 0x4b1eb26b,0x3ff6b408 - .long 0x3ebc83f0 - .long 0xbf89c412 - .long 0xcd29fcba,0x3ff6a712 - .long 0x3eba6eaf - .long 0xbf88d9bb - .long 0x664b0f09,0x3ff69a33 - .long 0x3eb861a4 - .long 0xbf87f1f9 - .long 0xcfa00fd5,0x3ff68d69 - .long 0x3eb65ca6 - .long 0xbf870cc3 - .long 0xe9d2a6b3,0x3ff680b5 - .long 0x3eb45f8c - .long 0xbf862a0e - .long 0x5e7a0e0b,0x3ff67417 - .long 0x3eb26a30 - .long 0xbf8549d1 - .long 0xfe6852bf,0x3ff6678d - .long 0x3eb07c6a - .long 0xbf846c01 - .long 0x6f577b40,0x3ff65b19 - .long 0x3eae9616 - .long 0xbf839096 - .long 0x94beacb4,0x3ff64eb9 - .long 0x3eacb70d - .long 0xbf82b786 - .long 0x2d87a5b4,0x3ff6426e - .long 0x3eaadf2d - .long 0xbf81e0c9 - .long 0x133eca3a,0x3ff63637 - .long 0x3ea90e52 - .long 0xbf810c55 - .long 0xf3b8ca64,0x3ff62a13 - .long 0x3ea74459 - .long 0xbf803a22 - .long 0xb1e928a1,0x3ff61e04 - .long 0x3ea58123 - .long 0xbf7ed44e - .long 0xf9c12cea,0x3ff61208 - .long 0x3ea3c48d - .long 0xbf7d38b8 - .long 0xb0f105b4,0x3ff60620 - .long 0x3ea20e79 - .long 0xbf7ba172 - .long 0x9c747236,0x3ff5fa4b - .long 0x3ea05ec6 - .long 0xbf7a0e6a - .long 0x79454bb5,0x3ff5ee89 - .long 0x3e9eb556 - .long 0xbf787f92 - .long 0x2c804088,0x3ff5e2da - .long 0x3e9d120c - .long 0xbf76f4d9 - .long 0x686ac26d,0x3ff5d73d - .long 0x3e9b74ca - .long 0xbf756e31 - .long 0x1493b001,0x3ff5cbb3 - .long 0x3e99dd75 - .long 0xbf73eb8c - .long 0x048406f4,0x3ff5c03b - .long 0x3e984bef - .long 0xbf726cd9 - .long 0xf4dbeebe,0x3ff5b4d4 - .long 0x3e96c01f - .long 0xbf70f20b - .long 0xbbe3f38a,0x3ff5a980 - .long 0x3e9539e9 - .long 0xbf6f7b14 - .long 0x37ac4b0e,0x3ff59e3e - .long 0x3e93b933 - .long 0xbf6e07e5 - .long 0x294f0c16,0x3ff5930d - .long 0x3e923de4 - .long 0xbf6c9870 - .long 0x5aaed17d,0x3ff587ed - .long 0x3e90c7e3 - .long 0xbf6b2caa - .long 0xc550e64d,0x3ff57cde - .long 0x3e8f5718 - .long 0xbf69c484 - .long 0x1e1a64d6,0x3ff571e1 - .long 0x3e8deb6b - .long 0xbf685ff2 - .long 0x4990847b,0x3ff566f4 - .long 0x3e8c84c4 - .long 0xbf66fee6 - .long 0x0dee1cfa,0x3ff55c18 - .long 0x3e8b230e - .long 0xbf65a155 - .long 0x4a4098f7,0x3ff5514c - .long 0x3e89c631 - .long 0xbf644732 - .long 0xd65fdb98,0x3ff54690 - .long 0x3e886e18 - .long 0xbf62f072 - .long 0x9358f9fc,0x3ff53be5 - .type __sqrt_t_table,@object - .size __sqrt_t_table,4096 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrtf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrtf_gen.S deleted file mode 100644 index 317421b256..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrtf_gen.S +++ /dev/null @@ -1,93 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sqrtf_gen.c" - .text -..TXTST0: -# -- Begin sqrtf - .text - .align 16,0x90 - .globl sqrtf -sqrtf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_sqrtf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - movss %xmm0, 8(%rsp) -..B1.2: - testb $128, 11(%rsp) - jne .L_2TAG_PACKET_0.0.2 - sqrtss %xmm0, %xmm0 -.L_2TAG_PACKET_1.0.2: - jmp ..B1.5 -.L_2TAG_PACKET_0.0.2: - ucomiss 4+zeros(%rip), %xmm0 - sqrtss %xmm0, %xmm0 - jp .L_2TAG_PACKET_1.0.2 - je .L_2TAG_PACKET_1.0.2 - movss %xmm0, (%rsp) -..B1.3: - movss (%rsp), %xmm0 -.L_2TAG_PACKET_2.0.2: -..B1.5: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type sqrtf,@function - .size sqrtf,.-sqrtf - .data -# -- End sqrtf - .section .rodata, "a" - .align 16 - .align 16 -zeros: - .long 0 - .long 2147483648 - .type zeros,@object - .size zeros,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrtl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrtl.S deleted file mode 100644 index 2d105b0cee..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/sqrtl.S +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "sqrtl.c" - .text -..TXTST0: -# -- Begin sqrtl - .text - .align 16,0x90 - .globl sqrtl -sqrtl: -# parameter 1: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_sqrtl.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - xorb %cl, %cl - fldt 64(%rsp) - fstpt 32(%rsp) -..B1.2: - fnstcw 10(%rsp) -..B1.3: - movzwl 72(%rsp), %eax - andl $32767, %eax - cmpl $32767, %eax - je ..B1.23 -..B1.4: - testb $-128, 73(%rsp) - jne ..B1.13 -..B1.5: - movzwl 10(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.9 -..B1.6: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.7: - fldcw 8(%rsp) -..B1.8: - movb $1, %cl -..B1.9: - fldt 32(%rsp) - fsqrt - fstpt 16(%rsp) -..B1.10: - testb %cl, %cl - je ..B1.12 -..B1.11: - fldcw 10(%rsp) -..B1.12: - fldt 16(%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.13: - testl %eax, %eax - jne ..B1.16 -..B1.14: - cmpq $0, 64(%rsp) - jne ..B1.16 -..B1.15: - fldt 64(%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.16: - movzwl 10(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.20 -..B1.17: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.18: - fldcw 8(%rsp) -..B1.19: - movb $1, %cl -..B1.20: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - testb %cl, %cl - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 16(%rsp) - je ..B1.22 -..B1.21: - fldcw 10(%rsp) -..B1.22: - fldt 16(%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.23: - cmpl $-2147483648, 68(%rsp) - jne ..B1.25 -..B1.24: - cmpl $0, 64(%rsp) - je ..B1.4 -..B1.25: - movzwl 10(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.31 -..B1.26: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.27: - fldcw 8(%rsp) -..B1.28: - fldt 64(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) -..B1.29: - fldcw 10(%rsp) -..B1.30: - fldt 16(%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.31: - fldt 64(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) - jmp ..B1.30 - .align 16,0x90 - .cfi_endproc - .type sqrtl,@function - .size sqrtl,.-sqrtl - .data -# -- End sqrtl - .section .rodata, "a" - .align 4 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tan_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tan_gen.S deleted file mode 100644 index f7cc7fa1db..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tan_gen.S +++ /dev/null @@ -1,2170 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tan_gen.c" - .text -..TXTST0: -# -- Begin tan - .text - .align 16,0x90 - .globl tan -tan: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_tan.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - subq $16, %rsp - .cfi_def_cfa_offset 32 - movsd %xmm0, 8(%rsp) -..B1.2: - pextrw $3, %xmm0, %eax - andl $32767, %eax - subl $16314, %eax - cmpl $270, %eax - ja .L_2TAG_PACKET_0.0.1 - movapd ONEHALF(%rip), %xmm5 - movapd MUL16(%rip), %xmm6 - unpcklpd %xmm0, %xmm0 - movapd sign_mask(%rip), %xmm4 - andpd %xmm0, %xmm4 - movapd PI32INV(%rip), %xmm1 - mulpd %xmm0, %xmm1 - orps %xmm4, %xmm5 - addpd %xmm5, %xmm1 - movapd %xmm1, %xmm7 - unpckhpd %xmm7, %xmm7 - cvttsd2si %xmm7, %rdx - cvttpd2dq %xmm1, %xmm1 - cvtdq2pd %xmm1, %xmm1 - mulpd %xmm6, %xmm1 - movapd P_1(%rip), %xmm3 - movq QQ_2(%rip), %xmm5 - addq $469248, %rdx - movapd P_2(%rip), %xmm4 - mulpd %xmm1, %xmm3 - andq $31, %rdx - mulsd %xmm1, %xmm5 - movq %rdx, %rcx - mulpd %xmm1, %xmm4 - shlq $1, %rcx - subpd %xmm3, %xmm0 - mulpd P_3(%rip), %xmm1 - addq %rcx, %rdx - shlq $2, %rcx - addq %rcx, %rdx - addsd %xmm0, %xmm5 - movapd %xmm0, %xmm2 - subpd %xmm4, %xmm0 - movq ONE(%rip), %xmm6 - shlq $4, %rdx - lea Ctable(%rip), %rax - andpd MASK_35(%rip), %xmm5 - movapd %xmm0, %xmm3 - addq %rdx, %rax - subpd %xmm0, %xmm2 - unpckhpd %xmm0, %xmm0 - divsd %xmm5, %xmm6 - subpd %xmm4, %xmm2 - movapd 16(%rax), %xmm7 - subsd %xmm5, %xmm3 - mulpd %xmm0, %xmm7 - subpd %xmm1, %xmm2 - movapd 48(%rax), %xmm1 - mulpd %xmm0, %xmm1 - movapd 96(%rax), %xmm4 - mulpd %xmm0, %xmm4 - addsd %xmm3, %xmm2 - movapd %xmm0, %xmm3 - mulpd %xmm0, %xmm0 - addpd (%rax), %xmm7 - addpd 32(%rax), %xmm1 - mulpd %xmm0, %xmm1 - addpd 80(%rax), %xmm4 - addpd %xmm1, %xmm7 - movapd 112(%rax), %xmm1 - mulpd %xmm0, %xmm1 - mulpd %xmm0, %xmm0 - addpd %xmm1, %xmm4 - movapd 64(%rax), %xmm1 - mulpd %xmm0, %xmm1 - addpd %xmm1, %xmm7 - movapd %xmm3, %xmm1 - mulpd %xmm0, %xmm3 - mulsd %xmm0, %xmm0 - mulpd 144(%rax), %xmm1 - mulpd %xmm3, %xmm4 - movq %xmm1, %xmm3 - addpd %xmm4, %xmm7 - movq %xmm1, %xmm4 - mulsd %xmm7, %xmm0 - unpckhpd %xmm7, %xmm7 - addsd %xmm7, %xmm0 - unpckhpd %xmm1, %xmm1 - addsd %xmm1, %xmm3 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm1 - movq %xmm2, %xmm4 - movq 144(%rax), %xmm7 - unpckhpd %xmm2, %xmm2 - addsd 152(%rax), %xmm7 - mulsd %xmm2, %xmm7 - addsd 136(%rax), %xmm7 - addsd %xmm1, %xmm7 - addsd %xmm7, %xmm0 - movq ONE(%rip), %xmm7 - mulsd %xmm6, %xmm4 - movq 168(%rax), %xmm2 - andpd %xmm6, %xmm2 - mulsd %xmm2, %xmm5 - mulsd 160(%rax), %xmm6 - subsd %xmm5, %xmm7 - subsd 128(%rax), %xmm2 - subsd %xmm4, %xmm7 - mulsd %xmm6, %xmm7 - movq %xmm3, %xmm4 - subsd %xmm2, %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm4 - addsd %xmm4, %xmm0 - subsd %xmm7, %xmm0 - addsd %xmm3, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_0.0.1: - jg .L_2TAG_PACKET_1.0.1 - pextrw $3, %xmm0, %eax - movl %eax, %edx - andl $32752, %eax - je .L_2TAG_PACKET_2.0.1 - andl $32767, %edx - cmpl $15904, %edx - jb .L_2TAG_PACKET_3.0.1 - movq %xmm0, %xmm2 - movq %xmm0, %xmm3 - movq Q_11(%rip), %xmm1 - mulsd %xmm0, %xmm2 - mulsd %xmm2, %xmm3 - mulsd %xmm2, %xmm1 - addsd Q_9(%rip), %xmm1 - mulsd %xmm2, %xmm1 - addsd Q_7(%rip), %xmm1 - mulsd %xmm2, %xmm1 - addsd Q_5(%rip), %xmm1 - mulsd %xmm2, %xmm1 - addsd Q_3(%rip), %xmm1 - mulsd %xmm3, %xmm1 - addsd %xmm1, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_3.0.1: - movq TWO_POW_55(%rip), %xmm3 - mulsd %xmm0, %xmm3 - addsd %xmm3, %xmm0 - mulsd TWO_POW_M55(%rip), %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_2.0.1: - movq %xmm0, %xmm1 - mulsd %xmm1, %xmm1 - jmp ..B1.4 -.L_2TAG_PACKET_1.0.1: - pextrw $3, %xmm0, %eax - andl $32752, %eax - cmpl $32752, %eax - je .L_2TAG_PACKET_4.0.1 - pextrw $3, %xmm0, %ecx - andl $32752, %ecx - subl $16224, %ecx - shrl $7, %ecx - andl $65532, %ecx - lea PI_INV_TABLE(%rip), %r11 - addq %r11, %rcx - movd %xmm0, %rax - movl 20(%rcx), %r10d - movl 24(%rcx), %r8d - movl %eax, %edx - shrq $21, %rax - orl $-2147483648, %eax - shrl $11, %eax - movl %r10d, %r9d - imulq %rdx, %r10 - imulq %rax, %r9 - imulq %rax, %r8 - movl 16(%rcx), %esi - movl 12(%rcx), %edi - movl %r10d, %r11d - shrq $32, %r10 - addq %r10, %r9 - addq %r8, %r11 - movl %r11d, %r8d - shrq $32, %r11 - addq %r11, %r9 - movl %esi, %r10d - imulq %rdx, %rsi - imulq %rax, %r10 - movl %edi, %r11d - imulq %rdx, %rdi - movl %esi, %ebx - shrq $32, %rsi - addq %rbx, %r9 - movl %r9d, %ebx - shrq $32, %r9 - addq %rsi, %r10 - addq %r9, %r10 - shlq $32, %rbx - orq %rbx, %r8 - imulq %rax, %r11 - movl 8(%rcx), %r9d - movl 4(%rcx), %esi - movl %edi, %ebx - shrq $32, %rdi - addq %rbx, %r10 - movl %r10d, %ebx - shrq $32, %r10 - addq %rdi, %r11 - addq %r10, %r11 - movq %r9, %rdi - imulq %rdx, %r9 - imulq %rax, %rdi - movl %r9d, %r10d - shrq $32, %r9 - addq %r10, %r11 - movl %r11d, %r10d - shrq $32, %r11 - addq %r9, %rdi - addq %r11, %rdi - movq %rsi, %r9 - imulq %rdx, %rsi - imulq %rax, %r9 - shlq $32, %r10 - orq %rbx, %r10 - movl (%rcx), %eax - movl %esi, %r11d - shrq $32, %rsi - addq %r11, %rdi - movl %edi, %r11d - shrq $32, %rdi - addq %rsi, %r9 - addq %rdi, %r9 - imulq %rax, %rdx - pextrw $3, %xmm0, %ebx - lea PI_INV_TABLE(%rip), %rdi - subq %rdi, %rcx - addl %ecx, %ecx - addl %ecx, %ecx - addl %ecx, %ecx - addl $19, %ecx - movl $32768, %esi - andl %ebx, %esi - shrl $4, %ebx - andl $2047, %ebx - subl $1023, %ebx - subl %ebx, %ecx - addq %rdx, %r9 - movl %ecx, %edx - addl $32, %edx - cmpl $0, %ecx - jl .L_2TAG_PACKET_5.0.1 - negl %ecx - addl $29, %ecx - shll %cl, %r9d - movl %r9d, %edi - andl $1073741823, %r9d - testl $536870912, %r9d - jne .L_2TAG_PACKET_6.0.1 - shrl %cl, %r9d - movl $0, %ebx - shlq $32, %r9 - orq %r11, %r9 -.L_2TAG_PACKET_7.0.1: -.L_2TAG_PACKET_8.0.1: - cmpq $0, %r9 - je .L_2TAG_PACKET_9.0.1 -.L_2TAG_PACKET_10.0.1: - bsr %r9, %r11 - movl $29, %ecx - subl %r11d, %ecx - jle .L_2TAG_PACKET_11.0.1 - shlq %cl, %r9 - movq %r10, %rax - shlq %cl, %r10 - addl %ecx, %edx - negl %ecx - addl $64, %ecx - shrq %cl, %rax - shrq %cl, %r8 - orq %rax, %r9 - orq %r8, %r10 -.L_2TAG_PACKET_12.0.1: - cvtsi2sdq %r9, %xmm0 - shrq $1, %r10 - cvtsi2sdq %r10, %xmm3 - xorpd %xmm4, %xmm4 - shll $4, %edx - negl %edx - addl $16368, %edx - orl %esi, %edx - xorl %ebx, %edx - pinsrw $3, %edx, %xmm4 - movq PI_4(%rip), %xmm2 - movq 8+PI_4(%rip), %xmm7 - xorpd %xmm5, %xmm5 - subl $1008, %edx - pinsrw $3, %edx, %xmm5 - mulsd %xmm4, %xmm0 - shll $16, %esi - sarl $31, %esi - mulsd %xmm5, %xmm3 - movq %xmm0, %xmm1 - mulsd %xmm2, %xmm0 - shrl $30, %edi - addsd %xmm3, %xmm1 - mulsd %xmm2, %xmm3 - addl %esi, %edi - xorl %esi, %edi - mulsd %xmm1, %xmm7 - movl %edi, %eax - addsd %xmm3, %xmm7 - movq %xmm0, %xmm2 - addsd %xmm7, %xmm0 - subsd %xmm0, %xmm2 - addsd %xmm2, %xmm7 - movapd PI32INV(%rip), %xmm1 - unpcklpd %xmm0, %xmm0 - movapd sign_mask(%rip), %xmm4 - andpd %xmm0, %xmm4 - mulpd %xmm0, %xmm1 - unpcklpd %xmm7, %xmm7 - movapd ONEHALF(%rip), %xmm5 - movapd MUL16(%rip), %xmm6 - orps %xmm4, %xmm5 - addpd %xmm5, %xmm1 - movapd %xmm1, %xmm5 - unpckhpd %xmm5, %xmm5 - cvttsd2si %xmm5, %edx - cvttpd2dq %xmm1, %xmm1 - cvtdq2pd %xmm1, %xmm1 - mulpd %xmm6, %xmm1 - movapd P_1(%rip), %xmm3 - movq QQ_2(%rip), %xmm5 - shll $4, %eax - addl $469248, %edx - movapd P_2(%rip), %xmm4 - mulpd %xmm1, %xmm3 - addl %eax, %edx - andl $31, %edx - mulsd %xmm1, %xmm5 - movl %edx, %ecx - mulpd %xmm1, %xmm4 - shll $1, %ecx - subpd %xmm3, %xmm0 - mulpd P_3(%rip), %xmm1 - addl %ecx, %edx - shll $2, %ecx - addl %ecx, %edx - addsd %xmm0, %xmm5 - movapd %xmm0, %xmm2 - subpd %xmm4, %xmm0 - movq ONE(%rip), %xmm6 - shll $4, %edx - lea Ctable(%rip), %rax - andpd MASK_35(%rip), %xmm5 - movapd %xmm0, %xmm3 - addq %rdx, %rax - subpd %xmm0, %xmm2 - unpckhpd %xmm0, %xmm0 - divsd %xmm5, %xmm6 - subpd %xmm4, %xmm2 - subsd %xmm5, %xmm3 - subpd %xmm1, %xmm2 - movapd 48(%rax), %xmm1 - addpd %xmm7, %xmm2 - movapd 16(%rax), %xmm7 - mulpd %xmm0, %xmm7 - movapd 96(%rax), %xmm4 - mulpd %xmm0, %xmm1 - mulpd %xmm0, %xmm4 - addsd %xmm3, %xmm2 - movapd %xmm0, %xmm3 - mulpd %xmm0, %xmm0 - addpd (%rax), %xmm7 - addpd 32(%rax), %xmm1 - mulpd %xmm0, %xmm1 - addpd 80(%rax), %xmm4 - addpd %xmm1, %xmm7 - movapd 112(%rax), %xmm1 - mulpd %xmm0, %xmm1 - mulpd %xmm0, %xmm0 - addpd %xmm1, %xmm4 - movapd 64(%rax), %xmm1 - mulpd %xmm0, %xmm1 - addpd %xmm1, %xmm7 - movapd %xmm3, %xmm1 - mulpd %xmm0, %xmm3 - mulsd %xmm0, %xmm0 - mulpd 144(%rax), %xmm1 - mulpd %xmm3, %xmm4 - movq %xmm1, %xmm3 - addpd %xmm4, %xmm7 - movq %xmm1, %xmm4 - mulsd %xmm7, %xmm0 - unpckhpd %xmm7, %xmm7 - addsd %xmm7, %xmm0 - unpckhpd %xmm1, %xmm1 - addsd %xmm1, %xmm3 - subsd %xmm3, %xmm4 - addsd %xmm4, %xmm1 - movq %xmm2, %xmm4 - movq 144(%rax), %xmm7 - unpckhpd %xmm2, %xmm2 - addsd 152(%rax), %xmm7 - mulsd %xmm2, %xmm7 - addsd 136(%rax), %xmm7 - addsd %xmm1, %xmm7 - addsd %xmm7, %xmm0 - movq ONE(%rip), %xmm7 - mulsd %xmm6, %xmm4 - movq 168(%rax), %xmm2 - andpd %xmm6, %xmm2 - mulsd %xmm2, %xmm5 - mulsd 160(%rax), %xmm6 - subsd %xmm5, %xmm7 - subsd 128(%rax), %xmm2 - subsd %xmm4, %xmm7 - mulsd %xmm6, %xmm7 - movq %xmm3, %xmm4 - subsd %xmm2, %xmm3 - addsd %xmm3, %xmm2 - subsd %xmm2, %xmm4 - addsd %xmm4, %xmm0 - subsd %xmm7, %xmm0 - addsd %xmm3, %xmm0 - jmp ..B1.4 -.L_2TAG_PACKET_9.0.1: - addl $64, %edx - movq %r10, %r9 - movq %r8, %r10 - movq $0, %r8 - cmpq $0, %r9 - jne .L_2TAG_PACKET_10.0.1 - addl $64, %edx - movq %r10, %r9 - movq %r8, %r10 - cmpq $0, %r9 - jne .L_2TAG_PACKET_10.0.1 - jmp .L_2TAG_PACKET_12.0.1 -.L_2TAG_PACKET_11.0.1: - je .L_2TAG_PACKET_12.0.1 - negl %ecx - shrq %cl, %r10 - movq %r9, %rax - shrq %cl, %r9 - subl %ecx, %edx - negl %ecx - addl $64, %ecx - shlq %cl, %rax - orq %rax, %r10 - jmp .L_2TAG_PACKET_12.0.1 -.L_2TAG_PACKET_5.0.1: - notl %ecx - shlq $32, %r9 - orq %r11, %r9 - shlq %cl, %r9 - movq %r9, %rdi - testl $-2147483648, %r9d - jne .L_2TAG_PACKET_13.0.1 - shrl %cl, %r9d - movl $0, %ebx - shrq $2, %rdi - jmp .L_2TAG_PACKET_8.0.1 -.L_2TAG_PACKET_6.0.1: - shrl %cl, %r9d - movl $1073741824, %ebx - shrl %cl, %ebx - shlq $32, %r9 - orq %r11, %r9 - shlq $32, %rbx - addl $1073741824, %edi - movq $0, %rcx - movq $0, %r11 - subq %r8, %rcx - sbbq %r10, %r11 - sbbq %r9, %rbx - movq %rcx, %r8 - movq %r11, %r10 - movq %rbx, %r9 - movl $32768, %ebx - jmp .L_2TAG_PACKET_7.0.1 -.L_2TAG_PACKET_13.0.1: - shrl %cl, %r9d - movq $0x100000000, %rbx - shrq %cl, %rbx - movq $0, %rcx - movq $0, %r11 - subq %r8, %rcx - sbbq %r10, %r11 - sbbq %r9, %rbx - movq %rcx, %r8 - movq %r11, %r10 - movq %rbx, %r9 - movl $32768, %ebx - shrq $2, %rdi - addl $1073741824, %edi - jmp .L_2TAG_PACKET_8.0.1 -.L_2TAG_PACKET_4.0.1: - movq 8(%rsp), %xmm0 - mulsd NEG_ZERO(%rip), %xmm0 - movq %xmm0, (%rsp) -.L_2TAG_PACKET_14.0.1: -..B1.4: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type tan,@function - .size tan,.-tan - .data -# -- End tan - .section .rodata, "a" - .align 16 - .align 16 -ONEHALF: - .long 0 - .long 1071644672 - .long 0 - .long 1071644672 - .type ONEHALF,@object - .size ONEHALF,16 - .align 16 -MUL16: - .long 0 - .long 1076887552 - .long 0 - .long 1072693248 - .type MUL16,@object - .size MUL16,16 - .align 16 -sign_mask: - .long 0 - .long 2147483648 - .long 0 - .long 2147483648 - .type sign_mask,@object - .size sign_mask,16 - .align 16 -PI32INV: - .long 1841940611 - .long 1071931184 - .long 1841940611 - .long 1076125488 - .type PI32INV,@object - .size PI32INV,16 - .align 16 -P_1: - .long 1413758976 - .long 1069097467 - .long 1413742592 - .long 1069097467 - .type P_1,@object - .size P_1,16 - .align 16 -P_2: - .long 1734819840 - .long 3174229945 - .long 1280049152 - .long 1028033571 - .type P_2,@object - .size P_2,16 - .align 16 -P_3: - .long 923219018 - .long 984130272 - .long 57701189 - .long 988383790 - .type P_3,@object - .size P_3,16 - .align 16 -Ctable: - .long 0 - .long 0 - .long 0 - .long 0 - .long 2284589306 - .long 1066820852 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1441186365 - .long 1065494243 - .long 1431655765 - .long 1070945621 - .long 0 - .long 0 - .long 0 - .long 0 - .long 236289504 - .long 1064135997 - .long 286331153 - .long 1069617425 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1160476131 - .long 1062722102 - .long 463583772 - .long 1068212666 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1313038235 - .long 1066745731 - .long 0 - .long 0 - .long 1013878342 - .long 1067152618 - .long 0 - .long 0 - .long 3663426833 - .long 1065725283 - .long 3693284251 - .long 1069118808 - .long 650852232 - .long 1065882376 - .long 1996245381 - .long 1071000265 - .long 2008746170 - .long 1064664197 - .long 3055842593 - .long 1068578846 - .long 1495406348 - .long 1064652437 - .long 2269530157 - .long 1069711235 - .long 285563696 - .long 1063576465 - .long 1046897440 - .long 1067705865 - .long 233429731 - .long 1063453151 - .long 522045958 - .long 1068476590 - .long 2354785698 - .long 1069102779 - .long 1317599141 - .long 1012432133 - .long 0 - .long 1072693248 - .long 2828230105 - .long 1065606626 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1512545955 - .long 1068119047 - .long 0 - .long 0 - .long 1127048698 - .long 1067909459 - .long 0 - .long 0 - .long 2300200450 - .long 1067254767 - .long 3593250296 - .long 1070233561 - .long 3009365544 - .long 1066902117 - .long 1127373050 - .long 1071173457 - .long 3046103305 - .long 1066371299 - .long 24583402 - .long 1069723988 - .long 4082511758 - .long 1065914199 - .long 3223889699 - .long 1070020367 - .long 548927984 - .long 1065415756 - .long 558065897 - .long 1068949418 - .long 680073315 - .long 1064940726 - .long 388873200 - .long 1068944270 - .long 3763679576 - .long 1070167541 - .long 1497360404 - .long 1009710547 - .long 0 - .long 1072693248 - .long 64931152 - .long 1067729411 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2467582782 - .long 1069256389 - .long 0 - .long 0 - .long 162150096 - .long 1068946420 - .long 0 - .long 0 - .long 3702794237 - .long 1068579152 - .long 3631919291 - .long 1070936926 - .long 3456821413 - .long 1068217218 - .long 2031366438 - .long 1071495745 - .long 1596664020 - .long 1067799281 - .long 1509038701 - .long 1070601643 - .long 583171477 - .long 1067510148 - .long 3785344682 - .long 1070618476 - .long 2402036048 - .long 1067075736 - .long 3233018412 - .long 1069913186 - .long 411280568 - .long 1066710556 - .long 1065584192 - .long 1069747896 - .long 895247324 - .long 1070819848 - .long 500078909 - .long 3161288781 - .long 0 - .long 1072693248 - .long 729983843 - .long 1068994194 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1458794562 - .long 1070398550 - .long 0 - .long 0 - .long 2857777489 - .long 1070137637 - .long 0 - .long 0 - .long 1024359517 - .long 1069876531 - .long 2616040238 - .long 1071582937 - .long 1609024636 - .long 1069675088 - .long 2529240549 - .long 1071836633 - .long 1510128600 - .long 1069440113 - .long 2251697184 - .long 1071253687 - .long 1262761453 - .long 1069142850 - .long 1263091857 - .long 1071190461 - .long 3043383486 - .long 1068885191 - .long 2476932470 - .long 1070842002 - .long 3659995028 - .long 1068669200 - .long 855891755 - .long 1070696894 - .long 2583490354 - .long 1071284857 - .long 3062633575 - .long 1014008623 - .long 0 - .long 1072693248 - .long 2550940471 - .long 1069938201 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3422807297 - .long 1071640847 - .long 0 - .long 0 - .long 1151658053 - .long 1071494715 - .long 0 - .long 0 - .long 929607071 - .long 1071346340 - .long 1037049034 - .long 1072037305 - .long 2786928657 - .long 1071215282 - .long 1447406859 - .long 1072265209 - .long 3490952107 - .long 1071090851 - .long 3205232916 - .long 1071968658 - .long 1297344304 - .long 1070977120 - .long 1066110976 - .long 1071946035 - .long 3803721480 - .long 1070871082 - .long 1496754229 - .long 1071807201 - .long 2982550683 - .long 1070773243 - .long 4014441989 - .long 1071736222 - .long 419968236 - .long 1071717047 - .long 3451266538 - .long 3163444811 - .long 0 - .long 1072693248 - .long 2960267235 - .long 1070745841 - .long 0 - .long 0 - .long 0 - .long 0 - .long 724322768 - .long 1072881308 - .long 0 - .long 0 - .long 643153048 - .long 1072905816 - .long 0 - .long 0 - .long 4285079458 - .long 1072928558 - .long 3912524733 - .long 1072622983 - .long 118362272 - .long 1072952754 - .long 4107767972 - .long 1072827408 - .long 2689502883 - .long 1072976922 - .long 946523347 - .long 1072772766 - .long 573204189 - .long 1073001761 - .long 581531518 - .long 1072826391 - .long 1386236526 - .long 1073026959 - .long 3718905905 - .long 1072832823 - .long 1145558140 - .long 1073052673 - .long 513572637 - .long 1072861969 - .long 716700048 - .long 1071997368 - .long 547126769 - .long 1015523525 - .long 0 - .long 1072693248 - .long 1097907398 - .long 1071420120 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3349892442 - .long 1074290212 - .long 0 - .long 0 - .long 3913197405 - .long 1074501181 - .long 0 - .long 0 - .long 2494034522 - .long 1074739170 - .long 1264738763 - .long 1073084804 - .long 1520293906 - .long 1074899632 - .long 1958936600 - .long 1073411493 - .long 2133649635 - .long 1075052171 - .long 4270740730 - .long 1073574708 - .long 1728930189 - .long 1075224844 - .long 1303998552 - .long 1073799186 - .long 618611933 - .long 1075420255 - .long 1769828046 - .long 1073938542 - .long 2200537986 - .long 1075641421 - .long 433361110 - .long 1074105369 - .long 719595600 - .long 1072317184 - .long 294527206 - .long 3162140088 - .long 0 - .long 1073741824 - .long 3811788216 - .long 3218400550 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1704352102 - .long 1075943001 - .long 0 - .long 0 - .long 2284589306 - .long 1076258036 - .long 0 - .long 0 - .long 2211264291 - .long 1076659010 - .long 0 - .long 1073741824 - .long 1441186365 - .long 1077028579 - .long 1431655765 - .long 1074091349 - .long 876943673 - .long 1077353622 - .long 2863311531 - .long 1074440874 - .long 236289504 - .long 1077767485 - .long 286331153 - .long 1074860305 - .long 2805473311 - .long 1078115278 - .long 95443718 - .long 1075163227 - .long 1160476131 - .long 1078450742 - .long 463583772 - .long 1075552698 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 0 - .long 1073741824 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1330165971 - .long 3207850745 - .long 0 - .long 0 - .long 217536623 - .long 1059109098 - .long 0 - .long 0 - .long 3492120849 - .long 3205151475 - .long 602185705 - .long 3215678092 - .long 760422958 - .long 1056312597 - .long 555127889 - .long 1067545266 - .long 3139784124 - .long 3202470837 - .long 3690544014 - .long 3213150171 - .long 95707915 - .long 1053635428 - .long 4003114407 - .long 1064581412 - .long 2034926231 - .long 3199711161 - .long 3759536023 - .long 3210559989 - .long 3826928214 - .long 1050893819 - .long 3837960785 - .long 1061790379 - .long 1526325248 - .long 3217967566 - .long 2356426521 - .long 1025423456 - .long 0 - .long 0 - .long 457728975 - .long 1071088276 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1398462608 - .long 3207303968 - .long 0 - .long 0 - .long 26205983 - .long 1058461213 - .long 0 - .long 0 - .long 56226238 - .long 3204528612 - .long 2754706541 - .long 3215359511 - .long 2187799823 - .long 1055634437 - .long 790323742 - .long 1067402587 - .long 1372385848 - .long 3201651479 - .long 4097292716 - .long 3212856302 - .long 3348210357 - .long 1052830099 - .long 2442796466 - .long 1064337602 - .long 862608142 - .long 3198830754 - .long 170296152 - .long 3210060867 - .long 3755571428 - .long 1049933343 - .long 3614866008 - .long 1061361670 - .long 719978496 - .long 3217669096 - .long 1998842465 - .long 3174703977 - .long 0 - .long 0 - .long 3749156607 - .long 1071048258 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 3120498638 - .long 3206749304 - .long 0 - .long 0 - .long 2773578114 - .long 1058009312 - .long 0 - .long 0 - .long 2030783676 - .long 3203817873 - .long 2223654598 - .long 3215071936 - .long 2976134650 - .long 1054987244 - .long 706390066 - .long 1067217386 - .long 4258437615 - .long 3200900378 - .long 1066252975 - .long 3212391267 - .long 815777514 - .long 1051989462 - .long 3202745457 - .long 1064010682 - .long 2493556375 - .long 3198004753 - .long 1046243251 - .long 3209678971 - .long 2593078846 - .long 1049017717 - .long 2763962276 - .long 1060970161 - .long 701480960 - .long 3217377742 - .long 3205862232 - .long 3174660915 - .long 0 - .long 0 - .long 2267016812 - .long 1071015664 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 2107155798 - .long 3206166872 - .long 0 - .long 0 - .long 2642992129 - .long 1057424578 - .long 0 - .long 0 - .long 1936992811 - .long 3203204426 - .long 1485063559 - .long 3214682643 - .long 1432914553 - .long 1054319398 - .long 3996381654 - .long 1067075828 - .long 2833029256 - .long 3200223545 - .long 2866066872 - .long 3211982662 - .long 2432888737 - .long 1051234178 - .long 3669764559 - .long 1063748136 - .long 2458496952 - .long 3197170774 - .long 1948234989 - .long 3209098147 - .long 2843698787 - .long 1048163519 - .long 3398041407 - .long 1060559728 - .long 2829230080 - .long 3217092115 - .long 1034046433 - .long 3174271903 - .long 0 - .long 0 - .long 298675305 - .long 1070989821 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 437603223 - .long 3205589761 - .long 0 - .long 0 - .long 759330352 - .long 1057048511 - .long 0 - .long 0 - .long 3107463368 - .long 3202507988 - .long 3144465176 - .long 3214191500 - .long 2290961810 - .long 1053841035 - .long 1618153340 - .long 1066971547 - .long 3836869393 - .long 3199400272 - .long 584032116 - .long 3211469261 - .long 1245704358 - .long 1050626462 - .long 4247487438 - .long 1063561943 - .long 1669034927 - .long 3196274812 - .long 3844233498 - .long 3208626322 - .long 2706958524 - .long 1047411374 - .long 3857199098 - .long 1060281647 - .long 3593904128 - .long 3216590719 - .long 3267547836 - .long 3172163321 - .long 0 - .long 0 - .long 4076712227 - .long 1070970214 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 3290090340 - .long 3204793485 - .long 0 - .long 0 - .long 3685760367 - .long 1056668370 - .long 0 - .long 0 - .long 2655163949 - .long 3201674917 - .long 628750575 - .long 3213566872 - .long 680140505 - .long 1053299777 - .long 2954464709 - .long 1066900026 - .long 803201619 - .long 3198516435 - .long 1466315631 - .long 3210837162 - .long 1611220163 - .long 1049972438 - .long 2766187256 - .long 1063437894 - .long 1804579484 - .long 3195331491 - .long 3695969289 - .long 3207854418 - .long 2617238373 - .long 1046675948 - .long 3095830084 - .long 1060095334 - .long 3789570048 - .long 3216034914 - .long 23826559 - .long 3172048060 - .long 0 - .long 0 - .long 3870939386 - .long 1070956467 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1571758758 - .long 3203672535 - .long 0 - .long 0 - .long 113026373 - .long 1056416381 - .long 0 - .long 0 - .long 1913766298 - .long 3200523326 - .long 2507068734 - .long 3212502004 - .long 4000648818 - .long 1053003803 - .long 2446607349 - .long 1066858259 - .long 912662124 - .long 3197333001 - .long 1349489537 - .long 3209765608 - .long 3412972607 - .long 1049641401 - .long 1721283327 - .long 1063366855 - .long 1466691883 - .long 3194116746 - .long 3852528092 - .long 3206760861 - .long 285443293 - .long 1046158380 - .long 1758739894 - .long 1059895449 - .long 1858781184 - .long 3214984212 - .long 3447575948 - .long 1024675855 - .long 0 - .long 0 - .long 2242038011 - .long 1070948320 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 0 - .long 0 - .long 0 - .long 0 - .long 737611454 - .long 1056336527 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3594790527 - .long 1052911621 - .long 381774871 - .long 1066844524 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3303051618 - .long 1049456050 - .long 3154187623 - .long 1063343722 - .long 0 - .long 0 - .long 0 - .long 0 - .long 528061788 - .long 1045944910 - .long 2469719819 - .long 1059831159 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1431655765 - .long 1070945621 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1571758758 - .long 1056188887 - .long 0 - .long 0 - .long 113026373 - .long 1056416381 - .long 0 - .long 0 - .long 1913766298 - .long 1053039678 - .long 2507068734 - .long 1065018356 - .long 4000648818 - .long 1053003803 - .long 2446607349 - .long 1066858259 - .long 912662124 - .long 1049849353 - .long 1349489537 - .long 1062281960 - .long 3412972607 - .long 1049641401 - .long 1721283327 - .long 1063366855 - .long 1466691883 - .long 1046633098 - .long 3852528092 - .long 1059277213 - .long 285443293 - .long 1046158380 - .long 1758739894 - .long 1059895449 - .long 1858781184 - .long 1067500564 - .long 3447575948 - .long 3172159503 - .long 0 - .long 0 - .long 2242038011 - .long 1070948320 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 3290090340 - .long 1057309837 - .long 0 - .long 0 - .long 3685760367 - .long 1056668370 - .long 0 - .long 0 - .long 2655163949 - .long 1054191269 - .long 628750575 - .long 1066083224 - .long 680140505 - .long 1053299777 - .long 2954464709 - .long 1066900026 - .long 803201619 - .long 1051032787 - .long 1466315631 - .long 1063353514 - .long 1611220163 - .long 1049972438 - .long 2766187256 - .long 1063437894 - .long 1804579484 - .long 1047847843 - .long 3695969289 - .long 1060370770 - .long 2617238373 - .long 1046675948 - .long 3095830084 - .long 1060095334 - .long 3789570048 - .long 1068551266 - .long 23826559 - .long 1024564412 - .long 0 - .long 0 - .long 3870939386 - .long 1070956467 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 437603223 - .long 1058106113 - .long 0 - .long 0 - .long 759330352 - .long 1057048511 - .long 0 - .long 0 - .long 3107463368 - .long 1055024340 - .long 3144465176 - .long 1066707852 - .long 2290961810 - .long 1053841035 - .long 1618153340 - .long 1066971547 - .long 3836869393 - .long 1051916624 - .long 584032116 - .long 1063985613 - .long 1245704358 - .long 1050626462 - .long 4247487438 - .long 1063561943 - .long 1669034927 - .long 1048791164 - .long 3844233498 - .long 1061142674 - .long 2706958524 - .long 1047411374 - .long 3857199098 - .long 1060281647 - .long 3593904128 - .long 1069107071 - .long 3267547836 - .long 1024679673 - .long 0 - .long 0 - .long 4076712227 - .long 1070970214 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 2107155798 - .long 1058683224 - .long 0 - .long 0 - .long 2642992129 - .long 1057424578 - .long 0 - .long 0 - .long 1936992811 - .long 1055720778 - .long 1485063559 - .long 1067198995 - .long 1432914553 - .long 1054319398 - .long 3996381654 - .long 1067075828 - .long 2833029256 - .long 1052739897 - .long 2866066872 - .long 1064499014 - .long 2432888737 - .long 1051234178 - .long 3669764559 - .long 1063748136 - .long 2458496952 - .long 1049687126 - .long 1948234989 - .long 1061614499 - .long 2843698787 - .long 1048163519 - .long 3398041407 - .long 1060559728 - .long 2829230080 - .long 1069608467 - .long 1034046433 - .long 1026788255 - .long 0 - .long 0 - .long 298675305 - .long 1070989821 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 3120498638 - .long 1059265656 - .long 0 - .long 0 - .long 2773578114 - .long 1058009312 - .long 0 - .long 0 - .long 2030783676 - .long 1056334225 - .long 2223654598 - .long 1067588288 - .long 2976134650 - .long 1054987244 - .long 706390066 - .long 1067217386 - .long 4258437615 - .long 1053416730 - .long 1066252975 - .long 1064907619 - .long 815777514 - .long 1051989462 - .long 3202745457 - .long 1064010682 - .long 2493556375 - .long 1050521105 - .long 1046243251 - .long 1062195323 - .long 2593078846 - .long 1049017717 - .long 2763962276 - .long 1060970161 - .long 701480960 - .long 1069894094 - .long 3205862232 - .long 1027177267 - .long 0 - .long 0 - .long 2267016812 - .long 1071015664 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1398462608 - .long 1059820320 - .long 0 - .long 0 - .long 26205983 - .long 1058461213 - .long 0 - .long 0 - .long 56226238 - .long 1057044964 - .long 2754706541 - .long 1067875863 - .long 2187799823 - .long 1055634437 - .long 790323742 - .long 1067402587 - .long 1372385848 - .long 1054167831 - .long 4097292716 - .long 1065372654 - .long 3348210357 - .long 1052830099 - .long 2442796466 - .long 1064337602 - .long 862608142 - .long 1051347106 - .long 170296152 - .long 1062577219 - .long 3755571428 - .long 1049933343 - .long 3614866008 - .long 1061361670 - .long 719978496 - .long 1070185448 - .long 1998842465 - .long 1027220329 - .long 0 - .long 0 - .long 3749156607 - .long 1071048258 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1330165971 - .long 1060367097 - .long 0 - .long 0 - .long 217536623 - .long 1059109098 - .long 0 - .long 0 - .long 3492120849 - .long 1057667827 - .long 602185705 - .long 1068194444 - .long 760422958 - .long 1056312597 - .long 555127889 - .long 1067545266 - .long 3139784124 - .long 1054987189 - .long 3690544014 - .long 1065666523 - .long 95707915 - .long 1053635428 - .long 4003114407 - .long 1064581412 - .long 2034926231 - .long 1052227513 - .long 3759536023 - .long 1063076341 - .long 3826928214 - .long 1050893819 - .long 3837960785 - .long 1061790379 - .long 1526325248 - .long 1070483918 - .long 2356426521 - .long 3172907104 - .long 0 - .long 0 - .long 457728975 - .long 1071088276 - .long 0 - .long 1072693248 - .long 0 - .long 4294967288 - .long 1704352102 - .long 3223426649 - .long 0 - .long 0 - .long 2284589306 - .long 1076258036 - .long 0 - .long 0 - .long 2211264291 - .long 3224142658 - .long 0 - .long 3221225472 - .long 1441186365 - .long 1077028579 - .long 1431655765 - .long 1074091349 - .long 876943673 - .long 3224837270 - .long 2863311531 - .long 3221924522 - .long 236289504 - .long 1077767485 - .long 286331153 - .long 1074860305 - .long 2805473311 - .long 3225598926 - .long 95443718 - .long 3222646875 - .long 1160476131 - .long 1078450742 - .long 463583772 - .long 1075552698 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 0 - .long 1073741824 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3349892442 - .long 3221773860 - .long 0 - .long 0 - .long 3913197405 - .long 1074501181 - .long 0 - .long 0 - .long 2494034522 - .long 3222222818 - .long 1264738763 - .long 3220568452 - .long 1520293906 - .long 1074899632 - .long 1958936600 - .long 1073411493 - .long 2133649635 - .long 3222535819 - .long 4270740730 - .long 3221058356 - .long 1728930189 - .long 1075224844 - .long 1303998552 - .long 1073799186 - .long 618611933 - .long 3222903903 - .long 1769828046 - .long 3221422190 - .long 2200537986 - .long 1075641421 - .long 433361110 - .long 1074105369 - .long 719595600 - .long 3219800832 - .long 294527206 - .long 1014656440 - .long 0 - .long 1073741824 - .long 3811788216 - .long 3218400550 - .long 0 - .long 0 - .long 0 - .long 0 - .long 724322768 - .long 3220364956 - .long 0 - .long 0 - .long 643153048 - .long 1072905816 - .long 0 - .long 0 - .long 4285079458 - .long 3220412206 - .long 3912524733 - .long 3220106631 - .long 118362272 - .long 1072952754 - .long 4107767972 - .long 1072827408 - .long 2689502883 - .long 3220460570 - .long 946523347 - .long 3220256414 - .long 573204189 - .long 1073001761 - .long 581531518 - .long 1072826391 - .long 1386236526 - .long 3220510607 - .long 3718905905 - .long 3220316471 - .long 1145558140 - .long 1073052673 - .long 513572637 - .long 1072861969 - .long 716700048 - .long 3219481016 - .long 547126769 - .long 3163007173 - .long 0 - .long 1072693248 - .long 1097907398 - .long 1071420120 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3422807297 - .long 3219124495 - .long 0 - .long 0 - .long 1151658053 - .long 1071494715 - .long 0 - .long 0 - .long 929607071 - .long 3218829988 - .long 1037049034 - .long 3219520953 - .long 2786928657 - .long 1071215282 - .long 1447406859 - .long 1072265209 - .long 3490952107 - .long 3218574499 - .long 3205232916 - .long 3219452306 - .long 1297344304 - .long 1070977120 - .long 1066110976 - .long 1071946035 - .long 3803721480 - .long 3218354730 - .long 1496754229 - .long 3219290849 - .long 2982550683 - .long 1070773243 - .long 4014441989 - .long 1071736222 - .long 419968236 - .long 3219200695 - .long 3451266538 - .long 1015961163 - .long 0 - .long 1072693248 - .long 2960267235 - .long 1070745841 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1458794562 - .long 3217882198 - .long 0 - .long 0 - .long 2857777489 - .long 1070137637 - .long 0 - .long 0 - .long 1024359517 - .long 3217360179 - .long 2616040238 - .long 3219066585 - .long 1609024636 - .long 1069675088 - .long 2529240549 - .long 1071836633 - .long 1510128600 - .long 3216923761 - .long 2251697184 - .long 3218737335 - .long 1262761453 - .long 1069142850 - .long 1263091857 - .long 1071190461 - .long 3043383486 - .long 3216368839 - .long 2476932470 - .long 3218325650 - .long 3659995028 - .long 1068669200 - .long 855891755 - .long 1070696894 - .long 2583490354 - .long 3218768505 - .long 3062633575 - .long 3161492271 - .long 0 - .long 1072693248 - .long 2550940471 - .long 1069938201 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2467582782 - .long 3216740037 - .long 0 - .long 0 - .long 162150096 - .long 1068946420 - .long 0 - .long 0 - .long 3702794237 - .long 3216062800 - .long 3631919291 - .long 3218420574 - .long 3456821413 - .long 1068217218 - .long 2031366438 - .long 1071495745 - .long 1596664020 - .long 3215282929 - .long 1509038701 - .long 3218085291 - .long 583171477 - .long 1067510148 - .long 3785344682 - .long 1070618476 - .long 2402036048 - .long 3214559384 - .long 3233018412 - .long 3217396834 - .long 411280568 - .long 1066710556 - .long 1065584192 - .long 1069747896 - .long 895247324 - .long 3218303496 - .long 500078909 - .long 1013805133 - .long 0 - .long 1072693248 - .long 729983843 - .long 1068994194 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1512545955 - .long 3215602695 - .long 0 - .long 0 - .long 1127048698 - .long 1067909459 - .long 0 - .long 0 - .long 2300200450 - .long 3214738415 - .long 3593250296 - .long 3217717209 - .long 3009365544 - .long 1066902117 - .long 1127373050 - .long 1071173457 - .long 3046103305 - .long 3213854947 - .long 24583402 - .long 3217207636 - .long 4082511758 - .long 1065914199 - .long 3223889699 - .long 1070020367 - .long 548927984 - .long 3212899404 - .long 558065897 - .long 3216433066 - .long 680073315 - .long 1064940726 - .long 388873200 - .long 1068944270 - .long 3763679576 - .long 3217651189 - .long 1497360404 - .long 3157194195 - .long 0 - .long 1072693248 - .long 64931152 - .long 1067729411 - .long 0 - .long 0 - .long 0 - .long 0 - .long 1313038235 - .long 3214229379 - .long 0 - .long 0 - .long 1013878342 - .long 1067152618 - .long 0 - .long 0 - .long 3663426833 - .long 3213208931 - .long 3693284251 - .long 3216602456 - .long 650852232 - .long 1065882376 - .long 1996245381 - .long 1071000265 - .long 2008746170 - .long 3212147845 - .long 3055842593 - .long 3216062494 - .long 1495406348 - .long 1064652437 - .long 2269530157 - .long 1069711235 - .long 285563696 - .long 3211060113 - .long 1046897440 - .long 3215189513 - .long 233429731 - .long 1063453151 - .long 522045958 - .long 1068476590 - .long 2354785698 - .long 3216586427 - .long 1317599141 - .long 3159915781 - .long 0 - .long 1072693248 - .long 2828230105 - .long 1065606626 - .long 0 - .long 0 - .long 0 - .long 0 - .type Ctable,@object - .size Ctable,5632 - .align 16 -MASK_35: - .long 4294705152 - .long 4294967295 - .long 0 - .long 0 - .type MASK_35,@object - .size MASK_35,16 - .align 16 -Q_11: - .long 3103673719 - .long 1065509018 - .type Q_11,@object - .size Q_11,8 - .space 8, 0x00 # pad - .align 16 -Q_9: - .long 3213130307 - .long 1066820768 - .type Q_9,@object - .size Q_9,8 - .space 8, 0x00 # pad - .align 16 -Q_7: - .long 1388628139 - .long 1068212666 - .type Q_7,@object - .size Q_7,8 - .space 8, 0x00 # pad - .align 16 -Q_5: - .long 285812550 - .long 1069617425 - .type Q_5,@object - .size Q_5,8 - .space 8, 0x00 # pad - .align 16 -Q_3: - .long 1431655954 - .long 1070945621 - .type Q_3,@object - .size Q_3,8 - .space 8, 0x00 # pad - .align 16 -PI_INV_TABLE: - .long 0 - .long 0 - .long 2734261102 - .long 1313084713 - .long 4230436817 - .long 4113882560 - .long 3680671129 - .long 1011060801 - .long 4266746795 - .long 3736847713 - .long 3072618042 - .long 1112396512 - .long 105459434 - .long 164729372 - .long 4263373596 - .long 2972297022 - .long 3900847605 - .long 784024708 - .long 3919343654 - .long 3026157121 - .long 965858873 - .long 2203269620 - .long 2625920907 - .long 3187222587 - .long 536385535 - .long 3724908559 - .long 4012839307 - .long 1510632735 - .long 1832287951 - .long 667617719 - .long 1330003814 - .long 2657085997 - .long 1965537991 - .long 3957715323 - .long 1023883767 - .long 2320667370 - .long 1811636145 - .long 529358088 - .long 1443049542 - .long 4235946923 - .long 4040145953 - .type PI_INV_TABLE,@object - .size PI_INV_TABLE,164 - .space 12, 0x00 # pad - .align 16 -PI_4: - .long 0 - .long 1072243195 - .long 1175561766 - .long 1048908043 - .type PI_4,@object - .size PI_4,16 - .align 8 -QQ_2: - .long 1734816687 - .long 1026746297 - .type QQ_2,@object - .size QQ_2,8 - .align 8 -ONE: - .long 0 - .long 1072693248 - .type ONE,@object - .size ONE,8 - .align 8 -TWO_POW_55: - .long 0 - .long 1130364928 - .type TWO_POW_55,@object - .size TWO_POW_55,8 - .align 8 -TWO_POW_M55: - .long 0 - .long 1015021568 - .type TWO_POW_M55,@object - .size TWO_POW_M55,8 - .align 4 -NEG_ZERO: - .long 0 - .long 2147483648 - .type NEG_ZERO,@object - .size NEG_ZERO,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanf_gen.S deleted file mode 100644 index 0007a4e83c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanf_gen.S +++ /dev/null @@ -1,858 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanf_gen.c" - .text -..TXTST0: -# -- Begin tanf - .text - .align 16,0x90 - .globl tanf -tanf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_tanf.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 -..B1.2: - stmxcsr 16(%rsp) - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - jne .L_2TAG_PACKET_0.0.1 -.L_2TAG_PACKET_1.0.1: - pextrw $1, %xmm0, %eax - andw $32767, %ax - subw $128, %ax - cmpw $18175, %ax - ja .L_2TAG_PACKET_2.0.1 - movq PI_32_RECIP(%rip), %xmm1 - mulss %xmm0, %xmm1 - movapd BIT_31(%rip), %xmm7 - cvtss2si %xmm1, %edx - andpd %xmm0, %xmm7 - cvtss2sd %xmm0, %xmm0 - movq SHIFTER_16(%rip), %xmm4 - addss %xmm1, %xmm4 - addss SHIFTER(%rip), %xmm1 - subss SHIFTER_16(%rip), %xmm4 - subss SHIFTER(%rip), %xmm1 - movapd %xmm7, %xmm5 - psllq $32, %xmm7 - psllq $29, %xmm5 - xorpd %xmm5, %xmm7 - addl $1865216, %edx - movq PP_1(%rip), %xmm5 - xorpd %xmm7, %xmm5 - movq P_1(%rip), %xmm2 - xorpd %xmm7, %xmm2 - movq PP_2(%rip), %xmm6 - xorpd %xmm7, %xmm6 - movq P_2(%rip), %xmm3 - xorpd %xmm7, %xmm3 - lea Ctable(%rip), %rax - shll $3, %edx - andq $248, %rdx - addq %rdx, %rax - shlq $3, %rdx - addq %rdx, %rax - psllq $29, %xmm4 - psllq $29, %xmm1 - mulsd %xmm4, %xmm5 - mulsd %xmm1, %xmm2 - mulsd %xmm4, %xmm6 - mulsd %xmm1, %xmm3 - addsd %xmm0, %xmm5 - addsd %xmm0, %xmm2 - addsd %xmm6, %xmm5 - addsd %xmm3, %xmm2 - movq ONE(%rip), %xmm7 - divsd %xmm5, %xmm7 - mulsd 64(%rax), %xmm7 - movq 56(%rax), %xmm3 - mulsd %xmm2, %xmm3 - movq 24(%rax), %xmm4 - mulsd %xmm2, %xmm4 - movq 40(%rax), %xmm5 - mulsd %xmm2, %xmm5 - movq 8(%rax), %xmm6 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm2 - addsd 48(%rax), %xmm3 - addsd 16(%rax), %xmm4 - addsd 32(%rax), %xmm5 - addsd (%rax), %xmm6 - mulsd %xmm2, %xmm3 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm2 - addsd %xmm5, %xmm3 - addsd %xmm6, %xmm4 - mulsd %xmm2, %xmm3 - addsd %xmm4, %xmm3 - subsd %xmm7, %xmm3 - movsd %xmm3, %xmm0 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - jne .L_2TAG_PACKET_3.0.1 - cvtsd2ss %xmm0, %xmm0 - jmp ..B1.6 -.L_2TAG_PACKET_2.0.1: - jg .L_2TAG_PACKET_4.0.1 - cvtss2sd %xmm0, %xmm0 - mulsd ONE_P230(%rip), %xmm0 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - jne .L_2TAG_PACKET_3.0.1 - cvtsd2ss %xmm0, %xmm0 - jmp ..B1.6 -.L_2TAG_PACKET_4.0.1: - movd %xmm0, %eax - andl $2139095040, %eax - cmpl $2139095040, %eax - je .L_2TAG_PACKET_5.0.1 - cvtss2sd %xmm0, %xmm0 - movq %xmm0, (%rsp) -..B1.3: - movsd (%rsp), %xmm0 - call tan@PLT -..B1.9: - movsd %xmm0, 8(%rsp) -..B1.4: - movq 8(%rsp), %xmm0 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - jne .L_2TAG_PACKET_3.0.1 - cvtsd2ss %xmm0, %xmm0 - jmp ..B1.6 -.L_2TAG_PACKET_5.0.1: - subss %xmm0, %xmm0 - movl 16(%rsp), %eax - andl $-24577, %eax - cmpl 16(%rsp), %eax - je .L_2TAG_PACKET_6.0.1 - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) -.L_2TAG_PACKET_6.0.1: - jmp ..B1.6 -.L_2TAG_PACKET_7.0.1: - cvtsd2ss %xmm0, %xmm0 - jmp ..B1.6 -.L_2TAG_PACKET_0.0.1: - movl %eax, 20(%rsp) - ldmxcsr 20(%rsp) - jmp .L_2TAG_PACKET_1.0.1 -.L_2TAG_PACKET_3.0.1: - stmxcsr 20(%rsp) - movl 16(%rsp), %eax - andl $24576, %eax - orl %eax, 20(%rsp) - ldmxcsr 20(%rsp) - jmp .L_2TAG_PACKET_7.0.1 -.L_2TAG_PACKET_8.0.1: -..B1.6: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type tanf,@function - .size tanf,.-tanf - .data -# -- End tanf - .section .rodata, "a" - .align 16 - .align 16 -BIT_31: - .long 2147483648 - .long 0 - .long 0 - .long 0 - .type BIT_31,@object - .size BIT_31,16 - .align 16 -PP_1: - .long 1413742592 - .long 4156105211 - .type PP_1,@object - .size PP_1,8 - .space 8, 0x00 # pad - .align 16 -P_1: - .long 1414004736 - .long 4156105211 - .type P_1,@object - .size P_1,8 - .space 8, 0x00 # pad - .align 16 -PP_2: - .long 1280075305 - .long 4115041315 - .type PP_2,@object - .size PP_2,8 - .space 8, 0x00 # pad - .align 16 -P_2: - .long 3409656221 - .long 1972279101 - .type P_2,@object - .size P_2,8 - .space 8, 0x00 # pad - .align 16 -Ctable: - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 1431655765 - .long 1070945621 - .long 0 - .long 0 - .long 286331153 - .long 1069617425 - .long 0 - .long 0 - .long 463583772 - .long 1068212666 - .long 0 - .long 0 - .long 2354785698 - .long 1069102779 - .long 3310429884 - .long 1072703419 - .long 3693284251 - .long 1069118808 - .long 1996245381 - .long 1071000265 - .long 3055842593 - .long 1068578846 - .long 2269530157 - .long 1069711235 - .long 1046897440 - .long 1067705865 - .long 522045958 - .long 1068476590 - .long 0 - .long 0 - .long 3763679576 - .long 1070167541 - .long 404682282 - .long 1072734736 - .long 3593250296 - .long 1070233561 - .long 1127373050 - .long 1071173457 - .long 24583402 - .long 1069723988 - .long 3223889699 - .long 1070020367 - .long 558065897 - .long 1068949418 - .long 388873200 - .long 1068944270 - .long 0 - .long 0 - .long 895247324 - .long 1070819848 - .long 582494902 - .long 1072789737 - .long 3631919291 - .long 1070936926 - .long 2031366438 - .long 1071495745 - .long 1509038701 - .long 1070601643 - .long 3785344682 - .long 1070618476 - .long 3233018412 - .long 1069913186 - .long 1065584192 - .long 1069747896 - .long 0 - .long 0 - .long 2583490354 - .long 1071284857 - .long 855738471 - .long 1072873155 - .long 2616040238 - .long 1071582937 - .long 2529240549 - .long 1071836633 - .long 2251697184 - .long 1071253687 - .long 1263091857 - .long 1071190461 - .long 2476932470 - .long 1070842002 - .long 855891755 - .long 1070696894 - .long 0 - .long 0 - .long 419968236 - .long 1071717047 - .long 1813808633 - .long 1072992828 - .long 1037049034 - .long 1072037305 - .long 1447406859 - .long 1072265209 - .long 3205232916 - .long 1071968658 - .long 1066110976 - .long 1071946035 - .long 1496754229 - .long 1071807201 - .long 4014441989 - .long 1071736222 - .long 0 - .long 0 - .long 716700048 - .long 1071997368 - .long 274476850 - .long 1073161398 - .long 3912524733 - .long 1072622983 - .long 4107767972 - .long 1072827408 - .long 946523347 - .long 1072772766 - .long 581531518 - .long 1072826391 - .long 3718905905 - .long 1072832823 - .long 513572637 - .long 1072861969 - .long 0 - .long 0 - .long 719595600 - .long 1072317184 - .long 1194536594 - .long 1073399478 - .long 1264738763 - .long 1073084804 - .long 1958936600 - .long 1073411493 - .long 4270740730 - .long 1073574708 - .long 1303998552 - .long 1073799186 - .long 1769828046 - .long 1073938542 - .long 433361110 - .long 1074105369 - .long 0 - .long 0 - .long 0 - .long 1072693248 - .long 0 - .long 1073741824 - .long 0 - .long 1073741824 - .long 1431655765 - .long 1074091349 - .long 2863311531 - .long 1074440874 - .long 286331153 - .long 1074860305 - .long 95443718 - .long 1075163227 - .long 463583772 - .long 1075552698 - .long 0 - .long 0 - .long 1526324265 - .long 3217967566 - .long 457728975 - .long 1071088276 - .long 602185705 - .long 3215678092 - .long 555127889 - .long 1067545266 - .long 3690544014 - .long 3213150171 - .long 4003114407 - .long 1064581412 - .long 3759536023 - .long 3210559989 - .long 3837960785 - .long 1061790379 - .long 0 - .long 1072693248 - .long 719981842 - .long 3217669096 - .long 3749156607 - .long 1071048258 - .long 2754706541 - .long 3215359511 - .long 790323742 - .long 1067402587 - .long 4097292716 - .long 3212856302 - .long 2442796466 - .long 1064337602 - .long 170296152 - .long 3210060867 - .long 3614866008 - .long 1061361670 - .long 0 - .long 1072693248 - .long 701484222 - .long 3217377742 - .long 2267016812 - .long 1071015664 - .long 2223654598 - .long 3215071936 - .long 706390066 - .long 1067217386 - .long 1066252975 - .long 3212391267 - .long 3202745457 - .long 1064010682 - .long 1046243251 - .long 3209678971 - .long 2763962276 - .long 1060970161 - .long 0 - .long 1072693248 - .long 2829232582 - .long 3217092115 - .long 298675305 - .long 1070989821 - .long 1485063559 - .long 3214682643 - .long 3996381654 - .long 1067075828 - .long 2866066872 - .long 3211982662 - .long 3669764559 - .long 1063748136 - .long 1948234989 - .long 3209098147 - .long 3398041407 - .long 1060559728 - .long 0 - .long 1072693248 - .long 3593905368 - .long 3216590719 - .long 4076712227 - .long 1070970214 - .long 3144465176 - .long 3214191500 - .long 1618153340 - .long 1066971547 - .long 584032116 - .long 3211469261 - .long 4247487438 - .long 1063561943 - .long 3844233498 - .long 3208626322 - .long 3857199098 - .long 1060281647 - .long 0 - .long 1072693248 - .long 3789571175 - .long 3216034914 - .long 3870939386 - .long 1070956467 - .long 628750575 - .long 3213566872 - .long 2954464709 - .long 1066900026 - .long 1466315631 - .long 3210837162 - .long 2766187256 - .long 1063437894 - .long 3695969289 - .long 3207854418 - .long 3095830084 - .long 1060095334 - .long 0 - .long 1072693248 - .long 1858778712 - .long 3214984212 - .long 2242038011 - .long 1070948320 - .long 2507068734 - .long 3212502004 - .long 2446607349 - .long 1066858259 - .long 1349489537 - .long 3209765608 - .long 1721283327 - .long 1063366855 - .long 3852528092 - .long 3206760861 - .long 1758739894 - .long 1059895449 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 1431655765 - .long 1070945621 - .long 0 - .long 0 - .long 381774871 - .long 1066844524 - .long 0 - .long 0 - .long 3154187623 - .long 1063343722 - .long 0 - .long 0 - .long 2469719819 - .long 1059831159 - .long 0 - .long 1072693248 - .long 1858778712 - .long 1067500564 - .long 2242038011 - .long 1070948320 - .long 2507068734 - .long 1065018356 - .long 2446607349 - .long 1066858259 - .long 1349489537 - .long 1062281960 - .long 1721283327 - .long 1063366855 - .long 3852528092 - .long 1059277213 - .long 1758739894 - .long 1059895449 - .long 0 - .long 1072693248 - .long 3789571175 - .long 1068551266 - .long 3870939386 - .long 1070956467 - .long 628750575 - .long 1066083224 - .long 2954464709 - .long 1066900026 - .long 1466315631 - .long 1063353514 - .long 2766187256 - .long 1063437894 - .long 3695969289 - .long 1060370770 - .long 3095830084 - .long 1060095334 - .long 0 - .long 1072693248 - .long 3593905368 - .long 1069107071 - .long 4076712227 - .long 1070970214 - .long 3144465176 - .long 1066707852 - .long 1618153340 - .long 1066971547 - .long 584032116 - .long 1063985613 - .long 4247487438 - .long 1063561943 - .long 3844233498 - .long 1061142674 - .long 3857199098 - .long 1060281647 - .long 0 - .long 1072693248 - .long 2829232582 - .long 1069608467 - .long 298675305 - .long 1070989821 - .long 1485063559 - .long 1067198995 - .long 3996381654 - .long 1067075828 - .long 2866066872 - .long 1064499014 - .long 3669764559 - .long 1063748136 - .long 1948234989 - .long 1061614499 - .long 3398041407 - .long 1060559728 - .long 0 - .long 1072693248 - .long 701484222 - .long 1069894094 - .long 2267016812 - .long 1071015664 - .long 2223654598 - .long 1067588288 - .long 706390066 - .long 1067217386 - .long 1066252975 - .long 1064907619 - .long 3202745457 - .long 1064010682 - .long 1046243251 - .long 1062195323 - .long 2763962276 - .long 1060970161 - .long 0 - .long 1072693248 - .long 719981842 - .long 1070185448 - .long 3749156607 - .long 1071048258 - .long 2754706541 - .long 1067875863 - .long 790323742 - .long 1067402587 - .long 4097292716 - .long 1065372654 - .long 2442796466 - .long 1064337602 - .long 170296152 - .long 1062577219 - .long 3614866008 - .long 1061361670 - .long 0 - .long 1072693248 - .long 1526324265 - .long 1070483918 - .long 457728975 - .long 1071088276 - .long 602185705 - .long 1068194444 - .long 555127889 - .long 1067545266 - .long 3690544014 - .long 1065666523 - .long 4003114407 - .long 1064581412 - .long 3759536023 - .long 1063076341 - .long 3837960785 - .long 1061790379 - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .long 0 - .long 1073741824 - .long 0 - .long 3221225472 - .long 1431655765 - .long 1074091349 - .long 2863311531 - .long 3221924522 - .long 286331153 - .long 1074860305 - .long 95443718 - .long 3222646875 - .long 463583772 - .long 1075552698 - .long 0 - .long 0 - .long 719595600 - .long 3219800832 - .long 1194536594 - .long 1073399478 - .long 1264738763 - .long 3220568452 - .long 1958936600 - .long 1073411493 - .long 4270740730 - .long 3221058356 - .long 1303998552 - .long 1073799186 - .long 1769828046 - .long 3221422190 - .long 433361110 - .long 1074105369 - .long 0 - .long 0 - .long 716700048 - .long 3219481016 - .long 274476850 - .long 1073161398 - .long 3912524733 - .long 3220106631 - .long 4107767972 - .long 1072827408 - .long 946523347 - .long 3220256414 - .long 581531518 - .long 1072826391 - .long 3718905905 - .long 3220316471 - .long 513572637 - .long 1072861969 - .long 0 - .long 0 - .long 419968236 - .long 3219200695 - .long 1813808633 - .long 1072992828 - .long 1037049034 - .long 3219520953 - .long 1447406859 - .long 1072265209 - .long 3205232916 - .long 3219452306 - .long 1066110976 - .long 1071946035 - .long 1496754229 - .long 3219290849 - .long 4014441989 - .long 1071736222 - .long 0 - .long 0 - .long 2583490354 - .long 3218768505 - .long 855738471 - .long 1072873155 - .long 2616040238 - .long 3219066585 - .long 2529240549 - .long 1071836633 - .long 2251697184 - .long 3218737335 - .long 1263091857 - .long 1071190461 - .long 2476932470 - .long 3218325650 - .long 855891755 - .long 1070696894 - .long 0 - .long 0 - .long 895247324 - .long 3218303496 - .long 582494902 - .long 1072789737 - .long 3631919291 - .long 3218420574 - .long 2031366438 - .long 1071495745 - .long 1509038701 - .long 3218085291 - .long 3785344682 - .long 1070618476 - .long 3233018412 - .long 3217396834 - .long 1065584192 - .long 1069747896 - .long 0 - .long 0 - .long 3763679576 - .long 3217651189 - .long 404682282 - .long 1072734736 - .long 3593250296 - .long 3217717209 - .long 1127373050 - .long 1071173457 - .long 24583402 - .long 3217207636 - .long 3223889699 - .long 1070020367 - .long 558065897 - .long 3216433066 - .long 388873200 - .long 1068944270 - .long 0 - .long 0 - .long 2354785698 - .long 3216586427 - .long 3310429884 - .long 1072703419 - .long 3693284251 - .long 3216602456 - .long 1996245381 - .long 1071000265 - .long 3055842593 - .long 3216062494 - .long 2269530157 - .long 1069711235 - .long 1046897440 - .long 3215189513 - .long 522045958 - .long 1068476590 - .long 0 - .long 0 - .type Ctable,@object - .size Ctable,2304 - .align 16 -ONE: - .long 0 - .long 1072693248 - .type ONE,@object - .size ONE,8 - .space 8, 0x00 # pad - .align 16 -ONE_P230: - .long 4194304 - .long 1072693248 - .type ONE_P230,@object - .size ONE_P230,8 - .align 8 -PI_32_RECIP: - .long 1092811139 - .long 0 - .type PI_32_RECIP,@object - .size PI_32_RECIP,8 - .align 8 -SHIFTER_16: - .long 1296039936 - .long 0 - .type SHIFTER_16,@object - .size SHIFTER_16,8 - .align 4 -SHIFTER: - .long 1262485504 - .type SHIFTER,@object - .size SHIFTER,4 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanh_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanh_gen.S deleted file mode 100644 index 208a8d01ee..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanh_gen.S +++ /dev/null @@ -1,501 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanh_gen.c" - .text -..TXTST0: -# -- Begin tanh - .text - .align 16,0x90 - .globl tanh -tanh: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_tanh.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %eax - movl %eax, %ecx - andl $2147483647, %ecx - cmpl $2146435072, %ecx - jae ..B1.16 -..B1.2: - cmpl $1077088193, %ecx - jae ..B1.15 -..B1.3: - cmpl $1075078759, %ecx - jae ..B1.14 -..B1.4: - cmpl $1066695393, %ecx - jae ..B1.13 -..B1.5: - cmpl $1012924416, %ecx - jae ..B1.12 -..B1.6: - shrl $31, %eax - cmpl $1048576, %ecx - jb ..B1.8 -..B1.7: - movl %eax, %eax - lea _small_value_64(%rip), %rdx - movsd (%rdx,%rax,8), %xmm1 - mulsd (%rdx), %xmm1 - subsd %xmm1, %xmm0 - ret -..B1.8: - movl -8(%rsp), %edx - orl %edx, %ecx - je ..B1.10 -..B1.9: - lea _small_value_64(%rip), %rdx - movsd -8(%rsp), %xmm0 - movsd (%rdx,%rax,8), %xmm1 - mulsd (%rdx), %xmm1 - movsd %xmm1, -32(%rsp) - subsd %xmm1, %xmm0 - ret -..B1.10: - movsd -8(%rsp), %xmm0 -..B1.11: - ret -..B1.12: - movsd -8(%rsp), %xmm4 - movaps %xmm4, %xmm2 - mulsd %xmm4, %xmm2 - movaps %xmm2, %xmm1 - mulsd %xmm2, %xmm1 - movsd .L_2il0floatpacket.20(%rip), %xmm0 - movsd .L_2il0floatpacket.22(%rip), %xmm3 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm3 - addsd .L_2il0floatpacket.21(%rip), %xmm0 - addsd .L_2il0floatpacket.23(%rip), %xmm3 - mulsd %xmm1, %xmm0 - mulsd %xmm2, %xmm3 - addsd %xmm3, %xmm0 - mulsd %xmm4, %xmm0 - addsd %xmm4, %xmm0 - ret -..B1.13: - movsd -8(%rsp), %xmm0 - lea _TWO_52(%rip), %rdx - andps .L_2il0floatpacket.24(%rip), %xmm0 - xorl %r10d, %r10d - mulsd .L_2il0floatpacket.10(%rip), %xmm0 - movq $0x3ff0000000000000, %rsi - movsd .L_2il0floatpacket.11(%rip), %xmm4 - lea _TWO_32(%rip), %r9 - mulsd %xmm0, %xmm4 - lea ones(%rip), %r11 - movsd .L_2il0floatpacket.12(%rip), %xmm5 - movsd .L_2il0floatpacket.13(%rip), %xmm6 - movsd .L_2il0floatpacket.25(%rip), %xmm3 - movaps %xmm3, %xmm8 - addsd (%rdx), %xmm4 - movsd %xmm4, -32(%rsp) - movsd -32(%rsp), %xmm7 - movsd .L_2il0floatpacket.15(%rip), %xmm12 - movsd .L_2il0floatpacket.17(%rip), %xmm14 - movsd .L_2il0floatpacket.14(%rip), %xmm2 - movaps %xmm2, %xmm9 - subsd (%rdx), %xmm7 - mulsd %xmm7, %xmm5 - mulsd %xmm6, %xmm7 - subsd %xmm5, %xmm0 - movaps %xmm0, %xmm10 - movaps %xmm3, %xmm6 - movl -32(%rsp), %ecx - movl %ecx, %edi - shll $25, %edi - subsd %xmm7, %xmm10 - movaps %xmm10, %xmm11 - subsd %xmm10, %xmm0 - addsd %xmm10, %xmm8 - subsd %xmm7, %xmm0 - movsd %xmm8, -40(%rsp) - addsd %xmm0, %xmm11 - movaps %xmm11, %xmm13 - mulsd %xmm11, %xmm13 - mulsd %xmm13, %xmm12 - mulsd %xmm13, %xmm14 - addsd .L_2il0floatpacket.16(%rip), %xmm12 - addsd .L_2il0floatpacket.18(%rip), %xmm14 - mulsd %xmm13, %xmm12 - mulsd %xmm13, %xmm14 - mulsd %xmm11, %xmm12 - addsd .L_2il0floatpacket.19(%rip), %xmm14 - movl %r10d, -40(%rsp) - movsd -40(%rsp), %xmm4 - mulsd %xmm13, %xmm14 - addsd %xmm4, %xmm9 - sarl $25, %edi - subsd %xmm9, %xmm10 - subl %edi, %ecx - addsd %xmm10, %xmm0 - movslq %edi, %rdi - addsd %xmm12, %xmm0 - shlq $4, %rdi - addsd %xmm14, %xmm0 - movq __libm_exp_table_128@GOTPCREL(%rip), %r8 - shrl $7, %ecx - movsd (%r9), %xmm5 - movsd 1032(%r8,%rdi), %xmm15 - movaps %xmm15, %xmm1 - mulsd %xmm0, %xmm1 - addsd %xmm4, %xmm0 - mulsd %xmm15, %xmm4 - mulsd 1024(%r8,%rdi), %xmm0 - shlq $52, %rcx - addsd %xmm0, %xmm1 - addq %rsi, %rcx - movaps %xmm2, %xmm0 - movq %rcx, -16(%rsp) - movsd -16(%rsp), %xmm7 - mulsd %xmm7, %xmm1 - mulsd %xmm4, %xmm7 - movaps %xmm7, %xmm10 - addsd %xmm7, %xmm0 - addsd %xmm7, %xmm6 - addsd (%r9), %xmm0 - addsd %xmm5, %xmm6 - movsd %xmm0, -32(%rsp) - movsd -32(%rsp), %xmm0 - movsd %xmm6, -32(%rsp) - subsd %xmm5, %xmm0 - movsd -32(%rsp), %xmm9 - subsd %xmm0, %xmm10 - subsd (%r9), %xmm9 - addsd %xmm2, %xmm10 - movsd %xmm7, -40(%rsp) - movaps %xmm9, %xmm8 - shrl $31, %eax - subsd %xmm9, %xmm7 - addsd %xmm1, %xmm10 - addsd %xmm3, %xmm7 - movsd (%r11,%rax,8), %xmm12 - addsd %xmm7, %xmm1 - addsd %xmm1, %xmm8 - divsd %xmm8, %xmm3 - movsd %xmm3, -24(%rsp) - movl %r10d, -24(%rsp) - movsd -24(%rsp), %xmm11 - mulsd %xmm11, %xmm1 - subsd %xmm11, %xmm3 - mulsd %xmm11, %xmm9 - mulsd %xmm3, %xmm8 - addsd %xmm2, %xmm9 - addsd %xmm8, %xmm1 - movaps %xmm11, %xmm2 - addsd %xmm1, %xmm9 - addsd %xmm3, %xmm2 - mulsd %xmm9, %xmm2 - movaps %xmm0, %xmm1 - mulsd %xmm11, %xmm0 - subsd %xmm2, %xmm3 - mulsd %xmm3, %xmm1 - addsd %xmm11, %xmm3 - mulsd %xmm3, %xmm10 - movsd %xmm0, -8(%rsp) - addsd %xmm10, %xmm1 - mulsd %xmm12, %xmm0 - mulsd %xmm1, %xmm12 - addsd %xmm12, %xmm0 - ret -..B1.14: - lea _TWO_32(%rip), %rdx - lea _TWO_52(%rip), %rcx - movsd -8(%rsp), %xmm1 - movq $0x3ff0000000000000, %rsi - andps .L_2il0floatpacket.24(%rip), %xmm1 - lea twos(%rip), %r8 - movsd .L_2il0floatpacket.0(%rip), %xmm3 - movaps %xmm1, %xmm7 - movsd (%rdx), %xmm0 - lea ones(%rip), %r9 - movsd (%rcx), %xmm4 - addsd %xmm1, %xmm0 - movsd %xmm0, -32(%rsp) - movsd -32(%rsp), %xmm6 - movsd .L_2il0floatpacket.1(%rip), %xmm2 - mulsd %xmm1, %xmm2 - subsd (%rdx), %xmm6 - movsd .L_2il0floatpacket.2(%rip), %xmm12 - subsd %xmm6, %xmm7 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm7 - addsd %xmm6, %xmm4 - addsd %xmm2, %xmm7 - movsd %xmm4, -32(%rsp) - movsd -32(%rsp), %xmm5 - movsd .L_2il0floatpacket.6(%rip), %xmm9 - movsd .L_2il0floatpacket.25(%rip), %xmm11 - movslq -32(%rsp), %rdi - shlq $52, %rdi - subsd (%rcx), %xmm5 - addq %rsi, %rdi - subsd %xmm5, %xmm6 - movq %rdi, -16(%rsp) - addsd %xmm6, %xmm7 - movaps %xmm7, %xmm8 - mulsd %xmm7, %xmm8 - mulsd %xmm8, %xmm12 - mulsd %xmm8, %xmm9 - addsd .L_2il0floatpacket.3(%rip), %xmm12 - addsd .L_2il0floatpacket.7(%rip), %xmm9 - mulsd %xmm8, %xmm12 - mulsd %xmm8, %xmm9 - addsd .L_2il0floatpacket.4(%rip), %xmm12 - addsd .L_2il0floatpacket.8(%rip), %xmm9 - mulsd %xmm8, %xmm12 - mulsd %xmm8, %xmm9 - addsd .L_2il0floatpacket.5(%rip), %xmm12 - addsd .L_2il0floatpacket.9(%rip), %xmm9 - mulsd %xmm7, %xmm12 - movsd -16(%rsp), %xmm10 - subsd %xmm12, %xmm9 - divsd %xmm9, %xmm12 - mulsd .L_2il0floatpacket.10(%rip), %xmm12 - shrl $31, %eax - addsd %xmm11, %xmm12 - movl %eax, %r10d - movsd %xmm12, -24(%rsp) - xorl $1, %eax - mulsd %xmm10, %xmm12 - movsd (%r8,%rax,8), %xmm0 - addsd %xmm11, %xmm12 - divsd %xmm12, %xmm0 - movsd %xmm7, -8(%rsp) - addsd (%r9,%r10,8), %xmm0 - ret -..B1.15: - lea ones(%rip), %rdx - lea _small_value_64(%rip), %rcx - shrl $31, %eax - movsd (%rdx,%rax,8), %xmm0 - subsd (%rcx,%rax,8), %xmm0 - ret -..B1.16: - andl $-2146435073, %ecx - orl -8(%rsp), %ecx - jne ..B1.18 -..B1.17: - lea ones(%rip), %rdx - shrl $31, %eax - movsd (%rdx,%rax,8), %xmm0 - ret -..B1.18: - movsd -8(%rsp), %xmm0 -..B1.19: - ret - .align 16,0x90 - .cfi_endproc - .type tanh,@function - .size tanh,.-tanh - .data -# -- End tanh - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.24: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.24,@object - .size .L_2il0floatpacket.24,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x60000000,0x40071547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0xf85ddf44,0x3e64ae0b - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.2: - .long 0xfc0798c2,0x3fb3adff - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x0e243699,0x406e3d92 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0xefbe8c98,0x40f689a6 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x1ba09c9e,0x4156de47 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0xa57ad784,0x4018d7c2 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0x63529aa4,0x40b6b90b - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0xafc4d247,0x412d4376 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x41707ef8 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0x652b82fe,0x40671547 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x00000000,0x3f762e42 - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x3de6af28,0x3e2fdf47 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0x00000000,0xbff00000 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 8 -.L_2il0floatpacket.15: - .long 0x6887cd7c,0x3f811111 - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,8 - .align 8 -.L_2il0floatpacket.16: - .long 0x55555405,0x3fc55555 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,8 - .align 8 -.L_2il0floatpacket.17: - .long 0x87372663,0x3f56c16c - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,8 - .align 8 -.L_2il0floatpacket.18: - .long 0x5555541d,0x3fa55555 - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,8 - .align 8 -.L_2il0floatpacket.19: - .long 0x00000000,0x3fe00000 - .type .L_2il0floatpacket.19,@object - .size .L_2il0floatpacket.19,8 - .align 8 -.L_2il0floatpacket.20: - .long 0xbe3b77e0,0x3f9662a1 - .type .L_2il0floatpacket.20,@object - .size .L_2il0floatpacket.20,8 - .align 8 -.L_2il0floatpacket.21: - .long 0x1110d2a4,0x3fc11111 - .type .L_2il0floatpacket.21,@object - .size .L_2il0floatpacket.21,8 - .align 8 -.L_2il0floatpacket.22: - .long 0x00fa2d61,0xbfaba1ba - .type .L_2il0floatpacket.22,@object - .size .L_2il0floatpacket.22,8 - .align 8 -.L_2il0floatpacket.23: - .long 0x55555555,0xbfd55555 - .type .L_2il0floatpacket.23,@object - .size .L_2il0floatpacket.23,8 - .align 8 -.L_2il0floatpacket.25: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.25,@object - .size .L_2il0floatpacket.25,8 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 8 -twos: - .long 0x00000000,0x40000000 - .long 0x00000000,0xc0000000 - .type twos,@object - .size twos,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_TWO_52: - .long 0 - .long 1127219200 - .type _TWO_52,@object - .size _TWO_52,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanhf_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanhf_gen.S deleted file mode 100644 index fa590bb2e1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanhf_gen.S +++ /dev/null @@ -1,419 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanhf_gen.c" - .text -..TXTST0: -# -- Begin tanhf - .text - .align 16,0x90 - .globl tanhf -tanhf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_tanhf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - movl %edx, %eax - andl $2147483647, %eax - cmpl $1098907648, %eax - jae ..B1.15 -..B1.2: - cmpl $1065353216, %eax - jae ..B1.14 -..B1.3: - cmpl $1048576000, %eax - jae ..B1.12 -..B1.4: - cmpl $838860800, %eax - jae ..B1.11 -..B1.5: - shrl $31, %edx - cmpl $8388608, %eax - jb ..B1.7 -..B1.6: - movl %edx, %edx - lea _small_value_32(%rip), %rax - movss (%rax,%rdx,4), %xmm1 - mulss .L_2il0floatpacket.28(%rip), %xmm1 - subss %xmm1, %xmm0 - ret -..B1.7: - testl %eax, %eax - je ..B1.9 -..B1.8: - lea _small_value_32(%rip), %rax - pxor %xmm2, %xmm2 - pxor %xmm1, %xmm1 - cvtss2sd -8(%rsp), %xmm2 - movss (%rax,%rdx,4), %xmm0 - mulss .L_2il0floatpacket.28(%rip), %xmm0 - cvtss2sd %xmm0, %xmm0 - cvtsd2ss %xmm0, %xmm1 - subsd %xmm0, %xmm2 - pxor %xmm0, %xmm0 - movss %xmm1, -16(%rsp) - cvtsd2ss %xmm2, %xmm0 - ret -..B1.9: - movss -8(%rsp), %xmm0 -..B1.10: - ret -..B1.11: - pxor %xmm3, %xmm3 - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.22(%rip), %xmm4 - movsd .L_2il0floatpacket.25(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.23(%rip), %xmm4 - addsd .L_2il0floatpacket.26(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.24(%rip), %xmm4 - addsd .L_2il0floatpacket.27(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm3, %xmm4 - jmp ..B1.13 -..B1.12: - pxor %xmm3, %xmm3 - cvtss2sd -8(%rsp), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 - movsd .L_2il0floatpacket.12(%rip), %xmm4 - movsd .L_2il0floatpacket.17(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.13(%rip), %xmm4 - addsd .L_2il0floatpacket.18(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.14(%rip), %xmm4 - addsd .L_2il0floatpacket.19(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.15(%rip), %xmm4 - addsd .L_2il0floatpacket.20(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm0, %xmm2 - addsd .L_2il0floatpacket.16(%rip), %xmm4 - addsd .L_2il0floatpacket.21(%rip), %xmm2 - mulsd %xmm0, %xmm4 - mulsd %xmm1, %xmm2 - addsd %xmm2, %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm3, %xmm4 -..B1.13: - cvtsd2ss %xmm4, %xmm4 - movaps %xmm4, %xmm0 - ret -..B1.14: - pxor %xmm5, %xmm5 - movq $0x3ff0000000000000, %rax - cvtss2sd -8(%rsp), %xmm5 - andps .L_2il0floatpacket.29(%rip), %xmm5 - mulsd .L_2il0floatpacket.0(%rip), %xmm5 - movsd .L_2il0floatpacket.1(%rip), %xmm0 - movsd .L_2il0floatpacket.8(%rip), %xmm7 - addsd %xmm5, %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, -16(%rsp) - movss -16(%rsp), %xmm1 - movsd .L_2il0floatpacket.4(%rip), %xmm8 - movsd .L_2il0floatpacket.6(%rip), %xmm2 - movsd .L_2il0floatpacket.10(%rip), %xmm6 - movsd .L_2il0floatpacket.30(%rip), %xmm9 - movl -16(%rsp), %edx - shlq $52, %rdx - subss .L_2il0floatpacket.2(%rip), %xmm1 - cvtss2sd %xmm1, %xmm1 - addq %rax, %rdx - subsd %xmm1, %xmm5 - movaps %xmm5, %xmm3 - mulsd %xmm5, %xmm3 - movaps %xmm3, %xmm4 - mulsd %xmm3, %xmm4 - mulsd %xmm4, %xmm7 - mulsd %xmm4, %xmm8 - mulsd %xmm4, %xmm2 - addsd .L_2il0floatpacket.9(%rip), %xmm7 - mulsd %xmm4, %xmm6 - addsd .L_2il0floatpacket.5(%rip), %xmm8 - addsd .L_2il0floatpacket.7(%rip), %xmm2 - mulsd %xmm3, %xmm7 - addsd .L_2il0floatpacket.11(%rip), %xmm6 - mulsd %xmm4, %xmm8 - mulsd %xmm3, %xmm2 - mulsd %xmm5, %xmm7 - mulsd %xmm5, %xmm6 - addsd %xmm2, %xmm8 - addsd %xmm6, %xmm7 - movq %rdx, -24(%rsp) - addsd %xmm7, %xmm8 - movsd .L_2il0floatpacket.3(%rip), %xmm10 - addsd %xmm9, %xmm8 - mulsd -24(%rsp), %xmm8 - testl $-2147483648, -8(%rsp) - addsd %xmm9, %xmm8 - divsd %xmm8, %xmm10 - subsd %xmm10, %xmm9 - movaps %xmm9, %xmm0 - xorps .L_2il0floatpacket.31(%rip), %xmm0 - jne ..L3 - movaps %xmm9, %xmm0 -..L3: - cvtsd2ss %xmm0, %xmm0 - ret -..B1.15: - shrl $31, %edx - cmpl $2139095040, %eax - jb ..B1.20 -..B1.16: - jne ..B1.18 -..B1.17: - movl %edx, %edx - lea ones(%rip), %rax - movss (%rax,%rdx,4), %xmm0 - ret -..B1.18: - movss -8(%rsp), %xmm0 -..B1.19: - ret -..B1.20: - lea ones(%rip), %rax - lea _small_value_32(%rip), %rcx - movss (%rax,%rdx,4), %xmm0 - subss (%rcx,%rdx,4), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type tanhf,@function - .size tanhf,.-tanhf - .data -# -- End tanhf - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.29: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.29,@object - .size .L_2il0floatpacket.29,16 - .align 16 -.L_2il0floatpacket.31: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.31,@object - .size .L_2il0floatpacket.31,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x652b82fe,0x40071547 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x41600000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.3: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x55f6ce44,0x3eb67839 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 8 -.L_2il0floatpacket.5: - .long 0x17eb7c1b,0x3f83b2ac - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,8 - .align 8 -.L_2il0floatpacket.6: - .long 0x5a9238ae,0x3f24300f - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,8 - .align 8 -.L_2il0floatpacket.7: - .long 0xfe8df8b5,0x3fcebfbd - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x97a846d7,0x3ef0355a - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0xb399a1da,0x3fac6b09 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x2d719ac7,0x3f55d7f6 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 8 -.L_2il0floatpacket.11: - .long 0xfe8bdf78,0x3fe62e42 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,8 - .align 8 -.L_2il0floatpacket.12: - .long 0x8d21df9d,0x3eed02fa - .type .L_2il0floatpacket.12,@object - .size .L_2il0floatpacket.12,8 - .align 8 -.L_2il0floatpacket.13: - .long 0x4a9bd1ce,0x3f3d92d7 - .type .L_2il0floatpacket.13,@object - .size .L_2il0floatpacket.13,8 - .align 8 -.L_2il0floatpacket.14: - .long 0x4b00cfe8,0x3f6d0411 - .type .L_2il0floatpacket.14,@object - .size .L_2il0floatpacket.14,8 - .align 8 -.L_2il0floatpacket.15: - .long 0x616f3508,0x3f96640f - .type .L_2il0floatpacket.15,@object - .size .L_2il0floatpacket.15,8 - .align 8 -.L_2il0floatpacket.16: - .long 0xd4e5c3b2,0x3fc11110 - .type .L_2il0floatpacket.16,@object - .size .L_2il0floatpacket.16,8 - .align 8 -.L_2il0floatpacket.17: - .long 0x112b299f,0xbf1cd749 - .type .L_2il0floatpacket.17,@object - .size .L_2il0floatpacket.17,8 - .align 8 -.L_2il0floatpacket.18: - .long 0x6388aa74,0xbf563031 - .type .L_2il0floatpacket.18,@object - .size .L_2il0floatpacket.18,8 - .align 8 -.L_2il0floatpacket.19: - .long 0xd81e0536,0xbf821e4b - .type .L_2il0floatpacket.19,@object - .size .L_2il0floatpacket.19,8 - .align 8 -.L_2il0floatpacket.20: - .long 0xdc3e3757,0xbfaba1ab - .type .L_2il0floatpacket.20,@object - .size .L_2il0floatpacket.20,8 - .align 8 -.L_2il0floatpacket.21: - .long 0x547e4ef2,0xbfd55555 - .type .L_2il0floatpacket.21,@object - .size .L_2il0floatpacket.21,8 - .align 8 -.L_2il0floatpacket.22: - .long 0x7be81b29,0x3f6ab4a5 - .type .L_2il0floatpacket.22,@object - .size .L_2il0floatpacket.22,8 - .align 8 -.L_2il0floatpacket.23: - .long 0x9dbd8fad,0x3f966488 - .type .L_2il0floatpacket.23,@object - .size .L_2il0floatpacket.23,8 - .align 8 -.L_2il0floatpacket.24: - .long 0x0f94d287,0x3fc11111 - .type .L_2il0floatpacket.24,@object - .size .L_2il0floatpacket.24,8 - .align 8 -.L_2il0floatpacket.25: - .long 0xa5e0a14a,0xbf821629 - .type .L_2il0floatpacket.25,@object - .size .L_2il0floatpacket.25,8 - .align 8 -.L_2il0floatpacket.26: - .long 0x983e34ea,0xbfaba1b8 - .type .L_2il0floatpacket.26,@object - .size .L_2il0floatpacket.26,8 - .align 8 -.L_2il0floatpacket.27: - .long 0x5553e1cf,0xbfd55555 - .type .L_2il0floatpacket.27,@object - .size .L_2il0floatpacket.27,8 - .align 8 -.L_2il0floatpacket.30: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.30,@object - .size .L_2il0floatpacket.30,8 - .align 4 -.L_2il0floatpacket.2: - .long 0x4b000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.28: - .long 0x0d800000 - .type .L_2il0floatpacket.28,@object - .size .L_2il0floatpacket.28,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -ones: - .long 0x3f800000 - .long 0xbf800000 - .type ones,@object - .size ones,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanhl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanhl.S deleted file mode 100644 index 89bc17c931..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanhl.S +++ /dev/null @@ -1,1042 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanhl.c" - .text -..TXTST0: -# -- Begin tanhl - .text - .align 16,0x90 - .globl tanhl -tanhl: -# parameter 1: 64 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_tanhl.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - xorb %dil, %dil -..B1.2: - fnstcw 50(%rsp) -..B1.3: - movb 73(%rsp), %al - andb $-128, %al - shrb $7, %al - movzwl 72(%rsp), %ecx - andl $32767, %ecx - movzbl %al, %esi - cmpl $16388, %ecx - movzwl 50(%rsp), %eax - jge ..B1.57 -..B1.4: - cmpl $16382, %ecx - jge ..B1.46 -..B1.5: - cmpl $16376, %ecx - jge ..B1.39 -..B1.6: - cmpl $16371, %ecx - jge ..B1.32 -..B1.7: - cmpl $16365, %ecx - jge ..B1.25 -..B1.8: - cmpl $16308, %ecx - jge ..B1.18 -..B1.9: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.13 -..B1.10: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.11: - fldcw 48(%rsp) -..B1.12: - movzwl 72(%rsp), %ecx - movb $1, %dil - andl $32767, %ecx -..B1.13: - testl %ecx, %ecx - jle ..B1.66 -..B1.14: - fldt 64(%rsp) - lea _TWO_75(%rip), %rax - lea 8+_TWO_75(%rip), %rdx - fldl (%rax) - fmul %st(1), %st - fsubp %st, %st(1) - fmull (%rdx) - fstpt (%rsp) -..B1.15: - testb %dil, %dil - je ..B1.17 -..B1.16: - fldcw 50(%rsp) -..B1.17: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.18: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.22 -..B1.19: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.20: - fldcw 48(%rsp) -..B1.21: - movb $1, %dil -..B1.22: - fldt 64(%rsp) - lea _Q3(%rip), %rax - testb %dil, %dil - fldt (%rax) - fmul %st(1), %st - fmul %st(1), %st - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.24 -..B1.23: - fldcw 50(%rsp) -..B1.24: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.25: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.29 -..B1.26: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.27: - fldcw 48(%rsp) -..B1.28: - movb $1, %dil -..B1.29: - fldt 64(%rsp) - lea 16+_Q2(%rip), %rax - fld %st(0) - lea _Q2(%rip), %rdx - fmul %st(1), %st - testb %dil, %dil - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.31 -..B1.30: - fldcw 50(%rsp) -..B1.31: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.32: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.36 -..B1.33: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.34: - fldcw 48(%rsp) -..B1.35: - movb $1, %dil -..B1.36: - fldt 64(%rsp) - lea 48+_Q1(%rip), %rax - fld %st(0) - lea 32+_Q1(%rip), %rcx - fmul %st(1), %st - lea 16+_Q1(%rip), %rdx - fld %st(0) - lea _Q1(%rip), %rsi - fmul %st(1), %st - testb %dil, %dil - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - fmulp %st, %st(2) - fldt (%rsi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt (%rsp) - je ..B1.38 -..B1.37: - fldcw 50(%rsp) -..B1.38: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.39: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.43 -..B1.40: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.41: - fldcw 48(%rsp) -..B1.42: - movb $1, %dil -..B1.43: - fldt 64(%rsp) - lea _TWO_52H(%rip), %rax - fld %st(0) - fld %st(1) - fld %st(2) - lea 240+_Q(%rip), %rdx - fmul %st(3), %st - lea 208+_Q(%rip), %rcx - fld %st(0) - lea 176+_Q(%rip), %rsi - fmul %st(1), %st - lea 144+_Q(%rip), %r8 - fldl (%rax) - lea 112+_Q(%rip), %r9 - fmul %st(5), %st - lea 80+_Q(%rip), %r10 - lea 48+_Q(%rip), %r11 - lea 16+_Q(%rip), %rax - testb %dil, %dil - fadd %st, %st(4) - fsubrp %st, %st(4) - fld %st(3) - fxch %st(3) - fsub %st(4), %st - fmul %st, %st(3) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(3) - fld %st(2) - fmul %st(2), %st - fxch %st(4) - fstpt (%rsp) - fldt (%rsp) - fmul %st(0), %st - fstpt 32(%rsp) - fldt 32(%rsp) - fxch %st(5) - fstpt 16(%rsp) - fld %st(2) - fmul %st(5), %st - faddp %st, %st(4) - fxch %st(4) - fmul %st(0), %st - fldt (%rdx) - lea 224+_Q(%rip), %rdx - fmul %st(5), %st - fldt (%rcx) - lea 192+_Q(%rip), %rcx - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rsi) - lea 160+_Q(%rip), %rsi - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r8) - lea 128+_Q(%rip), %r8 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r9) - lea 96+_Q(%rip), %r9 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r10) - lea 64+_Q(%rip), %r10 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%r11) - lea 32+_Q(%rip), %r11 - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rax) - lea _Q(%rip), %rax - faddp %st, %st(1) - fmul %st(5), %st - fldt (%rdx) - lea 272+_Q(%rip), %rdx - fmul %st(6), %st - fldt (%rcx) - lea 256+_Q(%rip), %rcx - faddp %st, %st(1) - fmul %st(6), %st - fldt (%rsi) - lea _TWO_48H(%rip), %rsi - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(6), %st - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(6) - fldt (%rax) - faddp %st, %st(6) - fxch %st(2) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fldt (%rdx) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fxch %st(3) - fmulp %st, %st(2) - fldt (%rcx) - fmul %st, %st(1) - fxch %st(1) - faddp %st, %st(3) - fldt 32(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt 16(%rsp) - fld %st(0) - fldl (%rsi) - fld %st(0) - fadd %st(4), %st - fsub %st, %st(1) - fxch %st(1) - fmul %st, %st(2) - fsubr %st, %st(4) - fxch %st(5) - faddp %st, %st(4) - fldt 64(%rsp) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldt (%rsp) - fmul %st, %st(3) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - je ..B1.80 -..B1.44: - fstpt 16(%rsp) -..B1.79: - fldcw 50(%rsp) - jmp ..B1.45 -..B1.80: - fstp %st(0) -..B1.45: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.46: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.50 -..B1.47: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.48: - fldcw 48(%rsp) -..B1.49: - movzwl 72(%rsp), %ecx - movb $1, %dil - andl $32767, %ecx -..B1.50: - fldt 64(%rsp) - lea twos(%rip), %r8 - fldt .L_2il0floatpacket.0(%rip) - lea _TWO_63H(%rip), %r9 - fstpt 32(%rsp) - lea _TWO_32(%rip), %r10 - fldt .L_2il0floatpacket.1(%rip) - lea _TWO_32P(%rip), %r11 - fxch %st(1) - fmull (%r8,%rsi,8) - lea 64+_P(%rip), %r8 - fmul %st, %st(1) - fldl (%r9) - lea 32+_P(%rip), %r9 - fadd %st, %st(2) - fxch %st(2) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(2) - fldt .L_2il0floatpacket.2(%rip) - fmul %st(2), %st - movl 16(%rsp), %edx - fsubrp %st, %st(1) - fld %st(0) - fldt .L_2il0floatpacket.3(%rip) - fmulp %st, %st(3) - movsbq %dl, %rax - fsub %st(2), %st - fldl (%r10) - lea _P(%rip), %r10 - fldl (%r11) - lea 48+_P(%rip), %r11 - fmul %st(2), %st - subl %eax, %edx - fxch %st(1) - fmul %st, %st(2) - shrl $8, %edx - fxch %st(2) - fsubrp %st, %st(1) - fld %st(0) - addl $16383, %edx - andl $32767, %edx - fxch %st(1) - fsubr %st, %st(3) - shlq $4, %rax - fxch %st(4) - fsubrp %st, %st(3) - fadd %st(2), %st - fld %st(0) - fmul %st(1), %st - fldt (%r8) - lea 16+_P(%rip), %r8 - fmul %st(1), %st - fldt (%r9) - movzwl 8+.L_2il0floatpacket.0(%rip), %r9d - faddp %st, %st(1) - fmul %st(1), %st - andl $-32768, %r9d - fldt (%r10) - orl %edx, %r9d - movq __libm_expl_table_256@GOTPCREL(%rip), %rdx - cmpl $16385, %ecx - movw %r9w, 40(%rsp) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fldl 2056(%rdx,%rax) - fldl 2048(%rdx,%rax) - fld %st(0) - fmul %st(4), %st - fxch %st(4) - fadd %st(5), %st - fmul %st(2), %st - faddp %st, %st(4) - fmul %st, %st(4) - jge ..B1.52 -..B1.51: - fldt 32(%rsp) - fld %st(1) - lea _TWO_32H(%rip), %rax - fadd %st(6), %st - fadd %st(4), %st - fsubp %st, %st(4) - fxch %st(1) - fsub %st(3), %st - faddp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fxch %st(2) - fmulp %st, %st(1) - fldt .L_2il0floatpacket.0(%rip) - fadd %st, %st(1) - fld %st(1) - fadd %st(3), %st - fdivr %st(1), %st - fld %st(2) - fldl (%rax) - fld %st(0) - fadd %st(3), %st - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fmul %st, %st(4) - fxch %st(3) - fsubr %st, %st(4) - fxch %st(2) - fsub %st(3), %st - fld %st(0) - fadd %st(4), %st - fmul %st, %st(6) - fxch %st(1) - fmul %st, %st(2) - fxch %st(6) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(4) - fmulp %st, %st(3) - fxch %st(2) - fsubrp %st, %st(3) - fldt .L_2il0floatpacket.4(%rip) - fmul %st, %st(1) - fxch %st(1) - fsubrp %st, %st(2) - fmulp %st, %st(2) - fsubp %st, %st(1) - fstpt (%rsp) - jmp ..B1.54 -..B1.52: - je ..B1.70 -..B1.53: - fstp %st(2) - fldt .L_2il0floatpacket.0(%rip) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(3) - faddp %st, %st(2) - fldt 32(%rsp) - fmulp %st, %st(2) - fadd %st, %st(1) - fldt .L_2il0floatpacket.4(%rip) - fdivp %st, %st(2) - fsubp %st, %st(1) - fstpt (%rsp) -..B1.54: - fldt (%rsp) - testq %rsi, %rsi - fld %st(0) - fchs - fcmove %st(1), %st - fstp %st(1) - fstpt (%rsp) - testb %dil, %dil - je ..B1.56 -..B1.55: - fldcw 50(%rsp) -..B1.56: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.57: - movl %eax, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.61 -..B1.58: - orl $-64768, %eax - movw %ax, 48(%rsp) -..B1.59: - fldcw 48(%rsp) -..B1.60: - movzwl 72(%rsp), %ecx - movb $1, %dil - andl $32767, %ecx -..B1.61: - cmpl $32767, %ecx - je ..B1.73 -..B1.62: - movq %rsi, %rdx - lea _small_value_80(%rip), %rax - shlq $4, %rdx - lea ones(%rip), %rcx - fldt (%rax,%rdx) - fsubrl (%rcx,%rsi,8) - fstpt (%rsp) -..B1.63: - testb %dil, %dil - je ..B1.65 -..B1.64: - fldcw 50(%rsp) -..B1.65: - fldt (%rsp) - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.66: - cmpl $0, 68(%rsp) - jne ..B1.68 -..B1.67: - cmpl $0, 64(%rsp) - je ..B1.69 -..B1.68: - fldt 64(%rsp) - lea _small_value_80(%rip), %rax - shlq $4, %rsi - fldt (%rax) - fldt (%rax,%rsi) - fmulp %st, %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubrp %st, %st(1) - fstpt (%rsp) - jmp ..B1.15 -..B1.69: - fldt 64(%rsp) - fstpt (%rsp) - jmp ..B1.15 -..B1.70: - movl 68(%rsp), %eax - cmpl $-1771674010, %eax - jb ..B1.51 -..B1.71: - jne ..B1.53 -..B1.72: - cmpl $1717986918, 64(%rsp) - jb ..B1.51 - jmp ..B1.53 -..B1.73: - cmpl $-2147483648, 68(%rsp) - jne ..B1.76 -..B1.74: - cmpl $0, 64(%rsp) - jne ..B1.76 -..B1.75: - lea ones(%rip), %rax - fldl (%rax,%rsi,8) - fstpt (%rsp) - jmp ..B1.63 -..B1.76: - fldt 64(%rsp) - fstpt (%rsp) - jmp ..B1.63 - .align 16,0x90 - .cfi_endproc - .type tanhl,@function - .size tanhl,.-tanhl - .data -# -- End tanhl - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0xf0,0x17,0x5c,0x29,0x3b,0xaa,0xb8,0x07,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0xf8,0x17,0x72,0xb1,0xf6,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x30,0x71,0xd8,0x50,0x19,0xc2,0xb8,0xd4,0xbf,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 8 -twos: - .long 0x00000000,0x40000000 - .long 0x00000000,0xc0000000 - .type twos,@object - .size twos,16 - .align 8 -ones: - .long 0x00000000,0x3ff00000 - .long 0x00000000,0xbff00000 - .type ones,@object - .size ones,16 - .align 4 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_TWO_32: - .long 0 - .long 1106247680 - .type _TWO_32,@object - .size _TWO_32,8 - .align 4 -_TWO_32P: - .long 1048576 - .long 1106247680 - .type _TWO_32P,@object - .size _TWO_32P,8 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 2 -_Q3: - .word 21845 - .word 42325 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 0 - .word 0 - .type _Q3,@object - .size _Q3,16 - .align 2 -_Q2: - .word 36147 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 55638 - .word 59918 - .word 34848 - .word 34952 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,32 - .align 2 -_Q1: - .word 43688 - .word 43690 - .word 43690 - .word 43690 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 48627 - .word 34947 - .word 34952 - .word 34952 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 23872 - .word 38674 - .word 53460 - .word 56589 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 33152 - .word 13396 - .word 6324 - .word 45860 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,64 - .align 2 -_Q: - .word 43505 - .word 43690 - .word 43690 - .word 43690 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 51768 - .word 34951 - .word 34952 - .word 34952 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 53715 - .word 3536 - .word 53469 - .word 56589 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 37274 - .word 24708 - .word 42049 - .word 45863 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 51222 - .word 13677 - .word 6831 - .word 37175 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 45961 - .word 31945 - .word 59504 - .word 60265 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 5972 - .word 17449 - .word 45604 - .word 48849 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 32816 - .word 2946 - .word 4564 - .word 39596 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 14786 - .word 2112 - .word 44465 - .word 64190 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 3031 - .word 16844 - .word 22916 - .word 52030 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 47485 - .word 32270 - .word 51436 - .word 42167 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 3071 - .word 14344 - .word 30185 - .word 34131 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 24996 - .word 54454 - .word 53234 - .word 54781 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 39193 - .word 24581 - .word 37984 - .word 42131 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 5913 - .word 28127 - .word 47865 - .word 55395 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 25952 - .word 54950 - .word 21582 - .word 44803 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 43680 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 34944 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _Q,@object - .size _Q,288 - .align 2 -_P: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 10558 - .word 43680 - .word 43690 - .word 43690 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59664 - .word 43680 - .word 43690 - .word 43690 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 56450 - .word 15979 - .word 35652 - .word 34952 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 7105 - .word 47411 - .word 25657 - .word 46603 - .word 16373 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,80 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanl.S deleted file mode 100644 index 24f7d378aa..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tanl.S +++ /dev/null @@ -1,1843 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tanl.c" - .text -..TXTST0: -# -- Begin tanl - .text - .align 16,0x90 - .globl tanl -tanl: -# parameter 1: 144 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_tanl.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - subq $120, %rsp - .cfi_def_cfa_offset 144 - xorb %r13b, %r13b - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 104(%rsp) -..B1.2: - fnstcw 82(%rsp) -..B1.3: - movzwl 152(%rsp), %eax - andl $32767, %eax - movzwl 82(%rsp), %ecx - cmpl $16373, %eax - jge ..B1.41 -..B1.4: - cmpl $16371, %eax - jge ..B1.33 -..B1.5: - cmpl $16364, %eax - jge ..B1.25 -..B1.6: - cmpl $16308, %eax - jge ..B1.17 -..B1.7: - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.11 -..B1.8: - orl $-64768, %ecx - movw %cx, 80(%rsp) -..B1.9: - fldcw 80(%rsp) -..B1.10: - movzwl 152(%rsp), %eax - movb $1, %r13b - andl $32767, %eax -..B1.11: - testl %eax, %eax - jle ..B1.83 -..B1.12: - fldt 144(%rsp) - lea _TWO_75(%rip), %rax - lea 8+_TWO_75(%rip), %rdx - fldl (%rax) - fmul %st(1), %st - faddp %st, %st(1) - fmull (%rdx) - fstpt 16(%rsp) -..B1.13: - testb %r13b, %r13b - je ..B1.15 -..B1.14: - fldcw 82(%rsp) -..B1.15: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.16: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.17: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.21 -..B1.18: - orl $-64768, %ecx - movw %cx, 80(%rsp) -..B1.19: - fldcw 80(%rsp) -..B1.20: - movb $1, %r13b -..B1.21: - fldt 144(%rsp) - lea _P3(%rip), %rax - fld %st(0) - testb %r13b, %r13b - fmul %st(1), %st - fldt (%rax) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.23 -..B1.22: - fldcw 82(%rsp) -..B1.23: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.24: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.25: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.29 -..B1.26: - orl $-64768, %ecx - movw %cx, 80(%rsp) -..B1.27: - fldcw 80(%rsp) -..B1.28: - movb $1, %r13b -..B1.29: - fldt 144(%rsp) - lea 16+_P2(%rip), %rax - fld %st(0) - lea _P2(%rip), %rdx - fmul %st(1), %st - testb %r13b, %r13b - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmulp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.31 -..B1.30: - fldcw 82(%rsp) -..B1.31: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.32: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.33: - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.37 -..B1.34: - orl $-64768, %ecx - movw %cx, 80(%rsp) -..B1.35: - fldcw 80(%rsp) -..B1.36: - movb $1, %r13b -..B1.37: - fldt 144(%rsp) - lea 48+_P1(%rip), %rax - fld %st(0) - lea 32+_P1(%rip), %rcx - fmul %st(1), %st - lea 16+_P1(%rip), %rdx - fld %st(0) - lea _P1(%rip), %rsi - fmul %st(1), %st - testb %r13b, %r13b - fldt (%rax) - fmul %st(1), %st - fldt (%rdx) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rcx) - fmulp %st, %st(2) - fldt (%rsi) - faddp %st, %st(2) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - fmul %st(1), %st - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.39 -..B1.38: - fldcw 82(%rsp) -..B1.39: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.40: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.41: - movl %ecx, %edx - andl $768, %edx - cmpl $768, %edx - je ..B1.45 -..B1.42: - orl $-64768, %ecx - movw %cx, 80(%rsp) -..B1.43: - fldcw 80(%rsp) -..B1.44: - movzwl 152(%rsp), %eax - movb $1, %r13b - andl $32767, %eax -..B1.45: - movb 153(%rsp), %dl - andb $-128, %dl - shrb $7, %dl - movzbl %dl, %r12d - cmpl $16413, %eax - jge ..B1.52 -..B1.46: - fldt 144(%rsp) - lea _Pi4Inv(%rip), %rdx - fld %st(0) - fabs - fldl (%rdx) - fmul %st(1), %st - fstpt 64(%rsp) - movzwl 72(%rsp), %ecx - andl $32767, %ecx - cmpl $16383, %ecx - jge ..B1.48 -..B1.47: - fstp %st(0) - lea _TWO_48H(%rip), %rax - fld %st(0) - fld %st(1) - lea _KPi04(%rip), %rdx - fldl (%rax) - fmul %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(2) - fsub %st(2), %st - fldt (%rdx) - fmul %st(4), %st - fstpt 64(%rsp) - movl $1, %edx - fxch %st(3) - jmp ..B1.63 -..B1.48: - fstp %st(1) - negl %ecx - lea _TWO_32H(%rip), %rdi - addl $30, %ecx - movl 68(%rsp), %edx - shrl %cl, %edx - fldl (%rdi) - incl %edx - movl %edx, %esi - andl $-2, %esi - movl %esi, 32(%rsp) - cmpl $16400, %eax - fildl 32(%rsp) - jge ..B1.50 -..B1.49: - lea _Pi04x3(%rip), %rax - lea 8+_Pi04x3(%rip), %rcx - lea 16+_Pi04x3(%rip), %rsi - fldl (%rax) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl (%rcx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fld %st(0) - fldl (%rsi) - fmulp %st, %st(3) - fsub %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) - jmp ..B1.51 -..B1.50: - lea _Pi04x5(%rip), %rax - lea 8+_Pi04x5(%rip), %rcx - lea 16+_Pi04x5(%rip), %rsi - lea 24+_Pi04x5(%rip), %rdi - lea 32+_Pi04x5(%rip), %r8 - fldl (%rax) - fmul %st(1), %st - fsubrp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldl (%rcx) - fmul %st(3), %st - fsubr %st, %st(2) - fxch %st(1) - fsub %st(2), %st - fsubp %st, %st(1) - faddp %st, %st(3) - fld %st(0) - fldl (%rsi) - fmul %st(3), %st - fsubr %st, %st(1) - fld %st(1) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(4) - faddp %st, %st(2) - fldl (%rdi) - fmul %st(3), %st - fsubr %st, %st(1) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(1) - fsubrp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fldl (%r8) - fmulp %st, %st(2) - fld %st(0) - fsub %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - fsubrp %st, %st(1) - faddp %st, %st(2) -..B1.51: - lea _TWO_48H(%rip), %rax - fld %st(0) - fld %st(1) - lea _ones(%rip), %rcx - lea _KPi04(%rip), %rsi - fldl (%rax) - fmul %st, %st(2) - fxch %st(1) - fadd %st(2), %st - fsubp %st, %st(2) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldl (%rcx,%r12,8) - fmul %st, %st(2) - fld %st(2) - fxch %st(1) - fmulp %st, %st(4) - fadd %st(3), %st - fstpt 144(%rsp) - fldt 144(%rsp) - fldt (%rsi) - fmul %st(1), %st - fstpt 64(%rsp) - jmp ..B1.63 -..B1.52: - cmpl $32767, %eax - jne ..B1.61 -..B1.53: - cmpl $-2147483648, 148(%rsp) - jne ..B1.56 -..B1.54: - cmpl $0, 144(%rsp) - jne ..B1.56 -..B1.55: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fstpt 16(%rsp) - jmp ..B1.57 -..B1.56: - fldt 144(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 16(%rsp) -..B1.57: - testb %r13b, %r13b - je ..B1.59 -..B1.58: - fldcw 82(%rsp) -..B1.59: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.60: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.61: - addq $-16, %rsp - .cfi_def_cfa_offset 160 - xorl %edi, %edi - fldt 160(%rsp) - lea 104(%rsp), %rsi - fabs - fstpt (%rsp) -..___tag_value_tanl.49: - call __libm_reduce_pi04l@PLT -..___tag_value_tanl.50: -..B1.97: - movl %eax, %edx - addq $16, %rsp - .cfi_def_cfa_offset 144 -..B1.62: - fldl 88(%rsp) - incl %edx - lea _TWO_48H(%rip), %rcx - fld %st(0) - movsd 88(%rsp), %xmm0 - lea _ones(%rip), %rax - fldl (%rcx) - fldl (%rax,%r12,8) - lea _KPi04(%rip), %r12 - mulsd (%rcx), %xmm0 - fldt (%r12) - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fadd %st, %st(4) - fsubrp %st, %st(4) - fxch %st(3) - fsubr %st, %st(4) - fmul %st(1), %st - fldl 96(%rsp) - faddp %st, %st(5) - fxch %st(1) - fmulp %st, %st(4) - fld %st(0) - fadd %st(4), %st - fmul %st, %st(3) - fxch %st(3) - fstpt 64(%rsp) - fxch %st(2) - fstpt 144(%rsp) - fldt 144(%rsp) -..B1.63: - movzwl 72(%rsp), %ecx - andl $32767, %ecx - cmpl $16383, %ecx - jge ..B1.73 -..B1.64: - testb $2, %dl - je ..B1.69 -..B1.65: - lea 8+_ones(%rip), %rax - fld %st(2) - fmul %st(4), %st - lea 80+_PG(%rip), %rdx - fxch %st(4) - fstpt 32(%rsp) - fldt 32(%rsp) - lea 64+_PG(%rip), %rcx - fmul %st(1), %st - lea 48+_PG(%rip), %rsi - lea 32+_PG(%rip), %rdi - lea 16+_PG(%rip), %r8 - lea _PG(%rip), %r9 - lea _ones(%rip), %r10 - testb %r13b, %r13b - faddp %st, %st(4) - fxch %st(2) - fstpt 48(%rsp) - fldt 48(%rsp) - fmul %st(0), %st - faddp %st, %st(3) - fld %st(2) - fmul %st(3), %st - fldl (%rax) - fdiv %st(3), %st - fmul %st, %st(2) - fldt (%rdx) - fmul %st(2), %st - fldt (%rcx) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fld %st(3) - fadd %st(2), %st - fsub %st(4), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(6) - fldt (%r9) - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fld %st(2) - fsubr %st(2), %st - fxch %st(6) - fmulp %st, %st(5) - faddp %st, %st(4) - fldt 48(%rsp) - fld %st(0) - fmul %st(6), %st - fxch %st(1) - fmul %st(3), %st - fldt 32(%rsp) - fmul %st(3), %st - faddp %st, %st(2) - faddl (%r10) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(4) - fxch %st(2) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.102 -..B1.66: - fstpt 64(%rsp) -..B1.98: - fldcw 82(%rsp) - jmp ..B1.67 -..B1.102: - fstp %st(0) -..B1.67: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.68: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.69: - fld %st(0) - lea 80+_PT(%rip), %rax - fmul %st(1), %st - lea 64+_PT(%rip), %rdx - fxch %st(3) - fstpt 48(%rsp) - fld %st(2) - fmul %st(3), %st - lea 48+_PT(%rip), %rcx - fldt (%rax) - lea 32+_PT(%rip), %rsi - fmul %st(1), %st - lea 16+_PT(%rip), %rdi - fldt (%rdx) - lea _PT(%rip), %r8 - fmul %st(2), %st - testb %r13b, %r13b - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%r8) - faddp %st, %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(1) - fmul %st(2), %st - fld %st(2) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fld %st(2) - fmul %st(1), %st - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldt 48(%rsp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fadd %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) - je ..B1.103 -..B1.70: - fstpt 64(%rsp) -..B1.99: - fldcw 82(%rsp) - jmp ..B1.71 -..B1.103: - fstp %st(0) -..B1.71: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.72: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.73: - fstp %st(0) - negl %ecx - pxor %xmm2, %xmm2 - addl $30, %ecx - movl 68(%rsp), %eax - shrl %cl, %eax - movl %eax, %edi - movzbl 153(%rsp), %esi - negl %edi - testl $128, %esi - movsd .L_2il0floatpacket.0(%rip), %xmm0 - cmovne %edi, %eax - testb $2, %dl - cvtsi2sd %eax, %xmm2 - mulsd %xmm2, %xmm0 - movsd .L_2il0floatpacket.1(%rip), %xmm1 - mulsd %xmm1, %xmm2 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - movsd %xmm2, 32(%rsp) - fsubrp %st, %st(2) - fld %st(1) - fldl 32(%rsp) - fsubrp %st, %st(4) - fadd %st(3), %st - je ..B1.78 -..B1.74: - fld %st(2) - lea 80+_PT(%rip), %rdx - fmul %st(4), %st - fld %st(4) - fmul %st(2), %st - lea 64+_PT(%rip), %rcx - lea 48+_PT(%rip), %rsi - lea 32+_PT(%rip), %rdi - lea 16+_PT(%rip), %r8 - lea _PT(%rip), %r9 - addl %eax, %eax - movslq %eax, %rax - lea _TG(%rip), %r10 - lea _TT(%rip), %r11 - lea _ones(%rip), %r12 - testb %r13b, %r13b - faddp %st, %st(1) - fld %st(3) - fmul %st(4), %st - faddp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fxch %st(3) - fstpt 32(%rsp) - fxch %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - fldt (%rdx) - fmul %st(3), %st - fldt (%rcx) - fmul %st(4), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fxch %st(1) - fmul %st, %st(3) - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fldl 272(%r10,%rax,8) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(3), %st - fxch %st(4) - faddl 280(%r11,%rax,8) - fxch %st(3) - faddl 272(%r11,%rax,8) - fld %st(0) - fadd %st(4), %st - fxch %st(3) - fmull 280(%r10,%rax,8) - lea 8+_ones(%rip), %r10 - faddp %st, %st(2) - fld %st(1) - fadd %st(5), %st - fldt 32(%rsp) - fadd %st, %st(1) - fsubr %st, %st(1) - fxch %st(1) - fsubr %st, %st(6) - fxch %st(6) - fstpt 48(%rsp) - fldt 48(%rsp) - faddp %st, %st(3) - fld %st(0) - fxch %st(4) - fdivrl (%r12) - fmul %st, %st(5) - fadd %st, %st(4) - fxch %st(1) - fsubrp %st, %st(4) - fld %st(3) - fsubr %st(1), %st - fld %st(2) - fmul %st(1), %st - faddp %st, %st(6) - fxch %st(2) - fmul %st(4), %st - fld %st(4) - fmul %st(4), %st - fxch %st(4) - fadd %st(7), %st - fxch %st(7) - fmulp %st, %st(5) - faddl (%r10) - lea _GG(%rip), %r10 - faddp %st, %st(5) - fmulp %st, %st(4) - fsubp %st, %st(3) - fxch %st(3) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - faddl 272(%r10,%rax,8) - fxch %st(1) - faddl 280(%r10,%rax,8) - faddp %st, %st(1) - fstpt 16(%rsp) - fldt 48(%rsp) - je ..B1.104 -..B1.75: - fstpt 64(%rsp) -..B1.100: - fldcw 82(%rsp) - jmp ..B1.76 -..B1.104: - fstp %st(0) -..B1.76: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.77: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.78: - fld %st(0) - lea 80+_PT(%rip), %rdx - fmul %st(1), %st - lea 64+_PT(%rip), %rcx - fld %st(0) - lea 48+_PT(%rip), %rsi - fmul %st(1), %st - lea 32+_PT(%rip), %rdi - fxch %st(4) - fstpt 48(%rsp) - lea 16+_PT(%rip), %r8 - fldt (%rdx) - lea _PT(%rip), %r9 - fmul %st(4), %st - addl %eax, %eax - fldt (%rcx) - lea _TG(%rip), %r10 - fmul %st(5), %st - lea _GG(%rip), %r11 - fldt (%rsi) - lea 8+_ones(%rip), %r12 - movslq %eax, %rax - testb %r13b, %r13b - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(5), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(5) - fld %st(3) - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(4) - fmul %st(3), %st - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(3) - fxch %st(1) - fmulp %st, %st(3) - fld %st(3) - fmul %st(1), %st - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(0) - fldt 48(%rsp) - fmul %st, %st(3) - faddp %st, %st(3) - fld %st(2) - fadd %st(4), %st - fmul %st, %st(1) - fstpt 144(%rsp) - fldt 144(%rsp) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(2) - fadd %st(2), %st - fldl 272(%r10,%rax,8) - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(5), %st - fxch %st(4) - faddl 280(%r11,%rax,8) - fxch %st(5) - faddl 272(%r11,%rax,8) - fxch %st(2) - fmull 280(%r10,%rax,8) - lea _ones(%rip), %r10 - faddp %st, %st(1) - fld %st(1) - fadd %st(5), %st - fdivrl (%r12) - fmul %st, %st(3) - fld %st(3) - fadd %st(1), %st - fsubp %st, %st(4) - fld %st(3) - fsubr %st(1), %st - fld %st(3) - fmul %st(1), %st - fxch %st(2) - fmul %st, %st(7) - fxch %st(7) - faddp %st, %st(2) - fxch %st(3) - fmul %st(4), %st - fld %st(4) - fmul %st(3), %st - fxch %st(3) - fadd %st(6), %st - fxch %st(6) - fmulp %st, %st(5) - faddl (%r10) - lea _TT(%rip), %r10 - faddp %st, %st(1) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(1) - fmulp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldl 272(%r10,%rax,8) - fld %st(0) - fadd %st(2), %st - fsub %st, %st(1) - fxch %st(1) - fsubr %st(2), %st - fxch %st(3) - faddl 280(%r10,%rax,8) - faddp %st, %st(3) - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - je ..B1.105 -..B1.79: - fstpt 64(%rsp) -..B1.101: - fldcw 82(%rsp) - jmp ..B1.80 -..B1.105: - fstp %st(0) -..B1.80: - movq 104(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.82 -..B1.81: - fldt 16(%rsp) - addq $120, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 144 - .cfi_offset 12, -16 - .cfi_offset 13, -24 -..B1.82: - call __stack_chk_fail@PLT -..B1.83: - cmpl $0, 148(%rsp) - jne ..B1.85 -..B1.84: - cmpl $0, 144(%rsp) - je ..B1.86 -..B1.85: - fldt 144(%rsp) - lea _TWO_75(%rip), %rsi - movb 153(%rsp), %al - lea _small_value_80(%rip), %rcx - andb $-128, %al - lea 8+_TWO_75(%rip), %rdi - shrb $7, %al - fldl (%rsi) - fmul %st(1), %st - faddp %st, %st(1) - fldt (%rcx) - fxch %st(1) - fmull (%rdi) - movzbl %al, %edx - shlq $4, %rdx - fstpt 16(%rsp) - fldt (%rcx,%rdx) - fmulp %st, %st(1) - fstpt (%rsp) - jmp ..B1.13 -..B1.86: - fldt 144(%rsp) - fstpt 16(%rsp) - jmp ..B1.13 - .align 16,0x90 - .cfi_endproc - .type tanl,@function - .size tanl,.-tanl - .data -# -- End tanl - .section .rodata, "a" - .align 16 - .align 16 -_TWO_75: - .long 0 - .long 1151336448 - .long 0 - .long 994050048 - .type _TWO_75,@object - .size _TWO_75,16 - .align 16 -_P3: - .word 13380 - .word 43827 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _P3,@object - .size _P3,16 - .align 16 -_P2: - .word 42806 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 23834 - .word 52331 - .word 35007 - .word 34952 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P2,@object - .size _P2,32 - .align 16 -_P1: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 34953 - .word 34952 - .word 34952 - .word 34952 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 31445 - .word 3491 - .word 53469 - .word 56589 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 16733 - .word 58542 - .word 44372 - .word 45863 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,64 - .align 16 -_Pi4Inv: - .long 1841940611 - .long 1072979760 - .type _Pi4Inv,@object - .size _Pi4Inv,8 - .space 8, 0x00 # pad - .align 16 -_TWO_48H: - .long 0 - .long 1123549184 - .type _TWO_48H,@object - .size _TWO_48H,8 - .space 8, 0x00 # pad - .align 16 -_KPi04: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16387 - .word 0 - .word 0 - .word 0 - .type _KPi04,@object - .size _KPi04,16 - .align 16 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .space 8, 0x00 # pad - .align 16 -_Pi04x3: - .long 1413754112 - .long 1072243195 - .long 2563527040 - .long 1021855384 - .long 3417685868 - .long 3118450936 - .type _Pi04x3,@object - .size _Pi04x3,24 - .space 8, 0x00 # pad - .align 16 -_Pi04x5: - .long 1413480448 - .long 1072243195 - .long 442499072 - .long 1036039265 - .long 771751936 - .long 999496074 - .long 622854144 - .long 963347354 - .long 1396597664 - .long 922906692 - .type _Pi04x5,@object - .size _Pi04x5,40 - .space 8, 0x00 # pad - .align 16 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 16 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 16 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 16 -_PG: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 46604 - .word 2912 - .word 24758 - .word 46603 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 64867 - .word 2218 - .word 21984 - .word 35507 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 37428 - .word 49066 - .word 48281 - .word 56811 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 28819 - .word 40692 - .word 30466 - .word 45908 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 58229 - .word 57025 - .word 27882 - .word 37211 - .word 16364 - .word 0 - .word 0 - .word 0 - .type _PG,@object - .size _PG,96 - .align 16 -_PT: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 35260 - .word 34952 - .word 34952 - .word 34952 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 59431 - .word 3445 - .word 53469 - .word 56589 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 60805 - .word 19035 - .word 42054 - .word 45863 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 32963 - .word 17667 - .word 64505 - .word 37174 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 33271 - .word 14204 - .word 52730 - .word 60442 - .word 16374 - .word 0 - .word 0 - .word 0 - .type _PT,@object - .size _PT,96 - .align 16 -_TG: - .long 2684354560 - .long 3221230545 - .long 1980244105 - .long 1046278452 - .long 0 - .long 3221225472 - .long 0 - .long 0 - .long 2684354560 - .long 3221230545 - .long 1980244105 - .long 1046278452 - .long 3758096384 - .long 3221246014 - .long 1513286675 - .long 1048381067 - .long 0 - .long 3221272655 - .long 4057975187 - .long 3193921290 - .long 2147483648 - .long 3221311866 - .long 2902494488 - .long 1046516509 - .long 3221225472 - .long 3221365863 - .long 1948335328 - .long 3196126810 - .long 2684354560 - .long 3221438007 - .long 3744091947 - .long 3192783219 - .long 2684354560 - .long 3221533379 - .long 3860423252 - .long 1047335024 - .long 2147483648 - .long 3221659806 - .long 862942416 - .long 1049198788 - .long 0 - .long 3221829776 - .long 543592927 - .long 3195468420 - .long 0 - .long 3222064283 - .long 2814267453 - .long 1048596082 - .long 536870912 - .long 3222337673 - .long 2980891112 - .long 3196362141 - .long 2684354560 - .long 3222595502 - .long 141458722 - .long 1049458206 - .long 3221225472 - .long 3223031588 - .long 2120823910 - .long 1049591613 - .long 3221225472 - .long 3223617753 - .long 663882580 - .long 3198186420 - .long 2147483648 - .long 3224659859 - .long 3051968734 - .long 3194791707 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1077176211 - .long 3051968734 - .long 1047308059 - .long 3221225472 - .long 1076134105 - .long 663882580 - .long 1050702772 - .long 3221225472 - .long 1075547940 - .long 2120823910 - .long 3197075261 - .long 2684354560 - .long 1075111854 - .long 141458722 - .long 3196941854 - .long 536870912 - .long 1074854025 - .long 2980891112 - .long 1048878493 - .long 0 - .long 1074580635 - .long 2814267453 - .long 3196079730 - .long 0 - .long 1074346128 - .long 543592927 - .long 1047984772 - .long 2147483648 - .long 1074176158 - .long 862942416 - .long 3196682436 - .long 2684354560 - .long 1074049731 - .long 3860423252 - .long 3194818672 - .long 2684354560 - .long 1073954359 - .long 3744091947 - .long 1045299571 - .long 3221225472 - .long 1073882215 - .long 1948335328 - .long 1048643162 - .long 2147483648 - .long 1073828218 - .long 2902494488 - .long 3194000157 - .long 0 - .long 1073789007 - .long 4057975187 - .long 1046437642 - .long 3758096384 - .long 1073762366 - .long 1513286675 - .long 3195864715 - .long 2684354560 - .long 1073746897 - .long 1980244105 - .long 3193762100 - .long 0 - .long 1073741824 - .long 0 - .long 0 - .long 2684354560 - .long 1073746897 - .long 1980244105 - .long 3193762100 - .type _TG,@object - .size _TG,560 - .align 16 -_TT: - .long 1610612736 - .long 3220285245 - .long 1765132704 - .long 1046851815 - .long 0 - .long 3220176896 - .long 0 - .long 0 - .long 3221225472 - .long 3219980491 - .long 3100042604 - .long 3192709428 - .long 1073741824 - .long 3219800832 - .long 2956254064 - .long 1046813655 - .long 0 - .long 3219635098 - .long 829070670 - .long 1046664815 - .long 0 - .long 3219481016 - .long 3358544266 - .long 3195362300 - .long 2147483648 - .long 3219336728 - .long 4185368031 - .long 3193047295 - .long 536870912 - .long 3219200695 - .long 1373988029 - .long 1045159724 - .long 0 - .long 3219014926 - .long 4104169752 - .long 3192540796 - .long 2147483648 - .long 3218768505 - .long 843197631 - .long 3193568495 - .long 0 - .long 3218531914 - .long 1839318447 - .long 1044402419 - .long 1073741824 - .long 3218303496 - .long 1215676724 - .long 1044727608 - .long 1610612736 - .long 3218081786 - .long 2922073518 - .long 3193275942 - .long 0 - .long 3217651190 - .long 2818065035 - .long 1045408462 - .long 2147483648 - .long 3217226924 - .long 2142552361 - .long 1043903475 - .long 2147483648 - .long 3216586427 - .long 1153689642 - .long 3190339163 - .long 2147483648 - .long 3215533863 - .long 3288774277 - .long 3189012002 - .long 0 - .long 0 - .long 0 - .long 0 - .long 2147483648 - .long 1068050215 - .long 3288774277 - .long 1041528354 - .long 2147483648 - .long 1069102779 - .long 1153689642 - .long 1042855515 - .long 2147483648 - .long 1069743276 - .long 2142552361 - .long 3191387123 - .long 0 - .long 1070167542 - .long 2818065035 - .long 3192892110 - .long 1610612736 - .long 1070598138 - .long 2922073518 - .long 1045792294 - .long 1073741824 - .long 1070819848 - .long 1215676724 - .long 3192211256 - .long 0 - .long 1071048266 - .long 1839318447 - .long 3191886067 - .long 2147483648 - .long 1071284857 - .long 843197631 - .long 1046084847 - .long 0 - .long 1071531278 - .long 4104169752 - .long 1045057148 - .long 536870912 - .long 1071717047 - .long 1373988029 - .long 3192643372 - .long 2147483648 - .long 1071853080 - .long 4185368031 - .long 1045563647 - .long 0 - .long 1071997368 - .long 3358544266 - .long 1047878652 - .long 0 - .long 1072151450 - .long 829070670 - .long 3194148463 - .long 1073741824 - .long 1072317184 - .long 2956254064 - .long 3194297303 - .long 3221225472 - .long 1072496843 - .long 3100042604 - .long 1045225780 - .long 0 - .long 1072693248 - .long 0 - .long 0 - .long 1610612736 - .long 1072801597 - .long 1765132704 - .long 3194335463 - .type _TT,@object - .size _TT,560 - .align 16 -_GG: - .long 3221225472 - .long 1072496843 - .long 3100042604 - .long 1045225780 - .long 0 - .long 1072693248 - .long 2680413623 - .long 2803148914 - .long 1610612736 - .long 1072801597 - .long 1765132704 - .long 3194335463 - .long 2147483648 - .long 1072922365 - .long 4224648010 - .long 1047203520 - .long 0 - .long 1073058513 - .long 1429029132 - .long 1047610106 - .long 0 - .long 1073213977 - .long 2662307862 - .long 3195905419 - .long 2147483648 - .long 1073394115 - .long 2332932060 - .long 3196140229 - .long 3221225472 - .long 1073606419 - .long 4089189126 - .long 3194062807 - .long 3758096384 - .long 1073801761 - .long 295749197 - .long 3195130376 - .long 1073741824 - .long 1073958991 - .long 862942416 - .long 3195633860 - .long 0 - .long 1074158535 - .long 1551453531 - .long 3197746903 - .long 0 - .long 1074421594 - .long 590804010 - .long 3196516863 - .long 0 - .long 1074786323 - .long 1872593098 - .long 1046983523 - .long 3758096384 - .long 1075059710 - .long 2286165020 - .long 1046614587 - .long 2147483648 - .long 1075509055 - .long 2023416727 - .long 3198791271 - .long 1610612736 - .long 1076121196 - .long 3469402705 - .long 3196752904 - .long 0 - .long 1077172992 - .long 2869016295 - .long 3199393764 - .long 0 - .long 0 - .long 0 - .long 0 - .long 0 - .long 3224656640 - .long 2869016295 - .long 1051910116 - .long 1610612736 - .long 3223604844 - .long 3469402705 - .long 1049269256 - .long 2147483648 - .long 3222992703 - .long 2023416727 - .long 1051307623 - .long 3758096384 - .long 3222543358 - .long 2286165020 - .long 3194098235 - .long 0 - .long 3222269971 - .long 1872593098 - .long 3194467171 - .long 0 - .long 3221905242 - .long 590804010 - .long 1049033215 - .long 0 - .long 3221642183 - .long 1551453531 - .long 1050263255 - .long 1073741824 - .long 3221442639 - .long 862942416 - .long 1048150212 - .long 3758096384 - .long 3221285409 - .long 295749197 - .long 1047646728 - .long 3221225472 - .long 3221090067 - .long 4089189126 - .long 1046579159 - .long 2147483648 - .long 3220877763 - .long 2332932060 - .long 1048656581 - .long 0 - .long 3220697625 - .long 2662307862 - .long 1048421771 - .long 0 - .long 3220542161 - .long 1429029132 - .long 3195093754 - .long 2147483648 - .long 3220406013 - .long 4224648010 - .long 3194687168 - .long 1610612736 - .long 3220285245 - .long 1765132704 - .long 1046851815 - .long 0 - .long 3220176896 - .long 2680413623 - .long 655665266 - .long 3221225472 - .long 3219980491 - .long 3100042604 - .long 3192709428 - .type _GG,@object - .size _GG,560 - .align 16 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 8 -.L_2il0floatpacket.0: - .long 0x54400000,0x3fa921fb - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x1a626331,0x3d80b461 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgamma.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgamma.S deleted file mode 100644 index f277e018cd..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgamma.S +++ /dev/null @@ -1,3885 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tgamma.c" - .text -..TXTST0: -# -- Begin tgamma - .text - .align 16,0x90 - .globl tgamma -tgamma: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_tgamma.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %r15 - .cfi_def_cfa_offset 40 - .cfi_offset 15, -40 - pushq %rbx - .cfi_def_cfa_offset 48 - .cfi_offset 3, -48 - pushq %rbp - .cfi_def_cfa_offset 56 - .cfi_offset 6, -56 - subq $104, %rsp - .cfi_def_cfa_offset 160 - fldz - lea _zeros(%rip), %r15 - xorl %r12d, %r12d - movd %xmm0, %rax - xorb %r13b, %r13b - movsd %xmm0, 72(%rsp) - fstpt 48(%rsp) - movq (%r15), %rdx - movq %rax, 16(%rsp) - movq %rdx, 80(%rsp) -..B1.2: - fnstcw 90(%rsp) -..B1.3: - movzwl 90(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 88(%rsp) -..B1.5: - fldcw 88(%rsp) -..B1.6: - movb $1, %r13b -..B1.7: -..___tag_value_tgamma.16: - call fegetround@PLT -..___tag_value_tgamma.17: -..B1.121: - movl %eax, %r14d -..B1.8: - testl %r14d, %r14d - je ..B1.10 -..B1.9: - xorl %edi, %edi - movl $1, %r12d -..___tag_value_tgamma.18: - call fesetround@PLT -..___tag_value_tgamma.19: -..B1.10: - movzwl 78(%rsp), %edx - andl $32752, %edx - shrl $4, %edx - movl 76(%rsp), %ebx - shrl $31, %ebx - cmpl $2047, %edx - je ..B1.108 -..B1.11: - movsd 72(%rsp), %xmm2 - movsd (%r15), %xmm0 - movl 20(%rsp), %eax - andl $2147483647, %eax - movl 16(%rsp), %ecx - movl %eax, 20(%rsp) - movsd %xmm0, (%rsp) - ucomisd %xmm0, %xmm2 - jp ..B1.12 - je ..B1.103 -..B1.12: - cmpl $262144, %eax - jl ..B1.98 -..B1.13: - je ..B1.97 -..B1.14: - testl %ebx, %ebx - je ..B1.25 -..B1.15: - cmpl $1075, %edx - jge ..B1.87 -..B1.16: - lea _TWO_52H(%rip), %rax - movsd 16(%rsp), %xmm1 - movaps %xmm1, %xmm0 - addsd (%rax), %xmm0 - movsd %xmm0, 40(%rsp) - movsd 40(%rsp), %xmm0 - movl 40(%rsp), %r15d - subsd (%rax), %xmm0 - comisd %xmm1, %xmm0 - jbe ..B1.18 -..B1.17: - lea _ones(%rip), %rax - incl %r15d - subsd (%rax), %xmm0 -..B1.18: - ucomisd %xmm0, %xmm1 - jp ..B1.19 - je ..B1.82 -..B1.19: - movsd .L_2il0floatpacket.0(%rip), %xmm0 - comisd %xmm2, %xmm0 - jbe ..B1.25 -..B1.20: - testl %r12d, %r12d - je ..B1.22 -..B1.21: - movl %r14d, %edi -..___tag_value_tgamma.20: - call fesetround@PLT -..___tag_value_tgamma.21: -..B1.22: - lea _small_value_64(%rip), %rax - notl %r15d - andl $1, %r15d - testb %r13b, %r13b - movsd (%rax,%r15,8), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, 80(%rsp) - je ..B1.24 -..B1.23: - fldcw 90(%rsp) -..B1.24: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.25: - lea _overflow_boundary(%rip), %rax - comisd (%rax), %xmm2 - jae ..B1.92 -..B1.26: - testl %ebx, %ebx - je ..B1.28 -..B1.27: - lea _TWO_52H(%rip), %rax - lea 144+_tgamma_sin_table(%rip), %rcx - movsd 16(%rsp), %xmm0 - lea 128+_tgamma_sin_table(%rip), %rsi - movaps %xmm0, %xmm1 - movaps %xmm0, %xmm3 - lea 112+_tgamma_sin_table(%rip), %r8 - lea 96+_tgamma_sin_table(%rip), %r9 - fldt (%rcx) - lea 80+_tgamma_sin_table(%rip), %r10 - fldt (%rsi) - lea 64+_tgamma_sin_table(%rip), %r11 - lea 48+_tgamma_sin_table(%rip), %r15 - addsd (%rax), %xmm1 - fldt (%r8) - lea 32+_tgamma_sin_table(%rip), %rdi - fldt (%r9) - lea 16+_tgamma_sin_table(%rip), %rcx - fldt (%r10) - lea _tgamma_sin_table(%rip), %rsi - movsd %xmm1, 40(%rsp) - movsd 40(%rsp), %xmm2 - movsd (%rax), %xmm1 - subsd %xmm1, %xmm2 - subsd %xmm2, %xmm3 - movsd %xmm3, 24(%rsp) - andl $2147483647, 28(%rsp) - fldl 24(%rsp) - fld %st(0) - fmul %st(1), %st - fmul %st, %st(6) - fxch %st(6) - faddp %st, %st(5) - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - faddp %st, %st(1) - fmul %st(3), %st - faddp %st, %st(1) - fmul %st(2), %st - fld %st(1) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r15) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(1) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(1) - fmulp %st, %st(3) - fldt (%rsi) - faddp %st, %st(3) - fmulp %st, %st(2) - faddp %st, %st(1) - fstpt 48(%rsp) - jmp ..B1.29 -..B1.28: - lea _TWO_52H(%rip), %rax - movsd 16(%rsp), %xmm0 - movsd (%rax), %xmm1 -..B1.29: - addsd %xmm0, %xmm1 - movsd %xmm1, 40(%rsp) - movsd 40(%rsp), %xmm1 - movl 40(%rsp), %ecx - subsd (%rax), %xmm1 - lea _ones(%rip), %rax - movsd (%rax), %xmm3 - comisd %xmm0, %xmm1 - jbe ..B1.31 -..B1.30: - decl %ecx - subsd %xmm3, %xmm1 -..B1.31: - lea 1(%rcx), %r15d - andl $1, %r15d - comisd .L_2il0floatpacket.1(%rip), %xmm0 - jb ..B1.54 -..B1.32: - movl %ecx, %ebp - movl %ecx, %edx - andl $-16, %ebp - andl $15, %edx - movl %ebp, %esi - cmpl $16, %ecx - movl %ebp, %ecx - movaps %xmm0, %xmm2 - lea _tgamma_A_table(%rip), %r8 - subsd %xmm1, %xmm2 - movsd %xmm2, 64(%rsp) - lea -2(%rdx), %eax - fldl 64(%rsp) - cmovl %eax, %edx - sarl $2, %esi - fld %st(0) - sarl $3, %ecx - addl %ebp, %esi - sarl $4, %ebp - addl %ebp, %ecx - addl %ecx, %esi - movslq %esi, %rsi - shlq $4, %rsi - fmul %st(1), %st - testl %edx, %edx - fldt 352(%r8,%rsi) - fldt (%r8,%rsi) - fmul %st(3), %st - movsd %xmm3, 64(%rsp) - fadd %st(2), %st - fldt 176(%r8,%rsi) - movsd %xmm2, 32(%rsp) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 16(%r8,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 32(%r8,%rsi) - fmul %st(4), %st - fadd %st(3), %st - fldt 192(%r8,%rsi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 208(%r8,%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 224(%r8,%rsi) - fldt 240(%r8,%rsi) - fldt 256(%r8,%rsi) - fldt 48(%r8,%rsi) - fmul %st(6), %st - fadd %st(5), %st - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - fldt 64(%r8,%rsi) - fmul %st(5), %st - fadd %st(4), %st - faddp %st, %st(1) - fmulp %st, %st(2) - fldt 80(%r8,%rsi) - fmul %st(4), %st - fadd %st(3), %st - faddp %st, %st(1) - fmulp %st, %st(1) - fldt 96(%r8,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 128(%r8,%rsi) - fmul %st(4), %st - fadd %st(3), %st - fldt 272(%r8,%rsi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt 288(%r8,%rsi) - fldt 304(%r8,%rsi) - faddp %st, %st(2) - fldt 112(%r8,%rsi) - fmul %st(5), %st - fadd %st(4), %st - faddp %st, %st(1) - fmulp %st, %st(2) - fmulp %st, %st(1) - fldt 144(%r8,%rsi) - fmul %st(3), %st - fadd %st(2), %st - fldt 160(%r8,%rsi) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fldt 320(%r8,%rsi) - faddp %st, %st(3) - fmulp %st, %st(2) - fldt 336(%r8,%rsi) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 8(%rsp) - fldl 64(%rsp) - fld %st(0) - je ..B1.37 -..B1.33: - movl $1, %eax - jle ..B1.37 -..B1.34: - movsd %xmm0, 64(%rsp) - fldl 64(%rsp) -..B1.35: - movl %eax, 64(%rsp) - incl %eax - fildl 64(%rsp) - cmpl %edx, %eax - fsubr %st(1), %st - fmulp %st, %st(2) - jle ..B1.35 -..B1.36: - fstp %st(0) -..B1.37: - testl %ebx, %ebx - je ..B1.48 -..B1.38: - fldt 48(%rsp) - fldt 8(%rsp) - movsd %xmm0, 64(%rsp) - fldl 64(%rsp) - fmulp %st, %st(2) - fmulp %st, %st(1) - fmulp %st, %st(1) - fdivrp %st, %st(1) - movsd .L_2il0floatpacket.4(%rip), %xmm0 - fstpl (%rsp) - movsd (%rsp), %xmm1 - comisd 72(%rsp), %xmm0 - jbe ..B1.45 -..B1.39: - movaps %xmm1, %xmm0 - testl %r15d, %r15d - xorps .L_2il0floatpacket.5(%rip), %xmm0 - jne ..L42 - movaps %xmm1, %xmm0 -..L42: - testl %r12d, %r12d - je ..B1.42 -..B1.40: - movl %r14d, %edi - movsd %xmm0, 80(%rsp) -..___tag_value_tgamma.43: - call fesetround@PLT -..___tag_value_tgamma.44: -..B1.41: - movsd 80(%rsp), %xmm0 - xorl %r12d, %r12d -..B1.42: - lea _tgamma_A176_inv(%rip), %rax - testl %r15d, %r15d - movsd %xmm0, 64(%rsp) - fldl 64(%rsp) - fldt (%rax) - fmulp %st, %st(1) - je ..B1.44 -..B1.43: - fchs - fstpl 80(%rsp) - jmp ..B1.46 -..B1.44: - fstpl 80(%rsp) - jmp ..B1.46 -..B1.45: - movsd %xmm1, 80(%rsp) -..B1.46: - shll $31, %r15d - xorl %r15d, 84(%rsp) - testl %r12d, %r12d - je ..B1.51 -..B1.47: - movl %r14d, %edi -..___tag_value_tgamma.45: - call fesetround@PLT -..___tag_value_tgamma.46: - jmp ..B1.51 -..B1.48: - fstp %st(1) - fldt 8(%rsp) - testl %r12d, %r12d - fmulp %st, %st(1) - fstpt 8(%rsp) - je ..B1.50 -..B1.49: - movl %r14d, %edi -..___tag_value_tgamma.47: - call fesetround@PLT -..___tag_value_tgamma.48: -..B1.50: - fldt 8(%rsp) - fstpl 80(%rsp) -..B1.51: - testb %r13b, %r13b - je ..B1.53 -..B1.52: - movsd 32(%rsp), %xmm0 - movsd %xmm0, 24(%rsp) -..B1.122: - fldcw 90(%rsp) -..B1.53: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.54: - fldt .L_2il0floatpacket.2(%rip) - comisd %xmm0, %xmm3 - movsd %xmm0, 64(%rsp) - fldl 64(%rsp) - movsd %xmm3, 64(%rsp) - fldl 64(%rsp) - fadd %st(1), %st - fcmovbe %st(1), %st - fcomi %st(2), %st - fxch %st(2) - fstp %st(0) - jb ..B1.56 -..B1.55: - movsd %xmm3, 64(%rsp) - lea _tgamma_A150_table(%rip), %rbp - fldl 64(%rsp) - fsubrp %st, %st(2) - fxch %st(1) - fstl 24(%rsp) - fxch %st(1) - jmp ..B1.60 -..B1.56: - fldt .L_2il0floatpacket.3(%rip) - fcomi %st(2), %st - ja ..B1.58 - jp ..B1.58 -..B1.57: - fstp %st(0) - lea _local_minimum(%rip), %rax - lea _tgamma_A125_table(%rip), %rbp - movsd %xmm3, 64(%rsp) - fldl 64(%rsp) - faddl (%rax) - fsubrp %st, %st(2) - fxch %st(1) - fstl 24(%rsp) - fxch %st(1) - jmp ..B1.60 -..B1.58: - fcomip %st(2), %st - jbe ..B1.60 -..B1.59: - movsd %xmm3, 64(%rsp) - lea _tgamma_A100_table(%rip), %rbp - fldl 64(%rsp) - fsubrp %st, %st(2) - fxch %st(1) - fstl 24(%rsp) - fxch %st(1) -..B1.60: - fstp %st(1) - fldt (%rbp) - testl %edx, %edx - je ..B1.63 -..B1.61: - fldl 24(%rsp) - fldt 240(%rbp) - fmul %st(1), %st - fldt 224(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 208(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 192(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 176(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 160(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 144(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 128(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 112(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 96(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 80(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 64(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 48(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 32(%rbp) - faddp %st, %st(1) - fmul %st(1), %st - fldt 16(%rbp) - faddp %st, %st(1) - fmulp %st, %st(1) - faddp %st, %st(1) -..B1.63: - comisd %xmm0, %xmm3 - jbe ..B1.72 -..B1.64: - fstp %st(1) - testl %ebx, %ebx - je ..B1.68 -..B1.65: - fldt 48(%rsp) - testl %r12d, %r12d - fmulp %st, %st(1) - movsd %xmm3, 64(%rsp) - fldl 64(%rsp) - fdivp %st, %st(1) - fchs - fstpt (%rsp) - je ..B1.67 -..B1.66: - movl %r14d, %edi -..___tag_value_tgamma.69: - call fesetround@PLT -..___tag_value_tgamma.70: -..B1.67: - fldt (%rsp) - fchs - fstpl 80(%rsp) - shll $31, %r15d - xorl %r15d, 84(%rsp) - jmp ..B1.79 -..B1.68: - testl %r12d, %r12d - je ..B1.71 -..B1.69: - movl %r14d, %edi - fstpt (%rsp) -..___tag_value_tgamma.71: - call fesetround@PLT -..___tag_value_tgamma.72: -..B1.70: - fldt (%rsp) - movsd 16(%rsp), %xmm0 -..B1.71: - movsd %xmm0, 64(%rsp) - fldl 64(%rsp) - fdivrp %st, %st(1) - fstpl 80(%rsp) - jmp ..B1.79 -..B1.72: - testl %ebx, %ebx - je ..B1.76 -..B1.73: - fldt 48(%rsp) - testl %r12d, %r12d - fmulp %st, %st(2) - fmulp %st, %st(1) - movsd %xmm3, 64(%rsp) - fldl 64(%rsp) - fdivp %st, %st(1) - fstpt (%rsp) - je ..B1.75 -..B1.74: - movl %r14d, %edi -..___tag_value_tgamma.73: - call fesetround@PLT -..___tag_value_tgamma.74: -..B1.75: - fldt (%rsp) - fstpl 80(%rsp) - jmp ..B1.79 -..B1.76: - fstp %st(1) - testl %r12d, %r12d - je ..B1.78 -..B1.77: - movl %r14d, %edi - fstpt (%rsp) -..___tag_value_tgamma.75: - call fesetround@PLT -..___tag_value_tgamma.76: -..B1.123: - fldt (%rsp) -..B1.78: - fstpl 80(%rsp) -..B1.79: - testb %r13b, %r13b - je ..B1.81 -..B1.80: - fldcw 90(%rsp) -..B1.81: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.82: - testl %r12d, %r12d - je ..B1.84 -..B1.83: - movl %r14d, %edi -..___tag_value_tgamma.97: - call fesetround@PLT -..___tag_value_tgamma.98: -..B1.84: - movsd (%rsp), %xmm0 - testb %r13b, %r13b - divsd %xmm0, %xmm0 - movsd %xmm0, 80(%rsp) - je ..B1.86 -..B1.85: - fldcw 90(%rsp) -..B1.86: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.87: - testl %r12d, %r12d - je ..B1.89 -..B1.88: - movl %r14d, %edi -..___tag_value_tgamma.119: - call fesetround@PLT -..___tag_value_tgamma.120: -..B1.89: - movsd (%rsp), %xmm0 - testb %r13b, %r13b - divsd %xmm0, %xmm0 - movsd %xmm0, 80(%rsp) - je ..B1.91 -..B1.90: - fldcw 90(%rsp) -..B1.91: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.92: - testl %r12d, %r12d - je ..B1.94 -..B1.93: - movl %r14d, %edi -..___tag_value_tgamma.141: - call fesetround@PLT -..___tag_value_tgamma.142: -..B1.94: - lea _large_value_64(%rip), %rax - testb %r13b, %r13b - movsd (%rax), %xmm0 - mulsd %xmm0, %xmm0 - movsd %xmm0, 80(%rsp) - je ..B1.96 -..B1.95: - fldcw 90(%rsp) -..B1.96: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.97: - testl %ecx, %ecx - jne ..B1.14 -..B1.98: - testl %r12d, %r12d - je ..B1.100 -..B1.99: - movl %r14d, %edi -..___tag_value_tgamma.163: - call fesetround@PLT -..___tag_value_tgamma.164: -..B1.100: - movl %ebx, %ebx - lea _large_value_64(%rip), %rax - testb %r13b, %r13b - movsd (%rax,%rbx,8), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, 80(%rsp) - je ..B1.102 -..B1.101: - fldcw 90(%rsp) -..B1.102: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.103: - testl %r12d, %r12d - je ..B1.105 -..B1.104: - movl %r14d, %edi -..___tag_value_tgamma.185: - call fesetround@PLT -..___tag_value_tgamma.186: -..B1.105: - lea _ones(%rip), %rax - testb %r13b, %r13b - movsd (%rax,%rbx,8), %xmm0 - divsd (%rsp), %xmm0 - movsd %xmm0, 80(%rsp) - je ..B1.107 -..B1.106: - fldcw 90(%rsp) -..B1.107: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.108: - testl %r12d, %r12d - je ..B1.110 -..B1.109: - movl %r14d, %edi -..___tag_value_tgamma.207: - call fesetround@PLT -..___tag_value_tgamma.208: -..B1.110: - testl %ebx, %ebx - je ..B1.113 -..B1.111: - testl $1048575, 76(%rsp) - jne ..B1.113 -..B1.112: - cmpl $0, 72(%rsp) - je ..B1.116 -..B1.113: - lea _ones(%rip), %rax - testb %r13b, %r13b - movsd 72(%rsp), %xmm0 - mulsd (%rax), %xmm0 - movsd %xmm0, 80(%rsp) - je ..B1.115 -..B1.114: - fldcw 90(%rsp) -..B1.115: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 160 - .cfi_offset 3, -48 - .cfi_offset 6, -56 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 - .cfi_offset 15, -40 -..B1.116: - lea 8+_zeros(%rip), %rax - testb %r13b, %r13b - movsd (%rax), %xmm0 - divsd (%r15), %xmm0 - movsd %xmm0, 80(%rsp) - je ..B1.118 -..B1.117: - fldcw 90(%rsp) -..B1.118: - movsd 80(%rsp), %xmm0 - addq $104, %rsp - .cfi_def_cfa_offset 56 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 48 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 40 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type tgamma,@function - .size tgamma,.-tgamma - .data -# -- End tgamma - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.5: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0xc0672000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -.L_2il0floatpacket.1: - .long 0x00000000,0x40000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,8 - .align 8 -.L_2il0floatpacket.4: - .long 0x00000000,0xc0660000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_52H: - .long 0 - .long 1127743488 - .type _TWO_52H,@object - .size _TWO_52H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_small_value_64: - .long 0 - .long 24117248 - .long 0 - .long 2171600896 - .type _small_value_64,@object - .size _small_value_64,16 - .align 4 -_overflow_boundary: - .long 3848402504 - .long 1080390650 - .type _overflow_boundary,@object - .size _overflow_boundary,8 - .align 4 -_local_minimum: - .long 2371549438 - .long 1071483745 - .type _local_minimum,@object - .size _local_minimum,8 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 2 -_tgamma_sin_table: - .word 39192 - .word 38974 - .word 13074 - .word 53901 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 25233 - .word 24099 - .word 23041 - .word 53198 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 14010 - .word 1755 - .word 29241 - .word 50004 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 12661 - .word 39557 - .word 743 - .word 54836 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 23329 - .word 12349 - .word 46418 - .word 39360 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 43549 - .word 22984 - .word 36093 - .word 39843 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 50635 - .word 59140 - .word 19560 - .word 59922 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 39826 - .word 40176 - .word 51583 - .word 34788 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 63061 - .word 25910 - .word 60600 - .word 64252 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 21154 - .word 4399 - .word 17218 - .word 48316 - .word 16350 - .word 0 - .word 0 - .word 0 - .type _tgamma_sin_table,@object - .size _tgamma_sin_table,160 - .align 2 -_tgamma_A_table: - .word 44002 - .word 44608 - .word 34249 - .word 61198 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 28120 - .word 46089 - .word 18909 - .word 51744 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 6796 - .word 56365 - .word 948 - .word 39330 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 21872 - .word 3113 - .word 40348 - .word 48989 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 15275 - .word 60291 - .word 893 - .word 59613 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 41018 - .word 41834 - .word 14754 - .word 46766 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 10107 - .word 10320 - .word 24796 - .word 32841 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 40832 - .word 16832 - .word 38712 - .word 55795 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 8761 - .word 28554 - .word 35431 - .word 39961 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 12838 - .word 702 - .word 32174 - .word 51595 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 442 - .word 50835 - .word 62234 - .word 59850 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 53618 - .word 2208 - .word 54662 - .word 64445 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 33537 - .word 7687 - .word 12653 - .word 64976 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 5604 - .word 18060 - .word 46944 - .word 34352 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 5422 - .word 18393 - .word 57870 - .word 37869 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 27417 - .word 51069 - .word 14904 - .word 43119 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 16515 - .word 36952 - .word 46206 - .word 50255 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 22913 - .word 57796 - .word 61047 - .word 59491 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 55054 - .word 14521 - .word 23522 - .word 35521 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 3828 - .word 37429 - .word 19301 - .word 42457 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 18611 - .word 8353 - .word 56126 - .word 50041 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 63177 - .word 14708 - .word 18871 - .word 56010 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 51349 - .word 6910 - .word 18794 - .word 33038 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 59411 - .word 13918 - .word 30079 - .word 63615 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 40356 - .word 37493 - .word 20410 - .word 60584 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 59667 - .word 1960 - .word 42334 - .word 54496 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 24443 - .word 19594 - .word 17897 - .word 45291 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 24957 - .word 63432 - .word 54964 - .word 32848 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 7770 - .word 43625 - .word 45329 - .word 33905 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 34249 - .word 63845 - .word 17962 - .word 44463 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 49963 - .word 34728 - .word 51109 - .word 54055 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 57585 - .word 19701 - .word 6443 - .word 57077 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 61186 - .word 8282 - .word 25787 - .word 47837 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 26720 - .word 42621 - .word 41546 - .word 37680 - .word 49154 - .word 0 - .word 0 - .word 0 - .word 18366 - .word 28044 - .word 60147 - .word 62846 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 6968 - .word 10789 - .word 37601 - .word 32880 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 60700 - .word 57063 - .word 36736 - .word 35909 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 61862 - .word 56439 - .word 50993 - .word 40752 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 41843 - .word 39363 - .word 59360 - .word 47812 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 63511 - .word 43763 - .word 855 - .word 57724 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 64510 - .word 20731 - .word 32839 - .word 35752 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 60398 - .word 46667 - .word 43836 - .word 45454 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 49807 - .word 23281 - .word 46849 - .word 59658 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 37270 - .word 40485 - .word 38862 - .word 41131 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 55072 - .word 194 - .word 57504 - .word 62944 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 6484 - .word 60537 - .word 3975 - .word 55679 - .word 16389 - .word 0 - .word 0 - .word 0 - .word 11759 - .word 24340 - .word 39489 - .word 49925 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 22650 - .word 18020 - .word 56002 - .word 47553 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 65458 - .word 2450 - .word 7569 - .word 42768 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 2740 - .word 58538 - .word 8888 - .word 35477 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 24012 - .word 19369 - .word 10014 - .word 51050 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 32754 - .word 14555 - .word 56874 - .word 50646 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 6322 - .word 39288 - .word 8326 - .word 56228 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 51606 - .word 9409 - .word 56084 - .word 47341 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 19293 - .word 17746 - .word 29435 - .word 49011 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 22538 - .word 37169 - .word 56949 - .word 41021 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 65507 - .word 8897 - .word 64576 - .word 64934 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 21309 - .word 38834 - .word 44023 - .word 38745 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 52933 - .word 53016 - .word 24774 - .word 40865 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 4045 - .word 21262 - .word 61923 - .word 45295 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 26065 - .word 18177 - .word 3420 - .word 52438 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 45505 - .word 1968 - .word 16227 - .word 62949 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 1037 - .word 13974 - .word 10559 - .word 38924 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 39502 - .word 38026 - .word 65467 - .word 49371 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 34978 - .word 59813 - .word 17957 - .word 64181 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 4031 - .word 54789 - .word 33142 - .word 42976 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 2719 - .word 21031 - .word 60489 - .word 60330 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 20734 - .word 53765 - .word 40154 - .word 46919 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 63028 - .word 7231 - .word 17811 - .word 43725 - .word 16468 - .word 0 - .word 0 - .word 0 - .word 32606 - .word 48355 - .word 22399 - .word 43710 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 29042 - .word 46559 - .word 51950 - .word 41588 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 47396 - .word 18113 - .word 2918 - .word 37305 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 22233 - .word 40098 - .word 6225 - .word 61543 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 611 - .word 49379 - .word 57729 - .word 43678 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 10450 - .word 9675 - .word 56147 - .word 41083 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 37401 - .word 8271 - .word 47219 - .word 34504 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 34774 - .word 15943 - .word 11357 - .word 45081 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 6639 - .word 15692 - .word 42534 - .word 45536 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 51630 - .word 6378 - .word 12961 - .word 37818 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 59527 - .word 55742 - .word 41884 - .word 59714 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 15629 - .word 31501 - .word 45205 - .word 59448 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 53044 - .word 1871 - .word 3840 - .word 62990 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 49829 - .word 44544 - .word 39222 - .word 35206 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 8319 - .word 42513 - .word 20106 - .word 41214 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 56062 - .word 65309 - .word 8860 - .word 50097 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 39637 - .word 65 - .word 3840 - .word 62744 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 8819 - .word 49083 - .word 32007 - .word 40272 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 33763 - .word 5027 - .word 16250 - .word 52917 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 4751 - .word 2633 - .word 61342 - .word 35759 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 8844 - .word 54174 - .word 63762 - .word 50574 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 8334 - .word 8890 - .word 4484 - .word 39560 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 4811 - .word 30700 - .word 3620 - .word 48492 - .word 16556 - .word 0 - .word 0 - .word 0 - .word 24963 - .word 23772 - .word 56823 - .word 39936 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 33598 - .word 3946 - .word 44700 - .word 37958 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 46964 - .word 13072 - .word 50440 - .word 33963 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 60803 - .word 30641 - .word 14857 - .word 55738 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 54016 - .word 37905 - .word 6345 - .word 39067 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 52847 - .word 8984 - .word 26176 - .word 34926 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 36664 - .word 26865 - .word 35876 - .word 39170 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 52449 - .word 52544 - .word 53629 - .word 43890 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 12025 - .word 58412 - .word 44187 - .word 43481 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 31442 - .word 43543 - .word 55683 - .word 35857 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 3846 - .word 7199 - .word 40600 - .word 56439 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 59606 - .word 22885 - .word 19144 - .word 49661 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 40642 - .word 40248 - .word 11664 - .word 52797 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 62936 - .word 44294 - .word 39296 - .word 59383 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 2909 - .word 51304 - .word 40819 - .word 35037 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 28573 - .word 45780 - .word 52012 - .word 42966 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 18650 - .word 49015 - .word 44104 - .word 54288 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 55601 - .word 45035 - .word 39824 - .word 35129 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 34144 - .word 30699 - .word 57231 - .word 46486 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 46246 - .word 1151 - .word 17498 - .word 63193 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 4951 - .word 25890 - .word 61661 - .word 44882 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 6537 - .word 64648 - .word 46171 - .word 35209 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 3418 - .word 59105 - .word 44678 - .word 47100 - .word 16651 - .word 0 - .word 0 - .word 0 - .word 12496 - .word 39220 - .word 65358 - .word 37319 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 42985 - .word 15941 - .word 31416 - .word 35438 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 48809 - .word 58407 - .word 25474 - .word 63277 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 16086 - .word 46002 - .word 58617 - .word 51682 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 55157 - .word 44549 - .word 61270 - .word 35823 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 21856 - .word 27160 - .word 26283 - .word 61078 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 57421 - .word 61358 - .word 44892 - .word 42671 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 51328 - .word 61945 - .word 60158 - .word 43127 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 51733 - .word 1166 - .word 54323 - .word 42075 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 52270 - .word 46964 - .word 5686 - .word 34493 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 2083 - .word 1761 - .word 7136 - .word 54130 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 16904 - .word 37253 - .word 64186 - .word 43390 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 30519 - .word 46073 - .word 2795 - .word 46255 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 6923 - .word 13957 - .word 9241 - .word 52280 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 60036 - .word 4102 - .word 42534 - .word 62082 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 23471 - .word 7124 - .word 59867 - .word 38328 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 43652 - .word 58293 - .word 38720 - .word 48757 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 30217 - .word 2002 - .word 31515 - .word 63491 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 32079 - .word 61591 - .word 63175 - .word 42230 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 708 - .word 13247 - .word 38402 - .word 57649 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 48098 - .word 14626 - .word 62525 - .word 41069 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 41824 - .word 29269 - .word 27314 - .word 64550 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 61231 - .word 60847 - .word 45074 - .word 55796 - .word 16751 - .word 0 - .word 0 - .word 0 - .word 41222 - .word 6965 - .word 41751 - .word 35359 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 3873 - .word 17289 - .word 23432 - .word 33549 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 31267 - .word 5735 - .word 3862 - .word 59787 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 54508 - .word 24423 - .word 13439 - .word 48632 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 1373 - .word 13548 - .word 5598 - .word 33375 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 51134 - .word 47274 - .word 24966 - .word 54404 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 6577 - .word 45385 - .word 2362 - .word 45409 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 3828 - .word 42112 - .word 22766 - .word 42583 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 12956 - .word 14074 - .word 46709 - .word 41030 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 36968 - .word 52126 - .word 60443 - .word 33467 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 6923 - .word 15273 - .word 58034 - .word 52381 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 32660 - .word 35575 - .word 5652 - .word 38971 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 58845 - .word 37118 - .word 55534 - .word 41636 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 18460 - .word 14335 - .word 18170 - .word 47252 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 64257 - .word 33925 - .word 29284 - .word 56405 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 4762 - .word 47478 - .word 23933 - .word 35021 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 60070 - .word 43233 - .word 33997 - .word 44796 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 15498 - .word 56159 - .word 37136 - .word 58624 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 45618 - .word 14567 - .word 62599 - .word 39157 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 56427 - .word 8703 - .word 58958 - .word 53630 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 17868 - .word 58209 - .word 63399 - .word 38294 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 23727 - .word 3602 - .word 56293 - .word 60260 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 11566 - .word 31203 - .word 21261 - .word 41104 - .word 16856 - .word 0 - .word 0 - .word 0 - .word 50659 - .word 54826 - .word 2447 - .word 33815 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 40123 - .word 27511 - .word 38472 - .word 64120 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 60369 - .word 44894 - .word 35604 - .word 57033 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 46499 - .word 27632 - .word 5436 - .word 46222 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 30082 - .word 48277 - .word 45112 - .word 62871 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 22164 - .word 19009 - .word 61576 - .word 49094 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 46565 - .word 37565 - .word 23059 - .word 47623 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 32180 - .word 46156 - .word 40449 - .word 42167 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 43791 - .word 4543 - .word 64119 - .word 40210 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 35508 - .word 36368 - .word 50300 - .word 65316 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 24682 - .word 25954 - .word 24264 - .word 50994 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 2360 - .word 57697 - .word 56537 - .word 35655 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 35000 - .word 46863 - .word 45329 - .word 38168 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 34434 - .word 1782 - .word 6514 - .word 43468 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 42662 - .word 49367 - .word 10572 - .word 52120 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 20865 - .word 43286 - .word 18750 - .word 65033 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 9813 - .word 41323 - .word 59938 - .word 41786 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 37980 - .word 55255 - .word 47419 - .word 54914 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 3267 - .word 59107 - .word 21702 - .word 36808 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 56442 - .word 35583 - .word 19842 - .word 50549 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 14786 - .word 14705 - .word 8555 - .word 36161 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 5861 - .word 33921 - .word 55110 - .word 56952 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 12507 - .word 56326 - .word 38818 - .word 47266 - .word 16964 - .word 0 - .word 0 - .word 0 - .word 3472 - .word 16935 - .word 53300 - .word 65107 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 37860 - .word 60441 - .word 22458 - .word 61688 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 12243 - .word 56252 - .word 28016 - .word 54783 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 4212 - .word 39051 - .word 42484 - .word 44250 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 23380 - .word 35543 - .word 1695 - .word 59694 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 16948 - .word 23513 - .word 25700 - .word 44731 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 46140 - .word 40761 - .word 17956 - .word 49463 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 31263 - .word 46633 - .word 29941 - .word 41835 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 63205 - .word 61824 - .word 34317 - .word 39543 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 2572 - .word 33857 - .word 17789 - .word 63992 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 34199 - .word 18923 - .word 17606 - .word 49855 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 56334 - .word 35260 - .word 24180 - .word 33058 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 60689 - .word 52750 - .word 35337 - .word 35448 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 55452 - .word 53681 - .word 28550 - .word 40494 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 52405 - .word 7414 - .word 26290 - .word 48744 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 27310 - .word 49480 - .word 17006 - .word 61076 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 58002 - .word 7573 - .word 241 - .word 39403 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 30618 - .word 4587 - .word 23737 - .word 51968 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 41850 - .word 57331 - .word 43567 - .word 34937 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 44076 - .word 54284 - .word 21386 - .word 48090 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 47582 - .word 54033 - .word 55369 - .word 34454 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 6559 - .word 5249 - .word 7172 - .word 54302 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 25070 - .word 13550 - .word 42045 - .word 60321 - .word 17075 - .word 0 - .word 0 - .word 0 - .word 25751 - .word 29482 - .word 15881 - .word 62993 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 20424 - .word 12720 - .word 54361 - .word 59648 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 47709 - .word 29790 - .word 54671 - .word 52895 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 19590 - .word 27782 - .word 43363 - .word 42595 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 58921 - .word 35180 - .word 21269 - .word 57023 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30519 - .word 24253 - .word 59969 - .word 41055 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 16433 - .word 48540 - .word 61714 - .word 51024 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 28524 - .word 50460 - .word 14901 - .word 41561 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 3212 - .word 32692 - .word 57818 - .word 38984 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 39499 - .word 42357 - .word 61063 - .word 62879 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 23069 - .word 2532 - .word 8249 - .word 48896 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 10213 - .word 8193 - .word 57687 - .word 61912 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 54407 - .word 51976 - .word 21399 - .word 33245 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 30319 - .word 6795 - .word 56359 - .word 38081 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 56783 - .word 23918 - .word 44955 - .word 45999 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 48670 - .word 51841 - .word 19543 - .word 57851 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 40765 - .word 30890 - .word 33317 - .word 37455 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 26976 - .word 54195 - .word 64249 - .word 49555 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 53450 - .word 46734 - .word 58278 - .word 33402 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 16139 - .word 61138 - .word 10791 - .word 46069 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 19833 - .word 46025 - .word 1951 - .word 33050 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 63698 - .word 28854 - .word 16724 - .word 52116 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 51628 - .word 52030 - .word 9741 - .word 32928 - .word 17190 - .word 0 - .word 0 - .word 0 - .word 12285 - .word 10951 - .word 58642 - .word 61183 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 21683 - .word 21165 - .word 28859 - .word 57903 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 16106 - .word 65177 - .word 61473 - .word 51279 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 10066 - .word 60251 - .word 8712 - .word 41178 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 11765 - .word 63661 - .word 54012 - .word 54733 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 6745 - .word 52609 - .word 60525 - .word 37899 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 48001 - .word 64846 - .word 20212 - .word 52373 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 17748 - .word 43200 - .word 11817 - .word 41329 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 21018 - .word 45635 - .word 21983 - .word 38507 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 3148 - .word 52957 - .word 41657 - .word 61926 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 4827 - .word 784 - .word 31692 - .word 48072 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 34179 - .word 53889 - .word 29926 - .word 58425 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 50615 - .word 27492 - .word 10833 - .word 62832 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 38001 - .word 13025 - .word 51995 - .word 36075 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 57519 - .word 47991 - .word 3845 - .word 43713 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 52312 - .word 45573 - .word 61386 - .word 55158 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 13085 - .word 59531 - .word 16529 - .word 35826 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 20993 - .word 34790 - .word 57361 - .word 47533 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 9726 - .word 28278 - .word 20623 - .word 64228 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 29543 - .word 44397 - .word 26216 - .word 44369 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 63031 - .word 4436 - .word 65303 - .word 63733 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 3202 - .word 26777 - .word 12818 - .word 50273 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 59134 - .word 17584 - .word 37875 - .word 50102 - .word 17306 - .word 0 - .word 0 - .word 0 - .word 7773 - .word 6529 - .word 24897 - .word 59610 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 9176 - .word 34994 - .word 24066 - .word 56385 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 38670 - .word 17644 - .word 9278 - .word 49874 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 31722 - .word 46384 - .word 26212 - .word 39944 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 4438 - .word 35654 - .word 55200 - .word 52739 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 27356 - .word 43702 - .word 58298 - .word 35147 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 11597 - .word 6768 - .word 60887 - .word 53553 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 2200 - .word 56289 - .word 1997 - .word 41129 - .word 49151 - .word 0 - .word 0 - .word 0 - .word 51208 - .word 51045 - .word 15577 - .word 38092 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 64525 - .word 30741 - .word 24355 - .word 61096 - .word 49152 - .word 0 - .word 0 - .word 0 - .word 16273 - .word 9188 - .word 1200 - .word 47354 - .word 49153 - .word 0 - .word 0 - .word 0 - .word 32505 - .word 64701 - .word 51161 - .word 55474 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 58255 - .word 43751 - .word 28307 - .word 59734 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 597 - .word 44015 - .word 59274 - .word 34374 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 17221 - .word 11824 - .word 60854 - .word 41770 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 32240 - .word 33006 - .word 58370 - .word 52867 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 22765 - .word 17058 - .word 17899 - .word 34437 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 3694 - .word 59578 - .word 1196 - .word 45807 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 37424 - .word 8934 - .word 53804 - .word 62023 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 6800 - .word 58264 - .word 43923 - .word 42913 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 27007 - .word 15916 - .word 20851 - .word 61705 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 33570 - .word 44306 - .word 22975 - .word 48691 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _tgamma_A_table,@object - .size _tgamma_A_table,4416 - .space 192, 0x00 # pad - .align 2 -_tgamma_A176_inv: - .word 38655 - .word 8470 - .word 22633 - .word 47709 - .word 15340 - .word 0 - .word 0 - .word 0 - .type _tgamma_A176_inv,@object - .size _tgamma_A176_inv,16 - .align 2 -_tgamma_A150_table: - .word 61060 - .word 8155 - .word 61816 - .word 65535 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 47752 - .word 30749 - .word 4057 - .word 37827 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 24760 - .word 16820 - .word 52631 - .word 64803 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 36324 - .word 24890 - .word 11532 - .word 59368 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 63381 - .word 49585 - .word 20519 - .word 63827 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 54086 - .word 22318 - .word 4776 - .word 62483 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 24236 - .word 16506 - .word 21666 - .word 59746 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 44402 - .word 44414 - .word 37650 - .word 53079 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 34766 - .word 8695 - .word 24359 - .word 42592 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30542 - .word 64415 - .word 14059 - .word 59378 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 36037 - .word 62568 - .word 21045 - .word 34628 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 39650 - .word 28877 - .word 62299 - .word 64900 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 43413 - .word 4175 - .word 59877 - .word 46549 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 13603 - .word 64648 - .word 43425 - .word 47701 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 48047 - .word 22044 - .word 23868 - .word 61943 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 17548 - .word 29243 - .word 63955 - .word 38195 - .word 49138 - .word 0 - .word 0 - .word 0 - .type _tgamma_A150_table,@object - .size _tgamma_A150_table,256 - .align 2 -_tgamma_A125_table: - .word 29804 - .word 14935 - .word 58389 - .word 58038 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 54039 - .word 49353 - .word 64455 - .word 62712 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 7246 - .word 48092 - .word 40889 - .word 56162 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 5238 - .word 25576 - .word 20384 - .word 34263 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 38009 - .word 2645 - .word 35759 - .word 42176 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 32410 - .word 34387 - .word 48471 - .word 48379 - .word 49147 - .word 0 - .word 0 - .word 0 - .word 9060 - .word 33571 - .word 56968 - .word 36683 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 26873 - .word 9749 - .word 59107 - .word 49208 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 61297 - .word 63742 - .word 25286 - .word 34210 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 6011 - .word 50033 - .word 7349 - .word 46841 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 30597 - .word 45929 - .word 271 - .word 64276 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 60120 - .word 8046 - .word 54753 - .word 44175 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 32461 - .word 45691 - .word 56111 - .word 58214 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 38908 - .word 23877 - .word 33636 - .word 50495 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 35983 - .word 59115 - .word 59685 - .word 60013 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 38519 - .word 97 - .word 2340 - .word 53304 - .word 49143 - .word 0 - .word 0 - .word 0 - .type _tgamma_A125_table,@object - .size _tgamma_A125_table,256 - .align 2 -_tgamma_A100_table: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 50486 - .word 32176 - .word 26595 - .word 37828 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 33232 - .word 55464 - .word 50705 - .word 64818 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 56000 - .word 37024 - .word 35961 - .word 59472 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 6308 - .word 2395 - .word 34858 - .word 64338 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 22779 - .word 60710 - .word 1868 - .word 64356 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 33054 - .word 60854 - .word 741 - .word 65087 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 46387 - .word 11445 - .word 51950 - .word 65273 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 6735 - .word 17127 - .word 21437 - .word 65409 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 40596 - .word 22792 - .word 61241 - .word 65445 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 7521 - .word 26365 - .word 15230 - .word 65303 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 33891 - .word 37638 - .word 54039 - .word 64371 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 37411 - .word 53884 - .word 56799 - .word 60663 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 30408 - .word 30767 - .word 55068 - .word 50398 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 49794 - .word 38369 - .word 16703 - .word 62901 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 52540 - .word 1662 - .word 21259 - .word 41989 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _tgamma_A100_table,@object - .size _tgamma_A100_table,256 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgammaf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgammaf.S deleted file mode 100644 index 542a1e6d4b..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgammaf.S +++ /dev/null @@ -1,1280 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tgammaf.c" - .text -..TXTST0: -# -- Begin tgammaf - .text - .align 16,0x90 - .globl tgammaf -tgammaf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_tgammaf.1: -..L2: - - pushq %r12 - .cfi_def_cfa_offset 16 - .cfi_offset 12, -16 - pushq %r13 - .cfi_def_cfa_offset 24 - .cfi_offset 13, -24 - pushq %r14 - .cfi_def_cfa_offset 32 - .cfi_offset 14, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $32, %rsp - .cfi_def_cfa_offset 80 - xorb %r12b, %r12b - pxor %xmm2, %xmm2 - pxor %xmm1, %xmm1 - movss %xmm0, 24(%rsp) - movd %xmm0, %r14d - movss %xmm1, (%rsp) - movsd %xmm2, 8(%rsp) -..___tag_value_tgammaf.14: - call fegetround@PLT -..___tag_value_tgammaf.15: -..B1.94: - movsd 8(%rsp), %xmm2 - movl %eax, %ebp -..B1.2: - testl %ebp, %ebp - je ..B1.4 -..B1.3: - xorl %edi, %edi - movb $1, %r12b - movsd %xmm2, 8(%rsp) -..___tag_value_tgammaf.16: - call fesetround@PLT -..___tag_value_tgammaf.17: -..B1.95: - movsd 8(%rsp), %xmm2 -..B1.4: - movzwl 26(%rsp), %eax - andl $32640, %eax - shrl $7, %eax - movl 24(%rsp), %ebx - shrl $31, %ebx - cmpl $255, %eax - je ..B1.84 -..B1.5: - movss 24(%rsp), %xmm5 - andl $2147483647, %r14d - movl %r14d, 8(%rsp) - ucomiss (%rsp), %xmm5 - jp ..B1.6 - je ..B1.81 -..B1.6: - cmpl $2097152, %r14d - jle ..B1.78 -..B1.7: - testl %ebx, %ebx - je ..B1.16 -..B1.8: - cmpl $150, %eax - jge ..B1.72 -..B1.9: - movss .L_2il0floatpacket.2(%rip), %xmm3 - movss 8(%rsp), %xmm4 - movaps %xmm3, %xmm1 - movss (%rsp), %xmm0 - addss %xmm4, %xmm1 - movss %xmm1, 20(%rsp) - movss %xmm0, 16(%rsp) - movss 20(%rsp), %xmm0 - movl 20(%rsp), %r14d - subss %xmm3, %xmm0 - comiss %xmm4, %xmm0 - jbe ..B1.11 -..B1.10: - incl %r14d - subss .L_2il0floatpacket.11(%rip), %xmm0 -..B1.11: - ucomiss %xmm0, %xmm4 - jp ..B1.12 - je ..B1.69 -..B1.12: - movss .L_2il0floatpacket.3(%rip), %xmm0 - comiss %xmm5, %xmm0 - jbe ..B1.17 -..B1.13: - testb %r12b, %r12b - je ..B1.15 -..B1.14: - movl %ebp, %edi -..___tag_value_tgammaf.18: - call fesetround@PLT -..___tag_value_tgammaf.19: -..B1.15: - lea _small_value_32(%rip), %rax - notl %r14d - andl $1, %r14d - movss (%rax,%r14,4), %xmm0 - mulss .L_2il0floatpacket.4(%rip), %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.16: - movss (%rsp), %xmm0 - movss %xmm0, 16(%rsp) -..B1.17: - cvtss2sd %xmm5, %xmm5 - lea _overflow_boundary(%rip), %rdx - comisd (%rdx), %xmm5 - jae ..B1.75 -..B1.18: - movss .L_2il0floatpacket.2(%rip), %xmm9 - testl %ebx, %ebx - je ..B1.20 -..B1.19: - movss 8(%rsp), %xmm8 - movaps %xmm9, %xmm2 - movaps %xmm8, %xmm1 - addss %xmm8, %xmm2 - movss %xmm2, 20(%rsp) - pxor %xmm2, %xmm2 - movss 20(%rsp), %xmm0 - lea 8+_tgamma_sin_table(%rip), %rcx - lea 24+_tgamma_sin_table(%rip), %r8 - subss %xmm9, %xmm0 - movsd (%rcx), %xmm7 - subss %xmm0, %xmm1 - movd %xmm1, %edx - lea 40+_tgamma_sin_table(%rip), %r10 - movsd (%r8), %xmm3 - andl $2147483647, %edx - lea _tgamma_sin_table(%rip), %rsi - movl %edx, (%rsp) - lea 56+_tgamma_sin_table(%rip), %r14 - movsd (%r10), %xmm4 - lea 16+_tgamma_sin_table(%rip), %r9 - lea 32+_tgamma_sin_table(%rip), %r11 - lea 48+_tgamma_sin_table(%rip), %rdx - cvtss2sd (%rsp), %xmm2 - movaps %xmm2, %xmm6 - mulsd %xmm2, %xmm6 - mulsd %xmm6, %xmm7 - addsd %xmm6, %xmm3 - addsd %xmm6, %xmm4 - mulsd %xmm6, %xmm3 - addsd (%rsi), %xmm7 - mulsd %xmm6, %xmm4 - mulsd %xmm6, %xmm7 - addsd (%r9), %xmm3 - addsd (%r11), %xmm4 - mulsd %xmm3, %xmm7 - movsd (%r14), %xmm5 - mulsd %xmm4, %xmm7 - addsd %xmm6, %xmm5 - mulsd %xmm5, %xmm6 - addsd (%rdx), %xmm6 - mulsd %xmm6, %xmm7 - mulsd %xmm2, %xmm7 - addsd %xmm7, %xmm2 - jmp ..B1.21 -..B1.20: - movss 8(%rsp), %xmm8 -..B1.21: - movaps %xmm8, %xmm1 - addss %xmm9, %xmm8 - movss %xmm8, 20(%rsp) - movss 20(%rsp), %xmm0 - movl 20(%rsp), %ecx - subss %xmm9, %xmm0 - andl $1048575, %ecx - comiss %xmm1, %xmm0 - jbe ..B1.23 -..B1.22: - decl %ecx - subss .L_2il0floatpacket.11(%rip), %xmm0 -..B1.23: - comiss .L_2il0floatpacket.5(%rip), %xmm1 - lea 1(%rcx), %r14d - jb ..B1.39 -..B1.24: - movaps %xmm1, %xmm3 - movl %ecx, %esi - andl $-8, %esi - movl %ecx, %edx - andl $7, %edx - cmpl $8, %ecx - movl %esi, %ecx - lea _tgamma_A_table(%rip), %r8 - subss %xmm0, %xmm3 - cvtss2sd %xmm3, %xmm3 - movaps %xmm3, %xmm8 - lea -2(%rdx), %eax - mulsd %xmm3, %xmm8 - cmovl %eax, %edx - sarl $1, %ecx - addl %esi, %ecx - sarl $3, %esi - addl %esi, %ecx - movslq %ecx, %rcx - testl %edx, %edx - movsd (%r8,%rcx,8), %xmm9 - mulsd %xmm3, %xmm9 - movsd 8(%r8,%rcx,8), %xmm0 - addsd %xmm8, %xmm9 - mulsd %xmm3, %xmm0 - addsd 48(%r8,%rcx,8), %xmm9 - addsd %xmm8, %xmm0 - mulsd 96(%r8,%rcx,8), %xmm9 - addsd 56(%r8,%rcx,8), %xmm0 - movsd 16(%r8,%rcx,8), %xmm4 - mulsd %xmm3, %xmm4 - mulsd %xmm0, %xmm9 - addsd %xmm8, %xmm4 - movsd 24(%r8,%rcx,8), %xmm5 - mulsd %xmm3, %xmm5 - addsd 64(%r8,%rcx,8), %xmm4 - movsd 32(%r8,%rcx,8), %xmm6 - addsd %xmm8, %xmm5 - mulsd %xmm3, %xmm6 - mulsd %xmm4, %xmm9 - addsd 72(%r8,%rcx,8), %xmm5 - addsd %xmm8, %xmm6 - mulsd %xmm5, %xmm9 - addsd 80(%r8,%rcx,8), %xmm6 - movsd 40(%r8,%rcx,8), %xmm7 - mulsd %xmm3, %xmm7 - mulsd %xmm6, %xmm9 - addsd %xmm7, %xmm8 - movsd .L_2il0floatpacket.10(%rip), %xmm3 - movsd %xmm3, 8(%rsp) - addsd 88(%r8,%rcx,8), %xmm8 - mulsd %xmm8, %xmm9 - movsd %xmm9, (%rsp) - je ..B1.29 -..B1.25: - movl $1, %eax - jle ..B1.29 -..B1.26: - pxor %xmm0, %xmm0 - cvtss2sd %xmm1, %xmm0 -..B1.27: - pxor %xmm4, %xmm4 - movaps %xmm0, %xmm5 - cvtsi2sd %eax, %xmm4 - incl %eax - subsd %xmm4, %xmm5 - mulsd %xmm5, %xmm3 - cmpl %edx, %eax - jle ..B1.27 -..B1.29: - testl %ebx, %ebx - je ..B1.35 -..B1.30: - cvtss2sd %xmm1, %xmm1 - mulsd %xmm2, %xmm1 - mulsd (%rsp), %xmm1 - mulsd %xmm3, %xmm1 - movsd 8(%rsp), %xmm0 - divsd %xmm1, %xmm0 - movss .L_2il0floatpacket.6(%rip), %xmm2 - movsd %xmm0, 8(%rsp) - comiss 24(%rsp), %xmm2 - jbe ..B1.32 -..B1.31: - lea _tgamma_A40_inv(%rip), %rax - mulsd (%rax), %xmm0 - movsd %xmm0, 8(%rsp) -..B1.32: - testb %r12b, %r12b - je ..B1.34 -..B1.33: - movl %ebp, %edi -..___tag_value_tgammaf.37: - call fesetround@PLT -..___tag_value_tgammaf.38: -..B1.34: - movsd 8(%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movd %xmm0, %eax - shll $31, %r14d - xorl %r14d, %eax - movl %eax, 16(%rsp) - movss 16(%rsp), %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.35: - movsd (%rsp), %xmm0 - testb %r12b, %r12b - mulsd %xmm3, %xmm0 - movsd %xmm0, (%rsp) - je ..B1.37 -..B1.36: - movl %ebp, %edi -..___tag_value_tgammaf.56: - call fesetround@PLT -..___tag_value_tgammaf.57: -..B1.37: - movsd (%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 16(%rsp) -..B1.38: - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.39: - movss .L_2il0floatpacket.11(%rip), %xmm6 - pxor %xmm0, %xmm0 - cvtss2sd %xmm1, %xmm0 - comiss %xmm1, %xmm6 - jbe ..B1.41 -..B1.40: - movsd .L_2il0floatpacket.10(%rip), %xmm3 - addsd %xmm0, %xmm3 - jmp ..B1.42 -..B1.41: - movaps %xmm0, %xmm3 -..B1.42: - comisd .L_2il0floatpacket.7(%rip), %xmm3 - jb ..B1.44 -..B1.43: - lea _tgamma_A175_table(%rip), %r13 - subsd .L_2il0floatpacket.10(%rip), %xmm3 - cvtsd2ss %xmm3, %xmm3 - movss %xmm3, (%rsp) - jmp ..B1.50 -..B1.44: - comisd .L_2il0floatpacket.8(%rip), %xmm3 - jb ..B1.46 -..B1.45: - lea _tgamma_A150_table(%rip), %r13 - subsd .L_2il0floatpacket.10(%rip), %xmm3 - cvtsd2ss %xmm3, %xmm3 - movss %xmm3, (%rsp) - jmp ..B1.50 -..B1.46: - movsd .L_2il0floatpacket.9(%rip), %xmm4 - comisd %xmm4, %xmm3 - jb ..B1.48 -..B1.47: - lea _local_minimum(%rip), %rdx - lea _tgamma_A125_table(%rip), %r13 - movsd .L_2il0floatpacket.10(%rip), %xmm4 - addsd (%rdx), %xmm4 - subsd %xmm4, %xmm3 - cvtsd2ss %xmm3, %xmm3 - movss %xmm3, (%rsp) - jmp ..B1.50 -..B1.48: - comisd %xmm3, %xmm4 - jbe ..B1.50 -..B1.49: - lea _tgamma_A100_table(%rip), %r13 - subsd .L_2il0floatpacket.10(%rip), %xmm3 - cvtsd2ss %xmm3, %xmm3 - movss %xmm3, (%rsp) -..B1.50: - movsd (%r13), %xmm3 - testl %eax, %eax - movsd %xmm3, 8(%rsp) - je ..B1.53 -..B1.51: - pxor %xmm4, %xmm4 - cvtss2sd (%rsp), %xmm4 - movsd 56(%r13), %xmm3 - mulsd %xmm4, %xmm3 - movsd 8(%rsp), %xmm5 - addsd 48(%r13), %xmm3 - mulsd %xmm4, %xmm3 - addsd 40(%r13), %xmm3 - mulsd %xmm4, %xmm3 - addsd 32(%r13), %xmm3 - mulsd %xmm4, %xmm3 - addsd 24(%r13), %xmm3 - mulsd %xmm4, %xmm3 - addsd 16(%r13), %xmm3 - mulsd %xmm4, %xmm3 - addsd 8(%r13), %xmm3 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - movsd %xmm5, 8(%rsp) -..B1.53: - comiss %xmm1, %xmm6 - jbe ..B1.61 -..B1.54: - testl %ebx, %ebx - je ..B1.58 -..B1.55: - mulsd 8(%rsp), %xmm2 - testb %r12b, %r12b - movsd .L_2il0floatpacket.10(%rip), %xmm0 - divsd %xmm2, %xmm0 - movsd %xmm0, (%rsp) - je ..B1.57 -..B1.56: - movl %ebp, %edi -..___tag_value_tgammaf.75: - call fesetround@PLT -..___tag_value_tgammaf.76: -..B1.57: - movsd (%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movd %xmm0, %eax - shll $31, %r14d - xorl %r14d, %eax - movl %eax, 16(%rsp) - movss 16(%rsp), %xmm0 - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.58: - movsd 8(%rsp), %xmm1 - testb %r12b, %r12b - divsd %xmm0, %xmm1 - movsd %xmm1, 8(%rsp) - je ..B1.67 -..B1.59: - movl %ebp, %edi -..___tag_value_tgammaf.94: - call fesetround@PLT -..___tag_value_tgammaf.95: - jmp ..B1.67 -..B1.61: - testl %ebx, %ebx - je ..B1.65 -..B1.62: - mulsd %xmm0, %xmm2 - testb %r12b, %r12b - mulsd 8(%rsp), %xmm2 - movsd .L_2il0floatpacket.10(%rip), %xmm1 - divsd %xmm2, %xmm1 - movsd %xmm1, (%rsp) - je ..B1.64 -..B1.63: - movl %ebp, %edi -..___tag_value_tgammaf.96: - call fesetround@PLT -..___tag_value_tgammaf.97: -..B1.64: - movsd (%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.65: - testb %r12b, %r12b - je ..B1.67 -..B1.66: - movl %ebp, %edi -..___tag_value_tgammaf.115: - call fesetround@PLT -..___tag_value_tgammaf.116: -..B1.67: - movsd 8(%rsp), %xmm0 - cvtsd2ss %xmm0, %xmm0 - movss %xmm0, 16(%rsp) -..B1.68: - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.69: - testb %r12b, %r12b - je ..B1.71 -..B1.70: - movl %ebp, %edi -..___tag_value_tgammaf.134: - call fesetround@PLT -..___tag_value_tgammaf.135: -..B1.71: - movss (%rsp), %xmm0 - divss %xmm0, %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.72: - testb %r12b, %r12b - je ..B1.74 -..B1.73: - movl %ebp, %edi -..___tag_value_tgammaf.153: - call fesetround@PLT -..___tag_value_tgammaf.154: -..B1.74: - movss (%rsp), %xmm0 - divss %xmm0, %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.75: - testb %r12b, %r12b - je ..B1.77 -..B1.76: - movl %ebp, %edi -..___tag_value_tgammaf.172: - call fesetround@PLT -..___tag_value_tgammaf.173: -..B1.77: - movl $1904214016, 20(%rsp) - movss 20(%rsp), %xmm1 - movss 20(%rsp), %xmm0 - mulss %xmm0, %xmm1 - movss %xmm1, 20(%rsp) - movss 20(%rsp), %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.78: - movss (%rsp), %xmm0 - testb %r12b, %r12b - movss %xmm0, 16(%rsp) - je ..B1.80 -..B1.79: - movl %ebp, %edi -..___tag_value_tgammaf.191: - call fesetround@PLT -..___tag_value_tgammaf.192: -..B1.80: - movl %ebx, %ebx - lea _large_value_32(%rip), %rax - movl (%rax,%rbx,4), %edx - movl %edx, 20(%rsp) - movss 20(%rsp), %xmm0 - mulss .L_2il0floatpacket.0(%rip), %xmm0 - movss %xmm0, 20(%rsp) - movss 20(%rsp), %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.81: - testb %r12b, %r12b - je ..B1.83 -..B1.82: - movl %ebp, %edi -..___tag_value_tgammaf.210: - call fesetround@PLT -..___tag_value_tgammaf.211: -..B1.83: - lea _ones(%rip), %rax - movss (%rax,%rbx,4), %xmm0 - divss (%rsp), %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.84: - testb %r12b, %r12b - je ..B1.86 -..B1.85: - movl %ebp, %edi -..___tag_value_tgammaf.229: - call fesetround@PLT -..___tag_value_tgammaf.230: -..B1.86: - testl %ebx, %ebx - je ..B1.89 -..B1.87: - testl $8388607, 24(%rsp) - je ..B1.91 -..B1.89: - movss (%rsp), %xmm0 - movss %xmm0, 16(%rsp) - movl %r14d, 8(%rsp) -..B1.90: - movl 24(%rsp), %eax - movl %eax, 20(%rsp) - movss 20(%rsp), %xmm1 - movss 20(%rsp), %xmm0 - addss %xmm0, %xmm1 - movss %xmm1, 20(%rsp) - movss 20(%rsp), %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 80 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 12, -16 - .cfi_offset 13, -24 - .cfi_offset 14, -32 -..B1.91: - movss .L_2il0floatpacket.1(%rip), %xmm0 - divss (%rsp), %xmm0 - movss %xmm0, 16(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 24 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 16 - .cfi_restore 12 - popq %r12 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type tgammaf,@function - .size tgammaf,.-tgammaf - .data -# -- End tgammaf - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.7: - .long 0x00000000,0x3ffc0000 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,8 - .align 8 -.L_2il0floatpacket.8: - .long 0x00000000,0x3ff80000 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,8 - .align 8 -.L_2il0floatpacket.9: - .long 0x00000000,0x3ff40000 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,8 - .align 8 -.L_2il0floatpacket.10: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,8 - .align 4 -.L_2il0floatpacket.0: - .long 0x71800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x80000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -.L_2il0floatpacket.2: - .long 0x4b400000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,4 - .align 4 -.L_2il0floatpacket.3: - .long 0xc22c0000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,4 - .align 4 -.L_2il0floatpacket.4: - .long 0x0d800000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,4 - .align 4 -.L_2il0floatpacket.5: - .long 0x40000000 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,4 - .align 4 -.L_2il0floatpacket.6: - .long 0xc2200000 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,4 - .align 4 -.L_2il0floatpacket.11: - .long 0x3f800000 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,4 - .align 4 -_small_value_32: - .long 226492416 - .long 2373976064 - .type _small_value_32,@object - .size _small_value_32,8 - .align 4 -_overflow_boundary: - .long 0 - .long 1078035746 - .type _overflow_boundary,@object - .size _overflow_boundary,8 - .align 4 -_tgamma_sin_table: - .long 1980114658 - .long 3200337074 - .long 804494867 - .long 1049689241 - .long 2884431818 - .long 1079329239 - .long 930502348 - .long 3223780109 - .long 1245824743 - .long 1080878479 - .long 2510431012 - .long 1073721695 - .long 1661126174 - .long 1078219640 - .long 1205599443 - .long 3223573914 - .type _tgamma_sin_table,@object - .size _tgamma_sin_table,64 - .align 4 -_tgamma_A_table: - .long 3121394612 - .long 1074393041 - .long 2029996066 - .long 1073722195 - .long 4137005464 - .long 1071238760 - .long 3372276227 - .long 3220751114 - .long 68401302 - .long 3222286887 - .long 1275947047 - .long 3223263002 - .long 4031994882 - .long 1074665426 - .long 1089993416 - .long 1074817170 - .long 427005612 - .long 1075089294 - .long 1508975772 - .long 1075601433 - .long 2111623053 - .long 1076192020 - .long 75538972 - .long 1077100653 - .long 2171869559 - .long 1055005400 - .long 2919987515 - .long 1074143787 - .long 860307162 - .long 1073890599 - .long 2407232453 - .long 1073038722 - .long 1468490975 - .long 3216757264 - .long 846192051 - .long 3221294835 - .long 402234383 - .long 3222573752 - .long 2566208764 - .long 1073763360 - .long 162360449 - .long 1073949715 - .long 1512348533 - .long 1074371728 - .long 2920174397 - .long 1074968946 - .long 3785085665 - .long 1075671857 - .long 1922428759 - .long 1076496000 - .long 2446382284 - .long 1072101083 - .long 42366358 - .long 1073746704 - .long 3587290866 - .long 1073390434 - .long 1169958761 - .long 1072607731 - .long 3891474799 - .long 3217275878 - .long 1452792685 - .long 3221010072 - .long 1006385979 - .long 3222363118 - .long 3663632771 - .long 1072778759 - .long 3212960448 - .long 1073036150 - .long 2202365811 - .long 1073636095 - .long 2023822532 - .long 1074258740 - .long 40477660 - .long 1075053854 - .long 658935515 - .long 1076010306 - .long 932572503 - .long 1105834679 - .long 1233355998 - .long 1073412029 - .long 3033646034 - .long 1073097432 - .long 3149182759 - .long 1072206908 - .long 1726027606 - .long 3217766868 - .long 3439348786 - .long 3220880557 - .long 2080997065 - .long 3222253033 - .long 843307201 - .long 1072200111 - .long 3138702878 - .long 1072613342 - .long 3610734718 - .long 1073142430 - .long 2651617324 - .long 1073914526 - .long 2611481547 - .long 1074796471 - .long 3284459136 - .long 1075745821 - .long 1365755587 - .long 1144167771 - .long 2699624028 - .long 1073212595 - .long 2232824171 - .long 1072922970 - .long 3659224963 - .long 1071959670 - .long 3026238542 - .long 3218100813 - .long 4240441539 - .long 3220810712 - .long 1772362075 - .long 3222132889 - .long 3742687744 - .long 1071863890 - .long 56227394 - .long 1072220001 - .long 969667939 - .long 1072882737 - .long 880059910 - .long 1073714908 - .long 247554419 - .long 1074515829 - .long 48918556 - .long 1075495246 - .long 2601377264 - .long 1185936586 - .long 3625529495 - .long 1073077476 - .long 3298250746 - .long 1072804056 - .long 2971501690 - .long 1071788510 - .long 2950162741 - .long 3218231788 - .long 26528490 - .long 3220765509 - .long 3761284804 - .long 3222050392 - .long 3800626879 - .long 1071658634 - .long 1108715276 - .long 1071977390 - .long 286829382 - .long 1072720005 - .long 3141975933 - .long 1073477575 - .long 4145290123 - .long 1074329952 - .long 2167683451 - .long 1075329952 - .long 0 - .long 1072693248 - .type _tgamma_A_table,@object - .size _tgamma_A_table,624 - .align 4 -_tgamma_A40_inv: - .long 3988571200 - .long 914969834 - .type _tgamma_A40_inv,@object - .size _tgamma_A40_inv,8 - .align 4 -_tgamma_A175_table: - .long 1682645026 - .long 1072688670 - .long 3753006229 - .long 3219243438 - .long 177700005 - .long 1072453288 - .long 3289039035 - .long 3219374666 - .long 2492560830 - .long 1071326765 - .long 123078934 - .long 3217486055 - .long 3499570675 - .long 1068068407 - .long 1362583934 - .long 3212265128 - .type _tgamma_A175_table,@object - .size _tgamma_A175_table,64 - .align 4 -_tgamma_A150_table: - .long 988281800 - .long 1072692321 - .long 502740408 - .long 3219277207 - .long 2058512241 - .long 1072588117 - .long 2109547492 - .long 3219675970 - .long 3371209031 - .long 1071892748 - .long 3191518250 - .long 3218447665 - .long 3816909947 - .long 1069498883 - .long 1366906983 - .long 3214177035 - .type _tgamma_A150_table,@object - .size _tgamma_A150_table,64 - .align 4 -_local_minimum: - .long 2371549438 - .long 1071483745 - .type _local_minimum,@object - .size _local_minimum,8 - .align 4 -_tgamma_A125_table: - .long 2191760034 - .long 1072453340 - .long 2642694891 - .long 3186525859 - .long 1706815263 - .long 1071344724 - .long 1896485049 - .long 3217079006 - .long 441733475 - .long 1069848224 - .long 978611902 - .long 3216500728 - .long 351495825 - .long 1068442485 - .long 1680249708 - .long 3216253219 - .type _tgamma_A125_table,@object - .size _tgamma_A125_table,64 - .align 4 -_tgamma_A100_table: - .long 4293468318 - .long 1072693247 - .long 3444857508 - .long 3219290252 - .long 3510931740 - .long 1072670280 - .long 3644082616 - .long 3219982336 - .long 2685454907 - .long 1072646231 - .long 4151446349 - .long 3220059936 - .long 4004008463 - .long 1072263166 - .long 1217534056 - .long 3218706582 - .type _tgamma_A100_table,@object - .size _tgamma_A100_table,64 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgammal.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgammal.S deleted file mode 100644 index 5153d99b22..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/tgammal.S +++ /dev/null @@ -1,4186 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "tgammal.c" - .text -..TXTST0: -# -- Begin tgammal - .text - .align 16,0x90 - .globl tgammal -tgammal: -# parameter 1: 368 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_tgammal.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - pushq %rbx - .cfi_def_cfa_offset 40 - .cfi_offset 3, -40 - pushq %rbp - .cfi_def_cfa_offset 48 - .cfi_offset 6, -48 - subq $320, %rsp - .cfi_def_cfa_offset 368 - xorb %bpl, %bpl - fldt 368(%rsp) - xorb %r14b, %r14b - movq %fs:40, %rax - xorq %rsp, %rax - movq %rax, 304(%rsp) - fstpt 240(%rsp) -..B1.2: - fnstcw 258(%rsp) -..B1.3: - movzwl 258(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.7 -..B1.4: - orl $-64768, %edx - movw %dx, 256(%rsp) -..B1.5: - fldcw 256(%rsp) -..B1.6: - movb $1, %r14b -..B1.7: -..___tag_value_tgammal.14: - call fegetround@PLT -..___tag_value_tgammal.15: -..B1.195: - movl %eax, %r13d -..B1.8: - testl %r13d, %r13d - je ..B1.10 -..B1.9: - xorl %edi, %edi - movb $1, %bpl -..___tag_value_tgammal.16: - call fesetround@PLT -..___tag_value_tgammal.17: -..B1.10: - movl 376(%rsp), %ebx - movzwl 376(%rsp), %ecx - shrl $15, %ebx - andl $32767, %ecx - andl $1, %ebx - cmpl $32767, %ecx - je ..B1.178 -..B1.11: - fldt 368(%rsp) - lea _zeros(%rip), %rax - andl $32767, 248(%rsp) - fldl (%rax) - movsd (%rax), %xmm0 - fstpt 224(%rsp) - fldt 224(%rsp) - fucomip %st(1), %st - jp ..B1.12 - je ..B1.171 -..B1.12: - testl %ebx, %ebx - je ..B1.24 -..B1.13: - cmpl $16446, %ecx - jge ..B1.142 -..B1.14: - fldt 240(%rsp) - lea _TWO_63H(%rip), %rax - fld %st(0) - fldl (%rax) - fadd %st, %st(1) - fxch %st(1) - fstpt 112(%rsp) - fldt 112(%rsp) - fsubp %st, %st(1) - movl 112(%rsp), %r15d - fcomi %st(1), %st - jbe ..B1.16 -..B1.15: - lea _ones(%rip), %rax - incl %r15d - fsubl (%rax) -..B1.16: - fucomip %st(1), %st - fstp %st(0) - jp ..B1.17 - je ..B1.135 -..B1.17: - fldt .L_2il0floatpacket.0(%rip) - fcomip %st(1), %st - jbe ..B1.24 -..B1.18: - fstp %st(0) - testb %bpl, %bpl - je ..B1.20 -..B1.19: - movl %r13d, %edi -..___tag_value_tgammal.18: - call fesetround@PLT -..___tag_value_tgammal.19: -..B1.20: - notl %r15d - lea _small_value_80(%rip), %rax - andl $1, %r15d - shlq $4, %r15 - fldt (%rax) - testb %r14b, %r14b - fldt (%rax,%r15) - fmulp %st, %st(1) - fstpt 64(%rsp) - je ..B1.22 -..B1.21: - fldcw 258(%rsp) -..B1.22: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 -..B1.23: - addq $320, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 368 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.24: - lea _POS_OVERFLOW(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - fstp %st(0) - jp ..B1.25 - jb ..B1.164 -..B1.25: - testl %ecx, %ecx - jne ..B1.28 -..B1.26: - cmpl $536870912, 372(%rsp) - jb ..B1.149 -..B1.27: - movq $0x2000000000000000, %rax - cmpq 368(%rsp), %rax - je ..B1.149 -..B1.28: - fldt 240(%rsp) - fldz - fstpt 144(%rsp) - fldt 144(%rsp) - fld %st(0) - fstpt 128(%rsp) - fldt 128(%rsp) - testl %ebx, %ebx - fxch %st(2) - fstpt 176(%rsp) - fldt 176(%rsp) - fstpt 208(%rsp) - fldt 208(%rsp) - fxch %st(2) - fstpt 192(%rsp) - fldt 192(%rsp) - fldt 224(%rsp) - fstpt 160(%rsp) - fldt 160(%rsp) - je ..B1.32 -..B1.29: - fstp %st(1) - lea _TWO_63H(%rip), %rax - cmpl $16299, %ecx - fldl (%rax) - jle ..B1.31 -..B1.30: - fldt .L_2il0floatpacket.1(%rip) - lea _TWO_53H(%rip), %rax - fxch %st(3) - fstps 96(%rsp) - fld %st(3) - lea 96+_tgammal_S(%rip), %rdx - fadd %st(1), %st - lea 80+_tgammal_S(%rip), %rsi - fsub %st(1), %st - lea 64+_tgammal_S(%rip), %r8 - fsubr %st(4), %st - fstpt 80(%rsp) - lea 48+_tgammal_S(%rip), %r9 - andl $32767, 88(%rsp) - lea 32+_tgammal_S(%rip), %r10 - fstpt 48(%rsp) - lea 16+_tgammal_S(%rip), %r11 - fstpt (%rsp) - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt 80(%rsp) - fmul %st, %st(2) - fld %st(0) - fsub %st(3), %st - fchs - fsubrp %st, %st(3) - fld %st(2) - fld %st(1) - fsub %st(4), %st - fmul %st, %st(1) - fld %st(2) - fmul %st(3), %st - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fld %st(4) - fmul %st(5), %st - fxch %st(3) - fstpt 16(%rsp) - fld %st(2) - fldl (%rax) - lea _tgammal_S(%rip), %rax - fld %st(0) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fld %st(4) - fmul %st(1), %st - fld %st(5) - fadd %st(1), %st - fsubp %st, %st(1) - fstpt 176(%rsp) - fldt 176(%rsp) - fsubrp %st, %st(5) - fxch %st(4) - fstpt 160(%rsp) - fldt (%rdx) - fmul %st(1), %st - fldt (%rsi) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r8) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r9) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r10) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%r11) - faddp %st, %st(1) - fmul %st(1), %st - fldt (%rax) - lea _tgammal_S2(%rip), %rax - faddp %st, %st(1) - fmulp %st, %st(1) - fldl (%rax) - lea 8+_tgammal_S2(%rip), %rax - fld %st(0) - fmul %st(4), %st - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - faddl (%rax) - fld %st(0) - lea 8+_tgammal_S1(%rip), %rax - fmul %st(4), %st - faddp %st, %st(3) - fmul %st(4), %st - faddp %st, %st(2) - fldl (%rax) - fld %st(0) - lea _tgammal_S1(%rip), %rax - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fldl (%rax) - fld %st(0) - lea _ones(%rip), %rax - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(5) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fld %st(1) - fmul %st(4), %st - fxch %st(4) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fld %st(2) - fldl (%rax) - fld %st(0) - fadd %st(4), %st - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fmul %st(7), %st - fmul %st, %st(6) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(5) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fmul %st, %st(4) - fldt 16(%rsp) - fld %st(0) - fmulp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fadd %st(2), %st - fsubp %st, %st(2) - fld %st(1) - fxch %st(2) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fld %st(2) - fld %st(3) - fxch %st(2) - fstpt 192(%rsp) - fldt 192(%rsp) - fldt 176(%rsp) - fmul %st, %st(4) - fxch %st(4) - fstpt 128(%rsp) - fxch %st(3) - fmulp %st, %st(2) - fldt 160(%rsp) - fmul %st, %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 144(%rsp) - fldt (%rsp) - fldt 48(%rsp) - flds 96(%rsp) - fldt 64(%rsp) - fxch %st(4) - fxch %st(2) - fxch %st(3) - fxch %st(1) - fxch %st(3) - jmp ..B1.33 -..B1.31: - fldt 208(%rsp) - fstpt 192(%rsp) - fldt 224(%rsp) - fstpt 128(%rsp) - fldt 128(%rsp) - fstpt 144(%rsp) - fldt 144(%rsp) - fxch %st(1) - jmp ..B1.33 -..B1.32: - lea _TWO_63H(%rip), %rax - fldl (%rax) -..B1.33: - fldt .L_2il0floatpacket.2(%rip) - fcomip %st(5), %st - jp ..B1.34 - jbe ..B1.95 -..B1.34: - fld %st(4) - fadd %st(1), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubp %st, %st(1) - movl 112(%rsp), %edx - fcomi %st(4), %st - jbe ..B1.36 -..B1.35: - lea _ones(%rip), %rax - decl %edx - fsubl (%rax) -..B1.36: - cmpl $2, %edx - lea 1(%rdx), %r15d - jl ..B1.41 -..B1.37: - fstp %st(3) - testb $1, %dl - je ..B1.39 -..B1.38: - lea _ones(%rip), %rax - lea -1(%rdx), %r9d - fldl (%rax) - fsubr %st, %st(4) - fxch %st(4) - fstpt 208(%rsp) - fxch %st(3) - fsubrp %st, %st(2) - jmp ..B1.40 -..B1.39: - fstp %st(3) - movl %edx, %r9d -..B1.40: - fldt .L_2il0floatpacket.3(%rip) - addl $-2, %r9d - sarl $1, %r9d - lea _tgammal_T2(%rip), %rsi - movl %r9d, %eax - faddp %st, %st(2) - fldt 208(%rsp) - lea (,%r9,8), %r8d - shll $4, %eax - lea _tgammal_A2(%rip), %r10 - subl %r9d, %eax - lea (%r8,%r9,4), %r9d - movslq %eax, %rax - fsubp %st, %st(2) - shlq $4, %rax - movslq %r9d, %r9 - addq %rsi, %rax - lea (%r10,%r9,8), %rsi - fxch %st(2) - fxch %st(1) - fxch %st(2) - jmp ..B1.55 -..B1.41: - fstp %st(0) - fldt .L_2il0floatpacket.4(%rip) - fcomip %st(4), %st - jbe ..B1.43 -..B1.42: - movl $3, %r9d - jmp ..B1.54 -..B1.43: - fldt .L_2il0floatpacket.6(%rip) - fcomip %st(4), %st - jbe ..B1.45 -..B1.44: - xorl %r9d, %r9d - jmp ..B1.54 -..B1.45: - fldt .L_2il0floatpacket.7(%rip) - fcomip %st(4), %st - jbe ..B1.47 -..B1.46: - fldt .L_2il0floatpacket.3(%rip) - movl $1, %r9d - fsubrp %st, %st(4) - jmp ..B1.54 -..B1.47: - fldt .L_2il0floatpacket.8(%rip) - fcomip %st(4), %st - jbe ..B1.49 -..B1.48: - lea _ones(%rip), %rax - movl $2, %r9d - fldl (%rax) - fsubp %st, %st(4) - jmp ..B1.54 -..B1.49: - fldt .L_2il0floatpacket.9(%rip) - fcomip %st(4), %st - jbe ..B1.51 -..B1.50: - lea _ones(%rip), %rax - xorl %r9d, %r9d - fxch %st(3) - fsubl (%rax) - fxch %st(3) - jmp ..B1.54 -..B1.51: - fldt .L_2il0floatpacket.10(%rip) - fcomip %st(4), %st - jbe ..B1.53 -..B1.52: - fldt .L_2il0floatpacket.11(%rip) - movl $1, %r9d - fsubrp %st, %st(4) - jmp ..B1.54 -..B1.53: - fldt .L_2il0floatpacket.5(%rip) - movl $2, %r9d - fsubp %st, %st(4) -..B1.54: - movl %r9d, %eax - lea _tgammal_T1(%rip), %rsi - shll $4, %eax - lea (,%r9,8), %r8d - subl %r9d, %eax - lea (%r8,%r9,4), %r9d - lea _tgammal_A1(%rip), %r10 - shlq $4, %rax - fxch %st(2) - fstpt 208(%rsp) - addq %rsi, %rax - lea (%r10,%r9,8), %rsi -..B1.55: - cmpl $16299, %ecx - jle ..B1.61 -..B1.56: - fstp %st(1) - fldt 224(%rax) - testb $1, %dl - fmul %st(2), %st - fldt 208(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 192(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 176(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 160(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 144(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 128(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 112(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 96(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 80(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 64(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 48(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 32(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fldt 16(%rax) - faddp %st, %st(1) - fmul %st(2), %st - fld %st(2) - fldt (%rax) - faddp %st, %st(2) - fld %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(4) - fsub %st(2), %st - fldt .L_2il0floatpacket.1(%rip) - fmul %st(4), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fld %st(1) - fmul %st(3), %st - fxch %st(2) - fsubr %st, %st(4) - fmul %st(1), %st - fld %st(1) - fmul %st(5), %st - fxch %st(4) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(4) - faddp %st, %st(3) - fldl 88(%rsi) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(4) - faddp %st, %st(3) - faddp %st, %st(2) - fldl 80(%rsi) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(4), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fld %st(1) - fmul %st(4), %st - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(4) - fxch %st(1) - fmul %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldl 72(%rsi) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - fldl 64(%rsi) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(4), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - fld %st(2) - fmul %st(4), %st - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(4) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(3) - fldl 56(%rsi) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - fld %st(3) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - faddp %st, %st(1) - fldl 48(%rsi) - fld %st(0) - fadd %st(4), %st - fsubr %st, %st(1) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fld %st(2) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(4), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(3) - fxch %st(1) - faddp %st, %st(3) - fld %st(1) - fmul %st(3), %st - fld %st(1) - fmul %st(5), %st - fxch %st(4) - fmul %st(5), %st - faddp %st, %st(1) - fxch %st(1) - fmul %st(2), %st - faddp %st, %st(1) - fldl 40(%rsi) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(4), %st - fsubr %st, %st(4) - fxch %st(2) - faddp %st, %st(4) - faddp %st, %st(3) - fldl 32(%rsi) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(3) - fld %st(2) - fadd %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(2), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fld %st(2) - fmul %st(2), %st - fxch %st(2) - fmul %st(5), %st - faddp %st, %st(2) - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldl 24(%rsi) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - faddp %st, %st(2) - fldl 16(%rsi) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(2), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(5), %st - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fmul %st, %st(4) - fld %st(3) - fmulp %st, %st(1) - faddp %st, %st(4) - fxch %st(2) - fmulp %st, %st(1) - faddp %st, %st(2) - fldl 8(%rsi) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(3) - fxch %st(1) - fadd %st, %st(3) - fsubrp %st, %st(2) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fldl (%rsi) - fld %st(0) - fadd %st(3), %st - fsubr %st, %st(1) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fstpt 96(%rsp) - fldt 96(%rsp) - fsubrp %st, %st(2) - faddp %st, %st(1) - fldt 16(%rsp) - je ..B1.59 -..B1.57: - cmpl $1, %edx - jle ..B1.59 -..B1.58: - fstp %st(0) - fstp %st(1) - fldt .L_2il0floatpacket.1(%rip) - fldt .L_2il0floatpacket.1(%rip) - fldt 96(%rsp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fxch %st(1) - fsub %st(3), %st - faddp %st, %st(4) - fld %st(3) - fldt 208(%rsp) - fmul %st, %st(3) - fld %st(0) - fadd %st(4), %st - fstpt 112(%rsp) - fldt 112(%rsp) - fsubp %st, %st(4) - fxch %st(3) - fmul %st, %st(5) - fsubr %st, %st(3) - fxch %st(1) - fmul %st(3), %st - fxch %st(3) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fadd %st, %st(3) - fxch %st(2) - fmulp %st, %st(1) - fstpt 96(%rsp) - jmp ..B1.63 -..B1.59: - fstpt 112(%rsp) - fxch %st(1) - jmp ..B1.62 -..B1.61: - lea _ones(%rip), %rax - fldl (%rax) - fstpt 96(%rsp) -..B1.62: - testl %edx, %edx - jle ..B1.76 -..B1.63: - fstp %st(0) - testl %ebx, %ebx - jne ..B1.70 -..B1.64: - testb %bpl, %bpl - je ..B1.66 -..B1.65: - movl %r13d, %edi - fstpt (%rsp) - fstpt 64(%rsp) -..___tag_value_tgammal.37: - call fesetround@PLT -..___tag_value_tgammal.38: -..B1.206: - fldt 64(%rsp) - fldt (%rsp) -..B1.66: - fldt 96(%rsp) - testb %r14b, %r14b - faddp %st, %st(1) - fstpt 64(%rsp) - je ..B1.212 -..B1.67: - fstpt 80(%rsp) -..B1.196: - fldcw 258(%rsp) - jmp ..B1.68 -..B1.212: - fstp %st(0) -..B1.68: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 -..B1.69: - addq $320, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 368 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.70: - fldt .L_2il0floatpacket.1(%rip) - lea _ones(%rip), %rax - fldt .L_2il0floatpacket.1(%rip) - testb %bpl, %bpl - fldt 128(%rsp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fsub %st(2), %st - fldt 144(%rsp) - faddp %st, %st(1) - fldt 96(%rsp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fld %st(2) - fmul %st(4), %st - fxch %st(1) - fsub %st(3), %st - faddp %st, %st(5) - fld %st(4) - fmul %st(2), %st - fxch %st(4) - fmulp %st, %st(5) - fxch %st(4) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - fld %st(0) - fadd %st(2), %st - fld %st(2) - fxch %st(1) - fdivrl (%rax) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(1), %st - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(6), %st - fadd %st, %st(4) - fsubrp %st, %st(4) - fxch %st(3) - fsubr %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fxch %st(2) - fmul %st(4), %st - fld %st(2) - fmul %st(4), %st - fxch %st(3) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(1) - fxch %st(1) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - fldt .L_2il0floatpacket.5(%rip) - fsub %st(2), %st - fldt .L_2il0floatpacket.5(%rip) - fsub %st(1), %st - fsubp %st, %st(3) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fsubp %st, %st(1) - fstpt 272(%rsp) - fldt 272(%rsp) - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 288(%rsp) - fldt 288(%rsp) - fld %st(3) - fmul %st(2), %st - fstpt 16(%rsp) - fld %st(2) - fmul %st(1), %st - fxch %st(1) - fmulp %st, %st(4) - faddp %st, %st(3) - fmulp %st, %st(1) - faddp %st, %st(1) - je ..B1.72 -..B1.71: - movl %r13d, %edi - fstpt (%rsp) - fstpt 64(%rsp) -..___tag_value_tgammal.56: - call fesetround@PLT -..___tag_value_tgammal.57: -..B1.205: - fldt 64(%rsp) - fldt (%rsp) -..B1.72: - fldt 16(%rsp) - andl $1, %r15d - shll $15, %r15d - faddp %st, %st(1) - fstpt 64(%rsp) - xorl %r15d, 72(%rsp) - testb %r14b, %r14b - je ..B1.213 -..B1.73: - fldt 48(%rsp) - fstpt 112(%rsp) - fstpt 80(%rsp) -..B1.197: - fldcw 258(%rsp) - jmp ..B1.74 -..B1.213: - fstp %st(0) -..B1.74: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 -..B1.75: - addq $320, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 368 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.76: - lea _ones(%rip), %rax - testl %ebx, %ebx - fldl (%rax) - fstpt (%rsp) - jne ..B1.86 -..B1.77: - fstp %st(0) - fldt 176(%rsp) - cmpl $100, %ecx - fldt 160(%rsp) - faddp %st, %st(1) - jge ..B1.79 -..B1.78: - fstp %st(1) - fldt (%rsp) - fdivp %st, %st(1) - fldt 96(%rsp) - fmulp %st, %st(1) - fstpt 96(%rsp) - jmp ..B1.80 -..B1.79: - fldt (%rsp) - fdivp %st, %st(1) - fxch %st(2) - fstpt 64(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(2), %st - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(1) - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fldt .L_2il0floatpacket.1(%rip) - fldt 176(%rsp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - fsubr %st, %st(1) - fmul %st(5), %st - fld %st(5) - fldt 160(%rsp) - faddp %st, %st(3) - fmul %st(2), %st - fxch %st(2) - fmul %st(3), %st - faddp %st, %st(2) - faddp %st, %st(1) - fldt .L_2il0floatpacket.5(%rip) - fsub %st(3), %st - fldt .L_2il0floatpacket.5(%rip) - fsub %st(1), %st - fsubp %st, %st(4) - fxch %st(1) - fsubrp %st, %st(3) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(4) - faddp %st, %st(2) - fld %st(5) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(5), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fmul %st, %st(6) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(2) - fmul %st(1), %st - fld %st(2) - fmul %st(4), %st - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(1) - faddp %st, %st(5) - fxch %st(1) - fstpt 288(%rsp) - fld %st(0) - fxch %st(2) - fstpt 272(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fldt 96(%rsp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fsub %st(1), %st - faddp %st, %st(4) - fld %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fadd %st, %st(4) - fxch %st(4) - fstpt 112(%rsp) - fldt 112(%rsp) - fsubp %st, %st(4) - fxch %st(3) - fmul %st, %st(4) - fsubr %st, %st(2) - fxch %st(5) - faddp %st, %st(2) - fxch %st(1) - fmul %st, %st(2) - fld %st(1) - fmulp %st, %st(5) - fxch %st(4) - fstpt 96(%rsp) - fmulp %st, %st(3) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 224(%rsp) - fldt 64(%rsp) -..B1.80: - testb %bpl, %bpl - je ..B1.82 -..B1.81: - movl %r13d, %edi - fstpt 64(%rsp) -..___tag_value_tgammal.75: - call fesetround@PLT -..___tag_value_tgammal.76: -..B1.208: - fldt 64(%rsp) -..B1.82: - fldt 224(%rsp) - testb %r14b, %r14b - fldt 96(%rsp) - faddp %st, %st(1) - fstpt 64(%rsp) - je ..B1.214 -..B1.83: - fstpt 80(%rsp) -..B1.198: - fldcw 258(%rsp) - jmp ..B1.84 -..B1.214: - fstp %st(0) -..B1.84: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 -..B1.85: - addq $320, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 368 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.86: - cmpl $100, %ecx - jge ..B1.88 -..B1.87: - fstp %st(0) - fldt 192(%rsp) - fldt 96(%rsp) - fmulp %st, %st(1) - faddp %st, %st(1) - fldt (%rsp) - fdivp %st, %st(1) - fstpt (%rsp) - jmp ..B1.89 -..B1.88: - fldt .L_2il0floatpacket.1(%rip) - fldt .L_2il0floatpacket.1(%rip) - fldt 96(%rsp) - fmul %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsubp %st, %st(3) - fsub %st(2), %st - faddp %st, %st(4) - fldt 192(%rsp) - fmul %st, %st(1) - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(2) - fsub %st(1), %st - faddp %st, %st(3) - fld %st(3) - fmul %st(3), %st - fld %st(2) - fmul %st(2), %st - fxch %st(4) - fmulp %st, %st(3) - faddp %st, %st(2) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fldt (%rsp) - fdivp %st, %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(1), %st - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(1) - fld %st(0) - fsubrp %st, %st(2) - fld %st(1) - fld %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(5), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fsubr %st, %st(4) - fxch %st(4) - faddp %st, %st(5) - fmul %st(4), %st - fld %st(1) - fmul %st(4), %st - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - faddp %st, %st(1) - fxch %st(2) - fmul %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fldt .L_2il0floatpacket.5(%rip) - fsub %st(1), %st - fldt .L_2il0floatpacket.5(%rip) - fsub %st(1), %st - fsubp %st, %st(2) - fxch %st(2) - fsubrp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(3) - fxch %st(2) - faddp %st, %st(3) - fld %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fadd %st, %st(2) - fxch %st(2) - fstpt 112(%rsp) - fldt 112(%rsp) - fsubp %st, %st(2) - fxch %st(1) - fmul %st, %st(4) - fsubr %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmul %st(1), %st - fld %st(4) - fmul %st(3), %st - fstpt (%rsp) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt 224(%rsp) - fstpt 272(%rsp) - fstpt 288(%rsp) -..B1.89: - testb %bpl, %bpl - je ..B1.91 -..B1.90: - movl %r13d, %edi - fstpt 64(%rsp) -..___tag_value_tgammal.94: - call fesetround@PLT -..___tag_value_tgammal.95: -..B1.207: - fldt 64(%rsp) -..B1.91: - fldt 224(%rsp) - andl $1, %r15d - fldt (%rsp) - shll $15, %r15d - faddp %st, %st(1) - fstpt 64(%rsp) - xorl %r15d, 72(%rsp) - testb %r14b, %r14b - je ..B1.215 -..B1.92: - fstpt 80(%rsp) -..B1.199: - fldcw 258(%rsp) - jmp ..B1.93 -..B1.215: - fstp %st(0) -..B1.93: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 -..B1.94: - addq $320, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 368 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.95: - fstp %st(1) - fstp %st(1) - fstp %st(1) - lea _ones(%rip), %rax - fld %st(1) - fldl (%rax) - fdiv %st, %st(1) - fld %st(1) - fmul %st(2), %st - fstpt (%rsp) - fstpl 80(%rsp) - addq $-32, %rsp - .cfi_def_cfa_offset 400 - lea 224(%rsp), %rdi - fxch %st(2) - fstpt (%rsp) - fldt 32(%rdi) - fstpt 16(%rsp) - fxch %st(1) - fstpt 48(%rsp) - fstpt 80(%rsp) -..___tag_value_tgammal.114: - call __libm_logl_k80@PLT -..___tag_value_tgammal.115: -..B1.200: - fstp %st(0) - fldt 80(%rsp) - fldt 48(%rsp) - addq $32, %rsp - .cfi_def_cfa_offset 368 -..B1.96: - fldt .L_2il0floatpacket.3(%rip) - lea 56+_tgammal_B(%rip), %rax - fxch %st(2) - fstpt 48(%rsp) - lea 48+_tgammal_B(%rip), %rdx - fldt (%rsp) - lea 40+_tgammal_B(%rip), %rcx - fldt 192(%rsp) - lea 32+_tgammal_B(%rip), %rsi - fldl (%rax) - lea 24+_tgammal_B(%rip), %r8 - fmul %st(2), %st - lea 16+_tgammal_B(%rip), %r9 - fldt .L_2il0floatpacket.1(%rip) - lea 8+_tgammal_B(%rip), %r10 - lea _tgammal_B(%rip), %r11 - lea _tgammal_B0(%rip), %rdi - lea 8+_tgammal_C(%rip), %rax - testl %ebx, %ebx - fxch %st(1) - faddl (%rdx) - lea _tgammal_C(%rip), %rdx - fmul %st(3), %st - fldt (%rdi) - fxch %st(1) - faddl (%rcx) - fmul %st(4), %st - faddl (%rsi) - fmul %st(4), %st - faddl (%r8) - fmul %st(4), %st - faddl (%r9) - fmul %st(4), %st - faddl (%r10) - fmul %st(4), %st - faddl (%r11) - fmulp %st, %st(4) - faddp %st, %st(3) - fxch %st(2) - fmulp %st, %st(3) - fld %st(0) - fldt 240(%rsp) - fsub %st, %st(5) - fxch %st(3) - fmul %st(5), %st - fld %st(5) - fadd %st(1), %st - fsubp %st, %st(1) - fsubr %st, %st(5) - fxch %st(3) - fchs - fldt 208(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(4), %st - fadd %st, %st(3) - fxch %st(3) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(3) - fxch %st(2) - fstpt 192(%rsp) - fldt 192(%rsp) - fld %st(4) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(4) - fxch %st(3) - faddp %st, %st(4) - fxch %st(3) - fmul %st, %st(4) - fld %st(6) - fmul %st(1), %st - faddp %st, %st(5) - fxch %st(2) - fmulp %st, %st(6) - fxch %st(5) - faddp %st, %st(3) - fstpt 208(%rsp) - fld %st(3) - fadd %st(2), %st - fld %st(0) - fadd %st(2), %st - fsub %st, %st(2) - fxch %st(2) - fchs - fadd %st(1), %st - fxch %st(1) - fsubrp %st, %st(5) - fxch %st(2) - faddp %st, %st(4) - fxch %st(1) - faddp %st, %st(3) - fld %st(0) - fadd %st(3), %st - fld %st(0) - fxch %st(1) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(4) - fld %st(3) - fadd %st(3), %st - fadd %st, %st(1) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fchs - fadd %st(1), %st - fxch %st(1) - fsubrp %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldl (%rax) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fldl (%rdx) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - faddp %st, %st(2) - fld %st(0) - fadd %st(3), %st - fsub %st, %st(3) - fxch %st(3) - fchs - faddp %st, %st(1) - faddp %st, %st(1) - fld %st(1) - fadd %st(1), %st - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fldt 48(%rsp) - jne ..B1.108 -..B1.97: - fxch %st(1) - fstpt 288(%rsp) - lea 160(%rsp), %rdi - fxch %st(1) - fstpt 112(%rdi) - lea 272(%rsp), %rsi - fstpt -112(%rdi) -..___tag_value_tgammal.117: - call __libm_expl_k80@PLT -..___tag_value_tgammal.118: -..B1.201: - fldt 48(%rsp) -..B1.98: - testb %bpl, %bpl - fxch %st(1) - je ..B1.101 -..B1.99: - movl %r13d, %edi - fstpt (%rsp) - fstpt 48(%rsp) -..___tag_value_tgammal.119: - call fesetround@PLT -..___tag_value_tgammal.120: -..B1.100: - fldt 48(%rsp) - fldt (%rsp) -..B1.101: - fldt 160(%rsp) - fxch %st(1) - faddp %st, %st(2) - fxch %st(1) - fstpt (%rsp) - fldt 176(%rsp) - movl (%rsp), %edx - cmpl $16383, %edx - faddp %st, %st(1) - fldl 80(%rsp) - fstpt (%rsp) - jg ..B1.103 -..B1.102: - addl $16383, %edx - movzwl 8(%rsp), %eax - andl $32767, %edx - andl $-32768, %eax - orl %edx, %eax - movw %ax, 8(%rsp) - fldt (%rsp) - fmulp %st, %st(1) - jmp ..B1.104 -..B1.103: - lea _TWO_POW_16383(%rip), %rax - andl $32767, %edx - movzwl 8(%rsp), %ecx - andl $-32768, %ecx - orl %edx, %ecx - fldt (%rax) - fmulp %st, %st(1) - movw %cx, 8(%rsp) - fldt (%rsp) - fmulp %st, %st(1) -..B1.104: - fstpt 64(%rsp) - testb %r14b, %r14b - je ..B1.106 -..B1.105: - fldt 16(%rsp) - fstpt 112(%rsp) -..B1.202: - fldcw 258(%rsp) -..B1.106: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 -..B1.107: - addq $320, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 368 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.108: - fxch %st(2) - fchs - lea 160(%rsp), %rdi - fstpt 112(%rdi) - lea 272(%rsp), %rsi - fchs - incl %r15d - fstpt 16(%rsi) - fstpt -112(%rdi) -..___tag_value_tgammal.138: - call __libm_expl_k80@PLT -..___tag_value_tgammal.139: -..B1.203: - fldt 48(%rsp) -..B1.109: - fldt 128(%rsp) - fld %st(0) - fld %st(1) - fxch %st(4) - faddp %st, %st(3) - fxch %st(2) - fstpt (%rsp) - fldt 144(%rsp) - movl (%rsp), %eax - fadd %st, %st(2) - fxch %st(2) - fdivrl 80(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(1), %st - fld %st(0) - fadd %st(2), %st - fsubp %st, %st(1) - fsubr %st, %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fadd %st, %st(5) - fsubrp %st, %st(5) - fxch %st(2) - fsub %st(4), %st - faddp %st, %st(3) - fld %st(2) - fmul %st(1), %st - fld %st(4) - fmul %st(3), %st - fxch %st(3) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fxch %st(1) - fmul %st, %st(4) - fxch %st(4) - faddp %st, %st(1) - fldt .L_2il0floatpacket.5(%rip) - fsub %st(2), %st - fldt .L_2il0floatpacket.5(%rip) - fsub %st(1), %st - fsubp %st, %st(3) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(0) - fadd %st(2), %st - fsubr %st, %st(1) - fxch %st(2) - faddp %st, %st(1) - fld %st(1) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fadd %st, %st(1) - fsubrp %st, %st(1) - fstpt 272(%rsp) - fldt 272(%rsp) - fld %st(3) - fmul %st(1), %st - fxch %st(1) - fsubr %st, %st(3) - fxch %st(3) - faddp %st, %st(2) - fxch %st(1) - fmul %st, %st(3) - fld %st(4) - fmul %st(1), %st - faddp %st, %st(4) - fstpt 288(%rsp) - fxch %st(1) - fmulp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fldt 160(%rsp) - fld %st(0) - fldt 176(%rsp) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(3), %st - fadd %st, %st(2) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 160(%rsp) - fldt 160(%rsp) - fsubr %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fstpt 176(%rsp) - fldt 176(%rsp) - fld %st(3) - fldt .L_2il0floatpacket.1(%rip) - fmul %st(5), %st - fadd %st, %st(1) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fsubp %st, %st(1) - fld %st(0) - fmul %st(3), %st - fxch %st(1) - fsubr %st, %st(5) - fxch %st(4) - faddp %st, %st(5) - fld %st(4) - fmul %st(2), %st - fxch %st(2) - fmulp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fxch %st(1) - fmulp %st, %st(3) - faddp %st, %st(2) - fld %st(1) - fadd %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - movzwl 72(%rsp), %edx - andl $32767, %edx - lea -1(%rax,%rdx), %ecx - cmpl $32765, %ecx - lea (%rax,%rdx), %ebx - ja ..B1.115 -..B1.110: - fstp %st(1) - fstp %st(1) - fldl 80(%rsp) - lea 16382(%rax), %edx - fstpt (%rsp) - cmpl $32765, %edx - ja ..B1.112 -..B1.111: - addl $16383, %eax - movzwl 8(%rsp), %edx - andl $32767, %eax - andl $-32768, %edx - orl %eax, %edx - movw %dx, 8(%rsp) - fldt (%rsp) - fmulp %st, %st(1) - fstpt 64(%rsp) - jmp ..B1.128 -..B1.112: - cmpl $16383, %eax - jle ..B1.114 -..B1.113: - lea _TWO_POW_16383(%rip), %rdx - andl $32767, %eax - movzwl 8(%rsp), %ecx - andl $-32768, %ecx - orl %eax, %ecx - fldt (%rdx) - fmulp %st, %st(1) - movw %cx, 8(%rsp) - fldt (%rsp) - fmulp %st, %st(1) - fstpt 64(%rsp) - jmp ..B1.128 -..B1.114: - lea _TWO_POW_M16382(%rip), %rdx - addl $32765, %eax - movzwl 8(%rsp), %ecx - andl $32767, %eax - andl $-32768, %ecx - orl %eax, %ecx - fldt (%rdx) - fmulp %st, %st(1) - movw %cx, 8(%rsp) - fldt (%rsp) - fmulp %st, %st(1) - fstpt 64(%rsp) - jmp ..B1.128 -..B1.115: - fstp %st(0) - cmpl $32766, %ebx - jle ..B1.117 -..B1.116: - fstp %st(0) - fstp %st(0) - lea _TWO_POW_16383(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 64(%rsp) - jmp ..B1.128 -..B1.117: - cmpl $-65, %ebx - jg ..B1.119 -..B1.118: - fstp %st(0) - fstp %st(0) - lea _TWO_POW_M16382(%rip), %rax - fldt (%rax) - fmul %st(0), %st - fstpt 64(%rsp) - jmp ..B1.128 -..B1.119: - fldl 80(%rsp) - cmpl $-16382, %eax - fstpt (%rsp) - jl ..B1.124 -..B1.120: - addl $16383, %eax - fld %st(0) - movzwl 8(%rsp), %edx - andl $32767, %eax - andl $-32768, %edx - orl %eax, %edx - lea _TWO_53H(%rip), %rax - movw %dx, 8(%rsp) - testb %bpl, %bpl - fldt (%rsp) - fldl (%rax) - fmul %st(3), %st - fsub %st, %st(2) - fxch %st(2) - fstpt 48(%rsp) - fldt 48(%rsp) - fsubrp %st, %st(2) - fxch %st(1) - fsub %st, %st(2) - fxch %st(2) - fchs - faddp %st, %st(3) - fmul %st, %st(2) - fmulp %st, %st(1) - fstpt 16(%rsp) - je ..B1.123 -..B1.121: - movl %r13d, %edi - fstpt (%rsp) -..___tag_value_tgammal.140: - call fesetround@PLT -..___tag_value_tgammal.141: -..B1.122: - fldt (%rsp) - xorb %bpl, %bpl -..B1.123: - fldt 16(%rsp) - faddp %st, %st(1) - fstpt 64(%rsp) - jmp ..B1.128 -..B1.124: - lea _TWO_POW_M16000(%rip), %rcx - negl %eax - addl $-15999, %eax - lea _TWO_32H(%rip), %rsi - movzwl 8(%rsp), %edx - andl $32767, %eax - andl $-32768, %edx - lea _small_value_80(%rip), %rbx - fldt (%rcx) - orl %eax, %edx - fmul %st, %st(1) - lea _TWO_32HP(%rip), %rax - fld %st(1) - testb %bpl, %bpl - fxch %st(1) - fmulp %st, %st(3) - movw %dx, 8(%rsp) - fadd %st(2), %st - fldl (%rax) - fldt (%rbx) - fmul %st(0), %st - fstpt 32(%rsp) - fldt (%rsp) - fadd %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fxch %st(2) - fmull (%rsi) - fsubrp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fsubp %st, %st(1) - fsubrp %st, %st(1) - faddp %st, %st(1) - je ..B1.127 -..B1.125: - movl %r13d, %edi - fstpt (%rsp) -..___tag_value_tgammal.142: - call fesetround@PLT -..___tag_value_tgammal.143: -..B1.126: - fldt (%rsp) - xorb %bpl, %bpl -..B1.127: - fldt 16(%rsp) - faddp %st, %st(1) - fstpt 64(%rsp) - movzwl 72(%rsp), %eax - andl $-32768, %eax - andl $2147483647, 68(%rsp) - movw %ax, 72(%rsp) -..B1.128: - andl $1, %r15d - shll $15, %r15d - xorl %r15d, 72(%rsp) - testb %bpl, %bpl - je ..B1.130 -..B1.129: - movl %r13d, %edi -..___tag_value_tgammal.144: - call fesetround@PLT -..___tag_value_tgammal.145: -..B1.130: - testb %r14b, %r14b - je ..B1.132 -..B1.131: - fldt 48(%rsp) - fstpt 112(%rsp) -..B1.204: - fldcw 258(%rsp) -..B1.132: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 -..B1.133: - addq $320, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 368 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.134: - fstp %st(0) - call __stack_chk_fail@PLT -..B1.135: - fstp %st(0) - testb %bpl, %bpl - je ..B1.137 -..B1.136: - movl %r13d, %edi - movsd %xmm0, (%rsp) -..___tag_value_tgammal.163: - call fesetround@PLT -..___tag_value_tgammal.164: -..B1.211: - movsd (%rsp), %xmm0 -..B1.137: - divsd %xmm0, %xmm0 - movsd %xmm0, (%rsp) - testb %r14b, %r14b - fldl (%rsp) - fstpt 64(%rsp) - je ..B1.139 -..B1.138: - fldcw 258(%rsp) -..B1.139: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 - jmp ..B1.23 -..B1.142: - fstp %st(0) - testb %bpl, %bpl - je ..B1.144 -..B1.143: - movl %r13d, %edi - movsd %xmm0, (%rsp) -..___tag_value_tgammal.165: - call fesetround@PLT -..___tag_value_tgammal.166: -..B1.210: - movsd (%rsp), %xmm0 -..B1.144: - divsd %xmm0, %xmm0 - movsd %xmm0, (%rsp) - testb %r14b, %r14b - fldl (%rsp) - fstpt 64(%rsp) - je ..B1.146 -..B1.145: - fldcw 258(%rsp) -..B1.146: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 - jmp ..B1.23 -..B1.149: - testb %bpl, %bpl - je ..B1.151 -..B1.150: - movl %r13d, %edi -..___tag_value_tgammal.167: - call fesetround@PLT -..___tag_value_tgammal.168: -..B1.151: - movl %ebx, %eax - lea _large_value_80(%rip), %rdx - shlq $4, %rax - testl %ebx, %ebx - fldt (%rdx) - fldt (%rdx,%rax) - fmulp %st, %st(1) - fstpt 64(%rsp) - je ..B1.153 -..B1.152: - shll $15, %ebx - orl %ebx, 72(%rsp) -..B1.153: - testb %r14b, %r14b - je ..B1.155 -..B1.154: - fldcw 258(%rsp) -..B1.155: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 - jmp ..B1.23 -..B1.164: - testb %bpl, %bpl - je ..B1.166 -..B1.165: - movl %r13d, %edi -..___tag_value_tgammal.169: - call fesetround@PLT -..___tag_value_tgammal.170: -..B1.166: - lea _large_value_80(%rip), %rax - testb %r14b, %r14b - fldt (%rax) - fmul %st(0), %st - fstpt 64(%rsp) - je ..B1.168 -..B1.167: - fldcw 258(%rsp) -..B1.168: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 - jmp ..B1.23 -..B1.171: - fstp %st(0) - testb %bpl, %bpl - je ..B1.173 -..B1.172: - movl %r13d, %edi - movsd %xmm0, (%rsp) -..___tag_value_tgammal.171: - call fesetround@PLT -..___tag_value_tgammal.172: -..B1.209: - movsd (%rsp), %xmm0 -..B1.173: - lea _ones(%rip), %rax - testb %r14b, %r14b - movsd (%rax,%rbx,8), %xmm1 - divsd %xmm0, %xmm1 - movsd %xmm1, (%rsp) - fldl (%rsp) - fstpt 64(%rsp) - je ..B1.175 -..B1.174: - fldcw 258(%rsp) -..B1.175: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 - jmp ..B1.23 -..B1.178: - testl %ebx, %ebx - je ..B1.181 -..B1.179: - cmpl $-2147483648, 372(%rsp) - jne ..B1.181 -..B1.180: - cmpl $0, 368(%rsp) - je ..B1.187 -..B1.181: - fldt 368(%rsp) - lea _ones(%rip), %rax - testb %r14b, %r14b - fmull (%rax) - fstpt 64(%rsp) - je ..B1.183 -..B1.182: - fldcw 258(%rsp) -..B1.183: - testb %bpl, %bpl - je ..B1.185 -..B1.184: - movl %r13d, %edi -..___tag_value_tgammal.173: - call fesetround@PLT -..___tag_value_tgammal.174: -..B1.185: - fldt 64(%rsp) - movq 304(%rsp), %rax - xorq %rsp, %rax - cmpq %fs:40, %rax - jne ..B1.134 -..B1.186: - addq $320, %rsp - .cfi_def_cfa_offset 48 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 40 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 368 - .cfi_offset 3, -40 - .cfi_offset 6, -48 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.187: - testb %bpl, %bpl - je ..B1.189 -..B1.188: - movl %r13d, %edi -..___tag_value_tgammal.192: - call fesetround@PLT -..___tag_value_tgammal.193: -..B1.189: - lea 8+_zeros(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - divsd (%rdx), %xmm0 - movsd %xmm0, (%rsp) - fldl (%rsp) - fstpt 64(%rsp) - fldt 64(%rsp) - movq 304(%rsp), %rcx - xorq %rsp, %rcx - cmpq %fs:40, %rcx - jne ..B1.134 - jmp ..B1.23 - .align 16,0x90 - .cfi_endproc - .type tgammal,@function - .size tgammal,.-tgammal - .data -# -- End tgammal - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.0: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xdc,0x09,0xc0,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,16 - .align 16 -.L_2il0floatpacket.1: - .byte 0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x80,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 16 -.L_2il0floatpacket.2: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfc,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 16 -.L_2il0floatpacket.5: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.5,@object - .size .L_2il0floatpacket.5,16 - .align 16 -.L_2il0floatpacket.6: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xfd,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.6,@object - .size .L_2il0floatpacket.6,16 - .align 16 -.L_2il0floatpacket.7: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xfe,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.7,@object - .size .L_2il0floatpacket.7,16 - .align 16 -.L_2il0floatpacket.8: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.8,@object - .size .L_2il0floatpacket.8,16 - .align 16 -.L_2il0floatpacket.9: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.9,@object - .size .L_2il0floatpacket.9,16 - .align 16 -.L_2il0floatpacket.10: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.10,@object - .size .L_2il0floatpacket.10,16 - .align 16 -.L_2il0floatpacket.11: - .byte 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00 - .type .L_2il0floatpacket.11,@object - .size .L_2il0floatpacket.11,16 - .align 16 -_TWO_53H: - .long 0 - .long 1128792064 - .type _TWO_53H,@object - .size _TWO_53H,8 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_TWO_63H: - .long 0 - .long 1139277824 - .type _TWO_63H,@object - .size _TWO_63H,8 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_tgammal_S2: - .long 1076610156 - .long 1072298443 - .long 2174450924 - .long 1012377779 - .type _tgammal_S2,@object - .size _tgammal_S2,16 - .align 4 -_tgammal_S1: - .long 1649608659 - .long 3220853158 - .long 544854255 - .long 3162597952 - .type _tgammal_S1,@object - .size _tgammal_S1,16 - .align 4 -_tgammal_A2: - .long 1833415567 - .long 1073038586 - .long 2552883231 - .long 1018148522 - .long 1595568275 - .long 1072556376 - .long 458238143 - .long 1015211580 - .long 3568820252 - .long 1071968804 - .long 1244365593 - .long 1010337025 - .long 799339768 - .long 1070612333 - .long 3666663601 - .long 1014637144 - .long 2303274075 - .long 1069290379 - .long 1349342802 - .long 1013375288 - .long 3297989586 - .long 1067256475 - .long 254004781 - .long 1007721194 - .long 3884346469 - .long 1076314993 - .long 442477728 - .long 1020223370 - .long 318512670 - .long 1076897708 - .long 471158811 - .long 1020359281 - .long 2510778168 - .long 1076450444 - .long 1901825555 - .long 1020381374 - .long 1635478559 - .long 1075598710 - .long 824259222 - .long 1018719588 - .long 1081324001 - .long 1074338163 - .long 3447625061 - .long 1017363587 - .long 3947156014 - .long 1072861090 - .long 1379190805 - .long 1015115048 - .long 420607958 - .long 1081212458 - .long 3477976495 - .long 1025491940 - .long 3806068795 - .long 1082138936 - .long 4217379562 - .long 1025598832 - .long 3604563515 - .long 1082026571 - .long 2373575058 - .long 1026208390 - .long 2007420787 - .long 1081336307 - .long 1677630540 - .long 1025930127 - .long 1505609351 - .long 1080304853 - .long 3680187356 - .long 1024342399 - .long 1798798240 - .long 1079036631 - .long 724429118 - .long 1022004699 - .long 573661072 - .long 1087072564 - .long 1175535566 - .long 1031320119 - .long 3742832273 - .long 1088193077 - .long 2163102943 - .long 1030481607 - .long 1347160184 - .long 1088323961 - .long 872134502 - .long 1032553403 - .long 3527047012 - .long 1087786342 - .long 974187100 - .long 1028831099 - .long 1718309677 - .long 1086914107 - .long 744179587 - .long 1031128181 - .long 2775103229 - .long 1085724862 - .long 1153587355 - .long 1029745229 - .long 1670522313 - .long 1093749470 - .long 3603089619 - .long 1038783597 - .long 2795800948 - .long 1094969738 - .long 1113103030 - .long 1039749901 - .long 3483985892 - .long 1095195750 - .long 707212107 - .long 1037942235 - .long 3634938287 - .long 1094882573 - .long 3822913920 - .long 1039689416 - .long 1233016495 - .long 1094091821 - .long 3838048750 - .long 1037461559 - .long 817468048 - .long 1093018536 - .long 360059332 - .long 1037856380 - .long 3404619429 - .long 1101025312 - .long 2324006265 - .long 1046266629 - .long 1757595371 - .long 1102333247 - .long 3317464771 - .long 1041601336 - .long 2951620935 - .long 1102677785 - .long 2114793479 - .long 1046829217 - .long 1356962213 - .long 1102426961 - .long 3236647680 - .long 1046257529 - .long 378361594 - .long 1101790815 - .long 2326245451 - .long 1045004339 - .long 704627613 - .long 1100821691 - .long 771850637 - .long 1043974839 - .type _tgammal_A2,@object - .size _tgammal_A2,576 - .align 4 -_tgammal_A1: - .long 4294967295 - .long 1072693247 - .long 4294254158 - .long 1017118719 - .long 4235179544 - .long 3219290252 - .long 1647137719 - .long 3164508998 - .long 3258652024 - .long 1072670296 - .long 2787078119 - .long 1015928435 - .long 2402437986 - .long 3219982865 - .long 3119239167 - .long 3164440263 - .long 89167536 - .long 1072654929 - .long 3734368228 - .long 1015667286 - .long 3963139337 - .long 3220139136 - .long 2050876349 - .long 3162686202 - .long 2444554090 - .long 1072454648 - .long 2100370444 - .long 1016394631 - .long 2397397425 - .long 1067486888 - .long 3603318790 - .long 1011860326 - .long 3126988118 - .long 1071287373 - .long 3410508918 - .long 1015153675 - .long 480439205 - .long 3216734124 - .long 3426889025 - .long 3160197739 - .long 927904425 - .long 1069712317 - .long 1130465219 - .long 1014845612 - .long 4266680347 - .long 3216234636 - .long 1626218864 - .long 3161277677 - .long 0 - .long 1072693248 - .long 1528870101 - .long 964807786 - .long 119575502 - .long 3218804454 - .long 1881625935 - .long 3159804816 - .long 2341912255 - .long 1071274903 - .long 3500227044 - .long 1010193322 - .long 2554745004 - .long 3216302649 - .long 3304224511 - .long 3156439793 - .long 2968672914 - .long 1068696059 - .long 4206584367 - .long 1012030447 - .long 1090398824 - .long 1060208439 - .long 842313838 - .long 1004803849 - .long 4294967295 - .long 1072693247 - .long 4294967295 - .long 1017118719 - .long 4235179544 - .long 3219290252 - .long 4177388891 - .long 3164508998 - .long 3258652024 - .long 1072670296 - .long 1161858311 - .long 1015929131 - .long 2402437986 - .long 3219982865 - .long 3056812941 - .long 3164521903 - .long 89167541 - .long 1072654929 - .long 2427235615 - .long 1014999039 - .long 3963139706 - .long 3220139136 - .long 3024603167 - .long 3163626566 - .type _tgammal_A1,@object - .size _tgammal_A1,384 - .align 4 -_tgammal_B: - .long 381774871 - .long 3211182444 - .long 436314138 - .long 1061814688 - .long 327235604 - .long 3208872248 - .long 723058467 - .long 1061917982 - .long 3650698365 - .long 3210701488 - .long 440509466 - .long 1064976804 - .long 3406779288 - .long 3214819974 - .long 941491840 - .long 1070005910 - .type _tgammal_B,@object - .size _tgammal_B,64 - .align 4 -_tgammal_C: - .long 3362045620 - .long 1072523249 - .long 4064281872 - .long 1016386130 - .type _tgammal_C,@object - .size _tgammal_C,16 - .align 4 -_TWO_32H: - .long 0 - .long 1106771968 - .type _TWO_32H,@object - .size _TWO_32H,8 - .align 4 -_TWO_32HP: - .long 1048576 - .long 1106771968 - .type _TWO_32HP,@object - .size _TWO_32HP,8 - .align 2 -_small_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 6383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 39151 - .word 0 - .word 0 - .word 0 - .type _small_value_80,@object - .size _small_value_80,32 - .align 2 -_POS_OVERFLOW: - .word 11809 - .word 27445 - .word 35846 - .word 56177 - .word 16393 - .word 0 - .word 0 - .word 0 - .type _POS_OVERFLOW,@object - .size _POS_OVERFLOW,16 - .align 2 -_tgammal_S: - .word 24210 - .word 1753 - .word 29241 - .word 50004 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 51350 - .word 39166 - .word 743 - .word 54836 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 3640 - .word 30975 - .word 46417 - .word 39360 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 53672 - .word 10841 - .word 35989 - .word 39843 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 36569 - .word 52859 - .word 829 - .word 59922 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 48029 - .word 59092 - .word 17416 - .word 34773 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 51219 - .word 52454 - .word 61951 - .word 62382 - .word 49123 - .word 0 - .word 0 - .word 0 - .type _tgammal_S,@object - .size _tgammal_S,112 - .align 2 -_tgammal_T2: - .word 46722 - .word 54455 - .word 58933 - .word 43588 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 11656 - .word 9670 - .word 26887 - .word 53935 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 37336 - .word 10857 - .word 59094 - .word 50631 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 42778 - .word 63737 - .word 45056 - .word 33859 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 26755 - .word 45167 - .word 18275 - .word 32926 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 44721 - .word 19678 - .word 48085 - .word 54982 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 51053 - .word 39319 - .word 36729 - .word 62310 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 45874 - .word 5043 - .word 3955 - .word 43983 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 10698 - .word 13153 - .word 62730 - .word 37178 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 47802 - .word 34638 - .word 48577 - .word 58524 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 5552 - .word 49084 - .word 18209 - .word 47263 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 27946 - .word 40146 - .word 45659 - .word 36839 - .word 49127 - .word 0 - .word 0 - .word 0 - .word 43027 - .word 63179 - .word 35272 - .word 58163 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 51497 - .word 52569 - .word 40730 - .word 59709 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 50075 - .word 12939 - .word 25687 - .word 50566 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 50229 - .word 1163 - .word 49491 - .word 48597 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 65107 - .word 33673 - .word 57229 - .word 54934 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 40234 - .word 4993 - .word 58268 - .word 55864 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 37170 - .word 65173 - .word 7022 - .word 51747 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 26509 - .word 26471 - .word 6311 - .word 44116 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 19430 - .word 24800 - .word 9769 - .word 34884 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 11267 - .word 5159 - .word 36913 - .word 51530 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 64725 - .word 57237 - .word 10436 - .word 35732 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 9979 - .word 17874 - .word 14609 - .word 46771 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 48661 - .word 14142 - .word 37902 - .word 57970 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 44331 - .word 229 - .word 33140 - .word 34177 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 18505 - .word 49699 - .word 39129 - .word 38384 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 55009 - .word 45387 - .word 16863 - .word 41316 - .word 16352 - .word 0 - .word 0 - .word 0 - .word 32472 - .word 62749 - .word 3488 - .word 43302 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 38507 - .word 49300 - .word 64329 - .word 42149 - .word 16346 - .word 0 - .word 0 - .word 0 - .word 54685 - .word 59022 - .word 19355 - .word 48977 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 11322 - .word 9818 - .word 14110 - .word 61121 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 35672 - .word 18289 - .word 56841 - .word 34043 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 40623 - .word 27826 - .word 27872 - .word 34330 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 23588 - .word 8736 - .word 44949 - .word 63368 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 65458 - .word 32180 - .word 45318 - .word 53999 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 7083 - .word 36157 - .word 35044 - .word 42795 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 41937 - .word 53706 - .word 63704 - .word 63466 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 56782 - .word 14002 - .word 58756 - .word 44258 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 50000 - .word 929 - .word 21531 - .word 58307 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 29164 - .word 41738 - .word 63210 - .word 36416 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 22318 - .word 7527 - .word 19550 - .word 43267 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 36459 - .word 32677 - .word 20918 - .word 49089 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 54142 - .word 37469 - .word 39035 - .word 54353 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 43987 - .word 37066 - .word 46591 - .word 55009 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 23593 - .word 355 - .word 54000 - .word 36277 - .word 16394 - .word 0 - .word 0 - .word 0 - .word 38981 - .word 26613 - .word 65277 - .word 49004 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 37709 - .word 48898 - .word 35761 - .word 58794 - .word 16390 - .word 0 - .word 0 - .word 0 - .word 20062 - .word 54760 - .word 43546 - .word 63578 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 4376 - .word 65424 - .word 42405 - .word 62684 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 53174 - .word 32360 - .word 45557 - .word 56872 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 50961 - .word 21643 - .word 2055 - .word 47845 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 44504 - .word 53228 - .word 208 - .word 37559 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 22458 - .word 24129 - .word 6745 - .word 55322 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 45571 - .word 12909 - .word 9586 - .word 38400 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 63967 - .word 2945 - .word 37284 - .word 50443 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 40100 - .word 52281 - .word 37909 - .word 62907 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 14124 - .word 37910 - .word 18802 - .word 37402 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 28370 - .word 35717 - .word 42940 - .word 43396 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 57898 - .word 23307 - .word 6391 - .word 45620 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 46932 - .word 12112 - .word 28768 - .word 37645 - .word 16401 - .word 0 - .word 0 - .word 0 - .word 4289 - .word 37433 - .word 59606 - .word 54245 - .word 16399 - .word 0 - .word 0 - .word 0 - .word 64482 - .word 38480 - .word 36982 - .word 34595 - .word 16398 - .word 0 - .word 0 - .word 0 - .word 60245 - .word 51970 - .word 24673 - .word 39653 - .word 16396 - .word 0 - .word 0 - .word 0 - .word 5116 - .word 50868 - .word 49618 - .word 41328 - .word 16394 - .word 0 - .word 0 - .word 0 - .word 41766 - .word 46400 - .word 3930 - .word 39543 - .word 16392 - .word 0 - .word 0 - .word 0 - .word 10780 - .word 29057 - .word 64174 - .word 35004 - .word 16390 - .word 0 - .word 0 - .word 0 - .word 53671 - .word 48824 - .word 23962 - .word 57716 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 53678 - .word 31584 - .word 52783 - .word 44557 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 6190 - .word 44351 - .word 42084 - .word 64733 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 38744 - .word 53501 - .word 23462 - .word 44426 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 5624 - .word 56691 - .word 10270 - .word 57805 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 37833 - .word 48670 - .word 48257 - .word 35818 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 2793 - .word 44149 - .word 23652 - .word 43316 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 36532 - .word 60099 - .word 3358 - .word 47101 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 26210 - .word 6795 - .word 18267 - .word 52540 - .word 16408 - .word 0 - .word 0 - .word 0 - .word 4852 - .word 29729 - .word 14912 - .word 39944 - .word 16407 - .word 0 - .word 0 - .word 0 - .word 5407 - .word 41984 - .word 60375 - .word 53635 - .word 16405 - .word 0 - .word 0 - .word 0 - .word 50093 - .word 12566 - .word 13387 - .word 64582 - .word 16403 - .word 0 - .word 0 - .word 0 - .word 49147 - .word 13632 - .word 405 - .word 35287 - .word 16402 - .word 0 - .word 0 - .word 0 - .word 19308 - .word 51191 - .word 49444 - .word 35336 - .word 16400 - .word 0 - .word 0 - .word 0 - .word 42358 - .word 64331 - .word 14656 - .word 65374 - .word 16397 - .word 0 - .word 0 - .word 0 - .word 20975 - .word 39047 - .word 28983 - .word 56232 - .word 16395 - .word 0 - .word 0 - .word 0 - .word 29936 - .word 14466 - .word 41903 - .word 45232 - .word 16393 - .word 0 - .word 0 - .word 0 - .word 29960 - .word 52783 - .word 56228 - .word 34190 - .word 16391 - .word 0 - .word 0 - .word 0 - .word 35121 - .word 10599 - .word 28021 - .word 48776 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 24922 - .word 26565 - .word 63850 - .word 32942 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 35914 - .word 31178 - .word 25984 - .word 42348 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 32787 - .word 34531 - .word 38943 - .word 53136 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 12957 - .word 55078 - .word 57592 - .word 59546 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _tgammal_T2,@object - .size _tgammal_T2,1440 - .align 2 -_tgammal_T1: - .word 33333 - .word 22332 - .word 1335 - .word 65087 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 47908 - .word 35098 - .word 63659 - .word 65273 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 46380 - .word 12569 - .word 56008 - .word 65411 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 48850 - .word 62280 - .word 7688 - .word 65472 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 39250 - .word 51171 - .word 14264 - .word 65504 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 1152 - .word 29364 - .word 36762 - .word 65519 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 3017 - .word 25231 - .word 24799 - .word 65523 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 25322 - .word 65334 - .word 59366 - .word 65496 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 56776 - .word 58800 - .word 13007 - .word 65323 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 19307 - .word 43631 - .word 60167 - .word 64530 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 36275 - .word 49480 - .word 28369 - .word 61762 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 21913 - .word 46254 - .word 26555 - .word 54444 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 35908 - .word 6208 - .word 45367 - .word 40294 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 27036 - .word 5944 - .word 26542 - .word 42848 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 29582 - .word 26316 - .word 64938 - .word 47331 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 2023 - .word 42870 - .word 23457 - .word 61457 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 65015 - .word 19522 - .word 60134 - .word 39847 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 37347 - .word 35810 - .word 25431 - .word 54185 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 59586 - .word 38885 - .word 5307 - .word 36118 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 55581 - .word 26604 - .word 61099 - .word 48328 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 26530 - .word 8530 - .word 11497 - .word 64510 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 5884 - .word 49309 - .word 23213 - .word 43047 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 39008 - .word 7698 - .word 42498 - .word 57424 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 52706 - .word 42552 - .word 1743 - .word 38295 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 36375 - .word 51085 - .word 41378 - .word 51088 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 45665 - .word 51480 - .word 46902 - .word 34067 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 45474 - .word 25613 - .word 9050 - .word 44941 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 10137 - .word 18971 - .word 38654 - .word 59779 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 53562 - .word 56969 - .word 3619 - .word 46768 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 12931 - .word 40754 - .word 53864 - .word 63282 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 16582 - .word 62753 - .word 30052 - .word 46783 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 41763 - .word 18743 - .word 29826 - .word 47859 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 61445 - .word 12179 - .word 9444 - .word 35298 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 19195 - .word 47291 - .word 36415 - .word 61711 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 13845 - .word 40089 - .word 27018 - .word 32909 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 12017 - .word 58217 - .word 13416 - .word 64677 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 35895 - .word 43222 - .word 31657 - .word 65323 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 20613 - .word 26232 - .word 50069 - .word 65270 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 35252 - .word 65344 - .word 3340 - .word 65456 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 10600 - .word 13283 - .word 40541 - .word 64928 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 11880 - .word 32674 - .word 50280 - .word 34435 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 63446 - .word 286 - .word 54268 - .word 48349 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 8548 - .word 23982 - .word 1825 - .word 63713 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 34666 - .word 29375 - .word 64038 - .word 41244 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 59811 - .word 4152 - .word 44775 - .word 65267 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 18717 - .word 22920 - .word 1335 - .word 65087 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 45811 - .word 56269 - .word 63659 - .word 65273 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 65298 - .word 48931 - .word 56016 - .word 65411 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 32491 - .word 12018 - .word 7860 - .word 65472 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 14368 - .word 44485 - .word 16906 - .word 65504 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 41970 - .word 59715 - .word 3074 - .word 65520 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 4801 - .word 21592 - .word 65211 - .word 65527 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 62592 - .word 41973 - .word 39337 - .word 65531 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 13381 - .word 40677 - .word 15011 - .word 65529 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 46580 - .word 36519 - .word 54875 - .word 65490 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 37477 - .word 29387 - .word 41414 - .word 65216 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 16797 - .word 56146 - .word 15453 - .word 63766 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 40859 - .word 15091 - .word 60713 - .word 58161 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 1004 - .word 12255 - .word 49061 - .word 43226 - .word 49150 - .word 0 - .word 0 - .word 0 - .word 52096 - .word 41479 - .word 59455 - .word 37399 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _tgammal_T1,@object - .size _tgammal_T1,960 - .align 2 -_tgammal_B0: - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16379 - .word 0 - .word 0 - .word 0 - .type _tgammal_B0,@object - .size _tgammal_B0,16 - .align 2 -_TWO_POW_16383: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 32766 - .word 0 - .word 0 - .word 0 - .type _TWO_POW_16383,@object - .size _TWO_POW_16383,16 - .align 2 -_TWO_POW_M16382: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 1 - .word 0 - .word 0 - .word 0 - .type _TWO_POW_M16382,@object - .size _TWO_POW_M16382,16 - .align 2 -_TWO_POW_M16000: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 383 - .word 0 - .word 0 - .word 0 - .type _TWO_POW_M16000,@object - .size _TWO_POW_M16000,16 - .align 2 -_large_value_80: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 26383 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 59151 - .word 0 - .word 0 - .word 0 - .type _large_value_80,@object - .size _large_value_80,32 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/trig_pi_bits.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/trig_pi_bits.S deleted file mode 100644 index 2977f39ed4..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/trig_pi_bits.S +++ /dev/null @@ -1,310 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "trig_pi_bits.c" - .section .rodata, "a" - .align 8 - .align 8 - .globl __four_over_pi -__four_over_pi: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0xdb939105,0x0028be60 - .long 0xf47d4d37,0x4a7f09d5 - .long 0x664f10e4,0x7036d8a5 - .long 0xeaf7aef1,0x107f9458 - .long 0x8e909374,0x586dc91b - .long 0xba827464,0xb801924b - .long 0xc72c4a69,0x873f877a - .long 0x7d4baed1,0xcfba208d - .long 0x09ad17df,0x213a671c - .long 0x8e60d4ce,0x904e6475 - .long 0xe2ef7e4a,0x7d272117 - .long 0xfff78166,0x0ec7fe25 - .long 0x62d6829b,0x03fbcbc4 - .long 0xb3c9f2c2,0x47db4d9f - .long 0xd9a797fa,0x6dd3d18f - .long 0xb1faf97c,0x8b5d49ee - .long 0x7de294a4,0x5ecf41ce - .long 0xec47e357,0xba9afed7 - .long 0x11bf1eda,0x421580cc - .long 0x0826bd0d,0xeafc33ef - .long 0x5857b986,0x876a78e4 - .long 0x57c5281a,0xc2196661 - .long 0x20135cc9,0x10237ff6 - .long 0x55b29cea,0xcc418185 - .long 0xf0231ad1,0x3258389e - .long 0xf3773a02,0xf10670d9 - .long 0x1da2e587,0x4aa0d671 - .long 0x3455c641,0x29b76bd1 - .long 0xc14fdf8c,0x4fa97fc1 - .long 0x93e60c9f,0xfa0cb0b7 - .long 0xbbdac797,0x6ef0cf49 - .long 0xcd72bc9f,0xbe27ce87 - .long 0x641f1f09,0xc761fc48 - .long 0x5dcb4c10,0x1abe9bb5 - .long 0x2d674670,0xcec57185 - .long 0x534b1740,0xf0b12b50 - .long 0x8b5c78e6,0x03119f61 - .long 0x8cdf34ad,0xb1a6c018 - .long 0x554dfd8f,0x25e9ed35 - .long 0xff1d934a,0xb5c60428 - .long 0xdc3e1f18,0xa7592af5 - .long 0xc545d592,0xd5ec1eb9 - .long 0xce2129f2,0x7036758e - .long 0xb588d516,0xc8c91de2 - .long 0xc2bc77f3,0xae47c006 - .long 0xda879998,0x867fcc67 - .long 0xeb361fdf,0x55e651fe - .long 0x7a0c982f,0xadd948a2 - .long 0xc24d9b35,0xf9b3713b - .long 0x85b78ed6,0x0fd775f7 - .long 0x08b4ba21,0x24a6f78a - .long 0x8cb2b185,0x8a135638 - .long 0x78143005,0xb8c232df - .long 0xf8060d04,0xe9c77cd6 - .long 0xc05220d6,0xcb9884a0 - .long 0x2b7cba47,0xe3bd5fec - .long 0xd9c43637,0x90d29234 - .long 0xb3985aa9,0x6a9097eb - .long 0x74fca981,0x0a02ad26 - .long 0xf0a8e20f,0x9fddd720 - .long 0x96a32bef,0x185e1ce2 - .long 0x8b72effd,0x75dbd8e9 - .long 0xf0499172,0x3be06359 - .long 0xb4aa0a23,0x954db672 - .long 0x44850981,0x58709df2 - .long 0x16711131,0x26d184b1 - .long 0x7cc5c02b,0x72246c93 - .long 0x4a44357f,0x50f53952 - .long 0x2507bbb3,0x7f2f8033 - .long 0xe03c7b30,0x9c3d4f84 - .long 0x31e50164,0xf9ecca3e - .long 0xc24bbcd1,0xcf9c706c - .long 0x1ec82ae7,0x42e704a2 - .long 0x91cbcc9e,0xed4bb0a4 - .long 0x29dc87f9,0xdb554324 - .long 0x52859e78,0xdae5b2cc - .long 0xfd25e53a,0x9e506277 - .long 0xcc665afb,0x2139b8a5 - .long 0xc3bf6eed,0x620d97d7 - .long 0x19d09c9c,0x26921b29 - .long 0x0567c279,0x4c97636e - .long 0x4e5d3dc7,0x6f094c63 - .long 0x035a0212,0x014c0043 - .long 0x2a91c0b9,0xd63b8b24 - .long 0x699f7ddc,0xdd0935af - .long 0xa7e9a523,0x921bbbc5 - .long 0x54f47c82,0xbda46d14 - .long 0x1f92fd5a,0xb3cce608 - .long 0xb740d750,0x18ec97cf - .long 0x54957019,0x1fe2614a - .long 0x4c920c9d,0x0dc4361b - .long 0x539b9511,0x5316f51c - .long 0x7d4ab559,0x704242da - .long 0xd4011776,0x852741c9 - .long 0xba85fe61,0xceed315d - .long 0x89c74a5a,0xdf5ad26e - .long 0x95052b5a,0x65ab3331 - .long 0x62141c8b,0xb8a42276 - .long 0x01dddc0c,0x2fa90125 - .long 0x2a1c7a92,0x3cc9ff00 - .long 0x1920f765,0x70998f78 - .long 0x6510e321,0xe5cfe8ff - .long 0x674e64a3,0x8377904c - .long 0xc5cef7c2,0x1c3779ed - .long 0x201724e0,0x0acdc568 - .long 0x363a03eb,0x16a48444 - .long 0xf6c3e40e,0xe01b12ff - .long 0x6958aef2,0x1d861645 - .long 0xef500401,0xd86e6271 - .long 0x527dadba,0x3cb489dd - .long 0x85028bc9,0xeec8b6ea - .long 0x0ccec246,0xa25da0d9 - .long 0x9470a8c7,0xa503aa8e - .long 0x89971370,0x6bbb6bc4 - .long 0x65d5b020,0x9b671e8b - .long 0x0263100a,0xcfc0fdbc - .long 0xed0e4548,0xe64c5b41 - .long 0x3124bd52,0x0316f0f6 - .long 0x93b34de9,0xeb71a972 - .long 0x24aada10,0xcdaa79a5 - .long 0x7be31d94,0xb77798c6 - .long 0xff2ae86b,0xa2da0df6 - .long 0x6b8036be,0x8c4577e8 - .long 0x2dc17b4c,0xc3199359 - .long 0x95cebfd1,0x194a6fd5 - .long 0xef9d77e4,0xee7e5abc - .long 0xfda31985,0xca0c202a - .long 0xbe877936,0x72c10188 - .long 0xc6d5c273,0x692ccf63 - .long 0xa92f84ed,0x4dba5093 - .long 0xbc2a1953,0x48ccc6aa - .long 0xcfc2f35e,0xe9707483 - .long 0xc122dedc,0x16ddbe48 - .long 0xb1b89b9b,0x85e254e9 - .long 0x12a6edf6,0xc03afbd6 - .long 0xb3f3dd87,0xb12e99aa - .long 0x6c706663,0x40b44b7c - .long 0x9221a817,0x1deb70f6 - .long 0x8bfc2b26,0x7dfd2031 - .long 0x0fdb77b4,0xbb376f17 - .long 0xb6ca8e89,0x07f1e42d - .long 0x24d4eb41,0x68e6abc0 - .long 0x4a5fa012,0x15edad0b - .long 0xaa9da856,0xe9c1f683 - .long 0x8b6df73f,0x5eca8485 - .long 0xe27f6fa2,0x797ebfb6 - .long 0x2a419c20,0x5b1db93f - .long 0x7fe1ff41,0x0f855ba1 - .long 0xd861860a,0xcf8a0cd9 - .long 0xf9ecdb9b,0xbaaf536b - .long 0x56efcc52,0x63ce59e5 - .long 0xcc10cb71,0x35e105b7 - .long 0x9c326e32,0xcd584973 - .long 0xe8802939,0xcc3f5b2f - .long 0x5691dbc8,0x1b016837 - .long 0x172e5258,0x748498a1 - .long 0xc054a64d,0x5c38159a - .long 0x47b13c4c,0xd5542df5 - .long 0x0c176a4b,0xd7db84f9 - .long 0x4d8ca869,0xa170ec87 - .long 0x7a887dc5,0x2dc2352c - .long 0xffc9e000,0xb91a63dd - .long 0x683353e6,0xc30b5023 - .long 0xacc2974b,0x694834e8 - .long 0xf684742f,0xd0be6d32 - .long 0xef45eae0,0x9f7076e6 - .long 0x8205d54b,0x68b2971a - .long 0x051fe181,0x954009fc - .long 0x235065b7,0xf85902c5 - .long 0x76ad895a,0xafa1cabf - .long 0xbcc167af,0xcd225eff - .long 0x2a0a9296,0xee53da9a - .long 0x0b6616b5,0xb113ef3e - .long 0x5343698e,0xe571fd23 - .long 0x2c4fc525,0x8817d5e9 - .long 0x3321b75c,0x4e200048 - .long 0x582fc459,0x6db7b27d - .long 0x6b2c2334,0x535ac1c0 - .long 0x5443bec7,0x302c9215 - .long 0xc1a8cd50,0xb0dca54e - .long 0xb311783e,0x301ef701 - .long 0xb5907cfa,0x8a53b232 - .long 0x1926cc6f,0x37991f36 - .long 0x35161df1,0xb670e5e9 - .long 0xbc0f0eae,0x78da44f6 - .long 0xdd557d6f,0x91861197 - .long 0x974bab3b,0x74b1a49b - .long 0x8721f118,0x5103908f - .long 0xf5b9f29f,0x7a7f4a7c - .long 0xf1780223,0x088d645b - .long 0x9bb1bf6c,0x75fff89a - .long 0x175f2cab,0x304224dd - .long 0x5edc8f9a,0x5ae75bb3 - .long 0xfdf7dcca,0x8471aa73 - .long 0x402dc36c,0x6eb26d54 - .long 0x181f7962,0xb8892e9d - .long 0x43430620,0xb61d0b05 - .long 0x8a405d9e,0x65199f85 - .long 0x7bd1558d,0xa7efbf7f - .long 0x7b2e6ea2,0x9fb644f6 - .long 0xea0c70db,0xff25f109 - .long 0x15aa362d,0xbc4db165 - .long 0x33cb6244,0x6a2d03b3 - .long 0x558b38f3,0x8d15dbe2 - .long 0xaa979ae7,0xa66e4835 - .long 0xc45282ff,0x0a8fb317 - .long 0x4ee38b21,0x7efd385b - .long 0x6a6d3f34,0xb8a1353a - .long 0x4b984e4b,0x7bbbf24d - .long 0x3646c2bf,0xd1084e32 - .long 0xf6070be1,0x205a92be - .long 0x53b30895,0x2d14e326 - .long 0xb1b02586,0x37154ab5 - .long 0x99255a58,0x42ee1c06 - .long 0x8fc3c45f,0x1689bb94 - .long 0x72ff0b6f,0xc46d7d3d - .long 0x33177a18,0x0d3baf0d - .long 0x99fbcce4,0x17b766e3 - .long 0xd6186f15,0xae05f266 - .long 0x440fb612,0xf871a0d4 - .long 0x0b68462b,0x1c777747 - .long 0xfcd6661e,0xd18b0875 - .long 0xbea193ff,0xb6701527 - .long 0x794d88a2,0x0195ab9e - .long 0x24d9eaba,0x48ab4e37 - .long 0xa6f9f2a9,0x154e09a0 - .long 0xe643b5ea,0x03546c4c - .long 0x2c9969e2,0x52015a7c - .long 0x0db47e6c,0x1fe5d322 - .long 0x9ec873e6,0xe48852a0 - .long 0x51f70e9d,0x3727d015 - .long 0xf7e77f97,0x3850bad9 - .long 0xdedeab2e,0xf517a919 - .long 0xe20ad56e,0xa8bd9548 - .long 0x618a8860,0x90421b96 - .long 0xe27527b9,0xd1ce79b8 - .long 0x55bff283,0x503ed27a - .long 0x4afea531,0xc7229671 - .long 0x43eb96b6,0x7074f3f1 - .long 0x90e14ee1,0xe1b151d8 - .long 0x21d8441e,0x88651e4b - .long 0x2004afd0,0xd30a868b - .long 0x4f1e3931,0xe409a222 - .long 0x708eb13a,0x2a1ef6f9 - .long 0xfdefe483,0xbd09a299 - .long 0x64cf42df,0x4ae8d96c - .long 0x18f749f7,0x2f771469 - .long 0x26a54a6a,0x785a4665 - .long 0x3b424827,0x0a339a2d - .long 0x98e09c08,0xd132a613 - .long 0x43e3bd69,0xdf1f8cae - .long 0x3c484aa7,0xf9d58502 - .long 0xd446696a,0x6d535f9b - .long 0xe0987765,0xfe6d75b7 - .long 0xceb12868,0x808d85a7 - .long 0x9ea34e6a,0xa0db7b5c - .long 0x9ad6c9d1,0x6e20970c - .long 0xc034957d,0xbb4d001d - .long 0x601c7838,0x3f135640 - .long 0x7cd92a3c,0x4fe26ca5 - .long 0x3f133aac,0x6ba9d2ce - .type __four_over_pi,@object - .size __four_over_pi,2104 - .data - .section .note.GNU-stack, "" -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/trunc_gen.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/trunc_gen.S deleted file mode 100644 index 374a372a63..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/trunc_gen.S +++ /dev/null @@ -1,126 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "trunc_gen.c" - .text -..TXTST0: -# -- Begin trunc - .text - .align 16,0x90 - .globl trunc -trunc: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_trunc.1: -..L2: - - movsd %xmm0, -8(%rsp) - movl -4(%rsp), %edx - movl %edx, %eax - andl $2147483647, %eax - addl $-1072693248, %eax - cmpl $54525952, %eax - jae ..B1.6 -..B1.2: - movl %eax, %ecx - shrl $20, %ecx - cmpl $22020096, %eax - jae ..B1.4 -..B1.3: - negl %ecx - movl $-1, %eax - addl $20, %ecx - shll %cl, %eax - andl %eax, %edx - movl %edx, -4(%rsp) - movl $0, -8(%rsp) - movsd -8(%rsp), %xmm0 - ret -..B1.4: - negl %ecx - movl $-1, %eax - addl $20, %ecx - shll %cl, %eax - andl %eax, -8(%rsp) - movsd -8(%rsp), %xmm0 -..B1.5: - ret -..B1.6: - testl %eax, %eax - jl ..B1.9 -..B1.7: - lea _ones(%rip), %rax - movsd -8(%rsp), %xmm0 - mulsd (%rax), %xmm0 -..B1.8: - ret -..B1.9: - lea _zeros(%rip), %rax - shrl $31, %edx - movsd (%rax,%rdx,8), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type trunc,@function - .size trunc,.-trunc - .data -# -- End trunc - .section .rodata, "a" - .align 4 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/truncf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/truncf.S deleted file mode 100644 index 5b4ecdd7eb..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/truncf.S +++ /dev/null @@ -1,90 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "truncf.c" - .text -..TXTST0: -# -- Begin truncf - .text - .align 16,0x90 - .globl truncf -truncf: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_truncf.1: -..L2: - - movd %xmm0, %edx - movss %xmm0, -8(%rsp) - movl %edx, %ecx - andl $2147483647, %ecx - addl $-1065353216, %ecx - cmpl $192937984, %ecx - jb ..B1.5 -..B1.2: - testl %ecx, %ecx - jl ..B1.6 -..B1.4: - ret -..B1.5: - shrl $23, %ecx - movl $-1, %eax - negl %ecx - addl $23, %ecx - shll %cl, %eax - andl %eax, %edx - movl %edx, -8(%rsp) - movss -8(%rsp), %xmm0 - ret -..B1.6: - andl $-2147483648, %edx - movl %edx, -8(%rsp) - movss -8(%rsp), %xmm0 - ret - .align 16,0x90 - .cfi_endproc - .type truncf,@function - .size truncf,.-truncf - .data -# -- End truncf - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/truncl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/truncl.S deleted file mode 100644 index e637ebb60f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/truncl.S +++ /dev/null @@ -1,180 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "truncl.c" - .text -..TXTST0: -# -- Begin truncl - .text - .align 16,0x90 - .globl truncl -truncl: -# parameter 1: 48 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_truncl.1: -..L2: - - subq $40, %rsp - .cfi_def_cfa_offset 48 -..B1.2: - fnstcw 26(%rsp) -..B1.3: - movzwl 56(%rsp), %ecx - andl $32767, %ecx - cmpl $16446, %ecx - jge ..B1.14 -..B1.4: - cmpl $16383, %ecx - jl ..B1.9 -..B1.5: - cmpl $16415, %ecx - jge ..B1.7 -..B1.6: - negl %ecx - addl $30, %ecx - movl 52(%rsp), %eax - shrl %cl, %eax - shll %cl, %eax - movl %eax, 52(%rsp) - xorl %eax, %eax - jmp ..B1.8 -..B1.7: - negl %ecx - addl $30, %ecx - movl 48(%rsp), %eax - shrl %cl, %eax - shll %cl, %eax -..B1.8: - movl %eax, 48(%rsp) - fldt 48(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.9: - testl %ecx, %ecx - jne ..B1.13 -..B1.10: - cmpl $0, 52(%rsp) - jne ..B1.12 -..B1.11: - cmpl $0, 48(%rsp) - je ..B1.13 -..B1.12: - lea _smallest_value_64(%rip), %rax - movq (%rax), %rdx - movq %rdx, (%rsp) -..B1.13: - movb 57(%rsp), %al - lea _zeros(%rip), %rdx - andb $-128, %al - shrb $7, %al - movzbl %al, %ecx - fldl (%rdx,%rcx,8) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.14: - movzwl 26(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.20 -..B1.15: - orl $-64768, %edx - movw %dx, 24(%rsp) -..B1.16: - fldcw 24(%rsp) -..B1.17: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) -..B1.18: - fldcw 26(%rsp) -..B1.19: - fldt 8(%rsp) - addq $40, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 48 -..B1.20: - fldt 48(%rsp) - lea _ones(%rip), %rax - fmull (%rax) - fstpt 8(%rsp) - jmp ..B1.19 - .align 16,0x90 - .cfi_endproc - .type truncl,@function - .size truncl,.-truncl - .data -# -- End truncl - .section .rodata, "a" - .align 4 - .align 4 -_smallest_value_64: - .long 1 - .long 0 - .long 1 - .long 2147483648 - .type _smallest_value_64,@object - .size _smallest_value_64,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0.S deleted file mode 100644 index d2ea09d103..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0.S +++ /dev/null @@ -1,4231 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y0.c" - .text -..TXTST0: -# -- Begin y0 - .text - .align 16,0x90 - .globl y0 -y0: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_y0.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - subq $16, %rsp - .cfi_def_cfa_offset 32 - xorb %bl, %bl - movsd %xmm0, (%rsp) -..B1.2: - fnstcw 10(%rsp) -..B1.3: - movl 4(%rsp), %edx - movl %edx, %ecx - andl $2147483647, %ecx - cmpl $2146435072, %ecx - jge ..B1.13 -..B1.4: - cmpq $0, (%rsp) - jle ..B1.19 -..B1.5: - movzwl 10(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.9 -..B1.6: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.7: - fldcw 8(%rsp) -..B1.8: - movb $1, %bl -..B1.9: - addq $-16, %rsp - .cfi_def_cfa_offset 48 - fldl 16(%rsp) - fstpt (%rsp) -..___tag_value_y0.7: - call __y0l@PLT -..___tag_value_y0.8: -..B1.25: - addq $16, %rsp - .cfi_def_cfa_offset 32 -..B1.10: - fstpl (%rsp) - testb %bl, %bl - movsd (%rsp), %xmm0 - je ..B1.12 -..B1.11: - fldcw 10(%rsp) -..B1.12: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 3, -16 -..B1.13: - andl $-2146435073, %ecx - orl (%rsp), %ecx - jne ..B1.18 -..B1.14: - lea _zeros(%rip), %rax - testl $-2147483648, %edx - movsd (%rax), %xmm0 - je ..B1.17 -..B1.15: - lea _infs(%rip), %rax - movsd (%rax), %xmm1 - mulsd %xmm1, %xmm0 -..B1.17: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 3, -16 -..B1.18: - movsd (%rsp), %xmm0 - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 3, -16 -..B1.19: - lea _zeros(%rip), %rax - movl (%rsp), %edx - orl %edx, %ecx - movsd (%rax), %xmm1 - je ..B1.21 -..B1.20: - lea _infs(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm1, %xmm0 - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 3, -16 -..B1.21: - lea 8+_ones(%rip), %rax - movsd (%rax), %xmm0 - divsd %xmm1, %xmm0 -..B1.22: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type y0,@function - .size y0,.-y0 - .data -# -- End y0 - .text -# -- Begin __y0l - .text - .align 16,0x90 - .globl __y0l -__y0l: -# parameter 1: 96 + %rsp -..B2.1: - .cfi_startproc -..___tag_value___y0l.34: -..L35: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - lea 176+_S(%rip), %rax - fldt 96(%rsp) - fldt (%rax) - fcomip %st(1), %st - jb ..B2.22 -..B2.2: - lea _val_0_6L(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - ja ..B2.20 -..B2.3: - lea _val_1_2L(%rip), %rax - fldt (%rax) - fcomi %st(1), %st - jbe ..B2.5 -..B2.4: - fstp %st(0) - lea _Z(%rip), %rax - lea _P11(%rip), %rdx - lea 16+_P11(%rip), %rcx - lea 32+_P11(%rip), %rdi - lea 48+_P11(%rip), %r8 - lea 64+_P11(%rip), %r9 - lea 80+_P11(%rip), %r10 - fldt (%rax) - lea _Q11(%rip), %rsi - lea 16+_Q11(%rip), %r11 - lea 96+_P11(%rip), %rax - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea 112+_P11(%rip), %rdx - fmul %st(1), %st - fldt (%rcx) - lea 128+_P11(%rip), %rcx - fmul %st(2), %st - fldt (%rsi) - lea 144+_P11(%rip), %rsi - fmul %st(4), %st - fldt (%rdi) - lea 32+_Q11(%rip), %rdi - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%r8) - lea 160+_P11(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r9) - lea 176+_P11(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r10) - lea 192+_P11(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r11) - lea 208+_P11(%rip), %r11 - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt (%rax) - lea 48+_Q11(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rdx) - lea _ones(%rip), %rdx - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%rcx) - lea 224+_P11(%rip), %rcx - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%rsi) - lea 240+_P11(%rip), %rsi - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%rdi) - lea 256+_P11(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r8) - lea 272+_P11(%rip), %r8 - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - faddp %st, %st(3) - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fdivrl (%rdx) - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B2.27 -..B2.5: - lea _S(%rip), %rcx - fldt (%rcx) - fcomip %st(2), %st - jbe ..B2.7 -..B2.6: - lea _P12(%rip), %rax - lea 16+_P12(%rip), %rdx - lea 32+_P12(%rip), %rcx - lea 48+_P12(%rip), %rsi - lea 64+_P12(%rip), %rdi - lea 80+_P12(%rip), %r8 - lea 96+_P12(%rip), %r9 - lea 112+_P12(%rip), %r10 - fldt (%rax) - lea 128+_P12(%rip), %r11 - lea 144+_P12(%rip), %rax - fxch %st(1) - fsubrp %st, %st(2) - fld %st(1) - fmul %st(2), %st - fmul %st, %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea 160+_P12(%rip), %rdx - fmul %st(1), %st - fldt (%rcx) - lea 176+_P12(%rip), %rcx - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt (%rsi) - lea 192+_P12(%rip), %rsi - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rdi) - lea 208+_P12(%rip), %rdi - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%r8) - lea 224+_P12(%rip), %r8 - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r9) - lea 240+_P12(%rip), %r9 - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%r10) - lea 256+_P12(%rip), %r10 - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r11) - lea 272+_P12(%rip), %r11 - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%rax) - lea 288+_P12(%rip), %rax - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rdx) - lea 304+_P12(%rip), %rdx - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%rcx) - lea 320+_P12(%rip), %rcx - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rsi) - lea 336+_P12(%rip), %rsi - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%rdi) - lea 352+_P12(%rip), %rdi - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r8) - lea 368+_P12(%rip), %r8 - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%r9) - lea 384+_P12(%rip), %r9 - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r10) - lea 400+_P12(%rip), %r10 - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%r11) - lea 416+_P12(%rip), %r11 - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rax) - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%rdx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rcx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%rsi) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rdi) - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%r8) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r9) - faddp %st, %st(3) - fmulp %st, %st(2) - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r11) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.7: - fstp %st(0) - lea _val_3_0L(%rip), %rax - fldt (%rax) - fcomi %st(1), %st - jbe ..B2.9 -..B2.8: - lea _P20(%rip), %rax - lea 16+_P20(%rip), %rdx - lea 32+_P20(%rip), %rcx - lea 48+_P20(%rip), %rsi - lea 64+_P20(%rip), %rdi - lea 80+_P20(%rip), %r8 - lea 96+_P20(%rip), %r9 - lea 112+_P20(%rip), %r10 - lea 128+_P20(%rip), %r11 - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rax) - lea 144+_P20(%rip), %rax - fmul %st(1), %st - fldt (%rdx) - lea 160+_P20(%rip), %rdx - fmul %st(2), %st - fldt (%rcx) - lea 176+_P20(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 192+_P20(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 208+_P20(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 224+_P20(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 240+_P20(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 256+_P20(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 272+_P20(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%r10) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r11) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.9: - fstp %st(0) - lea _val_3_875L(%rip), %rax - fldt (%rax) - fcomi %st(1), %st - jbe ..B2.11 -..B2.10: - lea _P21(%rip), %rax - lea 16+_P21(%rip), %rdx - lea 32+_P21(%rip), %rcx - lea 48+_P21(%rip), %rsi - lea 64+_P21(%rip), %rdi - lea 80+_P21(%rip), %r8 - lea 96+_P21(%rip), %r9 - lea 112+_P21(%rip), %r10 - fldt (%rax) - fxch %st(1) - fsubrp %st, %st(2) - fld %st(1) - lea 128+_P21(%rip), %r11 - lea 144+_P21(%rip), %rax - fmul %st(2), %st - fmul %st, %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea 160+_P21(%rip), %rdx - fmul %st(1), %st - fldt (%rcx) - lea 176+_P21(%rip), %rcx - faddp %st, %st(3) - fxch %st(1) - fmul %st, %st(2) - fldt (%rsi) - lea 192+_P21(%rip), %rsi - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rdi) - lea 208+_P21(%rip), %rdi - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%r8) - lea 224+_P21(%rip), %r8 - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r9) - lea 240+_P21(%rip), %r9 - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%r10) - lea 256+_P21(%rip), %r10 - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r11) - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%rax) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rdx) - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%rcx) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%rsi) - faddp %st, %st(3) - fmul %st, %st(2) - fldt (%rdi) - faddp %st, %st(2) - fmul %st, %st(1) - fldt (%r8) - faddp %st, %st(3) - fmulp %st, %st(2) - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%r10) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.11: - fstp %st(0) - lea 16+_S(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - jb ..B2.13 -..B2.12: - lea 16+_Z(%rip), %rax - lea _P22(%rip), %rdx - lea 16+_P22(%rip), %rcx - lea 32+_P22(%rip), %rsi - lea 48+_P22(%rip), %rdi - lea 64+_P22(%rip), %r8 - lea 80+_P22(%rip), %r9 - lea 96+_P22(%rip), %r10 - fldt (%rax) - lea 112+_P22(%rip), %r11 - lea 128+_P22(%rip), %rax - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea 144+_P22(%rip), %rdx - fmul %st(1), %st - fldt (%rcx) - lea 160+_P22(%rip), %rcx - fmul %st(2), %st - fldt (%rsi) - lea 176+_P22(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 192+_P22(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 208+_P22(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 224+_P22(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 240+_P22(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 256+_P22(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 272+_P22(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 288+_P22(%rip), %rdx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rdx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.13: - lea 32+_S(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - jbe ..B2.15 -..B2.14: - lea 32+_Z(%rip), %rax - lea _P3(%rip), %rdx - lea 16+_P3(%rip), %rcx - lea 32+_P3(%rip), %rsi - lea 48+_P3(%rip), %rdi - lea 64+_P3(%rip), %r8 - lea 80+_P3(%rip), %r9 - fldt (%rax) - lea 96+_P3(%rip), %r10 - lea 112+_P3(%rip), %r11 - lea 128+_P3(%rip), %rax - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea 144+_P3(%rip), %rdx - fmul %st(1), %st - fldt (%rcx) - lea 160+_P3(%rip), %rcx - fmul %st(2), %st - fldt (%rsi) - lea 176+_P3(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 192+_P3(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 208+_P3(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 224+_P3(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 240+_P3(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 256+_P3(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 272+_P3(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 288+_P3(%rip), %rdx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - lea 304+_P3(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 320+_P3(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 336+_P3(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rsi) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rdi) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.15: - movl $3, %edx - movl $48, %eax -..B2.16: - fldt (%rax,%rcx) - fcomip %st(1), %st - ja ..B2.19 - jp ..B2.19 -..B2.17: - incq %rdx - addq $16, %rax - cmpq $11, %rdx - jl ..B2.16 -..B2.18: - movq %rdx, %rax - shlq $4, %rax -..B2.19: - lea _Z(%rip), %rcx - fldt (%rax,%rcx) - lea (%rdx,%rdx,4), %rax - shlq $6, %rax - fsubrp %st, %st(1) - fld %st(0) - lea _P(%rip), %rdx - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt -960(%rax,%rdx) - fmul %st(1), %st - fldt -944(%rax,%rdx) - fmul %st(2), %st - fldt -928(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -912(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -896(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -880(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -864(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -848(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -832(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -816(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -800(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -784(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -768(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -752(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -736(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -720(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -704(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -688(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt -672(%rax,%rdx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt -656(%rax,%rdx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.27 -..B2.20: - fld %st(0) - lea _P0(%rip), %rax - fmul %st(1), %st - lea 16+_P0(%rip), %rdx - fxch %st(1) - fld %st(1) - lea 32+_P0(%rip), %rcx - fmul %st(2), %st - lea 48+_P0(%rip), %rsi - lea 64+_P0(%rip), %rdi - lea 80+_P0(%rip), %r8 - lea 96+_P0(%rip), %r9 - lea 112+_P0(%rip), %r10 - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - fxch %st(1) - fstpt (%rsp) - fldt (%rax) - fmul %st(2), %st - fldt (%rdx) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt (%r9) - faddp %st, %st(1) - fmulp %st, %st(1) - fldt (%r10) - faddp %st, %st(2) - faddp %st, %st(1) - fstpt 16(%rsp) -..___tag_value___y0l.38: - call __j0l@PLT -..___tag_value___y0l.39: -..B2.31: - fldt 112(%rsp) - fxch %st(1) - fstpt 32(%rsp) - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 96 -..B2.21: - fxch %st(1) - fstpl 40(%rsp) - movsd 40(%rsp), %xmm0 - fstpt (%rsp) - call log@PLT -..B2.32: - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt 16(%rsp) - movsd %xmm0, 32(%rsp) - fldt (%rax) - fmulp %st, %st(1) - fmull 32(%rsp) - faddp %st, %st(1) - jmp ..B2.27 -..B2.22: - lea _ones(%rip), %rax - lea _val_36_0L(%rip), %rdx - lea _PP(%rip), %rcx - lea _QP(%rip), %rsi - lea 16+_PP(%rip), %rdi - lea 16+_QP(%rip), %r8 - lea 32+_PP(%rip), %r9 - lea 32+_QP(%rip), %r10 - fldl (%rax) - lea 48+_PP(%rip), %r11 - fdiv %st(1), %st - lea 48+_QP(%rip), %rax - fxch %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fldt (%rdx) - lea 64+_PP(%rip), %rdx - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fxch %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - fxch %st(2) - fstpt (%rsp) - fldt (%rcx) - lea 64+_QP(%rip), %rcx - fmul %st(1), %st - fldt (%rsi) - lea 80+_PP(%rip), %rsi - fmul %st(2), %st - fldt (%rdi) - lea 80+_QP(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 96+_PP(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 96+_QP(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 112+_PP(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 112+_QP(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_PP(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 128+_QP(%rip), %rdx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - lea 144+_PP(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 144+_QP(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 80(%rsp), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - movl $-1, %edx - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rcx) - faddp %st, %st(1) - fstpt -48(%rdi) - fldt (%rsi) - lea 64(%rsp), %rsi - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -16(%rsi) -..___tag_value___y0l.42: - call __libm_sincos_pi4l@PLT -..___tag_value___y0l.43: -..B2.33: - fldt 112(%rsp) - fldt 48(%rsp) - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 96 -..B2.23: - fldt 64(%rsp) - lea _val_0_03L(%rip), %rax - fmulp %st, %st(1) - fldt 48(%rsp) - fmulp %st, %st(2) - fadd %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt (%rax) - fmulp %st, %st(1) - fcomip %st(1), %st - fstp %st(0) - jae ..B2.25 - jp ..B2.25 -..B2.24: - fstp %st(1) - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - jmp ..B2.27 -..B2.25: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B2.35: - addq $16, %rsp - .cfi_def_cfa_offset 96 - movaps (%rsp), %xmm0 -..___tag_value___y0l.47: - call __y0q@PLT -..___tag_value___y0l.48: -..B2.26: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B2.36: - fstpl 40(%rsp) - movsd 40(%rsp), %xmm0 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) -..B2.27: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __y0l,@function - .size __y0l,.-__y0l - .data -# -- End __y0l - .section .rodata, "a" - .align 4 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_S: - .word 5921 - .word 65426 - .word 63142 - .word 35997 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 29632 - .word 15745 - .word 62068 - .word 44479 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 41288 - .word 2893 - .word 15731 - .word 35209 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 12322 - .word 41360 - .word 35270 - .word 48124 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 21828 - .word 62500 - .word 60486 - .word 61019 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 54460 - .word 63729 - .word 58186 - .word 36952 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 27250 - .word 3142 - .word 10825 - .word 43393 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 20649 - .word 49414 - .word 53633 - .word 49831 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 59160 - .word 26587 - .word 26484 - .word 56269 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 57283 - .word 10561 - .word 16432 - .word 62706 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 44243 - .word 51162 - .word 18495 - .word 34571 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 63781 - .word 54231 - .word 15770 - .word 37789 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _S,@object - .size _S,192 - .align 2 -_val_0_6L: - .word 39322 - .word 39321 - .word 39321 - .word 39321 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _val_0_6L,@object - .size _val_0_6L,16 - .align 2 -_val_1_2L: - .word 39322 - .word 39321 - .word 39321 - .word 39321 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _val_1_2L,@object - .size _val_1_2L,16 - .align 2 -_Z: - .word 20971 - .word 41151 - .word 30150 - .word 58561 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 56848 - .word 49844 - .word 39532 - .word 64842 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 5940 - .word 14600 - .word 60967 - .word 58048 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 48233 - .word 9194 - .word 47533 - .word 41870 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 19716 - .word 3898 - .word 3621 - .word 54727 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 41547 - .word 400 - .word 58272 - .word 33793 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 46312 - .word 65374 - .word 26362 - .word 40225 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 15253 - .word 48480 - .word 38891 - .word 46657 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 12158 - .word 16394 - .word 14239 - .word 53090 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 31253 - .word 2914 - .word 8779 - .word 59523 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 29606 - .word 9567 - .word 8455 - .word 32978 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 51148 - .word 41491 - .word 50276 - .word 36194 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _Z,@object - .size _Z,192 - .align 2 -_P11: - .word 21672 - .word 14168 - .word 38767 - .word 33539 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 41169 - .word 50619 - .word 21849 - .word 37014 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 55003 - .word 42793 - .word 44721 - .word 50737 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 1169 - .word 13656 - .word 30890 - .word 57268 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 2761 - .word 22275 - .word 55697 - .word 58639 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 63624 - .word 9235 - .word 64995 - .word 56818 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 62376 - .word 14952 - .word 24232 - .word 50456 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 35764 - .word 14862 - .word 11423 - .word 44812 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 799 - .word 749 - .word 44421 - .word 44099 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 57800 - .word 45157 - .word 3532 - .word 40524 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 54824 - .word 35595 - .word 46140 - .word 46550 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 57927 - .word 14014 - .word 38764 - .word 61194 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 31025 - .word 58986 - .word 13056 - .word 57752 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 25304 - .word 41780 - .word 21387 - .word 41754 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 38881 - .word 54183 - .word 37931 - .word 34827 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 19650 - .word 12565 - .word 569 - .word 58514 - .word 16383 - .word 0 - .word 0 - .word 0 - .word 23916 - .word 27820 - .word 49726 - .word 50434 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 37686 - .word 17141 - .word 5720 - .word 38948 - .word 16317 - .word 0 - .word 0 - .word 0 - .type _P11,@object - .size _P11,288 - .align 2 -_Q11: - .word 14194 - .word 21345 - .word 52686 - .word 49437 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 16969 - .word 59638 - .word 1826 - .word 39310 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 28926 - .word 48282 - .word 1364 - .word 41291 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 13574 - .word 15497 - .word 63728 - .word 57349 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _Q11,@object - .size _Q11,64 - .align 2 -_P12: - .word 59330 - .word 22263 - .word 34178 - .word 51006 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 16861 - .word 21193 - .word 35273 - .word 46715 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 2103 - .word 12628 - .word 1838 - .word 41114 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 46148 - .word 53581 - .word 46203 - .word 46468 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 19710 - .word 1268 - .word 64842 - .word 38086 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 10276 - .word 59226 - .word 39596 - .word 48586 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 31029 - .word 64049 - .word 23137 - .word 50693 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 22014 - .word 1854 - .word 56980 - .word 45052 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 12740 - .word 38047 - .word 44756 - .word 35383 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 9689 - .word 42893 - .word 35756 - .word 50848 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 16570 - .word 20820 - .word 51546 - .word 34499 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 49962 - .word 36228 - .word 57995 - .word 45370 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 32489 - .word 35981 - .word 43312 - .word 58898 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 10311 - .word 12657 - .word 16405 - .word 38148 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 32504 - .word 29604 - .word 49577 - .word 49580 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 65322 - .word 54336 - .word 27403 - .word 64825 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 33227 - .word 51353 - .word 11288 - .word 42704 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 30209 - .word 39595 - .word 16790 - .word 56786 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 17645 - .word 4926 - .word 40100 - .word 38165 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 6983 - .word 2488 - .word 5292 - .word 51990 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 4652 - .word 21592 - .word 9570 - .word 36478 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 53361 - .word 14763 - .word 26464 - .word 52381 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 50485 - .word 35307 - .word 30503 - .word 59794 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 18614 - .word 21402 - .word 49824 - .word 37715 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 55547 - .word 61092 - .word 564 - .word 48870 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 9082 - .word 24716 - .word 52021 - .word 40706 - .word 16382 - .word 0 - .word 0 - .word 0 - .word 17305 - .word 30912 - .word 47308 - .word 59790 - .word 16380 - .word 0 - .word 0 - .word 0 - .type _P12,@object - .size _P12,432 - .align 2 -_val_3_0L: - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _val_3_0L,@object - .size _val_3_0L,16 - .align 2 -_P20: - .word 37654 - .word 4018 - .word 25149 - .word 64448 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 19189 - .word 12397 - .word 54733 - .word 33028 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 22349 - .word 41220 - .word 13172 - .word 45200 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 43891 - .word 61784 - .word 34756 - .word 53833 - .word 16358 - .word 0 - .word 0 - .word 0 - .word 23592 - .word 62506 - .word 40671 - .word 50152 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 27771 - .word 49376 - .word 49653 - .word 53593 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 29892 - .word 65375 - .word 48818 - .word 47355 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 33664 - .word 20071 - .word 46988 - .word 35237 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 40179 - .word 47562 - .word 27113 - .word 46088 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 39977 - .word 33568 - .word 2856 - .word 39237 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 22462 - .word 11227 - .word 63692 - .word 48552 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 9895 - .word 49985 - .word 29445 - .word 35598 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 41034 - .word 13031 - .word 20740 - .word 35245 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 32927 - .word 48253 - .word 43 - .word 37376 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 5109 - .word 58801 - .word 31733 - .word 33042 - .word 16379 - .word 0 - .word 0 - .word 0 - .word 34717 - .word 51477 - .word 15888 - .word 35209 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 4166 - .word 43043 - .word 47592 - .word 42555 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 20077 - .word 289 - .word 31753 - .word 49394 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _P20,@object - .size _P20,288 - .align 2 -_val_3_875L: - .word 0 - .word 0 - .word 0 - .word 63488 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _val_3_875L,@object - .size _val_3_875L,16 - .align 2 -_P21: - .word 27895 - .word 14185 - .word 11256 - .word 61473 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 55110 - .word 27090 - .word 21413 - .word 51858 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 47481 - .word 51958 - .word 45685 - .word 44708 - .word 49121 - .word 0 - .word 0 - .word 0 - .word 53606 - .word 43192 - .word 10601 - .word 36675 - .word 49120 - .word 0 - .word 0 - .word 0 - .word 9703 - .word 39697 - .word 3773 - .word 54687 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 39016 - .word 46259 - .word 57439 - .word 47927 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 18601 - .word 64800 - .word 43294 - .word 45654 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 11755 - .word 20846 - .word 12691 - .word 36847 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 34925 - .word 21969 - .word 12496 - .word 40232 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 33074 - .word 22131 - .word 45345 - .word 58077 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 28402 - .word 30562 - .word 17788 - .word 44258 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 64431 - .word 22682 - .word 21098 - .word 38133 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 38064 - .word 47115 - .word 9737 - .word 49752 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 32940 - .word 23551 - .word 17164 - .word 63584 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 20289 - .word 55054 - .word 36724 - .word 37823 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 46434 - .word 29308 - .word 2375 - .word 53705 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 16931 - .word 9593 - .word 51956 - .word 35227 - .word 16378 - .word 0 - .word 0 - .word 0 - .type _P21,@object - .size _P21,272 - .align 2 -_P22: - .word 40244 - .word 7737 - .word 8636 - .word 43048 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 47822 - .word 28463 - .word 39991 - .word 46660 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 52293 - .word 15799 - .word 45377 - .word 51162 - .word 49113 - .word 0 - .word 0 - .word 0 - .word 37860 - .word 10494 - .word 27911 - .word 39108 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 1970 - .word 24596 - .word 57275 - .word 48105 - .word 49118 - .word 0 - .word 0 - .word 0 - .word 64547 - .word 28877 - .word 41771 - .word 52711 - .word 16352 - .word 0 - .word 0 - .word 0 - .word 63459 - .word 4647 - .word 40018 - .word 64048 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 38817 - .word 50313 - .word 34514 - .word 41599 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 6873 - .word 59727 - .word 11575 - .word 48044 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 29515 - .word 62000 - .word 64058 - .word 40336 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 47818 - .word 19180 - .word 47066 - .word 42033 - .word 49133 - .word 0 - .word 0 - .word 0 - .word 35527 - .word 6093 - .word 4081 - .word 54678 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 16787 - .word 50723 - .word 15144 - .word 52417 - .word 16370 - .word 0 - .word 0 - .word 0 - .word 27442 - .word 31785 - .word 24103 - .word 36633 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 6233 - .word 52232 - .word 32482 - .word 57483 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 59606 - .word 43125 - .word 44255 - .word 61366 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 29998 - .word 6975 - .word 18760 - .word 53326 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 24786 - .word 2384 - .word 4789 - .word 52762 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 34816 - .word 30902 - .word 22802 - .word 44066 - .word 49086 - .word 0 - .word 0 - .word 0 - .type _P22,@object - .size _P22,304 - .align 2 -_P3: - .word 38373 - .word 25081 - .word 52784 - .word 41269 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 2433 - .word 58494 - .word 34093 - .word 49310 - .word 49089 - .word 0 - .word 0 - .word 0 - .word 20384 - .word 14386 - .word 32743 - .word 56565 - .word 16322 - .word 0 - .word 0 - .word 0 - .word 12279 - .word 3882 - .word 34299 - .word 37877 - .word 49096 - .word 0 - .word 0 - .word 0 - .word 57529 - .word 46240 - .word 60154 - .word 40126 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 46223 - .word 16522 - .word 54101 - .word 39334 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 17152 - .word 52627 - .word 55415 - .word 33597 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 46957 - .word 15713 - .word 64890 - .word 47269 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 63416 - .word 7921 - .word 11783 - .word 63655 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 22182 - .word 52374 - .word 10257 - .word 64822 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 20533 - .word 18718 - .word 7837 - .word 41493 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 34870 - .word 43221 - .word 2667 - .word 34068 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 62446 - .word 64657 - .word 15033 - .word 39509 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 31017 - .word 38768 - .word 5018 - .word 46409 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 37858 - .word 10529 - .word 62079 - .word 49339 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 60794 - .word 51427 - .word 47345 - .word 37742 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 8999 - .word 61205 - .word 62511 - .word 36506 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 22683 - .word 43326 - .word 42314 - .word 55672 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 37536 - .word 24482 - .word 58150 - .word 50356 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 47735 - .word 57962 - .word 45199 - .word 44407 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 54502 - .word 19410 - .word 25859 - .word 39334 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 1861 - .word 57822 - .word 27975 - .word 42824 - .word 49086 - .word 0 - .word 0 - .word 0 - .type _P3,@object - .size _P3,352 - .align 2 -_P: - .word 6710 - .word 46975 - .word 45541 - .word 45018 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 47994 - .word 32334 - .word 52627 - .word 65214 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 25829 - .word 961 - .word 45314 - .word 63623 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 56740 - .word 896 - .word 13408 - .word 40400 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 60385 - .word 50719 - .word 53670 - .word 35961 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 18363 - .word 40724 - .word 30788 - .word 37641 - .word 16343 - .word 0 - .word 0 - .word 0 - .word 54199 - .word 26560 - .word 1100 - .word 63052 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 31112 - .word 47384 - .word 24910 - .word 52460 - .word 49118 - .word 0 - .word 0 - .word 0 - .word 62051 - .word 62630 - .word 7457 - .word 41285 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 41021 - .word 16553 - .word 53133 - .word 51701 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 43336 - .word 19494 - .word 20322 - .word 38261 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 44128 - .word 40851 - .word 40287 - .word 33282 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 15978 - .word 61692 - .word 60093 - .word 46462 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 34924 - .word 34591 - .word 27618 - .word 49090 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 22325 - .word 56457 - .word 51367 - .word 65297 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 21258 - .word 62600 - .word 63264 - .word 33170 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 31459 - .word 43701 - .word 15672 - .word 42803 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 10392 - .word 64190 - .word 8847 - .word 51227 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 34244 - .word 38351 - .word 44643 - .word 65457 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 24705 - .word 53181 - .word 1549 - .word 55232 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 24274 - .word 2157 - .word 59872 - .word 44641 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 44404 - .word 52032 - .word 31206 - .word 56185 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 42376 - .word 53700 - .word 44782 - .word 63474 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 55880 - .word 43379 - .word 3093 - .word 34064 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 62288 - .word 61979 - .word 24976 - .word 35576 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 30673 - .word 34148 - .word 2010 - .word 61956 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 45192 - .word 28065 - .word 60055 - .word 61722 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 24582 - .word 59932 - .word 774 - .word 41831 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 39741 - .word 15639 - .word 29541 - .word 39821 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 32965 - .word 53765 - .word 3652 - .word 39681 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 55274 - .word 5931 - .word 14729 - .word 36200 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 4659 - .word 41741 - .word 5124 - .word 48783 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 61896 - .word 13936 - .word 31722 - .word 42885 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 29587 - .word 13947 - .word 35938 - .word 34351 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 30548 - .word 42185 - .word 15217 - .word 58709 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 32944 - .word 45803 - .word 62008 - .word 44929 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 15543 - .word 17819 - .word 22981 - .word 37733 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 40787 - .word 12944 - .word 27687 - .word 34273 - .word 49144 - .word 0 - .word 0 - .word 0 - .word 14474 - .word 51712 - .word 20794 - .word 57241 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 31505 - .word 44115 - .word 25843 - .word 56405 - .word 49084 - .word 0 - .word 0 - .word 0 - .word 29537 - .word 33343 - .word 23367 - .word 43948 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 15837 - .word 34931 - .word 8097 - .word 48214 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 1126 - .word 23018 - .word 59367 - .word 62418 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 50591 - .word 16203 - .word 45917 - .word 57446 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 6095 - .word 44294 - .word 16725 - .word 34699 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 2346 - .word 25530 - .word 14073 - .word 51139 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 48724 - .word 10078 - .word 7882 - .word 59578 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 3077 - .word 7734 - .word 24746 - .word 33688 - .word 49118 - .word 0 - .word 0 - .word 0 - .word 52085 - .word 9505 - .word 49832 - .word 37954 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 41663 - .word 47247 - .word 238 - .word 62191 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 48361 - .word 39255 - .word 14492 - .word 33999 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 35816 - .word 34414 - .word 54424 - .word 37185 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 20077 - .word 189 - .word 48758 - .word 39656 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 35728 - .word 48114 - .word 41225 - .word 51144 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 10943 - .word 64308 - .word 2314 - .word 53541 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 32154 - .word 56468 - .word 40039 - .word 32925 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 4941 - .word 52917 - .word 35073 - .word 34082 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 61194 - .word 15048 - .word 42139 - .word 49938 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 19128 - .word 18289 - .word 6860 - .word 51502 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 49300 - .word 58708 - .word 59005 - .word 55071 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 26502 - .word 47642 - .word 36933 - .word 42964 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 30051 - .word 60756 - .word 30625 - .word 41460 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 61015 - .word 15762 - .word 48007 - .word 60846 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 21975 - .word 20753 - .word 22643 - .word 48677 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 54246 - .word 4624 - .word 38600 - .word 33572 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 59379 - .word 53723 - .word 32353 - .word 42607 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 40791 - .word 16038 - .word 57576 - .word 57139 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 25939 - .word 3603 - .word 54023 - .word 55128 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 7176 - .word 58381 - .word 25669 - .word 36047 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 23057 - .word 6107 - .word 22526 - .word 49962 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 19351 - .word 39386 - .word 35003 - .word 63923 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 45293 - .word 12882 - .word 9948 - .word 58748 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 20001 - .word 20829 - .word 53529 - .word 36918 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 21919 - .word 49831 - .word 37577 - .word 39856 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 47026 - .word 46471 - .word 55318 - .word 49443 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 61519 - .word 51459 - .word 6950 - .word 50870 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 1555 - .word 2971 - .word 23597 - .word 62610 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 45926 - .word 36681 - .word 39043 - .word 38451 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 64160 - .word 21923 - .word 31542 - .word 47202 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 36569 - .word 36429 - .word 41036 - .word 40257 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 63272 - .word 57206 - .word 4215 - .word 41813 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 38880 - .word 42175 - .word 14999 - .word 35837 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 42787 - .word 9806 - .word 63168 - .word 59020 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 31095 - .word 14929 - .word 48209 - .word 41580 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 36413 - .word 27679 - .word 45695 - .word 64718 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 24761 - .word 31380 - .word 27544 - .word 35930 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 11221 - .word 62995 - .word 50975 - .word 54692 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 29668 - .word 1933 - .word 17144 - .word 45888 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 30810 - .word 24149 - .word 32113 - .word 34254 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 34856 - .word 24408 - .word 21475 - .word 41075 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 33943 - .word 23810 - .word 62559 - .word 60314 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 3305 - .word 24934 - .word 37437 - .word 47776 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 54895 - .word 55211 - .word 32000 - .word 34613 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 35009 - .word 47065 - .word 21660 - .word 64281 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 9852 - .word 9156 - .word 55656 - .word 46121 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 36442 - .word 41210 - .word 20060 - .word 40802 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 21758 - .word 47322 - .word 2788 - .word 58210 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 52348 - .word 9004 - .word 18276 - .word 61559 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 54786 - .word 7147 - .word 27070 - .word 43826 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 34268 - .word 15768 - .word 2480 - .word 60089 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 1157 - .word 52048 - .word 20458 - .word 40588 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 51540 - .word 48806 - .word 47292 - .word 62380 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 19999 - .word 57758 - .word 46120 - .word 57112 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 21459 - .word 54484 - .word 23863 - .word 35854 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 28754 - .word 5362 - .word 55327 - .word 62303 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 45243 - .word 6687 - .word 17114 - .word 61365 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 32048 - .word 1009 - .word 39781 - .word 52368 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 64584 - .word 3308 - .word 26412 - .word 38818 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 23088 - .word 38547 - .word 22659 - .word 65247 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 14061 - .word 22418 - .word 61292 - .word 34447 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 57848 - .word 26921 - .word 61797 - .word 57155 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 1597 - .word 31414 - .word 38572 - .word 39774 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 30034 - .word 27108 - .word 16687 - .word 65316 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 32265 - .word 44536 - .word 9779 - .word 53216 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 550 - .word 16407 - .word 19715 - .word 43369 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 7132 - .word 1973 - .word 39654 - .word 33659 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 19090 - .word 42384 - .word 19608 - .word 54616 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 29916 - .word 8899 - .word 53582 - .word 50715 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 63987 - .word 34002 - .word 32751 - .word 41084 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 31930 - .word 50610 - .word 35321 - .word 40669 - .word 49085 - .word 0 - .word 0 - .word 0 - .word 64556 - .word 32042 - .word 47688 - .word 39353 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 22761 - .word 33268 - .word 25802 - .word 54704 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 48596 - .word 35082 - .word 36228 - .word 55222 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 62834 - .word 26257 - .word 62649 - .word 62428 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 22216 - .word 57771 - .word 11637 - .word 59993 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 32841 - .word 24077 - .word 25618 - .word 53031 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 7134 - .word 15474 - .word 25724 - .word 50216 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 679 - .word 61058 - .word 8963 - .word 33314 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 30607 - .word 23707 - .word 50236 - .word 62315 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 57112 - .word 44811 - .word 22996 - .word 58760 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 7925 - .word 14145 - .word 19419 - .word 54389 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 15063 - .word 11101 - .word 53306 - .word 33747 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 17212 - .word 63840 - .word 49608 - .word 61962 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 64221 - .word 2367 - .word 56115 - .word 44976 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 25958 - .word 42476 - .word 21228 - .word 41045 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 39160 - .word 29939 - .word 20970 - .word 56757 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 34212 - .word 35958 - .word 8729 - .word 51611 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 47817 - .word 56326 - .word 46415 - .word 42719 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 14697 - .word 51278 - .word 14116 - .word 38800 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 42056 - .word 1202 - .word 6817 - .word 52251 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 9811 - .word 3897 - .word 54180 - .word 38147 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 22279 - .word 36400 - .word 23268 - .word 48339 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 3604 - .word 63501 - .word 23839 - .word 53404 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 1179 - .word 37183 - .word 50892 - .word 54850 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 59751 - .word 27404 - .word 14795 - .word 57826 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 14718 - .word 11779 - .word 34360 - .word 46330 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 59705 - .word 41619 - .word 32041 - .word 48245 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 23030 - .word 54615 - .word 27535 - .word 57905 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 39169 - .word 62610 - .word 58529 - .word 59687 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 51398 - .word 44311 - .word 12717 - .word 50833 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 27431 - .word 2954 - .word 22657 - .word 51954 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 58296 - .word 29685 - .word 27243 - .word 58169 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 51216 - .word 48206 - .word 42318 - .word 59054 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 56132 - .word 37000 - .word 55250 - .word 38652 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 33362 - .word 39562 - .word 49329 - .word 39051 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 45334 - .word 5673 - .word 58520 - .word 48690 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 35653 - .word 20625 - .word 33642 - .word 49050 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 58051 - .word 8993 - .word 6809 - .word 36624 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 52356 - .word 59873 - .word 62958 - .word 36858 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 32142 - .word 25405 - .word 33867 - .word 33307 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 49519 - .word 13151 - .word 56037 - .word 36991 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 44868 - .word 63207 - .word 24006 - .word 43028 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 8083 - .word 45145 - .word 39702 - .word 51683 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 45111 - .word 52725 - .word 38011 - .word 48603 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 60521 - .word 20244 - .word 23464 - .word 55814 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 20556 - .word 16261 - .word 38082 - .word 40872 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 25337 - .word 58099 - .word 56911 - .word 46447 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 37285 - .word 19168 - .word 56812 - .word 50878 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 15949 - .word 20065 - .word 40118 - .word 57328 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 40507 - .word 40248 - .word 14830 - .word 44509 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 5104 - .word 24529 - .word 29756 - .word 49797 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 46472 - .word 25780 - .word 5432 - .word 50788 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 15446 - .word 10547 - .word 15373 - .word 56506 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 3213 - .word 104 - .word 59551 - .word 33676 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 34009 - .word 54843 - .word 32265 - .word 37318 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 45472 - .word 58672 - .word 64591 - .word 42366 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 32200 - .word 21528 - .word 8481 - .word 46835 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 49716 - .word 3176 - .word 29068 - .word 63703 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 39156 - .word 24341 - .word 43754 - .word 35182 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 61730 - .word 30329 - .word 55010 - .word 38388 - .word 16320 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,2880 - .align 2 -_P0: - .word 46060 - .word 21479 - .word 19707 - .word 37102 - .word 16345 - .word 0 - .word 0 - .word 0 - .word 35676 - .word 11242 - .word 15120 - .word 54134 - .word 49120 - .word 0 - .word 0 - .word 0 - .word 34641 - .word 49003 - .word 21090 - .word 56946 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 36501 - .word 52298 - .word 48288 - .word 40780 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 2947 - .word 56486 - .word 859 - .word 36145 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 6106 - .word 41115 - .word 36319 - .word 33709 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 13230 - .word 6676 - .word 23048 - .word 46558 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 62532 - .word 24192 - .word 46286 - .word 38694 - .word 49147 - .word 0 - .word 0 - .word 0 - .type _P0,@object - .size _P0,128 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _tonpi,@object - .size _tonpi,16 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,16 - .align 2 -_PP: - .word 3555 - .word 4199 - .word 61716 - .word 36505 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 21640 - .word 56203 - .word 47336 - .word 57608 - .word 16322 - .word 0 - .word 0 - .word 0 - .word 3059 - .word 27554 - .word 42044 - .word 45622 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 55815 - .word 35656 - .word 54748 - .word 47307 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 42025 - .word 6728 - .word 28939 - .word 34692 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 58943 - .word 11189 - .word 14960 - .word 38786 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 43526 - .word 20005 - .word 29826 - .word 37014 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 58976 - .word 17109 - .word 36079 - .word 36708 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 58243 - .word 36408 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _PP,@object - .size _PP,160 - .align 2 -_QP: - .word 30466 - .word 14887 - .word 33885 - .word 35327 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 41139 - .word 65374 - .word 59488 - .word 50915 - .word 49088 - .word 0 - .word 0 - .word 0 - .word 35675 - .word 30946 - .word 22284 - .word 35505 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 65216 - .word 29458 - .word 42913 - .word 63176 - .word 49097 - .word 0 - .word 0 - .word 0 - .word 5130 - .word 24339 - .word 48915 - .word 38634 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 30040 - .word 27658 - .word 23448 - .word 34596 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 37816 - .word 17431 - .word 24401 - .word 49646 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 4377 - .word 35057 - .word 45578 - .word 33037 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 19863 - .word 65266 - .word 6202 - .word 53939 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 49142 - .word 0 - .word 0 - .word 0 - .type _QP,@object - .size _QP,160 - .align 2 -_val_0_03L: - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _val_0_03L,@object - .size _val_0_03L,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0f.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0f.S deleted file mode 100644 index c9f3efb8d0..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0f.S +++ /dev/null @@ -1,805 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y0f.c" - .text -..TXTST0: -# -- Begin y0f - .text - .align 16,0x90 - .globl y0f -y0f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_y0f.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movd %xmm0, %ecx - movss %xmm0, 48(%rsp) - lea -1(%rcx), %eax - cmpl $2139095039, %eax - jae ..B1.13 -..B1.2: - cmpl $1099978979, %ecx - jae ..B1.21 -..B1.3: - cmpl $1094450314, %ecx - jae ..B1.12 -..B1.4: - cmpl $1085128690, %ecx - jae ..B1.11 -..B1.5: - cmpl $1074568695, %ecx - jae ..B1.10 -..B1.6: - cmpl $1058642330, %ecx - jb ..B1.8 -..B1.7: - cvtss2sd %xmm0, %xmm0 - lea 168+_P1(%rip), %rax - lea 160+_P1(%rip), %rdx - lea 144+_P1(%rip), %r9 - lea 128+_P1(%rip), %rcx - lea 112+_P1(%rip), %r10 - lea 96+_P1(%rip), %rsi - lea 80+_P1(%rip), %r11 - lea 64+_P1(%rip), %rdi - movsd (%rdx), %xmm6 - lea 32+_P1(%rip), %r8 - movsd (%r9), %xmm1 - lea 16+_P1(%rip), %rdx - lea 56+_P1(%rip), %r9 - subsd (%rax), %xmm0 - movaps %xmm0, %xmm2 - lea 48+_P1(%rip), %rax - mulsd %xmm0, %xmm2 - movaps %xmm2, %xmm3 - mulsd %xmm2, %xmm3 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm1 - addsd (%rcx), %xmm6 - addsd (%r10), %xmm1 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm1 - addsd (%rsi), %xmm6 - addsd (%r11), %xmm1 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm1 - addsd (%rdi), %xmm6 - addsd (%rax), %xmm1 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm1 - addsd (%r8), %xmm6 - addsd (%rdx), %xmm1 - mulsd %xmm3, %xmm6 - mulsd %xmm2, %xmm1 - lea 152+_P1(%rip), %rsi - lea 136+_P1(%rip), %r11 - lea 120+_P1(%rip), %rdi - lea 104+_P1(%rip), %rax - lea 88+_P1(%rip), %r8 - lea 72+_P1(%rip), %rdx - lea _P1(%rip), %rcx - lea 24+_P1(%rip), %r10 - movsd (%rsi), %xmm5 - lea 8+_P1(%rip), %rsi - mulsd %xmm3, %xmm5 - addsd %xmm1, %xmm6 - movsd (%r11), %xmm4 - mulsd %xmm3, %xmm4 - addsd (%rdi), %xmm5 - addsd (%rcx), %xmm6 - mulsd %xmm3, %xmm5 - addsd (%rax), %xmm4 - mulsd %xmm3, %xmm4 - addsd (%r8), %xmm5 - mulsd %xmm3, %xmm5 - addsd (%rdx), %xmm4 - mulsd %xmm3, %xmm4 - addsd (%r9), %xmm5 - lea 40+_P1(%rip), %rcx - mulsd %xmm3, %xmm5 - addsd (%rcx), %xmm4 - addsd (%r10), %xmm5 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm5 - addsd (%rsi), %xmm4 - mulsd %xmm0, %xmm5 - mulsd %xmm0, %xmm4 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.8: - pxor %xmm3, %xmm3 - cvtss2sd 48(%rsp), %xmm3 - movaps %xmm3, %xmm0 - movsd %xmm3, (%rsp) -..___tag_value_y0f.6: - call __libm_log_k32@PLT -..___tag_value_y0f.7: -..B1.25: - movsd (%rsp), %xmm3 -..B1.9: - mulsd %xmm3, %xmm3 - lea _tonpi(%rip), %rax - movaps %xmm3, %xmm2 - lea 32+_Q1(%rip), %rdx - lea 24+_Q2(%rip), %r9 - lea 16+_Q2(%rip), %r11 - mulsd %xmm3, %xmm2 - lea 24+_Q1(%rip), %rdi - movsd (%rax), %xmm6 - lea 16+_Q1(%rip), %rcx - mulsd %xmm0, %xmm6 - lea 8+_Q2(%rip), %r10 - movsd (%rdx), %xmm0 - lea _Q2(%rip), %rax - movsd (%r9), %xmm5 - lea 8+_Q1(%rip), %r8 - movsd (%r11), %xmm4 - lea _Q1(%rip), %rsi - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm4 - addsd (%rcx), %xmm0 - addsd (%r10), %xmm5 - addsd (%rax), %xmm4 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - mulsd %xmm3, %xmm4 - addsd (%rsi), %xmm0 - addsd %xmm4, %xmm5 - movsd (%rdi), %xmm1 - mulsd %xmm2, %xmm1 - mulsd %xmm6, %xmm5 - addsd (%r8), %xmm1 - mulsd %xmm3, %xmm1 - addsd %xmm1, %xmm0 - addsd %xmm5, %xmm0 - addsd %xmm6, %xmm0 - cvtsd2ss %xmm0, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.10: - pxor %xmm0, %xmm0 - lea 144+_P2(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - lea 136+_P2(%rip), %rdx - lea 120+_P2(%rip), %r9 - lea 104+_P2(%rip), %rcx - lea 88+_P2(%rip), %r10 - lea 72+_P2(%rip), %rsi - lea 56+_P2(%rip), %r11 - lea 40+_P2(%rip), %rdi - lea 8+_P2(%rip), %r8 - movsd (%rdx), %xmm6 - lea 128+_P2(%rip), %rdx - movsd (%r9), %xmm1 - lea 112+_P2(%rip), %r9 - subsd (%rax), %xmm0 - lea 24+_P2(%rip), %rax - movaps %xmm0, %xmm3 - mulsd %xmm0, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - addsd (%rcx), %xmm6 - addsd (%r10), %xmm1 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - addsd (%rsi), %xmm6 - addsd (%r11), %xmm1 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - addsd (%rdi), %xmm6 - addsd (%rax), %xmm1 - mulsd %xmm2, %xmm6 - mulsd %xmm3, %xmm1 - addsd (%r8), %xmm6 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm6 - movsd (%rdx), %xmm5 - lea 96+_P2(%rip), %rcx - mulsd %xmm2, %xmm5 - lea 80+_P2(%rip), %r10 - addsd %xmm1, %xmm6 - addsd (%rcx), %xmm5 - movsd (%r9), %xmm4 - lea 64+_P2(%rip), %rsi - mulsd %xmm2, %xmm4 - lea 48+_P2(%rip), %r11 - mulsd %xmm2, %xmm5 - addsd (%r10), %xmm4 - addsd (%rsi), %xmm5 - mulsd %xmm2, %xmm4 - mulsd %xmm2, %xmm5 - addsd (%r11), %xmm4 - lea 32+_P2(%rip), %rdi - lea 16+_P2(%rip), %rax - mulsd %xmm2, %xmm4 - lea _P2(%rip), %r8 - addsd (%rdi), %xmm5 - addsd (%rax), %xmm4 - mulsd %xmm2, %xmm5 - mulsd %xmm3, %xmm4 - addsd (%r8), %xmm5 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.11: - cmpl $1091143997, %ecx - pxor %xmm0, %xmm0 - lea _P3(%rip), %rdx - lea _P4(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - jb ..L12 - movq %rax, %rdx -..L12: - movsd 104(%rdx), %xmm6 - movsd 88(%rdx), %xmm1 - movsd 96(%rdx), %xmm5 - movsd 80(%rdx), %xmm4 - subsd 112(%rdx), %xmm0 - movaps %xmm0, %xmm3 - mulsd %xmm0, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - addsd 72(%rdx), %xmm6 - mulsd %xmm2, %xmm4 - addsd 56(%rdx), %xmm1 - addsd 64(%rdx), %xmm5 - mulsd %xmm2, %xmm6 - addsd 48(%rdx), %xmm4 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - addsd 40(%rdx), %xmm6 - mulsd %xmm2, %xmm4 - addsd 24(%rdx), %xmm1 - addsd 32(%rdx), %xmm5 - mulsd %xmm2, %xmm6 - addsd 16(%rdx), %xmm4 - mulsd %xmm3, %xmm1 - mulsd %xmm2, %xmm5 - addsd 8(%rdx), %xmm6 - mulsd %xmm3, %xmm4 - mulsd %xmm0, %xmm1 - addsd (%rdx), %xmm5 - mulsd %xmm0, %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm1, %xmm6 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.12: - cmpl $1097751532, %ecx - pxor %xmm3, %xmm3 - lea _P5(%rip), %rdx - lea _P6(%rip), %rax - cvtss2sd 48(%rsp), %xmm3 - jb ..L15 - movq %rax, %rdx -..L15: - movsd 80(%rdx), %xmm6 - movsd 88(%rdx), %xmm5 - movsd 96(%rdx), %xmm0 - movsd 72(%rdx), %xmm4 - subsd 104(%rdx), %xmm3 - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm0 - addsd 48(%rdx), %xmm6 - mulsd %xmm2, %xmm4 - addsd 56(%rdx), %xmm5 - addsd 64(%rdx), %xmm0 - mulsd %xmm2, %xmm6 - addsd 40(%rdx), %xmm4 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm0 - addsd 16(%rdx), %xmm6 - mulsd %xmm2, %xmm4 - addsd 24(%rdx), %xmm5 - addsd 32(%rdx), %xmm0 - mulsd %xmm1, %xmm6 - addsd 8(%rdx), %xmm4 - mulsd %xmm1, %xmm5 - mulsd %xmm2, %xmm0 - addsd (%rdx), %xmm6 - mulsd %xmm3, %xmm4 - mulsd %xmm3, %xmm5 - addsd %xmm0, %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.13: - movl %ecx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.20 -..B1.14: - testl %eax, %eax - je ..B1.19 -..B1.15: - testl $-2147483648, %ecx - pxor %xmm0, %xmm0 - je ..B1.18 -..B1.16: - movss .L_2il0floatpacket.1(%rip), %xmm1 - mulss %xmm1, %xmm0 -..B1.18: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.19: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.20: - movss 48(%rsp), %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.21: - pxor %xmm0, %xmm0 - lea _val_16_0(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - movsd .L_2il0floatpacket.2(%rip), %xmm1 - lea (%rsp), %rdi - divsd %xmm0, %xmm1 - movsd (%rax), %xmm2 - lea 8(%rsp), %rsi - mulsd %xmm1, %xmm2 - movl $-1, %edx - movsd %xmm2, 8(%rsi) - mulsd %xmm2, %xmm2 - movsd %xmm2, 24(%rsi) - mulsd %xmm2, %xmm2 - movsd %xmm1, 16(%rsi) - movsd %xmm2, 32(%rsi) -..___tag_value_y0f.24: - call __libm_sincos_k32@PLT -..___tag_value_y0f.25: -..B1.22: - lea 40+_QP(%rip), %r10 - lea 40+_PP(%rip), %rdx - movsd 40(%rsp), %xmm2 - lea 24+_QP(%rip), %r11 - lea 24+_PP(%rip), %rcx - lea 32+_PP(%rip), %rdi - lea _tonpi(%rip), %rax - lea 16+_PP(%rip), %r8 - movsd (%r10), %xmm5 - lea 8+_PP(%rip), %rsi - movsd (%rdx), %xmm6 - lea 32+_QP(%rip), %rdx - mulsd %xmm2, %xmm5 - lea _PP(%rip), %r9 - mulsd %xmm2, %xmm6 - addsd (%r11), %xmm5 - addsd (%rcx), %xmm6 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm6 - movsd (%rdx), %xmm4 - lea 16+_QP(%rip), %rcx - mulsd %xmm2, %xmm4 - addsd (%rsi), %xmm6 - movsd (%rdi), %xmm1 - lea _QP(%rip), %rsi - mulsd %xmm2, %xmm1 - addsd (%rcx), %xmm4 - movsd (%rax), %xmm0 - lea 8+_QP(%rip), %rax - mulsd %xmm2, %xmm4 - addsd (%r8), %xmm1 - mulsd 24(%rsp), %xmm0 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm1 - addsd (%rsi), %xmm4 - sqrtsd %xmm0, %xmm0 - addsd (%r9), %xmm1 - movsd 32(%rsp), %xmm3 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm1, %xmm6 - mulsd 16(%rsp), %xmm5 - mulsd (%rsp), %xmm6 - mulsd 8(%rsp), %xmm5 - addsd %xmm5, %xmm6 - mulsd %xmm6, %xmm0 - cvtsd2ss %xmm0, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type y0f,@function - .size y0f,.-y0f - .data -# -- End y0f - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x7f800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_P1: - .long 4195291908 - .long 3162175307 - .long 406986291 - .long 1072440375 - .long 2776221165 - .long 3219095096 - .long 1133938471 - .long 1070349075 - .long 2954828429 - .long 3217879437 - .long 2763399148 - .long 1070335612 - .long 808830809 - .long 3217701246 - .long 1570268664 - .long 1070154462 - .long 3296077481 - .long 3217609508 - .long 420330990 - .long 1070118798 - .long 773510171 - .long 3217614074 - .long 4056659129 - .long 1070174592 - .long 3219431954 - .long 3217750970 - .long 3785879815 - .long 1070358232 - .long 574751405 - .long 3217779900 - .long 4260549547 - .long 1069957964 - .long 2938320462 - .long 3216782740 - .long 3378329138 - .long 1068120728 - .long 1915664650 - .long 3213929269 - .long 3426344990 - .long 1063895342 - .long 349103460 - .long 3207738231 - .long 3100907498 - .long 1072470062 - .type _P1,@object - .size _P1,176 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_Q1: - .long 2580172613 - .long 3216172246 - .long 1084453148 - .long 1069988811 - .long 2056290550 - .long 3213915569 - .long 1236657422 - .long 1061266913 - .long 2321867150 - .long 3202594720 - .type _Q1,@object - .size _Q1,40 - .align 4 -_Q2: - .long 4294648676 - .long 3218079743 - .long 3841535415 - .long 1066401791 - .long 664070481 - .long 3208409496 - .long 1981210199 - .long 1054621065 - .type _Q2,@object - .size _Q2,32 - .align 4 -_P2: - .long 1454683265 - .long 3163093641 - .long 1453379447 - .long 3218719554 - .long 687601567 - .long 1068108233 - .long 2612704149 - .long 1068365525 - .long 3658933664 - .long 3212579183 - .long 2932711330 - .long 3210863403 - .long 1642366143 - .long 1059690534 - .long 3271323791 - .long 1057665714 - .long 1907282597 - .long 3201598976 - .long 379771377 - .long 3197347542 - .long 4245487245 - .long 3193415108 - .long 3608497393 - .long 1045674492 - .long 2931231697 - .long 3190739602 - .long 990015633 - .long 1041359383 - .long 1316300206 - .long 3186258158 - .long 3640313785 - .long 3183477336 - .long 2399178872 - .long 3182342144 - .long 1279629276 - .long 1034489495 - .long 1301829276 - .long 1074768211 - .type _P2,@object - .size _P2,152 - .align 4 -_P3: - .long 2564005090 - .long 1014927793 - .long 2691273771 - .long 1070806220 - .long 300870104 - .long 3214257910 - .long 1691761700 - .long 3215496860 - .long 2795355208 - .long 1063989012 - .long 2286168356 - .long 1063375710 - .long 3010782666 - .long 3206704598 - .long 629642940 - .long 3204978559 - .long 4085313989 - .long 1053206786 - .long 1695842824 - .long 1050888907 - .long 399213285 - .long 3194002865 - .long 3012936744 - .long 3191097259 - .long 3874678520 - .long 1039019405 - .long 2821019721 - .long 1035940102 - .long 3303481603 - .long 1075599389 - .type _P3,@object - .size _P3,120 - .align 4 -_P4: - .long 3357785889 - .long 3165432791 - .long 3430075659 - .long 3218077237 - .long 1374220014 - .long 1065943908 - .long 2803440381 - .long 1067771495 - .long 3788987270 - .long 3210752606 - .long 378839180 - .long 3210732089 - .long 3385429871 - .long 1058535500 - .long 2609792408 - .long 1057402845 - .long 2316098656 - .long 3200270393 - .long 2785606124 - .long 3198332594 - .long 1489685130 - .long 1046034133 - .long 973177683 - .long 1043605688 - .long 113866720 - .long 3186126026 - .long 1355313597 - .long 3183357512 - .long 899972440 - .long 1076130263 - .type _P4,@object - .size _P4,120 - .align 4 -_P5: - .long 1219042543 - .long 1017436670 - .long 659497129 - .long 1070330666 - .long 2213395954 - .long 3212885037 - .long 920472610 - .long 3215092907 - .long 483400048 - .long 1062596670 - .long 3012498212 - .long 1063037606 - .long 1375970636 - .long 3205547500 - .long 3836089736 - .long 3204771982 - .long 199192965 - .long 1052233910 - .long 194857414 - .long 1050781561 - .long 2407988550 - .long 3193126966 - .long 3806101946 - .long 3190982557 - .long 3164279536 - .long 1038193510 - .long 3298944842 - .long 1076541665 - .type _P5,@object - .size _P5,112 - .align 4 -_P6: - .long 4139807906 - .long 1017960487 - .long 1501500641 - .long 3217630659 - .long 2447579003 - .long 1064854100 - .long 511348540 - .long 1067492433 - .long 1810619958 - .long 3209696179 - .long 1806624601 - .long 3210355872 - .long 4035698547 - .long 1057552651 - .long 467530437 - .long 1057185016 - .long 2985801821 - .long 3199346510 - .long 2460583618 - .long 3198194818 - .long 4117830692 - .long 1045310355 - .long 1133672721 - .long 1043441078 - .long 2717688296 - .long 3185336108 - .long 1946169876 - .long 1076920380 - .type _P6,@object - .size _P6,112 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_QP: - .long 4294921804 - .long 3212836863 - .long 4153409851 - .long 1056096255 - .long 2226361937 - .long 3196916170 - .long 3849695089 - .long 1044094312 - .long 663042994 - .long 3187124278 - .long 3336948587 - .long 1035486718 - .type _QP,@object - .size _QP,48 - .align 4 -_PP: - .long 4294966288 - .long 1072693247 - .long 4269912424 - .long 3207725055 - .long 1780799603 - .long 1052554744 - .long 2285933488 - .long 3194113879 - .long 3892950982 - .long 1041746526 - .long 150212775 - .long 3184818833 - .type _PP,@object - .size _PP,48 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0l.S deleted file mode 100644 index 1443a25af1..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y0l.S +++ /dev/null @@ -1,86 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y0l.c" - .text -..TXTST0: -# -- Begin y0l - .text - .align 16,0x90 - .globl y0l -y0l: -# parameter 1: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_y0l.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 48 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B1.6: - addq $16, %rsp - .cfi_def_cfa_offset 32 - movaps (%rsp), %xmm0 -..___tag_value_y0l.6: - call __y0q@PLT -..___tag_value_y0l.7: -..B1.2: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type y0l,@function - .size y0l,.-y0l - .data -# -- End y0l - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1.S deleted file mode 100644 index c7fdf10f2f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1.S +++ /dev/null @@ -1,3354 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y1.c" - .text -..TXTST0: -# -- Begin y1 - .text - .align 16,0x90 - .globl y1 -y1: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_y1.1: -..L2: - - pushq %r15 - .cfi_def_cfa_offset 16 - .cfi_offset 15, -16 - subq $16, %rsp - .cfi_def_cfa_offset 32 - xorb %r15b, %r15b - movsd %xmm0, (%rsp) -..B1.2: - fnstcw 10(%rsp) -..B1.3: - movl 4(%rsp), %eax - movl %eax, %ecx - andl $2147483647, %ecx - cmpl $2146435072, %ecx - jge ..B1.13 -..B1.4: - cmpq $0, (%rsp) - jle ..B1.19 -..B1.5: - movzwl 10(%rsp), %edx - movl %edx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.9 -..B1.6: - orl $-64768, %edx - movw %dx, 8(%rsp) -..B1.7: - fldcw 8(%rsp) -..B1.8: - movb $1, %r15b -..B1.9: - addq $-16, %rsp - .cfi_def_cfa_offset 48 - fldl 16(%rsp) - fstpt (%rsp) -..___tag_value_y1.7: - call __y1l@PLT -..___tag_value_y1.8: -..B1.25: - addq $16, %rsp - .cfi_def_cfa_offset 32 -..B1.10: - fstpl (%rsp) - testb %r15b, %r15b - movsd (%rsp), %xmm0 - je ..B1.12 -..B1.11: - fldcw 10(%rsp) -..B1.12: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 15, -16 -..B1.13: - andl $-2146435073, %ecx - orl (%rsp), %ecx - jne ..B1.18 -..B1.14: - testl $-2147483648, %eax - je ..B1.16 -..B1.15: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 15, -16 -..B1.16: - lea _zeros(%rip), %rdx - shrl $31, %eax - movsd (%rdx,%rax,8), %xmm0 -..B1.17: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 15, -16 -..B1.18: - movsd (%rsp), %xmm0 - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 15, -16 -..B1.19: - lea _zeros(%rip), %rax - movl (%rsp), %edx - orl %edx, %ecx - movsd (%rax), %xmm1 - je ..B1.21 -..B1.20: - lea _infs(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm1, %xmm0 - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 32 - .cfi_offset 15, -16 -..B1.21: - lea 8+_ones(%rip), %rax - movsd (%rax), %xmm0 - divsd %xmm1, %xmm0 -..B1.22: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type y1,@function - .size y1,.-y1 - .data -# -- End y1 - .text -# -- Begin __y1l - .text - .align 16,0x90 - .globl __y1l -__y1l: -# parameter 1: 96 + %rsp -..B2.1: - .cfi_startproc -..___tag_value___y1l.39: -..L40: - - subq $88, %rsp - .cfi_def_cfa_offset 96 - lea 176+_S(%rip), %rax - fldt 96(%rsp) - fldt (%rax) - fcomip %st(1), %st - jb ..B2.14 -..B2.2: - lea _val_1_77L(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - ja ..B2.12 -..B2.3: - lea _S(%rip), %rcx - fldt (%rcx) - fcomip %st(1), %st - jbe ..B2.5 -..B2.4: - lea _Z(%rip), %rax - lea _P1(%rip), %rdx - lea 16+_P1(%rip), %rcx - lea _Q1(%rip), %rsi - lea 32+_P1(%rip), %rdi - lea 48+_P1(%rip), %r8 - lea 16+_Q1(%rip), %r9 - fldt (%rax) - lea 64+_P1(%rip), %r10 - lea 80+_P1(%rip), %r11 - lea 32+_Q1(%rip), %rax - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea 96+_P1(%rip), %rdx - fmul %st(1), %st - fldt (%rcx) - lea 112+_P1(%rip), %rcx - fmul %st(2), %st - fldt (%rsi) - lea 48+_Q1(%rip), %rsi - fmul %st(4), %st - fldt (%rdi) - lea 128+_P1(%rip), %rdi - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%r8) - lea 144+_P1(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r9) - lea 64+_Q1(%rip), %r9 - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt (%r10) - lea 160+_P1(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r11) - lea 176+_P1(%rip), %r11 - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%rax) - lea 80+_Q1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%rdx) - lea _ones(%rip), %rdx - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%rcx) - lea 192+_P1(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rsi) - lea 208+_P1(%rip), %rsi - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt (%rdi) - lea 224+_P1(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r8) - lea 240+_P1(%rip), %r8 - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r10) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - faddp %st, %st(3) - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fdivrl (%rdx) - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B2.19 -..B2.5: - lea 16+_S(%rip), %rax - fldt (%rax) - fcomip %st(1), %st - jbe ..B2.7 -..B2.6: - lea 16+_Z(%rip), %rax - lea _P2(%rip), %rdx - lea 16+_P2(%rip), %rcx - lea _Q2(%rip), %rsi - lea 32+_P2(%rip), %rdi - lea 48+_P2(%rip), %r8 - lea 16+_Q2(%rip), %r9 - fldt (%rax) - lea 64+_P2(%rip), %r10 - lea 80+_P2(%rip), %r11 - lea 32+_Q2(%rip), %rax - fsubrp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt (%rdx) - lea 96+_P2(%rip), %rdx - fmul %st(1), %st - fldt (%rcx) - lea 112+_P2(%rip), %rcx - fmul %st(2), %st - fldt (%rsi) - lea 48+_Q2(%rip), %rsi - fmul %st(4), %st - fldt (%rdi) - lea 128+_P2(%rip), %rdi - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%r8) - lea 144+_P2(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r9) - lea 64+_Q2(%rip), %r9 - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt (%r10) - lea 160+_P2(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r11) - lea 176+_P2(%rip), %r11 - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%rax) - lea 80+_Q2(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%rdx) - lea _ones(%rip), %rdx - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%rcx) - lea 192+_P2(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rsi) - lea 208+_P2(%rip), %rsi - faddp %st, %st(3) - fxch %st(2) - fmul %st(4), %st - fldt (%rdi) - lea 224+_P2(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r8) - lea 240+_P2(%rip), %r8 - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r10) - faddp %st, %st(3) - fxch %st(2) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - faddp %st, %st(3) - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fxch %st(2) - fdivrl (%rdx) - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(3) - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - faddp %st, %st(2) - fmulp %st, %st(1) - jmp ..B2.19 -..B2.7: - movl $2, %edx - movl $32, %eax -..B2.8: - fldt (%rax,%rcx) - fcomip %st(1), %st - ja ..B2.11 - jp ..B2.11 -..B2.9: - incq %rdx - addq $16, %rax - cmpq $11, %rdx - jl ..B2.8 -..B2.10: - movq %rdx, %rax - shlq $4, %rax -..B2.11: - lea _Z(%rip), %rcx - fldt (%rax,%rcx) - lea (%rdx,%rdx,4), %rax - shlq $6, %rax - fsubrp %st, %st(1) - fld %st(0) - lea _P(%rip), %rdx - fmul %st(1), %st - fstpt 64(%rsp) - fldt 64(%rsp) - fldt -640(%rax,%rdx) - fmul %st(1), %st - fldt -624(%rax,%rdx) - fmul %st(2), %st - fldt -608(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -592(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -576(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -560(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -544(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -528(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -512(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -496(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -480(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -464(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -448(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -432(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -416(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -400(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -384(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt -368(%rax,%rdx) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt -352(%rax,%rdx) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt -336(%rax,%rdx) - faddp %st, %st(1) - faddp %st, %st(1) - jmp ..B2.19 -..B2.12: - fld %st(0) - lea _P0(%rip), %rax - fmul %st(1), %st - lea 16+_P0(%rip), %rdx - fxch %st(1) - fld %st(1) - lea 32+_P0(%rip), %rcx - fmul %st(2), %st - lea 48+_P0(%rip), %rsi - lea 64+_P0(%rip), %rdi - lea 80+_P0(%rip), %r8 - lea 96+_P0(%rip), %r9 - lea 112+_P0(%rip), %r10 - lea 128+_P0(%rip), %r11 - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(2) - fstpt 64(%rsp) - fldt 64(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fldt (%rax) - lea 144+_P0(%rip), %rax - fmul %st(3), %st - fldt (%rdx) - fmul %st(4), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(4), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(4) - fldt (%r11) - faddp %st, %st(1) - fmulp %st, %st(2) - fldt (%rax) - faddp %st, %st(3) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%rsp) -..___tag_value___y1l.43: - call __j1l@PLT -..___tag_value___y1l.44: -..B2.23: - fldt 112(%rsp) - fldt 16(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 96 -..B2.13: - fxch %st(1) - fstl 40(%rsp) - fstp %st(0) - movsd 40(%rsp), %xmm0 - fxch %st(1) - fstpt 16(%rsp) - fstpt (%rsp) - call log@PLT -..B2.24: - fldt 96(%rsp) - lea _val_N1_0L(%rip), %rdx - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt 16(%rsp) - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) - fmulp %st, %st(1) - fldt (%rax) - fldt (%rdx) - fdivp %st, %st(4) - fxch %st(3) - faddp %st, %st(1) - fmulp %st, %st(2) - faddp %st, %st(1) - jmp ..B2.19 -..B2.14: - lea _ones(%rip), %rax - lea _val_36_0L(%rip), %rdx - lea _PP(%rip), %rcx - lea _QP(%rip), %rsi - lea 16+_PP(%rip), %rdi - lea 16+_QP(%rip), %r8 - lea 32+_PP(%rip), %r9 - lea 32+_QP(%rip), %r10 - fldl (%rax) - lea 48+_PP(%rip), %r11 - fdiv %st(1), %st - lea 48+_QP(%rip), %rax - fxch %st(1) - fxch %st(1) - fstpt (%rsp) - fldt (%rsp) - fldt (%rdx) - lea 64+_PP(%rip), %rdx - fmulp %st, %st(1) - fld %st(0) - fmul %st(1), %st - fstpt 48(%rsp) - fldt 48(%rsp) - fxch %st(1) - fstpt 64(%rsp) - fldt 64(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - fxch %st(2) - fstpt (%rsp) - fldt (%rcx) - lea 64+_QP(%rip), %rcx - fmul %st(1), %st - fldt (%rsi) - lea 80+_PP(%rip), %rsi - fmul %st(2), %st - fldt (%rdi) - lea 80+_QP(%rip), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - lea 96+_PP(%rip), %r8 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - lea 96+_QP(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - lea 112+_PP(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - lea 112+_QP(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_PP(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - lea 128+_QP(%rip), %rdx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rcx) - lea 144+_PP(%rip), %rcx - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rsi) - lea 144+_QP(%rip), %rsi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdi) - lea 80(%rsp), %rdi - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rdx) - movl $-3, %edx - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rcx) - faddp %st, %st(1) - fstpt -48(%rdi) - fldt (%rsi) - lea 64(%rsp), %rsi - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -16(%rsi) -..___tag_value___y1l.47: - call __libm_sincos_pi4l@PLT -..___tag_value___y1l.48: -..B2.25: - fldt 112(%rsp) - fldt 48(%rsp) - fldt 32(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 96 -..B2.15: - fldt 64(%rsp) - lea _val_0_03L(%rip), %rax - fmulp %st, %st(1) - fldt 48(%rsp) - fmulp %st, %st(2) - fadd %st, %st(1) - fld %st(1) - fabs - fxch %st(1) - fabs - fldt (%rax) - fmulp %st, %st(1) - fcomip %st(1), %st - fstp %st(0) - jae ..B2.17 - jp ..B2.17 -..B2.16: - fstp %st(1) - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt (%rax) - fmulp %st, %st(1) - fsqrt - fmulp %st, %st(1) - jmp ..B2.19 -..B2.17: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 112 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B2.27: - addq $16, %rsp - .cfi_def_cfa_offset 96 - movaps (%rsp), %xmm0 -..___tag_value___y1l.52: - call __y1q@PLT -..___tag_value___y1l.53: -..B2.18: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B2.28: - fstpl 40(%rsp) - movsd 40(%rsp), %xmm0 - movsd %xmm0, 32(%rsp) - fldl 32(%rsp) -..B2.19: - addq $88, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type __y1l,@function - .size __y1l,.-__y1l - .data -# -- End __y1l - .section .rodata, "a" - .align 4 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_S: - .word 56848 - .word 49844 - .word 39532 - .word 64842 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 5940 - .word 14600 - .word 60967 - .word 58048 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 48233 - .word 9194 - .word 47533 - .word 41870 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 19716 - .word 3898 - .word 3621 - .word 54727 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 41547 - .word 400 - .word 58272 - .word 33793 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 46312 - .word 65374 - .word 26362 - .word 40225 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 15253 - .word 48480 - .word 38891 - .word 46657 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 12158 - .word 16394 - .word 14239 - .word 53090 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 31253 - .word 2914 - .word 8779 - .word 59523 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 29606 - .word 9567 - .word 8455 - .word 32978 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 51148 - .word 41491 - .word 50276 - .word 36194 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 1224 - .word 58769 - .word 30330 - .word 39411 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _S,@object - .size _S,192 - .align 2 -_val_1_77L: - .word 36700 - .word 62914 - .word 23592 - .word 57999 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _val_1_77L,@object - .size _val_1_77L,16 - .align 2 -_Z: - .word 5921 - .word 65426 - .word 63142 - .word 35997 - .word 16384 - .word 0 - .word 0 - .word 0 - .word 29632 - .word 15745 - .word 62068 - .word 44479 - .word 16385 - .word 0 - .word 0 - .word 0 - .word 41288 - .word 2893 - .word 15731 - .word 35209 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 12322 - .word 41360 - .word 35270 - .word 48124 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 21828 - .word 62500 - .word 60486 - .word 61019 - .word 16386 - .word 0 - .word 0 - .word 0 - .word 54460 - .word 63729 - .word 58186 - .word 36952 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 27250 - .word 3142 - .word 10825 - .word 43393 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 20649 - .word 49414 - .word 53633 - .word 49831 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 59160 - .word 26587 - .word 26484 - .word 56269 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 57283 - .word 10561 - .word 16432 - .word 62706 - .word 16387 - .word 0 - .word 0 - .word 0 - .word 44243 - .word 51162 - .word 18495 - .word 34571 - .word 16388 - .word 0 - .word 0 - .word 0 - .word 63781 - .word 54231 - .word 15770 - .word 37789 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _Z,@object - .size _Z,192 - .align 2 -_P1: - .word 21770 - .word 62666 - .word 46899 - .word 35378 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 28454 - .word 23396 - .word 41885 - .word 48017 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 61344 - .word 9332 - .word 29378 - .word 47284 - .word 49120 - .word 0 - .word 0 - .word 0 - .word 60127 - .word 25512 - .word 35054 - .word 43181 - .word 16353 - .word 0 - .word 0 - .word 0 - .word 25808 - .word 25324 - .word 9989 - .word 53047 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 46582 - .word 21062 - .word 5476 - .word 44690 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 61332 - .word 1419 - .word 18476 - .word 34785 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 51513 - .word 63307 - .word 40855 - .word 38307 - .word 49134 - .word 0 - .word 0 - .word 0 - .word 22560 - .word 55588 - .word 5655 - .word 48627 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 56966 - .word 1018 - .word 54245 - .word 62436 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 17453 - .word 15035 - .word 65421 - .word 57312 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 53367 - .word 52143 - .word 3664 - .word 58921 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 16321 - .word 41163 - .word 52734 - .word 35978 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 15288 - .word 52738 - .word 13594 - .word 53174 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 42685 - .word 25071 - .word 48779 - .word 62301 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 7354 - .word 8216 - .word 60720 - .word 54923 - .word 49085 - .word 0 - .word 0 - .word 0 - .type _P1,@object - .size _P1,256 - .align 2 -_Q1: - .word 64227 - .word 6706 - .word 76 - .word 58690 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 8371 - .word 16695 - .word 56692 - .word 45251 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 9179 - .word 20845 - .word 29706 - .word 43997 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 44943 - .word 15045 - .word 18794 - .word 45614 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 10671 - .word 41768 - .word 56247 - .word 64663 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 25530 - .word 4231 - .word 4140 - .word 59815 - .word 16381 - .word 0 - .word 0 - .word 0 - .type _Q1,@object - .size _Q1,96 - .align 2 -_P2: - .word 42420 - .word 39002 - .word 59647 - .word 60050 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 9209 - .word 30875 - .word 32003 - .word 38109 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 63337 - .word 29381 - .word 46828 - .word 35859 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 25340 - .word 63034 - .word 61574 - .word 39960 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 21587 - .word 1531 - .word 17186 - .word 56230 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 35654 - .word 56865 - .word 61897 - .word 49746 - .word 49126 - .word 0 - .word 0 - .word 0 - .word 6701 - .word 41291 - .word 18798 - .word 55141 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 35596 - .word 2936 - .word 34861 - .word 35797 - .word 16365 - .word 0 - .word 0 - .word 0 - .word 59382 - .word 44988 - .word 46794 - .word 33373 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 39208 - .word 51898 - .word 38063 - .word 56363 - .word 49138 - .word 0 - .word 0 - .word 0 - .word 34426 - .word 35681 - .word 546 - .word 45071 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 27055 - .word 35919 - .word 19182 - .word 39238 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 11379 - .word 16934 - .word 10723 - .word 57120 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 30778 - .word 48366 - .word 51582 - .word 60462 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 38504 - .word 65531 - .word 34807 - .word 43722 - .word 49149 - .word 0 - .word 0 - .word 0 - .word 52867 - .word 16075 - .word 29885 - .word 33161 - .word 49086 - .word 0 - .word 0 - .word 0 - .type _P2,@object - .size _P2,256 - .align 2 -_Q2: - .word 24596 - .word 8363 - .word 28671 - .word 51312 - .word 16360 - .word 0 - .word 0 - .word 0 - .word 22889 - .word 23763 - .word 37225 - .word 46345 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 24119 - .word 47441 - .word 54379 - .word 48688 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 1240 - .word 59184 - .word 48701 - .word 46748 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 22888 - .word 65215 - .word 58633 - .word 45869 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 31023 - .word 50278 - .word 49158 - .word 64237 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _Q2,@object - .size _Q2,96 - .align 2 -_P: - .word 61722 - .word 43505 - .word 23994 - .word 37346 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 30291 - .word 24028 - .word 22863 - .word 34750 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 1126 - .word 901 - .word 35659 - .word 64778 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 24961 - .word 30514 - .word 59096 - .word 39096 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 35564 - .word 61687 - .word 10716 - .word 35707 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 46848 - .word 13986 - .word 10777 - .word 37699 - .word 49111 - .word 0 - .word 0 - .word 0 - .word 25983 - .word 4211 - .word 22533 - .word 63008 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 41622 - .word 55080 - .word 16927 - .word 53017 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 59504 - .word 42891 - .word 54413 - .word 41203 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 12571 - .word 13616 - .word 30559 - .word 53698 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 24504 - .word 22188 - .word 22875 - .word 38390 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 45455 - .word 51567 - .word 14687 - .word 35767 - .word 16364 - .word 0 - .word 0 - .word 0 - .word 2489 - .word 10124 - .word 54664 - .word 47037 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 18722 - .word 39166 - .word 48910 - .word 55942 - .word 49137 - .word 0 - .word 0 - .word 0 - .word 52167 - .word 5 - .word 15467 - .word 33747 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 64650 - .word 13451 - .word 38167 - .word 40566 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 40279 - .word 20454 - .word 61426 - .word 45514 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 34995 - .word 30989 - .word 51614 - .word 33113 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 57629 - .word 30042 - .word 51710 - .word 35580 - .word 16381 - .word 0 - .word 0 - .word 0 - .word 22801 - .word 35092 - .word 8589 - .word 55177 - .word 16319 - .word 0 - .word 0 - .word 0 - .word 18213 - .word 9889 - .word 16490 - .word 42684 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 35117 - .word 3709 - .word 30056 - .word 56315 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 23979 - .word 26668 - .word 51699 - .word 63315 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 37328 - .word 63574 - .word 8303 - .word 34466 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 46391 - .word 17329 - .word 18036 - .word 35570 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 30054 - .word 21312 - .word 25061 - .word 63482 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 2570 - .word 34880 - .word 30954 - .word 61846 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 48934 - .word 61799 - .word 17650 - .word 43599 - .word 49118 - .word 0 - .word 0 - .word 0 - .word 9996 - .word 54252 - .word 12364 - .word 40067 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 26028 - .word 41231 - .word 49512 - .word 42301 - .word 16357 - .word 0 - .word 0 - .word 0 - .word 36582 - .word 15370 - .word 8472 - .word 36675 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 63654 - .word 5080 - .word 49106 - .word 53579 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 31057 - .word 54537 - .word 2640 - .word 43916 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 21142 - .word 46896 - .word 24614 - .word 39087 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 3964 - .word 40668 - .word 52365 - .word 60967 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 39332 - .word 9457 - .word 22878 - .word 52919 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 54210 - .word 18213 - .word 48816 - .word 39742 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 59971 - .word 56061 - .word 65402 - .word 41492 - .word 16376 - .word 0 - .word 0 - .word 0 - .word 50867 - .word 29775 - .word 29962 - .word 60938 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 39008 - .word 10804 - .word 60432 - .word 53771 - .word 49083 - .word 0 - .word 0 - .word 0 - .word 8797 - .word 29964 - .word 61128 - .word 42619 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 49667 - .word 64253 - .word 56687 - .word 49119 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 12708 - .word 20574 - .word 59517 - .word 62457 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 61123 - .word 30114 - .word 53775 - .word 59072 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 12480 - .word 24376 - .word 40478 - .word 34829 - .word 49108 - .word 0 - .word 0 - .word 0 - .word 31610 - .word 2541 - .word 29797 - .word 53230 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 57351 - .word 51530 - .word 20151 - .word 60005 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 27929 - .word 50140 - .word 46261 - .word 35597 - .word 16350 - .word 0 - .word 0 - .word 0 - .word 13266 - .word 42539 - .word 17988 - .word 38413 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 60482 - .word 30188 - .word 54757 - .word 33461 - .word 49125 - .word 0 - .word 0 - .word 0 - .word 28412 - .word 55589 - .word 45206 - .word 34637 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 32067 - .word 62816 - .word 60815 - .word 40858 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 5401 - .word 9100 - .word 50782 - .word 40732 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 54621 - .word 58390 - .word 59249 - .word 57428 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 35825 - .word 1375 - .word 322 - .word 55483 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 16432 - .word 16110 - .word 8852 - .word 37720 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 5000 - .word 34131 - .word 51425 - .word 35608 - .word 49146 - .word 0 - .word 0 - .word 0 - .word 53929 - .word 6276 - .word 23388 - .word 58152 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 51579 - .word 17004 - .word 5616 - .word 54145 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 7103 - .word 16103 - .word 63732 - .word 61608 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 53540 - .word 14563 - .word 28490 - .word 42103 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 50538 - .word 7801 - .word 54621 - .word 42667 - .word 16326 - .word 0 - .word 0 - .word 0 - .word 21289 - .word 53272 - .word 50234 - .word 61084 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 53615 - .word 53374 - .word 57363 - .word 50528 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 54514 - .word 9539 - .word 36475 - .word 33817 - .word 16340 - .word 0 - .word 0 - .word 0 - .word 31658 - .word 4746 - .word 1163 - .word 44700 - .word 16342 - .word 0 - .word 0 - .word 0 - .word 52867 - .word 45166 - .word 52684 - .word 57761 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 48341 - .word 5188 - .word 19803 - .word 58551 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 18455 - .word 50865 - .word 10646 - .word 36603 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 16819 - .word 38651 - .word 15489 - .word 53797 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 57587 - .word 29612 - .word 6330 - .word 65256 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 60926 - .word 53369 - .word 5356 - .word 64182 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 26295 - .word 42515 - .word 37715 - .word 37910 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 26848 - .word 34589 - .word 11687 - .word 44170 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 52547 - .word 41404 - .word 29188 - .word 51071 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 59720 - .word 37814 - .word 50864 - .word 57112 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 63754 - .word 1059 - .word 28610 - .word 65011 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 48135 - .word 53252 - .word 54091 - .word 43638 - .word 16375 - .word 0 - .word 0 - .word 0 - .word 14971 - .word 8471 - .word 3609 - .word 49212 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 4052 - .word 57147 - .word 31484 - .word 54446 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 11824 - .word 2112 - .word 5588 - .word 41288 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 30937 - .word 56824 - .word 10791 - .word 37103 - .word 49094 - .word 0 - .word 0 - .word 0 - .word 13479 - .word 25038 - .word 44704 - .word 59408 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 6837 - .word 41457 - .word 42451 - .word 43375 - .word 16334 - .word 0 - .word 0 - .word 0 - .word 53800 - .word 46435 - .word 51001 - .word 65352 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 15811 - .word 55852 - .word 5902 - .word 37814 - .word 49110 - .word 0 - .word 0 - .word 0 - .word 19663 - .word 64639 - .word 1883 - .word 55408 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 5332 - .word 44968 - .word 15414 - .word 48765 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 24635 - .word 46043 - .word 59114 - .word 34832 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 15088 - .word 55241 - .word 15044 - .word 44102 - .word 49124 - .word 0 - .word 0 - .word 0 - .word 6405 - .word 38383 - .word 37570 - .word 61587 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 22931 - .word 45450 - .word 10147 - .word 51835 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 64299 - .word 50831 - .word 27180 - .word 35495 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 23200 - .word 7806 - .word 1364 - .word 35222 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 45807 - .word 4679 - .word 55327 - .word 47491 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 30764 - .word 65323 - .word 55387 - .word 45120 - .word 16372 - .word 0 - .word 0 - .word 0 - .word 15039 - .word 21256 - .word 11217 - .word 60156 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 57173 - .word 14361 - .word 2624 - .word 34299 - .word 49143 - .word 0 - .word 0 - .word 0 - .word 56410 - .word 62508 - .word 42699 - .word 45420 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 50446 - .word 42024 - .word 63781 - .word 38435 - .word 49087 - .word 0 - .word 0 - .word 0 - .word 10333 - .word 60348 - .word 17128 - .word 40300 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 43838 - .word 25371 - .word 62467 - .word 64794 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 26845 - .word 6377 - .word 43437 - .word 57595 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 7442 - .word 5283 - .word 26036 - .word 37481 - .word 49102 - .word 0 - .word 0 - .word 0 - .word 15454 - .word 29184 - .word 54291 - .word 63010 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 5297 - .word 38874 - .word 4456 - .word 64615 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 12966 - .word 61910 - .word 53167 - .word 53110 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 20395 - .word 4102 - .word 12283 - .word 41188 - .word 49117 - .word 0 - .word 0 - .word 0 - .word 19094 - .word 29300 - .word 12828 - .word 33187 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 28120 - .word 22694 - .word 2680 - .word 36839 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 25698 - .word 43431 - .word 60429 - .word 58329 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 59006 - .word 57475 - .word 62067 - .word 42866 - .word 49130 - .word 0 - .word 0 - .word 0 - .word 60088 - .word 17714 - .word 44332 - .word 33435 - .word 16368 - .word 0 - .word 0 - .word 0 - .word 3844 - .word 12917 - .word 11965 - .word 57777 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 17310 - .word 43236 - .word 29566 - .word 44535 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 38891 - .word 11594 - .word 35001 - .word 36788 - .word 49140 - .word 0 - .word 0 - .word 0 - .word 62784 - .word 19866 - .word 27725 - .word 56232 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 26552 - .word 62874 - .word 50518 - .word 55747 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 41449 - .word 54733 - .word 7288 - .word 42389 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 25436 - .word 16965 - .word 21076 - .word 40960 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 39083 - .word 3258 - .word 61438 - .word 39229 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 62602 - .word 12963 - .word 51303 - .word 56904 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 41532 - .word 46799 - .word 27449 - .word 55757 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 25508 - .word 35836 - .word 14539 - .word 65290 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 34796 - .word 56106 - .word 58112 - .word 60724 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 52331 - .word 50671 - .word 56071 - .word 55789 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 50430 - .word 49256 - .word 15625 - .word 50948 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 15753 - .word 56169 - .word 3376 - .word 35261 - .word 16349 - .word 0 - .word 0 - .word 0 - .word 47489 - .word 43658 - .word 29070 - .word 63380 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 14447 - .word 45157 - .word 5 - .word 62576 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 14392 - .word 17120 - .word 59854 - .word 55457 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 2389 - .word 54610 - .word 7938 - .word 36154 - .word 16362 - .word 0 - .word 0 - .word 0 - .word 24225 - .word 54966 - .word 22944 - .word 63335 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 6246 - .word 36346 - .word 2616 - .word 48455 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 61678 - .word 13662 - .word 7713 - .word 42050 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 4329 - .word 54820 - .word 31411 - .word 61458 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 48026 - .word 57812 - .word 53661 - .word 52979 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 47545 - .word 24071 - .word 10224 - .word 46463 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 51405 - .word 19517 - .word 26454 - .word 39893 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 2714 - .word 52847 - .word 64285 - .word 36922 - .word 49088 - .word 0 - .word 0 - .word 0 - .word 51895 - .word 36793 - .word 33802 - .word 38136 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 2488 - .word 31490 - .word 30800 - .word 50300 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 13623 - .word 29920 - .word 59063 - .word 53960 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 4071 - .word 44015 - .word 56417 - .word 57333 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 57861 - .word 52773 - .word 20389 - .word 58553 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 64934 - .word 37948 - .word 51829 - .word 48662 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 56954 - .word 19807 - .word 167 - .word 48948 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 28104 - .word 12997 - .word 51038 - .word 61119 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 3409 - .word 4305 - .word 3650 - .word 60679 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 43193 - .word 24597 - .word 44129 - .word 53916 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 17521 - .word 14667 - .word 10096 - .word 52923 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 55445 - .word 18677 - .word 32228 - .word 61988 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 19057 - .word 4855 - .word 59096 - .word 60271 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 13479 - .word 55645 - .word 42570 - .word 41372 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 1282 - .word 28535 - .word 31957 - .word 39927 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 572 - .word 61602 - .word 36341 - .word 52326 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 28923 - .word 3577 - .word 27552 - .word 50228 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 55167 - .word 15365 - .word 46318 - .word 39497 - .word 16374 - .word 0 - .word 0 - .word 0 - .word 19602 - .word 36437 - .word 16591 - .word 37792 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 46605 - .word 39778 - .word 56315 - .word 52295 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 30298 - .word 45364 - .word 48554 - .word 37056 - .word 49091 - .word 0 - .word 0 - .word 0 - .word 36916 - .word 47157 - .word 55353 - .word 44757 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 36754 - .word 52515 - .word 12207 - .word 52242 - .word 16331 - .word 0 - .word 0 - .word 0 - .word 22625 - .word 1809 - .word 14640 - .word 50749 - .word 16333 - .word 0 - .word 0 - .word 0 - .word 16563 - .word 52625 - .word 13365 - .word 56520 - .word 49107 - .word 0 - .word 0 - .word 0 - .word 27329 - .word 9102 - .word 21835 - .word 42848 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 25313 - .word 26147 - .word 37973 - .word 47112 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 62093 - .word 47762 - .word 2878 - .word 53553 - .word 16348 - .word 0 - .word 0 - .word 0 - .word 45304 - .word 46632 - .word 22697 - .word 58245 - .word 49122 - .word 0 - .word 0 - .word 0 - .word 52304 - .word 22429 - .word 48300 - .word 47033 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 1240 - .word 8778 - .word 3434 - .word 50676 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 64382 - .word 35832 - .word 24068 - .word 53872 - .word 16361 - .word 0 - .word 0 - .word 0 - .word 9372 - .word 49794 - .word 11542 - .word 57592 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 29118 - .word 43193 - .word 8003 - .word 35849 - .word 49135 - .word 0 - .word 0 - .word 0 - .word 3582 - .word 16932 - .word 42429 - .word 38089 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 26846 - .word 61869 - .word 11277 - .word 45246 - .word 16371 - .word 0 - .word 0 - .word 0 - .word 12490 - .word 64508 - .word 30037 - .word 47862 - .word 49145 - .word 0 - .word 0 - .word 0 - .word 36625 - .word 65383 - .word 13633 - .word 34114 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 6011 - .word 54183 - .word 37651 - .word 35991 - .word 16380 - .word 0 - .word 0 - .word 0 - .word 43024 - .word 51442 - .word 35220 - .word 35244 - .word 16321 - .word 0 - .word 0 - .word 0 - .word 2338 - .word 9974 - .word 58099 - .word 36011 - .word 16323 - .word 0 - .word 0 - .word 0 - .word 54231 - .word 56678 - .word 56840 - .word 40082 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 47406 - .word 57592 - .word 65286 - .word 50617 - .word 49099 - .word 0 - .word 0 - .word 0 - .word 15992 - .word 46142 - .word 20381 - .word 45257 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 17722 - .word 6937 - .word 55940 - .word 54630 - .word 16339 - .word 0 - .word 0 - .word 0 - .word 44953 - .word 7303 - .word 1203 - .word 38053 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 9155 - .word 41724 - .word 2745 - .word 45433 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 23208 - .word 13836 - .word 51920 - .word 47377 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 46053 - .word 58453 - .word 7516 - .word 56049 - .word 16354 - .word 0 - .word 0 - .word 0 - .word 51100 - .word 31216 - .word 1872 - .word 41469 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 24653 - .word 32384 - .word 37643 - .word 48672 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 61101 - .word 35176 - .word 37213 - .word 47362 - .word 49129 - .word 0 - .word 0 - .word 0 - .word 62301 - .word 22066 - .word 41591 - .word 55226 - .word 16367 - .word 0 - .word 0 - .word 0 - .word 37791 - .word 15476 - .word 41140 - .word 62892 - .word 16366 - .word 0 - .word 0 - .word 0 - .word 18919 - .word 33505 - .word 35758 - .word 36479 - .word 49141 - .word 0 - .word 0 - .word 0 - .word 58610 - .word 16753 - .word 52674 - .word 39626 - .word 49139 - .word 0 - .word 0 - .word 0 - .word 19653 - .word 21667 - .word 11428 - .word 45800 - .word 16377 - .word 0 - .word 0 - .word 0 - .word 51212 - .word 10491 - .word 15737 - .word 59703 - .word 16373 - .word 0 - .word 0 - .word 0 - .word 54759 - .word 31668 - .word 63308 - .word 34425 - .word 49148 - .word 0 - .word 0 - .word 0 - .word 62523 - .word 11996 - .word 50486 - .word 33912 - .word 49089 - .word 0 - .word 0 - .word 0 - .type _P,@object - .size _P,3200 - .align 2 -_P0: - .word 10891 - .word 2847 - .word 4043 - .word 50135 - .word 16324 - .word 0 - .word 0 - .word 0 - .word 8878 - .word 10523 - .word 36094 - .word 35357 - .word 49101 - .word 0 - .word 0 - .word 0 - .word 12191 - .word 2098 - .word 38631 - .word 38182 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 58416 - .word 39431 - .word 6152 - .word 63591 - .word 49116 - .word 0 - .word 0 - .word 0 - .word 18600 - .word 1852 - .word 53867 - .word 39282 - .word 16356 - .word 0 - .word 0 - .word 0 - .word 37377 - .word 45824 - .word 1379 - .word 34108 - .word 49131 - .word 0 - .word 0 - .word 0 - .word 58815 - .word 28468 - .word 57342 - .word 38462 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 35703 - .word 42482 - .word 52164 - .word 49581 - .word 49142 - .word 0 - .word 0 - .word 0 - .word 14326 - .word 44453 - .word 47843 - .word 56988 - .word 16378 - .word 0 - .word 0 - .word 0 - .word 21045 - .word 58852 - .word 12449 - .word 51395 - .word 49148 - .word 0 - .word 0 - .word 0 - .type _P0,@object - .size _P0,160 - .align 2 -_val_N1_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .type _val_N1_0L,@object - .size _val_N1_0L,16 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _tonpi,@object - .size _tonpi,16 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,16 - .align 2 -_PP: - .word 52008 - .word 23245 - .word 2457 - .word 38658 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 61876 - .word 57278 - .word 25234 - .word 61346 - .word 49090 - .word 0 - .word 0 - .word 0 - .word 33834 - .word 23040 - .word 39409 - .word 49003 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 54525 - .word 6554 - .word 40935 - .word 51421 - .word 49100 - .word 0 - .word 0 - .word 0 - .word 9848 - .word 9769 - .word 18248 - .word 38344 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 45790 - .word 60252 - .word 47538 - .word 43957 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 27022 - .word 41654 - .word 23333 - .word 43744 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 12816 - .word 40723 - .word 46387 - .word 47196 - .word 49127 - .word 0 - .word 0 - .word 0 - .word 4849 - .word 19418 - .word 12136 - .word 48545 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _PP,@object - .size _PP,160 - .align 2 -_QP: - .word 65402 - .word 6822 - .word 45128 - .word 37300 - .word 49084 - .word 0 - .word 0 - .word 0 - .word 41532 - .word 52948 - .word 50360 - .word 54021 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 21320 - .word 30785 - .word 26870 - .word 37955 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 55382 - .word 38611 - .word 29746 - .word 34115 - .word 16330 - .word 0 - .word 0 - .word 0 - .word 37194 - .word 6554 - .word 16235 - .word 42314 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 17886 - .word 15840 - .word 33918 - .word 38666 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 62905 - .word 55876 - .word 18072 - .word 57284 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 28423 - .word 64693 - .word 26579 - .word 40379 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 40135 - .word 58793 - .word 24002 - .word 37757 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _QP,@object - .size _QP,160 - .align 2 -_val_0_03L: - .word 49807 - .word 10485 - .word 36700 - .word 62914 - .word 16377 - .word 0 - .word 0 - .word 0 - .type _val_0_03L,@object - .size _val_0_03L,16 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1f.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1f.S deleted file mode 100644 index f9d2339cfc..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1f.S +++ /dev/null @@ -1,921 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y1f.c" - .text -..TXTST0: -# -- Begin y1f - .text - .align 16,0x90 - .globl y1f -y1f: -# parameter 1: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_y1f.1: -..L2: - - subq $56, %rsp - .cfi_def_cfa_offset 64 - movd %xmm0, %edx - movss %xmm0, 48(%rsp) - lea -1(%rdx), %eax - cmpl $2139095039, %eax - jae ..B1.17 -..B1.2: - cmpl $1100816743, %edx - jae ..B1.25 -..B1.3: - cmpl $1099170276, %edx - jae ..B1.16 -..B1.4: - cmpl $1096140558, %edx - jae ..B1.15 -..B1.5: - cmpl $1092849338, %edx - jae ..B1.14 -..B1.6: - cmpl $1088602350, %edx - jae ..B1.13 -..B1.7: - cmpl $1081952922, %edx - jae ..B1.12 -..B1.8: - cmpl $1071812444, %edx - jb ..B1.10 -..B1.9: - cvtss2sd %xmm0, %xmm0 - lea 128+_P1(%rip), %rax - lea 120+_P1(%rip), %rdx - lea 88+_P1(%rip), %rcx - lea 56+_P1(%rip), %rsi - lea 104+_P1(%rip), %r8 - lea 24+_P1(%rip), %rdi - lea 72+_P1(%rip), %r9 - lea 40+_P1(%rip), %r10 - movsd (%rdx), %xmm6 - lea 80+_P1(%rip), %rdx - lea 8+_P1(%rip), %r11 - subsd (%rax), %xmm0 - movaps %xmm0, %xmm2 - lea 112+_P1(%rip), %rax - mulsd %xmm0, %xmm2 - movaps %xmm2, %xmm3 - mulsd %xmm2, %xmm3 - mulsd %xmm3, %xmm6 - movsd (%r8), %xmm1 - lea 64+_P1(%rip), %r8 - movsd (%rax), %xmm5 - mulsd %xmm3, %xmm1 - addsd (%rcx), %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd (%r9), %xmm1 - addsd (%rdx), %xmm5 - mulsd %xmm3, %xmm1 - addsd (%rsi), %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd (%r10), %xmm1 - lea 48+_P1(%rip), %rcx - lea 32+_P1(%rip), %r9 - mulsd %xmm3, %xmm1 - addsd (%rdi), %xmm6 - addsd (%rcx), %xmm5 - mulsd %xmm2, %xmm6 - addsd (%r11), %xmm1 - mulsd %xmm3, %xmm5 - mulsd %xmm0, %xmm6 - mulsd %xmm0, %xmm1 - lea 96+_P1(%rip), %rdi - lea 16+_P1(%rip), %rsi - lea _P1(%rip), %r10 - addsd %xmm1, %xmm6 - addsd (%rsi), %xmm5 - movsd (%rdi), %xmm4 - mulsd %xmm3, %xmm4 - mulsd %xmm2, %xmm5 - addsd (%r8), %xmm4 - mulsd %xmm3, %xmm4 - addsd (%r9), %xmm4 - mulsd %xmm3, %xmm4 - addsd (%r10), %xmm4 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.10: - pxor %xmm4, %xmm4 - cvtss2sd 48(%rsp), %xmm4 - movaps %xmm4, %xmm0 - movsd %xmm4, (%rsp) -..___tag_value_y1f.6: - call __libm_log_k32@PLT -..___tag_value_y1f.7: -..B1.29: - movsd (%rsp), %xmm4 -..B1.11: - lea _tonpi(%rip), %rax - movaps %xmm4, %xmm2 - mulsd %xmm4, %xmm2 - lea 40+_Q2(%rip), %r10 - movsd (%rax), %xmm7 - movaps %xmm2, %xmm3 - mulsd %xmm7, %xmm0 - lea 40+_Q1(%rip), %rdx - divsd %xmm4, %xmm7 - mulsd %xmm2, %xmm3 - lea 24+_Q2(%rip), %r11 - movsd (%r10), %xmm6 - lea 24+_Q1(%rip), %rcx - movsd (%rdx), %xmm8 - lea 32+_Q2(%rip), %rdx - mulsd %xmm3, %xmm6 - lea 32+_Q1(%rip), %rdi - mulsd %xmm3, %xmm8 - addsd (%r11), %xmm6 - addsd (%rcx), %xmm8 - mulsd %xmm3, %xmm6 - mulsd %xmm3, %xmm8 - movsd (%rdx), %xmm5 - lea 16+_Q2(%rip), %rcx - mulsd %xmm3, %xmm5 - lea 8+_Q2(%rip), %rax - addsd (%rax), %xmm6 - addsd (%rcx), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm3, %xmm5 - mulsd %xmm4, %xmm6 - lea 8+_Q1(%rip), %rsi - lea 16+_Q1(%rip), %r8 - movsd (%rdi), %xmm1 - lea _Q1(%rip), %r9 - mulsd %xmm3, %xmm1 - addsd (%rsi), %xmm8 - addsd (%r8), %xmm1 - mulsd %xmm2, %xmm8 - mulsd %xmm3, %xmm1 - mulsd %xmm4, %xmm8 - addsd (%r9), %xmm1 - lea _Q2(%rip), %rsi - mulsd %xmm4, %xmm1 - addsd (%rsi), %xmm5 - addsd %xmm1, %xmm8 - mulsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - mulsd %xmm6, %xmm0 - subsd %xmm7, %xmm0 - addsd %xmm0, %xmm8 - cvtsd2ss %xmm8, %xmm8 - movaps %xmm8, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.12: - pxor %xmm0, %xmm0 - lea 112+_P2(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - lea 104+_P2(%rip), %rdx - lea 72+_P2(%rip), %rcx - lea 40+_P2(%rip), %rsi - lea 88+_P2(%rip), %r8 - lea 96+_P2(%rip), %r11 - lea 56+_P2(%rip), %r9 - lea 8+_P2(%rip), %rdi - lea 24+_P2(%rip), %r10 - movsd (%rdx), %xmm6 - lea 32+_P2(%rip), %rdx - movsd (%r8), %xmm1 - lea 16+_P2(%rip), %r8 - movsd (%r11), %xmm5 - subsd (%rax), %xmm0 - lea 64+_P2(%rip), %rax - movaps %xmm0, %xmm3 - mulsd %xmm0, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rcx), %xmm6 - addsd (%r9), %xmm1 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rsi), %xmm6 - addsd (%r10), %xmm1 - addsd (%rdx), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm3, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rdi), %xmm6 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm6 - lea 80+_P2(%rip), %rsi - lea 48+_P2(%rip), %rdi - lea _P2(%rip), %rcx - addsd %xmm1, %xmm6 - addsd (%rcx), %xmm5 - movsd (%rsi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%rdi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%r8), %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.13: - pxor %xmm3, %xmm3 - lea 104+_P3(%rip), %rax - cvtss2sd 48(%rsp), %xmm3 - lea 96+_P3(%rip), %rdx - lea 64+_P3(%rip), %rcx - lea 80+_P3(%rip), %rdi - lea 88+_P3(%rip), %r11 - lea 48+_P3(%rip), %r8 - lea 32+_P3(%rip), %rsi - lea 16+_P3(%rip), %r9 - lea _P3(%rip), %r10 - movsd (%rdx), %xmm6 - lea 24+_P3(%rip), %rdx - movsd (%rdi), %xmm0 - lea 8+_P3(%rip), %rdi - movsd (%r11), %xmm5 - subsd (%rax), %xmm3 - lea 56+_P3(%rip), %rax - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd (%rcx), %xmm6 - addsd (%r8), %xmm0 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd (%rsi), %xmm6 - addsd (%r9), %xmm0 - addsd (%rdx), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm5 - addsd %xmm0, %xmm6 - mulsd %xmm3, %xmm5 - addsd (%r10), %xmm6 - lea 72+_P3(%rip), %rcx - lea 40+_P3(%rip), %rsi - movsd (%rcx), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%rsi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%rdi), %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.14: - pxor %xmm0, %xmm0 - lea 112+_P4(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - lea 104+_P4(%rip), %rdx - lea 72+_P4(%rip), %rcx - lea 40+_P4(%rip), %rsi - lea 88+_P4(%rip), %r8 - lea 96+_P4(%rip), %r11 - lea 56+_P4(%rip), %r9 - lea 8+_P4(%rip), %rdi - lea 24+_P4(%rip), %r10 - movsd (%rdx), %xmm6 - lea 32+_P4(%rip), %rdx - movsd (%r8), %xmm1 - lea 16+_P4(%rip), %r8 - movsd (%r11), %xmm5 - subsd (%rax), %xmm0 - lea 64+_P4(%rip), %rax - movaps %xmm0, %xmm3 - mulsd %xmm0, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rcx), %xmm6 - addsd (%r9), %xmm1 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rsi), %xmm6 - addsd (%r10), %xmm1 - addsd (%rdx), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm3, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rdi), %xmm6 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm6 - lea 80+_P4(%rip), %rsi - lea 48+_P4(%rip), %rdi - lea _P4(%rip), %rcx - addsd %xmm1, %xmm6 - addsd (%rcx), %xmm5 - movsd (%rsi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%rdi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%r8), %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.15: - pxor %xmm3, %xmm3 - lea 104+_P5(%rip), %rax - cvtss2sd 48(%rsp), %xmm3 - lea 96+_P5(%rip), %rdx - lea 64+_P5(%rip), %rcx - lea 80+_P5(%rip), %rdi - lea 88+_P5(%rip), %r11 - lea 48+_P5(%rip), %r8 - lea 32+_P5(%rip), %rsi - lea 16+_P5(%rip), %r9 - lea _P5(%rip), %r10 - movsd (%rdx), %xmm6 - lea 24+_P5(%rip), %rdx - movsd (%rdi), %xmm0 - lea 8+_P5(%rip), %rdi - movsd (%r11), %xmm5 - subsd (%rax), %xmm3 - lea 56+_P5(%rip), %rax - movaps %xmm3, %xmm1 - mulsd %xmm3, %xmm1 - movaps %xmm1, %xmm2 - mulsd %xmm1, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd (%rcx), %xmm6 - addsd (%r8), %xmm0 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm0 - mulsd %xmm2, %xmm5 - addsd (%rsi), %xmm6 - addsd (%r9), %xmm0 - addsd (%rdx), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm1, %xmm0 - mulsd %xmm1, %xmm5 - addsd %xmm0, %xmm6 - mulsd %xmm3, %xmm5 - addsd (%r10), %xmm6 - lea 72+_P5(%rip), %rcx - lea 40+_P5(%rip), %rsi - movsd (%rcx), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%rsi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%rdi), %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.16: - pxor %xmm0, %xmm0 - lea 112+_P6(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - lea 104+_P6(%rip), %rdx - lea 72+_P6(%rip), %rcx - lea 40+_P6(%rip), %rsi - lea 88+_P6(%rip), %r8 - lea 96+_P6(%rip), %r11 - lea 56+_P6(%rip), %r9 - lea 8+_P6(%rip), %rdi - lea 24+_P6(%rip), %r10 - movsd (%rdx), %xmm6 - lea 32+_P6(%rip), %rdx - movsd (%r8), %xmm1 - lea 16+_P6(%rip), %r8 - movsd (%r11), %xmm5 - subsd (%rax), %xmm0 - lea 64+_P6(%rip), %rax - movaps %xmm0, %xmm3 - mulsd %xmm0, %xmm3 - movaps %xmm3, %xmm2 - mulsd %xmm3, %xmm2 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rcx), %xmm6 - addsd (%r9), %xmm1 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm2, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rsi), %xmm6 - addsd (%r10), %xmm1 - addsd (%rdx), %xmm5 - mulsd %xmm2, %xmm6 - mulsd %xmm3, %xmm1 - mulsd %xmm2, %xmm5 - addsd (%rdi), %xmm6 - mulsd %xmm0, %xmm1 - mulsd %xmm0, %xmm6 - lea 80+_P6(%rip), %rsi - lea 48+_P6(%rip), %rdi - lea _P6(%rip), %rcx - addsd %xmm1, %xmm6 - addsd (%rcx), %xmm5 - movsd (%rsi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%rdi), %xmm4 - mulsd %xmm2, %xmm4 - addsd (%r8), %xmm4 - mulsd %xmm3, %xmm4 - addsd %xmm4, %xmm5 - addsd %xmm5, %xmm6 - cvtsd2ss %xmm6, %xmm6 - movaps %xmm6, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.17: - movl %edx, %eax - andl $2147483647, %eax - cmpl $2139095040, %eax - ja ..B1.24 -..B1.18: - testl %eax, %eax - je ..B1.23 -..B1.19: - testl $-2147483648, %edx - pxor %xmm0, %xmm0 - je ..B1.22 -..B1.20: - movss .L_2il0floatpacket.1(%rip), %xmm1 - mulss %xmm1, %xmm0 -..B1.22: - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.23: - movss .L_2il0floatpacket.0(%rip), %xmm0 - pxor %xmm1, %xmm1 - divss %xmm1, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.24: - movss 48(%rsp), %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 64 -..B1.25: - pxor %xmm0, %xmm0 - lea _val_16_0(%rip), %rax - cvtss2sd 48(%rsp), %xmm0 - movsd .L_2il0floatpacket.2(%rip), %xmm1 - lea (%rsp), %rdi - divsd %xmm0, %xmm1 - movsd (%rax), %xmm2 - lea 8(%rsp), %rsi - mulsd %xmm1, %xmm2 - movl $-3, %edx - movsd %xmm2, 8(%rsi) - mulsd %xmm2, %xmm2 - movsd %xmm2, 24(%rsi) - mulsd %xmm2, %xmm2 - movsd %xmm1, 16(%rsi) - movsd %xmm2, 32(%rsi) -..___tag_value_y1f.26: - call __libm_sincos_k32@PLT -..___tag_value_y1f.27: -..B1.26: - lea 40+_QP(%rip), %r10 - lea 40+_PP(%rip), %rdx - movsd 40(%rsp), %xmm2 - lea 24+_QP(%rip), %r11 - lea 24+_PP(%rip), %rcx - lea 32+_PP(%rip), %rdi - lea _tonpi(%rip), %rax - lea 16+_PP(%rip), %r8 - movsd (%r10), %xmm5 - lea 8+_PP(%rip), %rsi - movsd (%rdx), %xmm6 - lea 32+_QP(%rip), %rdx - mulsd %xmm2, %xmm5 - lea _PP(%rip), %r9 - mulsd %xmm2, %xmm6 - addsd (%r11), %xmm5 - addsd (%rcx), %xmm6 - mulsd %xmm2, %xmm5 - mulsd %xmm2, %xmm6 - movsd (%rdx), %xmm4 - lea 16+_QP(%rip), %rcx - mulsd %xmm2, %xmm4 - addsd (%rsi), %xmm6 - movsd (%rdi), %xmm1 - lea _QP(%rip), %rsi - mulsd %xmm2, %xmm1 - addsd (%rcx), %xmm4 - movsd (%rax), %xmm0 - lea 8+_QP(%rip), %rax - mulsd %xmm2, %xmm4 - addsd (%r8), %xmm1 - mulsd 24(%rsp), %xmm0 - addsd (%rax), %xmm5 - mulsd %xmm2, %xmm1 - addsd (%rsi), %xmm4 - sqrtsd %xmm0, %xmm0 - addsd (%r9), %xmm1 - movsd 32(%rsp), %xmm3 - mulsd %xmm3, %xmm5 - mulsd %xmm3, %xmm6 - addsd %xmm4, %xmm5 - addsd %xmm1, %xmm6 - mulsd 16(%rsp), %xmm5 - mulsd (%rsp), %xmm6 - mulsd 8(%rsp), %xmm5 - addsd %xmm5, %xmm6 - mulsd %xmm6, %xmm0 - cvtsd2ss %xmm0, %xmm0 - addq $56, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type y1f,@function - .size y1f,.-y1f - .data -# -- End y1f - .section .rodata, "a" - .align 8 - .align 8 -.L_2il0floatpacket.2: - .long 0x00000000,0x3ff00000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,8 - .align 4 -.L_2il0floatpacket.0: - .long 0xbf800000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x7f800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -_P1: - .long 3588334709 - .long 1014823416 - .long 1143617537 - .long 1071688264 - .long 543393268 - .long 3216922360 - .long 1079832790 - .long 3214987951 - .long 1415988155 - .long 3212027618 - .long 2493495630 - .long 1065248537 - .long 1666720954 - .long 3211084359 - .long 543676354 - .long 1062304274 - .long 4191589146 - .long 3208689738 - .long 2170605073 - .long 1060053158 - .long 3542706363 - .long 3206309752 - .long 3704389215 - .long 1057513307 - .long 2063423420 - .long 3203511534 - .long 3202091398 - .long 1054023270 - .long 2674374220 - .long 3198818668 - .long 2780141937 - .long 1047561374 - .long 3571446339 - .long 1073845182 - .type _P1,@object - .size _P1,136 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_Q2: - .long 4294700894 - .long 1071644671 - .long 4245872852 - .long 3215982591 - .long 2793978972 - .long 1063605588 - .long 1731774639 - .long 3205263755 - .long 824990963 - .long 1051113520 - .long 1573521749 - .long 3191272273 - .type _Q2,@object - .size _Q2,48 - .align 4 -_Q1: - .long 330682653 - .long 3217627238 - .long 1311559603 - .long 1068225431 - .long 1711886415 - .long 3211277751 - .long 3301707240 - .long 1058195349 - .long 1381458166 - .long 3199245881 - .long 361785213 - .long 1044511851 - .type _Q1,@object - .size _Q1,48 - .align 4 -_P2: - .long 2989758108 - .long 1017408064 - .long 1458640109 - .long 3218458565 - .long 2240523794 - .long 1067453343 - .long 773815536 - .long 1068111321 - .long 2743923681 - .long 3211856434 - .long 3232814431 - .long 3210853997 - .long 2451601872 - .long 1059272649 - .long 1805313442 - .long 1057512342 - .long 1838988672 - .long 3200779931 - .long 3139341808 - .long 3198309937 - .long 844655003 - .long 1046186753 - .long 3216852589 - .long 1043859826 - .long 2659303056 - .long 3187506951 - .long 2880143704 - .long 1034033463 - .long 1317515310 - .long 1075165182 - .type _P2,@object - .size _P2,120 - .align 4 -_P3: - .long 280256326 - .long 3163962304 - .long 1070207352 - .long 1070686105 - .long 878012560 - .long 3213896505 - .long 4238571140 - .long 3215341917 - .long 3113338666 - .long 1063505618 - .long 910161668 - .long 1063287399 - .long 1478416875 - .long 3206238429 - .long 3015160168 - .long 3204904859 - .long 3974776004 - .long 1052866426 - .long 579855125 - .long 1050851686 - .long 261378128 - .long 3193590641 - .long 798233178 - .long 3191027115 - .long 1498363474 - .long 1038832298 - .long 2925619636 - .long 1075917095 - .type _P3,@object - .size _P3,112 - .align 4 -_P4: - .long 738390343 - .long 1012897491 - .long 2706267969 - .long 3217932622 - .long 4014538048 - .long 1065632415 - .long 3590329970 - .long 1067673559 - .long 671215353 - .long 3210335979 - .long 2374781669 - .long 3210593529 - .long 1890699418 - .long 1058215403 - .long 1890155166 - .long 1057321344 - .long 1713507622 - .long 3199871308 - .long 2862637523 - .long 3198281783 - .long 1122846306 - .long 1045733660 - .long 622299794 - .long 1043564297 - .long 2771483851 - .long 3185854918 - .long 1632198108 - .long 3183235242 - .long 953430534 - .long 1076330385 - .type _P4,@object - .size _P4,120 - .align 4 -_P5: - .long 342107947 - .long 1017254688 - .long 3187585117 - .long 1070231586 - .long 1823227594 - .long 3212600587 - .long 444207028 - .long 3215024921 - .long 1802122913 - .long 1062365956 - .long 1966738039 - .long 1062934367 - .long 3649894624 - .long 3205237410 - .long 1726294277 - .long 3204703097 - .long 1880085380 - .long 1051980794 - .long 1949762981 - .long 1050731607 - .long 2695921962 - .long 3192939649 - .long 1096030507 - .long 3190939319 - .long 3356663664 - .long 1038219909 - .long 2296284299 - .long 1076743037 - .type _P5,@object - .size _P5,112 - .align 4 -_P6: - .long 1104511903 - .long 3165887820 - .long 3273918356 - .long 3217557377 - .long 1767833442 - .long 1064652506 - .long 4164235278 - .long 1067433581 - .long 3499046825 - .long 3209421592 - .long 1038038689 - .long 3210276846 - .long 3702826228 - .long 1057329476 - .long 3651609877 - .long 1057129169 - .long 1779967631 - .long 3199161987 - .long 3308825176 - .long 3198147781 - .long 897891533 - .long 1045052198 - .long 2444111938 - .long 1043454098 - .long 144575532 - .long 3185257015 - .long 1701846534 - .long 3183129264 - .long 1767841339 - .long 1077021468 - .type _P6,@object - .size _P6,120 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_QP: - .long 4294954956 - .long 1066926079 - .long 4141388976 - .long 3204071423 - .long 1500123100 - .long 1049740228 - .long 3264213437 - .long 3191856517 - .long 1489731078 - .long 1039824630 - .long 1807021260 - .long 3183130166 - .type _QP,@object - .size _QP,48 - .align 4 -_PP: - .long 551 - .long 1072693248 - .long 4267608614 - .long 1061027839 - .long 3690881252 - .long 3200414971 - .long 3933039373 - .long 1046848465 - .long 3246008603 - .long 3189439465 - .long 1689113401 - .long 1037483563 - .type _PP,@object - .size _PP,48 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1l.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1l.S deleted file mode 100644 index 1798aae609..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/y1l.S +++ /dev/null @@ -1,86 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "y1l.c" - .text -..TXTST0: -# -- Begin y1l - .text - .align 16,0x90 - .globl y1l -y1l: -# parameter 1: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_y1l.1: -..L2: - - subq $24, %rsp - .cfi_def_cfa_offset 32 - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 48 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B1.6: - addq $16, %rsp - .cfi_def_cfa_offset 32 - movaps (%rsp), %xmm0 -..___tag_value_y1l.6: - call __y1q@PLT -..___tag_value_y1l.7: -..B1.2: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B1.7: - addq $24, %rsp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type y1l,@function - .size y1l,.-y1l - .data -# -- End y1l - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/yn.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/yn.S deleted file mode 100644 index 100e3f3fb8..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/yn.S +++ /dev/null @@ -1,1623 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "yn.c" - .text -..TXTST0: -# -- Begin yn - .text - .align 16,0x90 - .globl yn -yn: -# parameter 1: %edi -# parameter 2: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_yn.1: -..L2: - - pushq %r13 - .cfi_def_cfa_offset 16 - .cfi_offset 13, -16 - pushq %r14 - .cfi_def_cfa_offset 24 - .cfi_offset 14, -24 - pushq %r15 - .cfi_def_cfa_offset 32 - .cfi_offset 15, -32 - subq $224, %rsp - .cfi_def_cfa_offset 256 - movl %edi, %r13d - movsd %xmm0, (%rsp) - xorb %r14b, %r14b -..B1.2: - fnstcw 218(%rsp) -..B1.3: - movzwl 6(%rsp), %ecx - movl $1, %r15d - andl $32752, %ecx - shrl $4, %ecx - cmpl $2047, %ecx - je ..B1.58 -..B1.4: - lea _zeros(%rip), %rax - movsd (%rsp), %xmm0 - movsd (%rax), %xmm1 - comisd %xmm0, %xmm1 - jb ..B1.8 -..B1.5: - ucomisd %xmm1, %xmm0 - jp ..B1.6 - je ..B1.37 -..B1.6: - lea _infs(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm1, %xmm0 -..B1.7: - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.8: - testl %r13d, %r13d - je ..B1.36 -..B1.9: - jge ..B1.11 -..B1.10: - negl %r13d - movl %r13d, %eax - notl %eax - andl $1, %eax - lea -1(%rax,%rax), %r15d -..B1.11: - cmpl $1, %r13d - je ..B1.50 -..B1.12: - movl %r13d, %ecx - sarl $5, %ecx - cmpl $160, %ecx - jg ..B1.14 -..B1.13: - movslq %ecx, %rcx - lea XINF(%rip), %rax - movsd (%rax,%rcx,8), %xmm1 - jmp ..B1.15 -..B1.14: - pxor %xmm1, %xmm1 - lea -640(,%rcx,4), %eax - lea (,%rax,8), %ecx - subl %eax, %ecx - cvtsi2sd %ecx, %xmm1 - addsd .L_2il0floatpacket.0(%rip), %xmm1 -..B1.15: - comisd %xmm0, %xmm1 - ja ..B1.35 -..B1.16: - movzwl 218(%rsp), %ecx - movl %ecx, %eax - andl $768, %eax - cmpl $768, %eax - je ..B1.20 -..B1.17: - orl $-64768, %ecx - movw %cx, 216(%rsp) -..B1.18: - fldcw 216(%rsp) -..B1.19: - movsd (%rsp), %xmm0 - movb $1, %r14b -..B1.20: - movsd %xmm0, (%rsp) - lea _val_20_0L(%rip), %rax - fldl (%rsp) - lea _val_1000_0L(%rip), %rcx - movl %r13d, (%rsp) - fildl (%rsp) - fldt (%rax) - fmul %st(1), %st - fldt (%rcx) - faddp %st, %st(1) - fcomip %st(2), %st - ja ..B1.39 -..B1.21: - lea _val_4_0L(%rip), %rcx - fld %st(0) - lea _val_8_0L(%rip), %rsi - movl $-1, %eax - lea _val_n1_0L(%rip), %r8 - lea _val_3_0L(%rip), %r10 - lea _val_p1_0L(%rip), %rdi - lea _val_5_0L(%rip), %r11 - lea _val_2_0L(%rip), %r9 - fxch %st(2) - fstl 112(%rsp) - fldt (%rcx) - xorb %cl, %cl - fstpt 136(%rsp) - fldt 136(%rsp) - fmulp %st, %st(3) - fxch %st(1) - fmulp %st, %st(2) - fxch %st(1) - fstpt 200(%rsp) - fldt 200(%rsp) - fldt (%rsi) - lea _val_0_0L(%rip), %rsi - fmulp %st, %st(2) - fxch %st(1) - fstpt 168(%rsp) - fldt 168(%rsp) - fldt (%rdi) - fstpt (%rsp) - fldt (%rsp) - fstpt 64(%rsp) - fldt (%r8) - faddp %st, %st(2) - fdivrp %st, %st(1) - fstpt 48(%rsp) - fldt 48(%rsp) - fldt (%r9) - fstpt 80(%rsp) - fldt 80(%rsp) - fstpt 152(%rsp) - fldt (%r10) - fstpt 32(%rsp) - fldt 32(%rsp) - fstpt 96(%rsp) - fldt (%r11) - fstpt 16(%rsp) - fldt (%rsi) - fstpt 120(%rsp) - fldt 16(%rsp) - fldt 96(%rsp) - fldt 32(%rsp) - fldt (%rsp) -..B1.22: - fldt 200(%rsp) - fld %st(3) - fmul %st(4), %st - testl %eax, %eax - fsubr %st(1), %st - fxch %st(4) - fstpt 96(%rsp) - fxch %st(1) - fstpt 16(%rsp) - fldt 16(%rsp) - fstpt 184(%rsp) - fldt 184(%rsp) - fldt 80(%rsp) - fldt 168(%rsp) - fmul %st, %st(1) - fxch %st(1) - fdivrp %st, %st(5) - fxch %st(6) - fmulp %st, %st(4) - fld %st(4) - fmul %st(5), %st - fsubrp %st, %st(2) - fxch %st(2) - fmul %st, %st(5) - fxch %st(5) - fdivrp %st, %st(1) - fmul %st(2), %st - fldt 96(%rsp) - jle ..B1.24 -..B1.23: - fldt 48(%rsp) - fadd %st(2), %st - fstpt 48(%rsp) - fxch %st(3) - faddp %st, %st(2) - jmp ..B1.25 -..B1.24: - fldt 48(%rsp) - fsub %st(2), %st - fstpt 48(%rsp) - fxch %st(3) - fsubrp %st, %st(2) -..B1.25: - fldt 152(%rsp) - fadd %st, %st(5) - fldt 80(%rsp) - faddp %st, %st(1) - fstpt 80(%rsp) - fld %st(0) - fdiv %st(2), %st - fldt 136(%rsp) - fadd %st, %st(4) - faddp %st, %st(5) - fld %st(0) - fchs - fldt 120(%rsp) - fcomip %st(2), %st - fcmovbe %st(1), %st - fstp %st(1) - fldt 64(%rsp) - fcomip %st(1), %st - jbe ..B1.27 -..B1.26: - fstpt 64(%rsp) - movb $1, %cl - jmp ..B1.28 -..B1.27: - fstp %st(0) - testb %cl, %cl - jne ..B1.38 -..B1.28: - fldt 16(%rsp) - negl %eax - fucomip %st(2), %st - fxch %st(4) - fxch %st(1) - jne ..B1.22 - jp ..B1.22 -..B1.29: - fstp %st(2) - fstp %st(0) - fstp %st(1) - fldt 184(%rsp) - fstpt 16(%rsp) - fstpt (%rsp) - fstpt 32(%rsp) - fldl 112(%rsp) -..B1.30: - addl %r13d, %r13d - addq $-16, %rsp - .cfi_def_cfa_offset 272 - negl %r13d - lea 32(%rsp), %rdi - decl %r13d - lea 48(%rsp), %rsi - movl %r13d, %edx - fstpt (%rsp) - fldt (%rsp) - fstpl 80(%rsi) -..___tag_value_yn.22: - call __libm_sincos_pi4l@PLT -..___tag_value_yn.23: -..B1.67: - fldl 128(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 256 -..B1.31: - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt 32(%rsp) - fldt 48(%rsp) - fmulp %st, %st(1) - fldt (%rax) - fdivp %st, %st(3) - fxch %st(2) - fsqrt - fldt 16(%rsp) - fmulp %st, %st(2) - fxch %st(2) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt 16(%rsp) -..B1.32: - testb %r14b, %r14b - je ..B1.34 -..B1.33: - fldcw 218(%rsp) -..B1.34: - fldt 16(%rsp) - testl %r15d, %r15d - fstpl (%rsp) - movsd (%rsp), %xmm1 - movaps %xmm1, %xmm0 - xorps .L_2il0floatpacket.1(%rip), %xmm0 - jl ..L25 - movaps %xmm1, %xmm0 -..L25: - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.35: - movb 7(%rsp), %al - lea _large_value_64(%rip), %rcx - andb $-128, %al - shrb $7, %al - movzbl %al, %edx - movsd (%rcx,%rdx,8), %xmm0 - mulsd (%rcx), %xmm0 - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.36: - call y0@PLT -..B1.68: - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.37: - lea 8+_ones(%rip), %rax - movsd (%rax), %xmm0 - divsd %xmm1, %xmm0 - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.38: - fstp %st(2) - fstp %st(3) - fstp %st(1) - fldt 184(%rsp) - fstpt 16(%rsp) - fxch %st(1) - fstpt (%rsp) - fstpt 32(%rsp) - fldl 112(%rsp) - jmp ..B1.30 -..B1.39: - fstp %st(0) - lea _val_36_0L(%rip), %rax - fldt (%rax) - fcomi %st(1), %st - jbe ..B1.43 -..B1.40: - fstp %st(0) - addq $-16, %rsp - .cfi_def_cfa_offset 272 - fstpt (%rsp) - fldt (%rsp) - fstpl 128(%rsp) -..___tag_value_yn.71: - call __y0l@PLT -..___tag_value_yn.72: -..B1.69: - fldl 128(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 256 -..B1.41: - fxch %st(1) - fstpt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 272 - fstpt (%rsp) - fldt (%rsp) - fstpl 128(%rsp) -..___tag_value_yn.75: - call __y1l@PLT -..___tag_value_yn.76: -..B1.70: - fldl 128(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 256 -..B1.42: - fxch %st(1) - jmp ..B1.45 -..B1.43: - lea _ones(%rip), %rax - lea _PP0(%rip), %rcx - lea 16+_PP0(%rip), %r9 - lea _PP1(%rip), %r8 - lea 16+_PP1(%rip), %r10 - lea 32+_PP0(%rip), %r11 - lea 48+_PP1(%rip), %rsi - lea 64+_PP0(%rip), %rdi - fldl (%rax) - lea 32+_PP1(%rip), %rax - fdiv %st(2), %st - movl $-1, %edx - fmul %st, %st(1) - fld %st(1) - fmul %st(2), %st - fstpt 96(%rsp) - fldt 96(%rsp) - fxch %st(1) - fstpt (%rsp) - fxch %st(1) - fstpt 80(%rsp) - fldt 80(%rsp) - fldt (%rcx) - lea 48+_PP0(%rip), %rcx - fmul %st(2), %st - fldt (%r8) - lea 64+_PP1(%rip), %r8 - fmul %st(3), %st - fldt (%r9) - lea 80+_PP0(%rip), %r9 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r10) - lea 80+_PP1(%rip), %r10 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r11) - lea 96+_PP0(%rip), %r11 - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 96+_PP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rcx) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rsi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rdi) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r8) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r9) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r10) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%r11) - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 112+_PP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 112+_PP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 128+_PP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 128+_PP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 144+_PP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(3), %st - fldt (%rax) - lea 144+_PP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fstpt 16(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 272 - lea 96(%rsp), %rdi - lea 112(%rsp), %rsi - fxch %st(3) - fstpt (%rsp) - fldt (%rsp) - fstpl 16(%rsi) - fldt (%rax) - lea _QP0(%rip), %rax - faddp %st, %st(3) - fxch %st(2) - fstpt -32(%rsi) - fldt (%rax) - lea _QP1(%rip), %rax - fmul %st(1), %st - fldt (%rax) - lea 16+_QP0(%rip), %rax - fmul %st(2), %st - fldt (%rax) - lea 16+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 32+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 32+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 48+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 48+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 64+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 64+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 80+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 80+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 96+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 96+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 112+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 112+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 128+_QP1(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmul %st(2), %st - fldt (%rax) - lea 144+_QP0(%rip), %rax - faddp %st, %st(2) - fxch %st(1) - fmulp %st, %st(2) - fldt (%rax) - lea 144+_QP1(%rip), %rax - faddp %st, %st(1) - fmul %st(2), %st - fstpt -64(%rsi) - fldt (%rax) - faddp %st, %st(1) - fmulp %st, %st(1) - fstpt -48(%rsi) -..___tag_value_yn.79: - call __libm_sincos_pi4l@PLT -..___tag_value_yn.80: -..B1.71: - fldl 128(%rsp) - fldt 80(%rsp) - fldt 64(%rsp) - fldt 48(%rsp) - addq $16, %rsp - .cfi_def_cfa_offset 256 -..B1.44: - fldt (%rsp) - lea _tonpi(%rip), %rax - fldt 96(%rsp) - fmul %st, %st(2) - fmulp %st, %st(4) - fldt 16(%rsp) - fldt (%rax) - fmulp %st, %st(2) - fxch %st(1) - fsqrt - fldt 80(%rsp) - fmul %st, %st(2) - fxch %st(3) - faddp %st, %st(2) - fmul %st, %st(1) - fxch %st(1) - fstpt 32(%rsp) - fxch %st(2) - fmulp %st, %st(1) - fsubp %st, %st(2) - fmulp %st, %st(1) -..B1.45: - lea _val_2_0L(%rip), %rax - cmpl $1, %r13d - fldt (%rax) - movl $0, %eax - fld %st(0) - jle ..B1.49 -..B1.46: - fldt 32(%rsp) - decl %r13d -..B1.47: - fld %st(1) - incl %eax - fdiv %st(5), %st - cmpl %r13d, %eax - fmul %st(4), %st - fxch %st(2) - fadd %st(3), %st - fxch %st(2) - fsubp %st, %st(1) - fld %st(3) - jae ..B1.48 -..B1.73: - fstp %st(4) - fxch %st(3) - jmp ..B1.47 -..B1.48: - fstp %st(5) - fstp %st(4) - fstp %st(0) - fstp %st(0) - fxch %st(1) - fstpt 16(%rsp) - fstpt 32(%rsp) - jmp ..B1.32 -..B1.49: - fstp %st(3) - fstp %st(2) - fstp %st(1) - fstpt 16(%rsp) - jmp ..B1.32 -..B1.50: - testl %ecx, %ecx - jne ..B1.57 -..B1.51: - testl $1048575, 4(%rsp) - jne ..B1.57 -..B1.52: - cmpl $1, (%rsp) - jne ..B1.57 -..B1.53: - lea _large_value_64(%rip), %rax - testl %r15d, %r15d - movsd (%rax), %xmm1 - jl ..B1.55 -..B1.54: - lea 8+_large_value_64(%rip), %rax - movsd (%rax), %xmm0 - mulsd %xmm1, %xmm0 - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.55: - movaps %xmm1, %xmm0 - mulsd %xmm1, %xmm0 -..B1.56: - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.57: - call y1@PLT -..B1.72: - movaps %xmm0, %xmm1 - testl %r15d, %r15d - xorps .L_2il0floatpacket.1(%rip), %xmm1 - jge ..L104 - movaps %xmm1, %xmm0 -..L104: - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.58: - testl $1048575, 4(%rsp) - jne ..B1.64 -..B1.59: - cmpl $0, (%rsp) - jne ..B1.64 -..B1.60: - testb $-128, 7(%rsp) - je ..B1.62 -..B1.61: - lea _infs(%rip), %rax - lea _zeros(%rip), %rdx - movsd (%rax), %xmm0 - mulsd (%rdx), %xmm0 - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.62: - lea _zeros(%rip), %rdx - movl %r13d, %eax - shrl $31, %eax - andl %r13d, %eax - movsd (%rdx,%rax,8), %xmm0 -..B1.63: - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 256 - .cfi_offset 13, -16 - .cfi_offset 14, -24 - .cfi_offset 15, -32 -..B1.64: - lea _ones(%rip), %rax - movsd (%rsp), %xmm0 - mulsd (%rax), %xmm0 - addq $224, %rsp - .cfi_def_cfa_offset 32 - .cfi_restore 15 - popq %r15 - .cfi_def_cfa_offset 24 - .cfi_restore 14 - popq %r14 - .cfi_def_cfa_offset 16 - .cfi_restore 13 - popq %r13 - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type yn,@function - .size yn,.-yn - .data -# -- End yn - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.1: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,16 - .align 8 -.L_2il0floatpacket.0: - .long 0x00000000,0x40adc000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,8 - .align 8 -XINF: - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x00000000,0x00000000 - .long 0x33333333,0x3fd33333 - .long 0xcccccccd,0x3ff4cccc - .long 0x33333333,0x400b3333 - .long 0x33333333,0x401b3333 - .long 0x33333333,0x40273333 - .long 0xcccccccd,0x4031cccc - .long 0x66666666,0x40396666 - .long 0x9999999a,0x40411999 - .long 0x9999999a,0x40461999 - .long 0x66666666,0x404ba666 - .long 0x9999999a,0x4050d999 - .long 0x00000000,0x40542000 - .long 0x33333333,0x40579333 - .long 0x9999999a,0x405b3999 - .long 0x00000000,0x405f0000 - .long 0x00000000,0x40618000 - .long 0x00000000,0x40638000 - .long 0x00000000,0x4065a000 - .long 0x00000000,0x4067e000 - .long 0x00000000,0x406a2000 - .long 0x00000000,0x406c8000 - .long 0x00000000,0x406ee000 - .long 0x00000000,0x4070a000 - .long 0x00000000,0x4071e000 - .long 0x00000000,0x40732000 - .long 0x00000000,0x40746000 - .long 0x00000000,0x4075b000 - .long 0x00000000,0x40770000 - .long 0x00000000,0x40785000 - .long 0x00000000,0x4079a000 - .long 0x00000000,0x407b0000 - .long 0x00000000,0x407c6000 - .long 0x00000000,0x407dc000 - .long 0x00000000,0x407f3000 - .long 0x00000000,0x40804800 - .long 0x00000000,0x40810000 - .long 0x00000000,0x4081b800 - .long 0x00000000,0x40827000 - .long 0x00000000,0x40832800 - .long 0x00000000,0x4083e000 - .long 0x00000000,0x4084a000 - .long 0x00000000,0x40856000 - .long 0x00000000,0x40861800 - .long 0x00000000,0x4086d800 - .long 0x00000000,0x4087a000 - .long 0x00000000,0x40886000 - .long 0x00000000,0x40892000 - .long 0x00000000,0x4089e800 - .long 0x00000000,0x408aa800 - .long 0x00000000,0x408b7000 - .long 0x00000000,0x408c3000 - .long 0x00000000,0x408cf800 - .long 0x00000000,0x408dc000 - .long 0x00000000,0x408e8800 - .long 0x00000000,0x408f5800 - .long 0x00000000,0x40901000 - .long 0x00000000,0x40907400 - .long 0x00000000,0x4090d800 - .long 0x00000000,0x40914000 - .long 0x00000000,0x4091a800 - .long 0x00000000,0x40920c00 - .long 0x00000000,0x40927400 - .long 0x00000000,0x4092dc00 - .long 0x00000000,0x40934400 - .long 0x00000000,0x4093a800 - .long 0x00000000,0x40941000 - .long 0x00000000,0x40947800 - .long 0x00000000,0x4094e400 - .long 0x00000000,0x40954c00 - .long 0x00000000,0x4095b400 - .long 0x00000000,0x40961c00 - .long 0x00000000,0x40968800 - .long 0x00000000,0x4096f000 - .long 0x00000000,0x40975c00 - .long 0x00000000,0x4097c400 - .long 0x00000000,0x40983000 - .long 0x00000000,0x40989800 - .long 0x00000000,0x40990400 - .long 0x00000000,0x40997000 - .long 0x00000000,0x4099d800 - .long 0x00000000,0x409a4400 - .long 0x00000000,0x409ab000 - .long 0x00000000,0x409b1c00 - .long 0x00000000,0x409b8800 - .long 0x00000000,0x409bf400 - .long 0x00000000,0x409c6000 - .long 0x00000000,0x409ccc00 - .long 0x00000000,0x409d3800 - .long 0x00000000,0x409da400 - .long 0x00000000,0x409e1000 - .long 0x00000000,0x409e8000 - .long 0x00000000,0x409eec00 - .long 0x00000000,0x409f5800 - .long 0x00000000,0x409fc800 - .long 0x00000000,0x40a01a00 - .long 0x00000000,0x40a05000 - .long 0x00000000,0x40a08800 - .long 0x00000000,0x40a0be00 - .long 0x00000000,0x40a0f600 - .long 0x00000000,0x40a12c00 - .long 0x00000000,0x40a16400 - .long 0x00000000,0x40a19a00 - .long 0x00000000,0x40a1d200 - .long 0x00000000,0x40a20a00 - .long 0x00000000,0x40a24000 - .long 0x00000000,0x40a27800 - .long 0x00000000,0x40a2b000 - .long 0x00000000,0x40a2e800 - .long 0x00000000,0x40a31e00 - .long 0x00000000,0x40a35600 - .long 0x00000000,0x40a38e00 - .long 0x00000000,0x40a3c600 - .long 0x00000000,0x40a3fe00 - .long 0x00000000,0x40a43600 - .long 0x00000000,0x40a46e00 - .long 0x00000000,0x40a4a600 - .long 0x00000000,0x40a4de00 - .long 0x00000000,0x40a51600 - .long 0x00000000,0x40a54e00 - .long 0x00000000,0x40a58600 - .long 0x00000000,0x40a5be00 - .long 0x00000000,0x40a5f600 - .long 0x00000000,0x40a62e00 - .long 0x00000000,0x40a66600 - .long 0x00000000,0x40a6a000 - .long 0x00000000,0x40a6d800 - .long 0x00000000,0x40a71000 - .long 0x00000000,0x40a74800 - .long 0x00000000,0x40a78200 - .long 0x00000000,0x40a7ba00 - .long 0x00000000,0x40a7f200 - .long 0x00000000,0x40a82c00 - .long 0x00000000,0x40a86400 - .long 0x00000000,0x40a89c00 - .long 0x00000000,0x40a8d600 - .long 0x00000000,0x40a90e00 - .long 0x00000000,0x40a94600 - .long 0x00000000,0x40a98000 - .long 0x00000000,0x40a9b800 - .long 0x00000000,0x40a9f200 - .long 0x00000000,0x40aa2a00 - .long 0x00000000,0x40aa6400 - .long 0x00000000,0x40aa9c00 - .long 0x00000000,0x40aad600 - .long 0x00000000,0x40ab1000 - .long 0x00000000,0x40ab4800 - .long 0x00000000,0x40ab8200 - .long 0x00000000,0x40abba00 - .long 0x00000000,0x40abf400 - .long 0x00000000,0x40ac2e00 - .long 0x00000000,0x40ac6600 - .long 0x00000000,0x40aca000 - .long 0x00000000,0x40acda00 - .long 0x00000000,0x40ad1200 - .long 0x00000000,0x40ad4c00 - .long 0x00000000,0x40ad8600 - .long 0x00000000,0x40adc000 - .type XINF,@object - .size XINF,1288 - .align 4 -_zeros: - .long 0 - .long 0 - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,16 - .align 4 -_infs: - .long 0 - .long 2146435072 - .long 0 - .long 4293918720 - .type _infs,@object - .size _infs,16 - .align 4 -_large_value_64: - .long 0 - .long 2121269248 - .long 0 - .long 4268752896 - .type _large_value_64,@object - .size _large_value_64,16 - .align 4 -_ones: - .long 0 - .long 1072693248 - .long 0 - .long 3220176896 - .type _ones,@object - .size _ones,16 - .align 2 -_val_20_0L: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16387 - .word 0 - .word 0 - .word 0 - .type _val_20_0L,@object - .size _val_20_0L,16 - .align 2 -_val_1000_0L: - .word 0 - .word 0 - .word 0 - .word 64000 - .word 16392 - .word 0 - .word 0 - .word 0 - .type _val_1000_0L,@object - .size _val_1000_0L,16 - .align 2 -_val_4_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16385 - .word 0 - .word 0 - .word 0 - .type _val_4_0L,@object - .size _val_4_0L,16 - .align 2 -_val_8_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16386 - .word 0 - .word 0 - .word 0 - .type _val_8_0L,@object - .size _val_8_0L,16 - .align 2 -_val_n1_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 49151 - .word 0 - .word 0 - .word 0 - .type _val_n1_0L,@object - .size _val_n1_0L,16 - .align 2 -_val_3_0L: - .word 0 - .word 0 - .word 0 - .word 49152 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _val_3_0L,@object - .size _val_3_0L,16 - .align 2 -_val_p1_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _val_p1_0L,@object - .size _val_p1_0L,16 - .align 2 -_val_5_0L: - .word 0 - .word 0 - .word 0 - .word 40960 - .word 16385 - .word 0 - .word 0 - .word 0 - .type _val_5_0L,@object - .size _val_5_0L,16 - .align 2 -_val_2_0L: - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16384 - .word 0 - .word 0 - .word 0 - .type _val_2_0L,@object - .size _val_2_0L,16 - .align 2 -_val_0_0L: - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .type _val_0_0L,@object - .size _val_0_0L,16 - .align 2 -_tonpi: - .word 5418 - .word 20036 - .word 33646 - .word 41721 - .word 16382 - .word 0 - .word 0 - .word 0 - .type _tonpi,@object - .size _tonpi,16 - .align 2 -_val_36_0L: - .word 0 - .word 0 - .word 0 - .word 36864 - .word 16388 - .word 0 - .word 0 - .word 0 - .type _val_36_0L,@object - .size _val_36_0L,16 - .align 2 -_PP0: - .word 3555 - .word 4199 - .word 61716 - .word 36505 - .word 49086 - .word 0 - .word 0 - .word 0 - .word 21640 - .word 56203 - .word 47336 - .word 57608 - .word 16322 - .word 0 - .word 0 - .word 0 - .word 3059 - .word 27554 - .word 42044 - .word 45622 - .word 49095 - .word 0 - .word 0 - .word 0 - .word 55815 - .word 35656 - .word 54748 - .word 47307 - .word 16332 - .word 0 - .word 0 - .word 0 - .word 42025 - .word 6728 - .word 28939 - .word 34692 - .word 49106 - .word 0 - .word 0 - .word 0 - .word 58943 - .word 11189 - .word 14960 - .word 38786 - .word 16344 - .word 0 - .word 0 - .word 0 - .word 43526 - .word 20005 - .word 29826 - .word 37014 - .word 49119 - .word 0 - .word 0 - .word 0 - .word 58976 - .word 17109 - .word 36079 - .word 36708 - .word 16359 - .word 0 - .word 0 - .word 0 - .word 58243 - .word 36408 - .word 14563 - .word 58254 - .word 49136 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _PP0,@object - .size _PP0,160 - .align 2 -_PP1: - .word 52008 - .word 23245 - .word 2457 - .word 38658 - .word 16318 - .word 0 - .word 0 - .word 0 - .word 61876 - .word 57278 - .word 25234 - .word 61346 - .word 49090 - .word 0 - .word 0 - .word 0 - .word 33834 - .word 23040 - .word 39409 - .word 49003 - .word 16327 - .word 0 - .word 0 - .word 0 - .word 54525 - .word 6554 - .word 40935 - .word 51421 - .word 49100 - .word 0 - .word 0 - .word 0 - .word 9848 - .word 9769 - .word 18248 - .word 38344 - .word 16338 - .word 0 - .word 0 - .word 0 - .word 45790 - .word 60252 - .word 47538 - .word 43957 - .word 49112 - .word 0 - .word 0 - .word 0 - .word 27022 - .word 41654 - .word 23333 - .word 43744 - .word 16351 - .word 0 - .word 0 - .word 0 - .word 12816 - .word 40723 - .word 46387 - .word 47196 - .word 49127 - .word 0 - .word 0 - .word 0 - .word 4849 - .word 19418 - .word 12136 - .word 48545 - .word 16369 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 0 - .word 32768 - .word 16383 - .word 0 - .word 0 - .word 0 - .type _PP1,@object - .size _PP1,160 - .align 2 -_QP0: - .word 30466 - .word 14887 - .word 33885 - .word 35327 - .word 16316 - .word 0 - .word 0 - .word 0 - .word 41139 - .word 65374 - .word 59488 - .word 50915 - .word 49088 - .word 0 - .word 0 - .word 0 - .word 35675 - .word 30946 - .word 22284 - .word 35505 - .word 16325 - .word 0 - .word 0 - .word 0 - .word 65216 - .word 29458 - .word 42913 - .word 63176 - .word 49097 - .word 0 - .word 0 - .word 0 - .word 5130 - .word 24339 - .word 48915 - .word 38634 - .word 16335 - .word 0 - .word 0 - .word 0 - .word 30040 - .word 27658 - .word 23448 - .word 34596 - .word 49109 - .word 0 - .word 0 - .word 0 - .word 37816 - .word 17431 - .word 24401 - .word 49646 - .word 16347 - .word 0 - .word 0 - .word 0 - .word 4377 - .word 35057 - .word 45578 - .word 33037 - .word 49123 - .word 0 - .word 0 - .word 0 - .word 19863 - .word 65266 - .word 6202 - .word 53939 - .word 16363 - .word 0 - .word 0 - .word 0 - .word 58254 - .word 36408 - .word 14563 - .word 58254 - .word 49142 - .word 0 - .word 0 - .word 0 - .type _QP0,@object - .size _QP0,160 - .align 2 -_QP1: - .word 65402 - .word 6822 - .word 45128 - .word 37300 - .word 49084 - .word 0 - .word 0 - .word 0 - .word 41532 - .word 52948 - .word 50360 - .word 54021 - .word 16320 - .word 0 - .word 0 - .word 0 - .word 21320 - .word 30785 - .word 26870 - .word 37955 - .word 49093 - .word 0 - .word 0 - .word 0 - .word 55382 - .word 38611 - .word 29746 - .word 34115 - .word 16330 - .word 0 - .word 0 - .word 0 - .word 37194 - .word 6554 - .word 16235 - .word 42314 - .word 49103 - .word 0 - .word 0 - .word 0 - .word 17886 - .word 15840 - .word 33918 - .word 38666 - .word 16341 - .word 0 - .word 0 - .word 0 - .word 62905 - .word 55876 - .word 18072 - .word 57284 - .word 49115 - .word 0 - .word 0 - .word 0 - .word 28423 - .word 64693 - .word 26579 - .word 40379 - .word 16355 - .word 0 - .word 0 - .word 0 - .word 40135 - .word 58793 - .word 24002 - .word 37757 - .word 49132 - .word 0 - .word 0 - .word 0 - .word 43691 - .word 43690 - .word 43690 - .word 43690 - .word 16376 - .word 0 - .word 0 - .word 0 - .type _QP1,@object - .size _QP1,160 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ynf.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ynf.S deleted file mode 100644 index 627810e6cf..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ynf.S +++ /dev/null @@ -1,1220 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ynf.c" - .text -..TXTST0: -# -- Begin ynf - .text - .align 16,0x90 - .globl ynf -ynf: -# parameter 1: %edi -# parameter 2: %xmm0 -..B1.1: - .cfi_startproc -..___tag_value_ynf.1: -..L2: - - pushq %rbx - .cfi_def_cfa_offset 16 - .cfi_offset 3, -16 - pushq %rbp - .cfi_def_cfa_offset 24 - .cfi_offset 6, -24 - subq $72, %rsp - .cfi_def_cfa_offset 96 - movl %edi, %ebx - movd %xmm0, %ecx - movss %xmm0, (%rsp) - lea -1(%rcx), %esi - cmpl $2139095039, %esi - jae ..B1.48 -..B1.2: - testl %ebx, %ebx - je ..B1.59 -..B1.3: - movl %ecx, %ebp - movl %ebx, %eax - cltd - xorl %ebx, %ebp - shrl $31, %ebp - andl %ebx, %ebp - xorl %edx, %ebx - subl %edx, %ebx - cmpl $1, %ebx - je ..B1.58 -..B1.4: - movl %ebx, %edi - sarl $3, %edi - cmpl $320, %edi - jg ..B1.6 -..B1.5: - movslq %edi, %rdi - lea function_zeros(%rip), %rsi - movss (%rsi,%rdi,4), %xmm0 - jmp ..B1.7 -..B1.6: - pxor %xmm0, %xmm0 - lea -320(%rdi), %esi - lea -2560(,%rdi,8), %edi - subl %esi, %edi - cvtsi2ss %edi, %xmm0 - addss .L_2il0floatpacket.0(%rip), %xmm0 -..B1.7: - movss (%rsp), %xmm3 - comiss %xmm3, %xmm0 - ja ..B1.47 -..B1.8: - cvtss2sd %xmm3, %xmm3 - cmpl $6, %ebx - jge ..B1.26 -..B1.9: - lea _val_0_6(%rip), %rcx - movsd (%rcx), %xmm1 - comisd %xmm3, %xmm1 - jb ..B1.27 -..B1.10: - lea _val_2_0(%rip), %rsi - pxor %xmm5, %xmm5 - lea _zeros(%rip), %rcx - movaps %xmm3, %xmm6 - pxor %xmm4, %xmm4 - testl %ebx, %ebx - pxor %xmm1, %xmm1 - movsd (%rsi), %xmm7 - lea _ones(%rip), %rsi - movsd %xmm1, 8(%rsp) - divsd %xmm7, %xmm6 - cvtss2sd (%rsi), %xmm5 - cvtss2sd (%rcx), %xmm4 - divsd %xmm3, %xmm7 - movsd %xmm5, (%rsp) - movaps %xmm5, %xmm2 - movaps %xmm5, %xmm1 - movaps %xmm5, %xmm8 - movl $0, %ecx - jle ..B1.14 -..B1.11: - movaps %xmm1, %xmm9 -..B1.12: - incl %ecx - mulsd %xmm6, %xmm1 - cmpl %ebx, %ecx - mulsd %xmm7, %xmm9 - jb ..B1.12 -..B1.13: - movsd %xmm9, (%rsp) - testl %ebx, %ebx -..B1.14: - movl $0, %ecx - jle ..B1.18 -..B1.16: - movaps %xmm5, %xmm7 - incl %ecx - divsd %xmm8, %xmm7 - movaps %xmm2, %xmm9 - cmpl %ebx, %ecx - mulsd %xmm8, %xmm2 - addsd %xmm7, %xmm4 - addsd %xmm5, %xmm8 - jb ..B1.16 -..B1.17: - movsd %xmm9, 8(%rsp) -..B1.18: - mulsd %xmm6, %xmm6 - lea _TWO_19H(%rip), %rcx - movsd %xmm5, 32(%rsp) - movaps %xmm4, %xmm8 - movsd %xmm4, 64(%rsp) - xorl %r8d, %r8d - xorps .L_2il0floatpacket.3(%rip), %xmm6 - movl %ebx, %edi - movsd (%rcx), %xmm7 - movl %ebx, %ecx -..B1.19: - incl %r8d - incl %edi - movl %r8d, %r9d - movaps %xmm8, %xmm13 - imull %edi, %r9d - pxor %xmm8, %xmm8 - movss (%rsi), %xmm9 - pxor %xmm10, %xmm10 - movsd 32(%rsp), %xmm11 - movaps %xmm7, %xmm12 - mulsd %xmm6, %xmm11 - cvtsi2ss %r9d, %xmm8 - divss %xmm8, %xmm9 - addl $2, %ecx - cvtsi2sd %ecx, %xmm10 - cvtss2sd %xmm9, %xmm9 - mulsd %xmm9, %xmm10 - mulsd %xmm9, %xmm11 - addsd %xmm10, %xmm4 - addsd %xmm11, %xmm5 - movsd %xmm11, 32(%rsp) - mulsd %xmm4, %xmm11 - addsd 64(%rsp), %xmm11 - mulsd %xmm11, %xmm12 - movsd %xmm11, 64(%rsp) - addsd %xmm12, %xmm11 - movsd %xmm11, 56(%rsp) - movsd 56(%rsp), %xmm8 - subsd %xmm12, %xmm8 - ucomisd %xmm13, %xmm8 - jne ..B1.19 - jp ..B1.19 -..B1.20: - divsd %xmm2, %xmm1 - lea _eulon2(%rip), %rcx - movsd %xmm1, 32(%rsp) - mulsd %xmm1, %xmm5 - movsd (%rcx), %xmm1 - mulsd %xmm1, %xmm3 - movaps %xmm3, %xmm0 - movsd %xmm5, 16(%rsp) - movsd %xmm6, 24(%rsp) -..___tag_value_ynf.8: - call __libm_log_k32@PLT -..___tag_value_ynf.9: -..B1.62: - movsd 24(%rsp), %xmm6 - movaps %xmm0, %xmm1 - movsd 16(%rsp), %xmm5 -..B1.21: - lea _tonpi(%rip), %rsi - lea _oonpi(%rip), %rcx - xorps .L_2il0floatpacket.3(%rip), %xmm6 - cmpl $1, %ebx - movsd (%rsi), %xmm0 - movl $0, %esi - mulsd %xmm5, %xmm0 - movsd (%rcx), %xmm2 - lea -1(%rbx), %ecx - mulsd %xmm1, %xmm0 - movsd 64(%rsp), %xmm1 - mulsd %xmm2, %xmm1 - mulsd 32(%rsp), %xmm1 - subsd %xmm1, %xmm0 - movsd 8(%rsp), %xmm1 - jle ..B1.25 -..B1.22: - movaps %xmm1, %xmm4 - decl %ebx -..B1.23: - incl %esi - lea -1(%rcx), %edi - imull %esi, %ecx - mulsd %xmm6, %xmm4 - cvtsi2sd %ecx, %xmm3 - divsd %xmm3, %xmm4 - movl %edi, %ecx - cmpl %ebx, %esi - addsd %xmm4, %xmm1 - jb ..B1.23 -..B1.25: - mulsd %xmm2, %xmm1 - mulsd (%rsp), %xmm1 - subsd %xmm1, %xmm0 - jmp ..B1.46 -..B1.26: - cmpl $80, %ebx - jge ..B1.35 -..B1.27: - lea _val_18_0(%rip), %rcx - movsd (%rcx), %xmm1 - comisd %xmm3, %xmm1 - jbe ..B1.29 -..B1.28: - movaps %xmm3, %xmm0 - movsd %xmm3, 48(%rsp) - call y0@PLT -..B1.64: - movsd 48(%rsp), %xmm3 - movaps %xmm0, %xmm1 - movaps %xmm3, %xmm0 - movsd %xmm1, (%rsp) - call y1@PLT -..B1.63: - movsd 48(%rsp), %xmm3 - movsd (%rsp), %xmm1 - jmp ..B1.31 -..B1.29: - lea _ones(%rip), %rcx - pxor %xmm1, %xmm1 - lea _val_16_0(%rip), %r8 - lea (%rsp), %rdi - movaps %xmm3, %xmm0 - lea 8(%rsp), %rsi - movl $-1, %edx - cvtss2sd (%rcx), %xmm1 - divsd %xmm3, %xmm1 - movsd (%r8), %xmm8 - mulsd %xmm1, %xmm8 - movaps %xmm8, %xmm6 - mulsd %xmm8, %xmm6 - movaps %xmm6, %xmm7 - mulsd %xmm6, %xmm7 - movq $0, 56(%rsi) - movsd %xmm1, 8(%rsi) - movsd %xmm6, 16(%rsi) - movsd %xmm7, 24(%rsi) - movsd %xmm8, 32(%rsi) - movsd %xmm3, 40(%rsi) -..___tag_value_ynf.10: - call __libm_sincos_k32@PLT -..___tag_value_ynf.11: -..B1.30: - lea 40+_PP1(%rip), %r11 - lea 40+_PP0(%rip), %rcx - movsd 32(%rsp), %xmm7 - lea 24+_PP0(%rip), %rsi - lea 8+_PP0(%rip), %rdi - lea 32+_PP0(%rip), %r8 - movsd 24(%rsp), %xmm6 - lea 16+_PP0(%rip), %r9 - movsd (%r11), %xmm11 - lea _PP0(%rip), %r10 - movsd (%rcx), %xmm1 - lea 24+_PP1(%rip), %rcx - movsd (%r8), %xmm2 - movsd 40(%rsp), %xmm8 - mulsd %xmm7, %xmm11 - mulsd %xmm7, %xmm1 - mulsd %xmm7, %xmm2 - addsd (%rcx), %xmm11 - addsd (%rsi), %xmm1 - addsd (%r9), %xmm2 - mulsd %xmm7, %xmm11 - mulsd %xmm7, %xmm1 - mulsd %xmm7, %xmm2 - addsd (%rdi), %xmm1 - addsd (%r10), %xmm2 - mulsd %xmm6, %xmm1 - lea 8+_PP1(%rip), %rcx - addsd %xmm2, %xmm1 - addsd (%rcx), %xmm11 - lea 32+_PP1(%rip), %rcx - mulsd %xmm6, %xmm11 - movsd (%rcx), %xmm4 - lea 16+_PP1(%rip), %rcx - mulsd %xmm7, %xmm4 - movsd 48(%rsp), %xmm3 - addsd (%rcx), %xmm4 - lea _PP1(%rip), %rcx - mulsd %xmm7, %xmm4 - addsd (%rcx), %xmm4 - lea 40+_QP0(%rip), %rcx - movsd (%rcx), %xmm9 - lea 24+_QP0(%rip), %rcx - mulsd %xmm7, %xmm9 - addsd %xmm4, %xmm11 - addsd (%rcx), %xmm9 - lea 8+_QP0(%rip), %rcx - mulsd %xmm7, %xmm9 - addsd (%rcx), %xmm9 - lea 32+_QP0(%rip), %rcx - movsd (%rcx), %xmm5 - lea 16+_QP0(%rip), %rcx - mulsd %xmm7, %xmm5 - mulsd %xmm6, %xmm9 - addsd (%rcx), %xmm5 - mulsd %xmm8, %xmm9 - mulsd %xmm7, %xmm5 - lea _QP0(%rip), %rcx - addsd (%rcx), %xmm5 - lea 40+_QP1(%rip), %rcx - movsd (%rcx), %xmm10 - lea 24+_QP1(%rip), %rcx - mulsd %xmm7, %xmm10 - mulsd %xmm8, %xmm5 - addsd (%rcx), %xmm10 - addsd %xmm5, %xmm9 - mulsd %xmm7, %xmm10 - lea 8+_QP1(%rip), %rcx - addsd (%rcx), %xmm10 - lea 32+_QP1(%rip), %rcx - mulsd %xmm6, %xmm10 - movsd (%rcx), %xmm6 - lea 16+_QP1(%rip), %rcx - mulsd %xmm7, %xmm6 - mulsd %xmm8, %xmm10 - addsd (%rcx), %xmm6 - mulsd %xmm7, %xmm6 - lea _QP1(%rip), %rcx - movsd 8(%rsp), %xmm7 - mulsd %xmm7, %xmm9 - addsd (%rcx), %xmm6 - mulsd %xmm11, %xmm7 - mulsd %xmm8, %xmm6 - lea _tonpi(%rip), %rcx - addsd %xmm6, %xmm10 - movsd (%rcx), %xmm0 - mulsd 16(%rsp), %xmm0 - movsd (%rsp), %xmm8 - sqrtsd %xmm0, %xmm0 - mulsd %xmm8, %xmm1 - mulsd %xmm10, %xmm8 - addsd %xmm9, %xmm1 - subsd %xmm7, %xmm8 - mulsd %xmm0, %xmm1 - mulsd %xmm8, %xmm0 -..B1.31: - lea _val_2_0(%rip), %rcx - cmpl $1, %ebx - movsd (%rcx), %xmm2 - movl $0, %ecx - divsd %xmm3, %xmm2 - jle ..B1.46 -..B1.32: - decl %ebx -..B1.33: - incl %ecx - pxor %xmm3, %xmm3 - cvtsi2sd %ecx, %xmm3 - mulsd %xmm2, %xmm3 - movaps %xmm0, %xmm4 - mulsd %xmm0, %xmm3 - cmpl %ebx, %ecx - movaps %xmm3, %xmm0 - subsd %xmm1, %xmm0 - movaps %xmm4, %xmm1 - jb ..B1.33 - jmp ..B1.46 -..B1.35: - pxor %xmm1, %xmm1 - lea 5000(%rbx,%rbx,4), %ecx - cvtsi2sd %ecx, %xmm1 - comisd %xmm3, %xmm1 - ja ..B1.27 -..B1.36: - pxor %xmm1, %xmm1 - lea _val_4_0(%rip), %rsi - cvtsi2sd %ebx, %xmm1 - movsd (%rsi), %xmm15 - pxor %xmm2, %xmm2 - movaps %xmm15, %xmm14 - lea _val_5_0(%rip), %rsi - mulsd %xmm1, %xmm14 - lea 4+_ones(%rip), %r9 - cvtss2sd (%r9), %xmm2 - mulsd %xmm1, %xmm14 - lea _val_8_0(%rip), %rdi - addsd %xmm14, %xmm2 - movsd (%rdi), %xmm11 - pxor %xmm1, %xmm1 - mulsd %xmm3, %xmm11 - lea _ones(%rip), %r8 - cvtss2sd (%r8), %xmm1 - divsd %xmm11, %xmm2 - lea _val_2_0(%rip), %r10 - lea _val_3_0(%rip), %r11 - movaps %xmm1, %xmm12 - movaps %xmm1, %xmm4 - movsd %xmm2, 32(%rsp) - movaps %xmm1, %xmm13 - movsd (%rsi), %xmm6 - movl $-1, %ecx - movsd (%r10), %xmm10 - xorb %sil, %sil - movsd (%r11), %xmm8 - movaps %xmm10, %xmm9 - divsd %xmm1, %xmm12 - movaps %xmm8, %xmm7 -..B1.37: - movsd %xmm4, 64(%rsp) - movaps %xmm7, %xmm4 - mulsd %xmm7, %xmm4 - movaps %xmm14, %xmm5 - movaps %xmm6, %xmm0 - testl %ecx, %ecx - mulsd %xmm6, %xmm0 - subsd %xmm4, %xmm5 - movaps %xmm9, %xmm4 - mulsd %xmm11, %xmm4 - divsd %xmm4, %xmm5 - movaps %xmm14, %xmm4 - mulsd 32(%rsp), %xmm5 - subsd %xmm0, %xmm4 - movaps %xmm11, %xmm0 - mulsd %xmm8, %xmm0 - divsd %xmm0, %xmm4 - mulsd %xmm5, %xmm4 - jle ..B1.57 -..B1.38: - addsd %xmm5, %xmm1 - addsd %xmm4, %xmm2 -..B1.39: - movsd %xmm4, 32(%rsp) - addsd %xmm10, %xmm9 - mulsd %xmm12, %xmm4 - addsd %xmm10, %xmm8 - addsd %xmm15, %xmm7 - addsd %xmm15, %xmm6 - andps .L_2il0floatpacket.2(%rip), %xmm4 - comisd %xmm4, %xmm13 - jbe ..B1.41 -..B1.40: - movaps %xmm4, %xmm13 - movb $1, %sil - jmp ..B1.42 -..B1.41: - testb %sil, %sil - jne ..B1.44 -..B1.42: - lea _TWO_19H(%rip), %rdi - movaps %xmm1, %xmm4 - negl %ecx - movsd (%rdi), %xmm5 - mulsd %xmm1, %xmm5 - addsd %xmm5, %xmm4 - movsd %xmm4, 56(%rsp) - movsd 56(%rsp), %xmm4 - subsd %xmm5, %xmm4 - ucomisd 64(%rsp), %xmm4 - jne ..B1.37 - jp ..B1.37 -..B1.44: - addl %ebx, %ebx - lea 64(%rsp), %rdi - negl %ebx - lea 32(%rsp), %rsi - decl %ebx - movaps %xmm3, %xmm0 - movl %ebx, %edx - movsd %xmm2, (%rsp) - movsd %xmm1, -24(%rsi) - movsd %xmm3, 16(%rsi) -..___tag_value_ynf.12: - call __libm_sincos_k32@PLT -..___tag_value_ynf.13: -..B1.45: - lea _tonpi(%rip), %rax - movsd 48(%rsp), %xmm3 - movsd 8(%rsp), %xmm1 - movsd (%rsp), %xmm2 - movsd (%rax), %xmm0 - divsd %xmm3, %xmm0 - sqrtsd %xmm0, %xmm0 - mulsd 64(%rsp), %xmm1 - mulsd 32(%rsp), %xmm2 - addsd %xmm2, %xmm1 - mulsd %xmm1, %xmm0 -..B1.46: - movaps %xmm0, %xmm1 - testl %ebp, %ebp - xorps .L_2il0floatpacket.3(%rip), %xmm1 - jne ..L14 - movaps %xmm0, %xmm1 -..L14: - cvtsd2ss %xmm1, %xmm1 - movaps %xmm1, %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.47: - lea _large_value_32(%rip), %rax - shrl $31, %ecx - movss (%rax,%rcx,4), %xmm0 - mulss .L_2il0floatpacket.1(%rip), %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.48: - movl %ecx, %ebp - andl $2147483647, %ebp - cmpl $2139095040, %ebp - ja ..B1.55 -..B1.49: - testl %ebp, %ebp - je ..B1.54 -..B1.50: - testl $-2147483648, %ecx - je ..B1.52 -..B1.51: - lea _zeros(%rip), %rax - lea _infs(%rip), %rdx - movss (%rax), %xmm0 - mulss (%rdx), %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.52: - lea _zeros(%rip), %rax - movl %ebx, %ecx - shrl $31, %ecx - andl %ebx, %ecx - movss (%rax,%rcx,4), %xmm0 -..B1.53: - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.54: - lea 4+_ones(%rip), %rax - lea _zeros(%rip), %rdx - movss (%rax), %xmm0 - divss (%rdx), %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.55: - lea _ones(%rip), %rax - movss (%rsp), %xmm0 - mulss (%rax), %xmm0 - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.57: - subsd %xmm5, %xmm1 - subsd %xmm4, %xmm2 - jmp ..B1.39 -..B1.58: - movss (%rsp), %xmm0 - call y1f@PLT -..B1.65: - movaps %xmm0, %xmm1 - testl %ebp, %ebp - xorps .L_2il0floatpacket.4(%rip), %xmm1 - je ..L63 - movaps %xmm1, %xmm0 -..L63: - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .cfi_def_cfa_offset 96 - .cfi_offset 3, -16 - .cfi_offset 6, -24 -..B1.59: - movss (%rsp), %xmm0 - call y0f@PLT -..B1.66: - addq $72, %rsp - .cfi_def_cfa_offset 24 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 16 - .cfi_restore 3 - popq %rbx - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ynf,@function - .size ynf,.-ynf - .data -# -- End ynf - .data - .align 4 - .align 4 -_zeros: - .long 0 - .long 2147483648 - .type _zeros,@object - .size _zeros,8 - .align 4 -_ones: - .long 1065353216 - .long 3212836864 - .type _ones,@object - .size _ones,8 - .align 4 -_infs: - .long 2139095040 - .long 4286578688 - .type _infs,@object - .size _infs,8 - .section .rodata, "a" - .align 16 - .align 16 -.L_2il0floatpacket.2: - .long 0xffffffff,0x7fffffff,0x00000000,0x00000000 - .type .L_2il0floatpacket.2,@object - .size .L_2il0floatpacket.2,16 - .align 16 -.L_2il0floatpacket.3: - .long 0x00000000,0x80000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.3,@object - .size .L_2il0floatpacket.3,16 - .align 16 -.L_2il0floatpacket.4: - .long 0x80000000,0x00000000,0x00000000,0x00000000 - .type .L_2il0floatpacket.4,@object - .size .L_2il0floatpacket.4,16 - .align 4 -.L_2il0floatpacket.0: - .long 0x450e6000 - .type .L_2il0floatpacket.0,@object - .size .L_2il0floatpacket.0,4 - .align 4 -.L_2il0floatpacket.1: - .long 0x71800000 - .type .L_2il0floatpacket.1,@object - .size .L_2il0floatpacket.1,4 - .align 4 -function_zeros: - .long 0x00000000 - .long 0x00000000 - .long 0x00000000 - .long 0x3ecccccd - .long 0x3fa66666 - .long 0x40400000 - .long 0x40a9999a - .long 0x4101999a - .long 0x41366666 - .long 0x4171999a - .long 0x4198cccd - .long 0x41ba6666 - .long 0x41df3333 - .long 0x42026666 - .long 0x42160000 - .long 0x422a0000 - .long 0x423f3333 - .long 0x42546666 - .long 0x426a0000 - .long 0x42803333 - .long 0x428b999a - .long 0x42970000 - .long 0x42a2999a - .long 0x42ae6666 - .long 0x42ba6666 - .long 0x42c66666 - .long 0x42d2999a - .long 0x42decccd - .long 0x42eb3333 - .long 0x42f7999a - .long 0x4302199a - .long 0x43086666 - .long 0x430ecccd - .long 0x43153333 - .long 0x431b999a - .long 0x4322199a - .long 0x4328999a - .long 0x432f199a - .long 0x4335b333 - .long 0x433c3333 - .long 0x4342e666 - .long 0x43498000 - .long 0x43503333 - .long 0x4356e666 - .long 0x435d999a - .long 0x43644ccd - .long 0x436b0000 - .long 0x4371cccd - .long 0x4378999a - .long 0x437f6666 - .long 0x4383199a - .long 0x43868ccd - .long 0x4389f333 - .long 0x438d6666 - .long 0x4390d99a - .long 0x43944ccd - .long 0x4397c000 - .long 0x439b3333 - .long 0x439eb333 - .long 0x43a23333 - .long 0x43a5a666 - .long 0x43a92666 - .long 0x43aca666 - .long 0x43b02666 - .long 0x43b3a666 - .long 0x43b73333 - .long 0x43bab333 - .long 0x43be4000 - .long 0x43c1c000 - .long 0x43c54ccd - .long 0x43c8d99a - .long 0x43cc6666 - .long 0x43cff333 - .long 0x43d38000 - .long 0x43d70ccd - .long 0x43da999a - .long 0x43de2666 - .long 0x43e1c000 - .long 0x43e54ccd - .long 0x43e8e666 - .long 0x43ec8000 - .long 0x43f00ccd - .long 0x43f3a666 - .long 0x43f74000 - .long 0x43fad99a - .long 0x43fe7333 - .long 0x44010666 - .long 0x4402d333 - .long 0x4404a000 - .long 0x44067333 - .long 0x44084000 - .long 0x440a0ccd - .long 0x440be000 - .long 0x440daccd - .long 0x440f8000 - .long 0x44114ccd - .long 0x44132000 - .long 0x4414f333 - .long 0x4416c666 - .long 0x4418999a - .long 0x441a6666 - .long 0x441c399a - .long 0x441e0ccd - .long 0x441fe000 - .long 0x4421b333 - .long 0x44238ccd - .long 0x44256000 - .long 0x44273333 - .long 0x44290666 - .long 0x442ae000 - .long 0x442cb333 - .long 0x442e8666 - .long 0x44306000 - .long 0x44323333 - .long 0x44340ccd - .long 0x4435e000 - .long 0x4437b99a - .long 0x44398ccd - .long 0x443b6666 - .long 0x443d4000 - .long 0x443f199a - .long 0x4440eccd - .long 0x4442c666 - .long 0x4444a000 - .long 0x4446799a - .long 0x44485333 - .long 0x444a2ccd - .long 0x444c0666 - .long 0x444de000 - .long 0x444fb99a - .long 0x44519333 - .long 0x44536ccd - .long 0x44554666 - .long 0x44572000 - .long 0x44590000 - .long 0x445ad99a - .long 0x445cb333 - .long 0x445e9333 - .long 0x44606ccd - .long 0x44624666 - .long 0x44642666 - .long 0x44660000 - .long 0x4467d99a - .long 0x4469b99a - .long 0x446b9333 - .long 0x446d7333 - .long 0x446f5333 - .long 0x44712ccd - .long 0x44730ccd - .long 0x4474e666 - .long 0x4476c666 - .long 0x4478a666 - .long 0x447a8000 - .long 0x447c6000 - .long 0x447e4000 - .long 0x44801000 - .long 0x4480fccd - .long 0x4481eccd - .long 0x4482dccd - .long 0x4483cccd - .long 0x4484bccd - .long 0x4485accd - .long 0x44869ccd - .long 0x44878ccd - .long 0x44887ccd - .long 0x44896ccd - .long 0x448a5ccd - .long 0x448b4ccd - .long 0x448c3ccd - .long 0x448d2ccd - .long 0x448e1ccd - .long 0x448f0ccd - .long 0x448ffccd - .long 0x4490eccd - .long 0x4491e000 - .long 0x4492d000 - .long 0x4493c000 - .long 0x4494b000 - .long 0x4495a333 - .long 0x44969333 - .long 0x44978333 - .long 0x44987333 - .long 0x44996666 - .long 0x449a5666 - .long 0x449b499a - .long 0x449c399a - .long 0x449d299a - .long 0x449e1ccd - .long 0x449f0ccd - .long 0x44a00000 - .long 0x44a0f000 - .long 0x44a1e333 - .long 0x44a2d333 - .long 0x44a3c666 - .long 0x44a4b666 - .long 0x44a5a99a - .long 0x44a6999a - .long 0x44a78ccd - .long 0x44a87ccd - .long 0x44a97000 - .long 0x44aa6333 - .long 0x44ab5333 - .long 0x44ac4666 - .long 0x44ad399a - .long 0x44ae299a - .long 0x44af1ccd - .long 0x44b01000 - .long 0x44b10333 - .long 0x44b1f333 - .long 0x44b2e666 - .long 0x44b3d99a - .long 0x44b4cccd - .long 0x44b5bccd - .long 0x44b6b000 - .long 0x44b7a333 - .long 0x44b89666 - .long 0x44b9899a - .long 0x44ba7ccd - .long 0x44bb6ccd - .long 0x44bc6000 - .long 0x44bd5333 - .long 0x44be4666 - .long 0x44bf399a - .long 0x44c02ccd - .long 0x44c12000 - .long 0x44c21333 - .long 0x44c30666 - .long 0x44c3f99a - .long 0x44c4eccd - .long 0x44c5e000 - .long 0x44c6d333 - .long 0x44c7c666 - .long 0x44c8b99a - .long 0x44c9accd - .long 0x44caa000 - .long 0x44cb9333 - .long 0x44cc899a - .long 0x44cd7ccd - .long 0x44ce7000 - .long 0x44cf6333 - .long 0x44d05666 - .long 0x44d1499a - .long 0x44d23ccd - .long 0x44d33333 - .long 0x44d42666 - .long 0x44d5199a - .long 0x44d60ccd - .long 0x44d70000 - .long 0x44d7f666 - .long 0x44d8e99a - .long 0x44d9dccd - .long 0x44dad000 - .long 0x44dbc666 - .long 0x44dcb99a - .long 0x44ddaccd - .long 0x44dea333 - .long 0x44df9666 - .long 0x44e0899a - .long 0x44e18000 - .long 0x44e27333 - .long 0x44e36666 - .long 0x44e45ccd - .long 0x44e55000 - .long 0x44e64333 - .long 0x44e7399a - .long 0x44e82ccd - .long 0x44e92333 - .long 0x44ea1666 - .long 0x44eb099a - .long 0x44ec0000 - .long 0x44ecf333 - .long 0x44ede99a - .long 0x44eedccd - .long 0x44efd333 - .long 0x44f0c666 - .long 0x44f1bccd - .long 0x44f2b000 - .long 0x44f3a666 - .long 0x44f4999a - .long 0x44f59000 - .long 0x44f68333 - .long 0x44f7799a - .long 0x44f86ccd - .long 0x44f96333 - .long 0x44fa599a - .long 0x44fb4ccd - .long 0x44fc4333 - .long 0x44fd3666 - .long 0x44fe2ccd - .long 0x44ff2000 - .long 0x45000b33 - .long 0x45008666 - .long 0x45010000 - .long 0x45017000 - .long 0x4501f000 - .long 0x45027000 - .long 0x4502e000 - .long 0x45036000 - .long 0x4503e000 - .long 0x45045000 - .long 0x4504d000 - .long 0x45055000 - .long 0x4505c000 - .long 0x45064000 - .long 0x4506c000 - .long 0x45073000 - .long 0x4507b000 - .long 0x45083000 - .long 0x4508a000 - .long 0x45092000 - .long 0x4509a000 - .long 0x450a1000 - .long 0x450a9000 - .long 0x450b1000 - .long 0x450b8000 - .long 0x450c0000 - .long 0x450c8000 - .long 0x450cf000 - .long 0x450d7000 - .long 0x450df000 - .long 0x450e6000 - .type function_zeros,@object - .size function_zeros,1284 - .align 4 -_val_0_6: - .long 858993459 - .long 1071854387 - .type _val_0_6,@object - .size _val_0_6,8 - .align 4 -_val_2_0: - .long 0 - .long 1073741824 - .type _val_2_0,@object - .size _val_2_0,8 - .align 4 -_TWO_19H: - .long 0 - .long 1093140480 - .type _TWO_19H,@object - .size _TWO_19H,8 - .align 4 -_eulon2: - .long 3400611180 - .long 1072463685 - .type _eulon2,@object - .size _eulon2,8 - .align 4 -_tonpi: - .long 1841940611 - .long 1071931184 - .type _tonpi,@object - .size _tonpi,8 - .align 4 -_oonpi: - .long 1841940611 - .long 1070882608 - .type _oonpi,@object - .size _oonpi,8 - .align 4 -_val_18_0: - .long 0 - .long 1077018624 - .type _val_18_0,@object - .size _val_18_0,8 - .align 4 -_val_16_0: - .long 0 - .long 1076887552 - .type _val_16_0,@object - .size _val_16_0,8 - .align 4 -_PP1: - .long 551 - .long 1072693248 - .long 4267608614 - .long 1061027839 - .long 3690881252 - .long 3200414971 - .long 3933039373 - .long 1046848465 - .long 3246008603 - .long 3189439465 - .long 1689113401 - .long 1037483563 - .type _PP1,@object - .size _PP1,48 - .align 4 -_PP0: - .long 4294966288 - .long 1072693247 - .long 4269912424 - .long 3207725055 - .long 1780799603 - .long 1052554744 - .long 2285933488 - .long 3194113879 - .long 3892950982 - .long 1041746526 - .long 150212775 - .long 3184818833 - .type _PP0,@object - .size _PP0,48 - .align 4 -_QP0: - .long 4294921804 - .long 3212836863 - .long 4153409851 - .long 1056096255 - .long 2226361937 - .long 3196916170 - .long 3849695089 - .long 1044094312 - .long 663042994 - .long 3187124278 - .long 3336948587 - .long 1035486718 - .type _QP0,@object - .size _QP0,48 - .align 4 -_QP1: - .long 4294954956 - .long 1066926079 - .long 4141388976 - .long 3204071423 - .long 1500123100 - .long 1049740228 - .long 3264213437 - .long 3191856517 - .long 1489731078 - .long 1039824630 - .long 1807021260 - .long 3183130166 - .type _QP1,@object - .size _QP1,48 - .align 4 -_val_4_0: - .long 0 - .long 1074790400 - .type _val_4_0,@object - .size _val_4_0,8 - .align 4 -_val_5_0: - .long 0 - .long 1075052544 - .type _val_5_0,@object - .size _val_5_0,8 - .align 4 -_val_8_0: - .long 0 - .long 1075838976 - .type _val_8_0,@object - .size _val_8_0,8 - .align 4 -_val_3_0: - .long 0 - .long 1074266112 - .type _val_3_0,@object - .size _val_3_0,8 - .align 4 -_large_value_32: - .long 1904214016 - .long 4051697664 - .type _large_value_32,@object - .size _large_value_32,8 - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ynl.S b/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ynl.S deleted file mode 100644 index 1c5b35aa9f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/intel64/ynl.S +++ /dev/null @@ -1,95 +0,0 @@ -/* -* Math library -* -* Copyright (C) 2016 Intel Corporation. All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in -* the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Intel Corporation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -* -* Author Name -* History: -* 03-14-2016 Initial version. numerics svn rev. 12864 -*/ - .file "ynl.c" - .text -..TXTST0: -# -- Begin ynl - .text - .align 16,0x90 - .globl ynl -ynl: -# parameter 1: %edi -# parameter 2: 32 + %rsp -..B1.1: - .cfi_startproc -..___tag_value_ynl.1: -..L2: - - pushq %rbp - .cfi_def_cfa_offset 16 - .cfi_offset 6, -16 - subq $16, %rsp - .cfi_def_cfa_offset 32 - movl %edi, %ebp - fldt 32(%rsp) - addq $-16, %rsp - .cfi_def_cfa_offset 48 - lea 16(%rsp), %rdi - fstpt (%rsp) - call __ltoq@PLT -..B1.6: - addq $16, %rsp - .cfi_def_cfa_offset 32 - movl %ebp, %edi - movaps (%rsp), %xmm0 -..___tag_value_ynl.8: - call __ynq@PLT -..___tag_value_ynl.9: -..B1.2: - movaps %xmm0, (%rsp) - lea (%rsp), %rdi - call __qtol@PLT -..B1.7: - addq $16, %rsp - .cfi_def_cfa_offset 16 - .cfi_restore 6 - popq %rbp - .cfi_def_cfa_offset 8 - ret - .align 16,0x90 - .cfi_endproc - .type ynl,@function - .size ynl,.-ynl - .data -# -- End ynl - .data - .section .note.GNU-stack, "" -// -- Begin DWARF2 SEGMENT .eh_frame - .section .eh_frame,"a",@progbits -.eh_frame_seg: - .align 1 -# End diff --git a/sgx-jvm/linux-sgx/external/sgx_libm/makefile b/sgx-jvm/linux-sgx/external/sgx_libm/makefile deleted file mode 100644 index 403adda40c..0000000000 --- a/sgx-jvm/linux-sgx/external/sgx_libm/makefile +++ /dev/null @@ -1,28 +0,0 @@ -ARCH ?= intel64 -.PHONY: all lib clean -ifeq ($(ARCH),ia32) -CFLAGS := -m32 -endif -CFLAGS += -fPIC - -SRC_FILES := $(wildcard $(ARCH)/*.S) -OBJ_FILES := $(SRC_FILES:.S=.o) -STATIC_LIB:= $(ARCH)/libm.a -SHARED_LIB:= $(ARCH)/libm.so - -all: lib - cp $(ARCH)/libm.a libm.a - -lib: $(STATIC_LIB) $(SHARED_LIB) - -%.o: %.S - $(CC) $(CFLAGS) -c $< -o $@ - -$(STATIC_LIB): $(OBJ_FILES) - $(AR) crv $@ $^ - -$(SHARED_LIB): $(OBJ_FILES) - $(CC) $(CFLAGS) -shared -o $@ $^ - -clean: - $(RM) $(OBJ_FILES) $(STATIC_LIB) $(SHARED_LIB) libm.a diff --git a/sgx-jvm/linux-sgx/external/sgxssl/prepare_sgxssl.sh b/sgx-jvm/linux-sgx/external/sgxssl/prepare_sgxssl.sh deleted file mode 100755 index e90cc6e71f..0000000000 --- a/sgx-jvm/linux-sgx/external/sgxssl/prepare_sgxssl.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash -# -# Copyright (C) 2011-2017 Intel Corporation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# - -top_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -openssl_out_dir=$top_dir/openssl_source -openssl_ver_name=openssl-1.1.0f -sgxssl_github_archive=https://github.com/01org/intel-sgx-ssl/archive -sgxssl_ver_name=v1.0 -sgxssl_ver=1.0 -build_script=$top_dir/build_sgxssl.sh -server_url_path=https://www.openssl.org/source/old/1.1.0 -full_openssl_url=$server_url_path/$openssl_ver_name.tar.gz - -if [ ! -f $build_script ]; then - wget $sgxssl_github_archive/$sgxssl_ver_name.zip -P $top_dir --no-check-certificate || exit 1 - unzip -qq $top_dir/$sgxssl_ver_name.zip -d $top_dir || exit 1 - mv $top_dir/intel-sgx-ssl-$sgxssl_ver/* $top_dir || exit 1 - rm $top_dir/$sgxssl_ver_name.zip || exit 1 - rm -rf $top_dir/intel-sgx-ssl-$sgxssl_ver || exit 1 -fi - - -if [ ! -f $openssl_out_dir/$openssl_ver_name.tar.gz ]; then - wget $full_openssl_url -P $openssl_out_dir --no-check-certificate || exit 1 -fi - -$top_dir/build_sgxssl.sh no-clean linux-sgx || exit 1 diff --git a/sgx-jvm/linux-sgx/external/sqlite/src/sqlite3.c b/sgx-jvm/linux-sgx/external/sqlite/src/sqlite3.c deleted file mode 100644 index e877d771cb..0000000000 --- a/sgx-jvm/linux-sgx/external/sqlite/src/sqlite3.c +++ /dev/null @@ -1,137414 +0,0 @@ -/****************************************************************************** -** This file is an amalgamation of many separate C source files from SQLite -** version 3.7.15.1. By combining all the individual C code files into this -** single large file, the entire code can be compiled as a single translation -** unit. This allows many compilers to do optimizations that would not be -** possible if the files were compiled separately. Performance improvements -** of 5% or more are commonly seen when SQLite is compiled as a single -** translation unit. -** -** This file is all you need to compile SQLite. To use SQLite in other -** programs, you need this file and the "sqlite3.h" header file that defines -** the programming interface to the SQLite library. (If you do not have -** the "sqlite3.h" header file at hand, you will find a copy embedded within -** the text of this file. Search for "Begin file sqlite3.h" to find the start -** of the embedded sqlite3.h header file.) Additional code files may be needed -** if you want a wrapper to interface SQLite with your choice of programming -** language. The code for the "sqlite3" command-line shell is also in a -** separate file. This file contains only code for the core SQLite library. -*/ -#define SQLITE_CORE 1 -#define SQLITE_AMALGAMATION 1 -#ifndef SQLITE_PRIVATE -# define SQLITE_PRIVATE static -#endif -#ifndef SQLITE_API -# define SQLITE_API -#endif -/************** Begin file sqliteInt.h ***************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** Internal interface definitions for SQLite. -** -*/ -#ifndef _SQLITEINT_H_ -#define _SQLITEINT_H_ - -/* -** These #defines should enable >2GB file support on POSIX if the -** underlying operating system supports it. If the OS lacks -** large file support, or if the OS is windows, these should be no-ops. -** -** Ticket #2739: The _LARGEFILE_SOURCE macro must appear before any -** system #includes. Hence, this block of code must be the very first -** code in all source files. -** -** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch -** on the compiler command line. This is necessary if you are compiling -** on a recent machine (ex: Red Hat 7.2) but you want your code to work -** on an older machine (ex: Red Hat 6.0). If you compile on Red Hat 7.2 -** without this option, LFS is enable. But LFS does not exist in the kernel -** in Red Hat 6.0, so the code won't work. Hence, for maximum binary -** portability you should omit LFS. -** -** Similar is true for Mac OS X. LFS is only supported on Mac OS X 9 and later. -*/ -#ifndef SQLITE_DISABLE_LFS -# define _LARGE_FILE 1 -# ifndef _FILE_OFFSET_BITS -# define _FILE_OFFSET_BITS 64 -# endif -# define _LARGEFILE_SOURCE 1 -#endif - -/* -** Include the configuration header output by 'configure' if we're using the -** autoconf-based build -*/ -#ifdef _HAVE_SQLITE_CONFIG_H -#include "config.h" -#endif - -/************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/ -/************** Begin file sqliteLimit.h *************************************/ -/* -** 2007 May 7 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** -** This file defines various limits of what SQLite can process. -*/ - -/* -** The maximum length of a TEXT or BLOB in bytes. This also -** limits the size of a row in a table or index. -** -** The hard limit is the ability of a 32-bit signed integer -** to count the size: 2^31-1 or 2147483647. -*/ -#ifndef SQLITE_MAX_LENGTH -# define SQLITE_MAX_LENGTH 1000000000 -#endif - -/* -** This is the maximum number of -** -** * Columns in a table -** * Columns in an index -** * Columns in a view -** * Terms in the SET clause of an UPDATE statement -** * Terms in the result set of a SELECT statement -** * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement. -** * Terms in the VALUES clause of an INSERT statement -** -** The hard upper limit here is 32676. Most database people will -** tell you that in a well-normalized database, you usually should -** not have more than a dozen or so columns in any table. And if -** that is the case, there is no point in having more than a few -** dozen values in any of the other situations described above. -*/ -#ifndef SQLITE_MAX_COLUMN -# define SQLITE_MAX_COLUMN 2000 -#endif - -/* -** The maximum length of a single SQL statement in bytes. -** -** It used to be the case that setting this value to zero would -** turn the limit off. That is no longer true. It is not possible -** to turn this limit off. -*/ -#ifndef SQLITE_MAX_SQL_LENGTH -# define SQLITE_MAX_SQL_LENGTH 1000000000 -#endif - -/* -** The maximum depth of an expression tree. This is limited to -** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might -** want to place more severe limits on the complexity of an -** expression. -** -** A value of 0 used to mean that the limit was not enforced. -** But that is no longer true. The limit is now strictly enforced -** at all times. -*/ -#ifndef SQLITE_MAX_EXPR_DEPTH -# define SQLITE_MAX_EXPR_DEPTH 1000 -#endif - -/* -** The maximum number of terms in a compound SELECT statement. -** The code generator for compound SELECT statements does one -** level of recursion for each term. A stack overflow can result -** if the number of terms is too large. In practice, most SQL -** never has more than 3 or 4 terms. Use a value of 0 to disable -** any limit on the number of terms in a compount SELECT. -*/ -#ifndef SQLITE_MAX_COMPOUND_SELECT -# define SQLITE_MAX_COMPOUND_SELECT 500 -#endif - -/* -** The maximum number of opcodes in a VDBE program. -** Not currently enforced. -*/ -#ifndef SQLITE_MAX_VDBE_OP -# define SQLITE_MAX_VDBE_OP 25000 -#endif - -/* -** The maximum number of arguments to an SQL function. -*/ -#ifndef SQLITE_MAX_FUNCTION_ARG -# define SQLITE_MAX_FUNCTION_ARG 127 -#endif - -/* -** The maximum number of in-memory pages to use for the main database -** table and for temporary tables. The SQLITE_DEFAULT_CACHE_SIZE -*/ -#ifndef SQLITE_DEFAULT_CACHE_SIZE -# define SQLITE_DEFAULT_CACHE_SIZE 2000 -#endif -#ifndef SQLITE_DEFAULT_TEMP_CACHE_SIZE -# define SQLITE_DEFAULT_TEMP_CACHE_SIZE 500 -#endif - -/* -** The default number of frames to accumulate in the log file before -** checkpointing the database in WAL mode. -*/ -#ifndef SQLITE_DEFAULT_WAL_AUTOCHECKPOINT -# define SQLITE_DEFAULT_WAL_AUTOCHECKPOINT 1000 -#endif - -/* -** The maximum number of attached databases. This must be between 0 -** and 62. The upper bound on 62 is because a 64-bit integer bitmap -** is used internally to track attached databases. -*/ -#ifndef SQLITE_MAX_ATTACHED -# define SQLITE_MAX_ATTACHED 10 -#endif - - -/* -** The maximum value of a ?nnn wildcard that the parser will accept. -*/ -#ifndef SQLITE_MAX_VARIABLE_NUMBER -# define SQLITE_MAX_VARIABLE_NUMBER 999 -#endif - -/* Maximum page size. The upper bound on this value is 65536. This a limit -** imposed by the use of 16-bit offsets within each page. -** -** Earlier versions of SQLite allowed the user to change this value at -** compile time. This is no longer permitted, on the grounds that it creates -** a library that is technically incompatible with an SQLite library -** compiled with a different limit. If a process operating on a database -** with a page-size of 65536 bytes crashes, then an instance of SQLite -** compiled with the default page-size limit will not be able to rollback -** the aborted transaction. This could lead to database corruption. -*/ -#ifdef SQLITE_MAX_PAGE_SIZE -# undef SQLITE_MAX_PAGE_SIZE -#endif -#define SQLITE_MAX_PAGE_SIZE 65536 - - -/* -** The default size of a database page. -*/ -#ifndef SQLITE_DEFAULT_PAGE_SIZE -# define SQLITE_DEFAULT_PAGE_SIZE 1024 -#endif -#if SQLITE_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE -# undef SQLITE_DEFAULT_PAGE_SIZE -# define SQLITE_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE -#endif - -/* -** Ordinarily, if no value is explicitly provided, SQLite creates databases -** with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain -** device characteristics (sector-size and atomic write() support), -** SQLite may choose a larger value. This constant is the maximum value -** SQLite will choose on its own. -*/ -#ifndef SQLITE_MAX_DEFAULT_PAGE_SIZE -# define SQLITE_MAX_DEFAULT_PAGE_SIZE 8192 -#endif -#if SQLITE_MAX_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE -# undef SQLITE_MAX_DEFAULT_PAGE_SIZE -# define SQLITE_MAX_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE -#endif - - -/* -** Maximum number of pages in one database file. -** -** This is really just the default value for the max_page_count pragma. -** This value can be lowered (or raised) at run-time using that the -** max_page_count macro. -*/ -#ifndef SQLITE_MAX_PAGE_COUNT -# define SQLITE_MAX_PAGE_COUNT 1073741823 -#endif - -/* -** Maximum length (in bytes) of the pattern in a LIKE or GLOB -** operator. -*/ -#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH -# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000 -#endif - -/* -** Maximum depth of recursion for triggers. -** -** A value of 1 means that a trigger program will not be able to itself -** fire any triggers. A value of 0 means that no trigger programs at all -** may be executed. -*/ -#ifndef SQLITE_MAX_TRIGGER_DEPTH -# define SQLITE_MAX_TRIGGER_DEPTH 1000 -#endif - -/************** End of sqliteLimit.h *****************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ - -/* Disable nuisance warnings on Borland compilers */ -#if defined(__BORLANDC__) -#pragma warn -rch /* unreachable code */ -#pragma warn -ccc /* Condition is always true or false */ -#pragma warn -aus /* Assigned value is never used */ -#pragma warn -csu /* Comparing signed and unsigned */ -#pragma warn -spa /* Suspicious pointer arithmetic */ -#endif - -/* Needed for various definitions... */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif - -/* -** Include standard header files as necessary -*/ -#ifdef HAVE_STDINT_H -#include -#endif -#ifdef HAVE_INTTYPES_H -#include -#endif - -/* -** The following macros are used to cast pointers to integers and -** integers to pointers. The way you do this varies from one compiler -** to the next, so we have developed the following set of #if statements -** to generate appropriate macros for a wide range of compilers. -** -** The correct "ANSI" way to do this is to use the intptr_t type. -** Unfortunately, that typedef is not available on all compilers, or -** if it is available, it requires an #include of specific headers -** that vary from one machine to the next. -** -** Ticket #3860: The llvm-gcc-4.2 compiler from Apple chokes on -** the ((void*)&((char*)0)[X]) construct. But MSVC chokes on ((void*)(X)). -** So we have to define the macros in different ways depending on the -** compiler. -*/ -#if defined(__PTRDIFF_TYPE__) /* This case should work for GCC */ -# define SQLITE_INT_TO_PTR(X) ((void*)(__PTRDIFF_TYPE__)(X)) -# define SQLITE_PTR_TO_INT(X) ((int)(__PTRDIFF_TYPE__)(X)) -#elif !defined(__GNUC__) /* Works for compilers other than LLVM */ -# define SQLITE_INT_TO_PTR(X) ((void*)&((char*)0)[X]) -# define SQLITE_PTR_TO_INT(X) ((int)(((char*)X)-(char*)0)) -#elif defined(HAVE_STDINT_H) /* Use this case if we have ANSI headers */ -# define SQLITE_INT_TO_PTR(X) ((void*)(intptr_t)(X)) -# define SQLITE_PTR_TO_INT(X) ((int)(intptr_t)(X)) -#else /* Generates a warning - but it always works */ -# define SQLITE_INT_TO_PTR(X) ((void*)(X)) -# define SQLITE_PTR_TO_INT(X) ((int)(X)) -#endif - -/* -** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2. -** 0 means mutexes are permanently disable and the library is never -** threadsafe. 1 means the library is serialized which is the highest -** level of threadsafety. 2 means the libary is multithreaded - multiple -** threads can use SQLite as long as no two threads try to use the same -** database connection at the same time. -** -** Older versions of SQLite used an optional THREADSAFE macro. -** We support that for legacy. -*/ -#if !defined(SQLITE_THREADSAFE) -#if defined(THREADSAFE) -# define SQLITE_THREADSAFE THREADSAFE -#else -# define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */ -#endif -#endif - -/* -** Powersafe overwrite is on by default. But can be turned off using -** the -DSQLITE_POWERSAFE_OVERWRITE=0 command-line option. -*/ -#ifndef SQLITE_POWERSAFE_OVERWRITE -# define SQLITE_POWERSAFE_OVERWRITE 1 -#endif - -/* -** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1. -** It determines whether or not the features related to -** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can -** be overridden at runtime using the sqlite3_config() API. -*/ -#if !defined(SQLITE_DEFAULT_MEMSTATUS) -# define SQLITE_DEFAULT_MEMSTATUS 1 -#endif - -/* -** Exactly one of the following macros must be defined in order to -** specify which memory allocation subsystem to use. -** -** SQLITE_SYSTEM_MALLOC // Use normal system malloc() -** SQLITE_WIN32_MALLOC // Use Win32 native heap API -** SQLITE_ZERO_MALLOC // Use a stub allocator that always fails -** SQLITE_MEMDEBUG // Debugging version of system malloc() -** -** On Windows, if the SQLITE_WIN32_MALLOC_VALIDATE macro is defined and the -** assert() macro is enabled, each call into the Win32 native heap subsystem -** will cause HeapValidate to be called. If heap validation should fail, an -** assertion will be triggered. -** -** (Historical note: There used to be several other options, but we've -** pared it down to just these three.) -** -** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as -** the default. -*/ -#if defined(SQLITE_SYSTEM_MALLOC) \ - + defined(SQLITE_WIN32_MALLOC) \ - + defined(SQLITE_ZERO_MALLOC) \ - + defined(SQLITE_MEMDEBUG)>1 -# error "Two or more of the following compile-time configuration options\ - are defined but at most one is allowed:\ - SQLITE_SYSTEM_MALLOC, SQLITE_WIN32_MALLOC, SQLITE_MEMDEBUG,\ - SQLITE_ZERO_MALLOC" -#endif -#if defined(SQLITE_SYSTEM_MALLOC) \ - + defined(SQLITE_WIN32_MALLOC) \ - + defined(SQLITE_ZERO_MALLOC) \ - + defined(SQLITE_MEMDEBUG)==0 -# define SQLITE_SYSTEM_MALLOC 1 -#endif - -/* -** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the -** sizes of memory allocations below this value where possible. -*/ -#if !defined(SQLITE_MALLOC_SOFT_LIMIT) -# define SQLITE_MALLOC_SOFT_LIMIT 1024 -#endif - -/* -** We need to define _XOPEN_SOURCE as follows in order to enable -** recursive mutexes on most Unix systems. But Mac OS X is different. -** The _XOPEN_SOURCE define causes problems for Mac OS X we are told, -** so it is omitted there. See ticket #2673. -** -** Later we learn that _XOPEN_SOURCE is poorly or incorrectly -** implemented on some systems. So we avoid defining it at all -** if it is already defined or if it is unneeded because we are -** not doing a threadsafe build. Ticket #2681. -** -** See also ticket #2741. -*/ -#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE -# define _XOPEN_SOURCE 500 /* Needed to enable pthread recursive mutexes */ -#endif - -/* -** The TCL headers are only needed when compiling the TCL bindings. -*/ -#if defined(SQLITE_TCL) || defined(TCLSH) -# include -#endif - -/* -** NDEBUG and SQLITE_DEBUG are opposites. It should always be true that -** defined(NDEBUG)==!defined(SQLITE_DEBUG). If this is not currently true, -** make it true by defining or undefining NDEBUG. -** -** Setting NDEBUG makes the code smaller and run faster by disabling the -** number assert() statements in the code. So we want the default action -** to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG -** is set. Thus NDEBUG becomes an opt-in rather than an opt-out -** feature. -*/ -#if !defined(NDEBUG) && !defined(SQLITE_DEBUG) -# define NDEBUG 1 -#endif -#if defined(NDEBUG) && defined(SQLITE_DEBUG) -# undef NDEBUG -#endif - -/* -** The testcase() macro is used to aid in coverage testing. When -** doing coverage testing, the condition inside the argument to -** testcase() must be evaluated both true and false in order to -** get full branch coverage. The testcase() macro is inserted -** to help ensure adequate test coverage in places where simple -** condition/decision coverage is inadequate. For example, testcase() -** can be used to make sure boundary values are tested. For -** bitmask tests, testcase() can be used to make sure each bit -** is significant and used at least once. On switch statements -** where multiple cases go to the same block of code, testcase() -** can insure that all cases are evaluated. -** -*/ -#ifdef SQLITE_COVERAGE_TEST -SQLITE_PRIVATE void sqlite3Coverage(int); -# define testcase(X) if( X ){ sqlite3Coverage(__LINE__); } -#else -# define testcase(X) -#endif - -/* -** The TESTONLY macro is used to enclose variable declarations or -** other bits of code that are needed to support the arguments -** within testcase() and assert() macros. -*/ -#if !defined(NDEBUG) || defined(SQLITE_COVERAGE_TEST) -# define TESTONLY(X) X -#else -# define TESTONLY(X) -#endif - -/* -** Sometimes we need a small amount of code such as a variable initialization -** to setup for a later assert() statement. We do not want this code to -** appear when assert() is disabled. The following macro is therefore -** used to contain that setup code. The "VVA" acronym stands for -** "Verification, Validation, and Accreditation". In other words, the -** code within VVA_ONLY() will only run during verification processes. -*/ -#ifndef NDEBUG -# define VVA_ONLY(X) X -#else -# define VVA_ONLY(X) -#endif - -/* -** The ALWAYS and NEVER macros surround boolean expressions which -** are intended to always be true or false, respectively. Such -** expressions could be omitted from the code completely. But they -** are included in a few cases in order to enhance the resilience -** of SQLite to unexpected behavior - to make the code "self-healing" -** or "ductile" rather than being "brittle" and crashing at the first -** hint of unplanned behavior. -** -** In other words, ALWAYS and NEVER are added for defensive code. -** -** When doing coverage testing ALWAYS and NEVER are hard-coded to -** be true and false so that the unreachable code then specify will -** not be counted as untested code. -*/ -#if defined(SQLITE_COVERAGE_TEST) -# define ALWAYS(X) (1) -# define NEVER(X) (0) -#elif !defined(NDEBUG) -# define ALWAYS(X) ((X)?1:(assert(0),0)) -# define NEVER(X) ((X)?(assert(0),1):0) -#else -# define ALWAYS(X) (X) -# define NEVER(X) (X) -#endif - -/* -** Return true (non-zero) if the input is a integer that is too large -** to fit in 32-bits. This macro is used inside of various testcase() -** macros to verify that we have tested SQLite for large-file support. -*/ -#define IS_BIG_INT(X) (((X)&~(i64)0xffffffff)!=0) - -/* -** The macro unlikely() is a hint that surrounds a boolean -** expression that is usually false. Macro likely() surrounds -** a boolean expression that is usually true. GCC is able to -** use these hints to generate better code, sometimes. -*/ -#if defined(__GNUC__) && 0 -# define likely(X) __builtin_expect((X),1) -# define unlikely(X) __builtin_expect((X),0) -#else -# define likely(X) !!(X) -# define unlikely(X) !!(X) -#endif - -/************** Include sqlite3.h in the middle of sqliteInt.h ***************/ -/************** Begin file sqlite3.h *****************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the SQLite library -** presents to client programs. If a C-function, structure, datatype, -** or constant definition does not appear in this file, then it is -** not a published API of SQLite, is subject to change without -** notice, and should not be referenced by programs that use SQLite. -** -** Some of the definitions that are in this file are marked as -** "experimental". Experimental interfaces are normally new -** features recently added to SQLite. We do not anticipate changes -** to experimental interfaces but reserve the right to make minor changes -** if experience from use "in the wild" suggest such changes are prudent. -** -** The official C-language API documentation for SQLite is derived -** from comments in this file. This file is the authoritative source -** on how SQLite interfaces are suppose to operate. -** -** The name of this file under configuration management is "sqlite.h.in". -** The makefile makes some minor changes to this file (such as inserting -** the version number) and changes its name to "sqlite3.h" as -** part of the build process. -*/ -#ifndef _SQLITE3_H_ -#define _SQLITE3_H_ -#include /* Needed for the definition of va_list */ - -/* -** Make sure we can call this stuff from C++. -*/ -#if 0 -extern "C" { -#endif - - -/* -** Add the ability to override 'extern' -*/ -#ifndef SQLITE_EXTERN -# define SQLITE_EXTERN extern -#endif - -#ifndef SQLITE_API -# define SQLITE_API -#endif - - -/* -** These no-op macros are used in front of interfaces to mark those -** interfaces as either deprecated or experimental. New applications -** should not use deprecated interfaces - they are support for backwards -** compatibility only. Application writers should be aware that -** experimental interfaces are subject to change in point releases. -** -** These macros used to resolve to various kinds of compiler magic that -** would generate warning messages when they were used. But that -** compiler magic ended up generating such a flurry of bug reports -** that we have taken it all out and gone back to using simple -** noop macros. -*/ -#define SQLITE_DEPRECATED -#define SQLITE_EXPERIMENTAL - -/* -** Ensure these symbols were not defined by some previous header file. -*/ -#ifdef SQLITE_VERSION -# undef SQLITE_VERSION -#endif -#ifdef SQLITE_VERSION_NUMBER -# undef SQLITE_VERSION_NUMBER -#endif - -/* -** CAPI3REF: Compile-Time Library Version Numbers -** -** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header -** evaluates to a string literal that is the SQLite version in the -** format "X.Y.Z" where X is the major version number (always 3 for -** SQLite3) and Y is the minor version number and Z is the release number.)^ -** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer -** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same -** numbers used in [SQLITE_VERSION].)^ -** The SQLITE_VERSION_NUMBER for any given release of SQLite will also -** be larger than the release from which it is derived. Either Y will -** be held constant and Z will be incremented or else Y will be incremented -** and Z will be reset to zero. -** -** Since version 3.6.18, SQLite source code has been stored in the -** Fossil configuration management -** system. ^The SQLITE_SOURCE_ID macro evaluates to -** a string which identifies a particular check-in of SQLite -** within its configuration management system. ^The SQLITE_SOURCE_ID -** string contains the date and time of the check-in (UTC) and an SHA1 -** hash of the entire source tree. -** -** See also: [sqlite3_libversion()], -** [sqlite3_libversion_number()], [sqlite3_sourceid()], -** [sqlite_version()] and [sqlite_source_id()]. -*/ -#define SQLITE_VERSION "3.7.15.1" -#define SQLITE_VERSION_NUMBER 3007015 -#define SQLITE_SOURCE_ID "2012-12-19 20:39:10 6b85b767d0ff7975146156a99ad673f2c1a23318" - -/* -** CAPI3REF: Run-Time Library Version Numbers -** KEYWORDS: sqlite3_version, sqlite3_sourceid -** -** These interfaces provide the same information as the [SQLITE_VERSION], -** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros -** but are associated with the library instead of the header file. ^(Cautious -** programmers might include assert() statements in their application to -** verify that values returned by these interfaces match the macros in -** the header, and thus insure that the application is -** compiled with matching library and header files. -** -**

-** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
-** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
-** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
-** 
)^ -** -** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION] -** macro. ^The sqlite3_libversion() function returns a pointer to the -** to the sqlite3_version[] string constant. The sqlite3_libversion() -** function is provided for use in DLLs since DLL users usually do not have -** direct access to string constants within the DLL. ^The -** sqlite3_libversion_number() function returns an integer equal to -** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns -** a pointer to a string constant whose value is the same as the -** [SQLITE_SOURCE_ID] C preprocessor macro. -** -** See also: [sqlite_version()] and [sqlite_source_id()]. -*/ -SQLITE_API const char sqlite3_version[] = SQLITE_VERSION; -SQLITE_API const char *sqlite3_libversion(void); -SQLITE_API const char *sqlite3_sourceid(void); -SQLITE_API int sqlite3_libversion_number(void); - -/* -** CAPI3REF: Run-Time Library Compilation Options Diagnostics -** -** ^The sqlite3_compileoption_used() function returns 0 or 1 -** indicating whether the specified option was defined at -** compile time. ^The SQLITE_ prefix may be omitted from the -** option name passed to sqlite3_compileoption_used(). -** -** ^The sqlite3_compileoption_get() function allows iterating -** over the list of options that were defined at compile time by -** returning the N-th compile time option string. ^If N is out of range, -** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_ -** prefix is omitted from any strings returned by -** sqlite3_compileoption_get(). -** -** ^Support for the diagnostic functions sqlite3_compileoption_used() -** and sqlite3_compileoption_get() may be omitted by specifying the -** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time. -** -** See also: SQL functions [sqlite_compileoption_used()] and -** [sqlite_compileoption_get()] and the [compile_options pragma]. -*/ -#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS -SQLITE_API int sqlite3_compileoption_used(const char *zOptName); -SQLITE_API const char *sqlite3_compileoption_get(int N); -#endif - -/* -** CAPI3REF: Test To See If The Library Is Threadsafe -** -** ^The sqlite3_threadsafe() function returns zero if and only if -** SQLite was compiled with mutexing code omitted due to the -** [SQLITE_THREADSAFE] compile-time option being set to 0. -** -** SQLite can be compiled with or without mutexes. When -** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes -** are enabled and SQLite is threadsafe. When the -** [SQLITE_THREADSAFE] macro is 0, -** the mutexes are omitted. Without the mutexes, it is not safe -** to use SQLite concurrently from more than one thread. -** -** Enabling mutexes incurs a measurable performance penalty. -** So if speed is of utmost importance, it makes sense to disable -** the mutexes. But for maximum safety, mutexes should be enabled. -** ^The default behavior is for mutexes to be enabled. -** -** This interface can be used by an application to make sure that the -** version of SQLite that it is linking against was compiled with -** the desired setting of the [SQLITE_THREADSAFE] macro. -** -** This interface only reports on the compile-time mutex setting -** of the [SQLITE_THREADSAFE] flag. If SQLite is compiled with -** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but -** can be fully or partially disabled using a call to [sqlite3_config()] -** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD], -** or [SQLITE_CONFIG_MUTEX]. ^(The return value of the -** sqlite3_threadsafe() function shows only the compile-time setting of -** thread safety, not any run-time changes to that setting made by -** sqlite3_config(). In other words, the return value from sqlite3_threadsafe() -** is unchanged by calls to sqlite3_config().)^ -** -** See the [threading mode] documentation for additional information. -*/ -SQLITE_API int sqlite3_threadsafe(void); - -/* -** CAPI3REF: Database Connection Handle -** KEYWORDS: {database connection} {database connections} -** -** Each open SQLite database is represented by a pointer to an instance of -** the opaque structure named "sqlite3". It is useful to think of an sqlite3 -** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and -** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] -** and [sqlite3_close_v2()] are its destructors. There are many other -** interfaces (such as -** [sqlite3_prepare_v2()], [sqlite3_create_function()], and -** [sqlite3_busy_timeout()] to name but three) that are methods on an -** sqlite3 object. -*/ -typedef struct sqlite3 sqlite3; - -/* -** CAPI3REF: 64-Bit Integer Types -** KEYWORDS: sqlite_int64 sqlite_uint64 -** -** Because there is no cross-platform way to specify 64-bit integer types -** SQLite includes typedefs for 64-bit signed and unsigned integers. -** -** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions. -** The sqlite_int64 and sqlite_uint64 types are supported for backwards -** compatibility only. -** -** ^The sqlite3_int64 and sqlite_int64 types can store integer values -** between -9223372036854775808 and +9223372036854775807 inclusive. ^The -** sqlite3_uint64 and sqlite_uint64 types can store integer values -** between 0 and +18446744073709551615 inclusive. -*/ -#ifdef SQLITE_INT64_TYPE - typedef SQLITE_INT64_TYPE sqlite_int64; - typedef unsigned SQLITE_INT64_TYPE sqlite_uint64; -#elif defined(_MSC_VER) || defined(__BORLANDC__) - typedef __int64 sqlite_int64; - typedef unsigned __int64 sqlite_uint64; -#else - typedef long long int sqlite_int64; - typedef unsigned long long int sqlite_uint64; -#endif -typedef sqlite_int64 sqlite3_int64; -typedef sqlite_uint64 sqlite3_uint64; - -/* -** If compiling for a processor that lacks floating point support, -** substitute integer for floating-point. -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# define double sqlite3_int64 -#endif - -/* -** CAPI3REF: Closing A Database Connection -** -** ^The sqlite3_close() and sqlite3_close_v2() routines are destructors -** for the [sqlite3] object. -** ^Calls to sqlite3_close() and sqlite3_close_v2() return SQLITE_OK if -** the [sqlite3] object is successfully destroyed and all associated -** resources are deallocated. -** -** ^If the database connection is associated with unfinalized prepared -** statements or unfinished sqlite3_backup objects then sqlite3_close() -** will leave the database connection open and return [SQLITE_BUSY]. -** ^If sqlite3_close_v2() is called with unfinalized prepared statements -** and unfinished sqlite3_backups, then the database connection becomes -** an unusable "zombie" which will automatically be deallocated when the -** last prepared statement is finalized or the last sqlite3_backup is -** finished. The sqlite3_close_v2() interface is intended for use with -** host languages that are garbage collected, and where the order in which -** destructors are called is arbitrary. -** -** Applications should [sqlite3_finalize | finalize] all [prepared statements], -** [sqlite3_blob_close | close] all [BLOB handles], and -** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated -** with the [sqlite3] object prior to attempting to close the object. ^If -** sqlite3_close() is called on a [database connection] that still has -** outstanding [prepared statements], [BLOB handles], and/or -** [sqlite3_backup] objects then it returns SQLITE_OK but the deallocation -** of resources is deferred until all [prepared statements], [BLOB handles], -** and [sqlite3_backup] objects are also destroyed. -** -** ^If an [sqlite3] object is destroyed while a transaction is open, -** the transaction is automatically rolled back. -** -** The C parameter to [sqlite3_close(C)] and [sqlite3_close_v2(C)] -** must be either a NULL -** pointer or an [sqlite3] object pointer obtained -** from [sqlite3_open()], [sqlite3_open16()], or -** [sqlite3_open_v2()], and not previously closed. -** ^Calling sqlite3_close() or sqlite3_close_v2() with a NULL pointer -** argument is a harmless no-op. -*/ -SQLITE_API int sqlite3_close(sqlite3*); -SQLITE_API int sqlite3_close_v2(sqlite3*); - -/* -** The type for a callback function. -** This is legacy and deprecated. It is included for historical -** compatibility and is not documented. -*/ -typedef int (*sqlite3_callback)(void*,int,char**, char**); - -/* -** CAPI3REF: One-Step Query Execution Interface -** -** The sqlite3_exec() interface is a convenience wrapper around -** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()], -** that allows an application to run multiple statements of SQL -** without having to use a lot of C code. -** -** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, -** semicolon-separate SQL statements passed into its 2nd argument, -** in the context of the [database connection] passed in as its 1st -** argument. ^If the callback function of the 3rd argument to -** sqlite3_exec() is not NULL, then it is invoked for each result row -** coming out of the evaluated SQL statements. ^The 4th argument to -** sqlite3_exec() is relayed through to the 1st argument of each -** callback invocation. ^If the callback pointer to sqlite3_exec() -** is NULL, then no callback is ever invoked and result rows are -** ignored. -** -** ^If an error occurs while evaluating the SQL statements passed into -** sqlite3_exec(), then execution of the current statement stops and -** subsequent statements are skipped. ^If the 5th parameter to sqlite3_exec() -** is not NULL then any error message is written into memory obtained -** from [sqlite3_malloc()] and passed back through the 5th parameter. -** To avoid memory leaks, the application should invoke [sqlite3_free()] -** on error message strings returned through the 5th parameter of -** of sqlite3_exec() after the error message string is no longer needed. -** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors -** occur, then sqlite3_exec() sets the pointer in its 5th parameter to -** NULL before returning. -** -** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec() -** routine returns SQLITE_ABORT without invoking the callback again and -** without running any subsequent SQL statements. -** -** ^The 2nd argument to the sqlite3_exec() callback function is the -** number of columns in the result. ^The 3rd argument to the sqlite3_exec() -** callback is an array of pointers to strings obtained as if from -** [sqlite3_column_text()], one for each column. ^If an element of a -** result row is NULL then the corresponding string pointer for the -** sqlite3_exec() callback is a NULL pointer. ^The 4th argument to the -** sqlite3_exec() callback is an array of pointers to strings where each -** entry represents the name of corresponding result column as obtained -** from [sqlite3_column_name()]. -** -** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer -** to an empty string, or a pointer that contains only whitespace and/or -** SQL comments, then no SQL statements are evaluated and the database -** is not changed. -** -** Restrictions: -** -**
    -**
  • The application must insure that the 1st parameter to sqlite3_exec() -** is a valid and open [database connection]. -**
  • The application must not close [database connection] specified by -** the 1st parameter to sqlite3_exec() while sqlite3_exec() is running. -**
  • The application must not modify the SQL statement text passed into -** the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running. -**
-*/ -SQLITE_API int sqlite3_exec( - sqlite3*, /* An open database */ - const char *sql, /* SQL to be evaluated */ - int (*callback)(void*,int,char**,char**), /* Callback function */ - void *, /* 1st argument to callback */ - char **errmsg /* Error msg written here */ -); - -/* -** CAPI3REF: Result Codes -** KEYWORDS: SQLITE_OK {error code} {error codes} -** KEYWORDS: {result code} {result codes} -** -** Many SQLite functions return an integer result code from the set shown -** here in order to indicate success or failure. -** -** New error codes may be added in future versions of SQLite. -** -** See also: [SQLITE_IOERR_READ | extended result codes], -** [sqlite3_vtab_on_conflict()] [SQLITE_ROLLBACK | result codes]. -*/ -#define SQLITE_OK 0 /* Successful result */ -/* beginning-of-error-codes */ -#define SQLITE_ERROR 1 /* SQL error or missing database */ -#define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */ -#define SQLITE_PERM 3 /* Access permission denied */ -#define SQLITE_ABORT 4 /* Callback routine requested an abort */ -#define SQLITE_BUSY 5 /* The database file is locked */ -#define SQLITE_LOCKED 6 /* A table in the database is locked */ -#define SQLITE_NOMEM 7 /* A malloc() failed */ -#define SQLITE_READONLY 8 /* Attempt to write a readonly database */ -#define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ -#define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ -#define SQLITE_CORRUPT 11 /* The database disk image is malformed */ -#define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */ -#define SQLITE_FULL 13 /* Insertion failed because database is full */ -#define SQLITE_CANTOPEN 14 /* Unable to open the database file */ -#define SQLITE_PROTOCOL 15 /* Database lock protocol error */ -#define SQLITE_EMPTY 16 /* Database is empty */ -#define SQLITE_SCHEMA 17 /* The database schema changed */ -#define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ -#define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ -#define SQLITE_MISMATCH 20 /* Data type mismatch */ -#define SQLITE_MISUSE 21 /* Library used incorrectly */ -#define SQLITE_NOLFS 22 /* Uses OS features not supported on host */ -#define SQLITE_AUTH 23 /* Authorization denied */ -#define SQLITE_FORMAT 24 /* Auxiliary database format error */ -#define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ -#define SQLITE_NOTADB 26 /* File opened that is not a database file */ -#define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ -#define SQLITE_DONE 101 /* sqlite3_step() has finished executing */ -/* end-of-error-codes */ - -/* -** CAPI3REF: Extended Result Codes -** KEYWORDS: {extended error code} {extended error codes} -** KEYWORDS: {extended result code} {extended result codes} -** -** In its default configuration, SQLite API routines return one of 26 integer -** [SQLITE_OK | result codes]. However, experience has shown that many of -** these result codes are too coarse-grained. They do not provide as -** much information about problems as programmers might like. In an effort to -** address this, newer versions of SQLite (version 3.3.8 and later) include -** support for additional result codes that provide more detailed information -** about errors. The extended result codes are enabled or disabled -** on a per database connection basis using the -** [sqlite3_extended_result_codes()] API. -** -** Some of the available extended result codes are listed here. -** One may expect the number of extended result codes will be expand -** over time. Software that uses extended result codes should expect -** to see new result codes in future releases of SQLite. -** -** The SQLITE_OK result code will never be extended. It will always -** be exactly zero. -*/ -#define SQLITE_IOERR_READ (SQLITE_IOERR | (1<<8)) -#define SQLITE_IOERR_SHORT_READ (SQLITE_IOERR | (2<<8)) -#define SQLITE_IOERR_WRITE (SQLITE_IOERR | (3<<8)) -#define SQLITE_IOERR_FSYNC (SQLITE_IOERR | (4<<8)) -#define SQLITE_IOERR_DIR_FSYNC (SQLITE_IOERR | (5<<8)) -#define SQLITE_IOERR_TRUNCATE (SQLITE_IOERR | (6<<8)) -#define SQLITE_IOERR_FSTAT (SQLITE_IOERR | (7<<8)) -#define SQLITE_IOERR_UNLOCK (SQLITE_IOERR | (8<<8)) -#define SQLITE_IOERR_RDLOCK (SQLITE_IOERR | (9<<8)) -#define SQLITE_IOERR_DELETE (SQLITE_IOERR | (10<<8)) -#define SQLITE_IOERR_BLOCKED (SQLITE_IOERR | (11<<8)) -#define SQLITE_IOERR_NOMEM (SQLITE_IOERR | (12<<8)) -#define SQLITE_IOERR_ACCESS (SQLITE_IOERR | (13<<8)) -#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8)) -#define SQLITE_IOERR_LOCK (SQLITE_IOERR | (15<<8)) -#define SQLITE_IOERR_CLOSE (SQLITE_IOERR | (16<<8)) -#define SQLITE_IOERR_DIR_CLOSE (SQLITE_IOERR | (17<<8)) -#define SQLITE_IOERR_SHMOPEN (SQLITE_IOERR | (18<<8)) -#define SQLITE_IOERR_SHMSIZE (SQLITE_IOERR | (19<<8)) -#define SQLITE_IOERR_SHMLOCK (SQLITE_IOERR | (20<<8)) -#define SQLITE_IOERR_SHMMAP (SQLITE_IOERR | (21<<8)) -#define SQLITE_IOERR_SEEK (SQLITE_IOERR | (22<<8)) -#define SQLITE_IOERR_DELETE_NOENT (SQLITE_IOERR | (23<<8)) -#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8)) -#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8)) -#define SQLITE_CANTOPEN_NOTEMPDIR (SQLITE_CANTOPEN | (1<<8)) -#define SQLITE_CANTOPEN_ISDIR (SQLITE_CANTOPEN | (2<<8)) -#define SQLITE_CANTOPEN_FULLPATH (SQLITE_CANTOPEN | (3<<8)) -#define SQLITE_CORRUPT_VTAB (SQLITE_CORRUPT | (1<<8)) -#define SQLITE_READONLY_RECOVERY (SQLITE_READONLY | (1<<8)) -#define SQLITE_READONLY_CANTLOCK (SQLITE_READONLY | (2<<8)) -#define SQLITE_ABORT_ROLLBACK (SQLITE_ABORT | (2<<8)) - -/* -** CAPI3REF: Flags For File Open Operations -** -** These bit values are intended for use in the -** 3rd parameter to the [sqlite3_open_v2()] interface and -** in the 4th parameter to the [sqlite3_vfs.xOpen] method. -*/ -#define SQLITE_OPEN_READONLY 0x00000001 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_READWRITE 0x00000002 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */ -#define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ -#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */ -#define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_MEMORY 0x00000080 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ -#define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ -#define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ -#define SQLITE_OPEN_MAIN_JOURNAL 0x00000800 /* VFS only */ -#define SQLITE_OPEN_TEMP_JOURNAL 0x00001000 /* VFS only */ -#define SQLITE_OPEN_SUBJOURNAL 0x00002000 /* VFS only */ -#define SQLITE_OPEN_MASTER_JOURNAL 0x00004000 /* VFS only */ -#define SQLITE_OPEN_NOMUTEX 0x00008000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_FULLMUTEX 0x00010000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_SHAREDCACHE 0x00020000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_PRIVATECACHE 0x00040000 /* Ok for sqlite3_open_v2() */ -#define SQLITE_OPEN_WAL 0x00080000 /* VFS only */ - -/* Reserved: 0x00F00000 */ - -/* -** CAPI3REF: Device Characteristics -** -** The xDeviceCharacteristics method of the [sqlite3_io_methods] -** object returns an integer which is a vector of these -** bit values expressing I/O characteristics of the mass storage -** device that holds the file that the [sqlite3_io_methods] -** refers to. -** -** The SQLITE_IOCAP_ATOMIC property means that all writes of -** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values -** mean that writes of blocks that are nnn bytes in size and -** are aligned to an address which is an integer multiple of -** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means -** that when data is appended to a file, the data is appended -** first then the size of the file is extended, never the other -** way around. The SQLITE_IOCAP_SEQUENTIAL property means that -** information is written to disk in the same order as calls -** to xWrite(). The SQLITE_IOCAP_POWERSAFE_OVERWRITE property means that -** after reboot following a crash or power loss, the only bytes in a -** file that were written at the application level might have changed -** and that adjacent bytes, even bytes within the same sector are -** guaranteed to be unchanged. -*/ -#define SQLITE_IOCAP_ATOMIC 0x00000001 -#define SQLITE_IOCAP_ATOMIC512 0x00000002 -#define SQLITE_IOCAP_ATOMIC1K 0x00000004 -#define SQLITE_IOCAP_ATOMIC2K 0x00000008 -#define SQLITE_IOCAP_ATOMIC4K 0x00000010 -#define SQLITE_IOCAP_ATOMIC8K 0x00000020 -#define SQLITE_IOCAP_ATOMIC16K 0x00000040 -#define SQLITE_IOCAP_ATOMIC32K 0x00000080 -#define SQLITE_IOCAP_ATOMIC64K 0x00000100 -#define SQLITE_IOCAP_SAFE_APPEND 0x00000200 -#define SQLITE_IOCAP_SEQUENTIAL 0x00000400 -#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN 0x00000800 -#define SQLITE_IOCAP_POWERSAFE_OVERWRITE 0x00001000 - -/* -** CAPI3REF: File Locking Levels -** -** SQLite uses one of these integer values as the second -** argument to calls it makes to the xLock() and xUnlock() methods -** of an [sqlite3_io_methods] object. -*/ -#define SQLITE_LOCK_NONE 0 -#define SQLITE_LOCK_SHARED 1 -#define SQLITE_LOCK_RESERVED 2 -#define SQLITE_LOCK_PENDING 3 -#define SQLITE_LOCK_EXCLUSIVE 4 - -/* -** CAPI3REF: Synchronization Type Flags -** -** When SQLite invokes the xSync() method of an -** [sqlite3_io_methods] object it uses a combination of -** these integer values as the second argument. -** -** When the SQLITE_SYNC_DATAONLY flag is used, it means that the -** sync operation only needs to flush data to mass storage. Inode -** information need not be flushed. If the lower four bits of the flag -** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics. -** If the lower four bits equal SQLITE_SYNC_FULL, that means -** to use Mac OS X style fullsync instead of fsync(). -** -** Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags -** with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL -** settings. The [synchronous pragma] determines when calls to the -** xSync VFS method occur and applies uniformly across all platforms. -** The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how -** energetic or rigorous or forceful the sync operations are and -** only make a difference on Mac OSX for the default SQLite code. -** (Third-party VFS implementations might also make the distinction -** between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the -** operating systems natively supported by SQLite, only Mac OSX -** cares about the difference.) -*/ -#define SQLITE_SYNC_NORMAL 0x00002 -#define SQLITE_SYNC_FULL 0x00003 -#define SQLITE_SYNC_DATAONLY 0x00010 - -/* -** CAPI3REF: OS Interface Open File Handle -** -** An [sqlite3_file] object represents an open file in the -** [sqlite3_vfs | OS interface layer]. Individual OS interface -** implementations will -** want to subclass this object by appending additional fields -** for their own use. The pMethods entry is a pointer to an -** [sqlite3_io_methods] object that defines methods for performing -** I/O operations on the open file. -*/ -typedef struct sqlite3_file sqlite3_file; -struct sqlite3_file { - const struct sqlite3_io_methods *pMethods; /* Methods for an open file */ -}; - -/* -** CAPI3REF: OS Interface File Virtual Methods Object -** -** Every file opened by the [sqlite3_vfs.xOpen] method populates an -** [sqlite3_file] object (or, more commonly, a subclass of the -** [sqlite3_file] object) with a pointer to an instance of this object. -** This object defines the methods used to perform various operations -** against the open file represented by the [sqlite3_file] object. -** -** If the [sqlite3_vfs.xOpen] method sets the sqlite3_file.pMethods element -** to a non-NULL pointer, then the sqlite3_io_methods.xClose method -** may be invoked even if the [sqlite3_vfs.xOpen] reported that it failed. The -** only way to prevent a call to xClose following a failed [sqlite3_vfs.xOpen] -** is for the [sqlite3_vfs.xOpen] to set the sqlite3_file.pMethods element -** to NULL. -** -** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or -** [SQLITE_SYNC_FULL]. The first choice is the normal fsync(). -** The second choice is a Mac OS X style fullsync. The [SQLITE_SYNC_DATAONLY] -** flag may be ORed in to indicate that only the data of the file -** and not its inode needs to be synced. -** -** The integer values to xLock() and xUnlock() are one of -**
    -**
  • [SQLITE_LOCK_NONE], -**
  • [SQLITE_LOCK_SHARED], -**
  • [SQLITE_LOCK_RESERVED], -**
  • [SQLITE_LOCK_PENDING], or -**
  • [SQLITE_LOCK_EXCLUSIVE]. -**
-** xLock() increases the lock. xUnlock() decreases the lock. -** The xCheckReservedLock() method checks whether any database connection, -** either in this process or in some other process, is holding a RESERVED, -** PENDING, or EXCLUSIVE lock on the file. It returns true -** if such a lock exists and false otherwise. -** -** The xFileControl() method is a generic interface that allows custom -** VFS implementations to directly control an open file using the -** [sqlite3_file_control()] interface. The second "op" argument is an -** integer opcode. The third argument is a generic pointer intended to -** point to a structure that may contain arguments or space in which to -** write return values. Potential uses for xFileControl() might be -** functions to enable blocking locks with timeouts, to change the -** locking strategy (for example to use dot-file locks), to inquire -** about the status of a lock, or to break stale locks. The SQLite -** core reserves all opcodes less than 100 for its own use. -** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available. -** Applications that define a custom xFileControl method should use opcodes -** greater than 100 to avoid conflicts. VFS implementations should -** return [SQLITE_NOTFOUND] for file control opcodes that they do not -** recognize. -** -** The xSectorSize() method returns the sector size of the -** device that underlies the file. The sector size is the -** minimum write that can be performed without disturbing -** other bytes in the file. The xDeviceCharacteristics() -** method returns a bit vector describing behaviors of the -** underlying device: -** -**
    -**
  • [SQLITE_IOCAP_ATOMIC] -**
  • [SQLITE_IOCAP_ATOMIC512] -**
  • [SQLITE_IOCAP_ATOMIC1K] -**
  • [SQLITE_IOCAP_ATOMIC2K] -**
  • [SQLITE_IOCAP_ATOMIC4K] -**
  • [SQLITE_IOCAP_ATOMIC8K] -**
  • [SQLITE_IOCAP_ATOMIC16K] -**
  • [SQLITE_IOCAP_ATOMIC32K] -**
  • [SQLITE_IOCAP_ATOMIC64K] -**
  • [SQLITE_IOCAP_SAFE_APPEND] -**
  • [SQLITE_IOCAP_SEQUENTIAL] -**
-** -** The SQLITE_IOCAP_ATOMIC property means that all writes of -** any size are atomic. The SQLITE_IOCAP_ATOMICnnn values -** mean that writes of blocks that are nnn bytes in size and -** are aligned to an address which is an integer multiple of -** nnn are atomic. The SQLITE_IOCAP_SAFE_APPEND value means -** that when data is appended to a file, the data is appended -** first then the size of the file is extended, never the other -** way around. The SQLITE_IOCAP_SEQUENTIAL property means that -** information is written to disk in the same order as calls -** to xWrite(). -** -** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill -** in the unread portions of the buffer with zeros. A VFS that -** fails to zero-fill short reads might seem to work. However, -** failure to zero-fill short reads will eventually lead to -** database corruption. -*/ -typedef struct sqlite3_io_methods sqlite3_io_methods; -struct sqlite3_io_methods { - int iVersion; - int (*xClose)(sqlite3_file*); - int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst); - int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst); - int (*xTruncate)(sqlite3_file*, sqlite3_int64 size); - int (*xSync)(sqlite3_file*, int flags); - int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize); - int (*xLock)(sqlite3_file*, int); - int (*xUnlock)(sqlite3_file*, int); - int (*xCheckReservedLock)(sqlite3_file*, int *pResOut); - int (*xFileControl)(sqlite3_file*, int op, void *pArg); - int (*xSectorSize)(sqlite3_file*); - int (*xDeviceCharacteristics)(sqlite3_file*); - /* Methods above are valid for version 1 */ - int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**); - int (*xShmLock)(sqlite3_file*, int offset, int n, int flags); - void (*xShmBarrier)(sqlite3_file*); - int (*xShmUnmap)(sqlite3_file*, int deleteFlag); - /* Methods above are valid for version 2 */ - /* Additional methods may be added in future releases */ -}; - -/* -** CAPI3REF: Standard File Control Opcodes -** -** These integer constants are opcodes for the xFileControl method -** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()] -** interface. -** -** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging. This -** opcode causes the xFileControl method to write the current state of -** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED], -** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE]) -** into an integer that the pArg argument points to. This capability -** is used during testing and only needs to be supported when SQLITE_TEST -** is defined. -**
    -**
  • [[SQLITE_FCNTL_SIZE_HINT]] -** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS -** layer a hint of how large the database file will grow to be during the -** current transaction. This hint is not guaranteed to be accurate but it -** is often close. The underlying VFS might choose to preallocate database -** file space based on this hint in order to help writes to the database -** file run faster. -** -**
  • [[SQLITE_FCNTL_CHUNK_SIZE]] -** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS -** extends and truncates the database file in chunks of a size specified -** by the user. The fourth argument to [sqlite3_file_control()] should -** point to an integer (type int) containing the new chunk-size to use -** for the nominated database. Allocating database file space in large -** chunks (say 1MB at a time), may reduce file-system fragmentation and -** improve performance on some systems. -** -**
  • [[SQLITE_FCNTL_FILE_POINTER]] -** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer -** to the [sqlite3_file] object associated with a particular database -** connection. See the [sqlite3_file_control()] documentation for -** additional information. -** -**
  • [[SQLITE_FCNTL_SYNC_OMITTED]] -** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by -** SQLite and sent to all VFSes in place of a call to the xSync method -** when the database connection has [PRAGMA synchronous] set to OFF.)^ -** Some specialized VFSes need this signal in order to operate correctly -** when [PRAGMA synchronous | PRAGMA synchronous=OFF] is set, but most -** VFSes do not need this signal and should silently ignore this opcode. -** Applications should not call [sqlite3_file_control()] with this -** opcode as doing so may disrupt the operation of the specialized VFSes -** that do require it. -** -**
  • [[SQLITE_FCNTL_WIN32_AV_RETRY]] -** ^The [SQLITE_FCNTL_WIN32_AV_RETRY] opcode is used to configure automatic -** retry counts and intervals for certain disk I/O operations for the -** windows [VFS] in order to provide robustness in the presence of -** anti-virus programs. By default, the windows VFS will retry file read, -** file write, and file delete operations up to 10 times, with a delay -** of 25 milliseconds before the first retry and with the delay increasing -** by an additional 25 milliseconds with each subsequent retry. This -** opcode allows these two values (10 retries and 25 milliseconds of delay) -** to be adjusted. The values are changed for all database connections -** within the same process. The argument is a pointer to an array of two -** integers where the first integer i the new retry count and the second -** integer is the delay. If either integer is negative, then the setting -** is not changed but instead the prior value of that setting is written -** into the array entry, allowing the current retry settings to be -** interrogated. The zDbName parameter is ignored. -** -**
  • [[SQLITE_FCNTL_PERSIST_WAL]] -** ^The [SQLITE_FCNTL_PERSIST_WAL] opcode is used to set or query the -** persistent [WAL | Write Ahead Log] setting. By default, the auxiliary -** write ahead log and shared memory files used for transaction control -** are automatically deleted when the latest connection to the database -** closes. Setting persistent WAL mode causes those files to persist after -** close. Persisting the files is useful when other processes that do not -** have write permission on the directory containing the database file want -** to read the database file, as the WAL and shared memory files must exist -** in order for the database to be readable. The fourth parameter to -** [sqlite3_file_control()] for this opcode should be a pointer to an integer. -** That integer is 0 to disable persistent WAL mode or 1 to enable persistent -** WAL mode. If the integer is -1, then it is overwritten with the current -** WAL persistence setting. -** -**
  • [[SQLITE_FCNTL_POWERSAFE_OVERWRITE]] -** ^The [SQLITE_FCNTL_POWERSAFE_OVERWRITE] opcode is used to set or query the -** persistent "powersafe-overwrite" or "PSOW" setting. The PSOW setting -** determines the [SQLITE_IOCAP_POWERSAFE_OVERWRITE] bit of the -** xDeviceCharacteristics methods. The fourth parameter to -** [sqlite3_file_control()] for this opcode should be a pointer to an integer. -** That integer is 0 to disable zero-damage mode or 1 to enable zero-damage -** mode. If the integer is -1, then it is overwritten with the current -** zero-damage mode setting. -** -**
  • [[SQLITE_FCNTL_OVERWRITE]] -** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening -** a write transaction to indicate that, unless it is rolled back for some -** reason, the entire database file will be overwritten by the current -** transaction. This is used by VACUUM operations. -** -**
  • [[SQLITE_FCNTL_VFSNAME]] -** ^The [SQLITE_FCNTL_VFSNAME] opcode can be used to obtain the names of -** all [VFSes] in the VFS stack. The names are of all VFS shims and the -** final bottom-level VFS are written into memory obtained from -** [sqlite3_malloc()] and the result is stored in the char* variable -** that the fourth parameter of [sqlite3_file_control()] points to. -** The caller is responsible for freeing the memory when done. As with -** all file-control actions, there is no guarantee that this will actually -** do anything. Callers should initialize the char* variable to a NULL -** pointer in case this file-control is not implemented. This file-control -** is intended for diagnostic use only. -** -**
  • [[SQLITE_FCNTL_PRAGMA]] -** ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA] -** file control is sent to the open [sqlite3_file] object corresponding -** to the database file to which the pragma statement refers. ^The argument -** to the [SQLITE_FCNTL_PRAGMA] file control is an array of -** pointers to strings (char**) in which the second element of the array -** is the name of the pragma and the third element is the argument to the -** pragma or NULL if the pragma has no argument. ^The handler for an -** [SQLITE_FCNTL_PRAGMA] file control can optionally make the first element -** of the char** argument point to a string obtained from [sqlite3_mprintf()] -** or the equivalent and that string will become the result of the pragma or -** the error message if the pragma fails. ^If the -** [SQLITE_FCNTL_PRAGMA] file control returns [SQLITE_NOTFOUND], then normal -** [PRAGMA] processing continues. ^If the [SQLITE_FCNTL_PRAGMA] -** file control returns [SQLITE_OK], then the parser assumes that the -** VFS has handled the PRAGMA itself and the parser generates a no-op -** prepared statement. ^If the [SQLITE_FCNTL_PRAGMA] file control returns -** any result code other than [SQLITE_OK] or [SQLITE_NOTFOUND], that means -** that the VFS encountered an error while handling the [PRAGMA] and the -** compilation of the PRAGMA fails with an error. ^The [SQLITE_FCNTL_PRAGMA] -** file control occurs at the beginning of pragma statement analysis and so -** it is able to override built-in [PRAGMA] statements. -** -**
  • [[SQLITE_FCNTL_BUSYHANDLER]] -** ^This file-control may be invoked by SQLite on the database file handle -** shortly after it is opened in order to provide a custom VFS with access -** to the connections busy-handler callback. The argument is of type (void **) -** - an array of two (void *) values. The first (void *) actually points -** to a function of type (int (*)(void *)). In order to invoke the connections -** busy-handler, this function should be invoked with the second (void *) in -** the array as the only argument. If it returns non-zero, then the operation -** should be retried. If it returns zero, the custom VFS should abandon the -** current operation. -** -**
  • [[SQLITE_FCNTL_TEMPFILENAME]] -** ^Application can invoke this file-control to have SQLite generate a -** temporary filename using the same algorithm that is followed to generate -** temporary filenames for TEMP tables and other internal uses. The -** argument should be a char** which will be filled with the filename -** written into memory obtained from [sqlite3_malloc()]. The caller should -** invoke [sqlite3_free()] on the result to avoid a memory leak. -** -**
-*/ -#define SQLITE_FCNTL_LOCKSTATE 1 -#define SQLITE_GET_LOCKPROXYFILE 2 -#define SQLITE_SET_LOCKPROXYFILE 3 -#define SQLITE_LAST_ERRNO 4 -#define SQLITE_FCNTL_SIZE_HINT 5 -#define SQLITE_FCNTL_CHUNK_SIZE 6 -#define SQLITE_FCNTL_FILE_POINTER 7 -#define SQLITE_FCNTL_SYNC_OMITTED 8 -#define SQLITE_FCNTL_WIN32_AV_RETRY 9 -#define SQLITE_FCNTL_PERSIST_WAL 10 -#define SQLITE_FCNTL_OVERWRITE 11 -#define SQLITE_FCNTL_VFSNAME 12 -#define SQLITE_FCNTL_POWERSAFE_OVERWRITE 13 -#define SQLITE_FCNTL_PRAGMA 14 -#define SQLITE_FCNTL_BUSYHANDLER 15 -#define SQLITE_FCNTL_TEMPFILENAME 16 - -/* -** CAPI3REF: Mutex Handle -** -** The mutex module within SQLite defines [sqlite3_mutex] to be an -** abstract type for a mutex object. The SQLite core never looks -** at the internal representation of an [sqlite3_mutex]. It only -** deals with pointers to the [sqlite3_mutex] object. -** -** Mutexes are created using [sqlite3_mutex_alloc()]. -*/ -typedef struct sqlite3_mutex sqlite3_mutex; - -/* -** CAPI3REF: OS Interface Object -** -** An instance of the sqlite3_vfs object defines the interface between -** the SQLite core and the underlying operating system. The "vfs" -** in the name of the object stands for "virtual file system". See -** the [VFS | VFS documentation] for further information. -** -** The value of the iVersion field is initially 1 but may be larger in -** future versions of SQLite. Additional fields may be appended to this -** object when the iVersion value is increased. Note that the structure -** of the sqlite3_vfs object changes in the transaction between -** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not -** modified. -** -** The szOsFile field is the size of the subclassed [sqlite3_file] -** structure used by this VFS. mxPathname is the maximum length of -** a pathname in this VFS. -** -** Registered sqlite3_vfs objects are kept on a linked list formed by -** the pNext pointer. The [sqlite3_vfs_register()] -** and [sqlite3_vfs_unregister()] interfaces manage this list -** in a thread-safe way. The [sqlite3_vfs_find()] interface -** searches the list. Neither the application code nor the VFS -** implementation should use the pNext pointer. -** -** The pNext field is the only field in the sqlite3_vfs -** structure that SQLite will ever modify. SQLite will only access -** or modify this field while holding a particular static mutex. -** The application should never modify anything within the sqlite3_vfs -** object once the object has been registered. -** -** The zName field holds the name of the VFS module. The name must -** be unique across all VFS modules. -** -** [[sqlite3_vfs.xOpen]] -** ^SQLite guarantees that the zFilename parameter to xOpen -** is either a NULL pointer or string obtained -** from xFullPathname() with an optional suffix added. -** ^If a suffix is added to the zFilename parameter, it will -** consist of a single "-" character followed by no more than -** 11 alphanumeric and/or "-" characters. -** ^SQLite further guarantees that -** the string will be valid and unchanged until xClose() is -** called. Because of the previous sentence, -** the [sqlite3_file] can safely store a pointer to the -** filename if it needs to remember the filename for some reason. -** If the zFilename parameter to xOpen is a NULL pointer then xOpen -** must invent its own temporary name for the file. ^Whenever the -** xFilename parameter is NULL it will also be the case that the -** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE]. -** -** The flags argument to xOpen() includes all bits set in -** the flags argument to [sqlite3_open_v2()]. Or if [sqlite3_open()] -** or [sqlite3_open16()] is used, then flags includes at least -** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. -** If xOpen() opens a file read-only then it sets *pOutFlags to -** include [SQLITE_OPEN_READONLY]. Other bits in *pOutFlags may be set. -** -** ^(SQLite will also add one of the following flags to the xOpen() -** call, depending on the object being opened: -** -**
    -**
  • [SQLITE_OPEN_MAIN_DB] -**
  • [SQLITE_OPEN_MAIN_JOURNAL] -**
  • [SQLITE_OPEN_TEMP_DB] -**
  • [SQLITE_OPEN_TEMP_JOURNAL] -**
  • [SQLITE_OPEN_TRANSIENT_DB] -**
  • [SQLITE_OPEN_SUBJOURNAL] -**
  • [SQLITE_OPEN_MASTER_JOURNAL] -**
  • [SQLITE_OPEN_WAL] -**
)^ -** -** The file I/O implementation can use the object type flags to -** change the way it deals with files. For example, an application -** that does not care about crash recovery or rollback might make -** the open of a journal file a no-op. Writes to this journal would -** also be no-ops, and any attempt to read the journal would return -** SQLITE_IOERR. Or the implementation might recognize that a database -** file will be doing page-aligned sector reads and writes in a random -** order and set up its I/O subsystem accordingly. -** -** SQLite might also add one of the following flags to the xOpen method: -** -**
    -**
  • [SQLITE_OPEN_DELETEONCLOSE] -**
  • [SQLITE_OPEN_EXCLUSIVE] -**
-** -** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be -** deleted when it is closed. ^The [SQLITE_OPEN_DELETEONCLOSE] -** will be set for TEMP databases and their journals, transient -** databases, and subjournals. -** -** ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction -** with the [SQLITE_OPEN_CREATE] flag, which are both directly -** analogous to the O_EXCL and O_CREAT flags of the POSIX open() -** API. The SQLITE_OPEN_EXCLUSIVE flag, when paired with the -** SQLITE_OPEN_CREATE, is used to indicate that file should always -** be created, and that it is an error if it already exists. -** It is not used to indicate the file should be opened -** for exclusive access. -** -** ^At least szOsFile bytes of memory are allocated by SQLite -** to hold the [sqlite3_file] structure passed as the third -** argument to xOpen. The xOpen method does not have to -** allocate the structure; it should just fill it in. Note that -** the xOpen method must set the sqlite3_file.pMethods to either -** a valid [sqlite3_io_methods] object or to NULL. xOpen must do -** this even if the open fails. SQLite expects that the sqlite3_file.pMethods -** element will be valid after xOpen returns regardless of the success -** or failure of the xOpen call. -** -** [[sqlite3_vfs.xAccess]] -** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS] -** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to -** test whether a file is readable and writable, or [SQLITE_ACCESS_READ] -** to test whether a file is at least readable. The file can be a -** directory. -** -** ^SQLite will always allocate at least mxPathname+1 bytes for the -** output buffer xFullPathname. The exact size of the output buffer -** is also passed as a parameter to both methods. If the output buffer -** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is -** handled as a fatal error by SQLite, vfs implementations should endeavor -** to prevent this by setting mxPathname to a sufficiently large value. -** -** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64() -** interfaces are not strictly a part of the filesystem, but they are -** included in the VFS structure for completeness. -** The xRandomness() function attempts to return nBytes bytes -** of good-quality randomness into zOut. The return value is -** the actual number of bytes of randomness obtained. -** The xSleep() method causes the calling thread to sleep for at -** least the number of microseconds given. ^The xCurrentTime() -** method returns a Julian Day Number for the current date and time as -** a floating point value. -** ^The xCurrentTimeInt64() method returns, as an integer, the Julian -** Day Number multiplied by 86400000 (the number of milliseconds in -** a 24-hour day). -** ^SQLite will use the xCurrentTimeInt64() method to get the current -** date and time if that method is available (if iVersion is 2 or -** greater and the function pointer is not NULL) and will fall back -** to xCurrentTime() if xCurrentTimeInt64() is unavailable. -** -** ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces -** are not used by the SQLite core. These optional interfaces are provided -** by some VFSes to facilitate testing of the VFS code. By overriding -** system calls with functions under its control, a test program can -** simulate faults and error conditions that would otherwise be difficult -** or impossible to induce. The set of system calls that can be overridden -** varies from one VFS to another, and from one version of the same VFS to the -** next. Applications that use these interfaces must be prepared for any -** or all of these interfaces to be NULL or for their behavior to change -** from one release to the next. Applications must not attempt to access -** any of these methods if the iVersion of the VFS is less than 3. -*/ -typedef struct sqlite3_vfs sqlite3_vfs; -typedef void (*sqlite3_syscall_ptr)(void); -struct sqlite3_vfs { - int iVersion; /* Structure version number (currently 3) */ - int szOsFile; /* Size of subclassed sqlite3_file */ - int mxPathname; /* Maximum file pathname length */ - sqlite3_vfs *pNext; /* Next registered VFS */ - const char *zName; /* Name of this virtual file system */ - void *pAppData; /* Pointer to application-specific data */ - int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*, - int flags, int *pOutFlags); - int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir); - int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut); - int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut); - void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename); - void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg); - void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void); - void (*xDlClose)(sqlite3_vfs*, void*); - int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut); - int (*xSleep)(sqlite3_vfs*, int microseconds); - int (*xCurrentTime)(sqlite3_vfs*, double*); - int (*xGetLastError)(sqlite3_vfs*, int, char *); - /* - ** The methods above are in version 1 of the sqlite_vfs object - ** definition. Those that follow are added in version 2 or later - */ - int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*); - /* - ** The methods above are in versions 1 and 2 of the sqlite_vfs object. - ** Those below are for version 3 and greater. - */ - int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr); - sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName); - const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName); - /* - ** The methods above are in versions 1 through 3 of the sqlite_vfs object. - ** New fields may be appended in figure versions. The iVersion - ** value will increment whenever this happens. - */ -}; - -/* -** CAPI3REF: Flags for the xAccess VFS method -** -** These integer constants can be used as the third parameter to -** the xAccess method of an [sqlite3_vfs] object. They determine -** what kind of permissions the xAccess method is looking for. -** With SQLITE_ACCESS_EXISTS, the xAccess method -** simply checks whether the file exists. -** With SQLITE_ACCESS_READWRITE, the xAccess method -** checks whether the named directory is both readable and writable -** (in other words, if files can be added, removed, and renamed within -** the directory). -** The SQLITE_ACCESS_READWRITE constant is currently used only by the -** [temp_store_directory pragma], though this could change in a future -** release of SQLite. -** With SQLITE_ACCESS_READ, the xAccess method -** checks whether the file is readable. The SQLITE_ACCESS_READ constant is -** currently unused, though it might be used in a future release of -** SQLite. -*/ -#define SQLITE_ACCESS_EXISTS 0 -#define SQLITE_ACCESS_READWRITE 1 /* Used by PRAGMA temp_store_directory */ -#define SQLITE_ACCESS_READ 2 /* Unused */ - -/* -** CAPI3REF: Flags for the xShmLock VFS method -** -** These integer constants define the various locking operations -** allowed by the xShmLock method of [sqlite3_io_methods]. The -** following are the only legal combinations of flags to the -** xShmLock method: -** -**
    -**
  • SQLITE_SHM_LOCK | SQLITE_SHM_SHARED -**
  • SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE -**
  • SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED -**
  • SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE -**
-** -** When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as -** was given no the corresponding lock. -** -** The xShmLock method can transition between unlocked and SHARED or -** between unlocked and EXCLUSIVE. It cannot transition between SHARED -** and EXCLUSIVE. -*/ -#define SQLITE_SHM_UNLOCK 1 -#define SQLITE_SHM_LOCK 2 -#define SQLITE_SHM_SHARED 4 -#define SQLITE_SHM_EXCLUSIVE 8 - -/* -** CAPI3REF: Maximum xShmLock index -** -** The xShmLock method on [sqlite3_io_methods] may use values -** between 0 and this upper bound as its "offset" argument. -** The SQLite core will never attempt to acquire or release a -** lock outside of this range -*/ -#define SQLITE_SHM_NLOCK 8 - - -/* -** CAPI3REF: Initialize The SQLite Library -** -** ^The sqlite3_initialize() routine initializes the -** SQLite library. ^The sqlite3_shutdown() routine -** deallocates any resources that were allocated by sqlite3_initialize(). -** These routines are designed to aid in process initialization and -** shutdown on embedded systems. Workstation applications using -** SQLite normally do not need to invoke either of these routines. -** -** A call to sqlite3_initialize() is an "effective" call if it is -** the first time sqlite3_initialize() is invoked during the lifetime of -** the process, or if it is the first time sqlite3_initialize() is invoked -** following a call to sqlite3_shutdown(). ^(Only an effective call -** of sqlite3_initialize() does any initialization. All other calls -** are harmless no-ops.)^ -** -** A call to sqlite3_shutdown() is an "effective" call if it is the first -** call to sqlite3_shutdown() since the last sqlite3_initialize(). ^(Only -** an effective call to sqlite3_shutdown() does any deinitialization. -** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^ -** -** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() -** is not. The sqlite3_shutdown() interface must only be called from a -** single thread. All open [database connections] must be closed and all -** other SQLite resources must be deallocated prior to invoking -** sqlite3_shutdown(). -** -** Among other things, ^sqlite3_initialize() will invoke -** sqlite3_os_init(). Similarly, ^sqlite3_shutdown() -** will invoke sqlite3_os_end(). -** -** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success. -** ^If for some reason, sqlite3_initialize() is unable to initialize -** the library (perhaps it is unable to allocate a needed resource such -** as a mutex) it returns an [error code] other than [SQLITE_OK]. -** -** ^The sqlite3_initialize() routine is called internally by many other -** SQLite interfaces so that an application usually does not need to -** invoke sqlite3_initialize() directly. For example, [sqlite3_open()] -** calls sqlite3_initialize() so the SQLite library will be automatically -** initialized when [sqlite3_open()] is called if it has not be initialized -** already. ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT] -** compile-time option, then the automatic calls to sqlite3_initialize() -** are omitted and the application must call sqlite3_initialize() directly -** prior to using any other SQLite interface. For maximum portability, -** it is recommended that applications always invoke sqlite3_initialize() -** directly prior to using any other SQLite interface. Future releases -** of SQLite may require this. In other words, the behavior exhibited -** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the -** default behavior in some future release of SQLite. -** -** The sqlite3_os_init() routine does operating-system specific -** initialization of the SQLite library. The sqlite3_os_end() -** routine undoes the effect of sqlite3_os_init(). Typical tasks -** performed by these routines include allocation or deallocation -** of static resources, initialization of global variables, -** setting up a default [sqlite3_vfs] module, or setting up -** a default configuration using [sqlite3_config()]. -** -** The application should never invoke either sqlite3_os_init() -** or sqlite3_os_end() directly. The application should only invoke -** sqlite3_initialize() and sqlite3_shutdown(). The sqlite3_os_init() -** interface is called automatically by sqlite3_initialize() and -** sqlite3_os_end() is called by sqlite3_shutdown(). Appropriate -** implementations for sqlite3_os_init() and sqlite3_os_end() -** are built into SQLite when it is compiled for Unix, Windows, or OS/2. -** When [custom builds | built for other platforms] -** (using the [SQLITE_OS_OTHER=1] compile-time -** option) the application must supply a suitable implementation for -** sqlite3_os_init() and sqlite3_os_end(). An application-supplied -** implementation of sqlite3_os_init() or sqlite3_os_end() -** must return [SQLITE_OK] on success and some other [error code] upon -** failure. -*/ -SQLITE_API int sqlite3_initialize(void); -SQLITE_API int sqlite3_shutdown(void); -SQLITE_API int sqlite3_os_init(void); -SQLITE_API int sqlite3_os_end(void); - -/* -** CAPI3REF: Configuring The SQLite Library -** -** The sqlite3_config() interface is used to make global configuration -** changes to SQLite in order to tune SQLite to the specific needs of -** the application. The default configuration is recommended for most -** applications and so this routine is usually not necessary. It is -** provided to support rare applications with unusual needs. -** -** The sqlite3_config() interface is not threadsafe. The application -** must insure that no other SQLite interfaces are invoked by other -** threads while sqlite3_config() is running. Furthermore, sqlite3_config() -** may only be invoked prior to library initialization using -** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()]. -** ^If sqlite3_config() is called after [sqlite3_initialize()] and before -** [sqlite3_shutdown()] then it will return SQLITE_MISUSE. -** Note, however, that ^sqlite3_config() can be called as part of the -** implementation of an application-defined [sqlite3_os_init()]. -** -** The first argument to sqlite3_config() is an integer -** [configuration option] that determines -** what property of SQLite is to be configured. Subsequent arguments -** vary depending on the [configuration option] -** in the first argument. -** -** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK]. -** ^If the option is unknown or SQLite is unable to set the option -** then this routine returns a non-zero [error code]. -*/ -SQLITE_API int sqlite3_config(int, ...); - -/* -** CAPI3REF: Configure database connections -** -** The sqlite3_db_config() interface is used to make configuration -** changes to a [database connection]. The interface is similar to -** [sqlite3_config()] except that the changes apply to a single -** [database connection] (specified in the first argument). -** -** The second argument to sqlite3_db_config(D,V,...) is the -** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code -** that indicates what aspect of the [database connection] is being configured. -** Subsequent arguments vary depending on the configuration verb. -** -** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if -** the call is considered successful. -*/ -SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...); - -/* -** CAPI3REF: Memory Allocation Routines -** -** An instance of this object defines the interface between SQLite -** and low-level memory allocation routines. -** -** This object is used in only one place in the SQLite interface. -** A pointer to an instance of this object is the argument to -** [sqlite3_config()] when the configuration option is -** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC]. -** By creating an instance of this object -** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC]) -** during configuration, an application can specify an alternative -** memory allocation subsystem for SQLite to use for all of its -** dynamic memory needs. -** -** Note that SQLite comes with several [built-in memory allocators] -** that are perfectly adequate for the overwhelming majority of applications -** and that this object is only useful to a tiny minority of applications -** with specialized memory allocation requirements. This object is -** also used during testing of SQLite in order to specify an alternative -** memory allocator that simulates memory out-of-memory conditions in -** order to verify that SQLite recovers gracefully from such -** conditions. -** -** The xMalloc, xRealloc, and xFree methods must work like the -** malloc(), realloc() and free() functions from the standard C library. -** ^SQLite guarantees that the second argument to -** xRealloc is always a value returned by a prior call to xRoundup. -** -** xSize should return the allocated size of a memory allocation -** previously obtained from xMalloc or xRealloc. The allocated size -** is always at least as big as the requested size but may be larger. -** -** The xRoundup method returns what would be the allocated size of -** a memory allocation given a particular requested size. Most memory -** allocators round up memory allocations at least to the next multiple -** of 8. Some allocators round up to a larger multiple or to a power of 2. -** Every memory allocation request coming in through [sqlite3_malloc()] -** or [sqlite3_realloc()] first calls xRoundup. If xRoundup returns 0, -** that causes the corresponding memory allocation to fail. -** -** The xInit method initializes the memory allocator. (For example, -** it might allocate any require mutexes or initialize internal data -** structures. The xShutdown method is invoked (indirectly) by -** [sqlite3_shutdown()] and should deallocate any resources acquired -** by xInit. The pAppData pointer is used as the only parameter to -** xInit and xShutdown. -** -** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes -** the xInit method, so the xInit method need not be threadsafe. The -** xShutdown method is only called from [sqlite3_shutdown()] so it does -** not need to be threadsafe either. For all other methods, SQLite -** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the -** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which -** it is by default) and so the methods are automatically serialized. -** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other -** methods must be threadsafe or else make their own arrangements for -** serialization. -** -** SQLite will never invoke xInit() more than once without an intervening -** call to xShutdown(). -*/ -typedef struct sqlite3_mem_methods sqlite3_mem_methods; -struct sqlite3_mem_methods { - void *(*xMalloc)(int); /* Memory allocation function */ - void (*xFree)(void*); /* Free a prior allocation */ - void *(*xRealloc)(void*,int); /* Resize an allocation */ - int (*xSize)(void*); /* Return the size of an allocation */ - int (*xRoundup)(int); /* Round up request size to allocation size */ - int (*xInit)(void*); /* Initialize the memory allocator */ - void (*xShutdown)(void*); /* Deinitialize the memory allocator */ - void *pAppData; /* Argument to xInit() and xShutdown() */ -}; - -/* -** CAPI3REF: Configuration Options -** KEYWORDS: {configuration option} -** -** These constants are the available integer configuration options that -** can be passed as the first argument to the [sqlite3_config()] interface. -** -** New configuration options may be added in future releases of SQLite. -** Existing configuration options might be discontinued. Applications -** should check the return code from [sqlite3_config()] to make sure that -** the call worked. The [sqlite3_config()] interface will return a -** non-zero [error code] if a discontinued or unsupported configuration option -** is invoked. -** -**
-** [[SQLITE_CONFIG_SINGLETHREAD]]
SQLITE_CONFIG_SINGLETHREAD
-**
There are no arguments to this option. ^This option sets the -** [threading mode] to Single-thread. In other words, it disables -** all mutexing and puts SQLite into a mode where it can only be used -** by a single thread. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to change the [threading mode] from its default -** value of Single-thread and so [sqlite3_config()] will return -** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD -** configuration option.
-** -** [[SQLITE_CONFIG_MULTITHREAD]]
SQLITE_CONFIG_MULTITHREAD
-**
There are no arguments to this option. ^This option sets the -** [threading mode] to Multi-thread. In other words, it disables -** mutexing on [database connection] and [prepared statement] objects. -** The application is responsible for serializing access to -** [database connections] and [prepared statements]. But other mutexes -** are enabled so that SQLite will be safe to use in a multi-threaded -** environment as long as no two threads attempt to use the same -** [database connection] at the same time. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to set the Multi-thread [threading mode] and -** [sqlite3_config()] will return [SQLITE_ERROR] if called with the -** SQLITE_CONFIG_MULTITHREAD configuration option.
-** -** [[SQLITE_CONFIG_SERIALIZED]]
SQLITE_CONFIG_SERIALIZED
-**
There are no arguments to this option. ^This option sets the -** [threading mode] to Serialized. In other words, this option enables -** all mutexes including the recursive -** mutexes on [database connection] and [prepared statement] objects. -** In this mode (which is the default when SQLite is compiled with -** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access -** to [database connections] and [prepared statements] so that the -** application is free to use the same [database connection] or the -** same [prepared statement] in different threads at the same time. -** ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** it is not possible to set the Serialized [threading mode] and -** [sqlite3_config()] will return [SQLITE_ERROR] if called with the -** SQLITE_CONFIG_SERIALIZED configuration option.
-** -** [[SQLITE_CONFIG_MALLOC]]
SQLITE_CONFIG_MALLOC
-**
^(This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mem_methods] structure. The argument specifies -** alternative low-level memory allocation routines to be used in place of -** the memory allocation routines built into SQLite.)^ ^SQLite makes -** its own private copy of the content of the [sqlite3_mem_methods] structure -** before the [sqlite3_config()] call returns.
-** -** [[SQLITE_CONFIG_GETMALLOC]]
SQLITE_CONFIG_GETMALLOC
-**
^(This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mem_methods] structure. The [sqlite3_mem_methods] -** structure is filled with the currently defined memory allocation routines.)^ -** This option can be used to overload the default memory allocation -** routines with a wrapper that simulations memory allocation failure or -** tracks memory usage, for example.
-** -** [[SQLITE_CONFIG_MEMSTATUS]]
SQLITE_CONFIG_MEMSTATUS
-**
^This option takes single argument of type int, interpreted as a -** boolean, which enables or disables the collection of memory allocation -** statistics. ^(When memory allocation statistics are disabled, the -** following SQLite interfaces become non-operational: -**
    -**
  • [sqlite3_memory_used()] -**
  • [sqlite3_memory_highwater()] -**
  • [sqlite3_soft_heap_limit64()] -**
  • [sqlite3_status()] -**
)^ -** ^Memory allocation statistics are enabled by default unless SQLite is -** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory -** allocation statistics are disabled by default. -**
-** -** [[SQLITE_CONFIG_SCRATCH]]
SQLITE_CONFIG_SCRATCH
-**
^This option specifies a static memory buffer that SQLite can use for -** scratch memory. There are three arguments: A pointer an 8-byte -** aligned memory buffer from which the scratch allocations will be -** drawn, the size of each scratch allocation (sz), -** and the maximum number of scratch allocations (N). The sz -** argument must be a multiple of 16. -** The first argument must be a pointer to an 8-byte aligned buffer -** of at least sz*N bytes of memory. -** ^SQLite will use no more than two scratch buffers per thread. So -** N should be set to twice the expected maximum number of threads. -** ^SQLite will never require a scratch buffer that is more than 6 -** times the database page size. ^If SQLite needs needs additional -** scratch memory beyond what is provided by this configuration option, then -** [sqlite3_malloc()] will be used to obtain the memory needed.
-** -** [[SQLITE_CONFIG_PAGECACHE]]
SQLITE_CONFIG_PAGECACHE
-**
^This option specifies a static memory buffer that SQLite can use for -** the database page cache with the default page cache implementation. -** This configuration should not be used if an application-define page -** cache implementation is loaded using the SQLITE_CONFIG_PCACHE2 option. -** There are three arguments to this option: A pointer to 8-byte aligned -** memory, the size of each page buffer (sz), and the number of pages (N). -** The sz argument should be the size of the largest database page -** (a power of two between 512 and 32768) plus a little extra for each -** page header. ^The page header size is 20 to 40 bytes depending on -** the host architecture. ^It is harmless, apart from the wasted memory, -** to make sz a little too large. The first -** argument should point to an allocation of at least sz*N bytes of memory. -** ^SQLite will use the memory provided by the first argument to satisfy its -** memory needs for the first N pages that it adds to cache. ^If additional -** page cache memory is needed beyond what is provided by this option, then -** SQLite goes to [sqlite3_malloc()] for the additional storage space. -** The pointer in the first argument must -** be aligned to an 8-byte boundary or subsequent behavior of SQLite -** will be undefined.
-** -** [[SQLITE_CONFIG_HEAP]]
SQLITE_CONFIG_HEAP
-**
^This option specifies a static memory buffer that SQLite will use -** for all of its dynamic memory allocation needs beyond those provided -** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE]. -** There are three arguments: An 8-byte aligned pointer to the memory, -** the number of bytes in the memory buffer, and the minimum allocation size. -** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts -** to using its default memory allocator (the system malloc() implementation), -** undoing any prior invocation of [SQLITE_CONFIG_MALLOC]. ^If the -** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or -** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory -** allocator is engaged to handle all of SQLites memory allocation needs. -** The first pointer (the memory pointer) must be aligned to an 8-byte -** boundary or subsequent behavior of SQLite will be undefined. -** The minimum allocation size is capped at 2**12. Reasonable values -** for the minimum allocation size are 2**5 through 2**8.
-** -** [[SQLITE_CONFIG_MUTEX]]
SQLITE_CONFIG_MUTEX
-**
^(This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mutex_methods] structure. The argument specifies -** alternative low-level mutex routines to be used in place -** the mutex routines built into SQLite.)^ ^SQLite makes a copy of the -** content of the [sqlite3_mutex_methods] structure before the call to -** [sqlite3_config()] returns. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** the entire mutexing subsystem is omitted from the build and hence calls to -** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will -** return [SQLITE_ERROR].
-** -** [[SQLITE_CONFIG_GETMUTEX]]
SQLITE_CONFIG_GETMUTEX
-**
^(This option takes a single argument which is a pointer to an -** instance of the [sqlite3_mutex_methods] structure. The -** [sqlite3_mutex_methods] -** structure is filled with the currently defined mutex routines.)^ -** This option can be used to overload the default mutex allocation -** routines with a wrapper used to track mutex usage for performance -** profiling or testing, for example. ^If SQLite is compiled with -** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then -** the entire mutexing subsystem is omitted from the build and hence calls to -** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will -** return [SQLITE_ERROR].
-** -** [[SQLITE_CONFIG_LOOKASIDE]]
SQLITE_CONFIG_LOOKASIDE
-**
^(This option takes two arguments that determine the default -** memory allocation for the lookaside memory allocator on each -** [database connection]. The first argument is the -** size of each lookaside buffer slot and the second is the number of -** slots allocated to each database connection.)^ ^(This option sets the -** default lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] -** verb to [sqlite3_db_config()] can be used to change the lookaside -** configuration on individual connections.)^
-** -** [[SQLITE_CONFIG_PCACHE2]]
SQLITE_CONFIG_PCACHE2
-**
^(This option takes a single argument which is a pointer to -** an [sqlite3_pcache_methods2] object. This object specifies the interface -** to a custom page cache implementation.)^ ^SQLite makes a copy of the -** object and uses it for page cache memory allocations.
-** -** [[SQLITE_CONFIG_GETPCACHE2]]
SQLITE_CONFIG_GETPCACHE2
-**
^(This option takes a single argument which is a pointer to an -** [sqlite3_pcache_methods2] object. SQLite copies of the current -** page cache implementation into that object.)^
-** -** [[SQLITE_CONFIG_LOG]]
SQLITE_CONFIG_LOG
-**
^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a -** function with a call signature of void(*)(void*,int,const char*), -** and a pointer to void. ^If the function pointer is not NULL, it is -** invoked by [sqlite3_log()] to process each logging event. ^If the -** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op. -** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is -** passed through as the first parameter to the application-defined logger -** function whenever that function is invoked. ^The second parameter to -** the logger function is a copy of the first parameter to the corresponding -** [sqlite3_log()] call and is intended to be a [result code] or an -** [extended result code]. ^The third parameter passed to the logger is -** log message after formatting via [sqlite3_snprintf()]. -** The SQLite logging interface is not reentrant; the logger function -** supplied by the application must not invoke any SQLite interface. -** In a multi-threaded application, the application-defined logger -** function must be threadsafe.
-** -** [[SQLITE_CONFIG_URI]]
SQLITE_CONFIG_URI -**
This option takes a single argument of type int. If non-zero, then -** URI handling is globally enabled. If the parameter is zero, then URI handling -** is globally disabled. If URI handling is globally enabled, all filenames -** passed to [sqlite3_open()], [sqlite3_open_v2()], [sqlite3_open16()] or -** specified as part of [ATTACH] commands are interpreted as URIs, regardless -** of whether or not the [SQLITE_OPEN_URI] flag is set when the database -** connection is opened. If it is globally disabled, filenames are -** only interpreted as URIs if the SQLITE_OPEN_URI flag is set when the -** database connection is opened. By default, URI handling is globally -** disabled. The default value may be changed by compiling with the -** [SQLITE_USE_URI] symbol defined. -** -** [[SQLITE_CONFIG_COVERING_INDEX_SCAN]]
SQLITE_CONFIG_COVERING_INDEX_SCAN -**
This option takes a single integer argument which is interpreted as -** a boolean in order to enable or disable the use of covering indices for -** full table scans in the query optimizer. The default setting is determined -** by the [SQLITE_ALLOW_COVERING_INDEX_SCAN] compile-time option, or is "on" -** if that compile-time option is omitted. -** The ability to disable the use of covering indices for full table scans -** is because some incorrectly coded legacy applications might malfunction -** malfunction when the optimization is enabled. Providing the ability to -** disable the optimization allows the older, buggy application code to work -** without change even with newer versions of SQLite. -** -** [[SQLITE_CONFIG_PCACHE]] [[SQLITE_CONFIG_GETPCACHE]] -**
SQLITE_CONFIG_PCACHE and SQLITE_CONFIG_GETPCACHE -**
These options are obsolete and should not be used by new code. -** They are retained for backwards compatibility but are now no-ops. -**
-** -** [[SQLITE_CONFIG_SQLLOG]] -**
SQLITE_CONFIG_SQLLOG -**
This option is only available if sqlite is compiled with the -** SQLITE_ENABLE_SQLLOG pre-processor macro defined. The first argument should -** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). -** The second should be of type (void*). The callback is invoked by the library -** in three separate circumstances, identified by the value passed as the -** fourth parameter. If the fourth parameter is 0, then the database connection -** passed as the second argument has just been opened. The third argument -** points to a buffer containing the name of the main database file. If the -** fourth parameter is 1, then the SQL statement that the third parameter -** points to has just been executed. Or, if the fourth parameter is 2, then -** the connection being passed as the second parameter is being closed. The -** third parameter is passed NULL In this case. -** -*/ -#define SQLITE_CONFIG_SINGLETHREAD 1 /* nil */ -#define SQLITE_CONFIG_MULTITHREAD 2 /* nil */ -#define SQLITE_CONFIG_SERIALIZED 3 /* nil */ -#define SQLITE_CONFIG_MALLOC 4 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_GETMALLOC 5 /* sqlite3_mem_methods* */ -#define SQLITE_CONFIG_SCRATCH 6 /* void*, int sz, int N */ -#define SQLITE_CONFIG_PAGECACHE 7 /* void*, int sz, int N */ -#define SQLITE_CONFIG_HEAP 8 /* void*, int nByte, int min */ -#define SQLITE_CONFIG_MEMSTATUS 9 /* boolean */ -#define SQLITE_CONFIG_MUTEX 10 /* sqlite3_mutex_methods* */ -#define SQLITE_CONFIG_GETMUTEX 11 /* sqlite3_mutex_methods* */ -/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ -#define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ -#define SQLITE_CONFIG_PCACHE 14 /* no-op */ -#define SQLITE_CONFIG_GETPCACHE 15 /* no-op */ -#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ -#define SQLITE_CONFIG_URI 17 /* int */ -#define SQLITE_CONFIG_PCACHE2 18 /* sqlite3_pcache_methods2* */ -#define SQLITE_CONFIG_GETPCACHE2 19 /* sqlite3_pcache_methods2* */ -#define SQLITE_CONFIG_COVERING_INDEX_SCAN 20 /* int */ -#define SQLITE_CONFIG_SQLLOG 21 /* xSqllog, void* */ - -/* -** CAPI3REF: Database Connection Configuration Options -** -** These constants are the available integer configuration options that -** can be passed as the second argument to the [sqlite3_db_config()] interface. -** -** New configuration options may be added in future releases of SQLite. -** Existing configuration options might be discontinued. Applications -** should check the return code from [sqlite3_db_config()] to make sure that -** the call worked. ^The [sqlite3_db_config()] interface will return a -** non-zero [error code] if a discontinued or unsupported configuration option -** is invoked. -** -**
-**
SQLITE_DBCONFIG_LOOKASIDE
-**
^This option takes three additional arguments that determine the -** [lookaside memory allocator] configuration for the [database connection]. -** ^The first argument (the third parameter to [sqlite3_db_config()] is a -** pointer to a memory buffer to use for lookaside memory. -** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb -** may be NULL in which case SQLite will allocate the -** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the -** size of each lookaside buffer slot. ^The third argument is the number of -** slots. The size of the buffer in the first argument must be greater than -** or equal to the product of the second and third arguments. The buffer -** must be aligned to an 8-byte boundary. ^If the second argument to -** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally -** rounded down to the next smaller multiple of 8. ^(The lookaside memory -** configuration for a database connection can only be changed when that -** connection is not currently using lookaside memory, or in other words -** when the "current value" returned by -** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero. -** Any attempt to change the lookaside memory configuration when lookaside -** memory is in use leaves the configuration unchanged and returns -** [SQLITE_BUSY].)^
-** -**
SQLITE_DBCONFIG_ENABLE_FKEY
-**
^This option is used to enable or disable the enforcement of -** [foreign key constraints]. There should be two additional arguments. -** The first argument is an integer which is 0 to disable FK enforcement, -** positive to enable FK enforcement or negative to leave FK enforcement -** unchanged. The second parameter is a pointer to an integer into which -** is written 0 or 1 to indicate whether FK enforcement is off or on -** following this call. The second parameter may be a NULL pointer, in -** which case the FK enforcement setting is not reported back.
-** -**
SQLITE_DBCONFIG_ENABLE_TRIGGER
-**
^This option is used to enable or disable [CREATE TRIGGER | triggers]. -** There should be two additional arguments. -** The first argument is an integer which is 0 to disable triggers, -** positive to enable triggers or negative to leave the setting unchanged. -** The second parameter is a pointer to an integer into which -** is written 0 or 1 to indicate whether triggers are disabled or enabled -** following this call. The second parameter may be a NULL pointer, in -** which case the trigger setting is not reported back.
-** -**
-*/ -#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */ -#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */ -#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */ - - -/* -** CAPI3REF: Enable Or Disable Extended Result Codes -** -** ^The sqlite3_extended_result_codes() routine enables or disables the -** [extended result codes] feature of SQLite. ^The extended result -** codes are disabled by default for historical compatibility. -*/ -SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff); - -/* -** CAPI3REF: Last Insert Rowid -** -** ^Each entry in an SQLite table has a unique 64-bit signed -** integer key called the [ROWID | "rowid"]. ^The rowid is always available -** as an undeclared column named ROWID, OID, or _ROWID_ as long as those -** names are not also used by explicitly declared columns. ^If -** the table has a column of type [INTEGER PRIMARY KEY] then that column -** is another alias for the rowid. -** -** ^This routine returns the [rowid] of the most recent -** successful [INSERT] into the database from the [database connection] -** in the first argument. ^As of SQLite version 3.7.7, this routines -** records the last insert rowid of both ordinary tables and [virtual tables]. -** ^If no successful [INSERT]s -** have ever occurred on that database connection, zero is returned. -** -** ^(If an [INSERT] occurs within a trigger or within a [virtual table] -** method, then this routine will return the [rowid] of the inserted -** row as long as the trigger or virtual table method is running. -** But once the trigger or virtual table method ends, the value returned -** by this routine reverts to what it was before the trigger or virtual -** table method began.)^ -** -** ^An [INSERT] that fails due to a constraint violation is not a -** successful [INSERT] and does not change the value returned by this -** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK, -** and INSERT OR ABORT make no changes to the return value of this -** routine when their insertion fails. ^(When INSERT OR REPLACE -** encounters a constraint violation, it does not fail. The -** INSERT continues to completion after deleting rows that caused -** the constraint problem so INSERT OR REPLACE will always change -** the return value of this interface.)^ -** -** ^For the purposes of this routine, an [INSERT] is considered to -** be successful even if it is subsequently rolled back. -** -** This function is accessible to SQL statements via the -** [last_insert_rowid() SQL function]. -** -** If a separate thread performs a new [INSERT] on the same -** database connection while the [sqlite3_last_insert_rowid()] -** function is running and thus changes the last insert [rowid], -** then the value returned by [sqlite3_last_insert_rowid()] is -** unpredictable and might not equal either the old or the new -** last insert [rowid]. -*/ -SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*); - -/* -** CAPI3REF: Count The Number Of Rows Modified -** -** ^This function returns the number of database rows that were changed -** or inserted or deleted by the most recently completed SQL statement -** on the [database connection] specified by the first parameter. -** ^(Only changes that are directly specified by the [INSERT], [UPDATE], -** or [DELETE] statement are counted. Auxiliary changes caused by -** triggers or [foreign key actions] are not counted.)^ Use the -** [sqlite3_total_changes()] function to find the total number of changes -** including changes caused by triggers and foreign key actions. -** -** ^Changes to a view that are simulated by an [INSTEAD OF trigger] -** are not counted. Only real table changes are counted. -** -** ^(A "row change" is a change to a single row of a single table -** caused by an INSERT, DELETE, or UPDATE statement. Rows that -** are changed as side effects of [REPLACE] constraint resolution, -** rollback, ABORT processing, [DROP TABLE], or by any other -** mechanisms do not count as direct row changes.)^ -** -** A "trigger context" is a scope of execution that begins and -** ends with the script of a [CREATE TRIGGER | trigger]. -** Most SQL statements are -** evaluated outside of any trigger. This is the "top level" -** trigger context. If a trigger fires from the top level, a -** new trigger context is entered for the duration of that one -** trigger. Subtriggers create subcontexts for their duration. -** -** ^Calling [sqlite3_exec()] or [sqlite3_step()] recursively does -** not create a new trigger context. -** -** ^This function returns the number of direct row changes in the -** most recent INSERT, UPDATE, or DELETE statement within the same -** trigger context. -** -** ^Thus, when called from the top level, this function returns the -** number of changes in the most recent INSERT, UPDATE, or DELETE -** that also occurred at the top level. ^(Within the body of a trigger, -** the sqlite3_changes() interface can be called to find the number of -** changes in the most recently completed INSERT, UPDATE, or DELETE -** statement within the body of the same trigger. -** However, the number returned does not include changes -** caused by subtriggers since those have their own context.)^ -** -** See also the [sqlite3_total_changes()] interface, the -** [count_changes pragma], and the [changes() SQL function]. -** -** If a separate thread makes changes on the same database connection -** while [sqlite3_changes()] is running then the value returned -** is unpredictable and not meaningful. -*/ -SQLITE_API int sqlite3_changes(sqlite3*); - -/* -** CAPI3REF: Total Number Of Rows Modified -** -** ^This function returns the number of row changes caused by [INSERT], -** [UPDATE] or [DELETE] statements since the [database connection] was opened. -** ^(The count returned by sqlite3_total_changes() includes all changes -** from all [CREATE TRIGGER | trigger] contexts and changes made by -** [foreign key actions]. However, -** the count does not include changes used to implement [REPLACE] constraints, -** do rollbacks or ABORT processing, or [DROP TABLE] processing. The -** count does not include rows of views that fire an [INSTEAD OF trigger], -** though if the INSTEAD OF trigger makes changes of its own, those changes -** are counted.)^ -** ^The sqlite3_total_changes() function counts the changes as soon as -** the statement that makes them is completed (when the statement handle -** is passed to [sqlite3_reset()] or [sqlite3_finalize()]). -** -** See also the [sqlite3_changes()] interface, the -** [count_changes pragma], and the [total_changes() SQL function]. -** -** If a separate thread makes changes on the same database connection -** while [sqlite3_total_changes()] is running then the value -** returned is unpredictable and not meaningful. -*/ -SQLITE_API int sqlite3_total_changes(sqlite3*); - -/* -** CAPI3REF: Interrupt A Long-Running Query -** -** ^This function causes any pending database operation to abort and -** return at its earliest opportunity. This routine is typically -** called in response to a user action such as pressing "Cancel" -** or Ctrl-C where the user wants a long query operation to halt -** immediately. -** -** ^It is safe to call this routine from a thread different from the -** thread that is currently running the database operation. But it -** is not safe to call this routine with a [database connection] that -** is closed or might close before sqlite3_interrupt() returns. -** -** ^If an SQL operation is very nearly finished at the time when -** sqlite3_interrupt() is called, then it might not have an opportunity -** to be interrupted and might continue to completion. -** -** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT]. -** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE -** that is inside an explicit transaction, then the entire transaction -** will be rolled back automatically. -** -** ^The sqlite3_interrupt(D) call is in effect until all currently running -** SQL statements on [database connection] D complete. ^Any new SQL statements -** that are started after the sqlite3_interrupt() call and before the -** running statements reaches zero are interrupted as if they had been -** running prior to the sqlite3_interrupt() call. ^New SQL statements -** that are started after the running statement count reaches zero are -** not effected by the sqlite3_interrupt(). -** ^A call to sqlite3_interrupt(D) that occurs when there are no running -** SQL statements is a no-op and has no effect on SQL statements -** that are started after the sqlite3_interrupt() call returns. -** -** If the database connection closes while [sqlite3_interrupt()] -** is running then bad things will likely happen. -*/ -SQLITE_API void sqlite3_interrupt(sqlite3*); - -/* -** CAPI3REF: Determine If An SQL Statement Is Complete -** -** These routines are useful during command-line input to determine if the -** currently entered text seems to form a complete SQL statement or -** if additional input is needed before sending the text into -** SQLite for parsing. ^These routines return 1 if the input string -** appears to be a complete SQL statement. ^A statement is judged to be -** complete if it ends with a semicolon token and is not a prefix of a -** well-formed CREATE TRIGGER statement. ^Semicolons that are embedded within -** string literals or quoted identifier names or comments are not -** independent tokens (they are part of the token in which they are -** embedded) and thus do not count as a statement terminator. ^Whitespace -** and comments that follow the final semicolon are ignored. -** -** ^These routines return 0 if the statement is incomplete. ^If a -** memory allocation fails, then SQLITE_NOMEM is returned. -** -** ^These routines do not parse the SQL statements thus -** will not detect syntactically incorrect SQL. -** -** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior -** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked -** automatically by sqlite3_complete16(). If that initialization fails, -** then the return value from sqlite3_complete16() will be non-zero -** regardless of whether or not the input SQL is complete.)^ -** -** The input to [sqlite3_complete()] must be a zero-terminated -** UTF-8 string. -** -** The input to [sqlite3_complete16()] must be a zero-terminated -** UTF-16 string in native byte order. -*/ -SQLITE_API int sqlite3_complete(const char *sql); -SQLITE_API int sqlite3_complete16(const void *sql); - -/* -** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors -** -** ^This routine sets a callback function that might be invoked whenever -** an attempt is made to open a database table that another thread -** or process has locked. -** -** ^If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] -** is returned immediately upon encountering the lock. ^If the busy callback -** is not NULL, then the callback might be invoked with two arguments. -** -** ^The first argument to the busy handler is a copy of the void* pointer which -** is the third argument to sqlite3_busy_handler(). ^The second argument to -** the busy handler callback is the number of times that the busy handler has -** been invoked for this locking event. ^If the -** busy callback returns 0, then no additional attempts are made to -** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned. -** ^If the callback returns non-zero, then another attempt -** is made to open the database for reading and the cycle repeats. -** -** The presence of a busy handler does not guarantee that it will be invoked -** when there is lock contention. ^If SQLite determines that invoking the busy -** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY] -** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler. -** Consider a scenario where one process is holding a read lock that -** it is trying to promote to a reserved lock and -** a second process is holding a reserved lock that it is trying -** to promote to an exclusive lock. The first process cannot proceed -** because it is blocked by the second and the second process cannot -** proceed because it is blocked by the first. If both processes -** invoke the busy handlers, neither will make any progress. Therefore, -** SQLite returns [SQLITE_BUSY] for the first process, hoping that this -** will induce the first process to release its read lock and allow -** the second process to proceed. -** -** ^The default busy callback is NULL. -** -** ^The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED] -** when SQLite is in the middle of a large transaction where all the -** changes will not fit into the in-memory cache. SQLite will -** already hold a RESERVED lock on the database file, but it needs -** to promote this lock to EXCLUSIVE so that it can spill cache -** pages into the database file without harm to concurrent -** readers. ^If it is unable to promote the lock, then the in-memory -** cache will be left in an inconsistent state and so the error -** code is promoted from the relatively benign [SQLITE_BUSY] to -** the more severe [SQLITE_IOERR_BLOCKED]. ^This error code promotion -** forces an automatic rollback of the changes. See the -** -** CorruptionFollowingBusyError wiki page for a discussion of why -** this is important. -** -** ^(There can only be a single busy handler defined for each -** [database connection]. Setting a new busy handler clears any -** previously set handler.)^ ^Note that calling [sqlite3_busy_timeout()] -** will also set or clear the busy handler. -** -** The busy callback should not take any actions which modify the -** database connection that invoked the busy handler. Any such actions -** result in undefined behavior. -** -** A busy handler must not close the database connection -** or [prepared statement] that invoked the busy handler. -*/ -SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*); - -/* -** CAPI3REF: Set A Busy Timeout -** -** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps -** for a specified amount of time when a table is locked. ^The handler -** will sleep multiple times until at least "ms" milliseconds of sleeping -** have accumulated. ^After at least "ms" milliseconds of sleeping, -** the handler returns 0 which causes [sqlite3_step()] to return -** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]. -** -** ^Calling this routine with an argument less than or equal to zero -** turns off all busy handlers. -** -** ^(There can only be a single busy handler for a particular -** [database connection] any any given moment. If another busy handler -** was defined (using [sqlite3_busy_handler()]) prior to calling -** this routine, that other busy handler is cleared.)^ -*/ -SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms); - -/* -** CAPI3REF: Convenience Routines For Running Queries -** -** This is a legacy interface that is preserved for backwards compatibility. -** Use of this interface is not recommended. -** -** Definition: A result table is memory data structure created by the -** [sqlite3_get_table()] interface. A result table records the -** complete query results from one or more queries. -** -** The table conceptually has a number of rows and columns. But -** these numbers are not part of the result table itself. These -** numbers are obtained separately. Let N be the number of rows -** and M be the number of columns. -** -** A result table is an array of pointers to zero-terminated UTF-8 strings. -** There are (N+1)*M elements in the array. The first M pointers point -** to zero-terminated strings that contain the names of the columns. -** The remaining entries all point to query results. NULL values result -** in NULL pointers. All other values are in their UTF-8 zero-terminated -** string representation as returned by [sqlite3_column_text()]. -** -** A result table might consist of one or more memory allocations. -** It is not safe to pass a result table directly to [sqlite3_free()]. -** A result table should be deallocated using [sqlite3_free_table()]. -** -** ^(As an example of the result table format, suppose a query result -** is as follows: -** -**
-**        Name        | Age
-**        -----------------------
-**        Alice       | 43
-**        Bob         | 28
-**        Cindy       | 21
-** 
-** -** There are two column (M==2) and three rows (N==3). Thus the -** result table has 8 entries. Suppose the result table is stored -** in an array names azResult. Then azResult holds this content: -** -**
-**        azResult[0] = "Name";
-**        azResult[1] = "Age";
-**        azResult[2] = "Alice";
-**        azResult[3] = "43";
-**        azResult[4] = "Bob";
-**        azResult[5] = "28";
-**        azResult[6] = "Cindy";
-**        azResult[7] = "21";
-** 
)^ -** -** ^The sqlite3_get_table() function evaluates one or more -** semicolon-separated SQL statements in the zero-terminated UTF-8 -** string of its 2nd parameter and returns a result table to the -** pointer given in its 3rd parameter. -** -** After the application has finished with the result from sqlite3_get_table(), -** it must pass the result table pointer to sqlite3_free_table() in order to -** release the memory that was malloced. Because of the way the -** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling -** function must not try to call [sqlite3_free()] directly. Only -** [sqlite3_free_table()] is able to release the memory properly and safely. -** -** The sqlite3_get_table() interface is implemented as a wrapper around -** [sqlite3_exec()]. The sqlite3_get_table() routine does not have access -** to any internal data structures of SQLite. It uses only the public -** interface defined here. As a consequence, errors that occur in the -** wrapper layer outside of the internal [sqlite3_exec()] call are not -** reflected in subsequent calls to [sqlite3_errcode()] or -** [sqlite3_errmsg()]. -*/ -SQLITE_API int sqlite3_get_table( - sqlite3 *db, /* An open database */ - const char *zSql, /* SQL to be evaluated */ - char ***pazResult, /* Results of the query */ - int *pnRow, /* Number of result rows written here */ - int *pnColumn, /* Number of result columns written here */ - char **pzErrmsg /* Error msg written here */ -); -SQLITE_API void sqlite3_free_table(char **result); - -/* -** CAPI3REF: Formatted String Printing Functions -** -** These routines are work-alikes of the "printf()" family of functions -** from the standard C library. -** -** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their -** results into memory obtained from [sqlite3_malloc()]. -** The strings returned by these two routines should be -** released by [sqlite3_free()]. ^Both routines return a -** NULL pointer if [sqlite3_malloc()] is unable to allocate enough -** memory to hold the resulting string. -** -** ^(The sqlite3_snprintf() routine is similar to "snprintf()" from -** the standard C library. The result is written into the -** buffer supplied as the second parameter whose size is given by -** the first parameter. Note that the order of the -** first two parameters is reversed from snprintf().)^ This is an -** historical accident that cannot be fixed without breaking -** backwards compatibility. ^(Note also that sqlite3_snprintf() -** returns a pointer to its buffer instead of the number of -** characters actually written into the buffer.)^ We admit that -** the number of characters written would be a more useful return -** value but we cannot change the implementation of sqlite3_snprintf() -** now without breaking compatibility. -** -** ^As long as the buffer size is greater than zero, sqlite3_snprintf() -** guarantees that the buffer is always zero-terminated. ^The first -** parameter "n" is the total size of the buffer, including space for -** the zero terminator. So the longest string that can be completely -** written will be n-1 characters. -** -** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf(). -** -** These routines all implement some additional formatting -** options that are useful for constructing SQL statements. -** All of the usual printf() formatting options apply. In addition, there -** is are "%q", "%Q", and "%z" options. -** -** ^(The %q option works like %s in that it substitutes a nul-terminated -** string from the argument list. But %q also doubles every '\'' character. -** %q is designed for use inside a string literal.)^ By doubling each '\'' -** character it escapes that character and allows it to be inserted into -** the string. -** -** For example, assume the string variable zText contains text as follows: -** -**
-**  char *zText = "It's a happy day!";
-** 
-** -** One can use this text in an SQL statement as follows: -** -**
-**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
-**  sqlite3_exec(db, zSQL, 0, 0, 0);
-**  sqlite3_free(zSQL);
-** 
-** -** Because the %q format string is used, the '\'' character in zText -** is escaped and the SQL generated is as follows: -** -**
-**  INSERT INTO table1 VALUES('It''s a happy day!')
-** 
-** -** This is correct. Had we used %s instead of %q, the generated SQL -** would have looked like this: -** -**
-**  INSERT INTO table1 VALUES('It's a happy day!');
-** 
-** -** This second example is an SQL syntax error. As a general rule you should -** always use %q instead of %s when inserting text into a string literal. -** -** ^(The %Q option works like %q except it also adds single quotes around -** the outside of the total string. Additionally, if the parameter in the -** argument list is a NULL pointer, %Q substitutes the text "NULL" (without -** single quotes).)^ So, for example, one could say: -** -**
-**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
-**  sqlite3_exec(db, zSQL, 0, 0, 0);
-**  sqlite3_free(zSQL);
-** 
-** -** The code above will render a correct SQL statement in the zSQL -** variable even if the zText variable is a NULL pointer. -** -** ^(The "%z" formatting option works like "%s" but with the -** addition that after the string has been read and copied into -** the result, [sqlite3_free()] is called on the input string.)^ -*/ -SQLITE_API char *sqlite3_mprintf(const char*,...); -SQLITE_API char *sqlite3_vmprintf(const char*, va_list); -SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...); -SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list); - -/* -** CAPI3REF: Memory Allocation Subsystem -** -** The SQLite core uses these three routines for all of its own -** internal memory allocation needs. "Core" in the previous sentence -** does not include operating-system specific VFS implementation. The -** Windows VFS uses native malloc() and free() for some operations. -** -** ^The sqlite3_malloc() routine returns a pointer to a block -** of memory at least N bytes in length, where N is the parameter. -** ^If sqlite3_malloc() is unable to obtain sufficient free -** memory, it returns a NULL pointer. ^If the parameter N to -** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns -** a NULL pointer. -** -** ^Calling sqlite3_free() with a pointer previously returned -** by sqlite3_malloc() or sqlite3_realloc() releases that memory so -** that it might be reused. ^The sqlite3_free() routine is -** a no-op if is called with a NULL pointer. Passing a NULL pointer -** to sqlite3_free() is harmless. After being freed, memory -** should neither be read nor written. Even reading previously freed -** memory might result in a segmentation fault or other severe error. -** Memory corruption, a segmentation fault, or other severe error -** might result if sqlite3_free() is called with a non-NULL pointer that -** was not obtained from sqlite3_malloc() or sqlite3_realloc(). -** -** ^(The sqlite3_realloc() interface attempts to resize a -** prior memory allocation to be at least N bytes, where N is the -** second parameter. The memory allocation to be resized is the first -** parameter.)^ ^ If the first parameter to sqlite3_realloc() -** is a NULL pointer then its behavior is identical to calling -** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc(). -** ^If the second parameter to sqlite3_realloc() is zero or -** negative then the behavior is exactly the same as calling -** sqlite3_free(P) where P is the first parameter to sqlite3_realloc(). -** ^sqlite3_realloc() returns a pointer to a memory allocation -** of at least N bytes in size or NULL if sufficient memory is unavailable. -** ^If M is the size of the prior allocation, then min(N,M) bytes -** of the prior allocation are copied into the beginning of buffer returned -** by sqlite3_realloc() and the prior allocation is freed. -** ^If sqlite3_realloc() returns NULL, then the prior allocation -** is not freed. -** -** ^The memory returned by sqlite3_malloc() and sqlite3_realloc() -** is always aligned to at least an 8 byte boundary, or to a -** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time -** option is used. -** -** In SQLite version 3.5.0 and 3.5.1, it was possible to define -** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in -** implementation of these routines to be omitted. That capability -** is no longer provided. Only built-in memory allocators can be used. -** -** Prior to SQLite version 3.7.10, the Windows OS interface layer called -** the system malloc() and free() directly when converting -** filenames between the UTF-8 encoding used by SQLite -** and whatever filename encoding is used by the particular Windows -** installation. Memory allocation errors were detected, but -** they were reported back as [SQLITE_CANTOPEN] or -** [SQLITE_IOERR] rather than [SQLITE_NOMEM]. -** -** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()] -** must be either NULL or else pointers obtained from a prior -** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have -** not yet been released. -** -** The application must not read or write any part of -** a block of memory after it has been released using -** [sqlite3_free()] or [sqlite3_realloc()]. -*/ -SQLITE_API void *sqlite3_malloc(int); -SQLITE_API void *sqlite3_realloc(void*, int); -SQLITE_API void sqlite3_free(void*); - -/* -** CAPI3REF: Memory Allocator Statistics -** -** SQLite provides these two interfaces for reporting on the status -** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()] -** routines, which form the built-in memory allocation subsystem. -** -** ^The [sqlite3_memory_used()] routine returns the number of bytes -** of memory currently outstanding (malloced but not freed). -** ^The [sqlite3_memory_highwater()] routine returns the maximum -** value of [sqlite3_memory_used()] since the high-water mark -** was last reset. ^The values returned by [sqlite3_memory_used()] and -** [sqlite3_memory_highwater()] include any overhead -** added by SQLite in its implementation of [sqlite3_malloc()], -** but not overhead added by the any underlying system library -** routines that [sqlite3_malloc()] may call. -** -** ^The memory high-water mark is reset to the current value of -** [sqlite3_memory_used()] if and only if the parameter to -** [sqlite3_memory_highwater()] is true. ^The value returned -** by [sqlite3_memory_highwater(1)] is the high-water mark -** prior to the reset. -*/ -SQLITE_API sqlite3_int64 sqlite3_memory_used(void); -SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag); - -/* -** CAPI3REF: Pseudo-Random Number Generator -** -** SQLite contains a high-quality pseudo-random number generator (PRNG) used to -** select random [ROWID | ROWIDs] when inserting new records into a table that -** already uses the largest possible [ROWID]. The PRNG is also used for -** the build-in random() and randomblob() SQL functions. This interface allows -** applications to access the same PRNG for other purposes. -** -** ^A call to this routine stores N bytes of randomness into buffer P. -** -** ^The first time this routine is invoked (either internally or by -** the application) the PRNG is seeded using randomness obtained -** from the xRandomness method of the default [sqlite3_vfs] object. -** ^On all subsequent invocations, the pseudo-randomness is generated -** internally and without recourse to the [sqlite3_vfs] xRandomness -** method. -*/ -SQLITE_API void sqlite3_randomness(int N, void *P); - -/* -** CAPI3REF: Compile-Time Authorization Callbacks -** -** ^This routine registers an authorizer callback with a particular -** [database connection], supplied in the first argument. -** ^The authorizer callback is invoked as SQL statements are being compiled -** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()], -** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()]. ^At various -** points during the compilation process, as logic is being created -** to perform various actions, the authorizer callback is invoked to -** see if those actions are allowed. ^The authorizer callback should -** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the -** specific action but allow the SQL statement to continue to be -** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be -** rejected with an error. ^If the authorizer callback returns -** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY] -** then the [sqlite3_prepare_v2()] or equivalent call that triggered -** the authorizer will fail with an error message. -** -** When the callback returns [SQLITE_OK], that means the operation -** requested is ok. ^When the callback returns [SQLITE_DENY], the -** [sqlite3_prepare_v2()] or equivalent call that triggered the -** authorizer will fail with an error message explaining that -** access is denied. -** -** ^The first parameter to the authorizer callback is a copy of the third -** parameter to the sqlite3_set_authorizer() interface. ^The second parameter -** to the callback is an integer [SQLITE_COPY | action code] that specifies -** the particular action to be authorized. ^The third through sixth parameters -** to the callback are zero-terminated strings that contain additional -** details about the action to be authorized. -** -** ^If the action code is [SQLITE_READ] -** and the callback returns [SQLITE_IGNORE] then the -** [prepared statement] statement is constructed to substitute -** a NULL value in place of the table column that would have -** been read if [SQLITE_OK] had been returned. The [SQLITE_IGNORE] -** return can be used to deny an untrusted user access to individual -** columns of a table. -** ^If the action code is [SQLITE_DELETE] and the callback returns -** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the -** [truncate optimization] is disabled and all rows are deleted individually. -** -** An authorizer is used when [sqlite3_prepare | preparing] -** SQL statements from an untrusted source, to ensure that the SQL statements -** do not try to access data they are not allowed to see, or that they do not -** try to execute malicious statements that damage the database. For -** example, an application may allow a user to enter arbitrary -** SQL queries for evaluation by a database. But the application does -** not want the user to be able to make arbitrary changes to the -** database. An authorizer could then be put in place while the -** user-entered SQL is being [sqlite3_prepare | prepared] that -** disallows everything except [SELECT] statements. -** -** Applications that need to process SQL from untrusted sources -** might also consider lowering resource limits using [sqlite3_limit()] -** and limiting database size using the [max_page_count] [PRAGMA] -** in addition to using an authorizer. -** -** ^(Only a single authorizer can be in place on a database connection -** at a time. Each call to sqlite3_set_authorizer overrides the -** previous call.)^ ^Disable the authorizer by installing a NULL callback. -** The authorizer is disabled by default. -** -** The authorizer callback must not do anything that will modify -** the database connection that invoked the authorizer callback. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the -** statement might be re-prepared during [sqlite3_step()] due to a -** schema change. Hence, the application should ensure that the -** correct authorizer callback remains in place during the [sqlite3_step()]. -** -** ^Note that the authorizer callback is invoked only during -** [sqlite3_prepare()] or its variants. Authorization is not -** performed during statement evaluation in [sqlite3_step()], unless -** as stated in the previous paragraph, sqlite3_step() invokes -** sqlite3_prepare_v2() to reprepare a statement after a schema change. -*/ -SQLITE_API int sqlite3_set_authorizer( - sqlite3*, - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), - void *pUserData -); - -/* -** CAPI3REF: Authorizer Return Codes -** -** The [sqlite3_set_authorizer | authorizer callback function] must -** return either [SQLITE_OK] or one of these two constants in order -** to signal SQLite whether or not the action is permitted. See the -** [sqlite3_set_authorizer | authorizer documentation] for additional -** information. -** -** Note that SQLITE_IGNORE is also used as a [SQLITE_ROLLBACK | return code] -** from the [sqlite3_vtab_on_conflict()] interface. -*/ -#define SQLITE_DENY 1 /* Abort the SQL statement with an error */ -#define SQLITE_IGNORE 2 /* Don't allow access, but don't generate an error */ - -/* -** CAPI3REF: Authorizer Action Codes -** -** The [sqlite3_set_authorizer()] interface registers a callback function -** that is invoked to authorize certain SQL statement actions. The -** second parameter to the callback is an integer code that specifies -** what action is being authorized. These are the integer action codes that -** the authorizer callback may be passed. -** -** These action code values signify what kind of operation is to be -** authorized. The 3rd and 4th parameters to the authorization -** callback function will be parameters or NULL depending on which of these -** codes is used as the second parameter. ^(The 5th parameter to the -** authorizer callback is the name of the database ("main", "temp", -** etc.) if applicable.)^ ^The 6th parameter to the authorizer callback -** is the name of the inner-most trigger or view that is responsible for -** the access attempt or NULL if this access attempt is directly from -** top-level SQL code. -*/ -/******************************************* 3rd ************ 4th ***********/ -#define SQLITE_CREATE_INDEX 1 /* Index Name Table Name */ -#define SQLITE_CREATE_TABLE 2 /* Table Name NULL */ -#define SQLITE_CREATE_TEMP_INDEX 3 /* Index Name Table Name */ -#define SQLITE_CREATE_TEMP_TABLE 4 /* Table Name NULL */ -#define SQLITE_CREATE_TEMP_TRIGGER 5 /* Trigger Name Table Name */ -#define SQLITE_CREATE_TEMP_VIEW 6 /* View Name NULL */ -#define SQLITE_CREATE_TRIGGER 7 /* Trigger Name Table Name */ -#define SQLITE_CREATE_VIEW 8 /* View Name NULL */ -#define SQLITE_DELETE 9 /* Table Name NULL */ -#define SQLITE_DROP_INDEX 10 /* Index Name Table Name */ -#define SQLITE_DROP_TABLE 11 /* Table Name NULL */ -#define SQLITE_DROP_TEMP_INDEX 12 /* Index Name Table Name */ -#define SQLITE_DROP_TEMP_TABLE 13 /* Table Name NULL */ -#define SQLITE_DROP_TEMP_TRIGGER 14 /* Trigger Name Table Name */ -#define SQLITE_DROP_TEMP_VIEW 15 /* View Name NULL */ -#define SQLITE_DROP_TRIGGER 16 /* Trigger Name Table Name */ -#define SQLITE_DROP_VIEW 17 /* View Name NULL */ -#define SQLITE_INSERT 18 /* Table Name NULL */ -#define SQLITE_PRAGMA 19 /* Pragma Name 1st arg or NULL */ -#define SQLITE_READ 20 /* Table Name Column Name */ -#define SQLITE_SELECT 21 /* NULL NULL */ -#define SQLITE_TRANSACTION 22 /* Operation NULL */ -#define SQLITE_UPDATE 23 /* Table Name Column Name */ -#define SQLITE_ATTACH 24 /* Filename NULL */ -#define SQLITE_DETACH 25 /* Database Name NULL */ -#define SQLITE_ALTER_TABLE 26 /* Database Name Table Name */ -#define SQLITE_REINDEX 27 /* Index Name NULL */ -#define SQLITE_ANALYZE 28 /* Table Name NULL */ -#define SQLITE_CREATE_VTABLE 29 /* Table Name Module Name */ -#define SQLITE_DROP_VTABLE 30 /* Table Name Module Name */ -#define SQLITE_FUNCTION 31 /* NULL Function Name */ -#define SQLITE_SAVEPOINT 32 /* Operation Savepoint Name */ -#define SQLITE_COPY 0 /* No longer used */ - -/* -** CAPI3REF: Tracing And Profiling Functions -** -** These routines register callback functions that can be used for -** tracing and profiling the execution of SQL statements. -** -** ^The callback function registered by sqlite3_trace() is invoked at -** various times when an SQL statement is being run by [sqlite3_step()]. -** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the -** SQL statement text as the statement first begins executing. -** ^(Additional sqlite3_trace() callbacks might occur -** as each triggered subprogram is entered. The callbacks for triggers -** contain a UTF-8 SQL comment that identifies the trigger.)^ -** -** ^The callback function registered by sqlite3_profile() is invoked -** as each SQL statement finishes. ^The profile callback contains -** the original statement text and an estimate of wall-clock time -** of how long that statement took to run. ^The profile callback -** time is in units of nanoseconds, however the current implementation -** is only capable of millisecond resolution so the six least significant -** digits in the time are meaningless. Future versions of SQLite -** might provide greater resolution on the profiler callback. The -** sqlite3_profile() function is considered experimental and is -** subject to change in future versions of SQLite. -*/ -SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); -SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*, - void(*xProfile)(void*,const char*,sqlite3_uint64), void*); - -/* -** CAPI3REF: Query Progress Callbacks -** -** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback -** function X to be invoked periodically during long running calls to -** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for -** database connection D. An example use for this -** interface is to keep a GUI updated during a large query. -** -** ^The parameter P is passed through as the only parameter to the -** callback function X. ^The parameter N is the number of -** [virtual machine instructions] that are evaluated between successive -** invocations of the callback X. -** -** ^Only a single progress handler may be defined at one time per -** [database connection]; setting a new progress handler cancels the -** old one. ^Setting parameter X to NULL disables the progress handler. -** ^The progress handler is also disabled by setting N to a value less -** than 1. -** -** ^If the progress callback returns non-zero, the operation is -** interrupted. This feature can be used to implement a -** "Cancel" button on a GUI progress dialog box. -** -** The progress handler callback must not do anything that will modify -** the database connection that invoked the progress handler. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -*/ -SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*); - -/* -** CAPI3REF: Opening A New Database Connection -** -** ^These routines open an SQLite database file as specified by the -** filename argument. ^The filename argument is interpreted as UTF-8 for -** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte -** order for sqlite3_open16(). ^(A [database connection] handle is usually -** returned in *ppDb, even if an error occurs. The only exception is that -** if SQLite is unable to allocate memory to hold the [sqlite3] object, -** a NULL will be written into *ppDb instead of a pointer to the [sqlite3] -** object.)^ ^(If the database is opened (and/or created) successfully, then -** [SQLITE_OK] is returned. Otherwise an [error code] is returned.)^ ^The -** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain -** an English language description of the error following a failure of any -** of the sqlite3_open() routines. -** -** ^The default encoding for the database will be UTF-8 if -** sqlite3_open() or sqlite3_open_v2() is called and -** UTF-16 in the native byte order if sqlite3_open16() is used. -** -** Whether or not an error occurs when it is opened, resources -** associated with the [database connection] handle should be released by -** passing it to [sqlite3_close()] when it is no longer required. -** -** The sqlite3_open_v2() interface works like sqlite3_open() -** except that it accepts two additional parameters for additional control -** over the new database connection. ^(The flags parameter to -** sqlite3_open_v2() can take one of -** the following three values, optionally combined with the -** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE], -** [SQLITE_OPEN_PRIVATECACHE], and/or [SQLITE_OPEN_URI] flags:)^ -** -**
-** ^(
[SQLITE_OPEN_READONLY]
-**
The database is opened in read-only mode. If the database does not -** already exist, an error is returned.
)^ -** -** ^(
[SQLITE_OPEN_READWRITE]
-**
The database is opened for reading and writing if possible, or reading -** only if the file is write protected by the operating system. In either -** case the database must already exist, otherwise an error is returned.
)^ -** -** ^(
[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]
-**
The database is opened for reading and writing, and is created if -** it does not already exist. This is the behavior that is always used for -** sqlite3_open() and sqlite3_open16().
)^ -**
-** -** If the 3rd parameter to sqlite3_open_v2() is not one of the -** combinations shown above optionally combined with other -** [SQLITE_OPEN_READONLY | SQLITE_OPEN_* bits] -** then the behavior is undefined. -** -** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection -** opens in the multi-thread [threading mode] as long as the single-thread -** mode has not been set at compile-time or start-time. ^If the -** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens -** in the serialized [threading mode] unless single-thread was -** previously selected at compile-time or start-time. -** ^The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be -** eligible to use [shared cache mode], regardless of whether or not shared -** cache is enabled using [sqlite3_enable_shared_cache()]. ^The -** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not -** participate in [shared cache mode] even if it is enabled. -** -** ^The fourth parameter to sqlite3_open_v2() is the name of the -** [sqlite3_vfs] object that defines the operating system interface that -** the new database connection should use. ^If the fourth parameter is -** a NULL pointer then the default [sqlite3_vfs] object is used. -** -** ^If the filename is ":memory:", then a private, temporary in-memory database -** is created for the connection. ^This in-memory database will vanish when -** the database connection is closed. Future versions of SQLite might -** make use of additional special filenames that begin with the ":" character. -** It is recommended that when a database filename actually does begin with -** a ":" character you should prefix the filename with a pathname such as -** "./" to avoid ambiguity. -** -** ^If the filename is an empty string, then a private, temporary -** on-disk database will be created. ^This private database will be -** automatically deleted as soon as the database connection is closed. -** -** [[URI filenames in sqlite3_open()]]

URI Filenames

-** -** ^If [URI filename] interpretation is enabled, and the filename argument -** begins with "file:", then the filename is interpreted as a URI. ^URI -** filename interpretation is enabled if the [SQLITE_OPEN_URI] flag is -** set in the fourth argument to sqlite3_open_v2(), or if it has -** been enabled globally using the [SQLITE_CONFIG_URI] option with the -** [sqlite3_config()] method or by the [SQLITE_USE_URI] compile-time option. -** As of SQLite version 3.7.7, URI filename interpretation is turned off -** by default, but future releases of SQLite might enable URI filename -** interpretation by default. See "[URI filenames]" for additional -** information. -** -** URI filenames are parsed according to RFC 3986. ^If the URI contains an -** authority, then it must be either an empty string or the string -** "localhost". ^If the authority is not an empty string or "localhost", an -** error is returned to the caller. ^The fragment component of a URI, if -** present, is ignored. -** -** ^SQLite uses the path component of the URI as the name of the disk file -** which contains the database. ^If the path begins with a '/' character, -** then it is interpreted as an absolute path. ^If the path does not begin -** with a '/' (meaning that the authority section is omitted from the URI) -** then the path is interpreted as a relative path. -** ^On windows, the first component of an absolute path -** is a drive specification (e.g. "C:"). -** -** [[core URI query parameters]] -** The query component of a URI may contain parameters that are interpreted -** either by SQLite itself, or by a [VFS | custom VFS implementation]. -** SQLite interprets the following three query parameters: -** -**
    -**
  • vfs: ^The "vfs" parameter may be used to specify the name of -** a VFS object that provides the operating system interface that should -** be used to access the database file on disk. ^If this option is set to -** an empty string the default VFS object is used. ^Specifying an unknown -** VFS is an error. ^If sqlite3_open_v2() is used and the vfs option is -** present, then the VFS specified by the option takes precedence over -** the value passed as the fourth parameter to sqlite3_open_v2(). -** -**
  • mode: ^(The mode parameter may be set to either "ro", "rw", -** "rwc", or "memory". Attempting to set it to any other value is -** an error)^. -** ^If "ro" is specified, then the database is opened for read-only -** access, just as if the [SQLITE_OPEN_READONLY] flag had been set in the -** third argument to sqlite3_open_v2(). ^If the mode option is set to -** "rw", then the database is opened for read-write (but not create) -** access, as if SQLITE_OPEN_READWRITE (but not SQLITE_OPEN_CREATE) had -** been set. ^Value "rwc" is equivalent to setting both -** SQLITE_OPEN_READWRITE and SQLITE_OPEN_CREATE. ^If the mode option is -** set to "memory" then a pure [in-memory database] that never reads -** or writes from disk is used. ^It is an error to specify a value for -** the mode parameter that is less restrictive than that specified by -** the flags passed in the third parameter to sqlite3_open_v2(). -** -**
  • cache: ^The cache parameter may be set to either "shared" or -** "private". ^Setting it to "shared" is equivalent to setting the -** SQLITE_OPEN_SHAREDCACHE bit in the flags argument passed to -** sqlite3_open_v2(). ^Setting the cache parameter to "private" is -** equivalent to setting the SQLITE_OPEN_PRIVATECACHE bit. -** ^If sqlite3_open_v2() is used and the "cache" parameter is present in -** a URI filename, its value overrides any behaviour requested by setting -** SQLITE_OPEN_PRIVATECACHE or SQLITE_OPEN_SHAREDCACHE flag. -**
-** -** ^Specifying an unknown parameter in the query component of a URI is not an -** error. Future versions of SQLite might understand additional query -** parameters. See "[query parameters with special meaning to SQLite]" for -** additional information. -** -** [[URI filename examples]]

URI filename examples

-** -** -**
URI filenames Results -**
file:data.db -** Open the file "data.db" in the current directory. -**
file:/home/fred/data.db
-** file:///home/fred/data.db
-** file://localhost/home/fred/data.db
-** Open the database file "/home/fred/data.db". -**
file://darkstar/home/fred/data.db -** An error. "darkstar" is not a recognized authority. -**
-** file:///C:/Documents%20and%20Settings/fred/Desktop/data.db -** Windows only: Open the file "data.db" on fred's desktop on drive -** C:. Note that the %20 escaping in this example is not strictly -** necessary - space characters can be used literally -** in URI filenames. -**
file:data.db?mode=ro&cache=private -** Open file "data.db" in the current directory for read-only access. -** Regardless of whether or not shared-cache mode is enabled by -** default, use a private cache. -**
file:/home/fred/data.db?vfs=unix-nolock -** Open file "/home/fred/data.db". Use the special VFS "unix-nolock". -**
file:data.db?mode=readonly -** An error. "readonly" is not a valid option for the "mode" parameter. -**
-** -** ^URI hexadecimal escape sequences (%HH) are supported within the path and -** query components of a URI. A hexadecimal escape sequence consists of a -** percent sign - "%" - followed by exactly two hexadecimal digits -** specifying an octet value. ^Before the path or query components of a -** URI filename are interpreted, they are encoded using UTF-8 and all -** hexadecimal escape sequences replaced by a single byte containing the -** corresponding octet. If this process generates an invalid UTF-8 encoding, -** the results are undefined. -** -** Note to Windows users: The encoding used for the filename argument -** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever -** codepage is currently defined. Filenames containing international -** characters must be converted to UTF-8 prior to passing them into -** sqlite3_open() or sqlite3_open_v2(). -** -** Note to Windows Runtime users: The temporary directory must be set -** prior to calling sqlite3_open() or sqlite3_open_v2(). Otherwise, various -** features that require the use of temporary files may fail. -** -** See also: [sqlite3_temp_directory] -*/ -SQLITE_API int sqlite3_open( - const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb /* OUT: SQLite db handle */ -); -SQLITE_API int sqlite3_open16( - const void *filename, /* Database filename (UTF-16) */ - sqlite3 **ppDb /* OUT: SQLite db handle */ -); -SQLITE_API int sqlite3_open_v2( - const char *filename, /* Database filename (UTF-8) */ - sqlite3 **ppDb, /* OUT: SQLite db handle */ - int flags, /* Flags */ - const char *zVfs /* Name of VFS module to use */ -); - -/* -** CAPI3REF: Obtain Values For URI Parameters -** -** These are utility routines, useful to VFS implementations, that check -** to see if a database file was a URI that contained a specific query -** parameter, and if so obtains the value of that query parameter. -** -** If F is the database filename pointer passed into the xOpen() method of -** a VFS implementation when the flags parameter to xOpen() has one or -** more of the [SQLITE_OPEN_URI] or [SQLITE_OPEN_MAIN_DB] bits set and -** P is the name of the query parameter, then -** sqlite3_uri_parameter(F,P) returns the value of the P -** parameter if it exists or a NULL pointer if P does not appear as a -** query parameter on F. If P is a query parameter of F -** has no explicit value, then sqlite3_uri_parameter(F,P) returns -** a pointer to an empty string. -** -** The sqlite3_uri_boolean(F,P,B) routine assumes that P is a boolean -** parameter and returns true (1) or false (0) according to the value -** of P. The sqlite3_uri_boolean(F,P,B) routine returns true (1) if the -** value of query parameter P is one of "yes", "true", or "on" in any -** case or if the value begins with a non-zero number. The -** sqlite3_uri_boolean(F,P,B) routines returns false (0) if the value of -** query parameter P is one of "no", "false", or "off" in any case or -** if the value begins with a numeric zero. If P is not a query -** parameter on F or if the value of P is does not match any of the -** above, then sqlite3_uri_boolean(F,P,B) returns (B!=0). -** -** The sqlite3_uri_int64(F,P,D) routine converts the value of P into a -** 64-bit signed integer and returns that integer, or D if P does not -** exist. If the value of P is something other than an integer, then -** zero is returned. -** -** If F is a NULL pointer, then sqlite3_uri_parameter(F,P) returns NULL and -** sqlite3_uri_boolean(F,P,B) returns B. If F is not a NULL pointer and -** is not a database file pathname pointer that SQLite passed into the xOpen -** VFS method, then the behavior of this routine is undefined and probably -** undesirable. -*/ -SQLITE_API const char *sqlite3_uri_parameter(const char *zFilename, const char *zParam); -SQLITE_API int sqlite3_uri_boolean(const char *zFile, const char *zParam, int bDefault); -SQLITE_API sqlite3_int64 sqlite3_uri_int64(const char*, const char*, sqlite3_int64); - - -/* -** CAPI3REF: Error Codes And Messages -** -** ^The sqlite3_errcode() interface returns the numeric [result code] or -** [extended result code] for the most recent failed sqlite3_* API call -** associated with a [database connection]. If a prior API call failed -** but the most recent API call succeeded, the return value from -** sqlite3_errcode() is undefined. ^The sqlite3_extended_errcode() -** interface is the same except that it always returns the -** [extended result code] even when extended result codes are -** disabled. -** -** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language -** text that describes the error, as either UTF-8 or UTF-16 respectively. -** ^(Memory to hold the error message string is managed internally. -** The application does not need to worry about freeing the result. -** However, the error string might be overwritten or deallocated by -** subsequent calls to other SQLite interface functions.)^ -** -** ^The sqlite3_errstr() interface returns the English-language text -** that describes the [result code], as UTF-8. -** ^(Memory to hold the error message string is managed internally -** and must not be freed by the application)^. -** -** When the serialized [threading mode] is in use, it might be the -** case that a second error occurs on a separate thread in between -** the time of the first error and the call to these interfaces. -** When that happens, the second error will be reported since these -** interfaces always report the most recent result. To avoid -** this, each thread can obtain exclusive use of the [database connection] D -** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning -** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after -** all calls to the interfaces listed here are completed. -** -** If an interface fails with SQLITE_MISUSE, that means the interface -** was invoked incorrectly by the application. In that case, the -** error code and message may or may not be set. -*/ -SQLITE_API int sqlite3_errcode(sqlite3 *db); -SQLITE_API int sqlite3_extended_errcode(sqlite3 *db); -SQLITE_API const char *sqlite3_errmsg(sqlite3*); -SQLITE_API const void *sqlite3_errmsg16(sqlite3*); -SQLITE_API const char *sqlite3_errstr(int); - -/* -** CAPI3REF: SQL Statement Object -** KEYWORDS: {prepared statement} {prepared statements} -** -** An instance of this object represents a single SQL statement. -** This object is variously known as a "prepared statement" or a -** "compiled SQL statement" or simply as a "statement". -** -** The life of a statement object goes something like this: -** -**
    -**
  1. Create the object using [sqlite3_prepare_v2()] or a related -** function. -**
  2. Bind values to [host parameters] using the sqlite3_bind_*() -** interfaces. -**
  3. Run the SQL by calling [sqlite3_step()] one or more times. -**
  4. Reset the statement using [sqlite3_reset()] then go back -** to step 2. Do this zero or more times. -**
  5. Destroy the object using [sqlite3_finalize()]. -**
-** -** Refer to documentation on individual methods above for additional -** information. -*/ -typedef struct sqlite3_stmt sqlite3_stmt; - -/* -** CAPI3REF: Run-time Limits -** -** ^(This interface allows the size of various constructs to be limited -** on a connection by connection basis. The first parameter is the -** [database connection] whose limit is to be set or queried. The -** second parameter is one of the [limit categories] that define a -** class of constructs to be size limited. The third parameter is the -** new limit for that construct.)^ -** -** ^If the new limit is a negative number, the limit is unchanged. -** ^(For each limit category SQLITE_LIMIT_NAME there is a -** [limits | hard upper bound] -** set at compile-time by a C preprocessor macro called -** [limits | SQLITE_MAX_NAME]. -** (The "_LIMIT_" in the name is changed to "_MAX_".))^ -** ^Attempts to increase a limit above its hard upper bound are -** silently truncated to the hard upper bound. -** -** ^Regardless of whether or not the limit was changed, the -** [sqlite3_limit()] interface returns the prior value of the limit. -** ^Hence, to find the current value of a limit without changing it, -** simply invoke this interface with the third parameter set to -1. -** -** Run-time limits are intended for use in applications that manage -** both their own internal database and also databases that are controlled -** by untrusted external sources. An example application might be a -** web browser that has its own databases for storing history and -** separate databases controlled by JavaScript applications downloaded -** off the Internet. The internal databases can be given the -** large, default limits. Databases managed by external sources can -** be given much smaller limits designed to prevent a denial of service -** attack. Developers might also want to use the [sqlite3_set_authorizer()] -** interface to further control untrusted SQL. The size of the database -** created by an untrusted script can be contained using the -** [max_page_count] [PRAGMA]. -** -** New run-time limit categories may be added in future releases. -*/ -SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal); - -/* -** CAPI3REF: Run-Time Limit Categories -** KEYWORDS: {limit category} {*limit categories} -** -** These constants define various performance limits -** that can be lowered at run-time using [sqlite3_limit()]. -** The synopsis of the meanings of the various limits is shown below. -** Additional information is available at [limits | Limits in SQLite]. -** -**
-** [[SQLITE_LIMIT_LENGTH]] ^(
SQLITE_LIMIT_LENGTH
-**
The maximum size of any string or BLOB or table row, in bytes.
)^ -** -** [[SQLITE_LIMIT_SQL_LENGTH]] ^(
SQLITE_LIMIT_SQL_LENGTH
-**
The maximum length of an SQL statement, in bytes.
)^ -** -** [[SQLITE_LIMIT_COLUMN]] ^(
SQLITE_LIMIT_COLUMN
-**
The maximum number of columns in a table definition or in the -** result set of a [SELECT] or the maximum number of columns in an index -** or in an ORDER BY or GROUP BY clause.
)^ -** -** [[SQLITE_LIMIT_EXPR_DEPTH]] ^(
SQLITE_LIMIT_EXPR_DEPTH
-**
The maximum depth of the parse tree on any expression.
)^ -** -** [[SQLITE_LIMIT_COMPOUND_SELECT]] ^(
SQLITE_LIMIT_COMPOUND_SELECT
-**
The maximum number of terms in a compound SELECT statement.
)^ -** -** [[SQLITE_LIMIT_VDBE_OP]] ^(
SQLITE_LIMIT_VDBE_OP
-**
The maximum number of instructions in a virtual machine program -** used to implement an SQL statement. This limit is not currently -** enforced, though that might be added in some future release of -** SQLite.
)^ -** -** [[SQLITE_LIMIT_FUNCTION_ARG]] ^(
SQLITE_LIMIT_FUNCTION_ARG
-**
The maximum number of arguments on a function.
)^ -** -** [[SQLITE_LIMIT_ATTACHED]] ^(
SQLITE_LIMIT_ATTACHED
-**
The maximum number of [ATTACH | attached databases].)^
-** -** [[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]] -** ^(
SQLITE_LIMIT_LIKE_PATTERN_LENGTH
-**
The maximum length of the pattern argument to the [LIKE] or -** [GLOB] operators.
)^ -** -** [[SQLITE_LIMIT_VARIABLE_NUMBER]] -** ^(
SQLITE_LIMIT_VARIABLE_NUMBER
-**
The maximum index number of any [parameter] in an SQL statement.)^ -** -** [[SQLITE_LIMIT_TRIGGER_DEPTH]] ^(
SQLITE_LIMIT_TRIGGER_DEPTH
-**
The maximum depth of recursion for triggers.
)^ -**
-*/ -#define SQLITE_LIMIT_LENGTH 0 -#define SQLITE_LIMIT_SQL_LENGTH 1 -#define SQLITE_LIMIT_COLUMN 2 -#define SQLITE_LIMIT_EXPR_DEPTH 3 -#define SQLITE_LIMIT_COMPOUND_SELECT 4 -#define SQLITE_LIMIT_VDBE_OP 5 -#define SQLITE_LIMIT_FUNCTION_ARG 6 -#define SQLITE_LIMIT_ATTACHED 7 -#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH 8 -#define SQLITE_LIMIT_VARIABLE_NUMBER 9 -#define SQLITE_LIMIT_TRIGGER_DEPTH 10 - -/* -** CAPI3REF: Compiling An SQL Statement -** KEYWORDS: {SQL statement compiler} -** -** To execute an SQL query, it must first be compiled into a byte-code -** program using one of these routines. -** -** The first argument, "db", is a [database connection] obtained from a -** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or -** [sqlite3_open16()]. The database connection must not have been closed. -** -** The second argument, "zSql", is the statement to be compiled, encoded -** as either UTF-8 or UTF-16. The sqlite3_prepare() and sqlite3_prepare_v2() -** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2() -** use UTF-16. -** -** ^If the nByte argument is less than zero, then zSql is read up to the -** first zero terminator. ^If nByte is non-negative, then it is the maximum -** number of bytes read from zSql. ^When nByte is non-negative, the -** zSql string ends at either the first '\000' or '\u0000' character or -** the nByte-th byte, whichever comes first. If the caller knows -** that the supplied string is nul-terminated, then there is a small -** performance advantage to be gained by passing an nByte parameter that -** is equal to the number of bytes in the input string including -** the nul-terminator bytes as this saves SQLite from having to -** make a copy of the input string. -** -** ^If pzTail is not NULL then *pzTail is made to point to the first byte -** past the end of the first SQL statement in zSql. These routines only -** compile the first statement in zSql, so *pzTail is left pointing to -** what remains uncompiled. -** -** ^*ppStmt is left pointing to a compiled [prepared statement] that can be -** executed using [sqlite3_step()]. ^If there is an error, *ppStmt is set -** to NULL. ^If the input text contains no SQL (if the input is an empty -** string or a comment) then *ppStmt is set to NULL. -** The calling procedure is responsible for deleting the compiled -** SQL statement using [sqlite3_finalize()] after it has finished with it. -** ppStmt may not be NULL. -** -** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK]; -** otherwise an [error code] is returned. -** -** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are -** recommended for all new programs. The two older interfaces are retained -** for backwards compatibility, but their use is discouraged. -** ^In the "v2" interfaces, the prepared statement -** that is returned (the [sqlite3_stmt] object) contains a copy of the -** original SQL text. This causes the [sqlite3_step()] interface to -** behave differently in three ways: -** -**
    -**
  1. -** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it -** always used to do, [sqlite3_step()] will automatically recompile the SQL -** statement and try to run it again. -**
  2. -** -**
  3. -** ^When an error occurs, [sqlite3_step()] will return one of the detailed -** [error codes] or [extended error codes]. ^The legacy behavior was that -** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code -** and the application would have to make a second call to [sqlite3_reset()] -** in order to find the underlying cause of the problem. With the "v2" prepare -** interfaces, the underlying reason for the error is returned immediately. -**
  4. -** -**
  5. -** ^If the specific value bound to [parameter | host parameter] in the -** WHERE clause might influence the choice of query plan for a statement, -** then the statement will be automatically recompiled, as if there had been -** a schema change, on the first [sqlite3_step()] call following any change -** to the [sqlite3_bind_text | bindings] of that [parameter]. -** ^The specific value of WHERE-clause [parameter] might influence the -** choice of query plan if the parameter is the left-hand side of a [LIKE] -** or [GLOB] operator or if the parameter is compared to an indexed column -** and the [SQLITE_ENABLE_STAT3] compile-time option is enabled. -** the -**
  6. -**
-*/ -SQLITE_API int sqlite3_prepare( - sqlite3 *db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare_v2( - sqlite3 *db, /* Database handle */ - const char *zSql, /* SQL statement, UTF-8 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const char **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare16( - sqlite3 *db, /* Database handle */ - const void *zSql, /* SQL statement, UTF-16 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); -SQLITE_API int sqlite3_prepare16_v2( - sqlite3 *db, /* Database handle */ - const void *zSql, /* SQL statement, UTF-16 encoded */ - int nByte, /* Maximum length of zSql in bytes. */ - sqlite3_stmt **ppStmt, /* OUT: Statement handle */ - const void **pzTail /* OUT: Pointer to unused portion of zSql */ -); - -/* -** CAPI3REF: Retrieving Statement SQL -** -** ^This interface can be used to retrieve a saved copy of the original -** SQL text used to create a [prepared statement] if that statement was -** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()]. -*/ -SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Determine If An SQL Statement Writes The Database -** -** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if -** and only if the [prepared statement] X makes no direct changes to -** the content of the database file. -** -** Note that [application-defined SQL functions] or -** [virtual tables] might change the database indirectly as a side effect. -** ^(For example, if an application defines a function "eval()" that -** calls [sqlite3_exec()], then the following SQL statement would -** change the database file through side-effects: -** -**
-**    SELECT eval('DELETE FROM t1') FROM t2;
-** 
-** -** But because the [SELECT] statement does not change the database file -** directly, sqlite3_stmt_readonly() would still return true.)^ -** -** ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK], -** [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true, -** since the statements themselves do not actually modify the database but -** rather they control the timing of when other statements modify the -** database. ^The [ATTACH] and [DETACH] statements also cause -** sqlite3_stmt_readonly() to return true since, while those statements -** change the configuration of a database connection, they do not make -** changes to the content of the database files on disk. -*/ -SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Determine If A Prepared Statement Has Been Reset -** -** ^The sqlite3_stmt_busy(S) interface returns true (non-zero) if the -** [prepared statement] S has been stepped at least once using -** [sqlite3_step(S)] but has not run to completion and/or has not -** been reset using [sqlite3_reset(S)]. ^The sqlite3_stmt_busy(S) -** interface returns false if S is a NULL pointer. If S is not a -** NULL pointer and is not a pointer to a valid [prepared statement] -** object, then the behavior is undefined and probably undesirable. -** -** This interface can be used in combination [sqlite3_next_stmt()] -** to locate all prepared statements associated with a database -** connection that are in need of being reset. This can be used, -** for example, in diagnostic routines to search for prepared -** statements that are holding a transaction open. -*/ -SQLITE_API int sqlite3_stmt_busy(sqlite3_stmt*); - -/* -** CAPI3REF: Dynamically Typed Value Object -** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value} -** -** SQLite uses the sqlite3_value object to represent all values -** that can be stored in a database table. SQLite uses dynamic typing -** for the values it stores. ^Values stored in sqlite3_value objects -** can be integers, floating point values, strings, BLOBs, or NULL. -** -** An sqlite3_value object may be either "protected" or "unprotected". -** Some interfaces require a protected sqlite3_value. Other interfaces -** will accept either a protected or an unprotected sqlite3_value. -** Every interface that accepts sqlite3_value arguments specifies -** whether or not it requires a protected sqlite3_value. -** -** The terms "protected" and "unprotected" refer to whether or not -** a mutex is held. An internal mutex is held for a protected -** sqlite3_value object but no mutex is held for an unprotected -** sqlite3_value object. If SQLite is compiled to be single-threaded -** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0) -** or if SQLite is run in one of reduced mutex modes -** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD] -** then there is no distinction between protected and unprotected -** sqlite3_value objects and they can be used interchangeably. However, -** for maximum code portability it is recommended that applications -** still make the distinction between protected and unprotected -** sqlite3_value objects even when not strictly required. -** -** ^The sqlite3_value objects that are passed as parameters into the -** implementation of [application-defined SQL functions] are protected. -** ^The sqlite3_value object returned by -** [sqlite3_column_value()] is unprotected. -** Unprotected sqlite3_value objects may only be used with -** [sqlite3_result_value()] and [sqlite3_bind_value()]. -** The [sqlite3_value_blob | sqlite3_value_type()] family of -** interfaces require protected sqlite3_value objects. -*/ -typedef struct Mem sqlite3_value; - -/* -** CAPI3REF: SQL Function Context Object -** -** The context in which an SQL function executes is stored in an -** sqlite3_context object. ^A pointer to an sqlite3_context object -** is always first parameter to [application-defined SQL functions]. -** The application-defined SQL function implementation will pass this -** pointer through into calls to [sqlite3_result_int | sqlite3_result()], -** [sqlite3_aggregate_context()], [sqlite3_user_data()], -** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()], -** and/or [sqlite3_set_auxdata()]. -*/ -typedef struct sqlite3_context sqlite3_context; - -/* -** CAPI3REF: Binding Values To Prepared Statements -** KEYWORDS: {host parameter} {host parameters} {host parameter name} -** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding} -** -** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants, -** literals may be replaced by a [parameter] that matches one of following -** templates: -** -**
    -**
  • ? -**
  • ?NNN -**
  • :VVV -**
  • @VVV -**
  • $VVV -**
-** -** In the templates above, NNN represents an integer literal, -** and VVV represents an alphanumeric identifier.)^ ^The values of these -** parameters (also called "host parameter names" or "SQL parameters") -** can be set using the sqlite3_bind_*() routines defined here. -** -** ^The first argument to the sqlite3_bind_*() routines is always -** a pointer to the [sqlite3_stmt] object returned from -** [sqlite3_prepare_v2()] or its variants. -** -** ^The second argument is the index of the SQL parameter to be set. -** ^The leftmost SQL parameter has an index of 1. ^When the same named -** SQL parameter is used more than once, second and subsequent -** occurrences have the same index as the first occurrence. -** ^The index for named parameters can be looked up using the -** [sqlite3_bind_parameter_index()] API if desired. ^The index -** for "?NNN" parameters is the value of NNN. -** ^The NNN value must be between 1 and the [sqlite3_limit()] -** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999). -** -** ^The third argument is the value to bind to the parameter. -** -** ^(In those routines that have a fourth argument, its value is the -** number of bytes in the parameter. To be clear: the value is the -** number of bytes in the value, not the number of characters.)^ -** ^If the fourth parameter to sqlite3_bind_text() or sqlite3_bind_text16() -** is negative, then the length of the string is -** the number of bytes up to the first zero terminator. -** If the fourth parameter to sqlite3_bind_blob() is negative, then -** the behavior is undefined. -** If a non-negative fourth parameter is provided to sqlite3_bind_text() -** or sqlite3_bind_text16() then that parameter must be the byte offset -** where the NUL terminator would occur assuming the string were NUL -** terminated. If any NUL characters occur at byte offsets less than -** the value of the fourth parameter then the resulting string value will -** contain embedded NULs. The result of expressions involving strings -** with embedded NULs is undefined. -** -** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and -** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or -** string after SQLite has finished with it. ^The destructor is called -** to dispose of the BLOB or string even if the call to sqlite3_bind_blob(), -** sqlite3_bind_text(), or sqlite3_bind_text16() fails. -** ^If the fifth argument is -** the special value [SQLITE_STATIC], then SQLite assumes that the -** information is in static, unmanaged space and does not need to be freed. -** ^If the fifth argument has the value [SQLITE_TRANSIENT], then -** SQLite makes its own private copy of the data immediately, before -** the sqlite3_bind_*() routine returns. -** -** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that -** is filled with zeroes. ^A zeroblob uses a fixed amount of memory -** (just an integer to hold its size) while it is being processed. -** Zeroblobs are intended to serve as placeholders for BLOBs whose -** content is later written using -** [sqlite3_blob_open | incremental BLOB I/O] routines. -** ^A negative value for the zeroblob results in a zero-length BLOB. -** -** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer -** for the [prepared statement] or with a prepared statement for which -** [sqlite3_step()] has been called more recently than [sqlite3_reset()], -** then the call will return [SQLITE_MISUSE]. If any sqlite3_bind_() -** routine is passed a [prepared statement] that has been finalized, the -** result is undefined and probably harmful. -** -** ^Bindings are not cleared by the [sqlite3_reset()] routine. -** ^Unbound parameters are interpreted as NULL. -** -** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an -** [error code] if anything goes wrong. -** ^[SQLITE_RANGE] is returned if the parameter -** index is out of range. ^[SQLITE_NOMEM] is returned if malloc() fails. -** -** See also: [sqlite3_bind_parameter_count()], -** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); -SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double); -SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int); -SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64); -SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int); -SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*)); -SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*)); -SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*); -SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n); - -/* -** CAPI3REF: Number Of SQL Parameters -** -** ^This routine can be used to find the number of [SQL parameters] -** in a [prepared statement]. SQL parameters are tokens of the -** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as -** placeholders for values that are [sqlite3_bind_blob | bound] -** to the parameters at a later time. -** -** ^(This routine actually returns the index of the largest (rightmost) -** parameter. For all forms except ?NNN, this will correspond to the -** number of unique parameters. If parameters of the ?NNN form are used, -** there may be gaps in the list.)^ -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_name()], and -** [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*); - -/* -** CAPI3REF: Name Of A Host Parameter -** -** ^The sqlite3_bind_parameter_name(P,N) interface returns -** the name of the N-th [SQL parameter] in the [prepared statement] P. -** ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA" -** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA" -** respectively. -** In other words, the initial ":" or "$" or "@" or "?" -** is included as part of the name.)^ -** ^Parameters of the form "?" without a following integer have no name -** and are referred to as "nameless" or "anonymous parameters". -** -** ^The first host parameter has an index of 1, not 0. -** -** ^If the value N is out of range or if the N-th parameter is -** nameless, then NULL is returned. ^The returned string is -** always in UTF-8 encoding even if the named parameter was -** originally specified as UTF-16 in [sqlite3_prepare16()] or -** [sqlite3_prepare16_v2()]. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_count()], and -** [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int); - -/* -** CAPI3REF: Index Of A Parameter With A Given Name -** -** ^Return the index of an SQL parameter given its name. ^The -** index value returned is suitable for use as the second -** parameter to [sqlite3_bind_blob|sqlite3_bind()]. ^A zero -** is returned if no matching parameter is found. ^The parameter -** name must be given in UTF-8 even if the original statement -** was prepared from UTF-16 text using [sqlite3_prepare16_v2()]. -** -** See also: [sqlite3_bind_blob|sqlite3_bind()], -** [sqlite3_bind_parameter_count()], and -** [sqlite3_bind_parameter_index()]. -*/ -SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName); - -/* -** CAPI3REF: Reset All Bindings On A Prepared Statement -** -** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset -** the [sqlite3_bind_blob | bindings] on a [prepared statement]. -** ^Use this routine to reset all host parameters to NULL. -*/ -SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*); - -/* -** CAPI3REF: Number Of Columns In A Result Set -** -** ^Return the number of columns in the result set returned by the -** [prepared statement]. ^This routine returns 0 if pStmt is an SQL -** statement that does not return data (for example an [UPDATE]). -** -** See also: [sqlite3_data_count()] -*/ -SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Column Names In A Result Set -** -** ^These routines return the name assigned to a particular column -** in the result set of a [SELECT] statement. ^The sqlite3_column_name() -** interface returns a pointer to a zero-terminated UTF-8 string -** and sqlite3_column_name16() returns a pointer to a zero-terminated -** UTF-16 string. ^The first parameter is the [prepared statement] -** that implements the [SELECT] statement. ^The second parameter is the -** column number. ^The leftmost column is number 0. -** -** ^The returned string pointer is valid until either the [prepared statement] -** is destroyed by [sqlite3_finalize()] or until the statement is automatically -** reprepared by the first call to [sqlite3_step()] for a particular run -** or until the next call to -** sqlite3_column_name() or sqlite3_column_name16() on the same column. -** -** ^If sqlite3_malloc() fails during the processing of either routine -** (for example during a conversion from UTF-8 to UTF-16) then a -** NULL pointer is returned. -** -** ^The name of a result column is the value of the "AS" clause for -** that column, if there is an AS clause. If there is no AS clause -** then the name of the column is unspecified and may change from -** one release of SQLite to the next. -*/ -SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N); -SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); - -/* -** CAPI3REF: Source Of Data In A Query Result -** -** ^These routines provide a means to determine the database, table, and -** table column that is the origin of a particular result column in -** [SELECT] statement. -** ^The name of the database or table or column can be returned as -** either a UTF-8 or UTF-16 string. ^The _database_ routines return -** the database name, the _table_ routines return the table name, and -** the origin_ routines return the column name. -** ^The returned string is valid until the [prepared statement] is destroyed -** using [sqlite3_finalize()] or until the statement is automatically -** reprepared by the first call to [sqlite3_step()] for a particular run -** or until the same information is requested -** again in a different encoding. -** -** ^The names returned are the original un-aliased names of the -** database, table, and column. -** -** ^The first argument to these interfaces is a [prepared statement]. -** ^These functions return information about the Nth result column returned by -** the statement, where N is the second function argument. -** ^The left-most column is column 0 for these routines. -** -** ^If the Nth column returned by the statement is an expression or -** subquery and is not a column value, then all of these functions return -** NULL. ^These routine might also return NULL if a memory allocation error -** occurs. ^Otherwise, they return the name of the attached database, table, -** or column that query result column was extracted from. -** -** ^As with all other SQLite APIs, those whose names end with "16" return -** UTF-16 encoded strings and the other functions return UTF-8. -** -** ^These APIs are only available if the library was compiled with the -** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol. -** -** If two or more threads call one or more of these routines against the same -** prepared statement and column at the same time then the results are -** undefined. -** -** If two or more threads call one or more -** [sqlite3_column_database_name | column metadata interfaces] -** for the same [prepared statement] and result column -** at the same time then the results are undefined. -*/ -SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int); -SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int); -SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int); - -/* -** CAPI3REF: Declared Datatype Of A Query Result -** -** ^(The first parameter is a [prepared statement]. -** If this statement is a [SELECT] statement and the Nth column of the -** returned result set of that [SELECT] is a table column (not an -** expression or subquery) then the declared type of the table -** column is returned.)^ ^If the Nth column of the result set is an -** expression or subquery, then a NULL pointer is returned. -** ^The returned string is always UTF-8 encoded. -** -** ^(For example, given the database schema: -** -** CREATE TABLE t1(c1 VARIANT); -** -** and the following statement to be compiled: -** -** SELECT c1 + 1, c1 FROM t1; -** -** this routine would return the string "VARIANT" for the second result -** column (i==1), and a NULL pointer for the first result column (i==0).)^ -** -** ^SQLite uses dynamic run-time typing. ^So just because a column -** is declared to contain a particular type does not mean that the -** data stored in that column is of the declared type. SQLite is -** strongly typed, but the typing is dynamic not static. ^Type -** is associated with individual values, not with the containers -** used to hold those values. -*/ -SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int); -SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int); - -/* -** CAPI3REF: Evaluate An SQL Statement -** -** After a [prepared statement] has been prepared using either -** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy -** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function -** must be called one or more times to evaluate the statement. -** -** The details of the behavior of the sqlite3_step() interface depend -** on whether the statement was prepared using the newer "v2" interface -** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy -** interface [sqlite3_prepare()] and [sqlite3_prepare16()]. The use of the -** new "v2" interface is recommended for new applications but the legacy -** interface will continue to be supported. -** -** ^In the legacy interface, the return value will be either [SQLITE_BUSY], -** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE]. -** ^With the "v2" interface, any of the other [result codes] or -** [extended result codes] might be returned as well. -** -** ^[SQLITE_BUSY] means that the database engine was unable to acquire the -** database locks it needs to do its job. ^If the statement is a [COMMIT] -** or occurs outside of an explicit transaction, then you can retry the -** statement. If the statement is not a [COMMIT] and occurs within an -** explicit transaction then you should rollback the transaction before -** continuing. -** -** ^[SQLITE_DONE] means that the statement has finished executing -** successfully. sqlite3_step() should not be called again on this virtual -** machine without first calling [sqlite3_reset()] to reset the virtual -** machine back to its initial state. -** -** ^If the SQL statement being executed returns any data, then [SQLITE_ROW] -** is returned each time a new row of data is ready for processing by the -** caller. The values may be accessed using the [column access functions]. -** sqlite3_step() is called again to retrieve the next row of data. -** -** ^[SQLITE_ERROR] means that a run-time error (such as a constraint -** violation) has occurred. sqlite3_step() should not be called again on -** the VM. More information may be found by calling [sqlite3_errmsg()]. -** ^With the legacy interface, a more specific error code (for example, -** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth) -** can be obtained by calling [sqlite3_reset()] on the -** [prepared statement]. ^In the "v2" interface, -** the more specific error code is returned directly by sqlite3_step(). -** -** [SQLITE_MISUSE] means that the this routine was called inappropriately. -** Perhaps it was called on a [prepared statement] that has -** already been [sqlite3_finalize | finalized] or on one that had -** previously returned [SQLITE_ERROR] or [SQLITE_DONE]. Or it could -** be the case that the same database connection is being used by two or -** more threads at the same moment in time. -** -** For all versions of SQLite up to and including 3.6.23.1, a call to -** [sqlite3_reset()] was required after sqlite3_step() returned anything -** other than [SQLITE_ROW] before any subsequent invocation of -** sqlite3_step(). Failure to reset the prepared statement using -** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from -** sqlite3_step(). But after version 3.6.23.1, sqlite3_step() began -** calling [sqlite3_reset()] automatically in this circumstance rather -** than returning [SQLITE_MISUSE]. This is not considered a compatibility -** break because any application that ever receives an SQLITE_MISUSE error -** is broken by definition. The [SQLITE_OMIT_AUTORESET] compile-time option -** can be used to restore the legacy behavior. -** -** Goofy Interface Alert: In the legacy interface, the sqlite3_step() -** API always returns a generic error code, [SQLITE_ERROR], following any -** error other than [SQLITE_BUSY] and [SQLITE_MISUSE]. You must call -** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the -** specific [error codes] that better describes the error. -** We admit that this is a goofy design. The problem has been fixed -** with the "v2" interface. If you prepare all of your SQL statements -** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead -** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces, -** then the more specific [error codes] are returned directly -** by sqlite3_step(). The use of the "v2" interface is recommended. -*/ -SQLITE_API int sqlite3_step(sqlite3_stmt*); - -/* -** CAPI3REF: Number of columns in a result set -** -** ^The sqlite3_data_count(P) interface returns the number of columns in the -** current row of the result set of [prepared statement] P. -** ^If prepared statement P does not have results ready to return -** (via calls to the [sqlite3_column_int | sqlite3_column_*()] of -** interfaces) then sqlite3_data_count(P) returns 0. -** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer. -** ^The sqlite3_data_count(P) routine returns 0 if the previous call to -** [sqlite3_step](P) returned [SQLITE_DONE]. ^The sqlite3_data_count(P) -** will return non-zero if previous call to [sqlite3_step](P) returned -** [SQLITE_ROW], except in the case of the [PRAGMA incremental_vacuum] -** where it always returns zero since each step of that multi-step -** pragma returns 0 columns of data. -** -** See also: [sqlite3_column_count()] -*/ -SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Fundamental Datatypes -** KEYWORDS: SQLITE_TEXT -** -** ^(Every value in SQLite has one of five fundamental datatypes: -** -**
    -**
  • 64-bit signed integer -**
  • 64-bit IEEE floating point number -**
  • string -**
  • BLOB -**
  • NULL -**
)^ -** -** These constants are codes for each of those types. -** -** Note that the SQLITE_TEXT constant was also used in SQLite version 2 -** for a completely different meaning. Software that links against both -** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not -** SQLITE_TEXT. -*/ -#define SQLITE_INTEGER 1 -#define SQLITE_FLOAT 2 -#define SQLITE_BLOB 4 -#define SQLITE_NULL 5 -#ifdef SQLITE_TEXT -# undef SQLITE_TEXT -#else -# define SQLITE_TEXT 3 -#endif -#define SQLITE3_TEXT 3 - -/* -** CAPI3REF: Result Values From A Query -** KEYWORDS: {column access functions} -** -** These routines form the "result set" interface. -** -** ^These routines return information about a single column of the current -** result row of a query. ^In every case the first argument is a pointer -** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*] -** that was returned from [sqlite3_prepare_v2()] or one of its variants) -** and the second argument is the index of the column for which information -** should be returned. ^The leftmost column of the result set has the index 0. -** ^The number of columns in the result can be determined using -** [sqlite3_column_count()]. -** -** If the SQL statement does not currently point to a valid row, or if the -** column index is out of range, the result is undefined. -** These routines may only be called when the most recent call to -** [sqlite3_step()] has returned [SQLITE_ROW] and neither -** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently. -** If any of these routines are called after [sqlite3_reset()] or -** [sqlite3_finalize()] or after [sqlite3_step()] has returned -** something other than [SQLITE_ROW], the results are undefined. -** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()] -** are called from a different thread while any of these routines -** are pending, then the results are undefined. -** -** ^The sqlite3_column_type() routine returns the -** [SQLITE_INTEGER | datatype code] for the initial data type -** of the result column. ^The returned value is one of [SQLITE_INTEGER], -** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL]. The value -** returned by sqlite3_column_type() is only meaningful if no type -** conversions have occurred as described below. After a type conversion, -** the value returned by sqlite3_column_type() is undefined. Future -** versions of SQLite may change the behavior of sqlite3_column_type() -** following a type conversion. -** -** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes() -** routine returns the number of bytes in that BLOB or string. -** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts -** the string to UTF-8 and then returns the number of bytes. -** ^If the result is a numeric value then sqlite3_column_bytes() uses -** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns -** the number of bytes in that string. -** ^If the result is NULL, then sqlite3_column_bytes() returns zero. -** -** ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16() -** routine returns the number of bytes in that BLOB or string. -** ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts -** the string to UTF-16 and then returns the number of bytes. -** ^If the result is a numeric value then sqlite3_column_bytes16() uses -** [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns -** the number of bytes in that string. -** ^If the result is NULL, then sqlite3_column_bytes16() returns zero. -** -** ^The values returned by [sqlite3_column_bytes()] and -** [sqlite3_column_bytes16()] do not include the zero terminators at the end -** of the string. ^For clarity: the values returned by -** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of -** bytes in the string, not the number of characters. -** -** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(), -** even empty strings, are always zero-terminated. ^The return -** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer. -** -** ^The object returned by [sqlite3_column_value()] is an -** [unprotected sqlite3_value] object. An unprotected sqlite3_value object -** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()]. -** If the [unprotected sqlite3_value] object returned by -** [sqlite3_column_value()] is used in any other way, including calls -** to routines like [sqlite3_value_int()], [sqlite3_value_text()], -** or [sqlite3_value_bytes()], then the behavior is undefined. -** -** These routines attempt to convert the value where appropriate. ^For -** example, if the internal representation is FLOAT and a text result -** is requested, [sqlite3_snprintf()] is used internally to perform the -** conversion automatically. ^(The following table details the conversions -** that are applied: -** -**
-** -**
Internal
Type
Requested
Type
Conversion -** -**
NULL INTEGER Result is 0 -**
NULL FLOAT Result is 0.0 -**
NULL TEXT Result is NULL pointer -**
NULL BLOB Result is NULL pointer -**
INTEGER FLOAT Convert from integer to float -**
INTEGER TEXT ASCII rendering of the integer -**
INTEGER BLOB Same as INTEGER->TEXT -**
FLOAT INTEGER Convert from float to integer -**
FLOAT TEXT ASCII rendering of the float -**
FLOAT BLOB Same as FLOAT->TEXT -**
TEXT INTEGER Use atoi() -**
TEXT FLOAT Use atof() -**
TEXT BLOB No change -**
BLOB INTEGER Convert to TEXT then use atoi() -**
BLOB FLOAT Convert to TEXT then use atof() -**
BLOB TEXT Add a zero terminator if needed -**
-**
)^ -** -** The table above makes reference to standard C library functions atoi() -** and atof(). SQLite does not really use these functions. It has its -** own equivalent internal routines. The atoi() and atof() names are -** used in the table for brevity and because they are familiar to most -** C programmers. -** -** Note that when type conversions occur, pointers returned by prior -** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or -** sqlite3_column_text16() may be invalidated. -** Type conversions and pointer invalidations might occur -** in the following cases: -** -**
    -**
  • The initial content is a BLOB and sqlite3_column_text() or -** sqlite3_column_text16() is called. A zero-terminator might -** need to be added to the string.
  • -**
  • The initial content is UTF-8 text and sqlite3_column_bytes16() or -** sqlite3_column_text16() is called. The content must be converted -** to UTF-16.
  • -**
  • The initial content is UTF-16 text and sqlite3_column_bytes() or -** sqlite3_column_text() is called. The content must be converted -** to UTF-8.
  • -**
-** -** ^Conversions between UTF-16be and UTF-16le are always done in place and do -** not invalidate a prior pointer, though of course the content of the buffer -** that the prior pointer references will have been modified. Other kinds -** of conversion are done in place when it is possible, but sometimes they -** are not possible and in those cases prior pointers are invalidated. -** -** The safest and easiest to remember policy is to invoke these routines -** in one of the following ways: -** -**
    -**
  • sqlite3_column_text() followed by sqlite3_column_bytes()
  • -**
  • sqlite3_column_blob() followed by sqlite3_column_bytes()
  • -**
  • sqlite3_column_text16() followed by sqlite3_column_bytes16()
  • -**
-** -** In other words, you should call sqlite3_column_text(), -** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result -** into the desired format, then invoke sqlite3_column_bytes() or -** sqlite3_column_bytes16() to find the size of the result. Do not mix calls -** to sqlite3_column_text() or sqlite3_column_blob() with calls to -** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() -** with calls to sqlite3_column_bytes(). -** -** ^The pointers returned are valid until a type conversion occurs as -** described above, or until [sqlite3_step()] or [sqlite3_reset()] or -** [sqlite3_finalize()] is called. ^The memory space used to hold strings -** and BLOBs is freed automatically. Do not pass the pointers returned -** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into -** [sqlite3_free()]. -** -** ^(If a memory allocation error occurs during the evaluation of any -** of these routines, a default value is returned. The default value -** is either the integer 0, the floating point number 0.0, or a NULL -** pointer. Subsequent calls to [sqlite3_errcode()] will return -** [SQLITE_NOMEM].)^ -*/ -SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol); -SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol); -SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol); -SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol); -SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol); -SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol); - -/* -** CAPI3REF: Destroy A Prepared Statement Object -** -** ^The sqlite3_finalize() function is called to delete a [prepared statement]. -** ^If the most recent evaluation of the statement encountered no errors -** or if the statement is never been evaluated, then sqlite3_finalize() returns -** SQLITE_OK. ^If the most recent evaluation of statement S failed, then -** sqlite3_finalize(S) returns the appropriate [error code] or -** [extended error code]. -** -** ^The sqlite3_finalize(S) routine can be called at any point during -** the life cycle of [prepared statement] S: -** before statement S is ever evaluated, after -** one or more calls to [sqlite3_reset()], or after any call -** to [sqlite3_step()] regardless of whether or not the statement has -** completed execution. -** -** ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op. -** -** The application must finalize every [prepared statement] in order to avoid -** resource leaks. It is a grievous error for the application to try to use -** a prepared statement after it has been finalized. Any use of a prepared -** statement after it has been finalized can result in undefined and -** undesirable behavior such as segfaults and heap corruption. -*/ -SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Reset A Prepared Statement Object -** -** The sqlite3_reset() function is called to reset a [prepared statement] -** object back to its initial state, ready to be re-executed. -** ^Any SQL statement variables that had values bound to them using -** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values. -** Use [sqlite3_clear_bindings()] to reset the bindings. -** -** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S -** back to the beginning of its program. -** -** ^If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE], -** or if [sqlite3_step(S)] has never before been called on S, -** then [sqlite3_reset(S)] returns [SQLITE_OK]. -** -** ^If the most recent call to [sqlite3_step(S)] for the -** [prepared statement] S indicated an error, then -** [sqlite3_reset(S)] returns an appropriate [error code]. -** -** ^The [sqlite3_reset(S)] interface does not change the values -** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S. -*/ -SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Create Or Redefine SQL Functions -** KEYWORDS: {function creation routines} -** KEYWORDS: {application-defined SQL function} -** KEYWORDS: {application-defined SQL functions} -** -** ^These functions (collectively known as "function creation routines") -** are used to add SQL functions or aggregates or to redefine the behavior -** of existing SQL functions or aggregates. The only differences between -** these routines are the text encoding expected for -** the second parameter (the name of the function being created) -** and the presence or absence of a destructor callback for -** the application data pointer. -** -** ^The first parameter is the [database connection] to which the SQL -** function is to be added. ^If an application uses more than one database -** connection then application-defined SQL functions must be added -** to each database connection separately. -** -** ^The second parameter is the name of the SQL function to be created or -** redefined. ^The length of the name is limited to 255 bytes in a UTF-8 -** representation, exclusive of the zero-terminator. ^Note that the name -** length limit is in UTF-8 bytes, not characters nor UTF-16 bytes. -** ^Any attempt to create a function with a longer name -** will result in [SQLITE_MISUSE] being returned. -** -** ^The third parameter (nArg) -** is the number of arguments that the SQL function or -** aggregate takes. ^If this parameter is -1, then the SQL function or -** aggregate may take any number of arguments between 0 and the limit -** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]). If the third -** parameter is less than -1 or greater than 127 then the behavior is -** undefined. -** -** ^The fourth parameter, eTextRep, specifies what -** [SQLITE_UTF8 | text encoding] this SQL function prefers for -** its parameters. Every SQL function implementation must be able to work -** with UTF-8, UTF-16le, or UTF-16be. But some implementations may be -** more efficient with one encoding than another. ^An application may -** invoke sqlite3_create_function() or sqlite3_create_function16() multiple -** times with the same function but with different values of eTextRep. -** ^When multiple implementations of the same function are available, SQLite -** will pick the one that involves the least amount of data conversion. -** If there is only a single implementation which does not care what text -** encoding is used, then the fourth argument should be [SQLITE_ANY]. -** -** ^(The fifth parameter is an arbitrary pointer. The implementation of the -** function can gain access to this pointer using [sqlite3_user_data()].)^ -** -** ^The sixth, seventh and eighth parameters, xFunc, xStep and xFinal, are -** pointers to C-language functions that implement the SQL function or -** aggregate. ^A scalar SQL function requires an implementation of the xFunc -** callback only; NULL pointers must be passed as the xStep and xFinal -** parameters. ^An aggregate SQL function requires an implementation of xStep -** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing -** SQL function or aggregate, pass NULL pointers for all three function -** callbacks. -** -** ^(If the ninth parameter to sqlite3_create_function_v2() is not NULL, -** then it is destructor for the application data pointer. -** The destructor is invoked when the function is deleted, either by being -** overloaded or when the database connection closes.)^ -** ^The destructor is also invoked if the call to -** sqlite3_create_function_v2() fails. -** ^When the destructor callback of the tenth parameter is invoked, it -** is passed a single argument which is a copy of the application data -** pointer which was the fifth parameter to sqlite3_create_function_v2(). -** -** ^It is permitted to register multiple implementations of the same -** functions with the same name but with either differing numbers of -** arguments or differing preferred text encodings. ^SQLite will use -** the implementation that most closely matches the way in which the -** SQL function is used. ^A function implementation with a non-negative -** nArg parameter is a better match than a function implementation with -** a negative nArg. ^A function where the preferred text encoding -** matches the database encoding is a better -** match than a function where the encoding is different. -** ^A function where the encoding difference is between UTF16le and UTF16be -** is a closer match than a function where the encoding difference is -** between UTF8 and UTF16. -** -** ^Built-in functions may be overloaded by new application-defined functions. -** -** ^An application-defined function is permitted to call other -** SQLite interfaces. However, such calls must not -** close the database connection nor finalize or reset the prepared -** statement in which the function is running. -*/ -SQLITE_API int sqlite3_create_function( - sqlite3 *db, - const char *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) -); -SQLITE_API int sqlite3_create_function16( - sqlite3 *db, - const void *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*) -); -SQLITE_API int sqlite3_create_function_v2( - sqlite3 *db, - const char *zFunctionName, - int nArg, - int eTextRep, - void *pApp, - void (*xFunc)(sqlite3_context*,int,sqlite3_value**), - void (*xStep)(sqlite3_context*,int,sqlite3_value**), - void (*xFinal)(sqlite3_context*), - void(*xDestroy)(void*) -); - -/* -** CAPI3REF: Text Encodings -** -** These constant define integer codes that represent the various -** text encodings supported by SQLite. -*/ -#define SQLITE_UTF8 1 -#define SQLITE_UTF16LE 2 -#define SQLITE_UTF16BE 3 -#define SQLITE_UTF16 4 /* Use native byte order */ -#define SQLITE_ANY 5 /* sqlite3_create_function only */ -#define SQLITE_UTF16_ALIGNED 8 /* sqlite3_create_collation only */ - -/* -** CAPI3REF: Deprecated Functions -** DEPRECATED -** -** These functions are [deprecated]. In order to maintain -** backwards compatibility with older code, these functions continue -** to be supported. However, new applications should avoid -** the use of these functions. To help encourage people to avoid -** using these functions, we are not going to tell you what they do. -*/ -#ifndef SQLITE_OMIT_DEPRECATED -SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*); -SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void); -SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void); -SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64); -#endif - -/* -** CAPI3REF: Obtaining SQL Function Parameter Values -** -** The C-language implementation of SQL functions and aggregates uses -** this set of interface routines to access the parameter values on -** the function or aggregate. -** -** The xFunc (for scalar functions) or xStep (for aggregates) parameters -** to [sqlite3_create_function()] and [sqlite3_create_function16()] -** define callbacks that implement the SQL functions and aggregates. -** The 3rd parameter to these callbacks is an array of pointers to -** [protected sqlite3_value] objects. There is one [sqlite3_value] object for -** each parameter to the SQL function. These routines are used to -** extract values from the [sqlite3_value] objects. -** -** These routines work only with [protected sqlite3_value] objects. -** Any attempt to use these routines on an [unprotected sqlite3_value] -** object results in undefined behavior. -** -** ^These routines work just like the corresponding [column access functions] -** except that these routines take a single [protected sqlite3_value] object -** pointer instead of a [sqlite3_stmt*] pointer and an integer column number. -** -** ^The sqlite3_value_text16() interface extracts a UTF-16 string -** in the native byte-order of the host machine. ^The -** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces -** extract UTF-16 strings as big-endian and little-endian respectively. -** -** ^(The sqlite3_value_numeric_type() interface attempts to apply -** numeric affinity to the value. This means that an attempt is -** made to convert the value to an integer or floating point. If -** such a conversion is possible without loss of information (in other -** words, if the value is a string that looks like a number) -** then the conversion is performed. Otherwise no conversion occurs. -** The [SQLITE_INTEGER | datatype] after conversion is returned.)^ -** -** Please pay particular attention to the fact that the pointer returned -** from [sqlite3_value_blob()], [sqlite3_value_text()], or -** [sqlite3_value_text16()] can be invalidated by a subsequent call to -** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()], -** or [sqlite3_value_text16()]. -** -** These routines must be called from the same thread as -** the SQL function that supplied the [sqlite3_value*] parameters. -*/ -SQLITE_API const void *sqlite3_value_blob(sqlite3_value*); -SQLITE_API int sqlite3_value_bytes(sqlite3_value*); -SQLITE_API int sqlite3_value_bytes16(sqlite3_value*); -SQLITE_API double sqlite3_value_double(sqlite3_value*); -SQLITE_API int sqlite3_value_int(sqlite3_value*); -SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*); -SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*); -SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*); -SQLITE_API int sqlite3_value_type(sqlite3_value*); -SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*); - -/* -** CAPI3REF: Obtain Aggregate Function Context -** -** Implementations of aggregate SQL functions use this -** routine to allocate memory for storing their state. -** -** ^The first time the sqlite3_aggregate_context(C,N) routine is called -** for a particular aggregate function, SQLite -** allocates N of memory, zeroes out that memory, and returns a pointer -** to the new memory. ^On second and subsequent calls to -** sqlite3_aggregate_context() for the same aggregate function instance, -** the same buffer is returned. Sqlite3_aggregate_context() is normally -** called once for each invocation of the xStep callback and then one -** last time when the xFinal callback is invoked. ^(When no rows match -** an aggregate query, the xStep() callback of the aggregate function -** implementation is never called and xFinal() is called exactly once. -** In those cases, sqlite3_aggregate_context() might be called for the -** first time from within xFinal().)^ -** -** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is -** less than or equal to zero or if a memory allocate error occurs. -** -** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is -** determined by the N parameter on first successful call. Changing the -** value of N in subsequent call to sqlite3_aggregate_context() within -** the same aggregate function instance will not resize the memory -** allocation.)^ -** -** ^SQLite automatically frees the memory allocated by -** sqlite3_aggregate_context() when the aggregate query concludes. -** -** The first parameter must be a copy of the -** [sqlite3_context | SQL function context] that is the first parameter -** to the xStep or xFinal callback routine that implements the aggregate -** function. -** -** This routine must be called from the same thread in which -** the aggregate SQL function is running. -*/ -SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes); - -/* -** CAPI3REF: User Data For Functions -** -** ^The sqlite3_user_data() interface returns a copy of -** the pointer that was the pUserData parameter (the 5th parameter) -** of the [sqlite3_create_function()] -** and [sqlite3_create_function16()] routines that originally -** registered the application defined function. -** -** This routine must be called from the same thread in which -** the application-defined function is running. -*/ -SQLITE_API void *sqlite3_user_data(sqlite3_context*); - -/* -** CAPI3REF: Database Connection For Functions -** -** ^The sqlite3_context_db_handle() interface returns a copy of -** the pointer to the [database connection] (the 1st parameter) -** of the [sqlite3_create_function()] -** and [sqlite3_create_function16()] routines that originally -** registered the application defined function. -*/ -SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*); - -/* -** CAPI3REF: Function Auxiliary Data -** -** The following two functions may be used by scalar SQL functions to -** associate metadata with argument values. If the same value is passed to -** multiple invocations of the same SQL function during query execution, under -** some circumstances the associated metadata may be preserved. This may -** be used, for example, to add a regular-expression matching scalar -** function. The compiled version of the regular expression is stored as -** metadata associated with the SQL value passed as the regular expression -** pattern. The compiled regular expression can be reused on multiple -** invocations of the same function so that the original pattern string -** does not need to be recompiled on each invocation. -** -** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata -** associated by the sqlite3_set_auxdata() function with the Nth argument -** value to the application-defined function. ^If no metadata has been ever -** been set for the Nth argument of the function, or if the corresponding -** function parameter has changed since the meta-data was set, -** then sqlite3_get_auxdata() returns a NULL pointer. -** -** ^The sqlite3_set_auxdata() interface saves the metadata -** pointed to by its 3rd parameter as the metadata for the N-th -** argument of the application-defined function. Subsequent -** calls to sqlite3_get_auxdata() might return this data, if it has -** not been destroyed. -** ^If it is not NULL, SQLite will invoke the destructor -** function given by the 4th parameter to sqlite3_set_auxdata() on -** the metadata when the corresponding function parameter changes -** or when the SQL statement completes, whichever comes first. -** -** SQLite is free to call the destructor and drop metadata on any -** parameter of any function at any time. ^The only guarantee is that -** the destructor will be called before the metadata is dropped. -** -** ^(In practice, metadata is preserved between function calls for -** expressions that are constant at compile time. This includes literal -** values and [parameters].)^ -** -** These routines must be called from the same thread in which -** the SQL function is running. -*/ -SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N); -SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*)); - - -/* -** CAPI3REF: Constants Defining Special Destructor Behavior -** -** These are special values for the destructor that is passed in as the -** final argument to routines like [sqlite3_result_blob()]. ^If the destructor -** argument is SQLITE_STATIC, it means that the content pointer is constant -** and will never change. It does not need to be destroyed. ^The -** SQLITE_TRANSIENT value means that the content will likely change in -** the near future and that SQLite should make its own private copy of -** the content before returning. -** -** The typedef is necessary to work around problems in certain -** C++ compilers. See ticket #2191. -*/ -typedef void (*sqlite3_destructor_type)(void*); -#define SQLITE_STATIC ((sqlite3_destructor_type)0) -#define SQLITE_TRANSIENT ((sqlite3_destructor_type)-1) - -/* -** CAPI3REF: Setting The Result Of An SQL Function -** -** These routines are used by the xFunc or xFinal callbacks that -** implement SQL functions and aggregates. See -** [sqlite3_create_function()] and [sqlite3_create_function16()] -** for additional information. -** -** These functions work very much like the [parameter binding] family of -** functions used to bind values to host parameters in prepared statements. -** Refer to the [SQL parameter] documentation for additional information. -** -** ^The sqlite3_result_blob() interface sets the result from -** an application-defined function to be the BLOB whose content is pointed -** to by the second parameter and which is N bytes long where N is the -** third parameter. -** -** ^The sqlite3_result_zeroblob() interfaces set the result of -** the application-defined function to be a BLOB containing all zero -** bytes and N bytes in size, where N is the value of the 2nd parameter. -** -** ^The sqlite3_result_double() interface sets the result from -** an application-defined function to be a floating point value specified -** by its 2nd argument. -** -** ^The sqlite3_result_error() and sqlite3_result_error16() functions -** cause the implemented SQL function to throw an exception. -** ^SQLite uses the string pointed to by the -** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16() -** as the text of an error message. ^SQLite interprets the error -** message string from sqlite3_result_error() as UTF-8. ^SQLite -** interprets the string from sqlite3_result_error16() as UTF-16 in native -** byte order. ^If the third parameter to sqlite3_result_error() -** or sqlite3_result_error16() is negative then SQLite takes as the error -** message all text up through the first zero character. -** ^If the third parameter to sqlite3_result_error() or -** sqlite3_result_error16() is non-negative then SQLite takes that many -** bytes (not characters) from the 2nd parameter as the error message. -** ^The sqlite3_result_error() and sqlite3_result_error16() -** routines make a private copy of the error message text before -** they return. Hence, the calling function can deallocate or -** modify the text after they return without harm. -** ^The sqlite3_result_error_code() function changes the error code -** returned by SQLite as a result of an error in a function. ^By default, -** the error code is SQLITE_ERROR. ^A subsequent call to sqlite3_result_error() -** or sqlite3_result_error16() resets the error code to SQLITE_ERROR. -** -** ^The sqlite3_result_error_toobig() interface causes SQLite to throw an -** error indicating that a string or BLOB is too long to represent. -** -** ^The sqlite3_result_error_nomem() interface causes SQLite to throw an -** error indicating that a memory allocation failed. -** -** ^The sqlite3_result_int() interface sets the return value -** of the application-defined function to be the 32-bit signed integer -** value given in the 2nd argument. -** ^The sqlite3_result_int64() interface sets the return value -** of the application-defined function to be the 64-bit signed integer -** value given in the 2nd argument. -** -** ^The sqlite3_result_null() interface sets the return value -** of the application-defined function to be NULL. -** -** ^The sqlite3_result_text(), sqlite3_result_text16(), -** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces -** set the return value of the application-defined function to be -** a text string which is represented as UTF-8, UTF-16 native byte order, -** UTF-16 little endian, or UTF-16 big endian, respectively. -** ^SQLite takes the text result from the application from -** the 2nd parameter of the sqlite3_result_text* interfaces. -** ^If the 3rd parameter to the sqlite3_result_text* interfaces -** is negative, then SQLite takes result text from the 2nd parameter -** through the first zero character. -** ^If the 3rd parameter to the sqlite3_result_text* interfaces -** is non-negative, then as many bytes (not characters) of the text -** pointed to by the 2nd parameter are taken as the application-defined -** function result. If the 3rd parameter is non-negative, then it -** must be the byte offset into the string where the NUL terminator would -** appear if the string where NUL terminated. If any NUL characters occur -** in the string at a byte offset that is less than the value of the 3rd -** parameter, then the resulting string will contain embedded NULs and the -** result of expressions operating on strings with embedded NULs is undefined. -** ^If the 4th parameter to the sqlite3_result_text* interfaces -** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that -** function as the destructor on the text or BLOB result when it has -** finished using that result. -** ^If the 4th parameter to the sqlite3_result_text* interfaces or to -** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite -** assumes that the text or BLOB result is in constant space and does not -** copy the content of the parameter nor call a destructor on the content -** when it has finished using that result. -** ^If the 4th parameter to the sqlite3_result_text* interfaces -** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT -** then SQLite makes a copy of the result into space obtained from -** from [sqlite3_malloc()] before it returns. -** -** ^The sqlite3_result_value() interface sets the result of -** the application-defined function to be a copy the -** [unprotected sqlite3_value] object specified by the 2nd parameter. ^The -** sqlite3_result_value() interface makes a copy of the [sqlite3_value] -** so that the [sqlite3_value] specified in the parameter may change or -** be deallocated after sqlite3_result_value() returns without harm. -** ^A [protected sqlite3_value] object may always be used where an -** [unprotected sqlite3_value] object is required, so either -** kind of [sqlite3_value] object can be used with this interface. -** -** If these routines are called from within the different thread -** than the one containing the application-defined function that received -** the [sqlite3_context] pointer, the results are undefined. -*/ -SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_double(sqlite3_context*, double); -SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int); -SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int); -SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*); -SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*); -SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int); -SQLITE_API void sqlite3_result_int(sqlite3_context*, int); -SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64); -SQLITE_API void sqlite3_result_null(sqlite3_context*); -SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*)); -SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*)); -SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*); -SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n); - -/* -** CAPI3REF: Define New Collating Sequences -** -** ^These functions add, remove, or modify a [collation] associated -** with the [database connection] specified as the first argument. -** -** ^The name of the collation is a UTF-8 string -** for sqlite3_create_collation() and sqlite3_create_collation_v2() -** and a UTF-16 string in native byte order for sqlite3_create_collation16(). -** ^Collation names that compare equal according to [sqlite3_strnicmp()] are -** considered to be the same name. -** -** ^(The third argument (eTextRep) must be one of the constants: -**
    -**
  • [SQLITE_UTF8], -**
  • [SQLITE_UTF16LE], -**
  • [SQLITE_UTF16BE], -**
  • [SQLITE_UTF16], or -**
  • [SQLITE_UTF16_ALIGNED]. -**
)^ -** ^The eTextRep argument determines the encoding of strings passed -** to the collating function callback, xCallback. -** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep -** force strings to be UTF16 with native byte order. -** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin -** on an even byte address. -** -** ^The fourth argument, pArg, is an application data pointer that is passed -** through as the first argument to the collating function callback. -** -** ^The fifth argument, xCallback, is a pointer to the collating function. -** ^Multiple collating functions can be registered using the same name but -** with different eTextRep parameters and SQLite will use whichever -** function requires the least amount of data transformation. -** ^If the xCallback argument is NULL then the collating function is -** deleted. ^When all collating functions having the same name are deleted, -** that collation is no longer usable. -** -** ^The collating function callback is invoked with a copy of the pArg -** application data pointer and with two strings in the encoding specified -** by the eTextRep argument. The collating function must return an -** integer that is negative, zero, or positive -** if the first string is less than, equal to, or greater than the second, -** respectively. A collating function must always return the same answer -** given the same inputs. If two or more collating functions are registered -** to the same collation name (using different eTextRep values) then all -** must give an equivalent answer when invoked with equivalent strings. -** The collating function must obey the following properties for all -** strings A, B, and C: -** -**
    -**
  1. If A==B then B==A. -**
  2. If A==B and B==C then A==C. -**
  3. If A<B THEN B>A. -**
  4. If A<B and B<C then A<C. -**
-** -** If a collating function fails any of the above constraints and that -** collating function is registered and used, then the behavior of SQLite -** is undefined. -** -** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation() -** with the addition that the xDestroy callback is invoked on pArg when -** the collating function is deleted. -** ^Collating functions are deleted when they are overridden by later -** calls to the collation creation functions or when the -** [database connection] is closed using [sqlite3_close()]. -** -** ^The xDestroy callback is not called if the -** sqlite3_create_collation_v2() function fails. Applications that invoke -** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should -** check the return code and dispose of the application data pointer -** themselves rather than expecting SQLite to deal with it for them. -** This is different from every other SQLite interface. The inconsistency -** is unfortunate but cannot be changed without breaking backwards -** compatibility. -** -** See also: [sqlite3_collation_needed()] and [sqlite3_collation_needed16()]. -*/ -SQLITE_API int sqlite3_create_collation( - sqlite3*, - const char *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*) -); -SQLITE_API int sqlite3_create_collation_v2( - sqlite3*, - const char *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*), - void(*xDestroy)(void*) -); -SQLITE_API int sqlite3_create_collation16( - sqlite3*, - const void *zName, - int eTextRep, - void *pArg, - int(*xCompare)(void*,int,const void*,int,const void*) -); - -/* -** CAPI3REF: Collation Needed Callbacks -** -** ^To avoid having to register all collation sequences before a database -** can be used, a single callback function may be registered with the -** [database connection] to be invoked whenever an undefined collation -** sequence is required. -** -** ^If the function is registered using the sqlite3_collation_needed() API, -** then it is passed the names of undefined collation sequences as strings -** encoded in UTF-8. ^If sqlite3_collation_needed16() is used, -** the names are passed as UTF-16 in machine native byte order. -** ^A call to either function replaces the existing collation-needed callback. -** -** ^(When the callback is invoked, the first argument passed is a copy -** of the second argument to sqlite3_collation_needed() or -** sqlite3_collation_needed16(). The second argument is the database -** connection. The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE], -** or [SQLITE_UTF16LE], indicating the most desirable form of the collation -** sequence function required. The fourth parameter is the name of the -** required collation sequence.)^ -** -** The callback function should register the desired collation using -** [sqlite3_create_collation()], [sqlite3_create_collation16()], or -** [sqlite3_create_collation_v2()]. -*/ -SQLITE_API int sqlite3_collation_needed( - sqlite3*, - void*, - void(*)(void*,sqlite3*,int eTextRep,const char*) -); -SQLITE_API int sqlite3_collation_needed16( - sqlite3*, - void*, - void(*)(void*,sqlite3*,int eTextRep,const void*) -); - -#ifdef SQLITE_HAS_CODEC -/* -** Specify the key for an encrypted database. This routine should be -** called right after sqlite3_open(). -** -** The code to implement this API is not available in the public release -** of SQLite. -*/ -SQLITE_API int sqlite3_key( - sqlite3 *db, /* Database to be rekeyed */ - const void *pKey, int nKey /* The key */ -); - -/* -** Change the key on an open database. If the current database is not -** encrypted, this routine will encrypt it. If pNew==0 or nNew==0, the -** database is decrypted. -** -** The code to implement this API is not available in the public release -** of SQLite. -*/ -SQLITE_API int sqlite3_rekey( - sqlite3 *db, /* Database to be rekeyed */ - const void *pKey, int nKey /* The new key */ -); - -/* -** Specify the activation key for a SEE database. Unless -** activated, none of the SEE routines will work. -*/ -SQLITE_API void sqlite3_activate_see( - const char *zPassPhrase /* Activation phrase */ -); -#endif - -#ifdef SQLITE_ENABLE_CEROD -/* -** Specify the activation key for a CEROD database. Unless -** activated, none of the CEROD routines will work. -*/ -SQLITE_API void sqlite3_activate_cerod( - const char *zPassPhrase /* Activation phrase */ -); -#endif - -/* -** CAPI3REF: Suspend Execution For A Short Time -** -** The sqlite3_sleep() function causes the current thread to suspend execution -** for at least a number of milliseconds specified in its parameter. -** -** If the operating system does not support sleep requests with -** millisecond time resolution, then the time will be rounded up to -** the nearest second. The number of milliseconds of sleep actually -** requested from the operating system is returned. -** -** ^SQLite implements this interface by calling the xSleep() -** method of the default [sqlite3_vfs] object. If the xSleep() method -** of the default VFS is not implemented correctly, or not implemented at -** all, then the behavior of sqlite3_sleep() may deviate from the description -** in the previous paragraphs. -*/ -SQLITE_API int sqlite3_sleep(int); - -/* -** CAPI3REF: Name Of The Folder Holding Temporary Files -** -** ^(If this global variable is made to point to a string which is -** the name of a folder (a.k.a. directory), then all temporary files -** created by SQLite when using a built-in [sqlite3_vfs | VFS] -** will be placed in that directory.)^ ^If this variable -** is a NULL pointer, then SQLite performs a search for an appropriate -** temporary file directory. -** -** It is not safe to read or modify this variable in more than one -** thread at a time. It is not safe to read or modify this variable -** if a [database connection] is being used at the same time in a separate -** thread. -** It is intended that this variable be set once -** as part of process initialization and before any SQLite interface -** routines have been called and that this variable remain unchanged -** thereafter. -** -** ^The [temp_store_directory pragma] may modify this variable and cause -** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, -** the [temp_store_directory pragma] always assumes that any string -** that this variable points to is held in memory obtained from -** [sqlite3_malloc] and the pragma may attempt to free that memory -** using [sqlite3_free]. -** Hence, if this variable is modified directly, either it should be -** made NULL or made to point to memory obtained from [sqlite3_malloc] -** or else the use of the [temp_store_directory pragma] should be avoided. -** -** Note to Windows Runtime users: The temporary directory must be set -** prior to calling [sqlite3_open] or [sqlite3_open_v2]. Otherwise, various -** features that require the use of temporary files may fail. Here is an -** example of how to do this using C++ with the Windows Runtime: -** -**
-** LPCWSTR zPath = Windows::Storage::ApplicationData::Current->
-**       TemporaryFolder->Path->Data();
-** char zPathBuf[MAX_PATH + 1];
-** memset(zPathBuf, 0, sizeof(zPathBuf));
-** WideCharToMultiByte(CP_UTF8, 0, zPath, -1, zPathBuf, sizeof(zPathBuf),
-**       NULL, NULL);
-** sqlite3_temp_directory = sqlite3_mprintf("%s", zPathBuf);
-** 
-*/ -SQLITE_API char *sqlite3_temp_directory; - -/* -** CAPI3REF: Name Of The Folder Holding Database Files -** -** ^(If this global variable is made to point to a string which is -** the name of a folder (a.k.a. directory), then all database files -** specified with a relative pathname and created or accessed by -** SQLite when using a built-in windows [sqlite3_vfs | VFS] will be assumed -** to be relative to that directory.)^ ^If this variable is a NULL -** pointer, then SQLite assumes that all database files specified -** with a relative pathname are relative to the current directory -** for the process. Only the windows VFS makes use of this global -** variable; it is ignored by the unix VFS. -** -** Changing the value of this variable while a database connection is -** open can result in a corrupt database. -** -** It is not safe to read or modify this variable in more than one -** thread at a time. It is not safe to read or modify this variable -** if a [database connection] is being used at the same time in a separate -** thread. -** It is intended that this variable be set once -** as part of process initialization and before any SQLite interface -** routines have been called and that this variable remain unchanged -** thereafter. -** -** ^The [data_store_directory pragma] may modify this variable and cause -** it to point to memory obtained from [sqlite3_malloc]. ^Furthermore, -** the [data_store_directory pragma] always assumes that any string -** that this variable points to is held in memory obtained from -** [sqlite3_malloc] and the pragma may attempt to free that memory -** using [sqlite3_free]. -** Hence, if this variable is modified directly, either it should be -** made NULL or made to point to memory obtained from [sqlite3_malloc] -** or else the use of the [data_store_directory pragma] should be avoided. -*/ -SQLITE_API char *sqlite3_data_directory; - -/* -** CAPI3REF: Test For Auto-Commit Mode -** KEYWORDS: {autocommit mode} -** -** ^The sqlite3_get_autocommit() interface returns non-zero or -** zero if the given database connection is or is not in autocommit mode, -** respectively. ^Autocommit mode is on by default. -** ^Autocommit mode is disabled by a [BEGIN] statement. -** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK]. -** -** If certain kinds of errors occur on a statement within a multi-statement -** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR], -** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the -** transaction might be rolled back automatically. The only way to -** find out whether SQLite automatically rolled back the transaction after -** an error is to use this function. -** -** If another thread changes the autocommit status of the database -** connection while this routine is running, then the return value -** is undefined. -*/ -SQLITE_API int sqlite3_get_autocommit(sqlite3*); - -/* -** CAPI3REF: Find The Database Handle Of A Prepared Statement -** -** ^The sqlite3_db_handle interface returns the [database connection] handle -** to which a [prepared statement] belongs. ^The [database connection] -** returned by sqlite3_db_handle is the same [database connection] -** that was the first argument -** to the [sqlite3_prepare_v2()] call (or its variants) that was used to -** create the statement in the first place. -*/ -SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); - -/* -** CAPI3REF: Return The Filename For A Database Connection -** -** ^The sqlite3_db_filename(D,N) interface returns a pointer to a filename -** associated with database N of connection D. ^The main database file -** has the name "main". If there is no attached database N on the database -** connection D, or if database N is a temporary or in-memory database, then -** a NULL pointer is returned. -** -** ^The filename returned by this function is the output of the -** xFullPathname method of the [VFS]. ^In other words, the filename -** will be an absolute pathname, even if the filename used -** to open the database originally was a URI or relative pathname. -*/ -SQLITE_API const char *sqlite3_db_filename(sqlite3 *db, const char *zDbName); - -/* -** CAPI3REF: Determine if a database is read-only -** -** ^The sqlite3_db_readonly(D,N) interface returns 1 if the database N -** of connection D is read-only, 0 if it is read/write, or -1 if N is not -** the name of a database on connection D. -*/ -SQLITE_API int sqlite3_db_readonly(sqlite3 *db, const char *zDbName); - -/* -** CAPI3REF: Find the next prepared statement -** -** ^This interface returns a pointer to the next [prepared statement] after -** pStmt associated with the [database connection] pDb. ^If pStmt is NULL -** then this interface returns a pointer to the first prepared statement -** associated with the database connection pDb. ^If no prepared statement -** satisfies the conditions of this routine, it returns NULL. -** -** The [database connection] pointer D in a call to -** [sqlite3_next_stmt(D,S)] must refer to an open database -** connection and in particular must not be a NULL pointer. -*/ -SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); - -/* -** CAPI3REF: Commit And Rollback Notification Callbacks -** -** ^The sqlite3_commit_hook() interface registers a callback -** function to be invoked whenever a transaction is [COMMIT | committed]. -** ^Any callback set by a previous call to sqlite3_commit_hook() -** for the same database connection is overridden. -** ^The sqlite3_rollback_hook() interface registers a callback -** function to be invoked whenever a transaction is [ROLLBACK | rolled back]. -** ^Any callback set by a previous call to sqlite3_rollback_hook() -** for the same database connection is overridden. -** ^The pArg argument is passed through to the callback. -** ^If the callback on a commit hook function returns non-zero, -** then the commit is converted into a rollback. -** -** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions -** return the P argument from the previous call of the same function -** on the same [database connection] D, or NULL for -** the first call for each function on D. -** -** The commit and rollback hook callbacks are not reentrant. -** The callback implementation must not do anything that will modify -** the database connection that invoked the callback. Any actions -** to modify the database connection must be deferred until after the -** completion of the [sqlite3_step()] call that triggered the commit -** or rollback hook in the first place. -** Note that running any other SQL statements, including SELECT statements, -** or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify -** the database connections for the meaning of "modify" in this paragraph. -** -** ^Registering a NULL function disables the callback. -** -** ^When the commit hook callback routine returns zero, the [COMMIT] -** operation is allowed to continue normally. ^If the commit hook -** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK]. -** ^The rollback hook is invoked on a rollback that results from a commit -** hook returning non-zero, just as it would be with any other rollback. -** -** ^For the purposes of this API, a transaction is said to have been -** rolled back if an explicit "ROLLBACK" statement is executed, or -** an error or constraint causes an implicit rollback to occur. -** ^The rollback callback is not invoked if a transaction is -** automatically rolled back because the database connection is closed. -** -** See also the [sqlite3_update_hook()] interface. -*/ -SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*); -SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); - -/* -** CAPI3REF: Data Change Notification Callbacks -** -** ^The sqlite3_update_hook() interface registers a callback function -** with the [database connection] identified by the first argument -** to be invoked whenever a row is updated, inserted or deleted. -** ^Any callback set by a previous call to this function -** for the same database connection is overridden. -** -** ^The second argument is a pointer to the function to invoke when a -** row is updated, inserted or deleted. -** ^The first argument to the callback is a copy of the third argument -** to sqlite3_update_hook(). -** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE], -** or [SQLITE_UPDATE], depending on the operation that caused the callback -** to be invoked. -** ^The third and fourth arguments to the callback contain pointers to the -** database and table name containing the affected row. -** ^The final callback parameter is the [rowid] of the row. -** ^In the case of an update, this is the [rowid] after the update takes place. -** -** ^(The update hook is not invoked when internal system tables are -** modified (i.e. sqlite_master and sqlite_sequence).)^ -** -** ^In the current implementation, the update hook -** is not invoked when duplication rows are deleted because of an -** [ON CONFLICT | ON CONFLICT REPLACE] clause. ^Nor is the update hook -** invoked when rows are deleted using the [truncate optimization]. -** The exceptions defined in this paragraph might change in a future -** release of SQLite. -** -** The update hook implementation must not do anything that will modify -** the database connection that invoked the update hook. Any actions -** to modify the database connection must be deferred until after the -** completion of the [sqlite3_step()] call that triggered the update hook. -** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. -** -** ^The sqlite3_update_hook(D,C,P) function -** returns the P argument from the previous call -** on the same [database connection] D, or NULL for -** the first call on D. -** -** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()] -** interfaces. -*/ -SQLITE_API void *sqlite3_update_hook( - sqlite3*, - void(*)(void *,int ,char const *,char const *,sqlite3_int64), - void* -); - -/* -** CAPI3REF: Enable Or Disable Shared Pager Cache -** -** ^(This routine enables or disables the sharing of the database cache -** and schema data structures between [database connection | connections] -** to the same database. Sharing is enabled if the argument is true -** and disabled if the argument is false.)^ -** -** ^Cache sharing is enabled and disabled for an entire process. -** This is a change as of SQLite version 3.5.0. In prior versions of SQLite, -** sharing was enabled or disabled for each thread separately. -** -** ^(The cache sharing mode set by this interface effects all subsequent -** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. -** Existing database connections continue use the sharing mode -** that was in effect at the time they were opened.)^ -** -** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled -** successfully. An [error code] is returned otherwise.)^ -** -** ^Shared cache is disabled by default. But this might change in -** future releases of SQLite. Applications that care about shared -** cache setting should set it explicitly. -** -** This interface is threadsafe on processors where writing a -** 32-bit integer is atomic. -** -** See Also: [SQLite Shared-Cache Mode] -*/ -SQLITE_API int sqlite3_enable_shared_cache(int); - -/* -** CAPI3REF: Attempt To Free Heap Memory -** -** ^The sqlite3_release_memory() interface attempts to free N bytes -** of heap memory by deallocating non-essential memory allocations -** held by the database library. Memory used to cache database -** pages to improve performance is an example of non-essential memory. -** ^sqlite3_release_memory() returns the number of bytes actually freed, -** which might be more or less than the amount requested. -** ^The sqlite3_release_memory() routine is a no-op returning zero -** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT]. -** -** See also: [sqlite3_db_release_memory()] -*/ -SQLITE_API int sqlite3_release_memory(int); - -/* -** CAPI3REF: Free Memory Used By A Database Connection -** -** ^The sqlite3_db_release_memory(D) interface attempts to free as much heap -** memory as possible from database connection D. Unlike the -** [sqlite3_release_memory()] interface, this interface is effect even -** when then [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is -** omitted. -** -** See also: [sqlite3_release_memory()] -*/ -SQLITE_API int sqlite3_db_release_memory(sqlite3*); - -/* -** CAPI3REF: Impose A Limit On Heap Size -** -** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the -** soft limit on the amount of heap memory that may be allocated by SQLite. -** ^SQLite strives to keep heap memory utilization below the soft heap -** limit by reducing the number of pages held in the page cache -** as heap memory usages approaches the limit. -** ^The soft heap limit is "soft" because even though SQLite strives to stay -** below the limit, it will exceed the limit rather than generate -** an [SQLITE_NOMEM] error. In other words, the soft heap limit -** is advisory only. -** -** ^The return value from sqlite3_soft_heap_limit64() is the size of -** the soft heap limit prior to the call, or negative in the case of an -** error. ^If the argument N is negative -** then no change is made to the soft heap limit. Hence, the current -** size of the soft heap limit can be determined by invoking -** sqlite3_soft_heap_limit64() with a negative argument. -** -** ^If the argument N is zero then the soft heap limit is disabled. -** -** ^(The soft heap limit is not enforced in the current implementation -** if one or more of following conditions are true: -** -**
    -**
  • The soft heap limit is set to zero. -**
  • Memory accounting is disabled using a combination of the -** [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and -** the [SQLITE_DEFAULT_MEMSTATUS] compile-time option. -**
  • An alternative page cache implementation is specified using -** [sqlite3_config]([SQLITE_CONFIG_PCACHE2],...). -**
  • The page cache allocates from its own memory pool supplied -** by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than -** from the heap. -**
)^ -** -** Beginning with SQLite version 3.7.3, the soft heap limit is enforced -** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT] -** compile-time option is invoked. With [SQLITE_ENABLE_MEMORY_MANAGEMENT], -** the soft heap limit is enforced on every memory allocation. Without -** [SQLITE_ENABLE_MEMORY_MANAGEMENT], the soft heap limit is only enforced -** when memory is allocated by the page cache. Testing suggests that because -** the page cache is the predominate memory user in SQLite, most -** applications will achieve adequate soft heap limit enforcement without -** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT]. -** -** The circumstances under which SQLite will enforce the soft heap limit may -** changes in future releases of SQLite. -*/ -SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); - -/* -** CAPI3REF: Deprecated Soft Heap Limit Interface -** DEPRECATED -** -** This is a deprecated version of the [sqlite3_soft_heap_limit64()] -** interface. This routine is provided for historical compatibility -** only. All new applications should use the -** [sqlite3_soft_heap_limit64()] interface rather than this one. -*/ -SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); - - -/* -** CAPI3REF: Extract Metadata About A Column Of A Table -** -** ^This routine returns metadata about a specific column of a specific -** database table accessible using the [database connection] handle -** passed as the first function argument. -** -** ^The column is identified by the second, third and fourth parameters to -** this function. ^The second parameter is either the name of the database -** (i.e. "main", "temp", or an attached database) containing the specified -** table or NULL. ^If it is NULL, then all attached databases are searched -** for the table using the same algorithm used by the database engine to -** resolve unqualified table references. -** -** ^The third and fourth parameters to this function are the table and column -** name of the desired column, respectively. Neither of these parameters -** may be NULL. -** -** ^Metadata is returned by writing to the memory locations passed as the 5th -** and subsequent parameters to this function. ^Any of these arguments may be -** NULL, in which case the corresponding element of metadata is omitted. -** -** ^(
-** -**
Parameter Output
Type
Description -** -**
5th const char* Data type -**
6th const char* Name of default collation sequence -**
7th int True if column has a NOT NULL constraint -**
8th int True if column is part of the PRIMARY KEY -**
9th int True if column is [AUTOINCREMENT] -**
-**
)^ -** -** ^The memory pointed to by the character pointers returned for the -** declaration type and collation sequence is valid only until the next -** call to any SQLite API function. -** -** ^If the specified table is actually a view, an [error code] is returned. -** -** ^If the specified column is "rowid", "oid" or "_rowid_" and an -** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output -** parameters are set for the explicitly declared column. ^(If there is no -** explicitly declared [INTEGER PRIMARY KEY] column, then the output -** parameters are set as follows: -** -**
-**     data type: "INTEGER"
-**     collation sequence: "BINARY"
-**     not null: 0
-**     primary key: 1
-**     auto increment: 0
-** 
)^ -** -** ^(This function may load one or more schemas from database files. If an -** error occurs during this process, or if the requested table or column -** cannot be found, an [error code] is returned and an error message left -** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^ -** -** ^This API is only available if the library was compiled with the -** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined. -*/ -SQLITE_API int sqlite3_table_column_metadata( - sqlite3 *db, /* Connection handle */ - const char *zDbName, /* Database name or NULL */ - const char *zTableName, /* Table name */ - const char *zColumnName, /* Column name */ - char const **pzDataType, /* OUTPUT: Declared data type */ - char const **pzCollSeq, /* OUTPUT: Collation sequence name */ - int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */ - int *pPrimaryKey, /* OUTPUT: True if column part of PK */ - int *pAutoinc /* OUTPUT: True if column is auto-increment */ -); - -/* -** CAPI3REF: Load An Extension -** -** ^This interface loads an SQLite extension library from the named file. -** -** ^The sqlite3_load_extension() interface attempts to load an -** SQLite extension library contained in the file zFile. -** -** ^The entry point is zProc. -** ^zProc may be 0, in which case the name of the entry point -** defaults to "sqlite3_extension_init". -** ^The sqlite3_load_extension() interface returns -** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong. -** ^If an error occurs and pzErrMsg is not 0, then the -** [sqlite3_load_extension()] interface shall attempt to -** fill *pzErrMsg with error message text stored in memory -** obtained from [sqlite3_malloc()]. The calling function -** should free this memory by calling [sqlite3_free()]. -** -** ^Extension loading must be enabled using -** [sqlite3_enable_load_extension()] prior to calling this API, -** otherwise an error will be returned. -** -** See also the [load_extension() SQL function]. -*/ -SQLITE_API int sqlite3_load_extension( - sqlite3 *db, /* Load the extension into this database connection */ - const char *zFile, /* Name of the shared library containing extension */ - const char *zProc, /* Entry point. Derived from zFile if 0 */ - char **pzErrMsg /* Put error message here if not 0 */ -); - -/* -** CAPI3REF: Enable Or Disable Extension Loading -** -** ^So as not to open security holes in older applications that are -** unprepared to deal with extension loading, and as a means of disabling -** extension loading while evaluating user-entered SQL, the following API -** is provided to turn the [sqlite3_load_extension()] mechanism on and off. -** -** ^Extension loading is off by default. See ticket #1863. -** ^Call the sqlite3_enable_load_extension() routine with onoff==1 -** to turn extension loading on and call it with onoff==0 to turn -** it back off again. -*/ -SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); - -/* -** CAPI3REF: Automatically Load Statically Linked Extensions -** -** ^This interface causes the xEntryPoint() function to be invoked for -** each new [database connection] that is created. The idea here is that -** xEntryPoint() is the entry point for a statically linked SQLite extension -** that is to be automatically loaded into all new database connections. -** -** ^(Even though the function prototype shows that xEntryPoint() takes -** no arguments and returns void, SQLite invokes xEntryPoint() with three -** arguments and expects and integer result as if the signature of the -** entry point where as follows: -** -**
-**    int xEntryPoint(
-**      sqlite3 *db,
-**      const char **pzErrMsg,
-**      const struct sqlite3_api_routines *pThunk
-**    );
-** 
)^ -** -** If the xEntryPoint routine encounters an error, it should make *pzErrMsg -** point to an appropriate error message (obtained from [sqlite3_mprintf()]) -** and return an appropriate [error code]. ^SQLite ensures that *pzErrMsg -** is NULL before calling the xEntryPoint(). ^SQLite will invoke -** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns. ^If any -** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()], -** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail. -** -** ^Calling sqlite3_auto_extension(X) with an entry point X that is already -** on the list of automatic extensions is a harmless no-op. ^No entry point -** will be called more than once for each database connection that is opened. -** -** See also: [sqlite3_reset_auto_extension()]. -*/ -SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void)); - -/* -** CAPI3REF: Reset Automatic Extension Loading -** -** ^This interface disables all automatic extensions previously -** registered using [sqlite3_auto_extension()]. -*/ -SQLITE_API void sqlite3_reset_auto_extension(void); - -/* -** The interface to the virtual-table mechanism is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - -/* -** Structures used by the virtual table interface -*/ -typedef struct sqlite3_vtab sqlite3_vtab; -typedef struct sqlite3_index_info sqlite3_index_info; -typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor; -typedef struct sqlite3_module sqlite3_module; - -/* -** CAPI3REF: Virtual Table Object -** KEYWORDS: sqlite3_module {virtual table module} -** -** This structure, sometimes called a "virtual table module", -** defines the implementation of a [virtual tables]. -** This structure consists mostly of methods for the module. -** -** ^A virtual table module is created by filling in a persistent -** instance of this structure and passing a pointer to that instance -** to [sqlite3_create_module()] or [sqlite3_create_module_v2()]. -** ^The registration remains valid until it is replaced by a different -** module or until the [database connection] closes. The content -** of this structure must not change while it is registered with -** any database connection. -*/ -struct sqlite3_module { - int iVersion; - int (*xCreate)(sqlite3*, void *pAux, - int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xConnect)(sqlite3*, void *pAux, - int argc, const char *const*argv, - sqlite3_vtab **ppVTab, char**); - int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*); - int (*xDisconnect)(sqlite3_vtab *pVTab); - int (*xDestroy)(sqlite3_vtab *pVTab); - int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor); - int (*xClose)(sqlite3_vtab_cursor*); - int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr, - int argc, sqlite3_value **argv); - int (*xNext)(sqlite3_vtab_cursor*); - int (*xEof)(sqlite3_vtab_cursor*); - int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int); - int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid); - int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *); - int (*xBegin)(sqlite3_vtab *pVTab); - int (*xSync)(sqlite3_vtab *pVTab); - int (*xCommit)(sqlite3_vtab *pVTab); - int (*xRollback)(sqlite3_vtab *pVTab); - int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName, - void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), - void **ppArg); - int (*xRename)(sqlite3_vtab *pVtab, const char *zNew); - /* The methods above are in version 1 of the sqlite_module object. Those - ** below are for version 2 and greater. */ - int (*xSavepoint)(sqlite3_vtab *pVTab, int); - int (*xRelease)(sqlite3_vtab *pVTab, int); - int (*xRollbackTo)(sqlite3_vtab *pVTab, int); -}; - -/* -** CAPI3REF: Virtual Table Indexing Information -** KEYWORDS: sqlite3_index_info -** -** The sqlite3_index_info structure and its substructures is used as part -** of the [virtual table] interface to -** pass information into and receive the reply from the [xBestIndex] -** method of a [virtual table module]. The fields under **Inputs** are the -** inputs to xBestIndex and are read-only. xBestIndex inserts its -** results into the **Outputs** fields. -** -** ^(The aConstraint[] array records WHERE clause constraints of the form: -** -**
column OP expr
-** -** where OP is =, <, <=, >, or >=.)^ ^(The particular operator is -** stored in aConstraint[].op using one of the -** [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^ -** ^(The index of the column is stored in -** aConstraint[].iColumn.)^ ^(aConstraint[].usable is TRUE if the -** expr on the right-hand side can be evaluated (and thus the constraint -** is usable) and false if it cannot.)^ -** -** ^The optimizer automatically inverts terms of the form "expr OP column" -** and makes other simplifications to the WHERE clause in an attempt to -** get as many WHERE clause terms into the form shown above as possible. -** ^The aConstraint[] array only reports WHERE clause terms that are -** relevant to the particular virtual table being queried. -** -** ^Information about the ORDER BY clause is stored in aOrderBy[]. -** ^Each term of aOrderBy records a column of the ORDER BY clause. -** -** The [xBestIndex] method must fill aConstraintUsage[] with information -** about what parameters to pass to xFilter. ^If argvIndex>0 then -** the right-hand side of the corresponding aConstraint[] is evaluated -** and becomes the argvIndex-th entry in argv. ^(If aConstraintUsage[].omit -** is true, then the constraint is assumed to be fully handled by the -** virtual table and is not checked again by SQLite.)^ -** -** ^The idxNum and idxPtr values are recorded and passed into the -** [xFilter] method. -** ^[sqlite3_free()] is used to free idxPtr if and only if -** needToFreeIdxPtr is true. -** -** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in -** the correct order to satisfy the ORDER BY clause so that no separate -** sorting step is required. -** -** ^The estimatedCost value is an estimate of the cost of doing the -** particular lookup. A full scan of a table with N entries should have -** a cost of N. A binary search of a table of N entries should have a -** cost of approximately log(N). -*/ -struct sqlite3_index_info { - /* Inputs */ - int nConstraint; /* Number of entries in aConstraint */ - struct sqlite3_index_constraint { - int iColumn; /* Column on left-hand side of constraint */ - unsigned char op; /* Constraint operator */ - unsigned char usable; /* True if this constraint is usable */ - int iTermOffset; /* Used internally - xBestIndex should ignore */ - } *aConstraint; /* Table of WHERE clause constraints */ - int nOrderBy; /* Number of terms in the ORDER BY clause */ - struct sqlite3_index_orderby { - int iColumn; /* Column number */ - unsigned char desc; /* True for DESC. False for ASC. */ - } *aOrderBy; /* The ORDER BY clause */ - /* Outputs */ - struct sqlite3_index_constraint_usage { - int argvIndex; /* if >0, constraint is part of argv to xFilter */ - unsigned char omit; /* Do not code a test for this constraint */ - } *aConstraintUsage; - int idxNum; /* Number used to identify the index */ - char *idxStr; /* String, possibly obtained from sqlite3_malloc */ - int needToFreeIdxStr; /* Free idxStr using sqlite3_free() if true */ - int orderByConsumed; /* True if output is already ordered */ - double estimatedCost; /* Estimated cost of using this index */ -}; - -/* -** CAPI3REF: Virtual Table Constraint Operator Codes -** -** These macros defined the allowed values for the -** [sqlite3_index_info].aConstraint[].op field. Each value represents -** an operator that is part of a constraint term in the wHERE clause of -** a query that uses a [virtual table]. -*/ -#define SQLITE_INDEX_CONSTRAINT_EQ 2 -#define SQLITE_INDEX_CONSTRAINT_GT 4 -#define SQLITE_INDEX_CONSTRAINT_LE 8 -#define SQLITE_INDEX_CONSTRAINT_LT 16 -#define SQLITE_INDEX_CONSTRAINT_GE 32 -#define SQLITE_INDEX_CONSTRAINT_MATCH 64 - -/* -** CAPI3REF: Register A Virtual Table Implementation -** -** ^These routines are used to register a new [virtual table module] name. -** ^Module names must be registered before -** creating a new [virtual table] using the module and before using a -** preexisting [virtual table] for the module. -** -** ^The module name is registered on the [database connection] specified -** by the first parameter. ^The name of the module is given by the -** second parameter. ^The third parameter is a pointer to -** the implementation of the [virtual table module]. ^The fourth -** parameter is an arbitrary client data pointer that is passed through -** into the [xCreate] and [xConnect] methods of the virtual table module -** when a new virtual table is be being created or reinitialized. -** -** ^The sqlite3_create_module_v2() interface has a fifth parameter which -** is a pointer to a destructor for the pClientData. ^SQLite will -** invoke the destructor function (if it is not NULL) when SQLite -** no longer needs the pClientData pointer. ^The destructor will also -** be invoked if the call to sqlite3_create_module_v2() fails. -** ^The sqlite3_create_module() -** interface is equivalent to sqlite3_create_module_v2() with a NULL -** destructor. -*/ -SQLITE_API int sqlite3_create_module( - sqlite3 *db, /* SQLite connection to register module with */ - const char *zName, /* Name of the module */ - const sqlite3_module *p, /* Methods for the module */ - void *pClientData /* Client data for xCreate/xConnect */ -); -SQLITE_API int sqlite3_create_module_v2( - sqlite3 *db, /* SQLite connection to register module with */ - const char *zName, /* Name of the module */ - const sqlite3_module *p, /* Methods for the module */ - void *pClientData, /* Client data for xCreate/xConnect */ - void(*xDestroy)(void*) /* Module destructor function */ -); - -/* -** CAPI3REF: Virtual Table Instance Object -** KEYWORDS: sqlite3_vtab -** -** Every [virtual table module] implementation uses a subclass -** of this object to describe a particular instance -** of the [virtual table]. Each subclass will -** be tailored to the specific needs of the module implementation. -** The purpose of this superclass is to define certain fields that are -** common to all module implementations. -** -** ^Virtual tables methods can set an error message by assigning a -** string obtained from [sqlite3_mprintf()] to zErrMsg. The method should -** take care that any prior string is freed by a call to [sqlite3_free()] -** prior to assigning a new string to zErrMsg. ^After the error message -** is delivered up to the client application, the string will be automatically -** freed by sqlite3_free() and the zErrMsg field will be zeroed. -*/ -struct sqlite3_vtab { - const sqlite3_module *pModule; /* The module for this virtual table */ - int nRef; /* NO LONGER USED */ - char *zErrMsg; /* Error message from sqlite3_mprintf() */ - /* Virtual table implementations will typically add additional fields */ -}; - -/* -** CAPI3REF: Virtual Table Cursor Object -** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor} -** -** Every [virtual table module] implementation uses a subclass of the -** following structure to describe cursors that point into the -** [virtual table] and are used -** to loop through the virtual table. Cursors are created using the -** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed -** by the [sqlite3_module.xClose | xClose] method. Cursors are used -** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods -** of the module. Each module implementation will define -** the content of a cursor structure to suit its own needs. -** -** This superclass exists in order to define fields of the cursor that -** are common to all implementations. -*/ -struct sqlite3_vtab_cursor { - sqlite3_vtab *pVtab; /* Virtual table of this cursor */ - /* Virtual table implementations will typically add additional fields */ -}; - -/* -** CAPI3REF: Declare The Schema Of A Virtual Table -** -** ^The [xCreate] and [xConnect] methods of a -** [virtual table module] call this interface -** to declare the format (the names and datatypes of the columns) of -** the virtual tables they implement. -*/ -SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL); - -/* -** CAPI3REF: Overload A Function For A Virtual Table -** -** ^(Virtual tables can provide alternative implementations of functions -** using the [xFindFunction] method of the [virtual table module]. -** But global versions of those functions -** must exist in order to be overloaded.)^ -** -** ^(This API makes sure a global version of a function with a particular -** name and number of parameters exists. If no such function exists -** before this API is called, a new function is created.)^ ^The implementation -** of the new function always causes an exception to be thrown. So -** the new function is not good for anything by itself. Its only -** purpose is to be a placeholder function that can be overloaded -** by a [virtual table]. -*/ -SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg); - -/* -** The interface to the virtual-table mechanism defined above (back up -** to a comment remarkably similar to this one) is currently considered -** to be experimental. The interface might change in incompatible ways. -** If this is a problem for you, do not use the interface at this time. -** -** When the virtual-table mechanism stabilizes, we will declare the -** interface fixed, support it indefinitely, and remove this comment. -*/ - -/* -** CAPI3REF: A Handle To An Open BLOB -** KEYWORDS: {BLOB handle} {BLOB handles} -** -** An instance of this object represents an open BLOB on which -** [sqlite3_blob_open | incremental BLOB I/O] can be performed. -** ^Objects of this type are created by [sqlite3_blob_open()] -** and destroyed by [sqlite3_blob_close()]. -** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces -** can be used to read or write small subsections of the BLOB. -** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes. -*/ -typedef struct sqlite3_blob sqlite3_blob; - -/* -** CAPI3REF: Open A BLOB For Incremental I/O -** -** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located -** in row iRow, column zColumn, table zTable in database zDb; -** in other words, the same BLOB that would be selected by: -** -**
-**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
-** 
)^ -** -** ^If the flags parameter is non-zero, then the BLOB is opened for read -** and write access. ^If it is zero, the BLOB is opened for read access. -** ^It is not possible to open a column that is part of an index or primary -** key for writing. ^If [foreign key constraints] are enabled, it is -** not possible to open a column that is part of a [child key] for writing. -** -** ^Note that the database name is not the filename that contains -** the database but rather the symbolic name of the database that -** appears after the AS keyword when the database is connected using [ATTACH]. -** ^For the main database file, the database name is "main". -** ^For TEMP tables, the database name is "temp". -** -** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is written -** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set -** to be a null pointer.)^ -** ^This function sets the [database connection] error code and message -** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related -** functions. ^Note that the *ppBlob variable is always initialized in a -** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob -** regardless of the success or failure of this routine. -** -** ^(If the row that a BLOB handle points to is modified by an -** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects -** then the BLOB handle is marked as "expired". -** This is true if any column of the row is changed, even a column -** other than the one the BLOB handle is open on.)^ -** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for -** an expired BLOB handle fail with a return code of [SQLITE_ABORT]. -** ^(Changes written into a BLOB prior to the BLOB expiring are not -** rolled back by the expiration of the BLOB. Such changes will eventually -** commit if the transaction continues to completion.)^ -** -** ^Use the [sqlite3_blob_bytes()] interface to determine the size of -** the opened blob. ^The size of a blob may not be changed by this -** interface. Use the [UPDATE] SQL command to change the size of a -** blob. -** -** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces -** and the built-in [zeroblob] SQL function can be used, if desired, -** to create an empty, zero-filled blob in which to read or write using -** this interface. -** -** To avoid a resource leak, every open [BLOB handle] should eventually -** be released by a call to [sqlite3_blob_close()]. -*/ -SQLITE_API int sqlite3_blob_open( - sqlite3*, - const char *zDb, - const char *zTable, - const char *zColumn, - sqlite3_int64 iRow, - int flags, - sqlite3_blob **ppBlob -); - -/* -** CAPI3REF: Move a BLOB Handle to a New Row -** -** ^This function is used to move an existing blob handle so that it points -** to a different row of the same database table. ^The new row is identified -** by the rowid value passed as the second argument. Only the row can be -** changed. ^The database, table and column on which the blob handle is open -** remain the same. Moving an existing blob handle to a new row can be -** faster than closing the existing handle and opening a new one. -** -** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] - -** it must exist and there must be either a blob or text value stored in -** the nominated column.)^ ^If the new row is not present in the table, or if -** it does not contain a blob or text value, or if another error occurs, an -** SQLite error code is returned and the blob handle is considered aborted. -** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or -** [sqlite3_blob_reopen()] on an aborted blob handle immediately return -** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle -** always returns zero. -** -** ^This function sets the database handle error code and message. -*/ -SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); - -/* -** CAPI3REF: Close A BLOB Handle -** -** ^Closes an open [BLOB handle]. -** -** ^Closing a BLOB shall cause the current transaction to commit -** if there are no other BLOBs, no pending prepared statements, and the -** database connection is in [autocommit mode]. -** ^If any writes were made to the BLOB, they might be held in cache -** until the close operation if they will fit. -** -** ^(Closing the BLOB often forces the changes -** out to disk and so if any I/O errors occur, they will likely occur -** at the time when the BLOB is closed. Any errors that occur during -** closing are reported as a non-zero return value.)^ -** -** ^(The BLOB is closed unconditionally. Even if this routine returns -** an error code, the BLOB is still closed.)^ -** -** ^Calling this routine with a null pointer (such as would be returned -** by a failed call to [sqlite3_blob_open()]) is a harmless no-op. -*/ -SQLITE_API int sqlite3_blob_close(sqlite3_blob *); - -/* -** CAPI3REF: Return The Size Of An Open BLOB -** -** ^Returns the size in bytes of the BLOB accessible via the -** successfully opened [BLOB handle] in its only argument. ^The -** incremental blob I/O routines can only read or overwriting existing -** blob content; they cannot change the size of a blob. -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -*/ -SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *); - -/* -** CAPI3REF: Read Data From A BLOB Incrementally -** -** ^(This function is used to read data from an open [BLOB handle] into a -** caller-supplied buffer. N bytes of data are copied into buffer Z -** from the open BLOB, starting at offset iOffset.)^ -** -** ^If offset iOffset is less than N bytes from the end of the BLOB, -** [SQLITE_ERROR] is returned and no data is read. ^If N or iOffset is -** less than zero, [SQLITE_ERROR] is returned and no data is read. -** ^The size of the blob (and hence the maximum value of N+iOffset) -** can be determined using the [sqlite3_blob_bytes()] interface. -** -** ^An attempt to read from an expired [BLOB handle] fails with an -** error code of [SQLITE_ABORT]. -** -** ^(On success, sqlite3_blob_read() returns SQLITE_OK. -** Otherwise, an [error code] or an [extended error code] is returned.)^ -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** See also: [sqlite3_blob_write()]. -*/ -SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); - -/* -** CAPI3REF: Write Data Into A BLOB Incrementally -** -** ^This function is used to write data into an open [BLOB handle] from a -** caller-supplied buffer. ^N bytes of data are copied from the buffer Z -** into the open BLOB, starting at offset iOffset. -** -** ^If the [BLOB handle] passed as the first argument was not opened for -** writing (the flags parameter to [sqlite3_blob_open()] was zero), -** this function returns [SQLITE_READONLY]. -** -** ^This function may only modify the contents of the BLOB; it is -** not possible to increase the size of a BLOB using this API. -** ^If offset iOffset is less than N bytes from the end of the BLOB, -** [SQLITE_ERROR] is returned and no data is written. ^If N is -** less than zero [SQLITE_ERROR] is returned and no data is written. -** The size of the BLOB (and hence the maximum value of N+iOffset) -** can be determined using the [sqlite3_blob_bytes()] interface. -** -** ^An attempt to write to an expired [BLOB handle] fails with an -** error code of [SQLITE_ABORT]. ^Writes to the BLOB that occurred -** before the [BLOB handle] expired are not rolled back by the -** expiration of the handle, though of course those changes might -** have been overwritten by the statement that expired the BLOB handle -** or by other independent statements. -** -** ^(On success, sqlite3_blob_write() returns SQLITE_OK. -** Otherwise, an [error code] or an [extended error code] is returned.)^ -** -** This routine only works on a [BLOB handle] which has been created -** by a prior successful call to [sqlite3_blob_open()] and which has not -** been closed by [sqlite3_blob_close()]. Passing any other pointer in -** to this routine results in undefined and probably undesirable behavior. -** -** See also: [sqlite3_blob_read()]. -*/ -SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset); - -/* -** CAPI3REF: Virtual File System Objects -** -** A virtual filesystem (VFS) is an [sqlite3_vfs] object -** that SQLite uses to interact -** with the underlying operating system. Most SQLite builds come with a -** single default VFS that is appropriate for the host computer. -** New VFSes can be registered and existing VFSes can be unregistered. -** The following interfaces are provided. -** -** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name. -** ^Names are case sensitive. -** ^Names are zero-terminated UTF-8 strings. -** ^If there is no match, a NULL pointer is returned. -** ^If zVfsName is NULL then the default VFS is returned. -** -** ^New VFSes are registered with sqlite3_vfs_register(). -** ^Each new VFS becomes the default VFS if the makeDflt flag is set. -** ^The same VFS can be registered multiple times without injury. -** ^To make an existing VFS into the default VFS, register it again -** with the makeDflt flag set. If two different VFSes with the -** same name are registered, the behavior is undefined. If a -** VFS is registered with a name that is NULL or an empty string, -** then the behavior is undefined. -** -** ^Unregister a VFS with the sqlite3_vfs_unregister() interface. -** ^(If the default VFS is unregistered, another VFS is chosen as -** the default. The choice for the new VFS is arbitrary.)^ -*/ -SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName); -SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt); -SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); - -/* -** CAPI3REF: Mutexes -** -** The SQLite core uses these routines for thread -** synchronization. Though they are intended for internal -** use by SQLite, code that links against SQLite is -** permitted to use any of these routines. -** -** The SQLite source code contains multiple implementations -** of these mutex routines. An appropriate implementation -** is selected automatically at compile-time. ^(The following -** implementations are available in the SQLite core: -** -**
    -**
  • SQLITE_MUTEX_PTHREADS -**
  • SQLITE_MUTEX_W32 -**
  • SQLITE_MUTEX_NOOP -**
)^ -** -** ^The SQLITE_MUTEX_NOOP implementation is a set of routines -** that does no real locking and is appropriate for use in -** a single-threaded application. ^The SQLITE_MUTEX_PTHREADS and -** SQLITE_MUTEX_W32 implementations are appropriate for use on Unix -** and Windows. -** -** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor -** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex -** implementation is included with the library. In this case the -** application must supply a custom mutex implementation using the -** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function -** before calling sqlite3_initialize() or any other public sqlite3_ -** function that calls sqlite3_initialize().)^ -** -** ^The sqlite3_mutex_alloc() routine allocates a new -** mutex and returns a pointer to it. ^If it returns NULL -** that means that a mutex could not be allocated. ^SQLite -** will unwind its stack and return an error. ^(The argument -** to sqlite3_mutex_alloc() is one of these integer constants: -** -**
    -**
  • SQLITE_MUTEX_FAST -**
  • SQLITE_MUTEX_RECURSIVE -**
  • SQLITE_MUTEX_STATIC_MASTER -**
  • SQLITE_MUTEX_STATIC_MEM -**
  • SQLITE_MUTEX_STATIC_MEM2 -**
  • SQLITE_MUTEX_STATIC_PRNG -**
  • SQLITE_MUTEX_STATIC_LRU -**
  • SQLITE_MUTEX_STATIC_LRU2 -**
)^ -** -** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) -** cause sqlite3_mutex_alloc() to create -** a new mutex. ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE -** is used but not necessarily so when SQLITE_MUTEX_FAST is used. -** The mutex implementation does not need to make a distinction -** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does -** not want to. ^SQLite will only request a recursive mutex in -** cases where it really needs one. ^If a faster non-recursive mutex -** implementation is available on the host platform, the mutex subsystem -** might return such a mutex in response to SQLITE_MUTEX_FAST. -** -** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other -** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return -** a pointer to a static preexisting mutex. ^Six static mutexes are -** used by the current version of SQLite. Future versions of SQLite -** may add additional static mutexes. Static mutexes are for internal -** use by SQLite only. Applications that use SQLite mutexes should -** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or -** SQLITE_MUTEX_RECURSIVE. -** -** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST -** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc() -** returns a different mutex on every call. ^But for the static -** mutex types, the same mutex is returned on every call that has -** the same type number. -** -** ^The sqlite3_mutex_free() routine deallocates a previously -** allocated dynamic mutex. ^SQLite is careful to deallocate every -** dynamic mutex that it allocates. The dynamic mutexes must not be in -** use when they are deallocated. Attempting to deallocate a static -** mutex results in undefined behavior. ^SQLite never deallocates -** a static mutex. -** -** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt -** to enter a mutex. ^If another thread is already within the mutex, -** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return -** SQLITE_BUSY. ^The sqlite3_mutex_try() interface returns [SQLITE_OK] -** upon successful entry. ^(Mutexes created using -** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread. -** In such cases the, -** mutex must be exited an equal number of times before another thread -** can enter.)^ ^(If the same thread tries to enter any other -** kind of mutex more than once, the behavior is undefined. -** SQLite will never exhibit -** such behavior in its own use of mutexes.)^ -** -** ^(Some systems (for example, Windows 95) do not support the operation -** implemented by sqlite3_mutex_try(). On those systems, sqlite3_mutex_try() -** will always return SQLITE_BUSY. The SQLite core only ever uses -** sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^ -** -** ^The sqlite3_mutex_leave() routine exits a mutex that was -** previously entered by the same thread. ^(The behavior -** is undefined if the mutex is not currently entered by the -** calling thread or is not currently allocated. SQLite will -** never do either.)^ -** -** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or -** sqlite3_mutex_leave() is a NULL pointer, then all three routines -** behave as no-ops. -** -** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()]. -*/ -SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int); -SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*); -SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*); -SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*); -SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*); - -/* -** CAPI3REF: Mutex Methods Object -** -** An instance of this structure defines the low-level routines -** used to allocate and use mutexes. -** -** Usually, the default mutex implementations provided by SQLite are -** sufficient, however the user has the option of substituting a custom -** implementation for specialized deployments or systems for which SQLite -** does not provide a suitable implementation. In this case, the user -** creates and populates an instance of this structure to pass -** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option. -** Additionally, an instance of this structure can be used as an -** output variable when querying the system for the current mutex -** implementation, using the [SQLITE_CONFIG_GETMUTEX] option. -** -** ^The xMutexInit method defined by this structure is invoked as -** part of system initialization by the sqlite3_initialize() function. -** ^The xMutexInit routine is called by SQLite exactly once for each -** effective call to [sqlite3_initialize()]. -** -** ^The xMutexEnd method defined by this structure is invoked as -** part of system shutdown by the sqlite3_shutdown() function. The -** implementation of this method is expected to release all outstanding -** resources obtained by the mutex methods implementation, especially -** those obtained by the xMutexInit method. ^The xMutexEnd() -** interface is invoked exactly once for each call to [sqlite3_shutdown()]. -** -** ^(The remaining seven methods defined by this structure (xMutexAlloc, -** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and -** xMutexNotheld) implement the following interfaces (respectively): -** -**
    -**
  • [sqlite3_mutex_alloc()]
  • -**
  • [sqlite3_mutex_free()]
  • -**
  • [sqlite3_mutex_enter()]
  • -**
  • [sqlite3_mutex_try()]
  • -**
  • [sqlite3_mutex_leave()]
  • -**
  • [sqlite3_mutex_held()]
  • -**
  • [sqlite3_mutex_notheld()]
  • -**
)^ -** -** The only difference is that the public sqlite3_XXX functions enumerated -** above silently ignore any invocations that pass a NULL pointer instead -** of a valid mutex handle. The implementations of the methods defined -** by this structure are not required to handle this case, the results -** of passing a NULL pointer instead of a valid mutex handle are undefined -** (i.e. it is acceptable to provide an implementation that segfaults if -** it is passed a NULL pointer). -** -** The xMutexInit() method must be threadsafe. ^It must be harmless to -** invoke xMutexInit() multiple times within the same process and without -** intervening calls to xMutexEnd(). Second and subsequent calls to -** xMutexInit() must be no-ops. -** -** ^xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()] -** and its associates). ^Similarly, xMutexAlloc() must not use SQLite memory -** allocation for a static mutex. ^However xMutexAlloc() may use SQLite -** memory allocation for a fast or recursive mutex. -** -** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is -** called, but only if the prior call to xMutexInit returned SQLITE_OK. -** If xMutexInit fails in any way, it is expected to clean up after itself -** prior to returning. -*/ -typedef struct sqlite3_mutex_methods sqlite3_mutex_methods; -struct sqlite3_mutex_methods { - int (*xMutexInit)(void); - int (*xMutexEnd)(void); - sqlite3_mutex *(*xMutexAlloc)(int); - void (*xMutexFree)(sqlite3_mutex *); - void (*xMutexEnter)(sqlite3_mutex *); - int (*xMutexTry)(sqlite3_mutex *); - void (*xMutexLeave)(sqlite3_mutex *); - int (*xMutexHeld)(sqlite3_mutex *); - int (*xMutexNotheld)(sqlite3_mutex *); -}; - -/* -** CAPI3REF: Mutex Verification Routines -** -** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines -** are intended for use inside assert() statements. ^The SQLite core -** never uses these routines except inside an assert() and applications -** are advised to follow the lead of the core. ^The SQLite core only -** provides implementations for these routines when it is compiled -** with the SQLITE_DEBUG flag. ^External mutex implementations -** are only required to provide these routines if SQLITE_DEBUG is -** defined and if NDEBUG is not defined. -** -** ^These routines should return true if the mutex in their argument -** is held or not held, respectively, by the calling thread. -** -** ^The implementation is not required to provide versions of these -** routines that actually work. If the implementation does not provide working -** versions of these routines, it should at least provide stubs that always -** return true so that one does not get spurious assertion failures. -** -** ^If the argument to sqlite3_mutex_held() is a NULL pointer then -** the routine should return 1. This seems counter-intuitive since -** clearly the mutex cannot be held if it does not exist. But -** the reason the mutex does not exist is because the build is not -** using mutexes. And we do not want the assert() containing the -** call to sqlite3_mutex_held() to fail, so a non-zero return is -** the appropriate thing to do. ^The sqlite3_mutex_notheld() -** interface should also return 1 when given a NULL pointer. -*/ -#ifndef NDEBUG -SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*); -SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); -#endif - -/* -** CAPI3REF: Mutex Types -** -** The [sqlite3_mutex_alloc()] interface takes a single argument -** which is one of these integer constants. -** -** The set of static mutexes may change from one SQLite release to the -** next. Applications that override the built-in mutex logic must be -** prepared to accommodate additional static mutexes. -*/ -#define SQLITE_MUTEX_FAST 0 -#define SQLITE_MUTEX_RECURSIVE 1 -#define SQLITE_MUTEX_STATIC_MASTER 2 -#define SQLITE_MUTEX_STATIC_MEM 3 /* sqlite3_malloc() */ -#define SQLITE_MUTEX_STATIC_MEM2 4 /* NOT USED */ -#define SQLITE_MUTEX_STATIC_OPEN 4 /* sqlite3BtreeOpen() */ -#define SQLITE_MUTEX_STATIC_PRNG 5 /* sqlite3_random() */ -#define SQLITE_MUTEX_STATIC_LRU 6 /* lru page list */ -#define SQLITE_MUTEX_STATIC_LRU2 7 /* NOT USED */ -#define SQLITE_MUTEX_STATIC_PMEM 7 /* sqlite3PageMalloc() */ - -/* -** CAPI3REF: Retrieve the mutex for a database connection -** -** ^This interface returns a pointer the [sqlite3_mutex] object that -** serializes access to the [database connection] given in the argument -** when the [threading mode] is Serialized. -** ^If the [threading mode] is Single-thread or Multi-thread then this -** routine returns a NULL pointer. -*/ -SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); - -/* -** CAPI3REF: Low-Level Control Of Database Files -** -** ^The [sqlite3_file_control()] interface makes a direct call to the -** xFileControl method for the [sqlite3_io_methods] object associated -** with a particular database identified by the second argument. ^The -** name of the database is "main" for the main database or "temp" for the -** TEMP database, or the name that appears after the AS keyword for -** databases that are added using the [ATTACH] SQL command. -** ^A NULL pointer can be used in place of "main" to refer to the -** main database file. -** ^The third and fourth parameters to this routine -** are passed directly through to the second and third parameters of -** the xFileControl method. ^The return value of the xFileControl -** method becomes the return value of this routine. -** -** ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes -** a pointer to the underlying [sqlite3_file] object to be written into -** the space pointed to by the 4th parameter. ^The SQLITE_FCNTL_FILE_POINTER -** case is a short-circuit path which does not actually invoke the -** underlying sqlite3_io_methods.xFileControl method. -** -** ^If the second parameter (zDbName) does not match the name of any -** open database file, then SQLITE_ERROR is returned. ^This error -** code is not remembered and will not be recalled by [sqlite3_errcode()] -** or [sqlite3_errmsg()]. The underlying xFileControl method might -** also return SQLITE_ERROR. There is no way to distinguish between -** an incorrect zDbName and an SQLITE_ERROR return from the underlying -** xFileControl method. -** -** See also: [SQLITE_FCNTL_LOCKSTATE] -*/ -SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*); - -/* -** CAPI3REF: Testing Interface -** -** ^The sqlite3_test_control() interface is used to read out internal -** state of SQLite and to inject faults into SQLite for testing -** purposes. ^The first parameter is an operation code that determines -** the number, meaning, and operation of all subsequent parameters. -** -** This interface is not for use by applications. It exists solely -** for verifying the correct operation of the SQLite library. Depending -** on how the SQLite library is compiled, this interface might not exist. -** -** The details of the operation codes, their meanings, the parameters -** they take, and what they do are all subject to change without notice. -** Unlike most of the SQLite API, this function is not guaranteed to -** operate consistently from one release to the next. -*/ -SQLITE_API int sqlite3_test_control(int op, ...); - -/* -** CAPI3REF: Testing Interface Operation Codes -** -** These constants are the valid operation code parameters used -** as the first argument to [sqlite3_test_control()]. -** -** These parameters and their meanings are subject to change -** without notice. These values are for testing purposes only. -** Applications should not use any of these parameters or the -** [sqlite3_test_control()] interface. -*/ -#define SQLITE_TESTCTRL_FIRST 5 -#define SQLITE_TESTCTRL_PRNG_SAVE 5 -#define SQLITE_TESTCTRL_PRNG_RESTORE 6 -#define SQLITE_TESTCTRL_PRNG_RESET 7 -#define SQLITE_TESTCTRL_BITVEC_TEST 8 -#define SQLITE_TESTCTRL_FAULT_INSTALL 9 -#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS 10 -#define SQLITE_TESTCTRL_PENDING_BYTE 11 -#define SQLITE_TESTCTRL_ASSERT 12 -#define SQLITE_TESTCTRL_ALWAYS 13 -#define SQLITE_TESTCTRL_RESERVE 14 -#define SQLITE_TESTCTRL_OPTIMIZATIONS 15 -#define SQLITE_TESTCTRL_ISKEYWORD 16 -#define SQLITE_TESTCTRL_SCRATCHMALLOC 17 -#define SQLITE_TESTCTRL_LOCALTIME_FAULT 18 -#define SQLITE_TESTCTRL_EXPLAIN_STMT 19 -#define SQLITE_TESTCTRL_LAST 19 - -/* -** CAPI3REF: SQLite Runtime Status -** -** ^This interface is used to retrieve runtime status information -** about the performance of SQLite, and optionally to reset various -** highwater marks. ^The first argument is an integer code for -** the specific parameter to measure. ^(Recognized integer codes -** are of the form [status parameters | SQLITE_STATUS_...].)^ -** ^The current value of the parameter is returned into *pCurrent. -** ^The highest recorded value is returned in *pHighwater. ^If the -** resetFlag is true, then the highest record value is reset after -** *pHighwater is written. ^(Some parameters do not record the highest -** value. For those parameters -** nothing is written into *pHighwater and the resetFlag is ignored.)^ -** ^(Other parameters record only the highwater mark and not the current -** value. For these latter parameters nothing is written into *pCurrent.)^ -** -** ^The sqlite3_status() routine returns SQLITE_OK on success and a -** non-zero [error code] on failure. -** -** This routine is threadsafe but is not atomic. This routine can be -** called while other threads are running the same or different SQLite -** interfaces. However the values returned in *pCurrent and -** *pHighwater reflect the status of SQLite at different points in time -** and it is possible that another thread might change the parameter -** in between the times when *pCurrent and *pHighwater are written. -** -** See also: [sqlite3_db_status()] -*/ -SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag); - - -/* -** CAPI3REF: Status Parameters -** KEYWORDS: {status parameters} -** -** These integer constants designate various run-time status parameters -** that can be returned by [sqlite3_status()]. -** -**
-** [[SQLITE_STATUS_MEMORY_USED]] ^(
SQLITE_STATUS_MEMORY_USED
-**
This parameter is the current amount of memory checked out -** using [sqlite3_malloc()], either directly or indirectly. The -** figure includes calls made to [sqlite3_malloc()] by the application -** and internal memory usage by the SQLite library. Scratch memory -** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache -** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in -** this parameter. The amount returned is the sum of the allocation -** sizes as reported by the xSize method in [sqlite3_mem_methods].
)^ -** -** [[SQLITE_STATUS_MALLOC_SIZE]] ^(
SQLITE_STATUS_MALLOC_SIZE
-**
This parameter records the largest memory allocation request -** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their -** internal equivalents). Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
)^ -** -** [[SQLITE_STATUS_MALLOC_COUNT]] ^(
SQLITE_STATUS_MALLOC_COUNT
-**
This parameter records the number of separate memory allocations -** currently checked out.
)^ -** -** [[SQLITE_STATUS_PAGECACHE_USED]] ^(
SQLITE_STATUS_PAGECACHE_USED
-**
This parameter returns the number of pages used out of the -** [pagecache memory allocator] that was configured using -** [SQLITE_CONFIG_PAGECACHE]. The -** value returned is in pages, not in bytes.
)^ -** -** [[SQLITE_STATUS_PAGECACHE_OVERFLOW]] -** ^(
SQLITE_STATUS_PAGECACHE_OVERFLOW
-**
This parameter returns the number of bytes of page cache -** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE] -** buffer and where forced to overflow to [sqlite3_malloc()]. The -** returned value includes allocations that overflowed because they -** where too large (they were larger than the "sz" parameter to -** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because -** no space was left in the page cache.
)^ -** -** [[SQLITE_STATUS_PAGECACHE_SIZE]] ^(
SQLITE_STATUS_PAGECACHE_SIZE
-**
This parameter records the largest memory allocation request -** handed to [pagecache memory allocator]. Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
)^ -** -** [[SQLITE_STATUS_SCRATCH_USED]] ^(
SQLITE_STATUS_SCRATCH_USED
-**
This parameter returns the number of allocations used out of the -** [scratch memory allocator] configured using -** [SQLITE_CONFIG_SCRATCH]. The value returned is in allocations, not -** in bytes. Since a single thread may only have one scratch allocation -** outstanding at time, this parameter also reports the number of threads -** using scratch memory at the same time.
)^ -** -** [[SQLITE_STATUS_SCRATCH_OVERFLOW]] ^(
SQLITE_STATUS_SCRATCH_OVERFLOW
-**
This parameter returns the number of bytes of scratch memory -** allocation which could not be satisfied by the [SQLITE_CONFIG_SCRATCH] -** buffer and where forced to overflow to [sqlite3_malloc()]. The values -** returned include overflows because the requested allocation was too -** larger (that is, because the requested allocation was larger than the -** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer -** slots were available. -**
)^ -** -** [[SQLITE_STATUS_SCRATCH_SIZE]] ^(
SQLITE_STATUS_SCRATCH_SIZE
-**
This parameter records the largest memory allocation request -** handed to [scratch memory allocator]. Only the value returned in the -** *pHighwater parameter to [sqlite3_status()] is of interest. -** The value written into the *pCurrent parameter is undefined.
)^ -** -** [[SQLITE_STATUS_PARSER_STACK]] ^(
SQLITE_STATUS_PARSER_STACK
-**
This parameter records the deepest parser stack. It is only -** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].
)^ -**
-** -** New status parameters may be added from time to time. -*/ -#define SQLITE_STATUS_MEMORY_USED 0 -#define SQLITE_STATUS_PAGECACHE_USED 1 -#define SQLITE_STATUS_PAGECACHE_OVERFLOW 2 -#define SQLITE_STATUS_SCRATCH_USED 3 -#define SQLITE_STATUS_SCRATCH_OVERFLOW 4 -#define SQLITE_STATUS_MALLOC_SIZE 5 -#define SQLITE_STATUS_PARSER_STACK 6 -#define SQLITE_STATUS_PAGECACHE_SIZE 7 -#define SQLITE_STATUS_SCRATCH_SIZE 8 -#define SQLITE_STATUS_MALLOC_COUNT 9 - -/* -** CAPI3REF: Database Connection Status -** -** ^This interface is used to retrieve runtime status information -** about a single [database connection]. ^The first argument is the -** database connection object to be interrogated. ^The second argument -** is an integer constant, taken from the set of -** [SQLITE_DBSTATUS options], that -** determines the parameter to interrogate. The set of -** [SQLITE_DBSTATUS options] is likely -** to grow in future releases of SQLite. -** -** ^The current value of the requested parameter is written into *pCur -** and the highest instantaneous value is written into *pHiwtr. ^If -** the resetFlg is true, then the highest instantaneous value is -** reset back down to the current value. -** -** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a -** non-zero [error code] on failure. -** -** See also: [sqlite3_status()] and [sqlite3_stmt_status()]. -*/ -SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); - -/* -** CAPI3REF: Status Parameters for database connections -** KEYWORDS: {SQLITE_DBSTATUS options} -** -** These constants are the available integer "verbs" that can be passed as -** the second argument to the [sqlite3_db_status()] interface. -** -** New verbs may be added in future releases of SQLite. Existing verbs -** might be discontinued. Applications should check the return code from -** [sqlite3_db_status()] to make sure that the call worked. -** The [sqlite3_db_status()] interface will return a non-zero error code -** if a discontinued or unsupported verb is invoked. -** -**
-** [[SQLITE_DBSTATUS_LOOKASIDE_USED]] ^(
SQLITE_DBSTATUS_LOOKASIDE_USED
-**
This parameter returns the number of lookaside memory slots currently -** checked out.
)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(
SQLITE_DBSTATUS_LOOKASIDE_HIT
-**
This parameter returns the number malloc attempts that were -** satisfied using lookaside memory. Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]] -** ^(
SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE
-**
This parameter returns the number malloc attempts that might have -** been satisfied using lookaside memory but failed due to the amount of -** memory requested being larger than the lookaside slot size. -** Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]] -** ^(
SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL
-**
This parameter returns the number malloc attempts that might have -** been satisfied using lookaside memory but failed due to all lookaside -** memory already being in use. -** Only the high-water value is meaningful; -** the current value is always zero.)^ -** -** [[SQLITE_DBSTATUS_CACHE_USED]] ^(
SQLITE_DBSTATUS_CACHE_USED
-**
This parameter returns the approximate number of of bytes of heap -** memory used by all pager caches associated with the database connection.)^ -** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0. -** -** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(
SQLITE_DBSTATUS_SCHEMA_USED
-**
This parameter returns the approximate number of of bytes of heap -** memory used to store the schema for all databases associated -** with the connection - main, temp, and any [ATTACH]-ed databases.)^ -** ^The full amount of memory used by the schemas is reported, even if the -** schema memory is shared with other database connections due to -** [shared cache mode] being enabled. -** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0. -** -** [[SQLITE_DBSTATUS_STMT_USED]] ^(
SQLITE_DBSTATUS_STMT_USED
-**
This parameter returns the approximate number of of bytes of heap -** and lookaside memory used by all prepared statements associated with -** the database connection.)^ -** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0. -**
-** -** [[SQLITE_DBSTATUS_CACHE_HIT]] ^(
SQLITE_DBSTATUS_CACHE_HIT
-**
This parameter returns the number of pager cache hits that have -** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_HIT -** is always 0. -**
-** -** [[SQLITE_DBSTATUS_CACHE_MISS]] ^(
SQLITE_DBSTATUS_CACHE_MISS
-**
This parameter returns the number of pager cache misses that have -** occurred.)^ ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_MISS -** is always 0. -**
-** -** [[SQLITE_DBSTATUS_CACHE_WRITE]] ^(
SQLITE_DBSTATUS_CACHE_WRITE
-**
This parameter returns the number of dirty cache entries that have -** been written to disk. Specifically, the number of pages written to the -** wal file in wal mode databases, or the number of pages written to the -** database file in rollback mode databases. Any pages written as part of -** transaction rollback or database recovery operations are not included. -** If an IO or other error occurs while writing a page to disk, the effect -** on subsequent SQLITE_DBSTATUS_CACHE_WRITE requests is undefined.)^ ^The -** highwater mark associated with SQLITE_DBSTATUS_CACHE_WRITE is always 0. -**
-**
-*/ -#define SQLITE_DBSTATUS_LOOKASIDE_USED 0 -#define SQLITE_DBSTATUS_CACHE_USED 1 -#define SQLITE_DBSTATUS_SCHEMA_USED 2 -#define SQLITE_DBSTATUS_STMT_USED 3 -#define SQLITE_DBSTATUS_LOOKASIDE_HIT 4 -#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE 5 -#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL 6 -#define SQLITE_DBSTATUS_CACHE_HIT 7 -#define SQLITE_DBSTATUS_CACHE_MISS 8 -#define SQLITE_DBSTATUS_CACHE_WRITE 9 -#define SQLITE_DBSTATUS_MAX 9 /* Largest defined DBSTATUS */ - - -/* -** CAPI3REF: Prepared Statement Status -** -** ^(Each prepared statement maintains various -** [SQLITE_STMTSTATUS counters] that measure the number -** of times it has performed specific operations.)^ These counters can -** be used to monitor the performance characteristics of the prepared -** statements. For example, if the number of table steps greatly exceeds -** the number of table searches or result rows, that would tend to indicate -** that the prepared statement is using a full table scan rather than -** an index. -** -** ^(This interface is used to retrieve and reset counter values from -** a [prepared statement]. The first argument is the prepared statement -** object to be interrogated. The second argument -** is an integer code for a specific [SQLITE_STMTSTATUS counter] -** to be interrogated.)^ -** ^The current value of the requested counter is returned. -** ^If the resetFlg is true, then the counter is reset to zero after this -** interface call returns. -** -** See also: [sqlite3_status()] and [sqlite3_db_status()]. -*/ -SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg); - -/* -** CAPI3REF: Status Parameters for prepared statements -** KEYWORDS: {SQLITE_STMTSTATUS counter} {SQLITE_STMTSTATUS counters} -** -** These preprocessor macros define integer codes that name counter -** values associated with the [sqlite3_stmt_status()] interface. -** The meanings of the various counters are as follows: -** -**
-** [[SQLITE_STMTSTATUS_FULLSCAN_STEP]]
SQLITE_STMTSTATUS_FULLSCAN_STEP
-**
^This is the number of times that SQLite has stepped forward in -** a table as part of a full table scan. Large numbers for this counter -** may indicate opportunities for performance improvement through -** careful use of indices.
-** -** [[SQLITE_STMTSTATUS_SORT]]
SQLITE_STMTSTATUS_SORT
-**
^This is the number of sort operations that have occurred. -** A non-zero value in this counter may indicate an opportunity to -** improvement performance through careful use of indices.
-** -** [[SQLITE_STMTSTATUS_AUTOINDEX]]
SQLITE_STMTSTATUS_AUTOINDEX
-**
^This is the number of rows inserted into transient indices that -** were created automatically in order to help joins run faster. -** A non-zero value in this counter may indicate an opportunity to -** improvement performance by adding permanent indices that do not -** need to be reinitialized each time the statement is run.
-**
-*/ -#define SQLITE_STMTSTATUS_FULLSCAN_STEP 1 -#define SQLITE_STMTSTATUS_SORT 2 -#define SQLITE_STMTSTATUS_AUTOINDEX 3 - -/* -** CAPI3REF: Custom Page Cache Object -** -** The sqlite3_pcache type is opaque. It is implemented by -** the pluggable module. The SQLite core has no knowledge of -** its size or internal structure and never deals with the -** sqlite3_pcache object except by holding and passing pointers -** to the object. -** -** See [sqlite3_pcache_methods2] for additional information. -*/ -typedef struct sqlite3_pcache sqlite3_pcache; - -/* -** CAPI3REF: Custom Page Cache Object -** -** The sqlite3_pcache_page object represents a single page in the -** page cache. The page cache will allocate instances of this -** object. Various methods of the page cache use pointers to instances -** of this object as parameters or as their return value. -** -** See [sqlite3_pcache_methods2] for additional information. -*/ -typedef struct sqlite3_pcache_page sqlite3_pcache_page; -struct sqlite3_pcache_page { - void *pBuf; /* The content of the page */ - void *pExtra; /* Extra information associated with the page */ -}; - -/* -** CAPI3REF: Application Defined Page Cache. -** KEYWORDS: {page cache} -** -** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE2], ...) interface can -** register an alternative page cache implementation by passing in an -** instance of the sqlite3_pcache_methods2 structure.)^ -** In many applications, most of the heap memory allocated by -** SQLite is used for the page cache. -** By implementing a -** custom page cache using this API, an application can better control -** the amount of memory consumed by SQLite, the way in which -** that memory is allocated and released, and the policies used to -** determine exactly which parts of a database file are cached and for -** how long. -** -** The alternative page cache mechanism is an -** extreme measure that is only needed by the most demanding applications. -** The built-in page cache is recommended for most uses. -** -** ^(The contents of the sqlite3_pcache_methods2 structure are copied to an -** internal buffer by SQLite within the call to [sqlite3_config]. Hence -** the application may discard the parameter after the call to -** [sqlite3_config()] returns.)^ -** -** [[the xInit() page cache method]] -** ^(The xInit() method is called once for each effective -** call to [sqlite3_initialize()])^ -** (usually only once during the lifetime of the process). ^(The xInit() -** method is passed a copy of the sqlite3_pcache_methods2.pArg value.)^ -** The intent of the xInit() method is to set up global data structures -** required by the custom page cache implementation. -** ^(If the xInit() method is NULL, then the -** built-in default page cache is used instead of the application defined -** page cache.)^ -** -** [[the xShutdown() page cache method]] -** ^The xShutdown() method is called by [sqlite3_shutdown()]. -** It can be used to clean up -** any outstanding resources before process shutdown, if required. -** ^The xShutdown() method may be NULL. -** -** ^SQLite automatically serializes calls to the xInit method, -** so the xInit method need not be threadsafe. ^The -** xShutdown method is only called from [sqlite3_shutdown()] so it does -** not need to be threadsafe either. All other methods must be threadsafe -** in multithreaded applications. -** -** ^SQLite will never invoke xInit() more than once without an intervening -** call to xShutdown(). -** -** [[the xCreate() page cache methods]] -** ^SQLite invokes the xCreate() method to construct a new cache instance. -** SQLite will typically create one cache instance for each open database file, -** though this is not guaranteed. ^The -** first parameter, szPage, is the size in bytes of the pages that must -** be allocated by the cache. ^szPage will always a power of two. ^The -** second parameter szExtra is a number of bytes of extra storage -** associated with each page cache entry. ^The szExtra parameter will -** a number less than 250. SQLite will use the -** extra szExtra bytes on each page to store metadata about the underlying -** database page on disk. The value passed into szExtra depends -** on the SQLite version, the target platform, and how SQLite was compiled. -** ^The third argument to xCreate(), bPurgeable, is true if the cache being -** created will be used to cache database pages of a file stored on disk, or -** false if it is used for an in-memory database. The cache implementation -** does not have to do anything special based with the value of bPurgeable; -** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will -** never invoke xUnpin() except to deliberately delete a page. -** ^In other words, calls to xUnpin() on a cache with bPurgeable set to -** false will always have the "discard" flag set to true. -** ^Hence, a cache created with bPurgeable false will -** never contain any unpinned pages. -** -** [[the xCachesize() page cache method]] -** ^(The xCachesize() method may be called at any time by SQLite to set the -** suggested maximum cache-size (number of pages stored by) the cache -** instance passed as the first argument. This is the value configured using -** the SQLite "[PRAGMA cache_size]" command.)^ As with the bPurgeable -** parameter, the implementation is not required to do anything with this -** value; it is advisory only. -** -** [[the xPagecount() page cache methods]] -** The xPagecount() method must return the number of pages currently -** stored in the cache, both pinned and unpinned. -** -** [[the xFetch() page cache methods]] -** The xFetch() method locates a page in the cache and returns a pointer to -** an sqlite3_pcache_page object associated with that page, or a NULL pointer. -** The pBuf element of the returned sqlite3_pcache_page object will be a -** pointer to a buffer of szPage bytes used to store the content of a -** single database page. The pExtra element of sqlite3_pcache_page will be -** a pointer to the szExtra bytes of extra storage that SQLite has requested -** for each entry in the page cache. -** -** The page to be fetched is determined by the key. ^The minimum key value -** is 1. After it has been retrieved using xFetch, the page is considered -** to be "pinned". -** -** If the requested page is already in the page cache, then the page cache -** implementation must return a pointer to the page buffer with its content -** intact. If the requested page is not already in the cache, then the -** cache implementation should use the value of the createFlag -** parameter to help it determined what action to take: -** -** -**
createFlag Behaviour when page is not already in cache -**
0 Do not allocate a new page. Return NULL. -**
1 Allocate a new page if it easy and convenient to do so. -** Otherwise return NULL. -**
2 Make every effort to allocate a new page. Only return -** NULL if allocating a new page is effectively impossible. -**
-** -** ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1. SQLite -** will only use a createFlag of 2 after a prior call with a createFlag of 1 -** failed.)^ In between the to xFetch() calls, SQLite may -** attempt to unpin one or more cache pages by spilling the content of -** pinned pages to disk and synching the operating system disk cache. -** -** [[the xUnpin() page cache method]] -** ^xUnpin() is called by SQLite with a pointer to a currently pinned page -** as its second argument. If the third parameter, discard, is non-zero, -** then the page must be evicted from the cache. -** ^If the discard parameter is -** zero, then the page may be discarded or retained at the discretion of -** page cache implementation. ^The page cache implementation -** may choose to evict unpinned pages at any time. -** -** The cache must not perform any reference counting. A single -** call to xUnpin() unpins the page regardless of the number of prior calls -** to xFetch(). -** -** [[the xRekey() page cache methods]] -** The xRekey() method is used to change the key value associated with the -** page passed as the second argument. If the cache -** previously contains an entry associated with newKey, it must be -** discarded. ^Any prior cache entry associated with newKey is guaranteed not -** to be pinned. -** -** When SQLite calls the xTruncate() method, the cache must discard all -** existing cache entries with page numbers (keys) greater than or equal -** to the value of the iLimit parameter passed to xTruncate(). If any -** of these pages are pinned, they are implicitly unpinned, meaning that -** they can be safely discarded. -** -** [[the xDestroy() page cache method]] -** ^The xDestroy() method is used to delete a cache allocated by xCreate(). -** All resources associated with the specified cache should be freed. ^After -** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*] -** handle invalid, and will not use it with any other sqlite3_pcache_methods2 -** functions. -** -** [[the xShrink() page cache method]] -** ^SQLite invokes the xShrink() method when it wants the page cache to -** free up as much of heap memory as possible. The page cache implementation -** is not obligated to free any memory, but well-behaved implementations should -** do their best. -*/ -typedef struct sqlite3_pcache_methods2 sqlite3_pcache_methods2; -struct sqlite3_pcache_methods2 { - int iVersion; - void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int szExtra, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - sqlite3_pcache_page *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, sqlite3_pcache_page*, int discard); - void (*xRekey)(sqlite3_pcache*, sqlite3_pcache_page*, - unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); - void (*xShrink)(sqlite3_pcache*); -}; - -/* -** This is the obsolete pcache_methods object that has now been replaced -** by sqlite3_pcache_methods2. This object is not used by SQLite. It is -** retained in the header file for backwards compatibility only. -*/ -typedef struct sqlite3_pcache_methods sqlite3_pcache_methods; -struct sqlite3_pcache_methods { - void *pArg; - int (*xInit)(void*); - void (*xShutdown)(void*); - sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable); - void (*xCachesize)(sqlite3_pcache*, int nCachesize); - int (*xPagecount)(sqlite3_pcache*); - void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag); - void (*xUnpin)(sqlite3_pcache*, void*, int discard); - void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey); - void (*xTruncate)(sqlite3_pcache*, unsigned iLimit); - void (*xDestroy)(sqlite3_pcache*); -}; - - -/* -** CAPI3REF: Online Backup Object -** -** The sqlite3_backup object records state information about an ongoing -** online backup operation. ^The sqlite3_backup object is created by -** a call to [sqlite3_backup_init()] and is destroyed by a call to -** [sqlite3_backup_finish()]. -** -** See Also: [Using the SQLite Online Backup API] -*/ -typedef struct sqlite3_backup sqlite3_backup; - -/* -** CAPI3REF: Online Backup API. -** -** The backup API copies the content of one database into another. -** It is useful either for creating backups of databases or -** for copying in-memory databases to or from persistent files. -** -** See Also: [Using the SQLite Online Backup API] -** -** ^SQLite holds a write transaction open on the destination database file -** for the duration of the backup operation. -** ^The source database is read-locked only while it is being read; -** it is not locked continuously for the entire backup operation. -** ^Thus, the backup may be performed on a live source database without -** preventing other database connections from -** reading or writing to the source database while the backup is underway. -** -** ^(To perform a backup operation: -**
    -**
  1. sqlite3_backup_init() is called once to initialize the -** backup, -**
  2. sqlite3_backup_step() is called one or more times to transfer -** the data between the two databases, and finally -**
  3. sqlite3_backup_finish() is called to release all resources -** associated with the backup operation. -**
)^ -** There should be exactly one call to sqlite3_backup_finish() for each -** successful call to sqlite3_backup_init(). -** -** [[sqlite3_backup_init()]] sqlite3_backup_init() -** -** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the -** [database connection] associated with the destination database -** and the database name, respectively. -** ^The database name is "main" for the main database, "temp" for the -** temporary database, or the name specified after the AS keyword in -** an [ATTACH] statement for an attached database. -** ^The S and M arguments passed to -** sqlite3_backup_init(D,N,S,M) identify the [database connection] -** and database name of the source database, respectively. -** ^The source and destination [database connections] (parameters S and D) -** must be different or else sqlite3_backup_init(D,N,S,M) will fail with -** an error. -** -** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is -** returned and an error code and error message are stored in the -** destination [database connection] D. -** ^The error code and message for the failed call to sqlite3_backup_init() -** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or -** [sqlite3_errmsg16()] functions. -** ^A successful call to sqlite3_backup_init() returns a pointer to an -** [sqlite3_backup] object. -** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and -** sqlite3_backup_finish() functions to perform the specified backup -** operation. -** -** [[sqlite3_backup_step()]] sqlite3_backup_step() -** -** ^Function sqlite3_backup_step(B,N) will copy up to N pages between -** the source and destination databases specified by [sqlite3_backup] object B. -** ^If N is negative, all remaining source pages are copied. -** ^If sqlite3_backup_step(B,N) successfully copies N pages and there -** are still more pages to be copied, then the function returns [SQLITE_OK]. -** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages -** from source to destination, then it returns [SQLITE_DONE]. -** ^If an error occurs while running sqlite3_backup_step(B,N), -** then an [error code] is returned. ^As well as [SQLITE_OK] and -** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY], -** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code. -** -** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if -**
    -**
  1. the destination database was opened read-only, or -**
  2. the destination database is using write-ahead-log journaling -** and the destination and source page sizes differ, or -**
  3. the destination database is an in-memory database and the -** destination and source page sizes differ. -**
)^ -** -** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then -** the [sqlite3_busy_handler | busy-handler function] -** is invoked (if one is specified). ^If the -** busy-handler returns non-zero before the lock is available, then -** [SQLITE_BUSY] is returned to the caller. ^In this case the call to -** sqlite3_backup_step() can be retried later. ^If the source -** [database connection] -** is being used to write to the source database when sqlite3_backup_step() -** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this -** case the call to sqlite3_backup_step() can be retried later on. ^(If -** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or -** [SQLITE_READONLY] is returned, then -** there is no point in retrying the call to sqlite3_backup_step(). These -** errors are considered fatal.)^ The application must accept -** that the backup operation has failed and pass the backup operation handle -** to the sqlite3_backup_finish() to release associated resources. -** -** ^The first call to sqlite3_backup_step() obtains an exclusive lock -** on the destination file. ^The exclusive lock is not released until either -** sqlite3_backup_finish() is called or the backup operation is complete -** and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to -** sqlite3_backup_step() obtains a [shared lock] on the source database that -** lasts for the duration of the sqlite3_backup_step() call. -** ^Because the source database is not locked between calls to -** sqlite3_backup_step(), the source database may be modified mid-way -** through the backup process. ^If the source database is modified by an -** external process or via a database connection other than the one being -** used by the backup operation, then the backup will be automatically -** restarted by the next call to sqlite3_backup_step(). ^If the source -** database is modified by the using the same database connection as is used -** by the backup operation, then the backup database is automatically -** updated at the same time. -** -** [[sqlite3_backup_finish()]] sqlite3_backup_finish() -** -** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the -** application wishes to abandon the backup operation, the application -** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish(). -** ^The sqlite3_backup_finish() interfaces releases all -** resources associated with the [sqlite3_backup] object. -** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any -** active write-transaction on the destination database is rolled back. -** The [sqlite3_backup] object is invalid -** and may not be used following a call to sqlite3_backup_finish(). -** -** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no -** sqlite3_backup_step() errors occurred, regardless or whether or not -** sqlite3_backup_step() completed. -** ^If an out-of-memory condition or IO error occurred during any prior -** sqlite3_backup_step() call on the same [sqlite3_backup] object, then -** sqlite3_backup_finish() returns the corresponding [error code]. -** -** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step() -** is not a permanent error and does not affect the return value of -** sqlite3_backup_finish(). -** -** [[sqlite3_backup__remaining()]] [[sqlite3_backup_pagecount()]] -** sqlite3_backup_remaining() and sqlite3_backup_pagecount() -** -** ^Each call to sqlite3_backup_step() sets two values inside -** the [sqlite3_backup] object: the number of pages still to be backed -** up and the total number of pages in the source database file. -** The sqlite3_backup_remaining() and sqlite3_backup_pagecount() interfaces -** retrieve these two values, respectively. -** -** ^The values returned by these functions are only updated by -** sqlite3_backup_step(). ^If the source database is modified during a backup -** operation, then the values are not updated to account for any extra -** pages that need to be updated or the size of the source database file -** changing. -** -** Concurrent Usage of Database Handles -** -** ^The source [database connection] may be used by the application for other -** purposes while a backup operation is underway or being initialized. -** ^If SQLite is compiled and configured to support threadsafe database -** connections, then the source database connection may be used concurrently -** from within other threads. -** -** However, the application must guarantee that the destination -** [database connection] is not passed to any other API (by any thread) after -** sqlite3_backup_init() is called and before the corresponding call to -** sqlite3_backup_finish(). SQLite does not currently check to see -** if the application incorrectly accesses the destination [database connection] -** and so no error code is reported, but the operations may malfunction -** nevertheless. Use of the destination database connection while a -** backup is in progress might also also cause a mutex deadlock. -** -** If running in [shared cache mode], the application must -** guarantee that the shared cache used by the destination database -** is not accessed while the backup is running. In practice this means -** that the application must guarantee that the disk file being -** backed up to is not accessed by any connection within the process, -** not just the specific connection that was passed to sqlite3_backup_init(). -** -** The [sqlite3_backup] object itself is partially threadsafe. Multiple -** threads may safely make multiple concurrent calls to sqlite3_backup_step(). -** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount() -** APIs are not strictly speaking threadsafe. If they are invoked at the -** same time as another thread is invoking sqlite3_backup_step() it is -** possible that they return invalid values. -*/ -SQLITE_API sqlite3_backup *sqlite3_backup_init( - sqlite3 *pDest, /* Destination database handle */ - const char *zDestName, /* Destination database name */ - sqlite3 *pSource, /* Source database handle */ - const char *zSourceName /* Source database name */ -); -SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); -SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); -SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p); -SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); - -/* -** CAPI3REF: Unlock Notification -** -** ^When running in shared-cache mode, a database operation may fail with -** an [SQLITE_LOCKED] error if the required locks on the shared-cache or -** individual tables within the shared-cache cannot be obtained. See -** [SQLite Shared-Cache Mode] for a description of shared-cache locking. -** ^This API may be used to register a callback that SQLite will invoke -** when the connection currently holding the required lock relinquishes it. -** ^This API is only available if the library was compiled with the -** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined. -** -** See Also: [Using the SQLite Unlock Notification Feature]. -** -** ^Shared-cache locks are released when a database connection concludes -** its current transaction, either by committing it or rolling it back. -** -** ^When a connection (known as the blocked connection) fails to obtain a -** shared-cache lock and SQLITE_LOCKED is returned to the caller, the -** identity of the database connection (the blocking connection) that -** has locked the required resource is stored internally. ^After an -** application receives an SQLITE_LOCKED error, it may call the -** sqlite3_unlock_notify() method with the blocked connection handle as -** the first argument to register for a callback that will be invoked -** when the blocking connections current transaction is concluded. ^The -** callback is invoked from within the [sqlite3_step] or [sqlite3_close] -** call that concludes the blocking connections transaction. -** -** ^(If sqlite3_unlock_notify() is called in a multi-threaded application, -** there is a chance that the blocking connection will have already -** concluded its transaction by the time sqlite3_unlock_notify() is invoked. -** If this happens, then the specified callback is invoked immediately, -** from within the call to sqlite3_unlock_notify().)^ -** -** ^If the blocked connection is attempting to obtain a write-lock on a -** shared-cache table, and more than one other connection currently holds -** a read-lock on the same table, then SQLite arbitrarily selects one of -** the other connections to use as the blocking connection. -** -** ^(There may be at most one unlock-notify callback registered by a -** blocked connection. If sqlite3_unlock_notify() is called when the -** blocked connection already has a registered unlock-notify callback, -** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is -** called with a NULL pointer as its second argument, then any existing -** unlock-notify callback is canceled. ^The blocked connections -** unlock-notify callback may also be canceled by closing the blocked -** connection using [sqlite3_close()]. -** -** The unlock-notify callback is not reentrant. If an application invokes -** any sqlite3_xxx API functions from within an unlock-notify callback, a -** crash or deadlock may be the result. -** -** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always -** returns SQLITE_OK. -** -** Callback Invocation Details -** -** When an unlock-notify callback is registered, the application provides a -** single void* pointer that is passed to the callback when it is invoked. -** However, the signature of the callback function allows SQLite to pass -** it an array of void* context pointers. The first argument passed to -** an unlock-notify callback is a pointer to an array of void* pointers, -** and the second is the number of entries in the array. -** -** When a blocking connections transaction is concluded, there may be -** more than one blocked connection that has registered for an unlock-notify -** callback. ^If two or more such blocked connections have specified the -** same callback function, then instead of invoking the callback function -** multiple times, it is invoked once with the set of void* context pointers -** specified by the blocked connections bundled together into an array. -** This gives the application an opportunity to prioritize any actions -** related to the set of unblocked database connections. -** -** Deadlock Detection -** -** Assuming that after registering for an unlock-notify callback a -** database waits for the callback to be issued before taking any further -** action (a reasonable assumption), then using this API may cause the -** application to deadlock. For example, if connection X is waiting for -** connection Y's transaction to be concluded, and similarly connection -** Y is waiting on connection X's transaction, then neither connection -** will proceed and the system may remain deadlocked indefinitely. -** -** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock -** detection. ^If a given call to sqlite3_unlock_notify() would put the -** system in a deadlocked state, then SQLITE_LOCKED is returned and no -** unlock-notify callback is registered. The system is said to be in -** a deadlocked state if connection A has registered for an unlock-notify -** callback on the conclusion of connection B's transaction, and connection -** B has itself registered for an unlock-notify callback when connection -** A's transaction is concluded. ^Indirect deadlock is also detected, so -** the system is also considered to be deadlocked if connection B has -** registered for an unlock-notify callback on the conclusion of connection -** C's transaction, where connection C is waiting on connection A. ^Any -** number of levels of indirection are allowed. -** -** The "DROP TABLE" Exception -** -** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost -** always appropriate to call sqlite3_unlock_notify(). There is however, -** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement, -** SQLite checks if there are any currently executing SELECT statements -** that belong to the same connection. If there are, SQLITE_LOCKED is -** returned. In this case there is no "blocking connection", so invoking -** sqlite3_unlock_notify() results in the unlock-notify callback being -** invoked immediately. If the application then re-attempts the "DROP TABLE" -** or "DROP INDEX" query, an infinite loop might be the result. -** -** One way around this problem is to check the extended error code returned -** by an sqlite3_step() call. ^(If there is a blocking connection, then the -** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in -** the special "DROP TABLE/INDEX" case, the extended error code is just -** SQLITE_LOCKED.)^ -*/ -SQLITE_API int sqlite3_unlock_notify( - sqlite3 *pBlocked, /* Waiting connection */ - void (*xNotify)(void **apArg, int nArg), /* Callback function to invoke */ - void *pNotifyArg /* Argument to pass to xNotify */ -); - - -/* -** CAPI3REF: String Comparison -** -** ^The [sqlite3_stricmp()] and [sqlite3_strnicmp()] APIs allow applications -** and extensions to compare the contents of two buffers containing UTF-8 -** strings in a case-independent fashion, using the same definition of "case -** independence" that SQLite uses internally when comparing identifiers. -*/ -SQLITE_API int sqlite3_stricmp(const char *, const char *); -SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); - -/* -** CAPI3REF: Error Logging Interface -** -** ^The [sqlite3_log()] interface writes a message into the error log -** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()]. -** ^If logging is enabled, the zFormat string and subsequent arguments are -** used with [sqlite3_snprintf()] to generate the final output string. -** -** The sqlite3_log() interface is intended for use by extensions such as -** virtual tables, collating functions, and SQL functions. While there is -** nothing to prevent an application from calling sqlite3_log(), doing so -** is considered bad form. -** -** The zFormat string must not be NULL. -** -** To avoid deadlocks and other threading problems, the sqlite3_log() routine -** will not use dynamically allocated memory. The log message is stored in -** a fixed-length buffer on the stack. If the log message is longer than -** a few hundred characters, it will be truncated to the length of the -** buffer. -*/ -SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); - -/* -** CAPI3REF: Write-Ahead Log Commit Hook -** -** ^The [sqlite3_wal_hook()] function is used to register a callback that -** will be invoked each time a database connection commits data to a -** [write-ahead log] (i.e. whenever a transaction is committed in -** [journal_mode | journal_mode=WAL mode]). -** -** ^The callback is invoked by SQLite after the commit has taken place and -** the associated write-lock on the database released, so the implementation -** may read, write or [checkpoint] the database as required. -** -** ^The first parameter passed to the callback function when it is invoked -** is a copy of the third parameter passed to sqlite3_wal_hook() when -** registering the callback. ^The second is a copy of the database handle. -** ^The third parameter is the name of the database that was written to - -** either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter -** is the number of pages currently in the write-ahead log file, -** including those that were just committed. -** -** The callback function should normally return [SQLITE_OK]. ^If an error -** code is returned, that error will propagate back up through the -** SQLite code base to cause the statement that provoked the callback -** to report an error, though the commit will have still occurred. If the -** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value -** that does not correspond to any valid SQLite error code, the results -** are undefined. -** -** A single database handle may have at most a single write-ahead log callback -** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any -** previously registered write-ahead log callback. ^Note that the -** [sqlite3_wal_autocheckpoint()] interface and the -** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will -** those overwrite any prior [sqlite3_wal_hook()] settings. -*/ -SQLITE_API void *sqlite3_wal_hook( - sqlite3*, - int(*)(void *,sqlite3*,const char*,int), - void* -); - -/* -** CAPI3REF: Configure an auto-checkpoint -** -** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around -** [sqlite3_wal_hook()] that causes any database on [database connection] D -** to automatically [checkpoint] -** after committing a transaction if there are N or -** more frames in the [write-ahead log] file. ^Passing zero or -** a negative value as the nFrame parameter disables automatic -** checkpoints entirely. -** -** ^The callback registered by this function replaces any existing callback -** registered using [sqlite3_wal_hook()]. ^Likewise, registering a callback -** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism -** configured by this function. -** -** ^The [wal_autocheckpoint pragma] can be used to invoke this interface -** from SQL. -** -** ^Every new [database connection] defaults to having the auto-checkpoint -** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] -** pages. The use of this interface -** is only necessary if the default setting is found to be suboptimal -** for a particular application. -*/ -SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); - -/* -** CAPI3REF: Checkpoint a database -** -** ^The [sqlite3_wal_checkpoint(D,X)] interface causes database named X -** on [database connection] D to be [checkpointed]. ^If X is NULL or an -** empty string, then a checkpoint is run on all databases of -** connection D. ^If the database connection D is not in -** [WAL | write-ahead log mode] then this interface is a harmless no-op. -** -** ^The [wal_checkpoint pragma] can be used to invoke this interface -** from SQL. ^The [sqlite3_wal_autocheckpoint()] interface and the -** [wal_autocheckpoint pragma] can be used to cause this interface to be -** run whenever the WAL reaches a certain size threshold. -** -** See also: [sqlite3_wal_checkpoint_v2()] -*/ -SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); - -/* -** CAPI3REF: Checkpoint a database -** -** Run a checkpoint operation on WAL database zDb attached to database -** handle db. The specific operation is determined by the value of the -** eMode parameter: -** -**
-**
SQLITE_CHECKPOINT_PASSIVE
-** Checkpoint as many frames as possible without waiting for any database -** readers or writers to finish. Sync the db file if all frames in the log -** are checkpointed. This mode is the same as calling -** sqlite3_wal_checkpoint(). The busy-handler callback is never invoked. -** -**
SQLITE_CHECKPOINT_FULL
-** This mode blocks (calls the busy-handler callback) until there is no -** database writer and all readers are reading from the most recent database -** snapshot. It then checkpoints all frames in the log file and syncs the -** database file. This call blocks database writers while it is running, -** but not database readers. -** -**
SQLITE_CHECKPOINT_RESTART
-** This mode works the same way as SQLITE_CHECKPOINT_FULL, except after -** checkpointing the log file it blocks (calls the busy-handler callback) -** until all readers are reading from the database file only. This ensures -** that the next client to write to the database file restarts the log file -** from the beginning. This call blocks database writers while it is running, -** but not database readers. -**
-** -** If pnLog is not NULL, then *pnLog is set to the total number of frames in -** the log file before returning. If pnCkpt is not NULL, then *pnCkpt is set to -** the total number of checkpointed frames (including any that were already -** checkpointed when this function is called). *pnLog and *pnCkpt may be -** populated even if sqlite3_wal_checkpoint_v2() returns other than SQLITE_OK. -** If no values are available because of an error, they are both set to -1 -** before returning to communicate this to the caller. -** -** All calls obtain an exclusive "checkpoint" lock on the database file. If -** any other process is running a checkpoint operation at the same time, the -** lock cannot be obtained and SQLITE_BUSY is returned. Even if there is a -** busy-handler configured, it will not be invoked in this case. -** -** The SQLITE_CHECKPOINT_FULL and RESTART modes also obtain the exclusive -** "writer" lock on the database file. If the writer lock cannot be obtained -** immediately, and a busy-handler is configured, it is invoked and the writer -** lock retried until either the busy-handler returns 0 or the lock is -** successfully obtained. The busy-handler is also invoked while waiting for -** database readers as described above. If the busy-handler returns 0 before -** the writer lock is obtained or while waiting for database readers, the -** checkpoint operation proceeds from that point in the same way as -** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible -** without blocking any further. SQLITE_BUSY is returned in this case. -** -** If parameter zDb is NULL or points to a zero length string, then the -** specified operation is attempted on all WAL databases. In this case the -** values written to output parameters *pnLog and *pnCkpt are undefined. If -** an SQLITE_BUSY error is encountered when processing one or more of the -** attached WAL databases, the operation is still attempted on any remaining -** attached databases and SQLITE_BUSY is returned to the caller. If any other -** error occurs while processing an attached database, processing is abandoned -** and the error code returned to the caller immediately. If no error -** (SQLITE_BUSY or otherwise) is encountered while processing the attached -** databases, SQLITE_OK is returned. -** -** If database zDb is the name of an attached database that is not in WAL -** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. If -** zDb is not NULL (or a zero length string) and is not the name of any -** attached database, SQLITE_ERROR is returned to the caller. -*/ -SQLITE_API int sqlite3_wal_checkpoint_v2( - sqlite3 *db, /* Database handle */ - const char *zDb, /* Name of attached database (or NULL) */ - int eMode, /* SQLITE_CHECKPOINT_* value */ - int *pnLog, /* OUT: Size of WAL log in frames */ - int *pnCkpt /* OUT: Total number of frames checkpointed */ -); - -/* -** CAPI3REF: Checkpoint operation parameters -** -** These constants can be used as the 3rd parameter to -** [sqlite3_wal_checkpoint_v2()]. See the [sqlite3_wal_checkpoint_v2()] -** documentation for additional information about the meaning and use of -** each of these values. -*/ -#define SQLITE_CHECKPOINT_PASSIVE 0 -#define SQLITE_CHECKPOINT_FULL 1 -#define SQLITE_CHECKPOINT_RESTART 2 - -/* -** CAPI3REF: Virtual Table Interface Configuration -** -** This function may be called by either the [xConnect] or [xCreate] method -** of a [virtual table] implementation to configure -** various facets of the virtual table interface. -** -** If this interface is invoked outside the context of an xConnect or -** xCreate virtual table method then the behavior is undefined. -** -** At present, there is only one option that may be configured using -** this function. (See [SQLITE_VTAB_CONSTRAINT_SUPPORT].) Further options -** may be added in the future. -*/ -SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); - -/* -** CAPI3REF: Virtual Table Configuration Options -** -** These macros define the various options to the -** [sqlite3_vtab_config()] interface that [virtual table] implementations -** can use to customize and optimize their behavior. -** -**
-**
SQLITE_VTAB_CONSTRAINT_SUPPORT -**
Calls of the form -** [sqlite3_vtab_config](db,SQLITE_VTAB_CONSTRAINT_SUPPORT,X) are supported, -** where X is an integer. If X is zero, then the [virtual table] whose -** [xCreate] or [xConnect] method invoked [sqlite3_vtab_config()] does not -** support constraints. In this configuration (which is the default) if -** a call to the [xUpdate] method returns [SQLITE_CONSTRAINT], then the entire -** statement is rolled back as if [ON CONFLICT | OR ABORT] had been -** specified as part of the users SQL statement, regardless of the actual -** ON CONFLICT mode specified. -** -** If X is non-zero, then the virtual table implementation guarantees -** that if [xUpdate] returns [SQLITE_CONSTRAINT], it will do so before -** any modifications to internal or persistent data structures have been made. -** If the [ON CONFLICT] mode is ABORT, FAIL, IGNORE or ROLLBACK, SQLite -** is able to roll back a statement or database transaction, and abandon -** or continue processing the current SQL statement as appropriate. -** If the ON CONFLICT mode is REPLACE and the [xUpdate] method returns -** [SQLITE_CONSTRAINT], SQLite handles this as if the ON CONFLICT mode -** had been ABORT. -** -** Virtual table implementations that are required to handle OR REPLACE -** must do so within the [xUpdate] method. If a call to the -** [sqlite3_vtab_on_conflict()] function indicates that the current ON -** CONFLICT policy is REPLACE, the virtual table implementation should -** silently replace the appropriate rows within the xUpdate callback and -** return SQLITE_OK. Or, if this is not possible, it may return -** SQLITE_CONSTRAINT, in which case SQLite falls back to OR ABORT -** constraint handling. -**
-*/ -#define SQLITE_VTAB_CONSTRAINT_SUPPORT 1 - -/* -** CAPI3REF: Determine The Virtual Table Conflict Policy -** -** This function may only be called from within a call to the [xUpdate] method -** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The -** value returned is one of [SQLITE_ROLLBACK], [SQLITE_IGNORE], [SQLITE_FAIL], -** [SQLITE_ABORT], or [SQLITE_REPLACE], according to the [ON CONFLICT] mode -** of the SQL statement that triggered the call to the [xUpdate] method of the -** [virtual table]. -*/ -SQLITE_API int sqlite3_vtab_on_conflict(sqlite3 *); - -/* -** CAPI3REF: Conflict resolution modes -** -** These constants are returned by [sqlite3_vtab_on_conflict()] to -** inform a [virtual table] implementation what the [ON CONFLICT] mode -** is for the SQL statement being evaluated. -** -** Note that the [SQLITE_IGNORE] constant is also used as a potential -** return value from the [sqlite3_set_authorizer()] callback and that -** [SQLITE_ABORT] is also a [result code]. -*/ -#define SQLITE_ROLLBACK 1 -/* #define SQLITE_IGNORE 2 // Also used by sqlite3_authorizer() callback */ -#define SQLITE_FAIL 3 -/* #define SQLITE_ABORT 4 // Also an error code */ -#define SQLITE_REPLACE 5 - - - -/* -** Undo the hack that converts floating point types to integer for -** builds on processors without floating point support. -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# undef double -#endif - -#if 0 -} /* End of the 'extern "C"' block */ -#endif -#endif - -/* -** 2010 August 30 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -*/ - -#ifndef _SQLITE3RTREE_H_ -#define _SQLITE3RTREE_H_ - - -#if 0 -extern "C" { -#endif - -typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry; - -/* -** Register a geometry callback named zGeom that can be used as part of an -** R-Tree geometry query as follows: -** -** SELECT ... FROM WHERE MATCH $zGeom(... params ...) -*/ -SQLITE_API int sqlite3_rtree_geometry_callback( - sqlite3 *db, - const char *zGeom, -#ifdef SQLITE_RTREE_INT_ONLY - int (*xGeom)(sqlite3_rtree_geometry*, int n, sqlite3_int64 *a, int *pRes), -#else - int (*xGeom)(sqlite3_rtree_geometry*, int n, double *a, int *pRes), -#endif - void *pContext -); - - -/* -** A pointer to a structure of the following type is passed as the first -** argument to callbacks registered using rtree_geometry_callback(). -*/ -struct sqlite3_rtree_geometry { - void *pContext; /* Copy of pContext passed to s_r_g_c() */ - int nParam; /* Size of array aParam[] */ - double *aParam; /* Parameters passed to SQL geom function */ - void *pUser; /* Callback implementation user data */ - void (*xDelUser)(void *); /* Called by SQLite to clean up pUser */ -}; - - -#if 0 -} /* end of the 'extern "C"' block */ -#endif - -#endif /* ifndef _SQLITE3RTREE_H_ */ - - -/************** End of sqlite3.h *********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include hash.h in the middle of sqliteInt.h ******************/ -/************** Begin file hash.h ********************************************/ -/* -** 2001 September 22 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This is the header file for the generic hash-table implemenation -** used in SQLite. -*/ -#ifndef _SQLITE_HASH_H_ -#define _SQLITE_HASH_H_ - -/* Forward declarations of structures. */ -typedef struct Hash Hash; -typedef struct HashElem HashElem; - -/* A complete hash table is an instance of the following structure. -** The internals of this structure are intended to be opaque -- client -** code should not attempt to access or modify the fields of this structure -** directly. Change this structure only by using the routines below. -** However, some of the "procedures" and "functions" for modifying and -** accessing this structure are really macros, so we can't really make -** this structure opaque. -** -** All elements of the hash table are on a single doubly-linked list. -** Hash.first points to the head of this list. -** -** There are Hash.htsize buckets. Each bucket points to a spot in -** the global doubly-linked list. The contents of the bucket are the -** element pointed to plus the next _ht.count-1 elements in the list. -** -** Hash.htsize and Hash.ht may be zero. In that case lookup is done -** by a linear search of the global list. For small tables, the -** Hash.ht table is never allocated because if there are few elements -** in the table, it is faster to do a linear search than to manage -** the hash table. -*/ -struct Hash { - unsigned int htsize; /* Number of buckets in the hash table */ - unsigned int count; /* Number of entries in this table */ - HashElem *first; /* The first element of the array */ - struct _ht { /* the hash table */ - int count; /* Number of entries with this hash */ - HashElem *chain; /* Pointer to first entry with this hash */ - } *ht; -}; - -/* Each element in the hash table is an instance of the following -** structure. All elements are stored on a single doubly-linked list. -** -** Again, this structure is intended to be opaque, but it can't really -** be opaque because it is used by macros. -*/ -struct HashElem { - HashElem *next, *prev; /* Next and previous elements in the table */ - void *data; /* Data associated with this element */ - const char *pKey; int nKey; /* Key associated with this element */ -}; - -/* -** Access routines. To delete, insert a NULL pointer. -*/ -SQLITE_PRIVATE void sqlite3HashInit(Hash*); -SQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const char *pKey, int nKey, void *pData); -SQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const char *pKey, int nKey); -SQLITE_PRIVATE void sqlite3HashClear(Hash*); - -/* -** Macros for looping over all elements of a hash table. The idiom is -** like this: -** -** Hash h; -** HashElem *p; -** ... -** for(p=sqliteHashFirst(&h); p; p=sqliteHashNext(p)){ -** SomeStructure *pData = sqliteHashData(p); -** // do something with pData -** } -*/ -#define sqliteHashFirst(H) ((H)->first) -#define sqliteHashNext(E) ((E)->next) -#define sqliteHashData(E) ((E)->data) -/* #define sqliteHashKey(E) ((E)->pKey) // NOT USED */ -/* #define sqliteHashKeysize(E) ((E)->nKey) // NOT USED */ - -/* -** Number of entries in a hash table -*/ -/* #define sqliteHashCount(H) ((H)->count) // NOT USED */ - -#endif /* _SQLITE_HASH_H_ */ - -/************** End of hash.h ************************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include parse.h in the middle of sqliteInt.h *****************/ -/************** Begin file parse.h *******************************************/ -#define TK_SEMI 1 -#define TK_EXPLAIN 2 -#define TK_QUERY 3 -#define TK_PLAN 4 -#define TK_BEGIN 5 -#define TK_TRANSACTION 6 -#define TK_DEFERRED 7 -#define TK_IMMEDIATE 8 -#define TK_EXCLUSIVE 9 -#define TK_COMMIT 10 -#define TK_END 11 -#define TK_ROLLBACK 12 -#define TK_SAVEPOINT 13 -#define TK_RELEASE 14 -#define TK_TO 15 -#define TK_TABLE 16 -#define TK_CREATE 17 -#define TK_IF 18 -#define TK_NOT 19 -#define TK_EXISTS 20 -#define TK_TEMP 21 -#define TK_LP 22 -#define TK_RP 23 -#define TK_AS 24 -#define TK_COMMA 25 -#define TK_ID 26 -#define TK_INDEXED 27 -#define TK_ABORT 28 -#define TK_ACTION 29 -#define TK_AFTER 30 -#define TK_ANALYZE 31 -#define TK_ASC 32 -#define TK_ATTACH 33 -#define TK_BEFORE 34 -#define TK_BY 35 -#define TK_CASCADE 36 -#define TK_CAST 37 -#define TK_COLUMNKW 38 -#define TK_CONFLICT 39 -#define TK_DATABASE 40 -#define TK_DESC 41 -#define TK_DETACH 42 -#define TK_EACH 43 -#define TK_FAIL 44 -#define TK_FOR 45 -#define TK_IGNORE 46 -#define TK_INITIALLY 47 -#define TK_INSTEAD 48 -#define TK_LIKE_KW 49 -#define TK_MATCH 50 -#define TK_NO 51 -#define TK_KEY 52 -#define TK_OF 53 -#define TK_OFFSET 54 -#define TK_PRAGMA 55 -#define TK_RAISE 56 -#define TK_REPLACE 57 -#define TK_RESTRICT 58 -#define TK_ROW 59 -#define TK_TRIGGER 60 -#define TK_VACUUM 61 -#define TK_VIEW 62 -#define TK_VIRTUAL 63 -#define TK_REINDEX 64 -#define TK_RENAME 65 -#define TK_CTIME_KW 66 -#define TK_ANY 67 -#define TK_OR 68 -#define TK_AND 69 -#define TK_IS 70 -#define TK_BETWEEN 71 -#define TK_IN 72 -#define TK_ISNULL 73 -#define TK_NOTNULL 74 -#define TK_NE 75 -#define TK_EQ 76 -#define TK_GT 77 -#define TK_LE 78 -#define TK_LT 79 -#define TK_GE 80 -#define TK_ESCAPE 81 -#define TK_BITAND 82 -#define TK_BITOR 83 -#define TK_LSHIFT 84 -#define TK_RSHIFT 85 -#define TK_PLUS 86 -#define TK_MINUS 87 -#define TK_STAR 88 -#define TK_SLASH 89 -#define TK_REM 90 -#define TK_CONCAT 91 -#define TK_COLLATE 92 -#define TK_BITNOT 93 -#define TK_STRING 94 -#define TK_JOIN_KW 95 -#define TK_CONSTRAINT 96 -#define TK_DEFAULT 97 -#define TK_NULL 98 -#define TK_PRIMARY 99 -#define TK_UNIQUE 100 -#define TK_CHECK 101 -#define TK_REFERENCES 102 -#define TK_AUTOINCR 103 -#define TK_ON 104 -#define TK_INSERT 105 -#define TK_DELETE 106 -#define TK_UPDATE 107 -#define TK_SET 108 -#define TK_DEFERRABLE 109 -#define TK_FOREIGN 110 -#define TK_DROP 111 -#define TK_UNION 112 -#define TK_ALL 113 -#define TK_EXCEPT 114 -#define TK_INTERSECT 115 -#define TK_SELECT 116 -#define TK_DISTINCT 117 -#define TK_DOT 118 -#define TK_FROM 119 -#define TK_JOIN 120 -#define TK_USING 121 -#define TK_ORDER 122 -#define TK_GROUP 123 -#define TK_HAVING 124 -#define TK_LIMIT 125 -#define TK_WHERE 126 -#define TK_INTO 127 -#define TK_VALUES 128 -#define TK_INTEGER 129 -#define TK_FLOAT 130 -#define TK_BLOB 131 -#define TK_REGISTER 132 -#define TK_VARIABLE 133 -#define TK_CASE 134 -#define TK_WHEN 135 -#define TK_THEN 136 -#define TK_ELSE 137 -#define TK_INDEX 138 -#define TK_ALTER 139 -#define TK_ADD 140 -#define TK_TO_TEXT 141 -#define TK_TO_BLOB 142 -#define TK_TO_NUMERIC 143 -#define TK_TO_INT 144 -#define TK_TO_REAL 145 -#define TK_ISNOT 146 -#define TK_END_OF_FILE 147 -#define TK_ILLEGAL 148 -#define TK_SPACE 149 -#define TK_UNCLOSED_STRING 150 -#define TK_FUNCTION 151 -#define TK_COLUMN 152 -#define TK_AGG_FUNCTION 153 -#define TK_AGG_COLUMN 154 -#define TK_CONST_FUNC 155 -#define TK_UMINUS 156 -#define TK_UPLUS 157 - -/************** End of parse.h ***********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -#include -#include -#include -#include -#include - -/* -** If compiling for a processor that lacks floating point support, -** substitute integer for floating-point -*/ -#ifdef SQLITE_OMIT_FLOATING_POINT -# define double sqlite_int64 -# define float sqlite_int64 -# define LONGDOUBLE_TYPE sqlite_int64 -# ifndef SQLITE_BIG_DBL -# define SQLITE_BIG_DBL (((sqlite3_int64)1)<<50) -# endif -# define SQLITE_OMIT_DATETIME_FUNCS 1 -# define SQLITE_OMIT_TRACE 1 -# undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT -# undef SQLITE_HAVE_ISNAN -#endif -#ifndef SQLITE_BIG_DBL -# define SQLITE_BIG_DBL (1e99) -#endif - -/* -** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0 -** afterward. Having this macro allows us to cause the C compiler -** to omit code used by TEMP tables without messy #ifndef statements. -*/ -#ifdef SQLITE_OMIT_TEMPDB -#define OMIT_TEMPDB 1 -#else -#define OMIT_TEMPDB 0 -#endif - -/* -** The "file format" number is an integer that is incremented whenever -** the VDBE-level file format changes. The following macros define the -** the default file format for new databases and the maximum file format -** that the library can read. -*/ -#define SQLITE_MAX_FILE_FORMAT 4 -#ifndef SQLITE_DEFAULT_FILE_FORMAT -# define SQLITE_DEFAULT_FILE_FORMAT 4 -#endif - -/* -** Determine whether triggers are recursive by default. This can be -** changed at run-time using a pragma. -*/ -#ifndef SQLITE_DEFAULT_RECURSIVE_TRIGGERS -# define SQLITE_DEFAULT_RECURSIVE_TRIGGERS 0 -#endif - -/* -** Provide a default value for SQLITE_TEMP_STORE in case it is not specified -** on the command-line -*/ -#ifndef SQLITE_TEMP_STORE -# define SQLITE_TEMP_STORE 1 -#endif - -/* -** GCC does not define the offsetof() macro so we'll have to do it -** ourselves. -*/ -#ifndef offsetof -#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD)) -#endif - -/* -** Check to see if this machine uses EBCDIC. (Yes, believe it or -** not, there are still machines out there that use EBCDIC.) -*/ -#if 'A' == '\301' -# define SQLITE_EBCDIC 1 -#else -# define SQLITE_ASCII 1 -#endif - -/* -** Integers of known sizes. These typedefs might change for architectures -** where the sizes very. Preprocessor macros are available so that the -** types can be conveniently redefined at compile-type. Like this: -** -** cc '-DUINTPTR_TYPE=long long int' ... -*/ -#ifndef UINT32_TYPE -# ifdef HAVE_UINT32_T -# define UINT32_TYPE uint32_t -# else -# define UINT32_TYPE unsigned int -# endif -#endif -#ifndef UINT16_TYPE -# ifdef HAVE_UINT16_T -# define UINT16_TYPE uint16_t -# else -# define UINT16_TYPE unsigned short int -# endif -#endif -#ifndef INT16_TYPE -# ifdef HAVE_INT16_T -# define INT16_TYPE int16_t -# else -# define INT16_TYPE short int -# endif -#endif -#ifndef UINT8_TYPE -# ifdef HAVE_UINT8_T -# define UINT8_TYPE uint8_t -# else -# define UINT8_TYPE unsigned char -# endif -#endif -#ifndef INT8_TYPE -# ifdef HAVE_INT8_T -# define INT8_TYPE int8_t -# else -# define INT8_TYPE signed char -# endif -#endif -#ifndef LONGDOUBLE_TYPE -# define LONGDOUBLE_TYPE long double -#endif -typedef sqlite_int64 i64; /* 8-byte signed integer */ -typedef sqlite_uint64 u64; /* 8-byte unsigned integer */ -typedef UINT32_TYPE u32; /* 4-byte unsigned integer */ -typedef UINT16_TYPE u16; /* 2-byte unsigned integer */ -typedef INT16_TYPE i16; /* 2-byte signed integer */ -typedef UINT8_TYPE u8; /* 1-byte unsigned integer */ -typedef INT8_TYPE i8; /* 1-byte signed integer */ - -/* -** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value -** that can be stored in a u32 without loss of data. The value -** is 0x00000000ffffffff. But because of quirks of some compilers, we -** have to specify the value in the less intuitive manner shown: -*/ -#define SQLITE_MAX_U32 ((((u64)1)<<32)-1) - -/* -** The datatype used to store estimates of the number of rows in a -** table or index. This is an unsigned integer type. For 99.9% of -** the world, a 32-bit integer is sufficient. But a 64-bit integer -** can be used at compile-time if desired. -*/ -#ifdef SQLITE_64BIT_STATS - typedef u64 tRowcnt; /* 64-bit only if requested at compile-time */ -#else - typedef u32 tRowcnt; /* 32-bit is the default */ -#endif - -/* -** Macros to determine whether the machine is big or little endian, -** evaluated at runtime. -*/ -#ifdef SQLITE_AMALGAMATION -SQLITE_PRIVATE const int sqlite3one = 1; -#else -SQLITE_PRIVATE const int sqlite3one; -#endif -#if defined(i386) || defined(__i386__) || defined(_M_IX86)\ - || defined(__x86_64) || defined(__x86_64__) -# define SQLITE_BIGENDIAN 0 -# define SQLITE_LITTLEENDIAN 1 -# define SQLITE_UTF16NATIVE SQLITE_UTF16LE -#else -# define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0) -# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1) -# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE) -#endif - -/* -** Constants for the largest and smallest possible 64-bit signed integers. -** These macros are designed to work correctly on both 32-bit and 64-bit -** compilers. -*/ -#define LARGEST_INT64 (0xffffffff|(((i64)0x7fffffff)<<32)) -#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64) - -/* -** Round up a number to the next larger multiple of 8. This is used -** to force 8-byte alignment on 64-bit architectures. -*/ -#define ROUND8(x) (((x)+7)&~7) - -/* -** Round down to the nearest multiple of 8 -*/ -#define ROUNDDOWN8(x) ((x)&~7) - -/* -** Assert that the pointer X is aligned to an 8-byte boundary. This -** macro is used only within assert() to verify that the code gets -** all alignment restrictions correct. -** -** Except, if SQLITE_4_BYTE_ALIGNED_MALLOC is defined, then the -** underlying malloc() implemention might return us 4-byte aligned -** pointers. In that case, only verify 4-byte alignment. -*/ -#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC -# define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&3)==0) -#else -# define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&7)==0) -#endif - - -/* -** An instance of the following structure is used to store the busy-handler -** callback for a given sqlite handle. -** -** The sqlite.busyHandler member of the sqlite struct contains the busy -** callback for the database handle. Each pager opened via the sqlite -** handle is passed a pointer to sqlite.busyHandler. The busy-handler -** callback is currently invoked only from within pager.c. -*/ -typedef struct BusyHandler BusyHandler; -struct BusyHandler { - int (*xFunc)(void *,int); /* The busy callback */ - void *pArg; /* First arg to busy callback */ - int nBusy; /* Incremented with each busy call */ -}; - -/* -** Name of the master database table. The master database table -** is a special table that holds the names and attributes of all -** user tables and indices. -*/ -#define MASTER_NAME "sqlite_master" -#define TEMP_MASTER_NAME "sqlite_temp_master" - -/* -** The root-page of the master database table. -*/ -#define MASTER_ROOT 1 - -/* -** The name of the schema table. -*/ -#define SCHEMA_TABLE(x) ((!OMIT_TEMPDB)&&(x==1)?TEMP_MASTER_NAME:MASTER_NAME) - -/* -** A convenience macro that returns the number of elements in -** an array. -*/ -#define ArraySize(X) ((int)(sizeof(X)/sizeof(X[0]))) - -/* -** The following value as a destructor means to use sqlite3DbFree(). -** The sqlite3DbFree() routine requires two parameters instead of the -** one parameter that destructors normally want. So we have to introduce -** this magic value that the code knows to handle differently. Any -** pointer will work here as long as it is distinct from SQLITE_STATIC -** and SQLITE_TRANSIENT. -*/ -#define SQLITE_DYNAMIC ((sqlite3_destructor_type)sqlite3MallocSize) - -/* -** When SQLITE_OMIT_WSD is defined, it means that the target platform does -** not support Writable Static Data (WSD) such as global and static variables. -** All variables must either be on the stack or dynamically allocated from -** the heap. When WSD is unsupported, the variable declarations scattered -** throughout the SQLite code must become constants instead. The SQLITE_WSD -** macro is used for this purpose. And instead of referencing the variable -** directly, we use its constant as a key to lookup the run-time allocated -** buffer that holds real variable. The constant is also the initializer -** for the run-time allocated buffer. -** -** In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL -** macros become no-ops and have zero performance impact. -*/ -#ifdef SQLITE_OMIT_WSD - #define SQLITE_WSD const - #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v))) - #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config) -SQLITE_API int sqlite3_wsd_init(int N, int J); -SQLITE_API void *sqlite3_wsd_find(void *K, int L); -#else - #define SQLITE_WSD - #define GLOBAL(t,v) v - #define sqlite3GlobalConfig sqlite3Config -#endif - -/* -** The following macros are used to suppress compiler warnings and to -** make it clear to human readers when a function parameter is deliberately -** left unused within the body of a function. This usually happens when -** a function is called via a function pointer. For example the -** implementation of an SQL aggregate step callback may not use the -** parameter indicating the number of arguments passed to the aggregate, -** if it knows that this is enforced elsewhere. -** -** When a function parameter is not used at all within the body of a function, -** it is generally named "NotUsed" or "NotUsed2" to make things even clearer. -** However, these macros may also be used to suppress warnings related to -** parameters that may or may not be used depending on compilation options. -** For example those parameters only used in assert() statements. In these -** cases the parameters are named as per the usual conventions. -*/ -#define UNUSED_PARAMETER(x) (void)(x) -#define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y) - -/* -** Forward references to structures -*/ -typedef struct AggInfo AggInfo; -typedef struct AuthContext AuthContext; -typedef struct AutoincInfo AutoincInfo; -typedef struct Bitvec Bitvec; -typedef struct CollSeq CollSeq; -typedef struct Column Column; -typedef struct Db Db; -typedef struct Schema Schema; -typedef struct Expr Expr; -typedef struct ExprList ExprList; -typedef struct ExprSpan ExprSpan; -typedef struct FKey FKey; -typedef struct FuncDestructor FuncDestructor; -typedef struct FuncDef FuncDef; -typedef struct FuncDefHash FuncDefHash; -typedef struct IdList IdList; -typedef struct Index Index; -typedef struct IndexSample IndexSample; -typedef struct KeyClass KeyClass; -typedef struct KeyInfo KeyInfo; -typedef struct Lookaside Lookaside; -typedef struct LookasideSlot LookasideSlot; -typedef struct Module Module; -typedef struct NameContext NameContext; -typedef struct Parse Parse; -typedef struct RowSet RowSet; -typedef struct Savepoint Savepoint; -typedef struct Select Select; -typedef struct SelectDest SelectDest; -typedef struct SrcList SrcList; -typedef struct StrAccum StrAccum; -typedef struct Table Table; -typedef struct TableLock TableLock; -typedef struct Token Token; -typedef struct Trigger Trigger; -typedef struct TriggerPrg TriggerPrg; -typedef struct TriggerStep TriggerStep; -typedef struct UnpackedRecord UnpackedRecord; -typedef struct VTable VTable; -typedef struct VtabCtx VtabCtx; -typedef struct Walker Walker; -typedef struct WherePlan WherePlan; -typedef struct WhereInfo WhereInfo; -typedef struct WhereLevel WhereLevel; - -/* -** Defer sourcing vdbe.h and btree.h until after the "u8" and -** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque -** pointer types (i.e. FuncDef) defined above. -*/ -/************** Include btree.h in the middle of sqliteInt.h *****************/ -/************** Begin file btree.h *******************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the sqlite B-Tree file -** subsystem. See comments in the source code for a detailed description -** of what each interface routine does. -*/ -#ifndef _BTREE_H_ -#define _BTREE_H_ - -/* TODO: This definition is just included so other modules compile. It -** needs to be revisited. -*/ -#define SQLITE_N_BTREE_META 10 - -/* -** If defined as non-zero, auto-vacuum is enabled by default. Otherwise -** it must be turned on for each database using "PRAGMA auto_vacuum = 1". -*/ -#ifndef SQLITE_DEFAULT_AUTOVACUUM - #define SQLITE_DEFAULT_AUTOVACUUM 0 -#endif - -#define BTREE_AUTOVACUUM_NONE 0 /* Do not do auto-vacuum */ -#define BTREE_AUTOVACUUM_FULL 1 /* Do full auto-vacuum */ -#define BTREE_AUTOVACUUM_INCR 2 /* Incremental vacuum */ - -/* -** Forward declarations of structure -*/ -typedef struct Btree Btree; -typedef struct BtCursor BtCursor; -typedef struct BtShared BtShared; - - -SQLITE_PRIVATE int sqlite3BtreeOpen( - sqlite3_vfs *pVfs, /* VFS to use with this b-tree */ - const char *zFilename, /* Name of database file to open */ - sqlite3 *db, /* Associated database connection */ - Btree **ppBtree, /* Return open Btree* here */ - int flags, /* Flags */ - int vfsFlags /* Flags passed through to VFS open */ -); - -/* The flags parameter to sqlite3BtreeOpen can be the bitwise or of the -** following values. -** -** NOTE: These values must match the corresponding PAGER_ values in -** pager.h. -*/ -#define BTREE_OMIT_JOURNAL 1 /* Do not create or use a rollback journal */ -#define BTREE_MEMORY 2 /* This is an in-memory DB */ -#define BTREE_SINGLE 4 /* The file contains at most 1 b-tree */ -#define BTREE_UNORDERED 8 /* Use of a hash implementation is OK */ - -SQLITE_PRIVATE int sqlite3BtreeClose(Btree*); -SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(Btree*,int,int,int); -SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*); -SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix); -SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*); -SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int); -SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree*); -SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree*); -#if defined(SQLITE_HAS_CODEC) || defined(SQLITE_DEBUG) -SQLITE_PRIVATE int sqlite3BtreeGetReserveNoMutex(Btree *p); -#endif -SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int); -SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *); -SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster); -SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*, int); -SQLITE_PRIVATE int sqlite3BtreeCommit(Btree*); -SQLITE_PRIVATE int sqlite3BtreeRollback(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*,int); -SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, int*, int flags); -SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree*); -SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree*); -SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree*); -SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *)); -SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *pBtree); -SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock); -SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *, int, int); - -SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *); -SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *); -SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *, Btree *); - -SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *); - -/* The flags parameter to sqlite3BtreeCreateTable can be the bitwise OR -** of the flags shown below. -** -** Every SQLite table must have either BTREE_INTKEY or BTREE_BLOBKEY set. -** With BTREE_INTKEY, the table key is a 64-bit integer and arbitrary data -** is stored in the leaves. (BTREE_INTKEY is used for SQL tables.) With -** BTREE_BLOBKEY, the key is an arbitrary BLOB and no content is stored -** anywhere - the key is the content. (BTREE_BLOBKEY is used for SQL -** indices.) -*/ -#define BTREE_INTKEY 1 /* Table has only 64-bit signed integer keys */ -#define BTREE_BLOBKEY 2 /* Table has keys only - no data */ - -SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*); -SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int, int*); -SQLITE_PRIVATE void sqlite3BtreeTripAllCursors(Btree*, int); - -SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue); -SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value); - -SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p); - -/* -** The second parameter to sqlite3BtreeGetMeta or sqlite3BtreeUpdateMeta -** should be one of the following values. The integer values are assigned -** to constants so that the offset of the corresponding field in an -** SQLite database header may be found using the following formula: -** -** offset = 36 + (idx * 4) -** -** For example, the free-page-count field is located at byte offset 36 of -** the database file header. The incr-vacuum-flag field is located at -** byte offset 64 (== 36+4*7). -*/ -#define BTREE_FREE_PAGE_COUNT 0 -#define BTREE_SCHEMA_VERSION 1 -#define BTREE_FILE_FORMAT 2 -#define BTREE_DEFAULT_CACHE_SIZE 3 -#define BTREE_LARGEST_ROOT_PAGE 4 -#define BTREE_TEXT_ENCODING 5 -#define BTREE_USER_VERSION 6 -#define BTREE_INCR_VACUUM 7 - -/* -** Values that may be OR'd together to form the second argument of an -** sqlite3BtreeCursorHints() call. -*/ -#define BTREE_BULKLOAD 0x00000001 - -SQLITE_PRIVATE int sqlite3BtreeCursor( - Btree*, /* BTree containing table to open */ - int iTable, /* Index of root page */ - int wrFlag, /* 1 for writing. 0 for read-only */ - struct KeyInfo*, /* First argument to compare function */ - BtCursor *pCursor /* Space to write cursor structure */ -); -SQLITE_PRIVATE int sqlite3BtreeCursorSize(void); -SQLITE_PRIVATE void sqlite3BtreeCursorZero(BtCursor*); - -SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor*); -SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked( - BtCursor*, - UnpackedRecord *pUnKey, - i64 intKey, - int bias, - int *pRes -); -SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor*, int*); -SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*); -SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey, - const void *pData, int nData, - int nZero, int bias, int seekResult); -SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*); -SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int *pRes); -SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor*, i64 *pSize); -SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*); -SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor*, int *pAmt); -SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor*, int *pAmt); -SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor*, u32 *pSize); -SQLITE_PRIVATE int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*); -SQLITE_PRIVATE void sqlite3BtreeSetCachedRowid(BtCursor*, sqlite3_int64); -SQLITE_PRIVATE sqlite3_int64 sqlite3BtreeGetCachedRowid(BtCursor*); - -SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*); -SQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*); - -SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*); -SQLITE_PRIVATE void sqlite3BtreeCacheOverflow(BtCursor *); -SQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *); -SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBt, int iVersion); -SQLITE_PRIVATE void sqlite3BtreeCursorHints(BtCursor *, unsigned int mask); - -#ifndef NDEBUG -SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor*); -#endif - -#ifndef SQLITE_OMIT_BTREECOUNT -SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *, i64 *); -#endif - -#ifdef SQLITE_TEST -SQLITE_PRIVATE int sqlite3BtreeCursorInfo(BtCursor*, int*, int); -SQLITE_PRIVATE void sqlite3BtreeCursorList(Btree*); -#endif - -#ifndef SQLITE_OMIT_WAL -SQLITE_PRIVATE int sqlite3BtreeCheckpoint(Btree*, int, int *, int *); -#endif - -/* -** If we are not using shared cache, then there is no need to -** use mutexes to access the BtShared structures. So make the -** Enter and Leave procedures no-ops. -*/ -#ifndef SQLITE_OMIT_SHARED_CACHE -SQLITE_PRIVATE void sqlite3BtreeEnter(Btree*); -SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3*); -#else -# define sqlite3BtreeEnter(X) -# define sqlite3BtreeEnterAll(X) -#endif - -#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE -SQLITE_PRIVATE int sqlite3BtreeSharable(Btree*); -SQLITE_PRIVATE void sqlite3BtreeLeave(Btree*); -SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor*); -SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor*); -SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3*); -#ifndef NDEBUG - /* These routines are used inside assert() statements only. */ -SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree*); -SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3*); -SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*); -#endif -#else - -# define sqlite3BtreeSharable(X) 0 -# define sqlite3BtreeLeave(X) -# define sqlite3BtreeEnterCursor(X) -# define sqlite3BtreeLeaveCursor(X) -# define sqlite3BtreeLeaveAll(X) - -# define sqlite3BtreeHoldsMutex(X) 1 -# define sqlite3BtreeHoldsAllMutexes(X) 1 -# define sqlite3SchemaMutexHeld(X,Y,Z) 1 -#endif - - -#endif /* _BTREE_H_ */ - -/************** End of btree.h ***********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include vdbe.h in the middle of sqliteInt.h ******************/ -/************** Begin file vdbe.h ********************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** Header file for the Virtual DataBase Engine (VDBE) -** -** This header defines the interface to the virtual database engine -** or VDBE. The VDBE implements an abstract machine that runs a -** simple program to access and modify the underlying database. -*/ -#ifndef _SQLITE_VDBE_H_ -#define _SQLITE_VDBE_H_ -/* #include */ - -/* -** A single VDBE is an opaque structure named "Vdbe". Only routines -** in the source file sqliteVdbe.c are allowed to see the insides -** of this structure. -*/ -typedef struct Vdbe Vdbe; - -/* -** The names of the following types declared in vdbeInt.h are required -** for the VdbeOp definition. -*/ -typedef struct VdbeFunc VdbeFunc; -typedef struct Mem Mem; -typedef struct SubProgram SubProgram; - -/* -** A single instruction of the virtual machine has an opcode -** and as many as three operands. The instruction is recorded -** as an instance of the following structure: -*/ -struct VdbeOp { - u8 opcode; /* What operation to perform */ - signed char p4type; /* One of the P4_xxx constants for p4 */ - u8 opflags; /* Mask of the OPFLG_* flags in opcodes.h */ - u8 p5; /* Fifth parameter is an unsigned character */ - int p1; /* First operand */ - int p2; /* Second parameter (often the jump destination) */ - int p3; /* The third parameter */ - union { /* fourth parameter */ - int i; /* Integer value if p4type==P4_INT32 */ - void *p; /* Generic pointer */ - char *z; /* Pointer to data for string (char array) types */ - i64 *pI64; /* Used when p4type is P4_INT64 */ - double *pReal; /* Used when p4type is P4_REAL */ - FuncDef *pFunc; /* Used when p4type is P4_FUNCDEF */ - VdbeFunc *pVdbeFunc; /* Used when p4type is P4_VDBEFUNC */ - CollSeq *pColl; /* Used when p4type is P4_COLLSEQ */ - Mem *pMem; /* Used when p4type is P4_MEM */ - VTable *pVtab; /* Used when p4type is P4_VTAB */ - KeyInfo *pKeyInfo; /* Used when p4type is P4_KEYINFO */ - int *ai; /* Used when p4type is P4_INTARRAY */ - SubProgram *pProgram; /* Used when p4type is P4_SUBPROGRAM */ - int (*xAdvance)(BtCursor *, int *); - } p4; -#ifdef SQLITE_DEBUG - char *zComment; /* Comment to improve readability */ -#endif -#ifdef VDBE_PROFILE - int cnt; /* Number of times this instruction was executed */ - u64 cycles; /* Total time spent executing this instruction */ -#endif -}; -typedef struct VdbeOp VdbeOp; - - -/* -** A sub-routine used to implement a trigger program. -*/ -struct SubProgram { - VdbeOp *aOp; /* Array of opcodes for sub-program */ - int nOp; /* Elements in aOp[] */ - int nMem; /* Number of memory cells required */ - int nCsr; /* Number of cursors required */ - int nOnce; /* Number of OP_Once instructions */ - void *token; /* id that may be used to recursive triggers */ - SubProgram *pNext; /* Next sub-program already visited */ -}; - -/* -** A smaller version of VdbeOp used for the VdbeAddOpList() function because -** it takes up less space. -*/ -struct VdbeOpList { - u8 opcode; /* What operation to perform */ - signed char p1; /* First operand */ - signed char p2; /* Second parameter (often the jump destination) */ - signed char p3; /* Third parameter */ -}; -typedef struct VdbeOpList VdbeOpList; - -/* -** Allowed values of VdbeOp.p4type -*/ -#define P4_NOTUSED 0 /* The P4 parameter is not used */ -#define P4_DYNAMIC (-1) /* Pointer to a string obtained from sqliteMalloc() */ -#define P4_STATIC (-2) /* Pointer to a static string */ -#define P4_COLLSEQ (-4) /* P4 is a pointer to a CollSeq structure */ -#define P4_FUNCDEF (-5) /* P4 is a pointer to a FuncDef structure */ -#define P4_KEYINFO (-6) /* P4 is a pointer to a KeyInfo structure */ -#define P4_VDBEFUNC (-7) /* P4 is a pointer to a VdbeFunc structure */ -#define P4_MEM (-8) /* P4 is a pointer to a Mem* structure */ -#define P4_TRANSIENT 0 /* P4 is a pointer to a transient string */ -#define P4_VTAB (-10) /* P4 is a pointer to an sqlite3_vtab structure */ -#define P4_MPRINTF (-11) /* P4 is a string obtained from sqlite3_mprintf() */ -#define P4_REAL (-12) /* P4 is a 64-bit floating point value */ -#define P4_INT64 (-13) /* P4 is a 64-bit signed integer */ -#define P4_INT32 (-14) /* P4 is a 32-bit signed integer */ -#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */ -#define P4_SUBPROGRAM (-18) /* P4 is a pointer to a SubProgram structure */ -#define P4_ADVANCE (-19) /* P4 is a pointer to BtreeNext() or BtreePrev() */ - -/* When adding a P4 argument using P4_KEYINFO, a copy of the KeyInfo structure -** is made. That copy is freed when the Vdbe is finalized. But if the -** argument is P4_KEYINFO_HANDOFF, the passed in pointer is used. It still -** gets freed when the Vdbe is finalized so it still should be obtained -** from a single sqliteMalloc(). But no copy is made and the calling -** function should *not* try to free the KeyInfo. -*/ -#define P4_KEYINFO_HANDOFF (-16) -#define P4_KEYINFO_STATIC (-17) - -/* -** The Vdbe.aColName array contains 5n Mem structures, where n is the -** number of columns of data returned by the statement. -*/ -#define COLNAME_NAME 0 -#define COLNAME_DECLTYPE 1 -#define COLNAME_DATABASE 2 -#define COLNAME_TABLE 3 -#define COLNAME_COLUMN 4 -#ifdef SQLITE_ENABLE_COLUMN_METADATA -# define COLNAME_N 5 /* Number of COLNAME_xxx symbols */ -#else -# ifdef SQLITE_OMIT_DECLTYPE -# define COLNAME_N 1 /* Store only the name */ -# else -# define COLNAME_N 2 /* Store the name and decltype */ -# endif -#endif - -/* -** The following macro converts a relative address in the p2 field -** of a VdbeOp structure into a negative number so that -** sqlite3VdbeAddOpList() knows that the address is relative. Calling -** the macro again restores the address. -*/ -#define ADDR(X) (-1-(X)) - -/* -** The makefile scans the vdbe.c source file and creates the "opcodes.h" -** header file that defines a number for each opcode used by the VDBE. -*/ -/************** Include opcodes.h in the middle of vdbe.h ********************/ -/************** Begin file opcodes.h *****************************************/ -/* Automatically generated. Do not edit */ -/* See the mkopcodeh.awk script for details */ -#define OP_Goto 1 -#define OP_Gosub 2 -#define OP_Return 3 -#define OP_Yield 4 -#define OP_HaltIfNull 5 -#define OP_Halt 6 -#define OP_Integer 7 -#define OP_Int64 8 -#define OP_Real 130 /* same as TK_FLOAT */ -#define OP_String8 94 /* same as TK_STRING */ -#define OP_String 9 -#define OP_Null 10 -#define OP_Blob 11 -#define OP_Variable 12 -#define OP_Move 13 -#define OP_Copy 14 -#define OP_SCopy 15 -#define OP_ResultRow 16 -#define OP_Concat 91 /* same as TK_CONCAT */ -#define OP_Add 86 /* same as TK_PLUS */ -#define OP_Subtract 87 /* same as TK_MINUS */ -#define OP_Multiply 88 /* same as TK_STAR */ -#define OP_Divide 89 /* same as TK_SLASH */ -#define OP_Remainder 90 /* same as TK_REM */ -#define OP_CollSeq 17 -#define OP_Function 18 -#define OP_BitAnd 82 /* same as TK_BITAND */ -#define OP_BitOr 83 /* same as TK_BITOR */ -#define OP_ShiftLeft 84 /* same as TK_LSHIFT */ -#define OP_ShiftRight 85 /* same as TK_RSHIFT */ -#define OP_AddImm 20 -#define OP_MustBeInt 21 -#define OP_RealAffinity 22 -#define OP_ToText 141 /* same as TK_TO_TEXT */ -#define OP_ToBlob 142 /* same as TK_TO_BLOB */ -#define OP_ToNumeric 143 /* same as TK_TO_NUMERIC*/ -#define OP_ToInt 144 /* same as TK_TO_INT */ -#define OP_ToReal 145 /* same as TK_TO_REAL */ -#define OP_Eq 76 /* same as TK_EQ */ -#define OP_Ne 75 /* same as TK_NE */ -#define OP_Lt 79 /* same as TK_LT */ -#define OP_Le 78 /* same as TK_LE */ -#define OP_Gt 77 /* same as TK_GT */ -#define OP_Ge 80 /* same as TK_GE */ -#define OP_Permutation 23 -#define OP_Compare 24 -#define OP_Jump 25 -#define OP_And 69 /* same as TK_AND */ -#define OP_Or 68 /* same as TK_OR */ -#define OP_Not 19 /* same as TK_NOT */ -#define OP_BitNot 93 /* same as TK_BITNOT */ -#define OP_Once 26 -#define OP_If 27 -#define OP_IfNot 28 -#define OP_IsNull 73 /* same as TK_ISNULL */ -#define OP_NotNull 74 /* same as TK_NOTNULL */ -#define OP_Column 29 -#define OP_Affinity 30 -#define OP_MakeRecord 31 -#define OP_Count 32 -#define OP_Savepoint 33 -#define OP_AutoCommit 34 -#define OP_Transaction 35 -#define OP_ReadCookie 36 -#define OP_SetCookie 37 -#define OP_VerifyCookie 38 -#define OP_OpenRead 39 -#define OP_OpenWrite 40 -#define OP_OpenAutoindex 41 -#define OP_OpenEphemeral 42 -#define OP_SorterOpen 43 -#define OP_OpenPseudo 44 -#define OP_Close 45 -#define OP_SeekLt 46 -#define OP_SeekLe 47 -#define OP_SeekGe 48 -#define OP_SeekGt 49 -#define OP_Seek 50 -#define OP_NotFound 51 -#define OP_Found 52 -#define OP_IsUnique 53 -#define OP_NotExists 54 -#define OP_Sequence 55 -#define OP_NewRowid 56 -#define OP_Insert 57 -#define OP_InsertInt 58 -#define OP_Delete 59 -#define OP_ResetCount 60 -#define OP_SorterCompare 61 -#define OP_SorterData 62 -#define OP_RowKey 63 -#define OP_RowData 64 -#define OP_Rowid 65 -#define OP_NullRow 66 -#define OP_Last 67 -#define OP_SorterSort 70 -#define OP_Sort 71 -#define OP_Rewind 72 -#define OP_SorterNext 81 -#define OP_Prev 92 -#define OP_Next 95 -#define OP_SorterInsert 96 -#define OP_IdxInsert 97 -#define OP_IdxDelete 98 -#define OP_IdxRowid 99 -#define OP_IdxLT 100 -#define OP_IdxGE 101 -#define OP_Destroy 102 -#define OP_Clear 103 -#define OP_CreateIndex 104 -#define OP_CreateTable 105 -#define OP_ParseSchema 106 -#define OP_LoadAnalysis 107 -#define OP_DropTable 108 -#define OP_DropIndex 109 -#define OP_DropTrigger 110 -#define OP_IntegrityCk 111 -#define OP_RowSetAdd 112 -#define OP_RowSetRead 113 -#define OP_RowSetTest 114 -#define OP_Program 115 -#define OP_Param 116 -#define OP_FkCounter 117 -#define OP_FkIfZero 118 -#define OP_MemMax 119 -#define OP_IfPos 120 -#define OP_IfNeg 121 -#define OP_IfZero 122 -#define OP_AggStep 123 -#define OP_AggFinal 124 -#define OP_Checkpoint 125 -#define OP_JournalMode 126 -#define OP_Vacuum 127 -#define OP_IncrVacuum 128 -#define OP_Expire 129 -#define OP_TableLock 131 -#define OP_VBegin 132 -#define OP_VCreate 133 -#define OP_VDestroy 134 -#define OP_VOpen 135 -#define OP_VFilter 136 -#define OP_VColumn 137 -#define OP_VNext 138 -#define OP_VRename 139 -#define OP_VUpdate 140 -#define OP_Pagecount 146 -#define OP_MaxPgcnt 147 -#define OP_Trace 148 -#define OP_Noop 149 -#define OP_Explain 150 - - -/* Properties such as "out2" or "jump" that are specified in -** comments following the "case" for each opcode in the vdbe.c -** are encoded into bitvectors as follows: -*/ -#define OPFLG_JUMP 0x0001 /* jump: P2 holds jmp target */ -#define OPFLG_OUT2_PRERELEASE 0x0002 /* out2-prerelease: */ -#define OPFLG_IN1 0x0004 /* in1: P1 is an input */ -#define OPFLG_IN2 0x0008 /* in2: P2 is an input */ -#define OPFLG_IN3 0x0010 /* in3: P3 is an input */ -#define OPFLG_OUT2 0x0020 /* out2: P2 is an output */ -#define OPFLG_OUT3 0x0040 /* out3: P3 is an output */ -#define OPFLG_INITIALIZER {\ -/* 0 */ 0x00, 0x01, 0x01, 0x04, 0x04, 0x10, 0x00, 0x02,\ -/* 8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x24,\ -/* 16 */ 0x00, 0x00, 0x00, 0x24, 0x04, 0x05, 0x04, 0x00,\ -/* 24 */ 0x00, 0x01, 0x01, 0x05, 0x05, 0x00, 0x00, 0x00,\ -/* 32 */ 0x02, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00,\ -/* 40 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11,\ -/* 48 */ 0x11, 0x11, 0x08, 0x11, 0x11, 0x11, 0x11, 0x02,\ -/* 56 */ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 64 */ 0x00, 0x02, 0x00, 0x01, 0x4c, 0x4c, 0x01, 0x01,\ -/* 72 */ 0x01, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\ -/* 80 */ 0x15, 0x01, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c,\ -/* 88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x01,\ -/* 96 */ 0x08, 0x08, 0x00, 0x02, 0x01, 0x01, 0x02, 0x00,\ -/* 104 */ 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 112 */ 0x0c, 0x45, 0x15, 0x01, 0x02, 0x00, 0x01, 0x08,\ -/* 120 */ 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00,\ -/* 128 */ 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\ -/* 136 */ 0x01, 0x00, 0x01, 0x00, 0x00, 0x04, 0x04, 0x04,\ -/* 144 */ 0x04, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00,} - -/************** End of opcodes.h *********************************************/ -/************** Continuing where we left off in vdbe.h ***********************/ - -/* -** Prototypes for the VDBE interface. See comments on the implementation -** for a description of what each of these routines does. -*/ -SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3*); -SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe*,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe*,int,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe*,int,int,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int); -SQLITE_PRIVATE int sqlite3VdbeAddOp4Int(Vdbe*,int,int,int,int,int); -SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp); -SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe*,int,char*); -SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, u32 addr, int P1); -SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, u32 addr, int P2); -SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, u32 addr, int P3); -SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5); -SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr); -SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr); -SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N); -SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int); -SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); -SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3*,Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,Parse*); -SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe*, int); -SQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe*); -#ifdef SQLITE_DEBUG -SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *, int); -SQLITE_PRIVATE void sqlite3VdbeTrace(Vdbe*,FILE*); -#endif -SQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeRewind(Vdbe*); -SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe*,int); -SQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*)); -SQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe*); -SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*); -SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int); -SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe*,Vdbe*); -SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe*, int*, int*); -SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetValue(Vdbe*, int, u8); -SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe*, int); -#ifndef SQLITE_OMIT_TRACE -SQLITE_PRIVATE char *sqlite3VdbeExpandSql(Vdbe*, const char*); -#endif - -SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,UnpackedRecord*); -SQLITE_PRIVATE int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*); -SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(KeyInfo *, char *, int, char **); - -#ifndef SQLITE_OMIT_TRIGGER -SQLITE_PRIVATE void sqlite3VdbeLinkSubProgram(Vdbe *, SubProgram *); -#endif - - -#ifndef NDEBUG -SQLITE_PRIVATE void sqlite3VdbeComment(Vdbe*, const char*, ...); -# define VdbeComment(X) sqlite3VdbeComment X -SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe*, const char*, ...); -# define VdbeNoopComment(X) sqlite3VdbeNoopComment X -#else -# define VdbeComment(X) -# define VdbeNoopComment(X) -#endif - -#endif - -/************** End of vdbe.h ************************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include pager.h in the middle of sqliteInt.h *****************/ -/************** Begin file pager.h *******************************************/ -/* -** 2001 September 15 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the sqlite page cache -** subsystem. The page cache subsystem reads and writes a file a page -** at a time and provides a journal for rollback. -*/ - -#ifndef _PAGER_H_ -#define _PAGER_H_ - -/* -** Default maximum size for persistent journal files. A negative -** value means no limit. This value may be overridden using the -** sqlite3PagerJournalSizeLimit() API. See also "PRAGMA journal_size_limit". -*/ -#ifndef SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT - #define SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT -1 -#endif - -/* -** The type used to represent a page number. The first page in a file -** is called page 1. 0 is used to represent "not a page". -*/ -typedef u32 Pgno; - -/* -** Each open file is managed by a separate instance of the "Pager" structure. -*/ -typedef struct Pager Pager; - -/* -** Handle type for pages. -*/ -typedef struct PgHdr DbPage; - -/* -** Page number PAGER_MJ_PGNO is never used in an SQLite database (it is -** reserved for working around a windows/posix incompatibility). It is -** used in the journal to signify that the remainder of the journal file -** is devoted to storing a master journal name - there are no more pages to -** roll back. See comments for function writeMasterJournal() in pager.c -** for details. -*/ -#define PAGER_MJ_PGNO(x) ((Pgno)((PENDING_BYTE/((x)->pageSize))+1)) - -/* -** Allowed values for the flags parameter to sqlite3PagerOpen(). -** -** NOTE: These values must match the corresponding BTREE_ values in btree.h. -*/ -#define PAGER_OMIT_JOURNAL 0x0001 /* Do not use a rollback journal */ -#define PAGER_MEMORY 0x0002 /* In-memory database */ - -/* -** Valid values for the second argument to sqlite3PagerLockingMode(). -*/ -#define PAGER_LOCKINGMODE_QUERY -1 -#define PAGER_LOCKINGMODE_NORMAL 0 -#define PAGER_LOCKINGMODE_EXCLUSIVE 1 - -/* -** Numeric constants that encode the journalmode. -*/ -#define PAGER_JOURNALMODE_QUERY (-1) /* Query the value of journalmode */ -#define PAGER_JOURNALMODE_DELETE 0 /* Commit by deleting journal file */ -#define PAGER_JOURNALMODE_PERSIST 1 /* Commit by zeroing journal header */ -#define PAGER_JOURNALMODE_OFF 2 /* Journal omitted. */ -#define PAGER_JOURNALMODE_TRUNCATE 3 /* Commit by truncating journal */ -#define PAGER_JOURNALMODE_MEMORY 4 /* In-memory journal file */ -#define PAGER_JOURNALMODE_WAL 5 /* Use write-ahead logging */ - -/* -** The remainder of this file contains the declarations of the functions -** that make up the Pager sub-system API. See source code comments for -** a detailed description of each routine. -*/ - -/* Open and close a Pager connection. */ -SQLITE_PRIVATE int sqlite3PagerOpen( - sqlite3_vfs*, - Pager **ppPager, - const char*, - int, - int, - int, - void(*)(DbPage*) -); -SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager); -SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*); - -/* Functions used to configure a Pager object. */ -SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *); -SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int); -SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int); -SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int); -SQLITE_PRIVATE void sqlite3PagerShrink(Pager*); -SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager*,int,int,int); -SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int); -SQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *, int); -SQLITE_PRIVATE int sqlite3PagerGetJournalMode(Pager*); -SQLITE_PRIVATE int sqlite3PagerOkToChangeJournalMode(Pager*); -SQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *, i64); -SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager*); - -/* Functions used to obtain and release page references. */ -SQLITE_PRIVATE int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag); -#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0) -SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno); -SQLITE_PRIVATE void sqlite3PagerRef(DbPage*); -SQLITE_PRIVATE void sqlite3PagerUnref(DbPage*); - -/* Operations on page references. */ -SQLITE_PRIVATE int sqlite3PagerWrite(DbPage*); -SQLITE_PRIVATE void sqlite3PagerDontWrite(DbPage*); -SQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int); -SQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage*); -SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *); -SQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *); - -/* Functions used to manage pager transactions and savepoints. */ -SQLITE_PRIVATE void sqlite3PagerPagecount(Pager*, int*); -SQLITE_PRIVATE int sqlite3PagerBegin(Pager*, int exFlag, int); -SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int); -SQLITE_PRIVATE int sqlite3PagerExclusiveLock(Pager*); -SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager); -SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager*); -SQLITE_PRIVATE int sqlite3PagerRollback(Pager*); -SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int n); -SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint); -SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager); - -#ifndef SQLITE_OMIT_WAL -SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int, int*, int*); -SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager); -SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager); -SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen); -SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager); -#endif - -#ifdef SQLITE_ENABLE_ZIPVFS -SQLITE_PRIVATE int sqlite3PagerWalFramesize(Pager *pPager); -#endif - -/* Functions used to query pager state and configuration. */ -SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager*); -SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*); -SQLITE_PRIVATE int sqlite3PagerMemUsed(Pager*); -SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*, int); -SQLITE_PRIVATE const sqlite3_vfs *sqlite3PagerVfs(Pager*); -SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*); -SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*); -SQLITE_PRIVATE int sqlite3PagerNosync(Pager*); -SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*); -SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*); -SQLITE_PRIVATE void sqlite3PagerCacheStat(Pager *, int, int, int *); -SQLITE_PRIVATE void sqlite3PagerClearCache(Pager *); -SQLITE_PRIVATE int sqlite3SectorSize(sqlite3_file *); - -/* Functions used to truncate the database file. */ -SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno); - -#if defined(SQLITE_HAS_CODEC) && !defined(SQLITE_OMIT_WAL) -SQLITE_PRIVATE void *sqlite3PagerCodec(DbPage *); -#endif - -/* Functions to support testing and debugging. */ -#if !defined(NDEBUG) || defined(SQLITE_TEST) -SQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage*); -SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage*); -#endif -#ifdef SQLITE_TEST -SQLITE_PRIVATE int *sqlite3PagerStats(Pager*); -SQLITE_PRIVATE void sqlite3PagerRefdump(Pager*); - void disable_simulated_io_errors(void); - void enable_simulated_io_errors(void); -#else -# define disable_simulated_io_errors() -# define enable_simulated_io_errors() -#endif - -#endif /* _PAGER_H_ */ - -/************** End of pager.h ***********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include pcache.h in the middle of sqliteInt.h ****************/ -/************** Begin file pcache.h ******************************************/ -/* -** 2008 August 05 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** This header file defines the interface that the sqlite page cache -** subsystem. -*/ - -#ifndef _PCACHE_H_ - -typedef struct PgHdr PgHdr; -typedef struct PCache PCache; - -/* -** Every page in the cache is controlled by an instance of the following -** structure. -*/ -struct PgHdr { - sqlite3_pcache_page *pPage; /* Pcache object page handle */ - void *pData; /* Page data */ - void *pExtra; /* Extra content */ - PgHdr *pDirty; /* Transient list of dirty pages */ - Pager *pPager; /* The pager this page is part of */ - Pgno pgno; /* Page number for this page */ -#ifdef SQLITE_CHECK_PAGES - u32 pageHash; /* Hash of page content */ -#endif - u16 flags; /* PGHDR flags defined below */ - - /********************************************************************** - ** Elements above are public. All that follows is private to pcache.c - ** and should not be accessed by other modules. - */ - i16 nRef; /* Number of users of this page */ - PCache *pCache; /* Cache that owns this page */ - - PgHdr *pDirtyNext; /* Next element in list of dirty pages */ - PgHdr *pDirtyPrev; /* Previous element in list of dirty pages */ -}; - -/* Bit values for PgHdr.flags */ -#define PGHDR_DIRTY 0x002 /* Page has changed */ -#define PGHDR_NEED_SYNC 0x004 /* Fsync the rollback journal before - ** writing this page to the database */ -#define PGHDR_NEED_READ 0x008 /* Content is unread */ -#define PGHDR_REUSE_UNLIKELY 0x010 /* A hint that reuse is unlikely */ -#define PGHDR_DONT_WRITE 0x020 /* Do not write content to disk */ - -/* Initialize and shutdown the page cache subsystem */ -SQLITE_PRIVATE int sqlite3PcacheInitialize(void); -SQLITE_PRIVATE void sqlite3PcacheShutdown(void); - -/* Page cache buffer management: -** These routines implement SQLITE_CONFIG_PAGECACHE. -*/ -SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *, int sz, int n); - -/* Create a new pager cache. -** Under memory stress, invoke xStress to try to make pages clean. -** Only clean and unpinned pages can be reclaimed. -*/ -SQLITE_PRIVATE void sqlite3PcacheOpen( - int szPage, /* Size of every page */ - int szExtra, /* Extra space associated with each page */ - int bPurgeable, /* True if pages are on backing store */ - int (*xStress)(void*, PgHdr*), /* Call to try to make pages clean */ - void *pStress, /* Argument to xStress */ - PCache *pToInit /* Preallocated space for the PCache */ -); - -/* Modify the page-size after the cache has been created. */ -SQLITE_PRIVATE void sqlite3PcacheSetPageSize(PCache *, int); - -/* Return the size in bytes of a PCache object. Used to preallocate -** storage space. -*/ -SQLITE_PRIVATE int sqlite3PcacheSize(void); - -/* One release per successful fetch. Page is pinned until released. -** Reference counted. -*/ -SQLITE_PRIVATE int sqlite3PcacheFetch(PCache*, Pgno, int createFlag, PgHdr**); -SQLITE_PRIVATE void sqlite3PcacheRelease(PgHdr*); - -SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr*); /* Remove page from cache */ -SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr*); /* Make sure page is marked dirty */ -SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr*); /* Mark a single page as clean */ -SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache*); /* Mark all dirty list pages as clean */ - -/* Change a page number. Used by incr-vacuum. */ -SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr*, Pgno); - -/* Remove all pages with pgno>x. Reset the cache if x==0 */ -SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache*, Pgno x); - -/* Get a list of all dirty pages in the cache, sorted by page number */ -SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache*); - -/* Reset and close the cache object */ -SQLITE_PRIVATE void sqlite3PcacheClose(PCache*); - -/* Clear flags from pages of the page cache */ -SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *); - -/* Discard the contents of the cache */ -SQLITE_PRIVATE void sqlite3PcacheClear(PCache*); - -/* Return the total number of outstanding page references */ -SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache*); - -/* Increment the reference count of an existing page */ -SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr*); - -SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr*); - -/* Return the total number of pages stored in the cache */ -SQLITE_PRIVATE int sqlite3PcachePagecount(PCache*); - -#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG) -/* Iterate through all dirty pages currently stored in the cache. This -** interface is only available if SQLITE_CHECK_PAGES is defined when the -** library is built. -*/ -SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *)); -#endif - -/* Set and get the suggested cache-size for the specified pager-cache. -** -** If no global maximum is configured, then the system attempts to limit -** the total number of pages cached by purgeable pager-caches to the sum -** of the suggested cache-sizes. -*/ -SQLITE_PRIVATE void sqlite3PcacheSetCachesize(PCache *, int); -#ifdef SQLITE_TEST -SQLITE_PRIVATE int sqlite3PcacheGetCachesize(PCache *); -#endif - -/* Free up as much memory as possible from the page cache */ -SQLITE_PRIVATE void sqlite3PcacheShrink(PCache*); - -#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT -/* Try to return memory used by the pcache module to the main memory heap */ -SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int); -#endif - -#ifdef SQLITE_TEST -SQLITE_PRIVATE void sqlite3PcacheStats(int*,int*,int*,int*); -#endif - -SQLITE_PRIVATE void sqlite3PCacheSetDefault(void); - -#endif /* _PCACHE_H_ */ - -/************** End of pcache.h **********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ - -/************** Include os.h in the middle of sqliteInt.h ********************/ -/************** Begin file os.h **********************************************/ -/* -** 2001 September 16 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -****************************************************************************** -** -** This header file (together with is companion C source-code file -** "os.c") attempt to abstract the underlying operating system so that -** the SQLite library will work on both POSIX and windows systems. -** -** This header file is #include-ed by sqliteInt.h and thus ends up -** being included by every source file. -*/ -#ifndef _SQLITE_OS_H_ -#define _SQLITE_OS_H_ - -/* -** Figure out if we are dealing with Unix, Windows, or some other -** operating system. After the following block of preprocess macros, -** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, and SQLITE_OS_OTHER -** will defined to either 1 or 0. One of the four will be 1. The other -** three will be 0. -*/ -#if defined(SQLITE_OS_OTHER) -# if SQLITE_OS_OTHER==1 -# undef SQLITE_OS_UNIX -# define SQLITE_OS_UNIX 0 -# undef SQLITE_OS_WIN -# define SQLITE_OS_WIN 0 -# else -# undef SQLITE_OS_OTHER -# endif -#endif -#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER) -# define SQLITE_OS_OTHER 0 -# ifndef SQLITE_OS_WIN -# if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__) -# define SQLITE_OS_WIN 1 -# define SQLITE_OS_UNIX 0 -# else -# define SQLITE_OS_WIN 0 -# define SQLITE_OS_UNIX 1 -# endif -# else -# define SQLITE_OS_UNIX 0 -# endif -#else -# ifndef SQLITE_OS_WIN -# define SQLITE_OS_WIN 0 -# endif -#endif - -#if SQLITE_OS_WIN -# include -#endif - -/* -** Determine if we are dealing with Windows NT. -** -** We ought to be able to determine if we are compiling for win98 or winNT -** using the _WIN32_WINNT macro as follows: -** -** #if defined(_WIN32_WINNT) -** # define SQLITE_OS_WINNT 1 -** #else -** # define SQLITE_OS_WINNT 0 -** #endif -** -** However, vs2005 does not set _WIN32_WINNT by default, as it ought to, -** so the above test does not work. We'll just assume that everything is -** winNT unless the programmer explicitly says otherwise by setting -** SQLITE_OS_WINNT to 0. -*/ -#if SQLITE_OS_WIN && !defined(SQLITE_OS_WINNT) -# define SQLITE_OS_WINNT 1 -#endif - -/* -** Determine if we are dealing with WindowsCE - which has a much -** reduced API. -*/ -#if defined(_WIN32_WCE) -# define SQLITE_OS_WINCE 1 -#else -# define SQLITE_OS_WINCE 0 -#endif - -/* -** Determine if we are dealing with WinRT, which provides only a subset of -** the full Win32 API. -*/ -#if !defined(SQLITE_OS_WINRT) -# define SQLITE_OS_WINRT 0 -#endif - -/* -** When compiled for WinCE or WinRT, there is no concept of the current -** directory. - */ -#if !SQLITE_OS_WINCE && !SQLITE_OS_WINRT -# define SQLITE_CURDIR 1 -#endif - -/* If the SET_FULLSYNC macro is not defined above, then make it -** a no-op -*/ -#ifndef SET_FULLSYNC -# define SET_FULLSYNC(x,y) -#endif - -/* -** The default size of a disk sector -*/ -#ifndef SQLITE_DEFAULT_SECTOR_SIZE -# define SQLITE_DEFAULT_SECTOR_SIZE 4096 -#endif - -/* -** Temporary files are named starting with this prefix followed by 16 random -** alphanumeric characters, and no file extension. They are stored in the -** OS's standard temporary file directory, and are deleted prior to exit. -** If sqlite is being embedded in another program, you may wish to change the -** prefix to reflect your program's name, so that if your program exits -** prematurely, old temporary files can be easily identified. This can be done -** using -DSQLITE_TEMP_FILE_PREFIX=myprefix_ on the compiler command line. -** -** 2006-10-31: The default prefix used to be "sqlite_". But then -** Mcafee started using SQLite in their anti-virus product and it -** started putting files with the "sqlite" name in the c:/temp folder. -** This annoyed many windows users. Those users would then do a -** Google search for "sqlite", find the telephone numbers of the -** developers and call to wake them up at night and complain. -** For this reason, the default name prefix is changed to be "sqlite" -** spelled backwards. So the temp files are still identified, but -** anybody smart enough to figure out the code is also likely smart -** enough to know that calling the developer will not help get rid -** of the file. -*/ -#ifndef SQLITE_TEMP_FILE_PREFIX -# define SQLITE_TEMP_FILE_PREFIX "etilqs_" -#endif - -/* -** The following values may be passed as the second argument to -** sqlite3OsLock(). The various locks exhibit the following semantics: -** -** SHARED: Any number of processes may hold a SHARED lock simultaneously. -** RESERVED: A single process may hold a RESERVED lock on a file at -** any time. Other processes may hold and obtain new SHARED locks. -** PENDING: A single process may hold a PENDING lock on a file at -** any one time. Existing SHARED locks may persist, but no new -** SHARED locks may be obtained by other processes. -** EXCLUSIVE: An EXCLUSIVE lock precludes all other locks. -** -** PENDING_LOCK may not be passed directly to sqlite3OsLock(). Instead, a -** process that requests an EXCLUSIVE lock may actually obtain a PENDING -** lock. This can be upgraded to an EXCLUSIVE lock by a subsequent call to -** sqlite3OsLock(). -*/ -#define NO_LOCK 0 -#define SHARED_LOCK 1 -#define RESERVED_LOCK 2 -#define PENDING_LOCK 3 -#define EXCLUSIVE_LOCK 4 - -/* -** File Locking Notes: (Mostly about windows but also some info for Unix) -** -** We cannot use LockFileEx() or UnlockFileEx() on Win95/98/ME because -** those functions are not available. So we use only LockFile() and -** UnlockFile(). -** -** LockFile() prevents not just writing but also reading by other processes. -** A SHARED_LOCK is obtained by locking a single randomly-chosen -** byte out of a specific range of bytes. The lock byte is obtained at -** random so two separate readers can probably access the file at the -** same time, unless they are unlucky and choose the same lock byte. -** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range. -** There can only be one writer. A RESERVED_LOCK is obtained by locking -** a single byte of the file that is designated as the reserved lock byte. -** A PENDING_LOCK is obtained by locking a designated byte different from -** the RESERVED_LOCK byte. -** -** On WinNT/2K/XP systems, LockFileEx() and UnlockFileEx() are available, -** which means we can use reader/writer locks. When reader/writer locks -** are used, the lock is placed on the same range of bytes that is used -** for probabilistic locking in Win95/98/ME. Hence, the locking scheme -** will support two or more Win95 readers or two or more WinNT readers. -** But a single Win95 reader will lock out all WinNT readers and a single -** WinNT reader will lock out all other Win95 readers. -** -** The following #defines specify the range of bytes used for locking. -** SHARED_SIZE is the number of bytes available in the pool from which -** a random byte is selected for a shared lock. The pool of bytes for -** shared locks begins at SHARED_FIRST. -** -** The same locking strategy and -** byte ranges are used for Unix. This leaves open the possiblity of having -** clients on win95, winNT, and unix all talking to the same shared file -** and all locking correctly. To do so would require that samba (or whatever -** tool is being used for file sharing) implements locks correctly between -** windows and unix. I'm guessing that isn't likely to happen, but by -** using the same locking range we are at least open to the possibility. -** -** Locking in windows is manditory. For this reason, we cannot store -** actual data in the bytes used for locking. The pager never allocates -** the pages involved in locking therefore. SHARED_SIZE is selected so -** that all locks will fit on a single page even at the minimum page size. -** PENDING_BYTE defines the beginning of the locks. By default PENDING_BYTE -** is set high so that we don't have to allocate an unused page except -** for very large databases. But one should test the page skipping logic -** by setting PENDING_BYTE low and running the entire regression suite. -** -** Changing the value of PENDING_BYTE results in a subtly incompatible -** file format. Depending on how it is changed, you might not notice -** the incompatibility right away, even running a full regression test. -** The default location of PENDING_BYTE is the first byte past the -** 1GB boundary. -** -*/ -#ifdef SQLITE_OMIT_WSD -# define PENDING_BYTE (0x40000000) -#else -# define PENDING_BYTE sqlite3PendingByte -#endif -#define RESERVED_BYTE (PENDING_BYTE+1) -#define SHARED_FIRST (PENDING_BYTE+2) -#define SHARED_SIZE 510 - -/* -** Wrapper around OS specific sqlite3_os_init() function. -*/ -SQLITE_PRIVATE int sqlite3OsInit(void); - -/* -** Functions for accessing sqlite3_file methods -*/ -SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file*); -SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset); -SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset); -SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size); -SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file*, int); -SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file*, i64 *pSize); -SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file*, int); -SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file*, int); -SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut); -SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file*,int,void*); -SQLITE_PRIVATE void sqlite3OsFileControlHint(sqlite3_file*,int,void*); -#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0 -SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id); -SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id); -SQLITE_PRIVATE int sqlite3OsShmMap(sqlite3_file *,int,int,int,void volatile **); -SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int, int, int); -SQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id); -SQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int); - - -/* -** Functions for accessing sqlite3_vfs methods -*/ -SQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *); -SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *, const char *, int); -SQLITE_PRIVATE int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int *pResOut); -SQLITE_PRIVATE int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *); -#ifndef SQLITE_OMIT_LOAD_EXTENSION -SQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *, const char *); -SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *, int, char *); -SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *))(void); -SQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *, void *); -#endif /* SQLITE_OMIT_LOAD_EXTENSION */ -SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *, int, char *); -SQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *, int); -SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *, sqlite3_int64*); - -/* -** Convenience functions for opening and closing files using -** sqlite3_malloc() to obtain space for the file-handle structure. -*/ -SQLITE_PRIVATE int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*); -SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *); - -#endif /* _SQLITE_OS_H_ */ - -/************** End of os.h **************************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ -/************** Include mutex.h in the middle of sqliteInt.h *****************/ -/************** Begin file mutex.h *******************************************/ -/* -** 2007 August 28 -** -** The author disclaims copyright to this source code. In place of -** a legal notice, here is a blessing: -** -** May you do good and not evil. -** May you find forgiveness for yourself and forgive others. -** May you share freely, never taking more than you give. -** -************************************************************************* -** -** This file contains the common header for all mutex implementations. -** The sqliteInt.h header #includes this file so that it is available -** to all source files. We break it out in an effort to keep the code -** better organized. -** -** NOTE: source files should *not* #include this header file directly. -** Source files should #include the sqliteInt.h file and let that file -** include this one indirectly. -*/ - - -/* -** Figure out what version of the code to use. The choices are -** -** SQLITE_MUTEX_OMIT No mutex logic. Not even stubs. The -** mutexes implemention cannot be overridden -** at start-time. -** -** SQLITE_MUTEX_NOOP For single-threaded applications. No -** mutual exclusion is provided. But this -** implementation can be overridden at -** start-time. -** -** SQLITE_MUTEX_PTHREADS For multi-threaded applications on Unix. -** -** SQLITE_MUTEX_W32 For multi-threaded applications on Win32. -*/ -#if !SQLITE_THREADSAFE -# define SQLITE_MUTEX_OMIT -#endif -#if SQLITE_THREADSAFE && !defined(SQLITE_MUTEX_NOOP) -# if SQLITE_OS_UNIX -# define SQLITE_MUTEX_PTHREADS -# elif SQLITE_OS_WIN -# define SQLITE_MUTEX_W32 -# else -# define SQLITE_MUTEX_NOOP -# endif -#endif - -#ifdef SQLITE_MUTEX_OMIT -/* -** If this is a no-op implementation, implement everything as macros. -*/ -#define sqlite3_mutex_alloc(X) ((sqlite3_mutex*)8) -#define sqlite3_mutex_free(X) -#define sqlite3_mutex_enter(X) -#define sqlite3_mutex_try(X) SQLITE_OK -#define sqlite3_mutex_leave(X) -#define sqlite3_mutex_held(X) ((void)(X),1) -#define sqlite3_mutex_notheld(X) ((void)(X),1) -#define sqlite3MutexAlloc(X) ((sqlite3_mutex*)8) -#define sqlite3MutexInit() SQLITE_OK -#define sqlite3MutexEnd() -#define MUTEX_LOGIC(X) -#else -#define MUTEX_LOGIC(X) X -#endif /* defined(SQLITE_MUTEX_OMIT) */ - -/************** End of mutex.h ***********************************************/ -/************** Continuing where we left off in sqliteInt.h ******************/ - - -/* -** Each database file to be accessed by the system is an instance -** of the following structure. There are normally two of these structures -** in the sqlite.aDb[] array. aDb[0] is the main database file and -** aDb[1] is the database file used to hold temporary tables. Additional -** databases may be attached. -*/ -struct Db { - char *zName; /* Name of this database */ - Btree *pBt; /* The B*Tree structure for this database file */ - u8 inTrans; /* 0: not writable. 1: Transaction. 2: Checkpoint */ - u8 safety_level; /* How aggressive at syncing data to disk */ - Schema *pSchema; /* Pointer to database schema (possibly shared) */ -}; - -/* -** An instance of the following structure stores a database schema. -** -** Most Schema objects are associated with a Btree. The exception is -** the Schema for the TEMP databaes (sqlite3.aDb[1]) which is free-standing. -** In shared cache mode, a single Schema object can be shared by multiple -** Btrees that refer to the same underlying BtShared object. -** -** Schema objects are automatically deallocated when the last Btree that -** references them is destroyed. The TEMP Schema is manually freed by -** sqlite3_close(). -* -** A thread must be holding a mutex on the corresponding Btree in order -** to access Schema content. This implies that the thread must also be -** holding a mutex on the sqlite3 connection pointer that owns the Btree. -** For a TEMP Schema, only the connection mutex is required. -*/ -struct Schema { - int schema_cookie; /* Database schema version number for this file */ - int iGeneration; /* Generation counter. Incremented with each change */ - Hash tblHash; /* All tables indexed by name */ - Hash idxHash; /* All (named) indices indexed by name */ - Hash trigHash; /* All triggers indexed by name */ - Hash fkeyHash; /* All foreign keys by referenced table name */ - Table *pSeqTab; /* The sqlite_sequence table used by AUTOINCREMENT */ - u8 file_format; /* Schema format version for this file */ - u8 enc; /* Text encoding used by this database */ - u16 flags; /* Flags associated with this schema */ - int cache_size; /* Number of pages to use in the cache */ -}; - -/* -** These macros can be used to test, set, or clear bits in the -** Db.pSchema->flags field. -*/ -#define DbHasProperty(D,I,P) (((D)->aDb[I].pSchema->flags&(P))==(P)) -#define DbHasAnyProperty(D,I,P) (((D)->aDb[I].pSchema->flags&(P))!=0) -#define DbSetProperty(D,I,P) (D)->aDb[I].pSchema->flags|=(P) -#define DbClearProperty(D,I,P) (D)->aDb[I].pSchema->flags&=~(P) - -/* -** Allowed values for the DB.pSchema->flags field. -** -** The DB_SchemaLoaded flag is set after the database schema has been -** read into internal hash tables. -** -** DB_UnresetViews means that one or more views have column names that -** have been filled out. If the schema changes, these column names might -** changes and so the view will need to be reset. -*/ -#define DB_SchemaLoaded 0x0001 /* The schema has been loaded */ -#define DB_UnresetViews 0x0002 /* Some views have defined column names */ -#define DB_Empty 0x0004 /* The file is empty (length 0 bytes) */ - -/* -** The number of different kinds of things that can be limited -** using the sqlite3_limit() interface. -*/ -#define SQLITE_N_LIMIT (SQLITE_LIMIT_TRIGGER_DEPTH+1) - -/* -** Lookaside malloc is a set of fixed-size buffers that can be used -** to satisfy small transient memory allocation requests for objects -** associated with a particular database connection. The use of -** lookaside malloc provides a significant performance enhancement -** (approx 10%) by avoiding numerous malloc/free requests while parsing -** SQL statements. -** -** The Lookaside structure holds configuration information about the -** lookaside malloc subsystem. Each available memory allocation in -** the lookaside subsystem is stored on a linked list of LookasideSlot -** objects. -** -** Lookaside allocations are only allowed for objects that are associated -** with a particular database connection. Hence, schema information cannot -** be stored in lookaside because in shared cache mode the schema information -** is shared by multiple database connections. Therefore, while parsing -** schema information, the Lookaside.bEnabled flag is cleared so that -** lookaside allocations are not used to construct the schema objects. -*/ -struct Lookaside { - u16 sz; /* Size of each buffer in bytes */ - u8 bEnabled; /* False to disable new lookaside allocations */ - u8 bMalloced; /* True if pStart obtained from sqlite3_malloc() */ - int nOut; /* Number of buffers currently checked out */ - int mxOut; /* Highwater mark for nOut */ - int anStat[3]; /* 0: hits. 1: size misses. 2: full misses */ - LookasideSlot *pFree; /* List of available buffers */ - void *pStart; /* First byte of available memory space */ - void *pEnd; /* First byte past end of available space */ -}; -struct LookasideSlot { - LookasideSlot *pNext; /* Next buffer in the list of free buffers */ -}; - -/* -** A hash table for function definitions. -** -** Hash each FuncDef structure into one of the FuncDefHash.a[] slots. -** Collisions are on the FuncDef.pHash chain. -*/ -struct FuncDefHash { - FuncDef *a[23]; /* Hash table for functions */ -}; - -/* -** Each database connection is an instance of the following structure. -*/ -struct sqlite3 { - sqlite3_vfs *pVfs; /* OS Interface */ - struct Vdbe *pVdbe; /* List of active virtual machines */ - CollSeq *pDfltColl; /* The default collating sequence (BINARY) */ - sqlite3_mutex *mutex; /* Connection mutex */ - Db *aDb; /* All backends */ - int nDb; /* Number of backends currently in use */ - int flags; /* Miscellaneous flags. See below */ - i64 lastRowid; /* ROWID of most recent insert (see above) */ - unsigned int openFlags; /* Flags passed to sqlite3_vfs.xOpen() */ - int errCode; /* Most recent error code (SQLITE_*) */ - int errMask; /* & result codes with this before returning */ - u16 dbOptFlags; /* Flags to enable/disable optimizations */ - u8 autoCommit; /* The auto-commit flag. */ - u8 temp_store; /* 1: file 2: memory 0: default */ - u8 mallocFailed; /* True if we have seen a malloc failure */ - u8 dfltLockMode; /* Default locking-mode for attached dbs */ - signed char nextAutovac; /* Autovac setting after VACUUM if >=0 */ - u8 suppressErr; /* Do not issue error messages if true */ - u8 vtabOnConflict; /* Value to return for s3_vtab_on_conflict() */ - u8 isTransactionSavepoint; /* True if the outermost savepoint is a TS */ - int nextPagesize; /* Pagesize after VACUUM if >0 */ - u32 magic; /* Magic number for detect library misuse */ - int nChange; /* Value returned by sqlite3_changes() */ - int nTotalChange; /* Value returned by sqlite3_total_changes() */ - int aLimit[SQLITE_N_LIMIT]; /* Limits */ - struct sqlite3InitInfo { /* Information used during initialization */ - int newTnum; /* Rootpage of table being initialized */ - u8 iDb; /* Which db file is being initialized */ - u8 busy; /* TRUE if currently initializing */ - u8 orphanTrigger; /* Last statement is orphaned TEMP trigger */ - } init; - int activeVdbeCnt; /* Number of VDBEs currently executing */ - int writeVdbeCnt; /* Number of active VDBEs that are writing */ - int vdbeExecCnt; /* Number of nested calls to VdbeExec() */ - int nExtension; /* Number of loaded extensions */ - void **aExtension; /* Array of shared library handles */ - void (*xTrace)(void*,const char*); /* Trace function */ - void *pTraceArg; /* Argument to the trace function */ - void (*xProfile)(void*,const char*,u64); /* Profiling function */ - void *pProfileArg; /* Argument to profile function */ - void *pCommitArg; /* Argument to xCommitCallback() */ - int (*xCommitCallback)(void*); /* Invoked at every commit. */ - void *pRollbackArg; /* Argument to xRollbackCallback() */ - void (*xRollbackCallback)(void*); /* Invoked at every commit. */ - void *pUpdateArg; - void (*xUpdateCallback)(void*,int, const char*,const char*,sqlite_int64); -#ifndef SQLITE_OMIT_WAL - int (*xWalCallback)(void *, sqlite3 *, const char *, int); - void *pWalArg; -#endif - void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*); - void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*); - void *pCollNeededArg; - sqlite3_value *pErr; /* Most recent error message */ - char *zErrMsg; /* Most recent error message (UTF-8 encoded) */ - char *zErrMsg16; /* Most recent error message (UTF-16 encoded) */ - union { - volatile int isInterrupted; /* True if sqlite3_interrupt has been called */ - double notUsed1; /* Spacer */ - } u1; - Lookaside lookaside; /* Lookaside malloc configuration */ -#ifndef SQLITE_OMIT_AUTHORIZATION - int (*xAuth)(void*,int,const char*,const char*,const char*,const char*); - /* Access authorization function */ - void *pAuthArg; /* 1st argument to the access auth function */ -#endif -#ifndef SQLITE_OMIT_PROGRESS_CALLBACK - int (*xProgress)(void *); /* The progress callback */ - void *pProgressArg; /* Argument to the progress callback */ - int nProgressOps; /* Number of opcodes for progress callback */ -#endif -#ifndef SQLITE_OMIT_VIRTUALTABLE - int nVTrans; /* Allocated size of aVTrans */ - Hash aModule; /* populated by sqlite3_create_module() */ - VtabCtx *pVtabCtx; /* Context for active vtab connect/create */ - VTable **aVTrans; /* Virtual tables with open transactions */ - VTable *pDisconnect; /* Disconnect these in next sqlite3_prepare() */ -#endif - FuncDefHash aFunc; /* Hash table of connection functions */ - Hash aCollSeq; /* All collating sequences */ - BusyHandler busyHandler; /* Busy callback */ - Db aDbStatic[2]; /* Static space for the 2 default backends */ - Savepoint *pSavepoint; /* List of active savepoints */ - int busyTimeout; /* Busy handler timeout, in msec */ - int nSavepoint; /* Number of non-transaction savepoints */ - int nStatement; /* Number of nested statement-transactions */ - i64 nDeferredCons; /* Net deferred constraints this transaction. */ - int *pnBytesFreed; /* If not NULL, increment this in DbFree() */ - -#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY - /* The following variables are all protected by the STATIC_MASTER - ** mutex, not by sqlite3.mutex. They are used by code in notify.c. - ** - ** When X.pUnlockConnection==Y, that means that X is waiting for Y to - ** unlock so that it can proceed. - ** - ** When X.pBlockingConnection==Y, that means that something that X tried - ** tried to do recently failed with an SQLITE_LOCKED error due to locks - ** held by Y. - */ - sqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */ - sqlite3 *pUnlockConnection; /* Connection to watch for unlock */ - void *pUnlockArg; /* Argument to xUnlockNotify */ - void (*xUnlockNotify)(void **, int); /* Unlock notify callback */ - sqlite3 *pNextBlocked; /* Next in list of all blocked connections */ -#endif -}; - -/* -** A macro to discover the encoding of a database. -*/ -#define ENC(db) ((db)->aDb[0].pSchema->enc) - -/* -** Possible values for the sqlite3.flags. -*/ -#define SQLITE_VdbeTrace 0x00000001 /* True to trace VDBE execution */ -#define SQLITE_InternChanges 0x00000002 /* Uncommitted Hash table changes */ -#define SQLITE_FullColNames 0x00000004 /* Show full column names on SELECT */ -#define SQLITE_ShortColNames 0x00000008 /* Show short columns names */ -#define SQLITE_CountRows 0x00000010 /* Count rows changed by INSERT, */ - /* DELETE, or UPDATE and return */ - /* the count using a callback. */ -#define SQLITE_NullCallback 0x00000020 /* Invoke the callback once if the */ - /* result set is empty */ -#define SQLITE_SqlTrace 0x00000040 /* Debug print SQL as it executes */ -#define SQLITE_VdbeListing 0x00000080 /* Debug listings of VDBE programs */ -#define SQLITE_WriteSchema 0x00000100 /* OK to update SQLITE_MASTER */ - /* 0x00000200 Unused */ -#define SQLITE_IgnoreChecks 0x00000400 /* Do not enforce check constraints */ -#define SQLITE_ReadUncommitted 0x0000800 /* For shared-cache mode */ -#define SQLITE_LegacyFileFmt 0x00001000 /* Create new databases in format 1 */ -#define SQLITE_FullFSync 0x00002000 /* Use full fsync on the backend */ -#define SQLITE_CkptFullFSync 0x00004000 /* Use full fsync for checkpoint */ -#define SQLITE_RecoveryMode 0x00008000 /* Ignore schema errors */ -#define SQLITE_ReverseOrder 0x00010000 /* Reverse unordered SELECTs */ -#define SQLITE_RecTriggers 0x00020000 /* Enable recursive triggers */ -#define SQLITE_ForeignKeys 0x00040000 /* Enforce foreign key constraints */ -#define SQLITE_AutoIndex 0x00080000 /* Enable automatic indexes */ -#define SQLITE_PreferBuiltin 0x00100000 /* Preference to built-in funcs */ -#define SQLITE_LoadExtension 0x00200000 /* Enable load_extension */ -#define SQLITE_EnableTrigger 0x00400000 /* True to enable triggers */ - -/* -** Bits of the sqlite3.dbOptFlags field that are used by the -** sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS,...) interface to -** selectively disable various optimizations. -*/ -#define SQLITE_QueryFlattener 0x0001 /* Query flattening */ -#define SQLITE_ColumnCache 0x0002 /* Column cache */ -#define SQLITE_GroupByOrder 0x0004 /* GROUPBY cover of ORDERBY */ -#define SQLITE_FactorOutConst 0x0008 /* Constant factoring */ -#define SQLITE_IdxRealAsInt 0x0010 /* Store REAL as INT in indices */ -#define SQLITE_DistinctOpt 0x0020 /* DISTINCT using indexes */ -#define SQLITE_CoverIdxScan 0x0040 /* Covering index scans */ -#define SQLITE_OrderByIdxJoin 0x0080 /* ORDER BY of joins via index */ -#define SQLITE_SubqCoroutine 0x0100 /* Evaluate subqueries as coroutines */ -#define SQLITE_AllOpts 0xffff /* All optimizations */ - -/* -** Macros for testing whether or not optimizations are enabled or disabled. -*/ -#ifndef SQLITE_OMIT_BUILTIN_TEST -#define OptimizationDisabled(db, mask) (((db)->dbOptFlags&(mask))!=0) -#define OptimizationEnabled(db, mask) (((db)->dbOptFlags&(mask))==0) -#else -#define OptimizationDisabled(db, mask) 0 -#define OptimizationEnabled(db, mask) 1 -#endif - -/* -** Possible values for the sqlite.magic field. -** The numbers are obtained at random and have no special meaning, other -** than being distinct from one another. -*/ -#define SQLITE_MAGIC_OPEN 0xa029a697 /* Database is open */ -#define SQLITE_MAGIC_CLOSED 0x9f3c2d33 /* Database is closed */ -#define SQLITE_MAGIC_SICK 0x4b771290 /* Error and awaiting close */ -#define SQLITE_MAGIC_BUSY 0xf03b7906 /* Database currently in use */ -#define SQLITE_MAGIC_ERROR 0xb5357930 /* An SQLITE_MISUSE error occurred */ -#define SQLITE_MAGIC_ZOMBIE 0x64cffc7f /* Close with last statement close */ - -/* -** Each SQL function is defined by an instance of the following -** structure. A pointer to this structure is stored in the sqlite.aFunc -** hash table. When multiple functions have the same name, the hash table -** points to a linked list of these structures. -*/ -struct FuncDef { - i16 nArg; /* Number of arguments. -1 means unlimited */ - u8 iPrefEnc; /* Preferred text encoding (SQLITE_UTF8, 16LE, 16BE) */ - u8 flags; /* Some combination of SQLITE_FUNC_* */ - void *pUserData; /* User data parameter */ - FuncDef *pNext; /* Next function with same name */ - void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */ - void (*xStep)(sqlite3_context*,int,sqlite3_value**); /* Aggregate step */ - void (*xFinalize)(sqlite3_context*); /* Aggregate finalizer */ - char *zName; /* SQL name of the function. */ - FuncDef *pHash; /* Next with a different name but the same hash */ - FuncDestructor *pDestructor; /* Reference counted destructor function */ -}; - -/* -** This structure encapsulates a user-function destructor callback (as -** configured using create_function_v2()) and a reference counter. When -** create_function_v2() is called to create a function with a destructor, -** a single object of this type is allocated. FuncDestructor.nRef is set to -** the number of FuncDef objects created (either 1 or 3, depending on whether -** or not the specified encoding is SQLITE_ANY). The FuncDef.pDestructor -** member of each of the new FuncDef objects is set to point to the allocated -** FuncDestructor. -** -** Thereafter, when one of the FuncDef objects is deleted, the reference -** count on this object is decremented. When it reaches 0, the destructor -** is invoked and the FuncDestructor structure freed. -*/ -struct FuncDestructor { - int nRef; - void (*xDestroy)(void *); - void *pUserData; -}; - -/* -** Possible values for FuncDef.flags. Note that the _LENGTH and _TYPEOF -** values must correspond to OPFLAG_LENGTHARG and OPFLAG_TYPEOFARG. There -** are assert() statements in the code to verify this. -*/ -#define SQLITE_FUNC_LIKE 0x01 /* Candidate for the LIKE optimization */ -#define SQLITE_FUNC_CASE 0x02 /* Case-sensitive LIKE-type function */ -#define SQLITE_FUNC_EPHEM 0x04 /* Ephemeral. Delete with VDBE */ -#define SQLITE_FUNC_NEEDCOLL 0x08 /* sqlite3GetFuncCollSeq() might be called */ -#define SQLITE_FUNC_COUNT 0x10 /* Built-in count(*) aggregate */ -#define SQLITE_FUNC_COALESCE 0x20 /* Built-in coalesce() or ifnull() function */ -#define SQLITE_FUNC_LENGTH 0x40 /* Built-in length() function */ -#define SQLITE_FUNC_TYPEOF 0x80 /* Built-in typeof() function */ - -/* -** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are -** used to create the initializers for the FuncDef structures. -** -** FUNCTION(zName, nArg, iArg, bNC, xFunc) -** Used to create a scalar function definition of a function zName -** implemented by C function xFunc that accepts nArg arguments. The -** value passed as iArg is cast to a (void*) and made available -** as the user-data (sqlite3_user_data()) for the function. If -** argument bNC is true, then the SQLITE_FUNC_NEEDCOLL flag is set. -** -** AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal) -** Used to create an aggregate function definition implemented by -** the C functions xStep and xFinal. The first four parameters -** are interpreted in the same way as the first 4 parameters to -** FUNCTION(). -** -** LIKEFUNC(zName, nArg, pArg, flags) -** Used to create a scalar function definition of a function zName -** that accepts nArg arguments and is implemented by a call to C -** function likeFunc. Argument pArg is cast to a (void *) and made -** available as the function user-data (sqlite3_user_data()). The -** FuncDef.flags variable is set to the value passed as the flags -** parameter. -*/ -#define FUNCTION(zName, nArg, iArg, bNC, xFunc) \ - {nArg, SQLITE_UTF8, (bNC*SQLITE_FUNC_NEEDCOLL), \ - SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0} -#define FUNCTION2(zName, nArg, iArg, bNC, xFunc, extraFlags) \ - {nArg, SQLITE_UTF8, (bNC*SQLITE_FUNC_NEEDCOLL)|extraFlags, \ - SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0} -#define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \ - {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \ - pArg, 0, xFunc, 0, 0, #zName, 0, 0} -#define LIKEFUNC(zName, nArg, arg, flags) \ - {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0, 0} -#define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \ - {nArg, SQLITE_UTF8, nc*SQLITE_FUNC_NEEDCOLL, \ - SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0} - -/* -** All current savepoints are stored in a linked list starting at -** sqlite3.pSavepoint. The first element in the list is the most recently -** opened savepoint. Savepoints are added to the list by the vdbe -** OP_Savepoint instruction. -*/ -struct Savepoint { - char *zName; /* Savepoint name (nul-terminated) */ - i64 nDeferredCons; /* Number of deferred fk violations */ - Savepoint *pNext; /* Parent savepoint (if any) */ -}; - -/* -** The following are used as the second parameter to sqlite3Savepoint(), -** and as the P1 argument to the OP_Savepoint instruction. -*/ -#define SAVEPOINT_BEGIN 0 -#define SAVEPOINT_RELEASE 1 -#define SAVEPOINT_ROLLBACK 2 - - -/* -** Each SQLite module (virtual table definition) is defined by an -** instance of the following structure, stored in the sqlite3.aModule -** hash table. -*/ -struct Module { - const sqlite3_module *pModule; /* Callback pointers */ - const char *zName; /* Name passed to create_module() */ - void *pAux; /* pAux passed to create_module() */ - void (*xDestroy)(void *); /* Module destructor function */ -}; - -/* -** information about each column of an SQL table is held in an instance -** of this structure. -*/ -struct Column { - char *zName; /* Name of this column */ - Expr *pDflt; /* Default value of this column */ - char *zDflt; /* Original text of the default value */ - char *zType; /* Data type for this column */ - char *zColl; /* Collating sequence. If NULL, use the default */ - u8 notNull; /* An OE_ code for handling a NOT NULL constraint */ - char affinity; /* One of the SQLITE_AFF_... values */ - u16 colFlags; /* Boolean properties. See COLFLAG_ defines below */ -}; - -/* Allowed values for Column.colFlags: -*/ -#define COLFLAG_PRIMKEY 0x0001 /* Column is part of the primary key */ -#define COLFLAG_HIDDEN 0x0002 /* A hidden column in a virtual table */ - -/* -** A "Collating Sequence" is defined by an instance of the following -** structure. Conceptually, a collating sequence consists of a name and -** a comparison routine that defines the order of that sequence. -** -** If CollSeq.xCmp is NULL, it means that the -** collating sequence is undefined. Indices built on an undefined -** collating sequence may not be read or written. -*/ -struct CollSeq { - char *zName; /* Name of the collating sequence, UTF-8 encoded */ - u8 enc; /* Text encoding handled by xCmp() */ - void *pUser; /* First argument to xCmp() */ - int (*xCmp)(void*,int, const void*, int, const void*); - void (*xDel)(void*); /* Destructor for pUser */ -}; - -/* -** A sort order can be either ASC or DESC. -*/ -#define SQLITE_SO_ASC 0 /* Sort in ascending order */ -#define SQLITE_SO_DESC 1 /* Sort in ascending order */ - -/* -** Column affinity types. -** -** These used to have mnemonic name like 'i' for SQLITE_AFF_INTEGER and -** 't' for SQLITE_AFF_TEXT. But we can save a little space and improve -** the speed a little by numbering the values consecutively. -** -** But rather than start with 0 or 1, we begin with 'a'. That way, -** when multiple affinity types are concatenated into a string and -** used as the P4 operand, they will be more readable. -** -** Note also that the numeric types are grouped together so that testing -** for a numeric type is a single comparison. -*/ -#define SQLITE_AFF_TEXT 'a' -#define SQLITE_AFF_NONE 'b' -#define SQLITE_AFF_NUMERIC 'c' -#define SQLITE_AFF_INTEGER 'd' -#define SQLITE_AFF_REAL 'e' - -#define sqlite3IsNumericAffinity(X) ((X)>=SQLITE_AFF_NUMERIC) - -/* -** The SQLITE_AFF_MASK values masks off the significant bits of an -** affinity value. -*/ -#define SQLITE_AFF_MASK 0x67 - -/* -** Additional bit values that can be ORed with an affinity without -** changing the affinity. -*/ -#define SQLITE_JUMPIFNULL 0x08 /* jumps if either operand is NULL */ -#define SQLITE_STOREP2 0x10 /* Store result in reg[P2] rather than jump */ -#define SQLITE_NULLEQ 0x80 /* NULL=NULL */ - -/* -** An object of this type is created for each virtual table present in -** the database schema. -** -** If the database schema is shared, then there is one instance of this -** structure for each database connection (sqlite3*) that uses the shared -** schema. This is because each database connection requires its own unique -** instance of the sqlite3_vtab* handle used to access the virtual table -** implementation. sqlite3_vtab* handles can not be shared between -** database connections, even when the rest of the in-memory database -** schema is shared, as the implementation often stores the database -** connection handle passed to it via the xConnect() or xCreate() method -** during initialization internally. This database connection handle may -** then be used by the virtual table implementation to access real tables -** within the database. So that they appear as part of the callers -** transaction, these accesses need to be made via the same database -** connection as that used to execute SQL operations on the virtual table. -** -** All VTable objects that correspond to a single table in a shared -** database schema are initially stored in a linked-list pointed to by -** the Table.pVTable member variable of the corresponding Table object. -** When an sqlite3_prepare() operation is required to access the virtual -** table, it searches the list for the VTable that corresponds to the -** database connection doing the preparing so as to use the correct -** sqlite3_vtab* handle in the compiled query. -** -** When an in-memory Table object is deleted (for example when the -** schema is being reloaded for some reason), the VTable objects are not -** deleted and the sqlite3_vtab* handles are not xDisconnect()ed -** immediately. Instead, they are moved from the Table.pVTable list to -** another linked list headed by the sqlite3.pDisconnect member of the -** corresponding sqlite3 structure. They are then deleted/xDisconnected -** next time a statement is prepared using said sqlite3*. This is done -** to avoid deadlock issues involving multiple sqlite3.mutex mutexes. -** Refer to comments above function sqlite3VtabUnlockList() for an -** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect -** list without holding the corresponding sqlite3.mutex mutex. -** -** The memory for objects of this type is always allocated by -** sqlite3DbMalloc(), using the connection handle stored in VTable.db as -** the first argument. -*/ -struct VTable { - sqlite3 *db; /* Database connection associated with this table */ - Module *pMod; /* Pointer to module implementation */ - sqlite3_vtab *pVtab; /* Pointer to vtab instance */ - int nRef; /* Number of pointers to this structure */ - u8 bConstraint; /* True if constraints are supported */ - int iSavepoint; /* Depth of the SAVEPOINT stack */ - VTable *pNext; /* Next in linked list (see above) */ -}; - -/* -** Each SQL table is represented in memory by an instance of the -** following structure. -** -** Table.zName is the name of the table. The case of the original -** CREATE TABLE statement is stored, but case is not significant for -** comparisons. -** -** Table.nCol is the number of columns in this table. Table.aCol is a -** pointer to an array of Column structures, one for each column. -** -** If the table has an INTEGER PRIMARY KEY, then Table.iPKey is the index of -** the column that is that key. Otherwise Table.iPKey is negative. Note -** that the datatype of the PRIMARY KEY must be INTEGER for this field to -** be set. An INTEGER PRIMARY KEY is used as the rowid for each row of -** the table. If a table has no INTEGER PRIMARY KEY, then a random rowid -** is generated for each row of the table. TF_HasPrimaryKey is set if -** the table has any PRIMARY KEY, INTEGER or otherwise. -** -** Table.tnum is the page number for the root BTree page of the table in the -** database file. If Table.iDb is the index of the database table backend -** in sqlite.aDb[]. 0 is for the main database and 1 is for the file that -** holds temporary tables and indices. If TF_Ephemeral is set -** then the table is stored in a file that is automatically deleted -** when the VDBE cursor to the table is closed. In this case Table.tnum -** refers VDBE cursor number that holds the table open, not to the root -** page number. Transient tables are used to hold the results of a -** sub-query that appears instead of a real table name in the FROM clause -** of a SELECT statement. -*/ -struct Table { - char *zName; /* Name of the table or view */ - Column *aCol; /* Information about each column */ - Index *pIndex; /* List of SQL indexes on this table. */ - Select *pSelect; /* NULL for tables. Points to definition if a view. */ - FKey *pFKey; /* Linked list of all foreign keys in this table */ - char *zColAff; /* String defining the affinity of each column */ -#ifndef SQLITE_OMIT_CHECK - ExprList *pCheck; /* All CHECK constraints */ -#endif - tRowcnt nRowEst; /* Estimated rows in table - from sqlite_stat1 table */ - int tnum; /* Root BTree node for this table (see note above) */ - i16 iPKey; /* If not negative, use aCol[iPKey] as the primary key */ - i16 nCol; /* Number of columns in this table */ - u16 nRef; /* Number of pointers to this Table */ - u8 tabFlags; /* Mask of TF_* values */ - u8 keyConf; /* What to do in case of uniqueness conflict on iPKey */ -#ifndef SQLITE_OMIT_ALTERTABLE - int addColOffset; /* Offset in CREATE TABLE stmt to add a new column */ -#endif -#ifndef SQLITE_OMIT_VIRTUALTABLE - int nModuleArg; /* Number of arguments to the module */ - char **azModuleArg; /* Text of all module args. [0] is module name */ - VTable *pVTable; /* List of VTable objects. */ -#endif - Trigger *pTrigger; /* List of triggers stored in pSchema */ - Schema *pSchema; /* Schema that contains this table */ - Table *pNextZombie; /* Next on the Parse.pZombieTab list */ -}; - -/* -** Allowed values for Tabe.tabFlags. -*/ -#define TF_Readonly 0x01 /* Read-only system table */ -#define TF_Ephemeral 0x02 /* An ephemeral table */ -#define TF_HasPrimaryKey 0x04 /* Table has a primary key */ -#define TF_Autoincrement 0x08 /* Integer primary key is autoincrement */ -#define TF_Virtual 0x10 /* Is a virtual table */ - - -/* -** Test to see whether or not a table is a virtual table. This is -** done as a macro so that it will be optimized out when virtual -** table support is omitted from the build. -*/ -#ifndef SQLITE_OMIT_VIRTUALTABLE -# define IsVirtual(X) (((X)->tabFlags & TF_Virtual)!=0) -# define IsHiddenColumn(X) (((X)->colFlags & COLFLAG_HIDDEN)!=0) -#else -# define IsVirtual(X) 0 -# define IsHiddenColumn(X) 0 -#endif - -/* -** Each foreign key constraint is an instance of the following structure. -** -** A foreign key is associated with two tables. The "from" table is -** the table that contains the REFERENCES clause that creates the foreign -** key. The "to" table is the table that is named in the REFERENCES clause. -** Consider this example: -** -** CREATE TABLE ex1( -** a INTEGER PRIMARY KEY, -** b INTEGER CONSTRAINT fk1 REFERENCES ex2(x) -** ); -** -** For foreign key "fk1", the from-table is "ex1" and the to-table is "ex2". -** -** Each REFERENCES clause generates an instance of the following structure -** which is attached to the from-table. The to-table need not exist when -** the from-table is created. The existence of the to-table is not checked. -*/ -struct FKey { - Table *pFrom; /* Table containing the REFERENCES clause (aka: Child) */ - FKey *pNextFrom; /* Next foreign key in pFrom */ - char *zTo; /* Name of table that the key points to (aka: Parent) */ - FKey *pNextTo; /* Next foreign key on table named zTo */ - FKey *pPrevTo; /* Previous foreign key on table named zTo */ - int nCol; /* Number of columns in this key */ - /* EV: R-30323-21917 */ - u8 isDeferred; /* True if constraint checking is deferred till COMMIT */ - u8 aAction[2]; /* ON DELETE and ON UPDATE actions, respectively */ - Trigger *apTrigger[2]; /* Triggers for aAction[] actions */ - struct sColMap { /* Mapping of columns in pFrom to columns in zTo */ - int iFrom; /* Index of column in pFrom */ - char *zCol; /* Name of column in zTo. If 0 use PRIMARY KEY */ - } aCol[1]; /* One entry for each of nCol column s */ -}; - -/* -** SQLite supports many different ways to resolve a constraint -** error. ROLLBACK processing means that a constraint violation -** causes the operation in process to fail and for the current transaction -** to be rolled back. ABORT processing means the operation in process -** fails and any prior changes from that one operation are backed out, -** but the transaction is not rolled back. FAIL processing means that -** the operation in progress stops and returns an error code. But prior -** changes due to the same operation are not backed out and no rollback -** occurs. IGNORE means that the particular row that caused the constraint -** error is not inserted or updated. Processing continues and no error -** is returned. REPLACE means that preexisting database rows that caused -** a UNIQUE constraint violation are removed so that the new insert or -** update can proceed. Processing continues and no error is reported. -** -** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys. -** RESTRICT is the same as ABORT for IMMEDIATE foreign keys and the -** same as ROLLBACK for DEFERRED keys. SETNULL means that the foreign -** key is set to NULL. CASCADE means that a DELETE or UPDATE of the -** referenced table row is propagated into the row that holds the -** foreign key. -** -** The following symbolic values are used to record which type -** of action to take. -*/ -#define OE_None 0 /* There is no constraint to check */ -#define OE_Rollback 1 /* Fail the operation and rollback the transaction */ -#define OE_Abort 2 /* Back out changes but do no rollback transaction */ -#define OE_Fail 3 /* Stop the operation but leave all prior changes */ -#define OE_Ignore 4 /* Ignore the error. Do not do the INSERT or UPDATE */ -#define OE_Replace 5 /* Delete existing record, then do INSERT or UPDATE */ - -#define OE_Restrict 6 /* OE_Abort for IMMEDIATE, OE_Rollback for DEFERRED */ -#define OE_SetNull 7 /* Set the foreign key value to NULL */ -#define OE_SetDflt 8 /* Set the foreign key value to its default */ -#define OE_Cascade 9 /* Cascade the changes */ - -#define OE_Default 99 /* Do whatever the default action is */ - - -/* -** An instance of the following structure is passed as the first -** argument to sqlite3VdbeKeyCompare and is used to control the -** comparison of the two index keys. -*/ -struct KeyInfo { - sqlite3 *db; /* The database connection */ - u8 enc; /* Text encoding - one of the SQLITE_UTF* values */ - u16 nField; /* Number of entries in aColl[] */ - u8 *aSortOrder; /* Sort order for each column. May be NULL */ - CollSeq *aColl[1]; /* Collating sequence for each term of the key */ -}; - -/* -** An instance of the following structure holds information about a -** single index record that has already been parsed out into individual -** values. -** -** A record is an object that contains one or more fields of data. -** Records are used to store the content of a table row and to store -** the key of an index. A blob encoding of a record is created by -** the OP_MakeRecord opcode of the VDBE and is disassembled by the -** OP_Column opcode. -** -** This structure holds a record that has already been disassembled -** into its constituent fields. -*/ -struct UnpackedRecord { - KeyInfo *pKeyInfo; /* Collation and sort-order information */ - u16 nField; /* Number of entries in apMem[] */ - u8 flags; /* Boolean settings. UNPACKED_... below */ - i64 rowid; /* Used by UNPACKED_PREFIX_SEARCH */ - Mem *aMem; /* Values */ -}; - -/* -** Allowed values of UnpackedRecord.flags -*/ -#define UNPACKED_INCRKEY 0x01 /* Make this key an epsilon larger */ -#define UNPACKED_PREFIX_MATCH 0x02 /* A prefix match is considered OK */ -#define UNPACKED_PREFIX_SEARCH 0x04 /* Ignore final (rowid) field */ - -/* -** Each SQL index is represented in memory by an -** instance of the following structure. -** -** The columns of the table that are to be indexed are described -** by the aiColumn[] field of this structure. For example, suppose -** we have the following table and index: -** -** CREATE TABLE Ex1(c1 int, c2 int, c3 text); -** CREATE INDEX Ex2 ON Ex1(c3,c1); -** -** In the Table structure describing Ex1, nCol==3 because there are -** three columns in the table. In the Index structure describing -** Ex2, nColumn==2 since 2 of the 3 columns of Ex1 are indexed. -** The value of aiColumn is {2, 0}. aiColumn[0]==2 because the -** first column to be indexed (c3) has an index of 2 in Ex1.aCol[]. -** The second column to be indexed (c1) has an index of 0 in -** Ex1.aCol[], hence Ex2.aiColumn[1]==0. -** -** The Index.onError field determines whether or not the indexed columns -** must be unique and what to do if they are not. When Index.onError=OE_None, -** it means this is not a unique index. Otherwise it is a unique index -** and the value of Index.onError indicate the which conflict resolution -** algorithm to employ whenever an attempt is made to insert a non-unique -** element. -*/ -struct Index { - char *zName; /* Name of this index */ - int *aiColumn; /* Which columns are used by this index. 1st is 0 */ - tRowcnt *aiRowEst; /* Result of ANALYZE: Est. rows selected by each column */ - Table *pTable; /* The SQL table being indexed */ - char *zColAff; /* String defining the affinity of each column */ - Index *pNext; /* The next index associated with the same table */ - Schema *pSchema; /* Schema containing this index */ - u8 *aSortOrder; /* Array of size Index.nColumn. True==DESC, False==ASC */ - char **azColl; /* Array of collation sequence names for index */ - int nColumn; /* Number of columns in the table used by this index */ - int tnum; /* Page containing root of this index in database file */ - u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */ - u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */ - u8 bUnordered; /* Use this index for == or IN queries only */ -#ifdef SQLITE_ENABLE_STAT3 - int nSample; /* Number of elements in aSample[] */ - tRowcnt avgEq; /* Average nEq value for key values not in aSample */ - IndexSample *aSample; /* Samples of the left-most key */ -#endif -}; - -/* -** Each sample stored in the sqlite_stat3 table is represented in memory -** using a structure of this type. See documentation at the top of the -** analyze.c source file for additional information. -*/ -struct IndexSample { - union { - char *z; /* Value if eType is SQLITE_TEXT or SQLITE_BLOB */ - double r; /* Value if eType is SQLITE_FLOAT */ - i64 i; /* Value if eType is SQLITE_INTEGER */ - } u; - u8 eType; /* SQLITE_NULL, SQLITE_INTEGER ... etc. */ - int nByte; /* Size in byte of text or blob. */ - tRowcnt nEq; /* Est. number of rows where the key equals this sample */ - tRowcnt nLt; /* Est. number of rows where key is less than this sample */ - tRowcnt nDLt; /* Est. number of distinct keys less than this sample */ -}; - -/* -** Each token coming out of the lexer is an instance of -** this structure. Tokens are also used as part of an expression. -** -** Note if Token.z==0 then Token.dyn and Token.n are undefined and -** may contain random values. Do not make any assumptions about Token.dyn -** and Token.n when Token.z==0. -*/ -struct Token { - const char *z; /* Text of the token. Not NULL-terminated! */ - unsigned int n; /* Number of characters in this token */ -}; - -/* -** An instance of this structure contains information needed to generate -** code for a SELECT that contains aggregate functions. -** -** If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a -** pointer to this structure. The Expr.iColumn field is the index in -** AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate -** code for that node. -** -** AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the -** original Select structure that describes the SELECT statement. These -** fields do not need to be freed when deallocating the AggInfo structure. -*/ -struct AggInfo { - u8 directMode; /* Direct rendering mode means take data directly - ** from source tables rather than from accumulators */ - u8 useSortingIdx; /* In direct mode, reference the sorting index rather - ** than the source table */ - int sortingIdx; /* Cursor number of the sorting index */ - int sortingIdxPTab; /* Cursor number of pseudo-table */ - int nSortingColumn; /* Number of columns in the sorting index */ - ExprList *pGroupBy; /* The group by clause */ - struct AggInfo_col { /* For each column used in source tables */ - Table *pTab; /* Source table */ - int iTable; /* Cursor number of the source table */ - int iColumn; /* Column number within the source table */ - int iSorterColumn; /* Column number in the sorting index */ - int iMem; /* Memory location that acts as accumulator */ - Expr *pExpr; /* The original expression */ - } *aCol; - int nColumn; /* Number of used entries in aCol[] */ - int nAccumulator; /* Number of columns that show through to the output. - ** Additional columns are used only as parameters to - ** aggregate functions */ - struct AggInfo_func { /* For each aggregate function */ - Expr *pExpr; /* Expression encoding the function */ - FuncDef *pFunc; /* The aggregate function implementation */ - int iMem; /* Memory location that acts as accumulator */ - int iDistinct; /* Ephemeral table used to enforce DISTINCT */ - } *aFunc; - int nFunc; /* Number of entries in aFunc[] */ -}; - -/* -** The datatype ynVar is a signed integer, either 16-bit or 32-bit. -** Usually it is 16-bits. But if SQLITE_MAX_VARIABLE_NUMBER is greater -** than 32767 we have to make it 32-bit. 16-bit is preferred because -** it uses less memory in the Expr object, which is a big memory user -** in systems with lots of prepared statements. And few applications -** need more than about 10 or 20 variables. But some extreme users want -** to have prepared statements with over 32767 variables, and for them -** the option is available (at compile-time). -*/ -#if SQLITE_MAX_VARIABLE_NUMBER<=32767 -typedef i16 ynVar; -#else -typedef int ynVar; -#endif - -/* -** Each node of an expression in the parse tree is an instance -** of this structure. -** -** Expr.op is the opcode. The integer parser token codes are reused -** as opcodes here. For example, the parser defines TK_GE to be an integer -** code representing the ">=" operator. This same integer code is reused -** to represent the greater-than-or-equal-to operator in the expression -** tree. -** -** If the expression is an SQL literal (TK_INTEGER, TK_FLOAT, TK_BLOB, -** or TK_STRING), then Expr.token contains the text of the SQL literal. If -** the expression is a variable (TK_VARIABLE), then Expr.token contains the -** variable name. Finally, if the expression is an SQL function (TK_FUNCTION), -** then Expr.token contains the name of the function. -** -** Expr.pRight and Expr.pLeft are the left and right subexpressions of a -** binary operator. Either or both may be NULL. -** -** Expr.x.pList is a list of arguments if the expression is an SQL function, -** a CASE expression or an IN expression of the form " IN (, ...)". -** Expr.x.pSelect is used if the expression is a sub-select or an expression of -** the form " IN (SELECT ...)". If the EP_xIsSelect bit is set in the -** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is -** valid. -** -** An expression of the form ID or ID.ID refers to a column in a table. -** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is -** the integer cursor number of a VDBE cursor pointing to that table and -** Expr.iColumn is the column number for the specific column. If the -** expression is used as a result in an aggregate SELECT, then the -** value is also stored in the Expr.iAgg column in the aggregate so that -** it can be accessed after all aggregates are computed. -** -** If the expression is an unbound variable marker (a question mark -** character '?' in the original SQL) then the Expr.iTable holds the index -** number for that variable. -** -** If the expression is a subquery then Expr.iColumn holds an integer -** register number containing the result of the subquery. If the -** subquery gives a constant result, then iTable is -1. If the subquery -** gives a different answer at different times during statement processing -** then iTable is the address of a subroutine that computes the subquery. -** -** If the Expr is of type OP_Column, and the table it is selecting from -** is a disk table or the "old.*" pseudo-table, then pTab points to the -** corresponding table definition. -** -** ALLOCATION NOTES: -** -** Expr objects can use a lot of memory space in database schema. To -** help reduce memory requirements, sometimes an Expr object will be -** truncated. And to reduce the number of memory allocations, sometimes -** two or more Expr objects will be stored in a single memory allocation, -** together with Expr.zToken strings. -** -** If the EP_Reduced and EP_TokenOnly flags are set when -** an Expr object is truncated. When EP_Reduced is set, then all -** the child Expr objects in the Expr.pLeft and Expr.pRight subtrees -** are contained within the same memory allocation. Note, however, that -** the subtrees in Expr.x.pList or Expr.x.pSelect are always separately -** allocated, regardless of whether or not EP_Reduced is set. -*/ -struct Expr { - u8 op; /* Operation performed by this node */ - char affinity; /* The affinity of the column or 0 if not a column */ - u16 flags; /* Various flags. EP_* See below */ - union { - char *zToken; /* Token value. Zero terminated and dequoted */ - int iValue; /* Non-negative integer value if EP_IntValue */ - } u; - - /* If the EP_TokenOnly flag is set in the Expr.flags mask, then no - ** space is allocated for the fields below this point. An attempt to - ** access them will result in a segfault or malfunction. - *********************************************************************/ - - Expr *pLeft; /* Left subnode */ - Expr *pRight; /* Right subnode */ - union { - ExprList *pList; /* Function arguments or in " IN ( IN (